diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000000..70fff86268c3 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,8 @@ +# Set default behaviour, in case users don't have core.autocrlf set. +* text=auto + +*.sln text eol=crlf +*.cs text eol=crlf +*.csproj text eol=crlf +*.ps1 text eol=crlf +build.proj text eol=crlf diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..ac45c755c73f --- /dev/null +++ b/.gitignore @@ -0,0 +1,194 @@ +# Azure PowerShell specific +src/Publish/ +src/Package/ + +obj +TestResults +*.orig +*.ncrunchsolution +*.patch +msbuild.log + +# app.config is not useful for PowerShell. +# please do not commit any app.config files. +app.config +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +build/ +bld/ +src/*/[Bb]in/ +[Oo]bj/ + +# Roslyn cache directories +*.ide/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +#NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding addin-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +## TODO: Comment the next line if you want to checkin your +## web deploy settings but do note that will include unencrypted +## passwords +*.pubxml + +# NuGet Packages Directory +packages/ +## TODO: If the tool you use requires repositories.config +## uncomment the next line +#!packages/repositories.config + +# Enable "build/" folder in the NuGet Packages folder since +# NuGet packages use it for MSBuild targets. +# This line needs to be after the ignore of the build folder +# (and the packages folder if the line above has been uncommented) +!packages/build/ + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +*.Cache +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.dbproj.schemaview +node_modules/ +.pshproj + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ diff --git a/AzurePowershell.Test.targets b/AzurePowershell.Test.targets new file mode 100644 index 000000000000..f31479edbba2 --- /dev/null +++ b/AzurePowershell.Test.targets @@ -0,0 +1,264 @@ + + + + .\src\Local.testsettings + .\src\Local.x64.testsettings + .\src\Common\Commands.ScenarioTest\bin\Debug\Microsoft.WindowsAzure.Commands.ScenarioTest.dll + .\src\Common\Commands.Common.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Common.Test.dll + .\src\ResourceManager\Sql\Commands.Sql.Test\bin\Debug\Microsoft.Azure.Commands.Sql.Test.dll + .\src\AzureRT.testsettings + .\src\ServiceManagement\Compute\Commands.ServiceManagement.Test\bin\Debug\Microsoft.WindowsAzure.Commands.ServiceManagement.Test.dll + src\ServiceManagement\Storage\Commands.Storage.ScenarioTest\bin\Debug\CLITest.dll + .\src\ServiceManagement\Services\Commands.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Test.dll + .\src\ResourceManager\Resources\Commands.Resources.Test\bin\Debug\Microsoft.Azure.Commands.Resources.Test.dll + .\src\ResourceManager\DataFactories\Commands.DataFactories.Test\bin\Debug\Microsoft.Azure.Commands.DataFactories.Test.dll + .\src\ResourceManager\Batch\Commands.Batch.Test\bin\Debug\Microsoft.Azure.Commands.Batch.Test.dll + .\src\ServiceManagement\Compute\Commands.ServiceManagement.Test\bin\Debug\Microsoft.WindowsAzure.Commands.ServiceManagement.Test.dll + .\src\ServiceManagement\Compute\Commands.ServiceManagement.Extensions.Test\bin\Debug\Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions.Test.dll + .\src\ServiceManagement\Sql\Commands.SqlDatabase.Test\bin\Debug\Microsoft.WindowsAzure.Commands.SqlDatabase.Test.dll + .\src\ServiceManagement\HDInsight\Commands.HDInsight.Test\bin\Debug\Microsoft.WindowsAzure.Commands.HDInsight.Test.dll + .\src\ServiceManagement\Storage\Commands.Storage.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Storage.Test.dll + "!Functional&!Scenario&!AzureRTScenario&!Sequential&!PIRTest&!Preview&!ADDomain" + All + "OneSDK&CIT" + "Functional|AzureRTScenario" + "Functional|AzureRTScenario|Preview" + "Functional|AzureRTScenario|Sequential" + + + + + + + + + + + + + + + + + + + + <_ManagedCacheTestAssembly>.\src\ServiceManagement\ManagedCache\Commands.ManagedCache.Test\bin\Debug\Microsoft.Azure.Commands.ManagedCache.Test.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_RecoveryServicesTestAssembly>.\src\ServiceManagement\RecoveryServices\Commands.RecoveryServices.Test\bin\Debug\Microsoft.Azure.Commands.RecoveryServices.Test.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000000..2ad45a5f6ad6 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,5 @@ +# Contribute Code or Provide Feedback + +If you would like to become an active contributor to this project please follow the instructions provided in [Microsoft Azure Projects Contribution Guidelines](http://windowsazure.github.com/guidelines.html). + +If you encounter any bugs with Microsoft Azure PowerShell please file an issue in the [Issues](https://github.com/WindowsAzure/azure-sdk-tools/issues) section of the project. \ No newline at end of file diff --git a/ChangeLog.txt b/ChangeLog.txt new file mode 100644 index 000000000000..de13e504ae51 --- /dev/null +++ b/ChangeLog.txt @@ -0,0 +1,788 @@ +2014.11.14 Version 0.8.11 +* Profile + * Clear-AzureProfile: remove all subscription and credential data from the user store + * Select-AzureSubscription: fixed output types in default and PassThru mode +* Compute + * Get-AzureVMSqlServerExtension + * New-AzureVMSqlServerExtension + * Set-AzureVMSqlServerExtension + * Remove-AzureVMSqlServerExtension +* HDInsight + * New cmdlets + * Add-AzureHDInisghtScriptAction + * Set-AzureHDInsightClusterSize + * Changed cmdlets + *Added ConfigActions parameter +* Managed Cache + * Get-AzureManagedCacheNamedCache + * New-AzureManagedCacheNamedCache + * Set-AzureManagedCacheNamedCache + * Remove-AzureManagedCacheNamedCache +* Websites + * Fixes for webjobs and site creation + * Additional settings for Publish-AzureWebsiteProject cmdlet + * Enable use of SAS URLs in ApplicationDiagnostics storage +* Sql Database (AzureResourceManager) + * New cmdlets to manage direct access to Sql databases: + * Enable-AzureSqlDatabaseDirectAccess + * Disable-AzureSqlDatabaseDirectAccess + * Enable-AzureSqlDatabaseServerDirectAccess + * Enable-AzureSqlDatabaseServerDirectAccess + * Rename previous cmdlets to use the term audit policy instead of audit setting + * Get-AzureSqlDatabaseAuditingPolicy + * Set-AzureSqlDatabaseAuditingPolicy + * Get-AzureSqlDatabaseServerAuditingPolicy + * Set-AzureSqlDatabaseServerAuditingPolicy + * Remove-AzureSqlDatabaseAuditing + * Remove-AzureSqlDatabaseServerAuditing + * Use-AzureSqlDatabaseServerAuditingPolicy + * Allow users to define which storage account key (Primary or Secondary) to use when defining audit policy, using the “StorageKeyType” parameter. + +2014.10.27 Version 0.8.10 +* Azure Data Factory cmdlets in AzureResourceManager mode + * New-AzureDataFactory + * New-AzureDataFactoryGateway + * New-AzureDataFactoryGatewayKey + * New-AzureDataFactoryHub + * New-AzureDataFactoryLinkedService + * New-AzureDataFactoryPipeline + * New-AzureDataFactoryTable + * New-AzureDataFactoryEncryptValue + * Get-AzureDataFactory + * Get-AzureDataFactoryGateway + * Get-AzureDataFactoryHub + * Get-AzureDataFactoryLinkedService + * Get-AzureDataFactoryPipeline + * Get-AzureDataFactoryRun + * Get-AzureDataFactorySlice + * Get-AzureDataFactoryTable + * Remove-AzureDataFactory + * Remove-AzureDataFactoryGateway + * Remove-AzureDataFactoryHub + * Remove-AzureDataFactoryLinkedService + * Remove-AzureDataFactoryPipeline + * Remove-AzureDataFactoryTable + * Resume-AzureDataFactoryPipeline + * Save-AzureDataFactoryLog + * Set-AzureDataFactoryGateway + * Set-AzureDataFactoryPipelineActivePeriod + * Set-AzureDataFactorySliceStatus + * Suspend-AzureDataFactoryPipeline +* Azure Batch cmdlets in AzureResourceManager mode + * Set-AzureBatchAccount + * Remove-AzureBatchAccount + * New-AzureBatchAccountKey + * New-AzureBatchAccount + * Get-AzureBatchAccountKeys + * Get-AzureBatchAccount +* Azure Network + * Multi NIC support + * Add-AzureNetworkInterfaceConfig + * Get-AzureNetworkInterfaceConfig + * Remove-AzureNetworkInterfaceConfig + * Set-AzureNetworkInterfaceConfig + * Security group support + * Set-AzureNetworkSecurityGroupToSubnet + * Set-AzureNetworkSecurityGroupConfig + * Remove-AzureNetworkSecurityGroupFromSubnet + * Remove-AzureNetworkSecurityGroupConfig + * Remove-AzureNetworkSecurityGroup + * New-AzureNetworkSecurityGroup + * Get-AzureNetworkSecurityGroupForSubnet + * Get-AzureNetworkSecurityGroupConfig + * Get-AzureNetworkSecurityGroup +* Azure Virtual Machine + * Added Add PublicConfigKey and PrivateConfigKey parameters to SetAzureVMExtension +* Azure Website + * Set-AzureWebsite exposes new parameters and Get-AzureWebsite returns them + * SlotStickyConnectionStringNames – connection string names not to be moved during swap operation + * SlotStickyAppSettingNames – application settings names not to be moved during swap operation + * AutoSwapSlotName – slot name to swap automatically with after successful deployment +* Recovery Services + * Import & view vault settings + * Import-AzureSiteRecoveryVaultSettingsFile + * Get-AzureSiteRecoveryVaultSettings + * Enumerate Servers, Protection Containers, Protection Entities + * Get-AzureSiteRecoveryServer + * Get-AzureSiteRecoveryProtectionContainer + * Get-AzureSiteRecoveryProtectionEntity + * Get-AzureSiteRecoveryVM + * Manage Azure Site Recovery Operations + * Get-AzureSiteRecoveryJob + * Restart-AzureSiteRecoveryJob + * Resume-AzureSiteRecoveryJob + * Stop-AzureSiteRecoveryJob + * Manage Recovery Plan + * New-AzureSiteRecoveryRecoveryPlan + * Get-AzureSiteRecoveryRecoveryPlanFile + * Get-AzureSiteRecoveryRecoveryPlan + * Remove-AzureSiteRecoveryRecoveryPlan + * Update-AzureSiteRecoveryRecoveryPlan + * Protection and Failover Operations + * Set-AzureSiteRecoveryProtectionEntity + * Start-AzureSiteRecoveryCommitFailoverJob + * Start-AzureSiteRecoveryPlannedFailoverJob + * Start-AzureSiteRecoveryTestFailoverJob + * Start-AzureSiteRecoveryUnplannedFailoverJob + * Update-AzureSiteRecoveryProtectionDirection + +2014.10.03 Version 0.8.9 +* Redis Cache cmdlets in AzureResourceManager mode + * New-AzureRedisCache + * Get-AzureRedisCache + * Set-AzureRedisCache + * Remove-AzureRedisCache + * New-AzureRedisCacheKey + * Get-AzureRedisCacheKey +* Fixed Remove-AzureDataDisk regression +* Fixed cloud service cmdlets to work with the latest Azure authoring tools +* Fixed Get-AzureSubscription -ExtendedDetails regression +* Added -CreateACSNamespace parameter to New-AzureSBNamespace cmdlet + +2014.09.10 Version 0.8.8 +* Role-based access control support + * Query role definition + * Get-AzureRoleDefinition + * Manage role assignment + * New-AzureRoleAssignment + * Get-AzureRoleAssignment + * Remove-AzureRoleAssignment + * Query Active Directory object + * Get-AzureADUser + * Get-AzureADGroup + * Get-AzureADGroupMember + * Get-AzureADServicePrincipal + * Show user's permissions on + * Get-AzureResourceGroup + * Get-AzureResource +* Active Directory service principal login support in Azure Resource Manager mode + * Add-AzureAccount -Credential -ServicePrincipal -Tenant +* SQL Database auditing support in Azure Resource Manager mode + * Use-AzureSqlServerAuditingSetting + * Set-AzureSqlServerAuditingSetting + * Set-AzureSqlDatabaseAuditingSetting + * Get-AzureSqlServerAuditingSetting + * Get-AzureSqlDatabaseAuditingSetting + * Disable-AzureSqlServerAuditing + * Disable-AzureSqlDatabaseAuditing +* Other improvements + * Virtual Machine DSC extension supports PSCredential as configuration argument + * Virtual Machine Antimalware extension supports native JSON configuration + * Storage supports creating storage account with different geo-redundant options + * Traffic Manager supports nesting of profiles + * Website supports configuring x32/x64 worker process + * -Detail parameter on Get-AzureResourceGroup to improve performance + * Major refactoring around account and subscription management + +2014.08.22 Version 0.8.7.1 +* AzureResourceManager + * Update Gallery and Monitoring management clients to fix Gallery commands +*HDInsight + * Update Microsoft.Net API for Hadoop + +2014.08.18 Version 0.8.7 +* Update Newtonsoft.Json dependency to 6.0.4 +* Compute + * Windows Azure Diagnostics (WAD) Version 1.2: extension cmdlets for Iaas And PaaS + * Set-AzureVMDiagnosticsExtension + * Get-AzureVMDiagnosticsExtension + * Set-AzureServiceDiagnosticsExtension + * Get-AzureServiceDiagnosticsExtension + * Get-AzureDeployment: added CreatedTime and LastModifiedTime to output + * Get-AzureVM: added Hostname property + * Implemented CustomData support for Azure VMs +* Websites + * Added RoutingRules parameter to Set-AzureWebsite to expose Testing in Production (TiP) and returned from Get-AzureWebsite + * Get-AzureWebsiteMetric to return web site metrics + * Get-AzureWebHostingPlan + * Get-AzureWebHostingPlanMetric to return metrics for the servers in the web hosting plan +* SQL Database + * Get-AzureSqlRecoverableDatabase parameter simplification and return type changes + * Set-AzureSqlDatabaseRecovery parameter and return type changes +* HDInsight + * Added support for provisioning of HBase clusters into Virtual Networks. + +2014.08.04 Version 0.8.6 +* Non-interactive login support for Microsoft Organizational account with ``Add-AzureAccount -Credential`` +* Upgrade cloud service cmdlets dependencies to Azure SDK 2.4 +* Compute + * PowerShell DSC VM extension + * Get-AzureVMDscExtension + * Remove-AzureVMDscExtension + * Set-AzureVMDscExtension + * Publish-AzureVMDscConfiguration + * Added CompanyName and SupportedOS parameters to Publish-AzurePlatformExtension + * New-AzureVM will display a warning instead of an error when the service already exists in the same subscription + * Added Version parameter to generic service extension cmdlets + * Changed the ShowInGUI parameter to DoNotShowInGUI in Update-AzureVMImage +* SQL Database + * Added OfflineSecondary parameter to Start-AzureSqlDatabaseCopy + * Database copy cmdlets will return 2 more properties: IsOfflineSecondary and IsTerminationAllowed +* Windows Azure Pack + * New-WAPackCloudService + * Get-WAPackCloudService + * Remove-WAPackCloudService + * New-WAPackVMRole + * Get-WAPackVMRole + * Set-WAPackVMRole + * Remove-WAPackVMRole + * New-WAPackVNet + * Remove-WAPackVNet + * New-WAPackVMSubnet + * Get-WAPackVMSubnet + * Remove-WAPackVMSubnet + * New-WAPackStaticIPAddressPool + * Get-WAPackStaticIPAddressPool + * Remove-WAPackStaticIPAddressPool + * Get-WAPackLogicalNetwork + +2014.07.16 Version 0.8.5 +* Upgrade .NET dependency to .NET 4.5 +* Azure File Service + * Get-AzureStorageFile + * Remove-AzureStorageFile + * Get-AzureStorageFileContent + * Set-AzureStorageFileContent +* Azure Resource Manager tags in AzureResourceManager mode + * New-AzureTag + * Get-AzureTag + * Remove-AzureTag + * Tag parameter in New-AzureResourceGroup, Set-AzureResourceGroup, New-AzureResource and Set-AzureResource + * Tag parameter in Get-AzureResourceGroup and Get-AzureResource +* Compute + * ReverseDnsFqdn parameter in New-AzureService, Set-AzureService, New-AzureVM and New-AzureQuickVM +* Network + * Set-AzureInternalLoadBalancer + * Add-AzureDns + * Set-AzureDns + * Remove-AzureDns + * Added IdealTimeoutInMinutes parameter to Set-AzurePublicIP, Add-AzureEndpoint and Set-AzureLoadBalancedEndpoint + +2014.06.30 Version 0.8.4 +* Compute + * New-AzurePlatformExtensionCertificateConfig + * New-AzurePlatformExtensionEndpointConfigSet + * New-AzurePlatformExtensionLocalResourceConfigSet + * Publish-AzurePlatformExtension + * Remove-AzurePlatformExtensionEndpoint + * Remove-AzurePlatformExtensionLocalResource + * Set-AzurePlatformExtension + * Set-AzurePlatformExtensionEndpoint + * Set-AzurePlatformExtensionLocalResource + * Unpublish-AzurePlatformExtension +* Antimalware + * Get-AzureVMMicrosoftAntimalwareExtension + * Set-AzureVMMicrosoftAntimalwareExtension + * Improve the cmdlets to use AzureStorageContext instead of flat storage parameters +* Networking + * Enabling New-AzureVnetGateway to create dynamic gateways + * Added alias New-AzureDns to New-AzureDnsConfig +* Scheduler + * New-AzureSchedulerJobCollection + * Set-AzureSchedulerJobCollection + +2014.05.29 Version 0.8.3 +* Restructured source code and installation folder +* Web Site + * Return instances info from Get-AzureWebsite + * Added "Slot1" and "Slot2" parameters to enable swap between any 2 slots +* Traffic Manager + * Support for Weighted Round Robin policies + * Support for Performance policies with external endpoints +* Update Get-AzureRoleSize, Get-AzureAffinityGroup, Get-AzureService, Get-AzureLocation cmdlets with role sizes info +* New "ClusterType" parameter for HDInsight + +2014.05.12 Version 0.8.2 +* Compute and Network improvements + * Public IP support + * Set-AzurePublicIP + * Get-AzurePublicIP + * Remove-AzurePublicIP + * Reserved IP support + * New-AzureReservedIP + * Get-AzureReservedIP + * Remove-AzureReservedIP + * Internal load balancer support + * New-AzureInternalLoadBalancerConfig + * Add-AzureInternalLoadBalancer + * Get-AzureInternalLoadBalancer + * Remove-AzureInternalLoadBalancer + * VM image disk improvements + * New-AzureVMImageDiskConfigSet + * Set-AzureVMImageOSDiskConfig + * Remove-AzureVMImageOSDiskConfig + * Set-AzureVMImageDataDiskConfig + * Remove-AzureVMImageDataDiskConfig + * Virtual network improvments + * Set-AzureVnetGatewayKey +* Azure Automation cmdlets + * Get-AzureAutomationAccount + * Get-AzureAutomationJob + * Get-AzureAutomationJobOutput + * Get-AzureAutomationRunbook + * Get-AzureAutomationRunbookDefinition + * Get-AzureAutomationSchedule + * New-AzureAutomationRunbook + * New-AzureAutomationSchedule + * Publish-AzureAutomationRunbook + * Register-AzureAutomationScheduledRunbook + * Remove-AzureAutomationRunbook + * Remove-AzureAutomationSchedule + * Resume-AzureAutomationJob + * Set-AzureAutomationRunbook + * Set-AzureAutomationRunbookDefinition + * Set-AzureAutomationSchedule + * Start-AzureAutomationRunbook + * Stop-AzureAutomationJob + * Suspend-AzureAutomationJob + * Unregister-AzureAutomationScheduledRunbook +* Traffic Manager cmdlets + * Add-AzureTrafficManagerEndpoint + * Disable-AzureTrafficManagerProfile + * Enable-AzureTrafficManagerProfile + * Get-AzureTrafficManagerProfile + * New-AzureTrafficManagerProfile + * Remove-AzureTrafficManagerEndpoint + * Remove-AzureTrafficManagerProfile + * Set-AzureTrafficManagerEndpoint + * Set-AzureTrafficManagerProfile + * Test-AzureTrafficManagerDomainName +* Anti-Malware Cloud Service extension cmdlets + * Get-AzureServiceAntimalwareConfig + * Remove-AzureServiceAntimalwareExtension + * Set-AzureServiceAntimalwareExtension + +2014.05.07 Version 0.8.1 +* Managed cache cmdlets + * New-AzureManagedCache + * Set-AzureManagedCache + * Get-AzureManagedCache + * Remove-AzureManagedCache + * New-AzureManagedCacheAccessKey + * Get-AzureManagedCacheAccessKey +* Fixed installer to support Windows PowerShell 5.0 Preview +* Fixed a bunch of module loading issues +* Documentation improvements +* Engineering and infrastructure improvements + +2014.04.03 Version 0.8.0 +* Azure Resource Manager cmdlets (preview) + * Switch-AzureMode to switch the PowerShell module between service management and resource manager. + * Resource groups + * New-AzureResourceGroup + * Get-AzureResourceGroup + * Remove-AzureResourceGroup + * Get-AzureResourceGroupLog + * Templates + * Get-AzureResourceGroupGalleryTemplate + * Save-AzureResourceGroupGalleryTemplate + * Test-AzureResourceGroupTemplate + * Deployments + * New-AzureResourceGroupDeployment + * Get-AzureResourceGroupDeployment + * Resources + * New-AzureResource + * Get-AzureResource + * Set-AzureResource + * Remove-AzureResource +* Azure Scheduler cmdlets + * Get-AzureSchedulerLocation + * Job collection + * Get-AzureSchedulerJobCollection + * Remove-AzureSchedulerJobCollection + * HTTP job and storage queue job + * New-AzureSchedulerHttpJob + * Set-AzureSchedulerHttpJob + * New-AzureSchedulerStorageQueueJob + * Set-AzureSchedulerStorageQueueJob + * Get-AzureSchedulerJob + * Remove-AzureSchedulerJob + * Get-AzureSchedulerJobHistory +* Virtual Machine improvements + * Puppet extension + * Get-AzureVMPuppetExtension + * Set-AzureVMPuppetExtension + * Remove-AzureVMPuppetExtension + * Custom script extension + * Get-AzureVMCustomScriptExtension + * Set-AzureVMCustomScriptExtension + * Remove-AzureVMCustomScriptExtension + * VM Image support in the following cmdlets + * Get-AzureVMImage + * Save-AzureVMImage + * Remove-AzureVMImage + * New-AzureVM + * New-AzureQuickVM +* Upgrade cloud service cmdlets dependencies to Azure SDK 2.3 + +2014.03.11 Version 0.7.4 +* VM extension cmdlets + * Set-AzureVMExtension + * Get-AzureVMExtension + * Remove-AzureVMExtension + * Set-AzureVMAccessExtension + * Get-AzureVMAccessExtension + * Remove-AzureVMAccessExtension +* Multi-thread support in storage cmdlets +* Add YARN support via -Yarn parameter on Add-AzureHDInsightConfigValues + +2014.02.25 Version 0.7.3.1 +* Hotfix for https://github.com/WindowsAzure/azure-sdk-tools/issues/2350 + +2014.02.12 Version 0.7.3 +* Web Site cmdlets + * Slot + * All Web Site cmdlets takes a new -Slot parameter + * Switch-AzureWebsiteSlot to swap slots + * WebJob + * Get-AzureWebsiteJob + * New-AzureWebsiteJob + * Remove-AzureWebsiteJob + * Start-AzureWebsiteJob + * Stop-AzureWebsiteJob + * Get-AzureWebsiteJobHistory + * Publish project to Web Site via WebDeploy + * Publish-AzureWebsiteProject + * Test Web Site name availability + * Test-AzureName -Website +* Virtual Machine cmdlets + * Generic extension + * Get-AzureVMAvailableExtension + * Get-AzureServiceAvailableExtension + * BGInfo extension + * Get-AzureVMBGInfoExtension + * Set-AzureVMBGInfoExtension + * Remove-AzureBMBGInfoExtension + * VM role size + * Get-AzureRoleSize + * New-AzureQuickVM -InstanceSize takes a string instead of enum + * Other improvements + * Add-AzureProvisioningConfig will enable guest agent by default. Use -DisableGuestAgent to disable it +* Cloud Service cmdlets + * Generic extension + * Get-AzureServiceExtension + * Set-AzureServiceExtension + * Remove-AzureServiceExtension + * Active directory domain extension + * Get-AzureServiceADDomainExtension + * Set-AzureServiceADDomainExtension + * Remove-AzureServiceADDomainExtension + * New-AzureServiceADDomainExtensionConfig +Virtual Network cmdlets + * Get-AzureStaticVNetIP + * Set-AzureStaticVNetIP + * Remove-AzureStaticVNetIP + * Test-AzureStaticVNetIP +* Storage cmdlets + * Metrics and logging + * Get-AzureStorageServiceLoggingProperty + * Set-AzureStorageServiceLoggingProperty + * Get-AzureStorageServiceMetricsProperty + * Set-AzureStorageServiceMetricsProperty + * Timeout configuration via -ServerTimeoutRequest and -ClientTimeoutRequest parameters + * Paging support via -MaxCount and -ContinuationToken parameters + * Get-AzureStorageBlob + * Get-AzureStorageContainer +* ExpressRoute cmdlets (in ExpressRoute module) + * Get-AzureDedicatedCircuit + * Get-AzureDedicatedCircuitLink + * Get-AzureDedicatedCircuitServiceProvider + * New-AzureDedicatedCircuit + * New-AzureDedicatedCircuitLink + * Remove-AzureDedicatedCircuit + * Remove-AzureDedicatedCircuitLink + * Get-AzureBGPPeering + * New-AzureBGPPeering + * Remove-AzureBGPPeering + * Set-AzureBGPPeering + + +2013.12.19 Version 0.7.2.1 +* Hotfix for some encoding issue with Hive query which contain "%". + +2013.12.10 Version 0.7.2 +* HDInsight cmdlets + * Add-AzureHDInsightConfigValues + * Add-AzureHDInsightMetastore + * Add-AzureHDInsightStorage + * Get-AzureHDInsightCluster + * Get-AzureHDInsightJob + * Get-AzureHDInsightJobOutput + * Get-AzureHDInsightProperties + * New-AzureHDInsightCluster + * New-AzureHDInsightClusterConfig + * New-AzureHDInsightHiveJobDefinition + * New-AzureHDInsightMapReduceJobDefinition + * New-AzureHDInsightPigJobDefinition + * New-AzureHDInsightSqoopJobDefinition + * New-AzureHDInsightStreamingMapReduceJobDefinition + * Remove-AzureHDInsightCluster + * Revoke-AzureHDInsightHttpServicesAccess + * Set-AzureHDInsightDefaultStorage + * Start-AzureHDInsightJob + * Stop-AzureHDInsightJob + * Use-AzureHDInsightCluster + * Wait-AzureHDInsightJob + * Grant-AzureHDInsightHttpServicesAccess + * Invoke-AzureHDInsightHiveJob +* Configure Web Site WebSocket and managed pipe mode + * Set-AzureWebsite -WebSocketEnabled -ManagedPipelineMode +* Configure Web Site remote debugging + * Enable-AzureWebsiteDebug -Version + * Disable-AzureWebsiteDebug +* Options for cleaning up VHD when deleting VMs + * Remove-AzureVM -DeleteVHD + * Remove-AzureService -DeleteAll + * Remove-AzureDeployment -DeleteVHD +* Virtual IP reservation preview feature (in AzurePreview module) + * Get-AzureDeployment + * Get-AzureReservedIP + * New-AzureReservedIP + * New-AzureVM + * Remove-AzureReservedIP +* Support these cmdlets for Visual Studio Cloud Service projects: + * Start-AzureEmulator + * Publish-AzureServiceProject + * Save-AzureServiceProjectPackage + + +2013.11.07 Version 0.7.1 +* Regression fixes + * Get-AzureWinRMUri cannot return the correct port number (https://github.com/WindowsAzure/azure-sdk-tools/issues/2056) + * New-AzureVM fails when creating a VM with a domain join provisioning (https://github.com/WindowsAzure/azure-sdk-tools/issues/2055) + * ACL for endpoints broken (https://github.com/WindowsAzure/azure-sdk-tools/issues/2054) + * Restarting web site will clean the host names (https://github.com/WindowsAzure/azure-sdk-tools/issues/2101) + * Creating a new Linux VM with an SSH certificate fails (https://github.com/WindowsAzure/azure-sdk-tools/issues/2057) + * Debug stream only prints out at the end of processing (https://github.com/WindowsAzure/azure-sdk-tools/issues/2033) +* Cmdlets for creating Storage SAS token + * New-AzureStorageBlobSASToken + * New-AzureStorageContainerSASToken + * New-AzureStorageQueueSASToken + * New-AzureStorageTableSASToken +* VM cmdlets for Windows Azure Pack + * Get-WAPackVM + * Get-WAPackVMOSDisk + * Get-WAPackVMSizeProfile + * Get-WAPackVMTemplate + * New-WAPackVM + * Remove-WAPackVM + * Restart-WAPackVM + * Resume-WAPackVM + * Set-WAPackVM + * Start-WAPackVM + * Stop-WAPackVM + * Suspend-WAPackVM + +2013.10.21 Version 0.7.0 +* Windows Azure Active Directory authentication support! + * Now you can use your Microsoft account or Organizational account to login from PowerShell without the need of any management certificate or publish settings file! + * Use Add-AzureAccount to get started + * Checkout Add-AzureAccount, Get-AzureAcccount and Remove-AzureAccount for details +* Changed the file format which is used to store the subscription information. Information in the original file will be added to the new file automatically. If you downgrade from 0.7.0 to a lower version, you can still see the subscriptions you imported before the 0.7.0 upgrade. But anything added after the 0.7.0 upgrade won't show up in the downgrade. +* BREAKING CHANGE + * Changed the assembly name and namespace from Microsoft.WindowsAzure.Management.* to Microsoft.WindowsAzure.Commands.* + * Select-AzureSubscription + * Now you can use it to select or clear either the current subscription or the default subscription + * Replaced the -Clear parameter with -NoCurrent parameter + * Set-AzureSubscription + * Removed -DefaultSubscription and -NoDefaultSubscription parameters. Go to Select-AzureSubscription with -Default and -NoDefault parameters. + * New-AzureSqlDatabaseServerContext + * Replaced the -SubscriptionData parameter with -SubscriptionName parameter +* Upgraded Windows Azure SDK dependency from 1.8 to 2.2 +* Added support for a new virtual machine high memory SKU (A5) + +2013.08.22 Version 0.6.19 +* Media Services cmdlets + * Get-AzureMediaServicesAccount + * New-AzureMediaServicesAccount + * Remove-AzureMediaServicesAccount + * New-AzureMediaServicesKey +* SQL Database Import/Export cmdlets + * Start-AzureSqlDatabaseImport + * Start-AzureSqlDatabaseExport + * Get-AzureSqlDatabaseImportExportStatus +* Platform VM Image cmdlets (need to import the PIR module manually) + * Get-AzurePlatformVMImage + * Set-AzurePlatformVMImage + * Remove-AzurePlatformVMImage + +2013.07.31 Version 0.6.18 +* Service Bus authorization rule cmdlets + * New-AzureSBAuthorizationRule + * Get-AzureSBAuthorizationRule + * Set-AzureSBAuthorizationRule + * Remove-AzureSBAuthorizationRule +* Some Windows Azure Pack fixes. + +2013.07.18 Version 0.6.17 +* Upgraded Windows Azure SDK dependency from 1.8 to 2.0. +* SQL Azure database CRUD cmdlets don't require SQL auth anymore if the user owns the belonging subscription. +* Get-AzureSqlDatabaseServerQuota cmdlet to get the quota information for a specified Windows Azure SQL Database Server. +* SQL Azure service objective support + * Get-AzureSqlDatabaseServiceObjective cmdlet to a service objective for the specified Windows Azure SQL Database Server. + * Added -ServiceObjective parameter to Set-AzureSqlDatabase to set the service objective of the specified Windows Azure SQL database. +* Fixed a Get-AzureWebsite local caching issue. Now Get-AzureWebsite will always return the up-to-date web site information. + +2013.06.24 Version 0.6.16 +* Add-AzureEnvironment to add customized environment like Windows Azure Pack +* Set-AzureEnvironment to set customized environment like Windows Azure Pack +* Remove-AzureEnvironment to remove customized environment like Windows Azure Pack +* Web Site cmdlets now support Windows Azure Pack +* Service Bus cmdlets now support Windows Azure Pack +* Added "WAPack" prefix to all the cmdlets which support Windows Azure Pack. Use "help WAPack" to see all the supported cmdlets +* Added -NoWinRMEndpoint parameter to New-AzureQuickVM and Add-AzureProvisioningConfig +* Added -AllowAllAzureSerivces parameter to New-AzureSqlDatabaseServerFirewallRule +* Many bug fixes around VM, Cloud Services and Web Site diagnostics + +2013.06.03 Version 0.6.15 +* Introduced the environment concept to support different Windows Azure environments + * Get-AzureEnvironment cmdlet to return all the out-of-box Windows Azure environments + * -Environment parameter in the following cmdlets to specify which environment to target + * Get-AzurePublishSettingsFile + * Show-AzurePortal +* Windows Azure Web Site application diagnostics cmdlets + * Enable-AzureWebsiteApplicationDiagnostic + * Disable-AzureWebsiteApplicationDiagnostic +* Stop-AzureVM + * Changed the behavior to deprovision the VM after stopping it + * -StayProvisioned parameter to keep the VM provisioned after stopping it +* Windows Azure Cloud Services remote desktop extension cmdlets + * New-AzureServiceRemoteDesktopExtensionConfig + * Get-AzureServiceRemoteDesktopExtension + * Set-AzureServiceRemoteDesktopExtension + * Remove-AzureServiceRemoteDesktopExtension +* Windows Azure Cloud Services diagnostics extension cmdlets + * New-AzureServiceDiagnosticsExtensionConfig + * Get-AzureServiceDiagnosticsExtension + * Set-AzureServiceDiagnosticsExtension + * Remove-AzureServiceDiagnosticsExtension +* Windows Azure Virtual Machine endpoint enhancements + * Cmdlets to create ACL configuration objects + * New-AzureVMAclConfig + * Get-AzureVMAclConfig + * Set-AzureVMAclConfig + * Remove-AzureVMAclConfig + * -ACL parameter to support ACL in + * Add-AzureEndpoint + * Set-AzureEndpoint + * -DirectServerReturn parameter in + * Add-AzureEndpoint + * Set-AzureEndpoint + * Set-AzureLoadBalancedEndpoint cmdlet to modify load balanced endpoints +* Bug fixes + * Fixed New-AzureSqlDatabaseServerContext model mismatch warning + +2013.05.08 Version 0.6.14 +* Windows Azure Storage Table cmdlets + * Get-AzureStorageTable + * New-AzureStorageTable + * Remove-AzureStorageTable +* Windows Azure Storage Queue cmdlets + * Get-AzureStorageQueue + * New-AzureStorageQueue + * Remove-AzureStorageQueue +* Fix an issue in Publish-AzureServiceProject when swapping between staging and production slot + +2013.04.23 Version 0.6.13.1 +* Hotfix to make Set-AzureStorageAccount behave correctly with the -GeoReplicationEnabled parameter + +2013.04.16 Version 0.6.13 +* Completely fixed issues with first website creation on a new account. Now you can use PowerShell with a new account directly without the need to go to the Azure portal. +* BREAKING CHANGE: New-AzureVM and New-AzureQuickVM now require an –AdminUserName parameter when creating Windows based VMs. +* Added support for virtual machine high memory SKUs (A6 and A7). +* Remote PowerShell is now enabled by default on Windows based VMs using https. To disable: specify the –DisableWinRMHttps parameter on New-AzureQuickVM or Add-AzureProvisioningConfig. To enable using http: specify –EnableWinRMHttp parameter (Note: http is intended for VM to VM communication and a public endpoint is not created by default). +* Added Get-AzureWinRMUri new cmdlet to get the connection string URI for Windows Remote Management. +* Added Set-AzureAvailabilitySet new cmdlet to group similar virtual machines into an availability set after deployment. +* New-AzureVM and New-AzureQuickVM now support a parameter named –X509Certificates. When a certificate is added to this array it is automatically uploaded and deployed to the virtual machine. +* Improved *-AzureEndpoint cmdlets: + * Allows a simple endpoint to be created. + * Allows a load balanced endpoint to be created. + * Allows a load balanced endpoint to be created with a health probe and you can now specify the Probe Interval and Timeout periods. +* Removed subscription check requirement when using Add-AzureVHD with a shared access signature. +* Added Simultaneous Upgrade option to New-AzureDeployment for Cloud Services deployment. This option can save a significant amount of time during deployments to staging. This option can cause downtime and should only be used in non-production deployments. +* Upgraded to the latest service management library. +* Made New-AzureDeployment to use SSL during the deployment. +* Added Get-AzureWebsiteLog -ListPath to get all the available log paths of the website. +* Fixed the issue of removing custom DNS names in Start/Stop/Restart-AzureWebsite. +* Fixed several GB18030 encoding issues. +* Renamed Start/Stop-CopyAzureStorageBlob to Start/Stop-AzureStorageBlobCopy. Kept old names as aliases for backward compatibility. + +2013.03.26 Version 0.6.12.1 + * Hotfix to fix issues with first website creation on a new account. + +2013.03.20 Version 0.6.12 + * Windows Azure Storage entity level cmdlets + * New-AzureStorageContext + * New-AzureStorageContainer + * Get-AzureStorageContainer + * Remove-AzureStorageContainer + * Get-AzureStorageContainerAcl + * Set-AzureStorageContainerAcl + * Get-AzureStorageBlob + * Get-AzureStorageBlobContent + * Set-AzureStorageBlobContent + * Remove-AzureStorageBlob + * Start-CopyAzureStorageBlob + * Stop-CopyAzureStorageBlob + * Get-AzureStorageBlobCopyState + * Windows Azure Web Sites diagnostics log streaming cmdlet + * Get-AzureWebsitLog -Tail + +2013.03.06 Version 0.6.11 + * Windows Azure Store cmdlets + * Upgraded to the latest service management library and update service management version header to 2012-12-01 + * Added Save-AzureVhd cmdlet + * Updated Add-AzureVMImage, Get-AzureVMImage and Set-AzureVMImage cmdlets to support new attributes in service management version header 2012-12-01 + +2013.02.11 Version 0.6.10 + * Upgrade to use PowerShell 3.0 + * Released source code for VM and Cloud Services cmdlets + * Added a few new cmdlets for Cloud Services (Add-AzureWebRole, Add-AzureWorkerRole, NewAzureRoleTemplate, Save-AzureServiceProjectPackage, Set-AzureServiceProjectRole -VMSize), See Web Camps TV (http://channel9.msdn.com/Shows/Web+Camps+TV/Whats-Coming-in-the-Command-Line-Tools-for-Windows-Azure-with-Glenn-Block) for more on these new cmdlets. + * Added Support for SAS in destination Uri for Add-AzureVhd + * Added -Confirm and -WhatIf support for Remove-Azure* cmdlets + * Added configurable startup task for Node.js and generic roles + * Enabled emulator support when running roles with memcache + * Role based cmdlets don't require role name if run in a role folder + * Added scenario test framework and started adding automated scenario tests + * Multiple bug fixes + +2012.12.12 Version 0.6.9 + * Added Service Bus namespace management cmdlets 'help azuresb' + * Added -ServiceBusNamespace parameter to 'Test-AzureName' to verify namespace availability + * Added VHD uploader cmdlet 'Add-AzureVHD' for uploading VM images to blob storage. + * Improved message reporting and piping for couple scaffolding cmdlets + * Fixed PHP customization functionality for modifying php.ini and installing custom extensions + * Verbose option is enabled by default when using Windows Azure PowerShell shortcut + +2012.11.21 Version 0.6.8 + * Multiple bug fixes + * Added dedicated cache role support + * Added GitHub support + +2012.10.08 Version 0.6.5 + * Adding websites cmdlets + +2012.06.06 Version 0.6.0 + * Adding PowerShell management cmdlets + * Adding PHP Cmdlets + * Renaming existing cmdlets to remove duplication + * Node.exe is no longer embedded + +2012.05.11 Version 0.5.4 + * node 0.6.17 + * iisnode 0.1.19 + +2012.02.17 Version 0.5.3 + * Bug fixes + +2012.02.10 Version 0.5.2 + * Bug fixes + +2011.12.23 Version 0.5.1 + * Added Remote Desktop support + * Added SSL support + * node 0.6.6 + * iisnode 0.1.13 + +2011.12.09 Version 0.5.0 + * Initial Release diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 000000000000..6c2043804518 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,208 @@ +MICROSOFT SOFTWARE LICENSE TERMS + +MICROSOFT AZURE POWERSHELL + +These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. + +BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE. + + +-----------------START OF LICENSE-------------------------- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +-------------------END OF LICENSE------------------------------- + +The software includes the AutoMapper library ("AutoMapper"). The MIT License set out below is provided for informational purposes only. It is not the license that governs any part of the software. + +----------------START OF LICENSE-------------------------------- + +Provided for Informational Purposes Only + +AutoMapper + +The MIT License (MIT) + +Copyright (c) 2010 Jimmy Bogard + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +-------------END OF LICENSE---------------------------------------- + diff --git a/README.md b/README.md new file mode 100644 index 000000000000..8594458346bd --- /dev/null +++ b/README.md @@ -0,0 +1,297 @@ +# Microsoft Azure PowerShell + +This repository contains a set of PowerShell cmdlets for developers and administrators to develop, deploy and manage Microsoft Azure applications. + +* For documentation on how to build and deploy applications to Microsoft Azure please see the [Microsoft Azure Documentation Center](http://azure.microsoft.com/en-us/documentation/). +* For comprehensive documentation on the developer cmdlets see [How to install and configure Azure PowerShell](http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/). +* For comprehensive documentation on the full set of Microsoft Azure cmdlets see [Microsoft Azure Management Center](http://go.microsoft.com/fwlink/?linkID=254459&clcid=0x409). + +## Features + +* Account + * Get and import Azure publish settings + * Login with Microsoft account or Organizational account through Microsoft Azure Active Directory +* Environment + * Get the different out-of-box Microsoft Azure environments + * Add/Set/Remove customized environments (like your Windows Azure Pack environments) + * Get Azure publish settings for a particular environment +* Subscription + * Manage Azure subscription + * Manage AffinityGroup +* Website + * Manage website, such as CRUD, start and stop. + * Manage slot + * Manage WebJob + * Deploy project via WebDeploy + * Diagnostics + * Configure site and application diagnostics + * Log streaming + * Save log +* Cloud Services + * Create scaffolding for cloud service and role. Role support includes Node.js, PHP, Django and Cache. + * Manage cloud service and role, such as CRUD, start and stop. + * Manage extension + * Start/Stop Azure emulator. + * Manage certificate. + * Manage cloud service extensions + * Remote desktop + * Diagnostics + * Microsoft Antimalware + * Windows Azure Diagnostics +* Storage + * Manage storage account and access key. + * Manage storage container and blob, with paging. + * Copy storage blob. + * Manage storage table. + * Manage storage queue. + * Create SAS token. + * Manage metrics and logging. + * Configure timeout +* SQL Database + * CRUD support for database server, database and firewall rule. + * Get database server quota. + * Get/Set database server service objective. + * Manage database copies and active geo-replication. + * Get dropped databases that can be restored. + * Issue requests to restore a live or dropped database to a point in time. + * Issue requests to recover a database from an unavailable database server. + * Manage database and database server auditing policy. +* Service Bus + * Manage service bus namespaces. +* VM + * Manage VM, such as CRUD, import/export and start/stop/restart. + * Manage VM image and VM image disks. + * Manage disk, such as CRUD. + * Manage VM endpoint, such as CRUD and ACL. + * Get/Set VM sub net. + * Manage certificate and SSH key. + * PowerShell remoting + * Manage extension + * BG Info + * Puppet + * Custom Script + * Access + * Microsoft Antimalware + * PowerShell DSC + * Windows Azure Diagnostics + * Public IP, reserved IP and internal load balancer +* Deployment + * Manage deployment, such as CRUD, move, upgrade and restore. + * Get/Create DNS settings of a deployment. +* VNet + * Manage virtual network config, connection and gateway. + * Manage static IP +* Azure Media Services + * Create, read and delete Media Services Accounts + * Generate new account keys for Media Services Accounts +* HDInsight + * Manage clusters, such as CRUD, add/set storage + * Manage jobs, such as CRUD, start/stop/wait/invoke + * Manage HTTP service access. such as grant/revoke +* Store + * View available Microsoft Azure Store Add-On plans. + * Purchase, view, upgrade and remove Microsoft Azure Store Add-On instances. +* Utility + * Test whether a name is available. Currently support cloud service name, storage account name and service bus namespace name. + * Get the list of geo locations supported by Azure. + * Get the list of OS supported by Azure. + * Direct you to Azure portal. +* Windows Azure Pack + * Web Site: CRUD web site, deployment, configure and get log, start/stop/restart/show web site + * Service Bus: CRD namespace + * VM: CRUD VM, get OS disk, size profile and VM template, start/stop/restart/suspend/resume VM + * VNET: CRUD VNET and subnet. + * Cloud Service: CRUD cloud service. +* ExpressRoute + * Manage dedicated circuit + * Manage BGP peering +* Scheduler + * Manage job collections + * Manage HTTP and storage queue jobs +* Resource Manager + * Manage resource groups and deployments + * Query and download gallery templates + * Manage individual resources +* Traffic Manager + * Manage profiles and endpoints +* Azure Automation + * Manage automation accounts + * Manage automation jobs, runbooks and schedules + +For detail descriptions and examples of the cmdlets, type +* ```help azure``` to get all the cmdlets. +* ```help node-dev``` to get all Node.js development related cmdlets. +* ```help php-dev``` to get all PHP development related cmdlets. +* ```help python-dev``` to get all Python development related cmdlets. +* ```help ``` to get the details of a specific cmdlet. + +## Supported Environments + +* [Microsoft Azure](http://www.azure.microsoft.com) +* [Windows Azure Pack](http://www.microsoft.com/en-us/server-cloud/windows-azure-pack.aspx) +* [Microsoft Azure China](http://www.windowsazure.cn/) + +## Installation + +### Microsoft Web Platform Installer + +1. Install [Microsoft Web Platform Installer](http://www.microsoft.com/web/downloads/platform.aspx). +2. Open Microsoft Web Platform Installer and search for __Microsoft Azure PowerShell__. +3. Install. + +You can also find the standalone installers for all the versions at [Downloads](https://github.com/Azure/azure-sdk-tools/releases) + +### Source Code + +1. Download the source code from GitHub repo +2. Follow the [Microsoft Azure PowerShell Developer Guide](https://github.com/Azure/azure-sdk-tools/wiki/Windows-Azure-PowerShell-Developer-Guide) + +### Supported PowerShell Versions + +* 0.6.9 or lower + * [Windows PowerShell 2.0](http://technet.microsoft.com/en-us/scriptcenter/dd742419) + * [Windows PowerShell 3.0](http://www.microsoft.com/en-us/download/details.aspx?id=34595) +* 0.6.10 to higher + * [Windows PowerShell 3.0](http://www.microsoft.com/en-us/download/details.aspx?id=34595) + +## Get Started + +In general, following are the steps to start using Microsoft Azure PowerShell + +* Get yourself authenticated with Microsoft Azure. For details, please check out [this article](http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/). + * Option 1: Login with your Microsoft account or Organizational account directly from PowerShell. Microsoft Azure Active Directory authentication is used in this case. No management certificate is needed. + * Starting from 0.8.6, you can use ``Add-AzureAccount -Credential`` to avoid the browser pop up for Organizational account. + * Option 2: Download and import a publish settings file which contains a management certificate. +* Use the cmdlets + +The first step can be different for different environment you are targeting. Following are detail instructions for each supported environment. + +### Microsoft Azure + +If you use both mechanisms on the same subscription, Microsoft Azure Active Directory authentication always wins. If you want to go back to management certificate authentication, please use ``Remove-AzureAccount``, which will remove the Microsoft Azure Active Directory information and bring management certificate authentication back in. + +#### Login directly from PowerShell (Microsoft Azure Active Directory authentication) + +```powershell +# Pop up an embedded browser control for you to login +Add-AzureAccount + +# use the cmdlets to manage your services/applications +New-AzureWebsite -Name mywebsite -Location "West US" +``` + +#### Use publish settings file (Management certificate authentication) + +```powershell +# Download a file which contains the publish settings information of your subscription. +# This will open a browser window and ask you to log in to get the file. +Get-AzurePublishSettingsFile + +# Import the file you just downloaded. +# Notice that the file contains credential of your subscription so you don't want to make it public +# (like check in to source control, etc.). +Import-AzurePublishSettingsFile "" + +# Use the cmdlets to manage your services/applications +New-AzureWebsite -Name mywebsite -Location "West US" +``` + +### Microsoft Azure China + +```powershell +# Check the environment supported by your Microsoft Azure PowerShell installation. +Get-AzureEnvironment + +# Download a file which contains the publish settings information of your subscription. +# Use the -Environment parameter to target Microsoft Azure China. +# This will open a browser window and ask you to log in to get the file. +Get-AzurePublishSettingsFile -Environment "AzureChinaCloud" + +# Import the file you just downloaded. +# Notice that the file contains credential of your subscription so you don't want to make it public +# (like check in to source control, etc.). +Import-AzurePublishSettingsFile "" + +# Use the cmdlets to manage your services/applications +New-AzureWebsite -Name mywebsite -Location "China East" +``` + +### Windows Azure Pack + +```powershell +# Add your Windows Azure Pack environment to your Microsoft Azure PowerShell installation. +# You will need to know the following information of your Windows Azure Pack environment. +# 1. URL to download the publish settings file Mandatory +# 2. Management service endpoint Optional +# 3. Management Portal URL Optional +# 4. Storage service endpoint Optional +Add-WAPackEnvironment -Name "MyWAPackEnv" ` + -PublishSettingsFileUrl "URL to download the publish settings file>" ` + -ServiceEndpoint "" ` + -ManagementPortalUrl "" ` + -StorageEndpoint "" + +# Download a file which contains the publish settings information of your subscription. +# Use the -Environment parameter to target your Windows Azure Pack environment. +# This will open a browser window and ask you to log in to get the file. +Get-WAPackPublishSettingsFile -Environment "MyWAPackEnv" + +# Import the file you just downloaded. +# Notice that the file contains credential of your subscription so you don't want to make it public +# (like check in to source control, etc.). +Import-WAPackPublishSettingsFile "" + +# Use the cmdlets to manage your services/applications +New-WAPackWebsite -Name mywebsite +``` +## 2 Modes + +Starting from 0.8.0, we are adding a separate mode for Resource Manager. You can use the following cmdlet to switch between the + +* Service management: cmdlets using the Azure service management API +* Resource manager: cmdlets using the Azure Resource Manager API + +They are not designed to work together. + +```powershell +Switch-AzureMode AzureServiceManagement +Switch-AzureMode AzureResourceManager +``` + +## Find Your Way + +All the cmdlets can be put into 3 categories: + +1. Cmdlets support both Microsoft Azure and Windows Azure Pack +2. Cmdlets only support both Microsoft Azure +3. Cmdlets only support Windows Azure Pack + +* For category 1, we are using an "Azure" prefix in the cmdlet name and adding an alias with "WAPack" prefix. +* For category 2, we are using an "Azure" prefix in the cmdlet name. +* For category 2, we are using an "WAPack" prefix in the cmdlet name. + +So you can use the following cmdlet to find out all the cmdlets for your environment + +```powershell +# Return all the cmdlets for Microsoft Azure +Get-Command *Azure* + +# Return all the cmdlets for Windows Azure Pack +Get-Command *WAPack* +``` + +If you want to migrate some scripts from Microsoft Azure to Windows Azure Pack or vice versa, as long as the cmdlets you are using are in category 1, you should be able to migrate smoothly. + +## Need Help? + +Be sure to check out the [Microsoft Azure Developer Forums on Stack Overflow](http://go.microsoft.com/fwlink/?LinkId=234489) if you have trouble with the provided code. + +## Contribute Code or Provide Feedback + +If you would like to become an active contributor to this project please follow the instructions provided in [Microsoft Azure Projects Contribution Guidelines](http://windowsazure.github.com/guidelines.html). + +If you encounter any bugs with the library please file an issue in the [Issues](https://github.com/Azure/azure-sdk-tools/issues) section of the project. + +# Learn More + +* [Microsoft Azure Script Center](http://www.azure.microsoft.com/en-us/documentation/scripts/) diff --git a/build.proj b/build.proj new file mode 100644 index 000000000000..b5bca7189965 --- /dev/null +++ b/build.proj @@ -0,0 +1,215 @@ + + + + + + .\src\ServiceManagement\Services\Commands\bin + .\src\ServiceManagement\Services\Commands.Test\bin + Microsoft.WindowsAzure.Commands.Test.dll + .\setup\build + .\src\Publish + .\src\Package + $(PublishDirectory)\Build + $(PublishDirectory)\Setup + $(PublishDirectory)\TestResults + Configuration=Debug;Platform=Any CPU + Configuration=Release;Platform=Any CPU + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $(MSBuildProjectDirectory)\src\.nuget\NuGet.exe + $(MSBuildProjectDirectory)\restore.config + -ConfigFile "$(NuGetRestoreConfigFile)" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + RunType=LiveOnly + + + + + + + + + + + + + + + + + + + + + diff --git a/packages.config b/packages.config new file mode 100644 index 000000000000..b5d4b5dd7173 --- /dev/null +++ b/packages.config @@ -0,0 +1,5 @@ + + + + + diff --git a/setup/Setup/CustomAction.config b/setup/Setup/CustomAction.config new file mode 100644 index 000000000000..de951b78d854 --- /dev/null +++ b/setup/Setup/CustomAction.config @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + diff --git a/setup/Setup/CustomAction.cs b/setup/Setup/CustomAction.cs new file mode 100644 index 000000000000..4fb665f4daf5 --- /dev/null +++ b/setup/Setup/CustomAction.cs @@ -0,0 +1,109 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Setup +{ + using System; + using System.IO; + using Deployment.WindowsInstaller; + using System.Threading; + + public class CustomAction + { + // The exception object which will store (if) exception which is occured in our sta thread + private static Exception _STAThreadException; + + private static uint[] powerShellDefaultColorTable = new uint[] + { + 0x0, 0x800000, 0x8000, 0x808000, 0x80, 0x562401, 0xF0EDEE, 0xC0C0C0, + 0x808080, 0xFF0000, 0xFF00, 0xFFFF00, 0xFF, 0xFF00FF, 0xFFFF, 0xFFFFFF + }; + + // Method which contains our custom action behaviour + private static void RunSTAThread(object sessionObject) + { + try + { + Session session = sessionObject as Session; + + string powerShellShortcutPath = session.CustomActionData["ShortcutPath"]; + string powerShellDefaultShortcutPath = session.CustomActionData["DefaultShortcutPath"]; + + if (!File.Exists(powerShellShortcutPath)) + { + _STAThreadException = new Exception(string.Format("UpdatePSShortcut: file {0} does not exist", powerShellShortcutPath)); + return; + } + + ShellLink powerShellShellLink = new ShellLink(powerShellShortcutPath); + if (File.Exists(powerShellDefaultShortcutPath)) + { + session.Log("UpdatePSShortcut: found default Windows PowerShell shortcut at {0}", powerShellDefaultShortcutPath); + ShellLink powerShellDefaultShellLink = new ShellLink(powerShellDefaultShortcutPath); + powerShellShellLink.ConsoleProperties = powerShellDefaultShellLink.ConsoleProperties; + } + else + { + session.Log("UpdatePSShortcut: default Windows PowerShell shortcut does not exist at {0}", powerShellDefaultShortcutPath); + + for (int i = 0; i < powerShellShellLink.ConsoleProperties.ColorTable.Length; i++) + { + powerShellShellLink.ConsoleProperties.ColorTable[i] = powerShellDefaultColorTable[i]; + } + powerShellShellLink.AutoPosition = true; + powerShellShellLink.CommandHistoryBufferSize = 50; + powerShellShellLink.CommandHistoryBufferCount = 4; + + powerShellShellLink.InsertMode = true; + + powerShellShellLink.PopUpBackgroundColor = 15; + powerShellShellLink.PopUpTextColor = 3; + + powerShellShellLink.QuickEditMode = true; + + powerShellShellLink.ScreenBackgroundColor = 5; + powerShellShellLink.ScreenTextColor = 6; + + powerShellShellLink.SetScreenBufferSize(120, 3000); + powerShellShellLink.SetWindowSize(120, 50); + } + powerShellShellLink.Save(); + session.Log("UpdatePSShortcut: success"); + } + catch (Exception ex) + { + _STAThreadException = new Exception(string.Format("UpdatePSShortcut: failed with exception {0}", ex.Message)); + } + } + + [CustomAction] + public static ActionResult UpdatePSShortcut(Session session) + { + Thread staThread = new Thread(RunSTAThread); + staThread.SetApartmentState(ApartmentState.STA); + staThread.Start(session); + // Wait for the new thread to finish its operations + staThread.Join(); + + // If there is any exception in the new thread pass it to the installer + if (_STAThreadException != null) + { + session.Log(_STAThreadException.Message); + return ActionResult.Failure; + } + + return ActionResult.Success; + } + } +} \ No newline at end of file diff --git a/setup/Setup/Properties/AssemblyInfo.cs b/setup/Setup/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..6d3ae6c5b4e0 --- /dev/null +++ b/setup/Setup/Properties/AssemblyInfo.cs @@ -0,0 +1,48 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Setup")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Setup")] +[assembly: AssemblyCopyright("Copyright © Microsoft")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("f4aa30f2-d2ce-4aef-88ed-a048b771c272")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/setup/Setup/Setup.csproj b/setup/Setup/Setup.csproj new file mode 100644 index 000000000000..6a7a64f7c639 --- /dev/null +++ b/setup/Setup/Setup.csproj @@ -0,0 +1,50 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {EA5BD11B-10B3-433D-A250-92AE76669D8D} + Library + Properties + Microsoft.WindowsAzure.Setup + Microsoft.WindowsAzure.Setup + v4.5 + 512 + $(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.CA.targets + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + diff --git a/setup/Setup/ShellLink.cs b/setup/Setup/ShellLink.cs new file mode 100644 index 000000000000..8668707bcc4a --- /dev/null +++ b/setup/Setup/ShellLink.cs @@ -0,0 +1,447 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Setup +{ + using System; + using System.Diagnostics.CodeAnalysis; + using System.IO; + using System.Runtime.InteropServices; + using System.Text; + + // IShellLink.ShowCmd fFlags + [Flags] + public enum ShowCmd + { + SW_SHOWNORMAL = 1, + SW_SHOWMAXIMIZED = 3, + SW_SHOWMINNOACTIVE = 7 + } + + // IShellLink.Resolve fFlags + [Flags] + public enum SLR_FLAGS + { + SLR_NO_UI = 0x1, + SLR_ANY_MATCH = 0x2, + SLR_UPDATE = 0x4, + SLR_NOUPDATE = 0x8, + SLR_NOSEARCH = 0x10, + SLR_NOTRACK = 0x20, + SLR_NOLINKINFO = 0x40, + SLR_INVOKE_MSI = 0x80 + } + + // IShellLink.GetPath fFlags + [Flags] + public enum SLGP_FLAGS + { + SLGP_SHORTPATH = 0x1, + SLGP_UNCPRIORITY = 0x2, + SLGP_RAWPATH = 0x4 + } + + [SuppressMessage("StyleCop.CSharp.NamingRules", "SA1305:FieldNamesMustNotUseHungarianNotation", Justification = "Matching COM Names")] + [ComImport, + InterfaceType(ComInterfaceType.InterfaceIsIUnknown), + Guid("000214F9-0000-0000-C000-000000000046")] + public interface IShellLinkW + { + void GetPath( + [Out(), MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszFile, + int cchMaxPath, + out WIN32_FIND_DATAW pfd, + SLGP_FLAGS fFlags); + + void GetIDList( + out IntPtr ppidl); + + void SetIDList( + IntPtr pidl); + + void GetDescription( + [Out(), MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszName, + int cchMaxName); + + void SetDescription( + [MarshalAs(UnmanagedType.LPWStr)] string pszName); + + void GetWorkingDirectory( + [Out(), MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszDir, + int cchMaxPath); + + void SetWorkingDirectory( + [MarshalAs(UnmanagedType.LPWStr)] string pszDir); + + void GetArguments( + [Out(), MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszArgs, + int cchMaxPath); + + void SetArguments( + [MarshalAs(UnmanagedType.LPWStr)] string pszArgs); + + void GetHotkey( + out short pwHotkey); + + void SetHotkey( + short wHotkey); + + void GetShowCmd( + out int piShowCmd); + + void SetShowCmd( + int iShowCmd); + + void GetIconLocation( + [Out(), MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszIconPath, + int cchIconPath, + out int piIcon); + + void SetIconLocation( + [MarshalAs(UnmanagedType.LPWStr)] string pszIconPath, + int iIcon); + + void SetRelativePath( + [MarshalAs(UnmanagedType.LPWStr)] string pszPathRel, + int dwReserved); + + void Resolve( + IntPtr hwnd, + SLR_FLAGS fFlags); + + void SetPath( + [MarshalAs(UnmanagedType.LPWStr)] string pszFile); + } + + [SuppressMessage("StyleCop.CSharp.NamingRules", "SA1305:FieldNamesMustNotUseHungarianNotation", Justification = "Matching COM Names")] + [ComImport, + InterfaceType(ComInterfaceType.InterfaceIsIUnknown), + Guid("45E2b4AE-B1C3-11D0-B92F-00A0C90312E1")] + public interface IShellLinkDataList + { + void AddDataBlock( + IntPtr pDataBlock); + + void CopyDataBlock( + uint dwSig, + out IntPtr ppDataBlock); + + void RemoveDataBlock( + uint dwSig); + + void GetFlags( + out int dwFlags); + + void SetFlags( + uint dwFlags); + } + + [SuppressMessage("StyleCop.CSharp.NamingRules", "SA1305:FieldNamesMustNotUseHungarianNotation", Justification = "Matching COM Names")] + [ComImport, + InterfaceType(ComInterfaceType.InterfaceIsIUnknown), + Guid("0000010B-0000-0000-C000-000000000046")] + public interface IPersistFile + { + #region Methods inherited from IPersist + + void GetClassID( + out Guid pClassID); + + #endregion + + [PreserveSig] + int IsDirty(); + + void Load( + [MarshalAs(UnmanagedType.LPWStr)] string pszFileName, + int dwMode); + + void Save( + [MarshalAs(UnmanagedType.LPWStr)] string pszFileName, + [MarshalAs(UnmanagedType.Bool)] bool fRemember); + + void SaveCompleted( + [MarshalAs(UnmanagedType.LPWStr)] string pszFileName); + + void GetCurFile( + out IntPtr ppszFileName); + } + + // Win32 COORD + [StructLayout(LayoutKind.Sequential)] + public struct COORD + { + public short X; + public short Y; + } + + // IShellDataLink NT_CONSOLE_PROPS + [SuppressMessage("StyleCop.CSharp.NamingRules", "SA1305:FieldNamesMustNotUseHungarianNotation", Justification = "Matching Windows Struct Names")] + [SuppressMessage("StyleCop.CSharp.NamingRules", "SA1307:AccessibleFieldsMustBeginWithUpperCaseLetter", Justification = "Matching Windows Struct Names")] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] + public struct NT_CONSOLE_PROPS + { + public int cbSize; // Size of this extra data block + public uint dwSignature; // signature of this extra data block + public ushort wFillAttribute; // fill attribute for console + public ushort wPopupFillAttribute; // fill attribute for console popups + public COORD dwScreenBufferSize; // screen buffer size for console + public COORD dwWindowSize; // window size for console + public COORD dwWindowOrigin; // window origin for console + public int nFont; + public int nInputBufferSize; + public COORD dwFontSize; + public uint uFontFamily; + public uint uFontWeight; + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] + public string FaceName; + public uint uCursorSize; + public bool bFullScreen; + public bool bQuickEdit; + public bool bInsertMode; + public bool bAutoPosition; + public uint uHistoryBufferSize; + public uint uNumberOfHistoryBuffers; + public bool bHistoryNoDup; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] + public uint[] ColorTable; + } + + // WIN32_FIND_DATA + [SuppressMessage("StyleCop.CSharp.NamingRules", "SA1305:FieldNamesMustNotUseHungarianNotation", Justification = "Matching Windows Struct Names")] + [SuppressMessage("StyleCop.CSharp.NamingRules", "SA1307:AccessibleFieldsMustBeginWithUpperCaseLetter", Justification = "Matching Windows Struct Names")] + public struct WIN32_FIND_DATAW + { + public int dwFileAttributes; + public System.Runtime.InteropServices.ComTypes.FILETIME ftCreationTime; + public System.Runtime.InteropServices.ComTypes.FILETIME ftLastAccessTime; + public System.Runtime.InteropServices.ComTypes.FILETIME ftLastWriteTime; + public int nFileSizeHigh; + public int nFileSizeLow; + public int dwReserved0; + public int dwReserved1; + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MAXPATH)] + public string cFileName; + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)] + public string cAlternateFileName; + private const int MAXPATH = 260; + } + + public class ShellLink + { + private IShellLinkW shellLink; + private NT_CONSOLE_PROPS consoleProperties; + + public ShellLink(string path) + { + this.shellLink = Activator.CreateInstance(Type.GetTypeFromCLSID(new Guid("00021401-0000-0000-C000-000000000046"))) as IShellLinkW; + if (File.Exists(path)) + { + IntPtr consoleProperties = IntPtr.Zero; + ((IPersistFile)this.shellLink).Load(path, 0); + + try + { + ((IShellLinkDataList)this.shellLink).CopyDataBlock(0xA0000002, out consoleProperties); + this.consoleProperties = (NT_CONSOLE_PROPS)Marshal.PtrToStructure(consoleProperties, typeof(NT_CONSOLE_PROPS)); + } + catch (Exception) + { + } + } + else + { + ((IPersistFile)this.shellLink).Save(path, true); + } + + // Initialize default Console Properties (TODO: Fix this bug too) + if (this.consoleProperties.dwSignature != 0xA0000002) + { + this.consoleProperties = new NT_CONSOLE_PROPS(); + this.consoleProperties.cbSize = Marshal.SizeOf(this.consoleProperties); + this.consoleProperties.dwSignature = 0xA0000002; + this.consoleProperties.ColorTable = new uint[16]; + for (int i = 0; i < 16; i++) + { + this.consoleProperties.ColorTable[i] = 0xffffffff; + } + } + } + + public IShellLinkW IShellLink + { + get { return this.shellLink; } + } + + public string Path + { + get + { + StringBuilder sb = new StringBuilder(260); + WIN32_FIND_DATAW pfd = new WIN32_FIND_DATAW(); + this.IShellLink.GetPath(sb, 260, out pfd, SLGP_FLAGS.SLGP_RAWPATH); + return sb.ToString(); + } + set + { + this.IShellLink.SetPath(value); + } + } + + public string Description + { + get + { + StringBuilder sb = new StringBuilder(2048); + this.IShellLink.GetDescription(sb, 2048); + return sb.ToString(); + } + set { this.IShellLink.SetDescription(value); } + } + + public string WorkingDirectory + { + get + { + StringBuilder sb = new StringBuilder(260); + this.IShellLink.GetWorkingDirectory(sb, 260); + return sb.ToString(); + } + set { this.IShellLink.SetWorkingDirectory(value); } + } + + public ShowCmd ShowCmd + { + get + { + int showCmd; + this.IShellLink.GetShowCmd(out showCmd); + return (ShowCmd)Enum.ToObject(typeof(ShowCmd), showCmd); + } + set + { + this.IShellLink.SetShowCmd((int)value); + } + } + + public NT_CONSOLE_PROPS ConsoleProperties + { + get { return this.consoleProperties; } + set { this.consoleProperties = value; } + } + + public bool QuickEditMode + { + get { return this.consoleProperties.bQuickEdit; } + set { this.consoleProperties.bQuickEdit = value; } + } + + public bool InsertMode + { + get { return this.consoleProperties.bInsertMode; } + set { this.consoleProperties.bInsertMode = value; } + } + + public bool AutoPosition + { + get { return this.consoleProperties.bAutoPosition; } + set { this.consoleProperties.bAutoPosition = value; } + } + + public uint CommandHistoryBufferSize + { + get { return this.consoleProperties.uHistoryBufferSize; } + set { this.consoleProperties.uHistoryBufferSize = value; } + } + + public uint CommandHistoryBufferCount + { + get { return this.consoleProperties.uNumberOfHistoryBuffers; } + set { this.consoleProperties.uNumberOfHistoryBuffers = value; } + } + + public byte ScreenBackgroundColor + { + set + { + this.consoleProperties.wFillAttribute &= 0x000f; + this.consoleProperties.wFillAttribute += (ushort)(value << 4); + } + } + + public byte ScreenTextColor + { + set + { + this.consoleProperties.wFillAttribute &= 0x00f0; + this.consoleProperties.wFillAttribute += value; + } + } + + public byte PopUpBackgroundColor + { + set + { + this.consoleProperties.wPopupFillAttribute &= 0x000f; + this.consoleProperties.wPopupFillAttribute += (ushort)(value << 4); + } + } + + public byte PopUpTextColor + { + set + { + this.consoleProperties.wPopupFillAttribute &= 0x00f0; + this.consoleProperties.wPopupFillAttribute += value; + } + } + + public void Save(string path) + { + this.SetConsoleProperties(); + ((IPersistFile)this.shellLink).Save(path, true); + } + + public void Save() + { + this.SetConsoleProperties(); + ((IPersistFile)this.shellLink).Save(null, true); + } + + public void SetScreenBufferSize(short x, short y) + { + COORD c = new COORD(); + c.X = x; + c.Y = y; + this.consoleProperties.dwScreenBufferSize = c; + } + + public void SetWindowSize(short x, short y) + { + COORD c = new COORD(); + c.X = x; + c.Y = y; + this.consoleProperties.dwWindowSize = c; + } + + // This does more than console colors + private void SetConsoleProperties() + { + IntPtr consoleProperties = Marshal.AllocCoTaskMem(this.consoleProperties.cbSize); + Marshal.StructureToPtr(this.consoleProperties, consoleProperties, true); + ((IShellLinkDataList)this.shellLink).RemoveDataBlock(0xA0000002); + ((IShellLinkDataList)this.shellLink).AddDataBlock(consoleProperties); + } + } +} \ No newline at end of file diff --git a/setup/azurecmd.wxs b/setup/azurecmd.wxs new file mode 100644 index 000000000000..fd9a98bbd475 --- /dev/null +++ b/setup/azurecmd.wxs @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + < "3.0")]]> + + + + + + Installed OR NETFRAMEWORK40FULL OR NETFRAMEWORK40CLIENT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NOT Installed + NOT Installed + + + + + + + + + + diff --git a/setup/azurecmdfiles.wxi b/setup/azurecmdfiles.wxi new file mode 100644 index 000000000000..a32a2abc0bf9 --- /dev/null +++ b/setup/azurecmdfiles.wxi @@ -0,0 +1,2615 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/setup/azurepowershell.sln b/setup/azurepowershell.sln new file mode 100644 index 000000000000..a5d4bc722dc8 --- /dev/null +++ b/setup/azurepowershell.sln @@ -0,0 +1,30 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.30110.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "azurepowershell", "azurepowershell.wixproj", "{36D6E303-E057-4963-A093-C7AAE0FD92B3}" + ProjectSection(ProjectDependencies) = postProject + {EA5BD11B-10B3-433D-A250-92AE76669D8D} = {EA5BD11B-10B3-433D-A250-92AE76669D8D} + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Setup", "Setup\Setup.csproj", "{EA5BD11B-10B3-433D-A250-92AE76669D8D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {36D6E303-E057-4963-A093-C7AAE0FD92B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {36D6E303-E057-4963-A093-C7AAE0FD92B3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {36D6E303-E057-4963-A093-C7AAE0FD92B3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {36D6E303-E057-4963-A093-C7AAE0FD92B3}.Release|Any CPU.Build.0 = Release|Any CPU + {EA5BD11B-10B3-433D-A250-92AE76669D8D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EA5BD11B-10B3-433D-A250-92AE76669D8D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EA5BD11B-10B3-433D-A250-92AE76669D8D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EA5BD11B-10B3-433D-A250-92AE76669D8D}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/setup/azurepowershell.wixproj b/setup/azurepowershell.wixproj new file mode 100644 index 000000000000..3aa6465bf54a --- /dev/null +++ b/setup/azurepowershell.wixproj @@ -0,0 +1,64 @@ + + + + Debug + AnyCPU + 3.5 + {36d6e303-e057-4963-a093-c7aae0fd92b3} + 2.0 + AzurePowerShell + Package + $(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets + $(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets + AzurePowershell + + + build\$(Configuration)\ + obj\$(Configuration)\ + Debug + ICE30;ICE91;ICE64;ICE61;ICE69 + + + build\$(Configuration)\ + obj\$(Configuration)\ + ICE30;ICE91;ICE64;ICE61;ICE69 + + + + $(WixExtDir)\WixNetFxExtension.dll + WixNetFxExtension + + + $(WixExtDir)\WixUtilExtension.dll + WixUtilExtension + + + $(WixExtDir)\WixUIExtension.dll + WixUIExtension + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/setup/bin/iisnode.dll b/setup/bin/iisnode.dll new file mode 100644 index 000000000000..136b447b9b67 Binary files /dev/null and b/setup/bin/iisnode.dll differ diff --git a/setup/bin/iisnode_schema.xml b/setup/bin/iisnode_schema.xml new file mode 100644 index 000000000000..56ad644194ba --- /dev/null +++ b/setup/bin/iisnode_schema.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/setup/media/GettingStarted.url b/setup/media/GettingStarted.url new file mode 100644 index 000000000000..cbd76c97d341 --- /dev/null +++ b/setup/media/GettingStarted.url @@ -0,0 +1,5 @@ +[{000214A0-0000-0000-C000-000000000046}] +Prop3=19,2 +[InternetShortcut] +URL=http://go.microsoft.com/?linkid=9791397 +IDList= diff --git a/setup/media/License.rtf b/setup/media/License.rtf new file mode 100644 index 000000000000..fe4ca72a0de0 --- /dev/null +++ b/setup/media/License.rtf @@ -0,0 +1,213 @@ +{\rtf1\ansi\ansicpg936\deff0\nouicompat\deflang1033\deflangfe2052{\fonttbl{\f0\fnil\fcharset0 Courier New;}} +{\colortbl ;\red0\green0\blue255;} +{\*\generator Riched20 6.3.9600}\viewkind4\uc1 +\pard\sl240\slmult1\f0\fs20\lang9 MICROSOFT SOFTWARE LICENSE TERMS\par +\par +MICROSOFT AZURE POWERSHELL \par +\par +These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any.\par +\par +BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE.\par +\par +\par +-----------------START OF LICENSE--------------------------\par +\par + Apache License\par + Version 2.0, January 2004\par + {{\field{\*\fldinst{HYPERLINK http://www.apache.org/licenses/ }}{\fldrslt{http://www.apache.org/licenses/\ul0\cf0}}}}\f0\fs20\par +\par + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\par +\par + 1. Definitions.\par +\par + "License" shall mean the terms and conditions for use, reproduction,\par + and distribution as defined by Sections 1 through 9 of this document.\par +\par + "Licensor" shall mean the copyright owner or entity authorized by\par + the copyright owner that is granting the License.\par +\par + "Legal Entity" shall mean the union of the acting entity and all\par + other entities that control, are controlled by, or are under common\par + control with that entity. For the purposes of this definition,\par + "control" means (i) the power, direct or indirect, to cause the\par + direction or management of such entity, whether by contract or\par + otherwise, or (ii) ownership of fifty percent (50%) or more of the\par + outstanding shares, or (iii) beneficial ownership of such entity.\par +\par + "You" (or "Your") shall mean an individual or Legal Entity\par + exercising permissions granted by this License.\par +\par + "Source" form shall mean the preferred form for making modifications,\par + including but not limited to software source code, documentation\par + source, and configuration files.\par +\par + "Object" form shall mean any form resulting from mechanical\par + transformation or translation of a Source form, including but\par + not limited to compiled object code, generated documentation,\par + and conversions to other media types.\par +\par + "Work" shall mean the work of authorship, whether in Source or\par + Object form, made available under the License, as indicated by a\par + copyright notice that is included in or attached to the work\par + (an example is provided in the Appendix below).\par +\par + "Derivative Works" shall mean any work, whether in Source or Object\par + form, that is based on (or derived from) the Work and for which the\par + editorial revisions, annotations, elaborations, or other modifications\par + represent, as a whole, an original work of authorship. For the purposes\par + of this License, Derivative Works shall not include works that remain\par + separable from, or merely link (or bind by name) to the interfaces of,\par + the Work and Derivative Works thereof.\par +\par + "Contribution" shall mean any work of authorship, including\par + the original version of the Work and any modifications or additions\par + to that Work or Derivative Works thereof, that is intentionally\par + submitted to Licensor for inclusion in the Work by the copyright owner\par + or by an individual or Legal Entity authorized to submit on behalf of\par + the copyright owner. For the purposes of this definition, "submitted"\par + means any form of electronic, verbal, or written communication sent\par + to the Licensor or its representatives, including but not limited to\par + communication on electronic mailing lists, source code control systems,\par + and issue tracking systems that are managed by, or on behalf of, the\par + Licensor for the purpose of discussing and improving the Work, but\par + excluding communication that is conspicuously marked or otherwise\par + designated in writing by the copyright owner as "Not a Contribution."\par +\par + "Contributor" shall mean Licensor and any individual or Legal Entity\par + on behalf of whom a Contribution has been received by Licensor and\par + subsequently incorporated within the Work.\par +\par + 2. Grant of Copyright License. Subject to the terms and conditions of\par + this License, each Contributor hereby grants to You a perpetual,\par + worldwide, non-exclusive, no-charge, royalty-free, irrevocable\par + copyright license to reproduce, prepare Derivative Works of,\par + publicly display, publicly perform, sublicense, and distribute the\par + Work and such Derivative Works in Source or Object form.\par +\par + 3. Grant of Patent License. Subject to the terms and conditions of\par + this License, each Contributor hereby grants to You a perpetual,\par + worldwide, non-exclusive, no-charge, royalty-free, irrevocable\par + (except as stated in this section) patent license to make, have made,\par + use, offer to sell, sell, import, and otherwise transfer the Work,\par + where such license applies only to those patent claims licensable\par + by such Contributor that are necessarily infringed by their\par + Contribution(s) alone or by combination of their Contribution(s)\par + with the Work to which such Contribution(s) was submitted. If You\par + institute patent litigation against any entity (including a\par + cross-claim or counterclaim in a lawsuit) alleging that the Work\par + or a Contribution incorporated within the Work constitutes direct\par + or contributory patent infringement, then any patent licenses\par + granted to You under this License for that Work shall terminate\par + as of the date such litigation is filed.\par +\par + 4. Redistribution. You may reproduce and distribute copies of the\par + Work or Derivative Works thereof in any medium, with or without\par + modifications, and in Source or Object form, provided that You\par + meet the following conditions:\par +\par + (a) You must give any other recipients of the Work or\par + Derivative Works a copy of this License; and\par +\par + (b) You must cause any modified files to carry prominent notices\par + stating that You changed the files; and\par +\par + (c) You must retain, in the Source form of any Derivative Works\par + that You distribute, all copyright, patent, trademark, and\par + attribution notices from the Source form of the Work,\par + excluding those notices that do not pertain to any part of\par + the Derivative Works; and\par +\par + (d) If the Work includes a "NOTICE" text file as part of its\par + distribution, then any Derivative Works that You distribute must\par + include a readable copy of the attribution notices contained\par + within such NOTICE file, excluding those notices that do not\par + pertain to any part of the Derivative Works, in at least one\par + of the following places: within a NOTICE text file distributed\par + as part of the Derivative Works; within the Source form or\par + documentation, if provided along with the Derivative Works; or,\par + within a display generated by the Derivative Works, if and\par + wherever such third-party notices normally appear. The contents\par + of the NOTICE file are for informational purposes only and\par + do not modify the License. You may add Your own attribution\par + notices within Derivative Works that You distribute, alongside\par + or as an addendum to the NOTICE text from the Work, provided\par + that such additional attribution notices cannot be construed\par + as modifying the License.\par +\par + You may add Your own copyright statement to Your modifications and\par + may provide additional or different license terms and conditions\par + for use, reproduction, or distribution of Your modifications, or\par + for any such Derivative Works as a whole, provided Your use,\par + reproduction, and distribution of the Work otherwise complies with\par + the conditions stated in this License.\par +\par + 5. Submission of Contributions. Unless You explicitly state otherwise,\par + any Contribution intentionally submitted for inclusion in the Work\par + by You to the Licensor shall be under the terms and conditions of\par + this License, without any additional terms or conditions.\par + Notwithstanding the above, nothing herein shall supersede or modify\par + the terms of any separate license agreement you may have executed\par + with Licensor regarding such Contributions.\par +\par + 6. Trademarks. This License does not grant permission to use the trade\par + names, trademarks, service marks, or product names of the Licensor,\par + except as required for reasonable and customary use in describing the\par + origin of the Work and reproducing the content of the NOTICE file.\par +\par + 7. Disclaimer of Warranty. Unless required by applicable law or\par + agreed to in writing, Licensor provides the Work (and each\par + Contributor provides its Contributions) on an "AS IS" BASIS,\par + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\par + implied, including, without limitation, any warranties or conditions\par + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\par + PARTICULAR PURPOSE. You are solely responsible for determining the\par + appropriateness of using or redistributing the Work and assume any\par + risks associated with Your exercise of permissions under this License.\par +\par + 8. Limitation of Liability. In no event and under no legal theory,\par + whether in tort (including negligence), contract, or otherwise,\par + unless required by applicable law (such as deliberate and grossly\par + negligent acts) or agreed to in writing, shall any Contributor be\par + liable to You for damages, including any direct, indirect, special,\par + incidental, or consequential damages of any character arising as a\par + result of this License or out of the use or inability to use the\par + Work (including but not limited to damages for loss of goodwill,\par + work stoppage, computer failure or malfunction, or any and all\par + other commercial damages or losses), even if such Contributor\par + has been advised of the possibility of such damages.\par +\par + 9. Accepting Warranty or Additional Liability. While redistributing\par + the Work or Derivative Works thereof, You may choose to offer,\par + and charge a fee for, acceptance of support, warranty, indemnity,\par + or other liability obligations and/or rights consistent with this\par + License. However, in accepting such obligations, You may act only\par + on Your own behalf and on Your sole responsibility, not on behalf\par + of any other Contributor, and only if You agree to indemnify,\par + defend, and hold each Contributor harmless for any liability\par + incurred by, or claims asserted against, such Contributor by reason\par + of your accepting any such warranty or additional liability.\par +\par +-------------------END OF LICENSE-------------------------------\par +\par +The software includes the AutoMapper library ("AutoMapper"). The MIT License set out below is provided for informational purposes only. It is not the license that governs any part of the software.\par +\par +----------------START OF LICENSE--------------------------------\par +\par +Provided for Informational Purposes Only\par +\par +AutoMapper\par +\par +The MIT License (MIT)\par +\par +Copyright (c) 2010 Jimmy Bogard\par +\par +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\par +\par +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\par +\par +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\par +\par +-------------END OF LICENSE----------------------------------------\par +\par +} + diff --git a/setup/media/WAIcon.ico b/setup/media/WAIcon.ico new file mode 100644 index 000000000000..76425402df61 Binary files /dev/null and b/setup/media/WAIcon.ico differ diff --git a/setup/media/bannrbmp.bmp b/setup/media/bannrbmp.bmp new file mode 100644 index 000000000000..e115559090c4 Binary files /dev/null and b/setup/media/bannrbmp.bmp differ diff --git a/setup/media/dlgbmp.bmp b/setup/media/dlgbmp.bmp new file mode 100644 index 000000000000..399c62e6f1e1 Binary files /dev/null and b/setup/media/dlgbmp.bmp differ diff --git a/src/.nuget/NuGet.Config b/src/.nuget/NuGet.Config new file mode 100644 index 000000000000..107ede70b2c1 --- /dev/null +++ b/src/.nuget/NuGet.Config @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/.nuget/NuGet.exe b/src/.nuget/NuGet.exe new file mode 100644 index 000000000000..c41a0d0debd8 Binary files /dev/null and b/src/.nuget/NuGet.exe differ diff --git a/src/.nuget/NuGet.targets b/src/.nuget/NuGet.targets new file mode 100644 index 000000000000..2d11ba558f2b --- /dev/null +++ b/src/.nuget/NuGet.targets @@ -0,0 +1,153 @@ + + + + $(MSBuildProjectDirectory)\..\ + + + false + + + false + + + true + + + false + + + + + + + + + + + $([System.IO.Path]::Combine($(SolutionDir), ".nuget")) + $([System.IO.Path]::Combine($(ProjectDir), "packages.config")) + $([System.IO.Path]::Combine($(SolutionDir), "packages")) + + + + + $(SolutionDir).nuget + packages.config + $(SolutionDir)packages + + + + + $(NuGetToolsPath)\nuget.exe + @(PackageSource) + + "$(NuGetExePath)" + mono --runtime=v4.0.30319 $(NuGetExePath) + + $(TargetDir.Trim('\\')) + + -RequireConsent + + $(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(RequireConsentSwitch) -o "$(PackagesDir)" + $(NuGetCommand) pack "$(ProjectPath)" -p Configuration=$(Configuration) -o "$(PackageOutputDir)" -symbols + + + + RestorePackages; + $(BuildDependsOn); + + + + + $(BuildDependsOn); + BuildPackage; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/AzurePowershell.sln b/src/AzurePowershell.sln new file mode 100644 index 000000000000..d06e75409380 --- /dev/null +++ b/src/AzurePowershell.sln @@ -0,0 +1,382 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.30501.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8531411A-0137-4E27-9C5E-49E07C245048}" + ProjectSection(SolutionItems) = preProject + local.runsettings = local.runsettings + Local.testsettings = Local.testsettings + Local.x64.testsettings = Local.x64.testsettings + UnitTest.testsettings = UnitTest.testsettings + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands", "ServiceManagement\Services\Commands\Commands.csproj", "{CD5AA507-F5EF-473D-855B-84B91A1ABE54}" + ProjectSection(ProjectDependencies) = postProject + {E1F5201D-6067-430E-B303-4E367652991B} = {E1F5201D-6067-430E-B303-4E367652991B} + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Test", "ServiceManagement\Services\Commands.Test\Commands.Test.csproj", "{B7FD03F6-98BC-4F54-9A14-0455E579FCD4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.SqlDatabase", "ServiceManagement\Sql\Commands.SqlDatabase\Commands.SqlDatabase.csproj", "{DDF5D225-C9C5-42B7-BDB5-2C3646E479AA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.SqlDatabase.Test", "ServiceManagement\Sql\Commands.SqlDatabase.Test\Commands.SqlDatabase.Test.csproj", "{37455286-D8A7-4E0C-8B4D-C517D20C641A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Storage", "ServiceManagement\Storage\Commands.Storage\Commands.Storage.csproj", "{08CF7DA7-0392-4A19-B79B-E1FF67CDB81A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Storage.Test", "ServiceManagement\Storage\Commands.Storage.Test\Commands.Storage.Test.csproj", "{D6F470A6-7395-4B8B-9D29-44DF0EC8F624}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ScenarioTest", "Common\Commands.ScenarioTest\Commands.ScenarioTest.csproj", "{A3965B66-5A3E-4B8C-9574-28E5958D4828}" + ProjectSection(ProjectDependencies) = postProject + {CD5AA507-F5EF-473D-855B-84B91A1ABE54} = {CD5AA507-F5EF-473D-855B-84B91A1ABE54} + {DDF5D225-C9C5-42B7-BDB5-2C3646E479AA} = {DDF5D225-C9C5-42B7-BDB5-2C3646E479AA} + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ServiceManagement", "ServiceManagement\Compute\Commands.ServiceManagement\Commands.ServiceManagement.csproj", "{E1CA72BA-8374-45F6-904D-FD34ECDF5B6F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ServiceManagement.Test", "ServiceManagement\Compute\Commands.ServiceManagement.Test\Commands.ServiceManagement.Test.csproj", "{58A78F29-8C0C-4A5E-893E-3953C0F29C8A}" + ProjectSection(ProjectDependencies) = postProject + {98B10548-DF97-4FB1-8D82-2A12945D4F21} = {98B10548-DF97-4FB1-8D82-2A12945D4F21} + {08CF7DA7-0392-4A19-B79B-E1FF67CDB81A} = {08CF7DA7-0392-4A19-B79B-E1FF67CDB81A} + {40FEE0BB-FD45-4EFC-85BC-0D602A6892C4} = {40FEE0BB-FD45-4EFC-85BC-0D602A6892C4} + {FDB897BD-FCB4-44A1-8D66-AC99F22EC737} = {FDB897BD-FCB4-44A1-8D66-AC99F22EC737} + {E895BBDA-0B06-46AB-B909-9B97B3ECE47E} = {E895BBDA-0B06-46AB-B909-9B97B3ECE47E} + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sync", "ServiceManagement\Compute\Sync\Sync.csproj", "{73820CBC-F4EB-4C5E-B4F0-CC4A93FBF157}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VhdManagement", "ServiceManagement\Compute\VhdManagement\VhdManagement.csproj", "{80496B7B-068A-4A1E-B0BB-4B1FFF3FA616}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Utilities", "ServiceManagement\Services\Commands.Utilities\Commands.Utilities.csproj", "{4900EC4E-8DEB-4412-9108-0BC52F81D457}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Test.Utilities", "ServiceManagement\Services\Commands.Test.Utilities\Commands.Test.Utilities.csproj", "{BC420543-C04E-4BF3-96E1-CD81B823BDD7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Storage.MsTestLib", "ServiceManagement\Storage\Commands.Storage.MsTestLib\Commands.Storage.MsTestLib.csproj", "{CE97967B-7479-43B9-9561-776232AC5D47}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Storage.StorageTestLib", "ServiceManagement\Storage\Commands.Storage.StorageTestLib\Commands.Storage.StorageTestLib.csproj", "{0A513849-2690-4D07-8DE7-0ACE39645D12}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Storage.ScenarioTest", "ServiceManagement\Storage\Commands.Storage.ScenarioTest\Commands.Storage.ScenarioTest.csproj", "{4BC0E3D3-6EDD-43AA-8F15-DCFED8ACC93D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Storage.MsTest2", "ServiceManagement\Storage\Commands.Storage.MsTest2\Commands.Storage.MsTest2.csproj", "{9D5A40CA-5594-4F5C-8230-7ADF7CC0558E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ServiceManagement.PlatformImageRepository", "ServiceManagement\Compute\Commands.ServiceManagement.PlatformImageRepository\Commands.ServiceManagement.PlatformImageRepository.csproj", "{6478FA8B-3801-4863-8591-87F0855D5C82}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ServiceManagement.Preview", "ServiceManagement\Compute\Commands.ServiceManagement.Preview\Commands.ServiceManagement.Preview.csproj", "{E895BBDA-0B06-46AB-B909-9B97B3ECE47E}" + ProjectSection(ProjectDependencies) = postProject + {6478FA8B-3801-4863-8591-87F0855D5C82} = {6478FA8B-3801-4863-8591-87F0855D5C82} + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ExpressRoute", "ServiceManagement\ExpressRoute\Commands.ExpressRoute\Commands.ExpressRoute.csproj", "{45C2D687-E0CE-4C97-B731-335834DC2BF2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common.Storage", "Common\Commands.Common.Storage\Commands.Common.Storage.csproj", "{65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common.Test", "Common\Commands.Common.Test\Commands.Common.Test.csproj", "{3B48A77B-5956-4A62-9081-92BA04B02B27}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{95C16AED-FD57-42A0-86C3-2CF4300A4817}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Resources", "ResourceManager\Resources\Commands.Resources\Commands.Resources.csproj", "{E1F5201D-6067-430E-B303-4E367652991B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Resources.Test", "ResourceManager\Resources\Commands.Resources.Test\Commands.Resources.Test.csproj", "{4C2FE49A-09E1-4979-AD46-CD64FD04C8F7}" + ProjectSection(ProjectDependencies) = postProject + {D470E50A-9607-48D6-A924-4F9F86502704} = {D470E50A-9607-48D6-A924-4F9F86502704} + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.TrafficManager", "ServiceManagement\TrafficManager\Commands.TrafficManager\Commands.TrafficManager.csproj", "{94E96A5C-B5AD-4E10-B13A-3BC16D102AED}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ManagedCache", "ServiceManagement\ManagedCache\Commands.ManagedCache\Commands.ManagedCache.csproj", "{46C06ED8-43D9-41FD-B73B-41547D9C04E1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ManagedCache.Test", "ServiceManagement\ManagedCache\Commands.ManagedCache.Test\Commands.ManagedCache.Test.csproj", "{374D4000-DEDE-4995-9B63-E3B9FE0C4D29}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Profile", "Common\Commands.Profile\Commands.Profile.csproj", "{C60342B1-47D3-4A0E-8081-9B97CE60B7AF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Automation", "ServiceManagement\Automation\Commands.Automation\Commands.Automation.csproj", "{47CD7E95-5330-4384-ABCE-2C267C57085C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Automation.Test", "ServiceManagement\Automation\Commands.Automation.Test\Commands.Automation.Test.csproj", "{127D0D51-FDEA-4E1A-8CD8-34DEB5C2F7F6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.TrafficManager.Test", "ServiceManagement\TrafficManager\Commands.TrafficManager.Test\Commands.TrafficManager.Test.csproj", "{84F99CBD-5B86-4428-B263-135B2F67F512}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.HDInsight", "ServiceManagement\HDInsight\Commands.HDInsight\Commands.HDInsight.csproj", "{137D404A-865A-43DB-930C-6DA67DA048DF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.HDInsight.Test", "ServiceManagement\HDInsight\Commands.HDInsight.Test\Commands.HDInsight.Test.csproj", "{7E8D2555-2DDD-4757-974F-D5FFD0647671}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Tags", "ResourceManager\Tags\Commands.Tags\Commands.Tags.csproj", "{2493A8F7-1949-4F29-8D53-9D459046C3B8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ScenarioTests.Common", "Common\Commands.ScenarioTests.Common\Commands.ScenarioTests.Common.csproj", "{C1BDA476-A5CC-4394-914D-48B0EC31A710}" + ProjectSection(ProjectDependencies) = postProject + {CD5AA507-F5EF-473D-855B-84B91A1ABE54} = {CD5AA507-F5EF-473D-855B-84B91A1ABE54} + {E1F5201D-6067-430E-B303-4E367652991B} = {E1F5201D-6067-430E-B303-4E367652991B} + {DDF5D225-C9C5-42B7-BDB5-2C3646E479AA} = {DDF5D225-C9C5-42B7-BDB5-2C3646E479AA} + {98B10548-DF97-4FB1-8D82-2A12945D4F21} = {98B10548-DF97-4FB1-8D82-2A12945D4F21} + {137D404A-865A-43DB-930C-6DA67DA048DF} = {137D404A-865A-43DB-930C-6DA67DA048DF} + {4900EC4E-8DEB-4412-9108-0BC52F81D457} = {4900EC4E-8DEB-4412-9108-0BC52F81D457} + {94E96A5C-B5AD-4E10-B13A-3BC16D102AED} = {94E96A5C-B5AD-4E10-B13A-3BC16D102AED} + {45C2D687-E0CE-4C97-B731-335834DC2BF2} = {45C2D687-E0CE-4C97-B731-335834DC2BF2} + {47CD7E95-5330-4384-ABCE-2C267C57085C} = {47CD7E95-5330-4384-ABCE-2C267C57085C} + {08CF7DA7-0392-4A19-B79B-E1FF67CDB81A} = {08CF7DA7-0392-4A19-B79B-E1FF67CDB81A} + {C60342B1-47D3-4A0E-8081-9B97CE60B7AF} = {C60342B1-47D3-4A0E-8081-9B97CE60B7AF} + {E1CA72BA-8374-45F6-904D-FD34ECDF5B6F} = {E1CA72BA-8374-45F6-904D-FD34ECDF5B6F} + {40FEE0BB-FD45-4EFC-85BC-0D602A6892C4} = {40FEE0BB-FD45-4EFC-85BC-0D602A6892C4} + {46C06ED8-43D9-41FD-B73B-41547D9C04E1} = {46C06ED8-43D9-41FD-B73B-41547D9C04E1} + {2493A8F7-1949-4F29-8D53-9D459046C3B8} = {2493A8F7-1949-4F29-8D53-9D459046C3B8} + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Sql", "ResourceManager\Sql\Commands.Sql\Commands.Sql.csproj", "{69ED499E-6F3C-488F-86B8-B74CFDA4D47E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.DataFactories", "ResourceManager\DataFactories\Commands.DataFactories\Commands.DataFactories.csproj", "{9577252E-0A6B-4D61-86E8-95F7F309A987}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.DataFactories.Test", "ResourceManager\DataFactories\Commands.DataFactories.Test\Commands.DataFactories.Test.csproj", "{D4EDAD6F-6A1D-4295-9A88-CD3F69EAD42B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Sql.Test", "ResourceManager\Sql\Commands.Sql.Test\Commands.Sql.Test.csproj", "{56ED8C97-53B9-4DF6-ACB5-7E6800105BF8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ServiceManagement.Extensions.Test", "ServiceManagement\Compute\Commands.ServiceManagement.Extensions.Test\Commands.ServiceManagement.Extensions.Test.csproj", "{7A9D7758-A1AB-4BE8-BD09-3FAF446314F2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.RedisCache", "ResourceManager\RedisCache\Commands.RedisCache\Commands.RedisCache.csproj", "{C972E3EF-4461-4758-BA31-93E0947B1253}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.RedisCache.Test", "ResourceManager\RedisCache\Commands.RedisCache.Test\Commands.RedisCache.Test.csproj", "{4AE5705F-62CF-461D-B72E-DD9DCD9B3609}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Batch", "ResourceManager\Batch\Commands.Batch\Commands.Batch.csproj", "{D470E50A-9607-48D6-A924-4F9F86502704}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Batch.Test", "ResourceManager\Batch\Commands.Batch.Test\Commands.Batch.Test.csproj", "{F4ABAD68-64A5-4B23-B09C-42559A7524DE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Network", "ServiceManagement\Network\Commands.Network\Commands.Network.csproj", "{40FEE0BB-FD45-4EFC-85BC-0D602A6892C4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Network.Test", "ServiceManagement\Network\Commands.Network.Test\Commands.Network.Test.csproj", "{FDB897BD-FCB4-44A1-8D66-AC99F22EC737}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.RecoveryServices", "ServiceManagement\RecoveryServices\Commands.RecoveryServices\Commands.RecoveryServices.csproj", "{98B10548-DF97-4FB1-8D82-2A12945D4F21}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.RecoveryServices.Test", "ServiceManagement\RecoveryServices\Commands.RecoveryServices.Test\Commands.RecoveryServices.Test.csproj", "{A415F75B-EB6A-49A6-934E-5BA71B83D6EB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CD5AA507-F5EF-473D-855B-84B91A1ABE54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CD5AA507-F5EF-473D-855B-84B91A1ABE54}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CD5AA507-F5EF-473D-855B-84B91A1ABE54}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CD5AA507-F5EF-473D-855B-84B91A1ABE54}.Release|Any CPU.Build.0 = Release|Any CPU + {B7FD03F6-98BC-4F54-9A14-0455E579FCD4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B7FD03F6-98BC-4F54-9A14-0455E579FCD4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B7FD03F6-98BC-4F54-9A14-0455E579FCD4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B7FD03F6-98BC-4F54-9A14-0455E579FCD4}.Release|Any CPU.Build.0 = Release|Any CPU + {DDF5D225-C9C5-42B7-BDB5-2C3646E479AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DDF5D225-C9C5-42B7-BDB5-2C3646E479AA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DDF5D225-C9C5-42B7-BDB5-2C3646E479AA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DDF5D225-C9C5-42B7-BDB5-2C3646E479AA}.Release|Any CPU.Build.0 = Release|Any CPU + {37455286-D8A7-4E0C-8B4D-C517D20C641A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {37455286-D8A7-4E0C-8B4D-C517D20C641A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {37455286-D8A7-4E0C-8B4D-C517D20C641A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {37455286-D8A7-4E0C-8B4D-C517D20C641A}.Release|Any CPU.Build.0 = Release|Any CPU + {08CF7DA7-0392-4A19-B79B-E1FF67CDB81A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {08CF7DA7-0392-4A19-B79B-E1FF67CDB81A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {08CF7DA7-0392-4A19-B79B-E1FF67CDB81A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {08CF7DA7-0392-4A19-B79B-E1FF67CDB81A}.Release|Any CPU.Build.0 = Release|Any CPU + {D6F470A6-7395-4B8B-9D29-44DF0EC8F624}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D6F470A6-7395-4B8B-9D29-44DF0EC8F624}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D6F470A6-7395-4B8B-9D29-44DF0EC8F624}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D6F470A6-7395-4B8B-9D29-44DF0EC8F624}.Release|Any CPU.Build.0 = Release|Any CPU + {A3965B66-5A3E-4B8C-9574-28E5958D4828}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A3965B66-5A3E-4B8C-9574-28E5958D4828}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A3965B66-5A3E-4B8C-9574-28E5958D4828}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A3965B66-5A3E-4B8C-9574-28E5958D4828}.Release|Any CPU.Build.0 = Release|Any CPU + {E1CA72BA-8374-45F6-904D-FD34ECDF5B6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E1CA72BA-8374-45F6-904D-FD34ECDF5B6F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E1CA72BA-8374-45F6-904D-FD34ECDF5B6F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E1CA72BA-8374-45F6-904D-FD34ECDF5B6F}.Release|Any CPU.Build.0 = Release|Any CPU + {58A78F29-8C0C-4A5E-893E-3953C0F29C8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {58A78F29-8C0C-4A5E-893E-3953C0F29C8A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {58A78F29-8C0C-4A5E-893E-3953C0F29C8A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {58A78F29-8C0C-4A5E-893E-3953C0F29C8A}.Release|Any CPU.Build.0 = Release|Any CPU + {73820CBC-F4EB-4C5E-B4F0-CC4A93FBF157}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {73820CBC-F4EB-4C5E-B4F0-CC4A93FBF157}.Debug|Any CPU.Build.0 = Debug|Any CPU + {73820CBC-F4EB-4C5E-B4F0-CC4A93FBF157}.Release|Any CPU.ActiveCfg = Release|Any CPU + {73820CBC-F4EB-4C5E-B4F0-CC4A93FBF157}.Release|Any CPU.Build.0 = Release|Any CPU + {80496B7B-068A-4A1E-B0BB-4B1FFF3FA616}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {80496B7B-068A-4A1E-B0BB-4B1FFF3FA616}.Debug|Any CPU.Build.0 = Debug|Any CPU + {80496B7B-068A-4A1E-B0BB-4B1FFF3FA616}.Release|Any CPU.ActiveCfg = Release|Any CPU + {80496B7B-068A-4A1E-B0BB-4B1FFF3FA616}.Release|Any CPU.Build.0 = Release|Any CPU + {4900EC4E-8DEB-4412-9108-0BC52F81D457}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4900EC4E-8DEB-4412-9108-0BC52F81D457}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4900EC4E-8DEB-4412-9108-0BC52F81D457}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4900EC4E-8DEB-4412-9108-0BC52F81D457}.Release|Any CPU.Build.0 = Release|Any CPU + {BC420543-C04E-4BF3-96E1-CD81B823BDD7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BC420543-C04E-4BF3-96E1-CD81B823BDD7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BC420543-C04E-4BF3-96E1-CD81B823BDD7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BC420543-C04E-4BF3-96E1-CD81B823BDD7}.Release|Any CPU.Build.0 = Release|Any CPU + {CE97967B-7479-43B9-9561-776232AC5D47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CE97967B-7479-43B9-9561-776232AC5D47}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CE97967B-7479-43B9-9561-776232AC5D47}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CE97967B-7479-43B9-9561-776232AC5D47}.Release|Any CPU.Build.0 = Release|Any CPU + {0A513849-2690-4D07-8DE7-0ACE39645D12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0A513849-2690-4D07-8DE7-0ACE39645D12}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0A513849-2690-4D07-8DE7-0ACE39645D12}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0A513849-2690-4D07-8DE7-0ACE39645D12}.Release|Any CPU.Build.0 = Release|Any CPU + {4BC0E3D3-6EDD-43AA-8F15-DCFED8ACC93D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4BC0E3D3-6EDD-43AA-8F15-DCFED8ACC93D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4BC0E3D3-6EDD-43AA-8F15-DCFED8ACC93D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4BC0E3D3-6EDD-43AA-8F15-DCFED8ACC93D}.Release|Any CPU.Build.0 = Release|Any CPU + {9D5A40CA-5594-4F5C-8230-7ADF7CC0558E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9D5A40CA-5594-4F5C-8230-7ADF7CC0558E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9D5A40CA-5594-4F5C-8230-7ADF7CC0558E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9D5A40CA-5594-4F5C-8230-7ADF7CC0558E}.Release|Any CPU.Build.0 = Release|Any CPU + {6478FA8B-3801-4863-8591-87F0855D5C82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6478FA8B-3801-4863-8591-87F0855D5C82}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6478FA8B-3801-4863-8591-87F0855D5C82}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6478FA8B-3801-4863-8591-87F0855D5C82}.Release|Any CPU.Build.0 = Release|Any CPU + {E895BBDA-0B06-46AB-B909-9B97B3ECE47E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E895BBDA-0B06-46AB-B909-9B97B3ECE47E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E895BBDA-0B06-46AB-B909-9B97B3ECE47E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E895BBDA-0B06-46AB-B909-9B97B3ECE47E}.Release|Any CPU.Build.0 = Release|Any CPU + {45C2D687-E0CE-4C97-B731-335834DC2BF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {45C2D687-E0CE-4C97-B731-335834DC2BF2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {45C2D687-E0CE-4C97-B731-335834DC2BF2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {45C2D687-E0CE-4C97-B731-335834DC2BF2}.Release|Any CPU.Build.0 = Release|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Release|Any CPU.Build.0 = Release|Any CPU + {65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}.Release|Any CPU.Build.0 = Release|Any CPU + {3B48A77B-5956-4A62-9081-92BA04B02B27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3B48A77B-5956-4A62-9081-92BA04B02B27}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3B48A77B-5956-4A62-9081-92BA04B02B27}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3B48A77B-5956-4A62-9081-92BA04B02B27}.Release|Any CPU.Build.0 = Release|Any CPU + {E1F5201D-6067-430E-B303-4E367652991B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E1F5201D-6067-430E-B303-4E367652991B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E1F5201D-6067-430E-B303-4E367652991B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E1F5201D-6067-430E-B303-4E367652991B}.Release|Any CPU.Build.0 = Release|Any CPU + {4C2FE49A-09E1-4979-AD46-CD64FD04C8F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4C2FE49A-09E1-4979-AD46-CD64FD04C8F7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4C2FE49A-09E1-4979-AD46-CD64FD04C8F7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4C2FE49A-09E1-4979-AD46-CD64FD04C8F7}.Release|Any CPU.Build.0 = Release|Any CPU + {94E96A5C-B5AD-4E10-B13A-3BC16D102AED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {94E96A5C-B5AD-4E10-B13A-3BC16D102AED}.Debug|Any CPU.Build.0 = Debug|Any CPU + {94E96A5C-B5AD-4E10-B13A-3BC16D102AED}.Release|Any CPU.ActiveCfg = Release|Any CPU + {94E96A5C-B5AD-4E10-B13A-3BC16D102AED}.Release|Any CPU.Build.0 = Release|Any CPU + {46C06ED8-43D9-41FD-B73B-41547D9C04E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {46C06ED8-43D9-41FD-B73B-41547D9C04E1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {46C06ED8-43D9-41FD-B73B-41547D9C04E1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {46C06ED8-43D9-41FD-B73B-41547D9C04E1}.Release|Any CPU.Build.0 = Release|Any CPU + {374D4000-DEDE-4995-9B63-E3B9FE0C4D29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {374D4000-DEDE-4995-9B63-E3B9FE0C4D29}.Debug|Any CPU.Build.0 = Debug|Any CPU + {374D4000-DEDE-4995-9B63-E3B9FE0C4D29}.Release|Any CPU.ActiveCfg = Release|Any CPU + {374D4000-DEDE-4995-9B63-E3B9FE0C4D29}.Release|Any CPU.Build.0 = Release|Any CPU + {C60342B1-47D3-4A0E-8081-9B97CE60B7AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C60342B1-47D3-4A0E-8081-9B97CE60B7AF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C60342B1-47D3-4A0E-8081-9B97CE60B7AF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C60342B1-47D3-4A0E-8081-9B97CE60B7AF}.Release|Any CPU.Build.0 = Release|Any CPU + {47CD7E95-5330-4384-ABCE-2C267C57085C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {47CD7E95-5330-4384-ABCE-2C267C57085C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {47CD7E95-5330-4384-ABCE-2C267C57085C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {47CD7E95-5330-4384-ABCE-2C267C57085C}.Release|Any CPU.Build.0 = Release|Any CPU + {127D0D51-FDEA-4E1A-8CD8-34DEB5C2F7F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {127D0D51-FDEA-4E1A-8CD8-34DEB5C2F7F6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {127D0D51-FDEA-4E1A-8CD8-34DEB5C2F7F6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {127D0D51-FDEA-4E1A-8CD8-34DEB5C2F7F6}.Release|Any CPU.Build.0 = Release|Any CPU + {84F99CBD-5B86-4428-B263-135B2F67F512}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {84F99CBD-5B86-4428-B263-135B2F67F512}.Debug|Any CPU.Build.0 = Debug|Any CPU + {84F99CBD-5B86-4428-B263-135B2F67F512}.Release|Any CPU.ActiveCfg = Release|Any CPU + {84F99CBD-5B86-4428-B263-135B2F67F512}.Release|Any CPU.Build.0 = Release|Any CPU + {137D404A-865A-43DB-930C-6DA67DA048DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {137D404A-865A-43DB-930C-6DA67DA048DF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {137D404A-865A-43DB-930C-6DA67DA048DF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {137D404A-865A-43DB-930C-6DA67DA048DF}.Release|Any CPU.Build.0 = Release|Any CPU + {7E8D2555-2DDD-4757-974F-D5FFD0647671}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7E8D2555-2DDD-4757-974F-D5FFD0647671}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7E8D2555-2DDD-4757-974F-D5FFD0647671}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7E8D2555-2DDD-4757-974F-D5FFD0647671}.Release|Any CPU.Build.0 = Release|Any CPU + {2493A8F7-1949-4F29-8D53-9D459046C3B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2493A8F7-1949-4F29-8D53-9D459046C3B8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2493A8F7-1949-4F29-8D53-9D459046C3B8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2493A8F7-1949-4F29-8D53-9D459046C3B8}.Release|Any CPU.Build.0 = Release|Any CPU + {C1BDA476-A5CC-4394-914D-48B0EC31A710}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C1BDA476-A5CC-4394-914D-48B0EC31A710}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C1BDA476-A5CC-4394-914D-48B0EC31A710}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C1BDA476-A5CC-4394-914D-48B0EC31A710}.Release|Any CPU.Build.0 = Release|Any CPU + {69ED499E-6F3C-488F-86B8-B74CFDA4D47E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {69ED499E-6F3C-488F-86B8-B74CFDA4D47E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {69ED499E-6F3C-488F-86B8-B74CFDA4D47E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {69ED499E-6F3C-488F-86B8-B74CFDA4D47E}.Release|Any CPU.Build.0 = Release|Any CPU + {9577252E-0A6B-4D61-86E8-95F7F309A987}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9577252E-0A6B-4D61-86E8-95F7F309A987}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9577252E-0A6B-4D61-86E8-95F7F309A987}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9577252E-0A6B-4D61-86E8-95F7F309A987}.Release|Any CPU.Build.0 = Release|Any CPU + {D4EDAD6F-6A1D-4295-9A88-CD3F69EAD42B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D4EDAD6F-6A1D-4295-9A88-CD3F69EAD42B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D4EDAD6F-6A1D-4295-9A88-CD3F69EAD42B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D4EDAD6F-6A1D-4295-9A88-CD3F69EAD42B}.Release|Any CPU.Build.0 = Release|Any CPU + {56ED8C97-53B9-4DF6-ACB5-7E6800105BF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {56ED8C97-53B9-4DF6-ACB5-7E6800105BF8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {56ED8C97-53B9-4DF6-ACB5-7E6800105BF8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {56ED8C97-53B9-4DF6-ACB5-7E6800105BF8}.Release|Any CPU.Build.0 = Release|Any CPU + {7A9D7758-A1AB-4BE8-BD09-3FAF446314F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7A9D7758-A1AB-4BE8-BD09-3FAF446314F2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7A9D7758-A1AB-4BE8-BD09-3FAF446314F2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7A9D7758-A1AB-4BE8-BD09-3FAF446314F2}.Release|Any CPU.Build.0 = Release|Any CPU + {C972E3EF-4461-4758-BA31-93E0947B1253}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C972E3EF-4461-4758-BA31-93E0947B1253}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C972E3EF-4461-4758-BA31-93E0947B1253}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C972E3EF-4461-4758-BA31-93E0947B1253}.Release|Any CPU.Build.0 = Release|Any CPU + {4AE5705F-62CF-461D-B72E-DD9DCD9B3609}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4AE5705F-62CF-461D-B72E-DD9DCD9B3609}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4AE5705F-62CF-461D-B72E-DD9DCD9B3609}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4AE5705F-62CF-461D-B72E-DD9DCD9B3609}.Release|Any CPU.Build.0 = Release|Any CPU + {D470E50A-9607-48D6-A924-4F9F86502704}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D470E50A-9607-48D6-A924-4F9F86502704}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D470E50A-9607-48D6-A924-4F9F86502704}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D470E50A-9607-48D6-A924-4F9F86502704}.Release|Any CPU.Build.0 = Release|Any CPU + {F4ABAD68-64A5-4B23-B09C-42559A7524DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F4ABAD68-64A5-4B23-B09C-42559A7524DE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F4ABAD68-64A5-4B23-B09C-42559A7524DE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F4ABAD68-64A5-4B23-B09C-42559A7524DE}.Release|Any CPU.Build.0 = Release|Any CPU + {40FEE0BB-FD45-4EFC-85BC-0D602A6892C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {40FEE0BB-FD45-4EFC-85BC-0D602A6892C4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {40FEE0BB-FD45-4EFC-85BC-0D602A6892C4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {40FEE0BB-FD45-4EFC-85BC-0D602A6892C4}.Release|Any CPU.Build.0 = Release|Any CPU + {FDB897BD-FCB4-44A1-8D66-AC99F22EC737}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FDB897BD-FCB4-44A1-8D66-AC99F22EC737}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FDB897BD-FCB4-44A1-8D66-AC99F22EC737}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FDB897BD-FCB4-44A1-8D66-AC99F22EC737}.Release|Any CPU.Build.0 = Release|Any CPU + {98B10548-DF97-4FB1-8D82-2A12945D4F21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {98B10548-DF97-4FB1-8D82-2A12945D4F21}.Debug|Any CPU.Build.0 = Debug|Any CPU + {98B10548-DF97-4FB1-8D82-2A12945D4F21}.Release|Any CPU.ActiveCfg = Release|Any CPU + {98B10548-DF97-4FB1-8D82-2A12945D4F21}.Release|Any CPU.Build.0 = Release|Any CPU + {A415F75B-EB6A-49A6-934E-5BA71B83D6EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A415F75B-EB6A-49A6-934E-5BA71B83D6EB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A415F75B-EB6A-49A6-934E-5BA71B83D6EB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A415F75B-EB6A-49A6-934E-5BA71B83D6EB}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {B7FD03F6-98BC-4F54-9A14-0455E579FCD4} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {37455286-D8A7-4E0C-8B4D-C517D20C641A} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {D6F470A6-7395-4B8B-9D29-44DF0EC8F624} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {A3965B66-5A3E-4B8C-9574-28E5958D4828} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {58A78F29-8C0C-4A5E-893E-3953C0F29C8A} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {BC420543-C04E-4BF3-96E1-CD81B823BDD7} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {CE97967B-7479-43B9-9561-776232AC5D47} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {0A513849-2690-4D07-8DE7-0ACE39645D12} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {4BC0E3D3-6EDD-43AA-8F15-DCFED8ACC93D} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {9D5A40CA-5594-4F5C-8230-7ADF7CC0558E} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {3B48A77B-5956-4A62-9081-92BA04B02B27} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {4C2FE49A-09E1-4979-AD46-CD64FD04C8F7} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {374D4000-DEDE-4995-9B63-E3B9FE0C4D29} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {127D0D51-FDEA-4E1A-8CD8-34DEB5C2F7F6} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {84F99CBD-5B86-4428-B263-135B2F67F512} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {7E8D2555-2DDD-4757-974F-D5FFD0647671} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {C1BDA476-A5CC-4394-914D-48B0EC31A710} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {D4EDAD6F-6A1D-4295-9A88-CD3F69EAD42B} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {56ED8C97-53B9-4DF6-ACB5-7E6800105BF8} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {7A9D7758-A1AB-4BE8-BD09-3FAF446314F2} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {4AE5705F-62CF-461D-B72E-DD9DCD9B3609} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {F4ABAD68-64A5-4B23-B09C-42559A7524DE} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {FDB897BD-FCB4-44A1-8D66-AC99F22EC737} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {A415F75B-EB6A-49A6-934E-5BA71B83D6EB} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + EndGlobalSection +EndGlobal diff --git a/src/AzureRT.testsettings b/src/AzureRT.testsettings new file mode 100644 index 000000000000..9614008c91be --- /dev/null +++ b/src/AzureRT.testsettings @@ -0,0 +1,15 @@ + + + These are test settings for AzureRT test run. + + + + + + + + \ No newline at end of file diff --git a/src/Common.sln b/src/Common.sln new file mode 100644 index 000000000000..2a66f4292cd6 --- /dev/null +++ b/src/Common.sln @@ -0,0 +1,45 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.30501.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common.Storage", "Common\Commands.Common.Storage\Commands.Common.Storage.csproj", "{65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common.Test", "Common\Commands.Common.Test\Commands.Common.Test.csproj", "{3B48A77B-5956-4A62-9081-92BA04B02B27}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Profile", "Common\Commands.Profile\Commands.Profile.csproj", "{C60342B1-47D3-4A0E-8081-9B97CE60B7AF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ScenarioTest", "Common\Commands.ScenarioTest\Commands.ScenarioTest.csproj", "{A3965B66-5A3E-4B8C-9574-28E5958D4828}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5EE72C53-1720-4309-B54B-5FB79703195F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Release|Any CPU.Build.0 = Release|Any CPU + {65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}.Release|Any CPU.Build.0 = Release|Any CPU + {3B48A77B-5956-4A62-9081-92BA04B02B27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3B48A77B-5956-4A62-9081-92BA04B02B27}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3B48A77B-5956-4A62-9081-92BA04B02B27}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3B48A77B-5956-4A62-9081-92BA04B02B27}.Release|Any CPU.Build.0 = Release|Any CPU + {C60342B1-47D3-4A0E-8081-9B97CE60B7AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C60342B1-47D3-4A0E-8081-9B97CE60B7AF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C60342B1-47D3-4A0E-8081-9B97CE60B7AF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C60342B1-47D3-4A0E-8081-9B97CE60B7AF}.Release|Any CPU.Build.0 = Release|Any CPU + {A3965B66-5A3E-4B8C-9574-28E5958D4828}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A3965B66-5A3E-4B8C-9574-28E5958D4828}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A3965B66-5A3E-4B8C-9574-28E5958D4828}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A3965B66-5A3E-4B8C-9574-28E5958D4828}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/Common/Commands.Common.Storage/AzureStorageContext.cs b/src/Common/Commands.Common.Storage/AzureStorageContext.cs new file mode 100644 index 000000000000..954bfc5df548 --- /dev/null +++ b/src/Common/Commands.Common.Storage/AzureStorageContext.cs @@ -0,0 +1,167 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure.Commands.Common.Storage.Properties; +using Microsoft.WindowsAzure.Storage; + +namespace Microsoft.WindowsAzure.Commands.Common.Storage +{ + /// + /// Storage context + /// + public class AzureStorageContext + { + private static AzureStorageContext emptyContextInstance = new AzureStorageContext(); + + /// + /// Storage account name used in this context + /// + public string StorageAccountName { get; private set; } + + /// + /// Blob end point of the storage context + /// + public string BlobEndPoint { get; private set; } + + /// + /// Table end point of the storage context + /// + public string TableEndPoint { get; private set; } + + /// + /// Queue end point of the storage context + /// + public string QueueEndPoint { get; private set; } + + /// + /// Self reference, it could enable New-AzureStorageContext can be used in pipeline + /// + public AzureStorageContext Context { get; private set; } + + /// + /// Name place holder, and force pipeline to ignore this property + /// + public string Name { get; private set; } + + /// + /// Storage account in context + /// + public CloudStorageAccount StorageAccount { get; private set; } + + /// + /// Endpoint suffix (everything after "table.", "blob." or "queue.") + /// + /// + /// This will return an empty string if the endpoints are not correctly set. + /// + public string EndPointSuffix + { + get + { + if (string.IsNullOrEmpty(BlobEndPoint) || string.IsNullOrEmpty(TableEndPoint)) + { + return string.Empty; + } + + string suffix; + + if (StorageAccountName.EndsWith("blob", StringComparison.InvariantCultureIgnoreCase)) + { + // Cannot use the blob endpoint if the account name ends with blob... + // However it is OK if "blob" is in the account name but not as a suffix + int tableIndex = TableEndPoint.IndexOf("table.", 0, StringComparison.InvariantCultureIgnoreCase); + if (tableIndex <= 0) + { + suffix = string.Empty; + } + else + { + suffix = TableEndPoint.Substring(tableIndex + "table.".Length); + } + } + else + { + int blobIndex = BlobEndPoint.IndexOf("blob.", 0, StringComparison.InvariantCultureIgnoreCase); + if (blobIndex <= 0) + { + suffix = string.Empty; + } + else + { + suffix = BlobEndPoint.Substring(blobIndex + "blob.".Length); + } + } + + return suffix; + } + } + + /// + /// Create a storage context usign cloud storage account + /// + /// cloud storage account + public AzureStorageContext(CloudStorageAccount account) + { + StorageAccount = account; + + if (account.BlobEndpoint != null) + { + BlobEndPoint = account.BlobEndpoint.ToString(); + } + + if (account.TableEndpoint != null) + { + TableEndPoint = account.TableEndpoint.ToString(); + } + + if (account.QueueEndpoint != null) + { + QueueEndPoint = account.QueueEndpoint.ToString(); + } + + StorageAccountName = account.Credentials.AccountName; + Context = this; + Name = String.Empty; + + if (string.IsNullOrEmpty(StorageAccountName)) + { + if (account.Credentials.IsSAS) + { + StorageAccountName = Resources.SasTokenAccountName; + } + else + { + StorageAccountName = Resources.AnonymousAccountName; + } + } + } + + /// + /// Proivides a private constructor for building empty instance which + /// contains no account information. + /// + private AzureStorageContext() + { + } + + public static AzureStorageContext EmptyContextInstance + { + get + { + return emptyContextInstance; + } + } + } +} diff --git a/src/Common/Commands.Common.Storage/BlobUploadParameters.cs b/src/Common/Commands.Common.Storage/BlobUploadParameters.cs new file mode 100644 index 000000000000..8618681c187a --- /dev/null +++ b/src/Common/Commands.Common.Storage/BlobUploadParameters.cs @@ -0,0 +1,38 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.Common.Storage +{ + public class BlobUploadParameters + { + public string StorageName {get; set;} + public string FileLocalPath { get; set; } + public string FileRemoteName { get; set; } + public string ContainerName { get; set; } + public bool ContainerPublic { get; set; } + public bool OverrideIfExists { get; set; } + public int SasTokenDurationInHours { get; set; } + public BlobRequestOptions BlobRequestOptions { get; set; } + + public BlobUploadParameters() + { + ContainerPublic = false; + ContainerName = "mydeployments"; + SasTokenDurationInHours = 24; + OverrideIfExists = false; + } + } +} diff --git a/src/Common/Commands.Common.Storage/Commands.Common.Storage.csproj b/src/Common/Commands.Common.Storage/Commands.Common.Storage.csproj new file mode 100644 index 000000000000..43a11a618f7c --- /dev/null +++ b/src/Common/Commands.Common.Storage/Commands.Common.Storage.csproj @@ -0,0 +1,155 @@ + + + + + Debug + AnyCPU + {65C3A86A-716D-4E7D-AB67-1DB00B3BF72D} + Library + Properties + Microsoft.WindowsAzure.Commands.Common.Storage + Microsoft.WindowsAzure.Commands.Common.Storage + v4.5 + 512 + + ..\..\ + true + /assemblyCompareMode:StrongNameIgnoringVersion + + + true + full + false + bin\Debug + DEBUG;TRACE + prompt + 4 + true + true + false + + + bin\Release + TRACE;SIGN + true + pdbonly + AnyCPU + bin\Release\Management.Utilities.dll.CodeAnalysisLog.xml + true + GlobalSuppressions.cs + prompt + MinimumRecommendedRules.ruleset + ;$(ProgramFiles)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\Rule Sets + ;$(ProgramFiles)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\FxCop\Rules + true + MSSharedLibKey.snk + true + true + false + + + + ..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll + + + ..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll + + + ..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll + + + False + ..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + False + ..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + ..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll + + + False + ..\..\packages\Microsoft.WindowsAzure.Management.Storage.3.1.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll + + + False + ..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll + + + ..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + True + + + + + + + + False + ..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + ..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll + + + + + + + + + + + + + True + True + Resources.resx + + + + + + + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Common/Commands.Common.Storage/IStorageClientWrapper.cs b/src/Common/Commands.Common.Storage/IStorageClientWrapper.cs new file mode 100644 index 000000000000..e29485436fc4 --- /dev/null +++ b/src/Common/Commands.Common.Storage/IStorageClientWrapper.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; + +namespace Microsoft.WindowsAzure.Commands.Common.Storage +{ + public interface IStorageClientWrapper + { + void DeletePackageFromBlob( + string storageName, + Uri packageUri); + + Uri UploadFileToBlob( + BlobUploadParameters parameters); + } +} \ No newline at end of file diff --git a/src/Common/Commands.Common.Storage/MSSharedLibKey.snk b/src/Common/Commands.Common.Storage/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/Common/Commands.Common.Storage/MSSharedLibKey.snk differ diff --git a/src/Common/Commands.Common.Storage/Properties/AssemblyInfo.cs b/src/Common/Commands.Common.Storage/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..e03883414b6c --- /dev/null +++ b/src/Common/Commands.Common.Storage/Properties/AssemblyInfo.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Reflection; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Microsoft Azure Powershell - Common Storage Library")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] + +[assembly: ComVisible(false)] +[assembly: CLSCompliant(false)] +[assembly: Guid("c565107e-98a9-4703-85cd-a7efc3d8da7b")] +[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] +[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] diff --git a/src/Common/Commands.Common.Storage/Properties/Resources.Designer.cs b/src/Common/Commands.Common.Storage/Properties/Resources.Designer.cs new file mode 100644 index 000000000000..1dd6d72ee692 --- /dev/null +++ b/src/Common/Commands.Common.Storage/Properties/Resources.Designer.cs @@ -0,0 +1,81 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.WindowsAzure.Commands.Common.Storage.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.WindowsAzure.Commands.Common.Storage.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to [Anonymous]. + /// + internal static string AnonymousAccountName { + get { + return ResourceManager.GetString("AnonymousAccountName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [SasToken]. + /// + internal static string SasTokenAccountName { + get { + return ResourceManager.GetString("SasTokenAccountName", resourceCulture); + } + } + } +} diff --git a/src/Common/Commands.Common.Storage/Properties/Resources.resx b/src/Common/Commands.Common.Storage/Properties/Resources.resx new file mode 100644 index 000000000000..429223e5b11b --- /dev/null +++ b/src/Common/Commands.Common.Storage/Properties/Resources.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + [Anonymous] + + + [SasToken] + + \ No newline at end of file diff --git a/src/Common/Commands.Common.Storage/StorageClientWrapper.cs b/src/Common/Commands.Common.Storage/StorageClientWrapper.cs new file mode 100644 index 000000000000..5e0fc11e0d9c --- /dev/null +++ b/src/Common/Commands.Common.Storage/StorageClientWrapper.cs @@ -0,0 +1,132 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.IO; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Storage; +using Microsoft.WindowsAzure.Management.Storage.Models; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Auth; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.Common.Storage +{ + /// + /// Wrapper class that encapsulates Blob functionality from the StorageClient API + /// + public class StorageClientWrapper : IStorageClientWrapper + { + public IStorageManagementClient StorageManagementClient { get; set; } + + public Func CloudBlobClientFactory { get; set; } + + public StorageClientWrapper(IStorageManagementClient storageManagementClient) + { + StorageManagementClient = storageManagementClient; + CloudBlobClientFactory = (uri, cred) => new CloudBlobClient(uri, cred); + } + + public void DeletePackageFromBlob(string storageName, Uri packageUri) + { + StorageAccountGetKeysResponse keys = StorageManagementClient.StorageAccounts.GetKeys(storageName); + string storageKey = keys.PrimaryKey; + var storageService = StorageManagementClient.StorageAccounts.Get(storageName); + var blobStorageEndpoint = storageService.StorageAccount.Properties.Endpoints[0]; + var credentials = new StorageCredentials(storageName, storageKey); + var client = new CloudBlobClient(blobStorageEndpoint, credentials); + ICloudBlob blob = client.GetBlobReferenceFromServer(packageUri); + blob.DeleteIfExists(); + } + + public Uri UploadFileToBlob(BlobUploadParameters parameters) + { + StorageAccountGetKeysResponse keys = StorageManagementClient.StorageAccounts.GetKeys(parameters.StorageName); + string storageKey = keys.PrimaryKey; + StorageAccountGetResponse storageService = StorageManagementClient.StorageAccounts.Get(parameters.StorageName); + Uri blobEndpointUri = storageService.StorageAccount.Properties.Endpoints[0]; + return UploadFile(parameters.StorageName, + GeneralUtilities.CreateHttpsEndpoint(blobEndpointUri.ToString()), + storageKey, parameters); + } + + private Uri UploadFile(string storageName, Uri blobEndpointUri, string storageKey, BlobUploadParameters parameters) + { + var credentials = new StorageCredentials(storageName, storageKey); + var client = new CloudBlobClient(blobEndpointUri, credentials); + string blobName = parameters.FileRemoteName; + if (string.IsNullOrEmpty(blobName)) + { + blobName = string.Format( + CultureInfo.InvariantCulture, + "{0}_{1}", + DateTime.UtcNow.ToString("yyyyMMdd_HHmmss", CultureInfo.InvariantCulture), + Path.GetFileName(parameters.FileLocalPath)); + } + + CloudBlobContainer container = client.GetContainerReference(parameters.ContainerName); + var wasCreated = container.CreateIfNotExists(); + if (wasCreated && parameters.ContainerPublic) + { + container.SetPermissions(new BlobContainerPermissions + { + PublicAccess = BlobContainerPublicAccessType.Blob + }); + } + + CloudBlockBlob blob = container.GetBlockBlobReference(blobName); + + if (blob.Exists()) + { + if (parameters.OverrideIfExists) + { + blob.DeleteIfExists(); + } + else + { + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, + Commands.Common.Properties.Resources.BlobAlreadyExistsInTheAccount, blobName)); + } + } + + using (FileStream readStream = File.OpenRead(parameters.FileLocalPath)) + { + blob.UploadFromStream(readStream, AccessCondition.GenerateEmptyCondition(), parameters.BlobRequestOptions); + } + + blob = container.GetBlockBlobReference(blobName); + + string sasContainerToken = string.Empty; + + if (!parameters.ContainerPublic) + { + //Set the expiry time and permissions for the blob. + //Start time is specified as a few minutes in the past, to mitigate clock skew. + //The shared access signature will be valid immediately. + SharedAccessBlobPolicy sasConstraints = new SharedAccessBlobPolicy(); + sasConstraints.SharedAccessStartTime = DateTime.UtcNow.AddMinutes(-5); + sasConstraints.SharedAccessExpiryTime = DateTime.UtcNow.AddHours(parameters.SasTokenDurationInHours); + sasConstraints.Permissions = SharedAccessBlobPermissions.Read; + + //Generate the shared access signature on the blob, setting the constraints directly on the signature. + sasContainerToken = blob.GetSharedAccessSignature(sasConstraints); + } + + string fullUrl = client.BaseUri + parameters.ContainerName + client.DefaultDelimiter + blobName + sasContainerToken; + + return new Uri(fullUrl); + } + } +} \ No newline at end of file diff --git a/src/Common/Commands.Common.Storage/StorageUtilities.cs b/src/Common/Commands.Common.Storage/StorageUtilities.cs new file mode 100644 index 000000000000..69d5d4792319 --- /dev/null +++ b/src/Common/Commands.Common.Storage/StorageUtilities.cs @@ -0,0 +1,79 @@ +using System; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Storage; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Auth; +using Microsoft.WindowsAzure.Storage.Blob; +using Microsoft.WindowsAzure.Storage.Table; + +namespace Microsoft.WindowsAzure.Commands.Common.Storage +{ + public class StorageUtilities + { + public static CloudStorageAccount GenerateCloudStorageAccount(StorageManagementClient storageClient, string accountName) + { + var storageServiceResponse = storageClient.StorageAccounts.Get(accountName); + var storageKeysResponse = storageClient.StorageAccounts.GetKeys(accountName); + + Uri fileEndpoint = null; + Uri blobEndpoint = null; + Uri queueEndpoint = null; + Uri tableEndpoint = null; + + if (storageServiceResponse.StorageAccount.Properties.Endpoints.Count >= 4) + { + fileEndpoint = GeneralUtilities.CreateHttpsEndpoint(storageServiceResponse.StorageAccount.Properties.Endpoints[3].ToString()); + } + + if (storageServiceResponse.StorageAccount.Properties.Endpoints.Count >= 3) + { + tableEndpoint = GeneralUtilities.CreateHttpsEndpoint(storageServiceResponse.StorageAccount.Properties.Endpoints[2].ToString()); + queueEndpoint = GeneralUtilities.CreateHttpsEndpoint(storageServiceResponse.StorageAccount.Properties.Endpoints[1].ToString()); + } + + if (storageServiceResponse.StorageAccount.Properties.Endpoints.Count >= 1) + { + blobEndpoint = GeneralUtilities.CreateHttpsEndpoint(storageServiceResponse.StorageAccount.Properties.Endpoints[0].ToString()); + } + + return new CloudStorageAccount( + new StorageCredentials(storageServiceResponse.StorageAccount.Name, storageKeysResponse.PrimaryKey), + blobEndpoint, + queueEndpoint, + tableEndpoint, + fileEndpoint); + } + + public static string GenerateTableStorageSasUrl(string connectionString, string tableName, DateTime expiryTime, SharedAccessTablePermissions permissions) + { + CloudStorageAccount storageAccount = CloudStorageAccount.Parse(connectionString); + CloudTableClient tableClient = storageAccount.CreateCloudTableClient(); + CloudTable tableReference = tableClient.GetTableReference(tableName); + tableReference.CreateIfNotExists(); + var sasToken = tableReference.GetSharedAccessSignature( + new SharedAccessTablePolicy() + { + SharedAccessExpiryTime = expiryTime, + Permissions = permissions + }); + + return tableReference.Uri + sasToken; + } + + public static string GenerateBlobStorageSasUrl(string connectionString, string blobContainerName, DateTime expiryTime, SharedAccessBlobPermissions permissions) + { + CloudStorageAccount storageAccount = CloudStorageAccount.Parse(connectionString); + CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient(); + CloudBlobContainer blobContainer = blobClient.GetContainerReference(blobContainerName); + blobContainer.CreateIfNotExists(); + var sasToken = blobContainer.GetSharedAccessSignature( + new SharedAccessBlobPolicy() + { + SharedAccessExpiryTime = expiryTime, + Permissions = permissions + }); + + return blobContainer.Uri + sasToken; + } + } +} diff --git a/src/Common/Commands.Common.Storage/WindowsAzureSubscriptionExtensions.cs b/src/Common/Commands.Common.Storage/WindowsAzureSubscriptionExtensions.cs new file mode 100644 index 000000000000..fdeb4d022aeb --- /dev/null +++ b/src/Common/Commands.Common.Storage/WindowsAzureSubscriptionExtensions.cs @@ -0,0 +1,43 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Management.Storage; +using Microsoft.WindowsAzure.Storage; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common +{ + public static class WindowsAzureSubscriptionExtensions + { + private static Dictionary storageAccountCache = new Dictionary(); + + public static CloudStorageAccount GetCloudStorageAccount(this AzureSubscription subscription) + { + if (subscription == null) + { + return null; + } + + using (var storageClient = AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement)) + { + return StorageUtilities.GenerateCloudStorageAccount( + storageClient, subscription.GetProperty(AzureSubscription.Property.StorageAccount)); + } + } + } +} diff --git a/src/Common/Commands.Common.Storage/packages.config b/src/Common/Commands.Common.Storage/packages.config new file mode 100644 index 000000000000..a594630f2a52 --- /dev/null +++ b/src/Common/Commands.Common.Storage/packages.config @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Common/Commands.Common.Test/Commands.Common.Test.csproj b/src/Common/Commands.Common.Test/Commands.Common.Test.csproj new file mode 100644 index 000000000000..733f8dc7bd88 --- /dev/null +++ b/src/Common/Commands.Common.Test/Commands.Common.Test.csproj @@ -0,0 +1,251 @@ + + + + + Debug + AnyCPU + {3B48A77B-5956-4A62-9081-92BA04B02B27} + Library + Properties + Microsoft.WindowsAzure.Commands.Common.Test + Microsoft.WindowsAzure.Commands.Common.Test + v4.5 + 512 + + ..\..\ + true + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + + + true + full + false + bin\Debug + DEBUG;TRACE + prompt + 4 + true + true + false + + + bin\Release + TRACE;SIGN + true + pdbonly + AnyCPU + bin\Release\Common.Test.dll.CodeAnalysisLog.xml + true + GlobalSuppressions.cs + prompt + MinimumRecommendedRules.ruleset + ;$(ProgramFiles)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\Rule Sets + ;$(ProgramFiles)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\FxCop\Rules + true + MSSharedLibKey.snk + true + true + false + + + + False + ..\..\packages\Microsoft.Azure.Management.Resources.2.7.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll + True + + + False + ..\..\packages\Hydra.HttpRecorder.1.0.5417.13285-prerelease\lib\net45\Microsoft.Azure.Utilities.HttpRecorder.dll + + + ..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll + + + ..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll + + + ..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll + + + False + ..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll + + + False + ..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll + + + False + ..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + + False + ..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + ..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll + + + False + ..\..\packages\Microsoft.WindowsAzure.Management.2.1.0\lib\net40\Microsoft.WindowsAzure.Management.dll + + + False + ..\..\packages\Microsoft.WindowsAzure.Management.Compute.6.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll + + + False + ..\..\packages\Microsoft.WindowsAzure.Management.Storage.3.1.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll + + + False + ..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll + + + False + ..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll + + + False + ..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + + + + + + + + + False + ..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + ..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll + + + + + + + + False + ..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + True + Resources.resx + + + + + + {65c3a86a-716d-4e7d-ab67-1db00b3bf72d} + Commands.Common.Storage + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + {c60342b1-47d3-4a0e-8081-9b97ce60b7af} + Commands.Profile + + + + + PublicResXFileCodeGenerator + Designer + Resources.Designer.cs + + + + + + Designer + + + + + Designer + + + + + Designer + + + Designer + + + Designer + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Common/Commands.Common.Test/Common/AuthenticationFactoryTests.cs b/src/Common/Commands.Common.Test/Common/AuthenticationFactoryTests.cs new file mode 100644 index 000000000000..3dd6a921c807 --- /dev/null +++ b/src/Common/Commands.Common.Test/Common/AuthenticationFactoryTests.cs @@ -0,0 +1,65 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Xunit; +using System; +using Microsoft.WindowsAzure.Commands.Common.Factories; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.Authentication; +using Microsoft.WindowsAzure.Commands.Common.Models; + +namespace Microsoft.WindowsAzure.Commands.Common.Test.Common +{ + public class AuthenticationFactoryTests + { + [Fact] + public void VerifySubscriptionTokenCacheRemove() + { + var authFactory = new AuthenticationFactory + { + TokenProvider = new MockAccessTokenProvider("testtoken", "testuser") + }; + + var subscriptionId = Guid.NewGuid(); + + var credential = authFactory.GetSubscriptionCloudCredentials(new Models.AzureContext + { + Environment = AzureEnvironment.PublicEnvironments["AzureCloud"], + Account = new AzureAccount + { + Id = "testuser", + Type = AzureAccount.AccountType.User, + Properties = new Dictionary + { + { AzureAccount.Property.Tenants, "123" } + } + }, + Subscription = new AzureSubscription + { + Id = subscriptionId, + Properties = new Dictionary + { + { AzureSubscription.Property.Tenants, "123"} + } + } + + }); + + Assert.True(credential is AccessTokenCredential); + Assert.Equal(subscriptionId, new Guid(((AccessTokenCredential)credential).SubscriptionId)); + + } + } +} diff --git a/src/Common/Commands.Common.Test/Common/ConversionUtilitiesTests.cs b/src/Common/Commands.Common.Test/Common/ConversionUtilitiesTests.cs new file mode 100644 index 000000000000..ed098a0d1679 --- /dev/null +++ b/src/Common/Commands.Common.Test/Common/ConversionUtilitiesTests.cs @@ -0,0 +1,119 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.Common.Test +{ + public class ConversionUtilitiesTests + { + [Fact] + public void DeserializeJsonWorksForSimpleCases() + { + const string json1 = + @"{ + ""foo1"": ""bar1"", + ""foo2"": ""bar2"", + ""num"": 25, + ""address"": + { + ""streetAddress"": ""123 Main Str"", + ""city"": ""Some City"", + }, + ""list"": + [ + { + ""val1"": ""a"", + ""val2"": ""b"" + }, + { + ""val3"": ""c"", + ""val4"": ""d"" + } + ] + }"; + + Dictionary result; + result = JsonUtilities.DeserializeJson(json1); + Assert.NotNull(result); + Assert.Equal(5, result.Count); + Assert.Equal(2, ((Dictionary)result["address"]).Count); + Assert.Equal(2, ((List)result["list"]).Count); + } + + [Fact] + public void DeserializeJsonWorksForEmptyObjects() + { + const string json1 = + @"{ + ""foo1"": ""bar1"", + ""foo2"": ""bar2"", + ""num"": 25, + ""address"": + { }, + ""list"": + [ ] + }"; + + Dictionary result; + result = JsonUtilities.DeserializeJson(json1); + Assert.NotNull(result); + Assert.Equal(5, result.Count); + Assert.Equal(0, ((Dictionary)result["address"]).Count); + Assert.Equal(0, ((List)result["list"]).Count); + } + + [Fact] + public void DeserializeJsonAcceptsBadArguments() + { + Dictionary result; + result = JsonUtilities.DeserializeJson(null); + Assert.Null(result); + + result = JsonUtilities.DeserializeJson(string.Empty); + Assert.True(result.Count == 0); + } + + [Fact] + public void DeserializeJsonAcceptsBadJson() + { + const string json1 = + @"{ + ""foo1"": ""bar1"", + ""foo2"": ""bar2"", + ""num"": 25, + ""address"": + { + ""streetAddress"": ""123 Main Str"", + ""city"": ""Some City"", + }, + ""list"": + [ + { + ""val1"": ""a"", + ""val2"": ""b"" + }, + { + ""val3"": ""c"", + ""val4"": ""d"" + }"; + + Dictionary result; + result = JsonUtilities.DeserializeJson(json1); + Assert.Null(result); + } + } +} diff --git a/src/Common/Commands.Common.Test/Common/Data.cs b/src/Common/Commands.Common.Test/Common/Data.cs new file mode 100644 index 000000000000..d3199651a331 --- /dev/null +++ b/src/Common/Commands.Common.Test/Common/Data.cs @@ -0,0 +1,357 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.Common +{ + public static class Data + { + // To Do: + // Add invalid service/storage account name data: http://social.msdn.microsoft.com/Forums/en-US/windowsazuredevelopment/thread/75b05a42-cd3b-4ab8-aa26-dc8366ede115 + // Add invalid deployment name data + public static string Subscription1 = "Microsoft Azure Sandbox 9-220"; + public static string SampleSubscription1 = "Sample Subscription 1"; + + public static List ValidServiceNames { get; private set; } + public static List ValidSubscriptionName { get; private set; } + public static List ValidSubscriptionsData { get; private set; } + public static List ValidServiceRootNames { get; private set; } + public static List ValidDeploymentNames { get; private set; } + public static List ValidStorageNames { get; private set; } + public static List ValidPublishSettings { get; private set; } + public static List ValidPublishSettings2 { get; private set; } + public static List ValidRoleNames { get; private set; } + public static List ValidRoleInstances { get; private set; } + public static StorageServiceList ValidStorageService { get; private set; } + + public static List InvalidSubscriptionsData { get; private set; } + public static List InvalidLocations { get; private set; } + public static List InvalidSlots { get; private set; } + public static List InvalidPublishSettings { get; private set; } + public static List InvalidServiceNames { get; private set; } + public static List InvalidRoleNames { get; private set; } + public static List InvalidFileName { get; private set; } + public static List InvalidPaths { get; private set; } + public static List InvalidServiceRootName { get; private set; } + public static List InvalidRoleInstances { get; private set; } + + public static string AzureSdkAppDir { get; private set; } + public static string TestResultDirectory { get; private set; } + public static string AzureAppDir { get; private set; } + + public static string NodeWebRoleScaffoldingPath = Path.Combine(Resources.NodeScaffolding, RoleType.WebRole.ToString()); + public static string NodeWorkerRoleScaffoldingPath = Path.Combine(Resources.NodeScaffolding, RoleType.WorkerRole.ToString()); + public static string PHPWebRoleScaffoldingPath = Path.Combine(Resources.PHPScaffolding, RoleType.WebRole.ToString()); + public static string PHPWorkerRoleScaffoldingPath = Path.Combine(Resources.PHPScaffolding, RoleType.WorkerRole.ToString()); + + static Data() + { + AzureAppDir = Path.Combine(Directory.GetCurrentDirectory(), Resources.AzureDirectoryName); + AzureSdkAppDir = Path.Combine(Directory.GetCurrentDirectory(), "Microsoft Azure PowerShell"); + TestResultDirectory = FileUtilities.GetAssemblyDirectory(); + + ValidServiceNames = new List(); + InitializeValidServiceNameData(); + + ValidSubscriptionName = new List(); + InitializeValidSubscriptionNameData(); + + ValidServiceRootNames = new List(); + InitializeValidServiceRootNameData(); + + ValidDeploymentNames = new List(); + InitializeValidDeploymentNameData(); + + ValidStorageNames = new List(); + InitializeValidStorageNameData(); + + ValidPublishSettings = new List(); + InitializeValidPublishSettingsData(); + + ValidPublishSettings2 = new List(); + InitializeValidPublishSettings2Data(); + + ValidSubscriptionsData = new List(); + InitializeValidSubscriptionsData(); + + ValidRoleNames = new List(); + InitializeValidRoleNameData(); + + ValidRoleInstances = new List(); + InitializeValidRoleInstancesData(); + + ValidStorageService = new StorageServiceList(); + InitializeValidStorageServiceData(); + + InvalidServiceRootName = new List(); + InitializeInvalidServiceRootNameData(); + + InvalidPublishSettings = new List(); + InitializeInvalidPublishSettingsData(); + + InvalidLocations = new List(); + InitializeInvalidLocationData(); + + InvalidSlots = new List(); + InitializeInvalidSlotData(); + + InvalidServiceNames = new List(); + InitializeInvalidServiceNameData(); + + InvalidRoleInstances = new List(); + InitializeInvalidRoleInstancesData(); + + InvalidFileName = new List(); + InitializeInvalidFileNameData(); + + InvalidPaths = new List(); + InitializeInvalidPathData(); + + InvalidSubscriptionsData = new List(); + InitializeInvalidSubscriptionsData(); + + InvalidRoleNames = new List(); + InitializeInvalidRoleNameData(); + } + + private static void InitializeValidStorageServiceData() + { + StorageService myStore = new StorageService(); + myStore.ServiceName = "mystore"; + myStore.StorageServiceKeys = new StorageServiceKeys(); + myStore.StorageServiceKeys.Primary = "=132321982cddsdsa"; + myStore.StorageServiceKeys.Secondary = "=w8uidjew4378891289"; + myStore.StorageServiceProperties = new StorageServiceProperties(); + myStore.StorageServiceProperties.Location = "North Central US"; + myStore.StorageServiceProperties.Status = "Created"; + ValidStorageService.Add(myStore); + + StorageService testStore = new StorageService(); + testStore.ServiceName = "teststore"; + testStore.StorageServiceKeys = new StorageServiceKeys(); + testStore.StorageServiceKeys.Primary = "=/se23ew2343221"; + testStore.StorageServiceKeys.Secondary = "==0--3210-//121313233290sd"; + testStore.StorageServiceProperties = new StorageServiceProperties(); + testStore.StorageServiceProperties.Location = "East Asia"; + testStore.StorageServiceProperties.Status = "Creating"; + ValidStorageService.Add(testStore); + + StorageService MyCompanyStore = new StorageService(); + MyCompanyStore.ServiceName = "mycompanystore"; + MyCompanyStore.StorageServiceKeys = new StorageServiceKeys(); + MyCompanyStore.StorageServiceKeys.Primary = "121/21dssdsds="; + MyCompanyStore.StorageServiceKeys.Secondary = "023432dfelfema1="; + MyCompanyStore.StorageServiceProperties = new StorageServiceProperties(); + MyCompanyStore.StorageServiceProperties.Location = "North Europe"; + MyCompanyStore.StorageServiceProperties.Status = "Suspending"; + ValidStorageService.Add(MyCompanyStore); + } + + private static void InitializeInvalidPathData() + { + foreach (string invalidFolderName in InvalidServiceRootName) + { + InvalidPaths.Add(string.Format("{0}\\{1}", Directory.GetCurrentDirectory(), invalidFolderName)); + } + } + + private static void InitializeInvalidFileNameData() + { + char[] invalidFileNameChars = System.IO.Path.GetInvalidFileNameChars(); + + // Validations that depend on Path.GetFileName fails with these characters. For example: + // if user entered name for WebRole as "My/WebRole", then Path.GetFileName get file name as WebRole. + // + char[] ignoreSet = { ':', '\\', '/' }; + + for (int i = 0, j = 0; i < invalidFileNameChars.Length; i++, j++) + { + if (ignoreSet.Contains(invalidFileNameChars[i])) + { + continue; + } + j %= ValidServiceRootNames.Count - 1; + StringBuilder invalidFile = new StringBuilder(ValidServiceRootNames[j]); + invalidFile[invalidFile.Length / 2] = invalidFileNameChars[i]; + InvalidFileName.Add(invalidFile.ToString()); + } + } + + private static void InitializeInvalidRoleInstancesData() + { + InvalidRoleInstances.Add(-1); + InvalidRoleInstances.Add(-10); + InvalidRoleInstances.Add(21); + InvalidRoleInstances.Add(100); + } + + private static void InitializeValidRoleInstancesData() + { + ValidRoleInstances.Add(1); + ValidRoleInstances.Add(2); + ValidRoleInstances.Add(10); + ValidRoleInstances.Add(20); + } + + private static void InitializeInvalidRoleNameData() + { + InvalidRoleNames.AddRange(InvalidServiceRootName); + } + + private static void InitializeValidRoleNameData() + { + ValidRoleNames.Add("WebRole1"); + ValidRoleNames.Add("MyWebRole"); + ValidRoleNames.Add("WorkerRole"); + ValidRoleNames.Add("Node_WebRole"); + } + + private static void InitializeInvalidSlotData() + { + InvalidSlots.Add(string.Empty); + InvalidSlots.Add(null); + InvalidSlots.Add("Praduction"); + InvalidSlots.Add("Pddqdww"); + InvalidSlots.Add("Stagging"); + InvalidSlots.Add("Sagiang"); + } + + private static void InitializeInvalidLocationData() + { + InvalidLocations.Add(string.Empty); + InvalidLocations.Add(null); + InvalidLocations.Add("My Home"); + InvalidLocations.Add("AnywhereUS"); + InvalidLocations.Add("USA"); + InvalidLocations.Add("Microsoft"); + InvalidLocations.Add("Near"); + InvalidLocations.Add("Anywhere Africa"); + InvalidLocations.Add("Anywhhere US"); + } + + private static void InitializeInvalidPublishSettingsData() + { + InvalidPublishSettings.Add(Testing.GetTestResourcePath("InvalidProfile.PublishSettings")); + } + + private static void InitializeValidPublishSettingsData() + { + ValidPublishSettings.Add(Testing.GetTestResourcePath("ValidProfile.PublishSettings")); + } + + private static void InitializeValidPublishSettings2Data() + { + ValidPublishSettings2.Add(Testing.GetTestResourcePath("ValidProfile2.PublishSettings")); + } + + /// + /// This method must run after InitializeServiceRootNameData() + /// + private static void InitializeInvalidServiceRootNameData() + { + char[] invalidPathNameChars = Path.GetInvalidPathChars(); + + for (int i = 0, j = 0; i < invalidPathNameChars.Length; i++) + { + StringBuilder invalidPath = new StringBuilder(ValidServiceRootNames[j]); + invalidPath[invalidPath.Length / 2] = invalidPathNameChars[i]; + j %= ValidServiceRootNames.Count; + InvalidServiceRootName.Add(invalidPath.ToString()); + } + } + + private static void InitializeValidStorageNameData() + { + ValidStorageNames.AddRange(ValidServiceNames); + } + + private static void InitializeValidDeploymentNameData() + { + ValidDeploymentNames.Add("MyDeployment"); + ValidDeploymentNames.Add("Storage deployment"); + ValidDeploymentNames.Add("_deployment name"); + ValidDeploymentNames.Add("deploy service1"); + } + + private static void InitializeValidSubscriptionNameData() + { + ValidSubscriptionName.Add("mysub1"); + ValidSubscriptionName.Add("mysub2"); + ValidSubscriptionName.Add(Data.Subscription1); + ValidSubscriptionName.Add(Data.SampleSubscription1); + ValidSubscriptionName.Add("TestSubscription1"); + ValidSubscriptionName.Add("TestSubscription2"); + } + + private static void InitializeValidServiceNameData() + { + ValidServiceNames.Add("HelloNode"); + ValidServiceNames.Add("node.jsservice"); + ValidServiceNames.Add("node_js_service"); + ValidServiceNames.Add("node-js-service"); + ValidServiceNames.Add("node-js-service123"); + ValidServiceNames.Add("123node-js-service123"); + ValidServiceNames.Add("123node-js2service"); + } + + private static void InitializeInvalidServiceNameData() + { + InvalidServiceNames.Add("Hello\\Node"); + InvalidServiceNames.Add("Hello/Node"); + InvalidServiceNames.Add("Node App Sample"); + InvalidServiceNames.Add("My$app"); + InvalidServiceNames.Add("My@app"); + InvalidServiceNames.Add("My#app"); + InvalidServiceNames.Add("My%app"); + InvalidServiceNames.Add("My^app"); + InvalidServiceNames.Add("My&app"); + InvalidServiceNames.Add("My*app"); + InvalidServiceNames.Add("My+app"); + InvalidServiceNames.Add("My=app"); + InvalidServiceNames.Add("My{app"); + InvalidServiceNames.Add("My}app"); + InvalidServiceNames.Add("My(app"); + InvalidServiceNames.Add("My)app"); + InvalidServiceNames.Add("My[app"); + InvalidServiceNames.Add("My]app"); + InvalidServiceNames.Add("My|app"); + InvalidServiceNames.Add("-MyDomain"); + InvalidServiceNames.Add("MyDomain-"); + InvalidServiceNames.Add("-MyDomain-"); + InvalidServiceNames.Add(new string('a', 64)); + } + + private static void InitializeValidServiceRootNameData() + { + ValidServiceRootNames.AddRange(ValidServiceNames); + } + + private static void InitializeValidSubscriptionsData() + { + ValidSubscriptionsData.Add(Testing.GetTestResourcePath("subscriptions.xml")); + } + + private static void InitializeInvalidSubscriptionsData() + { + InvalidSubscriptionsData.Add(Testing.GetTestResourcePath("invalidsubscriptions.xml")); + } + } +} \ No newline at end of file diff --git a/src/Common/Commands.Common.Test/Common/DirStack.cs b/src/Common/Commands.Common.Test/Common/DirStack.cs new file mode 100644 index 000000000000..4731e5658ae4 --- /dev/null +++ b/src/Common/Commands.Common.Test/Common/DirStack.cs @@ -0,0 +1,39 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.Common +{ + /// + /// A little helper object to do the equivalent of + /// pushd/popd in C# code + /// + public sealed class DirStack : IDisposable + { + private readonly string originalDirectory; + + public DirStack(string newDir) + { + originalDirectory = Directory.GetCurrentDirectory(); + Directory.SetCurrentDirectory(newDir); + } + + public void Dispose() + { + Directory.SetCurrentDirectory(originalDirectory); + } + } +} \ No newline at end of file diff --git a/src/Common/Commands.Common.Test/Common/EmbeddedFileWriter.cs b/src/Common/Commands.Common.Test/Common/EmbeddedFileWriter.cs new file mode 100644 index 000000000000..647f9c4223c8 --- /dev/null +++ b/src/Common/Commands.Common.Test/Common/EmbeddedFileWriter.cs @@ -0,0 +1,76 @@ +// ---------------------------------------------------------------------------------- +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.Common +{ + /// + /// A helper class to pull files out of embedded resources and drop them + /// onto disk. Helps ensure that needed files are present without having + /// to use MSTest's unreliable deployment items. + /// + public static class EmbeddedFileWriter + { + /// + /// Copy a resource to a disk file. + /// + /// Type used to locate the assembly and namespace of the embedded resource. + /// Name of the embedded resource file. + /// Path to write to. + /// True if written, false if the file already exists. + public static bool WriteResourceToDisk(string resourceName, string filePath) + { + if (File.Exists(filePath)) + { + return false; + } + using (Stream resourceStream = GetResourceStream(resourceName)) + { + WriteToDisk(filePath, resourceStream); + return true; + } + } + + private static Stream GetResourceStream(string resourceName) + { + string resourcePath = string.Format("{0}.{1}", GetResourceNamespace(), resourceName); + var resourceAssembly = typeof (TResourceLocator).Assembly; + return resourceAssembly.GetManifestResourceStream(resourcePath); + } + + private static string GetResourceNamespace() + { + return typeof (TResourceLocator).Namespace; + } + + private static void WriteToDisk(string filePath, Stream resourceStream) + { + EnsureDirectoryExists(Path.GetDirectoryName(filePath)); + using (Stream outputStream = new FileStream(filePath, FileMode.Create, FileAccess.Write)) + { + resourceStream.CopyTo(outputStream); + } + } + + private static void EnsureDirectoryExists(string directoryPath) + { + if (Directory.Exists(directoryPath)) + { + return; + } + EnsureDirectoryExists(Path.GetDirectoryName(directoryPath)); + Directory.CreateDirectory(directoryPath); + } + } +} diff --git a/src/Common/Commands.Common.Test/Common/GeneralTests.cs b/src/Common/Commands.Common.Test/Common/GeneralTests.cs new file mode 100644 index 000000000000..91f4cf38197c --- /dev/null +++ b/src/Common/Commands.Common.Test/Common/GeneralTests.cs @@ -0,0 +1,49 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.Common.Test.Common +{ + public class GeneralTests + { + [Fact] + public void IsValidDirectoryPathReturnsTrueForExistingFolders() + { + Assert.True(FileUtilities.IsValidDirectoryPath(Path.GetTempPath())); + Assert.True(FileUtilities.IsValidDirectoryPath(Directory.GetCurrentDirectory())); + Assert.True(FileUtilities.IsValidDirectoryPath("C:\\")); + } + + [Fact] + public void IsValidDirectoryPathReturnsFalseForFilePaths() + { + Assert.False(FileUtilities.IsValidDirectoryPath(Path.GetTempPath() + "\\file.tst")); + Assert.False(FileUtilities.IsValidDirectoryPath(Path.GetTempPath() + "\\" + Guid.NewGuid() + "\\file.tst")); + Assert.False(FileUtilities.IsValidDirectoryPath("C:\\file.tst")); + } + + [Fact] + public void IsValidDirectoryPathReturnsFalseForNonExistingFolders() + { + Assert.False(FileUtilities.IsValidDirectoryPath("")); + Assert.False(FileUtilities.IsValidDirectoryPath(null)); + Assert.False(FileUtilities.IsValidDirectoryPath(Path.GetTempPath() + "\\" + Guid.NewGuid())); + Assert.False(FileUtilities.IsValidDirectoryPath("XYZ:\\")); + } + } +} diff --git a/src/Common/Commands.Common.Test/Common/GeneralUtilitiesTests.cs b/src/Common/Commands.Common.Test/Common/GeneralUtilitiesTests.cs new file mode 100644 index 000000000000..0f150f3fcb84 --- /dev/null +++ b/src/Common/Commands.Common.Test/Common/GeneralUtilitiesTests.cs @@ -0,0 +1,71 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.Common.Test +{ + public class PowerShellUtilitiesTests + { + [Fact] + public void AddsModulePathToUserPSModulePath() + { + string originalPSModulePath = Environment.GetEnvironmentVariable(PowerShellUtilities.PSModulePathName); + + try + { + string modulePath = "C:\\ExampleTest\\MyModule.psd1"; + string expected = originalPSModulePath + ";" + modulePath; + PowerShellUtilities.AddModuleToPSModulePath(modulePath); + string actual = Environment.GetEnvironmentVariable(PowerShellUtilities.PSModulePathName); + Assert.Equal(expected, actual); + } + finally + { + Environment.SetEnvironmentVariable(PowerShellUtilities.PSModulePathName, originalPSModulePath); + } + } + + [Fact] + public void RemovesModulePathFromUserPSModulePath() + { + string originalPSModulePath = Environment.GetEnvironmentVariable(PowerShellUtilities.PSModulePathName); + + string[] modulePaths = originalPSModulePath.Split(';'); + string modulePath = modulePaths[modulePaths.Length - 1]; + string expected = null; + string actual; + + try + { + if (modulePaths.Length > 1) + { + expected = string.Join(";", modulePaths, 0, modulePaths.Length - 1); + } + + PowerShellUtilities.RemoveModuleFromPSModulePath(modulePath); + actual = Environment.GetEnvironmentVariable(PowerShellUtilities.PSModulePathName); + Assert.Equal(expected, actual); + } + finally + { + Environment.SetEnvironmentVariable(PowerShellUtilities.PSModulePathName, originalPSModulePath); + } + + Assert.Equal(expected, actual); + } + } +} diff --git a/src/Common/Commands.Common.Test/Common/IdnUtilitiesTests.cs b/src/Common/Commands.Common.Test/Common/IdnUtilitiesTests.cs new file mode 100644 index 000000000000..ad89499fec27 --- /dev/null +++ b/src/Common/Commands.Common.Test/Common/IdnUtilitiesTests.cs @@ -0,0 +1,198 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.Common.Test +{ + public class IdnUtilitiesTests + { + private static string[] unicodeStrings = { null, + "", + "测试工具", + "prefix测试工具", + "测试工具suffix", + "prefix测试工具suffix", + "prefix.测试工具", + "测试工具.suffix", + "prefix.测试工具.suffix", + "前缀.测试工具.后缀", + "前缀.测试工具", + "测试工具.后缀" + }; + + private static string[] punycodeStrings = { null, + "", + "xn--h6qv61a43lrx3a", + "xn--prefix-up2j943fwv5az27d", + "xn--suffix-op2j943fwv5az27d", + "xn--prefixsuffix-173t950lojyc7d6f", + "prefix.xn--h6qv61a43lrx3a", + "xn--h6qv61a43lrx3a.suffix", + "prefix.xn--h6qv61a43lrx3a.suffix", + "xn--ldrr30i.xn--h6qv61a43lrx3a.xn--fqr621h", + "xn--ldrr30i.xn--h6qv61a43lrx3a", + "xn--h6qv61a43lrx3a.xn--fqr621h" + }; + + private static string[] unicodeUserStrings = { null, + "", + "用户名", + "prefix用户名", + "用户名suffix", + "prefix用户名suffix", + "prefix.用户名", + "用户名.suffix", + "prefix.用户名.suffix", + "前缀.用户名.后缀", + "前缀.用户名", + "用户名.后缀", + "prefix+用户名", + "用户名+suffix", + "prefix+用户名.suffix", + "前缀+用户名+后缀", + "前缀+用户名", + "用户名+后缀", + "prefix-用户名", + "用户名-suffix", + "prefix-用户名-suffix", + "前缀-用户名-后缀", + "前缀-用户名", + "用户名-后缀" + }; + + private static string[] punycodeUserStrings = { null, + "", + "xn--eqr924avxo", + "xn--prefix-8h6jw94g4v9a", + "xn--suffix-2h6jw94g4v9a", + "xn--prefixsuffix-x80uj25men7c", + "prefix.xn--eqr924avxo", + "xn--eqr924avxo.suffix", + "prefix.xn--eqr924avxo.suffix", + "xn--ldrr30i.xn--eqr924avxo.xn--fqr621h", + "xn--ldrr30i.xn--eqr924avxo", + "xn--eqr924avxo.xn--fqr621h", + "xn--prefix+-ey3lv66hou3b", + "xn--+suffix-6x3lv66hou3b", + "xn--prefix+-ey3lv66hou3b.suffix", + "xn--++-7j5cl0ega168s1j4a7pqga", + "xn--+-wg8au7cnw2aykw7pn", + "xn--+-i68ae116lykweqn", + "xn--prefix--ey3lv66hou3b", + "xn---suffix-6x3lv66hou3b", + "xn--prefix--suffix-655xu17nhkzd", + "xn-----7j5cl0ega168s1j4a7pqga", + "xn----wg8au7cnw2aykw7pn", + "xn----i68ae116lykweqn" + }; + + [Fact] + public void UnicodeToPunycodeConversionTest() + { + Assert.Equal(unicodeStrings.Length, punycodeStrings.Length); + Assert.Equal(unicodeUserStrings.Length, punycodeUserStrings.Length); + + // Test straight Unicode to Punycode conversion. + for (int i = 0; i < unicodeStrings.Length; i++) + { + Assert.Equal(IdnHelper.GetAscii(unicodeStrings[i]), punycodeStrings[i]); + } + + // Test Unicode to Punycode conversion for user names. + for (int i = 0; i < unicodeUserStrings.Length; i++) + { + Assert.Equal(IdnHelper.GetAsciiForUserName(unicodeUserStrings[i]), punycodeUserStrings[i]); + } + + // Test user names that start with the $ sign. + for (int i = 0; i < unicodeUserStrings.Length; i++) + { + Assert.Equal(IdnHelper.GetAsciiForUserName("$" + unicodeUserStrings[i]), "$" + punycodeUserStrings[i]); + } + + // Test user names in the email address format that has the @ sign in the middle. + for (int i = 0; i < unicodeUserStrings.Length; i++) + { + // Skip null or empty strings. + if (string.IsNullOrEmpty(unicodeUserStrings[i])) + { + continue; + } + + for (int j = 0; j < unicodeStrings.Length; j++) + { + // Skip null or empty strings. + if (string.IsNullOrEmpty(unicodeStrings[j])) + { + continue; + } + + string ustring = unicodeUserStrings[i] + "@" + unicodeStrings[j]; + string pstring = punycodeUserStrings[i] + "@" + punycodeStrings[j]; + Assert.Equal(IdnHelper.GetAsciiForUserName(ustring), pstring); + } + } + } + + [Fact] + public void PunycodeToUnicodeConversionTest() + { + Assert.Equal(punycodeStrings.Length, unicodeStrings.Length); + Assert.Equal(punycodeUserStrings.Length, unicodeUserStrings.Length); + + // Test straight Punycode to Unicode conversion. + for (int i = 0; i < punycodeStrings.Length; i++) + { + Assert.Equal(IdnHelper.GetUnicode(punycodeStrings[i]), unicodeStrings[i]); + } + + // Test Punycode to Unicode conversion for user names. + for (int i = 0; i < punycodeUserStrings.Length; i++) + { + Assert.Equal(IdnHelper.GetUnicodeForUserName(punycodeUserStrings[i]), unicodeUserStrings[i]); + } + + // Test user names that start with the $ sign. + for (int i = 0; i < punycodeUserStrings.Length; i++) + { + Assert.Equal(IdnHelper.GetUnicodeForUserName("$" + punycodeUserStrings[i]), "$" + unicodeUserStrings[i]); + } + + // Test user names in the email address format that has the @ sign in the middle. + for (int i = 0; i < punycodeUserStrings.Length; i++) + { + // Skip null or empty strings. + if (string.IsNullOrEmpty(punycodeUserStrings[i])) + { + continue; + } + + for (int j = 0; j < punycodeStrings.Length; j++) + { + // Skip null or empty strings. + if (string.IsNullOrEmpty(punycodeStrings[j])) + { + continue; + } + + string pstring = punycodeUserStrings[i] + "@" + punycodeStrings[j]; + string ustring = unicodeUserStrings[i] + "@" + unicodeStrings[j]; + Assert.Equal(IdnHelper.GetUnicodeForUserName(pstring), ustring); + } + } + } + } +} diff --git a/src/Common/Commands.Common.Test/Common/JsonUtilitiesTests.cs b/src/Common/Commands.Common.Test/Common/JsonUtilitiesTests.cs new file mode 100644 index 000000000000..e2dfd02e0a3c --- /dev/null +++ b/src/Common/Commands.Common.Test/Common/JsonUtilitiesTests.cs @@ -0,0 +1,295 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization.Formatters; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.Common.Test.Common +{ + public class JsonUtilitiesTests + { + [Fact] + public void PatchWorksWithStandardStructures() + { + var originalProperties = new Dictionary + { + {"name", "site1"}, + {"siteMode", "Standard"}, + {"computeMode", "Dedicated"}, + {"list", new [] {1,2,3}}, + {"misc", new Dictionary + { + {"key1", "value1"}, + {"key2", "value2"} + }}}; + + var originalPropertiesSerialized = JsonConvert.SerializeObject(originalProperties, new JsonSerializerSettings + { + TypeNameAssemblyFormat = FormatterAssemblyStyle.Simple, + TypeNameHandling = TypeNameHandling.None + }); + + var patchProperties = new Dictionary + { + {"siteMode", "Dedicated"}, + {"newMode", "NewValue"}, + {"list", new [] {4,5,6}}, + {"misc", new Dictionary + { + {"key3", "value3"} + }}}; + + var patchPropertiesSerialized = JsonConvert.SerializeObject(patchProperties, new JsonSerializerSettings + { + TypeNameAssemblyFormat = FormatterAssemblyStyle.Simple, + TypeNameHandling = TypeNameHandling.None + }); + + JToken actualJson = JToken.Parse(JsonUtilities.Patch(originalPropertiesSerialized, patchPropertiesSerialized)); + + Assert.Equal("site1", actualJson["name"].ToObject()); + Assert.Equal("Dedicated", actualJson["siteMode"].ToObject()); + Assert.Equal("Dedicated", actualJson["computeMode"].ToObject()); + Assert.Equal("NewValue", actualJson["newMode"].ToObject()); + Assert.Equal("[4,5,6]", actualJson["list"].ToString(Formatting.None)); + Assert.Equal("value1", actualJson["misc"]["key1"].ToObject()); + Assert.Equal("value2", actualJson["misc"]["key2"].ToObject()); + Assert.Equal("value3", actualJson["misc"]["key3"].ToObject()); + } + + [Fact] + public void PatchWorksWithListInRoot() + { + var originalProperties = new[] {1, 2, 3}; + + var originalPropertiesSerialized = JsonConvert.SerializeObject(originalProperties, new JsonSerializerSettings + { + TypeNameAssemblyFormat = FormatterAssemblyStyle.Simple, + TypeNameHandling = TypeNameHandling.None + }); + + var patchProperties = new[] {4, 5, 6}; + + var patchPropertiesSerialized = JsonConvert.SerializeObject(patchProperties, new JsonSerializerSettings + { + TypeNameAssemblyFormat = FormatterAssemblyStyle.Simple, + TypeNameHandling = TypeNameHandling.None + }); + + var actual = JsonUtilities.Patch(originalPropertiesSerialized, patchPropertiesSerialized); + + Assert.Equal("[4,5,6]", actual); + } + + [Fact] + public void PatchWorksWithValueInRoot() + { + var originalProperties = "foo"; + + var originalPropertiesSerialized = JsonConvert.SerializeObject(originalProperties, new JsonSerializerSettings + { + TypeNameAssemblyFormat = FormatterAssemblyStyle.Simple, + TypeNameHandling = TypeNameHandling.None + }); + + var patchProperties = "bar"; + + var patchPropertiesSerialized = JsonConvert.SerializeObject(patchProperties, new JsonSerializerSettings + { + TypeNameAssemblyFormat = FormatterAssemblyStyle.Simple, + TypeNameHandling = TypeNameHandling.None + }); + + var actual = JsonUtilities.Patch(originalPropertiesSerialized, patchPropertiesSerialized); + + Assert.Equal("\"bar\"", actual); + } + + [Fact] + public void PatchWorksWithMismatchInRoot() + { + var originalProperties = new Dictionary + { + {"name", "site1"}, + {"siteMode", "Standard"}, + {"computeMode", "Dedicated"}, + {"list", new [] {1,2,3}}, + {"misc", new Dictionary + { + {"key1", "value1"}, + {"key2", "value2"} + }}}; + + var originalPropertiesSerialized = JsonConvert.SerializeObject(originalProperties, new JsonSerializerSettings + { + TypeNameAssemblyFormat = FormatterAssemblyStyle.Simple, + TypeNameHandling = TypeNameHandling.None + }); + + var patchProperties = "bar"; + + var patchPropertiesSerialized = JsonConvert.SerializeObject(patchProperties, new JsonSerializerSettings + { + TypeNameAssemblyFormat = FormatterAssemblyStyle.Simple, + TypeNameHandling = TypeNameHandling.None + }); + + Assert.Throws(() => JsonUtilities.Patch(originalPropertiesSerialized, patchPropertiesSerialized)); + } + + [Fact] + public void PatchWorksWithMismatchInBody() + { + var originalProperties = new Dictionary + { + {"name", "site1"}, + {"siteMode", "Standard"}, + {"computeMode", "Dedicated"}, + {"list", new [] {1,2,3}}, + {"misc", new Dictionary + { + {"key1", "value1"}, + {"key2", "value2"} + }}}; + + var originalPropertiesSerialized = JsonConvert.SerializeObject(originalProperties, new JsonSerializerSettings + { + TypeNameAssemblyFormat = FormatterAssemblyStyle.Simple, + TypeNameHandling = TypeNameHandling.None + }); + + var patchProperties = new Dictionary + { + {"siteMode", "Dedicated"}, + {"list", "foo"}, + {"misc", new Dictionary + { + {"key3", "value3"} + }}}; + + var patchPropertiesSerialized = JsonConvert.SerializeObject(patchProperties, new JsonSerializerSettings + { + TypeNameAssemblyFormat = FormatterAssemblyStyle.Simple, + TypeNameHandling = TypeNameHandling.None + }); + + Assert.Throws(() => JToken.Parse(JsonUtilities.Patch(originalPropertiesSerialized, patchPropertiesSerialized))); + } + + [Fact] + public void PatchWorksWithEmptyPatchValue() + { + var originalProperties = new Dictionary + { + {"name", "site1"}, + {"siteMode", "Standard"}, + {"computeMode", "Dedicated"}, + {"list", new [] {1,2,3}}, + {"misc", new Dictionary + { + {"key1", "value1"}, + {"key2", "value2"} + }}}; + + var originalPropertiesSerialized = JsonConvert.SerializeObject(originalProperties, new JsonSerializerSettings + { + TypeNameAssemblyFormat = FormatterAssemblyStyle.Simple, + TypeNameHandling = TypeNameHandling.None + }); + + var actual = JsonUtilities.Patch(originalPropertiesSerialized, ""); + + Assert.Equal(originalPropertiesSerialized, actual); + } + + [Fact] + public void PatchWorksWithNullPatchValue() + { + var originalProperties = new Dictionary + { + {"name", "site1"}, + {"siteMode", "Standard"}, + {"computeMode", "Dedicated"}, + {"list", new [] {1,2,3}}, + {"misc", new Dictionary + { + {"key1", "value1"}, + {"key2", "value2"} + }}}; + + var originalPropertiesSerialized = JsonConvert.SerializeObject(originalProperties, new JsonSerializerSettings + { + TypeNameAssemblyFormat = FormatterAssemblyStyle.Simple, + TypeNameHandling = TypeNameHandling.None + }); + + var actual = JsonUtilities.Patch(originalPropertiesSerialized, null); + + Assert.Equal(originalPropertiesSerialized, actual); + } + + [Fact] + public void PatchWorksWithEmptySourceValue() + { + var patchProperties = new Dictionary + { + {"siteMode", "Dedicated"}, + {"newMode", "NewValue"}, + {"list", new [] {4,5,6}}, + {"misc", new Dictionary + { + {"key3", "value3"} + }}}; + + var patchPropertiesSerialized = JsonConvert.SerializeObject(patchProperties, new JsonSerializerSettings + { + TypeNameAssemblyFormat = FormatterAssemblyStyle.Simple, + TypeNameHandling = TypeNameHandling.None + }); + + var actual = JsonUtilities.Patch("", patchPropertiesSerialized); + + Assert.Equal(patchPropertiesSerialized, actual); + } + + [Fact] + public void PatchWorksWithNullSourceValue() + { + var patchProperties = new Dictionary + { + {"siteMode", "Dedicated"}, + {"newMode", "NewValue"}, + {"list", new [] {4,5,6}}, + {"misc", new Dictionary + { + {"key3", "value3"} + }}}; + + var patchPropertiesSerialized = JsonConvert.SerializeObject(patchProperties, new JsonSerializerSettings + { + TypeNameAssemblyFormat = FormatterAssemblyStyle.Simple, + TypeNameHandling = TypeNameHandling.None + }); + + var actual = JsonUtilities.Patch("", patchPropertiesSerialized); + + Assert.Equal(patchPropertiesSerialized, actual); + } + } +} diff --git a/src/Common/Commands.Common.Test/Common/PSObjectExtensions.cs b/src/Common/Commands.Common.Test/Common/PSObjectExtensions.cs new file mode 100644 index 000000000000..b03a9c3a8b13 --- /dev/null +++ b/src/Common/Commands.Common.Test/Common/PSObjectExtensions.cs @@ -0,0 +1,33 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.Common +{ + public static class PSObjectExtensions + { + /// + /// Gets the value of specific property for the given PSObject. + /// + /// The return value type + /// The powershell obbject + /// The property name + /// The property value + public static T GetVariableValue(this PSObject psobject, string name) + { + return (T)psobject.Members[name].Value; + } + } +} diff --git a/src/Common/Commands.Common.Test/Common/ProfileClientTests.cs b/src/Common/Commands.Common.Test/Common/ProfileClientTests.cs new file mode 100644 index 000000000000..f16bd866e80b --- /dev/null +++ b/src/Common/Commands.Common.Test/Common/ProfileClientTests.cs @@ -0,0 +1,1468 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Profile; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.Authentication; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.Common.Test.Common +{ + public class ProfileClientTests + { + private string oldProfileData; + private string oldProfileDataBadSubscription; + private string oldProfileDataCorruptedFile; + private string oldProfileDataPath; + private string oldProfileDataPathError; + private string newProfileDataPath; + private string jsonProfileWithoutAccount; + private string jsonProfileWithBadData; + private string defaultSubscription = "06E3F6FD-A3AA-439A-8FC4-1F5C41D2AD1F"; + private WindowsAzure.Subscriptions.Models.SubscriptionListOperationResponse.Subscription rdfeSubscription1; + private WindowsAzure.Subscriptions.Models.SubscriptionListOperationResponse.Subscription rdfeSubscription2; + private Azure.Subscriptions.Models.Subscription csmSubscription1; + private Azure.Subscriptions.Models.Subscription csmSubscription1withDuplicateId; + private Azure.Subscriptions.Models.Subscription csmSubscription2; + private AzureSubscription azureSubscription1; + private AzureSubscription azureSubscription2; + private AzureSubscription azureSubscription3withoutUser; + private AzureEnvironment azureEnvironment; + private AzureAccount azureAccount; + + public ProfileClientTests() + { + SetMockData(); + AzureSession.SetCurrentContext(null, null, null); + } + + [Fact] + public void ProfileGetsCreatedWithNonExistingFile() + { + ProfileClient.DataStore = new MockDataStore(); + ProfileClient client = new ProfileClient(); + } + + [Fact] + public void ProfileMigratesOldData() + { + MockDataStore dataStore = new MockDataStore(); + dataStore.VirtualStore[oldProfileDataPath] = oldProfileData; + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + + Assert.False(dataStore.FileExists(oldProfileDataPath)); + Assert.True(dataStore.FileExists(newProfileDataPath)); + } + + [Fact] + public void ProfileMigratesOldDataOnce() + { + MockDataStore dataStore = new MockDataStore(); + dataStore.VirtualStore[oldProfileDataPath] = oldProfileData; + ProfileClient.DataStore = dataStore; + ProfileClient client1 = new ProfileClient(); + + Assert.False(dataStore.FileExists(oldProfileDataPath)); + Assert.True(dataStore.FileExists(newProfileDataPath)); + + ProfileClient client2 = new ProfileClient(); + + Assert.False(dataStore.FileExists(oldProfileDataPath)); + Assert.True(dataStore.FileExists(newProfileDataPath)); + } + + [Fact] + public void ProfileMigratesAccountsAndDefaultSubscriptions() + { + MockDataStore dataStore = new MockDataStore(); + dataStore.VirtualStore[oldProfileDataPath] = oldProfileData; + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + + // Verify Environment migration + Assert.Equal(4, client.Profile.Environments.Count); + Assert.Equal("Current", client.Profile.Environments["Current"].Name); + Assert.Equal("Dogfood", client.Profile.Environments["Dogfood"].Name); + Assert.Equal("https://login.windows-ppe.net/", client.Profile.Environments["Dogfood"].Endpoints[AzureEnvironment.Endpoint.AdTenant]); + Assert.Equal("https://management.core.windows.net/", client.Profile.Environments["Dogfood"].Endpoints[AzureEnvironment.Endpoint.ActiveDirectoryServiceEndpointResourceId]); + Assert.Equal("https://df.gallery.azure-test.net", client.Profile.Environments["Dogfood"].Endpoints[AzureEnvironment.Endpoint.Gallery]); + Assert.Equal("https://windows.azure-test.net", client.Profile.Environments["Dogfood"].Endpoints[AzureEnvironment.Endpoint.ManagementPortalUrl]); + Assert.Equal("https://auxnext.windows.azure-test.net/publishsettings/index", client.Profile.Environments["Dogfood"].Endpoints[AzureEnvironment.Endpoint.PublishSettingsFileUrl]); + Assert.Equal("https://api-dogfood.resources.windows-int.net", client.Profile.Environments["Dogfood"].Endpoints[AzureEnvironment.Endpoint.ResourceManager]); + Assert.Equal("https://management-preview.core.windows-int.net/", client.Profile.Environments["Dogfood"].Endpoints[AzureEnvironment.Endpoint.ServiceManagement]); + Assert.Equal(".database.windows.net", client.Profile.Environments["Dogfood"].Endpoints[AzureEnvironment.Endpoint.SqlDatabaseDnsSuffix]); + + // Verify subscriptions + Assert.Equal(3, client.Profile.Subscriptions.Count); + Assert.False(client.Profile.Subscriptions.ContainsKey(new Guid("06E3F6FD-A3AA-439A-8FC4-1F5C41D2AD1E"))); + Assert.True(client.Profile.Subscriptions.ContainsKey(new Guid("06E3F6FD-A3AA-439A-8FC4-1F5C41D2AD1F"))); + Assert.Equal("Test 2", client.Profile.Subscriptions[new Guid("06E3F6FD-A3AA-439A-8FC4-1F5C41D2AD1F")].Name); + Assert.True(client.Profile.Subscriptions[new Guid("06E3F6FD-A3AA-439A-8FC4-1F5C41D2AD1F")].IsPropertySet(AzureSubscription.Property.Default)); + Assert.Equal("test@mail.com", client.Profile.Subscriptions[new Guid("06E3F6FD-A3AA-439A-8FC4-1F5C41D2AD1F")].Account); + Assert.Equal("Dogfood", client.Profile.Subscriptions[new Guid("06E3F6FD-A3AA-439A-8FC4-1F5C41D2AD1F")].Environment); + Assert.Equal("123", client.Profile.Subscriptions[new Guid("06E3F6FD-A3AA-439A-8FC4-1F5C41D2AD1F")].Properties[AzureSubscription.Property.Tenants]); + Assert.True(client.Profile.Subscriptions.ContainsKey(new Guid("d1e52cbc-b073-42e2-a0a0-c2f547118a6f"))); + Assert.Equal("Test 3", client.Profile.Subscriptions[new Guid("d1e52cbc-b073-42e2-a0a0-c2f547118a6f")].Name); + Assert.False(client.Profile.Subscriptions[new Guid("d1e52cbc-b073-42e2-a0a0-c2f547118a6f")].IsPropertySet(AzureSubscription.Property.Default)); + Assert.Equal("test@mail.com", client.Profile.Subscriptions[new Guid("d1e52cbc-b073-42e2-a0a0-c2f547118a6f")].Account); + Assert.Equal("72f988bf-86f1-41af-91ab-2d7cd011db47", client.Profile.Subscriptions[new Guid("d1e52cbc-b073-42e2-a0a0-c2f547118a6f")].Properties[AzureSubscription.Property.Tenants]); + Assert.Equal(EnvironmentName.AzureCloud, client.Profile.Subscriptions[new Guid("d1e52cbc-b073-42e2-a0a0-c2f547118a6f")].Environment); + Assert.Equal(EnvironmentName.AzureChinaCloud, client.Profile.Subscriptions[new Guid("c14d7dc5-ed4d-4346-a02f-9f1bcf78fb66")].Environment); + + // Verify accounts + Assert.Equal(2, client.Profile.Accounts.Count); + Assert.Equal("test@mail.com", client.Profile.Accounts["test@mail.com"].Id); + Assert.Equal(AzureAccount.AccountType.User, client.Profile.Accounts["test@mail.com"].Type); + Assert.True(client.Profile.Accounts["test@mail.com"].GetPropertyAsArray(AzureAccount.Property.Subscriptions) + .Contains(new Guid("06E3F6FD-A3AA-439A-8FC4-1F5C41D2AD1F").ToString())); + Assert.True(client.Profile.Accounts["test@mail.com"].GetPropertyAsArray(AzureAccount.Property.Subscriptions) + .Contains(new Guid("d1e52cbc-b073-42e2-a0a0-c2f547118a6f").ToString())); + Assert.True(client.Profile.Accounts["3AF24D48B97730E5C4C9CCB12397B5E046F79E09"].GetPropertyAsArray(AzureAccount.Property.Subscriptions) + .Contains(new Guid("d1e52cbc-b073-42e2-a0a0-c2f547118a6f").ToString())); + Assert.True(client.Profile.Accounts["test@mail.com"].GetPropertyAsArray(AzureAccount.Property.Tenants) + .Contains("72f988bf-86f1-41af-91ab-2d7cd011db47")); + Assert.True(client.Profile.Accounts["test@mail.com"].GetPropertyAsArray(AzureAccount.Property.Tenants) + .Contains("123")); + Assert.Equal("3AF24D48B97730E5C4C9CCB12397B5E046F79E09", client.Profile.Accounts["3AF24D48B97730E5C4C9CCB12397B5E046F79E09"].Id); + Assert.Equal(AzureAccount.AccountType.Certificate, client.Profile.Accounts["3AF24D48B97730E5C4C9CCB12397B5E046F79E09"].Type); + Assert.Equal(0, client.Profile.Accounts["3AF24D48B97730E5C4C9CCB12397B5E046F79E09"].GetPropertyAsArray(AzureAccount.Property.Tenants).Length); + Assert.Equal(2, client.Profile.Accounts["3AF24D48B97730E5C4C9CCB12397B5E046F79E09"].GetPropertyAsArray(AzureAccount.Property.Subscriptions).Length); + } + + [Fact] + public void ProfileMigratesAccountsSkipsBadOnesAndBacksUpFile() + { + MockDataStore dataStore = new MockDataStore(); + dataStore.VirtualStore[oldProfileDataPath] = oldProfileDataBadSubscription; + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + + // Verify Environment migration + Assert.Equal(2, client.Profile.Environments.Count); + + // Verify subscriptions + Assert.Equal(3, client.Profile.Subscriptions.Count); + Assert.True(client.Profile.Subscriptions.ContainsKey(new Guid("06E3F6FD-A3AA-439A-8FC4-1F5C41D2AD1F"))); + Assert.Equal("Test Bad Management Endpoint", client.Profile.Subscriptions[new Guid("06E3F6FD-A3AA-439A-8FC4-1F5C41D2AD1F")].Name); + Assert.Equal(EnvironmentName.AzureCloud, client.Profile.Subscriptions[new Guid("06E3F6FD-A3AA-439A-8FC4-1F5C41D2AD1F")].Environment); + Assert.Equal("Test Null Management Endpoint", client.Profile.Subscriptions[new Guid("06E3F6FD-A3AA-439A-8FC4-1F5C41D2ADFF")].Name); + Assert.Equal(EnvironmentName.AzureCloud, client.Profile.Subscriptions[new Guid("06E3F6FD-A3AA-439A-8FC4-1F5C41D2ADFF")].Environment); + + Assert.True(client.Profile.Subscriptions.ContainsKey(new Guid("d1e52cbc-b073-42e2-a0a0-c2f547118a6f"))); + Assert.Equal("Test Bad Cert", client.Profile.Subscriptions[new Guid("d1e52cbc-b073-42e2-a0a0-c2f547118a6f")].Name); + + // Verify accounts + Assert.Equal(2, client.Profile.Accounts.Count); + Assert.Equal("test@mail.com", client.Profile.Accounts["test@mail.com"].Id); + Assert.Equal(AzureAccount.AccountType.User, client.Profile.Accounts["test@mail.com"].Type); + Assert.True(client.Profile.Accounts["test@mail.com"].GetPropertyAsArray(AzureAccount.Property.Subscriptions) + .Contains(new Guid("06E3F6FD-A3AA-439A-8FC4-1F5C41D2AD1F").ToString())); + Assert.True(client.Profile.Accounts["test@mail.com"].GetPropertyAsArray(AzureAccount.Property.Subscriptions) + .Contains(new Guid("d1e52cbc-b073-42e2-a0a0-c2f547118a6f").ToString())); + Assert.True(client.Profile.Accounts["3AF24D48B97730E5C4C9CCB12397B5E046F79E99"].GetPropertyAsArray(AzureAccount.Property.Subscriptions) + .Contains(new Guid("d1e52cbc-b073-42e2-a0a0-c2f547118a6f").ToString())); + Assert.True(client.Profile.Accounts["test@mail.com"].GetPropertyAsArray(AzureAccount.Property.Tenants) + .Contains("72f988bf-86f1-41af-91ab-2d7cd011db47")); + Assert.False(client.Profile.Accounts["test@mail.com"].GetPropertyAsArray(AzureAccount.Property.Tenants) + .Contains("123")); + Assert.Equal("3AF24D48B97730E5C4C9CCB12397B5E046F79E99", client.Profile.Accounts["3AF24D48B97730E5C4C9CCB12397B5E046F79E99"].Id); + Assert.Equal(AzureAccount.AccountType.Certificate, client.Profile.Accounts["3AF24D48B97730E5C4C9CCB12397B5E046F79E99"].Type); + Assert.Equal(0, client.Profile.Accounts["3AF24D48B97730E5C4C9CCB12397B5E046F79E99"].GetPropertyAsArray(AzureAccount.Property.Tenants).Length); + Assert.Equal(1, client.Profile.Accounts["3AF24D48B97730E5C4C9CCB12397B5E046F79E99"].GetPropertyAsArray(AzureAccount.Property.Subscriptions).Length); + + // Verify backup file + Assert.True(dataStore.FileExists(oldProfileDataPathError)); + Assert.False(dataStore.FileExists(oldProfileDataPath)); + Assert.Equal(oldProfileDataBadSubscription, dataStore.ReadFileAsText(oldProfileDataPathError)); + } + + [Fact] + public void ProfileMigratesCorruptedFileAndCreatedBackup() + { + MockDataStore dataStore = new MockDataStore(); + dataStore.VirtualStore[oldProfileDataPath] = oldProfileDataCorruptedFile; + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + + // Verify Environment migration + Assert.Equal(2, client.Profile.Environments.Count); + + // Verify subscriptions + Assert.Equal(0, client.Profile.Subscriptions.Count); + + // Verify accounts + Assert.Equal(0, client.Profile.Accounts.Count); + + // Verify backup file + Assert.True(dataStore.FileExists(oldProfileDataPathError)); + Assert.False(dataStore.FileExists(oldProfileDataPath)); + Assert.Equal(oldProfileDataCorruptedFile, dataStore.ReadFileAsText(oldProfileDataPathError)); + } + + [Fact] + public void CmdletStartsWithCorruptedJson() + { + MockDataStore dataStore = new MockDataStore(); + dataStore.VirtualStore[newProfileDataPath] = jsonProfileWithBadData; + ProfileClient.DataStore = dataStore; + + GetAzureSubscriptionCommand cmdlt = new GetAzureSubscriptionCommand(); + + ProfileClient client = new ProfileClient(); + + Assert.Equal(0, client.Profile.Subscriptions.Count); + Assert.Null(AzureSession.CurrentContext.Subscription); + Assert.Null(AzureSession.CurrentContext.Account); + } + + [Fact] + public void CmdletStartsWithJsonWithoutAccounts() + { + MockDataStore dataStore = new MockDataStore(); + dataStore.VirtualStore[newProfileDataPath] = jsonProfileWithoutAccount; + ProfileClient.DataStore = dataStore; + + GetAzureSubscriptionCommand cmdlt = new GetAzureSubscriptionCommand(); + + ProfileClient client = new ProfileClient(); + + Assert.Equal(1, client.Profile.Subscriptions.Count); + Assert.Null(AzureSession.CurrentContext.Subscription); + Assert.Null(AzureSession.CurrentContext.Account); + } + + [Fact] + public void AddAzureAccountReturnsAccountWithAllSubscriptionsInRdfeMode() + { + SetMocks(new[] { rdfeSubscription1, rdfeSubscription2 }.ToList(), new[] { csmSubscription1 }.ToList()); + MockDataStore dataStore = new MockDataStore(); + dataStore.VirtualStore[oldProfileDataPath] = oldProfileData; + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + + var account = client.AddAccountAndLoadSubscriptions(new AzureAccount { Id = "test", Type = AzureAccount.AccountType.User }, AzureEnvironment.PublicEnvironments[ EnvironmentName.AzureCloud], null); + + Assert.Equal("test", account.Id); + Assert.Equal(3, account.GetSubscriptions(client.Profile).Count); + Assert.True(account.GetSubscriptions(client.Profile).Any(s => s.Id == new Guid(rdfeSubscription1.SubscriptionId))); + Assert.True(account.GetSubscriptions(client.Profile).Any(s => s.Id == new Guid(rdfeSubscription2.SubscriptionId))); + Assert.True(account.GetSubscriptions(client.Profile).Any(s => s.Id == new Guid(csmSubscription1.SubscriptionId))); + } + + [Fact] + public void AddAzureAccountReturnsAccountWithAllSubscriptionsInCsmMode() + { + SetMocks(new[] { rdfeSubscription1, rdfeSubscription2 }.ToList(), new[] { csmSubscription1 }.ToList()); + MockDataStore dataStore = new MockDataStore(); + dataStore.VirtualStore[oldProfileDataPath] = oldProfileData; + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + + var account = client.AddAccountAndLoadSubscriptions(new AzureAccount { Id = "test", Type = AzureAccount.AccountType.User }, AzureEnvironment.PublicEnvironments[EnvironmentName.AzureCloud], null); + + Assert.Equal("test", account.Id); + Assert.Equal(3, account.GetSubscriptions(client.Profile).Count); + Assert.True(account.GetSubscriptions(client.Profile).Any(s => s.Id == new Guid(rdfeSubscription1.SubscriptionId))); + Assert.True(account.GetSubscriptions(client.Profile).Any(s => s.Id == new Guid(rdfeSubscription2.SubscriptionId))); + Assert.True(account.GetSubscriptions(client.Profile).Any(s => s.Id == new Guid(csmSubscription1.SubscriptionId))); + } + + [Fact] + public void GetAzureAccountReturnsAccountWithSubscriptions() + { + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + client.Profile.Subscriptions[azureSubscription1.Id] = azureSubscription1; + client.Profile.Subscriptions[azureSubscription2.Id] = azureSubscription2; + client.Profile.Subscriptions[azureSubscription3withoutUser.Id] = azureSubscription3withoutUser; + client.Profile.Accounts[azureAccount.Id] = azureAccount; + client.Profile.Environments[azureEnvironment.Name] = azureEnvironment; + + var account = client.ListAccounts("test").ToList(); + + Assert.Equal(1, account.Count); + Assert.Equal("test", account[0].Id); + Assert.Equal(2, account[0].GetSubscriptions(client.Profile).Count); + Assert.True(account[0].GetSubscriptions(client.Profile).Any(s => s.Id == azureSubscription1.Id)); + Assert.True(account[0].GetSubscriptions(client.Profile).Any(s => s.Id == azureSubscription2.Id)); + } + + [Fact] + public void GetAzureAccountWithoutEnvironmentReturnsAccount() + { + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + client.Profile.Subscriptions[azureSubscription1.Id] = azureSubscription1; + client.Profile.Subscriptions[azureSubscription2.Id] = azureSubscription2; + client.Profile.Subscriptions[azureSubscription3withoutUser.Id] = azureSubscription3withoutUser; + client.Profile.Accounts[azureAccount.Id] = azureAccount; + client.Profile.Environments[azureEnvironment.Name] = azureEnvironment; + + var account = client.ListAccounts("test").ToList(); + + Assert.Equal(1, account.Count); + Assert.Equal("test", account[0].Id); + Assert.Equal(2, account[0].GetSubscriptions(client.Profile).Count); + Assert.True(account[0].GetSubscriptions(client.Profile).Any(s => s.Id == azureSubscription1.Id)); + Assert.True(account[0].GetSubscriptions(client.Profile).Any(s => s.Id == azureSubscription2.Id)); + } + + [Fact] + public void GetAzureAccountReturnsEmptyEnumerationForNonExistingUser() + { + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + client.Profile.Subscriptions[azureSubscription1.Id] = azureSubscription1; + client.Profile.Subscriptions[azureSubscription2.Id] = azureSubscription2; + client.Profile.Subscriptions[azureSubscription3withoutUser.Id] = azureSubscription3withoutUser; + client.Profile.Accounts[azureAccount.Id] = azureAccount; + client.Profile.Environments[azureEnvironment.Name] = azureEnvironment; + + var account = client.ListAccounts("test2").ToList(); + + Assert.Equal(1, account.Count); + } + + [Fact] + public void GetAzureAccountReturnsAllAccountsWithNullUser() + { + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + client.Profile.Subscriptions[azureSubscription1.Id] = azureSubscription1; + client.Profile.Subscriptions[azureSubscription2.Id] = azureSubscription2; + client.Profile.Accounts[azureAccount.Id] = azureAccount; + azureSubscription3withoutUser.Account = "test2"; + client.Profile.Accounts["test2"] = new AzureAccount + { + Id = "test2", + Type = AzureAccount.AccountType.User, + Properties = new Dictionary + { + {AzureAccount.Property.Subscriptions, azureSubscription3withoutUser.Id.ToString()} + } + }; + client.Profile.Subscriptions[azureSubscription3withoutUser.Id] = azureSubscription3withoutUser; + client.Profile.Environments[azureEnvironment.Name] = azureEnvironment; + + var account = client.ListAccounts(null).ToList(); + + Assert.Equal(2, account.Count); + } + + [Fact] + public void RemoveAzureAccountRemovesSubscriptions() + { + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + client.Profile.Subscriptions[azureSubscription1.Id] = azureSubscription1; + client.Profile.Subscriptions[azureSubscription2.Id] = azureSubscription2; + client.Profile.Accounts[azureAccount.Id] = azureAccount; + azureSubscription3withoutUser.Account = "test2"; + client.Profile.Accounts["test2"] = new AzureAccount + { + Id = "test2", + Type = AzureAccount.AccountType.User, + Properties = new Dictionary + { + {AzureAccount.Property.Subscriptions, azureSubscription3withoutUser.Id.ToString()} + } + }; + client.Profile.Subscriptions[azureSubscription3withoutUser.Id] = azureSubscription3withoutUser; + client.Profile.Environments[azureEnvironment.Name] = azureEnvironment; + List log = new List(); + client.WarningLog = log.Add; + + Assert.Equal(3, client.Profile.Subscriptions.Count); + + client.RemoveAccount("test2"); + + Assert.Equal(2, client.Profile.Subscriptions.Count); + Assert.Equal(0, log.Count); + } + + [Fact] + public void RemoveAzureAccountRemovesDefaultSubscriptionAndWritesWarning() + { + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + client.Profile.Subscriptions[azureSubscription1.Id] = azureSubscription1; + client.Profile.Subscriptions[azureSubscription2.Id] = azureSubscription2; + client.Profile.Accounts[azureAccount.Id] = azureAccount; + azureSubscription3withoutUser.Account = "test2"; + client.Profile.Accounts["test2"] = new AzureAccount + { + Id = "test2", + Type = AzureAccount.AccountType.User, + Properties = new Dictionary + { + {AzureAccount.Property.Subscriptions, azureSubscription3withoutUser.Id.ToString()} + } + }; + client.Profile.Subscriptions[azureSubscription3withoutUser.Id] = azureSubscription3withoutUser; + client.Profile.Environments[azureEnvironment.Name] = azureEnvironment; + List log = new List(); + client.WarningLog = log.Add; + + Assert.Equal(3, client.Profile.Subscriptions.Count); + + var account = client.RemoveAccount("test"); + + Assert.Equal(1, client.Profile.Subscriptions.Count); + Assert.Equal("test", account.Id); + Assert.Equal(2, account.GetPropertyAsArray(AzureAccount.Property.Subscriptions).Length); + Assert.Equal(1, log.Count); + Assert.Equal( + "The default subscription is being removed. Use Select-AzureSubscription -Default to select a new default subscription.", + log[0]); + } + + [Fact] + public void RemoveAzureAccountRemovesDefaultAccountFromSubscription() + { + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + client.Profile.Subscriptions[azureSubscription1.Id] = azureSubscription1; + client.Profile.Subscriptions[azureSubscription2.Id] = azureSubscription2; + client.Profile.Accounts[azureAccount.Id] = azureAccount; + azureSubscription3withoutUser.Account = "test2"; + client.Profile.Accounts["test2"] = new AzureAccount + { + Id = "test2", + Type = AzureAccount.AccountType.User, + Properties = new Dictionary + { + {AzureAccount.Property.Subscriptions, azureSubscription1.Id.ToString()} + } + }; + client.Profile.Subscriptions[azureSubscription1.Id].Account = azureAccount.Id; + client.Profile.Environments[azureEnvironment.Name] = azureEnvironment; + + var account = client.RemoveAccount(azureAccount.Id); + + Assert.Equal("test2", client.Profile.Subscriptions[azureSubscription1.Id].Account); + } + + [Fact] + public void RemoveAzureAccountRemovesInMemoryAccount() + { + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + client.Profile.Subscriptions[azureSubscription1.Id] = azureSubscription1; + client.Profile.Subscriptions[azureSubscription2.Id] = azureSubscription2; + client.Profile.Accounts[azureAccount.Id] = azureAccount; + azureSubscription3withoutUser.Account = "test2"; + client.Profile.Accounts["test2"] = new AzureAccount + { + Id = "test2", + Type = AzureAccount.AccountType.User, + Properties = new Dictionary + { + {AzureAccount.Property.Subscriptions, azureSubscription1.Id.ToString()} + } + }; + client.Profile.Subscriptions[azureSubscription1.Id].Account = azureAccount.Id; + client.Profile.Environments[azureEnvironment.Name] = azureEnvironment; + AzureSession.SetCurrentContext(azureSubscription1, azureEnvironment, azureAccount); + + client.RemoveAccount(azureAccount.Id); + + Assert.Equal("test2", AzureSession.CurrentContext.Account.Id); + Assert.Equal("test2", AzureSession.CurrentContext.Subscription.Account); + Assert.Equal(azureSubscription1.Id, AzureSession.CurrentContext.Subscription.Id); + + client.RemoveAccount("test2"); + + Assert.Null(AzureSession.CurrentContext.Account); + Assert.Null(AzureSession.CurrentContext.Subscription); + Assert.Equal(EnvironmentName.AzureCloud, AzureSession.CurrentContext.Environment.Name); + } + + [Fact] + public void AddAzureEnvironmentAddsEnvironment() + { + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + + Assert.Equal(2, client.Profile.Environments.Count); + + Assert.Throws(() => client.AddOrSetEnvironment(null)); + var env = client.AddOrSetEnvironment(azureEnvironment); + + Assert.Equal(3, client.Profile.Environments.Count); + Assert.Equal(env, azureEnvironment); + } + + [Fact] + public void GetAzureEnvironmentsListsEnvironments() + { + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + + var env1 = client.ListEnvironments(null); + + Assert.Equal(2, env1.Count); + + var env2 = client.ListEnvironments("bad"); + + Assert.Equal(0, env2.Count); + + var env3 = client.ListEnvironments(EnvironmentName.AzureCloud); + + Assert.Equal(1, env3.Count); + } + + [Fact] + public void RemoveAzureEnvironmentRemovesEnvironmentSubscriptionsAndAccounts() + { + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + + client.Profile.Accounts[azureAccount.Id] = azureAccount; + client.Profile.Environments[azureEnvironment.Name] = azureEnvironment; + client.Profile.Subscriptions[azureSubscription1.Id] = azureSubscription1; + client.Profile.Subscriptions[azureSubscription2.Id] = azureSubscription2; + + Assert.Equal(2, client.Profile.Subscriptions.Values.Count(s => s.Environment == "Test")); + Assert.Equal(3, client.Profile.Environments.Count); + Assert.Equal(1, client.Profile.Accounts.Count); + + Assert.Throws(() => client.RemoveEnvironment(null)); + Assert.Throws(() => client.RemoveEnvironment("bad")); + + var env = client.RemoveEnvironment(azureEnvironment.Name); + + Assert.Equal(azureEnvironment.Name, env.Name); + Assert.Equal(0, client.Profile.Subscriptions.Values.Count(s => s.Environment == "Test")); + Assert.Equal(2, client.Profile.Environments.Count); + Assert.Equal(0, client.Profile.Accounts.Count); + } + + [Fact] + public void RemoveAzureEnvironmentDoesNotRemoveEnvironmentSubscriptionsAndAccountsForAzureCloudOrChinaCloud() + { + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + + client.Profile.Accounts[azureAccount.Id] = azureAccount; + azureSubscription1.Environment = EnvironmentName.AzureCloud; + azureSubscription2.Environment = EnvironmentName.AzureChinaCloud; + client.Profile.Subscriptions[azureSubscription1.Id] = azureSubscription1; + client.Profile.Subscriptions[azureSubscription2.Id] = azureSubscription2; + + Assert.Equal(1, client.Profile.Subscriptions.Values.Count(s => s.Environment == EnvironmentName.AzureCloud)); + Assert.Equal(1, client.Profile.Subscriptions.Values.Count(s => s.Environment == EnvironmentName.AzureChinaCloud)); + Assert.Equal(2, client.Profile.Environments.Count); + Assert.Equal(1, client.Profile.Accounts.Count); + + Assert.Throws(() => client.RemoveEnvironment(EnvironmentName.AzureCloud)); + Assert.Throws(() => client.RemoveEnvironment(EnvironmentName.AzureChinaCloud)); + + Assert.Equal(1, client.Profile.Subscriptions.Values.Count(s => s.Environment == EnvironmentName.AzureCloud)); + Assert.Equal(1, client.Profile.Subscriptions.Values.Count(s => s.Environment == EnvironmentName.AzureChinaCloud)); + Assert.Equal(2, client.Profile.Environments.Count); + Assert.Equal(1, client.Profile.Accounts.Count); + } + + [Fact] + public void SetAzureEnvironmentUpdatesEnvironment() + { + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + + Assert.Equal(2, client.Profile.Environments.Count); + + Assert.Throws(() => client.AddOrSetEnvironment(null)); + + var env2 = client.AddOrSetEnvironment(azureEnvironment); + Assert.Equal(env2.Name, azureEnvironment.Name); + Assert.NotNull(env2.Endpoints[AzureEnvironment.Endpoint.ServiceManagement]); + AzureEnvironment newEnv = new AzureEnvironment + { + Name = azureEnvironment.Name + }; + newEnv.Endpoints[AzureEnvironment.Endpoint.Graph] = "foo"; + env2 = client.AddOrSetEnvironment(newEnv); + Assert.Equal("foo", env2.Endpoints[AzureEnvironment.Endpoint.Graph]); + Assert.NotNull(env2.Endpoints[AzureEnvironment.Endpoint.ServiceManagement]); + } + + [Fact] + public void GetAzureEnvironmentReturnsCorrectValue() + { + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + client.AddOrSetEnvironment(azureEnvironment); + + Assert.Equal(EnvironmentName.AzureCloud, AzureSession.CurrentContext.Environment.Name); + + var defaultEnv = client.GetEnvironmentOrDefault(null); + + Assert.Equal(EnvironmentName.AzureCloud, defaultEnv.Name); + + var newEnv = client.GetEnvironmentOrDefault(azureEnvironment.Name); + + Assert.Equal(azureEnvironment.Name, newEnv.Name); + + Assert.Throws(() => client.GetEnvironmentOrDefault("bad")); + } + + [Fact] + public void GetCurrentEnvironmentReturnsCorrectValue() + { + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + + AzureSession.SetCurrentContext(azureSubscription1, azureEnvironment, azureAccount); + + var newEnv = client.GetEnvironmentOrDefault(azureEnvironment.Name); + + Assert.Equal(azureEnvironment.Name, newEnv.Name); + } + + [Fact] + public void AddOrSetAzureSubscriptionChecksAndUpdates() + { + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + + client.AddOrSetAccount(azureAccount); + client.AddOrSetEnvironment(azureEnvironment); + client.AddOrSetSubscription(azureSubscription1); + + Assert.Equal(1, client.Profile.Subscriptions.Count); + + var subscription = client.AddOrSetSubscription(azureSubscription1); + + Assert.Equal(1, client.Profile.Subscriptions.Count); + Assert.Equal(1, client.Profile.Accounts.Count); + Assert.Equal(subscription, azureSubscription1); + Assert.Throws(() => client.AddOrSetSubscription(null)); + Assert.Throws(() => client.AddOrSetSubscription( + new AzureSubscription { Id = new Guid(), Environment = null, Name = "foo"})); + } + + [Fact] + public void AddOrSetAzureSubscriptionUpdatesInMemory() + { + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + + client.AddOrSetAccount(azureAccount); + client.AddOrSetEnvironment(azureEnvironment); + client.AddOrSetSubscription(azureSubscription1); + AzureSession.SetCurrentContext(azureSubscription1, azureEnvironment, azureAccount); + azureSubscription1.Properties[AzureSubscription.Property.StorageAccount] = "testAccount"; + Assert.Equal(azureSubscription1.Id, AzureSession.CurrentContext.Subscription.Id); + Assert.Equal(azureSubscription1.Properties[AzureSubscription.Property.StorageAccount], + AzureSession.CurrentContext.Subscription.Properties[AzureSubscription.Property.StorageAccount]); + + var newSubscription = new AzureSubscription + { + Id = azureSubscription1.Id, + Environment = azureSubscription1.Environment, + Account = azureSubscription1.Account, + Name = azureSubscription1.Name + }; + newSubscription.Properties[AzureSubscription.Property.StorageAccount] = "testAccount1"; + + client.AddOrSetSubscription(newSubscription); + var newSubscriptionFromProfile = client.Profile.Subscriptions[newSubscription.Id]; + + Assert.Equal(newSubscription.Id, AzureSession.CurrentContext.Subscription.Id); + Assert.Equal(newSubscription.Id, newSubscriptionFromProfile.Id); + Assert.Equal(newSubscription.Properties[AzureSubscription.Property.StorageAccount], + AzureSession.CurrentContext.Subscription.Properties[AzureSubscription.Property.StorageAccount]); + Assert.Equal(newSubscription.Properties[AzureSubscription.Property.StorageAccount], + newSubscriptionFromProfile.Properties[AzureSubscription.Property.StorageAccount]); + } + + [Fact] + public void RemoveAzureSubscriptionChecksAndRemoves() + { + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + + client.Profile.Accounts[azureAccount.Id] = azureAccount; + client.AddOrSetEnvironment(azureEnvironment); + client.AddOrSetSubscription(azureSubscription1); + client.SetSubscriptionAsCurrent(azureSubscription1.Name, azureSubscription1.Account); + client.SetSubscriptionAsDefault(azureSubscription1.Name, azureSubscription1.Account); + + Assert.Equal(1, client.Profile.Subscriptions.Count); + + List log = new List(); + client.WarningLog = log.Add; + + var subscription = client.RemoveSubscription(azureSubscription1.Name); + + Assert.Equal(0, client.Profile.Subscriptions.Count); + Assert.Equal(azureSubscription1.Name, subscription.Name); + Assert.Equal(2, log.Count); + Assert.Equal( + "The default subscription is being removed. Use Select-AzureSubscription -Default to select a new default subscription.", + log[0]); + Assert.Equal( + "The current subscription is being removed. Use Select-AzureSubscription to select a new current subscription.", + log[1]); + Assert.Throws(() => client.RemoveSubscription("bad")); + Assert.Throws(() => client.RemoveSubscription(null)); + } + + [Fact] + public void RefreshSubscriptionsUpdatesAccounts() + { + SetMocks(new[] { rdfeSubscription1, rdfeSubscription2 }.ToList(), new[] { csmSubscription1, csmSubscription1withDuplicateId }.ToList()); + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + client.AddOrSetEnvironment(azureEnvironment); + client.Profile.Accounts[azureAccount.Id] = azureAccount; + client.AddOrSetSubscription(azureSubscription1); + + var subscriptions = client.RefreshSubscriptions(azureEnvironment); + + Assert.True(client.Profile.Accounts[azureAccount.Id].HasSubscription(new Guid(rdfeSubscription1.SubscriptionId))); + Assert.True(client.Profile.Accounts[azureAccount.Id].HasSubscription(new Guid(rdfeSubscription2.SubscriptionId))); + Assert.True(client.Profile.Accounts[azureAccount.Id].HasSubscription(new Guid(csmSubscription1.SubscriptionId))); + Assert.True(client.Profile.Accounts[azureAccount.Id].HasSubscription(new Guid(csmSubscription1withDuplicateId.SubscriptionId))); + } + + [Fact] + public void RefreshSubscriptionsMergesFromServer() + { + SetMocks(new[] { rdfeSubscription1, rdfeSubscription2 }.ToList(), new[] { csmSubscription1, csmSubscription1withDuplicateId }.ToList()); + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + client.AddOrSetEnvironment(azureEnvironment); + client.Profile.Accounts[azureAccount.Id] = azureAccount; + client.AddOrSetSubscription(azureSubscription1); + + var subscriptions = client.RefreshSubscriptions(azureEnvironment); + + Assert.Equal(4, subscriptions.Count); + Assert.Equal(4, subscriptions.Count(s => s.Account == "test")); + Assert.Equal(1, subscriptions.Count(s => s.Id == azureSubscription1.Id)); + Assert.Equal(1, subscriptions.Count(s => s.Id == new Guid(rdfeSubscription1.SubscriptionId))); + Assert.Equal(2, subscriptions.First(s => s.Id == new Guid(rdfeSubscription1.SubscriptionId)).GetPropertyAsArray(AzureSubscription.Property.SupportedModes).Count()); + Assert.Equal(1, subscriptions.Count(s => s.Id == new Guid(rdfeSubscription2.SubscriptionId))); + Assert.Equal(1, subscriptions.Count(s => s.Id == new Guid(csmSubscription1.SubscriptionId))); + } + + [Fact] + public void RefreshSubscriptionsWorksWithMooncake() + { + SetMocks(new[] { rdfeSubscription1, rdfeSubscription2 }.ToList(), new[] { csmSubscription1, csmSubscription1withDuplicateId }.ToList()); + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + + client.Profile.Accounts[azureAccount.Id] = azureAccount; + + var subscriptions = client.RefreshSubscriptions(client.Profile.Environments[EnvironmentName.AzureChinaCloud]); + + Assert.Equal(2, subscriptions.Count); + Assert.Equal(2, subscriptions.Count(s => s.Account == "test")); + Assert.Equal(1, subscriptions.Count(s => s.Id == new Guid(rdfeSubscription1.SubscriptionId))); + Assert.Equal(1, subscriptions.First(s => s.Id == new Guid(rdfeSubscription1.SubscriptionId)).GetPropertyAsArray(AzureSubscription.Property.SupportedModes).Count()); + Assert.Equal(1, subscriptions.Count(s => s.Id == new Guid(rdfeSubscription2.SubscriptionId))); + } + + [Fact] + public void RefreshSubscriptionsListsAllSubscriptions() + { + SetMocks(new[] { rdfeSubscription1, rdfeSubscription2 }.ToList(), new[] { csmSubscription1, csmSubscription1withDuplicateId }.ToList()); + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + client.AddOrSetAccount(azureAccount); + client.AddOrSetEnvironment(azureEnvironment); + client.AddOrSetSubscription(azureSubscription1); + + var subscriptions = client.RefreshSubscriptions(azureEnvironment); + + Assert.Equal(4, subscriptions.Count); + Assert.Equal(1, subscriptions.Count(s => s.Id == new Guid(rdfeSubscription1.SubscriptionId))); + Assert.Equal(1, subscriptions.Count(s => s.Id == new Guid(rdfeSubscription2.SubscriptionId))); + Assert.Equal(1, subscriptions.Count(s => s.Id == new Guid(csmSubscription1.SubscriptionId))); + Assert.True(subscriptions.All(s => s.Environment == "Test")); + Assert.True(subscriptions.All(s => s.Account == "test")); + } + + [Fact] + public void GetAzureSubscriptionByNameChecksAndReturnsOnlyLocal() + { + SetMocks(new[] { rdfeSubscription1, rdfeSubscription2 }.ToList(), new[] { csmSubscription1, csmSubscription1withDuplicateId }.ToList()); + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + client.AddOrSetAccount(azureAccount); + client.AddOrSetEnvironment(azureEnvironment); + client.AddOrSetSubscription(azureSubscription1); + client.AddOrSetSubscription(azureSubscription2); + + var subscriptions = client.GetSubscription(azureSubscription1.Name); + + Assert.Equal(azureSubscription1.Id, subscriptions.Id); + Assert.Throws(() => client.GetSubscription(new Guid())); + } + + [Fact] + public void GetAzureSubscriptionByIdChecksAndReturnsOnlyLocal() + { + SetMocks(new[] { rdfeSubscription1, rdfeSubscription2 }.ToList(), new[] { csmSubscription1, csmSubscription1withDuplicateId }.ToList()); + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + client.AddOrSetAccount(azureAccount); + client.AddOrSetEnvironment(azureEnvironment); + client.AddOrSetSubscription(azureSubscription1); + client.AddOrSetSubscription(azureSubscription2); + + var subscriptions = client.GetSubscription(azureSubscription1.Id); + + Assert.Equal(azureSubscription1.Id, subscriptions.Id); + Assert.Throws(() => client.GetSubscription(new Guid())); + } + + [Fact] + public void SetAzureSubscriptionAsDefaultSetsDefaultAndCurrent() + { + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + client.Profile.Accounts[azureAccount.Id] = azureAccount; + client.AddOrSetEnvironment(azureEnvironment); + client.AddOrSetSubscription(azureSubscription2); + + Assert.Null(client.Profile.DefaultSubscription); + + client.SetSubscriptionAsDefault(azureSubscription2.Name, azureSubscription2.Account); + + Assert.Equal(azureSubscription2.Id, client.Profile.DefaultSubscription.Id); + Assert.Equal(azureSubscription2.Id, AzureSession.CurrentContext.Subscription.Id); + Assert.Throws(() => client.SetSubscriptionAsDefault("bad", null)); + Assert.Throws(() => client.SetSubscriptionAsDefault(null, null)); + } + + [Fact] + public void ClearDefaultAzureSubscriptionClearsDefault() + { + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + client.Profile.Accounts[azureAccount.Id] = azureAccount; + client.AddOrSetEnvironment(azureEnvironment); + client.AddOrSetSubscription(azureSubscription2); + + Assert.Null(client.Profile.DefaultSubscription); + client.SetSubscriptionAsDefault(azureSubscription2.Name, azureSubscription2.Account); + Assert.Equal(azureSubscription2.Id, client.Profile.DefaultSubscription.Id); + + client.ClearDefaultSubscription(); + + Assert.Null(client.Profile.DefaultSubscription); + } + + [Fact] + public void SetAzureSubscriptionAsCurrentSetsCurrent() + { + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + client.Profile.Accounts[azureAccount.Id] = azureAccount; + client.AddOrSetEnvironment(azureEnvironment); + client.AddOrSetSubscription(azureSubscription1); + client.AddOrSetSubscription(azureSubscription2); + + Assert.Null(AzureSession.CurrentContext.Subscription); + + client.SetSubscriptionAsCurrent(azureSubscription2.Name, azureSubscription2.Account); + + Assert.Equal(azureSubscription2.Id, AzureSession.CurrentContext.Subscription.Id); + Assert.Throws(() => client.SetSubscriptionAsCurrent("bad", null)); + Assert.Throws(() => client.SetSubscriptionAsCurrent(null, null)); + } + + [Fact] + public void ImportPublishSettingsLoadsAndReturnsSubscriptions() + { + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + + dataStore.WriteFile("ImportPublishSettingsLoadsAndReturnsSubscriptions.publishsettings", + Properties.Resources.ValidProfile); + + client.AddOrSetEnvironment(azureEnvironment); + var subscriptions = client.ImportPublishSettings("ImportPublishSettingsLoadsAndReturnsSubscriptions.publishsettings", azureEnvironment.Name); + var account = client.Profile.Accounts.Values.First(); + + Assert.True(subscriptions.All(s => s.Account == account.Id)); + Assert.Equal(6, subscriptions.Count); + Assert.Equal(6, client.Profile.Subscriptions.Count); + } + + [Fact] + public void ImportPublishSettingsDefaultsToAzureCloudEnvironmentWithManagementUrl() + { + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + client.AddOrSetAccount(azureAccount); + client.AddOrSetEnvironment(azureEnvironment); + client.AddOrSetSubscription(azureSubscription1); + client.SetSubscriptionAsDefault(azureSubscription1.Name, azureAccount.Id); + client.Profile.Save(); + + client = new ProfileClient(); + + dataStore.WriteFile("ImportPublishSettingsLoadsAndReturnsSubscriptions.publishsettings", + Properties.Resources.ValidProfile); + + client.AddOrSetEnvironment(azureEnvironment); + var subscriptions = client.ImportPublishSettings("ImportPublishSettingsLoadsAndReturnsSubscriptions.publishsettings", null); + + Assert.True(subscriptions.All(s => s.Environment == EnvironmentName.AzureCloud)); + Assert.Equal(6, subscriptions.Count); + Assert.Equal(7, client.Profile.Subscriptions.Count); + } + + [Fact] + public void ImportPublishSettingsUsesProperEnvironmentWithManagementUrl() + { + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + client.AddOrSetAccount(azureAccount); + azureEnvironment.Endpoints[AzureEnvironment.Endpoint.ServiceManagement] = "https://newmanagement.core.windows.net/"; + client.AddOrSetEnvironment(azureEnvironment); + client.AddOrSetSubscription(azureSubscription1); + client.SetSubscriptionAsDefault(azureSubscription1.Name, azureAccount.Id); + client.Profile.Save(); + + client = new ProfileClient(); + + dataStore.WriteFile("ImportPublishSettingsLoadsAndReturnsSubscriptions.publishsettings", + Properties.Resources.ValidProfile3); + + client.AddOrSetEnvironment(azureEnvironment); + var subscriptions = client.ImportPublishSettings("ImportPublishSettingsLoadsAndReturnsSubscriptions.publishsettings", null); + + Assert.True(subscriptions.All(s => s.Environment == azureEnvironment.Name)); + Assert.Equal(6, subscriptions.Count); + Assert.Equal(7, client.Profile.Subscriptions.Count); + } + + [Fact] + public void ImportPublishSettingsUsesProperEnvironmentWithChinaManagementUrl() + { + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + + dataStore.WriteFile("ImportPublishSettingsLoadsAndReturnsSubscriptions.publishsettings", + Properties.Resources.ValidProfileChina); + + client.AddOrSetEnvironment(azureEnvironment); + var subscriptions = client.ImportPublishSettings("ImportPublishSettingsLoadsAndReturnsSubscriptions.publishsettings", null); + + Assert.True(subscriptions.All(s => s.Environment == EnvironmentName.AzureChinaCloud)); + Assert.Equal(6, subscriptions.Count); + Assert.Equal(6, client.Profile.Subscriptions.Count); + } + + [Fact] + public void ImportPublishSettingsUsesProperEnvironmentWithChinaManagementUrlOld() + { + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + + dataStore.WriteFile("ImportPublishSettingsLoadsAndReturnsSubscriptions.publishsettings", + Properties.Resources.ValidProfileChinaOld); + + client.AddOrSetEnvironment(azureEnvironment); + var subscriptions = client.ImportPublishSettings("ImportPublishSettingsLoadsAndReturnsSubscriptions.publishsettings", null); + + Assert.True(subscriptions.All(s => s.Environment == EnvironmentName.AzureChinaCloud)); + Assert.Equal(1, subscriptions.Count); + Assert.Equal(1, client.Profile.Subscriptions.Count); + } + + [Fact] + public void ImportPublishSettingsDefaultsToAzureCloudWithIncorrectManagementUrl() + { + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + client.AddOrSetAccount(azureAccount); + client.AddOrSetEnvironment(azureEnvironment); + client.AddOrSetSubscription(azureSubscription1); + client.SetSubscriptionAsDefault(azureSubscription1.Name, azureAccount.Id); + client.Profile.Save(); + + client = new ProfileClient(); + + dataStore.WriteFile("ImportPublishSettingsLoadsAndReturnsSubscriptions.publishsettings", + Properties.Resources.ValidProfile3); + + client.AddOrSetEnvironment(azureEnvironment); + var subscriptions = client.ImportPublishSettings("ImportPublishSettingsLoadsAndReturnsSubscriptions.publishsettings", null); + + Assert.True(subscriptions.All(s => s.Environment == EnvironmentName.AzureCloud)); + Assert.Equal(6, subscriptions.Count); + Assert.Equal(7, client.Profile.Subscriptions.Count); + } + + [Fact] + public void ImportPublishSettingsUsesPassedInEnvironment() + { + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + client.AddOrSetAccount(azureAccount); + client.AddOrSetEnvironment(azureEnvironment); + client.AddOrSetSubscription(azureSubscription1); + client.SetSubscriptionAsDefault(azureSubscription1.Name, azureAccount.Id); + client.Profile.Save(); + + client = new ProfileClient(); + + dataStore.WriteFile("ImportPublishSettingsLoadsAndReturnsSubscriptions.publishsettings", + Properties.Resources.ValidProfile3); + + client.AddOrSetEnvironment(azureEnvironment); + var subscriptions = client.ImportPublishSettings("ImportPublishSettingsLoadsAndReturnsSubscriptions.publishsettings", azureEnvironment.Name); + + Assert.True(subscriptions.All(s => s.Environment == azureEnvironment.Name)); + Assert.Equal(6, subscriptions.Count); + Assert.Equal(7, client.Profile.Subscriptions.Count); + } + + [Fact] + public void ImportPublishSettingsAddsSecondCertificate() + { + MockDataStore dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + ProfileClient client = new ProfileClient(); + var newSubscription = new AzureSubscription + { + Id = new Guid("f62b1e05-af8f-4203-8f97-421089adc053"), + Name = "Microsoft Azure Sandbox 9-220", + Environment = EnvironmentName.AzureCloud, + Account = azureAccount.Id + }; + azureAccount.SetProperty(AzureAccount.Property.Subscriptions, newSubscription.Id.ToString()); + client.AddOrSetAccount(azureAccount); + client.AddOrSetSubscription(newSubscription); + client.Profile.Save(); + + client = new ProfileClient(); + + dataStore.WriteFile("ImportPublishSettingsLoadsAndReturnsSubscriptions.publishsettings", + Properties.Resources.ValidProfile); + + client.AddOrSetEnvironment(azureEnvironment); + var subscriptions = client.ImportPublishSettings("ImportPublishSettingsLoadsAndReturnsSubscriptions.publishsettings", azureEnvironment.Name); + + Assert.Equal(2, client.Profile.Accounts.Count()); + var certAccount = client.Profile.Accounts.Values.First(a => a.Type == AzureAccount.AccountType.Certificate); + var userAccount = client.Profile.Accounts.Values.First(a => a.Type == AzureAccount.AccountType.User); + + Assert.True(subscriptions.All(s => s.Account == certAccount.Id)); + Assert.Equal(azureAccount.Id, client.Profile.Subscriptions.Values.First(s => s.Id == newSubscription.Id).Account); + + Assert.True(userAccount.GetPropertyAsArray(AzureAccount.Property.Subscriptions).Contains(newSubscription.Id.ToString())); + Assert.True(certAccount.GetPropertyAsArray(AzureAccount.Property.Subscriptions).Contains(newSubscription.Id.ToString())); + + Assert.Equal(6, subscriptions.Count); + Assert.Equal(6, client.Profile.Subscriptions.Count); + } + + private void SetMocks(List rdfeSubscriptions, + List csmSubscriptions) + { + ClientMocks clientMocks = new ClientMocks(new Guid(defaultSubscription)); + + clientMocks.LoadRdfeSubscriptions(rdfeSubscriptions); + clientMocks.LoadCsmSubscriptions(csmSubscriptions); + + AzureSession.ClientFactory = new MockClientFactory(new object[] { clientMocks.RdfeSubscriptionClientMock.Object, + clientMocks.CsmSubscriptionClientMock.Object }); + + AzureSession.AuthenticationFactory = new MockTokenAuthenticationFactory(); + } + + private void SetMockData() + { + rdfeSubscription1 = new Subscriptions.Models.SubscriptionListOperationResponse.Subscription + { + SubscriptionId = "16E3F6FD-A3AA-439A-8FC4-1F5C41D2AD1E", + SubscriptionName = "RdfeSub1", + SubscriptionStatus = Subscriptions.Models.SubscriptionStatus.Active, + ActiveDirectoryTenantId = "Common" + }; + rdfeSubscription2 = new Subscriptions.Models.SubscriptionListOperationResponse.Subscription + { + SubscriptionId = "26E3F6FD-A3AA-439A-8FC4-1F5C41D2AD1E", + SubscriptionName = "RdfeSub2", + SubscriptionStatus = Subscriptions.Models.SubscriptionStatus.Active, + ActiveDirectoryTenantId = "Common" + }; + csmSubscription1 = new Azure.Subscriptions.Models.Subscription + { + Id = "Subscriptions/36E3F6FD-A3AA-439A-8FC4-1F5C41D2AD1E", + DisplayName = "CsmSub1", + State = "Active", + SubscriptionId = "36E3F6FD-A3AA-439A-8FC4-1F5C41D2AD1E" + }; + csmSubscription1withDuplicateId = new Azure.Subscriptions.Models.Subscription + { + Id = "Subscriptions/16E3F6FD-A3AA-439A-8FC4-1F5C41D2AD1E", + DisplayName = "RdfeSub1", + State = "Active", + SubscriptionId = "16E3F6FD-A3AA-439A-8FC4-1F5C41D2AD1E" + }; + csmSubscription2 = new Azure.Subscriptions.Models.Subscription + { + Id = "Subscriptions/46E3F6FD-A3AA-439A-8FC4-1F5C41D2AD1E", + DisplayName = "CsmSub2", + State = "Active", + SubscriptionId = "46E3F6FD-A3AA-439A-8FC4-1F5C41D2AD1E" + }; + azureSubscription1 = new AzureSubscription + { + Id = new Guid("56E3F6FD-A3AA-439A-8FC4-1F5C41D2AD1E"), + Name = "LocalSub1", + Environment = "Test", + Account = "test", + Properties = new Dictionary + { + { AzureSubscription.Property.Default, "True" } + } + }; + azureSubscription2 = new AzureSubscription + { + Id = new Guid("66E3F6FD-A3AA-439A-8FC4-1F5C41D2AD1E"), + Name = "LocalSub2", + Environment = "Test", + Account = "test" + }; + azureSubscription3withoutUser = new AzureSubscription + { + Id = new Guid("76E3F6FD-A3AA-439A-8FC4-1F5C41D2AD1E"), + Name = "LocalSub3", + Environment = "Test", + }; + azureEnvironment = new AzureEnvironment + { + Name = "Test", + Endpoints = new Dictionary + { + { AzureEnvironment.Endpoint.ServiceManagement, "https://umapi.rdfetest.dnsdemo4.com:8443/" }, + { AzureEnvironment.Endpoint.ManagementPortalUrl, "https://windows.azure-test.net" }, + { AzureEnvironment.Endpoint.AdTenant, "https://login.windows-ppe.net/" }, + { AzureEnvironment.Endpoint.ActiveDirectory, "https://login.windows-ppe.net/" }, + { AzureEnvironment.Endpoint.Gallery, "https://current.gallery.azure-test.net" }, + { AzureEnvironment.Endpoint.ResourceManager, "https://api-current.resources.windows-int.net/" }, + } + }; + azureAccount = new AzureAccount + { + Id = "test", + Type = AzureAccount.AccountType.User, + Properties = new Dictionary + { + { AzureAccount.Property.Subscriptions, azureSubscription1.Id + "," + azureSubscription2.Id } + } + }; + newProfileDataPath = System.IO.Path.Combine(AzurePowerShell.ProfileDirectory, AzurePowerShell.ProfileFile); + oldProfileDataPath = System.IO.Path.Combine(AzurePowerShell.ProfileDirectory, AzurePowerShell.OldProfileFile); + oldProfileDataPathError = System.IO.Path.Combine(AzurePowerShell.ProfileDirectory, AzurePowerShell.OldProfileFileBackup); + oldProfileData = @" + + AzureCloud + + + https://management.core.windows.net/ + https://login.windows-ppe.net/ + Common + https://current.gallery.azure-test.net + http://go.microsoft.com/fwlink/?LinkId=254433 + Current + d:\Code\azure.publishsettings + https://api-current.resources.windows-int.net/ + https://umapi.rdfetest.dnsdemo4.com:8443/ + .database.windows.net + + trafficmanager.net + + + https://management.core.windows.net/ + https://login.windows-ppe.net/ + Common + https://df.gallery.azure-test.net + https://windows.azure-test.net + Dogfood + https://auxnext.windows.azure-test.net/publishsettings/index + https://api-dogfood.resources.windows-int.net + https://management-preview.core.windows-int.net/ + .database.windows.net + + trafficmanager.net + + + + + + + + + + + true + + + https://management.core.windows.net/ + Test + + + .database.windows.net + 06E3F6FD-A3AA-439A-8FC4-1F5C41D2AD1E + trafficmanager.net + + + + + 123 + test@mail.com + + + true + + + https://management-preview.core.windows-int.net/ + Test 2 + + + .database.windows.net + 06E3F6FD-A3AA-439A-8FC4-1F5C41D2AD1F + trafficmanager.net + + + https://login.windows.net/ + https://management.core.windows.net/ + 72f988bf-86f1-41af-91ab-2d7cd011db47 + test@mail.com + + + false + + 3AF24D48B97730E5C4C9CCB12397B5E046F79E09 + https://management.core.windows.net/ + Test 3 + + + .database.windows.net + d1e52cbc-b073-42e2-a0a0-c2f547118a6f + trafficmanager.net + + + + + + + + + false + + 3AF24D48B97730E5C4C9CCB12397B5E046F79E09 + https://management.core.chinacloudapi.cn/ + Mooncake Test + + + .database.windows.net + c14d7dc5-ed4d-4346-a02f-9f1bcf78fb66 + trafficmanager.net + + + "; + + oldProfileDataBadSubscription = @" + + AzureCloud + + + + + + + + + + + true + + + https://management.core.windows.net/ + Test Nill ID + + + .database.windows.net + + trafficmanager.net + + + + + + test@mail.com + + + true + + + Bad Data + Test Bad Management Endpoint + + + .database.windows.net + 06E3F6FD-A3AA-439A-8FC4-1F5C41D2AD1F + trafficmanager.net + + + + + + test@mail.com + + + true + + + + Test Null Management Endpoint + + + .database.windows.net + 06E3F6FD-A3AA-439A-8FC4-1F5C41D2ADFF + trafficmanager.net + + + https://login.windows.net/ + https://management.core.windows.net/ + 72f988bf-86f1-41af-91ab-2d7cd011db47 + test@mail.com + + + false + + 3AF24D48B97730E5C4C9CCB12397B5E046F79E99 + https://management.core.windows.net/ + Test Bad Cert + + + .database.windows.net + d1e52cbc-b073-42e2-a0a0-c2f547118a6f + trafficmanager.net + + + "; + + oldProfileDataCorruptedFile = @" + + AzureCloud + + + https://management.core.windows.net/ + https://login.windows-ppe.net/ + Common + https://current.gallery.azure-test.net + http://go.microsoft.com/fwlink/?LinkId=254433 + Current + d:\Code\azure.publishsettings + https://api-current.resources.windows-int.net/ + https://umapi.rdfetest.dnsdemo4.com:8443/ + .database.windows.net + + trafficmanager.net + + + + "; + + jsonProfileWithoutAccount = @"{ + ""Environments"": [], + ""Subscriptions"": [ + { + ""Id"": ""7e11f45f-70e6-430a-a4fc-af338aa22c11"", + ""Name"": ""Test"", + ""Environment"": ""AzureCloud"", + ""Account"": ""test@mail.com"", + ""Properties"": { + ""SupportedModes"": ""AzureServiceManagement"", + ""Default"": ""True"", + ""StorageAccount"": ""rjfmmanagement"" + } + } + ], + ""Accounts"": [] + }"; + + jsonProfileWithBadData = @"{ + ""Environments"": [], + ""Subscriptions"": { + { + ""Id"": ""7e11f45f-70e6-430a-a4fc-af338aa22c11"", + ""Name"": ""Test"", + ""Environment"": ""AzureCloud"", + ""Account"": ""test@mail.com"", + ""Properties"": { + ""SupportedModes"": ""AzureServiceManagement"", + ""Default"": ""True"", + ""StorageAccount"": ""rjfmmanagement"" + } + } + ], + ""Accounts"": [] + }"; + } + } +} diff --git a/src/Common/Commands.Common.Test/Common/ProfileCmdltsTests.cs b/src/Common/Commands.Common.Test/Common/ProfileCmdltsTests.cs new file mode 100644 index 000000000000..c6902a22fdd3 --- /dev/null +++ b/src/Common/Commands.Common.Test/Common/ProfileCmdltsTests.cs @@ -0,0 +1,738 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Management.Automation.Language; +using System.Reflection; +using System.Security.Cryptography.X509Certificates; +using System.Text; +using Microsoft.IdentityModel.Clients.ActiveDirectory; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Profile; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.Authentication; +using Moq; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.Common.Test.Common +{ + public class ProfileCmdltsTests + { + private AzureSubscription azureSubscription1; + private AzureSubscription azureSubscription2; + private AzureEnvironment azureEnvironment; + private AzureAccount azureAccount; + private MockCommandRuntime commandRuntimeMock; + private X509Certificate2 SampleCertificate = new X509Certificate2(Convert.FromBase64String(@"MIIKJAIBAzCCCeQGCSqGSIb3DQEHAaCCCdUEggnRMIIJzTCCBe4GCSqGSIb3DQEHAaCCBd8EggXbMIIF1zCCBdMGCyqGSIb3DQEMCgECoIIE7jCCBOowHAYKKoZIhvcNAQwBAzAOBAjilB4DFutYJwICB9AEggTItMCor/6dq+ynHyoo82U2N8bT9fBn57xuvF4zTtZdl503n+q48ZE5SLcUFoeAZkrYoCiyPn4ayVA4pfAHou5I2XEG1B4YF46hD0Bz0igWRSrsVigdoYP98BGGaMgl43d9AQGeV8iJ3d3In/TxMGjHUYzZwoIg1jE7xhQ8dMr2Xenw8pLrxl8FybI1isyxzAUjFE7E/Znv9DYi83VNwjC1uPg8q16PzXUQ/smFVzoZMtvmp8MxPrnI/gHqcS5g7SnnisTLmJcjqdLVywBZqiMo1ALs90EEgc7qgbim9lxGczUh+SI9cj2m5w9XMmXro4XJNJTLFG26DDOVMPfMSr9ij9P4rmxckVK7nHrGhQpshrLr37dF5KGFo6mh79VUadbwn/a4rXjfX9gXm5N/ZS8wq3U4/4Pl7t5N+bwB5izt8JG4aMhX6M6jshNrpe/gZHI9u6jNAo1yRxNfBdoxA7P2sZdlHO4CYTc9zZcZqTgH2QjRLTelIDn17PEQL9L4rEzqhT322WMzNnSMH9TCu3D5l2RuO6hsHl0JK4saiq3s04kkYoLXF9i+ovS0xSmu0zxemnFAGB1q1mlwoWoD06zlXEjHM2Q3T2b8ip1tK6/GFpU8Qs5BOUDanBOCqVLWlyvM/ilXUyN9cyLRMKM1sgEmn5ue0wsZlflU6egqChF8qjSJzq/34FgTjPazvkXkXv0e2vBz5+qzeC/1R8xySdFoehglny42VTkCRH4BzhoXf+MrfrC6tW85WCTKOj8SiTSzYXRragIwfG8RyLViOzdIW9pEAJF3UOloKOGGL1NREAnRPgxm9UVxD1oUj+pqYkPRRXcHuEnbiYEqE8Dgwk6GaSVOZ4CKjKAcapOwwW8bTxHgFOCrwgZhxIFXQhIZVoH8NphqN2WWwIUPa1gsc3uPwVXecgt8y8S01QEYCCFo9dT5sBS0rAOXMTOnSudWSHvz7c36IJSG2KyJwW3YO2UopIQ1V14MBZQhwUyddUILeuOy50u1j2eVOV3XESHO99oNP9FfalmgZw19LQDqX8S861x1w+GuU/NG//LZ0aXXaw1IhddIMZlpZVTADMunXIJbd0OiunfblXFwGZ33M1y/wGvFAZ6ofOuZv6vM0kmtufg3AHl/Vg+jzLOp1bYbKx4f7FHoYAerV88EA/ELXr2NTOLwwRYdk0cLWk4VY2lCLs8lcyoIUrcOS/+af8oX8dgJo9qkx2AiKp6AgYAWwrdpolOH7sMLmtu1rrthoMesExLz6xpUq/rYrWQJuyXWUmwbdxpDYFP8spqcW3KdbroNWhPEvM0tdocSK6lPWNnFMgqbb2qJJqjyV87LBZPEpHI8TPraofE7h4NWjXx/OqA6/dF1t3RvrvYqyC7kvrnaJ2LWfQI/88K9s7LAVvfDIbxWtIadrGXlo4gbtbQDSFzjve123DngBJkXqpzqRoL7mdpFvsgpg0upIKQ1fIbtaksC115g8BGBOzwGlo0Y3f4+ob6++OkePHoLkGhLahCMyDmGV1mxFz3ZUkXyxmfPSeynwXe/N8TxeZ2ixLZMF3sa61CpFsuHfEmVEetFxP5t3rrO5ZIbE87KVtvl6jCr8JQ3h81TZJBaeu8iiNC0MVspJpNQ/irYFElTMYHRMBMGCSqGSIb3DQEJFTEGBAQBAAAAMFsGCSqGSIb3DQEJFDFOHkwAewA0ADgANQBFADQAOQBCADYALQBFAEUARQA4AC0ANAA3ADUAQgAtADgAOQAwAEQALQA5ADcAQQA3ADYARgAyADQANgBEADkAMwB9MF0GCSsGAQQBgjcRATFQHk4ATQBpAGMAcgBvAHMAbwBmAHQAIABTAG8AZgB0AHcAYQByAGUAIABLAGUAeQAgAFMAdABvAHIAYQBnAGUAIABQAHIAbwB2AGkAZABlAHIwggPXBgkqhkiG9w0BBwagggPIMIIDxAIBADCCA70GCSqGSIb3DQEHATAcBgoqhkiG9w0BDAEGMA4ECG9kWMFPd2j2AgIH0ICCA5AUBLyrnhFVIYZKNWVLOWn0nfwmhADWS2FA3LGyGirb/lgpPcolLiQwGnXih0xxESn1CsZcWDpXiUvAfjQF1kxKHyCIUQBkrKQliYIT+RErliVuAY/vv1YW2Zj+bPUtTZKXUDzIPjNgb43+uxvf/wu+gGhAV/dV5oIWLjFhC1u4+Gp/LA5C6j60NtBXG7barSflAWTSOjGt2IIb5mBrUw+GkrhoYOqA+HYG40j2fkmkWpMCkImzcxxEM65ZElGUt7H1QY+GSRAxt7icA5ka9L+A0UM8a1SCFhbBK6Voo0IAkBZctJ6I7h4znhoHtqMDYYzraaYDVAK4SPdwOUMUyYdai0QwOYSL3frwVzC/ZHvCJkRmOsQXj9U44OGoXXrJ4rWIQIkcxFO3rEC3alI9lV5h5w73DWQRjex8Nz214B1yBRdlkoC/HQpgJ6IwFfEyJOn/lGgqkRPbgntTKSjNQZr5Ot60Z1SUYmmcMTpB8jRg+hy0LbWmx+79q9ERUnLO4yrtcXjQza12/FwAdpJOwbFrXMZb3QcuhQfn9aDF9/iNRkhTdxDmumS/C5gjZSYBzTugGDWsyS1hqws7LaYfcs6aWWRafqxt68cpNy4FaNXZ3XwXRVzuH+brnGvnWXRqhzwCbeGxEKDCEPxO9hO8NVrndsGlGfTZmxfTkKnPyRPD6vk4BG0Rc5BniyrmhnaZgSq0M04MeoAjp1s6S8CcIG73H5KkmoqQwSiKUbY3aA15nxqYhQj6L83WK5dPnVlmaV/xOeqkggzsdkaa+eQfA1e5RR27Gkyr5Rl20PQUR6J/sIGWIVCSSaqD2kxmDTODEORsF7jhL4YXZr96hqvNWtyNncxrqvjPsaFi/P2JFxjfZ8wmnF1HDsVW4W/i8cdRTyEz7Go4kzoRvSvC2sCPRAMa3D+o341r7L0hBlCnFfMU5Le8jatMKsw+Nk1TeOc4Cvc+w3gczSKrlhJnPtJjVZ67kKe8Ror8mKOP6afSr27avEizUYvJcCpKztUM59ukEbM2chEb2rrFPWxnB67KaLF825pRm+6Nl3mx0jaPDgK2ToydGfuVBA+9TSpnuV26imsd+K2yL2nwrdvBJPE/t2lPzVIR0hnf4AJ8/9BR0vTGmxiWwy8VMxrS3PyouLPZMXAgdT6ddRVwmewNjTe5g/tciGazIW+nROgg6fsgyObMp7keONMvtFMrJQLa2oKarGkwNzAfMAcGBSsOAwIaBBQXFDnqplMX7OuyknHK7B+HA/N8tAQUsL21+IY37DPL968vhVzqz09W/so="), string.Empty); + private MockDataStore dataStore; + + public ProfileCmdltsTests() : base() + { + dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + commandRuntimeMock = new MockCommandRuntime(); + SetMockData(); + AzureSession.SetCurrentContext(null, null, null); + } + + [Fact] + public void ClearAzureProfileClearsDefaultProfile() + { + ClearAzureProfileCommand cmdlt = new ClearAzureProfileCommand(); + // Setup + ProfileClient client = new ProfileClient(); + client.AddOrSetAccount(azureAccount); + client.AddOrSetEnvironment(azureEnvironment); + client.AddOrSetSubscription(azureSubscription1); + client.Profile.Save(); + + cmdlt.CommandRuntime = commandRuntimeMock; + cmdlt.Force = new SwitchParameter(true); + + // Act + cmdlt.InvokeBeginProcessing(); + cmdlt.ExecuteCmdlet(); + cmdlt.InvokeEndProcessing(); + + // Verify + client = new ProfileClient(); + Assert.Equal(0, client.Profile.Subscriptions.Count); + Assert.Equal(0, client.Profile.Accounts.Count); + Assert.Equal(2, client.Profile.Environments.Count); //only default environments + } + + [Fact] + public void ClearAzureProfileClearsCustomProfile() + { + string subscriptionDataFile = "C:\\foo.json"; + + ClearAzureProfileCommand cmdlt = new ClearAzureProfileCommand(); + // Setup + ProfileClient client = new ProfileClient(subscriptionDataFile); + client.AddOrSetAccount(azureAccount); + client.AddOrSetEnvironment(azureEnvironment); + client.AddOrSetSubscription(azureSubscription1); + client.Profile.Save(); + + cmdlt.CommandRuntime = commandRuntimeMock; + cmdlt.Force = new SwitchParameter(true); + cmdlt.SubscriptionDataFile = subscriptionDataFile; + + // Act + cmdlt.InvokeBeginProcessing(); + cmdlt.ExecuteCmdlet(); + cmdlt.InvokeEndProcessing(); + + // Verify + client = new ProfileClient(subscriptionDataFile); + Assert.Equal(0, client.Profile.Subscriptions.Count); + Assert.Equal(0, client.Profile.Accounts.Count); + Assert.Equal(2, client.Profile.Environments.Count); //only default environments + } + + [Fact] + public void ClearAzureProfileClearsTokenCache() + { + string cacheFileName = Path.Combine(AzurePowerShell.ProfileDirectory, "TokenCache.dat"); + ProtectedFileTokenCache tokenCache = ProtectedFileTokenCache.Instance; + tokenCache.HasStateChanged = true; + + // HACK: Do not look at this code + TokenCacheNotificationArgs args = new TokenCacheNotificationArgs(); + typeof(TokenCacheNotificationArgs).GetProperty("ClientId").SetValue(args, "123"); + typeof(TokenCacheNotificationArgs).GetProperty("Resource").SetValue(args, "123"); + typeof(TokenCacheNotificationArgs).GetProperty("TokenCache").SetValue(args, tokenCache); + typeof(TokenCacheNotificationArgs).GetProperty("UniqueId").SetValue(args, "test@live.com"); + typeof(TokenCacheNotificationArgs).GetProperty("DisplayableId").SetValue(args, "test@live.com"); + AuthenticationResult authenticationResult = + typeof(AuthenticationResult).GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, + null, new Type[] { typeof(string), typeof(string), typeof(string), typeof(DateTimeOffset) }, null).Invoke(new object[] + { + "foo", "123", "123", + new DateTimeOffset(DateTime.Now.AddDays(1)) + }) as AuthenticationResult; + var storeToCache = typeof(TokenCache).GetMethod("StoreToCache", BindingFlags.Instance | BindingFlags.NonPublic); + storeToCache.Invoke(tokenCache, + new object[] { authenticationResult, "Common", "123", "123", 0 }); + + tokenCache.AfterAccess.Invoke(args); + + Assert.Equal(1, tokenCache.ReadItems().Count()); + + ClearAzureProfileCommand cmdlt = new ClearAzureProfileCommand(); + + cmdlt.CommandRuntime = commandRuntimeMock; + cmdlt.Force = new SwitchParameter(true); + + // Act + cmdlt.InvokeBeginProcessing(); + cmdlt.ExecuteCmdlet(); + cmdlt.InvokeEndProcessing(); + + // Verify + Assert.Equal(0, tokenCache.ReadItems().Count()); + } + + [Fact] + public void SetAzureSubscriptionAddsSubscriptionWithCertificate() + { + SetAzureSubscriptionCommand cmdlt = new SetAzureSubscriptionCommand(); + // Setup + cmdlt.CommandRuntime = commandRuntimeMock; + cmdlt.SubscriptionId = Guid.NewGuid().ToString(); + cmdlt.SubscriptionName = "NewSubscriptionName"; + cmdlt.CurrentStorageAccountName = "NewCloudStorage"; + cmdlt.Certificate = SampleCertificate; + + // Act + cmdlt.InvokeBeginProcessing(); + cmdlt.ExecuteCmdlet(); + cmdlt.InvokeEndProcessing(); + + // Verify + ProfileClient client = new ProfileClient(); + var newSubscription = client.Profile.Subscriptions[new Guid(cmdlt.SubscriptionId)]; + var newAccount = client.Profile.Accounts[SampleCertificate.Thumbprint]; + Assert.Equal(cmdlt.SubscriptionName, newSubscription.Name); + Assert.Equal(EnvironmentName.AzureCloud, newSubscription.Environment); + Assert.Equal(cmdlt.CurrentStorageAccountName, newSubscription.GetProperty(AzureSubscription.Property.StorageAccount)); + + Assert.Equal(newAccount.Id, newSubscription.Account); + Assert.Equal(AzureAccount.AccountType.Certificate, newAccount.Type); + Assert.Equal(SampleCertificate.Thumbprint, newAccount.Id); + Assert.Equal(cmdlt.SubscriptionId, newAccount.GetProperty(AzureAccount.Property.Subscriptions)); + } + + [Fact] + public void SetAzureSubscriptionDerivesEnvironmentFromEnvironmentParameterOnAdd() + { + SetAzureSubscriptionCommand cmdlt = new SetAzureSubscriptionCommand(); + // Setup + ProfileClient client = new ProfileClient(); + client.AddOrSetEnvironment(azureEnvironment); + client.Profile.Save(); + + cmdlt.CommandRuntime = commandRuntimeMock; + cmdlt.SubscriptionId = Guid.NewGuid().ToString(); + cmdlt.SubscriptionName = "NewSubscriptionName"; + cmdlt.CurrentStorageAccountName = "NewCloudStorage"; + cmdlt.Environment = azureEnvironment.Name; + cmdlt.Certificate = SampleCertificate; + + // Act + cmdlt.InvokeBeginProcessing(); + cmdlt.ExecuteCmdlet(); + cmdlt.InvokeEndProcessing(); + + // Verify + client = new ProfileClient(); + var newSubscription = client.Profile.Subscriptions[new Guid(cmdlt.SubscriptionId)]; + Assert.Equal(cmdlt.SubscriptionName, newSubscription.Name); + Assert.Equal(cmdlt.Environment, newSubscription.Environment); + Assert.Equal(cmdlt.CurrentStorageAccountName, newSubscription.GetProperty(AzureSubscription.Property.StorageAccount)); + } + + [Fact] + public void SetAzureSubscriptionThrowsExceptionWithoutCertificateOnAdd() + { + SetAzureSubscriptionCommand cmdlt = new SetAzureSubscriptionCommand(); + // Setup + ProfileClient client = new ProfileClient(); + client.AddOrSetEnvironment(azureEnvironment); + client.Profile.Save(); + + cmdlt.CommandRuntime = commandRuntimeMock; + cmdlt.SubscriptionId = Guid.NewGuid().ToString(); + cmdlt.SubscriptionName = "NewSubscriptionName"; + cmdlt.CurrentStorageAccountName = "NewCloudStorage"; + cmdlt.Environment = azureEnvironment.Name; + + // Verify + cmdlt.InvokeBeginProcessing(); + Assert.Throws(()=> cmdlt.ExecuteCmdlet()); + } + + [Fact] + public void SetAzureSubscriptionDerivesEnvironmentFromEnvironmentParameterOnSet() + { + SetAzureSubscriptionCommand cmdlt = new SetAzureSubscriptionCommand(); + // Setup + ProfileClient client = new ProfileClient(); + client.AddOrSetAccount(azureAccount); + client.AddOrSetEnvironment(azureEnvironment); + client.AddOrSetSubscription(azureSubscription1); + client.Profile.Save(); + + cmdlt.CommandRuntime = commandRuntimeMock; + cmdlt.SubscriptionId = azureSubscription1.Id.ToString(); + cmdlt.CurrentStorageAccountName = "NewCloudStorage"; + cmdlt.Environment = azureEnvironment.Name; + + // Act + cmdlt.InvokeBeginProcessing(); + cmdlt.ExecuteCmdlet(); + cmdlt.InvokeEndProcessing(); + + // Verify + client = new ProfileClient(); + var newSubscription = client.Profile.Subscriptions[new Guid(cmdlt.SubscriptionId)]; + Assert.Equal(cmdlt.Environment, newSubscription.Environment); + Assert.Equal(cmdlt.CurrentStorageAccountName, newSubscription.GetProperty(AzureSubscription.Property.StorageAccount)); + } + + [Fact] + public void SetAzureSubscriptionDerivesEnvironmentFromServiceEndpointParameterOnSet() + { + SetAzureSubscriptionCommand cmdlt = new SetAzureSubscriptionCommand(); + // Setup + ProfileClient client = new ProfileClient(); + client.AddOrSetAccount(azureAccount); + client.AddOrSetEnvironment(azureEnvironment); + client.AddOrSetSubscription(azureSubscription1); + client.Profile.Save(); + + cmdlt.CommandRuntime = commandRuntimeMock; + cmdlt.SubscriptionId = azureSubscription1.Id.ToString(); + cmdlt.CurrentStorageAccountName = "NewCloudStorage"; + cmdlt.ServiceEndpoint = azureEnvironment.GetEndpoint(AzureEnvironment.Endpoint.ServiceManagement); + + // Act + cmdlt.InvokeBeginProcessing(); + cmdlt.ExecuteCmdlet(); + cmdlt.InvokeEndProcessing(); + + // Verify + client = new ProfileClient(); + var newSubscription = client.Profile.Subscriptions[new Guid(cmdlt.SubscriptionId)]; + Assert.Equal(cmdlt.Environment, newSubscription.Environment); + Assert.Equal(cmdlt.CurrentStorageAccountName, + newSubscription.GetProperty(AzureSubscription.Property.StorageAccount)); + } + + [Fact] + public void SetAzureSubscriptionDerivesEnvironmentFromResourcesEndpointParameterOnSet() + { + SetAzureSubscriptionCommand cmdlt = new SetAzureSubscriptionCommand(); + // Setup + ProfileClient client = new ProfileClient(); + client.AddOrSetAccount(azureAccount); + client.AddOrSetEnvironment(azureEnvironment); + client.AddOrSetSubscription(azureSubscription1); + client.Profile.Save(); + + cmdlt.CommandRuntime = commandRuntimeMock; + cmdlt.SubscriptionId = azureSubscription1.Id.ToString(); + cmdlt.CurrentStorageAccountName = "NewCloudStorage"; + cmdlt.ResourceManagerEndpoint = azureEnvironment.GetEndpoint(AzureEnvironment.Endpoint.ResourceManager); + + // Act + cmdlt.InvokeBeginProcessing(); + cmdlt.ExecuteCmdlet(); + cmdlt.InvokeEndProcessing(); + + // Verify + client = new ProfileClient(); + var newSubscription = client.Profile.Subscriptions[new Guid(cmdlt.SubscriptionId)]; + Assert.Equal(cmdlt.Environment, newSubscription.Environment); + Assert.Equal(cmdlt.CurrentStorageAccountName, newSubscription.GetProperty(AzureSubscription.Property.StorageAccount)); + } + + [Fact] + public void SetAzureSubscriptionDerivesEnvironmentFromBothEndpointParameters() + { + SetAzureSubscriptionCommand cmdlt = new SetAzureSubscriptionCommand(); + // Setup + ProfileClient client = new ProfileClient(); + client.AddOrSetAccount(azureAccount); + client.AddOrSetEnvironment(azureEnvironment); + client.AddOrSetSubscription(azureSubscription1); + client.Profile.Save(); + + cmdlt.CommandRuntime = commandRuntimeMock; + cmdlt.SubscriptionId = azureSubscription1.Id.ToString(); + cmdlt.CurrentStorageAccountName = "NewCloudStorage"; + cmdlt.ServiceEndpoint = azureEnvironment.GetEndpoint(AzureEnvironment.Endpoint.ServiceManagement); + cmdlt.ResourceManagerEndpoint = azureEnvironment.GetEndpoint(AzureEnvironment.Endpoint.ResourceManager); + + // Act + cmdlt.InvokeBeginProcessing(); + cmdlt.ExecuteCmdlet(); + cmdlt.InvokeEndProcessing(); + + // Verify + client = new ProfileClient(); + var newSubscription = client.Profile.Subscriptions[new Guid(cmdlt.SubscriptionId)]; + Assert.Equal(cmdlt.Environment, newSubscription.Environment); + Assert.Equal(cmdlt.CurrentStorageAccountName, newSubscription.GetProperty(AzureSubscription.Property.StorageAccount)); + } + + [Fact] + public void SetAzureSubscriptionUpdatesSubscriptionWithCertificate() + { + SetAzureSubscriptionCommand cmdlt = new SetAzureSubscriptionCommand(); + + // Setup + ProfileClient client = new ProfileClient(); + client.AddOrSetAccount(azureAccount); + client.AddOrSetEnvironment(azureEnvironment); + client.AddOrSetSubscription(azureSubscription1); + client.Profile.Save(); + + cmdlt.CommandRuntime = commandRuntimeMock; + cmdlt.SubscriptionId = azureSubscription1.Id.ToString(); + cmdlt.CurrentStorageAccountName = "NewCloudStorage"; + cmdlt.Certificate = SampleCertificate; + + // Act + cmdlt.InvokeBeginProcessing(); + cmdlt.ExecuteCmdlet(); + cmdlt.InvokeEndProcessing(); + + // Verify + client = new ProfileClient(); + var newSubscription = client.Profile.Subscriptions[new Guid(cmdlt.SubscriptionId)]; + var newAccount = client.Profile.Accounts[SampleCertificate.Thumbprint]; + var existingAccount = client.Profile.Accounts[azureAccount.Id]; + Assert.Equal(azureEnvironment.Name, newSubscription.Environment); + Assert.Equal(cmdlt.CurrentStorageAccountName, newSubscription.GetProperty(AzureSubscription.Property.StorageAccount)); + + Assert.Equal(newAccount.Id, newSubscription.Account); + Assert.Equal(AzureAccount.AccountType.Certificate, newAccount.Type); + Assert.Equal(SampleCertificate.Thumbprint, newAccount.Id); + Assert.Equal(cmdlt.SubscriptionId, newAccount.GetProperty(AzureAccount.Property.Subscriptions)); + + Assert.Equal(azureAccount.Id, existingAccount.Id); + Assert.Equal(AzureAccount.AccountType.User, existingAccount.Type); + Assert.True(existingAccount.GetPropertyAsArray(AzureAccount.Property.Subscriptions).Contains(cmdlt.SubscriptionId)); + } + + [Fact] + public void ImportPublishSettingsFileSelectsCorrectEnvironment() + { + ImportAzurePublishSettingsCommand cmdlt = new ImportAzurePublishSettingsCommand(); + + // Setup + ProfileClient.DataStore.WriteFile("ImportPublishSettingsFileSelectsCorrectEnvironment.publishsettings", + Properties.Resources.ValidProfileChina); + ProfileClient client = new ProfileClient(); + var oldDataStore = FileUtilities.DataStore; + FileUtilities.DataStore = ProfileClient.DataStore; + var expectedEnv = "AzureChinaCloud"; + var expected = client.ImportPublishSettings("ImportPublishSettingsFileSelectsCorrectEnvironment.publishsettings", null); + + cmdlt.CommandRuntime = commandRuntimeMock; + cmdlt.ProfileClient = new ProfileClient(); + cmdlt.PublishSettingsFile = "ImportPublishSettingsFileSelectsCorrectEnvironment.publishsettings"; + + try + { + // Act + cmdlt.InvokeBeginProcessing(); + cmdlt.ExecuteCmdlet(); + cmdlt.InvokeEndProcessing(); + + // Verify + foreach (var subscription in expected) + { + Assert.Equal(cmdlt.ProfileClient.GetSubscription(subscription.Id).Environment, expectedEnv); + } + Assert.Equal(1, commandRuntimeMock.OutputPipeline.Count); + } + finally + { + // Cleanup + FileUtilities.DataStore = oldDataStore; + } + } + + [Fact] + public void ImportPublishSettingsFileOverwritesEnvironment() + { + ImportAzurePublishSettingsCommand cmdlt = new ImportAzurePublishSettingsCommand(); + + // Setup + ProfileClient.DataStore.WriteFile("ImportPublishSettingsFileSelectsCorrectEnvironment.publishsettings", + Properties.Resources.ValidProfileChina); + ProfileClient client = new ProfileClient(); + var oldDataStore = FileUtilities.DataStore; + FileUtilities.DataStore = ProfileClient.DataStore; + var expectedEnv = "AzureCloud"; + var expected = client.ImportPublishSettings("ImportPublishSettingsFileSelectsCorrectEnvironment.publishsettings", expectedEnv); + + cmdlt.CommandRuntime = commandRuntimeMock; + cmdlt.ProfileClient = new ProfileClient(); + cmdlt.PublishSettingsFile = "ImportPublishSettingsFileSelectsCorrectEnvironment.publishsettings"; + cmdlt.Environment = expectedEnv; + + try + { + // Act + cmdlt.InvokeBeginProcessing(); + cmdlt.ExecuteCmdlet(); + cmdlt.InvokeEndProcessing(); + + // Verify + foreach (var subscription in expected) + { + Assert.Equal(cmdlt.ProfileClient.GetSubscription(subscription.Id).Environment, expectedEnv); + } + Assert.Equal(1, commandRuntimeMock.OutputPipeline.Count); + } + finally + { + // Cleanup + FileUtilities.DataStore = oldDataStore; + } + } + + [Fact] + public void SelectDefaultAzureSubscriptionByNameUpdatesProfile() + { + SelectAzureSubscriptionCommand cmdlt = new SelectAzureSubscriptionCommand(); + var client = SetupDefaultProfile(); + + // Setup + cmdlt.CommandRuntime = commandRuntimeMock; + cmdlt.SetParameterSet("SelectDefaultSubscriptionByNameParameterSet"); + cmdlt.SubscriptionName = azureSubscription2.Name; + cmdlt.Default = new SwitchParameter(true); + Assert.NotEqual(azureSubscription2.Id, client.Profile.DefaultSubscription.Id); + + // Act + cmdlt.InvokeBeginProcessing(); + cmdlt.ExecuteCmdlet(); + cmdlt.InvokeEndProcessing(); + + // Verify + client = new ProfileClient(); + Assert.NotNull(client.Profile.DefaultSubscription); + Assert.Equal(azureSubscription2.Id, client.Profile.DefaultSubscription.Id); + } + + [Fact] + public void SelectAzureSubscriptionByNameUpdatesProfile() + { + SelectAzureSubscriptionCommand cmdlt = new SelectAzureSubscriptionCommand(); + SetupDefaultProfile(); + + // Setup + cmdlt.CommandRuntime = commandRuntimeMock; + cmdlt.SetParameterSet("SelectSubscriptionByNameParameterSet"); + cmdlt.SubscriptionName = azureSubscription2.Name; + Assert.Null(AzureSession.CurrentContext.Subscription); + + // Act + cmdlt.InvokeBeginProcessing(); + cmdlt.ExecuteCmdlet(); + cmdlt.InvokeEndProcessing(); + + // Verify + Assert.NotNull(AzureSession.CurrentContext.Subscription); + Assert.Equal(azureSubscription2.Id, AzureSession.CurrentContext.Subscription.Id); + } + + [Fact] + public void SelectAzureSubscriptionWithoutPassthroughDoesNotPrint() + { + SelectAzureSubscriptionCommand cmdlt = new SelectAzureSubscriptionCommand(); + SetupDefaultProfile(); + + // Setup + cmdlt.CommandRuntime = commandRuntimeMock; + cmdlt.SetParameterSet("SelectSubscriptionByNameParameterSet"); + cmdlt.SubscriptionName = azureSubscription2.Name; + Assert.Null(AzureSession.CurrentContext.Subscription); + + // Act + cmdlt.InvokeBeginProcessing(); + cmdlt.ExecuteCmdlet(); + cmdlt.InvokeEndProcessing(); + + // Verify + Assert.Equal(0, commandRuntimeMock.OutputPipeline.Count); + } + + [Fact] + public void SelectAzureSubscriptionWithPassthroughPrintsSubscription() + { + SelectAzureSubscriptionCommand cmdlt = new SelectAzureSubscriptionCommand(); + SetupDefaultProfile(); + + // Setup + cmdlt.CommandRuntime = commandRuntimeMock; + cmdlt.SetParameterSet("SelectSubscriptionByNameParameterSet"); + cmdlt.SubscriptionName = azureSubscription2.Name; + cmdlt.PassThru = new SwitchParameter(true); + Assert.Null(AzureSession.CurrentContext.Subscription); + + // Act + cmdlt.InvokeBeginProcessing(); + cmdlt.ExecuteCmdlet(); + cmdlt.InvokeEndProcessing(); + + // Verify + Assert.Equal(1, commandRuntimeMock.OutputPipeline.Count); + Assert.True(commandRuntimeMock.OutputPipeline[0] is AzureSubscription); + } + + [Fact] + public void SelectDefaultAzureSubscriptionByIdAndNoDefaultUpdatesProfile() + { + SelectAzureSubscriptionCommand cmdlt = new SelectAzureSubscriptionCommand(); + var client = SetupDefaultProfile(); + + // Setup + cmdlt.CommandRuntime = commandRuntimeMock; + cmdlt.SetParameterSet("SelectDefaultSubscriptionByIdParameterSet"); + cmdlt.SubscriptionId = azureSubscription2.Id.ToString(); + cmdlt.Default = new SwitchParameter(true); + Assert.NotEqual(azureSubscription2.Id, client.Profile.DefaultSubscription.Id); + + // Act + cmdlt.InvokeBeginProcessing(); + cmdlt.ExecuteCmdlet(); + cmdlt.InvokeEndProcessing(); + + // Verify + client = new ProfileClient(); + Assert.NotNull(client.Profile.DefaultSubscription); + Assert.Equal(azureSubscription2.Id, client.Profile.DefaultSubscription.Id); + + cmdlt = new SelectAzureSubscriptionCommand(); + + // Setup + cmdlt.CommandRuntime = commandRuntimeMock; + cmdlt.SetParameterSet("NoDefaultSubscriptionParameterSet"); + cmdlt.NoDefault = new SwitchParameter(true); + + // Act + cmdlt.InvokeBeginProcessing(); + cmdlt.ExecuteCmdlet(); + cmdlt.InvokeEndProcessing(); + + // Verify + client = new ProfileClient(); + Assert.Null(client.Profile.DefaultSubscription); + } + + [Fact] + public void SelectAzureSubscriptionByIdAndNoCurrentUpdatesProfile() + { + SelectAzureSubscriptionCommand cmdlt = new SelectAzureSubscriptionCommand(); + SetupDefaultProfile(); + + // Setup + cmdlt.CommandRuntime = commandRuntimeMock; + cmdlt.SetParameterSet("SelectSubscriptionByIdParameterSet"); + cmdlt.SubscriptionId = azureSubscription2.Id.ToString(); + Assert.Null(AzureSession.CurrentContext.Subscription); + + // Act + cmdlt.InvokeBeginProcessing(); + cmdlt.ExecuteCmdlet(); + cmdlt.InvokeEndProcessing(); + + // Verify + Assert.NotNull(AzureSession.CurrentContext.Subscription); + Assert.Equal(azureSubscription2.Id, AzureSession.CurrentContext.Subscription.Id); + + cmdlt = new SelectAzureSubscriptionCommand(); + + // Setup + cmdlt.CommandRuntime = commandRuntimeMock; + cmdlt.SetParameterSet("NoCurrentSubscriptionParameterSet"); + cmdlt.NoCurrent = new SwitchParameter(true); + + // Act + cmdlt.InvokeBeginProcessing(); + cmdlt.ExecuteCmdlet(); + cmdlt.InvokeEndProcessing(); + + // Verify + Assert.Null(AzureSession.CurrentContext.Subscription); + } + + [Fact] + public void SelectAzureSubscriptionByInvalidIdThrowsException() + { + SelectAzureSubscriptionCommand cmdlt = new SelectAzureSubscriptionCommand(); + SetupDefaultProfile(); + + // Setup + cmdlt.CommandRuntime = commandRuntimeMock; + cmdlt.SetParameterSet("SelectSubscriptionByIdParameterSet"); + string invalidGuid = Guid.NewGuid().ToString(); + cmdlt.SubscriptionId = invalidGuid; + Assert.Null(AzureSession.CurrentContext.Subscription); + + // Act + cmdlt.InvokeBeginProcessing(); + try + { + cmdlt.ExecuteCmdlet(); + Assert.True(false); + } + catch (ArgumentException ex) + { + Assert.Contains(string.Format(Microsoft.WindowsAzure.Commands.Common.Properties.Resources.InvalidSubscriptionId, invalidGuid), ex.Message); + } + } + + [Fact] + public void SelectAzureSubscriptionByInvalidGuidThrowsException() + { + SelectAzureSubscriptionCommand cmdlt = new SelectAzureSubscriptionCommand(); + SetupDefaultProfile(); + + // Setup + cmdlt.CommandRuntime = commandRuntimeMock; + cmdlt.SetParameterSet("SelectSubscriptionByIdParameterSet"); + string invalidGuid = "foo"; + cmdlt.SubscriptionId = invalidGuid; + Assert.Null(AzureSession.CurrentContext.Subscription); + + // Act + cmdlt.InvokeBeginProcessing(); + try + { + cmdlt.ExecuteCmdlet(); + Assert.True(false); + } + catch (ArgumentException ex) + { + Assert.Contains(string.Format(Microsoft.WindowsAzure.Commands.Common.Properties.Resources.InvalidGuid, invalidGuid), ex.Message); + } + } + + private ProfileClient SetupDefaultProfile() + { + ProfileClient client = new ProfileClient(); + client.AddOrSetEnvironment(azureEnvironment); + client.AddOrSetAccount(azureAccount); + client.AddOrSetSubscription(azureSubscription1); + client.AddOrSetSubscription(azureSubscription2); + client.Profile.Save(); + return client; + } + + private void SetMockData() + { + azureSubscription1 = new AzureSubscription + { + Id = new Guid("56E3F6FD-A3AA-439A-8FC4-1F5C41D2AD1E"), + Name = "LocalSub1", + Environment = "Test", + Account = "test", + Properties = new Dictionary + { + { AzureSubscription.Property.Default, "True" } + } + }; + azureSubscription2 = new AzureSubscription + { + Id = new Guid("66E3F6FD-A3AA-439A-8FC4-1F5C41D2AD1E"), + Name = "LocalSub2", + Environment = "Test", + Account = "test" + }; + azureEnvironment = new AzureEnvironment + { + Name = "Test", + Endpoints = new Dictionary + { + { AzureEnvironment.Endpoint.ServiceManagement, "https://umapi.rdfetest.dnsdemo4.com:8443/" }, + { AzureEnvironment.Endpoint.ManagementPortalUrl, "https://windows.azure-test.net" }, + { AzureEnvironment.Endpoint.AdTenant, "https://login.windows-ppe.net/" }, + { AzureEnvironment.Endpoint.ActiveDirectory, "https://login.windows-ppe.net/" }, + { AzureEnvironment.Endpoint.Gallery, "https://current.gallery.azure-test.net" }, + { AzureEnvironment.Endpoint.ResourceManager, "https://api-current.resources.windows-int.net/" }, + } + }; + azureAccount = new AzureAccount + { + Id = "test", + Type = AzureAccount.AccountType.User, + Properties = new Dictionary + { + { AzureAccount.Property.Subscriptions, azureSubscription1.Id + "," + azureSubscription2.Id } + } + }; + } + } +} diff --git a/src/Common/Commands.Common.Test/Common/RemoveAzurePublishSettings.cs b/src/Common/Commands.Common.Test/Common/RemoveAzurePublishSettings.cs new file mode 100644 index 000000000000..07819a16ea4e --- /dev/null +++ b/src/Common/Commands.Common.Test/Common/RemoveAzurePublishSettings.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Common; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.Common +{ + public class RemoveAzurePublishSettingsCommand + { + public void RemovePublishSettingsProcess(string azureSdkDirPath) + { + ProfileClient.DataStore.EmptyDirectory(azureSdkDirPath); + } + } +} \ No newline at end of file diff --git a/src/Common/Commands.Common.Test/Common/ServicePrincipalStoreTests.cs b/src/Common/Commands.Common.Test/Common/ServicePrincipalStoreTests.cs new file mode 100644 index 000000000000..a3a8d4d59863 --- /dev/null +++ b/src/Common/Commands.Common.Test/Common/ServicePrincipalStoreTests.cs @@ -0,0 +1,177 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Runtime.InteropServices; +using System.Security; +using Microsoft.WindowsAzure.Commands.Common.Authentication; +using Xunit; +using Assert = Xunit.Assert; + +namespace Microsoft.WindowsAzure.Commands.Common.Test.Common +{ + public class ServicePrincipalStoreTests + { + [Fact] + public void CanStoreAndRetrieveSingleKeyCorrectly() + { + const string appId = "myServiceKeyTest"; + string tenantId = Guid.NewGuid().ToString(); + const string password = "My sekret password"; + + using (SecureString secret = SecureStringFromString(password)) + { + ServicePrincipalKeyStore.SaveKey(appId, tenantId, secret); + } + + try + { + string retrievedPassword; + using (SecureString secret = ServicePrincipalKeyStore.GetKey(appId, tenantId)) + { + retrievedPassword = StringFromSecureString(secret); + } + + Assert.Equal(password, retrievedPassword); + } + finally + { + ServicePrincipalKeyStore.DeleteKey(appId, tenantId); + } + } + + [Fact] + public void RetrievingNonExistingKeyReturnsNull() + { + const string appId = "myKeyTest"; + string tenantId = Guid.NewGuid().ToString(); + + SecureString ss = null; + try + { + ss = ServicePrincipalKeyStore.GetKey(appId, tenantId); + Assert.Null(ss); + } + finally + { + if (ss != null) + { + ss.Dispose(); + } + } + } + + [Fact] + public void DeletingKeyWorks() + { + const string appId = "myKeyTest"; + string tenantId = Guid.NewGuid().ToString(); + + using (SecureString ss = SecureStringFromString("sekret")) + { + ServicePrincipalKeyStore.SaveKey(appId, tenantId, ss); + } + + using (SecureString ss = ServicePrincipalKeyStore.GetKey(appId, tenantId)) + { + Assert.NotNull(ss); + } + + ServicePrincipalKeyStore.DeleteKey(appId, tenantId); + + using (SecureString ss = ServicePrincipalKeyStore.GetKey(appId, tenantId)) + { + Assert.Null(ss); + } + } + + [Fact] + public void CanStoreMultipleKeysIndependently() + { + const string appId = "myKeyTest"; + string tenant1 = Guid.NewGuid().ToString(); + string tenant2 = Guid.NewGuid().ToString(); + const string pwd1 = "password one"; + const string pwd2 = "second password"; + + using (SecureString ss = SecureStringFromString(pwd1)) + { + ServicePrincipalKeyStore.SaveKey(appId, tenant1, ss); + } + + using (SecureString ss = SecureStringFromString(pwd2)) + { + ServicePrincipalKeyStore.SaveKey(appId, tenant2, ss); + } + try + { + using (SecureString ss = ServicePrincipalKeyStore.GetKey(appId, tenant1)) + { + Assert.Equal(pwd1, StringFromSecureString(ss)); + } + + using (SecureString ss = ServicePrincipalKeyStore.GetKey(appId, tenant2)) + { + Assert.Equal(pwd2, StringFromSecureString(ss)); + } + } + finally + { + ServicePrincipalKeyStore.DeleteKey(appId, tenant1); + ServicePrincipalKeyStore.DeleteKey(appId, tenant2); + } + } + + /// + /// Helper function to turn a string into a SecureString instance. + /// + /// string to "secure" + /// SecureString instance + private SecureString SecureStringFromString(string s) + { + SecureString ss = new SecureString(); + foreach (char c in s) + { + ss.AppendChar(c); + } + ss.MakeReadOnly(); + return ss; + } + + /// + /// Helper function to crack out the contents of a SecureString + /// and turn it into a regular string. + /// + /// Never do this for real, it defeats the point of + /// SecureString! + /// The SecureString to crack. + /// Contents of as a regular string. + private string StringFromSecureString(SecureString ss) + { + IntPtr buffer = IntPtr.Zero; + try + { + buffer = Marshal.SecureStringToGlobalAllocUnicode(ss); + return Marshal.PtrToStringUni(buffer); + } + finally + { + if (buffer != IntPtr.Zero) + { + Marshal.ZeroFreeGlobalAllocUnicode(buffer); + } + } + } + } +} diff --git a/src/Common/Commands.Common.Test/Common/SimpleServiceManagementAsyncResult.cs b/src/Common/Commands.Common.Test/Common/SimpleServiceManagementAsyncResult.cs new file mode 100644 index 000000000000..5eb74be38e46 --- /dev/null +++ b/src/Common/Commands.Common.Test/Common/SimpleServiceManagementAsyncResult.cs @@ -0,0 +1,81 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Threading; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.Common +{ + /// + /// Simple IAsyncResult implementation that can be used to cache all the + /// parameters to the BeginFoo call and then passed to the FooThunk + /// property that's invoked by EndFoo (thereby providing the test's + /// implementation of FooThunk with as much of the state as it wants). + /// + public class SimpleServiceManagementAsyncResult : IAsyncResult + { + /// + /// Gets a dictionary of state specific to a given call. + /// + public Dictionary Values { get; private set; } + + /// + /// Initializes a new instance of the + /// SimpleServiceManagementAsyncResult class. + /// + public SimpleServiceManagementAsyncResult() + { + Values = new Dictionary(); + } + + /// + /// Gets the state specific to a given call. + /// + public object AsyncState + { + get { return Values; } + } + + /// + /// Gets an AsyncWaitHandle. This is not implemented and will always + /// throw. + /// + [SuppressMessage("Microsoft.Design", "CA1065:DoNotRaiseExceptionsInUnexpectedLocations", + Justification = "Tests should not access this property")] + public WaitHandle AsyncWaitHandle + { + get { throw new NotImplementedException(); } + } + + /// + /// Gets a value indicating whether the async call completed + /// synchronousy. It always returns true. + /// + public bool CompletedSynchronously + { + get { return true; } + } + + /// + /// Gets a value indicating whether the async call has completed. It + /// always returns true. + /// + public bool IsCompleted + { + get { return true; } + } + } +} diff --git a/src/Common/Commands.Common.Test/Common/TestBase.cs b/src/Common/Commands.Common.Test/Common/TestBase.cs new file mode 100644 index 000000000000..1d45fbe53e34 --- /dev/null +++ b/src/Common/Commands.Common.Test/Common/TestBase.cs @@ -0,0 +1,87 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.Common +{ + /// + /// Base class for Microsoft Azure PowerShell unit tests. + /// + public abstract class TestBase + { + public TestBase() + { + BaseSetup(); + } + + /// + /// Initialize the necessary environment for the tests. + /// + [TestInitialize] + public void BaseSetup() + { + if (ProfileClient.DataStore != null && !(ProfileClient.DataStore is MockDataStore)) + { + ProfileClient.DataStore = new MockDataStore(); + } + if (AzureSession.CurrentContext.Subscription == null) + { + var newGuid = Guid.NewGuid(); + AzureSession.SetCurrentContext( + new AzureSubscription { Id = newGuid, Name = "test", Environment = EnvironmentName.AzureCloud, Account = "test" }, + null, + new AzureAccount + { + Id = "test", + Type = AzureAccount.AccountType.User, + Properties = new Dictionary + { + {AzureAccount.Property.Subscriptions, newGuid.ToString()} + } + }); + } + AzureSession.AuthenticationFactory = new MockTokenAuthenticationFactory(); + } + + /// + /// Gets or sets a reference to the TestContext used for interacting + /// with the test framework. + /// + public TestContext TestContext { get; set; } + + /// + /// Log a message with the test framework. + /// + /// Format string. + /// Arguments. + public void Log(string format, params object[] args) + { + if (TestContext != null) + { + TestContext.WriteLine(format, args); + } + else + { + Console.WriteLine(format, args); + } + } + } +} diff --git a/src/Common/Commands.Common.Test/Common/Testing.cs b/src/Common/Commands.Common.Test/Common/Testing.cs new file mode 100644 index 000000000000..0e546b0aff7a --- /dev/null +++ b/src/Common/Commands.Common.Test/Common/Testing.cs @@ -0,0 +1,157 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Diagnostics; +using System.IO; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Resources; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.Common +{ + /// + /// Various utilities and helpers to facilitate testing. + /// + /// + /// The name is a compromise for something that pops up easily in + /// intellisense when using MSTest. + /// + public static class Testing + { + /// + /// Ensure an action throws a specific type of Exception. + /// + /// Expected exception type. + /// + /// The action that should throw when executed. + /// + public static void AssertThrows(Action action) + where T : Exception + { + Debug.Assert(action != null); + + try + { + action(); + Assert.Fail("No exception was thrown!"); + } + catch (Exception ex) + { + Assert.IsInstanceOfType(ex, typeof(T)); + } + } + + /// + /// Ensure an action throws a specific type of Exception. + /// + /// Expected exception type. + /// + /// The action that should throw when executed. + /// + /// + /// Expected exception message. + /// + public static void AssertThrows(Action action, string expectedMessage) + where T : Exception + { + Debug.Assert(action != null); + + try + { + action(); + Assert.Fail("No exception was thrown!"); + } + catch (Exception ex) + { + Assert.IsInstanceOfType(ex, typeof(T)); + Assert.AreEqual(expectedMessage, ex.Message); + } + } + + /// + /// Get the path to a file included in the test project as something to + /// be copied on Deployment (see Local.testsettings > Deployment for + /// examples). + /// + /// Relative path to the resource. + /// Path to the resource. + public static string GetAssemblyTestResourcePath(string relativePath) + { + string path = Path.Combine(Environment.CurrentDirectory, relativePath); + try + { + EmbeddedFileWriter.WriteResourceToDisk(relativePath, path); + } + catch + { + Console.WriteLine(path); + throw; + } + Assert.IsTrue(File.Exists(path)); + return path; + } + + /// + /// Get the path to a file included in the test project as something to + /// be copied on Deployment (see Local.testsettings > Deployment for + /// examples). + /// + /// Relative path to the resource. + /// Path to the resource. + public static string GetTestResourcePath(string relativePath) + { + return GetAssemblyTestResourcePath(relativePath); + } + + /// + /// Get the contents of a file included in the test project as something to + /// be copied on Deployment (see Local.testsettings > Deployment for + /// examples). + /// + /// Relative path to the resource. + /// the resource contents. + public static string GetTestResourceContents(string relativePath) + { + return File.ReadAllText(Testing.GetTestResourcePath(relativePath)); + } + + /// + /// Asserts that given two directories and identical. + /// + /// The expected directory + /// The actual directory + public static void AssertDirectoryIdentical(string expected, string actual) + { + DirectoryInfo expectedDir = new DirectoryInfo(expected); + DirectoryInfo actualDir = new DirectoryInfo(expected); + DirectoryInfo[] ExpectedDirs = expectedDir.GetDirectories(); + DirectoryInfo[] ActualDirs = actualDir.GetDirectories(); + FileInfo[] expectedFiles = expectedDir.GetFiles(); + FileInfo[] actualFiles = actualDir.GetFiles(); + + Assert.AreEqual(expectedFiles.Length, actualFiles.Length); + + for (int i = 0; i < expectedFiles.Length; i++) + { + Assert.AreEqual(expectedFiles[i].Name, actualFiles[i].Name); + } + + foreach (DirectoryInfo subdir in ExpectedDirs) + { + string ActualSubDir = Path.Combine(actual, subdir.Name); + AssertDirectoryIdentical(subdir.FullName, ActualSubDir); + } + } + } +} diff --git a/src/Common/Commands.Common.Test/Common/TestingTracingInterceptor.cs b/src/Common/Commands.Common.Test/Common/TestingTracingInterceptor.cs new file mode 100644 index 000000000000..a8ca9cace755 --- /dev/null +++ b/src/Common/Commands.Common.Test/Common/TestingTracingInterceptor.cs @@ -0,0 +1,114 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Net.Http; +using Microsoft.WindowsAzure.Common; +using Microsoft.WindowsAzure.Common.Internals; + +namespace Microsoft.WindowsAzure.Commands.Common.Test.Common +{ + public class TestingTracingInterceptor : ICloudTracingInterceptor + { + private TestingTracingInterceptor() + { +#if DEBUG + if (Debug.Listeners.Count < 1) + { + Debug.Listeners.Add(new DefaultTraceListener()); + } +#endif + } + + + private void Write(string message, params object[] arguments) + { + if (arguments == null || arguments.Length == 0) + { + Console.WriteLine(message); +#if DEBUG + Debug.WriteLine(message); + +#endif + } + else + { + Console.WriteLine(message, arguments); +#if DEBUG + Debug.WriteLine(message, arguments); +#endif + } + } + + public void Information(string message) + { + Write(message); + } + + public void Configuration(string source, string name, string value) + { + } + + public void Enter(string invocationId, object instance, string method, IDictionary parameters) + { + Write("{0} - [{1}]: Entered method {2} with arguments: {3}", invocationId, instance, method, parameters.AsFormattedString()); + } + + public void SendRequest(string invocationId, HttpRequestMessage request) + { + Write("{0} - {1}", invocationId, request.AsString()); + } + + public void ReceiveResponse(string invocationId, HttpResponseMessage response) + { + Write("{0} - {1}", invocationId, response.AsString()); + } + + public void Error(string invocationId, Exception ex) + { + Write("{0} - Error: {1}", invocationId, ex); + } + + public void Exit(string invocationId, object result) + { + Write("{0} - Exited method with result: {1}", invocationId, result); + } + + static TestingTracingInterceptor() + { + TestingTracingInterceptor.Singleton = new TestingTracingInterceptor(); + } + + public static void AddToContext() + { + try + { + CloudContext.Configuration.Tracing.RemoveTracingInterceptor(TestingTracingInterceptor.Singleton); + } + catch + { + } + CloudContext.Configuration.Tracing.AddTracingInterceptor(TestingTracingInterceptor.Singleton); + } + + static TestingTracingInterceptor Singleton + { + get; + set; + } + } +} diff --git a/src/Common/Commands.Common.Test/MSSharedLibKey.snk b/src/Common/Commands.Common.Test/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/Common/Commands.Common.Test/MSSharedLibKey.snk differ diff --git a/src/Common/Commands.Common.Test/Mocks/ClientMocks.cs b/src/Common/Commands.Common.Test/Mocks/ClientMocks.cs new file mode 100644 index 000000000000..9d47bf128a18 --- /dev/null +++ b/src/Common/Commands.Common.Test/Mocks/ClientMocks.cs @@ -0,0 +1,104 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Common.Test.Mocks +{ + /// + /// Test helper class for managing mocking the various client objects + /// and operations in the service management library. + /// + public class ClientMocks + { + private readonly MockRepository repository; + public Mock ManagementClientMock { get; private set; } + public Mock StorageManagementClientMock { get; private set; } + public Mock ComputeManagementClientMock { get; private set; } + public Mock ResourceManagementClientMock { get; private set; } + public Mock CsmSubscriptionClientMock { get; private set; } + public Mock RdfeSubscriptionClientMock { get; private set; } + + public ClientMocks(Guid subscriptionId) + { + repository = new MockRepository(MockBehavior.Default) {DefaultValue = DefaultValue.Mock}; + + var creds = CreateCredentials(subscriptionId); + ManagementClientMock = repository.Create(creds); + ComputeManagementClientMock = repository.Create(creds); + StorageManagementClientMock = repository.Create(creds); + ResourceManagementClientMock = repository.Create(creds); + RdfeSubscriptionClientMock = repository.Create(creds); + CsmSubscriptionClientMock = repository.Create(creds); + } + + private SubscriptionCloudCredentials CreateCredentials(Guid subscriptionId) + { + var mockCreds = repository.Create(MockBehavior.Loose); + mockCreds.SetupGet(c => c.SubscriptionId).Returns(subscriptionId.ToString()); + return mockCreds.Object; + } + + public static CloudException Make404Exception() + { + return CloudException.Create( + new HttpRequestMessage(), + null, + new HttpResponseMessage(HttpStatusCode.NotFound), + "Not found"); + } + + public void LoadCsmSubscriptions(List subscriptions) + { + var subscriptionOperationsMock = new Mock(); + subscriptionOperationsMock.Setup(f => f.ListAsync(new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new Azure.Subscriptions.Models.SubscriptionListResult + { + Subscriptions = subscriptions + })); + + var tenantOperationsMock = new Mock(); + tenantOperationsMock.Setup(f => f.ListAsync(new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new Azure.Subscriptions.Models.TenantListResult + { + TenantIds = new[] { new Azure.Subscriptions.Models.TenantIdDescription + { + Id = "1", TenantId = "1" + }}.ToList() + })); + + CsmSubscriptionClientMock.Setup(f => f.Subscriptions).Returns(subscriptionOperationsMock.Object); + CsmSubscriptionClientMock.Setup(f => f.Tenants).Returns(tenantOperationsMock.Object); + } + + public void LoadRdfeSubscriptions(List subscriptions) + { + var subscriptionOperationsMock = new Mock(); + subscriptionOperationsMock.Setup(f => f.ListAsync(new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new WindowsAzure.Subscriptions.Models.SubscriptionListOperationResponse + { + Subscriptions = subscriptions + })); + + RdfeSubscriptionClientMock.Setup(f => f.Subscriptions).Returns(subscriptionOperationsMock.Object); + } + } +} diff --git a/src/Common/Commands.Common.Test/Mocks/MockAccessToken.cs b/src/Common/Commands.Common.Test/Mocks/MockAccessToken.cs new file mode 100644 index 000000000000..de070b5a63f7 --- /dev/null +++ b/src/Common/Commands.Common.Test/Mocks/MockAccessToken.cs @@ -0,0 +1,36 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure.Commands.Utilities.Common.Authentication; + +namespace Microsoft.WindowsAzure.Commands.Common.Test.Mocks +{ + public class MockAccessToken : IAccessToken + { + public void AuthorizeRequest(Action authTokenSetter) + { + authTokenSetter("Bearer", AccessToken); + } + + public string AccessToken { get; set; } + public string UserId { get; set; } + public LoginType LoginType { get; set; } + + public string TenantId + { + get { return string.Empty; } + } + } +} diff --git a/src/Common/Commands.Common.Test/Mocks/MockAccessTokenProvider.cs b/src/Common/Commands.Common.Test/Mocks/MockAccessTokenProvider.cs new file mode 100644 index 000000000000..50bc854b8e87 --- /dev/null +++ b/src/Common/Commands.Common.Test/Mocks/MockAccessTokenProvider.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Security; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Utilities.Common.Authentication; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.Common +{ + public class MockAccessTokenProvider : ITokenProvider + { + private readonly IAccessToken accessToken; + + public MockAccessTokenProvider(string token) + : this(token, "user@live.com") + { } + + public MockAccessTokenProvider(string token, string userId) + { + this.accessToken = new MockAccessToken() + { + AccessToken = token, + UserId = userId + }; + } + + public IAccessToken GetAccessToken(AdalConfiguration config, ShowDialog promptBehavior, string userId, SecureString password, + AzureAccount.AccountType credentialType) + { + return this.accessToken; + } + } +} \ No newline at end of file diff --git a/src/Common/Commands.Common.Test/Mocks/MockCertificateAuthenticationFactory.cs b/src/Common/Commands.Common.Test/Mocks/MockCertificateAuthenticationFactory.cs new file mode 100644 index 000000000000..746486b575b3 --- /dev/null +++ b/src/Common/Commands.Common.Test/Mocks/MockCertificateAuthenticationFactory.cs @@ -0,0 +1,58 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Security; +using System.Security.Cryptography.X509Certificates; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common.Authentication; + +namespace Microsoft.WindowsAzure.Commands.Common.Test.Mocks +{ + public class MockCertificateAuthenticationFactory : IAuthenticationFactory + { + public X509Certificate2 Certificate { get; set; } + + public MockCertificateAuthenticationFactory() + { + Certificate = new X509Certificate2(); + } + + public MockCertificateAuthenticationFactory(string userId, X509Certificate2 certificate) + { + Certificate = certificate; + } + + public IAccessToken Authenticate(AzureAccount account, AzureEnvironment environment, string tenant, SecureString password, ShowDialog promptBehavior) + { + if (account.Id == null) + { + account.Id = "test"; + } + + var token = new MockAccessToken + { + UserId = account.Id, + LoginType = LoginType.OrgId, + AccessToken = "123" + }; + + return token; + } + + public SubscriptionCloudCredentials GetSubscriptionCloudCredentials(AzureContext context) + { + return new CertificateCloudCredentials(context.Subscription.Id.ToString(), Certificate); + } + } +} diff --git a/src/Common/Commands.Common.Test/Mocks/MockClientFactory.cs b/src/Common/Commands.Common.Test/Mocks/MockClientFactory.cs new file mode 100644 index 000000000000..12ede8e14c8d --- /dev/null +++ b/src/Common/Commands.Common.Test/Mocks/MockClientFactory.cs @@ -0,0 +1,106 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using Microsoft.Azure.Utilities.HttpRecorder; +using Microsoft.WindowsAzure.Commands.Common.Factories; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Common; + +namespace Microsoft.WindowsAzure.Commands.Common.Test.Mocks +{ + public class MockClientFactory : ClientFactory + { + private readonly bool throwWhenNotAvailable; + + public List ManagementClients { get; private set; } + + public MockClientFactory(IEnumerable clients, bool throwIfClientNotSpecified = true) + { + ManagementClients = clients.ToList(); + throwWhenNotAvailable = throwIfClientNotSpecified; + } + + public override TClient CreateClient(AzureSubscription subscription, AzureEnvironment.Endpoint endpoint) + { + SubscriptionCloudCredentials creds = new TokenCloudCredentials(subscription.Id.ToString(), "fake_token"); + if (HttpMockServer.GetCurrentMode() != HttpRecorderMode.Playback) + { + ProfileClient profileClient = new ProfileClient(); + AzureContext context = new AzureContext() + { + Account = profileClient.GetAccount(subscription.Account), + Environment = profileClient.GetEnvironmentOrDefault(subscription.Environment), + Subscription = subscription + }; + + creds = AzureSession.AuthenticationFactory.GetSubscriptionCloudCredentials(context); + } + + Uri endpointUri = (new ProfileClient()).Profile.Environments[subscription.Environment].GetEndpointAsUri(endpoint); + return CreateCustomClient(creds, endpointUri); + } + + public override TClient CreateCustomClient(params object[] parameters) + { + TClient client = ManagementClients.FirstOrDefault(o => o is TClient) as TClient; + if (client == null) + { + if (throwWhenNotAvailable) + { + throw new ArgumentException( + string.Format("TestManagementClientHelper class wasn't initialized with the {0} client.", + typeof(TClient).Name)); + } + else + { + var realClient = base.CreateCustomClient(parameters); + var newRealClient = realClient.WithHandler(HttpMockServer.CreateInstance()); + realClient.Dispose(); + return newRealClient; + } + } + + return client; + } + + public override HttpClient CreateHttpClient(string serviceUrl, HttpMessageHandler effectiveHandler) + { + if (serviceUrl == null) + { + throw new ArgumentNullException("serviceUrl"); + } + if (effectiveHandler == null) + { + throw new ArgumentNullException("effectiveHandler"); + } + var mockHandler = HttpMockServer.CreateInstance(); + mockHandler.InnerHandler = effectiveHandler; + + HttpClient client = new HttpClient(mockHandler) + { + BaseAddress = new Uri(serviceUrl), + MaxResponseContentBufferSize = 30 * 1024 * 1024 + }; + + client.DefaultRequestHeaders.Accept.Clear(); + + return client; + } + } +} diff --git a/src/Common/Commands.Common.Test/Mocks/MockCommandRuntime.cs b/src/Common/Commands.Common.Test/Mocks/MockCommandRuntime.cs new file mode 100644 index 000000000000..bcafa608cb3b --- /dev/null +++ b/src/Common/Commands.Common.Test/Mocks/MockCommandRuntime.cs @@ -0,0 +1,144 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Management.Automation; + +namespace Microsoft.WindowsAzure.Commands.Common.Test.Mocks +{ + public class MockCommandRuntime : ICommandRuntime + { + public List ErrorStream = new List(); + public List OutputPipeline = new List(); + public List WarningStream = new List(); + public List VerboseStream = new List(); + public List DebugStream = new List(); + + public override string ToString() + { + return "MockCommand"; + } + + [SuppressMessage("Microsoft.Design", "CA1065:DoNotRaiseExceptionsInUnexpectedLocations", + Justification = "Tests should not access this property")] + public PSTransactionContext CurrentPSTransaction + { + get { throw new System.NotImplementedException(); } + } + + [SuppressMessage("Microsoft.Design", "CA1065:DoNotRaiseExceptionsInUnexpectedLocations", + Justification = "Tests should not access this property")] + public System.Management.Automation.Host.PSHost Host + { + get { throw new System.NotImplementedException(); } + } + + public bool ShouldContinue(string query, string caption, ref bool yesToAll, ref bool noToAll) + { + return true; + } + + public bool ShouldContinue(string query, string caption) + { + return true; + } + + public bool ShouldProcess(string verboseDescription, string verboseWarning, string caption, out ShouldProcessReason shouldProcessReason) + { + throw new System.NotImplementedException(); + } + + public bool ShouldProcess(string verboseDescription, string verboseWarning, string caption) + { + return true; + } + + public bool ShouldProcess(string target, string action) + { + return true; + } + + public bool ShouldProcess(string target) + { + return true; + } + + public void ThrowTerminatingError(ErrorRecord errorRecord) + { + throw new System.NotImplementedException(); + } + + public bool TransactionAvailable() + { + throw new System.NotImplementedException(); + } + + public void WriteCommandDetail(string text) + { + throw new System.NotImplementedException(); + } + + public void WriteDebug(string text) + { + DebugStream.Add(text); + } + + public void WriteError(ErrorRecord errorRecord) + { + ErrorStream.Add(errorRecord); + } + + public void WriteObject(object sendToPipeline, bool enumerateCollection) + { + OutputPipeline.Add(sendToPipeline); + } + + public void WriteObject(object sendToPipeline) + { + OutputPipeline.Add(sendToPipeline); + } + + public void WriteProgress(long sourceId, ProgressRecord progressRecord) + { + // Do nothing + } + + public void WriteProgress(ProgressRecord progressRecord) + { + // Do nothing + } + + public void WriteVerbose(string text) + { + VerboseStream.Add(text); + } + + public void WriteWarning(string text) + { + this.WarningStream.Add(text); + } + + /// + /// Clears all command runtime pipelines. + /// + public void ResetPipelines() + { + ErrorStream.Clear(); + OutputPipeline.Clear(); + WarningStream.Clear(); + VerboseStream.Clear(); + } + } +} diff --git a/src/Common/Commands.Common.Test/Mocks/MockDataStore.cs b/src/Common/Commands.Common.Test/Mocks/MockDataStore.cs new file mode 100644 index 000000000000..5f975085054c --- /dev/null +++ b/src/Common/Commands.Common.Test/Mocks/MockDataStore.cs @@ -0,0 +1,318 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Security.Cryptography.X509Certificates; +using System.Text; +using System.Text.RegularExpressions; +using Microsoft.WindowsAzure.Commands.Common.Interfaces; + +namespace Microsoft.WindowsAzure.Commands.Common.Test.Mocks +{ + public class MockDataStore : IDataStore + { + private Dictionary virtualStore = new Dictionary(StringComparer.InvariantCultureIgnoreCase); + private Dictionary certStore = new Dictionary(StringComparer.InvariantCultureIgnoreCase); + private const string FolderKey = "Folder"; + + public Dictionary VirtualStore + { + get { return virtualStore; } + set { virtualStore = value; } + } + + public void WriteFile(string path, string contents) + { + VirtualStore[path] = contents; + } + + public void WriteFile(string path, string contents, Encoding encoding) + { + WriteFile(path, contents); + } + + public void WriteFile(string path, byte[] contents) + { + VirtualStore[path] = Encoding.Default.GetString(contents); + } + + public string ReadFileAsText(string path) + { + if (VirtualStore.ContainsKey(path)) + { + return VirtualStore[path]; + } + else + { + throw new IOException("File not found: " + path); + } + } + + public Stream ReadFileAsStream(string path) + { + if (VirtualStore.ContainsKey(path)) + { + MemoryStream stream = new MemoryStream(); + StreamWriter writer = new StreamWriter(stream); + writer.Write(VirtualStore[path]); + writer.Flush(); + stream.Position = 0; + return stream; + } + else + { + throw new IOException("File not found: " + path); + } + } + + public byte[] ReadFileAsBytes(string path) + { + if (VirtualStore.ContainsKey(path)) + { + return Encoding.Default.GetBytes(VirtualStore[path]); + } + else + { + throw new IOException("File not found: " + path); + } + } + + public void RenameFile(string oldPath, string newPath) + { + if (VirtualStore.ContainsKey(oldPath)) + { + VirtualStore[newPath] = VirtualStore[oldPath]; + VirtualStore.Remove(oldPath); + } + else + { + throw new IOException("File not found: " + oldPath); + } + } + + public void CopyFile(string oldPath, string newPath) + { + if (VirtualStore.ContainsKey(oldPath)) + { + VirtualStore[newPath] = VirtualStore[oldPath]; + } + else + { + throw new IOException("File not found: " + oldPath); + } + } + + public bool FileExists(string path) + { + return VirtualStore.ContainsKey(path); + } + + public void DeleteFile(string path) + { + if (VirtualStore.ContainsKey(path)) + { + VirtualStore.Remove(path); + } + else + { + throw new IOException("File not found: " + path); + } + } + + public void DeleteDirectory(string dir) + { + foreach (var key in VirtualStore.Keys.ToArray()) + { + if (key.StartsWith(dir)) + { + VirtualStore.Remove(key); + } + } + } + + public void EmptyDirectory(string dirPath) + { + foreach (var key in VirtualStore.Keys.ToArray()) + { + if (key.StartsWith(dirPath)) + { + VirtualStore.Remove(key); + } + } + } + + public bool DirectoryExists(string path) + { + foreach (var key in VirtualStore.Keys.ToArray()) + { + if (key.StartsWith(path)) + { + return true; + } + } + return false; + } + + public void CreateDirectory(string path) + { + VirtualStore[path] = FolderKey; + } + + public string[] GetDirectories(string sourceDirName) + { + HashSet dirs = new HashSet(); + foreach (var key in VirtualStore.Keys.ToArray()) + { + if (key.StartsWith(sourceDirName)) + { + var directoryName = Path.GetDirectoryName(key); + if (!dirs.Contains(directoryName)) + { + dirs.Add(directoryName); + } + } + } + return dirs.ToArray(); + } + + public string[] GetDirectories(string startDirectory, string filePattern, SearchOption options) + { + HashSet dirs = new HashSet(); + foreach (var key in VirtualStore.Keys.ToArray()) + { + if (key.StartsWith(startDirectory) && Regex.IsMatch(key, WildcardToRegex(filePattern), RegexOptions.IgnoreCase)) + { + var directoryName = Path.GetDirectoryName(key); + if (!dirs.Contains(directoryName)) + { + dirs.Add(directoryName); + } + } + } + return dirs.ToArray(); + } + + public string[] GetFiles(string sourceDirName) + { + HashSet files = new HashSet(); + foreach (var key in VirtualStore.Keys.ToArray()) + { + if (key.StartsWith(sourceDirName) && VirtualStore[key] != FolderKey) + { + if (!files.Contains(key)) + { + files.Add(key); + } + } + } + return files.ToArray(); + } + + public string[] GetFiles(string startDirectory, string filePattern, SearchOption options) + { + HashSet files = new HashSet(); + foreach (var key in VirtualStore.Keys.ToArray()) + { + if (key.StartsWith(startDirectory) && VirtualStore[key] != FolderKey && Regex.IsMatch(key, WildcardToRegex(filePattern), RegexOptions.IgnoreCase)) + { + if (!files.Contains(key)) + { + files.Add(key); + } + } + } + return files.ToArray(); + } + + public FileAttributes GetFileAttributes(string path) + { + if (VirtualStore[path] == FolderKey) + { + return FileAttributes.Directory; + } + if (VirtualStore.ContainsKey(path)) + { + return FileAttributes.Normal; + } + else + { + foreach (var key in VirtualStore.Keys.ToArray()) + { + if (key.StartsWith(path)) + { + return FileAttributes.Directory; + } + } + throw new IOException("File not found: " + path); + } + } + + public X509Certificate2 GetCertificate(string thumbprint) + { + if (thumbprint != null && certStore.ContainsKey(thumbprint)) + { + return certStore[thumbprint]; + } + else + { + return new X509Certificate2(); + } + } + + public void AddCertificate(X509Certificate2 cert) + { + if (cert != null && cert.Thumbprint != null) + { + certStore[cert.Thumbprint] = cert; + } + } + + public void RemoveCertificate(string thumbprint) + { + if (thumbprint != null && certStore.ContainsKey(thumbprint)) + { + certStore.Remove(thumbprint); + } + } + + /// + /// Converts unix asterisk based file pattern to regex + /// + /// Asterisk based pattern + /// Regeular expression of null is empty + private static string WildcardToRegex(string wildcard) + { + if (wildcard == null || wildcard == "") return wildcard; + + StringBuilder sb = new StringBuilder(); + + char[] chars = wildcard.ToCharArray(); + for (int i = 0; i < chars.Length; ++i) + { + if (chars[i] == '*') + sb.Append(".*"); + else if (chars[i] == '?') + sb.Append("."); + else if ("+()^$.{}|\\".IndexOf(chars[i]) != -1) + sb.Append('\\').Append(chars[i]); // prefix all metacharacters with backslash + else + sb.Append(chars[i]); + } + return sb.ToString().ToLowerInvariant(); + } + } +} diff --git a/src/Common/Commands.Common.Test/Mocks/MockTokenAuthenticationFactory.cs b/src/Common/Commands.Common.Test/Mocks/MockTokenAuthenticationFactory.cs new file mode 100644 index 000000000000..ee85746615f2 --- /dev/null +++ b/src/Common/Commands.Common.Test/Mocks/MockTokenAuthenticationFactory.cs @@ -0,0 +1,68 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Security; +using System.Security.Cryptography.X509Certificates; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common.Authentication; + +namespace Microsoft.WindowsAzure.Commands.Common.Test.Mocks +{ + public class MockTokenAuthenticationFactory : IAuthenticationFactory + { + public IAccessToken Token { get; set; } + + public MockTokenAuthenticationFactory() + { + Token = new MockAccessToken + { + UserId = "Test", + LoginType = LoginType.OrgId, + AccessToken = "abc" + }; + } + + public MockTokenAuthenticationFactory(string userId, string accessToken) + { + Token = new MockAccessToken + { + UserId = userId, + LoginType = LoginType.OrgId, + AccessToken = accessToken + }; + } + + public IAccessToken Authenticate(AzureAccount account, AzureEnvironment environment, string tenant, SecureString password, ShowDialog promptBehavior) + { + if (account.Id == null) + { + account.Id = "test"; + } + + Token = new MockAccessToken + { + UserId = account.Id, + LoginType = LoginType.OrgId, + AccessToken = Token.AccessToken + }; + + return Token; + } + + public SubscriptionCloudCredentials GetSubscriptionCloudCredentials(AzureContext context) + { + return new AccessTokenCredential(context.Subscription.Id, Token); + } + } +} diff --git a/src/Common/Commands.Common.Test/Properties/AssemblyInfo.cs b/src/Common/Commands.Common.Test/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..47808fece783 --- /dev/null +++ b/src/Common/Commands.Common.Test/Properties/AssemblyInfo.cs @@ -0,0 +1,34 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Microsoft Azure Powershell - Common Library")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] + +[assembly: ComVisible(false)] +[assembly: CLSCompliant(false)] +[assembly: Guid("080bc9b8-3c00-4d0e-bec2-38d2fd0d7061")] +[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] +[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] +#if SIGN +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +#else +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.Test")] +#endif \ No newline at end of file diff --git a/src/Common/Commands.Common.Test/Properties/Resources.Designer.cs b/src/Common/Commands.Common.Test/Properties/Resources.Designer.cs new file mode 100644 index 000000000000..e4a20eaa2fb9 --- /dev/null +++ b/src/Common/Commands.Common.Test/Properties/Resources.Designer.cs @@ -0,0 +1,231 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.WindowsAzure.Commands.Common.Test.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.WindowsAzure.Commands.Common.Test.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized resource of type System.Byte[]. + /// + public static byte[] Azure { + get { + object obj = ResourceManager.GetObject("Azure", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Looks up a localized string similar to http://az413943.vo.msecnd.net/cache/2.5.2.exe. + /// + public static string CacheRuntimeUrl { + get { + return ResourceManager.GetString("CacheRuntimeUrl", resourceCulture); + } + } + + /// + /// Looks up a localized resource of type System.Byte[]. + /// + public static byte[] InvalidProfile { + get { + object obj = ResourceManager.GetObject("InvalidProfile", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?> + ///<fake> + /// This is a fake xml. + ///</fake>. + /// + public static string invalidsubscriptions { + get { + return ResourceManager.GetString("invalidsubscriptions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?> + ///<Subscriptions version="1.0" xmlns="urn:Microsoft.WindowsAzure.Management:WaPSCmdlets"> + /// <Subscription name="mysub1"> + /// <SubscriptionId>279b0675-cf67-467f-98f0-67ae31eb540f</SubscriptionId> + /// <Thumbprint>12D09EC0008EEE10C1B80AB70B3739E6BC509BB3</Thumbprint> + /// <ServiceEndpoint>0853C43B56C81CE8FC44C8ACDC8C54783C6080E2</ServiceEndpoint> + /// <CurrentStorageAccountName>0853C43B56C81CE8FC44C8ACDC8C54783C6080E2</CurrentStorageAccountName> + /// </Subscription> + /// <S [rest of string was truncated]";. + /// + public static string subscriptions { + get { + return ResourceManager.GetString("subscriptions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <?xml version="1.0"?> + ///<runtimemanifest> + /// <baseuri uri="http://CDN/" /> + /// <runtimes> + /// <runtime type="iisnode" version="0.1.20" filepath="/iisnode/bar.exe" /> + /// <runtime type="iisnode" version="0.1.21" filepath="/iisnode/default.exe" default="true" /> + /// <runtime type="node" version="0.8.2" filepath="/node/foo.exe" /> + /// <runtime type="node" version="0.6.20" filepath="/node/default.exe" default="true" /> + /// <runtime type="php" version="5.3" filepath="/php/5.3.exe" default="true" /> + /// <runt [rest of string was truncated]";. + /// + public static string testruntimemanifest { + get { + return ResourceManager.GetString("testruntimemanifest", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {{ + /// "author": "", + /// + /// "name": "{0}", + /// "version": "0.0.0", + /// "dependencies":{{}}, + /// "devDependencies":{{}}, + /// "optionalDependencies": {{}}, + /// "engines": {{ + /// "node": "{1}", + /// "iisnode": "*" + /// }} + /// + ///}}. + /// + public static string ValidPackageJson { + get { + return ResourceManager.GetString("ValidPackageJson", resourceCulture); + } + } + + /// + /// Looks up a localized resource of type System.Byte[]. + /// + public static byte[] ValidProfile { + get { + object obj = ResourceManager.GetObject("ValidProfile", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Byte[]. + /// + public static byte[] ValidProfile2 { + get { + object obj = ResourceManager.GetObject("ValidProfile2", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Byte[]. + /// + public static byte[] ValidProfile3 { + get { + object obj = ResourceManager.GetObject("ValidProfile3", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Byte[]. + /// + public static byte[] ValidProfileChina { + get { + object obj = ResourceManager.GetObject("ValidProfileChina", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Byte[]. + /// + public static byte[] ValidProfileChinaOld { + get { + object obj = ResourceManager.GetObject("ValidProfileChinaOld", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Looks up a localized string similar to <Scaffold Name="TestScaffold"> + /// <ScaffoldFile PathExpression="modules\.*"/> + /// <ScaffoldFile TargetPath="/bin/node.exe" Path="bin/node123dfx65.exe"/> + /// <ScaffoldFile Path="bin/iisnode.dll"/> + /// <ScaffoldFile Path="bin/setup.cmd"/> + /// <ScaffoldFile Path="Web.config"> + /// <Scaffold.ReplaceParameterRule /> + /// </ScaffoldFile> + /// <ScaffoldFile Path="WebRole.xml" Copy="False" > + /// <Scaffold.ReplaceParameterRule /> + /// </ScaffoldFile> + ///</Scaffold>. + /// + public static string ValidScaffoldXml { + get { + return ResourceManager.GetString("ValidScaffoldXml", resourceCulture); + } + } + } +} diff --git a/src/Common/Commands.Common.Test/Properties/Resources.resx b/src/Common/Commands.Common.Test/Properties/Resources.resx new file mode 100644 index 000000000000..a3bbf003c590 --- /dev/null +++ b/src/Common/Commands.Common.Test/Properties/Resources.resx @@ -0,0 +1,184 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\Azure.publishsettings;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + http://az413943.vo.msecnd.net/cache/2.5.2.exe + + + ..\Resources\InvalidProfile.PublishSettings;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\invalidsubscriptions.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 + + + ..\Resources\subscriptions.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 + + + ..\Resources\testruntimemanifest.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + + + {{ + "author": "", + + "name": "{0}", + "version": "0.0.0", + "dependencies":{{}}, + "devDependencies":{{}}, + "optionalDependencies": {{}}, + "engines": {{ + "node": "{1}", + "iisnode": "*" + }} + +}} + + + ..\Resources\ValidProfile.PublishSettings;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\ValidProfile2.PublishSettings;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + <Scaffold Name="TestScaffold"> + <ScaffoldFile PathExpression="modules\.*"/> + <ScaffoldFile TargetPath="/bin/node.exe" Path="bin/node123dfx65.exe"/> + <ScaffoldFile Path="bin/iisnode.dll"/> + <ScaffoldFile Path="bin/setup.cmd"/> + <ScaffoldFile Path="Web.config"> + <Scaffold.ReplaceParameterRule /> + </ScaffoldFile> + <ScaffoldFile Path="WebRole.xml" Copy="False" > + <Scaffold.ReplaceParameterRule /> + </ScaffoldFile> +</Scaffold> + + + ..\resources\validprofile3.publishsettings;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\resources\validprofilechina.publishsettings;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\resources\validprofilechinaold.publishsettings;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/src/Common/Commands.Common.Test/Resources/Azure.publishsettings b/src/Common/Commands.Common.Test/Resources/Azure.publishsettings new file mode 100644 index 000000000000..aeae7405aa98 --- /dev/null +++ b/src/Common/Commands.Common.Test/Resources/Azure.publishsettings @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/Common/Commands.Common.Test/Resources/GB18030ServiceDefinition.csdef b/src/Common/Commands.Common.Test/Resources/GB18030ServiceDefinition.csdef new file mode 100644 index 000000000000..db0be54262c4 --- /dev/null +++ b/src/Common/Commands.Common.Test/Resources/GB18030ServiceDefinition.csdef @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Common/Commands.Common.Test/Resources/InvalidProfile.PublishSettings b/src/Common/Commands.Common.Test/Resources/InvalidProfile.PublishSettings new file mode 100644 index 000000000000..3886328a747d --- /dev/null +++ b/src/Common/Commands.Common.Test/Resources/InvalidProfile.PublishSettings @@ -0,0 +1,16 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/Common/Commands.Common.Test/Resources/ResourceLocator.cs b/src/Common/Commands.Common.Test/Resources/ResourceLocator.cs new file mode 100644 index 000000000000..efccf6a8b006 --- /dev/null +++ b/src/Common/Commands.Common.Test/Resources/ResourceLocator.cs @@ -0,0 +1,22 @@ +// ---------------------------------------------------------------------------------- +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Common.Test.Resources +{ + /// + /// A dummy class used to located the resources in this folder/namespace. + /// + public class ResourceLocator + { + } +} \ No newline at end of file diff --git a/src/Common/Commands.Common.Test/Resources/ValidProfile.PublishSettings b/src/Common/Commands.Common.Test/Resources/ValidProfile.PublishSettings new file mode 100644 index 000000000000..f405a3be38b2 --- /dev/null +++ b/src/Common/Commands.Common.Test/Resources/ValidProfile.PublishSettings @@ -0,0 +1,14 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/Common/Commands.Common.Test/Resources/ValidProfile2.PublishSettings b/src/Common/Commands.Common.Test/Resources/ValidProfile2.PublishSettings new file mode 100644 index 000000000000..d2c13f8859e2 --- /dev/null +++ b/src/Common/Commands.Common.Test/Resources/ValidProfile2.PublishSettings @@ -0,0 +1,15 @@ + + + + + + + \ No newline at end of file diff --git a/src/Common/Commands.Common.Test/Resources/ValidProfile3.PublishSettings b/src/Common/Commands.Common.Test/Resources/ValidProfile3.PublishSettings new file mode 100644 index 000000000000..455ad34a8022 --- /dev/null +++ b/src/Common/Commands.Common.Test/Resources/ValidProfile3.PublishSettings @@ -0,0 +1,14 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/Common/Commands.Common.Test/Resources/ValidProfileChina.PublishSettings b/src/Common/Commands.Common.Test/Resources/ValidProfileChina.PublishSettings new file mode 100644 index 000000000000..4a533f0de98c --- /dev/null +++ b/src/Common/Commands.Common.Test/Resources/ValidProfileChina.PublishSettings @@ -0,0 +1,14 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/Common/Commands.Common.Test/Resources/ValidProfileChinaOld.PublishSettings b/src/Common/Commands.Common.Test/Resources/ValidProfileChinaOld.PublishSettings new file mode 100644 index 000000000000..41b00dffeb4b --- /dev/null +++ b/src/Common/Commands.Common.Test/Resources/ValidProfileChinaOld.PublishSettings @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/src/Common/Commands.Common.Test/Resources/invalidsubscriptions.xml b/src/Common/Commands.Common.Test/Resources/invalidsubscriptions.xml new file mode 100644 index 000000000000..426c453cd421 --- /dev/null +++ b/src/Common/Commands.Common.Test/Resources/invalidsubscriptions.xml @@ -0,0 +1,4 @@ + + + This is a fake xml. + \ No newline at end of file diff --git a/src/Common/Commands.Common.Test/Resources/subscriptions.xml b/src/Common/Commands.Common.Test/Resources/subscriptions.xml new file mode 100644 index 000000000000..a1c4c9b08732 --- /dev/null +++ b/src/Common/Commands.Common.Test/Resources/subscriptions.xml @@ -0,0 +1,15 @@ + + + + 279b0675-cf67-467f-98f0-67ae31eb540f + 12D09EC0008EEE10C1B80AB70B3739E6BC509BB3 + 0853C43B56C81CE8FC44C8ACDC8C54783C6080E2 + 0853C43B56C81CE8FC44C8ACDC8C54783C6080E2 + + + 279b0675-cf67-467f-98f0-67ae31eb540f + 12D09EC0008EEE10C1B80AB70B3739E6BC509BB3 + 0853C43B56C81CE8FC44C8ACDC8C54783C6080E2 + 0853C43B56C81CE8FC44C8ACDC8C54783C6080E2 + + \ No newline at end of file diff --git a/src/Common/Commands.Common.Test/Resources/testruntimemanifest.xml b/src/Common/Commands.Common.Test/Resources/testruntimemanifest.xml new file mode 100644 index 000000000000..518bce45a46c --- /dev/null +++ b/src/Common/Commands.Common.Test/Resources/testruntimemanifest.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Common/Commands.Common.Test/packages.config b/src/Common/Commands.Common.Test/packages.config new file mode 100644 index 000000000000..58fb9aaf054b --- /dev/null +++ b/src/Common/Commands.Common.Test/packages.config @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Common/Commands.Common/Authentication/AadAuthenticationException.cs b/src/Common/Commands.Common/Authentication/AadAuthenticationException.cs new file mode 100644 index 000000000000..dbfaf1abb52f --- /dev/null +++ b/src/Common/Commands.Common/Authentication/AadAuthenticationException.cs @@ -0,0 +1,94 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common.Authentication +{ + /// + /// Base class representing an exception that occurs when + /// authenticating against Azure Active Directory + /// + [Serializable] + public abstract class AadAuthenticationException : Exception + { + protected AadAuthenticationException() + { + } + + protected AadAuthenticationException(string message) : base(message) + { + } + + protected AadAuthenticationException(string message, Exception innerException) : base(message, innerException) + { + } + } + + /// + /// Exception that gets thrown when the user explicitly + /// cancels an authentication operation. + /// + [Serializable] + public class AadAuthenticationCanceledException : AadAuthenticationException + { + public AadAuthenticationCanceledException(string message, Exception innerException) : base(message, innerException) + { + } + } + + /// + /// Exception that gets thrown when the ADAL library + /// is unable to authenticate without a popup dialog. + /// + [Serializable] + public class AadAuthenticationFailedWithoutPopupException : AadAuthenticationException + { + public AadAuthenticationFailedWithoutPopupException(string message, Exception innerException) + : base(message, innerException) + { + } + } + + /// + /// Exception that gets thrown if an authentication operation + /// fails on the server. + /// + [Serializable] + public class AadAuthenticationFailedException : AadAuthenticationException + { + public AadAuthenticationFailedException(string message, Exception innerException) : base(message, innerException) + { + } + } + + /// + /// Exception thrown if a refresh token has expired. + /// + [Serializable] + public class AadAuthenticationCantRenewException : AadAuthenticationException + { + public AadAuthenticationCantRenewException() + { + } + + public AadAuthenticationCantRenewException(string message) : base(message) + { + } + + public AadAuthenticationCantRenewException(string message, Exception innerException) : base(message, innerException) + { + } + } +} \ No newline at end of file diff --git a/src/Common/Commands.Common/Authentication/AccessTokenCredential.cs b/src/Common/Commands.Common/Authentication/AccessTokenCredential.cs new file mode 100644 index 000000000000..9addc44ee361 --- /dev/null +++ b/src/Common/Commands.Common/Authentication/AccessTokenCredential.cs @@ -0,0 +1,50 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Threading; +using System.Threading.Tasks; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common.Authentication +{ + public class AccessTokenCredential : SubscriptionCloudCredentials + { + private readonly Guid subscriptionId; + private readonly IAccessToken token; + + public AccessTokenCredential(Guid subscriptionId, IAccessToken token) + { + this.subscriptionId = subscriptionId; + this.token = token; + this.TenantID = token.TenantId; + } + + public override Task ProcessHttpRequestAsync(HttpRequestMessage request, CancellationToken cancellationToken) + { + token.AuthorizeRequest((tokenType, tokenValue) => { + request.Headers.Authorization = new AuthenticationHeaderValue(tokenType, tokenValue); + }); + return base.ProcessHttpRequestAsync(request, cancellationToken); + } + + public override string SubscriptionId + { + get { return subscriptionId.ToString(); } + } + + public string TenantID { get; set; } + } +} \ No newline at end of file diff --git a/src/Common/Commands.Common/Authentication/AdalConfiguration.cs b/src/Common/Commands.Common/Authentication/AdalConfiguration.cs new file mode 100644 index 000000000000..80fc09992933 --- /dev/null +++ b/src/Common/Commands.Common/Authentication/AdalConfiguration.cs @@ -0,0 +1,69 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common.Authentication +{ + /// + /// Class storing the configuration information needed + /// for ADAL to request token from the right AD tenant + /// depending on environment. + /// + public class AdalConfiguration + { + // + // These constants define the default values to use for AD authentication + // against RDFE + // + private const string PowerShellClientId = "1950a258-227b-4e31-a9cf-717495945fc2"; + private string adEndpoint = string.Empty; + + // Turn off endpoint validation for known test cluster AD endpoints + private static readonly string[] knownTestEndpoints = + { + "https://sts.login.windows-int.net/" + }; + + public static readonly Uri PowerShellRedirectUri = new Uri("urn:ietf:wg:oauth:2.0:oob"); + + // ID for site to pass to enable EBD (email-based differentiation) + // This gets passed in the call to get the azure branding on the + // login window. Also adding popup flag to handle overly large login windows. + internal const string EnableEbdMagicCookie = "site_id=501358&display=popup"; + + public string AdEndpoint + { + get { return adEndpoint; } + set { adEndpoint = value; } + } + + public bool ValidateAuthority + { + get { return knownTestEndpoints.All(s => string.Compare(s, adEndpoint, StringComparison.OrdinalIgnoreCase) != 0); } + } + + public string AdDomain { get; set; } + public string ClientId { get; set; } + public Uri ClientRedirectUri { get; set; } + public string ResourceClientUri { get; set; } + + public AdalConfiguration() + { + ClientId = PowerShellClientId; + ClientRedirectUri = PowerShellRedirectUri; + } + } +} \ No newline at end of file diff --git a/src/Common/Commands.Common/Authentication/AdalTokenProvider.cs b/src/Common/Commands.Common/Authentication/AdalTokenProvider.cs new file mode 100644 index 000000000000..0d52ba5ada44 --- /dev/null +++ b/src/Common/Commands.Common/Authentication/AdalTokenProvider.cs @@ -0,0 +1,57 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Security; +using System.Windows.Forms; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Properties; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common.Authentication +{ + /// + /// A token provider that uses ADAL to retrieve + /// tokens from Azure Active Directory + /// + public class AdalTokenProvider : ITokenProvider + { + private readonly ITokenProvider userTokenProvider; + private readonly ITokenProvider servicePrincipalTokenProvider; + + public AdalTokenProvider() + : this(new ConsoleParentWindow()) + { + } + + public AdalTokenProvider(IWin32Window parentWindow) + { + this.userTokenProvider = new UserTokenProvider(parentWindow); + servicePrincipalTokenProvider = new ServicePrincipalTokenProvider(); + } + + public IAccessToken GetAccessToken(AdalConfiguration config, ShowDialog promptBehavior, string userId, SecureString password, + AzureAccount.AccountType credentialType) + { + switch (credentialType) + { + case AzureAccount.AccountType.User: + return userTokenProvider.GetAccessToken(config, promptBehavior, userId, password, credentialType); + case AzureAccount.AccountType.ServicePrincipal: + return servicePrincipalTokenProvider.GetAccessToken(config, promptBehavior, userId, password, credentialType); + default: + throw new ArgumentException(Resources.UnknownCredentialType, "credentialType"); + } + } + } +} diff --git a/src/Common/Commands.Common/Authentication/ConsoleParentWindow.cs b/src/Common/Commands.Common/Authentication/ConsoleParentWindow.cs new file mode 100644 index 000000000000..d6e227b84b8c --- /dev/null +++ b/src/Common/Commands.Common/Authentication/ConsoleParentWindow.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Runtime.InteropServices; +using System.Windows.Forms; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common.Authentication +{ + /// + /// An implementation of that gives the + /// windows handle for the current console window. + /// + public class ConsoleParentWindow : IWin32Window + { + public IntPtr Handle { get { return NativeMethods.GetConsoleWindow(); } } + + static class NativeMethods + { + [DllImport("kernel32.dll")] + internal static extern IntPtr GetConsoleWindow(); + } + } +} diff --git a/src/Common/Commands.Common/Authentication/CredStore.cs b/src/Common/Commands.Common/Authentication/CredStore.cs new file mode 100644 index 000000000000..c5806e67f11f --- /dev/null +++ b/src/Common/Commands.Common/Authentication/CredStore.cs @@ -0,0 +1,114 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Runtime.ConstrainedExecution; +using System.Runtime.InteropServices; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common.Authentication +{ + /// + /// Class wrapping PInvoke signatures for Windows Credential store + /// + internal static class CredStore + { + internal enum CredentialType + { + Generic = 1, + } + + internal static class NativeMethods + { + [DllImport("advapi32.dll", CharSet = CharSet.Unicode, SetLastError = true)] + [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] + internal extern static bool CredRead( + string targetName, + CredentialType type, + int flags, + [Out] out IntPtr pCredential + ); + + [DllImport("advapi32.dll", CharSet = CharSet.Unicode, SetLastError = true)] + [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] + internal extern static bool CredEnumerate( + string targetName, + int flags, + [Out] out int count, + [Out] out IntPtr pCredential + ); + + [DllImport("advapi32.dll", CharSet = CharSet.Unicode, SetLastError = true)] + [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] + internal extern static bool CredDelete( + string targetName, + CredentialType type, + int flags + ); + + [DllImport("advapi32.dll", CharSet = CharSet.Unicode, SetLastError = true)] + [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] + internal extern static bool CredWrite( + IntPtr pCredential, + int flags + ); + + [DllImport("advapi32.dll", CharSet = CharSet.Unicode, SetLastError = true)] + [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] + internal extern static bool CredFree( + IntPtr pCredential + ); + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable", Justification = "Wrapper for native struct")] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] + internal struct Credential + { + public Credential(string userName, string key, string value) + { + this.flags = 0; + this.type = CredentialType.Generic; + + // set the key in the targetName + this.targetName = key; + + this.targetAlias = null; + this.comment = null; + this.lastWritten.dwHighDateTime = 0; + this.lastWritten.dwLowDateTime = 0; + + // set the value in credentialBlob. + this.credentialBlob = Marshal.StringToHGlobalUni(value); + this.credentialBlobSize = (uint)((value.Length + 1) * 2); + + this.persist = 1; + this.attibuteCount = 0; + this.attributes = IntPtr.Zero; + this.userName = userName; + } + + internal uint flags; + internal CredentialType type; + internal string targetName; + internal string comment; + internal System.Runtime.InteropServices.ComTypes.FILETIME lastWritten; + internal uint credentialBlobSize; + internal IntPtr credentialBlob; + internal uint persist; + internal uint attibuteCount; + internal IntPtr attributes; + internal string targetAlias; + internal string userName; + } + } + } +} diff --git a/src/Common/Commands.Common/Authentication/IAccessToken.cs b/src/Common/Commands.Common/Authentication/IAccessToken.cs new file mode 100644 index 000000000000..8db903887322 --- /dev/null +++ b/src/Common/Commands.Common/Authentication/IAccessToken.cs @@ -0,0 +1,31 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common.Authentication +{ + public interface IAccessToken + { + void AuthorizeRequest(Action authTokenSetter); + + string AccessToken { get; } + + string UserId { get; } + + string TenantId { get; } + + LoginType LoginType { get; } + } +} diff --git a/src/Common/Commands.Common/Authentication/ITokenProvider.cs b/src/Common/Commands.Common/Authentication/ITokenProvider.cs new file mode 100644 index 000000000000..71ea49ec791e --- /dev/null +++ b/src/Common/Commands.Common/Authentication/ITokenProvider.cs @@ -0,0 +1,39 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Security; +using Microsoft.WindowsAzure.Commands.Common.Models; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common.Authentication +{ + /// + /// This interface represents objects that can be used + /// to obtain and manage access tokens. + /// + public interface ITokenProvider + { + /// + /// Get a new login token for the given environment, user credential, + /// and credential type. + /// + /// Configuration. + /// Prompt behavior. + /// User ID/Service principal to get the token for. + /// Secure strings with password/service principal key. + /// Credential type. + /// An access token. + IAccessToken GetAccessToken(AdalConfiguration config, ShowDialog promptBehavior, string userId, + SecureString password, AzureAccount.AccountType credentialType); + } +} diff --git a/src/Common/Commands.Common/Authentication/LoginType.cs b/src/Common/Commands.Common/Authentication/LoginType.cs new file mode 100644 index 000000000000..f812412acf0f --- /dev/null +++ b/src/Common/Commands.Common/Authentication/LoginType.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common.Authentication +{ + public enum LoginType + { + /// + /// User is logging in with orgid credentials + /// + OrgId, + + /// + /// User is logging in with liveid credentials + /// + LiveId + } +} diff --git a/src/Common/Commands.Common/Authentication/ProtectedFileTokenCache.cs b/src/Common/Commands.Common/Authentication/ProtectedFileTokenCache.cs new file mode 100644 index 000000000000..f6e184dc1b0c --- /dev/null +++ b/src/Common/Commands.Common/Authentication/ProtectedFileTokenCache.cs @@ -0,0 +1,108 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Security.Cryptography; +using Microsoft.IdentityModel.Clients.ActiveDirectory; +using Microsoft.WindowsAzure.Commands.Common; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common.Authentication +{ + /// + /// An implementation of the Adal token cache that stores the cache items + /// in the DPAPI-protected file. + /// + public class ProtectedFileTokenCache : TokenCache + { + private static readonly string CacheFileName = Path.Combine(AzurePowerShell.ProfileDirectory, "TokenCache.dat"); + + private static readonly object fileLock = new object(); + + private static readonly Lazy instance = + new Lazy(() => new ProtectedFileTokenCache()); + + public static ProtectedFileTokenCache Instance + { + get + { + return instance.Value; + } + } + + // Initializes the cache against a local file. + // If the file is already present, it loads its content in the ADAL cache + private ProtectedFileTokenCache() + { + AfterAccess = AfterAccessNotification; + BeforeAccess = BeforeAccessNotification; + lock (fileLock) + { + if (ProfileClient.DataStore.FileExists(CacheFileName)) + { + var existingData = ProfileClient.DataStore.ReadFileAsBytes(CacheFileName); + if (existingData != null) + { + Deserialize(ProtectedData.Unprotect(existingData, null, DataProtectionScope.CurrentUser)); + } + } + } + } + + // Empties the persistent store. + public override void Clear() + { + base.Clear(); + if (ProfileClient.DataStore.FileExists(CacheFileName)) + { + ProfileClient.DataStore.DeleteFile(CacheFileName); + } + } + + // Triggered right before ADAL needs to access the cache. + // Reload the cache from the persistent store in case it changed since the last access. + void BeforeAccessNotification(TokenCacheNotificationArgs args) + { + lock (fileLock) + { + if (ProfileClient.DataStore.FileExists(CacheFileName)) + { + var existingData = ProfileClient.DataStore.ReadFileAsBytes(CacheFileName); + if (existingData != null) + { + Deserialize(ProtectedData.Unprotect(existingData, null, DataProtectionScope.CurrentUser)); + } + } + } + } + + // Triggered right after ADAL accessed the cache. + void AfterAccessNotification(TokenCacheNotificationArgs args) + { + // if the access operation resulted in a cache update + if (HasStateChanged) + { + lock (fileLock) + { + // reflect changes in the persistent store + ProfileClient.DataStore.WriteFile(CacheFileName, + ProtectedData.Protect(Serialize(), null, DataProtectionScope.CurrentUser)); + // once the write operation took place, restore the HasStateChanged bit to false + HasStateChanged = false; + } + } + } + + } +} diff --git a/src/Common/Commands.Common/Authentication/ServicePrincipalKeyStore.cs b/src/Common/Commands.Common/Authentication/ServicePrincipalKeyStore.cs new file mode 100644 index 000000000000..5d21da36a76d --- /dev/null +++ b/src/Common/Commands.Common/Authentication/ServicePrincipalKeyStore.cs @@ -0,0 +1,112 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Runtime.InteropServices; +using System.Security; +using Microsoft.WindowsAzure.Commands.Utilities.Common.Authentication; +using FILETIME = System.Runtime.InteropServices.ComTypes.FILETIME; + +namespace Microsoft.WindowsAzure.Commands.Common.Authentication +{ + /// + /// Helper class to store service principal keys and retrieve them + /// from the Windows Credential Store. + /// + public static class ServicePrincipalKeyStore + { + private const string keyStoreUserName = "PowerShellServicePrincipalKey"; + private const string targetNamePrefix = "AzurePowershell:target="; + + public static void SaveKey(string appId, string tenantId, SecureString serviceKey) + { + var credential = new CredStore.NativeMethods.Credential + { + flags = 0, + type = CredStore.CredentialType.Generic, + targetName = CreateKey(appId, tenantId), + targetAlias = null, + comment = null, + lastWritten = new FILETIME {dwHighDateTime = 0, dwLowDateTime = 0}, + persist = 2, // persist on local machine + attibuteCount = 0, + attributes = IntPtr.Zero, + userName = keyStoreUserName + }; + + // Pull bits out of SecureString to put in credential + IntPtr credPtr = IntPtr.Zero; + try + { + credential.credentialBlob = Marshal.SecureStringToGlobalAllocUnicode(serviceKey); + credential.credentialBlobSize = (uint)(serviceKey.Length * Marshal.SystemDefaultCharSize); + + int size = Marshal.SizeOf(credential); + credPtr = Marshal.AllocHGlobal(size); + + Marshal.StructureToPtr(credential, credPtr, false); + CredStore.NativeMethods.CredWrite(credPtr, 0); + } + finally + { + if (credPtr != IntPtr.Zero) + { + Marshal.FreeHGlobal(credPtr); + } + + Marshal.ZeroFreeGlobalAllocUnicode(credential.credentialBlob); + } + } + + public static SecureString GetKey(string appId, string tenantId) + { + IntPtr pCredential = IntPtr.Zero; + try + { + if (CredStore.NativeMethods.CredRead( + CreateKey(appId, tenantId), + CredStore.CredentialType.Generic, 0, + out pCredential)) + { + var credential = (CredStore.NativeMethods.Credential) + Marshal.PtrToStructure(pCredential, typeof (CredStore.NativeMethods.Credential)); + unsafe + { + return new SecureString((char*) (credential.credentialBlob), + (int)(credential.credentialBlobSize/Marshal.SystemDefaultCharSize)); + } + } + return null; + } + finally + { + if (pCredential != IntPtr.Zero) + { + CredStore.NativeMethods.CredFree(pCredential); + } + } + } + + + public static void DeleteKey(string appId, string tenantId) + { + CredStore.NativeMethods.CredDelete(CreateKey(appId, tenantId), CredStore.CredentialType.Generic, 0); + } + + private static string CreateKey(string appId, string tenantId) + { + return string.Format("{0}AppId={1};Tenant={2}", targetNamePrefix, appId, tenantId); + } + } +} diff --git a/src/Common/Commands.Common/Authentication/ServicePrincipalTokenProvider.cs b/src/Common/Commands.Common/Authentication/ServicePrincipalTokenProvider.cs new file mode 100644 index 000000000000..ccd5b57f20aa --- /dev/null +++ b/src/Common/Commands.Common/Authentication/ServicePrincipalTokenProvider.cs @@ -0,0 +1,124 @@ +// ---------------------------------------------------------------------------------- +// Copyright Microsoft Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Security; +using Microsoft.IdentityModel.Clients.ActiveDirectory; +using Microsoft.WindowsAzure.Commands.Common.Authentication; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Properties; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common.Authentication +{ + internal class ServicePrincipalTokenProvider : ITokenProvider + { + private static readonly TimeSpan expirationThreshold = new TimeSpan(0, 5, 0); + + public IAccessToken GetAccessToken(AdalConfiguration config, ShowDialog promptBehavior, string userId, SecureString password, + AzureAccount.AccountType credentialType) + { + if (credentialType == AzureAccount.AccountType.User) + { + throw new ArgumentException(string.Format(Resources.InvalidCredentialType, "User"), "credentialType"); + } + return new ServicePrincipalAccessToken(config, AcquireToken(config, userId, password), this, userId); + } + + private AuthenticationResult AcquireToken(AdalConfiguration config, string appId, SecureString appKey) + { + if (appKey == null) + { + return Renew(config, appId); + } + + StoreAppKey(appId, config.AdDomain, appKey); + + string authority = config.AdEndpoint + config.AdDomain; + var context = new AuthenticationContext(authority, config.ValidateAuthority, + ProtectedFileTokenCache.Instance); + var credential = new ClientCredential(appId, appKey); + return context.AcquireToken("https://management.core.windows.net/", credential); + } + + private AuthenticationResult Renew(AdalConfiguration config, string appId) + { + using (SecureString appKey = LoadAppKey(appId, config.AdDomain)) + { + if (appKey == null) + { + throw new KeyNotFoundException(string.Format(Resources.ServiceKeyNotFound, appId)); + } + return AcquireToken(config, appId, appKey); + } + } + + private SecureString LoadAppKey(string appId, string tenantId) + { + return ServicePrincipalKeyStore.GetKey(appId, tenantId); + } + + private void StoreAppKey(string appId, string tenantId, SecureString appKey) + { + ServicePrincipalKeyStore.SaveKey(appId, tenantId, appKey); + } + + + private class ServicePrincipalAccessToken : IAccessToken + { + internal readonly AdalConfiguration Configuration; + internal AuthenticationResult AuthResult; + private readonly ServicePrincipalTokenProvider tokenProvider; + private readonly string appId; + + public ServicePrincipalAccessToken(AdalConfiguration configuration, AuthenticationResult authResult, ServicePrincipalTokenProvider tokenProvider, string appId) + { + Configuration = configuration; + AuthResult = authResult; + this.tokenProvider = tokenProvider; + this.appId = appId; + } + + public void AuthorizeRequest(Action authTokenSetter) + { + if (IsExpired) + { + AuthResult = tokenProvider.Renew(Configuration, appId); + } + + authTokenSetter(AuthResult.AccessTokenType, AuthResult.AccessToken); + } + + public string UserId { get { return appId; }} + public string AccessToken { get { return AuthResult.AccessToken; } } + public LoginType LoginType { get { return LoginType.OrgId; } } + public string TenantId { get { return this.Configuration.AdDomain; } } + + private bool IsExpired + { + get + { +#if DEBUG + if (Environment.GetEnvironmentVariable("FORCE_EXPIRED_ACCESS_TOKEN") != null) + { + return true; + } +#endif + + return AuthResult.ExpiresOn - expirationThreshold < DateTimeOffset.Now; + } + } + } + } +} diff --git a/src/Common/Commands.Common/Authentication/ShowDialog.cs b/src/Common/Commands.Common/Authentication/ShowDialog.cs new file mode 100644 index 000000000000..a3669e7c8835 --- /dev/null +++ b/src/Common/Commands.Common/Authentication/ShowDialog.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common.Authentication +{ + public enum ShowDialog + { + Auto, + Always, + Never + } +} \ No newline at end of file diff --git a/src/Common/Commands.Common/Authentication/UserTokenProvider.cs b/src/Common/Commands.Common/Authentication/UserTokenProvider.cs new file mode 100644 index 000000000000..d94ffe98da93 --- /dev/null +++ b/src/Common/Commands.Common/Authentication/UserTokenProvider.cs @@ -0,0 +1,271 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Runtime.InteropServices; +using System.Security; +using System.Threading; +using System.Windows.Forms; +using Microsoft.IdentityModel.Clients.ActiveDirectory; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Properties; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common.Authentication +{ + /// + /// A token provider that uses ADAL to retrieve + /// tokens from Azure Active Directory for user + /// credentials. + /// + internal class UserTokenProvider : ITokenProvider + { + private readonly IWin32Window parentWindow; + + public UserTokenProvider(IWin32Window parentWindow) + { + this.parentWindow = parentWindow; + } + + public IAccessToken GetAccessToken(AdalConfiguration config, ShowDialog promptBehavior, string userId, SecureString password, + AzureAccount.AccountType credentialType) + { + if (credentialType != AzureAccount.AccountType.User) + { + throw new ArgumentException(string.Format(Resources.InvalidCredentialType, "User"), "credentialType"); + } + + return new AdalAccessToken(AcquireToken(config, promptBehavior, userId, password), this, config); + } + + private readonly static TimeSpan thresholdExpiration = new TimeSpan(0, 5, 0); + + private bool IsExpired(AdalAccessToken token) + { +#if DEBUG + if (Environment.GetEnvironmentVariable("FORCE_EXPIRED_ACCESS_TOKEN") != null) + { + return true; + } +#endif + + return token.AuthResult.ExpiresOn - DateTimeOffset.Now < thresholdExpiration; + } + + private void Renew(AdalAccessToken token) + { + if (IsExpired(token)) + { + AuthenticationResult result = AcquireToken(token.Configuration, ShowDialog.Never, token.UserId, null); + + if (result == null) + { + throw new Exception(Resources.ExpiredRefreshToken); + } + else + { + token.AuthResult = result; + } + } + } + + private AuthenticationContext CreateContext(AdalConfiguration config) + { + return new AuthenticationContext(config.AdEndpoint + config.AdDomain, config.ValidateAuthority, ProtectedFileTokenCache.Instance) + { + OwnerWindow = parentWindow + }; + } + + // We have to run this in a separate thread to guarantee that it's STA. This method + // handles the threading details. + private AuthenticationResult AcquireToken(AdalConfiguration config, ShowDialog promptBehavior, string userId, + SecureString password) + { + AuthenticationResult result = null; + Exception ex = null; + if (promptBehavior == ShowDialog.Never) + { + result = SafeAquireToken(config, promptBehavior, userId, password, out ex); + } + else + { + var thread = new Thread(() => + { + result = SafeAquireToken(config, promptBehavior, userId, password, out ex); + }); + + thread.SetApartmentState(ApartmentState.STA); + thread.Name = "AcquireTokenThread"; + thread.Start(); + thread.Join(); + } + + if (ex != null) + { + var adex = ex as AdalException; + if (adex != null) + { + if (adex.ErrorCode == AdalError.AuthenticationCanceled) + { + throw new AadAuthenticationCanceledException(adex.Message, adex); + } + } + if (ex is AadAuthenticationException) + { + throw ex; + } + throw new AadAuthenticationFailedException(GetExceptionMessage(ex), ex); + } + + return result; + } + + private AuthenticationResult SafeAquireToken( + AdalConfiguration config, + ShowDialog showDialog, + string userId, + SecureString password, + out Exception ex) + { + try + { + ex = null; + var promptBehavior = (PromptBehavior)Enum.Parse(typeof(PromptBehavior), showDialog.ToString()); + + return DoAcquireToken(config, promptBehavior, userId, password); + } + catch (AdalException adalEx) + { + if (adalEx.ErrorCode == AdalError.UserInteractionRequired || + adalEx.ErrorCode == AdalError.MultipleTokensMatched) + { + ex = new AadAuthenticationFailedWithoutPopupException(Resources.InvalidSubscriptionState, adalEx); + } + else if (adalEx.ErrorCode == AdalError.MissingFederationMetadataUrl) + { + ex = new AadAuthenticationFailedException(Resources.CredentialOrganizationIdMessage, adalEx); + } + else + { + ex = adalEx; + } + } + catch (Exception threadEx) + { + ex = threadEx; + } + return null; + } + + private AuthenticationResult DoAcquireToken(AdalConfiguration config, PromptBehavior promptBehavior, string userId, + SecureString password) + { + AuthenticationResult result; + var context = CreateContext(config); + + if (string.IsNullOrEmpty(userId)) + { + if (promptBehavior != PromptBehavior.Never) + { + ClearCookies(); + } + + result = context.AcquireToken(config.ResourceClientUri, config.ClientId, + config.ClientRedirectUri, promptBehavior, + UserIdentifier.AnyUser, AdalConfiguration.EnableEbdMagicCookie); + } + else + { + if (password == null) + { + result = context.AcquireToken(config.ResourceClientUri, config.ClientId, + config.ClientRedirectUri, promptBehavior, + new UserIdentifier(userId, UserIdentifierType.OptionalDisplayableId), + AdalConfiguration.EnableEbdMagicCookie); + } + else + { + UserCredential credential = new UserCredential(userId, password); + result = context.AcquireToken(config.ResourceClientUri, config.ClientId, credential); + } + } + return result; + } + + private string GetExceptionMessage(Exception ex) + { + string message = ex.Message; + if (ex.InnerException != null) + { + message += ": " + ex.InnerException.Message; + } + return message; + } + /// + /// Implementation of using data from ADAL + /// + private class AdalAccessToken : IAccessToken + { + internal readonly AdalConfiguration Configuration; + internal AuthenticationResult AuthResult; + private readonly UserTokenProvider tokenProvider; + + public AdalAccessToken(AuthenticationResult authResult, UserTokenProvider tokenProvider, AdalConfiguration configuration) + { + AuthResult = authResult; + this.tokenProvider = tokenProvider; + Configuration = configuration; + } + + public void AuthorizeRequest(Action authTokenSetter) + { + tokenProvider.Renew(this); + authTokenSetter(AuthResult.AccessTokenType, AuthResult.AccessToken); + } + + public string AccessToken { get { return AuthResult.AccessToken; } } + public string UserId { get { return AuthResult.UserInfo.DisplayableId; } } + + public string TenantId { get { return AuthResult.TenantId; } } + + public LoginType LoginType + { + get + { + if (AuthResult.UserInfo.IdentityProvider != null) + { + return LoginType.LiveId; + } + return LoginType.OrgId; + } + } + } + + + private void ClearCookies() + { + NativeMethods.InternetSetOption(IntPtr.Zero, NativeMethods.INTERNET_OPTION_END_BROWSER_SESSION, IntPtr.Zero, 0); + } + + private static class NativeMethods + { + internal const int INTERNET_OPTION_END_BROWSER_SESSION = 42; + + [DllImport("wininet.dll", SetLastError = true)] + internal static extern bool InternetSetOption(IntPtr hInternet, int dwOption, IntPtr lpBuffer, + int lpdwBufferLength); + } + + } +} diff --git a/src/Common/Commands.Common/AzureSession.cs b/src/Common/Commands.Common/AzureSession.cs new file mode 100644 index 000000000000..3c92b0eed95d --- /dev/null +++ b/src/Common/Commands.Common/AzureSession.cs @@ -0,0 +1,93 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Microsoft.WindowsAzure.Commands.Common.Common; +using Microsoft.WindowsAzure.Commands.Common.Factories; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.Authentication; + +namespace Microsoft.WindowsAzure.Commands.Common +{ + public static class AzureSession + { + static AzureSession() + { + ClientFactory = new AzurePowerShellClientFactory(); + AuthenticationFactory = new AuthenticationFactory(); + CurrentContext = new AzureContext(); + CurrentContext.Environment = AzureEnvironment.PublicEnvironments[EnvironmentName.AzureCloud]; + } + + public static AzureContext CurrentContext {get; private set; } + + public static void SetCurrentContext(AzureSubscription subscription, AzureEnvironment environment, AzureAccount account) + { + if (environment == null) + { + if (subscription != null && CurrentContext != null && + subscription.Environment == CurrentContext.Environment.Name) + { + environment = CurrentContext.Environment; + } + else + { + environment = AzureEnvironment.PublicEnvironments[EnvironmentName.AzureCloud]; + } + + if (subscription != null) + { + subscription.Environment = environment.Name; + } + } + + if (account == null) + { + if (subscription != null && CurrentContext != null && subscription.Account != null) + { + if (CurrentContext.Account != null && subscription.Account == CurrentContext.Account.Id) + { + account = CurrentContext.Account; + } + else + { + throw new ArgumentException(Resources.AccountIdDoesntMatchSubscription, "account"); + } + + subscription.Account = account.Id; + + } + } + + if (subscription != null && subscription.Environment != environment.Name) + { + throw new ArgumentException(Resources.EnvironmentNameDoesntMatchSubscription, "environment"); + } + + CurrentContext = new AzureContext + { + Subscription = subscription, + Account = account, + Environment = environment + }; + } + + public static IClientFactory ClientFactory { get; set; } + + public static IAuthenticationFactory AuthenticationFactory { get; set; } + } +} diff --git a/src/Common/Commands.Common/Commands.Common.csproj b/src/Common/Commands.Common/Commands.Common.csproj new file mode 100644 index 000000000000..e83d8a68559c --- /dev/null +++ b/src/Common/Commands.Common/Commands.Common.csproj @@ -0,0 +1,236 @@ + + + + + Debug + AnyCPU + {5EE72C53-1720-4309-B54B-5FB79703195F} + Library + Properties + Microsoft.WindowsAzure.Commands.Common + Microsoft.WindowsAzure.Commands.Common + v4.5 + 512 + + ..\..\ + true + /assemblyCompareMode:StrongNameIgnoringVersion + + + true + full + false + bin\Debug + DEBUG;TRACE + prompt + 4 + true + true + false + true + + + bin\Release + TRACE;SIGN + true + pdbonly + AnyCPU + bin\Release\Management.Utilities.dll.CodeAnalysisLog.xml + true + GlobalSuppressions.cs + prompt + MinimumRecommendedRules.ruleset + ;$(ProgramFiles)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\Rule Sets + ;$(ProgramFiles)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\FxCop\Rules + true + MSSharedLibKey.snk + true + true + false + true + + + + False + ..\..\packages\Microsoft.Azure.Management.Resources.2.7.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll + + + ..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll + + + ..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll + + + ..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll + + + False + ..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll + + + False + ..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll + + + False + ..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + False + ..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + False + ..\..\packages\Microsoft.WindowsAzure.Management.2.1.0\lib\net40\Microsoft.WindowsAzure.Management.dll + + + ..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + True + + + + + + + + False + ..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\packages\Microsoft.AspNet.WebApi.Client.5.2.2\lib\net45\System.Net.Http.Formatting.dll + + + False + ..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + + + + + ..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll + + + + + + + + + + + + + + + + + + + True + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + True + Resources.resx + + + + + PublicResXFileCodeGenerator + Resources.Designer.cs + + + + + + Designer + + + + + + + + + + \ No newline at end of file diff --git a/src/Common/Commands.Common/Common/AzureModule.cs b/src/Common/Commands.Common/Common/AzureModule.cs new file mode 100644 index 000000000000..3a4fa4bb960e --- /dev/null +++ b/src/Common/Commands.Common/Common/AzureModule.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common +{ + public enum AzureModule + { + AzureServiceManagement, + AzureResourceManager, + AzureProfile + } +} diff --git a/src/Common/Commands.Common/Common/AzurePSCmdlet.cs b/src/Common/Commands.Common/Common/AzurePSCmdlet.cs new file mode 100644 index 000000000000..15bc85031677 --- /dev/null +++ b/src/Common/Commands.Common/Common/AzurePSCmdlet.cs @@ -0,0 +1,265 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Diagnostics; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Properties; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common +{ + public abstract class AzurePSCmdlet : PSCmdlet + { + private readonly RecordingTracingInterceptor httpTracingInterceptor = new RecordingTracingInterceptor(); + + public AzurePSCmdlet() + { + DefaultProfileClient = new ProfileClient(); + + if (AzureSession.CurrentContext.Subscription == null && + DefaultProfileClient.Profile.DefaultSubscription != null) + { + try + { + AzureSession.SetCurrentContext( + DefaultProfileClient.Profile.DefaultSubscription, + DefaultProfileClient.GetEnvironmentOrDefault( + DefaultProfileClient.Profile.DefaultSubscription.Environment), + DefaultProfileClient.GetAccountOrNull(DefaultProfileClient.Profile.DefaultSubscription.Account)); + } + catch + { + // Ignore anything at this point + } + } + + } + + public AzureContext CurrentContext + { + get { return AzureSession.CurrentContext; } + } + + public bool HasCurrentSubscription + { + get { return AzureSession.CurrentContext.Subscription != null; } + } + + public ProfileClient DefaultProfileClient { get; private set; } + + protected string CurrentPath() + { + // SessionState is only available within Powershell so default to + // the CurrentDirectory when being run from tests. + return (SessionState != null) ? + SessionState.Path.CurrentLocation.Path : + Environment.CurrentDirectory; + } + + protected bool IsVerbose() + { + bool verbose = MyInvocation.BoundParameters.ContainsKey("Verbose") && ((SwitchParameter)MyInvocation.BoundParameters["Verbose"]).ToBool(); + return verbose; + } + + public new void WriteError(ErrorRecord errorRecord) + { + FlushMessagesFromTracingInterceptor(); + base.WriteError(errorRecord); + } + + public new void WriteObject(object sendToPipeline) + { + FlushMessagesFromTracingInterceptor(); + base.WriteObject(sendToPipeline); + } + + public new void WriteObject(object sendToPipeline, bool enumerateCollection) + { + FlushMessagesFromTracingInterceptor(); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + public new void WriteVerbose(string text) + { + FlushMessagesFromTracingInterceptor(); + base.WriteVerbose(text); + } + + public new void WriteWarning(string text) + { + FlushMessagesFromTracingInterceptor(); + base.WriteWarning(text); + } + + public new void WriteCommandDetail(string text) + { + FlushMessagesFromTracingInterceptor(); + base.WriteCommandDetail(text); + } + + public new void WriteProgress(ProgressRecord progressRecord) + { + FlushMessagesFromTracingInterceptor(); + base.WriteProgress(progressRecord); + } + + public new void WriteDebug(string text) + { + FlushMessagesFromTracingInterceptor(); + base.WriteDebug(text); + } + + protected void WriteVerboseWithTimestamp(string message, params object[] args) + { + WriteVerbose(string.Format("{0:T} - {1}", DateTime.Now, string.Format(message, args))); + } + + protected void WriteVerboseWithTimestamp(string message) + { + WriteVerbose(string.Format("{0:T} - {1}", DateTime.Now, message)); + } + + protected void WriteWarningWithTimestamp(string message) + { + WriteWarning(string.Format("{0:T} - {1}", DateTime.Now, message)); + } + + protected void WriteDebugWithTimestamp(string message, params object[] args) + { + WriteDebug(string.Format("{0:T} - {1}", DateTime.Now, string.Format(message, args))); + } + + protected void WriteDebugWithTimestamp(string message) + { + WriteDebug(string.Format("{0:T} - {1}", DateTime.Now, message)); + } + + protected void WriteErrorWithTimestamp(string message) + { + WriteError( + new ErrorRecord(new Exception(string.Format("{0:T} - {1}", DateTime.Now, message)), + string.Empty, + ErrorCategory.NotSpecified, + null)); + } + + /// + /// Write an error message for a given exception. + /// + /// The exception resulting from the error. + protected virtual void WriteExceptionError(Exception ex) + { + Debug.Assert(ex != null, "ex cannot be null or empty."); + WriteError(new ErrorRecord(ex, string.Empty, ErrorCategory.CloseError, null)); + } + + protected PSObject ConstructPSObject(string typeName, params object[] args) + { + return PowerShellUtilities.ConstructPSObject(typeName, args); + } + + protected void SafeWriteOutputPSObject(string typeName, params object[] args) + { + PSObject customObject = this.ConstructPSObject(typeName, args); + WriteObject(customObject); + } + + public virtual void ExecuteCmdlet() + { + // Do nothing. + } + + protected override void ProcessRecord() + { + try + { + base.ProcessRecord(); + ExecuteCmdlet(); + } + catch (Exception ex) + { + WriteExceptionError(ex); + } + } + + /// + /// Cmdlet begin process + /// + protected override void BeginProcessing() + { + if (string.IsNullOrEmpty(ParameterSetName)) + { + WriteDebugWithTimestamp(string.Format(Resources.BeginProcessingWithoutParameterSetLog, this.GetType().Name)); + } + else + { + WriteDebugWithTimestamp(string.Format(Resources.BeginProcessingWithParameterSetLog, this.GetType().Name, ParameterSetName)); + } + + if (CurrentContext != null && CurrentContext.Account != null && CurrentContext.Account.Id != null) + { + WriteDebugWithTimestamp(string.Format("using account id '{0}'...", CurrentContext.Account.Id)); + } + + RecordingTracingInterceptor.AddToContext(httpTracingInterceptor); + + base.BeginProcessing(); + } + + private void FlushMessagesFromTracingInterceptor() + { + string message; + while (httpTracingInterceptor.MessageQueue.TryDequeue(out message)) + { + base.WriteDebug(message); + } + } + + /// + /// End processing + /// + protected override void EndProcessing() + { + string message = string.Format(Resources.EndProcessingLog, this.GetType().Name); + WriteDebugWithTimestamp(message); + + RecordingTracingInterceptor.RemoveFromContext(httpTracingInterceptor); + FlushMessagesFromTracingInterceptor(); + + base.EndProcessing(); + } + + /// + /// Asks for confirmation before executing the action. + /// + /// Do not ask for confirmation + /// Message to describe the action + /// Message to prompt after the active is performed. + /// The target name. + /// The action code + protected void ConfirmAction(bool force, string actionMessage, string processMessage, string target, Action action) + { + if (force || ShouldContinue(actionMessage, "")) + { + if (ShouldProcess(target, processMessage)) + { + action(); + } + } + } + } +} diff --git a/src/Common/Commands.Common/Common/AzurePowerShell.cs b/src/Common/Commands.Common/Common/AzurePowerShell.cs new file mode 100644 index 000000000000..a09ab2ba7d20 --- /dev/null +++ b/src/Common/Commands.Common/Common/AzurePowerShell.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using Microsoft.WindowsAzure.Commands.Common.Properties; + +namespace Microsoft.WindowsAzure.Commands.Common +{ + public class AzurePowerShell + { + public const string AssemblyCompany = "Microsoft"; + + public const string AssemblyProduct = "Microsoft Azure Powershell"; + + public const string AssemblyCopyright = "Copyright © Microsoft"; + + public const string AssemblyVersion = "0.8.11"; + + public const string AssemblyFileVersion = "0.8.11"; + + public const string ProfileFile = "AzureProfile.json"; + + public const string OldProfileFile = "WindowsAzureProfile.xml"; + + public const string OldProfileFileBackup = "WindowsAzureProfile.xml.bak"; + + public const string TokenCacheFile = "TokenCache.dat"; + + public static string ProfileDirectory = Path.Combine( + Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), + Resources.AzureDirectoryName); + } +} diff --git a/src/Common/Commands.Common/Common/AzurePowerShellClientFactory.cs b/src/Common/Commands.Common/Common/AzurePowerShellClientFactory.cs new file mode 100644 index 000000000000..45752e551ab6 --- /dev/null +++ b/src/Common/Commands.Common/Common/AzurePowerShellClientFactory.cs @@ -0,0 +1,134 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Management.Resources; +using Microsoft.WindowsAzure.Commands.Common.Factories; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Common; +using System.Net; +using System.Linq; +using System.Collections.Generic; +using Microsoft.WindowsAzure.Management; + +namespace Microsoft.WindowsAzure.Commands.Common.Common +{ + public class AzurePowerShellClientFactory : ClientFactory + { + public override TClient CreateClient(AzureContext context, AzureEnvironment.Endpoint endpoint) + { + TClient client = base.CreateClient(context, endpoint); + + if (!TestMockSupport.RunningMocked) + { + if (endpoint == AzureEnvironment.Endpoint.ServiceManagement) + { + RegisterServiceManagementProviders(context); + } + else if (endpoint == AzureEnvironment.Endpoint.ResourceManager) + { + RegisterResourceManagerProviders(context); + } + } + + return client; + } + + /// + /// Registers resource providers for Sparta. + /// + /// The client type + private void RegisterResourceManagerProviders(AzureContext context) where T : ServiceClient + { + var providersToRegister = RequiredResourceLookup.RequiredProvidersForResourceManager(); + var registeredProviders = context.Subscription.GetPropertyAsArray(AzureSubscription.Property.RegisteredResourceProviders); + var unregisteredProviders = providersToRegister.Where(p => !registeredProviders.Contains(p)).ToList(); + var successfullyRegisteredProvider = new List(); + SubscriptionCloudCredentials creds = AzureSession.AuthenticationFactory.GetSubscriptionCloudCredentials(context); + + if (unregisteredProviders.Count > 0) + { + using (var client = CreateCustomClient(creds, context.Environment.GetEndpointAsUri(AzureEnvironment.Endpoint.ResourceManager))) + { + foreach (string provider in unregisteredProviders) + { + try + { + client.Providers.Register(provider); + successfullyRegisteredProvider.Add(provider); + } + catch + { + // Ignore this as the user may not have access to service management endpoint or the provider is already registered + } + } + } + + UpdateSubscriptionRegisteredProviders(context.Subscription, successfullyRegisteredProvider); + } + } + + /// + /// Registers resource providers for RDFE. + /// + /// The client type + private void RegisterServiceManagementProviders(AzureContext context) where T : ServiceClient + { + var credentials = AzureSession.AuthenticationFactory.GetSubscriptionCloudCredentials(context); + var providersToRegister = RequiredResourceLookup.RequiredProvidersForServiceManagement(); + var registeredProviders = context.Subscription.GetPropertyAsArray(AzureSubscription.Property.RegisteredResourceProviders); + var unregisteredProviders = providersToRegister.Where(p => !registeredProviders.Contains(p)).ToList(); + var successfullyRegisteredProvider = new List(); + + if (unregisteredProviders.Count > 0) + { + using (var client = new ManagementClient(credentials, context.Environment.GetEndpointAsUri(AzureEnvironment.Endpoint.ServiceManagement))) + { + foreach (var provider in unregisteredProviders) + { + try + { + client.Subscriptions.RegisterResource(provider); + } + catch (CloudException ex) + { + if (ex.Response.StatusCode != HttpStatusCode.Conflict && ex.Response.StatusCode != HttpStatusCode.NotFound) + { + // Conflict means already registered, that's OK. + // NotFound means there is no registration support, like Windows Azure Pack. + // Otherwise it's a failure. + throw; + } + } + successfullyRegisteredProvider.Add(provider); + } + } + + UpdateSubscriptionRegisteredProviders(context.Subscription, successfullyRegisteredProvider); + } + } + + private void UpdateSubscriptionRegisteredProviders(AzureSubscription subscription, List providers) + { + if (providers != null && providers.Count > 0) + { + subscription.SetOrAppendProperty(AzureSubscription.Property.RegisteredResourceProviders, + providers.ToArray()); + ProfileClient profileClient = new ProfileClient(); + profileClient.AddOrSetSubscription(subscription); + profileClient.Profile.Save(); + } + } + } +} diff --git a/src/Common/Commands.Common/Common/ChannelHelper.cs b/src/Common/Commands.Common/Common/ChannelHelper.cs new file mode 100644 index 000000000000..3dd385d3273c --- /dev/null +++ b/src/Common/Commands.Common/Common/ChannelHelper.cs @@ -0,0 +1,365 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Net; +using System.Net.Http; +using System.Runtime.Serialization; +using System.Security.Cryptography.X509Certificates; +using System.ServiceModel; +using System.ServiceModel.Channels; +using System.ServiceModel.Description; +using System.ServiceModel.Dispatcher; +using System.ServiceModel.Web; +using System.Text; +using System.Threading; +using System.Xml; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common +{ + public static class ChannelHelper + { + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "Disposing the factory would also dispose the channel we are returning.")] + public static T CreateServiceManagementChannel(X509Certificate2 cert) + where T : class + { + WebChannelFactory factory = new WebChannelFactory(); + factory.Endpoint.Behaviors.Add(new ServiceManagementClientOutputMessageInspector()); + factory.Credentials.ClientCertificate.Certificate = cert; + + var channel = factory.CreateChannel(); + return channel; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "Disposing the factory would also dispose the channel we are returning.")] + public static T CreateServiceManagementChannel(Binding binding, X509Certificate2 cert) + where T : class + { + WebChannelFactory factory = new WebChannelFactory(binding); + factory.Endpoint.Behaviors.Add(new ServiceManagementClientOutputMessageInspector()); + factory.Credentials.ClientCertificate.Certificate = cert; + + var channel = factory.CreateChannel(); + return channel; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "Disposing the factory would also dispose the channel we are returning.")] + public static T CreateServiceManagementChannel(ServiceEndpoint endpoint, X509Certificate2 cert) + where T : class + { + WebChannelFactory factory = new WebChannelFactory(endpoint); + factory.Endpoint.Behaviors.Add(new ServiceManagementClientOutputMessageInspector()); + factory.Credentials.ClientCertificate.Certificate = cert; + + var channel = factory.CreateChannel(); + return channel; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "Disposing the factory would also dispose the channel we are returning.")] + public static T CreateServiceManagementChannel(string endpointConfigurationName, X509Certificate2 cert) + where T : class + { + WebChannelFactory factory = new WebChannelFactory(endpointConfigurationName); + factory.Endpoint.Behaviors.Add(new ServiceManagementClientOutputMessageInspector()); + factory.Credentials.ClientCertificate.Certificate = cert; + + var channel = factory.CreateChannel(); + return channel; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "Disposing the factory would also dispose the channel we are returning.")] + public static T CreateServiceManagementChannel(Type channelType, X509Certificate2 cert) + where T : class + { + WebChannelFactory factory = new WebChannelFactory(channelType); + factory.Endpoint.Behaviors.Add(new ServiceManagementClientOutputMessageInspector()); + factory.Credentials.ClientCertificate.Certificate = cert; + + var channel = factory.CreateChannel(); + return channel; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "Disposing the factory would also dispose the channel we are returning.")] + public static T CreateServiceManagementChannel(Uri remoteUri, X509Certificate2 cert) + where T : class + { + WebChannelFactory factory = new WebChannelFactory(remoteUri); + factory.Endpoint.Behaviors.Add(new ServiceManagementClientOutputMessageInspector()); + factory.Credentials.ClientCertificate.Certificate = cert; + + var channel = factory.CreateChannel(); + return channel; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "Disposing the factory would also dispose the channel we are returning.")] + public static T CreateServiceManagementChannel(Uri remoteUri, string username, string password, params IEndpointBehavior[] behaviors) + where T : class + { + WebChannelFactory factory = new WebChannelFactory(remoteUri); + factory.Endpoint.Behaviors.Add(new ServiceManagementClientOutputMessageInspector()); + foreach (IEndpointBehavior behavior in behaviors) + { + factory.Endpoint.Behaviors.Add(behavior); + } + WebHttpBinding wb = factory.Endpoint.Binding as WebHttpBinding; + wb.Security.Transport.ClientCredentialType = HttpClientCredentialType.Basic; + wb.Security.Mode = WebHttpSecurityMode.Transport; + + if (!string.IsNullOrEmpty(username)) + { + factory.Credentials.UserName.UserName = username; + } + if (!string.IsNullOrEmpty(password)) + { + factory.Credentials.UserName.Password = password; + } + + return factory.CreateChannel(); + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "Disposing the factory would also dispose the channel we are returning.")] + public static T CreateServiceManagementChannel(Binding binding, Uri remoteUri, X509Certificate2 cert, params IEndpointBehavior[] behaviors) + where T : class + { + WebChannelFactory factory = new WebChannelFactory(binding, remoteUri); + factory.Endpoint.Behaviors.Add(new ServiceManagementClientOutputMessageInspector()); + factory.Credentials.ClientCertificate.Certificate = cert; + foreach (IEndpointBehavior behavior in behaviors) + { + factory.Endpoint.Behaviors.Add(behavior); + } + + var channel = factory.CreateChannel(); + return channel; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "Disposing the factory would also dispose the channel we are returning.")] + public static T CreateServiceManagementChannel(Binding binding, Uri remoteUri, params IEndpointBehavior[] behaviors) + where T : class + { + WebChannelFactory factory = new WebChannelFactory(binding, remoteUri); + factory.Endpoint.Behaviors.Add(new ServiceManagementClientOutputMessageInspector()); + foreach (IEndpointBehavior behavior in behaviors) + { + factory.Endpoint.Behaviors.Add(behavior); + } + + var channel = factory.CreateChannel(); + return channel; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "Disposing the factory would also dispose the channel we are returning.")] + public static T CreateServiceManagementChannel(string endpointConfigurationName, Uri remoteUri, X509Certificate2 cert) + where T : class + { + WebChannelFactory factory = new WebChannelFactory(endpointConfigurationName, remoteUri); + factory.Endpoint.Behaviors.Add(new ServiceManagementClientOutputMessageInspector()); + factory.Credentials.ClientCertificate.Certificate = cert; + + var channel = factory.CreateChannel(); + return channel; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "Disposing the factory would also dispose the channel we are returning.")] + public static T CreateChannel(Binding binding, Uri remoteUri, X509Certificate2 cert, params IEndpointBehavior[] behaviors) + where T : class + { + WebChannelFactory factory = new WebChannelFactory(binding, remoteUri); + factory.Credentials.ClientCertificate.Certificate = cert; + foreach (IEndpointBehavior behavior in behaviors) + { + factory.Endpoint.Behaviors.Add(behavior); + } + + var channel = factory.CreateChannel(); + return channel; + } + + public static bool TryGetExceptionDetails(CommunicationException exception, out ServiceManagementError errorDetails) + { + HttpStatusCode httpStatusCode; + string operationId; + return TryGetExceptionDetails(exception, out errorDetails, out httpStatusCode, out operationId); + } + + public static bool TryGetExceptionDetails(CommunicationException exception, out ServiceManagementError errorDetails, out HttpStatusCode httpStatusCode, out string operationId) + { + errorDetails = null; + httpStatusCode = 0; + operationId = null; + + if (exception == null) + { + return false; + } + + if (exception.Message == "Internal Server Error") + { + httpStatusCode = HttpStatusCode.InternalServerError; + return true; + } + + WebException wex = exception.InnerException as WebException; + + if (wex == null) + { + return false; + } + + HttpWebResponse response = wex.Response as HttpWebResponse; + if (response == null) + { + return false; + } + + //httpStatusCode = response.StatusCode; + //if (httpStatusCode == HttpStatusCode.Forbidden) + //{ + // return true; + //} + + if (response.Headers != null) + { + operationId = response.Headers[ApiConstants.OperationTrackingIdHeader]; + } + + // Don't wrap responseStream in a using statement to prevent it + // from being disposed twice (as it's disposed by reader if it is + // successfully disposed). + Stream responseStream = null; + try + { + responseStream = response.GetResponseStream(); + if (responseStream.Length == 0) + { + return false; + } + + try + { + using (XmlDictionaryReader reader = XmlDictionaryReader.CreateTextReader(responseStream, new XmlDictionaryReaderQuotas())) + { + // Release the reference to responseStream since it + // will be closed when the reader is diposed + responseStream = null; + + DataContractSerializer ser = new DataContractSerializer(typeof(ServiceManagementError)); + errorDetails = (ServiceManagementError)ser.ReadObject(reader, true); + } + } + catch (SerializationException) + { + return false; + } + } + finally + { + if (responseStream != null) + { + responseStream.Dispose(); + } + } + + return true; + } + + public static string EncodeToBase64String(string original) + { + if (string.IsNullOrEmpty(original)) + { + return original; + } + return Convert.ToBase64String(Encoding.UTF8.GetBytes(original)); + } + + public static string DecodeFromBase64String(string original) + { + if (string.IsNullOrEmpty(original)) + { + return original; + } + return Encoding.UTF8.GetString(Convert.FromBase64String(original)); + } + } + + public class UserAgentMessageProcessingHandler : MessageProcessingHandler + { + protected override HttpRequestMessage ProcessRequest(HttpRequestMessage request, CancellationToken cancellationToken) + { + request.Headers.UserAgent.Add(ApiConstants.UserAgentValue); + return request; + } + + protected override HttpResponseMessage ProcessResponse(HttpResponseMessage response, CancellationToken cancellationToken) + { + return response; + } + } + + public class ServiceManagementClientOutputMessageInspector : IClientMessageInspector, IEndpointBehavior + { + public const string UserAgentHeaderName = ApiConstants.UserAgentHeaderName; + public const string UserAgentHeaderContent = ApiConstants.UserAgentHeaderValue; + public const string VSDebuggerCausalityDataHeaderName = "VSDebuggerCausalityData"; + + #region IClientMessageInspector Members + + public void AfterReceiveReply(ref Message reply, object correlationState) { } + public object BeforeSendRequest(ref Message request, IClientChannel channel) + { + if (request.Properties.ContainsKey(HttpRequestMessageProperty.Name)) + { + var property = (HttpRequestMessageProperty)request.Properties[HttpRequestMessageProperty.Name]; + + // Remove VSDebuggerCausalityData header which is added by WCF. + if (property.Headers[VSDebuggerCausalityDataHeaderName] != null) + { + property.Headers.Remove(VSDebuggerCausalityDataHeaderName); + } + + if (property.Headers[ApiConstants.VersionHeaderName] == null) + { + property.Headers.Add(ApiConstants.VersionHeaderName, ApiConstants.VersionHeaderContentLatest); + } + + if (property.Headers[UserAgentHeaderName] == null) + { + property.Headers.Add(UserAgentHeaderName, UserAgentHeaderContent); + } + } + + return null; + } + + #endregion + + #region IEndpointBehavior Members + + public void AddBindingParameters(ServiceEndpoint endpoint, BindingParameterCollection bindingParameters) { } + + public void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime) + { + clientRuntime.MessageInspectors.Add(this); + } + + public void ApplyDispatchBehavior(ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher) { } + + public void Validate(ServiceEndpoint endpoint) { } + + #endregion + } +} \ No newline at end of file diff --git a/src/Common/Commands.Common/Common/ClientCreatedArgs.cs b/src/Common/Commands.Common/Common/ClientCreatedArgs.cs new file mode 100644 index 000000000000..acdbbfd2c093 --- /dev/null +++ b/src/Common/Commands.Common/Common/ClientCreatedArgs.cs @@ -0,0 +1,32 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Net.Http; + +namespace Microsoft.WindowsAzure.Commands.Common +{ + public class ClientCreatedArgs : EventArgs + { + public object CreatedClient { get; set; } + + public Type ClientType { get; set; } + + public void AddHandlerToClient(DelegatingHandler handler) + { + var withHandlerMethod = ClientType.GetMethod("WithHandler", new[] { typeof(DelegatingHandler) }); + CreatedClient = withHandlerMethod.Invoke(CreatedClient, new object[] { handler }); + } + } +} diff --git a/src/Common/Commands.Common/Common/CloudBaseCmdlet.cs b/src/Common/Commands.Common/Common/CloudBaseCmdlet.cs new file mode 100644 index 000000000000..6f1cfb01292f --- /dev/null +++ b/src/Common/Commands.Common/Common/CloudBaseCmdlet.cs @@ -0,0 +1,258 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Management.Automation; +using System.Net; +using System.ServiceModel; +using System.ServiceModel.Channels; +using System.ServiceModel.Security; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using System.Diagnostics; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common +{ + public abstract class CloudBaseCmdlet : AzurePSCmdlet + where T : class + { + private Binding _serviceBinding; + + public Binding ServiceBinding + { + get + { + if (_serviceBinding == null) + { + _serviceBinding = ConfigurationConstants.WebHttpBinding(MaxStringContentLength); + } + + return _serviceBinding; + } + + set { _serviceBinding = value; } + } + + public T Channel + { + get; + set; + } + + protected void OnCurrentSubscriptionUpdated() + { + // Recreate the channel if necessary + if (!ShareChannel) + { + InitChannelCurrentSubscription(true); + } + } + + public int MaxStringContentLength + { + get; + set; + } + + + protected void InitChannelCurrentSubscription() + { + InitChannelCurrentSubscription(false); + } + + protected virtual void InitChannelCurrentSubscription(bool force) + { + DoInitChannelCurrentSubscription(force); + } + + protected void DoInitChannelCurrentSubscription(bool force) + { + if (CurrentContext.Subscription == null) + { + throw new ArgumentException(Resources.InvalidCurrentSubscription); + } + + if (CurrentContext.Account == null) + { + throw new ArgumentException(Resources.InvalidCurrentSuscriptionCertificate); + } + + if (Channel == null || force) + { + Channel = CreateChannel(); + } + } + + protected virtual void OnProcessRecord() + { + // Intentionally left blank + } + + protected override void ProcessRecord() + { + Validate.ValidateInternetConnection(); + InitChannelCurrentSubscription(); + base.ProcessRecord(); + OnProcessRecord(); + } + + /// + /// Gets or sets a flag indicating whether CreateChannel should share + /// the command's current Channel when asking for a new one. This is + /// only used for testing. + /// + public bool ShareChannel { get; set; } + + protected virtual T CreateChannel() + { + // If ShareChannel is set by a unit test, use the same channel that + // was passed into out constructor. This allows the test to submit + // a mock that we use for all network calls. + if (ShareChannel) + { + return Channel; + } + + string certificateThumbprint = CurrentContext.Account.Id; + Debug.Assert(DefaultProfileClient.Profile.Accounts[certificateThumbprint].Type == AzureAccount.AccountType.Certificate); + + return ChannelHelper.CreateServiceManagementChannel( + ServiceBinding, + CurrentContext.Environment.GetEndpointAsUri(AzureEnvironment.Endpoint.ServiceManagement), + ProfileClient.DataStore.GetCertificate(certificateThumbprint), + new HttpRestMessageInspector(WriteDebug)); + } + + protected void RetryCall(Action call) + { + RetryCall(CurrentContext.Subscription.Id, call); + } + + protected void RetryCall(Guid subsId, Action call) + { + try + { + call(subsId.ToString()); + } + catch (MessageSecurityException ex) + { + var webException = ex.InnerException as WebException; + + if (webException == null) + { + throw; + } + + var webResponse = webException.Response as HttpWebResponse; + + if (webResponse != null && webResponse.StatusCode == HttpStatusCode.Forbidden) + { + WriteError(new ErrorRecord(new Exception(Resources.CommunicationCouldNotBeEstablished, ex), string.Empty, ErrorCategory.InvalidData, null)); + } + else + { + throw; + } + } + } + + protected TResult RetryCall(Func call) + { + return RetryCall(CurrentContext.Subscription.Id, call); + } + + protected TResult RetryCall(Guid subsId, Func call) + { + try + { + return call(subsId.ToString()); + } + catch (MessageSecurityException ex) + { + var webException = ex.InnerException as WebException; + + if (webException == null) + { + throw; + } + + var webResponse = webException.Response as HttpWebResponse; + + if (webResponse != null && webResponse.StatusCode == HttpStatusCode.Forbidden) + { + WriteError(new ErrorRecord(new Exception(Resources.CommunicationCouldNotBeEstablished, ex), string.Empty, ErrorCategory.InvalidData, null)); + throw; + } + + throw; + } + } + + /// + /// Invoke the given operation within an OperationContextScope if the + /// channel supports it. + /// + /// The action to invoke. + protected virtual void InvokeInOperationContext(Action action) + { + IContextChannel contextChannel = Channel as IContextChannel; + if (contextChannel != null) + { + using (new OperationContextScope(contextChannel)) + { + action(); + } + } + else + { + action(); + } + } + + protected virtual void WriteErrorDetails(CommunicationException exception) + { + ServiceManagementError error; + ErrorRecord errorRecord = null; + + string operationId; + if (ErrorHelper.TryGetExceptionDetails(exception, out error, out operationId)) + { + string errorDetails = string.Format( + CultureInfo.InvariantCulture, + "HTTP Status Code: {0} - HTTP Error Message: {1}\nOperation ID: {2}", + error.Code, + error.Message, + operationId); + + errorRecord = new ErrorRecord( + new CommunicationException(errorDetails), + string.Empty, + ErrorCategory.CloseError, + null); + } + else + { + errorRecord = new ErrorRecord(exception, string.Empty, ErrorCategory.CloseError, null); + } + + if (CommandRuntime != null) + { + WriteError(errorRecord); + } + } + } +} diff --git a/src/Common/Commands.Common/Common/CmdletExtensions.cs b/src/Common/Commands.Common/Common/CmdletExtensions.cs new file mode 100644 index 000000000000..c1cb970e42a3 --- /dev/null +++ b/src/Common/Commands.Common/Common/CmdletExtensions.cs @@ -0,0 +1,129 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Management.Automation; +using System.Reflection; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common +{ + public static class CmdletExtensions + { + public static string TryResolvePath(this PSCmdlet psCmdlet, string path) + { + try + { + return psCmdlet.ResolvePath(path); + } + catch + { + return path; + } + } + + public static string ResolvePath(this PSCmdlet psCmdlet, string path) + { + if (path == null) + { + return null; + } + + if (psCmdlet.SessionState == null) + { + return path; + } + + path = path.Trim('"', '\'', ' '); + var result = psCmdlet.SessionState.Path.GetResolvedPSPathFromPSPath(path); + string fullPath = string.Empty; + + if (result != null && result.Count > 0) + { + fullPath = result[0].Path; + } + + return fullPath; + } + + public static List ExecuteScript(this PSCmdlet cmdlet, string contents) + { + List output = new List(); + + using (System.Management.Automation.PowerShell powershell = System.Management.Automation.PowerShell.Create(RunspaceMode.CurrentRunspace)) + { + powershell.AddScript(contents); + Collection result = powershell.Invoke(); + + if (cmdlet.SessionState != null) + { + powershell.Streams.Error.ForEach(e => cmdlet.WriteError(e)); + powershell.Streams.Verbose.ForEach(r => cmdlet.WriteVerbose(r.Message)); + powershell.Streams.Warning.ForEach(r => cmdlet.WriteWarning(r.Message)); + } + + if (result != null && result.Count > 0) + { + output.AddRange(result); + } + } + + return output; + } + #region PowerShell Commands + + public static void RemoveModule(this PSCmdlet cmdlet, string moduleName) + { + string contents = string.Format("Remove-Module {0}", moduleName); + ExecuteScript(cmdlet, contents); + } + + public static List GetLoadedModules(this PSCmdlet cmdlet) + { + return ExecuteScript(cmdlet, "Get-Module"); + } + + public static void ImportModule(this PSCmdlet cmdlet, string modulePath) + { + string contents = string.Format("Import-Module '{0}'", modulePath); + ExecuteScript(cmdlet, contents); + } + + public static void RemoveAzureAliases(this PSCmdlet cmdlet) + { + string contents = "Get-Alias | where { $_.Description -eq 'AzureAlias' } | foreach { Remove-Item alias:\\$($_.Name) }"; + ExecuteScript(cmdlet, contents); + } + + public static void InvokeBeginProcessing(this PSCmdlet cmdlt) + { + MethodInfo dynMethod = (typeof(PSCmdlet)).GetMethod("BeginProcessing", BindingFlags.NonPublic | BindingFlags.Instance); + dynMethod.Invoke(cmdlt, null); + } + + public static void SetParameterSet(this PSCmdlet cmdlt, string value) + { + FieldInfo dynField = (typeof(Cmdlet)).GetField("_parameterSetName", BindingFlags.NonPublic | BindingFlags.Instance); + dynField.SetValue(cmdlt, value); + } + + public static void InvokeEndProcessing(this PSCmdlet cmdlt) + { + MethodInfo dynMethod = (typeof(PSCmdlet)).GetMethod("EndProcessing", BindingFlags.NonPublic | BindingFlags.Instance); + dynMethod.Invoke(cmdlt, null); + } + + #endregion + } +} diff --git a/src/Common/Commands.Common/Common/ConfigurationConstants.cs b/src/Common/Commands.Common/Common/ConfigurationConstants.cs new file mode 100644 index 000000000000..37b48da5303a --- /dev/null +++ b/src/Common/Commands.Common/Common/ConfigurationConstants.cs @@ -0,0 +1,41 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.ServiceModel; +using System.ServiceModel.Channels; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common +{ + public static class ConfigurationConstants + { + public const int MaxReceivedMessageSize = 100000000; + + public const int MaxStringContentLength = 67108864; + + public static Binding WebHttpBinding(int maxStringContentLength = 0) + { + var binding = new WebHttpBinding(WebHttpSecurityMode.Transport); + binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Certificate; + binding.ReaderQuotas.MaxStringContentLength = + maxStringContentLength > 0 ? + maxStringContentLength : + MaxStringContentLength; + + // Increasing MaxReceivedMessageSize to allow big deployments + binding.MaxReceivedMessageSize = MaxReceivedMessageSize; + + return binding; + } + } +} \ No newline at end of file diff --git a/src/Common/Commands.Common/Common/ErrorHelper.cs b/src/Common/Commands.Common/Common/ErrorHelper.cs new file mode 100644 index 000000000000..0b931ec57c58 --- /dev/null +++ b/src/Common/Commands.Common/Common/ErrorHelper.cs @@ -0,0 +1,137 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using System.Net; +using System.ServiceModel; +using System.Xml; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common +{ + public class ErrorHelper + { + public static bool TryGetExceptionDetails(CommunicationException exception, out ServiceManagementError errorDetails, out string operationId) + { + HttpStatusCode httpStatusCode; + return TryGetExceptionDetails(exception, out errorDetails, out httpStatusCode, out operationId); + } + + public static bool TryGetExceptionDetails(CommunicationException exception, out ServiceManagementError errorDetails, out HttpStatusCode httpStatusCode, out string operationId) + { + errorDetails = null; + httpStatusCode = 0; + operationId = null; + + if (exception == null) + { + return false; + } + + if (exception.Message == "Internal Server Error") + { + httpStatusCode = HttpStatusCode.InternalServerError; + return false; + } + + WebException wex = exception.InnerException as WebException; + + if (wex == null) + { + return false; + } + + HttpWebResponse response = wex.Response as HttpWebResponse; + if (response == null) + { + return false; + } + + if (response.Headers != null) + { + operationId = response.Headers[ApiConstants.OperationTrackingIdHeader]; + } + + if (response.StatusCode == HttpStatusCode.NotFound) + { + errorDetails = new ServiceManagementError(); + errorDetails.Message = response.ResponseUri.AbsoluteUri + " does not exist."; + errorDetails.Code = response.StatusCode.ToString(); + return false; + } + + using (var s = response.GetResponseStream()) + { + if (s == null || s.Length == 0) + { + return false; + } + + try + { + errorDetails = new ServiceManagementError(); + s.Seek(0, SeekOrigin.Begin); + + var sr = new StreamReader(s); + using (var err = new StringReader(sr.ReadToEnd())) + { + var reader = XmlReader.Create(err); + + while (reader.Read()) + { + switch (reader.NodeType) + { + case XmlNodeType.Element: + { + if (reader.Name == "Code") + { + reader.Read(); + errorDetails.Code = reader.Value; + } + else if (reader.Name == "Message") + { + reader.Read(); + errorDetails.Message = reader.Value; + } + + break; + } + } + } + } + } + catch + { + errorDetails = null; + return false; + } + } + + return true; + } + + /// + /// is not found communication exception + /// + /// Communication Exception + /// true if exception caused by resource not found, otherwise, false + public static bool IsNotFoundCommunicationException(CommunicationException exception) + { + ServiceManagementError error; + string operationId; + TryGetExceptionDetails(exception, out error, out operationId); + return error != null && error.Code == HttpStatusCode.NotFound.ToString(); + } + } +} \ No newline at end of file diff --git a/src/Common/Commands.Common/Common/HttpClientExtensions.cs b/src/Common/Commands.Common/Common/HttpClientExtensions.cs new file mode 100644 index 000000000000..b5df42f25c46 --- /dev/null +++ b/src/Common/Commands.Common/Common/HttpClientExtensions.cs @@ -0,0 +1,150 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Net; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Threading.Tasks; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common +{ + public static class HttpClientExtensions + { + private static void AddUserAgent(HttpClient client) + { + if (!client.DefaultRequestHeaders.UserAgent.Contains(ApiConstants.UserAgentValue)) + { + client.DefaultRequestHeaders.UserAgent.Add(ApiConstants.UserAgentValue); + } + } + + private static void LogResponse( + string statusCode, + HttpResponseHeaders headers, + string content, + Action logger) + { + if (logger != null) + { + logger(GeneralUtilities.GetHttpResponseLog(statusCode, headers, content)); + } + } + + private static void LogRequest( + string method, + string requestUri, + HttpRequestHeaders headers, + string body, + Action logger) + { + if (logger != null) + { + logger(GeneralUtilities.GetHttpRequestLog(method, requestUri, headers, body)); + } + } + + private static T GetFormat( + HttpClient client, + string requestUri, + Action logger, + Func formatter, + Func serializer) + where T: class, new() + { + AddUserAgent(client); + LogRequest( + HttpMethod.Get.Method, + client.BaseAddress + requestUri, + client.DefaultRequestHeaders, + string.Empty, + logger); + HttpResponseMessage response = client.GetAsync(requestUri).Result; + string content = response.EnsureSuccessStatusCode().Content.ReadAsStringAsync().Result; + LogResponse(response.StatusCode.ToString(), response.Headers, formatter(content), logger); + + try + { + return serializer(content); + } + catch (Exception) + { + return new T(); + } + } + + private static T CallRestApiWithJsonPayload( + this HttpClient client, + string requestUri, + T json, + Action logger, + string method) + { + AddUserAgent(client); + client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); + + LogRequest( + method, + client.BaseAddress + requestUri, + client.DefaultRequestHeaders, + JsonConvert.SerializeObject(json, Formatting.Indented), + logger); + HttpResponseMessage response; + + switch (method.ToUpper()) + { + case WebRequestMethods.Http.Post: response = client.PostAsJsonAsync(requestUri, json).Result; break; + case WebRequestMethods.Http.Put: response = client.PutAsJsonAsync(requestUri, json).Result; break; + default: throw new InvalidOperationException(); + } + + string content = response.EnsureSuccessStatusCode().Content.ReadAsStringAsync().Result; + LogResponse( + response.StatusCode.ToString(), + response.Headers, + JsonUtilities.TryFormatJson(content), + logger); + + return JsonConvert.DeserializeObject(content); + } + + public static T GetJson(this HttpClient client, string requestUri, Action logger) + where T : class, new() + { + client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); + return GetFormat(client, requestUri, logger, JsonUtilities.TryFormatJson, JsonConvert.DeserializeObject); + } + + public static T PostJson( + this HttpClient client, + string requestUri, + T json, + Action logger) + { + return CallRestApiWithJsonPayload(client, requestUri, json, logger, WebRequestMethods.Http.Post); + } + + public static T PutJson( + this HttpClient client, + string requestUri, + T json, + Action logger) + { + return CallRestApiWithJsonPayload(client, requestUri, json, logger, WebRequestMethods.Http.Put); + } + } +} diff --git a/src/Common/Commands.Common/Common/HttpRestCallLogger.cs b/src/Common/Commands.Common/Common/HttpRestCallLogger.cs new file mode 100644 index 000000000000..8d2d8e8bb7b0 --- /dev/null +++ b/src/Common/Commands.Common/Common/HttpRestCallLogger.cs @@ -0,0 +1,56 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using System.Management.Automation.Runspaces; +using System.Net.Http; +using System.Threading; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common +{ + public class HttpRestCallLogger : MessageProcessingHandler + { + public static PSCmdlet CurrentCmdlet { get; set; } + + protected override HttpResponseMessage ProcessResponse(HttpResponseMessage response, CancellationToken cancellationToken) + { + WriteLog(GeneralUtilities.GetLog(response)); + return response; + } + + protected override HttpRequestMessage ProcessRequest(HttpRequestMessage request, CancellationToken cancellationToken) + { + WriteLog(GeneralUtilities.GetLog(request)); + return request; + } + + private void WriteLog(string log) + { + string debugPreference = CurrentCmdlet.GetVariableValue("DebugPreference").ToString(); + if (CurrentCmdlet.MyInvocation.BoundParameters.ContainsKey("Debug") || + debugPreference.Equals("Continue")) + { + using (System.Management.Automation.PowerShell ps = System.Management.Automation.PowerShell.Create()) + { + ps.Runspace = RunspaceFactory.CreateRunspace(CurrentCmdlet.Host); + ps.Runspace.Open(); + ps.AddScript("$DebugPreference='Continue'"); + ps.AddScript(string.Format("Write-Debug @'\n{0}\n'@", log)); + ps.Invoke(); + } + } + } + } + +} diff --git a/src/Common/Commands.Common/Common/HttpRestMessageInspector.cs b/src/Common/Commands.Common/Common/HttpRestMessageInspector.cs new file mode 100644 index 000000000000..6d042451289c --- /dev/null +++ b/src/Common/Commands.Common/Common/HttpRestMessageInspector.cs @@ -0,0 +1,125 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Net.Http; +using System.ServiceModel; +using System.ServiceModel.Channels; +using System.ServiceModel.Description; +using System.ServiceModel.Dispatcher; +using System.Threading; +using System.Xml.Linq; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common +{ + public class HttpRestMessageHandler : MessageProcessingHandler + { + private Action logger; + + public HttpRestMessageHandler(Action logger) + { + this.logger = logger; + } + + protected override HttpRequestMessage ProcessRequest(HttpRequestMessage request, CancellationToken cancellationToken) + { + string body = String.Empty; + if (request.Content != null) + { + var contentHeaders = request.Content.Headers; + var stream = new MemoryStream(); + request.Content.CopyToAsync(stream).Wait(); + if (stream.Length > 0) + { + stream.Position = 0; + body = XElement.Load(stream).ToString(); + } + stream.Position = 0; + request.Content = new StreamContent(stream); + contentHeaders.ForEach(kv => request.Content.Headers.Add(kv.Key, kv.Value)); + } + logger(GeneralUtilities.GetHttpRequestLog(request.Method.ToString(), request.RequestUri.AbsoluteUri, request.Headers, body)); + + return request; + } + + protected override HttpResponseMessage ProcessResponse(HttpResponseMessage response, CancellationToken cancellationToken) + { + string body = String.Empty; + if(response.Content != null) + { + var contentHeaders = response.Content.Headers; + var stream = new MemoryStream(); + response.Content.CopyToAsync(stream).Wait(); + if (stream.Length > 0 && response.Content.Headers.ContentType.MediaType != "application/x-rdp") + { + stream.Position = 0; + body = XElement.Load(stream).ToString(); + } + stream.Position = 0; + response.Content = new StreamContent(stream); + contentHeaders.ForEach(kv => response.Content.Headers.Add(kv.Key, kv.Value)); + } + logger(GeneralUtilities.GetHttpResponseLog(response.StatusCode.ToString(), response.Headers, body)); + + return response; + } + } + + public class HttpRestMessageInspector : IClientMessageInspector, IEndpointBehavior + { + private Action logger; + + public HttpRestMessageInspector(Action logger) + { + this.logger = logger; + } + + #region IClientMessageInspector + + public virtual void AfterReceiveReply(ref Message reply, object correlationState) + { + HttpResponseMessageProperty prop = (HttpResponseMessageProperty)reply.Properties[HttpResponseMessageProperty.Name]; + string body = GeneralUtilities.ReadMessageBody(ref reply); + logger(GeneralUtilities.GetHttpResponseLog(prop.StatusCode.ToString(), prop.Headers, body)); + } + + public virtual object BeforeSendRequest(ref Message request, IClientChannel channel) + { + HttpRequestMessageProperty prop = (HttpRequestMessageProperty)request.Properties[HttpRequestMessageProperty.Name]; + string body = GeneralUtilities.ReadMessageBody(ref request); + logger(GeneralUtilities.GetHttpRequestLog(prop.Method, request.Headers.To.AbsoluteUri, prop.Headers, body)); + + return request; + } + + #endregion + + #region IEndpointBehavior Members + + public void AddBindingParameters(ServiceEndpoint endpoint, BindingParameterCollection bindingParameters) { } + + public void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime) + { + clientRuntime.MessageInspectors.Add(this); + } + + public void ApplyDispatchBehavior(ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher) { } + + public void Validate(ServiceEndpoint endpoint) { } + + #endregion + } +} diff --git a/src/Common/Commands.Common/Common/IdnHelper.cs b/src/Common/Commands.Common/Common/IdnHelper.cs new file mode 100644 index 000000000000..8e06ab3330c6 --- /dev/null +++ b/src/Common/Commands.Common/Common/IdnHelper.cs @@ -0,0 +1,106 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common +{ + public static class IdnHelper + { + private const string idnHostNamePrefix = "xn--"; + + private static IdnMapping idnMapping = new IdnMapping(); + + public static string GetUnicode(string name) + { + if (!string.IsNullOrWhiteSpace(name) && name.Contains(idnHostNamePrefix)) + { + try + { + name = idnMapping.GetUnicode(name); + } + catch (ArgumentException) + { + // In the case of invalid punycode we will use the original name. + } + } + + return name; + } + + public static string GetUnicodeForUserName(string name) + { + if (!string.IsNullOrWhiteSpace(name) && name.Contains(idnHostNamePrefix)) + { + // Handle "$" and "@" in a specific way. + if (name.StartsWith("$")) + { + return "$" + GetUnicode(name.Substring(1)); + } + + string[] parts = name.Split('@'); + if (parts.Length == 2) + { + return GetUnicode(parts[0]) + "@" + GetUnicode(parts[1]); + } + + // Fall through. + return GetUnicode(name); + } + + return name; + } + + public static string GetAscii(string name) + { + if (!string.IsNullOrWhiteSpace(name)) + { + try + { + name = idnMapping.GetAscii(name); + } + catch (ArgumentException) + { + // In the case of invalid unicode we will use the original name. + } + } + + return name; + } + + public static string GetAsciiForUserName(string name) + { + if (!string.IsNullOrWhiteSpace(name)) + { + // Handle "$" and "@" in a specific way. + if (name.StartsWith("$")) + { + return "$" + GetAscii(name.Substring(1)); + } + + string[] parts = name.Split('@'); + if (parts.Length == 2) + { + return GetAscii(parts[0]) + "@" + GetAscii(parts[1]); + } + + // Fall through. + return GetAscii(name); + } + + return name; + } + } +} diff --git a/src/Common/Commands.Common/Common/ManagementConstants.cs b/src/Common/Commands.Common/Common/ManagementConstants.cs new file mode 100644 index 000000000000..269eaa2c119d --- /dev/null +++ b/src/Common/Commands.Common/Common/ManagementConstants.cs @@ -0,0 +1,123 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Net.Http.Headers; +using Microsoft.WindowsAzure.Commands.Common; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common +{ + public static class ApiConstants + { + public const string AuthorizationHeaderName = "Authorization"; + + public const string BasicAuthorization = "Basic"; + + public const string UserAgentHeaderName = "User-Agent"; + + public const string UserAgentHeaderValue = "AzurePowershell/v" + AzurePowerShell.AssemblyVersion; + + public static ProductInfoHeaderValue UserAgentValue = new ProductInfoHeaderValue( + "AzurePowershell", + string.Format("v{0}", AzurePowerShell.AssemblyVersion)); + + public const string VSDebuggerCausalityDataHeaderName = "VSDebuggerCausalityData"; + + public const string OperationTrackingIdHeader = "x-ms-request-id"; + + public const string VersionHeaderContentLatest = "2013-08-01"; + + public const string VersionHeaderName = "x-ms-version"; + + } + + public class SDKVersion + { + public const string Version180 = "1.8.0"; + + public const string Version200 = "2.0.0"; + + public const string Version220 = "2.2.0"; + + public const string Version230 = "2.3.0"; + + public const string Version240 = "2.4.0"; + + public const string Version250 = "2.5.0"; + } + + public enum DevEnv + { + Local, + Cloud + } + + public enum RoleType + { + WebRole, + WorkerRole + } + + public enum RuntimeType + { + IISNode, + Node, + PHP, + Cache, + Null + } + + public static class EnvironmentName + { + public const string AzureCloud = "AzureCloud"; + + public const string AzureChinaCloud = "AzureChinaCloud"; + } + + public static class AzureEnvironmentConstants + { + public const string AzureServiceEndpoint = "https://management.core.windows.net/"; + + public const string ChinaServiceEndpoint = "https://management.core.chinacloudapi.cn/"; + + public const string AzureResourceManagerEndpoint = "https://management.azure.com/"; + + public const string GalleryEndpoint = "https://gallery.azure.com/"; + + public const string AzurePublishSettingsFileUrl = "http://go.microsoft.com/fwlink/?LinkID=301775"; + + public const string ChinaPublishSettingsFileUrl = "http://go.microsoft.com/fwlink/?LinkID=301776"; + + public const string AzureManagementPortalUrl = "http://go.microsoft.com/fwlink/?LinkId=254433"; + + public const string ChinaManagementPortalUrl = "http://go.microsoft.com/fwlink/?LinkId=301902"; + + public const string AzureStorageEndpointSuffix = "core.windows.net"; + + public const string ChinaStorageEndpointSuffix = "core.chinacloudapi.cn"; + + public const string AzureSqlDatabaseDnsSuffix = ".database.windows.net"; + + public const string ChinaSqlDatabaseDnsSuffix = ".database.chinacloudapi.cn"; + + public const string AzureActiveDirectoryEndpoint = "https://login.windows.net/"; + + public const string ChinaActiveDirectoryEndpoint = "https://login.chinacloudapi.cn/"; + + public const string AzureGraphEndpoint = "https://graph.windows.net/"; + + public const string AzureTrafficManagerDnsSuffix = "trafficmanager.net"; + + public const string ChinaTrafficManagerDnsSuffix = "trafficmanager.cn"; + } +} \ No newline at end of file diff --git a/src/Common/Commands.Common/Common/ManagementOperationContext.cs b/src/Common/Commands.Common/Common/ManagementOperationContext.cs new file mode 100644 index 000000000000..405c6de53c9e --- /dev/null +++ b/src/Common/Commands.Common/Common/ManagementOperationContext.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common +{ + public class ManagementOperationContext + { + public string OperationDescription { get; set; } + public string OperationId { get; set; } + public string OperationStatus { get; set; } + } +} diff --git a/src/Common/Commands.Common/Common/PSAzureAccount.cs b/src/Common/Commands.Common/Common/PSAzureAccount.cs new file mode 100644 index 000000000000..df62a50e8989 --- /dev/null +++ b/src/Common/Commands.Common/Common/PSAzureAccount.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Common.Models +{ + public class PSAzureAccount + { + public string Id { get; set; } + + public AzureAccount.AccountType Type { get; set; } + + public string Subscriptions { get; set; } + + public string Tenants { get; set; } + } +} diff --git a/src/Common/Commands.Common/Common/Parameters.cs b/src/Common/Commands.Common/Common/Parameters.cs new file mode 100644 index 000000000000..087a3842d9dc --- /dev/null +++ b/src/Common/Commands.Common/Common/Parameters.cs @@ -0,0 +1,33 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService +{ + public class Parameters + { + public const string ServiceName = "ServiceName"; + + public const string RootPath = "RootPath"; + + public const string CacheWorkerRoleName = "CacheWorkerRoleName"; + + public const string Instances = "Instances"; + + public const string RoleName = "RoleName"; + + public const string PackagePath = "PackagePath"; + + public const string Path = "Path"; + } +} diff --git a/src/Common/Commands.Common/Common/ProcessHelper.cs b/src/Common/Commands.Common/Common/ProcessHelper.cs new file mode 100644 index 000000000000..6b54f625c4f8 --- /dev/null +++ b/src/Common/Commands.Common/Common/ProcessHelper.cs @@ -0,0 +1,62 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Diagnostics; +using System.Security.Permissions; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common +{ + public class ProcessHelper + { + public string StandardOutput { get; set;} + public string StandardError { get; set;} + public int ExitCode { get; set; } + + [PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")] + public static void Start(string target) + { + Process.Start(target); + } + + [PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")] + public static int StartAndWaitForProcess(ProcessStartInfo processInfo, out string standardOutput, out string standardError) + { + processInfo.CreateNoWindow = true; + processInfo.UseShellExecute = false; + processInfo.RedirectStandardOutput = true; + processInfo.RedirectStandardError = true; + + Process p = Process.Start(processInfo); + p.WaitForExit(); + + int exitCode = p.ExitCode; + standardOutput = p.StandardOutput.ReadToEnd(); + standardError = p.StandardError.ReadToEnd(); + + p.Close(); + return exitCode; + } + + public virtual void StartAndWaitForProcess(string command, string arguments) + { + StandardOutput = string.Empty; + StandardError = string.Empty; + ProcessStartInfo startInfo = new ProcessStartInfo(command, arguments); + string output, error; + ExitCode = StartAndWaitForProcess(startInfo, out output, out error); + StandardOutput = output; + StandardError = error; + } + } +} diff --git a/src/Common/Commands.Common/Common/ProfileClient.cs b/src/Common/Commands.Common/Common/ProfileClient.cs new file mode 100644 index 000000000000..5db8aec5e895 --- /dev/null +++ b/src/Common/Commands.Common/Common/ProfileClient.cs @@ -0,0 +1,1170 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Security; +using System.Security.Cryptography.X509Certificates; +using Microsoft.Azure.Subscriptions; +using Microsoft.WindowsAzure.Commands.Common.Factories; +using Microsoft.WindowsAzure.Commands.Common.Interfaces; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.Authentication; + +namespace Microsoft.WindowsAzure.Commands.Common +{ + /// + /// Convenience client for azure profile and subscriptions. + /// + public class ProfileClient + { + public static IDataStore DataStore { get; set; } + + public AzureProfile Profile { get; private set; } + + public Action WarningLog; + + public Action DebugLog; + + private void WriteDebugMessage(string message) + { + if (DebugLog != null) + { + DebugLog(message); + } + } + + private void WriteWarningMessage(string message) + { + if (WarningLog != null) + { + WarningLog(message); + } + } + + private static void UpgradeProfile() + { + string oldProfileFilePath = System.IO.Path.Combine(AzurePowerShell.ProfileDirectory, AzurePowerShell.OldProfileFile); + string oldProfileFilePathBackup = System.IO.Path.Combine(AzurePowerShell.ProfileDirectory, AzurePowerShell.OldProfileFileBackup); + string newProfileFilePath = System.IO.Path.Combine(AzurePowerShell.ProfileDirectory, AzurePowerShell.ProfileFile); + if (DataStore.FileExists(oldProfileFilePath)) + { + string oldProfilePath = System.IO.Path.Combine(AzurePowerShell.ProfileDirectory, + AzurePowerShell.OldProfileFile); + + try + { + // Try to backup old profile + try + { + DataStore.CopyFile(oldProfilePath, oldProfileFilePathBackup); + } + catch + { + // Ignore any errors here + } + + AzureProfile oldProfile = new AzureProfile(DataStore, oldProfilePath); + + if (DataStore.FileExists(newProfileFilePath)) + { + // Merge profile files + AzureProfile newProfile = new AzureProfile(DataStore, newProfileFilePath); + foreach (var environment in newProfile.Environments.Values) + { + oldProfile.Environments[environment.Name] = environment; + } + foreach (var subscription in newProfile.Subscriptions.Values) + { + oldProfile.Subscriptions[subscription.Id] = subscription; + } + DataStore.DeleteFile(newProfileFilePath); + } + + // If there were no load errors - delete backup file + if (oldProfile.ProfileLoadErrors.Count == 0) + { + try + { + DataStore.DeleteFile(oldProfileFilePathBackup); + } + catch + { + // Give up + } + } + + // Save the profile to the disk + oldProfile.Save(); + + // Rename WindowsAzureProfile.xml to WindowsAzureProfile.json + DataStore.RenameFile(oldProfilePath, newProfileFilePath); + + } + catch + { + // Something really bad happened - try to delete the old profile + try + { + DataStore.DeleteFile(oldProfilePath); + } + catch + { + // Ignore any errors + } + } + } + } + + static ProfileClient() + { + DataStore = new DiskDataStore(); + } + + public ProfileClient() + : this(System.IO.Path.Combine(AzurePowerShell.ProfileDirectory, AzurePowerShell.ProfileFile)) + { + + } + + public ProfileClient(string profilePath) + { + try + { + ProfileClient.UpgradeProfile(); + + Profile = new AzureProfile(DataStore, profilePath); + } + catch + { + // Should never fail in constructor + } + + WarningLog = (s) => Debug.WriteLine(s); + } + + #region Account management + + public AzureAccount AddAccountAndLoadSubscriptions(AzureAccount account, AzureEnvironment environment, SecureString password) + { + if (environment == null) + { + throw new ArgumentNullException("environment"); + } + + if (account == null) + { + throw new ArgumentNullException("account"); + } + + var subscriptionsFromServer = ListSubscriptionsFromServer( + account, + environment, + password, + password == null ? ShowDialog.Always : ShowDialog.Never).ToList(); + + // If account id is null the login failed + if (account.Id != null) + { + // Add the account to the profile + AddOrSetAccount(account); + + // Update back Profile.Subscriptions + foreach (var subscription in subscriptionsFromServer) + { + AddOrSetSubscription(subscription); + } + + if (Profile.DefaultSubscription == null) + { + var firstSubscription = Profile.Subscriptions.Values.FirstOrDefault(); + if (firstSubscription != null) + { + SetSubscriptionAsDefault(firstSubscription.Name, firstSubscription.Account); + } + } + + return Profile.Accounts[account.Id]; + } + else + { + return null; + } + } + + public AzureAccount AddOrSetAccount(AzureAccount account) + { + if (account == null) + { + throw new ArgumentNullException("Account needs to be specified.", "account"); + } + + if (Profile.Accounts.ContainsKey(account.Id)) + { + Profile.Accounts[account.Id] = + MergeAccountProperties(account, Profile.Accounts[account.Id]); + } + else + { + Profile.Accounts[account.Id] = account; + } + + // Update in-memory environment + if (AzureSession.CurrentContext != null && AzureSession.CurrentContext.Account != null && + AzureSession.CurrentContext.Account.Id == account.Id) + { + AzureSession.SetCurrentContext(AzureSession.CurrentContext.Subscription, + AzureSession.CurrentContext.Environment, + Profile.Accounts[account.Id]); + } + + return Profile.Accounts[account.Id]; + } + + public AzureAccount GetAccountOrDefault(string accountName) + { + if (string.IsNullOrEmpty(accountName)) + { + return AzureSession.CurrentContext.Account; + } + else if (AzureSession.CurrentContext.Account != null && AzureSession.CurrentContext.Account.Id == accountName) + { + return AzureSession.CurrentContext.Account; + } + else if (Profile.Accounts.ContainsKey(accountName)) + { + return Profile.Accounts[accountName]; + } + else + { + throw new ArgumentException(string.Format("Account with name '{0}' does not exist.", accountName), "accountName"); + } + } + + public AzureAccount GetAccountOrNull(string accountName) + { + if (string.IsNullOrEmpty(accountName)) + { + throw new ArgumentNullException("accountName"); + } + + if (Profile.Accounts.ContainsKey(accountName)) + { + return Profile.Accounts[accountName]; + } + else + { + return null; + } + } + + public AzureAccount GetAccount(string accountName) + { + var account = GetAccountOrNull(accountName); + + if (account == null) + { + throw new ArgumentException(string.Format("Account with name '{0}' does not exist.", accountName), "accountName"); + } + + return account; + } + + public IEnumerable ListAccounts(string accountName) + { + List accounts = new List(); + + if (!string.IsNullOrEmpty(accountName)) + { + if (Profile.Accounts.ContainsKey(accountName)) + { + accounts.Add(Profile.Accounts[accountName]); + } + } + else + { + accounts = Profile.Accounts.Values.ToList(); + } + + return Profile.Accounts.Values; + } + + public AzureAccount RemoveAccount(string accountId) + { + if (string.IsNullOrEmpty(accountId)) + { + throw new ArgumentNullException("User name needs to be specified.", "userName"); + } + + if (!Profile.Accounts.ContainsKey(accountId)) + { + throw new ArgumentException("User name is not valid.", "userName"); + } + + AzureAccount account = Profile.Accounts[accountId]; + Profile.Accounts.Remove(account.Id); + + foreach (AzureSubscription subscription in account.GetSubscriptions(Profile).ToArray()) + { + if (subscription.Account == accountId) + { + AzureAccount remainingAccount = GetSubscriptionAccount(subscription.Id); + // There's no default account to use, remove the subscription. + if (remainingAccount == null) + { + // Warn the user if the removed subscription is the default one. + if (subscription.IsPropertySet(AzureSubscription.Property.Default)) + { + WriteWarningMessage(Resources.RemoveDefaultSubscription); + } + + // Warn the user if the removed subscription is the current one. + if (subscription.Equals(AzureSession.CurrentContext.Subscription)) + { + WriteWarningMessage(Resources.RemoveCurrentSubscription); + AzureSession.SetCurrentContext(null, null, null); + } + + Profile.Subscriptions.Remove(subscription.Id); + } + else + { + subscription.Account = remainingAccount.Id; + AddOrSetSubscription(subscription); + } + } + } + + return account; + } + + private AzureAccount GetSubscriptionAccount(Guid subscriptionId) + { + List accounts = ListSubscriptionAccounts(subscriptionId); + AzureAccount account = accounts.FirstOrDefault(a => a.Type != AzureAccount.AccountType.Certificate); + + if (account != null) + { + // Found a non-certificate account. + return account; + } + + // Use certificate account if its there. + account = accounts.FirstOrDefault(); + + return account; + } + + #endregion + + #region Subscripton management + + public AzureSubscription AddOrSetSubscription(AzureSubscription subscription) + { + if (subscription == null) + { + throw new ArgumentNullException("Subscription needs to be specified.", "subscription"); + } + if (subscription.Environment == null) + { + throw new ArgumentNullException("Environment needs to be specified.", "subscription.Environment"); + } + // Validate environment + GetEnvironmentOrDefault(subscription.Environment); + + if (Profile.Subscriptions.ContainsKey(subscription.Id)) + { + Profile.Subscriptions[subscription.Id] = MergeSubscriptionProperties(subscription, Profile.Subscriptions[subscription.Id]); + } + else + { + Debug.Assert(!string.IsNullOrEmpty(subscription.Account)); + if (!Profile.Accounts.ContainsKey(subscription.Account)) + { + throw new KeyNotFoundException(string.Format("The specified account {0} does not exist in profile accounts", subscription.Account)); + } + + Profile.Subscriptions[subscription.Id] = subscription; + } + + // Update in-memory subscription + if (AzureSession.CurrentContext != null && AzureSession.CurrentContext.Subscription != null && + AzureSession.CurrentContext.Subscription.Id == subscription.Id) + { + var account = GetAccountOrDefault(subscription.Account); + var environment = GetEnvironmentOrDefault(subscription.Environment); + AzureSession.SetCurrentContext(Profile.Subscriptions[subscription.Id], environment, account); + } + + return Profile.Subscriptions[subscription.Id]; + } + + public AzureSubscription RemoveSubscription(string name) + { + if (string.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("Subscription name needs to be specified.", "name"); + } + + var subscription = Profile.Subscriptions.Values.FirstOrDefault(s => s.Name == name); + + if (subscription == null) + { + throw new ArgumentException(string.Format(Resources.SubscriptionNameNotFoundMessage, name), "name"); + } + else + { + return RemoveSubscription(subscription.Id); + } + } + + public AzureSubscription RemoveSubscription(Guid id) + { + if (!Profile.Subscriptions.ContainsKey(id)) + { + throw new ArgumentException(string.Format(Resources.SubscriptionIdNotFoundMessage, id), "id"); + } + + var subscription = Profile.Subscriptions[id]; + + if (subscription.IsPropertySet(AzureSubscription.Property.Default)) + { + WriteWarningMessage(Resources.RemoveDefaultSubscription); + } + + // Warn the user if the removed subscription is the current one. + if (AzureSession.CurrentContext.Subscription != null && subscription.Id == AzureSession.CurrentContext.Subscription.Id) + { + WriteWarningMessage(Resources.RemoveCurrentSubscription); + AzureSession.SetCurrentContext(null, null, null); + } + + Profile.Subscriptions.Remove(id); + + // Remove this subscription from its associated AzureAccounts + List accounts = ListSubscriptionAccounts(id); + + foreach (AzureAccount account in accounts) + { + account.RemoveSubscription(id); + if (!account.IsPropertySet(AzureAccount.Property.Subscriptions)) + { + Profile.Accounts.Remove(account.Id); + } + } + + return subscription; + } + + public List RefreshSubscriptions(AzureEnvironment environment) + { + if (environment == null) + { + throw new ArgumentNullException("environment"); + } + + var subscriptionsFromServer = ListSubscriptionsFromServerForAllAccounts(environment); + + // Update back Profile.Subscriptions + foreach (var subscription in subscriptionsFromServer) + { + // Resetting back default account + if (Profile.Subscriptions.ContainsKey(subscription.Id)) + { + subscription.Account = Profile.Subscriptions[subscription.Id].Account; + } + AddOrSetSubscription(subscription); + } + + return Profile.Subscriptions.Values.ToList(); + } + + public AzureSubscription GetSubscription(Guid id) + { + if (Profile.Subscriptions.ContainsKey(id)) + { + return Profile.Subscriptions[id]; + } + else + { + throw new ArgumentException(string.Format(Resources.SubscriptionIdNotFoundMessage, id), "id"); + } + } + + public AzureSubscription GetSubscription(string name) + { + AzureSubscription subscription = Profile.Subscriptions.Values + .FirstOrDefault(s => s.Name.Equals(name, StringComparison.OrdinalIgnoreCase)); + + if (subscription != null) + { + return subscription; + } + else + { + throw new ArgumentException(string.Format(Resources.SubscriptionNameNotFoundMessage, name), "name"); + } + } + + public AzureSubscription SetSubscriptionAsCurrent(Guid id, string accountName) + { + var subscription = Profile.Subscriptions.Values.FirstOrDefault(s => s.Id == id); + + if (subscription == null) + { + throw new ArgumentException(string.Format(Resources.InvalidSubscriptionId, id), "id"); + } + + return SetSubscriptionAsCurrent(subscription.Name, accountName); + } + + public AzureSubscription SetSubscriptionAsCurrent(string name, string accountName) + { + if (string.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name", string.Format(Resources.InvalidSubscription, name)); + } + + AzureSubscription currentSubscription = null; + var subscription = Profile.Subscriptions.Values.FirstOrDefault(s => s.Name == name); + + if (subscription == null) + { + throw new ArgumentException(string.Format(Resources.InvalidSubscription, name), "name"); + } + else + { + currentSubscription = new AzureSubscription { Id = subscription.Id }; + currentSubscription = MergeSubscriptionProperties(subscription, currentSubscription); + var environment = GetEnvironmentOrDefault(subscription.Environment); + accountName = string.IsNullOrEmpty(accountName) ? subscription.Account : accountName; + var account = GetAccount(accountName); + currentSubscription.Account = account.Id; + AzureSession.SetCurrentContext(currentSubscription, environment, account); + } + + return currentSubscription; + } + + public AzureSubscription SetSubscriptionAsDefault(Guid id, string accountName) + { + var subscription = Profile.Subscriptions.Values.FirstOrDefault(s => s.Id == id); + + if (subscription == null) + { + throw new ArgumentException(string.Format(Resources.InvalidSubscriptionId, id), "id"); + } + + return SetSubscriptionAsDefault(subscription.Name, accountName); + } + + public AzureSubscription SetSubscriptionAsDefault(string name, string accountName) + { + AzureSubscription subscription = SetSubscriptionAsCurrent(name, accountName); + + if (subscription != null) + { + Profile.DefaultSubscription = subscription; + } + + return subscription; + } + + public void ClearAll() + { + Profile.Accounts.Clear(); + Profile.DefaultSubscription = null; + Profile.Environments.Clear(); + Profile.Subscriptions.Clear(); + AzureSession.SetCurrentContext(null, null, null); + Profile.Save(); + + ProtectedFileTokenCache.Instance.Clear(); + } + + public void ClearDefaultSubscription() + { + Profile.DefaultSubscription = null; + } + + public void ImportCertificate(X509Certificate2 certificate) + { + DataStore.AddCertificate(certificate); + } + + public List ListSubscriptionAccounts(Guid subscriptionId) + { + return Profile.Accounts.Where(a => a.Value.HasSubscription(subscriptionId)) + .Select(a => a.Value).ToList(); + } + + public List ImportPublishSettings(string filePath, string environmentName) + { + var subscriptions = ListSubscriptionsFromPublishSettingsFile(filePath, environmentName); + if (subscriptions.Any()) + { + foreach (var subscription in subscriptions) + { + AzureAccount account = new AzureAccount + { + Id = subscription.Account, + Type = AzureAccount.AccountType.Certificate + }; + account.SetOrAppendProperty(AzureAccount.Property.Subscriptions, subscription.Id.ToString()); + AddOrSetAccount(account); + subscription.SetOrAppendProperty(AzureSubscription.Property.SupportedModes, + AzureModule.AzureServiceManagement.ToString()); + + if (!Profile.Subscriptions.ContainsKey(subscription.Id)) + { + AddOrSetSubscription(subscription); + } + + if (Profile.DefaultSubscription == null) + { + Profile.DefaultSubscription = subscription; + } + } + } + return subscriptions; + } + + private List ListSubscriptionsFromPublishSettingsFile(string filePath, string environment) + { + if (string.IsNullOrEmpty(filePath) || !DataStore.FileExists(filePath)) + { + throw new ArgumentException("File path is not valid.", "filePath"); + } + return PublishSettingsImporter.ImportAzureSubscription(DataStore.ReadFileAsStream(filePath), this, environment).ToList(); + } + + private IEnumerable ListSubscriptionsFromServerForAllAccounts(AzureEnvironment environment) + { + // Get all AD accounts and iterate + var accountNames = Profile.Accounts.Keys; + + List subscriptions = new List(); + + foreach (var accountName in accountNames.ToArray()) + { + var account = Profile.Accounts[accountName]; + + if (account.Type != AzureAccount.AccountType.Certificate) + { + subscriptions.AddRange(ListSubscriptionsFromServer(account, environment, null, ShowDialog.Never)); + } + + AddOrSetAccount(account); + } + + if (subscriptions.Any()) + { + return subscriptions; + } + else + { + return new AzureSubscription[0]; + } + } + + private IEnumerable ListSubscriptionsFromServer(AzureAccount account, AzureEnvironment environment, SecureString password, ShowDialog promptBehavior) + { + try + { + if (!account.IsPropertySet(AzureAccount.Property.Tenants)) + { + LoadAccountTenants(account, environment, password, promptBehavior); + } + } + catch (AadAuthenticationException aadEx) + { + WriteOrThrowAadExceptionMessage(aadEx); + return new AzureSubscription[0]; + } + + try + { + List mergedSubscriptions = MergeSubscriptions( + ListServiceManagementSubscriptions(account, environment, password, ShowDialog.Never).ToList(), + ListResourceManagerSubscriptions(account, environment, password, ShowDialog.Never).ToList()); + + // Set user ID + foreach (var subscription in mergedSubscriptions) + { + subscription.Environment = environment.Name; + subscription.Account = account.Id; + account.SetOrAppendProperty(AzureAccount.Property.Subscriptions, subscription.Id.ToString()); + } + + if (mergedSubscriptions.Any()) + { + return mergedSubscriptions; + } + else + { + return new AzureSubscription[0]; + } + } + catch (AadAuthenticationException aadEx) + { + WriteOrThrowAadExceptionMessage(aadEx); + return new AzureSubscription[0]; + } + } + + private void LoadAccountTenants(AzureAccount account, AzureEnvironment environment, SecureString password, ShowDialog promptBehavior) + { + var commonTenantToken = AzureSession.AuthenticationFactory.Authenticate(account, environment, + AuthenticationFactory.CommonAdTenant, password, promptBehavior); + + if (environment.IsEndpointSet(AzureEnvironment.Endpoint.ResourceManager)) + { + using (var subscriptionClient = AzureSession.ClientFactory + .CreateCustomClient( + new TokenCloudCredentials(commonTenantToken.AccessToken), + environment.GetEndpointAsUri(AzureEnvironment.Endpoint.ResourceManager))) + { + account.SetOrAppendProperty(AzureAccount.Property.Tenants, + subscriptionClient.Tenants.List().TenantIds.Select(ti => ti.TenantId).ToArray()); + } + } + else + { + using (var subscriptionClient = AzureSession.ClientFactory + .CreateCustomClient( + new TokenCloudCredentials(commonTenantToken.AccessToken), + environment.GetEndpointAsUri(AzureEnvironment.Endpoint.ServiceManagement))) + { + var subscriptionListResult = subscriptionClient.Subscriptions.List(); + account.SetOrAppendProperty(AzureAccount.Property.Tenants, + subscriptionListResult.Subscriptions.Select(s => s.ActiveDirectoryTenantId).Distinct().ToArray()); + } + } + } + + private List MergeSubscriptions(List subscriptionsList1, + List subscriptionsList2) + { + if (subscriptionsList1 == null) + { + subscriptionsList1 = new List(); + } + if (subscriptionsList2 == null) + { + subscriptionsList2 = new List(); + } + + Dictionary mergedSubscriptions = new Dictionary(); + foreach (var subscription in subscriptionsList1.Concat(subscriptionsList2)) + { + if (mergedSubscriptions.ContainsKey(subscription.Id)) + { + mergedSubscriptions[subscription.Id] = MergeSubscriptionProperties(mergedSubscriptions[subscription.Id], + subscription); + } + else + { + mergedSubscriptions[subscription.Id] = subscription; + } + } + return mergedSubscriptions.Values.ToList(); + } + + private AzureSubscription MergeSubscriptionProperties(AzureSubscription subscription1, AzureSubscription subscription2) + { + if (subscription1 == null || subscription2 == null) + { + throw new ArgumentNullException("subscription1"); + } + if (subscription1.Id != subscription2.Id) + { + throw new ArgumentException("Subscription Ids do not match."); + } + AzureSubscription mergedSubscription = new AzureSubscription + { + Id = subscription1.Id, + Name = subscription1.Name, + Environment = subscription1.Environment, + Account = subscription1.Account ?? subscription2.Account + }; + + // Merge all properties + foreach (AzureSubscription.Property property in Enum.GetValues(typeof(AzureSubscription.Property))) + { + string propertyValue = subscription1.GetProperty(property) ?? subscription2.GetProperty(property); + if (propertyValue != null) + { + mergedSubscription.Properties[property] = propertyValue; + } + } + + // Merge RegisteredResourceProviders + var registeredProviders = subscription1.GetPropertyAsArray(AzureSubscription.Property.RegisteredResourceProviders) + .Union(subscription2.GetPropertyAsArray(AzureSubscription.Property.RegisteredResourceProviders), StringComparer.CurrentCultureIgnoreCase); + + mergedSubscription.SetProperty(AzureSubscription.Property.RegisteredResourceProviders, registeredProviders.ToArray()); + + // Merge SupportedMode + var supportedModes = subscription1.GetPropertyAsArray(AzureSubscription.Property.SupportedModes) + .Union(subscription2.GetPropertyAsArray(AzureSubscription.Property.SupportedModes), StringComparer.CurrentCultureIgnoreCase); + + mergedSubscription.SetProperty(AzureSubscription.Property.SupportedModes, supportedModes.ToArray()); + + // Merge Tenants + var tenants = subscription1.GetPropertyAsArray(AzureSubscription.Property.Tenants) + .Union(subscription2.GetPropertyAsArray(AzureSubscription.Property.Tenants), StringComparer.CurrentCultureIgnoreCase); + + mergedSubscription.SetProperty(AzureSubscription.Property.Tenants, tenants.ToArray()); + + return mergedSubscription; + } + + private AzureEnvironment MergeEnvironmentProperties(AzureEnvironment environment1, AzureEnvironment environment2) + { + if (environment1 == null || environment2 == null) + { + throw new ArgumentNullException("environment1"); + } + if (environment1.Name != environment2.Name) + { + throw new ArgumentException("Subscription Ids do not match."); + } + AzureEnvironment mergedEnvironment = new AzureEnvironment + { + Name = environment1.Name + }; + + // Merge all properties + foreach (AzureEnvironment.Endpoint property in Enum.GetValues(typeof(AzureEnvironment.Endpoint))) + { + string propertyValue = environment1.GetEndpoint(property) ?? environment2.GetEndpoint(property); + if (propertyValue != null) + { + mergedEnvironment.Endpoints[property] = propertyValue; + } + } + + return mergedEnvironment; + } + + private AzureAccount MergeAccountProperties(AzureAccount account1, AzureAccount account2) + { + if (account1 == null || account2 == null) + { + throw new ArgumentNullException("account1"); + } + if (account1.Id != account2.Id) + { + throw new ArgumentException("Account1 Ids do not match."); + } + if (account1.Type != account2.Type) + { + throw new ArgumentException("Account1 types do not match."); + } + AzureAccount mergeAccount = new AzureAccount + { + Id = account1.Id, + Type = account1.Type + }; + + // Merge all properties + foreach (AzureAccount.Property property in Enum.GetValues(typeof(AzureAccount.Property))) + { + string propertyValue = account1.GetProperty(property) ?? account2.GetProperty(property); + if (propertyValue != null) + { + mergeAccount.Properties[property] = propertyValue; + } + } + + // Merge Tenants + var tenants = account1.GetPropertyAsArray(AzureAccount.Property.Tenants) + .Union(account2.GetPropertyAsArray(AzureAccount.Property.Tenants), StringComparer.CurrentCultureIgnoreCase); + + mergeAccount.SetProperty(AzureAccount.Property.Tenants, tenants.ToArray()); + + // Merge Subscriptions + var subscriptions = account1.GetPropertyAsArray(AzureAccount.Property.Subscriptions) + .Union(account2.GetPropertyAsArray(AzureAccount.Property.Subscriptions), StringComparer.CurrentCultureIgnoreCase); + + mergeAccount.SetProperty(AzureAccount.Property.Subscriptions, subscriptions.ToArray()); + + return mergeAccount; + } + + private IEnumerable ListResourceManagerSubscriptions(AzureAccount account, AzureEnvironment environment, SecureString password, ShowDialog promptBehavior) + { + List result = new List(); + + if (!environment.IsEndpointSet(AzureEnvironment.Endpoint.ResourceManager)) + { + return result; + } + + foreach (var tenant in account.GetPropertyAsArray(AzureAccount.Property.Tenants)) + { + try + { + var tenantToken = AzureSession.AuthenticationFactory.Authenticate(account, environment, tenant, password, ShowDialog.Never); + + using (var subscriptionClient = AzureSession.ClientFactory.CreateCustomClient( + new TokenCloudCredentials(tenantToken.AccessToken), + environment.GetEndpointAsUri(AzureEnvironment.Endpoint.ResourceManager))) + { + var subscriptionListResult = subscriptionClient.Subscriptions.List(); + foreach (var subscription in subscriptionListResult.Subscriptions) + { + AzureSubscription psSubscription = new AzureSubscription + { + Id = new Guid(subscription.SubscriptionId), + Name = subscription.DisplayName, + Environment = environment.Name + }; + psSubscription.SetProperty(AzureSubscription.Property.SupportedModes, AzureModule.AzureResourceManager.ToString()); + psSubscription.SetProperty(AzureSubscription.Property.Tenants, tenant); + + result.Add(psSubscription); + } + } + } + catch (CloudException cEx) + { + WriteOrThrowAadExceptionMessage(cEx); + } + catch (AadAuthenticationException aadEx) + { + WriteOrThrowAadExceptionMessage(aadEx); + } + } + + return result; + } + + private IEnumerable ListServiceManagementSubscriptions(AzureAccount account, AzureEnvironment environment, SecureString password, ShowDialog promptBehavior) + { + List result = new List(); + + if (!environment.IsEndpointSet(AzureEnvironment.Endpoint.ServiceManagement)) + { + return result; + } + + foreach (var tenant in account.GetPropertyAsArray(AzureAccount.Property.Tenants)) + { + try + { + var tenantToken = AzureSession.AuthenticationFactory.Authenticate(account, environment, tenant, password, ShowDialog.Never); + + using (var subscriptionClient = AzureSession.ClientFactory.CreateCustomClient( + new TokenCloudCredentials(tenantToken.AccessToken), + environment.GetEndpointAsUri(AzureEnvironment.Endpoint.ServiceManagement))) + { + var subscriptionListResult = subscriptionClient.Subscriptions.List(); + foreach (var subscription in subscriptionListResult.Subscriptions) + { + AzureSubscription psSubscription = new AzureSubscription + { + Id = new Guid(subscription.SubscriptionId), + Name = subscription.SubscriptionName, + Environment = environment.Name + }; + psSubscription.Properties[AzureSubscription.Property.SupportedModes] = AzureModule.AzureServiceManagement.ToString(); + psSubscription.SetProperty(AzureSubscription.Property.Tenants, subscription.ActiveDirectoryTenantId); + + result.Add(psSubscription); + } + } + } + catch (CloudException cEx) + { + WriteOrThrowAadExceptionMessage(cEx); + } + catch (AadAuthenticationException aadEx) + { + WriteOrThrowAadExceptionMessage(aadEx); + } + } + + return result; + } + + private void WriteOrThrowAadExceptionMessage(AadAuthenticationException aadEx) + { + if (aadEx is AadAuthenticationFailedWithoutPopupException) + { + WriteDebugMessage(aadEx.Message); + } + else if (aadEx is AadAuthenticationCanceledException) + { + WriteWarningMessage(aadEx.Message); + } + else + { + throw aadEx; + } + } + + private void WriteOrThrowAadExceptionMessage(CloudException aadEx) + { + WriteDebugMessage(aadEx.Message); + } + + #endregion + + #region Environment management + + public AzureEnvironment GetEnvironmentOrDefault(string name) + { + if (string.IsNullOrEmpty(name)) + { + return AzureSession.CurrentContext.Environment; + } + else if (AzureSession.CurrentContext.Environment != null && AzureSession.CurrentContext.Environment.Name == name) + { + return AzureSession.CurrentContext.Environment; + } + else if (Profile.Environments.ContainsKey(name)) + { + return Profile.Environments[name]; + } + else + { + throw new ArgumentException(string.Format(Resources.EnvironmentNotFound, name)); + } + } + + public AzureEnvironment GetEnvironment(string name, string serviceEndpoint, string resourceEndpoint) + { + if (serviceEndpoint == null) + { + // Set to invalid value + serviceEndpoint = Guid.NewGuid().ToString(); + } + if (resourceEndpoint == null) + { + // Set to invalid value + resourceEndpoint = Guid.NewGuid().ToString(); + } + if (name != null) + { + if (Profile.Environments.ContainsKey(name)) + { + return Profile.Environments[name]; + } + else if (AzureSession.CurrentContext.Environment != null && + AzureSession.CurrentContext.Environment.Name == name) + { + return AzureSession.CurrentContext.Environment; + } + } + else + { + if (AzureSession.CurrentContext.Environment != null && + (AzureSession.CurrentContext.Environment.IsEndpointSetToValue(AzureEnvironment.Endpoint.ServiceManagement, serviceEndpoint) || + AzureSession.CurrentContext.Environment.IsEndpointSetToValue(AzureEnvironment.Endpoint.ResourceManager, resourceEndpoint))) + { + return AzureSession.CurrentContext.Environment; + } + + return Profile.Environments.Values.FirstOrDefault(e => + e.IsEndpointSetToValue(AzureEnvironment.Endpoint.ServiceManagement, serviceEndpoint) || + e.IsEndpointSetToValue(AzureEnvironment.Endpoint.ResourceManager, resourceEndpoint)); + } + return null; + } + + public List ListEnvironments(string name) + { + if (string.IsNullOrEmpty(name)) + { + return Profile.Environments.Values.ToList(); + } + else if (Profile.Environments.ContainsKey(name)) + { + return new[] { Profile.Environments[name] }.ToList(); + } + else + { + return new AzureEnvironment[0].ToList(); + } + } + + public AzureEnvironment RemoveEnvironment(string name) + { + if (string.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("Environment name needs to be specified.", "name"); + } + if (AzureEnvironment.PublicEnvironments.ContainsKey(name)) + { + throw new ArgumentException(Resources.RemovingDefaultEnvironmentsNotSupported, "name"); + } + + if (Profile.Environments.ContainsKey(name)) + { + var environment = Profile.Environments[name]; + var subscriptions = Profile.Subscriptions.Values.Where(s => s.Environment == name).ToArray(); + foreach (var subscription in subscriptions) + { + RemoveSubscription(subscription.Id); + } + Profile.Environments.Remove(name); + return environment; + } + else + { + throw new ArgumentException(string.Format(Resources.EnvironmentNotFound, name), "name"); + } + } + + public AzureEnvironment AddOrSetEnvironment(AzureEnvironment environment) + { + if (environment == null) + { + throw new ArgumentNullException("Environment needs to be specified.", "environment"); + } + + if (AzureEnvironment.PublicEnvironments.ContainsKey(environment.Name)) + { + throw new ArgumentException(Resources.ChangingDefaultEnvironmentNotSupported, "environment"); + } + + if (Profile.Environments.ContainsKey(environment.Name)) + { + Profile.Environments[environment.Name] = + MergeEnvironmentProperties(environment, Profile.Environments[environment.Name]); + } + else + { + Profile.Environments[environment.Name] = environment; + } + + // Update in-memory environment + if (AzureSession.CurrentContext != null && AzureSession.CurrentContext.Environment != null && + AzureSession.CurrentContext.Environment.Name == environment.Name) + { + AzureSession.SetCurrentContext(AzureSession.CurrentContext.Subscription, + Profile.Environments[environment.Name], + AzureSession.CurrentContext.Account); + } + + return Profile.Environments[environment.Name]; + } + #endregion + } +} \ No newline at end of file diff --git a/src/Common/Commands.Common/Common/ProfileClientExtensions.cs b/src/Common/Commands.Common/Common/ProfileClientExtensions.cs new file mode 100644 index 000000000000..795eec2bcc99 --- /dev/null +++ b/src/Common/Commands.Common/Common/ProfileClientExtensions.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Common.Models; + +namespace Microsoft.WindowsAzure.Commands.Common +{ + public static class ProfileClientExtensions + { + public static PSAzureAccount ToPSAzureAccount(this AzureAccount account) + { + string subscriptionsList = account.GetProperty(AzureAccount.Property.Subscriptions); + string tenantsList = account.GetProperty(AzureAccount.Property.Tenants); + + return new PSAzureAccount + { + Id = account.Id, + Type = account.Type, + Subscriptions = subscriptionsList == null ? "" : subscriptionsList.Replace(",", "\r\n"), + Tenants = tenantsList == null ? "" : tenantsList.Replace(",", "\r\n") + }; + } + } +} diff --git a/src/Common/Commands.Common/Common/ProfileData.cs b/src/Common/Commands.Common/Common/ProfileData.cs new file mode 100644 index 000000000000..2ce005aefbaa --- /dev/null +++ b/src/Common/Commands.Common/Common/ProfileData.cs @@ -0,0 +1,266 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using Microsoft.WindowsAzure.Commands.Common.Models; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common +{ + /// + /// This class provides the representation of + /// data loaded and saved into data files + /// for AzureProfile. + /// + [DataContract] + public class ProfileData + { + [DataMember] + public string DefaultEnvironmentName { get; set; } + + [DataMember] + public IEnumerable Environments { get; set; } + + [DataMember] + public IEnumerable Subscriptions { get; set; } + } + + /// + /// This class provides the representation of + /// data loaded and saved into data files for + /// an individual Azure environment + /// + [DataContract] + public class AzureEnvironmentData + { + public AzureEnvironment ToAzureEnvironment() + { + return new AzureEnvironment + { + Name = this.Name, + Endpoints = new Dictionary + { + { AzureEnvironment.Endpoint.ActiveDirectoryServiceEndpointResourceId, this.ActiveDirectoryServiceEndpointResourceId }, + { AzureEnvironment.Endpoint.AdTenant, this.AdTenantUrl }, + { AzureEnvironment.Endpoint.Gallery, this.GalleryEndpoint }, + { AzureEnvironment.Endpoint.ManagementPortalUrl, this.ManagementPortalUrl }, + { AzureEnvironment.Endpoint.PublishSettingsFileUrl, this.PublishSettingsFileUrl }, + { AzureEnvironment.Endpoint.ResourceManager, this.ResourceManagerEndpoint }, + { AzureEnvironment.Endpoint.ServiceManagement, this.ServiceEndpoint }, + { AzureEnvironment.Endpoint.SqlDatabaseDnsSuffix, this.SqlDatabaseDnsSuffix }, + { AzureEnvironment.Endpoint.StorageEndpointSuffix, this.StorageEndpointSuffix }, + } + }; + } + + [DataMember] + public string Name { get; set; } + + [DataMember] + public string PublishSettingsFileUrl { get; set; } + + [DataMember] + public string ServiceEndpoint { get; set; } + + [DataMember] + public string ResourceManagerEndpoint { get; set; } + + [DataMember] + public string ManagementPortalUrl { get; set; } + + [DataMember] + public string StorageEndpointSuffix { get; set; } + + [DataMember] + public string AdTenantUrl { get; set; } + + [DataMember] + public string CommonTenantId { get; set; } + + [DataMember] + public string GalleryEndpoint { get; set; } + + [DataMember] + public string ActiveDirectoryServiceEndpointResourceId { get; set; } + + [DataMember] + public string SqlDatabaseDnsSuffix { get; set; } + + [DataMember] + public string TrafficManagerEndpointSuffix { get; set; } + } + + /// + /// This class provides the representation of data loaded + /// and saved into data file for an individual Azure subscription. + /// + [DataContract] + public class AzureSubscriptionData + { + /// + /// Constructor used by DataContractSerializer + /// + public AzureSubscriptionData() + { + } + + public AzureSubscription ToAzureSubscription(List envs) + { + AzureSubscription subscription = new AzureSubscription(); + try + { + subscription.Id = new Guid(this.SubscriptionId); + } + catch (Exception ex) + { + throw new ArgumentException("Subscription ID is not a valid GUID.", ex); + } + subscription.Name = Name; + + // Logic to detect what is the subscription environment rely's on having ManagementEndpoint (i.e. RDFE endpoint) set already on the subscription + List allEnvs = envs.Union(AzureEnvironment.PublicEnvironments.Values).ToList(); + AzureEnvironment env = allEnvs.FirstOrDefault(e => e.IsEndpointSetToValue(AzureEnvironment.Endpoint.ServiceManagement, this.ManagementEndpoint)); + + if (env != null) + { + subscription.Environment = env.Name; + } + else + { + subscription.Environment = EnvironmentName.AzureCloud; + } + + if (!string.IsNullOrEmpty(this.ManagementCertificate)) + { + subscription.Account = this.ManagementCertificate; + subscription.SetProperty(AzureSubscription.Property.SupportedModes, + AzureModule.AzureServiceManagement.ToString()); + } + + if (!string.IsNullOrEmpty(this.ActiveDirectoryUserId)) + { + subscription.Account = this.ActiveDirectoryUserId; + } + + if (!string.IsNullOrEmpty(this.ActiveDirectoryTenantId)) + { + subscription.SetProperty(AzureSubscription.Property.Tenants, ActiveDirectoryTenantId); + } + + if (this.IsDefault) + { + subscription.SetProperty(AzureSubscription.Property.Default, "True"); + } + + if (!string.IsNullOrEmpty(this.CloudStorageAccount)) + { + subscription.Properties.Add(AzureSubscription.Property.StorageAccount, this.CloudStorageAccount); + } + + if (this.RegisteredResourceProviders.Count() > 0) + { + StringBuilder providers = new StringBuilder(); + subscription.Properties.Add(AzureSubscription.Property.RegisteredResourceProviders, + string.Join(",", RegisteredResourceProviders)); + } + + return subscription; + } + + public IEnumerable ToAzureAccounts() + { + if (!string.IsNullOrEmpty(ActiveDirectoryUserId)) + { + AzureAccount userAccount = new AzureAccount + { + Id = ActiveDirectoryUserId, + Type = AzureAccount.AccountType.User + }; + + userAccount.SetProperty(AzureAccount.Property.Subscriptions, new Guid(this.SubscriptionId).ToString()); + + if (!string.IsNullOrEmpty(ActiveDirectoryTenantId)) + { + userAccount.SetProperty(AzureAccount.Property.Tenants, ActiveDirectoryTenantId); + } + + yield return userAccount; + } + + if (!string.IsNullOrEmpty(ManagementCertificate)) + { + AzureAccount certificateAccount = new AzureAccount + { + Id = ManagementCertificate, + Type = AzureAccount.AccountType.Certificate + }; + + certificateAccount.SetProperty(AzureAccount.Property.Subscriptions, new Guid(this.SubscriptionId).ToString()); + + yield return certificateAccount; + } + } + + [DataMember] + public string Name { get; set; } + + [DataMember] + public string SubscriptionId { get; set; } + + [DataMember] + public string ManagementEndpoint { get; set; } + + [DataMember] + public string ResourceManagerEndpoint { get; set; } + + [DataMember] + public string ActiveDirectoryEndpoint { get; set; } + + [DataMember] + public string ActiveDirectoryTenantId { get; set; } + + [DataMember] + public string ActiveDirectoryUserId { get; set; } + + [DataMember] + public string LoginType { get; set; } + + [DataMember] + public bool IsDefault { get; set; } + + [DataMember] + public string ManagementCertificate { get; set; } + + [DataMember] + public string CloudStorageAccount { get; set; } + + [DataMember] + public IEnumerable RegisteredResourceProviders { get; set; } + + [DataMember] + public string GalleryEndpoint { get; set; } + + [DataMember] + public string ActiveDirectoryServiceEndpointResourceId { get; set; } + + [DataMember] + public string SqlDatabaseDnsSuffix { get; set; } + + [DataMember] + public string TrafficManagerEndpointSuffix { get; set; } + } +} \ No newline at end of file diff --git a/src/Common/Commands.Common/Common/PublishSettingsImporter.cs b/src/Common/Commands.Common/Common/PublishSettingsImporter.cs new file mode 100644 index 000000000000..22d6825b56ea --- /dev/null +++ b/src/Common/Commands.Common/Common/PublishSettingsImporter.cs @@ -0,0 +1,96 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Security.Cryptography.X509Certificates; +using System.Xml.Serialization; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema; +using Microsoft.WindowsAzure.Commands.Common; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common +{ + /// + /// Class that handles loading publishsettings files + /// and turning them into AzureSubscription objects. + /// + public static class PublishSettingsImporter + { + public static IEnumerable ImportAzureSubscription(Stream stream, ProfileClient azureProfileClient, string environment) + { + var publishData = DeserializePublishData(stream); + PublishDataPublishProfile profile = publishData.Items.Single(); + stream.Close(); + return profile.Subscription.Select(s => PublishSubscriptionToAzureSubscription(azureProfileClient, profile, s, environment)); + } + + private static PublishData DeserializePublishData(Stream stream) + { + var serializer = new XmlSerializer(typeof(PublishData)); + return (PublishData)serializer.Deserialize(stream); + } + + private static AzureSubscription PublishSubscriptionToAzureSubscription( + ProfileClient azureProfileClient, + PublishDataPublishProfile profile, + PublishDataPublishProfileSubscription s, + string environment) + { + var certificate = GetCertificate(profile, s); + + if (string.IsNullOrEmpty(environment)) + { + var azureEnvironment = azureProfileClient.GetEnvironment(environment, s.ServiceManagementUrl ?? profile.Url, null); + if (azureEnvironment != null) + { + environment = azureEnvironment.Name; + } + else + { + environment = EnvironmentName.AzureCloud; + } + } + + return new AzureSubscription + { + Id = new Guid(s.Id), + Name = s.Name, + Environment = environment, + Account = certificate.Thumbprint + }; + } + + private static X509Certificate2 GetCertificate(PublishDataPublishProfile profile, + PublishDataPublishProfileSubscription s) + { + string certificateString; + if (!string.IsNullOrEmpty(s.ManagementCertificate)) + { + certificateString = s.ManagementCertificate; + } + else + { + certificateString = profile.ManagementCertificate; + } + + X509Certificate2 certificate = new X509Certificate2(Convert.FromBase64String(certificateString), string.Empty); + ProfileClient.DataStore.AddCertificate(certificate); + + return certificate; + } + } +} diff --git a/src/Common/Commands.Common/Common/RequiredResourceLookup.cs b/src/Common/Commands.Common/Common/RequiredResourceLookup.cs new file mode 100644 index 000000000000..cef962cafef4 --- /dev/null +++ b/src/Common/Commands.Common/Common/RequiredResourceLookup.cs @@ -0,0 +1,71 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Microsoft.WindowsAzure.Common; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common +{ + /// + /// This class handles mapping management client types + /// to the corresponding required resource provider names. + /// + internal static class RequiredResourceLookup + { + internal static IList RequiredProvidersForServiceManagement() where T : ServiceClient + { + if (typeof(T).FullName.EndsWith("WebSiteManagementClient")) + { + return new[] { "website" }; + } + + if (typeof(T).FullName.EndsWith("ManagedCacheClient")) + { + return new[] { "cacheservice.Caching" }; + } + + if (typeof(T).FullName.EndsWith("SchedulerManagementClient")) + { + return new[] { "scheduler.jobcollections" }; + } + + return new string[0]; + } + + internal static IList RequiredProvidersForResourceManager() where T : ServiceClient + { + if (typeof(T).FullName.EndsWith("ResourceManagementClient")) + { + return new[] { + "Microsoft.Web", + "microsoft.visualstudio", + "microsoft.insights", + "successbricks.cleardb", + "microsoft.cache" }; + } + if (typeof(T).FullName.EndsWith("BatchManagementClient")) + { + return new[] { "microsoft.batch" }; + } + + if (typeof(T).FullName.EndsWith("DataPipelineManagementClient")) + { + return new[] { "Microsoft.DataFactory" }; + } + + + return new string[0]; + } + } +} diff --git a/src/Common/Commands.Common/Common/ServiceManagementTypes.cs b/src/Common/Commands.Common/Common/ServiceManagementTypes.cs new file mode 100644 index 000000000000..fe274f3e3221 --- /dev/null +++ b/src/Common/Commands.Common/Common/ServiceManagementTypes.cs @@ -0,0 +1,6990 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +//TODO: When transition to SM.NET is completed, rename the namespace to "Microsoft.WindowsAzure.ServiceManagement" + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Net; +using System.Runtime.Serialization; +using System.Security.Permissions; +using System.ServiceModel; +using System.ServiceModel.Web; +using System.Text; +using System.Xml; +using Microsoft.WindowsAzure.Commands.Common.Properties; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + + #region Constants + public static class Constants + { + public const string ServiceManagementNS = "http://schemas.microsoft.com/windowsazure"; + public readonly static string StandardTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'"; + // Please put the newest version outside the #endif.MSFTINTERNAL We only want the newest version to show up in what we ship publically. + // Also, update rdfe\Utilities\Common\VersionHeaders.cs StaticSupportedVersionsList. + public const string VersionHeaderContent20130801 = "2013-08-01"; + } + + public static class DeploymentStatus + { + public const string Running = "Running"; + public const string Suspended = "Suspended"; + public const string RunningTransitioning = "RunningTransitioning"; + public const string SuspendedTransitioning = "SuspendedTransitioning"; + public const string Starting = "Starting"; + public const string Suspending = "Suspending"; + public const string Deploying = "Deploying"; + public const string Deleting = "Deleting"; + public const string Unavailable = "Unavailable"; + } + + public static class RoleInstanceStatus + { + public const string Initializing = "Initializing"; + public const string Ready = "Ready"; + public const string Busy = "Busy"; + public const string Stopping = "Stopping"; + public const string Stopped = "Stopped"; + public const string Unresponsive = "Unresponsive"; + + public const string RoleStateUnknown = "RoleStateUnknown"; + public const string CreatingVM = "CreatingVM"; + public const string StartingVM = "StartingVM"; + public const string CreatingRole = "CreatingRole"; + public const string StartingRole = "StartingRole"; + public const string ReadyRole = "ReadyRole"; + public const string BusyRole = "BusyRole"; + + public const string StoppingRole = "StoppingRole"; + public const string StoppingVM = "StoppingVM"; + public const string DeletingVM = "DeletingVM"; + public const string StoppedVM = "StoppedVM"; + public const string RestartingRole = "RestartingRole"; + public const string CyclingRole = "CyclingRole"; + + public const string FailedStartingRole = "FailedStartingRole"; + public const string FailedStartingVM = "FailedStartingVM"; + public const string UnresponsiveRole = "UnresponsiveRole"; + + public const string Provisioning = "Provisioning"; + public const string ProvisioningFailed = "ProvisioningFailed"; + public const string ProvisioningTimeout = "ProvisioningTimeout"; + + public const string StoppingAndDeallocating = "StoppingAndDeallocating"; + public const string StoppedDeallocated = "StoppedDeallocated"; + } + + public static class OperationState + { + public const string InProgress = "InProgress"; + public const string Succeeded = "Succeeded"; + public const string Failed = "Failed"; + } + + public static class KeyType + { + public const string Primary = "Primary"; + public const string Secondary = "Secondary"; + } + + public static class DeploymentSlotType + { + public const string Staging = "Staging"; + public const string Production = "Production"; + } + + public static class UpgradeType + { + public const string Auto = "Auto"; + public const string Manual = "Manual"; + public const string Simultaneous = "Simultaneous"; + } + + public static class CurrentUpgradeDomainState + { + public const string Before = "Before"; + public const string During = "During"; + } + public static class GuestAgentType + { + public const string ProdGA = "ProdGA"; + public const string TestGA = "TestGA"; + public const string HotfixGA = "HotfixGA"; + } + + #endregion + + #region Mergable + public interface IResolvable + { + object ResolveType(); + } + + public interface IMergable + { + void Merge(object other); + } + + public interface IMergable : IMergable + { + void Merge(T other); + } + + [DataContract] + public abstract class Mergable : IResolvable, IMergable, IExtensibleDataObject where T : Mergable + { + #region Field backing store + private Dictionary propertyStore; + private Dictionary PropertyStore + { + get + { + if (this.propertyStore == null) + { + this.propertyStore = new Dictionary(); + } + return this.propertyStore; + } + } + #endregion + + protected TValue GetValue(string fieldName) + { + object value; + + if (this.PropertyStore.TryGetValue(fieldName, out value)) + { + return (TValue)value; + } + return default(TValue); + } + protected void SetValue(string fieldName, TValue value) + { + this.PropertyStore[fieldName] = value; + } + + protected Nullable GetField(string fieldName) where TValue : struct + { + object value; + if (this.PropertyStore.TryGetValue(fieldName, out value)) + { + return new Nullable((TValue)value); + } + else + { + return new Nullable(); + } + } + + protected void SetField(string fieldName, Nullable value) where TValue : struct + { + if (value.HasValue) + { + this.PropertyStore[fieldName] = value.Value; + } + } + + #region IResolvable Members + + public virtual object ResolveType() + { + return this; + } + + #endregion + + protected TValue Convert() + { + DataContractSerializer sourceSerializer = new DataContractSerializer(this.GetType()); + DataContractSerializer destinationSerializer = new DataContractSerializer(typeof(TValue)); + + using (MemoryStream stream = new MemoryStream()) + { + sourceSerializer.WriteObject(stream, this); + stream.Position = 0; + return (TValue)destinationSerializer.ReadObject(stream); + } + } + + + #region IMergable Members + + public void Merge(object other) + { + ((IMergable)this).Merge((T)other); + } + + #endregion + + #region IMergable members + public void Merge(T other) + { + Mergable otherObject = (Mergable)other; + + foreach (KeyValuePair kvPair in otherObject.PropertyStore) + { + object currentValue; + + if (this.PropertyStore.TryGetValue(kvPair.Key, out currentValue)) + { + IMergable mergableValue = currentValue as IMergable; + + if (mergableValue != null) + { + mergableValue.Merge(kvPair.Value); + continue; + } + } + this.PropertyStore[kvPair.Key] = kvPair.Value; + } + } + #endregion + + #region IExtensibleDataObject Members + public ExtensionDataObject ExtensionData { get; set; } + #endregion + } + + #endregion + + #region VirtualIP + [CollectionDataContract(Name = "VirtualIPs", ItemName = "VirtualIP", Namespace = Constants.ServiceManagementNS)] + public class VirtualIPList : List + { + public VirtualIPList() + { + + } + + public VirtualIPList(IEnumerable ips) + : base(ips) + { + + } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class VirtualIP : IExtensibleDataObject + { + [DataMember(Order = 1, EmitDefaultValue = false)] + public string Address { get; set; } + + [DataMember(Order = 2, EmitDefaultValue = false)] + public bool? IsDnsProgrammed { get; set; } + + [DataMember(Order = 3, EmitDefaultValue = false)] + public string Name { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + + #region Implements Equals + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + VirtualIP vip = obj as VirtualIP; + if (vip == null) + { + return false; + } + + return this == vip; + } + + public static bool operator ==(VirtualIP left, VirtualIP right) + { + if (Object.ReferenceEquals(left, right)) + { + return true; + } + + if ((object)left == null && (object)right == null) + { + return true; + } + + if ((object)left == null || (object)right == null) + { + return false; + } + + return string.Equals(left.Address, right.Address, StringComparison.OrdinalIgnoreCase) && + string.Equals(left.Name, right.Name, StringComparison.OrdinalIgnoreCase); + } + + public static bool operator !=(VirtualIP left, VirtualIP right) + { + return !(left == right); + } + + public override int GetHashCode() + { + return this.Address.GetHashCode(); + } + #endregion + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class EndpointContract : IExtensibleDataObject + { + [DataMember(Order = 1, EmitDefaultValue = false)] + public string Name { get; set; } + + [DataMember(Order = 2, EmitDefaultValue = false)] + public string Protocol { get; set; } + + [DataMember(Order = 3, EmitDefaultValue = false)] + public int Port { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [CollectionDataContract(Namespace = Constants.ServiceManagementNS, Name = "EndpointContracts", ItemName = "EndpointContract")] + public class EndpointContractList : List + { + public EndpointContractList() { } + + public EndpointContractList(IEnumerable collection) + : base(collection) + { + + } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class VirtualIPGroup : IExtensibleDataObject + { + [DataMember(Order = 1, EmitDefaultValue = false)] + public string Name { get; set; } + + [DataMember(Order = 2, EmitDefaultValue = false)] + public EndpointContractList EndpointContracts { get; set; } + + [DataMember(Order = 3, EmitDefaultValue = false)] + public VirtualIPList VirtualIPs { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [CollectionDataContract(Name = "VirtualIPGroups", ItemName = "VirtualIPGroup", Namespace = Constants.ServiceManagementNS)] + public class VirtualIPGroups : List + { + public VirtualIPGroups() + { + } + + public VirtualIPGroups(IEnumerable groups) + : base(groups) + { + } + } + #endregion + + #region Configuration Set + [DataContract(Namespace = Constants.ServiceManagementNS)] + [KnownType(typeof(ProvisioningConfigurationSet))] + [KnownType(typeof(LinuxProvisioningConfigurationSet))] + [KnownType(typeof(WindowsProvisioningConfigurationSet))] + [KnownType(typeof(NetworkConfigurationSet))] + public class ConfigurationSet : Mergable + { + [DataMember(EmitDefaultValue = false, Order = 0)] + public virtual string ConfigurationSetType + { + get; + set; + } + + protected ConfigurationSet() + { + + } + + public override object ResolveType() + { + if (this.GetType() != typeof(ConfigurationSet)) + { + return this; + } + + if (!string.IsNullOrEmpty(this.ConfigurationSetType)) + { + if (string.Equals(this.ConfigurationSetType, "WindowsProvisioningConfiguration")) + { + return base.Convert(); + } + + if (string.Equals(this.ConfigurationSetType, "LinuxProvisioningConfiguration")) + { + return base.Convert(); + } + + if (string.Equals(this.ConfigurationSetType, "NetworkConfiguration")) + { + return base.Convert(); + } + } + return this; + } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public abstract class ProvisioningConfigurationSet : ConfigurationSet + { + public string CustomData { get; set; } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class WindowsProvisioningConfigurationSet : ProvisioningConfigurationSet + { + [DataMember(Name = "ComputerName", EmitDefaultValue = false, Order = 1)] + public string ComputerName + { + get + { + return this.GetValue("ComputerName"); + } + set + { + this.SetValue("ComputerName", value); + } + } + + [DataMember(Name = "AdminPassword", EmitDefaultValue = false, Order = 2)] + public System.Security.SecureString AdminPassword + { + get + { + return this.GetValue("AdminPassword"); + } + set + { + this.SetValue("AdminPassword", value); + } + } + + + [DataMember(Name = "ResetPasswordOnFirstLogon", EmitDefaultValue = false, Order = 4)] + private bool? resetPasswordOnFirstLogon + { + get + { + return this.GetField("ResetPasswordOnFirstLogon"); + } + set + { + this.SetField("ResetPasswordOnFirstLogon", value); + } + } + public bool ResetPasswordOnFirstLogon + { + get + { + return base.GetValue("ResetPasswordOnFirstLogon"); + } + set + { + base.SetValue("ResetPasswordOnFirstLogon", value); + } + } + + [DataMember(Name = "EnableAutomaticUpdates", EmitDefaultValue = false, Order = 4)] + public bool? EnableAutomaticUpdates + { + get + { + return base.GetValue("EnableAutomaticUpdates"); + } + set + { + base.SetValue("EnableAutomaticUpdates", value); + } + } + + [DataMember(Name = "TimeZone", EmitDefaultValue = false, Order = 5)] + public string TimeZone + { + get + { + return base.GetValue("TimeZone"); + } + set + { + base.SetValue("TimeZone", value); + } + } + + [DataMember(Name = "DomainJoin", EmitDefaultValue = false, Order = 6)] + public DomainJoinSettings DomainJoin + { + get + { + return base.GetValue("DomainJoin"); + } + set + { + base.SetValue("DomainJoin", value); + } + } + + [DataMember(Name = "StoredCertificateSettings", EmitDefaultValue = false, Order = 7)] + public CertificateSettingList StoredCertificateSettings + { + get + { + return base.GetValue("StoredCertificateSettings"); + } + set + { + base.SetValue("StoredCertificateSettings", value); + } + } + + [DataMember(Name = "WinRM", EmitDefaultValue = false, Order = 8)] + public WinRmConfiguration WinRM + { + get + { + return base.GetValue("WinRM"); + } + set + { + base.SetValue("WinRM", value); + } + } + + [DataMember(Name = "AdminUsername", EmitDefaultValue = false, Order = 9)] + public string AdminUsername + { + get + { + return this.GetValue("AdminUsername"); + } + set + { + this.SetValue("AdminUsername", value); + } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class WinRmConfiguration + { + [DataMember(EmitDefaultValue = false, Order = 1)] + public WinRmListenerCollection Listeners { get; set; } + } + + [CollectionDataContract(Namespace = Constants.ServiceManagementNS, ItemName = "Listener")] + public class WinRmListenerCollection : Collection { } + + public enum WinRmProtocol + { + Http, + Https + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class WinRmListenerProperties + { + + [DataMember(Order = 0, IsRequired = false, EmitDefaultValue = false)] + public string CertificateThumbprint { get; set; } + + [DataMember(Order = 1, IsRequired = true)] + public string Protocol { get; set; } + } + + public override string ConfigurationSetType + { + get + { + return "WindowsProvisioningConfiguration"; + } + set + { + base.ConfigurationSetType = value; + } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class DomainJoinCredentials + { + [DataMember(Name = "Domain", EmitDefaultValue = false, Order = 1)] + public string Domain { get; set; } + + [DataMember(Name = "Username", EmitDefaultValue = false, Order = 2)] + public string Username { get; set; } + + [DataMember(Name = "Password", EmitDefaultValue = false, Order = 3)] + public System.Security.SecureString Password { get; set; } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class DomainJoinProvisioning + { + [DataMember(Name = "AccountData", EmitDefaultValue = false, Order = 1)] + public string AccountData { get; set; } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class DomainJoinSettings + { + [DataMember(Name = "Credentials", EmitDefaultValue = false, Order = 1)] + public DomainJoinCredentials Credentials { get; set; } + + [DataMember(Name = "Provisioning", EmitDefaultValue = false, Order = 2)] + public DomainJoinProvisioning Provisioning { get; set; } + + [DataMember(Name = "JoinDomain", EmitDefaultValue = false, Order = 3)] + public string JoinDomain { get; set; } + + [DataMember(Name = "MachineObjectOU", EmitDefaultValue = false, Order = 4)] + public string MachineObjectOU { get; set; } + } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class LinuxProvisioningConfigurationSet : ProvisioningConfigurationSet + { + [DataMember(Name = "HostName", EmitDefaultValue = false, Order = 1)] + public string HostName + { + get + { + return this.GetValue("HostName"); + } + set + { + this.SetValue("HostName", value); + } + } + + [DataMember(Name = "UserName", EmitDefaultValue = false, Order = 2)] + public string UserName + { + get + { + return this.GetValue("UserName"); + } + set + { + this.SetValue("UserName", value); + } + } + + [DataMember(Name = "UserPassword", EmitDefaultValue = false, Order = 3)] + public System.Security.SecureString UserPassword + { + get + { + return this.GetValue("UserPassword"); + } + set + { + this.SetValue("UserPassword", value); + } + } + + [DataMember(Name = "DisableSshPasswordAuthentication", EmitDefaultValue = false, Order = 4)] + public bool? DisableSshPasswordAuthentication + { + get + { + return base.GetValue("DisableSshPasswordAuthentication"); + } + set + { + base.SetValue("DisableSshPasswordAuthentication", value); + } + } + + [DataMember(Name = "SSH", EmitDefaultValue = false, Order = 5)] + public SSHSettings SSH + { + get + { + return base.GetValue("SSH"); + } + set + { + base.SetValue("SSH", value); + } + } + + public override string ConfigurationSetType + { + get + { + return "LinuxProvisioningConfiguration"; + } + set + { + base.ConfigurationSetType = value; + } + } + + [DataContract(Name = "SSHSettings", Namespace = Constants.ServiceManagementNS)] + public class SSHSettings + { + [DataMember(Name = "PublicKeys", EmitDefaultValue = false, Order = 1)] + public SSHPublicKeyList PublicKeys { get; set; } + + [DataMember(Name = "KeyPairs", EmitDefaultValue = false, Order = 2)] + public SSHKeyPairList KeyPairs { get; set; } + } + + [CollectionDataContract(Name = "SSHPublicKeyList", ItemName = "PublicKey", Namespace = Constants.ServiceManagementNS)] + public class SSHPublicKeyList : List + { + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class SSHPublicKey + { + [DataMember(Name = "Fingerprint", EmitDefaultValue = false, Order = 1)] + public string Fingerprint { get; set; } + + [DataMember(Name = "Path", EmitDefaultValue = false, Order = 2)] + public string Path { get; set; } + } + + + [CollectionDataContract(Name = "SSHKeyPairList", ItemName = "KeyPair", Namespace = Constants.ServiceManagementNS)] + public class SSHKeyPairList : List + { + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class SSHKeyPair + { + [DataMember(Name = "Fingerprint", EmitDefaultValue = false, Order = 1)] + public string Fingerprint { get; set; } + + [DataMember(Name = "Path", EmitDefaultValue = false, Order = 2)] + public string Path { get; set; } + } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class NetworkConfigurationSet : ConfigurationSet + { + public override string ConfigurationSetType + { + get + { + return "NetworkConfiguration"; + } + set + { + base.ConfigurationSetType = value; + } + } + + [DataMember(Name = "InputEndpoints", EmitDefaultValue = false, Order = 0)] + public Collection InputEndpoints + { + get + { + return base.GetValue>("InputEndpoints"); + } + set + { + base.SetValue("InputEndpoints", value); + } + } + + [DataMember(Name = "SubnetNames", EmitDefaultValue = false, Order = 1)] + public SubnetNamesCollection SubnetNames + { + get + { + return this.GetValue("SubnetNames"); + } + set + { + this.SetValue("SubnetNames", value); + } + } + + [DataMember(Name = "VirtualIPGroups", EmitDefaultValue = false, Order = 2)] + public VirtualIPGroups VirtualIPGroups + { + get + { + return this.GetValue("VirtualIPGroups"); + } + set + { + this.SetValue("VirtualIPGroups", value); + } + } + + [DataMember(Name = "StaticVirtualNetworkIPAddress", EmitDefaultValue = false, Order = 3)] + public string StaticVirtualNetworkIPAddress + { + get + { + return this.GetValue("StaticVirtualNetworkIPAddress"); + } + set + { + this.SetValue("StaticVirtualNetworkIPAddress", value); + } + } + + [DataMember(Name = "PublicIPs", EmitDefaultValue = false, Order = 6)] + public AssignPublicIPCollection PublicIPs + { + get + { + return this.GetValue("PublicIPs"); + } + set + { + this.SetValue("PublicIPs", value); + } + } + [DataMember(Name = "NetworkSecurityGroup", EmitDefaultValue = false, Order = 7)] + public string NetworkSecurityGroup + { + get + { + return this.GetValue("NetworkSecurityGroup"); + } + set + { + this.SetValue("NetworkSecurityGroup", value); + } + } + + [DataMember(Name = "NetworkInterfaces", EmitDefaultValue = false, Order = 7)] + public AssignNetworkInterfaceCollection NetworkInterfaces + { + get + { + return this.GetValue("NetworkInterfaces"); + } + set + { + this.SetValue("NetworkInterfaces", value); + } + } + } + + [CollectionDataContract(Name = "PublicIPs", ItemName = "PublicIP", Namespace = Constants.ServiceManagementNS)] + public class AssignPublicIPCollection : List + { + public AssignPublicIPCollection() + { + } + + public AssignPublicIPCollection(IEnumerable publicIPs) + : base(publicIPs) + { + } + } + + [DataContract(Name = "PublicIP", Namespace = Constants.ServiceManagementNS)] + public class AssignPublicIP + { + [DataMember(Name = "Name", EmitDefaultValue = false, Order = 1)] + public string Name { get; set; } + + [DataMember(Name = "IdleTimeoutInMinutes", EmitDefaultValue = false, Order = 2)] + public int? IdleTimeoutInMinutes { get; set; } + + } + + [CollectionDataContract(Name = "NetworkInterfaces", ItemName = "NetworkInterface", Namespace = Constants.ServiceManagementNS)] + public class AssignNetworkInterfaceCollection : List + { + public AssignNetworkInterfaceCollection() + { + } + + public AssignNetworkInterfaceCollection(IEnumerable assignNetworkInterface) + : base(assignNetworkInterface) + { + } + } + + [DataContract(Name = "NetworkInterface", Namespace = Constants.ServiceManagementNS)] + public class AssignNetworkInterface : Mergable + { + [DataMember(Name = "Name", EmitDefaultValue = false, Order = 1)] + public string Name { get; set; } + + [DataMember(Name = "IPConfigurations", EmitDefaultValue = false, Order = 2)] + public AssignIPConfigurationCollection IPConfigurations + { + get + { + return this.GetValue("IPConfigurations"); + } + set + { + this.SetValue("IPConfigurations", value); + } + } + + } + + [CollectionDataContract(Name = "IPConfigurations", ItemName = "IPConfiguration", Namespace = Constants.ServiceManagementNS)] + public class AssignIPConfigurationCollection : List + { + public AssignIPConfigurationCollection() + { + } + + public AssignIPConfigurationCollection(IEnumerable assignIPConfigurations) + : base(assignIPConfigurations) + { + } + } + + [DataContract(Name = "IPConfiguration", Namespace = Constants.ServiceManagementNS)] + public class AssignIPConfiguration + { + [DataMember(Name = "SubnetName", EmitDefaultValue = false, Order = 1)] + public string SubnetName { get; set; } + + [DataMember(Name = "StaticVirtualNetworkIPAddress", EmitDefaultValue = false, Order = 2)] + public string StaticVirtualNetworkIPAddress { get; set; } + } + + [CollectionDataContract(Name = "LoadBalancedEndpointList", Namespace = Constants.ServiceManagementNS)] + public class LoadBalancedEndpointList : List + { + } + + [DataContract(Name = "InputEndpoint", Namespace = Constants.ServiceManagementNS)] + public class InputEndpoint : Mergable + { + #region constants + [IgnoreDataMember] + private const string EnableDirectServerReturnFieldName = "EnableDirectServerReturn"; + [IgnoreDataMember] + private const string EndPointAccessControlListMemberName = "EndPointAccessControlList"; + #endregion + + [DataMember(Name = "LoadBalancedEndpointSetName", EmitDefaultValue = false, Order = 1)] + public string LoadBalancedEndpointSetName + { + get + { + return base.GetValue("LoadBalancedEndpointSetName"); + } + set + { + base.SetValue("LoadBalancedEndpointSetName", value); + } + } + + [DataMember(Name = "LocalPort", EmitDefaultValue = false, Order = 2)] + private int? localPort + { + get + { + return base.GetField("LocalPort"); + } + set + { + base.SetField("LocalPort", value); + } + } + + public int LocalPort + { + get + { + return base.GetValue("LocalPort"); + } + set + { + base.SetValue("LocalPort", value); + } + } + + [DataMember(Name = "Name", EmitDefaultValue = false, Order = 3)] + public string Name + { + get + { + return base.GetValue("Name"); + } + set + { + base.SetValue("Name", value); + } + } + + [DataMember(Name = "Port", EmitDefaultValue = false, Order = 4)] + public int? Port + { + get + { + return base.GetValue("Port"); + } + set + { + base.SetValue("Port", value); + } + } + + [DataMember(Name = "LoadBalancerProbe", EmitDefaultValue = false, Order = 5)] + public LoadBalancerProbe LoadBalancerProbe + { + get + { + return base.GetValue("LoadBalancerProbe"); + } + set + { + base.SetValue("LoadBalancerProbe", value); + } + } + + [DataMember(Name = "Protocol", EmitDefaultValue = false, Order = 6)] + public string Protocol + { + get + { + return base.GetValue("Protocol"); + } + set + { + base.SetValue("Protocol", value); + } + } + + [DataMember(Name = "Vip", EmitDefaultValue = false, Order = 7)] + public string Vip + { + get + { + return base.GetValue("Vip"); + } + set + { + base.SetValue("Vip", value); + } + } + + [DataMember(Name = "EnableDirectServerReturn", EmitDefaultValue = false, Order = 8)] + public bool? EnableDirectServerReturn + { + get + { + return base.GetValue(EnableDirectServerReturnFieldName); + } + set + { + base.SetValue(EnableDirectServerReturnFieldName, value); + } + } + + [DataMember(Name = "EndpointAcl", EmitDefaultValue = false, Order = 9)] + public EndpointAccessControlList EndpointAccessControlList + { + get + { + return base.GetValue(EndPointAccessControlListMemberName); + } + + set + { + base.SetValue(EndPointAccessControlListMemberName, value); + } + } + + public string LoadBalancerName + { + get + { + return base.GetValue("LoadBalancerName"); + } + set + { + base.SetValue("LoadBalancerName", value); + } + } + + [DataMember(Name = "IdleTimeoutInMinutes", EmitDefaultValue = false, Order = 10)] + public int? IdleTimeoutInMinutes + { + get + { + return base.GetValue("IdleTimeoutInMinutes"); + } + set + { + base.SetValue("IdleTimeoutInMinutes", value); + } + } + + [DataMember(Name = "LoadBalancerDistribution", EmitDefaultValue = false, Order = 11)] + public string LoadBalancerDistribution + { + get + { + return base.GetValue("LoadBalancerDistribution"); + } + set + { + base.SetValue("LoadBalancerDistribution", value); + } + } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class EndpointAccessControlList : Mergable + { + #region private constants + [IgnoreDataMember] + private const string AccessControlListRulesMemberName = "AccessControlListRules"; + #endregion + + [DataMember(Name = "Rules", IsRequired = false, Order = 0)] + public Collection Rules + { + get + { + return base.GetValue>(AccessControlListRulesMemberName); + } + + set + { + base.SetValue(AccessControlListRulesMemberName, value); + } + } + } + + [DataContract(Name = "Rule", Namespace = Constants.ServiceManagementNS)] + public class AccessControlListRule : Mergable + { + #region private constants + private const string OrderMemberName = "Order"; + private const string ActionMemberName = "Action"; + private const string RemoteSubnetMemberName = "RemoteSubnet"; + private const string DescriptionMemberName = "Description"; + #endregion + + [DataMember(Name = OrderMemberName, IsRequired = false, Order = 0)] + public int? Order + { + get + { + return base.GetValue(OrderMemberName); + } + + set + { + base.SetValue(OrderMemberName, value); + } + } + + [DataMember(Name = ActionMemberName, IsRequired = false, Order = 1)] + public string Action + { + get + { + return base.GetValue(ActionMemberName); + } + + set + { + base.SetValue(ActionMemberName, value); + } + } + + [DataMember(Name = RemoteSubnetMemberName, IsRequired = false, Order = 2)] + public string RemoteSubnet + { + get + { + return base.GetValue(RemoteSubnetMemberName); + } + + set + { + base.SetValue(RemoteSubnetMemberName, value); + } + } + + [DataMember(Name = DescriptionMemberName, IsRequired = false, Order = 3)] + public string Description + { + get + { + return base.GetValue(DescriptionMemberName); + } + + set + { + base.SetValue(DescriptionMemberName, value); + } + } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class LoadBalancerProbe : Mergable + { + #region constants + // NOTE: fields in this region must be marked with IgnoreDataMember + [IgnoreDataMember] + private const string IntervalFieldName = "IntervalInSeconds"; + + [IgnoreDataMember] + private const string TimeoutFieldName = "TimeoutInSeconds"; + #endregion + + [DataMember(Name = "Path", EmitDefaultValue = false, Order = 0)] + public string Path + { + get + { + return base.GetValue("Path"); + } + set + { + base.SetValue("Path", value); + } + } + + [DataMember(Name = "Port", EmitDefaultValue = false, Order = 1)] + private int? port + { + get + { + return base.GetField("Port"); + } + set + { + base.SetField("Port", value); + } + } + public int Port + { + get + { + return base.GetValue("Port"); + } + set + { + base.SetValue("Port", value); + } + } + + [DataMember(Name = "Protocol", EmitDefaultValue = false, Order = 2)] + public string Protocol + { + get + { + return base.GetValue("Protocol"); + } + set + { + base.SetValue("Protocol", value); + } + } + + /// + /// This field and its property counterpart represents the Load Balancer Probe Interval. + /// This allows customers to specify custom load balance probe intervals. + /// + [DataMember(Name = "IntervalInSeconds", EmitDefaultValue = false, Order = 3)] + public int? IntervalInSeconds + { + get + { + return base.GetValue(IntervalFieldName); + } + set + { + base.SetValue(IntervalFieldName, value); + } + } + + /// + /// This field and its property counterpart represents the Load Balancer Probe Timeout. + /// This allows customers to specify custom load balance probe timeouts. + /// + [DataMember(Name = "TimeoutInSeconds", EmitDefaultValue = false, Order = 4)] + public int? TimeoutInSeconds + { + get + { + return base.GetValue(TimeoutFieldName); + } + set + { + base.SetValue(TimeoutFieldName, value); + } + } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class CertificateSetting : Mergable + { + [DataMember(Name = "StoreLocation", EmitDefaultValue = false, Order = 0)] + public string StoreLocation + { + get + { + return base.GetValue("StoreLocation"); + } + set + { + base.SetValue("StoreLocation", value); + } + } + + [DataMember(Name = "StoreName", EmitDefaultValue = false, Order = 1)] + public string StoreName + { + get + { + return base.GetValue("StoreName"); + } + set + { + base.SetValue("StoreName", value); + } + } + + [DataMember(Name = "Thumbprint", EmitDefaultValue = false, Order = 2)] + public string Thumbprint + { + get + { + return base.GetValue("Thumbprint"); + } + set + { + base.SetValue("Thumbprint", value); + } + } + } + + [CollectionDataContract(Name = "CertificateSettings", Namespace = Constants.ServiceManagementNS)] + public class CertificateSettingList : List + { + + } + + [CollectionDataContract(Name = "SubnetNames", ItemName = "SubnetName", Namespace = Constants.ServiceManagementNS)] + public class SubnetNamesCollection : Collection + { + + } + + #endregion + + #region DataDisk + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class DataVirtualHardDisk : Mergable + { + [DataMember(Name = "HostCaching", EmitDefaultValue = false, Order = 0)] + public string HostCaching + { + get + { + return this.GetValue("HostCaching"); + } + set + { + this.SetValue("HostCaching", value); + } + } + + [DataMember(Name = "DiskLabel", EmitDefaultValue = false, Order = 1)] + public string DiskLabel + { + get + { + return this.GetValue("DiskLabel"); + } + set + { + this.SetValue("DiskLabel", value); + } + } + + [DataMember(Name = "DiskName", EmitDefaultValue = false, Order = 2)] + public string DiskName + { + get + { + return base.GetValue("DiskName"); + } + set + { + base.SetValue("DiskName", value); + } + } + + [DataMember(Name = "Lun", EmitDefaultValue = false, Order = 3)] + public int Lun + { + get + { + return this.GetValue("Lun"); + } + set + { + this.SetValue("Lun", value); + } + } + + [DataMember(Name = "LogicalDiskSizeInGB", EmitDefaultValue = false, Order = 4)] + private int? logicalDiskSizeInGB + { + get + { + return this.GetField("LogicalDiskSizeInGB"); + } + set + { + this.SetField("LogicalDiskSizeInGB", value); + } + } + public int LogicalDiskSizeInGB + { + get + { + return this.GetValue("LogicalDiskSizeInGB"); + } + set + { + this.SetValue("LogicalDiskSizeInGB", value); + } + } + + [DataMember(Name = "MediaLink", EmitDefaultValue = false, Order = 5)] + public Uri MediaLink + { + get + { + return this.GetValue("MediaLink"); + } + set + { + this.SetValue("MediaLink", value); + } + } + + [DataMember(Name = "SourceMediaLink", EmitDefaultValue = false, Order = 6)] + public Uri SourceMediaLink + { + get + { + return this.GetValue("SourceMediaLink"); + } + set + { + this.SetValue("SourceMediaLink", value); + } + } + + + [DataMember(Name = "IOType", EmitDefaultValue = false, Order = 7)] + public string IOType + { + get + { + return this.GetValue("IOType"); + } + set + { + this.SetValue("IOType", value); + } + } + } + #endregion + + #region OSDisk + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class OSVirtualHardDisk : Mergable + { + [DataMember(Name = "HostCaching", EmitDefaultValue = false, Order = 0)] + public string HostCaching + { + get + { + return this.GetValue("HostCaching"); + } + set + { + this.SetValue("HostCaching", value); + } + } + + [DataMember(Name = "DiskLabel", EmitDefaultValue = false, Order = 1)] + public string DiskLabel + { + get + { + return this.GetValue("DiskLabel"); + } + set + { + this.SetValue("DiskLabel", value); + } + } + + [DataMember(Name = "DiskName", EmitDefaultValue = false, Order = 2)] + public string DiskName + { + get + { + return this.GetValue("DiskName"); + } + set + { + this.SetValue("DiskName", value); + } + } + + [DataMember(Name = "MediaLink", EmitDefaultValue = false, Order = 3)] + public Uri MediaLink + { + get + { + return this.GetValue("MediaLink"); + } + set + { + this.SetValue("MediaLink", value); + } + } + + [DataMember(Name = "SourceImageName", EmitDefaultValue = false, Order = 4)] + public string SourceImageName + { + get + { + return this.GetValue("SourceImageName"); + } + set + { + this.SetValue("SourceImageName", value); + } + } + + [DataMember(Name = "OS", EmitDefaultValue = false, Order = 5)] + public string OS + { + get + { + return this.GetValue("OS"); + } + set + { + this.SetValue("OS", value); + } + } + + [DataMember(Name = "IOType", EmitDefaultValue = false, Order = 5)] + public string IOType + { + get + { + return this.GetValue("IOType"); + } + set + { + this.SetValue("IOType", value); + } + } + } + #endregion + + #region RoleOperation + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class RoleOperation : IExtensibleDataObject + { + [DataMember(EmitDefaultValue = false, Order = 0)] + public virtual string OperationType + { + get; + set; + } + + protected RoleOperation() + { + + } + + #region IExtensibleDataObject Members + + public ExtensionDataObject ExtensionData + { + get; + set; + } + + #endregion + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class ShutdownRoleOperation : RoleOperation + { + public override string OperationType + { + get + { + return "ShutdownRoleOperation"; + } + set + { + + } + } + + [DataMember(EmitDefaultValue = false, Order = 0)] + public PostShutdownAction? PostShutdownAction { get; set; } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public enum PostShutdownAction + { + [EnumMember] + Stopped, + + [EnumMember] + StoppedDeallocated, + + [EnumMember] + Undefined + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class StartRoleOperation : RoleOperation + { + public override string OperationType + { + get + { + return "StartRoleOperation"; + } + set + { + + } + } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class RestartRoleOperation : RoleOperation + { + public override string OperationType + { + get + { + return "RestartRoleOperation"; + } + set + { + + } + } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class CaptureRoleOperation : RoleOperation + { + public override string OperationType + { + get + { + return "CaptureRoleOperation"; + } + set + { + + } + } + + [DataMember(EmitDefaultValue = false, Order = 0)] + public string PostCaptureAction { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 1)] + public ProvisioningConfigurationSet ProvisioningConfiguration + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public string TargetImageLabel { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 3)] + public string TargetImageName { get; set; } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public enum PostCaptureAction + { + [EnumMember] + Delete, + [EnumMember] + Reprovision + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public enum PowerState + { + [EnumMember] + Unknown, + [EnumMember] + Starting, + [EnumMember] + Started, + [EnumMember] + Stopping, + [EnumMember] + Stopped, + } + #endregion // RoleOperation + + #region RoleSetOperations + + [CollectionDataContract(Name = "Roles", ItemName = "Name", Namespace = Constants.ServiceManagementNS)] + public class RoleNamesCollection : Collection { } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class RoleSetOperation : Mergable + { + protected RoleSetOperation() { } + + [DataMember(EmitDefaultValue = false, Order = 0)] + public virtual string OperationType + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 1)] + public virtual RoleNamesCollection Roles + { + get; + set; + } + } // RoleSetOperation + + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class ShutdownRolesOperation : RoleSetOperation + { + public override string OperationType + { + get + { + return "ShutdownRolesOperation"; + } + set + { + } + } + + [DataMember(EmitDefaultValue = false, Order = 0)] + public PostShutdownAction PostShutdownAction { get; set; } + } // ShutdownRolesOperation + + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class StartRolesOperation : RoleSetOperation + { + public override string OperationType + { + get + { + return "StartRolesOperation"; + } + set + { + } + } + } // StartRolesOperation + + #endregion // RoleSetOperations + + + #region ResourceExtension + [DataContract(Name = "ResourceExtensionParameterValue", Namespace = Constants.ServiceManagementNS)] + public class ResourceExtensionParameterValue : Mergable + { + [DataMember(Name = "Key", EmitDefaultValue = false, Order = 0)] + public string Key + { + get + { + return base.GetValue("Key"); + } + set + { + base.SetValue("Key", value); + } + } + + [DataMember(Name = "Value", EmitDefaultValue = false, Order = 1)] + public string Value + { + get + { + return base.GetValue("Value"); + } + set + { + base.SetValue("Value", value); + } + } + + public System.Security.SecureString SecureValue { get; set; } + + [DataMember(Name = "Type", EmitDefaultValue = false, Order = 2)] + public string Type + { + get + { + return base.GetValue("Type"); + } + set + { + base.SetValue("Type", value); + } + } + } + + [CollectionDataContract(Name = "ResourceExtensionParameterValues", Namespace = Constants.ServiceManagementNS)] + public class ResourceExtensionParameterValueList : List + { + public ResourceExtensionParameterValueList() + { + } + + public ResourceExtensionParameterValueList(IEnumerable values) + : base(values) + { + } + } + + + [DataContract(Name = "ResourceExtensionReference", Namespace = Constants.ServiceManagementNS)] + public class ResourceExtensionReference : Mergable + { + [DataMember(Name = "ReferenceName", EmitDefaultValue = false, Order = 0)] + public string ReferenceName + { + get + { + return base.GetValue("ReferenceName"); + } + set + { + base.SetValue("ReferenceName", value); + } + } + + [DataMember(Name = "Publisher", EmitDefaultValue = false, Order = 1)] + public string Publisher + { + get + { + return base.GetValue("Publisher"); + } + set + { + base.SetValue("Publisher", value); + } + } + + [DataMember(Name = "Name", EmitDefaultValue = false, Order = 2)] + public string Name + { + get + { + return base.GetValue("Name"); + } + set + { + base.SetValue("Name", value); + } + } + + [DataMember(Name = "Version", EmitDefaultValue = false, Order = 3)] + public string Version + { + get + { + return base.GetValue("Version"); + } + set + { + base.SetValue("Version", value); + } + } + + [DataMember(EmitDefaultValue = false, Order = 4)] + public ResourceExtensionParameterValueList ResourceExtensionParameterValues { get; set; } + + [DataMember(Name = "State", EmitDefaultValue = false, Order = 5)] + public string State + { + get + { + return base.GetValue("State"); + } + set + { + base.SetValue("State", value); + } + } + } + + [CollectionDataContract(Name = "ResourceExtensionReferences", Namespace = Constants.ServiceManagementNS)] + public class ResourceExtensionReferenceList : List + { + public ResourceExtensionReferenceList() + { + } + + public ResourceExtensionReferenceList(IEnumerable references) + : base(references) + { + } + } + #endregion + + #region Certificate + [DataContract(Namespace = "http://schemas.microsoft.com/windowsazure")] + public class CertificateFile : IExtensibleDataObject + { + [DataMember(Order = 1)] + public string Data; + + [DataMember(Order = 2)] + public string CertificateFormat { get; set; } + + [DataMember(Order = 3)] + public string Password { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + #endregion + + #region Network + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class VirtualNetworkSite : IExtensibleDataObject + { + public VirtualNetworkSite(string name) + { + this.Name = name; + } + + [DataMember(EmitDefaultValue = false, Order = 1)] + public string Name { get; private set; } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public string Id { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 3)] + public string Label { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 4)] + public string AffinityGroup { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 5)] + public string State { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 6)] + public bool InUse { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 7)] + public AddressSpace AddressSpace { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 8)] + public SubnetList Subnets { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 9)] + public DnsSettings Dns { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 10)] + public Gateway Gateway { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [CollectionDataContract(Name = "VirtualNetworkSites", ItemName = "VirtualNetworkSite", Namespace = Constants.ServiceManagementNS)] + public class VirtualNetworkSiteList : List + { + public VirtualNetworkSiteList() + { + } + + public VirtualNetworkSiteList(IEnumerable virtualNetworkSites) + : base(virtualNetworkSites) + { + } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class DnsServer : IExtensibleDataObject + { + [DataMember(EmitDefaultValue = false, Order = 1)] + public string Name { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public string Address { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [CollectionDataContract(Name = "DnsServers", ItemName = "DnsServer", Namespace = Constants.ServiceManagementNS)] + public class DnsServerList : List { } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class DnsSettings : IExtensibleDataObject + { + [DataMember(EmitDefaultValue = false, Order = 1)] + public DnsServerList DnsServers { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class Gateway : IExtensibleDataObject + { + [DataMember(EmitDefaultValue = false, Order = 1)] + public string Profile { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public LocalNetworkSiteList Sites { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 3)] + public AddressSpace VPNClientAddressPool { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class LocalNetworkSite : IExtensibleDataObject + { + [DataMember(EmitDefaultValue = false, Order = 1)] + public string Name { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public AddressSpace AddressSpace { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 3)] + public string VpnGatewayAddress { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 4)] + public ConnectionList Connections { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class Connection : IExtensibleDataObject + { + [DataMember(EmitDefaultValue = false, Order = 1)] + public string Type { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [CollectionDataContract(Name = "LocalNetworkSites", ItemName = "LocalNetworkSite", Namespace = Constants.ServiceManagementNS)] + public class LocalNetworkSiteList : List { } + + [CollectionDataContract(Name = "AddressPrefixes", ItemName = "AddressPrefix", Namespace = Constants.ServiceManagementNS)] + public class AddressPrefixList : List { } + + [CollectionDataContract(Name = "Connections", ItemName = "Connection", Namespace = Constants.ServiceManagementNS)] + public class ConnectionList : List { } + + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class AddressSpace : IExtensibleDataObject + { + [DataMember(EmitDefaultValue = false, Order = 1)] + public AddressPrefixList AddressPrefixes { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class Subnet : IExtensibleDataObject + { + [DataMember(EmitDefaultValue = false, Order = 1)] + public string Name { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public string AddressPrefix { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [CollectionDataContract(Name = "Subnets", ItemName = "Subnet", Namespace = Constants.ServiceManagementNS)] + public class SubnetList : List { } + + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public enum GatewaySize + { + [EnumMember] + Small = 0, + + [EnumMember] + Medium = 1, + + [EnumMember] + Large = 2, + + [EnumMember] + ExtraLarge = 3 + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public enum NetworkState + { + [EnumMember] + Created = 0, + + [EnumMember] + Creating = 1, + + [EnumMember] + Updating = 2, + + [EnumMember] + Deleting = 3, + + [EnumMember] + Unavailable = 4 + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class ReservedIP : IExtensibleDataObject + { + public ReservedIP(string name) + { + this.Name = name; + } + + [DataMember(EmitDefaultValue = false, Order = 1)] + public string Name { get; private set; } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public string Address { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 3)] + public string Id { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 4)] + public string Label { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 5)] + public string AffinityGroup { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 6)] + public string State { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 7)] + public bool InUse { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 8)] + public string ServiceName { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 9)] + public string DeploymentName { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [CollectionDataContract(Name = "ReservedIPs", ItemName = "ReservedIP", Namespace = Constants.ServiceManagementNS)] + public class ReservedIPList : List + { + public ReservedIPList() + { + } + + public ReservedIPList(IEnumerable reservedIPs) + : base(reservedIPs) + { + } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public enum ReservedIPState + { + [EnumMember] + Created = 0, + + [EnumMember] + Creating = 1, + + [EnumMember] + Updating = 2, + + [EnumMember] + Deleting = 3, + + [EnumMember] + Unavailable = 4, + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class AddressAvailabilityResponse : IExtensibleDataObject + { + [DataMember(Order = 1)] + public bool IsAvailable { get; set; } + + [DataMember(Order = 2, EmitDefaultValue = false)] + public List AvailableAddresses { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + #endregion + + #region Role + [DataContract(Namespace = Constants.ServiceManagementNS)] + [KnownType(typeof(PersistentVMRole))] + public class Role : Mergable + { + [DataMember(Order = 1)] + public virtual string RoleName { get; set; } + + [DataMember(Order = 2)] + public string OsVersion { get; set; } + + [DataMember(Order = 3, EmitDefaultValue = false)] + public virtual string RoleType { get; set; } + + [DataMember(Name = "ConfigurationSets", EmitDefaultValue = false, Order = 4)] + public Collection ConfigurationSets + { + get + { + return this.GetValue>("ConfigurationSets"); + } + set + { + base.SetValue("ConfigurationSets", value); + } + } + + [DataMember(EmitDefaultValue = false, Order = 5)] + public ResourceExtensionReferenceList ResourceExtensionReferences + { + get + { + return this.GetValue("ResourceExtensionReferences"); + } + set + { + base.SetValue("ResourceExtensionReferences", value); + } + } + + public NetworkConfigurationSet NetworkConfigurationSet + { + get + { + if (ConfigurationSets == null) + { + return null; + } + return ConfigurationSets.FirstOrDefault( + cset => cset is NetworkConfigurationSet) as NetworkConfigurationSet; + } + set + { + if (ConfigurationSets == null) + { + ConfigurationSets = new Collection(); + } + NetworkConfigurationSet networkConfigurationSet = ConfigurationSets.FirstOrDefault( + cset => cset is NetworkConfigurationSet) as NetworkConfigurationSet; + + if (networkConfigurationSet != null) + { + ConfigurationSets.Remove(networkConfigurationSet); + } + + ConfigurationSets.Add(value); + } + } + + public override object ResolveType() + { + if (this.GetType() != typeof(Role)) + { + return this; + } + + if (this.RoleType == typeof(PersistentVMRole).Name) + { + return base.Convert(); + } + return this; + } + } + #endregion + + #region PersistentVMRole + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class PersistentVMRole : Role + { + private static class PersistentVMRoleConstants + { + public const string RoleName = "RoleName"; + public const string AvailabilitySetName = "AvailabilitySetName"; + public const string DataVirtualHardDisks = "DataVirtualHardDisks"; + public const string Label = "Label"; + public const string OSVirtualHardDisk = "OSVirtualHardDisk"; + public const string RoleSize = "RoleSize"; + public const string DefaultWinRmCertificateThumbprint = "DefaultWinRmCertificateThumbprint"; + public const string ProvisionGuestAgent = "ProvisionGuestAgent"; + } + + public override string RoleName + { + get + { + return this.GetValue(PersistentVMRoleConstants.RoleName); + } + set + { + this.SetValue(PersistentVMRoleConstants.RoleName, value); + } + } + + [DataMember(Name = PersistentVMRoleConstants.AvailabilitySetName, EmitDefaultValue = false, Order = 0)] + public string AvailabilitySetName + { + get + { + return this.GetValue(PersistentVMRoleConstants.AvailabilitySetName); + } + set + { + this.SetValue(PersistentVMRoleConstants.AvailabilitySetName, value); + } + } + + [DataMember(Name = PersistentVMRoleConstants.DataVirtualHardDisks, EmitDefaultValue = false, Order = 1)] + public Collection DataVirtualHardDisks + { + get + { + return base.GetValue>(PersistentVMRoleConstants.DataVirtualHardDisks); + } + set + { + base.SetValue(PersistentVMRoleConstants.DataVirtualHardDisks, value); + } + } + + [DataMember(Name = PersistentVMRoleConstants.Label, EmitDefaultValue = false, Order = 2)] + public string Label + { + get + { + return base.GetValue(PersistentVMRoleConstants.Label); + } + set + { + base.SetValue(PersistentVMRoleConstants.Label, value); + } + } + + [DataMember(Name = PersistentVMRoleConstants.OSVirtualHardDisk, EmitDefaultValue = false, Order = 3)] + public OSVirtualHardDisk OSVirtualHardDisk + { + get + { + return base.GetValue(PersistentVMRoleConstants.OSVirtualHardDisk); + } + set + { + base.SetValue(PersistentVMRoleConstants.OSVirtualHardDisk, value); + } + } + + [DataMember(Name = PersistentVMRoleConstants.RoleSize, EmitDefaultValue = false, Order = 4)] + public string RoleSize + { + get + { + return this.GetValue(PersistentVMRoleConstants.RoleSize); + } + set + { + this.SetValue(PersistentVMRoleConstants.RoleSize, value); + } + } + + public override string RoleType + { + get + { + return typeof(PersistentVMRole).Name; + } + set + { + base.RoleType = value; + } + } + + [DataMember(Name = PersistentVMRoleConstants.DefaultWinRmCertificateThumbprint, EmitDefaultValue = false, Order = 5)] + public string DefaultWinRmCertificateThumbprint + { + get + { + return base.GetValue(PersistentVMRoleConstants.DefaultWinRmCertificateThumbprint); + } + set + { + base.SetValue(PersistentVMRoleConstants.DefaultWinRmCertificateThumbprint, value); + } + } + + [DataMember(Name = PersistentVMRoleConstants.ProvisionGuestAgent, EmitDefaultValue = false, Order = 6)] + public bool? ProvisionGuestAgent + { + get + { + return base.GetValue(PersistentVMRoleConstants.ProvisionGuestAgent); + } + set + { + base.SetValue(PersistentVMRoleConstants.ProvisionGuestAgent, value); + } + } + } + #endregion + + [CollectionDataContract(Namespace = Constants.ServiceManagementNS)] + public class InstanceEndpointList : List { } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class InstanceEndpoint : IExtensibleDataObject + { + [DataMember(EmitDefaultValue = false, Order = 1)] + public string Name { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public string Vip { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 3)] + public int PublicPort { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 4)] + public int LocalPort { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 5)] + public string Protocol { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 6)] + public int? IdleTimeoutInMinutes { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [CollectionDataContract(Namespace = Constants.ServiceManagementNS, Name = "NetworkInterfaces", ItemName = "NetworkInterface")] + public class NetworkInterfaceList : List, IExtensibleDataObject + { + public ExtensionDataObject ExtensionData { get; set; } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class NetworkInterface : IExtensibleDataObject + { + [DataMember(EmitDefaultValue = false, Order = 1)] + public string Name { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public string MacAddress { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 3)] + public IPConfigurationList IpConfigurations { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [CollectionDataContract(Namespace = Constants.ServiceManagementNS, Name = "IPConfigurations", ItemName = "IPConfiguration")] + public class IPConfigurationList : List, IExtensibleDataObject + { + public ExtensionDataObject ExtensionData { get; set; } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class IPConfiguration : IExtensibleDataObject + { + [DataMember(EmitDefaultValue = false, Order = 1)] + public string SubnetName { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public string Address { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [CollectionDataContract(Namespace = Constants.ServiceManagementNS, Name = "AvailableServices", ItemName = "AvailableService")] + public class AvailableServicesList : List, IExtensibleDataObject + { + public ExtensionDataObject ExtensionData { get; set; } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class OSDiskConfiguration : IExtensibleDataObject + { + [DataMember(EmitDefaultValue = false, Order = 0)] + public string Name + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 1)] + public string HostCaching + { + get; + set; + } + + + [DataMember(EmitDefaultValue = false, Order = 2)] + public string OSState + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 3)] + public string OS + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 4)] + public Uri MediaLink + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 5)] + public int LogicalDiskSizeInGB + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 6)] + public string IOType + { + get; + set; + } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class DataDiskConfiguration : IExtensibleDataObject + { + [DataMember(EmitDefaultValue = false, Order = 0)] + public string Name + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 1)] + public string HostCaching + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public int Lun + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 3)] + public Uri MediaLink + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 4)] + public int LogicalDiskSizeInGB + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 5)] + public string IOType + { + get; + set; + } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [CollectionDataContract(Name = "DataDiskConfigurations", ItemName = "DataDiskConfiguration", Namespace = Constants.ServiceManagementNS)] + public class DataDiskConfigurationList : Collection { } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class VMImage + { + [DataMember(EmitDefaultValue = false, Order = 0)] + public string Name + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 1)] + public string Label + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public string Category + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 3)] + public string Description + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 3)] + public OSDiskConfiguration OSDiskConfiguration + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 4)] + public DataDiskConfigurationList DataDiskConfigurations + { + get; + set; + } + + + [DataMember(EmitDefaultValue = false, Order = 5)] + public string ServiceName + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 6)] + public string DeploymentName + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 7)] + public string RoleName + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 8)] + public string Location + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 9)] + public string AffinityGroup + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 10)] + public DateTime CreatedTime + { + get; + set; + } + } + + [CollectionDataContract(Name = "VMImages", ItemName = "VMImage", Namespace = Constants.ServiceManagementNS)] + public class VMImageList : Collection + { + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class GuestAgentStatus : IExtensibleDataObject + { + [DataMember(EmitDefaultValue = false, Order = 1)] + public string ProtocolVersion { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 2, Name = "Timestamp")] + private string _isoTimestampString { get; set; } + + public DateTime? TimestampUtc + { + get + { + return (string.IsNullOrEmpty(this._isoTimestampString) ? DateTime.MinValue : DateTime.Parse(this._isoTimestampString)); + } + set + { + if (value.Equals(DateTime.MinValue)) + { + this._isoTimestampString = null; + } + else + { + this._isoTimestampString = !value.HasValue ? string.Empty : value.Value.ToUniversalTime().ToString(Constants.StandardTimeFormat); + } + } + } + + [DataMember(EmitDefaultValue = false, Order = 3)] + public string GuestAgentVersion { get; set; } + + // Status is one of: "Ready", "NotReady". + [DataMember(EmitDefaultValue = false, Order = 4)] + public string Status { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 5)] + public int? Code { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 6)] + public GuestAgentMessage Message { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 7)] + public GuestAgentFormattedMessage FormattedMessage { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class GuestAgentMessage : IExtensibleDataObject + { + [DataMember(EmitDefaultValue = false, Order = 1)] + public string MessageResourceId { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public GuestAgentMessageParamList ParamList { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [CollectionDataContract(ItemName = "Param", Namespace = Constants.ServiceManagementNS)] + public class GuestAgentMessageParamList : List + { + public GuestAgentMessageParamList() + { + } + + public GuestAgentMessageParamList(IEnumerable list) + : base(list) + { + } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class GuestAgentFormattedMessage : IExtensibleDataObject + { + // Language is either "Language" or "Language-Locale". + [DataMember(EmitDefaultValue = false, Order = 1)] + public string Language { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public string Message { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [CollectionDataContract(ItemName = "ResourceExtensionStatus", Namespace = Constants.ServiceManagementNS)] + public class ResourceExtensionStatusList : List + { + public ResourceExtensionStatusList() + { + } + + public ResourceExtensionStatusList(IEnumerable list) + : base(list) + { + } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class ResourceExtensionStatus : IExtensibleDataObject + { + [DataMember(EmitDefaultValue = false, Order = 1)] + public string HandlerName { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public string Version { get; set; } + + // Status is one of: "Installing", "Ready", "NotReady", "Unresponsive". + [DataMember(EmitDefaultValue = false, Order = 3)] + public string Status { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 4)] + public int? Code { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 5)] + public GuestAgentMessage Message { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 6)] + public GuestAgentFormattedMessage FormattedMessage { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 7)] + public ResourceExtensionConfigurationStatus ExtensionSettingStatus { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class ResourceExtensionConfigurationStatus : IExtensibleDataObject + { + [DataMember(EmitDefaultValue = false, Order = 1, Name = "Timestamp")] + private string _isoTimestampString { get; set; } + + public DateTime? TimestampUtc + { + get + { + return (string.IsNullOrEmpty(this._isoTimestampString) ? DateTime.MinValue : DateTime.Parse(this._isoTimestampString)); + } + set + { + if (value.Equals(DateTime.MinValue)) + { + this._isoTimestampString = null; + } + else + { + this._isoTimestampString = !value.HasValue ? string.Empty : value.Value.ToUniversalTime().ToString(Constants.StandardTimeFormat); + } + } + } + + [DataMember(EmitDefaultValue = false, Order = 2, Name = "ConfigurationAppliedTime")] + private string _isoConfigurationAppliedTimeString { get; set; } + + public DateTime? ConfigurationAppliedTimeUtc + { + get + { + return (string.IsNullOrEmpty(this._isoConfigurationAppliedTimeString) ? DateTime.MinValue : DateTime.Parse(this._isoConfigurationAppliedTimeString)); + } + set + { + if (value.Equals(DateTime.MinValue)) + { + this._isoConfigurationAppliedTimeString = null; + } + else + { + this._isoConfigurationAppliedTimeString = !value.HasValue ? string.Empty : value.Value.ToUniversalTime().ToString(Constants.StandardTimeFormat); + } + } + } + + [DataMember(EmitDefaultValue = false, Order = 3)] + public string Name { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 4)] + public string Operation { get; set; } + + // Status is one of: "transitioning", "error", "success", "warning". + [DataMember(EmitDefaultValue = false, Order = 5)] + public string Status { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 6)] + public int Code { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 7)] + public GuestAgentMessage Message { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 8)] + public GuestAgentFormattedMessage FormattedMessage { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 9)] + public ResourceExtensionSubStatusList SubStatusList { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [CollectionDataContract(ItemName = "SubStatus", Namespace = Constants.ServiceManagementNS)] + public class ResourceExtensionSubStatusList : List + { + public ResourceExtensionSubStatusList() + { + } + + public ResourceExtensionSubStatusList(IEnumerable list) + : base(list) + { + } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class ResourceExtensionSubStatus : IExtensibleDataObject + { + [DataMember(EmitDefaultValue = false, Order = 1)] + public string Name { get; set; } + + // Status is one of: "transitioning", "error", "success", "warning". + [DataMember(EmitDefaultValue = false, Order = 2)] + public string Status { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 3)] + public int Code { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 4)] + public GuestAgentMessage Message { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 5)] + public GuestAgentFormattedMessage FormattedMessage { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [CollectionDataContract(Namespace = Constants.ServiceManagementNS)] + public class PublicIPList : List { } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class PublicIP : IExtensibleDataObject + { + [DataMember(EmitDefaultValue = false, Order = 1)] + public string Name { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public string Address { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + + [CollectionDataContract(Name = "LoadBalancers", ItemName = "LoadBalancer", Namespace = Constants.ServiceManagementNS)] + public class LoadBalancerList : List + { + public LoadBalancerList() + { + + } + + public LoadBalancerList(IEnumerable ips) + : base(ips) + { + + } + } + + /// + /// Represents a + /// + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class LoadBalancer : IExtensibleDataObject + { + [DataMember(EmitDefaultValue = false, Order = 1)] + public string Name { get; set; } + + [DataMember(Name = "FrontendIpConfiguration", EmitDefaultValue = false, Order = 2)] + public IpConfiguration FrontEndIpConfiguration { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + /// + /// Represents a + /// + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class IpConfiguration : IExtensibleDataObject + { + [DataMember(EmitDefaultValue = false, Order = 1)] + public LoadBalancerType Type { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public string SubnetName { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 3)] + public string StaticVirtualNetworkIPAddress { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + /// + /// Represents the type of a load balancer. + /// + [DataContract(Namespace = Constants.ServiceManagementNS)] + public enum LoadBalancerType + { + [EnumMember] + Unknown = 0, + + [EnumMember] + Private = 1, + } + + + [CollectionDataContract(Name = "StorageServices", ItemName = "StorageService", Namespace = Constants.ServiceManagementNS)] + public class StorageServiceList : List + { + public StorageServiceList() + { + } + + public StorageServiceList(IEnumerable storageServices) + : base(storageServices) + { + } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class StorageDomain : IExtensibleDataObject + { + [DataMember(Order = 1, EmitDefaultValue = false)] + public string ServiceName { get; set; } + + [DataMember(Order = 2)] + public string DomainName { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class CustomDomain : IExtensibleDataObject + { + + [DataMember(EmitDefaultValue = false, Order = 1)] + public string Name { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public bool UseSubDomainName { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [CollectionDataContract(Namespace = Constants.ServiceManagementNS, Name = "CustomDomains", ItemName = "CustomDomain")] + public class CustomDomainList : List, IExtensibleDataObject + { + public CustomDomainList() + { + } + + public CustomDomainList(IEnumerable customDomains) + : base(customDomains) + { + } + + public ExtensionDataObject ExtensionData { get; set; } + } + + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class CreateStorageServiceInput : IExtensibleDataObject + { + [DataMember(Order = 1, EmitDefaultValue = false)] + public string ServiceName { get; set; } + + [DataMember(Order = 2)] + public string Description { get; set; } + + [DataMember(Order = 3, Name = "Label")] + private string _base64EncodedLabel { get; set; } + + public string Label + { + get + { + string decodedLabel; + if (!StringEncoder.TryDecodeFromBase64String(this._base64EncodedLabel, out decodedLabel)) + { + throw new InvalidOperationException(Resources.UnableToDecodeBase64String); + } + return decodedLabel; + } + set + { + this._base64EncodedLabel = StringEncoder.EncodeToBase64String(value); + } + } + + [DataMember(Order = 4, EmitDefaultValue = false)] + public string AffinityGroup { get; set; } + + [DataMember(Order = 5, EmitDefaultValue = false)] + public string Location { get; set; } + + [DataMember(Order = 6, EmitDefaultValue = false)] + public bool? GeoReplicationEnabled { get; set; } + + [DataMember(Order = 7, EmitDefaultValue = false)] + public ExtendedPropertiesList ExtendedProperties { get; set; } + + [DataMember(Order = 8, EmitDefaultValue = false)] + public bool? SecondaryReadEnabled { get; set; } + + [DataMember(Order = 9, EmitDefaultValue = false)] + public string AccountType { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class UpdateStorageServiceInput : IExtensibleDataObject + { + [DataMember(Order = 1)] + public string Description { get; set; } + + [DataMember(Order = 2, Name = "Label")] + private string _base64EncodedLabel { get; set; } + + public string Label + { + get + { + string decodedLabel; + if (!StringEncoder.TryDecodeFromBase64String(this._base64EncodedLabel, out decodedLabel)) + { + throw new InvalidOperationException(Resources.UnableToDecodeBase64String); + } + return decodedLabel; + } + set + { + this._base64EncodedLabel = StringEncoder.EncodeToBase64String(value); + } + } + + [DataMember(Order = 3, EmitDefaultValue = false)] + public bool? GeoReplicationEnabled { get; set; } + + [DataMember(Order = 4, EmitDefaultValue = false)] + public ExtendedPropertiesList ExtendedProperties { get; set; } + + [DataMember(Order = 5, EmitDefaultValue = false)] + public CustomDomainList CustomDomains { get; set; } + + [DataMember(Order = 6, EmitDefaultValue = false)] + public bool? SecondaryReadEnabled { get; set; } + + [DataMember(Order = 7, EmitDefaultValue = false)] + public string AccountType { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class StorageService : IExtensibleDataObject + { + [DataMember(Order = 1)] + public Uri Url { get; set; } + + [DataMember(Order = 2, EmitDefaultValue = false)] + public string ServiceName { get; set; } + + [DataMember(Order = 3, EmitDefaultValue = false)] + public StorageServiceProperties StorageServiceProperties { get; set; } + + [DataMember(Order = 4, EmitDefaultValue = false)] + public StorageServiceKeys StorageServiceKeys { get; set; } + + [DataMember(Order = 5, EmitDefaultValue = false)] + public ExtendedPropertiesList ExtendedProperties { get; set; } + + [DataMember(Order = 6, EmitDefaultValue = false)] + public CapabilitiesList Capabilities { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [CollectionDataContract(Namespace = Constants.ServiceManagementNS, Name = "Endpoints", ItemName = "Endpoint")] + public class EndpointList : List, IExtensibleDataObject + { + public ExtensionDataObject ExtensionData { get; set; } + + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class StorageServiceProperties : IExtensibleDataObject + { + [DataMember(Order = 1)] + public string Description { get; set; } + + [DataMember(Order = 2, EmitDefaultValue = false)] + public string AffinityGroup { get; set; } + + [DataMember(Order = 3, EmitDefaultValue = false)] + public string Location { get; set; } + + [DataMember(Order = 4, Name = "Label", EmitDefaultValue = false)] + private string _base64EncodedLabel { get; set; } + + public string Label + { + get + { + string decodedLabel; + if (!StringEncoder.TryDecodeFromBase64String(this._base64EncodedLabel, out decodedLabel)) + { + throw new InvalidOperationException(Resources.UnableToDecodeBase64String); + } + return decodedLabel; + } + set + { + this._base64EncodedLabel = StringEncoder.EncodeToBase64String(value); + } + } + + [DataMember(Order = 5, EmitDefaultValue = false)] + public string Status { get; set; } + + [DataMember(Order = 6, EmitDefaultValue = false)] + public EndpointList Endpoints { get; set; } + + [DataMember(Order = 7, EmitDefaultValue = false)] + public bool? GeoReplicationEnabled { get; set; } // Defines as nullable for older client compat. + + [DataMember(Order = 8, EmitDefaultValue = false)] + public string GeoPrimaryRegion { get; set; } + + [DataMember(Order = 9, EmitDefaultValue = false)] + public string StatusOfPrimary { get; set; } + + [DataMember(Order = 10, EmitDefaultValue = false)] + public string GeoSecondaryRegion { get; set; } + + [DataMember(Order = 11, EmitDefaultValue = false)] + public string StatusOfSecondary { get; set; } + + [DataMember(Order = 12, EmitDefaultValue = false, Name = "LastGeoFailoverTime")] + public string isoLastGeoFailoverTime { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Anvil.RdUsage!TimeUtc", "27102", + Justification = "fixing it at this stage might break the old behavior/interface since LastGeoFailoverTime is customer facing and there is a lot of existing data")] + public DateTime LastGeoFailoverTime + { + get + { + return (string.IsNullOrEmpty(this.isoLastGeoFailoverTime) ? new DateTime() : DateTime.Parse(this.isoLastGeoFailoverTime)); + } + set + { + this.isoLastGeoFailoverTime = value.ToString(Constants.StandardTimeFormat); + } + } + + // Below property name should be "CreatedTime", alligning with Disk, Deployment, AffinityGroup. + [DataMember(Order = 13, EmitDefaultValue = false, Name = "CreationTime")] + private string _isoCreationTimeString { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Anvil.RdUsage!TimeUtc", "27102", + Justification = "fixing it at this stage might break the old behavior/interface since CreationTime is customer facing and there is a lot of existing data")] + public DateTime CreationTime + { + get + { + return (string.IsNullOrEmpty(this._isoCreationTimeString) ? DateTime.MinValue : DateTime.Parse(this._isoCreationTimeString)); + } + set + { + if (value.Equals(DateTime.MinValue)) + { + this._isoCreationTimeString = null; + } + else + { + this._isoCreationTimeString = value.ToString(Constants.StandardTimeFormat); + } + } + } + + [DataMember(Order = 14, EmitDefaultValue = false)] + public CustomDomainList CustomDomains { get; set; } + + [DataMember(Order = 15, EmitDefaultValue = false)] + public bool? SecondaryReadEnabled { get; set; } + + [DataMember(Order = 16, EmitDefaultValue = false)] + public EndpointList SecondaryEndpoints { get; set; } + + [DataMember(Order = 17, EmitDefaultValue = false)] + public string AccountType { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public enum StorageAccountType + { + [EnumMember] + Standard_LRS, + + [EnumMember] + Standard_GRS, + + [EnumMember] + Standard_RAGRS, + + [EnumMember] + Standard_ZRS, + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class StorageServiceKeys : IExtensibleDataObject + { + [DataMember(Order = 1)] + public string Primary { get; set; } + + [DataMember(Order = 2)] + public string Secondary { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class RegenerateKeys : IExtensibleDataObject + { + [DataMember(Order = 1)] + public string KeyType { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class ExtendedProperty : IExtensibleDataObject + { + + [DataMember(Order = 1)] + public string Name { get; set; } + + [DataMember(Order = 2, EmitDefaultValue = false)] + public string Value { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [CollectionDataContract(Name = "ExtendedPropertiesList", ItemName = "ExtendedProperty", Namespace = Constants.ServiceManagementNS)] + public class ExtendedPropertiesList : List + { + public ExtendedPropertiesList() + { + // Empty + } + + public ExtendedPropertiesList(IEnumerable propertyList) + : base(propertyList) + { + // Empty + } + } + + + [CollectionDataContract(Name = "AffinityGroups", ItemName = "AffinityGroup", Namespace = Constants.ServiceManagementNS)] + public class AffinityGroupList : List + { + public AffinityGroupList() + { + } + + public AffinityGroupList(IEnumerable affinityGroups) + : base(affinityGroups) + { + } + } + + //Use ComputeCapabilities for the compute related things. In new API this should not be used + //as it doesn't give the good idea of what capabilities are supported. + [CollectionDataContract(Name = "Capabilities", ItemName = "Capability", Namespace = Constants.ServiceManagementNS)] + public class CapabilitiesList : List, IExtensibleDataObject + { + public CapabilitiesList() + { + } + + public CapabilitiesList(IEnumerable capabilities) + : base(capabilities) + { + } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class AffinityGroup : IExtensibleDataObject + { + [DataMember(Order = 1, EmitDefaultValue = false)] + public string Name { get; set; } + + [DataMember(Order = 2, Name = "Label")] + private string _base64EncodedLabel { get; set; } + + public string Label + { + get + { + string decodedLabel; + if (!StringEncoder.TryDecodeFromBase64String(this._base64EncodedLabel, out decodedLabel)) + { + throw new InvalidOperationException(Resources.UnableToDecodeBase64String); + } + return decodedLabel; + } + set + { + this._base64EncodedLabel = StringEncoder.EncodeToBase64String(value); + } + } + + [DataMember(Order = 3)] + public string Description { get; set; } + + [DataMember(Order = 4)] + public string Location { get; set; } + + [DataMember(Order = 5, EmitDefaultValue = false)] + public HostedServiceList HostedServices { get; set; } + + [DataMember(Order = 6, EmitDefaultValue = false)] + public StorageServiceList StorageServices { get; set; } + + //Use ComputeCapabilities for the compute related things. In new API this should not be used + //as it doesn't give the good idea of what capabilities are supported. + [DataMember(Order = 7, EmitDefaultValue = false)] + public CapabilitiesList Capabilities { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 8, Name = "CreatedTime")] + private string _isoCreatedTimeString { get; set; } + + public DateTime CreatedTime + { + get + { + return (string.IsNullOrEmpty(this._isoCreatedTimeString) ? DateTime.MinValue : DateTime.Parse(this._isoCreatedTimeString)); + } + set + { + if (value.Equals(DateTime.MinValue)) + { + this._isoCreatedTimeString = null; + } + else + { + this._isoCreatedTimeString = value.ToString(Constants.StandardTimeFormat); + } + } + } + [DataMember(Order = 9, EmitDefaultValue = false)] + public ComputeCapabilities ComputeCapabilities { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [DataContract(Name = "CreateAffinityGroup", Namespace = Constants.ServiceManagementNS)] + public class CreateAffinityGroupInput : IExtensibleDataObject + { + [DataMember(Order = 1)] + public string Name { get; set; } + + [DataMember(Order = 2, Name = "Label")] + private string _base64EncodedLabel { get; set; } + + public string Label + { + get + { + string decodedLabel; + if (!StringEncoder.TryDecodeFromBase64String(this._base64EncodedLabel, out decodedLabel)) + { + throw new InvalidOperationException(Resources.UnableToDecodeBase64String); + } + return decodedLabel; + } + set + { + this._base64EncodedLabel = StringEncoder.EncodeToBase64String(value); + } + } + + [DataMember(Order = 3, EmitDefaultValue = false)] + public string Description { get; set; } + + [DataMember(Order = 4)] + public string Location { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [DataContract(Name = "UpdateAffinityGroup", Namespace = Constants.ServiceManagementNS)] + public class UpdateAffinityGroupInput : IExtensibleDataObject + { + [DataMember(Order = 1, Name = "Label")] + private string _base64EncodedLabel { get; set; } + + public string Label + { + get + { + string decodedLabel; + if (!StringEncoder.TryDecodeFromBase64String(this._base64EncodedLabel, out decodedLabel)) + { + throw new InvalidOperationException(Resources.UnableToDecodeBase64String); + } + return decodedLabel; + } + set + { + this._base64EncodedLabel = StringEncoder.EncodeToBase64String(value); + } + } + + [DataMember(Order = 2, EmitDefaultValue = false)] + public string Description { get; set; } + + [DataMember(Order = 3, EmitDefaultValue = false)] + public string LocationConstraint { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [CollectionDataContract(Name = "HostedServices", ItemName = "HostedService", Namespace = Constants.ServiceManagementNS)] + public class HostedServiceList : List + { + public HostedServiceList() + { + } + + public HostedServiceList(IEnumerable hostedServices) + : base(hostedServices) + { + } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class HostedService : IExtensibleDataObject + { + [DataMember(Order = 1)] + public Uri Url { get; set; } + + [DataMember(Order = 2, EmitDefaultValue = false)] + public string ServiceName { get; set; } + + [DataMember(Order = 3, EmitDefaultValue = false)] + public HostedServiceProperties HostedServiceProperties { get; set; } + + [DataMember(Order = 4, EmitDefaultValue = false)] + public DeploymentList Deployments { get; set; } + + [DataMember(Order = 5, EmitDefaultValue = false)] + public bool? IsComplete { get; set; } + + [DataMember(Order = 6, EmitDefaultValue = false)] + public string DefaultWinRmCertificateThumbprint { get; set; } + + [DataMember(Order = 7, EmitDefaultValue = false)] + public ComputeCapabilities ComputeCapabilities { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [CollectionDataContract(Name = "Deployments", ItemName = "Deployment", Namespace = Constants.ServiceManagementNS)] + public class DeploymentList : List + { + public DeploymentList() + { + } + + public DeploymentList(IEnumerable deployments) + : base(deployments) + { + } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class HostedServiceProperties : IExtensibleDataObject + { + [DataMember(Order = 1)] + public string Description { get; set; } + + [DataMember(Order = 2, EmitDefaultValue = false)] + public string AffinityGroup { get; set; } + + [DataMember(Order = 3, EmitDefaultValue = false)] + public string Location { get; set; } + + [DataMember(Order = 4, Name = "Label")] + private string _base64EncodedLabel { get; set; } + + public string Label + { + get + { + string decodedLabel; + if (!StringEncoder.TryDecodeFromBase64String(this._base64EncodedLabel, out decodedLabel)) + { + throw new InvalidOperationException(Resources.UnableToDecodeBase64String); + } + return decodedLabel; + } + set + { + this._base64EncodedLabel = StringEncoder.EncodeToBase64String(value); + } + } + + [DataMember(EmitDefaultValue = false, Order = 5)] + public string Status { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 6, Name = "DateCreated")] + private string _isoDateCreatedString { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Anvil.RdUsage!TimeUtc", "27102", + Justification = "fixing it at this stage might break the old behavior/interface since DateCreated is customer facing and there is a lot of existing data")] + public DateTime DateCreated + { + get + { + return (string.IsNullOrEmpty(this._isoDateCreatedString) ? new DateTime() : DateTime.Parse(this._isoDateCreatedString)); + } + set + { + this._isoDateCreatedString = value.ToString(Constants.StandardTimeFormat); + } + } + + [DataMember(EmitDefaultValue = false, Order = 7, Name = "DateLastModified")] + private string _isoDateLastModifiedString { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Anvil.RdUsage!TimeUtc", "27102", + Justification = "fixing it at this stage might break the old behavior/interface since DateLastModified is customer facing and there is a lot of existing data")] + public DateTime DateLastModified + { + get + { + return (string.IsNullOrEmpty(this._isoDateLastModifiedString) ? new DateTime() : DateTime.Parse(this._isoDateLastModifiedString)); + } + set + { + this._isoDateLastModifiedString = value.ToString(Constants.StandardTimeFormat); + } + } + + [DataMember(EmitDefaultValue = false, Order = 8)] + public ExtendedPropertiesList ExtendedProperties { get; set; } + + [DataMember(Order = 9, EmitDefaultValue = false)] + public string GuestAgentType { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 10)] + public string ReverseDnsFqdn { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [CollectionDataContract(Name = "Locations", ItemName = "Location", Namespace = Constants.ServiceManagementNS)] + public class LocationList : List + { + public LocationList() + { + } + + public LocationList(IEnumerable locations) + : base(locations) + { + } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class Location : IExtensibleDataObject + { + [DataMember(Order = 1)] + public string Name { get; set; } + + [DataMember(Order = 2, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + [DataMember(Order = 3, EmitDefaultValue = false)] + public AvailableServicesList AvailableServices { get; set; } + + [DataMember(Order = 4, EmitDefaultValue = false)] + public ComputeCapabilities ComputeCapabilities { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class ComputeCapabilities : IExtensibleDataObject + { + + [DataMember(Order = 1, EmitDefaultValue = false)] + public WebWorkerRoleSizes WebWorkerRoleSizes { get; set; } + + [DataMember(Order = 2, EmitDefaultValue = false)] + public VirtualMachinesRoleSizes VirtualMachinesRoleSizes { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [CollectionDataContract(Namespace = Constants.ServiceManagementNS, ItemName = "RoleSize")] + public class WebWorkerRoleSizes : List + { + public WebWorkerRoleSizes() + { + } + + public WebWorkerRoleSizes(IEnumerable webWorkerRoleSizes) + : base(webWorkerRoleSizes) + { + } + } + + [CollectionDataContract(Namespace = Constants.ServiceManagementNS, ItemName = "RoleSize")] + public class VirtualMachinesRoleSizes : List + { + public VirtualMachinesRoleSizes() + { + } + + public VirtualMachinesRoleSizes(IEnumerable virtualMachinesRoleSizes) + : base(virtualMachinesRoleSizes) + { + } + } + + [DataContract(Name = "CreateHostedService", Namespace = Constants.ServiceManagementNS)] + public class CreateHostedServiceInput : IExtensibleDataObject + { + [DataMember(Order = 1)] + public string ServiceName { get; set; } + + [DataMember(Order = 2, Name = "Label")] + private string _base64EncodedLabel { get; set; } + + public string Label + { + get + { + string decodedLabel; + if (!StringEncoder.TryDecodeFromBase64String(this._base64EncodedLabel, out decodedLabel)) + { + throw new InvalidOperationException(Resources.UnableToDecodeBase64String); + } + return decodedLabel; + } + set + { + this._base64EncodedLabel = StringEncoder.EncodeToBase64String(value); + } + } + + [DataMember(Order = 3, EmitDefaultValue = false)] + public string Description { get; set; } + + [DataMember(Order = 4, EmitDefaultValue = false)] + public string Location { get; set; } + + [DataMember(Order = 5, EmitDefaultValue = false)] + public string AffinityGroup { get; set; } + + [DataMember(Order = 6, EmitDefaultValue = false)] + public ExtendedPropertiesList ExtendedProperties { get; set; } + + [DataMember(Order = 7, EmitDefaultValue = false)] + public string ReverseDnsFqdn { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [DataContract(Name = "UpdateHostedService", Namespace = Constants.ServiceManagementNS)] + public class UpdateHostedServiceInput : IExtensibleDataObject + { + [DataMember(Order = 1, EmitDefaultValue = false, Name = "Label")] + private string _base64EncodedLabel { get; set; } + + public string Label + { + get + { + string decodedLabel; + if (!StringEncoder.TryDecodeFromBase64String(this._base64EncodedLabel, out decodedLabel)) + { + throw new InvalidOperationException(Resources.UnableToDecodeBase64String); + } + return decodedLabel; + } + set + { + this._base64EncodedLabel = StringEncoder.EncodeToBase64String(value); + } + } + + [DataMember(Order = 2, EmitDefaultValue = false)] + public string Description { get; set; } + + [DataMember(Order = 3, EmitDefaultValue = false)] + public string Location { get; set; } + + [DataMember(Order = 4, EmitDefaultValue = false)] + public string AffinityGroup { get; set; } + + [DataMember(Order = 5, EmitDefaultValue = false)] + public ExtendedPropertiesList ExtendedProperties { get; set; } + [DataMember(Order = 6, EmitDefaultValue = false)] + public string GuestAgentType { get; set; } + + [DataMember(Order = 7, EmitDefaultValue = false)] + public string ReverseDnsFqdn { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [DataContract(Name = "AvailabilityResponse", Namespace = Constants.ServiceManagementNS)] + public class AvailabilityResponse : IExtensibleDataObject + { + [DataMember(Order = 1)] + public bool Result { get; set; } + [DataMember(Order = 2)] + public string Reason { get; set; } + public ExtensionDataObject ExtensionData { get; set; } + } + + + [DataContract(Name = "Swap", Namespace = Constants.ServiceManagementNS)] + public class SwapDeploymentInput : IExtensibleDataObject + { + [DataMember(Order = 1)] + public string Production { get; set; } + + [DataMember(Order = 2)] + public string SourceDeployment { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class Deployment : IExtensibleDataObject + { + [DataMember(Order = 1, EmitDefaultValue = false)] + public string Name { get; set; } + + [DataMember(Order = 2, EmitDefaultValue = false)] + public string DeploymentSlot { get; set; } + + [DataMember(Order = 3, EmitDefaultValue = false)] + public string PrivateID { get; set; } + + [DataMember(Order = 4, EmitDefaultValue = false)] + public string Status { get; set; } + + [DataMember(Order = 5, EmitDefaultValue = false, Name = "Label")] + private string _base64EncodedLabel { get; set; } + + public string Label + { + get + { + string decodedLabel; + if (!StringEncoder.TryDecodeFromBase64String(this._base64EncodedLabel, out decodedLabel)) + { + throw new InvalidOperationException(Resources.UnableToDecodeBase64String); + } + return decodedLabel; + } + set + { + this._base64EncodedLabel = value; + } + } + + + [DataMember(Order = 6, EmitDefaultValue = false)] + public Uri Url { get; set; } + + [DataMember(Order = 7, EmitDefaultValue = false, Name = "Configuration")] + private string _base64EncodedConfiguration { get; set; } + + public string Configuration + { + get + { + string decodedConfiguration; + if (!StringEncoder.TryDecodeFromBase64String(this._base64EncodedConfiguration, out decodedConfiguration)) + { + throw new InvalidOperationException(Resources.UnableToDecodeBase64String); + } + return decodedConfiguration; + } + set + { + this._base64EncodedConfiguration = StringEncoder.EncodeToBase64String(value); + } + } + + [DataMember(Order = 8, EmitDefaultValue = false)] + public RoleInstanceList RoleInstanceList { get; set; } + + [DataMember(Order = 10, EmitDefaultValue = false)] + public UpgradeStatus UpgradeStatus { get; set; } + + [DataMember(Order = 11, EmitDefaultValue = false)] + public int UpgradeDomainCount { get; set; } + + [DataMember(Order = 12, EmitDefaultValue = false)] + public RoleList RoleList { get; set; } + + [DataMember(Order = 13, EmitDefaultValue = false)] + public string SdkVersion { get; set; } + + [DataMember(Order = 14, EmitDefaultValue = false)] + public DeploymentInputEndpointList InputEndpointList { get; set; } + + [DataMember(Order = 15, EmitDefaultValue = false)] + public bool? Locked { get; set; } + + [DataMember(Order = 16, EmitDefaultValue = false)] + public bool? RollbackAllowed { get; set; } + + [DataMember(Order = 17, EmitDefaultValue = false)] + public string VirtualNetworkName { get; set; } + + [DataMember(Order = 18, EmitDefaultValue = false, Name = "CreatedTime")] + private string _isoCreatedTimeString { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Anvil.RdUsage!TimeUtc", "27102", + Justification = "fixing it at this stage might break the old behavior/interface since CreatedTime is customer facing and there is a lot of existing data")] + public DateTime CreatedTime + { + get + { + return (string.IsNullOrEmpty(this._isoCreatedTimeString) ? new DateTime() : DateTime.Parse(this._isoCreatedTimeString)); + } + set + { + if (value.Equals(DateTime.MinValue)) + { + this._isoCreatedTimeString = null; + } + else + { + this._isoCreatedTimeString = value.ToString(Constants.StandardTimeFormat); + } + } + } + + [DataMember(Order = 19, EmitDefaultValue = false, Name = "LastModifiedTime")] + private string _isoLastModifiedTimeString { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Anvil.RdUsage!TimeUtc", "27102", + Justification = "fixing it at this stage might break the old behavior/interface since LastModifiedTime is customer facing and there is a lot of existing data")] + public DateTime LastModifiedTime + { + get + { + return (string.IsNullOrEmpty(this._isoLastModifiedTimeString) ? new DateTime() : DateTime.Parse(this._isoLastModifiedTimeString)); + } + set + { + this._isoLastModifiedTimeString = value.ToString(Constants.StandardTimeFormat); + } + } + + [DataMember(Order = 20, EmitDefaultValue = false)] + public ExtendedPropertiesList ExtendedProperties { get; set; } + + [DataMember(Order = 21, EmitDefaultValue = false)] + public DnsSettings Dns { get; set; } + + [DataMember(Order = 22, EmitDefaultValue = false)] + public PersistentVMDowntimeInfo PersistentVMDowntime; + + [DataMember(Order = 23, EmitDefaultValue = false)] + public VirtualIPList VirtualIPs { get; set; } + + [DataMember(Order = 23, EmitDefaultValue = false)] + public ExtensionConfiguration ExtensionConfiguration { get; set; } + + [DataMember(Order = 24, EmitDefaultValue = false)] + public string ReservedIPName { get; set; } + + // + // Note: Setting Order = 26 below to accomodate for the duplicate + // order values (23) above which should be fixed. + // + + // This is the IDNS FQDN suffix, e.g. "hostedservice.a1.internal.cloudapp.net". + [DataMember(Order = 26, EmitDefaultValue = false)] + public string InternalDnsSuffix { get; set; } + + [DataMember(Order = 27, EmitDefaultValue = false)] + public LoadBalancerList LoadBalancers { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class OutboundNatVirtualIP : IExtensibleDataObject + { + [DataMember(Order = 1, EmitDefaultValue = false)] + public string Address { get; set; } + + [DataMember(Order = 2, EmitDefaultValue = false)] + public string Name { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + + #region Implements Equals + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + OutboundNatVirtualIP vip = obj as OutboundNatVirtualIP; + if (vip == null) + { + return false; + } + + return this == vip; + } + + public static bool operator ==(OutboundNatVirtualIP left, OutboundNatVirtualIP right) + { + if (Object.ReferenceEquals(left, right)) + { + return true; + } + + if ((object)left == null && (object)right == null) + { + return true; + } + + if ((object)left == null || (object)right == null) + { + return false; + } + + return string.Equals(left.Address, right.Address, StringComparison.OrdinalIgnoreCase) && + string.Equals(left.Name, right.Name, StringComparison.OrdinalIgnoreCase); + } + + public static bool operator !=(OutboundNatVirtualIP left, OutboundNatVirtualIP right) + { + return !(left == right); + } + + public override int GetHashCode() + { + return this.Address.GetHashCode(); + } + #endregion + } + + [CollectionDataContract(Name = "OutboundNatVirtualIPs", ItemName = "OutboundNatVirtualIP", Namespace = Constants.ServiceManagementNS)] + public class OutboundNatVirtualIPList : List + { + public OutboundNatVirtualIPList() + { + + } + + public OutboundNatVirtualIPList(IEnumerable ips) + : base(ips) + { + + } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class OutboundNatVirtualIPGroup : IExtensibleDataObject + { + [DataMember(Order = 1, EmitDefaultValue = false)] + public string VipGroupName { get; set; } + + [DataMember(Order = 2, EmitDefaultValue = false)] + public OutboundNatVirtualIPList OutboundNatVirtualIPs { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [CollectionDataContract(Name = "OutboundNatVirtualIPGroups", ItemName = "OutboundNatVirtualIPGroup", Namespace = Constants.ServiceManagementNS)] + public class OutboundNatVirtualIPGroups : List + { + public OutboundNatVirtualIPGroups() + { + } + + public OutboundNatVirtualIPGroups(IEnumerable groups) + : base(groups) + { + } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class PersistentVMDowntimeInfo : IExtensibleDataObject + { + [DataMember(Order = 1, EmitDefaultValue = false)] + public DateTime? StartTime { get; set; } + + [DataMember(Order = 2, EmitDefaultValue = false)] + public DateTime? EndTime { get; set; } + + [DataMember(Order = 3, EmitDefaultValue = false)] + public string Status { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [CollectionDataContract(Name = "RoleList", ItemName = "Role", Namespace = Constants.ServiceManagementNS)] + public class RoleList : List + { + public RoleList() + { + } + + public RoleList(IEnumerable roles) + : base(roles) + { + } + } + + [CollectionDataContract(Name = "InputEndpointList", ItemName = "InputEndpoint", Namespace = Constants.ServiceManagementNS)] + public class DeploymentInputEndpointList : List + { + public DeploymentInputEndpointList() + { + } + + public DeploymentInputEndpointList(IEnumerable endpoints) + : base(endpoints) + { + } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class DeploymentInputEndpoint : IExtensibleDataObject + { + [DataMember(Order = 1)] + public string RoleName { get; set; } + + [DataMember(Order = 2)] + public string Vip { get; set; } + + [DataMember(Order = 3)] + public int Port { get; set; } + + [DataMember(Order = 4)] + public int? IdleTimeoutInMinutes { get; set; } + + [DataMember(Order = 5)] + public string LoadBalancerDistribution { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [CollectionDataContract(Name = "RoleInstanceList", ItemName = "RoleInstance", Namespace = Constants.ServiceManagementNS)] + public class RoleInstanceList : List + { + public RoleInstanceList() + { + } + + public RoleInstanceList(IEnumerable roles) + : base(roles) + { + } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class RoleInstance : IExtensibleDataObject + { + [DataMember(Order = 1)] + public string RoleName { get; set; } + + [DataMember(Order = 2)] + public string InstanceName { get; set; } + + [DataMember(Order = 3)] + public string InstanceStatus { get; set; } + + [DataMember(Order = 4, EmitDefaultValue = false)] + public int? InstanceUpgradeDomain { get; set; } + + [DataMember(Order = 5, EmitDefaultValue = false)] + public int? InstanceFaultDomain { get; set; } + + [DataMember(Order = 6, EmitDefaultValue = false)] + public string InstanceSize { get; set; } + + [DataMember(Order = 7, EmitDefaultValue = false)] + public string InstanceStateDetails { get; set; } + + [DataMember(Order = 8, EmitDefaultValue = false)] + public string InstanceErrorCode { get; set; } + + [DataMember(Order = 10, EmitDefaultValue = false)] + public string IpAddress { get; set; } + + [DataMember(Order = 11, EmitDefaultValue = false)] + public InstanceEndpointList InstanceEndpoints { get; set; } + + [DataMember(Order = 12, EmitDefaultValue = false)] + public string PowerState { get; set; } + + [DataMember(Order = 13, EmitDefaultValue = false)] + public string HostName { get; set; } + + [DataMember(Order = 14, EmitDefaultValue = false)] + public string RemoteAccessCertificateThumbprint { get; set; } + + // Order 15 is purposely skipped due to a property being removed before being published. + + [DataMember(Order = 16, EmitDefaultValue = false)] + public GuestAgentStatus GuestAgentStatus { get; set; } + + [DataMember(Order = 17, EmitDefaultValue = false)] + public ResourceExtensionStatusList ResourceExtensionStatusList { get; set; } + + [DataMember(Order = 18, EmitDefaultValue = false)] + public string ExtendedInstanceStatus { get; set; } + + [DataMember(Order = 19, EmitDefaultValue = false)] + public PublicIPList PublicIPs { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [CollectionDataContract(Name = "RoleInstances", ItemName = "Name", Namespace = Constants.ServiceManagementNS)] + public class RoleInstanceNamesCollection : Collection { } + + [DataContract(Name = "CreateDeployment", Namespace = Constants.ServiceManagementNS)] + public class CreateDeploymentInput : IExtensibleDataObject + { + [DataMember(Order = 1)] + public string Name { get; set; } + + [DataMember(Order = 2)] + public Uri PackageUrl { get; set; } + + [DataMember(Order = 3, Name = "Label")] + private string _base64EncodedLabel { get; set; } + + public string Label + { + get + { + string decodedLabel; + if (!StringEncoder.TryDecodeFromBase64String(this._base64EncodedLabel, out decodedLabel)) + { + throw new InvalidOperationException(Resources.UnableToDecodeBase64String); + } + return decodedLabel; + } + set + { + this._base64EncodedLabel = StringEncoder.EncodeToBase64String(value); + } + } + + [DataMember(Order = 4, Name = "Configuration")] + private string _base64EncodedConfiguration { get; set; } + + public string Configuration + { + get + { + string decodedConfiguration; + if (!StringEncoder.TryDecodeFromBase64String(this._base64EncodedConfiguration, out decodedConfiguration)) + { + throw new InvalidOperationException(Resources.UnableToDecodeBase64String); + } + return decodedConfiguration; + } + set + { + this._base64EncodedConfiguration = StringEncoder.EncodeToBase64String(value); + } + } + + [DataMember(Order = 5, EmitDefaultValue = false)] + public bool? StartDeployment { get; set; } + + [DataMember(Order = 6, EmitDefaultValue = false)] + public bool? TreatWarningsAsError { get; set; } + + [DataMember(Order = 7, EmitDefaultValue = false)] + public ExtendedPropertiesList ExtendedProperties { get; set; } + + [DataMember(Order = 8, EmitDefaultValue = false)] + public ExtensionConfiguration ExtensionConfiguration { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [DataContract(Name = "ChangeConfiguration", Namespace = Constants.ServiceManagementNS)] + public class ChangeConfigurationInput : IExtensibleDataObject + { + [DataMember(Order = 1, Name = "Configuration")] + private string _base64EncodedConfiguration { get; set; } + + public string Configuration + { + get + { + string decodedConfiguration; + if (!StringEncoder.TryDecodeFromBase64String(this._base64EncodedConfiguration, out decodedConfiguration)) + { + throw new InvalidOperationException(Resources.UnableToDecodeBase64String); + } + return decodedConfiguration; + } + set + { + this._base64EncodedConfiguration = StringEncoder.EncodeToBase64String(value); + } + } + + [DataMember(Order = 2, EmitDefaultValue = false)] + public bool? TreatWarningsAsError { get; set; } + + [DataMember(Order = 3, EmitDefaultValue = false)] + public string Mode { get; set; } + + [DataMember(Order = 4, EmitDefaultValue = false)] + public ExtendedPropertiesList ExtendedProperties { get; set; } + + [DataMember(Order = 5, EmitDefaultValue = false)] + public ExtensionConfiguration ExtensionConfiguration { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [DataContract(Name = "UpdateDeploymentStatus", Namespace = Constants.ServiceManagementNS)] + public class UpdateDeploymentStatusInput : IExtensibleDataObject + { + [DataMember(Order = 1)] + public string Status { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [DataContract(Name = "UpgradeDeployment", Namespace = Constants.ServiceManagementNS)] + public class UpgradeDeploymentInput : IExtensibleDataObject + { + [DataMember(Order = 1)] + public string Mode { get; set; } + + [DataMember(Order = 2)] + public Uri PackageUrl { get; set; } + + [DataMember(Order = 3, Name = "Configuration")] + private string _base64EncodedConfiguration { get; set; } + + public string Configuration + { + get + { + string decodedConfiguration; + if (!StringEncoder.TryDecodeFromBase64String(this._base64EncodedConfiguration, out decodedConfiguration)) + { + throw new InvalidOperationException(Resources.UnableToDecodeBase64String); + } + return decodedConfiguration; + } + set + { + this._base64EncodedConfiguration = StringEncoder.EncodeToBase64String(value); + } + } + + [DataMember(Order = 4, Name = "Label")] + private string _base64EncodedLabel { get; set; } + + public string Label + { + get + { + string decodedLabel; + if (!StringEncoder.TryDecodeFromBase64String(this._base64EncodedLabel, out decodedLabel)) + { + throw new InvalidOperationException(Resources.UnableToDecodeBase64String); + } + return decodedLabel; + } + set + { + this._base64EncodedLabel = StringEncoder.EncodeToBase64String(value); + } + } + + [DataMember(Order = 5)] + public string RoleToUpgrade { get; set; } + + [DataMember(Order = 6, EmitDefaultValue = false)] + public bool? TreatWarningsAsError { get; set; } + + [DataMember(Order = 7, EmitDefaultValue = false)] + public bool? Force { get; set; } + + [DataMember(Order = 8, EmitDefaultValue = false)] + public ExtendedPropertiesList ExtendedProperties { get; set; } + + [DataMember(Order = 9, EmitDefaultValue = false)] + public ExtensionConfiguration ExtensionConfiguration { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [DataContract(Name = "WalkUpgradeDomain", Namespace = Constants.ServiceManagementNS)] + public class WalkUpgradeDomainInput : IExtensibleDataObject + { + [DataMember(Order = 1)] + public int UpgradeDomain { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class UpgradeStatus : IExtensibleDataObject + { + [DataMember(Order = 1)] + public string UpgradeType { get; set; } + + [DataMember(Order = 2)] + public string CurrentUpgradeDomainState { get; set; } + + [DataMember(Order = 3)] + public int CurrentUpgradeDomain { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [DataContract(Name = "RollbackUpdateOrUpgrade", Namespace = Constants.ServiceManagementNS)] + public class RollbackUpdateOrUpgradeInput : IExtensibleDataObject + { + [DataMember(Order = 1)] + public string Mode { get; set; } + + [DataMember(Order = 2, EmitDefaultValue = false)] + public bool? Force { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + + #region Extension related classes + /// + /// Extension used in deployment APIs + /// + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class Extension : IExtensibleDataObject + { + public Extension(string id, int seqNo, string state) + { + Id = id; + SequenceNumber = seqNo; + State = state; + } + + [DataMember(Order = 1)] + public string Id { get; set; } + + [DataMember(Order = 2, EmitDefaultValue = false)] + public int SequenceNumber { get; set; } + + [DataMember(Order = 3)] + public string State { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + /// + /// Extension List used in deployment APIs + /// + [CollectionDataContract(Name = "Extensions", ItemName = "Extension", Namespace = Constants.ServiceManagementNS)] + public class ExtensionList : List + { + public ExtensionList() + { + } + public ExtensionList(IEnumerable list) + : base(list) + { + } + } + + /// + /// Extension Setting used in deployment APIs + /// + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class RoleExtensions : IExtensibleDataObject + { + /// + /// Name of the role + /// + [DataMember(Order = 1)] + public string RoleName; + + /// + /// List of extension Ids + /// + [DataMember(Order = 2)] + public ExtensionList Extensions; + + public ExtensionDataObject ExtensionData { get; set; } + } + + /// + /// A default Extension List used in deployment APIs + /// + [CollectionDataContract(Name = "AllRoles", ItemName = "Extension", Namespace = Constants.ServiceManagementNS)] + public class AllRoles : List + { + public AllRoles() + { + } + public AllRoles(IEnumerable list) + : base(list) + { + } + } + + /// + /// Extension Setting List used in deployment APIs to override extensions specified in AllRoles + /// + [CollectionDataContract(Name = "NamedRoles", ItemName = "Role", Namespace = Constants.ServiceManagementNS)] + public class NamedRoles : List + { + public NamedRoles() + { + } + public NamedRoles(IEnumerable list) + : base(list) + { + } + } + + /// + /// Extension Setting List used in deployment APIs + /// + [DataContract(Name = "ExtensionConfiguration", Namespace = Constants.ServiceManagementNS)] + public class ExtensionConfiguration : IExtensibleDataObject + { + [DataMember(EmitDefaultValue = false, Order = 1)] + public AllRoles AllRoles; + + [DataMember(EmitDefaultValue = false, Order = 2)] + public NamedRoles NamedRoles; + + public ExtensionDataObject ExtensionData { get; set; } + } + #endregion + + + [CollectionDataContract(Name = "Certificates", ItemName = "Certificate", Namespace = Constants.ServiceManagementNS)] + public class CertificateList : List + { + public CertificateList() + { + } + + public CertificateList(IEnumerable certificateList) + : base(certificateList) + { + } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class Certificate : IExtensibleDataObject + { + [DataMember(Order = 1, EmitDefaultValue = false)] + public Uri CertificateUrl; + + [DataMember(Order = 2, EmitDefaultValue = false)] + public string Thumbprint; + + [DataMember(Order = 3, EmitDefaultValue = false)] + public string ThumbprintAlgorithm; + + [DataMember(Order = 4, EmitDefaultValue = false)] + public string Data; + + public ExtensionDataObject ExtensionData { get; set; } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class Disk : IExtensibleDataObject + { + [DataMember(EmitDefaultValue = false, Order = 0)] + public string AffinityGroup + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 1)] + public RoleReference AttachedTo + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public string OS + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 3)] + public bool IsCorrupted + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 4)] + public string Label + { + get; + set; + } + + + [DataMember(EmitDefaultValue = false, Order = 5)] + public string Location + { + get; + set; + } + + + [DataMember(EmitDefaultValue = false, Order = 6)] + public int LogicalDiskSizeInGB + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 7)] + public Uri MediaLink + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 8)] + public string Name + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 9)] + public string SourceImageName + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 10, Name = "CreatedTime")] + private string _isoCreatedTimeString { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 11)] + public Uri RemoteSourceImageLink + { + get; + set; + } + + public DateTime CreatedTime + { + get + { + return (string.IsNullOrEmpty(this._isoCreatedTimeString) ? DateTime.MinValue : DateTime.Parse(this._isoCreatedTimeString)); + } + set + { + if (value.Equals(DateTime.MinValue)) + { + this._isoCreatedTimeString = null; + } + else + { + this._isoCreatedTimeString = value.ToString(Constants.StandardTimeFormat); + } + } + } + + #region IExtensibleDataObject Members + public ExtensionDataObject ExtensionData { get; set; } + #endregion + } + + [CollectionDataContract(Name = "Disks", ItemName = "Disk", Namespace = Constants.ServiceManagementNS)] + public class DiskList : Collection + { + + } + + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class ReplicationInput : IExtensibleDataObject + { + [DataMember(Order = 0, EmitDefaultValue = false)] + public RegionList TargetLocations { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [CollectionDataContract(Name = "Regions", ItemName = "Region", Namespace = Constants.ServiceManagementNS)] + public class RegionList : List + { + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class OSImage : IExtensibleDataObject + { + [DataMember(EmitDefaultValue = false, Order = 0)] + public string AffinityGroup + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 1)] + public string Category + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public string Label + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 3)] + public string Location + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 4)] + public int LogicalSizeInGB + { + get; + set; + } + + + [DataMember(EmitDefaultValue = false, Order = 5)] + public Uri MediaLink + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 6)] + public string Name + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 7)] + public string OS + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 8)] + public string Eula + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 9)] + public string Description + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 10)] + public string ImageFamily + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 11)] + public bool? ShowInGui + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 12)] + public DateTime? PublishedDate + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 13)] + public bool? IsPremium + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 14)] + public Uri IconUri + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 15)] + public Uri PrivacyUri + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 16)] + public string RecommendedVMSize + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 17)] + public string PublisherName + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 18)] + public Uri SmallIconUri + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 19)] + public string Language + { + get; + set; + } + + #region IExtensibleDataObject Members + public ExtensionDataObject ExtensionData { get; set; } + #endregion + } + + [CollectionDataContract(Name = "Images", ItemName = "OSImage", Namespace = Constants.ServiceManagementNS)] + public class OSImageList : Collection + { + + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class RoleReference : IExtensibleDataObject + { + [DataMember(EmitDefaultValue = false, Order = 0)] + public string DeploymentName + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 1)] + public string HostedServiceName + { + get; + set; + } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public string RoleName + { + get; + set; + } + + public override bool Equals(object obj) + { + RoleReference other = obj as RoleReference; + + if (other != null) + { + return string.Equals(other.HostedServiceName, this.HostedServiceName, StringComparison.OrdinalIgnoreCase) && string.Equals(other.DeploymentName, this.DeploymentName, StringComparison.OrdinalIgnoreCase) && + string.Equals(other.RoleName, this.RoleName, StringComparison.OrdinalIgnoreCase); + } + return false; + } + + public override int GetHashCode() + { + string hashString = string.Format("{0}-{1}-{2}", this.HostedServiceName, this.DeploymentName, this.RoleName); + return StringComparer.OrdinalIgnoreCase.GetHashCode(hashString); + } + + #region IExtensibleDataObject Members + public ExtensionDataObject ExtensionData { get; set; } + #endregion + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public enum OSType + { + [EnumMember] + Linux = 0, + [EnumMember] + Windows = 1 + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class OSImageDetails : OSImage + { + [DataMember(EmitDefaultValue = false, Order = 90)] + public bool IsCorrupted { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 100)] + public ReplicationProgressList ReplicationProgress { get; set; } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class ReplicationProgressElement : IExtensibleDataObject + { + [DataMember(EmitDefaultValue = false, Order = 1)] + public string Location { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public string Progress { get; set; } + + #region IExtensibleDataObject Members + public ExtensionDataObject ExtensionData { get; set; } + #endregion + + } + + [CollectionDataContract(Name = "ReplicationProgressList", ItemName = "ReplicationProgressElement", Namespace = Constants.ServiceManagementNS)] + public class ReplicationProgressList : Collection + { + + } + + + + [CollectionDataContract(Name = "ExtensionImages", ItemName = "ExtensionImage", Namespace = Constants.ServiceManagementNS)] + public class ExtensionImageList : List + { + public ExtensionImageList() + { + } + + public ExtensionImageList(IEnumerable extensions) + : base(extensions) + { + } + } + + [DataContract(Namespace = Constants.ServiceManagementNS, Name = "ExtensionImage")] + public class ExtensionImage : IExtensibleDataObject + { + [DataMember(EmitDefaultValue = false, Order = 1)] + public string ProviderNameSpace { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public string Type { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 3)] + public string Version { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 4)] + public string Label { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 5)] + public string Description { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 6)] + public string HostingResources { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 7)] + public string ThumbprintAlgorithm { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 8, Name = "PublicConfigurationSchema")] + private string _base64EncodedPublicConfigurationSchema { get; set; } + + public string PublicConfigurationSchema + { + get + { + string decodedConfiguration; + if (!StringEncoder.TryDecodeFromBase64String(this._base64EncodedPublicConfigurationSchema, out decodedConfiguration)) + { + throw new InvalidOperationException(Resources.UnableToDecodeBase64String); + } + return decodedConfiguration; + } + set + { + this._base64EncodedPublicConfigurationSchema = StringEncoder.EncodeToBase64String(value); + } + } + + [DataMember(EmitDefaultValue = false, Order = 9, Name = "PrivateConfigurationSchema")] + private string _base64EncodedPrivateConfigurationSchema { get; set; } + + public string PrivateConfigurationSchema + { + get + { + string decodedConfiguration; + if (!StringEncoder.TryDecodeFromBase64String(this._base64EncodedPrivateConfigurationSchema, out decodedConfiguration)) + { + throw new InvalidOperationException(Resources.UnableToDecodeBase64String); + } + return decodedConfiguration; + } + set + { + this._base64EncodedPrivateConfigurationSchema = StringEncoder.EncodeToBase64String(value); + } + } + + [DataMember(EmitDefaultValue = false, Order = 10)] + public bool? BlockRoleUponFailure { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 11)] + public string SampleConfig { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 12)] + public bool? ReplicationCompleted { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 13)] + public Uri Eula { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 14)] + public Uri PrivacyUri { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 15)] + public Uri HomepageUri { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 16)] + public bool IsJsonExtension { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 17)] + public bool IsInternalExtension { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 18)] + public string SupportedOS { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 19)] + public string CompanyName { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 20)] + public DateTime? PublishedDate { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + /// + /// This encapsulates the input for RegisterExtension and UpdateExtension Operation. + /// + [DataContract(Namespace = Constants.ServiceManagementNS, Name = "ExtensionImage")] + public class ExtensionImageInput : IExtensibleDataObject + { + [DataMember(EmitDefaultValue = false, Order = 0)] + public string ProviderNameSpace { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 1)] + public string Type { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public string Version { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 3)] + public string Label { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 4)] + public string HostingResources { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 5)] + public Uri MediaLink { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 6)] + public ExtensionCertificate Certificate { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 7)] + public ExtensionEndpoints Endpoints { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 8, Name = "PublicConfigurationSchema")] + private string _base64EncodedPublicConfigurationSchema { get; set; } + + public string PublicConfigurationSchema + { + get + { + string decodedConfiguration; + if (!StringEncoder.TryDecodeFromBase64String(this._base64EncodedPublicConfigurationSchema, out decodedConfiguration)) + { + throw new InvalidOperationException(Resources.UnableToDecodeBase64String); + } + return decodedConfiguration; + } + set + { + this._base64EncodedPublicConfigurationSchema = StringEncoder.EncodeToBase64String(value); + } + } + + [DataMember(EmitDefaultValue = false, Order = 9, Name = "PrivateConfigurationSchema")] + private string _base64EncodedPrivateConfigurationSchema { get; set; } + + public string PrivateConfigurationSchema + { + get + { + string decodedConfiguration; + if (!StringEncoder.TryDecodeFromBase64String(this._base64EncodedPrivateConfigurationSchema, out decodedConfiguration)) + { + throw new InvalidOperationException(Resources.UnableToDecodeBase64String); + } + return decodedConfiguration; + } + set + { + this._base64EncodedPrivateConfigurationSchema = StringEncoder.EncodeToBase64String(value); + } + } + + [DataMember(EmitDefaultValue = false, Order = 10)] + public string Description { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 11)] + public string PublisherName { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 12)] + public DateTime? PublishedDate { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 13)] + public ExtensionImageLocalResourceList LocalResources { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 14)] + public bool? BlockRoleUponFailure { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 15)] + public bool IsInternalExtension { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 16)] + public string SampleConfig { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 17)] + public Uri Eula { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 18)] + public Uri PrivacyUri { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 19)] + public Uri HomepageUri { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 20)] + public bool IsJsonExtension { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 21)] + public bool DisallowMajorVersionUpgrade { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 22)] + public string SupportedOS { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 23)] + public string CompanyName { get; set; } + + #region IExtensibleDataObject Members + ExtensionDataObject IExtensibleDataObject.ExtensionData { get; set; } + #endregion + } + + /// + /// This represents the certificate used in ExtensionImage. + /// + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class ExtensionCertificate + { + public ExtensionCertificate(string storeLocation, string storeName, bool thumbprintRequired, string thumbprintAlgorithm) + { + this.StoreLocation = storeLocation; + this.StoreName = storeName; + this.ThumbprintRequired = thumbprintRequired; + this.ThumbprintAlgorithm = thumbprintAlgorithm; + } + + [DataMember(EmitDefaultValue = false, Order = 1)] + public string StoreLocation { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public string StoreName { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 3)] + public bool ThumbprintRequired { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 4)] + public string ThumbprintAlgorithm { get; set; } + } + + /// + /// This represents the endpoint used in ExtensionImage. + /// + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class ExtensionEndpoints + { + [DataMember(EmitDefaultValue = false, Order = 1)] + public ExtensionInputEndpointList InputEndpoints { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public ExtensionInternalEndpointList InternalEndpoints { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 3)] + public ExtensionInstanceInputEndpointList InstanceInputEndpoints { get; set; } + } + + /// + /// This represents a list of input endpoints used in ExtensionEndpoint. + /// + [CollectionDataContract(Name = "InputEndpoints", ItemName = "InputEndpoint", Namespace = Constants.ServiceManagementNS)] + public class ExtensionInputEndpointList : List + { + public ExtensionInputEndpointList() + { + } + + public ExtensionInputEndpointList(IEnumerable inputEndpoints) + : base(inputEndpoints) + { + } + } + + /// + /// This represents the input endpoint used in add extension image. + /// + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class ExtensionInputEndpoint + { + [DataMember(EmitDefaultValue = false, Order = 1)] + public string Name { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public string Protocol { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 3)] + public string Port { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 4)] + public string LocalPort { get; set; } + } + + /// + /// This represents a list of internal endpoints used in ExtensionEndpoint. + /// + [CollectionDataContract(Name = "InternalEndpoints", ItemName = "InternalEndpoint", Namespace = Constants.ServiceManagementNS)] + public class ExtensionInternalEndpointList : List + { + public ExtensionInternalEndpointList() + { + } + + public ExtensionInternalEndpointList(IEnumerable internalEndpoints) + : base(internalEndpoints) + { + } + } + + /// + /// This represents the internal endpoint used in add extension image. + /// + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class ExtensionInternalEndpoint + { + [DataMember(EmitDefaultValue = false, Order = 1)] + public string Name { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public string Protocol { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 3)] + public string Port { get; set; } + } + + /// + /// This represents a list of instance input endpoints used in ExtensionEndpoint. + /// + [CollectionDataContract(Name = "InstanceInputEndpoints", ItemName = "InstanceInputEndpoint", Namespace = Constants.ServiceManagementNS)] + public class ExtensionInstanceInputEndpointList : List + { + public ExtensionInstanceInputEndpointList() + { + } + + public ExtensionInstanceInputEndpointList(IEnumerable instanceInputEndpoints) + : base(instanceInputEndpoints) + { + } + } + + /// + /// This represents the instance input endpoint used in add extension image. + /// + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class ExtensionInstanceInputEndpoint + { + [DataMember(EmitDefaultValue = false, Order = 1)] + public string Name { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public string Protocol { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 3)] + public string LocalPort { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 4)] + public string FixedPortMin { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 5)] + public string FixedPortMax { get; set; } + } + + /// + /// This represents a list of local resources used in extension image. + /// + [CollectionDataContract(Name = "LocalResources", ItemName = "LocalResource", Namespace = Constants.ServiceManagementNS)] + public class ExtensionImageLocalResourceList : List + { + public ExtensionImageLocalResourceList() + { + } + + public ExtensionImageLocalResourceList(IEnumerable resources) + : base(resources) + { + } + } + + /// + /// This represents the local resource used in extension image. + /// + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class ExtensionImageLocalResource + { + [DataMember(EmitDefaultValue = false, Order = 1)] + public string Name { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public int? SizeInMB { get; set; } + } + + [CollectionDataContract(Name = "ResourceExtensions", ItemName = "ResourceExtension", Namespace = Constants.ServiceManagementNS)] + public class ResourceExtensionList : List + { + public ResourceExtensionList() + { + } + + public ResourceExtensionList(IEnumerable extensions) + : base(extensions) + { + } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class ResourceExtension : IExtensibleDataObject + { + [DataMember(EmitDefaultValue = false, Order = 1)] + public string Publisher { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public string Name { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 3)] + public string Version { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 4)] + public string Label { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 5)] + public string Description { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 6, Name = "PublicConfigurationSchema")] + private string base64EncodedPublicConfigurationSchema { get; set; } + + public string PublicConfigurationSchema + { + get + { + string decodedConfiguration; + if (!StringEncoder.TryDecodeFromBase64String(this.base64EncodedPublicConfigurationSchema, out decodedConfiguration)) + { + throw new InvalidOperationException(Resources.UnableToDecodeBase64String); + } + return decodedConfiguration; + } + set + { + this.base64EncodedPublicConfigurationSchema = StringEncoder.EncodeToBase64String(value); + } + } + + [DataMember(EmitDefaultValue = false, Order = 7, Name = "PrivateConfigurationSchema")] + private string base64EncodedPrivateConfigurationSchema { get; set; } + + public string PrivateConfigurationSchema + { + get + { + string decodedConfiguration; + if (!StringEncoder.TryDecodeFromBase64String(this.base64EncodedPrivateConfigurationSchema, out decodedConfiguration)) + { + throw new InvalidOperationException(Resources.UnableToDecodeBase64String); + } + return decodedConfiguration; + } + set + { + this.base64EncodedPrivateConfigurationSchema = StringEncoder.EncodeToBase64String(value); + } + } + + [DataMember(EmitDefaultValue = false, Order = 8, Name = "SampleConfig")] + private string base64EncodedSampleConfig { get; set; } + + public string SampleConfig + { + get + { + string decodedSampleConfig; + if (!StringEncoder.TryDecodeFromBase64String(this.base64EncodedSampleConfig, out decodedSampleConfig)) + { + throw new InvalidOperationException(Resources.UnableToDecodeBase64String); + } + return decodedSampleConfig; + } + set + { + this.base64EncodedSampleConfig = StringEncoder.EncodeToBase64String(value); + } + } + + [DataMember(EmitDefaultValue = false, Order = 9)] + public bool? ReplicationCompleted { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 10)] + public Uri Eula { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 11)] + public Uri PrivacyUri { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 12)] + public Uri HomepageUri { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 13)] + public bool IsJsonExtension { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 14)] + public bool IsInternalExtension { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 15)] + public bool DisallowMajorVersionUpgrade { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 16)] + public string SupportedOS { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 17)] + public string CompanyName { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 18)] + public DateTime? PublishedDate { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + /// + /// This represents the a extension object used in ListHostedServiceExtension operation. + /// + [DataContract(Namespace = Constants.ServiceManagementNS, Name = "Extension")] + public class HostedServiceExtension : IExtensibleDataObject + { + [DataMember(EmitDefaultValue = false, Order = 1)] + public string ProviderNameSpace { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public string Type { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 3)] + public string Id { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 4)] + public string Version { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 5)] + public string Thumbprint { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 6)] + public string ThumbprintAlgorithm { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 7, Name = "PublicConfiguration")] + private string _base64EncodedPublicConfiguration { get; set; } + + public string PublicConfiguration + { + get + { + string decodedConfiguration; + if (!StringEncoder.TryDecodeFromBase64String(this._base64EncodedPublicConfiguration, out decodedConfiguration)) + { + throw new InvalidOperationException(Resources.UnableToDecodeBase64String); + } + return decodedConfiguration; + } + set + { + this._base64EncodedPublicConfiguration = StringEncoder.EncodeToBase64String(value); + } + } + + [DataMember(EmitDefaultValue = false, Order = 9)] + public bool IsJsonExtension { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 10)] + public bool DisallowMajorVersionUpgrade { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + /// + /// This represents the input of AddHostedServiceExtension operation. + /// + [DataContract(Namespace = Constants.ServiceManagementNS, Name = "Extension")] + public class HostedServiceExtensionInput : IExtensibleDataObject + { + [DataMember(EmitDefaultValue = false, Order = 1)] + public string ProviderNameSpace { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public string Type { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 3)] + public string Id { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 4)] + public string Thumbprint { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 5)] + public string ThumbprintAlgorithm { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 6, Name = "PublicConfiguration")] + private string _base64EncodedPublicConfiguration { get; set; } + + public string PublicConfiguration + { + get + { + string decodedConfiguration; + if (!StringEncoder.TryDecodeFromBase64String(this._base64EncodedPublicConfiguration, out decodedConfiguration)) + { + throw new InvalidOperationException(Resources.UnableToDecodeBase64String); + } + return decodedConfiguration; + } + set + { + this._base64EncodedPublicConfiguration = StringEncoder.EncodeToBase64String(value); + } + } + + [DataMember(EmitDefaultValue = false, Order = 7, Name = "PrivateConfiguration")] + private string _base64EncodedPrivateConfiguration { get; set; } + + public string PrivateConfiguration + { + get + { + string decodedConfiguration; + if (!StringEncoder.TryDecodeFromBase64String(this._base64EncodedPrivateConfiguration, out decodedConfiguration)) + { + throw new InvalidOperationException(Resources.UnableToDecodeBase64String); + } + return decodedConfiguration; + } + set + { + this._base64EncodedPrivateConfiguration = StringEncoder.EncodeToBase64String(value); + } + } + + [DataMember(EmitDefaultValue = false, Order = 8)] + public string Version { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [CollectionDataContract(Namespace = Constants.ServiceManagementNS, Name = "Extensions", ItemName = "Extension")] + public class HostedServiceExtensionList : List + { + public HostedServiceExtensionList() { } + + public HostedServiceExtensionList(IEnumerable extensions) + : base(extensions) + { + } + } + + + [CollectionDataContract(Name = "OperatingSystemFamilies", ItemName = "OperatingSystemFamily", Namespace = Constants.ServiceManagementNS)] + public class OperatingSystemFamilyList : List + { + public OperatingSystemFamilyList() + { + } + + public OperatingSystemFamilyList(IEnumerable operatingSystemFamilies) + : base(operatingSystemFamilies) + { + } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class OperatingSystemFamily : IExtensibleDataObject + { + [DataMember(Order = 1)] + public string Name { get; set; } + + [DataMember(Order = 2, EmitDefaultValue = false, Name = "Label")] + private string _base64EncodedLabel { get; set; } + + public string Label + { + get + { + string decodedLabel; + if (!StringEncoder.TryDecodeFromBase64String(this._base64EncodedLabel, out decodedLabel)) + { + throw new InvalidOperationException(Resources.UnableToDecodeBase64String); + } + return decodedLabel; + } + set + { + this._base64EncodedLabel = StringEncoder.EncodeToBase64String(value); + } + } + + [DataMember(Order = 3)] + public OperatingSystemList OperatingSystems { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [CollectionDataContract(Name = "OperatingSystems", ItemName = "OperatingSystem", Namespace = Constants.ServiceManagementNS)] + public class OperatingSystemList : List + { + public OperatingSystemList() + { + } + + public OperatingSystemList(IEnumerable operatingSystems) + : base(operatingSystems) + { + } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class OperatingSystem : IExtensibleDataObject + { + [DataMember(Order = 1)] + public string Version { get; set; } + + [DataMember(Order = 2, EmitDefaultValue = false, Name = "Label")] + private string _base64EncodedLabel { get; set; } + + public string Label + { + get + { + string decodedLabel; + if (!StringEncoder.TryDecodeFromBase64String(this._base64EncodedLabel, out decodedLabel)) + { + throw new InvalidOperationException(Resources.UnableToDecodeBase64String); + } + return decodedLabel; + } + set + { + this._base64EncodedLabel = StringEncoder.EncodeToBase64String(value); + } + } + + [DataMember(Order = 3)] + public bool IsDefault { get; set; } + + [DataMember(Order = 4)] + public bool IsActive { get; set; } + + [DataMember(Order = 5, EmitDefaultValue = false)] + public string Family { get; set; } + + [DataMember(Order = 6, EmitDefaultValue = false, Name = "FamilyLabel")] + private string _base64EncodedFamilyLabel { get; set; } + + public string FamilyLabel + { + get + { + string decodedFamilyLabel; + if (!StringEncoder.TryDecodeFromBase64String(this._base64EncodedFamilyLabel, out decodedFamilyLabel)) + { + throw new InvalidOperationException(Resources.UnableToDecodeBase64String); + } + return decodedFamilyLabel; + } + set + { + this._base64EncodedFamilyLabel = StringEncoder.EncodeToBase64String(value); + } + } + + public ExtensionDataObject ExtensionData { get; set; } + } + + + [CollectionDataContract(Name = "SubscriptionCertificates", ItemName = "SubscriptionCertificate", Namespace = Constants.ServiceManagementNS)] + public class SubscriptionCertificateList : List + { + public SubscriptionCertificateList() + { + } + + public SubscriptionCertificateList(IEnumerable Certificates) + : base(Certificates) + { + } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class SubscriptionCertificate : IExtensibleDataObject + { + [DataMember(EmitDefaultValue = false, Order = 0)] + public string SubscriptionCertificatePublicKey { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 1)] + public string SubscriptionCertificateThumbprint { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public string SubscriptionCertificateData { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 3)] + public DateTime Created { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class SubscriptionOperationCollection : IExtensibleDataObject + { + [DataMember(Order = 0)] + public SubscriptionOperationList SubscriptionOperations { get; set; } + + [DataMember(Order = 1, EmitDefaultValue = false)] + public string ContinuationToken { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [CollectionDataContract(Namespace = Constants.ServiceManagementNS, Name = "SubscriptionOperations", ItemName = "SubscriptionOperation")] + public class SubscriptionOperationList : List, IExtensibleDataObject + { + public ExtensionDataObject ExtensionData { get; set; } + + public SubscriptionOperationList() + { + } + + public SubscriptionOperationList(IEnumerable subscriptions) + : base(subscriptions) + { + } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class SubscriptionOperationCaller : IExtensibleDataObject + { + [DataMember(Order = 0)] + public bool UsedServiceManagementApi { get; set; } + + [DataMember(Order = 1, EmitDefaultValue = false)] + public string UserEmailAddress { get; set; } + + [DataMember(Order = 2, EmitDefaultValue = false)] + public string SubscriptionCertificateThumbprint { get; set; } + + [DataMember(Order = 3, EmitDefaultValue = false)] + public string ClientIP { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [CollectionDataContract(Namespace = Constants.ServiceManagementNS, Name = "OperationParameters", ItemName = "OperationParameter")] + public class OperationParameterList : List, IExtensibleDataObject + { + public ExtensionDataObject ExtensionData { get; set; } + + public OperationParameterList() + { + } + + public OperationParameterList(IEnumerable operations) + : base(operations) + { + } + } + + [DataContract] + public class OperationParameter : IExtensibleDataObject + { + [DataMember(Order = 0)] + public string Name { get; set; } + + [DataMember(Order = 1)] + private string Value { get; set; } + + private static readonly ReadOnlyCollection KnownTypes = new ReadOnlyCollection(new[] { + typeof(CreateAffinityGroupInput), + typeof(UpdateAffinityGroupInput), + typeof(CertificateFile), + typeof(ChangeConfigurationInput), + typeof(CreateDeploymentInput), + typeof(CreateHostedServiceInput), + typeof(CreateStorageServiceInput), + typeof(RegenerateKeys), + typeof(StorageDomain), + typeof(SubscriptionCertificate), + typeof(SwapDeploymentInput), + typeof(UpdateDeploymentStatusInput), + typeof(UpdateHostedServiceInput), + typeof(UpdateStorageServiceInput), + typeof(UpgradeDeploymentInput), + typeof(WalkUpgradeDomainInput), + typeof(CaptureRoleOperation), + typeof(ShutdownRoleOperation), + typeof(StartRoleOperation), + //typeof(CaptureRoleAsVMImageOperation), + typeof(RestartRoleOperation), + typeof(OSImage), + typeof(PersistentVMRole), + typeof(Deployment), + typeof(DataVirtualHardDisk), + typeof(OSImage), + typeof(Disk), + typeof(ExtendedProperty), + typeof(ExtensionConfiguration), + typeof(HostedServiceExtensionInput), + typeof(ReservedIP), + }); + + public string GetSerializedValue() + { + return this.Value; + } + + public object GetValue() + { + DataContractSerializer serializer; + + if (string.IsNullOrEmpty(this.Value)) + { + return null; + } + + XmlReaderSettings xmlReaderSettings = new XmlReaderSettings + { + IgnoreComments = true, + IgnoreProcessingInstructions = true, + IgnoreWhitespace = false, + XmlResolver = null, + DtdProcessing = DtdProcessing.Prohibit, + MaxCharactersInDocument = 0, // No size limit + MaxCharactersFromEntities = 0 // No size limit + }; + + serializer = new DataContractSerializer(typeof(Object), OperationParameter.KnownTypes); + try + { + using (StringReader reader = new StringReader(this.Value)) + { + return serializer.ReadObject(XmlReader.Create(reader, xmlReaderSettings)); + } + } + catch + { + return this.Value; + } + } + + public void SetValue(object value) + { + if (value != null) + { + Type valueType = value.GetType(); + + if (valueType.Equals(typeof(string))) + { + this.Value = (string)value; + return; + } + + DataContractSerializer serializer = new DataContractSerializer(typeof(Object), OperationParameter.KnownTypes); + StringBuilder target = new StringBuilder(); + using (XmlWriter writer = XmlWriter.Create(target)) + { + serializer.WriteObject(writer, value); + writer.Flush(); + this.Value = target.ToString(); + } + } + } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class SubscriptionOperation : IExtensibleDataObject + { + [DataMember(Order = 0)] + public string OperationId { get; set; } + + [DataMember(Order = 1)] + public string OperationObjectId { get; set; } + + [DataMember(Order = 2)] + public string OperationName { get; set; } + + [DataMember(Order = 3)] + public OperationParameterList OperationParameters { get; set; } + + [DataMember(Order = 4)] + public SubscriptionOperationCaller OperationCaller { get; set; } + + [DataMember(Order = 5)] + public Operation OperationStatus { get; set; } + + [DataMember(Order = 7, EmitDefaultValue = false)] + public string OperationStartedTime { get; set; } + + [DataMember(Order = 8, EmitDefaultValue = false)] + public string OperationCompletedTime { get; set; } + + [DataMember(Order = 9, EmitDefaultValue = false)] + public string OperationKind { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class Subscription : IExtensibleDataObject + { + [DataMember(Order = 0)] + public string SubscriptionID { get; set; } + + [DataMember(Order = 1)] + public string SubscriptionName { get; set; } + + [DataMember(Order = 2)] + public string SubscriptionStatus { get; set; } + + [DataMember(Order = 3)] + public string AccountAdminLiveEmailId { get; set; } + + [DataMember(Order = 4)] + public string ServiceAdminLiveEmailId { get; set; } + + [DataMember(Order = 5)] + public int MaxCoreCount { get; set; } + + [DataMember(Order = 6)] + public int MaxStorageAccounts { get; set; } + + [DataMember(Order = 7)] + public int MaxHostedServices { get; set; } + + [DataMember(Order = 8)] + public int CurrentCoreCount { get; set; } + + [DataMember(Order = 9)] + public int CurrentHostedServices { get; set; } + + [DataMember(Order = 10)] + public int CurrentStorageAccounts { get; set; } + + [DataMember(Order = 11, EmitDefaultValue = false)] + public int MaxVirtualNetworkSites { get; set; } + + [DataMember(Order = 12, EmitDefaultValue = false)] + public int CurrentVirtualNetworkSites { get; set; } + + [DataMember(Order = 13, EmitDefaultValue = false)] + public int MaxLocalNetworkSites { get; set; } + + [DataMember(Order = 14, EmitDefaultValue = false)] + public int CurrentLocalNetworkSites { get; set; } + + [DataMember(Order = 15, EmitDefaultValue = false)] + public int MaxDnsServers { get; set; } + + [DataMember(Order = 16, EmitDefaultValue = false)] + public int CurrentDnsServers { get; set; } + + [DataMember(Order = 17, EmitDefaultValue = false)] + public string OfferCategories { get; set; } + + /// + /// Current count of extra multiple vips + /// + [DataMember(Order = 18, EmitDefaultValue = false)] + public int CurrentExtraVIPCount { get; set; } + + /// + /// Max count of extra multiple vips + /// + [DataMember(Order = 19, EmitDefaultValue = false)] + public int MaxExtraVIPCount { get; set; } + + /// + /// Windows Azure Active Directory tenant ID (GUID) + /// + [DataMember(Order = 20, EmitDefaultValue = false)] + public string AADTenantID { get; set; } + + [DataMember(Order = 21, EmitDefaultValue = false)] + public string CreatedTime { get; set; } + + [DataMember(Order = 22, EmitDefaultValue = false)] + public int MaxReservedIPs { get; set; } + + [DataMember(Order = 23, EmitDefaultValue = false)] + public int? CurrentReservedIPs { get; set; } + + /// + /// Current count of extra multiple vips + /// + [DataMember(Order = 24, EmitDefaultValue = false)] + public int CurrentPublicIPCount { get; set; } + + /// + /// Max count of extra multiple vips + /// + [DataMember(Order = 25, EmitDefaultValue = false)] + public int MaxPublicIPCount { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + [CollectionDataContract(Namespace = "http://schemas.microsoft.com/windowsazure", Name = "Subscriptions", ItemName = "Subscription")] + public class SubscriptionList : List, IExtensibleDataObject + { + public ExtensionDataObject ExtensionData { get; set; } + + public SubscriptionList() + { + } + + public SubscriptionList(IEnumerable subscriptions) + : base(subscriptions) + { + } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class SubscriptionService : IExtensibleDataObject + { + [DataMember(EmitDefaultValue = false, Order = 1)] + public string SubscriptionID { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public string ServiceType { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 3)] + public string ServiceName { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 4)] + public string ServiceUri { get; set; } + public ExtensionDataObject ExtensionData { get; set; } + + } + + [CollectionDataContract(Namespace = "http://schemas.microsoft.com/windowsazure", Name = "SubscriptionServices", ItemName = "SubscriptionService")] + public class SubscriptionServicesList : List, IExtensibleDataObject + { + public ExtensionDataObject ExtensionData { get; set; } + } + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class Operation : IExtensibleDataObject + { + [DataMember(Name = "ID", Order = 1)] + public string OperationTrackingId { get; set; } + + [DataMember(Order = 2)] + public string Status { get; set; } + + [DataMember(Order = 3, EmitDefaultValue = false)] + public int HttpStatusCode { get; set; } + + [DataMember(Order = 4, EmitDefaultValue = false)] + public ServiceManagementError Error { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + internal static class StringEncoder + { + public static bool TryDecodeFromBase64String(string encodedString, out string decodedString) + { + bool canDecode = true; + decodedString = encodedString; + + // A null or empty string will not be considered a failure and will result in the original null or empty value being persisted + if (!string.IsNullOrEmpty(encodedString)) + { + try + { + decodedString = StringEncoder.DecodeFromBase64String(encodedString); + } + catch (Exception) + { + canDecode = false; + } + } + + return canDecode; + } + + public static string EncodeToBase64String(string decodedString) + { + string encodedString = decodedString; + + if (!string.IsNullOrEmpty(decodedString)) + { + encodedString = Convert.ToBase64String(Encoding.UTF8.GetBytes(decodedString)); + } + + return encodedString; + } + + public static string DecodeFromBase64String(string encodedString) + { + return Encoding.UTF8.GetString(Convert.FromBase64String(encodedString)); + } + } + + /// + /// Represents exceptions on the wire when calling the Service Management API. + /// + [Serializable] + public class ServiceManagementClientException : Exception + { + /// + /// Gets the HTTP status code of the failed Service Management request. + /// + public HttpStatusCode HttpStatus { get; private set; } + + /// + /// Gets the error details of the failed Service Management request. + /// + public ServiceManagementError ErrorDetails { get; private set; } + + /// + /// Gets the operation tracking ID if called asynchronously of the failed Service Management request. + /// + public string OperationTrackingId { get; private set; } + + /// + /// Gets the headers associated with the response from the request that caused the exception. + /// + public WebHeaderCollection ResponseHeaders { get; private set; } + + /// + /// Constructs a new instance of ServiceManagementClientException. + /// + /// The HTTP status code of the failed Service Management request. + /// The error details of the failed Service Management request. + /// The operation tracking ID if called asynchronously of the failed Service Management request. + public ServiceManagementClientException(HttpStatusCode httpStatus, ServiceManagementError errorDetails, string operationTrackingId) + : this(httpStatus, errorDetails, operationTrackingId, null) + { + // Empty + } + + /// + /// Constructs a new instance of ServiceManagementClientException. + /// + /// The HTTP status code of the failed Service Management request. + /// The error details of the failed Service Management request. + /// The operation tracking ID if called asynchronously of the failed Service Management request. + /// Optional WebResponse containing the original response object from the server + public ServiceManagementClientException(HttpStatusCode httpStatus, ServiceManagementError errorDetails, string operationTrackingId, WebHeaderCollection responseHeaders) + : base(string.Format(CultureInfo.CurrentCulture, + Resources.ServiceManagementClientExceptionStringFormat, + (int)httpStatus, + (errorDetails != null) && !string.IsNullOrEmpty(errorDetails.Code) ? errorDetails.Code : Resources.None, + (errorDetails != null) && !string.IsNullOrEmpty(errorDetails.Message) ? errorDetails.Message : Resources.None, + string.IsNullOrEmpty(operationTrackingId) ? Resources.None : operationTrackingId)) + { + this.HttpStatus = httpStatus; + this.ErrorDetails = errorDetails; + this.OperationTrackingId = operationTrackingId; + this.ResponseHeaders = responseHeaders; + } + + [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] + public override void GetObjectData(SerializationInfo info, StreamingContext context) + { + base.GetObjectData(info, context); + } + } + + [DataContract(Name = "Error", Namespace = Constants.ServiceManagementNS)] + public class ServiceManagementError : IExtensibleDataObject + { + [DataMember(Order = 1)] + public string Code { get; set; } + + [DataMember(Order = 2)] + public string Message { get; set; } + + [DataMember(Order = 3, EmitDefaultValue = false)] + public ConfigurationWarningsList ConfigurationWarnings { get; set; } + + [DataMember(Order = 4, EmitDefaultValue = false)] + public string ConflictingOperationId { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + + [DataContract(Namespace = Constants.ServiceManagementNS)] + public class ConfigurationWarning : IExtensibleDataObject + { + [DataMember(Order = 1)] + public string WarningCode { get; set; } + + [DataMember(Order = 2)] + public string WarningMessage { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + + public override string ToString() + { + return string.Format("WarningCode:{0} WarningMessage:{1}", WarningCode, WarningMessage); + } + } + + [CollectionDataContract(Namespace = Constants.ServiceManagementNS)] + public class ConfigurationWarningsList : List + { + public override string ToString() + { + StringBuilder warnings = new StringBuilder(string.Format("ConfigurationWarnings({0}):\n", this.Count)); + + foreach (ConfigurationWarning warning in this) + { + warnings.Append(warning + "\n"); + } + return warnings.ToString(); + } + } + + [ServiceContract(Namespace = "http://schemas.microsoft.com/windowsazure")] + public interface IServiceManagement + { + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionId}/affinitygroups")] + IAsyncResult BeginCreateAffinityGroup(string subscriptionId, CreateAffinityGroupInput input, AsyncCallback callback, object state); + + void EndCreateAffinityGroup(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "DELETE", UriTemplate = "{subscriptionId}/affinitygroups/{affinityGroupName}")] + IAsyncResult BeginDeleteAffinityGroup(string subscriptionId, string affinityGroupName, AsyncCallback callback, object state); + + void EndDeleteAffinityGroup(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "PUT", UriTemplate = "{subscriptionId}/affinitygroups/{affinityGroupName}")] + IAsyncResult BeginUpdateAffinityGroup(string subscriptionId, string affinityGroupName, UpdateAffinityGroupInput input, AsyncCallback callback, object state); + + void EndUpdateAffinityGroup(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebGet(UriTemplate = "{subscriptionId}/affinitygroups")] + IAsyncResult BeginListAffinityGroups(string subscriptionId, AsyncCallback callback, object state); + + AffinityGroupList EndListAffinityGroups(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebGet(UriTemplate = "{subscriptionId}/affinitygroups/{affinityGroupName}")] + IAsyncResult BeginGetAffinityGroup(string subscriptionId, string affinityGroupName, AsyncCallback callback, object state); + + AffinityGroup EndGetAffinityGroup(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebGet(UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/certificates")] + IAsyncResult BeginListCertificates(string subscriptionId, string serviceName, AsyncCallback callback, object state); + + CertificateList EndListCertificates(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebGet(UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/certificates/{thumbprintalgorithm}-{thumbprint_in_hex}")] + IAsyncResult BeginGetCertificate(string subscriptionId, string serviceName, string thumbprintalgorithm, string thumbprint_in_hex, AsyncCallback callback, object state); + + Certificate EndGetCertificate(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/certificates")] + IAsyncResult BeginAddCertificates(string subscriptionId, string serviceName, CertificateFile input, AsyncCallback callback, object state); + + void EndAddCertificates(IAsyncResult asyncResult); + + [WebInvoke(Method = "DELETE", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/certificates/{thumbprintalgorithm}-{thumbprint_in_hex}")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginDeleteCertificate(string subscriptionId, string serviceName, string thumbprintalgorithm, string thumbprint_in_hex, AsyncCallback callback, object state); + + void EndDeleteCertificate(IAsyncResult asyncResult); + + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginSwapDeployment(string subscriptionId, string serviceName, SwapDeploymentInput input, AsyncCallback callback, object state); + + void EndSwapDeployment(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/deploymentslots/{deploymentSlot}")] + IAsyncResult BeginCreateOrUpdateDeployment(string subscriptionId, string serviceName, string deploymentSlot, CreateDeploymentInput input, AsyncCallback callback, object state); + + void EndCreateOrUpdateDeployment(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/deployments")] + IAsyncResult BeginCreateDeployment(string subscriptionId, string serviceName, Deployment deployment, AsyncCallback callback, object state); + + void EndCreateDeployment(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "DELETE", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/deployments/{deploymentName}")] + IAsyncResult BeginDeleteDeployment(string subscriptionId, string serviceName, string deploymentName, AsyncCallback callback, object state); + + void EndDeleteDeployment(IAsyncResult asyncResult); + + [WebInvoke(Method = "DELETE", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/deploymentslots/{deploymentSlot}")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginDeleteDeploymentBySlot(string subscriptionId, string serviceName, string deploymentSlot, AsyncCallback callback, object state); + + void EndDeleteDeploymentBySlot(IAsyncResult asyncResult); + + [WebGet(UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/deployments/{deploymentName}")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginGetDeployment(string subscriptionId, string serviceName, string deploymentName, AsyncCallback callback, object state); + + Deployment EndGetDeployment(IAsyncResult asyncResult); + + [WebGet(UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/deploymentslots/{deploymentSlot}")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginGetDeploymentBySlot(string subscriptionId, string serviceName, string deploymentSlot, AsyncCallback callback, object state); + + Deployment EndGetDeploymentBySlot(IAsyncResult asyncResult); + + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/deployments/{deploymentName}/?comp=config")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginChangeConfiguration(string subscriptionId, string serviceName, string deploymentName, ChangeConfigurationInput input, AsyncCallback callback, object state); + + void EndChangeConfiguration(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/deploymentslots/{deploymentSlot}/?comp=config")] + IAsyncResult BeginChangeConfigurationBySlot(string subscriptionId, string serviceName, string deploymentSlot, ChangeConfigurationInput input, AsyncCallback callback, object state); + + void EndChangeConfigurationBySlot(IAsyncResult asyncResult); + + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/deployments/{deploymentName}/?comp=resume")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginResumeDeploymentUpdateOrUpgrade(string subscriptionId, string serviceName, string deploymentName, AsyncCallback callback, object state); + + void EndResumeDeploymentUpdateOrUpgrade(IAsyncResult asyncResult); + + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/deploymentslots/{deploymentSlot}/?comp=resume")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginResumeDeploymentUpdateOrUpgradeBySlot(string subscriptionId, string serviceName, string deploymentSlot, AsyncCallback callback, object state); + + void EndResumeDeploymentUpdateOrUpgradeBySlot(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/deployments/{deploymentName}/?comp=suspend")] + IAsyncResult BeginSuspendDeploymentUpdateOrUpgrade(string subscriptionId, string serviceName, string deploymentName, AsyncCallback callback, object state); + + void EndSuspendDeploymentUpdateOrUpgrade(IAsyncResult asyncResult); + + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/deploymentslots/{deploymentSlot}/?comp=suspend")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginSuspendDeploymentUpdateOrUpgradeBySlot(string subscriptionId, string serviceName, string deploymentSlot, AsyncCallback callback, object state); + + void EndSuspendDeploymentUpdateOrUpgradeBySlot(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/deployments/{deploymentName}/?comp=status")] + IAsyncResult BeginUpdateDeploymentStatus(string subscriptionId, string serviceName, string deploymentName, UpdateDeploymentStatusInput input, AsyncCallback callback, object state); + + void EndUpdateDeploymentStatus(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/deploymentslots/{deploymentSlot}/?comp=status")] + IAsyncResult BeginUpdateDeploymentStatusBySlot(string subscriptionId, string serviceName, string deploymentSlot, UpdateDeploymentStatusInput input, AsyncCallback callback, object state); + + void EndUpdateDeploymentStatusBySlot(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/deployments/{deploymentName}/?comp=upgrade")] + IAsyncResult BeginUpgradeDeployment(string subscriptionId, string serviceName, string deploymentName, UpgradeDeploymentInput input, AsyncCallback callback, object state); + + void EndUpgradeDeployment(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/deploymentslots/{deploymentSlot}/?comp=upgrade")] + IAsyncResult BeginUpgradeDeploymentBySlot(string subscriptionId, string serviceName, string deploymentSlot, UpgradeDeploymentInput input, AsyncCallback callback, object state); + + void EndUpgradeDeploymentBySlot(IAsyncResult asyncResult); + + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/deployments/{deploymentName}/?comp=walkupgradedomain")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginWalkUpgradeDomain(string subscriptionId, string serviceName, string deploymentName, WalkUpgradeDomainInput input, AsyncCallback callback, object state); + + void EndWalkUpgradeDomain(IAsyncResult asyncResult); + + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/deploymentslots/{deploymentSlot}/?comp=walkupgradedomain")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginWalkUpgradeDomainBySlot(string subscriptionId, string serviceName, string deploymentSlot, WalkUpgradeDomainInput input, AsyncCallback callback, object state); + + void EndWalkUpgradeDomainBySlot(IAsyncResult asyncResult); + + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/deployments/{deploymentName}/roleinstances/{roleinstancename}?comp=reboot")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginRebootDeploymentRoleInstance(string subscriptionId, string serviceName, string deploymentName, string roleInstanceName, AsyncCallback callback, object state); + + void EndRebootDeploymentRoleInstance(IAsyncResult asyncResult); + + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/deployments/{deploymentName}/?comp=rollback")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginRollbackDeploymentUpdateOrUpgrade(string subscriptionId, string serviceName, string deploymentName, RollbackUpdateOrUpgradeInput input, AsyncCallback callback, object state); + + void EndRollbackDeploymentUpdateOrUpgrade(IAsyncResult asyncResult); + + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/deploymentslots/{deploymentSlot}/?comp=rollback")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginRollbackDeploymentUpdateOrUpgradeBySlot(string subscriptionId, string serviceName, string deploymentSlot, RollbackUpdateOrUpgradeInput input, AsyncCallback callback, object state); + + void EndRollbackDeploymentUpdateOrUpgradeBySlot(IAsyncResult asyncResult); + + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/deployments/{deploymentName}/roleinstances/{roleinstancename}?comp=reimage")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginReimageDeploymentRoleInstance(string subscriptionId, string serviceName, string deploymentName, string roleInstanceName, AsyncCallback callback, object state); + + void EndReimageDeploymentRoleInstance(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/deployments/{deploymentName}/roleinstances/{roleinstancename}?comp=rebuild&resources={resources}")] + IAsyncResult BeginRebuildDeploymentRoleInstance(string subscriptionId, string serviceName, string deploymentName, string roleInstanceName, string resources, AsyncCallback callback, object state); + + void EndRebuildDeploymentRoleInstance(IAsyncResult asyncResult); + + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/deploymentslots/{deploymentSlot}/roleinstances/{roleinstancename}?comp=reboot")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginRebootDeploymentRoleInstanceBySlot(string subscriptionId, string serviceName, string deploymentSlot, string roleInstanceName, AsyncCallback callback, object state); + + void EndRebootDeploymentRoleInstanceBySlot(IAsyncResult asyncResult); + + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/deploymentslots/{deploymentSlot}/roleinstances/{roleinstancename}?comp=reimage")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginReimageDeploymentRoleInstanceBySlot(string subscriptionId, string serviceName, string deploymentSlot, string roleInstanceName, AsyncCallback callback, object state); + + void EndReimageDeploymentRoleInstanceBySlot(IAsyncResult asyncResult); + + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/deploymentslots/{deploymentSlot}/roleinstances/{roleinstancename}?comp=rebuild&resources={resources}")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginRebuildDeploymentRoleInstanceBySlot(string subscriptionId, string serviceName, string deploymentSlot, string roleInstanceName, string resources, AsyncCallback callback, object state); + + void EndRebuildDeploymentRoleInstanceBySlot(IAsyncResult asyncResult); + + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/deployments/{deploymentName}/package?containerUri={containerUri}&overwriteExisting={overwriteExisting}")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginGetPackage(string subscriptionId, string serviceName, string deploymentName, string containerUri, bool overwriteExisting, AsyncCallback callback, object state); + + void EndGetPackage(IAsyncResult asyncResult); + + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/deploymentslots/{deploymentSlot}/package?containerUri={containerUri}&overwriteExisting={overwriteExisting}")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginGetPackageBySlot(string subscriptionId, string serviceName, string deploymentSlot, string containerUri, bool overwriteExisting, AsyncCallback callback, object state); + + void EndGetPackageBySlot(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/deployments/{deploymentName}/virtualipgroups/{vipGroupName}?comp=deletevips")] + IAsyncResult BeginDeleteDeploymentVirtualIPs(string subscriptionId, string serviceName, string deploymentName, string vipGroupName, VirtualIPList vips, AsyncCallback callback, object state); + + void EndDeleteDeploymentVirtualIPs(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/deploymentslots/{deploymentSlot}/ virtualipgroups/{vipGroupName}?comp=deletevips")] + IAsyncResult BeginDeleteDeploymentVirtualIPsBySlot(string subscriptionId, string serviceName, string deploymentSlot, string vipGroupName, VirtualIPList vips, AsyncCallback callback, object state); + + void EndDeleteDeploymentVirtualIPsBySlot(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebGet(UriTemplate = "{subscriptionID}/services/disks")] + IAsyncResult BeginListDisks(string subscriptionID, AsyncCallback callback, object state); + + DiskList EndListDisks(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionID}/services/disks")] + IAsyncResult BeginCreateDisk(string subscriptionID, Disk disk, AsyncCallback callback, object state); + + Disk EndCreateDisk(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebGet(UriTemplate = "{subscriptionID}/services/disks/{diskName}")] + IAsyncResult BeginGetDisk(string subscriptionID, string diskName, AsyncCallback callback, object state); + + Disk EndGetDisk(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "PUT", UriTemplate = "{subscriptionID}/services/disks/{diskName}")] + IAsyncResult BeginUpdateDisk(string subscriptionID, string diskName, Disk disk, AsyncCallback callback, object state); + + Disk EndUpdateDisk(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "DELETE", UriTemplate = "{subscriptionID}/services/disks/{diskName}")] + IAsyncResult BeginDeleteDisk(string subscriptionID, string diskName, AsyncCallback callback, object state); + + void EndDeleteDisk(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "DELETE", UriTemplate = "{subscriptionID}/services/disks/{diskName}?comp={comp}")] + IAsyncResult BeginDeleteDiskEx(string subscriptionID, string diskName, string comp, AsyncCallback callback, object state); + + void EndDeleteDiskEx(IAsyncResult asyncResult); + + [ServiceKnownType(typeof(PersistentVMRole))] + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionID}/services/hostedservices/{serviceName}/deployments/{deploymentName}/Roles")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginAddRole(string subscriptionID, string serviceName, string deploymentName, Role role, AsyncCallback callback, object state); + + void EndAddRole(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [ServiceKnownType(typeof(PersistentVMRole))] + [WebGet(UriTemplate = "{subscriptionID}/services/hostedservices/{serviceName}/deployments/{deploymentName}/Roles/{roleName}")] + IAsyncResult BeginGetRole(string subscriptionID, string serviceName, string deploymentName, string roleName, AsyncCallback callback, object state); + + Role EndGetRole(IAsyncResult asyncResult); + + [WebInvoke(Method = "PUT", UriTemplate = "{subscriptionID}/services/hostedservices/{serviceName}/deployments/{deploymentName}/Roles/{roleName}")] + [ServiceKnownType(typeof(PersistentVMRole))] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginUpdateRole(string subscriptionID, string serviceName, string deploymentName, string roleName, Role role, AsyncCallback callback, object state); + + void EndUpdateRole(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "DELETE", UriTemplate = "{subscriptionID}/services/hostedservices/{serviceName}/deployments/{deploymentName}/Roles/{roleName}")] + IAsyncResult BeginDeleteRole(string subscriptionID, string serviceName, string deploymentName, string roleName, AsyncCallback callback, object state); + + void EndDeleteRole(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionID}/services/hostedservices/{serviceName}/deployments/{deploymentName}/Roles/{roleName}/DataDisks")] + IAsyncResult BeginAddDataDisk(string subscriptionID, string serviceName, string deploymentName, string roleName, DataVirtualHardDisk dataDisk, AsyncCallback callback, object state); + + void EndAddDataDisk(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "PUT", UriTemplate = "{subscriptionID}/services/hostedservices/{serviceName}/deployments/{deploymentName}/Roles/{roleName}/DataDisks/{lun}")] + IAsyncResult BeginUpdateDataDisk(string subscriptionID, string serviceName, string deploymentName, string roleName, string lun, DataVirtualHardDisk dataDisk, AsyncCallback callback, object state); + + void EndUpdateDataDisk(IAsyncResult asyncResult); + + [WebGet(UriTemplate = "{subscriptionID}/services/hostedservices/{serviceName}/deployments/{deploymentName}/Roles/{roleName}/DataDisks/{lun}")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginGetDataDisk(string subscriptionID, string serviceName, string deploymentName, string roleName, string lun, AsyncCallback callback, object state); + + DataVirtualHardDisk EndGetDataDisk(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "DELETE", UriTemplate = "{subscriptionID}/services/hostedservices/{serviceName}/deployments/{deploymentName}/Roles/{roleName}/DataDisks/{lun}")] + IAsyncResult BeginDeleteDataDisk(string subscriptionID, string serviceName, string deploymentName, string roleName, string lun, AsyncCallback callback, object state); + + void EndDeleteDataDisk(IAsyncResult asyncResult); + + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionID}/services/hostedservices/{serviceName}/deployments/{deploymentName}/roleInstances/{roleInstanceName}/Operations")] + [ServiceKnownType(typeof(StartRoleOperation))] + [ServiceKnownType(typeof(RestartRoleOperation))] + [ServiceKnownType(typeof(CaptureRoleOperation))] + [OperationContract(AsyncPattern = true)] + [ServiceKnownType(typeof(ShutdownRoleOperation))] + IAsyncResult BeginExecuteRoleOperation(string subscriptionID, string serviceName, string deploymentName, string roleInstanceName, RoleOperation roleOperation, AsyncCallback callback, object state); + + void EndExecuteRoleOperation(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebGet(UriTemplate = "{subscriptionID}/services/hostedservices/{serviceName}/deployments/{deploymentName}/roleinstances/{instanceName}/ModelFile?FileType=RDP")] + IAsyncResult BeginDownloadRDPFile(string subscriptionID, string serviceName, string deploymentName, string instanceName, AsyncCallback callback, object state); + + Stream EndDownloadRDPFile(IAsyncResult asyncResult); + + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionID}/services/hostedservices/{serviceName}/deployments/{deploymentName}/Roles/Operations")] + [OperationContract(AsyncPattern = true)] + [ServiceKnownType(typeof(ShutdownRolesOperation))] + [ServiceKnownType(typeof(StartRolesOperation))] + IAsyncResult BeginExecuteRoleSetOperation(string subscriptionID, string serviceName, string deploymentName, RoleSetOperation roleSetOperation, AsyncCallback callback, object state); + + void EndExecuteRoleSetOperation(IAsyncResult asyncResult); + + [ServiceKnownType(typeof(LoadBalancedEndpointList))] + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionID}/services/hostedservices/{serviceName}/deployments/{deploymentName}?comp=UpdateLbSet")] + IAsyncResult BeginUpdateLoadBalancedEndpointSet(string subscriptionID, string serviceName, string deploymentName, LoadBalancedEndpointList loadBalancedEndpointList, AsyncCallback callback, object state); + + void EndUpdateLoadBalancedEndpointSet(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/extensions")] + IAsyncResult BeginAddHostedServiceExtension(string subscriptionId, string serviceName, HostedServiceExtensionInput extension, AsyncCallback callback, object state); + + void EndAddHostedServiceExtension(IAsyncResult asyncResult); + + [WebInvoke(Method = "GET", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/extensions")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginListHostedServiceExtensions(string subscriptionId, string serviceName, AsyncCallback callback, object state); + + HostedServiceExtensionList EndListHostedServiceExtensions(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "GET", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/extensions/{extensionId}")] + IAsyncResult BeginGetHostedServiceExtension(string subscriptionId, string serviceName, string extensionId, AsyncCallback callback, object state); + + HostedServiceExtension EndGetHostedServiceExtension(IAsyncResult asyncResult); + + [WebInvoke(Method = "DELETE", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}/extensions/{extensionId}")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginDeleteHostedServiceExtension(string subscriptionId, string serviceName, string extensionId, AsyncCallback callback, object state); + + void EndDeleteHostedServiceExtension(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebGet(UriTemplate = "{subscriptionId}/services/extensions")] + IAsyncResult BeginListLatestExtensions(string subscriptionId, AsyncCallback callback, object state); + + ExtensionImageList EndListLatestExtensions(IAsyncResult asyncResult); + + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionId}/services/hostedservices")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginCreateHostedService(string subscriptionId, CreateHostedServiceInput input, AsyncCallback callback, object state); + + void EndCreateHostedService(IAsyncResult asyncResult); + + [WebInvoke(Method = "PUT", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginUpdateHostedService(string subscriptionId, string serviceName, UpdateHostedServiceInput input, AsyncCallback callback, object state); + + void EndUpdateHostedService(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "DELETE", UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}")] + IAsyncResult BeginDeleteHostedService(string subscriptionId, string serviceName, AsyncCallback callback, object state); + + void EndDeleteHostedService(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebGet(UriTemplate = "{subscriptionId}/services/hostedservices")] + IAsyncResult BeginListHostedServices(string subscriptionId, AsyncCallback callback, object state); + + HostedServiceList EndListHostedServices(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebGet(UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}")] + IAsyncResult BeginGetHostedService(string subscriptionId, string serviceName, AsyncCallback callback, object state); + + HostedService EndGetHostedService(IAsyncResult asyncResult); + + [WebGet(UriTemplate = "{subscriptionId}/services/hostedservices/{serviceName}?embed-detail={embedDetail}")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginGetHostedServiceWithDetails(string subscriptionId, string serviceName, bool embedDetail, AsyncCallback callback, object state); + + HostedService EndGetHostedServiceWithDetails(IAsyncResult asyncResult); + + [WebGet(UriTemplate = "{subscriptionId}/locations")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginListLocations(string subscriptionId, AsyncCallback callback, object state); + + LocationList EndListLocations(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "GET", UriTemplate = "{subscriptionId}/services/hostedservices/operations/isavailable/{serviceName}")] + IAsyncResult BeginIsDNSAvailable(string subscriptionId, string serviceName, AsyncCallback callback, object state); + + AvailabilityResponse EndIsDNSAvailable(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "PUT", UriTemplate = "{subscriptionId}/services/networking/media")] + IAsyncResult BeginSetNetworkConfiguration(string subscriptionId, Stream networkConfiguration, AsyncCallback callback, object state); + + void EndSetNetworkConfiguration(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebGet(UriTemplate = "{subscriptionId}/services/networking/media")] + IAsyncResult BeginGetNetworkConfiguration(string subscriptionId, AsyncCallback callback, object state); + + Stream EndGetNetworkConfiguration(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebGet(UriTemplate = "{subscriptionId}/services/networking/virtualnetwork")] + IAsyncResult BeginListVirtualNetworkSites(string subscriptionId, AsyncCallback callback, object state); + + VirtualNetworkSiteList EndListVirtualNetworkSites(IAsyncResult asyncResult); + + [WebInvoke(Method = "GET", UriTemplate = "{subscriptionId}/operatingsystems")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginListOperatingSystems(string subscriptionId, AsyncCallback callback, object state); + + OperatingSystemList EndListOperatingSystems(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "GET", UriTemplate = "{subscriptionId}/operatingsystemfamilies")] + IAsyncResult BeginListOperatingSystemFamilies(string subscriptionId, AsyncCallback callback, object state); + + OperatingSystemFamilyList EndListOperatingSystemFamilies(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebGet(UriTemplate = "{subscriptionId}/operations/{operationTrackingId}")] + IAsyncResult BeginGetOperationStatus(string subscriptionId, string operationTrackingId, AsyncCallback callback, object state); + + Operation EndGetOperationStatus(IAsyncResult asyncResult); + + [WebGet(UriTemplate = "{subscriptionID}/services/images")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginListOSImages(string subscriptionID, AsyncCallback callback, object state); + + OSImageList EndListOSImages(IAsyncResult asyncResult); + + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionID}/services/images")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginCreateOSImage(string subscriptionID, OSImage image, AsyncCallback callback, object state); + + OSImage EndCreateOSImage(IAsyncResult asyncResult); + + [WebGet(UriTemplate = "{subscriptionID}/services/images/{imageName}")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginGetOSImage(string subscriptionID, string imageName, AsyncCallback callback, object state); + + OSImage EndGetOSImage(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "PUT", UriTemplate = "{subscriptionID}/services/images/{imageName}")] + IAsyncResult BeginUpdateOSImage(string subscriptionID, string imageName, OSImage image, AsyncCallback callback, object state); + + OSImage EndUpdateOSImage(IAsyncResult asyncResult); + + [WebInvoke(Method = "DELETE", UriTemplate = "{subscriptionID}/services/images/{imageName}")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginDeleteOSImage(string subscriptionID, string imageName, AsyncCallback callback, object state); + + void EndDeleteOSImage(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "DELETE", UriTemplate = "{subscriptionID}/services/images/{imageName}?comp={comp}")] + IAsyncResult BeginDeleteOSImageEx(string subscriptionID, string imageName, string comp, AsyncCallback callback, object state); + + void EndDeleteOSImageEx(IAsyncResult asyncResult); + + [WebInvoke(Method = "PUT", UriTemplate = "{subscriptionID}/services/images/{imageName}/replicate")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginReplicateOSImage(string subscriptionID, string imageName, ReplicationInput replicationInput, AsyncCallback callback, object state); + + string EndReplicateOSImage(IAsyncResult asyncResult); + + [WebInvoke(Method = "PUT", UriTemplate = "{subscriptionID}/services/images/{imageName}/share?permission={permission}")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginShareOSImage(string subscriptionID, string imageName, string permission, AsyncCallback callback, object state); + + bool EndShareOSImage(IAsyncResult asyncResult); + + [WebInvoke(Method = "PUT", UriTemplate = "{subscriptionID}/services/images/{imageName}/unreplicate")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginUnReplicateOSImage(string subscriptionID, string imageName, AsyncCallback callback, object state); + + void EndUnReplicateOSImage(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebGet(UriTemplate = "{subscriptionID}/services/images/query?location={location}&publisher={publisher}")] + IAsyncResult BeginQueryOSImages(string subscriptionID, string location, string publisher, AsyncCallback callback, object state); + + OSImageList EndQueryOSImages(IAsyncResult asyncResult); + + [WebGet(UriTemplate = "{subscriptionID}/services/images/{imageName}/details")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginGetOSImageWithDetails(string subscriptionID, string imageName, AsyncCallback callback, object state); + + OSImageDetails EndGetOSImageWithDetails(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionId}/services/storageservices")] + IAsyncResult BeginCreateStorageService(string subscriptionId, CreateStorageServiceInput input, AsyncCallback callback, object state); + + void EndCreateStorageService(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "PUT", UriTemplate = "{subscriptionId}/services/storageservices/{serviceName}")] + IAsyncResult BeginUpdateStorageService(string subscriptionId, string serviceName, UpdateStorageServiceInput input, AsyncCallback callback, object state); + + void EndUpdateStorageService(IAsyncResult asyncResult); + + [WebInvoke(Method = "DELETE", UriTemplate = "{subscriptionId}/services/storageservices/{serviceName}")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginDeleteStorageService(string subscriptionId, string serviceName, AsyncCallback callback, object state); + + void EndDeleteStorageService(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebGet(UriTemplate = "{subscriptionId}/services/storageservices")] + IAsyncResult BeginListStorageServices(string subscriptionId, AsyncCallback callback, object state); + + StorageServiceList EndListStorageServices(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebGet(UriTemplate = "{subscriptionId}/services/storageservices/{serviceName}")] + IAsyncResult BeginGetStorageService(string subscriptionId, string serviceName, AsyncCallback callback, object state); + + StorageService EndGetStorageService(IAsyncResult asyncResult); + + [WebGet(UriTemplate = "{subscriptionId}/services/storageservices/{serviceName}/keys")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginGetStorageKeys(string subscriptionId, string serviceName, AsyncCallback callback, object state); + + StorageService EndGetStorageKeys(IAsyncResult asyncResult); + + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionId}/services/storageservices/{serviceName}/keys?action=regenerate")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginRegenerateStorageServiceKeys(string subscriptionId, string serviceName, RegenerateKeys regenerateKeys, AsyncCallback callback, object state); + + StorageService EndRegenerateStorageServiceKeys(IAsyncResult asyncResult); + + [WebGet(UriTemplate = "{subscriptionID}/services/storageservices/operations/isavailable/{serviceName}")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginIsStorageServiceAvailable(string subscriptionID, string serviceName, AsyncCallback callback, object state); + + AvailabilityResponse EndIsStorageServiceAvailable(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebGet(UriTemplate = "{subscriptionID}")] + IAsyncResult BeginGetSubscription(string subscriptionID, AsyncCallback callback, object state); + + Subscription EndGetSubscription(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebGet(UriTemplate = "{subscriptionID}/operations?starttime={starttime}&endtime={endtime}&objectidfilter={objectidfilter}&operationresultfilter={operationresultfilter}&continuationtoken={continuationtoken}")] + IAsyncResult BeginListSubscriptionOperations(string subscriptionID, string startTime, string endTime, string objectIdFilter, string operationResultFilter, string continuationToken, AsyncCallback callback, object state); + + SubscriptionOperationCollection EndListSubscriptionOperations(IAsyncResult asyncResult); + + [OperationContract(AsyncPattern = true)] + [WebGet(UriTemplate = "{subscriptionID}/certificates")] + IAsyncResult BeginListSubscriptionCertificates(string subscriptionID, AsyncCallback callback, object state); + + SubscriptionCertificateList EndListSubscriptionCertificates(IAsyncResult asyncResult); + + [WebGet(UriTemplate = "{subscriptionID}/certificates/{thumbprint}")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginGetSubscriptionCertificate(string subscriptionID, string thumbprint, AsyncCallback callback, object state); + + SubscriptionCertificate EndGetSubscriptionCertificate(IAsyncResult asyncResult); + + [WebInvoke(Method = "POST", UriTemplate = "{subscriptionID}/certificates")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginAddSubscriptionCertificate(string subscriptionId, SubscriptionCertificate Certificate, AsyncCallback callback, object state); + + void EndAddSubscriptionCertificate(IAsyncResult asyncResult); + + [WebInvoke(Method = "DELETE", UriTemplate = "{subscriptionID}/certificates/{thumbprint}")] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginRemoveSubscriptionCertificate(string subscriptionID, string thumbprint, AsyncCallback callback, object state); + + void EndRemoveSubscriptionCertificate(IAsyncResult asyncResult); + } +} + + + diff --git a/src/Common/Commands.Common/Common/SubscriptionCmdletBase.cs b/src/Common/Commands.Common/Common/SubscriptionCmdletBase.cs new file mode 100644 index 000000000000..1f2dd6dd4635 --- /dev/null +++ b/src/Common/Commands.Common/Common/SubscriptionCmdletBase.cs @@ -0,0 +1,62 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Profile +{ + /// + /// Base class for cmdlets that manipulate the + /// azure subscription, provides common support + /// for the SubscriptionDataFile parameter. + /// + public abstract class SubscriptionCmdletBase : AzurePSCmdlet + { + [Parameter(Mandatory = false, HelpMessage = "File storing subscription data, if not set uses default.")] + public string SubscriptionDataFile { get; set; } + + private readonly bool _saveProfile; + + protected SubscriptionCmdletBase(bool saveProfile) + { + this._saveProfile = saveProfile; + } + + protected override void BeginProcessing() + { + if (!string.IsNullOrEmpty(SubscriptionDataFile)) + { + ProfileClient = new ProfileClient(SubscriptionDataFile); + } + else + { + ProfileClient = new ProfileClient(); + } + ProfileClient.WarningLog = WriteWarning; + ProfileClient.DebugLog = WriteDebug; + } + + protected override void EndProcessing() + { + if (_saveProfile) + { + ProfileClient.Profile.Save(); + } + } + + public ProfileClient ProfileClient { get; set; } + } +} \ No newline at end of file diff --git a/src/Common/Commands.Common/Common/Tasks.cs b/src/Common/Commands.Common/Common/Tasks.cs new file mode 100644 index 000000000000..a249386e8daf --- /dev/null +++ b/src/Common/Commands.Common/Common/Tasks.cs @@ -0,0 +1,49 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Threading.Tasks; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common +{ + /// + /// Helper functions for + /// + public class Tasks + { + /// + /// Create a which has completed + /// with the given value. + /// + /// This does the same thing as Task.FromResult, but that + /// method only exists in .NET 4.5. Since this project targets + /// .NET 4.0, this method helps. + /// Type of result + /// Result value + /// The completed task. + public static Task FromResult(TResult result) + { + var taskSource = new TaskCompletionSource(); + taskSource.SetResult(result); + return taskSource.Task; + } + + public static Task FromException(Exception ex) + { + var taskSource = new TaskCompletionSource(); + taskSource.SetException(ex); + return taskSource.Task; + } + } +} diff --git a/src/Common/Commands.Common/Common/TestMockSupport.cs b/src/Common/Commands.Common/Common/TestMockSupport.cs new file mode 100644 index 000000000000..5d65a3864fb9 --- /dev/null +++ b/src/Common/Commands.Common/Common/TestMockSupport.cs @@ -0,0 +1,31 @@ + +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common +{ + public class TestMockSupport + { + //a.k.a when you run under Playback mode + public static bool RunningMocked { get; set; } + + public static void Delay(int milliSeconds) + { + if (!RunningMocked) + { + System.Threading.Thread.Sleep(milliSeconds); + } + } + } +} diff --git a/src/Common/Commands.Common/Common/Validate.cs b/src/Common/Commands.Common/Common/Validate.cs new file mode 100644 index 000000000000..0d3c74ae25c4 --- /dev/null +++ b/src/Common/Commands.Common/Common/Validate.cs @@ -0,0 +1,218 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Linq; +using System.Net; +using System.Net.Sockets; +using System.Runtime.InteropServices; +using Microsoft.WindowsAzure.Commands.Common.Properties; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common +{ + public static class Validate + { + [Flags] + enum InternetConnectionState : int + { + INTERNET_CONNECTION_MODEM = 0x1, + INTERNET_CONNECTION_LAN = 0x2, + INTERNET_CONNECTION_PROXY = 0x4, + INTERNET_RAS_INSTALLED = 0x10, + INTERNET_CONNECTION_OFFLINE = 0x20, + INTERNET_CONNECTION_CONFIGURED = 0x40 + } + + [SuppressMessage("Microsoft.Design", "CA1060:MovePInvokesToNativeMethodsClass", Justification = "Not necessary for a single p-invoke")] + [DllImport("WININET", CharSet = CharSet.Auto)] + static extern bool InternetGetConnectedState(ref InternetConnectionState lpdwFlags, int dwReserved); + + /// + /// Validates against given string if null or empty. + /// + /// string variable to validate + /// This parameter is used when the validation fails. It can contain actual message to display + /// or parameter name to display with default message + /// Indicates either to use messageData as actual message or parameter name + public static void ValidateStringIsNullOrEmpty(string data, string messageData, bool useDefaultMessage = true) + { + if (string.IsNullOrEmpty(data)) + { + // In this case use messageData parameter as name for null/empty string. + if (useDefaultMessage) + { + throw new ArgumentException(string.Format(Resources.InvalidOrEmptyArgumentMessage, messageData)); + } + else + { + // Use the message provided by the user + throw new ArgumentException(messageData); + } + } + } + + public static void ValidatePathName(string element, string exceptionMessage) + { + if (element.IndexOfAny(Path.GetInvalidPathChars()) != -1) + { + throw new ArgumentException(exceptionMessage); + } + } + + public static void ValidateFileName(string element, string exceptionMessage = null) + { + try + { + string fileName = Path.GetFileName(element); + + if (fileName.IndexOfAny(Path.GetInvalidFileNameChars()) != -1) + { + throw new ArgumentException(exceptionMessage ?? string.Empty); + } + } + catch + { + throw new ArgumentException(exceptionMessage ?? string.Empty); + } + } + + public static void ValidateFileExists(string filePath, string exceptionMessage) + { + if (!FileUtilities.DataStore.FileExists(filePath)) + { + throw new FileNotFoundException(exceptionMessage); + } + } + + public static void ValidateDirectoryExists(string directory, string exceptionMessage = null) + { + string msg = string.Format(Resources.PathDoesNotExist, directory); + + if (!FileUtilities.DataStore.DirectoryExists(directory)) + { + if (!string.IsNullOrEmpty(exceptionMessage)) + { + msg = exceptionMessage; + } + + throw new FileNotFoundException(msg); + } + } + + public static void ValidateNullArgument(object item, string exceptionMessage) + { + if (item == null) + { + throw new ArgumentException(exceptionMessage); + } + } + + public static void ValidateFileExtention(string filePath, string desiredExtention) + { + bool invalidExtension = Convert.ToBoolean(string.Compare(Path.GetExtension(filePath), desiredExtention, true)); + + if (invalidExtension) + { + throw new ArgumentException(string.Format(Resources.InvalidFileExtension, filePath, desiredExtention)); + } + } + + public static void ValidateDnsName(string dnsName, string parameterName) + { + if (Uri.CheckHostName(dnsName) != UriHostNameType.Dns || dnsName.EndsWith("-")) + { + throw new ArgumentException(string.Format(Resources.InvalidDnsName, dnsName, parameterName)); + } + } + + public static void ValidateDnsDoesNotExist(string dnsName) + { + try + { + Dns.GetHostEntry(dnsName); + // Dns does exist throw exception + // + throw new ArgumentException(string.Format(Resources.ServiceNameExists, dnsName)); + } + catch (SocketException) + { + // Dns doesn't exist + } + } + + public static void ValidateInternetConnection() + { + InternetConnectionState flags = 0; + + if (!InternetGetConnectedState(ref flags, 0)) + { + throw new Exception(Resources.NoInternetConnection); + } + } + + public static void HasWhiteCharacter(string text, string exceptionMessage = null) + { + if (text.Any(char.IsWhiteSpace)) + { + throw new ArgumentException(exceptionMessage ?? string.Empty); + } + } + + /// + /// Make validation for given path. + /// + /// Path to validate + /// message to display if this validation failed + public static void ValidatePath(string path, string exceptionMessage) + { + ValidateStringIsNullOrEmpty(path, exceptionMessage, false); + ValidatePathName(path, exceptionMessage); + } + + /// + /// Validates against given directory + /// + /// Directory name + /// Name which you use to identify that directory to user (i.e. AzureSdkDirectory) + public static void ValidateDirectoryFull(string directoryNameOnDisk, string directoryName) + { + BasicFileAndDirectoryValidation(directoryNameOnDisk, directoryName); + ValidateDirectoryExists(directoryNameOnDisk, string.Format(Resources.PathDoesNotExistForElement, directoryName, directoryNameOnDisk)); + } + + private static void BasicFileAndDirectoryValidation(string fullPath, string name) + { + ValidateStringIsNullOrEmpty(fullPath, name); + ValidateFileName(fullPath, Resources.IllegalPath); + string directoryPath = Path.GetDirectoryName(fullPath); + if (!string.IsNullOrEmpty(directoryPath)) + { + ValidatePath(fullPath, Resources.IllegalPath); + } + } + + /// + /// Validates against given file + /// + /// File name + /// Name which you use to identify that directory to user (i.e. Service Settings) + public static void ValidateFileFull(string fileNameOnDisk, string fileName) + { + BasicFileAndDirectoryValidation(fileNameOnDisk, fileName); + ValidateFileExists(fileNameOnDisk, string.Format(Resources.PathDoesNotExistForElement, fileName, fileNameOnDisk)); + } + } +} \ No newline at end of file diff --git a/src/Common/Commands.Common/Factories/AuthenticationFactory.cs b/src/Common/Commands.Common/Factories/AuthenticationFactory.cs new file mode 100644 index 000000000000..a897f4fe3b7e --- /dev/null +++ b/src/Common/Commands.Common/Factories/AuthenticationFactory.cs @@ -0,0 +1,97 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Security; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common.Authentication; + +namespace Microsoft.WindowsAzure.Commands.Common.Factories +{ + public class AuthenticationFactory : IAuthenticationFactory + { + public const string CommonAdTenant = "Common"; + + public AuthenticationFactory() + { + TokenProvider = new AdalTokenProvider(); + } + + public ITokenProvider TokenProvider { get; set; } + + public IAccessToken Authenticate(AzureAccount account, AzureEnvironment environment, string tenant, SecureString password, ShowDialog promptBehavior) + { + var token = TokenProvider.GetAccessToken(GetAdalConfiguration(environment, tenant), promptBehavior, account.Id, password, account.Type); + account.Id = token.UserId; + return token; + } + + public SubscriptionCloudCredentials GetSubscriptionCloudCredentials(AzureContext context) + { + if (context.Subscription == null) + { + throw new ApplicationException(Resources.InvalidCurrentSubscription); + } + + if (context.Account == null) + { + throw new ArgumentException(Resources.InvalidSubscriptionState); + } + + if (context.Account.Type == AzureAccount.AccountType.Certificate) + { + var certificate = ProfileClient.DataStore.GetCertificate(context.Account.Id); + return new CertificateCloudCredentials(context.Subscription.Id.ToString(), certificate); + } + + var tenant = context.Subscription.GetPropertyAsArray(AzureSubscription.Property.Tenants) + .Intersect(context.Account.GetPropertyAsArray(AzureAccount.Property.Tenants)) + .FirstOrDefault(); + + if (tenant == null) + { + throw new ArgumentException(Resources.InvalidSubscriptionState); + } + + try + { + var token = Authenticate(context.Account, context.Environment, tenant, null, ShowDialog.Never); + return new AccessTokenCredential(context.Subscription.Id, token); + } + catch (Exception ex) + { + throw new ArgumentException(Resources.InvalidSubscriptionState, ex); + } + } + + private AdalConfiguration GetAdalConfiguration(AzureEnvironment environment, string tenantId) + { + if (environment == null) + { + throw new ArgumentNullException("environment"); + } + var adEndpoint = environment.Endpoints[AzureEnvironment.Endpoint.ActiveDirectory]; + var adResourceId = environment.Endpoints[AzureEnvironment.Endpoint.ActiveDirectoryServiceEndpointResourceId]; + + return new AdalConfiguration + { + AdEndpoint = adEndpoint, + ResourceClientUri = adResourceId, + AdDomain = tenantId + }; + } + } +} diff --git a/src/Common/Commands.Common/Factories/ClientFactory.cs b/src/Common/Commands.Common/Factories/ClientFactory.cs new file mode 100644 index 000000000000..f5aca60d816d --- /dev/null +++ b/src/Common/Commands.Common/Factories/ClientFactory.cs @@ -0,0 +1,140 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Net; +using System.Net.Http; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Common; + +namespace Microsoft.WindowsAzure.Commands.Common.Factories +{ + public class ClientFactory : IClientFactory + { + private static readonly char[] uriPathSeparator = { '/' }; + + public virtual TClient CreateClient(AzureContext context, AzureEnvironment.Endpoint endpoint) where TClient : ServiceClient + { + if (context == null) + { + throw new ApplicationException(Resources.InvalidCurrentSubscription); + } + + SubscriptionCloudCredentials creds = AzureSession.AuthenticationFactory.GetSubscriptionCloudCredentials(context); + return CreateCustomClient(creds, context.Environment.GetEndpointAsUri(endpoint)); + } + + /// + /// TODO: Migrate all code that references this method to use AzureContext + /// + /// + /// + /// + /// + public virtual TClient CreateClient(AzureSubscription subscription, AzureEnvironment.Endpoint endpoint) where TClient : ServiceClient + { + if (subscription == null) + { + throw new ApplicationException(Resources.InvalidCurrentSubscription); + } + + ProfileClient profileClient = new ProfileClient(); + AzureContext context = new AzureContext + { + Subscription = subscription, + Environment = profileClient.GetEnvironmentOrDefault(subscription.Environment), + Account = profileClient.GetAccount(subscription.Account) + }; + + return CreateClient(context, endpoint); + } + + public virtual TClient CreateCustomClient(params object[] parameters) where TClient : ServiceClient + { + List types = new List(); + foreach (object obj in parameters) + { + types.Add(obj.GetType()); + } + + var constructor = typeof(TClient).GetConstructor(types.ToArray()); + + if (constructor == null) + { + throw new InvalidOperationException(string.Format(Resources.InvalidManagementClientType, typeof(TClient).Name)); + } + + TClient client = (TClient)constructor.Invoke(parameters); + client.UserAgent.Add(ApiConstants.UserAgentValue); + + return client; + } + + public virtual HttpClient CreateHttpClient(string endpoint, ICredentials credentials) + { + return CreateHttpClient(endpoint, CreateHttpClientHandler(endpoint, credentials)); + } + + public virtual HttpClient CreateHttpClient(string endpoint, HttpMessageHandler effectiveHandler) + { + if (endpoint == null) + { + throw new ArgumentNullException("endpoint"); + } + + Uri serviceAddr = new Uri(endpoint); + HttpClient client = new HttpClient(effectiveHandler) + { + BaseAddress = serviceAddr, + MaxResponseContentBufferSize = 30 * 1024 * 1024 + }; + + client.DefaultRequestHeaders.Accept.Clear(); + + return client; + } + + public static HttpClientHandler CreateHttpClientHandler(string endpoint, ICredentials credentials) + { + if (endpoint == null) + { + throw new ArgumentNullException("endpoint"); + } + + // Set up our own HttpClientHandler and configure it + HttpClientHandler clientHandler = new HttpClientHandler(); + + if (credentials != null) + { + // Set up credentials cache which will handle basic authentication + CredentialCache credentialCache = new CredentialCache(); + + // Get base address without terminating slash + string credentialAddress = new Uri(endpoint).GetLeftPart(UriPartial.Authority).TrimEnd(uriPathSeparator); + + // Add credentials to cache and associate with handler + NetworkCredential networkCredentials = credentials.GetCredential(new Uri(credentialAddress), "Basic"); + credentialCache.Add(new Uri(credentialAddress), "Basic", networkCredentials); + clientHandler.Credentials = credentialCache; + clientHandler.PreAuthenticate = true; + } + + // Our handler is ready + return clientHandler; + } + } +} diff --git a/src/Common/Commands.Common/Interfaces/IAuthenticationFactory.cs b/src/Common/Commands.Common/Interfaces/IAuthenticationFactory.cs new file mode 100644 index 000000000000..9e052857a09d --- /dev/null +++ b/src/Common/Commands.Common/Interfaces/IAuthenticationFactory.cs @@ -0,0 +1,36 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Security; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common.Authentication; + +namespace Microsoft.WindowsAzure.Commands.Common +{ + public interface IAuthenticationFactory + { + /// + /// Returns IAccessToken if authentication succeeds or throws an exception if authentication fails. + /// + /// + /// + /// + /// + /// + /// + IAccessToken Authenticate(AzureAccount account, AzureEnvironment environment, string tenant, SecureString password, ShowDialog promptBehavior); + + SubscriptionCloudCredentials GetSubscriptionCloudCredentials(AzureContext context); + } +} diff --git a/src/Common/Commands.Common/Interfaces/IClientFactory.cs b/src/Common/Commands.Common/Interfaces/IClientFactory.cs new file mode 100644 index 000000000000..00aad993a9a9 --- /dev/null +++ b/src/Common/Commands.Common/Interfaces/IClientFactory.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Net; +using System.Net.Http; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Common; +using System; + +namespace Microsoft.WindowsAzure.Commands.Common +{ + public interface IClientFactory + { + TClient CreateClient(AzureContext context, AzureEnvironment.Endpoint endpoint) where TClient : ServiceClient; + + TClient CreateClient(AzureSubscription subscription, AzureEnvironment.Endpoint endpoint) where TClient : ServiceClient; + + TClient CreateCustomClient(params object[] parameters) where TClient : ServiceClient; + + HttpClient CreateHttpClient(string endpoint, ICredentials credentials); + + HttpClient CreateHttpClient(string endpoint, HttpMessageHandler effectiveHandler); + } +} diff --git a/src/Common/Commands.Common/Interfaces/IDataStore.cs b/src/Common/Commands.Common/Interfaces/IDataStore.cs new file mode 100644 index 000000000000..0e1133b55d89 --- /dev/null +++ b/src/Common/Commands.Common/Interfaces/IDataStore.cs @@ -0,0 +1,67 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using System.Security.Cryptography.X509Certificates; +using System.Text; + +namespace Microsoft.WindowsAzure.Commands.Common.Interfaces +{ + public interface IDataStore + { + void WriteFile(string path, string contents); + + void WriteFile(string path, string content, Encoding encoding); + + void WriteFile(string path, byte[] contents); + + string ReadFileAsText(string path); + + Stream ReadFileAsStream(string path); + + byte[] ReadFileAsBytes(string path); + + void RenameFile(string oldPath, string newPath); + + void CopyFile(string oldPath, string newPath); + + bool FileExists(string path); + + void DeleteFile(string path); + + void DeleteDirectory(string dir); + + void EmptyDirectory(string dirPath); + + bool DirectoryExists(string path); + + void CreateDirectory(string path); + + string[] GetDirectories(string sourceDirName); + + string[] GetDirectories(string startDirectory, string filePattern, SearchOption options); + + string[] GetFiles(string sourceDirName); + + string[] GetFiles(string startDirectory, string filePattern, SearchOption options); + + FileAttributes GetFileAttributes(string path); + + X509Certificate2 GetCertificate(string thumbprint); + + void AddCertificate(X509Certificate2 cert); + + void RemoveCertificate(string thumbprint); + } +} diff --git a/src/Common/Commands.Common/Interfaces/IProfileSerializer.cs b/src/Common/Commands.Common/Interfaces/IProfileSerializer.cs new file mode 100644 index 000000000000..e9e296e95e6a --- /dev/null +++ b/src/Common/Commands.Common/Interfaces/IProfileSerializer.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Microsoft.WindowsAzure.Commands.Common.Models; + +namespace Microsoft.WindowsAzure.Commands.Common.Interfaces +{ + public interface IProfileSerializer + { + string Serialize(AzureProfile profile); + + bool Deserialize(string contents, AzureProfile profile); + + IList DeserializeErrors { get; } + } +} diff --git a/src/Common/Commands.Common/MSSharedLibKey.snk b/src/Common/Commands.Common/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/Common/Commands.Common/MSSharedLibKey.snk differ diff --git a/src/Common/Commands.Common/Models/AzureAccount.Methods.cs b/src/Common/Commands.Common/Models/AzureAccount.Methods.cs new file mode 100644 index 000000000000..42601b42c788 --- /dev/null +++ b/src/Common/Commands.Common/Models/AzureAccount.Methods.cs @@ -0,0 +1,145 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Common.Utilities; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; + +namespace Microsoft.WindowsAzure.Commands.Common.Models +{ + public partial class AzureAccount + { + public AzureAccount() + { + Properties = new Dictionary(); + } + + public string GetProperty(Property property) + { + return Properties.GetProperty(property); + } + + public string[] GetPropertyAsArray(Property property) + { + return Properties.GetPropertyAsArray(property); + } + + public void SetProperty(Property property, params string[] values) + { + Properties.SetProperty(property, values); + } + + public void SetOrAppendProperty(Property property, params string[] values) + { + Properties.SetOrAppendProperty(property, values); + } + + public bool IsPropertySet(Property property) + { + return Properties.IsPropertySet(property); + } + + public List GetSubscriptions(AzureProfile profile) + { + string subscriptions = string.Empty; + List subscriptionsList = new List(); + if (Properties.ContainsKey(Property.Subscriptions)) + { + subscriptions = Properties[Property.Subscriptions]; + } + + foreach (var subscription in subscriptions.Split(new [] {','}, StringSplitOptions.RemoveEmptyEntries)) + { + try + { + Guid subscriptionId = new Guid(subscription); + Debug.Assert(profile.Subscriptions.ContainsKey(subscriptionId)); + subscriptionsList.Add(profile.Subscriptions[subscriptionId]); + } + catch + { + // Skip + } + } + + return subscriptionsList; + } + + public bool HasSubscription(Guid subscriptionId) + { + bool exists = false; + string subscriptions = GetProperty(Property.Subscriptions); + + if (!string.IsNullOrEmpty(subscriptions)) + { + exists = subscriptions.Contains(subscriptionId.ToString()); + } + + return exists; + } + + public void SetSubscriptions(List subscriptions) + { + if (subscriptions == null || subscriptions.Count == 0) + { + if (Properties.ContainsKey(Property.Subscriptions)) + { + Properties.Remove(Property.Subscriptions); + } + } + else + { + string value = string.Join(",", subscriptions.Select(s => s.Id.ToString())); + Properties[Property.Subscriptions] = value; + } + } + + public void RemoveSubscription(Guid id) + { + if (HasSubscription(id)) + { + var remainingSubscriptions = GetPropertyAsArray(Property.Subscriptions).Where(s => s != id.ToString()).ToArray(); + + if (remainingSubscriptions.Any()) + { + Properties[Property.Subscriptions] = string.Join(",", remainingSubscriptions); + } + else + { + Properties.Remove(Property.Subscriptions); + } + } + } + + public override bool Equals(object obj) + { + var anotherAccount = obj as AzureAccount; + if (anotherAccount == null) + { + return false; + } + else + { + return anotherAccount.Id == Id; + } + } + + public override int GetHashCode() + { + return Id.GetHashCode(); + } + } +} diff --git a/src/Common/Commands.Common/Models/AzureAccount.cs b/src/Common/Commands.Common/Models/AzureAccount.cs new file mode 100644 index 000000000000..74f8db7fe841 --- /dev/null +++ b/src/Common/Commands.Common/Models/AzureAccount.cs @@ -0,0 +1,47 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; + +namespace Microsoft.WindowsAzure.Commands.Common.Models +{ + public partial class AzureAccount + { + public string Id { get; set; } + + public AccountType Type { get; set; } + + public Dictionary Properties { get; set; } + + public enum AccountType + { + Certificate, + User, + ServicePrincipal + } + + public enum Property + { + /// + /// Comma separated list of subscription ids on this account. + /// + Subscriptions, + + /// + /// Comma separated list of tenants on this account. + /// + Tenants + } + } +} diff --git a/src/Common/Commands.Common/Models/AzureContext.cs b/src/Common/Commands.Common/Models/AzureContext.cs new file mode 100644 index 000000000000..06a21ba3ff41 --- /dev/null +++ b/src/Common/Commands.Common/Models/AzureContext.cs @@ -0,0 +1,25 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Common.Models +{ + public class AzureContext + { + public AzureAccount Account { get; set; } + + public AzureSubscription Subscription { get; set; } + + public AzureEnvironment Environment { get; set; } + } +} diff --git a/src/Common/Commands.Common/Models/AzureEnvironment.Methods.cs b/src/Common/Commands.Common/Models/AzureEnvironment.Methods.cs new file mode 100644 index 000000000000..a4d3d0fee987 --- /dev/null +++ b/src/Common/Commands.Common/Models/AzureEnvironment.Methods.cs @@ -0,0 +1,283 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.Common.Utilities; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.Common.Models +{ + public partial class AzureEnvironment + { + /// + /// Predefined Microsoft Azure environments + /// + public static Dictionary PublicEnvironments + { + get { return environments; } + } + + private const string storageFormatTemplate = "{{0}}://{{1}}.{0}.{1}/"; + + private string EndpointFormatFor(string service) + { + string suffix = GetEndpointSuffix(AzureEnvironment.Endpoint.StorageEndpointSuffix); + + if (!string.IsNullOrEmpty(suffix)) + { + suffix = string.Format(storageFormatTemplate, service, suffix); + } + + return suffix; + } + + /// + /// The storage service blob endpoint format. + /// + private string StorageBlobEndpointFormat() + { + return EndpointFormatFor("blob"); + } + + /// + /// The storage service queue endpoint format. + /// + private string StorageQueueEndpointFormat() + { + return EndpointFormatFor("queue"); + } + + /// + /// The storage service table endpoint format. + /// + private string StorageTableEndpointFormat() + { + return EndpointFormatFor("table"); + } + + /// + /// The storage service file endpoint format. + /// + private string StorageFileEndpointFormat() + { + return EndpointFormatFor("file"); + } + + private static readonly Dictionary environments = + new Dictionary(StringComparer.InvariantCultureIgnoreCase) + { + { + EnvironmentName.AzureCloud, + new AzureEnvironment + { + Name = EnvironmentName.AzureCloud, + Endpoints = new Dictionary + { + { AzureEnvironment.Endpoint.PublishSettingsFileUrl, AzureEnvironmentConstants.AzurePublishSettingsFileUrl }, + { AzureEnvironment.Endpoint.ServiceManagement, AzureEnvironmentConstants.AzureServiceEndpoint }, + { AzureEnvironment.Endpoint.ResourceManager, AzureEnvironmentConstants.AzureResourceManagerEndpoint }, + { AzureEnvironment.Endpoint.ManagementPortalUrl, AzureEnvironmentConstants.AzureManagementPortalUrl }, + { AzureEnvironment.Endpoint.ActiveDirectory, AzureEnvironmentConstants.AzureActiveDirectoryEndpoint }, + { AzureEnvironment.Endpoint.ActiveDirectoryServiceEndpointResourceId, AzureEnvironmentConstants.AzureServiceEndpoint }, + { AzureEnvironment.Endpoint.StorageEndpointSuffix, AzureEnvironmentConstants.AzureStorageEndpointSuffix }, + { AzureEnvironment.Endpoint.Gallery, AzureEnvironmentConstants.GalleryEndpoint }, + { AzureEnvironment.Endpoint.SqlDatabaseDnsSuffix, AzureEnvironmentConstants.AzureSqlDatabaseDnsSuffix }, + { AzureEnvironment.Endpoint.Graph, AzureEnvironmentConstants.AzureGraphEndpoint }, + { AzureEnvironment.Endpoint.TrafficManagerDnsSuffix, AzureEnvironmentConstants.AzureTrafficManagerDnsSuffix }, + } + } + }, + { + EnvironmentName.AzureChinaCloud, + new AzureEnvironment + { + Name = EnvironmentName.AzureChinaCloud, + Endpoints = new Dictionary + { + { AzureEnvironment.Endpoint.PublishSettingsFileUrl, AzureEnvironmentConstants.ChinaPublishSettingsFileUrl }, + { AzureEnvironment.Endpoint.ServiceManagement, AzureEnvironmentConstants.ChinaServiceEndpoint }, + { AzureEnvironment.Endpoint.ResourceManager, null }, + { AzureEnvironment.Endpoint.ManagementPortalUrl, AzureEnvironmentConstants.ChinaManagementPortalUrl }, + { AzureEnvironment.Endpoint.ActiveDirectory, AzureEnvironmentConstants.ChinaActiveDirectoryEndpoint }, + { AzureEnvironment.Endpoint.ActiveDirectoryServiceEndpointResourceId, AzureEnvironmentConstants.ChinaServiceEndpoint }, + { AzureEnvironment.Endpoint.StorageEndpointSuffix, AzureEnvironmentConstants.ChinaStorageEndpointSuffix }, + { AzureEnvironment.Endpoint.Gallery, null }, + { AzureEnvironment.Endpoint.SqlDatabaseDnsSuffix, AzureEnvironmentConstants.ChinaSqlDatabaseDnsSuffix }, + { AzureEnvironment.Endpoint.Graph, null }, + { AzureEnvironment.Endpoint.TrafficManagerDnsSuffix, AzureEnvironmentConstants.ChinaTrafficManagerDnsSuffix }, + } + } + } + }; + + public Uri GetEndpointAsUri(AzureEnvironment.Endpoint endpoint) + { + if (Endpoints.ContainsKey(endpoint)) + { + return new Uri(Endpoints[endpoint]); + } + + return null; + } + + public string GetEndpoint(AzureEnvironment.Endpoint endpoint) + { + if (Endpoints.ContainsKey(endpoint)) + { + return Endpoints[endpoint]; + } + + return null; + } + + public bool IsEndpointSet(AzureEnvironment.Endpoint endpoint) + { + return Endpoints.IsPropertySet(endpoint); + } + + public bool IsEndpointSetToValue(AzureEnvironment.Endpoint endpoint, string url) + { + if (url == null && !Endpoints.IsPropertySet(endpoint)) + { + return true; + } + if (url != null && Endpoints.IsPropertySet(endpoint)) + { + return GetEndpoint(endpoint) + .Trim(new[] {'/'}) + .Equals(url.Trim(new[] {'/'}), StringComparison.InvariantCultureIgnoreCase); + } + return false; + } + + public string GetEndpointSuffix(AzureEnvironment.Endpoint endpointSuffix) + { + if (Endpoints.ContainsKey(endpointSuffix)) + { + return Endpoints[endpointSuffix]; + } + + return null; + } + + /// + /// Gets the endpoint for storage blob. + /// + /// The account name + /// Use Https when creating the URI. Defaults to true. + /// The fully qualified uri to the blob service + public Uri GetStorageBlobEndpoint(string accountName, bool useHttps = true) + { + return new Uri(string.Format(StorageBlobEndpointFormat(), useHttps ? "https" : "http", accountName)); + } + + /// + /// Gets the endpoint for storage queue. + /// + /// The account name + /// Use Https when creating the URI. Defaults to true. + /// The fully qualified uri to the queue service + public Uri GetStorageQueueEndpoint(string accountName, bool useHttps = true) + { + return new Uri(string.Format(StorageQueueEndpointFormat(), useHttps ? "https" : "http", accountName)); + } + + /// + /// Gets the endpoint for storage table. + /// + /// The account name + /// Use Https when creating the URI. Defaults to true. + /// The fully qualified uri to the table service + public Uri GetStorageTableEndpoint(string accountName, bool useHttps = true) + { + return new Uri(string.Format(StorageTableEndpointFormat(), useHttps ? "https" : "http", accountName)); + } + + /// + /// Gets the endpoint for storage file. + /// + /// The account name + /// Use Https when creating the URI. Defaults to true. + /// The fully qualified uri to the file service + public Uri GetStorageFileEndpoint(string accountName, bool useHttps = true) + { + return new Uri(string.Format(StorageFileEndpointFormat(), useHttps ? "https" : "http", accountName)); + } + + /// + /// Gets the management portal URI with a particular realm suffix if supplied + /// + /// Realm for user's account + /// Url to management portal. + public string GetManagementPortalUrlWithRealm(string realm = null) + { + if (realm != null) + { + realm = string.Format(Resources.PublishSettingsFileRealmFormat, realm); + } + else + { + realm = string.Empty; + } + return GetEndpointAsUri(Endpoint.ManagementPortalUrl) + realm; + } + + /// + /// Get the publish settings file download url with a realm suffix if needed. + /// + /// Realm for user's account + /// Url to publish settings file + public string GetPublishSettingsFileUrlWithRealm(string realm = null) + { + if (realm != null) + { + realm = string.Format(Resources.PublishSettingsFileRealmFormat, realm); + } + else + { + realm = string.Empty; + } + return GetEndpointAsUri(Endpoint.PublishSettingsFileUrl) + realm; + } + + public enum Endpoint + { + ActiveDirectoryServiceEndpointResourceId, + + AdTenant, + + Gallery, + + ManagementPortalUrl, + + ServiceManagement, + + PublishSettingsFileUrl, + + ResourceManager, + + SqlDatabaseDnsSuffix, + + StorageEndpointSuffix, + + ActiveDirectory, + + Graph, + + TrafficManagerDnsSuffix, + } + } +} diff --git a/src/Common/Commands.Common/Models/AzureEnvironment.cs b/src/Common/Commands.Common/Models/AzureEnvironment.cs new file mode 100644 index 000000000000..085bad1fe55c --- /dev/null +++ b/src/Common/Commands.Common/Models/AzureEnvironment.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; + +namespace Microsoft.WindowsAzure.Commands.Common.Models +{ + public partial class AzureEnvironment + { + public AzureEnvironment() + { + Endpoints = new Dictionary(); + } + + public string Name { get; set; } + + public Dictionary Endpoints { get; set; } + } +} diff --git a/src/Common/Commands.Common/Models/AzureProfile.cs b/src/Common/Commands.Common/Models/AzureProfile.cs new file mode 100644 index 000000000000..f7f8c77c80fd --- /dev/null +++ b/src/Common/Commands.Common/Models/AzureProfile.cs @@ -0,0 +1,151 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Security.Cryptography.X509Certificates; +using Microsoft.WindowsAzure.Commands.Common.Interfaces; +using Microsoft.WindowsAzure.Common.Internals; +using System.Diagnostics; + +namespace Microsoft.WindowsAzure.Commands.Common.Models +{ + public sealed class AzureProfile + { + private IDataStore store; + private string profilePath; + private string tokenCacheFile = Path.Combine(AzurePowerShell.ProfileDirectory, AzurePowerShell.TokenCacheFile); + + public AzureProfile() + { + Environments = new Dictionary(StringComparer.InvariantCultureIgnoreCase); + Subscriptions = new Dictionary(); + Accounts = new Dictionary(StringComparer.InvariantCultureIgnoreCase); + } + + public AzureProfile(IDataStore store, string profilePath) + { + this.store = store; + this.profilePath = profilePath; + + Load(); + } + + private void Load() + { + Environments = new Dictionary(StringComparer.InvariantCultureIgnoreCase); + Subscriptions = new Dictionary(); + Accounts = new Dictionary(StringComparer.InvariantCultureIgnoreCase); + ProfileLoadErrors = new List(); + + if (!store.DirectoryExists(AzurePowerShell.ProfileDirectory)) + { + store.CreateDirectory(AzurePowerShell.ProfileDirectory); + } + + if (store.FileExists(profilePath)) + { + string contents = store.ReadFileAsText(profilePath); + + IProfileSerializer serializer; + + if (ParserHelper.IsXml(contents)) + { + serializer = new XmlProfileSerializer(); + if (!serializer.Deserialize(contents, this)) + { + ProfileLoadErrors.AddRange(serializer.DeserializeErrors); + } + } + else if (ParserHelper.IsJson(contents)) + { + serializer = new JsonProfileSerializer(); + if (!serializer.Deserialize(contents, this)) + { + ProfileLoadErrors.AddRange(serializer.DeserializeErrors); + } + } + } + + // Adding predefined environments + foreach (AzureEnvironment env in AzureEnvironment.PublicEnvironments.Values) + { + Environments[env.Name] = env; + } + } + + public void Save() + { + // Removing predefined environments + foreach (string env in AzureEnvironment.PublicEnvironments.Keys) + { + Environments.Remove(env); + } + + JsonProfileSerializer jsonSerializer = new JsonProfileSerializer(); + + string contents = jsonSerializer.Serialize(this); + string diskContents = string.Empty; + if (store.FileExists(profilePath)) + { + diskContents = store.ReadFileAsText(profilePath); + } + + if (diskContents != contents) + { + store.WriteFile(profilePath, contents); + } + } + + public List ProfileLoadErrors { get; private set; } + + public Dictionary Environments { get; set; } + + public Dictionary Subscriptions { get; set; } + + public Dictionary Accounts { get; set; } + + public AzureSubscription DefaultSubscription + { + get + { + return Subscriptions.Values.FirstOrDefault( + s => s.Properties.ContainsKey(AzureSubscription.Property.Default)); + } + + set + { + if (value == null) + { + foreach (var subscription in Subscriptions.Values) + { + subscription.SetProperty(AzureSubscription.Property.Default, null); + } + } + else if (Subscriptions.ContainsKey(value.Id)) + { + foreach (var subscription in Subscriptions.Values) + { + subscription.SetProperty(AzureSubscription.Property.Default, null); + } + + Subscriptions[value.Id].Properties[AzureSubscription.Property.Default] = "True"; + value.Properties[AzureSubscription.Property.Default] = "True"; + } + } + } + } +} diff --git a/src/Common/Commands.Common/Models/AzureSubscription.Methods.cs b/src/Common/Commands.Common/Models/AzureSubscription.Methods.cs new file mode 100644 index 000000000000..18025d898ad7 --- /dev/null +++ b/src/Common/Commands.Common/Models/AzureSubscription.Methods.cs @@ -0,0 +1,70 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Microsoft.WindowsAzure.Commands.Common.Utilities; + +namespace Microsoft.WindowsAzure.Commands.Common.Models +{ + public partial class AzureSubscription + { + public AzureSubscription() + { + Properties = new Dictionary(); + } + + public override int GetHashCode() + { + return Id.GetHashCode(); + } + + public string GetProperty(Property property) + { + return Properties.GetProperty(property); + } + + public string[] GetPropertyAsArray(Property property) + { + return Properties.GetPropertyAsArray(property); + } + + public void SetProperty(Property property, params string[] values) + { + Properties.SetProperty(property, values); + } + + public void SetOrAppendProperty(Property property, params string[] values) + { + Properties.SetOrAppendProperty(property, values); + } + + public bool IsPropertySet(Property property) + { + return Properties.IsPropertySet(property); + } + + public override bool Equals(object obj) + { + var anotherSubscription = obj as AzureSubscription; + if (anotherSubscription == null) + { + return false; + } + else + { + return anotherSubscription.Id == Id; + } + } + } +} diff --git a/src/Common/Commands.Common/Models/AzureSubscription.cs b/src/Common/Commands.Common/Models/AzureSubscription.cs new file mode 100644 index 000000000000..252100c4906a --- /dev/null +++ b/src/Common/Commands.Common/Models/AzureSubscription.cs @@ -0,0 +1,57 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; + +namespace Microsoft.WindowsAzure.Commands.Common.Models +{ + public partial class AzureSubscription + { + public Guid Id { get; set; } + + public string Name { get; set; } + + public string Environment { get; set; } + + public string Account { get; set; } + + public Dictionary Properties { get; set; } + + public enum Property + { + /// + /// Comma separated registered resource providers, i.e.: websites,compute,hdinsight + /// + RegisteredResourceProviders, + + /// + /// Comma separated mode names that this subscription supports, i.e.: AzureResourceManager,AzureServiceManagement + /// + SupportedModes, + + /// + /// Associated tenants + /// + Tenants, + + /// + /// If this property existed on the subscription indicates that it's default one. + /// + Default, + + StorageAccount + } + } +} diff --git a/src/Common/Commands.Common/Models/DiskDataStore.cs b/src/Common/Commands.Common/Models/DiskDataStore.cs new file mode 100644 index 000000000000..8cc5e29b9e00 --- /dev/null +++ b/src/Common/Commands.Common/Models/DiskDataStore.cs @@ -0,0 +1,182 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Security.Cryptography.X509Certificates; +using System.Text; +using Microsoft.WindowsAzure.Commands.Common.Interfaces; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.Common.Models +{ + public class DiskDataStore : IDataStore + { + public void WriteFile(string path, string contents) + { + File.WriteAllText(path, contents); + } + + public void WriteFile(string path, string contents, Encoding encoding) + { + File.WriteAllText(path, contents, encoding); + } + + public void WriteFile(string path, byte[] contents) + { + File.WriteAllBytes(path, contents); + } + + public string ReadFileAsText(string path) + { + return File.ReadAllText(path); + } + + public byte[] ReadFileAsBytes(string path) + { + return File.ReadAllBytes(path); + } + + public Stream ReadFileAsStream(string path) + { + return File.Open(path, FileMode.Open, FileAccess.Read); + } + + public void RenameFile(string oldPath, string newPath) + { + File.Move(oldPath, newPath); + } + + public void CopyFile(string oldPath, string newPath) + { + File.Copy(oldPath, newPath, true); + } + + public bool FileExists(string path) + { + return File.Exists(path); + } + + public void DeleteFile(string path) + { + File.Delete(path); + } + + public void DeleteDirectory(string dir) + { + Directory.Delete(dir, true); + } + + public void EmptyDirectory(string dirPath) + { + foreach (var filePath in Directory.GetFiles(dirPath)) + { + File.Delete(filePath); + } + } + + public string[] GetFiles(string sourceDirName) + { + return Directory.GetFiles(sourceDirName); + } + + public string[] GetFiles(string startDirectory, string filePattern, SearchOption options) + { + return Directory.GetFiles(startDirectory, filePattern, options); + } + + public FileAttributes GetFileAttributes(string path) + { + return File.GetAttributes(path); + } + + public X509Certificate2 GetCertificate(string thumbprint) + { + if (thumbprint == null) + { + return null; + } + else + { + Validate.ValidateStringIsNullOrEmpty(thumbprint, "certificate thumbprint"); + X509Certificate2Collection certificates; + if (TryFindCertificatesInStore(thumbprint, StoreLocation.CurrentUser, out certificates) || + TryFindCertificatesInStore(thumbprint, StoreLocation.LocalMachine, out certificates)) + { + return certificates[0]; + } + else + { + throw new ArgumentException(string.Format(Resources.CertificateNotFoundInStore, thumbprint)); + } + } + } + + private static bool TryFindCertificatesInStore(string thumbprint, + StoreLocation location, out X509Certificate2Collection certificates) + { + X509Store store = new X509Store(StoreName.My, location); + store.Open(OpenFlags.ReadOnly); + certificates = store.Certificates.Find(X509FindType.FindByThumbprint, thumbprint, false); + store.Close(); + + return certificates.Count > 0; + } + + public void AddCertificate(X509Certificate2 certificate) + { + Validate.ValidateNullArgument(certificate, Resources.InvalidCertificate); + X509Store store = new X509Store(StoreName.My, StoreLocation.CurrentUser); + store.Open(OpenFlags.ReadWrite); + store.Add(certificate); + store.Close(); + } + + public void RemoveCertificate(string thumbprint) + { + if (thumbprint != null) + { + var certificate = GetCertificate(thumbprint); + if (certificate != null) + { + X509Store store = new X509Store(StoreName.My, StoreLocation.CurrentUser); + store.Open(OpenFlags.ReadWrite); + store.Remove(certificate); + store.Close(); + } + } + } + + public bool DirectoryExists(string path) + { + return Directory.Exists(path); + } + + public void CreateDirectory(string path) + { + Directory.CreateDirectory(path); + } + + public string[] GetDirectories(string sourceDirName) + { + return Directory.GetDirectories(sourceDirName); + } + + public string[] GetDirectories(string startDirectory, string filePattern, SearchOption options) + { + return Directory.GetDirectories(startDirectory, filePattern, options); + } + } +} diff --git a/src/Common/Commands.Common/Models/JsonProfileSerializer.cs b/src/Common/Commands.Common/Models/JsonProfileSerializer.cs new file mode 100644 index 000000000000..ea0a6a272f59 --- /dev/null +++ b/src/Common/Commands.Common/Models/JsonProfileSerializer.cs @@ -0,0 +1,92 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.WindowsAzure.Commands.Common.Interfaces; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; + +namespace Microsoft.WindowsAzure.Commands.Common.Models +{ + public class JsonProfileSerializer : IProfileSerializer + { + public string Serialize(AzureProfile profile) + { + return JsonConvert.SerializeObject(new + { + Environments = profile.Environments.Values.ToList(), + Subscriptions = profile.Subscriptions.Values.ToList(), + Accounts = profile.Accounts.Values.ToList() + }, Formatting.Indented); + } + + public bool Deserialize(string contents, AzureProfile profile) + { + DeserializeErrors = new List(); + + try + { + var jsonProfile = JObject.Parse(contents); + + foreach (var env in jsonProfile["Environments"]) + { + try + { + profile.Environments[(string) env["Name"]] = + JsonConvert.DeserializeObject(env.ToString()); + } + catch (Exception ex) + { + DeserializeErrors.Add(ex.Message); + } + } + + foreach (var subscription in jsonProfile["Subscriptions"]) + { + try + { + profile.Subscriptions[new Guid((string) subscription["Id"])] = + JsonConvert.DeserializeObject(subscription.ToString()); + } + catch (Exception ex) + { + DeserializeErrors.Add(ex.Message); + } + } + + foreach (var account in jsonProfile["Accounts"]) + { + try + { + profile.Accounts[(string) account["Id"]] = + JsonConvert.DeserializeObject(account.ToString()); + } + catch (Exception ex) + { + DeserializeErrors.Add(ex.Message); + } + } + } + catch (Exception ex) + { + DeserializeErrors.Add(ex.Message); + } + return DeserializeErrors.Count == 0; + } + + public IList DeserializeErrors { get; private set; } + } +} diff --git a/src/Common/Commands.Common/Models/RecordingTracingInterceptor.cs b/src/Common/Commands.Common/Models/RecordingTracingInterceptor.cs new file mode 100644 index 000000000000..03b40f1815e7 --- /dev/null +++ b/src/Common/Commands.Common/Models/RecordingTracingInterceptor.cs @@ -0,0 +1,98 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Net.Http; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.Common.Models +{ + public class RecordingTracingInterceptor : ICloudTracingInterceptor + { + public RecordingTracingInterceptor() + { + MessageQueue = new ConcurrentQueue(); + } + + public ConcurrentQueue MessageQueue { get; private set; } + + private void Write(string message, params object[] arguments) + { + if (arguments == null || arguments.Length == 0) + { + MessageQueue.Enqueue(message); + } + else + { + MessageQueue.Enqueue(string.Format(message, arguments)); + } + } + + public void Information(string message) + { + // Ignore + } + + public void Configuration(string source, string name, string value) + { + // Ignore + } + + public void Enter(string invocationId, object instance, string method, IDictionary parameters) + { + // Ignore + } + + public void SendRequest(string invocationId, HttpRequestMessage request) + { + Write(GeneralUtilities.GetLog(request)); + } + + public void ReceiveResponse(string invocationId, HttpResponseMessage response) + { + Write(GeneralUtilities.GetLog(response)); + } + + public void Error(string invocationId, Exception ex) + { + // Ignore + } + + public void Exit(string invocationId, object result) + { + // Ignore + } + + public static void AddToContext(RecordingTracingInterceptor interceptor) + { + RemoveFromContext(interceptor); + CloudContext.Configuration.Tracing.AddTracingInterceptor(interceptor); + } + + public static void RemoveFromContext(RecordingTracingInterceptor interceptor) + { + try + { + CloudContext.Configuration.Tracing.RemoveTracingInterceptor(interceptor); + } + catch + { + // Ignore + } + } + } +} + diff --git a/src/Common/Commands.Common/Models/XmlProfileSerializer.cs b/src/Common/Commands.Common/Models/XmlProfileSerializer.cs new file mode 100644 index 000000000000..eed2616eacd9 --- /dev/null +++ b/src/Common/Commands.Common/Models/XmlProfileSerializer.cs @@ -0,0 +1,98 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Xml; +using Microsoft.WindowsAzure.Commands.Common.Interfaces; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.Common.Models +{ + public class XmlProfileSerializer : IProfileSerializer + { + public string Serialize(AzureProfile obj) + { + // We do not use the serialize for xml serializer anymore and rely solely on the JSON serializer. + throw new NotImplementedException(); + } + + public bool Deserialize(string contents, AzureProfile profile) + { + ProfileData data = null; + Debug.Assert(profile != null); + + DeserializeErrors = new List(); + + DataContractSerializer serializer = new DataContractSerializer(typeof(ProfileData)); + using (MemoryStream s = new MemoryStream(Encoding.UTF8.GetBytes(contents ?? ""))) + { + data = (ProfileData)serializer.ReadObject(s); + } + + if (data != null) + { + foreach (AzureEnvironmentData oldEnv in data.Environments) + { + profile.Environments[oldEnv.Name] = oldEnv.ToAzureEnvironment(); + } + + List envs = profile.Environments.Values.ToList(); + foreach (AzureSubscriptionData oldSubscription in data.Subscriptions) + { + try + { + var newSubscription = oldSubscription.ToAzureSubscription(envs); + if (newSubscription.Account == null) + { + continue; + } + + var newAccounts = oldSubscription.ToAzureAccounts(); + foreach (var account in newAccounts) + { + if (profile.Accounts.ContainsKey(account.Id)) + { + profile.Accounts[account.Id].SetOrAppendProperty(AzureAccount.Property.Tenants, + account.GetPropertyAsArray(AzureAccount.Property.Tenants)); + profile.Accounts[account.Id].SetOrAppendProperty(AzureAccount.Property.Subscriptions, + account.GetPropertyAsArray(AzureAccount.Property.Subscriptions)); + } + else + { + profile.Accounts[account.Id] = account; + } + } + + profile.Subscriptions[newSubscription.Id] = newSubscription; + } + catch (Exception ex) + { + // Skip subscription if failed to load + DeserializeErrors.Add(ex.Message); + } + } + } + + return DeserializeErrors.Count == 0; + } + + public IList DeserializeErrors { get; private set; } + } +} diff --git a/src/Common/Commands.Common/Properties/AssemblyInfo.cs b/src/Common/Commands.Common/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..d1a1d4ab1791 --- /dev/null +++ b/src/Common/Commands.Common/Properties/AssemblyInfo.cs @@ -0,0 +1,54 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Microsoft Azure Powershell - Common Library")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] + +[assembly: ComVisible(false)] +[assembly: CLSCompliant(false)] +[assembly: Guid("4f3ab2e4-cc7a-43ac-bb15-f481fcf94d58")] +[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] +[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] +#if SIGN +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.CloudService, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.Websites, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.Test.Utilities, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.CloudService.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.Websites.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.ScenarioTest, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.WAPackIaaS.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.WAPackIaaS.FunctionalTest, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.Common.Storage, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +#else +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.CloudService")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.Websites")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.Test.Utilities")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.Test")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.CloudService.Test")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.Websites.Test")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.ScenarioTest")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.WAPackIaaS.Test")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.WAPackIaaS.FunctionalTest")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.Common.Storage")] +#endif diff --git a/src/Common/Commands.Common/Properties/Resources.Designer.cs b/src/Common/Commands.Common/Properties/Resources.Designer.cs new file mode 100644 index 000000000000..1414d46eb5da --- /dev/null +++ b/src/Common/Commands.Common/Properties/Resources.Designer.cs @@ -0,0 +1,4263 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.WindowsAzure.Commands.Common.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.WindowsAzure.Commands.Common.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to The remote server returned an error: (401) Unauthorized.. + /// + public static string AccessDeniedExceptionMessage { + get { + return ResourceManager.GetString("AccessDeniedExceptionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account id doesn't match one in subscription.. + /// + public static string AccountIdDoesntMatchSubscription { + get { + return ResourceManager.GetString("AccountIdDoesntMatchSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account "{0}" has been added.. + /// + public static string AddAccountAdded { + get { + return ResourceManager.GetString("AddAccountAdded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to To switch to a different subscription, please use Select-AzureSubscription.. + /// + public static string AddAccountChangeSubscription { + get { + return ResourceManager.GetString("AddAccountChangeSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Skipping external tenant {0}, because you are using a guest or a foreign principal object identity. In order to access this tenant, please run Add-AzureAccount without "-Credential".. + /// + public static string AddAccountNonInteractiveGuestOrFpo { + get { + return ResourceManager.GetString("AddAccountNonInteractiveGuestOrFpo", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Subscription "{0}" is selected as the default subscription.. + /// + public static string AddAccountShowDefaultSubscription { + get { + return ResourceManager.GetString("AddAccountShowDefaultSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to To view all the subscriptions, please use Get-AzureSubscription.. + /// + public static string AddAccountViewSubscriptions { + get { + return ResourceManager.GetString("AddAccountViewSubscriptions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-On {0} is created successfully.. + /// + public static string AddOnCreatedMessage { + get { + return ResourceManager.GetString("AddOnCreatedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-on name {0} is already used.. + /// + public static string AddOnNameAlreadyUsed { + get { + return ResourceManager.GetString("AddOnNameAlreadyUsed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-On {0} not found.. + /// + public static string AddOnNotFound { + get { + return ResourceManager.GetString("AddOnNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-on {0} is removed successfully.. + /// + public static string AddOnRemovedMessage { + get { + return ResourceManager.GetString("AddOnRemovedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-On {0} is updated successfully.. + /// + public static string AddOnUpdatedMessage { + get { + return ResourceManager.GetString("AddOnUpdatedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role has been created at {0}\{1}.. + /// + public static string AddRoleMessageCreate { + get { + return ResourceManager.GetString("AddRoleMessageCreate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for Node.js by running ‘npm install azure’.. + /// + public static string AddRoleMessageCreateNode { + get { + return ResourceManager.GetString("AddRoleMessageCreateNode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for PHP by running "pear WindowsAzure/WindowsAzure".. + /// + public static string AddRoleMessageCreatePHP { + get { + return ResourceManager.GetString("AddRoleMessageCreatePHP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for Python by running "pip windowsazure".. + /// + public static string AddRoleMessageCreatePython { + get { + return ResourceManager.GetString("AddRoleMessageCreatePython", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to set role permissions. Please give the 'Network Service' user 'Read & execute' and 'Modify' permissions to the role folder, or run PowerShell as an Administrator. + /// + public static string AddRoleMessageInsufficientPermissions { + get { + return ResourceManager.GetString("AddRoleMessageInsufficientPermissions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A role name '{0}' already exists. + /// + public static string AddRoleMessageRoleExists { + get { + return ResourceManager.GetString("AddRoleMessageRoleExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Profile {0} already has an endpoint with name {1}. + /// + public static string AddTrafficManagerEndpointFailed { + get { + return ResourceManager.GetString("AddTrafficManagerEndpointFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Windows Azure Powershell\. + /// + public static string AzureDirectory { + get { + return ResourceManager.GetString("AzureDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Windows Azure Powershell. + /// + public static string AzureDirectoryName { + get { + return ResourceManager.GetString("AzureDirectoryName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Emulator. + /// + public static string AzureEmulatorDirectory { + get { + return ResourceManager.GetString("AzureEmulatorDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure Emulator is not installed and is required. + /// + public static string AzureEmulatorNotInstalledMessage { + get { + return ResourceManager.GetString("AzureEmulatorNotInstalledMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure Emulator\emulator. + /// + public static string AzureEmulatorPathPortion { + get { + return ResourceManager.GetString("AzureEmulatorPathPortion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SOFTWARE\Microsoft\Windows Azure Emulator. + /// + public static string AzureEmulatorRegistryKey { + get { + return ResourceManager.GetString("AzureEmulatorRegistryKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure service management error + ///{0}. + /// + public static string AzureException_WrapExistingError_DetailedErrorFormat { + get { + return ResourceManager.GetString("AzureException_WrapExistingError_DetailedErrorFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to https://manage.windowsazure.com. + /// + public static string AzurePortalUrl { + get { + return ResourceManager.GetString("AzurePortalUrl", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AZURE_PORTAL_URL. + /// + public static string AzurePortalUrlEnv { + get { + return ResourceManager.GetString("AzurePortalUrlEnv", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure SDK\{0}\. + /// + public static string AzureSdkDirectory { + get { + return ResourceManager.GetString("AzureSdkDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to InstallPath. + /// + public static string AzureSdkInstallPathRegistryKeyValue { + get { + return ResourceManager.GetString("AzureSdkInstallPathRegistryKeyValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SOFTWARE\Microsoft\Microsoft SDKs\ServiceHosting. + /// + public static string AzureSdkRegistryKeyName { + get { + return ResourceManager.GetString("AzureSdkRegistryKeyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The installed Azure SDK version is not supported. Make sure you version is between {0} and {1} inclusive. + /// + public static string AzureSdkVersionNotSupported { + get { + return ResourceManager.GetString("AzureSdkVersionNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure Authoring Tools are not installed and are required. Installation of Azure SDK for .NET is recommended with Microsoft Web Platform Installer (PI) available at http://www.microsoft.com/web/downloads/platform.aspx.. + /// + public static string AzureToolsNotInstalledMessage { + get { + return ResourceManager.GetString("AzureToolsNotInstalledMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Base Uri was empty.. + /// + public static string BaseUriEmpty { + get { + return ResourceManager.GetString("BaseUriEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} begin processing without ParameterSet.. + /// + public static string BeginProcessingWithoutParameterSetLog { + get { + return ResourceManager.GetString("BeginProcessingWithoutParameterSetLog", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} begin processing with ParameterSet '{1}'.. + /// + public static string BeginProcessingWithParameterSetLog { + get { + return ResourceManager.GetString("BeginProcessingWithParameterSetLog", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Blob with the name {0} already exists in the account.. + /// + public static string BlobAlreadyExistsInTheAccount { + get { + return ResourceManager.GetString("BlobAlreadyExistsInTheAccount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to https://{0}.blob.core.windows.net/. + /// + public static string BlobEndpointUri { + get { + return ResourceManager.GetString("BlobEndpointUri", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AZURE_BLOBSTORAGE_TEMPLATE. + /// + public static string BlobEndpointUriEnv { + get { + return ResourceManager.GetString("BlobEndpointUriEnv", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Memcache is already enabled for role '{0}'.. + /// + public static string CacheAlreadyEnabledMessage { + get { + return ResourceManager.GetString("CacheAlreadyEnabledMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <configuration> + /// <configSections> + /// <section name="dataCacheClients" type="Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core" allowLocation="true" allowDefinition="Everywhere" /> + /// </configSections> + /// <dataCacheClients> + /// <tracing sinkType="DiagnosticSink" traceLevel="Error" /> + /// <dataCacheClient name="DefaultShimConfig" useLegacyProtocol="false"> + /// <autoDiscover isEnabled="true" identifier="$RoleName$" /> + /// </dataCacheClient> + /// </da [rest of string was truncated]";. + /// + public static string CacheAutoDiscoveryConfig { + get { + return ResourceManager.GetString("CacheAutoDiscoveryConfig", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Plugins.Caching.ClientDiagnosticLevel. + /// + public static string CacheClientDiagnosticLevelAssemblyName { + get { + return ResourceManager.GetString("CacheClientDiagnosticLevelAssemblyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to DiagnosticStore. + /// + public static string CacheDiagnosticStoreName { + get { + return ResourceManager.GetString("CacheDiagnosticStoreName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please upgrade the cache runtime of role '{0}' to '{1}' using Set-AzureServiceProjectRole -RoleName {0} -Runtime Cache -Version {1}. + /// + public static string CacheMismatchMessage { + get { + return ResourceManager.GetString("CacheMismatchMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to CACHERUNTIMEURL. + /// + public static string CacheRuntimeUrl { + get { + return ResourceManager.GetString("CacheRuntimeUrl", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to cache. + /// + public static string CacheRuntimeValue { + get { + return ResourceManager.GetString("CacheRuntimeValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to CacheRuntimeVersion. + /// + public static string CacheRuntimeVersionKey { + get { + return ResourceManager.GetString("CacheRuntimeVersionKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resources\Scaffolding\Cache. + /// + public static string CacheScaffolding { + get { + return ResourceManager.GetString("CacheScaffolding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to setup_cache.cmd > cache_log.txt. + /// + public static string CacheStartupCommand { + get { + return ResourceManager.GetString("CacheStartupCommand", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installing caching version {0} for Role '{1}' (the caching version locally installed is: {2}). + /// + public static string CacheVersionWarningText { + get { + return ResourceManager.GetString("CacheVersionWarningText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Plugins.Caching.CacheSizePercentage. + /// + public static string CachingCacheSizePercentageSettingName { + get { + return ResourceManager.GetString("CachingCacheSizePercentageSettingName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Plugins.Caching.ConfigStoreConnectionString. + /// + public static string CachingConfigStoreConnectionStringSettingName { + get { + return ResourceManager.GetString("CachingConfigStoreConnectionStringSettingName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to DefaultEndpointsProtocol=https;AccountName={0};AccountKey={1}. + /// + public static string CachingConfigStoreConnectionStringSettingValue { + get { + return ResourceManager.GetString("CachingConfigStoreConnectionStringSettingValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Caching. + /// + public static string CachingModuleName { + get { + return ResourceManager.GetString("CachingModuleName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find {0} with name {1}.. + /// + public static string CannotFind { + get { + return ResourceManager.GetString("CannotFind", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deployment for service {0} with {1} slot doesn't exist. + /// + public static string CannotFindDeployment { + get { + return ResourceManager.GetString("CannotFindDeployment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Can't find valid Microsoft Azure role in current directory {0}. + /// + public static string CannotFindRole { + get { + return ResourceManager.GetString("CannotFindRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service {0} configuration file (ServiceConfiguration.Cloud.cscfg) is either null or doesn't exist. + /// + public static string CannotFindServiceConfigurationFile { + get { + return ResourceManager.GetString("CannotFindServiceConfigurationFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid service path! Cannot locate ServiceDefinition.csdef in current folder or parent folders.. + /// + public static string CannotFindServiceRoot { + get { + return ResourceManager.GetString("CannotFindServiceRoot", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription named {0} with id {1} is not currently imported. You must import this subscription before it can be updated.. + /// + public static string CannotUpdateUnknownSubscription { + get { + return ResourceManager.GetString("CannotUpdateUnknownSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ManagementCertificate. + /// + public static string CertificateElementName { + get { + return ResourceManager.GetString("CertificateElementName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to certificate.pfx. + /// + public static string CertificateFileName { + get { + return ResourceManager.GetString("CertificateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Certificate imported into CurrentUser\My\{0}. + /// + public static string CertificateImportedMessage { + get { + return ResourceManager.GetString("CertificateImportedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No certificate was found in the certificate store with thumbprint {0}. + /// + public static string CertificateNotFoundInStore { + get { + return ResourceManager.GetString("CertificateNotFoundInStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No certificate was found in the certificate store with thumbprint {0}. + /// + public static string CertificateNotFoundInStore1 { + get { + return ResourceManager.GetString("CertificateNotFoundInStore1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Your account does not have access to the private key for certificate {0}. + /// + public static string CertificatePrivateKeyAccessError { + get { + return ResourceManager.GetString("CertificatePrivateKeyAccessError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} {1} deployment for {2} service. + /// + public static string ChangeDeploymentStateWaitMessage { + get { + return ResourceManager.GetString("ChangeDeploymentStateWaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cloud service {0} is in {1} state.. + /// + public static string ChangeDeploymentStatusCompleteMessage { + get { + return ResourceManager.GetString("ChangeDeploymentStatusCompleteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Changing/Removing public environment '{0}' is not allowed.. + /// + public static string ChangePublicEnvironmentMessage { + get { + return ResourceManager.GetString("ChangePublicEnvironmentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service {0} is set to value {1}. + /// + public static string ChangeSettingsElementMessage { + get { + return ResourceManager.GetString("ChangeSettingsElementMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Changing public environment is not supported.. + /// + public static string ChangingDefaultEnvironmentNotSupported { + get { + return ResourceManager.GetString("ChangingDefaultEnvironmentNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Choose which publish settings file to use:. + /// + public static string ChoosePublishSettingsFile { + get { + return ResourceManager.GetString("ChoosePublishSettingsFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Plugins.Caching.ClientDiagnosticLevel. + /// + public static string ClientDiagnosticLevelName { + get { + return ResourceManager.GetString("ClientDiagnosticLevelName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 1. + /// + public static string ClientDiagnosticLevelValue { + get { + return ResourceManager.GetString("ClientDiagnosticLevelValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to cloud_package.cspkg. + /// + public static string CloudPackageFileName { + get { + return ResourceManager.GetString("CloudPackageFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceConfiguration.Cloud.cscfg. + /// + public static string CloudServiceConfigurationFileName { + get { + return ResourceManager.GetString("CloudServiceConfigurationFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-ons for {0}. + /// + public static string CloudServiceDescription { + get { + return ResourceManager.GetString("CloudServiceDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Communication could not be established. This could be due to an invalid subscription ID. Note that subscription IDs are case sensitive.. + /// + public static string CommunicationCouldNotBeEstablished { + get { + return ResourceManager.GetString("CommunicationCouldNotBeEstablished", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Complete. + /// + public static string CompleteMessage { + get { + return ResourceManager.GetString("CompleteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Complete. + /// + public static string CompleteMessage1 { + get { + return ResourceManager.GetString("CompleteMessage1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to config.json. + /// + public static string ConfigurationFileName { + get { + return ResourceManager.GetString("ConfigurationFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to VirtualMachine creation failed.. + /// + public static string CreateFailedErrorMessage { + get { + return ResourceManager.GetString("CreateFailedErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creating the website failed. If this is the first website for this subscription, please create it using the management portal instead.. + /// + public static string CreateWebsiteFailed { + get { + return ResourceManager.GetString("CreateWebsiteFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to -Credential parameter can only be used with Organization ID credentials. For more information, please refer to http://go.microsoft.com/fwlink/?linkid=331007&clcid=0x409 for more information about the difference between an organizational account and a Microsoft account.. + /// + public static string CredentialOrganizationIdMessage { + get { + return ResourceManager.GetString("CredentialOrganizationIdMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core. + /// + public static string DataCacheClientsType { + get { + return ResourceManager.GetString("DataCacheClientsType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to //blobcontainer[@datacenter='{0}']. + /// + public static string DatacenterBlobQuery { + get { + return ResourceManager.GetString("DatacenterBlobQuery", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Setting: {0} as the default and current subscription. To view other subscriptions use Get-AzureSubscription. + /// + public static string DefaultAndCurrentSubscription { + get { + return ResourceManager.GetString("DefaultAndCurrentSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to none. + /// + public static string DefaultFileVersion { + get { + return ResourceManager.GetString("DefaultFileVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There are no hostnames which could be used for validation.. + /// + public static string DefaultHostnamesValidation { + get { + return ResourceManager.GetString("DefaultHostnamesValidation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 8080. + /// + public static string DefaultPort { + get { + return ResourceManager.GetString("DefaultPort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 1000. + /// + public static string DefaultRoleCachingInMB { + get { + return ResourceManager.GetString("DefaultRoleCachingInMB", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Auto. + /// + public static string DefaultUpgradeMode { + get { + return ResourceManager.GetString("DefaultUpgradeMode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 80. + /// + public static string DefaultWebPort { + get { + return ResourceManager.GetString("DefaultWebPort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Delete. + /// + public static string Delete { + get { + return ResourceManager.GetString("Delete", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The {0} slot for service {1} is already in {2} state. + /// + public static string DeploymentAlreadyInState { + get { + return ResourceManager.GetString("DeploymentAlreadyInState", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The deployment in {0} slot for service {1} is removed. + /// + public static string DeploymentRemovedMessage { + get { + return ResourceManager.GetString("DeploymentRemovedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Plugins.Caching.DiagnosticLevel. + /// + public static string DiagnosticLevelName { + get { + return ResourceManager.GetString("DiagnosticLevelName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 1. + /// + public static string DiagnosticLevelValue { + get { + return ResourceManager.GetString("DiagnosticLevelValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The key to add already exists in the dictionary.. + /// + public static string DictionaryAddAlreadyContainsKey { + get { + return ResourceManager.GetString("DictionaryAddAlreadyContainsKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The array index cannot be less than zero.. + /// + public static string DictionaryCopyToArrayIndexLessThanZero { + get { + return ResourceManager.GetString("DictionaryCopyToArrayIndexLessThanZero", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The supplied array does not have enough room to contain the copied elements.. + /// + public static string DictionaryCopyToArrayTooShort { + get { + return ResourceManager.GetString("DictionaryCopyToArrayTooShort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided dns {0} doesn't exist. + /// + public static string DnsDoesNotExist { + get { + return ResourceManager.GetString("DnsDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft Azure Certificate. + /// + public static string EnableRemoteDesktop_FriendlyCertificateName { + get { + return ResourceManager.GetString("EnableRemoteDesktop_FriendlyCertificateName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Endpoint can't be retrieved for storage account. + /// + public static string EndPointNotFoundForBlobStorage { + get { + return ResourceManager.GetString("EndPointNotFoundForBlobStorage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} end processing.. + /// + public static string EndProcessingLog { + get { + return ResourceManager.GetString("EndProcessingLog", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to To use Active Directory authentication, you must configure the ActiveDirectoryEndpoint, ActiveDirectoryTenantId, and ActiveDirectorServiceEndpointResourceId for environment of '{0}'. You can configure these properties for this environment using the Set-AzureEnvironment cmdlet.. + /// + public static string EnvironmentDoesNotSupportActiveDirectory { + get { + return ResourceManager.GetString("EnvironmentDoesNotSupportActiveDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The environment '{0}' already exists.. + /// + public static string EnvironmentExists { + get { + return ResourceManager.GetString("EnvironmentExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Environment name doesn't match one in subscription.. + /// + public static string EnvironmentNameDoesntMatchSubscription { + get { + return ResourceManager.GetString("EnvironmentNameDoesntMatchSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The environment name '{0}' is not found.. + /// + public static string EnvironmentNotFound { + get { + return ResourceManager.GetString("EnvironmentNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to environments.xml. + /// + public static string EnvironmentsFileName { + get { + return ResourceManager.GetString("EnvironmentsFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error creating VirtualMachine. + /// + public static string ErrorCreatingVirtualMachine { + get { + return ResourceManager.GetString("ErrorCreatingVirtualMachine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to download available runtimes for location '{0}'. + /// + public static string ErrorRetrievingRuntimesForLocation { + get { + return ResourceManager.GetString("ErrorRetrievingRuntimesForLocation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error updating VirtualMachine. + /// + public static string ErrorUpdatingVirtualMachine { + get { + return ResourceManager.GetString("ErrorUpdatingVirtualMachine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Your Microsoft Azure credential in the Windows PowerShell session has expired. Please use Add-AzureAccount to login again.. + /// + public static string ExpiredRefreshToken { + get { + return ResourceManager.GetString("ExpiredRefreshToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Job Id {0} failed. Error: {1}, ExceptionDetails: {2}. + /// + public static string FailedJobErrorMessage { + get { + return ResourceManager.GetString("FailedJobErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The HTTP request was forbidden with client authentication scheme 'Anonymous'.. + /// + public static string FirstPurchaseErrorMessage { + get { + return ResourceManager.GetString("FirstPurchaseErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This add-on requires you to purchase the first instance through the Microsoft Azure Portal. Subsequent purchases can be performed through PowerShell.. + /// + public static string FirstPurchaseMessage { + get { + return ResourceManager.GetString("FirstPurchaseMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation Status:. + /// + public static string GatewayOperationStatus { + get { + return ResourceManager.GetString("GatewayOperationStatus", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resources\Scaffolding\General. + /// + public static string GeneralScaffolding { + get { + return ResourceManager.GetString("GeneralScaffolding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Getting all available Microsoft Azure Add-Ons, this may take few minutes.... + /// + public static string GetAllAddOnsWaitMessage { + get { + return ResourceManager.GetString("GetAllAddOnsWaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Name{0}Primary Key{0}Seconday Key. + /// + public static string GetStorageKeysHeader { + get { + return ResourceManager.GetString("GetStorageKeysHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Git not found. Please install git and place it in your command line path.. + /// + public static string GitNotFound { + get { + return ResourceManager.GetString("GitNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not find publish settings. Please run Import-AzurePublishSettingsFile.. + /// + public static string GlobalSettingsManager_Load_PublishSettingsNotFound { + get { + return ResourceManager.GetString("GlobalSettingsManager_Load_PublishSettingsNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not find publish settings. Please run Import-AzurePublishSettingsFile.. + /// + public static string GlobalSettingsManager_Load_PublishSettingsNotFound1 { + get { + return ResourceManager.GetString("GlobalSettingsManager_Load_PublishSettingsNotFound1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to iisnode.dll. + /// + public static string IISNodeDll { + get { + return ResourceManager.GetString("IISNodeDll", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to iisnode. + /// + public static string IISNodeEngineKey { + get { + return ResourceManager.GetString("IISNodeEngineKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to iisnode-dev\\release\\x64. + /// + public static string IISNodePath { + get { + return ResourceManager.GetString("IISNodePath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to iisnode. + /// + public static string IISNodeRuntimeValue { + get { + return ResourceManager.GetString("IISNodeRuntimeValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installing IISNode version {0} in Azure for WebRole '{1}' (the version locally installed is: {2}). + /// + public static string IISNodeVersionWarningText { + get { + return ResourceManager.GetString("IISNodeVersionWarningText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Illegal characters in path.. + /// + public static string IllegalPath { + get { + return ResourceManager.GetString("IllegalPath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Illegal characters in path.. + /// + public static string IllegalPath1 { + get { + return ResourceManager.GetString("IllegalPath1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Server Error. + /// + public static string InternalServerErrorMessage { + get { + return ResourceManager.GetString("InternalServerErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot enable memcach protocol on a cache worker role {0}.. + /// + public static string InvalidCacheRoleName { + get { + return ResourceManager.GetString("InvalidCacheRoleName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid certificate format. Publish settings may be corrupted. Use Get-AzurePublishSettingsFile to download updated settings. + /// + public static string InvalidCertificate { + get { + return ResourceManager.GetString("InvalidCertificate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid certificate format. Publish settings may be corrupted. Use Get-AzurePublishSettingsFile to download updated settings. + /// + public static string InvalidCertificate1 { + get { + return ResourceManager.GetString("InvalidCertificate1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid certificate format.. + /// + public static string InvalidCertificateSingle { + get { + return ResourceManager.GetString("InvalidCertificateSingle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided configuration path is invalid or doesn't exist. + /// + public static string InvalidConfigPath { + get { + return ResourceManager.GetString("InvalidConfigPath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The country name is invalid, please use a valid two character country code, as described in ISO 3166-1 alpha-2.. + /// + public static string InvalidCountryNameMessage { + get { + return ResourceManager.GetString("InvalidCountryNameMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Credential type invalid, only handles '{0}'. + /// + public static string InvalidCredentialType { + get { + return ResourceManager.GetString("InvalidCredentialType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No current subscription has been designated. Use Select-AzureSubscription -Current <subscriptionName> to set the current subscription.. + /// + public static string InvalidCurrentSubscription { + get { + return ResourceManager.GetString("InvalidCurrentSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The ID of the current subscription is invalid. Use Set-AzureSubscription to fix the subscription ID or use Select-AzureSubscription to use a different subscription.. + /// + public static string InvalidCurrentSubscriptionId { + get { + return ResourceManager.GetString("InvalidCurrentSubscriptionId", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The management certificate of the current subscription is invalid. Use Set-AzureSubscription to fix the management certificate or use Select-AzureSubscription to use a different subscription.. + /// + public static string InvalidCurrentSuscriptionCertificate { + get { + return ResourceManager.GetString("InvalidCurrentSuscriptionCertificate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No default subscription has been designated. Use Select-AzureSubscription -Default <subscriptionName> to set the default subscription.. + /// + public static string InvalidDefaultSubscription { + get { + return ResourceManager.GetString("InvalidDefaultSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deployment with {0} does not exist. + /// + public static string InvalidDeployment { + get { + return ResourceManager.GetString("InvalidDeployment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The deployment slot name {0} is invalid. Slot name must be either "Staging" or "Production".. + /// + public static string InvalidDeploymentSlot { + get { + return ResourceManager.GetString("InvalidDeploymentSlot", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to "{0}" is an invalid DNS name for {1}. + /// + public static string InvalidDnsName { + get { + return ResourceManager.GetString("InvalidDnsName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid service endpoint.. + /// + public static string InvalidEndpoint { + get { + return ResourceManager.GetString("InvalidEndpoint", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided file in {0} must be have {1} extension. + /// + public static string InvalidFileExtension { + get { + return ResourceManager.GetString("InvalidFileExtension", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File {0} has invalid characters. + /// + public static string InvalidFileName { + get { + return ResourceManager.GetString("InvalidFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You must create your git publishing credentials using the Microsoft Azure portal. + ///Please follow these steps in the portal: + ///1. On the left side open "Web Sites" + ///2. Click on any website + ///3. Choose "Setup Git Publishing" or "Reset deployment credentials" + ///4. Back in the PowerShell window, rerun this command by typing "New-AzureWebSite {site name} -Git -PublishingUsername {username}. + /// + public static string InvalidGitCredentials { + get { + return ResourceManager.GetString("InvalidGitCredentials", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The value {0} provided is not a valid GUID. Please provide a valid GUID.. + /// + public static string InvalidGuid { + get { + return ResourceManager.GetString("InvalidGuid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified hostname does not exist. Please specify a valid hostname for the site.. + /// + public static string InvalidHostnameValidation { + get { + return ResourceManager.GetString("InvalidHostnameValidation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role {0} instances must be greater than or equal 0 and less than or equal 20. + /// + public static string InvalidInstancesCount { + get { + return ResourceManager.GetString("InvalidInstancesCount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There was an error creating your webjob. Please make sure that the script is in the root folder of the zip file.. + /// + public static string InvalidJobFile { + get { + return ResourceManager.GetString("InvalidJobFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot create instance of management client type {0}. It does not have the expected constructor.. + /// + public static string InvalidManagementClientType { + get { + return ResourceManager.GetString("InvalidManagementClientType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not download a valid runtime manifest, Please check your internet connection and try again.. + /// + public static string InvalidManifestError { + get { + return ResourceManager.GetString("InvalidManifestError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The account {0} was not found. Please specify a valid account name.. + /// + public static string InvalidMediaServicesAccount { + get { + return ResourceManager.GetString("InvalidMediaServicesAccount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided name "{0}" does not match the service bus namespace naming rules.. + /// + public static string InvalidNamespaceName { + get { + return ResourceManager.GetString("InvalidNamespaceName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Value cannot be null. Parameter name: '{0}'. + /// + public static string InvalidNullArgument { + get { + return ResourceManager.GetString("InvalidNullArgument", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} is invalid or empty. + /// + public static string InvalidOrEmptyArgumentMessage { + get { + return ResourceManager.GetString("InvalidOrEmptyArgumentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided package path is invalid or doesn't exist. + /// + public static string InvalidPackagePath { + get { + return ResourceManager.GetString("InvalidPackagePath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' is an invalid parameter set name.. + /// + public static string InvalidParameterSetName { + get { + return ResourceManager.GetString("InvalidParameterSetName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} doesn't exist in {1} or you've not passed valid value for it. + /// + public static string InvalidPath { + get { + return ResourceManager.GetString("InvalidPath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path {0} has invalid characters. + /// + public static string InvalidPathName { + get { + return ResourceManager.GetString("InvalidPathName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided publish settings file {0} has invalid content. Please get valid by running cmdlet Get-AzurePublishSettingsFile. + /// + public static string InvalidPublishSettingsSchema { + get { + return ResourceManager.GetString("InvalidPublishSettingsSchema", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided publish settings file {0} has invalid content. Please get valid by running cmdlet Get-AzurePublishSettingsFile. + /// + public static string InvalidPublishSettingsSchema1 { + get { + return ResourceManager.GetString("InvalidPublishSettingsSchema1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided role name "{0}" has invalid characters. + /// + public static string InvalidRoleNameMessage { + get { + return ResourceManager.GetString("InvalidRoleNameMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A valid name for the service root folder is required. + /// + public static string InvalidRootNameMessage { + get { + return ResourceManager.GetString("InvalidRootNameMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} is not a recognized runtime type. + /// + public static string InvalidRuntimeError { + get { + return ResourceManager.GetString("InvalidRuntimeError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A valid language is required. + /// + public static string InvalidScaffoldingLanguageArg { + get { + return ResourceManager.GetString("InvalidScaffoldingLanguageArg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No subscription is currently selected. Use Select-Subscription to activate a subscription.. + /// + public static string InvalidSelectedSubscription { + get { + return ResourceManager.GetString("InvalidSelectedSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided location "{0}" does not exist in the available locations use Get-AzureSBLocation for listing available locations.. + /// + public static string InvalidServiceBusLocation { + get { + return ResourceManager.GetString("InvalidServiceBusLocation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please provide a service name or run this command from inside a service project directory.. + /// + public static string InvalidServiceName { + get { + return ResourceManager.GetString("InvalidServiceName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You must provide valid value for {0}. + /// + public static string InvalidServiceSettingElement { + get { + return ResourceManager.GetString("InvalidServiceSettingElement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You must provide valid value for {0}. + /// + public static string InvalidServiceSettingElement1 { + get { + return ResourceManager.GetString("InvalidServiceSettingElement1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to settings.json is invalid or doesn't exist. + /// + public static string InvalidServiceSettingMessage { + get { + return ResourceManager.GetString("InvalidServiceSettingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription named '{0}' cannot be found. Use Set-AzureSubscription to initialize the subscription data.. + /// + public static string InvalidSubscription { + get { + return ResourceManager.GetString("InvalidSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided subscription id {0} is not valid. + /// + public static string InvalidSubscriptionId { + get { + return ResourceManager.GetString("InvalidSubscriptionId", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Must specify a non-null subscription name.. + /// + public static string InvalidSubscriptionName { + get { + return ResourceManager.GetString("InvalidSubscriptionName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A valid subscription name is required. This can be provided using the -Subscription parameter or by setting the subscription via the Set-AzureSubscription cmdlet. + /// + public static string InvalidSubscriptionNameMessage { + get { + return ResourceManager.GetString("InvalidSubscriptionNameMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided subscriptions file {0} has invalid content.. + /// + public static string InvalidSubscriptionsDataSchema { + get { + return ResourceManager.GetString("InvalidSubscriptionsDataSchema", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Your Azure credentials have not been set up or have expired, please run Add-AzureAccount to set up your Azure credentials.. + /// + public static string InvalidSubscriptionState { + get { + return ResourceManager.GetString("InvalidSubscriptionState", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role {0} VM size should be ExtraSmall, Small, Medium, Large or ExtraLarge.. + /// + public static string InvalidVMSize { + get { + return ResourceManager.GetString("InvalidVMSize", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The web job file must have *.zip extension. + /// + public static string InvalidWebJobFile { + get { + return ResourceManager.GetString("InvalidWebJobFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Singleton option works for continuous jobs only.. + /// + public static string InvalidWebJobSingleton { + get { + return ResourceManager.GetString("InvalidWebJobSingleton", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The website {0} was not found. Please specify a valid website name.. + /// + public static string InvalidWebsite { + get { + return ResourceManager.GetString("InvalidWebsite", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No job for id: {0} was found.. + /// + public static string JobNotFound { + get { + return ResourceManager.GetString("JobNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to engines. + /// + public static string JsonEnginesSectionName { + get { + return ResourceManager.GetString("JsonEnginesSectionName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Scaffolding for this language is not yet supported. + /// + public static string LanguageScaffoldingIsNotSupported { + get { + return ResourceManager.GetString("LanguageScaffoldingIsNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Link already established. + /// + public static string LinkAlreadyEstablished { + get { + return ResourceManager.GetString("LinkAlreadyEstablished", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to local_package.csx. + /// + public static string LocalPackageFileName { + get { + return ResourceManager.GetString("LocalPackageFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceConfiguration.Local.cscfg. + /// + public static string LocalServiceConfigurationFileName { + get { + return ResourceManager.GetString("LocalServiceConfigurationFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Looking for {0} deployment for {1} cloud service.... + /// + public static string LookingForDeploymentMessage { + get { + return ResourceManager.GetString("LookingForDeploymentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Looking for cloud service {0}.... + /// + public static string LookingForServiceMessage { + get { + return ResourceManager.GetString("LookingForServiceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to managementCertificate.pem. + /// + public static string ManagementCertificateFileName { + get { + return ResourceManager.GetString("ManagementCertificateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ?whr={0}. + /// + public static string ManagementPortalRealmFormat { + get { + return ResourceManager.GetString("ManagementPortalRealmFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to //baseuri. + /// + public static string ManifestBaseUriQuery { + get { + return ResourceManager.GetString("ManifestBaseUriQuery", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to uri. + /// + public static string ManifestBlobUriKey { + get { + return ResourceManager.GetString("ManifestBlobUriKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to http://az413943.vo.msecnd.net/node/runtimemanifest_0.7.5.2.xml. + /// + public static string ManifestUri { + get { + return ResourceManager.GetString("ManifestUri", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to v2.5. + /// + public static string MaxSupportAzureSdkVersion { + get { + return ResourceManager.GetString("MaxSupportAzureSdkVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to memcache_default. + /// + public static string MemcacheEndpointName { + get { + return ResourceManager.GetString("MemcacheEndpointName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 11211. + /// + public static string MemcacheEndpointPort { + get { + return ResourceManager.GetString("MemcacheEndpointPort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to v2.5. + /// + public static string MinSupportAzureSdkVersion { + get { + return ResourceManager.GetString("MinSupportAzureSdkVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Python 2.7 is not installed. Please install it as well as Django 1.4.. + /// + public static string MissingPythonPreReq { + get { + return ResourceManager.GetString("MissingPythonPreReq", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Multiple Add-Ons found holding name {0}. + /// + public static string MultipleAddOnsFoundMessage { + get { + return ResourceManager.GetString("MultipleAddOnsFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Multiple possible publishing users. Please go to the Portal and use the listed deployment user, or click 'set/reset deployment credentials' to set up a new user account, then reurn this cmdlet and specify PublishingUsername.. + /// + public static string MultiplePublishingUsernames { + get { + return ResourceManager.GetString("MultiplePublishingUsernames", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The first publish settings file "{0}" is used. If you want to use another file specify the file name.. + /// + public static string MultiplePublishSettingsFilesFoundMessage { + get { + return ResourceManager.GetString("MultiplePublishSettingsFilesFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Plugins.Caching.NamedCaches. + /// + public static string NamedCacheSettingName { + get { + return ResourceManager.GetString("NamedCacheSettingName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {"caches":[{"name":"default","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":10,"isExpirable":true,"type":1},"serverNotification":{"isEnabled":false}},"secondaries":0}]}. + /// + public static string NamedCacheSettingValue { + get { + return ResourceManager.GetString("NamedCacheSettingValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A publishing username is required. Please specify one using the argument PublishingUsername.. + /// + public static string NeedPublishingUsernames { + get { + return ResourceManager.GetString("NeedPublishingUsernames", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to New Add-On Confirmation. + /// + public static string NewAddOnConformation { + get { + return ResourceManager.GetString("NewAddOnConformation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis + ///for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) + ///agree to the {2}'s terms of user and privacy statement at {0} and (c) agree to sharing my + ///contact information with {2}.. + /// + public static string NewMicrosoftAddOnMessage { + get { + return ResourceManager.GetString("NewMicrosoftAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Server Error. This could happen because the namespace name is already used or due to an incorrect location name. Use Get-AzureSBLocation cmdlet to list valid names.. + /// + public static string NewNamespaceErrorMessage { + get { + return ResourceManager.GetString("NewNamespaceErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis + ///for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) + ///acknowledge the offering is provided by {2}, not Microsoft, and agree to {2}'s terms of + ///use and privacy statement at {0} and (c) agree to sharing my contact information with {2}.. + /// + public static string NewNonMicrosoftAddOnMessage { + get { + return ResourceManager.GetString("NewNonMicrosoftAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service has been created at {0}. + /// + public static string NewServiceCreatedMessage { + get { + return ResourceManager.GetString("NewServiceCreatedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No. + /// + public static string No { + get { + return ResourceManager.GetString("No", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no access token cached for subscription {0}, user id {1}. Use the Add-AzureAccount cmdlet to log in again and get a token for this subscription.. + /// + public static string NoCachedToken { + get { + return ResourceManager.GetString("NoCachedToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service does not have any cache worker roles, add one first by running cmdlet Add-AzureCacheWorkerRole.. + /// + public static string NoCacheWorkerRoles { + get { + return ResourceManager.GetString("NoCacheWorkerRoles", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No clouds available. + /// + public static string NoCloudsAvailable { + get { + return ResourceManager.GetString("NoCloudsAvailable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to nodejs. + /// + public static string NodeDirectory { + get { + return ResourceManager.GetString("NodeDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to node. + /// + public static string NodeEngineKey { + get { + return ResourceManager.GetString("NodeEngineKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to node.exe. + /// + public static string NodeExe { + get { + return ResourceManager.GetString("NodeExe", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no default subscription set, please set a default subscription by running Set-AzureSubscription -Default <subscription name>. + /// + public static string NoDefaultSubscriptionMessage { + get { + return ResourceManager.GetString("NoDefaultSubscriptionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft SDKs\Azure\Nodejs\Nov2011. + /// + public static string NodeModulesPath { + get { + return ResourceManager.GetString("NodeModulesPath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to nodejs. + /// + public static string NodeProgramFilesFolderName { + get { + return ResourceManager.GetString("NodeProgramFilesFolderName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to node. + /// + public static string NodeRuntimeValue { + get { + return ResourceManager.GetString("NodeRuntimeValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resources\Scaffolding\Node. + /// + public static string NodeScaffolding { + get { + return ResourceManager.GetString("NodeScaffolding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Commands.CloudService.ScaffoldingResources.Node. + /// + public static string NodeScaffoldingResources { + get { + return ResourceManager.GetString("NodeScaffoldingResources", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installing Node version {0} in Azure for Role '{1}' (the Node version locally installed is: {2}). + /// + public static string NodeVersionWarningText { + get { + return ResourceManager.GetString("NodeVersionWarningText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No, I do not agree. + /// + public static string NoHint { + get { + return ResourceManager.GetString("NoHint", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please connect to internet before executing this cmdlet. + /// + public static string NoInternetConnection { + get { + return ResourceManager.GetString("NoInternetConnection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please connect to internet before executing this cmdlet. + /// + public static string NoInternetConnection1 { + get { + return ResourceManager.GetString("NoInternetConnection1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <NONE>. + /// + public static string None { + get { + return ResourceManager.GetString("None", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No publish settings files with extension *.publishsettings are found in the directory "{0}".. + /// + public static string NoPublishSettingsFilesFoundMessage { + get { + return ResourceManager.GetString("NoPublishSettingsFilesFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no subscription associated with account {0}.. + /// + public static string NoSubscriptionAddedMessage { + get { + return ResourceManager.GetString("NoSubscriptionAddedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' must be a cache worker role. Verify that it has proper cache worker role configuration.. + /// + public static string NotCacheWorkerRole { + get { + return ResourceManager.GetString("NotCacheWorkerRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Certificate can't be null.. + /// + public static string NullCertificateMessage { + get { + return ResourceManager.GetString("NullCertificateMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} could not be null or empty. + /// + public static string NullObjectMessage { + get { + return ResourceManager.GetString("NullObjectMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to add a null RoleSettings to {0}. + /// + public static string NullRoleSettingsMessage { + get { + return ResourceManager.GetString("NullRoleSettingsMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to add new role to null service definition. + /// + public static string NullServiceDefinitionMessage { + get { + return ResourceManager.GetString("NullServiceDefinitionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The request offer '{0}' is not found.. + /// + public static string OfferNotFoundMessage { + get { + return ResourceManager.GetString("OfferNotFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation "{0}" failed on VM with ID: {1}. + /// + public static string OperationFailedErrorMessage { + get { + return ResourceManager.GetString("OperationFailedErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The REST operation failed with message '{0}' and error code '{1}'. + /// + public static string OperationFailedMessage { + get { + return ResourceManager.GetString("OperationFailedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Job Id {0} did not complete within expected time or it is in Failed/Canceled/Invalid state.. + /// + public static string OperationTimedOutOrError { + get { + return ResourceManager.GetString("OperationTimedOutOrError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to package. + /// + public static string Package { + get { + return ResourceManager.GetString("Package", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Package is created at service root path {0}.. + /// + public static string PackageCreated { + get { + return ResourceManager.GetString("PackageCreated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {{ + /// "author": "", + /// + /// "name": "{0}", + /// "version": "0.0.0", + /// "dependencies":{{}}, + /// "devDependencies":{{}}, + /// "optionalDependencies": {{}}, + /// "engines": {{ + /// "node": "*", + /// "iisnode": "*" + /// }} + /// + ///}} + ///. + /// + public static string PackageJsonDefaultFile { + get { + return ResourceManager.GetString("PackageJsonDefaultFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to package.json. + /// + public static string PackageJsonFileName { + get { + return ResourceManager.GetString("PackageJsonFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path {0} doesn't exist.. + /// + public static string PathDoesNotExist { + get { + return ResourceManager.GetString("PathDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path for {0} doesn't exist in {1}.. + /// + public static string PathDoesNotExistForElement { + get { + return ResourceManager.GetString("PathDoesNotExistForElement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A value for the Peer Asn has to be provided.. + /// + public static string PeerAsnRequired { + get { + return ResourceManager.GetString("PeerAsnRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 5.4.0. + /// + public static string PHPDefaultRuntimeVersion { + get { + return ResourceManager.GetString("PHPDefaultRuntimeVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to php. + /// + public static string PhpRuntimeValue { + get { + return ResourceManager.GetString("PhpRuntimeValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resources\Scaffolding\PHP. + /// + public static string PHPScaffolding { + get { + return ResourceManager.GetString("PHPScaffolding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Commands.CloudService.ScaffoldingResources.PHP. + /// + public static string PHPScaffoldingResources { + get { + return ResourceManager.GetString("PHPScaffoldingResources", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installing PHP version {0} for Role '{1}' (the PHP version locally installed is: {2}). + /// + public static string PHPVersionWarningText { + get { + return ResourceManager.GetString("PHPVersionWarningText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You must create your first web site using the Microsoft Azure portal. + ///Please follow these steps in the portal: + ///1. At the bottom of the page, click on New > Web Site > Quick Create + ///2. Type {0} in the URL field + ///3. Click on "Create Web Site" + ///4. Once the site has been created, click on the site name + ///5. Click on "Set up Git publishing" or "Reset deployment credentials" and setup a publishing username and password. Use those credentials for all new websites you create.. + /// + public static string PortalInstructions { + get { + return ResourceManager.GetString("PortalInstructions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 6. Back in the console window, rerun this command by typing "New-AzureWebsite <site name> -Git". + /// + public static string PortalInstructionsGit { + get { + return ResourceManager.GetString("PortalInstructionsGit", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A value for the Primary Peer Subnet has to be provided.. + /// + public static string PrimaryPeerSubnetRequired { + get { + return ResourceManager.GetString("PrimaryPeerSubnetRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Promotion code can be used only when updating to a new plan.. + /// + public static string PromotionCodeWithCurrentPlanMessage { + get { + return ResourceManager.GetString("PromotionCodeWithCurrentPlanMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service not published at user request.. + /// + public static string PublishAbortedAtUserRequest { + get { + return ResourceManager.GetString("PublishAbortedAtUserRequest", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Complete.. + /// + public static string PublishCompleteMessage { + get { + return ResourceManager.GetString("PublishCompleteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Connecting.... + /// + public static string PublishConnectingMessage { + get { + return ResourceManager.GetString("PublishConnectingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Created Deployment ID: {0}.. + /// + public static string PublishCreatedDeploymentMessage { + get { + return ResourceManager.GetString("PublishCreatedDeploymentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Created hosted service '{0}'.. + /// + public static string PublishCreatedServiceMessage { + get { + return ResourceManager.GetString("PublishCreatedServiceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Created Website URL: {0}.. + /// + public static string PublishCreatedWebsiteMessage { + get { + return ResourceManager.GetString("PublishCreatedWebsiteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creating.... + /// + public static string PublishCreatingServiceMessage { + get { + return ResourceManager.GetString("PublishCreatingServiceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Initializing.... + /// + public static string PublishInitializingMessage { + get { + return ResourceManager.GetString("PublishInitializingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to busy. + /// + public static string PublishInstanceStatusBusy { + get { + return ResourceManager.GetString("PublishInstanceStatusBusy", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to creating the virtual machine. + /// + public static string PublishInstanceStatusCreating { + get { + return ResourceManager.GetString("PublishInstanceStatusCreating", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Instance {0} of role {1} is {2}.. + /// + public static string PublishInstanceStatusMessage { + get { + return ResourceManager.GetString("PublishInstanceStatusMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ready. + /// + public static string PublishInstanceStatusReady { + get { + return ResourceManager.GetString("PublishInstanceStatusReady", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Preparing deployment for {0} with Subscription ID: {1}.... + /// + public static string PublishPreparingDeploymentMessage { + get { + return ResourceManager.GetString("PublishPreparingDeploymentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Publishing {0} to Microsoft Azure. This may take several minutes.... + /// + public static string PublishServiceStartMessage { + get { + return ResourceManager.GetString("PublishServiceStartMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to publish settings. + /// + public static string PublishSettings { + get { + return ResourceManager.GetString("PublishSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure. + /// + public static string PublishSettingsElementName { + get { + return ResourceManager.GetString("PublishSettingsElementName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to .PublishSettings. + /// + public static string PublishSettingsFileExtention { + get { + return ResourceManager.GetString("PublishSettingsFileExtention", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to publishSettings.xml. + /// + public static string PublishSettingsFileName { + get { + return ResourceManager.GetString("PublishSettingsFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to &whr={0}. + /// + public static string PublishSettingsFileRealmFormat { + get { + return ResourceManager.GetString("PublishSettingsFileRealmFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Publish settings imported. + /// + public static string PublishSettingsSetSuccessfully { + get { + return ResourceManager.GetString("PublishSettingsSetSuccessfully", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AZURE_PUBLISHINGPROFILE_URL. + /// + public static string PublishSettingsUrlEnv { + get { + return ResourceManager.GetString("PublishSettingsUrlEnv", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Starting.... + /// + public static string PublishStartingMessage { + get { + return ResourceManager.GetString("PublishStartingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Upgrading.... + /// + public static string PublishUpgradingMessage { + get { + return ResourceManager.GetString("PublishUpgradingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Uploading Package to storage service {0}.... + /// + public static string PublishUploadingPackageMessage { + get { + return ResourceManager.GetString("PublishUploadingPackageMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Verifying storage account '{0}'.... + /// + public static string PublishVerifyingStorageMessage { + get { + return ResourceManager.GetString("PublishVerifyingStorageMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resources\Scaffolding\Python. + /// + public static string PythonScaffolding { + get { + return ResourceManager.GetString("PythonScaffolding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Replace current deployment with '{0}' Id ?. + /// + public static string RedeployCommit { + get { + return ResourceManager.GetString("RedeployCommit", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to regenerate key?. + /// + public static string RegenerateKeyWarning { + get { + return ResourceManager.GetString("RegenerateKeyWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Generate new key.. + /// + public static string RegenerateKeyWhatIfMessage { + get { + return ResourceManager.GetString("RegenerateKeyWhatIfMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove account '{0}'?. + /// + public static string RemoveAccountConfirmation { + get { + return ResourceManager.GetString("RemoveAccountConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing account. + /// + public static string RemoveAccountMessage { + get { + return ResourceManager.GetString("RemoveAccountMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove Add-On Confirmation. + /// + public static string RemoveAddOnConformation { + get { + return ResourceManager.GetString("RemoveAddOnConformation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to If you delete this add-on, your data may be deleted and the operation may not be undone. You may have to purchase it again from the Microsoft Azure Store to use it. The price of the add-on may not be refunded. Are you sure you want to delete this add-on? Enter “Yes” to confirm.. + /// + public static string RemoveAddOnMessage { + get { + return ResourceManager.GetString("RemoveAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove-AzureBGPPeering Operation failed.. + /// + public static string RemoveAzureBGPPeeringFailed { + get { + return ResourceManager.GetString("RemoveAzureBGPPeeringFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing Bgp Peering. + /// + public static string RemoveAzureBGPPeeringMessage { + get { + return ResourceManager.GetString("RemoveAzureBGPPeeringMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Successfully removed Azure Bgp Peering with Service Key {0}.. + /// + public static string RemoveAzureBGPPeeringSucceeded { + get { + return ResourceManager.GetString("RemoveAzureBGPPeeringSucceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Bgp Peering with service key '{0}'?. + /// + public static string RemoveAzureBGPPeeringWarning { + get { + return ResourceManager.GetString("RemoveAzureBGPPeeringWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Dedicated Circuit with service key '{0}'?. + /// + public static string RemoveAzureDedicatdCircuitWarning { + get { + return ResourceManager.GetString("RemoveAzureDedicatdCircuitWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove-AzureDedicatedCircuit Operation failed.. + /// + public static string RemoveAzureDedicatedCircuitFailed { + get { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove-AzureDedicatedCircuitLink Operation failed.. + /// + public static string RemoveAzureDedicatedCircuitLinkFailed { + get { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing Dedicated Circui Link. + /// + public static string RemoveAzureDedicatedCircuitLinkMessage { + get { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Successfully removed Azure Dedicated Circuit Link with Service Key {0} and Vnet Name {1}. + /// + public static string RemoveAzureDedicatedCircuitLinkSucceeded { + get { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkSucceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Dedicated Circuit Link with service key '{0}' and virtual network name '{1}'?. + /// + public static string RemoveAzureDedicatedCircuitLinkWarning { + get { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing Dedicated Circuit. + /// + public static string RemoveAzureDedicatedCircuitMessage { + get { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Successfully removed Azure Dedicated Circuit with Service Key {0}.. + /// + public static string RemoveAzureDedicatedCircuitSucceeded { + get { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitSucceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing cloud service {0}.... + /// + public static string RemoveAzureServiceWaitMessage { + get { + return ResourceManager.GetString("RemoveAzureServiceWaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The current subscription is being removed. Use Select-AzureSubscription <subscriptionName> to select a new current subscription.. + /// + public static string RemoveCurrentSubscription { + get { + return ResourceManager.GetString("RemoveCurrentSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The default subscription is being removed. Use Select-AzureSubscription -Default <subscriptionName> to select a new default subscription.. + /// + public static string RemoveDefaultSubscription { + get { + return ResourceManager.GetString("RemoveDefaultSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing {0} deployment for {1} service. + /// + public static string RemoveDeploymentWaitMessage { + get { + return ResourceManager.GetString("RemoveDeploymentWaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing an environment will remove all associated subscriptions and accounts. Are you sure you want to remove an environment '{0}'?. + /// + public static string RemoveEnvironmentConfirmation { + get { + return ResourceManager.GetString("RemoveEnvironmentConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing environment. + /// + public static string RemoveEnvironmentMessage { + get { + return ResourceManager.GetString("RemoveEnvironmentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing job collection. + /// + public static string RemoveJobCollectionMessage { + get { + return ResourceManager.GetString("RemoveJobCollectionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the job collection "{0}". + /// + public static string RemoveJobCollectionWarning { + get { + return ResourceManager.GetString("RemoveJobCollectionWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing job. + /// + public static string RemoveJobMessage { + get { + return ResourceManager.GetString("RemoveJobMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the job "{0}". + /// + public static string RemoveJobWarning { + get { + return ResourceManager.GetString("RemoveJobWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the account?. + /// + public static string RemoveMediaAccountWarning { + get { + return ResourceManager.GetString("RemoveMediaAccountWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account removed.. + /// + public static string RemoveMediaAccountWhatIfMessage { + get { + return ResourceManager.GetString("RemoveMediaAccountWhatIfMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Server Error. This could happen because the namespace does not exist or it does not exist under your subscription.. + /// + public static string RemoveNamespaceErrorMessage { + get { + return ResourceManager.GetString("RemoveNamespaceErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing old package {0}.... + /// + public static string RemovePackage { + get { + return ResourceManager.GetString("RemovePackage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing the Azure profile will remove all associated environments, subscriptions, and accounts. Are you sure you want to remove the Azure profile?. + /// + public static string RemoveProfileConfirmation { + get { + return ResourceManager.GetString("RemoveProfileConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing the Azure profile. + /// + public static string RemoveProfileMessage { + get { + return ResourceManager.GetString("RemoveProfileMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to delete the namespace '{0}'?. + /// + public static string RemoveServiceBusNamespaceConfirmation { + get { + return ResourceManager.GetString("RemoveServiceBusNamespaceConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove cloud service?. + /// + public static string RemoveServiceWarning { + get { + return ResourceManager.GetString("RemoveServiceWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove cloud service and all it's deployments. + /// + public static string RemoveServiceWhatIfMessage { + get { + return ResourceManager.GetString("RemoveServiceWhatIfMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove subscription '{0}'?. + /// + public static string RemoveSubscriptionConfirmation { + get { + return ResourceManager.GetString("RemoveSubscriptionConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing subscription. + /// + public static string RemoveSubscriptionMessage { + get { + return ResourceManager.GetString("RemoveSubscriptionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The endpoint {0} cannot be removed from profile {1} because it's not in the profile.. + /// + public static string RemoveTrafficManagerEndpointMissing { + get { + return ResourceManager.GetString("RemoveTrafficManagerEndpointMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove-AzureTrafficManagerProfile Operation failed.. + /// + public static string RemoveTrafficManagerProfileFailed { + get { + return ResourceManager.GetString("RemoveTrafficManagerProfileFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Successfully removed Traffic Manager profile with name {0}.. + /// + public static string RemoveTrafficManagerProfileSucceeded { + get { + return ResourceManager.GetString("RemoveTrafficManagerProfileSucceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Traffic Manager profile "{0}"?. + /// + public static string RemoveTrafficManagerProfileWarning { + get { + return ResourceManager.GetString("RemoveTrafficManagerProfileWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to delete the VM '{0}'?. + /// + public static string RemoveVMConfirmationMessage { + get { + return ResourceManager.GetString("RemoveVMConfirmationMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deleting VM.. + /// + public static string RemoveVMMessage { + get { + return ResourceManager.GetString("RemoveVMMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing WebJob.... + /// + public static string RemoveWebJobMessage { + get { + return ResourceManager.GetString("RemoveWebJobMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove job '{0}'?. + /// + public static string RemoveWebJobWarning { + get { + return ResourceManager.GetString("RemoveWebJobWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing website. + /// + public static string RemoveWebsiteMessage { + get { + return ResourceManager.GetString("RemoveWebsiteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the website "{0}". + /// + public static string RemoveWebsiteWarning { + get { + return ResourceManager.GetString("RemoveWebsiteWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing public environment is not supported.. + /// + public static string RemovingDefaultEnvironmentsNotSupported { + get { + return ResourceManager.GetString("RemovingDefaultEnvironmentsNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deleting namespace. + /// + public static string RemovingNamespaceMessage { + get { + return ResourceManager.GetString("RemovingNamespaceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Repository is not setup. You need to pass a valid site name.. + /// + public static string RepositoryNotSetup { + get { + return ResourceManager.GetString("RepositoryNotSetup", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reserved IP with the Name:'{0}' will no longer be in use after the deployment is deleted, and it is still reserved for later use.. + /// + public static string ReservedIPNameNoLongerInUseButStillBeingReserved { + get { + return ResourceManager.GetString("ReservedIPNameNoLongerInUseButStillBeingReserved", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resource with ID : {0} does not exist.. + /// + public static string ResourceNotFound { + get { + return ResourceManager.GetString("ResourceNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Restart. + /// + public static string Restart { + get { + return ResourceManager.GetString("Restart", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resume. + /// + public static string Resume { + get { + return ResourceManager.GetString("Resume", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /role:{0};"{1}/{0}" . + /// + public static string RoleArgTemplate { + get { + return ResourceManager.GetString("RoleArgTemplate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to bin. + /// + public static string RoleBinFolderName { + get { + return ResourceManager.GetString("RoleBinFolderName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role {0} is {1}. + /// + public static string RoleInstanceWaitMsg { + get { + return ResourceManager.GetString("RoleInstanceWaitMsg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 20. + /// + public static string RoleMaxInstances { + get { + return ResourceManager.GetString("RoleMaxInstances", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to role name. + /// + public static string RoleName { + get { + return ResourceManager.GetString("RoleName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided role name {0} doesn't exist. + /// + public static string RoleNotFoundMessage { + get { + return ResourceManager.GetString("RoleNotFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RoleSettings.xml. + /// + public static string RoleSettingsTemplateFileName { + get { + return ResourceManager.GetString("RoleSettingsTemplateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role type {0} doesn't exist. + /// + public static string RoleTypeDoesNotExist { + get { + return ResourceManager.GetString("RoleTypeDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to public static Dictionary<string, Location> ReverseLocations { get; private set; }. + /// + public static string RuntimeDeploymentLocationError { + get { + return ResourceManager.GetString("RuntimeDeploymentLocationError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Preparing runtime deployment for service '{0}'. + /// + public static string RuntimeDeploymentStart { + get { + return ResourceManager.GetString("RuntimeDeploymentStart", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WARNING Runtime Mismatch: Are you sure that you want to publish service '{0}' using an Azure runtime version that does not match your local runtime version?. + /// + public static string RuntimeMismatchWarning { + get { + return ResourceManager.GetString("RuntimeMismatchWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RUNTIMEOVERRIDEURL. + /// + public static string RuntimeOverrideKey { + get { + return ResourceManager.GetString("RuntimeOverrideKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /runtimemanifest/runtimes/runtime. + /// + public static string RuntimeQuery { + get { + return ResourceManager.GetString("RuntimeQuery", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RUNTIMEID. + /// + public static string RuntimeTypeKey { + get { + return ResourceManager.GetString("RuntimeTypeKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RUNTIMEURL. + /// + public static string RuntimeUrlKey { + get { + return ResourceManager.GetString("RuntimeUrlKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RUNTIMEVERSIONPRIMARYKEY. + /// + public static string RuntimeVersionPrimaryKey { + get { + return ResourceManager.GetString("RuntimeVersionPrimaryKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to scaffold.xml. + /// + public static string ScaffoldXml { + get { + return ResourceManager.GetString("ScaffoldXml", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid location entered. Pick one of the locations from Get-AzureSchedulerLocation. + /// + public static string SchedulerInvalidLocation { + get { + return ResourceManager.GetString("SchedulerInvalidLocation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A value for the Secondary Peer Subnet has to be provided.. + /// + public static string SecondaryPeerSubnetRequired { + get { + return ResourceManager.GetString("SecondaryPeerSubnetRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service {0} already exists on disk in location {1}. + /// + public static string ServiceAlreadyExistsOnDisk { + get { + return ResourceManager.GetString("ServiceAlreadyExistsOnDisk", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No ServiceBus authorization rule with the given characteristics was found. + /// + public static string ServiceBusAuthorizationRuleNotFound { + get { + return ResourceManager.GetString("ServiceBusAuthorizationRuleNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service bus entity '{0}' is not found.. + /// + public static string ServiceBusEntityTypeNotFound { + get { + return ResourceManager.GetString("ServiceBusEntityTypeNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Server Error. This could happen due to an incorrect/missing namespace. + /// + public static string ServiceBusNamespaceMissingMessage { + get { + return ResourceManager.GetString("ServiceBusNamespaceMissingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service configuration. + /// + public static string ServiceConfiguration { + get { + return ResourceManager.GetString("ServiceConfiguration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service definition. + /// + public static string ServiceDefinition { + get { + return ResourceManager.GetString("ServiceDefinition", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceDefinition.csdef. + /// + public static string ServiceDefinitionFileName { + get { + return ResourceManager.GetString("ServiceDefinitionFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceDefinition.csdef. + /// + public static string ServiceDefinitionFileName1 { + get { + return ResourceManager.GetString("ServiceDefinitionFileName1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}Deploy. + /// + public static string ServiceDeploymentName { + get { + return ResourceManager.GetString("ServiceDeploymentName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified cloud service "{0}" does not exist.. + /// + public static string ServiceDoesNotExist { + get { + return ResourceManager.GetString("ServiceDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} slot for service {1} is in {2} state, please wait until it finish and update it's status. + /// + public static string ServiceIsInTransitionState { + get { + return ResourceManager.GetString("ServiceIsInTransitionState", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to retrieve service key for ServicePrincipal account {0}. Please run the Add-AzureAccount cmdlet to supply the credentials for this service principal.. + /// + public static string ServiceKeyNotFound { + get { + return ResourceManager.GetString("ServiceKeyNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + public static string ServiceManagementClientExceptionStringFormat { + get { + return ResourceManager.GetString("ServiceManagementClientExceptionStringFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to "An exception occurred when calling the ServiceManagement API. HTTP Status Code: {0}. Service Management Error Code: {1}. Message: {2}. Operation Tracking ID: {3}.". + /// + public static string ServiceManagementClientExceptionStringFormat1 { + get { + return ResourceManager.GetString("ServiceManagementClientExceptionStringFormat1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Begin Operation: {0}. + /// + public static string ServiceManagementExecuteClientActionBeginOperation { + get { + return ResourceManager.GetString("ServiceManagementExecuteClientActionBeginOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Completed Operation: {0}. + /// + public static string ServiceManagementExecuteClientActionCompletedOperation { + get { + return ResourceManager.GetString("ServiceManagementExecuteClientActionCompletedOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Begin Operation: {0}. + /// + public static string ServiceManagementExecuteClientActionInOCSBeginOperation { + get { + return ResourceManager.GetString("ServiceManagementExecuteClientActionInOCSBeginOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Completed Operation: {0}. + /// + public static string ServiceManagementExecuteClientActionInOCSCompletedOperation { + get { + return ResourceManager.GetString("ServiceManagementExecuteClientActionInOCSCompletedOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service name. + /// + public static string ServiceName { + get { + return ResourceManager.GetString("ServiceName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided service name {0} already exists, please pick another name. + /// + public static string ServiceNameExists { + get { + return ResourceManager.GetString("ServiceNameExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided service name {0} already exists, please pick another name. + /// + public static string ServiceNameExists1 { + get { + return ResourceManager.GetString("ServiceNameExists1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please provide name for the hosted service. + /// + public static string ServiceNameMissingMessage { + get { + return ResourceManager.GetString("ServiceNameMissingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service parent directory. + /// + public static string ServiceParentDirectory { + get { + return ResourceManager.GetString("ServiceParentDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service {0} removed successfully. + /// + public static string ServiceRemovedMessage { + get { + return ResourceManager.GetString("ServiceRemovedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service directory. + /// + public static string ServiceRoot { + get { + return ResourceManager.GetString("ServiceRoot", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service settings. + /// + public static string ServiceSettings { + get { + return ResourceManager.GetString("ServiceSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The storage account name '{0}' is invalid. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.. + /// + public static string ServiceSettings_ValidateStorageAccountName_InvalidName { + get { + return ResourceManager.GetString("ServiceSettings_ValidateStorageAccountName_InvalidName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The storage account name '{0}' is invalid. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.. + /// + public static string ServiceSettings_ValidateStorageAccountName_InvalidName1 { + get { + return ResourceManager.GetString("ServiceSettings_ValidateStorageAccountName_InvalidName1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service settings. + /// + public static string ServiceSettings1 { + get { + return ResourceManager.GetString("ServiceSettings1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The {0} slot for cloud service {1} doesn't exist.. + /// + public static string ServiceSlotDoesNotExist { + get { + return ResourceManager.GetString("ServiceSlotDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} slot for service {1} is {2}. + /// + public static string ServiceStatusChanged { + get { + return ResourceManager.GetString("ServiceStatusChanged", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Set Add-On Confirmation. + /// + public static string SetAddOnConformation { + get { + return ResourceManager.GetString("SetAddOnConformation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Profile {0} does not contain endpoint {1}. Adding it.. + /// + public static string SetInexistentTrafficManagerEndpointMessage { + get { + return ResourceManager.GetString("SetInexistentTrafficManagerEndpointMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note - You will be charged the amount for the new plan, without being refunded for time remaining + ///in the existing plan. + ///By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis + ///for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) + ///agree to the {2}'s terms of user and privacy statement at {0} and (c) agree to sharing my + ///contact information with {2}.. + /// + public static string SetMicrosoftAddOnMessage { + get { + return ResourceManager.GetString("SetMicrosoftAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note - You will be charged the amount for the new plan, without being refunded for time remaining + ///in the existing plan. + ///By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis + ///for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) + ///acknowledge the offering is provided by {2}, not Microsoft, and agree to {2}'s terms of + ///use and privacy statement at <url> and (c) agree to sharing my contact information with {2}.. + /// + public static string SetNonMicrosoftAddOnMessage { + get { + return ResourceManager.GetString("SetNonMicrosoftAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role {0} instances are set to {1}. + /// + public static string SetRoleInstancesMessage { + get { + return ResourceManager.GetString("SetRoleInstancesMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {"Slot":"","Location":"","Subscription":"","StorageAccountName":""}. + /// + public static string SettingsFileEmptyContent { + get { + return ResourceManager.GetString("SettingsFileEmptyContent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to deploymentSettings.json. + /// + public static string SettingsFileName { + get { + return ResourceManager.GetString("SettingsFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to deploymentSettings.json. + /// + public static string SettingsFileName1 { + get { + return ResourceManager.GetString("SettingsFileName1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Insufficient parameters passed to create a new endpoint.. + /// + public static string SetTrafficManagerEndpointNeedsParameters { + get { + return ResourceManager.GetString("SetTrafficManagerEndpointNeedsParameters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Ambiguous operation: the profile name specified doesn't match the name of the profile object.. + /// + public static string SetTrafficManagerProfileAmbiguous { + get { + return ResourceManager.GetString("SetTrafficManagerProfileAmbiguous", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Confirm. + /// + public static string ShouldProcessCaption { + get { + return ResourceManager.GetString("ShouldProcessCaption", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Confirm. + /// + public static string ShouldProcessCaption1 { + get { + return ResourceManager.GetString("ShouldProcessCaption1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Shutdown. + /// + public static string Shutdown { + get { + return ResourceManager.GetString("Shutdown", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /sites:{0};{1};"{2}/{0}" . + /// + public static string SitesArgTemplate { + get { + return ResourceManager.GetString("SitesArgTemplate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 1000. + /// + public static string StandardRetryDelayInMs { + get { + return ResourceManager.GetString("StandardRetryDelayInMs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Start. + /// + public static string Start { + get { + return ResourceManager.GetString("Start", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Started. + /// + public static string StartedEmulator { + get { + return ResourceManager.GetString("StartedEmulator", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Starting Emulator.... + /// + public static string StartingEmulator { + get { + return ResourceManager.GetString("StartingEmulator", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to start. + /// + public static string StartStorageEmulatorCommandArgument { + get { + return ResourceManager.GetString("StartStorageEmulatorCommandArgument", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Stop. + /// + public static string Stop { + get { + return ResourceManager.GetString("Stop", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Stopping emulator.... + /// + public static string StopEmulatorMessage { + get { + return ResourceManager.GetString("StopEmulatorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Stopped. + /// + public static string StoppedEmulatorMessage { + get { + return ResourceManager.GetString("StoppedEmulatorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to stop. + /// + public static string StopStorageEmulatorCommandArgument { + get { + return ResourceManager.GetString("StopStorageEmulatorCommandArgument", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account Name:. + /// + public static string StorageAccountName { + get { + return ResourceManager.GetString("StorageAccountName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find storage account '{0}' please type the name of an existing storage account.. + /// + public static string StorageAccountNotFound { + get { + return ResourceManager.GetString("StorageAccountNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WAStorageEmulator.exe. + /// + public static string StorageEmulatorExe { + get { + return ResourceManager.GetString("StorageEmulatorExe", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to InstallPath. + /// + public static string StorageEmulatorInstallPathRegistryKeyValue { + get { + return ResourceManager.GetString("StorageEmulatorInstallPathRegistryKeyValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SOFTWARE\Microsoft\Windows Azure Storage Emulator. + /// + public static string StorageEmulatorRegistryKey { + get { + return ResourceManager.GetString("StorageEmulatorRegistryKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Primary Key:. + /// + public static string StoragePrimaryKey { + get { + return ResourceManager.GetString("StoragePrimaryKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Secondary Key:. + /// + public static string StorageSecondaryKey { + get { + return ResourceManager.GetString("StorageSecondaryKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription named {0} already exists.. + /// + public static string SubscriptionAlreadyExists { + get { + return ResourceManager.GetString("SubscriptionAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to DefaultSubscriptionData.xml. + /// + public static string SubscriptionDataFileName { + get { + return ResourceManager.GetString("SubscriptionDataFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription data file {0} does not exist.. + /// + public static string SubscriptionDataFileNotFound { + get { + return ResourceManager.GetString("SubscriptionDataFileNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription id {0} doesn't exist.. + /// + public static string SubscriptionIdNotFoundMessage { + get { + return ResourceManager.GetString("SubscriptionIdNotFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Subscription must not be null. + /// + public static string SubscriptionMustNotBeNull { + get { + return ResourceManager.GetString("SubscriptionMustNotBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription name {0} doesn't exist.. + /// + public static string SubscriptionNameNotFoundMessage { + get { + return ResourceManager.GetString("SubscriptionNameNotFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Suspend. + /// + public static string Suspend { + get { + return ResourceManager.GetString("Suspend", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Swapping website production slot .... + /// + public static string SwappingWebsite { + get { + return ResourceManager.GetString("SwappingWebsite", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to swap the website '{0}' production slot with slot '{1}'?. + /// + public static string SwapWebsiteSlotWarning { + get { + return ResourceManager.GetString("SwapWebsiteSlotWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to create Django application: {0}. + /// + public static string UnableToCreateDjangoApp { + get { + return ResourceManager.GetString("UnableToCreateDjangoApp", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Make sure you have Python 2.7 installed along with Django installed to site-packages.. + /// + public static string UnableToCreateDjangoAppFix { + get { + return ResourceManager.GetString("UnableToCreateDjangoAppFix", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to decode string from base 64. Please make sure the string is correctly encoded: {0}.. + /// + public static string UnableToDecodeBase64String { + get { + return ResourceManager.GetString("UnableToDecodeBase64String", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to update mismatching Json structured: {0} {1}.. + /// + public static string UnableToPatchJson { + get { + return ResourceManager.GetString("UnableToPatchJson", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Illegal credential type. + /// + public static string UnknownCredentialType { + get { + return ResourceManager.GetString("UnknownCredentialType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provider {0} is unknown.. + /// + public static string UnknownProviderMessage { + get { + return ResourceManager.GetString("UnknownProviderMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Update. + /// + public static string Update { + get { + return ResourceManager.GetString("Update", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Updated settings for subscription '{0}'. Current subscription is '{1}'.. + /// + public static string UpdatedSettings { + get { + return ResourceManager.GetString("UpdatedSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A value for the VLan Id has to be provided.. + /// + public static string VlanIdRequired { + get { + return ResourceManager.GetString("VlanIdRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please wait.... + /// + public static string WaitMessage { + get { + return ResourceManager.GetString("WaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The azure storage emulator is not installed, skip launching.... + /// + public static string WarningWhenStorageEmulatorIsMissing { + get { + return ResourceManager.GetString("WarningWhenStorageEmulatorIsMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Web.cloud.config. + /// + public static string WebCloudConfig { + get { + return ResourceManager.GetString("WebCloudConfig", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to web.config. + /// + public static string WebConfigTemplateFileName { + get { + return ResourceManager.GetString("WebConfigTemplateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MSDeploy. + /// + public static string WebDeployKeywordInWebSitePublishProfile { + get { + return ResourceManager.GetString("WebDeployKeywordInWebSitePublishProfile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot build the project successfully. Please see logs in {0}.. + /// + public static string WebProjectBuildFailTemplate { + get { + return ResourceManager.GetString("WebProjectBuildFailTemplate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WebRole. + /// + public static string WebRole { + get { + return ResourceManager.GetString("WebRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to setup_web.cmd > log.txt. + /// + public static string WebRoleStartupTaskCommandLine { + get { + return ResourceManager.GetString("WebRoleStartupTaskCommandLine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WebRole.xml. + /// + public static string WebRoleTemplateFileName { + get { + return ResourceManager.GetString("WebRoleTemplateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WebSite with given name {0} already exists in the specified Subscription and Webspace.. + /// + public static string WebsiteAlreadyExists { + get { + return ResourceManager.GetString("WebsiteAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WebSite with given name {0} already exists in the specified Subscription and Location.. + /// + public static string WebsiteAlreadyExistsReplacement { + get { + return ResourceManager.GetString("WebsiteAlreadyExistsReplacement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Site {0} already has repository created for it.. + /// + public static string WebsiteRepositoryAlreadyExists { + get { + return ResourceManager.GetString("WebsiteRepositoryAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Workspaces/WebsiteExtension/Website/{0}/dashboard/. + /// + public static string WebsiteSufixUrl { + get { + return ResourceManager.GetString("WebsiteSufixUrl", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to https://{0}/msdeploy.axd?site={1}. + /// + public static string WebSiteWebDeployUriTemplate { + get { + return ResourceManager.GetString("WebSiteWebDeployUriTemplate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WorkerRole. + /// + public static string WorkerRole { + get { + return ResourceManager.GetString("WorkerRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to setup_worker.cmd > log.txt. + /// + public static string WorkerRoleStartupTaskCommandLine { + get { + return ResourceManager.GetString("WorkerRoleStartupTaskCommandLine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WorkerRole.xml. + /// + public static string WorkerRoleTemplateFileName { + get { + return ResourceManager.GetString("WorkerRoleTemplateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to (x86). + /// + public static string x86InProgramFiles { + get { + return ResourceManager.GetString("x86InProgramFiles", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Yes. + /// + public static string Yes { + get { + return ResourceManager.GetString("Yes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Yes, I agree. + /// + public static string YesHint { + get { + return ResourceManager.GetString("YesHint", resourceCulture); + } + } + } +} diff --git a/src/Common/Commands.Common/Properties/Resources.resx b/src/Common/Commands.Common/Properties/Resources.resx new file mode 100644 index 000000000000..d62beedd94f2 --- /dev/null +++ b/src/Common/Commands.Common/Properties/Resources.resx @@ -0,0 +1,1576 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + The remote server returned an error: (401) Unauthorized. + + + Account "{0}" has been added. + + + To switch to a different subscription, please use Select-AzureSubscription. + + + Subscription "{0}" is selected as the default subscription. + + + To view all the subscriptions, please use Get-AzureSubscription. + + + Add-On {0} is created successfully. + + + Add-on name {0} is already used. + + + Add-On {0} not found. + + + Add-on {0} is removed successfully. + + + Add-On {0} is updated successfully. + + + Role has been created at {0}\{1}. + + + Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for Node.js by running ‘npm install azure’. + + + Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for PHP by running "pear WindowsAzure/WindowsAzure". + + + Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for Python by running "pip windowsazure". + + + Unable to set role permissions. Please give the 'Network Service' user 'Read & execute' and 'Modify' permissions to the role folder, or run PowerShell as an Administrator + + + A role name '{0}' already exists + + + Windows Azure Powershell\ + + + Windows Azure Powershell + + + Emulator + + + Azure Emulator is not installed and is required + + + Azure Emulator\emulator + + + SOFTWARE\Microsoft\Windows Azure Emulator + + + https://manage.windowsazure.com + + + AZURE_PORTAL_URL + + + Azure SDK\{0}\ + + + InstallPath + + + SOFTWARE\Microsoft\Microsoft SDKs\ServiceHosting + + + The installed Azure SDK version is not supported. Make sure you version is between {0} and {1} inclusive + + + Azure service management error +{0} + + + Azure Authoring Tools are not installed and are required. Installation of Azure SDK for .NET is recommended with Microsoft Web Platform Installer (PI) available at http://www.microsoft.com/web/downloads/platform.aspx. + + + Base Uri was empty. + WAPackIaaS + + + {0} begin processing without ParameterSet. + + + {0} begin processing with ParameterSet '{1}'. + + + Blob with the name {0} already exists in the account. + + + https://{0}.blob.core.windows.net/ + + + AZURE_BLOBSTORAGE_TEMPLATE + + + Memcache is already enabled for role '{0}'. + + + <configuration> + <configSections> + <section name="dataCacheClients" type="Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core" allowLocation="true" allowDefinition="Everywhere" /> + </configSections> + <dataCacheClients> + <tracing sinkType="DiagnosticSink" traceLevel="Error" /> + <dataCacheClient name="DefaultShimConfig" useLegacyProtocol="false"> + <autoDiscover isEnabled="true" identifier="$RoleName$" /> + </dataCacheClient> + </dataCacheClients> +</configuration> + + + Microsoft.WindowsAzure.Plugins.Caching.ClientDiagnosticLevel + + + DiagnosticStore + + + Please upgrade the cache runtime of role '{0}' to '{1}' using Set-AzureServiceProjectRole -RoleName {0} -Runtime Cache -Version {1} + + + CACHERUNTIMEURL + + + cache + + + CacheRuntimeVersion + + + Resources\Scaffolding\Cache + + + setup_cache.cmd > cache_log.txt + + + Installing caching version {0} for Role '{1}' (the caching version locally installed is: {2}) + + + Microsoft.WindowsAzure.Plugins.Caching.CacheSizePercentage + + + Microsoft.WindowsAzure.Plugins.Caching.ConfigStoreConnectionString + + + DefaultEndpointsProtocol=https;AccountName={0};AccountKey={1} + + + Caching + + + Cannot find {0} with name {1}. + + + Deployment for service {0} with {1} slot doesn't exist + + + Can't find valid Microsoft Azure role in current directory {0} + + + service {0} configuration file (ServiceConfiguration.Cloud.cscfg) is either null or doesn't exist + + + Invalid service path! Cannot locate ServiceDefinition.csdef in current folder or parent folders. + + + The subscription named {0} with id {1} is not currently imported. You must import this subscription before it can be updated. + + + ManagementCertificate + + + certificate.pfx + + + Certificate imported into CurrentUser\My\{0} + + + No certificate was found in the certificate store with thumbprint {0} + + + No certificate was found in the certificate store with thumbprint {0} + + + Your account does not have access to the private key for certificate {0} + + + {0} {1} deployment for {2} service + + + Cloud service {0} is in {1} state. + + + Changing/Removing public environment '{0}' is not allowed. + + + Service {0} is set to value {1} + + + Choose which publish settings file to use: + + + Microsoft.WindowsAzure.Plugins.Caching.ClientDiagnosticLevel + + + 1 + + + cloud_package.cspkg + + + ServiceConfiguration.Cloud.cscfg + + + Add-ons for {0} + + + Communication could not be established. This could be due to an invalid subscription ID. Note that subscription IDs are case sensitive. + + + Complete + + + Complete + + + config.json + + + VirtualMachine creation failed. + WAPackIaaS + + + Creating the website failed. If this is the first website for this subscription, please create it using the management portal instead. + + + Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core + + + //blobcontainer[@datacenter='{0}'] + + + Setting: {0} as the default and current subscription. To view other subscriptions use Get-AzureSubscription + + + none + + + There are no hostnames which could be used for validation. + + + 8080 + + + 1000 + + + Auto + + + 80 + + + Delete + WAPackIaaS + + + The {0} slot for service {1} is already in {2} state + + + The deployment in {0} slot for service {1} is removed + + + Microsoft.WindowsAzure.Plugins.Caching.DiagnosticLevel + + + 1 + + + The key to add already exists in the dictionary. + + + The array index cannot be less than zero. + + + The supplied array does not have enough room to contain the copied elements. + + + The provided dns {0} doesn't exist + + + Microsoft Azure Certificate + + + Endpoint can't be retrieved for storage account + + + {0} end processing. + + + To use Active Directory authentication, you must configure the ActiveDirectoryEndpoint, ActiveDirectoryTenantId, and ActiveDirectorServiceEndpointResourceId for environment of '{0}'. You can configure these properties for this environment using the Set-AzureEnvironment cmdlet. + + + The environment '{0}' already exists. + + + The environment name '{0}' is not found. + + + environments.xml + + + Error creating VirtualMachine + WAPackIaaS + + + Unable to download available runtimes for location '{0}' + + + Error updating VirtualMachine + WAPackIaaS + + + Your Microsoft Azure credential in the Windows PowerShell session has expired. Please use Add-AzureAccount to login again. + + + Job Id {0} failed. Error: {1}, ExceptionDetails: {2} + WAPackIaaS + + + The HTTP request was forbidden with client authentication scheme 'Anonymous'. + + + This add-on requires you to purchase the first instance through the Microsoft Azure Portal. Subsequent purchases can be performed through PowerShell. + + + Operation Status: + + + Resources\Scaffolding\General + + + Getting all available Microsoft Azure Add-Ons, this may take few minutes... + + + Name{0}Primary Key{0}Seconday Key + + + Git not found. Please install git and place it in your command line path. + + + Could not find publish settings. Please run Import-AzurePublishSettingsFile. + + + Could not find publish settings. Please run Import-AzurePublishSettingsFile. + + + iisnode.dll + + + iisnode + + + iisnode-dev\\release\\x64 + + + iisnode + + + Installing IISNode version {0} in Azure for WebRole '{1}' (the version locally installed is: {2}) + + + Illegal characters in path. + + + Illegal characters in path. + + + Internal Server Error + + + Cannot enable memcach protocol on a cache worker role {0}. + + + Invalid certificate format. Publish settings may be corrupted. Use Get-AzurePublishSettingsFile to download updated settings + + + Invalid certificate format. Publish settings may be corrupted. Use Get-AzurePublishSettingsFile to download updated settings + + + Invalid certificate format. + + + The provided configuration path is invalid or doesn't exist + + + The country name is invalid, please use a valid two character country code, as described in ISO 3166-1 alpha-2. + + + No current subscription has been designated. Use Select-AzureSubscription -Current <subscriptionName> to set the current subscription. + + + The ID of the current subscription is invalid. Use Set-AzureSubscription to fix the subscription ID or use Select-AzureSubscription to use a different subscription. + + + The management certificate of the current subscription is invalid. Use Set-AzureSubscription to fix the management certificate or use Select-AzureSubscription to use a different subscription. + + + No default subscription has been designated. Use Select-AzureSubscription -Default <subscriptionName> to set the default subscription. + + + Deployment with {0} does not exist + + + The deployment slot name {0} is invalid. Slot name must be either "Staging" or "Production". + + + "{0}" is an invalid DNS name for {1} + + + Invalid service endpoint. + + + The provided file in {0} must be have {1} extension + + + File {0} has invalid characters + + + You must create your git publishing credentials using the Microsoft Azure portal. +Please follow these steps in the portal: +1. On the left side open "Web Sites" +2. Click on any website +3. Choose "Setup Git Publishing" or "Reset deployment credentials" +4. Back in the PowerShell window, rerun this command by typing "New-AzureWebSite {site name} -Git -PublishingUsername {username} + + + The value {0} provided is not a valid GUID. Please provide a valid GUID. + + + The specified hostname does not exist. Please specify a valid hostname for the site. + + + Role {0} instances must be greater than or equal 0 and less than or equal 20 + + + There was an error creating your webjob. Please make sure that the script is in the root folder of the zip file. + + + Cannot create instance of management client type {0}. It does not have the expected constructor. + + + Could not download a valid runtime manifest, Please check your internet connection and try again. + + + The account {0} was not found. Please specify a valid account name. + + + The provided name "{0}" does not match the service bus namespace naming rules. + + + Value cannot be null. Parameter name: '{0}' + + + {0} is invalid or empty + + + The provided package path is invalid or doesn't exist + + + '{0}' is an invalid parameter set name. + + + {0} doesn't exist in {1} or you've not passed valid value for it + + + Path {0} has invalid characters + + + The provided publish settings file {0} has invalid content. Please get valid by running cmdlet Get-AzurePublishSettingsFile + + + The provided publish settings file {0} has invalid content. Please get valid by running cmdlet Get-AzurePublishSettingsFile + + + The provided role name "{0}" has invalid characters + + + A valid name for the service root folder is required + + + {0} is not a recognized runtime type + + + A valid language is required + + + No subscription is currently selected. Use Select-Subscription to activate a subscription. + + + The provided location "{0}" does not exist in the available locations use Get-AzureSBLocation for listing available locations. + + + Please provide a service name or run this command from inside a service project directory. + + + You must provide valid value for {0} + + + You must provide valid value for {0} + + + settings.json is invalid or doesn't exist + + + The subscription named '{0}' cannot be found. Use Set-AzureSubscription to initialize the subscription data. + + + The provided subscription id {0} is not valid + + + Must specify a non-null subscription name. + + + A valid subscription name is required. This can be provided using the -Subscription parameter or by setting the subscription via the Set-AzureSubscription cmdlet + + + The provided subscriptions file {0} has invalid content. + + + Your Azure credentials have not been set up or have expired, please run Add-AzureAccount to set up your Azure credentials. + + + Role {0} VM size should be ExtraSmall, Small, Medium, Large or ExtraLarge. + + + The web job file must have *.zip extension + + + Singleton option works for continuous jobs only. + + + The website {0} was not found. Please specify a valid website name. + + + No job for id: {0} was found. + WAPackIaaS + + + engines + + + Scaffolding for this language is not yet supported + + + Link already established + + + local_package.csx + + + ServiceConfiguration.Local.cscfg + + + Looking for {0} deployment for {1} cloud service... + + + Looking for cloud service {0}... + + + managementCertificate.pem + + + ?whr={0} + + + //baseuri + + + uri + + + http://az413943.vo.msecnd.net/node/runtimemanifest_0.7.5.2.xml + + + v2.5 + + + memcache_default + + + 11211 + + + v2.5 + + + Python 2.7 is not installed. Please install it as well as Django 1.4. + + + Multiple Add-Ons found holding name {0} + + + Multiple possible publishing users. Please go to the Portal and use the listed deployment user, or click 'set/reset deployment credentials' to set up a new user account, then reurn this cmdlet and specify PublishingUsername. + + + The first publish settings file "{0}" is used. If you want to use another file specify the file name. + + + Microsoft.WindowsAzure.Plugins.Caching.NamedCaches + + + {"caches":[{"name":"default","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":10,"isExpirable":true,"type":1},"serverNotification":{"isEnabled":false}},"secondaries":0}]} + + + A publishing username is required. Please specify one using the argument PublishingUsername. + + + New Add-On Confirmation + + + By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis +for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) +agree to the {2}'s terms of user and privacy statement at {0} and (c) agree to sharing my +contact information with {2}. + + + Internal Server Error. This could happen because the namespace name is already used or due to an incorrect location name. Use Get-AzureSBLocation cmdlet to list valid names. + + + By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis +for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) +acknowledge the offering is provided by {2}, not Microsoft, and agree to {2}'s terms of +use and privacy statement at {0} and (c) agree to sharing my contact information with {2}. + + + Service has been created at {0} + + + No + + + There is no access token cached for subscription {0}, user id {1}. Use the Add-AzureAccount cmdlet to log in again and get a token for this subscription. + + + The service does not have any cache worker roles, add one first by running cmdlet Add-AzureCacheWorkerRole. + + + No clouds available + WAPackIaaS + + + nodejs + + + node + + + node.exe + + + There is no default subscription set, please set a default subscription by running Set-AzureSubscription -Default <subscription name> + + + Microsoft SDKs\Azure\Nodejs\Nov2011 + + + nodejs + + + node + + + Resources\Scaffolding\Node + + + Microsoft.WindowsAzure.Commands.CloudService.ScaffoldingResources.Node + + + Installing Node version {0} in Azure for Role '{1}' (the Node version locally installed is: {2}) + + + No, I do not agree + + + Please connect to internet before executing this cmdlet + + + Please connect to internet before executing this cmdlet + + + No publish settings files with extension *.publishsettings are found in the directory "{0}". + + + '{0}' must be a cache worker role. Verify that it has proper cache worker role configuration. + + + Certificate can't be null. + + + {0} could not be null or empty + + + Unable to add a null RoleSettings to {0} + + + Unable to add new role to null service definition + + + The request offer '{0}' is not found. + + + Operation "{0}" failed on VM with ID: {1} + WAPackIaaS + + + The REST operation failed with message '{0}' and error code '{1}' + + + Job Id {0} did not complete within expected time or it is in Failed/Canceled/Invalid state. + WAPackIaaS + + + package + + + Package is created at service root path {0}. + + + {{ + "author": "", + + "name": "{0}", + "version": "0.0.0", + "dependencies":{{}}, + "devDependencies":{{}}, + "optionalDependencies": {{}}, + "engines": {{ + "node": "*", + "iisnode": "*" + }} + +}} + + + + package.json + + + Path {0} doesn't exist. + + + Path for {0} doesn't exist in {1}. + + + A value for the Peer Asn has to be provided. + + + 5.4.0 + + + php + + + Resources\Scaffolding\PHP + + + Microsoft.WindowsAzure.Commands.CloudService.ScaffoldingResources.PHP + + + Installing PHP version {0} for Role '{1}' (the PHP version locally installed is: {2}) + + + You must create your first web site using the Microsoft Azure portal. +Please follow these steps in the portal: +1. At the bottom of the page, click on New > Web Site > Quick Create +2. Type {0} in the URL field +3. Click on "Create Web Site" +4. Once the site has been created, click on the site name +5. Click on "Set up Git publishing" or "Reset deployment credentials" and setup a publishing username and password. Use those credentials for all new websites you create. + + + 6. Back in the console window, rerun this command by typing "New-AzureWebsite <site name> -Git" + + + A value for the Primary Peer Subnet has to be provided. + + + Promotion code can be used only when updating to a new plan. + + + Service not published at user request. + + + Complete. + + + Connecting... + + + Created Deployment ID: {0}. + + + Created hosted service '{0}'. + + + Created Website URL: {0}. + + + Creating... + + + Initializing... + + + busy + + + creating the virtual machine + + + Instance {0} of role {1} is {2}. + + + ready + + + Preparing deployment for {0} with Subscription ID: {1}... + + + Publishing {0} to Microsoft Azure. This may take several minutes... + + + publish settings + + + Azure + + + .PublishSettings + + + publishSettings.xml + + + &whr={0} + + + Publish settings imported + + + AZURE_PUBLISHINGPROFILE_URL + + + Starting... + + + Upgrading... + + + Uploading Package to storage service {0}... + + + Verifying storage account '{0}'... + + + Resources\Scaffolding\Python + + + Replace current deployment with '{0}' Id ? + + + Are you sure you want to regenerate key? + + + Generate new key. + + + Are you sure you want to remove account '{0}'? + + + Removing account + + + Remove Add-On Confirmation + + + If you delete this add-on, your data may be deleted and the operation may not be undone. You may have to purchase it again from the Microsoft Azure Store to use it. The price of the add-on may not be refunded. Are you sure you want to delete this add-on? Enter “Yes” to confirm. + + + Remove-AzureBGPPeering Operation failed. + + + Removing Bgp Peering + + + Successfully removed Azure Bgp Peering with Service Key {0}. + + + Are you sure you want to remove the Bgp Peering with service key '{0}'? + + + Are you sure you want to remove the Dedicated Circuit with service key '{0}'? + + + Remove-AzureDedicatedCircuit Operation failed. + + + Remove-AzureDedicatedCircuitLink Operation failed. + + + Removing Dedicated Circui Link + + + Successfully removed Azure Dedicated Circuit Link with Service Key {0} and Vnet Name {1} + + + Are you sure you want to remove the Dedicated Circuit Link with service key '{0}' and virtual network name '{1}'? + + + Removing Dedicated Circuit + + + Successfully removed Azure Dedicated Circuit with Service Key {0}. + + + Removing cloud service {0}... + + + The current subscription is being removed. Use Select-AzureSubscription <subscriptionName> to select a new current subscription. + + + The default subscription is being removed. Use Select-AzureSubscription -Default <subscriptionName> to select a new default subscription. + + + Removing {0} deployment for {1} service + + + Removing job collection + + + Are you sure you want to remove the job collection "{0}" + + + Removing job + + + Are you sure you want to remove the job "{0}" + + + Are you sure you want to remove the account? + + + Account removed. + + + Internal Server Error. This could happen because the namespace does not exist or it does not exist under your subscription. + + + Removing old package {0}... + + + Are you sure you want to delete the namespace '{0}'? + + + Are you sure you want to remove cloud service? + + + Remove cloud service and all it's deployments + + + Are you sure you want to remove subscription '{0}'? + + + Removing subscription + + + Are you sure you want to delete the VM '{0}'? + + + Deleting VM. + + + Removing WebJob... + + + Are you sure you want to remove job '{0}'? + + + Removing website + + + Are you sure you want to remove the website "{0}" + + + Deleting namespace + + + Repository is not setup. You need to pass a valid site name. + + + Reserved IP with the Name:'{0}' will no longer be in use after the deployment is deleted, and it is still reserved for later use. + + + Resource with ID : {0} does not exist. + WAPackIaaS + + + Restart + WAPackIaaS + + + Resume + WAPackIaaS + + + /role:{0};"{1}/{0}" + + + bin + + + Role {0} is {1} + + + 20 + + + role name + + + The provided role name {0} doesn't exist + + + RoleSettings.xml + + + Role type {0} doesn't exist + + + public static Dictionary<string, Location> ReverseLocations { get; private set; } + + + Preparing runtime deployment for service '{0}' + + + WARNING Runtime Mismatch: Are you sure that you want to publish service '{0}' using an Azure runtime version that does not match your local runtime version? + + + RUNTIMEOVERRIDEURL + + + /runtimemanifest/runtimes/runtime + + + RUNTIMEID + + + RUNTIMEURL + + + RUNTIMEVERSIONPRIMARYKEY + + + scaffold.xml + + + Invalid location entered. Pick one of the locations from Get-AzureSchedulerLocation + + + A value for the Secondary Peer Subnet has to be provided. + + + Service {0} already exists on disk in location {1} + + + No ServiceBus authorization rule with the given characteristics was found + + + The service bus entity '{0}' is not found. + + + Internal Server Error. This could happen due to an incorrect/missing namespace + + + service configuration + + + service definition + + + ServiceDefinition.csdef + + + ServiceDefinition.csdef + + + {0}Deploy + + + The specified cloud service "{0}" does not exist. + + + {0} slot for service {1} is in {2} state, please wait until it finish and update it's status + + + Begin Operation: {0} + + + Completed Operation: {0} + + + Begin Operation: {0} + + + Completed Operation: {0} + + + service name + + + The provided service name {0} already exists, please pick another name + + + The provided service name {0} already exists, please pick another name + + + Please provide name for the hosted service + + + service parent directory + + + Service {0} removed successfully + + + service directory + + + service settings + + + The storage account name '{0}' is invalid. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + + + The storage account name '{0}' is invalid. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + + + service settings + + + The {0} slot for cloud service {1} doesn't exist. + + + {0} slot for service {1} is {2} + + + Set Add-On Confirmation + + + Note - You will be charged the amount for the new plan, without being refunded for time remaining +in the existing plan. +By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis +for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) +agree to the {2}'s terms of user and privacy statement at {0} and (c) agree to sharing my +contact information with {2}. + + + Note - You will be charged the amount for the new plan, without being refunded for time remaining +in the existing plan. +By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis +for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) +acknowledge the offering is provided by {2}, not Microsoft, and agree to {2}'s terms of +use and privacy statement at <url> and (c) agree to sharing my contact information with {2}. + + + Role {0} instances are set to {1} + + + {"Slot":"","Location":"","Subscription":"","StorageAccountName":""} + + + deploymentSettings.json + + + deploymentSettings.json + + + Confirm + + + Confirm + + + Shutdown + WAPackIaaS + + + /sites:{0};{1};"{2}/{0}" + + + 1000 + + + Start + WAPackIaaS + + + Started + + + Starting Emulator... + + + start + + + Stop + WAPackIaaS + + + Stopping emulator... + + + Stopped + + + stop + + + Account Name: + + + Cannot find storage account '{0}' please type the name of an existing storage account. + + + WAStorageEmulator.exe + + + InstallPath + + + SOFTWARE\Microsoft\Windows Azure Storage Emulator + + + Primary Key: + + + Secondary Key: + + + The subscription named {0} already exists. + + + DefaultSubscriptionData.xml + + + The subscription data file {0} does not exist. + + + The subscription id {0} doesn't exist. + + + The subscription name {0} doesn't exist. + + + Subscription must not be null + WAPackIaaS + + + Suspend + WAPackIaaS + + + Swapping website production slot ... + + + Are you sure you want to swap the website '{0}' production slot with slot '{1}'? + + + Unable to create Django application: {0} + + + Make sure you have Python 2.7 installed along with Django installed to site-packages. + + + Unable to update mismatching Json structured: {0} {1}. + + + The provider {0} is unknown. + + + Update + WAPackIaaS + + + Updated settings for subscription '{0}'. Current subscription is '{1}'. + + + A value for the VLan Id has to be provided. + + + Please wait... + + + The azure storage emulator is not installed, skip launching... + + + Web.cloud.config + + + web.config + + + MSDeploy + + + Cannot build the project successfully. Please see logs in {0}. + + + WebRole + + + setup_web.cmd > log.txt + + + WebRole.xml + + + WebSite with given name {0} already exists in the specified Subscription and Webspace. + + + WebSite with given name {0} already exists in the specified Subscription and Location. + + + Site {0} already has repository created for it. + + + Workspaces/WebsiteExtension/Website/{0}/dashboard/ + + + https://{0}/msdeploy.axd?site={1} + + + WorkerRole + + + setup_worker.cmd > log.txt + + + WorkerRole.xml + + + (x86) + + + Yes + + + Yes, I agree + + + Remove-AzureTrafficManagerProfile Operation failed. + + + Successfully removed Traffic Manager profile with name {0}. + + + Are you sure you want to remove the Traffic Manager profile "{0}"? + + + Profile {0} already has an endpoint with name {1} + + + Profile {0} does not contain endpoint {1}. Adding it. + + + The endpoint {0} cannot be removed from profile {1} because it's not in the profile. + + + Insufficient parameters passed to create a new endpoint. + + + Ambiguous operation: the profile name specified doesn't match the name of the profile object. + + + <NONE> + + + + + + "An exception occurred when calling the ServiceManagement API. HTTP Status Code: {0}. Service Management Error Code: {1}. Message: {2}. Operation Tracking ID: {3}." + {0} is the HTTP status code. {1} is the Service Management Error Code. {2} is the Service Management Error message. {3} is the operation tracking ID. + + + Unable to decode string from base 64. Please make sure the string is correctly encoded: {0}. + {0} is the string that is not in a valid base 64 format. + + + -Credential parameter can only be used with Organization ID credentials. For more information, please refer to http://go.microsoft.com/fwlink/?linkid=331007&clcid=0x409 for more information about the difference between an organizational account and a Microsoft account. + + + Skipping external tenant {0}, because you are using a guest or a foreign principal object identity. In order to access this tenant, please run Add-AzureAccount without "-Credential". + + + Removing an environment will remove all associated subscriptions and accounts. Are you sure you want to remove an environment '{0}'? + + + Removing environment + + + Removing public environment is not supported. + + + Changing public environment is not supported. + + + Credential type invalid, only handles '{0}' + + + Illegal credential type + + + There is no subscription associated with account {0}. + + + Account id doesn't match one in subscription. + + + Environment name doesn't match one in subscription. + + + Unable to retrieve service key for ServicePrincipal account {0}. Please run the Add-AzureAccount cmdlet to supply the credentials for this service principal. + + + Removing the Azure profile will remove all associated environments, subscriptions, and accounts. Are you sure you want to remove the Azure profile? + + + Removing the Azure profile + + \ No newline at end of file diff --git a/src/Common/Commands.Common/Utilities/ConversionUtilities.cs b/src/Common/Commands.Common/Utilities/ConversionUtilities.cs new file mode 100644 index 000000000000..464ebd4f59ea --- /dev/null +++ b/src/Common/Commands.Common/Utilities/ConversionUtilities.cs @@ -0,0 +1,105 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.InteropServices; +using System.Security; +using System.Text; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common +{ + public static class ConversionUtilities + { + public static Dictionary ToDictionary(this Hashtable hashtable, bool addValueLayer) + { + if (hashtable == null) + { + return null; + } + else + { + var dictionary = new Dictionary(); + foreach (var entry in hashtable.Cast()) + { + var valueAsHashtable = entry.Value as Hashtable; + + if (valueAsHashtable != null) + { + dictionary[(string)entry.Key] = valueAsHashtable.ToDictionary(addValueLayer); + } + else + { + object value = entry.Value; + + if (entry.Value is SecureString) + { + value = SecureStringToString(entry.Value as SecureString); + } + + if (addValueLayer) + { + dictionary[(string)entry.Key] = new Hashtable { { "value", value } }; + } + else + { + dictionary[(string)entry.Key] = value; + } + } + } + return dictionary; + } + } + + public static Hashtable ToHashtable(this IDictionary dictionary) + { + if (dictionary == null) + { + return null; + } + else + { + return new Hashtable((Dictionary)dictionary); + } + } + + /// + /// Convert the given array into string. + /// + /// The type of the object array is holding + /// The collection + /// The used delimiter between array elements + /// The array into string representation + public static string ArrayToString(this T[] array, string delimiter) + { + return (array == null) ? null : (array.Length == 0) ? String.Empty : array.Skip(1).Aggregate(new StringBuilder(array[0].ToString()), (s, i) => s.Append(delimiter).Append(i), s => s.ToString()); + } + + public static string SecureStringToString(SecureString secureString) + { + IntPtr valuePtr = IntPtr.Zero; + try + { + valuePtr = Marshal.SecureStringToGlobalAllocUnicode(secureString); + return Marshal.PtrToStringUni(valuePtr); + } + finally + { + Marshal.ZeroFreeGlobalAllocUnicode(valuePtr); + } + } + } +} diff --git a/src/Common/Commands.Common/Utilities/DictionaryExtensions.cs b/src/Common/Commands.Common/Utilities/DictionaryExtensions.cs new file mode 100644 index 000000000000..1eaaa77c3b6c --- /dev/null +++ b/src/Common/Commands.Common/Utilities/DictionaryExtensions.cs @@ -0,0 +1,78 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Microsoft.WindowsAzure.Commands.Common.Utilities +{ + public static class DictionaryExtensions + { + public static TValue GetProperty(this Dictionary dictionary, TKey property) + { + if (dictionary.ContainsKey(property)) + { + return dictionary[property]; + } + + return default(TValue); + } + + public static string[] GetPropertyAsArray(this Dictionary dictionary, TKey property) + { + if (dictionary.ContainsKey(property)) + { + return dictionary[property].Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries); + } + + return new string[0]; + } + + public static void SetProperty(this Dictionary dictionary, TKey property, params string[] values) + { + if (values == null || values.Length == 0) + { + if (dictionary.ContainsKey(property)) + { + dictionary.Remove(property); + } + } + else + { + dictionary[property] = string.Join(",", values); + } + } + + public static void SetOrAppendProperty(this Dictionary dictionary, TKey property, params string[] values) + { + string oldValueString = ""; + if (dictionary.ContainsKey(property)) + { + oldValueString = dictionary[property]; + } + var oldValues = oldValueString.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries); + var newValues = oldValues.Union(values, StringComparer.CurrentCultureIgnoreCase).Where(s => !string.IsNullOrEmpty(s)).ToArray(); + if (newValues.Any()) + { + dictionary[property] = string.Join(",", newValues); + } + } + + public static bool IsPropertySet(this Dictionary dictionary, TKey property) + { + return dictionary.ContainsKey(property) && !string.IsNullOrEmpty(dictionary[property]); + } + } +} diff --git a/src/Common/Commands.Common/Utilities/FileUtilities.cs b/src/Common/Commands.Common/Utilities/FileUtilities.cs new file mode 100644 index 000000000000..33ce3f25c731 --- /dev/null +++ b/src/Common/Commands.Common/Utilities/FileUtilities.cs @@ -0,0 +1,322 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using Microsoft.WindowsAzure.Commands.Common.Interfaces; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Properties; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common +{ + public static class FileUtilities + { + static FileUtilities() + { + DataStore = new DiskDataStore(); + } + + public static IDataStore DataStore { get; set; } + + public static string GetAssemblyDirectory() + { + var assemblyPath = Uri.UnescapeDataString(new Uri(Assembly.GetExecutingAssembly().CodeBase).AbsolutePath); + return Path.GetDirectoryName(assemblyPath); + } + + public static string GetContentFilePath(string fileName) + { + return GetContentFilePath(GetAssemblyDirectory(), fileName); + } + + public static string GetContentFilePath(string startDirectory, string fileName) + { + string path = Path.Combine(startDirectory, fileName); + + // Try search in the subdirectories in case that the file path does not exist in root path + if (!DataStore.FileExists(path) && !DataStore.DirectoryExists(path)) + { + try + { + path = DataStore.GetDirectories(startDirectory, fileName, SearchOption.AllDirectories).FirstOrDefault(); + + if (string.IsNullOrEmpty(path)) + { + path = DataStore.GetFiles(startDirectory, fileName, SearchOption.AllDirectories).First(); + } + } + catch + { + throw new FileNotFoundException(Path.Combine(startDirectory, fileName)); + } + } + + return path; + } + + public static string GetWithProgramFilesPath(string directoryName, bool throwIfNotFound) + { + string programFilesPath = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles); + if (DataStore.DirectoryExists(Path.Combine(programFilesPath, directoryName))) + { + return Path.Combine(programFilesPath, directoryName); + } + else + { + if (programFilesPath.IndexOf(Resources.x86InProgramFiles, StringComparison.InvariantCultureIgnoreCase) == -1) + { + programFilesPath += Resources.x86InProgramFiles; + if (throwIfNotFound) + { + Validate.ValidateDirectoryExists(Path.Combine(programFilesPath, directoryName)); + } + return Path.Combine(programFilesPath, directoryName); + } + else + { + programFilesPath = programFilesPath.Replace(Resources.x86InProgramFiles, String.Empty); + if (throwIfNotFound) + { + Validate.ValidateDirectoryExists(Path.Combine(programFilesPath, directoryName)); + } + return Path.Combine(programFilesPath, directoryName); + } + } + } + + /// + /// Copies a directory. + /// + /// The source directory name + /// The destination directory name + /// Should the copy be recursive + public static void DirectoryCopy(string sourceDirName, string destDirName, bool copySubDirs) + { + var dirs = DataStore.GetDirectories(sourceDirName); + + if (!DataStore.DirectoryExists(sourceDirName)) + { + throw new DirectoryNotFoundException(String.Format(Resources.PathDoesNotExist, sourceDirName)); + } + + DataStore.CreateDirectory(destDirName); + + var files = DataStore.GetFiles(sourceDirName); + foreach (var file in files) + { + string tempPath = Path.Combine(destDirName, Path.GetFileName(file)); + DataStore.CopyFile(file, tempPath); + } + + if (copySubDirs) + { + foreach (var subdir in dirs) + { + string temppath = Path.Combine(destDirName, Path.GetDirectoryName(subdir)); + DirectoryCopy(subdir, temppath, copySubDirs); + } + } + } + + /// + /// Ensures that a directory exists beofre attempting to write a file + /// + /// The path to the file that will be created + public static void EnsureDirectoryExists(string pathName) + { + Validate.ValidateStringIsNullOrEmpty(pathName, "Settings directory"); + string directoryPath = Path.GetDirectoryName(pathName); + if (!DataStore.DirectoryExists(directoryPath)) + { + DataStore.CreateDirectory(directoryPath); + } + } + + /// + /// Create a unique temp directory. + /// + /// Path to the temp directory. + public static string CreateTempDirectory() + { + string tempPath; + do + { + tempPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); + } + while (DataStore.DirectoryExists(tempPath) || DataStore.FileExists(tempPath)); + + DataStore.CreateDirectory(tempPath); + return tempPath; + } + + /// + /// Copy a directory from one path to another. + /// + /// Source directory. + /// Destination directory. + public static void CopyDirectory(string sourceDirectory, string destinationDirectory) + { + Debug.Assert(!String.IsNullOrEmpty(sourceDirectory), "sourceDictory cannot be null or empty!"); + Debug.Assert(Directory.Exists(sourceDirectory), "sourceDirectory must exist!"); + Debug.Assert(!String.IsNullOrEmpty(destinationDirectory), "destinationDirectory cannot be null or empty!"); + Debug.Assert(!Directory.Exists(destinationDirectory), "destinationDirectory must not exist!"); + + foreach (string file in DataStore.GetFiles(sourceDirectory, "*", SearchOption.AllDirectories)) + { + string relativePath = file.Substring( + sourceDirectory.Length + 1, + file.Length - sourceDirectory.Length - 1); + string destinationPath = Path.Combine(destinationDirectory, relativePath); + + string destinationDir = Path.GetDirectoryName(destinationPath); + if (!DataStore.DirectoryExists(destinationDir)) + { + DataStore.CreateDirectory(destinationDir); + } + + DataStore.CopyFile(file, destinationPath); + } + } + + public static Encoding GetFileEncoding(string path) + { + Encoding encoding; + + + if (DataStore.FileExists(path)) + { + using (StreamReader r = new StreamReader(DataStore.ReadFileAsStream(path))) + { + encoding = r.CurrentEncoding; + } + } + else + { + encoding = Encoding.Default; + } + + return encoding; + } + + public static string CombinePath(params string[] paths) + { + return Path.Combine(paths); + } + + /// + /// Returns true if path is a valid directory. + /// + /// + /// + public static bool IsValidDirectoryPath(string path) + { + if (String.IsNullOrEmpty(path)) + { + return false; + } + + try + { + FileAttributes attributes = DataStore.GetFileAttributes(path); + + if ((attributes & FileAttributes.Directory) == FileAttributes.Directory) + { + return true; + } + else + { + return false; + } + } + catch + { + return false; + } + } + + public static void RecreateDirectory(string dir) + { + if (DataStore.DirectoryExists(dir)) + { + DataStore.DeleteDirectory(dir); + } + + DataStore.CreateDirectory(dir); + } + + /// + /// Gets the root installation path for the given Azure module. + /// + /// The module name + /// The module full path + public static string GetPSModulePathForModule(AzureModule module) + { + return GetContentFilePath(GetInstallPath(), GetModuleFolderName(module)); + } + + /// + /// Gets the root directory for all modules installation. + /// + /// The install path + public static string GetInstallPath() + { + string currentPath = GetAssemblyDirectory(); + while (!currentPath.EndsWith(GetModuleFolderName(AzureModule.AzureProfile)) && + !currentPath.EndsWith(GetModuleFolderName(AzureModule.AzureResourceManager)) && + !currentPath.EndsWith(GetModuleFolderName(AzureModule.AzureServiceManagement))) + { + currentPath = Directory.GetParent(currentPath).FullName; + } + + // The assemption is that the install directory looks like that: + // ServiceManagement + // AzureServiceManagement + // + // ResourceManager + // AzureResourceManager + // + // Profile + // AzureProfile + // + return Directory.GetParent(currentPath).FullName; + } + + public static string GetModuleName(AzureModule module) + { + switch (module) + { + case AzureModule.AzureServiceManagement: + return "Azure"; + + case AzureModule.AzureResourceManager: + return "AzureResourceManager"; + + case AzureModule.AzureProfile: + return "AzureProfile"; + + default: + throw new ArgumentOutOfRangeException(module.ToString()); + } + } + + public static string GetModuleFolderName(AzureModule module) + { + return module.ToString().Replace("Azure", ""); + } + } +} diff --git a/src/Common/Commands.Common/Utilities/GeneralUtilities.cs b/src/Common/Commands.Common/Utilities/GeneralUtilities.cs new file mode 100644 index 000000000000..02189364034e --- /dev/null +++ b/src/Common/Commands.Common/Utilities/GeneralUtilities.cs @@ -0,0 +1,419 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Reflection; +using System.Security.Cryptography.X509Certificates; +using System.Security.Permissions; +using System.ServiceModel.Channels; +using System.Text; +using System.Xml; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Common.Internals; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common +{ + public static class GeneralUtilities + { + private static Assembly assembly = Assembly.GetExecutingAssembly(); + + private static List AuthorizationHeaderNames = new List() { "Authorization" }; + + private static bool TryFindCertificatesInStore(string thumbprint, + System.Security.Cryptography.X509Certificates.StoreLocation location, out X509Certificate2Collection certificates) + { + X509Store store = new X509Store(StoreName.My, location); + store.Open(OpenFlags.ReadOnly); + certificates = store.Certificates.Find(X509FindType.FindByThumbprint, thumbprint, false); + store.Close(); + + return certificates != null && certificates.Count > 0; + } + + public static string GetNodeModulesPath() + { + return Path.Combine(FileUtilities.GetAssemblyDirectory(), Resources.NodeModulesPath); + } + + [PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")] + public static void LaunchWebPage(string target) + { + ProcessHelper.Start(target); + } + + public static X509Certificate2 GetCertificateFromStore(string thumbprint) + { + Validate.ValidateStringIsNullOrEmpty(thumbprint, "certificate thumbprint"); + X509Certificate2Collection certificates; + if (TryFindCertificatesInStore(thumbprint, StoreLocation.CurrentUser, out certificates) || + TryFindCertificatesInStore(thumbprint, StoreLocation.LocalMachine, out certificates)) + { + return certificates[0]; + } + else + { + throw new ArgumentException(string.Format(Resources.CertificateNotFoundInStore, thumbprint)); + } + } + + /// + /// Compares two strings with handling special case that base string can be empty. + /// + /// The base string. + /// The comparer string. + /// True if equals or leftHandSide is null/empty, false otherwise. + public static bool TryEquals(string leftHandSide, string rightHandSide) + { + if (string.IsNullOrEmpty(leftHandSide) || + leftHandSide.Equals(rightHandSide, StringComparison.OrdinalIgnoreCase)) + { + return true; + } + + return false; + } + + public static string ReadMessageBody(ref Message originalMessage) + { + StringBuilder strBuilder = new StringBuilder(); + + using (MessageBuffer messageBuffer = originalMessage.CreateBufferedCopy(int.MaxValue)) + { + Message message = messageBuffer.CreateMessage(); + XmlWriter writer = XmlWriter.Create(strBuilder); + using (XmlDictionaryWriter dictionaryWriter = XmlDictionaryWriter.CreateDictionaryWriter(writer)) + { + message.WriteBodyContents(dictionaryWriter); + } + + originalMessage = messageBuffer.CreateMessage(); + } + + return XmlUtilities.Beautify(strBuilder.ToString()); + } + + public static string GetConfiguration(string configurationPath) + { + var configuration = string.Join(string.Empty, File.ReadAllLines(configurationPath)); + return configuration; + } + + /// + /// Get the value for a given key in a dictionary or return a default + /// value if the key isn't present in the dictionary. + /// + /// The type of the key. + /// The type of the value. + /// The dictionary. + /// The key. + /// A default value + /// The corresponding value or default value. + public static V GetValueOrDefault(this IDictionary dictionary, K key, V defaultValue) + { + Debug.Assert(dictionary != null, "dictionary cannot be null!"); + + V value; + if (!dictionary.TryGetValue(key, out value)) + { + value = defaultValue; + } + return value; + } + + /// + /// Returns a non-null sequence by either passing back the original + /// sequence or creating a new empty sequence if the original was null. + /// + /// Type of elements in the sequence. + /// The sequence. + /// A non-null sequence. + public static IEnumerable NonNull(this IEnumerable sequence) + { + return (sequence != null) ? + sequence : + Enumerable.Empty(); + } + + /// + /// Perform an action on each element of a sequence. + /// + /// Type of elements in the sequence. + /// The sequence. + /// The action to perform. + public static void ForEach(this IEnumerable sequence, Action action) + { + Debug.Assert(sequence != null, "sequence cannot be null!"); + Debug.Assert(action != null, "action cannot be null!"); + + foreach (T element in sequence) + { + action(element); + } + } + + /// + /// Append an element to the end of an array. + /// + /// Type of the arrays. + /// The left array. + /// The right array. + /// The concatenated arrays. + public static T[] Append(T[] left, T right) + { + if (left == null) + { + return right != null ? + new T[] { right } : + new T[] { }; + } + else if (right == null) + { + return left; + } + else + { + return Enumerable.Concat(left, new T[] { right }).ToArray(); + } + } + + public static TResult MaxOrDefault(this IEnumerable sequence, Func selector, TResult defaultValue) + { + return (sequence != null) ? sequence.Max(selector) : defaultValue; + } + + /// + /// Extends the array with one element. + /// + /// The array type + /// The array holding elements + /// The item to add + /// New array with added item + public static T[] ExtendArray(IEnumerable collection, T item) + { + if (collection == null) + { + collection = new T[0]; + } + + List list = new List(collection); + list.Add(item); + return list.ToArray(); + } + + /// + /// Extends the array with another array + /// + /// The array type + /// The array holding elements + /// The items to add + /// New array with added items + public static T[] ExtendArray(IEnumerable collection, IEnumerable items) + { + if (collection == null) + { + collection = new T[0]; + } + + if (items == null) + { + items = new T[0]; + } + + return collection.Concat(items).ToArray(); + } + + /// + /// Initializes given object if its set to null. + /// + /// The object type + /// The object to initialize + /// Initialized object + public static T InitializeIfNull(T obj) + where T : new() + { + if (obj == null) + { + return new T(); + } + + return obj; + } + + public static string EnsureTrailingSlash(string url) + { + UriBuilder address = new UriBuilder(url); + if (!address.Path.EndsWith("/", StringComparison.Ordinal)) + { + address.Path += "/"; + } + return address.Uri.AbsoluteUri; + } + + public static string GetHttpResponseLog(string statusCode, WebHeaderCollection headers, string body) + { + StringBuilder httpResponseLog = new StringBuilder(); + httpResponseLog.AppendLine(string.Format("============================ HTTP RESPONSE ============================{0}", Environment.NewLine)); + httpResponseLog.AppendLine(string.Format("Status Code:{0}{1}{0}", Environment.NewLine, statusCode)); + httpResponseLog.AppendLine(string.Format("Headers:{0}{1}", Environment.NewLine, MessageHeadersToString(headers))); + httpResponseLog.AppendLine(string.Format("Body:{0}{1}{0}", Environment.NewLine, body)); + + return httpResponseLog.ToString(); + } + + public static string GetHttpResponseLog(string statusCode, HttpHeaders headers, string body) + { + return GetHttpResponseLog(statusCode, ConvertHttpHeadersToWebHeaderCollection(headers), body); + } + + public static string GetHttpRequestLog( + string method, + string requestUri, + WebHeaderCollection headers, + string body) + { + StringBuilder httpRequestLog = new StringBuilder(); + httpRequestLog.AppendLine(string.Format("============================ HTTP REQUEST ============================{0}", Environment.NewLine)); + httpRequestLog.AppendLine(string.Format("HTTP Method:{0}{1}{0}", Environment.NewLine, method)); + httpRequestLog.AppendLine(string.Format("Absolute Uri:{0}{1}{0}", Environment.NewLine, requestUri)); + httpRequestLog.AppendLine(string.Format("Headers:{0}{1}", Environment.NewLine, MessageHeadersToString(headers))); + httpRequestLog.AppendLine(string.Format("Body:{0}{1}{0}", Environment.NewLine, body)); + + return httpRequestLog.ToString(); + } + + public static string GetHttpRequestLog(string method, string requestUri, HttpHeaders headers, string body) + { + return GetHttpRequestLog(method, requestUri, ConvertHttpHeadersToWebHeaderCollection(headers), body); + } + + public static string GetLog(HttpResponseMessage response) + { + string body = response.Content == null ? string.Empty : FormatString(response.Content.ReadAsStringAsync().Result); + + return GetHttpResponseLog( + response.StatusCode.ToString(), + response.Headers, + body); + } + + public static string GetLog(HttpRequestMessage request) + { + string body = request.Content == null ? string.Empty : FormatString(request.Content.ReadAsStringAsync().Result); + + return GetHttpRequestLog( + request.Method.ToString(), + request.RequestUri.ToString(), + (HttpHeaders)request.Headers, + body); + } + + public static string FormatString(string content) + { + if (ParserHelper.IsXml(content)) + { + return XmlUtilities.TryFormatXml(content); + } + else if (ParserHelper.IsJson(content)) + { + return JsonUtilities.TryFormatJson(content); + } + else + { + return content; + } + } + + private static WebHeaderCollection ConvertHttpHeadersToWebHeaderCollection(HttpHeaders headers) + { + WebHeaderCollection webHeaders = new WebHeaderCollection(); + foreach (KeyValuePair> pair in headers) + { + if (AuthorizationHeaderNames.Any(h => h.Equals(pair.Key, StringComparison.OrdinalIgnoreCase))) + { + // Skip adding the authorization header + continue; + } + + pair.Value.ForEach(v => webHeaders.Add(pair.Key, v)); + } + + return webHeaders; + } + + private static string MessageHeadersToString(WebHeaderCollection headers) + { + string[] keys = headers.AllKeys; + StringBuilder result = new StringBuilder(); + + foreach (string key in keys) + { + result.AppendLine(string.Format( + "{0,-30}: {1}", + key, + ConversionUtilities.ArrayToString(headers.GetValues(key), ","))); + } + + return result.ToString(); + } + + /// + /// Creates https endpoint from the given endpoint. + /// + /// The endpoint uri. + /// The https endpoint uri. + public static Uri CreateHttpsEndpoint(string endpointUri) + { + UriBuilder builder = new UriBuilder(endpointUri) { Scheme = "https" }; + string endpoint = builder.Uri.GetComponents( + UriComponents.AbsoluteUri & ~UriComponents.Port, + UriFormat.UriEscaped); + + return new Uri(endpoint); + } + + public static string DownloadFile(string uri) + { + string contents = null; + + using (WebClient webClient = new WebClient()) + { + try + { + contents = webClient.DownloadString(new Uri(uri)); + } + catch + { + // Ignore the exception and return empty contents + } + } + + return contents; + } + + public static string GenerateSeparator(int amount, string separator) + { + StringBuilder result = new StringBuilder(); + while (amount-- != 0) result.Append(separator); + return result.ToString(); + } + } +} \ No newline at end of file diff --git a/src/Common/Commands.Common/Utilities/JsonUtilities.cs b/src/Common/Commands.Common/Utilities/JsonUtilities.cs new file mode 100644 index 000000000000..fda8d38e39d9 --- /dev/null +++ b/src/Common/Commands.Common/Utilities/JsonUtilities.cs @@ -0,0 +1,205 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Web.Script.Serialization; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common +{ + public static class JsonUtilities + { + [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Handling the failure by returning the original string.")] + public static string TryFormatJson(string str) + { + try + { + object parsedJson = JsonConvert.DeserializeObject(str); + return JsonConvert.SerializeObject(parsedJson, Formatting.Indented); + } + catch + { + // can't parse JSON, return the original string + return str; + } + } + + public static Dictionary DeserializeJson(string jsonString, bool throwExceptionOnFailure = false) + { + Dictionary result = new Dictionary(); + if (jsonString == null) + { + return null; + } + if (String.IsNullOrWhiteSpace(jsonString)) + { + return result; + } + + try + { + JToken responseDoc = JToken.Parse(jsonString); + + if (responseDoc != null && responseDoc.Type == JTokenType.Object) + { + result = DeserializeJObject(responseDoc as JObject); + } + } + catch + { + if (throwExceptionOnFailure) + { + throw; + } + result = null; + } + return result; + } + + private static Dictionary DeserializeJObject(JObject jsonObject) + { + Dictionary result = new Dictionary(); + if (jsonObject == null || jsonObject.Type == JTokenType.Null) + { + return result; + } + foreach (var property in jsonObject) + { + if (property.Value.Type == JTokenType.Object) + { + result[property.Key] = DeserializeJObject(property.Value as JObject); + } + else if (property.Value.Type == JTokenType.Array) + { + result[property.Key] = DeserializeJArray(property.Value as JArray); + } + else + { + result[property.Key] = DeserializeJValue(property.Value as JValue); + } + } + return result; + } + + private static List DeserializeJArray(JArray jsonArray) + { + List result = new List(); + if (jsonArray == null || jsonArray.Type == JTokenType.Null) + { + return result; + } + foreach (var token in jsonArray) + { + if (token.Type == JTokenType.Object) + { + result.Add(DeserializeJObject(token as JObject)); + } + else if (token.Type == JTokenType.Array) + { + result.Add(DeserializeJArray(token as JArray)); + } + else + { + result.Add(DeserializeJValue(token as JValue)); + } + } + return result; + } + + private static object DeserializeJValue(JValue jsonObject) + { + if (jsonObject == null || jsonObject.Type == JTokenType.Null) + { + return null; + } + + return jsonObject.Value; + } + + public static string Patch(string originalJsonString, string patchJsonString) + { + if (string.IsNullOrWhiteSpace(originalJsonString)) + { + return patchJsonString; + } + else if (string.IsNullOrWhiteSpace(patchJsonString)) + { + return originalJsonString; + } + + JToken originalJson = JToken.Parse(originalJsonString); + JToken patchJson = JToken.Parse(patchJsonString); + + if (originalJson != null && originalJson.Type == JTokenType.Object && + patchJson != null && patchJson.Type == JTokenType.Object) + { + PatchJObject(originalJson as JObject, patchJson as JObject); + } + else if (originalJson != null && originalJson.Type == JTokenType.Array && + patchJson != null && patchJson.Type == JTokenType.Array) + { + originalJson = patchJson; + } + else if (originalJson != null && patchJson != null && originalJson.Type == patchJson.Type) + { + originalJson = patchJson; + } + else + { + throw new ArgumentException(string.Format(Resources.UnableToPatchJson, originalJson, patchJson)); + } + + return originalJson.ToString(Formatting.None); + } + + private static void PatchJObject(JObject originalJsonObject, JObject patchJsonObject) + { + foreach (var patchProperty in patchJsonObject) + { + if (originalJsonObject[patchProperty.Key] != null) + { + JToken originalJson = originalJsonObject[patchProperty.Key]; + JToken patchJson = patchProperty.Value; + + if (originalJson != null && originalJson.Type == JTokenType.Object && + patchJson != null && patchJson.Type == JTokenType.Object) + { + PatchJObject(originalJson as JObject, patchJson as JObject); + } + else if (originalJson != null && originalJson.Type == JTokenType.Array && + patchJson != null && patchJson.Type == JTokenType.Array) + { + originalJsonObject[patchProperty.Key] = patchJson; + } + else if (originalJson != null && patchJson != null && originalJson.Type == patchJson.Type) + { + originalJsonObject[patchProperty.Key] = patchJson; + } + else + { + throw new ArgumentException(string.Format(Resources.UnableToPatchJson, originalJson, patchJson)); + } + } + else + { + originalJsonObject[patchProperty.Key] = patchProperty.Value; + } + } + } + } +} diff --git a/src/Common/Commands.Common/Utilities/PowerShellUtilities.cs b/src/Common/Commands.Common/Utilities/PowerShellUtilities.cs new file mode 100644 index 000000000000..4d99e250b3a0 --- /dev/null +++ b/src/Common/Commands.Common/Utilities/PowerShellUtilities.cs @@ -0,0 +1,97 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Management.Automation; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common +{ + public static class PowerShellUtilities + { + public const string PSModulePathName = "PSModulePath"; + + private static void EditPSModulePath(Func, IEnumerable> job, EnvironmentVariableTarget target) + { + ChangeForTargetEnvironment(job, target); + } + + private static void ChangeForTargetEnvironment(Func, IEnumerable> job, EnvironmentVariableTarget target) + { + string psModulePath = Environment.GetEnvironmentVariable(PSModulePathName, target) ?? string.Empty; + IEnumerable paths = psModulePath.Split(';'); + paths = job(paths); + + if (!paths.Any()) + { + Environment.SetEnvironmentVariable(PSModulePathName, null, target); + } + else if (paths.Count() == 1) + { + Environment.SetEnvironmentVariable(PSModulePathName, paths.First(), target); + } + else + { + psModulePath = string.Join(";", paths.Distinct(StringComparer.CurrentCultureIgnoreCase)); + Environment.SetEnvironmentVariable(PSModulePathName, psModulePath, target); + } + } + + public static PSObject ConstructPSObject(string typeName, params object[] args) + { + Debug.Assert(args.Length % 2 == 0, "The parameter args length must be even number"); + + PSObject outputObject = new PSObject(); + + if (!string.IsNullOrEmpty(typeName)) + { + outputObject.TypeNames.Add(typeName); + } + + for (int i = 0, j = 0; i < args.Length / 2; i++, j += 2) + { + outputObject.Properties.Add(new PSNoteProperty(args[j].ToString(), args[j + 1])); + } + + return outputObject; + } + + public static void RemoveModuleFromPSModulePath(string modulePath) + { + EditPSModulePath(list => list.Where(p => !p.Equals(modulePath, StringComparison.OrdinalIgnoreCase)), EnvironmentVariableTarget.Process); + } + + public static void RemoveModuleFromPSModulePath(string modulePath, EnvironmentVariableTarget target) + { + EditPSModulePath(list => list.Where(p => !p.Equals(modulePath, StringComparison.OrdinalIgnoreCase)), target); + } + + public static void AddModuleToPSModulePath(string modulePath) + { + EditPSModulePath(list => new List(list) { modulePath }, EnvironmentVariableTarget.Process); + } + + public static void AddModuleToPSModulePath(string modulePath, EnvironmentVariableTarget target) + { + EditPSModulePath(list => new List(list) { modulePath }, target); + } + + public static IEnumerable GetUsedDynamicParameters(RuntimeDefinedParameterDictionary dynamicParameters, InvocationInfo MyInvocation) + { + return dynamicParameters.Values.Where(dp => MyInvocation.BoundParameters.Keys.Any(bp => bp.Equals(dp.Name))); + } + } +} diff --git a/src/Common/Commands.Common/Utilities/XmlUtilities.cs b/src/Common/Commands.Common/Utilities/XmlUtilities.cs new file mode 100644 index 000000000000..9d2af2753947 --- /dev/null +++ b/src/Common/Commands.Common/Utilities/XmlUtilities.cs @@ -0,0 +1,129 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Text; +using System.Xml; +using System.Xml.Linq; +using System.Xml.Serialization; +using Microsoft.WindowsAzure.Commands.Common.Properties; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common +{ + public static class XmlUtilities + { + public static T DeserializeXmlFile(string fileName, string exceptionMessage = null) + { + // TODO: fix and uncomment. second parameter is wrong + // Validate.ValidateFileFull(fileName, string.Format(Resources.PathDoesNotExistForElement, string.Empty, fileName)); + + T item = default(T); + + XmlSerializer xmlSerializer = new XmlSerializer(typeof(T)); + using (TextReader reader = new StreamReader(FileUtilities.DataStore.ReadFileAsStream(fileName))) + { + try { item = (T)xmlSerializer.Deserialize(reader); } + catch + { + if (!String.IsNullOrEmpty(exceptionMessage)) + { + throw new InvalidOperationException(exceptionMessage); + } + else + { + throw; + } + } + } + + return item; + } + + public static void SerializeXmlFile(T obj, string fileName) + { + Validate.ValidatePathName(fileName, String.Format(Resources.PathDoesNotExistForElement, String.Empty, fileName)); + Validate.ValidateStringIsNullOrEmpty(fileName, String.Empty); + + XmlSerializer xmlSerializer = new XmlSerializer(typeof(T)); + StringBuilder sBuilder = new StringBuilder(); + using (StringWriter writer = new StringWriter(sBuilder)) + { + xmlSerializer.Serialize(writer, obj); + } + FileUtilities.DataStore.WriteFile(fileName, sBuilder.ToString(), Encoding.Unicode); + } + + public static string SerializeXmlString(T obj) + { + XmlSerializer xmlSerializer = new XmlSerializer(typeof(T)); + StringBuilder sBuilder = new StringBuilder(); + + using (StringWriter writer = new StringWriter(sBuilder)) + { + xmlSerializer.Serialize(writer, obj); + } + + return sBuilder.ToString(); + } + + /// + /// Formats the given XML into indented way. + /// + /// The input xml string + /// The formatted xml string + public static string TryFormatXml(string content) + { + try + { + XDocument doc = XDocument.Parse(content); + return doc.ToString(); + } + catch (Exception) + { + return content; + } + } + + /// + /// Formats given string into well formatted XML. + /// + /// The unformatted xml string + /// The formatted XML string + public static string Beautify(string unformattedXml) + { + string formattedXml = String.Empty; + if (!String.IsNullOrEmpty(unformattedXml)) + { + XmlDocument doc = new XmlDocument(); + doc.LoadXml(unformattedXml); + StringBuilder stringBuilder = new StringBuilder(); + XmlWriterSettings settings = new XmlWriterSettings() + { + Indent = true, + IndentChars = "\t", + NewLineChars = Environment.NewLine, + NewLineHandling = NewLineHandling.Replace + }; + using (XmlWriter writer = XmlWriter.Create(stringBuilder, settings)) + { + doc.Save(writer); + } + formattedXml = stringBuilder.ToString(); + } + + return formattedXml; + } + } +} diff --git a/src/Common/Commands.Common/XmlSchema/PublishProfile.cs b/src/Common/Commands.Common/XmlSchema/PublishProfile.cs new file mode 100644 index 000000000000..4eb2764bf1a0 --- /dev/null +++ b/src/Common/Commands.Common/XmlSchema/PublishProfile.cs @@ -0,0 +1,219 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.17020 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System.Xml.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema +{ + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [XmlType(AnonymousType = true)] + [XmlRoot(Namespace = "", IsNullable = false)] + public partial class PublishData + { + + private PublishDataPublishProfile[] itemsField; + + /// + [XmlElement("PublishProfile", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public PublishDataPublishProfile[] Items + { + get + { + return this.itemsField; + } + set + { + this.itemsField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [XmlType(AnonymousType = true)] + public partial class PublishDataPublishProfile + { + + private PublishDataPublishProfileSubscription[] subscriptionField; + + private string publishMethodField; + + private string urlField; + + private string managementCertificateField; + + private string SchemaVersionField; + + /// + [XmlElement("Subscription", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public PublishDataPublishProfileSubscription[] Subscription + { + get + { + return this.subscriptionField; + } + set + { + this.subscriptionField = value; + } + } + + /// + [XmlAttribute()] + public string PublishMethod + { + get + { + return this.publishMethodField; + } + set + { + this.publishMethodField = value; + } + } + + /// + [XmlAttribute()] + public string Url + { + get + { + return this.urlField; + } + set + { + this.urlField = value; + } + } + + /// + [XmlAttribute()] + public string ManagementCertificate + { + get + { + return this.managementCertificateField; + } + set + { + this.managementCertificateField = value; + } + } + + /// + [XmlAttribute()] + public string SchemaVersion + { + get + { + return this.SchemaVersionField; + } + set + { + this.SchemaVersionField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [XmlType(AnonymousType = true)] + public partial class PublishDataPublishProfileSubscription + { + + private string idField; + + private string nameField; + + private string serviceManagementUrlField; + + private string managementCertificateField; + + /// + [XmlAttribute()] + public string Id + { + get + { + return this.idField; + } + set + { + this.idField = value; + } + } + + /// + [XmlAttribute()] + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameField = value; + } + } + + /// + [XmlAttribute()] + public string ServiceManagementUrl + { + get + { + return this.serviceManagementUrlField; + } + set + { + this.serviceManagementUrlField = value; + } + } + + /// + [XmlAttribute()] + public string ManagementCertificate + { + get + { + return this.managementCertificateField; + } + set + { + this.managementCertificateField = value; + } + } + } +} \ No newline at end of file diff --git a/src/Common/Commands.Common/XmlSchema/ServiceConfigurationSchema.cs b/src/Common/Commands.Common/XmlSchema/ServiceConfigurationSchema.cs new file mode 100644 index 000000000000..b7dbffe076b9 --- /dev/null +++ b/src/Common/Commands.Common/XmlSchema/ServiceConfigurationSchema.cs @@ -0,0 +1,1314 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// This source code was auto-generated by xsd, Version=4.0.30319.34014 using command: +// xsd.exe "C:\Program Files\Microsoft SDKs\Azure\.NET SDK\v2.5\schemas\ServiceConfigurationSchema.xsd" +// /c /namespace:Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema +// /language:cs +namespace Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema +{ + using System.Xml.Serialization; + + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration")] + [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration", IsNullable = false)] + public partial class ServiceConfiguration + { + + private RoleSettings[] roleField; + + private NetworkConfigurationElement networkConfigurationField; + + private GuestAgentSettingsElement guestAgentSettingsField; + + private string serviceNameField; + + private string osFamilyField; + + private string osVersionField; + + private SchemaVersion schemaVersionField; + + public ServiceConfiguration() + { + this.schemaVersionField = SchemaVersion.unspecified; + } + + /// + [System.Xml.Serialization.XmlElementAttribute("Role")] + public RoleSettings[] Role + { + get + { + return this.roleField; + } + set + { + this.roleField = value; + } + } + + /// + public NetworkConfigurationElement NetworkConfiguration + { + get + { + return this.networkConfigurationField; + } + set + { + this.networkConfigurationField = value; + } + } + + /// + public GuestAgentSettingsElement GuestAgentSettings + { + get + { + return this.guestAgentSettingsField; + } + set + { + this.guestAgentSettingsField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string serviceName + { + get + { + return this.serviceNameField; + } + set + { + this.serviceNameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string osFamily + { + get + { + return this.osFamilyField; + } + set + { + this.osFamilyField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string osVersion + { + get + { + return this.osVersionField; + } + set + { + this.osVersionField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + [System.ComponentModel.DefaultValueAttribute(SchemaVersion.unspecified)] + public SchemaVersion schemaVersion + { + get + { + return this.schemaVersionField; + } + set + { + this.schemaVersionField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration")] + public partial class RoleSettings + { + + private OsImageSetting osImageField; + + private ConfigurationSetting[] configurationSettingsField; + + private TargetSetting instancesField; + + private Certificate[] certificatesField; + + private string nameField; + + private string vmNameField; + + /// + public OsImageSetting OsImage + { + get + { + return this.osImageField; + } + set + { + this.osImageField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Setting", IsNullable = false)] + public ConfigurationSetting[] ConfigurationSettings + { + get + { + return this.configurationSettingsField; + } + set + { + this.configurationSettingsField = value; + } + } + + /// + public TargetSetting Instances + { + get + { + return this.instancesField; + } + set + { + this.instancesField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute(IsNullable = false)] + public Certificate[] Certificates + { + get + { + return this.certificatesField; + } + set + { + this.certificatesField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string name + { + get + { + return this.nameField; + } + set + { + this.nameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string vmName + { + get + { + return this.vmNameField; + } + set + { + this.vmNameField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration")] + public partial class OsImageSetting + { + + private string hrefField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute(DataType = "anyURI")] + public string href + { + get + { + return this.hrefField; + } + set + { + this.hrefField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration")] + public partial class GuestAgentSettingsElement + { + + private bool cleanupFirewallOnRoleRestartField; + + private bool allowRoleProcessLocalDumpsField; + + public GuestAgentSettingsElement() + { + this.cleanupFirewallOnRoleRestartField = true; + this.allowRoleProcessLocalDumpsField = false; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + [System.ComponentModel.DefaultValueAttribute(true)] + public bool cleanupFirewallOnRoleRestart + { + get + { + return this.cleanupFirewallOnRoleRestartField; + } + set + { + this.cleanupFirewallOnRoleRestartField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + [System.ComponentModel.DefaultValueAttribute(false)] + public bool allowRoleProcessLocalDumps + { + get + { + return this.allowRoleProcessLocalDumpsField; + } + set + { + this.allowRoleProcessLocalDumpsField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration")] + public partial class NetworkSecurityGroupElement + { + + private string nameField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string name + { + get + { + return this.nameField; + } + set + { + this.nameField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration")] + public partial class NetworkSecurityGroupRefElement + { + + private NetworkSecurityGroupElement networkSecurityGroupField; + + private string roleNameField; + + /// + public NetworkSecurityGroupElement NetworkSecurityGroup + { + get + { + return this.networkSecurityGroupField; + } + set + { + this.networkSecurityGroupField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string roleName + { + get + { + return this.roleNameField; + } + set + { + this.roleNameField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration")] + public partial class FrontendIPConfigurationElement + { + + private IPConfigurationAddressType typeField; + + private string subnetField; + + private string staticVirtualNetworkIPAddressField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public IPConfigurationAddressType type + { + get + { + return this.typeField; + } + set + { + this.typeField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string subnet + { + get + { + return this.subnetField; + } + set + { + this.subnetField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string staticVirtualNetworkIPAddress + { + get + { + return this.staticVirtualNetworkIPAddressField; + } + set + { + this.staticVirtualNetworkIPAddressField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration")] + public enum IPConfigurationAddressType + { + + /// + @private, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration")] + public partial class LoadBalancerElement + { + + private FrontendIPConfigurationElement frontendIPConfigurationField; + + private string nameField; + + /// + public FrontendIPConfigurationElement FrontendIPConfiguration + { + get + { + return this.frontendIPConfigurationField; + } + set + { + this.frontendIPConfigurationField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string name + { + get + { + return this.nameField; + } + set + { + this.nameField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration")] + public partial class RuleElement + { + + private ushort orderField; + + private RuleAction actionField; + + private string remoteSubnetField; + + private string descriptionField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public ushort order + { + get + { + return this.orderField; + } + set + { + this.orderField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public RuleAction action + { + get + { + return this.actionField; + } + set + { + this.actionField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string remoteSubnet + { + get + { + return this.remoteSubnetField; + } + set + { + this.remoteSubnetField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string description + { + get + { + return this.descriptionField; + } + set + { + this.descriptionField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration")] + public enum RuleAction + { + + /// + permit, + + /// + deny, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration")] + public partial class AccessControlElement + { + + private RuleElement[] ruleField; + + private string nameField; + + /// + [System.Xml.Serialization.XmlElementAttribute("Rule")] + public RuleElement[] Rule + { + get + { + return this.ruleField; + } + set + { + this.ruleField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string name + { + get + { + return this.nameField; + } + set + { + this.nameField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration")] + public partial class ReservedIPElement + { + + private string nameField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string name + { + get + { + return this.nameField; + } + set + { + this.nameField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration")] + public partial class PublicIPElement + { + + private string nameField; + + private int idleTimeoutInMinutesField; + + private bool idleTimeoutInMinutesFieldSpecified; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string name + { + get + { + return this.nameField; + } + set + { + this.nameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public int idleTimeoutInMinutes + { + get + { + return this.idleTimeoutInMinutesField; + } + set + { + this.idleTimeoutInMinutesField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool idleTimeoutInMinutesSpecified + { + get + { + return this.idleTimeoutInMinutesFieldSpecified; + } + set + { + this.idleTimeoutInMinutesFieldSpecified = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration")] + public partial class PublicIPsElement + { + + private PublicIPElement publicIPField; + + /// + public PublicIPElement PublicIP + { + get + { + return this.publicIPField; + } + set + { + this.publicIPField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration")] + public partial class SubnetElement + { + + private string nameField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string name + { + get + { + return this.nameField; + } + set + { + this.nameField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration")] + public partial class InstanceAddressElement + { + + private SubnetElement[] subnetsField; + + private PublicIPsElement publicIPsField; + + private string roleNameField; + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Subnet", IsNullable = false)] + public SubnetElement[] Subnets + { + get + { + return this.subnetsField; + } + set + { + this.subnetsField = value; + } + } + + /// + public PublicIPsElement PublicIPs + { + get + { + return this.publicIPsField; + } + set + { + this.publicIPsField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string roleName + { + get + { + return this.roleNameField; + } + set + { + this.roleNameField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration")] + public partial class AddressAssignmentsElement + { + + private InstanceAddressElement[] instanceAddressField; + + private AddressAssignmentsElementReservedIPs reservedIPsField; + + /// + [System.Xml.Serialization.XmlElementAttribute("InstanceAddress")] + public InstanceAddressElement[] InstanceAddress + { + get + { + return this.instanceAddressField; + } + set + { + this.instanceAddressField = value; + } + } + + /// + public AddressAssignmentsElementReservedIPs ReservedIPs + { + get + { + return this.reservedIPsField; + } + set + { + this.reservedIPsField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration")] + public partial class AddressAssignmentsElementReservedIPs + { + + private ReservedIPElement reservedIPField; + + /// + public ReservedIPElement ReservedIP + { + get + { + return this.reservedIPField; + } + set + { + this.reservedIPField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration")] + public partial class VirtualNetworkSiteElement + { + + private string nameField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string name + { + get + { + return this.nameField; + } + set + { + this.nameField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration")] + public partial class DnsServerElement + { + + private string nameField; + + private string iPAddressField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string name + { + get + { + return this.nameField; + } + set + { + this.nameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string IPAddress + { + get + { + return this.iPAddressField; + } + set + { + this.iPAddressField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration")] + public partial class DnsElement + { + + private DnsServerElement[] dnsServersField; + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("DnsServer", IsNullable = false)] + public DnsServerElement[] DnsServers + { + get + { + return this.dnsServersField; + } + set + { + this.dnsServersField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration")] + public partial class NetworkConfigurationElement + { + + private DnsElement dnsField; + + private VirtualNetworkSiteElement virtualNetworkSiteField; + + private AddressAssignmentsElement addressAssignmentsField; + + private AccessControlElement[] accessControlsField; + + private EndpointAclsElementEndpointAcl[] endpointAclsField; + + private LoadBalancerElement[] loadBalancersField; + + private NetworkSecurityGroupRefElement[] networkSecurityGroupRefsField; + + /// + public DnsElement Dns + { + get + { + return this.dnsField; + } + set + { + this.dnsField = value; + } + } + + /// + public VirtualNetworkSiteElement VirtualNetworkSite + { + get + { + return this.virtualNetworkSiteField; + } + set + { + this.virtualNetworkSiteField = value; + } + } + + /// + public AddressAssignmentsElement AddressAssignments + { + get + { + return this.addressAssignmentsField; + } + set + { + this.addressAssignmentsField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("AccessControl", IsNullable = false)] + public AccessControlElement[] AccessControls + { + get + { + return this.accessControlsField; + } + set + { + this.accessControlsField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("EndpointAcl", IsNullable = false)] + public EndpointAclsElementEndpointAcl[] EndpointAcls + { + get + { + return this.endpointAclsField; + } + set + { + this.endpointAclsField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("LoadBalancer", IsNullable = false)] + public LoadBalancerElement[] LoadBalancers + { + get + { + return this.loadBalancersField; + } + set + { + this.loadBalancersField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("NetworkSecurityGroupRef", IsNullable = false)] + public NetworkSecurityGroupRefElement[] NetworkSecurityGroupRefs + { + get + { + return this.networkSecurityGroupRefsField; + } + set + { + this.networkSecurityGroupRefsField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration")] + public partial class EndpointAclsElementEndpointAcl + { + + private string roleField; + + private string endPointField; + + private string accessControlField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string role + { + get + { + return this.roleField; + } + set + { + this.roleField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string endPoint + { + get + { + return this.endPointField; + } + set + { + this.endPointField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string accessControl + { + get + { + return this.accessControlField; + } + set + { + this.accessControlField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration")] + public partial class Certificate + { + + private string nameField; + + private string thumbprintField; + + private ThumbprintAlgorithmTypes thumbprintAlgorithmField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string name + { + get + { + return this.nameField; + } + set + { + this.nameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string thumbprint + { + get + { + return this.thumbprintField; + } + set + { + this.thumbprintField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public ThumbprintAlgorithmTypes thumbprintAlgorithm + { + get + { + return this.thumbprintAlgorithmField; + } + set + { + this.thumbprintAlgorithmField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration")] + public enum ThumbprintAlgorithmTypes + { + + /// + sha1, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration")] + public partial class TargetSetting + { + + private int countField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public int count + { + get + { + return this.countField; + } + set + { + this.countField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration")] + public partial class ConfigurationSetting + { + + private string nameField; + + private string valueField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string name + { + get + { + return this.nameField; + } + set + { + this.nameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string value + { + get + { + return this.valueField; + } + set + { + this.valueField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration")] + public enum SchemaVersion + { + + /// + [System.Xml.Serialization.XmlEnumAttribute("2014-06.2.4")] + Item20140624, + + /// + unspecified, + } +} diff --git a/src/Common/Commands.Common/XmlSchema/ServiceDefinitionSchema.cs b/src/Common/Commands.Common/XmlSchema/ServiceDefinitionSchema.cs new file mode 100644 index 000000000000..522b146a9758 --- /dev/null +++ b/src/Common/Commands.Common/XmlSchema/ServiceDefinitionSchema.cs @@ -0,0 +1,2824 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// This source code was auto-generated by xsd, Version=4.0.30319.34014 using command: +// xsd.exe "C:\Program Files\Microsoft SDKs\Azure\.NET SDK\v2.5\schemas\ServiceDefinitionSchema.xsd" +// /c /namespace:Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema +// /language:cs +namespace Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema +{ + using System.Xml.Serialization; + + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition", IsNullable = false)] + public partial class RoleModule + { + + private Startup startupField; + + private RuntimeForRoleModule runtimeField; + + private ConfigurationSetting[] configurationSettingsField; + + private Endpoints endpointsField; + + private LocalResources localResourcesField; + + private Certificate[] certificatesField; + + private Sites sitesField; + + private string namespaceField; + + /// + public Startup Startup + { + get + { + return this.startupField; + } + set + { + this.startupField = value; + } + } + + /// + public RuntimeForRoleModule Runtime + { + get + { + return this.runtimeField; + } + set + { + this.runtimeField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Setting", IsNullable = false)] + public ConfigurationSetting[] ConfigurationSettings + { + get + { + return this.configurationSettingsField; + } + set + { + this.configurationSettingsField = value; + } + } + + /// + public Endpoints Endpoints + { + get + { + return this.endpointsField; + } + set + { + this.endpointsField = value; + } + } + + /// + public LocalResources LocalResources + { + get + { + return this.localResourcesField; + } + set + { + this.localResourcesField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute(IsNullable = false)] + public Certificate[] Certificates + { + get + { + return this.certificatesField; + } + set + { + this.certificatesField = value; + } + } + + /// + public Sites Sites + { + get + { + return this.sitesField; + } + set + { + this.sitesField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string @namespace + { + get + { + return this.namespaceField; + } + set + { + this.namespaceField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class Startup + { + + private Task[] taskField; + + private int priorityField; + + public Startup() + { + this.priorityField = 0; + } + + /// + [System.Xml.Serialization.XmlElementAttribute("Task")] + public Task[] Task + { + get + { + return this.taskField; + } + set + { + this.taskField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + [System.ComponentModel.DefaultValueAttribute(0)] + public int priority + { + get + { + return this.priorityField; + } + set + { + this.priorityField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class Task + { + + private Variable[] environmentField; + + private string commandLineField; + + private ExecutionContext executionContextField; + + private TaskType taskTypeField; + + public Task() + { + this.executionContextField = ExecutionContext.limited; + this.taskTypeField = TaskType.simple; + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute(IsNullable = false)] + public Variable[] Environment + { + get + { + return this.environmentField; + } + set + { + this.environmentField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string commandLine + { + get + { + return this.commandLineField; + } + set + { + this.commandLineField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + [System.ComponentModel.DefaultValueAttribute(ExecutionContext.limited)] + public ExecutionContext executionContext + { + get + { + return this.executionContextField; + } + set + { + this.executionContextField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + [System.ComponentModel.DefaultValueAttribute(TaskType.simple)] + public TaskType taskType + { + get + { + return this.taskTypeField; + } + set + { + this.taskTypeField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class Variable + { + + private RoleInstanceValueElement roleInstanceValueField; + + private string nameField; + + private string valueField; + + /// + public RoleInstanceValueElement RoleInstanceValue + { + get + { + return this.roleInstanceValueField; + } + set + { + this.roleInstanceValueField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string name + { + get + { + return this.nameField; + } + set + { + this.nameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string value + { + get + { + return this.valueField; + } + set + { + this.valueField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class RoleInstanceValueElement + { + + private string xpathField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string xpath + { + get + { + return this.xpathField; + } + set + { + this.xpathField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class FromRole + { + + private string roleNameField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string roleName + { + get + { + return this.roleNameField; + } + set + { + this.roleNameField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class WhenSource + { + + private FromRole[] fromRoleField; + + private MatchMode matchesField; + + /// + [System.Xml.Serialization.XmlElementAttribute("FromRole")] + public FromRole[] FromRole + { + get + { + return this.fromRoleField; + } + set + { + this.fromRoleField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public MatchMode matches + { + get + { + return this.matchesField; + } + set + { + this.matchesField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public enum MatchMode + { + + /// + AnyRule, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class AllowAllTraffic + { + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class RoleEndpoint + { + + private string roleNameField; + + private string endpointNameField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string roleName + { + get + { + return this.roleNameField; + } + set + { + this.roleNameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string endpointName + { + get + { + return this.endpointNameField; + } + set + { + this.endpointNameField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class Destinations + { + + private RoleEndpoint[] roleEndpointField; + + /// + [System.Xml.Serialization.XmlElementAttribute("RoleEndpoint")] + public RoleEndpoint[] RoleEndpoint + { + get + { + return this.roleEndpointField; + } + set + { + this.roleEndpointField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class OnlyAllowTrafficTo + { + + private Destinations destinationsField; + + private object itemField; + + /// + public Destinations Destinations + { + get + { + return this.destinationsField; + } + set + { + this.destinationsField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("AllowAllTraffic", typeof(AllowAllTraffic))] + [System.Xml.Serialization.XmlElementAttribute("WhenSource", typeof(WhenSource))] + public object Item + { + get + { + return this.itemField; + } + set + { + this.itemField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class WorkerRole + { + + private Import[] importsField; + + private Startup startupField; + + private LocalStore localStorageField; + + private LocalResources localResourcesField; + + private ConfigurationSetting[] configurationSettingsField; + + private Endpoints endpointsField; + + private Certificate[] certificatesField; + + private WorkerRuntime runtimeField; + + private ContentElement[] contentsField; + + private string nameField; + + private bool enableNativeCodeExecutionField; + + private string vmsizeField; + + public WorkerRole() + { + this.enableNativeCodeExecutionField = true; + this.vmsizeField = "Small"; + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute(IsNullable = false)] + public Import[] Imports + { + get + { + return this.importsField; + } + set + { + this.importsField = value; + } + } + + /// + public Startup Startup + { + get + { + return this.startupField; + } + set + { + this.startupField = value; + } + } + + /// + public LocalStore LocalStorage + { + get + { + return this.localStorageField; + } + set + { + this.localStorageField = value; + } + } + + /// + public LocalResources LocalResources + { + get + { + return this.localResourcesField; + } + set + { + this.localResourcesField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Setting", IsNullable = false)] + public ConfigurationSetting[] ConfigurationSettings + { + get + { + return this.configurationSettingsField; + } + set + { + this.configurationSettingsField = value; + } + } + + /// + public Endpoints Endpoints + { + get + { + return this.endpointsField; + } + set + { + this.endpointsField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute(IsNullable = false)] + public Certificate[] Certificates + { + get + { + return this.certificatesField; + } + set + { + this.certificatesField = value; + } + } + + /// + public WorkerRuntime Runtime + { + get + { + return this.runtimeField; + } + set + { + this.runtimeField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Content", IsNullable = false)] + public ContentElement[] Contents + { + get + { + return this.contentsField; + } + set + { + this.contentsField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string name + { + get + { + return this.nameField; + } + set + { + this.nameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + [System.ComponentModel.DefaultValueAttribute(true)] + public bool enableNativeCodeExecution + { + get + { + return this.enableNativeCodeExecutionField; + } + set + { + this.enableNativeCodeExecutionField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + [System.ComponentModel.DefaultValueAttribute("Small")] + public string vmsize + { + get + { + return this.vmsizeField; + } + set + { + this.vmsizeField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class Import + { + + private string moduleNameField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string moduleName + { + get + { + return this.moduleNameField; + } + set + { + this.moduleNameField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class LocalStore + { + + private string nameField; + + private int sizeInMBField; + + private bool cleanOnRoleRecycleField; + + public LocalStore() + { + this.sizeInMBField = 1000; + this.cleanOnRoleRecycleField = true; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string name + { + get + { + return this.nameField; + } + set + { + this.nameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + [System.ComponentModel.DefaultValueAttribute(1000)] + public int sizeInMB + { + get + { + return this.sizeInMBField; + } + set + { + this.sizeInMBField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + [System.ComponentModel.DefaultValueAttribute(true)] + public bool cleanOnRoleRecycle + { + get + { + return this.cleanOnRoleRecycleField; + } + set + { + this.cleanOnRoleRecycleField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class LocalResources + { + + private LocalStore[] localStorageField; + + /// + [System.Xml.Serialization.XmlElementAttribute("LocalStorage")] + public LocalStore[] LocalStorage + { + get + { + return this.localStorageField; + } + set + { + this.localStorageField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class ConfigurationSetting + { + + private string nameField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string name + { + get + { + return this.nameField; + } + set + { + this.nameField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class Endpoints + { + + private InputEndpoint[] inputEndpointField; + + private InternalEndpoint[] internalEndpointField; + + private InstanceInputEndpointElement[] instanceInputEndpointField; + + /// + [System.Xml.Serialization.XmlElementAttribute("InputEndpoint")] + public InputEndpoint[] InputEndpoint + { + get + { + return this.inputEndpointField; + } + set + { + this.inputEndpointField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("InternalEndpoint")] + public InternalEndpoint[] InternalEndpoint + { + get + { + return this.internalEndpointField; + } + set + { + this.internalEndpointField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("InstanceInputEndpoint")] + public InstanceInputEndpointElement[] InstanceInputEndpoint + { + get + { + return this.instanceInputEndpointField; + } + set + { + this.instanceInputEndpointField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class InputEndpoint + { + + private string nameField; + + private Protocol protocolField; + + private int portField; + + private string certificateField; + + private string localPortField; + + private bool ignoreRoleInstanceStatusField; + + private string loadBalancerProbeField; + + private string loadBalancerField; + + private int idleTimeoutInMinutesField; + + private bool idleTimeoutInMinutesFieldSpecified; + + private DistributionType loadBalancerDistributionField; + + private bool loadBalancerDistributionFieldSpecified; + + public InputEndpoint() + { + this.ignoreRoleInstanceStatusField = false; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string name + { + get + { + return this.nameField; + } + set + { + this.nameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public Protocol protocol + { + get + { + return this.protocolField; + } + set + { + this.protocolField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public int port + { + get + { + return this.portField; + } + set + { + this.portField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string certificate + { + get + { + return this.certificateField; + } + set + { + this.certificateField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string localPort + { + get + { + return this.localPortField; + } + set + { + this.localPortField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + [System.ComponentModel.DefaultValueAttribute(false)] + public bool ignoreRoleInstanceStatus + { + get + { + return this.ignoreRoleInstanceStatusField; + } + set + { + this.ignoreRoleInstanceStatusField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string loadBalancerProbe + { + get + { + return this.loadBalancerProbeField; + } + set + { + this.loadBalancerProbeField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string loadBalancer + { + get + { + return this.loadBalancerField; + } + set + { + this.loadBalancerField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public int idleTimeoutInMinutes + { + get + { + return this.idleTimeoutInMinutesField; + } + set + { + this.idleTimeoutInMinutesField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool idleTimeoutInMinutesSpecified + { + get + { + return this.idleTimeoutInMinutesFieldSpecified; + } + set + { + this.idleTimeoutInMinutesFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public DistributionType loadBalancerDistribution + { + get + { + return this.loadBalancerDistributionField; + } + set + { + this.loadBalancerDistributionField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool loadBalancerDistributionSpecified + { + get + { + return this.loadBalancerDistributionFieldSpecified; + } + set + { + this.loadBalancerDistributionFieldSpecified = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public enum Protocol + { + + /// + http, + + /// + https, + + /// + tcp, + + /// + udp, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public enum DistributionType + { + + /// + sourceIP, + + /// + sourceIPProtocol, + + /// + none, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class InternalEndpoint + { + + private Port[] fixedPortField; + + private PortRange[] fixedPortRangeField; + + private string nameField; + + private string portField; + + private InternalProtocol protocolField; + + /// + [System.Xml.Serialization.XmlElementAttribute("FixedPort")] + public Port[] FixedPort + { + get + { + return this.fixedPortField; + } + set + { + this.fixedPortField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("FixedPortRange")] + public PortRange[] FixedPortRange + { + get + { + return this.fixedPortRangeField; + } + set + { + this.fixedPortRangeField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string name + { + get + { + return this.nameField; + } + set + { + this.nameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string port + { + get + { + return this.portField; + } + set + { + this.portField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public InternalProtocol protocol + { + get + { + return this.protocolField; + } + set + { + this.protocolField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class Port + { + + private int portField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public int port + { + get + { + return this.portField; + } + set + { + this.portField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class PortRange + { + + private int minField; + + private int maxField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public int min + { + get + { + return this.minField; + } + set + { + this.minField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public int max + { + get + { + return this.maxField; + } + set + { + this.maxField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public enum InternalProtocol + { + + /// + http, + + /// + tcp, + + /// + udp, + + /// + any, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class InstanceInputEndpointElement + { + + private AllocatePublicPortFromElement allocatePublicPortFromField; + + private string nameField; + + private int localPortField; + + private TransportProtocol protocolField; + + private int idleTimeoutInMinutesField; + + private bool idleTimeoutInMinutesFieldSpecified; + + /// + public AllocatePublicPortFromElement AllocatePublicPortFrom + { + get + { + return this.allocatePublicPortFromField; + } + set + { + this.allocatePublicPortFromField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string name + { + get + { + return this.nameField; + } + set + { + this.nameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public int localPort + { + get + { + return this.localPortField; + } + set + { + this.localPortField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public TransportProtocol protocol + { + get + { + return this.protocolField; + } + set + { + this.protocolField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public int idleTimeoutInMinutes + { + get + { + return this.idleTimeoutInMinutesField; + } + set + { + this.idleTimeoutInMinutesField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool idleTimeoutInMinutesSpecified + { + get + { + return this.idleTimeoutInMinutesFieldSpecified; + } + set + { + this.idleTimeoutInMinutesFieldSpecified = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class AllocatePublicPortFromElement + { + + private PortRange fixedPortRangeField; + + /// + public PortRange FixedPortRange + { + get + { + return this.fixedPortRangeField; + } + set + { + this.fixedPortRangeField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public enum TransportProtocol + { + + /// + udp, + + /// + tcp, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class Certificate + { + + private string nameField; + + private StoreLocation storeLocationField; + + private string storeNameField; + + private PermissionLevel permissionLevelField; + + public Certificate() + { + this.permissionLevelField = PermissionLevel.limitedOrElevated; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string name + { + get + { + return this.nameField; + } + set + { + this.nameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public StoreLocation storeLocation + { + get + { + return this.storeLocationField; + } + set + { + this.storeLocationField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string storeName + { + get + { + return this.storeNameField; + } + set + { + this.storeNameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + [System.ComponentModel.DefaultValueAttribute(PermissionLevel.limitedOrElevated)] + public PermissionLevel permissionLevel + { + get + { + return this.permissionLevelField; + } + set + { + this.permissionLevelField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public enum StoreLocation + { + + /// + CurrentUser, + + /// + LocalMachine, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public enum PermissionLevel + { + + /// + limitedOrElevated, + + /// + elevated, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class WorkerRuntime : Runtime + { + + private WorkerEntryPointElement entryPointField; + + /// + public WorkerEntryPointElement EntryPoint + { + get + { + return this.entryPointField; + } + set + { + this.entryPointField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class WorkerEntryPointElement + { + + private object itemField; + + /// + [System.Xml.Serialization.XmlElementAttribute("NetFxEntryPoint", typeof(NetFxAssemblyEntryPointElement))] + [System.Xml.Serialization.XmlElementAttribute("ProgramEntryPoint", typeof(ProgramEntryPointElement))] + public object Item + { + get + { + return this.itemField; + } + set + { + this.itemField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class NetFxAssemblyEntryPointElement + { + + private string assemblyNameField; + + private string targetFrameworkVersionField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string assemblyName + { + get + { + return this.assemblyNameField; + } + set + { + this.assemblyNameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string targetFrameworkVersion + { + get + { + return this.targetFrameworkVersionField; + } + set + { + this.targetFrameworkVersionField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class ProgramEntryPointElement + { + + private string commandLineField; + + private bool setReadyOnProcessStartField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string commandLine + { + get + { + return this.commandLineField; + } + set + { + this.commandLineField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public bool setReadyOnProcessStart + { + get + { + return this.setReadyOnProcessStartField; + } + set + { + this.setReadyOnProcessStartField = value; + } + } + } + + /// + [System.Xml.Serialization.XmlIncludeAttribute(typeof(RuntimeForRoleModule))] + [System.Xml.Serialization.XmlIncludeAttribute(typeof(WebRuntime))] + [System.Xml.Serialization.XmlIncludeAttribute(typeof(WorkerRuntime))] + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class Runtime + { + + private Variable[] environmentField; + + private ExecutionContext executionContextField; + + public Runtime() + { + this.executionContextField = ExecutionContext.limited; + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute(IsNullable = false)] + public Variable[] Environment + { + get + { + return this.environmentField; + } + set + { + this.environmentField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + [System.ComponentModel.DefaultValueAttribute(ExecutionContext.limited)] + public ExecutionContext executionContext + { + get + { + return this.executionContextField; + } + set + { + this.executionContextField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public enum ExecutionContext + { + + /// + limited, + + /// + elevated, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class RuntimeForRoleModule : Runtime + { + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class WebRuntime : Runtime + { + + private EntryPointElement entryPointField; + + /// + public EntryPointElement EntryPoint + { + get + { + return this.entryPointField; + } + set + { + this.entryPointField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class EntryPointElement + { + + private NetFxAssemblyEntryPointElement itemField; + + /// + [System.Xml.Serialization.XmlElementAttribute("NetFxEntryPoint")] + public NetFxAssemblyEntryPointElement Item + { + get + { + return this.itemField; + } + set + { + this.itemField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class ContentElement + { + + private SourceDirectoryElement sourceDirectoryField; + + private string destinationField; + + /// + public SourceDirectoryElement SourceDirectory + { + get + { + return this.sourceDirectoryField; + } + set + { + this.sourceDirectoryField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string destination + { + get + { + return this.destinationField; + } + set + { + this.destinationField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class SourceDirectoryElement + { + + private string pathField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string path + { + get + { + return this.pathField; + } + set + { + this.pathField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class WebRole + { + + private Import[] importsField; + + private Startup startupField; + + private LocalStore localStorageField; + + private LocalResources localResourcesField; + + private ConfigurationSetting[] configurationSettingsField; + + private WebRoleInputEndpoints inputEndpointsField; + + private WebRoleInternalEndpoint internalEndpointField; + + private Endpoints endpointsField; + + private Certificate[] certificatesField; + + private Sites sitesField; + + private WebRuntime runtimeField; + + private ContentElement[] contentsField; + + private string nameField; + + private bool enableNativeCodeExecutionField; + + private string vmsizeField; + + public WebRole() + { + this.enableNativeCodeExecutionField = true; + this.vmsizeField = "Small"; + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute(IsNullable = false)] + public Import[] Imports + { + get + { + return this.importsField; + } + set + { + this.importsField = value; + } + } + + /// + public Startup Startup + { + get + { + return this.startupField; + } + set + { + this.startupField = value; + } + } + + /// + public LocalStore LocalStorage + { + get + { + return this.localStorageField; + } + set + { + this.localStorageField = value; + } + } + + /// + public LocalResources LocalResources + { + get + { + return this.localResourcesField; + } + set + { + this.localResourcesField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Setting", IsNullable = false)] + public ConfigurationSetting[] ConfigurationSettings + { + get + { + return this.configurationSettingsField; + } + set + { + this.configurationSettingsField = value; + } + } + + /// + public WebRoleInputEndpoints InputEndpoints + { + get + { + return this.inputEndpointsField; + } + set + { + this.inputEndpointsField = value; + } + } + + /// + public WebRoleInternalEndpoint InternalEndpoint + { + get + { + return this.internalEndpointField; + } + set + { + this.internalEndpointField = value; + } + } + + /// + public Endpoints Endpoints + { + get + { + return this.endpointsField; + } + set + { + this.endpointsField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute(IsNullable = false)] + public Certificate[] Certificates + { + get + { + return this.certificatesField; + } + set + { + this.certificatesField = value; + } + } + + /// + public Sites Sites + { + get + { + return this.sitesField; + } + set + { + this.sitesField = value; + } + } + + /// + public WebRuntime Runtime + { + get + { + return this.runtimeField; + } + set + { + this.runtimeField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Content", IsNullable = false)] + public ContentElement[] Contents + { + get + { + return this.contentsField; + } + set + { + this.contentsField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string name + { + get + { + return this.nameField; + } + set + { + this.nameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + [System.ComponentModel.DefaultValueAttribute(true)] + public bool enableNativeCodeExecution + { + get + { + return this.enableNativeCodeExecutionField; + } + set + { + this.enableNativeCodeExecutionField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + [System.ComponentModel.DefaultValueAttribute("Small")] + public string vmsize + { + get + { + return this.vmsizeField; + } + set + { + this.vmsizeField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class WebRoleInputEndpoints + { + + private WebRoleInputEndpointsInputEndpoint[] inputEndpointField; + + /// + [System.Xml.Serialization.XmlElementAttribute("InputEndpoint")] + public WebRoleInputEndpointsInputEndpoint[] InputEndpoint + { + get + { + return this.inputEndpointField; + } + set + { + this.inputEndpointField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class WebRoleInputEndpointsInputEndpoint : InputEndpoint + { + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class WebRoleInternalEndpoint : InternalEndpoint + { + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class Sites + { + + private Site[] siteField; + + /// + [System.Xml.Serialization.XmlElementAttribute("Site")] + public Site[] Site + { + get + { + return this.siteField; + } + set + { + this.siteField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class Site : VirtualDirectory + { + + private Binding[] bindingsField; + + /// + [System.Xml.Serialization.XmlArrayItemAttribute(IsNullable = false)] + public Binding[] Bindings + { + get + { + return this.bindingsField; + } + set + { + this.bindingsField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class Binding + { + + private string nameField; + + private string endpointNameField; + + private string hostHeaderField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string name + { + get + { + return this.nameField; + } + set + { + this.nameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string endpointName + { + get + { + return this.endpointNameField; + } + set + { + this.endpointNameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string hostHeader + { + get + { + return this.hostHeaderField; + } + set + { + this.hostHeaderField = value; + } + } + } + + /// + [System.Xml.Serialization.XmlIncludeAttribute(typeof(VirtualApplication))] + [System.Xml.Serialization.XmlIncludeAttribute(typeof(Site))] + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class VirtualDirectory + { + + private VirtualDirectory[] itemsField; + + private ItemsChoiceType[] itemsElementNameField; + + private string nameField; + + private string physicalDirectoryField; + + /// + [System.Xml.Serialization.XmlElementAttribute("VirtualApplication", typeof(VirtualDirectory))] + [System.Xml.Serialization.XmlElementAttribute("VirtualDirectory", typeof(VirtualDirectory))] + [System.Xml.Serialization.XmlChoiceIdentifierAttribute("ItemsElementName")] + public VirtualDirectory[] Items + { + get + { + return this.itemsField; + } + set + { + this.itemsField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("ItemsElementName")] + [System.Xml.Serialization.XmlIgnoreAttribute()] + public ItemsChoiceType[] ItemsElementName + { + get + { + return this.itemsElementNameField; + } + set + { + this.itemsElementNameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string name + { + get + { + return this.nameField; + } + set + { + this.nameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string physicalDirectory + { + get + { + return this.physicalDirectoryField; + } + set + { + this.physicalDirectoryField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition", IncludeInSchema = false)] + public enum ItemsChoiceType + { + + /// + VirtualApplication, + + /// + VirtualDirectory, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class VirtualApplication : VirtualDirectory + { + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public partial class LoadBalancerProbe + { + + private string nameField; + + private ProbeProtocol protocolField; + + private int portField; + + private bool portFieldSpecified; + + private string pathField; + + private int intervalInSecondsField; + + private int timeoutInSecondsField; + + public LoadBalancerProbe() + { + this.intervalInSecondsField = 15; + this.timeoutInSecondsField = 31; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string name + { + get + { + return this.nameField; + } + set + { + this.nameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public ProbeProtocol protocol + { + get + { + return this.protocolField; + } + set + { + this.protocolField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public int port + { + get + { + return this.portField; + } + set + { + this.portField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool portSpecified + { + get + { + return this.portFieldSpecified; + } + set + { + this.portFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string path + { + get + { + return this.pathField; + } + set + { + this.pathField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + [System.ComponentModel.DefaultValueAttribute(15)] + public int intervalInSeconds + { + get + { + return this.intervalInSecondsField; + } + set + { + this.intervalInSecondsField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + [System.ComponentModel.DefaultValueAttribute(31)] + public int timeoutInSeconds + { + get + { + return this.timeoutInSecondsField; + } + set + { + this.timeoutInSecondsField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public enum ProbeProtocol + { + + /// + http, + + /// + tcp, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public enum TaskType + { + + /// + simple, + + /// + foreground, + + /// + background, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition", IsNullable = false)] + public partial class ServiceDefinition + { + + private LoadBalancerProbe[] loadBalancerProbesField; + + private WebRole[] webRoleField; + + private WorkerRole[] workerRoleField; + + private OnlyAllowTrafficTo[] networkTrafficRulesField; + + private string nameField; + + private int upgradeDomainCountField; + + private SchemaVersion schemaVersionField; + + private TopologyChangeDiscovery topologyChangeDiscoveryField; + + public ServiceDefinition() + { + this.upgradeDomainCountField = 5; + this.schemaVersionField = SchemaVersion.unspecified; + this.topologyChangeDiscoveryField = TopologyChangeDiscovery.UpgradeDomainWalk; + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute(IsNullable = false)] + public LoadBalancerProbe[] LoadBalancerProbes + { + get + { + return this.loadBalancerProbesField; + } + set + { + this.loadBalancerProbesField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("WebRole")] + public WebRole[] WebRole + { + get + { + return this.webRoleField; + } + set + { + this.webRoleField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("WorkerRole")] + public WorkerRole[] WorkerRole + { + get + { + return this.workerRoleField; + } + set + { + this.workerRoleField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute(IsNullable = false)] + public OnlyAllowTrafficTo[] NetworkTrafficRules + { + get + { + return this.networkTrafficRulesField; + } + set + { + this.networkTrafficRulesField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string name + { + get + { + return this.nameField; + } + set + { + this.nameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + [System.ComponentModel.DefaultValueAttribute(5)] + public int upgradeDomainCount + { + get + { + return this.upgradeDomainCountField; + } + set + { + this.upgradeDomainCountField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + [System.ComponentModel.DefaultValueAttribute(SchemaVersion.unspecified)] + public SchemaVersion schemaVersion + { + get + { + return this.schemaVersionField; + } + set + { + this.schemaVersionField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + [System.ComponentModel.DefaultValueAttribute(TopologyChangeDiscovery.UpgradeDomainWalk)] + public TopologyChangeDiscovery topologyChangeDiscovery + { + get + { + return this.topologyChangeDiscoveryField; + } + set + { + this.topologyChangeDiscoveryField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public enum SchemaVersion + { + + /// + unspecified, + + /// + [System.Xml.Serialization.XmlEnumAttribute("2014-06.2.4")] + Item20140624, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.18020")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition")] + public enum TopologyChangeDiscovery + { + + /// + UpgradeDomainWalk, + + /// + Blast, + } +} diff --git a/src/Common/Commands.Common/packages.config b/src/Common/Commands.Common/packages.config new file mode 100644 index 000000000000..df2b72a265a8 --- /dev/null +++ b/src/Common/Commands.Common/packages.config @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Common/Commands.Profile/Account/AddAzureAccount.cs b/src/Common/Commands.Profile/Account/AddAzureAccount.cs new file mode 100644 index 000000000000..99027ed9630d --- /dev/null +++ b/src/Common/Commands.Profile/Account/AddAzureAccount.cs @@ -0,0 +1,95 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using System.Security; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Profile; + +namespace Microsoft.WindowsAzure.Commands.Profile +{ + /// + /// Cmdlet to log into an environment and download the subscriptions + /// + [Cmdlet(VerbsCommon.Add, "AzureAccount", DefaultParameterSetName = "User")] + [OutputType(typeof(AzureAccount))] + public class AddAzureAccount : SubscriptionCmdletBase + { + [Parameter(Mandatory = false, HelpMessage = "Environment containing the account to log into")] + public string Environment { get; set; } + + [Parameter(ParameterSetName = "User", Mandatory = false, HelpMessage = "Optional credential")] + [Parameter(ParameterSetName = "ServicePrincipal", Mandatory = true, HelpMessage = "Optional credential")] + public PSCredential Credential { get; set; } + + [Parameter(ParameterSetName = "ServicePrincipal", Mandatory = true)] + public SwitchParameter ServicePrincipal { get; set; } + + [Parameter(ParameterSetName = "ServicePrincipal", Mandatory = true, HelpMessage = "Optional tenant name or ID")] + public string Tenant { get; set; } + + public AddAzureAccount() : base(true) + { + Environment = EnvironmentName.AzureCloud; + } + + public override void ExecuteCmdlet() + { + AzureAccount azureAccount = new AzureAccount(); + + azureAccount.Type = ServicePrincipal.IsPresent + ? AzureAccount.AccountType.ServicePrincipal + : AzureAccount.AccountType.User; + + SecureString password = null; + if (Credential != null) + { + azureAccount.Id = Credential.UserName; + password = Credential.Password; + } + + if (!string.IsNullOrEmpty(Tenant)) + { + azureAccount.SetProperty(AzureAccount.Property.Tenants, new[] {Tenant}); + } + + var account = ProfileClient.AddAccountAndLoadSubscriptions(azureAccount, ProfileClient.GetEnvironmentOrDefault(Environment), password); + + if (account != null) + { + WriteVerbose(string.Format(Resources.AddAccountAdded, azureAccount.Id)); + if (ProfileClient.Profile.DefaultSubscription != null) + { + WriteVerbose(string.Format(Resources.AddAccountShowDefaultSubscription, + ProfileClient.Profile.DefaultSubscription.Name)); + } + WriteVerbose(Resources.AddAccountViewSubscriptions); + WriteVerbose(Resources.AddAccountChangeSubscription); + + string subscriptionsList = account.GetProperty(AzureAccount.Property.Subscriptions); + string tenantsList = account.GetProperty(AzureAccount.Property.Tenants); + + if (subscriptionsList == null) + { + WriteWarning(string.Format(Resources.NoSubscriptionAddedMessage, azureAccount.Id)); + } + + WriteObject(account.ToPSAzureAccount()); + } + } + } +} diff --git a/src/Common/Commands.Profile/Account/GetAzureAccount.cs b/src/Common/Commands.Profile/Account/GetAzureAccount.cs new file mode 100644 index 000000000000..5af5642e9b3a --- /dev/null +++ b/src/Common/Commands.Profile/Account/GetAzureAccount.cs @@ -0,0 +1,48 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Profile; +using System.Collections.Generic; + +namespace Microsoft.WindowsAzure.Commands.Profile +{ + /// + /// Cmdlet to list the currently downloaded accounts and their + /// associated subscriptions. + /// + [Cmdlet(VerbsCommon.Get, "AzureAccount")] + [OutputType(typeof(AzureAccount))] + public class GetAzureAccount : SubscriptionCmdletBase + { + [Parameter(Position = 0, Mandatory = false, HelpMessage = "Name of account to get information for")] + public string Name { get; set; } + + public GetAzureAccount() : base(false) + { + } + + public override void ExecuteCmdlet() + { + IEnumerable accounts = DefaultProfileClient.ListAccounts(Name); + List output = new List(); + foreach (AzureAccount account in accounts) { + output.Add(account.ToPSAzureAccount()); + } + WriteObject(output, true); + } + } +} \ No newline at end of file diff --git a/src/Common/Commands.Profile/Account/RemoveAzureAccount.cs b/src/Common/Commands.Profile/Account/RemoveAzureAccount.cs new file mode 100644 index 000000000000..01a103c100ad --- /dev/null +++ b/src/Common/Commands.Profile/Account/RemoveAzureAccount.cs @@ -0,0 +1,62 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Profile; + +namespace Microsoft.WindowsAzure.Commands.Profile +{ + /// + /// Removes subscriptions associated with an account + /// + [Cmdlet(VerbsCommon.Remove, "AzureAccount", SupportsShouldProcess = true), OutputType(typeof(AzureAccount))] + public class RemoveAzureAccountCommand : SubscriptionCmdletBase + { + public RemoveAzureAccountCommand() : base(true) + { + } + + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the account")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Position = 2, HelpMessage = "Do not confirm deletion of account")] + public SwitchParameter Force { get; set; } + + [Parameter(Position = 3, Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + public void RemoveAccountProcess() + { + var removedAccount = ProfileClient.RemoveAccount(Name); + + if (PassThru.IsPresent) + { + WriteObject(removedAccount); + } + } + + public override void ExecuteCmdlet() + { + ConfirmAction( + Force.IsPresent, + string.Format(Resources.RemoveAccountConfirmation, Name), + Resources.RemoveAccountMessage, + Name, + RemoveAccountProcess); + } + } +} diff --git a/src/Common/Commands.Profile/Commands.Profile.csproj b/src/Common/Commands.Profile/Commands.Profile.csproj new file mode 100644 index 000000000000..d1b5d2b46f2a --- /dev/null +++ b/src/Common/Commands.Profile/Commands.Profile.csproj @@ -0,0 +1,164 @@ + + + + Debug + AnyCPU + {C60342B1-47D3-4A0E-8081-9B97CE60B7AF} + Library + Properties + Microsoft.WindowsAzure.Commands.Profile + Microsoft.WindowsAzure.Commands.Profile + v4.5 + 512 + + ..\..\ + true + /assemblyCompareMode:StrongNameIgnoringVersion + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + true + true + false + + + bin\Release\ + TRACE;SIGN + true + pdbonly + AnyCPU + bin\Release\Commands.Profile.dll.CodeAnalysisLog.xml + true + GlobalSuppressions.cs + prompt + MinimumRecommendedRules.ruleset + ;$(ProgramFiles)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\Rule Sets + ;$(ProgramFiles)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\Rules + true + true + MSSharedLibKey.snk + true + false + + + + + + False + ..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll + + + False + ..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll + + + False + ..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + False + ..\lib\Microsoft.Web.Deployment.dll + + + False + ..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + False + ..\..\packages\Microsoft.WindowsAzure.Management.2.1.0\lib\net40\Microsoft.WindowsAzure.Management.dll + + + ..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + True + + + + + + + + + + + False + ..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Designer + Always + + + + + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + + + Designer + PreserveNewest + + + + + + + + + + \ No newline at end of file diff --git a/src/Common/Commands.Profile/Environment/AddAzureEnvironment.cs b/src/Common/Commands.Profile/Environment/AddAzureEnvironment.cs new file mode 100644 index 000000000000..06b42ada3921 --- /dev/null +++ b/src/Common/Commands.Profile/Environment/AddAzureEnvironment.cs @@ -0,0 +1,89 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Profile; +using System.Collections.Generic; +using System; + +namespace Microsoft.WindowsAzure.Commands.Profile +{ + + + /// + /// Adds a new Microsoft Azure environment. + /// + [Cmdlet(VerbsCommon.Add, "AzureEnvironment"), OutputType(typeof(AzureEnvironment))] + public class AddAzureEnvironmentCommand : SubscriptionCmdletBase + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true)] + public string Name { get; set; } + + [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true)] + public string PublishSettingsFileUrl { get; set; } + + [Parameter(Position = 2, Mandatory = false, ValueFromPipelineByPropertyName = true)] + public string ServiceEndpoint { get; set; } + + [Parameter(Position = 3, Mandatory = false, ValueFromPipelineByPropertyName = true)] + public string ManagementPortalUrl { get; set; } + + [Parameter(Position = 4, Mandatory = false, HelpMessage = "The storage endpoint")] + public string StorageEndpoint { get; set; } + + [Parameter(Position = 5, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The URI for the Active Directory service for this environment")] + public string ActiveDirectoryEndpoint { get; set; } + + [Parameter(Position = 6, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The cloud service endpoint")] + public string ResourceManagerEndpoint { get; set; } + + [Parameter(Position = 7, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The public gallery endpoint")] + public string GalleryEndpoint { get; set; } + + [Parameter(Position = 8, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "Identifier of the target resource that is the recipient of the requested token.")] + public string ActiveDirectoryServiceEndpointResourceId { get; set; } + + [Parameter(Position = 9, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The AD Graph Endpoint.")] + public string GraphEndpoint { get; set; } + + public AddAzureEnvironmentCommand() : base(true) { } + + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + var newEnvironment = new AzureEnvironment {Name = Name}; + newEnvironment.Endpoints[AzureEnvironment.Endpoint.PublishSettingsFileUrl] = PublishSettingsFileUrl; + newEnvironment.Endpoints[AzureEnvironment.Endpoint.ServiceManagement] = ServiceEndpoint; + newEnvironment.Endpoints[AzureEnvironment.Endpoint.ResourceManager] = ResourceManagerEndpoint; + newEnvironment.Endpoints[AzureEnvironment.Endpoint.ManagementPortalUrl] = ManagementPortalUrl; + newEnvironment.Endpoints[AzureEnvironment.Endpoint.StorageEndpointSuffix] = StorageEndpoint; + newEnvironment.Endpoints[AzureEnvironment.Endpoint.ActiveDirectory] = ActiveDirectoryEndpoint; + newEnvironment.Endpoints[AzureEnvironment.Endpoint.ActiveDirectoryServiceEndpointResourceId] = ActiveDirectoryServiceEndpointResourceId; + newEnvironment.Endpoints[AzureEnvironment.Endpoint.Gallery] = GalleryEndpoint; + newEnvironment.Endpoints[AzureEnvironment.Endpoint.Graph] = GraphEndpoint; + + ProfileClient.AddOrSetEnvironment(newEnvironment); + List args = new List { "Name", newEnvironment.Name }; + foreach (AzureEnvironment.Endpoint property in Enum.GetValues(typeof(AzureEnvironment.Endpoint))) + { + args.AddRange(new object[] { property, newEnvironment.GetEndpoint(property) }); + } + WriteObject(base.ConstructPSObject(null, args.ToArray())); + } + } +} \ No newline at end of file diff --git a/src/Common/Commands.Profile/Environment/GetAzureEnvironment.cs b/src/Common/Commands.Profile/Environment/GetAzureEnvironment.cs new file mode 100644 index 000000000000..0ad23b085004 --- /dev/null +++ b/src/Common/Commands.Profile/Environment/GetAzureEnvironment.cs @@ -0,0 +1,53 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Profile; +using System; + +namespace Microsoft.WindowsAzure.Commands.Profile +{ + /// + /// Gets the available Microsoft Azure environments. + /// + [Cmdlet(VerbsCommon.Get, "AzureEnvironment"), OutputType(typeof(List))] + public class GetAzureEnvironmentCommand : SubscriptionCmdletBase + { + [Parameter(Position = 0, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The environment name")] + public string Name { get; set; } + + public GetAzureEnvironmentCommand() : base(false) { } + + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + List environments = ProfileClient.ListEnvironments(Name); + List output = new List(); + foreach (AzureEnvironment e in environments) + { + List args = new List { "Name", e.Name }; + foreach (AzureEnvironment.Endpoint property in Enum.GetValues(typeof(AzureEnvironment.Endpoint))) + { + args.AddRange(new object[] { property, e.GetEndpoint(property) }); + } + output.Add(base.ConstructPSObject(null, args.ToArray())); + } + WriteObject(output, true); + } + } +} \ No newline at end of file diff --git a/src/Common/Commands.Profile/Environment/RemoveAzureEnvironment.cs b/src/Common/Commands.Profile/Environment/RemoveAzureEnvironment.cs new file mode 100644 index 000000000000..eb37a9ba13dc --- /dev/null +++ b/src/Common/Commands.Profile/Environment/RemoveAzureEnvironment.cs @@ -0,0 +1,56 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Profile; + +namespace Microsoft.WindowsAzure.Commands.Profile +{ + + + /// + /// Removes a Microsoft Azure environment. + /// + [Cmdlet(VerbsCommon.Remove, "AzureEnvironment"), OutputType(typeof(AzureEnvironment))] + public class RemoveAzureEnvironmentCommand : SubscriptionCmdletBase + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The environment name")] + public string Name { get; set; } + + [Parameter(Position = 1, HelpMessage = "Do not confirm deletion of subscription")] + public SwitchParameter Force { get; set; } + + public RemoveAzureEnvironmentCommand() : base(true) { } + + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + ConfirmAction( + Force.IsPresent, + string.Format(Resources.RemoveEnvironmentConfirmation, Name), + Resources.RemoveEnvironmentMessage, + Name, + RemoveEnvironmentProcess); + } + + public void RemoveEnvironmentProcess() + { + WriteObject(ProfileClient.RemoveEnvironment(Name)); + } + } +} diff --git a/src/Common/Commands.Profile/Environment/SetAzureEnvironment.cs b/src/Common/Commands.Profile/Environment/SetAzureEnvironment.cs new file mode 100644 index 000000000000..9696fce851d8 --- /dev/null +++ b/src/Common/Commands.Profile/Environment/SetAzureEnvironment.cs @@ -0,0 +1,100 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Profile; + +namespace Microsoft.WindowsAzure.Commands.Profile +{ + + /// + /// Sets a Microsoft Azure environment. + /// + [Cmdlet(VerbsCommon.Set, "AzureEnvironment"), OutputType(typeof(AzureEnvironment))] + public class SetAzureEnvironmentCommand : SubscriptionCmdletBase + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true)] + public string Name { get; set; } + + [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true)] + public string PublishSettingsFileUrl { get; set; } + + [Parameter(Position = 2, Mandatory = false, ValueFromPipelineByPropertyName = true)] + public string ServiceEndpoint { get; set; } + + [Parameter(Position = 3, Mandatory = false, ValueFromPipelineByPropertyName = true)] + public string ManagementPortalUrl { get; set; } + + [Parameter(Position = 4, Mandatory = false, HelpMessage = "The storage endpoint")] + public string StorageEndpoint { get; set; } + + [Parameter(Position = 5, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Active directory endpoint")] + [Alias("AdEndpointUrl")] + public string ActiveDirectoryEndpoint { get; set; } + + [Parameter(Position = 6, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The cloud service endpoint")] + public string ResourceManagerEndpoint { get; set; } + + [Parameter(Position = 7, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The public gallery endpoint")] + public string GalleryEndpoint { get; set; } + + [Parameter(Position = 8, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "Identifier of the target resource that is the recipient of the requested token.")] + public string ActiveDirectoryServiceEndpointResourceId { get; set; } + + [Parameter(Position = 9, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The AD Graph Endpoint.")] + public string GraphEndpoint { get; set; } + + public SetAzureEnvironmentCommand() : base(true) { } + + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + var newEnvironment = new AzureEnvironment { Name = Name }; + if (ProfileClient.Profile.Environments.ContainsKey(Name)) + { + newEnvironment = ProfileClient.Profile.Environments[Name]; + } + SetEndpointIfProvided(newEnvironment, AzureEnvironment.Endpoint.PublishSettingsFileUrl, PublishSettingsFileUrl); + SetEndpointIfProvided(newEnvironment, AzureEnvironment.Endpoint.ServiceManagement, ServiceEndpoint); + SetEndpointIfProvided(newEnvironment, AzureEnvironment.Endpoint.ResourceManager, ResourceManagerEndpoint); + SetEndpointIfProvided(newEnvironment, AzureEnvironment.Endpoint.ManagementPortalUrl, ManagementPortalUrl); + SetEndpointIfProvided(newEnvironment, AzureEnvironment.Endpoint.StorageEndpointSuffix, StorageEndpoint); + SetEndpointIfProvided(newEnvironment, AzureEnvironment.Endpoint.ActiveDirectory, ActiveDirectoryEndpoint); + SetEndpointIfProvided(newEnvironment, AzureEnvironment.Endpoint.ActiveDirectoryServiceEndpointResourceId, ActiveDirectoryServiceEndpointResourceId); + SetEndpointIfProvided(newEnvironment, AzureEnvironment.Endpoint.Gallery, GalleryEndpoint); + SetEndpointIfProvided(newEnvironment, AzureEnvironment.Endpoint.Graph, GraphEndpoint); + + ProfileClient.AddOrSetEnvironment(newEnvironment); + + WriteObject(newEnvironment); + } + + private void SetEndpointIfProvided(AzureEnvironment newEnvironment, AzureEnvironment.Endpoint endpoint, string property) + { + if (!string.IsNullOrEmpty(property)) + { + newEnvironment.Endpoints[endpoint] = property; + } + } + + private static string Value(string newValue, string existingValue) + { + return string.IsNullOrEmpty(newValue) ? existingValue : newValue; + } + } +} \ No newline at end of file diff --git a/src/Common/Commands.Profile/MSSharedLibKey.snk b/src/Common/Commands.Profile/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/Common/Commands.Profile/MSSharedLibKey.snk differ diff --git a/src/Common/Commands.Profile/Microsoft.WindowsAzure.Commands.Profile.dll-Help.psd1 b/src/Common/Commands.Profile/Microsoft.WindowsAzure.Commands.Profile.dll-Help.psd1 new file mode 100644 index 000000000000..acb022d51649 --- /dev/null +++ b/src/Common/Commands.Profile/Microsoft.WindowsAzure.Commands.Profile.dll-Help.psd1 @@ -0,0 +1,86 @@ +# +# Module manifest for module 'Azure' +# +# Generated by: Microsoft Corporation +# +# Generated on: 5/23/2012 +# + +@{ + +# Version number of this module. +ModuleVersion = '0.8.8' + +# ID used to uniquely identify this module +GUID = 'D48CF693-4125-4D2D-8790-1514F44CE325' + +# Author of this module +Author = 'Microsoft Corporation' + +# Company or vendor of this module +CompanyName = 'Microsoft Corporation' + +# Copyright statement for this module +Copyright = '?Microsoft Corporation. All rights reserved.' + +# Description of the functionality provided by this module +Description = '' + +# Minimum version of the Windows PowerShell engine required by this module +PowerShellVersion = '3.0' + +# Name of the Windows PowerShell host required by this module +PowerShellHostName = '' + +# Minimum version of the Windows PowerShell host required by this module +PowerShellHostVersion = '' + +# Minimum version of the .NET Framework required by this module +DotNetFrameworkVersion = '4.0' + +# Minimum version of the common language runtime (CLR) required by this module +CLRVersion='4.0' + +# Processor architecture (None, X86, Amd64, IA64) required by this module +ProcessorArchitecture = 'None' + +# Modules that must be imported into the global environment prior to importing this module +RequiredModules = @() + +# Assemblies that must be loaded prior to importing this module +RequiredAssemblies = @() + +# Script files (.ps1) that are run in the caller's environment prior to importing this module +ScriptsToProcess = @() + +# Type files (.ps1xml) to be loaded when importing this module +TypesToProcess = @() + +# Format files (.ps1xml) to be loaded when importing this module +FormatsToProcess = @() + +# Modules to import as nested modules of the module specified in ModuleToProcess +NestedModules = '..\..\Package\Debug\ServiceManagement\Azure\Services\Microsoft.WindowsAzure.Commands.Profile.dll' + +# Functions to export from this module +FunctionsToExport = '*' + +# Cmdlets to export from this module +CmdletsToExport = '*' + +# Variables to export from this module +VariablesToExport = '*' + +# Aliases to export from this module +AliasesToExport = @() + +# List of all modules packaged with this module +ModuleList = @() + +# List of all files packaged with this module +FileList = @() + +# Private data to pass to the module specified in ModuleToProcess +PrivateData = '' + +} diff --git a/src/Common/Commands.Profile/Microsoft.WindowsAzure.Commands.Profile.dll-Help.xml b/src/Common/Commands.Profile/Microsoft.WindowsAzure.Commands.Profile.dll-Help.xml new file mode 100644 index 000000000000..9d2df460ffce --- /dev/null +++ b/src/Common/Commands.Profile/Microsoft.WindowsAzure.Commands.Profile.dll-Help.xml @@ -0,0 +1,4077 @@ + + + + + Add-AzureAccount + + Adds the Azure account to Windows PowerShell + + + + + Add + AzureAccount + + + + The Add-AzureAccount cmdlet makes your Azure account and its subscriptions available in Windows PowerShell. It's like logging into your Azure account in Windows PowerShell. To log out of the account, use the Remove-AzureAccount cmdlet. + Add-AzureAccount downloads information about your Azure account and saves it in a subscription data file in your roaming user profile. It also gets an access token that allows Windows PowerShell to access your Azure account on your behalf. When the command completes, you can manage your Azure account in Windows PowerShell. + There are two different ways to make your Azure account available to Windows PowerShell. You can use the Add-AzureAccount cmdlet, which uses Azure Active Directory (Azure AD) authentication access tokens, or Import-AzurePublishSettingsFile, which uses a management certificate. For guidance on which method to use, see "How to: Connect to your subscription" (http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/#Connect). + When you run Add-AzureAccount, it displays an interactive window that prompts you to sign into your Azure account. This sign-in is valid until the access token expires. When it expires, cmdlets that require access to your account prompt you to run Add-AzureAccount again. + If you have a Microsoft Organizational account, you can use the -Credential parameter to add the subscriptions associated with your account to Windows PowerShell without an interactive dialog. + When specifying -ServicePrincipal switch a -Credential parameter is used to authenticate a Service Principal. + + + + Add-AzureAccount + + Environment + + Specifies an Azure environment for the user account. This parameter is optional. The default is the AzureCloud environment.An Azure environment an independent deployment of Microsoft Azure, such as AzureCloud for global Azure and AzureChinaCloud for Azure operated by 21Vianet in China. You can also create on-premises Azure environments by using Azure Pack and the WAPack cmdlets. For more information, see Azure Pack.To get the available Azure environments, use the Get-AzureEnvironment cmdlet. To add an environment, use the Add-AzureEnvironment cmdlet. + + String + + + Credential + + The username and password account credentials used to authenticate with Azure Active Directory. The credentials must be for a Microsoft Organizational account or Service Principal, not a Microsoft account. + + PSCredential + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + + + Add-AzureAccount + + Environment + + Specifies an Azure environment for the user account. This parameter is optional. The default is the AzureCloud environment.An Azure environment an independent deployment of Microsoft Azure, such as AzureCloud for global Azure and AzureChinaCloud for Azure operated by 21Vianet in China. You can also create on-premises Azure environments by using Azure Pack and the WAPack cmdlets. For more information, see Azure Pack.To get the available Azure environments, use the Get-AzureEnvironment cmdlet. To add an environment, use the Add-AzureEnvironment cmdlet. + + String + + + Credential + + The username and password account credentials used to authenticate with Azure Active Directory. The credentials must be for a Microsoft Organizational account or Service Principal, not a Microsoft account. + + PSCredential + + + ServicePrincipal + + Specifies that your are logging in as a service principal. You must give a Credentials parameter for this case, with the service principal ID as the user name and the service principal key as the password. + + SwitchParameter + + + Tenant + + Used when logging in as a service principal. Specifies the AAD tenant the service principal is defined in. This can be either the tenant's domain name or id. + + String + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + + + + + Environment + + Specifies an Azure environment for the user account. This parameter is optional. The default is the AzureCloud environment.An Azure environment an independent deployment of Microsoft Azure, such as AzureCloud for global Azure and AzureChinaCloud for Azure operated by 21Vianet in China. You can also create on-premises Azure environments by using Azure Pack and the WAPack cmdlets. For more information, see Azure Pack.To get the available Azure environments, use the Get-AzureEnvironment cmdlet. To add an environment, use the Add-AzureEnvironment cmdlet. + + String + + String + + + + + + Credential + + The username and password account credentials used to authenticate with Azure Active Directory. The credentials must be for a Microsoft Organizational account or Service Principal, not a Microsoft account. + + PSCredential + + PSCredential + + + + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + String + + + + + + ServicePrincipal + + Specifies that your are logging in as a service principal. You must give a Credentials parameter for this case, with the service principal ID as the user name and the service principal key as the password. + + SwitchParameter + + SwitchParameter + + + + + + Tenant + + Used when logging in as a service principal. Specifies the AAD tenant the service principal is defined in. This can be either the tenant's domain name or id. + + String + + String + + + + + + + + + None + + + + + + + + + + + + + None + + + + + + + + + + + + + + + Add-AzureAccount (and the Azure AD authentication method) takes precedence over Import-AzurePublishSettings (and the management certificate method). If you use Add-AzureAccount even once on your account, the Azure AD authentication method is used and the management certificate is ignored. To remove the Azure AD token and restore the management certificate method, use the Remove-AzureAccount cmdlet. For more information, type: Get-Help Remove-AzureAccount. + + + + + -------------------------- Example 1: Add an account -------------------------- + + PS C:\> + + PS C:\>Add-AzureAccount + + This command adds an Azure account to Windows PowerShell. When you run the command, a windows pops up to request the user name and password of the account. + + + + + + + + + + + + + + -------------------------- Example 2: Use an alternate subscription data file -------------------------- + + PS C:\> + + PS C:\>Add-AzureAccount -SubscriptionDataFile C:\Testing\SDF.xml + + This command uses the SubscriptionDataFile parameter to direct Add-AzureAccount to store the account data in the C:\Testing\SDF.xml file, instead of the default file. + + + + + + + + + + + + + + -------------------------- Example 3: Add a Microsoft Organizational account using Credential -------------------------- + + PS C:\> + + PS C:\>$credential = Get-Credential +PS C:\>Add-AzureAccount -Credential $credential + + This command uses the Credential parameter to provide AAD authentication information on the command line, rather than using the pop-up dialog for AAD authentication. + + + + + + + + + + + + + + -------------------------- Example 4: Add a Service Principal account using Credential and ServicePrincipal -------------------------- + + PS C:\> + + PS C:\>$credential = Get-Credential +PS C:\>Add-AzureAccount -Credential $credential -ServicePrincipal -Tenant "3EB32C56-E1E5-46A6-9410-F4A0572B3998" + + This command uses the Credential parameter to provide AAD authentication information of the Service Principal in the tenant 3EB32C56-E1E5-46A6-9410-F4A0572B3998. + + + + + + + + + + + + + + -------------------------- Example 5: Add an account in Azure China -------------------------- + + PS C:\> + + PS C:\>Add-AzureAccount -Environment AzureChinaCloud + + This command uses the Environment parameter to add an Azure China account to Windows PowerShell. When you run the command, a windows pops up to request the user name and password of the account. + + + + + + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=397618 + + + Add-AzureEnvironment + + + + Get-AzureEnvironment + + + + Import-AzurePublishSettingsFile + + + + Get-AzureAccount + + + + Remove-AzureAccount + + + + + + + + Add-AzureEnvironment + + Creates an Azure environment + + + + + Add + AzureEnvironment + + + + The Add-AzureEnvironment cmdlet creates a new custom Azure account environment and saves it in your roaming user profile. The cmdlet returns an object that represents the new environment. When the command completes, you can use the environment in Windows PowerShell. + An Azure environment an independent deployment of Microsoft Azure, such as AzureCloud for global Azure and AzureChinaCloud for Azure operated by 21Vianet in China. You can also create on-premises Azure environments by using Azure Pack and the WAPack cmdlets. For more information, see Azure Pack (http://www.microsoft.com/en-us/server-cloud/products/windows-azure-pack/default.aspx). + Only the Name parameter of this cmdlet is mandatory. If you omit a parameter, its value is null ($null), and the service that uses that endpoint might not function properly. To add or change the value of an environment property, use the Set-AzureEnvironment cmdlet. + NOTE: Changing your environment can cause your account to fail. Typically, environments are added only for testing or troubleshooting. + + + + Add-AzureEnvironment + + Name + + Specifies a name for the environment. This parameter is required. Do not use the names of the default environments, AzureCloud and AzureChinaCloud. + + String + + + PublishSettingsFileUrl + + Specifies the URL of the publish settings files for your account. An Azure publish settings file is an XML file that contains information about your account and a management certificate that allows Windows PowerShell to sign into your Azure account on your behalf. + + String + + + ServiceEndpoint + + Specifies the URL of the Azure service endpoint. The Azure service endpoint determines whether your application is managed by the global Azure platform, Azure operated by 21Vianet in China, or a private Azure installation. + + String + + + ManagementPortalUrl + + Specifies the URL of the Azure Management Portal in the new environment. + + String + + + StorageEndpoint + + Specifies the default endpoint of storage services in the new environment. + + String + + + ActiveDirectoryEndpoint + + Specifies the endpoint for Azure Active Directory authentication in the new environment. + + String + + + ResourceManagerEndpoint + + Specifies the endpoint for Azure Resource Manager data, including data about resource groups associated with the account. For more information about Azure Resource Manager, see Azure Resource Manager Cmdlets (http://go.microsoft.com/fwlink/?LinkID=394765) and Using Windows PowerShell with Resource Manager (http://go.microsoft.com/fwlink/?LinkID=394767). + + String + + + GalleryEndpoint + + Specifies the endpoint for the Azure Resource Manager gallery, which stores resource group gallery templates. For more information about Azure resource groups and gallery templates, see the help topic for Get-AzureResourceGroupGalleryTemplate. + + String + + + ActiveDirectoryServiceEndpointResourceId + + Specifies the resource ID of a management API whose access is managed by Azure Active Directory. + + String + + + GraphEndpoint + + Changes the endpoint for Azure Active Directory Graph API to the specified value. + + String + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + + + + + Name + + Specifies a name for the environment. This parameter is required. Do not use the names of the default environments, AzureCloud and AzureChinaCloud. + + String + + String + + + + + + PublishSettingsFileUrl + + Specifies the URL of the publish settings files for your account. An Azure publish settings file is an XML file that contains information about your account and a management certificate that allows Windows PowerShell to sign into your Azure account on your behalf. + + String + + String + + + + + + ServiceEndpoint + + Specifies the URL of the Azure service endpoint. The Azure service endpoint determines whether your application is managed by the global Azure platform, Azure operated by 21Vianet in China, or a private Azure installation. + + String + + String + + + + + + ManagementPortalUrl + + Specifies the URL of the Azure Management Portal in the new environment. + + String + + String + + + + + + StorageEndpoint + + Specifies the default endpoint of storage services in the new environment. + + String + + String + + + + + + ActiveDirectoryEndpoint + + Specifies the endpoint for Azure Active Directory authentication in the new environment. + + String + + String + + + + + + ResourceManagerEndpoint + + Specifies the endpoint for Azure Resource Manager data, including data about resource groups associated with the account. For more information about Azure Resource Manager, see Azure Resource Manager Cmdlets (http://go.microsoft.com/fwlink/?LinkID=394765) and Using Windows PowerShell with Resource Manager (http://go.microsoft.com/fwlink/?LinkID=394767). + + String + + String + + + + + + GalleryEndpoint + + Specifies the endpoint for the Azure Resource Manager gallery, which stores resource group gallery templates. For more information about Azure resource groups and gallery templates, see the help topic for Get-AzureResourceGroupGalleryTemplate. + + String + + String + + + + + + ActiveDirectoryServiceEndpointResourceId + + Specifies the resource ID of a management API whose access is managed by Azure Active Directory. + + String + + String + + + + + + GraphEndpoint + + Changes the endpoint for Azure Active Directory Graph API to the specified value. + + String + + String + + + + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + String + + + + + + + + + None + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.Common.WindowsAzureEnvironment + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Add an Azure environment -------------------------- + + PS C:\> + + PS C:\>Add-AzureEnvironment -Name ContosoEnv -PublishSettingsFileUrl https://contoso.com/fwlink/?LinkID=101 -ServiceEndpoint https://contoso.com/fwlink/?LinkID=102 +Name : ContosoEnv + +PublishSettingsFileUrl : https://contoso.com/fwlink/?LinkID=101 + +ServiceEndpoint : https://contoso.com/fwlink/?LinkID=102 + +ResourceManagerEndpoint : + +ManagementPortalUrl : + +ActiveDirectoryEndpoint : + +ActiveDirectoryCommonTenantId : + +StorageEndpointSuffix : + +StorageBlobEndpointFormat : + +StorageQueueEndpointFormat : + +StorageTableEndpointFormat : + +GalleryEndpoint : + + This command creates the ContosoEnv Azure environment. + + + + + + + + + + + + + + -------------------------- Example 2: Add an Azure environment with Parameters -------------------------- + + PS C:\> + + PS C:\>Add-AzureEnvironment -Name ContosoEnv -PublishSettingsFileUrl "https://contoso.com/fwlink/?LinkID=101" -ServiceEndpoint "https://contoso.com/fwlink/?LinkID=102" -ResourceManagerEndpoint "https://contoso.com/fwlink/?LinkID=103" -GraphEndpoint "https://contoso.com/fwlink/?LinkID=104" + + This command creates the ContosoEnv Azure environment with PublishSettingsFileUrl, ServiceEndpoint, ResourceManagerEndpoint, and GraphEndpoint specified. All other endpoints are ignored. + + + + + + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=397619 + + + Get-AzureEnvironment + + + + Remove-AzureEnvironment + + + + Set-AzureEnvironment + + + + + + + + Clear-AzureProfile + + Clears an Azure profile + + + + + Clear + AzureProfile + + + + The Clear-AzureProfile cmdlet resets Azure profile to default values. All imported subscriptions and accounts are removed. + + + + Clear-AzureProfile + + Force + + Suppresses the confirmation prompt. By default, Clear-AzureProfile prompts you before clearing the profile. + + SwitchParameter + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + + + + + Force + + Suppresses the confirmation prompt. By default, Clear-AzureProfile prompts you before clearing the profile. + + SwitchParameter + + SwitchParameter + + + + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + String + + + + + + + + + + + + + + + + + + + + + None + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Clear profile -------------------------- + + PS C:\> + + PS C:\>Clear-AzureProfile + + This command clears default user Azure profile. + + + + + + + + + + + + + + -------------------------- Example 2: Clear non-default profile -------------------------- + + PS C:\> + + PS C:\>Clear-AzureProfile -SubscriptionDataFile c:\myprofile.json + + This command clears Azure profile stored in c:\myprofile.json file. + + + + + + + + + + + + + + + + Get-AzureSubscription + + + + Set-AzureSubscription + + + + Add-AzureAccount + + + + Remove-AzureAccount + + + + + + + + Get-AzureAccount + + Gets Azure accounts that are available to Azure PowerShell. + + + + + Get + AzureAccount + + + + This is the Description section + The Get-AzureAccount cmdlet gets the Azure accounts that are available to Windows PowerShell. To make your accounts available to Windows PowerShell, use the Add-AzureAccount or Import-PublishSettingsFile cmdlets. + + + + Get-AzureAccount + + Name + + Gets only the specified account. The default is all accounts that are available to Windows PowerShell. Enter the account name. The Name value is case-sensitive. Wildcards are not permitted. + + String + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + + + + + Name + + Gets only the specified account. The default is all accounts that are available to Windows PowerShell. Enter the account name. The Name value is case-sensitive. Wildcards are not permitted. + + String + + String + + + + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + String + + + + + + + + + None + + + + + + + + + + + + + None + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Get all accounts -------------------------- + + PS C:\> + + PS C:\>Get-AzureAccount +Name ActiveDirectories +---- ----------------- +contosoadmin@outlook.com {{ ActiveDirectoryTenantId = abcde5cd-bcc3-441a-bd86-e6a... +contosotest1@outlook.com {{ ActiveDirectoryTenantId = aaeabcde-386c-4466-bf70-794... + + This command gets all accounts associated with the specified user. + + + + + + + + + + + + + + -------------------------- Example 2: Get an account by name -------------------------- + + PS C:\> + + PS C:\>Get-AzureAccount -Name contosoadmin@outlook.com +Name ActiveDirectories +---- ----------------- +contosoadmin@outlook.com {{ ActiveDirectoryTenantId = abcde5cd-bcc3-441a-bd86-e6a... + + This command gets the ContosoAdmin account. + + + + + + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=397620 + + + Add-AzureAccount + + + + Get-AzurePublishSettingsFile + + + + Import-AzurePublishSettingsFile + + + + Remove-AzureAccount + + + + + + + + Get-AzureEnvironment + + Gets Azure environments + + + + + Get + AzureEnvironment + + + + This is the Description section + The Get-AzureEnvironment cmdlet gets the Azure environments that are available to Windows PowerShell.An Azure environment an independent deployment of Microsoft Azure, such as AzureCloud for global Azure and AzureChinaCloud for Azure operated by 21Vianet in China. You can also create on-premises Azure environments by using Azure Pack and the WAPack cmdlets. For more information, see Azure Pack (http://www.microsoft.com/en-us/server-cloud/products/windows-azure-pack/default.aspx).The Get-AzureEnvironment cmdlet gets environments from your subscription data file, not from Azure. If the subscription data file is outdated, run the Add-AzureAccount or Import-PublishSettingsFile cmdlet to refresh it. + + + + Get-AzureEnvironment + + Name + + Gets only the specified environment. Type the environment name. The parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + + + + + Name + + Gets only the specified environment. Type the environment name. The parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + String + + + + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + String + + + + + + + + + None + + + + + + + + + + + + + System.Management.Automation.PSCustomObject + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Get all environments -------------------------- + + PS C:\> + + PS C:\>Get-AzureEnvironment +EnvironmentName ServiceEndpoint ResourceManagerEndpoint PublishSettingsFileUrl +--------------- --------------- ----------------------- ---------------------- + +AzureCloud https://management.core.wi... https://management.azure.com/ http://go.microsoft.com/fw... +AzureChinaCloud https://management.core.ch... https://not-supported-serv... http://go.microsoft.com/fw... + + This command gets all environments that are available to Windows PowerShell. + + + + + + + + + + + + + + -------------------------- Example 2: Get an environment by name -------------------------- + + PS C:\> + + PS C:\>Get-AzureEnvironment -Name AzureCloud +Name : AzureCloud + +PublishSettingsFileUrl : http://go.microsoft.com/fwlink/?LinkID=301775 + +ServiceEndpoint : https://management.core.windows.net/ + +ResourceManagerEndpoint : https://management.azure.com/ + +ManagementPortalUrl : http://go.microsoft.com/fwlink/?LinkId=254433 + +ActiveDirectoryEndpoint : https://login.windows.net/ + +ActiveDirectoryCommonTenantId : common + +StorageEndpointSuffix : core.windows.net + +StorageBlobEndpointFormat : {0}://{1}.blob.core.windows.net/ + +StorageQueueEndpointFormat : {0}://{1}.queue.core.windows.net/ + +StorageTableEndpointFormat : {0}://{1}.table.core.windows.net/ + +GalleryEndpoint : https://gallery.azure.com/ + + This example gets the AzureCloud environment. + + + + + + + + + + + + + + -------------------------- Example 3: Get all properties of all environments -------------------------- + + PS C:\> + + PS C:\>Get-AzureEnvironment | ForEach-Object {Get-AzureEnvironment -Name $_.EnvironmentName} + + This command gets all properties of all environments. + + + The command uses the Get-AzureEnvironment cmdlet to get all Azure environments for this account. Then, it uses the Foreach-Object cmdlet to run a Get-AzureEnvironment command with the Name parameter on each environment. The value of the Name parameter is the EnvironmentName property of each environment.Without parameters, Get-AzureEnvironment gets only selected properties of an environment. + + + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=397621 + + + Add-AzureAccount + + + + Add-AzureEnvironment + + + + Get-AzurePublishSettingsFile + + + + Import-AzurePublishSettingsFile + + + + Remove-AzureEnvironment + + + + Set-AzureEnvironment + + + + + + + + Get-AzurePublishSettingsFile + + Downloads the publish settings file for an Azure subscription. + + + + + Get + AzurePublishSettingsFile + + + + This is the Description section + The Get-AzurePublishSettingsFile cmdlet downloads a publish settings file for a subscription in your account. When the command completes, you can use the Import-PublishSettingsFile cmdlet to make the settings in the file available to Windows PowerShell.To make your Azure account available to Windows PowerShell, you can use a publish settings file or the Add-AzureAccount cmdlet. Publish settings files let you prepare the session in advance so you can run scripts and background jobs unattended. However, not all services support publish settings files. For example, the AzureResourceManager module does not support publish settings files.When you run Get-AzurePublishSettingsFile, it opens your default browser and prompts you to sign into your Azure account, select a subscription, and select a file system location for the publish settings file. Then, it downloads the publish settings file for your subscription into the file that you selected.A "publish settings file" is an XML file with a .publishsettings file name extension. The file contains an encoded certificate that provides management credentials for your Azure subscriptions.Security Note: Publish settings files contains credentials that are used to administer your Azure subscriptions and services. If malicious users access your publish settings file, they can edit, create, and delete your Azure services. As a security best practice, save the file to a location in your Downloads or Documents folder and then delete it after using Import-AzurePublishSettingsFile cmdlet to import the settings. + + + + Get-AzurePublishSettingsFile + + Environment + + Specifies an Azure environment.An Azure environment an independent deployment of Microsoft Azure, such as AzureCloud for global Azure and AzureChinaCloud for Azure operated by 21Vianet in China. You can also create on-premises Azure environments by using Azure Pack and the WAPack cmdlets. For more information, see Azure Pack (http://www.microsoft.com/en-us/server-cloud/products/windows-azure-pack/default.aspx). + + String + + + Realm + + Specifies the organization in an organizational ID. For example, if you sign into Azure as admin@contoso.com, the value of the Realm parameter is contoso.com. Use this parameter when you use an organizational ID to sign into the Azure portal. This parameter is not required when you use a Microsoft account, such as an outlook.com or live.com account. + + String + + + PassThru + + Returns True ($true) if the command succeeds and False ($false) if it fails. By default, this cmdlet does not return any output. The PassThru parameter is typically used in conditional statements in functions and scripts. + + SwitchParameter + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + + + + + Environment + + Specifies an Azure environment.An Azure environment an independent deployment of Microsoft Azure, such as AzureCloud for global Azure and AzureChinaCloud for Azure operated by 21Vianet in China. You can also create on-premises Azure environments by using Azure Pack and the WAPack cmdlets. For more information, see Azure Pack (http://www.microsoft.com/en-us/server-cloud/products/windows-azure-pack/default.aspx). + + String + + String + + + + + + Realm + + Specifies the organization in an organizational ID. For example, if you sign into Azure as admin@contoso.com, the value of the Realm parameter is contoso.com. Use this parameter when you use an organizational ID to sign into the Azure portal. This parameter is not required when you use a Microsoft account, such as an outlook.com or live.com account. + + String + + String + + + + + + PassThru + + Returns True ($true) if the command succeeds and False ($false) if it fails. By default, this cmdlet does not return any output. The PassThru parameter is typically used in conditional statements in functions and scripts. + + SwitchParameter + + SwitchParameter + + + + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + String + + + + + + + + + None + + + + + + + + + + + + + None or System.Boolean + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Download a publish settings file -------------------------- + + PS C:\> + + PS C:\>Get-AzurePublishSettingsFile + + This command opens your default browser, connects to your Microsoft Azure account, and then downloads the .publishsettings file for your account. + + + + + + + + + + + + + + -------------------------- Example 2: Specify a realm -------------------------- + + PS C:\> + + PS C:\>Get-AzurePublishSettingsFile -Realm contoso.com -Passthru + + This command downloads the publish settings file for an account in the contoso.com domain. Use a command with the Realm parameter when you sign into Azure with an organizational account, instead of a Microsoft account. + + + + + + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=397622 + + + Add-AzureAccount + + + + Import-AzurePublishSettingsFile + + + + + + + + Get-AzureSubscription + + Gets Azure subscriptions in Azure account. + + + + + Get + AzureSubscription + + + + This is the Description section + The Get-AzureSubscription cmdlet gets the subscriptions in your Azure account. You can use this cmdlet to get information about the subscription and to pipe the subscription to other cmdlets.Get-AzureSubscription requires access to your Azure accounts. Before you run Get-AzureSubscription, you must run the Add-AzureAccount cmdlet or the cmdlets that download and install a publish settings file (Get-AzurePublishSettingsFile, Import-AzurePublishSettingsFile. + + + + Get-AzureSubscription + + SubscriptionName + + Gets only the specified subscription. Enter the subscription name. The value is case-sensitive. Wildcard characters are not supported. By default, Get-AzureSubscription gets all subscriptions in your Azure accounts. + + String + + + ExtendedDetails + + Returns quota information for the subscription, in addition to the standard settings. + + SwitchParameter + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + + + Get-AzureSubscription + + SubscriptionId + + Gets only the specified subscription. Enter the subscription Id. By default, Get-AzureSubscription gets all subscriptions in your Azure accounts. + + String + + + ExtendedDetails + + Returns quota information for the subscription, in addition to the standard settings. + + SwitchParameter + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + + + Get-AzureSubscription + + Default + + Gets only the default subscription, that is, the subscription designated as "default." By default, Get-AzureSubscription gets all subscriptions in your Azure accounts. To designate a subscription as "default," use the Default parameter of the Select-AzureSubscription cmdlet. + + SwitchParameter + + + ExtendedDetails + + Returns quota information for the subscription, in addition to the standard settings. + + SwitchParameter + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + + + Get-AzureSubscription + + Current + + Gets only the current subscription, that is, the subscription designated as "current." By default, Get-AzureSubscription gets all subscriptions in your Azure accounts. To designate a subscription as "current," use the Current parameter of the Select-AzureSubscription cmdlet. + + SwitchParameter + + + ExtendedDetails + + Returns quota information for the subscription, in addition to the standard settings. + + SwitchParameter + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + + + + + SubscriptionName + + Gets only the specified subscription. Enter the subscription name. The value is case-sensitive. Wildcard characters are not supported. By default, Get-AzureSubscription gets all subscriptions in your Azure accounts. + + String + + String + + + + + + ExtendedDetails + + Returns quota information for the subscription, in addition to the standard settings. + + SwitchParameter + + SwitchParameter + + + + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + String + + + + + + SubscriptionId + + Gets only the specified subscription. Enter the subscription Id. By default, Get-AzureSubscription gets all subscriptions in your Azure accounts. + + String + + String + + + + + + Default + + Gets only the default subscription, that is, the subscription designated as "default." By default, Get-AzureSubscription gets all subscriptions in your Azure accounts. To designate a subscription as "default," use the Default parameter of the Select-AzureSubscription cmdlet. + + SwitchParameter + + SwitchParameter + + + + + + Current + + Gets only the current subscription, that is, the subscription designated as "current." By default, Get-AzureSubscription gets all subscriptions in your Azure accounts. To designate a subscription as "current," use the Current parameter of the Select-AzureSubscription cmdlet. + + SwitchParameter + + SwitchParameter + + + + + + + + + None + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.Common.AzureSubscription + + + + + + + + + + + + + + + Get-AzureSubscription gets data from the subscription data file that the Add-AzureAccount and Import-PublishSettingsFile cmdlets create. + + + + + -------------------------- Example 1: Get all subscriptions -------------------------- + + PS C:\> + + PS C:\> C:\PS>Get-AzureSubscription + + This command gets all subscriptions in the account. + + + + + + + + + + + + + + -------------------------- Example 2: Get a subscription by name -------------------------- + + PS C:\> + + PS C:\> C:\PS>Get-AzureSubscription –SubscriptionName "MyProdSubscription" + + This command gets only the "MyProdSubsciption" subscription. + + + + + + + + + + + + + + -------------------------- Example 3: Get the default subscription -------------------------- + + PS C:\> + + PS C:\> C:\PS>(Get-AzureSubscription -Default).SubscriptionName + + This command gets only the name of the default subscription. The command first gets the subscription and then uses the dot method to get the SubscriptionName property of the subscription. + + + + + + + + + + + + + + -------------------------- Example 4: Get selected subscription properties -------------------------- + + PS C:\> + + PS C:\> C:\PS>Get-AzureSubscription -Current | Format-List -Property SubscriptionName, Certificate + + This command returns a list with the name and certificate of the current subscription. It uses a Get-AzureSubscription command to get the current subscription. Then it pipes the subscription to a Format-List command that displays the selected properties in a list. + + + + + + + + + + + + + + -------------------------- Example 5: Use an alternate subscription data file -------------------------- + + PS C:\> + + PS C:\> C:\PS>Get-AzureSubscription -SubscriptionDataFile "C:\Temp\MySubscriptions.xml" + + This command gets subscriptions from the C:\Temp\MySubscriptions.xml subscription data file. Use the SubscriptionDataFile parameter if you specified an alternate subscription data file when you ran the Add-AzureAccount or Import-PublishSettingsFile cmdlets. + + + + + + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=397623 + + + Add-AzureAccount + + + + Get-AzurePublishSettingsFile + + + + Import-AzurePublishSettingsFile + + + + Remove-AzureSubscription + + + + Set-AzureSubscription + + + + + + + + Import-AzurePublishSettingsFile + + Imports a publish settings file that lets you manage your Azure accounts in Windows PowerShell. + + + + + Import + AzurePublishSettingsFile + + + + This is the Description section + The Import-AzurePublishSettingsFile cmdlet imports a publish settings file (*.publishsettings) that contains information about your Azure accounts and saves a subscription data file on your computer. When the cmdlet completes, you can manage your Azure accounts in Windows PowerShell.Before running Import-AzurePublishSettingsFile, run Get-AzurePublishSettingsFile, which downloads and saves the publish settings file so you can import it.To make your Azure account available to Windows PowerShell, you can use a publish settings file or the Add-AzureAccount cmdlet. Publish settings files let you prepare the session in advance so you can run scripts and background jobs unattended. However, not all services support publish settings files. For example, the AzureResourceManager module does not support publish settings files.Security Note: Publish settings files contain a management certificate that is encoded, but not encrypted. If malicious users access your publish settings file, they might be able to edit, create, and delete your Azure services. As a security best practice, save the file to a location in your Downloads or Documents folder and then delete it after using Import-AzurePublishSettingsFile cmdlet to import the settings. + + + + Import-AzurePublishSettingsFile + + PublishSettingsFile + + Specifies the full path and filename of the publish settings file. This should match the file location that you entered when prompted by Get-AzurePublishSettingsFile. + + String + + + Environment + + Specifies the environment to use. This parameter is optional. If it is not provided, an environment will be chosen according to the endpoint in the publish settings file. + + String + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + + + + + PublishSettingsFile + + Specifies the full path and filename of the publish settings file. This should match the file location that you entered when prompted by Get-AzurePublishSettingsFile. + + String + + String + + + + + + Environment + + Specifies the environment to use. This parameter is optional. If it is not provided, an environment will be chosen according to the endpoint in the publish settings file. + + String + + String + + + + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + String + + + + + + + + + None + + + + + + + + + + + + + None + + + + + + + + + + + + + + + A "publish settings file" is an XML file with a .publishsettings file name extension. The file contains an encoded certificate that provides management credentials for your Azure subscriptions. After you import this file, delete it to avoid security risks. + + + + + -------------------------- Example 1 -------------------------- + + PS C:\> + + PS C:\>Import-AzurePublishSettingsFile –PublishSettingsFile C:\Temp\MyAccount.publishsettings + + This command imports the "C:\Temp\MyAccount.publishsettings" file. + + + + + + + + + + + + + + -------------------------- Example 2 -------------------------- + + PS C:\> + + PS C:\>Import-AzurePublishSettingsFile –PublishSettingsFile C:\Temp\MyAccount.publishsettings –SubscriptionDataFile C:\Subs\Subscriptions.xml + + This command imports the "C:\Temp\MyAccountName-date-credentials.publishsettings" file and then saves the subscription data file in C:\Subs\Subscriptions.xml. + + + When you use the SubscriptionDataFile parameter to save your subscription data file in an alternate location, be sure to use the SubscriptionDataFile parameter of cmdlets that use subscription data file, such as Select-AzureSubscription and Remove-AzureAccount. + + + + + + + + + + + -------------------------- Example 3 -------------------------- + + PS C:\> + + PS C:\>Import-AzurePublishSettingsFile –PublishSettingsFile C:\Temp\MyAccount.publishsettings -Environment AzureChinaCloud + + This command imports the "C:\Temp\MyAccount.publishsettings" file and sets the Azure environment of all imported subscriptions to be AzureChinaCloud. This will overwrite the endpoints defined in the publish settings file. + + + + + + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=397624 + + + How to Install and Configure Azure PowerShell + + + + Add-AzureAccount + + + + Get-AzurePublishSettingsFile + + + + + + + + Remove-AzureAccount + + Deletes an Azure account from Windows PowerShell. + + + + + Remove + AzureAccount + + + + The Remove-AzureAccount cmdlet deletes an Azure account and its subscriptions from the subscription data file in your roaming user profile. It does not delete the account from Microsoft Azure, or change the actual account in any way. + Using this cmdlet is a lot like logging out of your Azure account. And, if you want to log into the account again, use the Add-AzureAccount or Import-AzurePublishSettingsFile to add the account to Windows PowerShell again. + You can also use Remove-AzureAccount cmdlet to change the way the Azure PowerShell cmdlets sign into your Azure account. If your account has both a management certificate from Import-AzurePublishSettingsFile and an access token from Add-AzureAccount, the Azure PowerShell cmdlets use only the access token; they ignore the management certificate. To use the management certificate, run Remove-AzureAccount. When Remove-AzureAccount finds both a management certificate and an access token, it deletes only the access token, instead of deleting the account. The management certificate is still there, so account is still available to Windows PowerShell. + + + + Remove-AzureAccount + + Name + + Specifies the name of the account to remove. The parameter value is case-sensitive. Wildcard characters are not supported. + + String + + + Force + + Suppresses the confirmation prompt. By default, Remove-AzureAccount prompts you before removing the account from Windows PowerShell. + + SwitchParameter + + + PassThru + + Returns True ($true) if the operation succeeded and False ($false) if it failed. By default, the cmdlet does not return any output. + + SwitchParameter + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + + + Name + + Specifies the name of the account to remove. The parameter value is case-sensitive. Wildcard characters are not supported. + + String + + String + + + + + + Force + + Suppresses the confirmation prompt. By default, Remove-AzureAccount prompts you before removing the account from Windows PowerShell. + + SwitchParameter + + SwitchParameter + + + + + + PassThru + + Returns True ($true) if the operation succeeded and False ($false) if it failed. By default, the cmdlet does not return any output. + + SwitchParameter + + SwitchParameter + + + + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + String + + + + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + SwitchParameter + + + false + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + SwitchParameter + + + false + + + + + + None + + + + + + + + + + + + + None or System.Boolean + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Remove an account -------------------------- + + PS C:\> + + PS C:\>Remove-AzureAccount -Name admin@contoso.com + + This command removes the admin@contoso.com from your subscription data file. When the command completes, the account is no longer available to Windows PowerShell. + + + + + + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=397625 + + + Add-AzureAccount + + + + Get-AzureAccount + + + + + + + + Remove-AzureEnvironment + + Deletes an Azure environment from Windows PowerShell + + + + + Remove + AzureEnvironment + + + + This is the Description section + The Remove-AzureEnvironment cmdlet deletes an Azure environment from your roaming profile so Windows PowerShell can't find it. This cmdlet does not delete the environment from Microsoft Azure, or change the actual environment in any way.An Azure environment an independent deployment of Microsoft Azure, such as AzureCloud for global Azure and AzureChinaCloud for Azure operated by 21Vianet in China. You can also create on-premises Azure environments by using Azure Pack and the WAPack cmdlets. For more information, see Azure Pack (http://www.microsoft.com/en-us/server-cloud/products/windows-azure-pack/default.aspx). + + + + Remove-AzureEnvironment + + Name + + Specifies the name of the environment to remove. This parameter is required. This parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + + Force + + Suppresses the confirmation prompt. By default, Remove-AzureAccount prompts you before removing the account from Windows PowerShell. + + SwitchParameter + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + + + + + Name + + Specifies the name of the environment to remove. This parameter is required. This parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + String + + + + + + Force + + Suppresses the confirmation prompt. By default, Remove-AzureAccount prompts you before removing the account from Windows PowerShell. + + SwitchParameter + + SwitchParameter + + + + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + String + + + + + + PassThru + + Returns True ($true) if the command succeeds and False ($false) if it fails. By default, this cmdlet does not return any output. + + string + + string + + + + + + + + + None + + + + + + + + + + + + + None or System.Boolean + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Delete an environment -------------------------- + + PS C:\> + + PS C:\>Remove-AzureEnvironment -Name ContosoEnv + + This command deletes the ContosoEnv environment from Windows PowerShell. + + + + + + + + + + + + + + -------------------------- Example 2: Delete multiple environments -------------------------- + + PS C:\> + + PS C:\>Get-AzureEnvironment | Where-Object EnvironmentName -like "Contoso*" | ForEach-Object {Remove-AzureEnvironment -Name $_.EnvironmentName } + + This command deletes environments whose names begin with "Contoso" from Windows PowerShell. + + + + + + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=397626 + + + Add-AzureEnvironment + + + + Get-AzureEnvironment + + + + Set-AzureEnvironment + + + + + + + + Remove-AzureSubscription + + Deletes an Azure subscription from Windows PowerShell. + + + + + Remove + AzureSubscription + + + + The Remove-AzureSubscription cmdlet deletes an Azure subscription from your subscription data file so Windows PowerShell can't find it. This cmdlet does not delete the subscription from Microsoft Azure, or change the actual subscription in any way. + + + + Remove-AzureSubscription + + SubscriptionName + + Specifies the subscription name. This parameter is required. The parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + + Force + + Suppresses the confirmation prompt. By default, Remove-AzureSubscription prompts you before deleting the subscription. + + SwitchParameter + + + PassThru + + Returns True ($true) if the command succeeds and False ($false) if it fails. By default, this cmdlet does not return any output. + + SwitchParameter + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + Remove-AzureSubscription + + SubscriptionId + + Specifies the subscription Id. This parameter is required. + + String + + + Force + + Suppresses the confirmation prompt. By default, Remove-AzureSubscription prompts you before deleting the subscription. + + SwitchParameter + + + PassThru + + Returns True ($true) if the command succeeds and False ($false) if it fails. By default, this cmdlet does not return any output. + + SwitchParameter + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + + + SubscriptionName + + Specifies the subscription name. This parameter is required. The parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + String + + + + + + Force + + Suppresses the confirmation prompt. By default, Remove-AzureSubscription prompts you before deleting the subscription. + + SwitchParameter + + SwitchParameter + + + + + + PassThru + + Returns True ($true) if the command succeeds and False ($false) if it fails. By default, this cmdlet does not return any output. + + SwitchParameter + + SwitchParameter + + + + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + String + + + + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + SwitchParameter + + + false + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + SwitchParameter + + + false + + + SubscriptionId + + Specifies the subscription Id. This parameter is required. + + String + + String + + + + + + + + + None + + + + + + + + + + + + + None or System.Boolean + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Delete a subscription -------------------------- + + PS C:\> + + PS C:\> C:\PS> Remove-AzureSubscription -SubscriptionName Test + +Confirm +Are you sure you want to perform this action? +[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): + + This command deletes the "Test" subscription from the default subscription data file. + + + + + + + + + + + + + + -------------------------- Example 2: Delete from an alternate subscription data file -------------------------- + + PS C:\> + + PS C:\> C:\PS> Remove-AzureSubscription -SubscriptionName Test -SubscriptionDataFile C:\Subs\MySubscriptions.xml -Force + + This command deletes the Test subscription from the MySubscriptions.xml subscription data file. The command uses the Force parameter to suppress the confirmation prompt. + + + + + + + + + + + + + + -------------------------- Example 3: Delete a subscription in a script -------------------------- + + PS C:\> + + PS C:\> C:\PS> ...if (Remove-AzureSubscription -SubscriptionName Test -PassThru) {...} + + This command uses the Remove-AzureSubscription command in an If statement. It uses the PassThru parameter, which returns a Boolean value, to determine whether the script block in the If statement is executed. + + + + + + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=397627 + + + Get-AzureSubscription + + + + Select-AzureSubscription + + + + Set-AzureSubscription + + + + + + + + Select-AzureSubscription + + Changes the current and default Azure subscriptions + + + + + Select + AzureSubscription + + + + The Select-AzureSubscription cmdlet sets and clears the current and default Azure subscriptions. + The "current subscription" is the subscription that is used by default in the current Windows PowerShell session. The "default subscription" is used by default in all Windows PowerShell sessions. The "current subscription" label lets you specify a different subscription to be used by default for the current session without changing the "default subscription" for all other sessions. + The "default" subscription designation is saved in your subscription data file. The session-specific "current" designation is not saved. + + + + Select-AzureSubscription + + SubscriptionName + + Specifies the subscription to change. Enter the subscription name. This parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + + Account + + Specifies optionally the account to use with the subscription. This parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + + Current + + Sets the "current" subscription. Use the SubscriptionName parameter to identify the subscription.The "current subscription" is the subscription that is used by default in the current Windows PowerShell session. + + SwitchParameter + + + PassThru + + Returns True ($true) when the operation succeeds and False ($false) when it fails. By default, this cmdlet does not return any output. + + SwitchParameter + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + + + Select-AzureSubscription + + SubscriptionName + + Specifies the subscription to change. Enter the subscription name. This parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + + Account + + Specifies optionally the account to use with the subscription. This parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + + Default + + Sets the "default" subscription. Use the SubscriptionName parameter to identify the subscription.The "default subscription" is the subscription that is used by default in the all Windows PowerShell sessions, unless a different subscription is set to "current". + + SwitchParameter + + + PassThru + + Returns True ($true) when the operation succeeds and False ($false) when it fails. By default, this cmdlet does not return any output. + + SwitchParameter + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + + + Select-AzureSubscription + + SubscriptionId + + Specifies the subscription Id to change. Enter the subscription Id. + + String + + + Account + + Specifies optionally the account to use with the subscription. This parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + + Current + + Sets the "current" subscription. Use the SubscriptionName parameter to identify the subscription.The "current subscription" is the subscription that is used by default in the current Windows PowerShell session. + + SwitchParameter + + + PassThru + + Returns True ($true) when the operation succeeds and False ($false) when it fails. By default, this cmdlet does not return any output. + + SwitchParameter + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + + + Select-AzureSubscription + + SubscriptionId + + Specifies the subscription Id to change. Enter the subscription Id. + + String + + + Account + + Specifies optionally the account to use with the subscription. This parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + + Default + + Sets the "default" subscription. Use the SubscriptionName parameter to identify the subscription.The "default subscription" is the subscription that is used by default in the all Windows PowerShell sessions, unless a different subscription is set to "current". + + SwitchParameter + + + PassThru + + Returns True ($true) when the operation succeeds and False ($false) when it fails. By default, this cmdlet does not return any output. + + SwitchParameter + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + + + Select-AzureSubscription + + Account + + Specifies optionally the account to use with the subscription. This parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + + NoCurrent + + Clears the "current" subscription setting. When no subscription is set to "current," the Azure PowerShell cmdlets use the default subscription. + + SwitchParameter + + + PassThru + + Returns True ($true) when the operation succeeds and False ($false) when it fails. By default, this cmdlet does not return any output. + + SwitchParameter + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + + + Select-AzureSubscription + + Account + + Specifies optionally the account to use with the subscription. This parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + + NoDefault + + Clears the "default" subscription setting. If there is no default subscription, the current subscription is used by default. When there is no current or default subscription, and you do not identify a subscription, commands that require a subscription fail. + + SwitchParameter + + + PassThru + + Returns True ($true) when the operation succeeds and False ($false) when it fails. By default, this cmdlet does not return any output. + + SwitchParameter + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + + + + + SubscriptionName + + Specifies the subscription to change. Enter the subscription name. This parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + String + + + + + + Account + + Specifies optionally the account to use with the subscription. This parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + String + + + + + + Current + + Sets the "current" subscription. Use the SubscriptionName parameter to identify the subscription.The "current subscription" is the subscription that is used by default in the current Windows PowerShell session. + + SwitchParameter + + SwitchParameter + + + + + + PassThru + + Returns True ($true) when the operation succeeds and False ($false) when it fails. By default, this cmdlet does not return any output. + + SwitchParameter + + SwitchParameter + + + + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + String + + + + + + Default + + Sets the "default" subscription. Use the SubscriptionName parameter to identify the subscription.The "default subscription" is the subscription that is used by default in the all Windows PowerShell sessions, unless a different subscription is set to "current". + + SwitchParameter + + SwitchParameter + + + + + + SubscriptionId + + Specifies the subscription Id to change. Enter the subscription Id. + + String + + String + + + + + + NoCurrent + + Clears the "current" subscription setting. When no subscription is set to "current," the Azure PowerShell cmdlets use the default subscription. + + SwitchParameter + + SwitchParameter + + + + + + NoDefault + + Clears the "default" subscription setting. If there is no default subscription, the current subscription is used by default. When there is no current or default subscription, and you do not identify a subscription, commands that require a subscription fail. + + SwitchParameter + + SwitchParameter + + + + + + + + + None + + + + + + + + + + + + + None or AzureSubscription if PassThru + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Set the current subscription -------------------------- + + PS C:\> + + PS C:\> C:\PS> Select-AzureSubscription -Current -SubscriptionName ContosoEngineering + + This command makes "ContosoEngineering" the current subscription. + + + + + + + + + + + + + + -------------------------- Example 2: Set the current subscription with account -------------------------- + + PS C:\> + + PS C:\> C:\PS> Select-AzureSubscription -Current -SubscriptionName ContosoEngineering -Account user@mail.contoso.com + + This command makes "ContosoEngineering" the current subscription and user@mail.contoso.com the current user. + + + + + + + + + + + + + + -------------------------- Example 3: Set the default description -------------------------- + + PS C:\> + + PS C:\> C:\PS> Select-AzureSubscription -Default -SubscriptionName ContosoFinance -SubscriptionDataFile "C:\subs\MySubscriptions.xml" + + This command changes the default subscription to "ContosoFinance." It saves the setting in the Subscriptions.xml subscription data file, instead of the default subscription data file. + + + + + + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=397628 + + + Get-AzureSubscription + + + + Remove-AzureSubscription + + + + Set-AzureSubscription + + + + + + + + Set-AzureEnvironment + + Changes the properties of an Azure environment + + + + + Set + AzureEnvironment + + + + This is the Description section + The Set-AzureEnvironment cmdlet changes the properties of an Azure environment. It returns an object that represents the environment with its new property values. Use the Name parameter to identify the environment and the other parameters to change property values. You cannot use Set-AzureEnvironment to change the name of an Azure environment.An Azure environment an independent deployment of Microsoft Azure, such as AzureCloud for global Azure and AzureChinaCloud for Azure operated by 21Vianet in China. You can also create on-premises Azure environments by using Azure Pack and the WAPack cmdlets. For more information, see Azure Pack (http://www.microsoft.com/en-us/server-cloud/products/windows-azure-pack/default.aspx).NOTE: Do not change the properties of the AzureCloud or AzureChinaCloud environments. Use this cmdlet to change the values of private environments that you create. + + + + Set-AzureEnvironment + + Name + + Identifies the environment that is being changed. This parameter is required. The parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + + PublishSettingsFileUrl + + Changes the URL for publish settings files in the specified environment. An Azure publish settings file is an XML file that contains information about your account and a management certificate that allows Windows PowerShell to sign into your Azure account on your behalf. + + String + + + ServiceEndpoint + + Changes the URL of the Azure service endpoint in the specified environment. The Azure service endpoint determines whether your application is managed by the global Azure platform, Azure operated by 21Vianet in China, or a private Azure installation. + + String + + + ManagementPortalUrl + + Changes the URL of the Azure Management Portal to the specified value. + + String + + + StorageEndpoint + + Changes the default endpoint of storage services in the specified environment. + + String + + + ActiveDirectoryEndpoint + + Changes the endpoint for Azure Active Directory authentication to the specified value. + + String + + + ResourceManagerEndpoint + + Changes the endpoint for Azure Resource Manager data, including data about resource groups associated with the account. For more information about Azure Resource Manager, see Azure Resource Manager Cmdlets (http://go.microsoft.com/fwlink/?LinkID=394765) and Using Windows PowerShell with Resource Manager (http://go.microsoft.com/fwlink/?LinkID=394767). + + String + + + GalleryEndpoint + + Changes the endpoint for the Azure Resource Manager gallery to the specified value. The gallery endpoint is the location for resource group gallery templates. For more information about Azure resource groups and gallery templates, see the help topic for Get-AzureResourceGroupGalleryTemplate. + + String + + + ActiveDirectoryServiceEndpointResourceId + + Specifies the resource ID of a management API whose access is managed by Azure Active Directory. + + String + + + GraphEndpoint + + Changes the endpoint for Azure Active Directory Graph API to the specified value. + + String + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + + + + + Name + + Identifies the environment that is being changed. This parameter is required. The parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + String + + + + + + PublishSettingsFileUrl + + Changes the URL for publish settings files in the specified environment. An Azure publish settings file is an XML file that contains information about your account and a management certificate that allows Windows PowerShell to sign into your Azure account on your behalf. + + String + + String + + + + + + ServiceEndpoint + + Changes the URL of the Azure service endpoint in the specified environment. The Azure service endpoint determines whether your application is managed by the global Azure platform, Azure operated by 21Vianet in China, or a private Azure installation. + + String + + String + + + + + + ManagementPortalUrl + + Changes the URL of the Azure Management Portal to the specified value. + + String + + String + + + + + + StorageEndpoint + + Changes the default endpoint of storage services in the specified environment. + + String + + String + + + + + + ActiveDirectoryEndpoint + + Changes the endpoint for Azure Active Directory authentication to the specified value. + + String + + String + + + + + + ResourceManagerEndpoint + + Changes the endpoint for Azure Resource Manager data, including data about resource groups associated with the account. For more information about Azure Resource Manager, see Azure Resource Manager Cmdlets (http://go.microsoft.com/fwlink/?LinkID=394765) and Using Windows PowerShell with Resource Manager (http://go.microsoft.com/fwlink/?LinkID=394767). + + String + + String + + + + + + GalleryEndpoint + + Changes the endpoint for the Azure Resource Manager gallery to the specified value. The gallery endpoint is the location for resource group gallery templates. For more information about Azure resource groups and gallery templates, see the help topic for Get-AzureResourceGroupGalleryTemplate. + + String + + String + + + + + + ActiveDirectoryServiceEndpointResourceId + + Specifies the resource ID of a management API whose access is managed by Azure Active Directory. + + String + + String + + + + + + GraphEndpoint + + Changes the endpoint for Azure Active Directory Graph API to the specified value. + + String + + String + + + + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + String + + + + + + + + + None + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.Common.WindowsAzureEnvironment + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Change environment properties -------------------------- + + PS C:\> + + PS C:\>Set-AzureEnvironment -Name ContosoEnv -PublishSettingsFileUrl "https://contoso.com" -StorageEndpoint "contoso.com" -GraphEndpoint "https://contoso.com/fwlink/?LinkID=104" + + This command changes the values of the PublishSettingsFileUrl, StorageEndpoint, and GraphEndpoint properties of the ContosoEnv environment. + + + + + + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=397629 + + + Add-AzureEnvironment + + + + Get-AzureEnvironment + + + + Remove-AzureEnvironment + + + + + + + + Set-AzureSubscription + + Creates or changes an Azure subscription + + + + + Set + AzureSubscription + + + + The Set-AzureSubscription cmdlet establishes and changes the properties of an Azure subscription. You can use this cmdlet to create a new subscription or change the properties of an existing subscription. + To create a new subscription, select a unique name for the value of the SubscriptionName parameter. To change an existing subscription, use the SubscriptionName parameter to identify the subscription. + This cmdlet changes the data in the subscription data file that you create when you use the Add-AzureAccount or Import-AzurePublishSettingsFile cmdlet to add an Azure account to Windows PowerShell. + + + + Set-AzureSubscription + + SubscriptionName + + Specifies the subscription name. If an Azure subscription with this name does not exist, this parameter creates a new subscription with the specified name. If the subscription exists, this parameter identifies the subscription and uses the other property values to change it.To get the names of existing Azure subscriptions, use the Get-AzureSubscription cmdlet. + + String + + + SubscriptionId + + Specifies the ID of the subscription. To get the subscription ID of an existing Azure subscription, use the Get-AzureSubscription cmdlet. + + String + + + Certificate + + Specifies a management certificate for the subscription. Management certificates are X.509 certificates that are saved as .cer files and uploaded to the Azure Management Portal. The certificate, including its private key, must be installed on the local computer, either in the current user's personal certificate store, or the local machine’s personal certificate store. + + X509Certificate2 + + + ServiceEndpoint + + Sets or changes the custom service endpoint for the management service to the specified value.The service endpoint is the Azure management API endpoint in the Azure environment. You can create custom service endpoints and set a different service endpoint for each subscription. + + String + + + ResourceManagerEndpoint + + Sets or changes the endpoint for Azure Resource Manager data to the specified value.For more information about Azure Resource Manager, see Azure Resource Manager Cmdlets (http://go.microsoft.com/fwlink/?LinkID=394765) and Using Windows PowerShell with Resource Manager (http://go.microsoft.com/fwlink/?LinkID=394767). + + String + + + CurrentStorageAccountName + + Designates the specified storage account as the "current" storage account for the subscription. Enter the storage account name. The parameter value is case-sensitive. Wildcard characters are not permitted.This parameter does not create a storage account; it just associates the storage account with the subscription. To create a storage account, use the New-AzureStorageAccount cmdlet. + + String + + + Environment + + Specifies the environment name. + + String + + + PassThru + + Returns True ($true) if the operation succeeds and False ($false) if it fails. By default, this cmdlet does not return any output. + + SwitchParameter + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + + + Set-AzureSubscription + + SubscriptionName + + Specifies the subscription name. If an Azure subscription with this name does not exist, this parameter creates a new subscription with the specified name. If the subscription exists, this parameter identifies the subscription and uses the other property values to change it.To get the names of existing Azure subscriptions, use the Get-AzureSubscription cmdlet. + + String + + + Certificate + + Specifies a management certificate for the subscription. Management certificates are X.509 certificates that are saved as .cer files and uploaded to the Azure Management Portal. The certificate, including its private key, must be installed on the local computer, either in the current user's personal certificate store, or the local machine’s personal certificate store. + + X509Certificate2 + + + ServiceEndpoint + + Sets or changes the custom service endpoint for the management service to the specified value.The service endpoint is the Azure management API endpoint in the Azure environment. You can create custom service endpoints and set a different service endpoint for each subscription. + + String + + + ResourceManagerEndpoint + + Sets or changes the endpoint for Azure Resource Manager data to the specified value.For more information about Azure Resource Manager, see Azure Resource Manager Cmdlets (http://go.microsoft.com/fwlink/?LinkID=394765) and Using Windows PowerShell with Resource Manager (http://go.microsoft.com/fwlink/?LinkID=394767). + + String + + + CurrentStorageAccountName + + Designates the specified storage account as the "current" storage account for the subscription. Enter the storage account name. The parameter value is case-sensitive. Wildcard characters are not permitted.This parameter does not create a storage account; it just associates the storage account with the subscription. To create a storage account, use the New-AzureStorageAccount cmdlet. + + String + + + Environment + + Specifies the environment name. + + String + + + PassThru + + Returns True ($true) if the operation succeeds and False ($false) if it fails. By default, this cmdlet does not return any output. + + SwitchParameter + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + + + Set-AzureSubscription + + SubscriptionId + + Specifies the ID of the subscription. To get the subscription ID of an existing Azure subscription, use the Get-AzureSubscription cmdlet. + + String + + + Certificate + + Specifies a management certificate for the subscription. Management certificates are X.509 certificates that are saved as .cer files and uploaded to the Azure Management Portal. The certificate, including its private key, must be installed on the local computer, either in the current user's personal certificate store, or the local machine’s personal certificate store. + + X509Certificate2 + + + ServiceEndpoint + + Sets or changes the custom service endpoint for the management service to the specified value.The service endpoint is the Azure management API endpoint in the Azure environment. You can create custom service endpoints and set a different service endpoint for each subscription. + + String + + + ResourceManagerEndpoint + + Sets or changes the endpoint for Azure Resource Manager data to the specified value.For more information about Azure Resource Manager, see Azure Resource Manager Cmdlets (http://go.microsoft.com/fwlink/?LinkID=394765) and Using Windows PowerShell with Resource Manager (http://go.microsoft.com/fwlink/?LinkID=394767). + + String + + + CurrentStorageAccountName + + Designates the specified storage account as the "current" storage account for the subscription. Enter the storage account name. The parameter value is case-sensitive. Wildcard characters are not permitted.This parameter does not create a storage account; it just associates the storage account with the subscription. To create a storage account, use the New-AzureStorageAccount cmdlet. + + String + + + Environment + + Specifies the environment name. + + String + + + PassThru + + Returns True ($true) if the operation succeeds and False ($false) if it fails. By default, this cmdlet does not return any output. + + SwitchParameter + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + + + + + SubscriptionName + + Specifies the subscription name. If an Azure subscription with this name does not exist, this parameter creates a new subscription with the specified name. If the subscription exists, this parameter identifies the subscription and uses the other property values to change it.To get the names of existing Azure subscriptions, use the Get-AzureSubscription cmdlet. + + String + + String + + + + + + SubscriptionId + + Specifies the ID of the subscription. To get the subscription ID of an existing Azure subscription, use the Get-AzureSubscription cmdlet. + + String + + String + + + + + + Certificate + + Specifies a management certificate for the subscription. Management certificates are X.509 certificates that are saved as .cer files and uploaded to the Azure Management Portal. The certificate, including its private key, must be installed on the local computer, either in the current user's personal certificate store, or the local machine’s personal certificate store. + + X509Certificate2 + + X509Certificate2 + + + + + + ServiceEndpoint + + Sets or changes the custom service endpoint for the management service to the specified value.The service endpoint is the Azure management API endpoint in the Azure environment. You can create custom service endpoints and set a different service endpoint for each subscription. + + String + + String + + + + + + ResourceManagerEndpoint + + Sets or changes the endpoint for Azure Resource Manager data to the specified value.For more information about Azure Resource Manager, see Azure Resource Manager Cmdlets (http://go.microsoft.com/fwlink/?LinkID=394765) and Using Windows PowerShell with Resource Manager (http://go.microsoft.com/fwlink/?LinkID=394767). + + String + + String + + + + + + CurrentStorageAccountName + + Designates the specified storage account as the "current" storage account for the subscription. Enter the storage account name. The parameter value is case-sensitive. Wildcard characters are not permitted.This parameter does not create a storage account; it just associates the storage account with the subscription. To create a storage account, use the New-AzureStorageAccount cmdlet. + + String + + String + + + + + + Environment + + Specifies the environment name. + + String + + String + + + + + + PassThru + + Returns True ($true) if the operation succeeds and False ($false) if it fails. By default, this cmdlet does not return any output. + + SwitchParameter + + SwitchParameter + + + + + + SubscriptionDataFile + + Specifies the path to a profile file. This parameter is optional. If it is not provided, default file in the user's profile is used. + + String + + String + + + + + + + + + None + + + + + + + + + + + + + None or System.Boolean + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Create a new subscription -------------------------- + + PS C:\> + + PS C:\>$thumbprint = <Certificate Thumbprint> +PS C:\>$myCert = Get-Item cert:\\CurrentUser\My\$thumbprint +PS C:\>Set-AzureSubscription -SubscriptionName ContosotTest -Certificate $myCert -SubscriptionID 12345 + + These commands create the ContosoTest subscription in the default subscription data file. The commands add a management certificate and subscription ID for the new subscription. + + + When you run the Set-AzureSubscription command, the cmdlet looks for a subscription with the name "ContosoTest". If it doesn't find one, it creates a new subscription with the specified values. + + + + + + + + + + + -------------------------- Example 2: Change an existing subscription -------------------------- + + PS C:\> + + PS C:\> C:\PS> $thumbprint = <Thumbprint-2> +C:\PS> $differentCert = Get-Item cert:\\CurrentUser\My\$thumbprint +C:\PS> Set-AzureSubscription –SubscriptionName ContosoEngineering -Certificate $differentCert + + These commands are very similar to the commands in Example 1. However, because the SubscriptionName parameter now identifies an existing subscription, Set-AzureSubscription uses the remaining parameters to change the values of the existing subscription rather than creating a new subscription + + + + + + + + + + + + + + -------------------------- Example 2: Change the service endpoint -------------------------- + + PS C:\> + + PS C:\> C:\PS> Set-AzureSubscription –SubscriptionName ContosoEngineering -ServiceEndpoint "https://management.core.contoso.com" + + This command adds or changes a custom service endpoint for the ContosoEngineering subscription. + + + + + + + + + + + + + + -------------------------- Example 3: Clear property values -------------------------- + + PS C:\> + + PS C:\> C:\PS> Set-AzureSubscription –SubscriptionName ContosoEngineering –Certificate $null -ResourceManagerEndpoint $null + + This command sets the values of the Certificate and ResourceManagerEndpoint properties to null ($null). This clears the values of those properties without changing other settings. + + + + + + + + + + + + + + -------------------------- Example 4: Use an alternate subscription data file -------------------------- + + PS C:\> + + PS C:\> C:\PS> Set-AzureSubscription -SubscriptionName ContosoFinance -SubscriptionDataFile = C:\Azure\SubscriptionData.xml - CurrentStorageAccount ContosoStorage01 + + This command changes the current storage account of the ContosoFinance subscription to ContosoStorage01. The command uses the SubscriptionDataFile parameter to change the data in the C:\Azure\SubscriptionData.xml subscription data file. By default, Set-AzureSubscription uses the default subscription data file in your roaming user profile. + + + + + + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=397630 + + + Add-AzureAccount + + + + Get-AzureSubscription + + + + Import-AzurePublishSettingsFile + + + + Remove-AzureSubscription + + + + Select-AzureSubscription + + + + + + + + Switch-AzureMode + + Switches between the Azure and Azure Resource Manager modules + + + + + Switch + AzureMode + + + + This is the Description section + The Switch-AzureMode cmdlet switches between the Azure and Azure Resource Manager (AzureResourceManager) modules. These modules are not designed to be used in the same session. To determine which module is in your current session, use the Get-Module cmdlet.NOTE: The AzureResourceManager module is currently in preview. It might not provide the same management capabilities as the Azure module. Beginning in version 0.8,0, the Azure PowerShell installation includes both Azure modules and Azure Profile, a module of commands common to both modules. When you use the Azure PowerShell cmdlets, the Azure and Azure Profile modules are imported into the session by default. To remove the Azure module from the session and import the Azure Resource Manager module, use Switch-AzureMode. And, to switch back to the Azure module, just use Switch-AzureMode again. The Azure module includes cmdlets that help you to manage your Azure account in the traditional way. The cmdlets get, create, change, and remove individual resources such as storage accounts, virtual machines, SQL databases, web sites, media services, and cloud services.The new Azure Resource Manager module lets you manage your resources in an entirely new way. Instead of creating individual resources and trying to use them together, begin by imagining the service you want to create, such as a web portal, a blog, a photo gallery, a commerce site, or a wiki. Select a resource group template, including one of dozens in the Azure template gallery, or create your own. Each template provides a model of a complex service, complete with the resources that you need to support the service. Then use the template to create a resource group and its resources, and deploy and manage the related resources as a unit.You can use Switch-AzureMode to switch between Azure modules as often as you like. To set an Azure module as the default for all sessions, use the Global parameter when switching between modes. + + + + Switch-AzureMode + + Name + + Switches to the specified module. To switch to the Azure Resource Manager module, type AzureResourceManager. To switch to the Azure module, type AzureServiceManagement. This parameter is required. + + String + + + Global + + Switches all Windows PowerShell session to the specified Azure module. Use this parameter to save your module selection for other sessions. This parameter is optional. By default, the switch affects only the current session.This parameter requires administrator permissions. To use this parameter, start Windows PowerShell with the "Run as administrator" option. + + SwitchParameter + + + + + + Name + + Switches to the specified module. To switch to the Azure Resource Manager module, type AzureResourceManager. To switch to the Azure module, type AzureServiceManagement. This parameter is required. + + String + + String + + + + + + Global + + Switches all Windows PowerShell session to the specified Azure module. Use this parameter to save your module selection for other sessions. This parameter is optional. By default, the switch affects only the current session.This parameter requires administrator permissions. To use this parameter, start Windows PowerShell with the "Run as administrator" option. + + SwitchParameter + + SwitchParameter + + + + + + + + + None + + + + + + + + + + + + + None + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Switch to the Azure Resource Manager module -------------------------- + + PS C:\> + + PS C:\>Switch-AzureMode -Name AzureResourceManager +PS C:\>Switch-AzureMode -Name AzureServiceManagement + + This command shows you how to switch between modules. The first command uses the Switch-AzureMode cmdlet to switch to the Azure Resource Manager module. The second command uses the Switch-AzureMode cmdlet to switch back to the Azure module. + + + When you import either module, the AzureProfile module, which includes commands common to both modules, including Add-AzureAccount, Get-AzureSubscription, and Switch-AzureMode, is imported, too. + + + + + + + + + + + -------------------------- Example 2: Switch all sessions to the Azure Resource Manager module -------------------------- + + PS C:\> + + PS C:\>Switch-AzureMode -Name AzureResourceManager -Global + + This command uses the Global parameter of Switch-AzureMode to switch all Microsoft Azure PowerShell sessions to the Azure Resource Manager module. If you close this session and open an new one, the Azure Resource Manager module is imported by default. + + + The Global parameter requires administrator permissions. To run this command, start Windows PowerShell with the "Run as administrator" option. + + + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=394398 + + + Azure Resource Manager Cmdlets + + + + Azure Service Management Cmdlets + + + + Azure Profile Cmdlets + + + + + \ No newline at end of file diff --git a/src/Common/Commands.Profile/Microsoft.WindowsAzure.Commands.Profile.format.ps1xml b/src/Common/Commands.Profile/Microsoft.WindowsAzure.Commands.Profile.format.ps1xml new file mode 100644 index 000000000000..46d19326ea34 --- /dev/null +++ b/src/Common/Commands.Profile/Microsoft.WindowsAzure.Commands.Profile.format.ps1xml @@ -0,0 +1,48 @@ + + + + + Microsoft.WindowsAzure.Commands.Common.Models.PSAzureAccount + + Microsoft.WindowsAzure.Commands.Common.Models.PSAzureAccount + + + + + + 30 + + + + 10 + + + + + + + + + + + + + + Id + + + Type + + + Subscriptions + + + Tenants + + + + + + + + diff --git a/src/Common/Commands.Profile/Models/PsAzureSubscription.cs b/src/Common/Commands.Profile/Models/PsAzureSubscription.cs new file mode 100644 index 000000000000..d2ecabeb46df --- /dev/null +++ b/src/Common/Commands.Profile/Models/PsAzureSubscription.cs @@ -0,0 +1,31 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Common.Models; + +namespace Microsoft.WindowsAzure.Commands.Profile.Models +{ + public class PSAzureSubscription + { + public string SubscriptionId { get; set; } + public string SubscriptionName { get; set; } + public string Environment { get; set; } + public string SupportedModes { get; set; } + public string DefaultAccount { get; set; } + public AzureAccount[] Accounts { get; set; } + public bool IsDefault { get; set; } + public bool IsCurrent { get; set; } + public string CurrentStorageAccountName { get; set; } + } +} diff --git a/src/Common/Commands.Profile/Models/PsAzureSubscriptionExtended.cs b/src/Common/Commands.Profile/Models/PsAzureSubscriptionExtended.cs new file mode 100644 index 000000000000..96985161b4c7 --- /dev/null +++ b/src/Common/Commands.Profile/Models/PsAzureSubscriptionExtended.cs @@ -0,0 +1,59 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Security.Cryptography.X509Certificates; +using Microsoft.WindowsAzure.Commands.Common.Models; + +namespace Microsoft.WindowsAzure.Commands.Profile.Models +{ + public class PSAzureSubscriptionExtended : PSAzureSubscription + { + public PSAzureSubscriptionExtended() { } + + public PSAzureSubscriptionExtended(PSAzureSubscription subscription) + { + base.SubscriptionId = subscription.SubscriptionId; + base.SubscriptionName = subscription.SubscriptionName; + base.SupportedModes = subscription.SupportedModes; + base.Accounts = subscription.Accounts; + base.IsDefault = subscription.IsDefault; + base.IsCurrent = subscription.IsCurrent; + } + public string ActiveDirectoryUserId { get; set; } + public AzureAccount Account { get; set; } + public X509Certificate2 Certificate { get; set; } + public string AccountAdminLiveEmailId { get; set; } + public int CurrentCoreCount { get; set; } + public int CurrentHostedServices { get; set; } + public int CurrentDnsServers { get; set; } + public int CurrentLocalNetworkSites { get; set; } + public int CurrentVirtualNetworkSites { get; set; } + public int CurrentStorageAccounts { get; set; } + public int MaxCoreCount { get; set; } + public int MaxDnsServers { get; set; } + public int MaxHostedServices { get; set; } + public int MaxLocalNetworkSites { get; set; } + public int MaxVirtualNetworkSites { get; set; } + public int MaxStorageAccounts { get; set; } + public string ServiceAdminLiveEmailId { get; set; } + public string SubscriptionRealName { get; set; } + public string SubscriptionStatus { get; set; } + public string OperationDescription { get; set; } + public string OperationId { get; set; } + public string OperationStatus { get; set; } + public string ServiceEndpoint { get; set; } + public string ResourceManagerEndpoint { get; set; } + public string GalleryEndpoint { get; set; } + } +} diff --git a/src/Common/Commands.Profile/ProfileDoctor/ClearAzureProfile.cs b/src/Common/Commands.Profile/ProfileDoctor/ClearAzureProfile.cs new file mode 100644 index 000000000000..f751d1dbba65 --- /dev/null +++ b/src/Common/Commands.Profile/ProfileDoctor/ClearAzureProfile.cs @@ -0,0 +1,51 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Profile; + +namespace Microsoft.WindowsAzure.Commands.Profile +{ + + + /// + /// Removes a Microsoft Azure environment. + /// + [Cmdlet(VerbsCommon.Clear, "AzureProfile"), OutputType(typeof(AzureEnvironment))] + public class ClearAzureProfileCommand : SubscriptionCmdletBase + { + [Parameter(Position = 1, HelpMessage = "Force deletion of AzureProfile without prompt")] + public SwitchParameter Force { get; set; } + + public ClearAzureProfileCommand() : base(true) { } + + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + ConfirmAction( + Force.IsPresent, Resources.RemoveProfileConfirmation, + Resources.RemoveProfileMessage, + "AzureProfile", + RemoveProfileProcess); + } + + public void RemoveProfileProcess() + { + ProfileClient.ClearAll(); + } + } +} diff --git a/src/Common/Commands.Profile/Properties/AssemblyInfo.cs b/src/Common/Commands.Profile/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..5d990696d836 --- /dev/null +++ b/src/Common/Commands.Profile/Properties/AssemblyInfo.cs @@ -0,0 +1,57 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft Azure Powershell")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("03519c3b-67ba-4972-8054-f3cc3279d603")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] +[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] +#if SIGN +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.CloudService.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.SqlDatabase.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +#else +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.Test")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.CloudService.Test")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.SqlDatabase.Test")] +#endif +[assembly: CLSCompliant(false)] diff --git a/src/Common/Commands.Profile/Subscription/GetAzurePublishSettingsFile.cs b/src/Common/Commands.Profile/Subscription/GetAzurePublishSettingsFile.cs new file mode 100644 index 000000000000..14c82dba2d56 --- /dev/null +++ b/src/Common/Commands.Profile/Subscription/GetAzurePublishSettingsFile.cs @@ -0,0 +1,59 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Profile; + +namespace Microsoft.WindowsAzure.Commands.Profile +{ + + /// + /// Get publish profile + /// + [Cmdlet(VerbsCommon.Get, "AzurePublishSettingsFile"), OutputType(typeof(bool))] + public class GetAzurePublishSettingsFileCommand : SubscriptionCmdletBase + { + [Parameter(Position = 0, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The targeted Microsoft Azure environment.")] + [ValidateNotNullOrEmpty] + public string Environment { get; set; } + + [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "Realm of the account.")] + [ValidateNotNullOrEmpty] + public string Realm { get; set; } + + [Parameter(Position = 2, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "Returns true in success.")] + public SwitchParameter PassThru { get; set; } + + public GetAzurePublishSettingsFileCommand() : base(false) { } + + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + AzureEnvironment environment = ProfileClient.GetEnvironmentOrDefault(Environment); + string url = environment.GetPublishSettingsFileUrlWithRealm(Realm); + GeneralUtilities.LaunchWebPage(url); + + if (PassThru) + { + WriteObject(true); + } + } + } +} \ No newline at end of file diff --git a/src/Common/Commands.Profile/Subscription/GetAzureSubscription.cs b/src/Common/Commands.Profile/Subscription/GetAzureSubscription.cs new file mode 100644 index 000000000000..568efb8365a6 --- /dev/null +++ b/src/Common/Commands.Profile/Subscription/GetAzureSubscription.cs @@ -0,0 +1,196 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.Profile.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.Authentication; +using Microsoft.WindowsAzure.Commands.Utilities.Profile; +using Microsoft.WindowsAzure.Management; + +namespace Microsoft.WindowsAzure.Commands.Profile +{ + /// + /// Implementation of the get-azuresubscription cmdlet that works against + /// the AzureProfile layer. + /// + [Cmdlet(VerbsCommon.Get, "AzureSubscription", DefaultParameterSetName = "ByName")] + [OutputType(typeof(AzureSubscription))] + public class GetAzureSubscriptionCommand : SubscriptionCmdletBase + { + public GetAzureSubscriptionCommand() : base(true) + { + + } + + [Parameter(Position = 0, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the subscription", ParameterSetName = "ByName")] + [ValidateNotNullOrEmpty] + [Alias("Name")] + public string SubscriptionName { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "ID of the subscription", ParameterSetName = "ById")] + [ValidateNotNullOrEmpty] + [Alias("Id")] + public string SubscriptionId { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Retrieves the default subscription", ParameterSetName = "Default")] + public SwitchParameter Default { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Retrieves the current subscription", ParameterSetName = "Current")] + public SwitchParameter Current { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Retrieves extended details about subscription such as quota and usage")] + public SwitchParameter ExtendedDetails { get; set; } + + public override void ExecuteCmdlet() + { + switch (ParameterSetName) + { + case "ByName": + WriteSubscriptions(ProfileClient.RefreshSubscriptions(AzureSession.CurrentContext.Environment) + .Where(s => SubscriptionName == null || s.Name.Equals(SubscriptionName, StringComparison.InvariantCultureIgnoreCase))); + break; + case "ById": + WriteSubscriptions(ProfileClient.GetSubscription(new Guid(SubscriptionId))); + break; + case "Default": + GetDefault(); + break; + case "Current": + GetCurrent(); + break; + } + } + + public void GetDefault() + { + var defaultSubscription = ProfileClient.Profile.DefaultSubscription; + + if (defaultSubscription == null) + { + WriteError(new ErrorRecord( + new InvalidOperationException(Resources.InvalidDefaultSubscription), + string.Empty, + ErrorCategory.InvalidData, null)); + } + else + { + WriteSubscriptions(defaultSubscription); + } + } + + public void GetCurrent() + { + // + // Explicitly ignore the SubscriptionDataFile property here, + // since current is strictly in-memory and we want the real + // current subscription. + // + if (AzureSession.CurrentContext.Subscription == null) + { + WriteError(new ErrorRecord( + new InvalidOperationException(Resources.InvalidSelectedSubscription), + string.Empty, + ErrorCategory.InvalidData, null)); + } + else + { + WriteSubscriptions(AzureSession.CurrentContext.Subscription); + } + } + + private void WriteSubscriptions(params AzureSubscription[] subscriptions) + { + WriteSubscriptions((IEnumerable) subscriptions); + } + + private void WriteSubscriptions(IEnumerable subscriptions) + { + IEnumerable subscriptionOutput; + + if (ExtendedDetails.IsPresent) + { + subscriptionOutput = subscriptions.Select(s => ConstructPsAzureSubscriptionExtended(s, AzureSession.ClientFactory)); + } + else + { + subscriptionOutput = subscriptions.Select(ConstructPsAzureSubscription); + } + + WriteObject(subscriptionOutput, true); + } + + private PSAzureSubscription ConstructPsAzureSubscription(AzureSubscription subscription) + { + PSAzureSubscription psObject = new PSAzureSubscription(); + + psObject.SubscriptionId = subscription.Id.ToString(); + psObject.SubscriptionName = subscription.Name; + psObject.Environment = subscription.Environment; + psObject.SupportedModes = subscription.GetProperty(AzureSubscription.Property.SupportedModes); + psObject.DefaultAccount = subscription.Account; + psObject.Accounts = ProfileClient.Profile.Accounts.Values.Where(a => a.HasSubscription(subscription.Id)).ToArray(); + psObject.IsDefault = subscription.IsPropertySet(AzureSubscription.Property.Default); + psObject.IsCurrent = AzureSession.CurrentContext.Subscription != null && AzureSession.CurrentContext.Subscription.Id == subscription.Id; + psObject.CurrentStorageAccountName = subscription.GetProperty(AzureSubscription.Property.StorageAccount); + return psObject; + } + + private PSAzureSubscriptionExtended ConstructPsAzureSubscriptionExtended(AzureSubscription subscription, IClientFactory clientFactory) + { + using (var client = clientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement)) + { + var response = client.Subscriptions.Get(); + var environment = ProfileClient.GetEnvironmentOrDefault(subscription.Environment); + var account = DefaultProfileClient.Profile.Accounts[subscription.Account]; + bool isCert = account.Type == AzureAccount.AccountType.Certificate; + + PSAzureSubscriptionExtended result = new PSAzureSubscriptionExtended(ConstructPsAzureSubscription(subscription)) + { + AccountAdminLiveEmailId = response.AccountAdminLiveEmailId, + ActiveDirectoryUserId = subscription.Account, + CurrentCoreCount = response.CurrentCoreCount, + CurrentHostedServices = response.CurrentHostedServices, + CurrentDnsServers = response.CurrentDnsServers, + CurrentLocalNetworkSites = response.CurrentLocalNetworkSites, + CurrentStorageAccounts = response.CurrentStorageAccounts, + CurrentVirtualNetworkSites = response.CurrentVirtualNetworkSites, + MaxCoreCount = response.MaximumCoreCount, + MaxDnsServers = response.MaximumDnsServers, + MaxHostedServices = response.MaximumHostedServices, + MaxLocalNetworkSites = response.MaximumLocalNetworkSites, + MaxStorageAccounts = response.MaximumStorageAccounts, + MaxVirtualNetworkSites = response.MaximumVirtualNetworkSites, + ServiceAdminLiveEmailId = response.ServiceAdminLiveEmailId, + SubscriptionRealName = response.SubscriptionName, + SubscriptionStatus = response.SubscriptionStatus.ToString(), + ServiceEndpoint = environment.GetEndpoint(AzureEnvironment.Endpoint.ServiceManagement), + ResourceManagerEndpoint = environment.GetEndpoint(AzureEnvironment.Endpoint.ResourceManager), + IsDefault = subscription.GetProperty(AzureSubscription.Property.Default) != null, + Account = account, + Certificate = isCert ? ProfileClient.DataStore.GetCertificate(subscription.Account) : null, + CurrentStorageAccountName = subscription.GetProperty(AzureSubscription.Property.StorageAccount) + }; + + return result; + } + } + } +} diff --git a/src/Common/Commands.Profile/Subscription/ImportAzurePublishSettings.cs b/src/Common/Commands.Profile/Subscription/ImportAzurePublishSettings.cs new file mode 100644 index 000000000000..eb0b8b968fc6 --- /dev/null +++ b/src/Common/Commands.Profile/Subscription/ImportAzurePublishSettings.cs @@ -0,0 +1,140 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Profile; +using Microsoft.WindowsAzure.Commands.Common; +using System.Diagnostics; + +namespace Microsoft.WindowsAzure.Commands.Profile +{ + [Cmdlet(VerbsData.Import, "AzurePublishSettingsFile")] + [OutputType(typeof(AzureSubscription))] + public class ImportAzurePublishSettingsCommand : SubscriptionCmdletBase + { + public ImportAzurePublishSettingsCommand() : base(true) { } + + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "Path to the publish settings file.")] + public string PublishSettingsFile { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Environment name.", ParameterSetName = "CommonSettings")] + [ValidateNotNullOrEmpty] + public string Environment { get; set; } + + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + if (IsDirectory()) + { + ImportDirectory(); + } + else + { + ImportFile(); + } + + AzureSubscription defaultSubscription = ProfileClient.Profile.DefaultSubscription; + Debug.Assert(AzureSession.CurrentContext != null); + if (defaultSubscription != null && AzureSession.CurrentContext.Subscription == null) + { + AzureSession.SetCurrentContext( + defaultSubscription, + ProfileClient.Profile.Environments[defaultSubscription.Environment], + ProfileClient.Profile.Accounts[defaultSubscription.Account]); + } + } + + private bool IsDirectory() + { + if (Directory.Exists(PublishSettingsFile)) + { + return true; + } + + if (string.IsNullOrEmpty(PublishSettingsFile)) + { + return true; + } + return false; + } + + private void ImportDirectory() + { + var dirPath = ResolveDirectoryPath(PublishSettingsFile); + + var files = Directory.GetFiles(dirPath, "*.publishsettings"); + string fileToImport = files.FirstOrDefault(); + if (fileToImport == null) + { + throw new Exception(string.Format(Resources.NoPublishSettingsFilesFoundMessage, dirPath)); + } + + ImportFile(fileToImport); + + if (files.Length > 1) + { + WriteWarning(string.Format(Resources.MultiplePublishSettingsFilesFoundMessage, fileToImport)); + } + } + + private void ImportFile() + { + var fullFile = ResolveFileName(PublishSettingsFile); + GuardFileExists(fullFile); + ImportFile(fullFile); + } + + private void ImportFile(string fileName) + { + var subscriptions = ProfileClient.ImportPublishSettings(fileName, Environment); + if (ProfileClient.Profile.DefaultSubscription != null) + { + WriteVerbose(string.Format( + Resources.DefaultAndCurrentSubscription, + ProfileClient.Profile.DefaultSubscription)); + } + WriteObject(subscriptions); + } + + private void GuardFileExists(string fileName) + { + if (!FileUtilities.DataStore.FileExists(fileName)) + { + throw new Exception(); + } + } + + private string ResolveFileName(string filename) + { + return this.TryResolvePath(filename); + } + + private string ResolveDirectoryPath(string directoryPath) + { + if (string.IsNullOrEmpty(directoryPath)) + { + return CurrentPath(); + } + return directoryPath; + } + } +} \ No newline at end of file diff --git a/src/Common/Commands.Profile/Subscription/RemoveAzureSubscription.cs b/src/Common/Commands.Profile/Subscription/RemoveAzureSubscription.cs new file mode 100644 index 000000000000..f37dc1106be4 --- /dev/null +++ b/src/Common/Commands.Profile/Subscription/RemoveAzureSubscription.cs @@ -0,0 +1,72 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Profile; + +namespace Microsoft.WindowsAzure.Commands.Profile +{ + /// + /// Removes a previously imported subscription. + /// + [Cmdlet(VerbsCommon.Remove, "AzureSubscription", SupportsShouldProcess = true, DefaultParameterSetName = "Name")] + [OutputType(typeof(AzureSubscription))] + public class RemoveAzureSubscriptionCommand : SubscriptionCmdletBase + { + public RemoveAzureSubscriptionCommand() : base(true) + { + } + + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the subscription.", ParameterSetName = "Name")] + [ValidateNotNullOrEmpty] + [Alias("Name")] + public string SubscriptionName { get; set; } + + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the subscription.", ParameterSetName = "Id")] + [ValidateNotNullOrEmpty] + [Alias("Id")] + public string SubscriptionId { get; set; } + + [Parameter(Position = 2, HelpMessage = "Do not confirm deletion of subscription")] + public SwitchParameter Force { get; set; } + + [Parameter(Position = 3, Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + public void RemoveSubscriptionProcess() + { + if (SubscriptionName != null) + { + ProfileClient.RemoveSubscription(SubscriptionName); + } + else + { + ProfileClient.RemoveSubscription(new Guid(SubscriptionId)); + } + } + + public override void ExecuteCmdlet() + { + ConfirmAction( + Force.IsPresent, + string.Format(Resources.RemoveSubscriptionConfirmation, SubscriptionName ?? SubscriptionId), + Resources.RemoveSubscriptionMessage, + SubscriptionName, + RemoveSubscriptionProcess); + } + } +} diff --git a/src/Common/Commands.Profile/Subscription/SelectAzureSubscription.cs b/src/Common/Commands.Profile/Subscription/SelectAzureSubscription.cs new file mode 100644 index 000000000000..131142a120fc --- /dev/null +++ b/src/Common/Commands.Profile/Subscription/SelectAzureSubscription.cs @@ -0,0 +1,136 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Profile; + +namespace Microsoft.WindowsAzure.Commands.Profile +{ + + + [Cmdlet(VerbsCommon.Select, "AzureSubscription", DefaultParameterSetName = SelectSubscriptionByNameParameterSet)] + [OutputType(typeof(AzureSubscription))] + public class SelectAzureSubscriptionCommand : SubscriptionCmdletBase + { + private const string SelectSubscriptionByIdParameterSet = "SelectSubscriptionByIdParameterSet"; + + private const string SelectSubscriptionByNameParameterSet = "SelectSubscriptionByNameParameterSet"; + + private const string SelectDefaultSubscriptionByIdParameterSet = "SelectDefaultSubscriptionByIdParameterSet"; + + private const string SelectDefaultSubscriptionByNameParameterSet = "SelectDefaultSubscriptionByNameParameterSet"; + + private const string NoCurrentSubscriptionParameterSet = "NoCurrentSubscriptionParameterSet"; + + private const string NoDefaultSubscriptionParameterSet = "NoDefaultSubscriptionParameterSet"; + + + public SelectAzureSubscriptionCommand() : base(true) + { + } + + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + ParameterSetName = SelectSubscriptionByNameParameterSet, HelpMessage = "Name of subscription to select")] + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + ParameterSetName = SelectDefaultSubscriptionByNameParameterSet, HelpMessage = "Name of subscription to select")] + [ValidateNotNullOrEmpty] + [Alias("Name")] + public string SubscriptionName { get; set; } + + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + ParameterSetName = SelectSubscriptionByIdParameterSet, HelpMessage = "Id of subscription to select")] + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + ParameterSetName = SelectDefaultSubscriptionByIdParameterSet, HelpMessage = "Id of subscription to select")] + [ValidateNotNullOrEmpty] + [Alias("Id")] + public string SubscriptionId { get; set; } + + [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of account to select")] + [ValidateNotNullOrEmpty] + public string Account { get; set; } + + [Parameter(Mandatory = false, ParameterSetName = SelectSubscriptionByIdParameterSet, + HelpMessage = "Switch to set the chosen subscription as the current one")] + [Parameter(Mandatory = false, ParameterSetName = SelectSubscriptionByNameParameterSet, + HelpMessage = "Switch to set the chosen subscription as the current one")] + public SwitchParameter Current { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = SelectDefaultSubscriptionByIdParameterSet, + HelpMessage = "Switch to set the chosen subscription as the default one")] + [Parameter(Mandatory = true, ParameterSetName = SelectDefaultSubscriptionByNameParameterSet, + HelpMessage = "Switch to set the chosen subscription as the default one")] + public SwitchParameter Default { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = NoCurrentSubscriptionParameterSet, + HelpMessage = "Switch to clear the current subscription")] + public SwitchParameter NoCurrent { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = NoDefaultSubscriptionParameterSet, + HelpMessage = "Switch to clear the default subscription")] + public SwitchParameter NoDefault { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + AzureSubscription azureSubscription = null; + switch (ParameterSetName) + { + case SelectSubscriptionByNameParameterSet: + azureSubscription = ProfileClient.SetSubscriptionAsCurrent(SubscriptionName, Account); + break; + + case SelectSubscriptionByIdParameterSet: + azureSubscription = ProfileClient.SetSubscriptionAsCurrent(SubscriptionIdAsGuid(), Account); + break; + + case SelectDefaultSubscriptionByNameParameterSet: + azureSubscription = ProfileClient.SetSubscriptionAsDefault(SubscriptionName, Account); + break; + + case SelectDefaultSubscriptionByIdParameterSet: + azureSubscription = ProfileClient.SetSubscriptionAsDefault(SubscriptionIdAsGuid(), Account); + break; + + case NoCurrentSubscriptionParameterSet: + AzureSession.SetCurrentContext(null, null, null); + break; + + case NoDefaultSubscriptionParameterSet: + ProfileClient.ClearDefaultSubscription(); + break; + } + + if (PassThru.IsPresent && azureSubscription != null) + { + WriteObject(azureSubscription); + } + } + + private Guid SubscriptionIdAsGuid() + { + Guid subscriptionIdGuid; + if (!Guid.TryParse(SubscriptionId, out subscriptionIdGuid)) + { + throw new ArgumentException(string.Format(Resources.InvalidGuid, SubscriptionId), "SubscriptionId"); + } + return subscriptionIdGuid; + } + } +} \ No newline at end of file diff --git a/src/Common/Commands.Profile/Subscription/SetAzureSubscription.cs b/src/Common/Commands.Profile/Subscription/SetAzureSubscription.cs new file mode 100644 index 000000000000..3b93419e6e2c --- /dev/null +++ b/src/Common/Commands.Profile/Subscription/SetAzureSubscription.cs @@ -0,0 +1,164 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using System.Security.Cryptography.X509Certificates; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Profile; + +namespace Microsoft.WindowsAzure.Commands.Profile +{ + + + /// + /// Sets an azure subscription. + /// + [Cmdlet(VerbsCommon.Set, "AzureSubscription"), OutputType(typeof(AzureSubscription))] + public class SetAzureSubscriptionCommand : SubscriptionCmdletBase + { + private const string UpdateSubscriptionByIdParameterSet = "UpdateSubscriptionByIdParameterSetName"; + + private const string UpdateSubscriptionByNameParameterSet = "UpdateSubscriptionByNameParameterSetName"; + + private const string AddSubscriptionParameterSet = "AddSubscriptionParameterSetName"; + + public SetAzureSubscriptionCommand() : base(true) + { + Environment = EnvironmentName.AzureCloud; + } + + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "Name of the subscription.", ParameterSetName = UpdateSubscriptionByNameParameterSet)] + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "Name of the subscription.", ParameterSetName = AddSubscriptionParameterSet)] + [ValidateNotNullOrEmpty] + public string SubscriptionName { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "Account subscription ID.", ParameterSetName = UpdateSubscriptionByIdParameterSet)] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "Account subscription ID.", ParameterSetName = AddSubscriptionParameterSet)] + public string SubscriptionId { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "Account subscription ID.", ParameterSetName = AddSubscriptionParameterSet)] + [Parameter(ValueFromPipelineByPropertyName = true, + HelpMessage = "Account subscription ID.", ParameterSetName = UpdateSubscriptionByIdParameterSet)] + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, + HelpMessage = "Name of the subscription.", ParameterSetName = UpdateSubscriptionByNameParameterSet)] + public X509Certificate2 Certificate { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = true, HelpMessage = "Service endpoint.")] + public string ServiceEndpoint { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = true, HelpMessage = "Cloud service endpoint.")] + public string ResourceManagerEndpoint { get; set; } + + [Parameter(HelpMessage = "Current storage account name.")] + [ValidateNotNullOrEmpty] + public string CurrentStorageAccountName { get; set; } + + [Parameter(HelpMessage = "Environment name.")] + [ValidateNotNullOrEmpty] + public string Environment { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + /// + /// Executes the set subscription cmdlet operation. + /// + public override void ExecuteCmdlet() + { + AzureSubscription subscription = null; + + if (!string.IsNullOrEmpty(SubscriptionId) && string.IsNullOrEmpty(SubscriptionName)) + { + subscription = ProfileClient.GetSubscription(new Guid(SubscriptionId)); + Environment = subscription.Environment; + } + else if (string.IsNullOrEmpty(SubscriptionId) && !string.IsNullOrEmpty(SubscriptionName)) + { + subscription = ProfileClient.GetSubscription(SubscriptionName); + Environment = subscription.Environment; + } + else + { + subscription = new AzureSubscription(); + subscription.Id = new Guid(SubscriptionId); + subscription.Name = SubscriptionName; + } + + AzureEnvironment environment = ProfileClient.GetEnvironment(Environment, ServiceEndpoint, ResourceManagerEndpoint); + if (environment == null) + { + environment = DefaultProfileClient.GetEnvironment(Environment, ServiceEndpoint, ResourceManagerEndpoint); + } + + if (environment == null) + { + throw new ArgumentException("ServiceEndpoint and ResourceManagerEndpoint values do not "+ + "match existing environment. Please use Environment parameter."); + } + else + { + subscription.Environment = environment.Name; + } + + if (ServiceEndpoint != null || ResourceManagerEndpoint != null) + { + WriteWarning("Please use Environment parameter to specify subscription environment. This "+ + "warning will be converted into an error in the upcoming release."); + } + + if (Certificate != null) + { + ProfileClient.ImportCertificate(Certificate); + subscription.Account = Certificate.Thumbprint; + AzureAccount account = new AzureAccount + { + Id = Certificate.Thumbprint, + Type = AzureAccount.AccountType.Certificate + }; + account.SetOrAppendProperty(AzureAccount.Property.Subscriptions, subscription.Id.ToString()); + ProfileClient.AddOrSetAccount(account); + + if (subscription.Account == null) + { + subscription.Account = account.Id; + } + } + + if (subscription.Account == null) + { + throw new ArgumentException("Certificate is required for creating a new subscription."); + } + + if (!string.IsNullOrEmpty(CurrentStorageAccountName)) + { + subscription.Properties[AzureSubscription.Property.StorageAccount] = CurrentStorageAccountName; + } + + subscription = ProfileClient.AddOrSetSubscription(subscription); + + if (PassThru) + { + WriteObject(subscription); + } + } + } +} \ No newline at end of file diff --git a/src/Common/Commands.Profile/SwitchAzureMode.cs b/src/Common/Commands.Profile/SwitchAzureMode.cs new file mode 100644 index 000000000000..4836d8c5c05e --- /dev/null +++ b/src/Common/Commands.Profile/SwitchAzureMode.cs @@ -0,0 +1,86 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.Profile +{ + /// + /// Switches between ServiceManagement and ResourceManager modes. + /// + [Cmdlet(VerbsCommon.Switch, "AzureMode")] + public class SwitchAzureMode : AzurePSCmdlet + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Name of the mode to switch to. Valid values are AzureServiceManagement and AzureResourceManager")] + [ValidateSet("AzureServiceManagement", "AzureResourceManager", IgnoreCase = false)] + public string Name { get; set; } + + [Parameter(Position = 1, Mandatory = false, HelpMessage = "If specified, save the module switch at machine level")] + public SwitchParameter Global { get; set; } + + public override void ExecuteCmdlet() + { + AzureModule moduleToImport = (AzureModule)Enum.Parse(typeof(AzureModule), Name, false); + AzureModule moduleToRemove = moduleToImport == AzureModule.AzureResourceManager ? AzureModule.AzureServiceManagement : AzureModule.AzureResourceManager; + RemoveAzureModule(FileUtilities.GetModuleName(moduleToRemove), FileUtilities.GetPSModulePathForModule(moduleToRemove)); + ImportAzureModule(FileUtilities.GetModuleName(moduleToImport), FileUtilities.GetPSModulePathForModule(moduleToImport)); + } + + private void ImportAzureModule(string name, string path) + { + if (!IsLoaded(name)) + { + WriteVerbose(string.Format("Adding {0} module path to PSModulePath...", path)); + PowerShellUtilities.AddModuleToPSModulePath(path); + + WriteVerbose(string.Format("Importing {0} module...", name)); + this.ImportModule(name); + + if (Global) + { + PowerShellUtilities.AddModuleToPSModulePath(path, EnvironmentVariableTarget.Machine); + } + } + } + + private bool IsLoaded(string moduleName) + { + return this.GetLoadedModules().Exists(m => m.Name.Equals(moduleName)); + } + + private void RemoveAzureModule(string name, string path) + { + if (IsLoaded(name)) + { + WriteVerbose(string.Format("Removing {0} module...", name)); + this.RemoveModule(name); + + if (name.Equals(FileUtilities.GetModuleName(AzureModule.AzureServiceManagement))) + { + this.RemoveAzureAliases(); + } + + WriteVerbose(string.Format("Removing {0} module path from PSModulePath...", path)); + PowerShellUtilities.RemoveModuleFromPSModulePath(path); + + if (Global) + { + PowerShellUtilities.RemoveModuleFromPSModulePath(path, EnvironmentVariableTarget.Machine); + } + } + } + } +} \ No newline at end of file diff --git a/src/Common/Commands.Profile/packages.config b/src/Common/Commands.Profile/packages.config new file mode 100644 index 000000000000..8a52e19c1d2d --- /dev/null +++ b/src/Common/Commands.Profile/packages.config @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/AutomationTests/AutomationTests.cs b/src/Common/Commands.ScenarioTest/AutomationTests/AutomationTests.cs new file mode 100644 index 000000000000..2031c893319a --- /dev/null +++ b/src/Common/Commands.ScenarioTest/AutomationTests/AutomationTests.cs @@ -0,0 +1,108 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Testing; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest +{ + public class AutomationTests + { + private EnvironmentSetupHelper helper = new EnvironmentSetupHelper(); + + [Fact(Skip = "Fix to make x86 compatible.")] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.Service, Category.Automation)] + public void TestAutomationStartAndStopRunbook() + { + RunPowerShellTest("Test-AutomationStartAndStopRunbook -runbookPath Resources\\Automation\\Test-Workflow.ps1"); + } + + [Fact(Skip = "Fix to make x86 compatible.")] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.Service, Category.Automation)] + public void TestAutomationPublishAndEditRunbook() + { + RunPowerShellTest("Test-AutomationPublishAndEditRunbook -runbookPath Resources\\Automation\\Test-Workflow.ps1 -editRunbookPath Resources\\Automation\\Test-WorkflowV2.ps1"); + } + + [Fact (Skip = "Fix to make x86 compatible.")] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.Service, Category.Automation)] + public void TestAutomationConfigureRunbook() + { + RunPowerShellTest("Test-AutomationConfigureRunbook -runbookPath Resources\\Automation\\Write-DebugAndVerboseOutput.ps1"); + } + + [Fact] + [Trait(Category.Service, Category.Automation)] + [Trait(Category.RunType, Category.LiveOnly)] + public void TestAutomationSuspendAndResumeJob() + { + RunPowerShellTest("Test-AutomationSuspendAndResumeJob -runbookPath Resources\\Automation\\Use-WorkflowCheckpointSample.ps1"); + } + + [Fact] + [Trait(Category.Service, Category.Automation)] + [Trait(Category.RunType, Category.LiveOnly)] + public void TestAutomationStartRunbookOnASchedule() + { + RunPowerShellTest("Test-AutomationStartRunbookOnASchedule -runbookPath Resources\\Automation\\Test-Workflow.ps1"); + } + + [Fact(Skip = "Fix to make x86 compatible.")] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.Service, Category.Automation)] + public void TestAutomationStartUnpublishedRunbook() + { + RunPowerShellTest("Test-AutomationStartUnpublishedRunbook -runbookPath Resources\\Automation\\Test-WorkFlowWithVariousParameters.ps1"); + } + + [Fact(Skip = "Fix to make x86 compatible.")] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.Service, Category.Automation)] + public void TestAutomationRunbookWithParameter() + { + RunPowerShellTest("Test-RunbookWithParameter -runbookPath Resources\\Automation\\fastJob.ps1 @{'nums'='[1,2,3,4,5,6,7]'} 28"); + } + + protected void SetupManagementClients() + { + helper.SetupSomeOfManagementClients(); + } + + protected void RunPowerShellTest(params string[] scripts) + { + using (UndoContext context = UndoContext.Current) + { + context.Start(TestUtilities.GetCallingClass(1), TestUtilities.GetCurrentMethodName(2)); + + SetupManagementClients(); + + List modules = Directory.GetFiles("Resources\\Automation", "*.ps1").ToList(); + modules.Add("Common.ps1"); + + helper.SetupEnvironment(AzureModule.AzureServiceManagement); + helper.SetupModules(AzureModule.AzureServiceManagement, modules.ToArray()); + + helper.RunPowerShellTest(scripts); + } + } + } +} diff --git a/src/Common/Commands.ScenarioTest/CloudServiceTests/EmulatorTests.cs b/src/Common/Commands.ScenarioTest/CloudServiceTests/EmulatorTests.cs new file mode 100644 index 000000000000..27da239fae54 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/CloudServiceTests/EmulatorTests.cs @@ -0,0 +1,85 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ScenarioTest.Common; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.CloudServiceTests +{ + [TestClass] + public class EmulatorTests : AzurePowerShellCertificateTest + { + static string TrueIsNotFalseException = "Assertion failed: $true -eq $false"; + static string ExceptionMatchFailedException = "Exception match failed, '{0}' != '{1}'"; + public EmulatorTests() + : base("CloudService\\Common.ps1", + "CloudService\\CloudServiceTests.ps1") + { + } + + [TestMethod] + public void CommonPowerShellSucceedingTest() + { + RunPowerShellTest( + "Write-Output \"Output\"", + "Write-Debug \"Debug\"", + "Write-Progress \"Progress\"", + "Write-Verbose \"Verbose\"", + "Write-Warning \"Warning\"", + "foreach ($k in (Get-Item env:) ){$name=$k.name; $Value = $k.Value; Write-Debug \"$name=$Value\"}", + "foreach ($sub in Get-AzureSubscription) {$name = $sub.SubscriptionName; Write-Debug $name}", + "Assert-True {$true -eq $true}" + ); + } + + [TestMethod] + public void CommonPowerShellExceptionThrowingTest() + { + try + { + RunPowerShellTest( + "Write-Output \"Output\"", + "Write-Debug \"Debug\"", + "Write-Progress \"Progress\"", + "Write-Verbose \"Verbose\"", + "Write-Warning \"Warning\"", + "Assert-True {$true -eq $false}" + ); + Assert.Fail("Expected exception not thrown"); + } + catch (RuntimeException runtimeException) + { + Assert.AreEqual(TrueIsNotFalseException, runtimeException.Message, + string.Format(ExceptionMatchFailedException, TrueIsNotFalseException, runtimeException.Message)); + } + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + public void TestStartAzureEmulatorTwice() + { + RunPowerShellTest("Test-StartAzureEmulatorTwice"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + public void TestStartAzureEmulatorExpress() + { + RunPowerShellTest("Test-StartAzureEmulatorExpress"); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/CloudServiceTests/PublishAzureServiceScenarioTests.cs b/src/Common/Commands.ScenarioTest/CloudServiceTests/PublishAzureServiceScenarioTests.cs new file mode 100644 index 000000000000..83c4a8c98de7 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/CloudServiceTests/PublishAzureServiceScenarioTests.cs @@ -0,0 +1,68 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ScenarioTest.Common; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.CloudServiceTests +{ + [TestClass] + public class PublishAzureServiceScenarioTests : AzurePowerShellCertificateTest + { + public PublishAzureServiceScenarioTests() + : base("CloudService\\Common.ps1", + "CloudService\\CloudServiceTests.ps1") + { + + } + + [TestInitialize] + public override void TestSetup() + { + base.TestSetup(); + powershell.AddScript("Initialize-CloudServiceTest"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + [TestCategory(Category.OneSDK)] + [TestCategory(Category.CIT)] + [TestCategory(Category.BVT)] + public void TestPublishAzureCacheService() + { + RunPowerShellTest("Test-PublishCacheService"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + [TestCategory(Category.OneSDK)] + [TestCategory(Category.CIT)] + [TestCategory(Category.BVT)] + public void TestUpdateAzureCacheService() + { + RunPowerShellTest("Test-UpdateCacheService"); + } + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + [TestCategory(Category.OneSDK)] + [TestCategory(Category.BVT)] + public void TestPublishUsesSettingsLocation() + { + RunPowerShellTest("Test-PublishUsesSettingsLocation"); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/CloudServiceTests/RemoveAzureServiceScenarioTests.cs b/src/Common/Commands.ScenarioTest/CloudServiceTests/RemoveAzureServiceScenarioTests.cs new file mode 100644 index 000000000000..52dae83b2f1a --- /dev/null +++ b/src/Common/Commands.ScenarioTest/CloudServiceTests/RemoveAzureServiceScenarioTests.cs @@ -0,0 +1,93 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ScenarioTest.Common; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.CloudServiceTests +{ + [TestClass] + public class RemoveAzureServiceScenarioTests : AzurePowerShellCertificateTest + { + public RemoveAzureServiceScenarioTests() + : base("CloudService\\Common.ps1", + "CloudService\\CloudServiceTests.ps1") + { + + } + + [TestInitialize] + public override void TestSetup() + { + base.TestSetup(); + powershell.AddScript("Initialize-CloudServiceTest"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + [TestCategory(Category.BVT)] + public void TestRemoveAzureServiceWithInvalidCredentials() + { + RunPowerShellTest("Test-WithInvalidCredentials { Remove-AzureService $(Get-CloudServiceName) -Force }"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + [TestCategory(Category.BVT)] + public void TestRemoveAzureServiceWithNonExistingService() + { + RunPowerShellTest("Test-RemoveAzureServiceWithNonExistingService"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + [TestCategory(Category.BVT)] + public void TestRemoveAzureServiceWithProductionDeployment() + { + RunPowerShellTest("Test-RemoveAzureServiceWithProductionDeployment"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + [TestCategory(Category.BVT)] + public void TestRemoveAzureServiceWhatIf() + { + RunPowerShellTest("Test-RemoveAzureServiceWhatIf"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + [TestCategory(Category.BVT)] + public void TestRemoveAzureServiceWhatIfWithInvalidName() + { + RunPowerShellTest("Test-RemoveAzureServiceWhatIfWithInvalidName"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + [TestCategory(Category.OneSDK)] + [TestCategory(Category.CIT)] + [TestCategory(Category.BVT)] + public void TestRemoveAzureServicePipedFromGetAzureService() + { + RunPowerShellTest("Test-RemoveAzureServicePipedFromGetAzureService"); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/CloudServiceTests/ReverseDnsFqdnAzureServiceScenarioTests.cs b/src/Common/Commands.ScenarioTest/CloudServiceTests/ReverseDnsFqdnAzureServiceScenarioTests.cs new file mode 100644 index 000000000000..7ff116bb950a --- /dev/null +++ b/src/Common/Commands.ScenarioTest/CloudServiceTests/ReverseDnsFqdnAzureServiceScenarioTests.cs @@ -0,0 +1,64 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ScenarioTest.Common; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.CloudServiceTests +{ + [TestClass] + public class ReverseDnsFqdnAzureServiceScenarioTests : AzurePowerShellCertificateTest + { + public ReverseDnsFqdnAzureServiceScenarioTests() + : base("CloudService\\Common.ps1", + "CloudService\\CloudServiceTests.ps1") + { + + } + + [TestInitialize] + public override void TestSetup() + { + base.TestSetup(); + powershell.AddScript("Initialize-CloudServiceTest"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + [TestCategory(Category.BVT)] + public void TestNewAzureServiceReverseDnsFqdn() + { + RunPowerShellTest("Test-NewAzureServiceWithReverseDnsFqdn"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + [TestCategory(Category.BVT)] + public void TestSetAzureServiceReverseDnsFqdn() + { + RunPowerShellTest("Test-SetAzureServiceWithReverseDnsFqdn"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + [TestCategory(Category.BVT)] + public void TestSetAzureServiceWithEmptyReverseDnsFqdn() + { + RunPowerShellTest("Test-SetAzureServiceWithEmptyReverseDnsFqdn"); + } + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/CloudServiceTests/StartAzureServiceScenarioTests.cs b/src/Common/Commands.ScenarioTest/CloudServiceTests/StartAzureServiceScenarioTests.cs new file mode 100644 index 000000000000..6651ee325c96 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/CloudServiceTests/StartAzureServiceScenarioTests.cs @@ -0,0 +1,93 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ScenarioTest.Common; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.CloudServiceTests +{ + [TestClass] + public class StartAzureServiceScenarioTests : AzurePowerShellCertificateTest + { + public StartAzureServiceScenarioTests() + : base("CloudService\\Common.ps1", + "CloudService\\CloudServiceTests.ps1") + { + + } + + [TestInitialize] + public override void TestSetup() + { + base.TestSetup(); + powershell.AddScript("Initialize-CloudServiceTest"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + [TestCategory(Category.BVT)] + public void TestStartAzureServiceWithInvalidCredentials() + { + RunPowerShellTest("Test-WithInvalidCredentials { Start-AzureService $(Get-CloudServiceName) }"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + [TestCategory(Category.BVT)] + public void TestStartAzureServiceWithNonExistingService() + { + RunPowerShellTest("Test-StartAzureServiceWithNonExistingService"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + [TestCategory(Category.OneSDK)] + [TestCategory(Category.CIT)] + [TestCategory(Category.BVT)] + public void TestStartAzureServiceWithProductionDeployment() + { + RunPowerShellTest("Test-StartAzureServiceWithProductionDeployment"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + [TestCategory(Category.BVT)] + public void TestStartAzureServiceWithStagingDeployment() + { + RunPowerShellTest("Test-StartAzureServiceWithStagingDeployment"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + [TestCategory(Category.BVT)] + public void TestStartAzureServiceWithEmptyDeployment() + { + RunPowerShellTest("Test-StartAzureServiceWithEmptyDeployment"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + [TestCategory(Category.BVT)] + public void TestStartAzureServiceWithoutName() + { + RunPowerShellTest("Test-StartAzureServiceWithoutName"); + } + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/CloudServiceTests/StopAzureServiceScenarioTests.cs b/src/Common/Commands.ScenarioTest/CloudServiceTests/StopAzureServiceScenarioTests.cs new file mode 100644 index 000000000000..4fedf58f11f5 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/CloudServiceTests/StopAzureServiceScenarioTests.cs @@ -0,0 +1,94 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ScenarioTest.Common; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.CloudServiceTests +{ + [TestClass] + public class StopAzureServiceScenarioTests : AzurePowerShellCertificateTest + { + public StopAzureServiceScenarioTests() + : base("CloudService\\Common.ps1", + "CloudService\\CloudServiceTests.ps1") + { + + } + + [TestInitialize] + public override void TestSetup() + { + base.TestSetup(); + powershell.AddScript("Initialize-CloudServiceTest"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + [TestCategory(Category.BVT)] + public void TestStopAzureServiceWithInvalidCredentials() + { + RunPowerShellTest("Test-WithInvalidCredentials { Stop-AzureService $(Get-CloudServiceName) }"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + [TestCategory(Category.BVT)] + public void TestStopAzureServiceWithNonExistingService() + { + RunPowerShellTest("Test-StopAzureServiceWithNonExistingService"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + [TestCategory(Category.OneSDK)] + [TestCategory(Category.CIT)] + [TestCategory(Category.BVT)] + public void TestStopAzureServiceWithProductionDeployment() + { + RunPowerShellTest("Test-StopAzureServiceWithProductionDeployment"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + [TestCategory(Category.BVT)] + [Timeout(1200000)] + public void TestStopAzureServiceWithStagingDeployment() + { + RunPowerShellTest("Test-StopAzureServiceWithStagingDeployment"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + [TestCategory(Category.BVT)] + public void TestStopAzureServiceWithEmptyDeployment() + { + RunPowerShellTest("Test-StopAzureServiceWithEmptyDeployment"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + [TestCategory(Category.BVT)] + public void TestStopAzureServiceWithoutName() + { + RunPowerShellTest("Test-StopAzureServiceWithoutName"); + } + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/CloudServiceTests/TestAzureNameScenarioTests.cs b/src/Common/Commands.ScenarioTest/CloudServiceTests/TestAzureNameScenarioTests.cs new file mode 100644 index 000000000000..25455f04ac62 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/CloudServiceTests/TestAzureNameScenarioTests.cs @@ -0,0 +1,129 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ScenarioTest.Common; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.CloudServiceTests +{ + [TestClass] + public class TestAzureNameScenarioTests : AzurePowerShellCertificateTest + { + public TestAzureNameScenarioTests() + : base("CloudService\\Common.ps1", + "ServiceBus\\Common.ps1", + "CloudService\\CloudServiceTests.ps1") + { + + } + + [TestInitialize] + public override void TestSetup() + { + base.TestSetup(); + powershell.AddScript("Initialize-CloudServiceTest"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + [TestCategory(Category.BVT)] + public void TestAzureNameWithInvalidCredentials() + { + RunPowerShellTest("Test-WithInvalidCredentials { Test-AzureName -Service $(Get-CloudServiceName) }"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + [TestCategory(Category.BVT)] + public void TestAzureNameWithNotExistingHostedService() + { + RunPowerShellTest("Test-AzureNameWithNotExistingHostedService"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + [TestCategory(Category.BVT)] + public void TestAzureNameWithExistingHostedService() + { + RunPowerShellTest("Test-AzureNameWithExistingHostedService"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + [TestCategory(Category.BVT)] + public void TestAzureNameWithInvalidHostedService() + { + RunPowerShellTest("Test-AzureNameWithInvalidHostedService"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + [TestCategory(Category.BVT)] + public void TestAzureNameWithNotExistingStorageService() + { + RunPowerShellTest("Test-AzureNameWithNotExistingStorageService"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + [TestCategory(Category.BVT)] + public void TestAzureNameWithExistingStorageService() + { + RunPowerShellTest("Test-AzureNameWithExistingStorageService"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + [TestCategory(Category.BVT)] + public void TestAzureNameWithInvalidStorageService() + { + RunPowerShellTest("Test-AzureNameWithInvalidStorageService"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + [TestCategory(Category.BVT)] + public void TestAzureNameWithNotExistingServiceBusNamespace() + { + RunPowerShellTest("Test-AzureNameWithNotExistingServiceBusNamespace"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + [TestCategory(Category.BVT)] + public void TestAzureNameWithExistingServiceBusNamespace() + { + RunPowerShellTest("Test-AzureNameWithExistingServiceBusNamespace"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.CloudService)] + [TestCategory(Category.BVT)] + [Ignore] // https://github.com/WindowsAzure/azure-sdk-tools/issues/1185 + public void TestAzureNameWithInvalidServiceBusNamespace() + { + RunPowerShellTest("Test-AzureNameWithInvalidServiceBusNamespace"); + } + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj b/src/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj new file mode 100644 index 000000000000..991531b3b214 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj @@ -0,0 +1,520 @@ + + + + + Debug + AnyCPU + {A3965B66-5A3E-4B8C-9574-28E5958D4828} + Library + Properties + Microsoft.WindowsAzure.Commands.ScenarioTest + Microsoft.WindowsAzure.Commands.ScenarioTest + v4.5 + 512 + + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + ..\..\ + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + bin\Release\ + TRACE;SIGN + true + MSSharedLibKey.snk + true + true + false + true + pdbonly + + + + False + ..\..\packages\Hydra.HttpRecorder.1.0.5417.13285-prerelease\lib\net45\Microsoft.Azure.Utilities.HttpRecorder.dll + + + ..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll + + + ..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll + + + ..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll + + + False + ..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll + + + False + ..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll + + + False + ..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + + False + ..\lib\Microsoft.Web.Deployment.dll + + + False + ..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + ..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll + + + False + ..\..\packages\Microsoft.WindowsAzure.Management.2.1.0\lib\net40\Microsoft.WindowsAzure.Management.dll + + + False + ..\..\packages\Microsoft.WindowsAzure.Management.Compute.6.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll + + + False + ..\..\packages\Microsoft.WindowsAzure.Management.Storage.3.1.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll + + + ..\..\packages\Microsoft.WindowsAzure.Management.WebSites.4.0.1-prerelease\lib\net40\Microsoft.WindowsAzure.Management.WebSites.dll + True + + + False + ..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll + + + False + ..\..\packages\Hydra.SpecTestSupport.1.0.5417.13285-prerelease\lib\net45\Microsoft.WindowsAzure.Testing.dll + + + False + ..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + + + + + + False + + + + + False + ..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + ..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll + + + + + + + + + ..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + + ..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + + + True + True + Resources.resx + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PreserveNewest + + + PreserveNewest + + + Designer + ResXFileCodeGenerator + Resources.Designer.cs + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + Designer + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + + + + + PreserveNewest + + + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + + + + + {58a78f29-8c0c-4a5e-893e-3953c0f29c8a} + Commands.ServiceManagement.Test + + + {bc420543-c04e-4bf3-96e1-cd81b823bdd7} + Commands.Test.Utilities + + + {08cf7da7-0392-4a19-b79b-e1ff67cdb81a} + Commands.Storage + + + {E1CA72BA-8374-45F6-904D-FD34ECDF5B6F} + Commands.ServiceManagement + + + {4900ec4e-8deb-4412-9108-0bc52f81d457} + Commands.Utilities + + + {cd5aa507-f5ef-473d-855b-84b91a1abe54} + Commands + + + {3b48a77b-5956-4a62-9081-92ba04b02b27} + Commands.Common.Test + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + {c1bda476-a5cc-4394-914d-48b0ec31a710} + Commands.ScenarioTests.Common + + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + + + + + + + + xcopy "$(SolutionDir)Package\$(ConfigurationName)\*.*" $(TargetDir) /Y /E + + + \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Common/ConnectionStringFields.cs b/src/Common/Commands.ScenarioTest/Common/ConnectionStringFields.cs new file mode 100644 index 000000000000..e8031b311c2a --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Common/ConnectionStringFields.cs @@ -0,0 +1,70 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.Common +{ + /// + /// Contains constant definitions for the fields that + /// are allowed in the test connection strings. + /// + public static class ConnectionStringFields + { + /// + /// The key inside the connection string for the management certificate + /// + public const string ManagementCertificate = "ManagementCertificate"; + + /// + /// The key inside the connection string for the subscription identifier + /// + public const string SubscriptionId = "SubscriptionId"; + + /// + /// The key inside the connection string for the base management URI + /// + public const string BaseUri = "BaseUri"; + + /// + /// The key inside the connection string for a microsoft ID (OrgId or LiveId) + /// + public const string UserId = "UserId"; + + /// + /// The key inside the connection string for a user password matchign the microsoft ID + /// + public const string Password = "Password"; + + /// + /// A raw JWT token for AAD authentication + /// + public const string RawToken = "RawToken"; + + /// + /// The client ID to use when authenticating with AAD + /// + public const string AADClientId = "AADClientId"; + + /// + /// ENdpoint to use for AAD authentication + /// + public const string AADAuthenticationEndpoint = "AADAuthEndpoint"; + + /// + /// If a tenant other than common is to be used with the subscription, specifies the tenant + /// + public const string AADTenant = "AADTenant"; + + } +} diff --git a/src/Common/Commands.ScenarioTest/Common/CustomPowerShell/CustomHost.cs b/src/Common/Commands.ScenarioTest/Common/CustomPowerShell/CustomHost.cs new file mode 100644 index 000000000000..e4dea4217edc --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Common/CustomPowerShell/CustomHost.cs @@ -0,0 +1,175 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Management.Automation.Host; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.Common.CustomPowerShell +{ + /// + /// This is a sample implementation of the PSHost abstract class for + /// console applications. Not all members are implemented. Those that + /// are not implemented throw a NotImplementedException exception or + /// return nothing. + /// + internal class CustomHost : PSHost + { + /// + /// The culture information of the thread that created + /// this object. + /// + private CultureInfo originalCultureInfo = System.Threading.Thread.CurrentThread.CurrentCulture; + + /// + /// The UI culture information of the thread that created + /// this object. + /// + private CultureInfo originalUICultureInfo = System.Threading.Thread.CurrentThread.CurrentUICulture; + + /// + /// The identifier of this PSHost implementation. + /// + private Guid myId = Guid.NewGuid(); + + /// + /// The customized PSHost User Interface + /// + public CustomerPSHostUserInterface CustomUI { get; set; } + + /// + /// Initializes a new instance of the MyHost class. Keep + /// a reference to the host application object so that it + /// can be informed of when to exit. + /// + /// + /// A reference to the host application object. + /// + public CustomHost() + { + CustomUI = new CustomerPSHostUserInterface(); + } + + /// + /// Return the culture information to use. This implementation + /// returns a snapshot of the culture information of the thread + /// that created this object. + /// + public override System.Globalization.CultureInfo CurrentCulture + { + get { return this.originalCultureInfo; } + } + + /// + /// Return the UI culture information to use. This implementation + /// returns a snapshot of the UI culture information of the thread + /// that created this object. + /// + public override System.Globalization.CultureInfo CurrentUICulture + { + get { return this.originalUICultureInfo; } + } + + /// + /// This implementation always returns the GUID allocated at + /// instantiation time. + /// + public override Guid InstanceId + { + get { return this.myId; } + } + + /// + /// Return a string that contains the name of the host implementation. + /// Keep in mind that this string may be used by script writers to + /// identify when your host is being used. + /// + public override string Name + { + get { return "MySampleConsoleHostImplementation"; } + } + + /// + /// This sample does not implement a PSHostUserInterface component so + /// this property simply returns null. + /// + public override PSHostUserInterface UI + { + get { return CustomUI; } + } + + /// + /// Return the version object for this application. Typically this + /// should match the version resource in the application. + /// + public override Version Version + { + get { return new Version(1, 0, 0, 0); } + } + + /// + /// Not implemented by this example class. The call fails with + /// a NotImplementedException exception. + /// + public override void EnterNestedPrompt() + { + throw new NotImplementedException( + "The method or operation is not implemented."); + } + + /// + /// Not implemented by this example class. The call fails + /// with a NotImplementedException exception. + /// + public override void ExitNestedPrompt() + { + throw new NotImplementedException( + "The method or operation is not implemented."); + } + + /// + /// This API is called before an external application process is + /// started. Typically it is used to save state so the parent can + /// restore state that has been modified by a child process (after + /// the child exits). In this example, this functionality is not + /// needed so the method returns nothing. + /// + public override void NotifyBeginApplication() + { + return; + } + + /// + /// This API is called after an external application process finishes. + /// Typically it is used to restore state that a child process may + /// have altered. In this example, this functionality is not + /// needed so the method returns nothing. + /// + public override void NotifyEndApplication() + { + return; + } + + /// + /// Indicate to the host application that exit has + /// been requested. Pass the exit code that the host + /// application should use when exiting the process. + /// + /// The exit code to use. + public override void SetShouldExit(int exitCode) + { + + } + } +} diff --git a/src/Common/Commands.ScenarioTest/Common/CustomPowerShell/CustomerPSHostUserInterface.cs b/src/Common/Commands.ScenarioTest/Common/CustomPowerShell/CustomerPSHostUserInterface.cs new file mode 100644 index 000000000000..7f5c0c2c22ad --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Common/CustomPowerShell/CustomerPSHostUserInterface.cs @@ -0,0 +1,194 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Management.Automation; +using System.Management.Automation.Host; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Utilities.Store; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.Common.CustomPowerShell +{ + class CustomerPSHostUserInterface : PSHostUserInterface + { + public List WarningStream { get; private set; } + + public List VerboseStream { get; private set; } + + public List DebugStream { get; private set; } + + public List ProgressStream { get; private set; } + + public int Yes { get; set; } + + public int No { get; set; } + + public List PromptChoices { get; set; } + + public List ExpectedDefaultChoices { get; set; } + + public List ExpectedPromptMessages { get; set; } + + public List ExpectedPromptCaptions { get; set; } + + public PromptAnswer DefaultAnswer { get; set; } + + private int promptCounter; + + public CustomerPSHostUserInterface() + { + WarningStream = new List(); + + VerboseStream = new List(); + + DebugStream = new List(); + + ProgressStream = new List(); + + PromptChoices = new List(); + + ExpectedPromptMessages = new List(); + + ExpectedPromptCaptions = new List(); + + ExpectedDefaultChoices = new List(); + + promptCounter = 0; + + DefaultAnswer = PromptAnswer.Yes; + + Yes = PowerShellCustomConfirmation.Yes; + + No = PowerShellCustomConfirmation.No; + } + + public override Dictionary Prompt(string caption, string message, Collection descriptions) + { + throw new NotImplementedException(); + } + + public override int PromptForChoice(string caption, string message, Collection choices, int defaultChoice) + { + Assert.AreEqual( + ExpectedPromptMessages.Count, + ExpectedPromptCaptions.Count, + "The expected captions and expected messages lists must has equal length"); + + Assert.AreEqual( + ExpectedPromptCaptions.Count, + ExpectedDefaultChoices.Count, + "The expected captions and expected default choices lists must has equal length"); + + if (promptCounter < ExpectedPromptCaptions.Count) + { + Assert.AreEqual(ExpectedPromptCaptions[promptCounter], caption); + Assert.AreEqual(ExpectedPromptMessages[promptCounter], message); + Assert.AreEqual(ExpectedDefaultChoices[promptCounter], defaultChoice); + } + + if (promptCounter < PromptChoices.Count) + { + return PromptChoices[promptCounter++]; + } + else + { + switch (DefaultAnswer) + { + case PromptAnswer.DefaultChoice: + return defaultChoice; + case PromptAnswer.Yes: + return Yes; + case PromptAnswer.No: + return No; + default: + throw new Exception(); + } + } + } + + public override System.Management.Automation.PSCredential PromptForCredential(string caption, string message, string userName, string targetName, System.Management.Automation.PSCredentialTypes allowedCredentialTypes, System.Management.Automation.PSCredentialUIOptions options) + { + throw new NotImplementedException(); + } + + public override System.Management.Automation.PSCredential PromptForCredential(string caption, string message, string userName, string targetName) + { + throw new NotImplementedException(); + } + + public override PSHostRawUserInterface RawUI + { + get { return null; } + } + + public override string ReadLine() + { + throw new NotImplementedException(); + } + + public override System.Security.SecureString ReadLineAsSecureString() + { + throw new NotImplementedException(); + } + + public override void Write(ConsoleColor foregroundColor, ConsoleColor backgroundColor, string value) + { + throw new NotImplementedException(); + } + + public override void Write(string value) + { + throw new NotImplementedException(); + } + + public override void WriteDebugLine(string message) + { + DebugStream.Add(message); + } + + public override void WriteErrorLine(string value) + { + throw new NotImplementedException(); + } + + public override void WriteLine(string value) + { + throw new NotImplementedException(); + } + + public override void WriteProgress(long sourceId, System.Management.Automation.ProgressRecord record) + { + ProgressStream.Add(record); + } + + public override void WriteVerboseLine(string message) + { + VerboseStream.Add(message); + } + + public override void WriteWarningLine(string message) + { + WarningStream.Add(message); + } + } + + public enum PromptAnswer + { + DefaultChoice, + Yes, + No + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Common/PowerShellCommandMode.cs b/src/Common/Commands.ScenarioTest/Common/PowerShellCommandMode.cs new file mode 100644 index 000000000000..16b1184e0fff --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Common/PowerShellCommandMode.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.Common +{ + public enum PowerShellCommandMode + { + ServiceManagement, + ResourceManagement + } +} diff --git a/src/Common/Commands.ScenarioTest/Common/PowerShellExtensions.cs b/src/Common/Commands.ScenarioTest/Common/PowerShellExtensions.cs new file mode 100644 index 000000000000..e7e263a7b06d --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Common/PowerShellExtensions.cs @@ -0,0 +1,217 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Management.Automation; +using System.Management.Automation.Runspaces; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.Common +{ + public static class PowerShellExtensions + { + public static string PowerShellEnvironmentFormat = "Set-Item env:{0} \"{1}\""; + public static string PowerShellVariableFormat = "${0}={1}"; + public static string CredentialImportFormat = "Import-AzurePublishSettingsFile '{0}'"; + + /// + /// Gets a powershell varibale from the current session and convernts it back to it's original type. + /// + /// The powershell object original type + /// The PowerShell instance + /// The variable name + /// The variable object + public static T GetPowerShellVariable(this System.Management.Automation.PowerShell powershell, string name) + { + object obj = powershell.Runspace.SessionStateProxy.GetVariable(name); + + if (obj is PSObject) + { + return (T)(obj as PSObject).BaseObject; + } + else + { + return (T)obj; + } + } + + /// + /// Gets a powershell enumerable collection from the current session and convernts it back to it's original type. + /// + /// The powershell object original type + /// The PowerShell instance + /// The variable name + /// The collection in list + public static List GetPowerShellCollection(this System.Management.Automation.PowerShell powershell, string name) + { + List result = new List(); + + try + { + object[] objects = (object[])powershell.Runspace.SessionStateProxy.GetVariable(name); + + foreach (object item in objects) + { + if (item is PSObject) + { + result.Add((T)(item as PSObject).BaseObject); + } + else + { + result.Add((T)item); + } + } + } + catch (Exception) { /* Do nothing */ } + + return result; + } + + /// + /// Sets a new PSVariable to the current scope. + /// + /// The PowerShell instance + /// The variable name + /// The variable value + public static void SetVariable(this System.Management.Automation.PowerShell powershell, string name, object value) + { + powershell.Runspace.SessionStateProxy.SetVariable(name, value); + } + + /// + /// Logs a PowerShell exception thrown from PowerShell.Invoke, parsing the inner + /// PowerShell error record if available + /// + /// The exception to parse + public static void LogPowerShellException(this System.Management.Automation.PowerShell powershell, Exception runtimeException, TestContext context) + { + context.WriteLine("Caught Exception: {0}\n", runtimeException); + context.WriteLine("Message: {0}\n", runtimeException.Message); + IContainsErrorRecord recordContainer = runtimeException as IContainsErrorRecord; + if (recordContainer != null) + { + ErrorRecord record = recordContainer.ErrorRecord; + context.WriteLine("PowerShell Error Record: {0}\nException:{1}\nDetails:{2}\nScript Stack Trace: {3}\n: Target: {4}\n", record, record.Exception, record.ErrorDetails, record.ScriptStackTrace, record.TargetObject); + } + + if (runtimeException.InnerException != null) + { + powershell.LogPowerShellException(runtimeException.InnerException, context); + } + } + + /// + /// Log the PowerShell Streams from a PowerShell invocation + /// + /// The PowerShell instance to log + public static void LogPowerShellResults(this System.Management.Automation.PowerShell powershell, TestContext context) + { + powershell.LogPowerShellResults(null, context); + } + + /// + /// Log the PowerShell Streams from a PowerShell invocation + /// + /// The PowerShell instance to log + public static void LogPowerShellResults(this System.Management.Automation.PowerShell powershell, Collection output, TestContext context) + { + if (output != null) + { + LogPowerShellStream(output, "OUTPUT", context); + } + if (powershell.Commands != null && powershell.Commands.Commands != null && + powershell.Commands.Commands.Count > 0) + { + context.WriteLine("================== COMMANDS =======================\n"); + foreach (Command command in powershell.Commands.Commands) + { + context.WriteLine("{0}\n", command.CommandText); + } + + context.WriteLine("===================================================\n"); + } + + LogPowerShellStream(powershell.Streams.Debug, "DEBUG", context); + LogPowerShellStream(powershell.Streams.Error, "ERROR", context); + LogPowerShellStream(powershell.Streams.Progress, "PROGRESS", context); + LogPowerShellStream(powershell.Streams.Verbose, "VERBOSE", context); + LogPowerShellStream(powershell.Streams.Warning, "WARNING", context); + } + + /// + /// Add an environment variable to the PowerShell instance + /// + /// The powershell instance to alter + /// The variable name + /// The variable value + public static void AddEnvironmentVariable(this System.Management.Automation.PowerShell powerShell, string variableKey, string variableValue) + { + powerShell.AddScript(string.Format(PowerShellEnvironmentFormat, variableKey, variableValue)); + } + + /// + /// Add an environment variable to the PowerShell instance + /// + /// The powershell instance to alter + /// The variable name + /// The variable value + public static void AddPowerShellVariable(this System.Management.Automation.PowerShell powerShell, string variableKey, string variableValue) + { + powerShell.AddScript(string.Format(PowerShellVariableFormat, variableKey, variableValue)); + } + /// + /// Import credentials into PowerShell + /// + /// The PowerShell instance to alter + /// The fully qualified path top the credentials + public static void ImportCredentials(this System.Management.Automation.PowerShell powerShell, string credentialPath) + { + powerShell.AddScript(string.Format(CredentialImportFormat, credentialPath)); + } + + /// + /// Remove all credentials for the current user + /// + /// The PowerShell instance to use for removing credentials + public static void RemoveCredentials(this System.Management.Automation.PowerShell powerShell) + { + powerShell.AddScript("try {$sub = Get-AzureSubscription | Remove-AzureSubscription -Force} catch {}"); + } + + /// + /// Log a single PowerShell stream, using the given name + /// + /// The type of the internal data record (different for every stream) + /// The stream to log + /// The name of the stream to print in the log + private static void LogPowerShellStream(ICollection stream, string name, TestContext context) + { + if (stream != null && stream.Count > 0) + { + + context.WriteLine("---------------------------------------------------------------\n"); + context.WriteLine("{0} STREAM\n", name); + context.WriteLine("---------------------------------------------------------------\n"); + foreach (T item in stream) + { + context.WriteLine("{0}\n", item.ToString()); + } + context.WriteLine("---------------------------------------------------------------\n"); + context.WriteLine(""); + } + } + } +} diff --git a/src/Common/Commands.ScenarioTest/Common/PowerShellTest.cs b/src/Common/Commands.ScenarioTest/Common/PowerShellTest.cs new file mode 100644 index 000000000000..8408bf5c15d4 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Common/PowerShellTest.cs @@ -0,0 +1,115 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Common; +using Microsoft.WindowsAzure.Commands.ScenarioTest.Resources; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.Common +{ + [TestClass] + public class PowerShellTest + { + public static string ErrorIsNotEmptyException = "Test failed due to a non-empty error stream, check the error stream in the test log for more details"; + + protected System.Management.Automation.PowerShell powershell; + protected List modules; + + public TestContext TestContext { get; set; } + + public PowerShellTest(AzureModule commandMode, params string[] modules) + { + this.modules = new List(); + if (commandMode == AzureModule.AzureServiceManagement) + { + this.modules.Add(FileUtilities.GetContentFilePath(@"ServiceManagement\Azure\Azure.psd1")); + } + else if (commandMode == AzureModule.AzureResourceManager) + { + this.modules.Add(FileUtilities.GetContentFilePath(@"ResourceManager\AzureResourceManager\AzureResourceManager.psd1")); + } + else + { + throw new ArgumentException("Unknown command type for testing"); + } + this.modules.Add("Assert.ps1"); + this.modules.Add("Common.ps1"); + this.modules.AddRange(modules); + TestingTracingInterceptor.AddToContext(); + } + + protected void AddScenarioScript(string script) + { + powershell.AddScript(Test.Utilities.Common.Testing.GetTestResourceContents(script)); + } + + public virtual Collection RunPowerShellTest(params string[] scripts) + { + Collection output = null; + for (int i = 0; i < scripts.Length; ++i) + { + Console.WriteLine(scripts[i]); + powershell.AddScript(scripts[i]); + } + try + { + output = powershell.Invoke(); + + if (powershell.Streams.Error.Count > 0) + { + throw new RuntimeException(ErrorIsNotEmptyException); + } + + return output; + } + catch (Exception psException) + { + powershell.LogPowerShellException(psException, this.TestContext); + throw; + } + finally + { + powershell.LogPowerShellResults(output, this.TestContext); + } + } + + [TestInitialize] + public virtual void TestSetup() + { + powershell = System.Management.Automation.PowerShell.Create(); + + foreach (string moduleName in modules) + { + powershell.AddScript(string.Format("Import-Module \"{0}\"", Test.Utilities.Common.Testing.GetAssemblyTestResourcePath(moduleName))); + } + + powershell.AddScript("$VerbosePreference='Continue'"); + powershell.AddScript("$DebugPreference='Continue'"); + powershell.AddScript("$ErrorActionPreference='Stop'"); + powershell.AddScript("Write-Debug \"AZURE_TEST_MODE = $env:AZURE_TEST_MODE\""); + powershell.AddScript("Write-Debug \"TEST_HTTPMOCK_OUTPUT = $env:TEST_HTTPMOCK_OUTPUT\""); + } + + [TestCleanup] + public virtual void TestCleanup() + { + powershell.Dispose(); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/Common/ResourceManagerTestEnvironmentFactory.cs b/src/Common/Commands.ScenarioTest/Common/ResourceManagerTestEnvironmentFactory.cs new file mode 100644 index 000000000000..84c82f3d3920 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Common/ResourceManagerTestEnvironmentFactory.cs @@ -0,0 +1,82 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; +using Microsoft.WindowsAzure.Common.Internals; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.Common +{ + public class ResourceManagerTestEnvironmentFactory : TestEnvironmentFactory + { + /// + /// The environment variable name for CSM OrgId authentication + /// + /// Sample Value 1 - Get token from user and password: + /// TEST_CSM_ORGID_AUTHENTICATION=SubscriptionId={subscription-id};BaseUri=https://api-next.resources.windows-int.net/;UserId={user-id};Password={password} + /// + /// Sample Value 2 - Prompt for login credentials: + /// TEST_CSM_ORGID_AUTHENTICATION=SubscriptionId={subscription-id};AADAuthEndpoint=https://login.windows-ppe.net/;BaseUri=https://api-next.resources.windows-int.net/ + /// + const string TestCSMOrgIdConnectionStringKey = "TEST_CSM_ORGID_AUTHENTICATION"; + + /// + /// The full uri of the template gallery to use for this test run + /// + /// Sample Value 1: next uri + /// TEST_CSM_GALLERY_URI=https://next.gallery.azure-test.net + /// + const string TestCSMGalleryUri = "TEST_CSM_GALLERY_URI"; + + /// + /// Gallery for RDFENext environment + /// + const string DefaultGalleryUri = "https://next.gallery.azure-test.net"; + /// + /// Return the test environment created using CSM environment variables + /// + /// The test environment. + protected override TestEnvironment GetTestEnvironmentFromContext() + { + TestEnvironment environment = null; + try + { + environment = base.GetOrgIdTestEnvironment(TestCSMOrgIdConnectionStringKey); + } + catch (ArgumentException exception) + { + // allow running gallery tests + Tracing.Information("Node.exe was not found on the system, please install the x86 version of node.exe to run tests, received exception {0}", exception); + } + + string galleryUri = Environment.GetEnvironmentVariable(TestCSMGalleryUri); + if (null == environment) + { + // we shouild be able to run gallery tests, even if credentials are not set up + environment = new TestEnvironment(); + } + + if (!string.IsNullOrEmpty(galleryUri)) + { + environment.GalleryUri = new Uri(galleryUri); + } + else + { + environment.GalleryUri = new Uri(DefaultGalleryUri); + } + + return environment; + } + } +} diff --git a/src/Common/Commands.ScenarioTest/Common/ServiceManagementTestEnvironmentFactory.cs b/src/Common/Commands.ScenarioTest/Common/ServiceManagementTestEnvironmentFactory.cs new file mode 100644 index 000000000000..146ecc8bac3b --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Common/ServiceManagementTestEnvironmentFactory.cs @@ -0,0 +1,203 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Security.Cryptography.X509Certificates; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema; +using Microsoft.WindowsAzure.Common.Internals; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.Common +{ + public class ServiceManagementTestEnvironmentFactory : TestEnvironmentFactory + { + /// + /// The default name for a publishsettings file + /// + public const string DefaultPublishsettingsFilename = "default.publishsettings"; + + /// + /// The name of the environment variable that contains the connection string for connectiong to RDFE. + /// The connection string consists of a subscription, certificate credential or certificate reference, and [optional] Management URI + /// + /// Sample: TEST_CONNECTION_STRING=SubscriptionId={subscription-id};ManagementCertificate={cert-thumbprint};BaseUri=https://management.core.windows.net + /// + public const string TestCertificateConnectionStringKey = "TEST_CONNECTION_STRING"; + + /// + /// The name of an environment variable that provides the path to a publishsettings file that can provide management + /// credentials for these tests + /// + /// Sample: TEST_PUBLISHSETTINGS_FILE=C:\sample\path\mypublishsettings.publishsettings + /// + public const string TestPublishSettingsFileKey = "TEST_PUBLISHSETTINGS_FILE"; + + /// + /// The name of an environment variable that provides the path to a publishsettings file that can provide management + /// credentials for these tests + /// + /// Sample Value 1 - Get token from user and password: + /// TEST_ORGID_AUTHENTICATION=SubscriptionId={subscription-id};BaseUri={management-uri};UserId={user-id};Password={password} + /// + /// Sample Value 2 - Prompt for login credentials: + /// TEST_ORGID_AUTHENTICATION=SubscriptionId={subscription-id};AADAuthEndpoint={authority};BaseUri={management-uri} + /// + public const string TestOrgIdAuthenticationKey = "TEST_ORGID_AUTHENTICATION"; + + + /// + /// Get certificate test credentials and target management URI from environment variables + /// + /// A test environment containg credentials and target URI, or null if no environment is found + protected virtual TestEnvironment GetCertificateTestEnvironment() + { + TestEnvironment environment = null; + string testConnectionString = Environment.GetEnvironmentVariable(TestCertificateConnectionStringKey); + string testPublishSettingsString = Environment.GetEnvironmentVariable(TestPublishSettingsFileKey); + string defaultPublishSettingsFile = Path.Combine(Environment.CurrentDirectory, DefaultPublishsettingsFilename); + if (File.Exists(defaultPublishSettingsFile)) + { + Tracing.Information("Getting credentials from local publishsettings file: {0}", defaultPublishSettingsFile); + environment = GetTestEnvironmentFromPublishSettingsFile(defaultPublishSettingsFile); + } + else if (!string.IsNullOrEmpty(testPublishSettingsString)) + { + Tracing.Information("Getting credentials from publishsettings file in environment variable: {0}={1}", TestPublishSettingsFileKey, testPublishSettingsString); + environment = GetTestEnvironmentFromPublishSettingsFile(testPublishSettingsString); + } + else if (!string.IsNullOrEmpty(testConnectionString)) + { + Tracing.Information("Getting credentials from connection string in environment variable: {0}={1}", TestCertificateConnectionStringKey, testConnectionString); + environment = GetCertificateTestEnvironmentFromConnectionString(testConnectionString); + } + + return environment; + } + + /// + /// Get the test environment from a connection string specifying a certificate + /// + /// The connetcion string to parse + /// The test environment from parsing the connection string. + protected virtual TestEnvironment GetCertificateTestEnvironmentFromConnectionString(string testConnectionString) + { + IDictionary connections = ParseConnectionString(testConnectionString); + string certificateReference = connections[ManagementCertificateKey]; + string subscriptionId = connections[SubscriptionIdKey]; + Assert.IsNotNull(certificateReference); + X509Certificate2 managementCertificate; + if (IsCertificateReference(certificateReference)) + { + managementCertificate = GetCertificateFromReference(certificateReference); + } + else + { + managementCertificate = GetCertificateFromBase64String(certificateReference); + } + + CertificateCloudCredentials credentials = new CertificateCloudCredentials(subscriptionId, managementCertificate); + TestEnvironment currentEnvironment = new TestEnvironment { Credentials = credentials }; + if (connections.ContainsKey(BaseUriKey)) + { + currentEnvironment.BaseUri = new Uri(connections[BaseUriKey]); + } + + return currentEnvironment; + } + + /// + /// Get the test environment from a publish settings file + /// + /// The full path to the publish settings file + /// A Test environment with credentials and BaseUri set from the given PublishSettings file. + public static TestEnvironment GetTestEnvironmentFromPublishSettingsFile(string filePath) + { + PublishData data = XmlUtilities.DeserializeXmlFile(filePath); + string encodedCert = data.Items.First().ManagementCertificate; + if (string.IsNullOrEmpty(encodedCert)) + { + encodedCert = data.Items.First().Subscription.First().ManagementCertificate; + } + if (!string.IsNullOrEmpty(encodedCert)) + { + X509Certificate2 managementCert = GetCertificateFromBase64String(encodedCert); + data.Items.First().ManagementCertificate = managementCert.Thumbprint; + PublishDataPublishProfileSubscription subscription = data.Items.First().Subscription.First(); + subscription.ServiceManagementUrl = subscription.ServiceManagementUrl ?? + data.Items[0].Url; + return new TestEnvironment + { + BaseUri = new Uri(subscription.ServiceManagementUrl), + Credentials = new CertificateCloudCredentials(subscription.Id, managementCert) + }; + } + + throw new ArgumentException(string.Format("{0} is not a valid publish settings file, you must provide a valid publish settings " + + "file in the environment variable {1}", filePath, TestPublishSettingsFileKey)); + } + + /// + /// Determine if a given management certificate setting is a base-64 encoded certificate or a thumbprint certificate reference + /// + /// The certificate reference to check + /// True if the given string is a certificate reference, false if it is a base64-encoded certificate + static bool IsCertificateReference(string potentialReference) + { + return potentialReference.Length < 257; + } + + /// + /// Given a thumbprint string, retrieve the associated certificate + /// + /// The thumbprint string + /// The associated certificate + static X509Certificate2 GetCertificateFromReference(string thumbprint) + { + X509Store store = new X509Store(StoreName.My, StoreLocation.CurrentUser); + store.Open(OpenFlags.ReadOnly); + X509Certificate2Collection collection = store.Certificates.Find(X509FindType.FindByThumbprint, thumbprint, false); + return collection[0]; + } + + /// + /// Create a certificate from a base-64 encoded string + /// + /// The encoded string + /// The associated certificate + static X509Certificate2 GetCertificateFromBase64String(string base64String) + { + return new X509Certificate2(Convert.FromBase64String(base64String), string.Empty); + } + + /// + /// Create a Certificate based on current environment variables + /// + /// The RDFE test environment. + protected override TestEnvironment GetTestEnvironmentFromContext() + { + TestEnvironment environment = base.GetOrgIdTestEnvironment(TestOrgIdAuthenticationKey); + if (environment == null) + { + environment = this.GetCertificateTestEnvironment(); + } + + return environment; + } + } +} diff --git a/src/Common/Commands.ScenarioTest/Common/TestCredentialHelper.cs b/src/Common/Commands.ScenarioTest/Common/TestCredentialHelper.cs new file mode 100644 index 000000000000..e662faa85aa4 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Common/TestCredentialHelper.cs @@ -0,0 +1,158 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Collections.Specialized; +using System.Diagnostics; +using System.IO; +using System.Text.RegularExpressions; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Storage.Auth; +using Microsoft.WindowsAzure.Storage.Blob; +using Microsoft.WindowsAzure.Commands.Common; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.Common +{ + public class TestCredentialHelper + { + public static string EnvironmentPathFormat = "testcredentials-{0}"; + public static string EnvironmentVariableFile = "environment.yml"; + public static string PowerShellVariableFile = "variables.yml"; + public static string DefaultCredentialFile = "default.publishsettings"; + public static string WindowsAzureProfileFile = "WindowsAzureProfile.xml"; + public static string TestEnvironmentVariable = "AZURE_TEST_ENVIRONMENT"; + public static string StorageAccountVariable = "AZURE_STORAGE_ACCOUNT"; + public static string StorageAccountKeyVariable = "AZURE_STORAGE_ACCESS_KEY"; + public static string CredentialBlobUriFormat = "https://{0}.blob.core.windows.net"; + + private string downloadDirectoryPath = null; + private Dictionary environment = new Dictionary(); + public Dictionary PowerShellVariables { get; private set; } + + public TestCredentialHelper(string downloadPath) + { + string environmentFile = Path.Combine(downloadPath, EnvironmentVariableFile); + string variableFile = Path.Combine(downloadPath, PowerShellVariableFile); + this.downloadDirectoryPath = downloadPath; + PowerShellVariables = new Dictionary(); + if (!File.Exists(environmentFile)) + { + Process currentProcess = Process.GetCurrentProcess(); + StringDictionary environment = currentProcess.StartInfo.EnvironmentVariables; + Assert.IsTrue(environment.ContainsKey(TestEnvironmentVariable), + string.Format("You must define a test environment using environment variable {0}", TestEnvironmentVariable)); + string testEnvironment = environment[TestEnvironmentVariable]; + Assert.IsTrue(environment.ContainsKey(StorageAccountVariable), + string.Format("You must define a storage account for credential download using environment variable {0}", StorageAccountVariable)); + string storageAccount = environment[StorageAccountVariable]; + Assert.IsTrue(environment.ContainsKey(StorageAccountKeyVariable), + string.Format("You must define a storage account key for credential download using environment variable {0}", StorageAccountKeyVariable)); + string storageAccountKey = environment[StorageAccountKeyVariable]; + DownloadTestCredentials(environment[TestEnvironmentVariable], + downloadPath, string.Format(CredentialBlobUriFormat, storageAccount), + storageAccount, environment[StorageAccountKeyVariable]); + Assert.IsTrue(File.Exists(environmentFile), string.Format("Did not download file {0}", environmentFile)); + Assert.IsTrue(File.Exists(variableFile), string.Format("Did not download file {0}", variableFile)); + } + + AddPowerShellVariables(variableFile); + AddEnvironmentVariables(environmentFile); + } + + public void SetupPowerShellEnvironment(System.Management.Automation.PowerShell powerShell) + { + this.SetupPowerShellEnvironment(powerShell, DefaultCredentialFile, WindowsAzureProfileFile); + } + + public void SetupPowerShellEnvironment(System.Management.Automation.PowerShell powerShell, string credentials, string profile) + { + powerShell.RemoveCredentials(); + string profileFile = Path.Combine(this.downloadDirectoryPath, profile); + + if (File.Exists(profileFile)) + { + string dest = Path.Combine(AzurePowerShell.ProfileDirectory, profile); + powerShell.AddScript(string.Format("Copy-Item -Path '{0}' -Destination '{1}' -Force", profileFile, dest)); + powerShell.AddScript("[Microsoft.WindowsAzure.Commands.Utilities.Common.AzureProfile]::Instance.Load()"); + } + else + { + string credentialFile = Path.Combine(this.downloadDirectoryPath, credentials); + Assert.IsTrue(File.Exists(credentialFile), string.Format("Did not download file {0}", credentialFile)); + Console.WriteLine("Using default.PublishSettings for setting up credentials"); + powerShell.ImportCredentials(credentialFile); + } + + foreach (string key in this.environment.Keys) powerShell.AddEnvironmentVariable(key, environment[key]); + foreach (string key in this.PowerShellVariables.Keys) powerShell.SetVariable(key, PowerShellVariables[key]); + } + + public static void ImportCredentails(System.Management.Automation.PowerShell powerShell, string credentialFile) + { + powerShell.RemoveCredentials(); + powerShell.ImportCredentials(credentialFile); + } + + public static void DownloadTestCredentials(string testEnvironment, string downloadDirectoryPath, string blobUri, string storageAccount, string storageKey) + { + string containerPath = string.Format(EnvironmentPathFormat, testEnvironment); + StorageCredentials credentials = new StorageCredentials(storageAccount, storageKey); + CloudBlobClient blobClient = new CloudBlobClient(new Uri(blobUri), credentials); + CloudBlobContainer container = blobClient.GetContainerReference(containerPath); + foreach (IListBlobItem blobItem in container.ListBlobs()) + { + ICloudBlob blob = blobClient.GetBlobReferenceFromServer(blobItem.Uri); + Console.WriteLine("Downloading file {0} from blob Uri {1}", blob.Name, blob.Uri); + FileStream blobStream = new FileStream(Path.Combine(downloadDirectoryPath, blob.Name), FileMode.Create); + blob.DownloadToStream(blobStream); + blobStream.Flush(); + blobStream.Close(); + } + } + + public void AddEnvironmentVariables(string environmentPath) + { + LoadYmlSettingsFile(environmentPath, (x, y) => this.environment[x] = y); + } + + public void AddPowerShellVariables(string powerShellVariablePath) + { + LoadYmlSettingsFile(powerShellVariablePath, (x, y) => this.PowerShellVariables[x] = y); + } + + private static void LoadYmlSettingsFile(string filePath, Action settingAction) + { + using (StreamReader reader = new StreamReader(filePath)) + { + string currentLine = null; + do + { + currentLine = reader.ReadLine(); + if (!string.IsNullOrEmpty(currentLine)) + { + Regex lineFormat = new Regex(@":*\s+"); + string[] values = lineFormat.Split(currentLine, 2); + if (values != null && values.Length > 1) + { + settingAction(values[0], values[1]); + } + } + } + while (currentLine != null); + } + } + } +} diff --git a/src/Common/Commands.ScenarioTest/Common/TestEnvironment.cs b/src/Common/Commands.ScenarioTest/Common/TestEnvironment.cs new file mode 100644 index 000000000000..05e6907137eb --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Common/TestEnvironment.cs @@ -0,0 +1,84 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.Common +{ + using Microsoft.IdentityModel.Clients.ActiveDirectory; + using System; + public class TestEnvironment + { + private bool CustomUri = false; + private Uri _BaseUri; + + public Uri BaseUri + { + get + { + return this._BaseUri; + } + + set + { + this.CustomUri = true; + this._BaseUri = value; + } + } + + public Uri GalleryUri + { + get; + set; + } + + public Uri ActiveDirectoryEndpoint + { + get; + set; + } + + public CloudCredentials Credentials + { + get; + set; + } + + public string UserName + { + get; + set; + } + + public string StorageAccount + { + get; + set; + } + + public string SubscriptionId + { + get; + set; + } + + public bool UsesCustomUri() + { + return this.CustomUri; + } + + public AuthenticationResult AuthenticationResult { get; set; } + } +} diff --git a/src/Common/Commands.ScenarioTest/Common/TestEnvironmentFactory.cs b/src/Common/Commands.ScenarioTest/Common/TestEnvironmentFactory.cs new file mode 100644 index 000000000000..a75a1e1cc978 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Common/TestEnvironmentFactory.cs @@ -0,0 +1,198 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; +using System.Collections.Generic; +using Microsoft.Azure.Utilities.HttpRecorder; +using Microsoft.WindowsAzure.Common.Internals; +using Newtonsoft.Json.Linq; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.Common +{ + using System; + using Microsoft.IdentityModel.Clients.ActiveDirectory; + public abstract class TestEnvironmentFactory + { + /// + /// The key inside the connection string for the management certificate + /// + public const string ManagementCertificateKey = ConnectionStringFields.ManagementCertificate; + + /// + /// The key inside the connection string for the subscription identifier + /// + public const string SubscriptionIdKey = ConnectionStringFields.SubscriptionId; + + /// + /// The key inside the connection string for the subscription identifier + /// + public const string AADUserIdKey = ConnectionStringFields.UserId; + + /// + /// The key inside the connection string for the subscription identifier + /// + public const string AADPasswordKey = ConnectionStringFields.Password; + + /// + /// The key inside the connection string for the base management URI + /// + public const string BaseUriKey = ConnectionStringFields.BaseUri; + + /// + /// The key inside the connection string for the AAD client ID" + /// + public const string ClientID = ConnectionStringFields.AADClientId; + public const string ClientIdDefault = "1950a258-227b-4e31-a9cf-717495945fc2"; + + /// + /// The key inside the connection string for the AAD authentication endpoint + /// + public const string AADAuthEndpoint = ConnectionStringFields.AADAuthenticationEndpoint; + public const string AADAuthEndpointDefault = "https://login.windows-ppe.net/"; + /// + /// The key inside the connection string for the AAD Tenant + /// + public const string AADTenant = ConnectionStringFields.AADTenant; + public const string AADTenantDefault = "common"; + + public const string StorageAccountKey = "AZURE_STORAGE_ACCOUNT"; + + /// + /// A raw token to be used for authentication with the give subscription ID + /// + public const string RawToken = ConnectionStringFields.RawToken; + + public virtual TestEnvironment GetTestEnvironment() + { + var env = this.GetTestEnvironmentFromContext(); + env.StorageAccount = Environment.GetEnvironmentVariable(StorageAccountKey); + return env; + } + + protected abstract TestEnvironment GetTestEnvironmentFromContext(); + + /// + /// Return test credentials and URI using AAD auth for an OrgID account. Use this emthod with causion, it may take a dependency on ADAL + /// + /// The test credentials, or null if nthe appropriate environment variablke is not set. + protected virtual TestEnvironment GetOrgIdTestEnvironment(string orgIdVariable) + { + TestEnvironment orgIdEnvironment = null; + string orgIdAuth = GetOrgId(orgIdVariable); + if (!string.IsNullOrEmpty(orgIdAuth)) + { + string token = null; + IDictionary authSettings = ParseConnectionString(orgIdAuth); + string subscription = authSettings[SubscriptionIdKey]; + string authEndpoint = authSettings.ContainsKey(AADAuthEndpoint) ? authSettings[AADAuthEndpoint] : AADAuthEndpointDefault; + string tenant = authSettings.ContainsKey(AADTenant) ? authSettings[AADTenant] : AADTenantDefault; + string user = null; + AuthenticationResult result = null; + + if (authSettings.ContainsKey(AADUserIdKey)) + { + user = authSettings[AADUserIdKey]; + } + + // Preserve/restore subscription ID + if (HttpMockServer.Mode == HttpRecorderMode.Record) + { + HttpMockServer.Variables[SubscriptionIdKey] = subscription; + if (authSettings.ContainsKey(AADUserIdKey) && authSettings.ContainsKey(AADPasswordKey)) + { + + string password = authSettings[AADPasswordKey]; + Tracing.Information("Using AAD auth with username and password combination"); + token = TokenCloudCredentialsHelper.GetTokenFromBasicCredentials(user, password, authEndpoint, tenant); + } + else + { + Tracing.Information("Using AAD auth with pop-up dialog"); + string clientId = authSettings.ContainsKey(ClientID) ? authSettings[ClientID] : ClientIdDefault; + if (authSettings.ContainsKey(RawToken)) + { + token = authSettings[RawToken]; + } + else + { + result = TokenCloudCredentialsHelper.GetToken(authEndpoint, tenant, clientId); + token = result.CreateAuthorizationHeader().Substring("Bearer ".Length); + } + } + } + + if (HttpMockServer.Mode == HttpRecorderMode.Playback) + { + // playback mode but no stored credentials in mocks + Tracing.Information("Using dummy token for playback"); + token = Guid.NewGuid().ToString(); + } + + orgIdEnvironment = new TestEnvironment + { + Credentials = token == null ? null : new TokenCloudCredentials(subscription, token), + UserName = user, + AuthenticationResult = result + }; + + if (authSettings.ContainsKey(BaseUriKey)) + { + orgIdEnvironment.BaseUri = new Uri(authSettings[BaseUriKey]); + } + + if (!string.IsNullOrEmpty(authEndpoint)) + { + orgIdEnvironment.ActiveDirectoryEndpoint = new Uri(authEndpoint); + } + + orgIdEnvironment.SubscriptionId = subscription; + } + + return orgIdEnvironment; + } + + private static string GetOrgId(string orgIdVariable) + { + string connectionString = Environment.GetEnvironmentVariable(orgIdVariable); + if (string.IsNullOrEmpty(connectionString)) + { + JObject dummyTestConnectionString = JObject.Parse(Properties.Resources.CsmTestDummy); + connectionString = dummyTestConnectionString.SelectToken(orgIdVariable).Value(); + } + + return connectionString; + } + /// + /// Break up the connection string into key-value pairs + /// + /// The connection string to parse + /// A dictionary of keys and values from the connection string + public static IDictionary ParseConnectionString(string connectionString) + { + // hacky connection string parser. We should replace with more robust connection strign parsing + IDictionary settings = new Dictionary(); + string[] pairs = connectionString.Split(new char[] { ';' }); + foreach (string pair in pairs) + { + string[] keyValue = pair.Split(new char[] { '=' }, 2); + string key = keyValue[0].Trim(); + string value = keyValue[1].Trim(); + settings[key] = value; + } + + return settings; + } + } +} diff --git a/src/Common/Commands.ScenarioTest/Common/TokenCloudCredentialsHelper.cs b/src/Common/Commands.ScenarioTest/Common/TokenCloudCredentialsHelper.cs new file mode 100644 index 000000000000..e3c9cc82a265 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Common/TokenCloudCredentialsHelper.cs @@ -0,0 +1,334 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; +using System.Diagnostics; +using System.IO; +using System.IO.Packaging; +using System.Reflection; +using System.Text; +using System.Threading; +using Microsoft.IdentityModel.Clients.ActiveDirectory; +using Microsoft.IdentityModel.Clients.ActiveDirectory.Internal; +using Microsoft.WindowsAzure.Common.Internals; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.Common +{ + /// + /// Helper for TokenCloudCredentials + /// + public class TokenCloudCredentialsHelper + { + private const int Success = 0; + private static string ProcessExecuteException = "Process executed with exit code {0} and error {1}"; + private static string ProcessExecuteInfo = "Process ececuted with exit code {0} and standard output {1}"; + private static string ProcessExecuteErrorTrace = "Error in process execution: Process exited with code {0} standrad out {1} and standard error {2}"; + private static string NodeAuthenticationArgumentFormat = "index.js -u \"{0}\" -p \"{1}\" -a \"{2}\" -t \"{3}\" token"; + private static string CommandDoesNotExist = " The {0} executable was not found on this system: Please install {0} to continue"; + private static string TokenCreationResourceName = "Microsoft.WindowsAzure.Commands.ScenarioTest.Resources.node-token.zip"; + private static string NodeExe = "nodejs\\node.exe"; + private static string TokenScriptFolder = "node-token"; + private static string JsTokenCodeLocation = Path.GetTempPath(); + + /// + /// Returns token (requires user input) + /// + /// + public static AuthenticationResult GetToken(string authEndpoint, string tenant, string clientId) + { + var adalWinFormType = typeof(WebBrowserNavigateErrorEventArgs); + Trace.WriteLine("Getting a random type from \'Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms\' to force it be deployed by mstest"); + + AuthenticationResult result = null; + var thread = new Thread(() => + { + try + { + var context = new AuthenticationContext(Path.Combine(authEndpoint, tenant)); + + result = context.AcquireToken( + resource: "https://management.core.windows.net/", + clientId: clientId, + redirectUri: new Uri("urn:ietf:wg:oauth:2.0:oob"), + promptBehavior: PromptBehavior.Auto); + } + catch (Exception threadEx) + { + Console.WriteLine(threadEx.Message); + } + }); + + thread.SetApartmentState(ApartmentState.STA); + thread.Name = "AcquireTokenThread"; + thread.Start(); + thread.Join(); + + return result; + + } + + /// + /// Get an AAD token using user and password credentials against a login authority + /// + /// The username credential. + /// The password credential. + /// The login authority. + /// + public static string GetTokenFromBasicCredentials(string user, string password, string authority = "https://login.windows-ppe.net", string tenant = "common") + { + EnsureTokenCreationEnvironment(); + authority = EnsureNoTrailingSlash(authority); + return GetAADToken(user, password, authority, tenant); + + } + + /// + /// Remove trailing slashes from a string + /// + /// The tring to remove slashes from. + /// The input string with trailing slashes removed + private static string EnsureNoTrailingSlash(string authority) + { + StringBuilder returnValue = new StringBuilder(authority); + if (returnValue.Length > 0) + { + while (returnValue[returnValue.Length - 1] == '/') + { + returnValue.Remove(returnValue.Length - 1, 1); + } + } + + return returnValue.ToString(); + } + + /// + /// Get an aad token given a username, password, and authority + /// + /// The user login credential. + /// The password login credential. + /// The authority to use for login. + /// The authentication access token to use for the given user and password for this authority + private static string GetAADToken(string user, string password, string authority, string tenant) + { + return GetProcessResult( + GetNodePath(), + string.Format(NodeAuthenticationArgumentFormat, user, password, authority, tenant), + (output, exitCode) => + exitCode == Success && !output.Contains("Error")); + } + + /// + /// Get the path of the node executable on this system + /// + /// The path of the node executable + private static string GetNodePath() + { + foreach (Environment.SpecialFolder folder in new[] { Environment.SpecialFolder.ProgramFiles, Environment.SpecialFolder.ProgramFilesX86 }) + { + string testPath = Path.Combine(Environment.GetFolderPath(folder), NodeExe); + if (File.Exists(testPath)) + { + return testPath; + } + } + + throw new ArgumentException(string.Format(CommandDoesNotExist, NodeExe)); + } + + /// + /// Run the given command and arguments and return the result returned in standard output + /// + /// The path to the command to execute. + /// The arguments to pass to the command. + /// A predicate to tell whether command execution was successful or not. + /// The value of standard output for the execution fo the command. + private static string GetProcessResult(string path, string arguments, Func IsSuccess) + { + Process executor = null; + try + { + ProcessStartInfo startInfo = new ProcessStartInfo(path, arguments); + startInfo.CreateNoWindow = true; + startInfo.RedirectStandardOutput = true; + startInfo.RedirectStandardError = true; + startInfo.WorkingDirectory = Path.Combine(JsTokenCodeLocation, TokenScriptFolder); + startInfo.UseShellExecute = false; + executor = Process.Start(startInfo); + string returnValue = GetProcessStreamValue(executor.StandardOutput); + executor.WaitForExit(10000); + int exitCode = executor.ExitCode; + Tracing.Information(ProcessExecuteInfo, exitCode, returnValue); + if (IsSuccess(returnValue, exitCode)) + { + return CleanConsoleOutputString(returnValue); + } + else + { + string errorValue = GetProcessStreamValue(executor.StandardError); + Tracing.Information(ProcessExecuteErrorTrace, exitCode, returnValue, errorValue); + throw new Exception(string.Format(ProcessExecuteException, executor.ExitCode, errorValue)); + } + } + finally + { + if (null != executor) + { + executor.Dispose(); + } + } + } + + /// + /// Remove unprintable characters from a console output string + /// + /// The string to clean up. + /// The input string, with non-printable characters removed. + private static string CleanConsoleOutputString(string inString) + { + StringBuilder builder = new StringBuilder(); + foreach (char current in inString) + { + if (IsPrintableChar(current)) + { + builder.Append(current); + } + } + return builder.ToString(); + } + + /// + /// Determine if the character is printable + /// + /// + /// + private static bool IsPrintableChar(char current) + { + return !(char.IsControl(current) || char.IsSymbol(current)); + } + + /// + /// Convert a stream reader to a string + /// + /// The stream reader to use + /// The contents of the stream as a string. + private static string GetProcessStreamValue(StreamReader streamReader) + { + return streamReader.ReadToEnd(); + } + + /// + /// Ensure that all tools required for token authentication are installed on the server + /// + private static void EnsureTokenCreationEnvironment() + { + if (!TokenCreationEnvironmentInitialized()) + { + string zipFilePath = Path.Combine(Environment.CurrentDirectory, Path.GetFileNameWithoutExtension(Path.GetTempFileName()) + ".zip"); + CopyResourceToFile(TokenCreationResourceName, zipFilePath); + ExtractZipFile(zipFilePath, JsTokenCodeLocation); + } + + } + + /// + /// Extract the zip file to the current directory + /// + /// + /// + private static void ExtractZipFile(string zipFilePath, string outputDir) + { + using (Package package = Package.Open(zipFilePath, FileMode.Open, FileAccess.Read)) + { + if (!Directory.Exists(outputDir)) + { + Directory.CreateDirectory(outputDir); + } + foreach (PackagePart part in package.GetParts()) + { + string target = Path.Combine(outputDir, part.Uri.OriginalString.Replace("/", "\\").Trim(new[] { '\\' })); + string parentDirectory = Path.GetDirectoryName(target); + Directory.CreateDirectory(parentDirectory); + + using (Stream source = part.GetStream(FileMode.Open, FileAccess.Read)) + using (Stream destination = File.OpenWrite(target)) + { + byte[] buffer = new byte[0x1000]; + int read; + while ((read = source.Read(buffer, 0, buffer.Length)) > 0) + { + destination.Write(buffer, 0, read); + } + } + } + } + } + + private static string CreateFilenameFromUri(Uri uri) + { + char[] invalidChars = Path.GetInvalidFileNameChars(); + StringBuilder sb = new StringBuilder(uri.OriginalString.Length); + foreach (char c in uri.OriginalString) + { + sb.Append(Array.IndexOf(invalidChars, c) < 0 ? c : '_'); + } + return sb.ToString(); + } + + /// + /// Copy abinary resource to a file + /// + /// The fully qualified name of the resource + /// The name of the file it was copied to + public static void CopyResourceToFile(string resourceName, string fileName) + { + const int ReadSize = 2048; + Stream resourceStream = null; + FileStream resourceFileStream = null; + try + { + resourceStream = Assembly.GetExecutingAssembly() + .GetManifestResourceStream(resourceName); + resourceFileStream = new FileStream(fileName, FileMode.Create); + byte[] buffer = new byte[ReadSize]; + int readBytes = 0; + while ((readBytes = resourceStream.Read(buffer, 0, ReadSize)) > 0) + { + resourceFileStream.Write(buffer, 0, readBytes); + } + } + finally + { + if (resourceFileStream != null) + { + resourceFileStream.Close(); + } + + if (resourceStream != null) + { + resourceStream.Close(); + } + } + } + + /// + /// Determines if the token creation script exists in the directory + /// + /// True if the environment has been created, othwerwise false + private static bool TokenCreationEnvironmentInitialized() + { + return Directory.Exists(Path.Combine(JsTokenCodeLocation, TokenScriptFolder)); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/Common/WindowsAzurePowerShellCertificateTest.cs b/src/Common/Commands.ScenarioTest/Common/WindowsAzurePowerShellCertificateTest.cs new file mode 100644 index 000000000000..121bba1156f6 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Common/WindowsAzurePowerShellCertificateTest.cs @@ -0,0 +1,108 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.ObjectModel; +using System.IO; +using System.Management.Automation; +using Microsoft.Azure.Utilities.HttpRecorder; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Testing; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.Common +{ + [TestClass] + public class AzurePowerShellCertificateTest : PowerShellTest + { + protected TestCredentialHelper credentials; + protected string credentialFile; + protected string profileFile; + + // Location where test output will be written to e.g. C:\Temp + private static string outputDirKey = "TEST_HTTPMOCK_OUTPUT"; + + private bool runningMocked = false; + + private void OnClientCreated(object sender, ClientCreatedArgs e) + { + e.AddHandlerToClient(HttpMockServer.CreateInstance()); + } + + public AzurePowerShellCertificateTest(params string[] modules) + : base(AzureModule.AzureServiceManagement, modules) + { + this.runningMocked = (HttpMockServer.GetCurrentMode() == HttpRecorderMode.Playback); + TestMockSupport.RunningMocked = this.runningMocked; + if (this.runningMocked) + { + AzureSession.AuthenticationFactory = new MockTokenAuthenticationFactory(); + string dummyCredentialFile = Path.Combine(Environment.CurrentDirectory, TestCredentialHelper.DefaultCredentialFile); + if (!File.Exists(dummyCredentialFile)) + { + ProfileClient.DataStore.WriteFile(dummyCredentialFile, Properties.Resources.RdfeTestDummy); + } + this.credentialFile = dummyCredentialFile; + } + else + { + this.credentials = new TestCredentialHelper(Environment.CurrentDirectory); + this.credentialFile = TestCredentialHelper.DefaultCredentialFile; + this.profileFile = TestCredentialHelper.WindowsAzureProfileFile; + } + ProfileClient.DataStore = new MockDataStore(); + + if (Environment.GetEnvironmentVariable(outputDirKey) != null) + { + HttpMockServer.RecordsDirectory = Environment.GetEnvironmentVariable(outputDirKey); + } + } + + public override Collection RunPowerShellTest(params string[] scripts) + { + HttpMockServer.Initialize(this.GetType(), TestUtilities.GetCurrentMethodName(2)); + return base.RunPowerShellTest(scripts); + } + + [TestInitialize] + public override void TestSetup() + { + base.TestSetup(); + if (this.runningMocked) + { + TestCredentialHelper.ImportCredentails(powershell, this.credentialFile); + } + else + { + this.credentials.SetupPowerShellEnvironment(powershell, this.credentialFile, this.profileFile); + System.Net.ServicePointManager.ServerCertificateValidationCallback += (se, cert, chain, sslerror) => + { + return true; + }; + } + } + + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + if (!this.runningMocked && HttpMockServer.CallerIdentity != null) + { + HttpMockServer.Flush(); + } + } + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/CredentialTests/AddAccountForArmTests.cs b/src/Common/Commands.ScenarioTest/CredentialTests/AddAccountForArmTests.cs new file mode 100644 index 000000000000..2ccf8513cb62 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/CredentialTests/AddAccountForArmTests.cs @@ -0,0 +1,44 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Xunit; +using Xunit.Extensions; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.CredentialTests +{ + public class AddAccountForArmTests : CredentialTestBase + { + public AddAccountForArmTests() : + base(AzureModule.AzureResourceManager) + { + } + + + [Theory] + [Trait(Category.RunType, Category.LiveOnly)] + [InlineData("Test-AddOrgIdWithSingleSubscription")] + [InlineData("Test-NonInteractiveFPOLoginFails")] + [InlineData("Test-MicrosoftAccountNotSupportedForNonInteractiveLogin")] + [InlineData("Test-AddServicePrincipalToEmptyProfile")] + [InlineData("Test-LoginWithUserAndServicePrincipal")] + [InlineData("Test-LoginWithServicePrincipalAndUser")] + [InlineData("Test-ServicePrincipalExclusiveLogout")] + [InlineData("Test-ServicePrincipalLogoutWithUserOnSameSubscription")] + public void RunTests(string testScript) + { + RunPowerShellTest(testScript); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/CredentialTests/CredentialTestBase.cs b/src/Common/Commands.ScenarioTest/CredentialTests/CredentialTestBase.cs new file mode 100644 index 000000000000..fd75b199535b --- /dev/null +++ b/src/Common/Commands.ScenarioTest/CredentialTests/CredentialTestBase.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.ObjectModel; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.CredentialTests +{ + public abstract class CredentialTestBase + { + private readonly CredentialTestHelper helper; + private readonly AzureModule commandMode; + private const string modulePathFormat = @"Resources\CredentialTests\{0}.ps1"; + + protected CredentialTestBase(AzureModule commandMode) + { + helper = new CredentialTestHelper(); + this.commandMode = commandMode; + } + + protected virtual Collection RunPowerShellTest(params string[] scripts) + { + helper.SetupModules(commandMode, + new[] { + "Common", + GetType().Name + }.Select(m => string.Format(modulePathFormat, m)).ToArray()); + + return helper.RunPowerShellTest(scripts); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/CredentialTests/CredentialTestHelper.cs b/src/Common/Commands.ScenarioTest/CredentialTests/CredentialTestHelper.cs new file mode 100644 index 000000000000..04b590c9d0a0 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/CredentialTests/CredentialTestHelper.cs @@ -0,0 +1,113 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.CredentialTests +{ + internal class CredentialTestHelper + { + private List modules; + + public CredentialTestHelper() + { + ProfileClient.DataStore = new MockDataStore(); + // Ignore SSL errors + System.Net.ServicePointManager.ServerCertificateValidationCallback += (se, cert, chain, sslerror) => true; + } + + public void SetupModules(AzureModule mode, params string[] testModules) + { + modules = new List(); + switch (mode) + { + case AzureModule.AzureProfile: + modules.Add(@"ServiceManagement\Azure\Azure.psd1"); + modules.Add(@"ResourceManager\AzureResourceManager\AzureResourceManager.psd1"); + break; + + case AzureModule.AzureServiceManagement: + modules.Add(@"ServiceManagement\Azure\Azure.psd1"); + break; + + case AzureModule.AzureResourceManager: + modules.Add(@"ResourceManager\AzureResourceManager\AzureResourceManager.psd1"); + break; + + default: + throw new ArgumentException("Unknown command type for testing"); + } + modules.Add("Assert.ps1"); + modules.Add("Common.ps1"); + modules.AddRange(testModules); + } + + public virtual Collection RunPowerShellTest(params string[] scripts) + { + using (var powershell = System.Management.Automation.PowerShell.Create()) + { + SetupPowerShellModules(powershell); + + Collection output = null; + for (int i = 0; i < scripts.Length; ++i) + { + Console.WriteLine(scripts[i]); + powershell.AddScript(scripts[i]); + } + try + { + output = powershell.Invoke(); + + if (powershell.Streams.Error.Count > 0) + { + throw new RuntimeException( + "Test failed due to a non-empty error stream, check the error stream in the test log for more details."); + } + return output; + } + catch (Exception psException) + { + powershell.LogPowerShellException(psException); + throw; + } + finally + { + powershell.LogPowerShellResults(output); + } + } + } + + private void SetupPowerShellModules(System.Management.Automation.PowerShell powershell) + { + powershell.AddScript(string.Format("cd \"{0}\"", Environment.CurrentDirectory)); + + foreach (string moduleName in modules) + { + powershell.AddScript(string.Format("Import-Module \".\\{0}\"", moduleName)); + } + + powershell.AddScript("$VerbosePreference='Continue'"); + powershell.AddScript("$DebugPreference='Continue'"); + powershell.AddScript("$ErrorActionPreference='Stop'"); + powershell.AddScript("Write-Debug \"AZURE_TEST_MODE = $env:AZURE_TEST_MODE\""); + powershell.AddScript("Write-Debug \"TEST_HTTPMOCK_OUTPUT = $env:TEST_HTTPMOCK_OUTPUT\""); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/CredentialTests/CredentialTests.cs b/src/Common/Commands.ScenarioTest/CredentialTests/CredentialTests.cs new file mode 100644 index 000000000000..406e7db3cedf --- /dev/null +++ b/src/Common/Commands.ScenarioTest/CredentialTests/CredentialTests.cs @@ -0,0 +1,21 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.CredentialTests +{ + + class CredentialTests + { + } +} diff --git a/src/Common/Commands.ScenarioTest/MSSharedLibKey.snk b/src/Common/Commands.ScenarioTest/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/Common/Commands.ScenarioTest/MSSharedLibKey.snk differ diff --git a/src/Common/Commands.ScenarioTest/ManagementTests/ManagementTests.cs b/src/Common/Commands.ScenarioTest/ManagementTests/ManagementTests.cs new file mode 100644 index 000000000000..7acb71b2984a --- /dev/null +++ b/src/Common/Commands.ScenarioTest/ManagementTests/ManagementTests.cs @@ -0,0 +1,69 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ScenarioTest.Common; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.ManagementTests +{ + [TestClass] + public class ManagementTests : AzurePowerShellCertificateTest + { + public ManagementTests() + : base("Management\\ManagementTests.ps1") + { + + } + + #region Remove-AzureSubscription Scenario Tests + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Management)] + [TestCategory(Category.BVT)] + public void TestRemoveAzureSubscriptionWithDefaultSubscription() + { + RunPowerShellTest("Test-RemoveAzureSubscriptionWithDefaultSubscription"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Management)] + [TestCategory(Category.BVT)] + public void TestRemoveAzureSubscriptionWithNonExistingSubscription() + { + RunPowerShellTest("Test-RemoveAzureSubscriptionWithNonExistingSubscription"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Management)] + [TestCategory(Category.BVT)] + public void TestRemoveAzureSubscriptionWithEmptySubscription() + { + RunPowerShellTest("Test-RemoveAzureSubscriptionWithEmptySubscription"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Management)] + [TestCategory(Category.BVT)] + public void TestRemoveAzureSubscriptionWithWhatIf() + { + RunPowerShellTest("Test-RemoveAzureSubscriptionWithWhatIf"); + } + + #endregion + } +} diff --git a/src/Common/Commands.ScenarioTest/MediaServicesTests/MediaServicesTests.cs b/src/Common/Commands.ScenarioTest/MediaServicesTests/MediaServicesTests.cs new file mode 100644 index 000000000000..f0871bb75c72 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/MediaServicesTests/MediaServicesTests.cs @@ -0,0 +1,81 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ScenarioTest.Common; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.MediaServicesTests +{ + [TestClass] + public class MediaServicesTests : AzurePowerShellCertificateTest + { + public MediaServicesTests() + : base("MediaServices\\MediaServices.ps1") + { + + } + + [TestInitialize] + public override void TestSetup() + { + base.TestSetup(); + } + + [TestCleanup] + public override void TestCleanup() + { + powershell.AddScript("MediaServicesTest-Cleanup"); + powershell.Invoke(); + base.TestCleanup(); + } + + [TestCategory(Category.BVT)] + [TestCategory(Category.MediaServices)] + [TestMethod] + public void TestNewAzureMediaServicesKey() + { + RunPowerShellTest("Test-NewAzureMediaServicesKey"); + } + + [TestCategory(Category.BVT)] + [TestCategory(Category.MediaServices)] + [TestMethod] + public void TestRemoveAzureMediaServicesAccount() + { + RunPowerShellTest("Test-RemoveAzureMediaServicesAccount"); + } + + [TestCategory(Category.BVT)] + [TestCategory(Category.MediaServices)] + [TestMethod] + public void TestGetAzureMediaServicesAccount() + { + RunPowerShellTest("Test-GetAzureMediaServicesAccount"); + } + + [TestCategory(Category.BVT)] + [TestCategory(Category.MediaServices)] + [TestMethod] + public void TestGetAzureMediaServicesAccountByName() + { + RunPowerShellTest("Test-GetAzureMediaServicesAccountByName"); + } + + public void TestNewAzureMediaServiceAccountPassingStorageKey() + { + RunPowerShellTest("NewAzureMediaServicesAccountWithStorageKey"); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/Properties/AssemblyInfo.cs b/src/Common/Commands.ScenarioTest/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..212561426b75 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Properties/AssemblyInfo.cs @@ -0,0 +1,44 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft.WindowsAzure.Commands.ScenarioTest")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("8444a0b3-094e-4e3a-b240-cb69c7b6ad0c")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] +[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] diff --git a/src/Common/Commands.ScenarioTest/Properties/Resources.Designer.cs b/src/Common/Commands.ScenarioTest/Properties/Resources.Designer.cs new file mode 100644 index 000000000000..9574375c2895 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Properties/Resources.Designer.cs @@ -0,0 +1,94 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.18449 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.WindowsAzure.Commands.ScenarioTest.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to { + /// "TEST_CSM_ORGID_AUTHENTICATION":"SubscriptionId=0a496442-635f-4974-bda4-2d339b9a6b3c;BaseUri=https://api-dogfood.resources.windows-int.net/;UserId=admin@aad18.ccsctp.net;AADAuthEndpoint=https://login.windows-ppe.net/", + /// "TEST_ORGID_AUTHENTICATION":"SubscriptionId=0a496442-635f-4974-bda4-2d339b9a6b3c;BaseUri=https://management-preview.core.windows-int.net/", + ///}. + /// + internal static string CsmTestDummy { + get { + return ResourceManager.GetString("CsmTestDummy", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?> + ///<PublishData> + /// <PublishProfile + /// SchemaVersion="2.0" + /// PublishMethod="AzureServiceManagementAPI"> + /// <!-- this subscriptions contains same subscription id used for recording, and a dummy certificate--> + /// <Subscription + /// ServiceManagementUrl="https://management.core.windows.net" + /// Id="2c224e7e-3ef5-431d-a57b-e71f4662e3a6" + /// Name="Node CLI Test" + /// ManagementCertificate="MIIC8jCCAdqgAwIBAgIQEtPvu8+LaLVIs/Kjh+uqSDANBgkqhkiG9w0BAQUFADAXMRUw [rest of string was truncated]";. + /// + internal static string RdfeTestDummy { + get { + return ResourceManager.GetString("RdfeTestDummy", resourceCulture); + } + } + } +} diff --git a/src/Common/Commands.ScenarioTest/Properties/Resources.resx b/src/Common/Commands.ScenarioTest/Properties/Resources.resx new file mode 100644 index 000000000000..9cbe17b5e3a7 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Properties/Resources.resx @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\CsmTestDummySubscription.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + + + ..\Resources\RdfeTestDummy.publishsettings;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + + \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/Automation/AutomationTests.ps1 b/src/Common/Commands.ScenarioTest/Resources/Automation/AutomationTests.ps1 new file mode 100644 index 000000000000..62285b98090c --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/Automation/AutomationTests.ps1 @@ -0,0 +1,369 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +<# +.SYNOPSIS +Checks whether the first string contains the second one +#> + +$accountName='AutomationAccount' + +function AssertContains +{ + param([string] $str, [string] $substr, [string] $message) + + if (!$message) + { + $message = "Assertion failed because '$str' does not contain '$substr'" + } + + if (!$str.Contains($substr)) + { + throw $message + } + + return $true +} + +<# +.SYNOPSIS +Checks whether the runbook exists and if it exists, removes it and then imports a new runbook +#> +function CreateRunbook +{ + param([string] $runbookPath, [boolean] $byName=$false, [string[]] $tag, [string] $description) + + $runbookName = gci $runbookPath | %{$_.BaseName} + $runbook = Get-AzureAutomationRunbook $accountName | where {$_.Name -eq $runbookName} + if ($runbook.Count -eq 1) + { + Remove-AzureAutomationRunbook $accountName -Name $runbookName -Force + } + + if(!$byName) + { + return New-AzureAutomationRunbook $accountName -Path $runbookPath -Tag $tag -Description $description + } + else + { + return New-AzureAutomationRunbook $accountName -Name $runbookName -Tag $tag -Description $description + } +} + +########################################################################### Automation Scenario Tests ########################################################################### + +######### $accountName and $subscriptionName should be provided in variables.yml in order to run the following Test Cases ####################### + +<# +.SYNOPSIS +Waits for Job to be a specific status for approximately $numOfSeconds +#> +function WaitForJobStatus +{ + param([Guid] $Id, [Int] $numOfSeconds = 150, [String] $Status) + + $timeElapse = 0 + $interval = 3 + $endStatus = @('completed','failed') + while($timeElapse -lt $numOfSeconds) + { + Wait-Seconds $interval + $timeElapse = $timeElapse + $interval + $job = Get-AzureAutomationJob -AutomationAccount $accountName -Id $Id + if($job.Status -eq $Status) + { + break + } + elseif($endStatus -ccontains $job.Status.ToLower()) + { + Write-Output ("The Job with ID $($job.Id) reached $($job.Status) Status already.") + return + } + } + Assert-AreEqual $Status $job.Status "Job did not reach $Status status within $numOfSeconds seconds."; +} + +<# +.SYNOPSIS +Tests Runbook with Parameters +#> +function Test-RunbookWithParameter +{ + param([string] $runbookPath, [HashTable] $parameters, [int]$expectedResult) + + #Setup + $automationAccount = Get-AzureAutomationAccount -Name $accountName + Assert-NotNull $automationAccount "Automation account $accountName does not exist." + + $runbook = CreateRunbook $runbookPath + Assert-NotNull $runbook "runBook $runbookPath does not import successfully." + $automationAccount | Publish-AzureAutomationRunbook -Id $runbook.Id + + #Test + $job = $automationAccount | Start-AzureAutomationRunbook -Id $runbook.Id -Parameters $parameters + WaitForJobStatus -Id $job.Id -Status "Completed" + $jobOutput = $automationAccount | Get-AzureAutomationJobOutput -Id $job.Id -Stream Output + $automationAccount | Remove-AzureAutomationRunbook -Name $runbook.Name -Force + Assert-Throws { $automationAccount | Get-AzureAutomationRunbook -Name $runbook.Name} +} + +<# +.SYNOPSIS +Tests of Start and Stop RunBook +#> +function Test-AutomationStartAndStopRunbook +{ + param([string] $runbookPath) + + #Setup + $automationAccount = Get-AzureAutomationAccount -Name $accountName + Assert-NotNull $automationAccount "Automation account $accountName does not exist." + + $runbook = CreateRunbook $runbookPath + Assert-NotNull $runbook "runBook $runbookPath does not import successfully." + $automationAccount | Publish-AzureAutomationRunbook -Id $runbook.Id + + #Test + $job = $automationAccount | Start-AzureAutomationRunbook -Id $runbook.Id + WaitForJobStatus -Id $job.Id -Status "Running" + $automationAccount | Stop-AzureAutomationJob -Id $job.Id + WaitForJobStatus -Id $job.Id -Status "Stopped" + $automationAccount | Remove-AzureAutomationRunbook -Name $runbook.Name -Force + Assert-Throws { $automationAccount | Get-AzureAutomationRunbook -Name $runbook.Name} +} + +<# +.SYNOPSIS +Tests publishing runbook and editing runbook with and without Overrite parameter +#> +function Test-AutomationPublishAndEditRunbook +{ + param([string] $runbookPath, [string] $editRunbookPath) + + $runbook = CreateRunbook $runbookPath $true + + #Test + + Assert-Null $runbook.PublishedRunbookVersionId + Assert-NotNull $runbook.DraftRunbookVersionId + #Publish Runbook + $publishedRunbook = Publish-AzureAutomationRunbook $accountName -Id $runbook.Id + Assert-NotNull $publishedRunbook.PublishedRunbookVersionId + Assert-Null $publishedRunbook.DraftRunbookVersionId + $publishedRunbookDefn = Get-AzureAutomationRunbookDefinition $accountName -VersionId $publishedRunbook.PublishedRunbookVersionId + + #Edit Runbook + Set-AzureAutomationRunbookDefinition $accountName -Id $runbook.Id -Path $runbookPath -Overwrite + $runbook = Get-AzureAutomationRunbook $accountName -Name $runbook.Name + Assert-AreEqual $publishedRunbook.PublishedRunbookVersionId $runbook.PublishedRunbookVersionId + Assert-NotNull $runbook.DraftRunbookVersionId "Runbook should be in draft mode" + $editedRunbookDefn = Get-AzureAutomationRunbookDefinition $accountName -VersionId $runbook.DraftRunbookVersionId + Assert-AreNotEqual $editedRunbookDefn.Content $publishedRunbookDefn.Content "Old content and edited content of the runbook shouldn't be equal" + + Assert-Throws {Set-AzureAutomationRunbookDefinition $accountName -Name $runbook.Name -Path $editRunbookPath -PassThru -ErrorAction Stop} + Set-AzureAutomationRunbookDefinition $accountName -Name $runbook.Name -Path $editRunbookPath -Overwrite + $editedRunbookDefn2 = Get-AzureAutomationRunbookDefinition $accountName -VersionId $runbook.DraftRunbookVersionId + Assert-AreNotEqual $editedRunbookDefn2.Content $editedRunbookDefn.Content "Old content and edited content of the runbook shouldn't be equal" + + Remove-AzureAutomationRunbook $accountName -Id $runbook.Id -Force + Assert-Throws {Get-AzureAutomationRunbook $accountName -Id $runbook.Id} + +} + +<# +.SYNOPSIS +Tests setting runbook configuration +#> +function Test-AutomationConfigureRunbook +{ + param([string] $runbookPath) + + #Setup + $automationAccount = Get-AzureAutomationAccount -Name $accountName + Assert-NotNull $automationAccount "Automation account $accountName does not exist." + $runbook = CreateRunbook $runbookPath + Assert-NotNull $runbook "runbook ($runbookPath) isn't imported successfully." + Publish-AzureAutomationRunbook -Id $runbook.Id -AutomationAccountName $accountName + + #Test + + #Change the runbook configuration + $automationAccount | Set-AzureAutomationRunbook -Id $runbook.Id -LogDebug $true -LogVerbose $true -LogProgress $false + $runbook = $automationAccount | Get-AzureAutomationRunbook -Name $runbook.Name + Assert-NotNull $runbook "Runbook shouldn't be Null" + Assert-AreEqual $true $runbook.LogDebug "Log Debug mode should be true." + Assert-AreEqual $true $runbook.LogVerbose "Log Verbose mode should be true." + Assert-AreEqual $false $runbook.LogProgress "Log Progress mode should be false." + + #Start runbook and wait for job complete + $job = $automationAccount | Start-AzureAutomationRunbook -Id $runbook.Id + WaitForJobStatus -Id $job.Id -Status "Completed" + + #Check job output streams + $jobOutputs = $automationAccount | Get-AzureAutomationJobOutput -Id $job.Id -Stream "Output" + Assert-AreEqual 1 $jobOutputs.Count + AssertContains $jobOutputs[0].Text "output message" "The output stream is wrong." + #Verify that debug and verbose streams are logged + $jobDebugOutputs = $automationAccount | Get-AzureAutomationJobOutput -Id $job.Id -Stream "Debug" + Assert-AreEqual 1 $jobDebugOutputs.Count + AssertContains $jobDebugOutputs[0].Text "debug message" "The debug stream is wrong." + $jobVerboseOutputs = Get-AzureAutomationJobOutput $accountName -Id $job.Id -Stream "Verbose" + Assert-AreEqual 1 $jobVerboseOutputs.Count + AssertContains $jobVerboseOutputs[0].Text "verbose message" "The verbose stream is wrong." + #Verify that progress stream isn't logged + $jobProgressOutputs = Get-AzureAutomationJobOutput -AutomationAccountName $accountName -Id $job.Id -Stream "Progress" + Assert-AreEqual 0 $jobProgressOutputs.Count + + #Change the runbook configuration again and start the runbook + Set-AzureAutomationRunbook $accountName -Id $runbook.Id -LogDebug $false -LogVerbose $false -LogProgress $true + $job = Start-AzureAutomationRunbook $accountName -Name $runbook.Name + WaitForJobStatus -Id $job.Id -Status "Completed" + #Verify that progress stream is logged + $jobProgressOutputs = Get-AzureAutomationJobOutput $accountName -Id $job.Id -Stream "Progress" + Assert-AreNotEqual 0 $jobProgressOutputs.Count + Assert-AreEqual $jobProgressOutputs[0].Type "Progress" + #Verify that debug and verbose streams aren't logged + $jobDebugOutputs = Get-AzureAutomationJobOutput $accountName -Id $job.Id -Stream "Debug" + Assert-AreEqual 0 $jobDebugOutputs.Count + $jobVerboseOutputs = Get-AzureAutomationJobOutput $accountName -Id $job.Id -Stream "Verbose" + Assert-AreEqual 0 $jobVerboseOutputs.Count + + #Check whether the total number of jobs for the runbook is correct + $jobs = Get-AzureAutomationJob $accountName -RunbookId $runbook.Id + Assert-AreEqual 2 $jobs.Count "There should be 2 jobs in total for this runbook." + + #Remove runbook + $automationAccount | Remove-AzureAutomationRunbook -Name $runbook.Name -Force + Assert-Throws {$automationAccount | Get-AzureAutomationRunbook -Id $runbook.Id} +} + +<# +.SYNOPSIS +Tests suspending a started job and resuming a suspended job +#> +function Test-AutomationSuspendAndResumeJob +{ + param([string] $runbookPath) + + #Setup + $automationAccount = Get-AzureAutomationAccount $accountName + Assert-NotNull $automationAccount "Automation account $accountName does not exist." + $runbook = CreateRunbook $runbookPath + + #Test + + $automationAccount | Publish-AzureAutomationRunbook -Id $runbook.Id + #Start, suspend, and then resume job + $job = Start-AzureAutomationRunbook $accountName -Id $runbook.Id + WaitForJobStatus -Id $job.Id -Status "Running" + Suspend-AzureAutomationJob $accountName -Id $job.Id + WaitForJobStatus -Id $job.Id -Status "Suspended" + $automationAccount | Resume-AzureAutomationJob -Id $job.Id + WaitForJobStatus -Id $job.Id -Status "Completed" + + #Remove runbook + Remove-AzureAutomationRunbook -AutomationAccountName $accountName -Id $runbook.Id -Force + Assert-Throws {Get-AzureAutomationRunbook $accountName -Name $runbook.Name} +} + +<# +.SYNOPSIS +Tests starting a runbook on a schedule +#> +function Test-AutomationStartRunbookOnASchedule +{ + param([string] $runbookPath) + + #Setup + $automationAccount = Get-AzureAutomationAccount -Name $accountName + $runbook = CreateRunbook $runbookPath + Publish-AzureAutomationRunbook $accountName -Name $runbook.Name + + #Test + + #Create one time schedule + $oneTimeScheName = "oneTimeSchedule" + $schedule = Get-AzureAutomationSchedule $accountName | where {$_.Name -eq $oneTimeScheName} + if ($schedule.Count -eq 1) + { + Remove-AzureAutomationSchedule $accountName -Name $oneTimeScheName -Force + } + $startTime = (Get-Date).AddMinutes(7) + New-AzureAutomationSchedule $accountName -Name $oneTimeScheName -OneTime -StartTime $startTime + $oneTimeSchedule = Get-AzureAutomationSchedule $accountName -Name $oneTimeScheName + Assert-NotNull $oneTimeSchedule "$oneTimeScheName doesn't exist!" + + #Create daily schedule + $dailyScheName = "dailySchedule" + $schedule = Get-AzureAutomationSchedule $accountName | where {$_.Name -eq $dailyScheName} + if ($schedule.Count -eq 1) + { + Remove-AzureAutomationSchedule $accountName -Name $dailyScheName -Force + } + $startTime = (Get-Date).AddDays(1) + $expiryTime = (Get-Date).AddDays(3) + New-AzureAutomationSchedule $accountName -Name $DailyScheName -StartTime $startTime -ExpiryTime $expiryTime -DayInterval 1 + $dailySchedule = Get-AzureAutomationSchedule $accountName -Name $dailyScheName + Assert-NotNull $dailySchedule "$dailyScheName doesn't exist!" + + $runbook = Register-AzureAutomationScheduledRunbook $accountName -Name $runbook.Name -ScheduleName $oneTimeScheName + Assert-AreEqual $oneTimeScheName $runbook.ScheduleNames "The runbook should be associated with $oneTimeScheName" + $runbook = Register-AzureAutomationScheduledRunbook $accountName -Id $runbook.Id -ScheduleName $dailyScheName + Assert-True { $runbook.ScheduleNames -Contains $dailyScheName} "The runbook should be associated with $dailyScheName" + + #waiting for seven minutes + Wait-Seconds 420 + $job = Get-AzureAutomationJob $accountName -RunbookId $runbook.Id | where {$_.ScheduleName -eq $oneTimeScheName} + Assert-AreEqual 1 $job.Count + WaitForJobStatus -Id $job.Id -Status "Completed" + + #Edit schedule + $description = "Daily Schedule Description" + Set-AzureAutomationSchedule $accountName -Name $oneTimeScheName -Description $description + $dailySchedule = Get-AzureAutomationSchedule $accountName -Name $oneTimeScheName + Assert-AreEqual $description $dailySchedule.Description + + $runbook = Unregister-AzureAutomationScheduledRunbook $accountName -Name $runbook.Name -ScheduleName $dailyScheName + Assert-False {$runbook.ScheduleNames -Contains $dailyScheName} "The runbook shouldn't have an association with $dailyScheName" + + #Remove runbook and schedule + Remove-AzureAutomationSchedule $accountName -Name $oneTimeScheName -Force + Assert-Throws {$automationAccount | Get-AzureAutomationSchedule -Name $oneTimeScheName} + $automationAccount | Remove-AzureAutomationSchedule -Name $dailyScheName -Force + Assert-Throws {$automationAccount | Get-AzureAutomationSchedule -Name $dailyScheName} + Remove-AzureAutomationRunbook $accountName -Id $runbook.Id -Force + Assert-Throws {Get-AzureAutomationRunbook $accountName -Id $runbook.Id} +} + +<# +.SYNOPSIS +Tests starting an unpublished runbook +#> +function Test-AutomationStartUnpublishedRunbook +{ + param([string] $runbookPath) + + $tags = @("tag1","tag2") + $description = "Runbook Description" + $c = Get-Date + $runbookParameters = @{"a" = "stringParameter"; "b" = 123; "c" = $c} + $runbook = CreateRunbook $runbookPath $false $tags $description + Assert-NotNull $runbook "runBook $runbookPath does not import successfully." + Assert-NotNull $runbook.Tags "Tags of the runbook shouldn't be Null." + Assert-NotNull $runbook.Description "Description of the runbook shouldn't be Null." + Assert-Throws {Start-AzureAutomationRunbook $accountName -Id $runbook.Id -Parameters $runbookParameters -PassThru -ErrorAction Stop} + + Remove-AzureAutomationRunbook $accountName -Id $runbook.Id -Force + Assert-Throws {Get-AzureAutomationRunbook $accountName -Id $runbook.Id -Parameters $runbookParameters -PassThru -ErrorAction Stop} +} diff --git a/src/Common/Commands.ScenarioTest/Resources/Automation/Test-WorkFlowWithVariousParameters.ps1 b/src/Common/Commands.ScenarioTest/Resources/Automation/Test-WorkFlowWithVariousParameters.ps1 new file mode 100644 index 000000000000..d91bd916868b --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/Automation/Test-WorkFlowWithVariousParameters.ps1 @@ -0,0 +1,7 @@ +workflow Test-WorkFlowWithVariousParameters +{ + param([string] $a, [int] $b, [DateTime] $c) + "a is " + $a + "b is " + $b + "c is " + $c +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/Automation/Test-Workflow.ps1 b/src/Common/Commands.ScenarioTest/Resources/Automation/Test-Workflow.ps1 new file mode 100644 index 000000000000..3f2a2cde1916 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/Automation/Test-Workflow.ps1 @@ -0,0 +1,5 @@ +Workflow Test-Workflow { + get-date + start-sleep -s 40 + get-date +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/Automation/Test-WorkflowV2.ps1 b/src/Common/Commands.ScenarioTest/Resources/Automation/Test-WorkflowV2.ps1 new file mode 100644 index 000000000000..7f2511572f23 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/Automation/Test-WorkflowV2.ps1 @@ -0,0 +1,3 @@ +Workflow Test-Workflow { + get-date +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/Automation/Use-WorkflowCheckpointSample.ps1 b/src/Common/Commands.ScenarioTest/Resources/Automation/Use-WorkflowCheckpointSample.ps1 new file mode 100644 index 000000000000..2a3417513c8e --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/Automation/Use-WorkflowCheckpointSample.ps1 @@ -0,0 +1,11 @@ +workflow Use-WorkflowCheckpointSample +{ + Write-Output "Before Checkpoint." + start-sleep -s 20 + + # A checkpoint is created. + Checkpoint-Workflow + + # This line occurs after the checkpoint. The runbook will start here on resume. + Write-Output "After Checkpoint." +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/Automation/Write-DebugAndVerboseOutput.ps1 b/src/Common/Commands.ScenarioTest/Resources/Automation/Write-DebugAndVerboseOutput.ps1 new file mode 100644 index 000000000000..ff1eb3a97923 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/Automation/Write-DebugAndVerboseOutput.ps1 @@ -0,0 +1,6 @@ +workflow Write-DebugAndVerboseOutput +{ + "output message" + write-debug -message "debug message" + write-verbose -message "verbose message" +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/Automation/fastJob.ps1 b/src/Common/Commands.ScenarioTest/Resources/Automation/fastJob.ps1 new file mode 100644 index 000000000000..603c41a04f6f --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/Automation/fastJob.ps1 @@ -0,0 +1,6 @@ +workflow fastJob +{ + param([int[]] $nums) + $sum=($nums | Measure-Object -Sum).Sum + echo $sum +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/Build2014_Website_App.json b/src/Common/Commands.ScenarioTest/Resources/Build2014_Website_App.json new file mode 100644 index 000000000000..ac3ef4152d4e --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/Build2014_Website_App.json @@ -0,0 +1,236 @@ +{ + "$schema": "http://johngosmanage.blob.core.windows.net/schemas/2014-04-01-preview/deploymentTemplate.json", + "contentVersion": "1.0.0.0", + "parameters": { + "siteName": { + "type": "string" + }, + "hostingPlanName": { + "type": "string" + }, + "siteLocation": { + "type": "string" + }, + "sku": { + "type": "string", + "allowedValues": [ + "Free", + "Shared", + "Basic", + "Standard" + ] + }, + "workerSize": { + "type": "string", + "allowedValues": [ + "0", + "1", + "2" + ] + } + }, + "resources": [ + { + "apiVersion": "2014-04-01", + "name": "[parameters('hostingPlanName')]", + "type": "Microsoft.Web/serverfarms", + "location": "[parameters('siteLocation')]", + "properties": { + "name": "[parameters('hostingPlanName')]", + "sku": "[parameters('sku')]", + "workerSize": "0", + "numberOfWorkers": 0 + } + }, + { + "apiVersion": "2014-04-01", + "name": "[parameters('siteName')]", + "type": "Microsoft.Web/sites", + "location": "[parameters('siteLocation')]", + "tags": { + "[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]": "empty" + }, + "dependsOn": [ + "[concat('Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]" + ], + "properties": { + "name": "[parameters('siteName')]", + "serverFarm": "[parameters('hostingPlanName')]" + }, + "resources": [ + { + "apiVersion": "01-01-2014", + "name": "MSDeploy", + "type": "Extensions", + "dependsOn": [ + "[concat('Microsoft.Web/Sites/', parameters('siteName'))]" + ], + "properties": { + "packageUri": "https://templatetest.blob.core.windows.net/deployments/ClipMeme.zip", + "dbType": "None", + "connectionString": "", + "setParameters": { + "IIS Web Application Name": "[parameters('siteName')]" + } + } + } + ] + }, + { + "apiVersion": "2014-04", + "name": "[concat(parameters('hostingPlanName'), '-', resourceGroup().name)]", + "type": "microsoft.insights/autoscalesettings", + "location": "East US", + "tags": { + "[concat('hidden-link:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]": "empty" + }, + "dependsOn": [ + "[concat('Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]" + ], + "properties": { + "profiles": [ + { + "name": "Default", + "capacity": { + "minimum": "1", + "maximum": "10", + "default": "1" + }, + "rules": [ + { + "metricTrigger": { + "metricName": "CpuPercentage", + "metricResourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]", + "timeGrain": "PT1M", + "statistic": "Average", + "timeWindow": "PT10M", + "timeAggregation": "Average", + "operator": "GreaterThan", + "threshold": 80.0 + }, + "scaleAction": { + "direction": "Increase", + "type": "ChangeCount", + "value": "1", + "cooldown": "PT10M" + } + }, + { + "metricTrigger": { + "metricName": "CpuPercentage", + "metricResourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]", + "timeGrain": "PT1M", + "statistic": "Average", + "timeWindow": "PT1H", + "timeAggregation": "Average", + "operator": "LessThan", + "threshold": 60.0 + }, + "scaleAction": { + "direction": "Decrease", + "type": "ChangeCount", + "value": "1", + "cooldown": "PT1H" + } + } + ] + } + ], + "enabled": false, + "name": "[concat(parameters('hostingPlanName'), '-', resourceGroup().name)]", + "targetResourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]" + } + }, + { + "apiVersion": "2014-04", + "name": "[concat('ServerErrors', parameters('siteName'))]", + "type": "microsoft.insights/alertrules", + "location": "East US", + "dependsOn": [ + "[concat('Microsoft.Web/sites/', parameters('siteName'))]" + ], + "properties": { + "name": "[concat('ServerErrors', parameters('siteName'))]", + "description": "[concat(parameters('siteName'), ' has some server errors, status code 5xx.')]", + "isEnabled": false, + "condition": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition", + "dataSource": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource", + "resourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/sites/', parameters('siteName'))]", + "metricName": "Http5xx" + }, + "operator": "GreaterThan", + "threshold": 0.0, + "windowSize": "PT5M" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction", + "sendToServiceOwners": true, + "customEmails": [] + } + } + }, + { + "apiVersion": "2014-04", + "name": "[concat('ForbiddenRequests', parameters('siteName'))]", + "type": "microsoft.insights/alertrules", + "location": "East US", + "dependsOn": [ + "[concat('microsoft.insights/alertrules/', 'ServerErrors', parameters('siteName'))]" + ], + "properties": { + "name": "[concat('ForbiddenRequests', parameters('siteName'))]", + "description": "[concat(parameters('siteName'), ' has some requests that are forbidden, status code 403.')]", + "isEnabled": false, + "condition": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition", + "dataSource": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource", + "resourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/sites/', parameters('siteName'))]", + "metricName": "Http403" + }, + "operator": "GreaterThan", + "threshold": 0, + "windowSize": "PT5M" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction", + "sendToServiceOwners": true, + "customEmails": [] + } + } + }, + { + "apiVersion": "2014-04", + "name": "[concat('CPUHigh', parameters('hostingPlanName'))]", + "type": "microsoft.insights/alertrules", + "location": "East US", + "dependsOn": [ + "[concat('Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]", + "[concat('microsoft.insights/alertrules/', 'ForbiddenRequests', parameters('siteName'))]" + ], + "properties": { + "name": "[concat('CPUHigh', parameters('hostingPlanName'))]", + "description": "[concat('The average CPU is high across all the instances of ', parameters('hostingPlanName'))]", + "isEnabled": false, + "condition": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition", + "dataSource": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource", + "resourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]", + "metricName": "CpuPercentage" + }, + "operator": "GreaterThan", + "threshold": 90, + "windowSize": "PT15M" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction", + "sendToServiceOwners": true, + "customEmails": [] + } + } + } + ] +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/CloudService/Cache/connman.tgz b/src/Common/Commands.ScenarioTest/Resources/CloudService/Cache/connman.tgz new file mode 100644 index 000000000000..f194a066e3f2 Binary files /dev/null and b/src/Common/Commands.ScenarioTest/Resources/CloudService/Cache/connman.tgz differ diff --git a/src/Common/Commands.ScenarioTest/Resources/CloudService/Cache/index.js b/src/Common/Commands.ScenarioTest/Resources/CloudService/Cache/index.js new file mode 100644 index 000000000000..0a45da0915a9 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/CloudService/Cache/index.js @@ -0,0 +1,30 @@ +var http = require("http"); +var port = process.env.port || 1337; +var url = require("url"); +var mc = require("mc"); +var mcclient = new mc.Client('localhost_ClientRole'); +mcclient.connect(function() { + console.log("Connected to the localhost memcache on port 11211!"); +}); + + +function start(route, handle) { + function onRequest(request, response) { + var postData = ""; + var pathname = url.parse(request.url).pathname; + console.log("Request for " + pathname + " received."); + + request.setEncoding("utf8"); + request.addListener("data", function (postDataChunk) { + postData += postDataChunk; + console.log("Received POST data chunk '" + postDataChunk + "'."); + }); + request.addListener("end", function () { + route(handle, pathname, response, postData,mcclient); + }); + } + + http.createServer(onRequest).listen(port); + console.log("Server has started."); +} +exports.start = start; \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/CloudService/Cache/mc.tgz b/src/Common/Commands.ScenarioTest/Resources/CloudService/Cache/mc.tgz new file mode 100644 index 000000000000..76169cac5e48 Binary files /dev/null and b/src/Common/Commands.ScenarioTest/Resources/CloudService/Cache/mc.tgz differ diff --git a/src/Common/Commands.ScenarioTest/Resources/CloudService/Cache/requestHandlers.js b/src/Common/Commands.ScenarioTest/Resources/CloudService/Cache/requestHandlers.js new file mode 100644 index 000000000000..4a8c4ae911e6 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/CloudService/Cache/requestHandlers.js @@ -0,0 +1,59 @@ +var querystring = require("querystring"); +function get(response, postData, mcclient) { + + response.writeHead(200, { "Content-Type": "text/html" }); + response.write(' '); + var key = querystring.parse(postData).key; + mcclient.get(key, function (err, cacheresponse) { + if (!err) { + response.write('The Value With Key ' + key + ' Is ' + cacheresponse[key] + '
'); + response.write('Add New Item
Get Existing Item'); + response.end(); + + } else { + response.write('Not Found or Something Went Wrong
'); + response.write('Add New Item
Get Existing Item'); + response.end(); + } + }); + +} + +function add(response,postData,mcclient) { + var key = querystring.parse(postData).key; + var value = querystring.parse(postData).value; + mcclient.add(key, value, { flags: 0, exptime: 0 }, function (err, status) { + if (!err) { + response.writeHead(200, { "Content-Type": "text/html" }); + response.write(' '); + response.write('Item Saved
'); + response.write('Add New Item
Get Existing Item'); + response.end(); + + } else { + response.writeHead(200, { "Content-Type": "text/plain" }); + response.write("Error saving to cache"); + response.end(); + } + + }); +} + +function additem(response, postData, mcclient) { + + response.writeHead(200, { "Content-Type": "text/html" }); + response.write('
Key
Value
'); + response.end(); + +} +function getitem(response, postData, mcclient) { + + response.writeHead(200, { "Content-Type": "text/html" }); + response.write('
Key
'); + response.end(); + +} +exports.get = get; +exports.additem = additem; +exports.getitem = getitem; +exports.add = add; \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/CloudService/Cache/router.js b/src/Common/Commands.ScenarioTest/Resources/CloudService/Cache/router.js new file mode 100644 index 000000000000..dae391f0b9bb --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/CloudService/Cache/router.js @@ -0,0 +1,12 @@ +function route(handle, pathname, response, postData,mcclient) { + console.log("About to route a request for " + pathname); + if (typeof handle[pathname] === 'function') { + return handle[pathname](response,postData,mcclient); + } else { + console.log("No request handler found for " + pathname); + response.writeHead(404, { "Content-Type": "text/plain" }); + response.write("404 Not found"); + response.end(); + } +} +exports.route = route; \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/CloudService/Cache/server.js b/src/Common/Commands.ScenarioTest/Resources/CloudService/Cache/server.js new file mode 100644 index 000000000000..4b70153c0163 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/CloudService/Cache/server.js @@ -0,0 +1,11 @@ +var index = require("./index"); +var router = require("./router"); +var requestHandlers = require("./requestHandlers"); + +var handle = {} +handle["/"] = requestHandlers.additem; +handle["/get"] = requestHandlers.get; +handle["/additem"] = requestHandlers.additem; +handle["/getitem"] = requestHandlers.getitem; +handle["/add"] = requestHandlers.add; +index.start(router.route, handle); \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/CloudService/CloudServiceTests.ps1 b/src/Common/Commands.ScenarioTest/Resources/CloudService/CloudServiceTests.ps1 new file mode 100644 index 000000000000..388a82220bd4 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/CloudService/CloudServiceTests.ps1 @@ -0,0 +1,573 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +########################################################################### General Cloud Service Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests any cloud based cmdlet with invalid credentials and expect it'll throw an exception. +#> +function Test-WithInvalidCredentials +{ + param([ScriptBlock] $cloudCmdlet) + + # Setup + Remove-AllSubscriptions + + # Test + Assert-Throws $cloudCmdlet "No current subscription has been designated. Use Select-AzureSubscription -Current to set the current subscription." +} + +########################################################################### Publish-AzureServiceProject Scenario Tests ################################################################### + +<# +.SYNOPSIS +Tests Publishing a Cache Service. +#> +function Test-PublishCacheService +{ + PublishAndUpdate-CloudService 1 {New-CacheCloudServiceProject $args[0]} {Verify-CacheApp $args[0].Url.ToString()} +} + +<# +.SYNOPSIS +Tests Publishing and updating a Cache Service. +#> +function Test-UpdateCacheService +{ + PublishAndUpdate-CloudService 1 {New-CacheCloudServiceProject $args[0]} {Verify-CacheApp $args[0].Url.ToString()} {Test-RemoteDesktop} +} + +<# +.SYNOPSIS +Tests Publish-AzureServiceProject with using ServiceSettings.Location +#> +function Test-PublishUsesSettingsLocation +{ + # Setup + $name = Get-CloudServiceName + $locations = Get-AzureLocation + $location = $locations[1].Name + New-AzureServiceProject $name + Add-AzureNodeWebRole + Set-AzureServiceProject -Location $location + + # Test + Publish-AzureServiceProject + + # Assert + $service = Get-AzureService $name + $actual = $service.Location + Assert-AreEqual $location $actual +} + +########################################################################### Remove-AzureService Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests Remove-AzureService with non-existing service. +#> +function Test-RemoveAzureServiceWithNonExistingService +{ + # Test + Assert-Throws { Remove-AzureService "DoesNotExist" -Force } "The specified cloud service `"DoesNotExist`" does not exist." +} + +<# +.SYNOPSIS +Tests Remove-AzureService with an existing service that does not have any deployments +#> +function Test-RemoveAzureServiceWithCloudService +{ + <# To Do: implement when we have unsigned version from Management.ServiceManagement assembly #> +} + +<# +.SYNOPSIS +Tests Remove-AzureService with an existing service that has production deployment only +#> +function Test-RemoveAzureServiceWithProductionDeployment +{ + # Setup + New-CloudService 1 + $name = $global:createdCloudServices[0] + + # Test + $removed = Remove-AzureService $name -Force -PassThru + + # Assert + Assert-True { $removed } +} + +<# +.SYNOPSIS +Tests Remove-AzureService with an existing service that has staging deployment only +#> +function Test-RemoveAzureServiceWithStagingDeployment +{ + <# To Do: implement when we have unsigned version from Management.ServiceManagement assembly #> +} + +<# +.SYNOPSIS +Tests Remove-AzureService with an existing service that has production and staging deployments +#> +function Test-RemoveAzureServiceWithFullCloudService +{ + <# To Do: implement when we have unsigned version from Management.ServiceManagement assembly #> +} + +<# +.SYNOPSIS +Tests Remove-AzureService with WhatIf +#> +function Test-RemoveAzureServiceWhatIf +{ + # Setup + New-CloudService 1 + $name = $global:createdCloudServices[0] + + # Test + Remove-AzureService $name -Force -WhatIf + $removed = Remove-AzureService $name -Force -PassThru + + # Assert + Assert-True { $removed } +} + +<# +.SYNOPSIS +Tests Remove-AzureService with WhatIf by passing invalid cloud service name and expects no error +#> +function Test-RemoveAzureServiceWhatIfWithInvalidName +{ + # Test + Remove-AzureService "InvalidName" -Force -WhatIf + + # Assert + Assert-True { $true } +} + +<# +.SYNOPSIS +Tests Remove-AzureService with service piped from Get-AzureService cmdlet +#> +function Test-RemoveAzureServicePipedFromGetAzureService +{ + # Setup + $name = Get-CloudServiceName + New-AzureService $name -Location $(Get-DefaultLocation) + + # Test + $removed = Get-AzureService $name | Remove-AzureService -Force -PassThru + + # Assert + Assert-True { $removed } +} + +########################################################################### Start-AzureService Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests Start-AzureService with non-existing service. +#> +function Test-StartAzureServiceWithNonExistingService +{ + # Test + Assert-Throws { Start-AzureService "DoesNotExist" } "The specified cloud service `"DoesNotExist`" does not exist." +} + +<# +.SYNOPSIS +Tests Start-AzureService with an existing service that does not have any deployments +#> +function Test-StartAzureServiceWithEmptyDeployment +{ + # Setup + $name = Get-CloudServiceName + $msg = [string]::Format("Deployment for service {0} with Staging slot doesn't exist", $name) + New-AzureService $name -Location $(Get-DefaultLocation) + + # Test + Assert-Throws { Start-AzureService $name -Slot Staging } $msg +} + +<# +.SYNOPSIS +Tests Start-AzureService with an existing service that has production deployment only +#> +function Test-StartAzureServiceWithProductionDeployment +{ + # Setup + New-CloudService 1 + $name = $global:createdCloudServices[0] + Stop-AzureService $name + Wait-Seconds 30 # Wait for a bit, sometimes the deployment status is stopped but still stopping + + # Test + $started = Get-AzureService $name | Start-AzureService -PassThru + + # Assert + Assert-True { $started } +} + +<# +.SYNOPSIS +Tests Start-AzureService with an existing service that has staging deployment only +#> +function Test-StartAzureServiceWithStagingDeployment +{ + # Setup + New-CloudService 1 $null Staging + $name = $global:createdCloudServices[0] + Stop-AzureService $name -Slot Staging + Wait-Seconds 30 # Wait for a bit, sometimes the deployment status is stopped but still stopping + + # Test + $started = Start-AzureService $name -Slot Staging -PassThru + + # Assert + Assert-True { $started } +} + +<# +.SYNOPSIS +Tests Start-AzureService works without passing name in cloud service project. +#> +function Test-StartAzureServiceWithoutName +{ + # Setup + New-CloudService 1 + Stop-AzureService + Wait-Seconds 30 # Wait for a bit, sometimes the deployment status is stopped but still stopping + + # Test + $started = Start-AzureService -PassThru + + # Assert + Assert-True { $started } +} + +########################################################################### Test-AzureName Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests Test-AzureName with not existing hosted service and expects $false. +#> +function Test-AzureNameWithNotExistingHostedService +{ + # Test + $actual = Test-AzureName -Service "onesdknotexisting" + + # Assert + Assert-False { $actual } +} + +<# +.SYNOPSIS +Tests Test-AzureName with existing hosted service and expects $true. +#> +function Test-AzureNameWithExistingHostedService +{ + # Setup + $name = $(Get-CloudServiceName) + New-AzureService $name -Location $(Get-DefaultLocation) + + # Test + $actual = Test-AzureName -Service $name + + # Assert + Assert-True { $actual } +} + +<# +.SYNOPSIS +Tests Test-AzureName with invalid hosted service name and expects $true +#> +function Test-AzureNameWithInvalidHostedService +{ + # Test + $actual = Test-AzureName -Service "Invalid Name" + + # Assert + Assert-True { $actual } +} + +<# +.SYNOPSIS +Tests Test-AzureName with not existing Storage service and expects $false. +#> +function Test-AzureNameWithNotExistingStorageService +{ + # Test + $actual = Test-AzureName -Storage "onesdknotexisting" + + # Assert + Assert-False { $actual } +} + +<# +.SYNOPSIS +Tests Test-AzureName with existing Storage service and expects $true. +#> +function Test-AzureNameWithExistingStorageService +{ + # Setup + $name = $(Get-CloudServiceName) + New-AzureStorageAccount $name -Location $(Get-DefaultLocation) + + # Test + $actual = Test-AzureName -Storage $name + + # Assert + Assert-True { $actual } + + # Cleanup + Initialize-CloudServiceTest +} + +<# +.SYNOPSIS +Tests Test-AzureName with invalid Storage service name and expects $false +#> +function Test-AzureNameWithInvalidStorageService +{ + # Test + Assert-Throws { Test-AzureName -Storage "Invalid Name" } +} + +<# +.SYNOPSIS +Tests Test-AzureName with not existing service bus namespace and expects $false. +#> +function Test-AzureNameWithNotExistingServiceBusNamespace +{ + # Test + $actual = Test-AzureName -ServiceBusNamespace "onesdknotexisting" + + # Assert + Assert-False { $actual } +} + +<# +.SYNOPSIS +Tests Test-AzureName with existing service bus namespace and expects $true. +#> +function Test-AzureNameWithExistingServiceBusNamespace +{ + # Setup + $name = $(Get-NamespaceName) + New-AzureSBNamespace $name $(Get-DefaultServiceBusLocation) + + # Test + $actual = Test-AzureName -ServiceBusNamespace $name + + # Assert + Assert-True { $actual } +} + +<# +.SYNOPSIS +Tests Test-AzureName with invalid service bus namespace name and expects $false +#> +function Test-AzureNameWithInvalidServiceBusNamespace +{ + # Test + Assert-Throws { Test-AzureName -ServiceBusNamespace "Invalid Name" } +} + +########################################################################### Stop-AzureService Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests Stop-AzureService with non-existing service. +#> +function Test-StopAzureServiceWithNonExistingService +{ + # Test + Assert-Throws { Stop-AzureService "DoesNotExist" } "The specified cloud service `"DoesNotExist`" does not exist." +} + +<# +.SYNOPSIS +Tests Stop-AzureService with an existing service that does not have any deployments +#> +function Test-StopAzureServiceWithEmptyDeployment +{ + # Setup + $name = Get-CloudServiceName + $msg = [string]::Format("Deployment for service {0} with Staging slot doesn't exist", $name) + New-AzureService $name -Location $(Get-DefaultLocation) + + # Test + Assert-Throws { Stop-AzureService $name -Slot Staging } $msg +} + +<# +.SYNOPSIS +Tests Stop-AzureService with an existing service that has production deployment only +#> +function Test-StopAzureServiceWithProductionDeployment +{ + # Setup + New-CloudService 1 + $name = $global:createdCloudServices[0] + + # Test + $Stopped = Get-AzureService $name | Stop-AzureService -PassThru + + # Assert + Assert-True { $Stopped } +} + +<# +.SYNOPSIS +Tests Stop-AzureService with an existing service that has staging deployment only +#> +function Test-StopAzureServiceWithStagingDeployment +{ + # Setup + New-CloudService 1 $null "Staging" + $name = $global:createdCloudServices[0] + + # Test + $Stopped = Stop-AzureService $name -PassThru -Slot "Staging" + + # Assert + Assert-True { $Stopped } +} + +<# +.SYNOPSIS +Tests Stop-AzureService works without passing name in cloud service project. +#> +function Test-StopAzureServiceWithoutName +{ + # Setup + New-CloudService 1 + + # Test + $stopped = Stop-AzureService -PassThru + + # Assert + Assert-True { $stopped } +} + +########################################################################### Start-AzureEmulator Scenario Tests ################################################################### + +<# +.SYNOPSIS +Executes Start-AzureEmulator two times and expect to proceed. +#> +function Test-StartAzureEmulatorTwice +{ + # Setup + New-TinyCloudServiceProject test + Start-AzureEmulator -Mode Full + + # Test + $service = Start-AzureEmulator -Mode Full + + # Clean up + Stop-AzureEmulator + + # Assert + Assert-NotNull $service +} + +<# +.SYNOPSIS +Executes Start-AzureEmulator using Express mode. +#> +function Test-StartAzureEmulatorExpress +{ + # Setup + New-TinyCloudServiceProject test + + # Test + $service = Start-AzureEmulator -Mode Express + + # Clean up + Stop-AzureEmulator + + # Assert + Assert-NotNull $service +} + +########################################################################### Cloud Service ReverseDnsFqdn Scenario Tests ################################################################### + +<# +.SYNOPSIS +Executes New-AzureService using the ReverseDnsFqdn parameter. +#> +function Test-NewAzureServiceWithReverseDnsFqdn +{ + # Setup + $name = Get-CloudServiceName + $reverseFqdn = "$name.cloudapp.net." + + # Test + New-AzureService $name -Location $(Get-DefaultLocation) -ReverseDnsFqdn $reverseFqdn + $service = Get-AzureService $name + + # Assert + Assert-AreEqual $reverseFqdn $service.ReverseDnsFqdn +} + +<# +.SYNOPSIS +Executes Set-AzureService using the ReverseDnsFqdn parameter. +#> +function Test-SetAzureServiceWithReverseDnsFqdn +{ + # Setup + $name = Get-CloudServiceName + $reverseFqdn = "$name.cloudapp.net." + + New-AzureService $name -Location $(Get-DefaultLocation) + $service = Get-AzureService $name + + Assert-Null $service.ReverseDnsFqdn + + # Test + Set-AzureService $name -ReverseDnsFqdn $reverseFqdn + $service = Get-AzureService $name + + # Assert + Assert-AreEqual $reverseFqdn $service.ReverseDnsFqdn +} + +<# +.SYNOPSIS +Executes Set-AzureService using the ReverseDnsFqdn parameter setting it to empty string. +#> +function Test-SetAzureServiceWithEmptyReverseDnsFqdn +{ + # Setup + $name = Get-CloudServiceName + $reverseFqdn = "$name.cloudapp.net." + + New-AzureService $name -Location $(Get-DefaultLocation) -ReverseDnsFqdn $reverseFqdn + $service = Get-AzureService $name + + Assert-AreEqual $reverseFqdn $service.ReverseDnsFqdn + + # Test + Set-AzureService $name -ReverseDnsFqdn '' + $service = Get-AzureService $name + + # Assert + Assert-AreEqual '' $service.ReverseDnsFqdn +} + diff --git a/src/Common/Commands.ScenarioTest/Resources/CloudService/Common.ps1 b/src/Common/Commands.ScenarioTest/Resources/CloudService/Common.ps1 new file mode 100644 index 000000000000..e5d7dcdfd09d --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/CloudService/Common.ps1 @@ -0,0 +1,182 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +$createdCloudServices = @() + +<# +.SYNOPSIS +Gets valid and available cloud service name. +#> +function Get-CloudServiceName +{ + return getAssetName +} + +<# +.SYNOPSIS +Gets the default location +#> +function Get-DefaultLocation +{ + return (Get-AzureLocation)[0].Name +} + +<# +.SYNOPSIS +Creates cloud services with the count specified + +.PARAMETER count +The number of cloud services to create. +#> +function New-CloudService +{ + param([int] $count, [ScriptBlock] $cloudServiceProject, [string] $slot) + + if ($cloudServiceProject -eq $null) { $cloudServiceProject = { New-TinyCloudServiceProject $args[0] } } + if ($slot -eq $null) { $slot = "Production" } + + 1..$count | % { + $name = Get-CloudServiceName; + Invoke-Command -ScriptBlock $cloudServiceProject -ArgumentList $name; + Publish-AzureServiceProject -Slot $slot + $global:createdCloudServices += $name; + } +} + +<# +.SYNOPSIS +Creates cloud services and runs validation the count specified + +.PARAMETER count +The number of cloud services to create. +.PARAMETER cloudServiceProject +Code block to create a cloud service project +.PARAMETER verifier +Code block to verify successful publishing of service +.PARAMETER updater +Code block to update the service and verify the correct update +#> +function PublishAndUpdate-CloudService +{ + param([int] $count, [ScriptBlock] $cloudServiceProject, [ScriptBlock] $verifier, [ScriptBlock] $updater) + if ($cloudServiceProject -eq $null) { $cloudServiceProject = { New-TinyCloudServiceProject $args[0] } } + if ($verifier -eq $null) {$verifier = {return $true}} + 1..$count | % { + $name = Get-CloudServiceName; + Invoke-Command -ScriptBlock $cloudServiceProject -ArgumentList $name; + $service = Publish-AzureServiceProject; + $global:createdCloudServices += $name; + $worked = Retry-Function $verifier $service 3 30 + Assert-True {$worked -eq $true} "Error verifying first application deployment" + if ($updater -ne $null) + { + Invoke-Command -ScriptBlock $updater + $service = Publish-AzureServiceProject; + $worked = Retry-Function $verifier $service 3 30 + Assert-True {$worked -eq $true} "Error verifying application update" + } + } +} + +<# +.SYNOPSIS +Removes all cloud services/storage accounts in the current subscription. +#> +function Initialize-CloudServiceTest +{ + try { Get-AzureStorageAccount | Remove-AzureStorageAccount } + catch { <# Proceed #> } + + try { Get-AzureService | Remove-AzureService -Force } + catch { <# Proceed #> } +} + +<# +.SYNOPSIS +Creates new cloud service project with one node web role. +#> +function New-TinyCloudServiceProject +{ + param([string] $name) + + New-AzureServiceProject $name + Add-AzureNodeWebRole +} + +<# +.SYNOPSIS +Creates new cloud service project with a web role connected to a cache. +#> +function New-CacheCloudServiceProject +{ + param([string] $name) + + New-AzureServiceProject $name + Add-AzureNodeWebRole ClientRole + copy ..\CloudService\Cache\*.js .\ClientRole\ + cd .\ClientRole + Npm-Install "install ..\..\CloudService\Cache\mc.tgz ..\..\CloudService\Cache\connman.tgz"; + cd .. + Add-AzureCacheWorkerRole CacheRole + Enable-AzureMemcacheRole ClientRole CacheRole + $password = ConvertTo-SecureString "P@ssw0rd" -AsPlainText -Force + Enable-AzureServiceProjectRemoteDesktop "gooduser" -Password $password +} + +<# +.SYNOPSIS +Runs npm and verifies the results. + +.PARAMETER command +The npm command to run +#> + +function Npm-Install +{ + param([string] $command) + + $scriptBlock = { + $toss = Start-Process npm $command -WAIT; + $modules = Get-Item * | Where-Object Name node_modules -EQ; + return $modules -ne $null; + } + + Retry-Function $scriptBlock $null 3 30 +} + +<# +.SYNOPSIS +Places and retrieves a key value pair from a cache app +#> +function Verify-CacheApp +{ + param([string]$uri) + $client = New-Object System.Net.WebClient + $client.BaseAddress = $uri + $toss = $client.UploadString("/add", "key=key1&value=value1") + $check = $client.UploadString("/get", "key=key1") + return $check.Contains("key1") -and $check.Contains("value1") +} + +<# +.SYNOPSIS +Updates a service definition by adding remote desktop +#> + +function Test-RemoteDesktop +{ + $password = New-Object System.Security.SecureString + foreach ($c in "P@ssw0rd!".ToCharArray()) {$password.AppendChar($c)} + Enable-AzureServiceProjectRemoteDesktop -Username user1 -Password $password +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/CredUtils.ps1 b/src/Common/Commands.ScenarioTest/Resources/CredUtils.ps1 new file mode 100644 index 000000000000..e2f81e9f02e8 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/CredUtils.ps1 @@ -0,0 +1,178 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +.".\Common.ps1" +####################################### +# +# Import the given subscription if it has not already been imported +# +# param [string] $subscriptionName: the subscription to import +# param [string] $publishFile : the path to the publishsettings file with crednentials for the +# given subscription +####################################### +function Import-SubscriptionIfNecessary +{ + param( [String] $subscriptionName, [String] $publishFile) + Write-Log "[import-subscriptionifnecessary]: Setting subscription with $subscriptionName, using publish settings file $publishFile\r\n" + $subscription = Get-AzureSubscription $subscriptionName + if ($subscription -eq $NULL) + { + Write-Log "[import-subsctiptionifnecessary]: subscription $subscriptionName not found, importing publish settings file $publishFile\r\n" + Import-AzurePublishSettingsFile $publishFile + } + + Select-AzureSubscription $subscriptionName + $currentSub = Get-AzureSubscription -Current + Write-Log $currentSub + if ($subscriptionName -ne $currentSub.SubscriptionName) + { + throw "[import-subscriptionIfNecessary]: Unable to set current subscription to $subscriptionName" + } + + return $currentSub | Select-Object SubscriptionName,SubscriptionId +} + +################################ +# +# Remove all subscriptions from the current context +################################ +function Remove-AllSubscriptions +{ + try { + foreach ($subscription in Get-AzureSubscription) + { + $toss = Remove-AzureSubscription $subscription.SubscriptionName + } + + Assert-True { (Get-AzureSubscription) -eq $nul} "[Remove-AllSubscriptions]: all subscriptions not removed" + } + catch + { + Assert-True {$_.Exception.Message -eq "Could not find publish settings. Please run Import-AzurePublishSettingsFile."} + } +} +############################################ +# +# Select only the relevant columns from a subscription +# +# parm [SubscriptionData] $subscription: the subscription object to write out +############################################ +function Format-Subscription +{ + [CmdletBinding()] + param([Parameter(Mandatory=$true, Position=0, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$false)] [Microsoft.WindowsAzure.Commands.Utilities.Common.SubscriptionData] $subscription) + PROCESS + { + Select-Object -InputObject $subscription -Property SubscriptionName,SubscriptionId,ServiceEndpoint,IsDefault | Format-List | Out-String + } +} + + +function Check-SubscriptionMatch +{ + param([string] $baseSubscriptionName, [Microsoft.WindowsAzure.Commands.Utilities.Common.SubscriptionData] $checkedSubscription) + Write-Log ("[CheckSubscriptionMatch]: base subscription: '$baseSubscriptionName', validating '" + ($checkedSubscription.SubscriptionName)+ "'") + Format-Subscription $checkedSubscription | Write-Log + if ($baseSubscriptionName -ne $checkedSubscription.SubscriptionName) + { + throw ("[Check-SubscriptionMatch]: Subscription Match Failed '" + ($baseSubscriptionName) + "' != '" + ($checkedSubscription.SubscriptionName) + "'") + } + + Write-Log ("CheckSubscriptionMatch]: subscription check succeeded.") +} + +########################## +# +# Find a subscription in a list of expected subscriptions +# param $input: A list of subscriptiondata +########################## +function Find-Subscription +{ + param( [Microsoft.WindowsAzure.Commands.Utilities.Common.SubscriptionData] $subscription, [array] $subscriptions) + $subscriptions | Where-Object {$_.Name -eq $subscription.SubscriptionName} +} +############################################ +# +# Import the given publish settings file and verify that that the given subscriptions are present and +# current subscription is set appropriately +# +# param [string] $settingsPath : Path to the setting file to import +# param [string] $currentSubscription: The subscription that should be current after import +# param [array] $subscriptions : The set of subscriptions that should be imported +############################################ +function ImportAndVerify-PublishSettingsFile +{ + param([string] $settingsPath, [string] $currentSubscription, [array] $subscriptions) + Remove-AllSubscriptions + Write-Log "[importandverify-publishsettingsfile]: Importing publish settings file: $settingsPath" + Import-AzurePublishSettingsFile $settingsPath + Write-Log "[importandverify-publishsettingsfile]: Checking Current subscription." + Check-SubscriptionMatch $currentSubscription (Get-AzureSubscription -Current) + Write-Log "[importandverify-publishsettingsfile]: Checking Default subscription." + Check-SubscriptionMatch $currentSubscription (Get-AzureSubscription -Default) + Write-Log "[importandverify-publishsettingsfile]: Checking all existing subscriptions." + $allSubscriptions = (Get-AzureSubscription) + $allSubscriptions | Format-Subscription | Write-Log + foreach ($subscription in $allSubscriptions) + { + Write-Log ("[importandverify-publishsettingsfile]: Checking subscription '" + $subscription.SubscriptionName + "'") + Assert-True {(Find-Subscription $subscription $subscriptions) -ne $nul} ("[importandverify-publishsettings]: Could not find subscription '" + $subscription.SubscriptionName + "'") + } + + Write-Log "[importandverify-publishsettingsfile]: Checking each subscription individually." + foreach ($subscription in $subscriptions) + { + $subData = Get-AzureSubscription $subscription.Name + Write-Log ("[importandverify-publishsettingsfile]: Subscription data: " + $subscription.Name) + Format-Subscription $subData | Write-Verbose + if ($subData.SubscriptionId -ne $subscription.Id) + { + throw "[importandverify-publishsettingsfile]: Unable to find subscription $subscription.Name in imported set" + } + else + { + Remove-AzureSubscription $subscription.Name + } + } + return $true +} + +########################## +# +# Get subscription information from a publish settings file via xpath, used to validate import +# +# param [string] $settingsFile: The publish settings file to check +# +########################## +function Get-Subscriptions +{ + param([string] $settingsFile) + Write-Log "[get-subscriptions]: Reading subscriptions from publish settings file '$settingsFile'" + $subscriptionList = @() + $settings = New-Object System.Xml.XmlDocument + $settingsPath = Get-FullName $settingsFile + $settings.load($settingsPath) + $xpath = $settings.CreateNavigator() + foreach ($subscriptionNode in $xpath.Select("//Subscription")) + { + $subName = $subscriptionNode.GetAttribute("Name", "") + $subId = $subscriptionNode.GetAttribute("Id", "") + $subscription = New-Object System.Object + $subscription | Add-Member -MemberType NoteProperty -Name "Name" -Value $subName + $subscription | Add-Member -MemberType NoteProperty -Name "Id" -Value $subId + $subscriptionList += $subscription + } + + return $subscriptionList +} diff --git a/src/Common/Commands.ScenarioTest/Resources/CredentialTests/AddAccountForArmTests.ps1 b/src/Common/Commands.ScenarioTest/Resources/CredentialTests/AddAccountForArmTests.ps1 new file mode 100644 index 000000000000..4ceb82347305 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/CredentialTests/AddAccountForArmTests.ps1 @@ -0,0 +1,172 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +### Helper functions for below tests ### +function Assert-Empty-Profile +{ + Assert-True { (Get-AzureSubscription).Length -eq 0 } "Assumed no subscriptions, but there is at least one" + Assert-True { (Get-AzureAccount).Length -eq 0 } "Assumed no accounts, but there is at least one" +} + +### Add-AzureAccount Scenario Tests for CSM #### + +<# +.SYNOPSIS +Tests that single user account can be used to log in and list resource groups +#> +function Test-AddOrgIdWithSingleSubscription +{ + Assert-Empty-Profile + + # Verify that account can be added and used to access the + # expected subscription + $accountInfo = Get-UserCredentials "OrgIdOneTenantOneSubscription" + + Add-AzureAccount -Credential $accountInfo.Credential -Environment $accountInfo.Environment + + # Is expected subscription added? + $sub = (Get-AzureSubscription)[0] + + # does it have the right subscription id? + Assert-True { $sub.SubscriptionId -eq $accountInfo.ExpectedSubscription } + + # It's set as current account and as default account + Assert-True { $sub.IsCurrent } + Assert-True { $sub.IsDefault } + + # It's using the expected account + Assert-True { $sub.DefaultAccount -eq $accountInfo.UserId } + + # Can we use it to do something? If this passes then we're ok + Get-AzureResourceGroup +} + +<# +.SYNOPSIS +Login with Foreign Principal fails with non-interactive flow with reasonable error message +to output stream. +#> +function Test-NonInteractiveFPOLoginFails +{ + $accountInfo = Get-UserCredentials "OrgIdForeignPrincipal" + Add-AzureAccount -Credential $accountInfo.Credential -Environment $accountInfo.Environment + + Assert-True { (Get-AzureSubscription).Length -eq 0 } "There should be no subscription" +} + +<# +.SYNOPSIS +Attempt to login with Microsoft Account without user interaction fails with +a reasonable message to error stream. +#> +function Test-MicrosoftAccountNotSupportedForNonInteractiveLogin +{ + $accountInfo = Get-UserCredentials MicrosoftId + Assert-ThrowsContains { + Add-AzureAccount -Credential $accountInfo.Credential -Environment $accountInfo.Environment + } "-Credential parameter can only be used with Organization ID credentials" +} + +<# +.SYNOPSIS +Login with service principal with no other accounts +#> +function Test-AddServicePrincipalToEmptyProfile +{ + Assert-Empty-Profile + $accountInfo = Get-UserCredentials ServicePrincipal + Add-AzureAccount -ServicePrincipal -Credential $accountInfo.Credential -Environment $accountInfo.Environment -Tenant $accountInfo.TenantId + + Assert-True { (Get-AzureSubscription).Length -eq 1 } "Subscription was not added" +} + +<# +.SYNOPSIS +Login with user, then SP, SP should be default account +#> +function Test-LoginWithUserAndServicePrincipal +{ + Assert-Empty-Profile + $userAccount = Get-UserCredentials OrgIdOneTenantOneSubscription + $servicePrincipalAccount = Get-UserCredentials ServicePrincipal + + Add-AzureAccount -Credential $userAccount.Credential -Environment $accountInfo.Environment + Add-AzureAccount -ServicePrincipal -Credential $servicePrincipalAccount.Credential -Environment $servicePrincipalAccount.Environment -Tenant $servicePrincipalAccount.TenantId + + $sub = (Get-AzureSubscription)[0] + Assert-True { $sub.DefaultAccount -eq $servicePrincipalAccount.UserId } +} + +<# +.SYNOPSIS +Login with service principal, then user, user should be default account +#> +function Test-LoginWithServicePrincipalAndUser +{ + Assert-Empty-Profile + $userAccount = Get-UserCredentials OrgIdOneTenantOneSubscription + $servicePrincipalAccount = Get-UserCredentials ServicePrincipal + + Add-AzureAccount -ServicePrincipal -Credential $servicePrincipalAccount.Credential -Environment $servicePrincipalAccount.Environment -Tenant $servicePrincipalAccount.TenantId + Add-AzureAccount -Credential $userAccount.Credential -Environment $accountInfo.Environment + + $sub = (Get-AzureSubscription)[0] + Assert-True { $sub.DefaultAccount -eq $userAccount.UserId } +} + +<# +.SYNOPSIS +Login then logout should result in exclusive subscription being removed +#> +function Test-ServicePrincipalExclusiveLogout +{ + Assert-Empty-Profile + $servicePrincipalAccount = Get-UserCredentials ServicePrincipal + + Add-AzureAccount -ServicePrincipal -Credential $servicePrincipalAccount.Credential -Environment $servicePrincipalAccount.Environment -Tenant $servicePrincipalAccount.TenantId + + Assert-True { (Get-AzureSubscription).Length -eq 1 } + + Remove-AzureAccount $servicePrincipalAccount.UserId -Force + + Assert-True { (Get-AzureSubscription).Length -eq 0 } + Assert-True { (Get-AzureAccount).Length -eq 0 } +} + +<# +.SYNOPSIS +Login Service Principal and User, then logout Service principal. +#> +function Test-ServicePrincipalLogoutWithUserOnSameSubscription +{ + Assert-Empty-Profile + Assert-Empty-Profile + + $userAccount = Get-UserCredentials OrgIdOneTenantOneSubscription + $servicePrincipalAccount = Get-UserCredentials ServicePrincipal + + Add-AzureAccount -Credential $userAccount.Credential -Environment $accountInfo.Environment + Add-AzureAccount -ServicePrincipal -Credential $servicePrincipalAccount.Credential -Environment $servicePrincipalAccount.Environment -Tenant $servicePrincipalAccount.TenantId + + $sub = (Get-AzureSubscription)[0] + Assert-True { (Get-AzureSubscription).Length -eq 1 } + Assert-True { $sub.DefaultAccount -eq $servicePrincipalAccount.UserId } + + Remove-AzureAccount $servicePrincipalAccount.UserId -Force + + $sub = (Get-AzureSubscription)[0] + Assert-True { (Get-AzureSubscription).Length -eq 1 } + Assert-True { $sub.DefaultAccount -eq $userAccount.UserId } + Assert-True { (Get-AzureAccount).Length -eq 1 } +} diff --git a/src/Common/Commands.ScenarioTest/Resources/CredentialTests/Common.ps1 b/src/Common/Commands.ScenarioTest/Resources/CredentialTests/Common.ps1 new file mode 100644 index 000000000000..12d9ed9d8de7 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/CredentialTests/Common.ps1 @@ -0,0 +1,96 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +<# +.SYNOPSIS + +Function to get user name and password for a variety of different account types +#> + +function Get-UserCredentials ([string] $userType) +{ + # Force load of testing assembly to get connection string parser + [System.Reflection.Assembly]::Load("Microsoft.WindowsAzure.Testing") + + function get-from-environment ($varName) { + if (-not (test-path "Env:\$varName")) { + throw "Required environment variable $varName is not set" + } + (get-childitem "Env:\$varName").Value + } + + function credential-from-username-password ($user, $password) + { + $ss = ConvertTo-SecureString -String $password -AsPlainText -Force + New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $user, $ss + } + + function fields-from-connection-string ([string] $cs) + { + [Microsoft.WindowsAzure.Testing.TestEnvironmentFactory]::ParseConnectionString($cs) + } + + function credential-from-fields ($fields) + { + $user = $fields[[Microsoft.WindowsAzure.Testing.ConnectionStringFields]::UserId] + $password = $fields[[Microsoft.WindowsAzure.Testing.ConnectionStringFields]::Password] + credential-from-username-password $user $password + } + + function environment-from-fields ($fields) + { + $baseUri = $fields[[Microsoft.WindowsAzure.Testing.ConnectionStringFields]::BaseUri] + if (($baseUri -eq $null) -or ($baseUri -eq "")) { + "AzureCloud" + } else { + $envs = (Get-AzureEnvironment | ? { $_.ServiceManagement -eq $baseUri }) + if ($envs.Length -eq 1) { + $envs[0].Name + } else { + throw "Could not find environment matching $baseUri" + } + } + } + + function account-info-from-connection-string ([string] $cs) + { + $fields = fields-from-connection-string $cs + @{ + UserId = $fields[[Microsoft.WindowsAzure.Testing.ConnectionStringFields]::UserId]; + Credential = (credential-from-fields $fields); + Environment = (environment-from-fields $fields); + ExpectedSubscription = $fields[[Microsoft.WindowsAzure.Testing.ConnectionStringFields]::SubscriptionId]; + TenantId = $fields[[Microsoft.WindowsAzure.Testing.ConnectionStringFields]::AADTenant] + } + } + + function account-info-from-environment-var ([string] $envvar) { + $cs = get-from-environment $envvar + account-info-from-connection-string $cs + } + + $typeHandlers = @{ + OrgIdOneTenantOneSubscription = { account-info-from-environment-var AZURE_ORGID_ONE_TENANT_ONE_SUBSCRIPTION }; + OrgIdForeignPrincipal = { account-info-from-environment-var AZURE_ORGID_FPO }; + MicrosoftId = { account-info-from-environment-var AZURE_LIVEID }; + ServicePrincipal = { account-info-from-environment-var AZURE_SERVICE_PRINCIPAL } + } + + $handler = $typeHandlers[$userType] + if ($handler -ne $Null) { + & $handler + } else { + throw "Unknown credential type $userType" + } +} diff --git a/src/Common/Commands.ScenarioTest/Resources/Credentials.ps1 b/src/Common/Commands.ScenarioTest/Resources/Credentials.ps1 new file mode 100644 index 000000000000..7ba659f0084b --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/Credentials.ps1 @@ -0,0 +1,203 @@ +.".\CredUtils.ps1" +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +################################ +# +# Verify that selecting a subscription correctly changes the current subscription +# +# param [string] $Name: The name of the subscription +# param [string] $Id : The subscription Id +################################ +function Test-SelectSubscription +{ + [CmdletBinding()] + param( + [string] + [Parameter(Mandatory=$true, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] + $Name, + [string] + [Parameter(Mandatory=$true, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] + $Id + ) + PROCESS + { + Assert-True {($Name -and $Id)} "[select-subscription]: You must specify a Name and Id" + Select-AzureSubscription -SubscriptionName $Name + Write-Log "Selected subscription '$Name'" + $subscription = Get-AzureSubscription -Current + $subscription | Format-Subscription | Write-Log + Assert-True { (($subscription.SubscriptionName -eq $Name) -and ($subscription.SubscriptionId -eq $Id))} "[Select-Subscription]: current subscription does not match '$Name'" + } +} + +###################################### +# +# Select each subscription in a given puvlish settings file as the current subscription +# +# param [string] $settingsFile: The publish settings file that contains the subscriptions +###################################### +function Test-SelectValidSubscriptions +{ + param([string] $settingsFile) + Remove-AllSubscriptions + $subscriptions = @() + $subscriptions += Get-Subscriptions $settingsFile + Import-AzurePublishSettingsFile $settingsFile + $subscriptions | Test-SelectSubscription + Write-Log "Checking current subscription after remove all" + Remove-AllSubscriptions + Test-GetEmptyCurrentSubscription +} + +########################################## +# +# Attempt to view the current subscription after clearing it +# +# param [string] $settingsFile: The publish settings file that contains the subscriptions +########################################## +function Test-SelectSubscriptionAfterClear +{ + param([string] $settingsFile) + Remove-AllSubscriptions + $subscriptions = @() + $subscriptions += Get-Subscriptions $settingsFile + Import-AzurePublishSettingsFile $settingsFile + Select-AzureSubscription ($subscriptions[0].Name) + Select-AzureSubscription -Clear + Test-GetEmptyCurrentSubscription +} + +####################################### +# +# Test importing a publish settings file - determine the subscriptions that should be imported and validate +# that they are imported correctly by the commandlet +# +# param [string] $settingsFile: The publish settings file to import and validate +####################################### +function Test-ImportPublishSettingsFile +{ + param([string] $settingsFile) + $subscriptions = @() + $subscriptions += Get-Subscriptions $settingsFile + return ImportAndVerify-PublishSettingsFile $settingsFile $subscriptions[0].Name $subscriptions +} + +############################################## +# +# Test that an error is correctly thrown when attempting to import an invalid publishsettings file +# param [string] $settingsFile: The path to the publishsettingsFile +# +############################################## +function Test-ImportInvalidPublishSettingsFile +{ + param([string] $settingsFile) + $fileName = Get-FullName $settingsFile + $message = "The provided publish settings file $fileName has invalid content. Please get valid by running cmdlet Get-AzurePublishSettingsFile" + Assert-Throws {Import-AzurePublishSettingsFile $settingsFile} $message +} + +################################################## +# +# Test that an appropriate error is thrown when attempting to import a non-existent publish settings file +################################################## +function Test-ImportNonExistentPublishSettingsFile +{ + $pathName = Get-FullName .\ + $fileName = [System.IO.Path]::Combine($pathName, "barrybar.publishsettings") + $message = "Cannot find path '$fileName' because it does not exist." + Assert-Throws {Import-AzurePublishSettingsFile $fileName} $message +} + +####################################### +# +# Validate that an informative error is thrown when attempting to remove an invalid subscription +####################################### +function Test-RemoveInvalidSubscription +{ + $message = "`"The subscription named 'foobar' cannot be found. Use Set-AzureSubscription to initialize the subscription data.`"" + Assert-Throws {Remove-AzureSubscription foobar} $message +} + +####################################### +# +# Validate that an informative error is thrown when attempting to remove an empty subscription +####################################### +function Test-RemoveEmptySubscription +{ + $message = "Cannot validate argument on parameter 'SubscriptionName'. The argument is null or empty. Supply an argument that is not null or empty and then try the command again." + Assert-Throws {Remove-AzureSubscription ""} $message +} + +####################################### +# +# Validate that nothing is returned when attempting to get an invalid subscription +####################################### +function Test-GetInvalidSubscription +{ + $foobar = "foobar" + Assert-True {(Get-AzureSubscription $foobar) -eq $nul} "[test-getinvalidsubscription]: Getting an invalid subscription resulted in non-null output" +} + +####################################### +# +# Validate that an informative error is thrown when attempting to get an empty subscription +####################################### +function Test-GetEmptySubscription +{ + $message = "Cannot validate argument on parameter 'SubscriptionName'. The argument is null or empty. Supply an argument that is not null or empty and then try the command again." + Assert-Throws {Get-AzureSubscription ""} $message +} + +######################################### +# +# Validate that an appropriate error is thrown when attempting to get a non-existent current subscription +######################################### +function Test-GetEmptyCurrentSubscription +{ + $message = "No subscription is currently selected. Use Select-Subscription to activate a subscription." + Remove-AllSubscriptions + Assert-Throws {Get-AzureSubscription -Current} $message +} + +######################################### +# +# Validate that an appropriate error is thrown when attempting to get a non-existent current subscription +######################################### +function Test-GetEmptyDefaultSubscription +{ + $message = "No default subscription has been designated. Use Set-AzureSubscription -DefaultSubscription to set the default subscription." + Remove-AllSubscriptions + Assert-Throws {Get-AzureSubscription -Default} $message +} + +####################################### +# +# Validate that an informative error is thrown when attempting to select an invalid subscription +####################################### +function Test-SelectInvalidSubscription +{ + $message = "`"The subscription named 'foobar' cannot be found. Use Set-AzureSubscription to initialize the subscription data.`"" + Assert-Throws {Select-AzureSubscription foobar} $message +} + +####################################### +# +# Validate that an informative error is thrown when attempting to select an empty subscription +####################################### +function Test-SelectEmptySubscription +{ + $message = "Cannot validate argument on parameter 'SubscriptionName'. The argument is null or empty. Supply an argument that is not null or empty and then try the command again." + Assert-Throws {Select-AzureSubscription ""} $message +} diff --git a/src/Common/Commands.ScenarioTest/Resources/Credstests.ps1 b/src/Common/Commands.ScenarioTest/Resources/Credstests.ps1 new file mode 100644 index 000000000000..c392a636fd08 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/Credstests.ps1 @@ -0,0 +1,70 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +Import-Module azure +.".\Credentials.ps1" +$global:totalCount = 0; +$global:passedCount = 0; + +function Run-TestProtected +{ + param([ScriptBlock]$script, [string] $testName) + try + { + Write-Host -ForegroundColor Green ===================================== + Write-Host -ForegroundColor Green "Running test $testName" + Write-Host -ForegroundColor Green ===================================== + Write-Host + &$script + $global:passedCount = $global:passedCount + 1 + Write-Host + Write-Host -ForegroundColor Green ===================================== + Write-Host -ForegroundColor Green "Test Passed" + Write-Host -ForegroundColor Green ===================================== + Write-Host + } + catch + { + Out-String -InputObject $_.Exception | Write-Host -ForegroundColor Red + Write-Host + Write-Host -ForegroundColor Red ===================================== + Write-Host -ForegroundColor Red "Test Failed" + Write-Host -ForegroundColor Red ===================================== + Write-Host + } + finally + { + $global:totalCount = $global:totalCount + 1 + } +} + +Run-TestProtected {Run-Test {Test-ImportPublishSettingsFile '.\tipsf001.publishsettings'} } "Multiple Test-ImportPublishSettingsFile" +Run-TestProtected {Run-Test {Test-ImportPublishSettingsFile '.\tipsf002.publishsettings'} } "Single Test-ImportPublishSettingsFile" +Run-TestProtected {Run-Test {Test-ImportPublishSettingsFile '.\tipsf003.publishsettings'} } "Alternate address Test-ImportPublishSettingsFile" +Run-TestProtected {Run-Test {Test-ImportInvalidPublishSettingsFile '.\tipsf004.publishsettings'}} "Import invalid publish settings" +Run-TestProtected {Run-Test {Test-ImportNonExistentPublishSettingsFile}} "Import non-existent publish settings" +Run-TestProtected {Run-Test {Test-RemoveInvalidSubscription}} "Remove invalid subscription" +Run-TestProtected {Run-Test {Test-RemoveEmptySubscription}} "Remove Empty Subscription" +Run-TestProtected {Run-Test {Test-GetInvalidSubscription}} "Get Invalid Subscription" +Run-TestProtected {Run-Test {Test-GetEmptySubscription}} "Get Empty Subscription" +Run-TestProtected {Run-Test {Test-GetEmptyCurrentSubscription}} "Get Current subscription (empty)" +Run-TestProtected {Run-Test {Test-GetEmptyDefaultSubscription}} "Get Default Subscription (empty)" +# Run-TestProtected {Run-Test {Test-SelectValidSubscriptions '.\tipsf001.publishsettings'}} "Select Valid Subscriptions" +Run-TestProtected {Run-Test {Test-SelectSubscriptionAfterClear '.\tipsf001.publishsettings'}} "Select subscription after clear" +Run-TestProtected {Run-Test {Test-SelectInvalidSubscription}} "Select invalid subscription" +Run-TestProtected {Run-Test {Test-SelectEmptySubscription}} "Select empty subscription" +Write-Host +Write-Host -ForegroundColor Green "$global:passedCount / $global:totalCount Credentials Tests Pass" +Write-Host + diff --git a/src/Common/Commands.ScenarioTest/Resources/CsmTestDummySubscription.json b/src/Common/Commands.ScenarioTest/Resources/CsmTestDummySubscription.json new file mode 100644 index 000000000000..2e943013e7ab --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/CsmTestDummySubscription.json @@ -0,0 +1,4 @@ +{ + "TEST_CSM_ORGID_AUTHENTICATION":"SubscriptionId=db1ab6f0-4769-4b27-930e-01e2ef9c123c;BaseUri=https://management.azure.com/;AADAuthEndpoint=https://login.windows.net/;RawToken=abc123", + "TEST_ORGID_AUTHENTICATION":"SubscriptionId=db1ab6f0-4769-4b27-930e-01e2ef9c123c;BaseUri=https://management.core.windows.net/;RawToken=abc123", +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/Emulator.ps1 b/src/Common/Commands.ScenarioTest/Resources/Emulator.ps1 new file mode 100644 index 000000000000..e9fc394a24df --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/Emulator.ps1 @@ -0,0 +1,99 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +.".\Scaffolding.ps1" + +function Get-Address +{ + param([array] $lines) + Write-Log $lines + foreach ($hardline in $lines) + { + Write-Log $hardline + if ($hardline.indexOf('http:') -gt 0) + { + $outputlines = $hardline.split("`r`n") + Write-Log $outputlines + foreach($line in $outputlines) + { + Write-Log $line + $start = $line.indexOf('http://') + if ($start -gt 0) + { + return ($line.substring($start)) + } + } + } + } + + throw "Unable to determine service address" +} + +function Test-NodeHelloInEmulator +{ + Stop-AzureEmulator + $loc = Get-Location + Create-NodeBaseService "myNodeService" + try + { + $info = Start-AzureEmulator + Write-Log "Emulator output: $info" + $address = Get-Address $info + Write-Log "Using service address '$address'" + Dump-Document $address + } + finally + { + Set-Location $loc + Stop-AzureEmulator + rm -Recurse ".\myNodeService" + } +} + +function Test-PHPHelloInEmulator +{ + Stop-AzureEmulator + $loc = Get-Location + Create-PHPWebService "myPHPService" + try + { + $info = Start-AzureEmulator + Write-Log "Emulator output: $info" + $address = Get-Address $info + Write-Log "Using service address '$address'" + Dump-Document $address + } + finally + { + Set-Location $loc + Stop-AzureEmulator + rm -Recurse ".\myPHPService" + } +} + +function Test-NodeServiceCreation +{ + $loc = Get-Location + Create-NodeBaseService "myNodeService01" + Set-Location $loc + rm -Recurse ".\myNodeService01" +} + +function Test-PHPServiceCreation +{ + $loc = Get-Location + Create-PHPBaseService "myPHPService01" + Set-Location $loc + rm -Recurse ".\myPHPService01" +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/Emulatortests.ps1 b/src/Common/Commands.ScenarioTest/Resources/Emulatortests.ps1 new file mode 100644 index 000000000000..e21e627af1aa --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/Emulatortests.ps1 @@ -0,0 +1,58 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +Import-Module azure +.".\Emulator.ps1" +$global:totalCount = 0; +$global:passedCount = 0; + +function Run-TestProtected +{ + param([ScriptBlock]$script, [string] $testName) + try + { + Write-Host -ForegroundColor Green ===================================== + Write-Host -ForegroundColor Green "Running test $testName" + Write-Host -ForegroundColor Green ===================================== + Write-Host + &$script + $global:passedCount = $global:passedCount + 1 + Write-Host + Write-Host -ForegroundColor Green ===================================== + Write-Host -ForegroundColor Green "Test Passed" + Write-Host -ForegroundColor Green ===================================== + Write-Host + } + catch + { + Out-String -InputObject $_.Exception | Write-Host -ForegroundColor Red + Write-Host + Write-Host -ForegroundColor Red ===================================== + Write-Host -ForegroundColor Red "Test Failed" + Write-Host -ForegroundColor Red ===================================== + Write-Host + } + finally + { + $global:totalCount = $global:totalCount + 1 + } +} +Run-TestProtected {Run-Test {Test-NodeServiceCreation}".\emtest001.log"} "Emulator Node Hello World Scenario" +Run-TestProtected {Run-Test {Test-PHPServiceCreation} ".\emtest002.log"} "Emulator PHP Hello World Scenario" +Run-TestProtected {Run-Test {Test-NodeHelloInEmulator}} "Emulator Node Hello World Scenario" +Run-TestProtected {Run-Test {Test-PHPHelloInEmulator}} "Emulator PHP Hello World Scenario" +Write-Host +Write-Host -ForegroundColor Green "$global:passedCount / $global:totalCount Emulator Tests Pass" +Write-Host + diff --git a/src/Common/Commands.ScenarioTest/Resources/GenerateCredstests.ps1 b/src/Common/Commands.ScenarioTest/Resources/GenerateCredstests.ps1 new file mode 100644 index 000000000000..d8bf41a27ffe --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/GenerateCredstests.ps1 @@ -0,0 +1,22 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +Import-Module Azure +.".\Credentials.ps1" +Run-Test {Test-ImportPublishSettingsFile ".\tipsf001.publishsettings"} .\tipsf001.log -generate +Run-Test {Test-ImportPublishSettingsFile ".\tipsf002.publishsettings"} .\tipsf002.log -generate +Run-Test {Test-ImportPublishSettingsFile ".\tipsf003.publishsettings"} .\tipsf003.log -generate +Write-Host +Write-Host -ForegroundColor Green "All Baseline files generated" +Write-Host diff --git a/src/Common/Commands.ScenarioTest/Resources/GenerateEmulatortests.ps1 b/src/Common/Commands.ScenarioTest/Resources/GenerateEmulatortests.ps1 new file mode 100644 index 000000000000..50660ee931cf --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/GenerateEmulatortests.ps1 @@ -0,0 +1,21 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +Import-Module azure +.".\Emulator.ps1" +Run-Test {Test-NodeServiceCreation} ".\emtest001.log" -generate +Run-Test {Test-PHPServiceCreation} ".\emtest002.log" -generate +Write-Host +Write-Host -ForegroundColor Green "All Baseline files generated" +Write-Host diff --git a/src/Common/Commands.ScenarioTest/Resources/Management/ManagementTests.ps1 b/src/Common/Commands.ScenarioTest/Resources/Management/ManagementTests.ps1 new file mode 100644 index 000000000000..6fcdea997d77 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/Management/ManagementTests.ps1 @@ -0,0 +1,78 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +########################################################################### Remove-AzureSubscription Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests Remove-AzureSubscription with valid subscription +#> +function Test-RemoveAzureSubscriptionWithDefaultSubscription +{ + # Setup + $name = (Get-AzureSubscription -Default).SubscriptionName + $expectedDefaultWarning = "The default subscription is being removed. Use Select-Subscription to select a new default subscription." + $expectedCurrentWarning = "The current subscription is being removed. Use Select-Subscription to select a new current subscription." + + # Test + Remove-AzureSubscription $name -Force -WarningVariable warning + + # Assert + Assert-AreEqual $expectedDefaultWarning $warning[0] + Assert-AreEqual $expectedCurrentWarning $warning[1] + # Assert-Null $(Get-AzureSubscription $name) +} + +<# +.SYNOPSIS +Tests Remove-AzureSubscription with non existing subscription +#> +function Test-RemoveAzureSubscriptionWithNonExistingSubscription +{ + # Setup + $errorMessage = "The subscription named 'NotExisting' cannot be found. Use Set-AzureSubscription to initialize the subscription data." + + # Test + Assert-Throws { Remove-AzureSubscription "NotExisting" -Force } $errorMessage +} + +<# +.SYNOPSIS +Tests Remove-AzureSubscription with empty subscription +#> +function Test-RemoveAzureSubscriptionWithEmptySubscription +{ + # Setup + $errorMessage = "Cannot validate argument on parameter 'SubscriptionName'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again." + + # Test + Assert-Throws { Remove-AzureSubscription "" } $errorMessage +} + +<# +.SYNOPSIS +Tests Remove-AzureSubscription with WhatIf +#> +function Test-RemoveAzureSubscriptionWithWhatIf +{ + # Setup + $name = (Get-AzureSubscription -Default).SubscriptionName + + # Test + Remove-AzureSubscription $name -Force -WhatIf + Remove-AzureSubscription $name -Force + + # Assert + Assert-True { $true } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/MediaServices/MediaServices.ps1 b/src/Common/Commands.ScenarioTest/Resources/MediaServices/MediaServices.ps1 new file mode 100644 index 000000000000..4a69e5914567 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/MediaServices/MediaServices.ps1 @@ -0,0 +1,169 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +########################################################################### General Scenario Tests ########################################################################### + + +# Initilizing variables +$pseudorandomInput = "a","b","c","d","e","f","g","1","2","3","4","5","6","7" +$mediaPrefix = "psmediatest" +$MediaAccountName = $MediaAccountName +$StorageAccountName = $StorageAccountName +$DefaultRegion = "West US" + +function GetPseudoRandomName +{ + $returnValue = $mediaPrefix + (Get-Random -input $pseudorandomInput) + (Get-Random -input $pseudorandomInput) + (Get-Random -input $pseudorandomInput) + return $returnValue +} + +# Generating accounts names if variables are not defined +if([string]::IsNullOrEmpty($StorageAccountName)) +{ + $StorageAccountName = GetPseudoRandomName +} + +if([string]::IsNullOrEmpty($MediaAccountName)) +{ + $MediaAccountName = GetPseudoRandomName +} + +function Get-Region +{ + param([string] $defaultRegion) + $locations = Get-AzureLocation + $returnedLocation = $null + Foreach($location in $locations) + { + if ($location.DisplayName -eq $defaultRegion) + { + return $defaultRegion + } + + if ($location.AvailableServices.Contains('Storage')) + { + $returnedLocation = $location.DisplayName + } + } + + return $returnedLocation +} + + +$Region = Get-Region $DefaultRegion + + + + +function EnsureStorageAccountExists +{ + + + $accounts = Get-AzureStorageAccount + + Foreach($account in $accounts) + { + if ($account.StorageAccountName -eq $StorageAccountName) + { + return + } + } + + New-AzureStorageAccount -StorageAccountName $StorageAccountName -Location $Region + +} + +function EnsureTestAccountExists +{ + + $accounts = Get-AzureMediaServicesAccount + + Foreach($account in $accounts) + { + if ($account.Name -eq $MediaAccountName) + { + return + } + } + + EnsureStorageAccountExists + + New-AzureMediaServicesAccount -Name $MediaAccountName -Location $Region -StorageAccountName $StorageAccountName +} + +<# +.SYNOPSIS +Tests rotate key. +#> +function Test-NewAzureMediaServicesKey +{ + EnsureTestAccountExists + + $key = New-AzureMediaServicesKey -Name $MediaAccountName -KeyType Secondary -Force + + $account = Get-AzureMediaServicesAccount -Name $MediaAccountName + + Assert-AreEqual $key $account.MediaServicesSecondaryAccountKey +} + + +<# +.SYNOPSIS +Tests delete account. +#> +function Test-RemoveAzureMediaServicesAccount +{ + EnsureTestAccountExists + + Remove-AzureMediaServicesAccount -Name $MediaAccountName -Force +} + +function Test-GetAzureMediaServicesAccount +{ + $accounts = Get-AzureMediaServicesAccount +} + +function Test-GetAzureMediaServicesAccountByName +{ + EnsureTestAccountExists + + $account = Get-AzureMediaServicesAccount -Name $MediaAccountName +} + + + +function MediaServicesTest-Cleanup +{ + $accounts = Get-AzureMediaServicesAccount + + Foreach($account in $accounts) + { + if($account.Name.StartsWith($mediaPrefix)) + { + + Remove-AzureMediaServicesAccount -Name $account.Name -Force + } + } + + + $accounts = Get-AzureStorageAccount + + Foreach($account in $accounts) + { + if ($account.StorageAccountName.StartsWith($mediaPrefix)) + { + Remove-AzureStorageAccount -StorageAccountName $account.StorageAccountName + } + } +} diff --git a/src/Common/Commands.ScenarioTest/Resources/NodeEmulatorTests.ps1 b/src/Common/Commands.ScenarioTest/Resources/NodeEmulatorTests.ps1 new file mode 100644 index 000000000000..2912b059f72c --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/NodeEmulatorTests.ps1 @@ -0,0 +1,56 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +Import-Module azure +.".\Emulator.ps1" +$global:totalCount = 0; +$global:passedCount = 0; + +function Run-TestProtected +{ + param([ScriptBlock]$script, [string] $testName) + try + { + Write-Host -ForegroundColor Green ===================================== + Write-Host -ForegroundColor Green "Running test $testName" + Write-Host -ForegroundColor Green ===================================== + Write-Host + &$script + $global:passedCount = $global:passedCount + 1 + Write-Host + Write-Host -ForegroundColor Green ===================================== + Write-Host -ForegroundColor Green "Test Passed" + Write-Host -ForegroundColor Green ===================================== + Write-Host + } + catch + { + Out-String -InputObject $_.Exception | Write-Host -ForegroundColor Red + Write-Host + Write-Host -ForegroundColor Red ===================================== + Write-Host -ForegroundColor Red "Test Failed" + Write-Host -ForegroundColor Red ===================================== + Write-Host + } + finally + { + $global:totalCount = $global:totalCount + 1 + } +} +Run-TestProtected {Run-Test {Test-NodeServiceCreation}".\emtest001.log"} "Emulator Node Hello World Scenario" +Run-TestProtected {Run-Test {Test-NodeHelloInEmulator}} "Emulator Node Hello World Scenario" +Write-Host +Write-Host -ForegroundColor Green "$global:passedCount / $global:totalCount Emulator Tests Pass" +Write-Host + diff --git a/src/Common/Commands.ScenarioTest/Resources/PHPEmulatorTests.ps1 b/src/Common/Commands.ScenarioTest/Resources/PHPEmulatorTests.ps1 new file mode 100644 index 000000000000..ccc5572d3e21 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/PHPEmulatorTests.ps1 @@ -0,0 +1,56 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +Import-Module azure +.".\Emulator.ps1" +$global:totalCount = 0; +$global:passedCount = 0; + +function Run-TestProtected +{ + param([ScriptBlock]$script, [string] $testName) + try + { + Write-Host -ForegroundColor Green ===================================== + Write-Host -ForegroundColor Green "Running test $testName" + Write-Host -ForegroundColor Green ===================================== + Write-Host + &$script + $global:passedCount = $global:passedCount + 1 + Write-Host + Write-Host -ForegroundColor Green ===================================== + Write-Host -ForegroundColor Green "Test Passed" + Write-Host -ForegroundColor Green ===================================== + Write-Host + } + catch + { + Out-String -InputObject $_.Exception | Write-Host -ForegroundColor Red + Write-Host + Write-Host -ForegroundColor Red ===================================== + Write-Host -ForegroundColor Red "Test Failed" + Write-Host -ForegroundColor Red ===================================== + Write-Host + } + finally + { + $global:totalCount = $global:totalCount + 1 + } +} +Run-TestProtected {Run-Test {Test-PHPServiceCreation} ".\emtest002.log"} "Emulator PHP Hello World Scenario" +Run-TestProtected {Run-Test {Test-PHPHelloInEmulator}} "Emulator PHP Hello World Scenario" +Write-Host +Write-Host -ForegroundColor Green "$global:passedCount / $global:totalCount Emulator Tests Pass" +Write-Host + diff --git a/src/Common/Commands.ScenarioTest/Resources/RdfeTestDummy.publishsettings b/src/Common/Commands.ScenarioTest/Resources/RdfeTestDummy.publishsettings new file mode 100644 index 000000000000..db0ddd4d4662 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/RdfeTestDummy.publishsettings @@ -0,0 +1,13 @@ + + + + + + + \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/ResourceLocator.cs b/src/Common/Commands.ScenarioTest/Resources/ResourceLocator.cs new file mode 100644 index 000000000000..5159691a7c59 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/ResourceLocator.cs @@ -0,0 +1,22 @@ +// ---------------------------------------------------------------------------------- +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.Resources +{ + /// + /// A dummy class used to located the resources in this folder/namespace. + /// + public class ResourceLocator + { + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/RunWebsitesTests.ps1 b/src/Common/Commands.ScenarioTest/Resources/RunWebsitesTests.ps1 new file mode 100644 index 000000000000..7305e75b2001 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/RunWebsitesTests.ps1 @@ -0,0 +1,134 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +.".\\..\\Common.ps1" +.".\\..\\Assert.ps1" +.".\\Websites\\Common.ps1" +.".\\Websites\\WebsitesTests.ps1" +$global:totalCount = 0; +$global:passedCount = 0; +$global:passedTests = @() +$global:failedTests = @() +$global:times = @{} +Add-Type -Path "..\\Microsoft.Azure.Utilities.HttpRecorder.dll" +Add-Type -Path "..\\Microsoft.WindowsAzure.Testing.dll" +[Microsoft.Azure.Utilities.HttpRecorder.HttpMockServer]::Initialize("foo", "bar") +function Run-TestProtected +{ + param([ScriptBlock]$script, [string] $testName) + $testStart = Get-Date + try + { + Write-Host -ForegroundColor Green ===================================== + Write-Host -ForegroundColor Green "Running test $testName" + Write-Host -ForegroundColor Green ===================================== + Write-Host + &$script + $global:passedCount = $global:passedCount + 1 + Write-Host + Write-Host -ForegroundColor Green ===================================== + Write-Host -ForegroundColor Green "Test Passed" + Write-Host -ForegroundColor Green ===================================== + Write-Host + $global:passedTests += $testName + } + catch + { + Out-String -InputObject $_.Exception | Write-Host -ForegroundColor Red + Write-Host + Write-Host -ForegroundColor Red ===================================== + Write-Host -ForegroundColor Red "Test Failed" + Write-Host -ForegroundColor Red ===================================== + Write-Host + $global:failedTests += $testName + } + finally + { + $testEnd = Get-Date + $testElapsed = $testEnd - $testStart + $global:times[$testName] = $testElapsed + $global:totalCount = $global:totalCount + 1 + } +} + +Write-Host Initializing websites tests +Initialize-WebsiteTest +Write-Host Initialization Completed +$global:startTime = Get-Date +Run-TestProtected { Run-WebsiteTest {Test-GettingJobHistory} "Test-GettingJobHistory" } "Test-GettingJobHistory" +Run-TestProtected { Run-WebsiteTest {Test-GettingWebsiteJobs} "Test-GettingWebsiteJobs"} "Test-GettingWebsiteJobs" +Run-TestProtected { Run-WebsiteTest {Test-StartAndStopAzureWebsiteContinuousJob} "Test-StartAndStopAzureWebsiteContinuousJob"} "Test-StartAndStopAzureWebsiteContinuousJob" +Run-TestProtected { Run-WebsiteTest {Test-StartAzureWebsiteTriggeredJob} "Test-StartAzureWebsiteTriggeredJob"} "Test-StartAzureWebsiteTriggeredJob" +Run-TestProtected { Run-WebsiteTest {Test-RemoveNonExistingAzureWebsiteJob} "Test-RemoveNonExistingAzureWebsiteJob"} "Test-RemoveNonExistingAzureWebsiteJob" +Run-TestProtected { Run-WebsiteTest {Test-RemoveAzureWebsiteContinuousJob} "Test-RemoveAzureWebsiteContinuousJob"} "Test-RemoveAzureWebsiteContinuousJob" +Run-TestProtected { Run-WebsiteTest {Test-RemoveAzureWebsiteTriggeredJob} "Test-RemoveAzureWebsiteTriggeredJob"} "Test-RemoveAzureWebsiteTriggeredJob" +Run-TestProtected { Run-WebsiteTest {Test-SetAzureWebsite} "Test-SetAzureWebsite"} "Test-SetAzureWebsite" +Run-TestProtected { Run-WebsiteTest {Test-NewAzureWebSiteUpdateGit} "Test-NewAzureWebSiteUpdateGit"} "Test-NewAzureWebSiteUpdateGit" +#Run-TestProtected { Run-WebsiteTest {Test-NewAzureWebSiteGitHubAllParms} "Test-NewAzureWebSiteGitHubAllParms"} "Test-NewAzureWebSiteGitHubAllParms" +Run-TestProtected { Run-WebsiteTest {Test-NewAzureWebSiteMultipleCreds} "Test-NewAzureWebSiteMultipleCreds"} "Test-NewAzureWebSiteMultipleCreds" +Run-TestProtected { Run-WebsiteTest {Test-AzureWebSiteShowSingleSite} "Test-AzureWebSiteShowSingleSite"} "Test-AzureWebSiteShowSingleSite" +Run-TestProtected { Run-WebsiteTest {Test-AzureWebSiteListAll} "Test-AzureWebSiteListAll"} "Test-AzureWebSiteListAll" +Run-TestProtected { Run-WebsiteTest {Test-GetAzureWebSiteListNone} "Test-GetAzureWebSiteListNone"} "Test-GetAzureWebSiteListNone" +Run-TestProtected { Run-WebsiteTest {Test-KuduAppsExpressApp} "Test-KuduAppsExpressApp"} "Test-KuduAppsExpressApp" +Run-TestProtected { Run-WebsiteTest {Test-GetAzureWebsiteLocation} "Test-GetAzureWebsiteLocation"} "Test-GetAzureWebsiteLocation" +Run-TestProtected { Run-WebsiteTest {Test-DisablesBothByDefault} "Test-DisablesBothByDefault"} "Test-DisablesBothByDefault" +Run-TestProtected { Run-WebsiteTest {Test-DisablesStorageOnly} "Test-DisablesStorageOnly"} "Test-DisablesStorageOnly" +Run-TestProtected { Run-WebsiteTest {Test-DisablesFileOnly} "Test-DisablesFileOnly"} "Test-DisablesFileOnly" +Run-TestProtected { Run-WebsiteTest {Test-DisableApplicationDiagnosticOnTableStorageAndFile} "Test-DisableApplicationDiagnosticOnTableStorageAndFile"} "Test-DisableApplicationDiagnosticOnTableStorageAndFile" +Run-TestProtected { Run-WebsiteTest {Test-DisableApplicationDiagnosticOnFileSystem} "Test-DisableApplicationDiagnosticOnFileSystem"} "Test-DisableApplicationDiagnosticOnFileSystem" +Run-TestProtected { Run-WebsiteTest {Test-DisableApplicationDiagnosticOnTableStorage} "Test-DisableApplicationDiagnosticOnTableStorage"} "Test-DisableApplicationDiagnosticOnTableStorage" +Run-TestProtected { Run-WebsiteTest {Test-ThrowsForInvalidStorageAccountName} "Test-ThrowsForInvalidStorageAccountName"} "Test-ThrowsForInvalidStorageAccountName" +Run-TestProtected { Run-WebsiteTest {Test-ReconfigureStorageAppDiagnostics} "Test-ReconfigureStorageAppDiagnostics"} "Test-ReconfigureStorageAppDiagnostics" +Run-TestProtected { Run-WebsiteTest {Test-UpdateTheDiagnositicLogLevel} "Test-UpdateTheDiagnositicLogLevel"} "Test-UpdateTheDiagnositicLogLevel" +Run-TestProtected { Run-WebsiteTest {Test-EnableApplicationDiagnosticOnFileSystem} "Test-EnableApplicationDiagnosticOnFileSystem"} "Test-EnableApplicationDiagnosticOnFileSystem" +Run-TestProtected { Run-WebsiteTest {Test-EnableApplicationDiagnosticOnTableStorage} "Test-EnableApplicationDiagnosticOnTableStorage"} "Test-EnableApplicationDiagnosticOnTableStorage" +Run-TestProtected { Run-WebsiteTest {Test-EnableApplicationDiagnosticOnBlobStorage} "Test-EnableApplicationDiagnosticOnBlobStorage"} "Test-EnableApplicationDiagnosticOnBlobStorage" +Run-TestProtected { Run-WebsiteTest {Test-RestartAzureWebsite} "Test-RestartAzureWebsite"} "Test-RestartAzureWebsite" +Run-TestProtected { Run-WebsiteTest {Test-StopAzureWebsite} "Test-StopAzureWebsite"} "Test-StopAzureWebsite" +Run-TestProtected { Run-WebsiteTest {Test-StartAzureWebsite} "Test-StartAzureWebsite"} "Test-StartAzureWebsite" +Run-TestProtected { Run-WebsiteTest {Test-GetAzureWebsiteWithStoppedSite} "Test-GetAzureWebsiteWithStoppedSite"} "Test-GetAzureWebsiteWithStoppedSite" +Run-TestProtected { Run-WebsiteTest {Test-GetAzureWebsite} "Test-GetAzureWebsite"} "Test-GetAzureWebsite" +#Run-TestProtected { Run-WebsiteTest {Test-GetAzureWebsiteLogListPath} "Test-GetAzureWebsiteLogListPath"} "Test-GetAzureWebsiteLogListPath" +#Run-TestProtected { Run-WebsiteTest {Test-GetAzureWebsiteLogTailUriEncoding} "Test-GetAzureWebsiteLogTailUriEncoding"} "Test-GetAzureWebsiteLogTailUriEncoding" +#Run-TestProtected { Run-WebsiteTest {Test-GetAzureWebsiteLogTailPath} "Test-GetAzureWebsiteLogTailPath"} "Test-GetAzureWebsiteLogTailPath" +#Run-TestProtected { Run-WebsiteTest {Test-GetAzureWebsiteLogTail} "Test-GetAzureWebsiteLogTail"} "Test-GetAzureWebsiteLogTail" +Run-TestProtected { Run-WebsiteTest {Test-RemoveAzureServiceWithWhatIf} "Test-RemoveAzureServiceWithWhatIf"} "Test-RemoveAzureServiceWithWhatIf" +Run-TestProtected { Run-WebsiteTest {Test-RemoveAzureServiceWithNonExistingName} "Test-RemoveAzureServiceWithNonExistingName"} "Test-RemoveAzureServiceWithNonExistingName" +Run-TestProtected { Run-WebsiteTest {Test-RemoveAzureServiceWithValidName} "Test-RemoveAzureServiceWithValidName"} "Test-RemoveAzureServiceWithValidName" +Run-TestProtected { Run-WebsiteTest {Test-WithInvalidCredentials { Get-AzureWebsiteLog -Tail -Name foo }} "TestGetAzureWebsiteLogWithInvalidCredentials"} "TestGetAzureWebsiteLogWithInvalidCredentials" +Run-TestProtected { Run-WebsiteTest {Test-WithInvalidCredentials {Remove-AzureWebsite foo -Force }} "TestRemoveAzureWebsiteWithInvalidCredentials"} "TestRemoveAzureWebsiteWithInvalidCredentials" +Write-Host +Write-Host -ForegroundColor Green "$global:passedCount / $global:totalCount Website Tests Pass" +Write-Host -ForegroundColor Green "============" +Write-Host -ForegroundColor Green "PASSED TESTS" +Write-Host -ForegroundColor Green "============" +$global:passedTests | % { Write-Host -ForegroundColor Green "PASSED "$_": "($global:times[$_]).ToString()} +Write-Host -ForegroundColor Green "============" +Write-Host +Write-Host -ForegroundColor Red "============" +Write-Host -ForegroundColor Red "FAILED TESTS" +Write-Host -ForegroundColor Red "============" +$global:failedTests | % { Write-Host -ForegroundColor Red "FAILED "$_": "($global:times[$_]).ToString()} +Write-Host -ForegroundColor Red "============" +Write-Host +$global:endTime = Get-Date +Write-Host -ForegroundColor Green "=======" +Write-Host -ForegroundColor Green "TIMES" +Write-Host -ForegroundColor Green "=======" +Write-Host +Write-Host -ForegroundColor Green "Start Time: $global:startTime" +Write-Host -ForegroundColor Green "End Time: $global:endTime" +Write-Host -ForegroundColor Green "Elapsed: "($global:endTime - $global:startTime).ToString() + + diff --git a/src/Common/Commands.ScenarioTest/Resources/Scaffolding.ps1 b/src/Common/Commands.ScenarioTest/Resources/Scaffolding.ps1 new file mode 100644 index 000000000000..d34bf070f235 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/Scaffolding.ps1 @@ -0,0 +1,94 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +.".\Common.ps1" + +$CloudConfig=".\ServiceConfiguration.Cloud.cscfg" +$LocalConfig=".\ServiceConfiguration.Local.cscfg" +$ServiceDefinition=".\ServiceDefinition.csdef" +$DeploymentSettings=".\DeploymentSettings.json" + +function Create-Service +{ + [CmdletBinding()] + param([Parameter(Mandatory=$true, Position=0, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] [string] $ServiceName) + PROCESS + { + New-AzureServiceProject -ServiceName $ServiceName + Validate-ServiceScaffolding $ServiceName + } + +} + +function Validate-ServiceScaffolding +{ + [CmdletBinding()] + param([Parameter(Mandatory=$true, Position=0, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] [string] $ServiceName) + PROCESS + { + Assert-Exists $ServiceDefinition + Assert-Exists $DeploymentSettings + Assert-Exists $LocalConfig + Assert-Exists $CloudConfig + } +} + +function Create-NodeBaseService +{ + [CmdletBinding()] + param([Parameter(Mandatory=$true, Position=0, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] [string] $ServiceName) + PROCESS + { + Create-Service $ServiceName + Add-AzureNodeWebRole + Add-AzureNodeWorkerRole + Dump-Contents "." -recurse + } + +} + +function Create-PHPBaseService +{ + [CmdletBinding()] + param([Parameter(Mandatory=$true, Position=0, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] [string] $ServiceName) + PROCESS + { + Create-Service $ServiceName + Add-AzurePHPWebRole + Add-AzurePHPWorkerRole + Dump-Contents "." -recurse + } +} + +function Create-PHPWebService +{ + [CmdletBinding()] + param([Parameter(Mandatory=$true, Position=0, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] [string] $ServiceName) + PROCESS + { + Create-Service $ServiceName + Add-AzurePHPWebRole + Dump-Contents "." -recurse + } +} +function Dump-Document +{ + param([string]$uri) + $request = [System.Net.WebRequest]::Create($uri) + $response = $request.GetResponse(); + Write-Log ("GET URI $uri Status code: "+ $response.StatusCode) + Assert-True {$response.StatusCode -eq [System.Net.HttpStatusCode]::OK} "[Dump-Documet]: Failure, received bad status code" + $reader = New-Object -TypeName System.IO.StreamReader(($response.GetResponseStream())) + Write-Log ("Content: " + ($reader.ReadToEnd())) +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/Scheduler/SchedulerTests.ps1 b/src/Common/Commands.ScenarioTest/Resources/Scheduler/SchedulerTests.ps1 new file mode 100644 index 000000000000..af5df475f3c0 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/Scheduler/SchedulerTests.ps1 @@ -0,0 +1,50 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +########################## Scheduler End to End Scenario Tests ############################# + +<# +.SYNOPSIS +Scheduler End to End +#> +function Test-SchedulerEndToEnd +{ + #Verify number of regions returned for sub is 10 + $schedulerRegions = Get-AzureSchedulerLocation + Assert-AreEqual '10' $schedulerRegions.Count + $schedulerRegions + + #Create a job collection and verify job collection is successfully created + $jcName = "testFromPSScenario" + $jcLocation = "West US" + New-AzureSchedulerJobCollection -Location $jcLocation -JobCollectionName $jcName -Plan Standard + + $createdSchedulerJobCollection = Get-AzureSchedulerJobCollection -Location $jcLocation -JobCollectionName $jcName + Assert-AreEqual 'Standard' $createdSchedulerJobCollection.Plan + Assert-AreEqual $jcName $createdSchedulerJobCollection.JobCollectionName + Assert-AreEqual '50' $createdSchedulerJobCollection.MaxJobCount + + #Put a job in the job collection and verify the status + $jobName = "testFromPSScenarioJob" + New-AzureSchedulerHttpJob -Location $jcLocation -JobCollectionName $jcName -JobName $jobName -Method GET -URI http://www.bing.com + + $createdJob = Get-AzureSchedulerJob -Location $jcLocation -JobCollectionName $jcName -JobName $jobName + Assert-AreEqual 'Enabled' $createdJob.Status + Assert-AreEqual $jobName $createdJob.JobName + + #Delete the job and job collection + Remove-AzureSchedulerJob -Location $jcLocation -JobCollectionName $jcName -JobName $jobName -Force + $response = Remove-AzureSchedulerJobCollection -Location $jcLocation -JobCollectionName $jcName -Force + Assert-AreEqual 'True' $response +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/ServiceBus/AuthorizationRuleScenarioTests.ps1 b/src/Common/Commands.ScenarioTest/Resources/ServiceBus/AuthorizationRuleScenarioTests.ps1 new file mode 100644 index 000000000000..f29b140ef465 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/ServiceBus/AuthorizationRuleScenarioTests.ps1 @@ -0,0 +1,532 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +########################################################################### General Service Bus Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests any cloud based cmdlet with invalid credentials and expect it'll throw an exception. +#> +function Test-WithInvalidCredentials +{ + param([ScriptBlock] $cloudCmdlet) + + # Setup + Remove-AllSubscriptions + + # Test + Assert-Throws $cloudCmdlet "No current subscription has been designated. Use Select-AzureSubscription -Current to set the current subscription." +} + +########################################################################### New-AzureSBAuthorizationRule Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Test New-AzureSBAuthorizationRule when creating queue without passing any SAS keys. +#> +function Test-CreatesAuthorizationRuleWithoutKeys +{ + # Setup + Initialize-NamespaceTest + New-Namespace 1 + $namespaceName = $createdNamespaces[0] + $entityName = $namespaceName + $ruleName = $namespaceName + $entityType = "Queue" + $client = New-ServiceBusClientExtensions + $client.CreateQueue($namespaceName, $entityName) + + # Test + $actual = New-AzureSBAuthorizationRule -Name $ruleName -Namespace $namespaceName -EntityName $entityName ` + -EntityType $entityType -Permission $("Manage", "Send", "Listen") + + # Assert + $expectedConnectionString = $client.GetConnectionString($namespaceName, $entityName, $entityType, $actual.Name) + Assert-AreEqual $ruleName $actual.Name + Assert-AreEqual $expectedConnectionString $actual.ConnectionString + Assert-AreEqual 3 $actual.Permission.Count +} + +<# +.SYNOPSIS +Test New-AzureSBAuthorizationRule when creating topic with passing just primary key. +#> +function Test-CreatesAuthorizationRuleWithPrimaryKey +{ + # Setup + Initialize-NamespaceTest + New-Namespace 1 + $namespaceName = $createdNamespaces[0] + $entityName = $namespaceName + $ruleName = $namespaceName + $entityType = "Topic" + $client = New-ServiceBusClientExtensions + $client.CreateTopic($namespaceName, $entityName) + $primaryKey = [Microsoft.ServiceBus.Messaging.SharedAccessAuthorizationRule]::GenerateRandomKey() + + # Test + $actual = New-AzureSBAuthorizationRule -Name $ruleName -Namespace $namespaceName -EntityName $entityName ` + -EntityType $entityType -Permission $("Listen") -PrimaryKey $primaryKey + + # Assert + $expectedConnectionString = $client.GetConnectionString($namespaceName, $entityName, $entityType, $actual.Name) + Assert-AreEqual $ruleName $actual.Name + Assert-AreEqual $expectedConnectionString $actual.ConnectionString + Assert-AreEqual 1 $actual.Permission.Count + Assert-AreEqual $primaryKey $actual.Rule.PrimaryKey +} + +<# +.SYNOPSIS +Test New-AzureSBAuthorizationRule when creating relay with passing primary and secondary key. +#> +function Test-CreatesAuthorizationRuleWithPrimaryAndSecondaryKey +{ + # Setup + Initialize-NamespaceTest + New-Namespace 1 + $namespaceName = $createdNamespaces[0] + $entityName = $namespaceName + $ruleName = $namespaceName + $entityType = "Relay" + $client = New-ServiceBusClientExtensions + $client.CreateRelay($namespaceName, $entityName, "Http") + $primaryKey = [Microsoft.ServiceBus.Messaging.SharedAccessAuthorizationRule]::GenerateRandomKey() + $secondaryKey = [Microsoft.ServiceBus.Messaging.SharedAccessAuthorizationRule]::GenerateRandomKey() + + # Test + $actual = New-AzureSBAuthorizationRule -Name $ruleName -Namespace $namespaceName -EntityName $entityName ` + -EntityType $entityType -Permission $("Send", "Listen") -PrimaryKey $primaryKey -SecondaryKey $secondaryKey + + # Assert + $expectedConnectionString = $client.GetConnectionString($namespaceName, $entityName, $entityType, $actual.Name) + Assert-AreEqual $ruleName $actual.Name + Assert-AreEqual $expectedConnectionString $actual.ConnectionString + Assert-AreEqual 2 $actual.Permission.Count + Assert-AreEqual $primaryKey $actual.Rule.PrimaryKey + Assert-AreEqual $secondaryKey $actual.Rule.SecondaryKey +} + +<# +.SYNOPSIS +Test New-AzureSBAuthorizationRule on notification hub scope. +#> +function Test-CreatesAuthorizationRuleForNotificationHub +{ + # Setup + Initialize-NamespaceTest + New-Namespace 1 + $namespaceName = $createdNamespaces[0] + $entityName = $namespaceName + $ruleName = $namespaceName + $entityType = "NotificationHub" + $client = New-ServiceBusClientExtensions + $client.CreateNotificationHub($namespaceName, $entityName) + + # Test + $actual = New-AzureSBAuthorizationRule -Name $ruleName -Namespace $namespaceName -EntityName $entityName ` + -EntityType $entityType -Permission $("Send") + + # Assert + $expectedConnectionString = $client.GetConnectionString($namespaceName, $entityName, $entityType, $actual.Name) + Assert-AreEqual $ruleName $actual.Name + Assert-AreEqual $expectedConnectionString $actual.ConnectionString + Assert-AreEqual 1 $actual.Permission.Count +} + +<# +.SYNOPSIS +Test New-AzureSBAuthorizationRule on namespace scope. +#> +function Test-CreatesAuthorizationRuleForNamespace +{ + # Setup + Initialize-NamespaceTest + New-Namespace 1 + $namespaceName = $createdNamespaces[0] + $ruleName = $namespaceName + $client = New-ServiceBusClientExtensions + + # Test + $actual = New-AzureSBAuthorizationRule -Name $ruleName -Namespace $namespaceName -Permission $("Send") + + # Assert + $expectedConnectionString = $client.GetConnectionString($namespaceName, $actual.Name) + Assert-AreEqual $ruleName $actual.Name + Assert-AreEqual $expectedConnectionString $actual.ConnectionString + Assert-AreEqual 1 $actual.Permission.Count +} + +########################################################################### Set-AzureSBAuthorizationRule Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Test Set-AzureSBAuthorizationRule when creating queue and renewing primary key. +#> +function Test-SetsAuthorizationRuleRenewPrimaryKey +{ + # Setup + Initialize-NamespaceTest + New-Namespace 1 + $namespaceName = $createdNamespaces[0] + $entityName = $namespaceName + $ruleName = $namespaceName + $permission = $("Manage", "Send", "Listen") + $entityType = "Queue" + $client = New-ServiceBusClientExtensions + $client.CreateQueue($namespaceName, $entityName) + $actual = New-AzureSBAuthorizationRule -Name $ruleName -Namespace $namespaceName -EntityName $entityName ` + -EntityType $entityType -Permission $permission + $oldPrimaryKey = $actual.Rule.PrimaryKey + + # Test + Set-AzureSBAuthorizationRule -Name $ruleName -Namespace $namespaceName -EntityName $entityName ` + -EntityType $entityType + + # Assert + $actual = $client.GetAuthorizationRule($namespaceName, $entityName, $entityType, $actual.Name) + Assert-AreEqual $ruleName $actual.Name + Assert-AreNotEqual $oldPrimaryKey $actual.Rule.PrimaryKey + Assert-AreEqualArray $permission $actual.Permission +} + +<# +.SYNOPSIS +Test Set-AzureSBAuthorizationRule when creating topic and setting secondary key. +#> +function Test-SetsAuthorizationRuleSecondaryKey +{ + # Setup + Initialize-NamespaceTest + New-Namespace 1 + $namespaceName = $createdNamespaces[0] + $entityName = $namespaceName + $ruleName = $namespaceName + $entityType = "Topic" + $permission = $("Manage", "Send", "Listen") + $client = New-ServiceBusClientExtensions + $client.CreateTopic($namespaceName, $entityName) + $actual = New-AzureSBAuthorizationRule -Name $ruleName -Namespace $namespaceName -EntityName $entityName ` + -EntityType $entityType -Permission $permission + $oldSecondaryKey = $actual.Rule.SecondaryKey + $newSecondaryKey = [Microsoft.ServiceBus.Messaging.SharedAccessAuthorizationRule]::GenerateRandomKey() + + # Test + Set-AzureSBAuthorizationRule -Name $ruleName -Namespace $namespaceName -EntityName $entityName ` + -EntityType $entityType -SecondaryKey $newSecondaryKey + + # Assert + $actual = $client.GetAuthorizationRule($namespaceName, $entityName, $entityType, $actual.Name) + Assert-AreEqual $ruleName $actual.Name + Assert-AreEqual $newSecondaryKey $actual.Rule.SecondaryKey + Assert-AreEqualArray $permission $actual.Permission +} + +<# +.SYNOPSIS +Test Set-AzureSBAuthorizationRule when creating notification hub and changing the permissions. +#> +function Test-SetsAuthorizationRuleForPermission +{ + # Setup + Initialize-NamespaceTest + New-Namespace 1 + $namespaceName = $createdNamespaces[0] + $entityName = $namespaceName + $ruleName = $namespaceName + $permission = $("Manage", "Send", "Listen") + $entityType = "NotificationHub" + $client = New-ServiceBusClientExtensions + $client.CreateNotificationHub($namespaceName, $entityName) + $actual = New-AzureSBAuthorizationRule -Name $ruleName -Namespace $namespaceName -EntityName $entityName ` + -EntityType $entityType -Permission $permission + $newPermission = $("Send") + + # Test + Set-AzureSBAuthorizationRule -Name $ruleName -Namespace $namespaceName -EntityName $entityName ` + -EntityType $entityType -Permission $newPermission + + # Assert + $actual = $client.GetAuthorizationRule($namespaceName, $entityName, $entityType, $actual.Name) + $actualPermission = $actual.Permission + Assert-AreEqual $ruleName $actual.Name + Assert-AreNotEqual $oldPrimaryKey $actual.Rule.PrimaryKey + Assert-AreEqualArray $newPermission $actualPermission +} + +<# +.SYNOPSIS +Test Set-AzureSBAuthorizationRule on namespace level. +#> +function Test-SetsAuthorizationRuleOnNamespace +{ + # Setup + Initialize-NamespaceTest + New-Namespace 1 + $namespaceName = $createdNamespaces[0] + $ruleName = $namespaceName + $permission = $("Manage", "Send", "Listen") + $client = New-ServiceBusClientExtensions + $actual = New-AzureSBAuthorizationRule -Name $ruleName -Namespace $namespaceName -Permission $permission + $newPermission = $("Send") + + # Test + Set-AzureSBAuthorizationRule -Name $ruleName -Namespace $namespaceName -Permission $newPermission + + # Assert + $actual = $client.GetAuthorizationRule($namespaceName, $actual.Name) + Assert-AreEqual $ruleName $actual.Name + Assert-AreNotEqual $oldPrimaryKey $actual.Rule.PrimaryKey + Assert-AreEqualArray $newPermission $actual.Permission +} + +########################################################################### Remove-AzureSBAuthorizationRule Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests removing a namespace level authorization rule. +#> +function Test-RemovesNamespaceAuthorizationRule +{ + # Setup + Initialize-NamespaceTest + New-Namespace 1 + $namespaceName = $createdNamespaces[0] + $ruleName = $namespaceName + $client = New-ServiceBusClientExtensions + New-AzureSBAuthorizationRule -Name $ruleName -Namespace $namespaceName -Permission $("Send") + + # Test + $removed = Remove-AzureSBAuthorizationRule -Name $ruleName -Namespace $namespaceName -PassThru + + # Assert + Assert-Null $client.GetAuthorizationRule($namespaceName, $ruleName) + Assert-True { $removed } +} + +<# +.SYNOPSIS +Tests removing a queue entity authorization rule. +#> +function Test-RemovesQueueAuthorizationRule +{ + # Setup + Initialize-NamespaceTest + New-Namespace 1 + $namespaceName = $createdNamespaces[0] + $entityName = $namespaceName + $ruleName = $namespaceName + $entityType = "Queue" + $client = New-ServiceBusClientExtensions + $client.CreateQueue($namespaceName, $entityName) + New-AzureSBAuthorizationRule -Name $ruleName -Namespace $namespaceName -EntityName $entityName ` + -EntityType $entityType -Permission $("Manage", "Send", "Listen") + + # Test + $removed = Remove-AzureSBAuthorizationRule -Name $ruleName -Namespace $namespaceName -EntityName $entityName ` + -EntityType $entityType -PassThru + + # Assert + $actual = $client.GetAuthorizationRule($namespaceName, $entityName, $entityType, $ruleName) + Assert-Null $actual + Assert-True { $removed } +} + +<# +.SYNOPSIS +Tests removing a topic entity authorization rule. +#> +function Test-RemovesTopicAuthorizationRule +{ + # Setup + Initialize-NamespaceTest + New-Namespace 1 + $namespaceName = $createdNamespaces[0] + $entityName = $namespaceName + $ruleName = $namespaceName + $entityType = "Topic" + $client = New-ServiceBusClientExtensions + $client.CreateTopic($namespaceName, $entityName) + New-AzureSBAuthorizationRule -Name $ruleName -Namespace $namespaceName -EntityName $entityName ` + -EntityType $entityType -Permission $("Manage", "Send", "Listen") + + # Test + $removed = Remove-AzureSBAuthorizationRule -Name $ruleName -Namespace $namespaceName -EntityName $entityName ` + -EntityType $entityType -PassThru + + # Assert + $actual = $client.GetAuthorizationRule($namespaceName, $entityName, $entityType, $ruleName) + Assert-Null $actual + Assert-True { $removed } +} + +<# +.SYNOPSIS +Tests removing a relay entity authorization rule. +#> +function Test-RemovesRelayAuthorizationRule +{ + # Setup + Initialize-NamespaceTest + New-Namespace 1 + $namespaceName = $createdNamespaces[0] + $entityName = $namespaceName + $ruleName = $namespaceName + $entityType = "Relay" + $client = New-ServiceBusClientExtensions + $client.CreateRelay($namespaceName, $entityName, "Http") + New-AzureSBAuthorizationRule -Name $ruleName -Namespace $namespaceName -EntityName $entityName ` + -EntityType $entityType -Permission $("Manage", "Send", "Listen") + + # Test + $removed = Remove-AzureSBAuthorizationRule -Name $ruleName -Namespace $namespaceName -EntityName $entityName ` + -EntityType $entityType -PassThru + + # Assert + $actual = $client.GetAuthorizationRule($namespaceName, $entityName, $entityType, $ruleName) + Assert-Null $actual + Assert-True { $removed } +} + +<# +.SYNOPSIS +Tests removing a notification hub entity authorization rule. +#> +function Test-RemovesNotificationHubAuthorizationRule +{ + # Setup + Initialize-NamespaceTest + New-Namespace 1 + $namespaceName = $createdNamespaces[0] + $entityName = $namespaceName + $ruleName = $namespaceName + $entityType = "NotificationHub" + $client = New-ServiceBusClientExtensions + $client.CreateNotificationHub($namespaceName, $entityName) + New-AzureSBAuthorizationRule -Name $ruleName -Namespace $namespaceName -EntityName $entityName ` + -EntityType $entityType -Permission $("Manage", "Send", "Listen") + + # Test + $removed = Remove-AzureSBAuthorizationRule -Name $ruleName -Namespace $namespaceName -EntityName $entityName ` + -EntityType $entityType -PassThru + + # Assert + $actual = $client.GetAuthorizationRule($namespaceName, $entityName, $entityType, $ruleName) + Assert-Null $actual + Assert-True { $removed } +} + +########################################################################### Get-AzureSBAuthorizationRule Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests getting all authorization rules on a given namespace. +#> +function Test-GetsNamespaceAuthorizationRules +{ + # Setup + Initialize-NamespaceTest + New-Namespace 1 + $namespaceName = $createdNamespaces[0] + $ruleName = $namespaceName + $client = New-ServiceBusClientExtensions + New-AzureSBAuthorizationRule -Name $ruleName -Namespace $namespaceName -Permission $("Manage", "Send", "Listen") + New-AzureSBAuthorizationRule -Name "onesdktestrule21" -Namespace $namespaceName -Permission $("Manage", "Send", "Listen") + + # Test + $actual = Get-AzureSBAuthorizationRule -Namespace $namespaceName + + # Assert + Assert-AreEqual 3 $actual.Count +} + +<# +.SYNOPSIS +Tests getting specific authorization rules on a queue. +#> +function Test-GetsQueueSpecificAuthorizationRule +{ + # Setup + Initialize-NamespaceTest + New-Namespace 1 + $namespaceName = $createdNamespaces[0] + $entityName = $namespaceName + $ruleName = $namespaceName + $entityType = "NotificationHub" + $client = New-ServiceBusClientExtensions + $client.CreateNotificationHub($namespaceName, $entityName) + New-AzureSBAuthorizationRule -Name $ruleName -Namespace $namespaceName -EntityName $entityName ` + -EntityType $entityType -Permission $("Manage", "Send", "Listen") + + # Test + $actual = Get-AzureSBAuthorizationRule -Name $ruleName -Namespace $namespaceName -EntityName $entityName ` + -EntityType $entityType + + # Assert + Assert-AreEqual $ruleName $actual.Name +} + +<# +.SYNOPSIS +Tests getting all authorization rules on a notification hub filtered by Permission. +#> +function Test-FilterAuthorizationRulesByPermission +{ + # Setup + Initialize-NamespaceTest + New-Namespace 1 + $namespaceName = $createdNamespaces[0] + $entityName = $namespaceName + $ruleName = $namespaceName + $entityType = "NotificationHub" + $client = New-ServiceBusClientExtensions + $client.CreateNotificationHub($namespaceName, $entityName) + New-AzureSBAuthorizationRule -Name $ruleName -Namespace $namespaceName -EntityName $entityName ` + -EntityType $entityType -Permission $("Send", "Listen") + New-AzureSBAuthorizationRule -Name "onesdkrulehub1" -Namespace $namespaceName -EntityName $entityName ` + -EntityType $entityType -Permission $("Listen") + New-AzureSBAuthorizationRule -Name "onesdkrulehub2" -Namespace $namespaceName -EntityName $entityName ` + -EntityType $entityType -Permission $("Send") + + # Test + $actual = Get-AzureSBAuthorizationRule -Name $ruleName -Namespace $namespaceName -EntityName $entityName ` + -EntityType $entityType -Permission $("Send") + + # Assert + Assert-AreEqual 1 $actual.Count +} + +<# +.SYNOPSIS +Tests getting authorization rules on a topic that does not have any authorization rules. +#> +function Test-GetsEmptyListForTopic +{ + # Setup + Initialize-NamespaceTest + New-Namespace 1 + $namespaceName = $createdNamespaces[0] + $entityName = $namespaceName + $ruleName = $namespaceName + $entityType = "Topic" + $client = New-ServiceBusClientExtensions + $client.CreateTopic($namespaceName, $entityName) + + # Test + $actual = Get-AzureSBAuthorizationRule -Name $ruleName -Namespace $namespaceName -EntityName $entityName ` + -EntityType $entityType + + # Assert + Assert-AreEqual 0 $actual.Count +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/ServiceBus/Common.ps1 b/src/Common/Commands.ScenarioTest/Resources/ServiceBus/Common.ps1 new file mode 100644 index 000000000000..9abc6f4b468f --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/ServiceBus/Common.ps1 @@ -0,0 +1,149 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +$createdNamespaces = @() + +<# +.SYNOPSIS +Gets default location from the available list of service bus locations. +#> +function Get-DefaultServiceBusLocation +{ + $locations = Get-AzureSBLocation + + return $locations[0].Code +} + +<# +.SYNOPSIS +Gets valid and available service bus namespace name. +#> +function Get-NamespaceName +{ + return getAssetName +} + +<# +.SYNOPSIS +Removes given namespace when it's status is 'Active' + +.PARAMETER name +The namespace name. +#> +function Remove-Namespace +{ + param([string]$name) + Wait-NamespaceStatus $name "Active" + Remove-AzureSBNamespace $name -Force + Wait-NamespaceRemoved $name +} + +<# +.SYNOPSIS +Waits until the namespace is removed. + +.PARAMETER name +The namespace name. +#> +function Wait-NamespaceRemoved +{ + param([string]$name) + + $waitScriptBlock = { + $removed = $false + try + { + $namespace = Get-AzureSBNamespace $name + Wait-Seconds 5 + } + catch + { + $removed = $true + } + + return $removed; + } + + Wait-Function $waitScriptBlock $true +} + +<# +.SYNOPSIS +Waits on the namespace until its status reaches provided state. + +.PARAMETER name +The namespace name. + +.PARAMETER status +The status to wait on. +#> +function Wait-NamespaceStatus +{ + param([string] $name, [string] $status) + + $waitScriptBlock = { (Get-AzureSBNamespace $name).Status } + Wait-Function $waitScriptBlock $status +} + +<# +.SYNOPSIS +Clears the all created resources while doing the test. +#> +function Test-CleanupServiceBus +{ + try { foreach ($name in $global:createdNamespaces) { Remove-Namespace $name -Force } } + catch { <# Succeed #> } + $global:createdNamespaces = @() +} + +<# +.SYNOPSIS +Creates service bus namespaces with the count specified and wait until the namespace status is Active. + +.PARAMETER count +The number of namespaces to create. +#> +function New-Namespace +{ + param([int]$count) + 1..$count | % { + $name = Get-NamespaceName; + New-AzureSBNamespace $name $(Get-DefaultServiceBusLocation); + $global:createdNamespaces += $name; + } + + $global:createdNamespaces | % { Wait-NamespaceStatus $_ "Active" }; +} + +<# +.SYNOPSIS +Removes all the active namespaces in the current subscription. +#> +function Initialize-NamespaceTest +{ + try { Get-AzureSBNamespace | Where {$_.Status -eq "Active"} | Remove-AzureSBNamespace -Force } + catch { <# Succeed #> } +} + +<# +.SYNOPSIS +Creates a ServiceBusExtensionClient instance. +#> +function New-ServiceBusClientExtensions +{ + $client = New-Object Microsoft.WindowsAzure.Commands.Utilities.ServiceBus.ServiceBusClientExtensions ` + -ArgumentList $(Get-AzureSubscription -Default) + + return $client +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/ServiceBus/NamespaceScenarioTests.ps1 b/src/Common/Commands.ScenarioTest/Resources/ServiceBus/NamespaceScenarioTests.ps1 new file mode 100644 index 000000000000..6c0a0ca28117 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/ServiceBus/NamespaceScenarioTests.ps1 @@ -0,0 +1,420 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +########################################################################### General Service Bus Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests any cloud based cmdlet with invalid credentials and expect it'll throw an exception. +#> +function Test-WithInvalidCredentials +{ + param([ScriptBlock] $cloudCmdlet) + + # Setup + Remove-AllSubscriptions + + # Test + Assert-Throws $cloudCmdlet "No current subscription has been designated. Use Select-AzureSubscription -Current to set the current subscription." +} + +########################################################################### Get-AzureSBLocation Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests using List-AzureSBLocation and make sure that it's contents are filled out correctly. +#> +function Test-ListAzureSBLocation +{ + Get-AzureSBLocation | % { Assert-NotNull $_.Code;Assert-NotNull $_.FullName } +} + +<# +.SYNOPSIS +Tests using List-AzureSBLocation and piping it's output to New-AzureSBNamespace. +#> +function Test-ListAzureSBLocation1 +{ + # Setup + $expectedName = Get-NamespaceName + $expectedLocation = Get-DefaultServiceBusLocation + + # Test + $namespace = Get-AzureSBLocation | + Select @{Name="Location";Expression={$_."Code"}} | + Where {$_.Location -eq $expectedLocation} | + % { New-Object PSObject -Property @{Name=$expectedName;Location=$_.Location} } | + New-AzureSBNamespace + + # Assert + $actualName = $namespace.Name + $actualLocation = $namespace.Region + Assert-AreEqual $expectedName $actualName + Assert-AreEqual $expectedLocation $actualLocation + + # Cleanup + $createdNamespaces += $expectedName + Test-CleanupServiceBus +} + +########################################################################### Get-AzureSBNamespace Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests running Get-AzureSBNamespace cmdlet and expects that no namespaces are returned. +#> +function Test-GetAzureSBNamespaceWithEmptyNamespaces +{ + # Setup + Initialize-NamespaceTest + + # Test + $namespaces = Get-AzureSBNamespace + + # Assert + $expectedCount = (Get-AzureSBNamespace).Count + Assert-AreEqual $namespaces.Count $expectedCount +} + +<# +.SYNOPSIS +Tests running Get-AzureSBNamespace cmdlet and expects that one namespace is returned. +#> +function Test-GetAzureSBNamespaceWithOneNamespace +{ + # Setup + Initialize-NamespaceTest + New-Namespace 1 + + # Test + $namespaces = Get-AzureSBNamespace + + # Assert + if ($namespaces.Count -gt 1) { Write-Warning "The test initialization did not succeed"; exit } + Assert-AreEqualArray $global:createdNamespaces $($namespaces | Select -ExpandProperty Name) + + # Cleanup + Test-CleanupServiceBus +} + +<# +.SYNOPSIS +Tests running Get-AzureSBNamespace cmdlet and expects that multiple namespaces are returned. +#> +function Test-GetAzureSBNamespaceWithMultipleNamespaces +{ + # Setup + Initialize-NamespaceTest + New-Namespace 3 + + # Test + $namespaces = Get-AzureSBNamespace + + # Assert + if ($namespaces.Count -gt 3) { Write-Warning "The test initialization did not succeed"; exit } + Assert-AreEqualArray $global:createdNamespaces $($namespaces | Select -ExpandProperty Name) + + # Cleanup + Test-CleanupServiceBus +} + +<# +.SYNOPSIS +Tests running Get-AzureSBNamespace cmdlet using a valid name and expects getting the same object back. +#> +function Test-GetAzureSBNamespaceWithValidExisitingNamespace +{ + # Setup + Initialize-NamespaceTest + New-Namespace 1 + $expectedName = $createdNamespaces[0] + + # Test + $namespace = Get-AzureSBNamespace $expectedName + + # Assert + Assert-NotNull $namespace + $actualName = $namespace.Name + Assert-AreEqual $expectedName $actualName + + # Cleanup + Test-CleanupServiceBus +} + +<# +.SYNOPSIS +Tests running Get-AzureSBNamespace cmdlet using a non-existing name and expects that an exception is thrown. +#> +function Test-GetAzureSBNamespaceWithValidNonExisitingNamespace +{ + # Setup + $invalidName = "OneSDKNotCreated" + + # Test + Assert-Throws { Get-AzureSBNamespace $invalidName } "Internal Server Error. This could happen due to an incorrect/missing namespace" +} + +<# +.SYNOPSIS +Tests running Get-AzureSBNamespace cmdlet and pipe it's result to Remove-AzureSBNamespace cmdlet. +#> +function Test-GetAzureSBNamespacePipedToRemoveAzureSBNamespace +{ + # Setup + Initialize-NamespaceTest + New-Namespace 2 + $actual = $true + + # Test + Get-AzureSBNamespace | Where {$_.Status -eq "Active"} | Remove-AzureSBNamespace -PassThru -Force | % {$actual = $actual -and $_} + + # Assert + Assert-True { $actual } "Piping Get-AzureSBNamespace into Remove-AzureSBNamespace failed" + + # Cleanup + Test-CleanupServiceBus +} + +<# +.SYNOPSIS +Tests running Get-AzureSBNamespace cmdlet and pipe it's result to Set-AzureWebsite cmdlet. +#> +function Test-GetAzureSBNamespaceWithWebsites +{ + # Setup + Initialize-NamespaceTest + $namespaceName = Get-NamespaceName + New-AzureSBNamespace $namespaceName $(Get-DefaultServiceBusLocation) + Wait-NamespaceStatus $namespaceName "Active" + $websiteName = Get-NamespaceName + New-AzureWebsite $websiteName + $settingName = "NamespaceConnectionString" + + # Test + Get-AzureSBNamespace $namespaceName | % { Set-AzureWebsite $websiteName -AppSettings @{ $settingName = $_.ConnectionString } } + + # Assert + $website = Get-AzureWebsite $websiteName + $namespace = Get-AzureSBNamespace $namespaceName + Assert-AreEqual $namespace.ConnectionString $website.AppSettings[$settingName] + + # Cleanup + $createdNamespaces += $namespaceName + Remove-AzureWebsite $websiteName -Force + Test-CleanupServiceBus +} + +########################################################################### New-AzureSBNamespace Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests running New-AzureSBNamespace cmdlet and expects new namespace created. +#> +function Test-NewAzureSBNamespaceWithValidNewNamespace +{ + # Setup + $name = Get-NamespaceName + + # Test + $actual = New-AzureSBNamespace $name $(Get-DefaultServiceBusLocation) + + # Assert + Assert-AreEqual $name $actual.Name + Assert-AreEqual $(Get-DefaultServiceBusLocation) $actual.Region + Assert-True { "Activating" -eq $actual.Status -or "Active" -eq $actual.Status } "The namespace status does not equal to active or activating" + + # Cleanup + $createdNamespaces += $name + Test-CleanupServiceBus +} + +<# +.SYNOPSIS +Tests running New-AzureSBNamespace cmdlet on an existing namespace and expects exception. +#> +function Test-NewAzureSBNamespaceWithValidExistingNamespace +{ + # Setup + $name = Get-NamespaceName + New-AzureSBNamespace $name $(Get-DefaultServiceBusLocation) + + # Test + Assert-Throws { New-AzureSBNamespace $name $(Get-DefaultServiceBusLocation) } "Internal Server Error. This could happen because the namespace name is already used or due to an incorrect location name. Use Get-AzureSBLocation cmdlet to list valid names." + + # Cleanup + $createdNamespaces += $name + Test-CleanupServiceBus +} + +<# +.SYNOPSIS +Tests running New-AzureSBNamespace cmdlet with an invalid location expects exception. +#> +function Test-NewAzureSBNamespaceWithInvalidLocation +{ + # Setup + + # Test + Assert-Throws { New-AzureSBNamespace $(Get-NamespaceName) "Invalid Location" } "The provided location `"Invalid Location`" does not exist in the available locations use Get-AzureSBLocation for listing available locations.`r`nParameter name: Location" +} + +<# +.SYNOPSIS +Tests running New-AzureSBNamespace cmdlet and pipe it's result to Set-AzureWebsite cmdlet. +#> +function Test-NewAzureSBNamespaceWithWebsite +{ + # Setup + $websiteName = Get-NamespaceName + New-AzureWebsite $websiteName + $settingName = "NamespaceConnectionString" + $namespaceName = Get-NamespaceName + + # Test + $used = Test-AzureName -ServiceBusNamespace $namespaceName + Assert-False { $used } "The service bus name '$namespaceName' is not available" + + Get-AzureSBLocation | Select @{Name="Location";Expression={$_."Code"}} | Where {$_.Location -eq $(Get-DefaultServiceBusLocation)} | New-AzureSBNamespace $namespaceName + + do + { + $namespace = Get-AzureSBNamespace $namespaceName + Wait-Seconds 5 + } while ($namespace.Status -ne "Active") + + $namespace | % { Set-AzureWebsite $websiteName -AppSettings @{ $settingName = $_.ConnectionString } } + + # Assert + $website = Get-AzureWebsite $websiteName + Assert-AreEqual $namespace.ConnectionString $website.AppSettings[$settingName] + + # Cleanup + $createdNamespaces += $namespaceName + Remove-AzureWebsite $websiteName -Force + Test-CleanupServiceBus +} + +<# +.SYNOPSIS +Tests running New-AzureSBNamespace cmdlet without location and expects new namespace created. +#> +function Test-NewAzureSBNamespaceWithDefaultLocation +{ + # Setup + $name = Get-NamespaceName + + # Test + $actual = New-AzureSBNamespace $name + + # Assert + Assert-AreEqual $name $actual.Name + Assert-AreEqual $(Get-DefaultServiceBusLocation) $actual.Region + Assert-True { "Activating" -eq $actual.Status -or "Active" -eq $actual.Status } "The namespace status does not equal to active or activating" + + # Cleanup + $createdNamespaces += $name + Test-CleanupServiceBus +} + +########################################################################### Remove-AzureSBNamespace Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests running Remove-AzureSBNamespace cmdlet and expects to remove the namespace. +#> +function Test-RemoveAzureSBNamespaceWithExistingNamespace +{ + # Setup + $name = Get-NamespaceName + New-AzureSBNamespace $name $(Get-DefaultServiceBusLocation) + Wait-NamespaceStatus $name "Active" + + # Test + Remove-AzureSBNamespace $name -Force + + # Assert + $namespace = Get-AzureSBNamespace $name + Assert-AreEqual "Removing" $namespace.Status +} + +<# +.SYNOPSIS +Tests running Remove-AzureSBNamespace cmdlet with non-existing namespace and expects to get an exception +#> +function Test-RemoveAzureSBNamespaceWithNonExistingNamespace +{ + # Test + Assert-Throws { Remove-AzureSBNamespace "NonExistingOneSDKName" -Force } "Internal Server Error. This could happen because the namespace does not exist or it does not exist under your subscription." +} + +<# +.SYNOPSIS +Tests running Remove-AzureSBNamespace cmdlet pipe a namespace object into it. +#> +function Test-RemoveAzureSBNamespaceInputPiping +{ + # Setup + $name = Get-NamespaceName + + # Test + $used = Test-AzureName -ServiceBusNamespace $name + Assert-False { $used } "The service bus name '$name' is not available" + + New-AzureSBNamespace $name $(Get-DefaultServiceBusLocation) + + Wait-NamespaceStatus $name "Active" + + Get-AzureSBNamespace $name | Remove-AzureSBNamespace -Force + + # Assert + try + { + $namespace = Get-AzureSBNamespace $name + Assert-AreEqual "Removing" $namespace.Status + } + catch + { + # Succeed in case that the namespace was removed already. + } +} + +<# +.SYNOPSIS +Tests running Remove-AzureSBNamespace cmdlet with WhatIf parameter. +#> +function Test-RemoveAzureSBNamespaceWhatIf +{ + # Setup + Initialize-NamespaceTest + $name = Get-NamespaceName + New-AzureSBNamespace $name $(Get-DefaultServiceBusLocation) + Wait-NamespaceStatus $name "Active" + + # Test + $message = Remove-AzureSBNamespace $name -WhatIf -Force + $removed = Remove-AzureSBNamespace $name -Force -PassThru + + # Assert + Assert-True { $removed } +} + +<# +.SYNOPSIS +Tests running Remove-AzureSBNamespace cmdlet with WhatIf parameter. +#> +function Test-RemoveAzureSBNamespaceWhatIfError +{ + # Test + Assert-Throws { Remove-AzureSBNamespace "123InvalidName" -WhatIf -Force } "The provided name `"123InvalidName`" does not match the service bus namespace naming rules.`r`nParameter name: Name" +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/ServiceManagement/Common.ps1 b/src/Common/Commands.ScenarioTest/Resources/ServiceManagement/Common.ps1 new file mode 100644 index 000000000000..467ce512adfc --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/ServiceManagement/Common.ps1 @@ -0,0 +1,22 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +<# +.SYNOPSIS +Sets +#> +function Set-CurrentStorageAccountName +{ + Get-AzureSubscription -Default | Set-AzureSubscription -CurrentStorageAccountName "" +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/ServiceManagement/VMProvisionTests.ps1 b/src/Common/Commands.ScenarioTest/Resources/ServiceManagement/VMProvisionTests.ps1 new file mode 100644 index 000000000000..456171ad8a85 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/ServiceManagement/VMProvisionTests.ps1 @@ -0,0 +1,28 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +########################################################################### Create-AzureVM Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests Create-AzureVM with valid information. +#> +function Test-CreateWindowsAzureQuickVM +{ + # Setup + $location = Get-DefaultLocation + + # Test + New-AzureQuickVM -Windows -ImageName $imageName -Name $newAzureQuickVMName -ServiceName $newAzureQuickVMSvcName -Password "p@ssw0rd" -Location $location +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/SessionRecords/AuthorizationTests/TestAuthorizationEndToEnd.json b/src/Common/Commands.ScenarioTest/Resources/SessionRecords/AuthorizationTests/TestAuthorizationEndToEnd.json new file mode 100644 index 000000000000..28296678117c --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/SessionRecords/AuthorizationTests/TestAuthorizationEndToEnd.json @@ -0,0 +1,719 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c/providers/Microsoft.Authorization/roleDefinitions?api-version=2014-07-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"roleName\": \"Owner\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Owner role allowing full access\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"8e3af657-a8ff-443c-a75c-2fe8c4bcb635\"\r\n },\r\n {\r\n \"properties\": {\r\n \"roleName\": \"Reader\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Reader role allowing only read operations\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*/read\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"acdd72a7-3385-48ef-bd42-f606fba81ae7\"\r\n },\r\n {\r\n \"properties\": {\r\n \"roleName\": \"Operator\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Operator role allowing reads, updates, and actions\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*/read\",\r\n \"*/update\",\r\n \"*/action\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "a5fb9df0-07b3-4bfc-bde9-c06c49e6929b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31988" + ], + "x-ms-correlation-request-id": [ + "130561aa-ee09-4ab9-916f-c4eabc0332c3" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140716T230504Z:130561aa-ee09-4ab9-916f-c4eabc0332c3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 16 Jul 2014 23:05:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c/providers/Microsoft.Authorization/roleDefinitions?api-version=2014-07-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"roleName\": \"Owner\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Owner role allowing full access\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"8e3af657-a8ff-443c-a75c-2fe8c4bcb635\"\r\n },\r\n {\r\n \"properties\": {\r\n \"roleName\": \"Reader\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Reader role allowing only read operations\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*/read\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"acdd72a7-3385-48ef-bd42-f606fba81ae7\"\r\n },\r\n {\r\n \"properties\": {\r\n \"roleName\": \"Operator\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Operator role allowing reads, updates, and actions\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*/read\",\r\n \"*/update\",\r\n \"*/action\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "3f6e77e2-16c3-462d-876f-7340b136a413" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31988" + ], + "x-ms-correlation-request-id": [ + "9e47a609-51a9-404c-b17a-1b7ad9792670" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140716T230505Z:9e47a609-51a9-404c-b17a-1b7ad9792670" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 16 Jul 2014 23:05:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c/providers/Microsoft.Authorization/roleDefinitions?api-version=2014-07-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"roleName\": \"Owner\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Owner role allowing full access\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"8e3af657-a8ff-443c-a75c-2fe8c4bcb635\"\r\n },\r\n {\r\n \"properties\": {\r\n \"roleName\": \"Reader\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Reader role allowing only read operations\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*/read\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"acdd72a7-3385-48ef-bd42-f606fba81ae7\"\r\n },\r\n {\r\n \"properties\": {\r\n \"roleName\": \"Operator\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Operator role allowing reads, updates, and actions\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*/read\",\r\n \"*/update\",\r\n \"*/action\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e19e80fd-3a9a-4720-a015-95f5635463dc" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31987" + ], + "x-ms-correlation-request-id": [ + "c9c29783-d5ec-42bc-963f-d6201efff2e4" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140716T230505Z:c9c29783-d5ec-42bc-963f-d6201efff2e4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 16 Jul 2014 23:05:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c/providers/Microsoft.Authorization/roleDefinitions?api-version=2014-07-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"roleName\": \"Owner\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Owner role allowing full access\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"8e3af657-a8ff-443c-a75c-2fe8c4bcb635\"\r\n },\r\n {\r\n \"properties\": {\r\n \"roleName\": \"Reader\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Reader role allowing only read operations\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*/read\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"acdd72a7-3385-48ef-bd42-f606fba81ae7\"\r\n },\r\n {\r\n \"properties\": {\r\n \"roleName\": \"Operator\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Operator role allowing reads, updates, and actions\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*/read\",\r\n \"*/update\",\r\n \"*/action\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "57fb0e0b-9faf-4bd3-9ec8-650ece18d086" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31987" + ], + "x-ms-correlation-request-id": [ + "e1f3ca39-8034-469e-8d5c-cca5e9abf80a" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140716T230505Z:e1f3ca39-8034-469e-8d5c-cca5e9abf80a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 16 Jul 2014 23:05:05 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c/providers/Microsoft.Authorization/roleDefinitions?api-version=2014-07-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"roleName\": \"Owner\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Owner role allowing full access\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"8e3af657-a8ff-443c-a75c-2fe8c4bcb635\"\r\n },\r\n {\r\n \"properties\": {\r\n \"roleName\": \"Reader\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Reader role allowing only read operations\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*/read\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"acdd72a7-3385-48ef-bd42-f606fba81ae7\"\r\n },\r\n {\r\n \"properties\": {\r\n \"roleName\": \"Operator\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Operator role allowing reads, updates, and actions\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*/read\",\r\n \"*/update\",\r\n \"*/action\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "2d41091a-1d6c-4c70-b23d-7ab8a683af24" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31985" + ], + "x-ms-correlation-request-id": [ + "d43f90a1-e4c4-44ec-86c5-264ecc3294a5" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140716T230508Z:d43f90a1-e4c4-44ec-86c5-264ecc3294a5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 16 Jul 2014 23:05:07 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c/providers/Microsoft.Authorization/roleAssignments?&api-version=2014-07-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635\",\r\n \"principalId\": \"ea3ba48b-a7b6-4a10-ad55-08708721883a\",\r\n \"scope\": \"/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c\"\r\n },\r\n \"id\": \"/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c/providers/Microsoft.Authorization/roleAssignments/a188ae5e-c8cb-4904-83a9-5540549a1dda\",\r\n \"type\": \"Microsoft.Authorization/roleAssignments\",\r\n \"name\": \"a188ae5e-c8cb-4904-83a9-5540549a1dda\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "6aa9bac6-3faf-49f9-8829-d6f11a665eab" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31986" + ], + "x-ms-correlation-request-id": [ + "579f8cc1-7ef6-4669-a4de-8146cf4a64b4" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140716T230506Z:579f8cc1-7ef6-4669-a4de-8146cf4a64b4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 16 Jul 2014 23:05:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c/providers/Microsoft.Authorization/roleAssignments?&api-version=2014-07-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635\",\r\n \"principalId\": \"ea3ba48b-a7b6-4a10-ad55-08708721883a\",\r\n \"scope\": \"/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c\"\r\n },\r\n \"id\": \"/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c/providers/Microsoft.Authorization/roleAssignments/a188ae5e-c8cb-4904-83a9-5540549a1dda\",\r\n \"type\": \"Microsoft.Authorization/roleAssignments\",\r\n \"name\": \"a188ae5e-c8cb-4904-83a9-5540549a1dda\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "072603c2-6956-4f8c-9b37-7142cf71c904" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31984" + ], + "x-ms-correlation-request-id": [ + "a748a5f4-063d-4766-af80-a15860239c0d" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140716T230507Z:a748a5f4-063d-4766-af80-a15860239c0d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 16 Jul 2014 23:05:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c/providers/Microsoft.Authorization/roleAssignments?&api-version=2014-07-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "e7da6155-248e-40bd-b8f9-63afa7f9e629" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31986" + ], + "x-ms-correlation-request-id": [ + "dcbdffbb-cde1-4cd2-a83f-c87bd7e5ea81" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140716T230508Z:dcbdffbb-cde1-4cd2-a83f-c87bd7e5ea81" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 16 Jul 2014 23:05:07 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635?api-version=2014-07-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleName\": \"Owner\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Owner role allowing full access\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"8e3af657-a8ff-443c-a75c-2fe8c4bcb635\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "ad8b6ea6-53bb-49c4-a3bf-94856d6e0f65" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31985" + ], + "x-ms-correlation-request-id": [ + "e32c0379-bffc-47fb-84db-6cd580efa8ea" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140716T230506Z:e32c0379-bffc-47fb-84db-6cd580efa8ea" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 16 Jul 2014 23:05:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635?api-version=2014-07-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleName\": \"Owner\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Owner role allowing full access\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"8e3af657-a8ff-443c-a75c-2fe8c4bcb635\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "fce431ed-0e57-4c3b-9655-8f42ba58ff64" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31983" + ], + "x-ms-correlation-request-id": [ + "86c02115-2768-48c2-821a-e25bebb9187d" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140716T230507Z:86c02115-2768-48c2-821a-e25bebb9187d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 16 Jul 2014 23:05:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/08346394-4d25-4470-a777-16334fa59eb2/users/ea3ba48b-a7b6-4a10-ad55-08708721883a?api-version=2013-04-05", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.ppe.windows.net/08346394-4d25-4470-a777-16334fa59eb2/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.User/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"ea3ba48b-a7b6-4a10-ad55-08708721883a\",\r\n \"accountEnabled\": true,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": \"Redmond\",\r\n \"country\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Jon Doe\",\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Jon\",\r\n \"jobTitle\": null,\r\n \"lastDirSyncTime\": null,\r\n \"mail\": null,\r\n \"mailNickname\": \"admin\",\r\n \"mobile\": \"+1 (123) 456-7890\",\r\n \"otherMails\": [\r\n \"jon@doe.com\"\r\n ],\r\n \"passwordPolicies\": \"DisablePasswordExpiration\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": \"98052\",\r\n \"preferredLanguage\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"state\": \"WA\",\r\n \"streetAddress\": \"One Microsoft Way\",\r\n \"surname\": \"Doe\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"admin@aad191.ccsctp.net\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "5cZdEfeGZq9sASAZFweb4MuCGtck1qacQOViYH3c71Q=" + ], + "request-id": [ + "6f49e674-0fb9-4bc7-a5e0-11fd639e82f0" + ], + "client-request-id": [ + "cc6ecdc7-046c-41b5-bfbd-fa55d2b08479" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.0" + ], + "ocp-aad-session-key": [ + "Y-DgiuWPFdEVtSQmwMpoWXe2DbXZ7X_H5lA1s9WuC_z4rQLdq5OdtySChDmEdU8YSMO0GUodrQ7yfyGaKdwuLeRPN_Ia7W8KV3vxOE40lPA.fCmGC2RGFI59UNZSLAB-4871DlbJVpXJxPY0TwSD3tQ" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 16 Jul 2014 23:05:05 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/08346394-4d25-4470-a777-16334fa59eb2/users/ea3ba48b-a7b6-4a10-ad55-08708721883a?api-version=2013-04-05", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.ppe.windows.net/08346394-4d25-4470-a777-16334fa59eb2/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.User/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"ea3ba48b-a7b6-4a10-ad55-08708721883a\",\r\n \"accountEnabled\": true,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": \"Redmond\",\r\n \"country\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Jon Doe\",\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Jon\",\r\n \"jobTitle\": null,\r\n \"lastDirSyncTime\": null,\r\n \"mail\": null,\r\n \"mailNickname\": \"admin\",\r\n \"mobile\": \"+1 (123) 456-7890\",\r\n \"otherMails\": [\r\n \"jon@doe.com\"\r\n ],\r\n \"passwordPolicies\": \"DisablePasswordExpiration\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": \"98052\",\r\n \"preferredLanguage\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"state\": \"WA\",\r\n \"streetAddress\": \"One Microsoft Way\",\r\n \"surname\": \"Doe\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"admin@aad191.ccsctp.net\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "kHZt8MuVwYfJdYwujGQteDz/grzV2fJYNO6fQfWZCxg=" + ], + "request-id": [ + "d49154ce-61c6-4718-a355-41f89d54c318" + ], + "client-request-id": [ + "11890730-01c2-4049-9016-d5b7f0631897" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.0" + ], + "ocp-aad-session-key": [ + "E7d45bfspTzr4FgD9RGNeKnmFak5roExgIiKRhkTE-IF63Mc1H5zTfKCPHUL1CSJrZY62wQk0PDFXWxLn2E17-VdCXKAwq8FApq9k3Mz7h8.RsVswZ5rQgr2C0lAfz1G4RbH-47RrhTFrvfB9mh46X0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 16 Jul 2014 23:05:05 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "//subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c/providers/Microsoft.Authorization/roleAssignments/a188ae5e-c8cb-4904-83a9-5540549a1dda?api-version=2014-07-01-preview", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "fcb51701-9806-4438-9603-1aefe4b562fd" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "5f39986b-85d2-4112-82fd-6ef90c5027ed" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140716T230507Z:5f39986b-85d2-4112-82fd-6ef90c5027ed" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 16 Jul 2014 23:05:07 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/08346394-4d25-4470-a777-16334fa59eb2/users/admin@aad191.ccsctp.net?api-version=2013-04-05", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.ppe.windows.net/08346394-4d25-4470-a777-16334fa59eb2/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.User/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"ea3ba48b-a7b6-4a10-ad55-08708721883a\",\r\n \"accountEnabled\": true,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": \"Redmond\",\r\n \"country\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Jon Doe\",\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Jon\",\r\n \"jobTitle\": null,\r\n \"lastDirSyncTime\": null,\r\n \"mail\": null,\r\n \"mailNickname\": \"admin\",\r\n \"mobile\": \"+1 (123) 456-7890\",\r\n \"otherMails\": [\r\n \"jon@doe.com\"\r\n ],\r\n \"passwordPolicies\": \"DisablePasswordExpiration\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": \"98052\",\r\n \"preferredLanguage\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"state\": \"WA\",\r\n \"streetAddress\": \"One Microsoft Way\",\r\n \"surname\": \"Doe\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"admin@aad191.ccsctp.net\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "h18CQeQQ6hNksP2st9xsNS1OU3V1ecOI0YBiucSafCY=" + ], + "request-id": [ + "076c1192-ebb3-4221-b71c-25a5e3b175f8" + ], + "client-request-id": [ + "9417421d-78e6-416e-987b-c51d257ffbf9" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.0" + ], + "ocp-aad-session-key": [ + "04LN614MXcEgnWo32WvnRulQPYmPV8_e_dEq1GtYW_hcXJp818FZTYITkU7wieOFzYNFhO0xEhk8fxdTZSTPsO3OIGkqP_V3mttNqkm_4bU.Pv_xvyaTS7_afNM_HYdXindbzNCWb10Y7BGCMMWO8wg" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 16 Jul 2014 23:05:07 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c/providers/Microsoft.Authorization/roleAssignments/C6408EC2-C27D-49C3-87ED-F49AC8354B76?api-version=2014-07-01-preview", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/1165e0f9-4535-44ce-bc6b-c73c00b5fb2c/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635\",\r\n \"principalId\": \"ea3ba48b-a7b6-4a10-ad55-08708721883a\"\r\n }\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"CreateRoleAssignmentFailed\",\r\n \"message\": \"Unable to create role assignment: 'C6408EC2-C27D-49C3-87ED-F49AC8354B76': 'The roleAssignment already exists.'\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "44c5130a-7f03-47cd-8289-f9e9dfdf5884" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "0323ea26-f9ab-4975-83c9-a43522a5f810" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140716T230509Z:0323ea26-f9ab-4975-83c9-a43522a5f810" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 16 Jul 2014 23:05:09 GMT" + ] + }, + "StatusCode": 409 + } + ], + "Names": { + "Test-AuthorizationEndToEnd": [ + "onesdk6973" + ] + }, + "Variables": { + "SubscriptionId": "1165e0f9-4535-44ce-bc6b-c73c00b5fb2c", + "Username": "admin@aad191.ccsctp.net", + "Tenantd": "08346394-4d25-4470-a777-16334fa59eb2" + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/SessionRecords/TrafficManagerTests/TestAddAzureTrafficManagerEndpointNoMinChildEndpoints.json b/src/Common/Commands.ScenarioTest/Resources/SessionRecords/TrafficManagerTests/TestAddAzureTrafficManagerEndpointNoMinChildEndpoints.json new file mode 100644 index 000000000000..1f9bf7bba951 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/SessionRecords/TrafficManagerTests/TestAddAzureTrafficManagerEndpointNoMinChildEndpoints.json @@ -0,0 +1,365 @@ +{ + "Entries": [ + { + "RequestUri": "/ef4b4745-ba82-4a18-b724-b373df5890e2/services/WATM/profiles", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "AzurePowershell/v0.8.7.1" + ] + }, + "ResponseBody": "\r\n \r\n ATMTest564.trafficmanager.net\r\n ATMTest2131\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n \r\n ATMTest3357.trafficmanager.net\r\n ATMTest2348\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n \r\n ATMTest6262.trafficmanager.net\r\n ATMTest3167\r\n Disabled\r\n \r\n \r\n \r\n ATMTest5489.trafficmanager.net\r\n ATMTest7489\r\n Disabled\r\n \r\n \r\n \r\n ATMTest5117.trafficmanager.net\r\n ATMTest7619\r\n Disabled\r\n \r\n \r\n \r\n ATMTest5107.trafficmanager.net\r\n ATMTest7753\r\n Disabled\r\n \r\n \r\n \r\n ATMTest6842.trafficmanager.net\r\n ATMTest8954\r\n Disabled\r\n \r\n \r\n \r\n toplevelprofile.trafficmanager.net\r\n toplevelprofile\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "896194606e2607e695505064c16a93aa" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 02 Sep 2014 21:17:15 GMT" + ], + "Server": [ + "1.0.6198.122", + "(rd_rdfe_stable.140828-0920)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/ef4b4745-ba82-4a18-b724-b373df5890e2/services/WATM/profiles", + "RequestMethod": "POST", + "RequestBody": "\r\n onesdk1720.trafficmanager.net\r\n onesdk1720\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "AzurePowershell/v0.8.7.1" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "c99373a6aad3063dbfae112e3954a548" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 02 Sep 2014 21:17:19 GMT" + ], + "Server": [ + "1.0.6198.122", + "(rd_rdfe_stable.140828-0920)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/ef4b4745-ba82-4a18-b724-b373df5890e2/services/WATM/profiles/onesdk1720/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 300\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "AzurePowershell/v0.8.7.1" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "d763f4a654c40248a9e96d2582048497" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 02 Sep 2014 21:17:20 GMT" + ], + "Server": [ + "1.0.6198.122", + "(rd_rdfe_stable.140828-0920)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/ef4b4745-ba82-4a18-b724-b373df5890e2/services/WATM/profiles/onesdk1720/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 300\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n www.microsoft.com\r\n Enabled\r\n Any\r\n 1\r\n 1\r\n \r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "AzurePowershell/v0.8.7.1" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "2be03111ad3a00239921ce465218f599" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 02 Sep 2014 21:17:25 GMT" + ], + "Server": [ + "1.0.6198.122", + "(rd_rdfe_stable.140828-0920)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/ef4b4745-ba82-4a18-b724-b373df5890e2/services/WATM/profiles/onesdk1720", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "AzurePowershell/v0.8.7.1" + ] + }, + "ResponseBody": "\r\n onesdk1720.trafficmanager.net\r\n onesdk1720\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "2817f7761d7d09fc8c4ef10ddcf08045" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 02 Sep 2014 21:17:21 GMT" + ], + "Server": [ + "1.0.6198.122", + "(rd_rdfe_stable.140828-0920)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/ef4b4745-ba82-4a18-b724-b373df5890e2/services/WATM/profiles/onesdk1720", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "AzurePowershell/v0.8.7.1" + ] + }, + "ResponseBody": "\r\n onesdk1720.trafficmanager.net\r\n onesdk1720\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "d4902bd8c98a0a0abab938a4737995c9" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 02 Sep 2014 21:17:26 GMT" + ], + "Server": [ + "1.0.6198.122", + "(rd_rdfe_stable.140828-0920)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/ef4b4745-ba82-4a18-b724-b373df5890e2/services/WATM/profiles/onesdk1720/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "AzurePowershell/v0.8.7.1" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n Inactive\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "8b914fde0e6307df8c7b5c60b6cd5b10" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 02 Sep 2014 21:17:22 GMT" + ], + "Server": [ + "1.0.6198.122", + "(rd_rdfe_stable.140828-0920)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/ef4b4745-ba82-4a18-b724-b373df5890e2/services/WATM/profiles/onesdk1720/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "AzurePowershell/v0.8.7.1" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n www.microsoft.com\r\n Enabled\r\n Any\r\n CheckingEndpoint\r\n 1\r\n \r\n \r\n CheckingEndpoints\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "ac243c18d63b0cf993532c149b56ddba" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 02 Sep 2014 21:17:27 GMT" + ], + "Server": [ + "1.0.6198.122", + "(rd_rdfe_stable.140828-0920)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-AddAzureTrafficManagerEndpointNoMinChildEndpoints": [ + "onesdk1720" + ] + }, + "Variables": {} +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/SessionRecords/TrafficManagerTests/TestAddAzureTrafficManagerEndpointTypeTrafficManager.json b/src/Common/Commands.ScenarioTest/Resources/SessionRecords/TrafficManagerTests/TestAddAzureTrafficManagerEndpointTypeTrafficManager.json new file mode 100644 index 000000000000..9b6c1423001c --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/SessionRecords/TrafficManagerTests/TestAddAzureTrafficManagerEndpointTypeTrafficManager.json @@ -0,0 +1,770 @@ +{ + "Entries": [ + { + "RequestUri": "/ef4b4745-ba82-4a18-b724-b373df5890e2/services/WATM/profiles", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "AzurePowershell/v0.8.7.1" + ] + }, + "ResponseBody": "\r\n \r\n ATMTest564.trafficmanager.net\r\n ATMTest2131\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n \r\n ATMTest3357.trafficmanager.net\r\n ATMTest2348\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n \r\n ATMTest6262.trafficmanager.net\r\n ATMTest3167\r\n Disabled\r\n \r\n \r\n \r\n ATMTest5489.trafficmanager.net\r\n ATMTest7489\r\n Disabled\r\n \r\n \r\n \r\n ATMTest5117.trafficmanager.net\r\n ATMTest7619\r\n Disabled\r\n \r\n \r\n \r\n ATMTest5107.trafficmanager.net\r\n ATMTest7753\r\n Disabled\r\n \r\n \r\n \r\n ATMTest6842.trafficmanager.net\r\n ATMTest8954\r\n Disabled\r\n \r\n \r\n \r\n onesdk5248.trafficmanager.net\r\n onesdk5248\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n \r\n toplevelprofile.trafficmanager.net\r\n toplevelprofile\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "8adeeec9a15509d7ab371263505c955a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 02 Sep 2014 21:14:52 GMT" + ], + "Server": [ + "1.0.6198.122", + "(rd_rdfe_stable.140828-0920)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/ef4b4745-ba82-4a18-b724-b373df5890e2/services/WATM/profiles/onesdk5248", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "AzurePowershell/v0.8.7.1" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "d5d8524793600b4c917f0202313c04cd" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 02 Sep 2014 21:14:55 GMT" + ], + "Server": [ + "1.0.6198.122", + "(rd_rdfe_stable.140828-0920)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/ef4b4745-ba82-4a18-b724-b373df5890e2/services/WATM/profiles", + "RequestMethod": "POST", + "RequestBody": "\r\n onesdk2894.trafficmanager.net\r\n onesdk2894\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "AzurePowershell/v0.8.7.1" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "59fb7f6f7fa4050bbf7b0ee3c2af3c97" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 02 Sep 2014 21:14:58 GMT" + ], + "Server": [ + "1.0.6198.122", + "(rd_rdfe_stable.140828-0920)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/ef4b4745-ba82-4a18-b724-b373df5890e2/services/WATM/profiles", + "RequestMethod": "POST", + "RequestBody": "\r\n toplevelprofile4968.trafficmanager.net\r\n toplevelprofile4968\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "AzurePowershell/v0.8.7.1" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "de27dc8e58f800918a84b4be4bc51060" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 02 Sep 2014 21:15:04 GMT" + ], + "Server": [ + "1.0.6198.122", + "(rd_rdfe_stable.140828-0920)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/ef4b4745-ba82-4a18-b724-b373df5890e2/services/WATM/profiles/onesdk2894/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 300\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "AzurePowershell/v0.8.7.1" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "c5d9609531a2000d967281af2242617b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 02 Sep 2014 21:14:59 GMT" + ], + "Server": [ + "1.0.6198.122", + "(rd_rdfe_stable.140828-0920)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/ef4b4745-ba82-4a18-b724-b373df5890e2/services/WATM/profiles/onesdk2894/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 300\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n www.microsoft.com\r\n Enabled\r\n Any\r\n 1\r\n 1\r\n \r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "AzurePowershell/v0.8.7.1" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "03d0a63dac2908378360851e6cea9283" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 02 Sep 2014 21:15:10 GMT" + ], + "Server": [ + "1.0.6198.122", + "(rd_rdfe_stable.140828-0920)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/ef4b4745-ba82-4a18-b724-b373df5890e2/services/WATM/profiles/onesdk2894", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "AzurePowershell/v0.8.7.1" + ] + }, + "ResponseBody": "\r\n onesdk2894.trafficmanager.net\r\n onesdk2894\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "d68157b92cba0a52aeb9f317a75ca6d3" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 02 Sep 2014 21:15:00 GMT" + ], + "Server": [ + "1.0.6198.122", + "(rd_rdfe_stable.140828-0920)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/ef4b4745-ba82-4a18-b724-b373df5890e2/services/WATM/profiles/onesdk2894", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "AzurePowershell/v0.8.7.1" + ] + }, + "ResponseBody": "\r\n onesdk2894.trafficmanager.net\r\n onesdk2894\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "9885ad5ff6340a46913e92721f73a01f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 02 Sep 2014 21:15:11 GMT" + ], + "Server": [ + "1.0.6198.122", + "(rd_rdfe_stable.140828-0920)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/ef4b4745-ba82-4a18-b724-b373df5890e2/services/WATM/profiles/onesdk2894/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "AzurePowershell/v0.8.7.1" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n Inactive\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "b3dbdfa5d2e40b36b280f9dee39f642a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 02 Sep 2014 21:15:01 GMT" + ], + "Server": [ + "1.0.6198.122", + "(rd_rdfe_stable.140828-0920)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/ef4b4745-ba82-4a18-b724-b373df5890e2/services/WATM/profiles/onesdk2894/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "AzurePowershell/v0.8.7.1" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n www.microsoft.com\r\n Enabled\r\n Any\r\n CheckingEndpoint\r\n 1\r\n \r\n \r\n CheckingEndpoints\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "b3ae8b36b2240c468d64ad6a06a5e621" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 02 Sep 2014 21:15:12 GMT" + ], + "Server": [ + "1.0.6198.122", + "(rd_rdfe_stable.140828-0920)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/ef4b4745-ba82-4a18-b724-b373df5890e2/services/WATM/profiles/toplevelprofile4968/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 300\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "AzurePowershell/v0.8.7.1" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "cc15ebef35cc07db9f35b3af3cc14ca3" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 02 Sep 2014 21:15:05 GMT" + ], + "Server": [ + "1.0.6198.122", + "(rd_rdfe_stable.140828-0920)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/ef4b4745-ba82-4a18-b724-b373df5890e2/services/WATM/profiles/toplevelprofile4968/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 300\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n onesdk2894.trafficmanager.net\r\n Enabled\r\n TrafficManager\r\n 1\r\n 1\r\n \r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "AzurePowershell/v0.8.7.1" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "7ee17bb4e6e006f1a65348283af36fb3" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 02 Sep 2014 21:15:14 GMT" + ], + "Server": [ + "1.0.6198.122", + "(rd_rdfe_stable.140828-0920)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/ef4b4745-ba82-4a18-b724-b373df5890e2/services/WATM/profiles/toplevelprofile4968", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "AzurePowershell/v0.8.7.1" + ] + }, + "ResponseBody": "\r\n toplevelprofile4968.trafficmanager.net\r\n toplevelprofile4968\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "4ad4ebdb26260bd481dab7d0a6b800d8" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 02 Sep 2014 21:15:06 GMT" + ], + "Server": [ + "1.0.6198.122", + "(rd_rdfe_stable.140828-0920)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/ef4b4745-ba82-4a18-b724-b373df5890e2/services/WATM/profiles/toplevelprofile4968", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "AzurePowershell/v0.8.7.1" + ] + }, + "ResponseBody": "\r\n toplevelprofile4968.trafficmanager.net\r\n toplevelprofile4968\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "95615e9e523d0debb0d466a8defe38ce" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 02 Sep 2014 21:15:15 GMT" + ], + "Server": [ + "1.0.6198.122", + "(rd_rdfe_stable.140828-0920)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/ef4b4745-ba82-4a18-b724-b373df5890e2/services/WATM/profiles/toplevelprofile4968/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "AzurePowershell/v0.8.7.1" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n Inactive\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "350fa108fa880121aee5af34cea4a49f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 02 Sep 2014 21:15:07 GMT" + ], + "Server": [ + "1.0.6198.122", + "(rd_rdfe_stable.140828-0920)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/ef4b4745-ba82-4a18-b724-b373df5890e2/services/WATM/profiles/toplevelprofile4968/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "AzurePowershell/v0.8.7.1" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n onesdk2894.trafficmanager.net\r\n Enabled\r\n TrafficManager\r\n CheckingEndpoint\r\n 1\r\n \r\n \r\n CheckingEndpoints\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "7c88ba9d9d3f0c8387c3f30b2641b873" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 02 Sep 2014 21:15:17 GMT" + ], + "Server": [ + "1.0.6198.122", + "(rd_rdfe_stable.140828-0920)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/ef4b4745-ba82-4a18-b724-b373df5890e2/services/WATM/profiles/toplevelprofile4968", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "AzurePowershell/v0.8.7.1" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "e67dce1c3ee10097b4cc03921065b309" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 02 Sep 2014 21:15:20 GMT" + ], + "Server": [ + "1.0.6198.122", + "(rd_rdfe_stable.140828-0920)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-AddAzureTrafficManagerEndpointTypeTrafficManager": [ + "onesdk2894" + ] + }, + "Variables": {} +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/Storage/StorageContainer.ps1 b/src/Common/Commands.ScenarioTest/Resources/Storage/StorageContainer.ps1 new file mode 100644 index 000000000000..3e017380fa7e --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/Storage/StorageContainer.ps1 @@ -0,0 +1,135 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +$containerName = "testcredentials-storage"; +$containerPrefix = "testcredentials-"; + +<# +.SYNOPSIS +Tests using Get-AzureStorageContainer without container name. +#> +function Test-GetAzureStorageContainerWithoutContainerName +{ + $containers = Get-AzureStorageContainer; + Assert-True {$containers.Count -ge 1}; + $container = $containers | ? {$_.Name -eq $containerName} + Assert-NotNull $container; +} + +<# +.SYNOPSIS +Tests using Get-AzureStorageContainer with container name. +#> +function Test-GetAzureStorageContainerWithContainerName +{ + $containers = Get-AzureStorageContainer $containerName; + Assert-True {$containers.Count -eq 1}; + Assert-AreEqual $containers[0].Name $containerName; +} + +<# +.SYNOPSIS +Tests using Get-AzureStorageContainer with container prefix. +#> +function Test-GetAzureStorageContainerWithPrefix +{ + $containers = Get-AzureStorageContainer -Prefix $containerPrefix; + Assert-True {$containers.Count -ge 1}; + $containers | % {Assert-True {$_.Name.StartsWith($containerPrefix)}} +} + +<# +.SYNOPSIS +Tests using New-AzureStorageContainer. +#> +function Test-NewAzureStorageContainer +{ + $randomName = [System.Guid]::NewGuid().ToString(); + $container = New-AzureStorageContainer $randomName; + Assert-True {$container.Count -eq 1}; + Assert-True {$container[0].Name -eq $randomName} + Assert-True {$container[0].PublicAccess.ToString() -eq "Off"} + + try + { + $container[0].CloudBlobContainer.DeleteIfExists(); + } + catch + {} +} + +<# +.SYNOPSIS +Tests using New-AzureStorageContainer with specified acl level +#> +function Test-NewAzureStorageContainerWithPermission +{ + $randomName = [System.Guid]::NewGuid().ToString(); + $container = New-AzureStorageContainer $randomName -Permission Container; + Assert-True {$container[0].Name -eq $randomName} + Assert-True {$container[0].PublicAccess.ToString() -eq "Container"} + + try + { + $container[0].CloudBlobContainer.DeleteIfExists(); + } + catch + {} +} + +<# +.SYNOPSIS +Tests using New-AzureStorageContainer to create a container which already exists +#> +function Test-NewExistsAzureStorageContainer +{ + # Setup + try + { + New-AzureStorageContainer $containerName + } + catch {} + Assert-Throws {New-AzureStorageContainer $containerName} "Container '$containerName' already exists." +} + +<# +.SYNOPSIS +Tests using New-AzureStorageContainer with invalid container name +#> +function Test-NewExistsAzureStorageContainerWithInvalidContainerName +{ + $invalidName = "a"; + Assert-Throws {New-AzureStorageContainer $invalidName} +} + +<# +.SYNOPSIS +Tests using Remove-AzureStorageContainer +#> +function Test-RemoveAzureStorageContainer +{ + $randomName = [System.Guid]::NewGuid().ToString(); + New-AzureStorageContainer $randomName + Remove-AzureStorageContainer $randomName -Force +} + +<# +.SYNOPSIS +Tests using Remove-AzureStorageContainer by container pipeline +#> +function Test-RemoveAzureStorageContainerByContainerPipeline +{ + $randomName = [System.Guid]::NewGuid().ToString(); + New-AzureStorageContainer $randomName | Get-AzureStorageContainer | Remove-AzureStorageContainer -Force +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/Storage/StorageContext.ps1 b/src/Common/Commands.ScenarioTest/Resources/Storage/StorageContext.ps1 new file mode 100644 index 000000000000..0f9fcc102c0f --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/Storage/StorageContext.ps1 @@ -0,0 +1,37 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +<# +.SYNOPSIS +Tests using New-AzureStorageContext with anonymous storage account +#> +function Test-NewAnonymousStorageContext +{ + $account = "test"; + $context = New-AzureStorageContext -StorageAccountName $account -Anonymous; + Assert-AreEqual $context.StorageAccountName "[Anonymous]" +} + +<# +.SYNOPSIS +Tests using New-AzureStorageContext with storage account name and key +#> +function Test-NewStorageContextWithNameAndKey +{ + $account = "test"; + $key = "XM+4nFQ832Qfi4mH/ChQwdQUmTqrZqbQTJWpAQZ6klWjTVsIBVZy5xNdCDje4EWP0gdXK9vIFAY8LOmz85Wmcg=="; + $context = New-AzureStorageContext -StorageAccountName $account -StorageAccountKey $key -Protocol Https + Assert-AreEqual $context.StorageAccountName $account + Assert-True {$context.BlobEndPoint.ToString().StartsWith("https://")} +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/Store/Common.ps1 b/src/Common/Commands.ScenarioTest/Resources/Store/Common.ps1 new file mode 100644 index 000000000000..c5309839f44a --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/Store/Common.ps1 @@ -0,0 +1,178 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +$createdAddOns = @() +$availableAddOnsInUS = $null + +<# +.SYNOPSIS +Gets all available add-ons in US. +#> +function Get-AvailableAddOn +{ + if (!$availableAddOnsInUS) + { + $availableAddOnsInUS = Get-AzureStoreAddOn -ListAvailable US + } + + return $availableAddOnsInUS +} + +<# +.SYNOPSIS +Gets default location from the available list of add-on locations. + +.PARAMETER name +The add-on id. +#> +function Get-DefaultAddOnLocation +{ + param([string] $addonId) + + $addon = Get-AvailableAddOn | Where { $_.AddOn -eq $addonId } + + return $addon.Locations[0] +} + +<# +.SYNOPSIS +Gets a random object for an available add-on and free plan. + +#> +function Get-RandomFreeAddOn +{ + $addons = Get-AvailableAddOn + $freeAddOns = @() + foreach ($addon in $addons) + { + $freePlan = $addon.Plans | Where { $_.Price -eq 0 } + if ($freePlan) + { + $freeAddOn = @{} + $freeAddOn.AddOn = $addon.AddOn + $freeAddOn.Plan = $freePlan + $freeAddOns += $freeAddOn + } + } + $index = Get-Random -Minimum 0 -Maximum $freeAddOns.Count + + return $freeAddOns[$index] +} + +<# +.SYNOPSIS +Gets valid and available add-on name. +#> +function Get-AddOnName +{ + do + { + $name = "OneSDK" + (Get-Random).ToString() + $addons = Get-AzureStoreAddOn $name + $used = ($addons.Count -ne 0) + } while ($used) + + return $name +} + +<# +.SYNOPSIS +Clears the all created resources while doing the test. +#> +function AddOn-TestCleanup +{ + foreach ($name in $global:createdAddOns) + { + try { Remove-AzureStoreAddOn $name } + catch { <# proceed #> } + } + + $global:createdAddOns = @() +} + +<# +.SYNOPSIS +Creates random add-ons with the count specified. + +.PARAMETER count +The number of add-ons to create. +#> +function New-RandomAddOn +{ + param([int] $count) + + if (!$count) { $count = 1 } + + 1..$count | % { + $name = Get-AddOnName; + $addon = Get-RandomFreeAddOn + New-AzureStoreAddOn $name $addon.AddOn $addon.Plan $(Get-DefaultAddOnLocation $addon.AddOn) + $global:createdAddOns += $name; + } +} + +<# +.SYNOPSIS +Gets free add-on from the predefined add-on list. +#> +function Get-FreeAddOn +{ + $addons = Get-AvailableAddOn + $freeAddOns = @() + foreach ($addonId in $global:freeAddOnIds) + #foreach ($addonId in $freeAddOnIds) + { + $addon = $addons | Where { $_.AddOn -eq $addonId } + Write-Debug "Addon Id: " + Write-Debug $addonId + $freePlan = $addon.Plans | Where { $_.Price -eq 0 } + Write-Debug "Free plan: " + Write-Debug $freePlan.PlanIdentifier + if ($freePlan) + { + Write-Debug "Geet hena" + $freeAddOn = @{} + $freeAddOn.AddOn = $addon.AddOn + $freeAddOn.Plan = $freePlan.PlanIdentifier + $freeAddOns += $freeAddOn + } + } + $index = Get-Random -Minimum 0 -Maximum $freeAddOns.Count + + return $freeAddOns[$index] +} + +<# +.SYNOPSIS +Creates add-ons with the count specified. + +.PARAMETER count +The number of add-ons to create. +#> +function New-AddOn +{ + param([int] $count) + $created = $false + + if (!$count) { $count = 1 } + + 1..$count | % { + $name = Get-AddOnName; + $addon = Get-FreeAddOn + $created = New-AzureStoreAddOn $name $addon.AddOn $addon.Plan $(Get-DefaultAddOnLocation $addon.AddOn) + if ($created) { $global:createdAddOns += $name; } + } + + return $created +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/Store/StoreTests.ps1 b/src/Common/Commands.ScenarioTest/Resources/Store/StoreTests.ps1 new file mode 100644 index 000000000000..2864407a4ce3 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/Store/StoreTests.ps1 @@ -0,0 +1,500 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +########################################################################### General Store Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests any cloud based cmdlet with invalid credentials and expect it'll throw an exception. +#> +function Test-WithInvalidCredentials +{ + param([ScriptBlock] $cloudCmdlet) + + # Setup + Remove-AllSubscriptions + + # Test + Assert-Throws $cloudCmdlet "No current subscription has been designated. Use Select-AzureSubscription -Current to set the current subscription." +} + +########################################################################### Get-AzureStoreAddOn Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests using Get-AzureStoreAddOn -ListAvailable with default country (US) +#> +function Test-GetAzureStoreAddOnListAvailableWithDefaultCountry +{ + # Test + $actual = Get-AzureStoreAddOn -ListAvailable + + # Assert + Assert-True { $actual.Count -gt 0 } + $actual | % { Assert-NotNull $_.Provider; Assert-NotNull $_.AddOn; Assert-NotNull $_.Plans Assert-NotNull $_.Locations } +} + +<# +.SYNOPSIS +Tests using Get-AzureStoreAddOn -ListAvailable with specified country that will not return any addons. +#> +function Test-GetAzureStoreAddOnListAvailableWithNoAddOns +{ + # Test + $actual = Get-AzureStoreAddOn -ListAvailable "E1" + + # Assert + Assert-True { $actual.Count -eq 0 } +} + +<# +.SYNOPSIS +Tests using Get-AzureStoreAddOn -ListAvailable with specified country that will return addons. +#> +function Test-GetAzureStoreAddOnListAvailableWithCountry +{ + # Test + $actual = Get-AzureStoreAddOn -ListAvailable "CH" + + # Assert + Assert-True { $actual.Count -gt 0 } +} + +<# +.SYNOPSIS +Tests using Get-AzureStoreAddOn -ListAvailable with invalid country name. +#> +function Test-GetAzureStoreAddOnListAvailableWithInvalidCountryName +{ + # Test + Assert-Throws { Get-AzureStoreAddOn -ListAvailable "UnitedStates" } "Cannot validate argument on parameter 'Country'. The country name is invalid, please use a valid two character country code, as described in ISO 3166-1 alpha-2." +} + +<# +.SYNOPSIS +Tests using Get-AzureStoreAddOn with empty add-ons. +#> +function Test-GetAzureStoreAddOnWithNoAddOns +{ + # Setup + $current = Get-AzureStoreAddOn + + if ($current.Count -ne 0) + { + Write-Warning "The test can't run because the account is not setup correctly (add-on count should be 0)"; + exit; + } + + # Test + $actual = Get-AzureStoreAddOn + + # Assert + Assert-True { $actual.Count -eq 0 } +} + +<# +.SYNOPSIS +Tests using Get-AzureStoreAddOn with one add-on. +#> +function Test-GetAzureStoreAddOnWithOneAddOn +{ + # Setup + $current = Get-AzureStoreAddOn + + if ($current.Count -ne 0) + { + Write-Warning "The test can't run because the account is not setup correctly (add-on count should be 0)"; + exit; + } + New-AddOn + + # Test + $actual = Get-AzureStoreAddOn + + # Assert + Assert-True { $actual.Count -eq 1 } +} + +<# +.SYNOPSIS +Tests using Get-AzureStoreAddOn with many add-ons +#> +function Test-GetAzureStoreAddOnWithMultipleAddOns +{ + # Setup + New-AddOn 3 + + # Test + $actual = Get-AzureStoreAddOn + + # Assert + Assert-True { $actual.Count -gt 1 } +} + +<# +.SYNOPSIS +Tests using Get-AzureStoreAddOn with getting existing add-on +#> +function Test-GetAzureStoreAddOnWithExistingAddOn +{ + # Setup + New-AddOn + $expected = $global:createdAddOns[0] + + # Test + $actual = Get-AzureStoreAddOn $global:createdAddOns[0] + + # Assert + $actual = $actual[0].Name + Assert-AreEqual $expected $actual +} + +<# +.SYNOPSIS +Tests using Get-AzureStoreAddOn with case invesitive. +#> +function Test-GetAzureStoreAddOnCaseInsinsitive +{ + # Setup + New-AddOn + $expected = $global:createdAddOns[0] + + # Test + $actual = Get-AzureStoreAddOn $expected.ToUpper() + + # Assert + $actual = $actual[0].Name + Assert-AreEqual $expected.ToUpper() $actual.ToUpper() +} + +<# +.SYNOPSIS +Tests using Get-AzureStoreAddOn with invalid add-on name, expects to fail. +#> +function Test-GetAzureStoreAddOnWithInvalidName +{ + # Test + Assert-Throws { Get-AzureStoreAddOn "Invalid Name" } "The provided add-on name 'Invalid Name' is invalid" +} + +<# +.SYNOPSIS +Tests using Get-AzureStoreAddOn with valid and non-existing add-on. +#> +function Test-GetAzureStoreAddOnValidNonExisting +{ + # Test + $actual = Get-AzureStoreAddOn "NonExistingAddOn" + + # Assert + Assert-AreEqual 0 $actual.Count +} + +<# +.SYNOPSIS +Tests using Get-AzureStoreAddOn with App Service +#> +function Test-GetAzureStoreAddOnWithAppService +{ + # Setup + New-AddOn + + # Test + $actual = Get-AzureStoreAddOn + + # Assert + $addon = $actual[0] + Assert-AreEqual "App Service" $addon.Type +} + +<# +.SYNOPSIS +Tests the piping between Get-AzureAddOn and Remove-AzureAddOn +#> +function Test-GetAzureStoreAddOnPipedToRemoveAzureAddOn +{ + # Setup + New-AddOn + $name = $global:createdAddOns[0] + + # Test + Get-AzureStoreAddOn $name | Remove-AzureStoreAddOn + + # Assert + $actual = Get-AzureStoreAddOn $name + Assert-AreEqual 0 $actual.Count +} + +########################################################################### New-AzureStoreAddOn Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests New-AzureStoreAddOn when missing a required parameter and expects it to fail. +#> +function Test-NewAzureStoreAddOnMissingRequiredParameter +{ + # Test + Assert-Throws { New-AzureStoreAddOn AddOn Plan Location } + Assert-Throws { New-AzureStoreAddOn Name Plan Location } + Assert-Throws { New-AzureStoreAddOn Name AddOn Location } + Assert-Throws { New-AzureStoreAddOn Name AddOn Plan } +} + +<# +.SYNOPSIS +Tests New-AzureStoreAddOn with invalid name and expects it to fail. +#> +function Test-NewAzureStoreAddOnWithInvalidName +{ + # Test + Assert-Throws { New-AzureStoreAddOn "Invalid Name" MicrosoftTranslator 2M-1 "West US" } +} + +<# +.SYNOPSIS +Tests New-AzureStoreAddOn with invalid location and expects it to fail. +#> +function Test-NewAzureStoreAddOnWithInvalidWindowsAzureLocation +{ + # Test + Assert-Throws { New-AzureStoreAddOn AddOnName MicrosoftTranslator 2M-1 "Invalid Location" } +} + +<# +.SYNOPSIS +Tests New-AzureStoreAddOn happy path. +#> +function Test-NewAzureStoreAddOnSuccessfull +{ + # Test + $created = New-AddOn + + # Assert + $name = $global:createdAddOns[0] + $actual = Get-AzureStoreAddOn $name + Assert-AreEqual $name $actual.Name + Assert-True { $created } +} + +<# +.SYNOPSIS +Tests New-AzureStoreAddOn using existing add-on name and expects to fail. +#> +function Test-NewAzureStoreAddOnWithExistingName +{ + # Setup + New-AddOn + $name = $global:createdAddOns[0] + $addon = Get-FreeAddOn + + # Test + Assert-Throws { New-AzureStoreAddOn $name $addon.AddOn $addon.Plan $(Get-DefaultAddOnLocation $addon.AddOn) } +} + +<# +.SYNOPSIS +Tests New-AzureStoreAddOn using non-existing add-on and expects to fail. +#> +function Test-NewAzureStoreAddOnWithInvalidAddOn +{ + # Setup + New-AddOn + $name = $global:createdAddOns[0] + $addon = Get-FreeAddOn + + # Test + Assert-Throws { New-AzureStoreAddOn $name "Invalid AddOn" $addon.Plan $(Get-DefaultAddOnLocation $addon.AddOn) } +} + +<# +.SYNOPSIS +Tests New-AzureStoreAddOn using an invalid plan +#> +function Test-NewAzureStoreAddOnWithInvalidPlan +{ + # Test + Assert-Throws { New-AzureStoreAddOn $(Get-AddOnName) MicrosoftTranslator free $(Get-DefaultAddOnLocation MicrosoftTranslator) } +} + +<# +.SYNOPSIS +Tests New-AzureStoreAddOn with invalid location and expects it to fail. +#> +function Test-NewAzureStoreAddOnWithInvalidLocation +{ + # Test + Assert-Throws { New-AzureStoreAddOn addonname sendgrid_azure free "North Central US" } +} + +<# +.SYNOPSIS +Tests New-AzureStoreAddOn with invalid promo code. +#> +function Test-NewAzureStoreAddOnWithInvalidPromoCode +{ + # Setup + $msg = "The REST operation failed with message 'Billing validation for the resource failed with error message: Error: BadUserInput, Description: Promotion Code entered is invalid..' and error code 'BadRequest'" + + # Test + Assert-Throws { New-AzureStoreAddOn addonname sendgrid_azure free "West US" invalidpromo } $msg +} + +<# +.SYNOPSIS +Tests New-AzureStoreAddOn with valid promo code. +#> +function Test-NewAzureStoreAddOnWithValidPromoCode +{ + # Setup + $name = Get-AddOnName + $addonId = "sendgrid_azure" + + # Test + New-AzureStoreAddOn $name $addonId bronze $(Get-DefaultAddOnLocation $addonId) $promotionCode + + # Assert + $actual = Get-AzureStoreAddOn $name + Assert-NotNull $actual + Assert-AreEqual $name $actual.Name +} + +<# +.SYNOPSIS +Tests New-AzureStoreAddOn with user choice No and expects to not purchase. +#> +function Test-NewAzureStoreAddOnWithNo +{ + # Test + $actual = New-AddOn + + # Assert + Assert-False { $actual } +} + +<# +.SYNOPSIS +Tests New-AzureStoreAddOn confirmation message +#> +function Test-NewAzureStoreAddOnConfirmationMessage +{ + # Setup + $name = Get-AddOnName + $addonId = "sendgrid_azure" + $plan = "free" + + # Test + $actual = New-AzureStoreAddOn $name $addonId $plan $(Get-DefaultAddOnLocation $addonId) + + # Assert + Assert-True { $actual } +} + +########################################################################### Remove-AzureStoreAddOn Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests Remove-AzureStoreAddOn happy path. +#> +function Test-RemoveAzureStoreAddOnSuccessfull +{ + # Setup + New-AddOn + + # Test + $actual = Remove-AzureStoreAddOn $global:createdAddOns[0] -PassThru + + # Assert + Assert-True { $actual } +} + +<# +.SYNOPSIS +Tests Remove-AzureStoreAddOn with different add-on name casing and expects to remove. +#> +function Test-RemoveAzureStoreAddOnWithCasing +{ + # Setup + New-AddOn + $name = $global:createdAddOns[0].ToUpper() + + # Test + $actual = Remove-AzureStoreAddOn $name -PassThru + + # Assert + Assert-True { $actual } +} + +<# +.SYNOPSIS +Tests Remove-AzureStoreAddOn with non-existing add-on and expects to throw exception +#> +function Test-RemoveAzureStoreAddOnNotExisting +{ + # Test + Assert-Throws { Remove-AzureStoreAddOn "NotExistingName" } +} + +<# +.SYNOPSIS +Tests Remove-AzureStoreAddOn piped from Get-AzureStoreAddOn +#> +function Test-RemoveAzureStoreAddOnPipedFromGetAzureAddOn +{ + # Setup + New-AddOn + $name = $global:createdAddOns[0] + + # Test + $actual = Get-AzureStoreAddOn $name | Remove-AzureStoreAddOn -PassThru + + # Assert + Assert-True { $actual } +} + +<# +.SYNOPSIS +Tests Remove-AzureStoreAddOn piped from Get-AzureStoreAddOn with multiple add-ons +#> +function Test-RemoveAzureStoreAddOnMultiplePipedFromGetAzureAddOn +{ + # Setup + New-AddOn 3 + $addons = @() + foreach ($name in $global:createdAddOns) + { + $addons += Get-AzureStoreAddOn $name + } + + # Test + $actual = $addons | Remove-AzureStoreAddOn -PassThru + + # Assert + Assert-True { $actual } +} + +<# +.SYNOPSIS +Tests Remove-AzureStoreAddOn with No and expects not to purchase. +#> +function Test-RemoveAzureStoreAddOnWithNo +{ + # Setup + New-AddOn + + # Test + $actual = Remove-AzureStoreAddOn $global:createdAddOns[0] -PassThru + + # Assert + Assert-False { $actual } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/TrafficManager/Common.ps1 b/src/Common/Commands.ScenarioTest/Resources/TrafficManager/Common.ps1 new file mode 100644 index 000000000000..d5b848f34c7b --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/TrafficManager/Common.ps1 @@ -0,0 +1,54 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +$ErrorActionPreference = "Stop" + +$ProfileNamePrefix = "onesdk"; + +#TODO: Make the domain name suffix environment dependent +$TrafficManagerDomain = ".trafficmanager.net"; + +<# +.SYNOPSIS +Gets valid profile name. +#> +function Get-ProfileName +{ + $name = getAssetName + Write-Debug "Using profile with name: $name" + return $name +} + +<# +.SYNOPSIS +Creates a profile. +#> +function New-Profile +{ + param([string] $profileName) + + #TODO: Make the domain name suffix environment dependent + $domainName = $profileName + $TrafficManagerDomain + + New-AzureTrafficManagerProfile -Name $profileName -DomainName $domainName -LoadBalancingMethod RoundRobin -MonitorPort 80 -MonitorProtocol Http -MonitorRelativePath "/" -Ttl 300 +} + +<# +.SYNOPSIS +Removes all profiles from the $profileNames list from the current subscription. +#> +function Initialize-TrafficManagerTest +{ + Get-AzureTrafficManagerProfile | Where-Object { $_.Name.StartsWith($ProfileNamePrefix) } | Remove-AzureTrafficManagerProfile -Force +} diff --git a/src/Common/Commands.ScenarioTest/Resources/TrafficManager/TrafficManagerTests.ps1 b/src/Common/Commands.ScenarioTest/Resources/TrafficManager/TrafficManagerTests.ps1 new file mode 100644 index 000000000000..eb9869856fbf --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/TrafficManager/TrafficManagerTests.ps1 @@ -0,0 +1,434 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +########################################################################### General TrafficManager Scenario Tests###################################################################### + +<# +.SYNOPSIS +Tests any cloud based cmdlet with invalid credentials and expect it'll throw an exception. +#> +function Test-WithInvalidCredentials +{ + param([ScriptBlock] $cloudCmdlet) + + # Setup + Remove-AllSubscriptions + + # Test + Assert-Throws $cloudCmdlet "No current subscription has been designated. Use Select-AzureSubscription -Current to set the current subscription." +} + +########################################################################### Remove-Profile Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests New-AzureTrafficManagerProfile and Remove-AzureTrafficManagerProfile +#> +function Test-CreateAndRemoveProfile +{ + # Setup + $profileName = Get-ProfileName + New-Profile $profileName + + # Test + $isDeleted = Remove-AzureTrafficManagerProfile -Name $profileName -Force -PassThru + + # Assert + Assert-True { $isDeleted } "Failed to delete profile $profileName" + Assert-Throws { Get-AzureTrafficManagerProfile -Name $profileName } "ResourceNotFound: The specified profile name $profileName does not exist." +} + +<# +.SYNOPSIS +Tests Remove-AzureTrafficManagerProfile with non existing name +#> +function Test-RemoveProfileWithNonExistingName +{ + # Setup + $existingProfileName = Get-ProfileName + $nonExistingProfileName = Get-ProfileName "nonexisting" + + # Need to have at least one profile in the subscription or the error will be "missing subscription" + New-Profile $existingProfileName + + # Assert + Assert-Throws { Remove-AzureTrafficManagerProfile -Name $nonExistingProfileName -Force } "ResourceNotFound: The specified profile name $nonExistingProfileName does not exist." +} + +########################################################################### Get-Profile Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests Get-AzureTrafficManagerProfile +#> +function Test-GetProfile +{ + # Setup + $profileName = Get-ProfileName + $createdProfile = New-Profile $profileName + + # Test + $retrievedProfile = Get-AzureTrafficManagerProfile $profileName + + # Assert + Assert-AreEqualObjectProperties $createdProfile $retrievedProfile +} + +<# +.SYNOPSIS +Tests Get-AzureTrafficManagerProfile +#> +function Test-GetMultipleProfiles +{ + # Setup + $profileName1 = Get-ProfileName 1 + $profileName2 = Get-ProfileName 2 + + $createdProfile1 = New-Profile $profileName1 + $createdProfile2 = New-Profile $profileName2 + + # Test + $retrievedProfiles = Get-AzureTrafficManagerProfile + + # Assert + Assert-True { $($retrievedProfiles | select -ExpandProperty Name) -Contains $profileName1 } "Assert failed, profile '$profileName1' not found" + Assert-True { $($retrievedProfiles | select -ExpandProperty Name) -Contains $profileName2 } "Assert failed, profile '$profileName2' not found" +} + +########################################################################### Enable-Profile, Disable-Profile Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests Disable-AzureTrafficManagerProfile +#> +function Test-DisableProfile +{ + # Setup + $profileName = Get-ProfileName + New-Profile $profileName + + # Test + Disable-AzureTrafficManagerProfile $profileName + $disabledProfile = Get-AzureTrafficManagerProfile -Name $profileName + + # Assert + Assert-AreEqual "Disabled" $disabledProfile.Status +} + +<# +.SYNOPSIS +Tests Enable-AzureTrafficManagerProfile +#> +function Test-EnableProfile +{ + # Setup + $profileName = Get-ProfileName + New-Profile $profileName + + # Test + Disable-AzureTrafficManagerProfile $profileName + Enable-AzureTrafficManagerProfile $profileName + $enabledProfile = Get-AzureTrafficManagerProfile -Name $profileName + + # Assert + Assert-AreEqual "Enabled" $enabledProfile.Status +} + +########################################################################### New-Profile Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests New-AzureTrafficManagerProfile +#> +function Test-NewProfile +{ + # Setup + $profileName = Get-ProfileName + + # Test + $createdProfile = New-Profile $profileName + + # Assert + Assert-AreEqual $($profileName + ".trafficmanager.net") $createdProfile.DomainName + Assert-AreEqual $profileName $createdProfile.Name + Assert-AreEqual RoundRobin $createdProfile.LoadBalancingMethod + Assert-AreEqual 80 $createdProfile.MonitorPort + Assert-AreEqual Http $createdProfile.MonitorProtocol + Assert-AreEqual "/" $createdProfile.MonitorRelativePath + Assert-AreEqual 300 $createdProfile.TimeToLiveInSeconds + Assert-AreEqual "Enabled" $createdProfile.Status + Assert-AreEqual "Inactive" $createdProfile.MonitorStatus +} + +<# +.SYNOPSIS +Tests New-AzureTrafficManagerProfile with invalid parameter +#> +function Test-NewProfileWithInvalidParameter +{ + # Setup + $profileName = Get-ProfileName + + # Assert + $expectedMessage = "A policy with the requested domain name could not be created because the name INVALID does not end with the expected value .trafficmanager.net." + Assert-Throws { New-AzureTrafficManagerProfile -Name $profileName -DomainName "INVALID" -LoadBalancingMethod RoundRobin -MonitorPort 80 -MonitorProtocol Http -MonitorRelativePath "/" -Ttl 300 } +} + +########################################################################### Set-Profile Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests Set-AzureTrafficManagerProfile +#> +function Test-SetProfileProperty +{ + # Setup + $profileName = Get-ProfileName + $createdProfile = New-Profile $profileName + + # Test + $updatedProfile = Set-AzureTrafficManagerProfile -TrafficManagerProfile $createdProfile -Name $createdProfile.Name -Ttl 333 + + # Assert + Assert-AreEqual 333 $updatedProfile.TimeToLiveInSeconds +} + +<# +.SYNOPSIS +Tests Add-AzureTrafficManagerEndpoint +#> +function Test-AddAzureTrafficManagerEndpoint +{ + # Setup + $profileName = Get-ProfileName + $createdProfile = New-Profile $profileName + + #Test + $updatedProfile = $createdProfile | Add-AzureTrafficManagerEndpoint -DomainName "www.microsoft.com" -Type Any -Status Enabled -Weight 3 -Location "West US" | Set-AzureTrafficManagerProfile + + # Assert + $profileMonitoringStatus = $updatedProfile.MonitorStatus + $endpointMonitoringStatus = $updatedProfile.Endpoints[0].MonitorStatus + + Assert-AreEqual 1 $updatedProfile.Endpoints.Count + Assert-True { $profileMonitoringStatus -eq "CheckingEndpoints" -or $profileMonitoringStatus -eq "Online" } "Assert failed as endpoint MonitoringStatus has an unexpected value: $profileMonitoringStatus" + + Assert-AreEqual Any $updatedProfile.Endpoints[0].Type + Assert-AreEqual "www.microsoft.com" $updatedProfile.Endpoints[0].DomainName + Assert-AreEqual Enabled $updatedProfile.Endpoints[0].Status + Assert-AreEqual 3 $updatedProfile.Endpoints[0].Weight + Assert-AreEqual "West US" $updatedProfile.Endpoints[0].Location + Assert-True { $endpointMonitoringStatus -eq "CheckingEndpoint" -or $endpointMonitoringStatus -eq "Online" } "Assert failed as endpoint MonitoringStatus has an unexpected value: $endpointMonitoringStatus" +} + +<# +.SYNOPSIS +Tests Add-AzureTrafficManagerEndpoint with no weight or location +#> +function Test-AddAzureTrafficManagerEndpointNoWeightLocation +{ + # Setup + $profileName = Get-ProfileName + $createdProfile = New-Profile $profileName + + #Test + $updatedProfile = $createdProfile | Add-AzureTrafficManagerEndpoint -DomainName "www.microsoft.com" -Type Any -Status Enabled | Set-AzureTrafficManagerProfile + + # Assert + $profileMonitoringStatus = $updatedProfile.MonitorStatus + $endpointMonitoringStatus = $updatedProfile.Endpoints[0].MonitorStatus + + Assert-AreEqual 1 $updatedProfile.Endpoints.Count + Assert-True { $profileMonitoringStatus -eq "CheckingEndpoints" -or $profileMonitoringStatus -eq "Online" } "Assert failed as endpoint MonitoringStatus has an unexpected value: $profileMonitoringStatus" + + Assert-AreEqual Any $updatedProfile.Endpoints[0].Type + Assert-AreEqual "www.microsoft.com" $updatedProfile.Endpoints[0].DomainName + Assert-AreEqual Enabled $updatedProfile.Endpoints[0].Status + # Test for default values + Assert-AreEqual 1 $updatedProfile.Endpoints[0].Weight + Assert-Null $updatedProfile.Endpoints[0].Location + Assert-True { $endpointMonitoringStatus -eq "CheckingEndpoint" -or $endpointMonitoringStatus -eq "Online" } "Assert failed as endpoint MonitoringStatus has an unexpected value: $endpointMonitoringStatus" +} + +<# +.SYNOPSIS +Tests Add-AddAzureTrafficManagerEndpointNoWeightLocation with no MinChildEndpoints +#> +function Test-AddAzureTrafficManagerEndpointNoMinChildEndpoints +{ + # Setup + $profileName = Get-ProfileName + $createdProfile = New-Profile $profileName + + #Test + $updatedProfile = $createdProfile | Add-AzureTrafficManagerEndpoint -DomainName "www.microsoft.com" -Type Any -Status Enabled | Set-AzureTrafficManagerProfile + + # Assert + Assert-AreEqual 1 $updatedProfile.Endpoints.Count + Assert-AreEqual $null $updatedProfile.Endpoints[0].MinChildEndpoints +} + +<# +.SYNOPSIS +Tests Add-AddAzureTrafficManagerEndpointTypeTrafficManager +#> +function Test-AddAzureTrafficManagerEndpointTypeTrafficManager +{ + # Setup + $nestedProfileName = Get-ProfileName + $nestedDomainName = $nestedProfileName + $TrafficManagerDomain + $randomValue = Get-Random -Maximum 10000 + $topLevelProfileName = "toplevelprofile" + $randomValue + $nestedProfile = New-Profile $nestedProfileName + $topLevelProfile = New-Profile $topLevelProfileName + + #Test + $updatedNestedProfile = $nestedProfile | Add-AzureTrafficManagerEndpoint -DomainName "www.microsoft.com" -Type Any -Status Enabled | Set-AzureTrafficManagerProfile + $updatedTopLevelProfile = $topLevelProfile | Add-AzureTrafficManagerEndpoint -DomainName $nestedDomainName -Type TrafficManager -Status Enabled | Set-AzureTrafficManagerProfile + + # Assert + Assert-AreEqual 1 $updatedNestedProfile.Endpoints.Count + Assert-AreEqual Any $updatedNestedProfile.Endpoints[0].Type + Assert-AreEqual 1 $updatedTopLevelProfile.Endpoints.Count + Assert-AreEqual TrafficManager $updatedTopLevelProfile.Endpoints[0].Type + + Remove-AzureTrafficManagerProfile -Name $topLevelProfileName -Force -PassThru +} + +<# +.SYNOPSIS +Tests Set-AzureTrafficManagerEndpoint not updating Weight or Location +#> +function Test-SetAzureTrafficManagerEndpoint +{ + # Setup + $profileName = Get-ProfileName + $createdProfile = New-Profile $profileName | Add-AzureTrafficManagerEndpoint -DomainName "www.microsoft.com" -Type Any -Status Enabled -Weight 3 -Location "West US" | Set-AzureTrafficManagerProfile + + # Assert + Assert-AreEqual 3 $createdProfile.Endpoints[0].Weight + Assert-AreEqual "West US" $createdProfile.Endpoints[0].Location + + # Test + $updatedProfile = $createdProfile | Set-AzureTrafficManagerEndpoint -DomainName "www.microsoft.com" -Status Disabled | Set-AzureTrafficManagerProfile + + # Assert + Assert-AreEqual 1 $updatedProfile.Endpoints.Count + Assert-AreEqual "www.microsoft.com" $updatedProfile.Endpoints[0].DomainName + Assert-AreEqual Disabled $updatedProfile.Endpoints[0].Status + Assert-AreEqual 3 $updatedProfile.Endpoints[0].Weight + Assert-AreEqual "West US" $updatedProfile.Endpoints[0].Location +} + +<# +.SYNOPSIS +Tests Set-AzureTrafficManagerEndpoint updating Weight and Location +#> +function Test-SetAzureTrafficManagerEndpointUpdateWeightLocation +{ + # Setup + $profileName = Get-ProfileName + $createdProfile = New-Profile $profileName | Add-AzureTrafficManagerEndpoint -DomainName "www.microsoft.com" -Type Any -Status Enabled | Set-AzureTrafficManagerProfile + + # Assert + Assert-AreEqual 1 $createdProfile.Endpoints[0].Weight + Assert-Null $createdProfile.Endpoints[0].Location + + #Test + $updatedProfile = $createdProfile | Set-AzureTrafficManagerEndpoint -DomainName "www.microsoft.com" -Status Disabled -Weight 3 -Location "West US" | Set-AzureTrafficManagerProfile + + # Assert + Assert-AreEqual 1 $updatedProfile.Endpoints.Count + Assert-AreEqual "www.microsoft.com" $updatedProfile.Endpoints[0].DomainName + Assert-AreEqual Disabled $updatedProfile.Endpoints[0].Status + Assert-AreEqual 3 $updatedProfile.Endpoints[0].Weight + Assert-AreEqual "West US" $updatedProfile.Endpoints[0].Location +} + +<# +.SYNOPSIS +Tests Set-AzureTrafficManagerEndpoint when it adds endpoints +#> +function Test-SetAzureTrafficManagerEndpointAdds +{ + # Setup + $profileName = Get-ProfileName + $createdProfile = New-Profile $profileName + + $createdProfile = $createdProfile | + Set-AzureTrafficManagerEndpoint -DomainName "www.microsoft.com" -Type Any -Status Enabled | + Set-AzureTrafficManagerEndpoint -DomainName "www.windows.com" -Type Any -Status Enabled | + Set-AzureTrafficManagerProfile + + # Assert + Assert-AreEqual 2 $createdProfile.Endpoints.Count + Assert-True { $($createdProfile.Endpoints | select -ExpandProperty DomainName) -Contains "www.microsoft.com" } "Assert failed, endpoint 'www.microsoft.com' not found" + Assert-True { $($createdProfile.Endpoints | select -ExpandProperty DomainName) -Contains "www.windows.com" } "Assert failed, endpoint 'www.microsoft.com' not found" + + # Test + $updatedProfile = $createdProfile | Set-AzureTrafficManagerEndpoint -DomainName "www.microsoft.com" -Status Disabled | Set-AzureTrafficManagerProfile + + # Assert + Assert-AreEqual 2 $updatedProfile.Endpoints.Count + Assert-True { $($updatedProfile.Endpoints | select -ExpandProperty DomainName) -Contains "www.microsoft.com" } "Assert failed, endpoint 'www.microsoft.com' not found" + Assert-AreEqual Disabled $($updatedProfile.Endpoints | where {$_.DomainName -eq "www.microsoft.com"}).Status +} + +<# +.SYNOPSIS +Tests Remove-AzureTrafficManagerEndpoint +#> +function Test-RemoveAzureTrafficManagerEndpoint +{ + # Setup + $profileName = Get-ProfileName + $createdProfile = New-Profile $profileName | Add-AzureTrafficManagerEndpoint -DomainName "www.microsoft.com" -Type Any -Status Enabled | Set-AzureTrafficManagerProfile + + #Test + $updatedProfile = $createdProfile | Remove-AzureTrafficManagerEndpoint -DomainName "www.microsoft.com" | Set-AzureTrafficManagerProfile + + # Assert + Assert-AreEqual 0 $updatedProfile.Endpoints.Count +} + +<# +.SYNOPSIS +Tests multiple Add-AzureTrafficManagerEndpoint +#> +function Test-AddMultipleAzureTrafficManagerEndpoint +{ + # Setup + $profileName = Get-ProfileName + $createdProfile = New-Profile $profileName | Add-AzureTrafficManagerEndpoint -DomainName "www.microsoft.com" -Type Any -Status Enabled + $createdProfile = $createdProfile | Add-AzureTrafficManagerEndpoint -DomainName "www.bing.com" -Type Any -Status Enabled + + #Test + $updatedProfile = $createdProfile | Set-AzureTrafficManagerProfile + + # Assert + Assert-AreEqual 2 $updatedProfile.Endpoints.Count +} + +########################################################################### Test-TrafficManagerDomainName Scenario Tests ########################################################################### +<# +.SYNOPSIS +Tests Test-AzureTrafficManagerDomainName +#> +function Test-TestAzureTrafficManagerDomainName +{ + $profileName = Get-ProfileName + Assert-True { Test-AzureTrafficManagerDomainName -DomainName $profileName$TrafficManagerDomain } "Assert failed, domain name $profileName$TrafficManagerDomain is not available" + $createdProfile = New-Profile $profileName + Assert-False { Test-AzureTrafficManagerDomainName -DomainName $profileName$TrafficManagerDomain } "Assert failed, domain name $profileName$TrafficManagerDomain is available after creating a profile with that name" +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/Websites/Common.ps1 b/src/Common/Commands.ScenarioTest/Resources/Websites/Common.ps1 new file mode 100644 index 000000000000..8511af66b63d --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/Websites/Common.ps1 @@ -0,0 +1,375 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +$global:createdWebsites = @() +$currentWebsite = $null + +<# +.SYNOPSIS +Gets valid website name. +#> +function Get-WebsiteName +{ + $name = getAssetName + Write-Debug "Creating website with name $name" + Store-Website $name + return $name +} + +<# +.SYNOPSIS +Gets a valid website location, given a preferred location +#> +function Get-WebsiteDefaultLocation +{ + param([string] $defaultLoc = $null) + $location = $null + if ($global:DefaultLocation -ne $null) + { + $location = $global:DefaultLocation + } + else + { + $locations = @(Get-AzureWebsiteLocation) + $locations | % { + if ($_.ToLower() -eq $defaultLoc) + { + $location = $defaultLoc + } + } + if ($location -eq $null) + { + $location = $locations[0] + } + } + + return $location; +} + +<# +.SYNOPSIS +Gets a valid storage location +#> +function Get-StorageDefaultLocation +{ + $location = $null + $locations = @(Get-AzureLocation) + $locations | % { + if ($_.AvailableServices.Contains("Storage")) + { + $location = $_.Name + } + } + + return $location; +} + +<# +.SYNOPSIS +Gets valid website job name. +#> +function Get-WebsiteJobName +{ + return "OneSDKWebsiteJob" + (Get-Random).ToString() +} + +<# +.SYNOPSIS +Creates websites with the count specified + +.PARAMETER count +The number of websites to create. +#> +function New-Website +{ + param([int] $count) + + 1..$count | % { + $name = Get-WebsiteName + New-AzureWebsite $name + $global:createdWebsites += $name + } +} + +<# +.SYNOPSIS +Removes all websites +#> +function Initialize-WebsiteTest +{ + Get-AzureWebsite | Remove-AzureWebsite -Force +} + + +<# +.SYNOPSIS +Sets up environment for running a website test +#> +function Initialize-SingleWebsiteTest +{ + Write-Debug "Saving Global Location" + $global:testLocation = Get-Location +} + +<# +.SYNOPSIS +Removes all created websites. +#> +function Cleanup-SingleWebsiteTest +{ + $global:createdWebsites | % { + if ($_ -ne $null) + { + try + { + Write-Debug "Removing website with name $_" + $catch = Remove-AzureWebsite -Name $_ -Slot Production -Force + } + catch + { + } + } + } + + $global:createdWebsites.Clear() + Set-Location $global:testLocation +} + +<# +.SYNOPSIS +Run a website test, with cleanup. +#> +function Run-WebsiteTest +{ + param([ScriptBlock] $test, [string] $testName) + + Initialize-SingleWebsiteTest *> "$testName.debug_log" + try + { + Run-Test $test $testName *>> "$testName.debug_log" + } + finally + { + Cleanup-SingleWebsiteTest *>> "$testName.debug_log" + } +} + +<# +.SYNOPSIS +Record the creation of a website +#> +function Store-Website +{ + param([string]$name) + $global:createdWebsites += $name +} + +<# +.SYNOPSIS +Clones git repo +#> +function Clone-GitRepo +{ + param([string] $repo, [string] $dir) + + $cloned = $false + do + { + try + { + git clone $repo $dir + $cloned = $true + } + catch + { + # Do nothing + } + } + while (!$cloned) +} + +<# +.SYNOPSIS +Creates new website using the sample log app template. +#> +function New-BasicLogWebsite +{ + $name = Get-WebsiteName + Clone-GitRepo https://github.com/wapTestApps/basic-log-app.git $name + $password = ConvertTo-SecureString $githubPassword -AsPlainText -Force + $credentials = New-Object System.Management.Automation.PSCredential $githubUsername,$password + cd $name + $global:currentWebsite = New-AzureWebsite -Name $name -Github -GithubCredentials $credentials -GithubRepository wapTestApps/basic-log-app +} + +<# +.SYNOPSIS +Waits on the specified task until it does not return not found. + +.PARAMETER scriptBlock +The script block to execute. + +.PARAMETER timeout +The maximum timeout for the script. +#> +function Wait-WebsiteFunction +{ + param([ScriptBlock] $scriptBlock, [object] $breakCondition, [int] $timeout) + + if ($timeout -eq 0) { $timeout = 60 * 5 } + $start = [DateTime]::Now + $current = [DateTime]::Now + $diff = $current - $start + + do + { + Wait-Seconds 5 + $current = [DateTime]::Now + $diff = $current - $start + $result = $null + try + { + $result = &$scriptBlock + } + catch {} + } + while(($result -ne $breakCondition) -and ($diff.TotalSeconds -lt $timeout)) + + if ($diff.TotalSeconds -ge $timeout) + { + Write-Warning "The script block '$scriptBlock' exceeded the timeout." + # End the processing so the test does not blow up + exit + } +} +<# +.SYNOPSIS +Retries DownloadString +#> +function Retry-DownloadString +{ + param([object] $client, [string] $uri) + + $retry = $false + + do + { + try + { + $client.DownloadString($uri) + $retry = $false + } + catch + { + $retry = $true + Write-Warning "Retry calling $client.DownloadString" + } + } + while ($retry) +} + +<# +.SYNOPSIS +Get downloadString and verify expected string +#> +function Test-ValidateResultInBrowser +{ + param([string] $uri, [string] $expectedString) + $client = New-Object System.Net.WebClient + $resultString = $client.DownloadString($uri) + return $resultString.ToUpper().Contains($expectedString.ToUpper()) +} + +<# +.SYNOPSIS +Runs npm and verifies the results. + +.PARAMETER command +The npm command to run +#> + +function Npm-InstallExpress +{ + try + { + $command = "install -g express@3.4.8"; + Start-Process npm $command -WAIT + "Y" | express + if([system.IO.File]::Exists("server.js")) + { + del server.js + } + mv app.js server.js + npm install + } + catch + { + Write-Warning "Expected warning exist when npm install, ignore it" + } +} + +<# +.SYNOPSIS +Push local git repo to website. + +.PARAMETER command +Target site name to push +#> + +function Git-PushLocalGitToWebSite +{ + param([string] $siteName) + $webSite = Get-AzureWebsite -Name $siteName -Slot Production + + # Expected warning: LF will be replaced by CRLF in node_modules/.bin/express." when run git command + Assert-Throws { git add -A } + $commitString = "Update azurewebsite with local git" + Assert-Throws { git commit -m $commitString } + + $remoteAlias = "azureins" + $remoteUri = "https://" + $env:GIT_USERNAME + ":" + $env:GIT_PASSWORD + "@" + $webSite.EnabledHostNames[1] + "/" + $webSite.Name + ".git" + git remote add $remoteAlias $remoteUri + + # Disable Git SSL verification for Windows Azure Pack + git config --local http.sslVerify false + + # Expected message "remote: Updating branch 'master'" + Assert-Throws { git push $remoteAlias master } +} + +<# +.SYNOPSIS +A convinience function for you to pass in existing web site name and preferred web job configuration +#> +function Test-CreateAndRemoveAJob +{ + param([string] $webSiteName, [string] $webSiteJobName, [string] $webSiteJobType, [string] $testCommandFile) + + # Setup + New-AzureWebsiteJob -Name $webSiteName -JobName $webSiteJobName -JobType $webSiteJobType -JobFile $testCommandFile + Get-AzureWebsiteJob -Name $webSiteName -JobName $webSiteJobName -JobType $webSiteJobType + + # Test + If ($webSiteJobType -eq "Continuous") + { + Write-Host "Wait and retry to work around a known limitation, that a newly created job might not be immediately available." + $waitScriptBlock = { Stop-AzureWebsiteJob -Name $webSiteName -JobName $webSiteJobName -PassThru } + Wait-WebsiteFunction $waitScriptBlock $TRUE + } + + $removed = Remove-AzureWebsiteJob -Name $webSiteName -JobName $webSiteJobName -JobType $webSiteJobType –Force + + # Assert + Assert-True { $removed } +} diff --git a/src/Common/Commands.ScenarioTest/Resources/Websites/WebsiteJobTestCmd.zip b/src/Common/Commands.ScenarioTest/Resources/Websites/WebsiteJobTestCmd.zip new file mode 100644 index 000000000000..07b79ac47d56 Binary files /dev/null and b/src/Common/Commands.ScenarioTest/Resources/Websites/WebsiteJobTestCmd.zip differ diff --git a/src/Common/Commands.ScenarioTest/Resources/Websites/WebsitesTests.ps1 b/src/Common/Commands.ScenarioTest/Resources/Websites/WebsitesTests.ps1 new file mode 100644 index 000000000000..e7c1369a2ed0 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/Websites/WebsitesTests.ps1 @@ -0,0 +1,1071 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +########################################################################### General Websites Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests any cloud based cmdlet with invalid credentials and expect it'll throw an exception. +#> +function Test-WithInvalidCredentials +{ + param([ScriptBlock] $cloudCmdlet) + + # Setup + Remove-AllSubscriptions + + # Test + Assert-Throws $cloudCmdlet "No current subscription has been designated. Use Select-AzureSubscription -Current to set the current subscription." +} + +########################################################################### Remove-AzureWebsite Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests Remove-AzureWebsite with existing name +#> +function Test-RemoveAzureServiceWithValidName +{ + # Setup + $name = Get-WebsiteName + New-AzureWebsite $name + + # Test + Remove-AzureWebsite $name -Slot Production -Force + + # Assert + Assert-True { (Get-AzureWebsite -Name $name ) -eq $null} + $global:createdWebsites.Clear() +} + +<# +.SYNOPSIS +Tests Remove-AzureWebsite with non existing name +#> +function Test-RemoveAzureServiceWithNonExistingName +{ + Assert-True { (Remove-AzureWebsite "OneSDKNotExisting" -Force) -eq $null } +} + +<# +.SYNOPSIS +Tests Remove-AzureWebsite with WhatIf +#> +function Test-RemoveAzureServiceWithWhatIf +{ + # Setup + $name = Get-WebsiteName + New-AzureWebsite -Name $name + + # Test + Remove-AzureWebsite -Name $name -Slot Production -Force -WhatIf + Remove-AzureWebsite -Name $name -Slot Production -Force + $global:createdWebsites.Clear() + # Assert + Assert-True { (Get-AzureWebsite -Name $name ) -eq $null } +} + +########################################################################### Get-AzureWebsiteLog Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests Get-AzureWebsiteLog with -Tail +#> +function Test-GetAzureWebsiteLogTail +{ + # Setup + New-BasicLogWebsite + $website = $global:currentWebsite + $client = New-Object System.Net.WebClient + $uri = "http://" + $website.HostNames[0] + $client.BaseAddress = $uri + $count = 0 + + #Test + Get-AzureWebsiteLog -Name $website.Name -Tail -Message "㯑䲘䄂㮉" | % { + if ($_ -like "*㯑䲘䄂㮉*") { exit; } + Retry-DownloadString $client $uri + $count++ + if ($count -gt 50) { throw "Logs were not found"; } + } +} + +<# +.SYNOPSIS +Tests Get-AzureWebsiteLog with -Tail with special characters in uri. +#> +function Test-GetAzureWebsiteLogTailUriEncoding +{ + # Setup + New-BasicLogWebsite + $website = $global:currentWebsite + $client = New-Object System.Net.WebClient + $uri = "http://" + $website.HostNames[0] + $client.BaseAddress = $uri + $count = 0 + + #Test + Get-AzureWebsiteLog -Name $website.Name -Tail -Message "mes/a:q;" | % { + if ($_ -like "*mes/a:q;*") { exit; } + Retry-DownloadString $client $uri + $count++ + if ($count -gt 50) { throw "Logs were not found"; } + } +} + +<# +.SYNOPSIS +Tests Get-AzureWebsiteLog with -Tail +#> +function Test-GetAzureWebsiteLogTailPath +{ + # Setup + New-BasicLogWebsite + $website = $global:currentWebsite + $client = New-Object System.Net.WebClient + $uri = "http://" + $website.HostNames[0] + $client.BaseAddress = $uri + Set-AzureWebsite -RequestTracingEnabled $true -HttpLoggingEnabled $true -DetailedErrorLoggingEnabled $true + 1..10 | % { Retry-DownloadString $client $uri } + Wait-Seconds 30 + + #Test + $retry = $false + do + { + try + { + Get-AzureWebsiteLog -Name $website.Name -Tail -Path http | % { + if ($_ -like "*") + { + exit + } + throw "HTTP path is not reached" + } + } + catch + { + if ($_.Exception.Message -eq "One or more errors occurred.") + { + $retry = $true; + Write-Warning "Retry Test-GetAzureWebsiteLogTailPath" + continue; + } + + throw $_.Exception + } + } while ($retry) +} + +<# +.SYNOPSIS +Tests Get-AzureWebsiteLog with -ListPath +#> +function Test-GetAzureWebsiteLogListPath +{ + # Setup + New-BasicLogWebsite + + #Test + $retry = $false + do + { + try + { + $actual = Get-AzureWebsiteLog -ListPath; + $retry = $false + } + catch + { + if ($_.Exception.Message -like "For security reasons DTD is prohibited in this XML document.*") + { + $retry = $true; + Write-Warning "Retry Test-GetAzureWebsiteLogListPath" + continue; + } + throw $_.Exception + } + } while ($retry) + + # Assert + Assert-AreEqual 1 $actual.Count + Assert-AreEqual "Git" $actual +} + +########################################################################### Get-AzureWebsite Scenario Tests ########################################################################### +<# +.SYNOPSIS +Test Kudu apps +#> +function Test-KuduAppsExpressApp +{ + Write-Debug "Starting Test Test-KuduappsExpressApp" + $ok = Assert-Env @("GIT_USERNAME") + $GIT_USERNAME = $env:GIT_USERNAME + # Setup + $siteName = Get-WebsiteName + Mkdir $siteName + cd $siteName + + # Test + $command = "install -g express@3.4.8"; + Write-Debug "Running Start-Process npm $command -WAIT" + Start-Process npm $command -WAIT + + express + Write-Debug "Creating website $siteName" + $webSite = New-AzureWebSite $siteName -Git –PublishingUsername $GIT_USERNAME + Write-Debug "Created website" + Write-Debug $webSite + + # Assert + Assert-NotNull { $webSite } "Site $siteName created failed" + Assert-Exists "..\$siteName\iisnode.yml" +} + +<# +.SYNOPSIS +Tests Get-AzureWebsite +#> +function Test-GetAzureWebsite +{ + # Setup + $name = Get-WebsiteName + New-AzureWebsite $name + + #Test + $config = Get-AzureWebsite -Name $name -Slot Production + + # Assert + Assert-AreEqual $name $config.Name +} + +<# +.SYNOPSIS +Tests GetAzureWebsite with a stopped site and expects to proceed. +#> +function Test-GetAzureWebsiteWithStoppedSite +{ + # Setup + $name = Get-WebsiteName + New-AzureWebsite $name + Stop-AzureWebsite $name + + #Test + $website = Get-AzureWebsite $name -Slot Production + + # Assert + Assert-NotNull { $website } +} + +########################################################################### Start-AzureWebsite Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests Start-AzureWebsite happy path. +#> +function Test-StartAzureWebsite +{ + # Setup + $name = Get-WebsiteName + New-AzureWebsite $name + Stop-AzureWebsite $name + + # Test + Start-AzureWebsite $name + + # Assert + $website = Get-AzureWebsite $name -Slot Production + Assert-AreEqual "Running" $website.State +} + +########################################################################### Stop-AzureWebsite Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests Stop-AzureWebsite happy path. +#> +function Test-StopAzureWebsite +{ + # Setup + $name = Get-WebsiteName + New-AzureWebsite $name + + # Test + Stop-AzureWebsite $name + + # Assert + $website = Get-AzureWebsite $name -Slot Production + Assert-AreEqual $name $website.Name +} + +########################################################################### Restart-AzureWebsite Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests Restart-AzureWebsite happy path. +#> +function Test-RestartAzureWebsite +{ + # Setup + $name = Get-WebsiteName + New-AzureWebsite $name + + # Test + Restart-AzureWebsite $name + + # Assert + $website = Get-AzureWebsite $name -Slot Production + Assert-AreEqual "Running" $website.State +} + +########################################################################### Enable-AzureWebsiteApplicationDiagnostic Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests Enable-AzureWebsiteApplicationDiagnostic with storage table +#> +function Test-EnableApplicationDiagnosticOnTableStorage +{ + # Setup + $name = Get-WebsiteName + $storageName = $(Get-WebsiteName).ToLower() + $defaultLocation = Get-StorageDefaultLocation + New-AzureWebsite $name + New-AzureStorageAccount -ServiceName $storageName -Location $defaultLocation + + # Test + + Enable-AzureWebsiteApplicationDiagnostic -Name $name -TableStorage -LogLevel Warning -StorageAccountName $storageName + # Assert + $website = Get-AzureWebsite $name -Slot Production + Assert-True { $website.AzureTableTraceEnabled } + Assert-AreEqual Warning $website.AzureTableTraceLevel + Assert-True { $website.AppSettings.ContainsKey("DIAGNOSTICS_AZURETABLESASURL") } + + # Cleanup + Remove-AzureStorageAccount $storageName +} + +<# +.SYNOPSIS +Tests Enable-AzureWebsiteApplicationDiagnostic with blob storage +#> +function Test-EnableApplicationDiagnosticOnBlobStorage +{ + # Setup + $name = Get-WebsiteName + $storageName = $(Get-WebsiteName).ToLower() + $defaultLocation = Get-StorageDefaultLocation + New-AzureWebsite $name + New-AzureStorageAccount -ServiceName $storageName -Location $defaultLocation + + # Test + + Enable-AzureWebsiteApplicationDiagnostic -Name $name -BlobStorage -LogLevel Warning -StorageAccountName $storageName + # Assert + $website = Get-AzureWebsite $name -Slot Production + Assert-True { $website.AzureBlobTraceEnabled } + Assert-AreEqual Warning $website.AzureBlobTraceLevel + Assert-True { $website.AppSettings.ContainsKey("DIAGNOSTICS_AZUREBLOBCONTAINERSASURL") } + + # Cleanup + Remove-AzureStorageAccount $storageName +} + +<# +.SYNOPSIS +Tests Enable-AzureWebsiteApplicationDiagnostic with file system +#> +function Test-EnableApplicationDiagnosticOnFileSystem +{ + # Setup + $name = Get-WebsiteName + New-AzureWebsite $name + + # Test + Enable-AzureWebsiteApplicationDiagnostic -Name $name -File -LogLevel Warning + + # Assert + $website = Get-AzureWebsite $name -Slot Production + Assert-True { $website.AzureDriveTraceEnabled } + Assert-AreEqual Warning $website.AzureDriveTraceLevel +} + +<# +.SYNOPSIS +Tests Enable-AzureWebsiteApplicationDiagnostic when updating a log level and expects to pass. +#> +function Test-UpdateTheDiagnositicLogLevel +{ + # Setup + $name = Get-WebsiteName + New-AzureWebsite $name + Enable-AzureWebsiteApplicationDiagnostic -Name $name -File -LogLevel Verbose + + # Test + Enable-AzureWebsiteApplicationDiagnostic -Name $name -File -LogLevel Warning + + # Assert + $website = Get-AzureWebsite $name -Slot Production + Assert-True { $website.AzureDriveTraceEnabled } + Assert-AreEqual Warning $website.AzureDriveTraceLevel +} + +<# +.SYNOPSIS +Tests reconfiguring the table storage diagnostic settings information. +#> +function Test-ReconfigureStorageAppDiagnostics +{ + # Setup + $name = Get-WebsiteName + $storageName = $(Get-WebsiteName).ToLower() + $newStorageName = $(Get-WebsiteName).ToLower() + $defaultLocation = Get-StorageDefaultLocation + New-AzureWebsite $name + New-AzureStorageAccount -ServiceName $storageName -Location $defaultLocation + New-AzureStorageAccount -ServiceName $newStorageName -Location $defaultLocation + Enable-AzureWebsiteApplicationDiagnostic -Name $name -TableStorage -LogLevel Warning -StorageAccountName $storageName + + # Test + Enable-AzureWebsiteApplicationDiagnostic -Name $name -TableStorage -LogLevel Verbose -StorageAccountName $newStorageName + + # Assert + $website = Get-AzureWebsite $name -Slot Production + Assert-True { $website.AzureTableTraceEnabled } + Assert-AreEqual Verbose $website.AzureTableTraceLevel + Assert-True { $website.AppSettings.ContainsKey("DIAGNOSTICS_AZURETABLESASURL") } + + # Cleanup + Remove-AzureStorageAccount $storageName +} + +<# +.SYNOPSIS +Tests Enable-AzureWebsiteApplicationDiagnostic with not existing storage service. +#> +function Test-ThrowsForInvalidStorageAccountName +{ + # Setup + $name = Get-WebsiteName + New-AzureWebsite $name + + # Test + Assert-Throws { Enable-AzureWebsiteApplicationDiagnostic -Name $name -TableStorage -LogLevel Warning -StorageAccountName "notexsiting" } +} + +########################################################################### Disable-AzureWebsiteApplicationDiagnostic Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests Disable-AzureWebsiteApplicationDiagnostic with storage table +#> +function Test-DisableApplicationDiagnosticOnTableStorage +{ + # Setup + $name = Get-WebsiteName + $storageName = $(Get-WebsiteName).ToLower() + $defaultLocation = Get-StorageDefaultLocation + New-AzureWebsite $name + New-AzureStorageAccount -ServiceName $storageName -Location $defaultLocation + Enable-AzureWebsiteApplicationDiagnostic -Name $name -TableStorage -LogLevel Warning -StorageAccountName $storageName + + # Test + Disable-AzureWebsiteApplicationDiagnostic -Name $name -TableStorage + + # Assert + $website = Get-AzureWebsite $name -Slot Production + Assert-False { $website.AzureTableTraceEnabled } + Assert-AreEqual Warning $website.AzureTableTraceLevel + Assert-True { $website.AppSettings.ContainsKey("DIAGNOSTICS_AZURETABLESASURL") } + + # Cleanup + Remove-AzureStorageAccount $storageName +} + +<# +.SYNOPSIS +Tests Disable-AzureWebsiteApplicationDiagnostic with file system +#> +function Test-DisableApplicationDiagnosticOnFileSystem +{ + # Setup + $name = Get-WebsiteName + New-AzureWebsite $name + Enable-AzureWebsiteApplicationDiagnostic -Name $name -File -LogLevel Warning + + # Test + Disable-AzureWebsiteApplicationDiagnostic -Name $name -File + + # Assert + $website = Get-AzureWebsite $name -Slot Production + Assert-False { $website.AzureDriveTraceEnabled } + Assert-AreEqual Warning $website.AzureDriveTraceLevel +} + +<# +.SYNOPSIS +Tests Disable-AzureWebsiteApplicationDiagnostic with storage and file +#> +function Test-DisableApplicationDiagnosticOnTableStorageAndFile +{ + # Setup + $name = Get-WebsiteName + $storageName = $(Get-WebsiteName).ToLower() + $defaultLocation = Get-StorageDefaultLocation + New-AzureWebsite $name + New-AzureStorageAccount -ServiceName $storageName -Location $defaultLocation + Enable-AzureWebsiteApplicationDiagnostic -Name $name -TableStorage -LogLevel Warning -StorageAccountName $storageName + Enable-AzureWebsiteApplicationDiagnostic -Name $name -File -LogLevel Warning + + # Test + Disable-AzureWebsiteApplicationDiagnostic -Name $name -TableStorage -File + + # Assert + $website = Get-AzureWebsite $name -Slot Production + Assert-False { $website.AzureTableTraceEnabled } + Assert-False { $website.AzureDriveTraceEnabled } + Assert-True { $website.AppSettings.ContainsKey("DIAGNOSTICS_AZURETABLESASURL") } + + # Cleanup + Remove-AzureStorageAccount $storageName +} + +<# +.SYNOPSIS +Tests Disable-AzureWebsiteApplicationDiagnostic with file. Makes sure it disables file only. +#> +function Test-DisablesFileOnly +{ + # Setup + $name = Get-WebsiteName + $storageName = $(Get-WebsiteName).ToLower() + $defaultLocation = Get-StorageDefaultLocation + New-AzureWebsite $name + New-AzureStorageAccount -ServiceName $storageName -Location $defaultLocation + Enable-AzureWebsiteApplicationDiagnostic -Name $name -TableStorage -LogLevel Warning -StorageAccountName $storageName + Enable-AzureWebsiteApplicationDiagnostic -Name $name -File -LogLevel Verbose + + # Test + Disable-AzureWebsiteApplicationDiagnostic -Name $name -File + + # Assert + $website = Get-AzureWebsite $name -Slot Production + Assert-True { $website.AzureTableTraceEnabled } + Assert-False { $website.AzureDriveTraceEnabled } + Assert-True { $website.AppSettings.ContainsKey("DIAGNOSTICS_AZURETABLESASURL") } + + # Cleanup + Remove-AzureStorageAccount $storageName +} + +<# +.SYNOPSIS +Tests Disable-AzureWebsiteApplicationDiagnostic with file. Makes sure it disables storage only. +#> +function Test-DisablesStorageOnly +{ + # Setup + $name = Get-WebsiteName + $storageName = $(Get-WebsiteName).ToLower() + $defaultLocation = Get-StorageDefaultLocation + New-AzureWebsite $name + New-AzureStorageAccount -ServiceName $storageName -Location $defaultLocation + Enable-AzureWebsiteApplicationDiagnostic -Name $name -File -LogLevel Verbose + Enable-AzureWebsiteApplicationDiagnostic -Name $name -TableStorage -LogLevel Warning -StorageAccountName $storageName + + # Test + Disable-AzureWebsiteApplicationDiagnostic -Name $name -TableStorage + + # Assert + $website = Get-AzureWebsite $name -Slot Production + Assert-True { $website.AzureDriveTraceEnabled } + Assert-False { $website.AzureTableTraceEnabled } + Assert-True { $website.AppSettings.ContainsKey("DIAGNOSTICS_AZURETABLESASURL") } + + # Cleanup + Remove-AzureStorageAccount $storageName +} + +<# +.SYNOPSIS +Tests Disable-AzureWebsiteApplicationDiagnostic with file. Makes sure it disables storage and table. +#> +function Test-DisablesBothByDefault +{ + # Setup + $name = Get-WebsiteName + $storageName = $(Get-WebsiteName).ToLower() + $defaultLocation = Get-StorageDefaultLocation + New-AzureWebsite $name + New-AzureStorageAccount -ServiceName $storageName -Location $defaultLocation + Enable-AzureWebsiteApplicationDiagnostic -Name $name -TableStorage -LogLevel Warning -StorageAccountName $storageName + Enable-AzureWebsiteApplicationDiagnostic -Name $name -File -LogLevel Verbose + + # Test + Disable-AzureWebsiteApplicationDiagnostic -Name $name + + # Assert + $website = Get-AzureWebsite $name -Slot Production + Assert-False { $website.AzureTableTraceEnabled } + Assert-False { $website.AzureDriveTraceEnabled } + Assert-True { $website.AppSettings.ContainsKey("DIAGNOSTICS_AZURETABLESASURL") } + + # Cleanup + Remove-AzureStorageAccount $storageName +} + +########################################################################### Get-AzureWebsiteLocation Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests Get-AzureWebsiteLocation and expects to return valid websites. +#> +function Test-GetAzureWebsiteLocation +{ + # Test + $locations = Get-AzureWebsiteLocation; + + # Assert + Assert-NotNull { $locations } + Assert-True { $locations.Count -gt 0 } +} + +<# +.SYNOPSIS +Test Get-AzureWebsite list none +#> +function Test-GetAzureWebSiteListNone +{ + Get-AzureWebsite | Remove-AzureWebsite –Force + Assert-True { (Get-AzureWebsite) -eq $null} +} + +<# +.SYNOPSIS +Tests Get-AzureWebsite list all +#> +function Test-AzureWebSiteListAll +{ + #Setup + $name1 = Get-WebsiteName + $name2 = Get-WebsiteName + $name3 = Get-WebsiteName + + #Test + New-AzureWebsite $name1 + New-AzureWebsite $name2 + New-AzureWebsite $name3 + + $name = (Get-AzureWebsite).Name + Assert-True {$name.Contains($name1)} + Assert-True {$name.Contains($name2)} + Assert-True {$name.Contains($name3)} +} + +<# +.SYNOPSIS +Test Get-AzureWebsite show single site +#> +function Test-AzureWebSiteShowSingleSite +{ + # Setup + $name1 = Get-WebsiteName + $name2 = Get-WebsiteName + $name3 = Get-WebsiteName + + #Test + New-AzureWebsite $name1 + New-AzureWebsite $name2 + New-AzureWebsite $name3 + Assert-True { (Get-AzureWebsite $name1 -Slot Production).Name -eq $name1 } + Assert-True { (Get-AzureWebsite $name2 -Slot Production).Name -eq $name2 } + Assert-True { (Get-AzureWebsite $name3 -Slot Production).Name -eq $name3 } + + # Cleanup + Remove-AzureWebsite $name1 -Slot Production -Force + Remove-AzureWebsite $name2 -Slot Production -Force + Remove-AzureWebsite $name3 -Slot Production -Force +} + +########################################################################### Azurewebsite Git Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests New azure web site with git hub. +#> +function Test-NewAzureWebSiteMultipleCreds +{ + $ok = Assert-Env @("GIT_USERNAME", "GIT_PASSWORD") + + $GIT_USERNAME = $env:GIT_USERNAME + $GIT_PASSWORD = $env:GIT_PASSWORD + + # Setup + $siteName = Get-WebsiteName + Set-Location "\" + mkdir $siteName + Set-Location $siteName + + # Test + New-AzureWebsite $siteName -Git -PublishingUsername $GIT_USERNAME + $webSite = Get-AzureWebsite -Name $siteName -Slot Production + + # Verify publishingusername & publishingpassword in git remote + $webSite = Get-AzureWebsite -Name $siteName -Slot Production + $gitRemoteList = git remote -v + $expectedRemoteUri = "https://" + $GIT_USERNAME + "@" + $webSite.EnabledHostNames[1] + "/" + $webSite.Name + ".git" + Assert-True { $gitRemoteList[0].Contains($expectedRemoteUri)} + + # Install express + Npm-InstallExpress + + # Push local git to website + Git-PushLocalGitToWebSite $siteName + + # Verify browse website + $siteStatusRunning = Retry-Function { return (Get-AzureWebsite -Name $siteName -Slot Production).State -eq "Running" } $null 4 1 + $deploymentStatusSuccess = Retry-Function { return (Get-AzureWebSiteDeployment $siteName).Status.ToString() -eq "Success" } $null 8 2 + if (($siteStatusRunning -eq $true) -and ($deploymentStatusSuccess -eq $true)) + { + $url = "http://" + $webSite.EnabledHostNames[0] + $expectedString = "Welcome to Express" + Assert-True { Test-ValidateResultInBrowser ($url) $expectedString } + } + else + { + throw "Web site or git repository is not ready for browse" + } +} + +<# +.SYNOPSIS +Tests New azure web site with github. +#> +function Test-NewAzureWebSiteGitHubAllParms +{ + $ok = Assert-Env @("GITHUB_USERNAME", "GITHUB_PASSWORD") + + $GitHub_USERNAME = $env:GITHUB_USERNAME + $GitHub_PASSWORD = $env:GITHUB_PASSWORD + $GitHub_REPO = $env:GITHUB_USERNAME + "/WebChatDefault-0802" + + # Setup + $siteName = Get-WebsiteName + Set-Location "\" + mkdir $siteName + Set-Location $siteName + + # Test + $myCreds = New-Object "System.Management.Automation.PSCredential" ($GitHub_USERNAME, (ConvertTo-SecureString $GitHub_PASSWORD -AsPlainText -Force)) + $webSite = New-AzureWebsite $siteName -Location (Get-AzureWebsiteLocation)[0] -GitHub -GithubRepository $GitHub_REPO -GithubCredentials $myCreds + + $siteStatusRunning = Retry-Function { (Get-AzureWebsite -Name $siteName -Slot Production).State -eq "Running" } $null 4 2 + $deploymentStatusSuccess = Retry-Function { (Get-AzureWebSiteDeployment $siteName).Status.ToString() -eq "Success" } $null 8 3 + if (($siteStatusRunning -eq $true) -and ($deploymentStatusSuccess -eq $true)) + { + Assert-True { Test-ValidateResultInBrowser ("http://" + $WebSite.HostNames[0]) "0.8.3" } + } + else + { + throw "Web site or git repository is not ready for browse" + } + +} + +<# +.SYNOPSIS +Test New azure web site then update git deployment +#> +function Test-NewAzureWebSiteUpdateGit +{ + $ok = Assert-Env @("GIT_USERNAME", "GIT_PASSWORD") + $GIT_USERNAME = $env:GIT_USERNAME + $GIT_PASSWORD = $env:GIT_PASSWORD + + # Setup + $siteName = Get-WebsiteName + mkdir $siteName + Set-Location $siteName + + # Test + New-AzureWebSite $siteName + # Set the ErrorActionPreference as "SilentlyContinue" to work around "The website already exist" exception + $oldErrorActionPreferenceValue = $ErrorActionPreference + $ErrorActionPreference = "SilentlyContinue" + # Install express + Npm-InstallExpress + + New-AzureWebSite $siteName -Git -Publishingusername:$GIT_USERNAME + $ErrorActionPreference = $oldErrorActionPreferenceValue + + # Verify publishingusername & publishingpassword in git remote + $webSite = Get-AzureWebsite -Name $siteName -Slot Production + $gitRemoteList = git remote -v + $expectedRemoteUri = "https://" + $GIT_USERNAME + "@" + $webSite.EnabledHostNames[1] + "/" + $webSite.Name + ".git" + Assert-True { $gitRemoteList[0].Contains($expectedRemoteUri)} "failed to validate website app after deployment" + + + # Push local git to website + Git-PushLocalGitToWebSite $siteName + + # Verify browse website + $siteStatusRunning = Retry-Function { return (Get-AzureWebsite -Name $siteName -Slot Production).State -eq "Running" } $null 4 1 + $deploymentStatusSuccess = Retry-Function { return (Get-AzureWebSiteDeployment $siteName).Status.ToString() -eq "Success" } $null 8 2 + if (($siteStatusRunning -eq $true) -and ($deploymentStatusSuccess -eq $true)) + { + $url = "http://" + $webSite.EnabledHostNames[0] + $expectedString = "Welcome to Express" + Assert-True { Test-ValidateResultInBrowser ($url) $expectedString } + } + else + { + throw "Web site or git repository is not ready for browse" + } +} + +########################################################################### Set-AzureWebsite Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests Set-AzureWebsite cmdlet +#> +function Test-SetAzureWebsite +{ + # Setup + $name = Get-WebsiteName + New-AzureWebsite $name + + # Test + Set-AzureWebsite $name -Slot Production -ManagedPipelineMode Classic + Set-AzureWebsite $name -Slot Production -WebSocketsEnabled $true + + # Assert + $website = Get-AzureWebsite $name -Slot Production + Assert-AreEqual Classic $website.ManagedPipelineMode + Assert-AreEqual $true $website.WebSocketsEnabled +} + +########################################################################### Test-StartAzureWebsiteTriggeredJob Scenario Tests ########################################################################### +<# +.SYNOPSIS +Tests Start AzureWebsiteJob cmdlet using "triggered" job type +#> +function Test-StartAzureWebsiteTriggeredJob +{ + $ok = Assert-Env @("WEBJOB_FILE") + $webSiteName = Get-WebsiteName + $webSiteJobName = Get-WebsiteJobName + $jobType = "Triggered" + + # Setup + New-AzureWebsite $webSiteName + New-AzureWebsiteJob -Name $webSiteName -JobName $webSiteJobName -JobType $jobType -JobFile $env:WEBJOB_FILE + + # Test + $started = Start-AzureWebsiteJob -Name $webSiteName -JobName $webSiteJobName -JobType $jobType -PassThru + + #Assert + Assert-True{ $started } +} + +########################################################################### Test-StartAndStopAzureWebsiteContinuousJob Scenario Tests ########################################################################### +<# +.SYNOPSIS +Tests Start and stop AzureWebsiteJob cmdlet using "Continuous" job type +#> +function Test-StartAndStopAzureWebsiteContinuousJob +{ + $ok = Assert-Env @("WEBJOB_FILE") + $webSiteName = Get-WebsiteName + $webSiteJobName = Get-WebsiteJobName + $jobType = "Continuous" + # Setup + New-AzureWebsite $webSiteName + New-AzureWebsiteJob -Name $webSiteName -JobName $webSiteJobName -JobType $jobType -JobFile $env:WEBJOB_FILE + + # Make sure the job is initialized by polling the status + $waitScriptBlock = { (Get-AzureWebsiteJob -Name $webSiteName -JobName $webSiteJobName -JobType $jobType)[0].Status } + Wait-Function $waitScriptBlock "PendingRestart" + + # Test + + # First, test 'Stop' + $stopped = Stop-AzureWebsiteJob -Name $webSiteName -JobName $webSiteJobName -PassThru + + # Assert + Assert-True{ $stopped } + $jobStatus = Get-AzureWebsiteJob -Name $webSiteName -JobName $webSiteJobName -JobType $jobType + Assert-True { $jobStatus[0].Status -eq "Stopped" } + + # Then, test 'Start' + $started = Start-AzureWebsiteJob -Name $webSiteName -JobName $webSiteJobName -JobType $jobType -PassThru + + #Assert + Assert-True{ $started } + $jobStatus = Get-AzureWebsiteJob -Name $webSiteName -JobName $webSiteJobName -JobType $jobType + Assert-True { $jobStatus[0].Status -eq "PendingRestart" } + + # Clean up + Stop-AzureWebsiteJob -Name $webSiteName -JobName $webSiteJobName +} + + +########################################################################### Test-RemoveAzureWebsiteJob Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests Remove-AzureWebsiteJob cmdlet using 'Triggered' job type +#> +function Test-RemoveAzureWebsiteTriggeredJob +{ + $ok = Assert-Env @("WEBJOB_FILE") + $webSiteName = Get-WebsiteName + $webSiteJobName = Get-WebsiteJobName + + # Setup + New-AzureWebsite $webSiteName + + # Test + Test-CreateAndRemoveAJob $webSiteName $webSiteJobName Triggered $env:WEBJOB_FILE + +} + +<# +.SYNOPSIS +Tests Remove-AzureWebsiteJob cmdlet using 'Continuous' job type +#> +function Test-RemoveAzureWebsiteContinuousJob +{ + $ok = Assert-Env @("WEBJOB_FILE") + $webSiteName = Get-WebsiteName + $webSiteJobName = Get-WebsiteJobName + + # Setup + New-AzureWebsite $webSiteName + + # Test + Test-CreateAndRemoveAJob $webSiteName $webSiteJobName Continuous $env:WEBJOB_FILE + +} + +<# +.SYNOPSIS +Tests Remove-AzureWebsiteJob cmdlet using a job which doesn't exist +#> +function Test-RemoveNonExistingAzureWebsiteJob +{ + $webSiteName = Get-WebsiteName + $nonExistingWebSiteJobName = Get-WebsiteJobName + + # Setup + New-AzureWebsite $webSiteName + + # Test + Remove-AzureWebsiteJob -Name $webSiteName -JobName $nonExistingWebSiteJobName -JobType Triggered –Force + + Assert-True { $true } +} + +########################################################################### Get-AzureWebsiteJob Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests Get-AzureWebsiteJob cmdlet ability to get all webjob for a given website +#> +function Test-GettingWebsiteJobs +{ + $ok = Assert-Env @("WEBJOB_FILE") + $webSiteName = Get-WebsiteName + $location = Get-WebsiteDefaultLocation "North Central US" + $job1 = Get-WebsiteJobName + $job2 = Get-WebsiteJobName + $job3 = Get-WebsiteJobName + $job4 = Get-WebsiteJobName + + # Setup + New-AzureWebsite $webSiteName -Location $location + New-AzureWebsiteJob -Name $webSiteName -JobName $job1 -JobType Triggered -JobFile $env:WEBJOB_FILE + New-AzureWebsiteJob -Name $webSiteName -JobName $job2 -JobType Triggered -JobFile $env:WEBJOB_FILE + New-AzureWebsiteJob -Name $webSiteName -JobName $job3 -JobType Continuous -JobFile $env:WEBJOB_FILE + New-AzureWebsiteJob -Name $webSiteName -JobName $job4 -JobType Triggered -JobFile $env:WEBJOB_FILE + + # Test gets all web jobs + $webjobs = Get-AzureWebsiteJob -Name $webSiteName + + Assert-AreEqual 4 $webjobs.Count + + # Test gets only triggered + $webjobs = Get-AzureWebsiteJob -Name $webSiteName -JobType Triggered + + Assert-AreEqual 3 $webjobs.Count + + # Test gets specific job + $webjob = Get-AzureWebsiteJob -Name $webSiteName -JobType Triggered -JobName $job1 + + Assert-AreEqual $job1 $webjob.JobName + + # Test throws exception with non-existing job + Assert-Throws { Get-AzureWebsiteJob -Name $webSiteName -JobType Triggered -JobName "foo" } "Not Found" + + Assert-True { $true } +} + +########################################################################### Get-AzureWebsiteJobHistory Scenario Tests ########################################################################### + +<# +.SYNOPSIS +Tests Get-AzureWebsiteJobHistory functionality +#> +function Test-GettingJobHistory +{ + $ok = Assert-Env @("WEBJOB_FILE") + $webSiteName = Get-WebsiteName + $jobName = Get-WebsiteJobName + + # Setup + New-AzureWebsite $webSiteName + New-AzureWebsiteJob -Name $webSiteName -JobName $jobName -JobType Triggered -JobFile $env:WEBJOB_FILE + + # Test getting null run will work + $run = Get-AzureWebsiteJobHistory -Name $webSiteName -JobName $jobName -Latest + + Assert-Null $run + + # Setup + Start-AzureWebsiteJob -Name $webSiteName -JobName $jobName -JobType Triggered + Start-AzureWebsiteJob -Name $webSiteName -JobName $jobName -JobType Triggered + + # Test getting latest run will work + $run = Get-AzureWebsiteJobHistory -Name $webSiteName -JobName $jobName -Latest + $webjob = Get-AzureWebsiteJob -Name $webSiteName -JobName $jobName -JobType Triggered + + Assert-AreEqual $webjob.LatestRun.Id $run.Id + + # Setup + Start-AzureWebsiteJob -Name $webSiteName -JobName $jobName -JobType Triggered + Start-AzureWebsiteJob -Name $webSiteName -JobName $jobName -JobType Triggered + $runId = $webjob.LatestRun.Id + + # Test getting specific run will work + $run = Get-AzureWebsiteJobHistory -Name $webSiteName -JobName $jobName -RunId $runId + + Assert-AreEqual $runId $run.Id + + # Test listing complete history works + $runs = Get-AzureWebsiteJobHistory -Name $webSiteName -JobName $jobName + + Assert-AreEqual 4 $runs.Count +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/assetNames.json b/src/Common/Commands.ScenarioTest/Resources/assetNames.json new file mode 100644 index 000000000000..0880f0438717 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/assetNames.json @@ -0,0 +1 @@ +{"Test-CreatesNewSimpleResourceGroup":["onesdk9304"]} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/tipsf001.publishsettings b/src/Common/Commands.ScenarioTest/Resources/tipsf001.publishsettings new file mode 100644 index 000000000000..7464e792085c --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/tipsf001.publishsettings @@ -0,0 +1,17 @@ + + + + + + + + \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/tipsf002.publishsettings b/src/Common/Commands.ScenarioTest/Resources/tipsf002.publishsettings new file mode 100644 index 000000000000..ebf6f8020713 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/tipsf002.publishsettings @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/tipsf003.publishsettings b/src/Common/Commands.ScenarioTest/Resources/tipsf003.publishsettings new file mode 100644 index 000000000000..7b578d76863f --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Resources/tipsf003.publishsettings @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/Resources/tipsf004.publishsettings b/src/Common/Commands.ScenarioTest/Resources/tipsf004.publishsettings new file mode 100644 index 000000000000..643139d7b620 Binary files /dev/null and b/src/Common/Commands.ScenarioTest/Resources/tipsf004.publishsettings differ diff --git a/src/Common/Commands.ScenarioTest/Scheduler/SchedulerTests.cs b/src/Common/Commands.ScenarioTest/Scheduler/SchedulerTests.cs new file mode 100644 index 000000000000..1051882d468d --- /dev/null +++ b/src/Common/Commands.ScenarioTest/Scheduler/SchedulerTests.cs @@ -0,0 +1,62 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ScenarioTest.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Testing; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest +{ + public class SchedulerTests + { + private EnvironmentSetupHelper helper = new EnvironmentSetupHelper(); + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Scheduler)] + public void TestSchedulerEndToEnd() + { + this.RunPowerShellTest("Test-SchedulerEndToEnd"); + } + + protected void SetupManagementClients() + { + helper.SetupSomeOfManagementClients(); + } + + protected void RunPowerShellTest(params string[] scripts) + { + using (UndoContext context = UndoContext.Current) + { + context.Start(TestUtilities.GetCallingClass(1), TestUtilities.GetCurrentMethodName(2)); + + SetupManagementClients(); + + List modules = Directory.GetFiles("Resources\\Scheduler", "*.ps1").ToList(); + modules.Add("Common.ps1"); + + helper.SetupEnvironment(AzureModule.AzureServiceManagement); + helper.SetupModules(AzureModule.AzureServiceManagement, modules.ToArray()); + + helper.RunPowerShellTest(scripts); + } + } + } +} diff --git a/src/Common/Commands.ScenarioTest/ServiceBusTests/ServiceBusAuthorizationRuleTests.cs b/src/Common/Commands.ScenarioTest/ServiceBusTests/ServiceBusAuthorizationRuleTests.cs new file mode 100644 index 000000000000..52db65d29bb5 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/ServiceBusTests/ServiceBusAuthorizationRuleTests.cs @@ -0,0 +1,260 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ScenarioTest.Common; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.ServiceBusTests +{ + [TestClass] + public class ServiceBusAuthorizationRuleTests : AzurePowerShellCertificateTest + { + public ServiceBusAuthorizationRuleTests() + : base("ServiceBus\\Common.ps1", + "ServiceBus\\AuthorizationRuleScenarioTests.ps1") + { + + } + + #region New-AzureSBAuthorizationRule Scenario Tests + + /// + /// Test New-AzureSBAuthorizationRule when creating queue without passing any SAS keys. + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [TestCategory(Category.BVT)] + public void CreatesAuthorizationRuleWithoutKeys() + { + RunPowerShellTest("Test-CreatesAuthorizationRuleWithoutKeys"); + } + + /// + /// Test New-AzureSBAuthorizationRule when creating topic with passing just primary key. + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [TestCategory(Category.BVT)] + public void CreatesAuthorizationRuleWithPrimaryKey() + { + RunPowerShellTest("Test-CreatesAuthorizationRuleWithPrimaryKey"); + } + + /// + /// Test New-AzureSBAuthorizationRule when creating relay with passing primary and secondary key. + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + public void CreatesAuthorizationRuleWithPrimaryAndSecondaryKey() + { + RunPowerShellTest("Test-CreatesAuthorizationRuleWithPrimaryAndSecondaryKey"); + } + + /// + /// Test New-AzureSBAuthorizationRule on notification hub scope. + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [TestCategory(Category.BVT)] + public void CreatesAuthorizationRuleForNotificationHub() + { + RunPowerShellTest("Test-CreatesAuthorizationRuleForNotificationHub"); + } + + /// + /// Test New-AzureSBAuthorizationRule on namespace scope. + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [TestCategory(Category.BVT)] + public void CreatesAuthorizationRuleForNamespace() + { + RunPowerShellTest("Test-CreatesAuthorizationRuleForNamespace"); + } + + #endregion + + #region Set-AzureSBAuthorizationRule Scenario Tests + + /// + /// Test Set-AzureSBAuthorizationRule when creating queue and renewing primary key. + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [TestCategory(Category.BVT)] + public void SetsAuthorizationRuleRenewPrimaryKey() + { + RunPowerShellTest("Test-SetsAuthorizationRuleRenewPrimaryKey"); + } + + /// + /// Test Set-AzureSBAuthorizationRule when creating topic and setting secondary key. + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [TestCategory(Category.BVT)] + public void SetsAuthorizationRuleSecondaryKey() + { + RunPowerShellTest("Test-SetsAuthorizationRuleSecondaryKey"); + } + + /// + /// Test Set-AzureSBAuthorizationRule when creating notification hub and changing the permissions. + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [TestCategory(Category.BVT)] + public void SetsAuthorizationRuleForPermission() + { + RunPowerShellTest("Test-SetsAuthorizationRuleForPermission"); + } + + /// + /// Test Set-AzureSBAuthorizationRule on namespace level. + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [TestCategory(Category.BVT)] + public void SetsAuthorizationRuleOnNamespace() + { + RunPowerShellTest("Test-SetsAuthorizationRuleOnNamespace"); + } + + #endregion + + #region Remove-AzureSBNamespaceAuthoorizationRule Scenario Tests + + /// + /// Tests removing a namespace level authorization rule. + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [TestCategory(Category.BVT)] + public void RemovesNamespaceAuthorizationRule() + { + RunPowerShellTest("Test-RemovesNamespaceAuthorizationRule"); + } + + /// + /// Tests removing a queue entity authorization rule. + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [TestCategory(Category.BVT)] + public void RemovesQueueAuthorizationRule() + { + RunPowerShellTest("Test-RemovesQueueAuthorizationRule"); + } + + /// + /// Tests removing a topic entity authorization rule. + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [TestCategory(Category.BVT)] + public void RemovesTopicAuthorizationRule() + { + RunPowerShellTest("Test-RemovesTopicAuthorizationRule"); + } + + /// + /// Tests removing a relay entity authorization rule. + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + public void RemovesRelayAuthorizationRule() + { + RunPowerShellTest("Test-RemovesRelayAuthorizationRule"); + } + + /// + /// Tests removing a notification hub entity authorization rule. + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [TestCategory(Category.BVT)] + public void RemovesNotificationHubAuthorizationRule() + { + RunPowerShellTest("Test-RemovesNotificationHubAuthorizationRule"); + } + + #endregion + + #region Get-AzureSBAuthorizationRules Scenario Tests + + /// + /// Tests getting all authorization rules on a given namespace. + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [TestCategory(Category.BVT)] + public void GetsNamespaceAuthorizationRules() + { + RunPowerShellTest("Test-GetsNamespaceAuthorizationRules"); + } + + /// + /// Tests getting specific authorization rules on a queue. + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [TestCategory(Category.BVT)] + public void GetsQueueSpecificAuthorizationRule() + { + RunPowerShellTest("Test-GetsQueueSpecificAuthorizationRule"); + } + + /// + /// Tests getting all authorization rules on a notification hub filtered by Permission. + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [TestCategory(Category.BVT)] + public void FilterAuthorizationRulesByPermission() + { + RunPowerShellTest("Test-FilterAuthorizationRulesByPermission"); + } + + /// + /// Tests getting authorization rules on a topic that does not have any authorization rules. + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [TestCategory(Category.BVT)] + public void GetsEmptyListForTopic() + { + RunPowerShellTest("Test-GetsEmptyListForTopic"); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/ServiceBusTests/ServiceBusNamespaceTests.cs b/src/Common/Commands.ScenarioTest/ServiceBusTests/ServiceBusNamespaceTests.cs new file mode 100644 index 000000000000..e620543e7bc3 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/ServiceBusTests/ServiceBusNamespaceTests.cs @@ -0,0 +1,281 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ScenarioTest.Common; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.ServiceBusTests +{ + [TestClass] + public class ServiceBusNamespaceTests : AzurePowerShellCertificateTest + { + public ServiceBusNamespaceTests() + : base("ServiceBus\\Common.ps1", + "ServiceBus\\NamespaceScenarioTests.ps1") + { + + } + + #region Get-AzureSBLocation Scenario Tests + + /// + /// Test Get-AzureSBLocation with valid credentials. + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [TestCategory(Category.BVT)] + public void ListAzureSBLocationWithValidCredentials() + { + RunPowerShellTest("Test-ListAzureSBLocation"); + } + + /// + /// Tests using List-AzureSBLocation and piping it's output to New-AzureSBNamespace. + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [TestCategory(Category.BVT)] + public void TestListAzureSBLocation1() + { + RunPowerShellTest("Test-ListAzureSBLocation1"); + } + + #endregion + + #region Get-AzureSBNamespace Scenario Tests + + /// + /// Tests using Get-AzureSBNamespace cmdlet and expect to return empty collection + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [TestCategory(Category.BVT)] + public void TestGetAzureSBNamespaceWithEmptyNamespaces() + { + RunPowerShellTest("Test-GetAzureSBNamespaceWithEmptyNamespaces"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [TestCategory(Category.BVT)] + public void TestGetAzureSBNamespaceWithOneNamespace() + { + RunPowerShellTest("Test-GetAzureSBNamespaceWithOneNamespace"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [TestCategory(Category.BVT)] + public void TestGetAzureSBNamespaceWithMultipleNamespaces() + { + RunPowerShellTest("Test-GetAzureSBNamespaceWithMultipleNamespaces"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [TestCategory(Category.BVT)] + public void TestGetAzureSBNamespaceWithValidExisitingNamespace() + { + RunPowerShellTest("Test-GetAzureSBNamespaceWithValidExisitingNamespace"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [Ignore] // https://github.com/WindowsAzure/azure-sdk-tools/issues/1399 + public void TestGetAzureSBNamespaceWithValidNonExisitingNamespace() + { + RunPowerShellTest("Test-GetAzureSBNamespaceWithValidNonExisitingNamespace"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [TestCategory(Category.BVT)] + public void TestGetAzureSBNamespacePipedToRemoveAzureSBNamespace() + { + RunPowerShellTest("Test-GetAzureSBNamespacePipedToRemoveAzureSBNamespace"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [TestCategory(Category.BVT)] + public void TestGetAzureSBNamespaceWithWebsites() + { + RunPowerShellTest("Test-GetAzureSBNamespaceWithWebsites"); + } + + #endregion + + #region New-AzureSBNamespace Scenario Tests + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [TestCategory(Category.BVT)] + public void TestNewAzureSBNamespaceWithValidNewNamespace() + { + RunPowerShellTest("Test-NewAzureSBNamespaceWithValidNewNamespace"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [TestCategory(Category.WAPack)] + [TestCategory(Category.BVT)] + public void TestNewAzureSBNamespaceWithDefaultLocation() + { + RunPowerShellTest("Test-NewAzureSBNamespaceWithDefaultLocation"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [TestCategory(Category.WAPack)] + [Ignore] // https://github.com/WindowsAzure/azure-sdk-tools/issues/1400 + public void TestNewAzureSBNamespaceWithValidExistingNamespace() + { + RunPowerShellTest("Test-NewAzureSBNamespaceWithValidExistingNamespace"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + public void TestNewAzureSBNamespaceWithInvalidLocation() + { + RunPowerShellTest("Test-NewAzureSBNamespaceWithInvalidLocation"); + } + + /// + /// This scenario test does the following: + /// * Generates new name. + /// * Uses Test-AzureName to make sure name is available + /// * Runs Get-AzureSBLocation and pick default location object. + /// * Creates new namespace. + /// * Waits until it's status is Active + /// * Setup website environment variable using Set-AzureWebsite -AppSettings + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [TestCategory(Category.BVT)] + public void TestNewAzureSBNamespaceWithWebsite() + { + RunPowerShellTest("Test-NewAzureSBNamespaceWithWebsite"); + } + + #endregion + + #region Remove-AzureSBNamespace Scenario Tests + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + public void TestRemoveAzureSBNamespaceWithExistingNamespace() + { + RunPowerShellTest("Test-RemoveAzureSBNamespaceWithExistingNamespace"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [Ignore] // https://github.com/WindowsAzure/azure-sdk-tools/issues/1401 + public void TestRemoveAzureSBNamespaceWithNonExistingNamespace() + { + RunPowerShellTest("Test-RemoveAzureSBNamespaceWithNonExistingNamespace"); + } + + /// + /// This test does the following: + /// * Generate namespace name. + /// * Uses Test-AzureName to make sure it's available + /// * Waits for it's status to be 'Active' + /// * Pipe it's value to Remove-AzureSBNamespace + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [TestCategory(Category.BVT)] + public void TestRemoveAzureSBNamespaceInputPiping() + { + RunPowerShellTest("Test-RemoveAzureSBNamespaceInputPiping"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [TestCategory(Category.BVT)] + public void TestRemoveAzureSBNamespaceWhatIf() + { + RunPowerShellTest("Test-RemoveAzureSBNamespaceWhatIf"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + public void TestRemoveAzureSBNamespaceWhatIfError() + { + RunPowerShellTest("Test-RemoveAzureSBNamespaceWhatIfError"); + } + + #endregion + + #region General Service Bus Scenario Tests + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [TestCategory(Category.BVT)] + public void TestGetAzureSBLocationWithInvalidCredentials() + { + RunPowerShellTest("Test-WithInvalidCredentials {Get-AzureSBLocation}"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [TestCategory(Category.BVT)] + public void TestGetAzureSBNamespaceWithInvalidCredentials() + { + RunPowerShellTest("Test-WithInvalidCredentials {Get-AzureSBNamespace}"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [TestCategory(Category.BVT)] + public void TestNewAzureSBNamespaceWithInvalidCredentials() + { + RunPowerShellTest("Test-WithInvalidCredentials {New-AzureSBNamespace $(Get-NamespaceName) $(Get-DefaultServiceBusLocation)}"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceBus)] + [TestCategory(Category.BVT)] + public void TestRemoveAzureSBNamespaceWithInvalidCredentials() + { + RunPowerShellTest("Test-WithInvalidCredentials {Remove-AzureSBNamespace \"AnyName\" -Force }"); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/ServiceManagement/VMProvisionScenarioTests.cs b/src/Common/Commands.ScenarioTest/ServiceManagement/VMProvisionScenarioTests.cs new file mode 100644 index 000000000000..c31e99ebd6f6 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/ServiceManagement/VMProvisionScenarioTests.cs @@ -0,0 +1,65 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ScenarioTest.Common; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.Properties; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.ServiceManagemenet +{ + [TestClass] + public class VMProvisionScenarioTests : AzurePowerShellCertificateTest + { + public VMProvisionScenarioTests() + : base("CloudService\\Common.ps1", + "ServiceManagement\\Common.ps1", + "ServiceManagement\\VMProvisionTests.ps1" + ) + { + + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.ServiceManagement)] + [TestProperty("Feature", "IaaS"), Priority(1), Owner("priya"), Description("Test the cmdlets (New-AzureQuickVM,Get-AzureVMImage,Get-AzureVM,Get-AzureLocation,Import-AzurePublishSettingsFile,Get-AzureSubscription,Set-AzureSubscription)")] + [Ignore] // https://github.com/WindowsAzure/azure-sdk-tools/issues/1402 + public void NewWindowsAzureQuickVM() + { + powershell.Invoke(); + + ServiceManagementCmdletTestHelper vmPowershellCmdlets = new ServiceManagementCmdletTestHelper(); + + string imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows" }, false); + string locationName = vmPowershellCmdlets.GetAzureLocationName(new[] { Resource.Location }); + + string newAzureQuickVMName = ServiceManagement.Test.FunctionalTests.Utilities.GetUniqueShortName("PSTestVM"); + string newAzureQuickVMSvcName = ServiceManagement.Test.FunctionalTests.Utilities.GetUniqueShortName("PSTestService"); + + vmPowershellCmdlets.NewAzureQuickVM(OS.Windows, newAzureQuickVMName, newAzureQuickVMSvcName, imageName, "pstestuser", "p@ssw0rd", locationName); + + // Verify + PersistentVMRoleContext vmRoleCtxt = vmPowershellCmdlets.GetAzureVM(newAzureQuickVMName, newAzureQuickVMSvcName); + Assert.AreEqual(newAzureQuickVMName, vmRoleCtxt.Name, true); + + // Cleanup + vmPowershellCmdlets.RemoveAzureVM(newAzureQuickVMName, newAzureQuickVMSvcName); + + Assert.AreEqual(null, vmPowershellCmdlets.GetAzureVM(newAzureQuickVMName, newAzureQuickVMSvcName)); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.AutomationTests/TestAutomationConfigureRunbook.json b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.AutomationTests/TestAutomationConfigureRunbook.json new file mode 100644 index 000000000000..644e05526ba2 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.AutomationTests/TestAutomationConfigureRunbook.json @@ -0,0 +1,3290 @@ +{ + "Entries": [ + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices?resourceType=AutomationAccount&detailLevel=Full&resourceProviderNamespace=automation", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "\r\n \r\n OaaSCSMJZ4AGUOA5SDKKDLDMOVNQHWHCSXMDQM2D3WXNGHPTXHETYQYXGQ-East-US\r\n \r\n OaaSCSMJZ4AGUOA5SDKKDLDMOVNQHWHCSXMDQM2D3WXNGHPTXHETYQYXGQ-East-US in East US\r\n East US\r\n \r\n \r\n automation\r\n AutomationAccount\r\n AutomationAccount\r\n Preview\r\n 1.1\r\n 56b96e88-0643-4d6c-9cee-8a2d88fb496c\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n automation\r\n AutomationAccount\r\n TestAutomationAccount\r\n Preview\r\n 1.1\r\n 5f56af82-3751-46a2-9ebb-3959bbb26de2\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "b38ab77b5c12ccdfb715fa6a7947538f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:19:09 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks\",\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "eaaf74e56fdac269b29e320b725bc9c4" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:19:10 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=yhvfdawwlwydpn5kuyxrtszh; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookVersions?api-version=2014-03-13_Preview", + "RequestMethod": "POST", + "RequestBody": "workflow Write-DebugAndVerboseOutput\r\n{\r\n \"output message\"\r\n write-debug -message \"debug message\"\r\n write-verbose -message \"verbose message\"\r\n}", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#RunbookVersions/@Element\",\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'9a041f46-f05d-4ac0-bc67-4d47caff86b4')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"odata.mediaETag\": \"\\\"635433780498630000\\\"\",\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"RunbookVersionID\": \"9a041f46-f05d-4ac0-bc67-4d47caff86b4\",\r\n \"RunbookID\": \"00000000-0000-0000-0000-000000000000\",\r\n \"VersionNumber\": 0,\r\n \"IsDraft\": false,\r\n \"CreationTime\": \"0001-01-01T00:00:00\",\r\n \"LastModifiedTime\": \"0001-01-01T00:00:00\"\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-location": [ + "https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/RunbookVersions(guid'9a041f46-f05d-4ac0-bc67-4d47caff86b4')" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "77a265d9eceac60aa54e03f15a001acc" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:20:50 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=wpljf1d2wnvk1er2gw2w1oss; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookVersions(guid'9a041f46-f05d-4ac0-bc67-4d47caff86b4')?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#RunbookVersions/@Element\",\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'9a041f46-f05d-4ac0-bc67-4d47caff86b4')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"odata.mediaETag\": \"\\\"635433780498630000\\\"\",\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"RunbookVersionID\": \"9a041f46-f05d-4ac0-bc67-4d47caff86b4\",\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"VersionNumber\": 1,\r\n \"IsDraft\": true,\r\n \"CreationTime\": \"2014-08-11T18:20:49.863\",\r\n \"LastModifiedTime\": \"2014-08-11T18:20:49.863\"\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d660c2457d5ac55b97e824f249eef869" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:20:51 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'2f527682-cb7d-49eb-973e-11630291ee0e')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Publish\": {},\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\",\r\n \"CreationTime\": \"2014-08-11T18:20:49.863\",\r\n \"LastModifiedTime\": \"2014-08-11T18:20:49.863\",\r\n \"LastModifiedBy\": null,\r\n \"Description\": null,\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": null,\r\n \"DraftRunbookVersionID\": \"9a041f46-f05d-4ac0-bc67-4d47caff86b4\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "abd8d53797eac830ba94b27353fe20fd" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:20:51 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'2f527682-cb7d-49eb-973e-11630291ee0e')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Publish\": {},\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\",\r\n \"CreationTime\": \"2014-08-11T18:20:49.863\",\r\n \"LastModifiedTime\": \"2014-08-11T18:20:52.56\",\r\n \"LastModifiedBy\": null,\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": null,\r\n \"DraftRunbookVersionID\": \"9a041f46-f05d-4ac0-bc67-4d47caff86b4\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9dd97f085d39cff8a7dec60492711374" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:20:53 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'2f527682-cb7d-49eb-973e-11630291ee0e')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Publish\": {},\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\",\r\n \"CreationTime\": \"2014-08-11T18:20:49.863\",\r\n \"LastModifiedTime\": \"2014-08-11T18:20:52.56\",\r\n \"LastModifiedBy\": null,\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": null,\r\n \"DraftRunbookVersionID\": \"9a041f46-f05d-4ac0-bc67-4d47caff86b4\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a9782871fa03cfdd8f4cdfe616c751ef" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:20:54 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'2f527682-cb7d-49eb-973e-11630291ee0e')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\",\r\n \"CreationTime\": \"2014-08-11T18:20:49.863\",\r\n \"LastModifiedTime\": \"2014-08-11T18:20:54.747\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"b41d5340-74f8-4e6b-b0d9-008912725823\",\r\n \"DraftRunbookVersionID\": null,\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8703b6a9f76ec872b6893cdbfc78a482" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:20:55 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'2f527682-cb7d-49eb-973e-11630291ee0e')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\",\r\n \"CreationTime\": \"2014-08-11T18:20:49.863\",\r\n \"LastModifiedTime\": \"2014-08-11T18:20:57.32\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"b41d5340-74f8-4e6b-b0d9-008912725823\",\r\n \"DraftRunbookVersionID\": null,\r\n \"Tags\": null,\r\n \"LogDebug\": true,\r\n \"LogVerbose\": true,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d4c20b5485a5c53a8c88469d091320e6" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:20:57 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'2f527682-cb7d-49eb-973e-11630291ee0e')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\",\r\n \"CreationTime\": \"2014-08-11T18:20:49.863\",\r\n \"LastModifiedTime\": \"2014-08-11T18:20:57.32\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"b41d5340-74f8-4e6b-b0d9-008912725823\",\r\n \"DraftRunbookVersionID\": null,\r\n \"Tags\": null,\r\n \"LogDebug\": true,\r\n \"LogVerbose\": true,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d052169927cfcc49ac1fa686fa1cdd18" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:21:00 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=qxztximd51eucv4kusunrd50; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'2f527682-cb7d-49eb-973e-11630291ee0e')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\",\r\n \"CreationTime\": \"2014-08-11T18:20:49.863\",\r\n \"LastModifiedTime\": \"2014-08-11T18:21:55.873\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"b41d5340-74f8-4e6b-b0d9-008912725823\",\r\n \"DraftRunbookVersionID\": null,\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": true\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "4fdeb88c4570c52ebded08101ffad0c6" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:21:56 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'2f527682-cb7d-49eb-973e-11630291ee0e')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\",\r\n \"CreationTime\": \"2014-08-11T18:20:49.863\",\r\n \"LastModifiedTime\": \"2014-08-11T18:21:55.873\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"b41d5340-74f8-4e6b-b0d9-008912725823\",\r\n \"DraftRunbookVersionID\": null,\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": true\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ae8f63992644c7d28d5795fd57446f35" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:21:58 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'2f527682-cb7d-49eb-973e-11630291ee0e')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\"odata.error\":{\"code\":\"\",\"message\":{\"lang\":\"en-US\",\"value\":\"Resource not found for the segment 'Runbooks'.\"}}}", + "ResponseHeaders": { + "Date": [ + "Mon, 11 Aug 2014 18:23:07 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'2f527682-cb7d-49eb-973e-11630291ee0e')?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"#OrchestratorApi.Publish\": {},\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\",\r\n \"CreationTime\": \"2014-08-11T18:20:49.863\",\r\n \"LastModifiedTime\": \"2014-08-11T18:20:49.863\",\r\n \"LastModifiedBy\": null,\r\n \"Description\": null,\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": null,\r\n \"DraftRunbookVersionID\": \"9a041f46-f05d-4ac0-bc67-4d47caff86b4\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "7b1235cf76d6c27ab50d79293242af66" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:20:52 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'2f527682-cb7d-49eb-973e-11630291ee0e')?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\",\r\n \"CreationTime\": \"2014-08-11T18:20:49.863\",\r\n \"LastModifiedTime\": \"2014-08-11T18:20:54.747\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"b41d5340-74f8-4e6b-b0d9-008912725823\",\r\n \"DraftRunbookVersionID\": null,\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "0184b796f2d1cff6ba58ec3a0e07fde9" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:20:56 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=bdxzpaftafbjvgl3fkmmejlb; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'2f527682-cb7d-49eb-973e-11630291ee0e')?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\",\r\n \"CreationTime\": \"2014-08-11T18:20:49.863\",\r\n \"LastModifiedTime\": \"2014-08-11T18:20:57.32\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"b41d5340-74f8-4e6b-b0d9-008912725823\",\r\n \"DraftRunbookVersionID\": null,\r\n \"Tags\": null,\r\n \"LogDebug\": true,\r\n \"LogVerbose\": true,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "349ab446a921cb239d5c3083528854de" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:21:55 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=pupchrk1ki3mqlnxv4mkltpk; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'2f527682-cb7d-49eb-973e-11630291ee0e')?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\",\r\n \"CreationTime\": \"2014-08-11T18:20:49.863\",\r\n \"LastModifiedTime\": \"2014-08-11T18:21:55.873\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"b41d5340-74f8-4e6b-b0d9-008912725823\",\r\n \"DraftRunbookVersionID\": null,\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": true\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "5efcaf91e1a0cd6a82b806e17083c675" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:22:51 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=mtlhyjiewvc51ucrjddo0yl4; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'2f527682-cb7d-49eb-973e-11630291ee0e')?api-version=2014-03-13_Preview", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\",\r\n \"CreationTime\": \"2014-08-11T18:20:49.863\",\r\n \"LastModifiedTime\": \"2014-08-11T18:20:49.863\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"DraftRunbookVersionID\": \"9a041f46-f05d-4ac0-bc67-4d47caff86b4\",\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false,\r\n \"Schedules\": []\r\n}", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9e6d9da63ee4cc5ba74aea1b02242137" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:20:52 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'2f527682-cb7d-49eb-973e-11630291ee0e')?api-version=2014-03-13_Preview", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\",\r\n \"CreationTime\": \"2014-08-11T18:20:49.863\",\r\n \"LastModifiedTime\": \"2014-08-11T18:20:54.747\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"b41d5340-74f8-4e6b-b0d9-008912725823\",\r\n \"LogDebug\": true,\r\n \"LogVerbose\": true,\r\n \"LogProgress\": false,\r\n \"Schedules\": []\r\n}", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9248d61b6934c4d49e09d46e2335d449" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:20:57 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'2f527682-cb7d-49eb-973e-11630291ee0e')?api-version=2014-03-13_Preview", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\",\r\n \"CreationTime\": \"2014-08-11T18:20:49.863\",\r\n \"LastModifiedTime\": \"2014-08-11T18:20:57.32\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"b41d5340-74f8-4e6b-b0d9-008912725823\",\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": true,\r\n \"Schedules\": []\r\n}", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c098814072d0c0cb9c8cea26fa6cc94e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:21:55 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'2f527682-cb7d-49eb-973e-11630291ee0e')/Publish?api-version=2014-03-13_Preview", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-automation-client-request-user-identity": [ + "PowerShell" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Edm.Guid\",\r\n \"value\": \"b41d5340-74f8-4e6b-b0d9-008912725823\"\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "87dbc00020c1cebca87675980ee2a5a9" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:20:54 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=jw42s02ias4zgahioqmosdsb; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks?$filter=RunbookName%20eq%20'Write-DebugAndVerboseOutput'&$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks\",\r\n \"value\": [\r\n {\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Publish\": {},\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\",\r\n \"CreationTime\": \"2014-08-11T18:20:49.863\",\r\n \"LastModifiedTime\": \"2014-08-11T18:20:57.32\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"b41d5340-74f8-4e6b-b0d9-008912725823\",\r\n \"DraftRunbookVersionID\": null,\r\n \"Tags\": null,\r\n \"LogDebug\": true,\r\n \"LogVerbose\": true,\r\n \"LogProgress\": false\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "bf1bc78db5dcc16790d57250be218502" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:20:59 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=lhp53wqc4bptoqe52ofid2np; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks?$filter=RunbookName%20eq%20'Write-DebugAndVerboseOutput'&$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks\",\r\n \"value\": [\r\n {\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Publish\": {},\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\",\r\n \"CreationTime\": \"2014-08-11T18:20:49.863\",\r\n \"LastModifiedTime\": \"2014-08-11T18:21:55.873\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"b41d5340-74f8-4e6b-b0d9-008912725823\",\r\n \"DraftRunbookVersionID\": null,\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": true\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "43a926832b75c25d8f093bda7a451b14" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:23:06 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=wxh0hiajzjejatjkpm23hmvs; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookParameters?$filter=RunbookVersionID%20eq%20guid'b41d5340-74f8-4e6b-b0d9-008912725823'&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#RunbookParameters\",\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "3b4ce8742aa5c97ba8b9c49afe69562e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:21:00 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookParameters?$filter=RunbookVersionID%20eq%20guid'b41d5340-74f8-4e6b-b0d9-008912725823'&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#RunbookParameters\",\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "aaa479642026c7049c7a3a9443a32133" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:21:59 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'2f527682-cb7d-49eb-973e-11630291ee0e')/Start?api-version=2014-03-13_Preview", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"parameters\": [\r\n {\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\"\r\n }\r\n ]\r\n}", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Edm.Guid\",\r\n \"value\": \"bc87f6df-0dab-490b-96a1-5279c94491a4\"\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b4c63072d019c79cb366ad282d5a871c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:21:01 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'2f527682-cb7d-49eb-973e-11630291ee0e')/Start?api-version=2014-03-13_Preview", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"parameters\": [\r\n {\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\"\r\n }\r\n ]\r\n}", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Edm.Guid\",\r\n \"value\": \"82b6fb1c-5ae0-432d-9a6f-9022d249b798\"\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "2f4dcbdc839eccce87ed0ea7c3a5e977" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:22:00 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'bc87f6df-0dab-490b-96a1-5279c94491a4')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'bc87f6df-0dab-490b-96a1-5279c94491a4')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'b41d5340-74f8-4e6b-b0d9-008912725823')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"213f077e-70ba-4532-b0c3-ba6ede8824f7\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"bc87f6df-0dab-490b-96a1-5279c94491a4\",\r\n \"JobContextID\": \"213f077e-70ba-4532-b0c3-ba6ede8824f7\",\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"JobStatus\": \"Activating\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": null,\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-08-11T18:21:01.493\",\r\n \"LastModifiedTime\": \"2014-08-11T18:21:07.877\",\r\n \"LastStatusModifiedTime\": \"2014-08-11T18:21:07.877\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "bb6351be29eccc75a05ccc55306b0cfc" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:21:13 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'bc87f6df-0dab-490b-96a1-5279c94491a4')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'bc87f6df-0dab-490b-96a1-5279c94491a4')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'b41d5340-74f8-4e6b-b0d9-008912725823')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"213f077e-70ba-4532-b0c3-ba6ede8824f7\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"bc87f6df-0dab-490b-96a1-5279c94491a4\",\r\n \"JobContextID\": \"213f077e-70ba-4532-b0c3-ba6ede8824f7\",\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"JobStatus\": \"Activating\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": null,\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-08-11T18:21:01.493\",\r\n \"LastModifiedTime\": \"2014-08-11T18:21:07.877\",\r\n \"LastStatusModifiedTime\": \"2014-08-11T18:21:07.877\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "265ad34f26cbcdbaa399c68437eccd77" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:21:20 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=avuwlfsnaioyodznxp3hor1b; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'bc87f6df-0dab-490b-96a1-5279c94491a4')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'bc87f6df-0dab-490b-96a1-5279c94491a4')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'b41d5340-74f8-4e6b-b0d9-008912725823')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"213f077e-70ba-4532-b0c3-ba6ede8824f7\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"bc87f6df-0dab-490b-96a1-5279c94491a4\",\r\n \"JobContextID\": \"213f077e-70ba-4532-b0c3-ba6ede8824f7\",\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"JobStatus\": \"Activating\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": null,\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-08-11T18:21:01.493\",\r\n \"LastModifiedTime\": \"2014-08-11T18:21:07.877\",\r\n \"LastStatusModifiedTime\": \"2014-08-11T18:21:07.877\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "3ac0226c2567c59bb95365f5ec9ec9de" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:21:28 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=oa3gt0ifmbzkhszjdfj5kydi; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'bc87f6df-0dab-490b-96a1-5279c94491a4')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'bc87f6df-0dab-490b-96a1-5279c94491a4')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'b41d5340-74f8-4e6b-b0d9-008912725823')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"213f077e-70ba-4532-b0c3-ba6ede8824f7\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"bc87f6df-0dab-490b-96a1-5279c94491a4\",\r\n \"JobContextID\": \"213f077e-70ba-4532-b0c3-ba6ede8824f7\",\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"JobStatus\": \"Running\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": \"2014-08-11T18:21:35.83\",\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-08-11T18:21:01.493\",\r\n \"LastModifiedTime\": \"2014-08-11T18:21:35.83\",\r\n \"LastStatusModifiedTime\": \"2014-08-11T18:21:35.83\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "56e33faf8641ca91b5c298f942ab0116" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:21:36 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=4sjpxqq0mjydhbic4llo4b2l; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'bc87f6df-0dab-490b-96a1-5279c94491a4')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'bc87f6df-0dab-490b-96a1-5279c94491a4')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'b41d5340-74f8-4e6b-b0d9-008912725823')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"213f077e-70ba-4532-b0c3-ba6ede8824f7\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"bc87f6df-0dab-490b-96a1-5279c94491a4\",\r\n \"JobContextID\": \"213f077e-70ba-4532-b0c3-ba6ede8824f7\",\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"JobStatus\": \"Completed\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": \"2014-08-11T18:21:35.83\",\r\n \"EndTime\": \"2014-08-11T18:21:39.367\",\r\n \"CreationTime\": \"2014-08-11T18:21:01.493\",\r\n \"LastModifiedTime\": \"2014-08-11T18:21:39.367\",\r\n \"LastStatusModifiedTime\": \"2014-08-11T18:21:39.367\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f051379027a3ccf198e5ede5c34a74e2" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:21:39 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=zfdagz5h05a3qjfbqt5kzdp5; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'bc87f6df-0dab-490b-96a1-5279c94491a4')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'bc87f6df-0dab-490b-96a1-5279c94491a4')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'b41d5340-74f8-4e6b-b0d9-008912725823')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"213f077e-70ba-4532-b0c3-ba6ede8824f7\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"bc87f6df-0dab-490b-96a1-5279c94491a4\",\r\n \"JobContextID\": \"213f077e-70ba-4532-b0c3-ba6ede8824f7\",\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"JobStatus\": \"Completed\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": \"2014-08-11T18:21:35.83\",\r\n \"EndTime\": \"2014-08-11T18:21:39.367\",\r\n \"CreationTime\": \"2014-08-11T18:21:01.493\",\r\n \"LastModifiedTime\": \"2014-08-11T18:21:39.367\",\r\n \"LastStatusModifiedTime\": \"2014-08-11T18:21:39.367\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "47dc74d47ef5c314a95c543f69fde2a8" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:21:41 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=mgxnixsflesb1w4bsamrxz3f; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'bc87f6df-0dab-490b-96a1-5279c94491a4')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'bc87f6df-0dab-490b-96a1-5279c94491a4')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'b41d5340-74f8-4e6b-b0d9-008912725823')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"213f077e-70ba-4532-b0c3-ba6ede8824f7\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"bc87f6df-0dab-490b-96a1-5279c94491a4\",\r\n \"JobContextID\": \"213f077e-70ba-4532-b0c3-ba6ede8824f7\",\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"JobStatus\": \"Completed\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": \"2014-08-11T18:21:35.83\",\r\n \"EndTime\": \"2014-08-11T18:21:39.367\",\r\n \"CreationTime\": \"2014-08-11T18:21:01.493\",\r\n \"LastModifiedTime\": \"2014-08-11T18:21:39.367\",\r\n \"LastStatusModifiedTime\": \"2014-08-11T18:21:39.367\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "67cb51ce7aedcfb6b052587bb6ed111b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:21:46 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=sfl4aadf2c30hlxjvzrbgllv; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'bc87f6df-0dab-490b-96a1-5279c94491a4')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'bc87f6df-0dab-490b-96a1-5279c94491a4')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'b41d5340-74f8-4e6b-b0d9-008912725823')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"213f077e-70ba-4532-b0c3-ba6ede8824f7\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"bc87f6df-0dab-490b-96a1-5279c94491a4\",\r\n \"JobContextID\": \"213f077e-70ba-4532-b0c3-ba6ede8824f7\",\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"JobStatus\": \"Completed\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": \"2014-08-11T18:21:35.83\",\r\n \"EndTime\": \"2014-08-11T18:21:39.367\",\r\n \"CreationTime\": \"2014-08-11T18:21:01.493\",\r\n \"LastModifiedTime\": \"2014-08-11T18:21:39.367\",\r\n \"LastStatusModifiedTime\": \"2014-08-11T18:21:39.367\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "63b63a2b7176c496a3a689f9a611c431" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:21:51 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=rkocxeyf0enostbeakx5l1en; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'bc87f6df-0dab-490b-96a1-5279c94491a4')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'bc87f6df-0dab-490b-96a1-5279c94491a4')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'b41d5340-74f8-4e6b-b0d9-008912725823')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"213f077e-70ba-4532-b0c3-ba6ede8824f7\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"bc87f6df-0dab-490b-96a1-5279c94491a4\",\r\n \"JobContextID\": \"213f077e-70ba-4532-b0c3-ba6ede8824f7\",\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"JobStatus\": \"Completed\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": \"2014-08-11T18:21:35.83\",\r\n \"EndTime\": \"2014-08-11T18:21:39.367\",\r\n \"CreationTime\": \"2014-08-11T18:21:01.493\",\r\n \"LastModifiedTime\": \"2014-08-11T18:21:39.367\",\r\n \"LastStatusModifiedTime\": \"2014-08-11T18:21:39.367\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f6777205cbd6c3519e1023b4e59d5e87" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:21:54 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=21u2qzg2rv4ls3c0z5a0xann; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/JobStreams/GetStreamItems?jobId='bc87f6df-0dab-490b-96a1-5279c94491a4'&streamsCreatedSinceDateTime='1%2F1%2F0001%208:00:00%20AM'&$filter=StreamTypeName%20eq%20'Output'&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/OrchestratorStreamService.svc/2014_03_13/$metadata#Stream\",\r\n \"value\": [\r\n {\r\n \"JobId\": \"bc87f6df-0dab-490b-96a1-5279c94491a4\",\r\n \"NameValues\": [\r\n {\r\n \"Name\": \"value\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"output message\"\r\n },\r\n {\r\n \"Name\": \"PSComputerName\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"localhost\"\r\n },\r\n {\r\n \"Name\": \"PSShowComputerName\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"True\"\r\n },\r\n {\r\n \"Name\": \"PSSourceJobInstanceId\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"bc87f6df-0dab-490b-96a1-5279c94491a4\"\r\n }\r\n ],\r\n \"RunbookVersionId\": \"b41d5340-74f8-4e6b-b0d9-008912725823\",\r\n \"StreamTypeName\": \"Output\",\r\n \"AccountId\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"StreamTime\": \"2014-08-11T18:21:38.6810762Z\",\r\n \"StreamText\": \"output message\\r\\n\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "89622febfa63c315bc4c412831856331" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:21:41 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/JobStreams/GetStreamItems?jobId='bc87f6df-0dab-490b-96a1-5279c94491a4'&streamsCreatedSinceDateTime='1%2F1%2F0001%208:00:00%20AM'&$filter=StreamTypeName%20eq%20'Debug'&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/OrchestratorStreamService.svc/2014_03_13/$metadata#Stream\",\r\n \"value\": [\r\n {\r\n \"JobId\": \"bc87f6df-0dab-490b-96a1-5279c94491a4\",\r\n \"NameValues\": [\r\n {\r\n \"Name\": \"Message\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"bc87f6df-0dab-490b-96a1-5279c94491a4:[localhost]:debug message\"\r\n },\r\n {\r\n \"Name\": \"InvocationInfo\",\r\n \"NameValueInner\": [\r\n {\r\n \"Name\": \"MyCommand\",\r\n \"NameValueInner\": [\r\n {\r\n \"Name\": \"Verb\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"Write\"\r\n },\r\n {\r\n \"Name\": \"Noun\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"Debug\"\r\n },\r\n {\r\n \"Name\": \"HelpFile\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"Microsoft.PowerShell.Commands.Utility.dll-Help.xml\"\r\n },\r\n {\r\n \"Name\": \"PSSnapIn\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"Microsoft.PowerShell.Utility\"\r\n },\r\n {\r\n \"Name\": \"ImplementingType\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"Microsoft.PowerShell.Commands.WriteDebugCommand\"\r\n },\r\n {\r\n \"Name\": \"Definition\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"\\r\\nWrite-Debug [-Message] []\\r\\n\"\r\n },\r\n {\r\n \"Name\": \"DefaultParameterSet\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"null\"\r\n },\r\n {\r\n \"Name\": \"OutputType\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"\"\r\n },\r\n {\r\n \"Name\": \"Options\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"1\"\r\n },\r\n {\r\n \"Name\": \"Name\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"Write-Debug\"\r\n },\r\n {\r\n \"Name\": \"CommandType\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"8\"\r\n },\r\n {\r\n \"Name\": \"Visibility\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"0\"\r\n },\r\n {\r\n \"Name\": \"ModuleName\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"Microsoft.PowerShell.Utility\"\r\n },\r\n {\r\n \"Name\": \"Module\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"null\"\r\n },\r\n {\r\n \"Name\": \"RemotingCapability\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"0\"\r\n },\r\n {\r\n \"Name\": \"Parameters\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"System.Collections.Generic.Dictionary`2[System.String,System.Management.Automation.ParameterMetadata]\"\r\n },\r\n {\r\n \"Name\": \"ParameterSets\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"[-Message] []\"\r\n }\r\n ],\r\n \"Value\": \"Dictionary\"\r\n },\r\n {\r\n \"Name\": \"BoundParameters\",\r\n \"NameValueInner\": [\r\n {\r\n \"Name\": \"Message\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"debug message\"\r\n },\r\n {\r\n \"Name\": \"Verbose\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"True\"\r\n },\r\n {\r\n \"Name\": \"Debug\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"True\"\r\n }\r\n ],\r\n \"Value\": \"Dictionary\"\r\n },\r\n {\r\n \"Name\": \"ScriptLineNumber\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"0\"\r\n },\r\n {\r\n \"Name\": \"OffsetInLine\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"0\"\r\n },\r\n {\r\n \"Name\": \"HistoryId\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"1\"\r\n },\r\n {\r\n \"Name\": \"ScriptName\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"\"\r\n },\r\n {\r\n \"Name\": \"Line\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"\"\r\n },\r\n {\r\n \"Name\": \"PositionMessage\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"\"\r\n },\r\n {\r\n \"Name\": \"PSScriptRoot\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"\"\r\n },\r\n {\r\n \"Name\": \"PSCommandPath\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"null\"\r\n },\r\n {\r\n \"Name\": \"InvocationName\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"Microsoft.PowerShell.Utility\\\\Write-Debug\"\r\n },\r\n {\r\n \"Name\": \"PipelineLength\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"1\"\r\n },\r\n {\r\n \"Name\": \"PipelinePosition\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"1\"\r\n },\r\n {\r\n \"Name\": \"ExpectingInput\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"False\"\r\n },\r\n {\r\n \"Name\": \"CommandOrigin\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"0\"\r\n },\r\n {\r\n \"Name\": \"DisplayScriptPosition\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"null\"\r\n }\r\n ],\r\n \"Value\": \"Dictionary\"\r\n },\r\n {\r\n \"Name\": \"PipelineIterationInfo\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"0\"\r\n },\r\n {\r\n \"Name\": \"PipelineIterationInfo\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"1\"\r\n }\r\n ],\r\n \"RunbookVersionId\": \"b41d5340-74f8-4e6b-b0d9-008912725823\",\r\n \"StreamTypeName\": \"Debug\",\r\n \"AccountId\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"StreamTime\": \"2014-08-11T18:21:39.2317351Z\",\r\n \"StreamText\": \"bc87f6df-0dab-490b-96a1-5279c94491a4:[localhost]:debug message\\r\\n\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "0ad3cddece1bc445919b01981ff590da" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:21:46 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/JobStreams/GetStreamItems?jobId='bc87f6df-0dab-490b-96a1-5279c94491a4'&streamsCreatedSinceDateTime='1%2F1%2F0001%208:00:00%20AM'&$filter=StreamTypeName%20eq%20'Verbose'&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/OrchestratorStreamService.svc/2014_03_13/$metadata#Stream\",\r\n \"value\": [\r\n {\r\n \"JobId\": \"bc87f6df-0dab-490b-96a1-5279c94491a4\",\r\n \"NameValues\": [\r\n {\r\n \"Name\": \"Message\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"bc87f6df-0dab-490b-96a1-5279c94491a4:[localhost]:verbose message\"\r\n },\r\n {\r\n \"Name\": \"InvocationInfo\",\r\n \"NameValueInner\": [\r\n {\r\n \"Name\": \"MyCommand\",\r\n \"NameValueInner\": [\r\n {\r\n \"Name\": \"Verb\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"Write\"\r\n },\r\n {\r\n \"Name\": \"Noun\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"Verbose\"\r\n },\r\n {\r\n \"Name\": \"HelpFile\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"Microsoft.PowerShell.Commands.Utility.dll-Help.xml\"\r\n },\r\n {\r\n \"Name\": \"PSSnapIn\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"Microsoft.PowerShell.Utility\"\r\n },\r\n {\r\n \"Name\": \"ImplementingType\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"Microsoft.PowerShell.Commands.WriteVerboseCommand\"\r\n },\r\n {\r\n \"Name\": \"Definition\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"\\r\\nWrite-Verbose [-Message] []\\r\\n\"\r\n },\r\n {\r\n \"Name\": \"DefaultParameterSet\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"null\"\r\n },\r\n {\r\n \"Name\": \"OutputType\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"\"\r\n },\r\n {\r\n \"Name\": \"Options\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"1\"\r\n },\r\n {\r\n \"Name\": \"Name\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"Write-Verbose\"\r\n },\r\n {\r\n \"Name\": \"CommandType\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"8\"\r\n },\r\n {\r\n \"Name\": \"Visibility\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"0\"\r\n },\r\n {\r\n \"Name\": \"ModuleName\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"Microsoft.PowerShell.Utility\"\r\n },\r\n {\r\n \"Name\": \"Module\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"null\"\r\n },\r\n {\r\n \"Name\": \"RemotingCapability\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"0\"\r\n },\r\n {\r\n \"Name\": \"Parameters\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"System.Collections.Generic.Dictionary`2[System.String,System.Management.Automation.ParameterMetadata]\"\r\n },\r\n {\r\n \"Name\": \"ParameterSets\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"[-Message] []\"\r\n }\r\n ],\r\n \"Value\": \"Dictionary\"\r\n },\r\n {\r\n \"Name\": \"BoundParameters\",\r\n \"NameValueInner\": [\r\n {\r\n \"Name\": \"Message\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"verbose message\"\r\n },\r\n {\r\n \"Name\": \"Verbose\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"True\"\r\n },\r\n {\r\n \"Name\": \"Debug\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"True\"\r\n }\r\n ],\r\n \"Value\": \"Dictionary\"\r\n },\r\n {\r\n \"Name\": \"ScriptLineNumber\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"0\"\r\n },\r\n {\r\n \"Name\": \"OffsetInLine\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"0\"\r\n },\r\n {\r\n \"Name\": \"HistoryId\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"1\"\r\n },\r\n {\r\n \"Name\": \"ScriptName\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"\"\r\n },\r\n {\r\n \"Name\": \"Line\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"\"\r\n },\r\n {\r\n \"Name\": \"PositionMessage\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"\"\r\n },\r\n {\r\n \"Name\": \"PSScriptRoot\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"\"\r\n },\r\n {\r\n \"Name\": \"PSCommandPath\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"null\"\r\n },\r\n {\r\n \"Name\": \"InvocationName\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"Microsoft.PowerShell.Utility\\\\Write-Verbose\"\r\n },\r\n {\r\n \"Name\": \"PipelineLength\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"1\"\r\n },\r\n {\r\n \"Name\": \"PipelinePosition\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"1\"\r\n },\r\n {\r\n \"Name\": \"ExpectingInput\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"False\"\r\n },\r\n {\r\n \"Name\": \"CommandOrigin\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"0\"\r\n },\r\n {\r\n \"Name\": \"DisplayScriptPosition\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"null\"\r\n }\r\n ],\r\n \"Value\": \"Dictionary\"\r\n },\r\n {\r\n \"Name\": \"PipelineIterationInfo\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"0\"\r\n },\r\n {\r\n \"Name\": \"PipelineIterationInfo\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"1\"\r\n }\r\n ],\r\n \"RunbookVersionId\": \"b41d5340-74f8-4e6b-b0d9-008912725823\",\r\n \"StreamTypeName\": \"Verbose\",\r\n \"AccountId\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"StreamTime\": \"2014-08-11T18:21:39.2785985Z\",\r\n \"StreamText\": \"bc87f6df-0dab-490b-96a1-5279c94491a4:[localhost]:verbose message\\r\\n\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c68a5bab9b0fc9f28eddbc831b25a99e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:21:50 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=guvmldnbd31tokjje0sqjkcm; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/JobStreams/GetStreamItems?jobId='bc87f6df-0dab-490b-96a1-5279c94491a4'&streamsCreatedSinceDateTime='1%2F1%2F0001%208:00:00%20AM'&$filter=StreamTypeName%20eq%20'Progress'&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/OrchestratorStreamService.svc/2014_03_13/$metadata#Stream\",\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a45eea098213c4b3a7c9b87a325ab8f0" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:21:55 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks?$filter=RunbookName%20eq%20'Write-DebugAndVerboseOutput'&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks\",\r\n \"value\": [\r\n {\r\n \"#OrchestratorApi.Publish\": {},\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\",\r\n \"CreationTime\": \"2014-08-11T18:20:49.863\",\r\n \"LastModifiedTime\": \"2014-08-11T18:21:55.873\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"b41d5340-74f8-4e6b-b0d9-008912725823\",\r\n \"DraftRunbookVersionID\": null,\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": true\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "4b25ec577c7ccc73b9630f4c268ef082" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:21:58 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=i4rt25lods4om343w0qvi0sv; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'82b6fb1c-5ae0-432d-9a6f-9022d249b798')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'82b6fb1c-5ae0-432d-9a6f-9022d249b798')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'b41d5340-74f8-4e6b-b0d9-008912725823')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"37b02a9a-b398-4c3b-830e-01b0ff9502df\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"82b6fb1c-5ae0-432d-9a6f-9022d249b798\",\r\n \"JobContextID\": \"37b02a9a-b398-4c3b-830e-01b0ff9502df\",\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"JobStatus\": \"Activating\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": null,\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-08-11T18:22:00.2\",\r\n \"LastModifiedTime\": \"2014-08-11T18:22:04.05\",\r\n \"LastStatusModifiedTime\": \"2014-08-11T18:22:04.05\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "5e8b2bfa7615ca9f92f041ab6983bb17" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:22:12 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'82b6fb1c-5ae0-432d-9a6f-9022d249b798')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'82b6fb1c-5ae0-432d-9a6f-9022d249b798')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'b41d5340-74f8-4e6b-b0d9-008912725823')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"37b02a9a-b398-4c3b-830e-01b0ff9502df\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"82b6fb1c-5ae0-432d-9a6f-9022d249b798\",\r\n \"JobContextID\": \"37b02a9a-b398-4c3b-830e-01b0ff9502df\",\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"JobStatus\": \"Activating\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": null,\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-08-11T18:22:00.2\",\r\n \"LastModifiedTime\": \"2014-08-11T18:22:04.05\",\r\n \"LastStatusModifiedTime\": \"2014-08-11T18:22:04.05\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "1756bb9e6f60cd74beb0007a8b1845cf" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:22:17 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=j1vtim5nqrb4gginnyo2uwyt; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'82b6fb1c-5ae0-432d-9a6f-9022d249b798')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'82b6fb1c-5ae0-432d-9a6f-9022d249b798')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'b41d5340-74f8-4e6b-b0d9-008912725823')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"37b02a9a-b398-4c3b-830e-01b0ff9502df\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"82b6fb1c-5ae0-432d-9a6f-9022d249b798\",\r\n \"JobContextID\": \"37b02a9a-b398-4c3b-830e-01b0ff9502df\",\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"JobStatus\": \"Activating\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": null,\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-08-11T18:22:00.2\",\r\n \"LastModifiedTime\": \"2014-08-11T18:22:04.05\",\r\n \"LastStatusModifiedTime\": \"2014-08-11T18:22:04.05\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "4d75f8169d1ac42a8cd8623b4f1b7c68" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:22:24 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=c1ymjnv22ofgver1t0hadf4s; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'82b6fb1c-5ae0-432d-9a6f-9022d249b798')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'82b6fb1c-5ae0-432d-9a6f-9022d249b798')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'b41d5340-74f8-4e6b-b0d9-008912725823')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"37b02a9a-b398-4c3b-830e-01b0ff9502df\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"82b6fb1c-5ae0-432d-9a6f-9022d249b798\",\r\n \"JobContextID\": \"37b02a9a-b398-4c3b-830e-01b0ff9502df\",\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"JobStatus\": \"Activating\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": null,\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-08-11T18:22:00.2\",\r\n \"LastModifiedTime\": \"2014-08-11T18:22:04.05\",\r\n \"LastStatusModifiedTime\": \"2014-08-11T18:22:04.05\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "dc46a20d97f7c7579bf30ee8e19f9ce4" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:22:31 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=e4t3nc5baeas55pi1eg4cbio; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'82b6fb1c-5ae0-432d-9a6f-9022d249b798')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'82b6fb1c-5ae0-432d-9a6f-9022d249b798')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'b41d5340-74f8-4e6b-b0d9-008912725823')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"37b02a9a-b398-4c3b-830e-01b0ff9502df\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"82b6fb1c-5ae0-432d-9a6f-9022d249b798\",\r\n \"JobContextID\": \"37b02a9a-b398-4c3b-830e-01b0ff9502df\",\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"JobStatus\": \"Running\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": \"2014-08-11T18:22:33.57\",\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-08-11T18:22:00.2\",\r\n \"LastModifiedTime\": \"2014-08-11T18:22:33.57\",\r\n \"LastStatusModifiedTime\": \"2014-08-11T18:22:33.57\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "814a807c8951cd12864e129719511630" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:22:36 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=xmbmmtvkdu3lp0fgasi1xasr; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'82b6fb1c-5ae0-432d-9a6f-9022d249b798')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'82b6fb1c-5ae0-432d-9a6f-9022d249b798')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'b41d5340-74f8-4e6b-b0d9-008912725823')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"37b02a9a-b398-4c3b-830e-01b0ff9502df\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"82b6fb1c-5ae0-432d-9a6f-9022d249b798\",\r\n \"JobContextID\": \"37b02a9a-b398-4c3b-830e-01b0ff9502df\",\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"JobStatus\": \"Completed\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": \"2014-08-11T18:22:33.57\",\r\n \"EndTime\": \"2014-08-11T18:22:36.847\",\r\n \"CreationTime\": \"2014-08-11T18:22:00.2\",\r\n \"LastModifiedTime\": \"2014-08-11T18:22:36.847\",\r\n \"LastStatusModifiedTime\": \"2014-08-11T18:22:36.847\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "2f99af1bb01dcf5590f34436109f153d" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:22:42 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=lk0n4zac2phyiari4w3bywp0; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'82b6fb1c-5ae0-432d-9a6f-9022d249b798')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'82b6fb1c-5ae0-432d-9a6f-9022d249b798')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'b41d5340-74f8-4e6b-b0d9-008912725823')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"37b02a9a-b398-4c3b-830e-01b0ff9502df\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"82b6fb1c-5ae0-432d-9a6f-9022d249b798\",\r\n \"JobContextID\": \"37b02a9a-b398-4c3b-830e-01b0ff9502df\",\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"JobStatus\": \"Completed\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": \"2014-08-11T18:22:33.57\",\r\n \"EndTime\": \"2014-08-11T18:22:36.847\",\r\n \"CreationTime\": \"2014-08-11T18:22:00.2\",\r\n \"LastModifiedTime\": \"2014-08-11T18:22:36.847\",\r\n \"LastStatusModifiedTime\": \"2014-08-11T18:22:36.847\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "6e0c03a60c6bc6aeae849476a2477f0a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:22:43 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=zv3dszwvfwfyuib3i3hyzfdt; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'82b6fb1c-5ae0-432d-9a6f-9022d249b798')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'82b6fb1c-5ae0-432d-9a6f-9022d249b798')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'b41d5340-74f8-4e6b-b0d9-008912725823')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"37b02a9a-b398-4c3b-830e-01b0ff9502df\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"82b6fb1c-5ae0-432d-9a6f-9022d249b798\",\r\n \"JobContextID\": \"37b02a9a-b398-4c3b-830e-01b0ff9502df\",\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"JobStatus\": \"Completed\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": \"2014-08-11T18:22:33.57\",\r\n \"EndTime\": \"2014-08-11T18:22:36.847\",\r\n \"CreationTime\": \"2014-08-11T18:22:00.2\",\r\n \"LastModifiedTime\": \"2014-08-11T18:22:36.847\",\r\n \"LastStatusModifiedTime\": \"2014-08-11T18:22:36.847\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a1e69813d10ec999a41e577ba603672d" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:22:47 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=3xktzvtmg4tymiaucb3u5dg2; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'82b6fb1c-5ae0-432d-9a6f-9022d249b798')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'82b6fb1c-5ae0-432d-9a6f-9022d249b798')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'b41d5340-74f8-4e6b-b0d9-008912725823')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"37b02a9a-b398-4c3b-830e-01b0ff9502df\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"82b6fb1c-5ae0-432d-9a6f-9022d249b798\",\r\n \"JobContextID\": \"37b02a9a-b398-4c3b-830e-01b0ff9502df\",\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"JobStatus\": \"Completed\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": \"2014-08-11T18:22:33.57\",\r\n \"EndTime\": \"2014-08-11T18:22:36.847\",\r\n \"CreationTime\": \"2014-08-11T18:22:00.2\",\r\n \"LastModifiedTime\": \"2014-08-11T18:22:36.847\",\r\n \"LastStatusModifiedTime\": \"2014-08-11T18:22:36.847\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "10817d4c4e1dc90aab0a1af8beece34d" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:22:48 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=rycbqeza3nqq3r0iqkfcbgcs; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/JobStreams/GetStreamItems?jobId='82b6fb1c-5ae0-432d-9a6f-9022d249b798'&streamsCreatedSinceDateTime='1%2F1%2F0001%208:00:00%20AM'&$filter=StreamTypeName%20eq%20'Progress'&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/OrchestratorStreamService.svc/2014_03_13/$metadata#Stream\",\r\n \"value\": [\r\n {\r\n \"JobId\": \"82b6fb1c-5ae0-432d-9a6f-9022d249b798\",\r\n \"NameValues\": [\r\n {\r\n \"Name\": \"ActivityId\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"0\"\r\n },\r\n {\r\n \"Name\": \"ParentActivityId\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"-1\"\r\n },\r\n {\r\n \"Name\": \"Activity\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"Write-Output\"\r\n },\r\n {\r\n \"Name\": \"StatusDescription\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"Running\"\r\n },\r\n {\r\n \"Name\": \"CurrentOperation\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"82b6fb1c-5ae0-432d-9a6f-9022d249b798:[localhost]:1.13: Write-DebugAndVerboseOutput line:3 char:3\"\r\n },\r\n {\r\n \"Name\": \"PercentComplete\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"-1\"\r\n },\r\n {\r\n \"Name\": \"SecondsRemaining\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"-1\"\r\n },\r\n {\r\n \"Name\": \"RecordType\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"0\"\r\n }\r\n ],\r\n \"RunbookVersionId\": \"b41d5340-74f8-4e6b-b0d9-008912725823\",\r\n \"StreamTypeName\": \"Progress\",\r\n \"AccountId\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"StreamTime\": \"2014-08-11T18:22:35.6268917Z\",\r\n \"StreamText\": \"\\r\\n\\r\\nActivityId : 0\\r\\nParentActivityId : -1\\r\\nActivity : Write-Output\\r\\nStatusDescription : Running\\r\\nCurrentOperation : 82b6fb1c-5ae0-432d-9a6f-9022d249b798:[localhost]:1.13: Write-DebugAndVerboseOutput line:3 char:3\\r\\nPercentComplete : -1\\r\\nSecondsRemaining : -1\\r\\nRecordType : Processing\\r\\n\\r\\n\\r\\n\\r\\n\"\r\n },\r\n {\r\n \"JobId\": \"82b6fb1c-5ae0-432d-9a6f-9022d249b798\",\r\n \"NameValues\": [\r\n {\r\n \"Name\": \"ActivityId\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"0\"\r\n },\r\n {\r\n \"Name\": \"ParentActivityId\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"-1\"\r\n },\r\n {\r\n \"Name\": \"Activity\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"Write-Output\"\r\n },\r\n {\r\n \"Name\": \"StatusDescription\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"Completed\"\r\n },\r\n {\r\n \"Name\": \"CurrentOperation\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"82b6fb1c-5ae0-432d-9a6f-9022d249b798:[localhost]:1.13: Write-DebugAndVerboseOutput line:3 char:3\"\r\n },\r\n {\r\n \"Name\": \"PercentComplete\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"-1\"\r\n },\r\n {\r\n \"Name\": \"SecondsRemaining\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"-1\"\r\n },\r\n {\r\n \"Name\": \"RecordType\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"1\"\r\n }\r\n ],\r\n \"RunbookVersionId\": \"b41d5340-74f8-4e6b-b0d9-008912725823\",\r\n \"StreamTypeName\": \"Progress\",\r\n \"AccountId\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"StreamTime\": \"2014-08-11T18:22:36.5670808Z\",\r\n \"StreamText\": \"\\r\\n\\r\\nActivityId : 0\\r\\nParentActivityId : -1\\r\\nActivity : Write-Output\\r\\nStatusDescription : Completed\\r\\nCurrentOperation : 82b6fb1c-5ae0-432d-9a6f-9022d249b798:[localhost]:1.13: Write-DebugAndVerboseOutput line:3 char:3\\r\\nPercentComplete : -1\\r\\nSecondsRemaining : -1\\r\\nRecordType : Completed\\r\\n\\r\\n\\r\\n\\r\\n\"\r\n },\r\n {\r\n \"JobId\": \"82b6fb1c-5ae0-432d-9a6f-9022d249b798\",\r\n \"NameValues\": [\r\n {\r\n \"Name\": \"ActivityId\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"0\"\r\n },\r\n {\r\n \"Name\": \"ParentActivityId\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"-1\"\r\n },\r\n {\r\n \"Name\": \"Activity\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"Write-Debug\"\r\n },\r\n {\r\n \"Name\": \"StatusDescription\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"Running\"\r\n },\r\n {\r\n \"Name\": \"CurrentOperation\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"82b6fb1c-5ae0-432d-9a6f-9022d249b798:[localhost]:1.8: Write-DebugAndVerboseOutput line:4 char:4\"\r\n },\r\n {\r\n \"Name\": \"PercentComplete\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"-1\"\r\n },\r\n {\r\n \"Name\": \"SecondsRemaining\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"-1\"\r\n },\r\n {\r\n \"Name\": \"RecordType\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"0\"\r\n }\r\n ],\r\n \"RunbookVersionId\": \"b41d5340-74f8-4e6b-b0d9-008912725823\",\r\n \"StreamTypeName\": \"Progress\",\r\n \"AccountId\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"StreamTime\": \"2014-08-11T18:22:36.6295844Z\",\r\n \"StreamText\": \"\\r\\n\\r\\nActivityId : 0\\r\\nParentActivityId : -1\\r\\nActivity : Write-Debug\\r\\nStatusDescription : Running\\r\\nCurrentOperation : 82b6fb1c-5ae0-432d-9a6f-9022d249b798:[localhost]:1.8: Write-DebugAndVerboseOutput line:4 char:4\\r\\nPercentComplete : -1\\r\\nSecondsRemaining : -1\\r\\nRecordType : Processing\\r\\n\\r\\n\\r\\n\\r\\n\"\r\n },\r\n {\r\n \"JobId\": \"82b6fb1c-5ae0-432d-9a6f-9022d249b798\",\r\n \"NameValues\": [\r\n {\r\n \"Name\": \"ActivityId\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"0\"\r\n },\r\n {\r\n \"Name\": \"ParentActivityId\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"-1\"\r\n },\r\n {\r\n \"Name\": \"Activity\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"Write-Debug\"\r\n },\r\n {\r\n \"Name\": \"StatusDescription\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"Completed\"\r\n },\r\n {\r\n \"Name\": \"CurrentOperation\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"82b6fb1c-5ae0-432d-9a6f-9022d249b798:[localhost]:1.8: Write-DebugAndVerboseOutput line:4 char:4\"\r\n },\r\n {\r\n \"Name\": \"PercentComplete\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"-1\"\r\n },\r\n {\r\n \"Name\": \"SecondsRemaining\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"-1\"\r\n },\r\n {\r\n \"Name\": \"RecordType\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"1\"\r\n }\r\n ],\r\n \"RunbookVersionId\": \"b41d5340-74f8-4e6b-b0d9-008912725823\",\r\n \"StreamTypeName\": \"Progress\",\r\n \"AccountId\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"StreamTime\": \"2014-08-11T18:22:36.6608217Z\",\r\n \"StreamText\": \"\\r\\n\\r\\nActivityId : 0\\r\\nParentActivityId : -1\\r\\nActivity : Write-Debug\\r\\nStatusDescription : Completed\\r\\nCurrentOperation : 82b6fb1c-5ae0-432d-9a6f-9022d249b798:[localhost]:1.8: Write-DebugAndVerboseOutput line:4 char:4\\r\\nPercentComplete : -1\\r\\nSecondsRemaining : -1\\r\\nRecordType : Completed\\r\\n\\r\\n\\r\\n\\r\\n\"\r\n },\r\n {\r\n \"JobId\": \"82b6fb1c-5ae0-432d-9a6f-9022d249b798\",\r\n \"NameValues\": [\r\n {\r\n \"Name\": \"ActivityId\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"0\"\r\n },\r\n {\r\n \"Name\": \"ParentActivityId\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"-1\"\r\n },\r\n {\r\n \"Name\": \"Activity\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"Write-Verbose\"\r\n },\r\n {\r\n \"Name\": \"StatusDescription\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"Running\"\r\n },\r\n {\r\n \"Name\": \"CurrentOperation\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"82b6fb1c-5ae0-432d-9a6f-9022d249b798:[localhost]:1.3: Write-DebugAndVerboseOutput line:5 char:5\"\r\n },\r\n {\r\n \"Name\": \"PercentComplete\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"-1\"\r\n },\r\n {\r\n \"Name\": \"SecondsRemaining\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"-1\"\r\n },\r\n {\r\n \"Name\": \"RecordType\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"0\"\r\n }\r\n ],\r\n \"RunbookVersionId\": \"b41d5340-74f8-4e6b-b0d9-008912725823\",\r\n \"StreamTypeName\": \"Progress\",\r\n \"AccountId\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"StreamTime\": \"2014-08-11T18:22:36.6764574Z\",\r\n \"StreamText\": \"\\r\\n\\r\\nActivityId : 0\\r\\nParentActivityId : -1\\r\\nActivity : Write-Verbose\\r\\nStatusDescription : Running\\r\\nCurrentOperation : 82b6fb1c-5ae0-432d-9a6f-9022d249b798:[localhost]:1.3: Write-DebugAndVerboseOutput line:5 char:5\\r\\nPercentComplete : -1\\r\\nSecondsRemaining : -1\\r\\nRecordType : Processing\\r\\n\\r\\n\\r\\n\\r\\n\"\r\n },\r\n {\r\n \"JobId\": \"82b6fb1c-5ae0-432d-9a6f-9022d249b798\",\r\n \"NameValues\": [\r\n {\r\n \"Name\": \"ActivityId\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"0\"\r\n },\r\n {\r\n \"Name\": \"ParentActivityId\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"-1\"\r\n },\r\n {\r\n \"Name\": \"Activity\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"Write-Verbose\"\r\n },\r\n {\r\n \"Name\": \"StatusDescription\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"Completed\"\r\n },\r\n {\r\n \"Name\": \"CurrentOperation\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"82b6fb1c-5ae0-432d-9a6f-9022d249b798:[localhost]:1.3: Write-DebugAndVerboseOutput line:5 char:5\"\r\n },\r\n {\r\n \"Name\": \"PercentComplete\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"-1\"\r\n },\r\n {\r\n \"Name\": \"SecondsRemaining\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"-1\"\r\n },\r\n {\r\n \"Name\": \"RecordType\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"1\"\r\n }\r\n ],\r\n \"RunbookVersionId\": \"b41d5340-74f8-4e6b-b0d9-008912725823\",\r\n \"StreamTypeName\": \"Progress\",\r\n \"AccountId\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"StreamTime\": \"2014-08-11T18:22:36.7076986Z\",\r\n \"StreamText\": \"\\r\\n\\r\\nActivityId : 0\\r\\nParentActivityId : -1\\r\\nActivity : Write-Verbose\\r\\nStatusDescription : Completed\\r\\nCurrentOperation : 82b6fb1c-5ae0-432d-9a6f-9022d249b798:[localhost]:1.3: Write-DebugAndVerboseOutput line:5 char:5\\r\\nPercentComplete : -1\\r\\nSecondsRemaining : -1\\r\\nRecordType : Completed\\r\\n\\r\\n\\r\\n\\r\\n\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "088bb9480650ca1c992ef61cd1d40aa3" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:22:44 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/JobStreams/GetStreamItems?jobId='82b6fb1c-5ae0-432d-9a6f-9022d249b798'&streamsCreatedSinceDateTime='1%2F1%2F0001%208:00:00%20AM'&$filter=StreamTypeName%20eq%20'Debug'&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/OrchestratorStreamService.svc/2014_03_13/$metadata#Stream\",\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "036a1504d58cccd8b3efe8665207a30b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:22:48 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/JobStreams/GetStreamItems?jobId='82b6fb1c-5ae0-432d-9a6f-9022d249b798'&streamsCreatedSinceDateTime='1%2F1%2F0001%208:00:00%20AM'&$filter=StreamTypeName%20eq%20'Verbose'&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/OrchestratorStreamService.svc/2014_03_13/$metadata#Stream\",\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a26f8a61a9d2c3c2a912a00cdbb49a0e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:22:49 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs?$filter=JobContext/RunbookVersion/RunbookID%20eq%20guid'2f527682-cb7d-49eb-973e-11630291ee0e'%20and%20JobContext/RunbookVersion/IsDraft%20eq%20false&$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"value\": [\r\n {\r\n \"odata.mediaReadLink\": \"Jobs(guid'bc87f6df-0dab-490b-96a1-5279c94491a4')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'b41d5340-74f8-4e6b-b0d9-008912725823')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"213f077e-70ba-4532-b0c3-ba6ede8824f7\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"bc87f6df-0dab-490b-96a1-5279c94491a4\",\r\n \"JobContextID\": \"213f077e-70ba-4532-b0c3-ba6ede8824f7\",\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"JobStatus\": \"Completed\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": \"2014-08-11T18:21:35.83\",\r\n \"EndTime\": \"2014-08-11T18:21:39.367\",\r\n \"CreationTime\": \"2014-08-11T18:21:01.493\",\r\n \"LastModifiedTime\": \"2014-08-11T18:21:39.367\",\r\n \"LastStatusModifiedTime\": \"2014-08-11T18:21:39.367\",\r\n \"JobException\": null\r\n },\r\n {\r\n \"odata.mediaReadLink\": \"Jobs(guid'82b6fb1c-5ae0-432d-9a6f-9022d249b798')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'b41d5340-74f8-4e6b-b0d9-008912725823')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"2f527682-cb7d-49eb-973e-11630291ee0e\",\r\n \"RunbookName\": \"Write-DebugAndVerboseOutput\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"37b02a9a-b398-4c3b-830e-01b0ff9502df\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"82b6fb1c-5ae0-432d-9a6f-9022d249b798\",\r\n \"JobContextID\": \"37b02a9a-b398-4c3b-830e-01b0ff9502df\",\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"JobStatus\": \"Completed\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": \"2014-08-11T18:22:33.57\",\r\n \"EndTime\": \"2014-08-11T18:22:36.847\",\r\n \"CreationTime\": \"2014-08-11T18:22:00.2\",\r\n \"LastModifiedTime\": \"2014-08-11T18:22:36.847\",\r\n \"LastStatusModifiedTime\": \"2014-08-11T18:22:36.847\",\r\n \"JobException\": null\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "151886a61888c112ba1668b8994877ef" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:23:04 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'2f527682-cb7d-49eb-973e-11630291ee0e')?api-version=2014-03-13_Preview", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b118be0b6d17cf79ab587873522e769a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 18:23:06 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 204 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.AutomationTests/TestAutomationPublishAndEditRunbook.json b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.AutomationTests/TestAutomationPublishAndEditRunbook.json new file mode 100644 index 000000000000..e77b260d8ae9 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.AutomationTests/TestAutomationPublishAndEditRunbook.json @@ -0,0 +1,1874 @@ +{ + "Entries": [ + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks\",\r\n \"value\": [\r\n {\r\n \"Schedules\": [\r\n {\r\n \"odata.type\": \"AutomationApi.V2014_03_13.OneTimeSchedule\",\r\n \"ScheduleID\": \"837eaad3-2043-4a2d-995d-bea247ab8378\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"Name\": \"s01\",\r\n \"Description\": null,\r\n \"StartTime\": \"2014-04-30T06:30:00\",\r\n \"ExpiryTime\": \"2014-04-30T06:30:00\",\r\n \"CreationTime\": \"2014-04-29T00:00:34.637\",\r\n \"LastModifiedTime\": \"2014-04-29T00:00:34.637\",\r\n \"IsEnabled\": true,\r\n \"NextRun\": null\r\n }\r\n ],\r\n \"#OrchestratorApi.Publish\": {},\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"17c9a137-d057-459d-bde3-68a5da1ff9b0\",\r\n \"RunbookName\": \"myrunbook3\",\r\n \"CreationTime\": \"2014-04-24T23:44:33\",\r\n \"LastModifiedTime\": \"2014-04-24T23:44:57.683\",\r\n \"LastModifiedBy\": \"oaastest@live.com\",\r\n \"Description\": null,\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"3f4a63e6-8ee2-4a0e-8d1c-9088af655a8b\",\r\n \"DraftRunbookVersionID\": \"c465d82a-bf38-4cb2-98b9-510485641f3f\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "cb96af1ee935a845b1870360ddbb90a8" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:01:53 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=cv1qqcfath0mxbbriuzmzxap; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookVersions?api-version=2014-03-13_Preview", + "RequestMethod": "POST", + "RequestBody": "workflow Test-Workflow\r\n{\r\n}", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#RunbookVersions/@Element\",\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'51afcfc9-ad18-4ad7-999e-d5e8f8986afe')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"odata.mediaETag\": \"\\\"635375017145830000\\\"\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookVersionID\": \"51afcfc9-ad18-4ad7-999e-d5e8f8986afe\",\r\n \"RunbookID\": \"00000000-0000-0000-0000-000000000000\",\r\n \"VersionNumber\": 0,\r\n \"IsDraft\": false,\r\n \"CreationTime\": \"0001-01-01T00:00:00\",\r\n \"LastModifiedTime\": \"0001-01-01T00:00:00\"\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-location": [ + "https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/RunbookVersions(guid'51afcfc9-ad18-4ad7-999e-d5e8f8986afe')" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9ab331fe4ec0af68b5517100dbe0424b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:01:54 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=pmqfr4pnlzca4yh0ou24iusn; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookVersions(guid'51afcfc9-ad18-4ad7-999e-d5e8f8986afe')?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#RunbookVersions/@Element\",\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'51afcfc9-ad18-4ad7-999e-d5e8f8986afe')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"odata.mediaETag\": \"\\\"635375017145830000\\\"\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookVersionID\": \"51afcfc9-ad18-4ad7-999e-d5e8f8986afe\",\r\n \"RunbookID\": \"cfb66232-6308-4aa4-b837-2a627f39ab41\",\r\n \"VersionNumber\": 1,\r\n \"IsDraft\": true,\r\n \"CreationTime\": \"2014-06-04T18:01:54.583\",\r\n \"LastModifiedTime\": \"2014-06-04T18:01:54.583\"\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "fd226f244963af358c37bba17b7a99b9" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:01:55 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'cfb66232-6308-4aa4-b837-2a627f39ab41')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Publish\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"cfb66232-6308-4aa4-b837-2a627f39ab41\",\r\n \"RunbookName\": \"Test-Workflow\",\r\n \"CreationTime\": \"2014-06-04T18:01:54.583\",\r\n \"LastModifiedTime\": \"2014-06-04T18:01:54.583\",\r\n \"LastModifiedBy\": null,\r\n \"Description\": null,\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": null,\r\n \"DraftRunbookVersionID\": \"51afcfc9-ad18-4ad7-999e-d5e8f8986afe\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "1052ff8a6883a904b9cdc7957431ab50" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:01:56 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'cfb66232-6308-4aa4-b837-2a627f39ab41')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Publish\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"cfb66232-6308-4aa4-b837-2a627f39ab41\",\r\n \"RunbookName\": \"Test-Workflow\",\r\n \"CreationTime\": \"2014-06-04T18:01:54.583\",\r\n \"LastModifiedTime\": \"2014-06-04T18:01:56.853\",\r\n \"LastModifiedBy\": null,\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": null,\r\n \"DraftRunbookVersionID\": \"51afcfc9-ad18-4ad7-999e-d5e8f8986afe\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "95fa92aad66eaf4eabce4f1dbf2c9b9d" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:01:57 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'cfb66232-6308-4aa4-b837-2a627f39ab41')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Publish\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"cfb66232-6308-4aa4-b837-2a627f39ab41\",\r\n \"RunbookName\": \"Test-Workflow\",\r\n \"CreationTime\": \"2014-06-04T18:01:54.583\",\r\n \"LastModifiedTime\": \"2014-06-04T18:01:56.853\",\r\n \"LastModifiedBy\": null,\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": null,\r\n \"DraftRunbookVersionID\": \"51afcfc9-ad18-4ad7-999e-d5e8f8986afe\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "5162eafc812aa795bd9d62e61636161c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:01:57 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'cfb66232-6308-4aa4-b837-2a627f39ab41')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"cfb66232-6308-4aa4-b837-2a627f39ab41\",\r\n \"RunbookName\": \"Test-Workflow\",\r\n \"CreationTime\": \"2014-06-04T18:01:54.583\",\r\n \"LastModifiedTime\": \"2014-06-04T18:01:58.92\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"83507619-45af-421f-8b48-35790a0b0648\",\r\n \"DraftRunbookVersionID\": null,\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d57f086c34c5aba998cf142ff8697848" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:00 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'cfb66232-6308-4aa4-b837-2a627f39ab41')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\"odata.error\":{\"code\":\"\",\"message\":{\"lang\":\"en-US\",\"value\":\"Resource not found for the segment 'Runbooks'.\"}}}", + "ResponseHeaders": { + "Date": [ + "Wed, 04 Jun 2014 18:02:15 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'cfb66232-6308-4aa4-b837-2a627f39ab41')?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"#OrchestratorApi.Publish\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"cfb66232-6308-4aa4-b837-2a627f39ab41\",\r\n \"RunbookName\": \"Test-Workflow\",\r\n \"CreationTime\": \"2014-06-04T18:01:54.583\",\r\n \"LastModifiedTime\": \"2014-06-04T18:01:54.583\",\r\n \"LastModifiedBy\": null,\r\n \"Description\": null,\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": null,\r\n \"DraftRunbookVersionID\": \"51afcfc9-ad18-4ad7-999e-d5e8f8986afe\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d1bda3e5253fa1d7b647924494ba0145" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:01:56 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'cfb66232-6308-4aa4-b837-2a627f39ab41')?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"cfb66232-6308-4aa4-b837-2a627f39ab41\",\r\n \"RunbookName\": \"Test-Workflow\",\r\n \"CreationTime\": \"2014-06-04T18:01:54.583\",\r\n \"LastModifiedTime\": \"2014-06-04T18:01:58.92\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"83507619-45af-421f-8b48-35790a0b0648\",\r\n \"DraftRunbookVersionID\": null,\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "862541718a78a735861b0319f1d02132" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:01 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=dnl23rac0fvhgh4tbbkuvvuu; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'cfb66232-6308-4aa4-b837-2a627f39ab41')?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"#OrchestratorApi.Publish\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"cfb66232-6308-4aa4-b837-2a627f39ab41\",\r\n \"RunbookName\": \"Test-Workflow\",\r\n \"CreationTime\": \"2014-06-04T18:01:54.583\",\r\n \"LastModifiedTime\": \"2014-06-04T18:01:58.92\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"83507619-45af-421f-8b48-35790a0b0648\",\r\n \"DraftRunbookVersionID\": \"dad74389-28ac-422b-9293-aa5c891f0532\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "afe2c14f4be3a7428e440863c6f82326" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:10 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'cfb66232-6308-4aa4-b837-2a627f39ab41')?api-version=2014-03-13_Preview", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"cfb66232-6308-4aa4-b837-2a627f39ab41\",\r\n \"RunbookName\": \"Test-Workflow\",\r\n \"CreationTime\": \"2014-06-04T18:01:54.583\",\r\n \"LastModifiedTime\": \"2014-06-04T18:01:54.583\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"DraftRunbookVersionID\": \"51afcfc9-ad18-4ad7-999e-d5e8f8986afe\",\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false,\r\n \"Schedules\": []\r\n}", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "88cc7c51d51aa753957ba896da8984d4" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:01:57 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'cfb66232-6308-4aa4-b837-2a627f39ab41')/Publish?api-version=2014-03-13_Preview", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-automation-client-request-user-identity": [ + "PowerShell" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Edm.Guid\",\r\n \"value\": \"83507619-45af-421f-8b48-35790a0b0648\"\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "506d52141241a4549dd1d6acfed170b7" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:01:59 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=itdqhh0wsndmxty52bt1bvsk; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookVersions(guid'83507619-45af-421f-8b48-35790a0b0648')?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#RunbookVersions/@Element\",\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'83507619-45af-421f-8b48-35790a0b0648')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"odata.mediaETag\": \"\\\"635375017189200000\\\"\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookVersionID\": \"83507619-45af-421f-8b48-35790a0b0648\",\r\n \"RunbookID\": \"cfb66232-6308-4aa4-b837-2a627f39ab41\",\r\n \"VersionNumber\": 2,\r\n \"IsDraft\": false,\r\n \"CreationTime\": \"2014-06-04T18:01:58.92\",\r\n \"LastModifiedTime\": \"2014-06-04T18:01:58.92\"\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ed2546461da0a24cb420e7e67cc769ae" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:00 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=cgeraoh35ur0gy2sdxonqkom; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookVersions(guid'83507619-45af-421f-8b48-35790a0b0648')/$value?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/octet-stream" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "workflow Test-Workflow\r\n{\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "5c97c5b56e0ba0779e38c8822e6fecd5" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:01 GMT" + ], + "ETag": [ + "\"635375017189200000\"" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'cfb66232-6308-4aa4-b837-2a627f39ab41')/Edit?api-version=2014-03-13_Preview", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Edm.Guid\",\r\n \"value\": \"dad74389-28ac-422b-9293-aa5c891f0532\"\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "650f8acd39a3a627852aad5855fd4e1e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:02 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookVersions(guid'dad74389-28ac-422b-9293-aa5c891f0532')/$value?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/octet-stream" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "workflow Test-Workflow\r\n{\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d5bf9efb64f3a546848045740983dd93" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:02 GMT" + ], + "ETag": [ + "\"635375017226000000\"" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookVersions(guid'dad74389-28ac-422b-9293-aa5c891f0532')/$value?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/octet-stream" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "Workflow Test-Workflow { \r\n get-date\r\n start-sleep -s 40\r\n get-date\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b1bf59cd2406a36194df3280d74baec3" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:04 GMT" + ], + "ETag": [ + "\"635375017242170000\"" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookVersions(guid'dad74389-28ac-422b-9293-aa5c891f0532')/$value?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/octet-stream" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "Workflow Test-Workflow { \r\n get-date\r\n start-sleep -s 40\r\n get-date\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c2d86ac75915aa5bb2306c4c6213a52b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:07 GMT" + ], + "ETag": [ + "\"635375017242170000\"" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookVersions(guid'dad74389-28ac-422b-9293-aa5c891f0532')/$value?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/octet-stream" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "Workflow Test-Workflow { \r\n get-date\r\n start-sleep -s 40\r\n get-date\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "07c5cb5fd6a6ab63a44528abbd624885" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:10 GMT" + ], + "ETag": [ + "\"635375017242170000\"" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookVersions(guid'dad74389-28ac-422b-9293-aa5c891f0532')/$value?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/octet-stream" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "Workflow Test-Workflow { \r\n get-date\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "29af08f9f19aa0e28a132a53085c97f3" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:12 GMT" + ], + "ETag": [ + "\"635375017306800000\"" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookVersions(guid'dad74389-28ac-422b-9293-aa5c891f0532')/$value?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/octet-stream" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "Workflow Test-Workflow { \r\n get-date\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "6883193959f3a41994bace829ebfd505" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:13 GMT" + ], + "ETag": [ + "\"635375017306800000\"" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookVersions(guid'dad74389-28ac-422b-9293-aa5c891f0532')/$value?api-version=2014-03-13_Preview", + "RequestMethod": "PUT", + "RequestBody": "Workflow Test-Workflow { \r\n get-date\r\n start-sleep -s 40\r\n get-date\r\n}", + "RequestHeaders": { + "If-Match": [ + "\"635375017226000000\"" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "23f42d7fa4cda360a5285ecad5b38220" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:03 GMT" + ], + "ETag": [ + "\"635375017242170000\"" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookVersions(guid'dad74389-28ac-422b-9293-aa5c891f0532')/$value?api-version=2014-03-13_Preview", + "RequestMethod": "PUT", + "RequestBody": "Workflow Test-Workflow { \r\n get-date\r\n}", + "RequestHeaders": { + "If-Match": [ + "\"635375017242170000\"" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "080c85e6af5ba1ec9dd765489ee375a4" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:11 GMT" + ], + "ETag": [ + "\"635375017306800000\"" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookVersions(guid'dad74389-28ac-422b-9293-aa5c891f0532')?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#RunbookVersions/@Element\",\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'dad74389-28ac-422b-9293-aa5c891f0532')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"odata.mediaETag\": \"\\\"635375017242170000\\\"\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookVersionID\": \"dad74389-28ac-422b-9293-aa5c891f0532\",\r\n \"RunbookID\": \"cfb66232-6308-4aa4-b837-2a627f39ab41\",\r\n \"VersionNumber\": 3,\r\n \"IsDraft\": true,\r\n \"CreationTime\": \"2014-06-04T18:02:02.6\",\r\n \"LastModifiedTime\": \"2014-06-04T18:02:04.217\"\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "60ac0120a24fadc9a87b99fe45e77a6b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:04 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookVersions(guid'dad74389-28ac-422b-9293-aa5c891f0532')?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#RunbookVersions/@Element\",\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'dad74389-28ac-422b-9293-aa5c891f0532')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"odata.mediaETag\": \"\\\"635375017242170000\\\"\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookVersionID\": \"dad74389-28ac-422b-9293-aa5c891f0532\",\r\n \"RunbookID\": \"cfb66232-6308-4aa4-b837-2a627f39ab41\",\r\n \"VersionNumber\": 3,\r\n \"IsDraft\": true,\r\n \"CreationTime\": \"2014-06-04T18:02:02.6\",\r\n \"LastModifiedTime\": \"2014-06-04T18:02:04.217\"\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "610cce7b5c4aa2eba766cefbe50fd9de" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:07 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=t2dmcxewkr1nijvtz1pp3lww; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookVersions(guid'dad74389-28ac-422b-9293-aa5c891f0532')?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#RunbookVersions/@Element\",\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'dad74389-28ac-422b-9293-aa5c891f0532')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"odata.mediaETag\": \"\\\"635375017306800000\\\"\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookVersionID\": \"dad74389-28ac-422b-9293-aa5c891f0532\",\r\n \"RunbookID\": \"cfb66232-6308-4aa4-b837-2a627f39ab41\",\r\n \"VersionNumber\": 3,\r\n \"IsDraft\": true,\r\n \"CreationTime\": \"2014-06-04T18:02:02.6\",\r\n \"LastModifiedTime\": \"2014-06-04T18:02:10.68\"\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "1c55fe49f6e6a5bda9decd33a934c325" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:11 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookVersions(guid'dad74389-28ac-422b-9293-aa5c891f0532')?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#RunbookVersions/@Element\",\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'dad74389-28ac-422b-9293-aa5c891f0532')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"odata.mediaETag\": \"\\\"635375017306800000\\\"\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookVersionID\": \"dad74389-28ac-422b-9293-aa5c891f0532\",\r\n \"RunbookID\": \"cfb66232-6308-4aa4-b837-2a627f39ab41\",\r\n \"VersionNumber\": 3,\r\n \"IsDraft\": true,\r\n \"CreationTime\": \"2014-06-04T18:02:02.6\",\r\n \"LastModifiedTime\": \"2014-06-04T18:02:10.68\"\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c6761c07cacba7aa85b3de8c80da0800" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:13 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=02azfw2n5xtsc1pjhvc0rxmj; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks?$filter=RunbookName%20eq%20'Test-Workflow'&$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks\",\r\n \"value\": [\r\n {\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Publish\": {},\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"cfb66232-6308-4aa4-b837-2a627f39ab41\",\r\n \"RunbookName\": \"Test-Workflow\",\r\n \"CreationTime\": \"2014-06-04T18:01:54.583\",\r\n \"LastModifiedTime\": \"2014-06-04T18:01:58.92\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"83507619-45af-421f-8b48-35790a0b0648\",\r\n \"DraftRunbookVersionID\": \"dad74389-28ac-422b-9293-aa5c891f0532\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "146f0fc48cada5a1a3ed094f54682ab7" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:06 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=ybiusl54r4livixf1mgd5gto; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks?$filter=RunbookName%20eq%20'Test-Workflow'&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks\",\r\n \"value\": [\r\n {\r\n \"#OrchestratorApi.Publish\": {},\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"cfb66232-6308-4aa4-b837-2a627f39ab41\",\r\n \"RunbookName\": \"Test-Workflow\",\r\n \"CreationTime\": \"2014-06-04T18:01:54.583\",\r\n \"LastModifiedTime\": \"2014-06-04T18:01:58.92\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"83507619-45af-421f-8b48-35790a0b0648\",\r\n \"DraftRunbookVersionID\": \"dad74389-28ac-422b-9293-aa5c891f0532\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "494c0b7fea95a0c085c264124cb937c6" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:08 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=ebtlm2dfmwadfm4uklunnhme; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'cfb66232-6308-4aa4-b837-2a627f39ab41')?api-version=2014-03-13_Preview", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9fc123b37778aa5ca024a8bb18c4944e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:14 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=rpuke5r0rg3m3eepvptwwivg; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 204 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.AutomationTests/TestAutomationRunbookWithParameter.json b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.AutomationTests/TestAutomationRunbookWithParameter.json new file mode 100644 index 000000000000..6d72bcdbcff2 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.AutomationTests/TestAutomationRunbookWithParameter.json @@ -0,0 +1,1501 @@ +{ + "Entries": [ + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices?resourceType=AutomationAccount&detailLevel=Full&resourceProviderNamespace=automation", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "\r\n \r\n OaaSCSMJZ4AGUOA5SDKKDLDMOVNQHWHCSXMDQM2D3WXNGHPTXHETYQYXGQ-East-US\r\n \r\n OaaSCSMJZ4AGUOA5SDKKDLDMOVNQHWHCSXMDQM2D3WXNGHPTXHETYQYXGQ-East-US in East US\r\n East US\r\n \r\n \r\n automation\r\n AutomationAccount\r\n AutomationAccount\r\n Preview\r\n 1.1\r\n 56b96e88-0643-4d6c-9cee-8a2d88fb496c\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n automation\r\n AutomationAccount\r\n TestAutomationAccount\r\n Preview\r\n 1.1\r\n 5f56af82-3751-46a2-9ebb-3959bbb26de2\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "8a663e1d0d01cc8dada8fe7769e1672b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 17:25:39 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks\",\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "e1ecc4931d68cfbea3f120d02026f317" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 17:25:41 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=hooit4fiw2qgkqz3dzcdigob; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookVersions?api-version=2014-03-13_Preview", + "RequestMethod": "POST", + "RequestBody": "workflow fastJob\r\n{\r\n param([int[]] $nums)\r\n $sum=($nums | Measure-Object -Sum).Sum\r\n echo $sum\r\n}", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#RunbookVersions/@Element\",\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'f30ceef1-5a49-4f83-932e-539ad258b756')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"odata.mediaETag\": \"\\\"635433747424070000\\\"\",\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"RunbookVersionID\": \"f30ceef1-5a49-4f83-932e-539ad258b756\",\r\n \"RunbookID\": \"00000000-0000-0000-0000-000000000000\",\r\n \"VersionNumber\": 0,\r\n \"IsDraft\": false,\r\n \"CreationTime\": \"0001-01-01T00:00:00\",\r\n \"LastModifiedTime\": \"0001-01-01T00:00:00\"\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-location": [ + "https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/RunbookVersions(guid'f30ceef1-5a49-4f83-932e-539ad258b756')" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "68d521b417a2c47ca7465754d225529f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 17:25:42 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=hjt42yeccnm1g5wgnboykgzh; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookVersions(guid'f30ceef1-5a49-4f83-932e-539ad258b756')?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#RunbookVersions/@Element\",\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'f30ceef1-5a49-4f83-932e-539ad258b756')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"odata.mediaETag\": \"\\\"635433747424070000\\\"\",\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"RunbookVersionID\": \"f30ceef1-5a49-4f83-932e-539ad258b756\",\r\n \"RunbookID\": \"6b1cae07-d49d-4d7c-9a74-781be5d693f2\",\r\n \"VersionNumber\": 1,\r\n \"IsDraft\": true,\r\n \"CreationTime\": \"2014-08-11T17:25:42.407\",\r\n \"LastModifiedTime\": \"2014-08-11T17:25:42.407\"\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "e229e51bb7e9c5dd96cbf2e67f1bff2d" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 17:25:43 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'6b1cae07-d49d-4d7c-9a74-781be5d693f2')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Publish\": {},\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"RunbookID\": \"6b1cae07-d49d-4d7c-9a74-781be5d693f2\",\r\n \"RunbookName\": \"fastJob\",\r\n \"CreationTime\": \"2014-08-11T17:25:42.407\",\r\n \"LastModifiedTime\": \"2014-08-11T17:25:42.407\",\r\n \"LastModifiedBy\": null,\r\n \"Description\": null,\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": null,\r\n \"DraftRunbookVersionID\": \"f30ceef1-5a49-4f83-932e-539ad258b756\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "61881974be34c129af784c8230f32208" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 17:25:44 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'6b1cae07-d49d-4d7c-9a74-781be5d693f2')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Publish\": {},\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"RunbookID\": \"6b1cae07-d49d-4d7c-9a74-781be5d693f2\",\r\n \"RunbookName\": \"fastJob\",\r\n \"CreationTime\": \"2014-08-11T17:25:42.407\",\r\n \"LastModifiedTime\": \"2014-08-11T17:25:45.377\",\r\n \"LastModifiedBy\": null,\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": null,\r\n \"DraftRunbookVersionID\": \"f30ceef1-5a49-4f83-932e-539ad258b756\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "4a6706c8a70ecbb4a3d13ed72e2fc812" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 17:25:45 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'6b1cae07-d49d-4d7c-9a74-781be5d693f2')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Publish\": {},\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"RunbookID\": \"6b1cae07-d49d-4d7c-9a74-781be5d693f2\",\r\n \"RunbookName\": \"fastJob\",\r\n \"CreationTime\": \"2014-08-11T17:25:42.407\",\r\n \"LastModifiedTime\": \"2014-08-11T17:25:45.377\",\r\n \"LastModifiedBy\": null,\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": null,\r\n \"DraftRunbookVersionID\": \"f30ceef1-5a49-4f83-932e-539ad258b756\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "3e5989cb77f4ce5a9d9385ab6f0bcd95" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 17:25:47 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'6b1cae07-d49d-4d7c-9a74-781be5d693f2')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"RunbookID\": \"6b1cae07-d49d-4d7c-9a74-781be5d693f2\",\r\n \"RunbookName\": \"fastJob\",\r\n \"CreationTime\": \"2014-08-11T17:25:42.407\",\r\n \"LastModifiedTime\": \"2014-08-11T17:25:47.57\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"000fdf9c-2b73-422a-888b-8cab8e05201a\",\r\n \"DraftRunbookVersionID\": null,\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "1161df10d1a2c02ba1165a02b1b97b26" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 17:25:47 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'6b1cae07-d49d-4d7c-9a74-781be5d693f2')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"RunbookID\": \"6b1cae07-d49d-4d7c-9a74-781be5d693f2\",\r\n \"RunbookName\": \"fastJob\",\r\n \"CreationTime\": \"2014-08-11T17:25:42.407\",\r\n \"LastModifiedTime\": \"2014-08-11T17:25:47.57\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"000fdf9c-2b73-422a-888b-8cab8e05201a\",\r\n \"DraftRunbookVersionID\": null,\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "69ffa442bd64c88a95324701870fe9b1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 17:25:48 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=np5qw4y2l2z2t4zd4n2gwceb; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'6b1cae07-d49d-4d7c-9a74-781be5d693f2')?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"#OrchestratorApi.Publish\": {},\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"RunbookID\": \"6b1cae07-d49d-4d7c-9a74-781be5d693f2\",\r\n \"RunbookName\": \"fastJob\",\r\n \"CreationTime\": \"2014-08-11T17:25:42.407\",\r\n \"LastModifiedTime\": \"2014-08-11T17:25:42.407\",\r\n \"LastModifiedBy\": null,\r\n \"Description\": null,\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": null,\r\n \"DraftRunbookVersionID\": \"f30ceef1-5a49-4f83-932e-539ad258b756\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "4da255c66723c8da984da31f923cb9f4" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 17:25:44 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'6b1cae07-d49d-4d7c-9a74-781be5d693f2')?api-version=2014-03-13_Preview", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"RunbookID\": \"6b1cae07-d49d-4d7c-9a74-781be5d693f2\",\r\n \"RunbookName\": \"fastJob\",\r\n \"CreationTime\": \"2014-08-11T17:25:42.407\",\r\n \"LastModifiedTime\": \"2014-08-11T17:25:42.407\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"DraftRunbookVersionID\": \"f30ceef1-5a49-4f83-932e-539ad258b756\",\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false,\r\n \"Schedules\": []\r\n}", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "dd760f88fc54ca6980cce36be7918f76" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 17:25:45 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'6b1cae07-d49d-4d7c-9a74-781be5d693f2')/Publish?api-version=2014-03-13_Preview", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-automation-client-request-user-identity": [ + "PowerShell" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Edm.Guid\",\r\n \"value\": \"000fdf9c-2b73-422a-888b-8cab8e05201a\"\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "593174c1abc8c9d99eee051e6072044a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 17:25:47 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=4qskc0xouwomzuztnuaub3xn; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookParameters?$filter=RunbookVersionID%20eq%20guid'000fdf9c-2b73-422a-888b-8cab8e05201a'&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#RunbookParameters\",\r\n \"value\": [\r\n {\r\n \"RunbookVersionID\": \"000fdf9c-2b73-422a-888b-8cab8e05201a\",\r\n \"Name\": \"nums\",\r\n \"Type\": \"System.Int32[]\",\r\n \"IsMandatory\": false,\r\n \"Position\": 0\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "0e6694e02c85c661891ef41aa457d313" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 17:25:49 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'6b1cae07-d49d-4d7c-9a74-781be5d693f2')/Start?api-version=2014-03-13_Preview", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"parameters\": [\r\n {\r\n \"Name\": \"nums\",\r\n \"Value\": \"[1,2,3,4,5,6,7]\"\r\n },\r\n {\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\"\r\n }\r\n ]\r\n}", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Edm.Guid\",\r\n \"value\": \"a63cb041-f50f-406d-9747-cd71bae66ffa\"\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ed2b2e0854c7cdeb8aad452e1f6423f7" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 17:25:49 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'a63cb041-f50f-406d-9747-cd71bae66ffa')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'a63cb041-f50f-406d-9747-cd71bae66ffa')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'000fdf9c-2b73-422a-888b-8cab8e05201a')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"6b1cae07-d49d-4d7c-9a74-781be5d693f2\",\r\n \"RunbookName\": \"fastJob\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"7ab13907-49e1-4141-8c55-14ed4f632c27\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n },\r\n {\r\n \"JobContextID\": \"7ab13907-49e1-4141-8c55-14ed4f632c27\",\r\n \"Name\": \"nums\",\r\n \"Value\": \"[1,2,3,4,5,6,7]\",\r\n \"Type\": \"System.Int32[]\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"a63cb041-f50f-406d-9747-cd71bae66ffa\",\r\n \"JobContextID\": \"7ab13907-49e1-4141-8c55-14ed4f632c27\",\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"JobStatus\": \"Activating\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": null,\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-08-11T17:25:50.437\",\r\n \"LastModifiedTime\": \"2014-08-11T17:25:56.103\",\r\n \"LastStatusModifiedTime\": \"2014-08-11T17:25:56.103\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "99a847a782cdcd4e80382315ad65b409" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 17:26:01 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'a63cb041-f50f-406d-9747-cd71bae66ffa')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'a63cb041-f50f-406d-9747-cd71bae66ffa')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'000fdf9c-2b73-422a-888b-8cab8e05201a')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"6b1cae07-d49d-4d7c-9a74-781be5d693f2\",\r\n \"RunbookName\": \"fastJob\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"7ab13907-49e1-4141-8c55-14ed4f632c27\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n },\r\n {\r\n \"JobContextID\": \"7ab13907-49e1-4141-8c55-14ed4f632c27\",\r\n \"Name\": \"nums\",\r\n \"Value\": \"[1,2,3,4,5,6,7]\",\r\n \"Type\": \"System.Int32[]\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"a63cb041-f50f-406d-9747-cd71bae66ffa\",\r\n \"JobContextID\": \"7ab13907-49e1-4141-8c55-14ed4f632c27\",\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"JobStatus\": \"Activating\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": null,\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-08-11T17:25:50.437\",\r\n \"LastModifiedTime\": \"2014-08-11T17:25:56.103\",\r\n \"LastStatusModifiedTime\": \"2014-08-11T17:25:56.103\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8961028206d5c1c49f573e104b654c69" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 17:26:09 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=v040wt3ir34tdyux4y2iofsp; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'a63cb041-f50f-406d-9747-cd71bae66ffa')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'a63cb041-f50f-406d-9747-cd71bae66ffa')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'000fdf9c-2b73-422a-888b-8cab8e05201a')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"6b1cae07-d49d-4d7c-9a74-781be5d693f2\",\r\n \"RunbookName\": \"fastJob\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"7ab13907-49e1-4141-8c55-14ed4f632c27\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n },\r\n {\r\n \"JobContextID\": \"7ab13907-49e1-4141-8c55-14ed4f632c27\",\r\n \"Name\": \"nums\",\r\n \"Value\": \"[1,2,3,4,5,6,7]\",\r\n \"Type\": \"System.Int32[]\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"a63cb041-f50f-406d-9747-cd71bae66ffa\",\r\n \"JobContextID\": \"7ab13907-49e1-4141-8c55-14ed4f632c27\",\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"JobStatus\": \"Activating\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": null,\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-08-11T17:25:50.437\",\r\n \"LastModifiedTime\": \"2014-08-11T17:25:56.103\",\r\n \"LastStatusModifiedTime\": \"2014-08-11T17:25:56.103\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "219f955db183cff180542cd4ad84b729" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 17:26:12 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=rcftypelegsi5sqwwpi53n0t; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'a63cb041-f50f-406d-9747-cd71bae66ffa')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'a63cb041-f50f-406d-9747-cd71bae66ffa')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'000fdf9c-2b73-422a-888b-8cab8e05201a')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"6b1cae07-d49d-4d7c-9a74-781be5d693f2\",\r\n \"RunbookName\": \"fastJob\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"7ab13907-49e1-4141-8c55-14ed4f632c27\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n },\r\n {\r\n \"JobContextID\": \"7ab13907-49e1-4141-8c55-14ed4f632c27\",\r\n \"Name\": \"nums\",\r\n \"Value\": \"[1,2,3,4,5,6,7]\",\r\n \"Type\": \"System.Int32[]\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"a63cb041-f50f-406d-9747-cd71bae66ffa\",\r\n \"JobContextID\": \"7ab13907-49e1-4141-8c55-14ed4f632c27\",\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"JobStatus\": \"Activating\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": null,\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-08-11T17:25:50.437\",\r\n \"LastModifiedTime\": \"2014-08-11T17:25:56.103\",\r\n \"LastStatusModifiedTime\": \"2014-08-11T17:25:56.103\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "bfe9b3cde074c4a387cfe391b773951f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 17:26:21 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=jbnwqw3sjzjublrwqa0evfoc; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'a63cb041-f50f-406d-9747-cd71bae66ffa')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'a63cb041-f50f-406d-9747-cd71bae66ffa')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'000fdf9c-2b73-422a-888b-8cab8e05201a')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"6b1cae07-d49d-4d7c-9a74-781be5d693f2\",\r\n \"RunbookName\": \"fastJob\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"7ab13907-49e1-4141-8c55-14ed4f632c27\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n },\r\n {\r\n \"JobContextID\": \"7ab13907-49e1-4141-8c55-14ed4f632c27\",\r\n \"Name\": \"nums\",\r\n \"Value\": \"[1,2,3,4,5,6,7]\",\r\n \"Type\": \"System.Int32[]\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"a63cb041-f50f-406d-9747-cd71bae66ffa\",\r\n \"JobContextID\": \"7ab13907-49e1-4141-8c55-14ed4f632c27\",\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"JobStatus\": \"Running\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": \"2014-08-11T17:26:21.127\",\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-08-11T17:25:50.437\",\r\n \"LastModifiedTime\": \"2014-08-11T17:26:21.127\",\r\n \"LastStatusModifiedTime\": \"2014-08-11T17:26:21.127\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "4d0a67f5dc41cb33a611d48b42116076" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 17:26:24 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=0nnwofm5zvqm4nowmy5bm3o3; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'a63cb041-f50f-406d-9747-cd71bae66ffa')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'a63cb041-f50f-406d-9747-cd71bae66ffa')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'000fdf9c-2b73-422a-888b-8cab8e05201a')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"6b1cae07-d49d-4d7c-9a74-781be5d693f2\",\r\n \"RunbookName\": \"fastJob\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"7ab13907-49e1-4141-8c55-14ed4f632c27\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n },\r\n {\r\n \"JobContextID\": \"7ab13907-49e1-4141-8c55-14ed4f632c27\",\r\n \"Name\": \"nums\",\r\n \"Value\": \"[1,2,3,4,5,6,7]\",\r\n \"Type\": \"System.Int32[]\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"a63cb041-f50f-406d-9747-cd71bae66ffa\",\r\n \"JobContextID\": \"7ab13907-49e1-4141-8c55-14ed4f632c27\",\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"JobStatus\": \"Completed\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": \"2014-08-11T17:26:21.127\",\r\n \"EndTime\": \"2014-08-11T17:26:24.54\",\r\n \"CreationTime\": \"2014-08-11T17:25:50.437\",\r\n \"LastModifiedTime\": \"2014-08-11T17:26:24.54\",\r\n \"LastStatusModifiedTime\": \"2014-08-11T17:26:24.54\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "7ec6f5fc5415c8118328ccd90cd4f059" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 17:26:31 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=l2bdarxhtilqh4ewk3031ana; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'a63cb041-f50f-406d-9747-cd71bae66ffa')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'a63cb041-f50f-406d-9747-cd71bae66ffa')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'000fdf9c-2b73-422a-888b-8cab8e05201a')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"6b1cae07-d49d-4d7c-9a74-781be5d693f2\",\r\n \"RunbookName\": \"fastJob\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"7ab13907-49e1-4141-8c55-14ed4f632c27\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n },\r\n {\r\n \"JobContextID\": \"7ab13907-49e1-4141-8c55-14ed4f632c27\",\r\n \"Name\": \"nums\",\r\n \"Value\": \"[1,2,3,4,5,6,7]\",\r\n \"Type\": \"System.Int32[]\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"a63cb041-f50f-406d-9747-cd71bae66ffa\",\r\n \"JobContextID\": \"7ab13907-49e1-4141-8c55-14ed4f632c27\",\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"JobStatus\": \"Completed\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": \"2014-08-11T17:26:21.127\",\r\n \"EndTime\": \"2014-08-11T17:26:24.54\",\r\n \"CreationTime\": \"2014-08-11T17:25:50.437\",\r\n \"LastModifiedTime\": \"2014-08-11T17:26:24.54\",\r\n \"LastStatusModifiedTime\": \"2014-08-11T17:26:24.54\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c6df3fad3433c3beb718a8221ff91d44" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 17:26:33 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=jyr3mn2ggg5nzanskkx5wuhi; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/JobStreams/GetStreamItems?jobId='a63cb041-f50f-406d-9747-cd71bae66ffa'&streamsCreatedSinceDateTime='1%2F1%2F0001%208:00:00%20AM'&$filter=StreamTypeName%20eq%20'Output'&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/OrchestratorStreamService.svc/2014_03_13/$metadata#Stream\",\r\n \"value\": [\r\n {\r\n \"JobId\": \"a63cb041-f50f-406d-9747-cd71bae66ffa\",\r\n \"NameValues\": [\r\n {\r\n \"Name\": \"value\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"28\"\r\n },\r\n {\r\n \"Name\": \"PSComputerName\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"localhost\"\r\n },\r\n {\r\n \"Name\": \"PSShowComputerName\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"True\"\r\n },\r\n {\r\n \"Name\": \"PSSourceJobInstanceId\",\r\n \"NameValueInner\": [],\r\n \"Value\": \"a63cb041-f50f-406d-9747-cd71bae66ffa\"\r\n }\r\n ],\r\n \"RunbookVersionId\": \"000fdf9c-2b73-422a-888b-8cab8e05201a\",\r\n \"StreamTypeName\": \"Output\",\r\n \"AccountId\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"StreamTime\": \"2014-08-11T17:26:23.9857056Z\",\r\n \"StreamText\": \"28\\r\\n\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "696adc28fa2cc27ebf7206ded89f1f51" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 17:26:34 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks?$filter=RunbookName%20eq%20'fastJob'&$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks\",\r\n \"value\": [\r\n {\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Publish\": {},\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"db4cd990-4937-4220-9c62-73cb8eab7d08\",\r\n \"RunbookID\": \"6b1cae07-d49d-4d7c-9a74-781be5d693f2\",\r\n \"RunbookName\": \"fastJob\",\r\n \"CreationTime\": \"2014-08-11T17:25:42.407\",\r\n \"LastModifiedTime\": \"2014-08-11T17:25:47.57\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"000fdf9c-2b73-422a-888b-8cab8e05201a\",\r\n \"DraftRunbookVersionID\": null,\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "55817f78f9d3c93a9a5f2bb5e9d929d9" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 17:26:36 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=fxrlhsnzbaqof4omv33be4d4; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks?$filter=RunbookName%20eq%20'fastJob'&$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks\",\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "bf232740faadcb188cee34398abf26b3" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 17:26:37 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=xwtqky1ba4izhtwvtuojpvxq; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'6b1cae07-d49d-4d7c-9a74-781be5d693f2')?api-version=2014-03-13_Preview", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.6" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ca92357adf56c8cc8a092b75a03c1544" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 11 Aug 2014 17:26:36 GMT" + ], + "Server": [ + "1.0.6198.110", + "(rd_rdfe_stable.140729-1337)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 204 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.AutomationTests/TestAutomationStartAndStopRunbook.json b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.AutomationTests/TestAutomationStartAndStopRunbook.json new file mode 100644 index 000000000000..cfee3744cb9c --- /dev/null +++ b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.AutomationTests/TestAutomationStartAndStopRunbook.json @@ -0,0 +1,1696 @@ +{ + "Entries": [ + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices?resourceType=AutomationAccount&detailLevel=Full&resourceProviderNamespace=automation", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n OaaSCSZV2MEWJSFZEUBUOS6RFER33W6CF6HZFLIHTKWAXRNBGWIHNJEUXQ-East-US\r\n \r\n OaaSCSZV2MEWJSFZEUBUOS6RFER33W6CF6HZFLIHTKWAXRNBGWIHNJEUXQ-East-US in East US\r\n East US\r\n \r\n \r\n automation\r\n AutomationAccount\r\n Automation509\r\n Preview\r\n 1.1\r\n c1251ced-1d0f-4cd8-9a9d-2b452f4283d2\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n automation\r\n AutomationAccount\r\n elvgAccount\r\n Preview\r\n 1.1\r\n 5692ec51-f3da-4795-a2a4-602c5919b91f\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n automation\r\n AutomationAccount\r\n submgmt\r\n Preview\r\n 1.1\r\n d53eecef-d95b-4f3e-a34a-78ce14550d41\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n automation\r\n AutomationAccount\r\n SuhasBugBash\r\n Preview\r\n 1.1\r\n 21e6ad99-4956-49aa-ae40-7d00d3a039a4\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n automation\r\n AutomationAccount\r\n TestAutomationAccount\r\n Preview\r\n 1.1\r\n 051d7050-e346-4f3e-9e09-bb421fe3d725\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n automation\r\n AutomationAccount\r\n Viv-0516\r\n Preview\r\n 1.1\r\n d8e578b0-d880-48a5-a92b-ef9698f8ff68\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n automation\r\n AutomationAccount\r\n AutomationAccount\r\n Preview\r\n 1.1\r\n 47e18c76-a0f5-4d45-8512-dac82e07cfc2\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "cc8e213fa5b4a8568bc076667bd8044a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:04:00 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks\",\r\n \"value\": [\r\n {\r\n \"Schedules\": [\r\n {\r\n \"odata.type\": \"AutomationApi.V2014_03_13.OneTimeSchedule\",\r\n \"ScheduleID\": \"837eaad3-2043-4a2d-995d-bea247ab8378\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"Name\": \"s01\",\r\n \"Description\": null,\r\n \"StartTime\": \"2014-04-30T06:30:00\",\r\n \"ExpiryTime\": \"2014-04-30T06:30:00\",\r\n \"CreationTime\": \"2014-04-29T00:00:34.637\",\r\n \"LastModifiedTime\": \"2014-04-29T00:00:34.637\",\r\n \"IsEnabled\": true,\r\n \"NextRun\": null\r\n }\r\n ],\r\n \"#OrchestratorApi.Publish\": {},\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"17c9a137-d057-459d-bde3-68a5da1ff9b0\",\r\n \"RunbookName\": \"myrunbook3\",\r\n \"CreationTime\": \"2014-04-24T23:44:33\",\r\n \"LastModifiedTime\": \"2014-04-24T23:44:57.683\",\r\n \"LastModifiedBy\": \"oaastest@live.com\",\r\n \"Description\": null,\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"3f4a63e6-8ee2-4a0e-8d1c-9088af655a8b\",\r\n \"DraftRunbookVersionID\": \"c465d82a-bf38-4cb2-98b9-510485641f3f\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "981c63578ffeafc4971692f2762dbf52" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:04:02 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=dt5uy0w2mwsidifigidxfz5i; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookVersions?api-version=2014-03-13_Preview", + "RequestMethod": "POST", + "RequestBody": "Workflow Test-Workflow { \r\n get-date\r\n start-sleep -s 40\r\n get-date\r\n}", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#RunbookVersions/@Element\",\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'a12649b6-b643-460b-ac85-375218ee9907')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"odata.mediaETag\": \"\\\"635375018432770000\\\"\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookVersionID\": \"a12649b6-b643-460b-ac85-375218ee9907\",\r\n \"RunbookID\": \"00000000-0000-0000-0000-000000000000\",\r\n \"VersionNumber\": 0,\r\n \"IsDraft\": false,\r\n \"CreationTime\": \"0001-01-01T00:00:00\",\r\n \"LastModifiedTime\": \"0001-01-01T00:00:00\"\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-location": [ + "https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/RunbookVersions(guid'a12649b6-b643-460b-ac85-375218ee9907')" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "6a2993a60380aa839b6267a21e7ec41e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:04:03 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=lj0n51vjjak2rwfaovcsym5e; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookVersions(guid'a12649b6-b643-460b-ac85-375218ee9907')?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#RunbookVersions/@Element\",\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'a12649b6-b643-460b-ac85-375218ee9907')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"odata.mediaETag\": \"\\\"635375018432770000\\\"\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookVersionID\": \"a12649b6-b643-460b-ac85-375218ee9907\",\r\n \"RunbookID\": \"5a7ff9ff-40f7-4811-80b2-f7482eef32fc\",\r\n \"VersionNumber\": 1,\r\n \"IsDraft\": true,\r\n \"CreationTime\": \"2014-06-04T18:04:03.277\",\r\n \"LastModifiedTime\": \"2014-06-04T18:04:03.277\"\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9352893b5afeaa0ca68d1d35a48f9d0f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:04:03 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'5a7ff9ff-40f7-4811-80b2-f7482eef32fc')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Publish\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"5a7ff9ff-40f7-4811-80b2-f7482eef32fc\",\r\n \"RunbookName\": \"Test-Workflow\",\r\n \"CreationTime\": \"2014-06-04T18:04:03.277\",\r\n \"LastModifiedTime\": \"2014-06-04T18:04:03.277\",\r\n \"LastModifiedBy\": null,\r\n \"Description\": null,\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": null,\r\n \"DraftRunbookVersionID\": \"a12649b6-b643-460b-ac85-375218ee9907\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ca010f17ffcfa5fe9a284f17bdb3c467" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:04:04 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'5a7ff9ff-40f7-4811-80b2-f7482eef32fc')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Publish\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"5a7ff9ff-40f7-4811-80b2-f7482eef32fc\",\r\n \"RunbookName\": \"Test-Workflow\",\r\n \"CreationTime\": \"2014-06-04T18:04:03.277\",\r\n \"LastModifiedTime\": \"2014-06-04T18:04:06.22\",\r\n \"LastModifiedBy\": null,\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": null,\r\n \"DraftRunbookVersionID\": \"a12649b6-b643-460b-ac85-375218ee9907\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d6eb49ab879aac8ea6461a4018ec9ab0" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:04:06 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'5a7ff9ff-40f7-4811-80b2-f7482eef32fc')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Publish\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"5a7ff9ff-40f7-4811-80b2-f7482eef32fc\",\r\n \"RunbookName\": \"Test-Workflow\",\r\n \"CreationTime\": \"2014-06-04T18:04:03.277\",\r\n \"LastModifiedTime\": \"2014-06-04T18:04:06.22\",\r\n \"LastModifiedBy\": null,\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": null,\r\n \"DraftRunbookVersionID\": \"a12649b6-b643-460b-ac85-375218ee9907\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a6fa57990027ae7c92a5f159d32a4945" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:04:06 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'5a7ff9ff-40f7-4811-80b2-f7482eef32fc')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"5a7ff9ff-40f7-4811-80b2-f7482eef32fc\",\r\n \"RunbookName\": \"Test-Workflow\",\r\n \"CreationTime\": \"2014-06-04T18:04:03.277\",\r\n \"LastModifiedTime\": \"2014-06-04T18:04:08.357\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"0bc8d6b4-8e84-44c1-95f1-9416948b8026\",\r\n \"DraftRunbookVersionID\": null,\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ab4982a247d4a8468d50e487ae115188" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:04:09 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'5a7ff9ff-40f7-4811-80b2-f7482eef32fc')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"5a7ff9ff-40f7-4811-80b2-f7482eef32fc\",\r\n \"RunbookName\": \"Test-Workflow\",\r\n \"CreationTime\": \"2014-06-04T18:04:03.277\",\r\n \"LastModifiedTime\": \"2014-06-04T18:04:08.357\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"0bc8d6b4-8e84-44c1-95f1-9416948b8026\",\r\n \"DraftRunbookVersionID\": null,\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d93304d540eca083bda718b4e976afdf" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:04:09 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=jo1gzmlmried0ohxhqech0tl; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'5a7ff9ff-40f7-4811-80b2-f7482eef32fc')?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"#OrchestratorApi.Publish\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"5a7ff9ff-40f7-4811-80b2-f7482eef32fc\",\r\n \"RunbookName\": \"Test-Workflow\",\r\n \"CreationTime\": \"2014-06-04T18:04:03.277\",\r\n \"LastModifiedTime\": \"2014-06-04T18:04:03.277\",\r\n \"LastModifiedBy\": null,\r\n \"Description\": null,\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": null,\r\n \"DraftRunbookVersionID\": \"a12649b6-b643-460b-ac85-375218ee9907\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "50e013707a13ad9ba24e956e2a810c59" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:04:04 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'5a7ff9ff-40f7-4811-80b2-f7482eef32fc')?api-version=2014-03-13_Preview", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"5a7ff9ff-40f7-4811-80b2-f7482eef32fc\",\r\n \"RunbookName\": \"Test-Workflow\",\r\n \"CreationTime\": \"2014-06-04T18:04:03.277\",\r\n \"LastModifiedTime\": \"2014-06-04T18:04:03.277\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"DraftRunbookVersionID\": \"a12649b6-b643-460b-ac85-375218ee9907\",\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false,\r\n \"Schedules\": []\r\n}", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ad0965127d75ac2d8310b9d234bba650" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:04:06 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=gaoicrtr5mwtf1y1tmmo1koa; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.85", + "(rd_rdfe_stable.140604-0056)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'5a7ff9ff-40f7-4811-80b2-f7482eef32fc')/Publish?api-version=2014-03-13_Preview", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-automation-client-request-user-identity": [ + "PowerShell" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Edm.Guid\",\r\n \"value\": \"0bc8d6b4-8e84-44c1-95f1-9416948b8026\"\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9b0a535a7fd5a38e811080cf81dfc797" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:04:08 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=puntdp0cucwkvon3bjhe4fet; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookParameters?$filter=RunbookVersionID%20eq%20guid'0bc8d6b4-8e84-44c1-95f1-9416948b8026'&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#RunbookParameters\",\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ae3cefb0f550ab09a9350e605ce2d3a5" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:04:09 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'5a7ff9ff-40f7-4811-80b2-f7482eef32fc')/Start?api-version=2014-03-13_Preview", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"parameters\": [\r\n {\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\"\r\n }\r\n ]\r\n}", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Edm.Guid\",\r\n \"value\": \"405dab27-82ee-448c-b377-3289010599bd\"\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8c2223af977aaeebbc71efa12d4f011a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:04:10 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'405dab27-82ee-448c-b377-3289010599bd')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'405dab27-82ee-448c-b377-3289010599bd')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'0bc8d6b4-8e84-44c1-95f1-9416948b8026')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"5a7ff9ff-40f7-4811-80b2-f7482eef32fc\",\r\n \"RunbookName\": \"Test-Workflow\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"2b65f215-f9c2-4013-9007-c12583394ebf\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"405dab27-82ee-448c-b377-3289010599bd\",\r\n \"JobContextID\": \"2b65f215-f9c2-4013-9007-c12583394ebf\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"JobStatus\": \"New\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": null,\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-06-04T18:04:10.793\",\r\n \"LastModifiedTime\": \"2014-06-04T18:04:10.793\",\r\n \"LastStatusModifiedTime\": \"2014-06-04T18:04:10.793\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "5ee005bd230da6719c9b072d94128f03" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:04:20 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=4dekuwm32xoyuzf4y5agsr1u; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.85", + "(rd_rdfe_stable.140604-0056)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'405dab27-82ee-448c-b377-3289010599bd')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'405dab27-82ee-448c-b377-3289010599bd')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'0bc8d6b4-8e84-44c1-95f1-9416948b8026')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"5a7ff9ff-40f7-4811-80b2-f7482eef32fc\",\r\n \"RunbookName\": \"Test-Workflow\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"2b65f215-f9c2-4013-9007-c12583394ebf\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"405dab27-82ee-448c-b377-3289010599bd\",\r\n \"JobContextID\": \"2b65f215-f9c2-4013-9007-c12583394ebf\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"JobStatus\": \"New\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": null,\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-06-04T18:04:10.793\",\r\n \"LastModifiedTime\": \"2014-06-04T18:04:10.793\",\r\n \"LastStatusModifiedTime\": \"2014-06-04T18:04:10.793\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "748361bbbcfcab1d987f29a79dcbe62c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:04:26 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=nevk0fjplweyzsfbx5qp0onj; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'405dab27-82ee-448c-b377-3289010599bd')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'405dab27-82ee-448c-b377-3289010599bd')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'0bc8d6b4-8e84-44c1-95f1-9416948b8026')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"5a7ff9ff-40f7-4811-80b2-f7482eef32fc\",\r\n \"RunbookName\": \"Test-Workflow\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"2b65f215-f9c2-4013-9007-c12583394ebf\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"405dab27-82ee-448c-b377-3289010599bd\",\r\n \"JobContextID\": \"2b65f215-f9c2-4013-9007-c12583394ebf\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"JobStatus\": \"New\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": null,\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-06-04T18:04:10.793\",\r\n \"LastModifiedTime\": \"2014-06-04T18:04:10.793\",\r\n \"LastStatusModifiedTime\": \"2014-06-04T18:04:10.793\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "98a2f17cd67aaea181d4ec359f1cb00b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:04:33 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=1jxj0l3lcqhfsg42ggcqgpdm; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'405dab27-82ee-448c-b377-3289010599bd')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'405dab27-82ee-448c-b377-3289010599bd')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'0bc8d6b4-8e84-44c1-95f1-9416948b8026')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"5a7ff9ff-40f7-4811-80b2-f7482eef32fc\",\r\n \"RunbookName\": \"Test-Workflow\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"2b65f215-f9c2-4013-9007-c12583394ebf\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"405dab27-82ee-448c-b377-3289010599bd\",\r\n \"JobContextID\": \"2b65f215-f9c2-4013-9007-c12583394ebf\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"JobStatus\": \"New\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": null,\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-06-04T18:04:10.793\",\r\n \"LastModifiedTime\": \"2014-06-04T18:04:10.793\",\r\n \"LastStatusModifiedTime\": \"2014-06-04T18:04:10.793\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d8bd5cae2023ab5b83860dad11e437a1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:04:36 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=wnwx3vdk0b4buy20zu5q2sdh; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'405dab27-82ee-448c-b377-3289010599bd')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'405dab27-82ee-448c-b377-3289010599bd')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'0bc8d6b4-8e84-44c1-95f1-9416948b8026')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"5a7ff9ff-40f7-4811-80b2-f7482eef32fc\",\r\n \"RunbookName\": \"Test-Workflow\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"2b65f215-f9c2-4013-9007-c12583394ebf\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"405dab27-82ee-448c-b377-3289010599bd\",\r\n \"JobContextID\": \"2b65f215-f9c2-4013-9007-c12583394ebf\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"JobStatus\": \"Activating\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": null,\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-06-04T18:04:10.793\",\r\n \"LastModifiedTime\": \"2014-06-04T18:04:40.473\",\r\n \"LastStatusModifiedTime\": \"2014-06-04T18:04:40.473\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "5ea6bd3fd325a6ff8966288b5ad8154e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:04:42 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=vqbt4guaqsnw4i32a0y4eicd; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'405dab27-82ee-448c-b377-3289010599bd')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'405dab27-82ee-448c-b377-3289010599bd')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'0bc8d6b4-8e84-44c1-95f1-9416948b8026')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"5a7ff9ff-40f7-4811-80b2-f7482eef32fc\",\r\n \"RunbookName\": \"Test-Workflow\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"2b65f215-f9c2-4013-9007-c12583394ebf\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"405dab27-82ee-448c-b377-3289010599bd\",\r\n \"JobContextID\": \"2b65f215-f9c2-4013-9007-c12583394ebf\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"JobStatus\": \"Activating\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": null,\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-06-04T18:04:10.793\",\r\n \"LastModifiedTime\": \"2014-06-04T18:04:40.473\",\r\n \"LastStatusModifiedTime\": \"2014-06-04T18:04:40.473\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "197213a01f70a3a9a931b6c6fcb02ab0" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:04:49 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=chvv443vytnpeqv4iu0deffo; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'405dab27-82ee-448c-b377-3289010599bd')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'405dab27-82ee-448c-b377-3289010599bd')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'0bc8d6b4-8e84-44c1-95f1-9416948b8026')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"5a7ff9ff-40f7-4811-80b2-f7482eef32fc\",\r\n \"RunbookName\": \"Test-Workflow\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"2b65f215-f9c2-4013-9007-c12583394ebf\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"405dab27-82ee-448c-b377-3289010599bd\",\r\n \"JobContextID\": \"2b65f215-f9c2-4013-9007-c12583394ebf\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"JobStatus\": \"Activating\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": null,\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-06-04T18:04:10.793\",\r\n \"LastModifiedTime\": \"2014-06-04T18:04:40.473\",\r\n \"LastStatusModifiedTime\": \"2014-06-04T18:04:40.473\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b02ad7dfe35ca3669d9d53c9d3e4e4a8" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:04:54 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=ltxh40meeutlh4bbjpl3qur2; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'405dab27-82ee-448c-b377-3289010599bd')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'405dab27-82ee-448c-b377-3289010599bd')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'0bc8d6b4-8e84-44c1-95f1-9416948b8026')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"5a7ff9ff-40f7-4811-80b2-f7482eef32fc\",\r\n \"RunbookName\": \"Test-Workflow\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"2b65f215-f9c2-4013-9007-c12583394ebf\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"405dab27-82ee-448c-b377-3289010599bd\",\r\n \"JobContextID\": \"2b65f215-f9c2-4013-9007-c12583394ebf\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"JobStatus\": \"Activating\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": null,\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-06-04T18:04:10.793\",\r\n \"LastModifiedTime\": \"2014-06-04T18:04:40.473\",\r\n \"LastStatusModifiedTime\": \"2014-06-04T18:04:40.473\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "70ec4198b8e7a21980db1648b3c8a8e9" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:04:57 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=gz3nar43cf3znu4fgotmtvql; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'405dab27-82ee-448c-b377-3289010599bd')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'405dab27-82ee-448c-b377-3289010599bd')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'0bc8d6b4-8e84-44c1-95f1-9416948b8026')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"5a7ff9ff-40f7-4811-80b2-f7482eef32fc\",\r\n \"RunbookName\": \"Test-Workflow\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"2b65f215-f9c2-4013-9007-c12583394ebf\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"405dab27-82ee-448c-b377-3289010599bd\",\r\n \"JobContextID\": \"2b65f215-f9c2-4013-9007-c12583394ebf\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"JobStatus\": \"Running\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": \"2014-06-04T18:04:59.4\",\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-06-04T18:04:10.793\",\r\n \"LastModifiedTime\": \"2014-06-04T18:04:59.4\",\r\n \"LastStatusModifiedTime\": \"2014-06-04T18:04:59.4\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "943ee04b5439a5619c0599e32e206a10" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:05:01 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=3b2qu5l1uteozd5cks1phmeo; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'405dab27-82ee-448c-b377-3289010599bd')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'405dab27-82ee-448c-b377-3289010599bd')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'0bc8d6b4-8e84-44c1-95f1-9416948b8026')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"5a7ff9ff-40f7-4811-80b2-f7482eef32fc\",\r\n \"RunbookName\": \"Test-Workflow\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"2b65f215-f9c2-4013-9007-c12583394ebf\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"405dab27-82ee-448c-b377-3289010599bd\",\r\n \"JobContextID\": \"2b65f215-f9c2-4013-9007-c12583394ebf\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"JobStatus\": \"Stopped\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": \"2014-06-04T18:04:59.4\",\r\n \"EndTime\": \"2014-06-04T18:05:06.983\",\r\n \"CreationTime\": \"2014-06-04T18:04:10.793\",\r\n \"LastModifiedTime\": \"2014-06-04T18:05:06.983\",\r\n \"LastStatusModifiedTime\": \"2014-06-04T18:05:06.983\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f00f945184a3a3babc7ab2ad9585db5d" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:05:08 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=pcq3hy1sitkbjaubthlubaov; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'405dab27-82ee-448c-b377-3289010599bd')/Stop?api-version=2014-03-13_Preview", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "76ed4e36f000a722954f7088960449f4" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:05:03 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=bntzitmaljybg4orrwnomz3e; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks?$filter=RunbookName%20eq%20'Test-Workflow'&$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks\",\r\n \"value\": [\r\n {\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Publish\": {},\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"5a7ff9ff-40f7-4811-80b2-f7482eef32fc\",\r\n \"RunbookName\": \"Test-Workflow\",\r\n \"CreationTime\": \"2014-06-04T18:04:03.277\",\r\n \"LastModifiedTime\": \"2014-06-04T18:04:08.357\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"0bc8d6b4-8e84-44c1-95f1-9416948b8026\",\r\n \"DraftRunbookVersionID\": null,\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "86851c1f25f2af97975ee1e792cf2494" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:05:10 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=ilya112eo1b1fvmetoijom2r; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks?$filter=RunbookName%20eq%20'Test-Workflow'&$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks\",\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b76cef1a8a78a30bb19aa13fbf61f617" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:05:10 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=rcwz5bftr5gtpxeidokqsoyu; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'5a7ff9ff-40f7-4811-80b2-f7482eef32fc')?api-version=2014-03-13_Preview", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "72d40e00585fac078519ce9cb3ae93c7" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:05:10 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 204 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.AutomationTests/TestAutomationStartRunbookOnASchedule.json b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.AutomationTests/TestAutomationStartRunbookOnASchedule.json new file mode 100644 index 000000000000..bc4252e4518d --- /dev/null +++ b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.AutomationTests/TestAutomationStartRunbookOnASchedule.json @@ -0,0 +1,3169 @@ +{ + "Entries": [ + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices?resourceType=AutomationAccount&detailLevel=Full&resourceProviderNamespace=automation", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n OaaSCSZV2MEWJSFZEUBUOS6RFER33W6CF6HZFLIHTKWAXRNBGWIHNJEUXQ-East-US\r\n \r\n OaaSCSZV2MEWJSFZEUBUOS6RFER33W6CF6HZFLIHTKWAXRNBGWIHNJEUXQ-East-US in East US\r\n East US\r\n \r\n \r\n automation\r\n AutomationAccount\r\n Automation509\r\n Preview\r\n 1.1\r\n c1251ced-1d0f-4cd8-9a9d-2b452f4283d2\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n automation\r\n AutomationAccount\r\n elvgAccount\r\n Preview\r\n 1.1\r\n 5692ec51-f3da-4795-a2a4-602c5919b91f\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n automation\r\n AutomationAccount\r\n submgmt\r\n Preview\r\n 1.1\r\n d53eecef-d95b-4f3e-a34a-78ce14550d41\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n automation\r\n AutomationAccount\r\n SuhasBugBash\r\n Preview\r\n 1.1\r\n 21e6ad99-4956-49aa-ae40-7d00d3a039a4\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n automation\r\n AutomationAccount\r\n TestAutomationAccount\r\n Preview\r\n 1.1\r\n 051d7050-e346-4f3e-9e09-bb421fe3d725\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n automation\r\n AutomationAccount\r\n Viv-0516\r\n Preview\r\n 1.1\r\n d8e578b0-d880-48a5-a92b-ef9698f8ff68\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n automation\r\n AutomationAccount\r\n AutomationAccount\r\n Preview\r\n 1.1\r\n 47e18c76-a0f5-4d45-8512-dac82e07cfc2\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "b4e9a324121da3c2930d21dda6b1f193" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 17:53:41 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks\",\r\n \"value\": [\r\n {\r\n \"Schedules\": [\r\n {\r\n \"odata.type\": \"AutomationApi.V2014_03_13.OneTimeSchedule\",\r\n \"ScheduleID\": \"837eaad3-2043-4a2d-995d-bea247ab8378\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"Name\": \"s01\",\r\n \"Description\": null,\r\n \"StartTime\": \"2014-04-30T06:30:00\",\r\n \"ExpiryTime\": \"2014-04-30T06:30:00\",\r\n \"CreationTime\": \"2014-04-29T00:00:34.637\",\r\n \"LastModifiedTime\": \"2014-04-29T00:00:34.637\",\r\n \"IsEnabled\": true,\r\n \"NextRun\": null\r\n }\r\n ],\r\n \"#OrchestratorApi.Publish\": {},\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"17c9a137-d057-459d-bde3-68a5da1ff9b0\",\r\n \"RunbookName\": \"myrunbook3\",\r\n \"CreationTime\": \"2014-04-24T23:44:33\",\r\n \"LastModifiedTime\": \"2014-04-24T23:44:57.683\",\r\n \"LastModifiedBy\": \"oaastest@live.com\",\r\n \"Description\": null,\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"3f4a63e6-8ee2-4a0e-8d1c-9088af655a8b\",\r\n \"DraftRunbookVersionID\": \"c465d82a-bf38-4cb2-98b9-510485641f3f\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a3187c8801e4a1f58d3444ea63128671" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 17:53:42 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=qwgg3btg033x5fbpvs0xbgk4; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookVersions?api-version=2014-03-13_Preview", + "RequestMethod": "POST", + "RequestBody": "Workflow Test-Workflow { \r\n get-date\r\n start-sleep -s 40\r\n get-date\r\n}", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#RunbookVersions/@Element\",\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'541ed62d-2165-4b3e-8fca-2a86295ec819')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"odata.mediaETag\": \"\\\"635375012233770000\\\"\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookVersionID\": \"541ed62d-2165-4b3e-8fca-2a86295ec819\",\r\n \"RunbookID\": \"00000000-0000-0000-0000-000000000000\",\r\n \"VersionNumber\": 0,\r\n \"IsDraft\": false,\r\n \"CreationTime\": \"0001-01-01T00:00:00\",\r\n \"LastModifiedTime\": \"0001-01-01T00:00:00\"\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-location": [ + "https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/RunbookVersions(guid'541ed62d-2165-4b3e-8fca-2a86295ec819')" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ef33de489589ab67a5ae966f13076044" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 17:53:43 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=tkhqoe1g22snsdfpv44bkiu3; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookVersions(guid'541ed62d-2165-4b3e-8fca-2a86295ec819')?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#RunbookVersions/@Element\",\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'541ed62d-2165-4b3e-8fca-2a86295ec819')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"odata.mediaETag\": \"\\\"635375012233770000\\\"\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookVersionID\": \"541ed62d-2165-4b3e-8fca-2a86295ec819\",\r\n \"RunbookID\": \"97477aa2-2457-4f9b-be3c-f344260f81fb\",\r\n \"VersionNumber\": 1,\r\n \"IsDraft\": true,\r\n \"CreationTime\": \"2014-06-04T17:53:43.377\",\r\n \"LastModifiedTime\": \"2014-06-04T17:53:43.377\"\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "5eb04f0a84c0a69e9073a58db72dad8b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 17:53:43 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'97477aa2-2457-4f9b-be3c-f344260f81fb')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Publish\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"97477aa2-2457-4f9b-be3c-f344260f81fb\",\r\n \"RunbookName\": \"Test-Workflow\",\r\n \"CreationTime\": \"2014-06-04T17:53:43.377\",\r\n \"LastModifiedTime\": \"2014-06-04T17:53:43.377\",\r\n \"LastModifiedBy\": null,\r\n \"Description\": null,\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": null,\r\n \"DraftRunbookVersionID\": \"541ed62d-2165-4b3e-8fca-2a86295ec819\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9cab05098d48ad9d9206e76deaf9641b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 17:53:44 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'97477aa2-2457-4f9b-be3c-f344260f81fb')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Publish\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"97477aa2-2457-4f9b-be3c-f344260f81fb\",\r\n \"RunbookName\": \"Test-Workflow\",\r\n \"CreationTime\": \"2014-06-04T17:53:43.377\",\r\n \"LastModifiedTime\": \"2014-06-04T17:53:45.21\",\r\n \"LastModifiedBy\": null,\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": null,\r\n \"DraftRunbookVersionID\": \"541ed62d-2165-4b3e-8fca-2a86295ec819\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f790eeaa942da7e986f8c4cd0c44b98b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 17:53:45 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'97477aa2-2457-4f9b-be3c-f344260f81fb')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Publish\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"97477aa2-2457-4f9b-be3c-f344260f81fb\",\r\n \"RunbookName\": \"Test-Workflow\",\r\n \"CreationTime\": \"2014-06-04T17:53:43.377\",\r\n \"LastModifiedTime\": \"2014-06-04T17:53:45.21\",\r\n \"LastModifiedBy\": null,\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": null,\r\n \"DraftRunbookVersionID\": \"541ed62d-2165-4b3e-8fca-2a86295ec819\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "40073e81943da31e9ec7868207060545" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 17:53:45 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'97477aa2-2457-4f9b-be3c-f344260f81fb')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"97477aa2-2457-4f9b-be3c-f344260f81fb\",\r\n \"RunbookName\": \"Test-Workflow\",\r\n \"CreationTime\": \"2014-06-04T17:53:43.377\",\r\n \"LastModifiedTime\": \"2014-06-04T17:53:47.97\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"0fe02fef-e2d3-4eac-a404-0fd74f3a7f9b\",\r\n \"DraftRunbookVersionID\": null,\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f006a974ab53a1efac08e88396d69862" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 17:53:48 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'97477aa2-2457-4f9b-be3c-f344260f81fb')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"97477aa2-2457-4f9b-be3c-f344260f81fb\",\r\n \"RunbookName\": \"Test-Workflow\",\r\n \"CreationTime\": \"2014-06-04T17:53:43.377\",\r\n \"LastModifiedTime\": \"2014-06-04T17:53:47.97\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"0fe02fef-e2d3-4eac-a404-0fd74f3a7f9b\",\r\n \"DraftRunbookVersionID\": null,\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "1de46e90c7ebacd7a257a4c7a8f03134" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 17:53:59 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'97477aa2-2457-4f9b-be3c-f344260f81fb')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [\r\n {\r\n \"odata.type\": \"AutomationApi.V2014_03_13.OneTimeSchedule\",\r\n \"ScheduleID\": \"5ab67aed-86ed-447b-a3f0-4b81d3e444d5\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"Name\": \"oneTimeSchedule\",\r\n \"Description\": null,\r\n \"StartTime\": \"2014-06-04T18:00:00\",\r\n \"ExpiryTime\": \"2014-06-04T18:00:00\",\r\n \"CreationTime\": \"2014-06-04T17:53:50.393\",\r\n \"LastModifiedTime\": \"2014-06-04T17:53:50.393\",\r\n \"IsEnabled\": true,\r\n \"NextRun\": \"2014-06-04T18:00:00\"\r\n }\r\n ],\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"97477aa2-2457-4f9b-be3c-f344260f81fb\",\r\n \"RunbookName\": \"Test-Workflow\",\r\n \"CreationTime\": \"2014-06-04T17:53:43.377\",\r\n \"LastModifiedTime\": \"2014-06-04T17:53:47.97\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"0fe02fef-e2d3-4eac-a404-0fd74f3a7f9b\",\r\n \"DraftRunbookVersionID\": null,\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "3ad5d4d2120faf28b39ce1bad23ebab7" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 17:54:02 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'97477aa2-2457-4f9b-be3c-f344260f81fb')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [\r\n {\r\n \"odata.type\": \"AutomationApi.V2014_03_13.OneTimeSchedule\",\r\n \"ScheduleID\": \"5ab67aed-86ed-447b-a3f0-4b81d3e444d5\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"Name\": \"oneTimeSchedule\",\r\n \"Description\": null,\r\n \"StartTime\": \"2014-06-04T18:00:00\",\r\n \"ExpiryTime\": \"2014-06-04T18:00:00\",\r\n \"CreationTime\": \"2014-06-04T17:53:50.393\",\r\n \"LastModifiedTime\": \"2014-06-04T17:53:50.393\",\r\n \"IsEnabled\": true,\r\n \"NextRun\": \"2014-06-04T18:00:00\"\r\n }\r\n ],\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"97477aa2-2457-4f9b-be3c-f344260f81fb\",\r\n \"RunbookName\": \"Test-Workflow\",\r\n \"CreationTime\": \"2014-06-04T17:53:43.377\",\r\n \"LastModifiedTime\": \"2014-06-04T17:53:47.97\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"0fe02fef-e2d3-4eac-a404-0fd74f3a7f9b\",\r\n \"DraftRunbookVersionID\": null,\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f3dd51e845eca0c29d4202d4f96f1c2e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 17:54:03 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'97477aa2-2457-4f9b-be3c-f344260f81fb')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [\r\n {\r\n \"odata.type\": \"AutomationApi.V2014_03_13.OneTimeSchedule\",\r\n \"ScheduleID\": \"5ab67aed-86ed-447b-a3f0-4b81d3e444d5\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"Name\": \"oneTimeSchedule\",\r\n \"Description\": null,\r\n \"StartTime\": \"2014-06-04T18:00:00\",\r\n \"ExpiryTime\": \"2014-06-04T18:00:00\",\r\n \"CreationTime\": \"2014-06-04T17:53:50.393\",\r\n \"LastModifiedTime\": \"2014-06-04T17:53:50.393\",\r\n \"IsEnabled\": true,\r\n \"NextRun\": \"2014-06-04T18:00:00\"\r\n },\r\n {\r\n \"odata.type\": \"AutomationApi.V2014_03_13.DailySchedule\",\r\n \"ScheduleID\": \"be4c566c-40d9-481f-874d-b52289c7409d\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"Name\": \"dailySchedule\",\r\n \"Description\": null,\r\n \"StartTime\": \"2014-06-05T17:53:00\",\r\n \"ExpiryTime\": \"2014-06-07T17:53:53.498307\",\r\n \"CreationTime\": \"2014-06-04T17:53:54.597\",\r\n \"LastModifiedTime\": \"2014-06-04T17:53:54.597\",\r\n \"IsEnabled\": true,\r\n \"NextRun\": \"2014-06-05T17:53:00\",\r\n \"DayInterval\": 1\r\n }\r\n ],\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"97477aa2-2457-4f9b-be3c-f344260f81fb\",\r\n \"RunbookName\": \"Test-Workflow\",\r\n \"CreationTime\": \"2014-06-04T17:53:43.377\",\r\n \"LastModifiedTime\": \"2014-06-04T17:53:47.97\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"0fe02fef-e2d3-4eac-a404-0fd74f3a7f9b\",\r\n \"DraftRunbookVersionID\": null,\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "2bdce7c291d3a9b5ae15731befe5e472" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 17:54:04 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'97477aa2-2457-4f9b-be3c-f344260f81fb')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [\r\n {\r\n \"odata.type\": \"AutomationApi.V2014_03_13.OneTimeSchedule\",\r\n \"ScheduleID\": \"5ab67aed-86ed-447b-a3f0-4b81d3e444d5\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"Name\": \"oneTimeSchedule\",\r\n \"Description\": \"Daily Schedule Description\",\r\n \"StartTime\": \"2014-06-04T18:00:00\",\r\n \"ExpiryTime\": \"2014-06-04T18:00:00\",\r\n \"CreationTime\": \"2014-06-04T17:53:50.393\",\r\n \"LastModifiedTime\": \"2014-06-04T18:01:42.52\",\r\n \"IsEnabled\": true,\r\n \"NextRun\": null\r\n }\r\n ],\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"97477aa2-2457-4f9b-be3c-f344260f81fb\",\r\n \"RunbookName\": \"Test-Workflow\",\r\n \"CreationTime\": \"2014-06-04T17:53:43.377\",\r\n \"LastModifiedTime\": \"2014-06-04T17:53:47.97\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"0fe02fef-e2d3-4eac-a404-0fd74f3a7f9b\",\r\n \"DraftRunbookVersionID\": null,\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "24195ab915b4a2ce978d0f5ff2c04e29" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:01:43 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'97477aa2-2457-4f9b-be3c-f344260f81fb')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\"odata.error\":{\"code\":\"\",\"message\":{\"lang\":\"en-US\",\"value\":\"Resource not found for the segment 'Runbooks'.\"}}}", + "ResponseHeaders": { + "Date": [ + "Wed, 04 Jun 2014 18:01:51 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'97477aa2-2457-4f9b-be3c-f344260f81fb')?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"#OrchestratorApi.Publish\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"97477aa2-2457-4f9b-be3c-f344260f81fb\",\r\n \"RunbookName\": \"Test-Workflow\",\r\n \"CreationTime\": \"2014-06-04T17:53:43.377\",\r\n \"LastModifiedTime\": \"2014-06-04T17:53:43.377\",\r\n \"LastModifiedBy\": null,\r\n \"Description\": null,\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": null,\r\n \"DraftRunbookVersionID\": \"541ed62d-2165-4b3e-8fca-2a86295ec819\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "aa52adea663ea95494203a53f5b75e16" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 17:53:44 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'97477aa2-2457-4f9b-be3c-f344260f81fb')?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"97477aa2-2457-4f9b-be3c-f344260f81fb\",\r\n \"RunbookName\": \"Test-Workflow\",\r\n \"CreationTime\": \"2014-06-04T17:53:43.377\",\r\n \"LastModifiedTime\": \"2014-06-04T17:53:47.97\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"0fe02fef-e2d3-4eac-a404-0fd74f3a7f9b\",\r\n \"DraftRunbookVersionID\": null,\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "cc4da06d0058ab04aada4db8e2fcb4c1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:01:05 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=icuuq5c1zhhmke1mvcwy3cls; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'97477aa2-2457-4f9b-be3c-f344260f81fb')?api-version=2014-03-13_Preview", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"97477aa2-2457-4f9b-be3c-f344260f81fb\",\r\n \"RunbookName\": \"Test-Workflow\",\r\n \"CreationTime\": \"2014-06-04T17:53:43.377\",\r\n \"LastModifiedTime\": \"2014-06-04T17:53:43.377\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"DraftRunbookVersionID\": \"541ed62d-2165-4b3e-8fca-2a86295ec819\",\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false,\r\n \"Schedules\": []\r\n}", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "6066ff6ff18ea50290002ea62968be67" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 17:53:45 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks?$filter=RunbookName%20eq%20'Test-Workflow'&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks\",\r\n \"value\": [\r\n {\r\n \"#OrchestratorApi.Publish\": {},\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"97477aa2-2457-4f9b-be3c-f344260f81fb\",\r\n \"RunbookName\": \"Test-Workflow\",\r\n \"CreationTime\": \"2014-06-04T17:53:43.377\",\r\n \"LastModifiedTime\": \"2014-06-04T17:53:45.21\",\r\n \"LastModifiedBy\": null,\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": null,\r\n \"DraftRunbookVersionID\": \"541ed62d-2165-4b3e-8fca-2a86295ec819\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "1f42494ac4e8a26db7bf65eb438bfea8" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 17:53:46 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=k3y1ahviumwmyrj2iw34zfk4; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks?$filter=RunbookName%20eq%20'Test-Workflow'&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks\",\r\n \"value\": [\r\n {\r\n \"#OrchestratorApi.Publish\": {},\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"97477aa2-2457-4f9b-be3c-f344260f81fb\",\r\n \"RunbookName\": \"Test-Workflow\",\r\n \"CreationTime\": \"2014-06-04T17:53:43.377\",\r\n \"LastModifiedTime\": \"2014-06-04T17:53:47.97\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"0fe02fef-e2d3-4eac-a404-0fd74f3a7f9b\",\r\n \"DraftRunbookVersionID\": null,\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "47c424032322a2a5a15e6c982b3a34bd" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 17:53:58 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=s4goib5lbulsiujpi0uf1ayy; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks?$filter=RunbookName%20eq%20'Test-Workflow'&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks\",\r\n \"value\": [\r\n {\r\n \"#OrchestratorApi.Publish\": {},\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"97477aa2-2457-4f9b-be3c-f344260f81fb\",\r\n \"RunbookName\": \"Test-Workflow\",\r\n \"CreationTime\": \"2014-06-04T17:53:43.377\",\r\n \"LastModifiedTime\": \"2014-06-04T17:53:47.97\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"0fe02fef-e2d3-4eac-a404-0fd74f3a7f9b\",\r\n \"DraftRunbookVersionID\": null,\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "6cd20f920d5ea8c1a5e93e2b51983d87" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:01:41 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=45knabs2015gnowqir2tisii; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'97477aa2-2457-4f9b-be3c-f344260f81fb')/Publish?api-version=2014-03-13_Preview", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-automation-client-request-user-identity": [ + "PowerShell" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Edm.Guid\",\r\n \"value\": \"0fe02fef-e2d3-4eac-a404-0fd74f3a7f9b\"\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c0a1e35b60b0a75897a586d921564a2d" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 17:53:48 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Schedules?&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Schedules\",\r\n \"value\": [\r\n {\r\n \"odata.type\": \"AutomationApi.V2014_03_13.OneTimeSchedule\",\r\n \"ScheduleID\": \"837eaad3-2043-4a2d-995d-bea247ab8378\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"Name\": \"s01\",\r\n \"Description\": null,\r\n \"StartTime\": \"2014-04-30T06:30:00\",\r\n \"ExpiryTime\": \"2014-04-30T06:30:00\",\r\n \"CreationTime\": \"2014-04-29T00:00:34.637\",\r\n \"LastModifiedTime\": \"2014-04-29T00:00:34.637\",\r\n \"IsEnabled\": true,\r\n \"NextRun\": null\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d089fc7114a3ab6dae55b5dd81ee8c75" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 17:53:50 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=boclvzjxuj5uqoavqsprm4ru; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Schedules?&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Schedules\",\r\n \"value\": [\r\n {\r\n \"odata.type\": \"AutomationApi.V2014_03_13.OneTimeSchedule\",\r\n \"ScheduleID\": \"5ab67aed-86ed-447b-a3f0-4b81d3e444d5\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"Name\": \"oneTimeSchedule\",\r\n \"Description\": null,\r\n \"StartTime\": \"2014-06-04T18:00:00\",\r\n \"ExpiryTime\": \"2014-06-04T18:00:00\",\r\n \"CreationTime\": \"2014-06-04T17:53:50.393\",\r\n \"LastModifiedTime\": \"2014-06-04T17:53:50.393\",\r\n \"IsEnabled\": true,\r\n \"NextRun\": \"2014-06-04T18:00:00\"\r\n },\r\n {\r\n \"odata.type\": \"AutomationApi.V2014_03_13.OneTimeSchedule\",\r\n \"ScheduleID\": \"837eaad3-2043-4a2d-995d-bea247ab8378\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"Name\": \"s01\",\r\n \"Description\": null,\r\n \"StartTime\": \"2014-04-30T06:30:00\",\r\n \"ExpiryTime\": \"2014-04-30T06:30:00\",\r\n \"CreationTime\": \"2014-04-29T00:00:34.637\",\r\n \"LastModifiedTime\": \"2014-04-29T00:00:34.637\",\r\n \"IsEnabled\": true,\r\n \"NextRun\": null\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "51ce824cf4ada08d82aa59e32ca0baf3" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 17:53:53 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=qr3tfgire45hsglvyygbrqop; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Schedules?$filter=Name%20eq%20'oneTimeSchedule'&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Schedules\",\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "265e2ba359d6a440b4813cc70daee1d3" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 17:53:50 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=xldc4hu3i5c1kpjer5rij2vs; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Schedules?$filter=Name%20eq%20'oneTimeSchedule'&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Schedules\",\r\n \"value\": [\r\n {\r\n \"odata.type\": \"AutomationApi.V2014_03_13.OneTimeSchedule\",\r\n \"ScheduleID\": \"5ab67aed-86ed-447b-a3f0-4b81d3e444d5\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"Name\": \"oneTimeSchedule\",\r\n \"Description\": null,\r\n \"StartTime\": \"2014-06-04T18:00:00\",\r\n \"ExpiryTime\": \"2014-06-04T18:00:00\",\r\n \"CreationTime\": \"2014-06-04T17:53:50.393\",\r\n \"LastModifiedTime\": \"2014-06-04T17:53:50.393\",\r\n \"IsEnabled\": true,\r\n \"NextRun\": \"2014-06-04T18:00:00\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "868f30678648ad978d7721cebacc8dd8" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 17:53:51 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=h3t4hzn1cjjztxpxxo0adp3e; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Schedules?$filter=Name%20eq%20'oneTimeSchedule'&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Schedules\",\r\n \"value\": [\r\n {\r\n \"odata.type\": \"AutomationApi.V2014_03_13.OneTimeSchedule\",\r\n \"ScheduleID\": \"5ab67aed-86ed-447b-a3f0-4b81d3e444d5\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"Name\": \"oneTimeSchedule\",\r\n \"Description\": null,\r\n \"StartTime\": \"2014-06-04T18:00:00\",\r\n \"ExpiryTime\": \"2014-06-04T18:00:00\",\r\n \"CreationTime\": \"2014-06-04T17:53:50.393\",\r\n \"LastModifiedTime\": \"2014-06-04T17:53:50.393\",\r\n \"IsEnabled\": true,\r\n \"NextRun\": \"2014-06-04T18:00:00\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "adacba7df56aa020815c99c321e41b9f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 17:54:00 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=qf4umlo0axo150nodgciv45u; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.85", + "(rd_rdfe_stable.140604-0056)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Schedules?$filter=Name%20eq%20'oneTimeSchedule'&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Schedules\",\r\n \"value\": [\r\n {\r\n \"odata.type\": \"AutomationApi.V2014_03_13.OneTimeSchedule\",\r\n \"ScheduleID\": \"5ab67aed-86ed-447b-a3f0-4b81d3e444d5\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"Name\": \"oneTimeSchedule\",\r\n \"Description\": null,\r\n \"StartTime\": \"2014-06-04T18:00:00\",\r\n \"ExpiryTime\": \"2014-06-04T18:00:00\",\r\n \"CreationTime\": \"2014-06-04T17:53:50.393\",\r\n \"LastModifiedTime\": \"2014-06-04T17:53:50.393\",\r\n \"IsEnabled\": true,\r\n \"NextRun\": null\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c08224cdf483af9aa48aabfd3b05d519" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:01:37 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=tfavujgasyf03jcuywqv30b4; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Schedules?$filter=Name%20eq%20'oneTimeSchedule'&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Schedules\",\r\n \"value\": [\r\n {\r\n \"odata.type\": \"AutomationApi.V2014_03_13.OneTimeSchedule\",\r\n \"ScheduleID\": \"5ab67aed-86ed-447b-a3f0-4b81d3e444d5\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"Name\": \"oneTimeSchedule\",\r\n \"Description\": \"Daily Schedule Description\",\r\n \"StartTime\": \"2014-06-04T18:00:00\",\r\n \"ExpiryTime\": \"2014-06-04T18:00:00\",\r\n \"CreationTime\": \"2014-06-04T17:53:50.393\",\r\n \"LastModifiedTime\": \"2014-06-04T18:01:38.74\",\r\n \"IsEnabled\": true,\r\n \"NextRun\": null\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "afda44a3e729a494a878f66169089c65" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:01:40 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=c3erqumfh5xip2buv0gd5ulq; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Schedules?$filter=Name%20eq%20'oneTimeSchedule'&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Schedules\",\r\n \"value\": [\r\n {\r\n \"odata.type\": \"AutomationApi.V2014_03_13.OneTimeSchedule\",\r\n \"ScheduleID\": \"5ab67aed-86ed-447b-a3f0-4b81d3e444d5\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"Name\": \"oneTimeSchedule\",\r\n \"Description\": \"Daily Schedule Description\",\r\n \"StartTime\": \"2014-06-04T18:00:00\",\r\n \"ExpiryTime\": \"2014-06-04T18:00:00\",\r\n \"CreationTime\": \"2014-06-04T17:53:50.393\",\r\n \"LastModifiedTime\": \"2014-06-04T18:01:42.52\",\r\n \"IsEnabled\": true,\r\n \"NextRun\": null\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "7ae6ed6304e8aa6da5af84ac8e4881e5" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:01:45 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=re0u1l5yleuapp0o4zwpiamy; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.85", + "(rd_rdfe_stable.140604-0056)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Schedules?$filter=Name%20eq%20'oneTimeSchedule'&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Schedules\",\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "11d01b67bfe8a846bc621f3549734823" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:01:47 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=wijaqzdo5lknxyfxaz1lrqar; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Schedules?api-version=2014-03-13_Preview", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"Name\": \"oneTimeSchedule\",\r\n \"StartTime\": \"2014-06-04T18:00:49.6164145Z\",\r\n \"ExpiryTime\": \"9999-12-31T00:00:00Z\",\r\n \"CreationTime\": \"0001-01-01T00:00:00\",\r\n \"LastModifiedTime\": \"0001-01-01T00:00:00\",\r\n \"IsEnabled\": false,\r\n \"odata.type\": \"AutomationApi.V2014_03_13.OneTimeSchedule\"\r\n}", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Schedules/AutomationApi.V2014_03_13.OneTimeSchedule/@Element\",\r\n \"ScheduleID\": \"5ab67aed-86ed-447b-a3f0-4b81d3e444d5\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"Name\": \"oneTimeSchedule\",\r\n \"Description\": null,\r\n \"StartTime\": \"2014-06-04T18:00:00\",\r\n \"ExpiryTime\": \"9999-12-31T00:00:00Z\",\r\n \"CreationTime\": \"0001-01-01T00:00:00\",\r\n \"LastModifiedTime\": \"0001-01-01T00:00:00\",\r\n \"IsEnabled\": false,\r\n \"NextRun\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-location": [ + "https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/Schedules(guid'5ab67aed-86ed-447b-a3f0-4b81d3e444d5')/AutomationApi.V2014_03_13.OneTimeSchedule" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "3c38c29960f2af1b9221280fdee46cd1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 17:53:50 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Schedules?api-version=2014-03-13_Preview", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"Name\": \"dailySchedule\",\r\n \"StartTime\": \"2014-06-05T17:53:53.4973059Z\",\r\n \"ExpiryTime\": \"2014-06-07T17:53:53.498307Z\",\r\n \"CreationTime\": \"0001-01-01T00:00:00\",\r\n \"LastModifiedTime\": \"0001-01-01T00:00:00\",\r\n \"IsEnabled\": false,\r\n \"DayInterval\": 1,\r\n \"odata.type\": \"AutomationApi.V2014_03_13.DailySchedule\"\r\n}", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Schedules/AutomationApi.V2014_03_13.DailySchedule/@Element\",\r\n \"ScheduleID\": \"be4c566c-40d9-481f-874d-b52289c7409d\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"Name\": \"dailySchedule\",\r\n \"Description\": null,\r\n \"StartTime\": \"2014-06-05T17:53:00\",\r\n \"ExpiryTime\": \"2014-06-07T17:53:53.498307Z\",\r\n \"CreationTime\": \"0001-01-01T00:00:00\",\r\n \"LastModifiedTime\": \"0001-01-01T00:00:00\",\r\n \"IsEnabled\": false,\r\n \"NextRun\": null,\r\n \"DayInterval\": 1\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-location": [ + "https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/Schedules(guid'be4c566c-40d9-481f-874d-b52289c7409d')/AutomationApi.V2014_03_13.DailySchedule" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "468ddc1e6b3daefe8560dbab01366e71" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 17:53:54 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Schedules(guid'5ab67aed-86ed-447b-a3f0-4b81d3e444d5')?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Schedules/@Element\",\r\n \"odata.type\": \"AutomationApi.V2014_03_13.OneTimeSchedule\",\r\n \"ScheduleID\": \"5ab67aed-86ed-447b-a3f0-4b81d3e444d5\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"Name\": \"oneTimeSchedule\",\r\n \"Description\": null,\r\n \"StartTime\": \"2014-06-04T18:00:00\",\r\n \"ExpiryTime\": \"2014-06-04T18:00:00\",\r\n \"CreationTime\": \"2014-06-04T17:53:50.393\",\r\n \"LastModifiedTime\": \"2014-06-04T17:53:50.393\",\r\n \"IsEnabled\": true,\r\n \"NextRun\": \"2014-06-04T18:00:00\"\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "377a9e3a7ad4a99999b006efce839586" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 17:53:51 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Schedules(guid'5ab67aed-86ed-447b-a3f0-4b81d3e444d5')?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Schedules/@Element\",\r\n \"odata.type\": \"AutomationApi.V2014_03_13.OneTimeSchedule\",\r\n \"ScheduleID\": \"5ab67aed-86ed-447b-a3f0-4b81d3e444d5\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"Name\": \"oneTimeSchedule\",\r\n \"Description\": \"Daily Schedule Description\",\r\n \"StartTime\": \"2014-06-04T18:00:00\",\r\n \"ExpiryTime\": \"2014-06-04T18:00:00\",\r\n \"CreationTime\": \"2014-06-04T17:53:50.393\",\r\n \"LastModifiedTime\": \"2014-06-04T18:01:38.74\",\r\n \"IsEnabled\": true,\r\n \"NextRun\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "453c33b3d14aae1599488de32516b077" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:01:39 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Schedules?$filter=Name%20eq%20'dailySchedule'&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Schedules\",\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "5584c2c7a84da47882eb89d6e6fe36f0" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 17:53:54 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=n01i0ij0quoj3yysrdvzg3n2; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Schedules?$filter=Name%20eq%20'dailySchedule'&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Schedules\",\r\n \"value\": [\r\n {\r\n \"odata.type\": \"AutomationApi.V2014_03_13.DailySchedule\",\r\n \"ScheduleID\": \"be4c566c-40d9-481f-874d-b52289c7409d\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"Name\": \"dailySchedule\",\r\n \"Description\": null,\r\n \"StartTime\": \"2014-06-05T17:53:00\",\r\n \"ExpiryTime\": \"2014-06-07T17:53:53.498307\",\r\n \"CreationTime\": \"2014-06-04T17:53:54.597\",\r\n \"LastModifiedTime\": \"2014-06-04T17:53:54.597\",\r\n \"IsEnabled\": true,\r\n \"NextRun\": \"2014-06-05T17:53:00\",\r\n \"DayInterval\": 1\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9cf29c8377daaa82ac8284ef261bd034" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 17:53:57 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=guvm2x0mlkuhowxauqqq5hrf; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Schedules?$filter=Name%20eq%20'dailySchedule'&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Schedules\",\r\n \"value\": [\r\n {\r\n \"odata.type\": \"AutomationApi.V2014_03_13.DailySchedule\",\r\n \"ScheduleID\": \"be4c566c-40d9-481f-874d-b52289c7409d\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"Name\": \"dailySchedule\",\r\n \"Description\": null,\r\n \"StartTime\": \"2014-06-05T17:53:00\",\r\n \"ExpiryTime\": \"2014-06-07T17:53:53.498307\",\r\n \"CreationTime\": \"2014-06-04T17:53:54.597\",\r\n \"LastModifiedTime\": \"2014-06-04T17:53:54.597\",\r\n \"IsEnabled\": true,\r\n \"NextRun\": \"2014-06-05T17:53:00\",\r\n \"DayInterval\": 1\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "15a90da70ff1a00eb753dba5a1ec3816" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 17:54:01 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=wxglf5tyhnxd3svcpvnq0k2j; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Schedules?$filter=Name%20eq%20'dailySchedule'&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Schedules\",\r\n \"value\": [\r\n {\r\n \"odata.type\": \"AutomationApi.V2014_03_13.DailySchedule\",\r\n \"ScheduleID\": \"be4c566c-40d9-481f-874d-b52289c7409d\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"Name\": \"dailySchedule\",\r\n \"Description\": null,\r\n \"StartTime\": \"2014-06-05T17:53:00\",\r\n \"ExpiryTime\": \"2014-06-07T17:53:53.498307\",\r\n \"CreationTime\": \"2014-06-04T17:53:54.597\",\r\n \"LastModifiedTime\": \"2014-06-04T17:53:54.597\",\r\n \"IsEnabled\": true,\r\n \"NextRun\": \"2014-06-05T17:53:00\",\r\n \"DayInterval\": 1\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9459f7d4dd24a23ea36e94bbeda29767" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:01:41 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Schedules?$filter=Name%20eq%20'dailySchedule'&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Schedules\",\r\n \"value\": [\r\n {\r\n \"odata.type\": \"AutomationApi.V2014_03_13.DailySchedule\",\r\n \"ScheduleID\": \"be4c566c-40d9-481f-874d-b52289c7409d\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"Name\": \"dailySchedule\",\r\n \"Description\": null,\r\n \"StartTime\": \"2014-06-05T17:53:00\",\r\n \"ExpiryTime\": \"2014-06-07T17:53:53.498307\",\r\n \"CreationTime\": \"2014-06-04T17:53:54.597\",\r\n \"LastModifiedTime\": \"2014-06-04T18:01:42.527\",\r\n \"IsEnabled\": true,\r\n \"NextRun\": \"2014-06-05T17:53:00\",\r\n \"DayInterval\": 1\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ec85762c9ae1a4eca9bebb6ba3e5c8e4" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:01:47 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=1uqggms41hcilfdz4nwddi3h; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Schedules?$filter=Name%20eq%20'dailySchedule'&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Schedules\",\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "2146925fdf09aafc916c4fecc6b51f76" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:01:49 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=gbi23tubxbjk1xvw2fygmn1y; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Schedules(guid'be4c566c-40d9-481f-874d-b52289c7409d')?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Schedules/@Element\",\r\n \"odata.type\": \"AutomationApi.V2014_03_13.DailySchedule\",\r\n \"ScheduleID\": \"be4c566c-40d9-481f-874d-b52289c7409d\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"Name\": \"dailySchedule\",\r\n \"Description\": null,\r\n \"StartTime\": \"2014-06-05T17:53:00\",\r\n \"ExpiryTime\": \"2014-06-07T17:53:53.498307\",\r\n \"CreationTime\": \"2014-06-04T17:53:54.597\",\r\n \"LastModifiedTime\": \"2014-06-04T17:53:54.597\",\r\n \"IsEnabled\": true,\r\n \"NextRun\": \"2014-06-05T17:53:00\",\r\n \"DayInterval\": 1\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "678022012ed2ac9aa5629b4f63f5c5b3" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 17:53:55 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookParameters?$filter=RunbookVersionID%20eq%20guid'0fe02fef-e2d3-4eac-a404-0fd74f3a7f9b'&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#RunbookParameters\",\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ef1a5a81c9c6ad4fb3acb517fd71d572" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 17:54:00 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookParameters?$filter=RunbookVersionID%20eq%20guid'0fe02fef-e2d3-4eac-a404-0fd74f3a7f9b'&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#RunbookParameters\",\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "988c9dae6bbbaa6f89d43d46b770a20f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 17:54:03 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'97477aa2-2457-4f9b-be3c-f344260f81fb')/StartOnSchedule?api-version=2014-03-13_Preview", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"parameters\": [\r\n {\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\"\r\n }\r\n ],\r\n \"scheduleId\": \"5ab67aed-86ed-447b-a3f0-4b81d3e444d5\"\r\n}", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Edm.Guid\",\r\n \"value\": \"7320dee9-1938-4e74-9a4f-2c15e8ea7655\"\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a8963a4c42b7ad4c82d03845901ebdeb" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 17:54:00 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'97477aa2-2457-4f9b-be3c-f344260f81fb')/StartOnSchedule?api-version=2014-03-13_Preview", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"parameters\": [\r\n {\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\"\r\n }\r\n ],\r\n \"scheduleId\": \"be4c566c-40d9-481f-874d-b52289c7409d\"\r\n}", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Edm.Guid\",\r\n \"value\": \"eb99098b-d28d-4941-9a15-f0703c3a4ab9\"\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "e0bb155a43bbacceaabc60ebfeeddf74" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 17:54:04 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs?$filter=JobContext/RunbookVersion/RunbookID%20eq%20guid'97477aa2-2457-4f9b-be3c-f344260f81fb'%20and%20JobContext/RunbookVersion/IsDraft%20eq%20false&$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"value\": [\r\n {\r\n \"odata.mediaReadLink\": \"Jobs(guid'8163ae33-d15b-4fa3-a180-8c3510514c73')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'0fe02fef-e2d3-4eac-a404-0fd74f3a7f9b')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"97477aa2-2457-4f9b-be3c-f344260f81fb\",\r\n \"RunbookName\": \"Test-Workflow\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"7320dee9-1938-4e74-9a4f-2c15e8ea7655\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": {\r\n \"odata.type\": \"AutomationApi.V2014_03_13.OneTimeSchedule\",\r\n \"Name\": \"oneTimeSchedule\"\r\n }\r\n },\r\n \"JobID\": \"8163ae33-d15b-4fa3-a180-8c3510514c73\",\r\n \"JobContextID\": \"7320dee9-1938-4e74-9a4f-2c15e8ea7655\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"JobStatus\": \"Running\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": \"2014-06-04T18:00:49.943\",\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-06-04T18:00:01.303\",\r\n \"LastModifiedTime\": \"2014-06-04T18:00:49.943\",\r\n \"LastStatusModifiedTime\": \"2014-06-04T18:00:49.943\",\r\n \"JobException\": null\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "258fba810808a5fb81b37219a0f76ecb" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:01:19 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'8163ae33-d15b-4fa3-a180-8c3510514c73')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'8163ae33-d15b-4fa3-a180-8c3510514c73')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'0fe02fef-e2d3-4eac-a404-0fd74f3a7f9b')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"97477aa2-2457-4f9b-be3c-f344260f81fb\",\r\n \"RunbookName\": \"Test-Workflow\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"7320dee9-1938-4e74-9a4f-2c15e8ea7655\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": {\r\n \"odata.type\": \"AutomationApi.V2014_03_13.OneTimeSchedule\",\r\n \"Name\": \"oneTimeSchedule\"\r\n }\r\n },\r\n \"JobID\": \"8163ae33-d15b-4fa3-a180-8c3510514c73\",\r\n \"JobContextID\": \"7320dee9-1938-4e74-9a4f-2c15e8ea7655\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"JobStatus\": \"Running\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": \"2014-06-04T18:00:49.943\",\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-06-04T18:00:01.303\",\r\n \"LastModifiedTime\": \"2014-06-04T18:00:49.943\",\r\n \"LastStatusModifiedTime\": \"2014-06-04T18:00:49.943\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "4db8c6652860ad498e0125cadfe6ef55" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:01:30 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=ovb1dxnvxrmbpahljr1vjvpd; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'8163ae33-d15b-4fa3-a180-8c3510514c73')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'8163ae33-d15b-4fa3-a180-8c3510514c73')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'0fe02fef-e2d3-4eac-a404-0fd74f3a7f9b')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"97477aa2-2457-4f9b-be3c-f344260f81fb\",\r\n \"RunbookName\": \"Test-Workflow\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"7320dee9-1938-4e74-9a4f-2c15e8ea7655\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": {\r\n \"odata.type\": \"AutomationApi.V2014_03_13.OneTimeSchedule\",\r\n \"Name\": \"oneTimeSchedule\"\r\n }\r\n },\r\n \"JobID\": \"8163ae33-d15b-4fa3-a180-8c3510514c73\",\r\n \"JobContextID\": \"7320dee9-1938-4e74-9a4f-2c15e8ea7655\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"JobStatus\": \"Completed\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": \"2014-06-04T18:00:49.943\",\r\n \"EndTime\": \"2014-06-04T18:01:33.39\",\r\n \"CreationTime\": \"2014-06-04T18:00:01.303\",\r\n \"LastModifiedTime\": \"2014-06-04T18:01:33.39\",\r\n \"LastStatusModifiedTime\": \"2014-06-04T18:01:33.39\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "2f7bc72bcf5da301988d499bf00d499d" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:01:37 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=r0hw2ebr0lzynrhjpivlahvd; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Schedules(guid'5ab67aed-86ed-447b-a3f0-4b81d3e444d5')?api-version=2014-03-13_Preview", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"ScheduleID\": \"5ab67aed-86ed-447b-a3f0-4b81d3e444d5\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"Name\": \"oneTimeSchedule\",\r\n \"Description\": \"Daily Schedule Description\",\r\n \"StartTime\": \"2014-06-04T18:00:00Z\",\r\n \"ExpiryTime\": \"2014-06-04T18:00:00Z\",\r\n \"CreationTime\": \"2014-06-04T17:53:50.393\",\r\n \"LastModifiedTime\": \"2014-06-04T17:53:50.393\",\r\n \"IsEnabled\": true,\r\n \"odata.type\": \"AutomationApi.V2014_03_13.OneTimeSchedule\"\r\n}", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "48973c0f9cc7acc99340f948b850155f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:01:38 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'97477aa2-2457-4f9b-be3c-f344260f81fb')/$links/Schedules(guid'be4c566c-40d9-481f-874d-b52289c7409d')?api-version=2014-03-13_Preview", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "6cc76f01f184a9bf8951da4487c52f63" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:01:42 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Schedules(guid'5ab67aed-86ed-447b-a3f0-4b81d3e444d5')?api-version=2014-03-13_Preview", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "0aeaac1fba77a9e39633b6a988694e53" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:01:45 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=sp0omyr424o0do5yg0xs0i3a; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Schedules(guid'be4c566c-40d9-481f-874d-b52289c7409d')?api-version=2014-03-13_Preview", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a8db79458cbca3e2b96cc1560865ebde" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:01:49 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'97477aa2-2457-4f9b-be3c-f344260f81fb')?api-version=2014-03-13_Preview", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b0974f8195d6a030b5463f4bdb0cc015" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:01:50 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=k2bqnbyg2r52ublhvq1e4pyl; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 204 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.AutomationTests/TestAutomationStartUnpublishedRunbook.json b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.AutomationTests/TestAutomationStartUnpublishedRunbook.json new file mode 100644 index 000000000000..c2660059b261 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.AutomationTests/TestAutomationStartUnpublishedRunbook.json @@ -0,0 +1,554 @@ +{ + "Entries": [ + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks\",\r\n \"value\": [\r\n {\r\n \"Schedules\": [\r\n {\r\n \"odata.type\": \"AutomationApi.V2014_03_13.OneTimeSchedule\",\r\n \"ScheduleID\": \"837eaad3-2043-4a2d-995d-bea247ab8378\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"Name\": \"s01\",\r\n \"Description\": null,\r\n \"StartTime\": \"2014-04-30T06:30:00\",\r\n \"ExpiryTime\": \"2014-04-30T06:30:00\",\r\n \"CreationTime\": \"2014-04-29T00:00:34.637\",\r\n \"LastModifiedTime\": \"2014-04-29T00:00:34.637\",\r\n \"IsEnabled\": true,\r\n \"NextRun\": null\r\n }\r\n ],\r\n \"#OrchestratorApi.Publish\": {},\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"17c9a137-d057-459d-bde3-68a5da1ff9b0\",\r\n \"RunbookName\": \"myrunbook3\",\r\n \"CreationTime\": \"2014-04-24T23:44:33\",\r\n \"LastModifiedTime\": \"2014-04-24T23:44:57.683\",\r\n \"LastModifiedBy\": \"oaastest@live.com\",\r\n \"Description\": null,\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"3f4a63e6-8ee2-4a0e-8d1c-9088af655a8b\",\r\n \"DraftRunbookVersionID\": \"c465d82a-bf38-4cb2-98b9-510485641f3f\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "36b912e23fe8a762967a049d69c63381" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:17 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=ojjoexi1mb0xb0blr3sckkuh; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookVersions?api-version=2014-03-13_Preview", + "RequestMethod": "POST", + "RequestBody": "workflow Test-WorkFlowWithVariousParameters\r\n{\r\n\tparam([string] $a, [int] $b, [DateTime] $c)\r\n \"a is \" + $a \r\n \"b is \" + $b \r\n \"c is \" + $c \r\n}", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#RunbookVersions/@Element\",\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'89bc1807-0f8a-43f7-87d6-a5d088c786e7')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"odata.mediaETag\": \"\\\"635375017374100000\\\"\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookVersionID\": \"89bc1807-0f8a-43f7-87d6-a5d088c786e7\",\r\n \"RunbookID\": \"00000000-0000-0000-0000-000000000000\",\r\n \"VersionNumber\": 0,\r\n \"IsDraft\": false,\r\n \"CreationTime\": \"0001-01-01T00:00:00\",\r\n \"LastModifiedTime\": \"0001-01-01T00:00:00\"\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-location": [ + "https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/RunbookVersions(guid'89bc1807-0f8a-43f7-87d6-a5d088c786e7')" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c5b03a7f570cadf69d2f0cd0b9ab8b19" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:17 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=q3blid150sgzcsejwnuk1mo4; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookVersions(guid'89bc1807-0f8a-43f7-87d6-a5d088c786e7')?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#RunbookVersions/@Element\",\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'89bc1807-0f8a-43f7-87d6-a5d088c786e7')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"odata.mediaETag\": \"\\\"635375017374100000\\\"\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookVersionID\": \"89bc1807-0f8a-43f7-87d6-a5d088c786e7\",\r\n \"RunbookID\": \"9fc9bd19-7c71-4267-a7c9-af12a1b90e17\",\r\n \"VersionNumber\": 1,\r\n \"IsDraft\": true,\r\n \"CreationTime\": \"2014-06-04T18:02:17.41\",\r\n \"LastModifiedTime\": \"2014-06-04T18:02:17.41\"\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "9150dbbfa630a890b80421adec2395d2" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:17 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'9fc9bd19-7c71-4267-a7c9-af12a1b90e17')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Publish\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"9fc9bd19-7c71-4267-a7c9-af12a1b90e17\",\r\n \"RunbookName\": \"Test-WorkFlowWithVariousParameters\",\r\n \"CreationTime\": \"2014-06-04T18:02:17.41\",\r\n \"LastModifiedTime\": \"2014-06-04T18:02:17.41\",\r\n \"LastModifiedBy\": null,\r\n \"Description\": null,\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": null,\r\n \"DraftRunbookVersionID\": \"89bc1807-0f8a-43f7-87d6-a5d088c786e7\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "23cb38fe879ca1f7865e6b1ef6c447da" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:20 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=w2nc0jkewfdqxfpj2czfwgy2; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.85", + "(rd_rdfe_stable.140604-0056)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'9fc9bd19-7c71-4267-a7c9-af12a1b90e17')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Publish\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"9fc9bd19-7c71-4267-a7c9-af12a1b90e17\",\r\n \"RunbookName\": \"Test-WorkFlowWithVariousParameters\",\r\n \"CreationTime\": \"2014-06-04T18:02:17.41\",\r\n \"LastModifiedTime\": \"2014-06-04T18:02:19.953\",\r\n \"LastModifiedBy\": null,\r\n \"Description\": \"Runbook Description\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": null,\r\n \"DraftRunbookVersionID\": \"89bc1807-0f8a-43f7-87d6-a5d088c786e7\",\r\n \"Tags\": \"tag1,tag2\",\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "2f833bf90a82a90885aded50d71bce00" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:20 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'9fc9bd19-7c71-4267-a7c9-af12a1b90e17')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Publish\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"9fc9bd19-7c71-4267-a7c9-af12a1b90e17\",\r\n \"RunbookName\": \"Test-WorkFlowWithVariousParameters\",\r\n \"CreationTime\": \"2014-06-04T18:02:17.41\",\r\n \"LastModifiedTime\": \"2014-06-04T18:02:19.953\",\r\n \"LastModifiedBy\": null,\r\n \"Description\": \"Runbook Description\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": null,\r\n \"DraftRunbookVersionID\": \"89bc1807-0f8a-43f7-87d6-a5d088c786e7\",\r\n \"Tags\": \"tag1,tag2\",\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "5481916b9068a86aa7eb9a096624d4b9" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:20 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'9fc9bd19-7c71-4267-a7c9-af12a1b90e17')?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"#OrchestratorApi.Publish\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"9fc9bd19-7c71-4267-a7c9-af12a1b90e17\",\r\n \"RunbookName\": \"Test-WorkFlowWithVariousParameters\",\r\n \"CreationTime\": \"2014-06-04T18:02:17.41\",\r\n \"LastModifiedTime\": \"2014-06-04T18:02:17.41\",\r\n \"LastModifiedBy\": null,\r\n \"Description\": null,\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": null,\r\n \"DraftRunbookVersionID\": \"89bc1807-0f8a-43f7-87d6-a5d088c786e7\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "027c8a292c23a3c5aab65dcd78057d68" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:19 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'9fc9bd19-7c71-4267-a7c9-af12a1b90e17')?api-version=2014-03-13_Preview", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"9fc9bd19-7c71-4267-a7c9-af12a1b90e17\",\r\n \"RunbookName\": \"Test-WorkFlowWithVariousParameters\",\r\n \"CreationTime\": \"2014-06-04T18:02:17.41\",\r\n \"LastModifiedTime\": \"2014-06-04T18:02:17.41\",\r\n \"Description\": \"Runbook Description\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"DraftRunbookVersionID\": \"89bc1807-0f8a-43f7-87d6-a5d088c786e7\",\r\n \"Tags\": \"tag1,tag2\",\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false,\r\n \"Schedules\": []\r\n}", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a150711b0f36a4e480c83d3a2a4adb2c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:19 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'9fc9bd19-7c71-4267-a7c9-af12a1b90e17')?api-version=2014-03-13_Preview", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "6c9309423fb0a85883f82ffd3d5d71f0" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:22 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=uvyxfymufdlvqeuyv1nr1mk4; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 204 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.AutomationTests/TestAutomationSuspendAndResumeJob.json b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.AutomationTests/TestAutomationSuspendAndResumeJob.json new file mode 100644 index 000000000000..297dae7d1f49 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.AutomationTests/TestAutomationSuspendAndResumeJob.json @@ -0,0 +1,2006 @@ +{ + "Entries": [ + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices?resourceType=AutomationAccount&detailLevel=Full&resourceProviderNamespace=automation", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n OaaSCSZV2MEWJSFZEUBUOS6RFER33W6CF6HZFLIHTKWAXRNBGWIHNJEUXQ-East-US\r\n \r\n OaaSCSZV2MEWJSFZEUBUOS6RFER33W6CF6HZFLIHTKWAXRNBGWIHNJEUXQ-East-US in East US\r\n East US\r\n \r\n \r\n automation\r\n AutomationAccount\r\n Automation509\r\n Preview\r\n 1.1\r\n c1251ced-1d0f-4cd8-9a9d-2b452f4283d2\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n automation\r\n AutomationAccount\r\n elvgAccount\r\n Preview\r\n 1.1\r\n 5692ec51-f3da-4795-a2a4-602c5919b91f\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n automation\r\n AutomationAccount\r\n submgmt\r\n Preview\r\n 1.1\r\n d53eecef-d95b-4f3e-a34a-78ce14550d41\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n automation\r\n AutomationAccount\r\n SuhasBugBash\r\n Preview\r\n 1.1\r\n 21e6ad99-4956-49aa-ae40-7d00d3a039a4\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n automation\r\n AutomationAccount\r\n TestAutomationAccount\r\n Preview\r\n 1.1\r\n 051d7050-e346-4f3e-9e09-bb421fe3d725\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n automation\r\n AutomationAccount\r\n Viv-0516\r\n Preview\r\n 1.1\r\n d8e578b0-d880-48a5-a92b-ef9698f8ff68\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n automation\r\n AutomationAccount\r\n AutomationAccount\r\n Preview\r\n 1.1\r\n 47e18c76-a0f5-4d45-8512-dac82e07cfc2\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "b0bcac941acba3a4805de86c35d548be" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:23 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks\",\r\n \"value\": [\r\n {\r\n \"Schedules\": [\r\n {\r\n \"odata.type\": \"AutomationApi.V2014_03_13.OneTimeSchedule\",\r\n \"ScheduleID\": \"837eaad3-2043-4a2d-995d-bea247ab8378\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"Name\": \"s01\",\r\n \"Description\": null,\r\n \"StartTime\": \"2014-04-30T06:30:00\",\r\n \"ExpiryTime\": \"2014-04-30T06:30:00\",\r\n \"CreationTime\": \"2014-04-29T00:00:34.637\",\r\n \"LastModifiedTime\": \"2014-04-29T00:00:34.637\",\r\n \"IsEnabled\": true,\r\n \"NextRun\": null\r\n }\r\n ],\r\n \"#OrchestratorApi.Publish\": {},\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"17c9a137-d057-459d-bde3-68a5da1ff9b0\",\r\n \"RunbookName\": \"myrunbook3\",\r\n \"CreationTime\": \"2014-04-24T23:44:33\",\r\n \"LastModifiedTime\": \"2014-04-24T23:44:57.683\",\r\n \"LastModifiedBy\": \"oaastest@live.com\",\r\n \"Description\": null,\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"3f4a63e6-8ee2-4a0e-8d1c-9088af655a8b\",\r\n \"DraftRunbookVersionID\": \"c465d82a-bf38-4cb2-98b9-510485641f3f\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "bd38620e2304af1f819c85a034c17f89" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:24 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=ule531mixv4jliodgddb2qs4; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookVersions?api-version=2014-03-13_Preview", + "RequestMethod": "POST", + "RequestBody": "workflow Use-WorkflowCheckpointSample\r\n{\r\n Write-Output \"Before Checkpoint.\"\r\n start-sleep -s 20\r\n\t\r\n # A checkpoint is created.\r\n Checkpoint-Workflow\r\n\r\n # This line occurs after the checkpoint. The runbook will start here on resume.\r\n Write-Output \"After Checkpoint.\"\r\n}", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#RunbookVersions/@Element\",\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'ee6d2d19-a2be-494b-ab88-b8425b74fda2')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"odata.mediaETag\": \"\\\"635375017454000000\\\"\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookVersionID\": \"ee6d2d19-a2be-494b-ab88-b8425b74fda2\",\r\n \"RunbookID\": \"00000000-0000-0000-0000-000000000000\",\r\n \"VersionNumber\": 0,\r\n \"IsDraft\": false,\r\n \"CreationTime\": \"0001-01-01T00:00:00\",\r\n \"LastModifiedTime\": \"0001-01-01T00:00:00\"\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-location": [ + "https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/RunbookVersions(guid'ee6d2d19-a2be-494b-ab88-b8425b74fda2')" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "fe5c11efc321af60b51abc320c12cbac" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:25 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=kisjtaln00z2eekqzyzzv3oj; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookVersions(guid'ee6d2d19-a2be-494b-ab88-b8425b74fda2')?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#RunbookVersions/@Element\",\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'ee6d2d19-a2be-494b-ab88-b8425b74fda2')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"odata.mediaETag\": \"\\\"635375017454000000\\\"\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookVersionID\": \"ee6d2d19-a2be-494b-ab88-b8425b74fda2\",\r\n \"RunbookID\": \"9f5bd4ad-86e4-46fb-a56d-ecff4a8d0df4\",\r\n \"VersionNumber\": 1,\r\n \"IsDraft\": true,\r\n \"CreationTime\": \"2014-06-04T18:02:25.4\",\r\n \"LastModifiedTime\": \"2014-06-04T18:02:25.4\"\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ef327ab09cd6a06cb517f022c67ae7bb" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:26 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'9f5bd4ad-86e4-46fb-a56d-ecff4a8d0df4')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Publish\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"9f5bd4ad-86e4-46fb-a56d-ecff4a8d0df4\",\r\n \"RunbookName\": \"Use-WorkflowCheckpointSample\",\r\n \"CreationTime\": \"2014-06-04T18:02:25.397\",\r\n \"LastModifiedTime\": \"2014-06-04T18:02:25.397\",\r\n \"LastModifiedBy\": null,\r\n \"Description\": null,\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": null,\r\n \"DraftRunbookVersionID\": \"ee6d2d19-a2be-494b-ab88-b8425b74fda2\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "0bca89d1356faa00994f518c407838f5" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:26 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'9f5bd4ad-86e4-46fb-a56d-ecff4a8d0df4')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Publish\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"9f5bd4ad-86e4-46fb-a56d-ecff4a8d0df4\",\r\n \"RunbookName\": \"Use-WorkflowCheckpointSample\",\r\n \"CreationTime\": \"2014-06-04T18:02:25.397\",\r\n \"LastModifiedTime\": \"2014-06-04T18:02:27.653\",\r\n \"LastModifiedBy\": null,\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": null,\r\n \"DraftRunbookVersionID\": \"ee6d2d19-a2be-494b-ab88-b8425b74fda2\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "34cc2679d3d5aaacaab1b7bdfce34752" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:28 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'9f5bd4ad-86e4-46fb-a56d-ecff4a8d0df4')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Publish\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"9f5bd4ad-86e4-46fb-a56d-ecff4a8d0df4\",\r\n \"RunbookName\": \"Use-WorkflowCheckpointSample\",\r\n \"CreationTime\": \"2014-06-04T18:02:25.397\",\r\n \"LastModifiedTime\": \"2014-06-04T18:02:27.653\",\r\n \"LastModifiedBy\": null,\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": null,\r\n \"DraftRunbookVersionID\": \"ee6d2d19-a2be-494b-ab88-b8425b74fda2\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8c6da9503d5ba106bca1c313c335f932" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:29 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=y2bop2niih5tdbg4wxtfhlp5; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.85", + "(rd_rdfe_stable.140604-0056)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'9f5bd4ad-86e4-46fb-a56d-ecff4a8d0df4')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"9f5bd4ad-86e4-46fb-a56d-ecff4a8d0df4\",\r\n \"RunbookName\": \"Use-WorkflowCheckpointSample\",\r\n \"CreationTime\": \"2014-06-04T18:02:25.397\",\r\n \"LastModifiedTime\": \"2014-06-04T18:02:30.257\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"eb6bef00-9829-447f-a780-d972c6e4b541\",\r\n \"DraftRunbookVersionID\": null,\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f89888a707bdaa2d80a5ec1ec5be8d90" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:30 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'9f5bd4ad-86e4-46fb-a56d-ecff4a8d0df4')?$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"Schedules\": [],\r\n \"#OrchestratorApi.Edit\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"9f5bd4ad-86e4-46fb-a56d-ecff4a8d0df4\",\r\n \"RunbookName\": \"Use-WorkflowCheckpointSample\",\r\n \"CreationTime\": \"2014-06-04T18:02:25.397\",\r\n \"LastModifiedTime\": \"2014-06-04T18:02:30.257\",\r\n \"LastModifiedBy\": \"PowerShell\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": \"eb6bef00-9829-447f-a780-d972c6e4b541\",\r\n \"DraftRunbookVersionID\": null,\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "179bd4404d9ea7cbb0a6c5e97163e068" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:32 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=34drkyg4ojtf0b45cwzbh1xe; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'9f5bd4ad-86e4-46fb-a56d-ecff4a8d0df4')?api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks/@Element\",\r\n \"#OrchestratorApi.Publish\": {},\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"9f5bd4ad-86e4-46fb-a56d-ecff4a8d0df4\",\r\n \"RunbookName\": \"Use-WorkflowCheckpointSample\",\r\n \"CreationTime\": \"2014-06-04T18:02:25.397\",\r\n \"LastModifiedTime\": \"2014-06-04T18:02:25.397\",\r\n \"LastModifiedBy\": null,\r\n \"Description\": null,\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"PublishedRunbookVersionID\": null,\r\n \"DraftRunbookVersionID\": \"ee6d2d19-a2be-494b-ab88-b8425b74fda2\",\r\n \"Tags\": null,\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8f06f430f07da6e59f07a89d5dc20e06" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:27 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'9f5bd4ad-86e4-46fb-a56d-ecff4a8d0df4')?api-version=2014-03-13_Preview", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"RunbookID\": \"9f5bd4ad-86e4-46fb-a56d-ecff4a8d0df4\",\r\n \"RunbookName\": \"Use-WorkflowCheckpointSample\",\r\n \"CreationTime\": \"2014-06-04T18:02:25.397\",\r\n \"LastModifiedTime\": \"2014-06-04T18:02:25.397\",\r\n \"Description\": \"\",\r\n \"IsApiOnly\": false,\r\n \"IsGlobal\": false,\r\n \"DraftRunbookVersionID\": \"ee6d2d19-a2be-494b-ab88-b8425b74fda2\",\r\n \"LogDebug\": false,\r\n \"LogVerbose\": false,\r\n \"LogProgress\": false,\r\n \"Schedules\": []\r\n}", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "afa4596b0c4aa0a2b36cf90eee7b898c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:27 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'9f5bd4ad-86e4-46fb-a56d-ecff4a8d0df4')/Publish?api-version=2014-03-13_Preview", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-automation-client-request-user-identity": [ + "PowerShell" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Edm.Guid\",\r\n \"value\": \"eb6bef00-9829-447f-a780-d972c6e4b541\"\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "eac91fc6d53fa7e6ad77cea1299ab48a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:30 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=kz4mpr1wjr43g2b4vnmhnxph; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/RunbookParameters?$filter=RunbookVersionID%20eq%20guid'eb6bef00-9829-447f-a780-d972c6e4b541'&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#RunbookParameters\",\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b9892895afb4af8d9faa6eb7e6abc886" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:32 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'9f5bd4ad-86e4-46fb-a56d-ecff4a8d0df4')/Start?api-version=2014-03-13_Preview", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"parameters\": [\r\n {\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\"\r\n }\r\n ]\r\n}", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Edm.Guid\",\r\n \"value\": \"71723a0e-bdda-4857-a7fe-0b8112fd89df\"\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "2130ea373160ab2393ffec6cd40647f1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:33 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'71723a0e-bdda-4857-a7fe-0b8112fd89df')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'71723a0e-bdda-4857-a7fe-0b8112fd89df')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'eb6bef00-9829-447f-a780-d972c6e4b541')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"9f5bd4ad-86e4-46fb-a56d-ecff4a8d0df4\",\r\n \"RunbookName\": \"Use-WorkflowCheckpointSample\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"f4b4f0e7-0117-42c4-9886-76df80295b65\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"71723a0e-bdda-4857-a7fe-0b8112fd89df\",\r\n \"JobContextID\": \"f4b4f0e7-0117-42c4-9886-76df80295b65\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"JobStatus\": \"New\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": null,\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-06-04T18:02:32.863\",\r\n \"LastModifiedTime\": \"2014-06-04T18:02:32.863\",\r\n \"LastStatusModifiedTime\": \"2014-06-04T18:02:32.863\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b2a84aeafd2da3c2b2801455718f427d" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:42 GMT" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'71723a0e-bdda-4857-a7fe-0b8112fd89df')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'71723a0e-bdda-4857-a7fe-0b8112fd89df')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'eb6bef00-9829-447f-a780-d972c6e4b541')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"9f5bd4ad-86e4-46fb-a56d-ecff4a8d0df4\",\r\n \"RunbookName\": \"Use-WorkflowCheckpointSample\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"f4b4f0e7-0117-42c4-9886-76df80295b65\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"71723a0e-bdda-4857-a7fe-0b8112fd89df\",\r\n \"JobContextID\": \"f4b4f0e7-0117-42c4-9886-76df80295b65\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"JobStatus\": \"New\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": null,\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-06-04T18:02:32.863\",\r\n \"LastModifiedTime\": \"2014-06-04T18:02:32.863\",\r\n \"LastStatusModifiedTime\": \"2014-06-04T18:02:32.863\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "43cd77bcb1bea4a990f59d75be7043e9" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:48 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=k0wrhltkavolb0wm4mjswxtk; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'71723a0e-bdda-4857-a7fe-0b8112fd89df')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'71723a0e-bdda-4857-a7fe-0b8112fd89df')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'eb6bef00-9829-447f-a780-d972c6e4b541')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"9f5bd4ad-86e4-46fb-a56d-ecff4a8d0df4\",\r\n \"RunbookName\": \"Use-WorkflowCheckpointSample\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"f4b4f0e7-0117-42c4-9886-76df80295b65\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"71723a0e-bdda-4857-a7fe-0b8112fd89df\",\r\n \"JobContextID\": \"f4b4f0e7-0117-42c4-9886-76df80295b65\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"JobStatus\": \"New\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": null,\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-06-04T18:02:32.863\",\r\n \"LastModifiedTime\": \"2014-06-04T18:02:32.863\",\r\n \"LastStatusModifiedTime\": \"2014-06-04T18:02:32.863\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "eea37c9a3c32a07c8bb841d9778c271c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:02:57 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=3earth15jvywsrgjs2pi3fod; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'71723a0e-bdda-4857-a7fe-0b8112fd89df')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'71723a0e-bdda-4857-a7fe-0b8112fd89df')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'eb6bef00-9829-447f-a780-d972c6e4b541')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"9f5bd4ad-86e4-46fb-a56d-ecff4a8d0df4\",\r\n \"RunbookName\": \"Use-WorkflowCheckpointSample\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"f4b4f0e7-0117-42c4-9886-76df80295b65\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"71723a0e-bdda-4857-a7fe-0b8112fd89df\",\r\n \"JobContextID\": \"f4b4f0e7-0117-42c4-9886-76df80295b65\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"JobStatus\": \"New\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": null,\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-06-04T18:02:32.863\",\r\n \"LastModifiedTime\": \"2014-06-04T18:02:32.863\",\r\n \"LastStatusModifiedTime\": \"2014-06-04T18:02:32.863\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "1318391ba871a816bbb50a31f3501822" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:03:03 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=kas0glbt2m2w3mi3vdn4z5al; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'71723a0e-bdda-4857-a7fe-0b8112fd89df')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'71723a0e-bdda-4857-a7fe-0b8112fd89df')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'eb6bef00-9829-447f-a780-d972c6e4b541')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"9f5bd4ad-86e4-46fb-a56d-ecff4a8d0df4\",\r\n \"RunbookName\": \"Use-WorkflowCheckpointSample\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"f4b4f0e7-0117-42c4-9886-76df80295b65\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"71723a0e-bdda-4857-a7fe-0b8112fd89df\",\r\n \"JobContextID\": \"f4b4f0e7-0117-42c4-9886-76df80295b65\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"JobStatus\": \"Activating\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": null,\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-06-04T18:02:32.863\",\r\n \"LastModifiedTime\": \"2014-06-04T18:03:04.84\",\r\n \"LastStatusModifiedTime\": \"2014-06-04T18:03:04.84\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "3b53aa3f2621a6c98ca73b2be07881b0" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:03:07 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=351225v5kwnvjzw2thkhhjs2; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'71723a0e-bdda-4857-a7fe-0b8112fd89df')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'71723a0e-bdda-4857-a7fe-0b8112fd89df')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'eb6bef00-9829-447f-a780-d972c6e4b541')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"9f5bd4ad-86e4-46fb-a56d-ecff4a8d0df4\",\r\n \"RunbookName\": \"Use-WorkflowCheckpointSample\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"f4b4f0e7-0117-42c4-9886-76df80295b65\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"71723a0e-bdda-4857-a7fe-0b8112fd89df\",\r\n \"JobContextID\": \"f4b4f0e7-0117-42c4-9886-76df80295b65\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"JobStatus\": \"Activating\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": null,\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-06-04T18:02:32.863\",\r\n \"LastModifiedTime\": \"2014-06-04T18:03:04.84\",\r\n \"LastStatusModifiedTime\": \"2014-06-04T18:03:04.84\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "5af357df6efba5b9b8fa91845a8874af" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:03:13 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=enui0f2smatwgrg0j3blrdup; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'71723a0e-bdda-4857-a7fe-0b8112fd89df')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'71723a0e-bdda-4857-a7fe-0b8112fd89df')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'eb6bef00-9829-447f-a780-d972c6e4b541')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"9f5bd4ad-86e4-46fb-a56d-ecff4a8d0df4\",\r\n \"RunbookName\": \"Use-WorkflowCheckpointSample\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"f4b4f0e7-0117-42c4-9886-76df80295b65\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"71723a0e-bdda-4857-a7fe-0b8112fd89df\",\r\n \"JobContextID\": \"f4b4f0e7-0117-42c4-9886-76df80295b65\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"JobStatus\": \"Activating\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": null,\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-06-04T18:02:32.863\",\r\n \"LastModifiedTime\": \"2014-06-04T18:03:04.84\",\r\n \"LastStatusModifiedTime\": \"2014-06-04T18:03:04.84\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "4a3374e74055ae06b607e9cae6caaff5" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:03:17 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=wwfqfrirbntwraacz35nrv5b; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'71723a0e-bdda-4857-a7fe-0b8112fd89df')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'71723a0e-bdda-4857-a7fe-0b8112fd89df')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'eb6bef00-9829-447f-a780-d972c6e4b541')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"9f5bd4ad-86e4-46fb-a56d-ecff4a8d0df4\",\r\n \"RunbookName\": \"Use-WorkflowCheckpointSample\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"f4b4f0e7-0117-42c4-9886-76df80295b65\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"71723a0e-bdda-4857-a7fe-0b8112fd89df\",\r\n \"JobContextID\": \"f4b4f0e7-0117-42c4-9886-76df80295b65\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"JobStatus\": \"Activating\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": null,\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-06-04T18:02:32.863\",\r\n \"LastModifiedTime\": \"2014-06-04T18:03:04.84\",\r\n \"LastStatusModifiedTime\": \"2014-06-04T18:03:04.84\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "1296ab57a827ab4da20c0a21155044a3" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:03:21 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=omy0q3ngqec1potxzauyh0dy; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'71723a0e-bdda-4857-a7fe-0b8112fd89df')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'71723a0e-bdda-4857-a7fe-0b8112fd89df')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'eb6bef00-9829-447f-a780-d972c6e4b541')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"9f5bd4ad-86e4-46fb-a56d-ecff4a8d0df4\",\r\n \"RunbookName\": \"Use-WorkflowCheckpointSample\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"f4b4f0e7-0117-42c4-9886-76df80295b65\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"71723a0e-bdda-4857-a7fe-0b8112fd89df\",\r\n \"JobContextID\": \"f4b4f0e7-0117-42c4-9886-76df80295b65\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"JobStatus\": \"Activating\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": null,\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-06-04T18:02:32.863\",\r\n \"LastModifiedTime\": \"2014-06-04T18:03:04.84\",\r\n \"LastStatusModifiedTime\": \"2014-06-04T18:03:04.84\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d5a63cba18cdaf029d042b740001556f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:03:24 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=vubkt2pbwmptj2s0ryeexy5g; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'71723a0e-bdda-4857-a7fe-0b8112fd89df')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'71723a0e-bdda-4857-a7fe-0b8112fd89df')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'eb6bef00-9829-447f-a780-d972c6e4b541')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"9f5bd4ad-86e4-46fb-a56d-ecff4a8d0df4\",\r\n \"RunbookName\": \"Use-WorkflowCheckpointSample\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"f4b4f0e7-0117-42c4-9886-76df80295b65\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"71723a0e-bdda-4857-a7fe-0b8112fd89df\",\r\n \"JobContextID\": \"f4b4f0e7-0117-42c4-9886-76df80295b65\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"JobStatus\": \"Running\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": \"2014-06-04T18:03:25.27\",\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-06-04T18:02:32.863\",\r\n \"LastModifiedTime\": \"2014-06-04T18:03:25.27\",\r\n \"LastStatusModifiedTime\": \"2014-06-04T18:03:25.27\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "69ff525fc8c0a6b09aa5d0e69608422c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:03:29 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=5ccsourl2uongqeogtpaap1b; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'71723a0e-bdda-4857-a7fe-0b8112fd89df')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'71723a0e-bdda-4857-a7fe-0b8112fd89df')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'eb6bef00-9829-447f-a780-d972c6e4b541')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"9f5bd4ad-86e4-46fb-a56d-ecff4a8d0df4\",\r\n \"RunbookName\": \"Use-WorkflowCheckpointSample\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"f4b4f0e7-0117-42c4-9886-76df80295b65\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"71723a0e-bdda-4857-a7fe-0b8112fd89df\",\r\n \"JobContextID\": \"f4b4f0e7-0117-42c4-9886-76df80295b65\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"JobStatus\": \"Suspending\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": \"2014-06-04T18:03:25.27\",\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-06-04T18:02:32.863\",\r\n \"LastModifiedTime\": \"2014-06-04T18:03:31.203\",\r\n \"LastStatusModifiedTime\": \"2014-06-04T18:03:31.203\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "25b7ddeae071aec9a9598131991c142f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:03:34 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=iufspqdjn1cuvt35ozk0ansm; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'71723a0e-bdda-4857-a7fe-0b8112fd89df')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'71723a0e-bdda-4857-a7fe-0b8112fd89df')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'eb6bef00-9829-447f-a780-d972c6e4b541')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"9f5bd4ad-86e4-46fb-a56d-ecff4a8d0df4\",\r\n \"RunbookName\": \"Use-WorkflowCheckpointSample\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"f4b4f0e7-0117-42c4-9886-76df80295b65\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"71723a0e-bdda-4857-a7fe-0b8112fd89df\",\r\n \"JobContextID\": \"f4b4f0e7-0117-42c4-9886-76df80295b65\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"JobStatus\": \"Suspending\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": \"2014-06-04T18:03:25.27\",\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-06-04T18:02:32.863\",\r\n \"LastModifiedTime\": \"2014-06-04T18:03:31.203\",\r\n \"LastStatusModifiedTime\": \"2014-06-04T18:03:31.203\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "94db461db23fa320853726dcbc53aac6" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:03:40 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=dhtdzgjv5terfjvltuvwmygx; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'71723a0e-bdda-4857-a7fe-0b8112fd89df')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'71723a0e-bdda-4857-a7fe-0b8112fd89df')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'eb6bef00-9829-447f-a780-d972c6e4b541')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"9f5bd4ad-86e4-46fb-a56d-ecff4a8d0df4\",\r\n \"RunbookName\": \"Use-WorkflowCheckpointSample\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"f4b4f0e7-0117-42c4-9886-76df80295b65\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"71723a0e-bdda-4857-a7fe-0b8112fd89df\",\r\n \"JobContextID\": \"f4b4f0e7-0117-42c4-9886-76df80295b65\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"JobStatus\": \"Suspending\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": \"2014-06-04T18:03:25.27\",\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-06-04T18:02:32.863\",\r\n \"LastModifiedTime\": \"2014-06-04T18:03:31.203\",\r\n \"LastStatusModifiedTime\": \"2014-06-04T18:03:31.203\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "22c575721208ab719e9e72e13e3c9ff6" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:03:44 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=qnskifda5zinyg4vna1a0oac; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'71723a0e-bdda-4857-a7fe-0b8112fd89df')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'71723a0e-bdda-4857-a7fe-0b8112fd89df')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'eb6bef00-9829-447f-a780-d972c6e4b541')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"9f5bd4ad-86e4-46fb-a56d-ecff4a8d0df4\",\r\n \"RunbookName\": \"Use-WorkflowCheckpointSample\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"f4b4f0e7-0117-42c4-9886-76df80295b65\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"71723a0e-bdda-4857-a7fe-0b8112fd89df\",\r\n \"JobContextID\": \"f4b4f0e7-0117-42c4-9886-76df80295b65\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"JobStatus\": \"Suspended\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": \"2014-06-04T18:03:25.27\",\r\n \"EndTime\": null,\r\n \"CreationTime\": \"2014-06-04T18:02:32.863\",\r\n \"LastModifiedTime\": \"2014-06-04T18:03:48.56\",\r\n \"LastStatusModifiedTime\": \"2014-06-04T18:03:48.56\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "4eb42bdcb170a5e99f7025292ba2aa3d" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:03:51 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=2eqz0sysaekelaxbyl0eacxy; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'71723a0e-bdda-4857-a7fe-0b8112fd89df')?$expand=JobContext/RunbookVersion/Runbook,JobContext/Schedule,JobContext/JobParameters&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Jobs/@Element&$select=JobID,JobContextID,AccountID,JobStatus,JobStatusDetails,StartTime,EndTime,CreationTime,LastModifiedTime,LastStatusModifiedTime,JobException,JobContext/RunbookVersion/Runbook/RunbookID,JobContext/RunbookVersion/Runbook/RunbookName,JobContext/Schedule/Name,JobContext/JobParameters\",\r\n \"odata.mediaReadLink\": \"Jobs(guid'71723a0e-bdda-4857-a7fe-0b8112fd89df')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"JobContext\": {\r\n \"RunbookVersion\": {\r\n \"odata.mediaReadLink\": \"RunbookVersions(guid'eb6bef00-9829-447f-a780-d972c6e4b541')/$value\",\r\n \"odata.mediaContentType\": \"application/octet-stream\",\r\n \"Runbook\": {\r\n \"RunbookID\": \"9f5bd4ad-86e4-46fb-a56d-ecff4a8d0df4\",\r\n \"RunbookName\": \"Use-WorkflowCheckpointSample\"\r\n }\r\n },\r\n \"JobParameters\": [\r\n {\r\n \"JobContextID\": \"f4b4f0e7-0117-42c4-9886-76df80295b65\",\r\n \"Name\": \"MicrosoftApplicationManagementStartedBy\",\r\n \"Value\": \"PowerShell\",\r\n \"Type\": \"System.String\"\r\n }\r\n ],\r\n \"Schedule\": null\r\n },\r\n \"JobID\": \"71723a0e-bdda-4857-a7fe-0b8112fd89df\",\r\n \"JobContextID\": \"f4b4f0e7-0117-42c4-9886-76df80295b65\",\r\n \"AccountID\": \"18bcf3ce-b68c-462e-b640-c8386d43d30c\",\r\n \"JobStatus\": \"Completed\",\r\n \"JobStatusDetails\": \"None\",\r\n \"StartTime\": \"2014-06-04T18:03:25.27\",\r\n \"EndTime\": \"2014-06-04T18:03:54.333\",\r\n \"CreationTime\": \"2014-06-04T18:02:32.863\",\r\n \"LastModifiedTime\": \"2014-06-04T18:03:54.333\",\r\n \"LastStatusModifiedTime\": \"2014-06-04T18:03:54.333\",\r\n \"JobException\": null\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ccad88ac32aba177ac8579096fb0a84f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:03:56 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=4rlm2dobcn4ybl4uuczzdft2; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'71723a0e-bdda-4857-a7fe-0b8112fd89df')/Suspend?api-version=2014-03-13_Preview", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "deb62b933c05aacba2006836ffc6cb27" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:03:31 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=11dzfe0iwlqoej1kp2hmvffq; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Jobs(guid'71723a0e-bdda-4857-a7fe-0b8112fd89df')/Resume?api-version=2014-03-13_Preview", + "RequestMethod": "POST", + "RequestBody": "{}", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "1f7a2cd6e94fa378b47cbf05743097c1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:03:53 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=4js5hyrysf13bmatx1xs40os; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks(guid'9f5bd4ad-86e4-46fb-a56d-ecff4a8d0df4')?api-version=2014-03-13_Preview", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8a225aa8e0aaaadb8408efa3cdedd1ce" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:03:58 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=yixviojdgljlfj0ieyphmp2g; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.85", + "(rd_rdfe_stable.140604-0056)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/automation/~/Accounts/AutomationAccount/Runbooks?$filter=RunbookName%20eq%20'Use-WorkflowCheckpointSample'&$expand=Schedules&api-version=2014-03-13_Preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/json" + ], + "MaxDataServiceVersion": [ + "3.0" + ], + "MinDataServiceVersion": [ + "3.0" + ], + "x-ms-version": [ + "2013-06-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Automation.AutomationManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://oaas.azure-automation.net/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/OaaSCS/resources/~/Accounts/AutomationAccount/$metadata#Runbooks\",\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "168eb5b8385aa25b993851abde9635f1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 04 Jun 2014 18:03:59 GMT" + ], + "Set-Cookie": [ + "ASP.NET_SessionId=w1qotrszta5krrekg3d2bxd4; path=/; HttpOnly" + ], + "Server": [ + "1.0.6198.81", + "(rd_rdfe_stable.140529-1904)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.SchedulerTests/TestSchedulerEndToEnd.json b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.SchedulerTests/TestSchedulerEndToEnd.json new file mode 100644 index 000000000000..ad12a7185641 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.SchedulerTests/TestSchedulerEndToEnd.json @@ -0,0 +1,1154 @@ +{ + "Entries": [ + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceproviders/scheduler/Properties?resourceType=JobCollections", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Scheduler.SchedulerManagementClient/2.0.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n SupportedGeoRegions\r\n South Central US,North Central US,North Europe,West Europe,East Asia,Southeast Asia,West US,East US,Japan West,Japan East\r\n \r\n \r\n Plans\r\n Free, Standard\r\n \r\n \r\n PlanDetail:Free:Quota:MaxJobCount\r\n 5\r\n \r\n \r\n PlanDetail:Standard:Quota:MaxJobCount\r\n 50\r\n \r\n \r\n PlanDetail:Free:Quota:MinRecurrence\r\n 01:00:00\r\n \r\n \r\n PlanDetail:Standard:Quota:MinRecurrence\r\n 00:01:00\r\n \r\n \r\n PlanDetail:Free:MaxJobCollections\r\n 1\r\n \r\n \r\n PlanDetail:Standard:MaxJobCollections\r\n 100\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "a99609e3fc1eac3fa993774a2cc509cb" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 16 Jun 2014 23:00:53 GMT" + ], + "Server": [ + "1.0.6198.89", + "(rd_rdfe_stable.140611-1210)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceproviders/scheduler/Properties?resourceType=JobCollections", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Scheduler.SchedulerManagementClient/2.0.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n SupportedGeoRegions\r\n South Central US,North Central US,North Europe,West Europe,East Asia,Southeast Asia,West US,East US,Japan West,Japan East\r\n \r\n \r\n Plans\r\n Free, Standard\r\n \r\n \r\n PlanDetail:Free:Quota:MaxJobCount\r\n 5\r\n \r\n \r\n PlanDetail:Standard:Quota:MaxJobCount\r\n 50\r\n \r\n \r\n PlanDetail:Free:Quota:MinRecurrence\r\n 01:00:00\r\n \r\n \r\n PlanDetail:Standard:Quota:MinRecurrence\r\n 00:01:00\r\n \r\n \r\n PlanDetail:Free:MaxJobCollections\r\n 1\r\n \r\n \r\n PlanDetail:Standard:MaxJobCollections\r\n 100\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "d932e37e1556af71824ece011bc4b0c0" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 16 Jun 2014 23:00:53 GMT" + ], + "Server": [ + "1.0.6198.89", + "(rd_rdfe_stable.140611-1210)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceproviders/scheduler/Properties?resourceType=JobCollections", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Scheduler.SchedulerManagementClient/2.0.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n SupportedGeoRegions\r\n South Central US,North Central US,North Europe,West Europe,East Asia,Southeast Asia,West US,East US,Japan West,Japan East\r\n \r\n \r\n Plans\r\n Free, Standard\r\n \r\n \r\n PlanDetail:Free:Quota:MaxJobCount\r\n 5\r\n \r\n \r\n PlanDetail:Standard:Quota:MaxJobCount\r\n 50\r\n \r\n \r\n PlanDetail:Free:Quota:MinRecurrence\r\n 01:00:00\r\n \r\n \r\n PlanDetail:Standard:Quota:MinRecurrence\r\n 00:01:00\r\n \r\n \r\n PlanDetail:Free:MaxJobCollections\r\n 1\r\n \r\n \r\n PlanDetail:Standard:MaxJobCollections\r\n 100\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "f2bfe528dd0dae059385897818ca9b85" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 16 Jun 2014 23:01:20 GMT" + ], + "Server": [ + "1.0.6198.89", + "(rd_rdfe_stable.140611-1210)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceproviders/scheduler/Properties?resourceType=JobCollections", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Scheduler.SchedulerManagementClient/2.0.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n SupportedGeoRegions\r\n South Central US,North Central US,North Europe,West Europe,East Asia,Southeast Asia,West US,East US,Japan West,Japan East\r\n \r\n \r\n Plans\r\n Free, Standard\r\n \r\n \r\n PlanDetail:Free:Quota:MaxJobCount\r\n 5\r\n \r\n \r\n PlanDetail:Standard:Quota:MaxJobCount\r\n 50\r\n \r\n \r\n PlanDetail:Free:Quota:MinRecurrence\r\n 01:00:00\r\n \r\n \r\n PlanDetail:Standard:Quota:MinRecurrence\r\n 00:01:00\r\n \r\n \r\n PlanDetail:Free:MaxJobCollections\r\n 1\r\n \r\n \r\n PlanDetail:Standard:MaxJobCollections\r\n 100\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "a59a89ef8895a0dd96e67947bac9b50b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 16 Jun 2014 23:01:22 GMT" + ], + "Server": [ + "1.0.6198.89", + "(rd_rdfe_stable.140611-1210)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceproviders/scheduler/Properties?resourceType=JobCollections", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Scheduler.SchedulerManagementClient/2.0.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n SupportedGeoRegions\r\n South Central US,North Central US,North Europe,West Europe,East Asia,Southeast Asia,West US,East US,Japan West,Japan East\r\n \r\n \r\n Plans\r\n Free, Standard\r\n \r\n \r\n PlanDetail:Free:Quota:MaxJobCount\r\n 5\r\n \r\n \r\n PlanDetail:Standard:Quota:MaxJobCount\r\n 50\r\n \r\n \r\n PlanDetail:Free:Quota:MinRecurrence\r\n 01:00:00\r\n \r\n \r\n PlanDetail:Standard:Quota:MinRecurrence\r\n 00:01:00\r\n \r\n \r\n PlanDetail:Free:MaxJobCollections\r\n 1\r\n \r\n \r\n PlanDetail:Standard:MaxJobCollections\r\n 100\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "d81e806c598aade6b9476fa980befb3c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 16 Jun 2014 23:01:27 GMT" + ], + "Server": [ + "1.0.6198.89", + "(rd_rdfe_stable.140611-1210)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceproviders/scheduler/Properties?resourceType=JobCollections", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Scheduler.SchedulerManagementClient/2.0.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n SupportedGeoRegions\r\n South Central US,North Central US,North Europe,West Europe,East Asia,Southeast Asia,West US,East US,Japan West,Japan East\r\n \r\n \r\n Plans\r\n Free, Standard\r\n \r\n \r\n PlanDetail:Free:Quota:MaxJobCount\r\n 5\r\n \r\n \r\n PlanDetail:Standard:Quota:MaxJobCount\r\n 50\r\n \r\n \r\n PlanDetail:Free:Quota:MinRecurrence\r\n 01:00:00\r\n \r\n \r\n PlanDetail:Standard:Quota:MinRecurrence\r\n 00:01:00\r\n \r\n \r\n PlanDetail:Free:MaxJobCollections\r\n 1\r\n \r\n \r\n PlanDetail:Standard:MaxJobCollections\r\n 100\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "6c2c4c63ddd1a85a9273a8b62d060a2e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 16 Jun 2014 23:01:30 GMT" + ], + "Server": [ + "1.0.6198.89", + "(rd_rdfe_stable.140611-1210)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceproviders/scheduler/Properties?resourceType=JobCollections", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Scheduler.SchedulerManagementClient/2.0.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n SupportedGeoRegions\r\n South Central US,North Central US,North Europe,West Europe,East Asia,Southeast Asia,West US,East US,Japan West,Japan East\r\n \r\n \r\n Plans\r\n Free, Standard\r\n \r\n \r\n PlanDetail:Free:Quota:MaxJobCount\r\n 5\r\n \r\n \r\n PlanDetail:Standard:Quota:MaxJobCount\r\n 50\r\n \r\n \r\n PlanDetail:Free:Quota:MinRecurrence\r\n 01:00:00\r\n \r\n \r\n PlanDetail:Standard:Quota:MinRecurrence\r\n 00:01:00\r\n \r\n \r\n PlanDetail:Free:MaxJobCollections\r\n 1\r\n \r\n \r\n PlanDetail:Standard:MaxJobCollections\r\n 100\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "74c42616e949a3269257fea0d058a92d" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 16 Jun 2014 23:01:31 GMT" + ], + "Server": [ + "1.0.6198.89", + "(rd_rdfe_stable.140611-1210)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Scheduler.CloudServiceManagementClient/2.0.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n CachingMJZ4AGUOA5SDKKDLDMOVNQHWHCSXMDQM2D3WXNGHPTXHETYQYXGQ-East-Asia\r\n \r\n CachingMJZ4AGUOA5SDKKDLDMOVNQHWHCSXMDQM2D3WXNGHPTXHETYQYXGQ-East-Asia\r\n East Asia\r\n \r\n \r\n \r\n CachingMJZ4AGUOA5SDKKDLDMOVNQHWHCSXMDQM2D3WXNGHPTXHETYQYXGQ-West-US\r\n \r\n CachingMJZ4AGUOA5SDKKDLDMOVNQHWHCSXMDQM2D3WXNGHPTXHETYQYXGQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n cache7810\r\n acd859a6-c85e-4ca2-a361-2ad88dfdc70f\r\n Unknown\r\n \r\n Create\r\n Failed\r\n \r\n 400\r\n \r\n RequestBodyNotAsPerRequirement\r\n \r\n \r\n \r\n \r\n \r\n \r\n cs-WestUS-scheduler\r\n \r\n Cloud service created by scheduler powershell\r\n West US\r\n \r\n \r\n \r\n OaaSCSMJZ4AGUOA5SDKKDLDMOVNQHWHCSXMDQM2D3WXNGHPTXHETYQYXGQ-East-US\r\n \r\n OaaSCSMJZ4AGUOA5SDKKDLDMOVNQHWHCSXMDQM2D3WXNGHPTXHETYQYXGQ-East-US in East US\r\n East US\r\n \r\n \r\n automation\r\n AutomationAccount\r\n AutomationAccount\r\n Preview\r\n 1.1\r\n 56b96e88-0643-4d6c-9cee-8a2d88fb496c\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n automation\r\n AutomationAccount\r\n TestAutomationAccount\r\n Preview\r\n 1.1\r\n 5f56af82-3751-46a2-9ebb-3959bbb26de2\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n SchedulerTest19393jgc5ecie\r\n \r\n Testing\r\n East Asia\r\n \r\n \r\n \r\n SchedulerTest19393lynb3n52\r\n \r\n Testing\r\n East Asia\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "48df9e4415f9a17883e3e9dff21807f8" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 16 Jun 2014 23:00:55 GMT" + ], + "Server": [ + "1.0.6198.89", + "(rd_rdfe_stable.140611-1210)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Scheduler.CloudServiceManagementClient/2.0.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n CachingMJZ4AGUOA5SDKKDLDMOVNQHWHCSXMDQM2D3WXNGHPTXHETYQYXGQ-East-Asia\r\n \r\n CachingMJZ4AGUOA5SDKKDLDMOVNQHWHCSXMDQM2D3WXNGHPTXHETYQYXGQ-East-Asia\r\n East Asia\r\n \r\n \r\n \r\n CachingMJZ4AGUOA5SDKKDLDMOVNQHWHCSXMDQM2D3WXNGHPTXHETYQYXGQ-West-US\r\n \r\n CachingMJZ4AGUOA5SDKKDLDMOVNQHWHCSXMDQM2D3WXNGHPTXHETYQYXGQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n cache7810\r\n acd859a6-c85e-4ca2-a361-2ad88dfdc70f\r\n Unknown\r\n \r\n Create\r\n Failed\r\n \r\n 400\r\n \r\n RequestBodyNotAsPerRequirement\r\n \r\n \r\n \r\n \r\n \r\n \r\n cs-WestUS-scheduler\r\n \r\n Cloud service created by scheduler powershell\r\n West US\r\n \r\n \r\n \r\n OaaSCSMJZ4AGUOA5SDKKDLDMOVNQHWHCSXMDQM2D3WXNGHPTXHETYQYXGQ-East-US\r\n \r\n OaaSCSMJZ4AGUOA5SDKKDLDMOVNQHWHCSXMDQM2D3WXNGHPTXHETYQYXGQ-East-US in East US\r\n East US\r\n \r\n \r\n automation\r\n AutomationAccount\r\n AutomationAccount\r\n Preview\r\n 1.1\r\n 56b96e88-0643-4d6c-9cee-8a2d88fb496c\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n automation\r\n AutomationAccount\r\n TestAutomationAccount\r\n Preview\r\n 1.1\r\n 5f56af82-3751-46a2-9ebb-3959bbb26de2\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n SchedulerTest19393jgc5ecie\r\n \r\n Testing\r\n East Asia\r\n \r\n \r\n \r\n SchedulerTest19393lynb3n52\r\n \r\n Testing\r\n East Asia\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth" + ], + "x-ms-request-id": [ + "5c7de0fdc651a03389b32c2d77ac4b0a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 16 Jun 2014 23:00:57 GMT" + ], + "Server": [ + "1.0.6198.89", + "(rd_rdfe_stable.140611-1210)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Scheduler.CloudServiceManagementClient/2.0.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n CachingMJZ4AGUOA5SDKKDLDMOVNQHWHCSXMDQM2D3WXNGHPTXHETYQYXGQ-East-Asia\r\n \r\n CachingMJZ4AGUOA5SDKKDLDMOVNQHWHCSXMDQM2D3WXNGHPTXHETYQYXGQ-East-Asia\r\n East Asia\r\n \r\n \r\n \r\n CachingMJZ4AGUOA5SDKKDLDMOVNQHWHCSXMDQM2D3WXNGHPTXHETYQYXGQ-West-US\r\n \r\n CachingMJZ4AGUOA5SDKKDLDMOVNQHWHCSXMDQM2D3WXNGHPTXHETYQYXGQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n cache7810\r\n acd859a6-c85e-4ca2-a361-2ad88dfdc70f\r\n Unknown\r\n \r\n Create\r\n Failed\r\n \r\n 400\r\n \r\n RequestBodyNotAsPerRequirement\r\n \r\n \r\n \r\n \r\n \r\n \r\n cs-WestUS-scheduler\r\n \r\n Cloud service created by scheduler powershell\r\n West US\r\n \r\n \r\n \r\n OaaSCSMJZ4AGUOA5SDKKDLDMOVNQHWHCSXMDQM2D3WXNGHPTXHETYQYXGQ-East-US\r\n \r\n OaaSCSMJZ4AGUOA5SDKKDLDMOVNQHWHCSXMDQM2D3WXNGHPTXHETYQYXGQ-East-US in East US\r\n East US\r\n \r\n \r\n automation\r\n AutomationAccount\r\n AutomationAccount\r\n Preview\r\n 1.1\r\n 56b96e88-0643-4d6c-9cee-8a2d88fb496c\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n automation\r\n AutomationAccount\r\n TestAutomationAccount\r\n Preview\r\n 1.1\r\n 5f56af82-3751-46a2-9ebb-3959bbb26de2\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n SchedulerTest19393jgc5ecie\r\n \r\n Testing\r\n East Asia\r\n \r\n \r\n \r\n SchedulerTest19393lynb3n52\r\n \r\n Testing\r\n East Asia\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "39945b0984f4a46e88d774e19af92aaf" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 16 Jun 2014 23:00:58 GMT" + ], + "Server": [ + "1.0.6198.89", + "(rd_rdfe_stable.140611-1210)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Scheduler.CloudServiceManagementClient/2.0.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n CachingMJZ4AGUOA5SDKKDLDMOVNQHWHCSXMDQM2D3WXNGHPTXHETYQYXGQ-East-Asia\r\n \r\n CachingMJZ4AGUOA5SDKKDLDMOVNQHWHCSXMDQM2D3WXNGHPTXHETYQYXGQ-East-Asia\r\n East Asia\r\n \r\n \r\n \r\n CachingMJZ4AGUOA5SDKKDLDMOVNQHWHCSXMDQM2D3WXNGHPTXHETYQYXGQ-West-US\r\n \r\n CachingMJZ4AGUOA5SDKKDLDMOVNQHWHCSXMDQM2D3WXNGHPTXHETYQYXGQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n cache7810\r\n acd859a6-c85e-4ca2-a361-2ad88dfdc70f\r\n Unknown\r\n \r\n Create\r\n Failed\r\n \r\n 400\r\n \r\n RequestBodyNotAsPerRequirement\r\n \r\n \r\n \r\n \r\n \r\n \r\n cs-WestUS-scheduler\r\n \r\n Cloud service created by scheduler powershell\r\n West US\r\n \r\n \r\n scheduler\r\n JobCollections\r\n testFromPSScenario\r\n 1.1\r\n bb82b6d8-174e-4eae-a497-c582401dbe12\r\n Started\r\n \r\n Standard\r\n \r\n 50\r\n \r\n Minute\r\n 1\r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n OaaSCSMJZ4AGUOA5SDKKDLDMOVNQHWHCSXMDQM2D3WXNGHPTXHETYQYXGQ-East-US\r\n \r\n OaaSCSMJZ4AGUOA5SDKKDLDMOVNQHWHCSXMDQM2D3WXNGHPTXHETYQYXGQ-East-US in East US\r\n East US\r\n \r\n \r\n automation\r\n AutomationAccount\r\n AutomationAccount\r\n Preview\r\n 1.1\r\n 56b96e88-0643-4d6c-9cee-8a2d88fb496c\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n automation\r\n AutomationAccount\r\n TestAutomationAccount\r\n Preview\r\n 1.1\r\n 5f56af82-3751-46a2-9ebb-3959bbb26de2\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n SchedulerTest19393jgc5ecie\r\n \r\n Testing\r\n East Asia\r\n \r\n \r\n \r\n SchedulerTest19393lynb3n52\r\n \r\n Testing\r\n East Asia\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "330b52cd3df1abbd963847d2a8cfa733" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 16 Jun 2014 23:01:18 GMT" + ], + "Server": [ + "1.0.6198.89", + "(rd_rdfe_stable.140611-1210)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Scheduler.CloudServiceManagementClient/2.0.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n CachingMJZ4AGUOA5SDKKDLDMOVNQHWHCSXMDQM2D3WXNGHPTXHETYQYXGQ-East-Asia\r\n \r\n CachingMJZ4AGUOA5SDKKDLDMOVNQHWHCSXMDQM2D3WXNGHPTXHETYQYXGQ-East-Asia\r\n East Asia\r\n \r\n \r\n \r\n CachingMJZ4AGUOA5SDKKDLDMOVNQHWHCSXMDQM2D3WXNGHPTXHETYQYXGQ-West-US\r\n \r\n CachingMJZ4AGUOA5SDKKDLDMOVNQHWHCSXMDQM2D3WXNGHPTXHETYQYXGQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n cache7810\r\n acd859a6-c85e-4ca2-a361-2ad88dfdc70f\r\n Unknown\r\n \r\n Create\r\n Failed\r\n \r\n 400\r\n \r\n RequestBodyNotAsPerRequirement\r\n \r\n \r\n \r\n \r\n \r\n \r\n cs-WestUS-scheduler\r\n \r\n Cloud service created by scheduler powershell\r\n West US\r\n \r\n \r\n scheduler\r\n JobCollections\r\n testFromPSScenario\r\n 1.1\r\n bb82b6d8-174e-4eae-a497-c582401dbe12\r\n Started\r\n \r\n Standard\r\n \r\n 50\r\n \r\n Minute\r\n 1\r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n OaaSCSMJZ4AGUOA5SDKKDLDMOVNQHWHCSXMDQM2D3WXNGHPTXHETYQYXGQ-East-US\r\n \r\n OaaSCSMJZ4AGUOA5SDKKDLDMOVNQHWHCSXMDQM2D3WXNGHPTXHETYQYXGQ-East-US in East US\r\n East US\r\n \r\n \r\n automation\r\n AutomationAccount\r\n AutomationAccount\r\n Preview\r\n 1.1\r\n 56b96e88-0643-4d6c-9cee-8a2d88fb496c\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n automation\r\n AutomationAccount\r\n TestAutomationAccount\r\n Preview\r\n 1.1\r\n 5f56af82-3751-46a2-9ebb-3959bbb26de2\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n SchedulerTest19393jgc5ecie\r\n \r\n Testing\r\n East Asia\r\n \r\n \r\n \r\n SchedulerTest19393lynb3n52\r\n \r\n Testing\r\n East Asia\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "05e35ce9d334a14190ae16adf8847b0e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 16 Jun 2014 23:01:21 GMT" + ], + "Server": [ + "1.0.6198.89", + "(rd_rdfe_stable.140611-1210)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices/cs-WestUS-scheduler", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Scheduler.CloudServiceManagementClient/2.0.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n cs-WestUS-scheduler\r\n \r\n Cloud service created by scheduler powershell\r\n West US\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "4ca310d96a51acee858e4fc20b85ce13" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 16 Jun 2014 23:00:56 GMT" + ], + "ETag": [ + "898c7788-a784-462c-b22b-66cc74b0ff3c" + ], + "Server": [ + "1.0.6198.89", + "(rd_rdfe_stable.140611-1210)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices/cs-WestUS-scheduler", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Scheduler.CloudServiceManagementClient/2.0.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n cs-WestUS-scheduler\r\n \r\n Cloud service created by scheduler powershell\r\n West US\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "b60968228d5da7d7ad0828e1dd7a0f3e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 16 Jun 2014 23:00:57 GMT" + ], + "ETag": [ + "898c7788-a784-462c-b22b-66cc74b0ff3c" + ], + "Server": [ + "1.0.6198.89", + "(rd_rdfe_stable.140611-1210)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices/cs-WestUS-scheduler", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Scheduler.CloudServiceManagementClient/2.0.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n cs-WestUS-scheduler\r\n \r\n Cloud service created by scheduler powershell\r\n West US\r\n \r\n \r\n scheduler\r\n JobCollections\r\n testFromPSScenario\r\n 1.1\r\n bb82b6d8-174e-4eae-a497-c582401dbe12\r\n Started\r\n \r\n Standard\r\n \r\n 50\r\n \r\n Minute\r\n 1\r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "f8c0ecda9149a00d88f03a7cf3bc5766" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 16 Jun 2014 23:01:18 GMT" + ], + "ETag": [ + "898c7788-a784-462c-b22b-66cc74b0ff3c" + ], + "Server": [ + "1.0.6198.89", + "(rd_rdfe_stable.140611-1210)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices/cs-WestUS-scheduler", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Scheduler.CloudServiceManagementClient/2.0.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n cs-WestUS-scheduler\r\n \r\n Cloud service created by scheduler powershell\r\n West US\r\n \r\n \r\n scheduler\r\n JobCollections\r\n testFromPSScenario\r\n 1.1\r\n bb82b6d8-174e-4eae-a497-c582401dbe12\r\n Started\r\n \r\n Standard\r\n \r\n 50\r\n \r\n Minute\r\n 1\r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "315e2b6f441dadfea06364853c0ee886" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 16 Jun 2014 23:01:21 GMT" + ], + "ETag": [ + "898c7788-a784-462c-b22b-66cc74b0ff3c" + ], + "Server": [ + "1.0.6198.89", + "(rd_rdfe_stable.140611-1210)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices/cs-WestUS-scheduler", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Scheduler.CloudServiceManagementClient/2.0.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n cs-WestUS-scheduler\r\n \r\n Cloud service created by scheduler powershell\r\n West US\r\n \r\n \r\n scheduler\r\n JobCollections\r\n testFromPSScenario\r\n 1.1\r\n bb82b6d8-174e-4eae-a497-c582401dbe12\r\n Started\r\n \r\n Standard\r\n \r\n 50\r\n \r\n Minute\r\n 1\r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "9fb83e0aac1da602baee7cce587dcd77" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 16 Jun 2014 23:01:25 GMT" + ], + "ETag": [ + "898c7788-a784-462c-b22b-66cc74b0ff3c" + ], + "Server": [ + "1.0.6198.89", + "(rd_rdfe_stable.140611-1210)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices/cs-WestUS-scheduler", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Scheduler.CloudServiceManagementClient/2.0.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n cs-WestUS-scheduler\r\n \r\n Cloud service created by scheduler powershell\r\n West US\r\n \r\n \r\n scheduler\r\n JobCollections\r\n testFromPSScenario\r\n 1.1\r\n bb82b6d8-174e-4eae-a497-c582401dbe12\r\n Started\r\n \r\n Standard\r\n \r\n 50\r\n \r\n Minute\r\n 1\r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "6aeb372d73aaa0c78a242b2160a0e022" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 16 Jun 2014 23:01:27 GMT" + ], + "ETag": [ + "898c7788-a784-462c-b22b-66cc74b0ff3c" + ], + "Server": [ + "1.0.6198.89", + "(rd_rdfe_stable.140611-1210)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/cs-WestUS-scheduler/resources/scheduler/JobCollections/testFromPSScenario", + "RequestMethod": "PUT", + "RequestBody": "\r\n \r\n Standard\r\n \r\n 50\r\n \r\n Minute\r\n 1\r\n \r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Scheduler.SchedulerManagementClient/2.0.0.0", + "WindowsAzurePowershell/v0.8.5" + ], + "client-tracking-id": [ + "9" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "7383cde2428dad079cf0156a983a6b44" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 16 Jun 2014 23:01:00 GMT" + ], + "ETag": [ + "bb82b6d8-174e-4eae-a497-c582401dbe12" + ], + "Server": [ + "1.0.6198.89", + "(rd_rdfe_stable.140611-1210)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operations/7383cde2428dad079cf0156a983a6b44", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Scheduler.SchedulerManagementClient/2.0.0.0", + "WindowsAzurePowershell/v0.8.5" + ], + "client-tracking-id": [ + "9" + ] + }, + "ResponseBody": "\r\n 7383cde2-428d-ad07-9cf0-156a983a6b44\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "523a77b07303a746a7dae589e343d9e5" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 16 Jun 2014 23:01:00 GMT" + ], + "Server": [ + "1.0.6198.89", + "(rd_rdfe_stable.140611-1210)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operations/7383cde2428dad079cf0156a983a6b44", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Scheduler.SchedulerManagementClient/2.0.0.0", + "WindowsAzurePowershell/v0.8.5" + ], + "client-tracking-id": [ + "9" + ] + }, + "ResponseBody": "\r\n 7383cde2-428d-ad07-9cf0-156a983a6b44\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "usnorth" + ], + "x-ms-request-id": [ + "22c821f1e271a12b9c3b4c22fd29446c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 16 Jun 2014 23:01:16 GMT" + ], + "Server": [ + "1.0.6198.89", + "(rd_rdfe_stable.140611-1210)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/cs-WestUS-scheduler/resources/scheduler/~/JobCollections/testFromPSScenario", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Scheduler.SchedulerManagementClient/2.0.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n West US\r\n \r\n bb82b6d8-174e-4eae-a497-c582401dbe12\r\n \r\n Standard\r\n \r\n 50\r\n \r\n Minute\r\n 1\r\n \r\n \r\n \r\n testFromPSScenario\r\n \r\n \r\n 200\r\n OK\r\n \r\n Succeeded\r\n \r\n \r\n 1.1\r\n Started\r\n \r\n jobcollections\r\n", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "3b6f92d8f477abf4bef4a70fcd940876" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 16 Jun 2014 23:01:18 GMT" + ], + "Server": [ + "1.0.6198.89", + "(rd_rdfe_stable.140611-1210)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/cs-WestUS-scheduler/resources/scheduler/~/JobCollections/testFromPSScenario", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Scheduler.SchedulerManagementClient/2.0.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n West US\r\n \r\n bb82b6d8-174e-4eae-a497-c582401dbe12\r\n \r\n Standard\r\n \r\n 50\r\n \r\n Minute\r\n 1\r\n \r\n \r\n \r\n testFromPSScenario\r\n \r\n \r\n 200\r\n OK\r\n \r\n Succeeded\r\n \r\n \r\n 1.1\r\n Started\r\n \r\n jobcollections\r\n", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "92a7bea1cc89aba298604bea004a7610" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 16 Jun 2014 23:01:22 GMT" + ], + "Server": [ + "1.0.6198.89", + "(rd_rdfe_stable.140611-1210)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/cs-WestUS-scheduler/resources/scheduler/~/JobCollections/testFromPSScenario/jobs/testFromPSScenarioJob?api-version=2014-04-01", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"action\": {\r\n \"type\": \"http\",\r\n \"request\": {\r\n \"uri\": \"http://www.bing.com/\",\r\n \"method\": \"GET\",\r\n \"headers\": {}\r\n }\r\n }\r\n}", + "RequestHeaders": { + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Scheduler.SchedulerClient/2.0.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "{\r\n \"id\": \"testFromPSScenarioJob\",\r\n \"action\": {\r\n \"request\": {\r\n \"uri\": \"http://www.bing.com/\",\r\n \"method\": \"GET\",\r\n \"headers\": {}\r\n },\r\n \"type\": \"http\"\r\n },\r\n \"state\": \"enabled\",\r\n \"status\": {\r\n \"nextExecutionTime\": \"2014-06-16T23:01:44.5954124Z\",\r\n \"executionCount\": 0,\r\n \"failureCount\": 0,\r\n \"faultedCount\": 0\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "8a071023781cae5c94b0bad96d69f96d" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 16 Jun 2014 23:01:24 GMT" + ], + "Server": [ + "1.0.6198.89", + "(rd_rdfe_stable.140611-1210)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/cs-WestUS-scheduler/resources/scheduler/~/JobCollections/testFromPSScenario/jobs?api-version=2014-04-01&$skip=0", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Scheduler.SchedulerClient/2.0.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "[\r\n {\r\n \"id\": \"testFromPSScenarioJob\",\r\n \"action\": {\r\n \"request\": {\r\n \"uri\": \"http://www.bing.com/\",\r\n \"method\": \"GET\",\r\n \"headers\": {}\r\n },\r\n \"type\": \"http\"\r\n },\r\n \"state\": \"enabled\",\r\n \"status\": {\r\n \"nextExecutionTime\": \"2014-06-16T23:01:44.5954124Z\",\r\n \"executionCount\": 0,\r\n \"failureCount\": 0,\r\n \"faultedCount\": 0\r\n }\r\n }\r\n]", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "2f61220c00f5a6feba85787415799e43" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 16 Jun 2014 23:01:26 GMT" + ], + "Server": [ + "1.0.6198.89", + "(rd_rdfe_stable.140611-1210)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/cs-WestUS-scheduler/resources/scheduler/~/JobCollections/testFromPSScenario/jobs?api-version=2014-04-01&$skip=0", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Scheduler.SchedulerClient/2.0.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "[\r\n {\r\n \"id\": \"testFromPSScenarioJob\",\r\n \"action\": {\r\n \"request\": {\r\n \"uri\": \"http://www.bing.com/\",\r\n \"method\": \"GET\",\r\n \"headers\": {}\r\n },\r\n \"type\": \"http\"\r\n },\r\n \"state\": \"enabled\",\r\n \"status\": {\r\n \"nextExecutionTime\": \"2014-06-16T23:01:44.5954124Z\",\r\n \"executionCount\": 0,\r\n \"failureCount\": 0,\r\n \"faultedCount\": 0\r\n }\r\n }\r\n]", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "b123085c5a6fa76c94cb2392ec928234" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 16 Jun 2014 23:01:28 GMT" + ], + "Server": [ + "1.0.6198.89", + "(rd_rdfe_stable.140611-1210)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/cs-WestUS-scheduler/resources/scheduler/~/JobCollections/testFromPSScenario/jobs/testFromPSScenarioJob?api-version=2014-04-01", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Scheduler.SchedulerClient/2.0.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "e19824e79d69a5da86f394df497948d3" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 16 Jun 2014 23:01:30 GMT" + ], + "Server": [ + "1.0.6198.89", + "(rd_rdfe_stable.140611-1210)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/cs-WestUS-scheduler/resources/scheduler/JobCollections/testFromPSScenario", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Scheduler.SchedulerManagementClient/2.0.0.0", + "WindowsAzurePowershell/v0.8.5" + ], + "client-tracking-id": [ + "30" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "b93c33477b0ca970ae6b63c7843052a0" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 16 Jun 2014 23:01:32 GMT" + ], + "Server": [ + "1.0.6198.89", + "(rd_rdfe_stable.140611-1210)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operations/b93c33477b0ca970ae6b63c7843052a0", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Scheduler.SchedulerManagementClient/2.0.0.0", + "WindowsAzurePowershell/v0.8.5" + ], + "client-tracking-id": [ + "30" + ] + }, + "ResponseBody": "\r\n b93c3347-7b0c-a970-ae6b-63c7843052a0\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "a9b77e204dbda562af52c17ac1e9ec0b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 16 Jun 2014 23:01:33 GMT" + ], + "Server": [ + "1.0.6198.89", + "(rd_rdfe_stable.140611-1210)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operations/b93c33477b0ca970ae6b63c7843052a0", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Scheduler.SchedulerManagementClient/2.0.0.0", + "WindowsAzurePowershell/v0.8.5" + ], + "client-tracking-id": [ + "30" + ] + }, + "ResponseBody": "\r\n b93c3347-7b0c-a970-ae6b-63c7843052a0\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "2a4d4934be06acb7b703cdf7791e6350" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 16 Jun 2014 23:01:48 GMT" + ], + "Server": [ + "1.0.6198.89", + "(rd_rdfe_stable.140611-1210)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestAddAzureTrafficManagerEndpoint.json b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestAddAzureTrafficManagerEndpoint.json new file mode 100644 index 000000000000..d39747d0adf3 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestAddAzureTrafficManagerEndpoint.json @@ -0,0 +1,367 @@ +{ + "Entries": [ + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n cool-profile.trafficmanager.net\r\n cool-profile\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "e83e3079832ec520bf28aa81e4000d64" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:07 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "POST", + "RequestBody": "\r\n onesdk535.trafficmanager.net\r\n onesdk535\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "2886e211f5a7ca4483b1d80a48889540" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:08 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk535/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 300\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "364114aae9c2c74a8d185c4d9ff4ece5" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:09 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk535/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 300\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n www.microsoft.com\r\n Enabled\r\n Any\r\n West US\r\n 3\r\n \r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "1fa48650b337cd04a7bae62ca37d2694" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:11 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk535", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk535.trafficmanager.net\r\n onesdk535\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "0f111baed8f0c15c9e170ff5774305b7" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:09 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk535", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk535.trafficmanager.net\r\n onesdk535\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "41c77d495970ca719dca3355d4ce2c26" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:11 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk535/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n Inactive\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "b478c9c94570c012a772ee0775584c56" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:09 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk535/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n www.microsoft.com\r\n Enabled\r\n Any\r\n West US\r\n CheckingEndpoint\r\n 3\r\n \r\n \r\n CheckingEndpoints\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "420d609beb2ac1e598c08367341be287" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:12 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-AddAzureTrafficManagerEndpoint": [ + "onesdk535" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestAddAzureTrafficManagerEndpointNoWeightLocation.json b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestAddAzureTrafficManagerEndpointNoWeightLocation.json new file mode 100644 index 000000000000..e47e3b31c1e5 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestAddAzureTrafficManagerEndpointNoWeightLocation.json @@ -0,0 +1,414 @@ +{ + "Entries": [ + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n cool-profile.trafficmanager.net\r\n cool-profile\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n \r\n onesdk4445.trafficmanager.net\r\n onesdk4445\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "023067db7a14ce6e9e1e55cacc597619" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:55 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk4445", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "9d6968305013c9519a616986122014da" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:57 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "POST", + "RequestBody": "\r\n onesdk109.trafficmanager.net\r\n onesdk109\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "ffc1f4bef2d6cef7b3c9f373a54f355c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:58 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk109/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 300\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "78f134f07243cfc1b4677f4915cdd026" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:59 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk109/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 300\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n www.microsoft.com\r\n Enabled\r\n Any\r\n 1\r\n \r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "56ef2fb88233cd72984c38f37db61329" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:02 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk109", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk109.trafficmanager.net\r\n onesdk109\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "167f203aee4bcf8689e5cb31b9843e75" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:00 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk109", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk109.trafficmanager.net\r\n onesdk109\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "16e1efbbc77fc542ac5e002f305db0d7" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:02 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk109/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n Inactive\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "149b9c3935becad988d4ade76dad3dc7" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:01 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk109/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n www.microsoft.com\r\n Enabled\r\n Any\r\n CheckingEndpoint\r\n 1\r\n \r\n \r\n CheckingEndpoints\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "a1425b3cbb1ac3d6a40dc3852a55f822" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:03 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-AddAzureTrafficManagerEndpointNoWeightLocation": [ + "onesdk109" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestAddMultipleAzureTrafficManagerEndpoint.json b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestAddMultipleAzureTrafficManagerEndpoint.json new file mode 100644 index 000000000000..7757af43df74 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestAddMultipleAzureTrafficManagerEndpoint.json @@ -0,0 +1,414 @@ +{ + "Entries": [ + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n cool-profile.trafficmanager.net\r\n cool-profile\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n \r\n onesdk9224.trafficmanager.net\r\n onesdk9224\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "14fc9cdd68e0c0ffbfb810392d7dd095" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:32 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk9224", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "f35341d469aac2dfb0aae73c9736a42a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:32 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "POST", + "RequestBody": "\r\n onesdk2088.trafficmanager.net\r\n onesdk2088\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "5a6fe05f4e85cf369af3473f96385158" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:33 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk2088/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 300\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "087b9451a27ac968900ff2a376d5b9fb" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:34 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk2088/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 300\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n www.microsoft.com\r\n Enabled\r\n Any\r\n 1\r\n \r\n \r\n www.bing.com\r\n Enabled\r\n Any\r\n 1\r\n \r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "4ec3af8d8f2dc51e80800cbeabd72482" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:37 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk2088", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk2088.trafficmanager.net\r\n onesdk2088\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "166c64b20739cfdb8e4ccfd67159da4f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:34 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk2088", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk2088.trafficmanager.net\r\n onesdk2088\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "2d6cccf468d1c7f1a668982835b560c8" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:37 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk2088/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n Inactive\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "d0861d2cab3ac52aad103644bba1b419" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:36 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk2088/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n www.microsoft.com\r\n Enabled\r\n Any\r\n CheckingEndpoint\r\n 1\r\n \r\n \r\n www.bing.com\r\n Enabled\r\n Any\r\n CheckingEndpoint\r\n 1\r\n \r\n \r\n CheckingEndpoints\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "3e19619ffde2c17fb0aed13595b97822" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:38 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-AddMultipleAzureTrafficManagerEndpoint": [ + "onesdk2088" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestCreateAndRemoveProfile.json b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestCreateAndRemoveProfile.json new file mode 100644 index 000000000000..24993e0a5a64 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestCreateAndRemoveProfile.json @@ -0,0 +1,364 @@ +{ + "Entries": [ + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n cool-profile.trafficmanager.net\r\n cool-profile\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n \r\n onesdk6174.trafficmanager.net\r\n onesdk6174\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "89c644e3e946ce4da1eecb58acf6b960" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:54 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk6174", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "585f69fa2fa6c168a86f2b62398bac79" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:54 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "POST", + "RequestBody": "\r\n onesdk5716.trafficmanager.net\r\n onesdk5716\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "54f671d61beaccf2ba1b8f4cfb7a6380" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:55 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk5716/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 300\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "850b18f8778accc1a65ac5e339c41d0f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:56 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk5716", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk5716.trafficmanager.net\r\n onesdk5716\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "986293e4f780c5a7b4fbc981fc578b5c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:56 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk5716", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n ResourceNotFound\r\n The specified profile name onesdk5716 does not exist.\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "a471c2cbf0b2c7159a69d4e47bce94ab" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:59 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk5716/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n Inactive\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "f0d61489e93ac78c8601603618a0a76c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:57 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk5716", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "07691c50d1abc5dca512bb678d74b268" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:58 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-CreateAndRemoveProfile": [ + "onesdk5716" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestDisableProfile.json b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestDisableProfile.json new file mode 100644 index 000000000000..c7f6daa50622 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestDisableProfile.json @@ -0,0 +1,461 @@ +{ + "Entries": [ + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n cool-profile.trafficmanager.net\r\n cool-profile\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n \r\n onesdk535.trafficmanager.net\r\n onesdk535\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "bf8326302f84c923908d2620916c6476" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:14 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk535", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "670241c1a6abc81582648399e095408e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:15 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "POST", + "RequestBody": "\r\n onesdk6485.trafficmanager.net\r\n onesdk6485\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "62d6f2647af3c54e9cdc28b88c520825" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:16 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk6485/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 300\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "38f074327af0c4c3b0478a3dc449738f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:16 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk6485", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk6485.trafficmanager.net\r\n onesdk6485\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "9c51c8e1f974c1188f11da6ad3b42faa" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:18 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk6485", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk6485.trafficmanager.net\r\n onesdk6485\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "fa964d795280c14b85f3c2fa09775e0d" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:20 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk6485", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk6485.trafficmanager.net\r\n onesdk6485\r\n Disabled\r\n \r\n \r\n Disabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "e97efee6f728ce379025fa155571fdae" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:20 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk6485/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n Inactive\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "b71ff75a3666c226a2a067ba39305eb4" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:19 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk6485/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Disabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n Disabled\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "8a701ed6b8aac4ba8b395f16de409cf2" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:21 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk6485", + "RequestMethod": "PUT", + "RequestBody": "\r\n Disabled\r\n \r\n 1\r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "5e0526491f64cc0b969615b4d32597d0" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:20 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-DisableProfile": [ + "onesdk6485" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestDisableProfileWithInvalidCredentials.json b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestDisableProfileWithInvalidCredentials.json new file mode 100644 index 000000000000..1bfa83e19ba1 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestDisableProfileWithInvalidCredentials.json @@ -0,0 +1,150 @@ +{ + "Entries": [ + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n cool-profile.trafficmanager.net\r\n cool-profile\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n \r\n onesdk1111.trafficmanager.net\r\n onesdk1111\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n \r\n onesdk3238.trafficmanager.net\r\n onesdk3238\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "0ed30782dc93cdb8a4906a9d100595a5" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:43 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk1111", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "f45d0d3bbeb7c1fd94cf57f48642b415" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:47 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk3238", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "993591cfd276c524abbf0be003413a04" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:49 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-WithInvalidCredentials": [ + "onesdk1732" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestEnableProfile.json b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestEnableProfile.json new file mode 100644 index 000000000000..b9d6417d0335 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestEnableProfile.json @@ -0,0 +1,552 @@ +{ + "Entries": [ + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n cool-profile.trafficmanager.net\r\n cool-profile\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n \r\n onesdk4590.trafficmanager.net\r\n onesdk4590\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "32164e560e16c5c186c323b407d535c4" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:17 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk4590", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "16348dd2c623c2189559f7f9a3b4876a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:18 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "POST", + "RequestBody": "\r\n onesdk2221.trafficmanager.net\r\n onesdk2221\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "3222cacafee5c73583895d9de6dec95e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:19 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk2221/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 300\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "2a4bf04059bfcbd7bf62c7be8ab80916" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:20 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk2221", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk2221.trafficmanager.net\r\n onesdk2221\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "22108f71b42fc4558690c704ae40ec7c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:20 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk2221", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk2221.trafficmanager.net\r\n onesdk2221\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "bc07a94f2d23c930aecbf2bfacad9de7" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:23 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk2221", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk2221.trafficmanager.net\r\n onesdk2221\r\n Disabled\r\n \r\n \r\n Disabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "51798dfe8f67cca4bb4987900af6c93a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:25 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk2221", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk2221.trafficmanager.net\r\n onesdk2221\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "ecf49c0f8863c89289aba55dac4861fe" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:26 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk2221/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n Inactive\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "2a50748b4784cc10b7ead2e7db410e45" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:21 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk2221/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n Inactive\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "6e6f6d980224c060849b4ef60384f677" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:26 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk2221", + "RequestMethod": "PUT", + "RequestBody": "\r\n Disabled\r\n \r\n 1\r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "92d9e1850d68c5d2baa412ebf2cb1b3b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:23 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk2221", + "RequestMethod": "PUT", + "RequestBody": "\r\n Enabled\r\n \r\n 1\r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "b2cdd961f25bc870be8579a374733698" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:25 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-EnableProfile": [ + "onesdk2221" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestEnableProfileWithInvalidCredentials.json b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestEnableProfileWithInvalidCredentials.json new file mode 100644 index 000000000000..4288592030b4 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestEnableProfileWithInvalidCredentials.json @@ -0,0 +1,103 @@ +{ + "Entries": [ + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n cool-profile.trafficmanager.net\r\n cool-profile\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n \r\n onesdk109.trafficmanager.net\r\n onesdk109\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "eb02a67018a7c6f8aba81c8fe2bb11f4" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:03 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk109", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "8e1714ca94afcf0bab87a464fe959da7" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:05 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-WithInvalidCredentials": [ + "onesdk9180" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestGetMultipleProfiles.json b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestGetMultipleProfiles.json new file mode 100644 index 000000000000..a62a3f23bc40 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestGetMultipleProfiles.json @@ -0,0 +1,506 @@ +{ + "Entries": [ + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n cool-profile.trafficmanager.net\r\n cool-profile\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n \r\n onesdk8117.trafficmanager.net\r\n onesdk8117\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "4ee4ac2f1771cb19834027c75c8583b5" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:29 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n cool-profile.trafficmanager.net\r\n cool-profile\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n \r\n onesdk1111.trafficmanager.net\r\n onesdk1111\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n \r\n onesdk3238.trafficmanager.net\r\n onesdk3238\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "94b6bdfa00e5ca70b8b72c0d75f110a0" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:39 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk8117", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "eaf5922ce472cf6f85eecb5d14802401" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:31 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "POST", + "RequestBody": "\r\n onesdk3238.trafficmanager.net\r\n onesdk3238\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "1ae3ea03bb22c0e0af5dcacae05ec712" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:32 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "POST", + "RequestBody": "\r\n onesdk1111.trafficmanager.net\r\n onesdk1111\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "5142e1c5b258c21f87d61192083bbd17" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:35 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk3238/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 300\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "537e7edb128dc224ab27a24a91e535cc" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:32 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk3238", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk3238.trafficmanager.net\r\n onesdk3238\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "ec2b2791b981cfd09607794bfc1de325" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:33 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk3238/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n Inactive\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "c56141d771d3caff98703c87857005e2" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:33 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk1111/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 300\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "a3ef20d364c7c265bf5292d03c710ef9" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:37 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk1111", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk1111.trafficmanager.net\r\n onesdk1111\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "bc6b13f4794fcd4d9c54cd5719f4490d" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:37 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk1111/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n Inactive\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "c83434763c71cf13a74352a9ff42a699" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:39 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-GetMultipleProfiles": [ + "onesdk3238", + "onesdk1111" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestGetProfile.json b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestGetProfile.json new file mode 100644 index 000000000000..ac3cbfca2f31 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestGetProfile.json @@ -0,0 +1,370 @@ +{ + "Entries": [ + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n cool-profile.trafficmanager.net\r\n cool-profile\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n \r\n onesdk8016.trafficmanager.net\r\n onesdk8016\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "4275ef168a69ca7a9443724dcfdcf220" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:10 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk8016", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "ab882a64b485c62bb9926da4b271d62d" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:13 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "POST", + "RequestBody": "\r\n onesdk4193.trafficmanager.net\r\n onesdk4193\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "ec9eaf3ad932c83b86fe4ae3143ad68e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:16 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk4193/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 300\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "d0ff76feabd4ce529dc32415ff20ebf7" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:17 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk4193", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk4193.trafficmanager.net\r\n onesdk4193\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "23b47aa485d3c47cb013922cd9efd7c1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:18 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk4193", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk4193.trafficmanager.net\r\n onesdk4193\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "cce674fce667cb13b392902d8f905fbb" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:19 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk4193/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n Inactive\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "22d3d1ab84e0c1ccafbdb12c4d466ff1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:18 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk4193/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n Inactive\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "8caa181e7372cdcd89616c4dc75178e6" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:19 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-GetProfile": [ + "onesdk4193" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestGetProfileWithInvalidCredentials.json b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestGetProfileWithInvalidCredentials.json new file mode 100644 index 000000000000..14fe4cfb2286 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestGetProfileWithInvalidCredentials.json @@ -0,0 +1,103 @@ +{ + "Entries": [ + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n cool-profile.trafficmanager.net\r\n cool-profile\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n \r\n onesdk6485.trafficmanager.net\r\n onesdk6485\r\n Disabled\r\n \r\n \r\n Disabled\r\n 1\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "e734584dedcbca10b0158cbf643ae32d" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:23 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk6485", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "a895453ca3a9ce1798655e6997f4a86e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:23 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-WithInvalidCredentials": [ + "onesdk6605" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestNewProfile.json b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestNewProfile.json new file mode 100644 index 000000000000..67968256b201 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestNewProfile.json @@ -0,0 +1,235 @@ +{ + "Entries": [ + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n cool-profile.trafficmanager.net\r\n cool-profile\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "a2df887e78a1c8d5924a942fd8b345a8" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:12 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "POST", + "RequestBody": "\r\n onesdk4590.trafficmanager.net\r\n onesdk4590\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "5e67d76589facf2dba5de42b49706bf5" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:13 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk4590/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 300\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "7c90650b523dcf199a2e323e78889274" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:14 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk4590", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk4590.trafficmanager.net\r\n onesdk4590\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "e6fd2b29c749c5e0a60ef959a2163765" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:14 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk4590/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n Inactive\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "469e8f4fa75fc13d88f9673587215a76" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:15 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-NewProfile": [ + "onesdk4590" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestNewProfileInvalidParameters.json b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestNewProfileInvalidParameters.json new file mode 100644 index 000000000000..b74f8c218467 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestNewProfileInvalidParameters.json @@ -0,0 +1,91 @@ +{ + "Entries": [ + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n cool-profile.trafficmanager.net\r\n cool-profile\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "fe93750896a6ca4bac545fd8544da8ab" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:10:56 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "POST", + "RequestBody": "\r\n INVALID\r\n onesdk408\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n BadRequest\r\n A policy with the requested domain name could not be created because the name INVALID does not end with the expected value .trafficmanager.net.\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "09efe62b61e2c463a8061b27543dc1bb" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:10:56 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 400 + } + ], + "Names": { + "Test-NewProfileWithInvalidParameter": [ + "onesdk408" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestRemoveAzureTrafficManagerEndpoint.json b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestRemoveAzureTrafficManagerEndpoint.json new file mode 100644 index 000000000000..b4face90c55a --- /dev/null +++ b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestRemoveAzureTrafficManagerEndpoint.json @@ -0,0 +1,546 @@ +{ + "Entries": [ + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n cool-profile.trafficmanager.net\r\n cool-profile\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n \r\n onesdk2088.trafficmanager.net\r\n onesdk2088\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "0e81bb3daf08c3fcaf72c60c4c1e85ea" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:39 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk2088", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "4581ada27c18cd4884e75e29651435a3" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:41 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "POST", + "RequestBody": "\r\n onesdk6174.trafficmanager.net\r\n onesdk6174\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "fb587f575569c7ef99bbdaa9d452c974" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:42 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk6174/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 300\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "ec0c73e6c089caf4b4d7925c90dfb9b1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:43 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk6174/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 300\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n www.microsoft.com\r\n Enabled\r\n Any\r\n 1\r\n \r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "7cf25d5231dcc578bbdf487f71c68791" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:47 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk6174/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 300\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "4896e09ae928c3609f0bfef26f602e50" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:50 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk6174", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk6174.trafficmanager.net\r\n onesdk6174\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "c63ae408b679cb51bbe8de6c3951c2e9" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:44 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk6174", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk6174.trafficmanager.net\r\n onesdk6174\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "e5680e977bc2cead88aa7d57c6167211" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:48 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk6174", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk6174.trafficmanager.net\r\n onesdk6174\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "e71f5ec63088c7109c66ad774726ded9" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:51 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk6174/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n Inactive\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "01a069595171c6f3bfd95c57452153e0" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:46 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk6174/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n www.microsoft.com\r\n Enabled\r\n Any\r\n CheckingEndpoint\r\n 1\r\n \r\n \r\n CheckingEndpoints\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "403fa815ff55cf5cb760502bba4e677f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:48 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk6174/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n Inactive\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "58c062395407c28c93e44bf049fa29c0" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:51 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-RemoveAzureTrafficManagerEndpoint": [ + "onesdk6174" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestRemoveProfileWithInvalidCredentials.json b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestRemoveProfileWithInvalidCredentials.json new file mode 100644 index 000000000000..7d3f5147b383 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestRemoveProfileWithInvalidCredentials.json @@ -0,0 +1,103 @@ +{ + "Entries": [ + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n cool-profile.trafficmanager.net\r\n cool-profile\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n \r\n onesdk3534.trafficmanager.net\r\n onesdk3534\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "f0f58d9016b8c01186e294f182ea5b23" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:09 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk3534", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "34fae2d44a7ec66b950c55de00c20185" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:11 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-WithInvalidCredentials": [ + "onesdk3413" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestRemoveProfileWithNonExistingName.json b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestRemoveProfileWithNonExistingName.json new file mode 100644 index 000000000000..ba21714b6efd --- /dev/null +++ b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestRemoveProfileWithNonExistingName.json @@ -0,0 +1,271 @@ +{ + "Entries": [ + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n cool-profile.trafficmanager.net\r\n cool-profile\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "b30f6f0d9066c041bd8904ed528a30d7" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:25 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "POST", + "RequestBody": "\r\n onesdk9224.trafficmanager.net\r\n onesdk9224\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "3f7d2bdfb887c32e87f33e9363b353f9" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:27 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk9224/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 300\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "21b773027d84cc2aa40ced38006fc53e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:28 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk9224", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk9224.trafficmanager.net\r\n onesdk9224\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "6a8d49f77628c89ab39d402de3df9e15" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:28 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk9224/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n Inactive\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "d88f1fbb83eac57fb660b4d1a02a3cc1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:30 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk894", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n ResourceNotFound\r\n The specified profile name onesdk894 does not exist.\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "26fa3c5abc82ca3db6f2b100c62fc5cc" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:12:30 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 404 + } + ], + "Names": { + "Test-RemoveProfileWithNonExistingName": [ + "onesdk9224", + "onesdk894" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestSetAzureTrafficManagerEndpoint.json b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestSetAzureTrafficManagerEndpoint.json new file mode 100644 index 000000000000..1dbe21c35c24 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestSetAzureTrafficManagerEndpoint.json @@ -0,0 +1,499 @@ +{ + "Entries": [ + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n cool-profile.trafficmanager.net\r\n cool-profile\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "7d373206ed98c16fa8c7820336873e99" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:10:58 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "POST", + "RequestBody": "\r\n onesdk8016.trafficmanager.net\r\n onesdk8016\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "f8d465785890cac386d3f75ea7caf570" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:02 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk8016/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 300\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "b9cb88cc640bc5d5ac309379663eb3ed" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:03 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk8016/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 300\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n www.microsoft.com\r\n Enabled\r\n Any\r\n West US\r\n 3\r\n \r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "7ef0c4540221ce7fb32c98293394a17e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:05 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk8016/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 300\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n www.microsoft.com\r\n Disabled\r\n Any\r\n West US\r\n 3\r\n \r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "4a4042826dd7ca1e8223e4922299c2be" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:08 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk8016", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk8016.trafficmanager.net\r\n onesdk8016\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "2d58bf49e33cce8981172c4507e2c353" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:04 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk8016", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk8016.trafficmanager.net\r\n onesdk8016\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "ee47ccd6e5a7cec29d36875748678210" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:06 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk8016", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk8016.trafficmanager.net\r\n onesdk8016\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "2039f73f9bb7c8b6a2a9b8773eb9b4b1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:08 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk8016/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n Inactive\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "4d98717cbe85caac973c7d3a7211f57b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:05 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk8016/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n www.microsoft.com\r\n Enabled\r\n Any\r\n West US\r\n CheckingEndpoint\r\n 3\r\n \r\n \r\n CheckingEndpoints\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "1f64602f7993c5259d4c47d830f9af6f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:07 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk8016/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n www.microsoft.com\r\n Disabled\r\n Any\r\n West US\r\n Disabled\r\n 3\r\n \r\n \r\n Inactive\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "2f5eb8cfa274c00d9fe647e8b9d47e94" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:08 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-SetAzureTrafficManagerEndpoint": [ + "onesdk8016" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestSetAzureTrafficManagerEndpointAdds.json b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestSetAzureTrafficManagerEndpointAdds.json new file mode 100644 index 000000000000..f4bc61bc4220 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestSetAzureTrafficManagerEndpointAdds.json @@ -0,0 +1,499 @@ +{ + "Entries": [ + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n cool-profile.trafficmanager.net\r\n cool-profile\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "b9d5c500116ccb6eb4967f97a98dd6b9" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:00 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "POST", + "RequestBody": "\r\n onesdk3534.trafficmanager.net\r\n onesdk3534\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "fe95e22d1b25c52d96f71b9a60117bd3" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:01 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk3534/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 300\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "50df06cbbbc7c7a6b6ce9df4510e17b9" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:02 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk3534/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 300\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n www.microsoft.com\r\n Enabled\r\n Any\r\n 1\r\n \r\n \r\n www.windows.com\r\n Enabled\r\n Any\r\n 1\r\n \r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "5b6bf280318bce5799d3386fb6e15387" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:03 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk3534/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 300\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n www.microsoft.com\r\n Disabled\r\n Any\r\n 1\r\n \r\n \r\n www.windows.com\r\n Enabled\r\n Any\r\n 1\r\n \r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "8a59d995cb08cae39608252f013501d8" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:07 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk3534", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk3534.trafficmanager.net\r\n onesdk3534\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "a68ba21cf23ac898a840114936612924" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:02 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk3534", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk3534.trafficmanager.net\r\n onesdk3534\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "ed1b3afad075c01cba11cc216e7c4904" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:04 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk3534", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk3534.trafficmanager.net\r\n onesdk3534\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "c821a7f11e38c95ebc52346b0b4ed248" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:08 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk3534/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n Inactive\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "637f286e6815c101868df09a6c446332" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:03 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk3534/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n www.microsoft.com\r\n Enabled\r\n Any\r\n CheckingEndpoint\r\n 1\r\n \r\n \r\n www.windows.com\r\n Enabled\r\n Any\r\n CheckingEndpoint\r\n 1\r\n \r\n \r\n CheckingEndpoints\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "1c7f44afa0ddc47bbb67a7af25c5f1db" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:05 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk3534/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n www.microsoft.com\r\n Disabled\r\n Any\r\n Disabled\r\n 1\r\n \r\n \r\n www.windows.com\r\n Enabled\r\n Any\r\n CheckingEndpoint\r\n 1\r\n \r\n \r\n CheckingEndpoints\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "7bd758d87b92c986afabd4ae16d8046e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:08 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-SetAzureTrafficManagerEndpointAdds": [ + "onesdk3534" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestSetAzureTrafficManagerEndpointUpdateWeightLocation.json b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestSetAzureTrafficManagerEndpointUpdateWeightLocation.json new file mode 100644 index 000000000000..cb71e1d01b62 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestSetAzureTrafficManagerEndpointUpdateWeightLocation.json @@ -0,0 +1,546 @@ +{ + "Entries": [ + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n cool-profile.trafficmanager.net\r\n cool-profile\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n \r\n onesdk2221.trafficmanager.net\r\n onesdk2221\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "3f0d4bda30abc445aca5a8abe5907e43" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:28 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk2221", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "ea27e15814e4cf9398ae8653b708404b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:28 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "POST", + "RequestBody": "\r\n onesdk804.trafficmanager.net\r\n onesdk804\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "dca749f27b70cd0db83e05caf36f7b9c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:29 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk804/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 300\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "cfe562aa5342c7e287d49e07ea33a6ce" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:30 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk804/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 300\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n www.microsoft.com\r\n Enabled\r\n Any\r\n 1\r\n \r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "a59c2fc51d54c82db03d4f095d242049" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:33 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk804/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 300\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n www.microsoft.com\r\n Disabled\r\n Any\r\n West US\r\n 3\r\n \r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "7f6bd2b65353c56c8962d183ee8c2e0b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:36 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk804", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk804.trafficmanager.net\r\n onesdk804\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "0f565656eb6bc0c9ae6d44478217bd2e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:32 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk804", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk804.trafficmanager.net\r\n onesdk804\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "ecc7e77d3a45cc7d97ed8bb1addf2d04" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:33 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk804", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk804.trafficmanager.net\r\n onesdk804\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "01e1d83e85f0c9f381c5104b83c34976" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:36 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk804/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n Inactive\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "4ead32d64f4dc1279d0e794f56cb09cc" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:32 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk804/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n www.microsoft.com\r\n Enabled\r\n Any\r\n CheckingEndpoint\r\n 1\r\n \r\n \r\n CheckingEndpoints\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "c7d77f6db35cc008ab8d738aac536a25" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:34 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk804/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n www.microsoft.com\r\n Disabled\r\n Any\r\n West US\r\n Disabled\r\n 3\r\n \r\n \r\n Inactive\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "b2dc9dbc3cb7c920b9ca494ce814af69" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:13:37 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-SetAzureTrafficManagerEndpointUpdateWeightLocation": [ + "onesdk804" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestSetProfileProperty.json b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestSetProfileProperty.json new file mode 100644 index 000000000000..e08934ebc7a2 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestSetProfileProperty.json @@ -0,0 +1,367 @@ +{ + "Entries": [ + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n cool-profile.trafficmanager.net\r\n cool-profile\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "0bafe1698940cf4d9faf0c51866fcfef" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:50 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "POST", + "RequestBody": "\r\n onesdk4445.trafficmanager.net\r\n onesdk4445\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "848fc2fd1098c4e78ef0d779d30483b3" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:51 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk4445/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 300\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "bbf6625a5adbcc2eb77c978a8ddabd6d" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:52 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk4445/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 333\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "b2f16a16ee64ccf68de958e6345cd0d6" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:53 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk4445", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk4445.trafficmanager.net\r\n onesdk4445\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "be6c91c38487c6dc8fe2236ca69d01f3" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:52 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk4445", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk4445.trafficmanager.net\r\n onesdk4445\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "a1f85654e36ec53cb338016b67aec3c5" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:54 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk4445/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n Inactive\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "3c5dbcb35e96c087a63babe7965c7bd8" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:52 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk4445/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n 333\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n Inactive\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "34fa62b56ed3cf5ba88a5c172fcadc61" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:54 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-SetProfileProperty": [ + "onesdk4445" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestTestAzureTrafficManagerDomainName.json b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestTestAzureTrafficManagerDomainName.json new file mode 100644 index 000000000000..56b0838b2e69 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.TrafficManagerTests/TestTestAzureTrafficManagerDomainName.json @@ -0,0 +1,370 @@ +{ + "Entries": [ + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n cool-profile.trafficmanager.net\r\n cool-profile\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n \r\n onesdk4193.trafficmanager.net\r\n onesdk4193\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "70ad4b7e9d39cf2cb7fb4a240b1ee6ae" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:20 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk4193", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "0661183bbb6ec9228fe9055b6a40a6e6" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:22 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/operations/isavailable/onesdk8117.trafficmanager.net", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n true\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "494d72dbd05ac1ef85994d1e12bb6033" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:23 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/operations/isavailable/onesdk8117.trafficmanager.net", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n false\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "ee1cb14a4089cab3a1ed03062313548a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:28 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles", + "RequestMethod": "POST", + "RequestBody": "\r\n onesdk8117.trafficmanager.net\r\n onesdk8117\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Transfer-Encoding": [ + "chunked" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "e2fa3e716a57cc69a0bb79697b9abb79" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:24 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk8117/definitions", + "RequestMethod": "POST", + "RequestBody": "\r\n \r\n 300\r\n \r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n 1\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "fe564a28bee3c4f3b3d2f7776b352773" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:26 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk8117", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n onesdk8117.trafficmanager.net\r\n onesdk8117\r\n Enabled\r\n \r\n 1\r\n \r\n \r\n \r\n Enabled\r\n 1\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "5bb8d7f743e3caeeb7a614f8e99c317c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:27 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/services/WATM/profiles/onesdk8117/definitions/1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2011-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.TrafficManager.TrafficManagerManagementClient/0.9.0.0", + "WindowsAzurePowershell/v0.8.5" + ] + }, + "ResponseBody": "\r\n \r\n 300\r\n \r\n Enabled\r\n 1\r\n \r\n \r\n 30\r\n 10\r\n 3\r\n HTTP\r\n 80\r\n \r\n GET\r\n /\r\n 200\r\n \r\n \r\n \r\n \r\n RoundRobin\r\n \r\n Inactive\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "x-ms-request-id": [ + "214165021813c61fa2b473bc417a1e1b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 24 Jul 2014 00:11:27 GMT" + ], + "Server": [ + "1.0.6198.108", + "(rd_rdfe_stable.140717-0053)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-TestAzureTrafficManagerDomainName": [ + "onesdk8117" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/StorageTests/StorageContainerTest.cs b/src/Common/Commands.ScenarioTest/StorageTests/StorageContainerTest.cs new file mode 100644 index 000000000000..d740c0ee9bbc --- /dev/null +++ b/src/Common/Commands.ScenarioTest/StorageTests/StorageContainerTest.cs @@ -0,0 +1,100 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ScenarioTest.Common; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.StorageTests +{ + [TestClass] + public class StorageContainerTest : AzurePowerShellCertificateTest + { + public StorageContainerTest() + : base("Storage\\StorageContainer.ps1") + { + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Storage)] + [TestCategory(Category.BVT)] + public void GetStorageContainerWithoutContainerName() + { + RunPowerShellTest("Test-GetAzureStorageContainerWithoutContainerName"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Storage)] + [TestCategory(Category.BVT)] + public void GetAzureStorageContainerWithPrefix() + { + RunPowerShellTest("Test-GetAzureStorageContainerWithPrefix"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Storage)] + [TestCategory(Category.BVT)] + public void NewAzureStorageContainer() + { + RunPowerShellTest("Test-NewAzureStorageContainer"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Storage)] + [TestCategory(Category.BVT)] + public void NewAzureStorageContainerWithPermission() + { + RunPowerShellTest("Test-NewAzureStorageContainerWithPermission"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Storage)] + [TestCategory(Category.BVT)] + public void NewExistsAzureStorageContainer() + { + RunPowerShellTest("Test-NewExistsAzureStorageContainer"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Storage)] + [TestCategory(Category.BVT)] + public void NewExistsAzureStorageContainerWithInvalidContainerName() + { + RunPowerShellTest("Test-NewExistsAzureStorageContainerWithInvalidContainerName"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Storage)] + [TestCategory(Category.BVT)] + public void RemoveAzureStorageContainer() + { + RunPowerShellTest("Test-RemoveAzureStorageContainer"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Storage)] + [TestCategory(Category.BVT)] + public void RemoveAzureStorageContainerByContainerPipeline() + { + RunPowerShellTest("Test-RemoveAzureStorageContainerByContainerPipeline"); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/StorageTests/StorageContextTest.cs b/src/Common/Commands.ScenarioTest/StorageTests/StorageContextTest.cs new file mode 100644 index 000000000000..f6464ef0ebe0 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/StorageTests/StorageContextTest.cs @@ -0,0 +1,46 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ScenarioTest.Common; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.StorageTests +{ + [TestClass] + public class StorageContextTest : AzurePowerShellCertificateTest + { + public StorageContextTest() + : base("Storage\\StorageContext.ps1") + { + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Storage)] + [TestCategory(Category.BVT)] + public void NewAnonymousStorageContext() + { + RunPowerShellTest("Test-NewAnonymousStorageContext"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Storage)] + [TestCategory(Category.BVT)] + public void NewStorageContextWithNameAndKey() + { + RunPowerShellTest("Test-NewStorageContextWithNameAndKey"); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/StoreTests/StoreTests.cs b/src/Common/Commands.ScenarioTest/StoreTests/StoreTests.cs new file mode 100644 index 000000000000..278f60bea9f1 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/StoreTests/StoreTests.cs @@ -0,0 +1,426 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation.Runspaces; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ScenarioTest.Common; +using Microsoft.WindowsAzure.Commands.ScenarioTest.Common.CustomPowerShell; +using Microsoft.WindowsAzure.Commands.Utilities.Store; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.StoreTests +{ + [TestClass] + [Ignore] // https://github.com/WindowsAzure/azure-sdk-tools/issues/1184 + public class StoreTests : AzurePowerShellCertificateTest + { + public static string StoreCredentialFile = "store.publishsettings"; + + public static string StoreSubscriptionName = "Store"; + + public static string PromotionCodeVariable = "promotionCode"; + + private CustomHost customHost; + + private List expectedDefaultChoices; + private List promptChoices; + private List expectedPromptMessages; + private List expectedPromptCaptions; + private PromptAnswer defaultAnswer; + + public StoreTests() + : base( + "Store\\Common.ps1", + "Store\\StoreTests.ps1") + { + customHost = new CustomHost(); + } + + [TestInitialize] + public override void TestSetup() + { + base.TestSetup(); + customHost = new CustomHost(); + expectedDefaultChoices = new List(); + promptChoices = new List(); + expectedPromptMessages = new List(); + expectedPromptCaptions = new List(); + defaultAnswer = PromptAnswer.Yes; + powershell.ImportCredentials(StoreCredentialFile); + powershell.AddScript(string.Format("Select-AzureSubscription -Default {0}", StoreSubscriptionName)); + } + + private void PromptSetup() + { + customHost.CustomUI.PromptChoices = promptChoices; + customHost.CustomUI.ExpectedDefaultChoices = expectedDefaultChoices; + customHost.CustomUI.ExpectedPromptMessages = expectedPromptMessages; + customHost.CustomUI.ExpectedPromptCaptions = expectedPromptCaptions; + customHost.CustomUI.DefaultAnswer = defaultAnswer; + powershell.Runspace = RunspaceFactory.CreateRunspace(customHost); + powershell.Runspace.Open(); + if (credentials.PowerShellVariables.ContainsKey(PromotionCodeVariable)) + { + powershell.SetVariable(PromotionCodeVariable, credentials.PowerShellVariables[PromotionCodeVariable]); + } + powershell.SetVariable("freeAddOnIds", new string[] { "sendgrid_azure" }); + } + + #region Get-AzureStoreAddOn Scenario Tests + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + public void TestGetAzureStoreAddOnListAvailableWithInvalidCredentials() + { + RunPowerShellTest("Test-WithInvalidCredentials { Get-AzureStoreAddOn -ListAvailable }"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + public void TestGetAzureStoreAddOnListAvailableWithDefaultCountry() + { + RunPowerShellTest("Test-GetAzureStoreAddOnListAvailableWithDefaultCountry"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + public void TestGetAzureStoreAddOnListAvailableWithNoAddOns() + { + RunPowerShellTest("Test-GetAzureStoreAddOnListAvailableWithNoAddOns"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + public void TestGetAzureStoreAddOnListAvailableWithCountry() + { + RunPowerShellTest("Test-GetAzureStoreAddOnListAvailableWithCountry"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + public void TestGetAzureStoreAddOnListAvailableWithInvalidCountryName() + { + RunPowerShellTest("Test-GetAzureStoreAddOnListAvailableWithInvalidCountryName"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + public void TestGetAzureStoreAddOnWithInvalidCredentials() + { + RunPowerShellTest("Test-WithInvalidCredentials { Get-AzureStoreAddOn Name }"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + public void TestGetAzureStoreAddOnWithNoAddOns() + { + RunPowerShellTest("Test-GetAzureStoreAddOnWithNoAddOns"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + public void TestGetAzureStoreAddOnWithOneAddOn() + { + PromptSetup(); + RunPowerShellTest( + "Test-GetAzureStoreAddOnWithOneAddOn", + "AddOn-TestCleanup"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + public void TestGetAzureStoreAddOnWithMultipleAddOns() + { + PromptSetup(); + RunPowerShellTest( + "AddOn-TestCleanup", + "Test-GetAzureStoreAddOnWithMultipleAddOns", + "AddOn-TestCleanup"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + public void TestGetAzureStoreAddOnWithExistingAddOn() + { + PromptSetup(); + RunPowerShellTest( + "Test-GetAzureStoreAddOnWithExistingAddOn", + "AddOn-TestCleanup"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + public void TestGetAzureStoreAddOnCaseInsinsitive() + { + PromptSetup(); + RunPowerShellTest( + "Test-GetAzureStoreAddOnCaseInsinsitive", + "AddOn-TestCleanup"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + [Ignore] // https://github.com/WindowsAzure/azure-sdk-tools/issues/1094 + public void TestGetAzureStoreAddOnWithInvalidName() + { + RunPowerShellTest("Test-GetAzureStoreAddOnWithInvalidName"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + public void TestGetAzureStoreAddOnValidNonExisting() + { + RunPowerShellTest("Test-GetAzureStoreAddOnValidNonExisting"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + public void TestGetAzureStoreAddOnWithAppService() + { + PromptSetup(); + RunPowerShellTest("Test-GetAzureStoreAddOnWithAppService"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + public void TestGetAzureStoreAddOnPipedToRemoveAzureAddOn() + { + PromptSetup(); + RunPowerShellTest( + "Test-GetAzureStoreAddOnPipedToRemoveAzureAddOn", + "AddOn-TestCleanup"); + } + + #endregion + + #region New-AzureStoreAddOn Scenario Tests + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + public void TestNewAzureStoreAddOnWithInvalidCredentials() + { + RunPowerShellTest("Test-WithInvalidCredentials { New-AzureStoreAddOn Name AddOn Plan \"West US\" }"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + public void TestNewAzureStoreAddOnMissingRequiredParameter() + { + RunPowerShellTest("Test-NewAzureStoreAddOnMissingRequiredParameter"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + [Ignore] // https://github.com/WindowsAzure/azure-sdk-tools/issues/1094 + public void TestNewAzureStoreAddOnWithInvalidName() + { + PromptSetup(); + RunPowerShellTest("Test-NewAzureStoreAddOnWithInvalidName"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + [Ignore] // https://github.com/WindowsAzure/azure-sdk-tools/issues/1094 + public void TestNewAzureStoreAddOnWithInvalidWindowsAzureLocation() + { + PromptSetup(); + RunPowerShellTest("Test-NewAzureStoreAddOnWithInvalidWindowsAzureLocation"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + public void TestNewAzureStoreAddOnSuccessfull() + { + PromptSetup(); + RunPowerShellTest( + "Test-NewAzureStoreAddOnSuccessfull", + "AddOn-TestCleanup"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + public void TestNewAzureStoreAddOnWithExistingName() + { + PromptSetup(); + RunPowerShellTest("Test-NewAzureStoreAddOnWithExistingName"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + [Ignore] // https://github.com/WindowsAzure/azure-sdk-tools/issues/1094 + public void TestNewAzureStoreAddOnWithInvalidAddOn() + { + PromptSetup(); + RunPowerShellTest("Test-NewAzureStoreAddOnWithInvalidAddOn"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + [Ignore] // https://github.com/WindowsAzure/azure-sdk-tools/issues/1094 + public void TestNewAzureStoreAddOnWithInvalidPlan() + { + PromptSetup(); + RunPowerShellTest("Test-NewAzureStoreAddOnWithInvalidPlan"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + [Ignore] // https://github.com/WindowsAzure/azure-sdk-tools/issues/1094 + public void TestNewAzureStoreAddOnWithInvalidLocation() + { + PromptSetup(); + RunPowerShellTest("Test-NewAzureStoreAddOnWithInvalidLocation"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + public void TestNewAzureStoreAddOnWithInvalidPromoCode() + { + PromptSetup(); + RunPowerShellTest("Test-NewAzureStoreAddOnWithInvalidPromoCode"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + [Ignore] // https://github.com/WindowsAzure/azure-sdk-tools/issues/1097 + public void TestNewAzureStoreAddOnWithValidPromoCode() + { + PromptSetup(); + RunPowerShellTest( + "Test-NewAzureStoreAddOnWithValidPromoCode", + "AddOn-TestCleanup"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + public void TestNewAzureStoreAddOnWithNo() + { + defaultAnswer = PromptAnswer.No; + PromptSetup(); + RunPowerShellTest("Test-NewAzureStoreAddOnWithNo"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + public void TestNewAzureStoreAddOnConfirmationMessage() + { + expectedDefaultChoices.Add(PowerShellCustomConfirmation.No); + expectedPromptCaptions.Add(Utilities.Properties.Resources.NewAddOnConformation); + expectedPromptMessages.Add(string.Format( + Utilities.Properties.Resources.NewNonMicrosoftAddOnMessage, + string.Format(Utilities.Properties.Resources.AddOnUrl, "f131eadb-7aa3-401a-a2fb-1c7e71f45c3c"), + "free", + "Sendgrid")); + PromptSetup(); + RunPowerShellTest( + "Test-NewAzureStoreAddOnConfirmationMessage"); + } + + #endregion + + #region Remove-AzureStoreAddOn Scenario Tests + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + public void TestRemoveAzureStoreAddOnWithInvalidCredentials() + { + RunPowerShellTest("Test-WithInvalidCredentials { Remove-AzureStoreAddOn Name }"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + public void TestRemoveAzureStoreAddOnSuccessfull() + { + PromptSetup(); + RunPowerShellTest("Test-RemoveAzureStoreAddOnSuccessfull"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + public void TestRemoveAzureStoreAddOnWithCasing() + { + PromptSetup(); + RunPowerShellTest("Test-RemoveAzureStoreAddOnWithCasing"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + public void TestRemoveAzureStoreAddOnNotExisting() + { + RunPowerShellTest("Test-RemoveAzureStoreAddOnNotExisting"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + public void TestRemoveAzureStoreAddOnPipedFromGetAzureAddOn() + { + PromptSetup(); + RunPowerShellTest("Test-RemoveAzureStoreAddOnPipedFromGetAzureAddOn"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + public void TestRemoveAzureStoreAddOnMultiplePipedFromGetAzureAddOn() + { + PromptSetup(); + RunPowerShellTest("Test-RemoveAzureStoreAddOnMultiplePipedFromGetAzureAddOn"); + } + + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Store)] + public void TestRemoveAzureStoreAddOnWithNo() + { + promptChoices.AddRange(new int[] { PowerShellCustomConfirmation.Yes, PowerShellCustomConfirmation.No }); + PromptSetup(); + RunPowerShellTest("Test-RemoveAzureStoreAddOnWithNo"); + } + + #endregion + } +} diff --git a/src/Common/Commands.ScenarioTest/TrafficManagerTests/TrafficManagerTests.cs b/src/Common/Commands.ScenarioTest/TrafficManagerTests/TrafficManagerTests.cs new file mode 100644 index 000000000000..3d9213993f26 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/TrafficManagerTests/TrafficManagerTests.cs @@ -0,0 +1,284 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ScenarioTest.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Testing; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest +{ + public class TrafficManagerTests + { + private EnvironmentSetupHelper helper = new EnvironmentSetupHelper(); + + #region Remove-Profile Scenario Tests + + [Fact (Skip="Re-record mocks with new framework.")] + [Trait(Category.Service, Category.TrafficManager)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + public void TestRemoveProfileWithInvalidCredentials() + { + this.RunPowerShellTest("Test-WithInvalidCredentials { Test-CreateAndRemoveProfile }"); + } + + [Fact] + [Trait(Category.Service, Category.TrafficManager)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + public void TestCreateAndRemoveProfile() + { + this.RunPowerShellTest("Test-CreateAndRemoveProfile"); + } + + [Fact] + [Trait(Category.Service, Category.TrafficManager)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + public void TestRemoveProfileWithNonExistingName() + { + this.RunPowerShellTest("Test-RemoveProfileWithNonExistingName"); + } + + #endregion + + #region Get-Profile Scenario Tests + + [Fact(Skip = "Re-record mocks with new framework.")] + [Trait(Category.Service, Category.TrafficManager)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + public void TestGetProfileWithInvalidCredentials() + { + this.RunPowerShellTest("Test-WithInvalidCredentials { Test-GetProfile }"); + } + + [Fact] + [Trait(Category.Service, Category.TrafficManager)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + public void TestGetProfile() + { + this.RunPowerShellTest("Test-GetProfile"); + } + + [Fact(Skip = "Re-record mocks with new framework.")] + [Trait(Category.Service, Category.TrafficManager)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + public void TestGetMultipleProfiles() + { + this.RunPowerShellTest("Test-GetMultipleProfiles"); + } + + #endregion + + #region Enable-Disable-Profile Scenario Tests + + [Fact(Skip = "Re-record mocks with new framework.")] + [Trait(Category.Service, Category.TrafficManager)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + public void TestEnableProfileWithInvalidCredentials() + { + this.RunPowerShellTest("Test-WithInvalidCredentials { Test-EnableProfile }"); + } + + [Fact(Skip = "Re-record mocks with new framework.")] + [Trait(Category.Service, Category.TrafficManager)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + public void TestDisableProfileWithInvalidCredentials() + { + this.RunPowerShellTest("Test-WithInvalidCredentials { Test-DisableProfile }"); + } + + [Fact] + [Trait(Category.Service, Category.TrafficManager)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + public void TestEnableProfile() + { + this.RunPowerShellTest("Test-EnableProfile"); + } + + [Fact] + [Trait(Category.Service, Category.TrafficManager)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + public void TestDisableProfile() + { + this.RunPowerShellTest("Test-DisableProfile"); + } + + #endregion + + #region New-Profile Scenario Tests + + [Fact] + [Trait(Category.Service, Category.TrafficManager)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + public void TestNewProfile() + { + this.RunPowerShellTest("Test-NewProfile"); + } + + [Fact] + [Trait(Category.Service, Category.TrafficManager)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + public void TestNewProfileInvalidParameters() + { + this.RunPowerShellTest("Test-NewProfileWithInvalidParameter"); + } + + #endregion + + #region Set-Profile Scenario Tests + + [Fact] + [Trait(Category.Service, Category.TrafficManager)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + public void TestSetProfileProperty() + { + this.RunPowerShellTest("Test-SetProfileProperty"); + } + + [Fact] + [Trait(Category.Service, Category.TrafficManager)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + public void TestAddAzureTrafficManagerEndpoint() + { + this.RunPowerShellTest("Test-AddAzureTrafficManagerEndpoint"); + } + + [Fact] + [Trait(Category.Service, Category.TrafficManager)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + public void TestAddAzureTrafficManagerEndpointNoWeightLocation() + { + this.RunPowerShellTest("Test-AddAzureTrafficManagerEndpointNoWeightLocation"); + } + + [Fact] + [Trait(Category.Service, Category.TrafficManager)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + public void TestRemoveAzureTrafficManagerEndpoint() + { + this.RunPowerShellTest("Test-RemoveAzureTrafficManagerEndpoint"); + } + + [Fact(Skip = "TODO: Fix failing test.")] + [Trait(Category.Service, Category.TrafficManager)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + public void TestAddAzureTrafficManagerEndpointNoMinChildEndpoints() + { + this.RunPowerShellTest("Test-AddAzureTrafficManagerEndpointNoMinChildEndpoints"); + } + + [Fact(Skip = "TODO: Fix the test.")] + [Trait(Category.Service, Category.TrafficManager)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + public void TestAddAzureTrafficManagerEndpointTypeTrafficManager() + { + this.RunPowerShellTest("Test-AddAzureTrafficManagerEndpointTypeTrafficManager"); + } + + [Fact] + [Trait(Category.Service, Category.TrafficManager)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + public void TestSetAzureTrafficManagerEndpoint() + { + this.RunPowerShellTest("Test-SetAzureTrafficManagerEndpoint"); + } + + [Fact] + [Trait(Category.Service, Category.TrafficManager)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + public void TestSetAzureTrafficManagerEndpointUpdateWeightLocation() + { + this.RunPowerShellTest("Test-SetAzureTrafficManagerEndpointUpdateWeightLocation"); + } + + [Fact] + [Trait(Category.Service, Category.TrafficManager)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + public void TestSetAzureTrafficManagerEndpointAdds() + { + this.RunPowerShellTest("Test-SetAzureTrafficManagerEndpointAdds"); + } + + [Fact] + [Trait(Category.Service, Category.TrafficManager)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + public void TestAddMultipleAzureTrafficManagerEndpoint() + { + this.RunPowerShellTest("Test-AddMultipleAzureTrafficManagerEndpoint"); + } + + #endregion + + #region Test-DomainName Scenario Tests + + [Fact] + [Trait(Category.Service, Category.TrafficManager)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + public void TestTestAzureTrafficManagerDomainName() + { + this.RunPowerShellTest("Test-TestAzureTrafficManagerDomainName"); + } + + #endregion + + protected void SetupManagementClients() + { + helper.SetupSomeOfManagementClients(); + } + + protected void RunPowerShellTest(params string[] scripts) + { + using (UndoContext context = UndoContext.Current) + { + context.Start(TestUtilities.GetCallingClass(1), TestUtilities.GetCurrentMethodName(2)); + + SetupManagementClients(); + + List modules = Directory.GetFiles("Resources\\TrafficManager", "*.ps1").ToList(); + modules.Add("Common.ps1"); + + helper.SetupEnvironment(AzureModule.AzureServiceManagement); + helper.SetupModules(AzureModule.AzureServiceManagement, modules.ToArray()); + + helper.RunPowerShellTest(scripts); + } + } + } +} diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/CloudService/CmdletTestCloudServiceBase.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/CloudService/CmdletTestCloudServiceBase.cs new file mode 100644 index 000000000000..4bfe4d623f54 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/CloudService/CmdletTestCloudServiceBase.cs @@ -0,0 +1,304 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + public class CmdletTestCloudServiceBase : CmdletTestBase + { + protected class Cmdlets + { + public const string NewWAPackCloudService = "New-WAPackCloudService"; + public const string NewWAPackVMRole = "New-WAPackVMRole"; + public const string GetWAPackCloudService = "Get-WAPackCloudService"; + public const string GetWAPackVMRole = "Get-WAPackVMRole"; + public const string SetWAPackVMRole = "Set-WAPackVMRole"; + public const string RemoveWAPackCloudService = "Remove-WAPackCloudService"; + public const string RemoveWAPackVMRole = "Remove-WAPackVMRole"; + } + + // CloudService + protected const string cloudServiceName = "TestCloudService"; + protected const string cloudServiceLabel = "Label - TestCloudService"; + + protected List createdCloudServices; + + // VMRole + protected const string vmRoleNameFromCloudService = "TestVMRoleFromCloudService"; + protected const string vmRoleNameFromQuickCreate = "TestVMRoleFromQuickCreate"; + protected const string vmRoleLabelToCreate = "Label - TestVMRole"; + + protected List createdVMRolesFromQuickCreate; + protected List createdVMRolesFromCloudService; + + // Error handling + protected const string nonExistantResourceExceptionMessage = "The remote server returned an error: (404) Not Found."; + protected const string assertFailedNonExistantRessourceExceptionMessage = "Assert.IsFalse failed. " + nonExistantResourceExceptionMessage; + + protected CmdletTestCloudServiceBase() + { + this.createdCloudServices = new List(); + this.createdVMRolesFromQuickCreate = new List(); + this.createdVMRolesFromCloudService = new List(); + } + + protected void CreateCloudService() + { + var inputParams = new Dictionary() + { + {"Name", cloudServiceName}, + {"Label", cloudServiceLabel} + }; + var createdCloudService = this.InvokeCmdlet(Cmdlets.NewWAPackCloudService, inputParams); + Assert.AreEqual(1, createdCloudService.Count, string.Format("Actual CloudServices found - {0}, Expected CloudServices - {1}", createdCloudService.Count, 1)); + + var readCloudServiceName = createdCloudService.First().Properties["Name"].Value; + Assert.AreEqual(cloudServiceName, readCloudServiceName, string.Format("Actual CloudService name - {0}, Expected CloudService name- {1}", readCloudServiceName, cloudServiceName)); + + var readCloudServiceLabel = createdCloudService.First().Properties["Label"].Value; + Assert.AreEqual(cloudServiceLabel, readCloudServiceLabel, string.Format("Actual CloudService Label - {0}, Expected CloudService Label- {1}", readCloudServiceLabel, cloudServiceLabel)); + + var readCloudServiceProvisioningState = createdCloudService.First().Properties["ProvisioningState"].Value; + Assert.AreEqual("Provisioned", readCloudServiceProvisioningState, string.Format("Actual CloudService Provisionning State - {0}, Expected CloudService name- {1}", readCloudServiceProvisioningState, "Provisioned")); + + this.createdCloudServices.AddRange(createdCloudService); + } + + protected void CloudServicePreTestCleanup() + { + try + { + var inputParams = new Dictionary() + { + {"Name", cloudServiceName} + }; + var existingCloudServices = this.InvokeCmdlet(Cmdlets.GetWAPackCloudService ,inputParams); + + if (existingCloudServices != null && existingCloudServices.Any()) + { + this.createdCloudServices.AddRange(existingCloudServices); + this.RemoveCloudServices(); + } + } + catch (AssertFailedException e) + { + Assert.AreEqual(assertFailedNonExistantRessourceExceptionMessage, e.Message); + } + } + + protected void RemoveCloudServices() + { + foreach (var cloudService in this.createdCloudServices) + { + var inputParams = new Dictionary() + { + {"CloudService", cloudService}, + {"Force", null}, + {"PassThru", null} + }; + var isDeleted = this.InvokeCmdlet(Cmdlets.RemoveWAPackCloudService, inputParams, null); + Assert.AreEqual(1, isDeleted.Count); + Assert.AreEqual(true, isDeleted.First()); + + inputParams = new Dictionary() + { + {"Name", cloudServiceName} + }; + var deletedCloudService = this.InvokeCmdlet(Cmdlets.GetWAPackCloudService, inputParams, nonExistantResourceExceptionMessage); + Assert.AreEqual(0, deletedCloudService.Count); + } + + this.createdCloudServices.Clear(); + } + + protected void CreateVMRoleFromQuickCreate() + { + Dictionary inputParams = new Dictionary() + { + {"Name", vmRoleNameFromQuickCreate}, + {"Label", vmRoleLabelToCreate}, + {"ResourceDefinition", GetBasicResDef()} + }; + var createdVMRole = this.InvokeCmdlet(Cmdlets.NewWAPackVMRole, inputParams, null); + + Assert.AreEqual(1, createdVMRole.Count, string.Format("Actual VMRoles found - {0}, Expected VMRoles - {1}", createdVMRole.Count, 1)); + var createdVMRoleName = createdVMRole.First().Properties["Name"].Value; + + Assert.AreEqual(vmRoleNameFromQuickCreate, createdVMRoleName, string.Format("Actual VMRoles Name - {0}, Expected VMRoles Name- {1}", createdVMRoleName, vmRoleNameFromQuickCreate)); + this.createdVMRolesFromQuickCreate.AddRange(createdVMRole); + } + + protected void CreateVMRoleFromCloudService() + { + this.CreateCloudService(); + + Dictionary inputParams = new Dictionary() + { + {"Name", vmRoleNameFromCloudService}, + {"Label", vmRoleLabelToCreate}, + {"CloudService", this.createdCloudServices.First()}, + {"ResourceDefinition", GetBasicResDef()} + }; + var createdVMRole = this.InvokeCmdlet(Cmdlets.NewWAPackVMRole, inputParams, null); + + Assert.AreEqual(1, createdVMRole.Count, string.Format("Actual VMRoles found - {0}, Expected VMRoles - {1}", createdVMRole.Count, 1)); + var createdVMRoleName = createdVMRole.First().Properties["Name"].Value; + + Assert.AreEqual(vmRoleNameFromCloudService, createdVMRoleName, string.Format("Actual VMRoles Name - {0}, Expected VMRoles Name- {1}", createdVMRoleName, vmRoleNameFromCloudService)); + this.createdVMRolesFromCloudService.AddRange(createdVMRole); + } + + protected void VMRolePreTestCleanup() + { + // Cleaning up VMRole on cloudservice having the same name as the VMRole (QuickCreateVMRole) + try + { + var inputParams = new Dictionary() + { + {"Name", vmRoleNameFromQuickCreate} + }; + var existingVMRoles = this.InvokeCmdlet(Cmdlets.GetWAPackVMRole, inputParams, null); + + if (existingVMRoles != null && existingVMRoles.Any()) + { + this.createdVMRolesFromQuickCreate.AddRange(existingVMRoles); + } + + this.RemoveVMRoles(); + } + catch (AssertFailedException e) + { + Assert.AreEqual(assertFailedNonExistantRessourceExceptionMessage, e.Message); + } + + // Cleaning up VMRole created on existing CloudServices + try + { + if (this.createdCloudServices.Any()) + { + var inputParams = new Dictionary() + { + {"Name", vmRoleNameFromCloudService}, + {"CloudService", this.createdCloudServices.First()} + }; + var existingVMRoles = this.InvokeCmdlet(Cmdlets.GetWAPackVMRole, inputParams, null); + + if (existingVMRoles != null && existingVMRoles.Any()) + { + this.createdVMRolesFromCloudService.AddRange(existingVMRoles); + } + + this.RemoveVMRoles(); + } + } + catch (AssertFailedException e) + { + Assert.AreEqual(assertFailedNonExistantRessourceExceptionMessage, e.Message); + } + } + + protected void RemoveVMRoles() + { + foreach (var vmRole in this.createdVMRolesFromQuickCreate) + { + var inputParams = new Dictionary() + { + {"VMRole", vmRole}, + {"Force", null}, + {"PassThru", null} + }; + var isDeleted = this.InvokeCmdlet(Cmdlets.RemoveWAPackVMRole, inputParams, null); + Assert.AreEqual(1, isDeleted.Count); + Assert.AreEqual(true, isDeleted.First()); + + inputParams = new Dictionary() + { + {"Name", vmRoleNameFromQuickCreate} + }; + var deletedVMRole = this.InvokeCmdlet(Cmdlets.GetWAPackVMRole, inputParams, nonExistantResourceExceptionMessage); + Assert.AreEqual(0, deletedVMRole.Count); + } + + foreach (var vmRole in this.createdVMRolesFromCloudService) + { + var inputParams = new Dictionary() + { + {"VMRole", vmRole}, + {"CloudServiceName", cloudServiceName}, + {"Force", null}, + {"PassThru", null} + }; + var isDeleted = this.InvokeCmdlet(Cmdlets.RemoveWAPackVMRole, inputParams, null); + Assert.AreEqual(1, isDeleted.Count); + Assert.AreEqual(true, isDeleted.First()); + + inputParams = new Dictionary() + { + {"Name", vmRoleNameFromCloudService}, + {"CloudServiceName", cloudServiceName} + }; + var deletedVMRole = this.InvokeCmdlet(Cmdlets.GetWAPackVMRole, inputParams, nonExistantResourceExceptionMessage); + Assert.AreEqual(0, deletedVMRole.Count); + } + + this.createdVMRolesFromQuickCreate.Clear(); + } + + protected VMRoleResourceDefinition GetBasicResDef() + { + var resdef = new VMRoleResourceDefinition(); + + // Resdef + resdef.Name = "NoAppIPv6"; + resdef.Publisher = "Microsoft"; + resdef.SchemaVersion = "1.0"; + resdef.Version = "1.0.0.0"; + resdef.Type = "Microsoft.Compute/VMRole/1.0"; + + // Hardware Profile + resdef.IntrinsicSettings.HardwareProfile.VMSize = "ExtraSmall"; + + // Network Profile + var ip1 = new IPAddress(); + ip1.AllocationMethod = "Dynamic"; + ip1.Type = "IPV4"; + ip1.ConfigurationName = "SampleIPV4Config"; + + var networkAdapter = new NetworkAdapter(); + networkAdapter.Name = "Nic1"; + networkAdapter.IPAddresses.Add(ip1); + + resdef.IntrinsicSettings.NetworkProfile.NetworkAdapters.Add(networkAdapter); + + // Operating System Profile + resdef.IntrinsicSettings.OperatingSystemProfile = null; + + // Scaleout Settings + resdef.IntrinsicSettings.ScaleOutSettings.InitialInstanceCount = "1"; + resdef.IntrinsicSettings.ScaleOutSettings.MaximumInstanceCount = "5"; + resdef.IntrinsicSettings.ScaleOutSettings.MinimumInstanceCount = "1"; + resdef.IntrinsicSettings.ScaleOutSettings.UpgradeDomainCount = "1"; + + // Storage Profile + resdef.IntrinsicSettings.StorageProfile.OSVirtualHardDiskImage = WAPackConfigurationFactory.LinuxOSVirtualHardDiskImage; + + return resdef; + } + } +} diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/CloudService/GetWAPackCloudServiceTests.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/CloudService/GetWAPackCloudServiceTests.cs new file mode 100644 index 000000000000..ca5639d8dd63 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/CloudService/GetWAPackCloudServiceTests.cs @@ -0,0 +1,79 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + [TestClass] + public class GetWAPackCloudServiceTests : CmdletTestCloudServiceBase + { + [TestInitialize] + public void TestInitialize() + { + // Remove any existing CloudService + this.CloudServicePreTestCleanup(); + + // Create a CloudService + this.CreateCloudService(); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-CloudService")] + public void GetWAPackCloudServiceWithNoParam() + { + var allCloudServices = this.InvokeCmdlet(Cmdlets.GetWAPackCloudService, null); + Assert.IsTrue(allCloudServices.Count > 0); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-CloudService")] + public void GetWAPackCloudServiceFromName() + { + var inputParams = new Dictionary() + { + {"Name", cloudServiceName} + }; + var cloudService = this.InvokeCmdlet(Cmdlets.GetWAPackCloudService, inputParams); + Assert.AreEqual(1, cloudService.Count, string.Format("{0} CloudService Found, {1} CloudService Was Expected.", cloudService.Count, 1)); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Negative")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-CloudService")] + public void GetWAPackCloudServiceFromNameDoesNotExist() + { + string nonExistentCloudService = "WAPackCloudServiceDoesNotExist"; + var inputParams = new Dictionary() + { + {"Name", nonExistentCloudService} + }; + var cloudService = this.InvokeCmdlet(Cmdlets.GetWAPackCloudService, inputParams, nonExistantResourceExceptionMessage); + Assert.AreEqual(0, cloudService.Count, string.Format("{0} CloudService Found, {1} CloudService Was Expected.", cloudService.Count, 0)); + } + + [TestCleanup] + public void CloudServiceCleanup() + { + this.RemoveCloudServices(); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/CloudService/GetWAPackVMRoleTests.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/CloudService/GetWAPackVMRoleTests.cs new file mode 100644 index 000000000000..b185f7b70f96 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/CloudService/GetWAPackVMRoleTests.cs @@ -0,0 +1,113 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + [TestClass] + public class GetWAPackVMRoleTests : CmdletTestCloudServiceBase + { + [TestInitialize] + public void TestInitialize() + { + // Remove any existing VMRoles/CloudService + this.VMRolePreTestCleanup(); + this.CloudServicePreTestCleanup(); + + // Create a QuickCreateVMRole + this.CreateVMRoleFromQuickCreate(); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-CloudService")] + public void GetWAPackVMRolesWithNoParam() + { + var allVMRoles = this.InvokeCmdlet(Cmdlets.GetWAPackVMRole, null); + Assert.IsTrue(allVMRoles.Count > 0); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-CloudService")] + public void GetWAPackVMRoleFromName() + { + var inputParams = new Dictionary() + { + {"Name", vmRoleNameFromQuickCreate} + }; + var vmRole = this.InvokeCmdlet(Cmdlets.GetWAPackVMRole, inputParams); + Assert.AreEqual(1, vmRole.Count, string.Format("{0} VMRole Found, {1} VMRole Was Expected.", vmRole.Count, 1)); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-CloudService")] + public void GetWAPackVMRoleWithSameCloudServiceAndVMRoleNames() + { + var inputParams = new Dictionary() + { + {"Name", vmRoleNameFromQuickCreate}, + {"CloudServiceName", vmRoleNameFromQuickCreate} + }; + var vmRole = this.InvokeCmdlet(Cmdlets.GetWAPackVMRole, inputParams); + Assert.AreEqual(1, vmRole.Count, string.Format("{0} VMRole Found, {1} VMRole Was Expected.", vmRole.Count, 1)); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Negative")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-CloudService")] + public void GetWAPackVMRoleFromNameDoesNotExist() + { + string expectedVMRoleName = "WAPackVMRoleDoesNotExist"; + var inputParams = new Dictionary() + { + {"Name", expectedVMRoleName}, + }; + var vmRole = this.InvokeCmdlet(Cmdlets.GetWAPackVMRole, inputParams, nonExistantResourceExceptionMessage); + Assert.AreEqual(0, vmRole.Count); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Negative")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-CloudService")] + public void GetWAPackVMRoleFromNonExistentCloudService() + { + string nonExistentCloudService = "WAPackVMRoleCloudServiceNameDoesNotExist"; + var inputParams = new Dictionary() + { + {"Name", vmRoleNameFromQuickCreate}, + {"CloudServiceName", nonExistentCloudService} + }; + var vmRole = this.InvokeCmdlet(Cmdlets.GetWAPackVMRole, inputParams, nonExistantResourceExceptionMessage); + Assert.AreEqual(0, vmRole.Count); + } + + [TestCleanup] + public void VMRoleCleanup() + { + this.RemoveVMRoles(); + this.RemoveCloudServices(); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/CloudService/NewWAPackCloudServiceTests.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/CloudService/NewWAPackCloudServiceTests.cs new file mode 100644 index 000000000000..d0c69d90a8c6 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/CloudService/NewWAPackCloudServiceTests.cs @@ -0,0 +1,63 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + [TestClass] + public class NewWAPackCloudServiceTests : CmdletTestCloudServiceBase + { + [TestInitialize] + public void TestInitialize() + { + // Remove any existing CloudService + this.CloudServicePreTestCleanup(); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-CloudService")] + public void NewWAPackCloudServiceDefault() + { + var inputParams = new Dictionary() + { + {"Name", cloudServiceName}, + {"Label", cloudServiceLabel} + }; + var createdCloudService = this.InvokeCmdlet(Cmdlets.NewWAPackCloudService, inputParams); + Assert.AreEqual(1, createdCloudService.Count, string.Format("Actual CloudServices Found - {0}, Expected CloudServices - {1}", createdCloudService.Count, 1)); + + var readCloudServiceName = createdCloudService.First().Properties["Name"].Value; + Assert.AreEqual(cloudServiceName, readCloudServiceName, string.Format("Actual CloudService Name - {0}, Expected CloudService Name- {1}", readCloudServiceName, cloudServiceName)); + + var readCloudServiceLabel = createdCloudService.First().Properties["Label"].Value; + Assert.AreEqual(cloudServiceLabel, readCloudServiceLabel, string.Format("Actual CloudService Label - {0}, Expected CloudService Label- {1}", readCloudServiceLabel, cloudServiceLabel)); + + var readCloudServiceProvisioningState = createdCloudService.First().Properties["ProvisioningState"].Value; + Assert.AreEqual("Provisioned", readCloudServiceProvisioningState, string.Format("Actual CloudService Provisionning State - {0}, Expected CloudService Provisionning State - {1}", readCloudServiceProvisioningState, "Provisioned")); + + this.createdCloudServices.AddRange(createdCloudService); + } + + [TestCleanup] + public void CloudServiceCleanup() + { + this.RemoveCloudServices(); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/CloudService/NewWAPackVMRoleTests.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/CloudService/NewWAPackVMRoleTests.cs new file mode 100644 index 000000000000..4e66819ab6c0 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/CloudService/NewWAPackVMRoleTests.cs @@ -0,0 +1,85 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + [TestClass] + public class NewWAPackVMRoleTests : CmdletTestCloudServiceBase + { + [TestInitialize] + public void TestInitialize() + { + // Remove any existing VMRoles/CloudService + this.VMRolePreTestCleanup(); + this.CloudServicePreTestCleanup(); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-CloudService")] + public void NewWAPackVMRoleFromQuickCreate() + { + var inputParams = new Dictionary() + { + {"Name", vmRoleNameFromQuickCreate}, + {"Label", vmRoleLabelToCreate}, + {"ResourceDefinition", GetBasicResDef()} + }; + var createdVMRole = this.InvokeCmdlet(Cmdlets.NewWAPackVMRole, inputParams, null); + + Assert.AreEqual(1, createdVMRole.Count, string.Format("Actual VMRoles found - {0}, Expected VMRoles - {1}", createdVMRole.Count, 1)); + var createdVMRoleName = createdVMRole.First().Properties["Name"].Value; + + Assert.AreEqual(vmRoleNameFromQuickCreate, createdVMRoleName, string.Format("Actual VMRoles Name - {0}, Expected VMRoles Name- {1}", createdVMRoleName, vmRoleNameFromQuickCreate)); + this.createdVMRolesFromQuickCreate.AddRange(createdVMRole); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-CloudService")] + public void NewWAPackVMRoleFromCloudService() + { + // Create a CloudService to place the VMRole on + this.CreateCloudService(); + + var inputParams = new Dictionary() + { + {"Name", vmRoleNameFromCloudService}, + {"Label", vmRoleLabelToCreate}, + {"ResourceDefinition", GetBasicResDef()}, + {"CloudService", this.createdCloudServices.First()} + }; + var actualCreatedVMRole = this.InvokeCmdlet(Cmdlets.NewWAPackVMRole, inputParams, null); + + Assert.AreEqual(1, actualCreatedVMRole.Count, string.Format("Actual VMRoles Found - {0}, Expected VMRoles - {1}", actualCreatedVMRole.Count, 1)); + var createdVMRoleName = actualCreatedVMRole.First().Properties["Name"].Value; + + Assert.AreEqual(vmRoleNameFromCloudService, createdVMRoleName, string.Format("Actual VMRoles Name - {0}, Expected VMRoles Name- {1}", createdVMRoleName, vmRoleNameFromCloudService)); + this.createdVMRolesFromCloudService.AddRange(actualCreatedVMRole); + } + + [TestCleanup] + public void VMRoleCleanup() + { + this.RemoveVMRoles(); + this.RemoveCloudServices(); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/CloudService/RemoveWAPackCloudServiceTests.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/CloudService/RemoveWAPackCloudServiceTests.cs new file mode 100644 index 000000000000..b8b410368e58 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/CloudService/RemoveWAPackCloudServiceTests.cs @@ -0,0 +1,68 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + [TestClass] + public class RemoveWAPackCloudServiceTests : CmdletTestCloudServiceBase + { + [TestInitialize] + public void TestInitialize() + { + // Remove any existing CloudService + this.CloudServicePreTestCleanup(); + + // Create CloudService + this.CreateCloudService(); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-CloudService")] + public void RemoveWAPackCloudServiceDefault() + { + var cloudServiceToDelete = this.createdCloudServices.First(); + + var inputParams = new Dictionary() + { + {"CloudService", cloudServiceToDelete}, + {"Force", null}, + {"PassThru", null} + }; + var isDeleted = this.InvokeCmdlet(Cmdlets.RemoveWAPackCloudService, inputParams); + Assert.AreEqual(1, isDeleted.Count); + Assert.AreEqual(true, isDeleted.First()); + + inputParams = new Dictionary() + { + {"Name", cloudServiceToDelete.Properties["Name"].Value} + }; + var deletedCloudService = this.InvokeCmdlet(Cmdlets.GetWAPackCloudService, inputParams, nonExistantResourceExceptionMessage); + Assert.AreEqual(0, deletedCloudService.Count); + + this.createdCloudServices.Remove(cloudServiceToDelete); + } + + [TestCleanup] + public void CloudServiceCleanup() + { + this.RemoveCloudServices(); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/CloudService/RemoveWAPackVMRoleTests.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/CloudService/RemoveWAPackVMRoleTests.cs new file mode 100644 index 000000000000..edda0c370d43 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/CloudService/RemoveWAPackVMRoleTests.cs @@ -0,0 +1,87 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + [TestClass] + public class RemoveWAPackVMRoleTests : CmdletTestCloudServiceBase + { + [TestInitialize] + public void TestInitialize() + { + // Remove any existing VMRoles/CloudService + this.VMRolePreTestCleanup(); + this.CloudServicePreTestCleanup(); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-CloudService")] + public void RemoveWAPackQuickCreateVMRole() + { + this.CreateVMRoleFromQuickCreate(); + var vmRoleToDelete = this.createdVMRolesFromQuickCreate.First(); + + var inputParams = new Dictionary() + { + {"VMRole", vmRoleToDelete}, + {"Force", null}, + {"PassThru", null} + }; + var isDeleted = this.InvokeCmdlet(Cmdlets.RemoveWAPackVMRole, inputParams); + Assert.AreEqual(1, isDeleted.Count); + Assert.AreEqual(true, isDeleted.First()); + + inputParams = new Dictionary() + { + {"Name", vmRoleToDelete.Properties["Name"].Value} + }; + var deletedCloudService = this.InvokeCmdlet(Cmdlets.GetWAPackVMRole, inputParams, nonExistantResourceExceptionMessage); + Assert.AreEqual(0, deletedCloudService.Count); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-CloudService")] + public void RemoveWAPackVMRoleOnExistingCloudService() + { + this.CreateVMRoleFromCloudService(); + var vmRoleToDelete = this.createdVMRolesFromCloudService.First(); + + var inputParams = new Dictionary() + { + {"VMRole", vmRoleToDelete}, + {"CloudServiceName", this.createdCloudServices.First().Properties["Name"].Value}, + {"Force", null}, + {"PassThru", null} + }; + var isDeleted = this.InvokeCmdlet(Cmdlets.RemoveWAPackVMRole, inputParams); + Assert.AreEqual(1, isDeleted.Count); + Assert.AreEqual(true, isDeleted.First()); + + inputParams = new Dictionary() + { + {"Name", vmRoleToDelete.Properties["Name"].Value} + }; + var deletedCloudService = this.InvokeCmdlet(Cmdlets.GetWAPackVMRole, inputParams, nonExistantResourceExceptionMessage); + Assert.AreEqual(0, deletedCloudService.Count); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/CloudService/SetWAPackVMRoleTests.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/CloudService/SetWAPackVMRoleTests.cs new file mode 100644 index 000000000000..bbdbbd38d073 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/CloudService/SetWAPackVMRoleTests.cs @@ -0,0 +1,72 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + [TestClass] + public class SetWAPackVMRoleTests : CmdletTestCloudServiceBase + { + [TestInitialize] + public void TestInitialize() + { + // Remove any existing VMRoles/CloudService + this.CloudServicePreTestCleanup(); + this.VMRolePreTestCleanup(); + + // Create a QuickCreateVMRole + this.CreateVMRoleFromQuickCreate(); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-CloudService")] + public void SetWAPackQuickCreateVMRoleInstanceCount() + { + var vmRoleToScale = this.createdVMRolesFromQuickCreate.First(); + var vmRoleInstances = (IEnumerable) vmRoleToScale.Properties["VMs"].Value; + + var inputParams = new Dictionary() + { + {"VMRole", vmRoleToScale}, + {"InstanceCount", vmRoleInstances.Count() + 1}, + {"PassThru", null} + }; + var isUpdated = this.InvokeCmdlet(Cmdlets.SetWAPackVMRole, inputParams); + Assert.AreEqual(1, isUpdated.Count); + Assert.AreEqual(true, isUpdated.First()); + + inputParams = new Dictionary() + { + {"Name", vmRoleNameFromQuickCreate} + }; + var updatedVMRole = this.InvokeCmdlet(Cmdlets.GetWAPackVMRole, inputParams); + Assert.AreEqual(1, updatedVMRole.Count, string.Format("{0} VMRole Found, {1} VMRole Was Expected.", updatedVMRole.Count, 1)); + + var updatedVMRoleInstances = (IEnumerable) updatedVMRole.First().Properties["VMs"].Value; + Assert.AreEqual(vmRoleInstances.Count() + 1, updatedVMRoleInstances.Count(), string.Format("{0} VMInstances Found, {1} VMInstances Was Expected.", vmRoleInstances.Count() + 1, updatedVMRoleInstances.Count())); + } + + [TestCleanup] + public void VMRoleCleanup() + { + this.RemoveVMRoles(); + this.RemoveCloudServices(); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/CmdletTestBase.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/CmdletTestBase.cs new file mode 100644 index 000000000000..326c4032f61f --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/CmdletTestBase.cs @@ -0,0 +1,110 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Management.Automation; +using System.Management.Automation.Runspaces; +using System.Net; +using System.Reflection; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Exceptions; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + /// + /// Provides a base for test classes which tests cmdlets. It supplies a pre-created + /// object for every test method and handles the clean-up automatically. Use the this.PowerShell + /// property and add commands and parameters; exactly how you can invoke cmdlets from code. + /// + [TestClass] + public class CmdletTestBase + { + private static string CmdletAssemblyPath = typeof(WAPackOperationException).Assembly.Location; + private const string PowerShellObjectTag = "PowerShellObject"; + + public TestContext TestContext { get; set; } + public System.Management.Automation.PowerShell PowerShell + { + get + { + return this.TestContext.Properties[CmdletTestBase.PowerShellObjectTag] as System.Management.Automation.PowerShell; + } + } + + [TestInitialize] + public void CmdletBaseInitialize() + { + // create PowerShell object and save in test context + this.TestContext.Properties.Add(CmdletTestBase.PowerShellObjectTag, CmdletTestBase.CreatePipeline()); + InitializeWAPackConfiguration(); + ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true; + } + + [TestCleanup] + public void TestCleanup() + { + var ps = this.TestContext.Properties[CmdletTestBase.PowerShellObjectTag] as IDisposable; + ps.Dispose(); + } + + private static System.Management.Automation.PowerShell CreatePipeline() + { + var iss = InitialSessionState.CreateDefault(); + iss.Types.Clear(); + iss.Formats.Clear(); + iss.ImportPSModule(new string[] { CmdletAssemblyPath }); + + return System.Management.Automation.PowerShell.Create(iss); + } + + private void InitializeWAPackConfiguration() + { + string directoryPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + var path = Path.GetFullPath(Path.Combine(directoryPath, "..\\..\\..\\Package\\Debug\\ServiceManagement\\Azure\\Azure.psd1")); + this.PowerShell.Commands.Clear(); + + this.PowerShell.AddCommand("Import-Module").AddArgument(path).InvokeAndAssertForNoErrors(); + this.PowerShell.Commands.Clear(); + + this.PowerShell.AddScript("Get-AzureSubscription | Remove-AzureSubscription -Force").InvokeAndAssertForNoErrors(); + this.PowerShell.Commands.Clear(); + + var publishSettingsPath = Path.GetFullPath(Path.Combine(directoryPath, "..\\..\\..\\Common\\Commands.ScenarioTest\\Artifacts\\WAPackTestConfig.publishsettings")); + this.PowerShell.AddCommand("Import-AzurePublishSettingsFile").AddArgument(publishSettingsPath).InvokeAndAssertForNoErrors(); + this.PowerShell.Commands.Clear(); + } + + public ICollection InvokeCmdlet(string cmdletName, IDictionary parameters, string expectedErrorMsg = null) + { + var ps = this.PowerShell; + ps.Commands.Clear(); + ps.Streams.ClearStreams(); + + ps.AddCommand(cmdletName); + + if (parameters != null) + { + foreach (var item in parameters) + { + ps.Commands.AddParameter(item.Key, item.Value); + } + } + + return ps.InvokeAndAssertForErrors(expectedErrorMsg); + } + } + +} diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/Networking/CmdletTestNetworkingBase.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/Networking/CmdletTestNetworkingBase.cs new file mode 100644 index 000000000000..b5bb4f693015 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/Networking/CmdletTestNetworkingBase.cs @@ -0,0 +1,156 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + public class CmdletTestNetworkingBase : CmdletTestBase + { + protected class Cmdlets + { + public const string NewWAPackVNet = "New-WAPackVNet"; + public const string NewWAPackVMSubnet = "New-WAPackVMSubnet"; + public const string NewWAPackStaticIPAddressPool = "New-WAPackStaticIPAddressPool"; + public const string GetWAPackLogicalNetwork = "Get-WAPackLogicalNetwork"; + public const string GetWAPackVNet = "Get-WAPackVNet"; + public const string GetWAPackVMSubnet = "Get-WAPackVMSubnet"; + public const string GetWAPackStaticIPAddressPool = "Get-WAPackStaticIPAddressPool"; + public const string RemoveWAPackVNet = "Remove-WAPackVNet"; + public const string RemoveWAPackVMSubnet = "Remove-WAPackVMSubnet"; + public const string RemoveWAPackStaticIPAddressPool = "Remove-WAPackStaticIPAddressPool"; + } + + // Network properties + protected const string staticIPAddressPoolName = "TestStaticIPAddressPoolForNetworkingTests"; + protected const string vmSubnetName = "TestVMSubnetForNetworkingTests"; + protected const string vNetName = "TestVNetForNetworkingTests"; + protected const string vNetDescription = "Description - TestVNetForNetworkingTests"; + protected const string subnet = "192.168.1.0/24"; + protected const string ipAddressRangeStart = "192.168.1.2"; + protected const string ipAddressRangeEnd = "192.168.1.10"; + + protected List createdVNet; + protected List createdVMSubnet; + protected List createdStaticIPAddressPool; + + // Error handling + protected const string nonExistantResourceExceptionMessage = "The remote server returned an error: (404) Not Found."; + protected const string assertFailedNonExistantRessourceExceptionMessage = "Assert.IsFalse failed. " + nonExistantResourceExceptionMessage; + + protected CmdletTestNetworkingBase() + { + this.createdVNet = new List(); + this.createdVMSubnet = new List(); + this.createdStaticIPAddressPool = new List(); + } + protected void CreateFullVNet() + { + this.CreateVNet(); + this.CreateVMSubnet(); + this.CreateStaticIPAddressPool(); + } + + protected void CreateVNet() + { + var inputParams = new Dictionary() + { + {"Name", WAPackConfigurationFactory.AvezLogicalNetworkName} + }; + var existingLogicalNetwork = this.InvokeCmdlet(Cmdlets.GetWAPackLogicalNetwork, inputParams, null); + Assert.AreEqual(1, existingLogicalNetwork.Count, string.Format("{0} LogicalNetwork Found, {1} LogicalNetwork Was Expected.", existingLogicalNetwork.Count, 1)); + + inputParams = new Dictionary() + { + {"Name", vNetName}, + {"Description", vNetDescription}, + {"LogicalNetwork", existingLogicalNetwork.First()} + }; + var createdVNet = this.InvokeCmdlet(Cmdlets.NewWAPackVNet, inputParams, null); + Assert.AreEqual(1, createdVNet.Count, string.Format("{0} VNet Found, {1} VNet Was Expected.", createdVNet.Count, 1)); + this.createdVNet.AddRange(createdVNet); + } + + protected void CreateVMSubnet() + { + var inputParams = new Dictionary() + { + {"Name", vmSubnetName}, + {"VNet", this.createdVNet.First()}, + {"Subnet", subnet} + }; + var createdSubnet = this.InvokeCmdlet(Cmdlets.NewWAPackVMSubnet, inputParams, null); + Assert.AreEqual(1, createdSubnet.Count, string.Format("{0} VMSubnet Found, {1} VMSubnet Was Expected.", createdSubnet.Count, 1)); + createdVMSubnet.AddRange(createdSubnet); + } + + protected void CreateStaticIPAddressPool() + { + var inputParams = new Dictionary() + { + {"Name", staticIPAddressPoolName}, + {"VMSubnet", this.createdVMSubnet.First()}, + {"IPAddressRangeStart", ipAddressRangeStart}, + {"IPAddressRangeEnd", ipAddressRangeEnd} + }; + var createdStaticIPAddressPool = this.InvokeCmdlet(Cmdlets.NewWAPackStaticIPAddressPool, inputParams, null); + Assert.AreEqual(1, createdStaticIPAddressPool.Count, string.Format("{0} StaticIPAddressPool Found, {1} StaticIPAddressPool Was Expected.", createdStaticIPAddressPool.Count, 1)); + this.createdStaticIPAddressPool.AddRange(createdStaticIPAddressPool); + } + + protected void RemoveVNet() + { + // No need to remove individual components (StaticIPAddressPool, VMSubnet) since + // Remove-WAPackVNet will revove all components before removing the VNet. + foreach (var vNet in this.createdVNet) + { + var inputParams = new Dictionary() + { + {"VNet", vNet}, + {"Force", null}, + {"PassThru", null} + }; + var isDeleted = this.InvokeCmdlet(Cmdlets.RemoveWAPackVNet, inputParams); + Assert.AreEqual(1, isDeleted.Count); + Assert.AreEqual(true, isDeleted.First()); + + inputParams = new Dictionary() + { + {"Name", vNetName} + }; + var deletedVNet = this.InvokeCmdlet(Cmdlets.GetWAPackVNet, inputParams, null); + Assert.AreEqual(0, deletedVNet.Count); + } + this.createdVNet.Clear(); + } + + protected void NetworkingPreTestCleanup() + { + Dictionary inputParams = new Dictionary() + { + {"Name", vNetName} + }; + var existingVNet = this.InvokeCmdlet(Cmdlets.GetWAPackVNet, inputParams, null); + + if (existingVNet.Any()) + { + this.createdVNet.AddRange(existingVNet); + this.RemoveVNet(); + } + } + } +} diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/Networking/GetWAPackLogicalNetworkTests.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/Networking/GetWAPackLogicalNetworkTests.cs new file mode 100644 index 000000000000..f463a13afead --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/Networking/GetWAPackLogicalNetworkTests.cs @@ -0,0 +1,63 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + [TestClass] + public class GetWAPackLogicalNetworkTests : CmdletTestNetworkingBase + { + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-Networking")] + public void GetWAPackLogicalNetworkNoParam() + { + var allLogicalNetworks = this.InvokeCmdlet(Cmdlets.GetWAPackLogicalNetwork, null); + Assert.IsTrue(allLogicalNetworks.Count > 0); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-Networking")] + public void GetWAPackLogicalNetworkFromName() + { + var inputParams = new Dictionary() + { + {"Name", WAPackConfigurationFactory.AvezLogicalNetworkName} + }; + var logicalNetwork = this.InvokeCmdlet(Cmdlets.GetWAPackLogicalNetwork, inputParams); + Assert.AreEqual(1, logicalNetwork.Count, string.Format("{0} LogicalNetwork Found, {1} LogicalNetwork Was Expected.", logicalNetwork.Count, 1)); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Negative")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-Networking")] + public void GetWAPackLogicalNetworkFromNameDoesNotExist() + { + var expectedLogicalNetworkName = "WAPackLogicalNetworkDoesNotExist"; + var inputParams = new Dictionary() + { + {"Name", expectedLogicalNetworkName} + }; + var logicalNetwork = this.InvokeCmdlet(Cmdlets.GetWAPackLogicalNetwork, inputParams); + Assert.AreEqual(0, logicalNetwork.Count); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/Networking/GetWAPackStaticIPAddressPoolTests.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/Networking/GetWAPackStaticIPAddressPoolTests.cs new file mode 100644 index 000000000000..07e946657b87 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/Networking/GetWAPackStaticIPAddressPoolTests.cs @@ -0,0 +1,86 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + [TestClass] + public class GetWAPackStaticIPAddressPoolTests : CmdletTestNetworkingBase + { + [TestInitialize] + public void TestInitialize() + { + // Remove any existing VNet + this.NetworkingPreTestCleanup(); + + // Create a FullVNet + this.CreateFullVNet(); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-Networking")] + public void GetWAPackStaticIPAddressPoolWithNoNameParam() + { + var inputParams = new Dictionary() + { + {"VMSubnet", this.createdVMSubnet.First()} + }; + var allStaticIPAddressPool = this.InvokeCmdlet(Cmdlets.GetWAPackStaticIPAddressPool, inputParams); + Assert.IsTrue(allStaticIPAddressPool.Count > 0); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-Networking")] + public void GetWAPackStaticIPAddressPoolFromName() + { + var inputParams = new Dictionary() + { + {"Name", staticIPAddressPoolName}, + {"VMSubnet", this.createdVMSubnet.First()} + }; + var staticIPAddressPool = this.InvokeCmdlet(Cmdlets.GetWAPackStaticIPAddressPool, inputParams); + Assert.AreEqual(1, staticIPAddressPool.Count, string.Format("{0} StaticIPAddressPool Found, {1} StaticIPAddressPool Was Expected.", staticIPAddressPool.Count, 1)); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Negative")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-Networking")] + public void GetWAPackStaticIPAddressPoolFromNameDoesNotExist() + { + var expectedStaticIPAddressPoolName = "WAPackStaticIPAddressPoolDoesNotExist"; + var inputParams = new Dictionary() + { + {"Name", expectedStaticIPAddressPoolName}, + {"VMSubnet", this.createdVMSubnet.First()} + }; + var staticIPAddressPool = this.InvokeCmdlet(Cmdlets.GetWAPackStaticIPAddressPool, inputParams); + Assert.IsTrue(staticIPAddressPool.Count == 0); + } + + [TestCleanup] + public void StaticIPAddressPoolCleanup() + { + this.RemoveVNet(); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/Networking/GetWAPackVMSubnetTests.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/Networking/GetWAPackVMSubnetTests.cs new file mode 100644 index 000000000000..65dc86cc4cdd --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/Networking/GetWAPackVMSubnetTests.cs @@ -0,0 +1,86 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + [TestClass] + public class GetWAPackVMSubnetTests : CmdletTestNetworkingBase + { + [TestInitialize] + public void TestInitialize() + { + // Remove any existing VNet + this.NetworkingPreTestCleanup(); + + // Create a FullVNet + this.CreateFullVNet(); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-Networking")] + public void GetWAPackVMSubnetWithNoNameParam() + { + var inputParams = new Dictionary() + { + {"VNet", this.createdVNet.First()} + }; + var allVMSubnet = this.InvokeCmdlet(Cmdlets.GetWAPackVMSubnet, inputParams); + Assert.IsTrue(allVMSubnet.Count > 0); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-Networking")] + public void GetWAPackVMSubnetFromName() + { + var inputParams = new Dictionary() + { + {"Name", vmSubnetName}, + {"VNet", this.createdVNet.First()} + }; + var vmSubnet = this.InvokeCmdlet(Cmdlets.GetWAPackVMSubnet, inputParams); + Assert.AreEqual(1, vmSubnet.Count, string.Format("{0} VMSubnet Found, {1} VMSubnet Was Expected.", vmSubnet.Count, 1)); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Negative")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-Networking")] + public void GetWAPackVMSubnetFromNameDoesNotExist() + { + var expectedVMSubnetName = "WAPackVMSubnetDoesNotExist"; + var inputParams = new Dictionary() + { + {"Name", expectedVMSubnetName}, + {"VNet", this.createdVNet.First()} + }; + var vmSubnet = this.InvokeCmdlet(Cmdlets.GetWAPackVMSubnet, inputParams); + Assert.IsTrue(vmSubnet.Count == 0); + } + + [TestCleanup] + public void VMSubnetCleanup() + { + this.RemoveVNet(); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/Networking/GetWAPackVNetTests.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/Networking/GetWAPackVNetTests.cs new file mode 100644 index 000000000000..1d207c2cefaa --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/Networking/GetWAPackVNetTests.cs @@ -0,0 +1,115 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + [TestClass] + public class GetWAPackVNetTests : CmdletTestNetworkingBase + { + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-Networking")] + public void GetWAPackVNetWithNoParam() + { + var allVNetworks = this.InvokeCmdlet(Cmdlets.GetWAPackVNet, null); + Assert.IsTrue(allVNetworks.Any()); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-Networking")] + public void GetWAPackWAPackVNetFromName() + { + string expectedVNetworkName = WAPackConfigurationFactory.AvenzVnetName; + var inputParams = new Dictionary() + { + {"Name", expectedVNetworkName} + }; + var vNetworkFromName = this.InvokeCmdlet(Cmdlets.GetWAPackVNet, inputParams); + + Assert.AreEqual(1, vNetworkFromName.Count); + var actualvNetworkFromName = vNetworkFromName.First().Properties["Name"].Value; + + Assert.AreEqual(expectedVNetworkName, actualvNetworkFromName); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-Networking")] + public void GetWAPackWAPackVNetFromIdAndName() + { + string expectedVNetworkName = WAPackConfigurationFactory.AvenzVnetName; + var inputParams = new Dictionary() + { + {"Name", expectedVNetworkName} + }; + var vNetworkFromName = this.InvokeCmdlet(Cmdlets.GetWAPackVNet, inputParams); + + Assert.AreEqual(1, vNetworkFromName.Count); + var expectedvNetworkId = vNetworkFromName.First().Properties["Id"].Value; + + inputParams = new Dictionary() + { + {"Id", expectedvNetworkId} + }; + var vNetworkFromId = this.PowerShell.InvokeAndAssertForNoErrors(); + + var actualvNetworkFromId = vNetworkFromId[0].Properties["Id"].Value; + Assert.AreEqual(expectedvNetworkId, actualvNetworkFromId); + } + + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Negative")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-Networking")] + public void GetWAPackVNetByNameDoesNotExist() + { + string expectedVNetworkName = "WAPackWAPackVNetDoesNotExist"; + var inputParams = new Dictionary() + { + {"Name", expectedVNetworkName} + }; + var vNetworkFromName = this.InvokeCmdlet(Cmdlets.GetWAPackVNet, inputParams); + + Assert.AreEqual(0, vNetworkFromName.Count); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Negative")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-Networking")] + public void GetWAPackVNetByIdDoesNotExist() + { + var expectedVmId = Guid.NewGuid().ToString(); + var expectedError = string.Format(Utilities.Properties.Resources.ResourceNotFound, expectedVmId); + var inputParams = new Dictionary() + { + {"Id", expectedVmId} + }; + var vmFromName = this.InvokeCmdlet(Cmdlets.GetWAPackVNet, inputParams, expectedError); + Assert.AreEqual(0, vmFromName.Count); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/Networking/NewWAPackStaticIPAddressPoolTests.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/Networking/NewWAPackStaticIPAddressPoolTests.cs new file mode 100644 index 000000000000..57b3b301588c --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/Networking/NewWAPackStaticIPAddressPoolTests.cs @@ -0,0 +1,68 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + [TestClass] + public class NewWAPackStaticIPAddressPoolTests : CmdletTestNetworkingBase + { + [TestInitialize] + public void TestInitialize() + { + // Remove any existing VNet + this.NetworkingPreTestCleanup(); + + // Create a VNnet/VMSubnet + this.CreateVNet(); + this.CreateVMSubnet(); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-Networking")] + public void NewWAPackStaticIPAddressPoolDefault() + { + var inputParams = new Dictionary() + { + {"Name", staticIPAddressPoolName}, + {"VMSubnet", this.createdVMSubnet.First()}, + {"IPAddressRangeStart", ipAddressRangeStart}, + {"IPAddressRangeEnd", ipAddressRangeEnd} + }; + var createdStaticIPAddressPool = this.InvokeCmdlet(Cmdlets.NewWAPackStaticIPAddressPool, inputParams, null); + Assert.AreEqual(1, createdStaticIPAddressPool.Count, string.Format("{0} StaticIPAddressPool Found, {1} StaticIPAddressPool Was Expected.", createdStaticIPAddressPool.Count, 1)); + this.createdStaticIPAddressPool.AddRange(createdStaticIPAddressPool); + + var readStaticIPAddressPoolName = createdStaticIPAddressPool.First().Properties["Name"].Value; + Assert.AreEqual(staticIPAddressPoolName, readStaticIPAddressPoolName, string.Format("Actual StaticIPAddressPool Name - {0}, Expected StaticIPAddressPool Name - {1}", readStaticIPAddressPoolName, staticIPAddressPoolName)); + + var readStaticIPAddressPoolIPAddressRangeStart = createdStaticIPAddressPool.First().Properties["IPAddressRangeStart"].Value; + Assert.AreEqual(ipAddressRangeStart, readStaticIPAddressPoolIPAddressRangeStart, string.Format("Actual StaticIPAddressPool IPAddressRangeStart - {0}, Expected StaticIPAddressPool IPAddressRangeStart - {1}", readStaticIPAddressPoolIPAddressRangeStart, ipAddressRangeStart)); + + var readStaticIPAddressPoolIPAddressRangeEnd = createdStaticIPAddressPool.First().Properties["IPAddressRangeEnd"].Value; + Assert.AreEqual(ipAddressRangeEnd, readStaticIPAddressPoolIPAddressRangeEnd, string.Format("Actual StaticIPAddressPool IPAddressRangeEnd - {0}, Expected StaticIPAddressPool IPAddressRangeEnd - {1}", readStaticIPAddressPoolIPAddressRangeEnd, ipAddressRangeEnd)); + } + + [TestCleanup] + public void StaticIPAddressPoolCleanup() + { + this.RemoveVNet(); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/Networking/NewWAPackVMSubnetTests.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/Networking/NewWAPackVMSubnetTests.cs new file mode 100644 index 000000000000..e34e3e4bcf39 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/Networking/NewWAPackVMSubnetTests.cs @@ -0,0 +1,64 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + [TestClass] + public class NewWAPackVMSubnetTests : CmdletTestNetworkingBase + { + [TestInitialize] + public void TestInitialize() + { + // Remove any existing VNet + this.NetworkingPreTestCleanup(); + + // Create a VNet + this.CreateVNet(); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-Networking")] + public void NewWAPackVMSubnetDefault() + { + var inputParams = new Dictionary() + { + {"Name", vmSubnetName}, + {"VNet", this.createdVNet.First()}, + {"Subnet", subnet} + }; + var createdSubnet = this.InvokeCmdlet(Cmdlets.NewWAPackVMSubnet, inputParams, null); + Assert.AreEqual(1, createdSubnet.Count, string.Format("{0} VMSubnet Found, {1} VMSubnet Was Expected.", createdSubnet.Count, 1)); + createdVMSubnet.AddRange(createdSubnet); + + var readVMSubnetName = createdSubnet.First().Properties["Name"].Value; + Assert.AreEqual(vmSubnetName, readVMSubnetName, string.Format("Actual VMSubnet Name - {0}, Expected VMSubnet Name - {1}", readVMSubnetName, vmSubnetName)); + + var readVMSubnetSubnet = createdSubnet.First().Properties["Subnet"].Value; + Assert.AreEqual(subnet, readVMSubnetSubnet, string.Format("Actual VMSubnet Subnet - {0}, Expected VMSubnet Subnet - {1}", readVMSubnetSubnet, subnet)); + + } + + [TestCleanup] + public void VMSubnetCleanup() + { + this.RemoveVNet(); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/Networking/NewWAPackVNetTests.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/Networking/NewWAPackVNetTests.cs new file mode 100644 index 000000000000..da48b3f89384 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/Networking/NewWAPackVNetTests.cs @@ -0,0 +1,64 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + [TestClass] + public class NewWAPackVNetTests : CmdletTestNetworkingBase + { + [TestInitialize] + public void TestInitialize() + { + // Remove any existing VNet + this.NetworkingPreTestCleanup(); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-Networking")] + public void NewWAPackVNetDefault() + { + var inputParams = new Dictionary() + { + {"Name", WAPackConfigurationFactory.AvezLogicalNetworkName} + }; + var existingLogicalNetwork = this.InvokeCmdlet(Cmdlets.GetWAPackLogicalNetwork, inputParams, null); + Assert.AreEqual(1, existingLogicalNetwork.Count, string.Format("{0} LogicalNetwork Found, {1} LogicalNetwork Was Expected.", existingLogicalNetwork.Count, 1)); + + inputParams = new Dictionary() + { + {"Name", vNetName}, + {"Description", vNetDescription}, + {"LogicalNetwork", existingLogicalNetwork.First()} + }; + var createdVNet = this.InvokeCmdlet(Cmdlets.NewWAPackVNet, inputParams, null); + Assert.AreEqual(1, createdVNet.Count, string.Format("{0} VNet Found, {1} VNet Was Expected.", createdVNet.Count, 1)); + this.createdVNet.AddRange(createdVNet); + + var readVNetName = createdVNet.First().Properties["Name"].Value; + Assert.AreEqual(vNetName, readVNetName, string.Format("Actual VNet Name - {0}, Expected VNet Name - {1}", readVNetName, vNetName)); + } + + [TestCleanup] + public void VNetCleanup() + { + this.RemoveVNet(); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/Networking/RemoveStaticIPAddressPoolTests.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/Networking/RemoveStaticIPAddressPoolTests.cs new file mode 100644 index 000000000000..342eb088f02d --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/Networking/RemoveStaticIPAddressPoolTests.cs @@ -0,0 +1,66 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + [TestClass] + public class RemoveWAPackStaticIPAddressPoolTests : CmdletTestNetworkingBase + { + [TestInitialize] + public void TestInitialize() + { + // Remove any existing VNet + this.NetworkingPreTestCleanup(); + + // Create a FullVNet + this.CreateFullVNet(); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-Networking")] + public void RemoveWAPackStaticIPAddressPoolDefault() + { + var staticIPAddressPoolToDelete = this.createdStaticIPAddressPool.First(); + + var inputParams = new Dictionary() + { + {"StaticIPAddressPool", staticIPAddressPoolToDelete}, + {"Force", null}, + {"PassThru", null} + }; + var isDeleted = this.InvokeCmdlet(Cmdlets.RemoveWAPackStaticIPAddressPool, inputParams); + Assert.AreEqual(1, isDeleted.Count); + Assert.AreEqual(true, isDeleted.First()); + + inputParams = new Dictionary() + { + {"Name", staticIPAddressPoolToDelete.Properties["Name"].Value} + }; + var deletedStaticIPAddressPool = this.InvokeCmdlet(Cmdlets.GetWAPackVNet, inputParams); + Assert.AreEqual(0, deletedStaticIPAddressPool.Count); + } + + [TestCleanup] + public void StaticIPAddressPoolCleanup() + { + this.RemoveVNet(); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/Networking/RemoveWAPackVMSubnetTests.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/Networking/RemoveWAPackVMSubnetTests.cs new file mode 100644 index 000000000000..934c994314fa --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/Networking/RemoveWAPackVMSubnetTests.cs @@ -0,0 +1,67 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + [TestClass] + public class RemoveWAPackVMSubnetTests : CmdletTestNetworkingBase + { + [TestInitialize] + public void TestInitialize() + { + // Remove any existing VNet + this.NetworkingPreTestCleanup(); + + // Create a VNet/VMSubnet + this.CreateVNet(); + this.CreateVMSubnet(); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-Networking")] + public void RemoveWAPackVMSubnetDefault() + { + var vmSubnetToDelete = this.createdVMSubnet.First(); + + var inputParams = new Dictionary() + { + {"VMSubnet", vmSubnetToDelete}, + {"Force", null}, + {"PassThru", null} + }; + var isDeleted = this.InvokeCmdlet(Cmdlets.RemoveWAPackVMSubnet, inputParams); + Assert.AreEqual(1, isDeleted.Count); + Assert.AreEqual(true, isDeleted.First()); + + inputParams = new Dictionary() + { + {"Name", vmSubnetToDelete.Properties["Name"].Value} + }; + var deletedVMSubnet = this.InvokeCmdlet(Cmdlets.GetWAPackVNet, inputParams); + Assert.AreEqual(0, deletedVMSubnet.Count); + } + + [TestCleanup] + public void VMSubnetCleanup() + { + this.RemoveVNet(); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/Networking/RemoveWAPackVNetTests.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/Networking/RemoveWAPackVNetTests.cs new file mode 100644 index 000000000000..dee3b314a873 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/Networking/RemoveWAPackVNetTests.cs @@ -0,0 +1,60 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + [TestClass] + public class RemoveWAPackVNetTests : CmdletTestNetworkingBase + { + [TestInitialize] + public void TestInitialize() + { + // Remove any existing VNet + this.NetworkingPreTestCleanup(); + + // Create a FullVNet + this.CreateFullVNet(); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + [TestCategory("WAPackIaaS-Networking")] + public void RemoveWAPackVNetDefault() + { + var vNetToDelete = this.createdVNet.First(); + + var inputParams = new Dictionary() + { + {"VNet", vNetToDelete}, + {"Force", null}, + {"PassThru", null} + }; + var isDeleted = this.InvokeCmdlet(Cmdlets.RemoveWAPackVNet, inputParams); + Assert.AreEqual(1, isDeleted.Count); + Assert.AreEqual(true, isDeleted.First()); + + inputParams = new Dictionary() + { + {"Name", vNetToDelete.Properties["Name"].Value} + }; + var deletedVNet = this.InvokeCmdlet(Cmdlets.GetWAPackVNet, inputParams); + Assert.AreEqual(0, deletedVNet.Count); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/PowershellExtension.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/PowershellExtension.cs new file mode 100644 index 000000000000..df7f5b1c9d94 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/PowershellExtension.cs @@ -0,0 +1,61 @@ +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + internal static class PowershellExtension + { + internal static Collection InvokeAndAssertForNoErrors(this System.Management.Automation.PowerShell powershell) + { + return powershell.InvokeAndAssertForErrors(null); + } + + internal static Collection InvokeAndAssertForErrors(this System.Management.Automation.PowerShell powershell, string expectedErrorMsg = null) + { + powershell.Streams.ClearStreams(); + var result = powershell.Invoke(); + + if (string.IsNullOrEmpty(expectedErrorMsg)) + Assert.IsFalse(powershell.HadErrors, powershell.GetPowershellErrorMessage()); + else + Assert.IsTrue(powershell.HadErrors); + + Assert.AreEqual(expectedErrorMsg, powershell.GetPowershellErrorMessage()); + return result; + } + + + + internal static string GetPowershellErrorMessage(this System.Management.Automation.PowerShell powershell) + { + bool hadErrors = powershell.HadErrors; + IList errors = powershell.Streams.Error; + + if (hadErrors) + { + if (errors != null && errors.Count > 0 && errors[0].Exception != null) + { + return errors[0].Exception.Message; + } + } + + return null; + } + + } +} diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/Readme.txt b/src/Common/Commands.ScenarioTest/WAPackIaaS/Readme.txt new file mode 100644 index 000000000000..b24009dd524a --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/Readme.txt @@ -0,0 +1,28 @@ + +The functional tests in this folder covers 'WAPack IaaS' cmdlets. +These tests exercise the cmdlets from End to End with no mocking in +any of the layers. + + + +Dependencies + +------------ + +These tests require an active subscription in which VMs will be created. +The tests also require a set of VMTemplates and VHDs preloaded into the environment. + + + +Subscription information from the resource file PublishSettingsFile property +In order to make it work with your subscriptions, place your publishsettings file in the Artifacts folder and rename it to 'WAPackTestConfig.publishsettings'. +It uses the first subscription id from this file. + + + +Running functional tests + +------------------------ + +Build the complete solution first and then these tests have to be executed from Visual Studio with MSTest. + diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/CmdletTestVirtualMachineStatusBase.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/CmdletTestVirtualMachineStatusBase.cs new file mode 100644 index 000000000000..87b7ce66c03e --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/CmdletTestVirtualMachineStatusBase.cs @@ -0,0 +1,88 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + public class CmdletTestVirtualMachineStatusBase : CmdletTestBase + { + protected virtual string OsDiskName + { + get { return WAPackConfigurationFactory.Ws2k8R2OSDiskName; } + } + + protected virtual string VmSizeProfileName + { + get { return WAPackConfigurationFactory.VMSizeProfileName; } + } + + protected virtual PSObject VirtualMachine + { + get + { + var commandBackup = PowerShell.Commands.Clone(); + + try + { + PowerShell.Commands.Clear(); + PowerShell.AddCommand("Get-WAPackVM").AddParameter("Name", GetType().Name); + var vm = PowerShell.InvokeAndAssertForNoErrors(); + PowerShell.Commands.Clear(); + + if (vm.Count > 0) + { + return vm[0]; + } + + PowerShell.AddCommand("Get-WAPackVMOSDisk"); + PowerShell.AddParameter("Name", OsDiskName); + var osDisk = this.PowerShell.InvokeAndAssertForNoErrors(); + Assert.AreEqual(1, osDisk.Count); + + PowerShell.Commands.Clear(); + PowerShell.AddCommand("Get-WAPackVMSizeProfile"); + PowerShell.AddParameter("Name", VmSizeProfileName); + var vmSizeProfile = this.PowerShell.InvokeAndAssertForNoErrors(); + Assert.AreEqual(1, vmSizeProfile.Count); + + PowerShell.Commands.Clear(); + PowerShell.AddCommand("New-WAPackVM"); + PowerShell.AddParameter("Name", GetType().Name); + PowerShell.AddParameter("OSDisk", osDisk[0]); + PowerShell.AddParameter("VMSizeProfile", vmSizeProfile[0]); + var createdVm = PowerShell.InvokeAndAssertForNoErrors(); + this.PowerShell.Commands.Clear(); + + Assert.AreEqual(1, createdVm.Count); + return createdVm[0]; + } + finally + { + PowerShell.Commands = commandBackup; + } + } + } + + protected virtual PSObject SetVirtualMachineState(PSObject vm, string state) + { + PowerShell.Commands.Clear(); + PowerShell.Streams.ClearStreams(); + PowerShell.AddCommand(string.Format("{0}-WAPackVM", state)).AddParameter("VM", vm).AddParameter("PassThru"); ; + var updatedVm = PowerShell.Invoke(); + return updatedVm[0]; + } + } +} diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/GetWAPPackVMTests.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/GetWAPPackVMTests.cs new file mode 100644 index 000000000000..066a98e5e449 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/GetWAPPackVMTests.cs @@ -0,0 +1,199 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + [TestClass] + public class GetWAPPackVMTests : CmdletTestBase + { + public const string cmdletName = "Get-WAPackVM"; + + public string VMNameToCreate = "TestVirtualMachineForGetTests"; + + public List CreatedVirtualMachines; + + [TestInitialize] + public void TestInitialize() + { + CreatedVirtualMachines = new List(); + this.CreateVirtualMachine(VMNameToCreate); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void GetVmWithNoParam() + { + var allVms = this.InvokeCmdlet(cmdletName, null); + Assert.IsTrue(allVms.Count > 0); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void GetVmFromName() + { + string expectedVmName = VMNameToCreate; + var inputParams = new Dictionary() + { + {"Name", expectedVmName} + }; + var vmFromName = this.InvokeCmdlet(cmdletName, inputParams); + + var actualVmName = vmFromName.First().Properties["Name"].Value; + Assert.AreEqual(expectedVmName, actualVmName); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void GetWAPackVmFromId() + { + string expectedVmName = VMNameToCreate; + var inputParams = new Dictionary() + { + {"Name", expectedVmName} + }; + var vmFromName = this.InvokeCmdlet(cmdletName, inputParams); + + var expectedVmId = vmFromName.First().Properties["Id"].Value; + + inputParams = new Dictionary() + { + {"Id", expectedVmId} + }; + var vmFromId = this.InvokeCmdlet(cmdletName, inputParams); + + Assert.AreEqual(1, vmFromId.Count); + var actualvmFromId = vmFromId.First().Properties["Id"].Value; + Assert.AreEqual(expectedVmId, actualvmFromId); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void GetWAPackVmByNameDoesNotExist() + { + string expectedVmName = "WAPackVmDoesNotExist"; + var inputParams = new Dictionary() + { + {"Name", expectedVmName} + }; + var vmFromName = this.InvokeCmdlet(cmdletName, inputParams); + + Assert.AreEqual(0, vmFromName.Count); + } + + [TestMethod] + [TestCategory("WAPackIaaS-Negative")] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void GetWAPackVmByIdDoesNotExist() + { + var expectedVmId = Guid.NewGuid().ToString(); + var expectedError = string.Format(Utilities.Properties.Resources.ResourceNotFound, expectedVmId); + var inputParams = new Dictionary() + { + {"Id", expectedVmId} + }; + var vmFromName = this.InvokeCmdlet(cmdletName, inputParams, expectedError); + Assert.AreEqual(0, vmFromName.Count); + } + + public void CreateVirtualMachine(string vmNameToCreate) + { + var ps = this.PowerShell; + + var inputParams = new Dictionary() + { + {"Name", vmNameToCreate} + }; + var existingVMs = this.InvokeCmdlet(cmdletName, inputParams, null); + + if (existingVMs != null && existingVMs.Any()) + { + if (existingVMs.Count == 1) + { + CreatedVirtualMachines.Add(existingVMs.First()); + return; + } + else + { + CreatedVirtualMachines.AddRange(existingVMs); + RemoveVMs(); + } + } + + ps.Commands.Clear(); + inputParams = new Dictionary() + { + {"Name", WAPackConfigurationFactory.AvenzVnetName} + }; + var vNet = this.InvokeCmdlet("Get-WAPackVnet", inputParams, null); + Assert.AreEqual(vNet.Count, 1, string.Format("Actual Vnet found - {0}, Expected Vnet - {1}", vNet.Count, 1)); + + inputParams = new Dictionary() + { + {"Name", WAPackConfigurationFactory.Ws2k8R2OSDiskName} + }; + var osDisk = this.InvokeCmdlet("Get-WAPackVMOSDisk", inputParams, null); + Assert.AreEqual(1, osDisk.Count, string.Format("Actual OSDisks found - {0}, Expected OSDisks - {1}", osDisk.Count, 1)); + + inputParams = new Dictionary() + { + {"Name", WAPackConfigurationFactory.VMSizeProfileName} + }; + var vmSizeProfile = this.InvokeCmdlet("Get-WAPackVMSizeProfile", inputParams, null); + Assert.AreEqual(1, vmSizeProfile.Count, string.Format("Actual VMSizeProfiles found - {0}, Expected VMSizeProfiles - {1}", vmSizeProfile.Count, 1)); + + inputParams = new Dictionary() + { + {"Name", vmNameToCreate}, + {"OSDisk", osDisk.First()}, + {"VNet", vNet.First()}, + {"VMSizeProfile", vmSizeProfile.First()} + }; + var actualCreatedVM = this.InvokeCmdlet("New-WAPackVM", inputParams, null); + + Assert.AreEqual(1, actualCreatedVM.Count, string.Format("Actual VirtualMachines found - {0}, Expected VirtualMachines - {1}", actualCreatedVM.Count, 1)); + var createdVMName = actualCreatedVM.First().Properties["Name"].Value; + + ps.Commands.Clear(); + + Assert.AreEqual(vmNameToCreate, createdVMName, string.Format("Actual VirtualMachines name - {0}, Expected VirtualMachines name- {1}", createdVMName, vmNameToCreate)); + CreatedVirtualMachines.AddRange(actualCreatedVM); + } + + private void RemoveVMs() + { + foreach (var vm in this.CreatedVirtualMachines) + { + var inputParams = new Dictionary() + { + {"VM", vm}, + {"Force", null} + }; + var vmFromName = this.InvokeCmdlet("Remove-WAPackVM", inputParams, null); + } + + this.CreatedVirtualMachines.Clear(); + } + } +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/GetWAPackVMOSDiskTests.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/GetWAPackVMOSDiskTests.cs new file mode 100644 index 000000000000..0f572a4305d1 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/GetWAPackVMOSDiskTests.cs @@ -0,0 +1,111 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + [TestClass] + public class GetWAPackVMOSDiskTests : CmdletTestBase + { + public const string cmdletName = "Get-WAPackVMOSDisk"; + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void GetWAPackOSDiskWithNoParam() + { + var allOSDisks = this.InvokeCmdlet(cmdletName, null); + Assert.IsTrue(allOSDisks.Any()); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void GetWAPackOSDiskFromName() + { + string expectedosDiskName = WAPackConfigurationFactory.Ws2k8R2OSDiskName; + var inputParams = new Dictionary() + { + {"Name", expectedosDiskName} + }; + var osDiskFromName = this.InvokeCmdlet(cmdletName, inputParams); + var actualDiskName = osDiskFromName.First().Properties["Name"].Value; + + Assert.AreEqual(1, osDiskFromName.Count); + Assert.AreEqual(expectedosDiskName, actualDiskName); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void GetWAPackOSDiskFromIdAndName() + { + string expectedosDiskName = WAPackConfigurationFactory.Ws2k8R2OSDiskName; + var inputParams = new Dictionary() + { + {"Name", expectedosDiskName} + }; + var osDiskFromName = this.InvokeCmdlet(cmdletName, inputParams); + + Assert.AreEqual(1, osDiskFromName.Count); + + var expectedosDiskId = osDiskFromName.First().Properties["Id"].Value; + + inputParams = new Dictionary() + { + {"Id", expectedosDiskId} + }; + var osDiskFromId = this.InvokeCmdlet(cmdletName, inputParams); + + var actualosDiskFromId = osDiskFromId.First().Properties["Id"].Value; + Assert.AreEqual(expectedosDiskId, actualosDiskFromId); + } + + [TestMethod] + [TestCategory("WAPackIaaS-Negative")] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void GetWAPackOSDiskByNameDoesNotExist() + { + string expectedosDiskName = "WAPackOSDiskDoesNotExist"; + var inputParams = new Dictionary() + { + {"Name", expectedosDiskName} + }; + var osDiskFromName = this.InvokeCmdlet(cmdletName, inputParams); + + Assert.AreEqual(0, osDiskFromName.Count); + } + + [TestMethod] + [TestCategory("WAPackIaaS-Negative")] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void GetWAPackOSDiskByIdDoesNotExist() + { + var expectedVmId = Guid.NewGuid().ToString(); + var expectedError = string.Format(Utilities.Properties.Resources.ResourceNotFound, expectedVmId); + var inputParams = new Dictionary() + { + {"Id", expectedVmId} + }; + var vmFromName = this.InvokeCmdlet(cmdletName, inputParams, expectedError); + Assert.AreEqual(0, vmFromName.Count); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/GetWAPackVMSizeProfileTests.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/GetWAPackVMSizeProfileTests.cs new file mode 100644 index 000000000000..2e8efa8c7219 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/GetWAPackVMSizeProfileTests.cs @@ -0,0 +1,112 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + [TestClass] + public class GetWAPackVMSizeProfileTests : CmdletTestBase + { + public const string cmdletName = "Get-WAPackVMSizeProfile"; + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void GetWAPackVMSizeProfileWithNoParam() + { + var allVMSizeProfiles = this.InvokeCmdlet(cmdletName, null); + Assert.IsTrue(allVMSizeProfiles.Any()); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void GetWAPackVMSizeProfileFromName() + { + string expectedVMSizeProfileName = WAPackConfigurationFactory.VMSizeProfileName; + var inputParams = new Dictionary() + { + {"Name", expectedVMSizeProfileName} + }; + var vmSizeProfileFromName = this.InvokeCmdlet(cmdletName, inputParams); + + Assert.AreEqual(1, vmSizeProfileFromName.Count); + var actualVMSizeProfileName = vmSizeProfileFromName.First().Properties["Name"].Value; + + Assert.AreEqual(expectedVMSizeProfileName, actualVMSizeProfileName); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void GetWAPackVMSizeProfileFromIdAndName() + { + string expectedVMSizeProfileName = WAPackConfigurationFactory.VMSizeProfileName; + var inputParams = new Dictionary() + { + {"Name", expectedVMSizeProfileName} + }; + var vmSizeProfileFromName = this.InvokeCmdlet(cmdletName, inputParams); + + Assert.AreEqual(1, vmSizeProfileFromName.Count); + + var expectedvmSizeProfileId = vmSizeProfileFromName.First().Properties["Id"].Value; + + inputParams = new Dictionary() + { + {"Id", expectedvmSizeProfileId} + }; + var expectedvmSizeProfile = this.InvokeCmdlet(cmdletName, inputParams); + + var actualvmSizeProfileFromId = expectedvmSizeProfile.First().Properties["Id"].Value; + Assert.AreEqual(expectedvmSizeProfileId, actualvmSizeProfileFromId); + } + + [TestMethod] + [TestCategory("WAPackIaaS-Negative")] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void GetWAPackVMSizeProfileByNameDoesNotExist() + { + string expectedVMSizeProfileName = "VMSizeProfileDoesNotExist"; + var inputParams = new Dictionary() + { + {"Name", expectedVMSizeProfileName} + }; + var vmSizeProfileFromName = this.InvokeCmdlet(cmdletName, inputParams); + + Assert.AreEqual(0, vmSizeProfileFromName.Count); + } + + [TestMethod] + [TestCategory("WAPackIaaS-Negative")] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void GetWAPackVMSizeProfileByIdDoesNotExist() + { + var expectedVmId = Guid.NewGuid().ToString(); + var expectedError = string.Format(Utilities.Properties.Resources.ResourceNotFound, expectedVmId); + var inputParams = new Dictionary() + { + {"Id", expectedVmId} + }; + var vmFromName = this.InvokeCmdlet(cmdletName, inputParams, expectedError); + Assert.AreEqual(0, vmFromName.Count); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/GetWAPackVMTemplateTests.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/GetWAPackVMTemplateTests.cs new file mode 100644 index 000000000000..4a1c4af2ece0 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/GetWAPackVMTemplateTests.cs @@ -0,0 +1,129 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + [TestClass] + public class GetWAPackVMTemplateTests : CmdletTestBase + { + public const string cmdletName = "Get-WAPackVMTemplate"; + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void GetWAPackVMTemplateWithNoParam() + { + var allTemplates = this.InvokeCmdlet(cmdletName, null); + Assert.IsTrue(allTemplates.Any()); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void GetWAPackVMTemplatesFromName() + { + string expectedTemplateName = WAPackConfigurationFactory.Win7_64TemplateName; + var inputParams = new Dictionary() + { + {"Name", expectedTemplateName} + }; + var templateFromName = this.InvokeCmdlet(cmdletName, inputParams); + + Assert.AreEqual(1, templateFromName.Count); + var actualtemplateName = templateFromName.First().Properties["Name"].Value; + + Assert.AreEqual(expectedTemplateName, actualtemplateName); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void GetWAPackVMTemplatesFromIdAndName() + { + string expectedTemplateName = WAPackConfigurationFactory.Win7_64TemplateName; + var inputParams = new Dictionary() + { + {"Name", expectedTemplateName} + }; + var templateFromName = this.InvokeCmdlet(cmdletName, inputParams); + + Assert.AreEqual(1, templateFromName.Count); + var expectedtemplateId = templateFromName.First().Properties["Id"].Value; + + inputParams = new Dictionary() + { + {"Id", expectedtemplateId} + }; + var templateFromId = this.InvokeCmdlet(cmdletName, inputParams); + + var actualtemplateFromId = templateFromId.First().Properties["Id"].Value; + Assert.AreEqual(expectedtemplateId, actualtemplateFromId); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void GetWAPackVMTemplates() + { + string expectedTemplateName = WAPackConfigurationFactory.Win7_64TemplateName; + var inputParams = new Dictionary() + { + {"Name", expectedTemplateName} + }; + var templateFromName = this.InvokeCmdlet(cmdletName, inputParams); + + Assert.AreEqual(1, templateFromName.Count); + var actualtemplateName = templateFromName.First().Properties["Name"].Value; + + Assert.AreEqual(expectedTemplateName, actualtemplateName); + } + + [TestMethod] + [TestCategory("WAPackIaaS-Negative")] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void GetWAPackVMTemplateByNameDoesNotExist() + { + string expectedTemplateName = "WAPackVMTemplateDoesNotExist"; + var inputParams = new Dictionary() + { + {"Name", expectedTemplateName} + }; + var templateFromName = this.InvokeCmdlet(cmdletName, inputParams); + + Assert.AreEqual(0, templateFromName.Count); + } + + [TestMethod] + [TestCategory("WAPackIaaS-Negative")] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void GetWAPackVMTemplateByIdDoesNotExist() + { + var expectedVmId = Guid.NewGuid().ToString(); + var expectedError = string.Format(Utilities.Properties.Resources.ResourceNotFound, expectedVmId); + var inputParams = new Dictionary() + { + {"Id", expectedVmId} + }; + var vmFromName = this.InvokeCmdlet(cmdletName, inputParams, expectedError); + Assert.AreEqual(0, vmFromName.Count); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/NewWAPackVMTests.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/NewWAPackVMTests.cs new file mode 100644 index 000000000000..dbc6744c5c05 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/NewWAPackVMTests.cs @@ -0,0 +1,353 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + [TestClass] + public class NewWAPackVMTests : CmdletTestBase + { + public const string cmdletName = "New-WAPackVM"; + + public List CreatedVirtualMachines; + + [TestInitialize] + public void Initialize() + { + CreatedVirtualMachines = new List(); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void CreateVMFromTemplateWithVNet() + { + string vmNameToCreate = "TestWindowsVM_VMFromTemplateWithVNet"; + + var ps = this.PowerShell; + var inputParams = new Dictionary() + { + {"Name", WAPackConfigurationFactory.Win7_64TemplateName} + }; + var template = this.InvokeCmdlet("Get-WAPackVMTemplate", inputParams); + Assert.AreEqual(template.Count, 1); + + ps.Commands.Clear(); + inputParams = new Dictionary() + { + {"Name", WAPackConfigurationFactory.AvenzVnetName} + }; + var vNet = this.InvokeCmdlet("Get-WAPackVnet", inputParams); + Assert.AreEqual(vNet.Count, 1); + + inputParams = new Dictionary() + { + {"Name", vmNameToCreate}, + {"Template", template.First()}, + {"VNet", vNet.First()}, + {"VMCredential", WAPackConfigurationFactory.WindowsVMCredential}, + {"Windows", null}, + + }; + + var actualCreatedVM = this.InvokeCmdlet(cmdletName, inputParams); + Assert.AreEqual(1, actualCreatedVM.Count); + + var createdVMName = actualCreatedVM.First().Properties["Name"].Value; + Assert.AreEqual(vmNameToCreate, createdVMName); + + this.CreatedVirtualMachines.AddRange(actualCreatedVM); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void CreateVMFromTemplateWithoutVNet() + { + string vmNameToCreate = "TestWindowsVM_VMFromTemplateWithoutVNet"; + + var inputParams = new Dictionary() + { + {"Name", WAPackConfigurationFactory.Win7_64TemplateName} + }; + var template = this.InvokeCmdlet("Get-WAPackVMTemplate", inputParams); + Assert.AreEqual(template.Count, 1); + + inputParams = new Dictionary() + { + {"Name", vmNameToCreate}, + {"Template", template.First()}, + {"VMCredential", WAPackConfigurationFactory.WindowsVMCredential}, + {"Windows", null}, + + }; + + var actualCreatedVM = this.InvokeCmdlet(cmdletName, inputParams); + Assert.AreEqual(1, actualCreatedVM.Count); + var createdVMName = actualCreatedVM.First().Properties["Name"].Value; + + Assert.AreEqual(vmNameToCreate, createdVMName); + this.CreatedVirtualMachines.AddRange(actualCreatedVM); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void CreateVMFromVHDWithVNet() + { + string vmNameToCreate = "TestWindowsVM_VMFromVHDWithVNet"; + + var inputParams = new Dictionary() + { + {"Name", WAPackConfigurationFactory.AvenzVnetName} + }; + var vNet = this.InvokeCmdlet("Get-WAPackVnet", inputParams); + Assert.AreEqual(vNet.Count, 1); + + inputParams = new Dictionary() + { + {"Name", WAPackConfigurationFactory.Ws2k8R2OSDiskName} + }; + var osDisk = this.InvokeCmdlet("Get-WAPackVMOSDisk", inputParams); + Assert.AreEqual(osDisk.Count, 1); + + inputParams = new Dictionary() + { + {"Name", WAPackConfigurationFactory.VMSizeProfileName} + }; + var vmSizeProfile = this.InvokeCmdlet("Get-WAPackVMSizeProfile", inputParams); + Assert.AreEqual(vmSizeProfile.Count, 1); + + inputParams = new Dictionary() + { + {"Name", vmNameToCreate}, + {"OSDisk", osDisk.First()}, + {"VNet", vNet.First()}, + {"VMSizeProfile", vmSizeProfile.First()} + + }; + var actualCreatedVM = this.InvokeCmdlet(cmdletName, inputParams); + + Assert.AreEqual(1, actualCreatedVM.Count); + var createdVMName = actualCreatedVM.First().Properties["Name"].Value; + + Assert.AreEqual(vmNameToCreate, createdVMName); + + this.CreatedVirtualMachines.AddRange(actualCreatedVM); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void CreateVMFromVHDWithoutVNet() + { + string vmNameToCreate = "TestWindowsVM_VMFromVHDWithoutVNet"; + + var inputParams = new Dictionary() + { + {"Name", WAPackConfigurationFactory.Ws2k8R2OSDiskName} + }; + var osDisk = this.InvokeCmdlet("Get-WAPackVMOSDisk", inputParams); + Assert.AreEqual(osDisk.Count, 1); + + inputParams = new Dictionary() + { + {"Name", WAPackConfigurationFactory.VMSizeProfileName} + }; + var vmSizeProfile = this.InvokeCmdlet("Get-WAPackVMSizeProfile", inputParams); + Assert.AreEqual(vmSizeProfile.Count, 1); + + inputParams = new Dictionary() + { + {"Name", vmNameToCreate}, + {"OSDisk", osDisk.First()}, + {"VMSizeProfile", vmSizeProfile.First()}, + }; + var actualCreatedVM = this.InvokeCmdlet(cmdletName, inputParams); + + Assert.AreEqual(1, actualCreatedVM.Count); + var createdVMName = actualCreatedVM.First().Properties["Name"].Value; + + Assert.AreEqual(vmNameToCreate, createdVMName); + + this.CreatedVirtualMachines.AddRange(actualCreatedVM); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void CreateUbuntuVMFromTemplate() + { + string vmNameToCreate = "TestUbuntuVM_FromTemplate"; + + var inputParams = new Dictionary() + { + {"Name", WAPackConfigurationFactory.LinuxUbuntu_64TemplateName} + }; + var template = this.InvokeCmdlet("Get-WAPackVMTemplate", inputParams); + Assert.AreEqual(template.Count, 1); + + inputParams = new Dictionary() + { + {"Name", vmNameToCreate}, + {"Template", template.First()}, + {"VMCredential", WAPackConfigurationFactory.LinuxVMCredential}, + {"Linux", null}, + }; + var actualCreatedVM = this.InvokeCmdlet(cmdletName, inputParams); + + Assert.AreEqual(1, actualCreatedVM.Count); + var createdVMName = actualCreatedVM.First().Properties["Name"].Value; + + Assert.AreEqual(vmNameToCreate, createdVMName); + + this.CreatedVirtualMachines.AddRange(actualCreatedVM); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void CreateUbuntuVMFromVHDWithVNet() + { + string vmNameToCreate = "TestUbuntuVM_FromVHD"; + + var inputParams = new Dictionary() + { + {"Name", WAPackConfigurationFactory.LinuxOSDiskName} + }; + var osDisk = this.InvokeCmdlet("Get-WAPackVMOSDisk", inputParams); + Assert.AreEqual(osDisk.Count, 1); + + inputParams = new Dictionary() + { + {"Name", WAPackConfigurationFactory.VMSizeProfileName} + }; + var vmSizeProfile = this.InvokeCmdlet("Get-WAPackVMSizeProfile", inputParams); + Assert.AreEqual(vmSizeProfile.Count, 1); + + inputParams = new Dictionary() + { + {"Name", WAPackConfigurationFactory.AvenzVnetName} + }; + var vNet = this.InvokeCmdlet("Get-WAPackVnet", inputParams); + Assert.AreEqual(vNet.Count, 1); + + inputParams = new Dictionary() + { + {"Name", vmNameToCreate}, + {"OSDisk", osDisk.First()}, + {"VMSizeProfile", vmSizeProfile.First()}, + {"VNet", vNet.First()}, + }; + var actualCreatedVM = this.InvokeCmdlet(cmdletName, inputParams); + + Assert.AreEqual(1, actualCreatedVM.Count); + var createdVMName = actualCreatedVM.First().Properties["Name"].Value; + + Assert.AreEqual(vmNameToCreate, createdVMName); + + this.CreatedVirtualMachines.AddRange(actualCreatedVM); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void CreateUbuntuVMFromVHDWithoutVnet() + { + string vmNameToCreate = "TestUbuntuVM_FromVHDWithoutVnet"; + + var inputParams = new Dictionary() + { + {"Name", WAPackConfigurationFactory.LinuxOSDiskName} + }; + var osDisk = this.InvokeCmdlet("Get-WAPackVMOSDisk", inputParams); + Assert.AreEqual(osDisk.Count, 1); + + inputParams = new Dictionary() + { + {"Name", WAPackConfigurationFactory.VMSizeProfileName} + }; + var vmSizeProfile = this.InvokeCmdlet("Get-WAPackVMSizeProfile", inputParams); + Assert.AreEqual(vmSizeProfile.Count, 1); + + inputParams = new Dictionary() + { + {"Name", vmNameToCreate}, + {"OSDisk", osDisk.First()}, + {"VMSizeProfile", vmSizeProfile.First()} + }; + var actualCreatedVM = this.InvokeCmdlet(cmdletName, inputParams); + + Assert.AreEqual(1, actualCreatedVM.Count); + var createdVMName = actualCreatedVM.First().Properties["Name"].Value; + + Assert.AreEqual(vmNameToCreate, createdVMName); + + this.CreatedVirtualMachines.AddRange(actualCreatedVM); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void CreateVMQuickCreate() + { + string vmNameToCreate = "TestWindowsVM_QuickCreate"; + + var inputParams = new Dictionary() + { + {"Name", WAPackConfigurationFactory.Win7_64TemplateName} + }; + var template = this.InvokeCmdlet("Get-WAPackVMTemplate", inputParams); + Assert.AreEqual(template.Count, 1); + + inputParams = new Dictionary() + { + {"Name", vmNameToCreate}, + {"Template", template.First()}, + {"VMCredential", WAPackConfigurationFactory.WindowsVMCredential} + }; + var actualCreatedVM = this.InvokeCmdlet("New-WAPackQuickVM", inputParams); + + Assert.AreEqual(1, actualCreatedVM.Count); + var createdVMName = actualCreatedVM.First().Properties["Name"].Value; + Assert.AreEqual(vmNameToCreate, createdVMName); + + this.CreatedVirtualMachines.AddRange(actualCreatedVM); + } + + [TestCleanup] + public void Cleanup() + { + if (!this.CreatedVirtualMachines.Any()) + return; + + var ps = this.PowerShell; + + foreach (var vm in this.CreatedVirtualMachines) + { + var inputParams = new Dictionary() + { + {"VM", vm}, + {"Force", null} + }; + + this.InvokeCmdlet("Remove-WAPackVM", inputParams); + } + } + } +} diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/RemoveWAPackVMTests.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/RemoveWAPackVMTests.cs new file mode 100644 index 000000000000..a7bba512a092 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/RemoveWAPackVMTests.cs @@ -0,0 +1,111 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + [TestClass] + public class RemoveWAPackVMTests : CmdletTestVirtualMachineStatusBase + { + public string cmdletName = "Remove-WAPackVM"; + + protected override string OsDiskName + { + get { return WAPackConfigurationFactory.Ws2k8R2OSDiskName; } + } + + protected override string VmSizeProfileName + { + get { return WAPackConfigurationFactory.VMSizeProfileName; } + } + + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void RemoveExistingVM() + { + var expectedVMIdToDelete = this.VirtualMachine.Properties["Id"].Value.ToString(); + + var inputParams = new Dictionary() + { + {"VM", this.VirtualMachine}, + {"Force", null}, + {"PassThru", null} + }; + + var isDeleted = this.InvokeCmdlet(cmdletName, inputParams); + + Assert.AreEqual(1, isDeleted.Count); + Assert.AreEqual(true, isDeleted.First()); + + inputParams = new Dictionary() + { + {"Id", expectedVMIdToDelete} + }; + + var deletedVM = this.InvokeCmdlet("Get-WAPackVM", inputParams, string.Format(Utilities.Properties.Resources.ResourceNotFound, expectedVMIdToDelete)); + + Assert.AreEqual(0, deletedVM.Count); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void RemoveExistingVMWithPipelining() + { + var expectedVMIdToDelete = this.VirtualMachine.Properties["Id"].Value.ToString(); + + var ps = this.PowerShell; + ps.Commands.Clear(); + ps.AddCommand("Get-WAPackVM"); + ps.Commands.AddParameter("Id", expectedVMIdToDelete); + ps.AddCommand("Remove-WAPackVM"); + ps.Commands.AddParameter("Force"); + + ps.InvokeAndAssertForNoErrors(); + + var inputParams = new Dictionary() + { + {"Id", expectedVMIdToDelete} + }; + var deletedVM = this.InvokeCmdlet("Get-WAPackVM", inputParams, string.Format(Utilities.Properties.Resources.ResourceNotFound, expectedVMIdToDelete)); + + Assert.AreEqual(0, deletedVM.Count); + } + + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Negative")] + [TestCategory("WAPackIaaS-Functional")] + public void RemoveVMDoesNotExist() + { + var vm = this.VirtualMachine; + vm.Properties["Id"].Value = Guid.NewGuid(); + var inputParams = new Dictionary() + { + {"VM", vm}, + {"Force", null} + }; + + var doesNotExistErrorMessage = "The remote server returned an error: (400) Bad Request."; + this.InvokeCmdlet(cmdletName, inputParams, doesNotExistErrorMessage); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/RestartWAPackVMTests.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/RestartWAPackVMTests.cs new file mode 100644 index 000000000000..9fb77a38a0e4 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/RestartWAPackVMTests.cs @@ -0,0 +1,81 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + [TestClass] + public class RestartWAPackVMTests : CmdletTestVirtualMachineStatusBase + { + + [TestMethod] + public void ShouldRestartRunningVM() + { + var startedVm = SetVirtualMachineState(VirtualMachine, "Start"); + Assert.AreEqual("Running", startedVm.Properties["StatusString"].Value); + + //Get the "last modified time" of the running VM + var lastModified = startedVm.Properties["ModifiedTime"].Value as DateTime?; + Assert.IsNotNull(lastModified); + + //Restart the VM, then verify that it is running and that it was modified + var restartedVm = SetVirtualMachineState(startedVm, "Restart"); + Assert.AreEqual("Running", restartedVm.Properties["StatusString"].Value); + + var lastModifiedAgain = restartedVm.Properties["ModifiedTime"].Value as DateTime?; + Assert.IsNotNull(lastModifiedAgain); + + Assert.IsTrue(lastModifiedAgain > lastModified); + } + + [TestMethod] + [TestCategory("WAPackIaaS-Negative")] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void ShouldFailRestartStoppedVM() + { + var stoppedVM = SetVirtualMachineState(VirtualMachine, "Stop"); + Assert.AreEqual("Stopped", stoppedVM.Properties["StatusString"].Value); + + var restartedVm = SetVirtualMachineState(stoppedVM, "Restart"); + Assert.AreEqual("Stopped", restartedVm.Properties["StatusString"].Value); + + //The "Restart" job should fail and a message should appear in the PS error stream + var ps = this.PowerShell; + var errMsg = ps.GetPowershellErrorMessage(); + Assert.IsNotNull(errMsg); + } + + [TestMethod] + [TestCategory("WAPackIaaS-Negative")] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void ShouldFailRestartUnknownVM() + { + var vm = this.VirtualMachine; + Assert.IsNotNull(vm); + + vm.Properties["ID"].Value = Guid.NewGuid(); + + var ps = this.PowerShell; + ps.Commands.Clear(); + ps.AddCommand("Restart-WAPackVM"); + ps.AddParameter("VM", vm); + ps.AddParameter("PassThru"); + ps.InvokeAndAssertForErrors(string.Format(Utilities.Properties.Resources.OperationFailedErrorMessage, Utilities.Properties.Resources.Restart, vm.Properties["ID"].Value)); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/ResumeWAPackVMTests.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/ResumeWAPackVMTests.cs new file mode 100644 index 000000000000..71d89be54602 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/ResumeWAPackVMTests.cs @@ -0,0 +1,91 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + [TestClass] + public class ResumeWAPackVMTests : CmdletTestVirtualMachineStatusBase + { + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void ShouldResumeFromSuspended() + { + var initialVm = this.SetVirtualMachineState(this.VirtualMachine, "Start"); + Assert.AreEqual("Running", initialVm.Properties["StatusString"].Value); + + var suspendVm = this.SetVirtualMachineState(this.VirtualMachine, "Suspend"); + Assert.AreEqual("Paused", suspendVm.Properties["StatusString"].Value); + + var resumeVm = this.SetVirtualMachineState(suspendVm, "Resume"); + Assert.AreEqual("Running", resumeVm.Properties["StatusString"].Value); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Negative")] + [TestCategory("WAPackIaaS-Functional")] + public void ResumeVmThatNoLongerExistsFails() + { + var vm = VirtualMachine; + var vmId = vm.Properties["ID"].Value; + this.SetVirtualMachineState(vm, "Stop"); + PowerShell.Commands.Clear(); + PowerShell.AddCommand("Remove-WAPackVM").AddParameter("VM", VirtualMachine).AddParameter("Force"); + PowerShell.InvokeAndAssertForNoErrors(); + + PowerShell.Commands.Clear(); + PowerShell.AddCommand("Resume-WAPackVM").AddParameter("VM", vm).AddParameter("PassThru"); + PowerShell.InvokeAndAssertForErrors(string.Format(Utilities.Properties.Resources.OperationFailedErrorMessage, Utilities.Properties.Resources.Resume, vmId)); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void ShouldBeAbleToGetAndResumeAVmUsingPipeline() + { + var vm = VirtualMachine; + var initialVm = this.SetVirtualMachineState(vm, "Start"); + Assert.AreEqual("Running", initialVm.Properties["StatusString"].Value); + + var suspendedVm = this.SetVirtualMachineState(initialVm, "Suspend"); + Assert.AreEqual("Paused", suspendedVm.Properties["StatusString"].Value); + + PowerShell.Commands.Clear(); + PowerShell.AddCommand("Get-WAPackVM") + .AddParameter("Id", suspendedVm.Properties["Id"].Value) + .AddCommand("Resume-WAPackVM").AddParameter("PassThru"); + + var startedVm = PowerShell.InvokeAndAssertForNoErrors(); + Assert.AreEqual("Running", startedVm[0].Properties["StatusString"].Value); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Negative")] + [TestCategory("WAPackIaaS-Functional")] + public void ResumeFromStoppedFails() + { + var vm = VirtualMachine; + var initialVm = this.SetVirtualMachineState(vm, "Stop"); + Assert.AreEqual("Stopped", initialVm.Properties["StatusString"].Value); + + this.SetVirtualMachineState(initialVm, "Resume"); + var errorMsg = PowerShell.GetPowershellErrorMessage(); + Assert.IsTrue(errorMsg.Contains("Error: 1730"), errorMsg); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/SetWAPackVMTests.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/SetWAPackVMTests.cs new file mode 100644 index 000000000000..04f53416607f --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/SetWAPackVMTests.cs @@ -0,0 +1,104 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + [TestClass] + public class SetWAPackVMTests : CmdletTestVirtualMachineStatusBase + { + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void SetSizeProfile() + { + var ps = this.PowerShell; + + //Get a size profile + ps.Commands.Clear(); + ps.AddCommand("Get-WAPackVMSizeProfile"); + ps.AddParameter("Name", WAPackConfigurationFactory.VMSizeProfileName); + var sizeProfileList = this.PowerShell.InvokeAndAssertForNoErrors(); + Assert.AreEqual(1, sizeProfileList.Count); + + //Get the VM, verify that is stopped before we change the profile + SetVirtualMachineState(VirtualMachine, "Stop"); + var vm = this.VirtualMachine; + Assert.IsNotNull(vm); + Assert.AreEqual("Stopped", vm.Properties["StatusString"].Value); + + //See what the size of our VM is currently + var currentRAM = vm.Properties["Memory"].Value; + var currentCPU = vm.Properties["CPUCount"].Value; + + var newProfile = sizeProfileList.First(); + Assert.IsNotNull(newProfile); + + //Modify the profile to make sure it's different from what the VM currently has + newProfile.Properties["Memory"].Value = 1024; + if ((int)currentRAM >= 1024) + newProfile.Properties["Memory"].Value = 512; + + //Set the size profile + ps.Commands.Clear(); + ps.Commands.AddCommand("Set-WAPackVM"); + ps.AddParameter("VM", vm); + ps.AddParameter("VMSizeProfile", newProfile); + ps.AddParameter("PassThru"); + var updatedVMList = ps.InvokeAndAssertForNoErrors(); + Assert.AreEqual(1, updatedVMList.Count); + + var updatedVM = updatedVMList.First(); + Assert.IsNotNull(updatedVM); + + //Only way to know if size profile has truly updated is if there is a different amount of CPU/RAM than before + Assert.AreNotEqual(updatedVM.Properties["CPUCount"].Value, currentRAM); + } + + [TestMethod] + [TestCategory("WAPackIaaS-Negative")] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void ShouldFailSetOnNonexistantVM() + { + var ps = this.PowerShell; + + //Get a size profile + ps.Commands.Clear(); + ps.AddCommand("Get-WAPackVMSizeProfile"); + ps.AddParameter("Name", WAPackConfigurationFactory.VMSizeProfileName); + var sizeProfileList = this.PowerShell.InvokeAndAssertForNoErrors(); + Assert.AreEqual(1, sizeProfileList.Count); + + //Get our VM object, then change its ID to something that doesn't exist + var vm = this.VirtualMachine; + Assert.IsNotNull(vm); + vm.Properties["ID"].Value = Guid.NewGuid(); + + + //Try to set the size profile + ps.Commands.Clear(); + ps.Commands.AddCommand("Set-WAPackVM"); + ps.AddParameter("VM", vm); + ps.AddParameter("VMSizeProfile", sizeProfileList[0]); + ps.AddParameter("PassThru"); + + var expectedError = string.Format(Utilities.Properties.Resources.ResourceNotFound, vm.Properties["ID"].Value); + var updatedVMList = ps.InvokeAndAssertForErrors(expectedError); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/StartWAPackVMTests.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/StartWAPackVMTests.cs new file mode 100644 index 000000000000..e0665a331d38 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/StartWAPackVMTests.cs @@ -0,0 +1,82 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + [TestClass] + public class StartWAPackVMTests : CmdletTestVirtualMachineStatusBase + { + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void ShouldStartVmFromStop() + { + var initialVm = this.SetVirtualMachineState(this.VirtualMachine, "Stop"); + Assert.AreEqual("Stopped", initialVm.Properties["StatusString"].Value); + + var startedVm = this.SetVirtualMachineState(initialVm, "Start"); + Assert.AreEqual("Running", startedVm.Properties["StatusString"].Value); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void ShouldStartVmAlreadyStarted() + { + var initialVm = this.SetVirtualMachineState(this.VirtualMachine, "Start"); + Assert.AreEqual("Running", initialVm.Properties["StatusString"].Value); + + var startedVm = this.SetVirtualMachineState(initialVm, "Start"); + Assert.AreEqual("Running", startedVm.Properties["StatusString"].Value); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Negative")] + [TestCategory("WAPackIaaS-Functional")] + public void StartVmThatNoLongerExistsFails() + { + var vm = VirtualMachine; + var vmId = vm.Properties["ID"].Value; + this.SetVirtualMachineState(vm, "Stop"); + PowerShell.Commands.Clear(); + PowerShell.AddCommand("Remove-WAPackVM").AddParameter("VM", VirtualMachine).AddParameter("Force"); + PowerShell.InvokeAndAssertForNoErrors(); + + PowerShell.Commands.Clear(); + PowerShell.AddCommand("Start-WAPackVM").AddParameter("VM", vm).AddParameter("PassThru"); + PowerShell.InvokeAndAssertForErrors(string.Format(Utilities.Properties.Resources.OperationFailedErrorMessage, Utilities.Properties.Resources.Start, vmId)); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void ShouldBeAbleToGetAndStartAVmUsingPipeline() + { + var vm = VirtualMachine; + var stoppedVm = this.SetVirtualMachineState(vm, "Stop"); + Assert.AreEqual("Stopped", stoppedVm.Properties["StatusString"].Value); + + PowerShell.Commands.Clear(); + PowerShell.AddCommand("Get-WAPackVM") + .AddParameter("Id", stoppedVm.Properties["Id"].Value) + .AddCommand("Start-WAPackVM").AddParameter("PassThru"); + + var startedVm = PowerShell.InvokeAndAssertForNoErrors(); + Assert.AreEqual("Running", startedVm[0].Properties["StatusString"].Value); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/StopWAPackVMTests.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/StopWAPackVMTests.cs new file mode 100644 index 000000000000..19de6773460b --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/StopWAPackVMTests.cs @@ -0,0 +1,124 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Threading; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + [TestClass] + public class StopWAPackVMTests : CmdletTestVirtualMachineStatusBase + { + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void ShouldStopExistingVm() + { + var vm = VirtualMachine; + var startedVm = this.SetVirtualMachineState(vm, "Start"); + Assert.AreEqual("Running", startedVm.Properties["StatusString"].Value); + + var stoppedVm = this.SetVirtualMachineState(startedVm, "Stop"); + Assert.AreEqual("Stopped", stoppedVm.Properties["StatusString"].Value); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void ShouldStopExistingVmThatIsAlreadyStopped() + { + var vm = VirtualMachine; + var stoppedVm = this.SetVirtualMachineState(vm, "Stop"); + Assert.AreEqual("Stopped", stoppedVm.Properties["StatusString"].Value); + + stoppedVm = this.SetVirtualMachineState(stoppedVm, "Stop"); + Assert.AreEqual("Stopped", stoppedVm.Properties["StatusString"].Value); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void ShouldShutdownExistingVm() + { + var vm = VirtualMachine; + var startedVm = SetVirtualMachineState(vm, "Start"); + Assert.AreEqual("Running", startedVm.Properties["StatusString"].Value); + + // we need to sleep for a while after starting the vm to ensure we have... + // access to the service on the OS that allows us to shut down the vm + Thread.Sleep(50000); + PowerShell.Commands.Clear(); + PowerShell.AddCommand("Stop-WAPackVM").AddParameter("Shutdown").AddParameter("VM", startedVm).AddParameter("PassThru"); + var shutdownVm = PowerShell.InvokeAndAssertForNoErrors(); + Assert.AreEqual(1, shutdownVm.Count); + Assert.AreEqual("Stopped", shutdownVm[0].Properties["StatusString"].Value); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Negative")] + [TestCategory("WAPackIaaS-Functional")] + public void StopVmThatNoLongerExistsFails() + { + var vm = VirtualMachine; + var vmId = vm.Properties["ID"].Value; + PowerShell.Commands.Clear(); + this.SetVirtualMachineState(vm, "Stop"); + PowerShell.Commands.Clear(); + PowerShell.AddCommand("Remove-WAPackVM") + .AddParameter("VM", VirtualMachine) + .AddParameter("Force"); + PowerShell.InvokeAndAssertForNoErrors(); + + PowerShell.Commands.Clear(); + PowerShell.AddCommand("Stop-WAPackVM").AddParameter("VM", vm).AddParameter("PassThru"); + PowerShell.InvokeAndAssertForErrors(string.Format(Utilities.Properties.Resources.OperationFailedErrorMessage, Utilities.Properties.Resources.Stop, vmId)); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void ShouldBeAbleToGetAndStopAVmUsingPipeline() + { + var vm = VirtualMachine; + var startedVm = this.SetVirtualMachineState(vm, "Start"); + Assert.AreEqual("Running", startedVm.Properties["StatusString"].Value); + + PowerShell.Commands.Clear(); + PowerShell.AddCommand("Get-WAPackVM") + .AddParameter("Id", startedVm.Properties["Id"].Value) + .AddCommand("Stop-WAPackVM").AddParameter("PassThru"); + + var stoppedVm = PowerShell.InvokeAndAssertForNoErrors(); + Assert.AreEqual("Stopped", stoppedVm[0].Properties["StatusString"].Value); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Negative")] + [TestCategory("WAPackIaaS-Functional")] + public void ShutdownVmThatNoLongerExistsFails() + { + var vm = VirtualMachine; + var vmId = vm.Properties["ID"].Value; + PowerShell.Commands.Clear(); + PowerShell.AddCommand("Remove-WAPackVM").AddParameter("VM", VirtualMachine).AddParameter("Force"); + PowerShell.InvokeAndAssertForNoErrors(); + + PowerShell.Commands.Clear(); + PowerShell.AddCommand("Stop-WAPackVM").AddParameter("VM", vm).AddParameter("Shutdown").AddParameter("PassThru"); + PowerShell.InvokeAndAssertForErrors(string.Format(Utilities.Properties.Resources.OperationFailedErrorMessage, Utilities.Properties.Resources.Shutdown, vmId)); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/SuspendWAPackVMTests.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/SuspendWAPackVMTests.cs new file mode 100644 index 000000000000..5022677d64da --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/VirtualMachine/SuspendWAPackVMTests.cs @@ -0,0 +1,79 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + [TestClass] + public class SuspendWAPackVMTests : CmdletTestVirtualMachineStatusBase + { + [TestCleanup] + public void Cleanup() + { + var vm = VirtualMachine; + if (vm.Properties["StatusString"].Value.ToString() == "Paused") + this.SetVirtualMachineState(vm, "Resume"); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void ShouldSuspendExistingVm() + { + var vm = VirtualMachine; + var startedVm = this.SetVirtualMachineState(vm, "Start"); + Assert.AreEqual("Running", startedVm.Properties["StatusString"].Value); + var suspendedVm = this.SetVirtualMachineState(startedVm, "Suspend"); + Assert.AreEqual("Paused", suspendedVm.Properties["StatusString"].Value); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Negative")] + [TestCategory("WAPackIaaS-Functional")] + public void SuspendVmThatNoLongerExistsFails() + { + var vm = VirtualMachine; + var vmId = vm.Properties["ID"].Value; + this.SetVirtualMachineState(vm, "Stop"); + PowerShell.Commands.Clear(); + PowerShell.AddCommand("Remove-WAPackVM").AddParameter("VM", VirtualMachine).AddParameter("Force"); + PowerShell.InvokeAndAssertForNoErrors(); + + PowerShell.Commands.Clear(); + PowerShell.AddCommand("Suspend-WAPackVM").AddParameter("VM", vm).AddParameter("PassThru"); + PowerShell.InvokeAndAssertForErrors(string.Format(Utilities.Properties.Resources.OperationFailedErrorMessage, Utilities.Properties.Resources.Suspend, + vmId)); + } + + [TestMethod] + [TestCategory("WAPackIaaS-All")] + [TestCategory("WAPackIaaS-Functional")] + public void ShouldBeAbleToGetAndSuspendAVmUsingPipeline() + { + var vm = VirtualMachine; + var startedVm = this.SetVirtualMachineState(vm, "Start"); + Assert.AreEqual("Running", startedVm.Properties["StatusString"].Value); + + PowerShell.Commands.Clear(); + PowerShell.AddCommand("Get-WAPackVM") + .AddParameter("Id", startedVm.Properties["Id"].Value) + .AddCommand("Suspend-WAPackVM").AddParameter("PassThru"); + + var stoppedVm = PowerShell.InvokeAndAssertForNoErrors(); + Assert.AreEqual("Paused", stoppedVm[0].Properties["StatusString"].Value); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/WAPackIaaS/WAPackConfigurationFactory.cs b/src/Common/Commands.ScenarioTest/WAPackIaaS/WAPackConfigurationFactory.cs new file mode 100644 index 000000000000..12fd7fa8f072 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WAPackIaaS/WAPackConfigurationFactory.cs @@ -0,0 +1,74 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using System.Security; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WAPackIaaS.FunctionalTest +{ + public class WAPackConfigurationFactory + { + // --------Template---------- + // For New-WAPackVM & Get-WAPackVMOSDisk + public const string Win7_64TemplateName = "template_Windows7_x64"; + public const string LinuxUbuntu_64TemplateName = "template_linux_ubuntu_x64"; + public const int TotalTemplateCount = 7; + + // --------OSDisk---------- + // For Get-WAPackVMRole + public const string LinuxOSVirtualHardDiskImage = "ubun12v4x64_NA_40G.vhdx:1.0.0.0"; + // For New-WAPackVM + public const string BlankOSDiskName = "Blank Disk - Small.vhdx"; + // For New-WAPackVM & Get-WAPackVMOSDisk + public const string Ws2k8R2OSDiskName = "st-ws2k8r2entx64-net4.vhdx"; + public const string LinuxOSDiskName = "ubun12v4x64_NA_40G.vhdx"; + + public const int TotalOSDiskCount = 9; + + // --------VMSizeProfile---------- + // For New-WAPackVM & Get-WAPackVMOSDisk + public const string VMSizeProfileName = "hwp_staticIP"; + public const int TotalVMSizeProfileCount = 3; + + // --------VNet---------- + // For New-WAPackVM & Get-WAPackVMOSDisk + public const string AvenzVnetName = "AvezLNVMNetwork"; + public const string ExternalVnetName = "EXTERNAL"; + public const int TotalVnetCount = 5; + + // --------LogicalNetwork---------- + public const string AvezLogicalNetworkName = "AvezLN"; + + public const string userName = "SomeTestUser"; + public const string password = "SomeTestPassword"; + + + public static SecureString securePassword = ConvertToSecureString(password); + public static PSCredential WindowsVMCredential = new PSCredential(userName, securePassword); + public static PSCredential LinuxVMCredential = new PSCredential("root", securePassword); + public const string vmNameToCreate = "TestWindowsVM_VMFromTemplate5"; + + + private static SecureString ConvertToSecureString(string value) + { + SecureString secureString = new SecureString(); + foreach (char c in value.ToCharArray()) + { + secureString.AppendChar(c); + } + + return secureString; + } + } +} diff --git a/src/Common/Commands.ScenarioTest/WebsitesTests/WebsitesTests.cs b/src/Common/Commands.ScenarioTest/WebsitesTests/WebsitesTests.cs new file mode 100644 index 000000000000..ff0ffb56e6ef --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WebsitesTests/WebsitesTests.cs @@ -0,0 +1,483 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WebsitesTests +{ + public class WebsitesTests : WebsitesTestsBase + { + #region Remove-AzureWebsite Scenario Tests + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + [Trait(Category.Environment, Category.WAPack)] + public void TestRemoveAzureWebsiteWithInvalidCredentials() + { + RunPowerShellTest("Run-WebsiteTest {Test-WithInvalidCredentials {Remove-AzureWebsite $(Get-WebsiteName) -Force }} 'TestRemoveAzureWebsiteWithInvalidCredentials'"); + } + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + [Trait(Category.Environment, Category.WAPack)] + public void TestRemoveAzureServiceWithValidName() + { + RunPowerShellTest("Run-WebsiteTest {Test-RemoveAzureServiceWithValidName} 'TestRemoveAzureServiceWithValidName'"); + } + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + [Trait(Category.Environment, Category.WAPack)] + public void TestRemoveAzureServiceWithNonExistingName() + { + RunPowerShellTest("Run-WebsiteTest {Test-RemoveAzureServiceWithNonExistingName} 'TestRemoveAzureServiceWithNonExistingName'"); + } + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + [Trait(Category.Environment, Category.WAPack)] + public void TestRemoveAzureServiceWithWhatIf() + { + RunPowerShellTest("Run-WebsiteTest {Test-RemoveAzureServiceWithWhatIf} 'TestRemoveAzureServiceWithWhatIf'"); + } + + #endregion Remove-AzureWebsite Scenario Tests + + #region Get-AzureWebsiteLog Scenario Tests + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + [Trait(Category.Environment, Category.WAPack)] + public void TestGetAzureWebsiteLogWithInvalidCredentials() + { + RunPowerShellTest("Run-WebsiteTest {Test-WithInvalidCredentials { Get-AzureWebsiteLog -Tail -Name $(Get-WebsiteName) }} 'TestGetAzureWebsiteLogWithInvalidCredentials'"); + } + + [Fact(Skip = "TODO: Fix the failing tests.")] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.Service, Category.Websites)] + [Trait(Category.Environment, Category.WAPack)] + public void TestGetAzureWebsiteLogTail() + { + RunPowerShellTest("Test-GetAzureWebsiteLogTail"); + } + + [Fact(Skip = "TODO: Fix the failing tests.")] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.Service, Category.Websites)] + [Trait(Category.Environment, Category.WAPack)] + public void TestGetAzureWebsiteLogTailPath() + { + RunPowerShellTest("Test-GetAzureWebsiteLogTailPath"); + } + + [Fact(Skip = "TODO: Fix the failing tests.")] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.Service, Category.Websites)] + [Trait(Category.Environment, Category.WAPack)] + public void TestGetAzureWebsiteLogTailUriEncoding() + { + RunPowerShellTest("Test-GetAzureWebsiteLogTailUriEncoding"); + } + + [Fact(Skip = "TODO: Fix the failing tests.")] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.Service, Category.Websites)] + [Trait(Category.Environment, Category.WAPack)] + public void TestGetAzureWebsiteLogListPath() + { + RunPowerShellTest("Test-GetAzureWebsiteLogListPath"); + } + + #endregion Get-AzureWebsiteLog Scenario Tests + + #region Get-AzureWebsite Scenario Tests + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + [Trait(Category.Environment, Category.WAPack)] + public void TestGetAzureWebsite() + { + RunPowerShellTest("Run-WebsiteTest {Test-GetAzureWebsite} 'TestGetAzureWebsite'"); + } + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + [Trait(Category.Environment, Category.WAPack)] + public void TestGetAzureWebsiteWithStoppedSite() + { + RunPowerShellTest("Run-WebsiteTest {Test-GetAzureWebsiteWithStoppedSite} 'TestGetAzureWebsiteWithStoppedSite'"); + } + + #endregion Get-AzureWebsite Scenario Tests + + #region Start-AzureWebsite Scenario Tests + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + [Trait(Category.Environment, Category.WAPack)] + public void TestStartAzureWebsite() + { + RunPowerShellTest("Run-WebsiteTest {Test-StartAzureWebsite} 'TestStartAzureWebsite'"); + } + + #endregion Start-AzureWebsite Scenario Tests + + #region Stop-AzureWebsite Scenario Tests + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + [Trait(Category.Environment, Category.WAPack)] + public void TestStopAzureWebsite() + { + RunPowerShellTest("Run-WebsiteTest {Test-StopAzureWebsite} 'TestStopAzureWebsite'"); + } + + #endregion Stop-AzureWebsite Scenario Tests + + #region Restart-AzureWebsite Scenario Tests + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + [Trait(Category.Environment, Category.WAPack)] + public void TestRestartAzureWebsite() + { + RunPowerShellTest("Run-WebsiteTest {Test-RestartAzureWebsite} 'TestRestartAzureWebsite'"); + } + + #endregion Restart-AzureWebsite Scenario Tests + + #region Enable-AzureWebsiteApplicationDiagnostic Scenario Tests + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + public void TestEnableApplicationDiagnosticOnTableStorage() + { + RunPowerShellTest("Run-WebsiteTest {Test-EnableApplicationDiagnosticOnTableStorage} 'TestEnableApplicationDiagnosticOnTableStorage'"); + } + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + public void TestEnableApplicationDiagnosticOnBlobStorage() + { + RunPowerShellTest("Run-WebsiteTest {Test-EnableApplicationDiagnosticOnBlobStorage} 'TestEnableApplicationDiagnosticOnBlobStorage'"); + } + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.Service, Category.Websites)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Environment, Category.WAPack)] + public void TestEnableApplicationDiagnosticOnFileSystem() + { + RunPowerShellTest("Run-WebsiteTest {Test-EnableApplicationDiagnosticOnFileSystem} 'TestEnableApplicationDiagnosticOnFileSystem'"); + } + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + [Trait(Category.Environment, Category.WAPack)] + public void TestUpdateTheDiagnositicLogLevel() + { + RunPowerShellTest("Run-WebsiteTest {Test-UpdateTheDiagnositicLogLevel} 'TestUpdateTheDiagnositicLogLevel'"); + } + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + public void TestReconfigureStorageAppDiagnostics() + { + RunPowerShellTest("Run-WebsiteTest {Test-ReconfigureStorageAppDiagnostics} 'TestReconfigureStorageAppDiagnostics'"); + } + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + public void TestThrowsForInvalidStorageAccountName() + { + RunPowerShellTest("Run-WebsiteTest {Test-ThrowsForInvalidStorageAccountName} 'TestThrowsForInvalidStorageAccountName'"); + } + + #endregion Enable-AzureWebsiteApplicationDiagnostic Scenario Tests + + #region Disable-AzureWebsiteApplicationDiagnostic Scenario Tests + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + public void TestDisableApplicationDiagnosticOnTableStorage() + { + RunPowerShellTest("Run-WebsiteTest {Test-DisableApplicationDiagnosticOnTableStorage} 'TestDisableApplicationDiagnosticOnTableStorage'"); + } + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + [Trait(Category.Environment, Category.WAPack)] + public void TestDisableApplicationDiagnosticOnFileSystem() + { + RunPowerShellTest("Run-WebsiteTest {Test-DisableApplicationDiagnosticOnFileSystem} 'TestDisableApplicationDiagnosticOnFileSystem'"); + } + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + public void TestDisableApplicationDiagnosticOnTableStorageAndFile() + { + RunPowerShellTest("Run-WebsiteTest {Test-DisableApplicationDiagnosticOnTableStorageAndFile} 'TestDisableApplicationDiagnosticOnTableStorageAndFile'"); + } + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + public void TestDisablesFileOnly() + { + RunPowerShellTest("Run-WebsiteTest {Test-DisablesFileOnly} 'TestDisablesFileOnly'"); + } + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + public void TestDisablesStorageOnly() + { + RunPowerShellTest("Run-WebsiteTest {Test-DisablesStorageOnly} 'TestDisablesStorageOnly'"); + } + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + public void TestDisablesBothByDefault() + { + RunPowerShellTest("Run-WebsiteTest {Test-DisablesBothByDefault} 'TestDisablesBothByDefault'"); + } + + #endregion Disable-AzureWebsiteApplicationDiagnostic Scenario Tests + + #region Get-AzureWebsiteLocation Scenario Tests + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + [Trait(Category.Environment, Category.WAPack)] + public void TestGetAzureWebsiteLocation() + { + RunPowerShellTest("Run-WebsiteTest {Test-GetAzureWebsiteLocation} 'TestGetAzureWebsiteLocation'"); + } + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + [Trait(Category.Environment, Category.WAPack)] + public void TestKuduAppsExpressApp() + { + RunPowerShellTest("Run-WebsiteTest {Test-KuduAppsExpressApp} 'TestKuduAppsExpressApp'"); + } + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + [Trait(Category.Environment, Category.WAPack)] + public void TestGetAzureWebSiteListNone() + { + RunPowerShellTest("Run-WebsiteTest {Test-GetAzureWebSiteListNone} 'TestGetAzureWebSiteListNone'"); + } + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + [Trait(Category.Environment, Category.WAPack)] + public void TestAzureWebSiteListAll() + { + RunPowerShellTest("Run-WebsiteTest {Test-AzureWebSiteListAll} 'TestAzureWebSiteListAll'"); + } + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + [Trait(Category.Environment, Category.WAPack)] + public void TestAzureWebSiteShowSingleSite() + { + RunPowerShellTest("Run-WebsiteTest {Test-AzureWebSiteShowSingleSite} 'TestAzureWebSiteShowSingleSite'"); + } + + #endregion Get-AzureWebsiteLocation Scenario Tests + + #region AzureWebSiteGitHubAllParms Scenario Tests + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + [Trait(Category.Environment, Category.WAPack)] + public void TestNewAzureWebSiteMultipleCreds() + { + RunPowerShellTest("Run-WebsiteTest {Test-NewAzureWebSiteMultipleCreds} 'TestNewAzureWebSiteMultipleCreds'"); + } + + [Fact(Skip = "TODO: Fix failing test.")] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.Service, Category.Websites)] + [Trait(Category.Environment, Category.WAPack)] + public void TestNewAzureWebSiteGitHubAllParms() + { + RunPowerShellTest("Test-NewAzureWebSiteGitHubAllParms"); + } + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + [Trait(Category.Environment, Category.WAPack)] + public void TestNewAzureWebSiteUpdateGit() + { + RunPowerShellTest("Run-WebsiteTest {Test-NewAzureWebSiteUpdateGit} 'TestNewAzureWebSiteUpdateGit'"); + } + + #endregion AzureWebSiteGitHubAllParms Scenario Tests + + #region Set-AzureWebSite Scenario Tests + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + [Trait(Category.Environment, Category.WAPack)] + public void TestSetAzureWebsite() + { + RunPowerShellTest("Run-WebsiteTest {Test-SetAzureWebsite} 'TestSetAzureWebsite'"); + } + + #endregion Set-AzureWebSite Scenario Tests + + #region WebJob Scenario Tests + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + public void TestRemoveAzureWebsiteTriggeredJob() + { + RunPowerShellTest("Run-WebsiteTest {Test-RemoveAzureWebsiteTriggeredJob} 'TestRemoveAzureWebsiteTriggeredJob'"); + } + + [Fact(Skip = "TODO: Fix failing test.")] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + public void TestRemoveAzureWebsiteContinuousJob() + { + RunPowerShellTest("Run-WebsiteTest {Test-RemoveAzureWebsiteContinuousJob} 'TestRemoveAzureWebsiteContinuousJob'"); + } + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + public void TestRemoveNonExistingAzureWebsiteJob() + { + RunPowerShellTest("Run-WebsiteTest {Test-RemoveNonExistingAzureWebsiteJob} 'TestRemoveNonExistingAzureWebsiteJob'"); + } + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + public void TestStartAzureWebsiteTriggeredJob() + { + RunPowerShellTest("Run-WebsiteTest {Test-StartAzureWebsiteTriggeredJob} 'TestStartAzureWebsiteTriggeredJob'"); + } + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + public void TestStartAndStopAzureWebsiteContinuousJob() + { + RunPowerShellTest("Run-WebsiteTest {Test-StartAndStopAzureWebsiteContinuousJob} 'TestStartAndStopAzureWebsiteContinuousJob'"); + } + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + public void GettingWebsiteJobs() + { + RunPowerShellTest("Run-WebsiteTest {Test-GettingWebsiteJobs} 'GettingWebsiteJobs'"); + } + + [Fact] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.BVT)] + [Trait(Category.Service, Category.Websites)] + public void TestGetsJobHistory() + { + RunPowerShellTest("Run-WebsiteTest {Test-GettingJobHistory} 'TestGetsJobHistory'"); + } + + #endregion WebJob Scenario Tests + } +} diff --git a/src/Common/Commands.ScenarioTest/WebsitesTests/WebsitesTestsBase.cs b/src/Common/Commands.ScenarioTest/WebsitesTests/WebsitesTestsBase.cs new file mode 100644 index 000000000000..43bcb1169aaa --- /dev/null +++ b/src/Common/Commands.ScenarioTest/WebsitesTests/WebsitesTestsBase.cs @@ -0,0 +1,98 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.Azure.Utilities.HttpRecorder; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management; +using Microsoft.WindowsAzure.Management.Compute; +using Microsoft.WindowsAzure.Management.Storage; +using Microsoft.WindowsAzure.Management.WebSites; +using Microsoft.WindowsAzure.Testing; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest.WebsitesTests +{ + public abstract class WebsitesTestsBase + { + private EnvironmentSetupHelper helper; + + protected WebsitesTestsBase() + { + helper = new EnvironmentSetupHelper(); + } + + protected void SetupManagementClients() + { + var websitesClient = GetWebsitesClient(); + var managementClient = GetManagementClient(); + var storageClient = GetStorageManagementClient(); + var computeClient = GetComputeManagementClient(); + + helper.SetupSomeOfManagementClients(websitesClient, managementClient, storageClient, computeClient); + } + + protected void RunPowerShellTest(params string[] scripts) + { + using (UndoContext context = UndoContext.Current) + { + context.Start(TestUtilities.GetCallingClass(2), TestUtilities.GetCurrentMethodName(2)); + + SetupManagementClients(); + + helper.SetupEnvironment(AzureModule.AzureServiceManagement); + helper.SetupModules(AzureModule.AzureServiceManagement, + "Resources\\Websites\\Common.ps1", + "Resources\\Websites\\" + this.GetType().Name + ".ps1"); + + if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("WEBJOB_FILE"))) + { + Environment.SetEnvironmentVariable("WEBJOB_FILE", "Resources\\Websites\\WebsiteJobTestCmd.zip"); + } + if (HttpMockServer.GetCurrentMode() == HttpRecorderMode.Playback) + { + if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("GIT_USERNAME"))) + { + Environment.SetEnvironmentVariable("GIT_USERNAME", "fake_username"); + } + if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("GIT_PASSWORD"))) + { + Environment.SetEnvironmentVariable("GIT_PASSWORD", "fake_password"); + } + } + + helper.RunPowerShellTest(scripts); + } + } + + protected WebSiteManagementClient GetWebsitesClient() + { + return TestBase.GetServiceClient(new RDFETestEnvironmentFactory()); + } + + protected StorageManagementClient GetStorageManagementClient() + { + return TestBase.GetServiceClient(new RDFETestEnvironmentFactory()); + } + + protected ComputeManagementClient GetComputeManagementClient() + { + return TestBase.GetServiceClient(new RDFETestEnvironmentFactory()); + } + + protected ManagementClient GetManagementClient() + { + return TestBase.GetServiceClient(new RDFETestEnvironmentFactory()); + } + } +} diff --git a/src/Common/Commands.ScenarioTest/packages.config b/src/Common/Commands.ScenarioTest/packages.config new file mode 100644 index 000000000000..2c9315ab2fe6 --- /dev/null +++ b/src/Common/Commands.ScenarioTest/packages.config @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTests.Common/Assert.ps1 b/src/Common/Commands.ScenarioTests.Common/Assert.ps1 new file mode 100644 index 000000000000..eb7db0931910 --- /dev/null +++ b/src/Common/Commands.ScenarioTests.Common/Assert.ps1 @@ -0,0 +1,345 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +###################### +# +# Validate that the given code block throws the given exception +# +# param [ScriptBlock] $script : The code to test +# param [string] $message : The text of the exception that should be thrown +####################### +function Assert-Throws +{ + param([ScriptBlock] $script, [string] $message) + try + { + &$script + } + catch + { + if ($message -ne "") + { + $actualMessage = $_.Exception.Message + Write-Output ("Caught exception: '$actualMessage'") + + if ($actualMessage -eq $message) + { + return $true; + } + else + { + throw "Expected exception not received: '$message' the actual message is '$actualMessage'"; + } + } + else + { + return $true; + } + } + + throw "No exception occured"; +} + +###################### +# +# Validate that the given code block throws the given exception +# +# param [ScriptBlock] $script : The code to test +# param [ScriptBlock] $compare : Predicate used to determine if the message meets criteria +####################### +function Assert-ThrowsContains +{ + param([ScriptBlock] $script, [string] $compare) + try + { + &$script + } + catch + { + if ($message -ne "") + { + $actualMessage = $_.Exception.Message + Write-Output ("Caught exception: '$actualMessage'") + if ($actualMessage.Contains($compare)) + { + return $true; + } + else + { + throw "Expected exception does not contain expected text '$compare', the actual message is '$actualMessage'"; + } + } + else + { + return $true; + } + } + + throw "No exception occured"; +} + +<# +.SYNOPSIS +Given a list of variable names, assert that all of them are defined +#> +function Assert-Env +{ + param([string[]] $vars) + $tmp = Get-Item env: + $env = @{} + $tmp | % { $env.Add($_.Key, $_.Value)} + $vars | % { Assert-True {$env.ContainsKey($_)} "Environment Variable $_ Is Required. Please set the value before runnign the test"} +} + +################### +# +# Verify that the given scriptblock returns true +# +# param [ScriptBlock] $script : The script to execute +# param [string] $message : The message to return if the given script does not return true +#################### +function Assert-True +{ + param([ScriptBlock] $script, [string] $message) + + if (!$message) + { + $message = "Assertion failed: " + $script + } + + $result = &$script + if (-not $result) + { + Write-Debug "Failure: $message" + throw $message + } + + return $true +} + +################### +# +# Verify that the given scriptblock returns false +# +# param [ScriptBlock] $script : The script to execute +# param [string] $message : The message to return if the given script does not return false +#################### +function Assert-False +{ + param([ScriptBlock] $script, [string] $message) + + if (!$message) + { + $message = "Assertion failed: " + $script + } + + $result = &$script + if ($result) + { + throw $message + } + + return $true +} + +################### +# +# Verify that the given scriptblock returns false +# +# param [ScriptBlock] $script : The script to execute +# param [string] $message : The message to return if the given script does not return false +#################### +function Assert-False +{ + param([ScriptBlock] $script, [string] $message) + + if (!$message) + { + $message = "Assertion failed: " + $script + } + + $result = &$script + if ($result) + { + throw $message + } + + return $true +} + +################### +# +# Verify that the given scriptblock does not return null +# +# param [object] $actual : The actual object +# param [string] $message : The message to return if the given script does not return true +#################### +function Assert-NotNull +{ + param([object] $actual, [string] $message) + + if (!$message) + { + $message = "Assertion failed because the object is null: " + $actual + } + + if ($actual -eq $null) + { + throw $message + } + + return $true +} + +###################### +# +# Assert that the given file exists +# +# param [string] $path : The path to the file to test +# param [string] $message: The text of the exception to throw if the file doesn't exist +###################### +function Assert-Exists +{ + param([string] $path, [string] $message) + return Assert-True {Test-Path $path} $message +} + +################### +# +# Verify that two given objects are equal +# +# param [object] $expected : The expected object +# param [object] $actual : The actual object +# param [string] $message : The message to return if the given objects are not equal +#################### +function Assert-AreEqual +{ + param([object] $expected, [object] $actual, [string] $message) + + if (!$message) + { + $message = "Assertion failed because expected '$expected' does not match actual '$actual'" + } + + if ($expected -ne $actual) + { + throw $message + } + + return $true +} + +################### +# +# Verify that two given arrays are equal +# +# param [array] $expected : The expected array +# param [array] $actual : The actual array +# param [string] $message : The message to return if the given arrays are not equal. +#################### +function Assert-AreEqualArray +{ + param([object] $expected, [object] $actual, [string] $message) + + if (!$message) + { + $message = "Assertion failed because expected '$expected' does not match actual '$actual'" + } + + $diff = Compare-Object $expected $actual -PassThru + + if ($diff -ne $null) + { + throw $message + } + + return $true +} + +################### +# +# Verify that two given objects have equal properties +# +# param [object] $expected : The expected object +# param [object] $actual : The actual object +# param [string] $message : The message to return if the given objects are not equal. +#################### +function Assert-AreEqualObjectProperties +{ + param([object] $expected, [object] $actual, [string] $message) + + $properties = $expected | Get-Member -MemberType "Property" | Select -ExpandProperty Name + $diff = Compare-Object $expected $actual -Property $properties + + if ($diff -ne $null) + { + if (!$message) + { + $message = "Assert failed because the objects don't match. Expected: " + $diff[0] + " Actual: " + $diff[1] + } + + throw $message + } + + return $true +} + +################### +# +# Verify that the given value is null +# +# param [object] $actual : The actual object +# param [string] $message : The message to return if the given object is not null +#################### +function Assert-Null +{ + param([object] $actual, [string] $message) + + if (!$message) + { + $message = "Assertion failed because the object is not null: " + $actual + } + + if ($actual -ne $null) + { + throw $message + } + + return $true +} + +################### +# +# Verify that two given objects are not equal +# +# param [object] $expected : The expected object +# param [object] $actual : The actual object +# param [string] $message : The message to return if the given objects are equal +#################### +function Assert-AreNotEqual +{ + param([object] $expected, [object] $actual, [string] $message) + + if (!$message) + { + $message = "Assertion failed because expected '$expected' does match actual '$actual'" + } + + if ($expected -eq $actual) + { + throw $message + } + + return $true +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTests.Common/Commands.ScenarioTests.Common.csproj b/src/Common/Commands.ScenarioTests.Common/Commands.ScenarioTests.Common.csproj new file mode 100644 index 000000000000..9b5e21401d18 --- /dev/null +++ b/src/Common/Commands.ScenarioTests.Common/Commands.ScenarioTests.Common.csproj @@ -0,0 +1,159 @@ + + + + + Debug + AnyCPU + {C1BDA476-A5CC-4394-914D-48B0EC31A710} + Library + Properties + Microsoft.WindowsAzure.Commands.ScenarioTest + Microsoft.WindowsAzure.Commands.ScenarioTest.Common + v4.5 + 512 + ..\..\ + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE;SIGN + true + MSSharedLibKey.snk + true + true + false + true + pdbonly + + + + False + ..\..\packages\Hydra.HttpRecorder.1.0.5417.13285-prerelease\lib\net45\Microsoft.Azure.Utilities.HttpRecorder.dll + + + False + ..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll + + + False + ..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll + + + False + ..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + True + + + ..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + False + ..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + False + ..\..\packages\Hydra.SpecTestSupport.1.0.5417.13285-prerelease\lib\net45\Microsoft.WindowsAzure.Testing.dll + + + ..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + True + + + + + False + C:\Program Files (x86)\Reference Assemblies\Microsoft\WindowsPowerShell\3.0\System.Management.Automation.dll + + + + + False + ..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + + + + + ..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + + + + + + + + + + PreserveNewest + + + PreserveNewest + + + + + + {bc420543-c04e-4bf3-96e1-cd81b823bdd7} + Commands.Test.Utilities + + + {3b48a77b-5956-4a62-9081-92ba04b02b27} + Commands.Common.Test + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTests.Common/Common.ps1 b/src/Common/Commands.ScenarioTests.Common/Common.ps1 new file mode 100644 index 000000000000..8cfda87c9d1d --- /dev/null +++ b/src/Common/Commands.ScenarioTests.Common/Common.ps1 @@ -0,0 +1,363 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +$excludedExtensions = @(".dll", ".zip", ".msi", ".exe") +################################### +# +# Retrievce the contents of a powershrell transcript, stripping headers and footers +# +# param [string] $path: The path to the transript file to read +################################### +function Get-Transcript +{ + param([string] $path) + return Get-Content $path | + Select-String -InputObject {$_} -Pattern "^Start Time\s*:.*" -NotMatch | + Select-String -InputObject {$_} -Pattern "^End Time\s*:.*" -NotMatch | + Select-String -InputObject {$_} -Pattern "^Machine\s*:.*" -NotMatch | + Select-String -InputObject {$_} -Pattern "^Username\s*:.*" -NotMatch | + Select-String -InputObject {$_} -Pattern "^Transcript started, output file is.*" -NotMatch +} + +######################## +# +# Get a random file name in the current directory +# +# param [string] $rootPath: The path of the directory to contain the random file (optional) +######################## +function Get-LogFile +{ + param([string] $rootPath = ".") + return [System.IO.Path]::Combine($rootPath, ([System.IO.Path]::GetRandomFileName())) +} + +################# +# +# Execute a test, no exception thrown means the test passes. Can also be used to compare test +# output to a baseline file, or to generate a baseline file +# +# param [scriptblock] $test: The test code to run +# param [string] $testScript: The path to the baseline file (optional) +# param [switch] $generate: Set if the baseline file should be generated, otherwise +# the baseline file would be used for comparison with test output +################## +function Run-Test +{ + param([scriptblock]$test, [string] $testName = $null, [string] $testScript = $null, [switch] $generate = $false) + Test-Setup + $transFile = $testName + ".log" + if ($testName -eq $null) + { + $transFile = Get-LogFile "." + } + if($testScript) + { + if ($generate) + { + Write-Log "[run-test]: generating script file $testScript" + $transFile = $testScript + } + else + { + Write-Log "[run-test]: writing output to $transFile, using validation script $testScript" + } + } + else + { + Write-Log "[run-test]: Running test without file comparison" + } + + $oldPref = $ErrorActionPreference + $ErrorActionPreference = "SilentlyContinue" + #Start-Transcript -Path $transFile + $success = $false; + $ErrorActionPreference = $oldPref + try + { + &$test + $success = $true; + } + finally + { + Test-Cleanup + $oldPref = $ErrorActionPreference + $ErrorActionPreference = "SilentlyContinue" + #Stop-Transcript + $ErrorActionPreference = $oldPref + if ($testScript) + { + if ($success -and -not $generate) + { + $result = Compare-Object (Get-Transcript $testScript) (Get-Transcript $transFile) + if ($result -ne $null) + { + throw "[run-test]: Test Failed " + (Out-String -InputObject $result) + ", Transcript at $transFile" + } + + } + } + + if ($success) + { + Write-Log "[run-test]: Test Passed" + } + } + +} + +################## +# +# Format a string for proper output to host and transcript +# +# param [string] $message: The text to write +################## +function Write-Log +{ + [CmdletBinding()] + param( [Object] [Parameter(Position=0, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$false)] $obj = "") + PROCESS + { + $obj | Out-String | Write-Verbose + } +} + +function Check-SubscriptionMatch +{ + param([string] $baseSubscriptionName, [Microsoft.WindowsAzure.Commands.Utilities.Common.SubscriptionData] $checkedSubscription) + Write-Log ("[CheckSubscriptionMatch]: base subscription: '$baseSubscriptionName', validating '" + ($checkedSubscription.SubscriptionName)+ "'") + Format-Subscription $checkedSubscription | Write-Log + if ($baseSubscriptionName -ne $checkedSubscription.SubscriptionName) + { + throw ("[Check-SubscriptionMatch]: Subscription Match Failed '" + ($baseSubscriptionName) + "' != '" + ($checkedSubscription.SubscriptionName) + "'") + } + + Write-Log ("CheckSubscriptionMatch]: subscription check succeeded.") +} + + +########################## +# +# Return the fully qualified filename of a given file +# +# param [string] $path: The relative path to the file +# +########################## +function Get-FullName +{ + param([string] $path) + $pathObj = Get-Item $path + return ($pathObj.FullName) +} + +############################# +# +# PowerShell environment setup for running a test, save previous snvironment settings and +# enable verbose, debug, and warning streams +# +############################# +function Test-Setup +{ + $global:oldConfirmPreference = $global:ConfirmPreference + $global:oldDebugPreference = $global:DebugPreference + $global:oldErrorActionPreference = $global:ErrorActionPreference + $global:oldFormatEnumerationLimit = $global:FormatEnumerationLimit + $global:oldProgressPreference = $global:ProgressPreference + $global:oldVerbosePreference = $global:VerbosePreference + $global:oldWarningPreference = $global:WarningPreference + $global:oldWhatIfPreference = $global:WhatIfPreference + $global:ConfirmPreference = "None" + $global:DebugPreference = "Continue" + $global:ErrorActionPreference = "Stop" + $global:FormatEnumerationLimit = 10000 + $global:ProgressPreference = "SilentlyContinue" + $global:VerbosePreference = "Continue" + $global:WarningPreference = "Continue" + $global:WhatIfPreference = 0 +} + +############################# +# +# PowerShell environment cleanup for running a test, restore previous snvironment settings +# +############################# +function Test-Cleanup +{ + $global:ConfirmPreference = $global:oldConfirmPreference + $global:DebugPreference = $global:oldDebugPreference + $global:ErrorActionPreference = $global:oldErrorActionPreference + $global:FormatEnumerationLimit = $global:oldFormatEnumerationLimit + $global:ProgressPreference = $global:oldProgressPreference + $global:VerbosePreference = $global:oldVerbosePreference + $global:WarningPreference = $global:oldWarningPreference + $global:WhatIfPreference = $global:oldWhatIfPreference +} + +####################### +# +# Dump the contents of a directory to the output stream +# +# param [string] $rootPath: The path to the directory +# param [switch] $resurse : True if we should recurse directories +###################### +function Dump-Contents +{ + param([string] $rootPath = ".", [switch] $recurse = $false) + if (-not ((Test-Path $rootPath) -eq $true)) + { + throw "[dump-contents]: $rootPath does not exist" + } + + foreach ($item in Get-ChildItem $rootPath) + { + Write-Log + Write-Log "---------------------------" + Write-Log $item.Name + Write-Log "---------------------------" + Write-Log + if (!$item.PSIsContainer) + { + if (Test-BinaryFile $item) + { + Write-Log "---- binary data excluded ----" + } + else + { + Get-Content ($item.PSPath) + } + } + elseif ($recurse) + { + Dump-Contents ($item.PSPath) -recurse + } + } +} + +function Test-BinaryFile +{ + param ([System.IO.FileInfo] $file) + ($excludedExtensions | Where-Object -FilterScript {$_ -eq $file.Extension}) -ne $null +} + + +<# +.SYNOPSIS +Removes all current subscriptions. +#> +function Remove-AllSubscriptions +{ + Get-AzureSubscription | Remove-AzureSubscription -Force +} + +<# +.SYNOPSIS +Waits on the specified job with the given timeout. + +.PARAMETER scriptBlock +The script block to execute. + +.PARAMETER timeout +The maximum timeout for the script. +#> +function Wait-Function +{ + param([ScriptBlock] $scriptBlock, [object] $breakCondition, [int] $timeout) + + if ($timeout -eq 0) { $timeout = 60 * 5 } + $start = [DateTime]::Now + $current = [DateTime]::Now + $diff = $current - $start + + do + { + Start-Sleep -s 5 + $current = [DateTime]::Now + $diff = $current - $start + $result = &$scriptBlock + } + while(($result -ne $breakCondition) -and ($diff.TotalSeconds -lt $timeout)) + + if ($diff.TotalSeconds -ge $timeout) + { + Write-Warning "The script block '$scriptBlock' exceeded the timeout." + # End the processing so the test does not blow up + exit + } +} + + +<# +.SYNOPSIS +Waits for specified duration if not-mocked, otherwise skips wait. + +.PARAMETER timeout +Timeout in seconds +#> +function Wait-Seconds +{ + param([int] $timeout) + + [Microsoft.WindowsAzure.Testing.TestUtilities]::Wait($timeout * 1000) +} + + +<# +.SYNOPSIS +Retires the specified job the given numer of times, waiting the given interval between tries + +.PARAMETER scriptBlock +The script block to execute. Must be a predicate (return true or false) + +.PARAMETER argument +Argument to pass to the script block + +.PARAMETER maxTries +The maximum number of times to retry + +.PARAMETER interval +The number of seconds to wait before retrying +#> +function Retry-Function +{ + param([ScriptBlock] $scriptBlock, [Object] $argument, [int] $maxTries, [int] $interval) + + if ($interval -eq 0) { $interval = 60 } + + $result = Invoke-Command -ScriptBlock $scriptBlock -ArgumentList $argument; + $tries = 1; + while(( $result -ne $true) -and ($tries -le $maxTries)) + { + Start-Sleep -s $interval + $result = Invoke-Command -ScriptBlock $scriptBlock -ArgumentList $argument; + $tries++; + } + + return $result; +} + +function getAssetName +{ + $stack = Get-PSCallStack + $testName = $null; + foreach ($frame in $stack) + { + if ($frame.Command.StartsWith("Test-", "CurrentCultureIgnoreCase")) + { + $testName = $frame.Command + } + } + + $assetName = [Microsoft.Azure.Utilities.HttpRecorder.HttpMockServer]::GetAssetName($testName, "onesdk") + + return $assetName +} \ No newline at end of file diff --git a/src/Common/Commands.ScenarioTests.Common/Constants.cs b/src/Common/Commands.ScenarioTests.Common/Constants.cs new file mode 100644 index 000000000000..8bbf163f0c4f --- /dev/null +++ b/src/Common/Commands.ScenarioTests.Common/Constants.cs @@ -0,0 +1,87 @@ + +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest +{ + public class Category + { + // Service + public const string Service = "Service"; + + public const string All = "All"; + + public const string Automation = "Automation"; + + public const string ServiceBus = "ServiceBus"; + + public const string CloudService = "CloudService"; + + public const string Management = "Management"; + + public const string MediaServices = "MediaServices"; + + public const string Websites = "Websites"; + + public const string Storage = "Storage"; + + public const string Store = "Store"; + + public const string ServiceManagement = "ServiceManagement"; + + public const string Resources = "Resources"; + + public const string Tags = "Tags"; + + public const string TrafficManager = "TrafficManager"; + + public const string ManagedCache = "ManagedCache"; + + public const string Scheduler = "Scheduler"; + + public const string Network = "Network"; + + // Owners + public const string OneSDK = "OneSDK"; + + // Acceptance type + public const string AcceptanceType = "AcceptanceType"; + + public const string CIT = "CIT"; + + public const string BVT = "BVT"; + + public const string CheckIn = "CheckIn"; + + // Run Type + public const string RunType = "RunType"; + public const string LiveOnly = "LiveOnly"; + //Uncomment when we need to tag on only run under mock + //public const string MockedOnly = "MockedOnly"; + + // Environment + public const string Environment = "Environment"; + + public const string WAPack = "WAPack"; + } + + public class Variables + { + public const string SubscriptionId = "SubscriptionId"; + + public const string Username = "Username"; + + public const string Tenantd = "Tenantd"; + } +} diff --git a/src/Common/Commands.ScenarioTests.Common/EnvironmentSetupHelper.cs b/src/Common/Commands.ScenarioTests.Common/EnvironmentSetupHelper.cs new file mode 100644 index 000000000000..e0839b2350cd --- /dev/null +++ b/src/Common/Commands.ScenarioTests.Common/EnvironmentSetupHelper.cs @@ -0,0 +1,265 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Management.Automation; +using System.Security.Cryptography.X509Certificates; +using Microsoft.Azure.Utilities.HttpRecorder; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Testing; +using System.Diagnostics; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest +{ + public class EnvironmentSetupHelper + { + private static string testEnvironmentName = "__test-environment"; + private static string testSubscriptionName = "__test-subscriptions"; + private AzureSubscription testSubscription; + private AzureAccount testAccount; + protected List modules; + private ProfileClient client; + + public EnvironmentSetupHelper() + { + ProfileClient.DataStore = new MockDataStore(); + client = new ProfileClient(); + + // Ignore SSL errors + System.Net.ServicePointManager.ServerCertificateValidationCallback += (se, cert, chain, sslerror) => true; + // Set RunningMocked + if (HttpMockServer.GetCurrentMode() == HttpRecorderMode.Playback) + { + TestMockSupport.RunningMocked = true; + } + } + + /// + /// Loads DummyManagementClientHelper with clients and throws exception if any client is missing. + /// + /// + public void SetupManagementClients(params object[] initializedManagementClients) + { + AzureSession.ClientFactory = new MockClientFactory(initializedManagementClients); + } + + /// + /// Loads DummyManagementClientHelper with clients and sets it up to create missing clients dynamically. + /// + /// + public void SetupSomeOfManagementClients(params object[] initializedManagementClients) + { + AzureSession.ClientFactory = new MockClientFactory(initializedManagementClients, false); + } + + public void SetupEnvironment(AzureModule mode) + { + SetupAzureEnvironmentFromEnvironmentVariables(mode); + + client.Profile.Save(); + } + + private void SetupAzureEnvironmentFromEnvironmentVariables(AzureModule mode) + { + TestEnvironment rdfeEnvironment = new RDFETestEnvironmentFactory().GetTestEnvironment(); + TestEnvironment csmEnvironment = new CSMTestEnvironmentFactory().GetTestEnvironment(); + TestEnvironment currentEnvironment = (mode == AzureModule.AzureResourceManager ? csmEnvironment : rdfeEnvironment); + + if (currentEnvironment.UserName == null) + { + currentEnvironment.UserName = "fakeuser@microsoft.com"; + } + + SetAuthenticationFactory(mode, rdfeEnvironment, csmEnvironment); + + AzureEnvironment environment = new AzureEnvironment { Name = testEnvironmentName }; + + Debug.Assert(currentEnvironment != null); + environment.Endpoints[AzureEnvironment.Endpoint.ActiveDirectory] = currentEnvironment.Endpoints.AADAuthUri.AbsoluteUri; + environment.Endpoints[AzureEnvironment.Endpoint.Gallery] = currentEnvironment.Endpoints.GalleryUri.AbsoluteUri; + + if (csmEnvironment != null) + { + environment.Endpoints[AzureEnvironment.Endpoint.ResourceManager] = csmEnvironment.BaseUri.AbsoluteUri; + } + + if (rdfeEnvironment != null) + { + environment.Endpoints[AzureEnvironment.Endpoint.ServiceManagement] = rdfeEnvironment.BaseUri.AbsoluteUri; + } + + if (!client.Profile.Environments.ContainsKey(testEnvironmentName)) + { + client.AddOrSetEnvironment(environment); + } + + if (currentEnvironment.SubscriptionId != null) + { + testSubscription = new AzureSubscription() + { + Id = new Guid(currentEnvironment.SubscriptionId), + Name = testSubscriptionName, + Environment = testEnvironmentName, + Account = currentEnvironment.UserName, + Properties = new Dictionary + { + {AzureSubscription.Property.Default, "True"}, + { + AzureSubscription.Property.StorageAccount, + Environment.GetEnvironmentVariable("AZURE_STORAGE_ACCOUNT") + }, + } + }; + + testAccount = new AzureAccount() + { + Id = currentEnvironment.UserName, + Type = AzureAccount.AccountType.User, + Properties = new Dictionary + { + {AzureAccount.Property.Subscriptions, currentEnvironment.SubscriptionId}, + } + }; + + client.Profile.Subscriptions[testSubscription.Id] = testSubscription; + client.Profile.Accounts[testAccount.Id] = testAccount; + client.SetSubscriptionAsCurrent(testSubscription.Name, testSubscription.Account); + } + } + + private void SetAuthenticationFactory(AzureModule mode, TestEnvironment rdfeEnvironment, TestEnvironment csmEnvironment) + { + string jwtToken = null; + X509Certificate2 certificate = null; + TestEnvironment currentEnvironment = (mode == AzureModule.AzureResourceManager ? csmEnvironment : rdfeEnvironment); + + if (mode == AzureModule.AzureServiceManagement) + { + if (rdfeEnvironment.Credentials is TokenCloudCredentials) + { + jwtToken = ((TokenCloudCredentials)rdfeEnvironment.Credentials).Token; + } + if (rdfeEnvironment.Credentials is CertificateCloudCredentials) + { + certificate = ((CertificateCloudCredentials)rdfeEnvironment.Credentials).ManagementCertificate; + } + } + else + { + if (csmEnvironment.Credentials is TokenCloudCredentials) + { + jwtToken = ((TokenCloudCredentials)csmEnvironment.Credentials).Token; + } + if (csmEnvironment.Credentials is CertificateCloudCredentials) + { + certificate = ((CertificateCloudCredentials)csmEnvironment.Credentials).ManagementCertificate; + } + } + + + if (jwtToken != null) + { + AzureSession.AuthenticationFactory = new MockTokenAuthenticationFactory(currentEnvironment.UserName, + jwtToken); + } + else if (certificate != null) + { + AzureSession.AuthenticationFactory = new MockCertificateAuthenticationFactory(currentEnvironment.UserName, + certificate); + } + } + + public void SetupModules(AzureModule mode, params string[] modules) + { + this.modules = new List(); + if (mode == AzureModule.AzureProfile) + { + this.modules.Add(@"ServiceManagement\Azure\Azure.psd1"); + this.modules.Add(@"ResourceManager\AzureResourceManager\AzureResourceManager.psd1"); + } + else if (mode == AzureModule.AzureServiceManagement) + { + this.modules.Add(@"ServiceManagement\Azure\Azure.psd1"); + } + else if (mode == AzureModule.AzureResourceManager) + { + this.modules.Add(@"ResourceManager\AzureResourceManager\AzureResourceManager.psd1"); + } + else + { + throw new ArgumentException("Unknown command type for testing"); + } + this.modules.Add("Assert.ps1"); + this.modules.Add("Common.ps1"); + this.modules.AddRange(modules); + } + + public virtual Collection RunPowerShellTest(params string[] scripts) + { + using (var powershell = System.Management.Automation.PowerShell.Create()) + { + SetupPowerShellModules(powershell); + + Collection output = null; + for (int i = 0; i < scripts.Length; ++i) + { + Console.WriteLine(scripts[i]); + powershell.AddScript(scripts[i]); + } + try + { + output = powershell.Invoke(); + + if (powershell.Streams.Error.Count > 0) + { + throw new RuntimeException( + "Test failed due to a non-empty error stream, check the error stream in the test log for more details."); + } + + return output; + } + catch (Exception psException) + { + powershell.LogPowerShellException(psException); + throw; + } + finally + { + powershell.LogPowerShellResults(output); + } + } + } + + private void SetupPowerShellModules(System.Management.Automation.PowerShell powershell) + { + powershell.AddScript(string.Format("cd \"{0}\"", Environment.CurrentDirectory)); + + foreach (string moduleName in modules) + { + powershell.AddScript(string.Format("Import-Module \".\\{0}\"", moduleName)); + } + + powershell.AddScript("$VerbosePreference='Continue'"); + powershell.AddScript("$DebugPreference='Continue'"); + powershell.AddScript("$ErrorActionPreference='Stop'"); + powershell.AddScript("Write-Debug \"AZURE_TEST_MODE = $env:AZURE_TEST_MODE\""); + powershell.AddScript("Write-Debug \"TEST_HTTPMOCK_OUTPUT = $env:TEST_HTTPMOCK_OUTPUT\""); + } + } +} diff --git a/src/Common/Commands.ScenarioTests.Common/MSSharedLibKey.snk b/src/Common/Commands.ScenarioTests.Common/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/Common/Commands.ScenarioTests.Common/MSSharedLibKey.snk differ diff --git a/src/Common/Commands.ScenarioTests.Common/PowerShellExtensions.cs b/src/Common/Commands.ScenarioTests.Common/PowerShellExtensions.cs new file mode 100644 index 000000000000..a27b604985da --- /dev/null +++ b/src/Common/Commands.ScenarioTests.Common/PowerShellExtensions.cs @@ -0,0 +1,216 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Management.Automation; +using System.Management.Automation.Runspaces; + +namespace Microsoft.WindowsAzure.Commands.ScenarioTest +{ + public static class PowerShellExtensions + { + public static string PowerShellEnvironmentFormat = "Set-Item env:{0} \"{1}\""; + public static string PowerShellVariableFormat = "${0}={1}"; + public static string CredentialImportFormat = "Import-AzurePublishSettingsFile '{0}'"; + + /// + /// Gets a powershell varibale from the current session and convernts it back to it's original type. + /// + /// The powershell object original type + /// The PowerShell instance + /// The variable name + /// The variable object + public static T GetPowerShellVariable(this System.Management.Automation.PowerShell powershell, string name) + { + object obj = powershell.Runspace.SessionStateProxy.GetVariable(name); + + if (obj is PSObject) + { + return (T)(obj as PSObject).BaseObject; + } + else + { + return (T)obj; + } + } + + /// + /// Gets a powershell enumerable collection from the current session and convernts it back to it's original type. + /// + /// The powershell object original type + /// The PowerShell instance + /// The variable name + /// The collection in list + public static List GetPowerShellCollection(this System.Management.Automation.PowerShell powershell, string name) + { + List result = new List(); + + try + { + object[] objects = (object[])powershell.Runspace.SessionStateProxy.GetVariable(name); + + foreach (object item in objects) + { + if (item is PSObject) + { + result.Add((T)(item as PSObject).BaseObject); + } + else + { + result.Add((T)item); + } + } + } + catch (Exception) { /* Do nothing */ } + + return result; + } + + /// + /// Sets a new PSVariable to the current scope. + /// + /// The PowerShell instance + /// The variable name + /// The variable value + public static void SetVariable(this System.Management.Automation.PowerShell powershell, string name, object value) + { + powershell.Runspace.SessionStateProxy.SetVariable(name, value); + } + + /// + /// Logs a PowerShell exception thrown from PowerShell.Invoke, parsing the inner + /// PowerShell error record if available + /// + /// The exception to parse + public static void LogPowerShellException(this System.Management.Automation.PowerShell powershell, Exception runtimeException) + { + Console.WriteLine("Caught Exception: {0}\n", runtimeException); + Console.WriteLine("Message: {0}\n", runtimeException.Message); + IContainsErrorRecord recordContainer = runtimeException as IContainsErrorRecord; + if (recordContainer != null) + { + ErrorRecord record = recordContainer.ErrorRecord; + Console.WriteLine("PowerShell Error Record: {0}\nException:{1}\nDetails:{2}\nScript Stack Trace: {3}\n: Target: {4}\n", record, record.Exception, record.ErrorDetails, record.ScriptStackTrace, record.TargetObject); + } + + if (runtimeException.InnerException != null) + { + powershell.LogPowerShellException(runtimeException.InnerException); + } + } + + /// + /// Log the PowerShell Streams from a PowerShell invocation + /// + /// The PowerShell instance to log + public static void LogPowerShellResults(this System.Management.Automation.PowerShell powershell) + { + powershell.LogPowerShellResults(null); + } + + /// + /// Log the PowerShell Streams from a PowerShell invocation + /// + /// The PowerShell instance to log + public static void LogPowerShellResults(this System.Management.Automation.PowerShell powershell, Collection output) + { + if (output != null) + { + LogPowerShellStream(output, "OUTPUT"); + } + if (powershell.Commands != null && powershell.Commands.Commands != null && + powershell.Commands.Commands.Count > 0) + { + Console.WriteLine("================== COMMANDS =======================\n"); + foreach (Command command in powershell.Commands.Commands) + { + Console.WriteLine("{0}\n", command.CommandText); + } + + Console.WriteLine("===================================================\n"); + } + + LogPowerShellStream(powershell.Streams.Debug, "DEBUG"); + LogPowerShellStream(powershell.Streams.Error, "ERROR"); + LogPowerShellStream(powershell.Streams.Progress, "PROGRESS"); + LogPowerShellStream(powershell.Streams.Verbose, "VERBOSE"); + LogPowerShellStream(powershell.Streams.Warning, "WARNING"); + } + + /// + /// Add an environment variable to the PowerShell instance + /// + /// The powershell instance to alter + /// The variable name + /// The variable value + public static void AddEnvironmentVariable(this System.Management.Automation.PowerShell powerShell, string variableKey, string variableValue) + { + powerShell.AddScript(string.Format(PowerShellEnvironmentFormat, variableKey, variableValue)); + } + + /// + /// Add an environment variable to the PowerShell instance + /// + /// The powershell instance to alter + /// The variable name + /// The variable value + public static void AddPowerShellVariable(this System.Management.Automation.PowerShell powerShell, string variableKey, string variableValue) + { + powerShell.AddScript(string.Format(PowerShellVariableFormat, variableKey, variableValue)); + } + /// + /// Import credentials into PowerShell + /// + /// The PowerShell instance to alter + /// The fully qualified path top the credentials + public static void ImportCredentials(this System.Management.Automation.PowerShell powerShell, string credentialPath) + { + powerShell.AddScript(string.Format(CredentialImportFormat, credentialPath)); + } + + /// + /// Remove all credentials for the current user + /// + /// The PowerShell instance to use for removing credentials + public static void RemoveCredentials(this System.Management.Automation.PowerShell powerShell) + { + powerShell.AddScript("try {$sub = Get-AzureSubscription | Remove-AzureSubscription -Force} catch {}"); + } + + /// + /// Log a single PowerShell stream, using the given name + /// + /// The type of the internal data record (different for every stream) + /// The stream to log + /// The name of the stream to print in the log + private static void LogPowerShellStream(ICollection stream, string name) + { + if (stream != null && stream.Count > 0) + { + + Console.WriteLine("---------------------------------------------------------------\n"); + Console.WriteLine("{0} STREAM\n", name); + Console.WriteLine("---------------------------------------------------------------\n"); + foreach (T item in stream) + { + Console.WriteLine("{0}\n", item.ToString()); + } + Console.WriteLine("---------------------------------------------------------------\n"); + Console.WriteLine(""); + } + } + } +} diff --git a/src/Common/Commands.ScenarioTests.Common/Properties/AssemblyInfo.cs b/src/Common/Commands.ScenarioTests.Common/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..eeda9de2a6f0 --- /dev/null +++ b/src/Common/Commands.ScenarioTests.Common/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Commands.ScenarioTests.Common")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Commands.ScenarioTests.Common")] +[assembly: AssemblyCopyright("Copyright © 2014")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("5c9118cb-fc2d-4e5b-9770-2bdbc73241b6")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/Common/Commands.ScenarioTests.Common/packages.config b/src/Common/Commands.ScenarioTests.Common/packages.config new file mode 100644 index 000000000000..eb18caf5fa1e --- /dev/null +++ b/src/Common/Commands.ScenarioTests.Common/packages.config @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Local.testsettings b/src/Local.testsettings new file mode 100644 index 000000000000..9a47a8448f48 --- /dev/null +++ b/src/Local.testsettings @@ -0,0 +1,39 @@ + + + These are default test settings for a local test run. + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/src/Local.x64.testsettings b/src/Local.x64.testsettings new file mode 100644 index 000000000000..23d9aa57b88e --- /dev/null +++ b/src/Local.x64.testsettings @@ -0,0 +1,43 @@ + + + These are default test settings for a local test run under x64 architecture. + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager.sln b/src/ResourceManager.sln new file mode 100644 index 000000000000..2d9218889c15 --- /dev/null +++ b/src/ResourceManager.sln @@ -0,0 +1,109 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.30501.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8531411A-0137-4E27-9C5E-49E07C245048}" + ProjectSection(SolutionItems) = preProject + local.runsettings = local.runsettings + Local.testsettings = Local.testsettings + UnitTest.testsettings = UnitTest.testsettings + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common.Storage", "Common\Commands.Common.Storage\Commands.Common.Storage.csproj", "{65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common.Test", "Common\Commands.Common.Test\Commands.Common.Test.csproj", "{3B48A77B-5956-4A62-9081-92BA04B02B27}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{95C16AED-FD57-42A0-86C3-2CF4300A4817}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Resources", "ResourceManager\Resources\Commands.Resources\Commands.Resources.csproj", "{E1F5201D-6067-430E-B303-4E367652991B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Resources.Test", "ResourceManager\Resources\Commands.Resources.Test\Commands.Resources.Test.csproj", "{4C2FE49A-09E1-4979-AD46-CD64FD04C8F7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Profile", "Common\Commands.Profile\Commands.Profile.csproj", "{C60342B1-47D3-4A0E-8081-9B97CE60B7AF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Tags", "ResourceManager\Tags\Commands.Tags\Commands.Tags.csproj", "{2493A8F7-1949-4F29-8D53-9D459046C3B8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ScenarioTests.Common", "Common\Commands.ScenarioTests.Common\Commands.ScenarioTests.Common.csproj", "{C1BDA476-A5CC-4394-914D-48B0EC31A710}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Sql", "ResourceManager\Sql\Commands.Sql\Commands.Sql.csproj", "{69ED499E-6F3C-488F-86B8-B74CFDA4D47E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.DataFactories", "ResourceManager\DataFactories\Commands.DataFactories\Commands.DataFactories.csproj", "{9577252E-0A6B-4D61-86E8-95F7F309A987}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.DataFactories.Test", "ResourceManager\DataFactories\Commands.DataFactories.Test\Commands.DataFactories.Test.csproj", "{D4EDAD6F-6A1D-4295-9A88-CD3F69EAD42B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.RedisCache", "ResourceManager\RedisCache\Commands.RedisCache\Commands.RedisCache.csproj", "{C972E3EF-4461-4758-BA31-93E0947B1253}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.RedisCache.Test", "ResourceManager\RedisCache\Commands.RedisCache.Test\Commands.RedisCache.Test.csproj", "{4AE5705F-62CF-461D-B72E-DD9DCD9B3609}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5EE72C53-1720-4309-B54B-5FB79703195F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Release|Any CPU.Build.0 = Release|Any CPU + {65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}.Release|Any CPU.Build.0 = Release|Any CPU + {3B48A77B-5956-4A62-9081-92BA04B02B27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3B48A77B-5956-4A62-9081-92BA04B02B27}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3B48A77B-5956-4A62-9081-92BA04B02B27}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3B48A77B-5956-4A62-9081-92BA04B02B27}.Release|Any CPU.Build.0 = Release|Any CPU + {E1F5201D-6067-430E-B303-4E367652991B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E1F5201D-6067-430E-B303-4E367652991B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E1F5201D-6067-430E-B303-4E367652991B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E1F5201D-6067-430E-B303-4E367652991B}.Release|Any CPU.Build.0 = Release|Any CPU + {4C2FE49A-09E1-4979-AD46-CD64FD04C8F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4C2FE49A-09E1-4979-AD46-CD64FD04C8F7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4C2FE49A-09E1-4979-AD46-CD64FD04C8F7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4C2FE49A-09E1-4979-AD46-CD64FD04C8F7}.Release|Any CPU.Build.0 = Release|Any CPU + {C60342B1-47D3-4A0E-8081-9B97CE60B7AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C60342B1-47D3-4A0E-8081-9B97CE60B7AF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C60342B1-47D3-4A0E-8081-9B97CE60B7AF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C60342B1-47D3-4A0E-8081-9B97CE60B7AF}.Release|Any CPU.Build.0 = Release|Any CPU + {2493A8F7-1949-4F29-8D53-9D459046C3B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2493A8F7-1949-4F29-8D53-9D459046C3B8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2493A8F7-1949-4F29-8D53-9D459046C3B8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2493A8F7-1949-4F29-8D53-9D459046C3B8}.Release|Any CPU.Build.0 = Release|Any CPU + {C1BDA476-A5CC-4394-914D-48B0EC31A710}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C1BDA476-A5CC-4394-914D-48B0EC31A710}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C1BDA476-A5CC-4394-914D-48B0EC31A710}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C1BDA476-A5CC-4394-914D-48B0EC31A710}.Release|Any CPU.Build.0 = Release|Any CPU + {69ED499E-6F3C-488F-86B8-B74CFDA4D47E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {69ED499E-6F3C-488F-86B8-B74CFDA4D47E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {69ED499E-6F3C-488F-86B8-B74CFDA4D47E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {69ED499E-6F3C-488F-86B8-B74CFDA4D47E}.Release|Any CPU.Build.0 = Release|Any CPU + {9577252E-0A6B-4D61-86E8-95F7F309A987}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9577252E-0A6B-4D61-86E8-95F7F309A987}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9577252E-0A6B-4D61-86E8-95F7F309A987}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9577252E-0A6B-4D61-86E8-95F7F309A987}.Release|Any CPU.Build.0 = Release|Any CPU + {D4EDAD6F-6A1D-4295-9A88-CD3F69EAD42B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D4EDAD6F-6A1D-4295-9A88-CD3F69EAD42B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D4EDAD6F-6A1D-4295-9A88-CD3F69EAD42B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D4EDAD6F-6A1D-4295-9A88-CD3F69EAD42B}.Release|Any CPU.Build.0 = Release|Any CPU + {C972E3EF-4461-4758-BA31-93E0947B1253}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C972E3EF-4461-4758-BA31-93E0947B1253}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C972E3EF-4461-4758-BA31-93E0947B1253}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C972E3EF-4461-4758-BA31-93E0947B1253}.Release|Any CPU.Build.0 = Release|Any CPU + {4AE5705F-62CF-461D-B72E-DD9DCD9B3609}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4AE5705F-62CF-461D-B72E-DD9DCD9B3609}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4AE5705F-62CF-461D-B72E-DD9DCD9B3609}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4AE5705F-62CF-461D-B72E-DD9DCD9B3609}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {3B48A77B-5956-4A62-9081-92BA04B02B27} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {4C2FE49A-09E1-4979-AD46-CD64FD04C8F7} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {C1BDA476-A5CC-4394-914D-48B0EC31A710} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {D4EDAD6F-6A1D-4295-9A88-CD3F69EAD42B} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {4AE5705F-62CF-461D-B72E-DD9DCD9B3609} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + EndGlobalSection +EndGlobal diff --git a/src/ResourceManager/Batch/Commands.Batch.Test/Accounts/GetBatchAccountCommandTests.cs b/src/ResourceManager/Batch/Commands.Batch.Test/Accounts/GetBatchAccountCommandTests.cs new file mode 100644 index 000000000000..bb477cdcd0cd --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch.Test/Accounts/GetBatchAccountCommandTests.cs @@ -0,0 +1,85 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Management.Batch.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using System.Collections.Generic; +using System.Management.Automation; +using Xunit; + +namespace Microsoft.Azure.Commands.Batch.Test.Accounts +{ + public class GetBatchAccountCommandTests + { + private GetBatchAccountCommand cmdlet; + private Mock batchClientMock; + private Mock commandRuntimeMock; + + public GetBatchAccountCommandTests() + { + batchClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new GetBatchAccountCommand() + { + CommandRuntime = commandRuntimeMock.Object, + BatchClient = batchClientMock.Object + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void ListBatchAccountsTest() + { + List pipelineOutput = new List(); + + string accountName01 = "account01"; + string resourceGroup = "resourceGroup"; + AccountResource accountResource01 = BatchTestHelpers.CreateAccountResource(accountName01, resourceGroup); + string accountName02 = "account02"; + AccountResource accountResource02 = BatchTestHelpers.CreateAccountResource(accountName02, resourceGroup); + BatchAccountContext expected01 = BatchAccountContext.ConvertAccountResourceToNewAccountContext(accountResource01); + BatchAccountContext expected02 = BatchAccountContext.ConvertAccountResourceToNewAccountContext(accountResource02); + + batchClientMock.Setup(b => b.ListAccounts(resourceGroup, null)).Returns(new List() { expected01, expected02 }); + + cmdlet.AccountName = null; + cmdlet.ResourceGroupName = resourceGroup; + cmdlet.Tag = null; + + cmdlet.ExecuteCmdlet(); + + commandRuntimeMock.Verify(r => r.WriteObject(expected01), Times.Once()); + commandRuntimeMock.Verify(r => r.WriteObject(expected02), Times.Once()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void GetBatchAccountTest() + { + string accountName = "account01"; + string resourceGroup = "resourceGroup"; + AccountResource accountResource = BatchTestHelpers.CreateAccountResource(accountName, resourceGroup); + BatchAccountContext expected = BatchAccountContext.ConvertAccountResourceToNewAccountContext(accountResource); + batchClientMock.Setup(b => b.GetAccount(resourceGroup, accountName)).Returns(expected); + + cmdlet.AccountName = accountName; + cmdlet.ResourceGroupName = resourceGroup; + + cmdlet.ExecuteCmdlet(); + + commandRuntimeMock.Verify(r => r.WriteObject(expected), Times.Once()); + } + } +} diff --git a/src/ResourceManager/Batch/Commands.Batch.Test/Accounts/GetBatchAccountKeysCommandTests.cs b/src/ResourceManager/Batch/Commands.Batch.Test/Accounts/GetBatchAccountKeysCommandTests.cs new file mode 100644 index 000000000000..8aa149ab7dd0 --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch.Test/Accounts/GetBatchAccountKeysCommandTests.cs @@ -0,0 +1,65 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Management.Batch.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using System.Collections.Generic; +using System.Management.Automation; +using Xunit; + +namespace Microsoft.Azure.Commands.Batch.Test.Accounts +{ + public class GetBatchAccountKeysCommandTests + { + private GetBatchAccountKeysCommand cmdlet; + private Mock batchClientMock; + private Mock commandRuntimeMock; + + public GetBatchAccountKeysCommandTests() + { + batchClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new GetBatchAccountKeysCommand() + { + CommandRuntime = commandRuntimeMock.Object, + BatchClient = batchClientMock.Object + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void GetBatchAccountKeysTest() + { + string primaryKey = "pKey"; + string secondaryKey = "sKey"; + + string accountName = "account01"; + string resourceGroup = "resourceGroup"; + AccountResource accountResource = BatchTestHelpers.CreateAccountResource(accountName, resourceGroup); + BatchAccountContext expected = BatchAccountContext.ConvertAccountResourceToNewAccountContext(accountResource); + expected.PrimaryAccountKey = primaryKey; + expected.SecondaryAccountKey = secondaryKey; + + batchClientMock.Setup(b => b.ListKeys(resourceGroup, accountName)).Returns(expected); + + cmdlet.AccountName = accountName; + cmdlet.ResourceGroupName = resourceGroup; + + cmdlet.ExecuteCmdlet(); + + commandRuntimeMock.Verify(r => r.WriteObject(expected), Times.Once()); + } + } +} diff --git a/src/ResourceManager/Batch/Commands.Batch.Test/Accounts/NewBatchAccountCommandTests.cs b/src/ResourceManager/Batch/Commands.Batch.Test/Accounts/NewBatchAccountCommandTests.cs new file mode 100644 index 000000000000..0d53433eccb9 --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch.Test/Accounts/NewBatchAccountCommandTests.cs @@ -0,0 +1,63 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Management.Batch.Models; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using System.Collections.Generic; +using System.Management.Automation; +using Xunit; + +namespace Microsoft.Azure.Commands.Batch.Test.Accounts +{ + public class NewBatchAccountCommandTests + { + private NewBatchAccountCommand cmdlet; + private Mock batchClientMock; + private Mock commandRuntimeMock; + + public NewBatchAccountCommandTests() + { + batchClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new NewBatchAccountCommand() + { + CommandRuntime = commandRuntimeMock.Object, + BatchClient = batchClientMock.Object + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void NewBatchAccountTest() + { + string accountName = "account01"; + string resourceGroup = "resourceGroup"; + string location = "location"; + AccountResource accountResource = BatchTestHelpers.CreateAccountResource(accountName, resourceGroup); + BatchAccountContext expected = BatchAccountContext.ConvertAccountResourceToNewAccountContext(accountResource); + + batchClientMock.Setup(b => b.CreateAccount(resourceGroup, accountName, location, null)).Returns(expected); + + cmdlet.AccountName = accountName; + cmdlet.ResourceGroupName = resourceGroup; + cmdlet.Location = location; + + cmdlet.ExecuteCmdlet(); + + commandRuntimeMock.Verify(r => r.WriteObject(expected), Times.Once()); + } + } +} diff --git a/src/ResourceManager/Batch/Commands.Batch.Test/Accounts/RegenBatchAccountKeyCommandTests.cs b/src/ResourceManager/Batch/Commands.Batch.Test/Accounts/RegenBatchAccountKeyCommandTests.cs new file mode 100644 index 000000000000..1f827ea59cdb --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch.Test/Accounts/RegenBatchAccountKeyCommandTests.cs @@ -0,0 +1,66 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Management.Batch.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using System.Collections.Generic; +using System.Management.Automation; +using Xunit; + +namespace Microsoft.Azure.Commands.Batch.Test.Accounts +{ + public class RegenBatchAccountKeyCommandTests + { + private RegenBatchAccountKeyCommand cmdlet; + private Mock batchClientMock; + private Mock commandRuntimeMock; + + public RegenBatchAccountKeyCommandTests() + { + batchClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new RegenBatchAccountKeyCommand() + { + CommandRuntime = commandRuntimeMock.Object, + BatchClient = batchClientMock.Object + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void RegenBatchAccountKeysTest() + { + string newPrimaryKey = "newPrimaryKey"; + string newSecondaryKey = "newSecondaryKey"; + + string accountName = "account01"; + string resourceGroup = "resourceGroup"; + AccountKeyType keyType = AccountKeyType.Primary; + AccountResource accountResource = BatchTestHelpers.CreateAccountResource(accountName, resourceGroup); + BatchAccountContext expected = BatchAccountContext.ConvertAccountResourceToNewAccountContext(accountResource); + expected.PrimaryAccountKey = newPrimaryKey; + expected.SecondaryAccountKey = newSecondaryKey; + + batchClientMock.Setup(b => b.RegenerateKeys(resourceGroup, accountName, keyType)).Returns(expected); + + cmdlet.AccountName = accountName; + cmdlet.ResourceGroupName = resourceGroup; + cmdlet.KeyType = keyType.ToString(); + cmdlet.ExecuteCmdlet(); + + commandRuntimeMock.Verify(r => r.WriteObject(expected), Times.Once()); + } + } +} diff --git a/src/ResourceManager/Batch/Commands.Batch.Test/Accounts/RemoveBatchAccountCommandTests.cs b/src/ResourceManager/Batch/Commands.Batch.Test/Accounts/RemoveBatchAccountCommandTests.cs new file mode 100644 index 000000000000..85c40610b5d9 --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch.Test/Accounts/RemoveBatchAccountCommandTests.cs @@ -0,0 +1,60 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using System.Management.Automation; +using Xunit; + +namespace Microsoft.Azure.Commands.Batch.Test.Accounts +{ + public class RemoveBatchAccountCommandTests + { + private RemoveBatchAccountCommand cmdlet; + private Mock batchClientMock; + private Mock commandRuntimeMock; + + public RemoveBatchAccountCommandTests() + { + batchClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new RemoveBatchAccountCommand() + { + CommandRuntime = commandRuntimeMock.Object, + BatchClient = batchClientMock.Object + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void RemoveBatchAccountTest() + { + string accountName = "account01"; + string resourceGroup = "resourceGroup"; + + OperationResponse deleteResponse = new OperationResponse(); + batchClientMock.Setup(b => b.DeleteAccount(resourceGroup, accountName)).Returns(deleteResponse); + + cmdlet.AccountName = accountName; + cmdlet.ResourceGroupName = resourceGroup; + + cmdlet.Force = true; + commandRuntimeMock.Setup(f => f.ShouldProcess(It.IsAny(), It.IsAny())).Returns(true); + cmdlet.ExecuteCmdlet(); + + batchClientMock.Verify(b => b.DeleteAccount(resourceGroup, accountName), Times.Once()); + } + } +} diff --git a/src/ResourceManager/Batch/Commands.Batch.Test/Accounts/SetBatchAccountCommandTests.cs b/src/ResourceManager/Batch/Commands.Batch.Test/Accounts/SetBatchAccountCommandTests.cs new file mode 100644 index 000000000000..f4895d51d87f --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch.Test/Accounts/SetBatchAccountCommandTests.cs @@ -0,0 +1,71 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Management.Batch.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using System.Collections; +using System.Collections.Generic; +using System.Management.Automation; +using Xunit; + +namespace Microsoft.Azure.Commands.Batch.Test.Accounts +{ + public class SetBatchAccountCommandTests + { + private SetBatchAccountCommand cmdlet; + private Mock batchClientMock; + private Mock commandRuntimeMock; + + public SetBatchAccountCommandTests() + { + batchClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new SetBatchAccountCommand() + { + CommandRuntime = commandRuntimeMock.Object, + BatchClient = batchClientMock.Object + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void UpdateAccountTest() + { + string accountName = "account01"; + string resourceGroup = "resourceGroup"; + Hashtable[] tags = new[] + { + new Hashtable + { + {"Name", "tagName"}, + {"Value", "tagValue"} + } + }; + AccountResource accountResource = BatchTestHelpers.CreateAccountResource(accountName, resourceGroup, tags); + BatchAccountContext expected = BatchAccountContext.ConvertAccountResourceToNewAccountContext(accountResource); + + batchClientMock.Setup(b => b.UpdateAccount(resourceGroup, accountName, tags)).Returns(expected); + + cmdlet.AccountName = accountName; + cmdlet.ResourceGroupName = resourceGroup; + cmdlet.Tag = tags; + + cmdlet.ExecuteCmdlet(); + + commandRuntimeMock.Verify(r => r.WriteObject(expected), Times.Once()); + } + + } +} diff --git a/src/ResourceManager/Batch/Commands.Batch.Test/BatchTestHelpers.cs b/src/ResourceManager/Batch/Commands.Batch.Test/BatchTestHelpers.cs new file mode 100644 index 000000000000..8bf7040956d3 --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch.Test/BatchTestHelpers.cs @@ -0,0 +1,71 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Management.Batch.Models; +using System.Collections; +using System.Collections.Generic; +using Xunit; + +namespace Microsoft.Azure.Commands.Batch.Test +{ + public static class BatchTestHelpers + { + public static AccountResource CreateAccountResource(string accountName, string resourceGroupName, Hashtable[] tags = null) + { + string tenantUrlEnding = "batch-test.windows-int.net"; + string endpoint = string.Format("{0}.{1}", accountName, tenantUrlEnding); + string subscription = "00000000-0000-0000-0000-000000000000"; + string resourceGroup = resourceGroupName; + + AccountResource resource = new AccountResource() + { + Id = string.Format("id/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.Batch/batchAccounts/abc", subscription, resourceGroup), + Location = "location", + Properties = new AccountProperties() { AccountEndpoint = endpoint, ProvisioningState = AccountProvisioningState.Succeeded }, + Type = "type" + }; + if (tags != null) + { + resource.Tags = Microsoft.Azure.Commands.Batch.Helpers.CreateTagDictionary(tags, true); + } + return resource; + } + + public static void AssertBatchAccountContextsAreEqual(BatchAccountContext context1, BatchAccountContext context2) + { + if (context1 == null) + { + Assert.Null(context2); + return; + } + if (context2 == null) + { + Assert.Null(context1); + return; + } + + Assert.Equal(context1.AccountEndpoint, context2.AccountEndpoint); + Assert.Equal(context1.AccountName, context2.AccountName); + Assert.Equal(context1.Id, context2.Id); + Assert.Equal(context1.Location, context2.Location); + Assert.Equal(context1.PrimaryAccountKey, context2.PrimaryAccountKey); + Assert.Equal(context1.ResourceGroupName, context2.ResourceGroupName); + Assert.Equal(context1.SecondaryAccountKey, context2.SecondaryAccountKey); + Assert.Equal(context1.State, context2.State); + Assert.Equal(context1.Subscription, context2.Subscription); + Assert.Equal(context1.TagsTable, context2.TagsTable); + Assert.Equal(context1.TaskTenantUrl, context2.TaskTenantUrl); + } + } +} diff --git a/src/ResourceManager/Batch/Commands.Batch.Test/Commands.Batch.Test.csproj b/src/ResourceManager/Batch/Commands.Batch.Test/Commands.Batch.Test.csproj new file mode 100644 index 000000000000..28c499116e1f --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch.Test/Commands.Batch.Test.csproj @@ -0,0 +1,202 @@ + + + + + Debug + AnyCPU + {F4ABAD68-64A5-4B23-B09C-42559A7524DE} + Library + Properties + Microsoft.Azure.Commands.Batch.Test + Microsoft.Azure.Commands.Batch.Test + v4.5 + 512 + ..\ + true + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + true + MSSharedLibKey.snk + true + pdbonly + true + bin\Release\ + TRACE;SIGN + prompt + 4 + false + + + + ..\..\..\packages\Microsoft.Azure.Gallery.2.2.0-preview\lib\net40\Microsoft.Azure.Gallery.dll + + + False + ..\..\..\packages\Microsoft.Azure.Management.Authorization.0.11.0-preview\lib\net40\Microsoft.Azure.Management.Authorization.dll + + + ..\..\..\packages\Microsoft.Azure.Management.Batch.1.1.2-preview\lib\net40\Microsoft.Azure.Management.Batch.dll + + + False + ..\..\..\packages\Microsoft.Azure.Monitoring.2.2.0-preview\lib\net40\Microsoft.Azure.Monitoring.dll + + + False + ..\..\..\packages\Microsoft.Azure.Management.Resources.2.6.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll + + + False + ..\..\..\packages\Hydra.HttpRecorder.1.0.5417.13285-prerelease\lib\net45\Microsoft.Azure.Utilities.HttpRecorder.dll + + + False + ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll + + + False + ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll + + + False + ..\..\..\packages\Hydra.SpecTestSupport.1.0.5417.13285-prerelease\lib\net45\Microsoft.WindowsAzure.Testing.dll + + + ..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll + + + + + + False + D:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Management.Automation\v4.0_3.0.0.0__31bf3856ad364e35\System.Management.Automation.dll + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + False + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + + + + + + + + + + + + + + + + + + + Designer + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + {3b48a77b-5956-4a62-9081-92ba04b02b27} + Commands.Common.Test + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + {c1bda476-a5cc-4394-914d-48b0ec31a710} + Commands.ScenarioTests.Common + + + {d470e50a-9607-48d6-a924-4f9f86502704} + Commands.Batch + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + + xcopy "$(SolutionDir)Package\$(ConfigurationName)\*.*" $(TargetDir) /Y /E + + + \ No newline at end of file diff --git a/src/ResourceManager/Batch/Commands.Batch.Test/MSSharedLibKey.snk b/src/ResourceManager/Batch/Commands.Batch.Test/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ResourceManager/Batch/Commands.Batch.Test/MSSharedLibKey.snk differ diff --git a/src/ResourceManager/Batch/Commands.Batch.Test/Models/BatchAccountContextTest.cs b/src/ResourceManager/Batch/Commands.Batch.Test/Models/BatchAccountContextTest.cs new file mode 100644 index 000000000000..149e9ffaacac --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch.Test/Models/BatchAccountContextTest.cs @@ -0,0 +1,64 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Batch; +using Microsoft.Azure.Management.Batch.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using System; +using Xunit; + +namespace Microsoft.Azure.Commands.BatchManager.Test +{ + public class BatchAccountContextTest + { + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void BatchAccountContextConstructorTest() + { + string endpoint = new UriBuilder(Uri.UriSchemeHttps, "account.batch-test.windows-int.net").Uri.AbsoluteUri.ToString(); + var acctContext = new BatchAccountContext(endpoint); + + Assert.Equal(endpoint, acctContext.AccountEndpoint); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void BatchAccountContextFromResourceTest() + { + string account = "account"; + string tenantUrlEnding = "batch-test.windows-int.net"; + string endpoint = string.Format("{0}.{1}", account, tenantUrlEnding); + string subscription = "00000000-0000-0000-0000-000000000000"; + string resourceGroup = "resourceGroup"; + + AccountResource resource = new AccountResource() + { + Id = string.Format("id/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.Batch/batchAccounts/abc", subscription, resourceGroup), + Location = "location", + Properties = new AccountProperties() { AccountEndpoint = endpoint, ProvisioningState = AccountProvisioningState.Succeeded }, + Type = "type" + }; + BatchAccountContext context = BatchAccountContext.ConvertAccountResourceToNewAccountContext(resource); + + Assert.Equal(context.Id, resource.Id); + Assert.Equal(context.AccountEndpoint, resource.Properties.AccountEndpoint); + Assert.Equal(context.Location, resource.Location); + Assert.Equal(context.State, resource.Properties.ProvisioningState.ToString()); + Assert.Equal(context.AccountName, account); + Assert.Equal(context.TaskTenantUrl, string.Format("https://{0}", tenantUrlEnding)); + Assert.Equal(context.Subscription, subscription); + Assert.Equal(context.ResourceGroupName, resourceGroup); + } + } +} diff --git a/src/ResourceManager/Batch/Commands.Batch.Test/Properties/AssemblyInfo.cs b/src/ResourceManager/Batch/Commands.Batch.Test/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..245fb590e01b --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch.Test/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Commands.Batch.Test")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Commands.Batch.Test")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2014")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("e599e021-9541-4c3b-9f5b-b1cd382b5b44")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/ResourceManager/Batch/Commands.Batch.Test/ScenarioTests/BatchAccountTests.cs b/src/ResourceManager/Batch/Commands.Batch.Test/ScenarioTests/BatchAccountTests.cs new file mode 100644 index 000000000000..4f1c81bce9a1 --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch.Test/ScenarioTests/BatchAccountTests.cs @@ -0,0 +1,71 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Xunit; + +namespace Microsoft.Azure.Commands.Batch.Test.ScenarioTests +{ + public class BatchAccountTests + { + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetNonExistingBatchAccount() + { + BatchController.NewInstance.RunPsTest("Test-GetNonExistingBatchAccount"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestCreatesNewBatchAccount() + { + BatchController.NewInstance.RunPsTest("Test-CreatesNewBatchAccount"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestCreateExistingBatchAccount() + { + BatchController.NewInstance.RunPsTest("Test-CreateExistingBatchAccount"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestUpdatesExistingBatchAccount() + { + BatchController.NewInstance.RunPsTest("Test-UpdatesExistingBatchAccount"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetBatchAccountsUnderResourceGroups() + { + BatchController.NewInstance.RunPsTest("Test-GetBatchAccountsUnderResourceGroups"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestCreateAndRemoveBatchAccountViaPiping() + { + BatchController.NewInstance.RunPsTest("Test-CreateAndRemoveBatchAccountViaPiping"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestBatchAccountKeys() + { + BatchController.NewInstance.RunPsTest("Test-BatchAccountKeys"); + } + } +} diff --git a/src/ResourceManager/Batch/Commands.Batch.Test/ScenarioTests/BatchAccountTests.ps1 b/src/ResourceManager/Batch/Commands.Batch.Test/ScenarioTests/BatchAccountTests.ps1 new file mode 100644 index 000000000000..47188e0ac903 --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch.Test/ScenarioTests/BatchAccountTests.ps1 @@ -0,0 +1,243 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +<# +.SYNOPSIS +Tests querying for a Batch account that does not exist throws +#> +function Test-GetNonExistingBatchAccount +{ + Assert-Throws { Get-AzureBatchAccount -Name "accountthatdoesnotexist" } +} + +<# +.SYNOPSIS +Tests creating new Batch account. +#> +function Test-CreatesNewBatchAccount +{ + # Setup + $account = Get-BatchAccountName + $resourceGroup = Get-ResourceGroupName + $location = Get-BatchAccountProviderLocation + + try + { + New-AzureResourceGroup -Name $resourceGroup -Location $location + + # Test + $actual = New-AzureBatchAccount -Name $account -ResourceGroupName $resourceGroup -Location $location -Tag @{Name = "testtag"; Value = "testval"} + $expected = Get-AzureBatchAccount -Name $account -ResourceGroupName $resourceGroup + + # Assert + Assert-AreEqual $expected.AccountName $actual.AccountName + Assert-AreEqual $expected.ResourceGroupName $actual.ResourceGroupName + Assert-AreEqual $expected.Location $actual.Location + Assert-AreEqual $expected.Tags[0]["Name"] $actual.Tags[0]["Name"] + Assert-AreEqual $expected.Tags[0]["Value"] $actual.Tags[0]["Value"] + } + finally + { + # Cleanup + Clean-BatchAccountAndResourceGroup $account $resourceGroup + } +} + +<# +.SYNOPSIS +Tests creating an account that already exists throws +#> +function Test-CreateExistingBatchAccount +{ + # Setup + $account = Get-BatchAccountName + $resourceGroup = Get-ResourceGroupName + $location = Get-BatchAccountProviderLocation + + try + { + New-AzureResourceGroup -Name $resourceGroup -Location $location + + # Test + New-AzureBatchAccount -Name $account -ResourceGroupName $resourceGroup -Location $location -Tag @{Name = "testtag"; Value = "testval"} + + Assert-Throws { New-AzureBatchAccount -Name $account -ResourceGroupName $resourceGroup -Location $location } + } + finally + { + # Cleanup + Clean-BatchAccountAndResourceGroup $account $resourceGroup + } +} + +<# +.SYNOPSIS +Tests updating existing Batch account +#> +function Test-UpdatesExistingBatchAccount +{ + # Setup + $account = Get-BatchAccountName + $resourceGroup = Get-ResourceGroupName + $location = Get-BatchAccountProviderLocation + + $tagName1 = "testtag1" + $tagValue1 = "testval1" + $tagName2 = "testtag2" + $tagValue2 = "testval2" + + try + { + New-AzureResourceGroup -Name $resourceGroup -Location $location + + #Test + $new = New-AzureBatchAccount -Name $account -ResourceGroupName $resourceGroup -Location $location -Tag @{Name = $tagName1; Value = $tagValue1} + Assert-AreEqual 1 $new.Tags.Count + + # Update Tag + $actual = Set-AzureBatchAccount -Name $account -ResourceGroupName $resourceGroup -Tag @{Name = $tagName2; Value = $tagValue2} + $expected = Get-AzureBatchAccount -Name $account -ResourceGroupName $resourceGroup + + # Assert + Assert-AreEqual $expected.AccountName $actual.AccountName + Assert-AreEqual $expected.ResourceGroupName $actual.ResourceGroupName + Assert-AreEqual $expected.Location $actual.Location + Assert-AreEqual 1 $expected.Tags.Count + Assert-AreEqual $tagName2 $expected.Tags[0]["Name"] + Assert-AreEqual $tagValue2 $expected.Tags[0]["Value"] + Assert-AreEqual $expected.Tags[0]["Name"] $actual.Tags[0]["Name"] + Assert-AreEqual $expected.Tags[0]["Value"] $actual.Tags[0]["Value"] + } + finally + { + # Cleanup + Clean-BatchAccountAndResourceGroup $account $resourceGroup + } +} + +<# +.SYNOPSIS +Tests getting Batch accounts under resource groups +#> +function Test-GetBatchAccountsUnderResourceGroups +{ + # Setup + $resourceGroup1 = Get-ResourceGroupName + $resourceGroup2 = Get-ResourceGroupName + $account11 = Get-BatchAccountName + $account12 = Get-BatchAccountName + $account21 = Get-BatchAccountName + $location = Get-BatchAccountProviderLocation + + try + { + New-AzureResourceGroup -Name $resourceGroup1 -Location $location + New-AzureResourceGroup -Name $resourceGroup2 -Location $location + New-AzureBatchAccount -Name $account11 -ResourceGroupName $resourceGroup1 -Location $location + New-AzureBatchAccount -Name $account12 -ResourceGroupName $resourceGroup1 -Location $location + New-AzureBatchAccount -Name $account21 -ResourceGroupName $resourceGroup2 -Location $location + + # Test + $allAccounts = Get-AzureBatchAccount | Where-Object {$_.ResourceGroupName -eq $resourceGroup1 -or $_.ResourceGroupName -eq $resourceGroup2} + $resourceGroup1Accounts = Get-AzureBatchAccount -ResourceGroupName $resourceGroup1 + + # Assert + Assert-AreEqual 3 $allAccounts.Count + Assert-AreEqual 2 $resourceGroup1Accounts.Count + Assert-AreEqual 2 ($resourceGroup1Accounts | Where-Object {$_.ResourceGroupName -eq $resourceGroup1}).Count + } + finally + { + # Cleanup + Clean-BatchAccount $account11 $resourceGroup1 + Clean-BatchAccountAndResourceGroup $account12 $resourceGroup1 + Clean-BatchAccountAndResourceGroup $account21 $resourceGroup2 + } +} + + +<# +.SYNOPSIS +Tests creating a new Batch account and deleting it via piping. +#> +function Test-CreateAndRemoveBatchAccountViaPiping +{ + # Setup + $account1 = Get-BatchAccountName + $account2 = Get-BatchAccountName + $resourceGroup = Get-ResourceGroupName + $location = Get-BatchAccountProviderLocation + + try + { + New-AzureResourceGroup -Name $resourceGroup -Location $location + + # Test + New-AzureBatchAccount -Name $account1 -ResourceGroupName $resourceGroup -Location $location + New-AzureBatchAccount -Name $account2 -ResourceGroupName $resourceGroup -Location $location + Get-AzureBatchAccount | where {$_.AccountName -eq $account1 -or $_.AccountName -eq $account2} | Remove-AzureBatchAccount -Force + + # Assert + Assert-Throws { Get-AzureBatchAccount -Name $account1 } + Assert-Throws { Get-AzureBatchAccount -Name $account2 } + } + finally + { + Clean-ResourceGroup $resourceGroup + } +} + +<# +.SYNOPSIS +Tests getting/setting Batch account keys +#> +function Test-BatchAccountKeys +{ + # Setup + $account = Get-BatchAccountName + $resourceGroup = Get-ResourceGroupName + $location = Get-BatchAccountProviderLocation + + try + { + New-AzureResourceGroup -Name $resourceGroup -Location $location + + # Test + $new = New-AzureBatchAccount -Name $account -ResourceGroupName $resourceGroup -Location $location -Tag @{Name = "testtag"; Value = "testval"} + $originalKeys = Get-AzureBatchAccountKeys -Name $account -ResourceGroupName $resourceGroup + $originalPrimaryKey = $originalKeys.PrimaryAccountKey + $originalSecondaryKey = $originalKeys.SecondaryAccountKey + $newPrimary = New-AzureBatchAccountKey -Name $account -ResourceGroupName $resourceGroup -KeyType Primary + $newSecondary = New-AzureBatchAccountKey -Name $account -ResourceGroupName $resourceGroup -KeyType Secondary + $finalKeys = Get-AzureBatchAccountKeys -Name $account -ResourceGroupName $resourceGroup + $getAccountResult = Get-AzureBatchAccount -Name $account -ResourceGroupName $resourceGroup + + # Assert + Assert-AreEqual $null $new.PrimaryAccountKey + Assert-AreEqual $null $new.SecondaryAccountKey + Assert-AreEqual $originalSecondaryKey $newPrimary.SecondaryAccountKey + Assert-AreEqual $newPrimary.PrimaryAccountKey $newSecondary.PrimaryAccountKey + Assert-AreEqual $newPrimary.PrimaryAccountKey $finalKeys.PrimaryAccountKey + Assert-AreEqual $newSecondary.SecondaryAccountKey $finalKeys.SecondaryAccountKey + Assert-AreNotEqual $originalPrimaryKey $newPrimary.PrimaryAccountKey + Assert-AreNotEqual $originalSecondaryKey $newSecondary.SecondaryAccountKey + Assert-AreEqual $null $getAccountResult.PrimaryAccountKey + Assert-AreEqual $null $getAccountResult.SecondaryAccountKey + } + finally + { + # Cleanup + Clean-BatchAccountAndResourceGroup $account $resourceGroup + } +} diff --git a/src/ResourceManager/Batch/Commands.Batch.Test/ScenarioTests/BatchController.cs b/src/ResourceManager/Batch/Commands.Batch.Test/ScenarioTests/BatchController.cs new file mode 100644 index 000000000000..6e7703f939da --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch.Test/ScenarioTests/BatchController.cs @@ -0,0 +1,174 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Gallery; +using Microsoft.Azure.Management.Authorization; +using Microsoft.Azure.Management.Batch; +using Microsoft.Azure.Management.Resources; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Monitoring.Events; +using Microsoft.WindowsAzure.Testing; +using System; +using System.Linq; + +namespace Microsoft.Azure.Commands.Batch.Test.ScenarioTests +{ + public class BatchController + { + private const string AADTenant = @"de371010-e80c-4257-8fdc-4bfa4d6efe08"; + + private CSMTestEnvironmentFactory csmTestFactory; + private EnvironmentSetupHelper helper; + + public AuthorizationManagementClient AuthorizationManagementClient { get; private set; } + + public GalleryClient GalleryClient { get; private set; } + + public EventsClient EventsClient { get; private set; } + + public ResourceManagementClient ResourceManagementClient { get; private set; } + + public BatchManagementClient BatchManagementClient { get; private set; } + + public static BatchController NewInstance + { + get + { + return new BatchController(); + } + } + + public BatchController() + { + helper = new EnvironmentSetupHelper(); + } + + public void RunPsTest(params string[] scripts) + { + var callingClassType = TestUtilities.GetCallingClass(2); + var mockName = TestUtilities.GetCurrentMethodName(2); + + RunPsTestWorkflow( + () => scripts, + // no custom initializer + null, + // no custom cleanup + null, + callingClassType, + mockName); + } + + public void RunPsTestWorkflow( + Func scriptBuilder, + Action initialize, + Action cleanup, + string callingClassType, + string mockName) + { + using (UndoContext context = UndoContext.Current) + { + context.Start(callingClassType, mockName); + + this.csmTestFactory = SetupCSMTestEnvironmentFactory(); + + if (initialize != null) + { + initialize(this.csmTestFactory); + } + + SetupManagementClients(); + + helper.SetupEnvironment(AzureModule.AzureResourceManager); + + var callingClassName = callingClassType + .Split(new[] { "." }, StringSplitOptions.RemoveEmptyEntries) + .Last(); + helper.SetupModules( + AzureModule.AzureResourceManager, + "ScenarioTests\\Common.ps1", + "ScenarioTests\\" + callingClassName + ".ps1"); + + try + { + if (scriptBuilder != null) + { + var psScripts = scriptBuilder(); + + if (psScripts != null) + { + helper.RunPowerShellTest(psScripts); + } + } + } + finally + { + if (cleanup != null) + { + cleanup(); + } + } + } + } + + private CSMTestEnvironmentFactory SetupCSMTestEnvironmentFactory() + { + CSMTestEnvironmentFactory factory = new CSMTestEnvironmentFactory(); + // to set test environment to Current add Environment=Current in TEST_CSM_ORGID_AUTHENTICATION env. variable + // available configurations are: Prod/Dogfood/Next/Current + factory.CustomEnvValues[TestEnvironment.AADTenantKey] = AADTenant; + return factory; + } + + private void SetupManagementClients() + { + AuthorizationManagementClient = GetAuthorizationManagementClient(); + GalleryClient = GetGalleryClient(); + EventsClient = GetEventsClient(); + ResourceManagementClient = GetResourceManagementClient(); + BatchManagementClient = GetBatchManagementClient(); + + helper.SetupManagementClients(AuthorizationManagementClient, + GalleryClient, + EventsClient, + ResourceManagementClient, + BatchManagementClient); + } + + private AuthorizationManagementClient GetAuthorizationManagementClient() + { + return TestBase.GetServiceClient(this.csmTestFactory); + } + + private GalleryClient GetGalleryClient() + { + return TestBase.GetServiceClient(this.csmTestFactory); + } + + private EventsClient GetEventsClient() + { + return TestBase.GetServiceClient(this.csmTestFactory); + } + + private ResourceManagementClient GetResourceManagementClient() + { + return TestBase.GetServiceClient(this.csmTestFactory); + } + + private BatchManagementClient GetBatchManagementClient() + { + return TestBase.GetServiceClient(this.csmTestFactory); + } + } +} diff --git a/src/ResourceManager/Batch/Commands.Batch.Test/ScenarioTests/Common.ps1 b/src/ResourceManager/Batch/Commands.Batch.Test/ScenarioTests/Common.ps1 new file mode 100644 index 000000000000..73e2eb12b1f2 --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch.Test/ScenarioTests/Common.ps1 @@ -0,0 +1,82 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +<# +.SYNOPSIS +Gets a Batch account name for testing. +#> +function Get-BatchAccountName +{ + return getAssetName +} + +<# +.SYNOPSIS +Gets a resource group name for testing. +#> +function Get-ResourceGroupName +{ + return getAssetName +} + +<# +.SYNOPSIS +Gets the location for the Batch account provider. Default to West US if none found. +#> +function Get-BatchAccountProviderLocation +{ + $location = Get-AzureLocation | where {$_.Name -eq "Microsoft.Batch/batchAccounts"} + if ($location -eq $null) + { + "West US" + } + else + { + $location.Locations[0] + } +} + +<# +.SYNOPSIS +Cleans the created Batch account and resource group +#> +function Clean-BatchAccountAndResourceGroup($accountName,$resourceGroup) +{ + Clean-BatchAccount $accountName $resourceGroup + Clean-ResourceGroup $resourceGroup +} + +<# +.SYNOPSIS +Cleans the created Batch account +#> +function Clean-BatchAccount($accountName,$resourceGroup) +{ + if ([Microsoft.Azure.Utilities.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Utilities.HttpRecorder.HttpRecorderMode]::Playback) + { + Remove-AzureBatchAccount -Name $accountName -ResourceGroupName $resourceGroup -Force + } +} + +<# +.SYNOPSIS +Cleans the created resource group +#> +function Clean-ResourceGroup($resourceGroup) +{ + if ([Microsoft.Azure.Utilities.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Utilities.HttpRecorder.HttpRecorderMode]::Playback) + { + Remove-AzureResourceGroup -Name $resourceGroup -Force + } +} \ No newline at end of file diff --git a/src/ResourceManager/Batch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestBatchAccountKeys.json b/src/ResourceManager/Batch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestBatchAccountKeys.json new file mode 100644 index 000000000000..3277cd972be5 --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestBatchAccountKeys.json @@ -0,0 +1,1441 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.intelligentsystems\",\r\n \"namespace\": \"microsoft.intelligentsystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "21795" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31949" + ], + "x-ms-request-id": [ + "9466a22d-9953-4d96-ba1d-48e4efbb0f9d" + ], + "x-ms-correlation-request-id": [ + "9466a22d-9953-4d96-ba1d-48e4efbb0f9d" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022252Z:9466a22d-9953-4d96-ba1d-48e4efbb0f9d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:22:52 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk6673?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazY2NzM/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "102" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31948" + ], + "x-ms-request-id": [ + "f342e4ef-03a7-466a-99d4-eb150fa59f27" + ], + "x-ms-correlation-request-id": [ + "f342e4ef-03a7-466a-99d4-eb150fa59f27" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022253Z:f342e4ef-03a7-466a-99d4-eb150fa59f27" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:22:52 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk6673?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazY2NzM/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31938" + ], + "x-ms-request-id": [ + "23e2b0f7-39b5-4138-8956-c01e18767d91" + ], + "x-ms-correlation-request-id": [ + "23e2b0f7-39b5-4138-8956-c01e18767d91" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022300Z:23e2b0f7-39b5-4138-8956-c01e18767d91" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:23:00 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk6673?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazY2NzM/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6673\",\r\n \"name\": \"onesdk6673\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "183" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1178" + ], + "x-ms-request-id": [ + "fd053c3b-5ff1-4300-bb2f-7fbe20609e32" + ], + "x-ms-correlation-request-id": [ + "fd053c3b-5ff1-4300-bb2f-7fbe20609e32" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022253Z:fd053c3b-5ff1-4300-bb2f-7fbe20609e32" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:22:53 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6673/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazY2NzMvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31947" + ], + "x-ms-request-id": [ + "7cece720-8384-4268-a52e-92478a780999" + ], + "x-ms-correlation-request-id": [ + "7cece720-8384-4268-a52e-92478a780999" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022253Z:7cece720-8384-4268-a52e-92478a780999" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:22:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk6673/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazY2NzMvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "centralus:24e63c87-3e4d-4766-9561-a82d77d0fd47" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31893" + ], + "x-ms-correlation-request-id": [ + "c72e23ef-1885-4a37-a4c5-0ae87c195c21" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022254Z:c72e23ef-1885-4a37-a4c5-0ae87c195c21" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:22:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/azbacnhzf2\",\r\n \"name\": \"azbacnhzf2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbaccn0mf1juw5garhbk9q3vxl8d7i\": \"azbacr3u6l8ga5f1w7tjsd0cvqbz4knmhexpio92y\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/aztest1\",\r\n \"name\": \"aztest1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/aztest11\",\r\n \"name\": \"aztest11\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-ne/providers/Microsoft.Batch/batchAccounts/azbacykf2li0g\",\r\n \"name\": \"azbacykf2li0g\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbaczsgmy6p4a1c0il3b\": \"azbac9u1lydm6ebvs740kpgnowx8i52rctjf3qzah\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-we/providers/Microsoft.Batch/batchAccounts/azbac3mtkshf\",\r\n \"name\": \"azbac3mtkshf\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbac1s4853u9twc0yx7ihq2ej6nzdarokpmvlgbf\": \"azbaccg3l82tkpyzjoasn1f4vmq0d7u5he96briwx\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-wus/providers/Microsoft.Batch/batchAccounts/adnanzh1\",\r\n \"name\": \"adnanzh1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"adsdfgasujhd\": \"jdsfsdahgdfjheee\",\r\n \"adsdfgasujssshd\": \"jdsfsdahgdfjheeefgff\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchwestus/providers/Microsoft.Batch/batchAccounts/wenwu1007a1\",\r\n \"name\": \"wenwu1007a1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151135\",\r\n \"name\": \"zfeng9151135\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151138\",\r\n \"name\": \"zfeng9151138\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151141\",\r\n \"name\": \"zfeng9151141\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151157\",\r\n \"name\": \"zfeng9151157\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916114\",\r\n \"name\": \"zfeng916114\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161213\",\r\n \"name\": \"zfeng9161213\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161247\",\r\n \"name\": \"zfeng9161247\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161253\",\r\n \"name\": \"zfeng9161253\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161254\",\r\n \"name\": \"zfeng9161254\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916159\",\r\n \"name\": \"zfeng916159\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916735\",\r\n \"name\": \"zfeng916735\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/adnan\",\r\n \"name\": \"adnan\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/c123\",\r\n \"name\": \"c123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw\",\r\n \"name\": \"clw\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k3\": \"v3\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw1\",\r\n \"name\": \"clw1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw2\",\r\n \"name\": \"clw2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw3\",\r\n \"name\": \"clw3\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k11\": \"v11\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/azbacjnkyz\",\r\n \"name\": \"azbacjnkyz\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"azbac09duay1eb8ph5sloviz3crm4ngq7kjt6wx2f\": \"azbac5zjoxel6pb2yvsqh70dgmcu98t1r43nwkafi\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/clwtest1\",\r\n \"name\": \"clwtest1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/clwtest2\",\r\n \"name\": \"clwtest2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-BatchService-WestUS/providers/Microsoft.Batch/batchAccounts/clw678\",\r\n \"name\": \"clw678\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk9501/providers/Microsoft.Batch/batchAccounts/onesdk916\",\r\n \"name\": \"onesdk916\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag2\": \"testval2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/testrpgroup/providers/Microsoft.Batch/batchAccounts/wenwu1007\",\r\n \"name\": \"wenwu1007\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567\",\r\n \"name\": \"clw567\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"k1\": \"\",\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5671\",\r\n \"name\": \"clw5671\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567123\",\r\n \"name\": \"clw567123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567123456\",\r\n \"name\": \"clw567123456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5672\",\r\n \"name\": \"clw5672\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5673\",\r\n \"name\": \"clw5673\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5674\",\r\n \"name\": \"clw5674\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5675\",\r\n \"name\": \"clw5675\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"k1\": \"\",\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw789\",\r\n \"name\": \"clw789\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest\",\r\n \"name\": \"clwtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest123\",\r\n \"name\": \"clwtest123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest456\",\r\n \"name\": \"clwtest456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng123\",\r\n \"name\": \"zfeng123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng234\",\r\n \"name\": \"zfeng234\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng345\",\r\n \"name\": \"zfeng345\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng456\",\r\n \"name\": \"zfeng456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng912118\",\r\n \"name\": \"zfeng912118\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng9121231\",\r\n \"name\": \"zfeng9121231\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng913306\",\r\n \"name\": \"zfeng913306\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng915422\",\r\n \"name\": \"zfeng915422\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng915619\",\r\n \"name\": \"zfeng915619\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengabc\",\r\n \"name\": \"zfengabc\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengbatch1\",\r\n \"name\": \"zfengbatch1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengclw\",\r\n \"name\": \"zfengclw\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengs607\",\r\n \"name\": \"zfengs607\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12534" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31946" + ], + "x-ms-request-id": [ + "fa637187-9d6c-4307-bd58-9b2d43ddf0c1" + ], + "x-ms-correlation-request-id": [ + "fa637187-9d6c-4307-bd58-9b2d43ddf0c1" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022254Z:fa637187-9d6c-4307-bd58-9b2d43ddf0c1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:22:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6673/providers/Microsoft.Batch/batchAccounts/onesdk9870?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazY2NzMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazk4NzA/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "74" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "7" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1177" + ], + "request-id": [ + "29791b0d-87a8-4977-acd9-d7a97c41497b" + ], + "x-ms-request-id": [ + "0e861885-9505-4bc3-84af-2ea294663864" + ], + "x-ms-correlation-request-id": [ + "0e861885-9505-4bc3-84af-2ea294663864" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022255Z:0e861885-9505-4bc3-84af-2ea294663864" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:22:55 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6673/providers/Microsoft.Batch/batchAccounts/onesdk9870/operationResults/29791b0d-87a8-4977-acd9-d7a97c41497b?api-version=2014-05-01-privatepreview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6673/providers/Microsoft.Batch/batchAccounts/onesdk9870/operationResults/29791b0d-87a8-4977-acd9-d7a97c41497b?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazY2NzMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazk4NzAvb3BlcmF0aW9uUmVzdWx0cy8yOTc5MWIwZC04N2E4LTQ5NzctYWNkOS1kN2E5N2M0MTQ5N2I/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "7" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk9870\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk9870.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6673/providers/Microsoft.Batch/batchAccounts/onesdk9870\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "350" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Wed, 15 Oct 2014 02:22:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "e3c0e176-484c-40e8-818c-5614e7ebba66" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31945" + ], + "x-ms-request-id": [ + "af6c5434-b546-46c2-81e7-124efc9b2365" + ], + "x-ms-correlation-request-id": [ + "af6c5434-b546-46c2-81e7-124efc9b2365" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022256Z:af6c5434-b546-46c2-81e7-124efc9b2365" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:22:55 GMT" + ], + "ETag": [ + "0x8D1B63610F1D8CD" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6673/providers/Microsoft.Batch/batchAccounts/onesdk9870?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazY2NzMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazk4NzA/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk9870\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk9870.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6673/providers/Microsoft.Batch/batchAccounts/onesdk9870\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "350" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Wed, 15 Oct 2014 02:22:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "8b6be129-3f4b-4e65-a9f0-be8b4e878e1b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31944" + ], + "x-ms-request-id": [ + "d0048a9a-01aa-4266-bd86-98d7a600ca2c" + ], + "x-ms-correlation-request-id": [ + "d0048a9a-01aa-4266-bd86-98d7a600ca2c" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022256Z:d0048a9a-01aa-4266-bd86-98d7a600ca2c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:22:55 GMT" + ], + "ETag": [ + "0x8D1B636112A74A2" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6673/providers/Microsoft.Batch/batchAccounts/onesdk9870?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazY2NzMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazk4NzA/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk9870\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk9870.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6673/providers/Microsoft.Batch/batchAccounts/onesdk9870\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "350" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Wed, 15 Oct 2014 02:22:57 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "8f4e26f6-65bc-4c6e-8e66-57f6c9f68d60" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31943" + ], + "x-ms-request-id": [ + "a58e5a33-b90e-4825-b86c-fffc2b2de06f" + ], + "x-ms-correlation-request-id": [ + "a58e5a33-b90e-4825-b86c-fffc2b2de06f" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022257Z:a58e5a33-b90e-4825-b86c-fffc2b2de06f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:22:57 GMT" + ], + "ETag": [ + "0x8D1B636118C68FE" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6673/providers/Microsoft.Batch/batchAccounts/onesdk9870?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazY2NzMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazk4NzA/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk9870\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk9870.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6673/providers/Microsoft.Batch/batchAccounts/onesdk9870\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "350" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Wed, 15 Oct 2014 02:22:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "ffca1258-dacf-489e-aa69-5510e9ef3be6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31942" + ], + "x-ms-request-id": [ + "55b3dd6c-4c45-49d4-8afd-69871498e477" + ], + "x-ms-correlation-request-id": [ + "55b3dd6c-4c45-49d4-8afd-69871498e477" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022258Z:55b3dd6c-4c45-49d4-8afd-69871498e477" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:22:58 GMT" + ], + "ETag": [ + "0x8D1B636121CACB6" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6673/providers/Microsoft.Batch/batchAccounts/onesdk9870?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazY2NzMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazk4NzA/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk9870\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk9870.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6673/providers/Microsoft.Batch/batchAccounts/onesdk9870\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "350" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Wed, 15 Oct 2014 02:22:59 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "e9703fe2-5564-4bbb-800f-0bfbb069f20a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31941" + ], + "x-ms-request-id": [ + "ac771981-2887-4046-af62-cc351a397e92" + ], + "x-ms-correlation-request-id": [ + "ac771981-2887-4046-af62-cc351a397e92" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022259Z:ac771981-2887-4046-af62-cc351a397e92" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:22:59 GMT" + ], + "ETag": [ + "0x8D1B63612A38653" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6673/providers/Microsoft.Batch/batchAccounts/onesdk9870?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazY2NzMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazk4NzA/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk9870\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk9870.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6673/providers/Microsoft.Batch/batchAccounts/onesdk9870\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "350" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Wed, 15 Oct 2014 02:22:59 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "2e686038-a07b-4b3b-960a-56acab327a1e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31940" + ], + "x-ms-request-id": [ + "fb2cbb03-374c-411d-9afd-6ab3d591f813" + ], + "x-ms-correlation-request-id": [ + "fb2cbb03-374c-411d-9afd-6ab3d591f813" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022259Z:fb2cbb03-374c-411d-9afd-6ab3d591f813" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:22:59 GMT" + ], + "ETag": [ + "0x8D1B63612FAA1BB" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6673/providers/Microsoft.Batch/batchAccounts/onesdk9870/listKeys?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazY2NzMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazk4NzAvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"accountName\": \"onesdk9870\",\r\n \"primary\": \"FkyrWwhUkpAuOar0WAlUK75yEe5J+vlM1ss3HblX0U5jmV6ahuP5X3TsYq+L6v1meqgpL7SizK71bL2NuohBBw==\",\r\n \"secondary\": \"BMSi4im2fRmZJ9uSJ0ag3TQxgvlsRhNfDrcX2t/FVKVYMsCZE2R+jN5P1M9Qw4TW9bHFHGqP1YEz8DR/5bAQAw==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "9badef60-d5ac-45fe-b938-35ef3da1e8f1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1176" + ], + "x-ms-request-id": [ + "4a1bd51a-de71-4494-852d-43fd6fc10484" + ], + "x-ms-correlation-request-id": [ + "4a1bd51a-de71-4494-852d-43fd6fc10484" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022257Z:4a1bd51a-de71-4494-852d-43fd6fc10484" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:22:57 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6673/providers/Microsoft.Batch/batchAccounts/onesdk9870/listKeys?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazY2NzMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazk4NzAvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"accountName\": \"onesdk9870\",\r\n \"primary\": \"nIz8F1c0PkoJxfnM5ZpdMEN1NIy28rxvgO6YKLQJOsQOlllL8snWEDn+GHwzDoNUV2hAYkiTuOA+A92drd3Wmg==\",\r\n \"secondary\": \"6kGALTixxIvtdrfRSkJi2DHudeWwT2LPgCX4XO5a9ee0IY/qMJ7pHnayYgbbtBa5JoiEMJM2Yj5dwEuIuYteUQ==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "2e3f8bca-3889-44fc-bc9b-fae5a398821d" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1173" + ], + "x-ms-request-id": [ + "963800de-cc9c-4e1d-8332-25ad1cc9efda" + ], + "x-ms-correlation-request-id": [ + "963800de-cc9c-4e1d-8332-25ad1cc9efda" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022259Z:963800de-cc9c-4e1d-8332-25ad1cc9efda" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:22:59 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6673/providers/Microsoft.Batch/batchAccounts/onesdk9870/regenerateKeys?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazY2NzMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazk4NzAvcmVnZW5lcmF0ZUtleXM/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"keyName\": \"Primary\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "28" + ], + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"accountName\": \"onesdk9870\",\r\n \"primary\": \"nIz8F1c0PkoJxfnM5ZpdMEN1NIy28rxvgO6YKLQJOsQOlllL8snWEDn+GHwzDoNUV2hAYkiTuOA+A92drd3Wmg==\",\r\n \"secondary\": \"BMSi4im2fRmZJ9uSJ0ag3TQxgvlsRhNfDrcX2t/FVKVYMsCZE2R+jN5P1M9Qw4TW9bHFHGqP1YEz8DR/5bAQAw==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "38a74051-d130-4bf9-ad18-3424c953c754" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1175" + ], + "x-ms-request-id": [ + "9daac50d-6d91-4d42-8109-bf3708eb79cf" + ], + "x-ms-correlation-request-id": [ + "9daac50d-6d91-4d42-8109-bf3708eb79cf" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022258Z:9daac50d-6d91-4d42-8109-bf3708eb79cf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:22:57 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6673/providers/Microsoft.Batch/batchAccounts/onesdk9870/regenerateKeys?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazY2NzMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazk4NzAvcmVnZW5lcmF0ZUtleXM/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"keyName\": \"Secondary\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "30" + ], + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"accountName\": \"onesdk9870\",\r\n \"primary\": \"nIz8F1c0PkoJxfnM5ZpdMEN1NIy28rxvgO6YKLQJOsQOlllL8snWEDn+GHwzDoNUV2hAYkiTuOA+A92drd3Wmg==\",\r\n \"secondary\": \"6kGALTixxIvtdrfRSkJi2DHudeWwT2LPgCX4XO5a9ee0IY/qMJ7pHnayYgbbtBa5JoiEMJM2Yj5dwEuIuYteUQ==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "d3f4a599-24e6-453c-b769-621464bd02dc" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1174" + ], + "x-ms-request-id": [ + "d050214c-a83a-422f-b8af-80c4eb46391f" + ], + "x-ms-correlation-request-id": [ + "d050214c-a83a-422f-b8af-80c4eb46391f" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022258Z:d050214c-a83a-422f-b8af-80c4eb46391f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:22:58 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6673/providers/Microsoft.Batch/batchAccounts/onesdk9870?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazY2NzMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazk4NzA/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "19" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "request-id": [ + "3026bba7-0b40-4024-b7b9-53ae618b5b67" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1172" + ], + "x-ms-request-id": [ + "fc57426d-99bc-40a4-857c-fc68f5c1c0d1" + ], + "x-ms-correlation-request-id": [ + "fc57426d-99bc-40a4-857c-fc68f5c1c0d1" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022300Z:fc57426d-99bc-40a4-857c-fc68f5c1c0d1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:23:00 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6673/providers/Microsoft.Batch/batchAccounts/onesdk9870/operationResults/3026bba7-0b40-4024-b7b9-53ae618b5b67?api-version=2014-05-01-privatepreview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6673/providers/Microsoft.Batch/batchAccounts/onesdk9870/operationResults/3026bba7-0b40-4024-b7b9-53ae618b5b67?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazY2NzMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazk4NzAvb3BlcmF0aW9uUmVzdWx0cy8zMDI2YmJhNy0wYjQwLTQwMjQtYjdiOS01M2FlNjE4YjViNjc/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "19" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Wed, 15 Oct 2014 02:23:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "8a933aeb-463a-4ef5-a826-9d2f5ca788d8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31939" + ], + "x-ms-request-id": [ + "7e633171-77c6-458c-9f56-f1d8fdc0e2db" + ], + "x-ms-correlation-request-id": [ + "7e633171-77c6-458c-9f56-f1d8fdc0e2db" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022300Z:7e633171-77c6-458c-9f56-f1d8fdc0e2db" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:23:00 GMT" + ], + "ETag": [ + "0x8D1B63613A3163A" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk6673?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazY2NzM/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "23" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1171" + ], + "x-ms-request-id": [ + "a567e893-256a-465f-b8a1-9772088910bf" + ], + "x-ms-correlation-request-id": [ + "a567e893-256a-465f-b8a1-9772088910bf" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022301Z:a567e893-256a-465f-b8a1-9772088910bf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:23:00 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2NjczLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2NjczLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczJOamN6TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "23" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31937" + ], + "x-ms-request-id": [ + "283931f1-4603-421c-bbdb-1a23c5711a34" + ], + "x-ms-correlation-request-id": [ + "283931f1-4603-421c-bbdb-1a23c5711a34" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022301Z:283931f1-4603-421c-bbdb-1a23c5711a34" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:23:00 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2NjczLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2NjczLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczJOamN6TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "23" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31936" + ], + "x-ms-request-id": [ + "3a61f56f-c924-444a-a3e5-9efd07d1ec67" + ], + "x-ms-correlation-request-id": [ + "3a61f56f-c924-444a-a3e5-9efd07d1ec67" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022316Z:3a61f56f-c924-444a-a3e5-9efd07d1ec67" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:23:15 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2NjczLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2NjczLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczJOamN6TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "23" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31935" + ], + "x-ms-request-id": [ + "fb6427df-c96e-4581-bc6d-8c5cf83830b0" + ], + "x-ms-correlation-request-id": [ + "fb6427df-c96e-4581-bc6d-8c5cf83830b0" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022331Z:fb6427df-c96e-4581-bc6d-8c5cf83830b0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:23:30 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2NjczLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2NjczLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczJOamN6TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "23" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31934" + ], + "x-ms-request-id": [ + "b71a153b-c92f-42ac-85ea-82b14bd1c7f6" + ], + "x-ms-correlation-request-id": [ + "b71a153b-c92f-42ac-85ea-82b14bd1c7f6" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022346Z:b71a153b-c92f-42ac-85ea-82b14bd1c7f6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:23:46 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-BatchAccountKeys": [ + "onesdk9870", + "onesdk6673" + ] + }, + "Variables": { + "SubscriptionId": "4a06fe24-c197-4353-adc1-058d1a51924e" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Batch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestCreateAndRemoveBatchAccountViaPiping.json b/src/ResourceManager/Batch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestCreateAndRemoveBatchAccountViaPiping.json new file mode 100644 index 000000000000..547aa0ba6e48 --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestCreateAndRemoveBatchAccountViaPiping.json @@ -0,0 +1,1589 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.intelligentsystems\",\r\n \"namespace\": \"microsoft.intelligentsystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "21795" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31891" + ], + "x-ms-request-id": [ + "e5316358-4ba7-4f6b-bda7-8acd16a182c2" + ], + "x-ms-correlation-request-id": [ + "e5316358-4ba7-4f6b-bda7-8acd16a182c2" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022418Z:e5316358-4ba7-4f6b-bda7-8acd16a182c2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:24:18 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk2788?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazI3ODg/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "102" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31890" + ], + "x-ms-request-id": [ + "6d94007b-4ad9-4cd6-b2b2-6b974fba53a4" + ], + "x-ms-correlation-request-id": [ + "6d94007b-4ad9-4cd6-b2b2-6b974fba53a4" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022419Z:6d94007b-4ad9-4cd6-b2b2-6b974fba53a4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:24:18 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk2788?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazI3ODg/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31875" + ], + "x-ms-request-id": [ + "ae01dfa8-ce72-4dda-a775-59ea27074ed6" + ], + "x-ms-correlation-request-id": [ + "ae01dfa8-ce72-4dda-a775-59ea27074ed6" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022512Z:ae01dfa8-ce72-4dda-a775-59ea27074ed6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:25:11 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk2788?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazI3ODg/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk2788\",\r\n \"name\": \"onesdk2788\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "183" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1170" + ], + "x-ms-request-id": [ + "1830fe95-4184-4c31-8e18-905ef5054d81" + ], + "x-ms-correlation-request-id": [ + "1830fe95-4184-4c31-8e18-905ef5054d81" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022419Z:1830fe95-4184-4c31-8e18-905ef5054d81" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:24:18 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk2788/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazI3ODgvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31889" + ], + "x-ms-request-id": [ + "a15b95c6-bbbb-40f9-b3af-536a0c5b9130" + ], + "x-ms-correlation-request-id": [ + "a15b95c6-bbbb-40f9-b3af-536a0c5b9130" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022419Z:a15b95c6-bbbb-40f9-b3af-536a0c5b9130" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:24:18 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk2788/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazI3ODgvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "centralus:be3cf3ce-629a-438e-aa7d-55dea0461cfe" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31933" + ], + "x-ms-correlation-request-id": [ + "28fc95ce-7f32-4d65-b601-c0d0c1b796b7" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022419Z:28fc95ce-7f32-4d65-b601-c0d0c1b796b7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:24:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/azbacnhzf2\",\r\n \"name\": \"azbacnhzf2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbaccn0mf1juw5garhbk9q3vxl8d7i\": \"azbacr3u6l8ga5f1w7tjsd0cvqbz4knmhexpio92y\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/aztest1\",\r\n \"name\": \"aztest1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/aztest11\",\r\n \"name\": \"aztest11\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-ne/providers/Microsoft.Batch/batchAccounts/azbacykf2li0g\",\r\n \"name\": \"azbacykf2li0g\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbaczsgmy6p4a1c0il3b\": \"azbac9u1lydm6ebvs740kpgnowx8i52rctjf3qzah\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-we/providers/Microsoft.Batch/batchAccounts/azbac3mtkshf\",\r\n \"name\": \"azbac3mtkshf\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbac1s4853u9twc0yx7ihq2ej6nzdarokpmvlgbf\": \"azbaccg3l82tkpyzjoasn1f4vmq0d7u5he96briwx\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-wus/providers/Microsoft.Batch/batchAccounts/adnanzh1\",\r\n \"name\": \"adnanzh1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"adsdfgasujhd\": \"jdsfsdahgdfjheee\",\r\n \"adsdfgasujssshd\": \"jdsfsdahgdfjheeefgff\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchwestus/providers/Microsoft.Batch/batchAccounts/wenwu1007a1\",\r\n \"name\": \"wenwu1007a1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151135\",\r\n \"name\": \"zfeng9151135\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151138\",\r\n \"name\": \"zfeng9151138\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151141\",\r\n \"name\": \"zfeng9151141\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151157\",\r\n \"name\": \"zfeng9151157\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916114\",\r\n \"name\": \"zfeng916114\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161213\",\r\n \"name\": \"zfeng9161213\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161247\",\r\n \"name\": \"zfeng9161247\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161253\",\r\n \"name\": \"zfeng9161253\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161254\",\r\n \"name\": \"zfeng9161254\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916159\",\r\n \"name\": \"zfeng916159\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916735\",\r\n \"name\": \"zfeng916735\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/adnan\",\r\n \"name\": \"adnan\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/c123\",\r\n \"name\": \"c123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw\",\r\n \"name\": \"clw\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k3\": \"v3\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw1\",\r\n \"name\": \"clw1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw2\",\r\n \"name\": \"clw2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw3\",\r\n \"name\": \"clw3\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k11\": \"v11\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/azbacjnkyz\",\r\n \"name\": \"azbacjnkyz\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"azbac09duay1eb8ph5sloviz3crm4ngq7kjt6wx2f\": \"azbac5zjoxel6pb2yvsqh70dgmcu98t1r43nwkafi\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/clwtest1\",\r\n \"name\": \"clwtest1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/clwtest2\",\r\n \"name\": \"clwtest2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-BatchService-WestUS/providers/Microsoft.Batch/batchAccounts/clw678\",\r\n \"name\": \"clw678\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk9501/providers/Microsoft.Batch/batchAccounts/onesdk916\",\r\n \"name\": \"onesdk916\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag2\": \"testval2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/testrpgroup/providers/Microsoft.Batch/batchAccounts/wenwu1007\",\r\n \"name\": \"wenwu1007\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567\",\r\n \"name\": \"clw567\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"k1\": \"\",\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5671\",\r\n \"name\": \"clw5671\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567123\",\r\n \"name\": \"clw567123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567123456\",\r\n \"name\": \"clw567123456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5672\",\r\n \"name\": \"clw5672\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5673\",\r\n \"name\": \"clw5673\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5674\",\r\n \"name\": \"clw5674\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5675\",\r\n \"name\": \"clw5675\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"k1\": \"\",\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw789\",\r\n \"name\": \"clw789\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest\",\r\n \"name\": \"clwtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest123\",\r\n \"name\": \"clwtest123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest456\",\r\n \"name\": \"clwtest456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng123\",\r\n \"name\": \"zfeng123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng234\",\r\n \"name\": \"zfeng234\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng345\",\r\n \"name\": \"zfeng345\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng456\",\r\n \"name\": \"zfeng456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng912118\",\r\n \"name\": \"zfeng912118\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng9121231\",\r\n \"name\": \"zfeng9121231\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng913306\",\r\n \"name\": \"zfeng913306\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng915422\",\r\n \"name\": \"zfeng915422\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng915619\",\r\n \"name\": \"zfeng915619\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengabc\",\r\n \"name\": \"zfengabc\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengbatch1\",\r\n \"name\": \"zfengbatch1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengclw\",\r\n \"name\": \"zfengclw\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengs607\",\r\n \"name\": \"zfengs607\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12534" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31888" + ], + "x-ms-request-id": [ + "ab3ec83c-7f28-4bb3-b1f9-b69b04bbcfa6" + ], + "x-ms-correlation-request-id": [ + "ab3ec83c-7f28-4bb3-b1f9-b69b04bbcfa6" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022419Z:ab3ec83c-7f28-4bb3-b1f9-b69b04bbcfa6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:24:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/azbacnhzf2\",\r\n \"name\": \"azbacnhzf2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbaccn0mf1juw5garhbk9q3vxl8d7i\": \"azbacr3u6l8ga5f1w7tjsd0cvqbz4knmhexpio92y\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/aztest1\",\r\n \"name\": \"aztest1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/aztest11\",\r\n \"name\": \"aztest11\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-ne/providers/Microsoft.Batch/batchAccounts/azbacykf2li0g\",\r\n \"name\": \"azbacykf2li0g\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbaczsgmy6p4a1c0il3b\": \"azbac9u1lydm6ebvs740kpgnowx8i52rctjf3qzah\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-we/providers/Microsoft.Batch/batchAccounts/azbac3mtkshf\",\r\n \"name\": \"azbac3mtkshf\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbac1s4853u9twc0yx7ihq2ej6nzdarokpmvlgbf\": \"azbaccg3l82tkpyzjoasn1f4vmq0d7u5he96briwx\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-wus/providers/Microsoft.Batch/batchAccounts/adnanzh1\",\r\n \"name\": \"adnanzh1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"adsdfgasujhd\": \"jdsfsdahgdfjheee\",\r\n \"adsdfgasujssshd\": \"jdsfsdahgdfjheeefgff\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchwestus/providers/Microsoft.Batch/batchAccounts/wenwu1007a1\",\r\n \"name\": \"wenwu1007a1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151135\",\r\n \"name\": \"zfeng9151135\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151138\",\r\n \"name\": \"zfeng9151138\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151141\",\r\n \"name\": \"zfeng9151141\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151157\",\r\n \"name\": \"zfeng9151157\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916114\",\r\n \"name\": \"zfeng916114\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161213\",\r\n \"name\": \"zfeng9161213\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161247\",\r\n \"name\": \"zfeng9161247\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161253\",\r\n \"name\": \"zfeng9161253\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161254\",\r\n \"name\": \"zfeng9161254\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916159\",\r\n \"name\": \"zfeng916159\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916735\",\r\n \"name\": \"zfeng916735\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/adnan\",\r\n \"name\": \"adnan\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/c123\",\r\n \"name\": \"c123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw\",\r\n \"name\": \"clw\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k3\": \"v3\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw1\",\r\n \"name\": \"clw1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw2\",\r\n \"name\": \"clw2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw3\",\r\n \"name\": \"clw3\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k11\": \"v11\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/azbacjnkyz\",\r\n \"name\": \"azbacjnkyz\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"azbac09duay1eb8ph5sloviz3crm4ngq7kjt6wx2f\": \"azbac5zjoxel6pb2yvsqh70dgmcu98t1r43nwkafi\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/clwtest1\",\r\n \"name\": \"clwtest1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/clwtest2\",\r\n \"name\": \"clwtest2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-BatchService-WestUS/providers/Microsoft.Batch/batchAccounts/clw678\",\r\n \"name\": \"clw678\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk9501/providers/Microsoft.Batch/batchAccounts/onesdk916\",\r\n \"name\": \"onesdk916\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag2\": \"testval2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/testrpgroup/providers/Microsoft.Batch/batchAccounts/wenwu1007\",\r\n \"name\": \"wenwu1007\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567\",\r\n \"name\": \"clw567\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"k1\": \"\",\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5671\",\r\n \"name\": \"clw5671\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567123\",\r\n \"name\": \"clw567123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567123456\",\r\n \"name\": \"clw567123456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5672\",\r\n \"name\": \"clw5672\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5673\",\r\n \"name\": \"clw5673\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5674\",\r\n \"name\": \"clw5674\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5675\",\r\n \"name\": \"clw5675\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"k1\": \"\",\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw789\",\r\n \"name\": \"clw789\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest\",\r\n \"name\": \"clwtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest123\",\r\n \"name\": \"clwtest123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest456\",\r\n \"name\": \"clwtest456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng123\",\r\n \"name\": \"zfeng123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng234\",\r\n \"name\": \"zfeng234\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng345\",\r\n \"name\": \"zfeng345\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng456\",\r\n \"name\": \"zfeng456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng912118\",\r\n \"name\": \"zfeng912118\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng9121231\",\r\n \"name\": \"zfeng9121231\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng913306\",\r\n \"name\": \"zfeng913306\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng915422\",\r\n \"name\": \"zfeng915422\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng915619\",\r\n \"name\": \"zfeng915619\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengabc\",\r\n \"name\": \"zfengabc\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengbatch1\",\r\n \"name\": \"zfengbatch1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengclw\",\r\n \"name\": \"zfengclw\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengs607\",\r\n \"name\": \"zfengs607\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12534" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31885" + ], + "x-ms-request-id": [ + "b11d4b96-afab-42fd-9030-3c02be30cd41" + ], + "x-ms-correlation-request-id": [ + "b11d4b96-afab-42fd-9030-3c02be30cd41" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022437Z:b11d4b96-afab-42fd-9030-3c02be30cd41" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:24:36 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/azbacnhzf2\",\r\n \"name\": \"azbacnhzf2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbaccn0mf1juw5garhbk9q3vxl8d7i\": \"azbacr3u6l8ga5f1w7tjsd0cvqbz4knmhexpio92y\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/aztest1\",\r\n \"name\": \"aztest1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/aztest11\",\r\n \"name\": \"aztest11\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-ne/providers/Microsoft.Batch/batchAccounts/azbacykf2li0g\",\r\n \"name\": \"azbacykf2li0g\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbaczsgmy6p4a1c0il3b\": \"azbac9u1lydm6ebvs740kpgnowx8i52rctjf3qzah\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-we/providers/Microsoft.Batch/batchAccounts/azbac3mtkshf\",\r\n \"name\": \"azbac3mtkshf\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbac1s4853u9twc0yx7ihq2ej6nzdarokpmvlgbf\": \"azbaccg3l82tkpyzjoasn1f4vmq0d7u5he96briwx\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-wus/providers/Microsoft.Batch/batchAccounts/adnanzh1\",\r\n \"name\": \"adnanzh1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"adsdfgasujhd\": \"jdsfsdahgdfjheee\",\r\n \"adsdfgasujssshd\": \"jdsfsdahgdfjheeefgff\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchwestus/providers/Microsoft.Batch/batchAccounts/wenwu1007a1\",\r\n \"name\": \"wenwu1007a1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151135\",\r\n \"name\": \"zfeng9151135\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151138\",\r\n \"name\": \"zfeng9151138\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151141\",\r\n \"name\": \"zfeng9151141\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151157\",\r\n \"name\": \"zfeng9151157\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916114\",\r\n \"name\": \"zfeng916114\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161213\",\r\n \"name\": \"zfeng9161213\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161247\",\r\n \"name\": \"zfeng9161247\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161253\",\r\n \"name\": \"zfeng9161253\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161254\",\r\n \"name\": \"zfeng9161254\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916159\",\r\n \"name\": \"zfeng916159\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916735\",\r\n \"name\": \"zfeng916735\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/adnan\",\r\n \"name\": \"adnan\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/c123\",\r\n \"name\": \"c123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw\",\r\n \"name\": \"clw\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k3\": \"v3\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw1\",\r\n \"name\": \"clw1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw2\",\r\n \"name\": \"clw2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw3\",\r\n \"name\": \"clw3\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k11\": \"v11\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/azbacjnkyz\",\r\n \"name\": \"azbacjnkyz\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"azbac09duay1eb8ph5sloviz3crm4ngq7kjt6wx2f\": \"azbac5zjoxel6pb2yvsqh70dgmcu98t1r43nwkafi\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/clwtest1\",\r\n \"name\": \"clwtest1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/clwtest2\",\r\n \"name\": \"clwtest2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-BatchService-WestUS/providers/Microsoft.Batch/batchAccounts/clw678\",\r\n \"name\": \"clw678\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk2788/providers/Microsoft.Batch/batchAccounts/onesdk9323\",\r\n \"name\": \"onesdk9323\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk9501/providers/Microsoft.Batch/batchAccounts/onesdk916\",\r\n \"name\": \"onesdk916\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag2\": \"testval2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/testrpgroup/providers/Microsoft.Batch/batchAccounts/wenwu1007\",\r\n \"name\": \"wenwu1007\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567\",\r\n \"name\": \"clw567\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"k1\": \"\",\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5671\",\r\n \"name\": \"clw5671\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567123\",\r\n \"name\": \"clw567123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567123456\",\r\n \"name\": \"clw567123456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5672\",\r\n \"name\": \"clw5672\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5673\",\r\n \"name\": \"clw5673\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5674\",\r\n \"name\": \"clw5674\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5675\",\r\n \"name\": \"clw5675\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"k1\": \"\",\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw789\",\r\n \"name\": \"clw789\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest\",\r\n \"name\": \"clwtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest123\",\r\n \"name\": \"clwtest123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest456\",\r\n \"name\": \"clwtest456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng123\",\r\n \"name\": \"zfeng123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng234\",\r\n \"name\": \"zfeng234\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng345\",\r\n \"name\": \"zfeng345\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng456\",\r\n \"name\": \"zfeng456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng912118\",\r\n \"name\": \"zfeng912118\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng9121231\",\r\n \"name\": \"zfeng9121231\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng913306\",\r\n \"name\": \"zfeng913306\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng915422\",\r\n \"name\": \"zfeng915422\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng915619\",\r\n \"name\": \"zfeng915619\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengabc\",\r\n \"name\": \"zfengabc\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengbatch1\",\r\n \"name\": \"zfengbatch1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengclw\",\r\n \"name\": \"zfengclw\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengs607\",\r\n \"name\": \"zfengs607\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12751" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31878" + ], + "x-ms-request-id": [ + "de5c6b6a-ba1c-4d4c-ad0e-7df6dcbd4e08" + ], + "x-ms-correlation-request-id": [ + "de5c6b6a-ba1c-4d4c-ad0e-7df6dcbd4e08" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022511Z:de5c6b6a-ba1c-4d4c-ad0e-7df6dcbd4e08" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:25:11 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/azbacnhzf2\",\r\n \"name\": \"azbacnhzf2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbaccn0mf1juw5garhbk9q3vxl8d7i\": \"azbacr3u6l8ga5f1w7tjsd0cvqbz4knmhexpio92y\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/aztest1\",\r\n \"name\": \"aztest1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/aztest11\",\r\n \"name\": \"aztest11\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-ne/providers/Microsoft.Batch/batchAccounts/azbacykf2li0g\",\r\n \"name\": \"azbacykf2li0g\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbaczsgmy6p4a1c0il3b\": \"azbac9u1lydm6ebvs740kpgnowx8i52rctjf3qzah\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-we/providers/Microsoft.Batch/batchAccounts/azbac3mtkshf\",\r\n \"name\": \"azbac3mtkshf\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbac1s4853u9twc0yx7ihq2ej6nzdarokpmvlgbf\": \"azbaccg3l82tkpyzjoasn1f4vmq0d7u5he96briwx\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-wus/providers/Microsoft.Batch/batchAccounts/adnanzh1\",\r\n \"name\": \"adnanzh1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"adsdfgasujhd\": \"jdsfsdahgdfjheee\",\r\n \"adsdfgasujssshd\": \"jdsfsdahgdfjheeefgff\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchwestus/providers/Microsoft.Batch/batchAccounts/wenwu1007a1\",\r\n \"name\": \"wenwu1007a1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151135\",\r\n \"name\": \"zfeng9151135\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151138\",\r\n \"name\": \"zfeng9151138\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151141\",\r\n \"name\": \"zfeng9151141\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151157\",\r\n \"name\": \"zfeng9151157\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916114\",\r\n \"name\": \"zfeng916114\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161213\",\r\n \"name\": \"zfeng9161213\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161247\",\r\n \"name\": \"zfeng9161247\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161253\",\r\n \"name\": \"zfeng9161253\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161254\",\r\n \"name\": \"zfeng9161254\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916159\",\r\n \"name\": \"zfeng916159\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916735\",\r\n \"name\": \"zfeng916735\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/adnan\",\r\n \"name\": \"adnan\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/c123\",\r\n \"name\": \"c123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw\",\r\n \"name\": \"clw\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k3\": \"v3\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw1\",\r\n \"name\": \"clw1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw2\",\r\n \"name\": \"clw2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw3\",\r\n \"name\": \"clw3\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k11\": \"v11\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/azbacjnkyz\",\r\n \"name\": \"azbacjnkyz\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"azbac09duay1eb8ph5sloviz3crm4ngq7kjt6wx2f\": \"azbac5zjoxel6pb2yvsqh70dgmcu98t1r43nwkafi\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/clwtest1\",\r\n \"name\": \"clwtest1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/clwtest2\",\r\n \"name\": \"clwtest2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-BatchService-WestUS/providers/Microsoft.Batch/batchAccounts/clw678\",\r\n \"name\": \"clw678\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk2788/providers/Microsoft.Batch/batchAccounts/onesdk9323\",\r\n \"name\": \"onesdk9323\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk9501/providers/Microsoft.Batch/batchAccounts/onesdk916\",\r\n \"name\": \"onesdk916\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag2\": \"testval2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/testrpgroup/providers/Microsoft.Batch/batchAccounts/wenwu1007\",\r\n \"name\": \"wenwu1007\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567\",\r\n \"name\": \"clw567\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"k1\": \"\",\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5671\",\r\n \"name\": \"clw5671\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567123\",\r\n \"name\": \"clw567123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567123456\",\r\n \"name\": \"clw567123456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5672\",\r\n \"name\": \"clw5672\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5673\",\r\n \"name\": \"clw5673\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5674\",\r\n \"name\": \"clw5674\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5675\",\r\n \"name\": \"clw5675\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"k1\": \"\",\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw789\",\r\n \"name\": \"clw789\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest\",\r\n \"name\": \"clwtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest123\",\r\n \"name\": \"clwtest123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest456\",\r\n \"name\": \"clwtest456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng123\",\r\n \"name\": \"zfeng123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng234\",\r\n \"name\": \"zfeng234\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng345\",\r\n \"name\": \"zfeng345\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng456\",\r\n \"name\": \"zfeng456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng912118\",\r\n \"name\": \"zfeng912118\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng9121231\",\r\n \"name\": \"zfeng9121231\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng913306\",\r\n \"name\": \"zfeng913306\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng915422\",\r\n \"name\": \"zfeng915422\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng915619\",\r\n \"name\": \"zfeng915619\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengabc\",\r\n \"name\": \"zfengabc\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengbatch1\",\r\n \"name\": \"zfengbatch1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengclw\",\r\n \"name\": \"zfengclw\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengs607\",\r\n \"name\": \"zfengs607\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12751" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31876" + ], + "x-ms-request-id": [ + "af5c64ab-3b97-4fb0-ba15-119e8215c6ba" + ], + "x-ms-correlation-request-id": [ + "af5c64ab-3b97-4fb0-ba15-119e8215c6ba" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022512Z:af5c64ab-3b97-4fb0-ba15-119e8215c6ba" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:25:11 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk2788/providers/Microsoft.Batch/batchAccounts/onesdk9323?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazI3ODgvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazkzMjM/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "29" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "37" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1169" + ], + "request-id": [ + "3aa0e339-1de9-4c21-b29f-6cde4e079e48" + ], + "x-ms-request-id": [ + "5e25d3b2-1220-4bc6-86e5-a4eed65724db" + ], + "x-ms-correlation-request-id": [ + "5e25d3b2-1220-4bc6-86e5-a4eed65724db" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022421Z:5e25d3b2-1220-4bc6-86e5-a4eed65724db" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:24:21 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk2788/providers/Microsoft.Batch/batchAccounts/onesdk9323/operationResults/3aa0e339-1de9-4c21-b29f-6cde4e079e48?api-version=2014-05-01-privatepreview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk2788/providers/Microsoft.Batch/batchAccounts/onesdk9323/operationResults/3aa0e339-1de9-4c21-b29f-6cde4e079e48?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazI3ODgvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazkzMjMvb3BlcmF0aW9uUmVzdWx0cy8zYWEwZTMzOS0xZGU5LTRjMjEtYjI5Zi02Y2RlNGUwNzllNDg/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "37" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "request-id": [ + "24a33c96-67b2-48fc-b105-15773248337e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31887" + ], + "x-ms-request-id": [ + "125e050c-6177-49c5-9c5e-86c93f45e958" + ], + "x-ms-correlation-request-id": [ + "125e050c-6177-49c5-9c5e-86c93f45e958" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022421Z:125e050c-6177-49c5-9c5e-86c93f45e958" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:24:21 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk2788/providers/Microsoft.Batch/batchAccounts/onesdk9323/operationResults/3aa0e339-1de9-4c21-b29f-6cde4e079e48?api-version=2014-05-01-privatepreview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk2788/providers/Microsoft.Batch/batchAccounts/onesdk9323/operationResults/3aa0e339-1de9-4c21-b29f-6cde4e079e48?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazI3ODgvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazkzMjMvb3BlcmF0aW9uUmVzdWx0cy8zYWEwZTMzOS0xZGU5LTRjMjEtYjI5Zi02Y2RlNGUwNzllNDg/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "37" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk9323\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk9323.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk2788/providers/Microsoft.Batch/batchAccounts/onesdk9323\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "321" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Wed, 15 Oct 2014 02:24:36 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "829bdca4-8832-4bfa-ad3c-e70a99ff88d8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31886" + ], + "x-ms-request-id": [ + "d0a87b30-a1ff-4218-af44-f1be46c1f686" + ], + "x-ms-correlation-request-id": [ + "d0a87b30-a1ff-4218-af44-f1be46c1f686" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022437Z:d0a87b30-a1ff-4218-af44-f1be46c1f686" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:24:36 GMT" + ], + "ETag": [ + "0x8D1B6364CD70828" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk2788/providers/Microsoft.Batch/batchAccounts/onesdk6039?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazI3ODgvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazYwMzk/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "29" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "42" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1168" + ], + "request-id": [ + "2311946e-d1d5-4745-b936-0c07cc1afb20" + ], + "x-ms-request-id": [ + "6622dba6-7c24-45cb-9b19-0ba9ac446ca7" + ], + "x-ms-correlation-request-id": [ + "6622dba6-7c24-45cb-9b19-0ba9ac446ca7" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022438Z:6622dba6-7c24-45cb-9b19-0ba9ac446ca7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:24:38 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk2788/providers/Microsoft.Batch/batchAccounts/onesdk6039/operationResults/2311946e-d1d5-4745-b936-0c07cc1afb20?api-version=2014-05-01-privatepreview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk2788/providers/Microsoft.Batch/batchAccounts/onesdk6039/operationResults/2311946e-d1d5-4745-b936-0c07cc1afb20?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazI3ODgvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazYwMzkvb3BlcmF0aW9uUmVzdWx0cy8yMzExOTQ2ZS1kMWQ1LTQ3NDUtYjkzNi0wYzA3Y2MxYWZiMjA/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "42" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "request-id": [ + "e3169de6-3ec3-4aa8-8251-fddd455aad95" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31884" + ], + "x-ms-request-id": [ + "a898f85f-ace0-409f-9111-765244ffccde" + ], + "x-ms-correlation-request-id": [ + "a898f85f-ace0-409f-9111-765244ffccde" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022438Z:a898f85f-ace0-409f-9111-765244ffccde" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:24:38 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk2788/providers/Microsoft.Batch/batchAccounts/onesdk6039/operationResults/2311946e-d1d5-4745-b936-0c07cc1afb20?api-version=2014-05-01-privatepreview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk2788/providers/Microsoft.Batch/batchAccounts/onesdk6039/operationResults/2311946e-d1d5-4745-b936-0c07cc1afb20?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazI3ODgvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazYwMzkvb3BlcmF0aW9uUmVzdWx0cy8yMzExOTQ2ZS1kMWQ1LTQ3NDUtYjkzNi0wYzA3Y2MxYWZiMjA/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "42" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk6039\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk6039.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk2788/providers/Microsoft.Batch/batchAccounts/onesdk6039\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "321" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Wed, 15 Oct 2014 02:24:54 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "1e89e67b-9aae-4222-9832-cdc7c2484a1d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31883" + ], + "x-ms-request-id": [ + "868a8c6f-0e0f-4ad9-a7c8-815e342fed19" + ], + "x-ms-correlation-request-id": [ + "868a8c6f-0e0f-4ad9-a7c8-815e342fed19" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022454Z:868a8c6f-0e0f-4ad9-a7c8-815e342fed19" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:24:54 GMT" + ], + "ETag": [ + "0x8D1B6365701FC47" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Batch/batchAccounts?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2gvYmF0Y2hBY2NvdW50cz9hcGktdmVyc2lvbj0yMDE0LTA1LTAxLXByaXZhdGVwcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"name\": \"adnanzh1\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"ppp\": \"kkkk\",\r\n \"abcd\": \"efgh\",\r\n \"abcde\": \"efgh\",\r\n \"cd\": \"efgh\",\r\n \"cde\": \"efgh\",\r\n \"aefgh\": \"acde\",\r\n \"adnan\": \"ped\",\r\n \"Ped\": \"Pune\",\r\n \"loc\": \"unknown\",\r\n \"jhsdgfjhabcd\": \"csfndhh\",\r\n \"segdfgkjdfjk\": \"jashdgfjshdf\",\r\n \"adsdfgasujhd\": \"jdsfsdahgdfjheee\",\r\n \"adsdfgasujssshd\": \"jdsfsdahgdfjheeefgff\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"adnanzh1.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-wus/providers/Microsoft.Batch/batchAccounts/adnanzh1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n },\r\n {\r\n \"name\": \"azbacjnkyz\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"azbac09duay1eb8ph5sloviz3crm4ngq7kjt6wx2f\": \"azbac5zjoxel6pb2yvsqh70dgmcu98t1r43nwkafi\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"azbacjnkyz.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/default-azurebatch-westus/providers/Microsoft.Batch/batchAccounts/azbacjnkyz\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n },\r\n {\r\n \"name\": \"clw789\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"clw789.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw789\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n },\r\n {\r\n \"name\": \"onesdk6039\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk6039.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk2788/providers/Microsoft.Batch/batchAccounts/onesdk6039\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n },\r\n {\r\n \"name\": \"onesdk916\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag2\": \"testval2\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk916.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk9501/providers/Microsoft.Batch/batchAccounts/onesdk916\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n },\r\n {\r\n \"name\": \"onesdk9323\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk9323.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk2788/providers/Microsoft.Batch/batchAccounts/onesdk9323\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n },\r\n {\r\n \"name\": \"wenwu1007\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"wenwu1007.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/testrpgroup/providers/Microsoft.Batch/batchAccounts/wenwu1007\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n },\r\n {\r\n \"name\": \"wenwu1007a1\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"wenwu1007a1.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchwestus/providers/Microsoft.Batch/batchAccounts/wenwu1007a1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2974" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "c8c74df7-a94e-499e-b61f-41ecf33eea70" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31882" + ], + "x-ms-request-id": [ + "9caa0e15-f625-4e66-9270-5bbc38f1bb1c" + ], + "x-ms-correlation-request-id": [ + "9caa0e15-f625-4e66-9270-5bbc38f1bb1c" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022454Z:9caa0e15-f625-4e66-9270-5bbc38f1bb1c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:24:54 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk2788/providers/Microsoft.Batch/batchAccounts/onesdk6039?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazI3ODgvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazYwMzk/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "47" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "request-id": [ + "1d9864c5-4fb1-45a6-8766-f8990fad44cb" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1167" + ], + "x-ms-request-id": [ + "18d88cd2-b14a-41c9-b509-bab2137637e6" + ], + "x-ms-correlation-request-id": [ + "18d88cd2-b14a-41c9-b509-bab2137637e6" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022455Z:18d88cd2-b14a-41c9-b509-bab2137637e6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:24:55 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk2788/providers/Microsoft.Batch/batchAccounts/onesdk6039/operationResults/1d9864c5-4fb1-45a6-8766-f8990fad44cb?api-version=2014-05-01-privatepreview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk2788/providers/Microsoft.Batch/batchAccounts/onesdk6039/operationResults/1d9864c5-4fb1-45a6-8766-f8990fad44cb?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazI3ODgvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazYwMzkvb3BlcmF0aW9uUmVzdWx0cy8xZDk4NjRjNS00ZmIxLTQ1YTYtODc2Ni1mODk5MGZhZDQ0Y2I/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "47" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "request-id": [ + "7766e200-b279-4540-817e-1b4ae09e93a0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31881" + ], + "x-ms-request-id": [ + "6406cdb6-3764-4052-bee0-1d7a6686690c" + ], + "x-ms-correlation-request-id": [ + "6406cdb6-3764-4052-bee0-1d7a6686690c" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022455Z:6406cdb6-3764-4052-bee0-1d7a6686690c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:24:55 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk2788/providers/Microsoft.Batch/batchAccounts/onesdk6039/operationResults/1d9864c5-4fb1-45a6-8766-f8990fad44cb?api-version=2014-05-01-privatepreview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk2788/providers/Microsoft.Batch/batchAccounts/onesdk6039/operationResults/1d9864c5-4fb1-45a6-8766-f8990fad44cb?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazI3ODgvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazYwMzkvb3BlcmF0aW9uUmVzdWx0cy8xZDk4NjRjNS00ZmIxLTQ1YTYtODc2Ni1mODk5MGZhZDQ0Y2I/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "47" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Wed, 15 Oct 2014 02:25:10 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "24d5cd14-0523-4ccc-b99d-397baf22d03d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31880" + ], + "x-ms-request-id": [ + "8de1cfda-60bb-49d8-8948-246e7d5a0c24" + ], + "x-ms-correlation-request-id": [ + "8de1cfda-60bb-49d8-8948-246e7d5a0c24" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022510Z:8de1cfda-60bb-49d8-8948-246e7d5a0c24" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:25:10 GMT" + ], + "ETag": [ + "0x8D1B63660E42FF8" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk2788/providers/Microsoft.Batch/batchAccounts/onesdk9323?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazI3ODgvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazkzMjM/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "51" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "request-id": [ + "9e9210df-a82d-48ab-9b40-70d88797321c" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1166" + ], + "x-ms-request-id": [ + "ded32df1-095c-4fa8-b4b8-385aade0446d" + ], + "x-ms-correlation-request-id": [ + "ded32df1-095c-4fa8-b4b8-385aade0446d" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022511Z:ded32df1-095c-4fa8-b4b8-385aade0446d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:25:10 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk2788/providers/Microsoft.Batch/batchAccounts/onesdk9323/operationResults/9e9210df-a82d-48ab-9b40-70d88797321c?api-version=2014-05-01-privatepreview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk2788/providers/Microsoft.Batch/batchAccounts/onesdk9323/operationResults/9e9210df-a82d-48ab-9b40-70d88797321c?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazI3ODgvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazkzMjMvb3BlcmF0aW9uUmVzdWx0cy85ZTkyMTBkZi1hODJkLTQ4YWItOWI0MC03MGQ4ODc5NzMyMWM/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "51" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Wed, 15 Oct 2014 02:25:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "ff6efa46-eb5e-47bc-ab64-0ac14458f5c2" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31879" + ], + "x-ms-request-id": [ + "1f226a8b-6ad0-453e-a0b2-8be29d8dd311" + ], + "x-ms-correlation-request-id": [ + "1f226a8b-6ad0-453e-a0b2-8be29d8dd311" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022511Z:1f226a8b-6ad0-453e-a0b2-8be29d8dd311" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:25:10 GMT" + ], + "ETag": [ + "0x8D1B63661796EEC" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk2788/providers/Microsoft.Batch/batchAccounts/onesdk9323?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazI3ODgvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazkzMjM/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"code\": \"AccountNotFound\",\r\n \"message\": \"The specified account does not exist.\\nRequestId:aa37c165-3139-4228-a02e-8f3bd2c3cc55\\nTime:2014-10-15T02:25:11.9688800Z\",\r\n \"target\": \"BatchAccount\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "183" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "aa37c165-3139-4228-a02e-8f3bd2c3cc55" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31877" + ], + "x-ms-request-id": [ + "864caebb-55b4-40a2-bf40-99022be012e8" + ], + "x-ms-correlation-request-id": [ + "864caebb-55b4-40a2-bf40-99022be012e8" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022512Z:864caebb-55b4-40a2-bf40-99022be012e8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:25:11 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk2788?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazI3ODg/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "58" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1165" + ], + "x-ms-request-id": [ + "e242bad9-52bd-4ee1-baa8-dcc530f40bdd" + ], + "x-ms-correlation-request-id": [ + "e242bad9-52bd-4ee1-baa8-dcc530f40bdd" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022512Z:e242bad9-52bd-4ee1-baa8-dcc530f40bdd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:25:11 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsyNzg4LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsyNzg4LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3lOemc0TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "58" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31874" + ], + "x-ms-request-id": [ + "173a236f-c711-425b-ae83-b42b29b30527" + ], + "x-ms-correlation-request-id": [ + "173a236f-c711-425b-ae83-b42b29b30527" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022512Z:173a236f-c711-425b-ae83-b42b29b30527" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:25:11 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsyNzg4LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsyNzg4LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3lOemc0TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "58" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31873" + ], + "x-ms-request-id": [ + "3003e95c-5b7c-4a17-8df5-fa4bd867583f" + ], + "x-ms-correlation-request-id": [ + "3003e95c-5b7c-4a17-8df5-fa4bd867583f" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022527Z:3003e95c-5b7c-4a17-8df5-fa4bd867583f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:25:27 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsyNzg4LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsyNzg4LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3lOemc0TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "58" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31872" + ], + "x-ms-request-id": [ + "4eaaa24c-fdff-4b02-bb04-74a077c6769c" + ], + "x-ms-correlation-request-id": [ + "4eaaa24c-fdff-4b02-bb04-74a077c6769c" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022542Z:4eaaa24c-fdff-4b02-bb04-74a077c6769c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:25:42 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsyNzg4LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsyNzg4LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3lOemc0TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "58" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31871" + ], + "x-ms-request-id": [ + "74afefc7-b802-42e2-96b6-0b48848939de" + ], + "x-ms-correlation-request-id": [ + "74afefc7-b802-42e2-96b6-0b48848939de" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022557Z:74afefc7-b802-42e2-96b6-0b48848939de" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:25:57 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-CreateAndRemoveBatchAccountViaPiping": [ + "onesdk9323", + "onesdk6039", + "onesdk2788" + ] + }, + "Variables": { + "SubscriptionId": "4a06fe24-c197-4353-adc1-058d1a51924e" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Batch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestCreateExistingBatchAccount.json b/src/ResourceManager/Batch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestCreateExistingBatchAccount.json new file mode 100644 index 000000000000..5e1c44ff7cbe --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestCreateExistingBatchAccount.json @@ -0,0 +1,997 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.intelligentsystems\",\r\n \"namespace\": \"microsoft.intelligentsystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "21795" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31824" + ], + "x-ms-request-id": [ + "73d8c3da-e101-4beb-985d-bb1cf261eee0" + ], + "x-ms-correlation-request-id": [ + "73d8c3da-e101-4beb-985d-bb1cf261eee0" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023347Z:73d8c3da-e101-4beb-985d-bb1cf261eee0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:33:47 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk4067?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazQwNjc/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "102" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31823" + ], + "x-ms-request-id": [ + "f7006c6e-2a02-439a-9727-10f78e236319" + ], + "x-ms-correlation-request-id": [ + "f7006c6e-2a02-439a-9727-10f78e236319" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023347Z:f7006c6e-2a02-439a-9727-10f78e236319" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:33:47 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk4067?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazQwNjc/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31816" + ], + "x-ms-request-id": [ + "4a78055e-9cc4-4820-a0e4-24dba3ce7c0a" + ], + "x-ms-correlation-request-id": [ + "4a78055e-9cc4-4820-a0e4-24dba3ce7c0a" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023508Z:4a78055e-9cc4-4820-a0e4-24dba3ce7c0a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:35:07 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk4067?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazQwNjc/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk4067\",\r\n \"name\": \"onesdk4067\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "183" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1145" + ], + "x-ms-request-id": [ + "86e0a3dd-6a78-4e2a-89b5-a0cd416be3cd" + ], + "x-ms-correlation-request-id": [ + "86e0a3dd-6a78-4e2a-89b5-a0cd416be3cd" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023348Z:86e0a3dd-6a78-4e2a-89b5-a0cd416be3cd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:33:47 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk4067/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazQwNjcvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31822" + ], + "x-ms-request-id": [ + "2c048ce2-b8bb-4ac5-ad3e-9e016775a9ad" + ], + "x-ms-correlation-request-id": [ + "2c048ce2-b8bb-4ac5-ad3e-9e016775a9ad" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023348Z:2c048ce2-b8bb-4ac5-ad3e-9e016775a9ad" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:33:47 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk4067/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazQwNjcvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "centralus:9f13483f-6cec-4000-8c7f-addf5d9b91b6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31915" + ], + "x-ms-correlation-request-id": [ + "efae2de8-61fd-421c-bcc7-32dff6ca2aa1" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023348Z:efae2de8-61fd-421c-bcc7-32dff6ca2aa1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:33:47 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/azbacnhzf2\",\r\n \"name\": \"azbacnhzf2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbaccn0mf1juw5garhbk9q3vxl8d7i\": \"azbacr3u6l8ga5f1w7tjsd0cvqbz4knmhexpio92y\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/aztest1\",\r\n \"name\": \"aztest1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/aztest11\",\r\n \"name\": \"aztest11\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-ne/providers/Microsoft.Batch/batchAccounts/azbacykf2li0g\",\r\n \"name\": \"azbacykf2li0g\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbaczsgmy6p4a1c0il3b\": \"azbac9u1lydm6ebvs740kpgnowx8i52rctjf3qzah\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-we/providers/Microsoft.Batch/batchAccounts/azbac3mtkshf\",\r\n \"name\": \"azbac3mtkshf\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbac1s4853u9twc0yx7ihq2ej6nzdarokpmvlgbf\": \"azbaccg3l82tkpyzjoasn1f4vmq0d7u5he96briwx\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-wus/providers/Microsoft.Batch/batchAccounts/adnanzh1\",\r\n \"name\": \"adnanzh1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"adsdfgasujhd\": \"jdsfsdahgdfjheee\",\r\n \"adsdfgasujssshd\": \"jdsfsdahgdfjheeefgff\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchwestus/providers/Microsoft.Batch/batchAccounts/wenwu1007a1\",\r\n \"name\": \"wenwu1007a1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151135\",\r\n \"name\": \"zfeng9151135\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151138\",\r\n \"name\": \"zfeng9151138\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151141\",\r\n \"name\": \"zfeng9151141\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151157\",\r\n \"name\": \"zfeng9151157\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916114\",\r\n \"name\": \"zfeng916114\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161213\",\r\n \"name\": \"zfeng9161213\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161247\",\r\n \"name\": \"zfeng9161247\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161253\",\r\n \"name\": \"zfeng9161253\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161254\",\r\n \"name\": \"zfeng9161254\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916159\",\r\n \"name\": \"zfeng916159\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916735\",\r\n \"name\": \"zfeng916735\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/adnan\",\r\n \"name\": \"adnan\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/c123\",\r\n \"name\": \"c123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw\",\r\n \"name\": \"clw\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k3\": \"v3\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw1\",\r\n \"name\": \"clw1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw2\",\r\n \"name\": \"clw2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw3\",\r\n \"name\": \"clw3\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k11\": \"v11\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/azbacjnkyz\",\r\n \"name\": \"azbacjnkyz\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"azbac09duay1eb8ph5sloviz3crm4ngq7kjt6wx2f\": \"azbac5zjoxel6pb2yvsqh70dgmcu98t1r43nwkafi\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/clwtest1\",\r\n \"name\": \"clwtest1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/clwtest2\",\r\n \"name\": \"clwtest2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-BatchService-WestUS/providers/Microsoft.Batch/batchAccounts/clw678\",\r\n \"name\": \"clw678\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk9501/providers/Microsoft.Batch/batchAccounts/onesdk916\",\r\n \"name\": \"onesdk916\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag2\": \"testval2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/testrpgroup/providers/Microsoft.Batch/batchAccounts/wenwu1007\",\r\n \"name\": \"wenwu1007\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567\",\r\n \"name\": \"clw567\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"k1\": \"\",\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5671\",\r\n \"name\": \"clw5671\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567123\",\r\n \"name\": \"clw567123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567123456\",\r\n \"name\": \"clw567123456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5672\",\r\n \"name\": \"clw5672\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5673\",\r\n \"name\": \"clw5673\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5674\",\r\n \"name\": \"clw5674\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5675\",\r\n \"name\": \"clw5675\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"k1\": \"\",\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw789\",\r\n \"name\": \"clw789\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest\",\r\n \"name\": \"clwtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest123\",\r\n \"name\": \"clwtest123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest456\",\r\n \"name\": \"clwtest456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng123\",\r\n \"name\": \"zfeng123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng234\",\r\n \"name\": \"zfeng234\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng345\",\r\n \"name\": \"zfeng345\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng456\",\r\n \"name\": \"zfeng456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng912118\",\r\n \"name\": \"zfeng912118\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng9121231\",\r\n \"name\": \"zfeng9121231\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng913306\",\r\n \"name\": \"zfeng913306\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng915422\",\r\n \"name\": \"zfeng915422\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng915619\",\r\n \"name\": \"zfeng915619\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengabc\",\r\n \"name\": \"zfengabc\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengbatch1\",\r\n \"name\": \"zfengbatch1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengclw\",\r\n \"name\": \"zfengclw\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengs607\",\r\n \"name\": \"zfengs607\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12534" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31821" + ], + "x-ms-request-id": [ + "3fdd223b-0d2b-40e4-8a96-59a07d38f190" + ], + "x-ms-correlation-request-id": [ + "3fdd223b-0d2b-40e4-8a96-59a07d38f190" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023348Z:3fdd223b-0d2b-40e4-8a96-59a07d38f190" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:33:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/azbacnhzf2\",\r\n \"name\": \"azbacnhzf2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbaccn0mf1juw5garhbk9q3vxl8d7i\": \"azbacr3u6l8ga5f1w7tjsd0cvqbz4knmhexpio92y\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/aztest1\",\r\n \"name\": \"aztest1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/aztest11\",\r\n \"name\": \"aztest11\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-ne/providers/Microsoft.Batch/batchAccounts/azbacykf2li0g\",\r\n \"name\": \"azbacykf2li0g\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbaczsgmy6p4a1c0il3b\": \"azbac9u1lydm6ebvs740kpgnowx8i52rctjf3qzah\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-we/providers/Microsoft.Batch/batchAccounts/azbac3mtkshf\",\r\n \"name\": \"azbac3mtkshf\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbac1s4853u9twc0yx7ihq2ej6nzdarokpmvlgbf\": \"azbaccg3l82tkpyzjoasn1f4vmq0d7u5he96briwx\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-wus/providers/Microsoft.Batch/batchAccounts/adnanzh1\",\r\n \"name\": \"adnanzh1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"adsdfgasujhd\": \"jdsfsdahgdfjheee\",\r\n \"adsdfgasujssshd\": \"jdsfsdahgdfjheeefgff\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchwestus/providers/Microsoft.Batch/batchAccounts/wenwu1007a1\",\r\n \"name\": \"wenwu1007a1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151135\",\r\n \"name\": \"zfeng9151135\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151138\",\r\n \"name\": \"zfeng9151138\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151141\",\r\n \"name\": \"zfeng9151141\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151157\",\r\n \"name\": \"zfeng9151157\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916114\",\r\n \"name\": \"zfeng916114\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161213\",\r\n \"name\": \"zfeng9161213\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161247\",\r\n \"name\": \"zfeng9161247\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161253\",\r\n \"name\": \"zfeng9161253\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161254\",\r\n \"name\": \"zfeng9161254\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916159\",\r\n \"name\": \"zfeng916159\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916735\",\r\n \"name\": \"zfeng916735\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/adnan\",\r\n \"name\": \"adnan\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/c123\",\r\n \"name\": \"c123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw\",\r\n \"name\": \"clw\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k3\": \"v3\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw1\",\r\n \"name\": \"clw1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw2\",\r\n \"name\": \"clw2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw3\",\r\n \"name\": \"clw3\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k11\": \"v11\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/azbacjnkyz\",\r\n \"name\": \"azbacjnkyz\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"azbac09duay1eb8ph5sloviz3crm4ngq7kjt6wx2f\": \"azbac5zjoxel6pb2yvsqh70dgmcu98t1r43nwkafi\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/clwtest1\",\r\n \"name\": \"clwtest1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/clwtest2\",\r\n \"name\": \"clwtest2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-BatchService-WestUS/providers/Microsoft.Batch/batchAccounts/clw678\",\r\n \"name\": \"clw678\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk4067/providers/Microsoft.Batch/batchAccounts/onesdk1725\",\r\n \"name\": \"onesdk1725\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk9501/providers/Microsoft.Batch/batchAccounts/onesdk916\",\r\n \"name\": \"onesdk916\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag2\": \"testval2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/testrpgroup/providers/Microsoft.Batch/batchAccounts/wenwu1007\",\r\n \"name\": \"wenwu1007\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567\",\r\n \"name\": \"clw567\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"k1\": \"\",\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5671\",\r\n \"name\": \"clw5671\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567123\",\r\n \"name\": \"clw567123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567123456\",\r\n \"name\": \"clw567123456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5672\",\r\n \"name\": \"clw5672\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5673\",\r\n \"name\": \"clw5673\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5674\",\r\n \"name\": \"clw5674\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5675\",\r\n \"name\": \"clw5675\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"k1\": \"\",\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw789\",\r\n \"name\": \"clw789\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest\",\r\n \"name\": \"clwtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest123\",\r\n \"name\": \"clwtest123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest456\",\r\n \"name\": \"clwtest456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng123\",\r\n \"name\": \"zfeng123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng234\",\r\n \"name\": \"zfeng234\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng345\",\r\n \"name\": \"zfeng345\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng456\",\r\n \"name\": \"zfeng456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng912118\",\r\n \"name\": \"zfeng912118\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng9121231\",\r\n \"name\": \"zfeng9121231\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng913306\",\r\n \"name\": \"zfeng913306\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng915422\",\r\n \"name\": \"zfeng915422\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng915619\",\r\n \"name\": \"zfeng915619\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengabc\",\r\n \"name\": \"zfengabc\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengbatch1\",\r\n \"name\": \"zfengbatch1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengclw\",\r\n \"name\": \"zfengclw\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengs607\",\r\n \"name\": \"zfengs607\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12780" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31818" + ], + "x-ms-request-id": [ + "daffd917-8b8c-43b1-9e08-88b85fad9181" + ], + "x-ms-correlation-request-id": [ + "daffd917-8b8c-43b1-9e08-88b85fad9181" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023505Z:daffd917-8b8c-43b1-9e08-88b85fad9181" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:35:05 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk4067/providers/Microsoft.Batch/batchAccounts/onesdk1725?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazQwNjcvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazE3MjU/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "74" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "172" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1144" + ], + "request-id": [ + "2c5b9a25-2ddf-46f6-9f0e-97ddd1ac0a1d" + ], + "x-ms-request-id": [ + "0ba5169a-637d-4099-baad-7091cb206e13" + ], + "x-ms-correlation-request-id": [ + "0ba5169a-637d-4099-baad-7091cb206e13" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023350Z:0ba5169a-637d-4099-baad-7091cb206e13" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:33:49 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk4067/providers/Microsoft.Batch/batchAccounts/onesdk1725/operationResults/2c5b9a25-2ddf-46f6-9f0e-97ddd1ac0a1d?api-version=2014-05-01-privatepreview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk4067/providers/Microsoft.Batch/batchAccounts/onesdk1725/operationResults/2c5b9a25-2ddf-46f6-9f0e-97ddd1ac0a1d?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazQwNjcvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazE3MjUvb3BlcmF0aW9uUmVzdWx0cy8yYzViOWEyNS0yZGRmLTQ2ZjYtOWYwZS05N2RkZDFhYzBhMWQ/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "172" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "request-id": [ + "dbb87b0b-a151-4951-b81c-828590282b68" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31820" + ], + "x-ms-request-id": [ + "9b73aae9-94c4-4a44-85ff-5cb74f0c982f" + ], + "x-ms-correlation-request-id": [ + "9b73aae9-94c4-4a44-85ff-5cb74f0c982f" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023350Z:9b73aae9-94c4-4a44-85ff-5cb74f0c982f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:33:49 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk4067/providers/Microsoft.Batch/batchAccounts/onesdk1725/operationResults/2c5b9a25-2ddf-46f6-9f0e-97ddd1ac0a1d?api-version=2014-05-01-privatepreview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk4067/providers/Microsoft.Batch/batchAccounts/onesdk1725/operationResults/2c5b9a25-2ddf-46f6-9f0e-97ddd1ac0a1d?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazQwNjcvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazE3MjUvb3BlcmF0aW9uUmVzdWx0cy8yYzViOWEyNS0yZGRmLTQ2ZjYtOWYwZS05N2RkZDFhYzBhMWQ/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "172" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk1725\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk1725.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk4067/providers/Microsoft.Batch/batchAccounts/onesdk1725\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "350" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Wed, 15 Oct 2014 02:34:05 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "3636c17a-39eb-4bdb-96a4-c44bb30f4182" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31819" + ], + "x-ms-request-id": [ + "45bdc4f6-03d7-416c-ba69-397e7fa769fa" + ], + "x-ms-correlation-request-id": [ + "45bdc4f6-03d7-416c-ba69-397e7fa769fa" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023405Z:45bdc4f6-03d7-416c-ba69-397e7fa769fa" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:34:05 GMT" + ], + "ETag": [ + "0x8D1B6379FB4A9D3" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk4067/providers/Microsoft.Batch/batchAccounts/onesdk1725?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazQwNjcvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazE3MjU/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "177" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "request-id": [ + "33c3f26e-0487-4092-8adc-9ae4095682b4" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1143" + ], + "x-ms-request-id": [ + "34b2b7aa-2f50-484e-9e88-ba0446298515" + ], + "x-ms-correlation-request-id": [ + "34b2b7aa-2f50-484e-9e88-ba0446298515" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023507Z:34b2b7aa-2f50-484e-9e88-ba0446298515" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:35:07 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk4067/providers/Microsoft.Batch/batchAccounts/onesdk1725/operationResults/33c3f26e-0487-4092-8adc-9ae4095682b4?api-version=2014-05-01-privatepreview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk4067/providers/Microsoft.Batch/batchAccounts/onesdk1725/operationResults/33c3f26e-0487-4092-8adc-9ae4095682b4?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazQwNjcvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazE3MjUvb3BlcmF0aW9uUmVzdWx0cy8zM2MzZjI2ZS0wNDg3LTQwOTItOGFkYy05YWU0MDk1NjgyYjQ/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "177" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Wed, 15 Oct 2014 02:35:08 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "08a4b7e3-6ba7-4089-b6a5-cb9d0e454552" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31817" + ], + "x-ms-request-id": [ + "31968d64-7a4b-460b-8a8e-325ca51451b1" + ], + "x-ms-correlation-request-id": [ + "31968d64-7a4b-460b-8a8e-325ca51451b1" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023507Z:31968d64-7a4b-460b-8a8e-325ca51451b1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:35:07 GMT" + ], + "ETag": [ + "0x8D1B637C503EEF1" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk4067?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazQwNjc/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "181" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1142" + ], + "x-ms-request-id": [ + "16340b0b-a119-4181-a1aa-ba5e439fe23e" + ], + "x-ms-correlation-request-id": [ + "16340b0b-a119-4181-a1aa-ba5e439fe23e" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023508Z:16340b0b-a119-4181-a1aa-ba5e439fe23e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:35:07 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0MDY3LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0MDY3LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczBNRFkzTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "181" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31815" + ], + "x-ms-request-id": [ + "7a524daa-9dc1-406d-ade9-2d68e64b36a8" + ], + "x-ms-correlation-request-id": [ + "7a524daa-9dc1-406d-ade9-2d68e64b36a8" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023508Z:7a524daa-9dc1-406d-ade9-2d68e64b36a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:35:07 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0MDY3LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0MDY3LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczBNRFkzTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "181" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31814" + ], + "x-ms-request-id": [ + "4330e10a-d1d6-49b1-a9a4-89c77bf71ca2" + ], + "x-ms-correlation-request-id": [ + "4330e10a-d1d6-49b1-a9a4-89c77bf71ca2" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023523Z:4330e10a-d1d6-49b1-a9a4-89c77bf71ca2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:35:23 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0MDY3LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0MDY3LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczBNRFkzTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "181" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31813" + ], + "x-ms-request-id": [ + "6ae71746-b515-442b-8923-1b390491353c" + ], + "x-ms-correlation-request-id": [ + "6ae71746-b515-442b-8923-1b390491353c" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023538Z:6ae71746-b515-442b-8923-1b390491353c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:35:37 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0MDY3LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0MDY3LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczBNRFkzTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "181" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31812" + ], + "x-ms-request-id": [ + "c70a9ab7-b8a2-4d37-87e7-22e48b3c3df4" + ], + "x-ms-correlation-request-id": [ + "c70a9ab7-b8a2-4d37-87e7-22e48b3c3df4" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023553Z:c70a9ab7-b8a2-4d37-87e7-22e48b3c3df4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:35:52 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-CreateExistingBatchAccount": [ + "onesdk1725", + "onesdk4067" + ] + }, + "Variables": { + "SubscriptionId": "4a06fe24-c197-4353-adc1-058d1a51924e" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Batch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestCreatesNewBatchAccount.json b/src/ResourceManager/Batch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestCreatesNewBatchAccount.json new file mode 100644 index 000000000000..ade22750bc28 --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestCreatesNewBatchAccount.json @@ -0,0 +1,1075 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.intelligentsystems\",\r\n \"namespace\": \"microsoft.intelligentsystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "21795" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31932" + ], + "x-ms-request-id": [ + "a7c1fa4f-a518-4f8e-917d-f9a3c5c7ee7f" + ], + "x-ms-correlation-request-id": [ + "a7c1fa4f-a518-4f8e-917d-f9a3c5c7ee7f" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022652Z:a7c1fa4f-a518-4f8e-917d-f9a3c5c7ee7f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:26:52 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk4630?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazQ2MzA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "102" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31931" + ], + "x-ms-request-id": [ + "13a18930-ae1f-40ef-ab0a-db5b67493b35" + ], + "x-ms-correlation-request-id": [ + "13a18930-ae1f-40ef-ab0a-db5b67493b35" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022652Z:13a18930-ae1f-40ef-ab0a-db5b67493b35" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:26:52 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk4630?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazQ2MzA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31923" + ], + "x-ms-request-id": [ + "0f73e67d-8556-4fad-8a30-ba846de21500" + ], + "x-ms-correlation-request-id": [ + "0f73e67d-8556-4fad-8a30-ba846de21500" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022727Z:0f73e67d-8556-4fad-8a30-ba846de21500" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:27:26 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk4630?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazQ2MzA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk4630\",\r\n \"name\": \"onesdk4630\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "183" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1169" + ], + "x-ms-request-id": [ + "2950efa7-b634-4e65-bdb6-025d7ad6b2b2" + ], + "x-ms-correlation-request-id": [ + "2950efa7-b634-4e65-bdb6-025d7ad6b2b2" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022653Z:2950efa7-b634-4e65-bdb6-025d7ad6b2b2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:26:53 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk4630/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazQ2MzAvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31930" + ], + "x-ms-request-id": [ + "cb8dac8a-5829-4863-91f8-945cf14c6a41" + ], + "x-ms-correlation-request-id": [ + "cb8dac8a-5829-4863-91f8-945cf14c6a41" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022653Z:cb8dac8a-5829-4863-91f8-945cf14c6a41" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:26:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk4630/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazQ2MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "centralus:0bbad039-2597-432e-84af-1b46d71e8ce8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31870" + ], + "x-ms-correlation-request-id": [ + "6374c415-fee5-49ba-be69-d4498907da64" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022653Z:6374c415-fee5-49ba-be69-d4498907da64" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:26:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/azbacnhzf2\",\r\n \"name\": \"azbacnhzf2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbaccn0mf1juw5garhbk9q3vxl8d7i\": \"azbacr3u6l8ga5f1w7tjsd0cvqbz4knmhexpio92y\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/aztest1\",\r\n \"name\": \"aztest1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/aztest11\",\r\n \"name\": \"aztest11\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-ne/providers/Microsoft.Batch/batchAccounts/azbacykf2li0g\",\r\n \"name\": \"azbacykf2li0g\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbaczsgmy6p4a1c0il3b\": \"azbac9u1lydm6ebvs740kpgnowx8i52rctjf3qzah\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-we/providers/Microsoft.Batch/batchAccounts/azbac3mtkshf\",\r\n \"name\": \"azbac3mtkshf\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbac1s4853u9twc0yx7ihq2ej6nzdarokpmvlgbf\": \"azbaccg3l82tkpyzjoasn1f4vmq0d7u5he96briwx\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-wus/providers/Microsoft.Batch/batchAccounts/adnanzh1\",\r\n \"name\": \"adnanzh1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"adsdfgasujhd\": \"jdsfsdahgdfjheee\",\r\n \"adsdfgasujssshd\": \"jdsfsdahgdfjheeefgff\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchwestus/providers/Microsoft.Batch/batchAccounts/wenwu1007a1\",\r\n \"name\": \"wenwu1007a1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151135\",\r\n \"name\": \"zfeng9151135\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151138\",\r\n \"name\": \"zfeng9151138\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151141\",\r\n \"name\": \"zfeng9151141\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151157\",\r\n \"name\": \"zfeng9151157\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916114\",\r\n \"name\": \"zfeng916114\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161213\",\r\n \"name\": \"zfeng9161213\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161247\",\r\n \"name\": \"zfeng9161247\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161253\",\r\n \"name\": \"zfeng9161253\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161254\",\r\n \"name\": \"zfeng9161254\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916159\",\r\n \"name\": \"zfeng916159\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916735\",\r\n \"name\": \"zfeng916735\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/adnan\",\r\n \"name\": \"adnan\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/c123\",\r\n \"name\": \"c123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw\",\r\n \"name\": \"clw\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k3\": \"v3\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw1\",\r\n \"name\": \"clw1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw2\",\r\n \"name\": \"clw2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw3\",\r\n \"name\": \"clw3\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k11\": \"v11\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/azbacjnkyz\",\r\n \"name\": \"azbacjnkyz\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"azbac09duay1eb8ph5sloviz3crm4ngq7kjt6wx2f\": \"azbac5zjoxel6pb2yvsqh70dgmcu98t1r43nwkafi\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/clwtest1\",\r\n \"name\": \"clwtest1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/clwtest2\",\r\n \"name\": \"clwtest2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-BatchService-WestUS/providers/Microsoft.Batch/batchAccounts/clw678\",\r\n \"name\": \"clw678\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk9501/providers/Microsoft.Batch/batchAccounts/onesdk916\",\r\n \"name\": \"onesdk916\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag2\": \"testval2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/testrpgroup/providers/Microsoft.Batch/batchAccounts/wenwu1007\",\r\n \"name\": \"wenwu1007\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567\",\r\n \"name\": \"clw567\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"k1\": \"\",\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5671\",\r\n \"name\": \"clw5671\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567123\",\r\n \"name\": \"clw567123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567123456\",\r\n \"name\": \"clw567123456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5672\",\r\n \"name\": \"clw5672\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5673\",\r\n \"name\": \"clw5673\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5674\",\r\n \"name\": \"clw5674\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5675\",\r\n \"name\": \"clw5675\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"k1\": \"\",\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw789\",\r\n \"name\": \"clw789\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest\",\r\n \"name\": \"clwtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest123\",\r\n \"name\": \"clwtest123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest456\",\r\n \"name\": \"clwtest456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng123\",\r\n \"name\": \"zfeng123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng234\",\r\n \"name\": \"zfeng234\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng345\",\r\n \"name\": \"zfeng345\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng456\",\r\n \"name\": \"zfeng456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng912118\",\r\n \"name\": \"zfeng912118\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng9121231\",\r\n \"name\": \"zfeng9121231\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng913306\",\r\n \"name\": \"zfeng913306\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng915422\",\r\n \"name\": \"zfeng915422\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng915619\",\r\n \"name\": \"zfeng915619\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengabc\",\r\n \"name\": \"zfengabc\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengbatch1\",\r\n \"name\": \"zfengbatch1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengclw\",\r\n \"name\": \"zfengclw\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengs607\",\r\n \"name\": \"zfengs607\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12534" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31929" + ], + "x-ms-request-id": [ + "69ebda7a-303b-42f9-ac87-77e88a7bfa05" + ], + "x-ms-correlation-request-id": [ + "69ebda7a-303b-42f9-ac87-77e88a7bfa05" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022653Z:69ebda7a-303b-42f9-ac87-77e88a7bfa05" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:26:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk4630/providers/Microsoft.Batch/batchAccounts/onesdk4107?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazQ2MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazQxMDc/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "74" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "71" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1168" + ], + "request-id": [ + "33f2c7d3-9a40-4a54-a1c5-6b1228f68005" + ], + "x-ms-request-id": [ + "21d7b486-a50f-4793-98e0-9c2aa53e58fc" + ], + "x-ms-correlation-request-id": [ + "21d7b486-a50f-4793-98e0-9c2aa53e58fc" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022655Z:21d7b486-a50f-4793-98e0-9c2aa53e58fc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:26:55 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk4630/providers/Microsoft.Batch/batchAccounts/onesdk4107/operationResults/33f2c7d3-9a40-4a54-a1c5-6b1228f68005?api-version=2014-05-01-privatepreview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk4630/providers/Microsoft.Batch/batchAccounts/onesdk4107/operationResults/33f2c7d3-9a40-4a54-a1c5-6b1228f68005?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazQ2MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazQxMDcvb3BlcmF0aW9uUmVzdWx0cy8zM2YyYzdkMy05YTQwLTRhNTQtYTFjNS02YjEyMjhmNjgwMDU/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "71" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "request-id": [ + "9a8f148f-e9b7-400e-84ba-29ce64998b1f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31928" + ], + "x-ms-request-id": [ + "f13157de-fcca-4e91-8400-3d077152d68e" + ], + "x-ms-correlation-request-id": [ + "f13157de-fcca-4e91-8400-3d077152d68e" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022655Z:f13157de-fcca-4e91-8400-3d077152d68e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:26:55 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk4630/providers/Microsoft.Batch/batchAccounts/onesdk4107/operationResults/33f2c7d3-9a40-4a54-a1c5-6b1228f68005?api-version=2014-05-01-privatepreview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk4630/providers/Microsoft.Batch/batchAccounts/onesdk4107/operationResults/33f2c7d3-9a40-4a54-a1c5-6b1228f68005?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazQ2MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazQxMDcvb3BlcmF0aW9uUmVzdWx0cy8zM2YyYzdkMy05YTQwLTRhNTQtYTFjNS02YjEyMjhmNjgwMDU/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "71" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk4107\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk4107.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk4630/providers/Microsoft.Batch/batchAccounts/onesdk4107\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "350" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Wed, 15 Oct 2014 02:27:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "33fce9aa-e9a3-495d-895a-31ecf3453170" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31927" + ], + "x-ms-request-id": [ + "3bd45eb6-69c2-4a43-afa0-88dfacb64fe5" + ], + "x-ms-correlation-request-id": [ + "3bd45eb6-69c2-4a43-afa0-88dfacb64fe5" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022710Z:3bd45eb6-69c2-4a43-afa0-88dfacb64fe5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:27:10 GMT" + ], + "ETag": [ + "0x8D1B636A8B6BE0F" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk4630/providers/Microsoft.Batch/batchAccounts/onesdk4107?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazQ2MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazQxMDc/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk4107\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk4107.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk4630/providers/Microsoft.Batch/batchAccounts/onesdk4107\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "350" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Wed, 15 Oct 2014 02:27:11 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "55a94aa6-11a3-4737-8551-bc194f9cd92d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31926" + ], + "x-ms-request-id": [ + "995a241c-c571-43fe-ae19-96bcf78c9d4a" + ], + "x-ms-correlation-request-id": [ + "995a241c-c571-43fe-ae19-96bcf78c9d4a" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022711Z:995a241c-c571-43fe-ae19-96bcf78c9d4a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:27:10 GMT" + ], + "ETag": [ + "0x8D1B636A8E34FA6" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk4630/providers/Microsoft.Batch/batchAccounts/onesdk4107?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazQ2MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazQxMDc/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "76" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "request-id": [ + "333ca3df-89bf-43cb-8b7e-91a1bd391f46" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1167" + ], + "x-ms-request-id": [ + "7f735a55-b298-4af0-a966-27569c4ffe78" + ], + "x-ms-correlation-request-id": [ + "7f735a55-b298-4af0-a966-27569c4ffe78" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022711Z:7f735a55-b298-4af0-a966-27569c4ffe78" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:27:11 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk4630/providers/Microsoft.Batch/batchAccounts/onesdk4107/operationResults/333ca3df-89bf-43cb-8b7e-91a1bd391f46?api-version=2014-05-01-privatepreview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk4630/providers/Microsoft.Batch/batchAccounts/onesdk4107/operationResults/333ca3df-89bf-43cb-8b7e-91a1bd391f46?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazQ2MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazQxMDcvb3BlcmF0aW9uUmVzdWx0cy8zMzNjYTNkZi04OWJmLTQzY2ItOGI3ZS05MWExYmQzOTFmNDY/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "76" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "request-id": [ + "659a9f71-dcfc-4726-8693-07ab05a26721" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31925" + ], + "x-ms-request-id": [ + "ca36518e-0e0d-4518-a35d-569cc75cb20e" + ], + "x-ms-correlation-request-id": [ + "ca36518e-0e0d-4518-a35d-569cc75cb20e" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022712Z:ca36518e-0e0d-4518-a35d-569cc75cb20e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:27:11 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk4630/providers/Microsoft.Batch/batchAccounts/onesdk4107/operationResults/333ca3df-89bf-43cb-8b7e-91a1bd391f46?api-version=2014-05-01-privatepreview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk4630/providers/Microsoft.Batch/batchAccounts/onesdk4107/operationResults/333ca3df-89bf-43cb-8b7e-91a1bd391f46?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazQ2MzAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazQxMDcvb3BlcmF0aW9uUmVzdWx0cy8zMzNjYTNkZi04OWJmLTQzY2ItOGI3ZS05MWExYmQzOTFmNDY/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "76" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Wed, 15 Oct 2014 02:27:27 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "96be1e4d-d24b-4949-9b94-1332b9160191" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31924" + ], + "x-ms-request-id": [ + "a3650292-3db7-44bb-9385-3d39b70ea3df" + ], + "x-ms-correlation-request-id": [ + "a3650292-3db7-44bb-9385-3d39b70ea3df" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022727Z:a3650292-3db7-44bb-9385-3d39b70ea3df" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:27:26 GMT" + ], + "ETag": [ + "0x8D1B636B28057FE" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk4630?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazQ2MzA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "81" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1166" + ], + "x-ms-request-id": [ + "fb20e93f-1ca4-4c0b-9719-78e2e589c3d4" + ], + "x-ms-correlation-request-id": [ + "fb20e93f-1ca4-4c0b-9719-78e2e589c3d4" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022727Z:fb20e93f-1ca4-4c0b-9719-78e2e589c3d4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:27:27 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0NjMwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0NjMwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczBOak13TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "81" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31922" + ], + "x-ms-request-id": [ + "33c21537-b91e-43a7-876e-d69d3e667dbd" + ], + "x-ms-correlation-request-id": [ + "33c21537-b91e-43a7-876e-d69d3e667dbd" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022727Z:33c21537-b91e-43a7-876e-d69d3e667dbd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:27:27 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0NjMwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0NjMwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczBOak13TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "81" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31921" + ], + "x-ms-request-id": [ + "4e3f38a9-b924-4fdb-b8d1-16219a83e78d" + ], + "x-ms-correlation-request-id": [ + "4e3f38a9-b924-4fdb-b8d1-16219a83e78d" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022742Z:4e3f38a9-b924-4fdb-b8d1-16219a83e78d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:27:42 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0NjMwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0NjMwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczBOak13TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "81" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31920" + ], + "x-ms-request-id": [ + "1cbf168d-72b2-44a7-834b-326a7246ff65" + ], + "x-ms-correlation-request-id": [ + "1cbf168d-72b2-44a7-834b-326a7246ff65" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022757Z:1cbf168d-72b2-44a7-834b-326a7246ff65" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:27:57 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0NjMwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs0NjMwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczBOak13TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "81" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31919" + ], + "x-ms-request-id": [ + "aa7cd990-18a5-4d93-a9a5-83c28a73ddb6" + ], + "x-ms-correlation-request-id": [ + "aa7cd990-18a5-4d93-a9a5-83c28a73ddb6" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022813Z:aa7cd990-18a5-4d93-a9a5-83c28a73ddb6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:28:13 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-CreatesNewBatchAccount": [ + "onesdk4107", + "onesdk4630" + ] + }, + "Variables": { + "SubscriptionId": "4a06fe24-c197-4353-adc1-058d1a51924e" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Batch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestGetBatchAccountsUnderResourceGroups.json b/src/ResourceManager/Batch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestGetBatchAccountsUnderResourceGroups.json new file mode 100644 index 000000000000..f37fea3ddba7 --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestGetBatchAccountsUnderResourceGroups.json @@ -0,0 +1,2383 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.intelligentsystems\",\r\n \"namespace\": \"microsoft.intelligentsystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "21795" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31854" + ], + "x-ms-request-id": [ + "df714c85-281e-4da1-baa2-319375e07a56" + ], + "x-ms-correlation-request-id": [ + "df714c85-281e-4da1-baa2-319375e07a56" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023022Z:df714c85-281e-4da1-baa2-319375e07a56" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:30:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk6761?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazY3NjE/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "102" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31853" + ], + "x-ms-request-id": [ + "59da3808-264a-401a-a012-5a3c4850ed70" + ], + "x-ms-correlation-request-id": [ + "59da3808-264a-401a-a012-5a3c4850ed70" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023022Z:59da3808-264a-401a-a012-5a3c4850ed70" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:30:22 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk6761?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazY3NjE/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31836" + ], + "x-ms-request-id": [ + "04f6f9bd-a76f-4ae0-a3c6-9ac982269999" + ], + "x-ms-correlation-request-id": [ + "04f6f9bd-a76f-4ae0-a3c6-9ac982269999" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023118Z:04f6f9bd-a76f-4ae0-a3c6-9ac982269999" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:31:18 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk6761?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazY3NjE/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6761\",\r\n \"name\": \"onesdk6761\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "183" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1157" + ], + "x-ms-request-id": [ + "6470c42f-c41f-4d2e-8716-84ade7b39adb" + ], + "x-ms-correlation-request-id": [ + "6470c42f-c41f-4d2e-8716-84ade7b39adb" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023022Z:6470c42f-c41f-4d2e-8716-84ade7b39adb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:30:22 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6761/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazY3NjEvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31852" + ], + "x-ms-request-id": [ + "15b7e8d2-fbf5-4f66-bc2f-d017744078a3" + ], + "x-ms-correlation-request-id": [ + "15b7e8d2-fbf5-4f66-bc2f-d017744078a3" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023022Z:15b7e8d2-fbf5-4f66-bc2f-d017744078a3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:30:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk6761/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazY3NjEvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "centralus:42c8839e-c020-403a-bbc3-3fc373ce79b2" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31917" + ], + "x-ms-correlation-request-id": [ + "d1908d9a-7f79-4578-90db-e87bfc78119c" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023023Z:d1908d9a-7f79-4578-90db-e87bfc78119c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:30:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk1390?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazEzOTA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "102" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31851" + ], + "x-ms-request-id": [ + "6add3aa7-3534-4d0b-9fde-667aeb07a6ff" + ], + "x-ms-correlation-request-id": [ + "6add3aa7-3534-4d0b-9fde-667aeb07a6ff" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023023Z:6add3aa7-3534-4d0b-9fde-667aeb07a6ff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:30:22 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk1390?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazEzOTA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31829" + ], + "x-ms-request-id": [ + "15e79a12-8d77-448c-a834-2dfa7e4777d2" + ], + "x-ms-correlation-request-id": [ + "15e79a12-8d77-448c-a834-2dfa7e4777d2" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023220Z:15e79a12-8d77-448c-a834-2dfa7e4777d2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:32:19 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk1390?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazEzOTA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk1390\",\r\n \"name\": \"onesdk1390\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "183" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1156" + ], + "x-ms-request-id": [ + "5ee4df9b-e40b-4f94-b60c-c9f7178a5945" + ], + "x-ms-correlation-request-id": [ + "5ee4df9b-e40b-4f94-b60c-c9f7178a5945" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023023Z:5ee4df9b-e40b-4f94-b60c-c9f7178a5945" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:30:23 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk1390/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazEzOTAvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31850" + ], + "x-ms-request-id": [ + "a94af083-22e2-423e-a834-c72ec0039aff" + ], + "x-ms-correlation-request-id": [ + "a94af083-22e2-423e-a834-c72ec0039aff" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023023Z:a94af083-22e2-423e-a834-c72ec0039aff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:30:23 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk1390/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazEzOTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "centralus:ba3fb959-5062-4eba-b243-018946cf5ded" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31916" + ], + "x-ms-correlation-request-id": [ + "ec9a8c47-f25b-4ca8-8473-3821a83fe84b" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023023Z:ec9a8c47-f25b-4ca8-8473-3821a83fe84b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:30:23 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/azbacnhzf2\",\r\n \"name\": \"azbacnhzf2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbaccn0mf1juw5garhbk9q3vxl8d7i\": \"azbacr3u6l8ga5f1w7tjsd0cvqbz4knmhexpio92y\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/aztest1\",\r\n \"name\": \"aztest1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/aztest11\",\r\n \"name\": \"aztest11\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-ne/providers/Microsoft.Batch/batchAccounts/azbacykf2li0g\",\r\n \"name\": \"azbacykf2li0g\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbaczsgmy6p4a1c0il3b\": \"azbac9u1lydm6ebvs740kpgnowx8i52rctjf3qzah\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-we/providers/Microsoft.Batch/batchAccounts/azbac3mtkshf\",\r\n \"name\": \"azbac3mtkshf\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbac1s4853u9twc0yx7ihq2ej6nzdarokpmvlgbf\": \"azbaccg3l82tkpyzjoasn1f4vmq0d7u5he96briwx\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-wus/providers/Microsoft.Batch/batchAccounts/adnanzh1\",\r\n \"name\": \"adnanzh1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"adsdfgasujhd\": \"jdsfsdahgdfjheee\",\r\n \"adsdfgasujssshd\": \"jdsfsdahgdfjheeefgff\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchwestus/providers/Microsoft.Batch/batchAccounts/wenwu1007a1\",\r\n \"name\": \"wenwu1007a1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151135\",\r\n \"name\": \"zfeng9151135\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151138\",\r\n \"name\": \"zfeng9151138\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151141\",\r\n \"name\": \"zfeng9151141\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151157\",\r\n \"name\": \"zfeng9151157\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916114\",\r\n \"name\": \"zfeng916114\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161213\",\r\n \"name\": \"zfeng9161213\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161247\",\r\n \"name\": \"zfeng9161247\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161253\",\r\n \"name\": \"zfeng9161253\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161254\",\r\n \"name\": \"zfeng9161254\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916159\",\r\n \"name\": \"zfeng916159\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916735\",\r\n \"name\": \"zfeng916735\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/adnan\",\r\n \"name\": \"adnan\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/c123\",\r\n \"name\": \"c123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw\",\r\n \"name\": \"clw\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k3\": \"v3\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw1\",\r\n \"name\": \"clw1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw2\",\r\n \"name\": \"clw2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw3\",\r\n \"name\": \"clw3\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k11\": \"v11\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/azbacjnkyz\",\r\n \"name\": \"azbacjnkyz\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"azbac09duay1eb8ph5sloviz3crm4ngq7kjt6wx2f\": \"azbac5zjoxel6pb2yvsqh70dgmcu98t1r43nwkafi\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/clwtest1\",\r\n \"name\": \"clwtest1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/clwtest2\",\r\n \"name\": \"clwtest2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-BatchService-WestUS/providers/Microsoft.Batch/batchAccounts/clw678\",\r\n \"name\": \"clw678\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk9501/providers/Microsoft.Batch/batchAccounts/onesdk916\",\r\n \"name\": \"onesdk916\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag2\": \"testval2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/testrpgroup/providers/Microsoft.Batch/batchAccounts/wenwu1007\",\r\n \"name\": \"wenwu1007\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567\",\r\n \"name\": \"clw567\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"k1\": \"\",\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5671\",\r\n \"name\": \"clw5671\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567123\",\r\n \"name\": \"clw567123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567123456\",\r\n \"name\": \"clw567123456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5672\",\r\n \"name\": \"clw5672\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5673\",\r\n \"name\": \"clw5673\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5674\",\r\n \"name\": \"clw5674\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5675\",\r\n \"name\": \"clw5675\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"k1\": \"\",\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw789\",\r\n \"name\": \"clw789\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest\",\r\n \"name\": \"clwtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest123\",\r\n \"name\": \"clwtest123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest456\",\r\n \"name\": \"clwtest456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng123\",\r\n \"name\": \"zfeng123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng234\",\r\n \"name\": \"zfeng234\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng345\",\r\n \"name\": \"zfeng345\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng456\",\r\n \"name\": \"zfeng456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng912118\",\r\n \"name\": \"zfeng912118\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng9121231\",\r\n \"name\": \"zfeng9121231\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng913306\",\r\n \"name\": \"zfeng913306\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng915422\",\r\n \"name\": \"zfeng915422\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng915619\",\r\n \"name\": \"zfeng915619\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengabc\",\r\n \"name\": \"zfengabc\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengbatch1\",\r\n \"name\": \"zfengbatch1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengclw\",\r\n \"name\": \"zfengclw\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengs607\",\r\n \"name\": \"zfengs607\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12534" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31849" + ], + "x-ms-request-id": [ + "d9c81b87-16a2-4af1-9b3e-4aa68013810b" + ], + "x-ms-correlation-request-id": [ + "d9c81b87-16a2-4af1-9b3e-4aa68013810b" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023023Z:d9c81b87-16a2-4af1-9b3e-4aa68013810b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:30:23 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/azbacnhzf2\",\r\n \"name\": \"azbacnhzf2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbaccn0mf1juw5garhbk9q3vxl8d7i\": \"azbacr3u6l8ga5f1w7tjsd0cvqbz4knmhexpio92y\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/aztest1\",\r\n \"name\": \"aztest1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/aztest11\",\r\n \"name\": \"aztest11\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-ne/providers/Microsoft.Batch/batchAccounts/azbacykf2li0g\",\r\n \"name\": \"azbacykf2li0g\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbaczsgmy6p4a1c0il3b\": \"azbac9u1lydm6ebvs740kpgnowx8i52rctjf3qzah\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-we/providers/Microsoft.Batch/batchAccounts/azbac3mtkshf\",\r\n \"name\": \"azbac3mtkshf\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbac1s4853u9twc0yx7ihq2ej6nzdarokpmvlgbf\": \"azbaccg3l82tkpyzjoasn1f4vmq0d7u5he96briwx\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-wus/providers/Microsoft.Batch/batchAccounts/adnanzh1\",\r\n \"name\": \"adnanzh1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"adsdfgasujhd\": \"jdsfsdahgdfjheee\",\r\n \"adsdfgasujssshd\": \"jdsfsdahgdfjheeefgff\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchwestus/providers/Microsoft.Batch/batchAccounts/wenwu1007a1\",\r\n \"name\": \"wenwu1007a1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151135\",\r\n \"name\": \"zfeng9151135\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151138\",\r\n \"name\": \"zfeng9151138\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151141\",\r\n \"name\": \"zfeng9151141\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151157\",\r\n \"name\": \"zfeng9151157\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916114\",\r\n \"name\": \"zfeng916114\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161213\",\r\n \"name\": \"zfeng9161213\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161247\",\r\n \"name\": \"zfeng9161247\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161253\",\r\n \"name\": \"zfeng9161253\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161254\",\r\n \"name\": \"zfeng9161254\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916159\",\r\n \"name\": \"zfeng916159\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916735\",\r\n \"name\": \"zfeng916735\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/adnan\",\r\n \"name\": \"adnan\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/c123\",\r\n \"name\": \"c123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw\",\r\n \"name\": \"clw\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k3\": \"v3\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw1\",\r\n \"name\": \"clw1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw2\",\r\n \"name\": \"clw2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw3\",\r\n \"name\": \"clw3\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k11\": \"v11\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/azbacjnkyz\",\r\n \"name\": \"azbacjnkyz\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"azbac09duay1eb8ph5sloviz3crm4ngq7kjt6wx2f\": \"azbac5zjoxel6pb2yvsqh70dgmcu98t1r43nwkafi\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/clwtest1\",\r\n \"name\": \"clwtest1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/clwtest2\",\r\n \"name\": \"clwtest2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-BatchService-WestUS/providers/Microsoft.Batch/batchAccounts/clw678\",\r\n \"name\": \"clw678\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk9501/providers/Microsoft.Batch/batchAccounts/onesdk916\",\r\n \"name\": \"onesdk916\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag2\": \"testval2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/testrpgroup/providers/Microsoft.Batch/batchAccounts/wenwu1007\",\r\n \"name\": \"wenwu1007\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567\",\r\n \"name\": \"clw567\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"k1\": \"\",\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5671\",\r\n \"name\": \"clw5671\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567123\",\r\n \"name\": \"clw567123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567123456\",\r\n \"name\": \"clw567123456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5672\",\r\n \"name\": \"clw5672\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5673\",\r\n \"name\": \"clw5673\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5674\",\r\n \"name\": \"clw5674\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5675\",\r\n \"name\": \"clw5675\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"k1\": \"\",\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw789\",\r\n \"name\": \"clw789\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest\",\r\n \"name\": \"clwtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest123\",\r\n \"name\": \"clwtest123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest456\",\r\n \"name\": \"clwtest456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng123\",\r\n \"name\": \"zfeng123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng234\",\r\n \"name\": \"zfeng234\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng345\",\r\n \"name\": \"zfeng345\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng456\",\r\n \"name\": \"zfeng456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng912118\",\r\n \"name\": \"zfeng912118\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng9121231\",\r\n \"name\": \"zfeng9121231\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng913306\",\r\n \"name\": \"zfeng913306\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng915422\",\r\n \"name\": \"zfeng915422\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng915619\",\r\n \"name\": \"zfeng915619\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengabc\",\r\n \"name\": \"zfengabc\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengbatch1\",\r\n \"name\": \"zfengbatch1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengclw\",\r\n \"name\": \"zfengclw\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengs607\",\r\n \"name\": \"zfengs607\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12534" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31846" + ], + "x-ms-request-id": [ + "69f4b134-08cd-4801-8b0e-661e2d1c4175" + ], + "x-ms-correlation-request-id": [ + "69f4b134-08cd-4801-8b0e-661e2d1c4175" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023041Z:69f4b134-08cd-4801-8b0e-661e2d1c4175" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:30:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/azbacnhzf2\",\r\n \"name\": \"azbacnhzf2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbaccn0mf1juw5garhbk9q3vxl8d7i\": \"azbacr3u6l8ga5f1w7tjsd0cvqbz4knmhexpio92y\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/aztest1\",\r\n \"name\": \"aztest1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/aztest11\",\r\n \"name\": \"aztest11\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-ne/providers/Microsoft.Batch/batchAccounts/azbacykf2li0g\",\r\n \"name\": \"azbacykf2li0g\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbaczsgmy6p4a1c0il3b\": \"azbac9u1lydm6ebvs740kpgnowx8i52rctjf3qzah\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-we/providers/Microsoft.Batch/batchAccounts/azbac3mtkshf\",\r\n \"name\": \"azbac3mtkshf\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbac1s4853u9twc0yx7ihq2ej6nzdarokpmvlgbf\": \"azbaccg3l82tkpyzjoasn1f4vmq0d7u5he96briwx\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-wus/providers/Microsoft.Batch/batchAccounts/adnanzh1\",\r\n \"name\": \"adnanzh1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"adsdfgasujhd\": \"jdsfsdahgdfjheee\",\r\n \"adsdfgasujssshd\": \"jdsfsdahgdfjheeefgff\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchwestus/providers/Microsoft.Batch/batchAccounts/wenwu1007a1\",\r\n \"name\": \"wenwu1007a1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151135\",\r\n \"name\": \"zfeng9151135\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151138\",\r\n \"name\": \"zfeng9151138\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151141\",\r\n \"name\": \"zfeng9151141\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151157\",\r\n \"name\": \"zfeng9151157\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916114\",\r\n \"name\": \"zfeng916114\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161213\",\r\n \"name\": \"zfeng9161213\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161247\",\r\n \"name\": \"zfeng9161247\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161253\",\r\n \"name\": \"zfeng9161253\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161254\",\r\n \"name\": \"zfeng9161254\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916159\",\r\n \"name\": \"zfeng916159\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916735\",\r\n \"name\": \"zfeng916735\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/adnan\",\r\n \"name\": \"adnan\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/c123\",\r\n \"name\": \"c123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw\",\r\n \"name\": \"clw\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k3\": \"v3\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw1\",\r\n \"name\": \"clw1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw2\",\r\n \"name\": \"clw2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw3\",\r\n \"name\": \"clw3\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k11\": \"v11\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/azbacjnkyz\",\r\n \"name\": \"azbacjnkyz\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"azbac09duay1eb8ph5sloviz3crm4ngq7kjt6wx2f\": \"azbac5zjoxel6pb2yvsqh70dgmcu98t1r43nwkafi\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/clwtest1\",\r\n \"name\": \"clwtest1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/clwtest2\",\r\n \"name\": \"clwtest2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-BatchService-WestUS/providers/Microsoft.Batch/batchAccounts/clw678\",\r\n \"name\": \"clw678\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6761/providers/Microsoft.Batch/batchAccounts/onesdk4680\",\r\n \"name\": \"onesdk4680\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk9501/providers/Microsoft.Batch/batchAccounts/onesdk916\",\r\n \"name\": \"onesdk916\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag2\": \"testval2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/testrpgroup/providers/Microsoft.Batch/batchAccounts/wenwu1007\",\r\n \"name\": \"wenwu1007\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567\",\r\n \"name\": \"clw567\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"k1\": \"\",\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5671\",\r\n \"name\": \"clw5671\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567123\",\r\n \"name\": \"clw567123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567123456\",\r\n \"name\": \"clw567123456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5672\",\r\n \"name\": \"clw5672\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5673\",\r\n \"name\": \"clw5673\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5674\",\r\n \"name\": \"clw5674\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5675\",\r\n \"name\": \"clw5675\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"k1\": \"\",\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw789\",\r\n \"name\": \"clw789\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest\",\r\n \"name\": \"clwtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest123\",\r\n \"name\": \"clwtest123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest456\",\r\n \"name\": \"clwtest456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng123\",\r\n \"name\": \"zfeng123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng234\",\r\n \"name\": \"zfeng234\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng345\",\r\n \"name\": \"zfeng345\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng456\",\r\n \"name\": \"zfeng456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng912118\",\r\n \"name\": \"zfeng912118\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng9121231\",\r\n \"name\": \"zfeng9121231\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng913306\",\r\n \"name\": \"zfeng913306\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng915422\",\r\n \"name\": \"zfeng915422\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng915619\",\r\n \"name\": \"zfeng915619\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengabc\",\r\n \"name\": \"zfengabc\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengbatch1\",\r\n \"name\": \"zfengbatch1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengclw\",\r\n \"name\": \"zfengclw\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengs607\",\r\n \"name\": \"zfengs607\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12751" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31843" + ], + "x-ms-request-id": [ + "b8ac4d79-d215-478a-8834-486b961ade90" + ], + "x-ms-correlation-request-id": [ + "b8ac4d79-d215-478a-8834-486b961ade90" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023058Z:b8ac4d79-d215-478a-8834-486b961ade90" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:30:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6761/providers/Microsoft.Batch/batchAccounts/onesdk4680?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazY3NjEvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazQ2ODA/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "29" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "124" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1155" + ], + "request-id": [ + "1ba9964c-fc4b-438d-aacb-11c2599c7442" + ], + "x-ms-request-id": [ + "d2ee41b6-ac67-458e-9571-aedef0a03ada" + ], + "x-ms-correlation-request-id": [ + "d2ee41b6-ac67-458e-9571-aedef0a03ada" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023025Z:d2ee41b6-ac67-458e-9571-aedef0a03ada" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:30:25 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6761/providers/Microsoft.Batch/batchAccounts/onesdk4680/operationResults/1ba9964c-fc4b-438d-aacb-11c2599c7442?api-version=2014-05-01-privatepreview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6761/providers/Microsoft.Batch/batchAccounts/onesdk4680/operationResults/1ba9964c-fc4b-438d-aacb-11c2599c7442?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazY3NjEvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazQ2ODAvb3BlcmF0aW9uUmVzdWx0cy8xYmE5OTY0Yy1mYzRiLTQzOGQtYWFjYi0xMWMyNTk5Yzc0NDI/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "124" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "request-id": [ + "1eecdf94-5247-4592-928a-5ca68a556c6d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31848" + ], + "x-ms-request-id": [ + "3f319ea1-888d-41f2-8798-2a9c8f4bed73" + ], + "x-ms-correlation-request-id": [ + "3f319ea1-888d-41f2-8798-2a9c8f4bed73" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023025Z:3f319ea1-888d-41f2-8798-2a9c8f4bed73" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:30:25 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6761/providers/Microsoft.Batch/batchAccounts/onesdk4680/operationResults/1ba9964c-fc4b-438d-aacb-11c2599c7442?api-version=2014-05-01-privatepreview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6761/providers/Microsoft.Batch/batchAccounts/onesdk4680/operationResults/1ba9964c-fc4b-438d-aacb-11c2599c7442?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazY3NjEvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazQ2ODAvb3BlcmF0aW9uUmVzdWx0cy8xYmE5OTY0Yy1mYzRiLTQzOGQtYWFjYi0xMWMyNTk5Yzc0NDI/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "124" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk4680\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk4680.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6761/providers/Microsoft.Batch/batchAccounts/onesdk4680\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "321" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Wed, 15 Oct 2014 02:30:40 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "3ea44084-025e-4be3-8736-f7141d7ecb77" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31847" + ], + "x-ms-request-id": [ + "b64a14a2-290a-4818-a5c1-24544c8f7efd" + ], + "x-ms-correlation-request-id": [ + "b64a14a2-290a-4818-a5c1-24544c8f7efd" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023041Z:b64a14a2-290a-4818-a5c1-24544c8f7efd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:30:41 GMT" + ], + "ETag": [ + "0x8D1B63725B801A0" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6761/providers/Microsoft.Batch/batchAccounts/onesdk3775?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazY3NjEvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM3NzU/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "29" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "129" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1154" + ], + "request-id": [ + "8aa6ce46-ab51-4c19-890c-ec0035fb944f" + ], + "x-ms-request-id": [ + "aee3a36f-1df8-406f-bbca-4953c7e37a99" + ], + "x-ms-correlation-request-id": [ + "aee3a36f-1df8-406f-bbca-4953c7e37a99" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023042Z:aee3a36f-1df8-406f-bbca-4953c7e37a99" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:30:42 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6761/providers/Microsoft.Batch/batchAccounts/onesdk3775/operationResults/8aa6ce46-ab51-4c19-890c-ec0035fb944f?api-version=2014-05-01-privatepreview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6761/providers/Microsoft.Batch/batchAccounts/onesdk3775/operationResults/8aa6ce46-ab51-4c19-890c-ec0035fb944f?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazY3NjEvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM3NzUvb3BlcmF0aW9uUmVzdWx0cy84YWE2Y2U0Ni1hYjUxLTRjMTktODkwYy1lYzAwMzVmYjk0NGY/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "129" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "request-id": [ + "d2c7b6ca-3d68-4b83-9e28-40e38e95ddab" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31845" + ], + "x-ms-request-id": [ + "979e75eb-7eb2-4fed-ab89-60b5c1b64be1" + ], + "x-ms-correlation-request-id": [ + "979e75eb-7eb2-4fed-ab89-60b5c1b64be1" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023043Z:979e75eb-7eb2-4fed-ab89-60b5c1b64be1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:30:42 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6761/providers/Microsoft.Batch/batchAccounts/onesdk3775/operationResults/8aa6ce46-ab51-4c19-890c-ec0035fb944f?api-version=2014-05-01-privatepreview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6761/providers/Microsoft.Batch/batchAccounts/onesdk3775/operationResults/8aa6ce46-ab51-4c19-890c-ec0035fb944f?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazY3NjEvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM3NzUvb3BlcmF0aW9uUmVzdWx0cy84YWE2Y2U0Ni1hYjUxLTRjMTktODkwYy1lYzAwMzVmYjk0NGY/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "129" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk3775\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk3775.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6761/providers/Microsoft.Batch/batchAccounts/onesdk3775\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "321" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Wed, 15 Oct 2014 02:30:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "a26011dd-af07-4e0f-b106-8b9c8ca515ea" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31844" + ], + "x-ms-request-id": [ + "bbeeb4fb-b619-4b17-9ef5-d1fdf562c341" + ], + "x-ms-correlation-request-id": [ + "bbeeb4fb-b619-4b17-9ef5-d1fdf562c341" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023058Z:bbeeb4fb-b619-4b17-9ef5-d1fdf562c341" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:30:57 GMT" + ], + "ETag": [ + "0x8D1B637301192ED" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk1390/providers/Microsoft.Batch/batchAccounts/onesdk1163?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazEzOTAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazExNjM/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "29" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "134" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1153" + ], + "request-id": [ + "d46a42b7-9c9d-4306-96dd-530fd50b8693" + ], + "x-ms-request-id": [ + "ed9617e3-9584-4ae2-be64-1e78391baae1" + ], + "x-ms-correlation-request-id": [ + "ed9617e3-9584-4ae2-be64-1e78391baae1" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023100Z:ed9617e3-9584-4ae2-be64-1e78391baae1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:31:00 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk1390/providers/Microsoft.Batch/batchAccounts/onesdk1163/operationResults/d46a42b7-9c9d-4306-96dd-530fd50b8693?api-version=2014-05-01-privatepreview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk1390/providers/Microsoft.Batch/batchAccounts/onesdk1163/operationResults/d46a42b7-9c9d-4306-96dd-530fd50b8693?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazEzOTAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazExNjMvb3BlcmF0aW9uUmVzdWx0cy9kNDZhNDJiNy05YzlkLTQzMDYtOTZkZC01MzBmZDUwYjg2OTM/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "134" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk1163\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk1163.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk1390/providers/Microsoft.Batch/batchAccounts/onesdk1163\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "321" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Wed, 15 Oct 2014 02:31:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "949d8f35-16ee-4104-bca8-76f71b7ea581" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31842" + ], + "x-ms-request-id": [ + "e9cae999-b416-4c1c-adee-f7d08d10eda8" + ], + "x-ms-correlation-request-id": [ + "e9cae999-b416-4c1c-adee-f7d08d10eda8" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023100Z:e9cae999-b416-4c1c-adee-f7d08d10eda8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:31:00 GMT" + ], + "ETag": [ + "0x8D1B637313FBE6F" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Batch/batchAccounts?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Byb3ZpZGVycy9NaWNyb3NvZnQuQmF0Y2gvYmF0Y2hBY2NvdW50cz9hcGktdmVyc2lvbj0yMDE0LTA1LTAxLXByaXZhdGVwcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"name\": \"adnanzh1\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"ppp\": \"kkkk\",\r\n \"abcd\": \"efgh\",\r\n \"abcde\": \"efgh\",\r\n \"cd\": \"efgh\",\r\n \"cde\": \"efgh\",\r\n \"aefgh\": \"acde\",\r\n \"adnan\": \"ped\",\r\n \"Ped\": \"Pune\",\r\n \"loc\": \"unknown\",\r\n \"jhsdgfjhabcd\": \"csfndhh\",\r\n \"segdfgkjdfjk\": \"jashdgfjshdf\",\r\n \"adsdfgasujhd\": \"jdsfsdahgdfjheee\",\r\n \"adsdfgasujssshd\": \"jdsfsdahgdfjheeefgff\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"adnanzh1.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-wus/providers/Microsoft.Batch/batchAccounts/adnanzh1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n },\r\n {\r\n \"name\": \"azbacjnkyz\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"azbac09duay1eb8ph5sloviz3crm4ngq7kjt6wx2f\": \"azbac5zjoxel6pb2yvsqh70dgmcu98t1r43nwkafi\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"azbacjnkyz.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/default-azurebatch-westus/providers/Microsoft.Batch/batchAccounts/azbacjnkyz\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n },\r\n {\r\n \"name\": \"clw789\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"clw789.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw789\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n },\r\n {\r\n \"name\": \"onesdk1163\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk1163.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk1390/providers/Microsoft.Batch/batchAccounts/onesdk1163\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n },\r\n {\r\n \"name\": \"onesdk3775\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk3775.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6761/providers/Microsoft.Batch/batchAccounts/onesdk3775\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n },\r\n {\r\n \"name\": \"onesdk4680\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk4680.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6761/providers/Microsoft.Batch/batchAccounts/onesdk4680\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n },\r\n {\r\n \"name\": \"onesdk916\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag2\": \"testval2\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk916.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk9501/providers/Microsoft.Batch/batchAccounts/onesdk916\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n },\r\n {\r\n \"name\": \"wenwu1007\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"wenwu1007.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/testrpgroup/providers/Microsoft.Batch/batchAccounts/wenwu1007\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n },\r\n {\r\n \"name\": \"wenwu1007a1\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"wenwu1007a1.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchwestus/providers/Microsoft.Batch/batchAccounts/wenwu1007a1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "3296" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "8d58ee0c-77c2-4ebb-8542-1c848b2d9956" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31841" + ], + "x-ms-request-id": [ + "496ccdfd-f301-45bc-813a-ff120e794eff" + ], + "x-ms-correlation-request-id": [ + "496ccdfd-f301-45bc-813a-ff120e794eff" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023100Z:496ccdfd-f301-45bc-813a-ff120e794eff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:31:00 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6761/providers/Microsoft.Batch/batchAccounts?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazY3NjEvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzP2FwaS12ZXJzaW9uPTIwMTQtMDUtMDEtcHJpdmF0ZXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"name\": \"onesdk3775\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk3775.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6761/providers/Microsoft.Batch/batchAccounts/onesdk3775\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n },\r\n {\r\n \"name\": \"onesdk4680\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk4680.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6761/providers/Microsoft.Batch/batchAccounts/onesdk4680\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "655" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "2bb766cd-da13-4ff8-8e2e-b9bce1c3c64d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31840" + ], + "x-ms-request-id": [ + "48570702-ab0b-43d4-84a0-fd6cbba00aa4" + ], + "x-ms-correlation-request-id": [ + "48570702-ab0b-43d4-84a0-fd6cbba00aa4" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023101Z:48570702-ab0b-43d4-84a0-fd6cbba00aa4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:31:01 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6761/providers/Microsoft.Batch/batchAccounts/onesdk4680?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazY3NjEvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazQ2ODA/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "139" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "request-id": [ + "855fad74-0228-4f8f-a400-7982b85f0162" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1152" + ], + "x-ms-request-id": [ + "b977801a-3236-4ddd-9fa5-bd331969f252" + ], + "x-ms-correlation-request-id": [ + "b977801a-3236-4ddd-9fa5-bd331969f252" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023101Z:b977801a-3236-4ddd-9fa5-bd331969f252" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:31:01 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6761/providers/Microsoft.Batch/batchAccounts/onesdk4680/operationResults/855fad74-0228-4f8f-a400-7982b85f0162?api-version=2014-05-01-privatepreview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6761/providers/Microsoft.Batch/batchAccounts/onesdk4680/operationResults/855fad74-0228-4f8f-a400-7982b85f0162?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazY3NjEvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazQ2ODAvb3BlcmF0aW9uUmVzdWx0cy84NTVmYWQ3NC0wMjI4LTRmOGYtYTQwMC03OTgyYjg1ZjAxNjI/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "139" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "request-id": [ + "d39cd12a-8f7e-423e-acff-9a170ea4fa7e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31839" + ], + "x-ms-request-id": [ + "eda41be7-c46d-44a2-990c-92351c124f8d" + ], + "x-ms-correlation-request-id": [ + "eda41be7-c46d-44a2-990c-92351c124f8d" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023102Z:eda41be7-c46d-44a2-990c-92351c124f8d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:31:01 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6761/providers/Microsoft.Batch/batchAccounts/onesdk4680/operationResults/855fad74-0228-4f8f-a400-7982b85f0162?api-version=2014-05-01-privatepreview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6761/providers/Microsoft.Batch/batchAccounts/onesdk4680/operationResults/855fad74-0228-4f8f-a400-7982b85f0162?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazY3NjEvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazQ2ODAvb3BlcmF0aW9uUmVzdWx0cy84NTVmYWQ3NC0wMjI4LTRmOGYtYTQwMC03OTgyYjg1ZjAxNjI/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "139" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Wed, 15 Oct 2014 02:31:17 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "849dd7fc-f7f2-4c1b-a5d9-10f33f3c504d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31838" + ], + "x-ms-request-id": [ + "c336d625-cbf9-4216-aaa8-adcfe1a907b4" + ], + "x-ms-correlation-request-id": [ + "c336d625-cbf9-4216-aaa8-adcfe1a907b4" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023117Z:c336d625-cbf9-4216-aaa8-adcfe1a907b4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:31:16 GMT" + ], + "ETag": [ + "0x8D1B6373B5CB2A0" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6761/providers/Microsoft.Batch/batchAccounts/onesdk3775?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazY3NjEvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM3NzU/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "143" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "request-id": [ + "d04fcd33-8e98-4549-b331-0be3e2712d8c" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1151" + ], + "x-ms-request-id": [ + "f12ff0a7-c202-4818-8fe2-0a8fd330d031" + ], + "x-ms-correlation-request-id": [ + "f12ff0a7-c202-4818-8fe2-0a8fd330d031" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023118Z:f12ff0a7-c202-4818-8fe2-0a8fd330d031" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:31:18 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6761/providers/Microsoft.Batch/batchAccounts/onesdk3775/operationResults/d04fcd33-8e98-4549-b331-0be3e2712d8c?api-version=2014-05-01-privatepreview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk6761/providers/Microsoft.Batch/batchAccounts/onesdk3775/operationResults/d04fcd33-8e98-4549-b331-0be3e2712d8c?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazY3NjEvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazM3NzUvb3BlcmF0aW9uUmVzdWx0cy9kMDRmY2QzMy04ZTk4LTQ1NDktYjMzMS0wYmUzZTI3MTJkOGM/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "143" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Wed, 15 Oct 2014 02:31:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "c6a87987-2b90-45cc-983e-10bf8e86bfc1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31837" + ], + "x-ms-request-id": [ + "e87b56f3-6577-46e5-9273-100c3dd032a6" + ], + "x-ms-correlation-request-id": [ + "e87b56f3-6577-46e5-9273-100c3dd032a6" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023118Z:e87b56f3-6577-46e5-9273-100c3dd032a6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:31:18 GMT" + ], + "ETag": [ + "0x8D1B6373BF4D918" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk6761?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazY3NjE/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "147" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1150" + ], + "x-ms-request-id": [ + "4ee8c3c2-bbba-4edc-be07-fb770e05fde2" + ], + "x-ms-correlation-request-id": [ + "4ee8c3c2-bbba-4edc-be07-fb770e05fde2" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023118Z:4ee8c3c2-bbba-4edc-be07-fb770e05fde2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:31:18 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2NzYxLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2NzYxLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczJOell4TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "147" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31835" + ], + "x-ms-request-id": [ + "f4bc51a5-3ec4-49a1-b14c-09a82c531a7f" + ], + "x-ms-correlation-request-id": [ + "f4bc51a5-3ec4-49a1-b14c-09a82c531a7f" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023118Z:f4bc51a5-3ec4-49a1-b14c-09a82c531a7f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:31:18 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2NzYxLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2NzYxLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczJOell4TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "147" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31834" + ], + "x-ms-request-id": [ + "df7a2815-da37-4489-963f-bb2af8ddf476" + ], + "x-ms-correlation-request-id": [ + "df7a2815-da37-4489-963f-bb2af8ddf476" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023133Z:df7a2815-da37-4489-963f-bb2af8ddf476" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:31:32 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2NzYxLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2NzYxLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczJOell4TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "147" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31833" + ], + "x-ms-request-id": [ + "55211f66-38d5-4c7f-bf4b-67e3562b2840" + ], + "x-ms-correlation-request-id": [ + "55211f66-38d5-4c7f-bf4b-67e3562b2840" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023148Z:55211f66-38d5-4c7f-bf4b-67e3562b2840" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:31:48 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2NzYxLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs2NzYxLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczJOell4TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "147" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31832" + ], + "x-ms-request-id": [ + "0bcb3f97-c40d-4a61-8f83-38a199ea6347" + ], + "x-ms-correlation-request-id": [ + "0bcb3f97-c40d-4a61-8f83-38a199ea6347" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023203Z:0bcb3f97-c40d-4a61-8f83-38a199ea6347" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:32:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk1390/providers/Microsoft.Batch/batchAccounts/onesdk1163?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazEzOTAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazExNjM/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "153" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "request-id": [ + "61037464-13cb-4dc3-b4c6-71e855f67eaf" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1149" + ], + "x-ms-request-id": [ + "e3a2fc9a-9285-47a9-8853-c0af735a630b" + ], + "x-ms-correlation-request-id": [ + "e3a2fc9a-9285-47a9-8853-c0af735a630b" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023204Z:e3a2fc9a-9285-47a9-8853-c0af735a630b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:32:03 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk1390/providers/Microsoft.Batch/batchAccounts/onesdk1163/operationResults/61037464-13cb-4dc3-b4c6-71e855f67eaf?api-version=2014-05-01-privatepreview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk1390/providers/Microsoft.Batch/batchAccounts/onesdk1163/operationResults/61037464-13cb-4dc3-b4c6-71e855f67eaf?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazEzOTAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazExNjMvb3BlcmF0aW9uUmVzdWx0cy82MTAzNzQ2NC0xM2NiLTRkYzMtYjRjNi03MWU4NTVmNjdlYWY/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "153" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "request-id": [ + "e3336b17-afe6-40bb-a624-428c96018f44" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31831" + ], + "x-ms-request-id": [ + "9ec8cf31-589c-4d2a-9302-4d166419f178" + ], + "x-ms-correlation-request-id": [ + "9ec8cf31-589c-4d2a-9302-4d166419f178" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023204Z:9ec8cf31-589c-4d2a-9302-4d166419f178" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:32:04 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk1390/providers/Microsoft.Batch/batchAccounts/onesdk1163/operationResults/61037464-13cb-4dc3-b4c6-71e855f67eaf?api-version=2014-05-01-privatepreview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk1390/providers/Microsoft.Batch/batchAccounts/onesdk1163/operationResults/61037464-13cb-4dc3-b4c6-71e855f67eaf?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazEzOTAvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL29uZXNkazExNjMvb3BlcmF0aW9uUmVzdWx0cy82MTAzNzQ2NC0xM2NiLTRkYzMtYjRjNi03MWU4NTVmNjdlYWY/YXBpLXZlcnNpb249MjAxNC0wNS0wMS1wcml2YXRlcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "153" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Wed, 15 Oct 2014 02:32:19 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "8e3f4259-5abd-4d2e-9561-066a48b47de1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31830" + ], + "x-ms-request-id": [ + "f68c7e7e-9436-4f0a-bf83-e2942382b651" + ], + "x-ms-correlation-request-id": [ + "f68c7e7e-9436-4f0a-bf83-e2942382b651" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023219Z:f68c7e7e-9436-4f0a-bf83-e2942382b651" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:32:19 GMT" + ], + "ETag": [ + "0x8D1B63760AFC825" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk1390?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazEzOTA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "158" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1148" + ], + "x-ms-request-id": [ + "c453159f-9c94-4ded-b9bb-b7217e14afa8" + ], + "x-ms-correlation-request-id": [ + "c453159f-9c94-4ded-b9bb-b7217e14afa8" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023220Z:c453159f-9c94-4ded-b9bb-b7217e14afa8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:32:19 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsxMzkwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsxMzkwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3hNemt3TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "158" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31828" + ], + "x-ms-request-id": [ + "438e2dac-d34d-40ee-800e-43a22f8fb717" + ], + "x-ms-correlation-request-id": [ + "438e2dac-d34d-40ee-800e-43a22f8fb717" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023220Z:438e2dac-d34d-40ee-800e-43a22f8fb717" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:32:19 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsxMzkwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsxMzkwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3hNemt3TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "158" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31827" + ], + "x-ms-request-id": [ + "7c28cf11-559a-4124-989f-4a6dd11f193f" + ], + "x-ms-correlation-request-id": [ + "7c28cf11-559a-4124-989f-4a6dd11f193f" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023235Z:7c28cf11-559a-4124-989f-4a6dd11f193f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:32:35 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsxMzkwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsxMzkwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3hNemt3TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "158" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31826" + ], + "x-ms-request-id": [ + "9e16b5e4-cca6-4ea0-ae1c-defd0f48766a" + ], + "x-ms-correlation-request-id": [ + "9e16b5e4-cca6-4ea0-ae1c-defd0f48766a" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023250Z:9e16b5e4-cca6-4ea0-ae1c-defd0f48766a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:32:50 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsxMzkwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsxMzkwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3hNemt3TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "158" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31825" + ], + "x-ms-request-id": [ + "6d068225-bc88-418c-b2c6-ac1a9b582ca1" + ], + "x-ms-correlation-request-id": [ + "6d068225-bc88-418c-b2c6-ac1a9b582ca1" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T023305Z:6d068225-bc88-418c-b2c6-ac1a9b582ca1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:33:05 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-GetBatchAccountsUnderResourceGroups": [ + "onesdk6761", + "onesdk1390", + "onesdk4680", + "onesdk3775", + "onesdk1163" + ] + }, + "Variables": { + "SubscriptionId": "4a06fe24-c197-4353-adc1-058d1a51924e" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Batch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestGetNonExistingBatchAccount.json b/src/ResourceManager/Batch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestGetNonExistingBatchAccount.json new file mode 100644 index 000000000000..2d2dadadd81c --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestGetNonExistingBatchAccount.json @@ -0,0 +1,56 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/azbacnhzf2\",\r\n \"name\": \"azbacnhzf2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbaccn0mf1juw5garhbk9q3vxl8d7i\": \"azbacr3u6l8ga5f1w7tjsd0cvqbz4knmhexpio92y\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/aztest1\",\r\n \"name\": \"aztest1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/aztest11\",\r\n \"name\": \"aztest11\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-ne/providers/Microsoft.Batch/batchAccounts/azbacykf2li0g\",\r\n \"name\": \"azbacykf2li0g\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbaczsgmy6p4a1c0il3b\": \"azbac9u1lydm6ebvs740kpgnowx8i52rctjf3qzah\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-we/providers/Microsoft.Batch/batchAccounts/azbac3mtkshf\",\r\n \"name\": \"azbac3mtkshf\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbac1s4853u9twc0yx7ihq2ej6nzdarokpmvlgbf\": \"azbaccg3l82tkpyzjoasn1f4vmq0d7u5he96briwx\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-wus/providers/Microsoft.Batch/batchAccounts/adnanzh1\",\r\n \"name\": \"adnanzh1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"adsdfgasujhd\": \"jdsfsdahgdfjheee\",\r\n \"adsdfgasujssshd\": \"jdsfsdahgdfjheeefgff\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchwestus/providers/Microsoft.Batch/batchAccounts/wenwu1007a1\",\r\n \"name\": \"wenwu1007a1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151135\",\r\n \"name\": \"zfeng9151135\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151138\",\r\n \"name\": \"zfeng9151138\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151141\",\r\n \"name\": \"zfeng9151141\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151157\",\r\n \"name\": \"zfeng9151157\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916114\",\r\n \"name\": \"zfeng916114\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161213\",\r\n \"name\": \"zfeng9161213\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161247\",\r\n \"name\": \"zfeng9161247\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161253\",\r\n \"name\": \"zfeng9161253\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161254\",\r\n \"name\": \"zfeng9161254\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916159\",\r\n \"name\": \"zfeng916159\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916735\",\r\n \"name\": \"zfeng916735\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/adnan\",\r\n \"name\": \"adnan\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/c123\",\r\n \"name\": \"c123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw\",\r\n \"name\": \"clw\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k3\": \"v3\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw1\",\r\n \"name\": \"clw1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw2\",\r\n \"name\": \"clw2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw3\",\r\n \"name\": \"clw3\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k11\": \"v11\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/azbacjnkyz\",\r\n \"name\": \"azbacjnkyz\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"azbac09duay1eb8ph5sloviz3crm4ngq7kjt6wx2f\": \"azbac5zjoxel6pb2yvsqh70dgmcu98t1r43nwkafi\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/clwtest1\",\r\n \"name\": \"clwtest1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/clwtest2\",\r\n \"name\": \"clwtest2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-BatchService-WestUS/providers/Microsoft.Batch/batchAccounts/clw678\",\r\n \"name\": \"clw678\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk9501/providers/Microsoft.Batch/batchAccounts/onesdk916\",\r\n \"name\": \"onesdk916\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag2\": \"testval2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/testrpgroup/providers/Microsoft.Batch/batchAccounts/wenwu1007\",\r\n \"name\": \"wenwu1007\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567\",\r\n \"name\": \"clw567\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"k1\": \"\",\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5671\",\r\n \"name\": \"clw5671\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567123\",\r\n \"name\": \"clw567123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567123456\",\r\n \"name\": \"clw567123456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5672\",\r\n \"name\": \"clw5672\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5673\",\r\n \"name\": \"clw5673\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5674\",\r\n \"name\": \"clw5674\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5675\",\r\n \"name\": \"clw5675\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"k1\": \"\",\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw789\",\r\n \"name\": \"clw789\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest\",\r\n \"name\": \"clwtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest123\",\r\n \"name\": \"clwtest123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest456\",\r\n \"name\": \"clwtest456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng123\",\r\n \"name\": \"zfeng123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng234\",\r\n \"name\": \"zfeng234\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng345\",\r\n \"name\": \"zfeng345\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng456\",\r\n \"name\": \"zfeng456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng912118\",\r\n \"name\": \"zfeng912118\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng9121231\",\r\n \"name\": \"zfeng9121231\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng913306\",\r\n \"name\": \"zfeng913306\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng915422\",\r\n \"name\": \"zfeng915422\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng915619\",\r\n \"name\": \"zfeng915619\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengabc\",\r\n \"name\": \"zfengabc\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengbatch1\",\r\n \"name\": \"zfengbatch1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengclw\",\r\n \"name\": \"zfengclw\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengs607\",\r\n \"name\": \"zfengs607\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12534" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31892" + ], + "x-ms-request-id": [ + "363a283b-c30c-4b4c-aad5-c9e84f890aff" + ], + "x-ms-correlation-request-id": [ + "363a283b-c30c-4b4c-aad5-c9e84f890aff" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022411Z:363a283b-c30c-4b4c-aad5-c9e84f890aff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:24:11 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "4a06fe24-c197-4353-adc1-058d1a51924e" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Batch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestUpdatesExistingBatchAccount.json b/src/ResourceManager/Batch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestUpdatesExistingBatchAccount.json new file mode 100644 index 000000000000..781a38d316eb --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.BatchAccountTests/TestUpdatesExistingBatchAccount.json @@ -0,0 +1,1207 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.intelligentsystems\",\r\n \"namespace\": \"microsoft.intelligentsystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "21795" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31869" + ], + "x-ms-request-id": [ + "9960a075-5e7d-45dd-8495-eeed8d403d7a" + ], + "x-ms-correlation-request-id": [ + "9960a075-5e7d-45dd-8495-eeed8d403d7a" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022836Z:9960a075-5e7d-45dd-8495-eeed8d403d7a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:28:36 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk764?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazc2ND9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "101" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31868" + ], + "x-ms-request-id": [ + "f757668c-90a1-40bf-8783-990e015480c2" + ], + "x-ms-correlation-request-id": [ + "f757668c-90a1-40bf-8783-990e015480c2" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022836Z:f757668c-90a1-40bf-8783-990e015480c2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:28:36 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk764?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazc2ND9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31859" + ], + "x-ms-request-id": [ + "0579a7e2-a3af-4093-b46f-275c6ab4dfac" + ], + "x-ms-correlation-request-id": [ + "0579a7e2-a3af-4093-b46f-275c6ab4dfac" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022912Z:0579a7e2-a3af-4093-b46f-275c6ab4dfac" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:29:12 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk764?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazc2ND9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk764\",\r\n \"name\": \"onesdk764\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "181" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1162" + ], + "x-ms-request-id": [ + "f600fd98-521d-4b69-8fe7-c0aec473e645" + ], + "x-ms-correlation-request-id": [ + "f600fd98-521d-4b69-8fe7-c0aec473e645" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022836Z:f600fd98-521d-4b69-8fe7-c0aec473e645" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:28:36 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk764/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazc2NC9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31867" + ], + "x-ms-request-id": [ + "3ea672b1-2e71-4d87-8f66-688fbdb0e9d8" + ], + "x-ms-correlation-request-id": [ + "3ea672b1-2e71-4d87-8f66-688fbdb0e9d8" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022837Z:3ea672b1-2e71-4d87-8f66-688fbdb0e9d8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:28:36 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk764/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazc2NC9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "centralus:7b7d27e9-2698-4010-afb3-10537c404c14" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31918" + ], + "x-ms-correlation-request-id": [ + "fb764e28-36e8-4f0e-af3c-28d064f38f12" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022837Z:fb764e28-36e8-4f0e-af3c-28d064f38f12" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:28:37 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/azbacnhzf2\",\r\n \"name\": \"azbacnhzf2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbaccn0mf1juw5garhbk9q3vxl8d7i\": \"azbacr3u6l8ga5f1w7tjsd0cvqbz4knmhexpio92y\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/aztest1\",\r\n \"name\": \"aztest1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-eus/providers/Microsoft.Batch/batchAccounts/aztest11\",\r\n \"name\": \"aztest11\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-ne/providers/Microsoft.Batch/batchAccounts/azbacykf2li0g\",\r\n \"name\": \"azbacykf2li0g\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbaczsgmy6p4a1c0il3b\": \"azbac9u1lydm6ebvs740kpgnowx8i52rctjf3qzah\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-we/providers/Microsoft.Batch/batchAccounts/azbac3mtkshf\",\r\n \"name\": \"azbac3mtkshf\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"azbac1s4853u9twc0yx7ihq2ej6nzdarokpmvlgbf\": \"azbaccg3l82tkpyzjoasn1f4vmq0d7u5he96briwx\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/azurebatch-wus/providers/Microsoft.Batch/batchAccounts/adnanzh1\",\r\n \"name\": \"adnanzh1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"adsdfgasujhd\": \"jdsfsdahgdfjheee\",\r\n \"adsdfgasujssshd\": \"jdsfsdahgdfjheeefgff\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchwestus/providers/Microsoft.Batch/batchAccounts/wenwu1007a1\",\r\n \"name\": \"wenwu1007a1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151135\",\r\n \"name\": \"zfeng9151135\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151138\",\r\n \"name\": \"zfeng9151138\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151141\",\r\n \"name\": \"zfeng9151141\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9151157\",\r\n \"name\": \"zfeng9151157\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916114\",\r\n \"name\": \"zfeng916114\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161213\",\r\n \"name\": \"zfeng9161213\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161247\",\r\n \"name\": \"zfeng9161247\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161253\",\r\n \"name\": \"zfeng9161253\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng9161254\",\r\n \"name\": \"zfeng9161254\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916159\",\r\n \"name\": \"zfeng916159\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/batchWestUS/providers/Microsoft.Batch/batchAccounts/zfeng916735\",\r\n \"name\": \"zfeng916735\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/adnan\",\r\n \"name\": \"adnan\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/c123\",\r\n \"name\": \"c123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw\",\r\n \"name\": \"clw\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k3\": \"v3\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw1\",\r\n \"name\": \"clw1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw2\",\r\n \"name\": \"clw2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw3\",\r\n \"name\": \"clw3\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"k11\": \"v11\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/azbacjnkyz\",\r\n \"name\": \"azbacjnkyz\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"azbac09duay1eb8ph5sloviz3crm4ngq7kjt6wx2f\": \"azbac5zjoxel6pb2yvsqh70dgmcu98t1r43nwkafi\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/clwtest1\",\r\n \"name\": \"clwtest1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/clwtest2\",\r\n \"name\": \"clwtest2\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/Default-BatchService-WestUS/providers/Microsoft.Batch/batchAccounts/clw678\",\r\n \"name\": \"clw678\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk9501/providers/Microsoft.Batch/batchAccounts/onesdk916\",\r\n \"name\": \"onesdk916\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag2\": \"testval2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/testrpgroup/providers/Microsoft.Batch/batchAccounts/wenwu1007\",\r\n \"name\": \"wenwu1007\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567\",\r\n \"name\": \"clw567\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"k1\": \"\",\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5671\",\r\n \"name\": \"clw5671\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567123\",\r\n \"name\": \"clw567123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw567123456\",\r\n \"name\": \"clw567123456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5672\",\r\n \"name\": \"clw5672\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5673\",\r\n \"name\": \"clw5673\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5674\",\r\n \"name\": \"clw5674\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw5675\",\r\n \"name\": \"clw5675\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"k1\": \"\",\r\n \"k2\": \"v2\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clw789\",\r\n \"name\": \"clw789\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest\",\r\n \"name\": \"clwtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest123\",\r\n \"name\": \"clwtest123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/clwtest456\",\r\n \"name\": \"clwtest456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng123\",\r\n \"name\": \"zfeng123\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng234\",\r\n \"name\": \"zfeng234\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng345\",\r\n \"name\": \"zfeng345\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng456\",\r\n \"name\": \"zfeng456\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng912118\",\r\n \"name\": \"zfeng912118\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng9121231\",\r\n \"name\": \"zfeng9121231\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng913306\",\r\n \"name\": \"zfeng913306\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng915422\",\r\n \"name\": \"zfeng915422\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfeng915619\",\r\n \"name\": \"zfeng915619\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastasia\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengabc\",\r\n \"name\": \"zfengabc\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengbatch1\",\r\n \"name\": \"zfengbatch1\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengclw\",\r\n \"name\": \"zfengclw\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/zfeng/providers/Microsoft.Batch/batchAccounts/zfengs607\",\r\n \"name\": \"zfengs607\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westeurope\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12534" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31866" + ], + "x-ms-request-id": [ + "f69281d4-8bfc-4f8c-9743-e8e5e017bbc0" + ], + "x-ms-correlation-request-id": [ + "f69281d4-8bfc-4f8c-9743-e8e5e017bbc0" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022837Z:f69281d4-8bfc-4f8c-9743-e8e5e017bbc0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:28:37 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk764/providers/Microsoft.Batch/batchAccounts/onesdk631?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazc2NC9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvb25lc2RrNjMxP2FwaS12ZXJzaW9uPTIwMTQtMDUtMDEtcHJpdmF0ZXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {\r\n \"testtag1\": \"testval1\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "76" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "94" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1161" + ], + "request-id": [ + "773d87a1-b969-4264-85c4-e86d681420cf" + ], + "x-ms-request-id": [ + "b050a9c2-6d92-44f5-9fe9-13ebd1efc625" + ], + "x-ms-correlation-request-id": [ + "b050a9c2-6d92-44f5-9fe9-13ebd1efc625" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022839Z:b050a9c2-6d92-44f5-9fe9-13ebd1efc625" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:28:38 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk764/providers/Microsoft.Batch/batchAccounts/onesdk631/operationResults/773d87a1-b969-4264-85c4-e86d681420cf?api-version=2014-05-01-privatepreview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk764/providers/Microsoft.Batch/batchAccounts/onesdk631?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazc2NC9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvb25lc2RrNjMxP2FwaS12ZXJzaW9uPTIwMTQtMDUtMDEtcHJpdmF0ZXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag2\": \"testval2\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "75" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "99" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk631\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag2\": \"testval2\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk631.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk764/providers/Microsoft.Batch/batchAccounts/onesdk631\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "348" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Wed, 15 Oct 2014 02:28:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "dcf760fa-b4ea-46e7-8426-863fc42852e4" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1160" + ], + "x-ms-request-id": [ + "0ba3f126-c15e-44b7-91cf-b5ea8d935ef9" + ], + "x-ms-correlation-request-id": [ + "0ba3f126-c15e-44b7-91cf-b5ea8d935ef9" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022856Z:0ba3f126-c15e-44b7-91cf-b5ea8d935ef9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:28:56 GMT" + ], + "ETag": [ + "0x8D1B636E759EFBD" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk764/providers/Microsoft.Batch/batchAccounts/onesdk631/operationResults/773d87a1-b969-4264-85c4-e86d681420cf?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazc2NC9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvb25lc2RrNjMxL29wZXJhdGlvblJlc3VsdHMvNzczZDg3YTEtYjk2OS00MjY0LTg1YzQtZTg2ZDY4MTQyMGNmP2FwaS12ZXJzaW9uPTIwMTQtMDUtMDEtcHJpdmF0ZXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "94" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "request-id": [ + "34f31333-4a01-4958-9fee-49e1aff92a1c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31865" + ], + "x-ms-request-id": [ + "1415d364-afa6-4223-afea-0e001cd67681" + ], + "x-ms-correlation-request-id": [ + "1415d364-afa6-4223-afea-0e001cd67681" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022839Z:1415d364-afa6-4223-afea-0e001cd67681" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:28:38 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk764/providers/Microsoft.Batch/batchAccounts/onesdk631/operationResults/773d87a1-b969-4264-85c4-e86d681420cf?api-version=2014-05-01-privatepreview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk764/providers/Microsoft.Batch/batchAccounts/onesdk631/operationResults/773d87a1-b969-4264-85c4-e86d681420cf?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazc2NC9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvb25lc2RrNjMxL29wZXJhdGlvblJlc3VsdHMvNzczZDg3YTEtYjk2OS00MjY0LTg1YzQtZTg2ZDY4MTQyMGNmP2FwaS12ZXJzaW9uPTIwMTQtMDUtMDEtcHJpdmF0ZXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "94" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk631\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag1\": \"testval1\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk631.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk764/providers/Microsoft.Batch/batchAccounts/onesdk631\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "348" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Wed, 15 Oct 2014 02:28:54 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "6a892784-caa9-4455-91d3-377c4930c0b7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31864" + ], + "x-ms-request-id": [ + "0339522f-725c-4464-899a-e2b60fa5257a" + ], + "x-ms-correlation-request-id": [ + "0339522f-725c-4464-899a-e2b60fa5257a" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022854Z:0339522f-725c-4464-899a-e2b60fa5257a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:28:54 GMT" + ], + "ETag": [ + "0x8D1B636E6753CAC" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk764/providers/Microsoft.Batch/batchAccounts/onesdk631?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazc2NC9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvb25lc2RrNjMxP2FwaS12ZXJzaW9uPTIwMTQtMDUtMDEtcHJpdmF0ZXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk631\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag1\": \"testval1\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk631.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk764/providers/Microsoft.Batch/batchAccounts/onesdk631\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "348" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Wed, 15 Oct 2014 02:28:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "c29f2803-fde6-4950-b20a-49ee5ad8118d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31863" + ], + "x-ms-request-id": [ + "d7bfe2c0-586d-4493-a406-47ec15867bc2" + ], + "x-ms-correlation-request-id": [ + "d7bfe2c0-586d-4493-a406-47ec15867bc2" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022855Z:d7bfe2c0-586d-4493-a406-47ec15867bc2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:28:54 GMT" + ], + "ETag": [ + "0x8D1B636E6A80F34" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk764/providers/Microsoft.Batch/batchAccounts/onesdk631?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazc2NC9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvb25lc2RrNjMxP2FwaS12ZXJzaW9uPTIwMTQtMDUtMDEtcHJpdmF0ZXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk631\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag2\": \"testval2\"\r\n },\r\n \"properties\": {\r\n \"accountEndpoint\": \"onesdk631.batch-test.windows-int.net\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk764/providers/Microsoft.Batch/batchAccounts/onesdk631\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "348" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Wed, 15 Oct 2014 02:28:56 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "4c88dce8-e510-4071-9e7d-755929ae7dc7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31862" + ], + "x-ms-request-id": [ + "2ce3e95e-afe3-48cb-a494-659a87146248" + ], + "x-ms-correlation-request-id": [ + "2ce3e95e-afe3-48cb-a494-659a87146248" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022856Z:2ce3e95e-afe3-48cb-a494-659a87146248" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:28:56 GMT" + ], + "ETag": [ + "0x8D1B636E7A0357E" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk764/providers/Microsoft.Batch/batchAccounts/onesdk631?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazc2NC9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvb25lc2RrNjMxP2FwaS12ZXJzaW9uPTIwMTQtMDUtMDEtcHJpdmF0ZXByZXZpZXc=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "102" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "request-id": [ + "156ce073-e10d-41db-ba97-3cd2df1e5046" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1159" + ], + "x-ms-request-id": [ + "f3ff98ed-8341-48f5-b9fe-3ec973422eca" + ], + "x-ms-correlation-request-id": [ + "f3ff98ed-8341-48f5-b9fe-3ec973422eca" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022857Z:f3ff98ed-8341-48f5-b9fe-3ec973422eca" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:28:56 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk764/providers/Microsoft.Batch/batchAccounts/onesdk631/operationResults/156ce073-e10d-41db-ba97-3cd2df1e5046?api-version=2014-05-01-privatepreview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk764/providers/Microsoft.Batch/batchAccounts/onesdk631/operationResults/156ce073-e10d-41db-ba97-3cd2df1e5046?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazc2NC9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvb25lc2RrNjMxL29wZXJhdGlvblJlc3VsdHMvMTU2Y2UwNzMtZTEwZC00MWRiLWJhOTctM2NkMmRmMWU1MDQ2P2FwaS12ZXJzaW9uPTIwMTQtMDUtMDEtcHJpdmF0ZXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "102" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "request-id": [ + "73eb703c-5de0-4606-ba24-6705c21f00b9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31861" + ], + "x-ms-request-id": [ + "bb8ccd81-35b9-4ecc-b82c-1d1cdf1a08d9" + ], + "x-ms-correlation-request-id": [ + "bb8ccd81-35b9-4ecc-b82c-1d1cdf1a08d9" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022857Z:bb8ccd81-35b9-4ecc-b82c-1d1cdf1a08d9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:28:57 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk764/providers/Microsoft.Batch/batchAccounts/onesdk631/operationResults/156ce073-e10d-41db-ba97-3cd2df1e5046?api-version=2014-05-01-privatepreview" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/onesdk764/providers/Microsoft.Batch/batchAccounts/onesdk631/operationResults/156ce073-e10d-41db-ba97-3cd2df1e5046?api-version=2014-05-01-privatepreview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlR3JvdXBzL29uZXNkazc2NC9wcm92aWRlcnMvTWljcm9zb2Z0LkJhdGNoL2JhdGNoQWNjb3VudHMvb25lc2RrNjMxL29wZXJhdGlvblJlc3VsdHMvMTU2Y2UwNzMtZTEwZC00MWRiLWJhOTctM2NkMmRmMWU1MDQ2P2FwaS12ZXJzaW9uPTIwMTQtMDUtMDEtcHJpdmF0ZXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01-privatepreview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0" + ], + "client-tracking-id": [ + "102" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Last-Modified": [ + "Wed, 15 Oct 2014 02:29:12 GMT" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "3ad0e717-84e5-495b-ae33-70bf0419a80c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31860" + ], + "x-ms-request-id": [ + "1ab2a75f-7f35-4dc4-9ac3-e618aa2f4b54" + ], + "x-ms-correlation-request-id": [ + "1ab2a75f-7f35-4dc4-9ac3-e618aa2f4b54" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022912Z:1ab2a75f-7f35-4dc4-9ac3-e618aa2f4b54" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:29:12 GMT" + ], + "ETag": [ + "0x8D1B636F134C0E6" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourcegroups/onesdk764?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL3Jlc291cmNlZ3JvdXBzL29uZXNkazc2ND9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "107" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1158" + ], + "x-ms-request-id": [ + "03f9a797-a4be-4fca-8979-3fd354171d9c" + ], + "x-ms-correlation-request-id": [ + "03f9a797-a4be-4fca-8979-3fd354171d9c" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022913Z:03f9a797-a4be-4fca-8979-3fd354171d9c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:29:13 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3NjQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ==?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3NjQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ==?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNOalF0VjBWVFZGVlRJaXdpYW05aVRHOWpZWFJwYjI0aU9pSjNaWE4wZFhNaWZRPT0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "107" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31858" + ], + "x-ms-request-id": [ + "ccfe4c14-6bb0-4c47-9380-fe4654ecae76" + ], + "x-ms-correlation-request-id": [ + "ccfe4c14-6bb0-4c47-9380-fe4654ecae76" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022913Z:ccfe4c14-6bb0-4c47-9380-fe4654ecae76" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:29:13 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3NjQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ==?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3NjQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ==?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNOalF0VjBWVFZGVlRJaXdpYW05aVRHOWpZWFJwYjI0aU9pSjNaWE4wZFhNaWZRPT0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "107" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31857" + ], + "x-ms-request-id": [ + "3fecc4be-96da-46e6-bb76-d26b850458f3" + ], + "x-ms-correlation-request-id": [ + "3fecc4be-96da-46e6-bb76-d26b850458f3" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022928Z:3fecc4be-96da-46e6-bb76-d26b850458f3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:29:28 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3NjQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ==?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3NjQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ==?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNOalF0VjBWVFZGVlRJaXdpYW05aVRHOWpZWFJwYjI0aU9pSjNaWE4wZFhNaWZRPT0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "107" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31856" + ], + "x-ms-request-id": [ + "7e968b87-e67b-40ff-a8e0-6f9e9b91c766" + ], + "x-ms-correlation-request-id": [ + "7e968b87-e67b-40ff-a8e0-6f9e9b91c766" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022943Z:7e968b87-e67b-40ff-a8e0-6f9e9b91c766" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:29:42 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3NjQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ==?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3NjQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ==?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNGEwNmZlMjQtYzE5Ny00MzUzLWFkYzEtMDU4ZDFhNTE5MjRlL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNOalF0VjBWVFZGVlRJaXdpYW05aVRHOWpZWFJwYjI0aU9pSjNaWE4wZFhNaWZRPT0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "107" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31855" + ], + "x-ms-request-id": [ + "ae679df8-d434-4dc6-89a4-e87ea7bf199b" + ], + "x-ms-correlation-request-id": [ + "ae679df8-d434-4dc6-89a4-e87ea7bf199b" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141015T022958Z:ae679df8-d434-4dc6-89a4-e87ea7bf199b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 15 Oct 2014 02:29:58 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-UpdatesExistingBatchAccount": [ + "onesdk631", + "onesdk764" + ] + }, + "Variables": { + "SubscriptionId": "4a06fe24-c197-4353-adc1-058d1a51924e" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Batch/Commands.Batch.Test/packages.config b/src/ResourceManager/Batch/Commands.Batch.Test/packages.config new file mode 100644 index 000000000000..6038b49920cd --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch.Test/packages.config @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/Batch/Commands.Batch/Accounts/GetBatchAccountCommand.cs b/src/ResourceManager/Batch/Commands.Batch/Accounts/GetBatchAccountCommand.cs new file mode 100644 index 000000000000..c6cd3f3195eb --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch/Accounts/GetBatchAccountCommand.cs @@ -0,0 +1,54 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Batch.Properties; +using Microsoft.Azure.Management.Batch.Models; +using System.Collections; +using System.Collections.Generic; +using System.Management.Automation; + +namespace Microsoft.Azure.Commands.Batch +{ + [Cmdlet(VerbsCommon.Get, "AzureBatchAccount"), OutputType(typeof(BatchAccountContext))] + public class GetBatchAccountCommand : BatchCmdletBase + { + [Alias("Name")] + [Parameter(Position = 0, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the Batch service account name to query.")] + [ValidateNotNullOrEmpty] + public string AccountName { get; set; } + + [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group associated with the account being queried.")] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(Position = 2, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Filter list of accounts using the key and optional value of the specified tag.")] + public Hashtable Tag { get; set; } + + public override void ExecuteCmdlet() + { + if (string.IsNullOrEmpty(this.AccountName)) + { + foreach (BatchAccountContext context in BatchClient.ListAccounts(this.ResourceGroupName, Tag)) + { + WriteObject(context); + } + } + else + { + BatchAccountContext context = BatchClient.GetAccount(this.ResourceGroupName, this.AccountName); + WriteObject(context); + } + } + } +} diff --git a/src/ResourceManager/Batch/Commands.Batch/Accounts/GetBatchAccountKeysCommand.cs b/src/ResourceManager/Batch/Commands.Batch/Accounts/GetBatchAccountKeysCommand.cs new file mode 100644 index 000000000000..04c51763a574 --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch/Accounts/GetBatchAccountKeysCommand.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Batch.Properties; +using System.Management.Automation; + +namespace Microsoft.Azure.Commands.Batch +{ + [Cmdlet(VerbsCommon.Get, "AzureBatchAccountKeys"), OutputType(typeof(BatchAccountContext))] + public class GetBatchAccountKeysCommand : BatchCmdletBase + { + internal const string ParameterSetContext = "Use Context"; + internal const string ParameterSetNames = "Use Names"; + + [Parameter(ParameterSetName = ParameterSetNames, Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the Batch service account to query keys for.")] + [Alias("Name")] + [ValidateNotNullOrEmpty] + public string AccountName { get; set; } + + [Parameter(ParameterSetName = ParameterSetNames, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group of the account.")] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + /// + /// Get the keys associated with the specified account. If only the account name is passed in, then + /// look up its resource group and construct a new BatchAccountContext to hold everything. + /// + public override void ExecuteCmdlet() + { + BatchAccountContext context = BatchClient.ListKeys(this.ResourceGroupName, this.AccountName); + WriteObject(context); + } + } +} diff --git a/src/ResourceManager/Batch/Commands.Batch/Accounts/Helpers.cs b/src/ResourceManager/Batch/Commands.Batch/Accounts/Helpers.cs new file mode 100644 index 000000000000..7fbacc8e85d7 --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch/Accounts/Helpers.cs @@ -0,0 +1,192 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Batch.Models; +using Microsoft.Azure.Commands.Batch.Properties; +using Microsoft.Azure.Management.Batch.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Microsoft.Azure.Commands.Batch +{ + internal class Helpers + { + // copied from Resources\Commands.Resources + + private const string ExcludedTagPrefix = "hidden-related:/"; + + public static PSTagValuePair Create(Hashtable hashtable) + { + if (hashtable == null || + !hashtable.ContainsKey("Name")) + { + return null; + } + + PSTagValuePair tagValue = new PSTagValuePair(); + tagValue.Name = hashtable["Name"].ToString(); + + if (hashtable.ContainsKey("Value")) + { + tagValue.Value = hashtable["Value"].ToString(); + } + + return tagValue; + } + + public static Dictionary CreateTagDictionary(Hashtable[] hashtableArray, bool validate) + { + Dictionary tagDictionary = null; + if (hashtableArray != null && hashtableArray.Length > 0) + { + tagDictionary = new Dictionary(); + foreach (var tag in hashtableArray) + { + var tagValuePair = Create(tag); + if (tagValuePair != null) + { + if (tagValuePair.Value != null) + { + tagDictionary[tagValuePair.Name] = tagValuePair.Value; + } + else + { + tagDictionary[tagValuePair.Name] = ""; + } + } + } + } + + if (validate) + { + if (hashtableArray != null && hashtableArray.Length > 0 && hashtableArray[0].Count > 0 && + (tagDictionary == null || tagDictionary.Count == 0)) + { + throw new ArgumentException(Resources.InvalidTagFormat); + } + if (hashtableArray != null && hashtableArray.Length > 0 && hashtableArray[0].Count > 0 && + (tagDictionary == null || hashtableArray.Length != tagDictionary.Count)) + { + throw new ArgumentException(Resources.InvalidTagFormatNotUniqueName); + } + } + + return tagDictionary; + } + + public static Hashtable[] CreateTagHashtable(IDictionary dictionary) + { + List tagHashtable = new List(); + foreach (string key in dictionary.Keys) + { + tagHashtable.Add(new Hashtable + { + {"Name", key}, + {"Value", dictionary[key]} + }); + } + return tagHashtable.ToArray(); + } + + public static string FormatTagsTable(Hashtable[] tags) + { + if (tags == null) + { + return null; + } + + Hashtable emptyHashtable = new Hashtable + { + {"Name", string.Empty}, + {"Value", string.Empty} + }; + StringBuilder resourcesTable = new StringBuilder(); + + if (tags.Length > 0) + { + int maxNameLength = Math.Max("Name".Length, tags.Where(ht => ht.ContainsKey("Name")).DefaultIfEmpty(emptyHashtable).Max(ht => ht["Name"].ToString().Length)); + int maxValueLength = Math.Max("Value".Length, tags.Where(ht => ht.ContainsKey("Value")).DefaultIfEmpty(emptyHashtable).Max(ht => ht["Value"].ToString().Length)); + + string rowFormat = "{0, -" + maxNameLength + "} {1, -" + maxValueLength + "}\r\n"; + resourcesTable.AppendLine(); + resourcesTable.AppendFormat(rowFormat, "Name", "Value"); + resourcesTable.AppendFormat(rowFormat, + GeneralUtilities.GenerateSeparator(maxNameLength, "="), + GeneralUtilities.GenerateSeparator(maxValueLength, "=")); + + foreach (Hashtable tag in tags) + { + PSTagValuePair tagValuePair = Helpers.Create(tag); + if (tagValuePair != null) + { + if (tagValuePair.Name.StartsWith(ExcludedTagPrefix)) + { + continue; + } + + if (tagValuePair.Value == null) + { + tagValuePair.Value = string.Empty; + } + resourcesTable.AppendFormat(rowFormat, tagValuePair.Name, tagValuePair.Value); + } + } + } + + return resourcesTable.ToString(); + } + + /// + /// Filters the subscription's accounts. + /// + /// The account name. + /// The tag to filter on. + /// The filtered accounts + public static List FilterAccounts(IListaccounts, Hashtable tag) + { + List result = new List(); + + if (tag != null && tag.Count >= 1) + { + PSTagValuePair tagValuePair = Helpers.Create(tag); + if (tagValuePair == null) + { + throw new ArgumentException(Resources.InvalidTagFormat); + } + if (string.IsNullOrEmpty(tagValuePair.Value)) + { + accounts = + accounts.Where(acct => acct.Tags != null + && acct.Tags.Keys.Contains(tagValuePair.Name, StringComparer.OrdinalIgnoreCase)) + .Select(acct => acct).ToList(); + } + else + { + accounts = + accounts.Where(acct => acct.Tags != null && acct.Tags.Keys.Contains(tagValuePair.Name, StringComparer.OrdinalIgnoreCase)) + .Where(rg => rg.Tags.Values.Contains(tagValuePair.Value, StringComparer.OrdinalIgnoreCase)) + .Select(acct => acct).ToList(); + } + } + + result.AddRange(accounts); + return result; + } + + } +} \ No newline at end of file diff --git a/src/ResourceManager/Batch/Commands.Batch/Accounts/NewBatchAccountCommand.cs b/src/ResourceManager/Batch/Commands.Batch/Accounts/NewBatchAccountCommand.cs new file mode 100644 index 000000000000..7234c5a5112f --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch/Accounts/NewBatchAccountCommand.cs @@ -0,0 +1,50 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Batch.Properties; +using Microsoft.Azure.Management.Batch.Models; +using Microsoft.WindowsAzure; +using System.Collections; +using System.Collections.Generic; +using System.Management.Automation; + +namespace Microsoft.Azure.Commands.Batch +{ + [Cmdlet(VerbsCommon.New, "AzureBatchAccount"), OutputType(typeof(BatchAccountContext))] + public class NewBatchAccountCommand : BatchCmdletBase + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the Batch service account to create.")] + [Alias("Name")] + [ValidateNotNullOrEmpty] + public string AccountName { get; set; } + + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The region where the account will be created.")] + [ValidateNotNullOrEmpty] + public string Location { get; set; } + + [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the resource group where the account will be created.")] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Alias("Tags")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "An array of hashtables which represents account tags.")] + public Hashtable[] Tag { get; set; } + + public override void ExecuteCmdlet() + { + BatchAccountContext context = BatchClient.CreateAccount(this.ResourceGroupName, this.AccountName, this.Location, this.Tag); + WriteObject(context); + } + } +} diff --git a/src/ResourceManager/Batch/Commands.Batch/Accounts/NewBatchAccountKeyCommand.cs b/src/ResourceManager/Batch/Commands.Batch/Accounts/NewBatchAccountKeyCommand.cs new file mode 100644 index 000000000000..de86fe450f73 --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch/Accounts/NewBatchAccountKeyCommand.cs @@ -0,0 +1,61 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Management.Batch.Models; +using System.Management.Automation; + +namespace Microsoft.Azure.Commands.Batch +{ + [Cmdlet(VerbsCommon.New, "AzureBatchAccountKey"), OutputType(typeof(BatchAccountContext))] + public class RegenBatchAccountKeyCommand : BatchCmdletBase + { + internal const string ParameterSetContext = "Use Context"; + internal const string ParameterSetCmdLine = "Use Command Line"; + + [Parameter(ParameterSetName = ParameterSetCmdLine, Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the Batch service account to regenerate the specified key for.")] + [Alias("Name")] + [ValidateNotNullOrEmpty] + public string AccountName { get; set; } + + [Parameter(ParameterSetName = ParameterSetCmdLine, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group of the account.")] + public string ResourceGroupName { get; set; } + + private AccountKeyType keyType; + //[Parameter(ParameterSetName = ParameterSetContext, Mandatory = true, ValueFromPipeline = false, + // HelpMessage = "The type of key (primary or secondary) to regenerate.")] + [Parameter(ParameterSetName = ParameterSetCmdLine, Mandatory = true, ValueFromPipeline = false, HelpMessage = "The type of key (primary or secondary) to regenerate.")] + [ValidateSet("Primary", "Secondary")] + public string KeyType + { + get { return keyType.ToString(); } + set + { + if (value == "Primary") + { + keyType = AccountKeyType.Primary; + } + else if (value == "Secondary") + { + keyType = AccountKeyType.Secondary; + } + } + } + + public override void ExecuteCmdlet() + { + BatchAccountContext context = BatchClient.RegenerateKeys(this.ResourceGroupName, this.AccountName, this.keyType); + WriteObject(context); + } + } +} diff --git a/src/ResourceManager/Batch/Commands.Batch/Accounts/RemoveBatchAccountCommand.cs b/src/ResourceManager/Batch/Commands.Batch/Accounts/RemoveBatchAccountCommand.cs new file mode 100644 index 000000000000..2ce88ab52b9f --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch/Accounts/RemoveBatchAccountCommand.cs @@ -0,0 +1,54 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Batch.Properties; +using System.Management.Automation; + +namespace Microsoft.Azure.Commands.Batch +{ + [Cmdlet(VerbsCommon.Remove, "AzureBatchAccount")] + public class RemoveBatchAccountCommand : BatchCmdletBase + { + private static string mamlCall = "RemoveAccount"; + + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the Batch service account to remove.")] + [Alias("Name")] + [ValidateNotNullOrEmpty] + public string AccountName { get; set; } + + [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group of the account being removed.")] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Do not ask for confirmation.")] + public SwitchParameter Force { get; set; } + + public override void ExecuteCmdlet() + { + ConfirmAction( + Force.IsPresent, + string.Format(Resources.RBA_RemoveConfirm, this.AccountName), + Resources.RBA_RemoveResource, + this.AccountName, + () => DeleteAction(this.ResourceGroupName, this.AccountName)); + } + + private void DeleteAction(string resGroupName, string accountName) + { + WriteVerboseWithTimestamp(Resources.BeginMAMLCall, mamlCall); + BatchClient.DeleteAccount(resGroupName, accountName); + WriteVerboseWithTimestamp(Resources.EndMAMLCall, mamlCall); + } + } +} diff --git a/src/ResourceManager/Batch/Commands.Batch/Accounts/SetBatchAccountCommand.cs b/src/ResourceManager/Batch/Commands.Batch/Accounts/SetBatchAccountCommand.cs new file mode 100644 index 000000000000..5f6177caf739 --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch/Accounts/SetBatchAccountCommand.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Batch.Properties; +using Microsoft.Azure.Management.Batch.Models; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Management.Automation; + +namespace Microsoft.Azure.Commands.Batch +{ + [Cmdlet(VerbsCommon.Set, "AzureBatchAccount"), OutputType(typeof(BatchAccountContext))] + public class SetBatchAccountCommand : BatchCmdletBase + { + [Parameter(Mandatory = true, Position = 0, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the Batch service account to update.")] + [Alias("Name")] + [ValidateNotNullOrEmpty] + public string AccountName { get; set; } + + [Alias("Tags")] + [Parameter(Mandatory = true, Position = 1, ValueFromPipelineByPropertyName = true, HelpMessage = "An array of hashtables which represents the account tags to be replaced or updated.")] + public Hashtable[] Tag { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group of the account being updated.")] + public string ResourceGroupName { get; set; } + + public override void ExecuteCmdlet() + { + BatchAccountContext context = BatchClient.UpdateAccount(this.ResourceGroupName, this.AccountName, this.Tag); + WriteObject(context); + } + } +} diff --git a/src/ResourceManager/Batch/Commands.Batch/BatchClient.cs b/src/ResourceManager/Batch/Commands.Batch/BatchClient.cs new file mode 100644 index 000000000000..ba26940632e8 --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch/BatchClient.cs @@ -0,0 +1,307 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Batch.Properties; +using Microsoft.Azure.Management.Batch; +using Microsoft.Azure.Management.Batch.Models; +using Microsoft.Azure.Management.Resources; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.Commands.Batch +{ + public class BatchClient + { + public IBatchManagementClient BatchManagementClient{ get; private set; } + + public IResourceManagementClient ResourceManagementClient { get; private set; } + + private static string batchProvider = "Microsoft.Batch"; + private static string accountObject = "batchAccounts"; + private static string accountSearch = batchProvider + "/" + accountObject; + + public BatchClient() + { } + + /// + /// Creates new BatchClient instance + /// + /// The IBatchManagementClient instance + public BatchClient(IBatchManagementClient batchManagementClient, IResourceManagementClient resourceManagementClient) + { + BatchManagementClient = batchManagementClient; + ResourceManagementClient = resourceManagementClient; + } + + /// + /// Creates new ResourceManagementClient + /// + /// Context with subscription containing a batch account to manipulate + public BatchClient(AzureContext context) + : this(AzureSession.ClientFactory.CreateClient(context, AzureEnvironment.Endpoint.ResourceManager), + AzureSession.ClientFactory.CreateClient(context, AzureEnvironment.Endpoint.ResourceManager)) + { + } + + #region Account verbs + /// + /// Creates a new Batch account + /// + /// The name of the resource group in which to create the account + /// The account name + /// The location to use when creating the account + /// The tags to associate with the account + /// A BatchAccountContext object representing the new account + public virtual BatchAccountContext CreateAccount(string resourceGroupName, string accountName, string location, Hashtable[] tags) + { + // use the group lookup to validate whether account already exists. We don't care about the returned + // group name nor the exception + if (GetGroupForAccountNoThrow(accountName) != null) + { + throw new CloudException(Resources.NBA_AccountAlreadyExists); + } + + Dictionary tagDictionary = Helpers.CreateTagDictionary(tags, validate: true); + + var response = BatchManagementClient.Accounts.Create(resourceGroupName, accountName, new BatchAccountCreateParameters() + { + Location = location, + Tags = tagDictionary + }); + + var context = BatchAccountContext.ConvertAccountResourceToNewAccountContext(response.Resource); + return context; + } + + /// + /// Updates an existing Batch account + /// + /// The name of the resource group the account is under. If unspecified, it will be looked up. + /// The account name + /// New tags to associate with the account + /// A BatchAccountContext object representing the updated account + public virtual BatchAccountContext UpdateAccount(string resourceGroupName, string accountName, Hashtable[] tags) + { + if (string.IsNullOrEmpty(resourceGroupName)) + { + // use resource mgr to see if account exists and then use resource group name to do the actual lookup + resourceGroupName = GetGroupForAccount(accountName); + } + + Dictionary tagDictionary = Helpers.CreateTagDictionary(tags, validate: true); + + + // need to the location in order to call + var getResponse = BatchManagementClient.Accounts.Get(resourceGroupName, accountName); + + var response = BatchManagementClient.Accounts.Create(resourceGroupName, accountName, new BatchAccountCreateParameters() + { + Location = getResponse.Resource.Location, + Tags = tagDictionary + }); + + BatchAccountContext context = BatchAccountContext.ConvertAccountResourceToNewAccountContext(response.Resource); + + return context; + } + + /// + /// Get details about the Batch account + /// + /// The name of the resource group the account is under. If unspecified, it will be looked up. + /// The account name + /// A BatchAccountContext object representing the account + public virtual BatchAccountContext GetAccount(string resourceGroupName, string accountName) + { + // single account lookup - find its resource group if not specified + if (string.IsNullOrEmpty(resourceGroupName)) + { + resourceGroupName = GetGroupForAccount(accountName); + } + var response = BatchManagementClient.Accounts.Get(resourceGroupName, accountName); + + return BatchAccountContext.ConvertAccountResourceToNewAccountContext(response.Resource); + } + + /// + /// Gets the keys associated with the Batch account + /// + /// The name of the resource group the account is under. If unspecified, it will be looked up. + /// The account name + /// A BatchAccountContext object with the account keys + public virtual BatchAccountContext ListKeys(string resourceGroupName, string accountName) + { + if (string.IsNullOrEmpty(resourceGroupName)) + { + // use resource mgr to see if account exists and then use resource group name to do the actual lookup + resourceGroupName = GetGroupForAccount(accountName); + } + + var context = GetAccount(resourceGroupName, accountName); + var keysResponse = BatchManagementClient.Accounts.ListKeys(resourceGroupName, accountName); + context.PrimaryAccountKey = keysResponse.PrimaryKey; + context.SecondaryAccountKey = keysResponse.SecondaryKey; + + return context; + } + + /// + /// Lists all accounts in a subscription or in a resource group if its name is specified + /// + /// The name of the resource group to search under for accounts. If unspecified, all accounts will be looked up. + /// The tag to filter accounts on + /// A collection of BatchAccountContext objects + public virtual IEnumerable ListAccounts(string resourceGroupName, Hashtable tag) + { + List accounts = new List(); + + // no account name so we're doing some sort of list. If no resource group, then list all accounts under the + // subscription otherwise all accounts in the resource group. + var response = BatchManagementClient.Accounts.List(new AccountListParameters { ResourceGroupName = resourceGroupName }); + + // filter out the accounts if a tag was specified + IList accountResources = new List(); + if (tag != null && tag.Count > 0) + { + accountResources = Helpers.FilterAccounts(response.Accounts, tag); + } + else + { + accountResources = response.Accounts; + } + + foreach (AccountResource resource in accountResources) + { + accounts.Add(BatchAccountContext.ConvertAccountResourceToNewAccountContext(resource)); + } + + var nextLink = response.NextLink; + + while (nextLink != null) + { + response = ListNextAccounts(nextLink); + + foreach (AccountResource resource in response.Accounts) + { + accounts.Add(BatchAccountContext.ConvertAccountResourceToNewAccountContext(resource)); + } + + nextLink = response.NextLink; + } + + return accounts; + } + + /// + /// Generates new key for the Batch account + /// + /// The name of the resource group the account is under. If unspecified, it will be looked up. + /// The account name + /// The type of key to regenerate + /// The BatchAccountContext object with the regenerated keys + public virtual BatchAccountContext RegenerateKeys(string resourceGroupName, string accountName, AccountKeyType keyType) + { + if (string.IsNullOrEmpty(resourceGroupName)) + { + // use resource mgr to see if account exists and then use resource group name to do the actual lookup + resourceGroupName = GetGroupForAccount(accountName); + } + + // build a new context to put the keys into + var context = GetAccount(resourceGroupName, accountName); + + var regenResponse = BatchManagementClient.Accounts.RegenerateKey(resourceGroupName, accountName, new BatchAccountRegenerateKeyParameters + { + KeyName = keyType + }); + + context.PrimaryAccountKey = regenResponse.PrimaryKey; + context.SecondaryAccountKey = regenResponse.SecondaryKey; + return context; + } + + /// + /// Deletes the specified account + /// + /// The name of the resource group the account is under. If unspecified, it will be looked up. + /// The account name + /// The status of delete account operation + public virtual OperationResponse DeleteAccount(string resourceGroupName, string accountName) + { + if (string.IsNullOrEmpty(resourceGroupName)) + { + // use resource mgr to see if account exists and then use resource group name to do the actual lookup + resourceGroupName = GetGroupForAccount(accountName); + } + return BatchManagementClient.Accounts.Delete(resourceGroupName, accountName); + } + #endregion + + /// + /// Lists all accounts in a subscription or in a resource group if its name is specified + /// + /// Next link to use when querying for accounts + /// The status of list operation + internal BatchAccountListResponse ListNextAccounts(string NextLink) + { + return BatchManagementClient.Accounts.ListNext(NextLink); + } + + internal string GetGroupForAccountNoThrow(string accountName) + { + var response = ResourceManagementClient.Resources.List(new Management.Resources.Models.ResourceListParameters() + { + ResourceType = accountSearch + }); + + string groupName = null; + + foreach (var res in response.Resources) + { + if (res.Name == accountName) + { + groupName = ExtractResourceGroupName(res.Id); + } + } + + return groupName; + } + + internal string GetGroupForAccount(string accountName) + { + var groupName = GetGroupForAccountNoThrow(accountName); + if (groupName == null) + { + throw new CloudException(Resources.ResourceNotFound); + } + + return groupName; + } + + private string ExtractResourceGroupName(string id) + { + var idParts = id.Split('/'); + if (idParts.Length < 4) + { + throw new CloudException(String.Format(Resources.MissingResGroupName, id)); + } + + return idParts[4]; + } + } +} diff --git a/src/ResourceManager/Batch/Commands.Batch/BatchCmdletBase.cs b/src/ResourceManager/Batch/Commands.Batch/BatchCmdletBase.cs new file mode 100644 index 000000000000..09a2cca6a9cc --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch/BatchCmdletBase.cs @@ -0,0 +1,120 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Common.Internals; +using Newtonsoft.Json.Linq; +using System; + +namespace Microsoft.Azure.Commands.Batch +{ + public class BatchCmdletBase : AzurePSCmdlet + { + private BatchClient batchClient; + + public BatchClient BatchClient + { + get + { + if (batchClient == null) + { + batchClient = new BatchClient(CurrentContext); + } + return batchClient; + } + + set { batchClient = value; } + } + + protected virtual void OnProcessRecord() + { + // Intentionally left blank + } + + protected override void ProcessRecord() + { + try + { + Validate.ValidateInternetConnection(); + ExecuteCmdlet(); + OnProcessRecord(); + } + catch (CloudException ex) + { + var updatedEx = ex; + + if (ex.Response != null && ex.Response.Content != null) + { + var message = FindDetailedMessage(ex.Response.Content); + + if (message != null) + { + updatedEx = new CloudException(message, ex); + } + } + + WriteExceptionError(updatedEx); + } + catch (Exception ex) + { + WriteExceptionError(ex); + } + } + + /// + /// For now, the 2nd message KVP inside "details" contains useful info about the failure. Eventually, a code KVP + /// will be added such that we can search on that directly. + /// + /// + /// + internal static string FindDetailedMessage(string content) + { + string message = null; + + if (ParserHelper.IsJson(content)) + { + var response = JObject.Parse(content); + + // check that we have a details section + var detailsToken = response["details"]; + + if (detailsToken != null) + { + var details = detailsToken as JArray; + if (details != null && details.Count > 1) + { + // for now, 2nd entry in array is the one we're interested in. Need a better way of identifying the + // detailed error message + var dObj = detailsToken[1] as JObject; + var code = dObj.GetValue("code", StringComparison.CurrentCultureIgnoreCase); + if (code != null) + { + message = code.ToString() + ": "; + } + + var detailedMsg = dObj.GetValue("message", StringComparison.CurrentCultureIgnoreCase); + if (detailedMsg != null) + { + message += detailedMsg.ToString(); + + } + } + } + } + + return message; + } + } +} diff --git a/src/ResourceManager/Batch/Commands.Batch/BatchManagementClient.Customization.cs b/src/ResourceManager/Batch/Commands.Batch/BatchManagementClient.Customization.cs new file mode 100644 index 000000000000..9941d79cf5a2 --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch/BatchManagementClient.Customization.cs @@ -0,0 +1,62 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Net.Http; +using Microsoft.WindowsAzure.Common; +using Microsoft.WindowsAzure.Common.Internals; +using Microsoft.WindowsAzure; + +namespace Microsoft.Azure.Management.BatchManager +{ + public partial class BatchManagementClient + { + public static BatchManagementClient Create(IDictionary settings) + { + if (settings == null) + { + throw new ArgumentNullException("settings"); + } + + SubscriptionCloudCredentials credentials = ConfigurationHelper.GetCredentials(settings); + + Uri baseUri = ConfigurationHelper.GetUri(settings, "BaseUri", false); + + return baseUri != null ? + new BatchManagementClient(credentials, baseUri) : + new BatchManagementClient(credentials); + } + + protected override void Clone(ServiceClient client) + { + base.Clone(client); + BatchManagementClient batchClient = client as BatchManagementClient; + if (batchClient != null) + { + batchClient._credentials = Credentials; + batchClient._baseUri = BaseUri; + batchClient.Credentials.InitializeServiceClient(batchClient); + } + } + + public override BatchManagementClient WithHandler(DelegatingHandler handler) + { + return (BatchManagementClient)WithHandler(new BatchManagementClient(), handler); + } + } +} diff --git a/src/ResourceManager/Batch/Commands.Batch/Commands.Batch.csproj b/src/ResourceManager/Batch/Commands.Batch/Commands.Batch.csproj new file mode 100644 index 000000000000..945fd24095dd --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch/Commands.Batch.csproj @@ -0,0 +1,157 @@ + + + + + Debug + AnyCPU + {D470E50A-9607-48D6-A924-4F9F86502704} + Library + Properties + Microsoft.Azure.Commands.Batch + Microsoft.Azure.Commands.Batch + v4.5 + 512 + ..\ + true + + + + true + full + false + ..\..\..\Package\Debug\ResourceManager\AzureResourceManager\Batch\ + TRACE;DEBUG;CODE_ANALYSIS + prompt + 4 + true + false + true + + + pdbonly + true + ..\..\..\Package\Release\ResourceManager\AzureResourceManager\Batch\ + TRACE;SIGN + prompt + 4 + true + true + MSSharedLibKey.snk + true + false + + + + ..\..\..\packages\Microsoft.Azure.Management.Batch.1.1.2-preview\lib\net40\Microsoft.Azure.Management.Batch.dll + + + False + ..\..\..\packages\Microsoft.Azure.Management.Resources.2.6.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + False + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + + + + + False + D:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Management.Automation\v4.0_3.0.0.0__31bf3856ad364e35\System.Management.Automation.dll + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + + + + + + + + + + + + + + True + True + Resources.resx + + + + + Always + Designer + + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + Always + + + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/Batch/Commands.Batch/MSSharedLibKey.snk b/src/ResourceManager/Batch/Commands.Batch/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ResourceManager/Batch/Commands.Batch/MSSharedLibKey.snk differ diff --git a/src/ResourceManager/Batch/Commands.Batch/Microsoft.Azure.Commands.Batch.dll-Help.xml b/src/ResourceManager/Batch/Commands.Batch/Microsoft.Azure.Commands.Batch.dll-Help.xml new file mode 100644 index 000000000000..18a717115adc --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch/Microsoft.Azure.Commands.Batch.dll-Help.xml @@ -0,0 +1,751 @@ + + + + + Get-AzureBatchAccount + + + + + + + Get + AzureBatchAccount + + + + + Returns object representing the details of the batch account under current subscription. + + + + Get-AzureBatchAccount + + AccountName + + Name of the account - if specified, only return the specified account. + + String + + + ResourceGroupName + + Name of the resource group. If specified, only list the accounts under the specified resource group. + + String + + + + Get-AzureBatchAccount + + ResourceGroupName + + Name of the resource group. If specified, only list the accounts under the specified resource group. + + String + + + + + + AccountName + + Name of the account - if specified, only return the specified account. + + String + + String + + + + + + ResourceGroupName + + Name of the resource group. If specified, only list the accounts under the specified resource group. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureBatchAccountKeys + + + + + + + Get + AzureBatchAccountKeys + + + + + Returns the keys to the account specified. + + + + Get-AzureBatchAccountKeys + + AccountName + + The name of the Batch account to retrieve key with. + + String + + + ResourceGroupName + + Name of the resource group. If specified, only search the keys of the accounts under the specified resource group. + + String + + + + Get-AzureBatchAccountKeys + + Context + + Batch account object. Either specify the account name or use this parameter to specify the account. + + BatchAccountContext + + + + + + AccountName + + The name of the Batch account to retrieve key with. + + String + + String + + + + + + ResourceGroupName + + Name of the resource group. If specified, only search the keys of the accounts under the specified resource group. + + String + + String + + + + + + Context + + Batch account object. Either specify the account name or use this parameter to specify the account. + + BatchAccountContext + + BatchAccountContext + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + New-AzureBatchAccount + + + + + + + New + AzureBatchAccount + + + + + Create a new Azure Batch account. + + + + New-AzureBatchAccount + + AccountName + + Specifies a name for the batch account. The batch account name must be unique to Windows Azure and must be between 3 and 24 characters in length and use lowercase letters and numbers only. + + String + + + Location + + Specifies the Windows Azure data center location where the batch account is created. + + String + + + ResourceGroupName + + Specifies the name of an existing resource group in the current subscription. + + String + + + WhatIf + + + + SwitchParameter + + + Tags + + + + String[] + + + + + + AccountName + + Specifies a name for the batch account. The batch account name must be unique to Windows Azure and must be between 3 and 24 characters in length and use lowercase letters and numbers only. + + String + + String + + + + + + Location + + Specifies the Windows Azure data center location where the batch account is created. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of an existing resource group in the current subscription. + + String + + String + + + + + + WhatIf + + + + SwitchParameter + + SwitchParameter + + + + + + Tags + + + + String[] + + String[] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + New-AzureBatchAccountKey + + + + + + + New + AzureBatchAccountKey + + + + + Regenerate the key of specified Batch account. + + + + New-AzureBatchAccountKey + + AccountName + + Name of the account to get key. + + String + + + ResourceGroupName + + Name of the resource group. If specified, only regenerate the keys of the accounts under the specified resource group. + + String + + + KeyType + + Specify which key to regenerate. Primary vs. secondary. + + String + + + + New-AzureBatchAccountKey + + Context + + Batch account object. Either specify the account name or use this parameter to specify the account. + + BatchAccountContext + + + + + + AccountName + + Name of the account to get key. + + String + + String + + + + + + ResourceGroupName + + Name of the resource group. If specified, only regenerate the keys of the accounts under the specified resource group. + + String + + String + + + + + + KeyType + + Specify which key to regenerate. Primary vs. secondary. + + String + + String + + + + + + Context + + Batch account object. Either specify the account name or use this parameter to specify the account. + + BatchAccountContext + + BatchAccountContext + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Remove-AzureBatchAccount + + + + + + + Remove + AzureBatchAccount + + + + + Delete specified Batch account. + + + + Remove-AzureBatchAccount + + AccountName + + The name of the Batch account to be removed. + + String + + + ResourceGroupName + + + + String + + + + + + AccountName + + The name of the Batch account to be removed. + + String + + String + + + + + + ResourceGroupName + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set-AzureBatchAccount + + + + + + + Set + AzureBatchAccount + + + + + Update specified Batch Account. Currently, only tag can be updated. + + + + Set-AzureBatchAccount + + AccountName + + The name of the Batch account to be updated. + + String + + + ResourceGroupName + + Name of the resource group. If specified, search the accounts under the resource group only + + String + + + Tags + + + + String[] + + + + + + AccountName + + The name of the Batch account to be updated. + + String + + String + + + + + + ResourceGroupName + + Name of the resource group. If specified, search the accounts under the resource group only + + String + + String + + + + + + Tags + + + + String[] + + String[] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/Batch/Commands.Batch/Microsoft.Azure.Commands.Batch.format.ps1xml b/src/ResourceManager/Batch/Commands.Batch/Microsoft.Azure.Commands.Batch.format.ps1xml new file mode 100644 index 000000000000..3ccf251fdc78 --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch/Microsoft.Azure.Commands.Batch.format.ps1xml @@ -0,0 +1,56 @@ + + + + + Microsoft.Azure.Commands.Batch.BatchAccountContext + + Microsoft.Azure.Commands.Batch.BatchAccountContext + + + + + + 20 + + + + 15 + + + + 17 + + + + 18 + + + + + + + + + + + $_.AccountName + + + $_.Location + + + $_.ResourceGroupName + + + $_.Tags + + + $_.TaskTenantUrl + + + + + + + + diff --git a/src/ResourceManager/Batch/Commands.Batch/Models/BatchAccountContext.cs b/src/ResourceManager/Batch/Commands.Batch/Models/BatchAccountContext.cs new file mode 100644 index 000000000000..311dd493c442 --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch/Models/BatchAccountContext.cs @@ -0,0 +1,109 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Batch.Properties; +using Microsoft.Azure.Management.Batch.Models; +using System; +using System.Collections; + +namespace Microsoft.Azure.Commands.Batch +{ + /// + /// very simple account context class for getting things started + /// + public class BatchAccountContext + { + public string Id { get; private set; } + + public string AccountEndpoint { get; private set; } + + public string PrimaryAccountKey { get; internal set; } + + public string SecondaryAccountKey { get; internal set; } + + public string AccountName { get; private set; } + + public string Location { get; private set; } + + public string ResourceGroupName { get; private set; } + + public string Subscription { get; private set; } + + public string State { get; private set; } + + public string TaskTenantUrl { get; private set; } + + public Hashtable[] Tags { get; private set; } + + public string TagsTable + { + get { return Helpers.FormatTagsTable(Tags); } + } + + internal BatchAccountContext() { } + + internal BatchAccountContext(string accountEndpoint) + { + this.AccountEndpoint = accountEndpoint; + } + + /// + /// Take an AccountResource and turn it into a BatchAccountContext + /// + /// Resource info returned by RP + /// Void + internal void ConvertAccountResourceToAccountContext(AccountResource resource) + { + var accountEndpoint = resource.Properties.AccountEndpoint; + if (Uri.CheckHostName(accountEndpoint) != UriHostNameType.Dns) + { + throw new ArgumentException(String.Format(Resources.InvalidEndpointType, accountEndpoint), "AccountEndpoint"); + } + + this.Id = resource.Id; + this.AccountEndpoint = accountEndpoint; + this.Location = resource.Location; + this.State = resource.Properties.ProvisioningState.ToString(); + this.Tags = Helpers.CreateTagHashtable(resource.Tags); + + // extract the host and strip off the account name for the TaskTenantUrl and AccountName + var hostParts = accountEndpoint.Split('.'); + this.AccountName = hostParts[0]; + this.TaskTenantUrl = Uri.UriSchemeHttps + Uri.SchemeDelimiter + String.Join(".", hostParts, 1, hostParts.Length - 1); + + // get remaining fields from Id which looks like: + // /subscriptions/4a06fe24-c197-4353-adc1-058d1a51924e/resourceGroups/clwtest/providers/Microsoft.Batch/batchAccounts/clw + var idParts = resource.Id.Split('/'); + if (idParts.Length < 5) + { + throw new ArgumentException(String.Format(Resources.InvalidResourceId, resource.Id), "Id"); + } + + this.Subscription = idParts[2]; + this.ResourceGroupName = idParts[4]; + } + + /// + /// Create a new BAC and fill it in + /// + /// Resource info returned by RP + /// new instance of BatchAccountContext + internal static BatchAccountContext ConvertAccountResourceToNewAccountContext(AccountResource resource) + { + var baContext = new BatchAccountContext(); + baContext.ConvertAccountResourceToAccountContext(resource); + return baContext; + } + } +} diff --git a/src/ResourceManager/Batch/Commands.Batch/Models/PSTagValuePair.cs b/src/ResourceManager/Batch/Commands.Batch/Models/PSTagValuePair.cs new file mode 100644 index 000000000000..1a6f78607452 --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch/Models/PSTagValuePair.cs @@ -0,0 +1,22 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Batch.Models +{ + public class PSTagValuePair + { + public string Name { get; set; } + public string Value { get; set; } + } +} \ No newline at end of file diff --git a/src/ResourceManager/Batch/Commands.Batch/Properties/AssemblyInfo.cs b/src/ResourceManager/Batch/Commands.Batch/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..a543048bbdfc --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch/Properties/AssemblyInfo.cs @@ -0,0 +1,34 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Microsoft Azure Powershell - Batch Service Manager")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] + +[assembly: ComVisible(false)] +[assembly: CLSCompliant(false)] +[assembly: Guid("ed102280-3577-49bf-93dd-11b6e3a44a57")] +[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] +[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] +#if SIGN +[assembly: InternalsVisibleTo("Microsoft.Azure.Commands.Batch.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +#else +[assembly: InternalsVisibleTo("Microsoft.Azure.Commands.Batch.Test")] +#endif diff --git a/src/ResourceManager/Batch/Commands.Batch/Properties/Resources.Designer.cs b/src/ResourceManager/Batch/Commands.Batch/Properties/Resources.Designer.cs new file mode 100644 index 000000000000..dae98c3cc5fa --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch/Properties/Resources.Designer.cs @@ -0,0 +1,225 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.Azure.Commands.Batch.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Azure.Commands.Batch.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Begin {0} call to RP. + /// + internal static string BeginMAMLCall { + get { + return ResourceManager.GetString("BeginMAMLCall", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to End {0} call to RP. + /// + internal static string EndMAMLCall { + get { + return ResourceManager.GetString("EndMAMLCall", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Getting all accounts in subscription. + /// + internal static string GBA_AllAccounts { + get { + return ResourceManager.GetString("GBA_AllAccounts", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Getting accounts in resource group {0}. + /// + internal static string GBA_ResGroupAccounts { + get { + return ResourceManager.GetString("GBA_ResGroupAccounts", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Getting account keys for {0}. + /// + internal static string GBAK_GettingKeys { + get { + return ResourceManager.GetString("GBAK_GettingKeys", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The endpoint is not recognized as valid: {0}. + /// + internal static string InvalidEndpointType { + get { + return ResourceManager.GetString("InvalidEndpointType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The resource ID is not recognized as valid: {0}. + /// + internal static string InvalidResourceId { + get { + return ResourceManager.GetString("InvalidResourceId", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid tag format. Expect @{Name = "tagName"} or @{Name = "tagName"; Value = "tagValue"}. + /// + internal static string InvalidTagFormat { + get { + return ResourceManager.GetString("InvalidTagFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid tag format. Ensure that each tag has a unique name. Example: @{Name = "tagName1"; Value = "tagValue1"}, @{Name = "tagName2"; Value = "tagValue2"}. + /// + internal static string InvalidTagFormatNotUniqueName { + get { + return ResourceManager.GetString("InvalidTagFormatNotUniqueName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find resource group name in ID property: {0}. + /// + internal static string MissingResGroupName { + get { + return ResourceManager.GetString("MissingResGroupName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AccountAlreadyExists: Account already exists.. + /// + internal static string NBA_AccountAlreadyExists { + get { + return ResourceManager.GetString("NBA_AccountAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Checking if account already exists. + /// + internal static string NBA_LookupAccount { + get { + return ResourceManager.GetString("NBA_LookupAccount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Performing name availability check for account {0}. + /// + internal static string NBA_NameAvailability { + get { + return ResourceManager.GetString("NBA_NameAvailability", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove batch account {0}. + /// + internal static string RBA_RemoveConfirm { + get { + return ResourceManager.GetString("RBA_RemoveConfirm", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing batch account .... + /// + internal static string RBA_RemoveResource { + get { + return ResourceManager.GetString("RBA_RemoveResource", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Looking up resource group for account {0}. + /// + internal static string ResGroupLookup { + get { + return ResourceManager.GetString("ResGroupLookup", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ResourceNotFound: Resource not found.. + /// + internal static string ResourceNotFound { + get { + return ResourceManager.GetString("ResourceNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Updating account {0}. + /// + internal static string SBA_Updating { + get { + return ResourceManager.GetString("SBA_Updating", resourceCulture); + } + } + } +} diff --git a/src/ResourceManager/Batch/Commands.Batch/Properties/Resources.resx b/src/ResourceManager/Batch/Commands.Batch/Properties/Resources.resx new file mode 100644 index 000000000000..73fbc2ec451e --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch/Properties/Resources.resx @@ -0,0 +1,175 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Begin {0} call to RP + + + End {0} call to RP + + + Getting account keys for {0} + + + Getting all accounts in subscription + + + Getting accounts in resource group {0} + + + The endpoint is not recognized as valid: {0} + + + The resource ID is not recognized as valid: {0} + + + Invalid tag format. Expect @{Name = "tagName"} or @{Name = "tagName"; Value = "tagValue"} + + + Invalid tag format. Ensure that each tag has a unique name. Example: @{Name = "tagName1"; Value = "tagValue1"}, @{Name = "tagName2"; Value = "tagValue2"} + + + Cannot find resource group name in ID property: {0} + + + AccountAlreadyExists: Account already exists. + + + Checking if account already exists + + + Performing name availability check for account {0} + + + Are you sure you want to remove batch account {0} + + + Removing batch account ... + + + Looking up resource group for account {0} + + + ResourceNotFound: Resource not found. + emulate exception generated by RP + + + Updating account {0} + + \ No newline at end of file diff --git a/src/ResourceManager/Batch/Commands.Batch/packages.config b/src/ResourceManager/Batch/Commands.Batch/packages.config new file mode 100644 index 000000000000..a5eb80a5f148 --- /dev/null +++ b/src/ResourceManager/Batch/Commands.Batch/packages.config @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Commands.DataFactories.Test.csproj b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Commands.DataFactories.Test.csproj new file mode 100644 index 000000000000..23794d57ac68 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Commands.DataFactories.Test.csproj @@ -0,0 +1,328 @@ + + + + + Debug + AnyCPU + {D4EDAD6F-6A1D-4295-9A88-CD3F69EAD42B} + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Library + Properties + Microsoft.Azure.Commands.DataFactories.Test + Microsoft.Azure.Commands.DataFactories.Test + v4.5 + 512 + ..\..\..\ + true + + 236d7f52 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + true + MSSharedLibKey.snk + true + true + false + bin\Release\ + TRACE;SIGN + true + pdbonly + AnyCPU + prompt + false + + + + ..\..\..\packages\Microsoft.Azure.Gallery.2.2.0-preview\lib\net40\Microsoft.Azure.Gallery.dll + True + + + ..\..\..\packages\Microsoft.Azure.Management.Authorization.0.11.0-preview\lib\net40\Microsoft.Azure.Management.Authorization.dll + + + ..\..\..\packages\Microsoft.Azure.Management.DataFactories.0.11.4-preview\lib\net40\Microsoft.Azure.Management.DataFactories.dll + + + ..\..\..\packages\Microsoft.Azure.Monitoring.2.2.0-preview\lib\net40\Microsoft.Azure.Monitoring.dll + True + + + ..\..\..\packages\Microsoft.Azure.Management.Resources.2.7.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll + True + + + False + ..\..\..\packages\Hydra.HttpRecorder.1.0.5417.13285-prerelease\lib\net45\Microsoft.Azure.Utilities.HttpRecorder.dll + + + ..\..\..\packages\Microsoft.DataFactories.Runtime.0.11.1-preview\lib\net45\Microsoft.DataFactories.Runtime.dll + + + ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll + + + False + ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + True + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.3.1.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll + + + False + ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll + + + False + ..\..\..\packages\Hydra.SpecTestSupport.1.0.5417.13285-prerelease\lib\net45\Microsoft.WindowsAzure.Testing.dll + + + False + ..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll + + + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + True + + + + + + + + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + + + + + False + ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + + ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Designer + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + {c1bda476-a5cc-4394-914d-48b0ec31a710} + Commands.ScenarioTests.Common + + + {65c3a86a-716d-4e7d-ab67-1db00b3bf72d} + Commands.Common.Storage + + + {3b48a77b-5956-4a62-9081-92ba04b02b27} + Commands.Common.Test + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + {bc420543-c04e-4bf3-96e1-cd81b823bdd7} + Commands.Test.Utilities + + + {9577252e-0a6b-4d61-86e8-95f7f309a987} + Commands.DataFactories + + + + + + + + + + xcopy "$(SolutionDir)Package\$(ConfigurationName)\*.*" $(TargetDir) /Y /E + + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/MSSharedLibKey.snk b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/MSSharedLibKey.snk differ diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Properties/AssemblyInfo.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..b820f65d78dd --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft.Azure.Commands.DataFactories.Test")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Microsoft.Azure.Commands.DataFactories.Test")] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +[assembly: ComVisible(false)] + +[assembly: Guid("8E86B542-B22F-44B6-8053-3F5118E04DEA")] + +[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] +[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Resources/hub.json b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Resources/hub.json new file mode 100644 index 000000000000..c991b31e7ecf --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Resources/hub.json @@ -0,0 +1,9 @@ +{ + "name": "SampleHub", + "properties": { + "defaultCompute": "SampleDefaultCompute", + "type": "Hub", + "hubId": "00000000-0000-0000-0000-000000000001", + "provisioningState": "Succeeded" + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Resources/linkedService.json b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Resources/linkedService.json new file mode 100644 index 000000000000..48bfde179349 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Resources/linkedService.json @@ -0,0 +1,12 @@ +{ + name: "foo2", + properties: + { + type: "CustomLinkedService", + extendedProperties: + { + PropertyBagPropertyName1: "PropertyBagPropertyValue1", + propertyBagPropertyName2: "PropertyBagPropertyValue2" + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Resources/pipeline.json b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Resources/pipeline.json new file mode 100644 index 000000000000..cf62ad8a9764 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Resources/pipeline.json @@ -0,0 +1,36 @@ +{ + name: "foo", + properties: + { + description : "Sample Data Pipeline", + activities: + [ + { + name: "CustomActivity", + inputs: [ {name: "inputTable"} ], + outputs: [ {name: "outputTable"} ], + linkedServiceName: "foo2", + type: "CustomActivity", + transformation: + { + assemblyName: "mycode.dll", + entryPoint: "myclassname", + packageLinkedService: "imagestoreLinkedService", + packageFile: "images/assembly.zip", + extendedProperties: + { + PropertyBagPropertyName1: "PropertyBagValue1", + propertyBagPropertyName2: "PropertyBagValue2" + } + }, + policy: + { + concurrency: 1, + executionPriorityOrder: "NewestFirst", + retry: 2, + timeout: "01:00:00" + } + } + ] + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Resources/table.json b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Resources/table.json new file mode 100644 index 000000000000..c129e604748b --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/Resources/table.json @@ -0,0 +1,16 @@ +{ + name: "foo1", + properties: + { + location: + { + type: "CustomLocation", + linkedServiceName: "foo2" + }, + availability: + { + frequency: "Hour", + interval: 1 + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/Common.ps1 b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/Common.ps1 new file mode 100644 index 000000000000..bd2adaf4dd13 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/Common.ps1 @@ -0,0 +1,65 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +<# +.SYNOPSIS +Gets valid resource group name +#> +function Get-ResourceGroupName +{ + return getAssetName +} + +<# +.SYNOPSIS +Gets valid data factory name +#> +function Get-DataFactoryName +{ + return getAssetName +} + +<# +.SYNOPSIS +Gets the default location for a provider +#> +function Get-ProviderLocation($provider) +{ + $location = Get-AzureLocation | where {$_.Name -eq $provider} + if ($location -eq $null) { + "West US" + } else { + $location.Locations[0] + } +} + +<# +.SYNOPSIS +Cleans the created data factory +#> +function Clean-DataFactory($rgname, $dfname) +{ + if ([Microsoft.Azure.Utilities.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Utilities.HttpRecorder.HttpRecorderMode]::Playback) { + Remove-AzureDataFactory -ResourceGroupName $rgname -Name $dfname -Force + } +} + +<# +.SYNOPSIS +Cleans the created tags +#> +function Clean-Tags +{ + Get-AzureTag | Remove-AzureTag -Force +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/DataFactoriesScenarioTestsBase.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/DataFactoriesScenarioTestsBase.cs new file mode 100644 index 000000000000..0f8a9700bda4 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/DataFactoriesScenarioTestsBase.cs @@ -0,0 +1,105 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Gallery; +using Microsoft.Azure.Management.Authorization; +using Microsoft.Azure.Management.DataFactories; +using Microsoft.Azure.Management.Resources; +using Microsoft.Azure.Subscriptions; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Monitoring.Events; +using Microsoft.WindowsAzure.Management.Storage; +using Microsoft.WindowsAzure.Testing; + +namespace Microsoft.Azure.Commands.DataFactories.Test +{ + public abstract class DataFactoriesScenarioTestsBase + { + private EnvironmentSetupHelper helper; + + protected DataFactoriesScenarioTestsBase() + { + helper = new EnvironmentSetupHelper(); + } + + protected void SetupManagementClients() + { + var dataPipelineManagementClient = GetDataPipelineManagementClient(); + var resourceManagementClient = GetResourceManagementClient(); + var subscriptionsClient = GetSubscriptionClient(); + var galleryClient = GetGalleryClient(); + var eventsClient = GetEventsClient(); + var authorizationManagementClient = GetAuthorizationManagementClient(); + + helper.SetupManagementClients(dataPipelineManagementClient, + resourceManagementClient, + subscriptionsClient, + galleryClient, + eventsClient, + authorizationManagementClient); + } + + protected void RunPowerShellTest(params string[] scripts) + { + using (UndoContext context = UndoContext.Current) + { + context.Start(TestUtilities.GetCallingClass(2), TestUtilities.GetCurrentMethodName(2)); + + SetupManagementClients(); + + helper.SetupEnvironment(AzureModule.AzureResourceManager); + helper.SetupModules(AzureModule.AzureResourceManager, "ScenarioTests\\Common.ps1", + "ScenarioTests\\" + this.GetType().Name + ".ps1"); + + helper.RunPowerShellTest(scripts); + } + } + + protected DataPipelineManagementClient GetDataPipelineManagementClient() + { + return TestBase.GetServiceClient(new CSMTestEnvironmentFactory()); + } + + protected ResourceManagementClient GetResourceManagementClient() + { + return TestBase.GetServiceClient(new CSMTestEnvironmentFactory()); + } + + protected SubscriptionClient GetSubscriptionClient() + { + return TestBase.GetServiceClient(new CSMTestEnvironmentFactory()); + } + + protected StorageManagementClient GetStorageManagementClient() + { + return TestBase.GetServiceClient(new RDFETestEnvironmentFactory()); + } + + protected GalleryClient GetGalleryClient() + { + return TestBase.GetServiceClient(new CSMTestEnvironmentFactory()); + } + + protected EventsClient GetEventsClient() + { + return TestBase.GetServiceClient(new CSMTestEnvironmentFactory()); + } + + protected AuthorizationManagementClient GetAuthorizationManagementClient() + { + return TestBase.GetServiceClient(new CSMTestEnvironmentFactory()); + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/DataFactoryGatewayTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/DataFactoryGatewayTests.cs new file mode 100644 index 000000000000..1eb76da6e6a2 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/DataFactoryGatewayTests.cs @@ -0,0 +1,43 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Xunit; + +namespace Microsoft.Azure.Commands.DataFactories.Test +{ + public class DataFactoryGatewayTests : DataFactoriesScenarioTestsBase + { + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetNonExistingDataFactoryGateway() + { + RunPowerShellTest("Test-GetNonExistingDataFactoryGateway"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestCreateDataFactoryGateway() + { + RunPowerShellTest("Test-DataFactoryGateway"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestCreateDataFactoryGatewayWithDataFactoryParameter() + { + RunPowerShellTest("Test-DataFactoryGatewayWithDataFactoryParameter"); + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/DataFactoryGatewayTests.ps1 b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/DataFactoryGatewayTests.ps1 new file mode 100644 index 000000000000..b7a9786859db --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/DataFactoryGatewayTests.ps1 @@ -0,0 +1,112 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +<# +.SYNOPSIS +Nagative test. Get gateway from an non-existing empty group. +#> +function Test-GetNonExistingDataFactoryGateway +{ + $dfname = Get-DataFactoryName + $rgname = Get-ResourceGroupName + $rglocation = Get-ProviderLocation ResourceManagement + + New-AzureResourceGroup -Name $rgname -Location $rglocation -Force + New-AzureDataFactory -Name $dfname -Location $rglocation -ResourceGroup $rgname -Force + + # Test + Assert-ThrowsContains { Get-AzureDataFactoryGateway -ResourceGroupName $rgname -DataFactoryName $dfname -Name "gwname" } "GatewayNotFound" +} + +<# +.SYNOPSIS +Create a gateway and then do a Get to compare the result are identical. +Delete the created gateway after test finishes. +#> +function Test-DataFactoryGateway +{ + $dfname = Get-DataFactoryName + $rgname = Get-ResourceGroupName + $rglocation = Get-ProviderLocation ResourceManagement + $dflocation = Get-ProviderLocation DataFactoryManagement + + New-AzureResourceGroup -Name $rgname -Location $rglocation -Force + + try + { + New-AzureDataFactory -ResourceGroupName $rgname -Name $dfname -Location $dflocation -Force + + $gwname = "foo" + $description = "description" + + $actual = New-AzureDataFactoryGateway -ResourceGroupName $rgname -DataFactoryName $dfname -Name $gwname -Location $dflocation + $expected = Get-AzureDataFactoryGateway -ResourceGroupName $rgname -DataFactoryName $dfname -Name $gwname + Assert-AreEqual $actual.Name $expected.Name + Assert-AreEqual $actual.Location $expected.Location + + $key = New-AzureDataFactoryGatewayKey -ResourceGroupName $rgname -DataFactoryName $dfname -GatewayName $gwname + Assert-NotNull $key + Assert-NotNull $key.Gatewaykey + + $result = Set-AzureDataFactoryGateway -ResourceGroupName $rgname -DataFactoryName $dfname -Name $gwname -Description $description + Assert-AreEqual $result.Description $description + + Remove-AzureDataFactoryGateway -ResourceGroupName $rgname -DataFactoryName $dfname -Name $gwname -Force + } + finally + { + Clean-DataFactory $rgname $dfname + } +} + +<# +.SYNOPSIS +Use the datafactory parameter to create a gateway and then do a Get to compare the result are identical. +Delete the created gateway after test finishes. +#> +function Test-DataFactoryGatewayWithDataFactoryParameter +{ + $dfname = Get-DataFactoryName + $rgname = Get-ResourceGroupName + $rglocation = Get-ProviderLocation ResourceManagement + $dflocation = Get-ProviderLocation DataFactoryManagement + + New-AzureResourceGroup -Name $rgname -Location $rglocation -Force + + try + { + $datafactory = New-AzureDataFactory -ResourceGroupName $rgname -Name $dfname -Location $dflocation -Force + + $gwname = "foo" + $description = "description" + + $actual = New-AzureDataFactoryGateway -DataFactory $datafactory -Name $gwname -Location $dflocation + $expected = Get-AzureDataFactoryGateway -DataFactory $datafactory -Name $gwname + Assert-AreEqual $actual.Name $expected.Name + Assert-AreEqual $actual.Location $expected.Location + + $key = New-AzureDataFactoryGatewayKey -DataFactory $datafactory -GatewayName $gwname + Assert-NotNull $key + Assert-NotNull $key.Gatewaykey + + $result = Set-AzureDataFactoryGateway -DataFactory $datafactory -Name $gwname -Description $description + Assert-AreEqual $result.Description $description + + Remove-AzureDataFactoryGateway -DataFactory $datafactory -Name $gwname -Force + } + finally + { + Clean-DataFactory $rgname $dfname + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/DataFactoryTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/DataFactoryTests.cs new file mode 100644 index 000000000000..6ab4378190f1 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/DataFactoryTests.cs @@ -0,0 +1,64 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Xunit; + +namespace Microsoft.Azure.Commands.DataFactories.Test +{ + public class DataFactoryTests : DataFactoriesScenarioTestsBase + { + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetNonExistingDataFactory() + { + RunPowerShellTest("Test-GetNonExistingDataFactory"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestCreateDataFactory() + { + RunPowerShellTest("Test-CreateDataFactory"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestDeleteDataFactoryWithDataFactoryParameter() + { + RunPowerShellTest("Test-DeleteDataFactoryWithDataFactoryParameter"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetDataFactoryWithEmptyName() + { + RunPowerShellTest("Test-GetDataFactoryWithEmptyName"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetDataFactoryWithWhiteSpaceName() + { + RunPowerShellTest("Test-GetDataFactoryWithWhiteSpaceName"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestDataFactoryPiping() + { + RunPowerShellTest("Test-DataFactoryPiping"); + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/DataFactoryTests.ps1 b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/DataFactoryTests.ps1 new file mode 100644 index 000000000000..cd4867b2d57f --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/DataFactoryTests.ps1 @@ -0,0 +1,127 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +<# +.SYNOPSIS +Nagative test. Get resources from an non-existing empty group. +#> +function Test-GetNonExistingDataFactory +{ + $dfname = Get-DataFactoryName + $rgname = Get-ResourceGroupName + $rglocation = Get-ProviderLocation ResourceManagement + + New-AzureResourceGroup -Name $rgname -Location $rglocation -Force + + # Test + Assert-ThrowsContains { Get-AzureDataFactory -ResourceGroupName $rgname -Name $dfname } "ResourceNotFound" +} + +<# +.SYNOPSIS +Create a data factory and then do a Get to compare the result are identical. +The datafactory will be removed when the test finishes. +#> +function Test-CreateDataFactory +{ + $dfname = Get-DataFactoryName + $rgname = Get-ResourceGroupName + $rglocation = Get-ProviderLocation ResourceManagement + $dflocation = Get-ProviderLocation DataFactoryManagement + + New-AzureResourceGroup -Name $rgname -Location $rglocation -Force + + try + { + $actual = New-AzureDataFactory -ResourceGroupName $rgname -Name $dfname -Location $dflocation -Force + $expected = Get-AzureDataFactory -ResourceGroupName $rgname -Name $dfname + + Assert-AreEqual $expected.ResourceGroupName $actual.ResourceGroupName + Assert-AreEqual $expected.DataFactoryName $actual.DataFactoryName + } + finally + { + Clean-DataFactory $rgname $dfname + } +} + +<# +.SYNOPSIS +Create a data factory and then delete it with -DataFactory parameter. +#> +function Test-DeleteDataFactoryWithDataFactoryParameter +{ + $dfname = Get-DataFactoryName + $rgname = Get-ResourceGroupName + $rglocation = Get-ProviderLocation ResourceManagement + $dflocation = Get-ProviderLocation DataFactoryManagement + + New-AzureResourceGroup -Name $rgname -Location $rglocation -Force + + $df = New-AzureDataFactory -ResourceGroupName $rgname -Name $dfname -Location $dflocation -Force + Remove-AzureDataFactory -DataFactory $df -Force +} + +<# +.SYNOPSIS +Nagative test. Get resources with an empty data factory name. +#> +function Test-GetDataFactoryWithEmptyName +{ + $dfname = "" + $rgname = Get-ResourceGroupName + $rglocation = Get-ProviderLocation ResourceManagement + + New-AzureResourceGroup -Name $rgname -Location $rglocation -Force + + # Test + Assert-ThrowsContains { Get-AzureDataFactory -ResourceGroupName $rgname -Name $dfname } "empty" +} + +<# +.SYNOPSIS +Nagative test. Get resources with a data factory name which only contains white space. +#> +function Test-GetDataFactoryWithWhiteSpaceName +{ + $dfname = " " + $rgname = Get-ResourceGroupName + $rglocation = Get-ProviderLocation ResourceManagement + + New-AzureResourceGroup -Name $rgname -Location $rglocation -Force + + # Test + Assert-ThrowsContains { Get-AzureDataFactory -ResourceGroupName $rgname -Name $dfname } "Value cannot be null" +} + +<# +.SYNOPSIS +Test piping support. +#> +function Test-DataFactoryPiping +{ + $dfname = Get-DataFactoryName + $rgname = Get-ResourceGroupName + $rglocation = Get-ProviderLocation ResourceManagement + $dflocation = Get-ProviderLocation DataFactoryManagement + + New-AzureResourceGroup -Name $rgname -Location $rglocation -Force + + New-AzureDataFactory -ResourceGroupName $rgname -Name $dfname -Location $dflocation -Force + + Get-AzureDataFactory -ResourceGroupName $rgname | Remove-AzureDataFactory -Force + + # Test the data factory no longer exists + Assert-ThrowsContains { Get-AzureDataFactory -ResourceGroupName $rgname -Name $dfname } "ResourceNotFound" +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/HubTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/HubTests.cs new file mode 100644 index 000000000000..71853e3bd88b --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/HubTests.cs @@ -0,0 +1,43 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Xunit; + +namespace Microsoft.Azure.Commands.DataFactories.Test +{ + public class HubTests : DataFactoriesScenarioTestsBase + { + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestHub() + { + RunPowerShellTest("Test-Hub"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestHubWithDataFactoryParameter() + { + RunPowerShellTest("Test-HubWithDataFactoryParameter"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestHubPiping() + { + RunPowerShellTest("Test-HubPiping"); + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/HubTests.ps1 b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/HubTests.ps1 new file mode 100644 index 000000000000..50f99539f686 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/HubTests.ps1 @@ -0,0 +1,116 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +<# +.SYNOPSIS +Create a hub and then do a Get to compare the results are identical. +Delete the created hub after the test finishes. +#> +function Test-Hub +{ + $dfname = Get-DataFactoryName + $rgname = Get-ResourceGroupName + $rglocation = Get-ProviderLocation ResourceManagement + $dflocation = Get-ProviderLocation DataFactoryManagement + + New-AzureResourceGroup -Name $rgname -Location $rglocation -Force + + try + { + New-AzureDataFactory -ResourceGroupName $rgname -Name $dfname -Location $dflocation -Force + + $hubname = "SampleHub" + + $actual = New-AzureDataFactoryHub -ResourceGroupName $rgname -DataFactoryName $dfname -Name $hubname -File .\Resources\hub.json -Force + $expected = Get-AzureDataFactoryHub -ResourceGroupName $rgname -DataFactoryName $dfname -Name $hubname + + Assert-AreEqual $expected.ResourceGroupName $actual.ResourceGroupName + Assert-AreEqual $expected.DataFactoryName $actual.DataFactoryName + Assert-AreEqual $expected.HubName $actual.HubName + + Remove-AzureDataFactoryHub -ResourceGroupName $rgname -DataFactoryName $dfname -Name $hubname -Force + } + finally + { + Clean-DataFactory $rgname $dfname + } +} + +<# +.SYNOPSIS +Create a hub and then do a Get to compare the results are identical. +Delete the created hub after the test finishes. +Use -DataFactory parameter in all cmdlets. +#> +function Test-HubWithDataFactoryParameter +{ + $dfname = Get-DataFactoryName + $rgname = Get-ResourceGroupName + $rglocation = Get-ProviderLocation ResourceManagement + $dflocation = Get-ProviderLocation DataFactoryManagement + + New-AzureResourceGroup -Name $rgname -Location $rglocation -Force + + try + { + $df = New-AzureDataFactory -ResourceGroupName $rgname -Name $dfname -Location $dflocation -Force + + $hubname = "SampleHub" + + $actual = New-AzureDataFactoryHub -DataFactory $df -Name $hubname -File .\Resources\hub.json -Force + $expected = Get-AzureDataFactoryHub -DataFactory $df -Name $hubname + + Assert-AreEqual $expected.ResourceGroupName $actual.ResourceGroupName + Assert-AreEqual $expected.DataFactoryName $actual.DataFactoryName + Assert-AreEqual $expected.HubName $actual.HubName + + Remove-AzureDataFactoryHub -DataFactory $df -Name $hubname -Force + } + finally + { + Clean-DataFactory $rgname $dfname + } +} + +<# +.SYNOPSIS +Test piping support. +#> +function Test-HubPiping +{ + $dfname = Get-DataFactoryName + $rgname = Get-ResourceGroupName + $rglocation = Get-ProviderLocation ResourceManagement + $dflocation = Get-ProviderLocation DataFactoryManagement + + New-AzureResourceGroup -Name $rgname -Location $rglocation -Force + + try + { + New-AzureDataFactory -ResourceGroupName $rgname -Name $dfname -Location $dflocation -Force + + $hubname = "SampleHub" + + New-AzureDataFactoryHub -ResourceGroupName $rgname -DataFactoryName $dfname -Name $hubname -File .\Resources\hub.json -Force + + Get-AzureDataFactoryHub -ResourceGroupName $rgname -DataFactoryName $dfname -Name $hubname | Remove-AzureDataFactoryHub -Force + + # Test the hub no longer exists + Assert-ThrowsContains { Get-AzureDataFactoryHub -ResourceGroupName $rgname -DataFactoryName $dfname -Name $hubname } "HubNotFound" + } + finally + { + Clean-DataFactory $rgname $dfname + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/LinkedServiceTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/LinkedServiceTests.cs new file mode 100644 index 000000000000..d019de47db76 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/LinkedServiceTests.cs @@ -0,0 +1,57 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Xunit; + +namespace Microsoft.Azure.Commands.DataFactories.Test +{ + public class LinkedServiceTests : DataFactoriesScenarioTestsBase + { + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestLinkedService() + { + RunPowerShellTest("Test-LinkedService"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestLinkedServiceWithDataFactoryParameter() + { + RunPowerShellTest("Test-LinkedServiceWithDataFactoryParameter"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetLinkedServiceWithEmptyName() + { + RunPowerShellTest("Test-GetLinkedServiceWithEmptyName"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetLinkedServiceWithWhiteSpaceName() + { + RunPowerShellTest("Test-GetLinkedServiceWithWhiteSpaceName"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestLinkedServicePiping() + { + RunPowerShellTest("Test-LinkedServicePiping"); + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/LinkedServiceTests.ps1 b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/LinkedServiceTests.ps1 new file mode 100644 index 000000000000..7c74f23e47d8 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/LinkedServiceTests.ps1 @@ -0,0 +1,154 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +<# +.SYNOPSIS +Create a linked service and then do a Get to compare the result are identical. +Delete the created linked service after test finishes. +#> +function Test-LinkedService +{ + $dfname = Get-DataFactoryName + $rgname = Get-ResourceGroupName + $rglocation = Get-ProviderLocation ResourceManagement + $dflocation = Get-ProviderLocation DataFactoryManagement + + New-AzureResourceGroup -Name $rgname -Location $rglocation -Force + + try + { + New-AzureDataFactory -ResourceGroupName $rgname -Name $dfname -Location $dflocation -Force + + $lsname = "foo" + + $actual = New-AzureDataFactoryLinkedService -ResourceGroupName $rgname -DataFactoryName $dfname -Name $lsname -File .\Resources\linkedService.json -Force + $expected = Get-AzureDataFactoryLinkedService -ResourceGroupName $rgname -DataFactoryName $dfname -Name $lsname + + Assert-AreEqual $expected.ResourceGroupName $actual.ResourceGroupName + Assert-AreEqual $expected.DataFactoryName $actual.DataFactoryName + Assert-AreEqual $expected.LinkedServiceName $actual.LinkedServiceName + + Remove-AzureDataFactoryLinkedService -ResourceGroupName $rgname -DataFactoryName $dfname -Name $lsname -Force + } + finally + { + Clean-DataFactory $rgname $dfname + } +} + +<# +.SYNOPSIS +Create a linked service and then do a Get to compare the result are identical. +Delete the created linked service after test finishes. +Use -DataFactory parameter in all cmdlets. +#> +function Test-LinkedServiceWithDataFactoryParameter +{ + $dfname = Get-DataFactoryName + $rgname = Get-ResourceGroupName + $rglocation = Get-ProviderLocation ResourceManagement + $dflocation = Get-ProviderLocation DataFactoryManagement + + New-AzureResourceGroup -Name $rgname -Location $rglocation -Force + + try + { + $df = New-AzureDataFactory -ResourceGroupName $rgname -Name $dfname -Location $dflocation -Force + + $lsname = "foo" + + $actual = New-AzureDataFactoryLinkedService -DataFactory $df -Name $lsname -File .\Resources\linkedService.json -Force + $expected = Get-AzureDataFactoryLinkedService -DataFactory $df -Name $lsname + + Assert-AreEqual $expected.ResourceGroupName $actual.ResourceGroupName + Assert-AreEqual $expected.DataFactoryName $actual.DataFactoryName + Assert-AreEqual $expected.LinkedServiceName $actual.LinkedServiceName + + Remove-AzureDataFactoryLinkedService -DataFactory $df -Name $lsname -Force + } + finally + { + Clean-DataFactory $rgname $dfname + } +} + +<# +.SYNOPSIS +Nagative test. Get resources with an empty linked service name. +#> +function Test-GetLinkedServiceWithEmptyName +{ + $lsname = "" + $dfname = Get-DataFactoryName + $rgname = Get-ResourceGroupName + $rglocation = Get-ProviderLocation ResourceManagement + $dflocation = Get-ProviderLocation DataFactoryManagement + + New-AzureResourceGroup -Name $rgname -Location $rglocation -Force + New-AzureDataFactory -ResourceGroupName $rgname -Name $dfname -Location $dflocation -Force + + # Test + Assert-ThrowsContains { Get-AzureDataFactoryLinkedService -ResourceGroupName $rgname -DataFactoryName $dfname -Name $lsname } "null" +} + +<# +.SYNOPSIS +Nagative test. Get resources with a linked service name which only contains white space. +#> +function Test-GetLinkedServiceWithWhiteSpaceName +{ + $lsname = " " + $dfname = Get-DataFactoryName + $rgname = Get-ResourceGroupName + $rglocation = Get-ProviderLocation ResourceManagement + $dflocation = Get-ProviderLocation DataFactoryManagement + + New-AzureResourceGroup -Name $rgname -Location $rglocation -Force + New-AzureDataFactory -ResourceGroupName $rgname -Name $dfname -Location $dflocation -Force + + # Test + Assert-ThrowsContains { Get-AzureDataFactoryLinkedService -ResourceGroupName $rgname -DataFactoryName $dfname -Name $lsname } "null" +} + +<# +.SYNOPSIS +Test piping support. +#> +function Test-LinkedServicePiping +{ + $dfname = Get-DataFactoryName + $rgname = Get-ResourceGroupName + $rglocation = Get-ProviderLocation ResourceManagement + $dflocation = Get-ProviderLocation DataFactoryManagement + + New-AzureResourceGroup -Name $rgname -Location $rglocation -Force + + try + { + New-AzureDataFactory -ResourceGroupName $rgname -Name $dfname -Location $dflocation -Force + + $lsname = "foo" + + New-AzureDataFactoryLinkedService -ResourceGroupName $rgname -DataFactoryName $dfname -Name $lsname -File .\Resources\linkedService.json -Force + + Get-AzureDataFactoryLinkedService -ResourceGroupName $rgname -DataFactoryName $dfname -Name $lsname | Remove-AzureDataFactoryLinkedService -Force + + # Test the linked service no longer exists + Assert-ThrowsContains { Get-AzureDataFactoryLinkedService -ResourceGroupName $rgname -DataFactoryName $dfname -Name $lsname } "LinkedServiceNotFound" + } + finally + { + Clean-DataFactory $rgname $dfname + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/PipelineTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/PipelineTests.cs new file mode 100644 index 000000000000..b7f71a2441a0 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/PipelineTests.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Xunit; + +namespace Microsoft.Azure.Commands.DataFactories.Test +{ + public class PipelineTests : DataFactoriesScenarioTestsBase + { + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestPipeline() + { + RunPowerShellTest("Test-Pipeline"); + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/PipelineTests.ps1 b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/PipelineTests.ps1 new file mode 100644 index 000000000000..bb4e92c8a2af --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/PipelineTests.ps1 @@ -0,0 +1,76 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +<# +.SYNOPSIS +Create a sample pipeline with all of its dependencies. Then test overwrite the pipeline and then +delete the pipeline with piping. +#> +function Test-Pipeline +{ + $dfname = Get-DataFactoryName + $rgname = Get-ResourceGroupName + $rglocation = Get-ProviderLocation ResourceManagement + $dflocation = Get-ProviderLocation DataFactoryManagement + + $endDate = [DateTime]::Parse("9/8/2014") + $startDate = $endDate.AddHours(-1) + + New-AzureResourceGroup -Name $rgname -Location $rglocation -Force + + try + { + $df = New-AzureDataFactory -ResourceGroupName $rgname -Name $dfname -Location $dflocation -Force + + New-AzureDataFactoryLinkedService -ResourceGroupName $rgname -DataFactoryName $dfname -File .\Resources\linkedService.json -Force + + New-AzureDataFactoryTable -ResourceGroupName $rgname -DataFactoryName $dfname -Name inputTable -File .\Resources\table.json -Force + New-AzureDataFactoryTable -ResourceGroupName $rgname -DataFactoryName $dfname -Name outputTable -File .\Resources\table.json -Force + + $pipelineName = "samplePipeline" + #create pipeline will return a failed provisioning state because we are not really feed the json with valid credentials. + #we can still continue the test with a Get operation though. + Assert-Throws { New-AzureDataFactoryPipeline -ResourceGroupName $rgname -Name $pipelineName -DataFactoryName $dfname -File ".\Resources\pipeline.json" -Force } + $expectedPipeline = Get-AzureDataFactoryPipeline -ResourceGroupName $rgname -Name $pipelineName -DataFactoryName $dfname + + Assert-AreEqual $rgname $expectedPipeline.ResourceGroupName + Assert-AreEqual $dfname $expectedPipeline.DataFactoryName + Assert-AreEqual $pipelineName $expectedPipeline.PipelineName + Assert-AreEqual "Failed" $expectedPipeline.ProvisioningState + + #overwrite the pipeline again with -DataFactory parameter (provisioning will still fail as we are not using valid credentials) + Assert-Throws { New-AzureDataFactoryPipeline -DataFactory $df -File ".\Resources\pipeline.json" -Force } + $expectedPipeline = Get-AzureDataFactoryPipeline -DataFactory $df -Name $pipelineName + + Assert-AreEqual $rgname $expectedPipeline.ResourceGroupName + Assert-AreEqual $dfname $expectedPipeline.DataFactoryName + Assert-AreEqual $pipelineName $expectedPipeline.PipelineName + Assert-AreEqual "Failed" $expectedPipeline.ProvisioningState + + #remove the pipeline through piping + Get-AzureDataFactoryPipeline -DataFactory $df -Name $pipelineName | Remove-AzureDataFactoryPipeline -Force + + #test the pipeline no longer exists + Assert-ThrowsContains { Get-AzureDataFactoryPipeline -DataFactory $df -Name $pipelineName } "PipelineNotFound" + + #remove the pipeline again should not throw + Remove-AzureDataFactoryPipeline -ResourceGroupName $rgname -DataFactoryName $dfname -Name $pipelineName -Force + + Remove-AzureDataFactoryPipeline -DataFactory $df -Name $pipelineName -Force + } + finally + { + Clean-DataFactory $rgname $dfname + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/TableTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/TableTests.cs new file mode 100644 index 000000000000..95391cc55900 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/TableTests.cs @@ -0,0 +1,57 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Xunit; + +namespace Microsoft.Azure.Commands.DataFactories.Test +{ + public class TableTests : DataFactoriesScenarioTestsBase + { + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestTable() + { + RunPowerShellTest("Test-Table"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestTableWithDataFactoryParameter() + { + RunPowerShellTest("Test-TableWithDataFactoryParameter"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetTableWithEmptyName() + { + RunPowerShellTest("Test-GetTableWithEmptyName"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetTableWithWhiteSpaceName() + { + RunPowerShellTest("Test-GetTableWithWhiteSpaceName"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestTablePiping() + { + RunPowerShellTest("Test-TablePiping"); + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/TableTests.ps1 b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/TableTests.ps1 new file mode 100644 index 000000000000..cd8059a7600e --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/ScenarioTests/TableTests.ps1 @@ -0,0 +1,157 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +<# +.SYNOPSIS +Create a table and the linked service which it depends on. Then do a Get to compare the result are identical. +Delete the created table after test finishes. +#> +function Test-Table +{ + $dfname = Get-DataFactoryName + $rgname = Get-ResourceGroupName + $rglocation = Get-ProviderLocation ResourceManagement + $dflocation = Get-ProviderLocation DataFactoryManagement + + New-AzureResourceGroup -Name $rgname -Location $rglocation -Force + + try + { + New-AzureDataFactory -ResourceGroupName $rgname -Name $dfname -Location $dflocation -Force + + New-AzureDataFactoryLinkedService -ResourceGroupName $rgname -DataFactoryName $dfname -File .\Resources\linkedService.json -Force + + $tblname = "foo2" + $actual = New-AzureDataFactoryTable -ResourceGroupName $rgname -DataFactoryName $dfname -Name $tblname -File .\Resources\table.json -Force + $expected = Get-AzureDataFactoryTable -ResourceGroupName $rgname -DataFactoryName $dfname -Name $tblname + + Assert-AreEqual $expected.ResourceGroupName $actual.ResourceGroupName + Assert-AreEqual $expected.DataFactoryName $actual.DataFactoryName + Assert-AreEqual $expected.TableName $actual.TableName + + Remove-AzureDataFactoryTable -ResourceGroupName $rgname -DataFactoryName $dfname -Name $tblname -Force + } + finally + { + Clean-DataFactory $rgname $dfname + } +} + +<# +.SYNOPSIS +Create a table and the linked service which it depends on. Then do a Get to compare the result are identical. +Delete the created table after test finishes. +Use -DataFactory parameter in all cmdlets. +#> +function Test-TableWithDataFactoryParameter +{ + $dfname = Get-DataFactoryName + $rgname = Get-ResourceGroupName + $rglocation = Get-ProviderLocation ResourceManagement + $dflocation = Get-ProviderLocation DataFactoryManagement + + New-AzureResourceGroup -Name $rgname -Location $rglocation -Force + + try + { + $df = New-AzureDataFactory -ResourceGroupName $rgname -Name $dfname -Location $dflocation -Force + + New-AzureDataFactoryLinkedService -ResourceGroupName $rgname -DataFactoryName $dfname -File .\Resources\linkedService.json -Force + + $tblname = "foo2" + $actual = New-AzureDataFactoryTable -DataFactory $df -Name $tblname -File .\Resources\table.json -Force + $expected = Get-AzureDataFactoryTable -DataFactory $df -Name $tblname + + Assert-AreEqual $expected.ResourceGroupName $actual.ResourceGroupName + Assert-AreEqual $expected.DataFactoryName $actual.DataFactoryName + Assert-AreEqual $expected.TableName $actual.TableName + + Remove-AzureDataFactoryTable -DataFactory $df -Name $tblname -Force + } + finally + { + Clean-DataFactory $rgname $dfname + } +} + +<# +.SYNOPSIS +Nagative test. Get resources with an empty table name. +#> +function Test-GetTableWithEmptyName +{ + $tblname = "" + $dfname = Get-DataFactoryName + $rgname = Get-ResourceGroupName + $rglocation = Get-ProviderLocation ResourceManagement + $dflocation = Get-ProviderLocation DataFactoryManagement + + New-AzureResourceGroup -Name $rgname -Location $rglocation -Force + New-AzureDataFactory -ResourceGroupName $rgname -Name $dfname -Location $dflocation -Force + + # Test + Assert-ThrowsContains { Get-AzureDataFactoryTable -ResourceGroupName $rgname -DataFactoryName $dfname -Name $tblname } "null" +} + +<# +.SYNOPSIS +Nagative test. Get resources with a table name which only contains white space. +#> +function Test-GetTableWithWhiteSpaceName +{ + $tblname = " " + $dfname = Get-DataFactoryName + $rgname = Get-ResourceGroupName + $rglocation = Get-ProviderLocation ResourceManagement + $dflocation = Get-ProviderLocation DataFactoryManagement + + New-AzureResourceGroup -Name $rgname -Location $rglocation -Force + New-AzureDataFactory -ResourceGroupName $rgname -Name $dfname -Location $dflocation -Force + + # Test + Assert-ThrowsContains { Get-AzureDataFactoryTable -ResourceGroupName $rgname -DataFactoryName $dfname -Name $tblname } "null" +} + +<# +.SYNOPSIS +Test piping support. +#> +function Test-TablePiping +{ + $dfname = Get-DataFactoryName + $rgname = Get-ResourceGroupName + $rglocation = Get-ProviderLocation ResourceManagement + $dflocation = Get-ProviderLocation DataFactoryManagement + + New-AzureResourceGroup -Name $rgname -Location $rglocation -Force + + try + { + New-AzureDataFactory -ResourceGroupName $rgname -Name $dfname -Location $dflocation -Force + + New-AzureDataFactoryLinkedService -ResourceGroupName $rgname -DataFactoryName $dfname -File .\Resources\linkedService.json -Force + + $tblname = "foo2" + New-AzureDataFactoryTable -ResourceGroupName $rgname -DataFactoryName $dfname -Name $tblname -File .\Resources\table.json -Force + + Get-AzureDataFactoryTable -ResourceGroupName $rgname -DataFactoryName $dfname -Name $tblname | Remove-AzureDataFactoryTable -Force + + # Test the table no longer exists + Assert-ThrowsContains { Get-AzureDataFactoryTable -ResourceGroupName $rgname -DataFactoryName $dfname -Name $tblname } "TableNotFound" + } + finally + { + Clean-DataFactory $rgname $dfname + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryGatewayTests/TestCreateDataFactoryGateway.json b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryGatewayTests/TestCreateDataFactoryGateway.json new file mode 100644 index 000000000000..afefda31106b --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryGatewayTests/TestCreateDataFactoryGateway.json @@ -0,0 +1,1105 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Cache\",\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/SuccessBricks.ClearDB\",\r\n \"namespace\": \"SuccessBricks.ClearDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "21352" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799860" + ], + "x-ms-request-id": [ + "61be1a16-975a-42df-b9a0-1bdb00fe4db0" + ], + "x-ms-correlation-request-id": [ + "61be1a16-975a-42df-b9a0-1bdb00fe4db0" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181205Z:61be1a16-975a-42df-b9a0-1bdb00fe4db0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:12:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Cache\",\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/SuccessBricks.ClearDB\",\r\n \"namespace\": \"SuccessBricks.ClearDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "21352" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799859" + ], + "x-ms-request-id": [ + "d7355475-33e2-49cf-bef9-6fdefdf14ac7" + ], + "x-ms-correlation-request-id": [ + "d7355475-33e2-49cf-bef9-6fdefdf14ac7" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181205Z:d7355475-33e2-49cf-bef9-6fdefdf14ac7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:12:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3163?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxNjM/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "102" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799858" + ], + "x-ms-request-id": [ + "35bf2ea5-ddfe-4810-8287-8fc5a2786296" + ], + "x-ms-correlation-request-id": [ + "35bf2ea5-ddfe-4810-8287-8fc5a2786296" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181205Z:35bf2ea5-ddfe-4810-8287-8fc5a2786296" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:12:04 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3163?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxNjM/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk3163\",\r\n \"name\": \"onesdk3163\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "183" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11942" + ], + "x-ms-request-id": [ + "f2f55459-dee7-4600-995a-4b985670b63e" + ], + "x-ms-correlation-request-id": [ + "f2f55459-dee7-4600-995a-4b985670b63e" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181205Z:f2f55459-dee7-4600-995a-4b985670b63e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:12:05 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk3163/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlR3JvdXBzL29uZXNkazMxNjMvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799857" + ], + "x-ms-request-id": [ + "0fd2cb1b-14e5-47ef-9320-eb8163e360f3" + ], + "x-ms-correlation-request-id": [ + "0fd2cb1b-14e5-47ef-9320-eb8163e360f3" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181205Z:0fd2cb1b-14e5-47ef-9320-eb8163e360f3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:12:05 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3163/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxNjMvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "centralus:5a9c14b0-3318-483d-b970-c162121dd8e0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799856" + ], + "x-ms-correlation-request-id": [ + "2fc93da0-0871-4a50-a0e6-9f7e3424963c" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181206Z:2fc93da0-0871-4a50-a0e6-9f7e3424963c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:12:05 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3163/providers/Microsoft.DataFactory/datafactories/onesdk30?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxNjMvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazMwP2FwaS12ZXJzaW9uPTIwMTQtMTAtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"onesdk30\",\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "67" + ], + "x-ms-client-request-id": [ + "b88ecae3-14a7-4b74-ae15-375670bcf867" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "146" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk30\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3163/providers/Microsoft.DataFactory/datafactories/onesdk30\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"3cbe8926-e9cc-4639-b9a0-6bca07291c8d\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "474" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "dedf8cbf-9ed8-4038-ad9f-a3b223c8293e" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11941" + ], + "x-ms-correlation-request-id": [ + "201beecb-3ccd-4454-af2b-700824a0e1aa" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181207Z:201beecb-3ccd-4454-af2b-700824a0e1aa" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:12:07 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3163/providers/Microsoft.DataFactory/datafactories/onesdk30?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3163/providers/Microsoft.DataFactory/datafactories/onesdk30?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxNjMvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazMwP2FwaS12ZXJzaW9uPTIwMTQtMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b899427b-e8c7-4425-b0f8-0aa587f6bf6d" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "146" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk30\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3163/providers/Microsoft.DataFactory/datafactories/onesdk30\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"3cbe8926-e9cc-4639-b9a0-6bca07291c8d\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "474" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "11e81770-f543-490a-9f19-91dce7622784" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799855" + ], + "x-ms-correlation-request-id": [ + "9ba74cbd-4b32-4efa-a871-a362a897e89e" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181207Z:9ba74cbd-4b32-4efa-a871-a362a897e89e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:12:07 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3163/providers/Microsoft.DataFactory/datafactories/onesdk30?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxNjMvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazMwP2FwaS12ZXJzaW9uPTIwMTQtMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "081d7d14-2193-432b-932f-85b2e2a09dd4" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "146" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk30\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3163/providers/Microsoft.DataFactory/datafactories/onesdk30\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"3cbe8926-e9cc-4639-b9a0-6bca07291c8d\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "474" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "a80e7651-58ff-41a1-8795-83e7c6287288" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799854" + ], + "x-ms-correlation-request-id": [ + "cc672f7a-c18f-483a-a1bd-a2d2f7fa2eea" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181212Z:cc672f7a-c18f-483a-a1bd-a2d2f7fa2eea" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:12:11 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3163/providers/Microsoft.DataFactory/datafactories/onesdk30?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxNjMvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazMwP2FwaS12ZXJzaW9uPTIwMTQtMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "733fe6f9-020d-4005-a8d3-90e6d1792f24" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "146" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk30\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3163/providers/Microsoft.DataFactory/datafactories/onesdk30\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"3cbe8926-e9cc-4639-b9a0-6bca07291c8d\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"Succeeded\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "468" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "63b2949e-e390-4467-971d-de453846e2a8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799853" + ], + "x-ms-correlation-request-id": [ + "eeeb6c3b-cc59-4ea1-8d0f-649545750723" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181217Z:eeeb6c3b-cc59-4ea1-8d0f-649545750723" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:12:17 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3163/providers/Microsoft.DataFactory/datafactories/onesdk30/gateways/foo?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxNjMvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazMwL2dhdGV3YXlzL2Zvbz9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ee1739d6-e5c1-4a09-b445-dd8871c224c8" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"message\": \"Gateway foo does not exist.\",\r\n \"code\": \"GatewayNotFound\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "78" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "927201ab-03d3-4eae-b6c7-159b2fb35038" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799852" + ], + "x-ms-correlation-request-id": [ + "4a5dd8ee-3b04-46e8-93fc-aa89e069ee43" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181217Z:4a5dd8ee-3b04-46e8-93fc-aa89e069ee43" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:12:17 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3163/providers/Microsoft.DataFactory/datafactories/onesdk30/gateways/foo?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxNjMvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazMwL2dhdGV3YXlzL2Zvbz9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6cc4f385-3565-46d6-a4de-607beb6f4c2f" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"foo\",\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"gatewayName\": \"foo\",\r\n \"location\": \"West US\",\r\n \"key\": null,\r\n \"description\": null,\r\n \"hostServiceUri\": null,\r\n \"dataFactoryName\": \"onesdk30\",\r\n \"status\": \"NeedRegistration\",\r\n \"versionStatus\": \"None\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"version\": null,\r\n \"createTime\": \"2014-10-21T18:12:18.0959495Z\",\r\n \"registerTime\": null,\r\n \"lastConnectTime\": null,\r\n \"expiryTime\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "494" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "75dbd8a3-c6df-489a-a286-ef43875d09a9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799850" + ], + "x-ms-correlation-request-id": [ + "c736b0ec-80fb-4584-b7f6-ebec0cb90071" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181219Z:c736b0ec-80fb-4584-b7f6-ebec0cb90071" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:12:18 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3163/providers/Microsoft.DataFactory/datafactories/onesdk30/gateways/foo?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxNjMvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazMwL2dhdGV3YXlzL2Zvbz9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"foo\",\r\n \"location\": \"WESTUS\",\r\n \"properties\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "67" + ], + "x-ms-client-request-id": [ + "bece9cca-13e2-41b8-98f2-bc62cf2c7d94" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "152" + ] + }, + "ResponseBody": "{\r\n \"name\": \"foo\",\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"gatewayName\": \"foo\",\r\n \"location\": \"West US\",\r\n \"key\": \"ADF#8636f516-4f88-4b24-9942-82f3362e6a71@8d88dc98-ab0c-4b80-825b-123b2cf8443c@8c0d1801-e863-44af-82e6-fb2f0c00f2ae@wu#hBWU7VMIkpVkA5PMqK2jlI2oNylduTKX4XYAPDBu/4Q=\",\r\n \"description\": null,\r\n \"hostServiceUri\": null,\r\n \"dataFactoryName\": \"onesdk30\",\r\n \"status\": \"NeedRegistration\",\r\n \"versionStatus\": \"None\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"version\": null,\r\n \"createTime\": \"2014-10-21T18:12:18.0959495Z\",\r\n \"registerTime\": null,\r\n \"lastConnectTime\": null,\r\n \"expiryTime\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "654" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "95f4a32d-2e06-46d0-9fea-295d175b088e" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11940" + ], + "x-ms-correlation-request-id": [ + "66ea0b98-41e4-4eb4-8fb0-73567e9d2979" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181218Z:66ea0b98-41e4-4eb4-8fb0-73567e9d2979" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:12:17 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3163/providers/Microsoft.DataFactory/datafactories/onesdk30/gateways/foo?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxNjMvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazMwL2dhdGV3YXlzL2Zvbz9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "bd279fe3-4819-439c-9edd-3f09126d3cef" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "152" + ] + }, + "ResponseBody": "{\r\n \"name\": \"foo\",\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"gatewayName\": \"foo\",\r\n \"location\": \"West US\",\r\n \"key\": null,\r\n \"description\": null,\r\n \"hostServiceUri\": null,\r\n \"dataFactoryName\": \"onesdk30\",\r\n \"status\": \"NeedRegistration\",\r\n \"versionStatus\": \"None\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"version\": null,\r\n \"createTime\": \"2014-10-21T18:12:18.0959495Z\",\r\n \"registerTime\": null,\r\n \"lastConnectTime\": null,\r\n \"expiryTime\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "494" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "b04097d7-630a-49b7-a6d3-8ff432050020" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799851" + ], + "x-ms-correlation-request-id": [ + "baa69c31-472a-474a-9a59-e1aa46ee8d47" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181218Z:baa69c31-472a-474a-9a59-e1aa46ee8d47" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:12:18 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3163/providers/Microsoft.DataFactory/datafactories/onesdk30/gateways/foo/regeneratekey?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxNjMvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazMwL2dhdGV3YXlzL2Zvby9yZWdlbmVyYXRla2V5P2FwaS12ZXJzaW9uPTIwMTQtMTAtMDEtcHJldmlldw==", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "942ba9fb-fa9e-4019-ae40-9ebbaf71f2a2" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"key\": \"ADF#8636f516-4f88-4b24-9942-82f3362e6a71@8d88dc98-ab0c-4b80-825b-123b2cf8443c@8c0d1801-e863-44af-82e6-fb2f0c00f2ae@wu#jCaSYttGJoNyUiD+j8D6jIfVZHIwaPo9zxU+C20X2ZI=\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "179" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "a7a6a7ba-b96b-4f08-8add-b343c5a57448" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11939" + ], + "x-ms-correlation-request-id": [ + "406ead66-8f26-4f9a-86d6-729b975c3270" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181220Z:406ead66-8f26-4f9a-86d6-729b975c3270" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:12:20 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3163/providers/Microsoft.DataFactory/datafactories/onesdk30/gateways/foo?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxNjMvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazMwL2dhdGV3YXlzL2Zvbz9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"name\": \"foo\",\r\n \"properties\": {\r\n \"description\": \"description\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "80" + ], + "x-ms-client-request-id": [ + "20141321-f632-4eca-b793-3b8b7b3897d1" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"foo\",\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"gatewayName\": \"foo\",\r\n \"location\": \"West US\",\r\n \"key\": null,\r\n \"description\": \"description\",\r\n \"hostServiceUri\": null,\r\n \"dataFactoryName\": \"onesdk30\",\r\n \"status\": \"NeedRegistration\",\r\n \"versionStatus\": \"None\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"version\": null,\r\n \"createTime\": \"2014-10-21T18:12:18.0959495Z\",\r\n \"registerTime\": null,\r\n \"lastConnectTime\": null,\r\n \"expiryTime\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "503" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "aff69e1c-9a99-4810-b1e2-f5923b8e0d4a" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11938" + ], + "x-ms-correlation-request-id": [ + "280c89cd-62fa-416b-b9c2-5718df69f06e" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181221Z:280c89cd-62fa-416b-b9c2-5718df69f06e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:12:20 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3163/providers/Microsoft.DataFactory/datafactories/onesdk30/gateways/foo?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxNjMvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazMwL2dhdGV3YXlzL2Zvbz9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b0b092ac-d5d4-4ac7-9778-80b37ba81ab2" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "158" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-request-id": [ + "2cb24e3a-8674-48f5-a18e-a1db2693a1b1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11937" + ], + "x-ms-correlation-request-id": [ + "9bc7cfc7-9a0f-40f3-9e05-54043fe9f010" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181222Z:9bc7cfc7-9a0f-40f3-9e05-54043fe9f010" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:12:22 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3163/providers/Microsoft.DataFactory/datafactories/onesdk30/gateways/foo/operationresults/01D5f94e618-8048-4fb0-9de8-39b4e8d465c3?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3163/providers/Microsoft.DataFactory/datafactories/onesdk30/gateways/foo/operationresults/01D5f94e618-8048-4fb0-9de8-39b4e8d465c3?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxNjMvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazMwL2dhdGV3YXlzL2Zvby9vcGVyYXRpb25yZXN1bHRzLzAxRDVmOTRlNjE4LTgwNDgtNGZiMC05ZGU4LTM5YjRlOGQ0NjVjMz9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "158" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "eb777263-9ae2-4277-9cc0-5e9782982dd7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799849" + ], + "x-ms-correlation-request-id": [ + "bd9112ed-2d94-4323-8245-45bd3b235d41" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181223Z:bd9112ed-2d94-4323-8245-45bd3b235d41" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:12:22 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3163/providers/Microsoft.DataFactory/datafactories/onesdk30?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxNjMvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazMwP2FwaS12ZXJzaW9uPTIwMTQtMTAtMDEtcHJldmlldw==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "29b975dd-0f11-4c38-b314-7e8a8ec3139b" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "35d8c460-0c38-4b9f-9bf7-d12781151c3e" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11936" + ], + "x-ms-correlation-request-id": [ + "755316ae-69df-4884-a750-5289c0335e49" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181223Z:755316ae-69df-4884-a750-5289c0335e49" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:12:22 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-DataFactoryGateway": [ + "onesdk30", + "onesdk3163" + ] + }, + "Variables": { + "SubscriptionId": "8d88dc98-ab0c-4b80-825b-123b2cf8443c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryGatewayTests/TestCreateDataFactoryGatewayWithDataFactoryParameter.json b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryGatewayTests/TestCreateDataFactoryGatewayWithDataFactoryParameter.json new file mode 100644 index 000000000000..c3489cf79f27 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryGatewayTests/TestCreateDataFactoryGatewayWithDataFactoryParameter.json @@ -0,0 +1,1168 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Cache\",\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/SuccessBricks.ClearDB\",\r\n \"namespace\": \"SuccessBricks.ClearDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "21352" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799881" + ], + "x-ms-request-id": [ + "dfa0440a-caed-47d1-b93a-ac464fe18293" + ], + "x-ms-correlation-request-id": [ + "dfa0440a-caed-47d1-b93a-ac464fe18293" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181005Z:dfa0440a-caed-47d1-b93a-ac464fe18293" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:10:05 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Cache\",\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/SuccessBricks.ClearDB\",\r\n \"namespace\": \"SuccessBricks.ClearDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "21352" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799880" + ], + "x-ms-request-id": [ + "cf7a02db-d13e-45f0-88eb-4e5418ce9937" + ], + "x-ms-correlation-request-id": [ + "cf7a02db-d13e-45f0-88eb-4e5418ce9937" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181005Z:cf7a02db-d13e-45f0-88eb-4e5418ce9937" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:10:05 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7774?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazc3NzQ/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "102" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799879" + ], + "x-ms-request-id": [ + "8073a916-64c8-4fe9-8ec5-aac6b37a4002" + ], + "x-ms-correlation-request-id": [ + "8073a916-64c8-4fe9-8ec5-aac6b37a4002" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181005Z:8073a916-64c8-4fe9-8ec5-aac6b37a4002" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:10:05 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7774?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazc3NzQ/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk7774\",\r\n \"name\": \"onesdk7774\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "183" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11952" + ], + "x-ms-request-id": [ + "9d395873-12d6-40d8-badb-a930f4e93b80" + ], + "x-ms-correlation-request-id": [ + "9d395873-12d6-40d8-badb-a930f4e93b80" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181005Z:9d395873-12d6-40d8-badb-a930f4e93b80" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:10:05 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk7774/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlR3JvdXBzL29uZXNkazc3NzQvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799878" + ], + "x-ms-request-id": [ + "9d584d8e-67d1-4359-a7d0-e869c83bbe81" + ], + "x-ms-correlation-request-id": [ + "9d584d8e-67d1-4359-a7d0-e869c83bbe81" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181006Z:9d584d8e-67d1-4359-a7d0-e869c83bbe81" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:10:05 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7774/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazc3NzQvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "centralus:8246d216-5d5d-47cb-a54f-f376fe4f4cc7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799877" + ], + "x-ms-correlation-request-id": [ + "81b62e99-ea09-48af-9c22-8579b65f750e" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181006Z:81b62e99-ea09-48af-9c22-8579b65f750e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:10:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7774/providers/Microsoft.DataFactory/datafactories/onesdk6746?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazc3NzQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazY3NDY/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"onesdk6746\",\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "69" + ], + "x-ms-client-request-id": [ + "eff01d2d-31e3-4b88-8389-2e690452c721" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "109" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk6746\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7774/providers/Microsoft.DataFactory/datafactories/onesdk6746\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"3a0c44ae-865a-4c89-b772-5b8ddda430c8\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "ede38cd8-9cd7-4723-a9c1-790b25f86c42" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11951" + ], + "x-ms-correlation-request-id": [ + "9f21ed8f-b0aa-4292-bc7b-85538047e865" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181007Z:9f21ed8f-b0aa-4292-bc7b-85538047e865" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:10:06 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7774/providers/Microsoft.DataFactory/datafactories/onesdk6746?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7774/providers/Microsoft.DataFactory/datafactories/onesdk6746?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazc3NzQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazY3NDY/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "059d8dbe-6a23-4aba-beb1-3dff61992159" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "109" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk6746\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7774/providers/Microsoft.DataFactory/datafactories/onesdk6746\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"3a0c44ae-865a-4c89-b772-5b8ddda430c8\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "bff1c57e-5142-4883-9e1f-c52d51386f7f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799876" + ], + "x-ms-correlation-request-id": [ + "f5ec3f1e-e438-4545-8a3c-89ea2ea500d3" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181007Z:f5ec3f1e-e438-4545-8a3c-89ea2ea500d3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:10:07 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7774/providers/Microsoft.DataFactory/datafactories/onesdk6746?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazc3NzQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazY3NDY/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a37d49bf-dd2b-40d1-a72f-cc389c2a12d0" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "109" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk6746\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7774/providers/Microsoft.DataFactory/datafactories/onesdk6746\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"3a0c44ae-865a-4c89-b772-5b8ddda430c8\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "5e45092a-4443-423a-b3a1-d062e4918aa3" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799875" + ], + "x-ms-correlation-request-id": [ + "498f5bf0-1135-406f-af88-060964dab024" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181012Z:498f5bf0-1135-406f-af88-060964dab024" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:10:11 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7774/providers/Microsoft.DataFactory/datafactories/onesdk6746?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazc3NzQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazY3NDY/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f7b20b31-57e8-46cb-9ccc-fa674f225a3f" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "109" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk6746\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7774/providers/Microsoft.DataFactory/datafactories/onesdk6746\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"3a0c44ae-865a-4c89-b772-5b8ddda430c8\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "ec53a943-8f9c-48d1-8944-40da59ce5140" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799874" + ], + "x-ms-correlation-request-id": [ + "63aa5c7b-3428-41b5-bd78-14db10617396" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181017Z:63aa5c7b-3428-41b5-bd78-14db10617396" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:10:17 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7774/providers/Microsoft.DataFactory/datafactories/onesdk6746?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazc3NzQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazY3NDY/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "dd595291-2c2e-4437-9263-a81aba6054e9" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "109" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk6746\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7774/providers/Microsoft.DataFactory/datafactories/onesdk6746\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"3a0c44ae-865a-4c89-b772-5b8ddda430c8\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"Succeeded\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "472" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "6085bbe6-0201-42db-beae-85675cfffadc" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799873" + ], + "x-ms-correlation-request-id": [ + "ae9671f6-9ec4-4ad6-b7a1-f77aef134e4c" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181022Z:ae9671f6-9ec4-4ad6-b7a1-f77aef134e4c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:10:21 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7774/providers/Microsoft.DataFactory/datafactories/onesdk6746/gateways/foo?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazc3NzQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazY3NDYvZ2F0ZXdheXMvZm9vP2FwaS12ZXJzaW9uPTIwMTQtMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6aec61f2-c74d-4e47-9373-508db3bc9dc8" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"message\": \"Gateway foo does not exist.\",\r\n \"code\": \"GatewayNotFound\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "78" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "c87c21d7-5dc7-4a2a-a336-b16a4e8b3a8e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799872" + ], + "x-ms-correlation-request-id": [ + "f8fb9566-4b7a-4cad-bff0-3685d21d1c7b" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181022Z:f8fb9566-4b7a-4cad-bff0-3685d21d1c7b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:10:22 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7774/providers/Microsoft.DataFactory/datafactories/onesdk6746/gateways/foo?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazc3NzQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazY3NDYvZ2F0ZXdheXMvZm9vP2FwaS12ZXJzaW9uPTIwMTQtMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a28d6f66-5bb4-42ff-8a0f-a40f20d32fc7" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"foo\",\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"gatewayName\": \"foo\",\r\n \"location\": \"West US\",\r\n \"key\": null,\r\n \"description\": null,\r\n \"hostServiceUri\": null,\r\n \"dataFactoryName\": \"onesdk6746\",\r\n \"status\": \"NeedRegistration\",\r\n \"versionStatus\": \"None\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"version\": null,\r\n \"createTime\": \"2014-10-21T18:10:23.9245014Z\",\r\n \"registerTime\": null,\r\n \"lastConnectTime\": null,\r\n \"expiryTime\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "496" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "0a3bb64e-eea0-4b55-970a-efe4b4d4db94" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799870" + ], + "x-ms-correlation-request-id": [ + "f4affef2-222e-4bcb-85db-8f64e8e4ff15" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181024Z:f4affef2-222e-4bcb-85db-8f64e8e4ff15" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:10:24 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7774/providers/Microsoft.DataFactory/datafactories/onesdk6746/gateways/foo?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazc3NzQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazY3NDYvZ2F0ZXdheXMvZm9vP2FwaS12ZXJzaW9uPTIwMTQtMTAtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"foo\",\r\n \"location\": \"WESTUS\",\r\n \"properties\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "67" + ], + "x-ms-client-request-id": [ + "1e89be13-14dc-4ec2-84de-dceb34999097" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "116" + ] + }, + "ResponseBody": "{\r\n \"name\": \"foo\",\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"gatewayName\": \"foo\",\r\n \"location\": \"West US\",\r\n \"key\": \"ADF#cdd9366f-b481-4517-bb2b-f38b0bed751c@8d88dc98-ab0c-4b80-825b-123b2cf8443c@8c0d1801-e863-44af-82e6-fb2f0c00f2ae@wu#RH1CERwi8XQ0atrYQkoWXS9nUIkW+uCxfJGCk9an75c=\",\r\n \"description\": null,\r\n \"hostServiceUri\": null,\r\n \"dataFactoryName\": \"onesdk6746\",\r\n \"status\": \"NeedRegistration\",\r\n \"versionStatus\": \"None\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"version\": null,\r\n \"createTime\": \"2014-10-21T18:10:23.9245014Z\",\r\n \"registerTime\": null,\r\n \"lastConnectTime\": null,\r\n \"expiryTime\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "656" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "915f8caa-fc3f-4268-a48a-482d773b1e65" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11950" + ], + "x-ms-correlation-request-id": [ + "9b0a0366-4316-45a5-9143-52c4221a99b9" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181024Z:9b0a0366-4316-45a5-9143-52c4221a99b9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:10:24 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7774/providers/Microsoft.DataFactory/datafactories/onesdk6746/gateways/foo?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazc3NzQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazY3NDYvZ2F0ZXdheXMvZm9vP2FwaS12ZXJzaW9uPTIwMTQtMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "48246f43-4eb5-403c-a3ed-0a1203a6dcfb" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "116" + ] + }, + "ResponseBody": "{\r\n \"name\": \"foo\",\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"gatewayName\": \"foo\",\r\n \"location\": \"West US\",\r\n \"key\": null,\r\n \"description\": null,\r\n \"hostServiceUri\": null,\r\n \"dataFactoryName\": \"onesdk6746\",\r\n \"status\": \"NeedRegistration\",\r\n \"versionStatus\": \"None\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"version\": null,\r\n \"createTime\": \"2014-10-21T18:10:23.9245014Z\",\r\n \"registerTime\": null,\r\n \"lastConnectTime\": null,\r\n \"expiryTime\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "496" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "5abd8e07-fcf2-4ad3-b2da-a663f3d37da7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799871" + ], + "x-ms-correlation-request-id": [ + "ad197109-1186-43e7-ac37-01200677f58c" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181024Z:ad197109-1186-43e7-ac37-01200677f58c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:10:24 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7774/providers/Microsoft.DataFactory/datafactories/onesdk6746/gateways/foo/regeneratekey?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazc3NzQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazY3NDYvZ2F0ZXdheXMvZm9vL3JlZ2VuZXJhdGVrZXk/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5fce7999-80e4-450d-b31d-3d6b3f686269" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"key\": \"ADF#cdd9366f-b481-4517-bb2b-f38b0bed751c@8d88dc98-ab0c-4b80-825b-123b2cf8443c@8c0d1801-e863-44af-82e6-fb2f0c00f2ae@wu#tdYy+hR/ePAOrhKpmkq8ND7Em7pNBHTqdwTNa7T0auw=\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "179" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "e0a153fc-33d0-4997-adb3-ec6fc9b77e1d" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11949" + ], + "x-ms-correlation-request-id": [ + "daa92af3-a3f7-492d-a8e5-bd251e209705" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181026Z:daa92af3-a3f7-492d-a8e5-bd251e209705" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:10:25 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7774/providers/Microsoft.DataFactory/datafactories/onesdk6746/gateways/foo?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazc3NzQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazY3NDYvZ2F0ZXdheXMvZm9vP2FwaS12ZXJzaW9uPTIwMTQtMTAtMDEtcHJldmlldw==", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"name\": \"foo\",\r\n \"properties\": {\r\n \"description\": \"description\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "80" + ], + "x-ms-client-request-id": [ + "471b995d-086a-4774-b94b-2fc5a76aecdc" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"foo\",\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"gatewayName\": \"foo\",\r\n \"location\": \"West US\",\r\n \"key\": null,\r\n \"description\": \"description\",\r\n \"hostServiceUri\": null,\r\n \"dataFactoryName\": \"onesdk6746\",\r\n \"status\": \"NeedRegistration\",\r\n \"versionStatus\": \"None\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"version\": null,\r\n \"createTime\": \"2014-10-21T18:10:23.9245014Z\",\r\n \"registerTime\": null,\r\n \"lastConnectTime\": null,\r\n \"expiryTime\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "505" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "3aa7884d-adc9-4731-a84a-bc4820ab2aa6" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11948" + ], + "x-ms-correlation-request-id": [ + "26e770de-45ed-4153-8917-86a45168b807" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181027Z:26e770de-45ed-4153-8917-86a45168b807" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:10:27 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7774/providers/Microsoft.DataFactory/datafactories/onesdk6746/gateways/foo?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazc3NzQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazY3NDYvZ2F0ZXdheXMvZm9vP2FwaS12ZXJzaW9uPTIwMTQtMTAtMDEtcHJldmlldw==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "658d0dca-e2db-461f-ae69-492f07366d76" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "122" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-request-id": [ + "3f2e3183-9bd0-49d8-9e4f-690bee14f4a0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11947" + ], + "x-ms-correlation-request-id": [ + "8bde64f0-4270-4538-b9fe-257fc6d91fb1" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181029Z:8bde64f0-4270-4538-b9fe-257fc6d91fb1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:10:28 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7774/providers/Microsoft.DataFactory/datafactories/onesdk6746/gateways/foo/operationresults/01De2eed86c-3f4c-419b-91b3-d30f5f188a4a?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7774/providers/Microsoft.DataFactory/datafactories/onesdk6746/gateways/foo/operationresults/01De2eed86c-3f4c-419b-91b3-d30f5f188a4a?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazc3NzQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazY3NDYvZ2F0ZXdheXMvZm9vL29wZXJhdGlvbnJlc3VsdHMvMDFEZTJlZWQ4NmMtM2Y0Yy00MTliLTkxYjMtZDMwZjVmMTg4YTRhP2FwaS12ZXJzaW9uPTIwMTQtMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "122" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "d5c910cd-b089-4dac-b0fe-1185d5b1e153" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799869" + ], + "x-ms-correlation-request-id": [ + "80a40e55-11cf-46aa-984e-e37f867bfd08" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181029Z:80a40e55-11cf-46aa-984e-e37f867bfd08" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:10:29 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7774/providers/Microsoft.DataFactory/datafactories/onesdk6746?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazc3NzQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazY3NDY/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1f6c08fa-e78e-4ad7-9d49-b16db3574992" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "dcfff934-c764-4eb9-904f-df3099b8d7d7" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11946" + ], + "x-ms-correlation-request-id": [ + "ba0ebfb1-8f44-4871-86fb-dcbc0ec94e48" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181030Z:ba0ebfb1-8f44-4871-86fb-dcbc0ec94e48" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:10:29 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-DataFactoryGatewayWithDataFactoryParameter": [ + "onesdk6746", + "onesdk7774" + ] + }, + "Variables": { + "SubscriptionId": "8d88dc98-ab0c-4b80-825b-123b2cf8443c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryGatewayTests/TestGetNonExistingDataFactoryGateway.json b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryGatewayTests/TestGetNonExistingDataFactoryGateway.json new file mode 100644 index 000000000000..453afafccb1d --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryGatewayTests/TestGetNonExistingDataFactoryGateway.json @@ -0,0 +1,514 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Cache\",\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/SuccessBricks.ClearDB\",\r\n \"namespace\": \"SuccessBricks.ClearDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "21352" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799868" + ], + "x-ms-request-id": [ + "d7707dd4-6dd1-4f3c-8ba6-ad4e4e0f6425" + ], + "x-ms-correlation-request-id": [ + "d7707dd4-6dd1-4f3c-8ba6-ad4e4e0f6425" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181115Z:d7707dd4-6dd1-4f3c-8ba6-ad4e4e0f6425" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:11:15 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk5604?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazU2MDQ/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "102" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799867" + ], + "x-ms-request-id": [ + "930f05ec-0d8a-42e5-bb7a-285d46712bfe" + ], + "x-ms-correlation-request-id": [ + "930f05ec-0d8a-42e5-bb7a-285d46712bfe" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181115Z:930f05ec-0d8a-42e5-bb7a-285d46712bfe" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:11:15 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk5604?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazU2MDQ/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk5604\",\r\n \"name\": \"onesdk5604\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "183" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11945" + ], + "x-ms-request-id": [ + "03247946-5c41-42a8-9403-0f14c5db5ae4" + ], + "x-ms-correlation-request-id": [ + "03247946-5c41-42a8-9403-0f14c5db5ae4" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181115Z:03247946-5c41-42a8-9403-0f14c5db5ae4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:11:15 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk5604/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlR3JvdXBzL29uZXNkazU2MDQvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799866" + ], + "x-ms-request-id": [ + "c9a074fc-f92f-42e7-b98d-b3240289eadf" + ], + "x-ms-correlation-request-id": [ + "c9a074fc-f92f-42e7-b98d-b3240289eadf" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181115Z:c9a074fc-f92f-42e7-b98d-b3240289eadf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:11:15 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk5604/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazU2MDQvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "centralus:2c8ac2e5-5de5-4be7-90f8-6c7af6576714" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799865" + ], + "x-ms-correlation-request-id": [ + "4f34a29b-8bce-49dc-bafd-56e94595c22f" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181116Z:4f34a29b-8bce-49dc-bafd-56e94595c22f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:11:16 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk5604/providers/Microsoft.DataFactory/datafactories/onesdk7199?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazU2MDQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazcxOTk/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"onesdk7199\",\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "69" + ], + "x-ms-client-request-id": [ + "344ff273-43c3-4879-84f8-2d754a98c391" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "133" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk7199\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk5604/providers/Microsoft.DataFactory/datafactories/onesdk7199\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"2a8978b9-0114-45a9-a0a4-9bb590019ba2\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "e47e473a-4d7c-4c20-9589-0642d71c16f6" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11944" + ], + "x-ms-correlation-request-id": [ + "074bb121-763f-4a07-b35f-7c95e825f284" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181116Z:074bb121-763f-4a07-b35f-7c95e825f284" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:11:16 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk5604/providers/Microsoft.DataFactory/datafactories/onesdk7199?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk5604/providers/Microsoft.DataFactory/datafactories/onesdk7199?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazU2MDQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazcxOTk/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "235664c0-52c8-4e02-a0e8-4aaf61418792" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "133" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk7199\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk5604/providers/Microsoft.DataFactory/datafactories/onesdk7199\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"2a8978b9-0114-45a9-a0a4-9bb590019ba2\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "a77db981-8c04-4772-9e23-6046e40d07d4" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799864" + ], + "x-ms-correlation-request-id": [ + "c749041e-2f8e-45ac-b75e-99af6139d9c8" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181117Z:c749041e-2f8e-45ac-b75e-99af6139d9c8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:11:17 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk5604/providers/Microsoft.DataFactory/datafactories/onesdk7199?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazU2MDQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazcxOTk/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "eb060660-4a3b-4771-911b-1d85dd46ed21" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "133" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk7199\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk5604/providers/Microsoft.DataFactory/datafactories/onesdk7199\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"2a8978b9-0114-45a9-a0a4-9bb590019ba2\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"Succeeded\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "472" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "2b3c40c4-ad86-456c-af60-9afba0985730" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799863" + ], + "x-ms-correlation-request-id": [ + "02c463ba-b620-4a58-86da-9f69c1562f72" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181122Z:02c463ba-b620-4a58-86da-9f69c1562f72" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:11:21 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk5604/providers/Microsoft.DataFactory/datafactories/onesdk7199/gateways/gwname?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazU2MDQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazcxOTkvZ2F0ZXdheXMvZ3duYW1lP2FwaS12ZXJzaW9uPTIwMTQtMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2060ee8e-464d-4439-9dca-6c2779b258b9" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"message\": \"Gateway gwname does not exist.\",\r\n \"code\": \"GatewayNotFound\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "81" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "e84eaaf1-81aa-490d-b184-4dc5a6143a80" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799862" + ], + "x-ms-correlation-request-id": [ + "661f1810-f4f4-4a96-a8cb-38f67a1d5c49" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141021T181122Z:661f1810-f4f4-4a96-a8cb-38f67a1d5c49" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 21 Oct 2014 18:11:22 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 404 + } + ], + "Names": { + "Test-GetNonExistingDataFactoryGateway": [ + "onesdk7199", + "onesdk5604" + ] + }, + "Variables": { + "SubscriptionId": "8d88dc98-ab0c-4b80-825b-123b2cf8443c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryTests/TestCreateDataFactory.json b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryTests/TestCreateDataFactory.json new file mode 100644 index 000000000000..5926229ef473 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryTests/TestCreateDataFactory.json @@ -0,0 +1,679 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799839" + ], + "x-ms-request-id": [ + "d0d5798e-2f70-4de3-9758-1acd23071a40" + ], + "x-ms-correlation-request-id": [ + "d0d5798e-2f70-4de3-9758-1acd23071a40" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020634Z:d0d5798e-2f70-4de3-9758-1acd23071a40" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:06:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799838" + ], + "x-ms-request-id": [ + "486a1060-8d82-4b13-91f7-e6bfcc274eb7" + ], + "x-ms-correlation-request-id": [ + "486a1060-8d82-4b13-91f7-e6bfcc274eb7" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020634Z:486a1060-8d82-4b13-91f7-e6bfcc274eb7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:06:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2321?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazIzMjE/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "102" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799837" + ], + "x-ms-request-id": [ + "d57331fe-50c0-464b-b3d4-b2f89c14dc59" + ], + "x-ms-correlation-request-id": [ + "d57331fe-50c0-464b-b3d4-b2f89c14dc59" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020634Z:d57331fe-50c0-464b-b3d4-b2f89c14dc59" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:06:33 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2321?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazIzMjE/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk2321\",\r\n \"name\": \"onesdk2321\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "183" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11919" + ], + "x-ms-request-id": [ + "85f241b6-acbe-48ad-b1c5-b00828e61933" + ], + "x-ms-correlation-request-id": [ + "85f241b6-acbe-48ad-b1c5-b00828e61933" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020634Z:85f241b6-acbe-48ad-b1c5-b00828e61933" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:06:34 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk2321/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlR3JvdXBzL29uZXNkazIzMjEvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799836" + ], + "x-ms-request-id": [ + "944d9467-ad82-4d88-b93c-73633f4579b3" + ], + "x-ms-correlation-request-id": [ + "944d9467-ad82-4d88-b93c-73633f4579b3" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020634Z:944d9467-ad82-4d88-b93c-73633f4579b3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:06:34 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2321/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazIzMjEvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "centralus:04a43cf7-e252-4a1f-97be-cbf53d9c0588" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799823" + ], + "x-ms-correlation-request-id": [ + "796509f2-5986-4185-85c8-0748d513990d" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020635Z:796509f2-5986-4185-85c8-0748d513990d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:06:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2321/providers/Microsoft.DataFactory/datafactories/onesdk7186?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazIzMjEvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazcxODY/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"onesdk7186\",\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "69" + ], + "x-ms-client-request-id": [ + "a45b257f-85c0-4191-885d-4420e0dd103e" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "382" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk7186\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2321/providers/Microsoft.DataFactory/datafactories/onesdk7186\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"f22d710e-872c-4cd5-96e1-92e0fbe2ed2a\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "4ca8ea79-bbf7-4942-990b-72cbff13afd6" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11918" + ], + "x-ms-correlation-request-id": [ + "9e809b7f-71a2-48ce-a217-a6c4b4bce20a" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020636Z:9e809b7f-71a2-48ce-a217-a6c4b4bce20a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:06:36 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2321/providers/Microsoft.DataFactory/datafactories/onesdk7186?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2321/providers/Microsoft.DataFactory/datafactories/onesdk7186?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazIzMjEvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazcxODY/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "37a97007-eb98-4c46-9344-da5ffc6f2901" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "382" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk7186\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2321/providers/Microsoft.DataFactory/datafactories/onesdk7186\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"f22d710e-872c-4cd5-96e1-92e0fbe2ed2a\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "09f11b81-fc00-42f9-a7f0-3e84b59c8801" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799835" + ], + "x-ms-correlation-request-id": [ + "f3d63bd9-5f44-4d93-9329-caaafe1278bd" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020636Z:f3d63bd9-5f44-4d93-9329-caaafe1278bd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:06:36 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2321/providers/Microsoft.DataFactory/datafactories/onesdk7186?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazIzMjEvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazcxODY/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "935de447-673d-41f9-aa05-baa11b45fe80" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "382" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk7186\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2321/providers/Microsoft.DataFactory/datafactories/onesdk7186\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"f22d710e-872c-4cd5-96e1-92e0fbe2ed2a\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "868a221d-38ae-4e86-845d-94745dceb965" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799834" + ], + "x-ms-correlation-request-id": [ + "996a7562-0754-4522-aa26-c13cb1413f7b" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020641Z:996a7562-0754-4522-aa26-c13cb1413f7b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:06:41 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2321/providers/Microsoft.DataFactory/datafactories/onesdk7186?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazIzMjEvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazcxODY/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "93a2eaba-8d94-4dad-b921-efed7d04f7f4" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "382" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk7186\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2321/providers/Microsoft.DataFactory/datafactories/onesdk7186\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"f22d710e-872c-4cd5-96e1-92e0fbe2ed2a\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"Succeeded\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "472" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "3a900525-6fdd-495d-a2cf-f1c70326b8bf" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799833" + ], + "x-ms-correlation-request-id": [ + "3b0c1760-88e0-4170-b322-a19dcc9c9b4e" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020647Z:3b0c1760-88e0-4170-b322-a19dcc9c9b4e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:06:47 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2321/providers/Microsoft.DataFactory/datafactories/onesdk7186?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazIzMjEvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazcxODY/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9f90a890-24d9-43da-a825-79490015afaf" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk7186\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2321/providers/Microsoft.DataFactory/datafactories/onesdk7186\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"f22d710e-872c-4cd5-96e1-92e0fbe2ed2a\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"Succeeded\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "472" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "85621750-26a8-4505-bf7e-8e1e203d8936" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799832" + ], + "x-ms-correlation-request-id": [ + "16b5de5e-f31d-48e7-903a-db9022ba5326" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020647Z:16b5de5e-f31d-48e7-903a-db9022ba5326" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:06:47 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2321/providers/Microsoft.DataFactory/datafactories/onesdk7186?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazIzMjEvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazcxODY/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "8818347f-384f-4421-b33d-bc9e5162b4e4" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "90d244c0-4ff2-4d06-8916-24fd5e69506c" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11917" + ], + "x-ms-correlation-request-id": [ + "07a75474-d249-4109-805e-60f701abdb25" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020648Z:07a75474-d249-4109-805e-60f701abdb25" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:06:47 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-CreateDataFactory": [ + "onesdk7186", + "onesdk2321" + ] + }, + "Variables": { + "SubscriptionId": "8d88dc98-ab0c-4b80-825b-123b2cf8443c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryTests/TestDataFactoryPiping.json b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryTests/TestDataFactoryPiping.json new file mode 100644 index 000000000000..0e1fe56caacf --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryTests/TestDataFactoryPiping.json @@ -0,0 +1,727 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799848" + ], + "x-ms-request-id": [ + "155d5a6e-c9fd-4aff-8361-e074909c0320" + ], + "x-ms-correlation-request-id": [ + "155d5a6e-c9fd-4aff-8361-e074909c0320" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020542Z:155d5a6e-c9fd-4aff-8361-e074909c0320" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:05:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799847" + ], + "x-ms-request-id": [ + "41bf6846-d727-4b24-9889-2b7e8eaaddf3" + ], + "x-ms-correlation-request-id": [ + "41bf6846-d727-4b24-9889-2b7e8eaaddf3" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020542Z:41bf6846-d727-4b24-9889-2b7e8eaaddf3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:05:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk6462?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazY0NjI/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "102" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799846" + ], + "x-ms-request-id": [ + "6d31d1e0-7e6e-40fc-a119-3a4994926156" + ], + "x-ms-correlation-request-id": [ + "6d31d1e0-7e6e-40fc-a119-3a4994926156" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020543Z:6d31d1e0-7e6e-40fc-a119-3a4994926156" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:05:42 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk6462?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazY0NjI/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk6462\",\r\n \"name\": \"onesdk6462\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "183" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11922" + ], + "x-ms-request-id": [ + "f47ab1f7-a8d4-47ae-944c-66a561870ee9" + ], + "x-ms-correlation-request-id": [ + "f47ab1f7-a8d4-47ae-944c-66a561870ee9" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020543Z:f47ab1f7-a8d4-47ae-944c-66a561870ee9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:05:42 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk6462/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlR3JvdXBzL29uZXNkazY0NjIvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799845" + ], + "x-ms-request-id": [ + "b01881c9-53f1-4140-ae36-a67d9c2b10cb" + ], + "x-ms-correlation-request-id": [ + "b01881c9-53f1-4140-ae36-a67d9c2b10cb" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020543Z:b01881c9-53f1-4140-ae36-a67d9c2b10cb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:05:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk6462/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazY0NjIvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "centralus:5b60ec72-a883-4f5f-ace4-d81756aa9df0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799825" + ], + "x-ms-correlation-request-id": [ + "51b15bc7-42df-4b93-b4d7-ba19ec227bb5" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020543Z:51b15bc7-42df-4b93-b4d7-ba19ec227bb5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:05:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk6462/providers/Microsoft.DataFactory/datafactories/onesdk5238?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazY0NjIvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazUyMzg/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"onesdk5238\",\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "69" + ], + "x-ms-client-request-id": [ + "0b59ff4e-6ca9-4888-8798-b3abf6062502" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "366" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk5238\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk6462/providers/Microsoft.DataFactory/datafactories/onesdk5238\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"ca927ec8-ed8b-4c41-b3b6-77e856140e79\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "13b0de36-011d-4855-aa71-774d5dcd8dca" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11921" + ], + "x-ms-correlation-request-id": [ + "1dc5f4b9-8fe4-4533-a0ba-ef865d8c0ff0" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020544Z:1dc5f4b9-8fe4-4533-a0ba-ef865d8c0ff0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:05:43 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk6462/providers/Microsoft.DataFactory/datafactories/onesdk5238?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk6462/providers/Microsoft.DataFactory/datafactories/onesdk5238?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazY0NjIvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazUyMzg/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b7fcfcd3-09f5-42b9-a440-8fbf2377637d" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "366" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk5238\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk6462/providers/Microsoft.DataFactory/datafactories/onesdk5238\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"ca927ec8-ed8b-4c41-b3b6-77e856140e79\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "4e1b25bc-2469-4a00-9d9c-5787be07e508" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799844" + ], + "x-ms-correlation-request-id": [ + "95563f6d-d18f-4350-bc32-3f71b0bc56bd" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020545Z:95563f6d-d18f-4350-bc32-3f71b0bc56bd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:05:44 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk6462/providers/Microsoft.DataFactory/datafactories/onesdk5238?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazY0NjIvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazUyMzg/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6ec99f59-ef1c-46f3-aa39-55ceb41590e7" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "366" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk5238\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk6462/providers/Microsoft.DataFactory/datafactories/onesdk5238\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"ca927ec8-ed8b-4c41-b3b6-77e856140e79\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "f172e8be-87a6-45c1-8046-2d6c84958d3a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799843" + ], + "x-ms-correlation-request-id": [ + "fbf0c78c-c5be-4bee-8d83-01b89cf3a642" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020550Z:fbf0c78c-c5be-4bee-8d83-01b89cf3a642" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:05:49 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk6462/providers/Microsoft.DataFactory/datafactories/onesdk5238?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazY0NjIvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazUyMzg/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "57b81145-b216-4373-964c-b4b31220cd17" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "366" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk5238\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk6462/providers/Microsoft.DataFactory/datafactories/onesdk5238\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"ca927ec8-ed8b-4c41-b3b6-77e856140e79\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"Succeeded\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "472" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "2a7b7610-cc43-4671-a6b0-495f403ac6f3" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799842" + ], + "x-ms-correlation-request-id": [ + "75a5043c-85a9-45a5-9f3e-8f5e1beb58dd" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020555Z:75a5043c-85a9-45a5-9f3e-8f5e1beb58dd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:05:54 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk6462/providers/Microsoft.DataFactory/datafactories?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazY0NjIvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzP2FwaS12ZXJzaW9uPTIwMTQtMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "927e0cc2-8316-47e0-a194-7d1bc8b62344" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"name\": \"onesdk5238\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk6462/providers/Microsoft.DataFactory/datafactories/onesdk5238\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"ca927ec8-ed8b-4c41-b3b6-77e856140e79\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"Succeeded\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "553" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "521c755e-2e38-4d67-9159-67cbb9bde2ae" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799841" + ], + "x-ms-correlation-request-id": [ + "77f3183d-915f-4e6f-a1f6-5b253f26993f" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020555Z:77f3183d-915f-4e6f-a1f6-5b253f26993f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:05:54 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk6462/providers/Microsoft.DataFactory/datafactories/onesdk5238?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazY0NjIvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazUyMzg/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2424683f-d0de-4ace-928c-14d151fe5309" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "5202f9fe-fa06-4f14-8a2a-9354c3051658" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11920" + ], + "x-ms-correlation-request-id": [ + "cee332c5-d590-493e-99b5-08674936ff74" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020555Z:cee332c5-d590-493e-99b5-08674936ff74" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:05:55 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk6462/providers/Microsoft.DataFactory/datafactories/onesdk5238?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazY0NjIvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazUyMzg/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "8805f02e-d1b2-4a30-8bab-752721dda903" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"Resource not found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "69" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "56ae79d0-c7e0-4e51-a609-55b28b027255" + ], + "x-ms-correlation-request-id": [ + "56ae79d0-c7e0-4e51-a609-55b28b027255" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020556Z:56ae79d0-c7e0-4e51-a609-55b28b027255" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:05:55 GMT" + ] + }, + "StatusCode": 404 + } + ], + "Names": { + "Test-DataFactoryPiping": [ + "onesdk5238", + "onesdk6462" + ] + }, + "Variables": { + "SubscriptionId": "8d88dc98-ab0c-4b80-825b-123b2cf8443c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryTests/TestDeleteDataFactoryWithDataFactoryParameter.json b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryTests/TestDeleteDataFactoryWithDataFactoryParameter.json new file mode 100644 index 000000000000..03fb0284b5e9 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryTests/TestDeleteDataFactoryWithDataFactoryParameter.json @@ -0,0 +1,622 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799830" + ], + "x-ms-request-id": [ + "4161b11a-8c97-448c-bd32-36bc9545a118" + ], + "x-ms-correlation-request-id": [ + "4161b11a-8c97-448c-bd32-36bc9545a118" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020726Z:4161b11a-8c97-448c-bd32-36bc9545a118" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:07:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799829" + ], + "x-ms-request-id": [ + "edb6528a-d2e1-44bd-8131-3e342a81ce9f" + ], + "x-ms-correlation-request-id": [ + "edb6528a-d2e1-44bd-8131-3e342a81ce9f" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020726Z:edb6528a-d2e1-44bd-8131-3e342a81ce9f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:07:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk4328?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazQzMjg/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "102" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799828" + ], + "x-ms-request-id": [ + "fbc02213-6ee5-4805-bfcd-af8f739f7295" + ], + "x-ms-correlation-request-id": [ + "fbc02213-6ee5-4805-bfcd-af8f739f7295" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020727Z:fbc02213-6ee5-4805-bfcd-af8f739f7295" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:07:26 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk4328?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazQzMjg/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk4328\",\r\n \"name\": \"onesdk4328\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "183" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11915" + ], + "x-ms-request-id": [ + "71a71051-bb20-4abc-bc6f-415e649f13c2" + ], + "x-ms-correlation-request-id": [ + "71a71051-bb20-4abc-bc6f-415e649f13c2" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020727Z:71a71051-bb20-4abc-bc6f-415e649f13c2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:07:27 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk4328/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlR3JvdXBzL29uZXNkazQzMjgvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799827" + ], + "x-ms-request-id": [ + "e16cf6ec-da44-4c08-a2ac-fbbcf616908c" + ], + "x-ms-correlation-request-id": [ + "e16cf6ec-da44-4c08-a2ac-fbbcf616908c" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020727Z:e16cf6ec-da44-4c08-a2ac-fbbcf616908c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:07:27 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk4328/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazQzMjgvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "centralus:1b7307c0-54f9-49d1-ae2a-0522bede5bc0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799822" + ], + "x-ms-correlation-request-id": [ + "476e5642-d345-404f-b261-09cb9f2f51f6" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020727Z:476e5642-d345-404f-b261-09cb9f2f51f6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:07:27 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk4328/providers/Microsoft.DataFactory/datafactories/onesdk4514?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazQzMjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazQ1MTQ/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"onesdk4514\",\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "69" + ], + "x-ms-client-request-id": [ + "225cf1d6-7a8e-4edb-b3c3-97f988ac9ccb" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "397" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk4514\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk4328/providers/Microsoft.DataFactory/datafactories/onesdk4514\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"e34c33e1-17ab-4231-8151-3153042a2e4c\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "4a3654e5-cc51-47c1-aa8a-d2b0e37dff12" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11914" + ], + "x-ms-correlation-request-id": [ + "372e862d-bc04-4421-988c-df87a0cd11d9" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020728Z:372e862d-bc04-4421-988c-df87a0cd11d9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:07:28 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk4328/providers/Microsoft.DataFactory/datafactories/onesdk4514?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk4328/providers/Microsoft.DataFactory/datafactories/onesdk4514?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazQzMjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazQ1MTQ/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "993005c7-e4dc-4ff2-963a-dde24623ae05" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "397" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk4514\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk4328/providers/Microsoft.DataFactory/datafactories/onesdk4514\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"e34c33e1-17ab-4231-8151-3153042a2e4c\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "242b0f23-7e6d-4903-a823-55bf8048c408" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799826" + ], + "x-ms-correlation-request-id": [ + "28e9d932-1754-4d02-83c0-b99c83ff9e3e" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020729Z:28e9d932-1754-4d02-83c0-b99c83ff9e3e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:07:28 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk4328/providers/Microsoft.DataFactory/datafactories/onesdk4514?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazQzMjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazQ1MTQ/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c90b52fa-98b2-4e41-bcf6-df704850d9ba" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "397" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk4514\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk4328/providers/Microsoft.DataFactory/datafactories/onesdk4514\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"e34c33e1-17ab-4231-8151-3153042a2e4c\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "4753948f-d324-487d-9d2d-710f39e25840" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799825" + ], + "x-ms-correlation-request-id": [ + "53172b6d-d3a4-4fe8-baa7-b7e8c92a8320" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020734Z:53172b6d-d3a4-4fe8-baa7-b7e8c92a8320" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:07:33 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk4328/providers/Microsoft.DataFactory/datafactories/onesdk4514?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazQzMjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazQ1MTQ/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f065f16d-4715-4e64-b5f7-495eab7dc7fc" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "397" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk4514\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk4328/providers/Microsoft.DataFactory/datafactories/onesdk4514\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"e34c33e1-17ab-4231-8151-3153042a2e4c\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"Succeeded\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "472" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "77f9c1d0-5001-4f68-a246-52f63c56960c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799824" + ], + "x-ms-correlation-request-id": [ + "a8ead41d-5e71-4faf-be34-610af7c320ba" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020739Z:a8ead41d-5e71-4faf-be34-610af7c320ba" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:07:39 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk4328/providers/Microsoft.DataFactory/datafactories/onesdk4514?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazQzMjgvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazQ1MTQ/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "de23aa81-2ca1-41f7-b6da-3ef2cd86a4c8" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "0b900f32-750a-4c4a-a192-8c37758b9c62" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11913" + ], + "x-ms-correlation-request-id": [ + "b2f32672-2d65-4e97-b83a-5125215205b5" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020739Z:b2f32672-2d65-4e97-b83a-5125215205b5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:07:39 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-DeleteDataFactoryWithDataFactoryParameter": [ + "onesdk4514", + "onesdk4328" + ] + }, + "Variables": { + "SubscriptionId": "8d88dc98-ab0c-4b80-825b-123b2cf8443c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryTests/TestGetDataFactoryWithEmptyName.json b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryTests/TestGetDataFactoryWithEmptyName.json new file mode 100644 index 000000000000..e0ef55311d12 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryTests/TestGetDataFactoryWithEmptyName.json @@ -0,0 +1,261 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799820" + ], + "x-ms-request-id": [ + "65fc4289-59ca-42fd-b9a9-0b70ee4aa24d" + ], + "x-ms-correlation-request-id": [ + "65fc4289-59ca-42fd-b9a9-0b70ee4aa24d" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020859Z:65fc4289-59ca-42fd-b9a9-0b70ee4aa24d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:08:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk9796?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazk3OTY/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "102" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799819" + ], + "x-ms-request-id": [ + "3687b5e3-8464-46c5-95e9-77c0acd2430e" + ], + "x-ms-correlation-request-id": [ + "3687b5e3-8464-46c5-95e9-77c0acd2430e" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020900Z:3687b5e3-8464-46c5-95e9-77c0acd2430e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:08:59 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk9796?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazk3OTY/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk9796\",\r\n \"name\": \"onesdk9796\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "183" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11910" + ], + "x-ms-request-id": [ + "45f216ff-10b5-4230-bc4d-5addb84dfd03" + ], + "x-ms-correlation-request-id": [ + "45f216ff-10b5-4230-bc4d-5addb84dfd03" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020900Z:45f216ff-10b5-4230-bc4d-5addb84dfd03" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:09:00 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk9796/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlR3JvdXBzL29uZXNkazk3OTYvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799818" + ], + "x-ms-request-id": [ + "1d3b6558-fc6d-4aec-bd4f-699975705dfe" + ], + "x-ms-correlation-request-id": [ + "1d3b6558-fc6d-4aec-bd4f-699975705dfe" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020900Z:1d3b6558-fc6d-4aec-bd4f-699975705dfe" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:09:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk9796/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazk3OTYvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "centralus:8344a07d-9547-4613-9496-bac2ec0eda55" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799817" + ], + "x-ms-correlation-request-id": [ + "fc412980-efea-4045-86be-52529ec80c3f" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020900Z:fc412980-efea-4045-86be-52529ec80c3f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:08:59 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-GetDataFactoryWithEmptyName": [ + "onesdk9796" + ] + }, + "Variables": { + "SubscriptionId": "8d88dc98-ab0c-4b80-825b-123b2cf8443c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryTests/TestGetDataFactoryWithWhiteSpaceName.json b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryTests/TestGetDataFactoryWithWhiteSpaceName.json new file mode 100644 index 000000000000..407ad590dcdd --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryTests/TestGetDataFactoryWithWhiteSpaceName.json @@ -0,0 +1,261 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799852" + ], + "x-ms-request-id": [ + "81cd305c-99c5-440a-954b-cf88eace84ee" + ], + "x-ms-correlation-request-id": [ + "81cd305c-99c5-440a-954b-cf88eace84ee" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020503Z:81cd305c-99c5-440a-954b-cf88eace84ee" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:05:02 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk4920?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazQ5MjA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "102" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799851" + ], + "x-ms-request-id": [ + "16c89fcd-5e69-4a68-a2a2-8510d2532ce7" + ], + "x-ms-correlation-request-id": [ + "16c89fcd-5e69-4a68-a2a2-8510d2532ce7" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020503Z:16c89fcd-5e69-4a68-a2a2-8510d2532ce7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:05:02 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk4920?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazQ5MjA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk4920\",\r\n \"name\": \"onesdk4920\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "183" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11924" + ], + "x-ms-request-id": [ + "98810d4f-eb35-44e8-9bdb-b89b7c1b352e" + ], + "x-ms-correlation-request-id": [ + "98810d4f-eb35-44e8-9bdb-b89b7c1b352e" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020503Z:98810d4f-eb35-44e8-9bdb-b89b7c1b352e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:05:02 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk4920/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlR3JvdXBzL29uZXNkazQ5MjAvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799850" + ], + "x-ms-request-id": [ + "5ad672c1-edb6-4a64-a85f-06a56d6f130a" + ], + "x-ms-correlation-request-id": [ + "5ad672c1-edb6-4a64-a85f-06a56d6f130a" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020503Z:5ad672c1-edb6-4a64-a85f-06a56d6f130a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:05:02 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk4920/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazQ5MjAvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "centralus:4250438a-5b1e-4bcf-a9ef-d5e853f44da5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799826" + ], + "x-ms-correlation-request-id": [ + "087ad263-a100-482f-ae0c-c7a82bebff4b" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020504Z:087ad263-a100-482f-ae0c-c7a82bebff4b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:05:03 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-GetDataFactoryWithWhiteSpaceName": [ + "onesdk4920" + ] + }, + "Variables": { + "SubscriptionId": "8d88dc98-ab0c-4b80-825b-123b2cf8443c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryTests/TestGetNonExistingDataFactory.json b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryTests/TestGetNonExistingDataFactory.json new file mode 100644 index 000000000000..c5bea3c70b31 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.DataFactoryTests/TestGetNonExistingDataFactory.json @@ -0,0 +1,310 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799821" + ], + "x-ms-request-id": [ + "100bf916-48b5-4d14-8c7a-1d82770cd23b" + ], + "x-ms-correlation-request-id": [ + "100bf916-48b5-4d14-8c7a-1d82770cd23b" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020818Z:100bf916-48b5-4d14-8c7a-1d82770cd23b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:08:18 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk6131?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazYxMzE/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "102" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799820" + ], + "x-ms-request-id": [ + "156bec77-e6f8-4b1f-9d12-7f5cd8b4742d" + ], + "x-ms-correlation-request-id": [ + "156bec77-e6f8-4b1f-9d12-7f5cd8b4742d" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020819Z:156bec77-e6f8-4b1f-9d12-7f5cd8b4742d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:08:19 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk6131?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazYxMzE/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk6131\",\r\n \"name\": \"onesdk6131\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "183" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11915" + ], + "x-ms-request-id": [ + "012f3793-0ca4-44c4-a8be-dfdb15b27586" + ], + "x-ms-correlation-request-id": [ + "012f3793-0ca4-44c4-a8be-dfdb15b27586" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020819Z:012f3793-0ca4-44c4-a8be-dfdb15b27586" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:08:19 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk6131/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlR3JvdXBzL29uZXNkazYxMzEvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799819" + ], + "x-ms-request-id": [ + "bcc617b4-94d6-4089-9f40-70f8a65d3d9f" + ], + "x-ms-correlation-request-id": [ + "bcc617b4-94d6-4089-9f40-70f8a65d3d9f" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020819Z:bcc617b4-94d6-4089-9f40-70f8a65d3d9f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:08:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk6131/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazYxMzEvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "centralus:7e822388-de27-4d62-95c7-eb3fab6dd8de" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799822" + ], + "x-ms-correlation-request-id": [ + "88971392-4231-4af6-aaef-9a7aef10c155" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020820Z:88971392-4231-4af6-aaef-9a7aef10c155" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:08:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk6131/providers/Microsoft.DataFactory/datafactories/onesdk4845?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazYxMzEvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazQ4NDU/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "424b0e8b-eec4-48e4-aaf9-df031400a48a" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"Resource not found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "69" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "ad0af325-a2f0-47d4-95a1-ffe26bf684a4" + ], + "x-ms-correlation-request-id": [ + "ad0af325-a2f0-47d4-95a1-ffe26bf684a4" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020820Z:ad0af325-a2f0-47d4-95a1-ffe26bf684a4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:08:20 GMT" + ] + }, + "StatusCode": 404 + } + ], + "Names": { + "Test-GetNonExistingDataFactory": [ + "onesdk4845", + "onesdk6131" + ] + }, + "Variables": { + "SubscriptionId": "8d88dc98-ab0c-4b80-825b-123b2cf8443c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.HubTests/TestHub.json b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.HubTests/TestHub.json new file mode 100644 index 000000000000..17a93468ff37 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.HubTests/TestHub.json @@ -0,0 +1,865 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799938" + ], + "x-ms-request-id": [ + "746323b8-0968-4179-a6f5-f89c2b9c4fb2" + ], + "x-ms-correlation-request-id": [ + "746323b8-0968-4179-a6f5-f89c2b9c4fb2" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T014901Z:746323b8-0968-4179-a6f5-f89c2b9c4fb2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:49:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799937" + ], + "x-ms-request-id": [ + "88726d36-ddf7-4fbc-bd67-dd13a6ae1fc3" + ], + "x-ms-correlation-request-id": [ + "88726d36-ddf7-4fbc-bd67-dd13a6ae1fc3" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T014901Z:88726d36-ddf7-4fbc-bd67-dd13a6ae1fc3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:49:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2721?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazI3MjE/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "102" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799936" + ], + "x-ms-request-id": [ + "8685cfae-6f70-4403-b498-fe9212c247ba" + ], + "x-ms-correlation-request-id": [ + "8685cfae-6f70-4403-b498-fe9212c247ba" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T014902Z:8685cfae-6f70-4403-b498-fe9212c247ba" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:49:01 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2721?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazI3MjE/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk2721\",\r\n \"name\": \"onesdk2721\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "183" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11968" + ], + "x-ms-request-id": [ + "7d98d03f-7cd9-429e-9433-85d457ded14c" + ], + "x-ms-correlation-request-id": [ + "7d98d03f-7cd9-429e-9433-85d457ded14c" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T014902Z:7d98d03f-7cd9-429e-9433-85d457ded14c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:49:01 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk2721/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlR3JvdXBzL29uZXNkazI3MjEvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799935" + ], + "x-ms-request-id": [ + "93905c70-9819-4ed0-999e-b1d543772ea9" + ], + "x-ms-correlation-request-id": [ + "93905c70-9819-4ed0-999e-b1d543772ea9" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T014902Z:93905c70-9819-4ed0-999e-b1d543772ea9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:49:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2721/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazI3MjEvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "centralus:57c3603c-11ce-410d-aaf0-e7a1f8c00a2d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799903" + ], + "x-ms-correlation-request-id": [ + "7cebdd45-6d91-4c22-88a8-fc741fb6a13c" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T014903Z:7cebdd45-6d91-4c22-88a8-fc741fb6a13c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:49:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2721/providers/Microsoft.DataFactory/datafactories/onesdk3918?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazI3MjEvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazM5MTg/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"onesdk3918\",\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "69" + ], + "x-ms-client-request-id": [ + "84a1bf98-9400-4fc1-9d26-be4b652c751d" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "7" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk3918\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2721/providers/Microsoft.DataFactory/datafactories/onesdk3918\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"d7f81cba-c03e-4878-8b93-cf33396b8b50\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "1cfee7e6-82c8-43e9-903c-9203273a8647" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11967" + ], + "x-ms-correlation-request-id": [ + "c587b141-6c64-4846-b06f-19f253d32fbc" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T014904Z:c587b141-6c64-4846-b06f-19f253d32fbc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:49:04 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2721/providers/Microsoft.DataFactory/datafactories/onesdk3918?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2721/providers/Microsoft.DataFactory/datafactories/onesdk3918?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazI3MjEvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazM5MTg/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "4720bde5-5a2f-4cfc-9ecd-54b55e9538ef" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "7" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk3918\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2721/providers/Microsoft.DataFactory/datafactories/onesdk3918\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"d7f81cba-c03e-4878-8b93-cf33396b8b50\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "80fcfecc-1212-4ee7-818b-536542b0e360" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799934" + ], + "x-ms-correlation-request-id": [ + "38ecd6ff-5b7b-45cf-85dd-7e15f928048d" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T014904Z:38ecd6ff-5b7b-45cf-85dd-7e15f928048d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:49:04 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2721/providers/Microsoft.DataFactory/datafactories/onesdk3918?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazI3MjEvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazM5MTg/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1760221a-9cb2-4ec7-9169-01c247eb3e2b" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "7" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk3918\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2721/providers/Microsoft.DataFactory/datafactories/onesdk3918\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"d7f81cba-c03e-4878-8b93-cf33396b8b50\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "6f403b09-ccb4-4b90-b5b4-43f5f9e20763" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799933" + ], + "x-ms-correlation-request-id": [ + "51134c07-4506-4b92-8003-da267b40a424" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T014909Z:51134c07-4506-4b92-8003-da267b40a424" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:49:08 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2721/providers/Microsoft.DataFactory/datafactories/onesdk3918?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazI3MjEvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazM5MTg/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0672ca25-c8a3-44a7-967d-c175a9c76f91" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "7" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk3918\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2721/providers/Microsoft.DataFactory/datafactories/onesdk3918\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"d7f81cba-c03e-4878-8b93-cf33396b8b50\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"Succeeded\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "472" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "aa7c8d87-5cdd-4896-b930-4601856ccef8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799932" + ], + "x-ms-correlation-request-id": [ + "12dee251-d2eb-4a46-a104-dbf38b30b63c" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T014914Z:12dee251-d2eb-4a46-a104-dbf38b30b63c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:49:14 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2721/providers/Microsoft.DataFactory/datafactories/onesdk3918/hubs/SampleHub?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazI3MjEvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazM5MTgvaHVicy9TYW1wbGVIdWI/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"SampleHub\",\r\n \"properties\": {\r\n \"defaultCompute\": \"SampleDefaultCompute\",\r\n \"type\": \"Hub\",\r\n \"hubId\": \"00000000-0000-0000-0000-000000000001\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "233" + ], + "x-ms-client-request-id": [ + "c4b2d2b0-d25e-4431-ab66-b3f3ef06f9a6" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"SampleHub\",\r\n \"properties\": {\r\n \"defaultCompute\": \"SampleDefaultCompute\",\r\n \"type\": \"Hub\",\r\n \"hubId\": \"308049a0-9931-4f28-ba5d-f3fa63b9871b\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "25f92b7b-3f4c-42ec-9305-6d23f9dec394" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11966" + ], + "x-ms-correlation-request-id": [ + "9e9f2cfc-021f-4d8f-9232-ef7f4be6eb07" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T014914Z:9e9f2cfc-021f-4d8f-9232-ef7f4be6eb07" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:49:14 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2721/providers/Microsoft.DataFactory/datafactories/onesdk3918/hubs/SampleHub?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2721/providers/Microsoft.DataFactory/datafactories/onesdk3918/hubs/SampleHub?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazI3MjEvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazM5MTgvaHVicy9TYW1wbGVIdWI/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "12992240-b944-412e-bd5b-08cb2eb7e51b" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"SampleHub\",\r\n \"properties\": {\r\n \"defaultCompute\": \"SampleDefaultCompute\",\r\n \"type\": \"Hub\",\r\n \"hubId\": \"308049a0-9931-4f28-ba5d-f3fa63b9871b\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "4442a33d-f737-4565-814c-dae5360f8c24" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799931" + ], + "x-ms-correlation-request-id": [ + "6b52724e-33d9-43e6-860e-a53038ced438" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T014914Z:6b52724e-33d9-43e6-860e-a53038ced438" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:49:14 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2721/providers/Microsoft.DataFactory/datafactories/onesdk3918/hubs/SampleHub?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazI3MjEvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazM5MTgvaHVicy9TYW1wbGVIdWI/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ffa32894-f636-4a07-bff8-edc28bd66d21" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "14" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-request-id": [ + "3a80023c-bdd4-43db-95a9-797ff685d119" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11965" + ], + "x-ms-correlation-request-id": [ + "06eb4588-6f01-426c-ac60-61d86d0dc276" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T014915Z:06eb4588-6f01-426c-ac60-61d86d0dc276" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:49:14 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2721/providers/Microsoft.DataFactory/datafactories/onesdk3918/hubs/SampleHub/operationresults/335caca791a141fdb95497536f48feb1?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2721/providers/Microsoft.DataFactory/datafactories/onesdk3918/hubs/SampleHub/operationresults/335caca791a141fdb95497536f48feb1?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazI3MjEvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazM5MTgvaHVicy9TYW1wbGVIdWIvb3BlcmF0aW9ucmVzdWx0cy8zMzVjYWNhNzkxYTE0MWZkYjk1NDk3NTM2ZjQ4ZmViMT9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "14" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "c2a8f8e2-84a0-4b25-9c5d-3420af5900eb" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799930" + ], + "x-ms-correlation-request-id": [ + "3fc363e5-30b6-4b83-9702-234e51a9faaa" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T014915Z:3fc363e5-30b6-4b83-9702-234e51a9faaa" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:49:14 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2721/providers/Microsoft.DataFactory/datafactories/onesdk3918?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazI3MjEvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazM5MTg/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f17ee80e-9547-4e5c-824f-089667cfe421" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "0b259caf-aecf-408d-b6ce-e0db02c98b7d" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11964" + ], + "x-ms-correlation-request-id": [ + "2cf821c3-a7a2-4b96-9a45-bbb70fc4a1b9" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T014916Z:2cf821c3-a7a2-4b96-9a45-bbb70fc4a1b9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:49:15 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-Hub": [ + "onesdk3918", + "onesdk2721" + ] + }, + "Variables": { + "SubscriptionId": "8d88dc98-ab0c-4b80-825b-123b2cf8443c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.HubTests/TestHubPiping.json b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.HubTests/TestHubPiping.json new file mode 100644 index 000000000000..56a66b026acf --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.HubTests/TestHubPiping.json @@ -0,0 +1,922 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799831" + ], + "x-ms-request-id": [ + "391d59f7-baef-4ad6-9afe-e386648fba12" + ], + "x-ms-correlation-request-id": [ + "391d59f7-baef-4ad6-9afe-e386648fba12" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021356Z:391d59f7-baef-4ad6-9afe-e386648fba12" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:13:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799830" + ], + "x-ms-request-id": [ + "2be5bf8b-6072-42fe-87ad-b5d02cd6ea6c" + ], + "x-ms-correlation-request-id": [ + "2be5bf8b-6072-42fe-87ad-b5d02cd6ea6c" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021356Z:2be5bf8b-6072-42fe-87ad-b5d02cd6ea6c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:13:56 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1055?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazEwNTU/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "102" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799829" + ], + "x-ms-request-id": [ + "a07aa118-8eb2-4355-8b31-70b347412a31" + ], + "x-ms-correlation-request-id": [ + "a07aa118-8eb2-4355-8b31-70b347412a31" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021356Z:a07aa118-8eb2-4355-8b31-70b347412a31" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:13:56 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1055?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazEwNTU/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk1055\",\r\n \"name\": \"onesdk1055\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "183" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11921" + ], + "x-ms-request-id": [ + "7621d566-a458-49d1-8f0c-8ecdb8bc8b3a" + ], + "x-ms-correlation-request-id": [ + "7621d566-a458-49d1-8f0c-8ecdb8bc8b3a" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021357Z:7621d566-a458-49d1-8f0c-8ecdb8bc8b3a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:13:56 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk1055/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlR3JvdXBzL29uZXNkazEwNTUvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799828" + ], + "x-ms-request-id": [ + "706b3296-0c53-4edd-b116-9d6ec1be67ea" + ], + "x-ms-correlation-request-id": [ + "706b3296-0c53-4edd-b116-9d6ec1be67ea" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021357Z:706b3296-0c53-4edd-b116-9d6ec1be67ea" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:13:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1055/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazEwNTUvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "centralus:d462654d-5381-4a0c-aba4-a047f37efa8e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799824" + ], + "x-ms-correlation-request-id": [ + "baf801a8-068c-4a6c-92de-3d63f213f0ce" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021358Z:baf801a8-068c-4a6c-92de-3d63f213f0ce" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:13:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1055/providers/Microsoft.DataFactory/datafactories/onesdk7032?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazEwNTUvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazcwMzI/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"onesdk7032\",\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "69" + ], + "x-ms-client-request-id": [ + "6305ac93-f23f-4143-a798-4875456c40f1" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "7" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk7032\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1055/providers/Microsoft.DataFactory/datafactories/onesdk7032\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"e789fc50-31d9-4cf7-85b5-cb826822585d\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "c4ea2bc4-d55f-4a5e-9262-7488e92dc4c9" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11920" + ], + "x-ms-correlation-request-id": [ + "47084c06-9910-4284-9817-07f57661886d" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021359Z:47084c06-9910-4284-9817-07f57661886d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:13:58 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1055/providers/Microsoft.DataFactory/datafactories/onesdk7032?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1055/providers/Microsoft.DataFactory/datafactories/onesdk7032?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazEwNTUvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazcwMzI/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "64f55014-0745-4ce3-982e-1a4eddd7fc00" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "7" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk7032\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1055/providers/Microsoft.DataFactory/datafactories/onesdk7032\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"e789fc50-31d9-4cf7-85b5-cb826822585d\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "50ade5c1-191c-48ed-bec5-a97726563448" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799827" + ], + "x-ms-correlation-request-id": [ + "059f5332-fca9-4a26-8a7d-f4c2e5a41d27" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021359Z:059f5332-fca9-4a26-8a7d-f4c2e5a41d27" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:13:59 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1055/providers/Microsoft.DataFactory/datafactories/onesdk7032?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazEwNTUvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazcwMzI/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1ccae9ed-9df2-4074-9dbe-f3ddb3e4173c" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "7" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk7032\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1055/providers/Microsoft.DataFactory/datafactories/onesdk7032\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"e789fc50-31d9-4cf7-85b5-cb826822585d\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "68816fed-4d1d-4935-85be-00f6378e4103" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799826" + ], + "x-ms-correlation-request-id": [ + "64945b14-2f54-4c74-80db-41890ad3b607" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021404Z:64945b14-2f54-4c74-80db-41890ad3b607" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:14:03 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1055/providers/Microsoft.DataFactory/datafactories/onesdk7032?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazEwNTUvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazcwMzI/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "477e6a29-44e3-4b62-97c7-37ee64bda4bd" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "7" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk7032\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1055/providers/Microsoft.DataFactory/datafactories/onesdk7032\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"e789fc50-31d9-4cf7-85b5-cb826822585d\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"Succeeded\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "472" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "59f11fbc-8bb6-4e37-bdfc-780a0081f4f6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799825" + ], + "x-ms-correlation-request-id": [ + "ab43950e-04b2-4328-b96d-e3dbf6c13acc" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021409Z:ab43950e-04b2-4328-b96d-e3dbf6c13acc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:14:09 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1055/providers/Microsoft.DataFactory/datafactories/onesdk7032/hubs/SampleHub?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazEwNTUvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazcwMzIvaHVicy9TYW1wbGVIdWI/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"SampleHub\",\r\n \"properties\": {\r\n \"defaultCompute\": \"SampleDefaultCompute\",\r\n \"type\": \"Hub\",\r\n \"hubId\": \"00000000-0000-0000-0000-000000000001\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "233" + ], + "x-ms-client-request-id": [ + "ea6b45e4-19c2-4025-9a0b-b2624d9c0e48" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"SampleHub\",\r\n \"properties\": {\r\n \"defaultCompute\": \"SampleDefaultCompute\",\r\n \"type\": \"Hub\",\r\n \"hubId\": \"2a90ea03-8b93-4d0e-8a35-8c7ef88db290\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "453b7ab6-bc09-4e2f-b0a8-85ccaac8bda9" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11919" + ], + "x-ms-correlation-request-id": [ + "10e49887-fbee-47ba-ac16-c1cae7f1f58b" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021410Z:10e49887-fbee-47ba-ac16-c1cae7f1f58b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:14:09 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1055/providers/Microsoft.DataFactory/datafactories/onesdk7032/hubs/SampleHub?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1055/providers/Microsoft.DataFactory/datafactories/onesdk7032/hubs/SampleHub?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazEwNTUvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazcwMzIvaHVicy9TYW1wbGVIdWI/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "79c17283-7cd9-459a-bd95-dbfe8775f556" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"SampleHub\",\r\n \"properties\": {\r\n \"defaultCompute\": \"SampleDefaultCompute\",\r\n \"type\": \"Hub\",\r\n \"hubId\": \"2a90ea03-8b93-4d0e-8a35-8c7ef88db290\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "41167889-fb35-4ac5-a980-95f18a452bf9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799824" + ], + "x-ms-correlation-request-id": [ + "5889cee2-bc80-41a7-8469-cbce241ac471" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021410Z:5889cee2-bc80-41a7-8469-cbce241ac471" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:14:09 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1055/providers/Microsoft.DataFactory/datafactories/onesdk7032/hubs/SampleHub?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazEwNTUvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazcwMzIvaHVicy9TYW1wbGVIdWI/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "af282a17-ff1a-485f-b247-4902c31e18f1" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"message\": \"Hub: SampleHub not found.\",\r\n \"code\": \"HubNotFound\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "72" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "9ef57aeb-2ad2-4f5a-ad37-da47a5d810d4" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799822" + ], + "x-ms-correlation-request-id": [ + "a5429b86-3688-467d-accb-e24e4cf5d65d" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021410Z:a5429b86-3688-467d-accb-e24e4cf5d65d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:14:10 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1055/providers/Microsoft.DataFactory/datafactories/onesdk7032/hubs/SampleHub?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazEwNTUvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazcwMzIvaHVicy9TYW1wbGVIdWI/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2b3201ae-3529-4881-a0e1-6cb62a9d0d08" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "14" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-request-id": [ + "0ed15060-493a-432d-9bbe-25c037af6b95" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11918" + ], + "x-ms-correlation-request-id": [ + "f5dd9374-0d4a-49e9-9a56-1e7b401a6441" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021410Z:f5dd9374-0d4a-49e9-9a56-1e7b401a6441" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:14:09 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1055/providers/Microsoft.DataFactory/datafactories/onesdk7032/hubs/SampleHub/operationresults/0b5d7176639b4b4286ec132e6bde9bc4?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1055/providers/Microsoft.DataFactory/datafactories/onesdk7032/hubs/SampleHub/operationresults/0b5d7176639b4b4286ec132e6bde9bc4?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazEwNTUvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazcwMzIvaHVicy9TYW1wbGVIdWIvb3BlcmF0aW9ucmVzdWx0cy8wYjVkNzE3NjYzOWI0YjQyODZlYzEzMmU2YmRlOWJjND9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "14" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "6a6b33d8-50e8-47b9-ace8-e259b9d515af" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799823" + ], + "x-ms-correlation-request-id": [ + "cd2a1af4-4490-418b-93bc-a047608ae8dc" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021410Z:cd2a1af4-4490-418b-93bc-a047608ae8dc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:14:09 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1055/providers/Microsoft.DataFactory/datafactories/onesdk7032?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazEwNTUvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazcwMzI/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b075b881-d52b-4815-9562-c76aab1cfb21" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "c0c80980-5f64-4a92-80b3-d8ead3ae95d3" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11917" + ], + "x-ms-correlation-request-id": [ + "c2d6aeb6-95a3-45dd-a20b-17d9946c4533" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021412Z:c2d6aeb6-95a3-45dd-a20b-17d9946c4533" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:14:11 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-HubPiping": [ + "onesdk7032", + "onesdk1055" + ] + }, + "Variables": { + "SubscriptionId": "8d88dc98-ab0c-4b80-825b-123b2cf8443c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.HubTests/TestHubWithDataFactoryParameter.json b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.HubTests/TestHubWithDataFactoryParameter.json new file mode 100644 index 000000000000..87ef768d069d --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.HubTests/TestHubWithDataFactoryParameter.json @@ -0,0 +1,802 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799920" + ], + "x-ms-request-id": [ + "49ba4ca5-d5cc-48b5-96ee-5875e39f525b" + ], + "x-ms-correlation-request-id": [ + "49ba4ca5-d5cc-48b5-96ee-5875e39f525b" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015041Z:49ba4ca5-d5cc-48b5-96ee-5875e39f525b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:50:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799919" + ], + "x-ms-request-id": [ + "4d9335ed-95c5-41cf-afde-aa4b2303e042" + ], + "x-ms-correlation-request-id": [ + "4d9335ed-95c5-41cf-afde-aa4b2303e042" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015042Z:4d9335ed-95c5-41cf-afde-aa4b2303e042" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:50:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk47?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazQ3P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "100" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799918" + ], + "x-ms-request-id": [ + "9e779e73-15e1-455c-9372-50a201907a1d" + ], + "x-ms-correlation-request-id": [ + "9e779e73-15e1-455c-9372-50a201907a1d" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015042Z:9e779e73-15e1-455c-9372-50a201907a1d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:50:42 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk47?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazQ3P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk47\",\r\n \"name\": \"onesdk47\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "179" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11957" + ], + "x-ms-request-id": [ + "e379a7e4-6303-4799-8f7b-52325a25ac9d" + ], + "x-ms-correlation-request-id": [ + "e379a7e4-6303-4799-8f7b-52325a25ac9d" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015043Z:e379a7e4-6303-4799-8f7b-52325a25ac9d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:50:43 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk47/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlR3JvdXBzL29uZXNkazQ3L3Jlc291cmNlcz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799917" + ], + "x-ms-request-id": [ + "7ea29920-639c-496d-8a97-51dd88343309" + ], + "x-ms-correlation-request-id": [ + "7ea29920-639c-496d-8a97-51dd88343309" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015043Z:7ea29920-639c-496d-8a97-51dd88343309" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:50:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk47/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazQ3L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wZXJtaXNzaW9ucz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "centralus:9120f974-1a68-46fd-9f79-0c337cb90a52" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799907" + ], + "x-ms-correlation-request-id": [ + "0b30b686-809d-4447-bd19-c1d65a851eb3" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015043Z:0b30b686-809d-4447-bd19-c1d65a851eb3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:50:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk47/providers/Microsoft.DataFactory/datafactories/onesdk7740?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazQ3L3Byb3ZpZGVycy9NaWNyb3NvZnQuRGF0YUZhY3RvcnkvZGF0YWZhY3Rvcmllcy9vbmVzZGs3NzQwP2FwaS12ZXJzaW9uPTIwMTQtMTAtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"onesdk7740\",\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "69" + ], + "x-ms-client-request-id": [ + "16062ae3-c362-44db-8b0e-f96559f97347" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "45" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk7740\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk47/providers/Microsoft.DataFactory/datafactories/onesdk7740\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"0992ab76-3c2c-4010-a6c4-39f4e2fb2a39\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "476" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "82297824-cc15-4db3-a912-9bb6a5632f01" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11956" + ], + "x-ms-correlation-request-id": [ + "e981eb20-d9e2-4594-bd94-42fee31d4874" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015044Z:e981eb20-d9e2-4594-bd94-42fee31d4874" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:50:44 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk47/providers/Microsoft.DataFactory/datafactories/onesdk7740?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk47/providers/Microsoft.DataFactory/datafactories/onesdk7740?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazQ3L3Byb3ZpZGVycy9NaWNyb3NvZnQuRGF0YUZhY3RvcnkvZGF0YWZhY3Rvcmllcy9vbmVzZGs3NzQwP2FwaS12ZXJzaW9uPTIwMTQtMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6937f0b7-72f0-424d-83f3-0695260d9e31" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "45" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk7740\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk47/providers/Microsoft.DataFactory/datafactories/onesdk7740\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"0992ab76-3c2c-4010-a6c4-39f4e2fb2a39\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "476" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "c5ff2071-1625-486d-8542-dda2f7635624" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799916" + ], + "x-ms-correlation-request-id": [ + "c6d05589-5124-4a5a-bef0-c1be662594c2" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015044Z:c6d05589-5124-4a5a-bef0-c1be662594c2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:50:44 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk47/providers/Microsoft.DataFactory/datafactories/onesdk7740?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazQ3L3Byb3ZpZGVycy9NaWNyb3NvZnQuRGF0YUZhY3RvcnkvZGF0YWZhY3Rvcmllcy9vbmVzZGs3NzQwP2FwaS12ZXJzaW9uPTIwMTQtMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "48676b65-cd6d-4436-b5b9-87f93dace6d3" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "45" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk7740\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk47/providers/Microsoft.DataFactory/datafactories/onesdk7740\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"0992ab76-3c2c-4010-a6c4-39f4e2fb2a39\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"Succeeded\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "470" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "b685c904-2c4a-42c1-898b-28f6fddbeab9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799915" + ], + "x-ms-correlation-request-id": [ + "256dc398-2fad-40b2-a881-a106acc82536" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015049Z:256dc398-2fad-40b2-a881-a106acc82536" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:50:49 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk47/providers/Microsoft.DataFactory/datafactories/onesdk7740/hubs/SampleHub?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazQ3L3Byb3ZpZGVycy9NaWNyb3NvZnQuRGF0YUZhY3RvcnkvZGF0YWZhY3Rvcmllcy9vbmVzZGs3NzQwL2h1YnMvU2FtcGxlSHViP2FwaS12ZXJzaW9uPTIwMTQtMTAtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"SampleHub\",\r\n \"properties\": {\r\n \"defaultCompute\": \"SampleDefaultCompute\",\r\n \"type\": \"Hub\",\r\n \"hubId\": \"00000000-0000-0000-0000-000000000001\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "233" + ], + "x-ms-client-request-id": [ + "2cf91342-62c4-48c1-a627-a017c4469634" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"SampleHub\",\r\n \"properties\": {\r\n \"defaultCompute\": \"SampleDefaultCompute\",\r\n \"type\": \"Hub\",\r\n \"hubId\": \"ce6bc871-874d-4c08-aed8-41b26f17a9a3\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "3759d9d6-91a3-48bb-bcbe-034ba03d8dfd" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11955" + ], + "x-ms-correlation-request-id": [ + "21f11fbd-ad71-4a49-b742-4dc4dfd895e7" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015050Z:21f11fbd-ad71-4a49-b742-4dc4dfd895e7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:50:49 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk47/providers/Microsoft.DataFactory/datafactories/onesdk7740/hubs/SampleHub?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk47/providers/Microsoft.DataFactory/datafactories/onesdk7740/hubs/SampleHub?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazQ3L3Byb3ZpZGVycy9NaWNyb3NvZnQuRGF0YUZhY3RvcnkvZGF0YWZhY3Rvcmllcy9vbmVzZGs3NzQwL2h1YnMvU2FtcGxlSHViP2FwaS12ZXJzaW9uPTIwMTQtMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0ba9874c-ad91-46b6-b310-399c50f10ccd" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"SampleHub\",\r\n \"properties\": {\r\n \"defaultCompute\": \"SampleDefaultCompute\",\r\n \"type\": \"Hub\",\r\n \"hubId\": \"ce6bc871-874d-4c08-aed8-41b26f17a9a3\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "77f3e6ac-2758-4460-9922-3ae82d2f30cc" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799914" + ], + "x-ms-correlation-request-id": [ + "6702648f-d7a6-40be-b338-1d22fe6b0515" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015050Z:6702648f-d7a6-40be-b338-1d22fe6b0515" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:50:49 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk47/providers/Microsoft.DataFactory/datafactories/onesdk7740/hubs/SampleHub?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazQ3L3Byb3ZpZGVycy9NaWNyb3NvZnQuRGF0YUZhY3RvcnkvZGF0YWZhY3Rvcmllcy9vbmVzZGs3NzQwL2h1YnMvU2FtcGxlSHViP2FwaS12ZXJzaW9uPTIwMTQtMTAtMDEtcHJldmlldw==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ca3e578a-f3b1-443e-a54c-323f582334d4" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "51" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-request-id": [ + "10971205-1fd6-470d-806c-9b942ba0c232" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11954" + ], + "x-ms-correlation-request-id": [ + "95750a21-86e7-4f58-9742-bca1af75d260" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015050Z:95750a21-86e7-4f58-9742-bca1af75d260" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:50:49 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk47/providers/Microsoft.DataFactory/datafactories/onesdk7740/hubs/SampleHub/operationresults/aeffe4510539423087192d98f3ae14a5?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk47/providers/Microsoft.DataFactory/datafactories/onesdk7740/hubs/SampleHub/operationresults/aeffe4510539423087192d98f3ae14a5?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazQ3L3Byb3ZpZGVycy9NaWNyb3NvZnQuRGF0YUZhY3RvcnkvZGF0YWZhY3Rvcmllcy9vbmVzZGs3NzQwL2h1YnMvU2FtcGxlSHViL29wZXJhdGlvbnJlc3VsdHMvYWVmZmU0NTEwNTM5NDIzMDg3MTkyZDk4ZjNhZTE0YTU/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "51" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "25b81278-bd9e-46fb-8fd2-181e9b214cec" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799913" + ], + "x-ms-correlation-request-id": [ + "d5ff9afe-e285-41ea-98d8-8552d162211f" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015050Z:d5ff9afe-e285-41ea-98d8-8552d162211f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:50:50 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk47/providers/Microsoft.DataFactory/datafactories/onesdk7740?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazQ3L3Byb3ZpZGVycy9NaWNyb3NvZnQuRGF0YUZhY3RvcnkvZGF0YWZhY3Rvcmllcy9vbmVzZGs3NzQwP2FwaS12ZXJzaW9uPTIwMTQtMTAtMDEtcHJldmlldw==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "991a4dc1-da15-4873-8afc-e4d1a8ad7a35" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "b7e4bcd5-b8ff-4980-9712-4237059cec75" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11953" + ], + "x-ms-correlation-request-id": [ + "49901dd6-b5bf-4626-a132-ff2d0658b6f9" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015051Z:49901dd6-b5bf-4626-a132-ff2d0658b6f9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:50:50 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-HubWithDataFactoryParameter": [ + "onesdk7740", + "onesdk47" + ] + }, + "Variables": { + "SubscriptionId": "8d88dc98-ab0c-4b80-825b-123b2cf8443c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.LinkedServiceTests/TestGetLinkedServiceWithEmptyName.json b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.LinkedServiceTests/TestGetLinkedServiceWithEmptyName.json new file mode 100644 index 000000000000..45d2ddd591c5 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.LinkedServiceTests/TestGetLinkedServiceWithEmptyName.json @@ -0,0 +1,505 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799869" + ], + "x-ms-request-id": [ + "9a94d17f-db96-41cb-ab77-425683be4501" + ], + "x-ms-correlation-request-id": [ + "9a94d17f-db96-41cb-ab77-425683be4501" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015757Z:9a94d17f-db96-41cb-ab77-425683be4501" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:57:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799868" + ], + "x-ms-request-id": [ + "49aeb862-02a4-4668-81d5-02f700caab17" + ], + "x-ms-correlation-request-id": [ + "49aeb862-02a4-4668-81d5-02f700caab17" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015758Z:49aeb862-02a4-4668-81d5-02f700caab17" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:57:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3401?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM0MDE/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "102" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799867" + ], + "x-ms-request-id": [ + "02e71164-c4f7-46ec-b214-9eee8a9d098f" + ], + "x-ms-correlation-request-id": [ + "02e71164-c4f7-46ec-b214-9eee8a9d098f" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015758Z:02e71164-c4f7-46ec-b214-9eee8a9d098f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:57:57 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3401?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM0MDE/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk3401\",\r\n \"name\": \"onesdk3401\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "183" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11929" + ], + "x-ms-request-id": [ + "eb49a258-ef93-4ffa-b9dd-17761a65ba11" + ], + "x-ms-correlation-request-id": [ + "eb49a258-ef93-4ffa-b9dd-17761a65ba11" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015758Z:eb49a258-ef93-4ffa-b9dd-17761a65ba11" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:57:58 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk3401/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlR3JvdXBzL29uZXNkazM0MDEvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799866" + ], + "x-ms-request-id": [ + "f9524fd2-d3ea-4d85-9854-d4269bf32354" + ], + "x-ms-correlation-request-id": [ + "f9524fd2-d3ea-4d85-9854-d4269bf32354" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015758Z:f9524fd2-d3ea-4d85-9854-d4269bf32354" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:57:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3401/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM0MDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "centralus:8f57e692-d6bc-4ef3-a83a-9ccf4b4ef9e8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799872" + ], + "x-ms-correlation-request-id": [ + "b07250dd-6954-47e4-bac3-f3ed5c2115ef" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015759Z:b07250dd-6954-47e4-bac3-f3ed5c2115ef" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:57:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3401/providers/Microsoft.DataFactory/datafactories/onesdk128?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM0MDEvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazEyOD9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"onesdk128\",\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "68" + ], + "x-ms-client-request-id": [ + "ff56739f-4405-412e-a5d2-11e3a30b2773" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "229" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk128\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3401/providers/Microsoft.DataFactory/datafactories/onesdk128\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"14e2816b-4425-4b2f-8503-6347da5a044b\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "476" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "164d77c9-7351-4172-88a9-9b1ded973df5" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11928" + ], + "x-ms-correlation-request-id": [ + "0688067d-5552-4382-8b09-1053df1acf70" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015800Z:0688067d-5552-4382-8b09-1053df1acf70" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:57:59 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3401/providers/Microsoft.DataFactory/datafactories/onesdk128?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3401/providers/Microsoft.DataFactory/datafactories/onesdk128?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM0MDEvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazEyOD9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ca34bb2d-6b2a-40ce-ae50-bfcef47f1b5e" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "229" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk128\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3401/providers/Microsoft.DataFactory/datafactories/onesdk128\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"14e2816b-4425-4b2f-8503-6347da5a044b\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "476" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "cd0c7ea2-329c-4ed2-b23f-ee07f32eef56" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799865" + ], + "x-ms-correlation-request-id": [ + "0f80c0b6-e08e-4648-b775-178bff554c9a" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015800Z:0f80c0b6-e08e-4648-b775-178bff554c9a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:57:59 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3401/providers/Microsoft.DataFactory/datafactories/onesdk128?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM0MDEvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazEyOD9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "69ce5dce-67fb-487f-8086-273c8d4dd685" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "229" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk128\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3401/providers/Microsoft.DataFactory/datafactories/onesdk128\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"14e2816b-4425-4b2f-8503-6347da5a044b\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"Succeeded\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "470" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "771a727f-da18-401f-b1e8-1df757941ed4" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799864" + ], + "x-ms-correlation-request-id": [ + "4b34e5bd-88fb-4323-b759-38e4f43ff9fe" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015805Z:4b34e5bd-88fb-4323-b759-38e4f43ff9fe" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:58:04 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-GetLinkedServiceWithEmptyName": [ + "onesdk128", + "onesdk3401" + ] + }, + "Variables": { + "SubscriptionId": "8d88dc98-ab0c-4b80-825b-123b2cf8443c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.LinkedServiceTests/TestGetLinkedServiceWithWhiteSpaceName.json b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.LinkedServiceTests/TestGetLinkedServiceWithWhiteSpaceName.json new file mode 100644 index 000000000000..caaf0a307bf9 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.LinkedServiceTests/TestGetLinkedServiceWithWhiteSpaceName.json @@ -0,0 +1,568 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799870" + ], + "x-ms-request-id": [ + "b78a54f0-7fd0-4325-bfa6-4e7c845810b2" + ], + "x-ms-correlation-request-id": [ + "b78a54f0-7fd0-4325-bfa6-4e7c845810b2" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015844Z:b78a54f0-7fd0-4325-bfa6-4e7c845810b2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:58:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799869" + ], + "x-ms-request-id": [ + "5f9d9183-6e18-4253-8073-f434ef69c0ae" + ], + "x-ms-correlation-request-id": [ + "5f9d9183-6e18-4253-8073-f434ef69c0ae" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015845Z:5f9d9183-6e18-4253-8073-f434ef69c0ae" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:58:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2609?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazI2MDk/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "102" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799868" + ], + "x-ms-request-id": [ + "8f491393-a810-47c7-9e5b-a25b77fbda33" + ], + "x-ms-correlation-request-id": [ + "8f491393-a810-47c7-9e5b-a25b77fbda33" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015845Z:8f491393-a810-47c7-9e5b-a25b77fbda33" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:58:44 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2609?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazI2MDk/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk2609\",\r\n \"name\": \"onesdk2609\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "183" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11934" + ], + "x-ms-request-id": [ + "cb9f661c-ef99-43b8-be4d-eecd7fdee785" + ], + "x-ms-correlation-request-id": [ + "cb9f661c-ef99-43b8-be4d-eecd7fdee785" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015845Z:cb9f661c-ef99-43b8-be4d-eecd7fdee785" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:58:44 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk2609/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlR3JvdXBzL29uZXNkazI2MDkvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799867" + ], + "x-ms-request-id": [ + "5081bd58-c75c-460e-abdb-988012f3dd53" + ], + "x-ms-correlation-request-id": [ + "5081bd58-c75c-460e-abdb-988012f3dd53" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015845Z:5081bd58-c75c-460e-abdb-988012f3dd53" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:58:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2609/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazI2MDkvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "centralus:2da9c0ba-95a4-4718-b27c-08d2ebff2518" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799863" + ], + "x-ms-correlation-request-id": [ + "bdd29ca0-dbf8-4072-841b-3118a451cfc8" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015845Z:bdd29ca0-dbf8-4072-841b-3118a451cfc8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:58:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2609/providers/Microsoft.DataFactory/datafactories/onesdk8886?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazI2MDkvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazg4ODY/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"onesdk8886\",\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "69" + ], + "x-ms-client-request-id": [ + "48de915d-8bd1-44c3-959b-b94bee51dcbd" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "241" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk8886\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2609/providers/Microsoft.DataFactory/datafactories/onesdk8886\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"7049949f-b0fd-45a9-b681-5d7397a6cc20\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "356d9e46-1621-42fb-a28d-0e384355bfba" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11927" + ], + "x-ms-correlation-request-id": [ + "178f7452-4779-4272-b891-00368dd05095" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015846Z:178f7452-4779-4272-b891-00368dd05095" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:58:46 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2609/providers/Microsoft.DataFactory/datafactories/onesdk8886?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2609/providers/Microsoft.DataFactory/datafactories/onesdk8886?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazI2MDkvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazg4ODY/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "202535a5-8012-49df-864c-6fbe733b8108" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "241" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk8886\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2609/providers/Microsoft.DataFactory/datafactories/onesdk8886\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"7049949f-b0fd-45a9-b681-5d7397a6cc20\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "b8c58991-0be3-42b6-8608-7f80f82a6283" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799862" + ], + "x-ms-correlation-request-id": [ + "6df44168-39f0-4f2f-8c18-b31e87d88112" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015847Z:6df44168-39f0-4f2f-8c18-b31e87d88112" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:58:46 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2609/providers/Microsoft.DataFactory/datafactories/onesdk8886?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazI2MDkvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazg4ODY/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "76935b87-19e5-4625-8cd5-118502fdb5f4" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "241" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk8886\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2609/providers/Microsoft.DataFactory/datafactories/onesdk8886\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"7049949f-b0fd-45a9-b681-5d7397a6cc20\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "e202750a-a18a-466b-a34e-6826b1dc9274" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799861" + ], + "x-ms-correlation-request-id": [ + "e99dbaa0-8132-4833-a5cc-325d21ddeffd" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015852Z:e99dbaa0-8132-4833-a5cc-325d21ddeffd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:58:51 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2609/providers/Microsoft.DataFactory/datafactories/onesdk8886?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazI2MDkvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazg4ODY/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "307c5d2f-726b-49ec-99fc-1a36c5907832" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "241" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk8886\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk2609/providers/Microsoft.DataFactory/datafactories/onesdk8886\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"7049949f-b0fd-45a9-b681-5d7397a6cc20\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"Succeeded\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "472" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "c429d0df-852b-4bfa-a0a6-24e517ce4561" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799860" + ], + "x-ms-correlation-request-id": [ + "346ea194-a3fd-48f7-b770-96883b3a27d9" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015857Z:346ea194-a3fd-48f7-b770-96883b3a27d9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:58:57 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-GetLinkedServiceWithWhiteSpaceName": [ + "onesdk8886", + "onesdk2609" + ] + }, + "Variables": { + "SubscriptionId": "8d88dc98-ab0c-4b80-825b-123b2cf8443c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.LinkedServiceTests/TestLinkedService.json b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.LinkedServiceTests/TestLinkedService.json new file mode 100644 index 000000000000..3baf86de8631 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.LinkedServiceTests/TestLinkedService.json @@ -0,0 +1,865 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799903" + ], + "x-ms-request-id": [ + "8f8ffd9f-2411-41e7-abf8-47f55500a6c6" + ], + "x-ms-correlation-request-id": [ + "8f8ffd9f-2411-41e7-abf8-47f55500a6c6" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015530Z:8f8ffd9f-2411-41e7-abf8-47f55500a6c6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:55:29 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799902" + ], + "x-ms-request-id": [ + "4e76ad2b-d58a-4c76-98fe-4a2404502e2c" + ], + "x-ms-correlation-request-id": [ + "4e76ad2b-d58a-4c76-98fe-4a2404502e2c" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015530Z:4e76ad2b-d58a-4c76-98fe-4a2404502e2c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:55:29 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk719?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcxOT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "101" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799901" + ], + "x-ms-request-id": [ + "086775af-96d2-4388-872f-395e616b876f" + ], + "x-ms-correlation-request-id": [ + "086775af-96d2-4388-872f-395e616b876f" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015530Z:086775af-96d2-4388-872f-395e616b876f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:55:30 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk719?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcxOT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk719\",\r\n \"name\": \"onesdk719\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "181" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11951" + ], + "x-ms-request-id": [ + "b5345720-9950-4eaf-b2c5-77ad873ccc7c" + ], + "x-ms-correlation-request-id": [ + "b5345720-9950-4eaf-b2c5-77ad873ccc7c" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015530Z:b5345720-9950-4eaf-b2c5-77ad873ccc7c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:55:30 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk719/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlR3JvdXBzL29uZXNkazcxOS9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799900" + ], + "x-ms-request-id": [ + "0cc3e964-c627-4752-b531-e6abd7b9c344" + ], + "x-ms-correlation-request-id": [ + "0cc3e964-c627-4752-b531-e6abd7b9c344" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015530Z:0cc3e964-c627-4752-b531-e6abd7b9c344" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:55:30 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk719/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcxOS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "centralus:557daee9-8b4c-44dc-9811-e6315bf7cc0f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799899" + ], + "x-ms-correlation-request-id": [ + "23a58478-7d8b-402c-9637-a5bdbdc6546a" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015531Z:23a58478-7d8b-402c-9637-a5bdbdc6546a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:55:30 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk719/providers/Microsoft.DataFactory/datafactories/onesdk9794?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcxOS9wcm92aWRlcnMvTWljcm9zb2Z0LkRhdGFGYWN0b3J5L2RhdGFmYWN0b3JpZXMvb25lc2RrOTc5ND9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"onesdk9794\",\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "69" + ], + "x-ms-client-request-id": [ + "f55c0011-64b6-46c3-a3e6-235ecc01d907" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "167" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk9794\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk719/providers/Microsoft.DataFactory/datafactories/onesdk9794\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"9d018390-1a9e-4ba1-82fe-5f4af319b938\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "477" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "5657e3e4-d74f-415f-8080-00697a8b57ba" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11950" + ], + "x-ms-correlation-request-id": [ + "9d0791cb-08e2-4cdf-bd12-41997d3b978c" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015532Z:9d0791cb-08e2-4cdf-bd12-41997d3b978c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:55:31 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk719/providers/Microsoft.DataFactory/datafactories/onesdk9794?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk719/providers/Microsoft.DataFactory/datafactories/onesdk9794?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcxOS9wcm92aWRlcnMvTWljcm9zb2Z0LkRhdGFGYWN0b3J5L2RhdGFmYWN0b3JpZXMvb25lc2RrOTc5ND9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "55b85f6a-dc35-429f-b7dc-407a56b9cf3f" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "167" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk9794\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk719/providers/Microsoft.DataFactory/datafactories/onesdk9794\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"9d018390-1a9e-4ba1-82fe-5f4af319b938\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "477" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "33b189ef-051e-4b0c-9cd7-3b4cb8a7a1eb" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799898" + ], + "x-ms-correlation-request-id": [ + "ca4270a8-5f16-4a85-b096-45beb39f4b3b" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015532Z:ca4270a8-5f16-4a85-b096-45beb39f4b3b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:55:31 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk719/providers/Microsoft.DataFactory/datafactories/onesdk9794?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcxOS9wcm92aWRlcnMvTWljcm9zb2Z0LkRhdGFGYWN0b3J5L2RhdGFmYWN0b3JpZXMvb25lc2RrOTc5ND9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3435caee-e152-4201-b616-679a0e27128a" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "167" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk9794\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk719/providers/Microsoft.DataFactory/datafactories/onesdk9794\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"9d018390-1a9e-4ba1-82fe-5f4af319b938\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"Succeeded\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "471" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "fed5b5bd-8a3f-448c-a5d8-430d8a3dc057" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799897" + ], + "x-ms-correlation-request-id": [ + "58bc0ae4-279b-45dd-b156-e128717ae41b" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015537Z:58bc0ae4-279b-45dd-b156-e128717ae41b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:55:37 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk719/providers/Microsoft.DataFactory/datafactories/onesdk9794/linkedservices/foo?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcxOS9wcm92aWRlcnMvTWljcm9zb2Z0LkRhdGFGYWN0b3J5L2RhdGFmYWN0b3JpZXMvb25lc2RrOTc5NC9saW5rZWRzZXJ2aWNlcy9mb28/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"foo2\",\r\n \"properties\": {\r\n \"type\": \"CustomLinkedService\",\r\n \"extendedProperties\": {\r\n \"PropertyBagPropertyName1\": \"PropertyBagPropertyValue1\",\r\n \"propertyBagPropertyName2\": \"PropertyBagPropertyValue2\"\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "278" + ], + "x-ms-client-request-id": [ + "3d8b4d50-cdba-4a82-87b6-a0c012324613" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "171" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk719/providers/Microsoft.DataFactory/datafactories/onesdk9794/linkedservices/foo\",\r\n \"name\": \"foo\",\r\n \"properties\": {\r\n \"extendedProperties\": {\r\n \"PropertyBagPropertyName1\": \"PropertyBagPropertyValue1\",\r\n \"propertyBagPropertyName2\": \"PropertyBagPropertyValue2\"\r\n },\r\n \"hubName\": \"onesdk9794_hub\",\r\n \"type\": \"CustomLinkedService\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "410" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "b3932ade-0c5b-42c6-817f-f52b7a8cf912" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11949" + ], + "x-ms-correlation-request-id": [ + "e67386ea-ccca-4f1a-ab58-2106fac4c0e0" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015537Z:e67386ea-ccca-4f1a-ab58-2106fac4c0e0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:55:37 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk719/providers/Microsoft.DataFactory/datafactories/onesdk9794/linkedservices/foo?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcxOS9wcm92aWRlcnMvTWljcm9zb2Z0LkRhdGFGYWN0b3J5L2RhdGFmYWN0b3JpZXMvb25lc2RrOTc5NC9saW5rZWRzZXJ2aWNlcy9mb28/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "18f8e2fc-5edd-4ab2-a64c-4346012312ee" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "171" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk719/providers/Microsoft.DataFactory/datafactories/onesdk9794/linkedservices/foo\",\r\n \"name\": \"foo\",\r\n \"properties\": {\r\n \"extendedProperties\": {\r\n \"PropertyBagPropertyName1\": \"PropertyBagPropertyValue1\",\r\n \"propertyBagPropertyName2\": \"PropertyBagPropertyValue2\"\r\n },\r\n \"hubName\": \"onesdk9794_hub\",\r\n \"type\": \"CustomLinkedService\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "410" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "8214f824-53f3-4994-968b-fd3918ae586f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799896" + ], + "x-ms-correlation-request-id": [ + "61993586-50b2-40ea-94ed-eaa4966f1325" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015537Z:61993586-50b2-40ea-94ed-eaa4966f1325" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:55:37 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk719/providers/Microsoft.DataFactory/datafactories/onesdk9794/linkedservices/foo?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcxOS9wcm92aWRlcnMvTWljcm9zb2Z0LkRhdGFGYWN0b3J5L2RhdGFmYWN0b3JpZXMvb25lc2RrOTc5NC9saW5rZWRzZXJ2aWNlcy9mb28/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "bf2371af-5eb7-4c55-9f81-ac9bc279e893" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk719/providers/Microsoft.DataFactory/datafactories/onesdk9794/linkedservices/foo\",\r\n \"name\": \"foo\",\r\n \"properties\": {\r\n \"extendedProperties\": {\r\n \"PropertyBagPropertyName1\": \"PropertyBagPropertyValue1\",\r\n \"propertyBagPropertyName2\": \"PropertyBagPropertyValue2\"\r\n },\r\n \"hubName\": \"onesdk9794_hub\",\r\n \"type\": \"CustomLinkedService\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "410" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "a4732e0c-a4bc-421c-bf5c-099116f01137" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799895" + ], + "x-ms-correlation-request-id": [ + "07b4f768-e001-4ece-a626-8772c1706bbd" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015538Z:07b4f768-e001-4ece-a626-8772c1706bbd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:55:38 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk719/providers/Microsoft.DataFactory/datafactories/onesdk9794/linkedservices/foo?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcxOS9wcm92aWRlcnMvTWljcm9zb2Z0LkRhdGFGYWN0b3J5L2RhdGFmYWN0b3JpZXMvb25lc2RrOTc5NC9saW5rZWRzZXJ2aWNlcy9mb28/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "444f2315-7e63-4460-825a-f279b94e5e8e" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "175" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-request-id": [ + "eccf542c-419b-4d2e-bc54-6751c15a8924" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11948" + ], + "x-ms-correlation-request-id": [ + "1561d9b6-4e65-44a2-a2fc-f917183ea745" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015538Z:1561d9b6-4e65-44a2-a2fc-f917183ea745" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:55:38 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk719/providers/Microsoft.DataFactory/datafactories/onesdk9794/linkedservices/foo/operationresults/0435045b56644e258c95727e01dc798e?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk719/providers/Microsoft.DataFactory/datafactories/onesdk9794/linkedservices/foo/operationresults/0435045b56644e258c95727e01dc798e?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcxOS9wcm92aWRlcnMvTWljcm9zb2Z0LkRhdGFGYWN0b3J5L2RhdGFmYWN0b3JpZXMvb25lc2RrOTc5NC9saW5rZWRzZXJ2aWNlcy9mb28vb3BlcmF0aW9ucmVzdWx0cy8wNDM1MDQ1YjU2NjQ0ZTI1OGM5NTcyN2UwMWRjNzk4ZT9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "175" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "a736c024-3940-4047-9b41-69f76a7f4295" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799894" + ], + "x-ms-correlation-request-id": [ + "6b4077a7-bba4-43ba-ba0c-0a3c5bda080a" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015538Z:6b4077a7-bba4-43ba-ba0c-0a3c5bda080a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:55:38 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk719/providers/Microsoft.DataFactory/datafactories/onesdk9794?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcxOS9wcm92aWRlcnMvTWljcm9zb2Z0LkRhdGFGYWN0b3J5L2RhdGFmYWN0b3JpZXMvb25lc2RrOTc5ND9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b968f468-d7b7-4531-b9ab-ce9e0b34dff0" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "a944fc7a-82c3-4c92-9037-156ae184707a" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11947" + ], + "x-ms-correlation-request-id": [ + "307c7dbe-9adc-49ee-b017-e2a8c88f5acb" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015539Z:307c7dbe-9adc-49ee-b017-e2a8c88f5acb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:55:39 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-LinkedService": [ + "onesdk9794", + "onesdk719" + ] + }, + "Variables": { + "SubscriptionId": "8d88dc98-ab0c-4b80-825b-123b2cf8443c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.LinkedServiceTests/TestLinkedServicePiping.json b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.LinkedServiceTests/TestLinkedServicePiping.json new file mode 100644 index 000000000000..2cd804ba875a --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.LinkedServiceTests/TestLinkedServicePiping.json @@ -0,0 +1,985 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799822" + ], + "x-ms-request-id": [ + "a89171ac-ad35-410e-9614-43803da545f8" + ], + "x-ms-correlation-request-id": [ + "a89171ac-ad35-410e-9614-43803da545f8" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021450Z:a89171ac-ad35-410e-9614-43803da545f8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:14:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799821" + ], + "x-ms-request-id": [ + "126dc681-b87d-4f1d-8cf7-6fd258fa0579" + ], + "x-ms-correlation-request-id": [ + "126dc681-b87d-4f1d-8cf7-6fd258fa0579" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021450Z:126dc681-b87d-4f1d-8cf7-6fd258fa0579" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:14:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3188?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxODg/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "102" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799820" + ], + "x-ms-request-id": [ + "523ba906-08b5-4e97-a31a-00b6db36feb7" + ], + "x-ms-correlation-request-id": [ + "523ba906-08b5-4e97-a31a-00b6db36feb7" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021450Z:523ba906-08b5-4e97-a31a-00b6db36feb7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:14:49 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3188?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxODg/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk3188\",\r\n \"name\": \"onesdk3188\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "183" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11909" + ], + "x-ms-request-id": [ + "3ce2867b-c03d-4105-b52f-b20ce310f772" + ], + "x-ms-correlation-request-id": [ + "3ce2867b-c03d-4105-b52f-b20ce310f772" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021451Z:3ce2867b-c03d-4105-b52f-b20ce310f772" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:14:50 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk3188/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlR3JvdXBzL29uZXNkazMxODgvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799819" + ], + "x-ms-request-id": [ + "829f51e4-9dde-4f70-8009-048049b45ac7" + ], + "x-ms-correlation-request-id": [ + "829f51e4-9dde-4f70-8009-048049b45ac7" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021451Z:829f51e4-9dde-4f70-8009-048049b45ac7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:14:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3188/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxODgvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "centralus:5af764eb-0803-405b-87c4-435c429abaae" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799821" + ], + "x-ms-correlation-request-id": [ + "5bb58c7b-da78-45bc-b5d1-28bd38d86684" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021451Z:5bb58c7b-da78-45bc-b5d1-28bd38d86684" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:14:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3188/providers/Microsoft.DataFactory/datafactories/onesdk906?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxODgvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazkwNj9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"onesdk906\",\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "68" + ], + "x-ms-client-request-id": [ + "4863245c-27af-4c22-a6b7-15d6bf5c1973" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "27" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk906\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3188/providers/Microsoft.DataFactory/datafactories/onesdk906\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"3df4c5e2-5616-4a95-a9b8-3b9ba0106d31\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "476" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "2c84a835-a308-4c14-aa31-204afe82c661" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11908" + ], + "x-ms-correlation-request-id": [ + "21434936-9e5e-4f84-8117-2f63fa6f3c54" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021452Z:21434936-9e5e-4f84-8117-2f63fa6f3c54" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:14:51 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3188/providers/Microsoft.DataFactory/datafactories/onesdk906?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3188/providers/Microsoft.DataFactory/datafactories/onesdk906?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxODgvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazkwNj9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "734c0469-03ce-4a82-b38e-6e2562079e44" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "27" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk906\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3188/providers/Microsoft.DataFactory/datafactories/onesdk906\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"3df4c5e2-5616-4a95-a9b8-3b9ba0106d31\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "476" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "eef100f7-6beb-44dc-b5a7-cf2c687922db" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799818" + ], + "x-ms-correlation-request-id": [ + "b6e7b5b9-a643-4645-a4bc-aec3ad78da10" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021452Z:b6e7b5b9-a643-4645-a4bc-aec3ad78da10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:14:51 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3188/providers/Microsoft.DataFactory/datafactories/onesdk906?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxODgvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazkwNj9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "39af1502-15d4-4b98-b8a7-3e86b262bfc6" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "27" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk906\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3188/providers/Microsoft.DataFactory/datafactories/onesdk906\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"3df4c5e2-5616-4a95-a9b8-3b9ba0106d31\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "476" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "86182005-7b80-46c2-a181-bde5c177091a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799817" + ], + "x-ms-correlation-request-id": [ + "c8be04b2-26b2-4034-a639-28f4f4d1be3e" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021457Z:c8be04b2-26b2-4034-a639-28f4f4d1be3e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:14:57 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3188/providers/Microsoft.DataFactory/datafactories/onesdk906?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxODgvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazkwNj9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "88623fff-ddb3-4a8f-98db-60eb179c755f" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "27" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk906\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3188/providers/Microsoft.DataFactory/datafactories/onesdk906\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"3df4c5e2-5616-4a95-a9b8-3b9ba0106d31\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"Succeeded\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "470" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "f685fe4b-c59e-47cb-b540-27a2850e19d2" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799846" + ], + "x-ms-correlation-request-id": [ + "510fdb5d-2610-4677-b094-4e8de361e714" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021502Z:510fdb5d-2610-4677-b094-4e8de361e714" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:15:02 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3188/providers/Microsoft.DataFactory/datafactories/onesdk906/linkedservices/foo?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxODgvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazkwNi9saW5rZWRzZXJ2aWNlcy9mb28/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"foo2\",\r\n \"properties\": {\r\n \"type\": \"CustomLinkedService\",\r\n \"extendedProperties\": {\r\n \"PropertyBagPropertyName1\": \"PropertyBagPropertyValue1\",\r\n \"propertyBagPropertyName2\": \"PropertyBagPropertyValue2\"\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "278" + ], + "x-ms-client-request-id": [ + "cd91367e-5b39-4e0a-80de-5140402b6c3b" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "32" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3188/providers/Microsoft.DataFactory/datafactories/onesdk906/linkedservices/foo\",\r\n \"name\": \"foo\",\r\n \"properties\": {\r\n \"extendedProperties\": {\r\n \"PropertyBagPropertyName1\": \"PropertyBagPropertyValue1\",\r\n \"propertyBagPropertyName2\": \"PropertyBagPropertyValue2\"\r\n },\r\n \"hubName\": \"onesdk906_hub\",\r\n \"type\": \"CustomLinkedService\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "409" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "bac9ea16-55e2-4ab6-8eaf-019d8c577041" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11924" + ], + "x-ms-correlation-request-id": [ + "4a493d1b-1fa1-4abc-b578-5f84e2ea6dc6" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021503Z:4a493d1b-1fa1-4abc-b578-5f84e2ea6dc6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:15:03 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3188/providers/Microsoft.DataFactory/datafactories/onesdk906/linkedservices/foo?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxODgvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazkwNi9saW5rZWRzZXJ2aWNlcy9mb28/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "fb117203-5eaf-4325-b073-48e170d61b4b" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "32" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3188/providers/Microsoft.DataFactory/datafactories/onesdk906/linkedservices/foo\",\r\n \"name\": \"foo\",\r\n \"properties\": {\r\n \"extendedProperties\": {\r\n \"PropertyBagPropertyName1\": \"PropertyBagPropertyValue1\",\r\n \"propertyBagPropertyName2\": \"PropertyBagPropertyValue2\"\r\n },\r\n \"hubName\": \"onesdk906_hub\",\r\n \"type\": \"CustomLinkedService\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "409" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "d9837471-95e6-4cc5-94bc-1ab56c6bffc6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799845" + ], + "x-ms-correlation-request-id": [ + "f0cdeac9-9fdb-472b-98a2-b59e4ffdd934" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021503Z:f0cdeac9-9fdb-472b-98a2-b59e4ffdd934" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:15:03 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3188/providers/Microsoft.DataFactory/datafactories/onesdk906/linkedservices/foo?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxODgvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazkwNi9saW5rZWRzZXJ2aWNlcy9mb28/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9121ee1d-0bad-42ae-b37c-fc24c04b9c07" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3188/providers/Microsoft.DataFactory/datafactories/onesdk906/linkedservices/foo\",\r\n \"name\": \"foo\",\r\n \"properties\": {\r\n \"extendedProperties\": {\r\n \"PropertyBagPropertyName1\": \"PropertyBagPropertyValue1\",\r\n \"propertyBagPropertyName2\": \"PropertyBagPropertyValue2\"\r\n },\r\n \"hubName\": \"onesdk906_hub\",\r\n \"type\": \"CustomLinkedService\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "409" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "0edb7349-b887-47de-a1ec-e8ad83083d43" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799844" + ], + "x-ms-correlation-request-id": [ + "ad5ca09f-033e-4ba5-8e3c-312665abb4f9" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021503Z:ad5ca09f-033e-4ba5-8e3c-312665abb4f9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:15:03 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3188/providers/Microsoft.DataFactory/datafactories/onesdk906/linkedservices/foo?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxODgvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazkwNi9saW5rZWRzZXJ2aWNlcy9mb28/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1da170bc-7eac-43f9-9083-fb555397c458" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"message\": \"Linked service foo not found.\",\r\n \"code\": \"LinkedServiceNotFound\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "74" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "e079dfa5-8d8a-4260-90a1-34adc6cf7c02" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799842" + ], + "x-ms-correlation-request-id": [ + "ea030d95-8182-4884-a459-0ae467ec4f6d" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021504Z:ea030d95-8182-4884-a459-0ae467ec4f6d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:15:03 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3188/providers/Microsoft.DataFactory/datafactories/onesdk906/linkedservices/foo?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxODgvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazkwNi9saW5rZWRzZXJ2aWNlcy9mb28/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "33a8a433-f7e2-49fc-af70-76ab699b19cd" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "36" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-request-id": [ + "e21fd589-2014-49de-b640-c67b4e2a4fc8" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11923" + ], + "x-ms-correlation-request-id": [ + "13e10369-67f9-456a-a212-7d9176face2b" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021503Z:13e10369-67f9-456a-a212-7d9176face2b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:15:03 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3188/providers/Microsoft.DataFactory/datafactories/onesdk906/linkedservices/foo/operationresults/948d6a59499f40ffbb7be1b6501ee26c?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3188/providers/Microsoft.DataFactory/datafactories/onesdk906/linkedservices/foo/operationresults/948d6a59499f40ffbb7be1b6501ee26c?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxODgvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazkwNi9saW5rZWRzZXJ2aWNlcy9mb28vb3BlcmF0aW9ucmVzdWx0cy85NDhkNmE1OTQ5OWY0MGZmYmI3YmUxYjY1MDFlZTI2Yz9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "36" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "7c4ed0f6-1061-444d-b092-f9ea2b9be56b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799843" + ], + "x-ms-correlation-request-id": [ + "f00b7785-8033-4884-9d57-ff1823aa2105" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021504Z:f00b7785-8033-4884-9d57-ff1823aa2105" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:15:03 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3188/providers/Microsoft.DataFactory/datafactories/onesdk906?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxODgvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazkwNj9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "349de8e4-b781-4af6-9b57-754952f8daa1" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "27b67351-e349-4bea-a36b-e2e168db94b7" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11922" + ], + "x-ms-correlation-request-id": [ + "c1ce52b2-ce00-4b85-9d76-cf8fccb5d57f" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021504Z:c1ce52b2-ce00-4b85-9d76-cf8fccb5d57f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:15:04 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-LinkedServicePiping": [ + "onesdk906", + "onesdk3188" + ] + }, + "Variables": { + "SubscriptionId": "8d88dc98-ab0c-4b80-825b-123b2cf8443c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.LinkedServiceTests/TestLinkedServiceWithDataFactoryParameter.json b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.LinkedServiceTests/TestLinkedServiceWithDataFactoryParameter.json new file mode 100644 index 000000000000..f781d7672210 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.LinkedServiceTests/TestLinkedServiceWithDataFactoryParameter.json @@ -0,0 +1,865 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799881" + ], + "x-ms-request-id": [ + "cd8e8d20-5733-4104-a7ee-ff691b9fcee9" + ], + "x-ms-correlation-request-id": [ + "cd8e8d20-5733-4104-a7ee-ff691b9fcee9" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015709Z:cd8e8d20-5733-4104-a7ee-ff691b9fcee9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:57:08 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799880" + ], + "x-ms-request-id": [ + "f25c95cf-ff04-4909-8b87-87dfde727841" + ], + "x-ms-correlation-request-id": [ + "f25c95cf-ff04-4909-8b87-87dfde727841" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015709Z:f25c95cf-ff04-4909-8b87-87dfde727841" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:57:09 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3411?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM0MTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "102" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799879" + ], + "x-ms-request-id": [ + "9bd2e205-bca5-4208-86ee-a7757426ce7f" + ], + "x-ms-correlation-request-id": [ + "9bd2e205-bca5-4208-86ee-a7757426ce7f" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015709Z:9bd2e205-bca5-4208-86ee-a7757426ce7f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:57:09 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3411?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM0MTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk3411\",\r\n \"name\": \"onesdk3411\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "183" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11940" + ], + "x-ms-request-id": [ + "74bda076-5984-4a30-b63f-f345aa887199" + ], + "x-ms-correlation-request-id": [ + "74bda076-5984-4a30-b63f-f345aa887199" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015709Z:74bda076-5984-4a30-b63f-f345aa887199" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:57:09 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk3411/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlR3JvdXBzL29uZXNkazM0MTEvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799878" + ], + "x-ms-request-id": [ + "36aa8832-09ed-45e9-a2d6-550fcf6c488c" + ], + "x-ms-correlation-request-id": [ + "36aa8832-09ed-45e9-a2d6-550fcf6c488c" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015709Z:36aa8832-09ed-45e9-a2d6-550fcf6c488c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:57:09 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3411/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM0MTEvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "centralus:0ae16592-e9ff-47e2-a0d3-d5a538432e85" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799871" + ], + "x-ms-correlation-request-id": [ + "74d32ef0-935b-4da5-a3c3-6dfe7b00ef78" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015710Z:74d32ef0-935b-4da5-a3c3-6dfe7b00ef78" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:57:09 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3411/providers/Microsoft.DataFactory/datafactories/onesdk1451?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM0MTEvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazE0NTE/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"onesdk1451\",\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "69" + ], + "x-ms-client-request-id": [ + "0268867a-e307-4442-97cd-61db10d5e409" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "209" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk1451\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3411/providers/Microsoft.DataFactory/datafactories/onesdk1451\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"043bf1db-08d6-4de4-b557-4380386e2e1e\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "b9d35b6b-06c7-41e0-8963-a9fa7e380812" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11939" + ], + "x-ms-correlation-request-id": [ + "84a21166-d7ec-4cd4-8e8c-513927b73f2d" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015711Z:84a21166-d7ec-4cd4-8e8c-513927b73f2d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:57:10 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3411/providers/Microsoft.DataFactory/datafactories/onesdk1451?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3411/providers/Microsoft.DataFactory/datafactories/onesdk1451?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM0MTEvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazE0NTE/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2c7bd1e0-405a-4eda-bbf5-f47e0bd9558f" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "209" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk1451\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3411/providers/Microsoft.DataFactory/datafactories/onesdk1451\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"043bf1db-08d6-4de4-b557-4380386e2e1e\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "60c77c84-8da7-436a-83ed-1f9d94d445d6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799877" + ], + "x-ms-correlation-request-id": [ + "c04a3ddb-4507-4a56-a415-17389726b9f5" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015711Z:c04a3ddb-4507-4a56-a415-17389726b9f5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:57:10 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3411/providers/Microsoft.DataFactory/datafactories/onesdk1451?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM0MTEvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazE0NTE/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "14d2bd11-576c-49a2-b18e-520bd4d4cee8" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "209" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk1451\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3411/providers/Microsoft.DataFactory/datafactories/onesdk1451\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"043bf1db-08d6-4de4-b557-4380386e2e1e\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"Succeeded\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "472" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "fa374c51-675a-471b-aad7-9b6813e7e073" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799876" + ], + "x-ms-correlation-request-id": [ + "a1ae7b74-e27b-4fcc-bfc4-949d981b4411" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015716Z:a1ae7b74-e27b-4fcc-bfc4-949d981b4411" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:57:16 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3411/providers/Microsoft.DataFactory/datafactories/onesdk1451/linkedservices/foo?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM0MTEvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazE0NTEvbGlua2Vkc2VydmljZXMvZm9vP2FwaS12ZXJzaW9uPTIwMTQtMTAtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"foo2\",\r\n \"properties\": {\r\n \"type\": \"CustomLinkedService\",\r\n \"extendedProperties\": {\r\n \"PropertyBagPropertyName1\": \"PropertyBagPropertyValue1\",\r\n \"propertyBagPropertyName2\": \"PropertyBagPropertyValue2\"\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "278" + ], + "x-ms-client-request-id": [ + "bfd64529-d967-49e2-84c5-612e773f72bb" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "213" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3411/providers/Microsoft.DataFactory/datafactories/onesdk1451/linkedservices/foo\",\r\n \"name\": \"foo\",\r\n \"properties\": {\r\n \"extendedProperties\": {\r\n \"PropertyBagPropertyName1\": \"PropertyBagPropertyValue1\",\r\n \"propertyBagPropertyName2\": \"PropertyBagPropertyValue2\"\r\n },\r\n \"hubName\": \"onesdk1451_hub\",\r\n \"type\": \"CustomLinkedService\",\r\n \"provisioningState\": \"PendingCreation\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "417" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "51c95e68-1fa5-45de-9612-15e1f998ba78" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11938" + ], + "x-ms-correlation-request-id": [ + "d27b2cfb-1cf5-47d9-aa3a-f5a9762471b6" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015716Z:d27b2cfb-1cf5-47d9-aa3a-f5a9762471b6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:57:16 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3411/providers/Microsoft.DataFactory/datafactories/onesdk1451/linkedservices/foo?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM0MTEvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazE0NTEvbGlua2Vkc2VydmljZXMvZm9vP2FwaS12ZXJzaW9uPTIwMTQtMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9f45fc72-847e-4f60-a965-f0807bec58af" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "213" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3411/providers/Microsoft.DataFactory/datafactories/onesdk1451/linkedservices/foo\",\r\n \"name\": \"foo\",\r\n \"properties\": {\r\n \"extendedProperties\": {\r\n \"PropertyBagPropertyName1\": \"PropertyBagPropertyValue1\",\r\n \"propertyBagPropertyName2\": \"PropertyBagPropertyValue2\"\r\n },\r\n \"hubName\": \"onesdk1451_hub\",\r\n \"type\": \"CustomLinkedService\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "411" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "de71e9d2-1a62-402c-9e96-3494f33e8b99" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799875" + ], + "x-ms-correlation-request-id": [ + "864b760b-1d19-4477-8cf9-e54953b45440" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015717Z:864b760b-1d19-4477-8cf9-e54953b45440" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:57:16 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3411/providers/Microsoft.DataFactory/datafactories/onesdk1451/linkedservices/foo?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM0MTEvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazE0NTEvbGlua2Vkc2VydmljZXMvZm9vP2FwaS12ZXJzaW9uPTIwMTQtMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "44dcc38b-0295-4536-9f01-a4214472d95b" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3411/providers/Microsoft.DataFactory/datafactories/onesdk1451/linkedservices/foo\",\r\n \"name\": \"foo\",\r\n \"properties\": {\r\n \"extendedProperties\": {\r\n \"PropertyBagPropertyName1\": \"PropertyBagPropertyValue1\",\r\n \"propertyBagPropertyName2\": \"PropertyBagPropertyValue2\"\r\n },\r\n \"hubName\": \"onesdk1451_hub\",\r\n \"type\": \"CustomLinkedService\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "411" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "b4e6f3a9-83bf-42f6-a5eb-fb8f58f39da9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799874" + ], + "x-ms-correlation-request-id": [ + "df06daba-c723-4dfe-9cad-6779f00ea26e" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015717Z:df06daba-c723-4dfe-9cad-6779f00ea26e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:57:16 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3411/providers/Microsoft.DataFactory/datafactories/onesdk1451/linkedservices/foo?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM0MTEvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazE0NTEvbGlua2Vkc2VydmljZXMvZm9vP2FwaS12ZXJzaW9uPTIwMTQtMTAtMDEtcHJldmlldw==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "93aa1d51-43a9-43b0-b4eb-6d55775cbc9a" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "217" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-request-id": [ + "30ac11ba-e803-4961-a05a-e50249f48522" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11937" + ], + "x-ms-correlation-request-id": [ + "c971213e-9b3d-4faf-bc7a-46d5a4c688a8" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015717Z:c971213e-9b3d-4faf-bc7a-46d5a4c688a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:57:17 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3411/providers/Microsoft.DataFactory/datafactories/onesdk1451/linkedservices/foo/operationresults/9851f32104df403dae66996c3acea4bb?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3411/providers/Microsoft.DataFactory/datafactories/onesdk1451/linkedservices/foo/operationresults/9851f32104df403dae66996c3acea4bb?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM0MTEvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazE0NTEvbGlua2Vkc2VydmljZXMvZm9vL29wZXJhdGlvbnJlc3VsdHMvOTg1MWYzMjEwNGRmNDAzZGFlNjY5OTZjM2FjZWE0YmI/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "217" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "0a872ad6-fd03-4ef0-8a74-3cef9d526857" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799873" + ], + "x-ms-correlation-request-id": [ + "e9ea4bab-aacc-4b00-976e-f61dbcd28850" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015717Z:e9ea4bab-aacc-4b00-976e-f61dbcd28850" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:57:17 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3411/providers/Microsoft.DataFactory/datafactories/onesdk1451?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM0MTEvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazE0NTE/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b9681d88-aec8-4b2a-8b98-fa0ab9678d67" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "00ef1564-07b6-4f24-a37e-8bda46bff2ab" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11936" + ], + "x-ms-correlation-request-id": [ + "72fb95b4-ec78-42e8-bb5d-fca0f424954c" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015717Z:72fb95b4-ec78-42e8-bb5d-fca0f424954c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:57:17 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-LinkedServiceWithDataFactoryParameter": [ + "onesdk1451", + "onesdk3411" + ] + }, + "Variables": { + "SubscriptionId": "8d88dc98-ab0c-4b80-825b-123b2cf8443c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.PipelineTests/TestPipeline.json b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.PipelineTests/TestPipeline.json new file mode 100644 index 000000000000..c487c6b66c7e --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.PipelineTests/TestPipeline.json @@ -0,0 +1,1867 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"adfbqupgrade\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-07-01-01dp\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22693" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799982" + ], + "x-ms-request-id": [ + "3b32bee6-3162-4804-a0d6-4e10a00d3415" + ], + "x-ms-correlation-request-id": [ + "3b32bee6-3162-4804-a0d6-4e10a00d3415" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141106T060750Z:3b32bee6-3162-4804-a0d6-4e10a00d3415" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 06 Nov 2014 06:07:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"adfbqupgrade\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-07-01-01dp\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22693" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799981" + ], + "x-ms-request-id": [ + "5a9e76af-66f0-4da2-8984-6d67cc622837" + ], + "x-ms-correlation-request-id": [ + "5a9e76af-66f0-4da2-8984-6d67cc622837" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141106T060750Z:5a9e76af-66f0-4da2-8984-6d67cc622837" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 06 Nov 2014 06:07:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MTQ/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "102" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799980" + ], + "x-ms-request-id": [ + "0adbeb1e-2ded-4323-9031-e789ca007291" + ], + "x-ms-correlation-request-id": [ + "0adbeb1e-2ded-4323-9031-e789ca007291" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141106T060750Z:0adbeb1e-2ded-4323-9031-e789ca007291" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 06 Nov 2014 06:07:49 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MTQ/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk3514\",\r\n \"name\": \"onesdk3514\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "183" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11990" + ], + "x-ms-request-id": [ + "72863423-f978-452e-8ae4-3322594009bb" + ], + "x-ms-correlation-request-id": [ + "72863423-f978-452e-8ae4-3322594009bb" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141106T060751Z:72863423-f978-452e-8ae4-3322594009bb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 06 Nov 2014 06:07:51 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk3514/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlR3JvdXBzL29uZXNkazM1MTQvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799979" + ], + "x-ms-request-id": [ + "fe104392-6e06-4327-9996-d7b0cc0a94a6" + ], + "x-ms-correlation-request-id": [ + "fe104392-6e06-4327-9996-d7b0cc0a94a6" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141106T060751Z:fe104392-6e06-4327-9996-d7b0cc0a94a6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 06 Nov 2014 06:07:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MTQvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "centralus:2c9490d6-d626-4093-93c4-0a8dc9b89e95" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799932" + ], + "x-ms-correlation-request-id": [ + "019f1824-de22-45bb-8c2b-d2e5fbc28668" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141106T060751Z:019f1824-de22-45bb-8c2b-d2e5fbc28668" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 06 Nov 2014 06:07:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MTQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazgyNjM/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"onesdk8263\",\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "69" + ], + "x-ms-client-request-id": [ + "967a6b13-1118-465a-b9bf-60c9fb6c8e20" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "7" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk8263\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"e1e98569-7845-4eec-8f14-59f3442ec4ed\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "6e4f8ccf-b16a-47b6-8d81-244136c9af5a" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11989" + ], + "x-ms-correlation-request-id": [ + "7fdbca4c-f4e0-48f9-836a-c8df24bcb9c6" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141106T060752Z:7fdbca4c-f4e0-48f9-836a-c8df24bcb9c6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 06 Nov 2014 06:07:52 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MTQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazgyNjM/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d8337ad0-7c16-4ad0-8681-ca4a4b95fd39" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "7" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk8263\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"e1e98569-7845-4eec-8f14-59f3442ec4ed\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "ab9ef790-14e4-49ef-9523-946d5c00ba88" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799978" + ], + "x-ms-correlation-request-id": [ + "5be61652-b0f4-432f-b961-703f4255e995" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141106T060752Z:5be61652-b0f4-432f-b961-703f4255e995" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 06 Nov 2014 06:07:52 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MTQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazgyNjM/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "af00fed6-812d-411a-9c77-44956363d422" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "7" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk8263\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"e1e98569-7845-4eec-8f14-59f3442ec4ed\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "23ea5a13-3daf-45ed-8a6a-911636b06eb2" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799977" + ], + "x-ms-correlation-request-id": [ + "581b9b6c-0e98-4a12-a012-af97b8e738d0" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141106T060758Z:581b9b6c-0e98-4a12-a012-af97b8e738d0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 06 Nov 2014 06:07:57 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MTQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazgyNjM/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "471119d6-4da2-418b-b3cb-795fbebe33d5" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "7" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk8263\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"e1e98569-7845-4eec-8f14-59f3442ec4ed\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"Succeeded\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "472" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "94bef316-74f2-4cad-a15e-28af2504198c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799976" + ], + "x-ms-correlation-request-id": [ + "ee1909e4-634b-41ca-807f-fde5b1f46f08" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141106T060803Z:ee1909e4-634b-41ca-807f-fde5b1f46f08" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 06 Nov 2014 06:08:03 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/linkedservices/foo2?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MTQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazgyNjMvbGlua2Vkc2VydmljZXMvZm9vMj9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"foo2\",\r\n \"properties\": {\r\n \"type\": \"CustomLinkedService\",\r\n \"extendedProperties\": {\r\n \"PropertyBagPropertyName1\": \"PropertyBagPropertyValue1\",\r\n \"propertyBagPropertyName2\": \"PropertyBagPropertyValue2\"\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "278" + ], + "x-ms-client-request-id": [ + "a387d494-3caa-43ef-a67a-aea4d4d516a8" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "12" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/linkedservices/foo2\",\r\n \"name\": \"foo2\",\r\n \"properties\": {\r\n \"extendedProperties\": {\r\n \"PropertyBagPropertyName1\": \"PropertyBagPropertyValue1\",\r\n \"propertyBagPropertyName2\": \"PropertyBagPropertyValue2\"\r\n },\r\n \"hubName\": \"onesdk8263_hub\",\r\n \"type\": \"CustomLinkedService\",\r\n \"provisioningState\": \"PendingCreation\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "419" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "8762c0bf-f629-4cb6-a320-d403ca94d08a" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11988" + ], + "x-ms-correlation-request-id": [ + "f4519e43-fbe6-47f3-a513-fbbc6da391c2" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141106T060803Z:f4519e43-fbe6-47f3-a513-fbbc6da391c2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 06 Nov 2014 06:08:03 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/linkedservices/foo2?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MTQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazgyNjMvbGlua2Vkc2VydmljZXMvZm9vMj9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "fe07ac67-d649-4b29-bed9-7e4e0b5c9b23" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "12" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/linkedservices/foo2\",\r\n \"name\": \"foo2\",\r\n \"properties\": {\r\n \"extendedProperties\": {\r\n \"PropertyBagPropertyName1\": \"PropertyBagPropertyValue1\",\r\n \"propertyBagPropertyName2\": \"PropertyBagPropertyValue2\"\r\n },\r\n \"hubName\": \"onesdk8263_hub\",\r\n \"type\": \"CustomLinkedService\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "413" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "3b5370ca-8e1b-4e03-bf2e-167fa9a8d80a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799975" + ], + "x-ms-correlation-request-id": [ + "786651aa-19f4-4a9e-87a7-53b332f96ac5" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141106T060803Z:786651aa-19f4-4a9e-87a7-53b332f96ac5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 06 Nov 2014 06:08:03 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/tables/inputTable?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MTQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazgyNjMvdGFibGVzL2lucHV0VGFibGU/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"foo1\",\r\n \"properties\": {\r\n \"location\": {\r\n \"type\": \"CustomLocation\",\r\n \"linkedServiceName\": \"foo2\"\r\n },\r\n \"availability\": {\r\n \"frequency\": \"Hour\",\r\n \"interval\": 1\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "284" + ], + "x-ms-client-request-id": [ + "b0d6c4bc-de3b-4761-bcbf-6b0dbdf4a8b0" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "15" + ] + }, + "ResponseBody": "{\r\n \"name\": \"inputTable\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/tables/inputTable\",\r\n \"properties\": {\r\n \"published\": false,\r\n \"location\": {\r\n \"type\": \"CustomLocation\",\r\n \"linkedServiceName\": \"foo2\"\r\n },\r\n \"availability\": {\r\n \"frequency\": \"Hour\",\r\n \"interval\": 1,\r\n \"waitOnExternal\": null\r\n },\r\n \"createTime\": \"2014-11-06T06:08:04.0872117Z\",\r\n \"provisioningState\": \"PendingCreation\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "431" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "47faf442-21ae-42af-90da-937b66781be1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11987" + ], + "x-ms-correlation-request-id": [ + "866bb015-1df6-4b8d-9c25-9cbd0d15520b" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141106T060804Z:866bb015-1df6-4b8d-9c25-9cbd0d15520b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 06 Nov 2014 06:08:03 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/tables/inputTable?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/tables/inputTable?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MTQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazgyNjMvdGFibGVzL2lucHV0VGFibGU/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b2eb2046-0635-46e3-b955-3f5ddc852d4e" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "15" + ] + }, + "ResponseBody": "{\r\n \"name\": \"inputTable\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/tables/inputTable\",\r\n \"properties\": {\r\n \"published\": false,\r\n \"location\": {\r\n \"type\": \"CustomLocation\",\r\n \"linkedServiceName\": \"foo2\"\r\n },\r\n \"availability\": {\r\n \"frequency\": \"Hour\",\r\n \"interval\": 1,\r\n \"waitOnExternal\": null\r\n },\r\n \"createTime\": \"2014-11-06T06:08:04.0872117Z\",\r\n \"provisioningState\": \"PendingCreation\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "431" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "a81bdcdd-8fb9-49ab-9ba9-48c19117090e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799974" + ], + "x-ms-correlation-request-id": [ + "b1fdb1b7-6d6d-498f-abf6-e9ebe0b018ee" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141106T060804Z:b1fdb1b7-6d6d-498f-abf6-e9ebe0b018ee" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 06 Nov 2014 06:08:04 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/tables/inputTable?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MTQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazgyNjMvdGFibGVzL2lucHV0VGFibGU/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "04370c84-7f3c-4efc-92bb-0c8f8304eaac" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "15" + ] + }, + "ResponseBody": "{\r\n \"name\": \"inputTable\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/tables/inputTable\",\r\n \"properties\": {\r\n \"published\": false,\r\n \"location\": {\r\n \"type\": \"CustomLocation\",\r\n \"linkedServiceName\": \"foo2\"\r\n },\r\n \"availability\": {\r\n \"frequency\": \"Hour\",\r\n \"interval\": 1,\r\n \"waitOnExternal\": null\r\n },\r\n \"createTime\": \"2014-11-06T06:08:04.4119954Z\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "425" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "e1332509-2a49-465e-9820-7aefeb24dbe9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799973" + ], + "x-ms-correlation-request-id": [ + "05b87e2b-97fb-4632-a7c3-5bd84776e878" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141106T060809Z:05b87e2b-97fb-4632-a7c3-5bd84776e878" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 06 Nov 2014 06:08:09 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/tables/outputTable?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MTQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazgyNjMvdGFibGVzL291dHB1dFRhYmxlP2FwaS12ZXJzaW9uPTIwMTQtMTAtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"foo1\",\r\n \"properties\": {\r\n \"location\": {\r\n \"type\": \"CustomLocation\",\r\n \"linkedServiceName\": \"foo2\"\r\n },\r\n \"availability\": {\r\n \"frequency\": \"Hour\",\r\n \"interval\": 1\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "284" + ], + "x-ms-client-request-id": [ + "221d76d5-58d9-483d-b7f1-7dcfc639623a" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "19" + ] + }, + "ResponseBody": "{\r\n \"name\": \"outputTable\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/tables/outputTable\",\r\n \"properties\": {\r\n \"published\": false,\r\n \"location\": {\r\n \"type\": \"CustomLocation\",\r\n \"linkedServiceName\": \"foo2\"\r\n },\r\n \"availability\": {\r\n \"frequency\": \"Hour\",\r\n \"interval\": 1,\r\n \"waitOnExternal\": null\r\n },\r\n \"createTime\": \"2014-11-06T06:08:09.9792952Z\",\r\n \"provisioningState\": \"PendingCreation\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "433" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "a306e21d-ae00-4169-863d-028d6724ee32" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11986" + ], + "x-ms-correlation-request-id": [ + "8cdea1da-12ab-465a-a08f-6b0ddf07c831" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141106T060810Z:8cdea1da-12ab-465a-a08f-6b0ddf07c831" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 06 Nov 2014 06:08:10 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/tables/outputTable?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/tables/outputTable?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MTQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazgyNjMvdGFibGVzL291dHB1dFRhYmxlP2FwaS12ZXJzaW9uPTIwMTQtMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3f5e0c94-5f1e-47cd-b0a4-6c185957de19" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "19" + ] + }, + "ResponseBody": "{\r\n \"name\": \"outputTable\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/tables/outputTable\",\r\n \"properties\": {\r\n \"published\": false,\r\n \"location\": {\r\n \"type\": \"CustomLocation\",\r\n \"linkedServiceName\": \"foo2\"\r\n },\r\n \"availability\": {\r\n \"frequency\": \"Hour\",\r\n \"interval\": 1,\r\n \"waitOnExternal\": null\r\n },\r\n \"createTime\": \"2014-11-06T06:08:09.9792952Z\",\r\n \"provisioningState\": \"PendingCreation\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "433" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "9e032252-ff0d-463b-a2a6-4d08e24f84b0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799972" + ], + "x-ms-correlation-request-id": [ + "6ff8911d-dbeb-48f6-8ed4-e15dd1aa68f6" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141106T060810Z:6ff8911d-dbeb-48f6-8ed4-e15dd1aa68f6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 06 Nov 2014 06:08:10 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/tables/outputTable?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MTQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazgyNjMvdGFibGVzL291dHB1dFRhYmxlP2FwaS12ZXJzaW9uPTIwMTQtMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c05b6bd9-65a8-4b1c-b02d-84765e3162d7" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "19" + ] + }, + "ResponseBody": "{\r\n \"name\": \"outputTable\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/tables/outputTable\",\r\n \"properties\": {\r\n \"published\": false,\r\n \"location\": {\r\n \"type\": \"CustomLocation\",\r\n \"linkedServiceName\": \"foo2\"\r\n },\r\n \"availability\": {\r\n \"frequency\": \"Hour\",\r\n \"interval\": 1,\r\n \"waitOnExternal\": null\r\n },\r\n \"createTime\": \"2014-11-06T06:08:10.300749Z\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "426" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "6ae6c21b-06eb-485f-8929-7b3cddab771c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799971" + ], + "x-ms-correlation-request-id": [ + "05451dc8-efe2-4588-b46c-2ab402559ca6" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141106T060815Z:05451dc8-efe2-4588-b46c-2ab402559ca6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 06 Nov 2014 06:08:15 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/datapipelines/samplePipeline?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MTQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazgyNjMvZGF0YXBpcGVsaW5lcy9zYW1wbGVQaXBlbGluZT9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"foo\",\r\n \"properties\": {\r\n \"description\": \"Sample Data Pipeline\",\r\n \"activities\": [\r\n {\r\n \"name\": \"CustomActivity\",\r\n \"inputs\": [\r\n {\r\n \"name\": \"inputTable\"\r\n }\r\n ],\r\n \"outputs\": [\r\n {\r\n \"name\": \"outputTable\"\r\n }\r\n ],\r\n \"linkedServiceName\": \"foo2\",\r\n \"type\": \"CustomActivity\",\r\n \"transformation\": {\r\n \"assemblyName\": \"mycode.dll\",\r\n \"entryPoint\": \"myclassname\",\r\n \"packageLinkedService\": \"imagestoreLinkedService\",\r\n \"packageFile\": \"images/assembly.zip\",\r\n \"extendedProperties\": {\r\n \"PropertyBagPropertyName1\": \"PropertyBagValue1\",\r\n \"propertyBagPropertyName2\": \"PropertyBagValue2\"\r\n }\r\n },\r\n \"policy\": {\r\n \"concurrency\": 1,\r\n \"executionPriorityOrder\": \"NewestFirst\",\r\n \"retry\": 2,\r\n \"timeout\": \"01:00:00\"\r\n }\r\n }\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "1152" + ], + "x-ms-client-request-id": [ + "39ef2b78-788a-4283-b812-09dc48e5cd9c" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "23" + ] + }, + "ResponseBody": "{\r\n \"name\": \"samplePipeline\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/datapipelines/samplePipeline\",\r\n \"properties\": {\r\n \"description\": \"Sample Data Pipeline\",\r\n \"activities\": [\r\n {\r\n \"type\": \"CustomActivity\",\r\n \"transformation\": {\r\n \"assemblyName\": \"mycode.dll\",\r\n \"entryPoint\": \"myclassname\",\r\n \"packageLinkedService\": \"imagestoreLinkedService\",\r\n \"packageFile\": \"images/assembly.zip\",\r\n \"extendedProperties\": {\r\n \"PropertyBagPropertyName1\": \"PropertyBagValue1\",\r\n \"propertyBagPropertyName2\": \"PropertyBagValue2\"\r\n }\r\n },\r\n \"inputs\": [\r\n {\r\n \"name\": \"inputTable\"\r\n }\r\n ],\r\n \"outputs\": [\r\n {\r\n \"name\": \"outputTable\"\r\n }\r\n ],\r\n \"policy\": {\r\n \"timeout\": \"01:00:00\",\r\n \"concurrency\": 1,\r\n \"executionPriorityOrder\": \"NewestFirst\",\r\n \"retry\": 2\r\n },\r\n \"name\": \"CustomActivity\",\r\n \"linkedServiceName\": \"foo2\"\r\n }\r\n ],\r\n \"isPaused\": false,\r\n \"runtimeInfo\": {\r\n \"deploymentTime\": \"2014-11-06T06:08:15.9959498Z\",\r\n \"activityPeriods\": {\r\n \"customActivity\": {\r\n \"start\": \"1601-01-01T00:00:00Z\",\r\n \"end\": \"1601-01-01T00:00:00Z\"\r\n }\r\n }\r\n },\r\n \"provisioningState\": \"PendingCreation\",\r\n \"hubName\": \"onesdk8263_hub\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1026" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "0456554b-328c-4639-ad4d-bd5ed7a1f88a" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11985" + ], + "x-ms-correlation-request-id": [ + "1da5522e-1f6b-4ecb-99e0-14f24c562ea2" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141106T060815Z:1da5522e-1f6b-4ecb-99e0-14f24c562ea2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 06 Nov 2014 06:08:15 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/datapipelines/samplePipeline?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/datapipelines/samplePipeline?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MTQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazgyNjMvZGF0YXBpcGVsaW5lcy9zYW1wbGVQaXBlbGluZT9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b4897b79-fada-4cee-84a3-f8dfffeede21" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "23" + ] + }, + "ResponseBody": "{\r\n \"name\": \"samplePipeline\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/datapipelines/samplePipeline\",\r\n \"properties\": {\r\n \"description\": \"Sample Data Pipeline\",\r\n \"activities\": [\r\n {\r\n \"type\": \"CustomActivity\",\r\n \"transformation\": {\r\n \"assemblyName\": \"mycode.dll\",\r\n \"entryPoint\": \"myclassname\",\r\n \"packageLinkedService\": \"imagestoreLinkedService\",\r\n \"packageFile\": \"images/assembly.zip\",\r\n \"extendedProperties\": {\r\n \"PropertyBagPropertyName1\": \"PropertyBagValue1\",\r\n \"propertyBagPropertyName2\": \"PropertyBagValue2\"\r\n }\r\n },\r\n \"inputs\": [\r\n {\r\n \"name\": \"inputTable\"\r\n }\r\n ],\r\n \"outputs\": [\r\n {\r\n \"name\": \"outputTable\"\r\n }\r\n ],\r\n \"policy\": {\r\n \"timeout\": \"01:00:00\",\r\n \"concurrency\": 1,\r\n \"executionPriorityOrder\": \"NewestFirst\",\r\n \"retry\": 2\r\n },\r\n \"name\": \"CustomActivity\",\r\n \"linkedServiceName\": \"foo2\"\r\n }\r\n ],\r\n \"isPaused\": false,\r\n \"runtimeInfo\": {\r\n \"deploymentTime\": \"2014-11-06T06:08:15.9959498Z\",\r\n \"activityPeriods\": {\r\n \"customActivity\": {\r\n \"start\": \"1601-01-01T00:00:00Z\",\r\n \"end\": \"1601-01-01T00:00:00Z\"\r\n }\r\n }\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"errorMessage\": \"Parameter not specified: assetName\",\r\n \"hubName\": \"onesdk8263_hub\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1069" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "b66b9bd1-fc1f-4227-8a09-91dcc03c50f5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799970" + ], + "x-ms-correlation-request-id": [ + "1f25e6a4-0324-4c47-833c-3aa93d8d7b1a" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141106T060816Z:1f25e6a4-0324-4c47-833c-3aa93d8d7b1a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 06 Nov 2014 06:08:15 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/datapipelines/samplePipeline?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MTQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazgyNjMvZGF0YXBpcGVsaW5lcy9zYW1wbGVQaXBlbGluZT9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "30fe2c22-b70d-4c74-a67a-972d982e7a07" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"samplePipeline\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/datapipelines/samplePipeline\",\r\n \"properties\": {\r\n \"description\": \"Sample Data Pipeline\",\r\n \"activities\": [\r\n {\r\n \"type\": \"CustomActivity\",\r\n \"transformation\": {\r\n \"assemblyName\": \"mycode.dll\",\r\n \"entryPoint\": \"myclassname\",\r\n \"packageLinkedService\": \"imagestoreLinkedService\",\r\n \"packageFile\": \"images/assembly.zip\",\r\n \"extendedProperties\": {\r\n \"PropertyBagPropertyName1\": \"PropertyBagValue1\",\r\n \"propertyBagPropertyName2\": \"PropertyBagValue2\"\r\n }\r\n },\r\n \"inputs\": [\r\n {\r\n \"name\": \"inputTable\"\r\n }\r\n ],\r\n \"outputs\": [\r\n {\r\n \"name\": \"outputTable\"\r\n }\r\n ],\r\n \"policy\": {\r\n \"timeout\": \"01:00:00\",\r\n \"concurrency\": 1,\r\n \"executionPriorityOrder\": \"NewestFirst\",\r\n \"retry\": 2\r\n },\r\n \"name\": \"CustomActivity\",\r\n \"linkedServiceName\": \"foo2\"\r\n }\r\n ],\r\n \"isPaused\": false,\r\n \"runtimeInfo\": {\r\n \"deploymentTime\": \"2014-11-06T06:08:15.9959498Z\",\r\n \"activityPeriods\": {\r\n \"customActivity\": {\r\n \"start\": \"1601-01-01T00:00:00Z\",\r\n \"end\": \"1601-01-01T00:00:00Z\"\r\n }\r\n }\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"errorMessage\": \"Parameter not specified: assetName\",\r\n \"hubName\": \"onesdk8263_hub\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1069" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "b5a739ed-3633-43a8-ac8a-9f60159f1e26" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799969" + ], + "x-ms-correlation-request-id": [ + "a03de0ee-6f53-4056-8074-365dda1e8aa3" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141106T060816Z:a03de0ee-6f53-4056-8074-365dda1e8aa3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 06 Nov 2014 06:08:16 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/datapipelines/samplePipeline?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MTQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazgyNjMvZGF0YXBpcGVsaW5lcy9zYW1wbGVQaXBlbGluZT9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a758a6e2-9069-4c5c-975a-bf3e36985cfd" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"samplePipeline\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/datapipelines/samplePipeline\",\r\n \"properties\": {\r\n \"description\": \"Sample Data Pipeline\",\r\n \"activities\": [\r\n {\r\n \"type\": \"CustomActivity\",\r\n \"transformation\": {\r\n \"assemblyName\": \"mycode.dll\",\r\n \"entryPoint\": \"myclassname\",\r\n \"packageLinkedService\": \"imagestoreLinkedService\",\r\n \"packageFile\": \"images/assembly.zip\",\r\n \"extendedProperties\": {\r\n \"PropertyBagPropertyName1\": \"PropertyBagValue1\",\r\n \"propertyBagPropertyName2\": \"PropertyBagValue2\"\r\n }\r\n },\r\n \"inputs\": [\r\n {\r\n \"name\": \"inputTable\"\r\n }\r\n ],\r\n \"outputs\": [\r\n {\r\n \"name\": \"outputTable\"\r\n }\r\n ],\r\n \"policy\": {\r\n \"timeout\": \"01:00:00\",\r\n \"concurrency\": 1,\r\n \"executionPriorityOrder\": \"NewestFirst\",\r\n \"retry\": 2\r\n },\r\n \"name\": \"CustomActivity\",\r\n \"linkedServiceName\": \"foo2\"\r\n }\r\n ],\r\n \"isPaused\": false,\r\n \"runtimeInfo\": {\r\n \"deploymentTime\": \"2014-11-06T06:08:15.9959498Z\",\r\n \"activityPeriods\": {\r\n \"customActivity\": {\r\n \"start\": \"1601-01-01T00:00:00Z\",\r\n \"end\": \"1601-01-01T00:00:00Z\"\r\n }\r\n }\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"errorMessage\": \"Parameter not specified: assetName\",\r\n \"hubName\": \"onesdk8263_hub\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1069" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "c87c4a37-9341-4338-97f5-fc6141a49466" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799967" + ], + "x-ms-correlation-request-id": [ + "3d8f7b76-84e0-45f4-a7d8-ad9052d4f0ff" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141106T060817Z:3d8f7b76-84e0-45f4-a7d8-ad9052d4f0ff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 06 Nov 2014 06:08:16 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/datapipelines/samplePipeline?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MTQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazgyNjMvZGF0YXBpcGVsaW5lcy9zYW1wbGVQaXBlbGluZT9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "33298f88-f8a9-4b45-8843-246e1937cab9" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"samplePipeline\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/datapipelines/samplePipeline\",\r\n \"properties\": {\r\n \"description\": \"Sample Data Pipeline\",\r\n \"activities\": [\r\n {\r\n \"type\": \"CustomActivity\",\r\n \"transformation\": {\r\n \"assemblyName\": \"mycode.dll\",\r\n \"entryPoint\": \"myclassname\",\r\n \"packageLinkedService\": \"imagestoreLinkedService\",\r\n \"packageFile\": \"images/assembly.zip\",\r\n \"extendedProperties\": {\r\n \"PropertyBagPropertyName1\": \"PropertyBagValue1\",\r\n \"propertyBagPropertyName2\": \"PropertyBagValue2\"\r\n }\r\n },\r\n \"inputs\": [\r\n {\r\n \"name\": \"inputTable\"\r\n }\r\n ],\r\n \"outputs\": [\r\n {\r\n \"name\": \"outputTable\"\r\n }\r\n ],\r\n \"policy\": {\r\n \"timeout\": \"01:00:00\",\r\n \"concurrency\": 1,\r\n \"executionPriorityOrder\": \"NewestFirst\",\r\n \"retry\": 2\r\n },\r\n \"name\": \"CustomActivity\",\r\n \"linkedServiceName\": \"foo2\"\r\n }\r\n ],\r\n \"isPaused\": false,\r\n \"runtimeInfo\": {\r\n \"deploymentTime\": \"2014-11-06T06:08:15.9959498Z\",\r\n \"activityPeriods\": {\r\n \"customActivity\": {\r\n \"start\": \"1601-01-01T00:00:00Z\",\r\n \"end\": \"1601-01-01T00:00:00Z\"\r\n }\r\n }\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"errorMessage\": \"Parameter not specified: assetName\",\r\n \"hubName\": \"onesdk8263_hub\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1069" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "95d4c6e0-a2fe-4e72-b5d5-b995f9e70cb6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799966" + ], + "x-ms-correlation-request-id": [ + "845217a1-c049-46cd-850b-6721293da2db" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141106T060817Z:845217a1-c049-46cd-850b-6721293da2db" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 06 Nov 2014 06:08:17 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/datapipelines/samplePipeline?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MTQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazgyNjMvZGF0YXBpcGVsaW5lcy9zYW1wbGVQaXBlbGluZT9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "06d6bdb1-0eb0-4225-a037-350dd64bde7a" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"message\": \"Pipeline samplePipeline not found.\",\r\n \"code\": \"PipelineNotFound\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "74" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "4153e07a-138f-49d4-a194-41432b07b712" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799964" + ], + "x-ms-correlation-request-id": [ + "6c1b2d5e-38b1-49f8-8789-2a4e4166bc2f" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141106T060817Z:6c1b2d5e-38b1-49f8-8789-2a4e4166bc2f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 06 Nov 2014 06:08:17 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/datapipelines/foo?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MTQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazgyNjMvZGF0YXBpcGVsaW5lcy9mb28/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"foo\",\r\n \"properties\": {\r\n \"description\": \"Sample Data Pipeline\",\r\n \"activities\": [\r\n {\r\n \"name\": \"CustomActivity\",\r\n \"inputs\": [\r\n {\r\n \"name\": \"inputTable\"\r\n }\r\n ],\r\n \"outputs\": [\r\n {\r\n \"name\": \"outputTable\"\r\n }\r\n ],\r\n \"linkedServiceName\": \"foo2\",\r\n \"type\": \"CustomActivity\",\r\n \"transformation\": {\r\n \"assemblyName\": \"mycode.dll\",\r\n \"entryPoint\": \"myclassname\",\r\n \"packageLinkedService\": \"imagestoreLinkedService\",\r\n \"packageFile\": \"images/assembly.zip\",\r\n \"extendedProperties\": {\r\n \"PropertyBagPropertyName1\": \"PropertyBagValue1\",\r\n \"propertyBagPropertyName2\": \"PropertyBagValue2\"\r\n }\r\n },\r\n \"policy\": {\r\n \"concurrency\": 1,\r\n \"executionPriorityOrder\": \"NewestFirst\",\r\n \"retry\": 2,\r\n \"timeout\": \"01:00:00\"\r\n }\r\n }\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "1152" + ], + "x-ms-client-request-id": [ + "b564c1fe-b0d4-4141-84f9-e1c193a32168" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "27" + ] + }, + "ResponseBody": "{\r\n \"name\": \"foo\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/datapipelines/foo\",\r\n \"properties\": {\r\n \"description\": \"Sample Data Pipeline\",\r\n \"activities\": [\r\n {\r\n \"type\": \"CustomActivity\",\r\n \"transformation\": {\r\n \"assemblyName\": \"mycode.dll\",\r\n \"entryPoint\": \"myclassname\",\r\n \"packageLinkedService\": \"imagestoreLinkedService\",\r\n \"packageFile\": \"images/assembly.zip\",\r\n \"extendedProperties\": {\r\n \"PropertyBagPropertyName1\": \"PropertyBagValue1\",\r\n \"propertyBagPropertyName2\": \"PropertyBagValue2\"\r\n }\r\n },\r\n \"inputs\": [\r\n {\r\n \"name\": \"inputTable\"\r\n }\r\n ],\r\n \"outputs\": [\r\n {\r\n \"name\": \"outputTable\"\r\n }\r\n ],\r\n \"policy\": {\r\n \"timeout\": \"01:00:00\",\r\n \"concurrency\": 1,\r\n \"executionPriorityOrder\": \"NewestFirst\",\r\n \"retry\": 2\r\n },\r\n \"name\": \"CustomActivity\",\r\n \"linkedServiceName\": \"foo2\"\r\n }\r\n ],\r\n \"isPaused\": false,\r\n \"runtimeInfo\": {\r\n \"deploymentTime\": \"2014-11-06T06:08:16.7934068Z\",\r\n \"activityPeriods\": {\r\n \"customActivity\": {\r\n \"start\": \"1601-01-01T00:00:00Z\",\r\n \"end\": \"1601-01-01T00:00:00Z\"\r\n }\r\n }\r\n },\r\n \"provisioningState\": \"PendingCreation\",\r\n \"hubName\": \"onesdk8263_hub\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1004" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "8ccf16c6-3ccc-42c5-8fc4-928351745b9b" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11984" + ], + "x-ms-correlation-request-id": [ + "7adcce32-92c5-4928-a58e-5639e2b37e23" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141106T060816Z:7adcce32-92c5-4928-a58e-5639e2b37e23" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 06 Nov 2014 06:08:16 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/datapipelines/foo?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/datapipelines/foo?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MTQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazgyNjMvZGF0YXBpcGVsaW5lcy9mb28/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "21ce6273-2c0b-402d-a19b-dadabe75aca5" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "27" + ] + }, + "ResponseBody": "{\r\n \"name\": \"foo\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/datapipelines/foo\",\r\n \"properties\": {\r\n \"description\": \"Sample Data Pipeline\",\r\n \"activities\": [\r\n {\r\n \"type\": \"CustomActivity\",\r\n \"transformation\": {\r\n \"assemblyName\": \"mycode.dll\",\r\n \"entryPoint\": \"myclassname\",\r\n \"packageLinkedService\": \"imagestoreLinkedService\",\r\n \"packageFile\": \"images/assembly.zip\",\r\n \"extendedProperties\": {\r\n \"PropertyBagPropertyName1\": \"PropertyBagValue1\",\r\n \"propertyBagPropertyName2\": \"PropertyBagValue2\"\r\n }\r\n },\r\n \"inputs\": [\r\n {\r\n \"name\": \"inputTable\"\r\n }\r\n ],\r\n \"outputs\": [\r\n {\r\n \"name\": \"outputTable\"\r\n }\r\n ],\r\n \"policy\": {\r\n \"timeout\": \"01:00:00\",\r\n \"concurrency\": 1,\r\n \"executionPriorityOrder\": \"NewestFirst\",\r\n \"retry\": 2\r\n },\r\n \"name\": \"CustomActivity\",\r\n \"linkedServiceName\": \"foo2\"\r\n }\r\n ],\r\n \"isPaused\": false,\r\n \"runtimeInfo\": {\r\n \"deploymentTime\": \"2014-11-06T06:08:16.7934068Z\",\r\n \"activityPeriods\": {\r\n \"customActivity\": {\r\n \"start\": \"1601-01-01T00:00:00Z\",\r\n \"end\": \"1601-01-01T00:00:00Z\"\r\n }\r\n }\r\n },\r\n \"provisioningState\": \"Failed\",\r\n \"errorMessage\": \"Parameter not specified: assetName\",\r\n \"hubName\": \"onesdk8263_hub\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1047" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "73f05993-7e88-4c0d-94cf-0d8c9aeb3454" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799968" + ], + "x-ms-correlation-request-id": [ + "a6252403-be73-4b7f-bd29-2471f039d559" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141106T060816Z:a6252403-be73-4b7f-bd29-2471f039d559" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 06 Nov 2014 06:08:16 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/datapipelines/samplePipeline?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MTQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazgyNjMvZGF0YXBpcGVsaW5lcy9zYW1wbGVQaXBlbGluZT9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "92c85d47-bc94-42a9-bbbc-ae1b53b3ce7e" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "32" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-request-id": [ + "9961c2ed-c27a-439b-bcb8-2b3b25418a2f" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11983" + ], + "x-ms-correlation-request-id": [ + "26817e70-96ea-4c75-a7a5-e55a79e9501b" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141106T060817Z:26817e70-96ea-4c75-a7a5-e55a79e9501b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 06 Nov 2014 06:08:17 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/datapipelines/samplePipeline/operationresults/7dc450ba2d9545f581e04b809c847f40?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/datapipelines/samplePipeline?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MTQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazgyNjMvZGF0YXBpcGVsaW5lcy9zYW1wbGVQaXBlbGluZT9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "feb2e8f9-d4c9-46b0-a2a9-5b57e2b9d739" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "36" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "ee187c3c-9fdf-418e-95c4-3c8bae27da6e" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11982" + ], + "x-ms-correlation-request-id": [ + "e58f9308-c351-4f34-98e0-b7a7dbfd5764" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141106T060817Z:e58f9308-c351-4f34-98e0-b7a7dbfd5764" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 06 Nov 2014 06:08:17 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/datapipelines/samplePipeline?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MTQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazgyNjMvZGF0YXBpcGVsaW5lcy9zYW1wbGVQaXBlbGluZT9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6b66ba57-deb5-4930-86ae-debe3b05c80b" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "38" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "e4d1d77c-6973-445a-81c3-fdd572f01a76" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11981" + ], + "x-ms-correlation-request-id": [ + "a15062f9-a8db-49f7-ac71-e54a9d596af3" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141106T060818Z:a15062f9-a8db-49f7-ac71-e54a9d596af3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 06 Nov 2014 06:08:18 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263/datapipelines/samplePipeline/operationresults/7dc450ba2d9545f581e04b809c847f40?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MTQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazgyNjMvZGF0YXBpcGVsaW5lcy9zYW1wbGVQaXBlbGluZS9vcGVyYXRpb25yZXN1bHRzLzdkYzQ1MGJhMmQ5NTQ1ZjU4MWUwNGI4MDljODQ3ZjQwP2FwaS12ZXJzaW9uPTIwMTQtMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "32" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "864666a9-1919-4924-bb37-ab15d933b9ec" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799965" + ], + "x-ms-correlation-request-id": [ + "6d026cf7-29bf-46f6-903d-ba3c4a2ae837" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141106T060817Z:6d026cf7-29bf-46f6-903d-ba3c4a2ae837" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 06 Nov 2014 06:08:17 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3514/providers/Microsoft.DataFactory/datafactories/onesdk8263?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MTQvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazgyNjM/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0996efa2-5a07-4795-b760-2915cf7c9ecc" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "85db2a8b-d051-4f60-8962-282350322e76" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11980" + ], + "x-ms-correlation-request-id": [ + "446c97f2-a726-4f2a-b4f4-6876bcdbb1d3" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141106T060818Z:446c97f2-a726-4f2a-b4f4-6876bcdbb1d3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 06 Nov 2014 06:08:18 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-Pipeline": [ + "onesdk8263", + "onesdk3514" + ] + }, + "Variables": { + "SubscriptionId": "8d88dc98-ab0c-4b80-825b-123b2cf8443c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.TableTests/TestGetTableWithEmptyName.json b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.TableTests/TestGetTableWithEmptyName.json new file mode 100644 index 000000000000..b8a67f910fc6 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.TableTests/TestGetTableWithEmptyName.json @@ -0,0 +1,568 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799835" + ], + "x-ms-request-id": [ + "e26cb1f1-62d0-423a-b129-d4a9ac6428c1" + ], + "x-ms-correlation-request-id": [ + "e26cb1f1-62d0-423a-b129-d4a9ac6428c1" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020258Z:e26cb1f1-62d0-423a-b129-d4a9ac6428c1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:02:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799834" + ], + "x-ms-request-id": [ + "9d48f4f4-50f1-4b11-8d24-4dbd1a7ee3b9" + ], + "x-ms-correlation-request-id": [ + "9d48f4f4-50f1-4b11-8d24-4dbd1a7ee3b9" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020259Z:9d48f4f4-50f1-4b11-8d24-4dbd1a7ee3b9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:02:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk8210?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazgyMTA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "102" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799833" + ], + "x-ms-request-id": [ + "a45fd504-bc34-4c8b-aba7-9a21a3cef014" + ], + "x-ms-correlation-request-id": [ + "a45fd504-bc34-4c8b-aba7-9a21a3cef014" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020259Z:a45fd504-bc34-4c8b-aba7-9a21a3cef014" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:02:58 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk8210?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazgyMTA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk8210\",\r\n \"name\": \"onesdk8210\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "183" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11919" + ], + "x-ms-request-id": [ + "d24f0c1a-97bf-489e-8d6d-7bc88d6d23b2" + ], + "x-ms-correlation-request-id": [ + "d24f0c1a-97bf-489e-8d6d-7bc88d6d23b2" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020259Z:d24f0c1a-97bf-489e-8d6d-7bc88d6d23b2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:02:59 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk8210/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlR3JvdXBzL29uZXNkazgyMTAvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799832" + ], + "x-ms-request-id": [ + "b2e925a6-21df-4909-9bdb-347f6c2f7cab" + ], + "x-ms-correlation-request-id": [ + "b2e925a6-21df-4909-9bdb-347f6c2f7cab" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020259Z:b2e925a6-21df-4909-9bdb-347f6c2f7cab" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:02:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk8210/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazgyMTAvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "centralus:bda1ee6d-7574-4c2a-84a3-e0c411397db9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799867" + ], + "x-ms-correlation-request-id": [ + "d7c67148-aa33-44c3-97e5-265b30df4d76" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020300Z:d7c67148-aa33-44c3-97e5-265b30df4d76" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:02:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk8210/providers/Microsoft.DataFactory/datafactories/onesdk2731?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazgyMTAvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazI3MzE/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"onesdk2731\",\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "69" + ], + "x-ms-client-request-id": [ + "a202e323-6ebc-4b22-ab62-c16cf2f87dba" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "320" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk2731\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk8210/providers/Microsoft.DataFactory/datafactories/onesdk2731\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"2122c3b1-c477-4589-9456-7f491c4f5cbb\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "e65b62fd-ec99-4614-a729-f2d13454fcb8" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11918" + ], + "x-ms-correlation-request-id": [ + "409a3065-7edb-4952-b901-cd4e447c1915" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020300Z:409a3065-7edb-4952-b901-cd4e447c1915" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:03:00 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk8210/providers/Microsoft.DataFactory/datafactories/onesdk2731?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk8210/providers/Microsoft.DataFactory/datafactories/onesdk2731?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazgyMTAvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazI3MzE/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0f20f568-b4b2-4d38-a0f3-3bf7e46dbd16" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "320" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk2731\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk8210/providers/Microsoft.DataFactory/datafactories/onesdk2731\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"2122c3b1-c477-4589-9456-7f491c4f5cbb\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "06e290ad-68eb-485d-91f7-934004fc8739" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799831" + ], + "x-ms-correlation-request-id": [ + "2fd142d4-49f7-400e-b508-f3218d833147" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020301Z:2fd142d4-49f7-400e-b508-f3218d833147" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:03:00 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk8210/providers/Microsoft.DataFactory/datafactories/onesdk2731?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazgyMTAvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazI3MzE/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c7bf18b3-4e6f-486f-9dd9-a861b6620077" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "320" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk2731\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk8210/providers/Microsoft.DataFactory/datafactories/onesdk2731\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"2122c3b1-c477-4589-9456-7f491c4f5cbb\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "5f024e8a-3cc0-470f-acb0-399d3c11cc8d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799830" + ], + "x-ms-correlation-request-id": [ + "310dc4c8-e7c0-434e-956a-eb0ef1b6aee2" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020306Z:310dc4c8-e7c0-434e-956a-eb0ef1b6aee2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:03:05 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk8210/providers/Microsoft.DataFactory/datafactories/onesdk2731?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazgyMTAvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazI3MzE/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0bcf2adc-b864-489d-a9e1-87d51d302d2b" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "320" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk2731\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk8210/providers/Microsoft.DataFactory/datafactories/onesdk2731\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"2122c3b1-c477-4589-9456-7f491c4f5cbb\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"Succeeded\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "472" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "c2c1b879-eac7-472a-8acd-adb7113672c5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799829" + ], + "x-ms-correlation-request-id": [ + "37477733-ade6-4bb2-8c38-0ea0d3194ce9" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020311Z:37477733-ade6-4bb2-8c38-0ea0d3194ce9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:03:11 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-GetTableWithEmptyName": [ + "onesdk2731", + "onesdk8210" + ] + }, + "Variables": { + "SubscriptionId": "8d88dc98-ab0c-4b80-825b-123b2cf8443c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.TableTests/TestGetTableWithWhiteSpaceName.json b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.TableTests/TestGetTableWithWhiteSpaceName.json new file mode 100644 index 000000000000..a5faf4ada6e3 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.TableTests/TestGetTableWithWhiteSpaceName.json @@ -0,0 +1,505 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799866" + ], + "x-ms-request-id": [ + "0526785d-9be7-4f20-ae4b-9f9fd80c2838" + ], + "x-ms-correlation-request-id": [ + "0526785d-9be7-4f20-ae4b-9f9fd80c2838" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015935Z:0526785d-9be7-4f20-ae4b-9f9fd80c2838" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:59:34 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799865" + ], + "x-ms-request-id": [ + "d741ff06-92f1-49f4-809e-2bfcc2f46328" + ], + "x-ms-correlation-request-id": [ + "d741ff06-92f1-49f4-809e-2bfcc2f46328" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015935Z:d741ff06-92f1-49f4-809e-2bfcc2f46328" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:59:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk444?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazQ0ND9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "101" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799864" + ], + "x-ms-request-id": [ + "8ffefa0a-82ff-4717-8be2-b47a5fbec8be" + ], + "x-ms-correlation-request-id": [ + "8ffefa0a-82ff-4717-8be2-b47a5fbec8be" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015935Z:8ffefa0a-82ff-4717-8be2-b47a5fbec8be" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:59:35 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk444?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazQ0ND9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk444\",\r\n \"name\": \"onesdk444\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "181" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11933" + ], + "x-ms-request-id": [ + "0daf7ac5-c0ab-4089-8a74-5379fa3b8c59" + ], + "x-ms-correlation-request-id": [ + "0daf7ac5-c0ab-4089-8a74-5379fa3b8c59" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015936Z:0daf7ac5-c0ab-4089-8a74-5379fa3b8c59" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:59:35 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk444/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlR3JvdXBzL29uZXNkazQ0NC9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799863" + ], + "x-ms-request-id": [ + "9559c7bf-c673-4329-bcf7-03d6cef79e4c" + ], + "x-ms-correlation-request-id": [ + "9559c7bf-c673-4329-bcf7-03d6cef79e4c" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015936Z:9559c7bf-c673-4329-bcf7-03d6cef79e4c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:59:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk444/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazQ0NC9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "centralus:bc350613-15e5-43ca-82d7-a58fb08171bd" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799858" + ], + "x-ms-correlation-request-id": [ + "ad95a35f-706d-413e-959d-66ea890f1576" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015936Z:ad95a35f-706d-413e-959d-66ea890f1576" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:59:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk444/providers/Microsoft.DataFactory/datafactories/onesdk2992?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazQ0NC9wcm92aWRlcnMvTWljcm9zb2Z0LkRhdGFGYWN0b3J5L2RhdGFmYWN0b3JpZXMvb25lc2RrMjk5Mj9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"onesdk2992\",\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "69" + ], + "x-ms-client-request-id": [ + "b02a7f7b-c1c6-4667-abdc-e0cf958d2de1" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "254" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk2992\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk444/providers/Microsoft.DataFactory/datafactories/onesdk2992\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"f1528542-1f44-4787-aec5-00524ff8fc3f\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "477" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "8f8a3b64-9d88-432c-b026-f499210246aa" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11932" + ], + "x-ms-correlation-request-id": [ + "62ead543-43b9-444e-a2ce-0d77f672ca97" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015937Z:62ead543-43b9-444e-a2ce-0d77f672ca97" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:59:37 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk444/providers/Microsoft.DataFactory/datafactories/onesdk2992?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk444/providers/Microsoft.DataFactory/datafactories/onesdk2992?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazQ0NC9wcm92aWRlcnMvTWljcm9zb2Z0LkRhdGFGYWN0b3J5L2RhdGFmYWN0b3JpZXMvb25lc2RrMjk5Mj9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b96ae561-ab21-41e7-8ea9-3bd3710dedba" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "254" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk2992\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk444/providers/Microsoft.DataFactory/datafactories/onesdk2992\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"f1528542-1f44-4787-aec5-00524ff8fc3f\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "477" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "859b24dc-75e4-43cb-9584-f6732e9ec84a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799862" + ], + "x-ms-correlation-request-id": [ + "36be1711-bcb8-48ec-a5b7-d5205edbe57f" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015937Z:36be1711-bcb8-48ec-a5b7-d5205edbe57f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:59:37 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk444/providers/Microsoft.DataFactory/datafactories/onesdk2992?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazQ0NC9wcm92aWRlcnMvTWljcm9zb2Z0LkRhdGFGYWN0b3J5L2RhdGFmYWN0b3JpZXMvb25lc2RrMjk5Mj9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "757fdc76-785d-474c-b590-8f0747a986a1" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "254" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk2992\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk444/providers/Microsoft.DataFactory/datafactories/onesdk2992\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"f1528542-1f44-4787-aec5-00524ff8fc3f\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"Succeeded\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "471" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "ae5448fe-b54e-4082-8adb-0db5aa693c1a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799861" + ], + "x-ms-correlation-request-id": [ + "c21277fb-bc0a-4cf7-85a9-8c9ead975d95" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T015942Z:c21277fb-bc0a-4cf7-85a9-8c9ead975d95" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 01:59:43 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-GetTableWithWhiteSpaceName": [ + "onesdk2992", + "onesdk444" + ] + }, + "Variables": { + "SubscriptionId": "8d88dc98-ab0c-4b80-825b-123b2cf8443c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.TableTests/TestTable.json b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.TableTests/TestTable.json new file mode 100644 index 000000000000..6c95b418b026 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.TableTests/TestTable.json @@ -0,0 +1,1186 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799872" + ], + "x-ms-request-id": [ + "445d2b6b-b2de-40fc-8fac-d32b5e84aa5d" + ], + "x-ms-correlation-request-id": [ + "445d2b6b-b2de-40fc-8fac-d32b5e84aa5d" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020142Z:445d2b6b-b2de-40fc-8fac-d32b5e84aa5d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:01:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799871" + ], + "x-ms-request-id": [ + "09e63204-f00d-4ef8-977e-659dc83da930" + ], + "x-ms-correlation-request-id": [ + "09e63204-f00d-4ef8-977e-659dc83da930" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020142Z:09e63204-f00d-4ef8-977e-659dc83da930" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:01:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3526?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MjY/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "102" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799870" + ], + "x-ms-request-id": [ + "7a0d748a-dbde-4b1c-91f1-8422c15df769" + ], + "x-ms-correlation-request-id": [ + "7a0d748a-dbde-4b1c-91f1-8422c15df769" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020142Z:7a0d748a-dbde-4b1c-91f1-8422c15df769" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:01:42 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3526?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MjY/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk3526\",\r\n \"name\": \"onesdk3526\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "183" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11933" + ], + "x-ms-request-id": [ + "c9079263-7b84-44a6-8dcc-067793afeebf" + ], + "x-ms-correlation-request-id": [ + "c9079263-7b84-44a6-8dcc-067793afeebf" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020143Z:c9079263-7b84-44a6-8dcc-067793afeebf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:01:43 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk3526/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlR3JvdXBzL29uZXNkazM1MjYvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799869" + ], + "x-ms-request-id": [ + "cc5ec379-6423-4d57-85c6-009b32119264" + ], + "x-ms-correlation-request-id": [ + "cc5ec379-6423-4d57-85c6-009b32119264" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020144Z:cc5ec379-6423-4d57-85c6-009b32119264" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:01:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3526/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "centralus:9607fd11-d0e9-4785-a841-f0bbc9c515a7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799845" + ], + "x-ms-correlation-request-id": [ + "374ad8ce-ed33-4923-aa77-00941b31b986" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020144Z:374ad8ce-ed33-4923-aa77-00941b31b986" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:01:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3526/providers/Microsoft.DataFactory/datafactories/onesdk8716?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazg3MTY/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"onesdk8716\",\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "69" + ], + "x-ms-client-request-id": [ + "31d65387-def9-424d-a214-8022e401a049" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "294" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk8716\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3526/providers/Microsoft.DataFactory/datafactories/onesdk8716\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"53bc85a2-988a-44bc-ba4a-57d27a148c52\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "98185c29-c624-437f-ad4e-57a1edfde522" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11924" + ], + "x-ms-correlation-request-id": [ + "370a5fc5-2382-4c12-b2c3-9993c2cbdaad" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020145Z:370a5fc5-2382-4c12-b2c3-9993c2cbdaad" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:01:44 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3526/providers/Microsoft.DataFactory/datafactories/onesdk8716?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3526/providers/Microsoft.DataFactory/datafactories/onesdk8716?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazg3MTY/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ef0329ef-c25c-4f18-ac0c-0338be37652b" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "294" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk8716\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3526/providers/Microsoft.DataFactory/datafactories/onesdk8716\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"53bc85a2-988a-44bc-ba4a-57d27a148c52\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "544ea3f6-474b-48c7-b747-52f1e6cabd49" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799844" + ], + "x-ms-correlation-request-id": [ + "86dc8abe-8150-4af5-ae4a-5b803a1c0eee" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020145Z:86dc8abe-8150-4af5-ae4a-5b803a1c0eee" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:01:45 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3526/providers/Microsoft.DataFactory/datafactories/onesdk8716?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazg3MTY/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "cde12e88-b3ee-463c-ba28-4912270200c1" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "294" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk8716\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3526/providers/Microsoft.DataFactory/datafactories/onesdk8716\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"53bc85a2-988a-44bc-ba4a-57d27a148c52\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "32722c95-fccb-49ac-8228-273560496614" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799843" + ], + "x-ms-correlation-request-id": [ + "56d0d87b-92ed-40a1-b8d8-96d2e26f5bf9" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020150Z:56d0d87b-92ed-40a1-b8d8-96d2e26f5bf9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:01:50 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3526/providers/Microsoft.DataFactory/datafactories/onesdk8716?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazg3MTY/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2efe0003-001e-4191-a6f8-7ebaf9b7c297" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "294" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk8716\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3526/providers/Microsoft.DataFactory/datafactories/onesdk8716\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"53bc85a2-988a-44bc-ba4a-57d27a148c52\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"Succeeded\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "472" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "f510aad0-5943-4a2f-ad39-fe5cd5760f85" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799842" + ], + "x-ms-correlation-request-id": [ + "4ddf00aa-2eb0-4a5e-8c57-02d92e632b05" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020156Z:4ddf00aa-2eb0-4a5e-8c57-02d92e632b05" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:01:55 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3526/providers/Microsoft.DataFactory/datafactories/onesdk8716/linkedservices/foo2?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazg3MTYvbGlua2Vkc2VydmljZXMvZm9vMj9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"foo2\",\r\n \"properties\": {\r\n \"type\": \"CustomLinkedService\",\r\n \"extendedProperties\": {\r\n \"PropertyBagPropertyName1\": \"PropertyBagPropertyValue1\",\r\n \"propertyBagPropertyName2\": \"PropertyBagPropertyValue2\"\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "278" + ], + "x-ms-client-request-id": [ + "2ede80ca-737a-400f-a3eb-860c3a4612b4" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "299" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3526/providers/Microsoft.DataFactory/datafactories/onesdk8716/linkedservices/foo2\",\r\n \"name\": \"foo2\",\r\n \"properties\": {\r\n \"extendedProperties\": {\r\n \"PropertyBagPropertyName1\": \"PropertyBagPropertyValue1\",\r\n \"propertyBagPropertyName2\": \"PropertyBagPropertyValue2\"\r\n },\r\n \"hubName\": \"onesdk8716_hub\",\r\n \"type\": \"CustomLinkedService\",\r\n \"provisioningState\": \"PendingCreation\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "419" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "cd2aad90-7bd7-4896-a3a4-9df8c3c8c2b0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11923" + ], + "x-ms-correlation-request-id": [ + "d4530112-f944-4a6b-9273-6efcd93726f3" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020157Z:d4530112-f944-4a6b-9273-6efcd93726f3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:01:57 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3526/providers/Microsoft.DataFactory/datafactories/onesdk8716/linkedservices/foo2?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazg3MTYvbGlua2Vkc2VydmljZXMvZm9vMj9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a797018e-c0e1-46d2-a81b-1b8916769e2e" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "299" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3526/providers/Microsoft.DataFactory/datafactories/onesdk8716/linkedservices/foo2\",\r\n \"name\": \"foo2\",\r\n \"properties\": {\r\n \"extendedProperties\": {\r\n \"PropertyBagPropertyName1\": \"PropertyBagPropertyValue1\",\r\n \"propertyBagPropertyName2\": \"PropertyBagPropertyValue2\"\r\n },\r\n \"hubName\": \"onesdk8716_hub\",\r\n \"type\": \"CustomLinkedService\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "413" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "9070cfcc-90ab-44a0-ad7d-a674191c6a9b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799841" + ], + "x-ms-correlation-request-id": [ + "0411f7d1-95ec-43a0-a31a-25fe585c0fe9" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020157Z:0411f7d1-95ec-43a0-a31a-25fe585c0fe9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:01:57 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3526/providers/Microsoft.DataFactory/datafactories/onesdk8716/tables/foo2?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazg3MTYvdGFibGVzL2ZvbzI/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"foo1\",\r\n \"properties\": {\r\n \"location\": {\r\n \"type\": \"CustomLocation\",\r\n \"linkedServiceName\": \"foo2\"\r\n },\r\n \"availability\": {\r\n \"frequency\": \"Hour\",\r\n \"interval\": 1\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "284" + ], + "x-ms-client-request-id": [ + "bdbfba7c-96f0-448b-bf33-34919a9b8ec4" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "302" + ] + }, + "ResponseBody": "{\r\n \"name\": \"foo2\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3526/providers/Microsoft.DataFactory/datafactories/onesdk8716/tables/foo2\",\r\n \"properties\": {\r\n \"published\": false,\r\n \"location\": {\r\n \"type\": \"CustomLocation\",\r\n \"linkedServiceName\": \"foo2\"\r\n },\r\n \"availability\": {\r\n \"frequency\": \"Hour\",\r\n \"interval\": 1,\r\n \"waitOnExternal\": null\r\n },\r\n \"createTime\": \"2014-10-30T02:01:57.886401Z\",\r\n \"provisioningState\": \"PendingCreation\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "418" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "a1fc4508-59ce-4742-b527-b61b0fa01bd0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11922" + ], + "x-ms-correlation-request-id": [ + "dd44f43b-282d-4b28-95fa-b058bb9cdbf3" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020158Z:dd44f43b-282d-4b28-95fa-b058bb9cdbf3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:01:58 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3526/providers/Microsoft.DataFactory/datafactories/onesdk8716/tables/foo2?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3526/providers/Microsoft.DataFactory/datafactories/onesdk8716/tables/foo2?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazg3MTYvdGFibGVzL2ZvbzI/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a76ef0cd-ec80-49c1-9e17-e9dbdbaa42c2" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "302" + ] + }, + "ResponseBody": "{\r\n \"name\": \"foo2\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3526/providers/Microsoft.DataFactory/datafactories/onesdk8716/tables/foo2\",\r\n \"properties\": {\r\n \"published\": false,\r\n \"location\": {\r\n \"type\": \"CustomLocation\",\r\n \"linkedServiceName\": \"foo2\"\r\n },\r\n \"availability\": {\r\n \"frequency\": \"Hour\",\r\n \"interval\": 1,\r\n \"waitOnExternal\": null\r\n },\r\n \"createTime\": \"2014-10-30T02:01:57.886401Z\",\r\n \"provisioningState\": \"PendingCreation\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "418" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "cf7d4e68-4534-4b4d-8025-cc0a98c909c6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799840" + ], + "x-ms-correlation-request-id": [ + "38fc65d9-a957-49dd-b666-9838375592f4" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020158Z:38fc65d9-a957-49dd-b666-9838375592f4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:01:58 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3526/providers/Microsoft.DataFactory/datafactories/onesdk8716/tables/foo2?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazg3MTYvdGFibGVzL2ZvbzI/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0a292f61-2d0d-440f-b1c8-356ff662fa39" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "302" + ] + }, + "ResponseBody": "{\r\n \"name\": \"foo2\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3526/providers/Microsoft.DataFactory/datafactories/onesdk8716/tables/foo2\",\r\n \"properties\": {\r\n \"published\": false,\r\n \"location\": {\r\n \"type\": \"CustomLocation\",\r\n \"linkedServiceName\": \"foo2\"\r\n },\r\n \"availability\": {\r\n \"frequency\": \"Hour\",\r\n \"interval\": 1,\r\n \"waitOnExternal\": null\r\n },\r\n \"createTime\": \"2014-10-30T02:01:57.6741239Z\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "413" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "b6dbe7d6-b8e9-4a9e-9283-b23865187817" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799839" + ], + "x-ms-correlation-request-id": [ + "c338cc83-57c0-466b-9dba-b094c5200964" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020203Z:c338cc83-57c0-466b-9dba-b094c5200964" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:02:02 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3526/providers/Microsoft.DataFactory/datafactories/onesdk8716/tables/foo2?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazg3MTYvdGFibGVzL2ZvbzI/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "dba994f8-c3f6-454f-ba91-950f640250d0" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"foo2\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3526/providers/Microsoft.DataFactory/datafactories/onesdk8716/tables/foo2\",\r\n \"properties\": {\r\n \"published\": false,\r\n \"location\": {\r\n \"type\": \"CustomLocation\",\r\n \"linkedServiceName\": \"foo2\"\r\n },\r\n \"availability\": {\r\n \"frequency\": \"Hour\",\r\n \"interval\": 1,\r\n \"waitOnExternal\": null\r\n },\r\n \"createTime\": \"2014-10-30T02:01:57.6741239Z\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "413" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "93aa9ab4-09b5-495e-8748-868ec7057e7e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799838" + ], + "x-ms-correlation-request-id": [ + "089adc77-f54e-4b36-a1c3-93cf79875610" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020203Z:089adc77-f54e-4b36-a1c3-93cf79875610" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:02:02 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3526/providers/Microsoft.DataFactory/datafactories/onesdk8716/tables/foo2?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazg3MTYvdGFibGVzL2ZvbzI/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "222507f9-bf5e-4840-8656-5e113d3c0b59" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "307" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-request-id": [ + "9601a1fe-bda3-4a70-9dc4-10eddf9ee194" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11921" + ], + "x-ms-correlation-request-id": [ + "b46afa05-fff9-42f5-89f1-757842aef0dc" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020203Z:b46afa05-fff9-42f5-89f1-757842aef0dc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:02:03 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3526/providers/Microsoft.DataFactory/datafactories/onesdk8716/tables/foo2/operationresults/023b14e64fed40f2b40b33ad86496ece?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3526/providers/Microsoft.DataFactory/datafactories/onesdk8716/tables/foo2/operationresults/023b14e64fed40f2b40b33ad86496ece?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazg3MTYvdGFibGVzL2ZvbzIvb3BlcmF0aW9ucmVzdWx0cy8wMjNiMTRlNjRmZWQ0MGYyYjQwYjMzYWQ4NjQ5NmVjZT9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "307" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-request-id": [ + "2641954c-1604-48c7-aaa6-8193cc1e238d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799837" + ], + "x-ms-correlation-request-id": [ + "e32bf437-3314-4c7c-8e70-5fd7f2c8b967" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020203Z:e32bf437-3314-4c7c-8e70-5fd7f2c8b967" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:02:03 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3526/providers/Microsoft.DataFactory/datafactories/onesdk8716/tables/foo2/operationresults/023b14e64fed40f2b40b33ad86496ece?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3526/providers/Microsoft.DataFactory/datafactories/onesdk8716/tables/foo2/operationresults/023b14e64fed40f2b40b33ad86496ece?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazg3MTYvdGFibGVzL2ZvbzIvb3BlcmF0aW9ucmVzdWx0cy8wMjNiMTRlNjRmZWQ0MGYyYjQwYjMzYWQ4NjQ5NmVjZT9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "307" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "b38c42bc-a2c2-43f4-84d4-9472e5a97077" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799836" + ], + "x-ms-correlation-request-id": [ + "68d913ac-3a12-4093-90eb-44f339c7fb4e" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020219Z:68d913ac-3a12-4093-90eb-44f339c7fb4e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:02:18 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk3526/providers/Microsoft.DataFactory/datafactories/onesdk8716?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM1MjYvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazg3MTY/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9964e0d2-3826-4060-b710-bb1243cbaaa5" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "21f297bf-7a85-48d3-b061-e278fce1860b" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11920" + ], + "x-ms-correlation-request-id": [ + "667f8a12-9380-45e8-9ca2-2f34a76d3837" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020219Z:667f8a12-9380-45e8-9ca2-2f34a76d3837" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:02:18 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-Table": [ + "onesdk8716", + "onesdk3526" + ] + }, + "Variables": { + "SubscriptionId": "8d88dc98-ab0c-4b80-825b-123b2cf8443c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.TableTests/TestTablePiping.json b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.TableTests/TestTablePiping.json new file mode 100644 index 000000000000..c3202cb5e15e --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.TableTests/TestTablePiping.json @@ -0,0 +1,1306 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799821" + ], + "x-ms-request-id": [ + "71c3e483-73f1-4939-ad2a-babd0eafe62f" + ], + "x-ms-correlation-request-id": [ + "71c3e483-73f1-4939-ad2a-babd0eafe62f" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021543Z:71c3e483-73f1-4939-ad2a-babd0eafe62f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:15:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799820" + ], + "x-ms-request-id": [ + "dfb9729f-7bcb-433f-8f85-261b49590427" + ], + "x-ms-correlation-request-id": [ + "dfb9729f-7bcb-433f-8f85-261b49590427" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021543Z:dfb9729f-7bcb-433f-8f85-261b49590427" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:15:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1815?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazE4MTU/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "102" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799819" + ], + "x-ms-request-id": [ + "99841b63-93e9-456a-ae92-cad05af1c001" + ], + "x-ms-correlation-request-id": [ + "99841b63-93e9-456a-ae92-cad05af1c001" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021543Z:99841b63-93e9-456a-ae92-cad05af1c001" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:15:43 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1815?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazE4MTU/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk1815\",\r\n \"name\": \"onesdk1815\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "183" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11916" + ], + "x-ms-request-id": [ + "2ca943fc-0100-4529-8456-871b9f8f321e" + ], + "x-ms-correlation-request-id": [ + "2ca943fc-0100-4529-8456-871b9f8f321e" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021544Z:2ca943fc-0100-4529-8456-871b9f8f321e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:15:43 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk1815/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlR3JvdXBzL29uZXNkazE4MTUvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799818" + ], + "x-ms-request-id": [ + "722a730f-546d-40ed-b9ac-e83f04823eb9" + ], + "x-ms-correlation-request-id": [ + "722a730f-546d-40ed-b9ac-e83f04823eb9" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021544Z:722a730f-546d-40ed-b9ac-e83f04823eb9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:15:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1815/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazE4MTUvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "centralus:522094f9-5562-416c-8e21-03a9b26be866" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799841" + ], + "x-ms-correlation-request-id": [ + "83718f8e-97f5-4ba9-92ac-07fd7aa03ff3" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021544Z:83718f8e-97f5-4ba9-92ac-07fd7aa03ff3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:15:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1815/providers/Microsoft.DataFactory/datafactories/onesdk297?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazE4MTUvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazI5Nz9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"onesdk297\",\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "68" + ], + "x-ms-client-request-id": [ + "25ce7514-e69d-4ea7-a742-d4c4ecaace85" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "49" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk297\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1815/providers/Microsoft.DataFactory/datafactories/onesdk297\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"7e33e2e0-32db-496a-ad1b-18a43f5d0d67\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "476" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "aebaf270-92d4-4246-9579-545436d9c8f3" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11915" + ], + "x-ms-correlation-request-id": [ + "3f94d529-17a9-418c-b3d7-c0d9879b64b8" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021546Z:3f94d529-17a9-418c-b3d7-c0d9879b64b8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:15:45 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1815/providers/Microsoft.DataFactory/datafactories/onesdk297?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1815/providers/Microsoft.DataFactory/datafactories/onesdk297?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazE4MTUvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazI5Nz9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "bad9948b-4b79-47cf-8c4e-681ffe2c3d4e" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "49" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk297\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1815/providers/Microsoft.DataFactory/datafactories/onesdk297\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"7e33e2e0-32db-496a-ad1b-18a43f5d0d67\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "476" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "1d614915-3acb-4045-ad25-d5b86bf25202" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799817" + ], + "x-ms-correlation-request-id": [ + "916ad69b-e3b5-44aa-a893-5ef6e1b39398" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021546Z:916ad69b-e3b5-44aa-a893-5ef6e1b39398" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:15:45 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1815/providers/Microsoft.DataFactory/datafactories/onesdk297?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazE4MTUvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazI5Nz9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "384480c7-4dad-41d6-8814-718a25f974a5" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "49" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk297\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1815/providers/Microsoft.DataFactory/datafactories/onesdk297\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"7e33e2e0-32db-496a-ad1b-18a43f5d0d67\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "476" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "f9b20044-31c2-468a-88a4-9388c792093f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799816" + ], + "x-ms-correlation-request-id": [ + "720b89b2-35b7-4965-b3b8-6660a732fd96" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021551Z:720b89b2-35b7-4965-b3b8-6660a732fd96" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:15:50 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1815/providers/Microsoft.DataFactory/datafactories/onesdk297?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazE4MTUvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazI5Nz9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "39d19f8b-f0e4-4132-affb-64e262bd185e" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "49" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk297\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1815/providers/Microsoft.DataFactory/datafactories/onesdk297\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"7e33e2e0-32db-496a-ad1b-18a43f5d0d67\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"Succeeded\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "470" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "72e43c1f-f942-4a38-b96f-f232a1db5c14" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799815" + ], + "x-ms-correlation-request-id": [ + "68519c3f-05e5-4cd7-b608-78373995f4c4" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021556Z:68519c3f-05e5-4cd7-b608-78373995f4c4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:15:56 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1815/providers/Microsoft.DataFactory/datafactories/onesdk297/linkedservices/foo2?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazE4MTUvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazI5Ny9saW5rZWRzZXJ2aWNlcy9mb28yP2FwaS12ZXJzaW9uPTIwMTQtMTAtMDEtcHJldmlldw==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"foo2\",\r\n \"properties\": {\r\n \"type\": \"CustomLinkedService\",\r\n \"extendedProperties\": {\r\n \"PropertyBagPropertyName1\": \"PropertyBagPropertyValue1\",\r\n \"propertyBagPropertyName2\": \"PropertyBagPropertyValue2\"\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "278" + ], + "x-ms-client-request-id": [ + "89151653-d0a9-4af6-b413-7baf251021e9" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "54" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1815/providers/Microsoft.DataFactory/datafactories/onesdk297/linkedservices/foo2\",\r\n \"name\": \"foo2\",\r\n \"properties\": {\r\n \"extendedProperties\": {\r\n \"PropertyBagPropertyName1\": \"PropertyBagPropertyValue1\",\r\n \"propertyBagPropertyName2\": \"PropertyBagPropertyValue2\"\r\n },\r\n \"hubName\": \"onesdk297_hub\",\r\n \"type\": \"CustomLinkedService\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "411" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "c6761569-832c-4b22-bd6c-221e72a23605" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11914" + ], + "x-ms-correlation-request-id": [ + "2da78161-0aba-4b96-82c9-332afbafaa2c" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021557Z:2da78161-0aba-4b96-82c9-332afbafaa2c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:15:56 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1815/providers/Microsoft.DataFactory/datafactories/onesdk297/linkedservices/foo2?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazE4MTUvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazI5Ny9saW5rZWRzZXJ2aWNlcy9mb28yP2FwaS12ZXJzaW9uPTIwMTQtMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0bb818fb-ea9a-4604-97eb-b7c1caeb408d" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "54" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1815/providers/Microsoft.DataFactory/datafactories/onesdk297/linkedservices/foo2\",\r\n \"name\": \"foo2\",\r\n \"properties\": {\r\n \"extendedProperties\": {\r\n \"PropertyBagPropertyName1\": \"PropertyBagPropertyValue1\",\r\n \"propertyBagPropertyName2\": \"PropertyBagPropertyValue2\"\r\n },\r\n \"hubName\": \"onesdk297_hub\",\r\n \"type\": \"CustomLinkedService\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "411" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "4159d94a-e6b7-405d-a577-c5aa43de6edc" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799814" + ], + "x-ms-correlation-request-id": [ + "d602832d-92b9-45cf-85d2-6a93413d2110" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021557Z:d602832d-92b9-45cf-85d2-6a93413d2110" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:15:57 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1815/providers/Microsoft.DataFactory/datafactories/onesdk297/tables/foo2?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazE4MTUvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazI5Ny90YWJsZXMvZm9vMj9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"foo1\",\r\n \"properties\": {\r\n \"location\": {\r\n \"type\": \"CustomLocation\",\r\n \"linkedServiceName\": \"foo2\"\r\n },\r\n \"availability\": {\r\n \"frequency\": \"Hour\",\r\n \"interval\": 1\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "284" + ], + "x-ms-client-request-id": [ + "08dd5368-e142-44c3-a842-e59089c211a3" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "57" + ] + }, + "ResponseBody": "{\r\n \"name\": \"foo2\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1815/providers/Microsoft.DataFactory/datafactories/onesdk297/tables/foo2\",\r\n \"properties\": {\r\n \"published\": false,\r\n \"location\": {\r\n \"type\": \"CustomLocation\",\r\n \"linkedServiceName\": \"foo2\"\r\n },\r\n \"availability\": {\r\n \"frequency\": \"Hour\",\r\n \"interval\": 1,\r\n \"waitOnExternal\": null\r\n },\r\n \"createTime\": \"2014-10-30T02:15:58.4288436Z\",\r\n \"provisioningState\": \"PendingCreation\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "418" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "37ba616d-edc8-4c86-b907-83f982b5f881" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11913" + ], + "x-ms-correlation-request-id": [ + "eb38bfb5-f140-48ab-9882-831b12f21cc6" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021558Z:eb38bfb5-f140-48ab-9882-831b12f21cc6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:15:57 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1815/providers/Microsoft.DataFactory/datafactories/onesdk297/tables/foo2?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1815/providers/Microsoft.DataFactory/datafactories/onesdk297/tables/foo2?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazE4MTUvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazI5Ny90YWJsZXMvZm9vMj9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "89579800-5d36-4ff4-b322-202b0a393403" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "57" + ] + }, + "ResponseBody": "{\r\n \"name\": \"foo2\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1815/providers/Microsoft.DataFactory/datafactories/onesdk297/tables/foo2\",\r\n \"properties\": {\r\n \"published\": false,\r\n \"location\": {\r\n \"type\": \"CustomLocation\",\r\n \"linkedServiceName\": \"foo2\"\r\n },\r\n \"availability\": {\r\n \"frequency\": \"Hour\",\r\n \"interval\": 1,\r\n \"waitOnExternal\": null\r\n },\r\n \"createTime\": \"2014-10-30T02:15:58.4288436Z\",\r\n \"provisioningState\": \"PendingCreation\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "418" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "156572c1-449c-4a4a-ae8b-6566aee37648" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799813" + ], + "x-ms-correlation-request-id": [ + "e5dcaaa6-68da-4049-8fa2-685b79cd867d" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021558Z:e5dcaaa6-68da-4049-8fa2-685b79cd867d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:15:58 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1815/providers/Microsoft.DataFactory/datafactories/onesdk297/tables/foo2?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazE4MTUvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazI5Ny90YWJsZXMvZm9vMj9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "aab262fc-c2fb-4276-b0db-04a4419b6235" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "57" + ] + }, + "ResponseBody": "{\r\n \"name\": \"foo2\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1815/providers/Microsoft.DataFactory/datafactories/onesdk297/tables/foo2\",\r\n \"properties\": {\r\n \"published\": false,\r\n \"location\": {\r\n \"type\": \"CustomLocation\",\r\n \"linkedServiceName\": \"foo2\"\r\n },\r\n \"availability\": {\r\n \"frequency\": \"Hour\",\r\n \"interval\": 1,\r\n \"waitOnExternal\": null\r\n },\r\n \"createTime\": \"2014-10-30T02:15:58.4288436Z\",\r\n \"provisioningState\": \"PendingCreation\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "418" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "57a9fff4-23cd-4bf4-b850-df90339a65f8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799812" + ], + "x-ms-correlation-request-id": [ + "d389a2de-c325-4b23-84b8-b29d870198f4" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021604Z:d389a2de-c325-4b23-84b8-b29d870198f4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:16:03 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1815/providers/Microsoft.DataFactory/datafactories/onesdk297/tables/foo2?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazE4MTUvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazI5Ny90YWJsZXMvZm9vMj9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d247a760-8aee-4b6f-8fa6-0d27faa54adc" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "57" + ] + }, + "ResponseBody": "{\r\n \"name\": \"foo2\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1815/providers/Microsoft.DataFactory/datafactories/onesdk297/tables/foo2\",\r\n \"properties\": {\r\n \"published\": false,\r\n \"location\": {\r\n \"type\": \"CustomLocation\",\r\n \"linkedServiceName\": \"foo2\"\r\n },\r\n \"availability\": {\r\n \"frequency\": \"Hour\",\r\n \"interval\": 1,\r\n \"waitOnExternal\": null\r\n },\r\n \"createTime\": \"2014-10-30T02:15:58.0815852Z\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "412" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "5046d637-f145-4186-808d-2aa3413622f9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799811" + ], + "x-ms-correlation-request-id": [ + "a0a1dba8-191c-409a-aaac-5cbe7fd193a6" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021609Z:a0a1dba8-191c-409a-aaac-5cbe7fd193a6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:16:09 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1815/providers/Microsoft.DataFactory/datafactories/onesdk297/tables/foo2?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazE4MTUvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazI5Ny90YWJsZXMvZm9vMj9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "943f3a7f-7cf5-48a0-a3c1-e56a559596fc" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"foo2\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1815/providers/Microsoft.DataFactory/datafactories/onesdk297/tables/foo2\",\r\n \"properties\": {\r\n \"published\": false,\r\n \"location\": {\r\n \"type\": \"CustomLocation\",\r\n \"linkedServiceName\": \"foo2\"\r\n },\r\n \"availability\": {\r\n \"frequency\": \"Hour\",\r\n \"interval\": 1,\r\n \"waitOnExternal\": null\r\n },\r\n \"createTime\": \"2014-10-30T02:15:58.0815852Z\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "412" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "a61eb0eb-e241-467a-be6e-278c0633a1ab" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799810" + ], + "x-ms-correlation-request-id": [ + "ad294380-872a-43e7-8408-b27fa23730e3" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021609Z:ad294380-872a-43e7-8408-b27fa23730e3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:16:09 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1815/providers/Microsoft.DataFactory/datafactories/onesdk297/tables/foo2?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazE4MTUvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazI5Ny90YWJsZXMvZm9vMj9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b0621099-40d5-4d66-b34f-68b82abf73a7" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"message\": \"Table foo2 not found.\",\r\n \"code\": \"TableNotFound\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "58" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "b9632a6e-3bfc-4683-8fef-5493284db8b5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799807" + ], + "x-ms-correlation-request-id": [ + "f46aabcf-1611-4d4f-9162-8b7ceae1140c" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021625Z:f46aabcf-1611-4d4f-9162-8b7ceae1140c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:16:24 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1815/providers/Microsoft.DataFactory/datafactories/onesdk297/tables/foo2?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazE4MTUvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazI5Ny90YWJsZXMvZm9vMj9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "316092ff-8af3-4c26-90ac-e0d57ba86eb7" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "63" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-request-id": [ + "85f4f53c-5ecc-4b19-9533-29753379202c" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11912" + ], + "x-ms-correlation-request-id": [ + "e3495de4-6aef-48a7-a53d-c29631d29ec9" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021609Z:e3495de4-6aef-48a7-a53d-c29631d29ec9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:16:09 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1815/providers/Microsoft.DataFactory/datafactories/onesdk297/tables/foo2/operationresults/a191c870a2984cafb167b5949ded8922?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1815/providers/Microsoft.DataFactory/datafactories/onesdk297/tables/foo2/operationresults/a191c870a2984cafb167b5949ded8922?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazE4MTUvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazI5Ny90YWJsZXMvZm9vMi9vcGVyYXRpb25yZXN1bHRzL2ExOTFjODcwYTI5ODRjYWZiMTY3YjU5NDlkZWQ4OTIyP2FwaS12ZXJzaW9uPTIwMTQtMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "63" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-request-id": [ + "aa3bcf14-6aad-4bce-af7a-8eda127935de" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799809" + ], + "x-ms-correlation-request-id": [ + "a0b4ddfb-df5d-4577-9bff-a702f0b8a602" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021609Z:a0b4ddfb-df5d-4577-9bff-a702f0b8a602" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:16:09 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1815/providers/Microsoft.DataFactory/datafactories/onesdk297/tables/foo2/operationresults/a191c870a2984cafb167b5949ded8922?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1815/providers/Microsoft.DataFactory/datafactories/onesdk297/tables/foo2/operationresults/a191c870a2984cafb167b5949ded8922?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazE4MTUvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazI5Ny90YWJsZXMvZm9vMi9vcGVyYXRpb25yZXN1bHRzL2ExOTFjODcwYTI5ODRjYWZiMTY3YjU5NDlkZWQ4OTIyP2FwaS12ZXJzaW9uPTIwMTQtMTAtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "63" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "ef0820da-6ffd-4f48-81ee-54fc8038d2b6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799808" + ], + "x-ms-correlation-request-id": [ + "67acc702-8e85-4b50-9a5c-35972ff2e7d1" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021625Z:67acc702-8e85-4b50-9a5c-35972ff2e7d1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:16:24 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk1815/providers/Microsoft.DataFactory/datafactories/onesdk297?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazE4MTUvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazI5Nz9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b1eae754-d7b0-426c-8d36-08571b62d86d" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "d5152e93-ec66-44e2-b70c-11f1a702c30f" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11911" + ], + "x-ms-correlation-request-id": [ + "d4d5f8dd-5f3c-4372-99f5-f3ea2c81bc63" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T021625Z:d4d5f8dd-5f3c-4372-99f5-f3ea2c81bc63" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:16:25 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-TablePiping": [ + "onesdk297", + "onesdk1815" + ] + }, + "Variables": { + "SubscriptionId": "8d88dc98-ab0c-4b80-825b-123b2cf8443c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.TableTests/TestTableWithDataFactoryParameter.json b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.TableTests/TestTableWithDataFactoryParameter.json new file mode 100644 index 000000000000..0b2295c3b0da --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/SessionRecords/Microsoft.Azure.Commands.DataFactories.Test.TableTests/TestTableWithDataFactoryParameter.json @@ -0,0 +1,1186 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799866" + ], + "x-ms-request-id": [ + "6c6d2002-da8a-4f0c-8f29-ab9510730948" + ], + "x-ms-correlation-request-id": [ + "6c6d2002-da8a-4f0c-8f29-ab9510730948" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020349Z:6c6d2002-da8a-4f0c-8f29-ab9510730948" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:03:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Europe\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\",\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"adfgated3\",\r\n \"2014-10-01-preview\",\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"dataFactories/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkDataFactoryNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01\",\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/biztalkservices\",\r\n \"namespace\": \"biztalkservices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"biztalk\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/mdp\",\r\n \"namespace\": \"mdp\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"environments\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ADHybridHealthService\",\r\n \"namespace\": \"Microsoft.ADHybridHealthService\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"services\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"agents\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validateServiceName\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BackupVaultRPNew\",\r\n \"namespace\": \"Microsoft.BackupVaultRPNew\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BackupVaultNew\",\r\n \"locations\": [\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"reservedIps\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkStorageAccountAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Central US\",\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Compute\",\r\n \"namespace\": \"Microsoft.Compute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/extensions\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DataWarehouse\",\r\n \"namespace\": \"Microsoft.DataWarehouse\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"datawarehouses\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\",\r\n \"East US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.DWS\",\r\n \"namespace\": \"Microsoft.DWS\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Features\",\r\n \"namespace\": \"Microsoft.Features\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"features\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights2\",\r\n \"namespace\": \"microsoft.insights2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.insights3\",\r\n \"namespace\": \"microsoft.insights3\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.KeyVault\",\r\n \"namespace\": \"Microsoft.KeyVault\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"vaults\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"vaults/secrets\",\r\n \"locations\": [\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Mobile\",\r\n \"namespace\": \"Microsoft.Mobile\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"mobileservices\",\r\n \"locations\": [\r\n \"\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.OperationalInsights\",\r\n \"namespace\": \"Microsoft.OperationalInsights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"workspaces\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-11-10\",\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageInsightConfigs\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"linkTargets\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-10\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/locations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Scheduler\",\r\n \"namespace\": \"Microsoft.Scheduler\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"jobcollections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/restorableDroppedDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/recoverableDatabases\",\r\n \"locations\": [\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Storage\",\r\n \"namespace\": \"Microsoft.Storage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageaccounts\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"East US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.StreamAnalytics\",\r\n \"namespace\": \"Microsoft.StreamAnalytics\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"streamingjobs\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/quotas\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01-preview\",\r\n \"2014-08-01-preview.0.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"streamingjobs/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.support\",\r\n \"namespace\": \"microsoft.support\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"supporttickets\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"1.0-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/microsoft.test\",\r\n \"namespace\": \"microsoft.test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"tests\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"tests/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"North Europe\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio\",\r\n \"namespace\": \"Microsoft.VisualStudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Dev\",\r\n \"namespace\": \"Microsoft.VisualStudio.Dev\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.VisualStudio.Test\",\r\n \"namespace\": \"Microsoft.VisualStudio.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Microsoft.WinFab\",\r\n \"namespace\": \"Microsoft.WinFab\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"clusters\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/MicrosoftSql\",\r\n \"namespace\": \"MicrosoftSql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2.0\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/NewRelic.APM\",\r\n \"namespace\": \"NewRelic.APM\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"accounts/applications\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-10-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/sabanwebsites\",\r\n \"namespace\": \"sabanwebsites\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"sites/pages\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/StressRP\",\r\n \"namespace\": \"StressRP\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"ResourceType1\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"ResourceType1/ResourceType2\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/providers/visualstudiov2\",\r\n \"namespace\": \"visualstudiov2\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"02\",\r\n \"01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "22634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799865" + ], + "x-ms-request-id": [ + "c206aaf6-6942-4347-99b1-91ae90beac99" + ], + "x-ms-correlation-request-id": [ + "c206aaf6-6942-4347-99b1-91ae90beac99" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020350Z:c206aaf6-6942-4347-99b1-91ae90beac99" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:03:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7539?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazc1Mzk/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "102" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799864" + ], + "x-ms-request-id": [ + "a036cab3-7ec9-4640-953a-696d1c93ea06" + ], + "x-ms-correlation-request-id": [ + "a036cab3-7ec9-4640-953a-696d1c93ea06" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020350Z:a036cab3-7ec9-4640-953a-696d1c93ea06" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:03:49 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7539?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazc1Mzk/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk7539\",\r\n \"name\": \"onesdk7539\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "183" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11931" + ], + "x-ms-request-id": [ + "f2da79a0-b038-4af5-8ca4-e79c150f2592" + ], + "x-ms-correlation-request-id": [ + "f2da79a0-b038-4af5-8ca4-e79c150f2592" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020350Z:f2da79a0-b038-4af5-8ca4-e79c150f2592" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:03:49 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourceGroups/onesdk7539/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlR3JvdXBzL29uZXNkazc1MzkvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799863" + ], + "x-ms-request-id": [ + "99f4323c-1eb7-4080-b198-4f1c1f38d62f" + ], + "x-ms-correlation-request-id": [ + "99f4323c-1eb7-4080-b198-4f1c1f38d62f" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020350Z:99f4323c-1eb7-4080-b198-4f1c1f38d62f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:03:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7539/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazc1MzkvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "centralus:73cdd4a1-77ac-4b08-8c58-f894e519eafe" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799827" + ], + "x-ms-correlation-request-id": [ + "9933c655-a4a5-4c3a-9d33-7a3aa444da17" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020351Z:9933c655-a4a5-4c3a-9d33-7a3aa444da17" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:03:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7539/providers/Microsoft.DataFactory/datafactories/onesdk9861?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazc1MzkvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazk4NjE/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"onesdk9861\",\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "69" + ], + "x-ms-client-request-id": [ + "19dce3ea-14a2-4ef5-880f-a1490f003dbf" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "333" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk9861\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7539/providers/Microsoft.DataFactory/datafactories/onesdk9861\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"be2b5062-f6d5-4c42-b263-c3d0a8240a81\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "5b081184-dd53-4595-9678-ce27c6cace87" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11930" + ], + "x-ms-correlation-request-id": [ + "1db0ef6d-5ea5-492e-8eb9-21d9153f653b" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020352Z:1db0ef6d-5ea5-492e-8eb9-21d9153f653b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:03:52 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7539/providers/Microsoft.DataFactory/datafactories/onesdk9861?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7539/providers/Microsoft.DataFactory/datafactories/onesdk9861?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazc1MzkvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazk4NjE/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c24dbffd-7b72-48af-a5ed-8d1151054bcd" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "333" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk9861\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7539/providers/Microsoft.DataFactory/datafactories/onesdk9861\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"be2b5062-f6d5-4c42-b263-c3d0a8240a81\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "ae25dd23-72be-45b2-96d1-0ce4747cbbf5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799862" + ], + "x-ms-correlation-request-id": [ + "e29fd443-828c-4afc-84de-f79551bc96f8" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020352Z:e29fd443-828c-4afc-84de-f79551bc96f8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:03:52 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7539/providers/Microsoft.DataFactory/datafactories/onesdk9861?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazc1MzkvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazk4NjE/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "46f47a92-1fd6-4740-9df6-22aada3ded7f" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "333" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk9861\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7539/providers/Microsoft.DataFactory/datafactories/onesdk9861\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"be2b5062-f6d5-4c42-b263-c3d0a8240a81\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"PendingCreation\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "478" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "ad9359b2-4ad2-4592-8de6-b2c4fe7ae353" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799861" + ], + "x-ms-correlation-request-id": [ + "126605b1-2897-4239-a86c-88dc4a0c88d2" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020357Z:126605b1-2897-4239-a86c-88dc4a0c88d2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:03:57 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7539/providers/Microsoft.DataFactory/datafactories/onesdk9861?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazc1MzkvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazk4NjE/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5ca5dbf3-dcb3-402d-8fb1-c75f78d9d6c9" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "333" + ] + }, + "ResponseBody": "{\r\n \"name\": \"onesdk9861\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7539/providers/Microsoft.DataFactory/datafactories/onesdk9861\",\r\n \"type\": \"Microsoft.DataFactory/datafactories\",\r\n \"location\": \"West US\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"dataFactoryId\": \"be2b5062-f6d5-4c42-b263-c3d0a8240a81\",\r\n \"hCatalogDescription\": null,\r\n \"provisioningState\": \"Succeeded\",\r\n \"error\": null,\r\n \"errorMessage\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "472" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "5d33fbb5-2678-4bce-9061-5d358fa5132a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799860" + ], + "x-ms-correlation-request-id": [ + "dd9668cc-15b0-46f2-b892-f8b03b7c9cfe" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020402Z:dd9668cc-15b0-46f2-b892-f8b03b7c9cfe" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:04:02 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7539/providers/Microsoft.DataFactory/datafactories/onesdk9861/linkedservices/foo2?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazc1MzkvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazk4NjEvbGlua2Vkc2VydmljZXMvZm9vMj9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"foo2\",\r\n \"properties\": {\r\n \"type\": \"CustomLinkedService\",\r\n \"extendedProperties\": {\r\n \"PropertyBagPropertyName1\": \"PropertyBagPropertyValue1\",\r\n \"propertyBagPropertyName2\": \"PropertyBagPropertyValue2\"\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "278" + ], + "x-ms-client-request-id": [ + "9fb10b3a-b071-4a39-b03b-178b092e0721" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "338" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7539/providers/Microsoft.DataFactory/datafactories/onesdk9861/linkedservices/foo2\",\r\n \"name\": \"foo2\",\r\n \"properties\": {\r\n \"extendedProperties\": {\r\n \"PropertyBagPropertyName1\": \"PropertyBagPropertyValue1\",\r\n \"propertyBagPropertyName2\": \"PropertyBagPropertyValue2\"\r\n },\r\n \"hubName\": \"onesdk9861_hub\",\r\n \"type\": \"CustomLinkedService\",\r\n \"provisioningState\": \"PendingCreation\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "419" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "a1bd78b7-895d-497c-b1c1-deb326b2ee54" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11929" + ], + "x-ms-correlation-request-id": [ + "2147f8ad-aed6-4671-8fb6-10979ee8e2b3" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020403Z:2147f8ad-aed6-4671-8fb6-10979ee8e2b3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:04:02 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7539/providers/Microsoft.DataFactory/datafactories/onesdk9861/linkedservices/foo2?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazc1MzkvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazk4NjEvbGlua2Vkc2VydmljZXMvZm9vMj9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7750a601-4214-425f-b1a4-5a4fd6e01ee4" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "338" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7539/providers/Microsoft.DataFactory/datafactories/onesdk9861/linkedservices/foo2\",\r\n \"name\": \"foo2\",\r\n \"properties\": {\r\n \"extendedProperties\": {\r\n \"PropertyBagPropertyName1\": \"PropertyBagPropertyValue1\",\r\n \"propertyBagPropertyName2\": \"PropertyBagPropertyValue2\"\r\n },\r\n \"hubName\": \"onesdk9861_hub\",\r\n \"type\": \"CustomLinkedService\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "413" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "212280a5-ccd8-4d3f-b7c9-9d56ad327c6d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799859" + ], + "x-ms-correlation-request-id": [ + "bab09d93-800b-4f3b-abad-8dd82d34303b" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020403Z:bab09d93-800b-4f3b-abad-8dd82d34303b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:04:02 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7539/providers/Microsoft.DataFactory/datafactories/onesdk9861/tables/foo2?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazc1MzkvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazk4NjEvdGFibGVzL2ZvbzI/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"name\": \"foo1\",\r\n \"properties\": {\r\n \"location\": {\r\n \"type\": \"CustomLocation\",\r\n \"linkedServiceName\": \"foo2\"\r\n },\r\n \"availability\": {\r\n \"frequency\": \"Hour\",\r\n \"interval\": 1\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "284" + ], + "x-ms-client-request-id": [ + "0a8da95f-5bae-4a81-890c-baab060ecbfe" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "341" + ] + }, + "ResponseBody": "{\r\n \"name\": \"foo2\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7539/providers/Microsoft.DataFactory/datafactories/onesdk9861/tables/foo2\",\r\n \"properties\": {\r\n \"published\": false,\r\n \"location\": {\r\n \"type\": \"CustomLocation\",\r\n \"linkedServiceName\": \"foo2\"\r\n },\r\n \"availability\": {\r\n \"frequency\": \"Hour\",\r\n \"interval\": 1,\r\n \"waitOnExternal\": null\r\n },\r\n \"createTime\": \"2014-10-30T02:04:03.3274576Z\",\r\n \"provisioningState\": \"PendingCreation\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "419" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "f3899fbe-ec8d-4dbf-988d-0e8b65dca2ed" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11928" + ], + "x-ms-correlation-request-id": [ + "81c96998-24fb-436e-9b9f-3b5a0fb100eb" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020403Z:81c96998-24fb-436e-9b9f-3b5a0fb100eb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:04:02 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7539/providers/Microsoft.DataFactory/datafactories/onesdk9861/tables/foo2?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7539/providers/Microsoft.DataFactory/datafactories/onesdk9861/tables/foo2?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazc1MzkvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazk4NjEvdGFibGVzL2ZvbzI/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a57c9e5b-a79d-4dc3-ae18-a6cec24c9abd" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "341" + ] + }, + "ResponseBody": "{\r\n \"name\": \"foo2\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7539/providers/Microsoft.DataFactory/datafactories/onesdk9861/tables/foo2\",\r\n \"properties\": {\r\n \"published\": false,\r\n \"location\": {\r\n \"type\": \"CustomLocation\",\r\n \"linkedServiceName\": \"foo2\"\r\n },\r\n \"availability\": {\r\n \"frequency\": \"Hour\",\r\n \"interval\": 1,\r\n \"waitOnExternal\": null\r\n },\r\n \"createTime\": \"2014-10-30T02:04:03.3274576Z\",\r\n \"provisioningState\": \"PendingCreation\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "419" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "108c949b-75ca-4932-b9cc-41c1b69afde5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799858" + ], + "x-ms-correlation-request-id": [ + "80301ddd-114c-4238-8f2c-75b51684f7c9" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020403Z:80301ddd-114c-4238-8f2c-75b51684f7c9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:04:03 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7539/providers/Microsoft.DataFactory/datafactories/onesdk9861/tables/foo2?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazc1MzkvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazk4NjEvdGFibGVzL2ZvbzI/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "4aec5a38-9aa5-4617-806f-579b68804eda" + ], + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "341" + ] + }, + "ResponseBody": "{\r\n \"name\": \"foo2\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7539/providers/Microsoft.DataFactory/datafactories/onesdk9861/tables/foo2\",\r\n \"properties\": {\r\n \"published\": false,\r\n \"location\": {\r\n \"type\": \"CustomLocation\",\r\n \"linkedServiceName\": \"foo2\"\r\n },\r\n \"availability\": {\r\n \"frequency\": \"Hour\",\r\n \"interval\": 1,\r\n \"waitOnExternal\": null\r\n },\r\n \"createTime\": \"2014-10-30T02:04:03.5091314Z\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "413" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "26c280ce-1463-4fd5-8667-7180981fc16d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799857" + ], + "x-ms-correlation-request-id": [ + "9a55a6ea-8655-4a7e-8877-fad041d6ef0c" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020408Z:9a55a6ea-8655-4a7e-8877-fad041d6ef0c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:04:08 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7539/providers/Microsoft.DataFactory/datafactories/onesdk9861/tables/foo2?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazc1MzkvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazk4NjEvdGFibGVzL2ZvbzI/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "198f6741-1304-485d-b7ac-9f50d1cca9b5" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"name\": \"foo2\",\r\n \"id\": \"/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7539/providers/Microsoft.DataFactory/datafactories/onesdk9861/tables/foo2\",\r\n \"properties\": {\r\n \"published\": false,\r\n \"location\": {\r\n \"type\": \"CustomLocation\",\r\n \"linkedServiceName\": \"foo2\"\r\n },\r\n \"availability\": {\r\n \"frequency\": \"Hour\",\r\n \"interval\": 1,\r\n \"waitOnExternal\": null\r\n },\r\n \"createTime\": \"2014-10-30T02:04:03.5091314Z\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "413" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "07411d90-aab1-4711-81de-b3447b56b15d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799856" + ], + "x-ms-correlation-request-id": [ + "87ef8eb8-be67-4a33-80a0-40bcb8e46f35" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020408Z:87ef8eb8-be67-4a33-80a0-40bcb8e46f35" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:04:08 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7539/providers/Microsoft.DataFactory/datafactories/onesdk9861/tables/foo2?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazc1MzkvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazk4NjEvdGFibGVzL2ZvbzI/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "eb4d9d91-16a3-40a9-9cc3-0b3b93383a9c" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "346" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-request-id": [ + "0c40532d-d1b5-4f64-8942-40933973bf06" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11927" + ], + "x-ms-correlation-request-id": [ + "a2e3ec14-91c9-4467-929b-c1109d0eee03" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020409Z:a2e3ec14-91c9-4467-929b-c1109d0eee03" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:04:08 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7539/providers/Microsoft.DataFactory/datafactories/onesdk9861/tables/foo2/operationresults/7493a7df875c438fa02a9736a9a62769?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7539/providers/Microsoft.DataFactory/datafactories/onesdk9861/tables/foo2/operationresults/7493a7df875c438fa02a9736a9a62769?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazc1MzkvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazk4NjEvdGFibGVzL2ZvbzIvb3BlcmF0aW9ucmVzdWx0cy83NDkzYTdkZjg3NWM0MzhmYTAyYTk3MzZhOWE2Mjc2OT9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "346" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-request-id": [ + "84c6c711-b0b8-4a1c-87d7-d10a2247ad99" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799855" + ], + "x-ms-correlation-request-id": [ + "273dd368-c8ee-4f75-8a3e-72f75c497f30" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020409Z:273dd368-c8ee-4f75-8a3e-72f75c497f30" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:04:09 GMT" + ], + "Location": [ + "https://api-current.resources.windows-int.net/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7539/providers/Microsoft.DataFactory/datafactories/onesdk9861/tables/foo2/operationresults/7493a7df875c438fa02a9736a9a62769?api-version=2014-10-01-preview" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7539/providers/Microsoft.DataFactory/datafactories/onesdk9861/tables/foo2/operationresults/7493a7df875c438fa02a9736a9a62769?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazc1MzkvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazk4NjEvdGFibGVzL2ZvbzIvb3BlcmF0aW9ucmVzdWx0cy83NDkzYTdkZjg3NWM0MzhmYTAyYTk3MzZhOWE2Mjc2OT9hcGktdmVyc2lvbj0yMDE0LTEwLTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ], + "client-tracking-id": [ + "346" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "f8446b01-aba6-46b2-8326-63fe4747a2df" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799854" + ], + "x-ms-correlation-request-id": [ + "917a720d-5914-4386-98c4-e6741872e8ec" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020424Z:917a720d-5914-4386-98c4-e6741872e8ec" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:04:24 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/8d88dc98-ab0c-4b80-825b-123b2cf8443c/resourcegroups/onesdk7539/providers/Microsoft.DataFactory/datafactories/onesdk9861?api-version=2014-10-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvOGQ4OGRjOTgtYWIwYy00YjgwLTgyNWItMTIzYjJjZjg0NDNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazc1MzkvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9kYXRhZmFjdG9yaWVzL29uZXNkazk4NjE/YXBpLXZlcnNpb249MjAxNC0xMC0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5ad7e8f9-111f-4417-b290-112c5d5a266a" + ], + "User-Agent": [ + "Microsoft.Azure.Management.DataFactories.DataPipelineManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "1996dcd9-1819-40d4-ab54-ccb1d14b4da3" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11926" + ], + "x-ms-correlation-request-id": [ + "f3b419f0-d613-4f6c-b23d-1e5b870ef13a" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20141030T020425Z:f3b419f0-d613-4f6c-b23d-1e5b870ef13a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 30 Oct 2014 02:04:25 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-TableWithDataFactoryParameter": [ + "onesdk9861", + "onesdk7539" + ] + }, + "Variables": { + "SubscriptionId": "8d88dc98-ab0c-4b80-825b-123b2cf8443c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/DataFactoryUnitTestBase.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/DataFactoryUnitTestBase.cs new file mode 100644 index 000000000000..6115f7109917 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/DataFactoryUnitTestBase.cs @@ -0,0 +1,43 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Moq; + +namespace Microsoft.Azure.Commands.DataFactories.Test +{ + public class DataFactoryUnitTestBase + { + protected const string subscriptionId = "subscriptionid"; + + protected const string DataFactoryName = "foo"; + + protected const string GatewayName = "foo"; + + protected const string ResourceGroupName = "bar"; + + protected const string Location = "centralus"; + + protected Mock dataFactoriesClientMock; + + protected Mock commandRuntimeMock; + + public virtual void SetupTest() + { + dataFactoriesClientMock = new Mock(); + + commandRuntimeMock = new Mock(); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetDataFactoryGatewayTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetDataFactoryGatewayTests.cs new file mode 100644 index 000000000000..3491570dc28d --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetDataFactoryGatewayTests.cs @@ -0,0 +1,103 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; + +using Microsoft.Azure.Commands.DataFactories; +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.Azure.Commands.DataFactories.Test; +using Microsoft.Azure.Management.DataFactories.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.Test.Gateway +{ + public class GetDataFactoryGatewayTests : DataFactoryUnitTestBase + { + private GetAzureDataFactoryGatewayCommand _cmdlet; + + public GetDataFactoryGatewayTests() + { + base.SetupTest(); + + _cmdlet = new GetAzureDataFactoryGatewayCommand + { + CommandRuntime = commandRuntimeMock.Object, + DataFactoryClient = dataFactoriesClientMock.Object, + ResourceGroupName = ResourceGroupName + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanGetGateway() + { + var expectedOutput = new PSDataFactoryGateway + { + Name = GatewayName, + Location = Location, + Status = GatewayStatus.NeedRegistration + }; + + dataFactoriesClientMock.Setup(f => f.GetGateway(ResourceGroupName, DataFactoryName, GatewayName)) + .Returns(expectedOutput).Verifiable(); + + _cmdlet.Name = GatewayName; + _cmdlet.DataFactoryName = DataFactoryName; + + _cmdlet.ExecuteCmdlet(); + + // Assert + dataFactoriesClientMock.VerifyAll(); + + commandRuntimeMock.Verify(f => f.WriteObject(expectedOutput), Times.Once()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanListGateways() + { + var expectedOutputs = new List() + { + new PSDataFactoryGateway() + { + Name = GatewayName, + Location = Location, + Status = GatewayStatus.NeedRegistration + }, + + new PSDataFactoryGateway() + { + Name = "foo2", + Location = Location, + Status = GatewayStatus.NeedRegistration + } + }; + + + dataFactoriesClientMock.Setup(f => f.ListGateways(ResourceGroupName, DataFactoryName)) + .Returns(expectedOutputs).Verifiable(); + + _cmdlet.DataFactoryName = DataFactoryName; + + _cmdlet.ExecuteCmdlet(); + + // Assert + dataFactoriesClientMock.VerifyAll(); + + commandRuntimeMock.Verify(f => f.WriteObject(expectedOutputs, true), Times.Once()); + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetDataFactoryTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetDataFactoryTests.cs new file mode 100644 index 000000000000..a1776d382273 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetDataFactoryTests.cs @@ -0,0 +1,112 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using System.Management.Automation.Language; +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using Xunit; + +namespace Microsoft.Azure.Commands.DataFactories.Test +{ + public class GetDataFactoryTests : DataFactoryUnitTestBase + { + private GetAzureDataFactoryCommand cmdlet; + + public GetDataFactoryTests() + { + base.SetupTest(); + + cmdlet = new GetAzureDataFactoryCommand() + { + CommandRuntime = commandRuntimeMock.Object, + DataFactoryClient = dataFactoriesClientMock.Object + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanGetDataFactory() + { + // Arrange + PSDataFactory expected = new PSDataFactory() {DataFactoryName = DataFactoryName, ResourceGroupName = ResourceGroupName}; + + dataFactoriesClientMock.Setup( + c => + c.FilterPSDataFactories( + It.Is( + options => options.Name == DataFactoryName && options.ResourceGroupName == ResourceGroupName))) + .CallBase() + .Verifiable(); + + dataFactoriesClientMock.Setup(c => c.GetDataFactory(ResourceGroupName, DataFactoryName)) + .Returns(expected) + .Verifiable(); + + // Action + cmdlet.ResourceGroupName = ResourceGroupName; + cmdlet.Name = " "; + Exception whiteSpace = Assert.Throws(() => cmdlet.ExecuteCmdlet()); + + cmdlet.Name = ""; + Exception empty = Assert.Throws(() => cmdlet.ExecuteCmdlet()); + + cmdlet.Name = DataFactoryName; + cmdlet.ExecuteCmdlet(); + + // Assert + dataFactoriesClientMock.VerifyAll(); + Assert.Contains("Value cannot be null", whiteSpace.Message); + Assert.Contains("Value cannot be null", empty.Message); + commandRuntimeMock.Verify(f => f.WriteObject(expected), Times.Once()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanListDataFactories() + { + List expected = new List() + { + new PSDataFactory() {DataFactoryName = DataFactoryName, ResourceGroupName = ResourceGroupName}, + new PSDataFactory() {DataFactoryName = "datafactory1", ResourceGroupName = ResourceGroupName} + }; + + // Arrange + dataFactoriesClientMock.Setup( + c => + c.FilterPSDataFactories( + It.Is( + options => options.Name == null && options.ResourceGroupName == ResourceGroupName))) + .CallBase() + .Verifiable(); + + dataFactoriesClientMock.Setup(c => c.ListDataFactories(ResourceGroupName)) + .Returns(expected) + .Verifiable(); + + cmdlet.ResourceGroupName = ResourceGroupName; + + // Action + cmdlet.ExecuteCmdlet(); + + // Assert + dataFactoriesClientMock.VerifyAll(); + + commandRuntimeMock.Verify(f => f.WriteObject(expected, true), Times.Once()); + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetHubTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetHubTests.cs new file mode 100644 index 000000000000..69b5378fcb5f --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetHubTests.cs @@ -0,0 +1,128 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using Xunit; + +namespace Microsoft.Azure.Commands.DataFactories.Test +{ + public class GetHubTests : DataFactoryUnitTestBase + { + private const string hubName = "foo"; + + private GetAzureDataFactoryHubCommand cmdlet; + + public GetHubTests() + { + base.SetupTest(); + + cmdlet = new GetAzureDataFactoryHubCommand() + { + CommandRuntime = commandRuntimeMock.Object, + DataFactoryClient = dataFactoriesClientMock.Object, + ResourceGroupName = ResourceGroupName, + DataFactoryName = DataFactoryName + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanGetHub() + { + // Arrange + PSHub expected = new PSHub() + { + DataFactoryName = DataFactoryName, + ResourceGroupName = ResourceGroupName, + HubName = hubName + }; + + dataFactoriesClientMock + .Setup( + c => + c.FilterPSHubs( + It.Is( + options => + options.ResourceGroupName == ResourceGroupName && + options.DataFactoryName == DataFactoryName && + options.Name == hubName))) + .CallBase() + .Verifiable(); + + dataFactoriesClientMock + .Setup(c => c.GetHub(ResourceGroupName, DataFactoryName, hubName)) + .Returns(expected) + .Verifiable(); + + // Action + cmdlet.Name = hubName; + cmdlet.ExecuteCmdlet(); + + // Assert + dataFactoriesClientMock.VerifyAll(); + + commandRuntimeMock.Verify(f => f.WriteObject(expected), Times.Once()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanListHubs() + { + // Arrange + List expected = new List() + { + new PSHub() + { + HubName = hubName, + DataFactoryName = DataFactoryName, + ResourceGroupName = ResourceGroupName + }, + new PSHub() + { + HubName = "anotherHub", + DataFactoryName = DataFactoryName, + ResourceGroupName = ResourceGroupName + } + }; + + dataFactoriesClientMock + .Setup( + c => + c.FilterPSHubs( + It.Is( + options => + options.ResourceGroupName == ResourceGroupName && + options.DataFactoryName == DataFactoryName && + options.Name == null))) + .CallBase() + .Verifiable(); + + dataFactoriesClientMock + .Setup(f => f.ListHubs(ResourceGroupName, DataFactoryName)) + .Returns(expected) + .Verifiable(); + + // Action + cmdlet.ExecuteCmdlet(); + + // Assert + dataFactoriesClientMock.VerifyAll(); + + commandRuntimeMock.Verify(f => f.WriteObject(expected, true), Times.Once()); + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetLinkedServiceTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetLinkedServiceTests.cs new file mode 100644 index 000000000000..5fd647ac6d44 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetLinkedServiceTests.cs @@ -0,0 +1,137 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using Xunit; + +namespace Microsoft.Azure.Commands.DataFactories.Test +{ + public class GetLinkedServiceTests : DataFactoryUnitTestBase + { + private const string linkedServiceName = "foo"; + + private GetAzureDataFactoryLinkedServiceCommand cmdlet; + + public GetLinkedServiceTests() + { + base.SetupTest(); + + cmdlet = new GetAzureDataFactoryLinkedServiceCommand() + { + CommandRuntime = commandRuntimeMock.Object, + DataFactoryClient = dataFactoriesClientMock.Object, + ResourceGroupName = ResourceGroupName, + DataFactoryName = DataFactoryName + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanGetLinkedService() + { + // Arrange + PSLinkedService expected = new PSLinkedService() + { + LinkedServiceName = linkedServiceName, + DataFactoryName = DataFactoryName, + ResourceGroupName = ResourceGroupName + }; + + dataFactoriesClientMock + .Setup( + c => + c.FilterPSLinkedServices( + It.Is( + options => + options.ResourceGroupName == ResourceGroupName && + options.DataFactoryName == DataFactoryName && + options.Name == linkedServiceName))) + .CallBase() + .Verifiable(); + + dataFactoriesClientMock + .Setup(c => c.GetLinkedService(ResourceGroupName, DataFactoryName, linkedServiceName)) + .Returns(expected) + .Verifiable(); + + // Action + cmdlet.Name = " "; + Exception whiteSpace = Assert.Throws(() => cmdlet.ExecuteCmdlet()); + + cmdlet.Name = ""; + Exception empty = Assert.Throws(() => cmdlet.ExecuteCmdlet()); + + cmdlet.Name = linkedServiceName; + cmdlet.ExecuteCmdlet(); + + // Assert + dataFactoriesClientMock.VerifyAll(); + Assert.Contains("Value cannot be null", whiteSpace.Message); + Assert.Contains("Value cannot be null", empty.Message); + commandRuntimeMock.Verify(f => f.WriteObject(expected), Times.Once()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanListLinkedServices() + { + // Arrange + List expected = new List() + { + new PSLinkedService() + { + LinkedServiceName = linkedServiceName, + DataFactoryName = DataFactoryName, + ResourceGroupName = ResourceGroupName + }, + new PSLinkedService() + { + LinkedServiceName = "anotherLinkedService", + DataFactoryName = DataFactoryName, + ResourceGroupName = ResourceGroupName + } + }; + + dataFactoriesClientMock + .Setup( + c => + c.FilterPSLinkedServices( + It.Is( + options => + options.ResourceGroupName == ResourceGroupName && + options.DataFactoryName == DataFactoryName && + options.Name == null))) + .CallBase() + .Verifiable(); + + dataFactoriesClientMock + .Setup(f => f.ListLinkedServices(ResourceGroupName, DataFactoryName)) + .Returns(expected) + .Verifiable(); + + // Action + cmdlet.ExecuteCmdlet(); + + // Assert + dataFactoriesClientMock.VerifyAll(); + + commandRuntimeMock.Verify(f => f.WriteObject(expected, true), Times.Once()); + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetPipelineTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetPipelineTests.cs new file mode 100644 index 000000000000..8fa189de9633 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetPipelineTests.cs @@ -0,0 +1,128 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using Xunit; + +namespace Microsoft.Azure.Commands.DataFactories.Test +{ + public class GetPipelineTests : DataFactoryUnitTestBase + { + private const string pipelineName = "foo"; + + private GetAzureDataFactoryPipelineCommand cmdlet; + + public GetPipelineTests() + { + base.SetupTest(); + + cmdlet = new GetAzureDataFactoryPipelineCommand() + { + CommandRuntime = commandRuntimeMock.Object, + DataFactoryClient = dataFactoriesClientMock.Object, + ResourceGroupName = ResourceGroupName, + DataFactoryName = DataFactoryName + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanGetPipeline() + { + // Arrange + PSPipeline expected = new PSPipeline() + { + PipelineName = pipelineName, + DataFactoryName = DataFactoryName, + ResourceGroupName = ResourceGroupName + }; + + dataFactoriesClientMock + .Setup( + c => + c.FilterPSPipelines( + It.Is( + options => + options.ResourceGroupName == ResourceGroupName && + options.DataFactoryName == DataFactoryName && + options.Name == pipelineName))) + .CallBase() + .Verifiable(); + + dataFactoriesClientMock + .Setup(c => c.GetPipeline(ResourceGroupName, DataFactoryName, pipelineName)) + .Returns(expected) + .Verifiable(); + + // Action + cmdlet.Name = pipelineName; + cmdlet.ExecuteCmdlet(); + + // Assert + dataFactoriesClientMock.VerifyAll(); + + commandRuntimeMock.Verify(f => f.WriteObject(expected), Times.Once()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanListPipelines() + { + // Arrange + List expected = new List() + { + new PSPipeline() + { + PipelineName = pipelineName, + DataFactoryName = DataFactoryName, + ResourceGroupName = ResourceGroupName + }, + new PSPipeline() + { + PipelineName = "anotherPipeline", + DataFactoryName = DataFactoryName, + ResourceGroupName = ResourceGroupName + } + }; + + dataFactoriesClientMock + .Setup( + c => + c.FilterPSPipelines( + It.Is( + options => + options.ResourceGroupName == ResourceGroupName && + options.DataFactoryName == DataFactoryName && + options.Name == null))) + .CallBase() + .Verifiable(); + + dataFactoriesClientMock + .Setup(f => f.ListPipelines(ResourceGroupName, DataFactoryName)) + .Returns(expected) + .Verifiable(); + + // Action + cmdlet.ExecuteCmdlet(); + + // Assert + dataFactoriesClientMock.VerifyAll(); + + commandRuntimeMock.Verify(f => f.WriteObject(expected, true), Times.Once()); + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetTableTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetTableTests.cs new file mode 100644 index 000000000000..eaeae6f64abd --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/GetTableTests.cs @@ -0,0 +1,137 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using Xunit; + +namespace Microsoft.Azure.Commands.DataFactories.Test +{ + public class GetTableTests : DataFactoryUnitTestBase + { + private const string tableName = "foo"; + + private GetAzureDataFactoryTableCommand cmdlet; + + public GetTableTests() + { + base.SetupTest(); + + cmdlet = new GetAzureDataFactoryTableCommand() + { + CommandRuntime = commandRuntimeMock.Object, + DataFactoryClient = dataFactoriesClientMock.Object, + ResourceGroupName = ResourceGroupName, + DataFactoryName = DataFactoryName + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanGetTable() + { + // Arrange + PSTable expected = new PSTable() + { + TableName = tableName, + DataFactoryName = DataFactoryName, + ResourceGroupName = ResourceGroupName + }; + + dataFactoriesClientMock + .Setup( + c => + c.FilterPSTables( + It.Is( + options => + options.ResourceGroupName == ResourceGroupName && + options.DataFactoryName == DataFactoryName && + options.Name == tableName))) + .CallBase() + .Verifiable(); + + dataFactoriesClientMock + .Setup(c => c.GetTable(ResourceGroupName, DataFactoryName, tableName)) + .Returns(expected) + .Verifiable(); + + // Action + cmdlet.Name = " "; + Exception whiteSpace = Assert.Throws(() => cmdlet.ExecuteCmdlet()); + + cmdlet.Name = ""; + Exception empty = Assert.Throws(() => cmdlet.ExecuteCmdlet()); + + cmdlet.Name = tableName; + cmdlet.ExecuteCmdlet(); + + // Assert + dataFactoriesClientMock.VerifyAll(); + Assert.Contains("Value cannot be null", whiteSpace.Message); + Assert.Contains("Value cannot be null", empty.Message); + commandRuntimeMock.Verify(f => f.WriteObject(expected), Times.Once()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanListTables() + { + // Arrange + List expected = new List() + { + new PSTable() + { + TableName = tableName, + DataFactoryName = DataFactoryName, + ResourceGroupName = ResourceGroupName + }, + new PSTable() + { + TableName = "anotherTable", + DataFactoryName = DataFactoryName, + ResourceGroupName = ResourceGroupName + } + }; + + dataFactoriesClientMock + .Setup( + c => + c.FilterPSTables( + It.Is( + options => + options.ResourceGroupName == ResourceGroupName && + options.DataFactoryName == DataFactoryName && + options.Name == null))) + .CallBase() + .Verifiable(); + + dataFactoriesClientMock + .Setup(f => f.ListTables(ResourceGroupName, DataFactoryName)) + .Returns(expected) + .Verifiable(); + + // Action + cmdlet.ExecuteCmdlet(); + + // Assert + dataFactoriesClientMock.VerifyAll(); + + commandRuntimeMock.Verify(f => f.WriteObject(expected, true), Times.Once()); + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDataFactoryEncryptValueTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDataFactoryEncryptValueTests.cs new file mode 100644 index 000000000000..b30ce7b28105 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDataFactoryEncryptValueTests.cs @@ -0,0 +1,60 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.DataFactories; +using Microsoft.Azure.Commands.DataFactories.Test; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using System; +using System.Security; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.Test.DataFactory +{ + public class NewDataFactoryEncryptValueTests : DataFactoryUnitTestBase + { + public NewDataFactoryEncryptValueTests() + { + base.SetupTest(); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestOnPermDatasourceEncryptionWithRawJsonContent() + { + SecureString secureString = new SecureString(); + string expectedOutput = "My encrypted string " + Guid.NewGuid(); + + var cmdlet = new NewAzureDataFactoryEncryptValueCommand + { + CommandRuntime = this.commandRuntimeMock.Object, + DataFactoryClient = this.dataFactoriesClientMock.Object, + Value = secureString, + ResourceGroupName = ResourceGroupName, + DataFactoryName = DataFactoryName, + GatewayName = GatewayName + }; + + // Arrange + this.dataFactoriesClientMock.Setup(f => f.OnPremisesEncryptString(secureString, ResourceGroupName, DataFactoryName, GatewayName)).Returns(expectedOutput); + + // Action + cmdlet.ExecuteCmdlet(); + + // Assert + this.dataFactoriesClientMock.Verify(f => f.OnPremisesEncryptString(secureString, ResourceGroupName, DataFactoryName, GatewayName), Times.Once()); + this.commandRuntimeMock.Verify(f => f.WriteObject(expectedOutput), Times.Once()); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDataFactoryGatewayKeyTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDataFactoryGatewayKeyTests.cs new file mode 100644 index 000000000000..dd3bef201989 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDataFactoryGatewayKeyTests.cs @@ -0,0 +1,103 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Net; +using System.Net.Http; +using Microsoft.Azure.Commands.DataFactories; +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.Azure.Commands.DataFactories.Test; +using Microsoft.Azure.Management.DataFactories.Models; +using Microsoft.WindowsAzure.Commands.Utilities; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using Xunit; + + +namespace Microsoft.WindowsAzure.Commands.Test.Gateway +{ + + public class NewAzureDataFactoryGatewayKeyTests : DataFactoryUnitTestBase + { + private NewAzureDataFactoryGatewayKeyCommand _cmdlet; + + public NewAzureDataFactoryGatewayKeyTests() + { + base.SetupTest(); + + _cmdlet = new NewAzureDataFactoryGatewayKeyCommand + { + CommandRuntime = commandRuntimeMock.Object, + DataFactoryClient = dataFactoriesClientMock.Object, + ResourceGroupName = ResourceGroupName, + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanNewGatewayKey() + { + var gatewaykey = new PSDataFactoryGatewayKey("FakedKey"); + + var expectedOutput = new PSDataFactoryGateway + { + Name = GatewayName, + Location = Location, + Status = GatewayStatus.Online, + Description = "New gateway description for test" + }; + + var fakeRequest = new HttpRequestMessage(HttpMethod.Get, "https://www.microsoft.com"); + + dataFactoriesClientMock.Setup( + f => f.RegenerateGatewayKey(ResourceGroupName, DataFactoryName, GatewayName)) + .Returns(gatewaykey) + .Verifiable(); + + _cmdlet.GatewayName = GatewayName; + _cmdlet.DataFactoryName = DataFactoryName; + + _cmdlet.ExecuteCmdlet(); + + dataFactoriesClientMock.VerifyAll(); + commandRuntimeMock.Verify(f => f.WriteObject(gatewaykey), Times.Once()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanThrowWhenCreateKeyOnNonExistingGateway() + { + var gatewaykey = new PSDataFactoryGatewayKey("FakedKey"); + + var fakeRequest = new HttpRequestMessage(HttpMethod.Get, "https://www.microsoft.com"); + var fakeResponse = new HttpResponseMessage(HttpStatusCode.NotFound); + + dataFactoriesClientMock.Setup( + f => f.RegenerateGatewayKey(ResourceGroupName, DataFactoryName, GatewayName)) + .Returns(() => + { + throw CloudException.Create(fakeRequest, String.Empty, fakeResponse, String.Empty); + }).Verifiable(); + + _cmdlet.GatewayName = GatewayName; + _cmdlet.DataFactoryName = DataFactoryName; + + Assert.Throws(() => _cmdlet.ExecuteCmdlet()); + + dataFactoriesClientMock.VerifyAll(); + } + + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDataFactoryGatewayTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDataFactoryGatewayTests.cs new file mode 100644 index 000000000000..17848da1197d --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDataFactoryGatewayTests.cs @@ -0,0 +1,108 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Net; +using System.Net.Http; +using Microsoft.Azure.Commands.DataFactories; +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.Azure.Commands.DataFactories.Test; +using Microsoft.Azure.Management.DataFactories.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.Test.Gateway +{ + public class NewAzureDataFactoryGatewayTests : DataFactoryUnitTestBase + { + private NewAzureDataFactoryGatewayCommand _cmdlet; + + public NewAzureDataFactoryGatewayTests() + { + base.SetupTest(); + + _cmdlet = new NewAzureDataFactoryGatewayCommand + { + CommandRuntime = commandRuntimeMock.Object, + DataFactoryClient = dataFactoriesClientMock.Object, + ResourceGroupName = ResourceGroupName + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanNewGateway() + { + var expectedOutput = new PSDataFactoryGateway + { + Name = GatewayName, + Location = Location, + Status = GatewayStatus.Online, + Description = "New gateway description for test", + }; + + var fakeRequest = new HttpRequestMessage(HttpMethod.Get, "https://www.microsoft.com"); + var fakeResponse = new HttpResponseMessage(HttpStatusCode.NotFound); + + dataFactoriesClientMock.Setup(f => f.GetGateway(ResourceGroupName, DataFactoryName, GatewayName)) + .Returns(() => + { + throw CloudException.Create(fakeRequest, String.Empty, fakeResponse, String.Empty); + }) + .Verifiable(); + + dataFactoriesClientMock.Setup( + f => f.CreateOrUpdateGateway(ResourceGroupName, DataFactoryName, It.IsAny())) + .Returns(expectedOutput) + .Verifiable(); + + _cmdlet.Name = GatewayName; + _cmdlet.DataFactoryName = DataFactoryName; + _cmdlet.Location = Location; + + _cmdlet.ExecuteCmdlet(); + + dataFactoriesClientMock.VerifyAll(); + commandRuntimeMock.Verify(f => f.WriteObject(expectedOutput), Times.Once()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanThrowWhenCreateExistingGateway() + { + var expectedOutput = new PSDataFactoryGateway + { + Name = GatewayName, + Location = Location, + Status = GatewayStatus.Online, + Description = "New gateway description for test" + }; + + dataFactoriesClientMock.Setup(f => f.GetGateway(ResourceGroupName, DataFactoryName, GatewayName)) + .Returns(expectedOutput) + .Verifiable(); + + _cmdlet.Name = GatewayName; + _cmdlet.DataFactoryName = DataFactoryName; + _cmdlet.Location = Location; + + Assert.Throws(() => _cmdlet.ExecuteCmdlet()); + + dataFactoriesClientMock.Verify(f => f.CreateOrUpdateGateway(ResourceGroupName, DataFactoryName, It.IsAny()), + Times.Never()); + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDataFactoryTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDataFactoryTests.cs new file mode 100644 index 000000000000..d39c00f72358 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewDataFactoryTests.cs @@ -0,0 +1,130 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.Azure.Management.DataFactories.Models; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Moq; +using Xunit; + +namespace Microsoft.Azure.Commands.DataFactories.Test.UnitTests +{ + public class NewDataFactoryTests : DataFactoryUnitTestBase + { + private NewAzureDataFactoryCommand cmdlet; + + private IDictionary tags; + + public NewDataFactoryTests() + { + base.SetupTest(); + + tags = new Dictionary() {{"foo", "bar"}}; + + cmdlet = new NewAzureDataFactoryCommand() + { + CommandRuntime = commandRuntimeMock.Object, + DataFactoryClient = dataFactoriesClientMock.Object, + Name = DataFactoryName, + Location = Location, + ResourceGroupName = ResourceGroupName + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanCreateDataFactory() + { + // Arrange + DataFactory expected = new DataFactory() + { + Name = DataFactoryName, + Location = Location, + Properties = new DataFactoryProperties() { ProvisioningState = "Succeeded" } + }; + + dataFactoriesClientMock.Setup( + f => + f.CreatePSDataFactory( + It.Is( + parameters => + parameters.ResourceGroupName == ResourceGroupName && + parameters.DataFactoryName == DataFactoryName && + parameters.Location == Location))) + .CallBase() + .Verifiable(); + + dataFactoriesClientMock.Setup( + f => f.CreateOrUpdateDataFactory(ResourceGroupName, DataFactoryName, Location, tags)) + .Returns(expected) + .Verifiable(); + + // Action + cmdlet.Tags = tags.ToHashtable(); + cmdlet.Force = true; + cmdlet.ExecuteCmdlet(); + + // Assert + dataFactoriesClientMock.VerifyAll(); + + commandRuntimeMock.Verify( + f => + f.WriteObject( + It.Is( + df => + df.DataFactoryName == expected.Name && + df.Location == expected.Location)), + Times.Once()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanThrowIfDataFactoryProvisioningFailed() + { + // Arrange + DataFactory expected = new DataFactory() + { + Name = DataFactoryName, + Location = Location, + Properties = new DataFactoryProperties() { ProvisioningState = "Failed" } + }; + + dataFactoriesClientMock.Setup( + f => + f.CreatePSDataFactory( + It.Is( + parameters => + parameters.ResourceGroupName == ResourceGroupName && + parameters.DataFactoryName == DataFactoryName && + parameters.Location == Location))) + .CallBase() + .Verifiable(); + + dataFactoriesClientMock.Setup( + f => f.CreateOrUpdateDataFactory(ResourceGroupName, DataFactoryName, Location, tags)) + .Returns(expected) + .Verifiable(); + + // Action + cmdlet.Tags = tags.ToHashtable(); + cmdlet.Force = true; + + // Assert + Assert.Throws(() => cmdlet.ExecuteCmdlet()); + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewLinkedServiceTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewLinkedServiceTests.cs new file mode 100644 index 000000000000..6964499c803e --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewLinkedServiceTests.cs @@ -0,0 +1,169 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.Azure.Management.DataFactories.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using Newtonsoft.Json; +using Xunit; + +namespace Microsoft.Azure.Commands.DataFactories.Test.UnitTests +{ + public class NewLinkedServiceTests : DataFactoryUnitTestBase + { + private const string linkedServiceName = "foo1"; + + private const string filePath = "linkedService.json"; + + private const string rawJsonContent = @" +{ + name: ""foo2"", + properties: + { + type: ""HDInsightBYOCLinkedService"", + clusterUri: ""https://MyCluster.azurehdinsight.net/"", + userName: ""MyUserName"", + password: ""$EncryptedString$MyEncryptedPassword"", + linkedServiceName: ""MyStorageAssetName"", + } +} +"; + + private NewAzureDataFactoryLinkedServiceCommand cmdlet; + + public NewLinkedServiceTests() + { + base.SetupTest(); + + cmdlet = new NewAzureDataFactoryLinkedServiceCommand() + { + CommandRuntime = commandRuntimeMock.Object, + DataFactoryClient = dataFactoriesClientMock.Object, + Name = linkedServiceName, + DataFactoryName = DataFactoryName, + ResourceGroupName = ResourceGroupName + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanCreateLinkedService() + { + // Arrange + LinkedService expected = new LinkedService() + { + Name = linkedServiceName, + Properties = new HDInsightBYOCLinkedService() { ProvisioningState = "Succeeded" } + }; + + dataFactoriesClientMock.Setup(c => c.ReadJsonFileContent(It.IsAny())) + .Returns(rawJsonContent) + .Verifiable(); + + dataFactoriesClientMock.Setup( + c => + c.CreatePSLinkedService( + It.Is( + parameters => + parameters.Name == linkedServiceName && + parameters.ResourceGroupName == ResourceGroupName && + parameters.DataFactoryName == DataFactoryName))) + .CallBase() + .Verifiable(); + + dataFactoriesClientMock.Setup( + c => + c.CreateOrUpdateLinkedService(ResourceGroupName, DataFactoryName, linkedServiceName, rawJsonContent)) + .Returns(expected) + .Verifiable(); + + // Action + cmdlet.File = filePath; + cmdlet.Force = true; + cmdlet.ExecuteCmdlet(); + + // Assert + dataFactoriesClientMock.VerifyAll(); + + commandRuntimeMock.Verify( + f => + f.WriteObject( + It.Is( + ls => + ResourceGroupName == ls.ResourceGroupName && + DataFactoryName == ls.DataFactoryName && + expected.Name == ls.LinkedServiceName && + expected.Properties == ls.Properties)), + Times.Once()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanThrowIfLinkedServiceProvisioningFailed() + { + // Arrange + LinkedService expected = new LinkedService() + { + Name = linkedServiceName, + Properties = new HDInsightBYOCLinkedService() { ProvisioningState = "Failed" } + }; + + dataFactoriesClientMock.Setup(c => c.ReadJsonFileContent(It.IsAny())) + .Returns(rawJsonContent) + .Verifiable(); + + dataFactoriesClientMock.Setup( + c => + c.CreatePSLinkedService( + It.Is( + parameters => + parameters.Name == linkedServiceName && + parameters.ResourceGroupName == ResourceGroupName && + parameters.DataFactoryName == DataFactoryName))) + .CallBase() + .Verifiable(); + + dataFactoriesClientMock.Setup( + c => + c.CreateOrUpdateLinkedService(ResourceGroupName, DataFactoryName, linkedServiceName, rawJsonContent)) + .Returns(expected) + .Verifiable(); + + // Action + cmdlet.File = filePath; + cmdlet.Force = true; + + // Assert + Assert.Throws(() => cmdlet.ExecuteCmdlet()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void InvalidJsonLinkedService() + { + string malformedJson = rawJsonContent.Replace(":", "-"); + + dataFactoriesClientMock.Setup(c => c.ReadJsonFileContent(It.IsAny())) + .Returns(malformedJson) + .Verifiable(); + + // Action + cmdlet.File = filePath; + cmdlet.Force = true; + + Assert.Throws(() => cmdlet.ExecuteCmdlet()); + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewPipelineTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewPipelineTests.cs new file mode 100644 index 000000000000..434e13a917a2 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewPipelineTests.cs @@ -0,0 +1,144 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.Azure.Management.DataFactories.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using Xunit; + +namespace Microsoft.Azure.Commands.DataFactories.Test.UnitTests +{ + public class NewPipelineTests : DataFactoryUnitTestBase + { + private const string pipelineName = "foo1"; + + private const string filePath = "pipeline.json"; + + private const string rawJsonContent = @"{ + name: ""foo"", + properties: + { + description : ""Sample Data Pipeline"" + } +}"; + + private NewAzureDataFactoryPipelineCommand cmdlet; + + public NewPipelineTests() + { + base.SetupTest(); + + cmdlet = new NewAzureDataFactoryPipelineCommand() + { + CommandRuntime = commandRuntimeMock.Object, + DataFactoryClient = dataFactoriesClientMock.Object, + Name = pipelineName, + DataFactoryName = DataFactoryName, + ResourceGroupName = ResourceGroupName + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanCreatePipeline() + { + // Arrange + Pipeline expected = new Pipeline() + { + Name = pipelineName, + Properties = new PipelineProperties() { ProvisioningState = "Succeeded" } + }; + + dataFactoriesClientMock.Setup(c => c.ReadJsonFileContent(It.IsAny())) + .Returns(rawJsonContent) + .Verifiable(); + + dataFactoriesClientMock.Setup( + c => + c.CreatePSPipeline( + It.Is( + parameters => + parameters.Name == pipelineName && + parameters.ResourceGroupName == ResourceGroupName && + parameters.DataFactoryName == DataFactoryName))) + .CallBase() + .Verifiable(); + + dataFactoriesClientMock.Setup( + c => + c.CreateOrUpdatePipeline(ResourceGroupName, DataFactoryName, pipelineName, rawJsonContent)) + .Returns(expected) + .Verifiable(); + + // Action + cmdlet.File = filePath; + cmdlet.Force = true; + cmdlet.ExecuteCmdlet(); + + // Assert + dataFactoriesClientMock.VerifyAll(); + + commandRuntimeMock.Verify( + f => + f.WriteObject( + It.Is( + p => + ResourceGroupName == p.ResourceGroupName && + DataFactoryName == p.DataFactoryName && + expected.Name == p.PipelineName)), + Times.Once()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanThrowIfPipelineProvisioningFailed() + { + // Arrange + Pipeline expected = new Pipeline() + { + Name = pipelineName, + Properties = new PipelineProperties() { ProvisioningState = "Failed" } + }; + + dataFactoriesClientMock.Setup(c => c.ReadJsonFileContent(It.IsAny())) + .Returns(rawJsonContent) + .Verifiable(); + + dataFactoriesClientMock.Setup( + c => + c.CreatePSPipeline( + It.Is( + parameters => + parameters.Name == pipelineName && + parameters.ResourceGroupName == ResourceGroupName && + parameters.DataFactoryName == DataFactoryName))) + .CallBase() + .Verifiable(); + + dataFactoriesClientMock.Setup( + c => + c.CreateOrUpdatePipeline(ResourceGroupName, DataFactoryName, pipelineName, rawJsonContent)) + .Returns(expected) + .Verifiable(); + + // Action + cmdlet.File = filePath; + cmdlet.Force = true; + + // Assert + Assert.Throws(() => cmdlet.ExecuteCmdlet()); + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewTableTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewTableTests.cs new file mode 100644 index 000000000000..07eb920efeab --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/NewTableTests.cs @@ -0,0 +1,162 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.Azure.Management.DataFactories.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using Xunit; + +namespace Microsoft.Azure.Commands.DataFactories.Test.UnitTests +{ + public class NewTableTests : DataFactoryUnitTestBase + { + private const string tableName = "foo1"; + + private const string filePath = "table.json"; + + private const string rawJsonContent = @" +{ + name: ""foo2"", + properties: + { + structure: + [ + { name: ""slicetimestamp"", position: 0, type: ""String""}, + { name: ""projectname"", position: 1, type: ""String""}, + { name: ""pageviews"", position: 2, type: ""Decimal""} + ], + location: + { + type: ""AzureBlobLocation"", + blobPath: ""$$Text.Format('wikidatagateway/wikisampledataout/{0:yyyyMMddHH}', SliceStart)"", + tableName: ""LinkedService-CuratedWikiData"" + }, + availability: + { + frequency: ""Hour"", + interval: 1 + } + } +} +"; + + private NewAzureDataFactoryTableCommand cmdlet; + + public NewTableTests() + { + base.SetupTest(); + + cmdlet = new NewAzureDataFactoryTableCommand() + { + CommandRuntime = commandRuntimeMock.Object, + DataFactoryClient = dataFactoriesClientMock.Object, + Name = tableName, + DataFactoryName = DataFactoryName, + ResourceGroupName = ResourceGroupName + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanCreateTable() + { + // Arrange + Table expected = new Table() + { + Name = tableName, + Properties = new TableProperties() { ProvisioningState = "Succeeded" } + }; + + dataFactoriesClientMock.Setup(c => c.ReadJsonFileContent(It.IsAny())) + .Returns(rawJsonContent) + .Verifiable(); + + dataFactoriesClientMock.Setup( + c => + c.CreatePSTable( + It.Is( + parameters => + parameters.Name == tableName && + parameters.ResourceGroupName == ResourceGroupName && + parameters.DataFactoryName == DataFactoryName))) + .CallBase() + .Verifiable(); + + dataFactoriesClientMock.Setup( + c => + c.CreateOrUpdateTable(ResourceGroupName, DataFactoryName, tableName, rawJsonContent)) + .Returns(expected) + .Verifiable(); + + // Action + cmdlet.File = filePath; + cmdlet.Force = true; + cmdlet.ExecuteCmdlet(); + + // Assert + dataFactoriesClientMock.VerifyAll(); + + commandRuntimeMock.Verify( + f => + f.WriteObject( + It.Is( + tbl => + ResourceGroupName == tbl.ResourceGroupName && + DataFactoryName == tbl.DataFactoryName && + expected.Name == tbl.TableName)), + Times.Once()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanThrowIfTableProvisioningFailed() + { + // Arrange + Table expected = new Table() + { + Name = tableName, + Properties = new TableProperties() { ProvisioningState = "Failed" } + }; + + dataFactoriesClientMock.Setup(c => c.ReadJsonFileContent(It.IsAny())) + .Returns(rawJsonContent) + .Verifiable(); + + dataFactoriesClientMock.Setup( + c => + c.CreatePSTable( + It.Is( + parameters => + parameters.Name == tableName && + parameters.ResourceGroupName == ResourceGroupName && + parameters.DataFactoryName == DataFactoryName))) + .CallBase() + .Verifiable(); + + dataFactoriesClientMock.Setup( + c => + c.CreateOrUpdateTable(ResourceGroupName, DataFactoryName, tableName, rawJsonContent)) + .Returns(expected) + .Verifiable(); + + // Action + cmdlet.File = filePath; + cmdlet.Force = true; + + // Assert + Assert.Throws(() => cmdlet.ExecuteCmdlet()); + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemoveAzureDataFactoryGatewayTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemoveAzureDataFactoryGatewayTests.cs new file mode 100644 index 000000000000..36bb1f793afc --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemoveAzureDataFactoryGatewayTests.cs @@ -0,0 +1,59 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.DataFactories; +using Microsoft.Azure.Commands.DataFactories.Test; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.Test.Gateway +{ + public class RemoveAzureDataFactoryGatewayTests : DataFactoryUnitTestBase + { + private RemoveAzureDataFactoryGatewayCommand _cmdlet; + + public RemoveAzureDataFactoryGatewayTests() + { + base.SetupTest(); + + _cmdlet = new RemoveAzureDataFactoryGatewayCommand + { + CommandRuntime = commandRuntimeMock.Object, + DataFactoryClient = dataFactoriesClientMock.Object, + ResourceGroupName = ResourceGroupName, + Force = true + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanRemoveGateway() + { + this.dataFactoriesClientMock.Setup(f => f.DeleteGateway(ResourceGroupName, DataFactoryName, GatewayName)) + .Verifiable(); + + commandRuntimeMock.Setup(f => f.ShouldProcess(It.IsAny(), It.IsAny())).Returns(true).Verifiable(); + + _cmdlet.Name = GatewayName; + _cmdlet.DataFactoryName = DataFactoryName; + + _cmdlet.ExecuteCmdlet(); + + dataFactoriesClientMock.VerifyAll(); + + commandRuntimeMock.Verify(f => f.WriteObject(true), Times.Once()); + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemoveDataFactoryTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemoveDataFactoryTests.cs new file mode 100644 index 000000000000..8b9bb72d7429 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemoveDataFactoryTests.cs @@ -0,0 +1,64 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Net; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using Xunit; + +namespace Microsoft.Azure.Commands.DataFactories.Test.UnitTests +{ + public class RemoveDataFactoryTests : DataFactoryUnitTestBase + { + private RemoveAzureDataFactoryCommand cmdlet; + + public RemoveDataFactoryTests() + { + base.SetupTest(); + + cmdlet = new RemoveAzureDataFactoryCommand() + { + CommandRuntime = commandRuntimeMock.Object, + DataFactoryClient = dataFactoriesClientMock.Object, + Name = DataFactoryName, + ResourceGroupName = ResourceGroupName, + Force = true + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanRemoveDataFactory() + { + HttpStatusCode expectedStatusCode = HttpStatusCode.OK; + + // Arrange + dataFactoriesClientMock.Setup(f => f.DeleteDataFactory(ResourceGroupName, DataFactoryName)) + .Returns(expectedStatusCode) + .Verifiable(); + + commandRuntimeMock.Setup(f => f.ShouldProcess(It.IsAny(), It.IsAny())) + .Returns(true) + .Verifiable(); + + // Action + cmdlet.ExecuteCmdlet(); + + // Assert + dataFactoriesClientMock.VerifyAll(); + + commandRuntimeMock.VerifyAll(); + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemoveHubTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemoveHubTests.cs new file mode 100644 index 000000000000..ab2de34956cc --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemoveHubTests.cs @@ -0,0 +1,69 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Net; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using Xunit; + +namespace Microsoft.Azure.Commands.DataFactories.Test +{ + public class RemoveHubTests : DataFactoryUnitTestBase + { + private const string hubName = "foo"; + + private RemoveAzureDataFactoryHubCommand cmdlet; + + public RemoveHubTests() + { + base.SetupTest(); + + cmdlet = new RemoveAzureDataFactoryHubCommand() + { + CommandRuntime = commandRuntimeMock.Object, + DataFactoryClient = dataFactoriesClientMock.Object, + Name = hubName, + ResourceGroupName = ResourceGroupName, + DataFactoryName = DataFactoryName, + Force = true + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanRemoveHub() + { + HttpStatusCode expectedStatusCode = HttpStatusCode.OK; + + // Arrange + dataFactoriesClientMock.Setup( + f => f.DeleteHub(ResourceGroupName, DataFactoryName, hubName)) + .Returns(expectedStatusCode) + .Verifiable(); + + commandRuntimeMock.Setup(f => f.ShouldProcess(It.IsAny(), It.IsAny())) + .Returns(true) + .Verifiable(); + + // Action + cmdlet.ExecuteCmdlet(); + + // Assert + dataFactoriesClientMock.VerifyAll(); + + commandRuntimeMock.VerifyAll(); + } + + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemoveLinkedServiceTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemoveLinkedServiceTests.cs new file mode 100644 index 000000000000..4816749b8d76 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemoveLinkedServiceTests.cs @@ -0,0 +1,68 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Net; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using Xunit; + +namespace Microsoft.Azure.Commands.DataFactories.Test.UnitTests +{ + public class RemoveLinkedServiceTests : DataFactoryUnitTestBase + { + private const string linkedServiceName = "foo"; + + private RemoveAzureDataFactoryLinkedServiceCommand cmdlet; + + public RemoveLinkedServiceTests() + { + base.SetupTest(); + + cmdlet = new RemoveAzureDataFactoryLinkedServiceCommand() + { + CommandRuntime = commandRuntimeMock.Object, + DataFactoryClient = dataFactoriesClientMock.Object, + Name = linkedServiceName, + ResourceGroupName = ResourceGroupName, + DataFactoryName = DataFactoryName, + Force = true + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanRemoveLinkedService() + { + HttpStatusCode expectedStatusCode = HttpStatusCode.OK; + + // Arrange + dataFactoriesClientMock.Setup( + f => f.DeleteLinkedService(ResourceGroupName, DataFactoryName, linkedServiceName)) + .Returns(expectedStatusCode) + .Verifiable(); + + commandRuntimeMock.Setup(f => f.ShouldProcess(It.IsAny(), It.IsAny())) + .Returns(true) + .Verifiable(); + + // Action + cmdlet.ExecuteCmdlet(); + + // Assert + dataFactoriesClientMock.VerifyAll(); + + commandRuntimeMock.VerifyAll(); + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemovePipelineTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemovePipelineTests.cs new file mode 100644 index 000000000000..f9072a552167 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemovePipelineTests.cs @@ -0,0 +1,68 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Net; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using Xunit; + +namespace Microsoft.Azure.Commands.DataFactories.Test.UnitTests +{ + public class RemovePipelineTests : DataFactoryUnitTestBase + { + private const string pipelineName = "foo"; + + private RemoveAzureDataFactoryPipelineCommand cmdlet; + + public RemovePipelineTests() + { + base.SetupTest(); + + cmdlet = new RemoveAzureDataFactoryPipelineCommand() + { + CommandRuntime = commandRuntimeMock.Object, + DataFactoryClient = dataFactoriesClientMock.Object, + Name = pipelineName, + ResourceGroupName = ResourceGroupName, + DataFactoryName = DataFactoryName, + Force = true + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanRemovePipeline() + { + HttpStatusCode expectedStatusCode = HttpStatusCode.OK; + + // Arrange + dataFactoriesClientMock.Setup( + f => f.DeletePipeline(ResourceGroupName, DataFactoryName, pipelineName)) + .Returns(expectedStatusCode) + .Verifiable(); + + commandRuntimeMock.Setup(f => f.ShouldProcess(It.IsAny(), It.IsAny())) + .Returns(true) + .Verifiable(); + + // Action + cmdlet.ExecuteCmdlet(); + + // Assert + dataFactoriesClientMock.VerifyAll(); + + commandRuntimeMock.VerifyAll(); + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemoveTableTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemoveTableTests.cs new file mode 100644 index 000000000000..3e1eeca04607 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/RemoveTableTests.cs @@ -0,0 +1,68 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Net; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using Xunit; + +namespace Microsoft.Azure.Commands.DataFactories.Test.UnitTests +{ + public class RemoveTableTests : DataFactoryUnitTestBase + { + private const string tableName = "foo"; + + private RemoveAzureDataFactoryTableCommand cmdlet; + + public RemoveTableTests() + { + base.SetupTest(); + + cmdlet = new RemoveAzureDataFactoryTableCommand() + { + CommandRuntime = commandRuntimeMock.Object, + DataFactoryClient = dataFactoriesClientMock.Object, + Name = tableName, + ResourceGroupName = ResourceGroupName, + DataFactoryName = DataFactoryName, + Force = true + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanRemoveTable() + { + HttpStatusCode expectedStatusCode = HttpStatusCode.OK; + + // Arrange + dataFactoriesClientMock.Setup( + f => f.DeleteTable(ResourceGroupName, DataFactoryName, tableName)) + .Returns(expectedStatusCode) + .Verifiable(); + + commandRuntimeMock.Setup(f => f.ShouldProcess(It.IsAny(), It.IsAny())) + .Returns(true) + .Verifiable(); + + // Action + cmdlet.ExecuteCmdlet(); + + // Assert + dataFactoriesClientMock.VerifyAll(); + + commandRuntimeMock.VerifyAll(); + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/SaveAzureDataFactoryTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/SaveAzureDataFactoryTests.cs new file mode 100644 index 000000000000..148cadabff1b --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/SaveAzureDataFactoryTests.cs @@ -0,0 +1,98 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.DataFactories; +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.Azure.Commands.DataFactories.Test; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Microsoft.WindowsAzure.Storage.Auth; +using Moq; +using System; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.Test.DataFactory +{ + public class SaveDataFactoryRunLogTests : DataFactoryUnitTestBase + { + private SaveAzureDataFactoryLog _cmdlet; + + private string _dataSliceRunId; + + public SaveDataFactoryRunLogTests() + { + base.SetupTest(); + + this._dataSliceRunId = Guid.NewGuid().ToString(); + + this._cmdlet = new SaveAzureDataFactoryLog() + { + CommandRuntime = this.commandRuntimeMock.Object, + DataFactoryClient = this.dataFactoriesClientMock.Object, + ResourceGroupName = ResourceGroupName, + DataFactoryName = DataFactoryName, + Id = this._dataSliceRunId, + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanSaveDataFactoryRunLog() + { + Uri sharedAccessSignature = + new Uri(@"https://fakeaccount.blob.core.windows.net/sascontainer?sv=2012-02-12"); + PSRunLogInfo runLogInfo = new PSRunLogInfo(sharedAccessSignature); + Assert.Equal("?sv=2012-02-12", runLogInfo.SasToken); + Assert.Equal(@"https://fakeaccount.blob.core.windows.net/sascontainer?sv=2012-02-12", runLogInfo.SasUri); + Assert.Equal("fakeaccount", runLogInfo.StorageAccountName); + Assert.Equal("sascontainer", runLogInfo.Container); + + dataFactoriesClientMock.Setup( + f => + f.CreatePSDataFactory( + It.Is( + parameters => + parameters.ResourceGroupName == ResourceGroupName && + parameters.DataFactoryName == DataFactoryName && + parameters.Location == Location))) + .CallBase() + .Verifiable(); + + // Arrange + this.dataFactoriesClientMock.Setup( + f => + f.GetDataSliceRunLogsSharedAccessSignature(ResourceGroupName, DataFactoryName, this._dataSliceRunId)) + .Returns(runLogInfo); + + this.dataFactoriesClientMock.Setup( + f => + f.DownloadFileToBlob( + It.Is( + parameters => + parameters.Credentials == new StorageCredentials(runLogInfo.SasToken) && + parameters.SasUri == new Uri(runLogInfo.SasUri) && + parameters.Directory == @"c:\"))); + + // Action + this._cmdlet.ExecuteCmdlet(); + + // Assert + this.dataFactoriesClientMock.Verify( + f => + f.GetDataSliceRunLogsSharedAccessSignature(ResourceGroupName, DataFactoryName, this._dataSliceRunId), + Times.Once()); + + this.commandRuntimeMock.Verify(f => f.WriteObject(runLogInfo), Times.Once()); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/SetDataFactoryGatewayTests.cs b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/SetDataFactoryGatewayTests.cs new file mode 100644 index 000000000000..ed608d69654f --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/UnitTests/SetDataFactoryGatewayTests.cs @@ -0,0 +1,72 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.DataFactories; +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.Azure.Commands.DataFactories.Test; +using Microsoft.Azure.Management.DataFactories.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Microsoft.WindowsAzure.Commands.Utilities; +using Moq; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.Test.Gateway +{ + public class SetAzureDataFactoryGatewayTests : DataFactoryUnitTestBase + { + private SetAzureDataFactoryGatewayCommand _cmdlet; + + public SetAzureDataFactoryGatewayTests() + { + base.SetupTest(); + + _cmdlet = new SetAzureDataFactoryGatewayCommand + { + CommandRuntime = commandRuntimeMock.Object, + DataFactoryClient = dataFactoriesClientMock.Object, + ResourceGroupName = ResourceGroupName + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CanSetGateway() + { + const string description = "New gateway description for test"; + + var expectedOutput = new PSDataFactoryGateway + { + Name = GatewayName, + Location = Location, + Status = GatewayStatus.NeedRegistration, + Description = description + }; + + dataFactoriesClientMock.Setup( + f => f.PatchGateway(ResourceGroupName, DataFactoryName, + It.Is + (parameters => parameters.Name == GatewayName && parameters.Description == description))) + .Returns(expectedOutput).Verifiable(); + + _cmdlet.Name = GatewayName; + _cmdlet.DataFactoryName = DataFactoryName; + _cmdlet.Description = expectedOutput.Description; + + _cmdlet.ExecuteCmdlet(); + + dataFactoriesClientMock.VerifyAll(); + commandRuntimeMock.Verify(f => f.WriteObject(expectedOutput), Times.Once()); + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories.Test/packages.config b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/packages.config new file mode 100644 index 000000000000..7a9166d436f8 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories.Test/packages.config @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/CloudExceptionExtensions.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/CloudExceptionExtensions.cs new file mode 100644 index 000000000000..1addf9260ae3 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/CloudExceptionExtensions.cs @@ -0,0 +1,53 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Globalization; + +using Microsoft.Azure.Commands.DataFactories.Properties; +using Microsoft.WindowsAzure; + +namespace Microsoft.Azure.Commands.DataFactories +{ + internal static class CloudExceptionExtensions + { + public static CloudException CreateFormattedException(this CloudException cloudException) + { + return new CloudException( + string.Format( + CultureInfo.InvariantCulture, + Resources.FormattedCloudExceptionMessageTemplate, + cloudException.Response.StatusCode, + cloudException.ErrorCode, + cloudException.ErrorMessage, + cloudException.GetRequestId(), + DateTime.UtcNow)); + } + + public static string GetRequestId(this CloudException exception) + { + IEnumerable strings; + + if (exception.Response != null + && exception.Response.Headers != null + && exception.Response.Headers.TryGetValue("x-ms-request-id", out strings)) + { + return string.Join(";", strings); + } + + return string.Empty; + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Commands.DataFactories.csproj b/src/ResourceManager/DataFactories/Commands.DataFactories/Commands.DataFactories.csproj new file mode 100644 index 000000000000..805499fe897b --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Commands.DataFactories.csproj @@ -0,0 +1,236 @@ + + + + + Debug + AnyCPU + {9577252E-0A6B-4D61-86E8-95F7F309A987} + Library + Properties + Microsoft.Azure.Commands.DataFactories + Microsoft.Azure.Commands.DataFactories + v4.5 + 512 + + ..\..\..\ + true + /assemblyCompareMode:StrongNameIgnoringVersion + + + true + full + false + ..\..\..\Package\Debug\ResourceManager\AzureResourceManager\DataFactories + DEBUG;TRACE + prompt + 4 + true + true + false + + + ..\..\..\Package\Release\ResourceManager\AzureResourceManager\DataFactories + TRACE;SIGN + true + pdbonly + AnyCPU + bin\Release\Microsoft.Azure.Commands.Resources.dll.CodeAnalysisLog.xml + true + GlobalSuppressions.cs + prompt + MinimumRecommendedRules.ruleset + ;$(ProgramFiles)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\Rule Sets + ;$(ProgramFiles)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\FxCop\Rules + true + true + MSSharedLibKey.snk + true + false + + + + False + ..\..\..\packages\Microsoft.Azure.Management.DataFactories.0.11.4-preview\lib\net40\Microsoft.Azure.Management.DataFactories.dll + + + ..\..\..\packages\Microsoft.DataFactories.Runtime.0.11.1-preview\lib\net45\Microsoft.DataFactories.Runtime.dll + + + ..\..\..\packages\Microsoft.DataTransfer.Gateway.Encryption.1.0.0-preview\lib\net45\Microsoft.DataTransfer.Gateway.Encryption.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.1\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + False + ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll + + + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + False + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + + + ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll + + + + + + + + + + + + Code + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + True + Resources.resx + + + + + + + + + {65c3a86a-716d-4e7d-ab67-1db00b3bf72d} + Commands.Common.Storage + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + {c60342b1-47d3-4a0e-8081-9b97ce60b7af} + Commands.Profile + + + + + Designer + Always + + + + + Designer + + + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + + + Always + + + + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Constants.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Constants.cs new file mode 100644 index 000000000000..2aadf582d145 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Constants.cs @@ -0,0 +1,49 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.Azure.Commands.DataFactories +{ + internal static class Constants + { + public static readonly TimeSpan DefaultSliceActivePeriodDuration = TimeSpan.FromHours(48); + + public const string DataFactory = "AzureDataFactory"; + + public const string LinkedService = "AzureDataFactoryLinkedService"; + + public const string Gateway = "AzureDataFactoryGateway"; + + public const string GatewayKey = "AzureDataFactoryGatewayKey"; + + public const string EncryptString = "AzureDataFactoryEncryptValue"; + + public const string Table = "AzureDataFactoryTable"; + + public const string Pipeline = "AzureDataFactoryPipeline"; + + public const string PipelineActivePeriod = "AzureDataFactoryPipelineActivePeriod"; + + public const string Run = "AzureDataFactoryRun"; + + public const string DataSlice = "AzureDataFactorySlice"; + + public const string SliceStatus = "AzureDataFactorySliceStatus"; + + public const string Hub = "AzureDataFactoryHub"; + + public const string RunLog = "AzureDataFactoryLog"; + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactories/GetAzureDataFactoryCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactories/GetAzureDataFactoryCommand.cs new file mode 100644 index 000000000000..2a98b650f276 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactories/GetAzureDataFactoryCommand.cs @@ -0,0 +1,60 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.Azure.Commands.DataFactories.Models; + +namespace Microsoft.Azure.Commands.DataFactories +{ + [Cmdlet(VerbsCommon.Get, Constants.DataFactory), OutputType(typeof(List), typeof(PSDataFactory))] + public class GetAzureDataFactoryCommand : DataFactoryBaseCmdlet + { + [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory name.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public override void ExecuteCmdlet() + { + // ValidationNotNullOrEmpty doesn't handle whitespaces well + if (Name != null && string.IsNullOrWhiteSpace(Name)) + { + throw new PSArgumentNullException("Name"); + } + + DataFactoryFilterOptions filterOptions = new DataFactoryFilterOptions() + { + Name = Name, + ResourceGroupName = ResourceGroupName + }; + + List dataFactories = DataFactoryClient.FilterPSDataFactories(filterOptions); + + if (dataFactories != null) + { + if (dataFactories.Count == 1 && Name != null) + { + WriteObject(dataFactories[0]); + } + else + { + WriteObject(dataFactories, true); + } + } + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactories/NewAzureDataFactoryCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactories/NewAzureDataFactoryCommand.cs new file mode 100644 index 000000000000..bd6e0676fb78 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactories/NewAzureDataFactoryCommand.cs @@ -0,0 +1,58 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.Azure.Commands.DataFactories.Models; + +namespace Microsoft.Azure.Commands.DataFactories +{ + [Cmdlet(VerbsCommon.New, Constants.DataFactory), OutputType(typeof(PSDataFactory))] + public class NewAzureDataFactoryCommand : DataFactoryBaseCmdlet + { + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory name.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The geographic region to create the data factory.")] + [ValidateNotNullOrEmpty] + public string Location { get; set; } + + [Parameter(Position = 3, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The tags of the data factory.")] + public Hashtable Tags { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Don't ask for confirmation.")] + public SwitchParameter Force { get; set; } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public override void ExecuteCmdlet() + { + CreatePSDataFactoryParameters parameters = new CreatePSDataFactoryParameters() + { + ResourceGroupName = ResourceGroupName, + DataFactoryName = Name, + Location = Location, + Tags = Tags, + Force = Force.IsPresent, + ConfirmAction = ConfirmAction + }; + + WriteObject(DataFactoryClient.CreatePSDataFactory(parameters)); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactories/RemoveAzureDataFactoryCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactories/RemoveAzureDataFactoryCommand.cs new file mode 100644 index 000000000000..213d73f87646 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactories/RemoveAzureDataFactoryCommand.cs @@ -0,0 +1,80 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Globalization; +using System.Management.Automation; +using System.Net; +using System.Security.Permissions; +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.Azure.Commands.DataFactories.Properties; + +namespace Microsoft.Azure.Commands.DataFactories +{ + [Cmdlet(VerbsCommon.Remove, Constants.DataFactory, DefaultParameterSetName = ByFactoryName)] + public class RemoveAzureDataFactoryCommand : DataFactoryBaseCmdlet + { + [Parameter(ParameterSetName = ByFactoryName, Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory name.")] + [Alias("DataFactoryName")] + public string Name { get; set; } + + [Parameter(ParameterSetName = ByFactoryObject, Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory object.")] + public PSDataFactory DataFactory { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Don't ask for confirmation.")] + public SwitchParameter Force { get; set; } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public override void ExecuteCmdlet() + { + if (ParameterSetName == ByFactoryObject) + { + if (DataFactory == null) + { + throw new PSArgumentNullException(string.Format(CultureInfo.InvariantCulture, Resources.DataFactoryArgumentInvalid)); + } + + Name = DataFactory.DataFactoryName; + ResourceGroupName = DataFactory.ResourceGroupName; + } + + ConfirmAction( + Force.IsPresent, + string.Format( + CultureInfo.InvariantCulture, + Resources.DataFactoryConfirmationMessage, + Name, + ResourceGroupName), + string.Format( + CultureInfo.InvariantCulture, + Resources.DataFactoryRemoving, + Name, + ResourceGroupName), + Name, + ExecuteDelete); + } + + public void ExecuteDelete() + { + HttpStatusCode response = DataFactoryClient.DeleteDataFactory(ResourceGroupName, Name); + + if (response == HttpStatusCode.NoContent) + { + WriteWarning(string.Format(CultureInfo.InvariantCulture, Resources.DataFactoryNotFound, Name, + ResourceGroupName)); + } + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactoryBaseCmdlet.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactoryBaseCmdlet.cs new file mode 100644 index 000000000000..163d33796f04 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactoryBaseCmdlet.cs @@ -0,0 +1,87 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Management.Automation; +using Microsoft.Azure.Commands.DataFactories.Properties; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.Azure.Commands.DataFactories +{ + public abstract class DataFactoryBaseCmdlet : AzurePSCmdlet + { + private DataFactoryClient dataFactoryClient; + + protected const string ByFactoryObject = "ByFactoryObject"; + protected const string ByFactoryName = "ByFactoryName"; + + [Parameter(ParameterSetName = ByFactoryName, Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The resource group name.")] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + internal DataFactoryClient DataFactoryClient + { + get + { + if (this.dataFactoryClient == null) + { + this.dataFactoryClient = new DataFactoryClient(CurrentContext); + } + return this.dataFactoryClient; + } + set + { + this.dataFactoryClient = value; + } + } + + protected override void WriteExceptionError(Exception exception) + { + // Override the default error message into a formatted message which contains Request Id + CloudException cloudException = exception as CloudException; + if (cloudException != null) + { + exception = cloudException.CreateFormattedException(); + } + + base.WriteExceptionError(exception); + } + + protected string ResolveResourceName(string rawJsonContent, string nameFromCmdletContext, string resourceType) + { + string nameExtractedFromJson = DataFactoryCommonUtilities.ExtractNameFromJson(rawJsonContent, resourceType); + + // Read the name from the JSON content if user didn't provide name with -Name parameter + string resolvedResourceName = string.IsNullOrWhiteSpace(nameFromCmdletContext) + ? nameExtractedFromJson + : nameFromCmdletContext; + + // Show a message that if names do not match, name specified with -Name parameter will be used. + if (string.Compare(resolvedResourceName, nameExtractedFromJson, StringComparison.OrdinalIgnoreCase) != 0) + { + WriteVerbose(string.Format( + CultureInfo.InvariantCulture, + Resources.ExtractedNameFromJsonMismatchWarning, + resourceType, + resolvedResourceName, + nameExtractedFromJson)); + } + + return resolvedResourceName; + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactoryCommonUtilities.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactoryCommonUtilities.cs new file mode 100644 index 000000000000..cbf016351a4c --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/DataFactoryCommonUtilities.cs @@ -0,0 +1,116 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using Microsoft.Azure.Commands.DataFactories.Properties; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Newtonsoft.Json; + +namespace Microsoft.Azure.Commands.DataFactories +{ + public static class DataFactoryCommonUtilities + { + public static string ExtractNameFromJson(string jsonText, string resourceType) + { + Dictionary jsonKeyValuePairs; + + try + { + jsonKeyValuePairs = JsonUtilities.DeserializeJson(jsonText, true); + } + catch (Exception exception) + { + throw new JsonSerializationException(string.Format(CultureInfo.InvariantCulture, Resources.InvalidJson, exception.Message, resourceType)); + } + + const string NameTagInJson = "Name"; + + foreach (var key in jsonKeyValuePairs.Keys) + { + if (string.Compare(NameTagInJson, key, StringComparison.OrdinalIgnoreCase) == 0) + { + return (string)jsonKeyValuePairs[key]; + } + } + + return string.Empty; + } + + public static Dictionary ExtractTagsFromJson(string jsonText) + { + Dictionary jsonKeyValuePairs = JsonUtilities.DeserializeJson(jsonText); + const string TagsKeyInJson = "tags"; + + foreach (var key in jsonKeyValuePairs.Keys) + { + if (string.Compare(TagsKeyInJson, key, StringComparison.OrdinalIgnoreCase) == 0) + { + var tags = (jsonKeyValuePairs[key] as Dictionary).ToDictionary( + p => p.Key, + p => (string)p.Value); + + return tags; + } + } + + return null; + } + + public static Dictionary ToDictionary(this Hashtable hashTable) + { + return hashTable.Cast().ToDictionary(kvp => kvp.Key.ToString(), kvp => kvp.Value.ToString()); + } + + public static bool TagsAreEqual(IDictionary first, IDictionary second) + { + bool equal = false; + if (first.Count == second.Count) + { + equal = true; + foreach (var pair in first) + { + string value; + if (second.TryGetValue(pair.Key, out value)) + { + if (!value.Equals(pair.Value)) + { + equal = false; + break; + } + } + else + { + // Require key be present. + equal = false; + break; + } + } + } + + return equal; + } + + public static bool IsSucceededProvisioningState(string provisioningState) + { + return + string.Compare(provisioningState, OperationStatus.Succeeded.ToString(), + StringComparison.OrdinalIgnoreCase) == 0; + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/DataSlices/DataSliceContextBaseCmdlet.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/DataSlices/DataSliceContextBaseCmdlet.cs new file mode 100644 index 000000000000..bc7034f66ea6 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/DataSlices/DataSliceContextBaseCmdlet.cs @@ -0,0 +1,57 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.DataFactories.Models; +using System; +using System.Management.Automation; + +namespace Microsoft.Azure.Commands.DataFactories +{ + public abstract class DataSliceContextBaseCmdlet : DataFactoryBaseCmdlet + { + private DateTime _endDateTime; + + [Parameter(ParameterSetName = ByFactoryObject, Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory object.")] + public PSDataFactory DataFactory { get; set; } + + [Parameter(ParameterSetName = ByFactoryName, Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory name.")] + [ValidateNotNullOrEmpty] + public string DataFactoryName { get; set; } + + [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The table name.")] + [ValidateNotNullOrEmpty] + public string TableName { get; set; } + + [Parameter(Position = 3, Mandatory = true, HelpMessage = "The data slice range start time.")] + public DateTime StartDateTime { get; set; } + + [Parameter(Position = 4, Mandatory = false, HelpMessage = "The data slice range end time.")] + public DateTime EndDateTime + { + get + { + return _endDateTime == default(DateTime) + ? StartDateTime + Constants.DefaultSliceActivePeriodDuration + : _endDateTime; + } + set + { + _endDateTime = value; + } + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/DataSlices/GetAzureDataFactoryRunCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/DataSlices/GetAzureDataFactoryRunCommand.cs new file mode 100644 index 000000000000..8c999c089694 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/DataSlices/GetAzureDataFactoryRunCommand.cs @@ -0,0 +1,73 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.Azure.Commands.DataFactories.Models; +using System.Collections; +using System.Globalization; +using Microsoft.Azure.Commands.DataFactories.Properties; + +namespace Microsoft.Azure.Commands.DataFactories +{ + [Cmdlet(VerbsCommon.Get, Constants.Run, DefaultParameterSetName = ByFactoryName), OutputType(typeof(List))] + public class GetAzureDataFactoryRunCommand : DataFactoryBaseCmdlet + { + [Parameter(ParameterSetName = ByFactoryObject, Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory object.")] + public PSDataFactory DataFactory { get; set; } + + [Parameter(ParameterSetName = ByFactoryName, Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory name.")] + [ValidateNotNullOrEmpty] + public string DataFactoryName { get; set; } + + [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The table name.")] + [ValidateNotNullOrEmpty] + public string TableName { get; set; } + + [Parameter(Position = 3, Mandatory = true, HelpMessage = "The start time of the data slice queried.")] + public DateTime StartDateTime { get; set; } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public override void ExecuteCmdlet() + { + if (ParameterSetName == ByFactoryObject) + { + if (DataFactory == null) + { + throw new PSArgumentNullException(string.Format(CultureInfo.InvariantCulture, Resources.DataFactoryArgumentInvalid)); + } + + DataFactoryName = DataFactory.DataFactoryName; + ResourceGroupName = DataFactory.ResourceGroupName; + } + + var dataSliceRuns = DataFactoryClient.ListDataSliceRuns( + ResourceGroupName, DataFactoryName, TableName, StartDateTime); + + if (dataSliceRuns == null || dataSliceRuns.Count == 0) + { + WriteWarning(string.Format( + CultureInfo.InvariantCulture, + Resources.NoDataSliceFound)); + } + + WriteObject(dataSliceRuns); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/DataSlices/GetAzureDataFactorySliceCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/DataSlices/GetAzureDataFactorySliceCommand.cs new file mode 100644 index 000000000000..b4128dbb37a4 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/DataSlices/GetAzureDataFactorySliceCommand.cs @@ -0,0 +1,56 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.Azure.Commands.DataFactories.Properties; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Management.Automation; +using System.Security.Permissions; + +namespace Microsoft.Azure.Commands.DataFactories +{ + [Cmdlet(VerbsCommon.Get, Constants.DataSlice, DefaultParameterSetName = ByFactoryName), OutputType(typeof(List))] + public class GetAzureDataFactorySliceCommand : DataSliceContextBaseCmdlet + { + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public override void ExecuteCmdlet() + { + if (ParameterSetName == ByFactoryObject) + { + if (DataFactory == null) + { + throw new PSArgumentNullException(string.Format(CultureInfo.InvariantCulture, Resources.DataFactoryArgumentInvalid)); + } + + DataFactoryName = DataFactory.DataFactoryName; + ResourceGroupName = DataFactory.ResourceGroupName; + } + + var dataSlices = DataFactoryClient.ListDataSlices( + ResourceGroupName, DataFactoryName, TableName, StartDateTime, + EndDateTime); + + if (dataSlices == null || dataSlices.Count == 0) + { + WriteWarning(string.Format( + CultureInfo.InvariantCulture, + Resources.NoDataSliceFound)); + } + + WriteObject(dataSlices, true); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/DataSlices/SaveAzureDataFactoryLog.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/DataSlices/SaveAzureDataFactoryLog.cs new file mode 100644 index 000000000000..4bdf828e75f2 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/DataSlices/SaveAzureDataFactoryLog.cs @@ -0,0 +1,145 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.Azure.Commands.DataFactories.Properties; +using Microsoft.WindowsAzure.Storage.Auth; +using System; +using System.Globalization; +using System.IO; +using System.Management.Automation; +using System.Security.AccessControl; +using System.Security.Permissions; + +namespace Microsoft.Azure.Commands.DataFactories +{ + [Cmdlet(VerbsData.Save, Constants.RunLog, DefaultParameterSetName = ByFactoryName), OutputType(typeof(PSRunLogInfo))] + public class SaveAzureDataFactoryLog : DataFactoryBaseCmdlet + { + [Parameter(ParameterSetName = ByFactoryObject, Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory object.")] + public PSDataFactory DataFactory { get; set; } + + [Parameter(ParameterSetName = ByFactoryName, Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory name.")] + [ValidateNotNullOrEmpty] + public string DataFactoryName { get; set; } + + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data slice run id.")] + [ValidateNotNullOrEmpty] + public string Id { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Download logs using the SAS url.")] + public SwitchParameter DownloadLogs { get; set; } + + [Parameter(Position = 2, Mandatory = false, HelpMessage = "Directory to download the log. Default is current directory.")] + public string Output { get; set; } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public override void ExecuteCmdlet() + { + if (ParameterSetName == ByFactoryObject) + { + if (DataFactory == null) + { + throw new PSArgumentNullException(string.Format(CultureInfo.InvariantCulture, Resources.DataFactoryArgumentInvalid)); + } + + DataFactoryName = DataFactory.DataFactoryName; + ResourceGroupName = DataFactory.ResourceGroupName; + } + + PSRunLogInfo runLog = + DataFactoryClient.GetDataSliceRunLogsSharedAccessSignature( + ResourceGroupName, DataFactoryName, Id); + if (DownloadLogs.IsPresent) + { + string directory = string.IsNullOrWhiteSpace(Output) + ? Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + : Output; + + if (!HaveWriteAccess(directory)) + { + throw new IOException(string.Format(CultureInfo.InvariantCulture, Resources.NoWriteAccessToDirectory, directory)); + } + + try + { + DataFactoryClient.DownloadFileToBlob(new BlobDownloadParameters() + { + Directory = directory, + SasUri = new Uri(runLog.SasUri), + Credentials = new StorageCredentials(runLog.SasToken) + }); + } + catch + { + throw new Exception(string.Format(CultureInfo.InvariantCulture, Resources.DownloadFailed, directory)); + } + + WriteWarning(string.Format(CultureInfo.InvariantCulture, Resources.DownloadLogCompleted, directory)); + } + + WriteObject(runLog); + } + + private bool HaveWriteAccess(string directory) + { + bool writeAllow = false; + bool writeDeny = false; + try + { + DirectorySecurity accessControlList = Directory.GetAccessControl(directory); + if (accessControlList == null) + { + return false; + } + + var rules = accessControlList.GetAccessRules(true, true, typeof(System.Security.Principal.SecurityIdentifier)); + + if (rules == null) + { + return false; + } + + foreach (FileSystemAccessRule rule in rules) + { + if ((FileSystemRights.Write & rule.FileSystemRights) != FileSystemRights.Write) + { + continue; + } + + if (rule.AccessControlType == AccessControlType.Allow) + { + writeAllow = true; + } + + else if (rule.AccessControlType == AccessControlType.Deny) + { + writeDeny = true; + } + } + + return writeAllow && !writeDeny; + } + catch + { + return false; + } + + + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/DataSlices/SetAzureDataFactorySliceStatusCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/DataSlices/SetAzureDataFactorySliceStatusCommand.cs new file mode 100644 index 000000000000..9d1126b15d66 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/DataSlices/SetAzureDataFactorySliceStatusCommand.cs @@ -0,0 +1,84 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.DataFactories.Properties; +using Microsoft.Azure.Management.DataFactories.Models; +using System.Collections; +using System.Globalization; +using System.Management.Automation; +using System.Security.Permissions; + +namespace Microsoft.Azure.Commands.DataFactories +{ + [Cmdlet(VerbsCommon.Set, Constants.SliceStatus, DefaultParameterSetName = ByFactoryName), OutputType(typeof(bool))] + public class SetAzureDataFactorySliceStatusCommand : DataSliceContextBaseCmdlet + { + private string _updateType = "Individual"; + + [Parameter(Position = 5, Mandatory = true, HelpMessage = "The data slice status.")] + [ValidateSet( + DataSliceStatus.NotSpecified, + DataSliceStatus.PendingExecution, + DataSliceStatus.InProgress, + DataSliceStatus.Failed, + DataSliceStatus.Ready, + DataSliceStatus.Skip, + DataSliceStatus.Retry, + DataSliceStatus.TimedOut, + DataSliceStatus.PendingValidation, + DataSliceStatus.RetryValidation, + DataSliceStatus.FailedValidation, + DataSliceStatus.LongRetry, + DataSliceStatus.ValidationInProgress, + IgnoreCase = false)] + public string Status { get; set; } + + [Parameter(Position = 6, Mandatory = false, HelpMessage = "The update type.")] + [ValidateSet( + SetSliceStatusType.Individual, + SetSliceStatusType.UpstreamInPipeline, + IgnoreCase = false)] + public string UpdateType + { + get { return _updateType; } + set { _updateType = value; } + } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public override void ExecuteCmdlet() + { + if (ParameterSetName == ByFactoryObject) + { + if (DataFactory == null) + { + throw new PSArgumentNullException(string.Format(CultureInfo.InvariantCulture, Resources.DataFactoryArgumentInvalid)); + } + + DataFactoryName = DataFactory.DataFactoryName; + ResourceGroupName = DataFactory.ResourceGroupName; + } + + DataFactoryClient.SetSliceStatus( + ResourceGroupName, + DataFactoryName, + TableName, + Status, + UpdateType, + StartDateTime, + EndDateTime); + + WriteObject(true); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Encrypt/NewAzureDataFactoryEncryptValueCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Encrypt/NewAzureDataFactoryEncryptValueCommand.cs new file mode 100644 index 000000000000..63444e05db91 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Encrypt/NewAzureDataFactoryEncryptValueCommand.cs @@ -0,0 +1,77 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Management.Automation; +using System.Security; +using System.Security.Permissions; +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.Azure.Commands.DataFactories.Properties; + +namespace Microsoft.Azure.Commands.DataFactories +{ + [Cmdlet(VerbsCommon.New, Constants.EncryptString, DefaultParameterSetName = ByFactoryName), OutputType(typeof(string))] + public class NewAzureDataFactoryEncryptValueCommand : DataFactoryBaseCmdlet + { + [Parameter(ParameterSetName = ByFactoryObject, Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory object.")] + public PSDataFactory DataFactory { get; set; } + + [Parameter(ParameterSetName = ByFactoryName, Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory name.")] + [ValidateNotNullOrEmpty] + public string DataFactoryName { get; set; } + + [Parameter(ParameterSetName = ByFactoryObject, Position = 1, Mandatory = true, HelpMessage = "The value to encrypt.")] + [Parameter(ParameterSetName = ByFactoryName, Position = 2, Mandatory = true, HelpMessage = "The value to encrypt.")] + [ValidateNotNullOrEmpty] + public SecureString Value { get; set; } + + [Parameter(ParameterSetName = ByFactoryObject, Position = 2, Mandatory = false, HelpMessage = "The gateway group name.")] + [Parameter(ParameterSetName = ByFactoryName, Position = 3, Mandatory = false, HelpMessage = "The gateway group name.")] + public string GatewayName { get; set; } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public override void ExecuteCmdlet() + { + if (ParameterSetName == ByFactoryObject) + { + if (DataFactory == null) + { + throw new PSArgumentNullException(string.Format(CultureInfo.InvariantCulture, + Resources.DataFactoryArgumentInvalid)); + } + + DataFactoryName = DataFactory.DataFactoryName; + ResourceGroupName = DataFactory.ResourceGroupName; + } + + string encryptedValue = String.Empty; + + if (String.IsNullOrWhiteSpace(GatewayName)) + { + // Cloud encryption without Gateway + encryptedValue = DataFactoryClient.CloudEncryptString(Value, ResourceGroupName, DataFactoryName); + } + else + { + // On-premises encryption with Gateway + encryptedValue = DataFactoryClient.OnPremisesEncryptString(Value, ResourceGroupName, DataFactoryName, GatewayName); + } + + WriteObject(encryptedValue); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Gateway/GetAzureDataFactoryGatewayCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Gateway/GetAzureDataFactoryGatewayCommand.cs new file mode 100644 index 000000000000..dc229072b55c --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Gateway/GetAzureDataFactoryGatewayCommand.cs @@ -0,0 +1,69 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.Azure.Commands.DataFactories; +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.Azure.Commands.DataFactories.Properties; + +namespace Microsoft.Azure.Commands.DataFactories +{ + [Cmdlet(VerbsCommon.Get, Constants.Gateway, DefaultParameterSetName = ByFactoryName), OutputType(typeof(List), typeof(PSDataFactoryGateway))] + public class GetAzureDataFactoryGatewayCommand : DataFactoryBaseCmdlet + { + [Parameter(ParameterSetName = ByFactoryObject, Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, +HelpMessage = "The data factory object.")] + public PSDataFactory DataFactory { get; set; } + + [Parameter(ParameterSetName = ByFactoryName, Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory name.")] + [ValidateNotNullOrEmpty] + public string DataFactoryName { get; set; } + + [Parameter(Position = 2, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory gateway name.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public override void ExecuteCmdlet() + { + if (ParameterSetName == ByFactoryObject) + { + if (DataFactory == null) + { + throw new PSArgumentNullException(string.Format(CultureInfo.InvariantCulture, Resources.DataFactoryArgumentInvalid)); + } + + DataFactoryName = DataFactory.DataFactoryName; + ResourceGroupName = DataFactory.ResourceGroupName; + } + + if (String.IsNullOrWhiteSpace(Name)) + { + IEnumerable gateways = DataFactoryClient.ListGateways(ResourceGroupName, DataFactoryName); + WriteObject(gateways, true); + } + else + { + PSDataFactoryGateway gateway = DataFactoryClient.GetGateway(ResourceGroupName, DataFactoryName, Name); + WriteObject(gateway); + } + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Gateway/NewAzureDataFactoryGatewayCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Gateway/NewAzureDataFactoryGatewayCommand.cs new file mode 100644 index 000000000000..e6f514a2746c --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Gateway/NewAzureDataFactoryGatewayCommand.cs @@ -0,0 +1,99 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Management.Automation; +using System.Net; +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.Azure.Commands.DataFactories.Properties; +using Microsoft.WindowsAzure; + +namespace Microsoft.Azure.Commands.DataFactories +{ + [Cmdlet(VerbsCommon.New, Constants.Gateway, DefaultParameterSetName = ByFactoryName), OutputType(typeof(PSDataFactoryGateway))] + public class NewAzureDataFactoryGatewayCommand : DataFactoryBaseCmdlet + { + [Parameter(ParameterSetName = ByFactoryObject, Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, +HelpMessage = "The data factory object.")] + public PSDataFactory DataFactory { get; set; } + + [Parameter(ParameterSetName = ByFactoryName, Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory name.")] + [ValidateNotNullOrEmpty] + public string DataFactoryName { get; set; } + + [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory gateway name.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Position = 3, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The geographic region to create the data factory.")] + [ValidateNotNullOrEmpty] + public string Location { get; set; } + + [Parameter(Position = 4, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The description to update.")] + public string Description { get; set; } + + public override void ExecuteCmdlet() + { + if (ParameterSetName == ByFactoryObject) + { + if (DataFactory == null) + { + throw new PSArgumentNullException(string.Format(CultureInfo.InvariantCulture, Resources.DataFactoryArgumentInvalid)); + } + + DataFactoryName = DataFactory.DataFactoryName; + ResourceGroupName = DataFactory.ResourceGroupName; + } + + PSDataFactoryGateway gateway = null; + try + { + gateway = DataFactoryClient.GetGateway(ResourceGroupName, DataFactoryName, Name); + } + catch (CloudException ex) + { + if (ex.Response.StatusCode != HttpStatusCode.NotFound) throw; + } + + if (gateway != null) + { + throw new PSInvalidOperationException(string.Format(CultureInfo.InvariantCulture, Resources.DataFactoryGatewayExists, Name, DataFactoryName)); + } + + var request = new PSDataFactoryGateway + { + Name = Name, + Location = NormalizeLocation(Location), + Description = Description + }; + + PSDataFactoryGateway response = DataFactoryClient.CreateOrUpdateGateway(ResourceGroupName, DataFactoryName, request); + WriteObject(response); + } + + // As a nested resource of data factory, CSM will not normalize location when + // creating gateway, so we have to do this by ourselves. + private static string NormalizeLocation(string location) + { + return String.IsNullOrEmpty(location) + ? String.Empty + : location.Trim().Replace(" ", String.Empty).ToUpperInvariant(); + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Gateway/NewAzureDataFactoryGatewayKeyCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Gateway/NewAzureDataFactoryGatewayKeyCommand.cs new file mode 100644 index 000000000000..7b33288d3427 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Gateway/NewAzureDataFactoryGatewayKeyCommand.cs @@ -0,0 +1,57 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Management.Automation; +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.Azure.Commands.DataFactories.Properties; + +namespace Microsoft.Azure.Commands.DataFactories +{ + [Cmdlet(VerbsCommon.New, Constants.GatewayKey, DefaultParameterSetName = ByFactoryName), OutputType(typeof(PSDataFactoryGatewayKey))] + public class NewAzureDataFactoryGatewayKeyCommand : DataFactoryBaseCmdlet + { + [Parameter(ParameterSetName = ByFactoryObject, Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, +HelpMessage = "The data factory object.")] + public PSDataFactory DataFactory { get; set; } + + [Parameter(ParameterSetName = ByFactoryName, Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory name.")] + [ValidateNotNullOrEmpty] + public string DataFactoryName { get; set; } + + [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory gateway name.")] + [ValidateNotNullOrEmpty] + public string GatewayName { get; set; } + + public override void ExecuteCmdlet() + { + if (ParameterSetName == ByFactoryObject) + { + if (DataFactory == null) + { + throw new PSArgumentNullException(string.Format(CultureInfo.InvariantCulture, Resources.DataFactoryArgumentInvalid)); + } + + DataFactoryName = DataFactory.DataFactoryName; + ResourceGroupName = DataFactory.ResourceGroupName; + } + + PSDataFactoryGatewayKey gatewayKey = DataFactoryClient.RegenerateGatewayKey(ResourceGroupName, DataFactoryName, GatewayName); + WriteObject(gatewayKey); + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Gateway/RemoveAzureDataFactoryGatewayCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Gateway/RemoveAzureDataFactoryGatewayCommand.cs new file mode 100644 index 000000000000..bb61e86dcdf9 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Gateway/RemoveAzureDataFactoryGatewayCommand.cs @@ -0,0 +1,76 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.Azure.Commands.DataFactories.Properties; +using System; +using System.Globalization; +using System.Management.Automation; +using System.Security.Permissions; + +namespace Microsoft.Azure.Commands.DataFactories +{ + [Cmdlet(VerbsCommon.Remove, Constants.Gateway, DefaultParameterSetName = ByFactoryName), OutputType(typeof(bool))] + public class RemoveAzureDataFactoryGatewayCommand : DataFactoryBaseCmdlet + { + [Parameter(ParameterSetName = ByFactoryObject, Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, +HelpMessage = "The data factory object.")] + public PSDataFactory DataFactory { get; set; } + + [Parameter(ParameterSetName = ByFactoryName, Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory name.")] + [ValidateNotNullOrEmpty] + public string DataFactoryName { get; set; } + + [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory gateway name.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Don't ask for confirmation.")] + public SwitchParameter Force { get; set; } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public override void ExecuteCmdlet() + { + if (ParameterSetName == ByFactoryObject) + { + if (DataFactory == null) + { + throw new PSArgumentNullException(string.Format(CultureInfo.InvariantCulture, Resources.DataFactoryArgumentInvalid)); + } + + DataFactoryName = DataFactory.DataFactoryName; + ResourceGroupName = DataFactory.ResourceGroupName; + } + + ConfirmAction( + Force.IsPresent, + string.Format( + CultureInfo.InvariantCulture, + Resources.DataFactoryGatewayConfirmationMessage, + Name, + DataFactoryName), + string.Format( + CultureInfo.InvariantCulture, + Resources.DataFactoryGatewayRemoving, + Name, + DataFactoryName), + Name, + () => DataFactoryClient.DeleteGateway(ResourceGroupName, DataFactoryName, Name)); + + WriteObject(true); + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Gateway/SetAzureDataFactoryGatewayCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Gateway/SetAzureDataFactoryGatewayCommand.cs new file mode 100644 index 000000000000..d6148b6380d5 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Gateway/SetAzureDataFactoryGatewayCommand.cs @@ -0,0 +1,69 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.Azure.Commands.DataFactories.Properties; + +namespace Microsoft.Azure.Commands.DataFactories +{ + [Cmdlet(VerbsCommon.Set, Constants.Gateway, DefaultParameterSetName = ByFactoryName), OutputType(typeof(PSDataFactoryGateway))] + public class SetAzureDataFactoryGatewayCommand : DataFactoryBaseCmdlet + { + [Parameter(ParameterSetName = ByFactoryObject, Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, +HelpMessage = "The data factory object.")] + public PSDataFactory DataFactory { get; set; } + + [Parameter(ParameterSetName = ByFactoryName, Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory name.")] + [ValidateNotNullOrEmpty] + public string DataFactoryName { get; set; } + + [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory gateway name.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Position = 3, Mandatory = true, HelpMessage = "The description to update.")] + [ValidateNotNullOrEmpty] + public string Description { get; set; } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public override void ExecuteCmdlet() + { + if (ParameterSetName == ByFactoryObject) + { + if (DataFactory == null) + { + throw new PSArgumentNullException(string.Format(CultureInfo.InvariantCulture, Resources.DataFactoryArgumentInvalid)); + } + + DataFactoryName = DataFactory.DataFactoryName; + ResourceGroupName = DataFactory.ResourceGroupName; + } + + PSDataFactoryGateway gateway = new PSDataFactoryGateway + { + Description = Description, + Name = Name + }; + + PSDataFactoryGateway response = DataFactoryClient.PatchGateway(ResourceGroupName, DataFactoryName, gateway); + WriteObject(response); + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Hubs/GetAzureDataFactoryHubCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Hubs/GetAzureDataFactoryHubCommand.cs new file mode 100644 index 000000000000..666bdddd5e6d --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Hubs/GetAzureDataFactoryHubCommand.cs @@ -0,0 +1,67 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.Azure.Commands.DataFactories.Models; +using System.Globalization; +using Microsoft.Azure.Commands.DataFactories.Properties; + +namespace Microsoft.Azure.Commands.DataFactories +{ + [Cmdlet(VerbsCommon.Get, Constants.Hub, DefaultParameterSetName = ByFactoryName), OutputType(typeof(List), typeof(PSHub))] + public class GetAzureDataFactoryHubCommand : HubContextBaseCmdlet + { + [Parameter(Position = 2, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The hub name.")] + public string Name { get; set; } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public override void ExecuteCmdlet() + { + if (ParameterSetName == ByFactoryObject) + { + if (DataFactory == null) + { + throw new PSArgumentNullException(string.Format(CultureInfo.InvariantCulture, Resources.DataFactoryArgumentInvalid)); + } + + DataFactoryName = DataFactory.DataFactoryName; + ResourceGroupName = DataFactory.ResourceGroupName; + } + + HubFilterOptions filterOptions = new HubFilterOptions() + { + Name = Name, + ResourceGroupName = ResourceGroupName, + DataFactoryName = DataFactoryName + }; + + List hubs = DataFactoryClient.FilterPSHubs(filterOptions); + + if (hubs != null) + { + if (hubs.Count == 1 && Name != null) + { + WriteObject(hubs[0]); + } + else + { + WriteObject(hubs, true); + } + } + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Hubs/HubContextBaseCmdlet.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Hubs/HubContextBaseCmdlet.cs new file mode 100644 index 000000000000..c4d6cad49fc3 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Hubs/HubContextBaseCmdlet.cs @@ -0,0 +1,31 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.DataFactories.Models; +using System.Management.Automation; + +namespace Microsoft.Azure.Commands.DataFactories +{ + public abstract class HubContextBaseCmdlet : DataFactoryBaseCmdlet + { + [Parameter(ParameterSetName = ByFactoryObject, Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory object.")] + public PSDataFactory DataFactory { get; set; } + + [Parameter(ParameterSetName = ByFactoryName, Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory name.")] + [ValidateNotNullOrEmpty] + public string DataFactoryName { get; set; } + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Hubs/NewAzureDataFactoryHubCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Hubs/NewAzureDataFactoryHubCommand.cs new file mode 100644 index 000000000000..d72036fa521f --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Hubs/NewAzureDataFactoryHubCommand.cs @@ -0,0 +1,72 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System.Globalization; +using Microsoft.Azure.Commands.DataFactories.Properties; + +namespace Microsoft.Azure.Commands.DataFactories +{ + [Cmdlet(VerbsCommon.New, Constants.Hub, DefaultParameterSetName = ByFactoryName), OutputType(typeof(PSHub))] + public class NewAzureDataFactoryHubCommand : HubContextBaseCmdlet + { + [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The hub name.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Position = 3, Mandatory = true, HelpMessage = "The hub JSON file path.")] + [ValidateNotNullOrEmpty] + public string File { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Don't ask for confirmation.")] + public SwitchParameter Force { get; set; } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public override void ExecuteCmdlet() + { + if (ParameterSetName == ByFactoryObject) + { + if (DataFactory == null) + { + throw new PSArgumentNullException(string.Format(CultureInfo.InvariantCulture, Resources.DataFactoryArgumentInvalid)); + } + + DataFactoryName = DataFactory.DataFactoryName; + ResourceGroupName = DataFactory.ResourceGroupName; + } + + // Resolve the file path and read the raw content + string rawJsonContent = DataFactoryClient.ReadJsonFileContent(this.TryResolvePath(File)); + + // Resolve any mismatch between -Name and the name written in JSON + Name = ResolveResourceName(rawJsonContent, Name, "Hub"); + + CreatePSHubParameters parameters = new CreatePSHubParameters() + { + ResourceGroupName = ResourceGroupName, + DataFactoryName = DataFactoryName, + Name = Name, + RawJsonContent = rawJsonContent, + Force = Force.IsPresent, + ConfirmAction = ConfirmAction + }; + + WriteObject(DataFactoryClient.CreatePSHub(parameters)); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Hubs/RemoveAzureDataFactoryHubCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Hubs/RemoveAzureDataFactoryHubCommand.cs new file mode 100644 index 000000000000..268ae8733d3a --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Hubs/RemoveAzureDataFactoryHubCommand.cs @@ -0,0 +1,75 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Globalization; +using System.Management.Automation; +using System.Net; +using System.Security.Permissions; +using Microsoft.Azure.Commands.DataFactories.Properties; + +namespace Microsoft.Azure.Commands.DataFactories +{ + [Cmdlet(VerbsCommon.Remove, Constants.Hub, DefaultParameterSetName = ByFactoryName), OutputType(typeof(bool))] + public class RemoveAzureDataFactoryHubCommand : HubContextBaseCmdlet + { + [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The hub name.")] + [Alias("HubName")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Don't ask for confirmation.")] + public SwitchParameter Force { get; set; } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public override void ExecuteCmdlet() + { + if (ParameterSetName == ByFactoryObject) + { + if (DataFactory == null) + { + throw new PSArgumentNullException(string.Format(CultureInfo.InvariantCulture, Resources.DataFactoryArgumentInvalid)); + } + + DataFactoryName = DataFactory.DataFactoryName; + ResourceGroupName = DataFactory.ResourceGroupName; + } + + this.ConfirmAction( + this.Force.IsPresent, + string.Format( + CultureInfo.InvariantCulture, + Resources.HubConfirmationMessage, + this.Name, + this.DataFactoryName), + string.Format( + CultureInfo.InvariantCulture, + Resources.HubRemoving, + this.Name, + this.DataFactoryName), + this.Name, + this.ExecuteDelete); + } + + private void ExecuteDelete() + { + HttpStatusCode response = DataFactoryClient.DeleteHub(ResourceGroupName, DataFactoryName, Name); + + if (response == HttpStatusCode.NoContent) + { + WriteWarning(string.Format(CultureInfo.InvariantCulture, Resources.HubNotFound, Name, DataFactoryName)); + } + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/LinkedServices/GetAzureDataFactoryLinkedServiceCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/LinkedServices/GetAzureDataFactoryLinkedServiceCommand.cs new file mode 100644 index 000000000000..46ad39b14c5b --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/LinkedServices/GetAzureDataFactoryLinkedServiceCommand.cs @@ -0,0 +1,82 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.Azure.Commands.DataFactories.Models; +using System.Globalization; +using Microsoft.Azure.Commands.DataFactories.Properties; + +namespace Microsoft.Azure.Commands.DataFactories +{ + [Cmdlet(VerbsCommon.Get, Constants.LinkedService, DefaultParameterSetName = ByFactoryName), OutputType(typeof(List), typeof(PSLinkedService))] + public class GetAzureDataFactoryLinkedServiceCommand : DataFactoryBaseCmdlet + { + [Parameter(ParameterSetName = ByFactoryObject, Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory object.")] + public PSDataFactory DataFactory { get; set; } + + [Parameter(ParameterSetName = ByFactoryName, Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory name.")] + [ValidateNotNullOrEmpty] + public string DataFactoryName { get; set; } + + [Parameter(Position = 2, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The linked service name.")] + public string Name { get; set; } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public override void ExecuteCmdlet() + { + // ValidationNotNullOrEmpty doesn't handle whitespaces well + if (Name != null && string.IsNullOrWhiteSpace(Name)) + { + throw new PSArgumentNullException("Name"); + } + + if (ParameterSetName == ByFactoryObject) + { + if (DataFactory == null) + { + throw new PSArgumentNullException(string.Format(CultureInfo.InvariantCulture, Resources.DataFactoryArgumentInvalid)); + } + + DataFactoryName = DataFactory.DataFactoryName; + ResourceGroupName = DataFactory.ResourceGroupName; + } + + LinkedServiceFilterOptions filterOptions = new LinkedServiceFilterOptions() + { + Name = Name, + ResourceGroupName = ResourceGroupName, + DataFactoryName = DataFactoryName + }; + + List linkedServices = DataFactoryClient.FilterPSLinkedServices(filterOptions); + + if (linkedServices != null) + { + if (linkedServices.Count == 1 && Name != null) + { + WriteObject(linkedServices[0]); + } + else + { + WriteObject(linkedServices, true); + } + } + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/LinkedServices/LinkedServiceContextBaseCmdlet.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/LinkedServices/LinkedServiceContextBaseCmdlet.cs new file mode 100644 index 000000000000..fe038440e72f --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/LinkedServices/LinkedServiceContextBaseCmdlet.cs @@ -0,0 +1,37 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.DataFactories.Models; +using System.Management.Automation; + +namespace Microsoft.Azure.Commands.DataFactories +{ + public abstract class LinkedServiceContextBaseCmdlet : DataFactoryBaseCmdlet + { + [Parameter(ParameterSetName = ByFactoryObject, Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory object.")] + public PSDataFactory DataFactory { get; set; } + + [Parameter(ParameterSetName = ByFactoryName, Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory name.")] + [ValidateNotNullOrEmpty] + public string DataFactoryName { get; set; } + + [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The linked service name.")] + [Alias("LinkedServiceName")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/LinkedServices/NewAzureDataFactoryLinkedServiceCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/LinkedServices/NewAzureDataFactoryLinkedServiceCommand.cs new file mode 100644 index 000000000000..9c9bec6cd93f --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/LinkedServices/NewAzureDataFactoryLinkedServiceCommand.cs @@ -0,0 +1,82 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System.Collections; +using System.Globalization; +using Microsoft.Azure.Commands.DataFactories.Properties; + +namespace Microsoft.Azure.Commands.DataFactories +{ + [Cmdlet(VerbsCommon.New, Constants.LinkedService, DefaultParameterSetName = ByFactoryName), OutputType(typeof(PSLinkedService))] + public class NewAzureDataFactoryLinkedServiceCommand : DataFactoryBaseCmdlet + { + [Parameter(ParameterSetName = ByFactoryObject, Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory object.")] + public PSDataFactory DataFactory { get; set; } + + [Parameter(ParameterSetName = ByFactoryName, Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory name.")] + [ValidateNotNullOrEmpty] + public string DataFactoryName { get; set; } + + [Parameter(Position = 2, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The linked service name.")] + public string Name { get; set; } + + [Parameter(Position = 3, Mandatory = true, HelpMessage = "The linked service JSON file path.")] + [ValidateNotNullOrEmpty] + public string File { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Don't ask for confirmation.")] + public SwitchParameter Force { get; set; } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public override void ExecuteCmdlet() + { + if (ParameterSetName == ByFactoryObject) + { + if (DataFactory == null) + { + throw new PSArgumentNullException(string.Format(CultureInfo.InvariantCulture, Resources.DataFactoryArgumentInvalid)); + } + + DataFactoryName = DataFactory.DataFactoryName; + ResourceGroupName = DataFactory.ResourceGroupName; + } + + // Resolve the file path and read the raw content + string rawJsonContent = DataFactoryClient.ReadJsonFileContent(this.TryResolvePath(File)); + + // Resolve any mismatch between -Name and the name written in JSON + Name = ResolveResourceName(rawJsonContent, Name, "LinkedService"); + + CreatePSLinkedServiceParameters parameters = new CreatePSLinkedServiceParameters() + { + ResourceGroupName = ResourceGroupName, + DataFactoryName = DataFactoryName, + Name = Name, + RawJsonContent = rawJsonContent, + Force = Force.IsPresent, + ConfirmAction = ConfirmAction + }; + + WriteObject(DataFactoryClient.CreatePSLinkedService(parameters)); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/LinkedServices/RemoveAzureDataFactoryLinkedServiceCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/LinkedServices/RemoveAzureDataFactoryLinkedServiceCommand.cs new file mode 100644 index 000000000000..0f23b00229b7 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/LinkedServices/RemoveAzureDataFactoryLinkedServiceCommand.cs @@ -0,0 +1,70 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Globalization; +using System.Management.Automation; +using System.Net; +using System.Security.Permissions; +using Microsoft.Azure.Commands.DataFactories.Properties; + +namespace Microsoft.Azure.Commands.DataFactories +{ + [Cmdlet(VerbsCommon.Remove, Constants.LinkedService, DefaultParameterSetName = ByFactoryName)] + public class RemoveAzureDataFactoryLinkedServiceCommand : LinkedServiceContextBaseCmdlet + { + [Parameter(Mandatory = false, HelpMessage = "Don't ask for confirmation.")] + public SwitchParameter Force { get; set; } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public override void ExecuteCmdlet() + { + if (ParameterSetName == ByFactoryObject) + { + if (DataFactory == null) + { + throw new PSArgumentNullException(string.Format(CultureInfo.InvariantCulture, Resources.DataFactoryArgumentInvalid)); + } + + DataFactoryName = DataFactory.DataFactoryName; + ResourceGroupName = DataFactory.ResourceGroupName; + } + + ConfirmAction( + Force.IsPresent, + string.Format( + CultureInfo.InvariantCulture, + Resources.LinkedServiceConfirmationMessage, + Name, + DataFactoryName), + string.Format( + CultureInfo.InvariantCulture, + Resources.LinkedServiceRemoving, + Name, + DataFactoryName), + Name, + ExecuteDelete); + } + + private void ExecuteDelete() + { + HttpStatusCode response = DataFactoryClient.DeleteLinkedService(ResourceGroupName, DataFactoryName, Name); + + if (response == HttpStatusCode.NoContent) + { + WriteWarning(string.Format( + CultureInfo.InvariantCulture, Resources.LinkedServiceNotFound, Name, DataFactoryName)); + } + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/MSSharedLibKey.snk b/src/ResourceManager/DataFactories/Commands.DataFactories/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ResourceManager/DataFactories/Commands.DataFactories/MSSharedLibKey.snk differ diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Microsoft.Azure.Commands.DataFactories.dll-Help.xml b/src/ResourceManager/DataFactories/Commands.DataFactories/Microsoft.Azure.Commands.DataFactories.dll-Help.xml new file mode 100644 index 000000000000..6273836ba607 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Microsoft.Azure.Commands.DataFactories.dll-Help.xml @@ -0,0 +1,6325 @@ + + + + + + Get-AzureDataFactory + + Gets information about Data Factory. + + + + + Get + AzureDataFactory + + + + The Get-AzureDataFactory cmdlet gets information about data factories in an Azure resource group. If you specify the name of a data factory, this cmdlet gets information about that data factory. If you do not specify a name, this cmdlet gets information about all of the data factories in an Azure resource group. + You must be in AzureResourceManager mode to run Azure Data Factory cmdlets. To switch to AzureResourceManager mode, type Switch-AzureMode AzureResourceManager. + + + + Get-AzureDataFactory + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet gets information about data factories that belong to the group that this parameter specifies. + + String + + + Name + + Specifies the name of the data factory about which to get information. + + String + + + + + + Name + + Specifies the name of the data factory about which to get information. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet gets information about data factories that belong to the group that this parameter specifies. + + String + + String + + + + + + + + + + + + + + + + + + + + + System.Collections.Generic.List`1[[Microsoft.WindowsAzure.Commands.Utilities.PSDataFactory, Microsoft.WindowsAzure.Commands.Utilities]] Microsoft.WindowsAzure.Commands.Utilities.PSDataFactory + + + + + + + + + + + + + Example 1: Get all data factories + + + + + PS C:\> Get-AzureDataFactory -ResourceGroupName "ADF" + DataFactoryName : WikiADF + ResourceGroupName : ADF + Location : WestUS + Tags : {} + Properties : Microsoft.WindowsAzure.Commands.Utilities.PSDataFactoryConfiguration + + DataFactoryName : WikiADF2 + ResourceGroupName : ADF + Location : westus + Tags : {} + Properties : Microsoft.WindowsAzure.Commands.Utilities.PSDataFactoryConfiguration + + + Displays information about all data factories in the Azure subscription. + + + + + + + + + Example 2: Get a specific data factory + + + + + PS C:\> $DataFactory = Get-AzureDataFactory -ResourceGroupName "ADF" -Name "WikiADF" + DataFactoryName : WikiADF + ResourceGroupName : ADF + Location : westus + Tags : {} + Properties : Microsoft.WindowsAzure.Commands.Utilities.PSDataFactoryConfiguration + + + This command displays information about the data factory named WikiADF in the subscription for the resource group named ADF, and then stores it in the $DataFactory variable. Specify the DataFactory parameter in subsequent cmdlets to use the data factory stored in $DataFactory. + + + + + + + + + + + New-AzureDataFactory + + + + Remove-AzureDataFactory + + + + + + + Get-AzureDataFactoryGateway + + Gets information about logical gateways in Data Factory. + + + + + Get + AzureDataFactoryGateway + + + + The Get-AzureDataFactoryGateway cmdlet gets information about logical gateways in Azure Data Factory. If you specify the name of a gateway, this cmdlet gets information about that gateway. If you do not specify a name, this cmdlet gets information about all gateways for a data factory. + If you want to add an on-premises MicrosoftSQL Server as a linked service to a data factory, you must install a gateway on your on-premises computer. + You must be in AzureResourceManager mode to run Azure Data Factory cmdlets. To switch to AzureResourceManager mode, type Switch-AzureMode AzureResourceManager. + + + + Get-AzureDataFactoryGateway + + DataFactory + + Specifies a PSDataFactory object. This cmdlet gets information about logical gateways in the data factory that this parameter specifies. + + PSDataFactory + + + Name + + Specifies the name of the logical gateway about which to get information. + + String + + + + Get-AzureDataFactoryGateway + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet gets information about logical gateways that belong to the group that this parameter specifies. + + String + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet gets information about logical gateways in the data factory that this parameter specifies. + + String + + + Name + + Specifies the name of the logical gateway about which to get information. + + String + + + + + + DataFactory + + Specifies a PSDataFactory object. This cmdlet gets information about logical gateways in the data factory that this parameter specifies. + + PSDataFactory + + PSDataFactory + + + + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet gets information about logical gateways in the data factory that this parameter specifies. + + String + + String + + + + + + Name + + Specifies the name of the logical gateway about which to get information. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet gets information about logical gateways that belong to the group that this parameter specifies. + + String + + String + + + + + + + + + + + + + + + + + + + + + System.Collections.Generic.List`1[[Microsoft.WindowsAzure.Commands.Utilities.PSDataFactoryGateway]], Microsoft.WindowsAzure.Commands.Utilities.PSDataFactoryGateway + + + + + + + + + + + + + Example 1: Get all logical gateways in a data factory + + + + + PS C:\> Get-AzureDataFactoryGateway -ResourceGroupName "ADF" -DataFactoryName "WikiADF" + Name : gateway1 + Location : West US + Description : + Version : 1.3.5338.1 + Status : Online + VersionStatus : UpToDate + CreateTime : 8/22/2014 1:40:34 AM + RegisterTime : 8/22/2014 1:41:46 AM + LastConnectTime : 8/22/2014 1:44:56 AM + ExpiryTime : + + Name : gateway2 + Location : West US + Description : + Version : 1.3.5338.1 + Status : Offline + VersionStatus : UpToDate + CreateTime : 8/29/2014 1:46:44 AM + RegisterTime : 8/29/2014 1:48:36 AM + LastConnectTime : 8/29/2014 1:56:56 AM + ExpiryTime : + + + This command gets information about all logical gateways for the data factory named WikiADF in the resource group named ADF. + + + + + + + + + Example 2: Get a specific logical gateway in a data factory + + + + + PS C:\> Get-AzureDataFactoryGateway -ResourceGroupName "ADF" -Name "Gateway01" -DataFactoryName "WikiADF" + Name : Gateway01 + Location : West US + Description : + Version : 1.3.5338.1 + Status : Online + VersionStatus : UpToDate + CreateTime : 8/22/2014 1:40:34 AM + RegisterTime : 8/22/2014 1:41:46 AM + LastConnectTime : 8/22/2014 1:44:56 AM + ExpiryTime : + + + This command gets information about the logical gateway named Gateway01 in the data factory named WikiADF in the resource group named ADF. + + + + + + + + + + + New-AzureDataFactoryGateway + + + + Remove-AzureDataFactoryGateway + + + + Set-AzureDataFactoryGateway + + + + + + + Get-AzureDataFactoryHub + + Gets information about hubs in Data Factory. + + + + + Get + AzureDataFactoryHub + + + + The Get-AzureDataFactoryHub cmdlet gets information about hubs in Azure Data Factory. If you specify the name of a hub, this cmdlet gets information about that hub. If you do not specify a name, this cmdlet gets information about all of the hubs in a data factory. + You must be in AzureResourceManager mode to run Azure Data Factory cmdlets. To switch to AzureResourceManager mode, type Switch-AzureMode AzureResourceManager. + + + + Get-AzureDataFactoryHub + + DataFactory + + Specifies a PSDataFactory object. This cmdlet gets information about hubs in the data factory that this parameter specifies. + + PSDataFactory + + + Name + + Specifies the name of the hub about which to get information. + + String + + + + Get-AzureDataFactoryHub + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet gets information about hubs that belong to the group that this parameter specifies. + + String + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet gets information about hubs in the data factory that this parameter specifies. + + String + + + Name + + Specifies the name of the hub about which to get information. + + String + + + + + + DataFactory + + Specifies a PSDataFactory object. This cmdlet gets information about hubs in the data factory that this parameter specifies. + + PSDataFactory + + PSDataFactory + + + + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet gets information about hubs in the data factory that this parameter specifies. + + String + + String + + + + + + Name + + Specifies the name of the hub about which to get information. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet gets information about hubs that belong to the group that this parameter specifies. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Get all data hubs + + + + + PS C:\>Get-AzureDataFactoryHub -ResourceGroupName "ADFResourceGroup" -DataFactoryName "ADFDataFactory" + + + + This command gets all data hubs in the Azure resource group named ADFResourceGroup and the data factory named ADFDataFactory. + + + + + + + + + Example 2: Get a specific data hub + + + + + PS C:\>Get-AzureDataFactoryHub -ResourceGroupName "ADFResourceGroup" -DataFactoryName "ADFDataFactory" -Name "MyDataHub" + + + + This command gets information about the hub named MyDataHub in the Azure resource group named ADFResourceGroup and the data factory named ADFDataFactory. + + + + + + + + + + + + Online Version: + + + + New-AzureDataFactoryHub + + + + Remove-AzureDataFactoryHub + + + + + + + Get-AzureDataFactoryLinkedService + + Gets information about linked services in Data Factory. + + + + + Get + AzureDataFactoryLinkedService + + + + The Get-AzureDataFactoryLinkedService cmdlet gets information about linked services in Azure Data Factory. If you specify the name of a linked service, this cmdlet gets information about that linked service. If you do not specify a name, this cmdlet gets information about all the linked services in the data factory. + You must be in AzureResourceManager mode to run Azure Data Factory cmdlets. To switch to AzureResourceManager mode, type Switch-AzureMode AzureResourceManager. + + + + Get-AzureDataFactoryLinkedService + + DataFactory + + Specifies a PSDataFactory object. This cmdlet gets linked services that belong to the data factory that this parameter specifies. + + PSDataFactory + + + Name + + Specifies the name of the linked service about which to get information. + + String + + + + Get-AzureDataFactoryLinkedService + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet gets linked services that belong to the group that this parameter specifies. + + String + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet gets linked services that belong to the data factory that this parameter specifies. + + String + + + Name + + Specifies the name of the linked service about which to get information. + + String + + + + + + DataFactory + + Specifies a PSDataFactory object. This cmdlet gets linked services that belong to the data factory that this parameter specifies. + + PSDataFactory + + PSDataFactory + + + + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet gets linked services that belong to the data factory that this parameter specifies. + + String + + String + + + + + + Name + + Specifies the name of the linked service about which to get information. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet gets linked services that belong to the group that this parameter specifies. + + String + + String + + + + + + + + + + + + + + + + + + + + + System.Collections.Generic.List`1[[Microsoft.WindowsAzure.Commands.Utilities.PSLinkedService, Microsoft.WindowsAzure.Commands.Utilities]] Microsoft.WindowsAzure.Commands.Utilities.PSLinkedService + + + + + + + + + + + + + Example 1: Get information about all linked services + + + + + PS C:\> Get-AzureDataFactoryLinkedService -ResourceGroupName "ADF" -DataFactoryName "WikiADF" | Format-List + LinkedServiceName : HDILinkedService + ResourceGroupName : ADF + DataFactoryName : WikiADF + Properties : Microsoft.DataFactories.HDInsightBYOCLinkedService + + LinkedServiceName : LinkedServiceCuratedWikiData + ResourceGroupName : ADF + DataFactoryName : WikiADF + Properties : Microsoft.DataFactories.AzureStorageLinkedService + + LinkedServiceName : LinkedServiceHDIStorage + ResourceGroupName : ADF + DataFactoryName : WikiADF + Properties : Microsoft.DataFactories.AzureStorageLinkedService + + LinkedServiceName : LinkedServiceWikiAggregatedData + ResourceGroupName : ADF + DataFactoryName : WikiADF + Properties : Microsoft.DataFactories.AzureSqlLinkedService + + LinkedServiceName : LinkedServiceWikipediaClickEvents + ResourceGroupName : ADF + DataFactoryName : WikiADF + Properties : Microsoft.DataFactories.AzureStorageLinkedService + + + This command gets information about all linked services in the data factory named WikiADF, and then passes the linked services to the Format-List cmdlet by using the pipeline operator. That Windows PowerShell cmdlet formats the results. For more information, type Get-Help Format-List. + + + + + + + + + Example 2: Get information about a specific linked service + + + + + PS C:\> Get-AzureDataFactoryLinkedService -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -Name "HDILinkedService" + LinkedServiceName ResourceGroupName DataFactoryName Properties + ----------------- ----------------- --------------- ---------- + HDILinkedService ADF WikiADF Microsoft.DataFactories.HDInsightBYOCAsset + + + This command gets information about the linked service named HDILinkedService in the data factory named WikiADF. + + + + + + + + + Example 3: Get information about a specific linked service by specifying the DataFactory parameter + + + + + PS C:\>$DataFactory = Get-AzureDataFactory -ResourceGroupName "ADF" -Name "ContosoFactory" + PS C:\> Get-AzureDataFactoryLinkedService -DataFactory $DataFactory | Format-Table -Property LinkedServiceName, DataFactoryName, ResourceGroupName + + + + The first command uses the Get-AzureDataFactory cmdlet to get the data factory named ContosoFactory, and then stores it in the $DataFactory variable. + The second command gets information about the linked service for the data factory stored in $DataFactory, and then passes that information to the Format-Table cmdlet by using the pipeline operator. The Format-Table cmdlet formats the output as a table with the specified properties as table columns. + + + + + + + + + + + New-AzureDataFactoryLinkedService + + + + Remove-AzureDataFactoryLinkedService + + + + + + + Get-AzureDataFactoryPipeline + + Gets information about pipelines in Data Factory. + + + + + Get + AzureDataFactoryPipeline + + + + The Get-AzureDataFactoryPipeline cmdlet gets information about pipelines in Azure Data Factory. If you specify the name of a pipeline, this cmdlet gets information about that pipeline. If you do not specify a name, this cmdlet gets information about all the pipelines in the data factory. + You must be in AzureResourceManager mode to run Azure Data Factory cmdlets. To switch to AzureResourceManager mode, type Switch-AzureMode AzureResourceManager. + + + + Get-AzureDataFactoryPipeline + + DataFactory + + Specifies a PSDataFactory object. This cmdlet gets pipelines that belong to the data factory that this parameter specifies. + + PSDataFactory + + + Name + + Specifies the name of the pipeline about which to get information. + + String + + + + Get-AzureDataFactoryPipeline + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet gets pipelines that belong to the group that this parameter specifies. + + String + + + Name + + Specifies the name of the pipeline about which to get information. + + String + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet gets pipelines that belong to the data factory that this parameter specifies. + + String + + + + + + DataFactory + + Specifies a PSDataFactory object. This cmdlet gets pipelines that belong to the data factory that this parameter specifies. + + PSDataFactory + + PSDataFactory + + + + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet gets pipelines that belong to the data factory that this parameter specifies. + + String + + String + + + + + + Name + + Specifies the name of the pipeline about which to get information. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet gets pipelines that belong to the group that this parameter specifies. + + String + + String + + + + + + + + + + + + + + + + + + + + + System.Collections.Generic.List`1[[Microsoft.WindowsAzure.Commands.Utilities.PSPipeline, Microsoft.WindowsAzure.Commands.Utilities, Version=0.8.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]] Microsoft.WindowsAzure.Commands.Utilities.PSPipeline + + + + + + + + + + + + + Example 1: Get information about all pipelines + + + + + PS C:\> Get-AzureDataFactoryPipeline -ResourceGroupName "ADF" -DataFactoryName "WikiADF" + PipelineName ResourceGroupName DataFactoryName Properties + ------------ ----------------- --------------- ---------- + DPWikisample ADF WikiADF Microsoft.DataFactories.PipelineProperties + DPTwittersample ADF WikiADF Microsoft.DataFactories.PipelineProperties + + + This command gets information about all pipelines in the data factory named WikiADF. + + + + + + + + + Example 2: Get information about a specific pipeline + + + + + PS C:\> Get-AzureDataFactoryPipeline -ResourceGroupName "ADF" -Name "DPWikisample" -DataFactoryName "WikiADF" | Format-List + PipelineName : DPWikisample + ResourceGroupName : ADF + DataFactoryName : WikiADF + Properties : Microsoft.DataFactories.PipelineProperties + + + This command gets information about the pipeline named DPWikisample in the data factory named WikiADF. The command passes that information to the Format-List cmdlet by using the pipeline operator. That Windows PowerShell cmdlet formats the results. For more information, type Get-Help Format-List. + + + + + + + + + Example 3: Get the properties for a specific pipeline + + + + + PS C:\> (Get-AzureDataFactoryPipeline -ResourceGroupName "ADF" -Name DPWikisample -DataFactoryName "WikiADF").Properties + Activities : {WikiHiveActivity, BlobToSqlCopyActivity} + Description : DP Wikipedia Sample Pipelines + End : 6/6/2014 8:00:00 AM + IsPaused : + RuntimeInfo : Microsoft.DataFactories.PipelineRuntimeInfo + Start : 6/5/2014 8:00:00 PM + + + This command gets information for the pipeline named DPWikisample in the data factory named WikiADF, and then uses standard dot notation to view the Properties property associated with that pipeline. + + + + + + + + + Example 4: Get the activities for a specific pipeline + + + + + PS C:\> (Get-AzureDataFactoryPipeline -ResourceGroupName "ADF" -Name "DPWikisample" -DataFactoryName "WikiADF").Properties.Activities + Transformation : Microsoft.DataFactories.HDInsightActivityProperties + Description : + Inputs : {DAWikipediaClickEvents} + LinkedServiceName : HDILinkedService + Name : WikiHiveActivity + Outputs : {DACuratedWikiData} + Policy : Microsoft.DataFactories.ActivityPolicy + + Transformation : Microsoft.DataFactories.CopyActivityProperties + Description : + Inputs : {DACuratedWikiData} + LinkedServiceName : HDILinkedService + Name : BlobToSqlCopyActivity + Outputs : {DAWikiAggregatedData} + Policy : Microsoft.DataFactories.ActivityPolicy + + + This command gets information for the pipeline named DPWikisample in the data factory named WikiADF, and then uses standard dot notation to view the Activities property associated with that pipeline. + + + + + + + + + Example 5: Get the runtime information for a specific pipeline + + + + + PS C:\> (Get-AzureDataFactoryPipeline -ResourceGroupName "ADF" -Name "DPWikisample" -DataFactoryName "WikiADF").Properties.RuntimeInfo + DeploymentTime + -------------- + 6/5/2014 10:36:46 PM + + + This command gets information for the pipeline named DPWikisample in the data factory named WikiADF, and then uses standard dot notation to view the RuntimeInfo property associated with that pipeline. + + + + + + + + + Example 6: Get information about inputs for the first activity + + + + + PS C:\> (Get-AzureDataFactoryPipeline -ResourceGroupName "ADF" -Name "DPWikisample" -DataFactoryName "WikiADF11").Properties.Activities[0].Inputs | Format-List + EndTime : + Length : + Name : DAWikipediaClickEvents + StartTime : + + + This command gets information for the pipeline named DPWikisample in the data factory named WikiADF, and then uses standard dot notation to view the Activities property associated with that pipeline. The command displays the Inputs property of the first element of the Activities array by using the Format-List cmdlet. + + + + + + + + + + + New-AzureDataFactoryPipeline + + + + Remove-AzureDataFactoryPipeline + + + + Resume-AzureDataFactoryPipeline + + + + Set-AzureDataFactoryPipelineActivePeriod + + + + Suspend-AzureDataFactoryPipeline + + + + + + + Get-AzureDataFactoryRun + + Gets runs for a data slice of a table in Data Factory. + + + + + Get + AzureDataFactoryRun + + + + The Get-AzureDataFactoryRun cmdlet gets the runs for a data slice of a table in Azure Data Factory. A table in a data factory is composed of slices over the time axis. The width of a slice is determined by the schedule, either hourly or daily. A run is a unit of processing for a slice. There could be one or more runs for a slice in case of retries or in case you rerun your slice due to failures. A slice is identified by its start time. To obtain the start time of a slice, use the Get-AzureDataFactorySlice cmdlet. + + For example, to get a run for the following slice, use the start time 2015-04-02T20:00:00. + + ResourceGroupName : ADF + DataFactoryName : SPDataFactory0924 + TableName : MarketingCampaignEffectivenessBlobTable + Start : 5/2/2014 8:00:00 PM + End : 5/3/2014 8:00:00 PM + RetryCount : 0 + Status : Ready + LatencyStatus : + + You must be in AzureResourceManager mode to run Azure Data Factory cmdlets. To switch to AzureResourceManager mode, type Switch-AzureMode AzureResourceManager. + + + + Get-AzureDataFactoryRun + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet gets runs for slices that belong to the group that this parameter specifies. + + String + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet gets runs for slices that belong to the data factory that this parameter specifies. + + String + + + TableName + + Specifies the name of the table. This cmdlet gets runs for slices that belong to the table that this parameter specifies. + + String + + + StartDateTime + + Specifies the start of a time period as a DateTime object. This cmdlet gets runs for the data slices that match this time period. + StartDateTime is a Coordinated Universal Time (UTC) time that you must specify in ISO format, for example, 2014-10-19T16:32:41Z. + + DateTime + + + + Get-AzureDataFactoryRun + + DataFactory + + Specifies a PSDataFactory object. This cmdlet gets runs for slices that belong to the data factory that this parameter specifies. + + PSDataFactory + + + TableName + + Specifies the name of the table. This cmdlet gets runs for slices that belong to the table that this parameter specifies. + + String + + + StartDateTime + + Specifies the start of a time period as a DateTime object. This cmdlet gets runs for the data slices that match this time period. + StartDateTime is a Coordinated Universal Time (UTC) time that you must specify in ISO format, for example, 2014-10-19T16:32:41Z. + + DateTime + + + + + + DataFactory + + Specifies a PSDataFactory object. This cmdlet gets runs for slices that belong to the data factory that this parameter specifies. + + PSDataFactory + + PSDataFactory + + + + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet gets runs for slices that belong to the data factory that this parameter specifies. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet gets runs for slices that belong to the group that this parameter specifies. + + String + + String + + + + + + StartDateTime + + Specifies the start of a time period as a DateTime object. This cmdlet gets runs for the data slices that match this time period. + StartDateTime is a Coordinated Universal Time (UTC) time that you must specify in ISO format, for example, 2014-10-19T16:32:41Z. + + DateTime + + DateTime + + + + + + TableName + + Specifies the name of the table. This cmdlet gets runs for slices that belong to the table that this parameter specifies. + + String + + String + + + + + + + + + + + + + + + + + + + + + System.Collections.Generic.List`1[[Microsoft.WindowsAzure.Commands.Utilities.PSDataSliceRun, Microsoft.WindowsAzure.Commands.Utilities, Version=0.8.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]] + + + + + + + + + + + + + Example 1: Get a table + + + + + PS C:\> Get-AzureDataFactoryRun -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -TableName "DAWikiAggregatedData" -StartDateTime 2014-05-21T16:00:00 + Id : a7c4913c-9623-49b3-ae1e-3e45e2b68819 + ResourceGroupName : ADF + DataFactoryName : WikiADF + TableName : DAWikiAggregatedData + PipelineName : 249ea141-ca00-8597-fad9-a148e5e7bdba + ActivityId : fcefe2bd-39b1-2d7a-7b35-bcc2b0432300 + ResumptionToken : a7c4913c-9623-49b3-ae1e-3e45e2b68819 + ContinuationToken : + ProcessingStartTime : 5/21/2014 5:02:41 PM + ProcessingEndTime : 5/21/2014 5:04:12 PM + PercentComplete : 100 + DataSliceStart : 5/21/2014 4:00:00 PM + DataSliceEnd : 5/21/2014 5:00:00 PM + Status : Succeeded + Timestamp : 5/21/2014 5:02:41 PM + RetryAttempt : 0 + Properties : {[errors, ]} + ErrorMessage : + + + This command gets all runs for slices of the table named DAWikiAggregatedData in the data factory named WikiADF that start from 4 PM GMT on 05/21/2014. + + + + + + + + + + + Get-AzureDataFactorySlice + + + + + + + Get-AzureDataFactorySlice + + Gets data slices for a table in Data Factory. + + + + + Get + AzureDataFactorySlice + + + + The Get-AzureDataFactorySlice cmdlet gets data slices for a table in Azure Data Factory. Specify a start time and an end time to define a range of data slices to view. + + The status of a data slice is one of the following values: + + -- PendingExecution. Data processing has not started. + -- InProgress. Data processing is in progress. + -- Ready. Data processing is completed. The data slice is ready for dependent slices to consume it. + -- Failed. The run that produces the slice failed. + -- Skip. Data Factory skips processing of the slice. + -- Retry. Data Factory retries the run that produces the slice. + -- Timed Out. Data processing has timed out. + -- PendingValidation. Data slice is waiting for validation before it is processed. + -- Retry Validation. Data Factory retries the validation of the slice. + -- Failed Validation. Validation of the slice failed. + + For each of the slices, you can see more information about the run that produces the slice by using the Get-AzureDataFactoryRun cmdlet. + You must be in AzureResourceManager mode to run Azure Data Factory cmdlets. To switch to AzureResourceManager mode, type Switch-AzureMode AzureResourceManager. + + + + Get-AzureDataFactorySlice + + DataFactory + + Specifies a PSDataFactory object. This cmdlet gets slices that belong to the data factory that this parameter specifies. + + PSDataFactory + + + TableName + + + Specifies the name of the table for which this cmdlet gets slices. + + + String + + + StartDateTime + + Specifies the start of a time period as a DateTime object. This cmdlet gets slices produced after the time that this parameter specifies. + StartDateTime is a Coordinated Universal Time (UTC) time that you must specify in ISO format, for example, 2014-10-19T16:32:41Z. + + DateTime + + + EndDateTime + + Specifies the end of a time period as a DateTime object. This cmdlet gets slices produced before the time that this parameter specifies. For more information about DateTime objects, type Get-Help Get-Date. + EndDateTime is a Coordinated Universal Time (UTC) time that you must specify in ISO format, for example, 2014-10-19T16:32:41Z. + + DateTime + + + + Get-AzureDataFactorySlice + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet gets slices that belong to the group that this parameter specifies. + + String + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet gets slices that belong to the data factory that this parameter specifies. + + String + + + TableName + + + Specifies the name of the table for which this cmdlet gets slices. + + + String + + + StartDateTime + + Specifies the start of a time period as a DateTime object. This cmdlet gets slices produced after the time that this parameter specifies. + StartDateTime is a Coordinated Universal Time (UTC) time that you must specify in ISO format, for example, 2014-10-19T16:32:41Z. + + DateTime + + + EndDateTime + + Specifies the end of a time period as a DateTime object. This cmdlet gets slices produced before the time that this parameter specifies. For more information about DateTime objects, type Get-Help Get-Date. + EndDateTime is a Coordinated Universal Time (UTC) time that you must specify in ISO format, for example, 2014-10-19T16:32:41Z. + + DateTime + + + + + + DataFactory + + Specifies a PSDataFactory object. This cmdlet gets slices that belong to the data factory that this parameter specifies. + + PSDataFactory + + PSDataFactory + + + + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet gets slices that belong to the data factory that this parameter specifies. + + String + + String + + + + + + EndDateTime + + Specifies the end of a time period as a DateTime object. This cmdlet gets slices produced before the time that this parameter specifies. For more information about DateTime objects, type Get-Help Get-Date. + EndDateTime is a Coordinated Universal Time (UTC) time that you must specify in ISO format, for example, 2014-10-19T16:32:41Z. + + DateTime + + DateTime + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet gets slices that belong to the group that this parameter specifies. + + String + + String + + + + + + StartDateTime + + Specifies the start of a time period as a DateTime object. This cmdlet gets slices produced after the time that this parameter specifies. + StartDateTime is a Coordinated Universal Time (UTC) time that you must specify in ISO format, for example, 2014-10-19T16:32:41Z. + + DateTime + + DateTime + + + + + + TableName + + + Specifies the name of the table for which this cmdlet gets slices. + + + String + + String + + + + + + + + + + + + + + + + + + + + + System.Collections.Generic.List`1[[Microsoft.WindowsAzure.Commands.Utilities.PSDataSlice, Microsoft.WindowsAzure.Commands.Utilities, Version=0.8.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]] + + + + + + + + + + + + + Example 1: Get data slices for a table + + + + + PS C:\> Get-AzureDataFactorySlice -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -TableName "DAWikiAggregatedData" -StartDateTime 2014-05-20T10:00:00 + ResourceGroupName : ADF + DataFactoryName : WikiADF + TableName : DAWikiAggregatedData + Start : 5/21/2014 1:00:00 AM + End : 5/21/2014 2:00:00 AM + RetryCount : 0 + Status : Ready + + ResourceGroupName : ADF + DataFactoryName : WikiADF + TableName : DAWikiAggregatedData + Start : 5/21/2014 2:00:00 AM + End : 5/21/2014 3:00:00 AM + RetryCount : 0 + Status : Ready + + . . . + + ResourceGroupName : ADF + DataFactoryName : WikiADF + TableName : DAWikiAggregatedData + Start : 5/21/2014 8:00:00 PM + End : 5/21/2014 9:00:00 PM + RetryCount : 0 + Status : PendingExecution + + ResourceGroupName : ADF + DataFactoryName : WikiADF + TableName : DAWikiAggregatedData + Start : 5/21/2014 9:00:00 PM + End : 5/21/2014 10:00:00 PM + RetryCount : 0 + Status : PendingExecution + + . . . + + + + This command gets all the data slices for the table named WikiAggregatedData in the data factory named WikiADF. The command gets slices produced after the time that the StartDateTime parameter specifies. The following example code sets the availability for this table every hour in the JavaScript Object Notation (JSON) file. + + availability: + { + period: "Hour", + periodMultiplier: 1 + } + + Some of the results are Ready and others are PendingExecution. Ready slices have already run. The pending slices are waiting to run at the end of each hour in the interval that the Set-AzureDataFactoryPipelineActivePeriod cmdlet specifies. In this example, both start and end periods for the pipeline and the slice have a value of one day (24 hours). + + + + + + + + + + + Set-AzureDataFactorySliceStatus + + + + Get-AzureDataFactoryRun + + + + Set-AzureDataFactoryPipelineActivePeriod + + + + + + + Get-AzureDataFactoryTable + + Gets information about tables in Data Factory. + + + + + Get + AzureDataFactoryTable + + + + The Get-AzureDataFactoryTable cmdlet gets information about tables in Azure Data Factory. If you specify the name of a table, this cmdlet gets information about that table. If you do not specify a name, this cmdlet gets information about all the tables in the data factory. + You must be in AzureResourceManager mode to run Azure Data Factory cmdlets. To switch to AzureResourceManager mode, type Switch-AzureMode AzureResourceManager. + + + + Get-AzureDataFactoryTable + + DataFactory + + Specifies a PSDataFactory object. This cmdlet gets tables that belong to the data factory that this parameter specifies. + + PSDataFactory + + + Name + + Specifies the name of the table about which to get information. + + String + + + + Get-AzureDataFactoryTable + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet gets tables that belong to the group that this parameter specifies. + + String + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet gets tables that belong to the data factory that this parameter specifies. + + String + + + Name + + Specifies the name of the table about which to get information. + + String + + + + + + DataFactory + + Specifies a PSDataFactory object. This cmdlet gets tables that belong to the data factory that this parameter specifies. + + PSDataFactory + + PSDataFactory + + + + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet gets tables that belong to the data factory that this parameter specifies. + + String + + String + + + + + + Name + + Specifies the name of the table about which to get information. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet gets tables that belong to the group that this parameter specifies. + + String + + String + + + + + + + + + + + + + + + + + + + + + System.Collections.Generic.List`1[[Microsoft.WindowsAzure.Commands.Utilities.PSTable, Microsoft.WindowsAzure.Commands.Utilities, Version=0.8.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]] Microsoft.WindowsAzure.Commands.Utilities.PSTable + + + + + + + + + + + + + Example 1: Get information about all tables + + + + + PS C:\> Get-AzureDataFactoryTable -ResourceGroupName "ADF" -DataFactoryName "WikiADF" + TableName : DACuratedWikiData + ResourceGroupName : ADF + DataFactoryName : WikiADF + Availability : Microsoft.DataFactories.Availability + Location : + Policy : + Structure : {} + Published : False + + TableName : DAWikipediaClickEvents + ResourceGroupName : ADF + DataFactoryName : WikiADF + Availability : Microsoft.DataFactories.Availability + Location : + Policy : + Structure : {} + Published : False + + TableName : DAWikiAggregatedData + ResourceGroupName : ADF + DataFactoryName : WikiADF + Availability : Microsoft.DataFactories.Availability + Location : + Policy : + Structure : {} + Published : False + + + This command gets information about all tables in the data factory named WikiADF. + + + + + + + + + Example 2: Get information about a specific table + + + + + PS C:\> Get-AzureDataFactoryTable -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -Name "DAWikipediaClickEvents" + TableName : DAWikipediaClickEvents + ResourceGroupName : ADF + DataFactoryName : WikiADF + Availability : Microsoft.DataFactories.Availability + Location : Microsoft.DataFactories.AzureBlobLocation + Policy : Microsoft.DataFactories.Policy + Structure : {} + Published : False + + + This command gets information about the table named DAWikipediaClickEvents in the data factory named WikiADF. + + + + + + + + + Example 3: Get the location for a specific table + + + + + PS C:\> (Get-AzureDataFactoryTable -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -Name "DAWikipediaClickEvents").Location + BlobPath : wikidatagateway/wikisampledatain/ + FilenamePrefix : + Format : + LinkedServiceName : LinkedServiceWikipediaClickEvents + PartitionBy : {} + + + This command gets information for the table named DAWikipediaClickEvents in the data factory named WikiADF, and then uses standard dot notation to view the Location associated with that table. Alternatively, assign the output of the Get-AzureDataFactoryTable cmdlet to a variable, and then use dot notation to view the Location property associated with the table object stored in that variable. + + + + + + + + + + + New-AzureDataFactoryTable + + + + Remove-AzureDataFactoryTable + + + + + + + New-AzureDataFactory + + Creates a data factory. + + + + + New + AzureDataFactory + + + + The New-AzureDataFactory cmdlet creates a data factory with the specified resource group name and location. + + Perform these operations in the following order: + + -- Create a data factory. + -- Create linked services. + -- Create tables. + -- Create a pipeline. + + You must be in AzureResourceManager mode to run Azure Data Factory cmdlets. To switch to AzureResourceManager mode, type Switch-AzureMode AzureResourceManager. + + + + New-AzureDataFactory + + ResourceGroupName + + + Specifies the name of an Azure resource group. This cmdlet creates a data factory that belongs to the group that this parameter specifies. + + + String + + + Name + + Specifies the name of the data factory to create. + + String + + + Location + + Specifies the location for the data factory, such as WestUS or EastUS. Only WestUS is currently supported. + + String + + + Tags + + + Specifies tags for the data factory. + + + Hashtable + + + Force + + Indicates that this cmdlet replaces an existing data factory without prompting you for confirmation. + + + + + + + Force + + Indicates that this cmdlet replaces an existing data factory without prompting you for confirmation. + + SwitchParameter + + SwitchParameter + + + + + + Location + + Specifies the location for the data factory, such as WestUS or EastUS. Only WestUS is currently supported. + + String + + String + + + + + + Name + + Specifies the name of the data factory to create. + + String + + String + + + + + + ResourceGroupName + + + Specifies the name of an Azure resource group. This cmdlet creates a data factory that belongs to the group that this parameter specifies. + + + String + + String + + + + + + Tags + + + Specifies tags for the data factory. + + + Hashtable + + Hashtable + + + + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.PSDataFactory + + + + + + + + + + + + + Example 1: Create a data factory + + + + + PS C:\> New-AzureDataFactory -ResourceGroupName "ADF" -Name "WikiADF" -Location "WestUS" + DataFactoryName : WikiADF + ResourceGroupName : ADF + Location : WestUS + Tags : {} + Properties : Microsoft.WindowsAzure.Commands.Utilities.PSDataFactoryConfiguration + + + This command creates a data factory named WikiADF in the resource group named ADF in the WestUS location. + + + + + + + + + + + Get-AzureDataFactory + + + + Remove-AzureDataFactory + + + + + + + New-AzureDataFactoryEncryptValue + + Encrypts sensitive data. + + + + + New + AzureDataFactoryEncryptValue + + + + The New-AzureDataFactoryEncryptValue cmdlet encrypts sensitive data, such as a password or a MicrosoftSQL Server connection string, and returns an encrypted value. + You must be in AzureResourceManager mode to run Azure Data Factory cmdlets. To switch to AzureResourceManager mode, type Switch-AzureMode AzureResourceManager. + + + + New-AzureDataFactoryEncryptValue + + DataFactory + + Specifies a PSDataFactory object. This cmdlet encrypts data for the data factory that this parameter specifies. + + PSDataFactory + + + Value + + Specifies the value to encrypt. + + SecureString + + + GatewayName + + Specifies the name of the gateway. This cmdlet encrypts data for the gateway that this parameter specifies. + + String + + + + New-AzureDataFactoryEncryptValue + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet encrypts data for the group that this parameter specifies. + + String + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet encrypts data for the data factory that this parameter specifies. + + String + + + Value + + Specifies the value to encrypt. + + SecureString + + + GatewayName + + Specifies the name of the gateway. This cmdlet encrypts data for the gateway that this parameter specifies. + + String + + + + + + DataFactory + + Specifies a PSDataFactory object. This cmdlet encrypts data for the data factory that this parameter specifies. + + PSDataFactory + + PSDataFactory + + + + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet encrypts data for the data factory that this parameter specifies. + + String + + String + + + + + + GatewayName + + Specifies the name of the gateway. This cmdlet encrypts data for the gateway that this parameter specifies. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet encrypts data for the group that this parameter specifies. + + String + + String + + + + + + Value + + Specifies the value to encrypt. + + SecureString + + SecureString + + + + + + + + + + + + + + + + + + + + + System.String + + + + + + + + + + + + + Example 1: Encrypt a connection string + + + + + PS C:\> $Value = ConvertTo-SecureString "Data Source=ContosoServer;Initial Catalog=catelog;user id =user123;password=password123" -AsPlainText -Force + PS C:\> New-AzureDataFactoryEncryptValue -DataFactoryName "WikiADF" -GatewayName "WikiGateway" -ResourceGroupName "ADF" -Value $Value + data source=ContosoServer;initial catalog=catelog;EncryptedCredential=KAAAAAABAAAQAAAAQUU5MUVBNzY4QkFCQkI3MEUwRTMxOUNFNkM0MjRDOTVDNDk3RTcyRi8XAXyE/ + H+f3JydTkdg5t2g1eC/VtyF3NAD3idYnhrAphPJmO0pCaG5nH2IY48L3XJi7wabrlrGF+ieiWh1bwdgdxrW+t2jWPnLvT/ENUXtcevpx/dmTGKagH8TU9HLcoL1CAanb7Vkpga1B/uzRxBnVdsdtfv + BzxG2M810tj1WzL8lFzA1mO5GbB0+ge116y0scL1vxjerjl5Muv0r0scG3lhj+IF0sXUMITFvhQwOIqweR052E6JlfJu+mTNFLCCkpw1iV+rhRhKqJF752dBuWjzI1EoyQUE17oK4OevkquuhUbfJmzj9B + hGKQ+VkndAZiSw19FEGSC7JzoUe/XWEs/FJYrQCCXIeNS94J9/VzN6KPYJR1pzAYCtnhq+p8Q== + + + The first command uses the ConvertTo-SecureString cmdlet to convert the specified connection string to a SecureString object, and then stores that object in the $Value variable. For more information, type Get-Help ConvertTo-SecureString. + The second command creates an encrypted value for the object stored in $Value for the specified data factory, gateway, and resource group. + + + + + + + + + Example 2: Encrypt a string + + + + + PS C:\> $Value = ConvertTo-SecureString "Test123" -AsPlainText -Force + PS C:\> New-AzureDataFactoryEncryptValue -DataFactoryName "WikiADF" -ResourceGroupName "ADF" -Value $Value + $Encrypted$String$KAAAAAABAAAQAAAAQUU5MUVBNzY4QkFCQkI3MEUwRTMxOUNFNkM0MjRDOTVDNDk3RTcyRi8XAXyE/H+f3JydTkdg5t2g1eC/VtyF3NAD3idYnhrAphPJm + O0pCaG5nH2IY48L3XJi7wabrlrGF+ieiWh1bwdgdxrW+t2jWPnLvT/ENUXtcevpxdmTGKagH8TU9HLcoL1CAanb7Vkpga1B/uzRxBnVdsdtfvBzxG2M810tj1WzL8lFzA1mO5GbB0+ge116y + 0scL1vxjerjl5Muv0r0scG3lhj+IF0sXUMITFvhQwOIqweR052E6JlfJu+mTNFLCCkpw1iV+rhRhKqJF752dBuWjzI1EoyQUE17oK4OevkquuhUbfJmzj9BhGKQ+VkndAZiSw19FEGSC7JzoUe + /XWEs/FJYrQCCXIeNS94J9/VzN6KPYJR1pzAYCtnhq+p8Q== + + + The first command uses the ConvertTo-SecureString cmdlet to convert the specified string to a SecureString object, and then stores that object in the $Value variable. + The second command creates an encrypted value for the object stored in $Value for the specified data factory and resource group. + + + + + + + + + + + + + + + + + + New-AzureDataFactoryGateway + + Creates a gateway for Data Factory. + + + + + New + AzureDataFactoryGateway + + + + The New-AzureDataFactoryGateway cmdlet creates a gateway in Azure Data Factory. + You must be in AzureResourceManager mode to run Azure Data Factory cmdlets. To switch to AzureResourceManager mode, type Switch-AzureMode AzureResourceManager. + + + + New-AzureDataFactoryGateway + + DataFactory + + Specifies a PSDataFactory object. This cmdlet creates a gateway for the data factory that this parameter specifies. + + PSDataFactory + + + Name + + Specifies the name of the gateway to create. + + String + + + Location + + Specifies the location of the gateway, such as WestUs or EastUS. Only WestUS is currently supported. + + String + + + Description + + Specifies a description for the gateway. + + String + + + + New-AzureDataFactoryGateway + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet creates a gateway that belongs to the group that this parameter specifies. + + String + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet creates a gateway for the data factory that this parameter specifies. + + String + + + Name + + Specifies the name of the gateway to create. + + String + + + Location + + Specifies the location of the gateway, such as WestUs or EastUS. Only WestUS is currently supported. + + String + + + Description + + Specifies a description for the gateway. + + String + + + + + + DataFactory + + Specifies a PSDataFactory object. This cmdlet creates a gateway for the data factory that this parameter specifies. + + PSDataFactory + + PSDataFactory + + + + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet creates a gateway for the data factory that this parameter specifies. + + String + + String + + + + + + Description + + Specifies a description for the gateway. + + String + + String + + + + + + Location + + Specifies the location of the gateway, such as WestUs or EastUS. Only WestUS is currently supported. + + String + + String + + + + + + Name + + Specifies the name of the gateway to create. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet creates a gateway that belongs to the group that this parameter specifies. + + String + + String + + + + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.PSDataFactoryGatewayKey + + + + + + + + + + + + + Example 1: Create a gateway + + + + + PS C:\> New-AzureDataFactoryGateway -ResourceGroupName "ADF" -Name "ContosoGateway" -DataFactoryName "WikiADF" -Location "WestUs" -Description "my gateway" + Name : ContosoGateway + Location : West US + Description : my gateway + Version : + Status : NeedRegistration + VersionStatus : None + CreateTime : 8/22/2014 1:40:34 AM + RegisterTime : + LastConnectTime : + ExpiryTime : + + + This command creates a gateway named ContosoGateway in the data factory named WikiADF in the resource group named ADF in the WestUS location. + + + + + + + + + + + Remove-AzureDataFactoryGateway + + + + Set-AzureDataFactoryGateway + + + + + + + New-AzureDataFactoryGatewayKey + + Creates a gateway key for Data Factory. + + + + + New + AzureDataFactoryGatewayKey + + + + + The New-AzureDataFactoryGatewayKey cmdlet creates a gateway key for a specified Azure Data Factory gateway. You register the gateway with a cloud service by using this key. + + You must be in AzureResourceManager mode to run Azure Data Factory cmdlets. To switch to AzureResourceManager mode, type Switch-AzureMode AzureResourceManager. + + + + New-AzureDataFactoryGatewayKey + + DataFactory + + Specifies a PSDataFactory object. This cmdlet creates a gateway key for the data factory that this parameter specifies. + + PSDataFactory + + + GatewayName + + + Specifies the name of the gateway. This cmdlet creates a key for the gateway that this parameter specifies. + + + String + + + + New-AzureDataFactoryGatewayKey + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet creates a key for a gateway that belongs to the group that this parameter specifies. + + String + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet creates a gateway key for the data factory that this parameter specifies. + + String + + + GatewayName + + + Specifies the name of the gateway. This cmdlet creates a key for the gateway that this parameter specifies. + + + String + + + + + + DataFactory + + Specifies a PSDataFactory object. This cmdlet creates a gateway key for the data factory that this parameter specifies. + + PSDataFactory + + PSDataFactory + + + + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet creates a gateway key for the data factory that this parameter specifies. + + String + + String + + + + + + GatewayName + + + Specifies the name of the gateway. This cmdlet creates a key for the gateway that this parameter specifies. + + + String + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet creates a key for a gateway that belongs to the group that this parameter specifies. + + String + + String + + + + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.PSDataFactoryGatewayKey + + + + + + + + + + + + + Example 1: Create a gateway key + + + + + PS C:\> New-AzureDataFactoryGatewayKey -ResourceGroupName "ADF" -GatewayName "ContosoGateway" -DataFactoryName "WikiADF" | Format-List + Gateway Key : ADF#40cbb3d9-2736-4794-a8a6-e6b839b4894f@a2d875ce-c9d7-4b8b-ad65-dd3ebbb9a940@8c0d1801-e863-44af-82e6-fb2f0c00f2ae@xz#Y9R0NhAeH3u7wgnrJyiWj4Y/QIhH4fFilIdzZgwsVQA= + + + This command creates a gateway key for the data factory gateway named ContosoGateway, and then passes the gateway key to the Format-List cmdlet by using the pipeline operator. For more information, type Get-Help Format-List. + + + + + + + + + + + + New-AzureDataFactoryGateway + + + + + + + New-AzureDataFactoryHub + + Creates a hub for Data Factory. + + + + + New + AzureDataFactoryHub + + + + The New-AzureDataFactoryHub cmdlet creates a hub for Azure Data Factory in the specified Azure resource group and in the specified data factory with the specified file definition. After you create the hub, you can use it to store and manage linked services in a group, and you can add pipelines to the hub. + You must be in AzureResourceManager mode to run Azure Data Factory cmdlets. To switch to AzureResourceManager mode, type Switch-AzureMode AzureResourceManager. + + + + New-AzureDataFactoryHub + + DataFactory + + Specifies a PSDataFactory object. This cmdlet creates a hub for the data factory that this parameter specifies. + + PSDataFactory + + + Name + + Specifies the name of the hub to create. + + String + + + File + + Specifies the full path of the JavaScript Object Notation (JSON) file that contains the description of the hub. + + String + + + Force + + Indicates that this cmdlet replaces an existing hub without prompting you for confirmation. + + + + + New-AzureDataFactoryHub + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet creates a hub that belongs to the group that this parameter specifies. + + String + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet creates a hub for the data factory that this parameter specifies. + + String + + + Name + + Specifies the name of the hub to create. + + String + + + File + + Specifies the full path of the JavaScript Object Notation (JSON) file that contains the description of the hub. + + String + + + Force + + Indicates that this cmdlet replaces an existing hub without prompting you for confirmation. + + + + + + + DataFactory + + Specifies a PSDataFactory object. This cmdlet creates a hub for the data factory that this parameter specifies. + + PSDataFactory + + PSDataFactory + + + + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet creates a hub for the data factory that this parameter specifies. + + String + + String + + + + + + File + + Specifies the full path of the JavaScript Object Notation (JSON) file that contains the description of the hub. + + String + + String + + + + + + Force + + Indicates that this cmdlet replaces an existing hub without prompting you for confirmation. + + SwitchParameter + + SwitchParameter + + + + + + Name + + Specifies the name of the hub to create. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet creates a hub that belongs to the group that this parameter specifies. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Create a hub + + + + + PS C:\>New-AzureDataFactoryHub -ResourceGroupName "ADFResourceGroup" -DataFactoryName "ADFDataFactory" -Name "ContosoDataHub" -File "C:\Hub.json" + + + + This command creates a hub named ContosoDataHub in the resource group ADFResourceGroup and the data factory named ADFDataFactory. + + + + + + + + + + + Online Version: + + + + Get-AzureDataFactoryHub + + + + Remove-AzureDataFactoryHub + + + + + + + New-AzureDataFactoryLinkedService + + Links a data store or a cloud service to Data Factory. + + + + + New + AzureDataFactoryLinkedService + + + + The New-AzureDataFactoryLinkedService cmdlet links a data store or a cloud service to Azure Data Factory. If you specify a name for a linked service that already exists, this cmdlet prompts you for confirmation before it replaces the linked service. If you specify the Force parameter, the cmdlet replaces the existing linked service without confirmation. + + Perform these operations in the following order: + + -- Create a data factory. + -- Create linked services. + -- Create tables. + -- Create a pipeline. + + You must be in AzureResourceManager mode to run Azure Data Factory cmdlets. To switch to AzureResourceManager mode, type Switch-AzureMode AzureResourceManager. + + + + New-AzureDataFactoryLinkedService + + DataFactory + + Specifies a PSDataFactory object. This cmdlet creates a linked service for the data factory that this parameter specifies. + + PSDataFactory + + + Name + + Specifies the name of the linked service to create. + + String + + + File + + Specifies the full path of the JavaScript Object Notation (JSON) file that contains the description of the linked service. + + String + + + Force + + Indicates that this cmdlet replaces an existing linked service without prompting you for confirmation. + + + + + New-AzureDataFactoryLinkedService + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet creates a linked service for the group that this parameter specifies. + + String + + + DataFactoryName + + + Specifies the name of a data factory. This cmdlet creates a linked service for the data factory that this parameter specifies. + + + String + + + Name + + Specifies the name of the linked service to create. + + String + + + File + + Specifies the full path of the JavaScript Object Notation (JSON) file that contains the description of the linked service. + + String + + + Force + + Indicates that this cmdlet replaces an existing linked service without prompting you for confirmation. + + + + + + + DataFactory + + Specifies a PSDataFactory object. This cmdlet creates a linked service for the data factory that this parameter specifies. + + PSDataFactory + + PSDataFactory + + + + + + DataFactoryName + + + Specifies the name of a data factory. This cmdlet creates a linked service for the data factory that this parameter specifies. + + + String + + String + + + + + + File + + Specifies the full path of the JavaScript Object Notation (JSON) file that contains the description of the linked service. + + String + + String + + + + + + Force + + Indicates that this cmdlet replaces an existing linked service without prompting you for confirmation. + + SwitchParameter + + SwitchParameter + + + + + + Name + + Specifies the name of the linked service to create. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet creates a linked service for the group that this parameter specifies. + + String + + String + + + + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.PSLinkedService + + + + + + + + + + + + + Example 1: Create a linked service + + + + + PS C:\> New-AzureDataFactoryLinkedService -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -Name "LinkedServiceCuratedWikiData" -File "C:\\samples\\WikiSample\\LinkedServiceCuratedWikiData.json" | Format-List + LinkedServiceName : LinkedServiceCuratedWikiData + ResourceGroupName : ADF + DataFactoryName : WikiADF + Properties : Microsoft.DataFactories.AzureStorageLinkedService + + + This command creates a linked service named LinkedServiceCuratedWikiData in the data factory named WikiADF. This linked service links an Azure blob store specified in the file to the data factory named WikiADF. The command passes the result to the Format-List cmdlet by using the pipeline operator. That Windows PowerShell cmdlet formats the results. For more information, type Get-Help Format-List. + + + + + + + + + + + Get-AzureDataFactoryLinkedService + + + + Remove-AzureDataFactoryLinkedService + + + + + + + New-AzureDataFactoryPipeline + + Creates a pipeline in Data Factory. + + + + + New + AzureDataFactoryPipeline + + + + The New-AzureDataFactoryPipeline cmdlet creates a pipeline in Azure Data Factory. If you specify a name for a pipeline that already exists, the cmdlet prompts you for confirmation before it replaces the pipeline. If you specify the Force parameter, the cmdlet replaces the existing pipeline without confirmation. + + Perform these operations in the following order: + + -- Create a data factory. + -- Create linked services. + -- Create tables. + -- Create a pipeline. + + If a pipeline with the same name already exists in the data factory, this cmdlet prompts you to confirm whether to overwrite the existing pipeline with the new pipeline. If you confirm to overwrite the existing pipeline, the pipeline definition is also replaced. + You must be in AzureResourceManager mode to run Azure Data Factory cmdlets. To switch to AzureResourceManager mode, type Switch-AzureMode AzureResourceManager. + + + + New-AzureDataFactoryPipeline + + DataFactory + + Specifies a PSDataFactory object. This cmdlet creates a pipeline for the data factory that this parameter specifies. + + PSDataFactory + + + Name + + Specifies the name of the pipeline to create. + + String + + + File + + + Specifies the full path of the JavaScript Object Notation (JSON) file that contains the description of the pipeline. + + + String + + + Force + + Indicates that this cmdlet replaces an existing pipeline without prompting you for confirmation. + + + + + New-AzureDataFactoryPipeline + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet creates a pipeline for the group that this parameter specifies. + + String + + + Name + + Specifies the name of the pipeline to create. + + String + + + DataFactoryName + + + Specifies the name of a data factory. This cmdlet creates a pipeline for the data factory that this parameter specifies. + + + String + + + File + + + Specifies the full path of the JavaScript Object Notation (JSON) file that contains the description of the pipeline. + + + String + + + Force + + Indicates that this cmdlet replaces an existing pipeline without prompting you for confirmation. + + + + + + + DataFactory + + Specifies a PSDataFactory object. This cmdlet creates a pipeline for the data factory that this parameter specifies. + + PSDataFactory + + PSDataFactory + + + + + + DataFactoryName + + + Specifies the name of a data factory. This cmdlet creates a pipeline for the data factory that this parameter specifies. + + + String + + String + + + + + + File + + + Specifies the full path of the JavaScript Object Notation (JSON) file that contains the description of the pipeline. + + + String + + String + + + + + + Force + + Indicates that this cmdlet replaces an existing pipeline without prompting you for confirmation. + + SwitchParameter + + SwitchParameter + + + + + + Name + + Specifies the name of the pipeline to create. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet creates a pipeline for the group that this parameter specifies. + + String + + String + + + + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.PSPipeline + + + + + + + + + + + + + Example 1: Create a pipeline + + + + + PS C:\> New-AzureDataFactoryPipeline -ResourceGroupName "ADF" -Name "DPWikisample" -DataFactoryName "WikiADF" -File "C:\DPWikisample.json" + PipelineName : DPWikisample + ResourceGroupName : ADF + DataFactoryName : WikiADF11 + Properties : Microsoft.DataFactories.PipelineProperties + + + This command creates a pipeline named DPWikisample in the data factory named ADF. The command bases the pipeline on information in the DPWikisample.json file. This file includes information about activities such as Copy Activity and HDInsight Activity in the pipeline. + + + + + + + + + + + Get-AzureDataFactoryPipeline + + + + Remove-AzureDataFactoryPipeline + + + + Resume-AzureDataFactoryPipeline + + + + Set-AzureDataFactoryPipelineActivePeriod + + + + Suspend-AzureDataFactoryPipeline + + + + + + + New-AzureDataFactoryTable + + Creates a table in Data Factory. + + + + + New + AzureDataFactoryTable + + + + The New-AzureDataFactoryTable cmdlet creates a table in Azure Data Factory. If you specify a name for a table that already exists, this cmdlet prompts you for confirmation before it replaces the table. If you specify the Force parameter, the cmdlet replaces the existing table without confirmation. + + Perform these operations in the following order: + + -- Create a data factory. + -- Create linked services. + -- Create tables. + -- Create a pipeline. + + If a table with the same name already exists in the data factory, this cmdlet prompts you to confirm whether to overwrite the existing table with the new table. If you confirm to overwrite the existing table, the table definition is also replaced. + You must be in AzureResourceManager mode to run Azure Data Factory cmdlets. To switch to AzureResourceManager mode, type Switch-AzureMode AzureResourceManager. + + + + New-AzureDataFactoryTable + + DataFactory + + Specifies a PSDataFactory object. This cmdlet creates a table in the data factory that this parameter specifies. + + PSDataFactory + + + Name + + Specifies the name of the table to create. + + String + + + File + + Specifies the full path of the JavaScript Object Notation (JSON) file that contains the description of the table. + + String + + + Force + + Indicates that this cmdlet replaces an existing table without prompting you for confirmation. + + + + + New-AzureDataFactoryTable + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet creates a table in the group that this parameter specifies. + + String + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet creates a table in the data factory that this parameter specifies. + + String + + + Name + + Specifies the name of the table to create. + + String + + + File + + Specifies the full path of the JavaScript Object Notation (JSON) file that contains the description of the table. + + String + + + Force + + Indicates that this cmdlet replaces an existing table without prompting you for confirmation. + + + + + + + DataFactory + + Specifies a PSDataFactory object. This cmdlet creates a table in the data factory that this parameter specifies. + + PSDataFactory + + PSDataFactory + + + + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet creates a table in the data factory that this parameter specifies. + + String + + String + + + + + + File + + Specifies the full path of the JavaScript Object Notation (JSON) file that contains the description of the table. + + String + + String + + + + + + Force + + Indicates that this cmdlet replaces an existing table without prompting you for confirmation. + + SwitchParameter + + SwitchParameter + + + + + + Name + + Specifies the name of the table to create. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet creates a table in the group that this parameter specifies. + + String + + String + + + + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.PSTable + + + + + + + + + + + + + Example 1: Create a table + + + + + PS C:\> New-AzureDataFactoryTable -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -Name "DAWikipediaClickEvents" -File "C:\\samples\\WikiSample\\DA_WikipediaClickEvents.json" + TableName : DAWikipediaClickEvents + ResourceGroupName : ADF + DataFactoryName : WikiADF + Availability : Microsoft.DataFactories.Availability + Location : Microsoft.DataFactories.AzureBlobLocation + Policy : Microsoft.DataFactories.Policy + Structure : {} + Published : False + + + This command creates a table named DA_WikipediaClickEvents in the data factory named WikiADF. The command bases the table on information in the DAWikipediaClickEvents.json file. + + + + + + + + + Example 2: View availability for a new table + + + + + PS C:\> $Table = New-AzureDataFactoryTable -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -Name "DAWikipediaClickEvents" -File "C:\\samples\\WikiSample\\DA_WikipediaClickEvents.json" + PS C:\> $Table.Availability + AnchorDateTime : + Frequency : Hour + Interval : 1 + Offset : + WaitOnExternal : Microsoft.DataFactories.WaitOnExternal + + + The first command creates a table named DA_WikipediaClickEvents, as in a previous example, and then assigns that table to the $Table variable. + The second command uses standard dot notation to display details about the Availability property of the table. + + + + + + + + + Example 3: View location for a new table + + + + + PS C:\> $Table = New-AzureDataFactoryTable -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -Name "DAWikipediaClickEvents" -File "C:\\samples\\WikiSample\\DA_WikipediaClickEvents.json" + PS C:\> $Table.Location + BlobPath : wikidatagateway/wikisampledatain/ + FilenamePrefix : + Format : + LinkedServiceName : LinkedServiceWikipediaClickEvents + PartitionBy : {} + + + The first command creates a table named DA_WikipediaClickEvents, as in a previous example, and then assigns that table to the $Table variable. + The second command displays details about the Location property of the table. + + + + + + + + + Example 4: View validation rules for a new table + + + + + PS C:\> $Table = New-AzureDataFactoryTable -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -Name "DAWikipediaClickEvents" -File "C:\\samples\\WikiSample\\DA_WikipediaClickEvents.json" + PS C:\> $Table.Policy.Validation | Format-List $table.Location + + BlobPath : wikidatagateway/wikisampledatain/ + FilenamePrefix : + Format : + LinkedServiceName : LinkedServiceWikipediaClickEvents + PartitionBy : {} + + MinimumRows : + MinimumSizeMB : 1 + + + The first command creates a table named DA_WikipediaClickEvents, as in a previous example, and then assigns that table to the $Table variable. + The second command gets details about the validation rules for the table, and then passes them to the Format-List cmdlet by using the pipeline operator. That Windows PowerShell cmdlet formats the results. For more information, type Get-Help Format-List. + + + + + + + + + + + Get-AzureDataFactoryTable + + + + Remove-AzureDataFactoryTable + + + + + + + Remove-AzureDataFactory + + Removes a data factory. + + + + + Remove + AzureDataFactory + + + + The Remove-AzureDataFactory cmdlet removes a data factory. + You must be in AzureResourceManager mode to run Azure Data Factory cmdlets. To switch to AzureResourceManager mode, type Switch-AzureMode AzureResourceManager. + + + + Remove-AzureDataFactory + + DataFactory + + Specifies the PSDataFactory object to remove. + + PSDataFactory + + + Force + + Indicates that this cmdlet removes a data factory without prompting you for confirmation. + + + + + Remove-AzureDataFactory + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet removes a data factory from the group that this parameter specifies. + + String + + + Name + + + Specifies the name of the data factory to remove. + + + String + + + Force + + Indicates that this cmdlet removes a data factory without prompting you for confirmation. + + + + + + + DataFactory + + Specifies the PSDataFactory object to remove. + + PSDataFactory + + PSDataFactory + + + + + + Force + + Indicates that this cmdlet removes a data factory without prompting you for confirmation. + + SwitchParameter + + SwitchParameter + + + + + + Name + + + Specifies the name of the data factory to remove. + + + String + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet removes a data factory from the group that this parameter specifies. + + String + + String + + + + + + + + + + + + + + + + + + + + + System.Boolean + + + + + + + + + + + + + Example 1: Remove a data factory + + + + + PS C:\> Remove-AzureDataFactory -Name "WikiADF" -ResourceGroupName "ADF" + Confirm + Are you sure you want to remove data factory 'WikiADF' in resource group 'ADF'? + [Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y + True + + + This command removes the data factory named WikiADF from the resource group named ADF. This command returns a value of $True. + + + + + + + + + + + Get-AzureDataFactory + + + + New-AzureDataFactory + + + + + + + Remove-AzureDataFactoryGateway + + Removes a gateway from Data Factory. + + + + + Remove + AzureDataFactoryGateway + + + + The Remove-AzureDataFactoryGateway cmdlet removes the specified gateway from Azure Data Factory. + You must be in AzureResourceManager mode to run Azure Data Factory cmdlets. To switch to AzureResourceManager mode, type Switch-AzureMode AzureResourceManager. + + + + Remove-AzureDataFactoryGateway + + DataFactory + + Specifies a PSDataFactory object. This cmdlet removes a gateway from the data factory that this parameter specifies. + + PSDataFactory + + + Name + + Specifies the name of the gateway to remove. + + String + + + Force + + Indicates that this cmdlet removes a gateway without prompting you for confirmation. + + + + + Remove-AzureDataFactoryGateway + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet removes a gateway that belongs to the group that this parameter specifies. + + String + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet removes a gateway from the data factory that this parameter specifies. + + String + + + Name + + Specifies the name of the gateway to remove. + + String + + + Force + + Indicates that this cmdlet removes a gateway without prompting you for confirmation. + + + + + + + DataFactory + + Specifies a PSDataFactory object. This cmdlet removes a gateway from the data factory that this parameter specifies. + + PSDataFactory + + PSDataFactory + + + + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet removes a gateway from the data factory that this parameter specifies. + + String + + String + + + + + + Force + + Indicates that this cmdlet removes a gateway without prompting you for confirmation. + + SwitchParameter + + SwitchParameter + + + + + + Name + + Specifies the name of the gateway to remove. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet removes a gateway that belongs to the group that this parameter specifies. + + String + + String + + + + + + + + + + + + + + + + + + + + + System.Boolean + + + + + + + + + + + + + Example 1: Remove a gateway + + + + + PS C:\> Remove-AzureDataFactoryGateway -Name "ContosoGateway" -DataFactoryName "WikiADF" -ResourceGroupName "ADF" + Confirm + Are you sure you want to remove gateway 'ContosoGateway' in data factory 'WikiADF'? + [Y] Yes [N] No [S] Suspend [?] Help (default is Y): Y + True + + + This command removes the gateway named ContosoGateway from the data factory named WikiADF. + + + + + + + + + + + Get-AzureDataFactoryGateway + + + + New-AzureDataFactoryGateway + + + + Set-AzureDataFactoryGateway + + + + + + + Remove-AzureDataFactoryHub + + Removes a hub from Data Factory. + + + + + Remove + AzureDataFactoryHub + + + + The Remove-AzureDataFactoryHub cmdlet removes a hub from Azure Data Factory in the specified Azure resource group and in the specified data factory. If you remove a hub, all linked services and pipelines in the hub are also removed. + You must be in AzureResourceManager mode to run Azure Data Factory cmdlets. To switch to AzureResourceManager mode, type Switch-AzureMode AzureResourceManager. + + + + Remove-AzureDataFactoryHub + + DataFactory + + Specifies a PSDataFactory object. This cmdlet removes a hub from the data factory that this parameter specifies. + + PSDataFactory + + + Name + + Specifies the name of the hub to remove. + + String + + + Force + + Indicates that this cmdlet removes a hub without prompting you for confirmation. + + + + + Remove-AzureDataFactoryHub + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet removes a hub from the group that this parameter specifies. + + String + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet removes a hub from the data factory that this parameter specifies. + + String + + + Name + + Specifies the name of the hub to remove. + + String + + + Force + + Indicates that this cmdlet removes a hub without prompting you for confirmation. + + + + + + + DataFactory + + Specifies a PSDataFactory object. This cmdlet removes a hub from the data factory that this parameter specifies. + + PSDataFactory + + PSDataFactory + + + + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet removes a hub from the data factory that this parameter specifies. + + String + + String + + + + + + Force + + Indicates that this cmdlet removes a hub without prompting you for confirmation. + + SwitchParameter + + SwitchParameter + + + + + + Name + + Specifies the name of the hub to remove. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet removes a hub from the group that this parameter specifies. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Remove a hub + + + + + PS C:\>Remove-AzureDataFactoryHub -ResourceGroupName "ADFResourceGroup" -DataFactoryName "ADFDataFactory" -Name "ContosoDataHub" + + + + This command removes the hub named ContosoDataHub from the Azure resource group named ADFResourceGroup and the data factory named ADFDataFactory. + + + + + + + + + + + Online Version: + + + + New-AzureDataFactoryHub + + + + Get-AzureDataFactoryHub + + + + + + + Remove-AzureDataFactoryLinkedService + + Removes a linked service from Data Factory. + + + + + Remove + AzureDataFactoryLinkedService + + + + The Remove-AzureDataFactoryLinkedService cmdlet removes a linked service from Azure Data Factory. + You must be in AzureResourceManager mode to run Azure Data Factory cmdlets. To switch to AzureResourceManager mode, type Switch-AzureMode AzureResourceManager. + + + + Remove-AzureDataFactoryLinkedService + + DataFactory + + Specifies a PSDataFactory object. This cmdlet removes a linked service from the data factory that this parameter specifies. + + PSDataFactory + + + Name + + + Specifies the name of the linked service to remove. Name of the linked service. + + + String + + + Force + + Indicates that this cmdlet removes a linked service without prompting you for confirmation. + + + + + Remove-AzureDataFactoryLinkedService + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet removes a linked service from the group that this parameter specifies. + + String + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet removes a linked service from the data factory that this parameter specifies. + + String + + + Name + + + Specifies the name of the linked service to remove. Name of the linked service. + + + String + + + Force + + Indicates that this cmdlet removes a linked service without prompting you for confirmation. + + + + + + + DataFactory + + Specifies a PSDataFactory object. This cmdlet removes a linked service from the data factory that this parameter specifies. + + PSDataFactory + + PSDataFactory + + + + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet removes a linked service from the data factory that this parameter specifies. + + String + + String + + + + + + Force + + Indicates that this cmdlet removes a linked service without prompting you for confirmation. + + SwitchParameter + + SwitchParameter + + + + + + Name + + + Specifies the name of the linked service to remove. Name of the linked service. + + + String + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet removes a linked service from the group that this parameter specifies. + + String + + String + + + + + + + + + + + + + + + + + + + + + System.Boolean + + + + + + + + + + + + + Example 1: Remove a linked service + + + + + PS C:\> Remove-AzureDataFactoryLinkedService -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -Name "LinkedServiceTest" + + Confirm + Are you sure you want to remove linked service 'LinkedServiceTest' in data factory 'WikiADF'? + [Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y + True + + + This command removes the linked service named LinkedServiceTest from the data factory named WikiADF. This command returns a value of $True. + + + + + + + + + + + Get-AzureDataFactoryLinkedService + + + + New-AzureDataFactoryLinkedService + + + + + + + Remove-AzureDataFactoryPipeline + + Removes a pipeline from Data Factory. + + + + + Remove + AzureDataFactoryPipeline + + + + The Remove-AzureDataFactoryPipeline cmdlet removes a pipeline from Azure Data Factory. + You must be in AzureResourceManager mode to run Azure Data Factory cmdlets. To switch to AzureResourceManager mode, type Switch-AzureMode AzureResourceManager. + + + + Remove-AzureDataFactoryPipeline + + DataFactory + + Specifies a PSDataFactory object. This cmdlet removes a pipeline from the data factory that this parameter specifies. + + PSDataFactory + + + Name + + Specifies the name of the pipeline to remove. + + String + + + Force + + Indicates that this cmdlet removes a pipeline without prompting you for confirmation. + + + + + Remove-AzureDataFactoryPipeline + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet removes a pipeline from the group that this parameter specifies. + + String + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet removes a pipeline from the data factory that this parameter specifies. + + String + + + Name + + Specifies the name of the pipeline to remove. + + String + + + Force + + Indicates that this cmdlet removes a pipeline without prompting you for confirmation. + + + + + + + DataFactory + + Specifies a PSDataFactory object. This cmdlet removes a pipeline from the data factory that this parameter specifies. + + PSDataFactory + + PSDataFactory + + + + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet removes a pipeline from the data factory that this parameter specifies. + + String + + String + + + + + + Force + + Indicates that this cmdlet removes a pipeline without prompting you for confirmation. + + SwitchParameter + + SwitchParameter + + + + + + Name + + Specifies the name of the pipeline to remove. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet removes a pipeline from the group that this parameter specifies. + + String + + String + + + + + + + + + + + + + + + + + + + + + System.Boolean + + + + + + + + + + + + + Example 1: Remove a pipeline + + + + + PS C:\> Remove-AzureDataFactoryPipeline -ResourceGroupName "ADF" -Name "DPWikisample" -DataFactoryName "WikiADF" + Confirm + Are you sure you want to remove pipeline 'DPWikisample' in data factory 'WikiADF'? + [Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y + True + + + This cmdlet removes the pipeline named DPWikisample from the data factory named WikiADF. The command returns a value of $True. + + + + + + + + + + + Get-AzureDataFactoryPipeline + + + + New-AzureDataFactoryPipeline + + + + Resume-AzureDataFactoryPipeline + + + + Set-AzureDataFactoryPipelineActivePeriod + + + + Suspend-AzureDataFactoryPipeline + + + + + + + Remove-AzureDataFactoryTable + + Removes a table from Data Factory. + + + + + Remove + AzureDataFactoryTable + + + + The Remove-AzureDataFactoryTable cmdlet removes a table from Azure Data Factory. + You must be in AzureResourceManager mode to run Azure Data Factory cmdlets. To switch to AzureResourceManager mode, type Switch-AzureMode AzureResourceManager. + + + + Remove-AzureDataFactoryTable + + DataFactory + + Specifies a PSDataFactory object. This cmdlet removes a table from the data factory that this parameter specifies. + + PSDataFactory + + + Name + + Specifies the name of the table to remove. + + String + + + Force + + Indicates that this cmdlet removes a table without prompting you for confirmation. + + + + + Remove-AzureDataFactoryTable + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet removes a table from the group that this parameter specifies. + + String + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet removes a table from the data factory that this parameter specifies. + + String + + + Name + + Specifies the name of the table to remove. + + String + + + Force + + Indicates that this cmdlet removes a table without prompting you for confirmation. + + + + + + + DataFactory + + Specifies a PSDataFactory object. This cmdlet removes a table from the data factory that this parameter specifies. + + PSDataFactory + + PSDataFactory + + + + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet removes a table from the data factory that this parameter specifies. + + String + + String + + + + + + Force + + Indicates that this cmdlet removes a table without prompting you for confirmation. + + SwitchParameter + + SwitchParameter + + + + + + Name + + Specifies the name of the table to remove. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet removes a table from the group that this parameter specifies. + + String + + String + + + + + + + + + + + + + + + + + + + + + System.Boolean + + + + + + + + + + + + + Example 1: Remove a table + + + + + PS C:\> Remove-AzureDataFactoryTable -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -Name "DAWikiAggregatedData" + Confirm + Are you sure you want to remove table 'DAWikiAggregatedData' in data factory 'WikiADF'? + [Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y + True + + + This command removes the table named DAWikiAggregatedData from the data factory named WikiADF. The command returns a value of $True. + + + + + + + + + + + Get-AzureDataFactoryTable + + + + New-AzureDataFactoryTable + + + + + + + Resume-AzureDataFactoryPipeline + + Resumes a suspended pipeline in Data Factory. + + + + + Resume + AzureDataFactoryPipeline + + + + The Resume-AzureDataFactoryPipeline cmdlet resumes a suspended pipeline in Azure Data Factory. + You must be in AzureResourceManager mode to run Azure Data Factory cmdlets. To switch to AzureResourceManager mode, type Switch-AzureMode AzureResourceManager. + + + + Resume-AzureDataFactoryPipeline + + DataFactory + + Specifies a PSDataFactory object. This cmdlet resumes a pipeline that belongs to the data factory that this parameter specifies. + + PSDataFactory + + + Name + + Specifies the name of the pipeline to resume. + + String + + + Force + + Indicates that this cmdlet resumes a pipeline without prompting you for confirmation. + + + + + Resume-AzureDataFactoryPipeline + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet resumes a pipeline that belongs to the group that this parameter specifies. + + String + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet resumes a pipeline that belongs to the data factory that this parameter specifies. + + String + + + Name + + Specifies the name of the pipeline to resume. + + String + + + Force + + Indicates that this cmdlet resumes a pipeline without prompting you for confirmation. + + + + + + + DataFactory + + Specifies a PSDataFactory object. This cmdlet resumes a pipeline that belongs to the data factory that this parameter specifies. + + PSDataFactory + + PSDataFactory + + + + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet resumes a pipeline that belongs to the data factory that this parameter specifies. + + String + + String + + + + + + Force + + Indicates that this cmdlet resumes a pipeline without prompting you for confirmation. + + SwitchParameter + + SwitchParameter + + + + + + Name + + Specifies the name of the pipeline to resume. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet resumes a pipeline that belongs to the group that this parameter specifies. + + String + + String + + + + + + + + + + + + + + + + + + + + + System.Boolean + + + + + + + + + + + + + Example 1: Resume a pipeline + + + + + PS C:\> Resume-AzureDataFactoryPipeline -ResourceGroupName "ADF" -Name "DPWikisample" -DataFactoryName "WikiADF" + Confirm + Are you sure you want to resume pipeline 'DPWikisample' in data factory 'WikiADF'? + [Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y + True + + + This command resumes the pipeline named DPWikisample in the data factory named WikiADF. Use the Suspend-AzureDataFactoryPipeline cmdlet to suspend a pipeline. The command returns a value of $True. + + + + + + + + + + + Get-AzureDataFactoryPipeline + + + + New-AzureDataFactoryPipeline + + + + Remove-AzureDataFactoryPipeline + + + + Set-AzureDataFactoryPipelineActivePeriod + + + + Suspend-AzureDataFactoryPipeline + + + + + + + Save-AzureDataFactoryLog + + Downloads log files from HDInsight processing. + + + + + Save + AzureDataFactoryLog + + + + You must be in AzureResourceManager mode to run Azure Data Factory cmdlets. To switch to AzureResourceManager mode, type Switch-AzureMode AzureResourceManager. + The Save-AzureDataFactoryLog cmdlet downloads log files associated with Azure HDInsight processing of Pig or Hive projects or for custom activities to your local hard drive. You first run the Get-AzureDataFactoryRun cmdlet to get an ID for an activity run for a data slice, and then use that ID to retrieve log files from the binary large object (BLOB) storage associated with the HDInsight cluster. + If you do not specify –DownloadLogs parameter, the cmdlet just returns the location of log files. + If you specify –DownloadLogs parameter without specifying an output directory (-Output parameter), the log files are downloaded to the default Documents folder. + If you specify –DownloadLogs parameter along with an output folder (-Output), the log files are downloaded to the specified folder. + + + + Save-AzureDataFactoryLog + + DataFactoryName + + Specifies the name of a data factory. This cmdlet downloads log files for the data factory that this parameter specifies. + + String + + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet creates a data factory that belongs to the group that this parameter specifies. + + String + + + Id + + Specifies the ID of the activity run for the data slice. Use the Get-AzureDataFactoryRun cmdlet to get an ID. + + String + + + Output + + Specifies the output folder in which the downloaded log files are saved. + + String + + + DownloadLogs + + Indicates that this cmdlet downloads log files to your local computer. If Ouptut folder is not specified, files are saved to Documents folder under a subfolder. + + + + + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet downloads log files for the data factory that this parameter specifies. + + String + + String + + + + + + DownloadLogs + + Indicates that this cmdlet downloads log files to your local computer. If Ouptut folder is not specified, files are saved to Documents folder under a subfolder. + + SwitchParameter + + SwitchParameter + + + + + + Id + + Specifies the ID of the activity run for the data slice. Use the Get-AzureDataFactoryRun cmdlet to get an ID. + + String + + String + + + + + + Output + + Specifies the output folder in which the downloaded log files are saved. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet creates a data factory that belongs to the group that this parameter specifies. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Save log files to a specific folder + + + + + PS C:\>Save-AzureDataFactoryLog -ResourceGroupName "ADF" -DataFactoryName "LogProcessingFactory" -Id "841b77c9-d56c-48d1-99a3-8c16c3e77d39" -DownloadLogs -Output "C:\Test" + + + + This command saves log files for the activity run with the ID of 841b77c9-d56c-48d1-99a3-8c16c3e77d39 where the activity belongs to a pipeline in the data factory named LogProcessingFactory in the resource group named ADF. The log files are saved to the C:\Test folder. + + + + + + + + + Example 2: Save log files to default Documents folder + + + + + PS C:\>Save-AzureDataFactoryLog -ResourceGroupName "ADF" -DataFactoryName "LogProcessingFactory" -Id "841b77c9-d56c-48d1-99a3-8c16c3e77d39" -DownloadLogs + + + + This command saves log files to Documents folder (default). + + + + + + + + + Example 2: Get the location of log files + + + + + PS C:\>Save-AzureDataFactoryLog -ResourceGroupName "ADF" -DataFactoryName "LogProcessingFactory" -Id "841b77c9-d56c-48d1-99a3-8c16c3e77d39" + + + + This command returns the location of log files. Note that –DownloadLogs parameter is not specified. + + + + + + + + + + + Online Version: + + + + Get-AzureDataFactoryRun + + + + Get-AzureDataFactoryPipeline + + + + New-AzureDataFactoryPipeline + + + + Remove-AzureDataFactoryPipeline + + + + Set-AzureDataFactoryPipelineActivePeriod + + + + Suspend-AzureDataFactoryPipeline + + + + + + + Set-AzureDataFactoryGateway + + Sets the description for a gateway in Data Factory. + + + + + Set + AzureDataFactoryGateway + + + + The Set-AzureDataFactoryGateway cmdlet sets the description for the specified gateway in Azure Data Factory. + You must be in AzureResourceManager mode to run Azure Data Factory cmdlets. To switch to AzureResourceManager mode, type Switch-AzureMode AzureResourceManager. + + + + Set-AzureDataFactoryGateway + + DataFactory + + Specifies a PSDataFactory object. This cmdlet sets the description for the gateway in the data factory that this parameter specifies. + + PSDataFactory + + + Name + + Specifies the name of the gateway for which to set a description. + + String + + + Description + + Specifies a description for the gateway. + + String + + + + Set-AzureDataFactoryGateway + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet sets the description for a gateway that belongs to the group that this parameter specifies. + + String + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet sets the description for the gateway in the data factory that this parameter specifies. + + String + + + Name + + Specifies the name of the gateway for which to set a description. + + String + + + Description + + Specifies a description for the gateway. + + String + + + + + + DataFactory + + Specifies a PSDataFactory object. This cmdlet sets the description for the gateway in the data factory that this parameter specifies. + + PSDataFactory + + PSDataFactory + + + + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet sets the description for the gateway in the data factory that this parameter specifies. + + String + + String + + + + + + Description + + Specifies a description for the gateway. + + String + + String + + + + + + Name + + Specifies the name of the gateway for which to set a description. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet sets the description for a gateway that belongs to the group that this parameter specifies. + + String + + String + + + + + + + + + + + + + + + + + + + + + System.Collections.Generic.List`1[[Microsoft.WindowsAzure.Commands.Utilities.PSDataFactoryGateway]], Microsoft.WindowsAzure.Commands.Utilities.PSDataFactoryGateway + + + + + + + + + + + + + Example 1: Set the description for a gateway + + + + + PS C:\> Set-AzureDataFactoryGateway -ResourceGroupName "ADF" -Name "ContosoGateway" -DataFactoryName "WikiADF" -Description "my gateway" + Name : ContosoGateway + Location : West US + Description : my gateway + Version : 1.3.5338.1 + Status : Online + VersionStatus : UpToDate + CreateTime : 8/22/2014 1:31:09 AM + RegisterTime : 8/22/2014 1:31:37 AM + LastConnectTime : 8/22/2014 1:41:41 AM + ExpiryTime : + + + + This command sets the description for the gateway named ContosoGateway in the data factory named WikiADF. The Description parameter specifies the new description. + + + + + + + + + + + Get-AzureDataFactoryGateway + + + + New-AzureDataFactoryGateway + + + + Remove-AzureDataFactoryGateway + + + + + + + Set-AzureDataFactoryPipelineActivePeriod + + Configures the active period for data slices. + + + + + Set + AzureDataFactoryPipelineActivePeriod + + + + The Set-AzureDataFactoryPipelineActivePeriod cmdlet configures the active period for the data slices that are processed by a pipeline in Azure Data Factory. If you use the Set-AzureDataFactorySliceStatus cmdlet to modify the status of slices for a table, make sure that the start time and end time for a slice are in the active period of the pipeline. + After you create a pipeline, you can specify the period in which data processing occurs. Specifying the active period for a pipeline defines the time duration in which the data slices are processed based on the Availability properties that were defined for each Data Factory table. + You must be in AzureResourceManager mode to run Azure Data Factory cmdlets. To switch to AzureResourceManager mode, type Switch-AzureMode AzureResourceManager. + + + + Set-AzureDataFactoryPipelineActivePeriod + + DataFactory + + Specifies a PSDataFactory object. This cmdlet modifies the active period for a pipeline that belongs to the data factory that this parameter specifies. + + PSDataFactory + + + PipelineName + + Specifies the name of the pipeline. This cmdlet sets the active period for the pipeline that this parameter specifies. + + String + + + StartDateTime + + Specifies the start of a time period as a DateTime object. Data processing occurs or data slices are processed within this period. + StartDateTime is a Coordinated Universal Time (UTC) time that you must specify in ISO format, for example, 2014-10-19T16:32:41Z. + + DateTime + + + EndDateTime + + Specifies the end of a time period as a DateTime object. Data processing occurs or data slices are processed within this period. For more information about DateTime objects, type Get-Help Get-Date. + EndDateTime is a Coordinated Universal Time (UTC) time that you must specify in ISO format, for example, 2014-10-19T16:32:41Z. + + DateTime + + + AutoResolve + + Indicates that this cmdlet uses auto resolve. + + + + Force + + Indicates that this cmdlet sets the active period without prompting you for confirmation. + + + + ForceRecalculate + + Indicates that this cmdlet uses force recalculate. + + + + + Set-AzureDataFactoryPipelineActivePeriod + + ResourceGroupName + + + Specifies the name of an Azure resource group. This cmdlet modifies the active period for a pipeline that belongs to the group that this parameter specifies. + + + String + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet modifies the active period for a pipeline that belongs to the data factory that this parameter specifies. + + String + + + PipelineName + + Specifies the name of the pipeline. This cmdlet sets the active period for the pipeline that this parameter specifies. + + String + + + StartDateTime + + Specifies the start of a time period as a DateTime object. Data processing occurs or data slices are processed within this period. + StartDateTime is a Coordinated Universal Time (UTC) time that you must specify in ISO format, for example, 2014-10-19T16:32:41Z. + + DateTime + + + EndDateTime + + Specifies the end of a time period as a DateTime object. Data processing occurs or data slices are processed within this period. For more information about DateTime objects, type Get-Help Get-Date. + EndDateTime is a Coordinated Universal Time (UTC) time that you must specify in ISO format, for example, 2014-10-19T16:32:41Z. + + DateTime + + + AutoResolve + + Indicates that this cmdlet uses auto resolve. + + + + Force + + Indicates that this cmdlet sets the active period without prompting you for confirmation. + + + + ForceRecalculate + + Indicates that this cmdlet uses force recalculate. + + + + + + + AutoResolve + + Indicates that this cmdlet uses auto resolve. + + SwitchParameter + + SwitchParameter + + + + + + DataFactory + + Specifies a PSDataFactory object. This cmdlet modifies the active period for a pipeline that belongs to the data factory that this parameter specifies. + + PSDataFactory + + PSDataFactory + + + + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet modifies the active period for a pipeline that belongs to the data factory that this parameter specifies. + + String + + String + + + + + + EndDateTime + + Specifies the end of a time period as a DateTime object. Data processing occurs or data slices are processed within this period. For more information about DateTime objects, type Get-Help Get-Date. + EndDateTime is a Coordinated Universal Time (UTC) time that you must specify in ISO format, for example, 2014-10-19T16:32:41Z. + + DateTime + + DateTime + + + + + + Force + + Indicates that this cmdlet sets the active period without prompting you for confirmation. + + SwitchParameter + + SwitchParameter + + + + + + ForceRecalculate + + Indicates that this cmdlet uses force recalculate. + + SwitchParameter + + SwitchParameter + + + + + + PipelineName + + Specifies the name of the pipeline. This cmdlet sets the active period for the pipeline that this parameter specifies. + + String + + String + + + + + + ResourceGroupName + + + Specifies the name of an Azure resource group. This cmdlet modifies the active period for a pipeline that belongs to the group that this parameter specifies. + + + String + + String + + + + + + StartDateTime + + Specifies the start of a time period as a DateTime object. Data processing occurs or data slices are processed within this period. + StartDateTime is a Coordinated Universal Time (UTC) time that you must specify in ISO format, for example, 2014-10-19T16:32:41Z. + + DateTime + + DateTime + + + + + + + + + + + + + + + + + + + + + System.Boolean + + + + + + + + + + + + + Example 1: Configure the active period + + + + + PS C:\> Set-AzureDataFactoryPipelineActivePeriod -ResourceGroupName "ADF" -PipelineName "DPWikisample" -DataFactoryName "WikiADF" -StartDateTime 2014-05-21T16:00:00 -EndDateTime 2014-05-22T16:00:00 + Confirm + Are you sure you want to set pipeline 'DPWikisample' active period from '05/21/2014 16:00:00' to + '05/22/2014 16:00:00'? + [Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y + True + + + This command configures the active period for the data slices that the pipeline named DPWikisample processes. The command provides beginning and end points for the data slices as values. The command returns a value of $True. + + + + + + + + + + + New-AzureDataFactoryPipeline + + + + Set-AzureDataFactorySliceStatus + + + + + + + Set-AzureDataFactorySliceStatus + + Sets the status of slices for a table in Data Factory. + + + + + Set + AzureDataFactorySliceStatus + + + + The Set-AzureDataFactorySliceStatus cmdlet sets the status of slices for a table in Azure Data Factory. + You must be in AzureResourceManager mode to run Azure Data Factory cmdlets. To switch to AzureResourceManager mode, type Switch-AzureMode AzureResourceManager. + + + + Set-AzureDataFactorySliceStatus + + DataFactory + + Specifies a PSDataFactory object. This cmdlet modifies the status of slices that belong to the data factory that this parameter specifies. + + PSDataFactory + + + TableName + + Specifies the name of the table for which this cmdlet modifies slices. + + String + + + StartDateTime + + Specifies the start of a time period as a DateTime object. This time is the beginning of a data slice. + StartDateTime is a Coordinated Universal Time (UTC) time that you must specify in ISO format, for example, 2014-10-19T16:32:41Z. + + DateTime + + + EndDateTime + + Specifies the end of a time period as a DateTime object. This time is the end of a data slice. For more information about DateTime objects, type Get-Help Get-Date. + EndDateTime is a Coordinated Universal Time (UTC) time that you must specify in ISO format, for example, 2014-10-19T16:32:41Z. + + DateTime + + + Status + + + Specifies a status to assign to the data slice. Valid values are: + + -- Ready. Data processing has completed and the data slice is ready. + -- PendingExecution. Data processing has not started yet. + -- PendingValidation. Data slice is waiting for pending validation on whether it fulfills the against validation policies before being processed. + -- Skip. Skip processing of the slice. + + + String + + + UpdateType + + + Specifies the type of update to the slice. Valid values are: + + -- Individual. Sets the status of each slice for the table in the specified time range. + -- UpstreamInPipeline. Sets the status of each slice for the table and all the dependent tables, which are used as input tables for activities in the pipeline. + + + String + + + + Set-AzureDataFactorySliceStatus + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet modifies the status of slices that belong to the group that this parameter specifies. + + String + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet modifies the status of slices that belong to the data factory that this parameter specifies. + + String + + + TableName + + Specifies the name of the table for which this cmdlet modifies slices. + + String + + + StartDateTime + + Specifies the start of a time period as a DateTime object. This time is the beginning of a data slice. + StartDateTime is a Coordinated Universal Time (UTC) time that you must specify in ISO format, for example, 2014-10-19T16:32:41Z. + + DateTime + + + EndDateTime + + Specifies the end of a time period as a DateTime object. This time is the end of a data slice. For more information about DateTime objects, type Get-Help Get-Date. + EndDateTime is a Coordinated Universal Time (UTC) time that you must specify in ISO format, for example, 2014-10-19T16:32:41Z. + + DateTime + + + Status + + + Specifies a status to assign to the data slice. Valid values are: + + -- Ready. Data processing has completed and the data slice is ready. + -- PendingExecution. Data processing has not started yet. + -- PendingValidation. Data slice is waiting for pending validation on whether it fulfills the against validation policies before being processed. + -- Skip. Skip processing of the slice. + + + String + + + UpdateType + + + Specifies the type of update to the slice. Valid values are: + + -- Individual. Sets the status of each slice for the table in the specified time range. + -- UpstreamInPipeline. Sets the status of each slice for the table and all the dependent tables, which are used as input tables for activities in the pipeline. + + + String + + + + + + DataFactory + + Specifies a PSDataFactory object. This cmdlet modifies the status of slices that belong to the data factory that this parameter specifies. + + PSDataFactory + + PSDataFactory + + + + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet modifies the status of slices that belong to the data factory that this parameter specifies. + + String + + String + + + + + + EndDateTime + + Specifies the end of a time period as a DateTime object. This time is the end of a data slice. For more information about DateTime objects, type Get-Help Get-Date. + EndDateTime is a Coordinated Universal Time (UTC) time that you must specify in ISO format, for example, 2014-10-19T16:32:41Z. + + DateTime + + DateTime + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet modifies the status of slices that belong to the group that this parameter specifies. + + String + + String + + + + + + StartDateTime + + Specifies the start of a time period as a DateTime object. This time is the beginning of a data slice. + StartDateTime is a Coordinated Universal Time (UTC) time that you must specify in ISO format, for example, 2014-10-19T16:32:41Z. + + DateTime + + DateTime + + + + + + Status + + + Specifies a status to assign to the data slice. Valid values are: + + -- Ready. Data processing has completed and the data slice is ready. + -- PendingExecution. Data processing has not started yet. + -- PendingValidation. Data slice is waiting for pending validation on whether it fulfills the against validation policies before being processed. + -- Skip. Skip processing of the slice. + + + String + + String + + + + + + TableName + + Specifies the name of the table for which this cmdlet modifies slices. + + String + + String + + + + + + UpdateType + + + Specifies the type of update to the slice. Valid values are: + + -- Individual. Sets the status of each slice for the table in the specified time range. + -- UpstreamInPipeline. Sets the status of each slice for the table and all the dependent tables, which are used as input tables for activities in the pipeline. + + + String + + String + + + + + + + + + + + + + + + + + + + + + System.Boolean + + + + + + + + + + + + + Example 1: Set the status of all slices + + + + + PS C:\> Set-AzureDataFactorySliceStatus -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -TableName "DAWikiAggregatedData" -StartDateTime 2014-05-21T16:00:00 -EndDateTime 2014-05-21T20:00:00 -Status "PendingExecution" -UpdateType "UpstreamInPipeline" + True + + + This command sets the status of all slices for the table named DAWikiAggregatedData to PendingExecution in the data factory named WikiADF. The UpdateType parameter has a value of UpstreamInPipeline, and so the command sets the status of each slice for the table and all dependent tables. Dependent tables are used as input tables for activities in the pipeline. This command returns a value of $True. + + + + + + + + + + + Get-AzureDataFactorySlice + + + + + + + Suspend-AzureDataFactoryPipeline + + Suspends a pipeline in Data Factory. + + + + + Suspend + AzureDataFactoryPipeline + + + + The Suspend-AzureDataFactoryPipeline cmdlet suspends a pipeline in Azure Data Factory. You can resume the pipeline by using the Resume-AzureDataFactoryPipeline cmdlet. + You must be in AzureResourceManager mode to run Azure Data Factory cmdlets. To switch to AzureResourceManager mode, type Switch-AzureMode AzureResourceManager. + + + + Suspend-AzureDataFactoryPipeline + + DataFactory + + Specifies a PSDataFactory object. This cmdlet suspends a pipeline that belongs to the data factory that this parameter specifies. + + PSDataFactory + + + Name + + Specifies the name of the pipeline to suspend. + + String + + + Force + + Indicates that this cmdlet suspends a pipeline without prompting you for confirmation. + + + + + Suspend-AzureDataFactoryPipeline + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet suspends a pipeline that belongs to the group that this parameter specifies. + + String + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet suspends a pipeline that belongs to the data factory that this parameter specifies. + + String + + + Name + + Specifies the name of the pipeline to suspend. + + String + + + Force + + Indicates that this cmdlet suspends a pipeline without prompting you for confirmation. + + + + + + + DataFactory + + Specifies a PSDataFactory object. This cmdlet suspends a pipeline that belongs to the data factory that this parameter specifies. + + PSDataFactory + + PSDataFactory + + + + + + DataFactoryName + + Specifies the name of a data factory. This cmdlet suspends a pipeline that belongs to the data factory that this parameter specifies. + + String + + String + + + + + + Force + + Indicates that this cmdlet suspends a pipeline without prompting you for confirmation. + + SwitchParameter + + SwitchParameter + + + + + + Name + + Specifies the name of the pipeline to suspend. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of an Azure resource group. This cmdlet suspends a pipeline that belongs to the group that this parameter specifies. + + String + + String + + + + + + + + + + + + + + + + + + + + + System.Boolean + + + + + + + + + + + + + Example 1: Suspend a pipeline + + + + + PS C:\> Suspend-AzureDataFactoryPipeline -ResourceGroupName "ADF" -Name "DPWikiSample" -DataFactoryName "WikiADF" + Confirm + Are you sure you want to suspend pipeline 'DPWikisample' in data factory 'WikiADF'? + [Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y + True + + + This command suspends the pipeline named DPWikiSample in the data factory named WikiADF. The command returns a value of $True. + + + + + + + + + + + Get-AzureDataFactoryPipeline + + + + New-AzureDataFactoryPipeline + + + + Remove-AzureDataFactoryPipeline + + + + Resume-AzureDataFactoryPipeline + + + + Set-AzureDataFactoryPipelineActivePeriod + + + + + + + + + diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Microsoft.Azure.Commands.DataFactories.format.ps1xml b/src/ResourceManager/DataFactories/Commands.DataFactories/Microsoft.Azure.Commands.DataFactories.format.ps1xml new file mode 100644 index 000000000000..5f85dd744b4f --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Microsoft.Azure.Commands.DataFactories.format.ps1xml @@ -0,0 +1,161 @@ + + + + + Microsoft.Azure.Commands.DataFactories.Models.PSLinkedService + + Microsoft.Azure.Commands.DataFactories.Models.PSLinkedService + + + + + + + + LinkedServiceName + + + + ResourceGroupName + + + + DataFactoryName + + + + Properties + + + + ProvisioningState + + + + + + + + Microsoft.Azure.Commands.DataFactories.Models.PSTable + + Microsoft.Azure.Commands.DataFactories.Models.PSTable + + + + + + + + TableName + + + + ResourceGroupName + + + + DataFactoryName + + + + Availability + + + + Location + + + + Policy + + + + Structure + + + + Published + + + + Properties + + + + ProvisioningState + + + + + + + + Microsoft.Azure.Commands.DataFactories.Models.PSPipeline + + Microsoft.Azure.Commands.DataFactories.Models.PSPipeline + + + + + + + + PipelineName + + + + ResourceGroupName + + + + DataFactoryName + + + + Properties + + + + ProvisioningState + + + + + + + + Microsoft.Azure.Commands.DataFactories.Models.PSHub + + Microsoft.Azure.Commands.DataFactories.Models.PSHub + + + + + + + + HubName + + + + ResourceGroupName + + + + DataFactoryName + + + + Properties + + + + ProvisioningState + + + + + + + + diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/BlobDownloadParameters.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/BlobDownloadParameters.cs new file mode 100644 index 000000000000..b9cbbc440ba4 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/BlobDownloadParameters.cs @@ -0,0 +1,33 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Storage.Auth; +using Microsoft.WindowsAzure.Storage.Blob; +using System; + +namespace Microsoft.Azure.Commands.DataFactories +{ + public class BlobDownloadParameters + { + public string Directory { get; set; } + + public Uri SasUri { get; set; } + + public StorageCredentials Credentials { get; set; } + + public BlobDownloadParameters() + { + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/CreatePSDataFactoryParameters.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/CreatePSDataFactoryParameters.cs new file mode 100644 index 000000000000..e1793532b1c3 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/CreatePSDataFactoryParameters.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; + +namespace Microsoft.Azure.Commands.DataFactories +{ + public class CreatePSDataFactoryParameters : DataFactoryParametersBase + { + public string Location { get; set; } + + public bool Force { get; set; } + + public Hashtable Tags { get; set; } + + public Action ConfirmAction { get; set; } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/CreatePSHubParameters.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/CreatePSHubParameters.cs new file mode 100644 index 000000000000..7ba52718d627 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/CreatePSHubParameters.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.Azure.Commands.DataFactories +{ + public class CreatePSHubParameters : DataFactoryParametersBase + { + public string Name { get; set; } + + public string RawJsonContent { get; set; } + + public bool Force { get; set; } + + public Action ConfirmAction { get; set; } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/CreatePSLinkedServiceParameters.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/CreatePSLinkedServiceParameters.cs new file mode 100644 index 000000000000..6f3b898316d2 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/CreatePSLinkedServiceParameters.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.Azure.Commands.DataFactories +{ + public class CreatePSLinkedServiceParameters : DataFactoryParametersBase + { + public string Name { get; set; } + + public string RawJsonContent { get; set; } + + public bool Force { get; set; } + + public Action ConfirmAction { get; set; } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/CreatePSPipelineParameters.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/CreatePSPipelineParameters.cs new file mode 100644 index 000000000000..b81fb3a7b156 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/CreatePSPipelineParameters.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.Azure.Commands.DataFactories +{ + public class CreatePSPipelineParameters : DataFactoryParametersBase + { + public string Name { get; set; } + + public string RawJsonContent { get; set; } + + public bool Force { get; set; } + + public Action ConfirmAction { get; set; } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/CreatePSTableParameters.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/CreatePSTableParameters.cs new file mode 100644 index 000000000000..b6e71ad88331 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/CreatePSTableParameters.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.Azure.Commands.DataFactories +{ + public class CreatePSTableParameters : DataFactoryParametersBase + { + public string Name { get; set; } + + public string RawJsonContent { get; set; } + + public bool Force { get; set; } + + public Action ConfirmAction { get; set; } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.DataFactories.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.DataFactories.cs new file mode 100644 index 000000000000..f4d883f2d773 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.DataFactories.cs @@ -0,0 +1,180 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Net; +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.Azure.Commands.DataFactories.Properties; +using Microsoft.Azure.Management.DataFactories.Models; +using Microsoft.Azure.Management.DataFactories; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.Azure.Commands.DataFactories +{ + public partial class DataFactoryClient + { + public virtual PSDataFactory GetDataFactory(string resourceGroupName, string dataFactoryName) + { + var response = DataPipelineManagementClient.DataFactories.Get(resourceGroupName, dataFactoryName); + + return new PSDataFactory(response.DataFactory) { ResourceGroupName = resourceGroupName }; + } + + public virtual List ListDataFactories(string resourceGroupName) + { + List dataFactories = new List(); + + var response = DataPipelineManagementClient.DataFactories.List(resourceGroupName); + + if (response != null && response.DataFactories != null) + { + response.DataFactories.ForEach( + df => dataFactories.Add(new PSDataFactory(df) { ResourceGroupName = resourceGroupName })); + } + + return dataFactories; + } + + public virtual List FilterPSDataFactories(DataFactoryFilterOptions filterOptions) + { + if (filterOptions == null) + { + throw new ArgumentNullException("filterOptions"); + } + + // ToDo: make ResourceGroupName optional + if (string.IsNullOrWhiteSpace(filterOptions.ResourceGroupName)) + { + throw new ArgumentException(Resources.ResourceGroupNameCannotBeEmpty); + } + + List dataFactories = new List(); + + if (!string.IsNullOrWhiteSpace(filterOptions.Name)) + { + dataFactories.Add(GetDataFactory(filterOptions.ResourceGroupName, filterOptions.Name)); + } + else + { + // ToDo: Filter list results by Tag + dataFactories.AddRange(ListDataFactories(filterOptions.ResourceGroupName)); + } + + return dataFactories; + } + + public virtual DataFactory CreateOrUpdateDataFactory(string resourceGroupName, string dataFactoryName, + string location, IDictionary tags) + { + var response = DataPipelineManagementClient.DataFactories.CreateOrUpdate( + resourceGroupName, + new DataFactoryCreateOrUpdateParameters() + { + DataFactory = + new DataFactory() + { + Name = dataFactoryName, + Location = location, + Tags = tags + } + }); + + return response.DataFactory; + } + + public virtual PSDataFactory CreatePSDataFactory(CreatePSDataFactoryParameters parameters) + { + PSDataFactory dataFactory = null; + Action createDataFactory = () => + { + Dictionary tags = new Dictionary(); + if (parameters.Tags != null) + { + tags = parameters.Tags.ToDictionary(); + } + + dataFactory = + new PSDataFactory( + CreateOrUpdateDataFactory(parameters.ResourceGroupName, parameters.DataFactoryName, + parameters.Location, tags)) {ResourceGroupName = parameters.ResourceGroupName}; + }; + + if (parameters.Force) + { + // If user decides to overwrite anyway, then there is no need to check if the data factory exists or not. + createDataFactory(); + } + else + { + bool dataFactoryExists = CheckDataFactoryExists(parameters.ResourceGroupName, parameters.DataFactoryName); + + parameters.ConfirmAction( + !dataFactoryExists, // prompt only if the data factory exists + string.Format( + CultureInfo.InvariantCulture, + Resources.DataFactoryExists, + parameters.DataFactoryName, + parameters.ResourceGroupName), + string.Format( + CultureInfo.InvariantCulture, + Resources.DataFactoryCreating, + parameters.DataFactoryName, + parameters.ResourceGroupName), + parameters.DataFactoryName, + createDataFactory); + } + + if (!DataFactoryCommonUtilities.IsSucceededProvisioningState(dataFactory.ProvisioningState)) + { + string errorMessage = dataFactory.Properties == null + ? string.Empty + : dataFactory.Properties.ErrorMessage; + throw new ProvisioningFailedException(errorMessage); + } + + return dataFactory; + } + + private bool CheckDataFactoryExists(string resourceGroupName, string dataFactoryName) + { + // ToDo: use HEAD to check if a resource exists or not + try + { + PSDataFactory dataFactory = GetDataFactory(resourceGroupName, dataFactoryName); + + return true; + } + catch (CloudException e) + { + //Get throws NotFound exception if data factory not exists + if (e.Response.StatusCode == HttpStatusCode.NotFound) + { + return false; + } + + throw; + } + } + + public virtual HttpStatusCode DeleteDataFactory(string resourceGroupName, string dataFactoryName) + { + OperationResponse response = DataPipelineManagementClient.DataFactories.Delete(resourceGroupName, + dataFactoryName); + return response.StatusCode; + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.DataSlices.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.DataSlices.cs new file mode 100644 index 000000000000..f1d6a8584a1d --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.DataSlices.cs @@ -0,0 +1,152 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Net; +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.Azure.Commands.DataFactories.Properties; +using Microsoft.Azure.Management.DataFactories; +using Microsoft.Azure.Management.DataFactories.Models; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Storage.Blob; +using System.IO; + +namespace Microsoft.Azure.Commands.DataFactories +{ + public partial class DataFactoryClient + { + public virtual List ListDataSliceRuns( + string resourceGroupName, + string dataFactoryName, + string tableName, + DateTime dataSliceRangeStartTime) + { + List runs = new List(); + var response = DataPipelineManagementClient.DataSliceRuns.List( + resourceGroupName, + dataFactoryName, + tableName, + dataSliceRangeStartTime.ConvertToISO8601DateTimeString()); + + if (response != null && response.DataSliceRuns != null) + { + foreach (var run in response.DataSliceRuns) + { + runs.Add( + new PSDataSliceRun(run) + { + ResourceGroupName = resourceGroupName, + DataFactoryName = dataFactoryName, + TableName = tableName + }); + } + } + + return runs; + } + + public virtual List ListDataSlices(string resourceGroupName, string dataFactoryName, string tableName, DateTime dataSliceRangeStartTime, DateTime dataSliceRangeEndTime) + { + List dataSlices = new List(); + var response = DataPipelineManagementClient.DataSlices.List( + resourceGroupName, + dataFactoryName, + tableName, + dataSliceRangeStartTime.ConvertToISO8601DateTimeString(), + dataSliceRangeEndTime.ConvertToISO8601DateTimeString()); + + if (response != null && response.DataSlices != null) + { + foreach (var dataSlice in response.DataSlices) + { + dataSlices.Add( + new PSDataSlice(dataSlice) + { + ResourceGroupName = resourceGroupName, + DataFactoryName = dataFactoryName, + TableName = tableName + }); + } + } + + return dataSlices; + } + + public virtual void SetSliceStatus( + string resourceGroupName, + string dataFactoryName, + string tableName, + string sliceStatus, + string updateType, + DateTime dataSliceRangeStartTime, + DateTime dataSliceRangeEndTime) + { + DataPipelineManagementClient.DataSlices.SetStatus( + resourceGroupName, + dataFactoryName, + tableName, + new DataSliceSetStatusParameters() + { + SliceStatus = sliceStatus, + UpdateType = updateType, + DataSliceRangeStartTime = dataSliceRangeStartTime.ConvertToISO8601DateTimeString(), + DataSliceRangeEndTime = dataSliceRangeEndTime.ConvertToISO8601DateTimeString(), + }); + } + + public virtual PSRunLogInfo GetDataSliceRunLogsSharedAccessSignature(string resourceGroupName, string dataFactoryName, string dataSliceRunId) + { + var response = DataPipelineManagementClient.DataSliceRuns.GetLogs( + resourceGroupName, dataFactoryName, dataSliceRunId); + + return new PSRunLogInfo(response.DataSliceRunLogsSASUri); + } + + public virtual void DownloadFileToBlob(BlobDownloadParameters parameters) + { + if (parameters == null || parameters.Credentials == null || string.IsNullOrWhiteSpace(parameters.SasUri.ToString())) + { + throw new ArgumentNullException(Resources.DownloadCredentialsNull); + } + + CloudBlobContainer sascontainer = new CloudBlobContainer(parameters.SasUri); + + var bloblist = sascontainer.ListBlobs(null, true); + string downloadFolderPath = parameters.Directory.Insert(parameters.Directory.Length, @"\"); + + foreach (var blob in bloblist) + { + ICloudBlob destBlob = blob as ICloudBlob; + int length = destBlob.Name.Split('/').Length; + string blobFileName = destBlob.Name.Split('/')[length-1]; + // the folder structure of run logs changed from flat listing to nesting under time directory + string blobFolderPath = String.Empty; + if (destBlob.Name.Length > blobFileName.Length) + { + blobFolderPath = destBlob.Name.Substring(0, destBlob.Name.Length - blobFileName.Length - 1); + } + + if (!Directory.Exists(downloadFolderPath + blobFolderPath)) + { + Directory.CreateDirectory(downloadFolderPath + blobFolderPath); + } + // adding _log suffix to differentiate between files and folders of the same name. Azure blob storage only knows about blob files. We could use nested folder structure + // as part of the blob file name and thus it is possible to have a file and folder of the same name in the same location which is not acceptable for Windows file system + destBlob.DownloadToFile(downloadFolderPath + destBlob.Name + "_log", FileMode.Create); + } + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Encrypt.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Encrypt.cs new file mode 100644 index 000000000000..c65246e39594 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Encrypt.cs @@ -0,0 +1,57 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Security; +using Microsoft.Azure.Management.DataFactories; +using Microsoft.DataTransfer.Gateway.Encryption; + +namespace Microsoft.Azure.Commands.DataFactories +{ + public partial class DataFactoryClient + { + public virtual string CloudEncryptString(SecureString value, string resourceGroupName, string dataFactoryName) + { + if (value == null) + { + throw new ArgumentNullException("value"); + } + + return Extensions.Encrypt((DataPipelineManagementClient) DataPipelineManagementClient, value, + resourceGroupName, dataFactoryName); + } + + public virtual string OnPremisesEncryptString(SecureString value, string resourceGroupName, string dataFactoryName, string gatewayName) + { + if (value == null) + { + throw new ArgumentNullException("value"); + } + + var response = DataPipelineManagementClient.Gateways.RetrieveConnectionInfo(resourceGroupName, dataFactoryName, gatewayName); + var gatewayEncryptionInfos = new[] + { + new GatewayEncryptionInfo + { + ServiceToken = response.ConnectionInfo.ServiceToken, + IdentityCertThumbprint = response.ConnectionInfo.IdentityCertThumbprint, + HostServiceUri = response.ConnectionInfo.HostServiceUri + } + }; + + var gatewayEncryptionClient = new GatewayEncryptionClient(); + return gatewayEncryptionClient.Encrypt(value, gatewayEncryptionInfos); + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Gateway.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Gateway.cs new file mode 100644 index 000000000000..4f004d59c9cf --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Gateway.cs @@ -0,0 +1,87 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.Azure.Commands.DataFactories.Properties; +using Microsoft.Azure.Management.DataFactories.Models; +using Microsoft.Azure.Management.DataFactories; + +namespace Microsoft.Azure.Commands.DataFactories +{ + public partial class DataFactoryClient + { + public virtual PSDataFactoryGateway CreateOrUpdateGateway(string resourceGroupName, string dataFactoryName, PSDataFactoryGateway gateway) + { + if (gateway == null) + { + throw new ArgumentNullException("gateway"); + } + + var response = DataPipelineManagementClient.Gateways.CreateOrUpdate( + resourceGroupName, dataFactoryName, new GatewayCreateOrUpdateParameters { Gateway = gateway.ToGatewayDefinition() }); + + Gateway createdGateway = response.Gateway; + if (createdGateway.Properties != null && + !DataFactoryCommonUtilities.IsSucceededProvisioningState(createdGateway.Properties.ProvisioningState)) + { + // ToDo: service side should set the error message for provisioning failures. + throw new ProvisioningFailedException(Resources.GatewayProvisioningFailed); + } + + return new PSDataFactoryGateway(createdGateway); + } + + public virtual PSDataFactoryGateway PatchGateway(string resourceGroupName, string dataFactoryName, PSDataFactoryGateway gateway) + { + if (gateway == null) + { + throw new ArgumentNullException("gateway"); + } + + var response = DataPipelineManagementClient.Gateways.Update( + resourceGroupName, dataFactoryName, new GatewayCreateOrUpdateParameters { Gateway = gateway.ToGatewayDefinition() }); + + return new PSDataFactoryGateway(response.Gateway); + } + + public virtual List ListGateways(string resourceGroupName, string dataFactoryName) + { + var response = DataPipelineManagementClient.Gateways.List(resourceGroupName, dataFactoryName); + + return response.Gateways.Select(gateway => new PSDataFactoryGateway(gateway)).ToList(); + } + + public virtual PSDataFactoryGateway GetGateway(string resourceGroupName, string dataFactoryName, string gatewayName) + { + var response = DataPipelineManagementClient.Gateways.Get(resourceGroupName, dataFactoryName, gatewayName); + + return new PSDataFactoryGateway(response.Gateway); + } + + public virtual void DeleteGateway(string resourceGroupName, string dataFactoryName, string gatewayName) + { + DataPipelineManagementClient.Gateways.Delete(resourceGroupName, dataFactoryName, gatewayName); + } + + public virtual PSDataFactoryGatewayKey RegenerateGatewayKey(string resourceGroupName, string dataFactoryName, string gatewayName) + { + var response = DataPipelineManagementClient.Gateways.RegenerateKey(resourceGroupName, dataFactoryName, gatewayName); + + return new PSDataFactoryGatewayKey(response.Key); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Hubs.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Hubs.cs new file mode 100644 index 000000000000..9b5950798bcf --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Hubs.cs @@ -0,0 +1,193 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Net; +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.Azure.Commands.DataFactories.Properties; +using Microsoft.Azure.Management.DataFactories; +using Microsoft.Azure.Management.DataFactories.Models; +using Microsoft.WindowsAzure; + +namespace Microsoft.Azure.Commands.DataFactories +{ + public partial class DataFactoryClient + { + public virtual Hub CreateOrUpdateHub( + string resourceGroupName, + string dataFactoryName, + string hubName, + string rawJsonContent) + { + if (string.IsNullOrWhiteSpace(rawJsonContent)) + { + throw new ArgumentNullException("rawJsonContent"); + } + + // If create or update failed, the current behavior is to throw + var response = DataPipelineManagementClient.Hubs.CreateOrUpdateWithRawJsonContent( + resourceGroupName, + dataFactoryName, + hubName, + new HubCreateOrUpdateWithRawJsonContentParameters() { Content = rawJsonContent }); + + return response.Hub; + } + + public virtual PSHub CreatePSHub(CreatePSHubParameters parameters) + { + if (parameters == null) + { + throw new ArgumentNullException("parameters"); + } + + PSHub hub = null; + Action createHub = () => + { + hub = + new PSHub( + this.CreateOrUpdateHub( + parameters.ResourceGroupName, + parameters.DataFactoryName, + parameters.Name, + parameters.RawJsonContent)) + {DataFactoryName = parameters.DataFactoryName, ResourceGroupName = parameters.ResourceGroupName}; + }; + + if (parameters.Force) + { + createHub(); + } + else + { + bool hubExists = this.CheckHubExists( + parameters.ResourceGroupName, + parameters.DataFactoryName, + parameters.Name); + + parameters.ConfirmAction( + !hubExists, + string.Format( + CultureInfo.InvariantCulture, + Resources.HubExists, + parameters.Name, + parameters.DataFactoryName), + string.Format( + CultureInfo.InvariantCulture, + Resources.HubCreating, + parameters.Name, + parameters.DataFactoryName), + parameters.Name, + createHub); + } + + if (!DataFactoryCommonUtilities.IsSucceededProvisioningState(hub.ProvisioningState)) + { + // ToDo: service side should set the error message for provisioning failures. + throw new ProvisioningFailedException(Resources.HubProvisioningFailed); + } + + return hub; + } + + public virtual PSHub GetHub(string resourceGroupName, string dataFactoryName, string hubName) + { + var response = DataPipelineManagementClient.Hubs.Get(resourceGroupName, dataFactoryName, hubName); + + return new PSHub(response.Hub) + { + ResourceGroupName = resourceGroupName, + DataFactoryName = dataFactoryName + }; + } + + public virtual List ListHubs(string resourceGroupName, string dataFactoryName) + { + List hubs = new List(); + + var response = DataPipelineManagementClient.Hubs.List(resourceGroupName, dataFactoryName); + + if (response != null && response.Hubs != null) + { + foreach (var hub in response.Hubs) + { + hubs.Add(new PSHub(hub) + { + ResourceGroupName = resourceGroupName, + DataFactoryName = dataFactoryName + }); + } + } + + return hubs; + } + + public virtual HttpStatusCode DeleteHub(string resourceGroupName, string dataFactoryName, string hubName) + { + OperationResponse response = DataPipelineManagementClient.Hubs.Delete( + resourceGroupName, + dataFactoryName, + hubName); + + return response.StatusCode; + } + + public virtual List FilterPSHubs(HubFilterOptions filterOptions) + { + if (filterOptions == null) + { + throw new ArgumentNullException("filterOptions"); + } + + if (string.IsNullOrWhiteSpace(filterOptions.ResourceGroupName)) + { + throw new ArgumentException(Resources.ResourceGroupNameCannotBeEmpty); + } + + List hubs = new List(); + + if (!string.IsNullOrWhiteSpace(filterOptions.Name)) + { + hubs.Add(GetHub(filterOptions.ResourceGroupName, filterOptions.DataFactoryName, filterOptions.Name)); + } + else + { + hubs.AddRange(ListHubs(filterOptions.ResourceGroupName, filterOptions.DataFactoryName)); + } + + return hubs; + } + + private bool CheckHubExists(string resourceGroupName, string dataFactoryName, string hubName) + { + try + { + PSHub hub = this.GetHub(resourceGroupName, dataFactoryName, hubName); + + return true; + } + catch (CloudException e) + { + if (e.Response.StatusCode == HttpStatusCode.NotFound) + { + return false; + } + + throw; + } + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.LinkedServices.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.LinkedServices.cs new file mode 100644 index 000000000000..2ad1072c0d04 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.LinkedServices.cs @@ -0,0 +1,199 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Net; +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.Azure.Commands.DataFactories.Properties; +using Microsoft.Azure.Management.DataFactories; +using Microsoft.Azure.Management.DataFactories.Models; +using Microsoft.WindowsAzure; + +namespace Microsoft.Azure.Commands.DataFactories +{ + public partial class DataFactoryClient + { + public virtual LinkedService CreateOrUpdateLinkedService(string resourceGroupName, string dataFactoryName, + string linkedServiceName, string rawJsonContent) + { + if (string.IsNullOrWhiteSpace(rawJsonContent)) + { + throw new ArgumentNullException("rawJsonContent"); + } + + // If create or update failed, the current behavior is to throw + var response = + DataPipelineManagementClient.LinkedServices.CreateOrUpdateWithRawJsonContent( + resourceGroupName, + dataFactoryName, + linkedServiceName, + new LinkedServiceCreateOrUpdateWithRawJsonContentParameters() {Content = rawJsonContent}); + + return response.LinkedService; + } + + public virtual PSLinkedService GetLinkedService(string resourceGroupName, string dataFactoryName, + string linkedServiceName) + { + var response = DataPipelineManagementClient.LinkedServices.Get(resourceGroupName, dataFactoryName, + linkedServiceName); + return new PSLinkedService(response.LinkedService) + { + ResourceGroupName = resourceGroupName, + DataFactoryName = dataFactoryName + }; + } + + public virtual List ListLinkedServices(string resourceGroupName, string dataFactoryName) + { + List linkedServices = new List(); + + var response = DataPipelineManagementClient.LinkedServices.List(resourceGroupName, dataFactoryName); + + if (response != null && response.LinkedServices != null) + { + foreach (var linkedService in response.LinkedServices) + { + linkedServices.Add( + new PSLinkedService(linkedService) + { + ResourceGroupName = resourceGroupName, + DataFactoryName = dataFactoryName + }); + } + } + + return linkedServices; + } + + public virtual HttpStatusCode DeleteLinkedService(string resourceGroupName, string dataFactoryName, string linkedServiceName) + { + OperationResponse response = DataPipelineManagementClient.LinkedServices.Delete(resourceGroupName, + dataFactoryName, linkedServiceName); + + return response.StatusCode; + } + + public virtual List FilterPSLinkedServices(LinkedServiceFilterOptions filterOptions) + { + if (filterOptions == null) + { + throw new ArgumentNullException("filterOptions"); + } + + if (string.IsNullOrWhiteSpace(filterOptions.ResourceGroupName)) + { + throw new ArgumentException(Resources.ResourceGroupNameCannotBeEmpty); + } + + List linkedServices = new List(); + + if (!string.IsNullOrWhiteSpace(filterOptions.Name)) + { + linkedServices.Add(GetLinkedService(filterOptions.ResourceGroupName, filterOptions.DataFactoryName, + filterOptions.Name)); + } + else + { + linkedServices.AddRange(ListLinkedServices(filterOptions.ResourceGroupName, + filterOptions.DataFactoryName)); + } + + return linkedServices; + } + + public virtual PSLinkedService CreatePSLinkedService(CreatePSLinkedServiceParameters parameters) + { + if (parameters == null) + { + throw new ArgumentNullException("parameters"); + } + + PSLinkedService linkedService = null; + Action createLinkedService = () => + { + linkedService = + new PSLinkedService(CreateOrUpdateLinkedService(parameters.ResourceGroupName, + parameters.DataFactoryName, + parameters.Name, + parameters.RawJsonContent)) + { + ResourceGroupName = parameters.ResourceGroupName, + DataFactoryName = parameters.DataFactoryName + }; + }; + + if (parameters.Force) + { + // If user decides to overwrite anyway, then there is no need to check if the linked service exists or not. + createLinkedService(); + } + else + { + bool linkedServiceExists = CheckLinkedServiceExists(parameters.ResourceGroupName, + parameters.DataFactoryName, parameters.Name); + + parameters.ConfirmAction( + !linkedServiceExists, // prompt only if the linked service exists + string.Format( + CultureInfo.InvariantCulture, + Resources.LinkedServiceExists, + parameters.Name, + parameters.DataFactoryName), + string.Format( + CultureInfo.InvariantCulture, + Resources.LinkedServiceCreating, + parameters.Name, + parameters.DataFactoryName), + parameters.Name, + createLinkedService); + } + + if (!DataFactoryCommonUtilities.IsSucceededProvisioningState(linkedService.ProvisioningState)) + { + string errorMessage = linkedService.Properties == null + ? string.Empty + : linkedService.Properties.ErrorMessage; + throw new ProvisioningFailedException(errorMessage); + } + + return linkedService; + } + + private bool CheckLinkedServiceExists(string resourceGroupName, string dataFactoryName, string linkedServiceName) + { + // ToDo: implement HEAD to check if the linked service exists + try + { + PSLinkedService linkedService = GetLinkedService(resourceGroupName, dataFactoryName, linkedServiceName); + + return true; + } + catch (CloudException e) + { + //Get throws Exception message with NotFound Status + if (e.Response.StatusCode == HttpStatusCode.NotFound) + { + return false; + } + else + { + throw; + } + } + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Pipelines.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Pipelines.cs new file mode 100644 index 000000000000..6edf114b396b --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Pipelines.cs @@ -0,0 +1,261 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Net; +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.Azure.Commands.DataFactories.Properties; +using Microsoft.Azure.Management.DataFactories; +using Microsoft.Azure.Management.DataFactories.Models; +using Microsoft.WindowsAzure; + +namespace Microsoft.Azure.Commands.DataFactories +{ + public partial class DataFactoryClient + { + public virtual Pipeline CreateOrUpdatePipeline(string resourceGroupName, string dataFactoryName, + string pipelineName, string rawJsonContent) + { + if (string.IsNullOrWhiteSpace(rawJsonContent)) + { + throw new ArgumentNullException("rawJsonContent"); + } + + // If create failed, the current behavior is to throw + var response = + DataPipelineManagementClient.Pipelines.CreateOrUpdateWithRawJsonContent( + resourceGroupName, + dataFactoryName, + pipelineName, + new PipelineCreateOrUpdateWithRawJsonContentParameters() { Content = rawJsonContent }); + + return response.Pipeline; + } + + public virtual HttpStatusCode DeletePipeline(string resourceGroupName, string dataFactoryName, string pipelineName) + { + OperationResponse response = DataPipelineManagementClient.Pipelines.Delete( + resourceGroupName, dataFactoryName, pipelineName); + + return response.StatusCode; + } + + public virtual PSPipeline GetPipeline(string resourceGroupName, string dataFactoryName, string pipelineName) + { + var response = DataPipelineManagementClient.Pipelines.Get( + resourceGroupName, dataFactoryName, pipelineName); + + return new PSPipeline(response.Pipeline) + { + ResourceGroupName = resourceGroupName, + DataFactoryName = dataFactoryName + }; + } + + public virtual List GetPipelineRuns(string resourceGroupName, string dataFactoryName, string pipelineName, + string activityName, DateTime runRangeStartTime, DateTime? runRangeEndTime, string runRecordStatus = null) + { + var pipelineRuns = new List(); + + var response = DataPipelineManagementClient.PipelineRuns.List(resourceGroupName, dataFactoryName, pipelineName, + new PipelineRunListParameters() + { + ActivityName = activityName, + RunRangeStartTime = runRangeStartTime.ConvertToISO8601DateTimeString(), + RunRangeEndTime = runRangeEndTime != null ? runRangeEndTime.Value.ConvertToISO8601DateTimeString() : null, + RunRecordStatus = runRecordStatus + }); + + if (response != null && response.PipelineRuns != null) + { + foreach (var run in response.PipelineRuns) + { + pipelineRuns.Add( + new PSDataSliceRun(run) + { + ResourceGroupName = resourceGroupName, + DataFactoryName = dataFactoryName + }); + } + } + + return pipelineRuns; + } + + public virtual List ListPipelines(string resourceGroupName, string dataFactoryName) + { + List pipelines = new List(); + + var response = DataPipelineManagementClient.Pipelines.List(resourceGroupName, dataFactoryName); + + if (response != null && response.Pipelines != null) + { + foreach (var pipeline in response.Pipelines) + { + pipelines.Add( + new PSPipeline(pipeline) + { + ResourceGroupName = resourceGroupName, + DataFactoryName = dataFactoryName + }); + } + } + + return pipelines; + } + + public virtual void SetPipelineActivePeriod( + string resourceGroupName, + string dataFactoryName, + string pipelineName, + DateTime startTime, + DateTime endTime, + bool autoResolve, + bool forceRecalc) + { + DataPipelineManagementClient.Pipelines.SetActivePeriod( + resourceGroupName, + dataFactoryName, + pipelineName, + new PipelineSetActivePeriodParameters() + { + ActivePeriodStartTime = startTime.ConvertToISO8601DateTimeString(), + ActivePeriodEndTime = endTime.ConvertToISO8601DateTimeString(), + AutoResolve = autoResolve, + ForceRecalc = forceRecalc + }); + } + + public virtual void SuspendPipeline(string resourceGroupName, string dataFactoryName, string pipelineName) + { + DataPipelineManagementClient.Pipelines.Suspend(resourceGroupName, dataFactoryName, pipelineName); + } + + public virtual void ResumePipeline(string resourceGroupName, string dataFactoryName, string pipelineName) + { + DataPipelineManagementClient.Pipelines.Resume(resourceGroupName, dataFactoryName, pipelineName); + } + + public virtual List FilterPSPipelines(PipelineFilterOptions filterOptions) + { + if (filterOptions == null) + { + throw new ArgumentNullException("filterOptions"); + } + + if (string.IsNullOrWhiteSpace(filterOptions.ResourceGroupName)) + { + throw new ArgumentException(Resources.ResourceGroupNameCannotBeEmpty); + } + + List Pipelines = new List(); + + if (!string.IsNullOrWhiteSpace(filterOptions.Name)) + { + Pipelines.Add(GetPipeline(filterOptions.ResourceGroupName, filterOptions.DataFactoryName, + filterOptions.Name)); + } + else + { + Pipelines.AddRange(ListPipelines(filterOptions.ResourceGroupName, + filterOptions.DataFactoryName)); + } + + return Pipelines; + } + + public virtual PSPipeline CreatePSPipeline(CreatePSPipelineParameters parameters) + { + if (parameters == null) + { + throw new ArgumentNullException("parameters"); + } + + PSPipeline pipeline = null; + Action createPipeline = () => + { + pipeline = + new PSPipeline(CreateOrUpdatePipeline(parameters.ResourceGroupName, + parameters.DataFactoryName, + parameters.Name, + parameters.RawJsonContent)) + { + ResourceGroupName = parameters.ResourceGroupName, + DataFactoryName = parameters.DataFactoryName + }; + }; + + if (parameters.Force) + { + // If user decides to overwrite anyway, then there is no need to check if the linked service exists or not. + createPipeline(); + } + else + { + bool pipelineExists = CheckPipelineExists(parameters.ResourceGroupName, + parameters.DataFactoryName, parameters.Name); + + parameters.ConfirmAction( + !pipelineExists, // prompt only if the linked service exists + string.Format( + CultureInfo.InvariantCulture, + Resources.PipelineExists, + parameters.Name, + parameters.DataFactoryName), + string.Format( + CultureInfo.InvariantCulture, + Resources.PipelineCreating, + parameters.Name, + parameters.DataFactoryName), + parameters.Name, + createPipeline); + } + + if (!DataFactoryCommonUtilities.IsSucceededProvisioningState(pipeline.ProvisioningState)) + { + string errorMessage = pipeline.Properties == null + ? string.Empty + : pipeline.Properties.ErrorMessage; + throw new ProvisioningFailedException(errorMessage); + } + + return pipeline; + } + + private bool CheckPipelineExists(string resourceGroupName, string dataFactoryName, string pipelineName) + { + // ToDo: implement HEAD to check if the pipeline exists + try + { + PSPipeline pipeline = GetPipeline(resourceGroupName, dataFactoryName, pipelineName); + + return true; + } + catch (CloudException e) + { + //Get throws Exception message with NotFound Status + if (e.Response.StatusCode == HttpStatusCode.NotFound) + { + return false; + } + else + { + throw; + } + } + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Tables.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Tables.cs new file mode 100644 index 000000000000..d50a2d1efac8 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.Tables.cs @@ -0,0 +1,194 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Net; +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.Azure.Commands.DataFactories.Properties; +using Microsoft.Azure.Management.DataFactories; +using Microsoft.Azure.Management.DataFactories.Models; +using Microsoft.WindowsAzure; + +namespace Microsoft.Azure.Commands.DataFactories +{ + public partial class DataFactoryClient + { + public virtual Table CreateOrUpdateTable(string resourceGroupName, string dataFactoryName, string tableName, string rawJsonContent) + { + if (string.IsNullOrWhiteSpace(rawJsonContent)) + { + throw new ArgumentNullException("rawJsonContent"); + } + + // If create or update failed, the current behavior is to throw + var response = DataPipelineManagementClient.Tables.CreateOrUpdateWithRawJsonContent( + resourceGroupName, + dataFactoryName, + tableName, + new TableCreateOrUpdateWithRawJsonContentParameters() { Content = rawJsonContent }); + + return response.Table; + } + + public virtual PSTable GetTable(string resourceGroupName, string dataFactoryName, string tableName) + { + var response = DataPipelineManagementClient.Tables.Get( + resourceGroupName, dataFactoryName, tableName); + + return new PSTable(response.Table) + { + ResourceGroupName = resourceGroupName, + DataFactoryName = dataFactoryName + }; + } + + public virtual List ListTables(string resourceGroupName, string dataFactoryName) + { + List tables = new List(); + + var response = DataPipelineManagementClient.Tables.List(resourceGroupName, dataFactoryName); + + if (response != null && response.Tables != null) + { + foreach (var table in response.Tables) + { + tables.Add( + new PSTable(table) + { + ResourceGroupName = resourceGroupName, + DataFactoryName = dataFactoryName + }); + } + } + + return tables; + } + + public virtual HttpStatusCode DeleteTable(string resourceGroupName, string dataFactoryName, string tableName) + { + OperationResponse response = DataPipelineManagementClient.Tables.Delete(resourceGroupName, dataFactoryName, tableName); + return response.StatusCode; + } + + public virtual List FilterPSTables(TableFilterOptions filterOptions) + { + if (filterOptions == null) + { + throw new ArgumentNullException("filterOptions"); + } + + if (string.IsNullOrWhiteSpace(filterOptions.ResourceGroupName)) + { + throw new ArgumentException(Resources.ResourceGroupNameCannotBeEmpty); + } + + List tables = new List(); + + if (!string.IsNullOrWhiteSpace(filterOptions.Name)) + { + tables.Add(GetTable(filterOptions.ResourceGroupName, filterOptions.DataFactoryName, filterOptions.Name)); + } + else + { + tables.AddRange(ListTables(filterOptions.ResourceGroupName, filterOptions.DataFactoryName)); + } + + return tables; + } + + public virtual PSTable CreatePSTable(CreatePSTableParameters parameters) + { + if (parameters == null) + { + throw new ArgumentNullException("parameters"); + } + + PSTable table = null; + Action createTable = () => + { + table = + new PSTable(CreateOrUpdateTable( + parameters.ResourceGroupName, + parameters.DataFactoryName, + parameters.Name, + parameters.RawJsonContent)) + { + ResourceGroupName = parameters.ResourceGroupName, + DataFactoryName = parameters.DataFactoryName + }; + }; + + if (parameters.Force) + { + // If user decides to overwrite anyway, then there is no need to check if the table exists or not. + createTable(); + } + else + { + bool tableExists = CheckTableExists(parameters.ResourceGroupName, parameters.DataFactoryName, + parameters.Name); + + parameters.ConfirmAction( + !tableExists, // prompt only if the table exists + string.Format( + CultureInfo.InvariantCulture, + Resources.TableExists, + parameters.Name, + parameters.DataFactoryName), + string.Format( + CultureInfo.InvariantCulture, + Resources.TableCreating, + parameters.Name, + parameters.DataFactoryName), + parameters.Name, + createTable); + } + + if (!DataFactoryCommonUtilities.IsSucceededProvisioningState(table.ProvisioningState)) + { + string errorMessage = table.Properties == null + ? string.Empty + : table.Properties.ErrorMessage; + throw new ProvisioningFailedException(errorMessage); + } + + return table; + } + + private bool CheckTableExists(string resourceGroupName, string dataFactoryName, string tableName) + { + // ToDo: implement HEAD to check if the table exists + try + { + PSTable table = GetTable(resourceGroupName, dataFactoryName, tableName); + + return true; + } + catch (CloudException e) + { + //Get throws Exception message with NotFound Status + if (e.Response.StatusCode == HttpStatusCode.NotFound) + { + return false; + } + else + { + throw; + } + } + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.cs new file mode 100644 index 000000000000..e872b5984e22 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClient.cs @@ -0,0 +1,57 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using Microsoft.Azure.Management.DataFactories; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.Azure.Commands.DataFactories.Properties; +using System; +using Microsoft.WindowsAzure.Storage.Blob; +using Microsoft.WindowsAzure.Storage; +using System.Net; + +namespace Microsoft.Azure.Commands.DataFactories +{ + public partial class DataFactoryClient + { + public IDataPipelineManagementClient DataPipelineManagementClient { get; private set; } + + public DataFactoryClient(AzureContext context) + { + DataPipelineManagementClient = AzureSession.ClientFactory.CreateClient( + context, AzureEnvironment.Endpoint.ResourceManager); + } + + /// + /// Parameterless constructor for Mocking. + /// + public DataFactoryClient() + { + } + + public virtual string ReadJsonFileContent(string path) + { + if (!File.Exists(path)) + { + throw new FileNotFoundException(path); + } + + using (TextReader reader = new StreamReader(path)) + { + return reader.ReadToEnd(); + } + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClientExtensions.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClientExtensions.cs new file mode 100644 index 000000000000..9ef2212a475d --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryClientExtensions.cs @@ -0,0 +1,32 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Management.DataFactories.Models; +using Newtonsoft.Json; + +namespace Microsoft.Azure.Commands.DataFactories +{ + internal static class DataFactoryClientExtensions + { + public static string ToFormattedString(this LinkedServiceProperties properties) + { + return JsonConvert.SerializeObject(properties); + } + + public static string ToFormattedString(T objectToSerialize) + { + return JsonConvert.SerializeObject(objectToSerialize); + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryFilterOptions.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryFilterOptions.cs new file mode 100644 index 000000000000..690beb58b719 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryFilterOptions.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.DataFactories +{ + public class DataFactoryFilterOptions + { + public string Name { get; set; } + + public string ResourceGroupName { get; set; } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryParametersBase.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryParametersBase.cs new file mode 100644 index 000000000000..cb4afa631c83 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/DataFactoryParametersBase.cs @@ -0,0 +1,24 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +namespace Microsoft.Azure.Commands.DataFactories +{ + public class DataFactoryParametersBase + { + public string ResourceGroupName { get; set; } + + public string DataFactoryName { get; set; } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/HubFilterOptions.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/HubFilterOptions.cs new file mode 100644 index 000000000000..f115f8145fce --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/HubFilterOptions.cs @@ -0,0 +1,25 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.DataFactories +{ + public class HubFilterOptions + { + public string Name { get; set; } + + public string ResourceGroupName { get; set; } + + public string DataFactoryName { get; set; } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/LinkedServiceFilterOptions.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/LinkedServiceFilterOptions.cs new file mode 100644 index 000000000000..20668c8697cf --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/LinkedServiceFilterOptions.cs @@ -0,0 +1,25 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.DataFactories +{ + public class LinkedServiceFilterOptions + { + public string Name { get; set; } + + public string ResourceGroupName { get; set; } + + public string DataFactoryName { get; set; } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataFactory.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataFactory.cs new file mode 100644 index 000000000000..9c9c9f06d3d8 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataFactory.cs @@ -0,0 +1,95 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Microsoft.Azure.Management.DataFactories.Models; + +namespace Microsoft.Azure.Commands.DataFactories.Models +{ + public class PSDataFactory + { + private DataFactory dataFactory; + + public PSDataFactory() + { + dataFactory = new DataFactory(); + } + + public PSDataFactory(DataFactory dataFactory) + { + if (dataFactory == null) + { + throw new ArgumentNullException("dataFactory"); + } + + this.dataFactory = dataFactory; + } + + public string DataFactoryName + { + get + { + return dataFactory.Name; + } + set + { + dataFactory.Name = value; + } + } + + public string ResourceGroupName { get; set; } + + public string Location + { + get + { + return dataFactory.Location; + } + set + { + dataFactory.Location = value; + } + } + + public IDictionary Tags + { + get + { + return dataFactory.Tags; + } + set + { + dataFactory.Tags = value; + } + } + + public DataFactoryProperties Properties + { + get + { + return dataFactory.Properties; + } + set + { + dataFactory.Properties = value; + } + } + + public string ProvisioningState + { + get { return Properties == null ? string.Empty : Properties.ProvisioningState; } + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataFactoryGateway.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataFactoryGateway.cs new file mode 100644 index 000000000000..35dc67f4c068 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataFactoryGateway.cs @@ -0,0 +1,115 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.Azure.Management.DataFactories.Models; + +namespace Microsoft.Azure.Commands.DataFactories.Models +{ + public class PSDataFactoryGateway + { + private readonly Gateway _gateway; + + public PSDataFactoryGateway() + { + _gateway = new Gateway { Properties = new GatewayProperties() }; + } + + public PSDataFactoryGateway(Gateway gateway) + { + if (gateway == null) + { + throw new ArgumentNullException("gateway"); + } + + _gateway = gateway; + } + + public string Name + { + get { return _gateway.Name; } + set { _gateway.Name = value; } + } + + public string Location + { + get { return _gateway.Location; } + set { _gateway.Location = value; } + } + + public string Description + { + get { return _gateway.Properties.Description; } + set { _gateway.Properties.Description = value; } + } + + public string Version + { + get { return _gateway.Properties.Version; } + internal set { _gateway.Properties.Version = value; } + } + + public string Status + { + get { return _gateway.Properties.Status; } + internal set { _gateway.Properties.Status = value; } + } + + public string VersionStatus + { + get { return _gateway.Properties.VersionStatus; } + internal set { _gateway.Properties.VersionStatus = value; } + } + + public DateTime? CreateTime + { + get { return _gateway.Properties.CreateTime; } + internal set { _gateway.Properties.CreateTime = value; } + } + + public DateTime? RegisterTime + { + get { return _gateway.Properties.RegisterTime; } + internal set { _gateway.Properties.RegisterTime = value; } + } + + public DateTime? LastConnectTime + { + get { return _gateway.Properties.LastConnectTime; } + internal set { _gateway.Properties.LastConnectTime = value; } + } + + public DateTime? ExpiryTime + { + get { return _gateway.Properties.ExpiryTime; } + internal set { _gateway.Properties.ExpiryTime = value; } + } + + public string ProvisioningState + { + get { return _gateway.Properties == null ? string.Empty : _gateway.Properties.ProvisioningState; } + } + + internal string Key + { + get { return _gateway.Properties.Key; } + set { _gateway.Properties.Key = value; } + } + + public Gateway ToGatewayDefinition() + { + return _gateway; + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataFactoryGatewayKey.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataFactoryGatewayKey.cs new file mode 100644 index 000000000000..3a2a7ac8614f --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataFactoryGatewayKey.cs @@ -0,0 +1,32 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.DataFactories.Models +{ + public class PSDataFactoryGatewayKey + { + private string _gatewayKey; + + public PSDataFactoryGatewayKey(string key) + { + _gatewayKey = key; + } + + public string GatewayKey + { + get { return _gatewayKey; } + set { _gatewayKey = value; } + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataSlice.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataSlice.cs new file mode 100644 index 000000000000..2a9fc460ce77 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataSlice.cs @@ -0,0 +1,120 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.Azure.Management.DataFactories.Models; + +namespace Microsoft.Azure.Commands.DataFactories.Models +{ + /// + /// A PowerShell wrapper class on top of the DataSlice type. + /// + public class PSDataSlice + { + private DataSlice dataSlice; + + public PSDataSlice() + { + dataSlice = new DataSlice(); + } + + public PSDataSlice(DataSlice dataSlice) + { + if (dataSlice == null) + { + throw new ArgumentNullException("dataSlice"); + } + + this.dataSlice = dataSlice; + } + + public string ResourceGroupName { get; set; } + + public string DataFactoryName { get; set; } + + public string TableName { get; set; } + + public DateTime Start + { + get + { + return dataSlice.Start; + } + internal set + { + dataSlice.Start = value; + } + } + + public DateTime End + { + get + { + return dataSlice.End; + } + internal set + { + dataSlice.End = value; + } + } + + public int RetryCount + { + get + { + return dataSlice.RetryCount; + } + internal set + { + dataSlice.RetryCount = value; + } + } + + public string Status + { + get + { + return dataSlice.Status; + } + internal set + { + dataSlice.Status = value; + } + } + + public string LatencyStatus + { + get + { + return dataSlice.LatencyStatus; + } + internal set + { + dataSlice.LatencyStatus = value; + } + } + + public int LongRetryCount + { + get + { + return dataSlice.LongRetryCount; + } + internal set + { + dataSlice.LongRetryCount = value; + } + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataSliceRun.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataSliceRun.cs new file mode 100644 index 000000000000..6d028e586976 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSDataSliceRun.cs @@ -0,0 +1,217 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Microsoft.Azure.Management.DataFactories.Models; + +namespace Microsoft.Azure.Commands.DataFactories.Models +{ + /// + /// A PowerShell wrapper class on top of the DataSlice type. + /// + public class PSDataSliceRun + { + private DataSliceRun dataSliceRun; + + public PSDataSliceRun() + { + dataSliceRun = new DataSliceRun(); + } + + public PSDataSliceRun(DataSliceRun dataSliceRun) + { + if (dataSliceRun == null) + { + throw new ArgumentNullException("dataSliceRun"); + } + + this.dataSliceRun = dataSliceRun; + } + + public string Id + { + get + { + return dataSliceRun.Id; + } + internal set + { + dataSliceRun.Id = value; + } + } + + public string ResourceGroupName { get; set; } + + public string DataFactoryName { get; set; } + + public string TableName { get; set; } + + public DateTime ProcessingStartTime + { + get + { + return dataSliceRun.ProcessingStartTime; + } + internal set + { + dataSliceRun.ProcessingStartTime = value; + } + } + + public DateTime ProcessingEndTime + { + get + { + return dataSliceRun.ProcessingEndTime; + } + internal set + { + dataSliceRun.ProcessingEndTime = value; + } + } + + public int PercentComplete + { + get + { + return dataSliceRun.PercentComplete; + } + internal set + { + dataSliceRun.PercentComplete = value; + } + } + + public DateTime DataSliceStart + { + get + { + return dataSliceRun.DataSliceStart; + } + internal set + { + dataSliceRun.DataSliceStart = value; + } + } + + public DateTime DataSliceEnd + { + get + { + return dataSliceRun.DataSliceEnd; + } + internal set + { + dataSliceRun.DataSliceEnd = value; + } + } + + public string Status + { + get + { + return dataSliceRun.Status; + } + internal set + { + dataSliceRun.Status = value; + } + } + + public DateTime Timestamp + { + get + { + return dataSliceRun.Timestamp; + } + internal set + { + dataSliceRun.Timestamp = value; + } + } + + public int RetryAttempt + { + get + { + return dataSliceRun.RetryAttempt; + } + internal set + { + dataSliceRun.RetryAttempt = value; + } + } + + public IDictionary Properties + { + get + { + return dataSliceRun.Properties; + } + internal set + { + dataSliceRun.Properties = value; + } + } + + public string ErrorMessage + { + get + { + return dataSliceRun.ErrorMessage; + } + internal set + { + dataSliceRun.ErrorMessage = value; + } + } + + public string ActivityName + { + get + { + return dataSliceRun.ActivityName; + } + internal set + { + dataSliceRun.ActivityName = value; + } + } + + public string PipelineName + { + get + { + return dataSliceRun.PipelineName; + } + internal set + { + dataSliceRun.PipelineName = value; + } + } + + public string Type + { + get + { + return dataSliceRun.Type; + } + internal set + { + dataSliceRun.Type = value; + } + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSHub.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSHub.cs new file mode 100644 index 000000000000..f04dbe51054f --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSHub.cs @@ -0,0 +1,73 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.Azure.Management.DataFactories.Models; + +namespace Microsoft.Azure.Commands.DataFactories.Models +{ + public class PSHub + { + private Hub _hub; + + public PSHub() + { + this._hub = new Hub(); + } + + public PSHub(Hub hub) + { + if (hub == null) + { + throw new ArgumentNullException("hub"); + } + + this._hub = hub; + } + + public string HubName + { + get + { + return this._hub.Name; + } + set + { + this._hub.Name = value; + } + } + + public string ResourceGroupName { get; set; } + + public string DataFactoryName { get; set; } + + public HubBaseProperties Properties + { + get + { + return this._hub.Properties; + } + + set + { + this._hub.Properties = value; + } + } + + public string ProvisioningState + { + get { return Properties == null ? string.Empty : Properties.ProvisioningState; } + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSLinkedService.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSLinkedService.cs new file mode 100644 index 000000000000..bbe4b26f83ef --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSLinkedService.cs @@ -0,0 +1,72 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.Azure.Management.DataFactories.Models; + +namespace Microsoft.Azure.Commands.DataFactories.Models +{ + public class PSLinkedService + { + private LinkedService linkedService; + + public PSLinkedService() + { + linkedService = new LinkedService(); + } + + public PSLinkedService(LinkedService linkedService) + { + if (linkedService == null) + { + throw new ArgumentNullException("linkedService"); + } + + this.linkedService = linkedService; + } + + public string LinkedServiceName + { + get + { + return linkedService.Name; + } + set + { + linkedService.Name = value; + } + } + + public string ResourceGroupName { get; set; } + + public string DataFactoryName { get; set; } + + public LinkedServiceProperties Properties + { + get + { + return linkedService.Properties; + } + set + { + linkedService.Properties = value; + } + } + + public string ProvisioningState + { + get { return Properties == null ? string.Empty : Properties.ProvisioningState; } + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSPipeline.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSPipeline.cs new file mode 100644 index 000000000000..b0341cf91c10 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSPipeline.cs @@ -0,0 +1,75 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.Azure.Management.DataFactories.Models; + +namespace Microsoft.Azure.Commands.DataFactories.Models +{ + /// + /// A PowerShell wrapper class on top of the Pipeline type. + /// + public class PSPipeline + { + private Pipeline _pipeline; + + public PSPipeline() + { + this._pipeline = new Pipeline(); + } + + public PSPipeline(Pipeline pipeline) + { + if (pipeline == null) + { + throw new ArgumentNullException("pipeline"); + } + + this._pipeline = pipeline; + } + + public string PipelineName + { + get + { + return this._pipeline.Name; + } + set + { + this._pipeline.Name = value; + } + } + + public string ResourceGroupName { get; set; } + + public string DataFactoryName { get; set; } + + public PipelineProperties Properties + { + get + { + return this._pipeline.Properties; + } + set + { + this._pipeline.Properties = value; + } + } + + public string ProvisioningState + { + get { return Properties == null ? string.Empty : Properties.ProvisioningState; } + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSRunLogInfo.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSRunLogInfo.cs new file mode 100644 index 000000000000..00356227a3a9 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSRunLogInfo.cs @@ -0,0 +1,73 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; + +namespace Microsoft.Azure.Commands.DataFactories.Models +{ + /// + /// A PowerShell wrapper class on top of the data slice run log SAS url + /// + public class PSRunLogInfo + { + private Uri _runLogUri; + + public PSRunLogInfo() + { + } + + public PSRunLogInfo(Uri runLogUri) + { + if (runLogUri == null) + { + throw new ArgumentNullException("runLogUri"); + } + + this._runLogUri = runLogUri; + } + + public string SasUri + { + get + { + return this._runLogUri.AbsoluteUri; + } + } + + public string StorageAccountName + { + get + { + return this._runLogUri.Host.Split('.').FirstOrDefault(); + } + } + + public string Container + { + get + { + return this._runLogUri.AbsolutePath.TrimStart('/'); + } + } + + public string SasToken + { + get + { + return this._runLogUri.Query; + } + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSTable.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSTable.cs new file mode 100644 index 000000000000..1b39e3702ae9 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PSTable.cs @@ -0,0 +1,138 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Microsoft.Azure.Management.DataFactories.Models; + +namespace Microsoft.Azure.Commands.DataFactories.Models +{ + public class PSTable + { + private Table table; + + public PSTable() + { + table = new Table() {Properties = new TableProperties()}; + } + + public PSTable(Table table) + { + if (table == null) + { + throw new ArgumentNullException("table"); + } + + if (table.Properties == null) + { + table.Properties = new TableProperties(); + } + + this.table = table; + } + + public string TableName + { + get + { + return table.Name; + } + set + { + table.Name = value; + } + } + + public string ResourceGroupName { get; set; } + + public string DataFactoryName { get; set; } + + public Availability Availability + { + get + { + return table.Properties.Availability; + } + set + { + table.Properties.Availability = value; + } + } + + public TableLocation Location + { + get + { + return table.Properties.Location; + } + set + { + table.Properties.Location = value; + } + } + + public Policy Policy + { + get + { + return table.Properties.Policy; + } + set + { + table.Properties.Policy = value; + } + } + + public IList Structure + { + get + { + return table.Properties.Structure; + } + set + { + table.Properties.Structure = value; + } + } + + public bool? Published + { + get + { + return table.Properties.Published; + } + set + { + table.Properties.Published = value; + } + } + + public TableProperties Properties + { + get + { + return table.Properties; + } + set + { + table.Properties = value; + } + } + + public string ProvisioningState + { + get { return Properties == null ? string.Empty : Properties.ProvisioningState; } + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PatchPSDataFactoryParameters.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PatchPSDataFactoryParameters.cs new file mode 100644 index 000000000000..fdd8f133ec81 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PatchPSDataFactoryParameters.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.Azure.Commands.DataFactories +{ + public class PatchPSDataFactoryParameters : DataFactoryParametersBase + { + public string RawJsonContent { get; set; } + + public bool Force { get; set; } + + public Action ConfirmAction { get; set; } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PipelineFilterOptions.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PipelineFilterOptions.cs new file mode 100644 index 000000000000..33d0553c4cc7 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/PipelineFilterOptions.cs @@ -0,0 +1,25 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.DataFactories +{ + public class PipelineFilterOptions + { + public string Name { get; set; } + + public string ResourceGroupName { get; set; } + + public string DataFactoryName { get; set; } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Models/TableFilterOptions.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/TableFilterOptions.cs new file mode 100644 index 000000000000..e8b1693564cc --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Models/TableFilterOptions.cs @@ -0,0 +1,25 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.DataFactories +{ + public class TableFilterOptions + { + public string Name { get; set; } + + public string ResourceGroupName { get; set; } + + public string DataFactoryName { get; set; } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/GetAzureDataFactoryPipelineCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/GetAzureDataFactoryPipelineCommand.cs new file mode 100644 index 000000000000..5899cf9baeac --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/GetAzureDataFactoryPipelineCommand.cs @@ -0,0 +1,78 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.Azure.Commands.DataFactories.Models; +using System.Collections; +using System.Globalization; +using Microsoft.Azure.Commands.DataFactories.Properties; + +namespace Microsoft.Azure.Commands.DataFactories +{ + [Cmdlet(VerbsCommon.Get, Constants.Pipeline, DefaultParameterSetName = ByFactoryName), OutputType(typeof(List), typeof(PSPipeline))] + public class GetAzureDataFactoryPipelineCommand : DataFactoryBaseCmdlet + { + [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The pipeline name.")] + public string Name { get; set; } + + [Parameter(ParameterSetName = ByFactoryObject, Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, +HelpMessage = "The data factory object.")] + public PSDataFactory DataFactory { get; set; } + + [Parameter(ParameterSetName = ByFactoryName, Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory name.")] + [ValidateNotNullOrEmpty] + public string DataFactoryName { get; set; } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public override void ExecuteCmdlet() + { + if (ParameterSetName == ByFactoryObject) + { + if (DataFactory == null) + { + throw new PSArgumentNullException(string.Format(CultureInfo.InvariantCulture, Resources.DataFactoryArgumentInvalid)); + } + + DataFactoryName = DataFactory.DataFactoryName; + ResourceGroupName = DataFactory.ResourceGroupName; + } + + PipelineFilterOptions filterOptions = new PipelineFilterOptions() + { + Name = Name, + ResourceGroupName = ResourceGroupName, + DataFactoryName = DataFactoryName + }; + + List pipelines = DataFactoryClient.FilterPSPipelines(filterOptions); + + if (pipelines != null) + { + if (pipelines.Count == 1 && Name != null) + { + WriteObject(pipelines[0]); + } + else + { + WriteObject(pipelines, true); + } + } + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/NewAzureDataFactoryPipelineCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/NewAzureDataFactoryPipelineCommand.cs new file mode 100644 index 000000000000..cac96f3af6b8 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/NewAzureDataFactoryPipelineCommand.cs @@ -0,0 +1,79 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.Azure.Commands.DataFactories.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System.Collections; +using System.Globalization; +using System.Management.Automation; +using System.Security.Permissions; + +namespace Microsoft.Azure.Commands.DataFactories +{ + [Cmdlet(VerbsCommon.New, Constants.Pipeline, DefaultParameterSetName = ByFactoryName), OutputType(typeof(PSPipeline))] + + public class NewAzureDataFactoryPipelineCommand : DataFactoryBaseCmdlet + { + [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The pipeline name.")] + public string Name { get; set; } + + [Parameter(ParameterSetName = ByFactoryObject, Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, +HelpMessage = "The data factory object.")] + public PSDataFactory DataFactory { get; set; } + + [Parameter(ParameterSetName = ByFactoryName, Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory name.")] + [ValidateNotNullOrEmpty] + public string DataFactoryName { get; set; } + + [Parameter(Position = 3, Mandatory = true, HelpMessage = "The pipeline JSON file path.")] + [ValidateNotNullOrEmpty] + public string File { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Don't ask for confirmation.")] + public SwitchParameter Force { get; set; } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public override void ExecuteCmdlet() + { + if (ParameterSetName == ByFactoryObject) + { + if (DataFactory == null) + { + throw new PSArgumentNullException(string.Format(CultureInfo.InvariantCulture, Resources.DataFactoryArgumentInvalid)); + } + + DataFactoryName = DataFactory.DataFactoryName; + ResourceGroupName = DataFactory.ResourceGroupName; + } + + string rawJsonContent = DataFactoryClient.ReadJsonFileContent(this.TryResolvePath(File)); + + Name = ResolveResourceName(rawJsonContent, Name, "Pipeline"); + + CreatePSPipelineParameters parameters = new CreatePSPipelineParameters() + { + ResourceGroupName = ResourceGroupName, + DataFactoryName = DataFactoryName, + Name = Name, + RawJsonContent = rawJsonContent, + Force = Force.IsPresent, + ConfirmAction = ConfirmAction + }; + + WriteObject(DataFactoryClient.CreatePSPipeline(parameters)); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/PipelineContextBaseCmdlet.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/PipelineContextBaseCmdlet.cs new file mode 100644 index 000000000000..e5f8d7a07722 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/PipelineContextBaseCmdlet.cs @@ -0,0 +1,37 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.DataFactories.Models; +using System.Management.Automation; + +namespace Microsoft.Azure.Commands.DataFactories +{ + public abstract class PipelineContextBaseCmdlet : DataFactoryBaseCmdlet + { + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The pipeline name.")] + [Alias("PipelineName")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(ParameterSetName = ByFactoryObject, Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory object.")] + public PSDataFactory DataFactory { get; set; } + + [Parameter(ParameterSetName = ByFactoryName, Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory name.")] + [ValidateNotNullOrEmpty] + public string DataFactoryName { get; set; } + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/RemoveAzureDataFactoryPipelineCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/RemoveAzureDataFactoryPipelineCommand.cs new file mode 100644 index 000000000000..bff58234c6f9 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/RemoveAzureDataFactoryPipelineCommand.cs @@ -0,0 +1,73 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.DataFactories.Properties; +using System; +using System.Collections; +using System.Globalization; +using System.Management.Automation; +using System.Net; +using System.Security.Permissions; + +namespace Microsoft.Azure.Commands.DataFactories +{ + [Cmdlet(VerbsCommon.Remove, Constants.Pipeline, DefaultParameterSetName = ByFactoryName)] + public class RemoveAzureDataFactoryPipelineCommand : PipelineContextBaseCmdlet + { + [Parameter(Mandatory = false, HelpMessage = "Don't ask for confirmation.")] + public SwitchParameter Force { get; set; } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public override void ExecuteCmdlet() + { + if (ParameterSetName == ByFactoryObject) + { + if (DataFactory == null) + { + throw new PSArgumentNullException(string.Format(CultureInfo.InvariantCulture, Resources.DataFactoryArgumentInvalid)); + } + + DataFactoryName = DataFactory.DataFactoryName; + ResourceGroupName = DataFactory.ResourceGroupName; + } + + ConfirmAction( + Force.IsPresent, + string.Format( + CultureInfo.InvariantCulture, + Resources.PipelineConfirmationMessage, + Name, + DataFactoryName), + string.Format( + CultureInfo.InvariantCulture, + Resources.PipelineRemoving, + Name, + DataFactoryName), + Name, + ExecuteDelete); + + WriteObject(true); + + } + + private void ExecuteDelete() + { + HttpStatusCode respone = DataFactoryClient.DeletePipeline(ResourceGroupName, DataFactoryName, Name); + if (respone == HttpStatusCode.NoContent) + { + WriteWarning(string.Format(CultureInfo.InvariantCulture, Resources.PipelineNotFound, Name, DataFactoryName)); + } + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/ResumeAzureDataFactoryPipelineCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/ResumeAzureDataFactoryPipelineCommand.cs new file mode 100644 index 000000000000..bc831ff12075 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/ResumeAzureDataFactoryPipelineCommand.cs @@ -0,0 +1,62 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.DataFactories.Properties; +using System; +using System.Collections; +using System.Globalization; +using System.Management.Automation; +using System.Security.Permissions; + +namespace Microsoft.Azure.Commands.DataFactories +{ + [Cmdlet(VerbsLifecycle.Resume, Constants.Pipeline, DefaultParameterSetName = ByFactoryName), OutputType(typeof(bool))] + public class ResumeAzureDataFactoryPipelineCommand : PipelineContextBaseCmdlet + { + [Parameter(Mandatory = false, HelpMessage = "Don't ask for confirmation.")] + public SwitchParameter Force { get; set; } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public override void ExecuteCmdlet() + { + if (ParameterSetName == ByFactoryObject) + { + if (DataFactory == null) + { + throw new PSArgumentNullException(string.Format(CultureInfo.InvariantCulture, Resources.DataFactoryArgumentInvalid)); + } + + DataFactoryName = DataFactory.DataFactoryName; + ResourceGroupName = DataFactory.ResourceGroupName; + } + + ConfirmAction( + Force.IsPresent, + string.Format( + CultureInfo.InvariantCulture, + "Are you sure you want to resume pipeline '{0}' in data factory '{1}'?", + Name, + DataFactoryName), + string.Format( + CultureInfo.InvariantCulture, + "Resuming pipeline '{0}' in data factory '{1}'.", + Name, + DataFactoryName), + Name, + () => DataFactoryClient.ResumePipeline(ResourceGroupName, DataFactoryName, Name)); + + WriteObject(true); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/SetAzureDataFactoryPipelineActivePeriodCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/SetAzureDataFactoryPipelineActivePeriodCommand.cs new file mode 100644 index 000000000000..350c914273dd --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/SetAzureDataFactoryPipelineActivePeriodCommand.cs @@ -0,0 +1,111 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.Azure.Commands.DataFactories.Properties; +using System; +using System.Collections; +using System.Globalization; +using System.Management.Automation; +using System.Security.Permissions; + +namespace Microsoft.Azure.Commands.DataFactories +{ + [Cmdlet(VerbsCommon.Set, Constants.PipelineActivePeriod, DefaultParameterSetName = ByFactoryName), OutputType(typeof(bool))] + public class SetAzureDataFactoryPipelineActivePeriodCommand : DataFactoryBaseCmdlet + { + private DateTime _endDateTime; + + [Alias("Name")] + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The pipeline name.")] + [ValidateNotNullOrEmpty] + public string PipelineName { get; set; } + + [Parameter(ParameterSetName = ByFactoryObject, Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory object.")] + public PSDataFactory DataFactory { get; set; } + + [Parameter(ParameterSetName = ByFactoryName, Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory name.")] + [ValidateNotNullOrEmpty] + public string DataFactoryName { get; set; } + + [Parameter(Position = 3, Mandatory = true, HelpMessage = "The pipeline active period start time.")] + public DateTime StartDateTime { get; set; } + + [Parameter(Position = 4, Mandatory = false, HelpMessage = "The pipeline active period end time.")] + public DateTime EndDateTime + { + get + { + return _endDateTime == default(DateTime) + ? StartDateTime + Constants.DefaultSliceActivePeriodDuration + : _endDateTime; + } + set + { + _endDateTime = value; + } + } + + [Parameter(Mandatory = false, HelpMessage = "Auto resolve active periods of conflicting pipelines.")] + public SwitchParameter AutoResolve { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Mark all data slices in the period as PendingExecution to force re-calculation.")] + public SwitchParameter ForceRecalculate { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Don't ask for confirmation.")] + public SwitchParameter Force { get; set; } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public override void ExecuteCmdlet() + { + if (ParameterSetName == ByFactoryObject) + { + if (DataFactory == null) + { + throw new PSArgumentNullException(string.Format(CultureInfo.InvariantCulture, Resources.DataFactoryArgumentInvalid)); + } + + DataFactoryName = DataFactory.DataFactoryName; + ResourceGroupName = DataFactory.ResourceGroupName; + } + + DateTime startTime = StartDateTime; + DateTime endTime = EndDateTime; + + ConfirmAction( + Force.IsPresent, + string.Format( + CultureInfo.InvariantCulture, + "Are you sure you want to set pipeline '{0}' active period from '{1}' to '{2}'?", + PipelineName, + startTime, + endTime), + string.Format( + CultureInfo.InvariantCulture, + "Set pipeline '{0}' active period from '{1}' to '{2}'", + PipelineName, + startTime, + endTime), + PipelineName, + () => + DataFactoryClient.SetPipelineActivePeriod( + ResourceGroupName, DataFactoryName, PipelineName, startTime, endTime, AutoResolve.ToBool(), ForceRecalculate.ToBool())); + + WriteObject(true); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/SuspendAzureDataFactoryPipelineCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/SuspendAzureDataFactoryPipelineCommand.cs new file mode 100644 index 000000000000..59fd239eb92e --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Pipelines/SuspendAzureDataFactoryPipelineCommand.cs @@ -0,0 +1,62 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.DataFactories.Properties; +using System; +using System.Collections; +using System.Globalization; +using System.Management.Automation; +using System.Security.Permissions; + +namespace Microsoft.Azure.Commands.DataFactories +{ + [Cmdlet(VerbsLifecycle.Suspend, Constants.Pipeline, DefaultParameterSetName = ByFactoryName), OutputType(typeof(bool))] + public class SuspendAzureDataFactoryPipelineCommand : PipelineContextBaseCmdlet + { + [Parameter(Mandatory = false, HelpMessage = "Don't ask for confirmation.")] + public SwitchParameter Force { get; set; } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public override void ExecuteCmdlet() + { + if (ParameterSetName == ByFactoryObject) + { + if (DataFactory == null) + { + throw new PSArgumentNullException(string.Format(CultureInfo.InvariantCulture, Resources.DataFactoryArgumentInvalid)); + } + + DataFactoryName = DataFactory.DataFactoryName; + ResourceGroupName = DataFactory.ResourceGroupName; + } + + ConfirmAction( + Force.IsPresent, + string.Format( + CultureInfo.InvariantCulture, + "Are you sure you want to suspend pipeline '{0}' in data factory '{1}'?", + Name, + DataFactoryName), + string.Format( + CultureInfo.InvariantCulture, + "Suspending pipeline '{0}' in data factory '{1}'.", + Name, + DataFactoryName), + Name, + () => DataFactoryClient.SuspendPipeline(ResourceGroupName, DataFactoryName, Name)); + + WriteObject(true); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Properties/AssemblyInfo.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..f55e74eac4e2 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Properties/AssemblyInfo.cs @@ -0,0 +1,34 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Microsoft Azure Powershell - DataFactory Manager")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] + +[assembly: ComVisible(false)] +[assembly: CLSCompliant(false)] +[assembly: Guid("5d024af0-81c9-44f0-b3b0-7080f103fb4d")] +[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] +[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] +#if SIGN +[assembly: InternalsVisibleTo("Microsoft.Azure.Commands.DataFactories.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +#else +[assembly: InternalsVisibleTo("Microsoft.Azure.Commands.DataFactories.Test")] +#endif \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Properties/Resources.Designer.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Properties/Resources.Designer.cs new file mode 100644 index 000000000000..9f7dee609605 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Properties/Resources.Designer.cs @@ -0,0 +1,437 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.Azure.Commands.DataFactories.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Azure.Commands.DataFactories.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to The data factory object provided is invalid. Use Get-AzureDataFactory to retrieve a specific data factory object, or use New-AzureDataFactory to create a new data factory object.. + /// + internal static string DataFactoryArgumentInvalid { + get { + return ResourceManager.GetString("DataFactoryArgumentInvalid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove data factory '{0}' in resource group '{1}'?. + /// + internal static string DataFactoryConfirmationMessage { + get { + return ResourceManager.GetString("DataFactoryConfirmationMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creating data factory '{0}' in resource group '{1}'.. + /// + internal static string DataFactoryCreating { + get { + return ResourceManager.GetString("DataFactoryCreating", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A data factory with the name {0} in the resource group {1} exists. + ///Continuing execution may overwrite the exisiting one. + ///Are you sure you want to continue?. + /// + internal static string DataFactoryExists { + get { + return ResourceManager.GetString("DataFactoryExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the gateway '{0}' in the data factory '{1}'?. + /// + internal static string DataFactoryGatewayConfirmationMessage { + get { + return ResourceManager.GetString("DataFactoryGatewayConfirmationMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A gateway with the name {0} already exsits in the data factory {1}.. + /// + internal static string DataFactoryGatewayExists { + get { + return ResourceManager.GetString("DataFactoryGatewayExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing the gateway '{0}' in the data factory '{1}'.. + /// + internal static string DataFactoryGatewayRemoving { + get { + return ResourceManager.GetString("DataFactoryGatewayRemoving", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Data factory '{0}' does not exist in the resource group '{1}'.. + /// + internal static string DataFactoryNotFound { + get { + return ResourceManager.GetString("DataFactoryNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing data factory '{0}' in resource group '{1}'.. + /// + internal static string DataFactoryRemoving { + get { + return ResourceManager.GetString("DataFactoryRemoving", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The argument set for download method is incomplete.. + /// + internal static string DownloadCredentialsNull { + get { + return ResourceManager.GetString("DownloadCredentialsNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Download failed. Please check if you have write permission to the path {0} or the sas url is valid. . + /// + internal static string DownloadFailed { + get { + return ResourceManager.GetString("DownloadFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Download of the log is completed. Please find it in the directory {0}.. + /// + internal static string DownloadLogCompleted { + get { + return ResourceManager.GetString("DownloadLogCompleted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} name provided using -Name switch: '{1}' in cmdlet doesn't match with {0} name: '{2}' in JSON file. {0} will be created with name: '{1}'. + /// + internal static string ExtractedNameFromJsonMismatchWarning { + get { + return ResourceManager.GetString("ExtractedNameFromJsonMismatchWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to HTTP Status Code: {0} + ///Error Code: {1} + ///Error Message: {2} + ///Request Id: {3} + ///Timestamp (Utc):{4}. + /// + internal static string FormattedCloudExceptionMessageTemplate { + get { + return ResourceManager.GetString("FormattedCloudExceptionMessageTemplate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to provision the gateway. Please check if there is any error in the gateway properties before re-create it again.. + /// + internal static string GatewayProvisioningFailed { + get { + return ResourceManager.GetString("GatewayProvisioningFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove hub '{0}' in data factory '{1}'?. + /// + internal static string HubConfirmationMessage { + get { + return ResourceManager.GetString("HubConfirmationMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creating hub '{0}' in data factory '{1}'.. + /// + internal static string HubCreating { + get { + return ResourceManager.GetString("HubCreating", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A hub with the name {0} in the data factory {1} exists. + ///Continuing execution may overwrite the exisiting one. + ///Are you sure you want to continue?. + /// + internal static string HubExists { + get { + return ResourceManager.GetString("HubExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Hub '{0}' does not exist in the data factory '{1}'.. + /// + internal static string HubNotFound { + get { + return ResourceManager.GetString("HubNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to provision the hub. Please check if there is any error in the hub properties before re-create it again.. + /// + internal static string HubProvisioningFailed { + get { + return ResourceManager.GetString("HubProvisioningFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing hub '{0}' in data factory '{1}'.. + /// + internal static string HubRemoving { + get { + return ResourceManager.GetString("HubRemoving", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to parse input JSON file. {0}. Please correct the error in the JSON file and re-deploy {1} again.. + /// + internal static string InvalidJson { + get { + return ResourceManager.GetString("InvalidJson", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove linked service '{0}' in data factory '{1}'?. + /// + internal static string LinkedServiceConfirmationMessage { + get { + return ResourceManager.GetString("LinkedServiceConfirmationMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creating linked service '{0}' in data factory '{1}'.. + /// + internal static string LinkedServiceCreating { + get { + return ResourceManager.GetString("LinkedServiceCreating", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A linked service with the name {0} in the data factory {1} exists. + ///Continuing execution may overwrite the exisiting one. + ///Are you sure you want to continue?. + /// + internal static string LinkedServiceExists { + get { + return ResourceManager.GetString("LinkedServiceExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Linked service '{0}' does not exist in the data factory '{1}'.. + /// + internal static string LinkedServiceNotFound { + get { + return ResourceManager.GetString("LinkedServiceNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing linked service '{0}' in data factory '{1}'.. + /// + internal static string LinkedServiceRemoving { + get { + return ResourceManager.GetString("LinkedServiceRemoving", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No Slices were found in the time range specified. . + /// + internal static string NoDataSliceFound { + get { + return ResourceManager.GetString("NoDataSliceFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No access to write for the specified directory {0} or the directory does not exist.. + /// + internal static string NoWriteAccessToDirectory { + get { + return ResourceManager.GetString("NoWriteAccessToDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove pipeline '{0}' in data factory '{1}'?. + /// + internal static string PipelineConfirmationMessage { + get { + return ResourceManager.GetString("PipelineConfirmationMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creating pipeline '{0}' in data factory '{1}'.. + /// + internal static string PipelineCreating { + get { + return ResourceManager.GetString("PipelineCreating", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A pipeline with the name {0} in the data factory {1} exists. + ///Continuing execution may overwrite the exisiting one. + ///Are you sure you want to continue?. + /// + internal static string PipelineExists { + get { + return ResourceManager.GetString("PipelineExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Pipeline '{0}' does not exist in the data factory '{1}'.. + /// + internal static string PipelineNotFound { + get { + return ResourceManager.GetString("PipelineNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing pipeline '{0}' in data factory '{1}'.. + /// + internal static string PipelineRemoving { + get { + return ResourceManager.GetString("PipelineRemoving", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resource group name cannot be null.. + /// + internal static string ResourceGroupNameCannotBeEmpty { + get { + return ResourceManager.GetString("ResourceGroupNameCannotBeEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove table '{0}' in data factory '{1}'?. + /// + internal static string TableConfirmationMessage { + get { + return ResourceManager.GetString("TableConfirmationMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creating table '{0}' in data factory '{1}'.. + /// + internal static string TableCreating { + get { + return ResourceManager.GetString("TableCreating", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A table with the name {0} in the data factory {1} already exists. + ///Continuing execution will overwrite the exisiting one. + ///Are you sure you want to continue?. + /// + internal static string TableExists { + get { + return ResourceManager.GetString("TableExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Table '{0}' does not exist in data factory '{1}'.. + /// + internal static string TableNotFound { + get { + return ResourceManager.GetString("TableNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing table '{0}' in data factory '{1}'.. + /// + internal static string TableRemoving { + get { + return ResourceManager.GetString("TableRemoving", resourceCulture); + } + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Properties/Resources.resx b/src/ResourceManager/DataFactories/Commands.DataFactories/Properties/Resources.resx new file mode 100644 index 000000000000..466c9e0f8a77 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Properties/Resources.resx @@ -0,0 +1,254 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + The data factory object provided is invalid. Use Get-AzureDataFactory to retrieve a specific data factory object, or use New-AzureDataFactory to create a new data factory object. + + + Are you sure you want to remove the gateway '{0}' in the data factory '{1}'? + + + A gateway with the name {0} already exsits in the data factory {1}. + + + Removing the gateway '{0}' in the data factory '{1}'. + + + Are you sure you want to remove data factory '{0}' in resource group '{1}'? + + + Creating data factory '{0}' in resource group '{1}'. + + + A data factory with the name {0} in the resource group {1} exists. +Continuing execution may overwrite the exisiting one. +Are you sure you want to continue? + + + Data factory '{0}' does not exist in the resource group '{1}'. + + + Removing data factory '{0}' in resource group '{1}'. + + + Failed to parse input JSON file. {0}. Please correct the error in the JSON file and re-deploy {1} again. + + + The argument set for download method is incomplete. + + + Download failed. Please check if you have write permission to the path {0} or the sas url is valid. + + + Download of the log is completed. Please find it in the directory {0}. + + + {0} name provided using -Name switch: '{1}' in cmdlet doesn't match with {0} name: '{2}' in JSON file. {0} will be created with name: '{1}' + + + HTTP Status Code: {0} +Error Code: {1} +Error Message: {2} +Request Id: {3} +Timestamp (Utc):{4} + + + Are you sure you want to remove hub '{0}' in data factory '{1}'? + + + Creating hub '{0}' in data factory '{1}'. + + + A hub with the name {0} in the data factory {1} exists. +Continuing execution may overwrite the exisiting one. +Are you sure you want to continue? + + + Hub '{0}' does not exist in the data factory '{1}'. + + + Removing hub '{0}' in data factory '{1}'. + + + Are you sure you want to remove linked service '{0}' in data factory '{1}'? + + + Creating linked service '{0}' in data factory '{1}'. + + + A linked service with the name {0} in the data factory {1} exists. +Continuing execution may overwrite the exisiting one. +Are you sure you want to continue? + + + Linked service '{0}' does not exist in the data factory '{1}'. + + + Removing linked service '{0}' in data factory '{1}'. + + + No access to write for the specified directory {0} or the directory does not exist. + + + Are you sure you want to remove pipeline '{0}' in data factory '{1}'? + + + Creating pipeline '{0}' in data factory '{1}'. + + + A pipeline with the name {0} in the data factory {1} exists. +Continuing execution may overwrite the exisiting one. +Are you sure you want to continue? + + + Pipeline '{0}' does not exist in the data factory '{1}'. + + + Removing pipeline '{0}' in data factory '{1}'. + + + Resource group name cannot be null. + + + Are you sure you want to remove table '{0}' in data factory '{1}'? + + + Creating table '{0}' in data factory '{1}'. + + + A table with the name {0} in the data factory {1} already exists. +Continuing execution will overwrite the exisiting one. +Are you sure you want to continue? + + + Table '{0}' does not exist in data factory '{1}'. + + + Removing table '{0}' in data factory '{1}'. + + + No Slices were found in the time range specified. + + + Failed to provision the gateway. Please check if there is any error in the gateway properties before re-create it again. + + + Failed to provision the hub. Please check if there is any error in the hub properties before re-create it again. + + \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/ProvisioningFailedException.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/ProvisioningFailedException.cs new file mode 100644 index 000000000000..f3e7bc93d732 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/ProvisioningFailedException.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.Azure.Commands.DataFactories +{ + internal class ProvisioningFailedException : Exception + { + public ProvisioningFailedException(string errorMessage) + : base(errorMessage) + { + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Tables/GetAzureDataFactoryTableCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Tables/GetAzureDataFactoryTableCommand.cs new file mode 100644 index 000000000000..75ccb17b0b29 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Tables/GetAzureDataFactoryTableCommand.cs @@ -0,0 +1,82 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.Azure.Commands.DataFactories.Models; +using System.Globalization; +using Microsoft.Azure.Commands.DataFactories.Properties; + +namespace Microsoft.Azure.Commands.DataFactories +{ + [Cmdlet(VerbsCommon.Get, Constants.Table, DefaultParameterSetName = ByFactoryName), OutputType(typeof(List), typeof(PSTable))] + public class GetAzureDataFactoryTableCommand : DataFactoryBaseCmdlet + { + [Parameter(ParameterSetName = ByFactoryObject, Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory object.")] + public PSDataFactory DataFactory { get; set; } + + [Parameter(ParameterSetName = ByFactoryName, Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory name.")] + [ValidateNotNullOrEmpty] + public string DataFactoryName { get; set; } + + [Parameter(Position = 2, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The table name.")] + public string Name { get; set; } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public override void ExecuteCmdlet() + { + // ValidationNotNullOrEmpty doesn't handle whitespaces well + if (Name != null && string.IsNullOrWhiteSpace(Name)) + { + throw new PSArgumentNullException("Name"); + } + + if (ParameterSetName == ByFactoryObject) + { + if (DataFactory == null) + { + throw new PSArgumentNullException(string.Format(CultureInfo.InvariantCulture, Resources.DataFactoryArgumentInvalid)); + } + + DataFactoryName = DataFactory.DataFactoryName; + ResourceGroupName = DataFactory.ResourceGroupName; + } + + TableFilterOptions filterOptions = new TableFilterOptions() + { + Name = Name, + ResourceGroupName = ResourceGroupName, + DataFactoryName = DataFactoryName + }; + + List tables = DataFactoryClient.FilterPSTables(filterOptions); + + if (tables != null) + { + if (tables.Count == 1 && Name != null) + { + WriteObject(tables[0]); + } + else + { + WriteObject(tables, true); + } + } + } + } +} diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Tables/NewAzureDataFactoryTableCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Tables/NewAzureDataFactoryTableCommand.cs new file mode 100644 index 000000000000..7190c51becc8 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Tables/NewAzureDataFactoryTableCommand.cs @@ -0,0 +1,80 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.Azure.Commands.DataFactories.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System.Globalization; +using Microsoft.Azure.Commands.DataFactories.Properties; + +namespace Microsoft.Azure.Commands.DataFactories +{ + [Cmdlet(VerbsCommon.New, Constants.Table, DefaultParameterSetName = ByFactoryName), OutputType(typeof(PSTable))] + public class NewAzureDataFactoryTableCommand : DataFactoryBaseCmdlet + { + [Parameter(ParameterSetName = ByFactoryObject, Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, +HelpMessage = "The data factory object.")] + public PSDataFactory DataFactory { get; set; } + + [Parameter(ParameterSetName = ByFactoryName, Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory name.")] + [ValidateNotNullOrEmpty] + public string DataFactoryName { get; set; } + + [Parameter(Position = 2, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The table name.")] + public string Name { get; set; } + + [Parameter(Position = 3, Mandatory = true, HelpMessage = "The table JSON file path.")] + [ValidateNotNullOrEmpty] + public string File { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Don't ask for confirmation.")] + public SwitchParameter Force { get; set; } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public override void ExecuteCmdlet() + { + if (ParameterSetName == ByFactoryObject) + { + if (DataFactory == null) + { + throw new PSArgumentNullException(string.Format(CultureInfo.InvariantCulture, Resources.DataFactoryArgumentInvalid)); + } + + DataFactoryName = DataFactory.DataFactoryName; + ResourceGroupName = DataFactory.ResourceGroupName; + } + + // Resolve the file path and read the raw content + string rawJsonContent = DataFactoryClient.ReadJsonFileContent(this.TryResolvePath(File)); + + // Resolve any mismatch between -Name and the name written in JSON + Name = ResolveResourceName(rawJsonContent, Name, "Table"); + + CreatePSTableParameters parameters = new CreatePSTableParameters() + { + ResourceGroupName = ResourceGroupName, + DataFactoryName = DataFactoryName, + Name = Name, + RawJsonContent = rawJsonContent, + Force = Force.IsPresent, + ConfirmAction = ConfirmAction + }; + + WriteObject(DataFactoryClient.CreatePSTable(parameters)); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Tables/RemoveAzureDataFactoryTableCommand.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Tables/RemoveAzureDataFactoryTableCommand.cs new file mode 100644 index 000000000000..d71f31680fe0 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Tables/RemoveAzureDataFactoryTableCommand.cs @@ -0,0 +1,69 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Globalization; +using System.Management.Automation; +using System.Net; +using System.Security.Permissions; +using Microsoft.Azure.Commands.DataFactories.Properties; + +namespace Microsoft.Azure.Commands.DataFactories +{ + [Cmdlet(VerbsCommon.Remove, Constants.Table, DefaultParameterSetName = ByFactoryName)] + public class RemoveAzureDataFactoryTableCommand : TableContextBaseCmdlet + { + [Parameter(Mandatory = false, HelpMessage = "Don't ask for confirmation.")] + public SwitchParameter Force { get; set; } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public override void ExecuteCmdlet() + { + if (ParameterSetName == ByFactoryObject) + { + if (DataFactory == null) + { + throw new PSArgumentNullException(string.Format(CultureInfo.InvariantCulture, Resources.DataFactoryArgumentInvalid)); + } + + DataFactoryName = DataFactory.DataFactoryName; + ResourceGroupName = DataFactory.ResourceGroupName; + } + + ConfirmAction( + Force.IsPresent, + string.Format( + CultureInfo.InvariantCulture, + Resources.TableConfirmationMessage, + Name, + DataFactoryName), + string.Format( + CultureInfo.InvariantCulture, + Resources.TableRemoving, + Name, + DataFactoryName), + Name, + ExecuteDelete); + } + + private void ExecuteDelete() + { + HttpStatusCode response = DataFactoryClient.DeleteTable(ResourceGroupName, DataFactoryName, Name); + + if(response == HttpStatusCode.NoContent) + { + WriteWarning(string.Format(CultureInfo.InvariantCulture, Resources.TableNotFound, Name, DataFactoryName)); + } + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/Tables/TableContextBaseCmdlet.cs b/src/ResourceManager/DataFactories/Commands.DataFactories/Tables/TableContextBaseCmdlet.cs new file mode 100644 index 000000000000..807724f68431 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/Tables/TableContextBaseCmdlet.cs @@ -0,0 +1,37 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.DataFactories.Models; +using System.Management.Automation; + +namespace Microsoft.Azure.Commands.DataFactories +{ + public abstract class TableContextBaseCmdlet : DataFactoryBaseCmdlet + { + [Parameter(ParameterSetName = ByFactoryObject, Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory object.")] + public PSDataFactory DataFactory { get; set; } + + [Parameter(ParameterSetName = ByFactoryName, Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The data factory name.")] + [ValidateNotNullOrEmpty] + public string DataFactoryName { get; set; } + + [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The table name.")] + [Alias("TableName")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + } +} \ No newline at end of file diff --git a/src/ResourceManager/DataFactories/Commands.DataFactories/packages.config b/src/ResourceManager/DataFactories/Commands.DataFactories/packages.config new file mode 100644 index 000000000000..cad7ad7d6468 --- /dev/null +++ b/src/ResourceManager/DataFactories/Commands.DataFactories/packages.config @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/Commands.RedisCache.Test.csproj b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/Commands.RedisCache.Test.csproj new file mode 100644 index 000000000000..f643fa9af573 --- /dev/null +++ b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/Commands.RedisCache.Test.csproj @@ -0,0 +1,184 @@ + + + + + Debug + AnyCPU + {4AE5705F-62CF-461D-B72E-DD9DCD9B3609} + Library + Properties + Microsoft.Azure.Commands.RedisCache.Test + Microsoft.Azure.Commands.RedisCache.Test + v4.5 + 512 + ..\..\..\ + true + + + + true + MSSharedLibKey.snk + true + true + false + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + bin\Release\ + TRACE;SIGN + true + pdbonly + AnyCPU + prompt + false + + + + False + ..\..\..\packages\Microsoft.Azure.Management.Redis.0.10.0-preview\lib\net40\Microsoft.Azure.Management.Redis.dll + + + False + ..\..\..\packages\Hydra.HttpRecorder.1.0.5417.13285-prerelease\lib\net45\Microsoft.Azure.Utilities.HttpRecorder.dll + + + False + ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll + + + False + ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + False + ..\..\..\packages\Hydra.SpecTestSupport.1.0.5417.13285-prerelease\lib\net45\Microsoft.WindowsAzure.Testing.dll + + + False + ..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll + + + False + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + + + + + False + C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Management.Automation\v4.0_3.0.0.0__31bf3856ad364e35\System.Management.Automation.dll + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + + + + + False + ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + + False + ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + + + + + + + + + {c1bda476-a5cc-4394-914d-48b0ec31a710} + Commands.ScenarioTests.Common + + + {3b48a77b-5956-4a62-9081-92ba04b02b27} + Commands.Common.Test + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + {c972e3ef-4461-4758-ba31-93e0947b1253} + Commands.RedisCache + + + + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + + + + + + + + + + + xcopy "$(SolutionDir)Package\$(ConfigurationName)\*.*" $(TargetDir) /Y /E + + + \ No newline at end of file diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/MSSharedLibKey.snk b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/MSSharedLibKey.snk differ diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/Properties/AssemblyInfo.cs b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..120c2b3d4243 --- /dev/null +++ b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft.Azure.Commands.RedisCache.Test")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Microsoft.Azure.Commands.RedisCache.Test")] +[assembly: AssemblyCopyright("Copyright © Microsoft")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +[assembly: ComVisible(false)] + +[assembly: Guid("C01CC766-EAA4-4CA3-A595-6C4681316532")] + +[assembly: AssemblyVersion("0.1.0")] +[assembly: AssemblyFileVersion("0.1.0")] \ No newline at end of file diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/ScenarioTests/RedisCacheTests.cs b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/ScenarioTests/RedisCacheTests.cs new file mode 100644 index 000000000000..f08f81cb980d --- /dev/null +++ b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/ScenarioTests/RedisCacheTests.cs @@ -0,0 +1,51 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests +{ + using Microsoft.WindowsAzure.Commands.ScenarioTest; + using Microsoft.WindowsAzure.Testing; + using Xunit; + + public class RedisCacheTests : RedisCacheTestsBase + { + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestRedisCache() + { + RunPowerShellTest("Test-RedisCache"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestSetNonExistingRedisCacheTest() + { + RunPowerShellTest("Test-SetNonExistingRedisCacheTest"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestCreateExistingRedisCacheTest() + { + RunPowerShellTest("Test-CreateExistingRedisCacheTest"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestRedisCachePipeline() + { + RunPowerShellTest("Test-RedisCachePipeline"); + } + } +} diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/ScenarioTests/RedisCacheTests.ps1 b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/ScenarioTests/RedisCacheTests.ps1 new file mode 100644 index 000000000000..63f31d35d540 --- /dev/null +++ b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/ScenarioTests/RedisCacheTests.ps1 @@ -0,0 +1,253 @@ +<# +.SYNOPSIS +Tests redis cache. +#> +function Test-RedisCache +{ + # Setup + # resource group should exists + $resourceGroupName = "redisruntimetestrg" + $cacheName = "powershelltest" + $location = "North Central US" + + # Creating Cache + $cacheCreated = New-AzureRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName -Location $location -Size 250MB -Sku Basic + + Assert-AreEqual $cacheName $cacheCreated.Name + Assert-AreEqual $location $cacheCreated.Location + Assert-AreEqual "Microsoft.Cache/Redis" $cacheCreated.Type + Assert-AreEqual $resourceGroupName $cacheCreated.ResourceGroupName + + Assert-AreEqual 6379 $cacheCreated.Port + Assert-AreEqual 6380 $cacheCreated.SslPort + Assert-AreEqual "creating" $cacheCreated.ProvisioningState + Assert-AreEqual "2.8" $cacheCreated.RedisVersion + Assert-AreEqual "250MB" $cacheCreated.Size + Assert-AreEqual "Basic" $cacheCreated.Sku + + Assert-NotNull $cacheCreated.PrimaryKey "PrimaryKey do not exists" + Assert-NotNull $cacheCreated.SecondaryKey "SecondaryKey do not exists" + + # In loop to check if cache exists + for ($i = 0; $i -le 60; $i++) + { + [Microsoft.WindowsAzure.Commands.Utilities.Common.TestMockSupport]::Delay(30000) + $cacheGet = Get-AzureRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName + if ([string]::Compare("succeeded", $cacheGet[0].ProvisioningState, $True) -eq 0) + { + Assert-AreEqual $cacheName $cacheGet[0].Name + Assert-AreEqual $location $cacheGet[0].Location + Assert-AreEqual "Microsoft.Cache/Redis" $cacheGet[0].Type + Assert-AreEqual $resourceGroupName $cacheGet[0].ResourceGroupName + + Assert-AreEqual 6379 $cacheGet[0].Port + Assert-AreEqual 6380 $cacheGet[0].SslPort + Assert-AreEqual "succeeded" $cacheGet[0].ProvisioningState + Assert-AreEqual "2.8" $cacheGet[0].RedisVersion + Assert-AreEqual "250MB" $cacheGet[0].Size + Assert-AreEqual "Basic" $cacheGet[0].Sku + break + } + Assert-False {$i -eq 60} "Cache is not in succeeded state even after 30 min." + } + + # Updating Cache + $cacheUpdated = Set-AzureRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName -MaxMemoryPolicy AllKeysLRU + + Assert-AreEqual $cacheName $cacheUpdated.Name + Assert-AreEqual $location $cacheUpdated.Location + Assert-AreEqual "Microsoft.Cache/Redis" $cacheUpdated.Type + Assert-AreEqual $resourceGroupName $cacheUpdated.ResourceGroupName + + Assert-AreEqual 6379 $cacheUpdated.Port + Assert-AreEqual 6380 $cacheUpdated.SslPort + Assert-AreEqual "succeeded" $cacheUpdated.ProvisioningState + Assert-AreEqual "2.8" $cacheUpdated.RedisVersion + Assert-AreEqual "250MB" $cacheUpdated.Size + Assert-AreEqual "Basic" $cacheUpdated.Sku + Assert-AreEqual "AllKeysLRU" $cacheUpdated.MaxMemoryPolicy.Replace("-", "") + + Assert-NotNull $cacheUpdated.PrimaryKey "PrimaryKey do not exists" + Assert-NotNull $cacheUpdated.SecondaryKey "SecondaryKey do not exists" + + # List all cache in resource group + $cachesInResourceGroup = Get-AzureRedisCache -ResourceGroupName $resourceGroupName + Assert-True {$cachesInResourceGroup.Count -ge 1} + + $found = 0 + for ($i = 0; $i -lt $cachesInResourceGroup.Count; $i++) + { + if ($cachesInResourceGroup[$i].Name -eq $cacheName) + { + $found = 1 + Assert-AreEqual $location $cachesInResourceGroup[$i].Location + Assert-AreEqual "Microsoft.Cache/Redis" $cachesInResourceGroup[$i].Type + Assert-AreEqual $resourceGroupName $cachesInResourceGroup[$i].ResourceGroupName + + Assert-AreEqual 6379 $cachesInResourceGroup[$i].Port + Assert-AreEqual 6380 $cachesInResourceGroup[$i].SslPort + Assert-AreEqual "succeeded" $cachesInResourceGroup[$i].ProvisioningState + Assert-AreEqual "2.8" $cachesInResourceGroup[$i].RedisVersion + Assert-AreEqual "250MB" $cachesInResourceGroup[$i].Size + Assert-AreEqual "Basic" $cachesInResourceGroup[$i].Sku + break + } + } + Assert-True {$found -eq 1} "Cache created earlier is not found." + + # List all cache in subscription + $cachesInSubscription = Get-AzureRedisCache + Assert-True {$cachesInSubscription.Count -ge 1} + Assert-True {$cachesInSubscription.Count -ge $cachesInResourceGroup.Count} + + $found = 0 + for ($i = 0; $i -lt $cachesInSubscription.Count; $i++) + { + if ($cachesInSubscription[$i].Name -eq $cacheName) + { + $found = 1 + Assert-AreEqual $location $cachesInSubscription[$i].Location + Assert-AreEqual "Microsoft.Cache/Redis" $cachesInSubscription[$i].Type + Assert-AreEqual $resourceGroupName $cachesInSubscription[$i].ResourceGroupName + + Assert-AreEqual 6379 $cachesInSubscription[$i].Port + Assert-AreEqual 6380 $cachesInSubscription[$i].SslPort + Assert-AreEqual "succeeded" $cachesInSubscription[$i].ProvisioningState + Assert-AreEqual "2.8" $cachesInSubscription[$i].RedisVersion + Assert-AreEqual "250MB" $cachesInSubscription[$i].Size + Assert-AreEqual "Basic" $cachesInSubscription[$i].Sku + break + } + } + Assert-True {$found -eq 1} "Cache created earlier is not found." + + # Get cache keys + $cacheKeysBeforeUpdate = Get-AzureRedisCacheKey -ResourceGroupName $resourceGroupName -Name $cacheName + Assert-NotNull $cacheKeysBeforeUpdate.PrimaryKey "PrimaryKey do not exists" + Assert-NotNull $cacheKeysBeforeUpdate.SecondaryKey "SecondaryKey do not exists" + + # Regenerate primary key + $cacheKeysAfterUpdate = New-AzureRedisCacheKey -ResourceGroupName $resourceGroupName -Name $cacheName -KeyType Primary -Force + Assert-AreEqual $cacheKeysBeforeUpdate.SecondaryKey $cacheKeysAfterUpdate.SecondaryKey + Assert-AreNotEqual $cacheKeysBeforeUpdate.PrimaryKey $cacheKeysAfterUpdate.PrimaryKey + + # Delete cache + Assert-True {Remove-AzureRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName -Force -PassThru} "Remove cache failed." +} + + +<# +.SYNOPSIS +Tests set redis cache that do not exists. +#> +function Test-SetNonExistingRedisCacheTest +{ + # Setup + # resource group should exists + $resourceGroupName = "redisruntimetestrg" + $cacheName = "NonExistingRedisCache" + $location = "North Central US" + + # Creating Cache + Assert-Throws {Set-AzureRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName -MaxMemoryPolicy AllKeysLRU} +} + +<# +.SYNOPSIS +Tests creating redis cache that already exists. +#> +function Test-CreateExistingRedisCacheTest +{ + # Setup + # resource group should exists + $resourceGroupName = "redisruntimetestrg" + $cacheName = "powershell004" + $location = "North Central US" + + # Creating Cache + Assert-ThrowsContains {New-AzureRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName -Location $location -Size 250MB -Sku Standard} "already exists" +} + +<# +.SYNOPSIS +Tests redis cache. +#> +function Test-RedisCachePipeline +{ + # Setup + # resource group should exists + $resourceGroupName = "redisruntimetestrg" + $cacheName = "powershelltestpipe" + $location = "North Central US" + + # Creating Cache + $cacheCreated = New-AzureRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName -Location $location -Size 250MB -Sku Basic + + Assert-AreEqual $cacheName $cacheCreated.Name + Assert-AreEqual $location $cacheCreated.Location + Assert-AreEqual "Microsoft.Cache/Redis" $cacheCreated.Type + Assert-AreEqual $resourceGroupName $cacheCreated.ResourceGroupName + + Assert-AreEqual 6379 $cacheCreated.Port + Assert-AreEqual 6380 $cacheCreated.SslPort + Assert-AreEqual "creating" $cacheCreated.ProvisioningState + Assert-AreEqual "2.8" $cacheCreated.RedisVersion + Assert-AreEqual "250MB" $cacheCreated.Size + Assert-AreEqual "Basic" $cacheCreated.Sku + + Assert-NotNull $cacheCreated.PrimaryKey "PrimaryKey do not exists" + Assert-NotNull $cacheCreated.SecondaryKey "SecondaryKey do not exists" + + # In loop to check if cache exists + for ($i = 0; $i -le 60; $i++) + { + [Microsoft.WindowsAzure.Commands.Utilities.Common.TestMockSupport]::Delay(30000) + $cacheGet = Get-AzureRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName + if ([string]::Compare("succeeded", $cacheGet[0].ProvisioningState, $True) -eq 0) + { + Assert-AreEqual $cacheName $cacheGet[0].Name + Assert-AreEqual $location $cacheGet[0].Location + Assert-AreEqual "Microsoft.Cache/Redis" $cacheGet[0].Type + Assert-AreEqual $resourceGroupName $cacheGet[0].ResourceGroupName + + Assert-AreEqual 6379 $cacheGet[0].Port + Assert-AreEqual 6380 $cacheGet[0].SslPort + Assert-AreEqual "succeeded" $cacheGet[0].ProvisioningState + Assert-AreEqual "2.8" $cacheGet[0].RedisVersion + Assert-AreEqual "250MB" $cacheGet[0].Size + Assert-AreEqual "Basic" $cacheGet[0].Sku + break + } + Assert-False {$i -eq 60} "Cache is not in succeeded state even after 30 min." + } + + # Updating Cache using pipeline + Get-AzureRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName | Set-AzureRedisCache -MaxMemoryPolicy AllKeysRandom + $cacheUpdatedPiped = Get-AzureRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName + + Assert-AreEqual $cacheName $cacheUpdatedPiped.Name + Assert-AreEqual $location $cacheUpdatedPiped.Location + Assert-AreEqual "Microsoft.Cache/Redis" $cacheUpdatedPiped.Type + Assert-AreEqual $resourceGroupName $cacheUpdatedPiped.ResourceGroupName + + Assert-AreEqual 6379 $cacheUpdatedPiped.Port + Assert-AreEqual 6380 $cacheUpdatedPiped.SslPort + Assert-AreEqual "succeeded" $cacheUpdatedPiped.ProvisioningState + Assert-AreEqual "2.8" $cacheUpdatedPiped.RedisVersion + Assert-AreEqual "250MB" $cacheUpdatedPiped.Size + Assert-AreEqual "Basic" $cacheUpdatedPiped.Sku + Assert-AreEqual "AllKeysRandom" $cacheUpdatedPiped.MaxMemoryPolicy.Replace("-", "") + + # Get cache keys + $cacheKeysBeforeUpdate = Get-AzureRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName | Get-AzureRedisCacheKey + Assert-NotNull $cacheKeysBeforeUpdate.PrimaryKey "PrimaryKey do not exists" + Assert-NotNull $cacheKeysBeforeUpdate.SecondaryKey "SecondaryKey do not exists" + + # Regenerate primary key + $cacheKeysAfterUpdate = Get-AzureRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName | New-AzureRedisCacheKey -KeyType Primary -Force + Assert-AreEqual $cacheKeysBeforeUpdate.SecondaryKey $cacheKeysAfterUpdate.SecondaryKey + Assert-AreNotEqual $cacheKeysBeforeUpdate.PrimaryKey $cacheKeysAfterUpdate.PrimaryKey + + # Delete cache + Assert-True {Get-AzureRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName | Remove-AzureRedisCache -Force -PassThru} "Remove cache failed." +} \ No newline at end of file diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/ScenarioTests/RedisCacheTestsBase.cs b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/ScenarioTests/RedisCacheTestsBase.cs new file mode 100644 index 000000000000..50e707b8874d --- /dev/null +++ b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/ScenarioTests/RedisCacheTestsBase.cs @@ -0,0 +1,62 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests +{ + using System; + using Microsoft.WindowsAzure.Commands.ScenarioTest; + using Microsoft.WindowsAzure.Commands.Utilities.Common; + using Microsoft.WindowsAzure.Testing; + using Microsoft.Azure.Management.Redis; + + public abstract class RedisCacheTestsBase : IDisposable + { + private EnvironmentSetupHelper helper; + + protected RedisCacheTestsBase() + { + helper = new EnvironmentSetupHelper(); + } + + protected void SetupManagementClients() + { + var redisManagementClient = GetRedisManagementClient(); + helper.SetupManagementClients(redisManagementClient); + } + + protected void RunPowerShellTest(params string[] scripts) + { + using (UndoContext context = UndoContext.Current) + { + context.Start(TestUtilities.GetCallingClass(2), TestUtilities.GetCurrentMethodName(2)); + + SetupManagementClients(); + + helper.SetupEnvironment(AzureModule.AzureResourceManager); + helper.SetupModules(AzureModule.AzureResourceManager, "ScenarioTests\\" + this.GetType().Name + ".ps1"); + + helper.RunPowerShellTest(scripts); + } + } + + protected RedisManagementClient GetRedisManagementClient() + { + return TestBase.GetServiceClient(new CSMTestEnvironmentFactory()); + } + + public void Dispose() + { + } + } +} diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/SessionRecords/Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests/TestCreateExistingRedisCacheTest.json b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/SessionRecords/Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests/TestCreateExistingRedisCacheTest.json new file mode 100644 index 000000000000..d7515166f47a --- /dev/null +++ b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/SessionRecords/Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests/TestCreateExistingRedisCacheTest.json @@ -0,0 +1,52 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershell004?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershell004\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershell004\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershell004.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "e735160c-191a-49cc-8c31-342652cb4a6e" + ], + "x-rp-server-mvid": [ + "dc26dc3b-f07f-422e-aca4-1066869e2fd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31695" + ], + "x-ms-correlation-request-id": [ + "683814f8-7098-4194-9f09-5d7ea6d1fe78" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T185910Z:683814f8-7098-4194-9f09-5d7ea6d1fe78" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 18:59:09 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "f435d8e1-f7a0-4f79-adf7-b1a564728140" + } +} \ No newline at end of file diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/SessionRecords/Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests/TestRedisCache.json b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/SessionRecords/Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests/TestRedisCache.json new file mode 100644 index 000000000000..71cfd9d1007a --- /dev/null +++ b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/SessionRecords/Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests/TestRedisCache.json @@ -0,0 +1,1582 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"Resource not found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "7ba04f5e-b669-4243-b633-e5b427af2c31" + ], + "x-ms-correlation-request-id": [ + "7ba04f5e-b669-4243-b633-e5b427af2c31" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T185913Z:7ba04f5e-b669-4243-b633-e5b427af2c31" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 18:59:13 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltest\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltest.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "5df3e628-1275-45f8-897d-3c24c2ee7722" + ], + "x-rp-server-mvid": [ + "dc26dc3b-f07f-422e-aca4-1066869e2fd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31689" + ], + "x-ms-correlation-request-id": [ + "999a721f-b42f-42c2-b515-8d7b8a39aaf9" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T185957Z:999a721f-b42f-42c2-b515-8d7b8a39aaf9" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 18:59:57 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltest\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltest.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "abef01c1-84d5-43bb-a30b-6c84c74602f7" + ], + "x-rp-server-mvid": [ + "dc26dc3b-f07f-422e-aca4-1066869e2fd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31681" + ], + "x-ms-correlation-request-id": [ + "98378974-6837-4e2e-83b5-3a866e1703e3" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T190028Z:98378974-6837-4e2e-83b5-3a866e1703e3" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 19:00:27 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltest\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltest.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "c12807b2-8972-4d0b-bfac-ee9156ac7afe" + ], + "x-rp-server-mvid": [ + "dc26dc3b-f07f-422e-aca4-1066869e2fd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31670" + ], + "x-ms-correlation-request-id": [ + "92a36d7c-0ed8-45f6-bfd9-a0588a6ea222" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T190058Z:92a36d7c-0ed8-45f6-bfd9-a0588a6ea222" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 19:00:57 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltest\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltest.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "7477c5a6-703a-400d-8e82-1c02ed36e4c1" + ], + "x-rp-server-mvid": [ + "dc26dc3b-f07f-422e-aca4-1066869e2fd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31663" + ], + "x-ms-correlation-request-id": [ + "424d9d96-915a-47e6-8763-271650803ba7" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T190128Z:424d9d96-915a-47e6-8763-271650803ba7" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 19:01:28 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltest\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltest.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "d247a0b5-2b75-4066-bed3-508db427a128" + ], + "x-rp-server-mvid": [ + "dc26dc3b-f07f-422e-aca4-1066869e2fd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31654" + ], + "x-ms-correlation-request-id": [ + "03c342b9-51c7-4f74-aa59-dc5b47c72323" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T190159Z:03c342b9-51c7-4f74-aa59-dc5b47c72323" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 19:01:58 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltest\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltest.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "398e5101-d62d-4115-b930-3f2d46b52ad8" + ], + "x-rp-server-mvid": [ + "dc26dc3b-f07f-422e-aca4-1066869e2fd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31647" + ], + "x-ms-correlation-request-id": [ + "8c64316b-b9ae-4ff3-aa5e-422150d43401" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T190229Z:8c64316b-b9ae-4ff3-aa5e-422150d43401" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 19:02:28 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltest\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltest.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "5bcf01af-02fd-4438-b20c-2e3684605225" + ], + "x-rp-server-mvid": [ + "dc26dc3b-f07f-422e-aca4-1066869e2fd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31634" + ], + "x-ms-correlation-request-id": [ + "1aa3df7b-99f9-460e-a59f-f15b6c2babad" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T190259Z:1aa3df7b-99f9-460e-a59f-f15b6c2babad" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 19:02:59 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltest\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltest.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "d56e5963-9b93-4c03-8144-48f7accc045e" + ], + "x-rp-server-mvid": [ + "dc26dc3b-f07f-422e-aca4-1066869e2fd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31625" + ], + "x-ms-correlation-request-id": [ + "b5d9b4f3-62d8-4b9a-8a12-c6382ad5fc78" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T190330Z:b5d9b4f3-62d8-4b9a-8a12-c6382ad5fc78" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 19:03:30 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltest\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltest.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "6f961c05-7dc2-4c5c-a9ad-29a7d269ae49" + ], + "x-rp-server-mvid": [ + "dc26dc3b-f07f-422e-aca4-1066869e2fd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31617" + ], + "x-ms-correlation-request-id": [ + "ad4b3888-2bee-4447-96c6-8c66cc886350" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T190400Z:ad4b3888-2bee-4447-96c6-8c66cc886350" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 19:04:00 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltest\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltest.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "aa3b8c34-5df1-43f5-b168-23b101b5500a" + ], + "x-rp-server-mvid": [ + "dc26dc3b-f07f-422e-aca4-1066869e2fd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31613" + ], + "x-ms-correlation-request-id": [ + "ee14ea5f-a844-44c5-9209-5fc420342381" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T190430Z:ee14ea5f-a844-44c5-9209-5fc420342381" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 19:04:30 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltest\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltest.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "4149cd78-e4b2-4727-a7db-239f9c26a706" + ], + "x-rp-server-mvid": [ + "dc26dc3b-f07f-422e-aca4-1066869e2fd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31602" + ], + "x-ms-correlation-request-id": [ + "160bfbb7-7b33-45e8-9756-f653eef91a5b" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T190501Z:160bfbb7-7b33-45e8-9756-f653eef91a5b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 19:05:00 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltest\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltest.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "e9a200d2-6d08-4def-a737-9a211b058236" + ], + "x-rp-server-mvid": [ + "dc26dc3b-f07f-422e-aca4-1066869e2fd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31594" + ], + "x-ms-correlation-request-id": [ + "9a3a7243-5d1a-46d1-8c14-c8f43080e061" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T190531Z:9a3a7243-5d1a-46d1-8c14-c8f43080e061" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 19:05:31 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltest\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltest.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "370e1a35-1f1e-420a-b13b-71c9c0dea4a8" + ], + "x-rp-server-mvid": [ + "dc26dc3b-f07f-422e-aca4-1066869e2fd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31583" + ], + "x-ms-correlation-request-id": [ + "8c5bfcd9-576b-4759-a202-e053119e1a25" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T190602Z:8c5bfcd9-576b-4759-a202-e053119e1a25" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 19:06:01 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltest\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltest.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "96155fce-43f4-4703-ac05-409002bacb0d" + ], + "x-rp-server-mvid": [ + "dc26dc3b-f07f-422e-aca4-1066869e2fd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31573" + ], + "x-ms-correlation-request-id": [ + "04b67af9-6941-4508-81d0-6dfc90cc71cb" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T190632Z:04b67af9-6941-4508-81d0-6dfc90cc71cb" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 19:06:32 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltest\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltest.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "3876133c-6f19-4aee-a010-a54911203c9a" + ], + "x-rp-server-mvid": [ + "dc26dc3b-f07f-422e-aca4-1066869e2fd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31559" + ], + "x-ms-correlation-request-id": [ + "42424a5e-378d-4e92-86e0-c0ffcb308775" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T190702Z:42424a5e-378d-4e92-86e0-c0ffcb308775" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 19:07:02 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltest\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltest.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "cc8e13d5-b115-43c2-aeb7-c2044cab6b5d" + ], + "x-rp-server-mvid": [ + "dc26dc3b-f07f-422e-aca4-1066869e2fd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31547" + ], + "x-ms-correlation-request-id": [ + "56a44900-bf7f-4aad-9826-ff414affa477" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T190733Z:56a44900-bf7f-4aad-9826-ff414affa477" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 19:07:32 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltest\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltest.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "16ac12e1-0e5b-4f19-ba7f-a9162de41c83" + ], + "x-rp-server-mvid": [ + "dc26dc3b-f07f-422e-aca4-1066869e2fd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31538" + ], + "x-ms-correlation-request-id": [ + "2f9808c0-775f-4990-9037-095e7009b3db" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T190803Z:2f9808c0-775f-4990-9037-095e7009b3db" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 19:08:03 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltest\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltest.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "8e67e23d-46d6-447c-a59b-8c67593cb92d" + ], + "x-rp-server-mvid": [ + "dc26dc3b-f07f-422e-aca4-1066869e2fd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31534" + ], + "x-ms-correlation-request-id": [ + "df2c7c3b-accb-4472-91bf-c6ab144eda24" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T190833Z:df2c7c3b-accb-4472-91bf-c6ab144eda24" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 19:08:33 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltest\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltest.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "4936359b-d481-4d80-9037-aac73f661465" + ], + "x-rp-server-mvid": [ + "dc26dc3b-f07f-422e-aca4-1066869e2fd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31529" + ], + "x-ms-correlation-request-id": [ + "8b58289b-581a-4481-9bde-c6443d1b9f63" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T190913Z:8b58289b-581a-4481-9bde-c6443d1b9f63" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 19:09:12 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltest\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltest.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "361c4521-6cb7-41c4-94d7-6b542ae9a898" + ], + "x-rp-server-mvid": [ + "dc26dc3b-f07f-422e-aca4-1066869e2fd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31519" + ], + "x-ms-correlation-request-id": [ + "faaa61a6-c1ee-46ba-acbd-8d661d53b57b" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T190943Z:faaa61a6-c1ee-46ba-acbd-8d661d53b57b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 19:09:42 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltest\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltest.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "c054058d-1c39-4868-ad2f-61c9b40e1bea" + ], + "x-rp-server-mvid": [ + "dc26dc3b-f07f-422e-aca4-1066869e2fd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31517" + ], + "x-ms-correlation-request-id": [ + "56a2100b-92e7-4a80-a23f-ff1ed0a8f75c" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T191013Z:56a2100b-92e7-4a80-a23f-ff1ed0a8f75c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 19:10:13 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltest\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltest.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "bebceddd-0aec-4917-9fdf-82b18172b681" + ], + "x-rp-server-mvid": [ + "dc26dc3b-f07f-422e-aca4-1066869e2fd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31515" + ], + "x-ms-correlation-request-id": [ + "d91902f1-c782-4af2-b6b3-034554e42fc9" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T191044Z:d91902f1-c782-4af2-b6b3-034554e42fc9" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 19:10:43 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltest\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltest.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "3dd8155b-47d0-4416-9b1b-d3e2c23ec9a0" + ], + "x-rp-server-mvid": [ + "dc26dc3b-f07f-422e-aca4-1066869e2fd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31512" + ], + "x-ms-correlation-request-id": [ + "d56af8ba-23d2-4812-9986-e5d8e473493f" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T191114Z:d56af8ba-23d2-4812-9986-e5d8e473493f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 19:11:14 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltest\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltest.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "e9544922-bf9c-402f-90bd-506d349ea40b" + ], + "x-rp-server-mvid": [ + "dc26dc3b-f07f-422e-aca4-1066869e2fd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31505" + ], + "x-ms-correlation-request-id": [ + "f1d3c44f-5546-4c30-97d3-b2d6860db811" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T191145Z:f1d3c44f-5546-4c30-97d3-b2d6860db811" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 19:11:44 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltest\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltest.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "b14c8345-4a8a-4218-b6ca-173ef9500879" + ], + "x-rp-server-mvid": [ + "dc26dc3b-f07f-422e-aca4-1066869e2fd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31502" + ], + "x-ms-correlation-request-id": [ + "bd4bfff1-f1c8-4858-9844-7c48b6eb6108" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T191215Z:bd4bfff1-f1c8-4858-9844-7c48b6eb6108" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 19:12:15 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltest\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltest.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "0bc49c50-00cc-406d-9077-f99de1e8e935" + ], + "x-rp-server-mvid": [ + "dc26dc3b-f07f-422e-aca4-1066869e2fd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31499" + ], + "x-ms-correlation-request-id": [ + "c9ce1a5e-52a3-4001-a910-577f668be444" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T191245Z:c9ce1a5e-52a3-4001-a910-577f668be444" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 19:12:44 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltest\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltest.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "e8c1cd59-bc24-405c-b0fa-63e1b4f2da95" + ], + "x-rp-server-mvid": [ + "dc26dc3b-f07f-422e-aca4-1066869e2fd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31498" + ], + "x-ms-correlation-request-id": [ + "ce3805f7-8c59-4fbe-ae7d-1ecbdc66d83f" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T191246Z:ce3805f7-8c59-4fbe-ae7d-1ecbdc66d83f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 19:12:46 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest?api-version=2014-04-01-preview", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"North Central US\",\r\n \"properties\": {\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n }\r\n }\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltest\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": {\r\n \"primaryKey\": \"Volm+52PiuCx+ZIdE9saB+4QU4GIbZmN98eWk0crC2I=\",\r\n \"secondaryKey\": \"rAalNX8nHtyXWlM7pAIAMvUhJhUdsLoLAXPbAMvehC4=\"\r\n },\r\n \"hostName\": \"powershelltest.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "50c95d56-6d85-404f-a2b0-96623dbe5ee8" + ], + "x-rp-server-mvid": [ + "dc26dc3b-f07f-422e-aca4-1066869e2fd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "390a09ea-9988-40e9-ac2f-afc23d710d40" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T185927Z:390a09ea-9988-40e9-ac2f-afc23d710d40" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 18:59:27 GMT" + ], + "Location": [ + "https://westus.cache.azure-test.net:10225/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest?api-version=2014-04-01-preview", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"North Central US\",\r\n \"properties\": {\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": \"AllKeysLRU\"\r\n }\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltest\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": \"AllKeysLRU\",\r\n \"accessKeys\": {\r\n \"primaryKey\": \"Volm+52PiuCx+ZIdE9saB+4QU4GIbZmN98eWk0crC2I=\",\r\n \"secondaryKey\": \"rAalNX8nHtyXWlM7pAIAMvUhJhUdsLoLAXPbAMvehC4=\"\r\n },\r\n \"hostName\": \"powershelltest.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "8fa348b3-3fb9-4b5a-aa29-25357c48c36e" + ], + "x-rp-server-mvid": [ + "dc26dc3b-f07f-422e-aca4-1066869e2fd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "7aa1b8bb-b7b5-4910-85ca-42157b812f66" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T191248Z:7aa1b8bb-b7b5-4910-85ca-42157b812f66" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 19:12:48 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/redisruntimetest004\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"redisruntimetest004\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"redisruntimetest004.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/quotacheck\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"quotacheck\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"quotacheck.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/test004\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"test004\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"test004.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershell004\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershell004\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershell004.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltest\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": \"AllKeysLRU\",\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltest.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/redisruntimetest006\",\r\n \"location\": \"North Europe\",\r\n \"name\": \"redisruntimetest006\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"redisruntimetest006.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-original-request-ids": [ + "08e795a9-a3b3-487f-bb7b-3c65189dcad2", + "07b55e49-8f3b-4311-92aa-1584bcf2a2fb" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31497" + ], + "x-ms-request-id": [ + "f84b74be-3bd0-4f58-85c9-245de24877c6" + ], + "x-ms-correlation-request-id": [ + "f84b74be-3bd0-4f58-85c9-245de24877c6" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T191248Z:f84b74be-3bd0-4f58-85c9-245de24877c6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 19:12:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/providers/Microsoft.Cache/Redis/?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/redisruntimetest004\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"redisruntimetest004\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"redisruntimetest004.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/quotacheck\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"quotacheck\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"quotacheck.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/test004\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"test004\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"test004.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/hydra19407/providers/Microsoft.Cache/Redis/hydracache1\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"hydracache1\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"hydracache1.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershell004\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershell004\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershell004.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltest\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": \"AllKeysLRU\",\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltest.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/redisruntimetest006\",\r\n \"location\": \"North Europe\",\r\n \"name\": \"redisruntimetest006\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"redisruntimetest006.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-original-request-ids": [ + "2f4dda3a-8746-4bb3-99c1-faf1393b9c6e", + "63071839-cf3f-46f7-ac62-875dd22cf6da" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31496" + ], + "x-ms-request-id": [ + "30cea84b-b127-42ce-95e3-bd1e7530a7b2" + ], + "x-ms-correlation-request-id": [ + "30cea84b-b127-42ce-95e3-bd1e7530a7b2" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T191249Z:30cea84b-b127-42ce-95e3-bd1e7530a7b2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 19:12:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest/listKeys?api-version=2014-04-01-preview", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"Volm+52PiuCx+ZIdE9saB+4QU4GIbZmN98eWk0crC2I=\",\r\n \"secondaryKey\": \"rAalNX8nHtyXWlM7pAIAMvUhJhUdsLoLAXPbAMvehC4=\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "c12e65bc-254f-4337-b8cc-af00d81a72c0" + ], + "x-rp-server-mvid": [ + "dc26dc3b-f07f-422e-aca4-1066869e2fd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "57e8a1fd-fa26-4911-a0bb-9a57d1d6c77b" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T191249Z:57e8a1fd-fa26-4911-a0bb-9a57d1d6c77b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 19:12:49 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest/listKeys?api-version=2014-04-01-preview", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"VUzHWnw1+awZkxtalwsSye44wZ7Ce/K+TxuIX7SQxBc=\",\r\n \"secondaryKey\": \"rAalNX8nHtyXWlM7pAIAMvUhJhUdsLoLAXPbAMvehC4=\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "1d096012-d323-44d4-8a5c-a2aa7080bb16" + ], + "x-rp-server-mvid": [ + "dc26dc3b-f07f-422e-aca4-1066869e2fd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "839e7e1f-e172-4cc9-9d8e-d2a3b1a6e999" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T191250Z:839e7e1f-e172-4cc9-9d8e-d2a3b1a6e999" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 19:12:50 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest/regenerateKey?api-version=2014-04-01-preview", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"keyType\": \"Primary\"\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"VUzHWnw1+awZkxtalwsSye44wZ7Ce/K+TxuIX7SQxBc=\",\r\n \"secondaryKey\": \"rAalNX8nHtyXWlM7pAIAMvUhJhUdsLoLAXPbAMvehC4=\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "b88d9140-5825-4631-a8ab-5d67b4271ea5" + ], + "x-rp-server-mvid": [ + "dc26dc3b-f07f-422e-aca4-1066869e2fd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "fedbf8d4-8d11-4db9-83ed-153d00f827de" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T191250Z:fedbf8d4-8d11-4db9-83ed-153d00f827de" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 19:12:50 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltest?api-version=2014-04-01-preview", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "62c3e9a5-bb1f-4a38-8268-eb6d977dbc97" + ], + "x-rp-server-mvid": [ + "dc26dc3b-f07f-422e-aca4-1066869e2fd6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "313d0551-fa3b-4489-9de0-69c0d464b6ef" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T191253Z:313d0551-fa3b-4489-9de0-69c0d464b6ef" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 19:12:52 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "f435d8e1-f7a0-4f79-adf7-b1a564728140" + } +} \ No newline at end of file diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/SessionRecords/Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests/TestRedisCachePipeline.json b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/SessionRecords/Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests/TestRedisCachePipeline.json new file mode 100644 index 000000000000..1d46f546ab55 --- /dev/null +++ b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/SessionRecords/Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests/TestRedisCachePipeline.json @@ -0,0 +1,1712 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"Resource not found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "78c77e55-1f8a-4d92-9056-9e6151b9a5ec" + ], + "x-ms-correlation-request-id": [ + "78c77e55-1f8a-4d92-9056-9e6151b9a5ec" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T193722Z:78c77e55-1f8a-4d92-9056-9e6151b9a5ec" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:37:21 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltestpipe\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltestpipe.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "6bb05f5d-64b6-441b-b8fa-ea6e271c2dfe" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31732" + ], + "x-ms-correlation-request-id": [ + "8d2d900a-3017-4fc2-8f0e-4b41158c9c08" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T193759Z:8d2d900a-3017-4fc2-8f0e-4b41158c9c08" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:37:59 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltestpipe\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltestpipe.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "b38da915-bc96-4c4c-b2ba-8f78e350e0ad" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31728" + ], + "x-ms-correlation-request-id": [ + "b543a394-280d-4e79-9dd1-e54c7ff73ef3" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T193829Z:b543a394-280d-4e79-9dd1-e54c7ff73ef3" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:38:29 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltestpipe\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltestpipe.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "99c8814d-1390-4f8a-8198-a20185ec45a6" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31727" + ], + "x-ms-correlation-request-id": [ + "cc85a8bc-b8f8-47a7-8352-399af5b30f0a" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T193859Z:cc85a8bc-b8f8-47a7-8352-399af5b30f0a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:38:59 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltestpipe\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltestpipe.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "e6287062-76f3-4d99-b66b-628c6a8c5c85" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31718" + ], + "x-ms-correlation-request-id": [ + "d36d8450-2f9d-430e-af67-b352c083c55d" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T193930Z:d36d8450-2f9d-430e-af67-b352c083c55d" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:39:30 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltestpipe\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltestpipe.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "67f89835-5d77-4943-b02d-95f7aa52d571" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31717" + ], + "x-ms-correlation-request-id": [ + "fba21f1f-a3c0-4f77-8518-16b44b8607a9" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T194000Z:fba21f1f-a3c0-4f77-8518-16b44b8607a9" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:40:00 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltestpipe\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltestpipe.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "0d8b626a-ed3e-4ef5-bf9c-e9e7b2521770" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31713" + ], + "x-ms-correlation-request-id": [ + "ba5f8bc1-9b4c-498b-b79b-53113d67dfa1" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T194030Z:ba5f8bc1-9b4c-498b-b79b-53113d67dfa1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:40:30 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltestpipe\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltestpipe.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "c27842cb-1f27-4c54-9774-8075c19ee343" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31712" + ], + "x-ms-correlation-request-id": [ + "9ce22ef9-82f1-4732-b2c0-85aef129c915" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T194101Z:9ce22ef9-82f1-4732-b2c0-85aef129c915" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:41:01 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltestpipe\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltestpipe.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "32190888-e432-4cbb-ba6f-af7005b7a1a3" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31708" + ], + "x-ms-correlation-request-id": [ + "63465e8d-5d95-4d27-a44a-cbdb331a53b2" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T194131Z:63465e8d-5d95-4d27-a44a-cbdb331a53b2" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:41:30 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltestpipe\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltestpipe.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "71af929d-b471-4872-9dfb-430505958f24" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31707" + ], + "x-ms-correlation-request-id": [ + "10361cfb-3932-4d52-a2ae-9f6fbaacf074" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T194201Z:10361cfb-3932-4d52-a2ae-9f6fbaacf074" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:42:01 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltestpipe\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltestpipe.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "c41f4134-a0e4-4221-85e6-3f862820a55b" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31700" + ], + "x-ms-correlation-request-id": [ + "1d81f344-3234-4f29-a970-ed576ab4c48a" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T194232Z:1d81f344-3234-4f29-a970-ed576ab4c48a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:42:31 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltestpipe\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltestpipe.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "2ab510b0-a822-46e7-92c7-4c25f8a53d9c" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31699" + ], + "x-ms-correlation-request-id": [ + "4eacb36c-913a-4458-8efe-1a524082a6d1" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T194302Z:4eacb36c-913a-4458-8efe-1a524082a6d1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:43:01 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltestpipe\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltestpipe.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "4cd90860-de76-409f-b746-8d55b7033f4a" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31695" + ], + "x-ms-correlation-request-id": [ + "c31eaa57-bc18-4793-b309-3ecc614497d4" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T194332Z:c31eaa57-bc18-4793-b309-3ecc614497d4" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:43:32 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltestpipe\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltestpipe.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "27126cda-efa0-462a-91b3-0cb148a42caa" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31694" + ], + "x-ms-correlation-request-id": [ + "95ab33ff-8733-45ce-9d24-32795956af46" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T194402Z:95ab33ff-8733-45ce-9d24-32795956af46" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:44:02 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltestpipe\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltestpipe.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "e07cb2d8-928b-4982-8d42-ad7f85472f61" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31686" + ], + "x-ms-correlation-request-id": [ + "6817ee09-3572-4ec8-b7c8-f9b1663abd50" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T194433Z:6817ee09-3572-4ec8-b7c8-f9b1663abd50" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:44:32 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltestpipe\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltestpipe.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "9de136c8-999f-488b-b83b-706b4a8ac1e7" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31685" + ], + "x-ms-correlation-request-id": [ + "82b4abd8-a99e-47de-aab5-65701a470f4e" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T194503Z:82b4abd8-a99e-47de-aab5-65701a470f4e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:45:02 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltestpipe\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltestpipe.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "1934943a-8166-4d31-9004-2531046c9739" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31675" + ], + "x-ms-correlation-request-id": [ + "b0b5d5ba-0894-49bd-b7c5-d32e7d5e1697" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T194533Z:b0b5d5ba-0894-49bd-b7c5-d32e7d5e1697" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:45:33 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltestpipe\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltestpipe.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "d6290006-2504-4b31-985f-aa89b816484a" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31674" + ], + "x-ms-correlation-request-id": [ + "f53fab09-1ca6-4ed7-8513-de782c9d826d" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T194604Z:f53fab09-1ca6-4ed7-8513-de782c9d826d" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:46:03 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltestpipe\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltestpipe.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "e5a2ab89-e444-42ca-91a3-f95c5e7ba7c4" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31671" + ], + "x-ms-correlation-request-id": [ + "aaa788b1-b982-4ef9-aaac-e01ec397eea6" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T194634Z:aaa788b1-b982-4ef9-aaac-e01ec397eea6" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:46:33 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltestpipe\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltestpipe.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "801c0e10-d50a-4200-bdd3-a36d069b30ab" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31670" + ], + "x-ms-correlation-request-id": [ + "42d14999-76cb-48e8-af23-9156b90a5c74" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T194704Z:42d14999-76cb-48e8-af23-9156b90a5c74" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:47:04 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltestpipe\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltestpipe.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "75861043-a55b-4177-b666-1ca54f5cacc0" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31665" + ], + "x-ms-correlation-request-id": [ + "6185168d-ec0a-4967-a877-9cba36d38534" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T194734Z:6185168d-ec0a-4967-a877-9cba36d38534" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:47:34 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltestpipe\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltestpipe.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "427686ea-1c57-4d15-9ff2-a543a91a30d8" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31664" + ], + "x-ms-correlation-request-id": [ + "43cb671f-51f7-4f76-8245-a726be8d8274" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T194805Z:43cb671f-51f7-4f76-8245-a726be8d8274" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:48:04 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltestpipe\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltestpipe.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "d806ca8b-96fe-4b43-b544-9a85f24a4449" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31661" + ], + "x-ms-correlation-request-id": [ + "ba93abcb-c048-42ca-a176-20c405c5bca0" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T194835Z:ba93abcb-c048-42ca-a176-20c405c5bca0" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:48:35 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltestpipe\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltestpipe.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "5ce95886-b977-4912-956e-108aa61d404a" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31660" + ], + "x-ms-correlation-request-id": [ + "2690f23d-d546-42c6-a8f9-c75944bac76f" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T194905Z:2690f23d-d546-42c6-a8f9-c75944bac76f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:49:05 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltestpipe\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltestpipe.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "56b3649a-fc07-4b01-958a-d43b08291817" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31651" + ], + "x-ms-correlation-request-id": [ + "3c9625e4-f240-4e21-89e2-29440bf09493" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T194936Z:3c9625e4-f240-4e21-89e2-29440bf09493" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:49:35 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltestpipe\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltestpipe.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "c4e5c563-c8cb-4031-b64a-ec3e867dd809" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31650" + ], + "x-ms-correlation-request-id": [ + "0a3dc4e9-c1c6-41bd-8d8e-6bd5d95008f5" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T195006Z:0a3dc4e9-c1c6-41bd-8d8e-6bd5d95008f5" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:50:06 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltestpipe\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltestpipe.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "56bcf0e3-780d-4682-9f02-036c6c924261" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31649" + ], + "x-ms-correlation-request-id": [ + "194e0dc5-c279-49e8-b3b0-c38a6d813753" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T195006Z:194e0dc5-c279-49e8-b3b0-c38a6d813753" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:50:06 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltestpipe\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltestpipe.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "328e1126-9e2a-46db-8532-cd059f45faa5" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31648" + ], + "x-ms-correlation-request-id": [ + "55363515-a279-4b8f-bb3b-cb8db4bc9ad5" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T195006Z:55363515-a279-4b8f-bb3b-cb8db4bc9ad5" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:50:06 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltestpipe\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": \"AllKeysRandom\",\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltestpipe.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "96c4de42-3a84-48ea-b3b0-42f30bf89b02" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31647" + ], + "x-ms-correlation-request-id": [ + "f033834e-6993-4910-8baf-803406e5caeb" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T195008Z:f033834e-6993-4910-8baf-803406e5caeb" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:50:08 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltestpipe\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": \"AllKeysRandom\",\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltestpipe.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "40f0ab28-bec1-474f-a2c0-f2d415715917" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31646" + ], + "x-ms-correlation-request-id": [ + "adb792f6-6672-4efa-b4bc-ee1fb85f7b59" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T195008Z:adb792f6-6672-4efa-b4bc-ee1fb85f7b59" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:50:08 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltestpipe\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": \"AllKeysRandom\",\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltestpipe.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "f344781b-47b6-423c-9de9-39f09d7f8312" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31645" + ], + "x-ms-correlation-request-id": [ + "437ffab4-253a-411f-bfbd-6c4c96d08190" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T195009Z:437ffab4-253a-411f-bfbd-6c4c96d08190" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:50:09 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltestpipe\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": \"AllKeysRandom\",\r\n \"accessKeys\": null,\r\n \"hostName\": \"powershelltestpipe.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "49066942-49ca-49cd-a210-49e3a953033e" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31644" + ], + "x-ms-correlation-request-id": [ + "8e2a83b6-c82a-41e3-9675-c26657742d9f" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T195011Z:8e2a83b6-c82a-41e3-9675-c26657742d9f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:50:11 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"North Central US\",\r\n \"properties\": {\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n }\r\n }\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltestpipe\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Creating\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": null,\r\n \"accessKeys\": {\r\n \"primaryKey\": \"dNugej2ZYGORfQHh0+ZHmwZypwg2T/ZghwOPjO8/JE8=\",\r\n \"secondaryKey\": \"P8OWHsAiAyjrcpPbgP33gb+epH9sJaEl55/e1rt06zM=\"\r\n },\r\n \"hostName\": \"powershelltestpipe.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "e8a24b6a-4920-4a60-b4ce-f7ede7426aff" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1193" + ], + "x-ms-correlation-request-id": [ + "a93cba7e-e841-4719-8153-bc65b94de56e" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T193729Z:a93cba7e-e841-4719-8153-bc65b94de56e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:37:28 GMT" + ], + "Location": [ + "https://westus.cache.azure-test.net:10225/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"North Central US\",\r\n \"properties\": {\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": \"AllKeysRandom\"\r\n }\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe\",\r\n \"location\": \"North Central US\",\r\n \"name\": \"powershelltestpipe\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"redisVersion\": \"2.8\",\r\n \"sku\": {\r\n \"name\": \"Basic\",\r\n \"family\": \"C\",\r\n \"capacity\": 0\r\n },\r\n \"maxMemoryPolicy\": \"AllKeysRandom\",\r\n \"accessKeys\": {\r\n \"primaryKey\": \"dNugej2ZYGORfQHh0+ZHmwZypwg2T/ZghwOPjO8/JE8=\",\r\n \"secondaryKey\": \"P8OWHsAiAyjrcpPbgP33gb+epH9sJaEl55/e1rt06zM=\"\r\n },\r\n \"hostName\": \"powershelltestpipe.cache.icbbvt.windows-int.net\",\r\n \"port\": 6379,\r\n \"sslPort\": 6380\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "1e78e43b-c0f7-4b22-9ded-0af91a269b9e" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1192" + ], + "x-ms-correlation-request-id": [ + "185db716-b153-459e-99ca-99088ea0b2b5" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T195008Z:185db716-b153-459e-99ca-99088ea0b2b5" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:50:08 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe/listKeys?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZS9saXN0S2V5cz9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"dNugej2ZYGORfQHh0+ZHmwZypwg2T/ZghwOPjO8/JE8=\",\r\n \"secondaryKey\": \"P8OWHsAiAyjrcpPbgP33gb+epH9sJaEl55/e1rt06zM=\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "0c8f68df-b61e-4d08-b0a0-6123d1593ced" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1191" + ], + "x-ms-correlation-request-id": [ + "07bb3840-6bd4-48de-bd26-42b6a0d7fd91" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T195009Z:07bb3840-6bd4-48de-bd26-42b6a0d7fd91" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:50:08 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe/listKeys?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZS9saXN0S2V5cz9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"6VTNuaAMu6/JYM+4uIQiW5HxYI+ejE+qPdBhyRPLGRQ=\",\r\n \"secondaryKey\": \"P8OWHsAiAyjrcpPbgP33gb+epH9sJaEl55/e1rt06zM=\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "cb5f7b06-3f1b-4bd4-ae8c-e050ffbfc52f" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1189" + ], + "x-ms-correlation-request-id": [ + "e4d13e29-409f-42be-bde9-283829902286" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T195011Z:e4d13e29-409f-42be-bde9-283829902286" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:50:11 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe/regenerateKey?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZS9yZWdlbmVyYXRlS2V5P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"keyType\": \"Primary\"\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"6VTNuaAMu6/JYM+4uIQiW5HxYI+ejE+qPdBhyRPLGRQ=\",\r\n \"secondaryKey\": \"P8OWHsAiAyjrcpPbgP33gb+epH9sJaEl55/e1rt06zM=\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "90fcfbf6-75ab-4c0c-991e-845ff0db5031" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1190" + ], + "x-ms-correlation-request-id": [ + "0e77840a-41d6-4c19-a3e6-9a6a49c4b377" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T195010Z:0e77840a-41d6-4c19-a3e6-9a6a49c4b377" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:50:09 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/powershelltestpipe?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjQzNWQ4ZTEtZjdhMC00Zjc5LWFkZjctYjFhNTY0NzI4MTQwL3Jlc291cmNlR3JvdXBzL3JlZGlzcnVudGltZXRlc3RyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNhY2hlL1JlZGlzL3Bvd2Vyc2hlbGx0ZXN0cGlwZT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "b0435b31-d08a-45a2-9133-2e2a4f67cde4" + ], + "x-rp-server-mvid": [ + "7954f8a8-b513-4305-b6f8-46ad23dfe0a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1188" + ], + "x-ms-correlation-request-id": [ + "f3502fbe-e687-4f0d-a2cb-d9c3db015e03" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140924T195013Z:f3502fbe-e687-4f0d-a2cb-d9c3db015e03" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 24 Sep 2014 19:50:12 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "f435d8e1-f7a0-4f79-adf7-b1a564728140" + } +} \ No newline at end of file diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/SessionRecords/Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests/TestSetNonExistingRedisCacheTest.json b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/SessionRecords/Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests/TestSetNonExistingRedisCacheTest.json new file mode 100644 index 000000000000..88a4a58eb749 --- /dev/null +++ b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/SessionRecords/Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests/TestSetNonExistingRedisCacheTest.json @@ -0,0 +1,43 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/f435d8e1-f7a0-4f79-adf7-b1a564728140/resourceGroups/redisruntimetestrg/providers/Microsoft.Cache/Redis/NonExistingRedisCache?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Redis.RedisManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"Resource not found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "8e8de709-75e9-42ad-a8bb-72f33ac571dd" + ], + "x-ms-correlation-request-id": [ + "8e8de709-75e9-42ad-a8bb-72f33ac571dd" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20140916T191257Z:8e8de709-75e9-42ad-a8bb-72f33ac571dd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 16 Sep 2014 19:12:57 GMT" + ] + }, + "StatusCode": 404 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "f435d8e1-f7a0-4f79-adf7-b1a564728140" + } +} \ No newline at end of file diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache.Test/packages.config b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/packages.config new file mode 100644 index 000000000000..6b2f34bab13d --- /dev/null +++ b/src/ResourceManager/RedisCache/Commands.RedisCache.Test/packages.config @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/Commands.RedisCache.csproj b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands.RedisCache.csproj new file mode 100644 index 000000000000..934733fdf62f --- /dev/null +++ b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands.RedisCache.csproj @@ -0,0 +1,164 @@ + + + + + Debug + AnyCPU + {C972E3EF-4461-4758-BA31-93E0947B1253} + Library + Properties + Microsoft.Azure.Commands.RedisCache + Microsoft.Azure.Commands.RedisCache + v4.5 + 512 + + ..\..\..\ + true + /assemblyCompareMode:StrongNameIgnoringVersion + + + true + full + false + ..\..\..\Package\Debug\ResourceManager\AzureResourceManager\RedisCache + DEBUG;TRACE + prompt + 4 + true + true + false + + + ..\..\..\Package\Release\ResourceManager\AzureResourceManager\RedisCache + TRACE;SIGN + true + pdbonly + AnyCPU + bin\Release\Microsoft.Azure.Commands.RedisCache.dll.CodeAnalysisLog.xml + prompt + MinimumRecommendedRules.ruleset + ;$(ProgramFiles)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\Rule Sets + ;$(ProgramFiles)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\FxCop\Rules + true + true + MSSharedLibKey.snk + true + false + + + + False + ..\..\..\packages\Microsoft.Azure.Management.Redis.0.10.0-preview\lib\net40\Microsoft.Azure.Management.Redis.dll + + + False + ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll + + + False + ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + False + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + + + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + + + + + + + + + + + + + + + + + + + + + True + True + Resources.resx + + + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + {c60342b1-47d3-4a0e-8081-9b97ce60b7af} + Commands.Profile + + + + + Designer + Always + + + Designer + Always + + + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + + powershell.exe -ExecutionPolicy Unrestricted -File $(ProjectDir)\PostBuild.ps1 $(TargetDir) + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/GetAzureRedisCache.cs b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/GetAzureRedisCache.cs new file mode 100644 index 000000000000..1c60d101b3e0 --- /dev/null +++ b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/GetAzureRedisCache.cs @@ -0,0 +1,68 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.RedisCache +{ + using Microsoft.Azure.Commands.RedisCache.Models; + using Microsoft.Azure.Management.Redis.Models; + using System.Collections.Generic; + using System.Management.Automation; + + [Cmdlet(VerbsCommon.Get, "AzureRedisCache", DefaultParameterSetName = BaseParameterSetName), OutputType(typeof(List))] + public class GetAzureRedisCache : RedisCacheCmdletBase + { + internal const string BaseParameterSetName = "All In Subscription"; + internal const string ResourceGroupParameterSetName = "All In Resource Group"; + internal const string RedisCacheParameterSetName = "Specific Redis Cache"; + + [Parameter(ParameterSetName = ResourceGroupParameterSetName, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Name of resource group under whcih want to create cache.")] + [Parameter(ParameterSetName = RedisCacheParameterSetName, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Name of resource group under whcih want to create cache.")] + public string ResourceGroupName { get; set; } + + [Parameter(ParameterSetName = RedisCacheParameterSetName, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Name of redis cache.")] + public string Name { get; set; } + + public override void ExecuteCmdlet() + { + if (!string.IsNullOrEmpty(ResourceGroupName) && !string.IsNullOrEmpty(Name)) + { + // Get for single cache + WriteObject(new RedisCacheAttributes(CacheClient.GetCache(ResourceGroupName, Name), ResourceGroupName)); + } + else + { + // List all cache in given resource group if avaliable otherwise all cache in given subscription + RedisListResponse response = CacheClient.ListCaches(ResourceGroupName); + List list = new List(); + foreach (RedisResource resource in response.Value) + { + list.Add(new RedisCacheAttributes(resource, ResourceGroupName)); + } + WriteObject(list, true); + + while (!string.IsNullOrEmpty(response.NextLink)) + { + // List using next link + response = CacheClient.ListCachesUsingNextLink(response.NextLink); + list = new List(); + foreach (RedisResource resource in response.Value) + { + list.Add(new RedisCacheAttributes(resource, ResourceGroupName)); + } + WriteObject(list, true); + } + } + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/GetAzureRedisCacheKey.cs b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/GetAzureRedisCacheKey.cs new file mode 100644 index 000000000000..9479f7cbe612 --- /dev/null +++ b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/GetAzureRedisCacheKey.cs @@ -0,0 +1,40 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.RedisCache +{ + using Microsoft.Azure.Management.Redis.Models; + using System.Management.Automation; + + [Cmdlet(VerbsCommon.Get, "AzureRedisCacheKey"), OutputType(typeof(RedisAccessKeys))] + public class GetAzureRedisCacheKey : RedisCacheCmdletBase + { + [Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Name of resource group under whcih cache exists.")] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Name of redis cache.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + public override void ExecuteCmdlet() + { + RedisListKeysResponse keysResponse = CacheClient.GetAccessKeys(ResourceGroupName, Name); + WriteObject(new RedisAccessKeys() { + PrimaryKey = keysResponse.PrimaryKey, + SecondaryKey = keysResponse.SecondaryKey + }); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/NewAzureRedisCache.cs b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/NewAzureRedisCache.cs new file mode 100644 index 000000000000..4af4bf90a867 --- /dev/null +++ b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/NewAzureRedisCache.cs @@ -0,0 +1,116 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.RedisCache +{ + using Microsoft.Azure.Commands.RedisCache.Models; + using Microsoft.Azure.Commands.RedisCache.Properties; + using Microsoft.Azure.Management.Redis.Models; + using Microsoft.WindowsAzure; + using System.Management.Automation; + using SkuStrings = Microsoft.Azure.Management.Redis.Models.SkuName; + using MaxMemoryPolicyStrings = Microsoft.Azure.Management.Redis.Models.MaxMemoryPolicy; + + [Cmdlet(VerbsCommon.New, "AzureRedisCache"), OutputType(typeof(RedisCacheAttributesWithAccessKeys))] + public class NewAzureRedisCache : RedisCacheCmdletBase + { + [Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Name of resource group under which you want to create cache.")] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Name of redis cache.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Location where want to create cache.")] + [ValidateNotNullOrEmpty] + public string Location { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "Redis version.")] + public string RedisVersion { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "Size of redis cache. Valid values: C0, C1, C2, C3, C4, C5, C6, 250MB, 1GB, 2.5GB, 6GB, 13GB, 26GB, 53GB")] + [ValidateSet(SizeConverter.C0String, SizeConverter.C1String, SizeConverter.C2String, SizeConverter.C3String, SizeConverter.C4String, SizeConverter.C5String, + SizeConverter.C6String, SizeConverter.C0, SizeConverter.C1, SizeConverter.C2, SizeConverter.C3, SizeConverter.C4, SizeConverter.C5, SizeConverter.C6, IgnoreCase = false)] + public string Size { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "Wheather want to create Basic (1 Node) or Standard (2 Node) cache.")] + [ValidateSet(SkuStrings.Basic, SkuStrings.Standard, IgnoreCase = false)] + public string Sku { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "MaxMemoryPolicy property of redis cache. Valid values: AllKeysLRU, AllKeysRandom, NoEviction, VolatileLRU, VolatileRandom, VolatileTTL")] + [ValidateSet(MaxMemoryPolicyStrings.AllKeysLRU, MaxMemoryPolicyStrings.AllKeysRandom, MaxMemoryPolicyStrings.NoEviction, + MaxMemoryPolicyStrings.VolatileLRU, MaxMemoryPolicyStrings.VolatileRandom, MaxMemoryPolicyStrings.VolatileTTL, IgnoreCase = false)] + public string MaxMemoryPolicy { get; set;} + + private const string redisDefaultVersion = "2.8"; + + public override void ExecuteCmdlet() + { + string skuFamily; + + int skuCapacity = 1; + + if (string.IsNullOrEmpty(RedisVersion)) + { + RedisVersion = redisDefaultVersion; + } + + if (string.IsNullOrEmpty(Size)) + { + Size = SizeConverter.C1String; + } + else + { + Size = SizeConverter.GetSizeInRedisSpecificFormat(Size); + } + + // Size to SkuFamily and SkuCapacity conversion + skuFamily = Size.Substring(0, 1); + int.TryParse(Size.Substring(1), out skuCapacity); + + if (string.IsNullOrEmpty(Sku)) + { + Sku = SkuStrings.Standard; + } + + // If Force flag is not avaliable than check if cache is already available or not + try + { + RedisGetResponse availableCache = CacheClient.GetCache(ResourceGroupName, Name); + if (availableCache != null) + { + throw new CloudException(string.Format(Resources.RedisCacheExists, Name)); + } + } + catch (CloudException ex) + { + if (ex.ErrorCode == "ResourceNotFound" || ex.Message.Contains("ResourceNotFound")) + { + // cache does not exists so go ahead and create one + } + else if (ex.ErrorCode == "ResourceGroupNotFound" || ex.Message.Contains("ResourceGroupNotFound")) + { + // resource group not found, let create throw error don't throw from here + } + else + { + // all other exceptions should be thrown + throw; + } + } + WriteObject(new RedisCacheAttributesWithAccessKeys(CacheClient.CreateOrUpdateCache(ResourceGroupName, Name, Location, RedisVersion, skuFamily, skuCapacity, Sku, MaxMemoryPolicy), ResourceGroupName)); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/NewAzureRedisCacheKey.cs b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/NewAzureRedisCacheKey.cs new file mode 100644 index 000000000000..39939ab12917 --- /dev/null +++ b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/NewAzureRedisCacheKey.cs @@ -0,0 +1,71 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.RedisCache +{ + using Microsoft.Azure.Commands.RedisCache.Properties; + using Microsoft.Azure.Management.Redis.Models; + using System.Management.Automation; + + [Cmdlet(VerbsCommon.New, "AzureRedisCacheKey"), OutputType(typeof(RedisAccessKeys))] + public class NewAzureRedisCacheKey : RedisCacheCmdletBase + { + [Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Name of resource group under whcih cache exists.")] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Name of redis cache.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Mandatory = true, HelpMessage = "Regenerate this key.")] + [ValidateNotNullOrEmpty] + [ValidateSet("Primary", "Secondary", IgnoreCase = false)] + public string KeyType { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Do not ask for confirmation.")] + public SwitchParameter Force { get; set; } + + public override void ExecuteCmdlet() + { + RedisKeyType keyTypeToRegenerated = RedisKeyType.Primary; + if (KeyType.Equals("Secondary")) + { + keyTypeToRegenerated = RedisKeyType.Secondary; + } + + if (!Force.IsPresent) + { + ConfirmAction( + Force.IsPresent, + string.Format(Resources.RegeneratingRedisCacheKey, Name, keyTypeToRegenerated.ToString()), + string.Format(Resources.RegenerateRedisCacheKey, Name, keyTypeToRegenerated.ToString()), + Name, + () => CacheClient.RegenerateAccessKeys(ResourceGroupName, Name, keyTypeToRegenerated) + ); + } + else + { + CacheClient.RegenerateAccessKeys(ResourceGroupName, Name, keyTypeToRegenerated); + } + + RedisListKeysResponse keysResponse = CacheClient.GetAccessKeys(ResourceGroupName, Name); + WriteObject(new RedisAccessKeys() + { + PrimaryKey = keysResponse.PrimaryKey, + SecondaryKey = keysResponse.SecondaryKey + }); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/RemoveAzureRedisCache.cs b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/RemoveAzureRedisCache.cs new file mode 100644 index 000000000000..5e58e228a911 --- /dev/null +++ b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/RemoveAzureRedisCache.cs @@ -0,0 +1,59 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.RedisCache +{ + using Microsoft.Azure.Commands.RedisCache.Properties; + using System.Management.Automation; + + [Cmdlet(VerbsCommon.Remove, "AzureRedisCache"), OutputType(typeof(bool))] + public class RemoveAzureRedisCache : RedisCacheCmdletBase + { + [Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Name of resource group under whcih cache exists.")] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Name of redis cache to be removed.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Do not ask for confirmation.")] + public SwitchParameter Force { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + if (!Force.IsPresent) + { + ConfirmAction( + Force.IsPresent, + string.Format(Resources.RemovingRedisCache, Name), + string.Format(Resources.RemoveRedisCache, Name), + Name, + () => CacheClient.DeleteCache(ResourceGroupName, Name)); + } + else + { + CacheClient.DeleteCache(ResourceGroupName, Name); + } + + if (PassThru) + { + WriteObject(true); + } + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/SetAzureRedisCache.cs b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/SetAzureRedisCache.cs new file mode 100644 index 000000000000..d52f36cdb659 --- /dev/null +++ b/src/ResourceManager/RedisCache/Commands.RedisCache/Commands/SetAzureRedisCache.cs @@ -0,0 +1,49 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.RedisCache +{ + using Microsoft.Azure.Commands.RedisCache.Models; + using Microsoft.Azure.Management.Redis.Models; + using System.Management.Automation; + using MaxMemoryPolicyStrings = Microsoft.Azure.Management.Redis.Models.MaxMemoryPolicy; + + [Cmdlet(VerbsCommon.Set, "AzureRedisCache", DefaultParameterSetName = MaxMemoryParameterSetName), OutputType(typeof(RedisCacheAttributesWithAccessKeys))] + public class SetAzureRedisCache : RedisCacheCmdletBase + { + internal const string MaxMemoryParameterSetName = "Only MaxMemoryPolicy"; + + [Parameter(ParameterSetName = MaxMemoryParameterSetName, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Name of resource group under which you want to create cache.")] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(ParameterSetName = MaxMemoryParameterSetName, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Name of redis cache.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(ParameterSetName = MaxMemoryParameterSetName, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "MaxMemoryPolicy property of redis cache. Valid values: AllKeysLRU, AllKeysRandom, NoEviction, VolatileLRU, VolatileRandom, VolatileTTL")] + [ValidateSet(MaxMemoryPolicyStrings.AllKeysLRU, MaxMemoryPolicyStrings.AllKeysRandom, MaxMemoryPolicyStrings.NoEviction, + MaxMemoryPolicyStrings.VolatileLRU, MaxMemoryPolicyStrings.VolatileRandom, MaxMemoryPolicyStrings.VolatileTTL, IgnoreCase = false)] + public string MaxMemoryPolicy { get; set;} + + public override void ExecuteCmdlet() + { + RedisGetResponse response = CacheClient.GetCache(ResourceGroupName, Name); + WriteObject(new RedisCacheAttributesWithAccessKeys( + CacheClient.CreateOrUpdateCache(ResourceGroupName, Name, response.Location, response.Properties.RedisVersion, + response.Properties.Sku.Family, response.Properties.Sku.Capacity, response.Properties.Sku.Name, MaxMemoryPolicy), + ResourceGroupName)); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/MSSharedLibKey.snk b/src/ResourceManager/RedisCache/Commands.RedisCache/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ResourceManager/RedisCache/Commands.RedisCache/MSSharedLibKey.snk differ diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/Microsoft.Azure.Commands.RedisCache.dll-Help.xml b/src/ResourceManager/RedisCache/Commands.RedisCache/Microsoft.Azure.Commands.RedisCache.dll-Help.xml new file mode 100644 index 000000000000..e23b3495bcbc --- /dev/null +++ b/src/ResourceManager/RedisCache/Commands.RedisCache/Microsoft.Azure.Commands.RedisCache.dll-Help.xml @@ -0,0 +1,1176 @@ + + + + + Get-AzureRedisCache + + Gets details about a single cache or all caches in the specified resource group or all caches in the current subscription. + + + + + Get + AzureRedisCache + + + + The Get-AzureRedisCache cmdlet gets the details about a cache or caches depending on input parameters. If both ResourceGroupName and Name parameters are provided then Get-AzureRedisCache will return details about the specific cache name provided. + If only ResourceGroupName is provided than it will return details about all caches in the specified resource group. + If no parameters are given than it will return details about all caches the current subscription. + + + + Get-AzureRedisCache + + Name + + The name of the cache. If Name is provided along with ResourceGroupName then Get-AzureRedisCache returns the details of the specified cache. + + String + + + ResourceGroupName + + The name of the resource group that contains the cache or caches. If ResourceGroupName is provided with Name then Get-AzureRedisCache returns the details of the cache specified by Name. If only the ResourceGroup parameter is provided, then details for all caches in the resource group are returned. + + String + + + + + + Name + + The name of the cache. When this parameter is provided along with ResourceGroupName, Get-AzureRedisCache returns the details for the cache. + + String + + String + + + + + + + ResourceGroupName + + The name of the resource group that contains the cache or caches. If ResourceGroupName is provided with Name then Get-AzureRedisCache returns the details of the cache specified by Name. If only the ResourceGroup parameter is provided, then details for all caches in the resource group are returned. + + String + + String + + + + + + + + + + None + + + + + + + + You can pipe input to this cmdlet by property name, but not by value. + + + + + + + Microsoft.Azure.Commands.RedisCache.Models.RedisCacheAttributes + + + + + + + + Returns an array of redis caches. + + + + + + + + + + Example 1: Get specific redis cache by name + + + + + PS C:\>Get-AzureRedisCache -ResourceGroupName myGroup -Name myexists + + ResourceGroupName : myGroup + Id : /subscriptions/a559b6fd-3a84-40bb-a450-b0db5ed37dfe/resourceGroups/myGroup/providers/Microsoft.Cache/Redis/myexists + Location : North Central US + Name : myexists + Type : Microsoft.Cache/Redis + HostName : myexists.redis.cache.windows.net + Port : 6379 + ProvisioningState : succeeded + SslPort : 6380 + MaxMemoryPolicy : VolatileTTL + RedisVersion : 2.8 + Size : 1GB + Sku : Basic + + + + This command gets details about the specified redis cache. + + + + + + + + + Example 2: Get all redis caches in a specific resource group + + + + + + PS C:\>Get-AzureRedisCache -ResourceGroupName myGroup + + ResourceGroupName : myGroup + Id : /subscriptions/a559b6fd-3a84-40bb-a450-b0db5ed37dfe/resourceGroups/myGroup/providers/Microsoft.Cache/Redis/myexists + Location : North Central US + Name : myexists + Type : Microsoft.Cache/Redis + HostName : myexists.redis.cache.windows.net + Port : 6379 + ProvisioningState : succeeded + SslPort : 6380 + MaxMemoryPolicy : VolatileTTL + RedisVersion : 2.8 + Size : 1GB + Sku : Basic + + ResourceGroupName : myGroup + Id : /subscriptions/a559b6fd-3a84-40bb-a450-b0db5ed37dfe/resourceGroups/myGroup/providers/Microsoft.Cache/Redis/myearlier + Location : North Central US + Name : myearlier + Type : Microsoft.Cache/Redis + HostName : myearlier.redis.cache.windows.net + Port : 6379 + ProvisioningState : succeeded + SslPort : 6380 + MaxMemoryPolicy : VolatileTTL + RedisVersion : 2.8 + Size : 250MB + Sku : Standard + + + + This command gets details about all redis caches in the specified resource group. + + + + + + + + + Example 3: Get all redis caches in the current subscription + + + + + + PS C:\>Get-AzureRedisCache + + ResourceGroupName : myGroup + Id : /subscriptions/a559b6fd-3a84-40bb-a450-b0db5ed37dfe/resourceGroups/myGroup/providers/Microsoft.Cache/Redis/myexists + Location : North Central US + Name : myexists + Type : Microsoft.Cache/Redis + HostName : myexists.redis.cache.windows.net + Port : 6379 + ProvisioningState : succeeded + SslPort : 6380 + MaxMemoryPolicy : VolatileTTL + RedisVersion : 2.8 + Size : 1GB + Sku : Basic + + ResourceGroupName : myGroup + Id : /subscriptions/a559b6fd-3a84-40bb-a450-b0db5ed37dfe/resourceGroups/myGroup/providers/Microsoft.Cache/Redis/myearlier + Location : North Central US + Name : myearlier + Type : Microsoft.Cache/Redis + HostName : myearlier.redis.cache.windows.net + Port : 6379 + ProvisioningState : succeeded + SslPort : 6380 + MaxMemoryPolicy : VolatileTTL + RedisVersion : 2.8 + Size : 250MB + Sku : Standard + + ResourceGroupName : myGroup2 + Id : /subscriptions/a559b6fd-3a84-40bb-a450-b0db5ed37dfe/resourceGroups/myGroup2/providers/Microsoft.Cache/Redis/myearlier2 + Location : North Central US + Name : myearlier2 + Type : Microsoft.Cache/Redis + HostName : myearlier2.redis.cache.windows.net + Port : 6379 + ProvisioningState : succeeded + SslPort : 6380 + MaxMemoryPolicy : VolatileTTL + RedisVersion : 2.8 + Size : 250MB + Sku : Basic + + + + This command gets details about all redis caches in the current subscription. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=512522 + + + + + + New-AzureRedisCache + + Creates a new redis cache. + + + + + New + AzureRedisCache + + + + The New-AzureRedisCache cmdlet creates a new redis cache. + + + + New-AzureRedisCache + + Name + + Name of the redis cache to create. + + String + + + ResourceGroupName + + Name of the resource group in which to create the redis cache. + + String + + + Location + + Location in which to create redis cache. + + String + + + RedisVersion + + RedisVersion of the redis cache. If not provided, the default value is 2.8. + + String + + + Size + + Size of the redis cache. The default value is 1GB or C1. Possible values are C0, C1, C2, C3, C4, C5, C6, 250MB, 1GB, 2.5GB, 6GB, 13GB, 26GB, 53GB. + + String + + + Sku + + Sku of redis cache. The default value is Standard. Possible values are Basic and Standard. + + String + + + MaxMemoryPolicy + + MaxMemoryPolicy used by the redis cache. The default value is VolatileLRU. Possible values are AllKeysLRU, AllKeysRandom, NoEviction, VolatileLRU, VolatileRandom, VolatileTTL + + String + + + + + + Name + + Name of the redis cache to create. + + String + + String + + + + + + + ResourceGroupName + + Name of resource group in which to create the redis cache. + + String + + String + + + + + + + Location + + Location in which to create the redis cache. + + String + + String + + + + + + + RedisVersion + + RedisVersion of the redis cache. The default value is 2.8. + + String + + String + + + 2.8 + + + Size + + Size of the redis cache. The default value is 1GB or C1. Possible values are C0, C1, C2, C3, C4, C5, C6, 250MB, 1GB, 2.5GB, 6GB, 13GB, 26GB, 53GB. + + String + + String + + + 1GB + + + Sku + + Sku of the redis cache. The default value is Standard. Possible values are Basic and Standard. + + String + + String + + + Standard + + + MaxMemoryPolicy + + MaxMemoryPolicy used by the redis cache. By default the value is VolatileLRU. All possible values are AllKeysLRU, AllKeysRandom, NoEviction, VolatileLRU, VolatileRandom, VolatileTTL. + + String + + String + + + + + + + + + None + + + + + + + + You can pipe input to this cmdlet by property name, but not by value. + + + + + + + Microsoft.Azure.Commands.RedisCache.Models.RedisCacheAttributesWithAccessKeys + + + + + + + + Returns all attributes of a redis cache including primary and secondary access keys. + + + + + + + + + + Example 1: Create new redis cache + + + + + + PS C:\>New-AzureRedisCache -ResourceGroupName myGroup -Name mycache -Location "North Central US" + + PrimaryKey : pJ+jruGKPHDKsEC8kmoybobH3TZx2njBR3ipEsquZFo= + SecondaryKey : sJ+jruGKPHDKsEC8kmoybobH3TZx2njBR3ipEsquZFo= + ResourceGroupName : mygroup + Id : /subscriptions/a559b6fd-3a84-40bb-a450-b0db5ed37dfe/resourceGroups/mygroup/providers/Microsoft.Cache/Redis/mycache + Location : North Central US + Name : mycache + Type : Microsoft.Cache/Redis + HostName : mycache.cache.icbbvt.windows-int.net + Port : 6379 + ProvisioningState : creating + SslPort : 6380 + MaxMemoryPolicy : + RedisVersion : 2.8 + Size : 1GB + Sku : Standard + + + + This command creates a redis cache. + + + + + + + + + Example 2: Create new redis cache with all parameters + + + + + + PS C:\>New-AzureRedisCache -ResourceGroupName mygroup -Name mycache -Location "North Central US" -RedisVersion "2.8" -Size 250MB -Sku Standard -MaxMemoryPolicy AllKeysLRU -Force + + PrimaryKey : pJ+jruGKPHDKsEC8kmoybobH3TZx2njBR3ipEsquZFo= + SecondaryKey : sJ+jruGKPHDKsEC8kmoybobH3TZx2njBR3ipEsquZFo= + ResourceGroupName : mygroup + Id : /subscriptions/a559b6fd-3a84-40bb-a450-b0db5ed37dfe/resourceGroups/mygroup/providers/Microsoft.Cache/Redis/mycache + Location : North Central US + Name : mycache + Type : Microsoft.Cache/Redis + HostName : mycache.cache.icbbvt.windows-int.net + Port : 6379 + ProvisioningState : creating + SslPort : 6380 + MaxMemoryPolicy : AllKeysLRU + RedisVersion : 2.8 + Size : 250MB + Sku : Standard + + + + This command creates a redis cache or updates the redis cache if it already exists. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=512523 + + + + + + Remove-AzureRedisCache + + Remove redis cache if exists. + + + + + Remove + AzureRedisCache + + + + The Remove-AzureRedisCache cmdlet removes a redis cache if it exists. + + + + Remove-AzureRedisCache + + Name + + Name of the redis cache to remove. + + String + + + ResourceGroupName + + Name of the resource group of the cache to remove. + + String + + + Force + + When the Force parameter is provided, the cache is removed without any confirmation prompts. + + + + PassThru + + By default Remove-AzureRedisCache removes the cache and does not return any value. If the PassThru parameter is provided then Remove-AzureRedisCache returns a boolean value indicating the success of the operation. + + + + + + + Name + + Name of the redis cache to remove. + + String + + String + + + + + + + ResourceGroupName + + Name of the resource group of the cache to remove. + + String + + String + + + + + + + Force + + When the Force parameter is provided, the cache is removed without any confirmation prompts. + + + SwitchParameter + + + + + + PassThru + + By default Remove-AzureRedisCache removes the cache and does not return any value. If the PassThru parameter is provided then Remove-AzureRedisCache returns a boolean value indicating the success of the operation. + + + SwitchParameter + + + + + + + + + None + + + + + + + + You can pipe input to this cmdlet by property name, but not by value. + + + + + + + Boolean + + + + + + + + Returns true if no exception occured. + + + + + + + + + + Example 1: Remove a redis cache with PassThru + + + + + + PS C:\>Remove-AzureRedisCache -ResourceGroupName myGroup -Name mycache -Force -PassThru + True + + + + This command removes a redis cache. + + + + + + + + + Example 2: Remove a redis cache without PassThru + + + + + + PS C:\>Remove-AzureRedisCache -ResourceGroupName myGroup -Name mycache -Force + + + This command removes a redis cache. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=512524 + + + + + + Get-AzureRedisCacheKey + + Gets the accesskeys for the specified redis cache. + + + + + Get + AzureRedisCacheKey + + + + The Get-AzureRedisCacheKey cmdlet gets the access keys for the specified cache. + + + + Get-AzureRedisCacheKey + + Name + + Name of the redis cache. + + String + + + ResourceGroupName + + Name of the resource group for the cache. + + String + + + + + + Name + + Name of the redis cache. + + String + + String + + + + + + + ResourceGroupName + + Name of the resource group for the cache. + + String + + String + + + + + + + + + + None + + + + + + + + You can pipe input to this cmdlet by property name, but not by value. + + + + + + + Microsoft.Azure.Management.Redis.Models.RedisAccessKeys + + + + + + + + Returns primary and secondary access key of redis caches. + + + + + + + + + + Example 1: Get the access keys of a specific redis cache + + + + + + PS C:\>Get-AzureRedisCacheKey -ResourceGroupName myGroup -Name myexists + + PrimaryKey : pJ+jruGKPHDKsEC8kmoybobH3TZx2njBR3ipEsquZFo= + SecondaryKey : sJ+jruGKPHDKsEC8kmoybobH3TZx2njBR3ipEsquZFo= + + + + This command gets the access keys of a specific redis cache. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=512525 + + + + + + New-AzureRedisCacheKey + + Regenerates the access key of a redis cache. + + + + + New + AzureRedisCacheKey + + + + The New-AzureRedisCacheKey cmdlet regenerate the access key of a redis cache. + + + + New-AzureRedisCacheKey + + Name + + Name of the redis cache. + + String + + + ResourceGroupName + + Name of the resource group for the cache. + + String + + + KeyType + + Specifies whether to regenerate the primary or secondary access key. Possible values are Primary or Secondary. + + String + + + Force + + When the Force parameter is provided, the specified access key is regenerated without any confirmation prompts. + + + + + + + Name + + Name of the redis cache. + + String + + String + + + + + + + ResourceGroupName + + Name of the resource group for the cache. + + String + + String + + + + + + + KeyType + + Specifies whether to regenerate the primary or secondary access key. Possible values are Primary or Secondary. + + String + + String + + + + + + + Force + + When the Force parameter is provided, the specified access key is regenerated without any confirmation prompts. + + + SwitchParameter + + + + + + + + + None + + + + + + + + You can pipe input to this cmdlet by property name, but not by value. + + + + + + + Microsoft.Azure.Management.Redis.Models.RedisAccessKeys + + + + + + + + Returns the primary and secondary access key of redis caches. + + + + + + + + + + Example 1: Regenerate primary key + + + + + + PS C:\>New-AzureRedisCacheKey -ResourceGroupName myGroup -Name mycache -KeyType Primary -Force + + PrimaryKey : pJ+jruGKPHDKsEC8kmoybobH3TZx2njBR3ipEsquZFo= + SecondaryKey : sJ+jruGKPHDKsEC8kmoybobH3TZx2njBR3ipEsquZFo= + + + + This command regenerates the primary key of a redis cache. + + + + + + + + + Example 2: Regenerate secondary key + + + + + + PS C:\>New-AzureRedisCacheKey -ResourceGroupName myGroup -Name mycache -KeyType Secondary -Force + + PrimaryKey : pJ+jruGKPHDKsEC8kmoybobH3TZx2njBR3ipEsquZFo= + SecondaryKey : sJ+jruGKPHDKsEC8kmoybobH3TZx2njBR3ipEsquZFo= + + + + This command regenerates the secondary key of a redis cache. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=512526 + + + + + + Set-AzureRedisCache + + Set redis cache updatable parameters. + + + + + Set + AzureRedisCache + + + + The Set-AzureRedisCache cmdlet sets redis cache parameters. + + + + Set-AzureRedisCache + + Name + + Name of the redis cache to update. + + String + + + ResourceGroupName + + Name of the resource group for the cache. + + String + + + MaxMemoryPolicy + + MaxMemoryPolicy used by the redis cache. The default value is VolatileLRU. Possible values are AllKeysLRU, AllKeysRandom, NoEviction, VolatileLRU, VolatileRandom, VolatileTTL. + + String + + + + + + Name + + Name of the redis cache to update. + + String + + String + + + + + + + ResourceGroupName + + Name of the resource group for the cache. + + String + + String + + + + + + + MaxMemoryPolicy + + MaxMemoryPolicy used by the redis cache. The default value is VolatileLRU. Possible values are AllKeysLRU, AllKeysRandom, NoEviction, VolatileLRU, VolatileRandom, VolatileTTL. + + String + + String + + + + + + + + + None + + + + + + + + You can pipe input to this cmdlet by property name, but not by value. + + + + + + + Microsoft.Azure.Commands.RedisCache.Models.RedisCacheAttributesWithAccessKeys + + + + + + + + Returns all attributes of a redis cache including primary and secondary access keys. + + + + + + + + + + Example 1: Update Max Memory Policy + + + + + + PS C:\>New-AzureRedisCache -ResourceGroupName mygroup -Name mycache -MaxMemoryPolicy AllKeysLRU + + PrimaryKey : pJ+jruGKPHDKsEC8kmoybobH3TZx2njBR3ipEsquZFo= + SecondaryKey : sJ+jruGKPHDKsEC8kmoybobH3TZx2njBR3ipEsquZFo= + ResourceGroupName : mygroup + Id : /subscriptions/a559b6fd-3a84-40bb-a450-b0db5ed37dfe/resourceGroups/mygroup/providers/Microsoft.Cache/Redis/mycache + Location : North Central US + Name : mycache + Type : Microsoft.Cache/Redis + HostName : mycache.cache.icbbvt.windows-int.net + Port : 6379 + ProvisioningState : creating + SslPort : 6380 + MaxMemoryPolicy : AllKeysLRU + RedisVersion : 2.8 + Size : 250MB + Sku : Standard + + + + This command updates the updatable attributes of a redis cache. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=512527 + + + + diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/Microsoft.Azure.Commands.RedisCache.format.ps1xml b/src/ResourceManager/RedisCache/Commands.RedisCache/Microsoft.Azure.Commands.RedisCache.format.ps1xml new file mode 100644 index 000000000000..2c392f5c9ecb --- /dev/null +++ b/src/ResourceManager/RedisCache/Commands.RedisCache/Microsoft.Azure.Commands.RedisCache.format.ps1xml @@ -0,0 +1,167 @@ + + + + + Microsoft.Azure.Commands.RedisCache.Models.RedisCacheAttributes + + Microsoft.Azure.Commands.RedisCache.Models.RedisCacheAttributes + + + + + + + + Name + + + + Id + + + + Location + + + + Type + + + + HostName + + + + Port + + + + ProvisioningState + + + + SslPort + + + + MaxMemoryPolicy + + + + RedisVersion + + + + Size + + + + Sku + + + + ResourceGroupName + + + + + + + + Microsoft.Azure.Commands.RedisCache.Models.RedisCacheAttributesWithAccessKeys + + Microsoft.Azure.Commands.RedisCache.Models.RedisCacheAttributesWithAccessKeys + + + + + + + + Name + + + + Id + + + + Location + + + + Type + + + + HostName + + + + Port + + + + ProvisioningState + + + + SslPort + + + + MaxMemoryPolicy + + + + RedisVersion + + + + Size + + + + Sku + + + + ResourceGroupName + + + + PrimaryKey + + + + SecondaryKey + + + + + + + + Microsoft.Azure.Management.Redis.Models.RedisAccessKeys + + Microsoft.Azure.Management.Redis.Models.RedisAccessKeys + + + + + + + + PrimaryKey + + + + SecondaryKey + + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/Models/RedisCacheAttributes.cs b/src/ResourceManager/RedisCache/Commands.RedisCache/Models/RedisCacheAttributes.cs new file mode 100644 index 000000000000..b02db7d02637 --- /dev/null +++ b/src/ResourceManager/RedisCache/Commands.RedisCache/Models/RedisCacheAttributes.cs @@ -0,0 +1,103 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.RedisCache.Models +{ + using Microsoft.Azure.Management.Redis.Models; + + class RedisCacheAttributes + { + public RedisCacheAttributes(RedisResource cache, string resourceGroupName) + { + Id = cache.Id; + Location = cache.Location; + Name = cache.Name; + Type = cache.Type; + HostName = cache.Properties.HostName; + Port = cache.Properties.Port; + ProvisioningState = cache.Properties.ProvisioningState; + SslPort = cache.Properties.SslPort; + MaxMemoryPolicy = cache.Properties.MaxMemoryPolicy; + RedisVersion = cache.Properties.RedisVersion; + Size = SizeConverter.GetSizeInUserSpecificFormat(cache.Properties.Sku.Family, cache.Properties.Sku.Capacity); + Sku = cache.Properties.Sku.Name; + ResourceGroupName = resourceGroupName; + } + + public RedisCacheAttributes(RedisGetResponse cache, string resourceGroupName) + { + Id = cache.Id; + Location = cache.Location; + Name = cache.Name; + Type = cache.Type; + HostName = cache.Properties.HostName; + Port = cache.Properties.Port; + ProvisioningState = cache.Properties.ProvisioningState; + SslPort = cache.Properties.SslPort; + MaxMemoryPolicy = cache.Properties.MaxMemoryPolicy; + RedisVersion = cache.Properties.RedisVersion; + Size = SizeConverter.GetSizeInUserSpecificFormat(cache.Properties.Sku.Family, cache.Properties.Sku.Capacity); + Sku = cache.Properties.Sku.Name; + ResourceGroupName = resourceGroupName; + } + + public RedisCacheAttributes() { } + + private string _resourceGroupName; + public string ResourceGroupName + { + get + { + return _resourceGroupName; + } + + protected set + { + if (!string.IsNullOrEmpty(value)) + { + _resourceGroupName = value; + } + else + { + // if resource group name is null (when try to get all cache in given subscription it will be null) we have to fetch it from Id. + _resourceGroupName = Id.Split('/')[4]; + } + } + } + + public string Id { get; protected set; } + + public string Location { get; protected set; } + + public string Name { get; protected set; } + + public string Type { get; protected set; } + + public string HostName { get; protected set; } + + public int Port { get; protected set; } + + public string ProvisioningState { get; protected set; } + + public int SslPort { get; protected set; } + + public string MaxMemoryPolicy { get; protected set; } + + public string RedisVersion { get; protected set; } + + public string Size { get; protected set; } + + public string Sku { get; protected set; } + } +} \ No newline at end of file diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/Models/RedisCacheAttributesWithAccessKeys.cs b/src/ResourceManager/RedisCache/Commands.RedisCache/Models/RedisCacheAttributesWithAccessKeys.cs new file mode 100644 index 000000000000..8830d0a37c48 --- /dev/null +++ b/src/ResourceManager/RedisCache/Commands.RedisCache/Models/RedisCacheAttributesWithAccessKeys.cs @@ -0,0 +1,44 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.RedisCache.Models +{ + using Microsoft.Azure.Management.Redis.Models; + + class RedisCacheAttributesWithAccessKeys : RedisCacheAttributes + { + public RedisCacheAttributesWithAccessKeys(RedisCreateOrUpdateResponse cache, string resourceGroupName) + { + Id = cache.Id; + Location = cache.Location; + Name = cache.Name; + Type = cache.Type; + HostName = cache.Properties.HostName; + Port = cache.Properties.Port; + ProvisioningState = cache.Properties.ProvisioningState; + SslPort = cache.Properties.SslPort; + MaxMemoryPolicy = cache.Properties.MaxMemoryPolicy; + RedisVersion = cache.Properties.RedisVersion; + Size = SizeConverter.GetSizeInUserSpecificFormat(cache.Properties.Sku.Family, cache.Properties.Sku.Capacity); + Sku = cache.Properties.Sku.Name; + + PrimaryKey = cache.Properties.AccessKeys.PrimaryKey; + SecondaryKey = cache.Properties.AccessKeys.SecondaryKey; + ResourceGroupName = resourceGroupName; + } + + public string PrimaryKey { get; private set; } + public string SecondaryKey { get; private set; } + } +} \ No newline at end of file diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/Models/RedisCacheClient.cs b/src/ResourceManager/RedisCache/Commands.RedisCache/Models/RedisCacheClient.cs new file mode 100644 index 000000000000..3aa15d1d05fb --- /dev/null +++ b/src/ResourceManager/RedisCache/Commands.RedisCache/Models/RedisCacheClient.cs @@ -0,0 +1,93 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.RedisCache +{ + using Microsoft.Azure.Management.Redis; + using Microsoft.Azure.Management.Redis.Models; + using Microsoft.WindowsAzure; + using Microsoft.WindowsAzure.Commands.Common; + using Microsoft.WindowsAzure.Commands.Common.Models; + + public class RedisCacheClient + { + private RedisManagementClient _client; + public RedisCacheClient(AzureContext context) + { + _client = AzureSession.ClientFactory.CreateClient(context, AzureEnvironment.Endpoint.ResourceManager); + } + public RedisCacheClient() { } + + public RedisCreateOrUpdateResponse CreateOrUpdateCache(string resourceGroupName, string cacheName, string location, string redisVersion, string skuFamily, int skuCapacity, string skuName, string maxMemoryPolicy) + { + RedisCreateOrUpdateParameters parameters = new RedisCreateOrUpdateParameters + { + Location = location, + Properties = new RedisProperties + { + RedisVersion = redisVersion, + Sku = new Sku() { + Name = skuName, + Family = skuFamily, + Capacity = skuCapacity + } + } + }; + + if (!string.IsNullOrEmpty(maxMemoryPolicy)) + { + parameters.Properties.MaxMemoryPolicy = maxMemoryPolicy; + } + RedisCreateOrUpdateResponse response = _client.Redis.CreateOrUpdate(resourceGroupName: resourceGroupName, name: cacheName, parameters: parameters); + return response; + } + + public OperationResponse DeleteCache(string resourceGroupName, string cacheName) + { + return _client.Redis.Delete(resourceGroupName: resourceGroupName, name: cacheName); + } + + public RedisGetResponse GetCache(string resourceGroupName, string cacheName) + { + return _client.Redis.Get(resourceGroupName: resourceGroupName, name: cacheName); + } + + public RedisListResponse ListCaches(string resourceGroupName) + { + if (string.IsNullOrEmpty(resourceGroupName)) + { + return _client.Redis.List(null); + } + else + { + return _client.Redis.List(resourceGroupName: resourceGroupName); + } + } + + public RedisListResponse ListCachesUsingNextLink(string nextLink) + { + return _client.Redis.ListNext(nextLink: nextLink); + } + + public OperationResponse RegenerateAccessKeys(string resourceGroupName, string cacheName, RedisKeyType keyType) + { + return _client.Redis.RegenerateKey(resourceGroupName: resourceGroupName, name: cacheName, parameters: new RedisRegenerateKeyParameters() { KeyType = keyType }); + } + + public RedisListKeysResponse GetAccessKeys(string resourceGroupName, string cacheName) + { + return _client.Redis.ListKeys(resourceGroupName: resourceGroupName, name: cacheName); + } + } +} diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/Models/RedisCacheCmdletBase.cs b/src/ResourceManager/RedisCache/Commands.RedisCache/Models/RedisCacheCmdletBase.cs new file mode 100644 index 000000000000..1b2dadb68f9f --- /dev/null +++ b/src/ResourceManager/RedisCache/Commands.RedisCache/Models/RedisCacheCmdletBase.cs @@ -0,0 +1,43 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.RedisCache +{ + using Microsoft.WindowsAzure.Commands.Utilities.Common; + + /// + /// The base class for all Microsoft Azure Redis Cache Management Cmdlets + /// + public abstract class RedisCacheCmdletBase : AzurePSCmdlet + { + private RedisCacheClient cacheClient; + + public RedisCacheClient CacheClient + { + get + { + if (cacheClient == null) + { + cacheClient = new RedisCacheClient(CurrentContext); + } + return cacheClient; + } + + set + { + cacheClient = value; + } + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/Models/SizeConverter.cs b/src/ResourceManager/RedisCache/Commands.RedisCache/Models/SizeConverter.cs new file mode 100644 index 000000000000..033fc115d567 --- /dev/null +++ b/src/ResourceManager/RedisCache/Commands.RedisCache/Models/SizeConverter.cs @@ -0,0 +1,99 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.RedisCache.Models +{ + public static class SizeConverter + { + public const string C0 = "250MB"; + public const string C1 = "1GB"; + public const string C2 = "2.5GB"; + public const string C3 = "6GB"; + public const string C4 = "13GB"; + public const string C5 = "26GB"; + public const string C6 = "53GB"; + + public const string C0String = "C0"; + public const string C1String = "C1"; + public const string C2String = "C2"; + public const string C3String = "C3"; + public const string C4String = "C4"; + public const string C5String = "C5"; + public const string C6String = "C6"; + + public static string GetSizeInRedisSpecificFormat(string actualSizeFromUser) + { + switch(actualSizeFromUser) + { + // accepting actual sizes + case C0: + return C0String; + case C1: + return C1String; + case C2: + return C2String; + case C3: + return C3String; + case C4: + return C4String; + case C5: + return C5String; + case C6: + return C6String; + // accepting C0, C1 etc. + case C0String: + return C0String; + case C1String: + return C1String; + case C2String: + return C2String; + case C3String: + return C3String; + case C4String: + return C4String; + case C5String: + return C5String; + case C6String: + return C6String; + default: + return C1String; + } + } + + public static string GetSizeInUserSpecificFormat(string skuFamily, int skuCapacity) + { + string sizeConstant = skuFamily + skuCapacity.ToString(); + switch (sizeConstant) + { + // accepting C0, C1 etc. + case C0String: + return C0; + case C1String: + return C1; + case C2String: + return C2; + case C3String: + return C3; + case C4String: + return C4; + case C5String: + return C5; + case C6String: + return C6; + default: + return C1; + } + } + } +} diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/PostBuild.ps1 b/src/ResourceManager/RedisCache/Commands.RedisCache/PostBuild.ps1 new file mode 100644 index 000000000000..432e76af61ff --- /dev/null +++ b/src/ResourceManager/RedisCache/Commands.RedisCache/PostBuild.ps1 @@ -0,0 +1,25 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +$sourceDir = $args[0] +Write-Output $sourceDir + +$sourcePath = $sourceDir + "AzureResourceManager.psd1" +$destDir = $(Split-Path $sourceDir) + +Write-Output "Copying '$sourcePath' to directory '$destDir'" +Copy-Item $sourcePath $destDir + +Write-Output "Removing $sourcePath" +Remove-Item $sourcePath -Force \ No newline at end of file diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/Properties/AssemblyInfo.cs b/src/ResourceManager/RedisCache/Commands.RedisCache/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..63bc7bacbf71 --- /dev/null +++ b/src/ResourceManager/RedisCache/Commands.RedisCache/Properties/AssemblyInfo.cs @@ -0,0 +1,34 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Microsoft Azure Powershell - Redis Cache")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Microsoft Azure Powershell")] +[assembly: AssemblyCopyright("Copyright © Microsoft")] + +[assembly: ComVisible(false)] +[assembly: CLSCompliant(false)] +[assembly: Guid("6D663ED9-C1A5-438F-B88A-D709562538C6")] +[assembly: AssemblyVersion("0.1.0")] +[assembly: AssemblyFileVersion("0.1.0")] +#if SIGN +[assembly: InternalsVisibleTo("Microsoft.Azure.Commands.RedisCache.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +#else +[assembly: InternalsVisibleTo("Microsoft.Azure.Commands.RedisCache.Test")] +#endif \ No newline at end of file diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/Properties/Resources.Designer.cs b/src/ResourceManager/RedisCache/Commands.RedisCache/Properties/Resources.Designer.cs new file mode 100644 index 000000000000..504ce90ddea9 --- /dev/null +++ b/src/ResourceManager/RedisCache/Commands.RedisCache/Properties/Resources.Designer.cs @@ -0,0 +1,108 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.Azure.Commands.RedisCache.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Azure.Commands.RedisCache.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Redis cache with name '{0}' already exists.. + /// + internal static string RedisCacheExists { + get { + return ResourceManager.GetString("RedisCacheExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Regenerating {1} key for redis cache '{0}' .... + /// + internal static string RegenerateRedisCacheKey { + get { + return ResourceManager.GetString("RegenerateRedisCacheKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to regenerate {1} key for redis cache '{0}'?. + /// + internal static string RegeneratingRedisCacheKey { + get { + return ResourceManager.GetString("RegeneratingRedisCacheKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing redis cache '{0}' .... + /// + internal static string RemoveRedisCache { + get { + return ResourceManager.GetString("RemoveRedisCache", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove redis cache '{0}'?. + /// + internal static string RemovingRedisCache { + get { + return ResourceManager.GetString("RemovingRedisCache", resourceCulture); + } + } + } +} diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/Properties/Resources.resx b/src/ResourceManager/RedisCache/Commands.RedisCache/Properties/Resources.resx new file mode 100644 index 000000000000..9535144c625c --- /dev/null +++ b/src/ResourceManager/RedisCache/Commands.RedisCache/Properties/Resources.resx @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Redis cache with name '{0}' already exists. + + + Regenerating {1} key for redis cache '{0}' ... + + + Are you sure you want to regenerate {1} key for redis cache '{0}'? + + + Removing redis cache '{0}' ... + + + Are you sure you want to remove redis cache '{0}'? + + \ No newline at end of file diff --git a/src/ResourceManager/RedisCache/Commands.RedisCache/packages.config b/src/ResourceManager/RedisCache/Commands.RedisCache/packages.config new file mode 100644 index 000000000000..6bcaa8a8decc --- /dev/null +++ b/src/ResourceManager/RedisCache/Commands.RedisCache/packages.config @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Build2014_Website_App.json b/src/ResourceManager/Resources/Commands.Resources.Test/Build2014_Website_App.json new file mode 100644 index 000000000000..ac3ef4152d4e --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Build2014_Website_App.json @@ -0,0 +1,236 @@ +{ + "$schema": "http://johngosmanage.blob.core.windows.net/schemas/2014-04-01-preview/deploymentTemplate.json", + "contentVersion": "1.0.0.0", + "parameters": { + "siteName": { + "type": "string" + }, + "hostingPlanName": { + "type": "string" + }, + "siteLocation": { + "type": "string" + }, + "sku": { + "type": "string", + "allowedValues": [ + "Free", + "Shared", + "Basic", + "Standard" + ] + }, + "workerSize": { + "type": "string", + "allowedValues": [ + "0", + "1", + "2" + ] + } + }, + "resources": [ + { + "apiVersion": "2014-04-01", + "name": "[parameters('hostingPlanName')]", + "type": "Microsoft.Web/serverfarms", + "location": "[parameters('siteLocation')]", + "properties": { + "name": "[parameters('hostingPlanName')]", + "sku": "[parameters('sku')]", + "workerSize": "0", + "numberOfWorkers": 0 + } + }, + { + "apiVersion": "2014-04-01", + "name": "[parameters('siteName')]", + "type": "Microsoft.Web/sites", + "location": "[parameters('siteLocation')]", + "tags": { + "[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]": "empty" + }, + "dependsOn": [ + "[concat('Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]" + ], + "properties": { + "name": "[parameters('siteName')]", + "serverFarm": "[parameters('hostingPlanName')]" + }, + "resources": [ + { + "apiVersion": "01-01-2014", + "name": "MSDeploy", + "type": "Extensions", + "dependsOn": [ + "[concat('Microsoft.Web/Sites/', parameters('siteName'))]" + ], + "properties": { + "packageUri": "https://templatetest.blob.core.windows.net/deployments/ClipMeme.zip", + "dbType": "None", + "connectionString": "", + "setParameters": { + "IIS Web Application Name": "[parameters('siteName')]" + } + } + } + ] + }, + { + "apiVersion": "2014-04", + "name": "[concat(parameters('hostingPlanName'), '-', resourceGroup().name)]", + "type": "microsoft.insights/autoscalesettings", + "location": "East US", + "tags": { + "[concat('hidden-link:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]": "empty" + }, + "dependsOn": [ + "[concat('Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]" + ], + "properties": { + "profiles": [ + { + "name": "Default", + "capacity": { + "minimum": "1", + "maximum": "10", + "default": "1" + }, + "rules": [ + { + "metricTrigger": { + "metricName": "CpuPercentage", + "metricResourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]", + "timeGrain": "PT1M", + "statistic": "Average", + "timeWindow": "PT10M", + "timeAggregation": "Average", + "operator": "GreaterThan", + "threshold": 80.0 + }, + "scaleAction": { + "direction": "Increase", + "type": "ChangeCount", + "value": "1", + "cooldown": "PT10M" + } + }, + { + "metricTrigger": { + "metricName": "CpuPercentage", + "metricResourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]", + "timeGrain": "PT1M", + "statistic": "Average", + "timeWindow": "PT1H", + "timeAggregation": "Average", + "operator": "LessThan", + "threshold": 60.0 + }, + "scaleAction": { + "direction": "Decrease", + "type": "ChangeCount", + "value": "1", + "cooldown": "PT1H" + } + } + ] + } + ], + "enabled": false, + "name": "[concat(parameters('hostingPlanName'), '-', resourceGroup().name)]", + "targetResourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]" + } + }, + { + "apiVersion": "2014-04", + "name": "[concat('ServerErrors', parameters('siteName'))]", + "type": "microsoft.insights/alertrules", + "location": "East US", + "dependsOn": [ + "[concat('Microsoft.Web/sites/', parameters('siteName'))]" + ], + "properties": { + "name": "[concat('ServerErrors', parameters('siteName'))]", + "description": "[concat(parameters('siteName'), ' has some server errors, status code 5xx.')]", + "isEnabled": false, + "condition": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition", + "dataSource": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource", + "resourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/sites/', parameters('siteName'))]", + "metricName": "Http5xx" + }, + "operator": "GreaterThan", + "threshold": 0.0, + "windowSize": "PT5M" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction", + "sendToServiceOwners": true, + "customEmails": [] + } + } + }, + { + "apiVersion": "2014-04", + "name": "[concat('ForbiddenRequests', parameters('siteName'))]", + "type": "microsoft.insights/alertrules", + "location": "East US", + "dependsOn": [ + "[concat('microsoft.insights/alertrules/', 'ServerErrors', parameters('siteName'))]" + ], + "properties": { + "name": "[concat('ForbiddenRequests', parameters('siteName'))]", + "description": "[concat(parameters('siteName'), ' has some requests that are forbidden, status code 403.')]", + "isEnabled": false, + "condition": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition", + "dataSource": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource", + "resourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/sites/', parameters('siteName'))]", + "metricName": "Http403" + }, + "operator": "GreaterThan", + "threshold": 0, + "windowSize": "PT5M" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction", + "sendToServiceOwners": true, + "customEmails": [] + } + } + }, + { + "apiVersion": "2014-04", + "name": "[concat('CPUHigh', parameters('hostingPlanName'))]", + "type": "microsoft.insights/alertrules", + "location": "East US", + "dependsOn": [ + "[concat('Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]", + "[concat('microsoft.insights/alertrules/', 'ForbiddenRequests', parameters('siteName'))]" + ], + "properties": { + "name": "[concat('CPUHigh', parameters('hostingPlanName'))]", + "description": "[concat('The average CPU is high across all the instances of ', parameters('hostingPlanName'))]", + "isEnabled": false, + "condition": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition", + "dataSource": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource", + "resourceUri": "[concat(resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]", + "metricName": "CpuPercentage" + }, + "operator": "GreaterThan", + "threshold": 90, + "windowSize": "PT15M" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction", + "sendToServiceOwners": true, + "customEmails": [] + } + } + } + ] +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.csproj b/src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.csproj new file mode 100644 index 000000000000..ab3fb50e13af --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.csproj @@ -0,0 +1,432 @@ + + + + + Debug + AnyCPU + {4C2FE49A-09E1-4979-AD46-CD64FD04C8F7} + Library + Properties + Microsoft.Azure.Commands.Resources.Test + Microsoft.Azure.Commands.Resources.Test + v4.5 + 512 + + ..\..\..\ + true + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + + + true + MSSharedLibKey.snk + true + true + false + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + bin\Release\ + TRACE;SIGN + true + pdbonly + AnyCPU + prompt + false + + + + ..\..\..\packages\Microsoft.Azure.Gallery.2.2.0-preview\lib\net40\Microsoft.Azure.Gallery.dll + + + False + ..\..\..\packages\Microsoft.Azure.Graph.RBAC.1.4.0-preview\lib\net40\Microsoft.Azure.Graph.RBAC.dll + + + False + ..\..\..\packages\Microsoft.Azure.Management.Authorization.0.11.0-preview\lib\net40\Microsoft.Azure.Management.Authorization.dll + + + False + ..\..\..\packages\Microsoft.Azure.Monitoring.2.2.0-preview\lib\net40\Microsoft.Azure.Monitoring.dll + + + False + ..\..\..\packages\Microsoft.Azure.Management.Resources.2.7.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll + + + False + ..\..\..\packages\Hydra.HttpRecorder.1.0.5417.13285-prerelease\lib\net45\Microsoft.Azure.Utilities.HttpRecorder.dll + + + False + ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll + + + False + ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.3.1.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll + + + False + ..\..\..\packages\Hydra.SpecTestSupport.1.0.5417.13285-prerelease\lib\net45\Microsoft.WindowsAzure.Testing.dll + + + False + ..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll + + + False + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + + + + + False + C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Management.Automation\v4.0_3.0.0.0__31bf3856ad364e35\System.Management.Automation.dll + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + + + + + False + ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + + False + ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + + + + + + + + + + + + + + + + + + + + + + + + + True + True + Resources.resx + + + + + + + + + + + + {c1bda476-a5cc-4394-914d-48b0ec31a710} + Commands.ScenarioTests.Common + + + {9577252e-0a6b-4d61-86e8-95f7f309a987} + Commands.DataFactories + + + {e1f5201d-6067-430e-b303-4e367652991b} + Commands.Resources + + + {65c3a86a-716d-4e7d-ab67-1db00b3bf72d} + Commands.Common.Storage + + + {3b48a77b-5956-4a62-9081-92ba04b02b27} + Commands.Common.Test + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + + + Always + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + + + + + + + xcopy "$(SolutionDir)Package\$(ConfigurationName)\*.*" $(TargetDir) /Y /E + + + \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/MSSharedLibKey.snk b/src/ResourceManager/Resources/Commands.Resources.Test/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ResourceManager/Resources/Commands.Resources.Test/MSSharedLibKey.snk differ diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ExtensionsTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ExtensionsTests.cs new file mode 100644 index 000000000000..c3d8b63d65fb --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ExtensionsTests.cs @@ -0,0 +1,69 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.Azure.Gallery; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Xunit; + +namespace Microsoft.Azure.Commands.Resources.Test.Models +{ + public class ExtensionsTests + { + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void ToPSGalleryItemCreatesANewItem() + { + var item = new GalleryItem() + { + Name = "Name", + Publisher = "Microsoft", + DefinitionTemplates = new DefinitionTemplates() + { + DefaultDeploymentTemplateId = "DefaultUri", + DeploymentTemplateFileUrls = new Dictionary() + { + {"DefaultUri", "fakeurl"} + } + } + }; + + var psitem = item.ToPSGalleryItem(); + + Assert.Equal(item.Name, psitem.Name); + Assert.Equal(item.Publisher, psitem.Publisher); + Assert.Equal(item.DefinitionTemplates.DefaultDeploymentTemplateId, psitem.DefinitionTemplates.DefaultDeploymentTemplateId); + Assert.Equal(item.DefinitionTemplates.DeploymentTemplateFileUrls["DefaultUri"], psitem.DefinitionTemplates.DeploymentTemplateFileUrls["DefaultUri"]); + Assert.Equal("fakeurl", psitem.DefinitionTemplatesText); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void ToPSGalleryItemCreatesANewItemWithNullDeploymentTemplates() + { + var item = new GalleryItem() + { + Name = "Name", + Publisher = "Microsoft", + }; + + var psitem = item.ToPSGalleryItem(); + + Assert.Equal(item.Name, psitem.Name); + Assert.Equal(item.Publisher, psitem.Publisher); + Assert.Null(psitem.DefinitionTemplatesText); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/GalleryTemplatesClientTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/GalleryTemplatesClientTests.cs new file mode 100644 index 000000000000..9f05a40e5d10 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/GalleryTemplatesClientTests.cs @@ -0,0 +1,685 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Security; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.Azure.Gallery; +using Microsoft.Azure.Gallery.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Common.OData; +using Moq; +using Xunit; + +namespace Microsoft.Azure.Commands.Resources.Test.Models +{ + public class GalleryTemplatesClientTests : TestBase + { + private GalleryTemplatesClient galleryTemplatesClient; + + private Mock galleryClientMock; + + private string templateFile = @"Resources\sampleTemplateFile.json"; + + private string invalidTemplateFile = @"Resources\invalidTemplateFile.json"; + + private string templateParameterFileSchema1 = @"Resources\sampleTemplateParameterFile.json"; + + private string templateParameterFileSchema2 = @"Resources\sampleTemplateParameterFileSchema2.json"; + + public GalleryTemplatesClientTests() + { + galleryClientMock = new Mock(); + galleryTemplatesClient = new GalleryTemplatesClient(galleryClientMock.Object); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void ConstructsDynamicParameter() + { + string[] parameters = { "Name", "Location", "Mode" }; + string[] parameterSetNames = { "__AllParameterSets" }; + string key = "computeMode"; + TemplateFileParameterV1 value = new TemplateFileParameterV1() + { + AllowedValues = new List() { "Mode1", "Mode2", "Mode3" }, + DefaultValue = "Mode1", + MaxLength = "5", + MinLength = "1", + Type = "string" + }; + KeyValuePair parameter = new KeyValuePair(key, value); + + RuntimeDefinedParameter dynamicParameter = galleryTemplatesClient.ConstructDynamicParameter(parameters, parameter); + + Assert.Equal("computeMode", dynamicParameter.Name); + Assert.Equal(value.DefaultValue, dynamicParameter.Value); + Assert.Equal(typeof(string), dynamicParameter.ParameterType); + Assert.Equal(3, dynamicParameter.Attributes.Count); + + ParameterAttribute parameterAttribute = (ParameterAttribute)dynamicParameter.Attributes[0]; + Assert.False(parameterAttribute.Mandatory); + Assert.True(parameterAttribute.ValueFromPipelineByPropertyName); + Assert.Equal(parameterSetNames[0], parameterAttribute.ParameterSetName); + + ValidateSetAttribute validateSetAttribute = (ValidateSetAttribute)dynamicParameter.Attributes[1]; + Assert.Equal(3, validateSetAttribute.ValidValues.Count); + Assert.True(validateSetAttribute.IgnoreCase); + Assert.True(value.AllowedValues.Contains(validateSetAttribute.ValidValues[0])); + Assert.True(value.AllowedValues.Contains(validateSetAttribute.ValidValues[1])); + Assert.True(value.AllowedValues.Contains(validateSetAttribute.ValidValues[2])); + Assert.False(validateSetAttribute.ValidValues[0].Contains(' ')); + Assert.False(validateSetAttribute.ValidValues[1].Contains(' ')); + Assert.False(validateSetAttribute.ValidValues[2].Contains(' ')); + + ValidateLengthAttribute validateLengthAttribute = (ValidateLengthAttribute)dynamicParameter.Attributes[2]; + Assert.Equal(int.Parse(value.MinLength), validateLengthAttribute.MinLength); + Assert.Equal(int.Parse(value.MaxLength), validateLengthAttribute.MaxLength); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void ResolvesDuplicatedDynamicParameterName() + { + string[] parameters = { "Name", "Location", "Mode" }; + string[] parameterSetNames = { "__AllParameterSets" }; + string key = "Name"; + TemplateFileParameterV1 value = new TemplateFileParameterV1() + { + AllowedValues = new List() { "Mode1", "Mode2", "Mode3" }, + MaxLength = "5", + MinLength = "1", + Type = "bool" + }; + KeyValuePair parameter = new KeyValuePair(key, value); + + RuntimeDefinedParameter dynamicParameter = galleryTemplatesClient.ConstructDynamicParameter(parameters, parameter); + + Assert.Equal(key + "FromTemplate", dynamicParameter.Name); + Assert.Equal(value.DefaultValue, dynamicParameter.Value); + Assert.Equal(typeof(bool), dynamicParameter.ParameterType); + Assert.Equal(3, dynamicParameter.Attributes.Count); + + ParameterAttribute parameterAttribute = (ParameterAttribute)dynamicParameter.Attributes[0]; + Assert.True(parameterAttribute.Mandatory); + Assert.True(parameterAttribute.ValueFromPipelineByPropertyName); + Assert.Equal(parameterSetNames[0], parameterAttribute.ParameterSetName); + + ValidateSetAttribute validateSetAttribute = (ValidateSetAttribute)dynamicParameter.Attributes[1]; + Assert.Equal(3, validateSetAttribute.ValidValues.Count); + Assert.True(validateSetAttribute.IgnoreCase); + Assert.True(value.AllowedValues.Contains(validateSetAttribute.ValidValues[0])); + Assert.True(value.AllowedValues.Contains(validateSetAttribute.ValidValues[1])); + Assert.True(value.AllowedValues.Contains(validateSetAttribute.ValidValues[2])); + Assert.False(validateSetAttribute.ValidValues[0].Contains(' ')); + Assert.False(validateSetAttribute.ValidValues[1].Contains(' ')); + Assert.False(validateSetAttribute.ValidValues[2].Contains(' ')); + + ValidateLengthAttribute validateLengthAttribute = (ValidateLengthAttribute)dynamicParameter.Attributes[2]; + Assert.Equal(int.Parse(value.MinLength), validateLengthAttribute.MinLength); + Assert.Equal(int.Parse(value.MaxLength), validateLengthAttribute.MaxLength); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void ResolvesDuplicatedDynamicParameterNameSubstring() + { + string[] parameters = { "Username", "Location", "Mode" }; + string[] parameterSetNames = { "__AllParameterSets" }; + string key = "user"; + TemplateFileParameterV1 value = new TemplateFileParameterV1() + { + AllowedValues = new List() { "Mode1", "Mode2", "Mode3" }, + MaxLength = "5", + MinLength = "1", + Type = "bool" + }; + KeyValuePair parameter = new KeyValuePair(key, value); + + RuntimeDefinedParameter dynamicParameter = galleryTemplatesClient.ConstructDynamicParameter(parameters, parameter); + + Assert.Equal(key + "FromTemplate", dynamicParameter.Name); + Assert.Equal(value.DefaultValue, dynamicParameter.Value); + Assert.Equal(typeof(bool), dynamicParameter.ParameterType); + Assert.Equal(3, dynamicParameter.Attributes.Count); + + ParameterAttribute parameterAttribute = (ParameterAttribute)dynamicParameter.Attributes[0]; + Assert.True(parameterAttribute.Mandatory); + Assert.True(parameterAttribute.ValueFromPipelineByPropertyName); + Assert.Equal(parameterSetNames[0], parameterAttribute.ParameterSetName); + + ValidateSetAttribute validateSetAttribute = (ValidateSetAttribute)dynamicParameter.Attributes[1]; + Assert.Equal(3, validateSetAttribute.ValidValues.Count); + Assert.True(validateSetAttribute.IgnoreCase); + Assert.True(value.AllowedValues.Contains(validateSetAttribute.ValidValues[0])); + Assert.True(value.AllowedValues.Contains(validateSetAttribute.ValidValues[1])); + Assert.True(value.AllowedValues.Contains(validateSetAttribute.ValidValues[2])); + Assert.False(validateSetAttribute.ValidValues[0].Contains(' ')); + Assert.False(validateSetAttribute.ValidValues[1].Contains(' ')); + Assert.False(validateSetAttribute.ValidValues[2].Contains(' ')); + + ValidateLengthAttribute validateLengthAttribute = (ValidateLengthAttribute)dynamicParameter.Attributes[2]; + Assert.Equal(int.Parse(value.MinLength), validateLengthAttribute.MinLength); + Assert.Equal(int.Parse(value.MaxLength), validateLengthAttribute.MaxLength); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void ResolvesDuplicatedDynamicParameterNameCaseInsensitive() + { + string[] parameters = { "Name", "Location", "Mode" }; + string[] parameterSetNames = { "__AllParameterSets" }; + string key = "name"; + TemplateFileParameterV1 value = new TemplateFileParameterV1() + { + AllowedValues = new List() { "Mode1", "Mode2", "Mode3" }, + MaxLength = "5", + MinLength = "1", + Type = "bool" + }; + KeyValuePair parameter = new KeyValuePair(key, value); + + RuntimeDefinedParameter dynamicParameter = galleryTemplatesClient.ConstructDynamicParameter(parameters, parameter); + + Assert.Equal(key + "FromTemplate", dynamicParameter.Name); + Assert.Equal(value.DefaultValue, dynamicParameter.Value); + Assert.Equal(typeof(bool), dynamicParameter.ParameterType); + Assert.Equal(3, dynamicParameter.Attributes.Count); + + ParameterAttribute parameterAttribute = (ParameterAttribute)dynamicParameter.Attributes[0]; + Assert.True(parameterAttribute.Mandatory); + Assert.True(parameterAttribute.ValueFromPipelineByPropertyName); + Assert.Equal(parameterSetNames[0], parameterAttribute.ParameterSetName); + + ValidateSetAttribute validateSetAttribute = (ValidateSetAttribute)dynamicParameter.Attributes[1]; + Assert.Equal(3, validateSetAttribute.ValidValues.Count); + Assert.True(validateSetAttribute.IgnoreCase); + Assert.True(value.AllowedValues.Contains(validateSetAttribute.ValidValues[0])); + Assert.True(value.AllowedValues.Contains(validateSetAttribute.ValidValues[1])); + Assert.True(value.AllowedValues.Contains(validateSetAttribute.ValidValues[2])); + Assert.False(validateSetAttribute.ValidValues[0].Contains(' ')); + Assert.False(validateSetAttribute.ValidValues[1].Contains(' ')); + Assert.False(validateSetAttribute.ValidValues[2].Contains(' ')); + + ValidateLengthAttribute validateLengthAttribute = (ValidateLengthAttribute)dynamicParameter.Attributes[2]; + Assert.Equal(int.Parse(value.MinLength), validateLengthAttribute.MinLength); + Assert.Equal(int.Parse(value.MaxLength), validateLengthAttribute.MaxLength); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void ConstructsDynamicParameterNoValidation() + { + string[] parameters = { "Name", "Location", "Mode" }; + string[] parameterSetNames = { "__AllParameterSets" }; + string key = "computeMode"; + TemplateFileParameterV1 value = new TemplateFileParameterV1() + { + AllowedValues = new List(), + DefaultValue = "Mode1", + Type = "securestring" + }; + KeyValuePair parameter = new KeyValuePair(key, value); + + RuntimeDefinedParameter dynamicParameter = galleryTemplatesClient.ConstructDynamicParameter(parameters, parameter); + + Assert.Equal("computeMode", dynamicParameter.Name); + Assert.Equal(value.DefaultValue, dynamicParameter.Value); + Assert.Equal(typeof(SecureString), dynamicParameter.ParameterType); + Assert.Equal(1, dynamicParameter.Attributes.Count); + + ParameterAttribute parameterAttribute = (ParameterAttribute)dynamicParameter.Attributes[0]; + Assert.False(parameterAttribute.Mandatory); + Assert.True(parameterAttribute.ValueFromPipelineByPropertyName); + Assert.Equal(parameterSetNames[0], parameterAttribute.ParameterSetName); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void ConstructsDynamicParameterWithNullAllowedValues() + { + string[] parameters = { "Name", "Location", "Mode" }; + string[] parameterSetNames = { "__AllParameterSets" }; + string key = "computeMode"; + TemplateFileParameterV1 value = new TemplateFileParameterV1() + { + AllowedValues = null, + DefaultValue = "Mode1", + Type = "securestring" + }; + KeyValuePair parameter = new KeyValuePair(key, value); + + RuntimeDefinedParameter dynamicParameter = galleryTemplatesClient.ConstructDynamicParameter(parameters, parameter); + + Assert.Equal("computeMode", dynamicParameter.Name); + Assert.Equal(value.DefaultValue, dynamicParameter.Value); + Assert.Equal(typeof(SecureString), dynamicParameter.ParameterType); + Assert.Equal(1, dynamicParameter.Attributes.Count); + + ParameterAttribute parameterAttribute = (ParameterAttribute)dynamicParameter.Attributes[0]; + Assert.False(parameterAttribute.Mandatory); + Assert.True(parameterAttribute.ValueFromPipelineByPropertyName); + Assert.Equal(parameterSetNames[0], parameterAttribute.ParameterSetName); + } + + [Fact] + public void GetsDynamicParametersForTemplateFile() + { + RuntimeDefinedParameterDictionary result = galleryTemplatesClient.GetTemplateParametersFromFile( + templateFile, + null, + null, + new[] { "TestPS" }); + + Assert.Equal(4, result.Count); + + Assert.Equal("string", result["string"].Name); + Assert.Equal(typeof(string), result["String"].ParameterType); + + Assert.Equal("int", result["int"].Name); + Assert.Equal(typeof(int), result["int"].ParameterType); + + Assert.Equal("securestring", result["securestring"].Name); + Assert.Equal(typeof(SecureString), result["securestring"].ParameterType); + + Assert.Equal("bool", result["bool"].Name); + Assert.Equal(typeof(bool), result["bool"].ParameterType); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void GetTemplateParametersFromFileMergesObjects() + { + Hashtable hashtable = new Hashtable(); + hashtable["Bool"] = true; + hashtable["Foo"] = "bar"; + RuntimeDefinedParameterDictionary result = galleryTemplatesClient.GetTemplateParametersFromFile( + templateFile, + null, + templateParameterFileSchema1, + new[] { "TestPS" }); + + Assert.Equal(4, result.Count); + + Assert.Equal("string", result["string"].Name); + Assert.Equal(typeof(string), result["string"].ParameterType); + Assert.Equal("myvalue", result["string"].Value); + + + Assert.Equal("int", result["int"].Name); + Assert.Equal(typeof(int), result["int"].ParameterType); + Assert.Equal((System.Int64)12, result["int"].Value); + + Assert.Equal("bool", result["bool"].Name); + Assert.Equal(typeof(bool), result["bool"].ParameterType); + Assert.Equal(true, result["bool"].Value); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void GetTemplateParametersFromFileWithSchema2MergesObjects() + { + Hashtable hashtable = new Hashtable(); + hashtable["Bool"] = true; + hashtable["Foo"] = "bar"; + RuntimeDefinedParameterDictionary result = galleryTemplatesClient.GetTemplateParametersFromFile( + templateFile, + null, + templateParameterFileSchema2, + new[] { "TestPS" }); + + Assert.Equal(4, result.Count); + + Assert.Equal("string", result["string"].Name); + Assert.Equal(typeof(string), result["string"].ParameterType); + Assert.Equal("myvalue", result["string"].Value); + + + Assert.Equal("int", result["int"].Name); + Assert.Equal(typeof(int), result["int"].ParameterType); + Assert.Equal("12", result["int"].Value); + + Assert.Equal("bool", result["bool"].Name); + Assert.Equal(typeof(bool), result["bool"].ParameterType); + Assert.Equal("True", result["bool"].Value); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void HandlesInvalidTemplateFiles() + { + Hashtable hashtable = new Hashtable(); + hashtable["Bool"] = true; + hashtable["Foo"] = "bar"; + RuntimeDefinedParameterDictionary result = galleryTemplatesClient.GetTemplateParametersFromFile( + invalidTemplateFile, + null, + templateParameterFileSchema1, + new[] { "TestPS" }); + + Assert.Equal(0, result.Count); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void FiltersGalleryTemplates() + { + string filterString = FilterString.Generate(f => f.Publisher == "Microsoft"); + ItemListParameters actual = new ItemListParameters(); + galleryClientMock.Setup(f => f.Items.ListAsync(It.IsAny(), new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ItemListResult + { + Items = new List() + { + new GalleryItem() + { + Name = "Template1", + Publisher = "Microsoft" + }, + new GalleryItem() + { + Name = "Template2", + Publisher = "Microsoft" + } + } + })) + .Callback((ItemListParameters p, CancellationToken c) => actual = p); + + FilterGalleryTemplatesOptions options = new FilterGalleryTemplatesOptions() + { + Publisher = "Microsoft", + AllVersions = true + }; + + List result = galleryTemplatesClient.FilterGalleryTemplates(options); + + Assert.Equal(2, result.Count); + Assert.True(result.All(g => g.Publisher == "Microsoft")); + Assert.Equal(filterString, actual.Filter); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void FiltersGalleryTemplatesUsingComplexQuery() + { + string filterString = "Publisher eq 'Microsoft' and CategoryIds/any(c: c eq 'awesome')"; + ItemListParameters actual = new ItemListParameters(); + galleryClientMock.Setup(f => f.Items.ListAsync(It.IsAny(), new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ItemListResult + { + Items = new List() + { + new GalleryItem() + { + Name = "Template1", + Publisher = "Microsoft" + }, + new GalleryItem() + { + Name = "Template2", + Publisher = "Microsoft" + } + } + })) + .Callback((ItemListParameters p, CancellationToken c) => actual = p); + + FilterGalleryTemplatesOptions options = new FilterGalleryTemplatesOptions() + { + Publisher = "Microsoft", + Category = "awesome", + AllVersions = true + }; + + List result = galleryTemplatesClient.FilterGalleryTemplates(options); + + Assert.Equal(2, result.Count); + Assert.Equal(filterString, actual.Filter); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void DownloadsGalleryTemplateFile() + { + string galleryTemplateFileName = "myFile"; + string expectedFilePath = Path.Combine(Path.GetTempPath(), galleryTemplateFileName + ".json"); + try + { + galleryClientMock.Setup(f => f.Items.GetAsync(galleryTemplateFileName, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ItemGetParameters() + { + Item = new GalleryItem() + { + Name = galleryTemplateFileName, + Publisher = "Microsoft", + DefinitionTemplates = new DefinitionTemplates() + { + DefaultDeploymentTemplateId = "DefaultUri", + DeploymentTemplateFileUrls = new Dictionary() + { + {"DefaultUri", "fakeurl"} + } + } + } + })); + + galleryTemplatesClient.DownloadGalleryTemplateFile( + galleryTemplateFileName, + expectedFilePath, + true, + null); + + Assert.Equal(string.Empty, File.ReadAllText(expectedFilePath)); + } + finally + { + File.Delete(expectedFilePath); + } + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void DownloadsGalleryTemplateFileFromDirectoryName() + { + string galleryTemplateFileName = "myFile"; + string expectedFilePath = Path.Combine(Path.GetTempPath(), galleryTemplateFileName + ".json"); + try + { + galleryClientMock.Setup(f => f.Items.GetAsync(galleryTemplateFileName, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ItemGetParameters() + { + Item = new GalleryItem() + { + Name = galleryTemplateFileName, + Publisher = "Microsoft", + DefinitionTemplates = new DefinitionTemplates() + { + DefaultDeploymentTemplateId = "DefaultUri", + DeploymentTemplateFileUrls = new Dictionary() + { + { "DefaultUri", "fakeurl" } + } + } + } + })); + + galleryTemplatesClient.DownloadGalleryTemplateFile( + galleryTemplateFileName, + Path.GetTempPath(), + true, + null); + + Assert.Equal(string.Empty, File.ReadAllText(expectedFilePath)); + } + finally + { + File.Delete(expectedFilePath); + } + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void DownloadsGalleryTemplateFileFromFileName() + { + string galleryTemplateFileName = "myFile.adeek"; + string expectedFilePath = Path.Combine(Path.GetTempPath(), galleryTemplateFileName + ".json"); + try + { + galleryClientMock.Setup(f => f.Items.GetAsync(galleryTemplateFileName, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ItemGetParameters() + { + Item = new GalleryItem() + { + Name = galleryTemplateFileName, + Publisher = "Microsoft", + DefinitionTemplates = new DefinitionTemplates() + { + DefaultDeploymentTemplateId = "DefaultUri", + DeploymentTemplateFileUrls = new Dictionary() + { + {"DefaultUri", "http://onesdkauremustinvalid-uri12"} + } + } + } + })); + + galleryTemplatesClient.DownloadGalleryTemplateFile( + galleryTemplateFileName, + expectedFilePath, + true, + null); + + Assert.Equal(string.Empty, File.ReadAllText(expectedFilePath)); + } + finally + { + File.Delete(expectedFilePath); + } + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void ParseTemplateParameterFileContents_DeserializeWithCorrectType() + { + Dictionary result = + galleryTemplatesClient.ParseTemplateParameterFileContents(@"Resources\WebSite.param.dev.json"); + Assert.Equal(true, result["isWorker"].Value); + Assert.Equal((System.Int64)1, result["numberOfWorker"].Value); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void FiltersGalleryTemplatesLatestVersion() + { + string filterString = FilterString.Generate(f => f.Publisher == "Microsoft"); + ItemListParameters actual = new ItemListParameters(); + galleryClientMock.Setup(f => f.Items.ListAsync(It.IsAny(), new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ItemListResult + { + Items = new List() + { + new GalleryItem() + { + Name = "Template0", + Publisher = "Microsoft", + Version = "0.0.0.0" + }, + new GalleryItem() + { + Name = "Template0", + Publisher = "Microsoft", + Version = "0.0.0.1" + }, + new GalleryItem() + { + Name = "Template0", + Publisher = "Microsoft", + Version = "0.0.0.2" + } + } + })) + .Callback((ItemListParameters p, CancellationToken c) => actual = p); + + FilterGalleryTemplatesOptions options = new FilterGalleryTemplatesOptions() + { + ApplicationName = "Template0" + }; + + List result = galleryTemplatesClient.FilterGalleryTemplates(options); + + Assert.Equal(1, result.Count); + Assert.Equal("Template0", result[0].Name); + Assert.Equal("0.0.0.2", result[0].Version); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void FiltersGalleryTemplatesByPublisherLatestVersion() + { + string filterString = FilterString.Generate(f => f.Publisher == "Microsoft"); + ItemListParameters actual = new ItemListParameters(); + galleryClientMock.Setup(f => f.Items.ListAsync(It.IsAny(), new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ItemListResult + { + Items = new List() + { + new GalleryItem() + { + Name = "Template0", + Publisher = "Microsoft", + Version = "0.0.0.0" + }, + new GalleryItem() + { + Name = "Template0", + Publisher = "Microsoft", + Version = "0.0.0.2" + }, + new GalleryItem() + { + Name = "Template1", + Publisher = "Microsoft", + Version = "0.0.0.0" + }, + new GalleryItem() + { + Name = "Template1", + Publisher = "Microsoft", + Version = "0.0.0.1" + } + } + })) + .Callback((ItemListParameters p, CancellationToken c) => actual = p); + + FilterGalleryTemplatesOptions options = new FilterGalleryTemplatesOptions() + { + Publisher = "Microsoft" + }; + + List result = galleryTemplatesClient.FilterGalleryTemplates(options); + + Assert.Equal(2, result.Count); + Assert.True(result.Count(x => x.Name.Equals("Template0")) == 1); + Assert.True(result.Count(x => x.Name.Equals("Template1")) == 1); + Assert.Equal(result.First(x => x.Name.Equals("Template0")).Version, "0.0.0.2"); + Assert.Equal(result.First(x => x.Name.Equals("Template1")).Version, "0.0.0.1"); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ResourceClientTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ResourceClientTests.cs new file mode 100644 index 000000000000..36294e0a7132 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ResourceClientTests.cs @@ -0,0 +1,2523 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Runtime.Serialization.Formatters; +using System.Security; +using System.Text.RegularExpressions; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.Azure.Management.Authorization; +using Microsoft.Azure.Management.Resources; +using Microsoft.Azure.Management.Resources.Models; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Monitoring.Events; +using Microsoft.WindowsAzure.Management.Monitoring.Events.Models; +using Microsoft.WindowsAzure.Management.Monitoring.Models; +using Moq; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using Xunit; +using Xunit.Extensions; +using System.Diagnostics; + +namespace Microsoft.Azure.Commands.Resources.Test.Models +{ + public class ResourceClientTests : TestBase + { + private Mock resourceManagementClientMock; + + private Mock authorizationManagementClientMock; + + private Mock deploymentsMock; + + private Mock resourceGroupMock; + + private Mock resourceOperationsMock; + + private Mock galleryTemplatesClientMock; + + private Mock eventsClientMock; + + private Mock deploymentOperationsMock; + + private Mock eventDataOperationsMock; + + private Mock providersMock; + + private Mock permissionOperationsMock; + + private Mock> progressLoggerMock; + + private Mock> errorLoggerMock; + + private ResourcesClient resourcesClient; + + private string resourceGroupName = "myResourceGroup"; + + private string resourceGroupLocation = "West US"; + + private string deploymentName = "fooDeployment"; + + private string templateFile = @"Resources\sampleTemplateFile.json"; + + private string storageAccountName = "myStorageAccount"; + + private string requestId = "1234567890"; + + private string resourceName = "myResource"; + + private ResourceIdentity resourceIdentity; + + private Dictionary properties; + + private string serializedProperties; + + private List sampleEvents; + + private int ConfirmActionCounter = 0; + + private void ConfirmAction(bool force, string actionMessage, string processMessage, string target, Action action) + { + ConfirmActionCounter++; + action(); + } + + private int RejectActionCounter = 0; + + private void RejectAction(bool force, string actionMessage, string processMessage, string target, Action action) + { + RejectActionCounter++; + } + + private void SetupListForResourceGroupAsync(string name, List result) + { + resourceOperationsMock.Setup(f => f.ListAsync( + It.IsAny(), + new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceListResult + { + Resources = result + })); + } + + private void EqualsIgnoreWhitespace(string left, string right) + { + string normalized1 = Regex.Replace(left, @"\s", ""); + string normalized2 = Regex.Replace(right, @"\s", ""); + + Assert.Equal( + normalized1.ToLowerInvariant(), + normalized2.ToLowerInvariant()); + } + + public ResourceClientTests() + { + resourceManagementClientMock = new Mock(); + authorizationManagementClientMock = new Mock(); + deploymentsMock = new Mock(); + resourceGroupMock = new Mock(); + resourceOperationsMock = new Mock(); + galleryTemplatesClientMock = new Mock(); + eventsClientMock = new Mock(); + deploymentOperationsMock = new Mock(); + eventDataOperationsMock = new Mock(); + providersMock = new Mock(); + providersMock.Setup(f => f.ListAsync(null, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ProviderListResult + { + Providers = new List() + })); + progressLoggerMock = new Mock>(); + errorLoggerMock = new Mock>(); + permissionOperationsMock = new Mock(); + resourceManagementClientMock.Setup(f => f.Deployments).Returns(deploymentsMock.Object); + resourceManagementClientMock.Setup(f => f.ResourceGroups).Returns(resourceGroupMock.Object); + resourceManagementClientMock.Setup(f => f.Resources).Returns(resourceOperationsMock.Object); + resourceManagementClientMock.Setup(f => f.DeploymentOperations).Returns(deploymentOperationsMock.Object); + resourceManagementClientMock.Setup(f => f.Providers).Returns(providersMock.Object); + eventsClientMock.Setup(f => f.EventData).Returns(eventDataOperationsMock.Object); + authorizationManagementClientMock.Setup(f => f.Permissions).Returns(permissionOperationsMock.Object); + resourcesClient = new ResourcesClient( + resourceManagementClientMock.Object, + galleryTemplatesClientMock.Object, + eventsClientMock.Object, + authorizationManagementClientMock.Object) + { + VerboseLogger = progressLoggerMock.Object, + ErrorLogger = errorLoggerMock.Object + }; + + resourceIdentity = new ResourceIdentity + { + ParentResourcePath = "sites/siteA", + ResourceName = "myResource", + ResourceProviderNamespace = "Microsoft.Web", + ResourceType = "sites" + }; + properties = new Dictionary + { + {"name", "site1"}, + {"siteMode", "Standard"}, + {"computeMode", "Dedicated"}, + {"misc", new Dictionary + { + {"key1", "value1"}, + {"key2", "value2"} + }} + }; + serializedProperties = JsonConvert.SerializeObject(properties, new JsonSerializerSettings + { + TypeNameAssemblyFormat = FormatterAssemblyStyle.Simple, + TypeNameHandling = TypeNameHandling.None + }); + + sampleEvents = new List(); + sampleEvents.Add(new EventData + { + EventDataId = "ac7d2ab5-698a-4c33-9c19-0a93d3d7f527", + EventName = new LocalizableString { LocalizedValue = "Start request" }, + EventSource = new LocalizableString { LocalizedValue = "Microsoft Resources" }, + EventChannels = EventChannels.Operation, + Level = EventLevel.Informational, + EventTimestamp = DateTime.Now, + OperationId = "c0f2e85f-efb0-47d0-bf90-f983ec8be91d", + SubscriptionId = "c0f2e85f-efb0-47d0-bf90-f983ec8be91d", + CorrelationId = "c0f2e85f-efb0-47d0-bf90-f983ec8be91d", + OperationName = + new LocalizableString + { + LocalizedValue = "Microsoft.Resources/subscriptions/resourcegroups/deployments/write" + }, + Status = new LocalizableString { LocalizedValue = "Succeeded" }, + SubStatus = new LocalizableString { LocalizedValue = "Created" }, + ResourceGroupName = "foo", + ResourceProviderName = new LocalizableString { LocalizedValue = "Microsoft Resources" }, + ResourceUri = + "/subscriptions/ffce8037-a374-48bf-901d-dac4e3ea8c09/resourcegroups/foo/deployments/testdeploy", + HttpRequest = new HttpRequestInfo + { + Uri = + "http://path/subscriptions/ffce8037-a374-48bf-901d-dac4e3ea8c09/resourcegroups/foo/deployments/testdeploy", + Method = "PUT", + ClientRequestId = "1234", + ClientIpAddress = "123.123.123.123" + }, + Authorization = new SenderAuthorization + { + Action = "PUT", + Condition = "", + Role = "Sender", + Scope = "None" + }, + Claims = new Dictionary + { + {"aud", "https://management.core.windows.net/"}, + {"iss", "https://sts.windows.net/123456/"}, + {"iat", "h123445"}, + {"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name", "info@mail.com"} + }, + Properties = new Dictionary() + }); + sampleEvents.Add(new EventData + { + EventDataId = "ac7d2ab5-698a-4c33-9c19-0sdfsdf34r54", + EventName = new LocalizableString { LocalizedValue = "End request" }, + EventSource = new LocalizableString { LocalizedValue = "Microsoft Resources" }, + EventChannels = EventChannels.Operation, + Level = EventLevel.Informational, + EventTimestamp = DateTime.Now, + OperationId = "c0f2e85f-efb0-47d0-bf90-f983ec8be91d", + OperationName = + new LocalizableString + { + LocalizedValue = "Microsoft.Resources/subscriptions/resourcegroups/deployments/write" + }, + Status = new LocalizableString { LocalizedValue = "Succeeded" }, + SubStatus = new LocalizableString { LocalizedValue = "Created" }, + ResourceGroupName = "foo", + ResourceProviderName = new LocalizableString { LocalizedValue = "Microsoft Resources" }, + ResourceUri = + "/subscriptions/ffce8037-a374-48bf-901d-dac4e3ea8c09/resourcegroups/foo/deployments/testdeploy", + HttpRequest = new HttpRequestInfo + { + Uri = + "http://path/subscriptions/ffce8037-a374-48bf-901d-dac4e3ea8c09/resourcegroups/foo/deployments/testdeploy", + Method = "PUT", + ClientRequestId = "1234", + ClientIpAddress = "123.123.123.123" + }, + Authorization = new SenderAuthorization + { + Action = "PUT", + Condition = "", + Role = "Sender", + Scope = "None" + }, + Claims = new Dictionary + { + {"aud", "https://management.core.windows.net/"}, + {"iss", "https://sts.windows.net/123456/"}, + {"iat", "h123445"} + }, + Properties = new Dictionary() + }); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void NewResourceGroupChecksForPermissionForExistingResource() + { + RejectActionCounter = 0; + CreatePSResourceGroupParameters parameters = new CreatePSResourceGroupParameters() { ResourceGroupName = resourceGroupName, ConfirmAction = RejectAction }; + resourceGroupMock.Setup(f => f.CheckExistenceAsync(parameters.ResourceGroupName, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupExistsResult + { + Exists = true + })); + + resourceGroupMock.Setup(f => f.GetAsync( + parameters.ResourceGroupName, + new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupGetResult + { + ResourceGroup = new ResourceGroup() { Name = parameters.ResourceGroupName, Location = parameters.Location } + })); + + resourceOperationsMock.Setup(f => f.ListAsync(It.IsAny(), It.IsAny())) + .Returns(() => Task.Factory.StartNew(() => new ResourceListResult + { + StatusCode = HttpStatusCode.OK, + Resources = new List(new[] + { + new Resource + { + Name = "foo", + Properties = null, + ProvisioningState = ProvisioningState.Running, + Location = "West US" + }, + new Resource + { + Name = "bar", + Properties = null, + ProvisioningState = ProvisioningState.Running, + Location = "West US" + } + }) + + })); + + resourcesClient.CreatePSResourceGroup(parameters); + Assert.Equal(1, RejectActionCounter); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void NewResourceGroupWithGalleryTemplateAndWithoutStorageAccountNameSucceeds() + { + CreatePSResourceGroupParameters parameters = new CreatePSResourceGroupParameters() + { + ResourceGroupName = resourceGroupName, + Location = resourceGroupLocation, + ConfirmAction = ConfirmAction, + GalleryTemplateIdentity = "templateFile" + }; + galleryTemplatesClientMock.Setup(f => f.GetGalleryTemplateFile("templateFile")).Returns("http://microsoft.com"); + resourceGroupMock.Setup(f => f.CheckExistenceAsync(parameters.ResourceGroupName, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupExistsResult + { + Exists = false + })); + + resourceGroupMock.Setup(f => f.CreateOrUpdateAsync( + parameters.ResourceGroupName, + It.IsAny(), + new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupCreateOrUpdateResult + { + ResourceGroup = new ResourceGroup() { Name = parameters.ResourceGroupName, Location = parameters.Location } + })); + resourceGroupMock.Setup(f => f.GetAsync(resourceGroupName, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupGetResult + { + ResourceGroup = new ResourceGroup() + { + Name = resourceGroupName, + Location = resourceGroupLocation + } + })); + SetupListForResourceGroupAsync(parameters.ResourceGroupName, new List()); + deploymentsMock.Setup(f => f.ValidateAsync(resourceGroupName, It.IsAny(), It.IsAny(), new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentValidateResponse + { + IsValid = true + })); + deploymentsMock.Setup(f => f.GetAsync(resourceGroupName, It.IsAny(), new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentGetResult + { + Deployment = new Deployment() + { + Properties = new DeploymentProperties() + { + ProvisioningState = ProvisioningState.Succeeded + } + } + })); + deploymentOperationsMock.Setup(f => f.ListAsync(resourceGroupName, It.IsAny(), null, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentOperationsListResult + { + Operations = new List() + })); + + PSResourceGroup result = resourcesClient.CreatePSResourceGroup(parameters); + + Assert.Equal(parameters.ResourceGroupName, result.ResourceGroupName); + Assert.Equal(parameters.Location, result.Location); + Assert.Empty(result.Resources); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void NewResourceGroupWithoutDeploymentSucceeds() + { + CreatePSResourceGroupParameters parameters = new CreatePSResourceGroupParameters() + { + ResourceGroupName = resourceGroupName, + Location = resourceGroupLocation, + ConfirmAction = ConfirmAction + }; + resourceGroupMock.Setup(f => f.CheckExistenceAsync(parameters.ResourceGroupName, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupExistsResult + { + Exists = false + })); + + resourceGroupMock.Setup(f => f.CreateOrUpdateAsync( + parameters.ResourceGroupName, + It.IsAny(), + new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupCreateOrUpdateResult + { + ResourceGroup = new ResourceGroup() { Name = parameters.ResourceGroupName, Location = parameters.Location } + })); + SetupListForResourceGroupAsync(parameters.ResourceGroupName, new List()); + + PSResourceGroup result = resourcesClient.CreatePSResourceGroup(parameters); + + Assert.Equal(parameters.ResourceGroupName, result.ResourceGroupName); + Assert.Equal(parameters.Location, result.Location); + Assert.Empty(result.Resources); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void NewResourceWithExistingResourceAsksForUserConfirmation() + { + CreatePSResourceParameters parameters = new CreatePSResourceParameters() + { + Location = "West US", + Name = resourceIdentity.ResourceName, + ParentResource = resourceIdentity.ParentResourcePath, + PropertyObject = new Hashtable(properties), + ResourceGroupName = resourceGroupName, + ResourceType = resourceIdentity.ResourceProviderNamespace + "/" + resourceIdentity.ResourceType, + ConfirmAction = RejectAction + }; + + RejectActionCounter = 0; + + resourceOperationsMock.Setup(f => f.CheckExistenceAsync(resourceGroupName, It.IsAny(), It.IsAny())) + .Returns(Task.Factory.StartNew(() => new ResourceExistsResult + { + Exists = true + })); + + resourceGroupMock.Setup(f => f.CheckExistenceAsync(resourceGroupName, It.IsAny())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupExistsResult + { + Exists = true + })); + + resourceOperationsMock.Setup(f => f.GetAsync(resourceGroupName, It.IsAny(), It.IsAny())) + .Returns(Task.Factory.StartNew(() => new ResourceGetResult + { + Resource = new Resource + { + Location = "West US", + Properties = serializedProperties, + ProvisioningState = ProvisioningState.Running + } + })); + + resourcesClient.CreatePSResource(parameters); + Assert.Equal(1, RejectActionCounter); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void NewResourceWithIncorrectTypeThrowsException() + { + CreatePSResourceParameters parameters = new CreatePSResourceParameters() + { + Location = "West US", + Name = resourceIdentity.ResourceName, + ParentResource = resourceIdentity.ParentResourcePath, + PropertyObject = new Hashtable(properties), + ResourceGroupName = resourceGroupName, + ResourceType = "abc", + ConfirmAction = ConfirmAction + }; + + Assert.Throws(() => resourcesClient.CreatePSResource(parameters)); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void NewResourceWithAllParametersSucceeds() + { + CreatePSResourceParameters parameters = new CreatePSResourceParameters() + { + Location = "West US", + Name = resourceIdentity.ResourceName, + ParentResource = resourceIdentity.ParentResourcePath, + PropertyObject = new Hashtable(properties), + ResourceGroupName = resourceGroupName, + ResourceType = resourceIdentity.ResourceProviderNamespace + "/" + resourceIdentity.ResourceType, + ConfirmAction = ConfirmAction + }; + + resourceOperationsMock.Setup(f => f.GetAsync(resourceGroupName, It.IsAny(), It.IsAny())) + .Returns(() => Task.Factory.StartNew(() => new ResourceGetResult + { + StatusCode = HttpStatusCode.OK, + Resource = new Resource + { + Name = parameters.Name, + Location = parameters.Location, + Properties = serializedProperties, + ProvisioningState = ProvisioningState.Running, + } + })); + + resourceGroupMock.Setup(f => f.CheckExistenceAsync(resourceGroupName, It.IsAny())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupExistsResult + { + Exists = true + })); + + resourceOperationsMock.Setup(f => f.CheckExistenceAsync(resourceGroupName, It.IsAny(), It.IsAny())) + .Returns(Task.Factory.StartNew(() => new ResourceExistsResult + { + Exists = false + })); + + resourceOperationsMock.Setup(f => f.CreateOrUpdateAsync(resourceGroupName, It.IsAny(), It.IsAny(), It.IsAny())) + .Returns(Task.Factory.StartNew(() => new ResourceCreateOrUpdateResult + { + RequestId = "123", + StatusCode = HttpStatusCode.OK, + Resource = new Resource + { + Location = "West US", + Properties = serializedProperties, + ProvisioningState = ProvisioningState.Running + } + })); + + PSResource result = resourcesClient.CreatePSResource(parameters); + + Assert.NotNull(result); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void SetResourceWithoutExistingResourceThrowsException() + { + UpdatePSResourceParameters parameters = new UpdatePSResourceParameters() + { + Name = resourceIdentity.ResourceName, + ParentResource = resourceIdentity.ParentResourcePath, + PropertyObject = new Hashtable(properties), + ResourceGroupName = resourceGroupName, + ResourceType = resourceIdentity.ResourceProviderNamespace + "/" + resourceIdentity.ResourceType, + }; + + resourceOperationsMock.Setup(f => f.GetAsync(resourceGroupName, It.IsAny(), It.IsAny())) + .Returns(() => { throw new CloudException("Resource does not exist."); }); + + Assert.Throws(() => resourcesClient.UpdatePSResource(parameters)); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void SetResourceWithIncorrectTypeThrowsException() + { + UpdatePSResourceParameters parameters = new UpdatePSResourceParameters() + { + Name = resourceIdentity.ResourceName, + ParentResource = resourceIdentity.ParentResourcePath, + PropertyObject = new Hashtable(properties), + ResourceGroupName = resourceGroupName, + ResourceType = "abc", + }; + + Assert.Throws(() => resourcesClient.UpdatePSResource(parameters)); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void SetResourceWithAllParameters() + { + UpdatePSResourceParameters parameters = new UpdatePSResourceParameters() + { + Name = resourceIdentity.ResourceName, + ParentResource = resourceIdentity.ParentResourcePath, + PropertyObject = new Hashtable(properties), + ResourceGroupName = resourceGroupName, + ResourceType = resourceIdentity.ResourceProviderNamespace + "/" + resourceIdentity.ResourceType, + }; + + resourceOperationsMock.Setup(f => f.GetAsync(resourceGroupName, It.IsAny(), It.IsAny())) + .Returns(() => Task.Factory.StartNew(() => new ResourceGetResult + { + StatusCode = HttpStatusCode.OK, + Resource = new Resource + { + Name = parameters.Name, + Location = "West US", + Properties = serializedProperties, + ProvisioningState = ProvisioningState.Running, + } + })); + + resourceOperationsMock.Setup(f => f.CreateOrUpdateAsync(resourceGroupName, It.IsAny(), It.IsAny(), It.IsAny())) + .Returns(Task.Factory.StartNew(() => new ResourceCreateOrUpdateResult + { + RequestId = "123", + StatusCode = HttpStatusCode.OK, + Resource = new Resource + { + Location = "West US", + Properties = serializedProperties, + ProvisioningState = ProvisioningState.Running + } + })); + + PSResource result = resourcesClient.UpdatePSResource(parameters); + + Assert.NotNull(result); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void SetResourceWithReplaceRewritesResource() + { + var originalProperties = new Dictionary + { + {"name", "site1"}, + {"siteMode", "Standard"}, + {"computeMode", "Dedicated"}, + {"list", new [] {1,2,3}}, + {"misc", new Dictionary + { + {"key1", "value1"}, + {"key2", "value2"} + }}}; + + var originalPropertiesSerialized = JsonConvert.SerializeObject(originalProperties, new JsonSerializerSettings + { + TypeNameAssemblyFormat = FormatterAssemblyStyle.Simple, + TypeNameHandling = TypeNameHandling.None + }); + + var patchProperties = new Dictionary + { + {"siteMode", "Dedicated"}, + {"newMode", "NewValue"}, + {"list", new [] {4,5,6}}, + {"misc", new Dictionary + { + {"key3", "value3"} + }}}; + + UpdatePSResourceParameters parameters = new UpdatePSResourceParameters() + { + Name = resourceIdentity.ResourceName, + ParentResource = resourceIdentity.ParentResourcePath, + PropertyObject = new Hashtable(patchProperties), + ResourceGroupName = resourceGroupName, + ResourceType = resourceIdentity.ResourceProviderNamespace + "/" + resourceIdentity.ResourceType + }; + + BasicResource actual = new BasicResource(); + + resourceOperationsMock.Setup(f => f.GetAsync(resourceGroupName, It.IsAny(), It.IsAny())) + .Returns(() => Task.Factory.StartNew(() => new ResourceGetResult + { + StatusCode = HttpStatusCode.OK, + Resource = new Resource + { + Name = parameters.Name, + Location = "West US", + Properties = originalPropertiesSerialized, + ProvisioningState = ProvisioningState.Running, + } + })); + + resourceOperationsMock.Setup(f => f.CreateOrUpdateAsync(resourceGroupName, It.IsAny(), It.IsAny(), It.IsAny())) + .Returns(Task.Factory.StartNew(() => new ResourceCreateOrUpdateResult + { + RequestId = "123", + StatusCode = HttpStatusCode.OK, + Resource = new Resource + { + Location = "West US", + Properties = originalPropertiesSerialized, + ProvisioningState = ProvisioningState.Running + } + })) + .Callback((string groupName, ResourceIdentity id, BasicResource p, CancellationToken token) => actual = p); + + resourcesClient.UpdatePSResource(parameters); + + JToken actualJson = JToken.Parse(actual.Properties); + + Assert.Null(actualJson["name"]); + Assert.Equal("Dedicated", actualJson["siteMode"].ToObject()); + Assert.Null(actualJson["computeMode"]); + Assert.Equal("NewValue", actualJson["newMode"].ToObject()); + Assert.Equal("[4,5,6]", actualJson["list"].ToString(Formatting.None)); + Assert.Null(actualJson["misc"]["key1"]); + Assert.Null(actualJson["misc"]["key2"]); + Assert.Equal("value3", actualJson["misc"]["key3"].ToObject()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void RemoveResourceWithoutExistingResourceThrowsException() + { + BasePSResourceParameters parameters = new BasePSResourceParameters() + { + Name = resourceIdentity.ResourceName, + ParentResource = resourceIdentity.ParentResourcePath, + ResourceGroupName = resourceGroupName, + ResourceType = resourceIdentity.ResourceProviderNamespace + "/" + resourceIdentity.ResourceType, + }; + + resourceOperationsMock.Setup(f => f.CheckExistenceAsync(resourceGroupName, It.IsAny(), It.IsAny())) + .Returns(() => Task.Factory.StartNew(() => new ResourceExistsResult + { + Exists = false + } + )); + + Assert.Throws(() => resourcesClient.DeleteResource(parameters)); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void RemoveResourceWithIncorrectTypeThrowsException() + { + BasePSResourceParameters parameters = new BasePSResourceParameters() + { + Name = resourceIdentity.ResourceName, + ParentResource = resourceIdentity.ParentResourcePath, + ResourceGroupName = resourceGroupName, + ResourceType = "abc", + }; + + Assert.Throws(() => resourcesClient.DeleteResource(parameters)); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void RemoveResourceWithAllParametersSucceeds() + { + BasePSResourceParameters parameters = new BasePSResourceParameters() + { + Name = resourceIdentity.ResourceName, + ParentResource = resourceIdentity.ParentResourcePath, + ResourceGroupName = resourceGroupName, + ResourceType = resourceIdentity.ResourceProviderNamespace + "/" + resourceIdentity.ResourceType, + }; + + resourceOperationsMock.Setup(f => f.CheckExistenceAsync(resourceGroupName, It.IsAny(), It.IsAny())) + .Returns(() => Task.Factory.StartNew(() => new ResourceExistsResult + { + Exists = true + } + )); + + resourceOperationsMock.Setup(f => f.DeleteAsync(resourceGroupName, It.IsAny(), It.IsAny())) + .Returns(Task.Factory.StartNew(() => new OperationResponse + { + RequestId = "123", + StatusCode = HttpStatusCode.OK + })); + + resourcesClient.DeleteResource(parameters); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void GetResourceWithAllParametersReturnsOneItem() + { + BasePSResourceParameters parameters = new BasePSResourceParameters() + { + Name = resourceIdentity.ResourceName, + ParentResource = resourceIdentity.ParentResourcePath, + ResourceGroupName = resourceGroupName, + ResourceType = resourceIdentity.ResourceProviderNamespace + "/" + resourceIdentity.ResourceType, + }; + + resourceGroupMock.Setup(f => f.CheckExistenceAsync(parameters.ResourceGroupName, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupExistsResult + { + Exists = true + })); + + resourceOperationsMock.Setup(f => f.GetAsync(resourceGroupName, It.IsAny(), It.IsAny())) + .Returns(() => Task.Factory.StartNew(() => new ResourceGetResult + { + StatusCode = HttpStatusCode.OK, + Resource = new Resource + { + Name = parameters.Name, + Properties = serializedProperties, + ProvisioningState = ProvisioningState.Running, + Location = "West US", + } + })); + + + List result = resourcesClient.FilterPSResources(parameters); + + Assert.NotNull(result); + Assert.Equal(1, result.Count); + Assert.Equal(4, result[0].Properties.Count); + Assert.Equal(2, ((Dictionary)result[0].Properties["misc"]).Count); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void GetResourceWithSomeParametersReturnsList() + { + BasePSResourceParameters parameters = new BasePSResourceParameters() + { + ResourceGroupName = resourceGroupName, + }; + + resourceGroupMock.Setup(f => f.CheckExistenceAsync(parameters.ResourceGroupName, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupExistsResult + { + Exists = true + })); + + resourceOperationsMock.Setup(f => f.ListAsync(It.IsAny(), It.IsAny())) + .Returns(() => Task.Factory.StartNew(() => new ResourceListResult + { + StatusCode = HttpStatusCode.OK, + Resources = new List(new[] + { + new Resource + { + Name = "foo", + Properties = null, + ProvisioningState = ProvisioningState.Running, + Location = "West US" + }, + new Resource + { + Name = "bar", + Properties = null, + ProvisioningState = ProvisioningState.Running, + Location = "West US" + } + }) + + })); + + + List result = resourcesClient.FilterPSResources(parameters); + + Assert.NotNull(result); + Assert.Equal(2, result.Count); + Assert.False(result.Any(r => r.Properties != null)); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void GetResourceWithIncorrectTypeThrowsException() + { + BasePSResourceParameters parameters = new BasePSResourceParameters() + { + Name = resourceIdentity.ResourceName, + ParentResource = resourceIdentity.ParentResourcePath, + ResourceGroupName = resourceGroupName, + ResourceType = "abc", + }; + + resourceGroupMock.Setup(f => f.CheckExistenceAsync(parameters.ResourceGroupName, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupExistsResult + { + Exists = true + })); + + Assert.Throws(() => resourcesClient.FilterPSResources(parameters)); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void NewResourceGroupFailsWithInvalidDeployment() + { + Uri templateUri = new Uri("http://templateuri.microsoft.com"); + BasicDeployment deploymentFromGet = new BasicDeployment(); + BasicDeployment deploymentFromValidate = new BasicDeployment(); + CreatePSResourceGroupParameters parameters = new CreatePSResourceGroupParameters() + { + ResourceGroupName = resourceGroupName, + Location = resourceGroupLocation, + DeploymentName = deploymentName, + TemplateFile = templateFile, + StorageAccountName = storageAccountName, + ConfirmAction = ConfirmAction + }; + resourceGroupMock.Setup(f => f.CheckExistenceAsync(parameters.ResourceGroupName, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupExistsResult + { + Exists = false + })); + + resourceGroupMock.Setup(f => f.CreateOrUpdateAsync( + parameters.ResourceGroupName, + It.IsAny(), + new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupCreateOrUpdateResult + { + ResourceGroup = new ResourceGroup() { Name = parameters.ResourceGroupName, Location = parameters.Location } + })); + resourceGroupMock.Setup(f => f.GetAsync(resourceGroupName, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupGetResult + { + ResourceGroup = new ResourceGroup() { Location = resourceGroupLocation } + })); + deploymentsMock.Setup(f => f.CreateOrUpdateAsync(resourceGroupName, deploymentName, It.IsAny(), new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentOperationsCreateResult + { + RequestId = requestId + })) + .Callback((string name, string dName, BasicDeployment bDeploy, CancellationToken token) => { deploymentFromGet = bDeploy; }); + deploymentsMock.Setup(f => f.GetAsync(resourceGroupName, deploymentName, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentGetResult + { + Deployment = new Deployment + { + Name = deploymentName, + Properties = new DeploymentProperties() + { + Mode = DeploymentMode.Incremental, + ProvisioningState = ProvisioningState.Succeeded + }, + } + })); + deploymentsMock.Setup(f => f.ValidateAsync(resourceGroupName, It.IsAny(), It.IsAny(), new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentValidateResponse + { + Error = new ResourceManagementErrorWithDetails() + { + Code = "404", + Message = "Awesome error message", + Target = "Bad deployment" + } + })) + .Callback((string rg, string dn, BasicDeployment d, CancellationToken c) => { deploymentFromValidate = d; }); + SetupListForResourceGroupAsync(parameters.ResourceGroupName, new List() { new Resource() { Name = "website" } }); + deploymentOperationsMock.Setup(f => f.ListAsync(resourceGroupName, deploymentName, null, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentOperationsListResult + { + Operations = new List() + { + new DeploymentOperation() + { + OperationId = Guid.NewGuid().ToString(), + Properties = new DeploymentOperationProperties() + { + ProvisioningState = ProvisioningState.Succeeded, + TargetResource = new TargetResource() + { + ResourceName = resourceName, + ResourceType = "Microsoft.Website" + } + } + } + } + })); + + Assert.Throws(() => resourcesClient.CreatePSResourceGroup(parameters)); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestTemplateShowsErrorMessage() + { + Uri templateUri = new Uri("http://templateuri.microsoft.com"); + BasicDeployment deploymentFromValidate = new BasicDeployment(); + ValidatePSResourceGroupDeploymentParameters parameters = new ValidatePSResourceGroupDeploymentParameters() + { + ResourceGroupName = resourceGroupName, + TemplateFile = templateFile, + StorageAccountName = storageAccountName, + }; + resourceGroupMock.Setup(f => f.CheckExistenceAsync(parameters.ResourceGroupName, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupExistsResult + { + Exists = true + })); + deploymentsMock.Setup(f => f.ValidateAsync(resourceGroupName, It.IsAny(), It.IsAny(), new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentValidateResponse + { + IsValid = false, + Error = new ResourceManagementErrorWithDetails() + { + Code = "404", + Message = "Awesome error message", + Details = new List(new[] { new ResourceManagementError + { + Code = "SubError", + Message = "Sub error message" + }}) + } + })) + .Callback((string rg, string dn, BasicDeployment d, CancellationToken c) => { deploymentFromValidate = d; }); + + IEnumerable error = resourcesClient.ValidatePSResourceGroupDeployment(parameters); + Assert.Equal(2, error.Count()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestTemplateShowsSuccessMessage() + { + Uri templateUri = new Uri("http://templateuri.microsoft.com"); + BasicDeployment deploymentFromValidate = new BasicDeployment(); + ValidatePSResourceGroupDeploymentParameters parameters = new ValidatePSResourceGroupDeploymentParameters() + { + ResourceGroupName = resourceGroupName, + TemplateFile = templateFile, + StorageAccountName = storageAccountName, + }; + resourceGroupMock.Setup(f => f.CheckExistenceAsync(parameters.ResourceGroupName, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupExistsResult + { + Exists = true + })); + deploymentsMock.Setup(f => f.ValidateAsync(resourceGroupName, It.IsAny(), It.IsAny(), new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentValidateResponse + { + IsValid = true, + Error = new ResourceManagementErrorWithDetails() + { + Code = "404", + Message = "Awesome error message", + Details = new List(new[] { new ResourceManagementError + { + Code = "SubError", + Message = "Sub error message" + }}) + } + })) + .Callback((string rg, string dn, BasicDeployment d, CancellationToken c) => { deploymentFromValidate = d; }); + + IEnumerable error = resourcesClient.ValidatePSResourceGroupDeployment(parameters); + Assert.Equal(0, error.Count()); + progressLoggerMock.Verify(f => f("Template is valid."), Times.Once()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void NewResourceGroupUsesDeploymentNameForDeploymentName() + { + string deploymentName = "abc123"; + BasicDeployment deploymentFromGet = new BasicDeployment(); + BasicDeployment deploymentFromValidate = new BasicDeployment(); + CreatePSResourceGroupParameters parameters = new CreatePSResourceGroupParameters() + { + ResourceGroupName = resourceGroupName, + Location = resourceGroupLocation, + DeploymentName = deploymentName, + GalleryTemplateIdentity = "abc", + StorageAccountName = storageAccountName, + ConfirmAction = ConfirmAction + }; + + galleryTemplatesClientMock.Setup(g => g.GetGalleryTemplateFile(It.IsAny())).Returns("http://path/file.html"); + + deploymentsMock.Setup(f => f.ValidateAsync(It.IsAny(), It.IsAny(), It.IsAny(), new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentValidateResponse + { + IsValid = true, + Error = new ResourceManagementErrorWithDetails() + })) + .Callback((string rg, string dn, BasicDeployment d, CancellationToken c) => { deploymentFromValidate = d; }); + + deploymentsMock.Setup(f => f.CreateOrUpdateAsync(It.IsAny(), It.IsAny(), It.IsAny(), new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentOperationsCreateResult + { + RequestId = requestId + })) + .Callback((string name, string dName, BasicDeployment bDeploy, CancellationToken token) => { deploymentFromGet = bDeploy; deploymentName = dName; }); + + SetupListForResourceGroupAsync(parameters.ResourceGroupName, new List() { new Resource() { Name = "website" } }); + + var operationId = Guid.NewGuid().ToString(); + var operationQueue = new Queue(); + operationQueue.Enqueue( + new DeploymentOperation() + { + OperationId = operationId, + Properties = new DeploymentOperationProperties() + { + ProvisioningState = ProvisioningState.Accepted, + TargetResource = new TargetResource() + { + ResourceType = "Microsoft.Website", + ResourceName = resourceName + } + } + } + ); + operationQueue.Enqueue( + new DeploymentOperation() + { + OperationId = operationId, + Properties = new DeploymentOperationProperties() + { + ProvisioningState = ProvisioningState.Running, + TargetResource = new TargetResource() + { + ResourceType = "Microsoft.Website", + ResourceName = resourceName + } + } + } + ); + operationQueue.Enqueue( + new DeploymentOperation() + { + OperationId = operationId, + Properties = new DeploymentOperationProperties() + { + ProvisioningState = ProvisioningState.Succeeded, + TargetResource = new TargetResource() + { + ResourceType = "Microsoft.Website", + ResourceName = resourceName + } + } + } + ); + deploymentOperationsMock.SetupSequence(f => f.ListAsync(It.IsAny(), It.IsAny(), null, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentOperationsListResult + { + Operations = new List() + { + operationQueue.Dequeue() + } + })) + .Returns(Task.Factory.StartNew(() => new DeploymentOperationsListResult + { + Operations = new List() + { + operationQueue.Dequeue() + } + })) + .Returns(Task.Factory.StartNew(() => new DeploymentOperationsListResult + { + Operations = new List() + { + operationQueue.Dequeue() + } + })); + + var deploymentQueue = new Queue(); + deploymentQueue.Enqueue(new Deployment + { + Name = deploymentName, + Properties = new DeploymentProperties() + { + Mode = DeploymentMode.Incremental, + CorrelationId = "123", + ProvisioningState = ProvisioningState.Accepted + } + }); + deploymentQueue.Enqueue(new Deployment + { + Name = deploymentName, + Properties = new DeploymentProperties() + { + Mode = DeploymentMode.Incremental, + CorrelationId = "123", + ProvisioningState = ProvisioningState.Running + } + }); + deploymentQueue.Enqueue(new Deployment + { + Name = deploymentName, + Properties = new DeploymentProperties() + { + Mode = DeploymentMode.Incremental, + CorrelationId = "123", + ProvisioningState = ProvisioningState.Succeeded + } + }); + deploymentsMock.SetupSequence(f => f.GetAsync(It.IsAny(), It.IsAny(), new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentGetResult + { + Deployment = deploymentQueue.Dequeue() + })) + .Returns(Task.Factory.StartNew(() => new DeploymentGetResult + { + Deployment = deploymentQueue.Dequeue() + })) + .Returns(Task.Factory.StartNew(() => new DeploymentGetResult + { + Deployment = deploymentQueue.Dequeue() + })); + + PSResourceGroupDeployment result = resourcesClient.ExecuteDeployment(parameters); + Assert.Equal(deploymentName, deploymentName); + Assert.Equal(ProvisioningState.Succeeded, result.ProvisioningState); + progressLoggerMock.Verify( + f => f(string.Format("Resource {0} '{1}' provisioning status is {2}", "Microsoft.Website", resourceName, ProvisioningState.Accepted.ToLower())), + Times.Once()); + progressLoggerMock.Verify( + f => f(string.Format("Resource {0} '{1}' provisioning status is {2}", "Microsoft.Website", resourceName, ProvisioningState.Running.ToLower())), + Times.Once()); + progressLoggerMock.Verify( + f => f(string.Format("Resource {0} '{1}' provisioning status is {2}", "Microsoft.Website", resourceName, ProvisioningState.Succeeded.ToLower())), + Times.Once()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void NewResourceGroupWithDeploymentSucceeds() + { + Uri templateUri = new Uri("http://templateuri.microsoft.com"); + BasicDeployment deploymentFromGet = new BasicDeployment(); + BasicDeployment deploymentFromValidate = new BasicDeployment(); + CreatePSResourceGroupParameters parameters = new CreatePSResourceGroupParameters() + { + ResourceGroupName = resourceGroupName, + Location = resourceGroupLocation, + DeploymentName = deploymentName, + TemplateFile = templateFile, + StorageAccountName = storageAccountName, + ConfirmAction = ConfirmAction + }; + resourceGroupMock.Setup(f => f.CheckExistenceAsync(parameters.ResourceGroupName, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupExistsResult + { + Exists = false + })); + + resourceGroupMock.Setup(f => f.CreateOrUpdateAsync( + parameters.ResourceGroupName, + It.IsAny(), + new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupCreateOrUpdateResult + { + ResourceGroup = new ResourceGroup() { Name = parameters.ResourceGroupName, Location = parameters.Location } + })); + resourceGroupMock.Setup(f => f.GetAsync(resourceGroupName, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupGetResult + { + ResourceGroup = new ResourceGroup() { Location = resourceGroupLocation } + })); + deploymentsMock.Setup(f => f.CreateOrUpdateAsync(resourceGroupName, deploymentName, It.IsAny(), new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentOperationsCreateResult + { + RequestId = requestId + })) + .Callback((string name, string dName, BasicDeployment bDeploy, CancellationToken token) => { deploymentFromGet = bDeploy; }); + deploymentsMock.Setup(f => f.GetAsync(resourceGroupName, deploymentName, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentGetResult + { + Deployment = new Deployment + { + Name = deploymentName, + Properties = new DeploymentProperties() + { + Mode = DeploymentMode.Incremental, + CorrelationId = "123", + ProvisioningState = ProvisioningState.Succeeded + }, + } + } + )); + + deploymentsMock.Setup(f => f.ValidateAsync(resourceGroupName, It.IsAny(), It.IsAny(), new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentValidateResponse + { + IsValid = true, + Error = new ResourceManagementErrorWithDetails() + })) + .Callback((string rg, string dn, BasicDeployment d, CancellationToken c) => { deploymentFromValidate = d; }); + SetupListForResourceGroupAsync(parameters.ResourceGroupName, new List() { new Resource() { Name = "website" } }); + deploymentOperationsMock.Setup(f => f.ListAsync(resourceGroupName, deploymentName, null, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentOperationsListResult + { + Operations = new List() + { + new DeploymentOperation() + { + OperationId = Guid.NewGuid().ToString(), + Properties = new DeploymentOperationProperties() + { + ProvisioningState = ProvisioningState.Succeeded, + TargetResource = new TargetResource() + { + ResourceType = "Microsoft.Website", + ResourceName = resourceName + } + } + } + } + })); + + PSResourceGroup result = resourcesClient.CreatePSResourceGroup(parameters); + + deploymentsMock.Verify((f => f.CreateOrUpdateAsync(resourceGroupName, deploymentName, deploymentFromGet, new CancellationToken())), Times.Once()); + Assert.Equal(parameters.ResourceGroupName, result.ResourceGroupName); + Assert.Equal(parameters.Location, result.Location); + Assert.Equal(1, result.Resources.Count); + + Assert.Equal(DeploymentMode.Incremental, deploymentFromGet.Mode); + Assert.NotNull(deploymentFromGet.Template); + + Assert.Equal(DeploymentMode.Incremental, deploymentFromValidate.Mode); + Assert.NotNull(deploymentFromValidate.Template); + + progressLoggerMock.Verify( + f => f(string.Format("Resource {0} '{1}' provisioning status is {2}", + "Microsoft.Website", + resourceName, + ProvisioningState.Succeeded.ToLower())), + Times.Once()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CreatesResourceGroupWithDeploymentFromTemplateParameterObject() + { + Uri templateUri = new Uri("http://templateuri.microsoft.com"); + BasicDeployment deploymentFromGet = new BasicDeployment(); + BasicDeployment deploymentFromValidate = new BasicDeployment(); + CreatePSResourceGroupParameters parameters = new CreatePSResourceGroupParameters() + { + ResourceGroupName = resourceGroupName, + Location = resourceGroupLocation, + DeploymentName = deploymentName, + TemplateFile = templateFile, + TemplateParameterObject = new Hashtable() + { + { "string", "myvalue" }, + { "securestring", "myvalue" }, + { "int", 12 }, + { "bool", true }, + }, + StorageAccountName = storageAccountName, + ConfirmAction = ConfirmAction + }; + resourceGroupMock.Setup(f => f.CheckExistenceAsync(parameters.ResourceGroupName, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupExistsResult + { + Exists = false + })); + + resourceGroupMock.Setup(f => f.CreateOrUpdateAsync( + parameters.ResourceGroupName, + It.IsAny(), + new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupCreateOrUpdateResult + { + ResourceGroup = new ResourceGroup() { Name = parameters.ResourceGroupName, Location = parameters.Location } + })); + resourceGroupMock.Setup(f => f.GetAsync(resourceGroupName, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupGetResult + { + ResourceGroup = new ResourceGroup() { Location = resourceGroupLocation } + })); + deploymentsMock.Setup(f => f.CreateOrUpdateAsync(resourceGroupName, deploymentName, It.IsAny(), new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentOperationsCreateResult + { + RequestId = requestId + })) + .Callback((string name, string dName, BasicDeployment bDeploy, CancellationToken token) => { deploymentFromGet = bDeploy; }); + deploymentsMock.Setup(f => f.GetAsync(resourceGroupName, deploymentName, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentGetResult + { + Deployment = new Deployment + { + Name = deploymentName, + Properties = new DeploymentProperties() + { + Mode = DeploymentMode.Incremental, + ProvisioningState = ProvisioningState.Succeeded + }, + } + })); + deploymentsMock.Setup(f => f.ValidateAsync(resourceGroupName, It.IsAny(), It.IsAny(), new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentValidateResponse + { + IsValid = true, + Error = new ResourceManagementErrorWithDetails() + })) + .Callback((string rg, string dn, BasicDeployment d, CancellationToken c) => { deploymentFromValidate = d; }); + SetupListForResourceGroupAsync(parameters.ResourceGroupName, new List() { new Resource() { Name = "website" } }); + deploymentOperationsMock.Setup(f => f.ListAsync(resourceGroupName, deploymentName, null, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentOperationsListResult + { + Operations = new List() + { + new DeploymentOperation() + { + OperationId = Guid.NewGuid().ToString(), + Properties = new DeploymentOperationProperties() + { + ProvisioningState = ProvisioningState.Succeeded, + TargetResource = new TargetResource() + { + ResourceType = "Microsoft.Website", + ResourceName = resourceName + } + } + } + } + })); + + PSResourceGroup result = resourcesClient.CreatePSResourceGroup(parameters); + + deploymentsMock.Verify((f => f.CreateOrUpdateAsync(resourceGroupName, deploymentName, deploymentFromGet, new CancellationToken())), Times.Once()); + Assert.Equal(parameters.ResourceGroupName, result.ResourceGroupName); + Assert.Equal(parameters.Location, result.Location); + Assert.Equal(1, result.Resources.Count); + + Assert.Equal(DeploymentMode.Incremental, deploymentFromGet.Mode); + Assert.NotNull(deploymentFromGet.Template); + // Skip: Test produces different outputs since hashtable order is not guaranteed. + //EqualsIgnoreWhitespace(File.ReadAllText(templateParameterFile), deploymentFromGet.Parameters); + + Assert.Equal(DeploymentMode.Incremental, deploymentFromValidate.Mode); + Assert.NotNull(deploymentFromValidate.Template); + // Skip: Test produces different outputs since hashtable order is not guaranteed. + //EqualsIgnoreWhitespace(File.ReadAllText(templateParameterFile), deploymentFromValidate.Parameters); + + progressLoggerMock.Verify( + f => f(string.Format("Resource {0} '{1}' provisioning status is {2}", + "Microsoft.Website", + resourceName, + ProvisioningState.Succeeded.ToLower())), + Times.Once()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void ShowsFailureErrorWhenResourceGroupWithDeploymentFails() + { + Uri templateUri = new Uri("http://templateuri.microsoft.com"); + BasicDeployment deploymentFromGet = new BasicDeployment(); + BasicDeployment deploymentFromValidate = new BasicDeployment(); + CreatePSResourceGroupParameters parameters = new CreatePSResourceGroupParameters() + { + ResourceGroupName = resourceGroupName, + Location = resourceGroupLocation, + DeploymentName = deploymentName, + TemplateFile = templateFile, + StorageAccountName = storageAccountName, + ConfirmAction = ConfirmAction + }; + resourceGroupMock.Setup(f => f.CheckExistenceAsync(parameters.ResourceGroupName, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupExistsResult + { + Exists = false + })); + + resourceGroupMock.Setup(f => f.CreateOrUpdateAsync( + parameters.ResourceGroupName, + It.IsAny(), + new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupCreateOrUpdateResult + { + ResourceGroup = new ResourceGroup() { Name = parameters.ResourceGroupName, Location = parameters.Location } + })); + resourceGroupMock.Setup(f => f.GetAsync(resourceGroupName, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupGetResult + { + ResourceGroup = new ResourceGroup() { Location = resourceGroupLocation } + })); + deploymentsMock.Setup(f => f.CreateOrUpdateAsync(resourceGroupName, deploymentName, It.IsAny(), new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentOperationsCreateResult + { + RequestId = requestId + })) + .Callback((string name, string dName, BasicDeployment bDeploy, CancellationToken token) => { deploymentFromGet = bDeploy; }); + deploymentsMock.Setup(f => f.GetAsync(resourceGroupName, deploymentName, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentGetResult + { + Deployment = new Deployment + { + Name = deploymentName, + Properties = new DeploymentProperties() + { + Mode = DeploymentMode.Incremental, + ProvisioningState = ProvisioningState.Succeeded + }, + } + })); + deploymentsMock.Setup(f => f.ValidateAsync(resourceGroupName, It.IsAny(), It.IsAny(), new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentValidateResponse + { + IsValid = true, + Error = new ResourceManagementErrorWithDetails() + })) + .Callback((string rg, string dn, BasicDeployment d, CancellationToken c) => { deploymentFromValidate = d; }); + SetupListForResourceGroupAsync(parameters.ResourceGroupName, new List() { new Resource() { Name = "website" } }); + deploymentOperationsMock.Setup(f => f.ListAsync(resourceGroupName, deploymentName, null, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentOperationsListResult + { + Operations = new List() + { + new DeploymentOperation() + { + OperationId = Guid.NewGuid().ToString(), + Properties = new DeploymentOperationProperties() + { + ProvisioningState = ProvisioningState.Failed, + StatusMessage = "A really bad error occured", + TargetResource = new TargetResource() + { + ResourceType = "Microsoft.Website", + ResourceName = resourceName + } + } + } + } + })); + + PSResourceGroup result = resourcesClient.CreatePSResourceGroup(parameters); + + deploymentsMock.Verify((f => f.CreateOrUpdateAsync(resourceGroupName, deploymentName, deploymentFromGet, new CancellationToken())), Times.Once()); + Assert.Equal(parameters.ResourceGroupName, result.ResourceGroupName); + Assert.Equal(parameters.Location, result.Location); + Assert.Equal(1, result.Resources.Count); + + Assert.Equal(DeploymentMode.Incremental, deploymentFromGet.Mode); + Assert.NotNull(deploymentFromGet.Template); + + Assert.Equal(DeploymentMode.Incremental, deploymentFromValidate.Mode); + Assert.NotNull(deploymentFromValidate.Template); + + errorLoggerMock.Verify( + f => f(string.Format("Resource {0} '{1}' failed with message '{2}'", + "Microsoft.Website", + resourceName, + "A really bad error occured")), + Times.Once()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void ExtractsErrorMessageFromFailedDeploymentOperation() + { + Uri templateUri = new Uri("http://templateuri.microsoft.com"); + BasicDeployment deploymentFromGet = new BasicDeployment(); + BasicDeployment deploymentFromValidate = new BasicDeployment(); + CreatePSResourceGroupParameters parameters = new CreatePSResourceGroupParameters() + { + ResourceGroupName = resourceGroupName, + Location = resourceGroupLocation, + DeploymentName = deploymentName, + TemplateFile = templateFile, + StorageAccountName = storageAccountName, + ConfirmAction = ConfirmAction + }; + resourceGroupMock.Setup(f => f.CheckExistenceAsync(parameters.ResourceGroupName, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupExistsResult + { + Exists = false + })); + + resourceGroupMock.Setup(f => f.CreateOrUpdateAsync( + parameters.ResourceGroupName, + It.IsAny(), + new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupCreateOrUpdateResult + { + ResourceGroup = new ResourceGroup() { Name = parameters.ResourceGroupName, Location = parameters.Location } + })); + resourceGroupMock.Setup(f => f.GetAsync(resourceGroupName, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupGetResult + { + ResourceGroup = new ResourceGroup() { Location = resourceGroupLocation } + })); + deploymentsMock.Setup(f => f.CreateOrUpdateAsync(resourceGroupName, deploymentName, It.IsAny(), new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentOperationsCreateResult + { + RequestId = requestId + })) + .Callback((string name, string dName, BasicDeployment bDeploy, CancellationToken token) => { deploymentFromGet = bDeploy; }); + deploymentsMock.Setup(f => f.GetAsync(resourceGroupName, deploymentName, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentGetResult + { + Deployment = new Deployment + { + Name = deploymentName, + Properties = new DeploymentProperties() + { + Mode = DeploymentMode.Incremental, + ProvisioningState = ProvisioningState.Succeeded + } + } + })); + deploymentsMock.Setup(f => f.ValidateAsync(resourceGroupName, It.IsAny(), It.IsAny(), new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentValidateResponse + { + IsValid = true, + Error = new ResourceManagementErrorWithDetails() + })) + .Callback((string rg, string dn, BasicDeployment d, CancellationToken c) => { deploymentFromValidate = d; }); + SetupListForResourceGroupAsync(parameters.ResourceGroupName, new List() { new Resource() { Name = "website" } }); + deploymentOperationsMock.Setup(f => f.ListAsync(resourceGroupName, deploymentName, null, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentOperationsListResult + { + Operations = new List() + { + new DeploymentOperation() + { + OperationId = Guid.NewGuid().ToString(), + Properties = new DeploymentOperationProperties() + { + ProvisioningState = ProvisioningState.Failed, + StatusMessage = JsonConvert.SerializeObject(new ResourceManagementError() + { + Message = "A really bad error occured" + }), + TargetResource = new TargetResource() + { + ResourceType = "Microsoft.Website", + ResourceName = resourceName + } + } + } + } + })); + + PSResourceGroup result = resourcesClient.CreatePSResourceGroup(parameters); + + deploymentsMock.Verify((f => f.CreateOrUpdateAsync(resourceGroupName, deploymentName, deploymentFromGet, new CancellationToken())), Times.Once()); + Assert.Equal(parameters.ResourceGroupName, result.ResourceGroupName); + Assert.Equal(parameters.Location, result.Location); + Assert.Equal(1, result.Resources.Count); + + Assert.Equal(DeploymentMode.Incremental, deploymentFromGet.Mode); + Assert.NotNull(deploymentFromGet.Template); + + Assert.Equal(DeploymentMode.Incremental, deploymentFromValidate.Mode); + Assert.NotNull(deploymentFromValidate.Template); + + errorLoggerMock.Verify( + f => f(string.Format("Resource {0} '{1}' failed with message '{2}'", + "Microsoft.Website", + resourceName, + "A really bad error occured")), + Times.Once()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void GetsOneResource() + { + FilterResourcesOptions options = new FilterResourcesOptions() { ResourceGroup = resourceGroupName, Name = resourceName }; + Resource expected = new Resource() { Id = "resourceId", Location = resourceGroupLocation, Name = resourceName }; + ResourceIdentity actualParameters = new ResourceIdentity(); + string actualResourceGroup = null; + resourceOperationsMock.Setup(f => f.GetAsync(resourceGroupName, It.IsAny(), new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceGetResult + { + Resource = expected + })) + .Callback((string rg, ResourceIdentity p, CancellationToken ct) => { actualParameters = p; actualResourceGroup = rg; }); + + List result = resourcesClient.FilterResources(options); + + Assert.Equal(1, result.Count); + Assert.Equal(options.Name, result.First().Name); + Assert.Equal(expected.Id, result.First().Id); + Assert.Equal(expected.Location, result.First().Location); + Assert.Equal(expected.Name, actualParameters.ResourceName); + Assert.Equal(resourceGroupName, actualResourceGroup); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void GetsAllResourcesUsingResourceType() + { + FilterResourcesOptions options = new FilterResourcesOptions() { ResourceGroup = resourceGroupName, ResourceType = "websites" }; + Resource resource1 = new Resource() { Id = "resourceId", Location = resourceGroupLocation, Name = resourceName }; + Resource resource2 = new Resource() { Id = "resourceId2", Location = resourceGroupLocation, Name = resourceName + "2", }; + ResourceListParameters actualParameters = new ResourceListParameters(); + resourceOperationsMock.Setup(f => f.ListAsync(It.IsAny(), new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceListResult + { + Resources = new List() { resource1, resource2 } + })) + .Callback((ResourceListParameters p, CancellationToken ct) => { actualParameters = p; }); + + List result = resourcesClient.FilterResources(options); + + Assert.Equal(2, result.Count); + Assert.Equal(options.ResourceType, actualParameters.ResourceType); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void GetsAllResourceGroupResources() + { + FilterResourcesOptions options = new FilterResourcesOptions() { ResourceGroup = resourceGroupName }; + Resource resource1 = new Resource() { Id = "resourceId", Location = resourceGroupLocation, Name = resourceName }; + Resource resource2 = new Resource() { Id = "resourceId2", Location = resourceGroupLocation, Name = resourceName + "2" }; + ResourceListParameters actualParameters = new ResourceListParameters(); + resourceOperationsMock.Setup(f => f.ListAsync(It.IsAny(), new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceListResult + { + Resources = new List() { resource1, resource2 } + })) + .Callback((ResourceListParameters p, CancellationToken ct) => { actualParameters = p; }); + + List result = resourcesClient.FilterResources(options); + + Assert.Equal(2, result.Count); + Assert.True(string.IsNullOrEmpty(actualParameters.ResourceType)); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void GetsSpecificResourceGroup() + { + string name = resourceGroupName; + Resource resource1 = new Resource() { Id = "/subscriptions/abc123/resourceGroups/group1/providers/Microsoft.Test/servers/r12345sql/db/r45678db", Location = resourceGroupLocation, Name = resourceName }; + Resource resource2 = new Resource() { Id = "/subscriptions/abc123/resourceGroups/group1/providers/Microsoft.Test/servers/r12345sql/db/r45678db", Location = resourceGroupLocation, Name = resourceName + "2" }; + ResourceGroup resourceGroup = new ResourceGroup() { Name = name, Location = resourceGroupLocation, ProvisioningState = "Succeeded" }; + resourceGroupMock.Setup(f => f.GetAsync(name, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupGetResult + { + ResourceGroup = resourceGroup, + })); + SetupListForResourceGroupAsync(name, new List() { resource1, resource2 }); + + List actual = resourcesClient.FilterResourceGroups(name, null, true); + + Assert.Equal(1, actual.Count); + Assert.Equal(name, actual[0].ResourceGroupName); + Assert.Equal(resourceGroupLocation, actual[0].Location); + Assert.Equal(2, actual[0].Resources.Count); + Assert.Equal("Succeeded", actual[0].ProvisioningState); + Assert.True(!string.IsNullOrEmpty(actual[0].ResourcesTable)); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void GetsAllResourceGroups() + { + ResourceGroup resourceGroup1 = new ResourceGroup() { Name = resourceGroupName + 1, Location = resourceGroupLocation }; + ResourceGroup resourceGroup2 = new ResourceGroup() { Name = resourceGroupName + 2, Location = resourceGroupLocation }; + ResourceGroup resourceGroup3 = new ResourceGroup() { Name = resourceGroupName + 3, Location = resourceGroupLocation }; + ResourceGroup resourceGroup4 = new ResourceGroup() { Name = resourceGroupName + 4, Location = resourceGroupLocation }; + resourceGroupMock.Setup(f => f.ListAsync(null, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupListResult + { + ResourceGroups = new List() { resourceGroup1, resourceGroup2, resourceGroup3, resourceGroup4 } + })); + SetupListForResourceGroupAsync(resourceGroup1.Name, new List() { new Resource() { Name = "resource" } }); + SetupListForResourceGroupAsync(resourceGroup2.Name, new List() { new Resource() { Name = "resource" } }); + SetupListForResourceGroupAsync(resourceGroup3.Name, new List() { new Resource() { Name = "resource" } }); + SetupListForResourceGroupAsync(resourceGroup4.Name, new List() { new Resource() { Name = "resource" } }); + + List actual = resourcesClient.FilterResourceGroups(null, null, false); + + Assert.Equal(4, actual.Count); + Assert.Equal(resourceGroup1.Name, actual[0].ResourceGroupName); + Assert.Equal(resourceGroup2.Name, actual[1].ResourceGroupName); + Assert.Equal(resourceGroup3.Name, actual[2].ResourceGroupName); + Assert.Equal(resourceGroup4.Name, actual[3].ResourceGroupName); + Assert.True(actual[0].Resources == null || actual[0].Resources.Count() == 0); + Assert.True(actual[1].Resources == null || actual[1].Resources.Count() == 0); + Assert.True(actual[2].Resources == null || actual[2].Resources.Count() == 0); + Assert.True(actual[3].Resources == null || actual[3].Resources.Count() == 0); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void GetsAllResourceGroupsWithDetails() + { + ResourceGroup resourceGroup1 = new ResourceGroup() { Name = resourceGroupName + 1, Location = resourceGroupLocation }; + ResourceGroup resourceGroup2 = new ResourceGroup() { Name = resourceGroupName + 2, Location = resourceGroupLocation }; + ResourceGroup resourceGroup3 = new ResourceGroup() { Name = resourceGroupName + 3, Location = resourceGroupLocation }; + ResourceGroup resourceGroup4 = new ResourceGroup() { Name = resourceGroupName + 4, Location = resourceGroupLocation }; + resourceGroupMock.Setup(f => f.ListAsync(null, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupListResult + { + ResourceGroups = new List() { resourceGroup1, resourceGroup2, resourceGroup3, resourceGroup4 } + })); + SetupListForResourceGroupAsync(resourceGroup1.Name, new List() { new Resource() { Name = "resource" } }); + SetupListForResourceGroupAsync(resourceGroup2.Name, new List() { new Resource() { Name = "resource" } }); + SetupListForResourceGroupAsync(resourceGroup3.Name, new List() { new Resource() { Name = "resource" } }); + SetupListForResourceGroupAsync(resourceGroup4.Name, new List() { new Resource() { Name = "resource" } }); + + List actual = resourcesClient.FilterResourceGroups(null, null, true); + + Assert.Equal(4, actual.Count); + Assert.Equal(resourceGroup1.Name, actual[0].ResourceGroupName); + Assert.Equal(resourceGroup2.Name, actual[1].ResourceGroupName); + Assert.Equal(resourceGroup3.Name, actual[2].ResourceGroupName); + Assert.Equal(resourceGroup4.Name, actual[3].ResourceGroupName); + Assert.Equal(1, actual[0].Resources.Count()); + Assert.Equal(1, actual[1].Resources.Count()); + Assert.Equal(1, actual[2].Resources.Count()); + Assert.Equal(1, actual[3].Resources.Count()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void GetsResourceGroupsFilteredByTags() + { + Dictionary tag1 = new Dictionary { { "tag1", "val1" }, { "tag2", "val2" } }; + Dictionary tag2 = new Dictionary { { "tag1", "valx" } }; + Dictionary tag3 = new Dictionary { { "tag2", "" } }; + + ResourceGroup resourceGroup1 = new ResourceGroup() { Name = resourceGroupName + 1, Location = resourceGroupLocation, Tags = tag1 }; + ResourceGroup resourceGroup2 = new ResourceGroup() { Name = resourceGroupName + 2, Location = resourceGroupLocation, Tags = tag2 }; + ResourceGroup resourceGroup3 = new ResourceGroup() { Name = resourceGroupName + 3, Location = resourceGroupLocation, Tags = tag3 }; + ResourceGroup resourceGroup4 = new ResourceGroup() { Name = resourceGroupName + 4, Location = resourceGroupLocation }; + resourceGroupMock.Setup(f => f.ListAsync(null, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupListResult + { + ResourceGroups = new List() { resourceGroup1, resourceGroup2, resourceGroup3, resourceGroup4 } + })); + SetupListForResourceGroupAsync(resourceGroup1.Name, new List() { new Resource() { Name = "resource" } }); + SetupListForResourceGroupAsync(resourceGroup2.Name, new List() { new Resource() { Name = "resource" } }); + SetupListForResourceGroupAsync(resourceGroup3.Name, new List() { new Resource() { Name = "resource" } }); + SetupListForResourceGroupAsync(resourceGroup4.Name, new List() { new Resource() { Name = "resource" } }); + + List groups1 = resourcesClient.FilterResourceGroups(null, + new Hashtable(new Dictionary { { "Name", "tag1" } }), false); + + Assert.Equal(2, groups1.Count); + Assert.Equal(resourceGroup1.Name, groups1[0].ResourceGroupName); + Assert.Equal(resourceGroup2.Name, groups1[1].ResourceGroupName); + Assert.True(groups1[0].Resources == null || groups1[0].Resources.Count() == 0); + Assert.True(groups1[1].Resources == null || groups1[1].Resources.Count() == 0); + + List groups2 = resourcesClient.FilterResourceGroups(null, + new Hashtable(new Dictionary { { "Name", "tag2" } }), false); + + Assert.Equal(2, groups2.Count); + Assert.Equal(resourceGroup1.Name, groups2[0].ResourceGroupName); + Assert.Equal(resourceGroup3.Name, groups2[1].ResourceGroupName); + Assert.True(groups2[0].Resources == null || groups2[0].Resources.Count() == 0); + Assert.True(groups2[1].Resources == null || groups2[1].Resources.Count() == 0); + + List groups3 = resourcesClient.FilterResourceGroups(null, + new Hashtable(new Dictionary { { "Name", "tag3" } }), false); + + Assert.Equal(0, groups3.Count); + + List groups4 = resourcesClient.FilterResourceGroups(null, + new Hashtable(new Dictionary { { "Name", "TAG1" }, { "Value", "val1" } }), false); + + Assert.Equal(1, groups4.Count); + Assert.Equal(resourceGroup1.Name, groups4[0].ResourceGroupName); + Assert.True(groups4[0].Resources == null || groups4[0].Resources.Count() == 0); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void GetsResourceGroupsFilteredByTagsWithDetails() + { + Dictionary tag1 = new Dictionary { { "tag1", "val1" }, { "tag2", "val2" } }; + Dictionary tag2 = new Dictionary { { "tag1", "valx" } }; + Dictionary tag3 = new Dictionary { { "tag2", "" } }; + + ResourceGroup resourceGroup1 = new ResourceGroup() { Name = resourceGroupName + 1, Location = resourceGroupLocation, Tags = tag1 }; + ResourceGroup resourceGroup2 = new ResourceGroup() { Name = resourceGroupName + 2, Location = resourceGroupLocation, Tags = tag2 }; + ResourceGroup resourceGroup3 = new ResourceGroup() { Name = resourceGroupName + 3, Location = resourceGroupLocation, Tags = tag3 }; + ResourceGroup resourceGroup4 = new ResourceGroup() { Name = resourceGroupName + 4, Location = resourceGroupLocation }; + resourceGroupMock.Setup(f => f.ListAsync(null, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupListResult + { + ResourceGroups = new List() { resourceGroup1, resourceGroup2, resourceGroup3, resourceGroup4 } + })); + SetupListForResourceGroupAsync(resourceGroup1.Name, new List() { new Resource() { Name = "resource" } }); + SetupListForResourceGroupAsync(resourceGroup2.Name, new List() { new Resource() { Name = "resource" } }); + SetupListForResourceGroupAsync(resourceGroup3.Name, new List() { new Resource() { Name = "resource" } }); + SetupListForResourceGroupAsync(resourceGroup4.Name, new List() { new Resource() { Name = "resource" } }); + + List groups1 = resourcesClient.FilterResourceGroups(null, + new Hashtable(new Dictionary { { "Name", "tag1" } }), true); + + Assert.Equal(2, groups1.Count); + Assert.Equal(resourceGroup1.Name, groups1[0].ResourceGroupName); + Assert.Equal(resourceGroup2.Name, groups1[1].ResourceGroupName); + Assert.Equal(1, groups1[0].Resources.Count()); + Assert.Equal(1, groups1[1].Resources.Count()); + + List groups2 = resourcesClient.FilterResourceGroups(null, + new Hashtable(new Dictionary { { "Name", "tag2" } }), true); + + Assert.Equal(2, groups2.Count); + Assert.Equal(resourceGroup1.Name, groups2[0].ResourceGroupName); + Assert.Equal(resourceGroup3.Name, groups2[1].ResourceGroupName); + Assert.Equal(1, groups2[0].Resources.Count()); + Assert.Equal(1, groups2[1].Resources.Count()); + + List groups3 = resourcesClient.FilterResourceGroups(null, + new Hashtable(new Dictionary { { "Name", "tag3" } }), true); + + Assert.Equal(0, groups3.Count); + + List groups4 = resourcesClient.FilterResourceGroups(null, + new Hashtable(new Dictionary { { "Name", "TAG1" }, { "Value", "val1" } }), true); + + Assert.Equal(1, groups4.Count); + Assert.Equal(resourceGroup1.Name, groups4[0].ResourceGroupName); + Assert.Equal(1, groups4[0].Resources.Count()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void GetAzureResourceGroupLogWithAllCallsListEventsForResourceGroup() + { + eventDataOperationsMock.Setup(f => f.ListEventsForResourceGroupAsync(It.IsAny(), new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new EventDataListResponse + { + EventDataCollection = new EventDataCollection + { + Value = sampleEvents + } + })); + + IEnumerable results = resourcesClient.GetResourceGroupLogs(new GetPSResourceGroupLogParameters + { + Name = "foo", + All = true + }); + + Assert.Equal(2, results.Count()); + eventDataOperationsMock.Verify(f => f.ListEventsForResourceGroupAsync(It.IsAny(), It.IsAny()), Times.Once()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void GetAzureResourceGroupLogWithDeploymentCallsListEventsForCorrelationId() + { + deploymentsMock.Setup( + f => f.GetAsync(resourceGroupName, deploymentName, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentGetResult + { + Deployment = new Deployment() + { + Name = deploymentName + 1, + Properties = new DeploymentProperties() + { + Mode = DeploymentMode.Incremental, + CorrelationId = "123", + TemplateLink = new TemplateLink() + { + Uri = new Uri("http://microsoft1.com") + } + } + } + })); + + eventDataOperationsMock.Setup(f => f.ListEventsForCorrelationIdAsync(It.IsAny(), new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new EventDataListResponse + { + EventDataCollection = new EventDataCollection + { + Value = sampleEvents + } + })); + + IEnumerable results = resourcesClient.GetResourceGroupLogs(new GetPSResourceGroupLogParameters + { + Name = resourceGroupName, + DeploymentName = deploymentName + }); + + Assert.Equal(2, results.Count()); + deploymentsMock.Verify(f => f.GetAsync(resourceGroupName, deploymentName, It.IsAny()), Times.Once()); + eventDataOperationsMock.Verify(f => f.ListEventsForCorrelationIdAsync(It.IsAny(), It.IsAny()), Times.Once()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void GetAzureResourceGroupLogWithLastDeploymentCallsListEventsForCorrelationId() + { + deploymentsMock.Setup( + f => f.ListAsync(resourceGroupName, It.IsAny(), new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentListResult + { + Deployments = new List() + { + new Deployment() + { + Name = deploymentName + 1, + Properties = new DeploymentProperties() + { + Mode = DeploymentMode.Incremental, + CorrelationId = "123", + TemplateLink = new TemplateLink() + { + Uri = new Uri("http://microsoft1.com") + } + } + } + } + })); + + eventDataOperationsMock.Setup(f => f.ListEventsForCorrelationIdAsync(It.IsAny(), new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new EventDataListResponse + { + EventDataCollection = new EventDataCollection + { + Value = sampleEvents + } + })); + + IEnumerable results = resourcesClient.GetResourceGroupLogs(new GetPSResourceGroupLogParameters + { + Name = resourceGroupName + }); + + Assert.Equal(2, results.Count()); + deploymentsMock.Verify(f => f.ListAsync(resourceGroupName, It.IsAny(), It.IsAny()), Times.Once()); + eventDataOperationsMock.Verify(f => f.ListEventsForCorrelationIdAsync(It.IsAny(), It.IsAny()), Times.Once()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void GetAzureResourceGroupLogReturnsAllRequiredFields() + { + eventDataOperationsMock.Setup(f => f.ListEventsForResourceGroupAsync(It.IsAny(), new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new EventDataListResponse + { + EventDataCollection = new EventDataCollection + { + Value = sampleEvents + } + })); + + IEnumerable results = resourcesClient.GetResourceGroupLogs(new GetPSResourceGroupLogParameters + { + Name = "foo", + All = true + }); + + Assert.Equal(2, results.Count()); + var first = results.First(); + Assert.NotNull(first.Authorization); + Assert.NotNull(first.ResourceUri); + Assert.NotNull(first.SubscriptionId); + Assert.NotNull(first.Timestamp); + Assert.NotNull(first.OperationName); + Assert.NotNull(first.OperationId); + Assert.NotNull(first.Status); + Assert.NotNull(first.SubStatus); + Assert.NotNull(first.Caller); + Assert.NotNull(first.CorrelationId); + Assert.NotNull(first.HttpRequest); + Assert.NotNull(first.Level); + Assert.NotNull(first.ResourceGroupName); + Assert.NotNull(first.ResourceProvider); + Assert.NotNull(first.EventSource); + Assert.NotNull(first.PropertiesText); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void DeletesResourcesGroup() + { + resourceGroupMock.Setup(f => f.CheckExistenceAsync(resourceGroupName, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ResourceGroupExistsResult + { + Exists = true + })); + + resourcesClient.DeleteResourceGroup(resourceGroupName); + + resourceGroupMock.Verify(f => f.DeleteAsync(resourceGroupName, It.IsAny()), Times.Once()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void FiltersOneResourceGroupDeployment() + { + FilterResourceGroupDeploymentOptions options = new FilterResourceGroupDeploymentOptions() + { + DeploymentName = deploymentName, + ResourceGroupName = resourceGroupName + }; + deploymentsMock.Setup(f => f.GetAsync(resourceGroupName, deploymentName, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentGetResult + { + Deployment = new Deployment + { + Name = deploymentName, + Properties = new DeploymentProperties() + { + Mode = DeploymentMode.Incremental, + CorrelationId = "123", + TemplateLink = new TemplateLink() + { + Uri = new Uri("http://microsoft.com") + } + } + } + })); + + List result = resourcesClient.FilterResourceGroupDeployments(options); + + Assert.Equal(deploymentName, result[0].DeploymentName); + Assert.Equal(resourceGroupName, result[0].ResourceGroupName); + Assert.Equal(DeploymentMode.Incremental, result[0].Mode); + Assert.Equal("123", result[0].CorrelationId); + Assert.Equal(new Uri("http://microsoft.com").ToString(), result[0].TemplateLink.Uri.ToString()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void FiltersResourceGroupDeployments() + { + FilterResourceGroupDeploymentOptions options = new FilterResourceGroupDeploymentOptions() + { + ResourceGroupName = resourceGroupName + }; + DeploymentListParameters actualParameters = new DeploymentListParameters(); + deploymentsMock.Setup(f => f.ListAsync( + resourceGroupName, + It.IsAny(), + new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentListResult + { + Deployments = new List() + { + new Deployment() + { + Name = deploymentName + 1, + Properties = new DeploymentProperties() + { + Mode = DeploymentMode.Incremental, + CorrelationId = "123", + TemplateLink = new TemplateLink() + { + Uri = new Uri("http://microsoft1.com") + } + } + } + }, + NextLink = "nextLink" + })) + .Callback((string rgn, DeploymentListParameters p, CancellationToken t) => { actualParameters = p; }); + + deploymentsMock.Setup(f => f.ListNextAsync( + "nextLink", + new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentListResult + { + Deployments = new List() + { + new Deployment() + { + Name = deploymentName + 2, + Properties = new DeploymentProperties() + { + Mode = DeploymentMode.Incremental, + CorrelationId = "456", + TemplateLink = new TemplateLink() + { + Uri = new Uri("http://microsoft2.com") + } + } + } + } + })); + + List result = resourcesClient.FilterResourceGroupDeployments(options); + + Assert.Equal(2, result.Count); + Assert.Equal(deploymentName + 1, result[0].DeploymentName); + Assert.Equal("123", result[0].CorrelationId); + Assert.Equal(resourceGroupName, result[0].ResourceGroupName); + Assert.Equal(DeploymentMode.Incremental, result[0].Mode); + Assert.Equal(new Uri("http://microsoft1.com").ToString(), result[0].TemplateLink.Uri.ToString()); + + Assert.Equal(deploymentName + 2, result[1].DeploymentName); + Assert.Equal(resourceGroupName, result[1].ResourceGroupName); + Assert.Equal("456", result[1].CorrelationId); + Assert.Equal(DeploymentMode.Incremental, result[1].Mode); + Assert.Equal(new Uri("http://microsoft2.com").ToString(), result[1].TemplateLink.Uri.ToString()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CancelsActiveDeployment() + { + DeploymentListParameters actualParameters = new DeploymentListParameters(); + deploymentsMock.Setup(f => f.ListAsync( + resourceGroupName, + It.IsAny(), + new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new DeploymentListResult + { + Deployments = new List() + { + new Deployment() + { + Name = deploymentName + 1, + Properties = new DeploymentProperties() + { + Mode = DeploymentMode.Incremental, + TemplateLink = new TemplateLink() + { + Uri = new Uri("http://microsoft1.com") + }, + ProvisioningState = ProvisioningState.Succeeded + } + }, + new Deployment() + { + Name = deploymentName + 2, + Properties = new DeploymentProperties() + { + Mode = DeploymentMode.Incremental, + TemplateLink = new TemplateLink() + { + Uri = new Uri("http://microsoft1.com") + }, + ProvisioningState = ProvisioningState.Failed + } + }, + new Deployment() + { + Name = deploymentName + 3, + Properties = new DeploymentProperties() + { + Mode = DeploymentMode.Incremental, + TemplateLink = new TemplateLink() + { + Uri = new Uri("http://microsoft1.com") + }, + ProvisioningState = ProvisioningState.Running + } + } + } + })) + .Callback((string rgn, DeploymentListParameters p, CancellationToken t) => { actualParameters = p; }); + + resourcesClient.CancelDeployment(resourceGroupName, null); + + deploymentsMock.Verify(f => f.CancelAsync(resourceGroupName, deploymentName + 3, new CancellationToken()), Times.Once()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void GetsLocations() + { + providersMock.Setup(f => f.ListAsync(null, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ProviderListResult() + { + Providers = new List() + { + new Provider() + { + Namespace = "Microsoft.Web", + RegistrationState = "Registered", + ResourceTypes = new List() + { + new ProviderResourceType() + { + Locations = new List() {"West US", "East US"}, + Name = "database" + }, + new ProviderResourceType() + { + Locations = new List() {"West US", "South Central US"}, + Name = "servers" + } + } + }, + new Provider() + { + Namespace = "Microsoft.HDInsight", + RegistrationState = "UnRegistered", + ResourceTypes = new List() + { + new ProviderResourceType() + { + Locations = new List() {"West US", "East US"}, + Name = "hadoop" + }, + new ProviderResourceType() + { + Locations = new List() {"West US", "South Central US"}, + Name = "websites" + } + } + } + } + })); + List resourceTypes = resourcesClient.GetLocations( + ResourcesClient.ResourceGroupTypeName, + "Microsoft.HDInsight"); + + Assert.Equal(3, resourceTypes.Count); + Assert.Equal(ResourcesClient.ResourceGroupTypeName, resourceTypes[0].Name); + Assert.Equal(ResourcesClient.KnownLocations.Count, resourceTypes[0].Locations.Count); + Assert.Equal("East Asia", resourceTypes[0].Locations[0]); + Assert.Equal("Microsoft.HDInsight/hadoop", resourceTypes[1].Name); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void IgnoresResourceTypesWithEmptyLocations() + { + providersMock.Setup(f => f.ListAsync(null, new CancellationToken())) + .Returns(Task.Factory.StartNew(() => new ProviderListResult() + { + Providers = new List() + { + new Provider() + { + Namespace = "Microsoft.Web", + RegistrationState = "Registered", + ResourceTypes = new List() + { + new ProviderResourceType() + { + Name = "database" + }, + new ProviderResourceType() + { + Locations = new List(), + Name = "servers" + } + } + }, + new Provider() + { + Namespace = "Microsoft.HDInsight", + RegistrationState = "UnRegistered", + ResourceTypes = new List() + { + new ProviderResourceType() + { + Locations = new List() {"West US", "East US"}, + Name = "hadoop" + }, + new ProviderResourceType() + { + Locations = new List() {"West US", "South Central US"}, + Name = "websites" + } + } + } + } + })); + List resourceTypes = resourcesClient.GetLocations( + ResourcesClient.ResourceGroupTypeName, + "Microsoft.Web"); + + Assert.Equal(1, resourceTypes.Count); + Assert.Equal(ResourcesClient.ResourceGroupTypeName, resourceTypes[0].Name); + Assert.Equal(ResourcesClient.KnownLocations.Count, resourceTypes[0].Locations.Count); + Assert.Equal("East Asia", resourceTypes[0].Locations[0]); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void ParseErrorMessageSupportsFlatErrors() + { + string jsonErrorMessageString = @"{ + 'code': 'BadRequest', + 'message': 'The provided database ‘foo’ has an invalid username.', + 'target': 'query', + 'details': [ + { + 'code': '301', + 'target': '$search', + 'message': '$search query option not supported.', + } + ] + }"; + + Assert.Equal("The provided database ‘foo’ has an invalid username.", + ResourcesClient.ParseErrorMessage(jsonErrorMessageString)); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void ParseErrorMessageSupportsDeepErrors() + { + string jsonErrorMessageWithParent = @"{ + 'error' : { + 'code': 'BadRequest', + 'message': 'The provided database ‘foo’ has an invalid username.', + 'target': 'query', + 'details': [ + { + 'code': '301', + 'target': '$search', + 'message': '$search query option not supported.', + } + ] + } + }"; + + Assert.Equal("The provided database ‘foo’ has an invalid username.", + ResourcesClient.ParseErrorMessage(jsonErrorMessageWithParent)); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void ParseErrorMessageSupportsXmlErrors() + { + var errorObject = new ResourceManagementError { Message = "The provided database ‘foo’ has an invalid username." }; + string xmlErrorMessage = XmlUtilities.SerializeXmlString(errorObject); + + Assert.Equal("The provided database ‘foo’ has an invalid username.", + ResourcesClient.ParseErrorMessage(xmlErrorMessage)); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void ParseErrorMessageSupportsEmptyErrors() + { + Assert.Null(ResourcesClient.ParseErrorMessage(null)); + Assert.Equal(string.Empty, ResourcesClient.ParseErrorMessage(string.Empty)); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void ParseErrorMessageSupportsIncorrectlyFormattedJsonErrors() + { + string jsonErrorMessageWithBadParent = @"{ + 'some error' : { + 'some message': 'The provided database ‘foo’ has an invalid username.', + } + }"; + + string jsonErrorMessageWithGoodParent = @"{ + 'error' : { + 'some message': 'The provided database ‘foo’ has an invalid username.', + } + }"; + + string badJsonErrorMessage = @"{ + 'error' : { + 'some message': 'The provided database ‘foo’ has an invalid username.'"; + + Assert.Equal(jsonErrorMessageWithBadParent, ResourcesClient.ParseErrorMessage(jsonErrorMessageWithBadParent)); + + Assert.Equal(jsonErrorMessageWithGoodParent, ResourcesClient.ParseErrorMessage(jsonErrorMessageWithGoodParent)); + + Assert.Equal(badJsonErrorMessage, ResourcesClient.ParseErrorMessage(badJsonErrorMessage)); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void ParseErrorMessageSupportsIncorrectlyFormattedXmlErrors() + { + string xmlErrorMessage = @"The provided database ‘foo’ has an invalid username."; + string xmlErrorMessageWithBadParent = @"The provided database ‘foo’ has an invalid username."; + string badXmlErrorMessage = @"The provided database ‘foo’ has an invalid username."; + + Assert.Equal(xmlErrorMessage, ResourcesClient.ParseErrorMessage(xmlErrorMessage)); + + Assert.Equal(xmlErrorMessageWithBadParent, ResourcesClient.ParseErrorMessage(xmlErrorMessageWithBadParent)); + + Assert.Equal(badXmlErrorMessage, ResourcesClient.ParseErrorMessage(badXmlErrorMessage)); + } + + [Fact(Skip = "Test produces different outputs since hashtable order is not guaranteed.")] + public void SerializeHashtableProperlyHandlesAllDataTypes() + { + Hashtable hashtable = new Hashtable(); + SecureString password = new SecureString(); + password.AppendChar('p'); + password.AppendChar('a'); + password.AppendChar('s'); + password.AppendChar('s'); + hashtable.Add("key1", "string"); + hashtable.Add("key2", 1); + hashtable.Add("key3", true); + hashtable.Add("key4", new DateTime(2014, 05, 08)); + hashtable.Add("key5", null); + hashtable.Add("key6", password); + + string resultWithoutAddedLayer = resourcesClient.SerializeHashtable(hashtable, false); + Assert.NotEmpty(resultWithoutAddedLayer); + EqualsIgnoreWhitespace(@"{ + ""key5"": null, + ""key2"": 1, + ""key4"": ""2014-05-08T00:00:00"", + ""key6"": ""pass"", + ""key1"": ""string"", + ""key3"": true + }", resultWithoutAddedLayer); + + string resultWithAddedLayer = resourcesClient.SerializeHashtable(hashtable, true); + Assert.NotEmpty(resultWithAddedLayer); + EqualsIgnoreWhitespace(@"{ + ""key5"": { + ""value"": null + }, + ""key2"": { + ""value"": 1 + }, + ""key4"": { + ""value"": ""2014-05-08T00:00:00"" + }, + ""key6"": { + ""value"": ""pass"" + }, + ""key1"": { + ""value"": ""string"" + }, + ""key3"": { + ""value"": true + } + }", resultWithAddedLayer); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ResourceIdentifierTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ResourceIdentifierTests.cs new file mode 100644 index 000000000000..7fd1255c27c3 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ResourceIdentifierTests.cs @@ -0,0 +1,122 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Xunit; + +namespace Microsoft.Azure.Commands.Resources.Test.Models +{ + public class ResourceIdentifierTests + { + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void IdentifierIsConstructedFromProvidedValues() + { + ResourceIdentifier id = new ResourceIdentifier(); + id.Subscription = "abc123"; + id.ResourceGroupName = "group1"; + id.ResourceType = "Microsoft.Test/servers/db"; + id.ParentResource = "servers/r12345sql"; + id.ResourceName = "r45678db"; + + Assert.Equal("/subscriptions/abc123/resourceGroups/group1/providers/Microsoft.Test/servers/r12345sql/db/r45678db", id.ToString()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void IdentifierIsConstructedWithoutParent() + { + ResourceIdentifier id = new ResourceIdentifier(); + id.Subscription = "abc123"; + id.ResourceGroupName = "group1"; + id.ResourceType = "Microsoft.Test/db"; + id.ResourceName = "r45678db"; + + Assert.Equal("/subscriptions/abc123/resourceGroups/group1/providers/Microsoft.Test/db/r45678db", id.ToString()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void IdentifierIsConstructedWithMissingParameters() + { + ResourceIdentifier id = new ResourceIdentifier(); + + Assert.True(string.IsNullOrEmpty(id.ToString())); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void IdentifierIsParsedFromShortId() + { + ResourceIdentifier id = new ResourceIdentifier("/subscriptions/abc123/resourceGroups/group1/providers/Microsoft.Test/db/r45678db"); + Assert.Equal("abc123", id.Subscription); + Assert.Equal("group1", id.ResourceGroupName); + Assert.Equal("Microsoft.Test/db", id.ResourceType); + Assert.Null(id.ParentResource); + Assert.Equal("r45678db", id.ResourceName); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void IdentifierIsParsedFromLongId() + { + ResourceIdentifier id = new ResourceIdentifier("/subscriptions/abc123/resourceGroups/group1/providers/Microsoft.Test/servers/r12345sql/db/r45678db"); + Assert.Equal("abc123", id.Subscription); + Assert.Equal("group1", id.ResourceGroupName); + Assert.Equal("Microsoft.Test/servers/db", id.ResourceType); + Assert.Equal("servers/r12345sql", id.ParentResource); + Assert.Equal("r45678db", id.ResourceName); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void IdentifierIsParsedFromVeryLongId() + { + ResourceIdentifier id = new ResourceIdentifier("/subscriptions/abc123/resourceGroups/group1/providers/Microsoft.Test/servers/r12345sql/subserver/r5555/db/r45678db"); + Assert.Equal("abc123", id.Subscription); + Assert.Equal("group1", id.ResourceGroupName); + Assert.Equal("Microsoft.Test/servers/subserver/db", id.ResourceType); + Assert.Equal("servers/r12345sql/subserver/r5555", id.ParentResource); + Assert.Equal("r45678db", id.ResourceName); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void IdentifierThrowsExceptionFromInvalidId() + { + Assert.Throws(()=> new ResourceIdentifier("/subscriptions/abc123/resourceGroups/group1")); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void IdentifierParsedIsSkippedWithEmptyId() + { + ResourceIdentifier id = new ResourceIdentifier(null); + Assert.Null(id.Subscription); + Assert.Null(id.ResourceGroupName); + Assert.Null(id.ResourceType); + Assert.Null(id.ParentResource); + Assert.Null(id.ResourceName); + + id = new ResourceIdentifier(""); + Assert.Null(id.Subscription); + Assert.Null(id.ResourceGroupName); + Assert.Null(id.ResourceType); + Assert.Null(id.ParentResource); + Assert.Null(id.ResourceName); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Properties/AssemblyInfo.cs b/src/ResourceManager/Resources/Commands.Resources.Test/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..774bec76e91e --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft.Azure.Commands.Resources.Test")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Microsoft.Azure.Commands.Resources.Test")] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +[assembly: ComVisible(false)] + +[assembly: Guid("28fe3fc0-6fdf-4f01-8a82-d7b4a834ddd2")] + +[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] +[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Properties/Resources.Designer.cs b/src/ResourceManager/Resources/Commands.Resources.Test/Properties/Resources.Designer.cs new file mode 100644 index 000000000000..b5e84a613d0b --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.18444 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.Azure.Commands.Resources.Test.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Azure.Commands.Resources.Test.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Properties/Resources.resx b/src/ResourceManager/Resources/Commands.Resources.Test/Properties/Resources.resx new file mode 100644 index 000000000000..1af7de150c99 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Properties/Resources.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/GetAzureResourceGroupDeploymentCommandTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/GetAzureResourceGroupDeploymentCommandTests.cs new file mode 100644 index 000000000000..09a5897219b7 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/GetAzureResourceGroupDeploymentCommandTests.cs @@ -0,0 +1,116 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.Azure.Management.Resources.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using Xunit; + +namespace Microsoft.Azure.Commands.Resources.Test +{ + public class GetAzureResourceGroupDeploymentCommandTests + { + private GetAzureResourceGroupDeploymentCommand cmdlet; + + private Mock resourcesClientMock; + + private Mock commandRuntimeMock; + + private string resourceGroupName = "myResourceGroup"; + + private string deploymentName = "TheDeploymentName"; + + public GetAzureResourceGroupDeploymentCommandTests() + { + resourcesClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new GetAzureResourceGroupDeploymentCommand() + { + CommandRuntime = commandRuntimeMock.Object, + ResourcesClient = resourcesClientMock.Object + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void GetsResourcesGroupDeployments() + { + List result = new List(); + PSResourceGroupDeployment expected = new PSResourceGroupDeployment() + { + DeploymentName = deploymentName, + CorrelationId = "123", + ResourceGroupName = resourceGroupName, + Mode = DeploymentMode.Incremental + }; + FilterResourceGroupDeploymentOptions options = new FilterResourceGroupDeploymentOptions() + { + ResourceGroupName = resourceGroupName + }; + FilterResourceGroupDeploymentOptions actual = new FilterResourceGroupDeploymentOptions(); + result.Add(expected); + resourcesClientMock.Setup(f => f.FilterResourceGroupDeployments(It.IsAny())) + .Returns(result) + .Callback((FilterResourceGroupDeploymentOptions o) => { actual = o; }); + + cmdlet.ResourceGroupName = resourceGroupName; + + cmdlet.ExecuteCmdlet(); + + commandRuntimeMock.Verify(f => f.WriteObject(result, true), Times.Once()); + Assert.Equal(options.DeploymentName, actual.DeploymentName); + Assert.Equal(options.ExcludedProvisioningStates, actual.ExcludedProvisioningStates); + Assert.Equal(options.ProvisioningStates, actual.ProvisioningStates); + Assert.Equal(options.ResourceGroupName, actual.ResourceGroupName); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void GetSepcificResourcesGroupDeployment() + { + FilterResourceGroupDeploymentOptions options = new FilterResourceGroupDeploymentOptions() + { + DeploymentName = deploymentName, + ResourceGroupName = resourceGroupName + }; + FilterResourceGroupDeploymentOptions actual = new FilterResourceGroupDeploymentOptions(); + List result = new List(); + PSResourceGroupDeployment expected = new PSResourceGroupDeployment() + { + DeploymentName = deploymentName, + CorrelationId = "123", + ResourceGroupName = resourceGroupName, + Mode = DeploymentMode.Incremental + }; + result.Add(expected); + resourcesClientMock.Setup(f => f.FilterResourceGroupDeployments(It.IsAny())) + .Returns(result) + .Callback((FilterResourceGroupDeploymentOptions o) => { actual = o; }); + + cmdlet.ResourceGroupName = resourceGroupName; + cmdlet.Name = deploymentName; + + cmdlet.ExecuteCmdlet(); + + commandRuntimeMock.Verify(f => f.WriteObject(result, true), Times.Once()); + Assert.Equal(options.DeploymentName, actual.DeploymentName); + Assert.Equal(options.ExcludedProvisioningStates, actual.ExcludedProvisioningStates); + Assert.Equal(options.ProvisioningStates, actual.ProvisioningStates); + Assert.Equal(options.ResourceGroupName, actual.ResourceGroupName); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/NewAzureResourceGroupDeploymentCommandTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/NewAzureResourceGroupDeploymentCommandTests.cs new file mode 100644 index 000000000000..1be3cade8a9c --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/NewAzureResourceGroupDeploymentCommandTests.cs @@ -0,0 +1,172 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.Azure.Management.Resources.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using Xunit; + +namespace Microsoft.Azure.Commands.Resources.Test +{ + public class NewAzureResourceGroupDeploymentCommandTests + { + private NewAzureResourceGroupDeploymentCommand cmdlet; + + private Mock resourcesClientMock; + + private Mock commandRuntimeMock; + + private string resourceGroupName = "myResourceGroup"; + + private string deploymentName = "fooDeployment"; + + private string templateFile = @"Resources\sampleTemplateFile.json"; + + private string storageAccountName = "myStorageAccount"; + + public NewAzureResourceGroupDeploymentCommandTests() + { + resourcesClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new NewAzureResourceGroupDeploymentCommand() + { + CommandRuntime = commandRuntimeMock.Object, + ResourcesClient = resourcesClientMock.Object + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CreatesNewPSResourceGroupDeploymentWithUserTemplate() + { + CreatePSResourceGroupDeploymentParameters expectedParameters = new CreatePSResourceGroupDeploymentParameters() + { + TemplateFile = templateFile, + DeploymentName = deploymentName, + StorageAccountName = storageAccountName, + TemplateVersion = "1.0" + }; + CreatePSResourceGroupDeploymentParameters actualParameters = new CreatePSResourceGroupDeploymentParameters(); + PSResourceGroupDeployment expected = new PSResourceGroupDeployment() + { + Mode = DeploymentMode.Incremental, + DeploymentName = deploymentName, + CorrelationId = "123", + Outputs = new Dictionary() + { + { "Variable1", new DeploymentVariable() { Value = "true", Type = "bool" } }, + { "Variable2", new DeploymentVariable() { Value = "10", Type = "int" } }, + { "Variable3", new DeploymentVariable() { Value = "hello world", Type = "string" } } + }, + Parameters = new Dictionary() + { + { "Parameter1", new DeploymentVariable() { Value = "true", Type = "bool" } }, + { "Parameter2", new DeploymentVariable() { Value = "10", Type = "int" } }, + { "Parameter3", new DeploymentVariable() { Value = "hello world", Type = "string" } } + }, + ProvisioningState = ProvisioningState.Succeeded, + ResourceGroupName = resourceGroupName, + TemplateLink = new TemplateLink() + { + ContentVersion = "1.0", + Uri = new Uri("http://mytemplate.com") + }, + Timestamp = new DateTime(2014, 2, 13) + }; + resourcesClientMock.Setup(f => f.ExecuteDeployment( + It.IsAny())) + .Returns(expected) + .Callback((CreatePSResourceGroupDeploymentParameters p) => { actualParameters = p; }); + + cmdlet.ResourceGroupName = resourceGroupName; + cmdlet.Name = expectedParameters.DeploymentName; + cmdlet.TemplateFile = expectedParameters.TemplateFile; + cmdlet.TemplateVersion = expectedParameters.TemplateVersion; + + cmdlet.ExecuteCmdlet(); + + Assert.Equal(expectedParameters.DeploymentName, actualParameters.DeploymentName); + Assert.Equal(expectedParameters.GalleryTemplateIdentity, actualParameters.GalleryTemplateIdentity); + Assert.Equal(expectedParameters.TemplateFile, actualParameters.TemplateFile); + Assert.NotNull(actualParameters.TemplateParameterObject); + Assert.Equal(expectedParameters.TemplateVersion, actualParameters.TemplateVersion); + + commandRuntimeMock.Verify(f => f.WriteObject(expected), Times.Once()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CreatesNewPSResourceGroupDeploymentWithGalleryTemplate() + { + CreatePSResourceGroupDeploymentParameters expectedParameters = new CreatePSResourceGroupDeploymentParameters() + { + GalleryTemplateIdentity = "sqlServer", + DeploymentName = deploymentName, + StorageAccountName = storageAccountName, + TemplateVersion = "1.0" + }; + CreatePSResourceGroupDeploymentParameters actualParameters = new CreatePSResourceGroupDeploymentParameters(); + PSResourceGroupDeployment expected = new PSResourceGroupDeployment() + { + Mode = DeploymentMode.Incremental, + DeploymentName = deploymentName, + CorrelationId = "123", + Outputs = new Dictionary() + { + { "Variable1", new DeploymentVariable() { Value = "true", Type = "bool" } }, + { "Variable2", new DeploymentVariable() { Value = "10", Type = "int" } }, + { "Variable3", new DeploymentVariable() { Value = "hello world", Type = "string" } } + }, + Parameters = new Dictionary() + { + { "Parameter1", new DeploymentVariable() { Value = "true", Type = "bool" } }, + { "Parameter2", new DeploymentVariable() { Value = "10", Type = "int" } }, + { "Parameter3", new DeploymentVariable() { Value = "hello world", Type = "string" } } + }, + ProvisioningState = ProvisioningState.Succeeded, + ResourceGroupName = resourceGroupName, + TemplateLink = new TemplateLink() + { + ContentVersion = "1.0", + Uri = new Uri("http://mytemplate.com") + }, + Timestamp = new DateTime(2014, 2, 13) + }; + resourcesClientMock.Setup(f => f.ExecuteDeployment( + It.IsAny())) + .Returns(expected) + .Callback((CreatePSResourceGroupDeploymentParameters p) => { actualParameters = p; }); + + cmdlet.ResourceGroupName = resourceGroupName; + cmdlet.Name = expectedParameters.DeploymentName; + cmdlet.GalleryTemplateIdentity = expectedParameters.GalleryTemplateIdentity; + cmdlet.TemplateVersion = expectedParameters.TemplateVersion; + + cmdlet.ExecuteCmdlet(); + + Assert.Equal(expectedParameters.DeploymentName, actualParameters.DeploymentName); + Assert.Equal(expectedParameters.GalleryTemplateIdentity, actualParameters.GalleryTemplateIdentity); + Assert.Equal(expectedParameters.TemplateFile, actualParameters.TemplateFile); + Assert.NotNull(actualParameters.TemplateParameterObject); + Assert.Equal(expectedParameters.TemplateVersion, actualParameters.TemplateVersion); + Assert.Equal(null, actualParameters.StorageAccountName); + + commandRuntimeMock.Verify(f => f.WriteObject(expected), Times.Once()); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/StopAzureResourceGroupDeploymentCommandTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/StopAzureResourceGroupDeploymentCommandTests.cs new file mode 100644 index 000000000000..9ab67acfda01 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroupDeployments/StopAzureResourceGroupDeploymentCommandTests.cs @@ -0,0 +1,58 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.Azure.Commands.Resources.ResourceGroups; +using Moq; +using Xunit; + +namespace Microsoft.Azure.Commands.Resources.Test.Resources +{ + public class StopAzureResourceGroupDeploymentCommandTests + { + private StopAzureResourceGroupDeploymentCommand cmdlet; + + private Mock resourcesClientMock; + + private Mock commandRuntimeMock; + + private string resourceGroupName = "myResourceGroup"; + + public StopAzureResourceGroupDeploymentCommandTests() + { + resourcesClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new StopAzureResourceGroupDeploymentCommand() + { + CommandRuntime = commandRuntimeMock.Object, + ResourcesClient = resourcesClientMock.Object + }; + } + + [Fact] + public void StopsActiveDeployment() + { + commandRuntimeMock.Setup(f => f.ShouldProcess(It.IsAny(), It.IsAny())).Returns(true); + + cmdlet.ResourceGroupName = resourceGroupName; + cmdlet.PassThru = true; + cmdlet.Force = true; + + cmdlet.ExecuteCmdlet(); + + commandRuntimeMock.Verify(f => f.WriteObject(true), Times.Once()); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/GetAzureLocationCommandTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/GetAzureLocationCommandTests.cs new file mode 100644 index 000000000000..f79274707ede --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/GetAzureLocationCommandTests.cs @@ -0,0 +1,64 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using Xunit; + +namespace Microsoft.Azure.Commands.Resources.Test +{ + public class GetAzureLocationCommandTests + { + private GetAzureLocationCommand cmdlet; + + private Mock resourcesClientMock; + + private Mock commandRuntimeMock; + + public GetAzureLocationCommandTests() + { + resourcesClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new GetAzureLocationCommand() + { + CommandRuntime = commandRuntimeMock.Object, + ResourcesClient = resourcesClientMock.Object + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void GetsLocations() + { + List result = new List() + { + new PSResourceProviderType() + { + Locations = new List() { "West US" }, + Name = "Microsoft.Web" + } + }; + resourcesClientMock.Setup(f => f.GetLocations()).Returns(result); + + cmdlet.ExecuteCmdlet(); + + Assert.Equal(1, result.Count); + + commandRuntimeMock.Verify(f => f.WriteObject(result, true), Times.Once()); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/GetAzureResourceGroupCommandTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/GetAzureResourceGroupCommandTests.cs new file mode 100644 index 000000000000..fb5f78e5ae76 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/GetAzureResourceGroupCommandTests.cs @@ -0,0 +1,73 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using Xunit; + +namespace Microsoft.Azure.Commands.Resources.Test +{ + public class GetAzureResourceGroupCommandTests + { + private GetAzureResourceGroupCommand cmdlet; + + private Mock resourcesClientMock; + + private Mock commandRuntimeMock; + + private string resourceGroupName = "myResourceGroup"; + + private string resourceGroupLocation = "West US"; + + public GetAzureResourceGroupCommandTests() + { + resourcesClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new GetAzureResourceGroupCommand() + { + CommandRuntime = commandRuntimeMock.Object, + ResourcesClient = resourcesClientMock.Object + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void GetsResourcesGroups() + { + List result = new List(); + PSResourceGroup expected = new PSResourceGroup() + { + Location = resourceGroupLocation, + ResourceGroupName = resourceGroupName, + Resources = new List() { new PSResource() { Name = "resource1" } } + }; + result.Add(expected); + resourcesClientMock.Setup(f => f.FilterResourceGroups(resourceGroupName, null, true)).Returns(result); + + cmdlet.Name = resourceGroupName; + + cmdlet.ExecuteCmdlet(); + + Assert.Equal(1, result.Count); + Assert.Equal(resourceGroupName, result[0].ResourceGroupName); + Assert.Equal(resourceGroupLocation, result[0].Location); + Assert.Equal(1, result[0].Resources.Count); + + commandRuntimeMock.Verify(f => f.WriteObject(result, true), Times.Once()); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/GetAzureResourceGroupLogCommandTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/GetAzureResourceGroupLogCommandTests.cs new file mode 100644 index 000000000000..dd459b316374 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/GetAzureResourceGroupLogCommandTests.cs @@ -0,0 +1,103 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using Xunit; + +namespace Microsoft.Azure.Commands.Resources.Test +{ + public class GetAzureResourceGroupLogCommandTests + { + private GetAzureResourceGroupLogCommand cmdlet; + + private Mock resourcesClientMock; + + private Mock commandRuntimeMock; + + public GetAzureResourceGroupLogCommandTests() + { + resourcesClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new GetAzureResourceGroupLogCommand() + { + CommandRuntime = commandRuntimeMock.Object, + ResourcesClient = resourcesClientMock.Object + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void GetAzureResourceGroupLogOutputsProperties() + { + List result = new List(); + result.Add(new PSDeploymentEventData + { + EventId = "ac7d2ab5-698a-4c33-9c19-0a93d3d7f527", + EventName = "Start request", + EventSource = "Microsoft Resources", + Channels = "Operation", + Level = "Informational", + Timestamp = DateTime.Now, + OperationId = "c0f2e85f-efb0-47d0-bf90-f983ec8be91d", + OperationName = "Microsoft.Resources/subscriptions/resourcegroups/deployments/write", + Status = "Succeeded", + SubStatus = "Created", + ResourceGroupName = "foo", + ResourceProvider = "Microsoft Resources", + ResourceUri = + "/subscriptions/ffce8037-a374-48bf-901d-dac4e3ea8c09/resourcegroups/foo/deployments/testdeploy", + HttpRequest = new PSDeploymentEventDataHttpRequest + { + Url = "http://path/subscriptions/ffce8037-a374-48bf-901d-dac4e3ea8c09/resourcegroups/foo/deployments/testdeploy", + Method = "PUT", + ClientId = "1234", + ClientIpAddress = "123.123.123.123" + }, + Authorization = new PSDeploymentEventDataAuthorization + { + Action = "PUT", + Condition = "", + Role = "Sender", + Scope = "None" + }, + Claims = new Dictionary + { + {"aud", "https://management.core.windows.net/"}, + {"iss", "https://sts.windows.net/123456/"}, + {"iat", "h123445"} + }, + Properties = new Dictionary() + }); + + GetPSResourceGroupLogParameters expected = new GetPSResourceGroupLogParameters(); + + resourcesClientMock.Setup(f => f.GetResourceGroupLogs(It.IsAny())) + .Returns(result) + .Callback((GetPSResourceGroupLogParameters r) => expected = r); + + cmdlet.Name = "foo"; + + cmdlet.ExecuteCmdlet(); + + Assert.Equal(1, result.Count()); + Assert.Equal("foo", expected.Name); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/NewAzureResourceGroupCommandTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/NewAzureResourceGroupCommandTests.cs new file mode 100644 index 000000000000..5fc64dc3516f --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/NewAzureResourceGroupCommandTests.cs @@ -0,0 +1,157 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections; +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using Xunit; + +namespace Microsoft.Azure.Commands.Resources.Test +{ + public class NewAzureResourceGroupCommandTests + { + private NewAzureResourceGroupCommand cmdlet; + + private Mock resourcesClientMock; + + private Mock commandRuntimeMock; + + private string resourceGroupName = "myResourceGroup"; + + private string resourceGroupLocation = "West US"; + + private string deploymentName = "fooDeployment"; + + private string templateFile = @"Resources\sampleTemplateFile.json"; + + private string storageAccountName = "myStorageAccount"; + + private Hashtable[] tags; + + public NewAzureResourceGroupCommandTests() + { + resourcesClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new NewAzureResourceGroupCommand() + { + CommandRuntime = commandRuntimeMock.Object, + ResourcesClient = resourcesClientMock.Object + }; + + tags = new[] + { + new Hashtable + { + {"Name", "value1"}, + {"Value", ""} + } + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CreatesNewPSResourceGroupWithUserTemplate() + { + CreatePSResourceGroupParameters expectedParameters = new CreatePSResourceGroupParameters() + { + ResourceGroupName = resourceGroupName, + Location = resourceGroupLocation, + TemplateFile = templateFile, + DeploymentName = deploymentName, + StorageAccountName = storageAccountName, + TemplateVersion = "1.0", + Tag = tags + }; + CreatePSResourceGroupParameters actualParameters = new CreatePSResourceGroupParameters(); + PSResourceGroup expected = new PSResourceGroup() + { + Location = expectedParameters.Location, + ResourceGroupName = expectedParameters.ResourceGroupName, + Resources = new List() { new PSResource() { Name = "resource1" } }, + Tags = expectedParameters.Tag + }; + resourcesClientMock.Setup(f => f.CreatePSResourceGroup(It.IsAny())) + .Returns(expected) + .Callback((CreatePSResourceGroupParameters p) => { actualParameters = p; }); + + cmdlet.Name = expectedParameters.ResourceGroupName; + cmdlet.Location = expectedParameters.Location; + cmdlet.TemplateFile = expectedParameters.TemplateFile; + cmdlet.DeploymentName = expectedParameters.DeploymentName; + cmdlet.TemplateVersion = expectedParameters.TemplateVersion; + cmdlet.Tag = expectedParameters.Tag; + + cmdlet.ExecuteCmdlet(); + + Assert.Equal(expectedParameters.ResourceGroupName, actualParameters.ResourceGroupName); + Assert.Equal(expectedParameters.Location, actualParameters.Location); + Assert.Equal(expectedParameters.DeploymentName, actualParameters.DeploymentName); + Assert.Equal(expectedParameters.GalleryTemplateIdentity, actualParameters.GalleryTemplateIdentity); + Assert.Equal(expectedParameters.TemplateFile, actualParameters.TemplateFile); + Assert.NotNull(actualParameters.TemplateParameterObject); + Assert.Equal(expectedParameters.TemplateVersion, actualParameters.TemplateVersion); + Assert.Equal(null, actualParameters.StorageAccountName); + Assert.Equal(expectedParameters.Tag, actualParameters.Tag); + + commandRuntimeMock.Verify(f => f.WriteObject(expected), Times.Once()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CreatesNewPSResourceGroupWithGalleryTemplate() + { + CreatePSResourceGroupParameters expectedParameters = new CreatePSResourceGroupParameters() + { + ResourceGroupName = resourceGroupName, + Location = resourceGroupLocation, + GalleryTemplateIdentity = "sqlServer", + DeploymentName = deploymentName, + StorageAccountName = storageAccountName, + TemplateVersion = "1.0" + }; + CreatePSResourceGroupParameters actualParameters = new CreatePSResourceGroupParameters(); + PSResourceGroup expected = new PSResourceGroup() + { + Location = expectedParameters.Location, + ResourceGroupName = expectedParameters.ResourceGroupName, + Resources = new List() { new PSResource() { Name = "resource1" } } + }; + resourcesClientMock.Setup(f => f.CreatePSResourceGroup(It.IsAny())) + .Returns(expected) + .Callback((CreatePSResourceGroupParameters p) => { actualParameters = p; }); + + cmdlet.Name = expectedParameters.ResourceGroupName; + cmdlet.Location = expectedParameters.Location; + cmdlet.GalleryTemplateIdentity = expectedParameters.GalleryTemplateIdentity; + cmdlet.DeploymentName = expectedParameters.DeploymentName; + cmdlet.TemplateVersion = expectedParameters.TemplateVersion; + + cmdlet.ExecuteCmdlet(); + + Assert.Equal(expectedParameters.ResourceGroupName, actualParameters.ResourceGroupName); + Assert.Equal(expectedParameters.Location, actualParameters.Location); + Assert.Equal(expectedParameters.DeploymentName, actualParameters.DeploymentName); + Assert.Equal(expectedParameters.GalleryTemplateIdentity, actualParameters.GalleryTemplateIdentity); + Assert.Equal(expectedParameters.TemplateFile, actualParameters.TemplateFile); + Assert.NotNull(actualParameters.TemplateParameterObject); + Assert.Equal(expectedParameters.TemplateVersion, actualParameters.TemplateVersion); + Assert.Equal(null, actualParameters.StorageAccountName); + + commandRuntimeMock.Verify(f => f.WriteObject(expected), Times.Once()); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/RemoveAzureResourceGroupCommandTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/RemoveAzureResourceGroupCommandTests.cs new file mode 100644 index 000000000000..f1aefa5bdd29 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/RemoveAzureResourceGroupCommandTests.cs @@ -0,0 +1,61 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using Xunit; + +namespace Microsoft.Azure.Commands.Resources.Test +{ + public class RemoveAzureResourceGroupCommandTests + { + private RemoveAzureResourceGroupCommand cmdlet; + + private Mock resourcesClientMock; + + private Mock commandRuntimeMock; + + private string resourceGroupName = "myResourceGroup"; + + public RemoveAzureResourceGroupCommandTests() + { + resourcesClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new RemoveAzureResourceGroupCommand() + { + CommandRuntime = commandRuntimeMock.Object, + ResourcesClient = resourcesClientMock.Object + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void RemovesResourceGroup() + { + commandRuntimeMock.Setup(f => f.ShouldProcess(It.IsAny(), It.IsAny())).Returns(true); + resourcesClientMock.Setup(f => f.DeleteResourceGroup(resourceGroupName)); + + cmdlet.Name = resourceGroupName; + cmdlet.PassThru = true; + cmdlet.Force = true; + + cmdlet.ExecuteCmdlet(); + + resourcesClientMock.Verify(f => f.DeleteResourceGroup(resourceGroupName), Times.Once()); + commandRuntimeMock.Verify(f => f.WriteObject(true), Times.Once()); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/SetAzureResourceGroupCommandTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/SetAzureResourceGroupCommandTests.cs new file mode 100644 index 000000000000..dab0762c2966 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ResourceGroups/SetAzureResourceGroupCommandTests.cs @@ -0,0 +1,86 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using Xunit; + +namespace Microsoft.Azure.Commands.Resources.Test +{ + public class SetAzureResourceGroupCommandTests + { + private SetAzureResourceGroupCommand cmdlet; + + private Mock resourcesClientMock; + + private Mock commandRuntimeMock; + + private string resourceGroupName = "myResourceGroup"; + + private List tags; + + public SetAzureResourceGroupCommandTests() + { + resourcesClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new SetAzureResourceGroupCommand() + { + CommandRuntime = commandRuntimeMock.Object, + ResourcesClient = resourcesClientMock.Object + }; + + tags = new [] {new Hashtable + { + {"Name", "value1"}, + {"Value", ""} + }}.ToList(); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void UpdatesSetPSResourceGroupWithTag() + { + UpdatePSResourceGroupParameters expectedParameters = new UpdatePSResourceGroupParameters() + { + ResourceGroupName = resourceGroupName, + Tag = tags.ToArray() + }; + UpdatePSResourceGroupParameters actualParameters = new UpdatePSResourceGroupParameters(); + PSResourceGroup expected = new PSResourceGroup() + { + ResourceGroupName = expectedParameters.ResourceGroupName, + Resources = new List() { new PSResource() { Name = "resource1" } }, + Tags = expectedParameters.Tag + }; + resourcesClientMock.Setup(f => f.UpdatePSResourceGroup(It.IsAny())) + .Returns(expected) + .Callback((UpdatePSResourceGroupParameters p) => { actualParameters = p; }); + + cmdlet.Name = expectedParameters.ResourceGroupName; + cmdlet.Tag = expectedParameters.Tag; + + cmdlet.ExecuteCmdlet(); + + Assert.Equal(expectedParameters.ResourceGroupName, actualParameters.ResourceGroupName); + Assert.Equal(expectedParameters.Tag, actualParameters.Tag); + + commandRuntimeMock.Verify(f => f.WriteObject(expected), Times.Once()); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Resources/EmptyWebsiteTemplate.json b/src/ResourceManager/Resources/Commands.Resources.Test/Resources/EmptyWebsiteTemplate.json new file mode 100644 index 000000000000..892f983336e5 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Resources/EmptyWebsiteTemplate.json @@ -0,0 +1,64 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "siteName": { + "type": "string" + }, + "hostingPlanName": { + "type": "string" + }, + "siteLocation": { + "type": "string" + }, + "sku": { + "type": "string", + "allowedValues": [ + "Free", + "Shared", + "Basic", + "Standard" + ], + "defaultValue": "Free" + }, + "workerSize": { + "type": "string", + "allowedValues": [ + "0", + "1", + "2" + ], + "defaultValue": "0" + } + }, + "resources": [ + { + "apiVersion": "2014-04-01", + "name": "[parameters('hostingPlanName')]", + "type": "Microsoft.Web/serverfarms", + "location": "[parameters('siteLocation')]", + "properties": { + "name": "[parameters('hostingPlanName')]", + "sku": "[parameters('sku')]", + "workerSize": "[parameters('workerSize')]", + "numberOfWorkers": 1 + } + }, + { + "apiVersion": "2014-04-01", + "name": "[parameters('siteName')]", + "type": "Microsoft.Web/sites", + "location": "[parameters('siteLocation')]", + "tags": { + "[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]": "Resource" + }, + "dependsOn": [ + "[concat('Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]" + ], + "properties": { + "name": "[parameters('siteName')]", + "serverFarm": "[parameters('hostingPlanName')]" + } + } + ] +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Resources/GetAzureResourceCommandTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/Resources/GetAzureResourceCommandTests.cs new file mode 100644 index 000000000000..17032e7c0761 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Resources/GetAzureResourceCommandTests.cs @@ -0,0 +1,108 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using System.Runtime.Serialization.Formatters; +using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.Azure.Management.Resources.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using Newtonsoft.Json; +using Xunit; + +namespace Microsoft.Azure.Commands.Resources.Test +{ + public class GetAzureResourceCommandTests + { + private GetAzureResourceCommand cmdlet; + + private Mock resourcesClientMock; + + private Mock commandRuntimeMock; + + private string resourceName = "myResource"; + + private string resourceGroupName = "myResourceGroup"; + + private string resourceType = "Microsoft.Web/sites"; + + private string resourceGroupLocation = "West US"; + + private Dictionary properties; + + private string serializedProperties; + + public GetAzureResourceCommandTests() + { + resourcesClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new GetAzureResourceCommand() + { + CommandRuntime = commandRuntimeMock.Object, + ResourcesClient = resourcesClientMock.Object + }; + properties = new Dictionary + { + {"name", "site1"}, + {"siteMode", "Standard"}, + {"computeMode", "Dedicated"}, + {"misc", new Dictionary + { + {"key1", "value1"}, + {"key2", "value2"} + }} + }; + serializedProperties = JsonConvert.SerializeObject(properties, new JsonSerializerSettings + { + TypeNameAssemblyFormat = FormatterAssemblyStyle.Simple, + TypeNameHandling = TypeNameHandling.None + }); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void GetsResourcesGroups() + { + List result = new List(); + Resource expected = new Resource() + { + Id = "/subscriptions/aaaa/resourceGroups/foo/providers/Microsoft.Web/serverFarms/" + resourceName, + Name = resourceName, + Location = resourceGroupLocation, + Type = resourceType, + ProvisioningState = "Running", + Properties = serializedProperties + }; + FilterResourcesOptions inputParameters = new FilterResourcesOptions + { + Name = resourceName, + ResourceType = resourceType, + ResourceGroup = resourceGroupName, + }; + result.Add(expected); + resourcesClientMock.Setup(f => f.FilterResources(inputParameters)).Returns(result); + + cmdlet.ResourceGroupName = resourceGroupName; + + cmdlet.ExecuteCmdlet(); + + Assert.Equal(1, result.Count); + Assert.Equal(resourceGroupLocation, result[0].Location); + Assert.Equal(resourceType, result[0].Type); + Assert.Equal("Running", result[0].ProvisioningState); + Assert.Equal(serializedProperties, result[0].Properties); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Resources/NewAzureResourceCommandTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/Resources/NewAzureResourceCommandTests.cs new file mode 100644 index 000000000000..faa6bf162921 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Resources/NewAzureResourceCommandTests.cs @@ -0,0 +1,124 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections; +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Moq; +using Xunit; + +namespace Microsoft.Azure.Commands.Resources.Test +{ + public class NewAzureResourceCommandTests + { + private NewAzureResourceCommand cmdlet; + + private Mock resourcesClientMock; + + private Mock commandRuntimeMock; + + private string resourceName = "myResource"; + + private string resourceParentName = "myResourceParent"; + + private string resourceGroupName = "myResourceGroup"; + + private string resourceType = "Microsoft.Web/sites"; + + private string resourceGroupLocation = "West US"; + + private Dictionary properties; + + private Hashtable[] tags; + + public NewAzureResourceCommandTests() + { + resourcesClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new NewAzureResourceCommand() + { + CommandRuntime = commandRuntimeMock.Object, + ResourcesClient = resourcesClientMock.Object + }; + properties = new Dictionary + { + {"name", "site1"}, + {"siteMode", "Standard"}, + {"computeMode", "Dedicated"}, + {"misc", new Dictionary + { + {"key1", "value1"}, + {"key2", "value2"} + }} + }; + tags = new[] + { + new Hashtable + { + {"Name", "value1"}, + {"Value", ""} + } + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void CreatesNewPSResourceGroupWithUserTemplate() + { + CreatePSResourceParameters expectedParameters = new CreatePSResourceParameters() + { + Name = resourceName, + ParentResource = resourceParentName, + ResourceType = resourceType, + ResourceGroupName = resourceGroupName, + PropertyObject = properties.ToHashtable(), + Tag = tags + }; + CreatePSResourceParameters actualParameters = new CreatePSResourceParameters(); + PSResource expected = new PSResource() + { + Name = expectedParameters.Name, + Location = resourceGroupLocation, + ResourceGroupName = expectedParameters.ResourceGroupName, + Properties = expectedParameters.PropertyObject, + ResourceType = expectedParameters.ResourceType, + Tags = expectedParameters.Tag + }; + resourcesClientMock.Setup(f => f.CreatePSResource(It.IsAny())) + .Returns(expected) + .Callback((CreatePSResourceParameters p) => { actualParameters = p; }); + + cmdlet.Name = expectedParameters.Name; + cmdlet.ResourceGroupName = expectedParameters.ResourceGroupName; + cmdlet.ResourceType = expectedParameters.ResourceType; + cmdlet.ParentResource = expectedParameters.ParentResource; + cmdlet.PropertyObject = expectedParameters.PropertyObject; + cmdlet.Tag = expectedParameters.Tag; + + cmdlet.ExecuteCmdlet(); + + Assert.Equal(expectedParameters.Name, actualParameters.Name); + Assert.Equal(expectedParameters.ResourceGroupName, actualParameters.ResourceGroupName); + Assert.Equal(expectedParameters.ResourceType, actualParameters.ResourceType); + Assert.Equal(expectedParameters.ParentResource, actualParameters.ParentResource); + Assert.Equal(expectedParameters.PropertyObject, actualParameters.PropertyObject); + Assert.Equal(expectedParameters.Tag, actualParameters.Tag); + + commandRuntimeMock.Verify(f => f.WriteObject(expected), Times.Once()); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Resources/RemoveAzureResourceCommandTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/Resources/RemoveAzureResourceCommandTests.cs new file mode 100644 index 000000000000..806ff0036cb4 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Resources/RemoveAzureResourceCommandTests.cs @@ -0,0 +1,88 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Moq; +using Xunit; + +namespace Microsoft.Azure.Commands.Resources.Test +{ + public class RemoveAzureResourceCommandTests + { + private RemoveAzureResourceCommand cmdlet; + + private Mock resourcesClientMock; + + private Mock commandRuntimeMock; + + private string resourceName = "myResource"; + + private string resourceParentName = "myResourceParent"; + + private string resourceGroupName = "myResourceGroup"; + + private string resourceType = "Microsoft.Web/sites"; + + public RemoveAzureResourceCommandTests() + { + resourcesClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new RemoveAzureResourceCommand() + { + CommandRuntime = commandRuntimeMock.Object, + ResourcesClient = resourcesClientMock.Object + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void RemovesResourceGroup() + { + BasePSResourceParameters actualParameters = new BasePSResourceParameters(); + BasePSResourceParameters expectedParameters = new BasePSResourceParameters() + { + Name = resourceName, + ResourceType = resourceType, + ResourceGroupName = resourceGroupName, + ParentResource = resourceParentName, + }; + + commandRuntimeMock.Setup(f => f.ShouldProcess(It.IsAny(), It.IsAny())).Returns(true); + resourcesClientMock + .Setup(f => f.DeleteResource(It.IsAny())) + .Callback((BasePSResourceParameters p) => + { + actualParameters = p; + }); + + cmdlet.Name = resourceName; + cmdlet.ResourceType = resourceType; + cmdlet.ResourceGroupName = resourceGroupName; + cmdlet.ParentResource = resourceParentName; + cmdlet.PassThru = true; + cmdlet.Force = true; + + cmdlet.ExecuteCmdlet(); + + Assert.Equal(expectedParameters.Name, actualParameters.Name); + Assert.Equal(expectedParameters.ResourceGroupName, actualParameters.ResourceGroupName); + Assert.Equal(expectedParameters.ResourceType, actualParameters.ResourceType); + Assert.Equal(expectedParameters.ParentResource, actualParameters.ParentResource); + + commandRuntimeMock.Verify(f => f.WriteObject(true), Times.Once()); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Resources/SetAzureResourceCommandTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/Resources/SetAzureResourceCommandTests.cs new file mode 100644 index 000000000000..50dad9739fa9 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Resources/SetAzureResourceCommandTests.cs @@ -0,0 +1,109 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Moq; +using Xunit; + +namespace Microsoft.Azure.Commands.Resources.Test +{ + public class SetAzureResourceCommandTests + { + private SetAzureResourceCommand cmdlet; + + private Mock resourcesClientMock; + + private Mock commandRuntimeMock; + + private string resourceName = "myResource"; + + private string resourceParentName = "myResourceParent"; + + private string resourceGroupName = "myResourceGroup"; + + private string resourceType = "Microsoft.Web/sites"; + + private string resourceGroupLocation = "West US"; + + private Dictionary properties; + + public SetAzureResourceCommandTests() + { + resourcesClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new SetAzureResourceCommand() + { + CommandRuntime = commandRuntimeMock.Object, + ResourcesClient = resourcesClientMock.Object + }; + properties = new Dictionary + { + {"name", "site1"}, + {"siteMode", "Standard"}, + {"computeMode", "Dedicated"}, + {"misc", new Dictionary + { + {"key1", "value1"}, + {"key2", "value2"} + }} + }; + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void UpdatrePSResourceGroup() + { + UpdatePSResourceParameters expectedParameters = new UpdatePSResourceParameters() + { + Name = resourceName, + ParentResource = resourceParentName, + ResourceType = resourceType, + ResourceGroupName = resourceGroupName, + PropertyObject = properties.ToHashtable() + }; + UpdatePSResourceParameters actualParameters = new UpdatePSResourceParameters(); + PSResource expected = new PSResource() + { + Name = expectedParameters.Name, + Location = resourceGroupLocation, + ResourceGroupName = expectedParameters.ResourceGroupName, + Properties = expectedParameters.PropertyObject, + ResourceType = expectedParameters.ResourceType + }; + resourcesClientMock.Setup(f => f.UpdatePSResource(It.IsAny())) + .Returns(expected) + .Callback((UpdatePSResourceParameters p) => { actualParameters = p; }); + + cmdlet.Name = expectedParameters.Name; + cmdlet.ResourceGroupName = expectedParameters.ResourceGroupName; + cmdlet.ResourceType = expectedParameters.ResourceType; + cmdlet.ParentResource = expectedParameters.ParentResource; + cmdlet.PropertyObject = expectedParameters.PropertyObject; + + cmdlet.ExecuteCmdlet(); + + Assert.Equal(expectedParameters.Name, actualParameters.Name); + Assert.Equal(expectedParameters.ResourceGroupName, actualParameters.ResourceGroupName); + Assert.Equal(expectedParameters.ResourceType, actualParameters.ResourceType); + Assert.Equal(expectedParameters.ParentResource, actualParameters.ParentResource); + Assert.Equal(expectedParameters.PropertyObject, actualParameters.PropertyObject); + + commandRuntimeMock.Verify(f => f.WriteObject(expected), Times.Once()); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Resources/WebSite.param.dev.json b/src/ResourceManager/Resources/Commands.Resources.Test/Resources/WebSite.param.dev.json new file mode 100644 index 000000000000..990eacce3eb8 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Resources/WebSite.param.dev.json @@ -0,0 +1,23 @@ +{ + "siteName": { + "value": "testericeric" + }, + "hostingPlanName": { + "value": "test" + }, + "siteLocation": { + "value": "West US" + }, + "sku": { + "value": "Free" + }, + "workerSize": { + "value": "0" + }, + "numberOfWorker": { + "value": 1 + }, + "isWorker": { + "value": true + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Resources/invalidTemplateFile.json b/src/ResourceManager/Resources/Commands.Resources.Test/Resources/invalidTemplateFile.json new file mode 100644 index 000000000000..e0e93d66273c --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Resources/invalidTemplateFile.json @@ -0,0 +1,103 @@ +{ + "schemaVersion": "2014-01.1.0-preview", + "parameters": { + "string": { + "type": "string", + "allowedValues": "0-10" + }, + "securestring": { + "type": "securestring" + }, + "int": { + "type": "int" + }, + "bool": { + "type": "bool" + } + }, + "variables": { + "string": "string", + "int": 42, + "bool": true, + "array": [ + 1, + 2, + 3, + 4 + ], + "object": { + "string": "string", + "int": 42, + "bool": true, + "array": [ + 1, + 2, + 3, + 4 + ], + "object": { + "vmSize": "Large", + "location": "West US" + } + } + }, + "resources": [ + { + "name": "resource1", + "type": "ResourceProviderTestHost/TestResourceType", + "apiVersion": "1.0", + "resources": [ + { + "name": "nestedresource1", + "type": "TestResourceTypeNestedOne", + "apiVersion": "1.0", + "properties": { + "disktype": "OS", + "mediaLink": "vhds/WebTierOs1.vhd", + "sourceMediaLink": "Windows-Server-2012-R2-201310.01-en.us-127GB.vhd" + }, + "dependsOn": [ + "ResourceProviderTestHost/TestResourceType/resource2" + ] + } + ] + }, + { + "name": "resource2", + "type": "ResourceProviderTestHost/TestResourceType", + "apiVersion": "1.0", + "location": "DevFabric", + "dependsOn": [ + "ResourceProviderTestHost/TestResourceType/resource1" + ], + "properties": { + "availabilitySet": "WebAvailabilitySet", + "hardwareProfile": { + "vmSize": "small" + } + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + ], + "outputs": { + "string": { + "type": "string", + "value": "myvalue" + }, + "securestring": { + "type": "securestring", + "value": "myvalue" + }, + "int": { + "type": "int", + "value": 42 + }, + "bool": { + "type": "bool", + "value": true + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Resources/sampleTemplateFile.json b/src/ResourceManager/Resources/Commands.Resources.Test/Resources/sampleTemplateFile.json new file mode 100644 index 000000000000..f07d4bc2cd56 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Resources/sampleTemplateFile.json @@ -0,0 +1,102 @@ +{ + "schemaVersion": "2014-01.1.0-preview", + "parameters": { + "string": { + "type": "string" + }, + "securestring": { + "type": "securestring" + }, + "int": { + "type": "int" + }, + "bool": { + "type": "bool" + } + }, + "variables": { + "string": "string", + "int": 42, + "bool": true, + "array": [ + 1, + 2, + 3, + 4 + ], + "object": { + "string": "string", + "int": 42, + "bool": true, + "array": [ + 1, + 2, + 3, + 4 + ], + "object": { + "vmSize": "Large", + "location": "West US" + } + } + }, + "resources": [ + { + "name": "resource1", + "type": "ResourceProviderTestHost/TestResourceType", + "apiVersion": "1.0", + "resources": [ + { + "name": "nestedresource1", + "type": "TestResourceTypeNestedOne", + "apiVersion": "1.0", + "properties": { + "disktype": "OS", + "mediaLink": "vhds/WebTierOs1.vhd", + "sourceMediaLink": "Windows-Server-2012-R2-201310.01-en.us-127GB.vhd" + }, + "dependsOn": [ + "ResourceProviderTestHost/TestResourceType/resource2" + ] + } + ] + }, + { + "name": "resource2", + "type": "ResourceProviderTestHost/TestResourceType", + "apiVersion": "1.0", + "location": "DevFabric", + "dependsOn": [ + "ResourceProviderTestHost/TestResourceType/resource1" + ], + "properties": { + "availabilitySet": "WebAvailabilitySet", + "hardwareProfile": { + "vmSize": "small" + } + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + ], + "outputs": { + "string": { + "type": "string", + "value": "myvalue" + }, + "securestring": { + "type": "securestring", + "value": "myvalue" + }, + "int": { + "type": "int", + "value": 42 + }, + "bool": { + "type": "bool", + "value": true + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Resources/sampleTemplateParameterFile.json b/src/ResourceManager/Resources/Commands.Resources.Test/Resources/sampleTemplateParameterFile.json new file mode 100644 index 000000000000..d182e94359bc --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Resources/sampleTemplateParameterFile.json @@ -0,0 +1,14 @@ +{ + "securestring" : { + "value" : "myvalue" + }, + "bool" : { + "value" : true + }, + "string" : { + "value" : "myvalue" + }, + "int" : { + "value" : 12 + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Resources/sampleTemplateParameterFileSchema2.json b/src/ResourceManager/Resources/Commands.Resources.Test/Resources/sampleTemplateParameterFileSchema2.json new file mode 100644 index 000000000000..82db1503ed06 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Resources/sampleTemplateParameterFileSchema2.json @@ -0,0 +1,18 @@ +{ + "$schema" : "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentParameter.json#", + "contentVersion" : "1.0.0.0", + "parameters" : { + "securestring" : { + "value" : "myvalue" + }, + "bool" : { + "value" : "True" + }, + "string" : { + "value" : "myvalue" + }, + "int" : { + "value" : "12" + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ActiveDirectoryTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ActiveDirectoryTests.cs new file mode 100644 index 000000000000..a0fb4863640c --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ActiveDirectoryTests.cs @@ -0,0 +1,619 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Graph.RBAC; +using Microsoft.Azure.Graph.RBAC.Models; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Microsoft.WindowsAzure.Testing; +using System.Linq; +using Xunit; + +namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests +{ + public class ActiveDirectoryTests + { + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetAllADGroups() + { + const string scriptMethod = "Test-GetAllADGroups"; + Group newGroup = null; + var controllerAdmin = ResourcesController.NewInstance; + + controllerAdmin.RunPsTestWorkflow( + // scriptBuilder + () => + { + newGroup = CreateNewAdGroup(controllerAdmin); + return new[] { scriptMethod }; + }, + // initialize + null, + // cleanup + () => + { + DeleteAdGroup(controllerAdmin, newGroup); + }, + TestUtilities.GetCallingClass(), + TestUtilities.GetCurrentMethodName()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetADGroupWithSearchString() + { + const string scriptMethod = "Test-GetADGroupWithSearchString '{0}'"; + Group newGroup = null; + var controllerAdmin = ResourcesController.NewInstance; + + controllerAdmin.RunPsTestWorkflow( + // scriptBuilder + () => + { + newGroup = CreateNewAdGroup(controllerAdmin); + return new[] { string.Format(scriptMethod, newGroup.DisplayName) }; + }, + // initialize + null, + // cleanup + () => + { + DeleteAdGroup(controllerAdmin, newGroup); + }, + TestUtilities.GetCallingClass(), + TestUtilities.GetCurrentMethodName()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetADGroupWithBadSearchString() + { + ResourcesController.NewInstance.RunPsTest("Test-GetADGroupWithBadSearchString"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetADGroupWithObjectId() + { + const string scriptMethod = "Test-GetADGroupWithObjectId '{0}'"; + Group newGroup = null; + var controllerAdmin = ResourcesController.NewInstance; + + controllerAdmin.RunPsTestWorkflow( + // scriptBuilder + () => + { + newGroup = CreateNewAdGroup(controllerAdmin); + return new[] { string.Format(scriptMethod, newGroup.ObjectId) }; + }, + // initialize + null, + // cleanup + () => + { + DeleteAdGroup(controllerAdmin, newGroup); + }, + TestUtilities.GetCallingClass(), + TestUtilities.GetCurrentMethodName()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetADGroupWithBadObjectId() + { + ResourcesController.NewInstance.RunPsTest("Test-GetADGroupWithBadObjectId"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetADGroupWithUserObjectId() + { + const string scriptMethod = "Test-GetADGroupWithUserObjectId '{0}'"; + User newUser = null; + var controllerAdmin = ResourcesController.NewInstance; + + controllerAdmin.RunPsTestWorkflow( + // scriptBuilder + () => + { + newUser = CreateNewAdUser(controllerAdmin); + return new[] { string.Format(scriptMethod, newUser.ObjectId) }; + }, + // initialize + null, + // cleanup + () => + { + DeleteAdUser(controllerAdmin, newUser); + }, + TestUtilities.GetCallingClass(), + TestUtilities.GetCurrentMethodName()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetADGroupMemberWithGroupObjectId() + { + const string scriptMethod = "Test-GetADGroupMemberWithGroupObjectId '{0}' '{1}' '{2}'"; + User newUser = null; + Group newGroup = null; + var controllerAdmin = ResourcesController.NewInstance; + + controllerAdmin.RunPsTestWorkflow( + // scriptBuilder + () => + { + newUser = CreateNewAdUser(controllerAdmin); + newGroup = CreateNewAdGroup(controllerAdmin); + + string memberUrl = string.Format( + "{0}{1}/directoryObjects/{2}", + controllerAdmin.GraphClient.BaseUri.AbsoluteUri, + controllerAdmin.GraphClient.TenantID, + newUser.ObjectId); + + controllerAdmin.GraphClient.Group.AddMember(newGroup.ObjectId, new GroupAddMemberParameters(memberUrl)); + + return new[] { string.Format(scriptMethod, newGroup.ObjectId, newUser.ObjectId, newUser.DisplayName) }; + }, + // initialize + null, + // cleanup + () => + { + DeleteAdUser(controllerAdmin, newUser); + DeleteAdGroup(controllerAdmin, newGroup); + }, + TestUtilities.GetCallingClass(), + TestUtilities.GetCurrentMethodName()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetADGroupMemberWithBadGroupObjectId() + { + ResourcesController.NewInstance.RunPsTest("Test-GetADGroupMemberWithBadGroupObjectId"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetADGroupMemberWithUserObjectId() + { + const string scriptMethod = "Test-GetADGroupMemberWithUserObjectId '{0}'"; + User newUser = null; + var controllerAdmin = ResourcesController.NewInstance; + + controllerAdmin.RunPsTestWorkflow( + // scriptBuilder + () => + { + newUser = CreateNewAdUser(controllerAdmin); + return new[] { string.Format(scriptMethod, newUser.ObjectId) }; + }, + // initialize + null, + // cleanup + () => + { + DeleteAdUser(controllerAdmin, newUser); + }, + TestUtilities.GetCallingClass(), + TestUtilities.GetCurrentMethodName()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetADGroupMemberFromEmptyGroup() + { + const string scriptMethod = "Test-GetADGroupMemberFromEmptyGroup '{0}'"; + Group newGroup = null; + var controllerAdmin = ResourcesController.NewInstance; + + controllerAdmin.RunPsTestWorkflow( + // scriptBuilder + () => + { + newGroup = CreateNewAdGroup(controllerAdmin); + return new[] { string.Format(scriptMethod, newGroup.ObjectId) }; + }, + // initialize + null, + // cleanup + () => + { + DeleteAdGroup(controllerAdmin, newGroup); + }, + TestUtilities.GetCallingClass(), + TestUtilities.GetCurrentMethodName()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetADServicePrincipalWithObjectId() + { + const string scriptMethod = "Test-GetADServicePrincipalWithObjectId '{0}'"; + ServicePrincipal newServicePrincipal = null; + Application app = null; + var controllerAdmin = ResourcesController.NewInstance; + + controllerAdmin.RunPsTestWorkflow( + // scriptBuilder + () => + { + app = CreateNewAdApp(controllerAdmin); + newServicePrincipal = CreateNewAdServicePrincipal(controllerAdmin, app.AppId); + return new[] { string.Format(scriptMethod, newServicePrincipal.ObjectId) }; + }, + // initialize + null, + // cleanup + () => + { + DeleteAdServicePrincipal(controllerAdmin, newServicePrincipal); + DeleteAdApp(controllerAdmin, app); + }, + TestUtilities.GetCallingClass(), + TestUtilities.GetCurrentMethodName()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetADServicePrincipalWithBadObjectId() + { + ResourcesController.NewInstance.RunPsTest("Test-GetADServicePrincipalWithBadObjectId"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetADServicePrincipalWithUserObjectId() + { + const string scriptMethod = "Test-GetADServicePrincipalWithUserObjectId '{0}'"; + User newUser = null; + var controllerAdmin = ResourcesController.NewInstance; + + controllerAdmin.RunPsTestWorkflow( + // scriptBuilder + () => + { + newUser = CreateNewAdUser(controllerAdmin); + return new[] { string.Format(scriptMethod, newUser.ObjectId) }; + }, + // initialize + null, + // cleanup + () => + { + DeleteAdUser(controllerAdmin, newUser); + }, + TestUtilities.GetCallingClass(), + TestUtilities.GetCurrentMethodName()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetADServicePrincipalWithSPN() + { + const string scriptMethod = "Test-GetADServicePrincipalWithSPN '{0}'"; + ServicePrincipal newServicePrincipal = null; + Application app = null; + var controllerAdmin = ResourcesController.NewInstance; + + controllerAdmin.RunPsTestWorkflow( + // scriptBuilder + () => + { + app = CreateNewAdApp(controllerAdmin); + newServicePrincipal = CreateNewAdServicePrincipal(controllerAdmin, app.AppId); + return new[] { string.Format(scriptMethod, newServicePrincipal.ServicePrincipalNames[1]) }; + }, + // initialize + null, + // cleanup + () => + { + DeleteAdServicePrincipal(controllerAdmin, newServicePrincipal); + DeleteAdApp(controllerAdmin, app); + }, + TestUtilities.GetCallingClass(), + TestUtilities.GetCurrentMethodName()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetADServicePrincipalWithBadSPN() + { + ResourcesController.NewInstance.RunPsTest("Test-GetADServicePrincipalWithBadSPN"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetADServicePrincipalWithSearchString() + { + const string scriptMethod = "Test-GetADServicePrincipalWithSearchString '{0}'"; + ServicePrincipal newServicePrincipal = null; + Application app = null; + var controllerAdmin = ResourcesController.NewInstance; + + controllerAdmin.RunPsTestWorkflow( + // scriptBuilder + () => + { + app = CreateNewAdApp(controllerAdmin); + newServicePrincipal = CreateNewAdServicePrincipal(controllerAdmin, app.AppId); + return new[] { string.Format(scriptMethod, newServicePrincipal.DisplayName) }; + }, + // initialize + null, + // cleanup + () => + { + DeleteAdServicePrincipal(controllerAdmin, newServicePrincipal); + DeleteAdApp(controllerAdmin, app); + }, + TestUtilities.GetCallingClass(), + TestUtilities.GetCurrentMethodName()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetADServicePrincipalWithBadSearchString() + { + ResourcesController.NewInstance.RunPsTest("Test-GetADServicePrincipalWithBadSearchString"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetAllADUser() + { + const string scriptMethod = "Test-GetAllADUser"; + User newUser = null; + var controllerAdmin = ResourcesController.NewInstance; + + controllerAdmin.RunPsTestWorkflow( + // scriptBuilder + () => + { + newUser = CreateNewAdUser(controllerAdmin); + return new[] { string.Format(scriptMethod) }; + }, + // initialize + null, + // cleanup + () => + { + DeleteAdUser(controllerAdmin, newUser); + }, + TestUtilities.GetCallingClass(), + TestUtilities.GetCurrentMethodName()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetADUserWithObjectId() + { + const string scriptMethod = "Test-GetADUserWithObjectId '{0}'"; + User newUser = null; + var controllerAdmin = ResourcesController.NewInstance; + + controllerAdmin.RunPsTestWorkflow( + // scriptBuilder + () => + { + newUser = CreateNewAdUser(controllerAdmin); + return new[] { string.Format(scriptMethod, newUser.ObjectId) }; + }, + // initialize + null, + // cleanup + () => + { + DeleteAdUser(controllerAdmin, newUser); + }, + TestUtilities.GetCallingClass(), + TestUtilities.GetCurrentMethodName()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetADUserWithBadObjectId() + { + ResourcesController.NewInstance.RunPsTest("Test-GetADUserWithBadObjectId"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetADUserWithGroupObjectId() + { + const string scriptMethod = "Test-GetADUserWithGroupObjectId '{0}'"; + Group newGroup = null; + var controllerAdmin = ResourcesController.NewInstance; + + controllerAdmin.RunPsTestWorkflow( + // scriptBuilder + () => + { + newGroup = CreateNewAdGroup(controllerAdmin); + return new[] { string.Format(scriptMethod, newGroup.ObjectId) }; + }, + // initialize + null, + // cleanup + () => + { + DeleteAdGroup(controllerAdmin, newGroup); + }, + TestUtilities.GetCallingClass(), + TestUtilities.GetCurrentMethodName()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetADUserWithUPN() + { + const string scriptMethod = "Test-GetADUserWithUPN '{0}'"; + User newUser = null; + var controllerAdmin = ResourcesController.NewInstance; + + controllerAdmin.RunPsTestWorkflow( + // scriptBuilder + () => + { + newUser = CreateNewAdUser(controllerAdmin); + return new[] { string.Format(scriptMethod, newUser.UserPrincipalName) }; + }, + // initialize + null, + // cleanup + () => + { + DeleteAdUser(controllerAdmin, newUser); + }, + TestUtilities.GetCallingClass(), + TestUtilities.GetCurrentMethodName()); + } + + [Fact(Skip = "Currently not working.")] + public void TestGetADUserWithFPOUPN() + { + ResourcesController.NewInstance.RunPsTest("Test-GetADUserWithFPOUPN"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetADUserWithBadUPN() + { + ResourcesController.NewInstance.RunPsTest("Test-GetADUserWithBadUPN"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetADUserWithSearchString() + { + const string scriptMethod = "Test-GetADUserWithSearchString '{0}'"; + User newUser = null; + var controllerAdmin = ResourcesController.NewInstance; + + controllerAdmin.RunPsTestWorkflow( + // scriptBuilder + () => + { + newUser = CreateNewAdUser(controllerAdmin); + return new[] { string.Format(scriptMethod, newUser.DisplayName) }; + }, + // initialize + null, + // cleanup + () => + { + DeleteAdUser(controllerAdmin, newUser); + }, + TestUtilities.GetCallingClass(), + TestUtilities.GetCurrentMethodName()); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetADUserWithBadSearchString() + { + ResourcesController.NewInstance.RunPsTest("Test-GetADUserWithBadSearchString"); + } + + private User CreateNewAdUser(ResourcesController controllerAdmin) + { + var name = TestUtilities.GenerateName("aduser"); + var parameter = new UserCreateParameters + { + DisplayName = name, + UserPrincipalName = name + "@" + controllerAdmin.UserDomain, + AccountEnabled = true, + MailNickname = name + "test", + PasswordProfileSettings = new UserCreateParameters.PasswordProfile + { + ForceChangePasswordNextLogin = false, + Password = TestUtilities.GenerateName("adpass") + "0#$" + } + }; + + return controllerAdmin.GraphClient.User.Create(parameter).User; + } + + private Group CreateNewAdGroup(ResourcesController controllerAdmin) + { + var parameter = new GroupCreateParameters + { + DisplayName = TestUtilities.GenerateName("adgroup"), + MailNickname = TestUtilities.GenerateName("adgroupmail"), + SecurityEnabled = true + }; + return controllerAdmin.GraphClient.Group.Create(parameter).Group; + } + + private Application CreateNewAdApp(ResourcesController controllerAdmin) + { + var appName = TestUtilities.GenerateName("adApplication"); + var url = string.Format("http://{0}/home", appName); + var appParam = new ApplicationCreateParameters + { + AvailableToOtherTenants = false, + DisplayName = appName, + Homepage = url, + IdentifierUris = new[] { url }, + ReplyUrls = new[] { url } + }; + + return controllerAdmin.GraphClient.Application.Create(appParam).Application; + } + + private ServicePrincipal CreateNewAdServicePrincipal(ResourcesController controllerAdmin, string appId) + { + var spParam = new ServicePrincipalCreateParameters + { + AppId = appId, + AccountEnabled = true + }; + + return controllerAdmin.GraphClient.ServicePrincipal.Create(spParam).ServicePrincipal; + } + + private void DeleteAdUser(ResourcesController controllerAdmin, User user) + { + if (user != null) + { + controllerAdmin.GraphClient.User.Delete(user.ObjectId); + } + } + private void DeleteAdGroup(ResourcesController controllerAdmin, Group group) + { + if (group != null) + { + controllerAdmin.GraphClient.Group.Delete(group.ObjectId); + } + } + private void DeleteAdApp(ResourcesController controllerAdmin, Application app) + { + if (app != null) + { + controllerAdmin.GraphClient.Application.Delete(app.ObjectId); + } + } + + private void DeleteAdServicePrincipal(ResourcesController controllerAdmin, ServicePrincipal newServicePrincipal) + { + if (newServicePrincipal != null) + { + controllerAdmin.GraphClient.ServicePrincipal.Delete(newServicePrincipal.ObjectId); + } + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ActiveDirectoryTests.ps1 b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ActiveDirectoryTests.ps1 new file mode 100644 index 000000000000..a9050daad84d --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ActiveDirectoryTests.ps1 @@ -0,0 +1,415 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +<# +.SYNOPSIS +Tests getting Active Directory groups. +#> +function Test-GetAllADGroups +{ + # Test + $groups = Get-AzureADGroup + + # Assert + Assert-NotNull($groups) + foreach($group in $groups) { + Assert-NotNull($group.DisplayName) + Assert-NotNull($group.Id) + } +} + +<# +.SYNOPSIS +Tests getting Active Directory groups. +#> +function Test-GetADGroupWithSearchString +{ + param([string]$displayName) + + # Test + # Select at most 10 groups. Groups are restricted to contain "test" to fasten the test + $groups = Get-AzureADGroup -SearchString $displayName + + # Assert + Assert-AreEqual $groups.Count 1 + Assert-NotNull $groups[0].Id + Assert-AreEqual $groups[0].DisplayName $displayName +} + +<# +.SYNOPSIS +Tests getting Active Directory groups. +#> +function Test-GetADGroupWithBadSearchString +{ + # Test + # Select at most 10 groups. Groups are restricted to contain "test" to fasten the test + $groups = Get-AzureADGroup -SearchString "BadSearchString" + + # Assert + Assert-Null($groups) +} + +<# +.SYNOPSIS +Tests getting Active Directory groups. +#> +function Test-GetADGroupWithObjectId +{ + param([string]$objectId) + + # Test + $groups = Get-AzureADGroup -ObjectId $objectId + + # Assert + Assert-AreEqual $groups.Count 1 + Assert-AreEqual $groups[0].Id $objectId + Assert-NotNull($groups[0].DisplayName) +} + +<# +.SYNOPSIS +Tests getting Active Directory groups. +#> +function Test-GetADGroupWithBadObjectId +{ + # Test + $groups = Get-AzureADGroup -ObjectId "baadc0de-baad-c0de-baad-c0debaadc0de" + + # Assert + Assert-Null $groups +} + +<# +.SYNOPSIS +Tests getting Active Directory groups. +#> +function Test-GetADGroupWithUserObjectId +{ + param([string]$objectId) + + # Test + $groups = Get-AzureADGroup -ObjectId $objectId + + # Assert + Assert-Null $groups +} + +<# +.SYNOPSIS +Tests getting members from an Active Directory group. +#> +function Test-GetADGroupMemberWithGroupObjectId +{ + param([string]$groupObjectId, [string]$userObjectId, [string]$userName) + + # Test + $members = Get-AzureADGroupMember -GroupObjectId $groupObjectId + + # Assert + Assert-AreEqual $members.Count 1 + Assert-AreEqual $members[0].Id $userObjectId + Assert-AreEqual $members[0].DisplayName $userName +} + +<# +.SYNOPSIS +Tests getting members from an Active Directory group. +#> +function Test-GetADGroupMemberWithBadGroupObjectId +{ + # Test + $members = Get-AzureADGroupMember -GroupObjectId "baadc0de-baad-c0de-baad-c0debaadc0de" + + # Assert + Assert-Null($members) +} + +<# +.SYNOPSIS +Tests getting members from an Active Directory group. +#> +function Test-GetADGroupMemberWithUserObjectId +{ + param([string]$objectId) + + # Test + $members = Get-AzureADGroupMember -GroupObjectId $objectId + + # Assert + Assert-Null($members) +} + +<# +.SYNOPSIS +Tests getting members from an Active Directory group. +#> +function Test-GetADGroupMemberFromEmptyGroup +{ + param([string]$objectId) + + # Test + $members = Get-AzureADGroupMember -GroupObjectId $objectId + + # Assert + Assert-Null($members) +} + +<# +.SYNOPSIS +Tests getting Active Directory service principals. +#> +function Test-GetADServicePrincipalWithObjectId +{ + param([string]$objectId) + + # Test + $servicePrincipals = Get-AzureADServicePrincipal -ObjectId $objectId + + # Assert + Assert-AreEqual $servicePrincipals.Count 1 + Assert-AreEqual $servicePrincipals[0].Id $objectId +} + +<# +.SYNOPSIS +Tests getting Active Directory service principals. +#> +function Test-GetADServicePrincipalWithBadObjectId +{ + # Test + $servicePrincipals = Get-AzureADServicePrincipal -ObjectId "baadc0de-baad-c0de-baad-c0debaadc0de" + + # Assert + Assert-Null($servicePrincipals) +} + +<# +.SYNOPSIS +Tests getting Active Directory service principals. +#> +function Test-GetADServicePrincipalWithUserObjectId +{ + param([string]$objectId) + + # Test + $servicePrincipals = Get-AzureADServicePrincipal -ObjectId $objectId + + # Assert + Assert-Null($servicePrincipals) +} + +<# +.SYNOPSIS +Tests getting Active Directory service principals. +#> +function Test-GetADServicePrincipalWithSPN +{ + param([string]$SPN) + + # Test + $servicePrincipals = Get-AzureADServicePrincipal -ServicePrincipalName $SPN + + # Assert + Assert-AreEqual $servicePrincipals.Count 1 + Assert-NotNull $servicePrincipals[0].Id + Assert-AreEqual $servicePrincipals[0].ServicePrincipalName $SPN +} + +<# +.SYNOPSIS +Tests getting Active Directory service principals. +#> +function Test-GetADServicePrincipalWithBadSPN +{ + # Test + $servicePrincipals = Get-AzureADServicePrincipal -ServicePrincipalName "badspn" + + # Assert + Assert-Null($servicePrincipals) +} + +<# +.SYNOPSIS +Tests getting Active Directory service principals. +#> +function Test-GetADServicePrincipalWithSearchString +{ + param([string]$displayName) + + # Test + $servicePrincipals = Get-AzureADServicePrincipal -SearchString $displayName + + # Assert + Assert-AreEqual $servicePrincipals.Count 1 + Assert-AreEqual $servicePrincipals[0].DisplayName $displayName + Assert-NotNull($servicePrincipals[0].Id) + Assert-NotNull($servicePrincipals[0].ServicePrincipalName) +} + +<# +.SYNOPSIS +Tests getting Active Directory service principals. +#> +function Test-GetADServicePrincipalWithBadSearchString +{ + # Test + $servicePrincipals = Get-AzureADServicePrincipal -SearchString "badsearchstring" + + # Assert + Assert-Null($servicePrincipals) +} + +<# +.SYNOPSIS +Tests getting Active Directory users. +#> +function Test-GetAllADUser +{ + # Test + $users = Get-AzureADUser + + # Assert + Assert-NotNull($users) + foreach($user in $users) { + Assert-NotNull($user.DisplayName) + Assert-NotNull($user.Id) + } +} + +<# +.SYNOPSIS +Tests getting Active Directory users. +#> +function Test-GetADUserWithObjectId +{ + param([string]$objectId) + + # Test + $users = Get-AzureADUser -ObjectId $objectId + + # Assert + Assert-AreEqual $users.Count 1 + Assert-AreEqual $users[0].Id $objectId + Assert-NotNull($users[0].DisplayName) + Assert-NotNull($users[0].UserPrincipalName) +} + +<# +.SYNOPSIS +Tests getting Active Directory users. +#> +function Test-GetADUserWithBadObjectId +{ + # Test + $users = Get-AzureADUser -ObjectId "baadc0de-baad-c0de-baad-c0debaadc0de" + + # Assert + Assert-Null($users) +} + +<# +.SYNOPSIS +Tests getting Active Directory users. +#> +function Test-GetADUserWithGroupObjectId +{ + param([string]$objectId) + + # Test + $users = Get-AzureADUser -ObjectId $objectId + + # Assert + Assert-Null($users) +} + +<# +.SYNOPSIS +Tests getting Active Directory users. +#> +function Test-GetADUserWithUPN +{ + param([string]$UPN) + + # Test + $users = Get-AzureADUser -UserPrincipalName $UPN + + # Assert + Assert-AreEqual $users.Count 1 + Assert-AreEqual $users[0].UserPrincipalName $UPN + Assert-NotNull($users[0].DisplayName) + Assert-NotNull($users[0].Id) +} + +<# +.SYNOPSIS +Tests getting Active Directory users. +#> +function Test-GetADUserWithFPOUPN +{ + # Test + $users = Get-AzureADUser -UserPrincipalName "azsdkposhteam_outlook.com#EXT#@rbactest.onmicrosoft.com" + + # Assert + Assert-AreEqual $users.Count 1 + Assert-AreEqual $users[0].UserPrincipalName "azsdkposhteam_outlook.com#EXT#@rbactest.onmicrosoft.com" + Assert-NotNull($users[0].DisplayName) + Assert-NotNull($users[0].Id) +} + +<# +.SYNOPSIS +Tests getting Active Directory users. +#> +function Test-GetADUserWithBadUPN +{ + # Test + $users = Get-AzureADUser -UserPrincipalName "baduser@rbactest.onmicrosoft.com" + + # Assert + Assert-Null($users) +} + +<# +.SYNOPSIS +Tests getting Active Directory users. +#> +function Test-GetADUserWithSearchString +{ + param([string]$displayName) + + # Test + # Select at most 10 users. Users are restricted to contain "test" to fasten the test + $users = Get-AzureADUser -SearchString $displayName + + # Assert + Assert-NotNull($users) + Assert-AreEqual $users[0].DisplayName $displayName + Assert-NotNull($users[0].Id) + Assert-NotNull($users[0].UserPrincipalName) +} + +<# +.SYNOPSIS +Tests getting Active Directory users. +#> +function Test-GetADUserWithBadSearchString +{ + # Test + # Select at most 10 users. Users are restricted to contain "test" to fasten the test + $users = Get-AzureADUser -SearchString "badsearchstring" + + # Assert + Assert-Null($users) +} diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/AuthorizationTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/AuthorizationTests.cs new file mode 100644 index 000000000000..28ee3d42bdfe --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/AuthorizationTests.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Xunit; + +namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests +{ + public class AuthorizationTests + { + //[Fact] + //[Trait(Category.AcceptanceType, Category.CheckIn)] + [Fact(Skip = "TODO: Fix the broken test.")] + public void TestAuthorizationEndToEnd() + { + ResourcesController.NewInstance.RunPsTest("Test-AuthorizationEndToEnd"); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/AuthorizationTests.ps1 b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/AuthorizationTests.ps1 new file mode 100644 index 000000000000..828f460988fa --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/AuthorizationTests.ps1 @@ -0,0 +1,71 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +<# +.SYNOPSIS +Tests these features in the authorization: +- Getting and lisiting role definitions. +- Creating role assignments on subscription and resource group level. +- Removing specific role assignment via piping. +- +#> +function Test-AuthorizationEndToEnd +{ + <# Role Definitions #> + + # Can list role definitions + $roleDefinitions = Get-AzureRoleDefinition + Assert-True { $roleDefinitions.Count -gt 0 } + + # Can get one role definition + $roleDefinition = Get-AzureRoleDefinition -Name $roleDefinitions[0].Name + Assert-AreEqual $roleDefinitions[0].Name $roleDefinition.Name + + # Does not throw when getting a non-existing role definition + $roleDefinition = Get-AzureRoleDefinition -Name "not-there" + Assert-Null $roleDefinition + + <# Role Assignments #> + $rg = Get-ResourceGroupName + $defaultSubscription = Get-AzureSubscription -Default + $principal = $defaultSubscription.ActiveDirectoryUserId + $roleDef = $(Get-AzureRoleDefinition)[0].Name + $expectedScope = "/subscriptions/" + $defaultSubscription.SubscriptionId + + # List role assignments is piped to get remove role assignment + Get-AzureRoleAssignment | Remove-AzureRoleAssignment -Force + $roleAssignments = Get-AzureRoleAssignment + Assert-AreEqual 0 $roleAssignments.Count + + # Create role assignment with default scope + [Microsoft.Azure.Commands.Resources.Models.Authorization.PoliciesClient]::RoleAssignmentNames.Enqueue("C6408EC2-C27D-49C3-87ED-F49AC8354B76") + $roleAssignment = New-AzureRoleAssignment -Principal $principal -RoleDefinitionName $roleDef + Assert-AreEqual $principal $roleAssignment.Principal + Assert-AreEqual $expectedScope $roleAssignment.Scope + + $roleAssignment | Remove-AzureRoleAssignment -Force + + # Create role assignment with resource group scope + $expectedScope = $expectedScope + "/resourceGroups/$rg" + [Microsoft.Azure.Commands.Resources.Models.Authorization.PoliciesClient]::RoleAssignmentNames.Enqueue("6CAFE07B-DEA4-4097-A0DB-50E844D70615") + $roleAssignment = New-AzureRoleAssignment -Principal $principal -RoleDefinitionName $roleDef -ResourceGroup $rg + Assert-AreEqual $principal $roleAssignment.Principal + Assert-AreEqual $expectedScope $roleAssignment.Scope + + # Throws if trying to recreate an existing role assignment + [Microsoft.Azure.Commands.Resources.Models.Authorization.PoliciesClient]::RoleAssignmentNames.Enqueue("0BD5EC77-F955-4470-83B9-582CED1EA177") + Assert-Throws { New-AzureRoleAssignment -Principal $principal -RoleDefinitionName $roleDef -ResourceGroup $rg } + + $roleAssignment | Remove-AzureRoleAssignment -Force +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/Common.ps1 b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/Common.ps1 new file mode 100644 index 000000000000..674f8e1cf9d9 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/Common.ps1 @@ -0,0 +1,56 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +<# +.SYNOPSIS +Gets valid resource group name +#> +function Get-ResourceGroupName +{ + return getAssetName +} + +<# +.SYNOPSIS +Gets valid resource name +#> +function Get-ResourceName +{ + return getAssetName +} + +<# +.SYNOPSIS +Gets the default location for a provider +#> +function Get-ProviderLocation($provider) +{ + $location = Get-AzureLocation | where {$_.Name -eq $provider} + if ($location -eq $null) { + "West US" + } else { + $location.Locations[0] + } +} + +<# +.SYNOPSIS +Cleans the created resource groups +#> +function Clean-ResourceGroup($rgname) +{ + if ([Microsoft.Azure.Utilities.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Utilities.HttpRecorder.HttpRecorderMode]::Playback) { + Remove-AzureResourceGroup -Name $rgname -Force + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/DeploymentTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/DeploymentTests.cs new file mode 100644 index 000000000000..5715f0cc2b5b --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/DeploymentTests.cs @@ -0,0 +1,33 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Xunit; + +namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests +{ + public class DeploymentTests + { + [Fact (Skip = "Need to implement storage client mock.")] + public void TestValidateDeployment() + { + ResourcesController.NewInstance.RunPsTest("Test-ValidateDeployment"); + } + + [Fact (Skip = "Need to implement storage client mock.")] + public void TestNewDeploymentFromTemplateFile() + { + ResourcesController.NewInstance.RunPsTest("Test-NewDeploymentFromTemplateFile"); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/DeploymentTests.ps1 b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/DeploymentTests.ps1 new file mode 100644 index 000000000000..52799a0c48fd --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/DeploymentTests.ps1 @@ -0,0 +1,55 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +<# +.SYNOPSIS +Tests deployment template validation. +#> +function Test-ValidateDeployment +{ + # Setup + $rgname = Get-ResourceGroupName + $rname = Get-ResourceName + $rglocation = Get-ProviderLocation ResourceManagement + $location = Get-ProviderLocation "Microsoft.Web/sites" + + # Test + New-AzureResourceGroup -Name $rgname -Location $rglocation + + $list = Test-AzureResourceGroupTemplate -ResourceGroupName $rgname -TemplateFile Build2014_Website_App.json -siteName $rname -hostingPlanName $rname -siteLocation $location -sku Free -workerSize 0 + + # Assert + Assert-AreEqual 0 @($list).Count +} + +<# +.SYNOPSIS +Tests deployment via template file and parameter object. +#> +function Test-NewDeploymentFromTemplateFile +{ + # Setup + $rgname = Get-ResourceGroupName + $rname = Get-ResourceName + $rglocation = Get-ProviderLocation ResourceManagement + $location = Get-ProviderLocation "Microsoft.Web/sites" + + # Test + New-AzureResourceGroup -Name $rgname -Location $rglocation + + $deployment = New-AzureResourceGroupDeployment -ResourceGroupName $rgname -TemplateFile Build2014_Website_App.json -siteName $rname -hostingPlanName $rname -siteLocation $location -sku Free -workerSize 0 + + # Assert + Assert-AreEqual Succeeded $deployment.ProvisioningStatelean-ResourceGroup $rgname +} diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourceGroupTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourceGroupTests.cs new file mode 100644 index 000000000000..6d02531881c1 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourceGroupTests.cs @@ -0,0 +1,84 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Xunit; + +namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests +{ + public class ResourceGroupTests + { + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestCreatesNewSimpleResourceGroup() + { + ResourcesController.NewInstance.RunPsTest("Test-CreatesNewSimpleResourceGroup"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestUpdatesExistingResourceGroup() + { + ResourcesController.NewInstance.RunPsTest("Test-UpdatesExistingResourceGroup"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestCreatesAndRemoveResourceGroupViaPiping() + { + ResourcesController.NewInstance.RunPsTest("Test-CreatesAndRemoveResourceGroupViaPiping"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetNonExistingResourceGroup() + { + ResourcesController.NewInstance.RunPsTest("Test-GetNonExistingResourceGroup"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestNewResourceGroupInNonExistingLocation() + { + ResourcesController.NewInstance.RunPsTest("Test-NewResourceGroupInNonExistingLocation"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestRemoveNonExistingResourceGroup() + { + ResourcesController.NewInstance.RunPsTest("Test-RemoveNonExistingResourceGroup"); + } + + [Fact (Skip = "TODO: Fix the broken test.")] + public void TestAzureTagsEndToEnd() + { + ResourcesController.NewInstance.RunPsTest("Test-AzureTagsEndToEnd"); + } + + [Fact(Skip = "Depends on Bug 2040630")] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestNewDeploymentAndProviderRegistration() + { + ResourcesController.NewInstance.RunPsTest("Test-NewDeploymentAndProviderRegistration"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestNewResourceGroupWithTemplateThenGetWithAndWithoutDetails() + { + ResourcesController.NewInstance.RunPsTest("Test-NewResourceGroupWithTemplateThenGetWithAndWithoutDetails"); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourceGroupTests.ps1 b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourceGroupTests.ps1 new file mode 100644 index 000000000000..613c1dc8d3db --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourceGroupTests.ps1 @@ -0,0 +1,267 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +<# +.SYNOPSIS +Tests creating new simple resource group. +#> +function Test-CreatesNewSimpleResourceGroup +{ + # Setup + $rgname = Get-ResourceGroupName + $location = Get-ProviderLocation ResourceManagement + + try + { + # Test + $actual = New-AzureResourceGroup -Name $rgname -Location $location -Tags @{Name = "testtag"; Value = "testval"} + $expected = Get-AzureResourceGroup -Name $rgname + + # Assert + Assert-AreEqual $expected.ResourceGroupName $actual.ResourceGroupName + Assert-AreEqual $expected.Tags[0]["Name"] $actual.Tags[0]["Name"] + } + finally + { + # Cleanup + Clean-ResourceGroup $rgname + } +} + +<# +.SYNOPSIS +Tests updates existing resource group. +#> +function Test-UpdatesExistingResourceGroup +{ + # Setup + $rgname = Get-ResourceGroupName + $location = Get-ProviderLocation ResourceManagement + + try + { + # Test update without tag + Assert-Throws { Set-AzureResourceGroup -Name $rgname -Tags @{"testtag" = "testval"} } "ResourceGroupNotFound: Resource group '$rgname' could not be found." + + $new = New-AzureResourceGroup -Name $rgname -Location $location + + # Test update with bad tag format + Assert-Throws { Set-AzureResourceGroup -Name $rgname -Tags @{"testtag" = "testval"} } "Invalid tag format. Expect @{Name = `"tagName`"} or @{Name = `"tagName`"; Value = `"tagValue`"}" + # Test update with bad tag format + Assert-Throws { Set-AzureResourceGroup -Name $rgname -Tags @{Name = "testtag"; Value = "testval"}, @{Name = "testtag"; Value = "testval2"} } "Invalid tag format. Ensure that each tag has a unique name. Example: @{Name = `"tagName1`"; Value = `"tagValue1`"}, @{Name = `"tagName2`"; Value = `"tagValue2`"}" + + $actual = Set-AzureResourceGroup -Name $rgname -Tags @{Name = "testtag"; Value = "testval"} + $expected = Get-AzureResourceGroup -Name $rgname + + # Assert + Assert-AreEqual $expected.ResourceGroupName $actual.ResourceGroupName + Assert-AreEqual 0 $new.Tags.Count + Assert-AreEqual $expected.Tags[0]["Name"] $actual.Tags[0]["Name"] + } + finally + { + # Cleanup + Clean-ResourceGroup $rgname + } +} + +<# +.SYNOPSIS +Tests creating new simple resource group and deleting it via piping. +#> +function Test-CreatesAndRemoveResourceGroupViaPiping +{ + # Setup + $rgname1 = Get-ResourceGroupName + $rgname2 = Get-ResourceGroupName + $location = Get-ProviderLocation ResourceManagement + + # Test + New-AzureResourceGroup -Name $rgname1 -Location $location + New-AzureResourceGroup -Name $rgname2 -Location $location + + Get-AzureResourceGroup | where {$_.ResourceGroupName -eq $rgname1 -or $_.ResourceGroupName -eq $rgname2} | Remove-AzureResourceGroup -Force + + # Assert + Assert-Throws { Get-AzureResourceGroup -Name $rgname1 } "Provided resource group does not exist." + Assert-Throws { Get-AzureResourceGroup -Name $rgname2 } "Provided resource group does not exist." +} + +<# +.SYNOPSIS +Tests getting non-existing resource group. +#> +function Test-GetNonExistingResourceGroup +{ + # Setup + $rgname = Get-ResourceGroupName + + Assert-Throws { Get-AzureResourceGroup -Name $rgname } "Provided resource group does not exist." +} + +<# +.SYNOPSIS +Negative test. New resource group in non-existing location throws error. +#> +function Test-NewResourceGroupInNonExistingLocation +{ + # Setup + $rgname = Get-ResourceGroupName + + Assert-Throws { New-AzureResourceGroup -Name $rgname -Location 'non-existing' } +} + +<# +.SYNOPSIS +Negative test. New resource group in non-existing location throws error. +#> +function Test-RemoveNonExistingResourceGroup +{ + # Setup + $rgname = Get-ResourceGroupName + + Assert-Throws { Remove-AzureResourceGroup $rgname -Force } "Provided resource group does not exist." +} + +<# +.SYNOPSIS +Negative test. New resource group in non-existing location throws error. +#> +function Test-AzureTagsEndToEnd +{ + # Setup + $tag1 = getAssetName + $tag2 = getAssetName + Clean-Tags + + # Create tag without values + New-AzureTag $tag1 + + $tag = Get-AzureTag $tag1 + Assert-AreEqual $tag1 $tag.Name + + # Add value to the tag (adding same value should pass) + New-AzureTag $tag1 value1 + New-AzureTag $tag1 value1 + New-AzureTag $tag1 value2 + + $tag = Get-AzureTag $tag1 + Assert-AreEqual 2 $tag.Values.Count + + # Create tag with values + New-AzureTag $tag2 value1 + New-AzureTag $tag2 value2 + New-AzureTag $tag2 value3 + + $tags = Get-AzureTag + Assert-AreEqual 2 $tags.Count + + # Remove entire tag + $tag = Remove-AzureTag $tag1 -Force -PassThru + + $tags = Get-AzureTag + Assert-AreEqual $tag1 $tag.Name + + # Remove tag value + $tag = Remove-AzureTag $tag2 value1 -Force -PassThru + + $tags = Get-AzureTag + Assert-AreEqual 0 $tags.Count + + # Get a non-existing tag + Assert-Throws { Get-AzureTag "non-existing" } + + Clean-Tags +} + +<# +.SYNOPSIS +Tests registration of required template provider +#> +function Test-NewDeploymentAndProviderRegistration +{ + # Setup + $rgname = Get-ResourceGroupName + $rname = Get-ResourceName + $location = Get-ProviderLocation ResourceManagement + $template = "Microsoft.Cache.0.4.0-preview" + $provider = "microsoft.cache" + + try + { + # Unregistering microsoft.cache to have clean state + $subscription = [Microsoft.WindowsAzure.Commands.Utilities.Common.AzureProfile]::Instance.CurrentSubscription + $client = New-Object Microsoft.Azure.Commands.Resources.Models.ResourcesClient $subscription + + # Verify provider is registered + $providers = [Microsoft.WindowsAzure.Commands.Utilities.Common.AzureProfile]::Instance.CurrentSubscription.RegisteredResourceProvidersList + if( $providers -Contains $provider ) + { + $client.UnregisterProvider($provider) + } + + # Test + $deployment = New-AzureResourceGroup -Name $rgname -Location $location -GalleryTemplateIdentity $template -cacheName $rname -cacheLocation $location + + # Assert + $client = New-Object Microsoft.Azure.Commands.Resources.Models.ResourcesClient $subscription + $providers = [Microsoft.WindowsAzure.Commands.Utilities.Common.AzureProfile]::Instance.CurrentSubscription.RegisteredResourceProvidersList + + Assert-True { $providers -Contains $provider } + + } + finally + { + # Cleanup + Clean-ResourceGroup $rgname + } +} + +function Test-NewResourceGroupWithTemplateThenGetWithAndWithoutDetails +{ + # Setup + $rgname = Get-ResourceGroupName + $websiteName = Get-ResourceName + $location = Get-ProviderLocation ResourceManagement + $templateFile = "Resources\EmptyWebsiteTemplate.json" + + try + { + # Test + $actual = New-AzureResourceGroup -Name $rgname -Location $location -TemplateFile $templateFile ` + -siteName $websiteName -hostingPlanName "test" -siteLocation "West US" ` + -Tag @{ Name = "testtag"; Value = "testval" } + + $expected1 = Get-AzureResourceGroup -Name $rgname + # Assert + Assert-AreEqual $expected1.ResourceGroupName $actual.ResourceGroupName + Assert-AreEqual $expected1.Tags[0]["Name"] $actual.Tags[0]["Name"] + Assert-AreEqual $expected1.Resources.Count 2 + + $expected2 = Get-AzureResourceGroup + # Assert + Assert-AreEqual $expected2[0].Resources.Count 0 + + $expected3 = Get-AzureResourceGroup -Detailed + $names = $expected3 | Select-Object -ExpandProperty ResourceGroupName + $index = [Array]::IndexOf($names, $expected1.ResourceGroupName) + # Assert + Assert-AreEqual $expected3[$index].Resources.Count 2 + } + finally + { + # Cleanup + Clean-ResourceGroup $rgname + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourceTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourceTests.cs new file mode 100644 index 000000000000..829e450f8702 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourceTests.cs @@ -0,0 +1,79 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Xunit; + +namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests +{ + public class ResourceTests + { + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestCreatesNewSimpleResource() + { + ResourcesController.NewInstance.RunPsTest("Test-CreatesNewSimpleResource"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestCreatesNewComplexResource() + { + ResourcesController.NewInstance.RunPsTest("Test-CreatesNewComplexResource"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetResourcesViaPiping() + { + ResourcesController.NewInstance.RunPsTest("Test-GetResourcesViaPiping"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetResourcesFromEmptyGroup() + { + ResourcesController.NewInstance.RunPsTest("Test-GetResourcesFromEmptyGroup"); + } + + [Fact (Skip = "TODO: Re-record")] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetResourcesFromNonExisingGroup() + { + ResourcesController.NewInstance.RunPsTest("Test-GetResourcesFromNonExisingGroup"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetResourcesForNonExisingType() + { + ResourcesController.NewInstance.RunPsTest("Test-GetResourcesForNonExisingType"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetResourceForNonExisingResource() + { + ResourcesController.NewInstance.RunPsTest("Test-GetResourceForNonExisingResource"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetResourcesViaPipingFromAnotherResource() + { + ResourcesController.NewInstance.RunPsTest("Test-GetResourcesViaPipingFromAnotherResource"); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourceTests.ps1 b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourceTests.ps1 new file mode 100644 index 000000000000..7f7cfb77cb9e --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourceTests.ps1 @@ -0,0 +1,217 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +<# +.SYNOPSIS +Tests creating new resource group and a simple resource. +#> +function Test-CreatesNewSimpleResource +{ + # Setup + $rgname = Get-ResourceGroupName + $rname = Get-ResourceName + $rglocation = Get-ProviderLocation ResourceManagement + $location = Get-ProviderLocation "Microsoft.Sql/servers" + $apiversion = "2014-04-01" + $resourceType = "Microsoft.Sql/servers" + + # Test + New-AzureResourceGroup -Name $rgname -Location $rglocation + $actual = New-AzureResource -Name $rname -Location $location -Tags @{Name = "testtag"; Value = "testval"} -ResourceGroupName $rgname -ResourceType $resourceType -PropertyObject @{"administratorLogin" = "adminuser"; "administratorLoginPassword" = "P@ssword1"} -ApiVersion $apiversion + $expected = Get-AzureResource -Name $rname -ResourceGroupName $rgname -ResourceType $resourceType -ApiVersion $apiversion + + $list = Get-AzureResource -ResourceGroupName $rgname + + # Assert + Assert-AreEqual $expected.Name $actual.Name + Assert-AreEqual $expected.ResourceGroupName $actual.ResourceGroupName + Assert-AreEqual $expected.ResourceType $actual.ResourceType + Assert-AreEqual 1 @($list).Count + Assert-AreEqual $expected.Name $list[0].Name +} + +<# +.SYNOPSIS +Tests creating new resource group and parent and child resources. +#> +function Test-CreatesNewComplexResource +{ + # Setup + $rgname = Get-ResourceGroupName + $rnameParent = Get-ResourceName + $rnameChild = Get-ResourceName + $resourceTypeParent = "Microsoft.Sql/servers" + $resourceTypeChild = "Microsoft.Sql/servers/databases" + $rglocation = Get-ProviderLocation ResourceManagement + $location = Get-ProviderLocation $resourceTypeParent + $apiversion = "2014-04-01" + + # Test + New-AzureResourceGroup -Name $rgname -Location $rglocation + $actualParent = New-AzureResource -Name $rnameParent -Location $location -ResourceGroupName $rgname -ResourceType $resourceTypeParent -PropertyObject @{"administratorLogin" = "adminuser"; "administratorLoginPassword" = "P@ssword1"} -ApiVersion $apiversion + $expectedParent = Get-AzureResource -Name $rnameParent -ResourceGroupName $rgname -ResourceType $resourceTypeParent -ApiVersion $apiversion + + $actualChild = New-AzureResource -Name $rnameChild -Location $location -ResourceGroupName $rgname -ResourceType $resourceTypeChild -ParentResource servers/$rnameParent -PropertyObject @{"edition" = "Web"; "collation" = "SQL_Latin1_General_CP1_CI_AS"; "maxSizeBytes" = "1073741824"} -ApiVersion $apiversion + $expectedChild = Get-AzureResource -Name $rnameChild -ResourceGroupName $rgname -ResourceType $resourceTypeChild -ParentResource servers/$rnameParent -ApiVersion $apiversion + + $list = Get-AzureResource -ResourceGroupName $rgname + + $parentFromList = $list | where {$_.ResourceType -eq $resourceTypeParent} | Select-Object -First 1 + $childFromList = $list | where {$_.ResourceType -eq $resourceTypeChild} | Select-Object -First 1 + + $listOfServers = Get-AzureResource -ResourceType $resourceTypeParent -ResourceGroupName $rgname + $listOfDatabases = Get-AzureResource -ResourceType $resourceTypeChild -ResourceGroupName $rgname + + # Assert + Assert-AreEqual $expectedParent.Name $actualParent.Name + Assert-AreEqual $expectedChild.Name $actualChild.Name + Assert-AreEqual $expectedParent.ResourceType $actualParent.ResourceType + Assert-AreEqual $expectedChild.ResourceType $actualChild.ResourceType + + Assert-AreEqual 2 @($list).Count + Assert-AreEqual $expectedParent.Name $parentFromList.Name + Assert-AreEqual $expectedChild.Name $childFromList.Name + Assert-AreEqual $expectedParent.ResourceType $parentFromList.ResourceType + Assert-AreEqual $expectedChild.ResourceType $childFromList.ResourceType + + Assert-AreEqual 1 @($listOfServers).Count + Assert-AreEqual 1 @($listOfDatabases).Count +} + +<# +.SYNOPSIS +Tests get resources via piping from resource group +#> +function Test-GetResourcesViaPiping +{ + # Setup + $rgname = Get-ResourceGroupName + $rnameParent = Get-ResourceName + $rnameChild = Get-ResourceName + $resourceTypeParent = "Microsoft.Sql/servers" + $resourceTypeChild = "Microsoft.Sql/servers/databases" + $rglocation = Get-ProviderLocation ResourceManagement + $location = Get-ProviderLocation $resourceTypeParent + $apiversion = "2014-04-01" + + # Test + New-AzureResourceGroup -Name $rgname -Location $rglocation + New-AzureResource -Name $rnameParent -Location $location -ResourceGroupName $rgname -ResourceType $resourceTypeParent -PropertyObject @{"administratorLogin" = "adminuser"; "administratorLoginPassword" = "P@ssword1"} -ApiVersion $apiversion + New-AzureResource -Name $rnameChild -Location $location -ResourceGroupName $rgname -ResourceType $resourceTypeChild -ParentResource servers/$rnameParent -PropertyObject @{"edition" = "Web"; "collation" = "SQL_Latin1_General_CP1_CI_AS"; "maxSizeBytes" = "1073741824"} -ApiVersion $apiversion + + $list = Get-AzureResourceGroup -Name $rgname | Get-AzureResource + $serverFromList = $list | where {$_.ResourceType -eq $resourceTypeParent} | Select-Object -First 1 + $databaseFromList = $list | where {$_.ResourceType -eq $resourceTypeChild} | Select-Object -First 1 + + # Assert + Assert-AreEqual 2 @($list).Count + Assert-AreEqual $rnameParent $serverFromList.Name + Assert-AreEqual $rnameChild $databaseFromList.Name + Assert-AreEqual $resourceTypeParent $serverFromList.ResourceType + Assert-AreEqual $resourceTypeChild $databaseFromList.ResourceType +} + +<# +.SYNOPSIS +Nagative test. Get resources from an empty group. +#> +function Test-GetResourcesFromEmptyGroup +{ + # Setup + $rgname = Get-ResourceGroupName + $location = Get-ProviderLocation ResourceManagement + + # Test + New-AzureResourceGroup -Name $rgname -Location $location + $listViaPiping = Get-AzureResourceGroup -Name $rgname | Get-AzureResource + $listViaDirect = Get-AzureResource -ResourceGroupName $rgname + + # Assert + Assert-AreEqual 0 @($listViaPiping).Count + Assert-AreEqual 0 @($listViaDirect).Count +} + +<# +.SYNOPSIS +Nagative test. Get resources from an non-existing empty group. +#> +function Test-GetResourcesFromNonExisingGroup +{ + # Setup + $rgname = Get-ResourceGroupName + + # Test + Assert-Throws { Get-AzureResource -ResourceGroupName $rgname } "Provided resource group does not exist." +} + +<# +.SYNOPSIS +Nagative test. Get resources from non-existing type. +#> +function Test-GetResourcesForNonExisingType +{ + # Test + $list = Get-AzureResource -ResourceType 'Non-Existing' + + # Assert + Assert-AreEqual 0 @($list).Count +} + +<# +.SYNOPSIS +Nagative test. Get non-existing resource. +#> +function Test-GetResourceForNonExisingResource +{ + # Setup + $rgname = Get-ResourceGroupName + $rname = Get-ResourceGroupName + $location = Get-ProviderLocation ResourceManagement + $resourceTypeWeb = "Microsoft.Web/sites" + $resourceTypeSql = "Microsoft.Sql/servers" + $apiversion = "2014-04-01" + + # Test + New-AzureResourceGroup -Name $rgname -Location $location + Assert-Throws { Get-AzureResource -Name $rname -ResourceGroupName $rgname -ResourceType $resourceTypeWeb -ApiVersion $apiversion } "Provided resource does not exist." + Assert-Throws { Get-AzureResource -Name $rname -ResourceGroupName $rgname -ResourceType $resourceTypeSql -ApiVersion $apiversion } "Provided resource does not exist." + Assert-Throws { Get-AzureResource -Name $rname -ResourceGroupName $rgname -ResourceType 'Microsoft.Fake/nonexisting' -ApiVersion $apiversion } "Provided resource does not exist." +} + +<# +.SYNOPSIS +Tests get resources via piping from resource group +#> +function Test-GetResourcesViaPipingFromAnotherResource +{ + # Setup + $rgname = Get-ResourceGroupName + $rnameParent = Get-ResourceName + $rnameChild = Get-ResourceName + $resourceTypeParent = "Microsoft.Sql/servers" + $resourceTypeChild = "Microsoft.Sql/servers/databases" + $rglocation = Get-ProviderLocation ResourceManagement + $location = Get-ProviderLocation $resourceTypeParent + $apiversion = "2014-04-01" + + # Test + New-AzureResourceGroup -Name $rgname -Location $rglocation + New-AzureResource -Name $rnameParent -Location $location -ResourceGroupName $rgname -ResourceType $resourceTypeParent -PropertyObject @{"administratorLogin" = "adminuser"; "administratorLoginPassword" = "P@ssword1"} -ApiVersion $apiversion + New-AzureResource -Name $rnameChild -Location $location -ResourceGroupName $rgname -ResourceType $resourceTypeChild -ParentResource servers/$rnameParent -PropertyObject @{"edition" = "Web"; "collation" = "SQL_Latin1_General_CP1_CI_AS"; "maxSizeBytes" = "1073741824"} -ApiVersion $apiversion + + $list = Get-AzureResource -ResourceGroupName $rgname | Get-AzureResource -ApiVersion $apiversion + + # Assert + Assert-AreEqual 2 @($list).Count +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourcesController.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourcesController.cs new file mode 100644 index 000000000000..4560934c6834 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/ResourcesController.cs @@ -0,0 +1,202 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Gallery; +using Microsoft.Azure.Graph.RBAC; +using Microsoft.Azure.Management.Authorization; +using Microsoft.Azure.Management.Resources; +using Microsoft.Azure.Subscriptions; +using Microsoft.Azure.Utilities.HttpRecorder; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Monitoring.Events; +using Microsoft.WindowsAzure.Testing; +using System; +using System.Linq; + +namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests +{ + public sealed class ResourcesController + { + private CSMTestEnvironmentFactory csmTestFactory; + private EnvironmentSetupHelper helper; + protected const string TenantIdKey = "TenantId"; + protected const string DomainKey = "Domain"; + + public GraphRbacManagementClient GraphClient { get; private set; } + + public ResourceManagementClient ResourceManagementClient { get; private set; } + + public SubscriptionClient SubscriptionClient { get; private set; } + + public GalleryClient GalleryClient { get; private set; } + + public EventsClient EventsClient { get; private set; } + + public AuthorizationManagementClient AuthorizationManagementClient { get; private set; } + + public string UserDomain { get; private set; } + + public static ResourcesController NewInstance + { + get + { + return new ResourcesController(); + } + } + + public ResourcesController() + { + helper = new EnvironmentSetupHelper(); + } + + public void RunPsTest(params string[] scripts) + { + var callingClassType = TestUtilities.GetCallingClass(2); + var mockName = TestUtilities.GetCurrentMethodName(2); + + RunPsTestWorkflow( + () => scripts, + // no custom initializer + null, + // no custom cleanup + null, + callingClassType, + mockName); + } + + public void RunPsTestWorkflow( + Func scriptBuilder, + Action initialize, + Action cleanup, + string callingClassType, + string mockName) + { + using (UndoContext context = UndoContext.Current) + { + context.Start(callingClassType, mockName); + + this.csmTestFactory = new CSMTestEnvironmentFactory(); + + if(initialize != null) + { + initialize(this.csmTestFactory); + } + + SetupManagementClients(); + + helper.SetupEnvironment(AzureModule.AzureResourceManager); + + var callingClassName = callingClassType + .Split(new[] { "." }, StringSplitOptions.RemoveEmptyEntries) + .Last(); + helper.SetupModules( + AzureModule.AzureResourceManager, + "ScenarioTests\\Common.ps1", + "ScenarioTests\\" + callingClassName + ".ps1"); + + try + { + if (scriptBuilder != null) + { + var psScripts = scriptBuilder(); + + if (psScripts != null) + { + helper.RunPowerShellTest(psScripts); + } + } + } + finally + { + if(cleanup !=null) + { + cleanup(); + } + } + } + } + + private void SetupManagementClients() + { + ResourceManagementClient = GetResourceManagementClient(); + SubscriptionClient = GetSubscriptionClient(); + GalleryClient = GetGalleryClient(); + EventsClient = GetEventsClient(); + AuthorizationManagementClient = GetAuthorizationManagementClient(); + GraphClient = GetGraphClient(); + + helper.SetupManagementClients(ResourceManagementClient, + SubscriptionClient, + GalleryClient, + EventsClient, + AuthorizationManagementClient, + GraphClient); + } + + private GraphRbacManagementClient GetGraphClient() + { + var environment = this.csmTestFactory.GetTestEnvironment(); + string tenantId = null; + + if (HttpMockServer.Mode == HttpRecorderMode.Record) + { + tenantId = environment.AuthorizationContext.TenatId; + UserDomain = environment.AuthorizationContext.UserDomain; + + HttpMockServer.Variables[TenantIdKey] = tenantId; + HttpMockServer.Variables[DomainKey] = UserDomain; + } + else if (HttpMockServer.Mode == HttpRecorderMode.Playback) + { + if (HttpMockServer.Variables.ContainsKey(TenantIdKey)) + { + tenantId = HttpMockServer.Variables[TenantIdKey]; + } + if (HttpMockServer.Variables.ContainsKey(DomainKey)) + { + UserDomain = HttpMockServer.Variables[DomainKey]; + } + } + + return TestBase.GetGraphServiceClient(this.csmTestFactory, tenantId); + } + + private AuthorizationManagementClient GetAuthorizationManagementClient() + { + return TestBase.GetServiceClient(this.csmTestFactory); + } + + private ResourceManagementClient GetResourceManagementClient() + { + return TestBase.GetServiceClient(this.csmTestFactory); + } + + private SubscriptionClient GetSubscriptionClient() + { + return TestBase.GetServiceClient(this.csmTestFactory); + } + + private GalleryClient GetGalleryClient() + { + return TestBase.GetServiceClient(this.csmTestFactory); + } + + private EventsClient GetEventsClient() + { + return TestBase.GetServiceClient(this.csmTestFactory); + } + + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/RoleAssignmentTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/RoleAssignmentTests.cs new file mode 100644 index 000000000000..0b0fa4aa676c --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/RoleAssignmentTests.cs @@ -0,0 +1,185 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using Microsoft.Azure.Graph.RBAC; +using Microsoft.Azure.Graph.RBAC.Models; +using Microsoft.Azure.Management.Authorization; +using Microsoft.Azure.Management.Authorization.Models; +using Microsoft.Azure.Management.Resources; +using Microsoft.Azure.Management.Resources.Models; +using Microsoft.Azure.Utilities.HttpRecorder; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Microsoft.WindowsAzure.Testing; +using Microsoft.WindowsAzure.Testing.TestCategories; +using System; +using System.Linq; +using Xunit; + +namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests +{ + public class RoleAssignmentTests + { + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void RaNegativeScenarios() + { + ResourcesController.NewInstance.RunPsTest("Test-RaNegativeScenarios"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void RaByScope() + { + ResourcesController.NewInstance.RunPsTest("Test-RaByScope"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void RaByResourceGroup() + { + ResourcesController.NewInstance.RunPsTest("Test-RaByResourceGroup"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void RaByResource() + { + ResourcesController.NewInstance.RunPsTest("Test-RaByResource"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void RaByServicePrincipal() + { + ResourcesController.NewInstance.RunPsTest("Test-RaByServicePrincipal"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void RaByUpn() + { + ResourcesController.NewInstance.RunPsTest("Test-RaByUpn"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void RaUserPermissions() + { + User newUser = null; + ResourceGroup resourceGroup = null; + string roleAssignmentId = "6A26D717-ABA9-44E3-B971-C53694E413B2"; + string userName = null; + string userPass = null; + string userPermission = "*/read"; + string roleDefinitionName = "Reader"; + + var controllerAdmin = ResourcesController.NewInstance; + + // Generate new user under admin account + controllerAdmin.RunPsTestWorkflow( + // scriptBuilder + () => + { + userName = TestUtilities.GenerateName("aduser"); + userPass = TestUtilities.GenerateName("adpass") + "0#$"; + + var upn = userName + "@" + controllerAdmin.UserDomain; + + var parameter = new UserCreateParameters + { + UserPrincipalName = upn, + DisplayName = userName, + AccountEnabled = true, + MailNickname = userName + "test", + PasswordProfileSettings = new UserCreateParameters.PasswordProfile + { + ForceChangePasswordNextLogin = false, + Password = userPass + } + }; + + newUser = controllerAdmin.GraphClient.User.Create(parameter).User; + + resourceGroup = controllerAdmin.ResourceManagementClient.ResourceGroups + .List(new ResourceGroupListParameters()) + .ResourceGroups + .First(); + + return new[] + { + string.Format( + "CreateRoleAssignment '{0}' '{1}' '{2}' '{3}'", + roleAssignmentId, + newUser.ObjectId, + roleDefinitionName, + resourceGroup.Name) + }; + }, + // initialize + null, + // cleanup + null, + TestUtilities.GetCallingClass(), + TestUtilities.GetCurrentMethodName() + "_Setup"); + + // login as different user and run the test + var controllerUser = ResourcesController.NewInstance; + controllerUser.RunPsTestWorkflow( + // scriptBuilder + () => + { + return new[] + { + string.Format( + "Test-RaUserPermissions '{0}' '{1}'", + resourceGroup.Name, + userPermission) + }; + }, + // initialize + (testFactory) => + { + if (newUser != null) + { + testFactory.CustomEnvValues[TestEnvironment.UserIdKey] = userName + "@" + controllerAdmin.UserDomain; + testFactory.CustomEnvValues[TestEnvironment.AADPasswordKey] = userPass; + } + }, + // cleanup + null, + TestUtilities.GetCallingClass(), + TestUtilities.GetCurrentMethodName() + "_Test"); + + // remove created user + controllerAdmin = ResourcesController.NewInstance; + controllerAdmin.RunPsTestWorkflow( + // scriptBuilder + null, + // initialize + null, + // cleanup + () => + { + if (newUser != null) + { + controllerAdmin.GraphClient.User.Delete(newUser.ObjectId); + } + controllerAdmin.AuthorizationManagementClient.RoleAssignments.Delete(resourceGroup.Id, new Guid(roleAssignmentId)); + }, + TestUtilities.GetCallingClass(), + TestUtilities.GetCurrentMethodName() + "_Cleanup"); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/RoleAssignmentTests.ps1 b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/RoleAssignmentTests.ps1 new file mode 100644 index 000000000000..fbbb7be12443 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/ScenarioTests/RoleAssignmentTests.ps1 @@ -0,0 +1,278 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +<# +.SYNOPSIS +Tests verifies negative scenarios for RoleAssignments +#> +function Test-RaNegativeScenarios +{ + $subscription = Get-AzureSubscription -Current + + # Bad OID does not throw when getting a non-existing role assignment + $badOid = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa' + $badOidResult = Get-AzureRoleAssignment -ObjectId $badOid + Assert-Null $badOidResult + + # Bad UPN + $badUpn = 'nonexistent@provider.com' + $badUpnException = "The provided information does not map to an AD object id." + Assert-Throws { Get-AzureRoleAssignment -UserPrincipalName $badUpn } $badUpnException + + # Bad SPN + $badSpn = 'bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb' + $badSpnException = "The provided information does not map to an AD object id." + Assert-Throws { Get-AzureRoleAssignment -ServicePrincipalName $badSpn } $badSpnException + + # Bad Scope + $badScope = '/subscriptions/'+ $subscription.SubscriptionId +'/providers/nonexistent' + $badScopeException = "InvalidResourceNamespace: The resource namespace 'nonexistent' is invalid." + Assert-Throws { Get-AzureRoleAssignment -Scope $badScope } $badScopeException +} + +<# +.SYNOPSIS +Tests verifies creation and deletion of a RoleAssignments by Scope +#> +function Test-RaByScope +{ + # Setup + Add-Type -Path ".\\Microsoft.Azure.Commands.Resources.dll" + + $definitionName = 'Reader' + $users = Get-AzureADUser | Select-Object -First 1 -Wait + $subscription = Get-AzureSubscription -Current + $scope = '/subscriptions/'+ $subscription.SubscriptionId +'/resourceGroups/' + 'SomeResourceGroup' + Assert-AreEqual 1 $users.Count "There should be at least one user to run the test." + + # Test + [Microsoft.Azure.Commands.Resources.Models.Authorization.AuthorizationClient]::RoleAssignmentNames.Enqueue("8D7DD69E-9AE2-44A1-94D8-F7BC8E12645E") + $newAssignment = New-AzureRoleAssignment ` + -ObjectId $users[0].Id.Guid ` + -RoleDefinitionName $definitionName ` + -Scope $scope + + # cleanup + DeleteRoleAssignment $newAssignment + + # Assert + Assert-NotNull $newAssignment + Assert-AreEqual $definitionName $newAssignment.RoleDefinitionName + Assert-AreEqual $scope $newAssignment.Scope + Assert-AreEqual $users[0].DisplayName $newAssignment.DisplayName + + VerifyRoleAssignmentDeleted $newAssignment +} + +<# +.SYNOPSIS +Tests verifies creation and deletion of a RoleAssignments by Resource Group +#> +function Test-RaByResourceGroup +{ + # Setup + Add-Type -Path ".\\Microsoft.Azure.Commands.Resources.dll" + + $definitionName = 'Contributor' + $users = Get-AzureADUser | Select-Object -Last 1 -Wait + $resourceGroups = Get-AzureResourceGroup | Select-Object -Last 1 -Wait + Assert-AreEqual 1 $users.Count "There should be at least one user to run the test." + Assert-AreEqual 1 $resourceGroups.Count "No resource group found. Unable to run the test." + + # Test + [Microsoft.Azure.Commands.Resources.Models.Authorization.AuthorizationClient]::RoleAssignmentNames.Enqueue("A4B82891-EBEE-4568-B606-632899BF9453") + $newAssignment = New-AzureRoleAssignment ` + -ObjectId $users[0].Id.Guid ` + -RoleDefinitionName $definitionName ` + -ResourceGroupName $resourceGroups[0].ResourceGroupName + + # cleanup + DeleteRoleAssignment $newAssignment + + # Assert + Assert-NotNull $newAssignment + Assert-AreEqual $definitionName $newAssignment.RoleDefinitionName + Assert-AreEqual $users[0].DisplayName $newAssignment.DisplayName + + VerifyRoleAssignmentDeleted $newAssignment +} + +<# +.SYNOPSIS +Tests verifies creation and deletion of a RoleAssignments by Resource +#> +function Test-RaByResource +{ + # Setup + Add-Type -Path ".\\Microsoft.Azure.Commands.Resources.dll" + + $definitionName = 'Owner' + $groups = Get-AzureADGroup | Select-Object -Last 1 -Wait + $resourceGroups = Get-AzureResourceGroup | Select-Object -First 1 -Wait + Assert-AreEqual 1 $groups.Count "There should be at least one group to run the test." + Assert-AreEqual 1 $resourceGroups.Count "No resource group found. Unable to run the test." + $resource = Get-AzureResource -ResourceGroupName $resourceGroups[0].ResourceGroupName ` + | Select-Object -Last 1 -Wait + Assert-NotNull $resource "Cannot find any resource to continue test execution." + + # Test + [Microsoft.Azure.Commands.Resources.Models.Authorization.AuthorizationClient]::RoleAssignmentNames.Enqueue("78D6502F-74FC-4800-BB0A-0E1A7BEBECA4") + $newAssignment = New-AzureRoleAssignment ` + -ObjectId $groups[0].Id.Guid ` + -RoleDefinitionName $definitionName ` + -ResourceGroupName $resourceGroups[0].ResourceGroupName ` + -ResourceType $resource.ResourceType ` + -ResourceName $resource.Name + + # cleanup + DeleteRoleAssignment $newAssignment + + # Assert + Assert-NotNull $newAssignment + Assert-AreEqual $definitionName $newAssignment.RoleDefinitionName + Assert-AreEqual $groups[0].DisplayName $newAssignment.DisplayName + + VerifyRoleAssignmentDeleted $newAssignment +} + +<# +.SYNOPSIS +Tests verifies creation and deletion of a RoleAssignments for Service principal name +#> +function Test-RaByServicePrincipal +{ + # Setup + Add-Type -Path ".\\Microsoft.Azure.Commands.Resources.dll" + + $definitionName = 'Reader' + $servicePrincipals = Get-AzureADServicePrincipal | Select-Object -Last 1 -Wait + $subscription = Get-AzureSubscription -Current + $scope = '/subscriptions/'+ $subscription.SubscriptionId +'/resourceGroups/' + 'SomeResourceGroupForSpn' + Assert-AreEqual 1 $servicePrincipals.Count "No service principals found. Unable to run the test." + + # Test + [Microsoft.Azure.Commands.Resources.Models.Authorization.AuthorizationClient]::RoleAssignmentNames.Enqueue("FA1A4D3B-2CCA-406B-8956-6B6B32377641") + $newAssignment = New-AzureRoleAssignment ` + -ServicePrincipalName $servicePrincipals[0].DisplayName ` + -RoleDefinitionName $definitionName ` + -Scope $scope + + + # cleanup + DeleteRoleAssignment $newAssignment + + # Assert + Assert-NotNull $newAssignment + Assert-AreEqual $definitionName $newAssignment.RoleDefinitionName + Assert-AreEqual $scope $newAssignment.Scope + Assert-AreEqual $servicePrincipals[0].DisplayName $newAssignment.DisplayName + + VerifyRoleAssignmentDeleted $newAssignment +} + +<# +.SYNOPSIS +Tests verifies creation and deletion of a RoleAssignments for User Principal Name +#> +function Test-RaByUpn +{ + # Setup + Add-Type -Path ".\\Microsoft.Azure.Commands.Resources.dll" + + $definitionName = 'Contributor' + $users = Get-AzureADUser | Select-Object -Last 1 -Wait + $resourceGroups = Get-AzureResourceGroup | Select-Object -Last 1 -Wait + Assert-AreEqual 1 $users.Count "There should be at least one user to run the test." + Assert-AreEqual 1 $resourceGroups.Count "No resource group found. Unable to run the test." + + # Test + [Microsoft.Azure.Commands.Resources.Models.Authorization.AuthorizationClient]::RoleAssignmentNames.Enqueue("7A750D57-9D92-4BE1-AD66-F099CECFFC01") + $newAssignment = New-AzureRoleAssignment ` + -UPN $users[0].Mail ` + -RoleDefinitionName $definitionName ` + -ResourceGroupName $resourceGroups[0].ResourceGroupName + + # cleanup + DeleteRoleAssignment $newAssignment + + # Assert + Assert-NotNull $newAssignment + Assert-AreEqual $definitionName $newAssignment.RoleDefinitionName + Assert-AreEqual $users[0].DisplayName $newAssignment.DisplayName + + VerifyRoleAssignmentDeleted $newAssignment +} + +<# .SYNOPSIS Tests validate correctness of returned permissions when logged in as the assigned user #> +function Test-RaUserPermissions +{ + param([string]$rgName, [string]$action) + + # Setup + + # Test + $permissions = Get-AzureResourceGroup -Name $rgName + + # Assert + Assert-AreEqual 1 $permissions.Permissions.Count "User should have only one permission." + Assert-AreEqual 1 $permissions.Permissions[0].Actions.Count "User should have only one action in the permission." + Assert-AreEqual $action $permissions.Permissions[0].Actions[0] "Permission action mismatch." +} + +<# +.SYNOPSIS +Creates role assignment +#> +function CreateRoleAssignment +{ + param([string]$roleAssignmentId, [string]$userId, [string]$definitionName, [string]$resourceGroupName) + + Add-Type -Path ".\\Microsoft.Azure.Commands.Resources.dll" + + [Microsoft.Azure.Commands.Resources.Models.Authorization.AuthorizationClient]::RoleAssignmentNames.Enqueue($roleAssignmentId) + $newAssignment = New-AzureRoleAssignment ` + -ObjectId $userId ` + -RoleDefinitionName $definitionName ` + -ResourceGroupName $resourceGroupName + + return $newAssignment +} + +<# +.SYNOPSIS +Delete role assignment +#> +function DeleteRoleAssignment +{ + param([Parameter(Mandatory=$true)] [object] $roleAssignment) + + Remove-AzureRoleAssignment -ObjectId $roleAssignment.ObjectId.Guid ` + -Scope $roleAssignment.Scope ` + -RoleDefinitionName $roleAssignment.RoleDefinitionName ` + -Force +} + +<# +.SYNOPSIS +Verifies that role assignment does not exist +#> +function VerifyRoleAssignmentDeleted +{ + param([Parameter(Mandatory=$true)] [object] $roleAssignment) + + $deletedRoleAssignment = Get-AzureRoleAssignment -ObjectId $roleAssignment.ObjectId.Guid ` + -Scope $roleAssignment.Scope ` + -RoleDefinitionName $roleAssignment.RoleDefinitionName + Assert-Null $deletedRoleAssignment +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADGroupMemberFromEmptyGroup.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADGroupMemberFromEmptyGroup.json new file mode 100644 index 000000000000..f1247d3557a5 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADGroupMemberFromEmptyGroup.json @@ -0,0 +1,262 @@ +{ + "Entries": [ + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/groups?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9ncm91cHM/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"displayName\": \"adgroup6180\",\r\n \"mailEnabled\": false,\r\n \"mailNickname\": \"adgroupmail3185\",\r\n \"securityEnabled\": true\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.Group/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.Group\",\r\n \"objectType\": \"Group\",\r\n \"objectId\": \"8c473307-8259-4d49-bba5-46f5fc3296c1\",\r\n \"softDeletionTimestamp\": null,\r\n \"appMetadata\": null,\r\n \"exchangeResources\": [],\r\n \"description\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"adgroup6180\",\r\n \"groupType\": null,\r\n \"isPublic\": null,\r\n \"lastDirSyncTime\": null,\r\n \"licenseAssignment\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"adgroupmail3185\",\r\n \"mailEnabled\": false,\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"securityEnabled\": true,\r\n \"sharepointResources\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "OijwP55bzFPNFU61dGL7reXxvBErwXnDlELDsunJBUw=" + ], + "request-id": [ + "d0ae966c-e2f1-4872-80fc-5abf91f3be76" + ], + "client-request-id": [ + "16a35069-b334-48ae-8fbe-fd23b0dc8037" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "nJW0nX8YnfYIqgF4iXf877_mMIunOvGLiFxbPfK4PvoCgOg9KAVObgN_0W7hqvzVo_ME1kTNj_eB1wonRCPxub9CZQbehqAVjq8_XnkF_vzknZPghAd38kNnmtFt-RMmlxMM1swOkJRcki3e8xXZXA.V6HJSvPQMdqKAQ0gFI1AUQZQnZ1ZAJvljKoxz7zRe_A" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Location": [ + "https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/directoryObjects/8c473307-8259-4d49-bba5-46f5fc3296c1/Microsoft.WindowsAzure.ActiveDirectory.Group" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:33:07 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/groups/8c473307-8259-4d49-bba5-46f5fc3296c1?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9ncm91cHMvOGM0NzMzMDctODI1OS00ZDQ5LWJiYTUtNDZmNWZjMzI5NmMxP2FwaS12ZXJzaW9uPTEuNDItcHJldmlld0ludGVybmFs", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.Group/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.Group\",\r\n \"objectType\": \"Group\",\r\n \"objectId\": \"8c473307-8259-4d49-bba5-46f5fc3296c1\",\r\n \"softDeletionTimestamp\": null,\r\n \"appMetadata\": null,\r\n \"exchangeResources\": [],\r\n \"description\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"adgroup6180\",\r\n \"groupType\": null,\r\n \"isPublic\": null,\r\n \"lastDirSyncTime\": null,\r\n \"licenseAssignment\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"adgroupmail3185\",\r\n \"mailEnabled\": false,\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"securityEnabled\": true,\r\n \"sharepointResources\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "OijwP55bzFPNFU61dGL7reXxvBErwXnDlELDsunJBUw=" + ], + "request-id": [ + "ad6405dd-efd6-4d4a-9393-594aa319284f" + ], + "client-request-id": [ + "274f2caf-bbdd-4e34-80ec-576f0d79e8dc" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "QKSDVgdUwZk7m5Itwky0bdLWu7TCvMxpRvz4dd7FYWeRePbCr9FJ_M6nhQRt-Ow_h76zFKY0-faKIgT4pfxKAbhYcaVZO-mp540t2u_NHi9mPJE2N5zGLi1Fe8hkwjZdeNwQwx80Og_Quy8x1KZovw.hLLjIAr3qaa6gzJ0ejFfr6ALeeCwEzsNE3ihGRUiPJc" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:33:07 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/groups/8c473307-8259-4d49-bba5-46f5fc3296c1/members?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9ncm91cHMvOGM0NzMzMDctODI1OS00ZDQ5LWJiYTUtNDZmNWZjMzI5NmMxL21lbWJlcnM/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects\",\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "OijwP55bzFPNFU61dGL7reXxvBErwXnDlELDsunJBUw=" + ], + "request-id": [ + "770c3bfd-5f10-413e-90e5-da98f002db4d" + ], + "client-request-id": [ + "1c9a22dd-84c0-49d4-ab25-c044f9fb4b92" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "5KHsYGPCJ-VCL-Afvw7Au-vAbLv2xc2dGgiYz_i0F2fX6NJCOpUEuIC1M7vmtPzsTD1bkiy-mHvDclwr7tqFFYO9Bi1vN7syDklpmFr084KWYeaMMzyojvJQyNf9o0PvWSm-RKz4DdZnI1k6fDjlug.04IzWloa8L7w4uaTp9etNCiN6is4lXNiCsAN0KLqk8k" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:33:07 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/groups/8c473307-8259-4d49-bba5-46f5fc3296c1?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9ncm91cHMvOGM0NzMzMDctODI1OS00ZDQ5LWJiYTUtNDZmNWZjMzI5NmMxP2FwaS12ZXJzaW9uPTEuNDItcHJldmlld0ludGVybmFs", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "OijwP55bzFPNFU61dGL7reXxvBErwXnDlELDsunJBUw=" + ], + "request-id": [ + "9f1c8622-2fe5-4e53-818f-bcf6e477a7da" + ], + "client-request-id": [ + "6605a1f3-bb64-453e-9338-4afe203f3ab8" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "LIEgA_aKOn-bToabSqqe7iQyktzNasGIsp6HiZsV7UXt-P2f-UEsTJv81yA4g9D19ow_-Z9e7sXCo07RG7fTheZ89m40ozPWXeYQ12VrAp-R2DhvGSgJ0y2lzxkgbGFG_rCFzIAFc5iq6bfTUFS2zA.lF5FNuEJf3SmRvKkKj8NrP7D3Y13MrnahqJlkG2jyXI" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "1.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:33:07 GMT" + ] + }, + "StatusCode": 204 + } + ], + "Names": { + "CreateNewAdGroup": [ + "adgroup6180", + "adgroupmail3185" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "1449d5b7-8a83-47db-ae4c-9b03e888bad0", + "Domain": "rbactest.onmicrosoft.com" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADGroupMemberWithBadGroupObjectId.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADGroupMemberWithBadGroupObjectId.json new file mode 100644 index 000000000000..ae5111ae14ee --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADGroupMemberWithBadGroupObjectId.json @@ -0,0 +1,61 @@ +{ + "Entries": [ + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/groups/deadbeef-dead-beef-dead-beefdeadbeef?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9ncm91cHMvZGVhZGJlZWYtZGVhZC1iZWVmLWRlYWQtYmVlZmRlYWRiZWVmP2FwaS12ZXJzaW9uPTEuNDItcHJldmlld0ludGVybmFs", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.error\": {\r\n \"code\": \"Request_ResourceNotFound\",\r\n \"message\": {\r\n \"lang\": \"en\",\r\n \"value\": \"Resource 'deadbeef-dead-beef-dead-beefdeadbeef' does not exist or one of its queried reference-property objects are not present.\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "ocp-aad-diagnostics-server-name": [ + "MsH+7bNxSLKcmuX3JqvzScisCtZwuMTpgstB41T1Viw=" + ], + "request-id": [ + "672ea08e-287e-4d34-96ee-e4c9abc3f6ea" + ], + "client-request-id": [ + "11f5383e-b376-4544-b1c4-1ed685744871" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "gLvrZeUb9JcrOoSFU8e5y1-jXYfm-smywAGHVeU1NTTsDEIwr9JOOFfKXLLIsJz6ccS3c8iXCR3mg45tjy1nOF8qOjzExjAhucX1X2UIUkQ.6gOuysV9qaj1rQyPg4Z8Qk41RIuZxK6anGAisXQLRXo" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "private" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Tue, 16 Sep 2014 00:29:23 GMT" + ] + }, + "StatusCode": 404 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "1449d5b7-8a83-47db-ae4c-9b03e888bad0" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADGroupMemberWithGroupObjectId.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADGroupMemberWithGroupObjectId.json new file mode 100644 index 000000000000..a3aa6d371562 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADGroupMemberWithGroupObjectId.json @@ -0,0 +1,452 @@ +{ + "Entries": [ + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycz9hcGktdmVyc2lvbj0xLjQyLXByZXZpZXdJbnRlcm5hbA==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"userPrincipalName\": \"aduser577@rbactest.onmicrosoft.com\",\r\n \"accountEnabled\": true,\r\n \"displayName\": \"aduser577\",\r\n \"mailNickname\": \"aduser577test\",\r\n \"passwordProfile\": {\r\n \"password\": \"adpass39870#$\",\r\n \"forceChangePasswordNextLogin\": false\r\n }\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.User/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"061e39c9-e586-4588-85f3-a95925e813c5\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"aduser577\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": null,\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"aduser577test\",\r\n \"mobile\": null,\r\n \"netId\": \"10033FFF8BCF0658\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": null,\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"aduser577@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": null,\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"aduser577@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "GHWom5F4FhO0ryJj9WTZucEuZW4pI1MbWekjNz7LQZA=" + ], + "request-id": [ + "bdc55a99-b87f-4ae0-a5b9-a4c002a60f07" + ], + "client-request-id": [ + "88a0e132-69a2-4d76-825b-128282ffc2a1" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "DjB2asdkQ1unWNacbOdd3_Kzth8lGVAQoVfBsXcyNZdNNPLZ9GN0U_LBLRkxvattR0w9E40eQ4eouBohinpwrIvqYTmqcVwANgeKcGreI6RyyyACYOeaT8gCV5s2qrO-cJSDtyb0MYW33-B5tPUsqw.UdOtqTpzkjwv4ihoA0tsdMt03RUfGhH8MRbpT0Uel00" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Location": [ + "https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/directoryObjects/061e39c9-e586-4588-85f3-a95925e813c5/Microsoft.WindowsAzure.ActiveDirectory.User" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:32:18 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/groups?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9ncm91cHM/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"displayName\": \"adgroup5662\",\r\n \"mailEnabled\": false,\r\n \"mailNickname\": \"adgroupmail3430\",\r\n \"securityEnabled\": true\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.Group/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.Group\",\r\n \"objectType\": \"Group\",\r\n \"objectId\": \"36a4830f-b259-444f-909f-b2f87b652ec6\",\r\n \"softDeletionTimestamp\": null,\r\n \"appMetadata\": null,\r\n \"exchangeResources\": [],\r\n \"description\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"adgroup5662\",\r\n \"groupType\": null,\r\n \"isPublic\": null,\r\n \"lastDirSyncTime\": null,\r\n \"licenseAssignment\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"adgroupmail3430\",\r\n \"mailEnabled\": false,\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"securityEnabled\": true,\r\n \"sharepointResources\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "GHWom5F4FhO0ryJj9WTZucEuZW4pI1MbWekjNz7LQZA=" + ], + "request-id": [ + "fb2c2f04-37f4-46a1-b12f-33413b3352e0" + ], + "client-request-id": [ + "b9a45b50-e8c9-4d25-9b8e-6ca7450d9d17" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "kSYG6PEDHUHp2NO_05jDYBwE-tHr1HOn6Djfgz9bpm7kdiFKhoDg1MAJBdj9DLDRXs8BPwD6Cpjw6Fo2Rb5HC9WFmfK2kcpFdjPdGtAGmoJblTo7-KxLJFYnk5wc4yCvt7oBwDH5C5RuD-dGc7CzKw.PClmq61UlcqAyhL9KrJokv9VB5TaKOo85TvVhFgW6Ks" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Location": [ + "https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/directoryObjects/36a4830f-b259-444f-909f-b2f87b652ec6/Microsoft.WindowsAzure.ActiveDirectory.Group" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:32:18 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/groups/36a4830f-b259-444f-909f-b2f87b652ec6/$links/members?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9ncm91cHMvMzZhNDgzMGYtYjI1OS00NDRmLTkwOWYtYjJmODdiNjUyZWM2LyRsaW5rcy9tZW1iZXJzP2FwaS12ZXJzaW9uPTEuNDItcHJldmlld0ludGVybmFs", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"url\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/directoryObjects/061e39c9-e586-4588-85f3-a95925e813c5\"\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "GHWom5F4FhO0ryJj9WTZucEuZW4pI1MbWekjNz7LQZA=" + ], + "request-id": [ + "d7946218-9371-4a7e-a250-e967c5f84581" + ], + "client-request-id": [ + "1968e03a-3196-46c3-8f15-f0ba412c9575" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "3i3Xgg2IThetQZI0E94Ne_x5P9Gvc2wMKTuyEN6zuxA1eP0hyYW5fl0Ma6a2EIVisUl-Vov66NW1pZIEn1fgzqaCN2u_wwg2pvTazPUJX2rsIgkt6QFsmzoio6dMSkDdHvqWBjnFchJicTk8qYqSNA.U6aj25-gshmkm8f3w8Q81MbVtwYdpRyRoh7cYUmTOBk" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "1.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:32:19 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/groups/36a4830f-b259-444f-909f-b2f87b652ec6?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9ncm91cHMvMzZhNDgzMGYtYjI1OS00NDRmLTkwOWYtYjJmODdiNjUyZWM2P2FwaS12ZXJzaW9uPTEuNDItcHJldmlld0ludGVybmFs", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.Group/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.Group\",\r\n \"objectType\": \"Group\",\r\n \"objectId\": \"36a4830f-b259-444f-909f-b2f87b652ec6\",\r\n \"softDeletionTimestamp\": null,\r\n \"appMetadata\": null,\r\n \"exchangeResources\": [],\r\n \"description\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"adgroup5662\",\r\n \"groupType\": null,\r\n \"isPublic\": null,\r\n \"lastDirSyncTime\": null,\r\n \"licenseAssignment\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"adgroupmail3430\",\r\n \"mailEnabled\": false,\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"securityEnabled\": true,\r\n \"sharepointResources\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "GHWom5F4FhO0ryJj9WTZucEuZW4pI1MbWekjNz7LQZA=" + ], + "request-id": [ + "f8f912e9-7e60-4e44-9f63-73fb43ec3460" + ], + "client-request-id": [ + "0b12b535-e045-4efc-b3a2-29b9c20c629e" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "aE8HuExxAGT6UMEVtKJoSxwBQUuQK0BpNMvgk3N5gFkAUOgxpuHAlg_wtE41VuEuR2zzTYnmeoJQjbcn3YkS7VGlM_fIofoht6jaoXl3vOv3iqIYG2kdguM0FjYSx5oZ42VkSGjAwElsN1rgtWpxdQ.BvzRBn4Pt5FQbnNhkA1sjkmnXVV6NDcGZ7sm_h87yyQ" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:32:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/groups/36a4830f-b259-444f-909f-b2f87b652ec6/members?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9ncm91cHMvMzZhNDgzMGYtYjI1OS00NDRmLTkwOWYtYjJmODdiNjUyZWM2L21lbWJlcnM/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects\",\r\n \"value\": [\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"061e39c9-e586-4588-85f3-a95925e813c5\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"aduser577\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": null,\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"aduser577test\",\r\n \"mobile\": null,\r\n \"netId\": \"10033FFF8BCF0658\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": null,\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"aduser577@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": null,\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"aduser577@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "GHWom5F4FhO0ryJj9WTZucEuZW4pI1MbWekjNz7LQZA=" + ], + "request-id": [ + "44b55cff-b965-413b-9e70-3037eba9b405" + ], + "client-request-id": [ + "fba3ca30-ba85-4310-9cfe-31c2036bad13" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "IJUXhzyilTq8EDSHBzdTwNCwBNjvl_fXo3P9juTydRWmLF-qJ-8rSzGTpNK7G2AN3Zq-K-v5gLYKzoDB5xFCpgE1N7fblI2iHsNYLsQPcYxDli31TsoDEcOtLcPjJ4YBwi_NPI58CSMqTR1RfDsEHg.rFnF_chZm53kbkBT170UqeYmPNaM8oaIspqSjddkj6o" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:32:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/061e39c9-e586-4588-85f3-a95925e813c5?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy8wNjFlMzljOS1lNTg2LTQ1ODgtODVmMy1hOTU5MjVlODEzYzU/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "GHWom5F4FhO0ryJj9WTZucEuZW4pI1MbWekjNz7LQZA=" + ], + "request-id": [ + "46e856a9-ab80-4ed4-a84f-7d6531f141b1" + ], + "client-request-id": [ + "1bae7313-cf09-4401-9c17-7ded15fc7b6c" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "ZAz9LK3ksyyFQQm7WNNOLUZ6lje0M-DePIu84EeGxT4XHlPtInBQ1xbjW52kVAzpHfSPQ9v4iimYcfyCBjG3Qm8tymp_AHA0kSL1x4Yg107BMd2a981ND1e6S1_VCA_E6ZlrzQXlKFTVQvmvIbzjTg.6Qn3YyYuQniR2TOs82N1AgfY6aKb6eKEbg4ANQ-sgro" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "1.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:32:19 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/groups/36a4830f-b259-444f-909f-b2f87b652ec6?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9ncm91cHMvMzZhNDgzMGYtYjI1OS00NDRmLTkwOWYtYjJmODdiNjUyZWM2P2FwaS12ZXJzaW9uPTEuNDItcHJldmlld0ludGVybmFs", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "GHWom5F4FhO0ryJj9WTZucEuZW4pI1MbWekjNz7LQZA=" + ], + "request-id": [ + "a956b3d1-95d9-4873-ad3e-f483a298b835" + ], + "client-request-id": [ + "0ed382d5-07f2-44ed-b816-a8aa5153a3ec" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "JmBg5Jv20j6eW_dDcj_QZ8tVYpcucUh0FMDHTbdbvVbsLqjazxumnP3Mz1pEb2b_gtlk3VCLimHgnTLwIpCK8XajzW7gJJNBHUHAovTzdDtzpCLFEdPhbGJqFCQR49ZYcNbs1pS56r4G9sJq_awPHg.WlXLCCDleUbMTElw0LCXFVXAXouyysus3lQixBj5ZpM" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "1.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:32:20 GMT" + ] + }, + "StatusCode": 204 + } + ], + "Names": { + "CreateNewAdUser": [ + "aduser577", + "adpass3987" + ], + "CreateNewAdGroup": [ + "adgroup5662", + "adgroupmail3430" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "1449d5b7-8a83-47db-ae4c-9b03e888bad0", + "Domain": "rbactest.onmicrosoft.com" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADGroupMemberWithUserObjectId.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADGroupMemberWithUserObjectId.json new file mode 100644 index 000000000000..52a516a40067 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADGroupMemberWithUserObjectId.json @@ -0,0 +1,192 @@ +{ + "Entries": [ + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycz9hcGktdmVyc2lvbj0xLjQyLXByZXZpZXdJbnRlcm5hbA==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"userPrincipalName\": \"aduser5093@rbactest.onmicrosoft.com\",\r\n \"accountEnabled\": true,\r\n \"displayName\": \"aduser5093\",\r\n \"mailNickname\": \"aduser5093test\",\r\n \"passwordProfile\": {\r\n \"password\": \"adpass3800#$\",\r\n \"forceChangePasswordNextLogin\": false\r\n }\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.User/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"ac722969-5263-4555-9680-d45db7355207\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"aduser5093\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": null,\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"aduser5093test\",\r\n \"mobile\": null,\r\n \"netId\": \"10033FFF8BCF0656\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": null,\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"aduser5093@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": null,\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"aduser5093@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "GHWom5F4FhO0ryJj9WTZucEuZW4pI1MbWekjNz7LQZA=" + ], + "request-id": [ + "562a23ed-e321-4499-981c-7b15361c589d" + ], + "client-request-id": [ + "760fade6-8f2f-4f8a-bcd0-2766242a2581" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "9QYsZlDJwLmrxc_dCRUH6SDT4ygRFW1nowt1al3-IAkOfmT0jlee5RiUu_I6LyQ1bJ8QSLg4eXjIL9beFYL5vmhJKQkYjTUjRSztnA-fVMPGAMS7IerJm6-lwJ0gMvStHJZHXG3_abArmmwewt25Eg.SDmYVjhrpfd-i18csjuU0Fw3SHHTnWA4ZWN0iQ7ctVE" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Location": [ + "https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/directoryObjects/ac722969-5263-4555-9680-d45db7355207/Microsoft.WindowsAzure.ActiveDirectory.User" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:31:47 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/groups/ac722969-5263-4555-9680-d45db7355207?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9ncm91cHMvYWM3MjI5NjktNTI2My00NTU1LTk2ODAtZDQ1ZGI3MzU1MjA3P2FwaS12ZXJzaW9uPTEuNDItcHJldmlld0ludGVybmFs", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.error\": {\r\n \"code\": \"Request_ResourceNotFound\",\r\n \"message\": {\r\n \"lang\": \"en\",\r\n \"value\": \"Resource 'ac722969-5263-4555-9680-d45db7355207' does not exist or one of its queried reference-property objects are not present.\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "ocp-aad-diagnostics-server-name": [ + "GHWom5F4FhO0ryJj9WTZucEuZW4pI1MbWekjNz7LQZA=" + ], + "request-id": [ + "2869e031-da98-41d8-9be8-d224810a2a67" + ], + "client-request-id": [ + "70fd29c6-9fe9-43f7-a97f-3b0b51df9756" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "rw8rtjiECDHdOgkPcpEvpBBL-mP65L7q2uauahUFWf_ya1sbVLT5uprxKVSwi1gXan1HcNdH_UuoXNGbwOveNGMx_9sdpZB0ba2YXHO9BFU-1bgpCk14qN5v5vTjKspPW3FeOi9P0OcSBqq98N2BVw.6bMuEdr0oFdTaL3rwefDmgDtlqWiv33aXV8ocHayRIs" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "private" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:31:47 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/ac722969-5263-4555-9680-d45db7355207?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy9hYzcyMjk2OS01MjYzLTQ1NTUtOTY4MC1kNDVkYjczNTUyMDc/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "GHWom5F4FhO0ryJj9WTZucEuZW4pI1MbWekjNz7LQZA=" + ], + "request-id": [ + "d204cb80-75c8-44da-a75f-541662feb5d8" + ], + "client-request-id": [ + "16d1a0bf-7f89-46a7-b186-5f3faa609a0c" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "eSuNnJFghK8G17bYb9d838eXerDU1F1MeK9LKQFkD8m15CwsTJa6PzzT1Qvyfe-w0Dlnyrg8fVsFni3ARA9-p6yhQ2Sc9jpcNIBMOiUKKOaBeIoFoftzouuLHSF-CsP2YYGbZARyJ0u3p0tITW7jHw.-aK2kHr2i0QsNL7fhhQH2SJCKAPhO3KVaXYxRqhwUkg" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "1.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:31:48 GMT" + ] + }, + "StatusCode": 204 + } + ], + "Names": { + "CreateNewAdUser": [ + "aduser5093", + "adpass380" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "1449d5b7-8a83-47db-ae4c-9b03e888bad0", + "Domain": "rbactest.onmicrosoft.com" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADGroupWithBadObjectId.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADGroupWithBadObjectId.json new file mode 100644 index 000000000000..6acceed6431c --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADGroupWithBadObjectId.json @@ -0,0 +1,61 @@ +{ + "Entries": [ + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/groups/deadbeef-dead-beef-dead-beefdeadbeef?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9ncm91cHMvZGVhZGJlZWYtZGVhZC1iZWVmLWRlYWQtYmVlZmRlYWRiZWVmP2FwaS12ZXJzaW9uPTEuNDItcHJldmlld0ludGVybmFs", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.error\": {\r\n \"code\": \"Request_ResourceNotFound\",\r\n \"message\": {\r\n \"lang\": \"en\",\r\n \"value\": \"Resource 'deadbeef-dead-beef-dead-beefdeadbeef' does not exist or one of its queried reference-property objects are not present.\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "ocp-aad-diagnostics-server-name": [ + "1Ptot0LG1647jq6Jd5jbCVVlBPXTTRRWQ3OcUhRUILc=" + ], + "request-id": [ + "e06c7a00-4458-41d8-939e-e9c89cd3ed1a" + ], + "client-request-id": [ + "2e6b1488-2266-4c8c-8721-477095a2e63a" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "9CPR14LFKHUbmrLln3ewiTU4fJNUykw67ZdLR-K_Y6bTofaGwq8kS3FaeZMZLf6fnF42wYdVZRQxkf1eKRHoFaR5qIzP6J-YKJOSrHlPdlE.fIQQN_aXs6n9TgI2nlDSX_NSGRk4Da8a0MMCVE0jWsQ" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "private" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Tue, 16 Sep 2014 00:28:30 GMT" + ] + }, + "StatusCode": 404 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "1449d5b7-8a83-47db-ae4c-9b03e888bad0" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADGroupWithBadSearchString.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADGroupWithBadSearchString.json new file mode 100644 index 000000000000..aca6eefbe0d1 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADGroupWithBadSearchString.json @@ -0,0 +1,70 @@ +{ + "Entries": [ + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/groups?&$filter=startswith(displayName,'BadSearchString')&api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9ncm91cHM/JiRmaWx0ZXI9c3RhcnRzd2l0aChkaXNwbGF5TmFtZSwnQmFkU2VhcmNoU3RyaW5nJykmYXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.Group\",\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "GHWom5F4FhO0ryJj9WTZucEuZW4pI1MbWekjNz7LQZA=" + ], + "request-id": [ + "98512b5c-325c-4651-96ad-88d0f5b378a4" + ], + "client-request-id": [ + "63067f08-eb19-4940-8885-84f2bab74608" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "RS6Tgp8WngStYaXdco10uNc7vUva3sD79ngeu0bi1Qxm3oShEWdmKrkd2SHJ01u8Rc6RZaqqiWGbVrinxFcfdIy8fr-aSZRB6ONWjUILvB0.-YYk7edzL75e3io2HZ1GQvzIYXIuat6OsPjdfM40CYI" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Tue, 16 Sep 2014 00:28:14 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "1449d5b7-8a83-47db-ae4c-9b03e888bad0" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADGroupWithObjectId.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADGroupWithObjectId.json new file mode 100644 index 000000000000..f2e02929b25a --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADGroupWithObjectId.json @@ -0,0 +1,201 @@ +{ + "Entries": [ + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/groups?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9ncm91cHM/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"displayName\": \"adgroup7920\",\r\n \"mailEnabled\": false,\r\n \"mailNickname\": \"adgroupmail4664\",\r\n \"securityEnabled\": true\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.Group/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.Group\",\r\n \"objectType\": \"Group\",\r\n \"objectId\": \"e8c62287-af45-4907-8cc3-4619ac61f4dd\",\r\n \"softDeletionTimestamp\": null,\r\n \"appMetadata\": null,\r\n \"exchangeResources\": [],\r\n \"description\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"adgroup7920\",\r\n \"groupType\": null,\r\n \"isPublic\": null,\r\n \"lastDirSyncTime\": null,\r\n \"licenseAssignment\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"adgroupmail4664\",\r\n \"mailEnabled\": false,\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"securityEnabled\": true,\r\n \"sharepointResources\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "5TnuYhUaV09bxMxpRfIwQrijH1KPxlCtfSFarwsJz+g=" + ], + "request-id": [ + "2593a12a-5533-42ae-ab7e-c4b0a86699b3" + ], + "client-request-id": [ + "5036545f-9309-4df9-8f6f-22cfc5200ba1" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "L3IcrT_29TenDf0fceSR7pzxBhM3BfW9B-ytGkAdcPYEEx6VtYTHCRAJ1OlFYFC582vQbgFmdKA7CsIG8KleZxYeVKfnVXWwW1f5v3oxZjhn3RSZBNOr1JxMg_VLGei8LvIlr8kjI60heCJ0LPsYvQ.TaeDxaG5H2kR5hNIczUrTPjk14oFmdLz-MhV-m9Mg_8" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Location": [ + "https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/directoryObjects/e8c62287-af45-4907-8cc3-4619ac61f4dd/Microsoft.WindowsAzure.ActiveDirectory.Group" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:33:00 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/groups/e8c62287-af45-4907-8cc3-4619ac61f4dd?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9ncm91cHMvZThjNjIyODctYWY0NS00OTA3LThjYzMtNDYxOWFjNjFmNGRkP2FwaS12ZXJzaW9uPTEuNDItcHJldmlld0ludGVybmFs", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.Group/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.Group\",\r\n \"objectType\": \"Group\",\r\n \"objectId\": \"e8c62287-af45-4907-8cc3-4619ac61f4dd\",\r\n \"softDeletionTimestamp\": null,\r\n \"appMetadata\": null,\r\n \"exchangeResources\": [],\r\n \"description\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"adgroup7920\",\r\n \"groupType\": null,\r\n \"isPublic\": null,\r\n \"lastDirSyncTime\": null,\r\n \"licenseAssignment\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"adgroupmail4664\",\r\n \"mailEnabled\": false,\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"securityEnabled\": true,\r\n \"sharepointResources\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "5TnuYhUaV09bxMxpRfIwQrijH1KPxlCtfSFarwsJz+g=" + ], + "request-id": [ + "ecefc32c-75a1-4d05-b76a-45aaf77dcb89" + ], + "client-request-id": [ + "c07932ec-81bb-4e6a-b029-2b254be03b1d" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "ODzajtwMXP-gve4oDbzR4RZGQ7ASw_kKdh-9ImFR9kVRYnRtmQWa04C3sGwxdVncHWuc9xlIuJy8YBmGvaym_VL4BYugykT6sQruyeTdF015QMoRAcwikCEDAH7Sfu2uHWh9P8YBk28E8HrTEDIJ9g.G09ND28x1AWFtDX5NMmTV0_EVERQhmXERWQ0N5UkxUs" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:33:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/groups/e8c62287-af45-4907-8cc3-4619ac61f4dd?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9ncm91cHMvZThjNjIyODctYWY0NS00OTA3LThjYzMtNDYxOWFjNjFmNGRkP2FwaS12ZXJzaW9uPTEuNDItcHJldmlld0ludGVybmFs", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "5TnuYhUaV09bxMxpRfIwQrijH1KPxlCtfSFarwsJz+g=" + ], + "request-id": [ + "e8cd5fa5-5fd2-40e2-8a4e-ef4d1020ddd4" + ], + "client-request-id": [ + "13be3990-2d15-492d-808e-e00db8b0a04c" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "fO_BFEKhQy1GGsZELW3DJ92a-o57KBQ_SlwSt3XgzY_bM6qz0ggDqOVheId_BsVslYC-ZSzOVHjiQXCccHmN_RYoH7Vyd3Ts-r-3NpdqjDSEiT0uEWkLe095OfQDOFoKa_t8q5zEgsy82p23Xbqwxg.rPsXQKL_VgsVx2KL-ShUmsINGxQT-O0g6oHnThtN0aw" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "1.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:33:00 GMT" + ] + }, + "StatusCode": 204 + } + ], + "Names": { + "CreateNewAdGroup": [ + "adgroup7920", + "adgroupmail4664" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "1449d5b7-8a83-47db-ae4c-9b03e888bad0", + "Domain": "rbactest.onmicrosoft.com" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADGroupWithSearchString.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADGroupWithSearchString.json new file mode 100644 index 000000000000..f1b2338a6b18 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADGroupWithSearchString.json @@ -0,0 +1,201 @@ +{ + "Entries": [ + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/groups?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9ncm91cHM/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"displayName\": \"adgroup5645\",\r\n \"mailEnabled\": false,\r\n \"mailNickname\": \"adgroupmail2587\",\r\n \"securityEnabled\": true\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.Group/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.Group\",\r\n \"objectType\": \"Group\",\r\n \"objectId\": \"a1958457-f4c6-4eed-bc86-c01baf2a237b\",\r\n \"softDeletionTimestamp\": null,\r\n \"appMetadata\": null,\r\n \"exchangeResources\": [],\r\n \"description\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"adgroup5645\",\r\n \"groupType\": null,\r\n \"isPublic\": null,\r\n \"lastDirSyncTime\": null,\r\n \"licenseAssignment\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"adgroupmail2587\",\r\n \"mailEnabled\": false,\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"securityEnabled\": true,\r\n \"sharepointResources\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "GpZBqv1HpLKoq8DomLBjVg0qidYJApbIcc5XfQ74dc8=" + ], + "request-id": [ + "fb56b86f-0bc2-47a4-a324-fded1467527d" + ], + "client-request-id": [ + "199628e2-df05-4c5f-8815-919f01690e08" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "E69XBd_d18Nl5X8MD8p0hEs-wXi-XurFMwfd8sDpm2d3-9QBnh7_tL1Z35Oz-1EzTYujqtHbG43eetAZoD0QzZfdm0GGiTceXKB0LqBO828InGkJh8BjT2qAoF5bUThub4WSBw5fpUd5TpL3W90s_w.uirK1Ek3cuufz_8FJNJDYYQQJUwx38mJ7UNXJRX6WuM" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Location": [ + "https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/directoryObjects/a1958457-f4c6-4eed-bc86-c01baf2a237b/Microsoft.WindowsAzure.ActiveDirectory.Group" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:32:46 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/groups?&$filter=startswith(displayName,'adgroup5645')&api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9ncm91cHM/JiRmaWx0ZXI9c3RhcnRzd2l0aChkaXNwbGF5TmFtZSwnYWRncm91cDU2NDUnKSZhcGktdmVyc2lvbj0xLjQyLXByZXZpZXdJbnRlcm5hbA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.Group\",\r\n \"value\": [\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.Group\",\r\n \"objectType\": \"Group\",\r\n \"objectId\": \"a1958457-f4c6-4eed-bc86-c01baf2a237b\",\r\n \"softDeletionTimestamp\": null,\r\n \"appMetadata\": null,\r\n \"exchangeResources\": [],\r\n \"description\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"adgroup5645\",\r\n \"groupType\": null,\r\n \"isPublic\": null,\r\n \"lastDirSyncTime\": null,\r\n \"licenseAssignment\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"adgroupmail2587\",\r\n \"mailEnabled\": false,\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"securityEnabled\": true,\r\n \"sharepointResources\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "GpZBqv1HpLKoq8DomLBjVg0qidYJApbIcc5XfQ74dc8=" + ], + "request-id": [ + "ce339aac-4a94-420d-a725-47f911f18ddf" + ], + "client-request-id": [ + "94f94d9e-992b-4bec-9d39-1a29a9f56d82" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "fBB3lZsTPiNDaHy4vJvMqupVUZB5qzjrnkL2xHTf8i6_OsBb2KjZlpZIaGyVop1hp-SPX5vilb2hW2qtLdQLLOAtevs8hxHJBZxhu5YBDUuRJcIAkhifrEhnrm1yny-qr74TvDXR2fRoGiNORFxIRw.ya7cDlGhXN-pbed1_KnHEUr7ilkOEHwg1tTup2YQiXc" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:32:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/groups/a1958457-f4c6-4eed-bc86-c01baf2a237b?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9ncm91cHMvYTE5NTg0NTctZjRjNi00ZWVkLWJjODYtYzAxYmFmMmEyMzdiP2FwaS12ZXJzaW9uPTEuNDItcHJldmlld0ludGVybmFs", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "GpZBqv1HpLKoq8DomLBjVg0qidYJApbIcc5XfQ74dc8=" + ], + "request-id": [ + "5ddf5e06-fa14-4bb5-be75-e05a4756aa7a" + ], + "client-request-id": [ + "6208c78f-5b3b-4d06-8a07-532e35640a4f" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "Fl5YYyi4CEpW67V4BjKeBYPS3CW1A_rpIBE3XuiIDhEQOzdxsuQaqnyZ6CsQuYXTGYvrBm7AuN_gj6VmVoDhKv-AYbL9ZnIL11BSz39vQeZOpVCIQu2ysTSd-U-3KIsGlzPWANNaqyFn6OFBBCKxbQ.GQPQEsHOFKf196PTMKcIXerAVKNGDyWPzlpbL6CNqtI" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "1.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:32:46 GMT" + ] + }, + "StatusCode": 204 + } + ], + "Names": { + "CreateNewAdGroup": [ + "adgroup5645", + "adgroupmail2587" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "1449d5b7-8a83-47db-ae4c-9b03e888bad0", + "Domain": "rbactest.onmicrosoft.com" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADGroupWithUserObjectId.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADGroupWithUserObjectId.json new file mode 100644 index 000000000000..32290185b5bb --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADGroupWithUserObjectId.json @@ -0,0 +1,192 @@ +{ + "Entries": [ + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycz9hcGktdmVyc2lvbj0xLjQyLXByZXZpZXdJbnRlcm5hbA==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"userPrincipalName\": \"aduser8015@rbactest.onmicrosoft.com\",\r\n \"accountEnabled\": true,\r\n \"displayName\": \"aduser8015\",\r\n \"mailNickname\": \"aduser8015test\",\r\n \"passwordProfile\": {\r\n \"password\": \"adpass87500#$\",\r\n \"forceChangePasswordNextLogin\": false\r\n }\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.User/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"55efbd63-5997-409e-9945-1cb0a438c1eb\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"aduser8015\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": null,\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"aduser8015test\",\r\n \"mobile\": null,\r\n \"netId\": \"10037FFE8BD2591A\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": null,\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"aduser8015@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": null,\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"aduser8015@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "HRG+aiSn0E9z3GzhPJ46HhJjFcqCria5fvIemYT7auo=" + ], + "request-id": [ + "d9a2fdbf-9b8d-4193-a9a8-bd457ca6bbcd" + ], + "client-request-id": [ + "2c22d943-9182-49ec-83a2-5244656fce6c" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "wyWvUa6rbPPbnR-r7Lwcrg5xDWniMThW8-S5jPn7du2a1I-a_6sIma9b4DMdQWwxTBaf32wcocSKKaTw19Wgy9yADkZ5TcEsPR91T1WxCH7j1-3KDthLxl6g3XvPvOzACaZIzUBsHdt63sFNkiVSug.BmxKT_aC6bkf3uPKmdPvwEercUySFbYb-O9rfiSgnlg" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Location": [ + "https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/directoryObjects/55efbd63-5997-409e-9945-1cb0a438c1eb/Microsoft.WindowsAzure.ActiveDirectory.User" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:31:54 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/groups/55efbd63-5997-409e-9945-1cb0a438c1eb?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9ncm91cHMvNTVlZmJkNjMtNTk5Ny00MDllLTk5NDUtMWNiMGE0MzhjMWViP2FwaS12ZXJzaW9uPTEuNDItcHJldmlld0ludGVybmFs", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.error\": {\r\n \"code\": \"Request_ResourceNotFound\",\r\n \"message\": {\r\n \"lang\": \"en\",\r\n \"value\": \"Resource '55efbd63-5997-409e-9945-1cb0a438c1eb' does not exist or one of its queried reference-property objects are not present.\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "ocp-aad-diagnostics-server-name": [ + "HRG+aiSn0E9z3GzhPJ46HhJjFcqCria5fvIemYT7auo=" + ], + "request-id": [ + "b3f76d34-b48e-4e33-8870-128a1a5065ec" + ], + "client-request-id": [ + "bd39e568-7337-49a4-82ef-d1695a2cdc04" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "1zQk-P_tqRHgfmL4aJ8SbPvd3Ynw7YJ3oMjKCimZF9EhSoNPO8TuWerwpFV7EPCPu0-_lPy9mGCYtg8Y8CECZKwUrnc1c7_zcXO_0lHmdBknEbm2aA9v2iHN0ArAWpsssn9NGr3lvmSujMewgu00bA.PDAqz3x8gkV5IfrnHyV7cBkbB7Vh-D81C54z6IO2piI" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "private" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:31:55 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/55efbd63-5997-409e-9945-1cb0a438c1eb?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy81NWVmYmQ2My01OTk3LTQwOWUtOTk0NS0xY2IwYTQzOGMxZWI/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "HRG+aiSn0E9z3GzhPJ46HhJjFcqCria5fvIemYT7auo=" + ], + "request-id": [ + "d9309ccd-90a1-4153-97de-54290fbeb3e9" + ], + "client-request-id": [ + "92a9466f-07ce-48cc-b28d-8b3ec7b6940f" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "pZtVNZwtzgL_C72Osfn_W-GZV3yePi-zO__3Oo01vNbHknJYn4e8UWJ8Eu5z1D1kXKuH5fC1alh9499xT1j7BsVC-1m1SvmADyx3Av-hWHajGHPFL20c79otSsrYm-RQH4AlM6Pmrwf-354wIuy8VA.9jq4G8i07apYUS2EDJvUEmrha9UvwwkKokGbI4UYa7Q" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "1.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:31:55 GMT" + ] + }, + "StatusCode": 204 + } + ], + "Names": { + "CreateNewAdUser": [ + "aduser8015", + "adpass8750" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "1449d5b7-8a83-47db-ae4c-9b03e888bad0", + "Domain": "rbactest.onmicrosoft.com" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADServicePrincipalWithBadObjectId.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADServicePrincipalWithBadObjectId.json new file mode 100644 index 000000000000..db64e4826c86 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADServicePrincipalWithBadObjectId.json @@ -0,0 +1,61 @@ +{ + "Entries": [ + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/servicePrincipals/deadbeef-dead-beef-dead-beefdeadbeef?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9zZXJ2aWNlUHJpbmNpcGFscy9kZWFkYmVlZi1kZWFkLWJlZWYtZGVhZC1iZWVmZGVhZGJlZWY/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.error\": {\r\n \"code\": \"Request_ResourceNotFound\",\r\n \"message\": {\r\n \"lang\": \"en\",\r\n \"value\": \"Resource 'deadbeef-dead-beef-dead-beefdeadbeef' does not exist or one of its queried reference-property objects are not present.\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "ocp-aad-diagnostics-server-name": [ + "jC0LEgyX+Xs4wMEfLHHxy6tdbt5rWMqcCmfvwI5RNyo=" + ], + "request-id": [ + "890bd2e0-ab72-41c9-878a-0889c536ae9a" + ], + "client-request-id": [ + "fb87c23f-b9a8-44df-8223-aadab4b4758a" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "ryOyWzen7TM4A_3AoFflF4kePmSgiMrFUvZd1NOpbnjxmauoWluguwMGMSdo0gLvPveq0NsQjs7KoUbn6EgCflVtJUTl7yLYL0Co3XJXjnU.ES-FVohAyIQrkaQveOeDSpM0fFOm3od0CbPxVT24NcI" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "private" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Tue, 16 Sep 2014 00:30:24 GMT" + ] + }, + "StatusCode": 404 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "1449d5b7-8a83-47db-ae4c-9b03e888bad0" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADServicePrincipalWithBadSPN.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADServicePrincipalWithBadSPN.json new file mode 100644 index 000000000000..9a872b1048c6 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADServicePrincipalWithBadSPN.json @@ -0,0 +1,70 @@ +{ + "Entries": [ + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/servicePrincipals?$filter=servicePrincipalNames/any(c:c%20eq%20'badspn')&api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9zZXJ2aWNlUHJpbmNpcGFscz8kZmlsdGVyPXNlcnZpY2VQcmluY2lwYWxOYW1lcy9hbnkoYzpjJTIwZXElMjAnYmFkc3BuJykmYXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal\",\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "jC0LEgyX+Xs4wMEfLHHxy6tdbt5rWMqcCmfvwI5RNyo=" + ], + "request-id": [ + "3bdc30f4-57dc-4474-8bea-6ae57b30c098" + ], + "client-request-id": [ + "6cb622a7-bc18-44bd-832e-29ea7b860b7a" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "Z-e3P6LiB2MWFnCVUW56nhi6wuoeNbBMJ45fThUAPDcvupwr7W1Uhyk_M6-4HERmsWS5UP0z_mn1ZtHp5f2--V2GZgG9_pAMNxCo9ciw5qM.tiJiN2Jo8Mp6isBG7smeKLUxSI0H1qiQNgnVNkM31Eo" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Tue, 16 Sep 2014 00:32:34 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "1449d5b7-8a83-47db-ae4c-9b03e888bad0" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADServicePrincipalWithBadSearchString.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADServicePrincipalWithBadSearchString.json new file mode 100644 index 000000000000..4fd12fdc33c1 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADServicePrincipalWithBadSearchString.json @@ -0,0 +1,70 @@ +{ + "Entries": [ + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/servicePrincipals?$filter=startswith(displayName,'badsearchstring')&api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9zZXJ2aWNlUHJpbmNpcGFscz8kZmlsdGVyPXN0YXJ0c3dpdGgoZGlzcGxheU5hbWUsJ2JhZHNlYXJjaHN0cmluZycpJmFwaS12ZXJzaW9uPTEuNDItcHJldmlld0ludGVybmFs", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal\",\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "jC0LEgyX+Xs4wMEfLHHxy6tdbt5rWMqcCmfvwI5RNyo=" + ], + "request-id": [ + "80756763-d621-48dc-ae58-7c97c5252d82" + ], + "client-request-id": [ + "07992303-551b-4166-8a07-ea34751e07bb" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "-NAjpYBrD6W2Urj5I-OB_mJ3sDrmVZphZNTREqYoqAcBXnWGwysOCXJuboNgGKj8mVv9PjRmlTY3HKXVjUZnPuJ75ejECtVTJb3ziSCcKLE.47OUZi4WXxsXbZQXWWUTN4Y4lDr6VOCHsyonnV-D1ns" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Tue, 16 Sep 2014 00:31:10 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "1449d5b7-8a83-47db-ae4c-9b03e888bad0" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADServicePrincipalWithObjectId.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADServicePrincipalWithObjectId.json new file mode 100644 index 000000000000..171fde5ff663 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADServicePrincipalWithObjectId.json @@ -0,0 +1,370 @@ +{ + "Entries": [ + { + "RequestUri": "/72f988bf-86f1-41af-91ab-2d7cd011db47/applications?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzcyZjk4OGJmLTg2ZjEtNDFhZi05MWFiLTJkN2NkMDExZGI0Ny9hcHBsaWNhdGlvbnM/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"availableToOtherTenants\": false,\r\n \"displayName\": \"adApplication8579\",\r\n \"homepage\": \"http://adApplication8579/home\",\r\n \"identifierUris\": [\r\n \"http://adApplication8579/home\"\r\n ],\r\n \"replyUrls\": [\r\n \"http://adApplication8579/home\"\r\n ]\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "254" + ], + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.Application/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.Application\",\r\n \"objectType\": \"Application\",\r\n \"objectId\": \"b258ecb0-a5c8-4cba-91b5-f72aa3c3b47e\",\r\n \"softDeletionTimestamp\": null,\r\n \"appId\": \"0a89e309-b6bf-4051-9c89-4b585c3c86b8\",\r\n \"appMetadata\": null,\r\n \"appPermissions\": [],\r\n \"availableToOtherTenants\": false,\r\n \"displayName\": \"adApplication8579\",\r\n \"errorUrl\": null,\r\n \"homepage\": \"http://adApplication8579/home\",\r\n \"identifierUris\": [\r\n \"http://adApplication8579/home\"\r\n ],\r\n \"keyCredentials\": [],\r\n \"knownClientApplications\": [],\r\n \"logoutUrl\": null,\r\n \"passwordCredentials\": [],\r\n \"publicClient\": null,\r\n \"replyUrls\": [\r\n \"http://adApplication8579/home\"\r\n ],\r\n \"requiredResourceAccess\": [],\r\n \"resourceApplicationSet\": null,\r\n \"samlMetadataUrl\": null,\r\n \"webApi\": null,\r\n \"webApp\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "870" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "0KG3XJca10JBaCPPVyV6S/TPZvVBRyYmKz0GZKrigX0=" + ], + "request-id": [ + "d3bd57bc-25dc-4ab0-982c-058788b59ac1" + ], + "client-request-id": [ + "22b01a0a-363d-4634-9f87-2af835feba3e" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "Uz02cEKAhpAjzwq15YPGfC-69xN-pEWhLqeCmo5-_sgBXBZQYmsP5q2vgFZndpxjb2ENRDuia_-eCPVwna7usZzJI1MuWVpxt5i-o3mzHBrRfP6kLTIdA6YNGnrcYsF0H3hlzzpul2nNGDohT_qW2g.CAWlKZpVorFqCfq1NO3HsSIx0MGPhnl5F59rkiFrlhE" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Location": [ + "https://graph.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47/directoryObjects/b258ecb0-a5c8-4cba-91b5-f72aa3c3b47e/Microsoft.WindowsAzure.ActiveDirectory.Application" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Thu, 25 Sep 2014 22:21:36 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/72f988bf-86f1-41af-91ab-2d7cd011db47/servicePrincipals?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzcyZjk4OGJmLTg2ZjEtNDFhZi05MWFiLTJkN2NkMDExZGI0Ny9zZXJ2aWNlUHJpbmNpcGFscz9hcGktdmVyc2lvbj0xLjQyLXByZXZpZXdJbnRlcm5hbA==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"appId\": \"0a89e309-b6bf-4051-9c89-4b585c3c86b8\",\r\n \"accountEnabled\": true\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "82" + ], + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal\",\r\n \"objectType\": \"ServicePrincipal\",\r\n \"objectId\": \"241d7dfc-9251-4eba-9765-eadc6b25da68\",\r\n \"softDeletionTimestamp\": null,\r\n \"accountEnabled\": true,\r\n \"appDisplayName\": \"adApplication8579\",\r\n \"appId\": \"0a89e309-b6bf-4051-9c89-4b585c3c86b8\",\r\n \"appMetadata\": null,\r\n \"appOwnerTenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"appPermissions\": [],\r\n \"authenticationPolicy\": null,\r\n \"displayName\": \"adApplication8579\",\r\n \"errorUrl\": null,\r\n \"explicitAccessGrantRequired\": false,\r\n \"homepage\": \"http://adApplication8579/home\",\r\n \"keyCredentials\": [],\r\n \"logoutUrl\": null,\r\n \"microsoftFirstParty\": null,\r\n \"passwordCredentials\": [],\r\n \"publisherName\": \"Microsoft\",\r\n \"replyUrls\": [\r\n \"http://adApplication8579/home\"\r\n ],\r\n \"resourceApplicationSet\": null,\r\n \"samlMetadataUrl\": null,\r\n \"servicePrincipalNames\": [\r\n \"0a89e309-b6bf-4051-9c89-4b585c3c86b8\",\r\n \"http://adApplication8579/home\"\r\n ],\r\n \"tags\": [],\r\n \"webApi\": null,\r\n \"webApp\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1068" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "0KG3XJca10JBaCPPVyV6S/TPZvVBRyYmKz0GZKrigX0=" + ], + "request-id": [ + "8eb9b26c-3add-4993-aa20-cacbbaa73c5d" + ], + "client-request-id": [ + "10f5b0bd-cc19-4113-ae66-27a5145e168d" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "Zw3Eysjr8X3rRfjwc8MRV_LkNwigEqp206LNMRvcTQGz5aOh_8BdAJJKqJpuQLfxMf-TL5VA7rqJudQgQ04Hl-hqLCUZWwZYeAKO3k_fcfNG-GRv3TcWNFIdgB8mxCp9vzMBTM83ZoQ6wQltQ1_CQQ.AxfcqMu_CBh3QxtXZ8iDgtI_vzPWVvH4IHNERhQWRH0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Location": [ + "https://graph.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47/directoryObjects/241d7dfc-9251-4eba-9765-eadc6b25da68/Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Thu, 25 Sep 2014 22:21:42 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/72f988bf-86f1-41af-91ab-2d7cd011db47/servicePrincipals/241d7dfc-9251-4eba-9765-eadc6b25da68?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzcyZjk4OGJmLTg2ZjEtNDFhZi05MWFiLTJkN2NkMDExZGI0Ny9zZXJ2aWNlUHJpbmNpcGFscy8yNDFkN2RmYy05MjUxLTRlYmEtOTc2NS1lYWRjNmIyNWRhNjg/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal\",\r\n \"objectType\": \"ServicePrincipal\",\r\n \"objectId\": \"241d7dfc-9251-4eba-9765-eadc6b25da68\",\r\n \"softDeletionTimestamp\": null,\r\n \"accountEnabled\": true,\r\n \"appDisplayName\": \"adApplication8579\",\r\n \"appId\": \"0a89e309-b6bf-4051-9c89-4b585c3c86b8\",\r\n \"appMetadata\": null,\r\n \"appOwnerTenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"appPermissions\": [],\r\n \"authenticationPolicy\": null,\r\n \"displayName\": \"adApplication8579\",\r\n \"errorUrl\": null,\r\n \"explicitAccessGrantRequired\": false,\r\n \"homepage\": \"http://adApplication8579/home\",\r\n \"keyCredentials\": [],\r\n \"logoutUrl\": null,\r\n \"microsoftFirstParty\": null,\r\n \"passwordCredentials\": [],\r\n \"publisherName\": \"Microsoft\",\r\n \"replyUrls\": [\r\n \"http://adApplication8579/home\"\r\n ],\r\n \"resourceApplicationSet\": null,\r\n \"samlMetadataUrl\": null,\r\n \"servicePrincipalNames\": [\r\n \"http://adApplication8579/home\",\r\n \"0a89e309-b6bf-4051-9c89-4b585c3c86b8\"\r\n ],\r\n \"tags\": [],\r\n \"webApi\": null,\r\n \"webApp\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1068" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "0KG3XJca10JBaCPPVyV6S/TPZvVBRyYmKz0GZKrigX0=" + ], + "request-id": [ + "46e3747f-5078-466d-9883-c6481e217155" + ], + "client-request-id": [ + "f82e69dc-d242-4abf-8ec7-90976426c822" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "eQamhbR8JDXdZ_9uUxKdVv2ddcq9cqJfMvvXylfrP4K1OqLjf9i5XvXXQv5GX2WHxf5EAsednZCj92wKIh3u8CdZ2lJn3HNv0F12vupOO39LWlahme9AT4qY1nfDx0KD4Z3l7TqMJlh_F9j_jkhsRg.z7NKc9dteYmxmjc1JqTtELftX1QplpRjk5SO8kYLE9M" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Thu, 25 Sep 2014 22:21:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/72f988bf-86f1-41af-91ab-2d7cd011db47/servicePrincipals/241d7dfc-9251-4eba-9765-eadc6b25da68?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzcyZjk4OGJmLTg2ZjEtNDFhZi05MWFiLTJkN2NkMDExZGI0Ny9zZXJ2aWNlUHJpbmNpcGFscy8yNDFkN2RmYy05MjUxLTRlYmEtOTc2NS1lYWRjNmIyNWRhNjg/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "0KG3XJca10JBaCPPVyV6S/TPZvVBRyYmKz0GZKrigX0=" + ], + "request-id": [ + "eeaa8b6c-941b-4ca7-b8e6-e0accb6d0768" + ], + "client-request-id": [ + "5bcbd90e-edde-4546-ba3a-260583cb23c9" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "uPEXzbBitooUj9ZZfRz5NEBQOdJam8-Bzhn5YzosQQ2ZIEGoE3UVITjQhZicgeXk83U3Jt3IUIsR_VSZ8vnkw5VY0cnfbjF9ScoBqfJV-8qBo-kNqHMkIE_KEO0meyeFW7uj3cJ2xyEU72lCBq9rsw.vZ5cdtqiJP6iU05Z5nrbx6TP9fYqdbPRlh0EZRCiCP4" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "1.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Thu, 25 Sep 2014 22:21:43 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/72f988bf-86f1-41af-91ab-2d7cd011db47/applications/b258ecb0-a5c8-4cba-91b5-f72aa3c3b47e?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzcyZjk4OGJmLTg2ZjEtNDFhZi05MWFiLTJkN2NkMDExZGI0Ny9hcHBsaWNhdGlvbnMvYjI1OGVjYjAtYTVjOC00Y2JhLTkxYjUtZjcyYWEzYzNiNDdlP2FwaS12ZXJzaW9uPTEuNDItcHJldmlld0ludGVybmFs", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "0KG3XJca10JBaCPPVyV6S/TPZvVBRyYmKz0GZKrigX0=" + ], + "request-id": [ + "e345f842-3bbb-4fc5-abb8-218473ca1265" + ], + "client-request-id": [ + "62b46839-d221-4a7a-9c15-e8064ba589f7" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "BEvgSAMyd2NRZ1DHVad5GmOUkB5Sxm6_H0ZaScllfx126Xu0HxVmGVsVKf2T2GDDoW40E0SL28tX-w6RVbUD7OLcYkXi_dtyuDOTewyIyotv0JsKUna8G-h9uoRSXj8cDOwWKpCK-j_EDkCF3cNmxQ.dAWCK1i3IzLrC_sb775k234uwY2316zpVQwGTCaNW-U" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "1.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Thu, 25 Sep 2014 22:21:43 GMT" + ] + }, + "StatusCode": 204 + } + ], + "Names": { + "CreateNewAdApp": [ + "adApplication8579" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "Domain": "microsoft.com" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADServicePrincipalWithSPN.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADServicePrincipalWithSPN.json new file mode 100644 index 000000000000..a33a9a06613d --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADServicePrincipalWithSPN.json @@ -0,0 +1,370 @@ +{ + "Entries": [ + { + "RequestUri": "/72f988bf-86f1-41af-91ab-2d7cd011db47/applications?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzcyZjk4OGJmLTg2ZjEtNDFhZi05MWFiLTJkN2NkMDExZGI0Ny9hcHBsaWNhdGlvbnM/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"availableToOtherTenants\": false,\r\n \"displayName\": \"adApplication2285\",\r\n \"homepage\": \"http://adApplication2285/home\",\r\n \"identifierUris\": [\r\n \"http://adApplication2285/home\"\r\n ],\r\n \"replyUrls\": [\r\n \"http://adApplication2285/home\"\r\n ]\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "254" + ], + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.Application/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.Application\",\r\n \"objectType\": \"Application\",\r\n \"objectId\": \"bc29bb9e-119e-4dc0-bf31-5913095ef1c9\",\r\n \"softDeletionTimestamp\": null,\r\n \"appId\": \"bf7d1887-3474-415f-abc3-e1ea0cc0aea5\",\r\n \"appMetadata\": null,\r\n \"appPermissions\": [],\r\n \"availableToOtherTenants\": false,\r\n \"displayName\": \"adApplication2285\",\r\n \"errorUrl\": null,\r\n \"homepage\": \"http://adApplication2285/home\",\r\n \"identifierUris\": [\r\n \"http://adApplication2285/home\"\r\n ],\r\n \"keyCredentials\": [],\r\n \"knownClientApplications\": [],\r\n \"logoutUrl\": null,\r\n \"passwordCredentials\": [],\r\n \"publicClient\": null,\r\n \"replyUrls\": [\r\n \"http://adApplication2285/home\"\r\n ],\r\n \"requiredResourceAccess\": [],\r\n \"resourceApplicationSet\": null,\r\n \"samlMetadataUrl\": null,\r\n \"webApi\": null,\r\n \"webApp\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "870" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "1Ptot0LG1647jq6Jd5jbCVVlBPXTTRRWQ3OcUhRUILc=" + ], + "request-id": [ + "4af73fba-1a1e-47b9-8236-0e6985d44e9b" + ], + "client-request-id": [ + "f688eba9-2340-4a18-9605-26bb0c83dcb0" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "zSv6VAHvx--RqF-UXZD6yEdOTBK9A5jRvnOkmCIQwx8NzqK-5Qduzk9DY3HUaCLpKr1w-XSPT_875w5sV3eFEOfnlFNI3FzjVB1ycFs-Wx4KPfTTeWpjjI93ngtnDzD-B2wGHwkKvno9u_b6VhmWOQ.4yr0CeheJMyP40k05rGSLIAIkjHpMsVNY6A4uwId7js" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Location": [ + "https://graph.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47/directoryObjects/bc29bb9e-119e-4dc0-bf31-5913095ef1c9/Microsoft.WindowsAzure.ActiveDirectory.Application" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Thu, 25 Sep 2014 22:21:59 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/72f988bf-86f1-41af-91ab-2d7cd011db47/servicePrincipals?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzcyZjk4OGJmLTg2ZjEtNDFhZi05MWFiLTJkN2NkMDExZGI0Ny9zZXJ2aWNlUHJpbmNpcGFscz9hcGktdmVyc2lvbj0xLjQyLXByZXZpZXdJbnRlcm5hbA==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"appId\": \"bf7d1887-3474-415f-abc3-e1ea0cc0aea5\",\r\n \"accountEnabled\": true\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "82" + ], + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal\",\r\n \"objectType\": \"ServicePrincipal\",\r\n \"objectId\": \"11e438eb-6dc1-4e40-b874-104c02ed7049\",\r\n \"softDeletionTimestamp\": null,\r\n \"accountEnabled\": true,\r\n \"appDisplayName\": \"adApplication2285\",\r\n \"appId\": \"bf7d1887-3474-415f-abc3-e1ea0cc0aea5\",\r\n \"appMetadata\": null,\r\n \"appOwnerTenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"appPermissions\": [],\r\n \"authenticationPolicy\": null,\r\n \"displayName\": \"adApplication2285\",\r\n \"errorUrl\": null,\r\n \"explicitAccessGrantRequired\": false,\r\n \"homepage\": \"http://adApplication2285/home\",\r\n \"keyCredentials\": [],\r\n \"logoutUrl\": null,\r\n \"microsoftFirstParty\": null,\r\n \"passwordCredentials\": [],\r\n \"publisherName\": \"Microsoft\",\r\n \"replyUrls\": [\r\n \"http://adApplication2285/home\"\r\n ],\r\n \"resourceApplicationSet\": null,\r\n \"samlMetadataUrl\": null,\r\n \"servicePrincipalNames\": [\r\n \"bf7d1887-3474-415f-abc3-e1ea0cc0aea5\",\r\n \"http://adApplication2285/home\"\r\n ],\r\n \"tags\": [],\r\n \"webApi\": null,\r\n \"webApp\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1068" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "1Ptot0LG1647jq6Jd5jbCVVlBPXTTRRWQ3OcUhRUILc=" + ], + "request-id": [ + "c5987cab-9351-425d-b005-da3eb3b4a3fd" + ], + "client-request-id": [ + "9756f41d-2c46-479e-aaa9-dbae4704c0f3" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "Jt3E3XcyuXilBr0_FNmBfcBW2pWG2QJ_R9aG3c-Fz8Sn7wdclrTcdOc83XBDWK8TgMWvchE8A3UDXSw28aGu9UzOS-banxkHzLzWcyB6GyKfV1RJ9Yhbl4_PpmVzuV9MXLs9Ry_oais_sUefq1LJ4w.c0kpHkgLt0bC4NSSntu7eJ5F8vCOxEr9SekkVOrKmZs" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Location": [ + "https://graph.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47/directoryObjects/11e438eb-6dc1-4e40-b874-104c02ed7049/Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Thu, 25 Sep 2014 22:22:06 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/72f988bf-86f1-41af-91ab-2d7cd011db47/servicePrincipals?$filter=servicePrincipalNames/any(c:c%20eq%20'http:%2F%2FadApplication2285%2Fhome')&api-version=1.42-previewInternal", + "EncodedRequestUri": "LzcyZjk4OGJmLTg2ZjEtNDFhZi05MWFiLTJkN2NkMDExZGI0Ny9zZXJ2aWNlUHJpbmNpcGFscz8kZmlsdGVyPXNlcnZpY2VQcmluY2lwYWxOYW1lcy9hbnkoYzpjJTIwZXElMjAnaHR0cCUzQSUyRiUyRmFkQXBwbGljYXRpb24yMjg1JTJGaG9tZScpJmFwaS12ZXJzaW9uPTEuNDItcHJldmlld0ludGVybmFs", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal\",\r\n \"value\": [\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal\",\r\n \"objectType\": \"ServicePrincipal\",\r\n \"objectId\": \"11e438eb-6dc1-4e40-b874-104c02ed7049\",\r\n \"softDeletionTimestamp\": null,\r\n \"accountEnabled\": true,\r\n \"appDisplayName\": \"adApplication2285\",\r\n \"appId\": \"bf7d1887-3474-415f-abc3-e1ea0cc0aea5\",\r\n \"appMetadata\": null,\r\n \"appOwnerTenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"appPermissions\": [],\r\n \"authenticationPolicy\": null,\r\n \"displayName\": \"adApplication2285\",\r\n \"errorUrl\": null,\r\n \"explicitAccessGrantRequired\": false,\r\n \"homepage\": \"http://adApplication2285/home\",\r\n \"keyCredentials\": [],\r\n \"logoutUrl\": null,\r\n \"microsoftFirstParty\": null,\r\n \"passwordCredentials\": [],\r\n \"publisherName\": \"Microsoft\",\r\n \"replyUrls\": [\r\n \"http://adApplication2285/home\"\r\n ],\r\n \"resourceApplicationSet\": null,\r\n \"samlMetadataUrl\": null,\r\n \"servicePrincipalNames\": [\r\n \"http://adApplication2285/home\",\r\n \"bf7d1887-3474-415f-abc3-e1ea0cc0aea5\"\r\n ],\r\n \"tags\": [],\r\n \"webApi\": null,\r\n \"webApp\": null\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1071" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "1Ptot0LG1647jq6Jd5jbCVVlBPXTTRRWQ3OcUhRUILc=" + ], + "request-id": [ + "0793c74e-9e07-4296-8905-a12dad47beac" + ], + "client-request-id": [ + "da781bb4-0c9e-4573-8e64-629e354d8267" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "wrrxxOZtNaX52DHfW79Nfm3B9g1mcFu1DTKfORpVSyhAnWuQbmQeZPnEaWJqLQ0_D7hLb8_GC2-ykXHn8OudI0iihH-DyObrvc0erecwUqAa7OFzzhcrWigMSoezoSOXJxj_SWF413QWydRJdC_TIw.z_kEbtD-SmRmV3FcbYYq6w9B3Zjq63dp8ksOBpUagqE" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Thu, 25 Sep 2014 22:22:07 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/72f988bf-86f1-41af-91ab-2d7cd011db47/servicePrincipals/11e438eb-6dc1-4e40-b874-104c02ed7049?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzcyZjk4OGJmLTg2ZjEtNDFhZi05MWFiLTJkN2NkMDExZGI0Ny9zZXJ2aWNlUHJpbmNpcGFscy8xMWU0MzhlYi02ZGMxLTRlNDAtYjg3NC0xMDRjMDJlZDcwNDk/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "1Ptot0LG1647jq6Jd5jbCVVlBPXTTRRWQ3OcUhRUILc=" + ], + "request-id": [ + "8108a874-d190-4e2a-b25c-d9ca64fc4050" + ], + "client-request-id": [ + "0dd58216-c02e-431b-b117-a80af423cc5b" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "0Rfv1lM4VtSPW261GeJBa6CU2HcbXtgcU-bS54CRGnJb5AA0u7Ttsz0_AB5ZFbtJdQ428GoDBAxZrVL2QzdEYgt7qG8heRUg63TSvt3ez_IzAwWlZ_PiPzLtQmdM7xiOWNqisZzyw3RWkWu_QapqWg.tv9yAsRtjsSj-H2Fej2tUiwzcGG2nsPmbkN7bl5cfWo" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "1.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Thu, 25 Sep 2014 22:22:07 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/72f988bf-86f1-41af-91ab-2d7cd011db47/applications/bc29bb9e-119e-4dc0-bf31-5913095ef1c9?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzcyZjk4OGJmLTg2ZjEtNDFhZi05MWFiLTJkN2NkMDExZGI0Ny9hcHBsaWNhdGlvbnMvYmMyOWJiOWUtMTE5ZS00ZGMwLWJmMzEtNTkxMzA5NWVmMWM5P2FwaS12ZXJzaW9uPTEuNDItcHJldmlld0ludGVybmFs", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "1Ptot0LG1647jq6Jd5jbCVVlBPXTTRRWQ3OcUhRUILc=" + ], + "request-id": [ + "776da7f3-fbc6-4422-9844-472df3d0d1ad" + ], + "client-request-id": [ + "967945ab-7340-4a58-93f6-6c1b11d71d9f" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "_UZp4kW0Y53NiNIZhrqObD29sIALLlz8A8TWFPCUtysjX28ERG1Gbp8-Z-fBDwmG0--gPYLrYbQDa4SlYS28HJVnkax1WTYctxV6-KnyMQZzusyKQ8T8Xmcg9ltxOHMrRrQuqtpBuTRTtkeel8oqtw.kNZY_wTJqtVLFXgGLVP2sVr_B-Ptn8IWuuSPiQhsD-M" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "1.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Thu, 25 Sep 2014 22:22:07 GMT" + ] + }, + "StatusCode": 204 + } + ], + "Names": { + "CreateNewAdApp": [ + "adApplication2285" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "Domain": "microsoft.com" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADServicePrincipalWithSearchString.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADServicePrincipalWithSearchString.json new file mode 100644 index 000000000000..ed88b93df7aa --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADServicePrincipalWithSearchString.json @@ -0,0 +1,370 @@ +{ + "Entries": [ + { + "RequestUri": "/72f988bf-86f1-41af-91ab-2d7cd011db47/applications?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzcyZjk4OGJmLTg2ZjEtNDFhZi05MWFiLTJkN2NkMDExZGI0Ny9hcHBsaWNhdGlvbnM/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"availableToOtherTenants\": false,\r\n \"displayName\": \"adApplication8739\",\r\n \"homepage\": \"http://adApplication8739/home\",\r\n \"identifierUris\": [\r\n \"http://adApplication8739/home\"\r\n ],\r\n \"replyUrls\": [\r\n \"http://adApplication8739/home\"\r\n ]\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "254" + ], + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.Application/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.Application\",\r\n \"objectType\": \"Application\",\r\n \"objectId\": \"1987af8a-ca98-40b1-a873-0d168b928d77\",\r\n \"softDeletionTimestamp\": null,\r\n \"appId\": \"98344e72-14a0-4a19-8dcb-f6c852f475a2\",\r\n \"appMetadata\": null,\r\n \"appPermissions\": [],\r\n \"availableToOtherTenants\": false,\r\n \"displayName\": \"adApplication8739\",\r\n \"errorUrl\": null,\r\n \"homepage\": \"http://adApplication8739/home\",\r\n \"identifierUris\": [\r\n \"http://adApplication8739/home\"\r\n ],\r\n \"keyCredentials\": [],\r\n \"knownClientApplications\": [],\r\n \"logoutUrl\": null,\r\n \"passwordCredentials\": [],\r\n \"publicClient\": null,\r\n \"replyUrls\": [\r\n \"http://adApplication8739/home\"\r\n ],\r\n \"requiredResourceAccess\": [],\r\n \"resourceApplicationSet\": null,\r\n \"samlMetadataUrl\": null,\r\n \"webApi\": null,\r\n \"webApp\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "870" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "GpZBqv1HpLKoq8DomLBjVg0qidYJApbIcc5XfQ74dc8=" + ], + "request-id": [ + "9be7d2ba-f4fd-430e-be42-d0da98c4c72f" + ], + "client-request-id": [ + "84377dab-588a-4b44-87d8-4aa62abd9c38" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "x6YvHeZa0Y71AupxVXajgKp2QrgnTy6qpuVamcIvHLl-veWFbgFeDy5mRxVWDhJgmU--aRFw4K0lt4u1IBeXM9rmNoODAyGpZ0hrgpmtDrc5OW6vJLxRPseNBXcPD5TA3a0s1648eRCeAPVgLVrBDg.puDZxM-zlen_qYHAEvlL7ZJM4SVnRKzDPTG9Itmw1Qg" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Location": [ + "https://graph.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47/directoryObjects/1987af8a-ca98-40b1-a873-0d168b928d77/Microsoft.WindowsAzure.ActiveDirectory.Application" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Thu, 25 Sep 2014 22:22:21 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/72f988bf-86f1-41af-91ab-2d7cd011db47/servicePrincipals?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzcyZjk4OGJmLTg2ZjEtNDFhZi05MWFiLTJkN2NkMDExZGI0Ny9zZXJ2aWNlUHJpbmNpcGFscz9hcGktdmVyc2lvbj0xLjQyLXByZXZpZXdJbnRlcm5hbA==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"appId\": \"98344e72-14a0-4a19-8dcb-f6c852f475a2\",\r\n \"accountEnabled\": true\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "82" + ], + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal\",\r\n \"objectType\": \"ServicePrincipal\",\r\n \"objectId\": \"86eac091-56ad-4ceb-8ce5-415edc3da17c\",\r\n \"softDeletionTimestamp\": null,\r\n \"accountEnabled\": true,\r\n \"appDisplayName\": \"adApplication8739\",\r\n \"appId\": \"98344e72-14a0-4a19-8dcb-f6c852f475a2\",\r\n \"appMetadata\": null,\r\n \"appOwnerTenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"appPermissions\": [],\r\n \"authenticationPolicy\": null,\r\n \"displayName\": \"adApplication8739\",\r\n \"errorUrl\": null,\r\n \"explicitAccessGrantRequired\": false,\r\n \"homepage\": \"http://adApplication8739/home\",\r\n \"keyCredentials\": [],\r\n \"logoutUrl\": null,\r\n \"microsoftFirstParty\": null,\r\n \"passwordCredentials\": [],\r\n \"publisherName\": \"Microsoft\",\r\n \"replyUrls\": [\r\n \"http://adApplication8739/home\"\r\n ],\r\n \"resourceApplicationSet\": null,\r\n \"samlMetadataUrl\": null,\r\n \"servicePrincipalNames\": [\r\n \"98344e72-14a0-4a19-8dcb-f6c852f475a2\",\r\n \"http://adApplication8739/home\"\r\n ],\r\n \"tags\": [],\r\n \"webApi\": null,\r\n \"webApp\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1068" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "GpZBqv1HpLKoq8DomLBjVg0qidYJApbIcc5XfQ74dc8=" + ], + "request-id": [ + "4d85de82-5106-4824-af95-9cc971354f83" + ], + "client-request-id": [ + "6c4efbdf-f922-4f4f-8e7b-054c9b05eb3f" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "hAbFm4ES-5bkGCno5D744i2U0Y-R-ounJzCo7TdDU01T-wxpLYsFlSAqMoYMDWgEDffngBlvYZdxCe1ZBzh_GHjLigViKdJEvoN3kQOJRAIqIG21RFxGP2IH_bn24YacEu9yFkZBe6Lzzl_mxP-qNQ.g1zoZG-AjQrMnBWDnzyiHVDHmtLCd6rFrGWYvHNM7DI" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Location": [ + "https://graph.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47/directoryObjects/86eac091-56ad-4ceb-8ce5-415edc3da17c/Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Thu, 25 Sep 2014 22:22:28 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/72f988bf-86f1-41af-91ab-2d7cd011db47/servicePrincipals?$filter=startswith(displayName,'adApplication8739')&api-version=1.42-previewInternal", + "EncodedRequestUri": "LzcyZjk4OGJmLTg2ZjEtNDFhZi05MWFiLTJkN2NkMDExZGI0Ny9zZXJ2aWNlUHJpbmNpcGFscz8kZmlsdGVyPXN0YXJ0c3dpdGgoZGlzcGxheU5hbWUsJ2FkQXBwbGljYXRpb244NzM5JykmYXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal\",\r\n \"value\": [\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal\",\r\n \"objectType\": \"ServicePrincipal\",\r\n \"objectId\": \"86eac091-56ad-4ceb-8ce5-415edc3da17c\",\r\n \"softDeletionTimestamp\": null,\r\n \"accountEnabled\": true,\r\n \"appDisplayName\": \"adApplication8739\",\r\n \"appId\": \"98344e72-14a0-4a19-8dcb-f6c852f475a2\",\r\n \"appMetadata\": null,\r\n \"appOwnerTenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"appPermissions\": [],\r\n \"authenticationPolicy\": null,\r\n \"displayName\": \"adApplication8739\",\r\n \"errorUrl\": null,\r\n \"explicitAccessGrantRequired\": false,\r\n \"homepage\": \"http://adApplication8739/home\",\r\n \"keyCredentials\": [],\r\n \"logoutUrl\": null,\r\n \"microsoftFirstParty\": null,\r\n \"passwordCredentials\": [],\r\n \"publisherName\": \"Microsoft\",\r\n \"replyUrls\": [\r\n \"http://adApplication8739/home\"\r\n ],\r\n \"resourceApplicationSet\": null,\r\n \"samlMetadataUrl\": null,\r\n \"servicePrincipalNames\": [\r\n \"http://adApplication8739/home\",\r\n \"98344e72-14a0-4a19-8dcb-f6c852f475a2\"\r\n ],\r\n \"tags\": [],\r\n \"webApi\": null,\r\n \"webApp\": null\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1071" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "GpZBqv1HpLKoq8DomLBjVg0qidYJApbIcc5XfQ74dc8=" + ], + "request-id": [ + "94987f17-93de-47e3-8bbc-12fa9bcd4406" + ], + "client-request-id": [ + "54cd6b83-e4bb-460e-86c1-a6bd85f39d18" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "50ffI1aYpyw0zuweEuXqo9WBAHPQfixYxPYA1KOoZV6rezGaQaTRtNBDKWVNyba6jiYAHveQyyJ0UbfiP2VVlvV0nV5P40Ykxh6YT-2Dv6pIsvXzZMLMBqoj6xjtT5gLut27DTyB3ivD0BqgwscVBw.r-0waTJkqMf00LPaAA8khV5gJMDwXel-yNiOBn0S-VQ" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Thu, 25 Sep 2014 22:22:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/72f988bf-86f1-41af-91ab-2d7cd011db47/servicePrincipals/86eac091-56ad-4ceb-8ce5-415edc3da17c?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzcyZjk4OGJmLTg2ZjEtNDFhZi05MWFiLTJkN2NkMDExZGI0Ny9zZXJ2aWNlUHJpbmNpcGFscy84NmVhYzA5MS01NmFkLTRjZWItOGNlNS00MTVlZGMzZGExN2M/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "GpZBqv1HpLKoq8DomLBjVg0qidYJApbIcc5XfQ74dc8=" + ], + "request-id": [ + "fa9edd9a-3b28-49ac-a797-0d6b9a1ca7be" + ], + "client-request-id": [ + "a8264755-e0d4-4d51-83c7-c34ef33cb0be" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "A-E-sj0hvS-ayyc2rbj71d_E3T4kLgcxLExgLGNVhIkaNSuy83B8Er910hUw_LnlM3_dQb6jsJrdG7XqzrU14enBZXwAzeaXQZoV6cMKHMqluXGuZOzkpAGu89cg-4SyDO3tXWsvQ2nwuJ1SqbZ_vw.LwQhpw5zPV2h_QWFiRPvQVLZB-rxphc8QV2_e9ALKWo" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "1.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Thu, 25 Sep 2014 22:22:28 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/72f988bf-86f1-41af-91ab-2d7cd011db47/applications/1987af8a-ca98-40b1-a873-0d168b928d77?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzcyZjk4OGJmLTg2ZjEtNDFhZi05MWFiLTJkN2NkMDExZGI0Ny9hcHBsaWNhdGlvbnMvMTk4N2FmOGEtY2E5OC00MGIxLWE4NzMtMGQxNjhiOTI4ZDc3P2FwaS12ZXJzaW9uPTEuNDItcHJldmlld0ludGVybmFs", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "GpZBqv1HpLKoq8DomLBjVg0qidYJApbIcc5XfQ74dc8=" + ], + "request-id": [ + "a285c00d-d73a-478b-aba2-fad96c34ee6d" + ], + "client-request-id": [ + "90206c6c-1d88-495d-95fb-6b12bf27b3f1" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "2dB7tI9Xfgqgub9YtFHGx_EkggtqMi0MD1cfMpSsK7Ne2Vcz5VF7uIBzP41mUDMlh3e9jY28Ab_Vz8dZMA6FbjEoRV7X642JNT5V2dwWQzPLISUu5_tIAq9rS00Ll5qvIBoFrdGbYm3HFXIjEM5NCQ.jDvUblxaPK3CJX8Wug_aEr7aR-fSFMnCb9xRMWK5v7k" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "1.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Thu, 25 Sep 2014 22:22:28 GMT" + ] + }, + "StatusCode": 204 + } + ], + "Names": { + "CreateNewAdApp": [ + "adApplication8739" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "Domain": "microsoft.com" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADServicePrincipalWithUserObjectId.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADServicePrincipalWithUserObjectId.json new file mode 100644 index 000000000000..17a1726433dd --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADServicePrincipalWithUserObjectId.json @@ -0,0 +1,192 @@ +{ + "Entries": [ + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycz9hcGktdmVyc2lvbj0xLjQyLXByZXZpZXdJbnRlcm5hbA==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"userPrincipalName\": \"aduser8731@rbactest.onmicrosoft.com\",\r\n \"accountEnabled\": true,\r\n \"displayName\": \"aduser8731\",\r\n \"mailNickname\": \"aduser8731test\",\r\n \"passwordProfile\": {\r\n \"password\": \"adpass13760#$\",\r\n \"forceChangePasswordNextLogin\": false\r\n }\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.User/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"b624e656-4cd4-41ce-b681-a0d044a12dd8\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"aduser8731\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": null,\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"aduser8731test\",\r\n \"mobile\": null,\r\n \"netId\": \"100300008BD416D9\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": null,\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"aduser8731@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": null,\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"aduser8731@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "OijwP55bzFPNFU61dGL7reXxvBErwXnDlELDsunJBUw=" + ], + "request-id": [ + "b37961bf-5e08-45b0-99b2-e94b7cdc9593" + ], + "client-request-id": [ + "4270cfdc-96e6-4cb0-b212-5eb6d3421eec" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "0aF5D81t1SYuTKHRoZXTBtbP_1Q7pbidDmC4t4DAXP_J0Q-QM8NQizhA8OO-vLixukZBj3iUrDvyZBZukzMLVzpaTefMqi1Ag1mcxcSgRVZ1wiJNR6RFmmcBCShNpnwl1lcUnlwOMA-GsmyyXewDkQ.7xDEsyFX4WgbtAAx-Dk_pMmf_UEBzQUhxnYaqhcDVDc" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Location": [ + "https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/directoryObjects/b624e656-4cd4-41ce-b681-a0d044a12dd8/Microsoft.WindowsAzure.ActiveDirectory.User" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:31:39 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/servicePrincipals/b624e656-4cd4-41ce-b681-a0d044a12dd8?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9zZXJ2aWNlUHJpbmNpcGFscy9iNjI0ZTY1Ni00Y2Q0LTQxY2UtYjY4MS1hMGQwNDRhMTJkZDg/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.error\": {\r\n \"code\": \"Request_ResourceNotFound\",\r\n \"message\": {\r\n \"lang\": \"en\",\r\n \"value\": \"Resource 'b624e656-4cd4-41ce-b681-a0d044a12dd8' does not exist or one of its queried reference-property objects are not present.\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "ocp-aad-diagnostics-server-name": [ + "OijwP55bzFPNFU61dGL7reXxvBErwXnDlELDsunJBUw=" + ], + "request-id": [ + "3f271e75-b1de-4afd-a45b-63fc31544cb7" + ], + "client-request-id": [ + "6177f1ad-aedf-43a9-b493-314555890aaf" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "SJgwHgaVh3YVboL3cNLcBMVwLLhu6SdwyjeJFJTKnwVYgf06XgklFh8z40ShMXhVzusdYo1fnzT8MThOCzzOhsVgMwgJyGF8ybM7vnppG_jFpj67a8zie-ZWWbefuGxqU6JeUEW2mQvOOyXFDmssHA.w_z3be7PHYc0SIXHkehNqpRqfRD93HNU2YtUW79zbsw" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "private" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:31:39 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/b624e656-4cd4-41ce-b681-a0d044a12dd8?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy9iNjI0ZTY1Ni00Y2Q0LTQxY2UtYjY4MS1hMGQwNDRhMTJkZDg/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "OijwP55bzFPNFU61dGL7reXxvBErwXnDlELDsunJBUw=" + ], + "request-id": [ + "0722840f-b864-46f5-9939-6ec6dda21168" + ], + "client-request-id": [ + "33e944d4-7a29-48c0-9557-014514bb81f4" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "1--RN6ruycssv9sbA4o7nPIiXVL0WOx8bF6JuEvkoOQOWLROrX-msmvXMjwbAzEV8s2PLSM4-HRK_zJqoThFhq9pzdhUTRUJrhhnAEm4BQ4-aScPOW6XfKjHmAF8WoLaiv5KFd1wHz8-mJcVRPTUKg.4BZd6iYvWviPh4eb6N1DEc-f1yp7-oef_bQVlFosHLM" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "1.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:31:40 GMT" + ] + }, + "StatusCode": 204 + } + ], + "Names": { + "CreateNewAdUser": [ + "aduser8731", + "adpass1376" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "1449d5b7-8a83-47db-ae4c-9b03e888bad0", + "Domain": "rbactest.onmicrosoft.com" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADUserWithBadObjectId.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADUserWithBadObjectId.json new file mode 100644 index 000000000000..2872b0ea8f88 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADUserWithBadObjectId.json @@ -0,0 +1,61 @@ +{ + "Entries": [ + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/deadbeef-dead-beef-dead-beefdeadbeef?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy9kZWFkYmVlZi1kZWFkLWJlZWYtZGVhZC1iZWVmZGVhZGJlZWY/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.error\": {\r\n \"code\": \"Request_ResourceNotFound\",\r\n \"message\": {\r\n \"lang\": \"en\",\r\n \"value\": \"Resource 'deadbeef-dead-beef-dead-beefdeadbeef' does not exist or one of its queried reference-property objects are not present.\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "ocp-aad-diagnostics-server-name": [ + "4JBXES2oJSo7EFxoGUZySbVZz5f0jRgg9xWilhxiOOk=" + ], + "request-id": [ + "30043711-1a46-4472-958e-492295a37ce2" + ], + "client-request-id": [ + "a3c5d621-995d-4df7-9d81-acceb8f6776b" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "n6cm_BxePNEZE5rrVazgMmHIivZb_AAUbC_JSaXkSGSmM-pB8-L7kgCji6V77Rqe6auPEFtQpJ44LS6Q1mQjEGyg9YPWcHQNbgg4DhSZpWQ.hnvJMcGdt47s_LUaPyitXSWNjc5DabhuNOLo95-KRBI" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "private" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Tue, 16 Sep 2014 00:32:39 GMT" + ] + }, + "StatusCode": 404 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "1449d5b7-8a83-47db-ae4c-9b03e888bad0" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADUserWithBadSearchString.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADUserWithBadSearchString.json new file mode 100644 index 000000000000..857798181dba --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADUserWithBadSearchString.json @@ -0,0 +1,70 @@ +{ + "Entries": [ + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users?&$filter=startswith(displayName,'badsearchstring')&api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycz8mJGZpbHRlcj1zdGFydHN3aXRoKGRpc3BsYXlOYW1lLCdiYWRzZWFyY2hzdHJpbmcnKSZhcGktdmVyc2lvbj0xLjQyLXByZXZpZXdJbnRlcm5hbA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "HRG+aiSn0E9z3GzhPJ46HhJjFcqCria5fvIemYT7auo=" + ], + "request-id": [ + "f4d5ab0c-aa38-4614-a0d5-5ea7443ee486" + ], + "client-request-id": [ + "fbc09dcc-e547-4580-bc41-c1b531872906" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "QwM3wJkgE7zAxh5owRQDdQa5OX69utF-dawGGYg2XHab3IeuY7CszrX3fgdy4RZR_xoHxAVRkBF9QPEwhWGfwPLEmG5bgSIBUKLMSi3Fu7A.OHd8Qz1Ojslwm_UPh9pswN0jN3Nj3SNolqHSZaK3NF8" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Tue, 16 Sep 2014 00:32:04 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "1449d5b7-8a83-47db-ae4c-9b03e888bad0" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADUserWithBadUPN.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADUserWithBadUPN.json new file mode 100644 index 000000000000..788fa4f73285 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADUserWithBadUPN.json @@ -0,0 +1,61 @@ +{ + "Entries": [ + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/baduser@rbactest.onmicrosoft.com?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy9iYWR1c2VyQHJiYWN0ZXN0Lm9ubWljcm9zb2Z0LmNvbT9hcGktdmVyc2lvbj0xLjQyLXByZXZpZXdJbnRlcm5hbA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.error\": {\r\n \"code\": \"Request_ResourceNotFound\",\r\n \"message\": {\r\n \"lang\": \"en\",\r\n \"value\": \"Resource 'baduser@rbactest.onmicrosoft.com' does not exist or one of its queried reference-property objects are not present.\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "ocp-aad-diagnostics-server-name": [ + "HRG+aiSn0E9z3GzhPJ46HhJjFcqCria5fvIemYT7auo=" + ], + "request-id": [ + "a07eb1b0-89ac-4413-85d4-899b0da8e689" + ], + "client-request-id": [ + "b603be85-7f11-4b73-84c8-435511e831d5" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "1tUxM_e5jlIdG1aoC1P0xt1XAZ39GMSMFwNAPOVMqbGhC8hjwNwKE4ANsonEeBUx9yi53ciyM2coY37Qc8UKOkKc8oPizr2HT1u-LQhaoNo.Q2mKjl2BYoQGIiHOt5oaorr_HuIk0eIEngwoihMUT9I" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "private" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Tue, 16 Sep 2014 00:31:46 GMT" + ] + }, + "StatusCode": 404 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "1449d5b7-8a83-47db-ae4c-9b03e888bad0" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADUserWithFPOUPN.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADUserWithFPOUPN.json new file mode 100644 index 000000000000..3854e6942d17 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADUserWithFPOUPN.json @@ -0,0 +1,49 @@ +{ + "Entries": [ + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/azsdkposhteam_outlook.com", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy9henNka3Bvc2h0ZWFtX291dGxvb2suY29t", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.error\": {\r\n \"code\": \"Request_DataContractVersionMissing\",\r\n \"message\": {\r\n \"lang\": \"en\",\r\n \"value\": \"The specified api-version is invalid. The value must exactly match a supported version.\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "ocp-aad-diagnostics-server-name": [ + "TeRcHeoqA22BHcRGBKky0IV4jTQ6ab7yWgt9gZFyqCs=" + ], + "request-id": [ + "9b850efb-1789-4581-b78d-2c6096a97823" + ], + "client-request-id": [ + "2df56c9d-2a3a-4c9b-8cae-b87eade6b69d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "private" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Tue, 16 Sep 2014 00:41:43 GMT" + ] + }, + "StatusCode": 400 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "1449d5b7-8a83-47db-ae4c-9b03e888bad0" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADUserWithGroupObjectId.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADUserWithGroupObjectId.json new file mode 100644 index 000000000000..7fcbe08d0772 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADUserWithGroupObjectId.json @@ -0,0 +1,192 @@ +{ + "Entries": [ + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/groups?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9ncm91cHM/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"displayName\": \"adgroup8383\",\r\n \"mailEnabled\": false,\r\n \"mailNickname\": \"adgroupmail1240\",\r\n \"securityEnabled\": true\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.Group/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.Group\",\r\n \"objectType\": \"Group\",\r\n \"objectId\": \"69971398-1374-44d3-8d32-d8ef9e165808\",\r\n \"softDeletionTimestamp\": null,\r\n \"appMetadata\": null,\r\n \"exchangeResources\": [],\r\n \"description\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"adgroup8383\",\r\n \"groupType\": null,\r\n \"isPublic\": null,\r\n \"lastDirSyncTime\": null,\r\n \"licenseAssignment\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"adgroupmail1240\",\r\n \"mailEnabled\": false,\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"securityEnabled\": true,\r\n \"sharepointResources\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "v3yGAWrccus9FzuzL9cLf8vSbclXQ3anB0vIyjf36ac=" + ], + "request-id": [ + "da489c2f-ae7f-4580-9c5d-a64d3a752d39" + ], + "client-request-id": [ + "ebb87429-e116-4011-81b9-a071e189afd9" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "D7TeJDsCrIOs7rYaYGPYKcrBwBnj5G7CiX5IM1t9MhOhdT_Ka8osg-XjyIADXouPACk43aEerqMkgSM-YBXirxj3aX3RzLvE7SSsOeBi7_exgGVheZcjmtts0fEBh_CTzx-e507kJUQs_mRoQGnPSQ.K4fYNBsv54PH-bs4lwNfQ7Rsecmg23FkolyhDRZeZ18" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Location": [ + "https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/directoryObjects/69971398-1374-44d3-8d32-d8ef9e165808/Microsoft.WindowsAzure.ActiveDirectory.Group" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:27:47 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/69971398-1374-44d3-8d32-d8ef9e165808?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy82OTk3MTM5OC0xMzc0LTQ0ZDMtOGQzMi1kOGVmOWUxNjU4MDg/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.error\": {\r\n \"code\": \"Request_ResourceNotFound\",\r\n \"message\": {\r\n \"lang\": \"en\",\r\n \"value\": \"Resource '69971398-1374-44d3-8d32-d8ef9e165808' does not exist or one of its queried reference-property objects are not present.\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "ocp-aad-diagnostics-server-name": [ + "v3yGAWrccus9FzuzL9cLf8vSbclXQ3anB0vIyjf36ac=" + ], + "request-id": [ + "050c6a97-0f25-4451-9d0e-2f9dbca2d033" + ], + "client-request-id": [ + "729009e7-d34e-4d65-a235-3e2b71a8f6c6" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "Pckl2ZZnVkmb12yKrQh4fyXIJW8fRWjP21BN6t_eTXMN1ynGuywAN4nYME_vaXrR4342jZfvzP4yYgzs50fZUObc05x2F3VsMszARLHYJ2pjHa9zGZ9EaMczY7-tCqnzENgemidq1FX2z-Ogok5F6w.-orsvs9FgMS_wZ9IieQXsj4qee-bJu-lMZ7zsR7wWRM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "private" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:27:48 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/groups/69971398-1374-44d3-8d32-d8ef9e165808?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9ncm91cHMvNjk5NzEzOTgtMTM3NC00NGQzLThkMzItZDhlZjllMTY1ODA4P2FwaS12ZXJzaW9uPTEuNDItcHJldmlld0ludGVybmFs", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "v3yGAWrccus9FzuzL9cLf8vSbclXQ3anB0vIyjf36ac=" + ], + "request-id": [ + "94ab1abe-63f0-4104-94cd-733a0bdc2c5a" + ], + "client-request-id": [ + "7e8f31e9-0d75-4e41-9bf4-1b3479ad4ee3" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "UJZ29TnX5ML2J6qK6_vT_oywzaAe6Usz-zrOi8zTuD5GPf6WO2kd1vTx8oYph8FqGhVNhMbdMGXiM5nhluLHjOKAGgqBQPy3lfPzwAJhaWIlMaCEypV4Awu9UqZz9FkXhhE84dLvpigm4e-bTvobuA.zkWjkPElsgzyjezA6KvPtkvCThBTK37d7E67ejEjUI0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "1.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:27:49 GMT" + ] + }, + "StatusCode": 204 + } + ], + "Names": { + "CreateNewAdGroup": [ + "adgroup8383", + "adgroupmail1240" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "1449d5b7-8a83-47db-ae4c-9b03e888bad0", + "Domain": "rbactest.onmicrosoft.com" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADUserWithObjectId.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADUserWithObjectId.json new file mode 100644 index 000000000000..f84d4de400f5 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADUserWithObjectId.json @@ -0,0 +1,201 @@ +{ + "Entries": [ + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycz9hcGktdmVyc2lvbj0xLjQyLXByZXZpZXdJbnRlcm5hbA==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"userPrincipalName\": \"aduser9002@rbactest.onmicrosoft.com\",\r\n \"accountEnabled\": true,\r\n \"displayName\": \"aduser9002\",\r\n \"mailNickname\": \"aduser9002test\",\r\n \"passwordProfile\": {\r\n \"password\": \"adpass46690#$\",\r\n \"forceChangePasswordNextLogin\": false\r\n }\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.User/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"6baab4d3-a157-4119-b8f4-d9b2c481ee0e\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"aduser9002\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": null,\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"aduser9002test\",\r\n \"mobile\": null,\r\n \"netId\": \"100300008BD4168E\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": null,\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"aduser9002@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": null,\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"aduser9002@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "OijwP55bzFPNFU61dGL7reXxvBErwXnDlELDsunJBUw=" + ], + "request-id": [ + "4961cff0-2818-45c9-bf23-494ec94fe0fd" + ], + "client-request-id": [ + "458d240d-0880-45f5-98a6-d3f529823262" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "rvNOZP1VCExI-3C2G8A26TnUKAqmwZCypuuvUagHWd_xOFZnPe88IuuNcz3w94rERG36J34PMckylXhX8cS57Efy-YzdBAW1FurUAP6ZRC1RIKlEOjrZ8TcSbt47e3LSo0iL7MP2NZbNhyXqKR2_LQ.v3Eo0-Z5LkzE9qT-nAJXsOt5OS1o50m74gUnle7gZUA" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Location": [ + "https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/directoryObjects/6baab4d3-a157-4119-b8f4-d9b2c481ee0e/Microsoft.WindowsAzure.ActiveDirectory.User" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:31:18 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/6baab4d3-a157-4119-b8f4-d9b2c481ee0e?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy82YmFhYjRkMy1hMTU3LTQxMTktYjhmNC1kOWIyYzQ4MWVlMGU/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.User/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"6baab4d3-a157-4119-b8f4-d9b2c481ee0e\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"aduser9002\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": null,\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"aduser9002test\",\r\n \"mobile\": null,\r\n \"netId\": \"100300008BD4168E\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": null,\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"aduser9002@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": null,\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"aduser9002@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "OijwP55bzFPNFU61dGL7reXxvBErwXnDlELDsunJBUw=" + ], + "request-id": [ + "f19228c0-5e40-408d-bce9-e7307242f044" + ], + "client-request-id": [ + "9e554f15-c8be-4cba-862c-f09c8c8758f4" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "khA_ixKi0yBdSWiZpcGZuZLgDG3h1zLeiJnwMnlTiDtQiMqwkoZHKR5teizrqq0SkKdHMSr6U__1e0Ai2KCiU3aQyH0pMzlYotpbJBG-5dr-WkJ6MH3itW3ZExwNVEj1t_HazssVhDEg8c6GJMQXuA.wob3WvpnWeFwzy-S4r3E1F_iwJm0-ZwxQXhRzJZ3uQI" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:31:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/6baab4d3-a157-4119-b8f4-d9b2c481ee0e?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy82YmFhYjRkMy1hMTU3LTQxMTktYjhmNC1kOWIyYzQ4MWVlMGU/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "OijwP55bzFPNFU61dGL7reXxvBErwXnDlELDsunJBUw=" + ], + "request-id": [ + "b6a64ef0-b8f8-4ce5-90b2-82003965509b" + ], + "client-request-id": [ + "e4d74d11-b5d9-4c2a-b829-c0cf3d026e23" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "9MFyOhO7m0dNijqO2TEUKwnihDAaB7S2lbr6PNoPLpbbie2NHYxbrj-_jlVjANAxH_FiQxZFhbJwUGsoyd6VSNicBdKW4tc40KBHGQQq2TsACfpfi2r2UwE3cxr1w93QCJbXTBuBXDeiCPljIttYsQ.HFndWnjoNOPFjNsQQq7nTpxNueRBhxSVsZMDWQBTfqs" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "1.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:31:19 GMT" + ] + }, + "StatusCode": 204 + } + ], + "Names": { + "CreateNewAdUser": [ + "aduser9002", + "adpass4669" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "1449d5b7-8a83-47db-ae4c-9b03e888bad0", + "Domain": "rbactest.onmicrosoft.com" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADUserWithSearchString.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADUserWithSearchString.json new file mode 100644 index 000000000000..916a0ffd70b5 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADUserWithSearchString.json @@ -0,0 +1,201 @@ +{ + "Entries": [ + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycz9hcGktdmVyc2lvbj0xLjQyLXByZXZpZXdJbnRlcm5hbA==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"userPrincipalName\": \"aduser7065@rbactest.onmicrosoft.com\",\r\n \"accountEnabled\": true,\r\n \"displayName\": \"aduser7065\",\r\n \"mailNickname\": \"aduser7065test\",\r\n \"passwordProfile\": {\r\n \"password\": \"adpass23550#$\",\r\n \"forceChangePasswordNextLogin\": false\r\n }\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.User/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"e253bc25-fbe6-4d8a-888b-f828d4b37e60\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"aduser7065\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": null,\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"aduser7065test\",\r\n \"mobile\": null,\r\n \"netId\": \"10033FFF8BCF0657\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": null,\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"aduser7065@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": null,\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"aduser7065@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "MsH+7bNxSLKcmuX3JqvzScisCtZwuMTpgstB41T1Viw=" + ], + "request-id": [ + "067e8699-af54-4dd5-b275-eb7cd6d5c12d" + ], + "client-request-id": [ + "e2e5ec8c-8778-4553-a65d-0b5ae439b7a0" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "Ua4Epva-Z0idIMmMgoK9d04E4vmYG-PkKKg4U3mkAY5XcSaeSgpEfIKoTzg5tO96i-qfhEoMsG63AX-3MLfDH-YI5rUU-JHM8SW8fh1WUCuPppxcgypiwkWw7yGwyGG46LKufSv6SgVDccnNZgnb0A.pW54EchnrgZZmzBhExKwAM3ykZD4jKrqEEGyldYsg44" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Location": [ + "https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/directoryObjects/e253bc25-fbe6-4d8a-888b-f828d4b37e60/Microsoft.WindowsAzure.ActiveDirectory.User" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:32:02 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users?&$filter=startswith(displayName,'aduser7065')&api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycz8mJGZpbHRlcj1zdGFydHN3aXRoKGRpc3BsYXlOYW1lLCdhZHVzZXI3MDY1JykmYXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"value\": [\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"e253bc25-fbe6-4d8a-888b-f828d4b37e60\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"aduser7065\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": null,\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"aduser7065test\",\r\n \"mobile\": null,\r\n \"netId\": \"10033FFF8BCF0657\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": null,\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"aduser7065@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": null,\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"aduser7065@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "MsH+7bNxSLKcmuX3JqvzScisCtZwuMTpgstB41T1Viw=" + ], + "request-id": [ + "2fd0029b-a1c5-4ec8-a7b5-2280d453702f" + ], + "client-request-id": [ + "2d76e151-5c0d-4073-835c-2e528d0cff1a" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "fLHEx66JJRGOJmV3x4OYf7Knu13i5QFkdKV9B1XZFAo9VE1YwOI9VVjuCVQxzCSdmxKxoZS3WTwuyy_As0cajpvt4Yd0q4nlO38pX_64qSu25sjXhm-VbnkAAAWmZzDTvIJa1S_DS3-QryrSlrfPmQ.9yERlgnkW2cWGBDbPfh2xi7cUsRYJmubXQIDhVp5kSU" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:32:02 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/e253bc25-fbe6-4d8a-888b-f828d4b37e60?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy9lMjUzYmMyNS1mYmU2LTRkOGEtODg4Yi1mODI4ZDRiMzdlNjA/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "MsH+7bNxSLKcmuX3JqvzScisCtZwuMTpgstB41T1Viw=" + ], + "request-id": [ + "78389e2c-ecb8-4a7b-aeef-5217f1d888a1" + ], + "client-request-id": [ + "ed798624-4de3-4d8b-acfe-b7654a835929" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "pXrw9oczVcFljV01GU5YwycJynLc-4StPbW7C_JjqS6eS6C5m1TYScsgYCxuhEX10DizrVvKeTFnYquP4DmySqs2c8RatYNW2WguhmPpBSzstTGSRxdzY6j6PKe37gVxi2mJQoTReLBBMmzs_otMFQ.FF8t94IftJ9HB2IYSbPPSIVSI75-jd7mM7YMSfrW97Q" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "1.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:32:03 GMT" + ] + }, + "StatusCode": 204 + } + ], + "Names": { + "CreateNewAdUser": [ + "aduser7065", + "adpass2355" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "1449d5b7-8a83-47db-ae4c-9b03e888bad0", + "Domain": "rbactest.onmicrosoft.com" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADUserWithUPN.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADUserWithUPN.json new file mode 100644 index 000000000000..1fce9312c452 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetADUserWithUPN.json @@ -0,0 +1,201 @@ +{ + "Entries": [ + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycz9hcGktdmVyc2lvbj0xLjQyLXByZXZpZXdJbnRlcm5hbA==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"userPrincipalName\": \"aduser8219@rbactest.onmicrosoft.com\",\r\n \"accountEnabled\": true,\r\n \"displayName\": \"aduser8219\",\r\n \"mailNickname\": \"aduser8219test\",\r\n \"passwordProfile\": {\r\n \"password\": \"adpass36950#$\",\r\n \"forceChangePasswordNextLogin\": false\r\n }\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.User/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"58fde812-dd19-488a-87cd-68bf5273fcad\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"aduser8219\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": null,\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"aduser8219test\",\r\n \"mobile\": null,\r\n \"netId\": \"100300008BD416E1\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": null,\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"aduser8219@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": null,\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"aduser8219@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "OijwP55bzFPNFU61dGL7reXxvBErwXnDlELDsunJBUw=" + ], + "request-id": [ + "b285edbb-bd7f-4915-8753-45d31b397082" + ], + "client-request-id": [ + "540522a4-dd60-4af2-b955-807be511ea47" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "CZNStMCsMTIwgsC4UvxA_Yt3hklXp_J0gx-ibZU_sT9q_MNKN4VSAWKrAP2eZR8llqTHjd24zZRIwWk214RXP99Aalk97lnFc-buKy1fHCrKYbSTdyF7ai6AYd0mhiFppRH7NxO3hOTLA5WsulVdDw.s_qEWwEJ5BhOS2lsciGOwyrT9AvJ4nYbkz4tOodG1Es" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Location": [ + "https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/directoryObjects/58fde812-dd19-488a-87cd-68bf5273fcad/Microsoft.WindowsAzure.ActiveDirectory.User" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:32:10 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/aduser8219@rbactest.onmicrosoft.com?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy9hZHVzZXI4MjE5QHJiYWN0ZXN0Lm9ubWljcm9zb2Z0LmNvbT9hcGktdmVyc2lvbj0xLjQyLXByZXZpZXdJbnRlcm5hbA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.User/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"58fde812-dd19-488a-87cd-68bf5273fcad\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"aduser8219\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": null,\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"aduser8219test\",\r\n \"mobile\": null,\r\n \"netId\": \"100300008BD416E1\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": null,\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"aduser8219@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": null,\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"aduser8219@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "OijwP55bzFPNFU61dGL7reXxvBErwXnDlELDsunJBUw=" + ], + "request-id": [ + "dc7eeba7-05df-47d0-8aee-966b77dc184f" + ], + "client-request-id": [ + "fc966d36-9af6-4127-8508-efaf91c7095f" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "d8KTsghFHeHLY2zFVU0VGHopBtlyMf6hdkdDLeFNLhStzbGsOXek7pGjiIYHP5ugPPFbtIxaGNSiy6N8_Ioz06m7vgLt_oPLKcqqcAr0BzqWM6acaMXFAgP805Chr0qBefzGqcUqyYkpcDx7tR-Ucg.VOsOWwCpXPVe4ZIAFzhoQZALmuOYeDYqhbwdOan4dwQ" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:32:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/58fde812-dd19-488a-87cd-68bf5273fcad?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy81OGZkZTgxMi1kZDE5LTQ4OGEtODdjZC02OGJmNTI3M2ZjYWQ/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "OijwP55bzFPNFU61dGL7reXxvBErwXnDlELDsunJBUw=" + ], + "request-id": [ + "b560fa5c-fcef-4661-8b53-07577352a6b2" + ], + "client-request-id": [ + "57c6c16f-fdf8-4a57-8cf7-908c9c6ef11f" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "DY1t_FXH_ErpBRCLuEo64goE-QiE8CA6ApCTfnkVIdJ2A5shvj-Xm0jeWKe_nBe1-Ov4c3EWvN-bl4iLdf_Jk92AV7dTWr6wijov5BPPpPcdIQmK_cjvYFSOZanLpoewCo5m5QFwSEkxDYSxAmg45Q.aQryWDUn8w-YPqb3qiEUn6m2uxuMNihSvQCx7j5wcDs" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "1.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:32:10 GMT" + ] + }, + "StatusCode": 204 + } + ], + "Names": { + "CreateNewAdUser": [ + "aduser8219", + "adpass3695" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "1449d5b7-8a83-47db-ae4c-9b03e888bad0", + "Domain": "rbactest.onmicrosoft.com" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetAllADGroups.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetAllADGroups.json new file mode 100644 index 000000000000..eb574a3e3cdc --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetAllADGroups.json @@ -0,0 +1,201 @@ +{ + "Entries": [ + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/groups?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9ncm91cHM/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"displayName\": \"adgroup8266\",\r\n \"mailEnabled\": false,\r\n \"mailNickname\": \"adgroupmail196\",\r\n \"securityEnabled\": true\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.Group/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.Group\",\r\n \"objectType\": \"Group\",\r\n \"objectId\": \"5a2bae3d-6c6c-4f04-9f15-9b73738499f1\",\r\n \"softDeletionTimestamp\": null,\r\n \"appMetadata\": null,\r\n \"exchangeResources\": [],\r\n \"description\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"adgroup8266\",\r\n \"groupType\": null,\r\n \"isPublic\": null,\r\n \"lastDirSyncTime\": null,\r\n \"licenseAssignment\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"adgroupmail196\",\r\n \"mailEnabled\": false,\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"securityEnabled\": true,\r\n \"sharepointResources\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "v3yGAWrccus9FzuzL9cLf8vSbclXQ3anB0vIyjf36ac=" + ], + "request-id": [ + "c954482c-f68d-4140-82bd-5b0131d67aa6" + ], + "client-request-id": [ + "8123163f-a590-4dc9-92e1-1f8039a2f52b" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "5iAWZebsZ0jQXgybB5g55ao4vwW0shOihhRAicwE3NRnSQwNyxn_-WiLWyPTCX47mfqAk3l7LbgN4hhEu7iozT9QnYB3yHEPN2iG2rzON3wuYCoRctkv18dB3XpyGRgeDnt0dCnYjbE-lorFfF-qnA.Z5qZXHjS46XDEqka8Znyi8Jdi9SFoOAnR4mJ2Np-VLU" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Location": [ + "https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/directoryObjects/5a2bae3d-6c6c-4f04-9f15-9b73738499f1/Microsoft.WindowsAzure.ActiveDirectory.Group" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:32:52 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/groups?&api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9ncm91cHM/JmFwaS12ZXJzaW9uPTEuNDItcHJldmlld0ludGVybmFs", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.Group\",\r\n \"value\": [\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.Group\",\r\n \"objectType\": \"Group\",\r\n \"objectId\": \"1ddba6df-e959-456b-8f02-50252ece007f\",\r\n \"softDeletionTimestamp\": null,\r\n \"appMetadata\": null,\r\n \"exchangeResources\": [],\r\n \"description\": \"group of admins\",\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"admingroup\",\r\n \"groupType\": null,\r\n \"isPublic\": null,\r\n \"lastDirSyncTime\": null,\r\n \"licenseAssignment\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"481689dd-0a1c-44d0-a848-a02e7d591a3a\",\r\n \"mailEnabled\": false,\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"securityEnabled\": true,\r\n \"sharepointResources\": []\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.Group\",\r\n \"objectType\": \"Group\",\r\n \"objectId\": \"2823a770-d3f7-4e84-8e5d-2542d5b08e13\",\r\n \"softDeletionTimestamp\": null,\r\n \"appMetadata\": null,\r\n \"exchangeResources\": [],\r\n \"description\": \"hello2\",\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"hello\",\r\n \"groupType\": null,\r\n \"isPublic\": null,\r\n \"lastDirSyncTime\": null,\r\n \"licenseAssignment\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"de93d080-c9de-4120-bf7d-cdb78cb3f655\",\r\n \"mailEnabled\": false,\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"securityEnabled\": true,\r\n \"sharepointResources\": []\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.Group\",\r\n \"objectType\": \"Group\",\r\n \"objectId\": \"2ff5c0e4-40cf-48b6-be7e-174615c4956d\",\r\n \"softDeletionTimestamp\": null,\r\n \"appMetadata\": null,\r\n \"exchangeResources\": [],\r\n \"description\": \"2nd group of readers\",\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"readergroup2\",\r\n \"groupType\": null,\r\n \"isPublic\": null,\r\n \"lastDirSyncTime\": null,\r\n \"licenseAssignment\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"46f915be-2f40-4908-8c6b-9a0232567640\",\r\n \"mailEnabled\": false,\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"securityEnabled\": true,\r\n \"sharepointResources\": []\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.Group\",\r\n \"objectType\": \"Group\",\r\n \"objectId\": \"5a2bae3d-6c6c-4f04-9f15-9b73738499f1\",\r\n \"softDeletionTimestamp\": null,\r\n \"appMetadata\": null,\r\n \"exchangeResources\": [],\r\n \"description\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"adgroup8266\",\r\n \"groupType\": null,\r\n \"isPublic\": null,\r\n \"lastDirSyncTime\": null,\r\n \"licenseAssignment\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"adgroupmail196\",\r\n \"mailEnabled\": false,\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"securityEnabled\": true,\r\n \"sharepointResources\": []\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.Group\",\r\n \"objectType\": \"Group\",\r\n \"objectId\": \"8fd46a09-454e-41f1-b70f-f28331b12a31\",\r\n \"softDeletionTimestamp\": null,\r\n \"appMetadata\": null,\r\n \"exchangeResources\": [],\r\n \"description\": \"an empty group\",\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"emptygroup\",\r\n \"groupType\": null,\r\n \"isPublic\": null,\r\n \"lastDirSyncTime\": null,\r\n \"licenseAssignment\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"9764488b-bdf2-4169-8045-916fc8083f3d\",\r\n \"mailEnabled\": false,\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"securityEnabled\": true,\r\n \"sharepointResources\": []\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.Group\",\r\n \"objectType\": \"Group\",\r\n \"objectId\": \"d5fbb343-cf1d-47bb-9aa8-5c3dd57b336f\",\r\n \"softDeletionTimestamp\": null,\r\n \"appMetadata\": null,\r\n \"exchangeResources\": [],\r\n \"description\": \"group of owners\",\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"ownergroup\",\r\n \"groupType\": null,\r\n \"isPublic\": null,\r\n \"lastDirSyncTime\": null,\r\n \"licenseAssignment\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"d9dc3124-a996-44d6-9049-3f379194fd1c\",\r\n \"mailEnabled\": false,\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"securityEnabled\": true,\r\n \"sharepointResources\": []\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.Group\",\r\n \"objectType\": \"Group\",\r\n \"objectId\": \"fb7d9586-9377-43c8-95c0-22f1f067915f\",\r\n \"softDeletionTimestamp\": null,\r\n \"appMetadata\": null,\r\n \"exchangeResources\": [],\r\n \"description\": \"group of readers\",\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"readergroup\",\r\n \"groupType\": null,\r\n \"isPublic\": null,\r\n \"lastDirSyncTime\": null,\r\n \"licenseAssignment\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"c7a16934-b86a-43a2-8d96-7c6a8949b206\",\r\n \"mailEnabled\": false,\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"securityEnabled\": true,\r\n \"sharepointResources\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "v3yGAWrccus9FzuzL9cLf8vSbclXQ3anB0vIyjf36ac=" + ], + "request-id": [ + "79f9b532-048d-4165-bd56-2a1f495f126e" + ], + "client-request-id": [ + "f5deacf9-68f7-439c-8aba-c9f9432a2a6f" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "2ycJD01u63mOuC77PdetEOlnLGc2ixY4mzN4uqLAzPSOBhiIF6-3sNFNQsG_G_T4UUFRtnzieGUtjenz4ogmQrvq0rR_-uAdaDRdbdgoIY5oMXl0xyjXmDK3EwxWCVl1kOQTnGsBcmSXemR44Tds_w.oQOlinED2Ybr6DpvjGP3HLLBOazoh9q-fB-8keGnWyU" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:32:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/groups/5a2bae3d-6c6c-4f04-9f15-9b73738499f1?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9ncm91cHMvNWEyYmFlM2QtNmM2Yy00ZjA0LTlmMTUtOWI3MzczODQ5OWYxP2FwaS12ZXJzaW9uPTEuNDItcHJldmlld0ludGVybmFs", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "v3yGAWrccus9FzuzL9cLf8vSbclXQ3anB0vIyjf36ac=" + ], + "request-id": [ + "7b13b39f-419e-4618-8e7c-cb78f64aeb32" + ], + "client-request-id": [ + "9b51ea1c-bc59-49c6-81a4-aa029af996b1" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "Q3WvL7dC7o0OAQhFu3mg_fhnT4GosoT6OU5MVt6HV6mKt2_zB2GBp9x3kue-yODbIhWOb82OA1oo__dSs8A01KZ_Q92i9YKPO8lc0YmXBW-y-5GRm11_5yc8Y7XrTBQgxJ3SW3_yJYzkVS0cNYicpw.qz00rZY0PqWkdHevowIqMdEN5ONbVMs2LbBy6OM8X74" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "1.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:32:53 GMT" + ] + }, + "StatusCode": 204 + } + ], + "Names": { + "CreateNewAdGroup": [ + "adgroup8266", + "adgroupmail196" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "1449d5b7-8a83-47db-ae4c-9b03e888bad0", + "Domain": "rbactest.onmicrosoft.com" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetAllADUser.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetAllADUser.json new file mode 100644 index 000000000000..eefc166a39c0 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ActiveDirectoryTests/TestGetAllADUser.json @@ -0,0 +1,201 @@ +{ + "Entries": [ + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycz9hcGktdmVyc2lvbj0xLjQyLXByZXZpZXdJbnRlcm5hbA==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"userPrincipalName\": \"aduser3142@rbactest.onmicrosoft.com\",\r\n \"accountEnabled\": true,\r\n \"displayName\": \"aduser3142\",\r\n \"mailNickname\": \"aduser3142test\",\r\n \"passwordProfile\": {\r\n \"password\": \"adpass38910#$\",\r\n \"forceChangePasswordNextLogin\": false\r\n }\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.User/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"073f97d2-5e29-488e-85ec-9658b598f7f9\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"aduser3142\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": null,\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"aduser3142test\",\r\n \"mobile\": null,\r\n \"netId\": \"100300008BD416B1\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": null,\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"aduser3142@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": null,\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"aduser3142@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "OijwP55bzFPNFU61dGL7reXxvBErwXnDlELDsunJBUw=" + ], + "request-id": [ + "bfc942b2-861c-4fd9-a54f-977766883ef2" + ], + "client-request-id": [ + "5679f3b7-2d43-4bb5-8f3d-d0a051f2a2a5" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "hctrL4w9KHCrH853inS4l7AJq6jo0Fk8jICgsWsLyQplS6WiNMPP5GPa2Fysx3v27v7jqHhucta3Af-q0GDH0Sh1ShWlabjmXQcQewLf5tJckzekQbZyM-WFKbkr1XjYA9z0a9gs_HQLGYn0sWxBwA.-fYE71sbALJaoknUR1YH6xPjNQH1uKwO4En9x5nwAM4" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Location": [ + "https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/directoryObjects/073f97d2-5e29-488e-85ec-9658b598f7f9/Microsoft.WindowsAzure.ActiveDirectory.User" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:31:27 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users?&api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycz8mYXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"value\": [\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"a73a146e-93ad-43bf-8590-2f43343656b5\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Global Administrator for RBAC Testing\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Global\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"admin\",\r\n \"mobile\": null,\r\n \"netId\": \"1003BFFD8B9977C6\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [\r\n \"markcowl@microsoft.com\"\r\n ],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"admin@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"Admin\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"admin@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"073f97d2-5e29-488e-85ec-9658b598f7f9\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"aduser3142\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": null,\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"aduser3142test\",\r\n \"mobile\": null,\r\n \"netId\": \"100300008BD416B1\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": null,\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"aduser3142@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": null,\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"aduser3142@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"7148b59c-070d-470e-b6b0-d00007d11b83\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"aduser3894\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": null,\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"aduser3894test\",\r\n \"mobile\": null,\r\n \"netId\": \"100300008BD002D8\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": null,\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"aduser3894@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": null,\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"aduser3894@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"f6b529cb-97da-4126-b925-16fecac9679f\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [\r\n {\r\n \"type\": 5,\r\n \"identityProvider\": null,\r\n \"key\": \"EAM//4ueL3M=\"\r\n }\r\n ],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Alternative Owner\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Alternative\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"alt-owner_azsdkposhteamoutlook.onmicrosoft.com#EXT#\",\r\n \"mobile\": null,\r\n \"netId\": \"100300008BA3AFD4\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [\r\n \"alt-owner@azsdkposhteamoutlook.onmicrosoft.com\"\r\n ],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"alt-owner@azsdkposhteamoutlook.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"Owner\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"alt-owner_azsdkposhteamoutlook.onmicrosoft.com#EXT#@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"17488b60-ea0b-4960-b24f-a6cbd499cf8f\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [\r\n {\r\n \"type\": 1,\r\n \"identityProvider\": null,\r\n \"key\": \"AAO//cP46cM=\"\r\n }\r\n ],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"LiveIdUser\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Test\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"auxtm596_live.com#EXT#\",\r\n \"mobile\": null,\r\n \"netId\": \"10033FFF8BBB8658\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [\r\n \"auxtm596@live.com\"\r\n ],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"auxtm596@live.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"User\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"auxtm596_live.com#EXT#@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"da03a14a-f92e-4d70-b5c7-b0dad6324b04\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [\r\n {\r\n \"type\": 1,\r\n \"identityProvider\": null,\r\n \"key\": \"AAN//tE+u3M=\"\r\n }\r\n ],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Mark Cowlishaw\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Mark\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"azsdkposhteam_outlook.com#EXT#\",\r\n \"mobile\": null,\r\n \"netId\": \"100300008B9B411F\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [\r\n \"azsdkposhteam@outlook.com\"\r\n ],\r\n \"passwordPolicies\": null,\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"azsdkposhteam@outlook.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"Cowlishaw\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"azsdkposhteam_outlook.com#EXT#@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"bac2a76b-6dc2-4343-be12-4af6dff38cac\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [\r\n {\r\n \"type\": 1,\r\n \"identityProvider\": null,\r\n \"key\": \"AAMAAIngDtI=\"\r\n }\r\n ],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Marky mark\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Mark\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"markcowl_live.com#EXT#\",\r\n \"mobile\": null,\r\n \"netId\": \"1003BFFD8BA27081\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [\r\n \"markcowl@live.com\"\r\n ],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"markcowl@live.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"Cowlishaw\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"markcowl_live.com#EXT#@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"7b45838f-42c3-4fef-a85a-0a9051dfda41\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Owner1\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Owner\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"owner1\",\r\n \"mobile\": null,\r\n \"netId\": \"10033FFF8B95D83D\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"owner1@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"One\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"owner1@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"576b6988-ffa9-4096-a98f-c2151f8ddab1\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Owner2\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Owner\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"owner2\",\r\n \"mobile\": null,\r\n \"netId\": \"1003BFFD8B998B5C\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"owner2@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"Two\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"owner2@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"4f8bcdeb-e36d-4fcd-9e21-c5c76dd38a74\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Reader1\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Reader\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"reader1\",\r\n \"mobile\": null,\r\n \"netId\": \"1003BFFD8B99874F\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"reader1@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"One\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"reader1@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"fcb281e3-9b38-4868-abec-2c640743cfa9\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Reader2\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Reader\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"reader2\",\r\n \"mobile\": null,\r\n \"netId\": \"10033FFF8B95D58F\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"reader2@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"Two\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"reader2@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"546880c8-4956-4527-a17f-6671332ef66a\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"webadmin1\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Web\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"webadmin1\",\r\n \"mobile\": null,\r\n \"netId\": \"10033FFF8B95D9C3\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"webadmin1@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"AdminOne\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"webadmin1@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"5509dd91-9239-4de9-877c-985984f9284e\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"webadmin2\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Web\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"webadmin2\",\r\n \"mobile\": null,\r\n \"netId\": \"1003BFFD8B998CA0\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"webadmin2@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"AdminTwo\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"webadmin2@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "OijwP55bzFPNFU61dGL7reXxvBErwXnDlELDsunJBUw=" + ], + "request-id": [ + "ab39b433-002e-4561-99ec-b7a9756096dd" + ], + "client-request-id": [ + "f4db3035-5052-4f55-b395-ebaff94493b8" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "75a1nM0cvppiT2hqeXYi7_x5Dr6WkjCEf4l9g9JMzfBE6tMYLECIzNKKZeSpBbS4UeOyN0oHEtkBUjqegvJ5o1m6v53_FcjZ86TzDXrTVbeL3uGOMEa6kgtf2_ntRiMRsJwMoKqzIEGM87LzBc-5Kw.Jxoa-gCb8wNkplZ1CbZK9rjo9qObPfJpk3x0VBaFPUE" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:31:27 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/073f97d2-5e29-488e-85ec-9658b598f7f9?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy8wNzNmOTdkMi01ZTI5LTQ4OGUtODVlYy05NjU4YjU5OGY3Zjk/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "OijwP55bzFPNFU61dGL7reXxvBErwXnDlELDsunJBUw=" + ], + "request-id": [ + "e1695ac4-3d88-4c48-8799-835bd57e901d" + ], + "client-request-id": [ + "0fe4281e-63f6-42d7-be44-857391ebde16" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "uIlugGICxIHzObzUXoNH_5tGiaPAzH-JYxEK6lTGoIrygJbs4tnxtmDrIysDS9jth4i1ZBwHSiCSN-56i4G1nPvq2txNWH6hvFoJYAmH1pKTxbBc5YhnIOSZXaCYjovFZsM7nownaJW0XBVOXQDzmg.y9907T-G_uZyjIxCFGGfRAe4VSEtLHfQx-7Qy814h0Y" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "1.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 24 Sep 2014 21:31:27 GMT" + ] + }, + "StatusCode": 204 + } + ], + "Names": { + "CreateNewAdUser": [ + "aduser3142", + "adpass3891" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "1449d5b7-8a83-47db-ae4c-9b03e888bad0", + "Domain": "rbactest.onmicrosoft.com" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceGroupTests/TestAzureTagsEndToEnd.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceGroupTests/TestAzureTagsEndToEnd.json new file mode 100644 index 000000000000..455b5db9d596 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceGroupTests/TestAzureTagsEndToEnd.json @@ -0,0 +1,1453 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/\",\r\n \"tagName\": \"hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/tagValues/Resource\",\r\n \"tagValue\": \"Resource\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/ogail/\",\r\n \"tagName\": \"ogail\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n },\r\n \"values\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31999" + ], + "x-ms-request-id": [ + "cdf6fabd-b994-4069-abdc-bd7b0af2d4fc" + ], + "x-ms-correlation-request-id": [ + "cdf6fabd-b994-4069-abdc-bd7b0af2d4fc" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231435Z:cdf6fabd-b994-4069-abdc-bd7b0af2d4fc" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/\",\r\n \"tagName\": \"hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/tagValues/Resource\",\r\n \"tagValue\": \"Resource\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/ogail/\",\r\n \"tagName\": \"ogail\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n },\r\n \"values\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31999" + ], + "x-ms-request-id": [ + "e0e248d9-730e-4eba-b0e5-8636bba5afc4" + ], + "x-ms-correlation-request-id": [ + "e0e248d9-730e-4eba-b0e5-8636bba5afc4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231435Z:e0e248d9-730e-4eba-b0e5-8636bba5afc4" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/\",\r\n \"tagName\": \"hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/tagValues/Resource\",\r\n \"tagValue\": \"Resource\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/\",\r\n \"tagName\": \"onesdk5995\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n },\r\n \"values\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31999" + ], + "x-ms-request-id": [ + "591bc82c-4f8b-4579-9e60-2efb3a8fcf2a" + ], + "x-ms-correlation-request-id": [ + "591bc82c-4f8b-4579-9e60-2efb3a8fcf2a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231437Z:591bc82c-4f8b-4579-9e60-2efb3a8fcf2a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:36 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/\",\r\n \"tagName\": \"hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/tagValues/Resource\",\r\n \"tagValue\": \"Resource\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/\",\r\n \"tagName\": \"onesdk5995\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n },\r\n \"values\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31998" + ], + "x-ms-request-id": [ + "e604cbe6-ed85-4f0b-9b37-241550042696" + ], + "x-ms-correlation-request-id": [ + "e604cbe6-ed85-4f0b-9b37-241550042696" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231437Z:e604cbe6-ed85-4f0b-9b37-241550042696" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:37 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/\",\r\n \"tagName\": \"hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/tagValues/Resource\",\r\n \"tagValue\": \"Resource\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/\",\r\n \"tagName\": \"onesdk5995\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/tagValues/value1\",\r\n \"tagValue\": \"value1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31998" + ], + "x-ms-request-id": [ + "aa556ed1-2289-498b-ad7a-9fa8d13c20f1" + ], + "x-ms-correlation-request-id": [ + "aa556ed1-2289-498b-ad7a-9fa8d13c20f1" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231438Z:aa556ed1-2289-498b-ad7a-9fa8d13c20f1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:38 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/\",\r\n \"tagName\": \"hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/tagValues/Resource\",\r\n \"tagValue\": \"Resource\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/\",\r\n \"tagName\": \"onesdk5995\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/tagValues/value1\",\r\n \"tagValue\": \"value1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31999" + ], + "x-ms-request-id": [ + "f56eb6cf-921b-4283-8534-e8e7be74d62f" + ], + "x-ms-correlation-request-id": [ + "f56eb6cf-921b-4283-8534-e8e7be74d62f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231439Z:f56eb6cf-921b-4283-8534-e8e7be74d62f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/\",\r\n \"tagName\": \"hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/tagValues/Resource\",\r\n \"tagValue\": \"Resource\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/\",\r\n \"tagName\": \"onesdk5995\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/tagValues/value1\",\r\n \"tagValue\": \"value1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/tagValues/value2\",\r\n \"tagValue\": \"value2\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31998" + ], + "x-ms-request-id": [ + "2b9eb912-b113-4d2b-b724-a878ef5bcc32" + ], + "x-ms-correlation-request-id": [ + "2b9eb912-b113-4d2b-b724-a878ef5bcc32" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231440Z:2b9eb912-b113-4d2b-b724-a878ef5bcc32" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:40 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/\",\r\n \"tagName\": \"hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/tagValues/Resource\",\r\n \"tagValue\": \"Resource\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/\",\r\n \"tagName\": \"onesdk5995\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/tagValues/value1\",\r\n \"tagValue\": \"value1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/tagValues/value2\",\r\n \"tagValue\": \"value2\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31997" + ], + "x-ms-request-id": [ + "7ae2ec60-f175-437a-adcd-576a5692b438" + ], + "x-ms-correlation-request-id": [ + "7ae2ec60-f175-437a-adcd-576a5692b438" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231440Z:7ae2ec60-f175-437a-adcd-576a5692b438" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:40 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/\",\r\n \"tagName\": \"hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/tagValues/Resource\",\r\n \"tagValue\": \"Resource\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/\",\r\n \"tagName\": \"onesdk4847\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/tagValues/value1\",\r\n \"tagValue\": \"value1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/\",\r\n \"tagName\": \"onesdk5995\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/tagValues/value1\",\r\n \"tagValue\": \"value1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/tagValues/value2\",\r\n \"tagValue\": \"value2\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31997" + ], + "x-ms-request-id": [ + "8494b532-7075-4f37-a10e-bc0706f111f2" + ], + "x-ms-correlation-request-id": [ + "8494b532-7075-4f37-a10e-bc0706f111f2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231441Z:8494b532-7075-4f37-a10e-bc0706f111f2" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/\",\r\n \"tagName\": \"hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/tagValues/Resource\",\r\n \"tagValue\": \"Resource\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/\",\r\n \"tagName\": \"onesdk4847\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/tagValues/value1\",\r\n \"tagValue\": \"value1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/tagValues/value2\",\r\n \"tagValue\": \"value2\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/\",\r\n \"tagName\": \"onesdk5995\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/tagValues/value1\",\r\n \"tagValue\": \"value1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/tagValues/value2\",\r\n \"tagValue\": \"value2\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31998" + ], + "x-ms-request-id": [ + "f1b6fdab-b128-4cac-8b6e-5b29b891a5b1" + ], + "x-ms-correlation-request-id": [ + "f1b6fdab-b128-4cac-8b6e-5b29b891a5b1" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231442Z:f1b6fdab-b128-4cac-8b6e-5b29b891a5b1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/\",\r\n \"tagName\": \"hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/tagValues/Resource\",\r\n \"tagValue\": \"Resource\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/\",\r\n \"tagName\": \"onesdk4847\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/tagValues/value1\",\r\n \"tagValue\": \"value1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/tagValues/value2\",\r\n \"tagValue\": \"value2\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/tagValues/value3\",\r\n \"tagValue\": \"value3\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/\",\r\n \"tagName\": \"onesdk5995\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/tagValues/value1\",\r\n \"tagValue\": \"value1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/tagValues/value2\",\r\n \"tagValue\": \"value2\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31997" + ], + "x-ms-request-id": [ + "09e3fab7-8a9c-4139-8b59-e3e1aaaa57f7" + ], + "x-ms-correlation-request-id": [ + "09e3fab7-8a9c-4139-8b59-e3e1aaaa57f7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231443Z:09e3fab7-8a9c-4139-8b59-e3e1aaaa57f7" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/\",\r\n \"tagName\": \"hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/tagValues/Resource\",\r\n \"tagValue\": \"Resource\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/\",\r\n \"tagName\": \"onesdk4847\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/tagValues/value1\",\r\n \"tagValue\": \"value1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/tagValues/value2\",\r\n \"tagValue\": \"value2\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/tagValues/value3\",\r\n \"tagValue\": \"value3\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/\",\r\n \"tagName\": \"onesdk5995\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/tagValues/value1\",\r\n \"tagValue\": \"value1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/tagValues/value2\",\r\n \"tagValue\": \"value2\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31996" + ], + "x-ms-request-id": [ + "c531dfa6-1cb7-418a-a423-aa89b12cd988" + ], + "x-ms-correlation-request-id": [ + "c531dfa6-1cb7-418a-a423-aa89b12cd988" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231443Z:c531dfa6-1cb7-418a-a423-aa89b12cd988" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/\",\r\n \"tagName\": \"hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/tagValues/Resource\",\r\n \"tagValue\": \"Resource\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/\",\r\n \"tagName\": \"onesdk4847\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/tagValues/value1\",\r\n \"tagValue\": \"value1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/tagValues/value2\",\r\n \"tagValue\": \"value2\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/tagValues/value3\",\r\n \"tagValue\": \"value3\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/\",\r\n \"tagName\": \"onesdk5995\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/tagValues/value1\",\r\n \"tagValue\": \"value1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/tagValues/value2\",\r\n \"tagValue\": \"value2\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31996" + ], + "x-ms-request-id": [ + "b200555a-11ff-4b56-ba1c-a8222139f2ec" + ], + "x-ms-correlation-request-id": [ + "b200555a-11ff-4b56-ba1c-a8222139f2ec" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231443Z:b200555a-11ff-4b56-ba1c-a8222139f2ec" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/\",\r\n \"tagName\": \"hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/tagValues/Resource\",\r\n \"tagValue\": \"Resource\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/\",\r\n \"tagName\": \"onesdk4847\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/tagValues/value1\",\r\n \"tagValue\": \"value1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/tagValues/value2\",\r\n \"tagValue\": \"value2\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/tagValues/value3\",\r\n \"tagValue\": \"value3\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31996" + ], + "x-ms-request-id": [ + "78e36e41-c04d-412e-9a1d-f55e2fac129d" + ], + "x-ms-correlation-request-id": [ + "78e36e41-c04d-412e-9a1d-f55e2fac129d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231445Z:78e36e41-c04d-412e-9a1d-f55e2fac129d" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/\",\r\n \"tagName\": \"hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/tagValues/Resource\",\r\n \"tagValue\": \"Resource\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/\",\r\n \"tagName\": \"onesdk4847\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/tagValues/value2\",\r\n \"tagValue\": \"value2\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/tagValues/value3\",\r\n \"tagValue\": \"value3\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31997" + ], + "x-ms-request-id": [ + "4bdd5634-7062-41e6-875e-18da4ac6aaa0" + ], + "x-ms-correlation-request-id": [ + "4bdd5634-7062-41e6-875e-18da4ac6aaa0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231445Z:4bdd5634-7062-41e6-875e-18da4ac6aaa0" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/\",\r\n \"tagName\": \"hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/tagValues/Resource\",\r\n \"tagValue\": \"Resource\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/\",\r\n \"tagName\": \"onesdk4847\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/tagValues/value2\",\r\n \"tagValue\": \"value2\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/tagValues/value3\",\r\n \"tagValue\": \"value3\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31995" + ], + "x-ms-request-id": [ + "da20e1e1-5f48-41ff-bf3e-91af02c6dea0" + ], + "x-ms-correlation-request-id": [ + "da20e1e1-5f48-41ff-bf3e-91af02c6dea0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231445Z:da20e1e1-5f48-41ff-bf3e-91af02c6dea0" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/\",\r\n \"tagName\": \"hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/tagValues/Resource\",\r\n \"tagValue\": \"Resource\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/\",\r\n \"tagName\": \"onesdk4847\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/tagValues/value2\",\r\n \"tagValue\": \"value2\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/tagValues/value3\",\r\n \"tagValue\": \"value3\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31995" + ], + "x-ms-request-id": [ + "10490562-c5ed-48a7-8360-e35ead231f71" + ], + "x-ms-correlation-request-id": [ + "10490562-c5ed-48a7-8360-e35ead231f71" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231446Z:10490562-c5ed-48a7-8360-e35ead231f71" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/\",\r\n \"tagName\": \"hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/tagValues/Resource\",\r\n \"tagValue\": \"Resource\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/\",\r\n \"tagName\": \"onesdk4847\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/tagValues/value2\",\r\n \"tagValue\": \"value2\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/tagValues/value3\",\r\n \"tagValue\": \"value3\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31996" + ], + "x-ms-request-id": [ + "2d34fe41-d736-45f7-b847-988cb6a16e51" + ], + "x-ms-correlation-request-id": [ + "2d34fe41-d736-45f7-b847-988cb6a16e51" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231446Z:2d34fe41-d736-45f7-b847-988cb6a16e51" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/\",\r\n \"tagName\": \"hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/hidden-related:/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/resourcegroups/xDeploymentTestGroup6557/providers/Microsoft.Web/serverfarms/xDeploymentTestHost1/tagValues/Resource\",\r\n \"tagValue\": \"Resource\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 1\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/\",\r\n \"tagName\": \"onesdk4847\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n },\r\n \"values\": [\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/tagValues/value2\",\r\n \"tagValue\": \"value2\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/tagValues/value3\",\r\n \"tagValue\": \"value3\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31994" + ], + "x-ms-request-id": [ + "322f27df-8396-460d-88d8-a9978c370b83" + ], + "x-ms-correlation-request-id": [ + "322f27df-8396-460d-88d8-a9978c370b83" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231446Z:322f27df-8396-460d-88d8-a9978c370b83" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/ogail?api-version=2014-04-01-preview", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "1e8068b8-c440-4caf-96d0-d020b0fbea37" + ], + "x-ms-correlation-request-id": [ + "1e8068b8-c440-4caf-96d0-d020b0fbea37" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231436Z:1e8068b8-c440-4caf-96d0-d020b0fbea37" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995?api-version=2014-04-01-preview", + "RequestMethod": "PUT", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/\",\r\n \"tagName\": \"onesdk5995\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n },\r\n \"values\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "1729d9a9-a355-4548-9a06-3084f146c279" + ], + "x-ms-correlation-request-id": [ + "1729d9a9-a355-4548-9a06-3084f146c279" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231437Z:1729d9a9-a355-4548-9a06-3084f146c279" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:36 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995?api-version=2014-04-01-preview", + "RequestMethod": "PUT", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/\",\r\n \"tagName\": \"onesdk5995\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n },\r\n \"values\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-request-id": [ + "b99c4aa3-88bb-481e-8d68-7b971603dfb5" + ], + "x-ms-correlation-request-id": [ + "b99c4aa3-88bb-481e-8d68-7b971603dfb5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231437Z:b99c4aa3-88bb-481e-8d68-7b971603dfb5" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:37 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995?api-version=2014-04-01-preview", + "RequestMethod": "PUT", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/\",\r\n \"tagName\": \"onesdk5995\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n },\r\n \"values\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "a53614b5-93da-4165-9df3-ac21d79d72b4" + ], + "x-ms-correlation-request-id": [ + "a53614b5-93da-4165-9df3-ac21d79d72b4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231439Z:a53614b5-93da-4165-9df3-ac21d79d72b4" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995?api-version=2014-04-01-preview", + "RequestMethod": "PUT", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/\",\r\n \"tagName\": \"onesdk5995\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n },\r\n \"values\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "e2c42738-babe-4c01-9c68-79a992e8eca2" + ], + "x-ms-correlation-request-id": [ + "e2c42738-babe-4c01-9c68-79a992e8eca2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231439Z:e2c42738-babe-4c01-9c68-79a992e8eca2" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:38 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/tagValues/value1?api-version=2014-04-01-preview", + "RequestMethod": "PUT", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/tagValues/value1\",\r\n \"tagValue\": \"value1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-request-id": [ + "e2dcc950-c986-45e4-956a-7561a0883b62" + ], + "x-ms-correlation-request-id": [ + "e2dcc950-c986-45e4-956a-7561a0883b62" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231438Z:e2dcc950-c986-45e4-956a-7561a0883b62" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:38 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/tagValues/value1?api-version=2014-04-01-preview", + "RequestMethod": "PUT", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/tagValues/value1\",\r\n \"tagValue\": \"value1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-request-id": [ + "7c36f257-54f8-41a9-8ac5-622bab21bc94" + ], + "x-ms-correlation-request-id": [ + "7c36f257-54f8-41a9-8ac5-622bab21bc94" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231439Z:7c36f257-54f8-41a9-8ac5-622bab21bc94" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/tagValues/value2?api-version=2014-04-01-preview", + "RequestMethod": "PUT", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/tagValues/value2\",\r\n \"tagValue\": \"value2\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-request-id": [ + "8f889beb-2139-49f7-abe0-5715f360356e" + ], + "x-ms-correlation-request-id": [ + "8f889beb-2139-49f7-abe0-5715f360356e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231440Z:8f889beb-2139-49f7-abe0-5715f360356e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:40 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847?api-version=2014-04-01-preview", + "RequestMethod": "PUT", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/\",\r\n \"tagName\": \"onesdk4847\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n },\r\n \"values\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-request-id": [ + "48016c60-3fff-477f-ab23-564070ed1ecb" + ], + "x-ms-correlation-request-id": [ + "48016c60-3fff-477f-ab23-564070ed1ecb" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231441Z:48016c60-3fff-477f-ab23-564070ed1ecb" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:41 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847?api-version=2014-04-01-preview", + "RequestMethod": "PUT", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/\",\r\n \"tagName\": \"onesdk4847\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n },\r\n \"values\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-request-id": [ + "522cae71-b9ce-4012-a33f-03fc7188c7e8" + ], + "x-ms-correlation-request-id": [ + "522cae71-b9ce-4012-a33f-03fc7188c7e8" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231442Z:522cae71-b9ce-4012-a33f-03fc7188c7e8" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847?api-version=2014-04-01-preview", + "RequestMethod": "PUT", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/\",\r\n \"tagName\": \"onesdk4847\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n },\r\n \"values\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-request-id": [ + "e8d357f7-97e4-4d59-8142-c02116996225" + ], + "x-ms-correlation-request-id": [ + "e8d357f7-97e4-4d59-8142-c02116996225" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231442Z:e8d357f7-97e4-4d59-8142-c02116996225" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/tagValues/value1?api-version=2014-04-01-preview", + "RequestMethod": "PUT", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/tagValues/value1\",\r\n \"tagValue\": \"value1\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-request-id": [ + "0e5f6b1d-0999-4b2f-96e5-979e8f582c7e" + ], + "x-ms-correlation-request-id": [ + "0e5f6b1d-0999-4b2f-96e5-979e8f582c7e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231441Z:0e5f6b1d-0999-4b2f-96e5-979e8f582c7e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:41 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/tagValues/value2?api-version=2014-04-01-preview", + "RequestMethod": "PUT", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/tagValues/value2\",\r\n \"tagValue\": \"value2\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-request-id": [ + "0edde047-97b7-4eee-b446-94ebe85642bb" + ], + "x-ms-correlation-request-id": [ + "0edde047-97b7-4eee-b446-94ebe85642bb" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231442Z:0edde047-97b7-4eee-b446-94ebe85642bb" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:42 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/tagValues/value3?api-version=2014-04-01-preview", + "RequestMethod": "PUT", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/tagValues/value3\",\r\n \"tagValue\": \"value3\",\r\n \"count\": {\r\n \"type\": \"Total\",\r\n \"value\": 0\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-request-id": [ + "f91963a9-dbd3-478d-8d95-786ec02c7765" + ], + "x-ms-correlation-request-id": [ + "f91963a9-dbd3-478d-8d95-786ec02c7765" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231443Z:f91963a9-dbd3-478d-8d95-786ec02c7765" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:43 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/tagValues/value1?api-version=2014-04-01-preview", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-request-id": [ + "43ece972-06ea-4aa1-8445-b91d0b3c8deb" + ], + "x-ms-correlation-request-id": [ + "43ece972-06ea-4aa1-8445-b91d0b3c8deb" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231444Z:43ece972-06ea-4aa1-8445-b91d0b3c8deb" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995/tagValues/value2?api-version=2014-04-01-preview", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1193" + ], + "x-ms-request-id": [ + "fd8f2aec-9f8c-4643-8827-f31c868fec3a" + ], + "x-ms-correlation-request-id": [ + "fd8f2aec-9f8c-4643-8827-f31c868fec3a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231444Z:fd8f2aec-9f8c-4643-8827-f31c868fec3a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk5995?api-version=2014-04-01-preview", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1192" + ], + "x-ms-request-id": [ + "4f8e6b02-b2b6-430d-9f05-1149bce0fa10" + ], + "x-ms-correlation-request-id": [ + "4f8e6b02-b2b6-430d-9f05-1149bce0fa10" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231445Z:4f8e6b02-b2b6-430d-9f05-1149bce0fa10" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/tagValues/value1?api-version=2014-04-01-preview", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-request-id": [ + "bc6de386-4198-464a-9823-f2664826ce45" + ], + "x-ms-correlation-request-id": [ + "bc6de386-4198-464a-9823-f2664826ce45" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231445Z:bc6de386-4198-464a-9823-f2664826ce45" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/tagValues/value2?api-version=2014-04-01-preview", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-request-id": [ + "d0e49da1-16c0-4e07-85bf-b8c1f5fcc450" + ], + "x-ms-correlation-request-id": [ + "d0e49da1-16c0-4e07-85bf-b8c1f5fcc450" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231446Z:d0e49da1-16c0-4e07-85bf-b8c1f5fcc450" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847/tagValues/value3?api-version=2014-04-01-preview", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-request-id": [ + "3a2d1f34-4c81-4bca-83a0-bfad6fc691f7" + ], + "x-ms-correlation-request-id": [ + "3a2d1f34-4c81-4bca-83a0-bfad6fc691f7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231446Z:3a2d1f34-4c81-4bca-83a0-bfad6fc691f7" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/tagNames/onesdk4847?api-version=2014-04-01-preview", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-request-id": [ + "d145ecb8-7070-4c1e-8fa6-e18c30edcbb4" + ], + "x-ms-correlation-request-id": [ + "d145ecb8-7070-4c1e-8fa6-e18c30edcbb4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140708T231447Z:d145ecb8-7070-4c1e-8fa6-e18c30edcbb4" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 08 Jul 2014 23:14:46 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-AzureTagsEndToEnd": [ + "onesdk5995", + "onesdk4847" + ] + }, + "Variables": { + "SubscriptionId": "2c224e7e-3ef5-431d-a57b-e71f4662e3a6" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceGroupTests/TestCreatesAndRemoveResourceGroupViaPiping.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceGroupTests/TestCreatesAndRemoveResourceGroupViaPiping.json new file mode 100644 index 000000000000..9f9a41c5426e --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceGroupTests/TestCreatesAndRemoveResourceGroupViaPiping.json @@ -0,0 +1,1040 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.batch\",\r\n \"namespace\": \"microsoft.batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\",\r\n \"2014-03-31-beta\",\r\n \"2014-03-31-alpha\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\",\r\n \"2014-03-31-beta\",\r\n \"2014-03-31-alpha\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.visualstudio\",\r\n \"namespace\": \"microsoft.visualstudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourcecontrols\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Central US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31985" + ], + "x-ms-request-id": [ + "ab16ce2a-750c-4182-a464-ea39bf37a6a7" + ], + "x-ms-correlation-request-id": [ + "ab16ce2a-750c-4182-a464-ea39bf37a6a7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075916Z:ab16ce2a-750c-4182-a464-ea39bf37a6a7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:59:15 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9160?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazkxNjA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31984" + ], + "x-ms-request-id": [ + "281ec2c9-6c82-4399-b7f1-b59a37e84873" + ], + "x-ms-correlation-request-id": [ + "281ec2c9-6c82-4399-b7f1-b59a37e84873" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075916Z:281ec2c9-6c82-4399-b7f1-b59a37e84873" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:59:16 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9160?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazkxNjA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31974" + ], + "x-ms-request-id": [ + "3581db7d-e611-4e16-afd7-c76ab499218d" + ], + "x-ms-correlation-request-id": [ + "3581db7d-e611-4e16-afd7-c76ab499218d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075952Z:3581db7d-e611-4e16-afd7-c76ab499218d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:59:51 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9160?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazkxNjA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9160\",\r\n \"name\": \"onesdk9160\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-request-id": [ + "4cecf39b-567f-4e31-b82a-f3a5f7031651" + ], + "x-ms-correlation-request-id": [ + "4cecf39b-567f-4e31-b82a-f3a5f7031651" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075916Z:4cecf39b-567f-4e31-b82a-f3a5f7031651" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:59:16 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9160/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL29uZXNkazkxNjAvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31983" + ], + "x-ms-request-id": [ + "f792fe13-b0e7-446d-8dd0-d329f32ac8c9" + ], + "x-ms-correlation-request-id": [ + "f792fe13-b0e7-446d-8dd0-d329f32ac8c9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075917Z:f792fe13-b0e7-446d-8dd0-d329f32ac8c9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:59:17 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9160/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazkxNjAvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31987" + ], + "x-ms-request-id": [ + "2cce5000-335a-4802-bb3b-9c836afd7e8f" + ], + "x-ms-correlation-request-id": [ + "2cce5000-335a-4802-bb3b-9c836afd7e8f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075917Z:2cce5000-335a-4802-bb3b-9c836afd7e8f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:59:17 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk216?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazIxNj9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31982" + ], + "x-ms-request-id": [ + "f1a6d84e-1f78-42e3-9f87-6c9a45b43c3c" + ], + "x-ms-correlation-request-id": [ + "f1a6d84e-1f78-42e3-9f87-6c9a45b43c3c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075918Z:f1a6d84e-1f78-42e3-9f87-6c9a45b43c3c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:59:18 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk216?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazIxNj9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31978" + ], + "x-ms-request-id": [ + "26c1a046-6d0f-4887-89e7-cde3e45d815d" + ], + "x-ms-correlation-request-id": [ + "26c1a046-6d0f-4887-89e7-cde3e45d815d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075920Z:26c1a046-6d0f-4887-89e7-cde3e45d815d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:59:20 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk216?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazIxNj9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk216\",\r\n \"name\": \"onesdk216\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-request-id": [ + "c5eb6bdd-4c88-47e0-ac62-c0e893e3f14b" + ], + "x-ms-correlation-request-id": [ + "c5eb6bdd-4c88-47e0-ac62-c0e893e3f14b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075918Z:c5eb6bdd-4c88-47e0-ac62-c0e893e3f14b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:59:18 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk216/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL29uZXNkazIxNi9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31981" + ], + "x-ms-request-id": [ + "ea3d32ac-c568-4e5d-a172-974eb58e35f5" + ], + "x-ms-correlation-request-id": [ + "ea3d32ac-c568-4e5d-a172-974eb58e35f5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075919Z:ea3d32ac-c568-4e5d-a172-974eb58e35f5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:59:18 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk216/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazIxNi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31986" + ], + "x-ms-request-id": [ + "a67f80c4-1044-4598-84f5-de7f062ba458" + ], + "x-ms-correlation-request-id": [ + "a67f80c4-1044-4598-84f5-de7f062ba458" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075919Z:a67f80c4-1044-4598-84f5-de7f062ba458" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:59:18 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/alborno\",\r\n \"name\": \"alborno\",\r\n \"location\": \"eastasia\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/ATMTest23ecb30b-fbd0-46fd-aad7-4b0bc7359668\",\r\n \"name\": \"ATMTest23ecb30b-fbd0-46fd-aad7-4b0bc7359668\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/ATMTest633\",\r\n \"name\": \"ATMTest633\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/ATMTest7293\",\r\n \"name\": \"ATMTest7293\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/azuresdktest03\",\r\n \"name\": \"azuresdktest03\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/azuresdktest05\",\r\n \"name\": \"azuresdktest05\",\r\n \"location\": \"eastasia\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/cli-cs1291\",\r\n \"name\": \"cli-cs1291\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/cli-cs4471\",\r\n \"name\": \"cli-cs4471\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/cli-cs5321\",\r\n \"name\": \"cli-cs5321\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/clitestvm1402\",\r\n \"name\": \"clitestvm1402\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg1067\",\r\n \"name\": \"csmrg1067\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg2713\",\r\n \"name\": \"csmrg2713\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg4357\",\r\n \"name\": \"csmrg4357\",\r\n \"location\": \"southcentralus\",\r\n \"tags\": {\r\n \"department\": \"finance\",\r\n \"tagname\": \"tagvalue\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg5164\",\r\n \"name\": \"csmrg5164\",\r\n \"location\": \"southcentralus\",\r\n \"tags\": {\r\n \"department\": \"finance\",\r\n \"tagname\": \"tagvalue\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg8831\",\r\n \"name\": \"csmrg8831\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Networking\",\r\n \"name\": \"Default-Networking\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-SQL-WestUS\",\r\n \"name\": \"Default-SQL-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-EastAsia\",\r\n \"name\": \"Default-Storage-EastAsia\",\r\n \"location\": \"eastasia\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-EastUS\",\r\n \"name\": \"Default-Storage-EastUS\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-NorthCentralUS\",\r\n \"name\": \"Default-Storage-NorthCentralUS\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-NorthEurope\",\r\n \"name\": \"Default-Storage-NorthEurope\",\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-SouthCentralUS\",\r\n \"name\": \"Default-Storage-SouthCentralUS\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-WestUS\",\r\n \"name\": \"Default-Storage-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Web-EastUS\",\r\n \"name\": \"Default-Web-EastUS\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Web-NorthCentralUS\",\r\n \"name\": \"Default-Web-NorthCentralUS\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Web-WestUS\",\r\n \"name\": \"Default-Web-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/foo13\",\r\n \"name\": \"foo13\",\r\n \"location\": \"southcentralus\",\r\n \"tags\": {\r\n \"foo\": \"bar\",\r\n \"dtag\": \"\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/foo14\",\r\n \"name\": \"foo14\",\r\n \"location\": \"southcentralus\",\r\n \"tags\": {\r\n \"dtag\": \"val2\",\r\n \"department\": \"Accounting\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/jianghlutestcs1\",\r\n \"name\": \"jianghlutestcs1\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/mynoden083001\",\r\n \"name\": \"mynoden083001\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/nodesdk401\",\r\n \"name\": \"nodesdk401\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/nodesdk6749\",\r\n \"name\": \"nodesdk6749\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk216\",\r\n \"name\": \"onesdk216\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk2842\",\r\n \"name\": \"onesdk2842\",\r\n \"location\": \"eastasia\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9160\",\r\n \"name\": \"onesdk9160\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testrg121\",\r\n \"name\": \"testrg121\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"department\": \"Accounting\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/tr19demostage\",\r\n \"name\": \"tr19demostage\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/VS-azuresdktest01-Group\",\r\n \"name\": \"VS-azuresdktest01-Group\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/xplattestvm2\",\r\n \"name\": \"xplattestvm2\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/zoo\",\r\n \"name\": \"zoo\",\r\n \"location\": \"northeurope\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/zoo2\",\r\n \"name\": \"zoo2\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"dtag2\": \"\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31980" + ], + "x-ms-request-id": [ + "87307163-13e7-4c2a-90d5-d6e8dd879cb4" + ], + "x-ms-correlation-request-id": [ + "87307163-13e7-4c2a-90d5-d6e8dd879cb4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075919Z:87307163-13e7-4c2a-90d5-d6e8dd879cb4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:59:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/alborno\",\r\n \"name\": \"alborno\",\r\n \"location\": \"eastasia\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/ATMTest23ecb30b-fbd0-46fd-aad7-4b0bc7359668\",\r\n \"name\": \"ATMTest23ecb30b-fbd0-46fd-aad7-4b0bc7359668\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/ATMTest633\",\r\n \"name\": \"ATMTest633\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/ATMTest7293\",\r\n \"name\": \"ATMTest7293\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/azuresdktest03\",\r\n \"name\": \"azuresdktest03\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/azuresdktest05\",\r\n \"name\": \"azuresdktest05\",\r\n \"location\": \"eastasia\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/cli-cs1291\",\r\n \"name\": \"cli-cs1291\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/cli-cs4471\",\r\n \"name\": \"cli-cs4471\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/cli-cs5321\",\r\n \"name\": \"cli-cs5321\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/clitestvm1402\",\r\n \"name\": \"clitestvm1402\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg1067\",\r\n \"name\": \"csmrg1067\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg2713\",\r\n \"name\": \"csmrg2713\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg4357\",\r\n \"name\": \"csmrg4357\",\r\n \"location\": \"southcentralus\",\r\n \"tags\": {\r\n \"department\": \"finance\",\r\n \"tagname\": \"tagvalue\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg5164\",\r\n \"name\": \"csmrg5164\",\r\n \"location\": \"southcentralus\",\r\n \"tags\": {\r\n \"department\": \"finance\",\r\n \"tagname\": \"tagvalue\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg8831\",\r\n \"name\": \"csmrg8831\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Networking\",\r\n \"name\": \"Default-Networking\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-SQL-WestUS\",\r\n \"name\": \"Default-SQL-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-EastAsia\",\r\n \"name\": \"Default-Storage-EastAsia\",\r\n \"location\": \"eastasia\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-EastUS\",\r\n \"name\": \"Default-Storage-EastUS\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-NorthCentralUS\",\r\n \"name\": \"Default-Storage-NorthCentralUS\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-NorthEurope\",\r\n \"name\": \"Default-Storage-NorthEurope\",\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-SouthCentralUS\",\r\n \"name\": \"Default-Storage-SouthCentralUS\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-WestUS\",\r\n \"name\": \"Default-Storage-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Web-EastUS\",\r\n \"name\": \"Default-Web-EastUS\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Web-NorthCentralUS\",\r\n \"name\": \"Default-Web-NorthCentralUS\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Web-WestUS\",\r\n \"name\": \"Default-Web-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/foo13\",\r\n \"name\": \"foo13\",\r\n \"location\": \"southcentralus\",\r\n \"tags\": {\r\n \"foo\": \"bar\",\r\n \"dtag\": \"\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/foo14\",\r\n \"name\": \"foo14\",\r\n \"location\": \"southcentralus\",\r\n \"tags\": {\r\n \"dtag\": \"val2\",\r\n \"department\": \"Accounting\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/jianghlutestcs1\",\r\n \"name\": \"jianghlutestcs1\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/mynoden083001\",\r\n \"name\": \"mynoden083001\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/nodesdk401\",\r\n \"name\": \"nodesdk401\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/nodesdk6749\",\r\n \"name\": \"nodesdk6749\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk216\",\r\n \"name\": \"onesdk216\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk2842\",\r\n \"name\": \"onesdk2842\",\r\n \"location\": \"eastasia\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9160\",\r\n \"name\": \"onesdk9160\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testrg121\",\r\n \"name\": \"testrg121\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"department\": \"Accounting\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/tr19demostage\",\r\n \"name\": \"tr19demostage\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/VS-azuresdktest01-Group\",\r\n \"name\": \"VS-azuresdktest01-Group\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/xplattestvm2\",\r\n \"name\": \"xplattestvm2\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/zoo\",\r\n \"name\": \"zoo\",\r\n \"location\": \"northeurope\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/zoo2\",\r\n \"name\": \"zoo2\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"dtag2\": \"\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31979" + ], + "x-ms-request-id": [ + "60b982ed-720b-4d80-831a-d7a2ef518cf3" + ], + "x-ms-correlation-request-id": [ + "60b982ed-720b-4d80-831a-d7a2ef518cf3" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075920Z:60b982ed-720b-4d80-831a-d7a2ef518cf3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:59:20 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk216?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazIxNj9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "13" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1193" + ], + "x-ms-request-id": [ + "90742cbe-dd65-4ccb-9e6a-f3eee73c66e6" + ], + "x-ms-correlation-request-id": [ + "90742cbe-dd65-4ccb-9e6a-f3eee73c66e6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075921Z:90742cbe-dd65-4ccb-9e6a-f3eee73c66e6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:59:20 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsyMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ==?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsyMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ==?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3lNVFl0VjBWVFZGVlRJaXdpYW05aVRHOWpZWFJwYjI0aU9pSjNaWE4wZFhNaWZRPT0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "13" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31977" + ], + "x-ms-request-id": [ + "051d2a8f-826e-4495-a146-a8710582ce66" + ], + "x-ms-correlation-request-id": [ + "051d2a8f-826e-4495-a146-a8710582ce66" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075921Z:051d2a8f-826e-4495-a146-a8710582ce66" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:59:21 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsyMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ==?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsyMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ==?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3lNVFl0VjBWVFZGVlRJaXdpYW05aVRHOWpZWFJwYjI0aU9pSjNaWE4wZFhNaWZRPT0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "13" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31976" + ], + "x-ms-request-id": [ + "c8d63235-3df0-47e5-a7a1-c6409ed19a34" + ], + "x-ms-correlation-request-id": [ + "c8d63235-3df0-47e5-a7a1-c6409ed19a34" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075936Z:c8d63235-3df0-47e5-a7a1-c6409ed19a34" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:59:36 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsyMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ==?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREsyMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ==?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFc3lNVFl0VjBWVFZGVlRJaXdpYW05aVRHOWpZWFJwYjI0aU9pSjNaWE4wZFhNaWZRPT0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "13" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31975" + ], + "x-ms-request-id": [ + "49776140-731e-4d9f-8041-cc30c1fc6451" + ], + "x-ms-correlation-request-id": [ + "49776140-731e-4d9f-8041-cc30c1fc6451" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075952Z:49776140-731e-4d9f-8041-cc30c1fc6451" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:59:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9160?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazkxNjA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "19" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1192" + ], + "x-ms-request-id": [ + "b9eedb8e-d559-45b9-aef3-a1c5831f3d46" + ], + "x-ms-correlation-request-id": [ + "b9eedb8e-d559-45b9-aef3-a1c5831f3d46" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075953Z:b9eedb8e-d559-45b9-aef3-a1c5831f3d46" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:59:52 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MTYwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MTYwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczVNVFl3TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "19" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31973" + ], + "x-ms-request-id": [ + "8244637f-0e80-4d89-9824-622d02a4bb93" + ], + "x-ms-correlation-request-id": [ + "8244637f-0e80-4d89-9824-622d02a4bb93" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075953Z:8244637f-0e80-4d89-9824-622d02a4bb93" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:59:52 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MTYwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MTYwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczVNVFl3TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "19" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31972" + ], + "x-ms-request-id": [ + "34b800f5-0cd1-41b3-86af-4d0e0dda767b" + ], + "x-ms-correlation-request-id": [ + "34b800f5-0cd1-41b3-86af-4d0e0dda767b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080009Z:34b800f5-0cd1-41b3-86af-4d0e0dda767b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:00:08 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MTYwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MTYwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczVNVFl3TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "19" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31971" + ], + "x-ms-request-id": [ + "26f13fb3-583d-4e72-a4af-3b1a42aa0bb6" + ], + "x-ms-correlation-request-id": [ + "26f13fb3-583d-4e72-a4af-3b1a42aa0bb6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080024Z:26f13fb3-583d-4e72-a4af-3b1a42aa0bb6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:00:23 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MTYwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MTYwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczVNVFl3TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "19" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31970" + ], + "x-ms-request-id": [ + "51f5e9cc-4716-44b8-a232-96a1b3be2e72" + ], + "x-ms-correlation-request-id": [ + "51f5e9cc-4716-44b8-a232-96a1b3be2e72" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080040Z:51f5e9cc-4716-44b8-a232-96a1b3be2e72" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:00:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9160?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazkxNjA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceGroupNotFound\",\r\n \"message\": \"Resource group 'onesdk9160' could not be found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31969" + ], + "x-ms-request-id": [ + "fb6c89d5-ddc0-4809-8845-769b16b09ad0" + ], + "x-ms-correlation-request-id": [ + "fb6c89d5-ddc0-4809-8845-769b16b09ad0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080041Z:fb6c89d5-ddc0-4809-8845-769b16b09ad0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:00:41 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk216?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazIxNj9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceGroupNotFound\",\r\n \"message\": \"Resource group 'onesdk216' could not be found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31968" + ], + "x-ms-request-id": [ + "2efecd14-e973-486d-ac05-6029df0c74e6" + ], + "x-ms-correlation-request-id": [ + "2efecd14-e973-486d-ac05-6029df0c74e6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080041Z:2efecd14-e973-486d-ac05-6029df0c74e6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:00:41 GMT" + ] + }, + "StatusCode": 404 + } + ], + "Names": { + "Test-CreatesAndRemoveResourceGroupViaPiping": [ + "onesdk9160", + "onesdk216" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceGroupTests/TestCreatesNewSimpleResourceGroup.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceGroupTests/TestCreatesNewSimpleResourceGroup.json new file mode 100644 index 000000000000..91009bb69f67 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceGroupTests/TestCreatesNewSimpleResourceGroup.json @@ -0,0 +1,559 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.batch\",\r\n \"namespace\": \"microsoft.batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\",\r\n \"2014-03-31-beta\",\r\n \"2014-03-31-alpha\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\",\r\n \"2014-03-31-beta\",\r\n \"2014-03-31-alpha\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.visualstudio\",\r\n \"namespace\": \"microsoft.visualstudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourcecontrols\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Central US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31999" + ], + "x-ms-request-id": [ + "8f9bdfe3-b269-4799-9050-c6e1ab1b0ee1" + ], + "x-ms-correlation-request-id": [ + "8f9bdfe3-b269-4799-9050-c6e1ab1b0ee1" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075520Z:8f9bdfe3-b269-4799-9050-c6e1ab1b0ee1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:55:20 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk7261?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcyNjE/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31998" + ], + "x-ms-request-id": [ + "a86f33d8-ea92-4d65-bd3d-a1385b5c544e" + ], + "x-ms-correlation-request-id": [ + "a86f33d8-ea92-4d65-bd3d-a1385b5c544e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075521Z:a86f33d8-ea92-4d65-bd3d-a1385b5c544e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:55:20 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk7261?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcyNjE/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31994" + ], + "x-ms-request-id": [ + "3682cf0b-2773-4e57-b099-4a70e14e9a1c" + ], + "x-ms-correlation-request-id": [ + "3682cf0b-2773-4e57-b099-4a70e14e9a1c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075524Z:3682cf0b-2773-4e57-b099-4a70e14e9a1c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:55:24 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk7261?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcyNjE/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n }\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk7261\",\r\n \"name\": \"onesdk7261\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "5f4ebca6-0e0d-4a0c-aa52-3da3385423c5" + ], + "x-ms-correlation-request-id": [ + "5f4ebca6-0e0d-4a0c-aa52-3da3385423c5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075521Z:5f4ebca6-0e0d-4a0c-aa52-3da3385423c5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:55:21 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk7261/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL29uZXNkazcyNjEvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31997" + ], + "x-ms-request-id": [ + "1ea210f8-2efb-4e63-94ea-35bdde3b3f33" + ], + "x-ms-correlation-request-id": [ + "1ea210f8-2efb-4e63-94ea-35bdde3b3f33" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075522Z:1ea210f8-2efb-4e63-94ea-35bdde3b3f33" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:55:21 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk7261/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL29uZXNkazcyNjEvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31995" + ], + "x-ms-request-id": [ + "e852277f-ca67-4870-8c20-62f39ffd42f4" + ], + "x-ms-correlation-request-id": [ + "e852277f-ca67-4870-8c20-62f39ffd42f4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075523Z:e852277f-ca67-4870-8c20-62f39ffd42f4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:55:23 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk7261/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcyNjEvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31999" + ], + "x-ms-request-id": [ + "5a3e6b91-571e-4677-b522-dc82c1c90bc2" + ], + "x-ms-correlation-request-id": [ + "5a3e6b91-571e-4677-b522-dc82c1c90bc2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075522Z:5a3e6b91-571e-4677-b522-dc82c1c90bc2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:55:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk7261/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcyNjEvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31998" + ], + "x-ms-request-id": [ + "3cc353a3-b219-4afb-a584-30f07e2e022e" + ], + "x-ms-correlation-request-id": [ + "3cc353a3-b219-4afb-a584-30f07e2e022e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075524Z:3cc353a3-b219-4afb-a584-30f07e2e022e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:55:23 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk7261?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcyNjE/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk7261\",\r\n \"name\": \"onesdk7261\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31996" + ], + "x-ms-request-id": [ + "d2bc184a-b3b8-4dea-9e0d-455a594ce138" + ], + "x-ms-correlation-request-id": [ + "d2bc184a-b3b8-4dea-9e0d-455a594ce138" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075523Z:d2bc184a-b3b8-4dea-9e0d-455a594ce138" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:55:23 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk7261?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcyNjE/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "10" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-request-id": [ + "579f2d59-3add-4bab-843b-04fe5d607f44" + ], + "x-ms-correlation-request-id": [ + "579f2d59-3add-4bab-843b-04fe5d607f44" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075525Z:579f2d59-3add-4bab-843b-04fe5d607f44" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:55:24 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3MjYxLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3MjYxLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNNall4TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "10" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31993" + ], + "x-ms-request-id": [ + "c7d5d69c-89ed-44b0-95d8-7c2c34e5b13d" + ], + "x-ms-correlation-request-id": [ + "c7d5d69c-89ed-44b0-95d8-7c2c34e5b13d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075525Z:c7d5d69c-89ed-44b0-95d8-7c2c34e5b13d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:55:25 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3MjYxLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3MjYxLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNNall4TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "10" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31992" + ], + "x-ms-request-id": [ + "c9ac0f7b-230f-4ea5-8571-3af2570b1056" + ], + "x-ms-correlation-request-id": [ + "c9ac0f7b-230f-4ea5-8571-3af2570b1056" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075540Z:c9ac0f7b-230f-4ea5-8571-3af2570b1056" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:55:40 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3MjYxLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs3MjYxLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczNNall4TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "10" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31991" + ], + "x-ms-request-id": [ + "7e0d0af7-2969-417f-b031-1e3ad929727d" + ], + "x-ms-correlation-request-id": [ + "7e0d0af7-2969-417f-b031-1e3ad929727d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075556Z:7e0d0af7-2969-417f-b031-1e3ad929727d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:55:56 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-CreatesNewSimpleResourceGroup": [ + "onesdk7261" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceGroupTests/TestGetNonExistingResourceGroup.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceGroupTests/TestGetNonExistingResourceGroup.json new file mode 100644 index 000000000000..2fecc9823833 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceGroupTests/TestGetNonExistingResourceGroup.json @@ -0,0 +1,52 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk1426?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazE0MjY/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceGroupNotFound\",\r\n \"message\": \"Resource group 'onesdk1426' could not be found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31967" + ], + "x-ms-request-id": [ + "39c310ce-10b4-4fcc-9ac6-304ab96bb8b5" + ], + "x-ms-correlation-request-id": [ + "39c310ce-10b4-4fcc-9ac6-304ab96bb8b5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080134Z:39c310ce-10b4-4fcc-9ac6-304ab96bb8b5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:01:33 GMT" + ] + }, + "StatusCode": 404 + } + ], + "Names": { + "Test-GetNonExistingResourceGroup": [ + "onesdk1426" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceGroupTests/TestNewDeploymentAndProviderRegistration.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceGroupTests/TestNewDeploymentAndProviderRegistration.json new file mode 100644 index 000000000000..ff6b845af407 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceGroupTests/TestNewDeploymentAndProviderRegistration.json @@ -0,0 +1,19834 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Batch\",\r\n \"namespace\": \"Microsoft.Batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Central US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"South Central US\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Europe\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.visualstudio\",\r\n \"namespace\": \"microsoft.visualstudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"West US\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"West US\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"West US\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31947" + ], + "x-ms-request-id": [ + "20e9e1d3-6b54-47da-8512-8e9867c23516" + ], + "x-ms-correlation-request-id": [ + "20e9e1d3-6b54-47da-8512-8e9867c23516" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004239Z:20e9e1d3-6b54-47da-8512-8e9867c23516" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:42:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Microsoft.Gallery/galleryitems/Microsoft.Cache.0.4.0-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Gallery.GalleryClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"identity\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"publisher\": \"Microsoft\",\r\n \"publisherDisplayName\": \"Microsoft\",\r\n \"itemName\": \"Cache\",\r\n \"itemDisplayName\": \"Redis Cache (Preview)\",\r\n \"version\": \"0.4.0-preview\",\r\n \"summary\": \"Distributed, in-memory Redis Cache service for modern cloud applications\",\r\n \"longSummary\": null,\r\n \"description\": \"

Microsoft Azure Redis Cache (preview) is based on the popular open source Redis Cache. It gives users access to a secure, dedicated Redis Cache, managed by Microsoft. Users get the best of both worlds, the rich Redis feature set and ecosystem, and reliable hosting and monitoring from Microsoft.

\\n

Microsoft Azure Redis Cache (Preview) is available in two tiers:

\\n
    \\n
  • Basic – A single Cache node.
  • \\n
  • Standard – A replicated Cache (Two nodes, Master and a Slave).
  • \\n
\\n

Microsoft Azure Redis Cache helps your application stay responsive even as user load increases. It does so, by leveraging the low latency, high-throughput capabilities of the Redis engine. This separate distributed cache layer allows your data tier to scale independently for more efficient use of compute resources in your application layer.

\",\r\n \"resourceGroupName\": null,\r\n \"definitionTemplates\": {\r\n \"uiDefinitionFileUrl\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/UIDefinition.json\",\r\n \"defaultDeploymentTemplateId\": \"justRedis\",\r\n \"deploymentTemplateFileUrls\": {\r\n \"justRedis\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\"\r\n }\r\n },\r\n \"categoryIds\": [\r\n \"data\",\r\n \"dataService\"\r\n ],\r\n \"screenshotUrls\": [\r\n \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/Screenshots/Image01.png\"\r\n ],\r\n \"links\": [\r\n {\r\n \"id\": \"overview\",\r\n \"displayName\": \"Service Overview\",\r\n \"uri\": \"http://aka.ms/q862hz\"\r\n },\r\n {\r\n \"id\": \"documentation\",\r\n \"displayName\": \"Documentation\",\r\n \"uri\": \"http://aka.ms/e7e1a0\"\r\n },\r\n {\r\n \"id\": \"pricing\",\r\n \"displayName\": \"Pricing details\",\r\n \"uri\": \"http://aka.ms/ss7n6y\"\r\n }\r\n ],\r\n \"iconFileUrls\": {\r\n \"small\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/Icons/Small.master.png\",\r\n \"medium\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/Icons/Medium.master.png\",\r\n \"large\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/Icons/Large.master.png\",\r\n \"wide\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/Icons/Wide.master.png\",\r\n \"hero\": null\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "X-XSS-Protection": [ + "1; mode=block" + ], + "x-ms-version": [ + "4.8.0.26 (d43779e.140805-1116)" + ], + "Strict-Transport-Security": [ + "max-age=2592000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:42:40 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Microsoft.Gallery/galleryitems/Microsoft.Cache.0.4.0-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Gallery.GalleryClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"identity\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"publisher\": \"Microsoft\",\r\n \"publisherDisplayName\": \"Microsoft\",\r\n \"itemName\": \"Cache\",\r\n \"itemDisplayName\": \"Redis Cache (Preview)\",\r\n \"version\": \"0.4.0-preview\",\r\n \"summary\": \"Distributed, in-memory Redis Cache service for modern cloud applications\",\r\n \"longSummary\": null,\r\n \"description\": \"

Microsoft Azure Redis Cache (preview) is based on the popular open source Redis Cache. It gives users access to a secure, dedicated Redis Cache, managed by Microsoft. Users get the best of both worlds, the rich Redis feature set and ecosystem, and reliable hosting and monitoring from Microsoft.

\\n

Microsoft Azure Redis Cache (Preview) is available in two tiers:

\\n
    \\n
  • Basic – A single Cache node.
  • \\n
  • Standard – A replicated Cache (Two nodes, Master and a Slave).
  • \\n
\\n

Microsoft Azure Redis Cache helps your application stay responsive even as user load increases. It does so, by leveraging the low latency, high-throughput capabilities of the Redis engine. This separate distributed cache layer allows your data tier to scale independently for more efficient use of compute resources in your application layer.

\",\r\n \"resourceGroupName\": null,\r\n \"definitionTemplates\": {\r\n \"uiDefinitionFileUrl\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/UIDefinition.json\",\r\n \"defaultDeploymentTemplateId\": \"justRedis\",\r\n \"deploymentTemplateFileUrls\": {\r\n \"justRedis\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\"\r\n }\r\n },\r\n \"categoryIds\": [\r\n \"data\",\r\n \"dataService\"\r\n ],\r\n \"screenshotUrls\": [\r\n \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/Screenshots/Image01.png\"\r\n ],\r\n \"links\": [\r\n {\r\n \"id\": \"overview\",\r\n \"displayName\": \"Service Overview\",\r\n \"uri\": \"http://aka.ms/q862hz\"\r\n },\r\n {\r\n \"id\": \"documentation\",\r\n \"displayName\": \"Documentation\",\r\n \"uri\": \"http://aka.ms/e7e1a0\"\r\n },\r\n {\r\n \"id\": \"pricing\",\r\n \"displayName\": \"Pricing details\",\r\n \"uri\": \"http://aka.ms/ss7n6y\"\r\n }\r\n ],\r\n \"iconFileUrls\": {\r\n \"small\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/Icons/Small.master.png\",\r\n \"medium\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/Icons/Medium.master.png\",\r\n \"large\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/Icons/Large.master.png\",\r\n \"wide\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/Icons/Wide.master.png\",\r\n \"hero\": null\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-content-type-options": [ + "nosniff" + ], + "X-XSS-Protection": [ + "1; mode=block" + ], + "x-ms-version": [ + "4.8.0.26 (d43779e.140805-1116)" + ], + "Strict-Transport-Security": [ + "max-age=2592000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:42:42 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792?api-version=2014-04-01-preview", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31946" + ], + "x-ms-request-id": [ + "2443be46-5ee8-4e72-a1f3-36a36ecc5236" + ], + "x-ms-correlation-request-id": [ + "2443be46-5ee8-4e72-a1f3-36a36ecc5236" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004240Z:2443be46-5ee8-4e72-a1f3-36a36ecc5236" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:42:40 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792?api-version=2014-04-01-preview", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31472" + ], + "x-ms-request-id": [ + "f1fa1178-20eb-4573-bd71-9d214cc45651" + ], + "x-ms-correlation-request-id": [ + "f1fa1178-20eb-4573-bd71-9d214cc45651" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005204Z:f1fa1178-20eb-4573-bd71-9d214cc45651" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:52:04 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792?api-version=2014-04-01-preview", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792\",\r\n \"name\": \"onesdk9792\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1190" + ], + "x-ms-request-id": [ + "c316ffef-cbfb-42dd-af28-603c7d4a8c7c" + ], + "x-ms-correlation-request-id": [ + "c316ffef-cbfb-42dd-af28-603c7d4a8c7c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004241Z:c316ffef-cbfb-42dd-af28-603c7d4a8c7c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:42:40 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/validate?&api-version=2014-04-01-preview", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"value\": \"onesdk6627\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-08-06T00:42:42.2055112Z\",\r\n \"correlationId\": \"9ecf36ce-423f-4718-b7fd-2fa803110bd2\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1189" + ], + "x-ms-request-id": [ + "9ecf36ce-423f-4718-b7fd-2fa803110bd2" + ], + "x-ms-correlation-request-id": [ + "9ecf36ce-423f-4718-b7fd-2fa803110bd2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004242Z:9ecf36ce-423f-4718-b7fd-2fa803110bd2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:42:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"value\": \"onesdk6627\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1189" + ], + "x-ms-request-id": [ + "2828344e-9561-4c19-a641-f56adb2048f3" + ], + "x-ms-correlation-request-id": [ + "2828344e-9561-4c19-a641-f56adb2048f3" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004243Z:2828344e-9561-4c19-a641-f56adb2048f3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:42:43 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31975" + ], + "x-ms-request-id": [ + "13a9eca6-2e43-467b-a0a8-fb5e9c6095cf" + ], + "x-ms-correlation-request-id": [ + "13a9eca6-2e43-467b-a0a8-fb5e9c6095cf" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004243Z:13a9eca6-2e43-467b-a0a8-fb5e9c6095cf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:42:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31973" + ], + "x-ms-request-id": [ + "f83b136a-3654-45c4-9f10-3bc2ff9e4269" + ], + "x-ms-correlation-request-id": [ + "f83b136a-3654-45c4-9f10-3bc2ff9e4269" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004246Z:f83b136a-3654-45c4-9f10-3bc2ff9e4269" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:42:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31971" + ], + "x-ms-request-id": [ + "df2d46c9-a692-46d9-96ec-96906d05567d" + ], + "x-ms-correlation-request-id": [ + "df2d46c9-a692-46d9-96ec-96906d05567d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004248Z:df2d46c9-a692-46d9-96ec-96906d05567d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:42:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31969" + ], + "x-ms-request-id": [ + "a5b4458a-4af9-4119-a1f0-c19f6534388d" + ], + "x-ms-correlation-request-id": [ + "a5b4458a-4af9-4119-a1f0-c19f6534388d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004250Z:a5b4458a-4af9-4119-a1f0-c19f6534388d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:42:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c79ccbaf-d92a-4e25-9fe9-43fe53ad983d\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31967" + ], + "x-ms-request-id": [ + "d3d3e6ed-c9ee-49b2-a2a6-85b50f5dbe4c" + ], + "x-ms-correlation-request-id": [ + "d3d3e6ed-c9ee-49b2-a2a6-85b50f5dbe4c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004252Z:d3d3e6ed-c9ee-49b2-a2a6-85b50f5dbe4c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:42:52 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c79ccbaf-d92a-4e25-9fe9-43fe53ad983d\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31965" + ], + "x-ms-request-id": [ + "5e74f8b7-f700-4a94-a04b-111cfaf720d9" + ], + "x-ms-correlation-request-id": [ + "5e74f8b7-f700-4a94-a04b-111cfaf720d9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004255Z:5e74f8b7-f700-4a94-a04b-111cfaf720d9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:42:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c79ccbaf-d92a-4e25-9fe9-43fe53ad983d\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31963" + ], + "x-ms-request-id": [ + "a9aff8c5-ef6f-4133-b910-7a99706a7d0c" + ], + "x-ms-correlation-request-id": [ + "a9aff8c5-ef6f-4133-b910-7a99706a7d0c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004257Z:a9aff8c5-ef6f-4133-b910-7a99706a7d0c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:42:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c79ccbaf-d92a-4e25-9fe9-43fe53ad983d\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31961" + ], + "x-ms-request-id": [ + "0de6a11f-f392-437b-b106-bc42e1d902cf" + ], + "x-ms-correlation-request-id": [ + "0de6a11f-f392-437b-b106-bc42e1d902cf" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004259Z:0de6a11f-f392-437b-b106-bc42e1d902cf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:42:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c79ccbaf-d92a-4e25-9fe9-43fe53ad983d\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31959" + ], + "x-ms-request-id": [ + "37b09750-8c87-424e-9f03-6c1bca6af9e8" + ], + "x-ms-correlation-request-id": [ + "37b09750-8c87-424e-9f03-6c1bca6af9e8" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004301Z:37b09750-8c87-424e-9f03-6c1bca6af9e8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c79ccbaf-d92a-4e25-9fe9-43fe53ad983d\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31957" + ], + "x-ms-request-id": [ + "8ea50f3f-6626-474a-8ac0-48132d0d3f3e" + ], + "x-ms-correlation-request-id": [ + "8ea50f3f-6626-474a-8ac0-48132d0d3f3e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004303Z:8ea50f3f-6626-474a-8ac0-48132d0d3f3e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c79ccbaf-d92a-4e25-9fe9-43fe53ad983d\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31955" + ], + "x-ms-request-id": [ + "49e2c647-887e-45af-8568-6c8e4b5281e6" + ], + "x-ms-correlation-request-id": [ + "49e2c647-887e-45af-8568-6c8e4b5281e6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004306Z:49e2c647-887e-45af-8568-6c8e4b5281e6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c79ccbaf-d92a-4e25-9fe9-43fe53ad983d\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31953" + ], + "x-ms-request-id": [ + "73a99c07-5550-4871-8eab-4928cab6acd7" + ], + "x-ms-correlation-request-id": [ + "73a99c07-5550-4871-8eab-4928cab6acd7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004308Z:73a99c07-5550-4871-8eab-4928cab6acd7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:08 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c79ccbaf-d92a-4e25-9fe9-43fe53ad983d\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31951" + ], + "x-ms-request-id": [ + "d3a53998-e9d1-4829-b6fa-ef29c4d1bf81" + ], + "x-ms-correlation-request-id": [ + "d3a53998-e9d1-4829-b6fa-ef29c4d1bf81" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004310Z:d3a53998-e9d1-4829-b6fa-ef29c4d1bf81" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c79ccbaf-d92a-4e25-9fe9-43fe53ad983d\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31949" + ], + "x-ms-request-id": [ + "5dc66144-a6df-4f05-bc85-e8a3b9d1851d" + ], + "x-ms-correlation-request-id": [ + "5dc66144-a6df-4f05-bc85-e8a3b9d1851d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004312Z:5dc66144-a6df-4f05-bc85-e8a3b9d1851d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:12 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c79ccbaf-d92a-4e25-9fe9-43fe53ad983d\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31947" + ], + "x-ms-request-id": [ + "021cddf6-985b-4b8c-ba2e-e86ad54123c2" + ], + "x-ms-correlation-request-id": [ + "021cddf6-985b-4b8c-ba2e-e86ad54123c2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004315Z:021cddf6-985b-4b8c-ba2e-e86ad54123c2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:14 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c79ccbaf-d92a-4e25-9fe9-43fe53ad983d\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31945" + ], + "x-ms-request-id": [ + "2a2c3e17-2674-4f15-8f00-06d6d837c96b" + ], + "x-ms-correlation-request-id": [ + "2a2c3e17-2674-4f15-8f00-06d6d837c96b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004317Z:2a2c3e17-2674-4f15-8f00-06d6d837c96b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:17 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c79ccbaf-d92a-4e25-9fe9-43fe53ad983d\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31943" + ], + "x-ms-request-id": [ + "8a2edc53-a32f-42f0-9314-f9926ad214f1" + ], + "x-ms-correlation-request-id": [ + "8a2edc53-a32f-42f0-9314-f9926ad214f1" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004319Z:8a2edc53-a32f-42f0-9314-f9926ad214f1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c79ccbaf-d92a-4e25-9fe9-43fe53ad983d\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31941" + ], + "x-ms-request-id": [ + "88a9f488-db04-4dff-9cc0-4bea47252eb8" + ], + "x-ms-correlation-request-id": [ + "88a9f488-db04-4dff-9cc0-4bea47252eb8" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004321Z:88a9f488-db04-4dff-9cc0-4bea47252eb8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:21 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c79ccbaf-d92a-4e25-9fe9-43fe53ad983d\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31939" + ], + "x-ms-request-id": [ + "a79e1be2-4015-4bd8-b5e1-a0a9aa64f00e" + ], + "x-ms-correlation-request-id": [ + "a79e1be2-4015-4bd8-b5e1-a0a9aa64f00e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004324Z:a79e1be2-4015-4bd8-b5e1-a0a9aa64f00e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c79ccbaf-d92a-4e25-9fe9-43fe53ad983d\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31937" + ], + "x-ms-request-id": [ + "0d6a7b7e-8643-4bed-8016-f09e2619c56b" + ], + "x-ms-correlation-request-id": [ + "0d6a7b7e-8643-4bed-8016-f09e2619c56b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004326Z:0d6a7b7e-8643-4bed-8016-f09e2619c56b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c79ccbaf-d92a-4e25-9fe9-43fe53ad983d\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31935" + ], + "x-ms-request-id": [ + "8b68c5e0-abff-41fc-b4f2-2dbb63c19e18" + ], + "x-ms-correlation-request-id": [ + "8b68c5e0-abff-41fc-b4f2-2dbb63c19e18" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004328Z:8b68c5e0-abff-41fc-b4f2-2dbb63c19e18" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c79ccbaf-d92a-4e25-9fe9-43fe53ad983d\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31933" + ], + "x-ms-request-id": [ + "17aae282-a756-46b8-8199-a73c6e0b507b" + ], + "x-ms-correlation-request-id": [ + "17aae282-a756-46b8-8199-a73c6e0b507b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004330Z:17aae282-a756-46b8-8199-a73c6e0b507b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:30 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c79ccbaf-d92a-4e25-9fe9-43fe53ad983d\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31931" + ], + "x-ms-request-id": [ + "58fdf3d2-dcf3-4884-adbc-5e33495a9333" + ], + "x-ms-correlation-request-id": [ + "58fdf3d2-dcf3-4884-adbc-5e33495a9333" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004332Z:58fdf3d2-dcf3-4884-adbc-5e33495a9333" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c79ccbaf-d92a-4e25-9fe9-43fe53ad983d\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31929" + ], + "x-ms-request-id": [ + "c1185deb-3621-4ec6-bbda-d6a723e3b6af" + ], + "x-ms-correlation-request-id": [ + "c1185deb-3621-4ec6-bbda-d6a723e3b6af" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004335Z:c1185deb-3621-4ec6-bbda-d6a723e3b6af" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c79ccbaf-d92a-4e25-9fe9-43fe53ad983d\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31927" + ], + "x-ms-request-id": [ + "08f21b69-fa84-4596-a184-0d1bf6eed94a" + ], + "x-ms-correlation-request-id": [ + "08f21b69-fa84-4596-a184-0d1bf6eed94a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004337Z:08f21b69-fa84-4596-a184-0d1bf6eed94a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:37 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c79ccbaf-d92a-4e25-9fe9-43fe53ad983d\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31925" + ], + "x-ms-request-id": [ + "790fe0ab-712c-4ecd-9bcf-3cb5f742ce9e" + ], + "x-ms-correlation-request-id": [ + "790fe0ab-712c-4ecd-9bcf-3cb5f742ce9e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004339Z:790fe0ab-712c-4ecd-9bcf-3cb5f742ce9e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c79ccbaf-d92a-4e25-9fe9-43fe53ad983d\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31923" + ], + "x-ms-request-id": [ + "b5e276cf-b92f-4dac-98fa-09dbd50af935" + ], + "x-ms-correlation-request-id": [ + "b5e276cf-b92f-4dac-98fa-09dbd50af935" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004341Z:b5e276cf-b92f-4dac-98fa-09dbd50af935" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c79ccbaf-d92a-4e25-9fe9-43fe53ad983d\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31921" + ], + "x-ms-request-id": [ + "fca0f1dc-09d0-4ed3-ae40-fbd2fa781027" + ], + "x-ms-correlation-request-id": [ + "fca0f1dc-09d0-4ed3-ae40-fbd2fa781027" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004344Z:fca0f1dc-09d0-4ed3-ae40-fbd2fa781027" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c79ccbaf-d92a-4e25-9fe9-43fe53ad983d\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31919" + ], + "x-ms-request-id": [ + "7689c7e3-dcae-465c-b554-31debc6c46b9" + ], + "x-ms-correlation-request-id": [ + "7689c7e3-dcae-465c-b554-31debc6c46b9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004346Z:7689c7e3-dcae-465c-b554-31debc6c46b9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c79ccbaf-d92a-4e25-9fe9-43fe53ad983d\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31917" + ], + "x-ms-request-id": [ + "7589b686-8bf7-4a9e-b225-a56af4cdcd81" + ], + "x-ms-correlation-request-id": [ + "7589b686-8bf7-4a9e-b225-a56af4cdcd81" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004348Z:7589b686-8bf7-4a9e-b225-a56af4cdcd81" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c79ccbaf-d92a-4e25-9fe9-43fe53ad983d\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31915" + ], + "x-ms-request-id": [ + "9da11599-2750-4529-b94c-236af60e19a9" + ], + "x-ms-correlation-request-id": [ + "9da11599-2750-4529-b94c-236af60e19a9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004350Z:9da11599-2750-4529-b94c-236af60e19a9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"d7af4cc8-282c-49df-925f-e292d520121c\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31913" + ], + "x-ms-request-id": [ + "d1cb20fd-f020-4b43-9b29-0e4d0ad83f2e" + ], + "x-ms-correlation-request-id": [ + "d1cb20fd-f020-4b43-9b29-0e4d0ad83f2e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004353Z:d1cb20fd-f020-4b43-9b29-0e4d0ad83f2e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"d7af4cc8-282c-49df-925f-e292d520121c\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31911" + ], + "x-ms-request-id": [ + "a2066be4-b7b2-4389-bff6-721c14ce6454" + ], + "x-ms-correlation-request-id": [ + "a2066be4-b7b2-4389-bff6-721c14ce6454" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004355Z:a2066be4-b7b2-4389-bff6-721c14ce6454" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"d7af4cc8-282c-49df-925f-e292d520121c\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31909" + ], + "x-ms-request-id": [ + "1352f5c8-9802-4461-b10e-fcd65c964f0a" + ], + "x-ms-correlation-request-id": [ + "1352f5c8-9802-4461-b10e-fcd65c964f0a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004357Z:1352f5c8-9802-4461-b10e-fcd65c964f0a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:56 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"d7af4cc8-282c-49df-925f-e292d520121c\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31907" + ], + "x-ms-request-id": [ + "6413c88e-c764-4700-b936-9fbeaf157149" + ], + "x-ms-correlation-request-id": [ + "6413c88e-c764-4700-b936-9fbeaf157149" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004359Z:6413c88e-c764-4700-b936-9fbeaf157149" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"d7af4cc8-282c-49df-925f-e292d520121c\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31905" + ], + "x-ms-request-id": [ + "c501ef19-e8ce-46b8-8e54-74763f55dcde" + ], + "x-ms-correlation-request-id": [ + "c501ef19-e8ce-46b8-8e54-74763f55dcde" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004402Z:c501ef19-e8ce-46b8-8e54-74763f55dcde" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:02 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"d7af4cc8-282c-49df-925f-e292d520121c\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31903" + ], + "x-ms-request-id": [ + "eb34b934-8435-4af3-8d73-edd4fd1449ac" + ], + "x-ms-correlation-request-id": [ + "eb34b934-8435-4af3-8d73-edd4fd1449ac" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004404Z:eb34b934-8435-4af3-8d73-edd4fd1449ac" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"d7af4cc8-282c-49df-925f-e292d520121c\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31901" + ], + "x-ms-request-id": [ + "7436258e-b3da-4cb6-b42a-8a8d6362cd20" + ], + "x-ms-correlation-request-id": [ + "7436258e-b3da-4cb6-b42a-8a8d6362cd20" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004406Z:7436258e-b3da-4cb6-b42a-8a8d6362cd20" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"d7af4cc8-282c-49df-925f-e292d520121c\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31899" + ], + "x-ms-request-id": [ + "ebf85ec6-ddbe-4a6f-b027-038f4a2bfe00" + ], + "x-ms-correlation-request-id": [ + "ebf85ec6-ddbe-4a6f-b027-038f4a2bfe00" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004408Z:ebf85ec6-ddbe-4a6f-b027-038f4a2bfe00" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:08 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"d7af4cc8-282c-49df-925f-e292d520121c\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31897" + ], + "x-ms-request-id": [ + "39bdc116-336f-4f01-ae34-b6e522312c38" + ], + "x-ms-correlation-request-id": [ + "39bdc116-336f-4f01-ae34-b6e522312c38" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004410Z:39bdc116-336f-4f01-ae34-b6e522312c38" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"d7af4cc8-282c-49df-925f-e292d520121c\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31895" + ], + "x-ms-request-id": [ + "998602f7-c868-4d69-8dc7-8275b94b0f17" + ], + "x-ms-correlation-request-id": [ + "998602f7-c868-4d69-8dc7-8275b94b0f17" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004413Z:998602f7-c868-4d69-8dc7-8275b94b0f17" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"d7af4cc8-282c-49df-925f-e292d520121c\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31893" + ], + "x-ms-request-id": [ + "e25a782e-355c-4507-8d50-a93e342a04c3" + ], + "x-ms-correlation-request-id": [ + "e25a782e-355c-4507-8d50-a93e342a04c3" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004415Z:e25a782e-355c-4507-8d50-a93e342a04c3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:15 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"d7af4cc8-282c-49df-925f-e292d520121c\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31891" + ], + "x-ms-request-id": [ + "38c1aa0a-01e7-4fcc-832c-b6cefe4a5407" + ], + "x-ms-correlation-request-id": [ + "38c1aa0a-01e7-4fcc-832c-b6cefe4a5407" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004417Z:38c1aa0a-01e7-4fcc-832c-b6cefe4a5407" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:17 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"d7af4cc8-282c-49df-925f-e292d520121c\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31889" + ], + "x-ms-request-id": [ + "1491ee93-0c5e-4384-a03f-68f5d20a3973" + ], + "x-ms-correlation-request-id": [ + "1491ee93-0c5e-4384-a03f-68f5d20a3973" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004419Z:1491ee93-0c5e-4384-a03f-68f5d20a3973" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"d7af4cc8-282c-49df-925f-e292d520121c\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31887" + ], + "x-ms-request-id": [ + "f2345a79-3718-4d5c-9202-2b10fae6e248" + ], + "x-ms-correlation-request-id": [ + "f2345a79-3718-4d5c-9202-2b10fae6e248" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004422Z:f2345a79-3718-4d5c-9202-2b10fae6e248" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"d7af4cc8-282c-49df-925f-e292d520121c\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31885" + ], + "x-ms-request-id": [ + "cf37f870-fde8-4e65-978f-572664280ecf" + ], + "x-ms-correlation-request-id": [ + "cf37f870-fde8-4e65-978f-572664280ecf" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004424Z:cf37f870-fde8-4e65-978f-572664280ecf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"d7af4cc8-282c-49df-925f-e292d520121c\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31883" + ], + "x-ms-request-id": [ + "38d3e12d-8c6a-496c-8556-5575df2a9ee6" + ], + "x-ms-correlation-request-id": [ + "38d3e12d-8c6a-496c-8556-5575df2a9ee6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004426Z:38d3e12d-8c6a-496c-8556-5575df2a9ee6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"d7af4cc8-282c-49df-925f-e292d520121c\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31881" + ], + "x-ms-request-id": [ + "2e58a51a-d0ca-4a2a-95be-d5d31a752146" + ], + "x-ms-correlation-request-id": [ + "2e58a51a-d0ca-4a2a-95be-d5d31a752146" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004428Z:2e58a51a-d0ca-4a2a-95be-d5d31a752146" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"d7af4cc8-282c-49df-925f-e292d520121c\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31879" + ], + "x-ms-request-id": [ + "496f28a6-99e6-4dc8-ac98-e7298572ee0f" + ], + "x-ms-correlation-request-id": [ + "496f28a6-99e6-4dc8-ac98-e7298572ee0f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004431Z:496f28a6-99e6-4dc8-ac98-e7298572ee0f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:31 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"d7af4cc8-282c-49df-925f-e292d520121c\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31877" + ], + "x-ms-request-id": [ + "5c5ac111-263c-464c-b63a-2f9ec05f824d" + ], + "x-ms-correlation-request-id": [ + "5c5ac111-263c-464c-b63a-2f9ec05f824d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004433Z:5c5ac111-263c-464c-b63a-2f9ec05f824d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"d7af4cc8-282c-49df-925f-e292d520121c\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31875" + ], + "x-ms-request-id": [ + "70bb53ad-1b43-4a15-8ec9-4bf649db80fa" + ], + "x-ms-correlation-request-id": [ + "70bb53ad-1b43-4a15-8ec9-4bf649db80fa" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004435Z:70bb53ad-1b43-4a15-8ec9-4bf649db80fa" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"d7af4cc8-282c-49df-925f-e292d520121c\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31873" + ], + "x-ms-request-id": [ + "49b7eee3-aaf8-440c-83fa-3609fd95301b" + ], + "x-ms-correlation-request-id": [ + "49b7eee3-aaf8-440c-83fa-3609fd95301b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004437Z:49b7eee3-aaf8-440c-83fa-3609fd95301b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:37 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"d7af4cc8-282c-49df-925f-e292d520121c\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31871" + ], + "x-ms-request-id": [ + "28e4af9f-35f8-43ea-8f38-b4c54344c480" + ], + "x-ms-correlation-request-id": [ + "28e4af9f-35f8-43ea-8f38-b4c54344c480" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004439Z:28e4af9f-35f8-43ea-8f38-b4c54344c480" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"d7af4cc8-282c-49df-925f-e292d520121c\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31869" + ], + "x-ms-request-id": [ + "e8834def-0dd9-4f34-a2b4-c72d5ace29c0" + ], + "x-ms-correlation-request-id": [ + "e8834def-0dd9-4f34-a2b4-c72d5ace29c0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004442Z:e8834def-0dd9-4f34-a2b4-c72d5ace29c0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"d7af4cc8-282c-49df-925f-e292d520121c\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31867" + ], + "x-ms-request-id": [ + "b98c1b90-ea39-4abc-a3b3-fc0bc0333b11" + ], + "x-ms-correlation-request-id": [ + "b98c1b90-ea39-4abc-a3b3-fc0bc0333b11" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004444Z:b98c1b90-ea39-4abc-a3b3-fc0bc0333b11" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"d7af4cc8-282c-49df-925f-e292d520121c\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31865" + ], + "x-ms-request-id": [ + "33500071-e38d-4a83-b42d-3cf1febe7979" + ], + "x-ms-correlation-request-id": [ + "33500071-e38d-4a83-b42d-3cf1febe7979" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004446Z:33500071-e38d-4a83-b42d-3cf1febe7979" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"d7af4cc8-282c-49df-925f-e292d520121c\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31863" + ], + "x-ms-request-id": [ + "01577009-9c86-4913-b5fb-784dae691f84" + ], + "x-ms-correlation-request-id": [ + "01577009-9c86-4913-b5fb-784dae691f84" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004448Z:01577009-9c86-4913-b5fb-784dae691f84" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"d7af4cc8-282c-49df-925f-e292d520121c\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31861" + ], + "x-ms-request-id": [ + "9dcc88a7-73c6-4694-ae55-291325766179" + ], + "x-ms-correlation-request-id": [ + "9dcc88a7-73c6-4694-ae55-291325766179" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004451Z:9dcc88a7-73c6-4694-ae55-291325766179" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c9b32e86-5afe-4633-bff8-6d54d7f34749\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31859" + ], + "x-ms-request-id": [ + "6ebdabc7-604c-4c61-838b-34a0671d8156" + ], + "x-ms-correlation-request-id": [ + "6ebdabc7-604c-4c61-838b-34a0671d8156" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004453Z:6ebdabc7-604c-4c61-838b-34a0671d8156" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c9b32e86-5afe-4633-bff8-6d54d7f34749\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31857" + ], + "x-ms-request-id": [ + "dc2b67fb-7d20-42c2-830e-c11c58cef904" + ], + "x-ms-correlation-request-id": [ + "dc2b67fb-7d20-42c2-830e-c11c58cef904" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004455Z:dc2b67fb-7d20-42c2-830e-c11c58cef904" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c9b32e86-5afe-4633-bff8-6d54d7f34749\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31855" + ], + "x-ms-request-id": [ + "b0861123-7147-4e8f-86e2-9183d35f2354" + ], + "x-ms-correlation-request-id": [ + "b0861123-7147-4e8f-86e2-9183d35f2354" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004457Z:b0861123-7147-4e8f-86e2-9183d35f2354" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c9b32e86-5afe-4633-bff8-6d54d7f34749\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31853" + ], + "x-ms-request-id": [ + "4861ca76-b007-45a8-9bd3-a08494495fd5" + ], + "x-ms-correlation-request-id": [ + "4861ca76-b007-45a8-9bd3-a08494495fd5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004500Z:4861ca76-b007-45a8-9bd3-a08494495fd5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c9b32e86-5afe-4633-bff8-6d54d7f34749\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31851" + ], + "x-ms-request-id": [ + "eb45f8a4-5e55-484c-9e2d-25f115eaf474" + ], + "x-ms-correlation-request-id": [ + "eb45f8a4-5e55-484c-9e2d-25f115eaf474" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004502Z:eb45f8a4-5e55-484c-9e2d-25f115eaf474" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:02 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c9b32e86-5afe-4633-bff8-6d54d7f34749\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31849" + ], + "x-ms-request-id": [ + "af341190-afc8-46c9-9f3b-569679f8dafd" + ], + "x-ms-correlation-request-id": [ + "af341190-afc8-46c9-9f3b-569679f8dafd" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004504Z:af341190-afc8-46c9-9f3b-569679f8dafd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c9b32e86-5afe-4633-bff8-6d54d7f34749\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31847" + ], + "x-ms-request-id": [ + "65c6bb39-dc9c-4d6c-a0de-29da59e8315b" + ], + "x-ms-correlation-request-id": [ + "65c6bb39-dc9c-4d6c-a0de-29da59e8315b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004506Z:65c6bb39-dc9c-4d6c-a0de-29da59e8315b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c9b32e86-5afe-4633-bff8-6d54d7f34749\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31845" + ], + "x-ms-request-id": [ + "de67007d-dc12-4b1b-91bd-8304d5d5cffb" + ], + "x-ms-correlation-request-id": [ + "de67007d-dc12-4b1b-91bd-8304d5d5cffb" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004508Z:de67007d-dc12-4b1b-91bd-8304d5d5cffb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:08 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c9b32e86-5afe-4633-bff8-6d54d7f34749\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31843" + ], + "x-ms-request-id": [ + "1e0df266-7cca-490f-9c6a-903324272953" + ], + "x-ms-correlation-request-id": [ + "1e0df266-7cca-490f-9c6a-903324272953" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004511Z:1e0df266-7cca-490f-9c6a-903324272953" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c9b32e86-5afe-4633-bff8-6d54d7f34749\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31841" + ], + "x-ms-request-id": [ + "0ca69328-1fdf-4dfb-9617-955b891749f1" + ], + "x-ms-correlation-request-id": [ + "0ca69328-1fdf-4dfb-9617-955b891749f1" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004513Z:0ca69328-1fdf-4dfb-9617-955b891749f1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:12 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c9b32e86-5afe-4633-bff8-6d54d7f34749\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31839" + ], + "x-ms-request-id": [ + "0a7ae742-d5f4-4cd0-bcf3-3a1dc8ba3645" + ], + "x-ms-correlation-request-id": [ + "0a7ae742-d5f4-4cd0-bcf3-3a1dc8ba3645" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004515Z:0a7ae742-d5f4-4cd0-bcf3-3a1dc8ba3645" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:15 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c9b32e86-5afe-4633-bff8-6d54d7f34749\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31837" + ], + "x-ms-request-id": [ + "6c1c7e30-77d8-41d3-8de2-98efbdf8cd95" + ], + "x-ms-correlation-request-id": [ + "6c1c7e30-77d8-41d3-8de2-98efbdf8cd95" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004517Z:6c1c7e30-77d8-41d3-8de2-98efbdf8cd95" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:17 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c9b32e86-5afe-4633-bff8-6d54d7f34749\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31835" + ], + "x-ms-request-id": [ + "ceb7f529-4c8b-4989-9389-031034774151" + ], + "x-ms-correlation-request-id": [ + "ceb7f529-4c8b-4989-9389-031034774151" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004520Z:ceb7f529-4c8b-4989-9389-031034774151" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:20 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c9b32e86-5afe-4633-bff8-6d54d7f34749\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31833" + ], + "x-ms-request-id": [ + "b8437d73-7793-44c7-8e79-df1387eab2c7" + ], + "x-ms-correlation-request-id": [ + "b8437d73-7793-44c7-8e79-df1387eab2c7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004522Z:b8437d73-7793-44c7-8e79-df1387eab2c7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c9b32e86-5afe-4633-bff8-6d54d7f34749\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31831" + ], + "x-ms-request-id": [ + "97289b8d-6d3e-489a-892a-a5c05fca663e" + ], + "x-ms-correlation-request-id": [ + "97289b8d-6d3e-489a-892a-a5c05fca663e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004524Z:97289b8d-6d3e-489a-892a-a5c05fca663e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c9b32e86-5afe-4633-bff8-6d54d7f34749\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31829" + ], + "x-ms-request-id": [ + "3a82d2f9-d6fc-4b25-87cc-6aa5f39c478f" + ], + "x-ms-correlation-request-id": [ + "3a82d2f9-d6fc-4b25-87cc-6aa5f39c478f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004526Z:3a82d2f9-d6fc-4b25-87cc-6aa5f39c478f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c9b32e86-5afe-4633-bff8-6d54d7f34749\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31827" + ], + "x-ms-request-id": [ + "a8ee977f-247b-449e-aeac-ae9c19d5b501" + ], + "x-ms-correlation-request-id": [ + "a8ee977f-247b-449e-aeac-ae9c19d5b501" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004528Z:a8ee977f-247b-449e-aeac-ae9c19d5b501" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c9b32e86-5afe-4633-bff8-6d54d7f34749\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31825" + ], + "x-ms-request-id": [ + "b11866bc-4e06-4f21-99bc-2ea46f07dfc4" + ], + "x-ms-correlation-request-id": [ + "b11866bc-4e06-4f21-99bc-2ea46f07dfc4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004531Z:b11866bc-4e06-4f21-99bc-2ea46f07dfc4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:31 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c9b32e86-5afe-4633-bff8-6d54d7f34749\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31823" + ], + "x-ms-request-id": [ + "8500f448-f865-46b3-a5ec-f51023393beb" + ], + "x-ms-correlation-request-id": [ + "8500f448-f865-46b3-a5ec-f51023393beb" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004533Z:8500f448-f865-46b3-a5ec-f51023393beb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:32 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c9b32e86-5afe-4633-bff8-6d54d7f34749\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31821" + ], + "x-ms-request-id": [ + "c582469d-cb74-42e6-b016-b97bbb6dcb57" + ], + "x-ms-correlation-request-id": [ + "c582469d-cb74-42e6-b016-b97bbb6dcb57" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004535Z:c582469d-cb74-42e6-b016-b97bbb6dcb57" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c9b32e86-5afe-4633-bff8-6d54d7f34749\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31819" + ], + "x-ms-request-id": [ + "0f5079a5-7edb-42a3-8733-a5c5eeb99c5e" + ], + "x-ms-correlation-request-id": [ + "0f5079a5-7edb-42a3-8733-a5c5eeb99c5e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004537Z:0f5079a5-7edb-42a3-8733-a5c5eeb99c5e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:37 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c9b32e86-5afe-4633-bff8-6d54d7f34749\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31817" + ], + "x-ms-request-id": [ + "c7afbe20-c859-4a81-855b-bf9bb697d262" + ], + "x-ms-correlation-request-id": [ + "c7afbe20-c859-4a81-855b-bf9bb697d262" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004540Z:c7afbe20-c859-4a81-855b-bf9bb697d262" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:40 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c9b32e86-5afe-4633-bff8-6d54d7f34749\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31815" + ], + "x-ms-request-id": [ + "3834adf0-852b-48b3-879b-12acb9ddaf53" + ], + "x-ms-correlation-request-id": [ + "3834adf0-852b-48b3-879b-12acb9ddaf53" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004542Z:3834adf0-852b-48b3-879b-12acb9ddaf53" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c9b32e86-5afe-4633-bff8-6d54d7f34749\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31813" + ], + "x-ms-request-id": [ + "d8d2b028-da76-4052-877a-b5232e169586" + ], + "x-ms-correlation-request-id": [ + "d8d2b028-da76-4052-877a-b5232e169586" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004544Z:d8d2b028-da76-4052-877a-b5232e169586" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c9b32e86-5afe-4633-bff8-6d54d7f34749\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31811" + ], + "x-ms-request-id": [ + "fc659e8e-51d1-4ce9-bd8f-21afb216ba7f" + ], + "x-ms-correlation-request-id": [ + "fc659e8e-51d1-4ce9-bd8f-21afb216ba7f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004546Z:fc659e8e-51d1-4ce9-bd8f-21afb216ba7f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c9b32e86-5afe-4633-bff8-6d54d7f34749\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31809" + ], + "x-ms-request-id": [ + "a9301e31-6373-4dea-bcdd-962840df1673" + ], + "x-ms-correlation-request-id": [ + "a9301e31-6373-4dea-bcdd-962840df1673" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004549Z:a9301e31-6373-4dea-bcdd-962840df1673" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c9b32e86-5afe-4633-bff8-6d54d7f34749\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31807" + ], + "x-ms-request-id": [ + "cc400411-96e5-499b-af9e-757f2c277f67" + ], + "x-ms-correlation-request-id": [ + "cc400411-96e5-499b-af9e-757f2c277f67" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004551Z:cc400411-96e5-499b-af9e-757f2c277f67" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"0840e80b-0de1-4817-8a18-8acaefdb90bb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31805" + ], + "x-ms-request-id": [ + "5eedf72b-89fa-42fb-999f-4ca6b904a811" + ], + "x-ms-correlation-request-id": [ + "5eedf72b-89fa-42fb-999f-4ca6b904a811" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004553Z:5eedf72b-89fa-42fb-999f-4ca6b904a811" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"0840e80b-0de1-4817-8a18-8acaefdb90bb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31803" + ], + "x-ms-request-id": [ + "fc75c22a-8608-45a1-adcf-1a7a824360c9" + ], + "x-ms-correlation-request-id": [ + "fc75c22a-8608-45a1-adcf-1a7a824360c9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004555Z:fc75c22a-8608-45a1-adcf-1a7a824360c9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"0840e80b-0de1-4817-8a18-8acaefdb90bb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31801" + ], + "x-ms-request-id": [ + "74e6fc49-7d85-4e54-b844-f5977d7f6178" + ], + "x-ms-correlation-request-id": [ + "74e6fc49-7d85-4e54-b844-f5977d7f6178" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004557Z:74e6fc49-7d85-4e54-b844-f5977d7f6178" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"0840e80b-0de1-4817-8a18-8acaefdb90bb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31799" + ], + "x-ms-request-id": [ + "66f7e85c-9cb4-483e-8a02-9998b28527ab" + ], + "x-ms-correlation-request-id": [ + "66f7e85c-9cb4-483e-8a02-9998b28527ab" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004600Z:66f7e85c-9cb4-483e-8a02-9998b28527ab" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"0840e80b-0de1-4817-8a18-8acaefdb90bb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31797" + ], + "x-ms-request-id": [ + "ebd03777-c79d-4ae7-b73f-c716e16c2e92" + ], + "x-ms-correlation-request-id": [ + "ebd03777-c79d-4ae7-b73f-c716e16c2e92" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004602Z:ebd03777-c79d-4ae7-b73f-c716e16c2e92" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:02 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"0840e80b-0de1-4817-8a18-8acaefdb90bb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31795" + ], + "x-ms-request-id": [ + "94fd3b10-e0a9-4734-acbe-ba7e0c56a2d7" + ], + "x-ms-correlation-request-id": [ + "94fd3b10-e0a9-4734-acbe-ba7e0c56a2d7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004604Z:94fd3b10-e0a9-4734-acbe-ba7e0c56a2d7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"0840e80b-0de1-4817-8a18-8acaefdb90bb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31793" + ], + "x-ms-request-id": [ + "e4148686-08e0-4b94-9b19-27821331739e" + ], + "x-ms-correlation-request-id": [ + "e4148686-08e0-4b94-9b19-27821331739e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004606Z:e4148686-08e0-4b94-9b19-27821331739e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"0840e80b-0de1-4817-8a18-8acaefdb90bb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31791" + ], + "x-ms-request-id": [ + "80c44103-f6cc-4b24-b980-3240f3b2e793" + ], + "x-ms-correlation-request-id": [ + "80c44103-f6cc-4b24-b980-3240f3b2e793" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004609Z:80c44103-f6cc-4b24-b980-3240f3b2e793" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:09 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"0840e80b-0de1-4817-8a18-8acaefdb90bb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31789" + ], + "x-ms-request-id": [ + "9cbb2ae7-12e0-4042-84c1-c5bbaf71222e" + ], + "x-ms-correlation-request-id": [ + "9cbb2ae7-12e0-4042-84c1-c5bbaf71222e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004611Z:9cbb2ae7-12e0-4042-84c1-c5bbaf71222e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:11 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"0840e80b-0de1-4817-8a18-8acaefdb90bb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31787" + ], + "x-ms-request-id": [ + "0fb35d58-4cb5-47ba-8c07-6b2fbb886b21" + ], + "x-ms-correlation-request-id": [ + "0fb35d58-4cb5-47ba-8c07-6b2fbb886b21" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004613Z:0fb35d58-4cb5-47ba-8c07-6b2fbb886b21" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:12 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"0840e80b-0de1-4817-8a18-8acaefdb90bb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31785" + ], + "x-ms-request-id": [ + "07cb1c17-8d5b-43db-8343-fbeefa6d98c5" + ], + "x-ms-correlation-request-id": [ + "07cb1c17-8d5b-43db-8343-fbeefa6d98c5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004615Z:07cb1c17-8d5b-43db-8343-fbeefa6d98c5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:14 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"0840e80b-0de1-4817-8a18-8acaefdb90bb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31783" + ], + "x-ms-request-id": [ + "fccfc0e5-47ce-43ec-9031-d14b98cae075" + ], + "x-ms-correlation-request-id": [ + "fccfc0e5-47ce-43ec-9031-d14b98cae075" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004618Z:fccfc0e5-47ce-43ec-9031-d14b98cae075" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:18 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"0840e80b-0de1-4817-8a18-8acaefdb90bb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31781" + ], + "x-ms-request-id": [ + "f23743e9-6395-4c4a-a46a-46cddf8412be" + ], + "x-ms-correlation-request-id": [ + "f23743e9-6395-4c4a-a46a-46cddf8412be" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004620Z:f23743e9-6395-4c4a-a46a-46cddf8412be" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:20 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"0840e80b-0de1-4817-8a18-8acaefdb90bb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31779" + ], + "x-ms-request-id": [ + "96a228e7-70a9-4adc-aa50-810db9d1cfb6" + ], + "x-ms-correlation-request-id": [ + "96a228e7-70a9-4adc-aa50-810db9d1cfb6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004622Z:96a228e7-70a9-4adc-aa50-810db9d1cfb6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"0840e80b-0de1-4817-8a18-8acaefdb90bb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31777" + ], + "x-ms-request-id": [ + "7a24de7e-64ef-488b-a02d-0e3fa10d3c7d" + ], + "x-ms-correlation-request-id": [ + "7a24de7e-64ef-488b-a02d-0e3fa10d3c7d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004624Z:7a24de7e-64ef-488b-a02d-0e3fa10d3c7d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"0840e80b-0de1-4817-8a18-8acaefdb90bb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31775" + ], + "x-ms-request-id": [ + "40ead585-7b77-4813-8312-b8c7a1beae78" + ], + "x-ms-correlation-request-id": [ + "40ead585-7b77-4813-8312-b8c7a1beae78" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004627Z:40ead585-7b77-4813-8312-b8c7a1beae78" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:27 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"0840e80b-0de1-4817-8a18-8acaefdb90bb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31773" + ], + "x-ms-request-id": [ + "6d839fb3-f480-4a7e-9467-81db6076b84f" + ], + "x-ms-correlation-request-id": [ + "6d839fb3-f480-4a7e-9467-81db6076b84f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004629Z:6d839fb3-f480-4a7e-9467-81db6076b84f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:29 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"0840e80b-0de1-4817-8a18-8acaefdb90bb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31771" + ], + "x-ms-request-id": [ + "624d9870-d24b-4255-9081-994bd096eb83" + ], + "x-ms-correlation-request-id": [ + "624d9870-d24b-4255-9081-994bd096eb83" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004631Z:624d9870-d24b-4255-9081-994bd096eb83" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:31 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"0840e80b-0de1-4817-8a18-8acaefdb90bb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31769" + ], + "x-ms-request-id": [ + "27f70b5a-34f2-4941-834a-d61a4d61ec5f" + ], + "x-ms-correlation-request-id": [ + "27f70b5a-34f2-4941-834a-d61a4d61ec5f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004633Z:27f70b5a-34f2-4941-834a-d61a4d61ec5f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"0840e80b-0de1-4817-8a18-8acaefdb90bb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31767" + ], + "x-ms-request-id": [ + "ee78e4f8-820c-4c7e-ba4b-2057c55a4ce7" + ], + "x-ms-correlation-request-id": [ + "ee78e4f8-820c-4c7e-ba4b-2057c55a4ce7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004636Z:ee78e4f8-820c-4c7e-ba4b-2057c55a4ce7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:36 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"0840e80b-0de1-4817-8a18-8acaefdb90bb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31765" + ], + "x-ms-request-id": [ + "e6af60f5-f2d6-40d4-8ff3-616199146e6b" + ], + "x-ms-correlation-request-id": [ + "e6af60f5-f2d6-40d4-8ff3-616199146e6b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004638Z:e6af60f5-f2d6-40d4-8ff3-616199146e6b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:38 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"0840e80b-0de1-4817-8a18-8acaefdb90bb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31763" + ], + "x-ms-request-id": [ + "dd389d41-e1bf-43e4-b4e5-2939f09cadcc" + ], + "x-ms-correlation-request-id": [ + "dd389d41-e1bf-43e4-b4e5-2939f09cadcc" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004640Z:dd389d41-e1bf-43e4-b4e5-2939f09cadcc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:40 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"0840e80b-0de1-4817-8a18-8acaefdb90bb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31761" + ], + "x-ms-request-id": [ + "b6ee3db6-73cb-430b-a21f-c2d7bc14b302" + ], + "x-ms-correlation-request-id": [ + "b6ee3db6-73cb-430b-a21f-c2d7bc14b302" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004642Z:b6ee3db6-73cb-430b-a21f-c2d7bc14b302" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"0840e80b-0de1-4817-8a18-8acaefdb90bb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31759" + ], + "x-ms-request-id": [ + "794b1a0e-e147-4d57-b2ba-009009d396b2" + ], + "x-ms-correlation-request-id": [ + "794b1a0e-e147-4d57-b2ba-009009d396b2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004645Z:794b1a0e-e147-4d57-b2ba-009009d396b2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"0840e80b-0de1-4817-8a18-8acaefdb90bb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31757" + ], + "x-ms-request-id": [ + "03d8ac58-ff8f-4722-be00-55161e045efd" + ], + "x-ms-correlation-request-id": [ + "03d8ac58-ff8f-4722-be00-55161e045efd" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004647Z:03d8ac58-ff8f-4722-be00-55161e045efd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:47 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"0840e80b-0de1-4817-8a18-8acaefdb90bb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31755" + ], + "x-ms-request-id": [ + "c71ab810-c886-4b2e-8d78-78ed853843b2" + ], + "x-ms-correlation-request-id": [ + "c71ab810-c886-4b2e-8d78-78ed853843b2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004649Z:c71ab810-c886-4b2e-8d78-78ed853843b2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"0840e80b-0de1-4817-8a18-8acaefdb90bb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31753" + ], + "x-ms-request-id": [ + "d5c9e805-bfe7-4ac3-b673-b76fbce0000a" + ], + "x-ms-correlation-request-id": [ + "d5c9e805-bfe7-4ac3-b673-b76fbce0000a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004651Z:d5c9e805-bfe7-4ac3-b673-b76fbce0000a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c7946ec1-1824-4a1a-9159-c55c30bfbdc9\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31751" + ], + "x-ms-request-id": [ + "87128a7b-0548-4a39-84a8-501b05a27936" + ], + "x-ms-correlation-request-id": [ + "87128a7b-0548-4a39-84a8-501b05a27936" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004653Z:87128a7b-0548-4a39-84a8-501b05a27936" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c7946ec1-1824-4a1a-9159-c55c30bfbdc9\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31749" + ], + "x-ms-request-id": [ + "40419e1d-b19d-4482-a793-1fd83ba0e8fa" + ], + "x-ms-correlation-request-id": [ + "40419e1d-b19d-4482-a793-1fd83ba0e8fa" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004656Z:40419e1d-b19d-4482-a793-1fd83ba0e8fa" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:56 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c7946ec1-1824-4a1a-9159-c55c30bfbdc9\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31747" + ], + "x-ms-request-id": [ + "dfd4acb9-f100-440d-9d68-9ce1a9b5a4b6" + ], + "x-ms-correlation-request-id": [ + "dfd4acb9-f100-440d-9d68-9ce1a9b5a4b6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004658Z:dfd4acb9-f100-440d-9d68-9ce1a9b5a4b6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c7946ec1-1824-4a1a-9159-c55c30bfbdc9\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31745" + ], + "x-ms-request-id": [ + "6226ce69-d0d1-4a1b-a5b4-156cd1b3fcc2" + ], + "x-ms-correlation-request-id": [ + "6226ce69-d0d1-4a1b-a5b4-156cd1b3fcc2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004700Z:6226ce69-d0d1-4a1b-a5b4-156cd1b3fcc2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c7946ec1-1824-4a1a-9159-c55c30bfbdc9\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31743" + ], + "x-ms-request-id": [ + "f3123a5d-3d84-42d3-b037-38e09963aae3" + ], + "x-ms-correlation-request-id": [ + "f3123a5d-3d84-42d3-b037-38e09963aae3" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004702Z:f3123a5d-3d84-42d3-b037-38e09963aae3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:02 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c7946ec1-1824-4a1a-9159-c55c30bfbdc9\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31741" + ], + "x-ms-request-id": [ + "d46680a0-939a-4031-9a6c-b05821b2aff1" + ], + "x-ms-correlation-request-id": [ + "d46680a0-939a-4031-9a6c-b05821b2aff1" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004705Z:d46680a0-939a-4031-9a6c-b05821b2aff1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c7946ec1-1824-4a1a-9159-c55c30bfbdc9\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31739" + ], + "x-ms-request-id": [ + "dcc57f53-b9cf-4d02-8427-bf521015c67c" + ], + "x-ms-correlation-request-id": [ + "dcc57f53-b9cf-4d02-8427-bf521015c67c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004707Z:dcc57f53-b9cf-4d02-8427-bf521015c67c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:07 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c7946ec1-1824-4a1a-9159-c55c30bfbdc9\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31737" + ], + "x-ms-request-id": [ + "0ac9e8ca-d8e1-475e-918e-8da27371a711" + ], + "x-ms-correlation-request-id": [ + "0ac9e8ca-d8e1-475e-918e-8da27371a711" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004709Z:0ac9e8ca-d8e1-475e-918e-8da27371a711" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:09 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c7946ec1-1824-4a1a-9159-c55c30bfbdc9\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31735" + ], + "x-ms-request-id": [ + "c9631ccc-be4d-489f-9a98-8113cae99a1e" + ], + "x-ms-correlation-request-id": [ + "c9631ccc-be4d-489f-9a98-8113cae99a1e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004711Z:c9631ccc-be4d-489f-9a98-8113cae99a1e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:11 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c7946ec1-1824-4a1a-9159-c55c30bfbdc9\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31733" + ], + "x-ms-request-id": [ + "842b66d2-9459-4608-9a26-85c1ea371709" + ], + "x-ms-correlation-request-id": [ + "842b66d2-9459-4608-9a26-85c1ea371709" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004714Z:842b66d2-9459-4608-9a26-85c1ea371709" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:14 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c7946ec1-1824-4a1a-9159-c55c30bfbdc9\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31731" + ], + "x-ms-request-id": [ + "aa12c5c6-ee09-4689-8e46-80ade140bf8d" + ], + "x-ms-correlation-request-id": [ + "aa12c5c6-ee09-4689-8e46-80ade140bf8d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004716Z:aa12c5c6-ee09-4689-8e46-80ade140bf8d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:15 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c7946ec1-1824-4a1a-9159-c55c30bfbdc9\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31729" + ], + "x-ms-request-id": [ + "3ae8ff06-32bd-47fa-9b11-9e8725699067" + ], + "x-ms-correlation-request-id": [ + "3ae8ff06-32bd-47fa-9b11-9e8725699067" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004718Z:3ae8ff06-32bd-47fa-9b11-9e8725699067" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:18 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c7946ec1-1824-4a1a-9159-c55c30bfbdc9\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31727" + ], + "x-ms-request-id": [ + "84755959-8128-48c5-86bd-5afbfd7ffb0d" + ], + "x-ms-correlation-request-id": [ + "84755959-8128-48c5-86bd-5afbfd7ffb0d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004720Z:84755959-8128-48c5-86bd-5afbfd7ffb0d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:20 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c7946ec1-1824-4a1a-9159-c55c30bfbdc9\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31725" + ], + "x-ms-request-id": [ + "baa5bdd1-295d-4183-a3cc-37a4019c2bfa" + ], + "x-ms-correlation-request-id": [ + "baa5bdd1-295d-4183-a3cc-37a4019c2bfa" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004723Z:baa5bdd1-295d-4183-a3cc-37a4019c2bfa" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:23 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c7946ec1-1824-4a1a-9159-c55c30bfbdc9\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31723" + ], + "x-ms-request-id": [ + "3ed39c99-e2c4-4ece-8ab1-29de2ca35fd9" + ], + "x-ms-correlation-request-id": [ + "3ed39c99-e2c4-4ece-8ab1-29de2ca35fd9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004725Z:3ed39c99-e2c4-4ece-8ab1-29de2ca35fd9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c7946ec1-1824-4a1a-9159-c55c30bfbdc9\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31721" + ], + "x-ms-request-id": [ + "d5049a34-d66f-4c9f-9d83-bebb19a54cd7" + ], + "x-ms-correlation-request-id": [ + "d5049a34-d66f-4c9f-9d83-bebb19a54cd7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004727Z:d5049a34-d66f-4c9f-9d83-bebb19a54cd7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:27 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c7946ec1-1824-4a1a-9159-c55c30bfbdc9\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31719" + ], + "x-ms-request-id": [ + "ccdc9487-aeab-41f4-ab9e-8958d115ef51" + ], + "x-ms-correlation-request-id": [ + "ccdc9487-aeab-41f4-ab9e-8958d115ef51" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004729Z:ccdc9487-aeab-41f4-ab9e-8958d115ef51" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:29 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c7946ec1-1824-4a1a-9159-c55c30bfbdc9\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31717" + ], + "x-ms-request-id": [ + "ab6c6b02-11ca-434f-9aee-70dd5c2b56a5" + ], + "x-ms-correlation-request-id": [ + "ab6c6b02-11ca-434f-9aee-70dd5c2b56a5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004732Z:ab6c6b02-11ca-434f-9aee-70dd5c2b56a5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:32 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c7946ec1-1824-4a1a-9159-c55c30bfbdc9\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31715" + ], + "x-ms-request-id": [ + "8366a81b-ed69-4390-b9f3-4a0805cb62f5" + ], + "x-ms-correlation-request-id": [ + "8366a81b-ed69-4390-b9f3-4a0805cb62f5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004734Z:8366a81b-ed69-4390-b9f3-4a0805cb62f5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:34 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c7946ec1-1824-4a1a-9159-c55c30bfbdc9\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31713" + ], + "x-ms-request-id": [ + "6605f03f-ec5a-47d8-b3c2-b128670a4cbf" + ], + "x-ms-correlation-request-id": [ + "6605f03f-ec5a-47d8-b3c2-b128670a4cbf" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004736Z:6605f03f-ec5a-47d8-b3c2-b128670a4cbf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:36 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c7946ec1-1824-4a1a-9159-c55c30bfbdc9\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31711" + ], + "x-ms-request-id": [ + "8c31e4c6-dce7-4827-83bb-a383eaea12fa" + ], + "x-ms-correlation-request-id": [ + "8c31e4c6-dce7-4827-83bb-a383eaea12fa" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004738Z:8c31e4c6-dce7-4827-83bb-a383eaea12fa" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:38 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c7946ec1-1824-4a1a-9159-c55c30bfbdc9\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31709" + ], + "x-ms-request-id": [ + "c1a5e518-7d1d-4e55-a4bf-1729325dca63" + ], + "x-ms-correlation-request-id": [ + "c1a5e518-7d1d-4e55-a4bf-1729325dca63" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004741Z:c1a5e518-7d1d-4e55-a4bf-1729325dca63" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c7946ec1-1824-4a1a-9159-c55c30bfbdc9\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31707" + ], + "x-ms-request-id": [ + "30e27476-761b-4709-8c1c-8a2ef989676e" + ], + "x-ms-correlation-request-id": [ + "30e27476-761b-4709-8c1c-8a2ef989676e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004743Z:30e27476-761b-4709-8c1c-8a2ef989676e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c7946ec1-1824-4a1a-9159-c55c30bfbdc9\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31705" + ], + "x-ms-request-id": [ + "d064ee24-7b5f-43d1-86ae-c5074ef15783" + ], + "x-ms-correlation-request-id": [ + "d064ee24-7b5f-43d1-86ae-c5074ef15783" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004745Z:d064ee24-7b5f-43d1-86ae-c5074ef15783" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c7946ec1-1824-4a1a-9159-c55c30bfbdc9\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31703" + ], + "x-ms-request-id": [ + "a4ef1dbe-d537-4611-a48f-bcadc1aa77d9" + ], + "x-ms-correlation-request-id": [ + "a4ef1dbe-d537-4611-a48f-bcadc1aa77d9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004747Z:a4ef1dbe-d537-4611-a48f-bcadc1aa77d9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c7946ec1-1824-4a1a-9159-c55c30bfbdc9\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31701" + ], + "x-ms-request-id": [ + "46723c31-8256-40d6-a873-3f16b51e676a" + ], + "x-ms-correlation-request-id": [ + "46723c31-8256-40d6-a873-3f16b51e676a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004749Z:46723c31-8256-40d6-a873-3f16b51e676a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c7946ec1-1824-4a1a-9159-c55c30bfbdc9\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31699" + ], + "x-ms-request-id": [ + "44db0b97-ed00-4b81-9341-1641336be661" + ], + "x-ms-correlation-request-id": [ + "44db0b97-ed00-4b81-9341-1641336be661" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004752Z:44db0b97-ed00-4b81-9341-1641336be661" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"c7946ec1-1824-4a1a-9159-c55c30bfbdc9\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31697" + ], + "x-ms-request-id": [ + "b13bf54d-4816-4213-8342-9fc59d433539" + ], + "x-ms-correlation-request-id": [ + "b13bf54d-4816-4213-8342-9fc59d433539" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004754Z:b13bf54d-4816-4213-8342-9fc59d433539" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"f5585d73-e7ba-4444-ac0d-10de1158751f\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31695" + ], + "x-ms-request-id": [ + "5ca98c2b-6a76-49cd-8af9-985468fcb005" + ], + "x-ms-correlation-request-id": [ + "5ca98c2b-6a76-49cd-8af9-985468fcb005" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004756Z:5ca98c2b-6a76-49cd-8af9-985468fcb005" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:56 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"f5585d73-e7ba-4444-ac0d-10de1158751f\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31693" + ], + "x-ms-request-id": [ + "7016198b-fc50-432c-8885-7ef3cfc2364c" + ], + "x-ms-correlation-request-id": [ + "7016198b-fc50-432c-8885-7ef3cfc2364c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004758Z:7016198b-fc50-432c-8885-7ef3cfc2364c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"f5585d73-e7ba-4444-ac0d-10de1158751f\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31691" + ], + "x-ms-request-id": [ + "cf81a476-fe9c-433f-a0c0-b843d0ab36c7" + ], + "x-ms-correlation-request-id": [ + "cf81a476-fe9c-433f-a0c0-b843d0ab36c7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004801Z:cf81a476-fe9c-433f-a0c0-b843d0ab36c7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"f5585d73-e7ba-4444-ac0d-10de1158751f\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31689" + ], + "x-ms-request-id": [ + "9ed66525-283b-4b1e-b7a0-3485ce921939" + ], + "x-ms-correlation-request-id": [ + "9ed66525-283b-4b1e-b7a0-3485ce921939" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004803Z:9ed66525-283b-4b1e-b7a0-3485ce921939" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"f5585d73-e7ba-4444-ac0d-10de1158751f\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31687" + ], + "x-ms-request-id": [ + "399860a9-fef7-4299-9bad-91a4721d60d0" + ], + "x-ms-correlation-request-id": [ + "399860a9-fef7-4299-9bad-91a4721d60d0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004805Z:399860a9-fef7-4299-9bad-91a4721d60d0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:05 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"f5585d73-e7ba-4444-ac0d-10de1158751f\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31685" + ], + "x-ms-request-id": [ + "5df181cd-506d-49c1-aba1-4a918ec337df" + ], + "x-ms-correlation-request-id": [ + "5df181cd-506d-49c1-aba1-4a918ec337df" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004807Z:5df181cd-506d-49c1-aba1-4a918ec337df" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:07 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"f5585d73-e7ba-4444-ac0d-10de1158751f\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31683" + ], + "x-ms-request-id": [ + "c8855a43-53fb-4e40-b9f0-182437fb0fdf" + ], + "x-ms-correlation-request-id": [ + "c8855a43-53fb-4e40-b9f0-182437fb0fdf" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004810Z:c8855a43-53fb-4e40-b9f0-182437fb0fdf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"f5585d73-e7ba-4444-ac0d-10de1158751f\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31681" + ], + "x-ms-request-id": [ + "e6d8e9bb-23e9-4be8-bbe8-65671b80a150" + ], + "x-ms-correlation-request-id": [ + "e6d8e9bb-23e9-4be8-bbe8-65671b80a150" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004812Z:e6d8e9bb-23e9-4be8-bbe8-65671b80a150" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:12 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"f5585d73-e7ba-4444-ac0d-10de1158751f\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31679" + ], + "x-ms-request-id": [ + "0bb20459-e7af-4f1b-8ab1-169279bb5a2d" + ], + "x-ms-correlation-request-id": [ + "0bb20459-e7af-4f1b-8ab1-169279bb5a2d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004814Z:0bb20459-e7af-4f1b-8ab1-169279bb5a2d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:14 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"f5585d73-e7ba-4444-ac0d-10de1158751f\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31677" + ], + "x-ms-request-id": [ + "1f32c5e0-57b6-4668-8f6a-22990c270df5" + ], + "x-ms-correlation-request-id": [ + "1f32c5e0-57b6-4668-8f6a-22990c270df5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004816Z:1f32c5e0-57b6-4668-8f6a-22990c270df5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:16 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"f5585d73-e7ba-4444-ac0d-10de1158751f\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31675" + ], + "x-ms-request-id": [ + "50dafffe-5526-4b31-96fa-da089a9b00d3" + ], + "x-ms-correlation-request-id": [ + "50dafffe-5526-4b31-96fa-da089a9b00d3" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004819Z:50dafffe-5526-4b31-96fa-da089a9b00d3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"f5585d73-e7ba-4444-ac0d-10de1158751f\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31673" + ], + "x-ms-request-id": [ + "50f91a30-fc8a-4cd5-9a46-f5139277d4e9" + ], + "x-ms-correlation-request-id": [ + "50f91a30-fc8a-4cd5-9a46-f5139277d4e9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004821Z:50f91a30-fc8a-4cd5-9a46-f5139277d4e9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:21 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"f5585d73-e7ba-4444-ac0d-10de1158751f\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31671" + ], + "x-ms-request-id": [ + "e99e4bbc-58f5-46db-97d1-c6fb0f2123c1" + ], + "x-ms-correlation-request-id": [ + "e99e4bbc-58f5-46db-97d1-c6fb0f2123c1" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004823Z:e99e4bbc-58f5-46db-97d1-c6fb0f2123c1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:23 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"f5585d73-e7ba-4444-ac0d-10de1158751f\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31669" + ], + "x-ms-request-id": [ + "177061c2-e2e6-42a9-b734-69d678b7dfc4" + ], + "x-ms-correlation-request-id": [ + "177061c2-e2e6-42a9-b734-69d678b7dfc4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004825Z:177061c2-e2e6-42a9-b734-69d678b7dfc4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:25 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"f5585d73-e7ba-4444-ac0d-10de1158751f\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31667" + ], + "x-ms-request-id": [ + "bbe9b380-ff38-4890-9c4c-830df225cd8a" + ], + "x-ms-correlation-request-id": [ + "bbe9b380-ff38-4890-9c4c-830df225cd8a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004828Z:bbe9b380-ff38-4890-9c4c-830df225cd8a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"f5585d73-e7ba-4444-ac0d-10de1158751f\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31665" + ], + "x-ms-request-id": [ + "cacd4bb6-9693-44bc-a9e7-ec2156370515" + ], + "x-ms-correlation-request-id": [ + "cacd4bb6-9693-44bc-a9e7-ec2156370515" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004830Z:cacd4bb6-9693-44bc-a9e7-ec2156370515" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:30 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"f5585d73-e7ba-4444-ac0d-10de1158751f\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31663" + ], + "x-ms-request-id": [ + "1848fec5-97f5-496c-aeba-d00fec8f0866" + ], + "x-ms-correlation-request-id": [ + "1848fec5-97f5-496c-aeba-d00fec8f0866" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004832Z:1848fec5-97f5-496c-aeba-d00fec8f0866" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:32 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"f5585d73-e7ba-4444-ac0d-10de1158751f\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31661" + ], + "x-ms-request-id": [ + "62f9f019-c1cf-4b05-bbc6-248263e748db" + ], + "x-ms-correlation-request-id": [ + "62f9f019-c1cf-4b05-bbc6-248263e748db" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004834Z:62f9f019-c1cf-4b05-bbc6-248263e748db" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:34 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"f5585d73-e7ba-4444-ac0d-10de1158751f\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31659" + ], + "x-ms-request-id": [ + "d6329164-8ef8-42b7-8a3b-89008057d805" + ], + "x-ms-correlation-request-id": [ + "d6329164-8ef8-42b7-8a3b-89008057d805" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004837Z:d6329164-8ef8-42b7-8a3b-89008057d805" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:37 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"f5585d73-e7ba-4444-ac0d-10de1158751f\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31657" + ], + "x-ms-request-id": [ + "83ae32e5-7632-4640-bfbd-fd2ef40c64dd" + ], + "x-ms-correlation-request-id": [ + "83ae32e5-7632-4640-bfbd-fd2ef40c64dd" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004839Z:83ae32e5-7632-4640-bfbd-fd2ef40c64dd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"f5585d73-e7ba-4444-ac0d-10de1158751f\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31655" + ], + "x-ms-request-id": [ + "06c9cf97-c44a-4550-b4fe-ea79fa22b8b8" + ], + "x-ms-correlation-request-id": [ + "06c9cf97-c44a-4550-b4fe-ea79fa22b8b8" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004841Z:06c9cf97-c44a-4550-b4fe-ea79fa22b8b8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"f5585d73-e7ba-4444-ac0d-10de1158751f\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31653" + ], + "x-ms-request-id": [ + "e1247f0a-7405-4660-8332-da5ed14b8c93" + ], + "x-ms-correlation-request-id": [ + "e1247f0a-7405-4660-8332-da5ed14b8c93" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004843Z:e1247f0a-7405-4660-8332-da5ed14b8c93" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"f5585d73-e7ba-4444-ac0d-10de1158751f\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31651" + ], + "x-ms-request-id": [ + "176c3845-4cdc-4a74-a30d-904c681fbb0e" + ], + "x-ms-correlation-request-id": [ + "176c3845-4cdc-4a74-a30d-904c681fbb0e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004846Z:176c3845-4cdc-4a74-a30d-904c681fbb0e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"f5585d73-e7ba-4444-ac0d-10de1158751f\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31649" + ], + "x-ms-request-id": [ + "6a111bbd-a978-41c7-9511-444fe547c137" + ], + "x-ms-correlation-request-id": [ + "6a111bbd-a978-41c7-9511-444fe547c137" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004848Z:6a111bbd-a978-41c7-9511-444fe547c137" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"f5585d73-e7ba-4444-ac0d-10de1158751f\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31647" + ], + "x-ms-request-id": [ + "b276677b-028c-4efb-9255-9593833323f2" + ], + "x-ms-correlation-request-id": [ + "b276677b-028c-4efb-9255-9593833323f2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004850Z:b276677b-028c-4efb-9255-9593833323f2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"f5585d73-e7ba-4444-ac0d-10de1158751f\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31645" + ], + "x-ms-request-id": [ + "e6b50e15-6e83-483b-9c63-5637fac1f88e" + ], + "x-ms-correlation-request-id": [ + "e6b50e15-6e83-483b-9c63-5637fac1f88e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004852Z:e6b50e15-6e83-483b-9c63-5637fac1f88e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:52 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"f5585d73-e7ba-4444-ac0d-10de1158751f\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31643" + ], + "x-ms-request-id": [ + "567f91e9-277d-40cb-85aa-9000dedffbbd" + ], + "x-ms-correlation-request-id": [ + "567f91e9-277d-40cb-85aa-9000dedffbbd" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004854Z:567f91e9-277d-40cb-85aa-9000dedffbbd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"277e16db-5172-4908-a13b-3edb4b28b8fd\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31641" + ], + "x-ms-request-id": [ + "190692a6-13ae-4327-9224-dc4f3c7acb43" + ], + "x-ms-correlation-request-id": [ + "190692a6-13ae-4327-9224-dc4f3c7acb43" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004857Z:190692a6-13ae-4327-9224-dc4f3c7acb43" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"277e16db-5172-4908-a13b-3edb4b28b8fd\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31639" + ], + "x-ms-request-id": [ + "bf177d1b-1832-4053-87be-daa371a52162" + ], + "x-ms-correlation-request-id": [ + "bf177d1b-1832-4053-87be-daa371a52162" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004859Z:bf177d1b-1832-4053-87be-daa371a52162" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"277e16db-5172-4908-a13b-3edb4b28b8fd\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31637" + ], + "x-ms-request-id": [ + "da8f017b-5309-4eed-a7b9-9c81dfcd49d6" + ], + "x-ms-correlation-request-id": [ + "da8f017b-5309-4eed-a7b9-9c81dfcd49d6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004901Z:da8f017b-5309-4eed-a7b9-9c81dfcd49d6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"277e16db-5172-4908-a13b-3edb4b28b8fd\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31635" + ], + "x-ms-request-id": [ + "0782be8f-2c89-49f5-9360-e2a6f6165bf6" + ], + "x-ms-correlation-request-id": [ + "0782be8f-2c89-49f5-9360-e2a6f6165bf6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004903Z:0782be8f-2c89-49f5-9360-e2a6f6165bf6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"277e16db-5172-4908-a13b-3edb4b28b8fd\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31633" + ], + "x-ms-request-id": [ + "bc26d74b-d156-4bbe-a3cd-fd8a5245fbca" + ], + "x-ms-correlation-request-id": [ + "bc26d74b-d156-4bbe-a3cd-fd8a5245fbca" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004906Z:bc26d74b-d156-4bbe-a3cd-fd8a5245fbca" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"277e16db-5172-4908-a13b-3edb4b28b8fd\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31631" + ], + "x-ms-request-id": [ + "ed391962-6e62-409e-b8d2-e892ef55eb3c" + ], + "x-ms-correlation-request-id": [ + "ed391962-6e62-409e-b8d2-e892ef55eb3c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004908Z:ed391962-6e62-409e-b8d2-e892ef55eb3c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:08 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"277e16db-5172-4908-a13b-3edb4b28b8fd\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31629" + ], + "x-ms-request-id": [ + "1dc4d884-bf61-404a-9191-e63a5bf1d8fd" + ], + "x-ms-correlation-request-id": [ + "1dc4d884-bf61-404a-9191-e63a5bf1d8fd" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004910Z:1dc4d884-bf61-404a-9191-e63a5bf1d8fd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"277e16db-5172-4908-a13b-3edb4b28b8fd\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31627" + ], + "x-ms-request-id": [ + "eb20dd9c-95b4-46c4-962c-3c93ae8c97d8" + ], + "x-ms-correlation-request-id": [ + "eb20dd9c-95b4-46c4-962c-3c93ae8c97d8" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004912Z:eb20dd9c-95b4-46c4-962c-3c93ae8c97d8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:12 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"277e16db-5172-4908-a13b-3edb4b28b8fd\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31625" + ], + "x-ms-request-id": [ + "de476b22-c183-4de0-a3fb-289fad68fb29" + ], + "x-ms-correlation-request-id": [ + "de476b22-c183-4de0-a3fb-289fad68fb29" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004915Z:de476b22-c183-4de0-a3fb-289fad68fb29" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:15 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"277e16db-5172-4908-a13b-3edb4b28b8fd\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31623" + ], + "x-ms-request-id": [ + "88829c48-bd7b-4a55-95d8-38696039fe84" + ], + "x-ms-correlation-request-id": [ + "88829c48-bd7b-4a55-95d8-38696039fe84" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004917Z:88829c48-bd7b-4a55-95d8-38696039fe84" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:17 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"277e16db-5172-4908-a13b-3edb4b28b8fd\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31621" + ], + "x-ms-request-id": [ + "14d96cd2-1a19-4bce-a95a-4d4deeaeed0e" + ], + "x-ms-correlation-request-id": [ + "14d96cd2-1a19-4bce-a95a-4d4deeaeed0e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004919Z:14d96cd2-1a19-4bce-a95a-4d4deeaeed0e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:18 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"277e16db-5172-4908-a13b-3edb4b28b8fd\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31619" + ], + "x-ms-request-id": [ + "71d74366-e0a2-4bc8-9dc3-f61c6dce6123" + ], + "x-ms-correlation-request-id": [ + "71d74366-e0a2-4bc8-9dc3-f61c6dce6123" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004921Z:71d74366-e0a2-4bc8-9dc3-f61c6dce6123" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:21 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"277e16db-5172-4908-a13b-3edb4b28b8fd\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31617" + ], + "x-ms-request-id": [ + "6bf0e6d2-5f02-4427-b753-4d2ba399e65d" + ], + "x-ms-correlation-request-id": [ + "6bf0e6d2-5f02-4427-b753-4d2ba399e65d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004924Z:6bf0e6d2-5f02-4427-b753-4d2ba399e65d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:23 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"277e16db-5172-4908-a13b-3edb4b28b8fd\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31615" + ], + "x-ms-request-id": [ + "5cc1e2d0-9449-49cd-9ee4-3aa51ee7bde7" + ], + "x-ms-correlation-request-id": [ + "5cc1e2d0-9449-49cd-9ee4-3aa51ee7bde7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004926Z:5cc1e2d0-9449-49cd-9ee4-3aa51ee7bde7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"277e16db-5172-4908-a13b-3edb4b28b8fd\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31613" + ], + "x-ms-request-id": [ + "7f205308-4f6a-41ac-8e3d-910dbfde9779" + ], + "x-ms-correlation-request-id": [ + "7f205308-4f6a-41ac-8e3d-910dbfde9779" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004928Z:7f205308-4f6a-41ac-8e3d-910dbfde9779" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"277e16db-5172-4908-a13b-3edb4b28b8fd\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31611" + ], + "x-ms-request-id": [ + "6fa96222-aa4c-4354-a542-756f6b9cf867" + ], + "x-ms-correlation-request-id": [ + "6fa96222-aa4c-4354-a542-756f6b9cf867" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004930Z:6fa96222-aa4c-4354-a542-756f6b9cf867" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:30 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"277e16db-5172-4908-a13b-3edb4b28b8fd\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31609" + ], + "x-ms-request-id": [ + "a3236cd2-fb9f-4db7-9fc4-a28ff7f36657" + ], + "x-ms-correlation-request-id": [ + "a3236cd2-fb9f-4db7-9fc4-a28ff7f36657" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004932Z:a3236cd2-fb9f-4db7-9fc4-a28ff7f36657" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:32 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"277e16db-5172-4908-a13b-3edb4b28b8fd\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31607" + ], + "x-ms-request-id": [ + "4f7f1631-76fb-40fe-8cd9-249cfde4d8f2" + ], + "x-ms-correlation-request-id": [ + "4f7f1631-76fb-40fe-8cd9-249cfde4d8f2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004935Z:4f7f1631-76fb-40fe-8cd9-249cfde4d8f2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"277e16db-5172-4908-a13b-3edb4b28b8fd\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31605" + ], + "x-ms-request-id": [ + "827e6946-da3d-43e6-8066-3bb714a2dd42" + ], + "x-ms-correlation-request-id": [ + "827e6946-da3d-43e6-8066-3bb714a2dd42" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004937Z:827e6946-da3d-43e6-8066-3bb714a2dd42" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:37 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"277e16db-5172-4908-a13b-3edb4b28b8fd\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31603" + ], + "x-ms-request-id": [ + "c3ad8dc5-d9d9-41e8-bc80-0b8799f8736b" + ], + "x-ms-correlation-request-id": [ + "c3ad8dc5-d9d9-41e8-bc80-0b8799f8736b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004939Z:c3ad8dc5-d9d9-41e8-bc80-0b8799f8736b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"277e16db-5172-4908-a13b-3edb4b28b8fd\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31601" + ], + "x-ms-request-id": [ + "9eadd9c7-130e-4442-b4c4-0c3b6400dd6a" + ], + "x-ms-correlation-request-id": [ + "9eadd9c7-130e-4442-b4c4-0c3b6400dd6a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004941Z:9eadd9c7-130e-4442-b4c4-0c3b6400dd6a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"277e16db-5172-4908-a13b-3edb4b28b8fd\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31599" + ], + "x-ms-request-id": [ + "d63f77b6-05ab-4275-aba0-77f33c355ee9" + ], + "x-ms-correlation-request-id": [ + "d63f77b6-05ab-4275-aba0-77f33c355ee9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004944Z:d63f77b6-05ab-4275-aba0-77f33c355ee9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"277e16db-5172-4908-a13b-3edb4b28b8fd\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31597" + ], + "x-ms-request-id": [ + "8fdf9575-f498-4fa2-ba96-2788979092bc" + ], + "x-ms-correlation-request-id": [ + "8fdf9575-f498-4fa2-ba96-2788979092bc" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004946Z:8fdf9575-f498-4fa2-ba96-2788979092bc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"277e16db-5172-4908-a13b-3edb4b28b8fd\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31595" + ], + "x-ms-request-id": [ + "55bc56e6-fa07-4566-b2dd-a8fa16c7c8c7" + ], + "x-ms-correlation-request-id": [ + "55bc56e6-fa07-4566-b2dd-a8fa16c7c8c7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004948Z:55bc56e6-fa07-4566-b2dd-a8fa16c7c8c7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"277e16db-5172-4908-a13b-3edb4b28b8fd\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31593" + ], + "x-ms-request-id": [ + "944bf228-fbcc-42dc-b848-bdd04cc175ad" + ], + "x-ms-correlation-request-id": [ + "944bf228-fbcc-42dc-b848-bdd04cc175ad" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004950Z:944bf228-fbcc-42dc-b848-bdd04cc175ad" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"277e16db-5172-4908-a13b-3edb4b28b8fd\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31591" + ], + "x-ms-request-id": [ + "587c2623-2f46-46b3-8d0a-dab9c08950fe" + ], + "x-ms-correlation-request-id": [ + "587c2623-2f46-46b3-8d0a-dab9c08950fe" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004952Z:587c2623-2f46-46b3-8d0a-dab9c08950fe" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:52 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"277e16db-5172-4908-a13b-3edb4b28b8fd\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31589" + ], + "x-ms-request-id": [ + "83ed7240-ef10-4b12-be27-6f9d83360de6" + ], + "x-ms-correlation-request-id": [ + "83ed7240-ef10-4b12-be27-6f9d83360de6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004955Z:83ed7240-ef10-4b12-be27-6f9d83360de6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"541fe6a3-ccf2-48eb-95f2-4b16fb0039eb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31587" + ], + "x-ms-request-id": [ + "9f7cf78a-493d-4e14-9622-be2d4402c2db" + ], + "x-ms-correlation-request-id": [ + "9f7cf78a-493d-4e14-9622-be2d4402c2db" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004957Z:9f7cf78a-493d-4e14-9622-be2d4402c2db" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"541fe6a3-ccf2-48eb-95f2-4b16fb0039eb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31585" + ], + "x-ms-request-id": [ + "1ac3159b-81fc-4dff-a460-b6d2ba4ef1f9" + ], + "x-ms-correlation-request-id": [ + "1ac3159b-81fc-4dff-a460-b6d2ba4ef1f9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004959Z:1ac3159b-81fc-4dff-a460-b6d2ba4ef1f9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"541fe6a3-ccf2-48eb-95f2-4b16fb0039eb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31583" + ], + "x-ms-request-id": [ + "f2be486b-39f2-431c-b128-5c09d1168822" + ], + "x-ms-correlation-request-id": [ + "f2be486b-39f2-431c-b128-5c09d1168822" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005001Z:f2be486b-39f2-431c-b128-5c09d1168822" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"541fe6a3-ccf2-48eb-95f2-4b16fb0039eb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31581" + ], + "x-ms-request-id": [ + "c49bf38b-b487-4378-97d0-e2978669c07e" + ], + "x-ms-correlation-request-id": [ + "c49bf38b-b487-4378-97d0-e2978669c07e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005004Z:c49bf38b-b487-4378-97d0-e2978669c07e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"541fe6a3-ccf2-48eb-95f2-4b16fb0039eb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31579" + ], + "x-ms-request-id": [ + "f7b2465e-4580-4e6f-9352-d8b4bcb8a862" + ], + "x-ms-correlation-request-id": [ + "f7b2465e-4580-4e6f-9352-d8b4bcb8a862" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005006Z:f7b2465e-4580-4e6f-9352-d8b4bcb8a862" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"541fe6a3-ccf2-48eb-95f2-4b16fb0039eb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31577" + ], + "x-ms-request-id": [ + "bff3dc64-ab62-4401-912d-729e7bc1e141" + ], + "x-ms-correlation-request-id": [ + "bff3dc64-ab62-4401-912d-729e7bc1e141" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005008Z:bff3dc64-ab62-4401-912d-729e7bc1e141" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:08 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"541fe6a3-ccf2-48eb-95f2-4b16fb0039eb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31575" + ], + "x-ms-request-id": [ + "ea50ea39-271d-49ad-afbb-d8bcbddc55c1" + ], + "x-ms-correlation-request-id": [ + "ea50ea39-271d-49ad-afbb-d8bcbddc55c1" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005010Z:ea50ea39-271d-49ad-afbb-d8bcbddc55c1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"541fe6a3-ccf2-48eb-95f2-4b16fb0039eb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31573" + ], + "x-ms-request-id": [ + "a091d6e2-d898-4cdb-a0f8-f20df118f818" + ], + "x-ms-correlation-request-id": [ + "a091d6e2-d898-4cdb-a0f8-f20df118f818" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005013Z:a091d6e2-d898-4cdb-a0f8-f20df118f818" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"541fe6a3-ccf2-48eb-95f2-4b16fb0039eb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31571" + ], + "x-ms-request-id": [ + "555329c3-f212-4dce-9b91-5841dbd711db" + ], + "x-ms-correlation-request-id": [ + "555329c3-f212-4dce-9b91-5841dbd711db" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005015Z:555329c3-f212-4dce-9b91-5841dbd711db" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:15 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"541fe6a3-ccf2-48eb-95f2-4b16fb0039eb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31569" + ], + "x-ms-request-id": [ + "5fde4a07-1f96-4d29-8edb-d7832451c433" + ], + "x-ms-correlation-request-id": [ + "5fde4a07-1f96-4d29-8edb-d7832451c433" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005017Z:5fde4a07-1f96-4d29-8edb-d7832451c433" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:17 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"541fe6a3-ccf2-48eb-95f2-4b16fb0039eb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31567" + ], + "x-ms-request-id": [ + "1f1f58e2-6c81-44e1-83f7-d9db0f5db980" + ], + "x-ms-correlation-request-id": [ + "1f1f58e2-6c81-44e1-83f7-d9db0f5db980" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005019Z:1f1f58e2-6c81-44e1-83f7-d9db0f5db980" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"541fe6a3-ccf2-48eb-95f2-4b16fb0039eb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31565" + ], + "x-ms-request-id": [ + "e39cbb88-2c54-4afc-912e-a9c8996225ad" + ], + "x-ms-correlation-request-id": [ + "e39cbb88-2c54-4afc-912e-a9c8996225ad" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005022Z:e39cbb88-2c54-4afc-912e-a9c8996225ad" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"541fe6a3-ccf2-48eb-95f2-4b16fb0039eb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31563" + ], + "x-ms-request-id": [ + "85ad5b10-55ab-44ea-9a95-614ff8abbb1e" + ], + "x-ms-correlation-request-id": [ + "85ad5b10-55ab-44ea-9a95-614ff8abbb1e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005024Z:85ad5b10-55ab-44ea-9a95-614ff8abbb1e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:23 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"541fe6a3-ccf2-48eb-95f2-4b16fb0039eb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31561" + ], + "x-ms-request-id": [ + "31f80492-cda5-478a-8ab4-da68c6eadf58" + ], + "x-ms-correlation-request-id": [ + "31f80492-cda5-478a-8ab4-da68c6eadf58" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005026Z:31f80492-cda5-478a-8ab4-da68c6eadf58" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"541fe6a3-ccf2-48eb-95f2-4b16fb0039eb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31559" + ], + "x-ms-request-id": [ + "3e7aba73-7453-49e3-b57f-3b68b9375883" + ], + "x-ms-correlation-request-id": [ + "3e7aba73-7453-49e3-b57f-3b68b9375883" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005028Z:3e7aba73-7453-49e3-b57f-3b68b9375883" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"541fe6a3-ccf2-48eb-95f2-4b16fb0039eb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31557" + ], + "x-ms-request-id": [ + "1e497d9c-34eb-48b6-8c23-cf2e61c56b28" + ], + "x-ms-correlation-request-id": [ + "1e497d9c-34eb-48b6-8c23-cf2e61c56b28" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005030Z:1e497d9c-34eb-48b6-8c23-cf2e61c56b28" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:30 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"541fe6a3-ccf2-48eb-95f2-4b16fb0039eb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31555" + ], + "x-ms-request-id": [ + "6f1e8cdf-b225-439e-8518-31b5f06c8cf2" + ], + "x-ms-correlation-request-id": [ + "6f1e8cdf-b225-439e-8518-31b5f06c8cf2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005033Z:6f1e8cdf-b225-439e-8518-31b5f06c8cf2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"541fe6a3-ccf2-48eb-95f2-4b16fb0039eb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31553" + ], + "x-ms-request-id": [ + "8aeba5b6-8a19-4fb0-8aab-c9215c8addab" + ], + "x-ms-correlation-request-id": [ + "8aeba5b6-8a19-4fb0-8aab-c9215c8addab" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005035Z:8aeba5b6-8a19-4fb0-8aab-c9215c8addab" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"541fe6a3-ccf2-48eb-95f2-4b16fb0039eb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31551" + ], + "x-ms-request-id": [ + "a6ec5161-99f2-4dcd-8cc8-927cf6f46ccc" + ], + "x-ms-correlation-request-id": [ + "a6ec5161-99f2-4dcd-8cc8-927cf6f46ccc" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005037Z:a6ec5161-99f2-4dcd-8cc8-927cf6f46ccc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:37 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"541fe6a3-ccf2-48eb-95f2-4b16fb0039eb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31549" + ], + "x-ms-request-id": [ + "5276b295-1bd1-44b7-95f8-2bb77aed303e" + ], + "x-ms-correlation-request-id": [ + "5276b295-1bd1-44b7-95f8-2bb77aed303e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005039Z:5276b295-1bd1-44b7-95f8-2bb77aed303e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"541fe6a3-ccf2-48eb-95f2-4b16fb0039eb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31547" + ], + "x-ms-request-id": [ + "4a5e56f4-17ca-4785-9cb0-7cd3207bf965" + ], + "x-ms-correlation-request-id": [ + "4a5e56f4-17ca-4785-9cb0-7cd3207bf965" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005042Z:4a5e56f4-17ca-4785-9cb0-7cd3207bf965" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"541fe6a3-ccf2-48eb-95f2-4b16fb0039eb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31545" + ], + "x-ms-request-id": [ + "33e3b8d5-75d0-4f70-9d47-62301aa53717" + ], + "x-ms-correlation-request-id": [ + "33e3b8d5-75d0-4f70-9d47-62301aa53717" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005044Z:33e3b8d5-75d0-4f70-9d47-62301aa53717" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"541fe6a3-ccf2-48eb-95f2-4b16fb0039eb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31543" + ], + "x-ms-request-id": [ + "0090be81-1745-47ad-b37e-f7a17a931d7c" + ], + "x-ms-correlation-request-id": [ + "0090be81-1745-47ad-b37e-f7a17a931d7c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005046Z:0090be81-1745-47ad-b37e-f7a17a931d7c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"541fe6a3-ccf2-48eb-95f2-4b16fb0039eb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31541" + ], + "x-ms-request-id": [ + "611284fe-c355-4ec0-8591-cd00a0a9d2fd" + ], + "x-ms-correlation-request-id": [ + "611284fe-c355-4ec0-8591-cd00a0a9d2fd" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005048Z:611284fe-c355-4ec0-8591-cd00a0a9d2fd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"541fe6a3-ccf2-48eb-95f2-4b16fb0039eb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31539" + ], + "x-ms-request-id": [ + "b1be5810-dc7e-47e1-b5c7-50b989908726" + ], + "x-ms-correlation-request-id": [ + "b1be5810-dc7e-47e1-b5c7-50b989908726" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005051Z:b1be5810-dc7e-47e1-b5c7-50b989908726" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"541fe6a3-ccf2-48eb-95f2-4b16fb0039eb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31537" + ], + "x-ms-request-id": [ + "d272f237-772c-40da-b0c4-fb8f6c305cb1" + ], + "x-ms-correlation-request-id": [ + "d272f237-772c-40da-b0c4-fb8f6c305cb1" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005053Z:d272f237-772c-40da-b0c4-fb8f6c305cb1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"541fe6a3-ccf2-48eb-95f2-4b16fb0039eb\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31535" + ], + "x-ms-request-id": [ + "a5ea85b9-a38b-43d3-808a-75f723d4bf58" + ], + "x-ms-correlation-request-id": [ + "a5ea85b9-a38b-43d3-808a-75f723d4bf58" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005055Z:a5ea85b9-a38b-43d3-808a-75f723d4bf58" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"afc3c0dc-f921-48c8-a0af-2d6ce788303e\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31533" + ], + "x-ms-request-id": [ + "a2287c0b-2055-4957-9aec-7640df474d32" + ], + "x-ms-correlation-request-id": [ + "a2287c0b-2055-4957-9aec-7640df474d32" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005057Z:a2287c0b-2055-4957-9aec-7640df474d32" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"afc3c0dc-f921-48c8-a0af-2d6ce788303e\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31531" + ], + "x-ms-request-id": [ + "a5ac7e8f-1758-4638-ad17-17ef25316e46" + ], + "x-ms-correlation-request-id": [ + "a5ac7e8f-1758-4638-ad17-17ef25316e46" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005100Z:a5ac7e8f-1758-4638-ad17-17ef25316e46" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"afc3c0dc-f921-48c8-a0af-2d6ce788303e\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31529" + ], + "x-ms-request-id": [ + "4c1bdfa1-9116-4fe4-843c-57fd1ee9ec3a" + ], + "x-ms-correlation-request-id": [ + "4c1bdfa1-9116-4fe4-843c-57fd1ee9ec3a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005102Z:4c1bdfa1-9116-4fe4-843c-57fd1ee9ec3a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:02 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"afc3c0dc-f921-48c8-a0af-2d6ce788303e\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31527" + ], + "x-ms-request-id": [ + "47578e41-b31a-4304-b81c-26130bb17114" + ], + "x-ms-correlation-request-id": [ + "47578e41-b31a-4304-b81c-26130bb17114" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005104Z:47578e41-b31a-4304-b81c-26130bb17114" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"afc3c0dc-f921-48c8-a0af-2d6ce788303e\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31525" + ], + "x-ms-request-id": [ + "87499d6e-d4e9-4e05-b138-5cf523fe5a0e" + ], + "x-ms-correlation-request-id": [ + "87499d6e-d4e9-4e05-b138-5cf523fe5a0e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005106Z:87499d6e-d4e9-4e05-b138-5cf523fe5a0e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"afc3c0dc-f921-48c8-a0af-2d6ce788303e\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31523" + ], + "x-ms-request-id": [ + "a27befb5-449c-4a4a-b99b-2dbcf41d9e4b" + ], + "x-ms-correlation-request-id": [ + "a27befb5-449c-4a4a-b99b-2dbcf41d9e4b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005108Z:a27befb5-449c-4a4a-b99b-2dbcf41d9e4b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:08 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"afc3c0dc-f921-48c8-a0af-2d6ce788303e\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31521" + ], + "x-ms-request-id": [ + "7e220922-5a90-4876-abf5-30dd0e9ad8dc" + ], + "x-ms-correlation-request-id": [ + "7e220922-5a90-4876-abf5-30dd0e9ad8dc" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005111Z:7e220922-5a90-4876-abf5-30dd0e9ad8dc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:11 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"afc3c0dc-f921-48c8-a0af-2d6ce788303e\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31519" + ], + "x-ms-request-id": [ + "dadf194b-bd95-4aab-b05c-203b54de52f3" + ], + "x-ms-correlation-request-id": [ + "dadf194b-bd95-4aab-b05c-203b54de52f3" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005113Z:dadf194b-bd95-4aab-b05c-203b54de52f3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"afc3c0dc-f921-48c8-a0af-2d6ce788303e\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31517" + ], + "x-ms-request-id": [ + "802f661c-9673-45b3-8b75-75b1d99b7ca4" + ], + "x-ms-correlation-request-id": [ + "802f661c-9673-45b3-8b75-75b1d99b7ca4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005115Z:802f661c-9673-45b3-8b75-75b1d99b7ca4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:14 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"afc3c0dc-f921-48c8-a0af-2d6ce788303e\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31515" + ], + "x-ms-request-id": [ + "3b69574e-a780-4e15-ad19-bfd64c31f74a" + ], + "x-ms-correlation-request-id": [ + "3b69574e-a780-4e15-ad19-bfd64c31f74a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005118Z:3b69574e-a780-4e15-ad19-bfd64c31f74a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:18 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"afc3c0dc-f921-48c8-a0af-2d6ce788303e\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31513" + ], + "x-ms-request-id": [ + "108e7356-0f90-47a6-9da7-2f8ab779eb7c" + ], + "x-ms-correlation-request-id": [ + "108e7356-0f90-47a6-9da7-2f8ab779eb7c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005120Z:108e7356-0f90-47a6-9da7-2f8ab779eb7c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:20 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"afc3c0dc-f921-48c8-a0af-2d6ce788303e\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31511" + ], + "x-ms-request-id": [ + "24023bf0-a231-4b00-ba4b-aec372baa22d" + ], + "x-ms-correlation-request-id": [ + "24023bf0-a231-4b00-ba4b-aec372baa22d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005122Z:24023bf0-a231-4b00-ba4b-aec372baa22d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:21 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"afc3c0dc-f921-48c8-a0af-2d6ce788303e\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31509" + ], + "x-ms-request-id": [ + "62b4a51d-a71d-460e-a98f-de0b9e569790" + ], + "x-ms-correlation-request-id": [ + "62b4a51d-a71d-460e-a98f-de0b9e569790" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005124Z:62b4a51d-a71d-460e-a98f-de0b9e569790" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"afc3c0dc-f921-48c8-a0af-2d6ce788303e\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31507" + ], + "x-ms-request-id": [ + "3a5a4fe4-093c-42cb-82fc-8a8e06549a8c" + ], + "x-ms-correlation-request-id": [ + "3a5a4fe4-093c-42cb-82fc-8a8e06549a8c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005126Z:3a5a4fe4-093c-42cb-82fc-8a8e06549a8c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"afc3c0dc-f921-48c8-a0af-2d6ce788303e\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31505" + ], + "x-ms-request-id": [ + "93053893-1db8-4ac6-a8c1-7d00c76f2c2a" + ], + "x-ms-correlation-request-id": [ + "93053893-1db8-4ac6-a8c1-7d00c76f2c2a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005129Z:93053893-1db8-4ac6-a8c1-7d00c76f2c2a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:29 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"afc3c0dc-f921-48c8-a0af-2d6ce788303e\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31503" + ], + "x-ms-request-id": [ + "1bdacca6-2065-4f5d-bbc1-0887ce96999d" + ], + "x-ms-correlation-request-id": [ + "1bdacca6-2065-4f5d-bbc1-0887ce96999d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005131Z:1bdacca6-2065-4f5d-bbc1-0887ce96999d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:30 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"afc3c0dc-f921-48c8-a0af-2d6ce788303e\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31501" + ], + "x-ms-request-id": [ + "f63504e2-997e-46e7-9b27-23b6abdf7420" + ], + "x-ms-correlation-request-id": [ + "f63504e2-997e-46e7-9b27-23b6abdf7420" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005133Z:f63504e2-997e-46e7-9b27-23b6abdf7420" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"afc3c0dc-f921-48c8-a0af-2d6ce788303e\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31499" + ], + "x-ms-request-id": [ + "46c84604-c93b-46af-b3d4-c1d7ffe80317" + ], + "x-ms-correlation-request-id": [ + "46c84604-c93b-46af-b3d4-c1d7ffe80317" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005135Z:46c84604-c93b-46af-b3d4-c1d7ffe80317" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"afc3c0dc-f921-48c8-a0af-2d6ce788303e\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31497" + ], + "x-ms-request-id": [ + "bd1fb2b9-94b7-47bf-bf4e-9b29f7777b0c" + ], + "x-ms-correlation-request-id": [ + "bd1fb2b9-94b7-47bf-bf4e-9b29f7777b0c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005138Z:bd1fb2b9-94b7-47bf-bf4e-9b29f7777b0c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:38 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"afc3c0dc-f921-48c8-a0af-2d6ce788303e\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31495" + ], + "x-ms-request-id": [ + "03f40512-93ce-4ffc-9196-764ede140df1" + ], + "x-ms-correlation-request-id": [ + "03f40512-93ce-4ffc-9196-764ede140df1" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005140Z:03f40512-93ce-4ffc-9196-764ede140df1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"afc3c0dc-f921-48c8-a0af-2d6ce788303e\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31493" + ], + "x-ms-request-id": [ + "09dd226c-6971-4342-ab9f-f02ba9714c33" + ], + "x-ms-correlation-request-id": [ + "09dd226c-6971-4342-ab9f-f02ba9714c33" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005142Z:09dd226c-6971-4342-ab9f-f02ba9714c33" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"afc3c0dc-f921-48c8-a0af-2d6ce788303e\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31491" + ], + "x-ms-request-id": [ + "e04c730c-347d-44a8-ad1b-e4d51a1dd154" + ], + "x-ms-correlation-request-id": [ + "e04c730c-347d-44a8-ad1b-e4d51a1dd154" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005144Z:e04c730c-347d-44a8-ad1b-e4d51a1dd154" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"afc3c0dc-f921-48c8-a0af-2d6ce788303e\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31489" + ], + "x-ms-request-id": [ + "6a066df2-cd0e-47d6-9140-6ed5a510b644" + ], + "x-ms-correlation-request-id": [ + "6a066df2-cd0e-47d6-9140-6ed5a510b644" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005146Z:6a066df2-cd0e-47d6-9140-6ed5a510b644" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"afc3c0dc-f921-48c8-a0af-2d6ce788303e\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31487" + ], + "x-ms-request-id": [ + "d0464ff2-8ccc-451a-b07e-f51ddd2e528c" + ], + "x-ms-correlation-request-id": [ + "d0464ff2-8ccc-451a-b07e-f51ddd2e528c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005149Z:d0464ff2-8ccc-451a-b07e-f51ddd2e528c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"afc3c0dc-f921-48c8-a0af-2d6ce788303e\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31485" + ], + "x-ms-request-id": [ + "9deb9be9-52e4-47f6-bcac-495e0c9abf57" + ], + "x-ms-correlation-request-id": [ + "9deb9be9-52e4-47f6-bcac-495e0c9abf57" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005151Z:9deb9be9-52e4-47f6-bcac-495e0c9abf57" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"afc3c0dc-f921-48c8-a0af-2d6ce788303e\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31483" + ], + "x-ms-request-id": [ + "558d78db-a662-4b84-a9b8-0a7104a9dc4a" + ], + "x-ms-correlation-request-id": [ + "558d78db-a662-4b84-a9b8-0a7104a9dc4a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005153Z:558d78db-a662-4b84-a9b8-0a7104a9dc4a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"afc3c0dc-f921-48c8-a0af-2d6ce788303e\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31481" + ], + "x-ms-request-id": [ + "8be20566-cfec-4dd7-b5b6-19d22d9a6bf1" + ], + "x-ms-correlation-request-id": [ + "8be20566-cfec-4dd7-b5b6-19d22d9a6bf1" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005155Z:8be20566-cfec-4dd7-b5b6-19d22d9a6bf1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"4120ab71-8927-41f6-8b7d-69e22a03273a\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31479" + ], + "x-ms-request-id": [ + "34f3a069-66d6-476c-9b70-da4ba718bfa4" + ], + "x-ms-correlation-request-id": [ + "34f3a069-66d6-476c-9b70-da4ba718bfa4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005158Z:34f3a069-66d6-476c-9b70-da4ba718bfa4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"4120ab71-8927-41f6-8b7d-69e22a03273a\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31477" + ], + "x-ms-request-id": [ + "fd38ccc7-5b38-4f40-8c74-411ce364e632" + ], + "x-ms-correlation-request-id": [ + "fd38ccc7-5b38-4f40-8c74-411ce364e632" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005200Z:fd38ccc7-5b38-4f40-8c74-411ce364e632" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:52:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview/operations/FDC2F1E68BB68405\",\r\n \"operationId\": \"FDC2F1E68BB68405\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-08-06T00:42:51.2976278Z\",\r\n \"trackingId\": \"4120ab71-8927-41f6-8b7d-69e22a03273a\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"resourceType\": \"Microsoft.Cache/Redis\",\r\n \"resourceName\": \"onesdk6627\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31475" + ], + "x-ms-request-id": [ + "87598432-c0f8-46df-98a5-e3f0aed18135" + ], + "x-ms-correlation-request-id": [ + "87598432-c0f8-46df-98a5-e3f0aed18135" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005202Z:87598432-c0f8-46df-98a5-e3f0aed18135" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:52:02 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31974" + ], + "x-ms-request-id": [ + "fe05693e-31b0-4243-bbe2-74f211732d1a" + ], + "x-ms-correlation-request-id": [ + "fe05693e-31b0-4243-bbe2-74f211732d1a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004244Z:fe05693e-31b0-4243-bbe2-74f211732d1a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:42:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31972" + ], + "x-ms-request-id": [ + "02e96492-c72a-4f80-8808-118d1c4c2472" + ], + "x-ms-correlation-request-id": [ + "02e96492-c72a-4f80-8808-118d1c4c2472" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004246Z:02e96492-c72a-4f80-8808-118d1c4c2472" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:42:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31970" + ], + "x-ms-request-id": [ + "76debdf9-3340-46cd-94e4-00d0cd1f5b2d" + ], + "x-ms-correlation-request-id": [ + "76debdf9-3340-46cd-94e4-00d0cd1f5b2d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004248Z:76debdf9-3340-46cd-94e4-00d0cd1f5b2d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:42:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31968" + ], + "x-ms-request-id": [ + "c9955ae2-d409-431d-82a0-1aff3241891f" + ], + "x-ms-correlation-request-id": [ + "c9955ae2-d409-431d-82a0-1aff3241891f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004250Z:c9955ae2-d409-431d-82a0-1aff3241891f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:42:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31966" + ], + "x-ms-request-id": [ + "acc79cd7-eed8-406d-8d01-d571703eca45" + ], + "x-ms-correlation-request-id": [ + "acc79cd7-eed8-406d-8d01-d571703eca45" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004253Z:acc79cd7-eed8-406d-8d01-d571703eca45" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:42:52 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31964" + ], + "x-ms-request-id": [ + "5e1d73c1-ca55-467a-969e-69ec50f7a5fc" + ], + "x-ms-correlation-request-id": [ + "5e1d73c1-ca55-467a-969e-69ec50f7a5fc" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004255Z:5e1d73c1-ca55-467a-969e-69ec50f7a5fc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:42:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31962" + ], + "x-ms-request-id": [ + "fd9ae8aa-d93a-4aab-b356-19e59427a1af" + ], + "x-ms-correlation-request-id": [ + "fd9ae8aa-d93a-4aab-b356-19e59427a1af" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004257Z:fd9ae8aa-d93a-4aab-b356-19e59427a1af" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:42:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31960" + ], + "x-ms-request-id": [ + "21dd051a-6cef-45c8-bf17-bfda3c0ac926" + ], + "x-ms-correlation-request-id": [ + "21dd051a-6cef-45c8-bf17-bfda3c0ac926" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004259Z:21dd051a-6cef-45c8-bf17-bfda3c0ac926" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:42:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31958" + ], + "x-ms-request-id": [ + "0c8f3487-f3e0-4297-b1e8-834388f53f57" + ], + "x-ms-correlation-request-id": [ + "0c8f3487-f3e0-4297-b1e8-834388f53f57" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004301Z:0c8f3487-f3e0-4297-b1e8-834388f53f57" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31956" + ], + "x-ms-request-id": [ + "fa2f40c0-eebe-4ff0-8502-2a0adaec51a9" + ], + "x-ms-correlation-request-id": [ + "fa2f40c0-eebe-4ff0-8502-2a0adaec51a9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004304Z:fa2f40c0-eebe-4ff0-8502-2a0adaec51a9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31954" + ], + "x-ms-request-id": [ + "63a9c1a9-2711-40d2-9b0a-9f42ca963fa7" + ], + "x-ms-correlation-request-id": [ + "63a9c1a9-2711-40d2-9b0a-9f42ca963fa7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004306Z:63a9c1a9-2711-40d2-9b0a-9f42ca963fa7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31952" + ], + "x-ms-request-id": [ + "80d06f3e-1deb-4c31-bcfe-e45ddd40533c" + ], + "x-ms-correlation-request-id": [ + "80d06f3e-1deb-4c31-bcfe-e45ddd40533c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004308Z:80d06f3e-1deb-4c31-bcfe-e45ddd40533c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:08 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31950" + ], + "x-ms-request-id": [ + "aaab849b-dd2a-4a56-9c9b-82b609a047f8" + ], + "x-ms-correlation-request-id": [ + "aaab849b-dd2a-4a56-9c9b-82b609a047f8" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004310Z:aaab849b-dd2a-4a56-9c9b-82b609a047f8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31948" + ], + "x-ms-request-id": [ + "936545d8-05d4-4038-b3ec-a79046e246ff" + ], + "x-ms-correlation-request-id": [ + "936545d8-05d4-4038-b3ec-a79046e246ff" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004313Z:936545d8-05d4-4038-b3ec-a79046e246ff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:12 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31946" + ], + "x-ms-request-id": [ + "72cfea1f-da5b-4f03-82cf-e34576f5cebe" + ], + "x-ms-correlation-request-id": [ + "72cfea1f-da5b-4f03-82cf-e34576f5cebe" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004315Z:72cfea1f-da5b-4f03-82cf-e34576f5cebe" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:14 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31944" + ], + "x-ms-request-id": [ + "9a1035cf-6ef3-49b9-b0d7-623a526cb43b" + ], + "x-ms-correlation-request-id": [ + "9a1035cf-6ef3-49b9-b0d7-623a526cb43b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004317Z:9a1035cf-6ef3-49b9-b0d7-623a526cb43b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:17 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31942" + ], + "x-ms-request-id": [ + "e695e52f-bf12-409e-b67a-b2ce09db0471" + ], + "x-ms-correlation-request-id": [ + "e695e52f-bf12-409e-b67a-b2ce09db0471" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004319Z:e695e52f-bf12-409e-b67a-b2ce09db0471" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31940" + ], + "x-ms-request-id": [ + "0c87fe9f-744c-4d84-91f5-32f395deef7d" + ], + "x-ms-correlation-request-id": [ + "0c87fe9f-744c-4d84-91f5-32f395deef7d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004321Z:0c87fe9f-744c-4d84-91f5-32f395deef7d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:21 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31938" + ], + "x-ms-request-id": [ + "1d25b0f5-ca7b-45c6-b36a-7a5079d46605" + ], + "x-ms-correlation-request-id": [ + "1d25b0f5-ca7b-45c6-b36a-7a5079d46605" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004324Z:1d25b0f5-ca7b-45c6-b36a-7a5079d46605" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31936" + ], + "x-ms-request-id": [ + "80083631-9384-4766-b921-4cbaefc2b476" + ], + "x-ms-correlation-request-id": [ + "80083631-9384-4766-b921-4cbaefc2b476" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004326Z:80083631-9384-4766-b921-4cbaefc2b476" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31934" + ], + "x-ms-request-id": [ + "3f009123-f7dd-45bb-ae8b-b466c25661b9" + ], + "x-ms-correlation-request-id": [ + "3f009123-f7dd-45bb-ae8b-b466c25661b9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004328Z:3f009123-f7dd-45bb-ae8b-b466c25661b9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31932" + ], + "x-ms-request-id": [ + "a3827bdd-275f-453c-a2a7-7700d9b7675b" + ], + "x-ms-correlation-request-id": [ + "a3827bdd-275f-453c-a2a7-7700d9b7675b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004330Z:a3827bdd-275f-453c-a2a7-7700d9b7675b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:30 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31930" + ], + "x-ms-request-id": [ + "51a71716-d221-4edf-b9c3-19b4ea2558e7" + ], + "x-ms-correlation-request-id": [ + "51a71716-d221-4edf-b9c3-19b4ea2558e7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004333Z:51a71716-d221-4edf-b9c3-19b4ea2558e7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31928" + ], + "x-ms-request-id": [ + "c6d0254d-0dd2-4dd6-9a57-98a2ebae2163" + ], + "x-ms-correlation-request-id": [ + "c6d0254d-0dd2-4dd6-9a57-98a2ebae2163" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004335Z:c6d0254d-0dd2-4dd6-9a57-98a2ebae2163" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31926" + ], + "x-ms-request-id": [ + "7076ad5b-6b60-4fb9-9544-e619624583b7" + ], + "x-ms-correlation-request-id": [ + "7076ad5b-6b60-4fb9-9544-e619624583b7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004337Z:7076ad5b-6b60-4fb9-9544-e619624583b7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:37 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31924" + ], + "x-ms-request-id": [ + "f95d6780-bb70-4ec8-b05d-49acb2478deb" + ], + "x-ms-correlation-request-id": [ + "f95d6780-bb70-4ec8-b05d-49acb2478deb" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004339Z:f95d6780-bb70-4ec8-b05d-49acb2478deb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31922" + ], + "x-ms-request-id": [ + "7827ff0b-c2ba-42b3-82ac-027a99713cd0" + ], + "x-ms-correlation-request-id": [ + "7827ff0b-c2ba-42b3-82ac-027a99713cd0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004341Z:7827ff0b-c2ba-42b3-82ac-027a99713cd0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31920" + ], + "x-ms-request-id": [ + "57a5d416-0006-419b-b32c-1f10b8193a7e" + ], + "x-ms-correlation-request-id": [ + "57a5d416-0006-419b-b32c-1f10b8193a7e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004344Z:57a5d416-0006-419b-b32c-1f10b8193a7e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31918" + ], + "x-ms-request-id": [ + "bdb5d226-2d28-4a3a-b5f1-84679047bac9" + ], + "x-ms-correlation-request-id": [ + "bdb5d226-2d28-4a3a-b5f1-84679047bac9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004346Z:bdb5d226-2d28-4a3a-b5f1-84679047bac9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31916" + ], + "x-ms-request-id": [ + "8aa06ba7-4d07-4cba-8752-6430752df57d" + ], + "x-ms-correlation-request-id": [ + "8aa06ba7-4d07-4cba-8752-6430752df57d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004348Z:8aa06ba7-4d07-4cba-8752-6430752df57d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31914" + ], + "x-ms-request-id": [ + "6256cbff-8ba2-4ff4-9890-400ac28884c5" + ], + "x-ms-correlation-request-id": [ + "6256cbff-8ba2-4ff4-9890-400ac28884c5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004351Z:6256cbff-8ba2-4ff4-9890-400ac28884c5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31912" + ], + "x-ms-request-id": [ + "227a5e8a-a9e7-4f40-8ba7-1dcf2108cb29" + ], + "x-ms-correlation-request-id": [ + "227a5e8a-a9e7-4f40-8ba7-1dcf2108cb29" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004353Z:227a5e8a-a9e7-4f40-8ba7-1dcf2108cb29" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31910" + ], + "x-ms-request-id": [ + "4b6ca4a2-2ae6-4c6e-a9be-fdd7bd117991" + ], + "x-ms-correlation-request-id": [ + "4b6ca4a2-2ae6-4c6e-a9be-fdd7bd117991" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004355Z:4b6ca4a2-2ae6-4c6e-a9be-fdd7bd117991" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31908" + ], + "x-ms-request-id": [ + "a3d4bd7e-52c1-4533-9e1b-a25cc48e9919" + ], + "x-ms-correlation-request-id": [ + "a3d4bd7e-52c1-4533-9e1b-a25cc48e9919" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004357Z:a3d4bd7e-52c1-4533-9e1b-a25cc48e9919" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:56 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31906" + ], + "x-ms-request-id": [ + "65d30f3e-12f3-46ee-941b-069d02828bf4" + ], + "x-ms-correlation-request-id": [ + "65d30f3e-12f3-46ee-941b-069d02828bf4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004359Z:65d30f3e-12f3-46ee-941b-069d02828bf4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:43:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31904" + ], + "x-ms-request-id": [ + "c340578f-7190-47c1-8894-3818ed80c605" + ], + "x-ms-correlation-request-id": [ + "c340578f-7190-47c1-8894-3818ed80c605" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004402Z:c340578f-7190-47c1-8894-3818ed80c605" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:02 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31902" + ], + "x-ms-request-id": [ + "da573299-538b-4d5c-937d-b476d8b88a37" + ], + "x-ms-correlation-request-id": [ + "da573299-538b-4d5c-937d-b476d8b88a37" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004404Z:da573299-538b-4d5c-937d-b476d8b88a37" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31900" + ], + "x-ms-request-id": [ + "795654b4-38b0-4949-a349-a1557dcd25ac" + ], + "x-ms-correlation-request-id": [ + "795654b4-38b0-4949-a349-a1557dcd25ac" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004406Z:795654b4-38b0-4949-a349-a1557dcd25ac" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31898" + ], + "x-ms-request-id": [ + "881b118f-a691-4b37-bc63-232c4d1c8b8b" + ], + "x-ms-correlation-request-id": [ + "881b118f-a691-4b37-bc63-232c4d1c8b8b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004408Z:881b118f-a691-4b37-bc63-232c4d1c8b8b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:08 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31896" + ], + "x-ms-request-id": [ + "88887b20-2efe-4343-b6c1-d61a032d86a5" + ], + "x-ms-correlation-request-id": [ + "88887b20-2efe-4343-b6c1-d61a032d86a5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004411Z:88887b20-2efe-4343-b6c1-d61a032d86a5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31894" + ], + "x-ms-request-id": [ + "ba1a844c-4316-4eb8-8801-6f0826d8b522" + ], + "x-ms-correlation-request-id": [ + "ba1a844c-4316-4eb8-8801-6f0826d8b522" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004413Z:ba1a844c-4316-4eb8-8801-6f0826d8b522" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31892" + ], + "x-ms-request-id": [ + "29e80a29-8f12-49f2-aebc-9b5b7b882aee" + ], + "x-ms-correlation-request-id": [ + "29e80a29-8f12-49f2-aebc-9b5b7b882aee" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004415Z:29e80a29-8f12-49f2-aebc-9b5b7b882aee" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:15 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31890" + ], + "x-ms-request-id": [ + "fd829c0d-483a-46e7-a4ce-f33dd49922f3" + ], + "x-ms-correlation-request-id": [ + "fd829c0d-483a-46e7-a4ce-f33dd49922f3" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004417Z:fd829c0d-483a-46e7-a4ce-f33dd49922f3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:17 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31888" + ], + "x-ms-request-id": [ + "6f64bdf2-e7c3-4fbf-89dc-c904bcd8fbaf" + ], + "x-ms-correlation-request-id": [ + "6f64bdf2-e7c3-4fbf-89dc-c904bcd8fbaf" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004419Z:6f64bdf2-e7c3-4fbf-89dc-c904bcd8fbaf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31886" + ], + "x-ms-request-id": [ + "ca3a2f1c-f700-4d54-99b4-37c21ff5d2c2" + ], + "x-ms-correlation-request-id": [ + "ca3a2f1c-f700-4d54-99b4-37c21ff5d2c2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004422Z:ca3a2f1c-f700-4d54-99b4-37c21ff5d2c2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31884" + ], + "x-ms-request-id": [ + "ff72cf63-421e-4b15-859e-533c6e605ed4" + ], + "x-ms-correlation-request-id": [ + "ff72cf63-421e-4b15-859e-533c6e605ed4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004424Z:ff72cf63-421e-4b15-859e-533c6e605ed4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31882" + ], + "x-ms-request-id": [ + "61429f50-2b7a-4180-8807-3783df356c93" + ], + "x-ms-correlation-request-id": [ + "61429f50-2b7a-4180-8807-3783df356c93" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004426Z:61429f50-2b7a-4180-8807-3783df356c93" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31880" + ], + "x-ms-request-id": [ + "25b6bcdc-9501-4914-a2cf-163444426f21" + ], + "x-ms-correlation-request-id": [ + "25b6bcdc-9501-4914-a2cf-163444426f21" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004428Z:25b6bcdc-9501-4914-a2cf-163444426f21" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31878" + ], + "x-ms-request-id": [ + "e642113c-c401-41e3-a302-b4f9c94a1671" + ], + "x-ms-correlation-request-id": [ + "e642113c-c401-41e3-a302-b4f9c94a1671" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004431Z:e642113c-c401-41e3-a302-b4f9c94a1671" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:31 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31876" + ], + "x-ms-request-id": [ + "c7bd1076-4510-4a35-8568-84d49fdbdb0a" + ], + "x-ms-correlation-request-id": [ + "c7bd1076-4510-4a35-8568-84d49fdbdb0a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004433Z:c7bd1076-4510-4a35-8568-84d49fdbdb0a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31874" + ], + "x-ms-request-id": [ + "0b11c7a5-470b-4dfa-8fdf-34fa7a1ed357" + ], + "x-ms-correlation-request-id": [ + "0b11c7a5-470b-4dfa-8fdf-34fa7a1ed357" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004435Z:0b11c7a5-470b-4dfa-8fdf-34fa7a1ed357" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31872" + ], + "x-ms-request-id": [ + "f2fcdecd-7541-4d18-9a82-abbe1a03c487" + ], + "x-ms-correlation-request-id": [ + "f2fcdecd-7541-4d18-9a82-abbe1a03c487" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004437Z:f2fcdecd-7541-4d18-9a82-abbe1a03c487" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:37 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31870" + ], + "x-ms-request-id": [ + "0fa290f2-bca8-4d0d-b94a-c22f8dfa3c65" + ], + "x-ms-correlation-request-id": [ + "0fa290f2-bca8-4d0d-b94a-c22f8dfa3c65" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004440Z:0fa290f2-bca8-4d0d-b94a-c22f8dfa3c65" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31868" + ], + "x-ms-request-id": [ + "3088d641-9004-4707-b89e-45f342f5a3b8" + ], + "x-ms-correlation-request-id": [ + "3088d641-9004-4707-b89e-45f342f5a3b8" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004442Z:3088d641-9004-4707-b89e-45f342f5a3b8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31866" + ], + "x-ms-request-id": [ + "9dfb7300-40cb-46fd-abb6-ebbd76864f4b" + ], + "x-ms-correlation-request-id": [ + "9dfb7300-40cb-46fd-abb6-ebbd76864f4b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004444Z:9dfb7300-40cb-46fd-abb6-ebbd76864f4b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31864" + ], + "x-ms-request-id": [ + "63ceea70-a581-4cf7-8385-2bdab9d5b3d0" + ], + "x-ms-correlation-request-id": [ + "63ceea70-a581-4cf7-8385-2bdab9d5b3d0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004446Z:63ceea70-a581-4cf7-8385-2bdab9d5b3d0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31862" + ], + "x-ms-request-id": [ + "46ca561b-019e-449e-af83-bcca2d03ad4c" + ], + "x-ms-correlation-request-id": [ + "46ca561b-019e-449e-af83-bcca2d03ad4c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004449Z:46ca561b-019e-449e-af83-bcca2d03ad4c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31860" + ], + "x-ms-request-id": [ + "4246a4e2-a3fb-4849-83eb-0a060794e72e" + ], + "x-ms-correlation-request-id": [ + "4246a4e2-a3fb-4849-83eb-0a060794e72e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004451Z:4246a4e2-a3fb-4849-83eb-0a060794e72e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31858" + ], + "x-ms-request-id": [ + "3c06a75d-340e-4ef7-948f-df1e472ef4a7" + ], + "x-ms-correlation-request-id": [ + "3c06a75d-340e-4ef7-948f-df1e472ef4a7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004453Z:3c06a75d-340e-4ef7-948f-df1e472ef4a7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31856" + ], + "x-ms-request-id": [ + "fbf579b5-177d-4644-a1ae-de24c9e56d05" + ], + "x-ms-correlation-request-id": [ + "fbf579b5-177d-4644-a1ae-de24c9e56d05" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004455Z:fbf579b5-177d-4644-a1ae-de24c9e56d05" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31854" + ], + "x-ms-request-id": [ + "70bb18c5-5623-4630-a799-f029c46ea88d" + ], + "x-ms-correlation-request-id": [ + "70bb18c5-5623-4630-a799-f029c46ea88d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004457Z:70bb18c5-5623-4630-a799-f029c46ea88d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:44:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31852" + ], + "x-ms-request-id": [ + "dd58206e-82d5-4d88-b435-6e9771ace06a" + ], + "x-ms-correlation-request-id": [ + "dd58206e-82d5-4d88-b435-6e9771ace06a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004500Z:dd58206e-82d5-4d88-b435-6e9771ace06a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31850" + ], + "x-ms-request-id": [ + "026b66f9-02bb-48d4-8243-6e9a45b1afba" + ], + "x-ms-correlation-request-id": [ + "026b66f9-02bb-48d4-8243-6e9a45b1afba" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004502Z:026b66f9-02bb-48d4-8243-6e9a45b1afba" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:02 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31848" + ], + "x-ms-request-id": [ + "1e8ea201-0ad6-4e0f-a1ea-2b94e31bd6c6" + ], + "x-ms-correlation-request-id": [ + "1e8ea201-0ad6-4e0f-a1ea-2b94e31bd6c6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004504Z:1e8ea201-0ad6-4e0f-a1ea-2b94e31bd6c6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31846" + ], + "x-ms-request-id": [ + "7e518647-0c52-42b7-a5c2-5df611d9c756" + ], + "x-ms-correlation-request-id": [ + "7e518647-0c52-42b7-a5c2-5df611d9c756" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004506Z:7e518647-0c52-42b7-a5c2-5df611d9c756" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31844" + ], + "x-ms-request-id": [ + "b1830d54-b80c-4fb2-84e5-dd7bfd7bfd29" + ], + "x-ms-correlation-request-id": [ + "b1830d54-b80c-4fb2-84e5-dd7bfd7bfd29" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004509Z:b1830d54-b80c-4fb2-84e5-dd7bfd7bfd29" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:08 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31842" + ], + "x-ms-request-id": [ + "e1850620-e1aa-4b7c-96d7-e8cf47f1db05" + ], + "x-ms-correlation-request-id": [ + "e1850620-e1aa-4b7c-96d7-e8cf47f1db05" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004511Z:e1850620-e1aa-4b7c-96d7-e8cf47f1db05" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31840" + ], + "x-ms-request-id": [ + "88a89cf6-05fc-4017-b54c-536fb904a444" + ], + "x-ms-correlation-request-id": [ + "88a89cf6-05fc-4017-b54c-536fb904a444" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004513Z:88a89cf6-05fc-4017-b54c-536fb904a444" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31838" + ], + "x-ms-request-id": [ + "957d0585-eecf-494d-9315-519b7f89d184" + ], + "x-ms-correlation-request-id": [ + "957d0585-eecf-494d-9315-519b7f89d184" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004515Z:957d0585-eecf-494d-9315-519b7f89d184" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:15 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31836" + ], + "x-ms-request-id": [ + "66292cd1-c5af-46c8-a020-7e35a83ee48c" + ], + "x-ms-correlation-request-id": [ + "66292cd1-c5af-46c8-a020-7e35a83ee48c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004517Z:66292cd1-c5af-46c8-a020-7e35a83ee48c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:17 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31834" + ], + "x-ms-request-id": [ + "d1a08c46-c8b2-4695-9207-344dfebdf84b" + ], + "x-ms-correlation-request-id": [ + "d1a08c46-c8b2-4695-9207-344dfebdf84b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004520Z:d1a08c46-c8b2-4695-9207-344dfebdf84b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:20 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31832" + ], + "x-ms-request-id": [ + "6a5c6a0d-5a9a-4910-b544-03b887ce3eb7" + ], + "x-ms-correlation-request-id": [ + "6a5c6a0d-5a9a-4910-b544-03b887ce3eb7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004522Z:6a5c6a0d-5a9a-4910-b544-03b887ce3eb7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31830" + ], + "x-ms-request-id": [ + "290c454b-70a5-45c0-9ffe-f0369077ea46" + ], + "x-ms-correlation-request-id": [ + "290c454b-70a5-45c0-9ffe-f0369077ea46" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004524Z:290c454b-70a5-45c0-9ffe-f0369077ea46" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31828" + ], + "x-ms-request-id": [ + "12efbc95-1dad-4e36-bd4b-0502f128bd8f" + ], + "x-ms-correlation-request-id": [ + "12efbc95-1dad-4e36-bd4b-0502f128bd8f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004526Z:12efbc95-1dad-4e36-bd4b-0502f128bd8f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31826" + ], + "x-ms-request-id": [ + "32cce53b-fd40-4e6f-a974-53a533655690" + ], + "x-ms-correlation-request-id": [ + "32cce53b-fd40-4e6f-a974-53a533655690" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004529Z:32cce53b-fd40-4e6f-a974-53a533655690" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31824" + ], + "x-ms-request-id": [ + "d6dbde84-4e99-4be2-81f7-3788d4156e9c" + ], + "x-ms-correlation-request-id": [ + "d6dbde84-4e99-4be2-81f7-3788d4156e9c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004531Z:d6dbde84-4e99-4be2-81f7-3788d4156e9c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:31 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31822" + ], + "x-ms-request-id": [ + "e0245e4a-580e-4f34-aaf2-f41efb674354" + ], + "x-ms-correlation-request-id": [ + "e0245e4a-580e-4f34-aaf2-f41efb674354" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004533Z:e0245e4a-580e-4f34-aaf2-f41efb674354" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31820" + ], + "x-ms-request-id": [ + "98817b25-785a-4106-b5cc-11b0fa2c05c7" + ], + "x-ms-correlation-request-id": [ + "98817b25-785a-4106-b5cc-11b0fa2c05c7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004535Z:98817b25-785a-4106-b5cc-11b0fa2c05c7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31818" + ], + "x-ms-request-id": [ + "4de0e87f-9fd1-47c5-9f00-0f96e0b86cb3" + ], + "x-ms-correlation-request-id": [ + "4de0e87f-9fd1-47c5-9f00-0f96e0b86cb3" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004537Z:4de0e87f-9fd1-47c5-9f00-0f96e0b86cb3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:37 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31816" + ], + "x-ms-request-id": [ + "fe949888-295b-47c0-b7b9-86b1226df940" + ], + "x-ms-correlation-request-id": [ + "fe949888-295b-47c0-b7b9-86b1226df940" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004540Z:fe949888-295b-47c0-b7b9-86b1226df940" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:40 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31814" + ], + "x-ms-request-id": [ + "1836139d-9e88-44bd-a92d-3126b4eea465" + ], + "x-ms-correlation-request-id": [ + "1836139d-9e88-44bd-a92d-3126b4eea465" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004542Z:1836139d-9e88-44bd-a92d-3126b4eea465" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31812" + ], + "x-ms-request-id": [ + "a161e346-f647-41aa-ba4a-ddef16588c12" + ], + "x-ms-correlation-request-id": [ + "a161e346-f647-41aa-ba4a-ddef16588c12" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004544Z:a161e346-f647-41aa-ba4a-ddef16588c12" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31810" + ], + "x-ms-request-id": [ + "9e56354a-03cf-42b6-9e08-750ea0f17198" + ], + "x-ms-correlation-request-id": [ + "9e56354a-03cf-42b6-9e08-750ea0f17198" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004546Z:9e56354a-03cf-42b6-9e08-750ea0f17198" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31808" + ], + "x-ms-request-id": [ + "23dbc015-ae36-456c-aa77-75e5d6e177e4" + ], + "x-ms-correlation-request-id": [ + "23dbc015-ae36-456c-aa77-75e5d6e177e4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004549Z:23dbc015-ae36-456c-aa77-75e5d6e177e4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31806" + ], + "x-ms-request-id": [ + "da030bd4-982f-45ec-929f-130b11e5b61e" + ], + "x-ms-correlation-request-id": [ + "da030bd4-982f-45ec-929f-130b11e5b61e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004551Z:da030bd4-982f-45ec-929f-130b11e5b61e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31804" + ], + "x-ms-request-id": [ + "e602b61b-8703-4e0d-b15f-559002c633fd" + ], + "x-ms-correlation-request-id": [ + "e602b61b-8703-4e0d-b15f-559002c633fd" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004553Z:e602b61b-8703-4e0d-b15f-559002c633fd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31802" + ], + "x-ms-request-id": [ + "91e2047d-365b-45dd-bed5-265ade663ecd" + ], + "x-ms-correlation-request-id": [ + "91e2047d-365b-45dd-bed5-265ade663ecd" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004555Z:91e2047d-365b-45dd-bed5-265ade663ecd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31800" + ], + "x-ms-request-id": [ + "b1a9ca5f-929a-4a87-8946-f0d6940ab544" + ], + "x-ms-correlation-request-id": [ + "b1a9ca5f-929a-4a87-8946-f0d6940ab544" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004558Z:b1a9ca5f-929a-4a87-8946-f0d6940ab544" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:45:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31798" + ], + "x-ms-request-id": [ + "7006bb9b-1c55-43d7-b87e-123956db306d" + ], + "x-ms-correlation-request-id": [ + "7006bb9b-1c55-43d7-b87e-123956db306d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004600Z:7006bb9b-1c55-43d7-b87e-123956db306d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31796" + ], + "x-ms-request-id": [ + "a3136eb6-5f13-42bb-8cb8-e8acf09396d4" + ], + "x-ms-correlation-request-id": [ + "a3136eb6-5f13-42bb-8cb8-e8acf09396d4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004602Z:a3136eb6-5f13-42bb-8cb8-e8acf09396d4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:02 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31794" + ], + "x-ms-request-id": [ + "46b965a3-f849-4abb-9aff-2845b8ee1108" + ], + "x-ms-correlation-request-id": [ + "46b965a3-f849-4abb-9aff-2845b8ee1108" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004604Z:46b965a3-f849-4abb-9aff-2845b8ee1108" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31792" + ], + "x-ms-request-id": [ + "ee003539-702b-4801-a81c-19fd94502b3c" + ], + "x-ms-correlation-request-id": [ + "ee003539-702b-4801-a81c-19fd94502b3c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004607Z:ee003539-702b-4801-a81c-19fd94502b3c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31790" + ], + "x-ms-request-id": [ + "714b213b-147d-467d-9b32-95f5fb446ac4" + ], + "x-ms-correlation-request-id": [ + "714b213b-147d-467d-9b32-95f5fb446ac4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004609Z:714b213b-147d-467d-9b32-95f5fb446ac4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:09 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31788" + ], + "x-ms-request-id": [ + "30a85fae-761e-4889-b6de-ff09fe2dc666" + ], + "x-ms-correlation-request-id": [ + "30a85fae-761e-4889-b6de-ff09fe2dc666" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004611Z:30a85fae-761e-4889-b6de-ff09fe2dc666" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:11 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31786" + ], + "x-ms-request-id": [ + "363e73c1-66e9-4acb-8b49-38e839933f00" + ], + "x-ms-correlation-request-id": [ + "363e73c1-66e9-4acb-8b49-38e839933f00" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004613Z:363e73c1-66e9-4acb-8b49-38e839933f00" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:12 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31784" + ], + "x-ms-request-id": [ + "8964eeda-e273-4277-ba00-b566208437f7" + ], + "x-ms-correlation-request-id": [ + "8964eeda-e273-4277-ba00-b566208437f7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004616Z:8964eeda-e273-4277-ba00-b566208437f7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:16 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31782" + ], + "x-ms-request-id": [ + "52943b36-3351-4444-a3ec-3dd389fbcbdc" + ], + "x-ms-correlation-request-id": [ + "52943b36-3351-4444-a3ec-3dd389fbcbdc" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004618Z:52943b36-3351-4444-a3ec-3dd389fbcbdc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:18 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31780" + ], + "x-ms-request-id": [ + "4b422a4a-2e15-4e5b-b888-d8c98d8abfa0" + ], + "x-ms-correlation-request-id": [ + "4b422a4a-2e15-4e5b-b888-d8c98d8abfa0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004620Z:4b422a4a-2e15-4e5b-b888-d8c98d8abfa0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:20 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31778" + ], + "x-ms-request-id": [ + "68232a97-5048-4807-aa2f-265fa0fbbea2" + ], + "x-ms-correlation-request-id": [ + "68232a97-5048-4807-aa2f-265fa0fbbea2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004622Z:68232a97-5048-4807-aa2f-265fa0fbbea2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31776" + ], + "x-ms-request-id": [ + "95f14ec1-b2dc-4338-8e54-213557fdf1e6" + ], + "x-ms-correlation-request-id": [ + "95f14ec1-b2dc-4338-8e54-213557fdf1e6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004625Z:95f14ec1-b2dc-4338-8e54-213557fdf1e6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31774" + ], + "x-ms-request-id": [ + "6027a5f0-2170-49df-8927-6a5262c3431b" + ], + "x-ms-correlation-request-id": [ + "6027a5f0-2170-49df-8927-6a5262c3431b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004627Z:6027a5f0-2170-49df-8927-6a5262c3431b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:27 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31772" + ], + "x-ms-request-id": [ + "895f749d-2c70-46ec-bf6e-b997dc93df82" + ], + "x-ms-correlation-request-id": [ + "895f749d-2c70-46ec-bf6e-b997dc93df82" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004629Z:895f749d-2c70-46ec-bf6e-b997dc93df82" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:29 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31770" + ], + "x-ms-request-id": [ + "616057d0-0278-4150-ac98-304578d4de29" + ], + "x-ms-correlation-request-id": [ + "616057d0-0278-4150-ac98-304578d4de29" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004631Z:616057d0-0278-4150-ac98-304578d4de29" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:31 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31768" + ], + "x-ms-request-id": [ + "07d49e78-10bd-4251-817b-a8351324e16d" + ], + "x-ms-correlation-request-id": [ + "07d49e78-10bd-4251-817b-a8351324e16d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004634Z:07d49e78-10bd-4251-817b-a8351324e16d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31766" + ], + "x-ms-request-id": [ + "d4976c1b-9b3a-41d3-a532-1e064c179aaf" + ], + "x-ms-correlation-request-id": [ + "d4976c1b-9b3a-41d3-a532-1e064c179aaf" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004636Z:d4976c1b-9b3a-41d3-a532-1e064c179aaf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:36 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31764" + ], + "x-ms-request-id": [ + "3e0cfc99-251b-4bdf-897f-a69b686c54dc" + ], + "x-ms-correlation-request-id": [ + "3e0cfc99-251b-4bdf-897f-a69b686c54dc" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004638Z:3e0cfc99-251b-4bdf-897f-a69b686c54dc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:38 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31762" + ], + "x-ms-request-id": [ + "7713b740-0305-4dee-ae36-5a16953a589b" + ], + "x-ms-correlation-request-id": [ + "7713b740-0305-4dee-ae36-5a16953a589b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004640Z:7713b740-0305-4dee-ae36-5a16953a589b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:40 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31760" + ], + "x-ms-request-id": [ + "5f2144a4-5a7c-4f5a-8b60-6d8a15c83ef4" + ], + "x-ms-correlation-request-id": [ + "5f2144a4-5a7c-4f5a-8b60-6d8a15c83ef4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004642Z:5f2144a4-5a7c-4f5a-8b60-6d8a15c83ef4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31758" + ], + "x-ms-request-id": [ + "56e7aee4-b9c6-4cc8-b0a7-77018cb33f1f" + ], + "x-ms-correlation-request-id": [ + "56e7aee4-b9c6-4cc8-b0a7-77018cb33f1f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004645Z:56e7aee4-b9c6-4cc8-b0a7-77018cb33f1f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31756" + ], + "x-ms-request-id": [ + "02d4f23e-5cd2-42c2-ba5b-dee3ec895e17" + ], + "x-ms-correlation-request-id": [ + "02d4f23e-5cd2-42c2-ba5b-dee3ec895e17" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004647Z:02d4f23e-5cd2-42c2-ba5b-dee3ec895e17" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:47 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31754" + ], + "x-ms-request-id": [ + "6555dfc8-8d26-405e-9315-01c10c61e9cf" + ], + "x-ms-correlation-request-id": [ + "6555dfc8-8d26-405e-9315-01c10c61e9cf" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004649Z:6555dfc8-8d26-405e-9315-01c10c61e9cf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31752" + ], + "x-ms-request-id": [ + "0c338367-eeb0-43bc-985a-453ae5844146" + ], + "x-ms-correlation-request-id": [ + "0c338367-eeb0-43bc-985a-453ae5844146" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004651Z:0c338367-eeb0-43bc-985a-453ae5844146" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31750" + ], + "x-ms-request-id": [ + "6138611e-a5a8-4410-a98c-2967722882cb" + ], + "x-ms-correlation-request-id": [ + "6138611e-a5a8-4410-a98c-2967722882cb" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004654Z:6138611e-a5a8-4410-a98c-2967722882cb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31748" + ], + "x-ms-request-id": [ + "2c9b524f-46b3-482e-ae01-4518111cadcb" + ], + "x-ms-correlation-request-id": [ + "2c9b524f-46b3-482e-ae01-4518111cadcb" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004656Z:2c9b524f-46b3-482e-ae01-4518111cadcb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:56 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31746" + ], + "x-ms-request-id": [ + "bc82c874-86b8-4fbf-9a51-9da16015b9c0" + ], + "x-ms-correlation-request-id": [ + "bc82c874-86b8-4fbf-9a51-9da16015b9c0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004658Z:bc82c874-86b8-4fbf-9a51-9da16015b9c0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:46:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31744" + ], + "x-ms-request-id": [ + "7a00f79d-dd09-4b79-82e1-b301b5c0d786" + ], + "x-ms-correlation-request-id": [ + "7a00f79d-dd09-4b79-82e1-b301b5c0d786" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004700Z:7a00f79d-dd09-4b79-82e1-b301b5c0d786" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31742" + ], + "x-ms-request-id": [ + "d4771d08-9608-4862-b646-19a373b86a9e" + ], + "x-ms-correlation-request-id": [ + "d4771d08-9608-4862-b646-19a373b86a9e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004702Z:d4771d08-9608-4862-b646-19a373b86a9e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:02 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31740" + ], + "x-ms-request-id": [ + "d58f2ac3-b804-4c62-86fd-73584582a9b7" + ], + "x-ms-correlation-request-id": [ + "d58f2ac3-b804-4c62-86fd-73584582a9b7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004705Z:d58f2ac3-b804-4c62-86fd-73584582a9b7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31738" + ], + "x-ms-request-id": [ + "164192ae-e64a-47fa-8b70-ed32faee977f" + ], + "x-ms-correlation-request-id": [ + "164192ae-e64a-47fa-8b70-ed32faee977f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004707Z:164192ae-e64a-47fa-8b70-ed32faee977f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:07 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31736" + ], + "x-ms-request-id": [ + "382c2120-bf3c-4e5f-b159-d9e2920ed225" + ], + "x-ms-correlation-request-id": [ + "382c2120-bf3c-4e5f-b159-d9e2920ed225" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004709Z:382c2120-bf3c-4e5f-b159-d9e2920ed225" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:09 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31734" + ], + "x-ms-request-id": [ + "2682e94b-7a3d-4085-8f8f-f77706ab70d0" + ], + "x-ms-correlation-request-id": [ + "2682e94b-7a3d-4085-8f8f-f77706ab70d0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004711Z:2682e94b-7a3d-4085-8f8f-f77706ab70d0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:11 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31732" + ], + "x-ms-request-id": [ + "a14187a7-6d80-482b-8a2a-b83f38e15929" + ], + "x-ms-correlation-request-id": [ + "a14187a7-6d80-482b-8a2a-b83f38e15929" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004714Z:a14187a7-6d80-482b-8a2a-b83f38e15929" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:14 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31730" + ], + "x-ms-request-id": [ + "a92af1f4-5128-482f-829b-bc15b0ac6fa1" + ], + "x-ms-correlation-request-id": [ + "a92af1f4-5128-482f-829b-bc15b0ac6fa1" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004716Z:a92af1f4-5128-482f-829b-bc15b0ac6fa1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:15 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31728" + ], + "x-ms-request-id": [ + "210d07c4-f365-412b-8c67-7ca3ef723910" + ], + "x-ms-correlation-request-id": [ + "210d07c4-f365-412b-8c67-7ca3ef723910" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004718Z:210d07c4-f365-412b-8c67-7ca3ef723910" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:18 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31726" + ], + "x-ms-request-id": [ + "ccb3eb79-45c3-4682-b902-bb9e31ad5f61" + ], + "x-ms-correlation-request-id": [ + "ccb3eb79-45c3-4682-b902-bb9e31ad5f61" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004720Z:ccb3eb79-45c3-4682-b902-bb9e31ad5f61" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:20 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31724" + ], + "x-ms-request-id": [ + "1686b828-f476-4756-897d-48533a5b145d" + ], + "x-ms-correlation-request-id": [ + "1686b828-f476-4756-897d-48533a5b145d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004723Z:1686b828-f476-4756-897d-48533a5b145d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:23 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31722" + ], + "x-ms-request-id": [ + "30f75a3f-883a-4e03-adc7-c3eb176face3" + ], + "x-ms-correlation-request-id": [ + "30f75a3f-883a-4e03-adc7-c3eb176face3" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004725Z:30f75a3f-883a-4e03-adc7-c3eb176face3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31720" + ], + "x-ms-request-id": [ + "4689a6af-a392-4aff-9627-0cab7080553c" + ], + "x-ms-correlation-request-id": [ + "4689a6af-a392-4aff-9627-0cab7080553c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004727Z:4689a6af-a392-4aff-9627-0cab7080553c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:27 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31718" + ], + "x-ms-request-id": [ + "89e55ec8-8fea-442a-8a8f-711300735855" + ], + "x-ms-correlation-request-id": [ + "89e55ec8-8fea-442a-8a8f-711300735855" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004729Z:89e55ec8-8fea-442a-8a8f-711300735855" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:29 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31716" + ], + "x-ms-request-id": [ + "b30e8ebc-a887-471a-b3c3-ea4d404a44e4" + ], + "x-ms-correlation-request-id": [ + "b30e8ebc-a887-471a-b3c3-ea4d404a44e4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004732Z:b30e8ebc-a887-471a-b3c3-ea4d404a44e4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:32 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31714" + ], + "x-ms-request-id": [ + "13d302f8-dad3-44b2-a4ad-c173e15425f2" + ], + "x-ms-correlation-request-id": [ + "13d302f8-dad3-44b2-a4ad-c173e15425f2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004734Z:13d302f8-dad3-44b2-a4ad-c173e15425f2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:34 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31712" + ], + "x-ms-request-id": [ + "62dcf961-e73c-488b-8b57-e0e35f3b433f" + ], + "x-ms-correlation-request-id": [ + "62dcf961-e73c-488b-8b57-e0e35f3b433f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004736Z:62dcf961-e73c-488b-8b57-e0e35f3b433f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:36 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31710" + ], + "x-ms-request-id": [ + "cc060101-a948-4bec-89d4-28fa6aad478b" + ], + "x-ms-correlation-request-id": [ + "cc060101-a948-4bec-89d4-28fa6aad478b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004738Z:cc060101-a948-4bec-89d4-28fa6aad478b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:38 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31708" + ], + "x-ms-request-id": [ + "f027a4ae-f409-4b33-938e-9d194877f882" + ], + "x-ms-correlation-request-id": [ + "f027a4ae-f409-4b33-938e-9d194877f882" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004741Z:f027a4ae-f409-4b33-938e-9d194877f882" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31706" + ], + "x-ms-request-id": [ + "edad4faf-2494-4b77-a289-2dada4a10f21" + ], + "x-ms-correlation-request-id": [ + "edad4faf-2494-4b77-a289-2dada4a10f21" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004743Z:edad4faf-2494-4b77-a289-2dada4a10f21" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31704" + ], + "x-ms-request-id": [ + "36e77a0b-fa6f-4c13-81e8-bad3341d8de7" + ], + "x-ms-correlation-request-id": [ + "36e77a0b-fa6f-4c13-81e8-bad3341d8de7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004745Z:36e77a0b-fa6f-4c13-81e8-bad3341d8de7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31702" + ], + "x-ms-request-id": [ + "22c8a454-7f19-420f-bee2-b66f8670767c" + ], + "x-ms-correlation-request-id": [ + "22c8a454-7f19-420f-bee2-b66f8670767c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004747Z:22c8a454-7f19-420f-bee2-b66f8670767c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:47 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31700" + ], + "x-ms-request-id": [ + "d6662432-1617-4270-9aba-544b1338a8a5" + ], + "x-ms-correlation-request-id": [ + "d6662432-1617-4270-9aba-544b1338a8a5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004750Z:d6662432-1617-4270-9aba-544b1338a8a5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31698" + ], + "x-ms-request-id": [ + "8d893bf0-070a-4d83-8455-8a64005cb871" + ], + "x-ms-correlation-request-id": [ + "8d893bf0-070a-4d83-8455-8a64005cb871" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004752Z:8d893bf0-070a-4d83-8455-8a64005cb871" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31696" + ], + "x-ms-request-id": [ + "baa24862-96aa-4630-841c-47c8d498ba8e" + ], + "x-ms-correlation-request-id": [ + "baa24862-96aa-4630-841c-47c8d498ba8e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004754Z:baa24862-96aa-4630-841c-47c8d498ba8e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31694" + ], + "x-ms-request-id": [ + "b517f16a-d36b-4984-a739-7f6e6e0d0c71" + ], + "x-ms-correlation-request-id": [ + "b517f16a-d36b-4984-a739-7f6e6e0d0c71" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004756Z:b517f16a-d36b-4984-a739-7f6e6e0d0c71" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:56 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31692" + ], + "x-ms-request-id": [ + "9400748e-ba1a-45ab-ba72-f3f3f4e2df06" + ], + "x-ms-correlation-request-id": [ + "9400748e-ba1a-45ab-ba72-f3f3f4e2df06" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004758Z:9400748e-ba1a-45ab-ba72-f3f3f4e2df06" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:47:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31690" + ], + "x-ms-request-id": [ + "12dc93db-e4ce-4092-92c8-d5feba1ef219" + ], + "x-ms-correlation-request-id": [ + "12dc93db-e4ce-4092-92c8-d5feba1ef219" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004801Z:12dc93db-e4ce-4092-92c8-d5feba1ef219" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31688" + ], + "x-ms-request-id": [ + "fe0318da-0a3e-4bd6-b1d5-ecc13a77f1a6" + ], + "x-ms-correlation-request-id": [ + "fe0318da-0a3e-4bd6-b1d5-ecc13a77f1a6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004803Z:fe0318da-0a3e-4bd6-b1d5-ecc13a77f1a6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31686" + ], + "x-ms-request-id": [ + "7a7a3736-3b2a-4342-9089-f02060f3f3d8" + ], + "x-ms-correlation-request-id": [ + "7a7a3736-3b2a-4342-9089-f02060f3f3d8" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004805Z:7a7a3736-3b2a-4342-9089-f02060f3f3d8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:05 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31684" + ], + "x-ms-request-id": [ + "ca70dd93-d5dc-420b-8a54-cef7d21969e7" + ], + "x-ms-correlation-request-id": [ + "ca70dd93-d5dc-420b-8a54-cef7d21969e7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004807Z:ca70dd93-d5dc-420b-8a54-cef7d21969e7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:07 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31682" + ], + "x-ms-request-id": [ + "1a1ce270-6825-4f06-990d-ed53bd801002" + ], + "x-ms-correlation-request-id": [ + "1a1ce270-6825-4f06-990d-ed53bd801002" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004810Z:1a1ce270-6825-4f06-990d-ed53bd801002" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31680" + ], + "x-ms-request-id": [ + "a342c7a6-f73c-431b-8f5d-9f11f49253ba" + ], + "x-ms-correlation-request-id": [ + "a342c7a6-f73c-431b-8f5d-9f11f49253ba" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004812Z:a342c7a6-f73c-431b-8f5d-9f11f49253ba" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:12 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31678" + ], + "x-ms-request-id": [ + "3bd40e12-9ca0-43dd-a5e1-d010d12349af" + ], + "x-ms-correlation-request-id": [ + "3bd40e12-9ca0-43dd-a5e1-d010d12349af" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004814Z:3bd40e12-9ca0-43dd-a5e1-d010d12349af" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:14 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31676" + ], + "x-ms-request-id": [ + "e2492e72-6bfb-44c0-be34-af8aed62c350" + ], + "x-ms-correlation-request-id": [ + "e2492e72-6bfb-44c0-be34-af8aed62c350" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004817Z:e2492e72-6bfb-44c0-be34-af8aed62c350" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:16 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31674" + ], + "x-ms-request-id": [ + "238b426d-7709-4abe-9502-298e153d05f4" + ], + "x-ms-correlation-request-id": [ + "238b426d-7709-4abe-9502-298e153d05f4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004819Z:238b426d-7709-4abe-9502-298e153d05f4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31672" + ], + "x-ms-request-id": [ + "b7c283f5-ca6a-4bbd-8190-571fc69273ce" + ], + "x-ms-correlation-request-id": [ + "b7c283f5-ca6a-4bbd-8190-571fc69273ce" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004821Z:b7c283f5-ca6a-4bbd-8190-571fc69273ce" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:21 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31670" + ], + "x-ms-request-id": [ + "96b9d883-40a0-42c4-87b0-d332b07a8750" + ], + "x-ms-correlation-request-id": [ + "96b9d883-40a0-42c4-87b0-d332b07a8750" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004823Z:96b9d883-40a0-42c4-87b0-d332b07a8750" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:23 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31668" + ], + "x-ms-request-id": [ + "8a5994e8-ce6e-4d46-bffd-ea543a182564" + ], + "x-ms-correlation-request-id": [ + "8a5994e8-ce6e-4d46-bffd-ea543a182564" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004825Z:8a5994e8-ce6e-4d46-bffd-ea543a182564" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:25 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31666" + ], + "x-ms-request-id": [ + "686db634-723c-44e8-98b7-02ee6725d462" + ], + "x-ms-correlation-request-id": [ + "686db634-723c-44e8-98b7-02ee6725d462" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004828Z:686db634-723c-44e8-98b7-02ee6725d462" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31664" + ], + "x-ms-request-id": [ + "bdf127fe-558d-4c22-b958-36ff235f9f4c" + ], + "x-ms-correlation-request-id": [ + "bdf127fe-558d-4c22-b958-36ff235f9f4c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004830Z:bdf127fe-558d-4c22-b958-36ff235f9f4c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:30 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31662" + ], + "x-ms-request-id": [ + "c1598518-688d-4b33-b89b-bdc68cd053bb" + ], + "x-ms-correlation-request-id": [ + "c1598518-688d-4b33-b89b-bdc68cd053bb" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004832Z:c1598518-688d-4b33-b89b-bdc68cd053bb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:32 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31660" + ], + "x-ms-request-id": [ + "fdd8b344-e6a0-43c9-a9a6-64b2de121134" + ], + "x-ms-correlation-request-id": [ + "fdd8b344-e6a0-43c9-a9a6-64b2de121134" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004835Z:fdd8b344-e6a0-43c9-a9a6-64b2de121134" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:34 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31658" + ], + "x-ms-request-id": [ + "906e9de2-6e59-4915-a72b-0b29989d23a2" + ], + "x-ms-correlation-request-id": [ + "906e9de2-6e59-4915-a72b-0b29989d23a2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004837Z:906e9de2-6e59-4915-a72b-0b29989d23a2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:37 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31656" + ], + "x-ms-request-id": [ + "bb5f4eee-5fbe-42d5-a011-ff534ddd7abb" + ], + "x-ms-correlation-request-id": [ + "bb5f4eee-5fbe-42d5-a011-ff534ddd7abb" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004839Z:bb5f4eee-5fbe-42d5-a011-ff534ddd7abb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31654" + ], + "x-ms-request-id": [ + "36ff12a8-c8cd-4b1e-84ae-ba8c15459d70" + ], + "x-ms-correlation-request-id": [ + "36ff12a8-c8cd-4b1e-84ae-ba8c15459d70" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004841Z:36ff12a8-c8cd-4b1e-84ae-ba8c15459d70" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31652" + ], + "x-ms-request-id": [ + "d5040b55-5d05-46b9-a77e-37979fa9ca4e" + ], + "x-ms-correlation-request-id": [ + "d5040b55-5d05-46b9-a77e-37979fa9ca4e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004843Z:d5040b55-5d05-46b9-a77e-37979fa9ca4e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31650" + ], + "x-ms-request-id": [ + "13731ac7-369d-4ece-be6b-de398fb33ced" + ], + "x-ms-correlation-request-id": [ + "13731ac7-369d-4ece-be6b-de398fb33ced" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004846Z:13731ac7-369d-4ece-be6b-de398fb33ced" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31648" + ], + "x-ms-request-id": [ + "4fa6aa02-55bc-4cbf-a47f-1167b547e78c" + ], + "x-ms-correlation-request-id": [ + "4fa6aa02-55bc-4cbf-a47f-1167b547e78c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004848Z:4fa6aa02-55bc-4cbf-a47f-1167b547e78c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31646" + ], + "x-ms-request-id": [ + "bc573c53-d8e8-4efa-bf6b-cbb8f948e5f2" + ], + "x-ms-correlation-request-id": [ + "bc573c53-d8e8-4efa-bf6b-cbb8f948e5f2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004850Z:bc573c53-d8e8-4efa-bf6b-cbb8f948e5f2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31644" + ], + "x-ms-request-id": [ + "d852d0d9-7462-4151-a5f9-c81eecffdd47" + ], + "x-ms-correlation-request-id": [ + "d852d0d9-7462-4151-a5f9-c81eecffdd47" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004852Z:d852d0d9-7462-4151-a5f9-c81eecffdd47" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:52 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31642" + ], + "x-ms-request-id": [ + "6b9a4b2b-2bef-496b-871a-6bd83753613f" + ], + "x-ms-correlation-request-id": [ + "6b9a4b2b-2bef-496b-871a-6bd83753613f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004855Z:6b9a4b2b-2bef-496b-871a-6bd83753613f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31640" + ], + "x-ms-request-id": [ + "382171fe-eb67-4523-af7b-0683cb48b770" + ], + "x-ms-correlation-request-id": [ + "382171fe-eb67-4523-af7b-0683cb48b770" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004857Z:382171fe-eb67-4523-af7b-0683cb48b770" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31638" + ], + "x-ms-request-id": [ + "82929b46-b17b-43f7-8f02-f390d0a68e0f" + ], + "x-ms-correlation-request-id": [ + "82929b46-b17b-43f7-8f02-f390d0a68e0f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004859Z:82929b46-b17b-43f7-8f02-f390d0a68e0f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:48:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31636" + ], + "x-ms-request-id": [ + "998e503b-9ac1-463b-86ea-a063e87c7e52" + ], + "x-ms-correlation-request-id": [ + "998e503b-9ac1-463b-86ea-a063e87c7e52" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004901Z:998e503b-9ac1-463b-86ea-a063e87c7e52" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31634" + ], + "x-ms-request-id": [ + "5926cd69-0c75-4d06-ac37-1c58408c06ef" + ], + "x-ms-correlation-request-id": [ + "5926cd69-0c75-4d06-ac37-1c58408c06ef" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004904Z:5926cd69-0c75-4d06-ac37-1c58408c06ef" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31632" + ], + "x-ms-request-id": [ + "780c66ab-4e70-4054-99c9-55a06cb9ec1e" + ], + "x-ms-correlation-request-id": [ + "780c66ab-4e70-4054-99c9-55a06cb9ec1e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004906Z:780c66ab-4e70-4054-99c9-55a06cb9ec1e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31630" + ], + "x-ms-request-id": [ + "04a508ab-c476-442c-b4ab-46b5e7cddc69" + ], + "x-ms-correlation-request-id": [ + "04a508ab-c476-442c-b4ab-46b5e7cddc69" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004908Z:04a508ab-c476-442c-b4ab-46b5e7cddc69" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:08 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31628" + ], + "x-ms-request-id": [ + "e681b74a-c2e9-4c23-9190-8e11b4c590a0" + ], + "x-ms-correlation-request-id": [ + "e681b74a-c2e9-4c23-9190-8e11b4c590a0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004910Z:e681b74a-c2e9-4c23-9190-8e11b4c590a0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31626" + ], + "x-ms-request-id": [ + "dd73ff6f-0a89-4f0b-b13d-148391354601" + ], + "x-ms-correlation-request-id": [ + "dd73ff6f-0a89-4f0b-b13d-148391354601" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004913Z:dd73ff6f-0a89-4f0b-b13d-148391354601" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:12 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31624" + ], + "x-ms-request-id": [ + "72e4b441-6417-439f-9b83-6e378a3dc611" + ], + "x-ms-correlation-request-id": [ + "72e4b441-6417-439f-9b83-6e378a3dc611" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004915Z:72e4b441-6417-439f-9b83-6e378a3dc611" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:15 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31622" + ], + "x-ms-request-id": [ + "422a2e9e-6473-419f-8fab-c08ea993ca49" + ], + "x-ms-correlation-request-id": [ + "422a2e9e-6473-419f-8fab-c08ea993ca49" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004917Z:422a2e9e-6473-419f-8fab-c08ea993ca49" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:17 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31620" + ], + "x-ms-request-id": [ + "ea80f260-2f9b-44c4-a8c6-52ffa3e8a02d" + ], + "x-ms-correlation-request-id": [ + "ea80f260-2f9b-44c4-a8c6-52ffa3e8a02d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004919Z:ea80f260-2f9b-44c4-a8c6-52ffa3e8a02d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:18 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31618" + ], + "x-ms-request-id": [ + "4381ddbe-0e28-4970-b98e-b74188d9e176" + ], + "x-ms-correlation-request-id": [ + "4381ddbe-0e28-4970-b98e-b74188d9e176" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004921Z:4381ddbe-0e28-4970-b98e-b74188d9e176" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:21 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31616" + ], + "x-ms-request-id": [ + "c35d9b03-278e-4c24-8de7-fe98c9937b9a" + ], + "x-ms-correlation-request-id": [ + "c35d9b03-278e-4c24-8de7-fe98c9937b9a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004924Z:c35d9b03-278e-4c24-8de7-fe98c9937b9a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:23 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31614" + ], + "x-ms-request-id": [ + "1351a8f2-b33a-4633-9e6d-60505e8a819f" + ], + "x-ms-correlation-request-id": [ + "1351a8f2-b33a-4633-9e6d-60505e8a819f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004926Z:1351a8f2-b33a-4633-9e6d-60505e8a819f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31612" + ], + "x-ms-request-id": [ + "389eec1a-6d24-41a6-b5f5-5ead5daf26f6" + ], + "x-ms-correlation-request-id": [ + "389eec1a-6d24-41a6-b5f5-5ead5daf26f6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004928Z:389eec1a-6d24-41a6-b5f5-5ead5daf26f6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31610" + ], + "x-ms-request-id": [ + "2bb1e2df-8213-4ce2-9b46-2d1a4fc0fa9a" + ], + "x-ms-correlation-request-id": [ + "2bb1e2df-8213-4ce2-9b46-2d1a4fc0fa9a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004930Z:2bb1e2df-8213-4ce2-9b46-2d1a4fc0fa9a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:30 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31608" + ], + "x-ms-request-id": [ + "b2054cbd-64ae-4ddd-94d8-29422df3fff6" + ], + "x-ms-correlation-request-id": [ + "b2054cbd-64ae-4ddd-94d8-29422df3fff6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004933Z:b2054cbd-64ae-4ddd-94d8-29422df3fff6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:32 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31606" + ], + "x-ms-request-id": [ + "db7d8163-739e-49ac-b5db-6c56a34cd2e8" + ], + "x-ms-correlation-request-id": [ + "db7d8163-739e-49ac-b5db-6c56a34cd2e8" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004935Z:db7d8163-739e-49ac-b5db-6c56a34cd2e8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31604" + ], + "x-ms-request-id": [ + "27cc1059-59e3-4dfd-bfc3-2fa05e66dec5" + ], + "x-ms-correlation-request-id": [ + "27cc1059-59e3-4dfd-bfc3-2fa05e66dec5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004937Z:27cc1059-59e3-4dfd-bfc3-2fa05e66dec5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:37 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31602" + ], + "x-ms-request-id": [ + "b71c5fc4-6667-4228-8e82-8c9b07aaa65e" + ], + "x-ms-correlation-request-id": [ + "b71c5fc4-6667-4228-8e82-8c9b07aaa65e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004939Z:b71c5fc4-6667-4228-8e82-8c9b07aaa65e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31600" + ], + "x-ms-request-id": [ + "576aaf4a-b8e6-4a30-9a02-283d462e7c8c" + ], + "x-ms-correlation-request-id": [ + "576aaf4a-b8e6-4a30-9a02-283d462e7c8c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004942Z:576aaf4a-b8e6-4a30-9a02-283d462e7c8c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31598" + ], + "x-ms-request-id": [ + "d8589f64-fcc3-4ece-aa2f-63489f3edb8b" + ], + "x-ms-correlation-request-id": [ + "d8589f64-fcc3-4ece-aa2f-63489f3edb8b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004944Z:d8589f64-fcc3-4ece-aa2f-63489f3edb8b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31596" + ], + "x-ms-request-id": [ + "cc0b8aed-554b-4f51-9192-24a3620f9b9c" + ], + "x-ms-correlation-request-id": [ + "cc0b8aed-554b-4f51-9192-24a3620f9b9c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004946Z:cc0b8aed-554b-4f51-9192-24a3620f9b9c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31594" + ], + "x-ms-request-id": [ + "d0b045cf-9035-439a-94f3-a728f381abd4" + ], + "x-ms-correlation-request-id": [ + "d0b045cf-9035-439a-94f3-a728f381abd4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004948Z:d0b045cf-9035-439a-94f3-a728f381abd4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31592" + ], + "x-ms-request-id": [ + "d692fea5-5f61-463c-bde6-ffd318de967a" + ], + "x-ms-correlation-request-id": [ + "d692fea5-5f61-463c-bde6-ffd318de967a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004950Z:d692fea5-5f61-463c-bde6-ffd318de967a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31590" + ], + "x-ms-request-id": [ + "14f83869-589b-46b5-889c-377f1b51d191" + ], + "x-ms-correlation-request-id": [ + "14f83869-589b-46b5-889c-377f1b51d191" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004953Z:14f83869-589b-46b5-889c-377f1b51d191" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:52 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31588" + ], + "x-ms-request-id": [ + "c208b542-e1c9-40b4-b8d9-4705c5be34dc" + ], + "x-ms-correlation-request-id": [ + "c208b542-e1c9-40b4-b8d9-4705c5be34dc" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004955Z:c208b542-e1c9-40b4-b8d9-4705c5be34dc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31586" + ], + "x-ms-request-id": [ + "b7f9e9ba-d102-4106-825c-d73bf44dbf13" + ], + "x-ms-correlation-request-id": [ + "b7f9e9ba-d102-4106-825c-d73bf44dbf13" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004957Z:b7f9e9ba-d102-4106-825c-d73bf44dbf13" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31584" + ], + "x-ms-request-id": [ + "79f66bac-66e6-44b7-a3bc-795bdcafe8b7" + ], + "x-ms-correlation-request-id": [ + "79f66bac-66e6-44b7-a3bc-795bdcafe8b7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T004959Z:79f66bac-66e6-44b7-a3bc-795bdcafe8b7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:49:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31582" + ], + "x-ms-request-id": [ + "ed9f57eb-97b1-4024-9cd8-881f8ab363e2" + ], + "x-ms-correlation-request-id": [ + "ed9f57eb-97b1-4024-9cd8-881f8ab363e2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005002Z:ed9f57eb-97b1-4024-9cd8-881f8ab363e2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31580" + ], + "x-ms-request-id": [ + "afafab70-7b91-487b-992c-8403db038b95" + ], + "x-ms-correlation-request-id": [ + "afafab70-7b91-487b-992c-8403db038b95" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005004Z:afafab70-7b91-487b-992c-8403db038b95" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31578" + ], + "x-ms-request-id": [ + "3064ebad-6ca2-4454-bde6-7db4a79e9ca8" + ], + "x-ms-correlation-request-id": [ + "3064ebad-6ca2-4454-bde6-7db4a79e9ca8" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005006Z:3064ebad-6ca2-4454-bde6-7db4a79e9ca8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31576" + ], + "x-ms-request-id": [ + "17c8f056-33e7-4ad5-8ada-389a8dec209e" + ], + "x-ms-correlation-request-id": [ + "17c8f056-33e7-4ad5-8ada-389a8dec209e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005008Z:17c8f056-33e7-4ad5-8ada-389a8dec209e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:08 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31574" + ], + "x-ms-request-id": [ + "8dc8f9d3-7a89-4b74-bf7e-2d05c1215a85" + ], + "x-ms-correlation-request-id": [ + "8dc8f9d3-7a89-4b74-bf7e-2d05c1215a85" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005011Z:8dc8f9d3-7a89-4b74-bf7e-2d05c1215a85" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31572" + ], + "x-ms-request-id": [ + "e32a8749-b0bd-4542-bab0-86977177b9e1" + ], + "x-ms-correlation-request-id": [ + "e32a8749-b0bd-4542-bab0-86977177b9e1" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005013Z:e32a8749-b0bd-4542-bab0-86977177b9e1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31570" + ], + "x-ms-request-id": [ + "68d0bf52-c4e0-42a8-8182-14f612a08497" + ], + "x-ms-correlation-request-id": [ + "68d0bf52-c4e0-42a8-8182-14f612a08497" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005015Z:68d0bf52-c4e0-42a8-8182-14f612a08497" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:15 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31568" + ], + "x-ms-request-id": [ + "e26ed641-cc82-4e4e-885f-f2f93fd5a0f5" + ], + "x-ms-correlation-request-id": [ + "e26ed641-cc82-4e4e-885f-f2f93fd5a0f5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005017Z:e26ed641-cc82-4e4e-885f-f2f93fd5a0f5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:17 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31566" + ], + "x-ms-request-id": [ + "c0e58e63-f935-4a89-8bd4-36737abec815" + ], + "x-ms-correlation-request-id": [ + "c0e58e63-f935-4a89-8bd4-36737abec815" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005019Z:c0e58e63-f935-4a89-8bd4-36737abec815" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31564" + ], + "x-ms-request-id": [ + "aa3b05cb-8f89-4453-9121-73aea852f2a9" + ], + "x-ms-correlation-request-id": [ + "aa3b05cb-8f89-4453-9121-73aea852f2a9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005022Z:aa3b05cb-8f89-4453-9121-73aea852f2a9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31562" + ], + "x-ms-request-id": [ + "fc4a6a64-c6f9-48e3-a484-6070f53d1fda" + ], + "x-ms-correlation-request-id": [ + "fc4a6a64-c6f9-48e3-a484-6070f53d1fda" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005024Z:fc4a6a64-c6f9-48e3-a484-6070f53d1fda" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31560" + ], + "x-ms-request-id": [ + "11912385-9d5a-4f50-ad7a-ba0991d960bd" + ], + "x-ms-correlation-request-id": [ + "11912385-9d5a-4f50-ad7a-ba0991d960bd" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005026Z:11912385-9d5a-4f50-ad7a-ba0991d960bd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31558" + ], + "x-ms-request-id": [ + "0b3e8a28-357a-4ef7-8cd7-990fb30f8944" + ], + "x-ms-correlation-request-id": [ + "0b3e8a28-357a-4ef7-8cd7-990fb30f8944" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005028Z:0b3e8a28-357a-4ef7-8cd7-990fb30f8944" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31556" + ], + "x-ms-request-id": [ + "cc014c11-5d8d-4e5b-9425-5a2488d83e2f" + ], + "x-ms-correlation-request-id": [ + "cc014c11-5d8d-4e5b-9425-5a2488d83e2f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005031Z:cc014c11-5d8d-4e5b-9425-5a2488d83e2f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:30 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31554" + ], + "x-ms-request-id": [ + "93ed576f-1038-431a-8781-76e6cc601993" + ], + "x-ms-correlation-request-id": [ + "93ed576f-1038-431a-8781-76e6cc601993" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005033Z:93ed576f-1038-431a-8781-76e6cc601993" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31552" + ], + "x-ms-request-id": [ + "b5e554e7-667e-4570-8c4b-b67c7e68541b" + ], + "x-ms-correlation-request-id": [ + "b5e554e7-667e-4570-8c4b-b67c7e68541b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005035Z:b5e554e7-667e-4570-8c4b-b67c7e68541b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31550" + ], + "x-ms-request-id": [ + "b0da69f9-cf03-463a-a16d-3d7f1cd628f2" + ], + "x-ms-correlation-request-id": [ + "b0da69f9-cf03-463a-a16d-3d7f1cd628f2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005037Z:b0da69f9-cf03-463a-a16d-3d7f1cd628f2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:37 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31548" + ], + "x-ms-request-id": [ + "dcbd4331-7c29-45e7-95fa-b9cba5c4dfe2" + ], + "x-ms-correlation-request-id": [ + "dcbd4331-7c29-45e7-95fa-b9cba5c4dfe2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005039Z:dcbd4331-7c29-45e7-95fa-b9cba5c4dfe2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31546" + ], + "x-ms-request-id": [ + "322814ff-ce69-4cef-98c3-c4742ebbcb2a" + ], + "x-ms-correlation-request-id": [ + "322814ff-ce69-4cef-98c3-c4742ebbcb2a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005042Z:322814ff-ce69-4cef-98c3-c4742ebbcb2a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31544" + ], + "x-ms-request-id": [ + "451d31ad-8910-48b4-94cd-74b2e22df0e8" + ], + "x-ms-correlation-request-id": [ + "451d31ad-8910-48b4-94cd-74b2e22df0e8" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005044Z:451d31ad-8910-48b4-94cd-74b2e22df0e8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31542" + ], + "x-ms-request-id": [ + "18d98e60-665b-4447-8cb7-1b20b916a4a7" + ], + "x-ms-correlation-request-id": [ + "18d98e60-665b-4447-8cb7-1b20b916a4a7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005046Z:18d98e60-665b-4447-8cb7-1b20b916a4a7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31540" + ], + "x-ms-request-id": [ + "3dbff8e8-de16-4b28-a86b-e12f848e3f4c" + ], + "x-ms-correlation-request-id": [ + "3dbff8e8-de16-4b28-a86b-e12f848e3f4c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005049Z:3dbff8e8-de16-4b28-a86b-e12f848e3f4c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31538" + ], + "x-ms-request-id": [ + "94cb16e4-852a-4103-9a22-01ad76bb0895" + ], + "x-ms-correlation-request-id": [ + "94cb16e4-852a-4103-9a22-01ad76bb0895" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005051Z:94cb16e4-852a-4103-9a22-01ad76bb0895" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31536" + ], + "x-ms-request-id": [ + "8f26dd6f-01da-41c9-b195-4b3812f47635" + ], + "x-ms-correlation-request-id": [ + "8f26dd6f-01da-41c9-b195-4b3812f47635" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005053Z:8f26dd6f-01da-41c9-b195-4b3812f47635" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31534" + ], + "x-ms-request-id": [ + "4e1062d1-f4f8-491e-94a3-d196eaf333f6" + ], + "x-ms-correlation-request-id": [ + "4e1062d1-f4f8-491e-94a3-d196eaf333f6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005055Z:4e1062d1-f4f8-491e-94a3-d196eaf333f6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31532" + ], + "x-ms-request-id": [ + "f6b40989-64f0-4a08-a296-97bb536477e9" + ], + "x-ms-correlation-request-id": [ + "f6b40989-64f0-4a08-a296-97bb536477e9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005057Z:f6b40989-64f0-4a08-a296-97bb536477e9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31530" + ], + "x-ms-request-id": [ + "c6cbe123-e0b1-409a-a01a-665deca30e08" + ], + "x-ms-correlation-request-id": [ + "c6cbe123-e0b1-409a-a01a-665deca30e08" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005100Z:c6cbe123-e0b1-409a-a01a-665deca30e08" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:50:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31528" + ], + "x-ms-request-id": [ + "af2f37e5-6731-47a7-97aa-94e8fad99521" + ], + "x-ms-correlation-request-id": [ + "af2f37e5-6731-47a7-97aa-94e8fad99521" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005102Z:af2f37e5-6731-47a7-97aa-94e8fad99521" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:02 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31526" + ], + "x-ms-request-id": [ + "f849c3f7-c9bd-49fa-8ad7-e5e63dbf6f3b" + ], + "x-ms-correlation-request-id": [ + "f849c3f7-c9bd-49fa-8ad7-e5e63dbf6f3b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005104Z:f849c3f7-c9bd-49fa-8ad7-e5e63dbf6f3b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31524" + ], + "x-ms-request-id": [ + "b45cc3af-c433-461e-9642-9c8c890d0492" + ], + "x-ms-correlation-request-id": [ + "b45cc3af-c433-461e-9642-9c8c890d0492" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005106Z:b45cc3af-c433-461e-9642-9c8c890d0492" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31522" + ], + "x-ms-request-id": [ + "0ae025a1-3db0-482e-a429-6c4f566955ae" + ], + "x-ms-correlation-request-id": [ + "0ae025a1-3db0-482e-a429-6c4f566955ae" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005109Z:0ae025a1-3db0-482e-a429-6c4f566955ae" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:08 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31520" + ], + "x-ms-request-id": [ + "506f9232-f3d2-48df-9ec6-f1d54865f7d3" + ], + "x-ms-correlation-request-id": [ + "506f9232-f3d2-48df-9ec6-f1d54865f7d3" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005111Z:506f9232-f3d2-48df-9ec6-f1d54865f7d3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:11 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31518" + ], + "x-ms-request-id": [ + "190378e3-b61d-47d8-be9f-c0e37c6b446d" + ], + "x-ms-correlation-request-id": [ + "190378e3-b61d-47d8-be9f-c0e37c6b446d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005113Z:190378e3-b61d-47d8-be9f-c0e37c6b446d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31516" + ], + "x-ms-request-id": [ + "4566d621-f978-4447-b08c-47d4dbb77038" + ], + "x-ms-correlation-request-id": [ + "4566d621-f978-4447-b08c-47d4dbb77038" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005115Z:4566d621-f978-4447-b08c-47d4dbb77038" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:14 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31514" + ], + "x-ms-request-id": [ + "e915ed05-fd65-437f-9975-d39c9c1baab5" + ], + "x-ms-correlation-request-id": [ + "e915ed05-fd65-437f-9975-d39c9c1baab5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005118Z:e915ed05-fd65-437f-9975-d39c9c1baab5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:18 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31512" + ], + "x-ms-request-id": [ + "f71ff310-2d7c-41b6-923e-6e9cbb76af0c" + ], + "x-ms-correlation-request-id": [ + "f71ff310-2d7c-41b6-923e-6e9cbb76af0c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005120Z:f71ff310-2d7c-41b6-923e-6e9cbb76af0c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:20 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31510" + ], + "x-ms-request-id": [ + "57a87efe-5c25-4327-8ea5-08f2b033094c" + ], + "x-ms-correlation-request-id": [ + "57a87efe-5c25-4327-8ea5-08f2b033094c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005122Z:57a87efe-5c25-4327-8ea5-08f2b033094c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31508" + ], + "x-ms-request-id": [ + "506e72ea-793e-49ad-ad76-5b9f0eee04a4" + ], + "x-ms-correlation-request-id": [ + "506e72ea-793e-49ad-ad76-5b9f0eee04a4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005124Z:506e72ea-793e-49ad-ad76-5b9f0eee04a4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31506" + ], + "x-ms-request-id": [ + "b68d9beb-0ea4-4fda-b9c2-aa606abab2fc" + ], + "x-ms-correlation-request-id": [ + "b68d9beb-0ea4-4fda-b9c2-aa606abab2fc" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005126Z:b68d9beb-0ea4-4fda-b9c2-aa606abab2fc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31504" + ], + "x-ms-request-id": [ + "38e82feb-4a68-44b9-9d22-bdcf8b58cc55" + ], + "x-ms-correlation-request-id": [ + "38e82feb-4a68-44b9-9d22-bdcf8b58cc55" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005129Z:38e82feb-4a68-44b9-9d22-bdcf8b58cc55" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:29 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31502" + ], + "x-ms-request-id": [ + "1035196f-80b8-4b0c-a079-97a485d91b62" + ], + "x-ms-correlation-request-id": [ + "1035196f-80b8-4b0c-a079-97a485d91b62" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005131Z:1035196f-80b8-4b0c-a079-97a485d91b62" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:30 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31500" + ], + "x-ms-request-id": [ + "c2777133-df32-497d-964a-b7bc8a133151" + ], + "x-ms-correlation-request-id": [ + "c2777133-df32-497d-964a-b7bc8a133151" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005133Z:c2777133-df32-497d-964a-b7bc8a133151" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31498" + ], + "x-ms-request-id": [ + "44ab4a90-7523-46d5-baa6-00f2adabb6e7" + ], + "x-ms-correlation-request-id": [ + "44ab4a90-7523-46d5-baa6-00f2adabb6e7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005135Z:44ab4a90-7523-46d5-baa6-00f2adabb6e7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31496" + ], + "x-ms-request-id": [ + "d5e6c319-14e4-40eb-8eb7-e88ef3c26215" + ], + "x-ms-correlation-request-id": [ + "d5e6c319-14e4-40eb-8eb7-e88ef3c26215" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005138Z:d5e6c319-14e4-40eb-8eb7-e88ef3c26215" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:38 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31494" + ], + "x-ms-request-id": [ + "2c685b11-fd03-4f5b-97dd-29c27b75dc2a" + ], + "x-ms-correlation-request-id": [ + "2c685b11-fd03-4f5b-97dd-29c27b75dc2a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005140Z:2c685b11-fd03-4f5b-97dd-29c27b75dc2a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31492" + ], + "x-ms-request-id": [ + "8ceb2f9a-e8c1-4c75-94f9-5567bfc36afc" + ], + "x-ms-correlation-request-id": [ + "8ceb2f9a-e8c1-4c75-94f9-5567bfc36afc" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005142Z:8ceb2f9a-e8c1-4c75-94f9-5567bfc36afc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31490" + ], + "x-ms-request-id": [ + "83c7e245-9a67-4784-b4f8-d005408238fe" + ], + "x-ms-correlation-request-id": [ + "83c7e245-9a67-4784-b4f8-d005408238fe" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005144Z:83c7e245-9a67-4784-b4f8-d005408238fe" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31488" + ], + "x-ms-request-id": [ + "a47c9fe3-9543-45e7-a2f3-fa36f5e2f0e7" + ], + "x-ms-correlation-request-id": [ + "a47c9fe3-9543-45e7-a2f3-fa36f5e2f0e7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005147Z:a47c9fe3-9543-45e7-a2f3-fa36f5e2f0e7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31486" + ], + "x-ms-request-id": [ + "8c92fdee-d07f-471c-b047-4de313219b1b" + ], + "x-ms-correlation-request-id": [ + "8c92fdee-d07f-471c-b047-4de313219b1b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005149Z:8c92fdee-d07f-471c-b047-4de313219b1b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31484" + ], + "x-ms-request-id": [ + "a6bb60d9-3928-4aee-ae76-d73f7a4928c8" + ], + "x-ms-correlation-request-id": [ + "a6bb60d9-3928-4aee-ae76-d73f7a4928c8" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005151Z:a6bb60d9-3928-4aee-ae76-d73f7a4928c8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31482" + ], + "x-ms-request-id": [ + "2659f4d5-816e-4868-bd9c-aa012fff60aa" + ], + "x-ms-correlation-request-id": [ + "2659f4d5-816e-4868-bd9c-aa012fff60aa" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005153Z:2659f4d5-816e-4868-bd9c-aa012fff60aa" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31480" + ], + "x-ms-request-id": [ + "55e415e5-3ec9-4840-bf42-4425be8ec171" + ], + "x-ms-correlation-request-id": [ + "55e415e5-3ec9-4840-bf42-4425be8ec171" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005155Z:55e415e5-3ec9-4840-bf42-4425be8ec171" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31478" + ], + "x-ms-request-id": [ + "f006cfb0-f8ae-4d33-9c6e-6f045f2bcd6b" + ], + "x-ms-correlation-request-id": [ + "f006cfb0-f8ae-4d33-9c6e-6f045f2bcd6b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005158Z:f006cfb0-f8ae-4d33-9c6e-6f045f2bcd6b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:51:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31476" + ], + "x-ms-request-id": [ + "ab35761c-b9d5-4ad4-9f6c-2e1ff70cdeab" + ], + "x-ms-correlation-request-id": [ + "ab35761c-b9d5-4ad4-9f6c-2e1ff70cdeab" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005200Z:ab35761c-b9d5-4ad4-9f6c-2e1ff70cdeab" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:52:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/deployments/Microsoft.Cache.0.4.0-preview\",\r\n \"name\": \"Microsoft.Cache.0.4.0-preview\",\r\n \"properties\": {\r\n \"templateLink\": {\r\n \"uri\": \"https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.CACHE.0.4.0-PREVIEW/DeploymentTemplates/NewRedisCache.json\",\r\n \"contentVersion\": \"1.0.0.0\"\r\n },\r\n \"parameters\": {\r\n \"cacheLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"cacheName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk6627\"\r\n },\r\n \"size\": {\r\n \"type\": \"String\",\r\n \"value\": \"C0\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Standard\"\r\n },\r\n \"version\": {\r\n \"type\": \"String\",\r\n \"value\": \"2.8\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-08-06T00:42:43.743499Z\",\r\n \"correlationId\": \"2828344e-9561-4c19-a641-f56adb2048f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": []\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31474" + ], + "x-ms-request-id": [ + "7e673dba-35ab-49e3-9840-d0f197fafa9e" + ], + "x-ms-correlation-request-id": [ + "7e673dba-35ab-49e3-9840-d0f197fafa9e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005202Z:7e673dba-35ab-49e3-9840-d0f197fafa9e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:52:02 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/resources?&api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9792/providers/Microsoft.Cache/Redis/onesdk6627\",\r\n \"name\": \"onesdk6627\",\r\n \"type\": \"Microsoft.Cache/Redis\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31473" + ], + "x-ms-request-id": [ + "c84d16fb-6716-4c04-97c7-4c624a51005f" + ], + "x-ms-correlation-request-id": [ + "c84d16fb-6716-4c04-97c7-4c624a51005f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005204Z:c84d16fb-6716-4c04-97c7-4c624a51005f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:52:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9792?api-version=2014-04-01-preview", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "513" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1188" + ], + "x-ms-request-id": [ + "d0757ed8-ebe4-4a66-a1e5-ef4f5049a125" + ], + "x-ms-correlation-request-id": [ + "d0757ed8-ebe4-4a66-a1e5-ef4f5049a125" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005205Z:d0757ed8-ebe4-4a66-a1e5-ef4f5049a125" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:52:04 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5NzkyLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5NzkyLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "513" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31471" + ], + "x-ms-request-id": [ + "8835b796-ce58-49f2-9153-44e6f292b94a" + ], + "x-ms-correlation-request-id": [ + "8835b796-ce58-49f2-9153-44e6f292b94a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005205Z:8835b796-ce58-49f2-9153-44e6f292b94a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:52:04 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5NzkyLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5NzkyLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "513" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31470" + ], + "x-ms-request-id": [ + "0188e5d7-3dd2-4883-9406-fa5d831b4a4e" + ], + "x-ms-correlation-request-id": [ + "0188e5d7-3dd2-4883-9406-fa5d831b4a4e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005220Z:0188e5d7-3dd2-4883-9406-fa5d831b4a4e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:52:20 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5NzkyLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5NzkyLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "513" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31469" + ], + "x-ms-request-id": [ + "f554552d-e24d-47a3-8e17-1d59245aae2c" + ], + "x-ms-correlation-request-id": [ + "f554552d-e24d-47a3-8e17-1d59245aae2c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005235Z:f554552d-e24d-47a3-8e17-1d59245aae2c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:52:35 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5NzkyLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5NzkyLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "513" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31468" + ], + "x-ms-request-id": [ + "ee161405-914c-461d-b046-d7e48a4115fb" + ], + "x-ms-correlation-request-id": [ + "ee161405-914c-461d-b046-d7e48a4115fb" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005250Z:ee161405-914c-461d-b046-d7e48a4115fb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:52:50 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5NzkyLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5NzkyLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "513" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31467" + ], + "x-ms-request-id": [ + "989e6ea2-2afe-4aa9-9a7c-7c7400bfb37b" + ], + "x-ms-correlation-request-id": [ + "989e6ea2-2afe-4aa9-9a7c-7c7400bfb37b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005305Z:989e6ea2-2afe-4aa9-9a7c-7c7400bfb37b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:53:05 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5NzkyLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5NzkyLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "513" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31466" + ], + "x-ms-request-id": [ + "6a80267d-01d4-4995-9022-966d578cc9d3" + ], + "x-ms-correlation-request-id": [ + "6a80267d-01d4-4995-9022-966d578cc9d3" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005320Z:6a80267d-01d4-4995-9022-966d578cc9d3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:53:20 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5NzkyLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5NzkyLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "513" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31465" + ], + "x-ms-request-id": [ + "8a30edd8-1fb1-4433-a731-d0795b41ac80" + ], + "x-ms-correlation-request-id": [ + "8a30edd8-1fb1-4433-a731-d0795b41ac80" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140806T005335Z:8a30edd8-1fb1-4433-a731-d0795b41ac80" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 06 Aug 2014 00:53:35 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-NewDeploymentAndProviderRegistration": [ + "onesdk9792", + "onesdk6627" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceGroupTests/TestNewResourceGroupInNonExistingLocation.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceGroupTests/TestNewResourceGroupInNonExistingLocation.json new file mode 100644 index 000000000000..351315ec45a3 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceGroupTests/TestNewResourceGroupInNonExistingLocation.json @@ -0,0 +1,91 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk3874?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM4NzQ/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31985" + ], + "x-ms-request-id": [ + "e517579c-4aa8-4d84-9edd-86b0aa72c869" + ], + "x-ms-correlation-request-id": [ + "e517579c-4aa8-4d84-9edd-86b0aa72c869" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080208Z:e517579c-4aa8-4d84-9edd-86b0aa72c869" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:02:08 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk3874?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM4NzQ/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"non-existing\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"DisallowedLocation\",\r\n \"message\": \"The provided location 'non-existing' is not permitted for subscription. List of permitted regions is ',eastasia,southeastasia,eastus,westus,northcentralus,southcentralus,centralus,northeurope,westeurope'. Please contact support to change your supported regions.\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-request-id": [ + "2ee12605-8299-4047-abad-226667ec8fc4" + ], + "x-ms-correlation-request-id": [ + "2ee12605-8299-4047-abad-226667ec8fc4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080208Z:2ee12605-8299-4047-abad-226667ec8fc4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:02:08 GMT" + ] + }, + "StatusCode": 400 + } + ], + "Names": { + "Test-NewResourceGroupInNonExistingLocation": [ + "onesdk3874" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceGroupTests/TestNewResourceGroupWithTemplateThenGetWithAndWithoutDetails.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceGroupTests/TestNewResourceGroupWithTemplateThenGetWithAndWithoutDetails.json new file mode 100644 index 000000000000..e273368409dc --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceGroupTests/TestNewResourceGroupWithTemplateThenGetWithAndWithoutDetails.json @@ -0,0 +1,4742 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.batch\",\r\n \"namespace\": \"microsoft.batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\",\r\n \"2014-03-31-beta\",\r\n \"2014-03-31-alpha\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\",\r\n \"2014-03-31-beta\",\r\n \"2014-03-31-alpha\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.visualstudio\",\r\n \"namespace\": \"microsoft.visualstudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourcecontrols\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Central US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31984" + ], + "x-ms-request-id": [ + "6e8d98b1-7532-4819-8b52-4924d88565b6" + ], + "x-ms-correlation-request-id": [ + "6e8d98b1-7532-4819-8b52-4924d88565b6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080327Z:6e8d98b1-7532-4819-8b52-4924d88565b6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:27 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9381?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazkzODE/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31983" + ], + "x-ms-request-id": [ + "2a7faac5-2a8d-4c64-949a-b9891a806206" + ], + "x-ms-correlation-request-id": [ + "2a7faac5-2a8d-4c64-949a-b9891a806206" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080328Z:2a7faac5-2a8d-4c64-949a-b9891a806206" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:27 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9381?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazkzODE/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31919" + ], + "x-ms-request-id": [ + "e4bdaaa1-d4c1-45a6-9ec5-9d5f600f7b4a" + ], + "x-ms-correlation-request-id": [ + "e4bdaaa1-d4c1-45a6-9ec5-9d5f600f7b4a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080429Z:e4bdaaa1-d4c1-45a6-9ec5-9d5f600f7b4a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:29 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9381?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazkzODE/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n }\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381\",\r\n \"name\": \"onesdk9381\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-request-id": [ + "31dda6aa-c24d-4e87-8802-3f9009c83189" + ], + "x-ms-correlation-request-id": [ + "31dda6aa-c24d-4e87-8802-3f9009c83189" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080328Z:31dda6aa-c24d-4e87-8802-3f9009c83189" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:28 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9381/deployments/EmptyWebsiteTemplate/validate?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazkzODEvZGVwbG95bWVudHMvRW1wdHlXZWJzaXRlVGVtcGxhdGUvdmFsaWRhdGU/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"siteName\": {\r\n \"type\": \"string\"\r\n },\r\n \"hostingPlanName\": {\r\n \"type\": \"string\"\r\n },\r\n \"siteLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"sku\": {\r\n \"type\": \"string\",\r\n \"allowedValues\": [\r\n \"Free\",\r\n \"Shared\",\r\n \"Basic\",\r\n \"Standard\"\r\n ],\r\n \"defaultValue\": \"Free\"\r\n },\r\n \"workerSize\": {\r\n \"type\": \"string\",\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\"\r\n ],\r\n \"defaultValue\": \"0\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2014-04-01\",\r\n \"name\": \"[parameters('hostingPlanName')]\",\r\n \"type\": \"Microsoft.Web/serverfarms\",\r\n \"location\": \"[parameters('siteLocation')]\",\r\n \"properties\": {\r\n \"name\": \"[parameters('hostingPlanName')]\",\r\n \"sku\": \"[parameters('sku')]\",\r\n \"workerSize\": \"[parameters('workerSize')]\",\r\n \"numberOfWorkers\": 1\r\n }\r\n },\r\n {\r\n \"apiVersion\": \"2014-04-01\",\r\n \"name\": \"[parameters('siteName')]\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"[parameters('siteLocation')]\",\r\n \"tags\": {\r\n \"[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]\": \"Resource\"\r\n },\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]\"\r\n ],\r\n \"properties\": {\r\n \"name\": \"[parameters('siteName')]\",\r\n \"serverFarm\": \"[parameters('hostingPlanName')]\"\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"siteName\": {\r\n \"value\": \"onesdk5452\"\r\n },\r\n \"hostingPlanName\": {\r\n \"value\": \"test\"\r\n },\r\n \"siteLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/deployments/EmptyWebsiteTemplate\",\r\n \"name\": \"EmptyWebsiteTemplate\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"siteName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk5452\"\r\n },\r\n \"hostingPlanName\": {\r\n \"type\": \"String\",\r\n \"value\": \"test\"\r\n },\r\n \"siteLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Free\"\r\n },\r\n \"workerSize\": {\r\n \"type\": \"String\",\r\n \"value\": \"0\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-09-11T08:03:29.0834937Z\",\r\n \"correlationId\": \"4736e62d-f28f-4afc-9c34-5455cff790fb\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"serverfarms\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/serverfarms/test\",\r\n \"resourceType\": \"Microsoft.Web/serverfarms\",\r\n \"resourceName\": \"test\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/sites/onesdk5452\",\r\n \"resourceType\": \"Microsoft.Web/sites\",\r\n \"resourceName\": \"onesdk5452\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-request-id": [ + "4736e62d-f28f-4afc-9c34-5455cff790fb" + ], + "x-ms-correlation-request-id": [ + "4736e62d-f28f-4afc-9c34-5455cff790fb" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080329Z:4736e62d-f28f-4afc-9c34-5455cff790fb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9381/deployments/EmptyWebsiteTemplate?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazkzODEvZGVwbG95bWVudHMvRW1wdHlXZWJzaXRlVGVtcGxhdGU/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"siteName\": {\r\n \"type\": \"string\"\r\n },\r\n \"hostingPlanName\": {\r\n \"type\": \"string\"\r\n },\r\n \"siteLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"sku\": {\r\n \"type\": \"string\",\r\n \"allowedValues\": [\r\n \"Free\",\r\n \"Shared\",\r\n \"Basic\",\r\n \"Standard\"\r\n ],\r\n \"defaultValue\": \"Free\"\r\n },\r\n \"workerSize\": {\r\n \"type\": \"string\",\r\n \"allowedValues\": [\r\n \"0\",\r\n \"1\",\r\n \"2\"\r\n ],\r\n \"defaultValue\": \"0\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2014-04-01\",\r\n \"name\": \"[parameters('hostingPlanName')]\",\r\n \"type\": \"Microsoft.Web/serverfarms\",\r\n \"location\": \"[parameters('siteLocation')]\",\r\n \"properties\": {\r\n \"name\": \"[parameters('hostingPlanName')]\",\r\n \"sku\": \"[parameters('sku')]\",\r\n \"workerSize\": \"[parameters('workerSize')]\",\r\n \"numberOfWorkers\": 1\r\n }\r\n },\r\n {\r\n \"apiVersion\": \"2014-04-01\",\r\n \"name\": \"[parameters('siteName')]\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"[parameters('siteLocation')]\",\r\n \"tags\": {\r\n \"[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]\": \"Resource\"\r\n },\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]\"\r\n ],\r\n \"properties\": {\r\n \"name\": \"[parameters('siteName')]\",\r\n \"serverFarm\": \"[parameters('hostingPlanName')]\"\r\n }\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"siteName\": {\r\n \"value\": \"onesdk5452\"\r\n },\r\n \"hostingPlanName\": {\r\n \"value\": \"test\"\r\n },\r\n \"siteLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/deployments/EmptyWebsiteTemplate\",\r\n \"name\": \"EmptyWebsiteTemplate\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"siteName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk5452\"\r\n },\r\n \"hostingPlanName\": {\r\n \"type\": \"String\",\r\n \"value\": \"test\"\r\n },\r\n \"siteLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Free\"\r\n },\r\n \"workerSize\": {\r\n \"type\": \"String\",\r\n \"value\": \"0\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-09-11T08:03:29.5939544Z\",\r\n \"correlationId\": \"16eb59b6-ce06-4cc4-bde7-5e4c76a89398\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"serverfarms\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/serverfarms/test\",\r\n \"resourceType\": \"Microsoft.Web/serverfarms\",\r\n \"resourceName\": \"test\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/sites/onesdk5452\",\r\n \"resourceType\": \"Microsoft.Web/sites\",\r\n \"resourceName\": \"onesdk5452\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1193" + ], + "x-ms-request-id": [ + "16eb59b6-ce06-4cc4-bde7-5e4c76a89398" + ], + "x-ms-correlation-request-id": [ + "16eb59b6-ce06-4cc4-bde7-5e4c76a89398" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080329Z:16eb59b6-ce06-4cc4-bde7-5e4c76a89398" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:28 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9381/deployments/EmptyWebsiteTemplate/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazkzODEvZGVwbG95bWVudHMvRW1wdHlXZWJzaXRlVGVtcGxhdGUvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31982" + ], + "x-ms-request-id": [ + "4d357073-8310-4354-8429-f7aefe5139af" + ], + "x-ms-correlation-request-id": [ + "4d357073-8310-4354-8429-f7aefe5139af" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080330Z:4d357073-8310-4354-8429-f7aefe5139af" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:30 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9381/deployments/EmptyWebsiteTemplate/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazkzODEvZGVwbG95bWVudHMvRW1wdHlXZWJzaXRlVGVtcGxhdGUvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31980" + ], + "x-ms-request-id": [ + "1e3d8e06-ef7a-49be-a5f5-a37ad9006351" + ], + "x-ms-correlation-request-id": [ + "1e3d8e06-ef7a-49be-a5f5-a37ad9006351" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080332Z:1e3d8e06-ef7a-49be-a5f5-a37ad9006351" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:32 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9381/deployments/EmptyWebsiteTemplate/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazkzODEvZGVwbG95bWVudHMvRW1wdHlXZWJzaXRlVGVtcGxhdGUvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31978" + ], + "x-ms-request-id": [ + "a36ed322-9cdd-4a2c-8cce-675ada1c7bd5" + ], + "x-ms-correlation-request-id": [ + "a36ed322-9cdd-4a2c-8cce-675ada1c7bd5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080335Z:a36ed322-9cdd-4a2c-8cce-675ada1c7bd5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9381/deployments/EmptyWebsiteTemplate/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazkzODEvZGVwbG95bWVudHMvRW1wdHlXZWJzaXRlVGVtcGxhdGUvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31976" + ], + "x-ms-request-id": [ + "40653591-9379-4b47-adce-746eb30a1dfc" + ], + "x-ms-correlation-request-id": [ + "40653591-9379-4b47-adce-746eb30a1dfc" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080338Z:40653591-9379-4b47-adce-746eb30a1dfc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:38 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9381/deployments/EmptyWebsiteTemplate/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazkzODEvZGVwbG95bWVudHMvRW1wdHlXZWJzaXRlVGVtcGxhdGUvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/deployments/EmptyWebsiteTemplate/operations/F964C0838D10090B\",\r\n \"operationId\": \"F964C0838D10090B\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-09-11T08:03:39.4255229Z\",\r\n \"trackingId\": \"aa42e4ed-f0da-4bc2-b850-1818c2c59a62\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/serverfarms/test\",\r\n \"resourceType\": \"Microsoft.Web/serverfarms\",\r\n \"resourceName\": \"test\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31974" + ], + "x-ms-request-id": [ + "06de1f51-897e-41cb-aa4a-3745806eea44" + ], + "x-ms-correlation-request-id": [ + "06de1f51-897e-41cb-aa4a-3745806eea44" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080341Z:06de1f51-897e-41cb-aa4a-3745806eea44" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9381/deployments/EmptyWebsiteTemplate/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazkzODEvZGVwbG95bWVudHMvRW1wdHlXZWJzaXRlVGVtcGxhdGUvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/deployments/EmptyWebsiteTemplate/operations/F964C0838D10090B\",\r\n \"operationId\": \"F964C0838D10090B\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-09-11T08:03:39.4255229Z\",\r\n \"trackingId\": \"aa42e4ed-f0da-4bc2-b850-1818c2c59a62\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/serverfarms/test\",\r\n \"resourceType\": \"Microsoft.Web/serverfarms\",\r\n \"resourceName\": \"test\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31972" + ], + "x-ms-request-id": [ + "ae784d50-9edb-4a10-9539-d30ab563cd3a" + ], + "x-ms-correlation-request-id": [ + "ae784d50-9edb-4a10-9539-d30ab563cd3a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080344Z:ae784d50-9edb-4a10-9539-d30ab563cd3a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9381/deployments/EmptyWebsiteTemplate/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazkzODEvZGVwbG95bWVudHMvRW1wdHlXZWJzaXRlVGVtcGxhdGUvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/deployments/EmptyWebsiteTemplate/operations/7BEF0ECB7BA616F9\",\r\n \"operationId\": \"7BEF0ECB7BA616F9\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-09-11T08:03:45.9490245Z\",\r\n \"trackingId\": \"fa4c2289-f9e8-43ce-b053-c426c64bdda5\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/sites/onesdk5452\",\r\n \"resourceType\": \"Microsoft.Web/sites\",\r\n \"resourceName\": \"onesdk5452\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/deployments/EmptyWebsiteTemplate/operations/F964C0838D10090B\",\r\n \"operationId\": \"F964C0838D10090B\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-09-11T08:03:39.4255229Z\",\r\n \"trackingId\": \"aa42e4ed-f0da-4bc2-b850-1818c2c59a62\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/serverfarms/test\",\r\n \"resourceType\": \"Microsoft.Web/serverfarms\",\r\n \"resourceName\": \"test\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31970" + ], + "x-ms-request-id": [ + "67e96874-322c-44bc-a471-98c0d76966f3" + ], + "x-ms-correlation-request-id": [ + "67e96874-322c-44bc-a471-98c0d76966f3" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080346Z:67e96874-322c-44bc-a471-98c0d76966f3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9381/deployments/EmptyWebsiteTemplate/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazkzODEvZGVwbG95bWVudHMvRW1wdHlXZWJzaXRlVGVtcGxhdGUvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/deployments/EmptyWebsiteTemplate/operations/7BEF0ECB7BA616F9\",\r\n \"operationId\": \"7BEF0ECB7BA616F9\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-09-11T08:03:45.9490245Z\",\r\n \"trackingId\": \"fa4c2289-f9e8-43ce-b053-c426c64bdda5\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/sites/onesdk5452\",\r\n \"resourceType\": \"Microsoft.Web/sites\",\r\n \"resourceName\": \"onesdk5452\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/deployments/EmptyWebsiteTemplate/operations/F964C0838D10090B\",\r\n \"operationId\": \"F964C0838D10090B\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-09-11T08:03:39.4255229Z\",\r\n \"trackingId\": \"aa42e4ed-f0da-4bc2-b850-1818c2c59a62\",\r\n \"statusCode\": \"OK\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/serverfarms/test\",\r\n \"resourceType\": \"Microsoft.Web/serverfarms\",\r\n \"resourceName\": \"test\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31968" + ], + "x-ms-request-id": [ + "0589b183-2d1f-4a06-be3e-80a4dc921c1b" + ], + "x-ms-correlation-request-id": [ + "0589b183-2d1f-4a06-be3e-80a4dc921c1b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080349Z:0589b183-2d1f-4a06-be3e-80a4dc921c1b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9381/deployments/EmptyWebsiteTemplate?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazkzODEvZGVwbG95bWVudHMvRW1wdHlXZWJzaXRlVGVtcGxhdGU/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/deployments/EmptyWebsiteTemplate\",\r\n \"name\": \"EmptyWebsiteTemplate\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"siteName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk5452\"\r\n },\r\n \"hostingPlanName\": {\r\n \"type\": \"String\",\r\n \"value\": \"test\"\r\n },\r\n \"siteLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Free\"\r\n },\r\n \"workerSize\": {\r\n \"type\": \"String\",\r\n \"value\": \"0\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-09-11T08:03:29.5939544Z\",\r\n \"correlationId\": \"16eb59b6-ce06-4cc4-bde7-5e4c76a89398\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"serverfarms\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/serverfarms/test\",\r\n \"resourceType\": \"Microsoft.Web/serverfarms\",\r\n \"resourceName\": \"test\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/sites/onesdk5452\",\r\n \"resourceType\": \"Microsoft.Web/sites\",\r\n \"resourceName\": \"onesdk5452\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31981" + ], + "x-ms-request-id": [ + "8d8ec501-14dd-49df-b754-82f05ed34adb" + ], + "x-ms-correlation-request-id": [ + "8d8ec501-14dd-49df-b754-82f05ed34adb" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080330Z:8d8ec501-14dd-49df-b754-82f05ed34adb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:30 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9381/deployments/EmptyWebsiteTemplate?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazkzODEvZGVwbG95bWVudHMvRW1wdHlXZWJzaXRlVGVtcGxhdGU/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/deployments/EmptyWebsiteTemplate\",\r\n \"name\": \"EmptyWebsiteTemplate\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"siteName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk5452\"\r\n },\r\n \"hostingPlanName\": {\r\n \"type\": \"String\",\r\n \"value\": \"test\"\r\n },\r\n \"siteLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Free\"\r\n },\r\n \"workerSize\": {\r\n \"type\": \"String\",\r\n \"value\": \"0\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-09-11T08:03:32.8666439Z\",\r\n \"correlationId\": \"16eb59b6-ce06-4cc4-bde7-5e4c76a89398\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"serverfarms\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/serverfarms/test\",\r\n \"resourceType\": \"Microsoft.Web/serverfarms\",\r\n \"resourceName\": \"test\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/sites/onesdk5452\",\r\n \"resourceType\": \"Microsoft.Web/sites\",\r\n \"resourceName\": \"onesdk5452\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31979" + ], + "x-ms-request-id": [ + "c64857ee-2ed8-49e5-9701-039532cb3a77" + ], + "x-ms-correlation-request-id": [ + "c64857ee-2ed8-49e5-9701-039532cb3a77" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080333Z:c64857ee-2ed8-49e5-9701-039532cb3a77" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:32 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9381/deployments/EmptyWebsiteTemplate?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazkzODEvZGVwbG95bWVudHMvRW1wdHlXZWJzaXRlVGVtcGxhdGU/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/deployments/EmptyWebsiteTemplate\",\r\n \"name\": \"EmptyWebsiteTemplate\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"siteName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk5452\"\r\n },\r\n \"hostingPlanName\": {\r\n \"type\": \"String\",\r\n \"value\": \"test\"\r\n },\r\n \"siteLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Free\"\r\n },\r\n \"workerSize\": {\r\n \"type\": \"String\",\r\n \"value\": \"0\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-09-11T08:03:32.8666439Z\",\r\n \"correlationId\": \"16eb59b6-ce06-4cc4-bde7-5e4c76a89398\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"serverfarms\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/serverfarms/test\",\r\n \"resourceType\": \"Microsoft.Web/serverfarms\",\r\n \"resourceName\": \"test\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/sites/onesdk5452\",\r\n \"resourceType\": \"Microsoft.Web/sites\",\r\n \"resourceName\": \"onesdk5452\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31977" + ], + "x-ms-request-id": [ + "7a425249-7c2f-4f23-9273-9f8c34e6610d" + ], + "x-ms-correlation-request-id": [ + "7a425249-7c2f-4f23-9273-9f8c34e6610d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080336Z:7a425249-7c2f-4f23-9273-9f8c34e6610d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9381/deployments/EmptyWebsiteTemplate?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazkzODEvZGVwbG95bWVudHMvRW1wdHlXZWJzaXRlVGVtcGxhdGU/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/deployments/EmptyWebsiteTemplate\",\r\n \"name\": \"EmptyWebsiteTemplate\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"siteName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk5452\"\r\n },\r\n \"hostingPlanName\": {\r\n \"type\": \"String\",\r\n \"value\": \"test\"\r\n },\r\n \"siteLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Free\"\r\n },\r\n \"workerSize\": {\r\n \"type\": \"String\",\r\n \"value\": \"0\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-09-11T08:03:32.8666439Z\",\r\n \"correlationId\": \"16eb59b6-ce06-4cc4-bde7-5e4c76a89398\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"serverfarms\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/serverfarms/test\",\r\n \"resourceType\": \"Microsoft.Web/serverfarms\",\r\n \"resourceName\": \"test\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/sites/onesdk5452\",\r\n \"resourceType\": \"Microsoft.Web/sites\",\r\n \"resourceName\": \"onesdk5452\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31975" + ], + "x-ms-request-id": [ + "6cb5da83-e825-4bf1-bcf0-f2b956049489" + ], + "x-ms-correlation-request-id": [ + "6cb5da83-e825-4bf1-bcf0-f2b956049489" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080338Z:6cb5da83-e825-4bf1-bcf0-f2b956049489" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:38 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9381/deployments/EmptyWebsiteTemplate?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazkzODEvZGVwbG95bWVudHMvRW1wdHlXZWJzaXRlVGVtcGxhdGU/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/deployments/EmptyWebsiteTemplate\",\r\n \"name\": \"EmptyWebsiteTemplate\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"siteName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk5452\"\r\n },\r\n \"hostingPlanName\": {\r\n \"type\": \"String\",\r\n \"value\": \"test\"\r\n },\r\n \"siteLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Free\"\r\n },\r\n \"workerSize\": {\r\n \"type\": \"String\",\r\n \"value\": \"0\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-09-11T08:03:32.8666439Z\",\r\n \"correlationId\": \"16eb59b6-ce06-4cc4-bde7-5e4c76a89398\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"serverfarms\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/serverfarms/test\",\r\n \"resourceType\": \"Microsoft.Web/serverfarms\",\r\n \"resourceName\": \"test\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/sites/onesdk5452\",\r\n \"resourceType\": \"Microsoft.Web/sites\",\r\n \"resourceName\": \"onesdk5452\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31973" + ], + "x-ms-request-id": [ + "6114946c-e5dd-43b7-a45a-26ba1191ea8d" + ], + "x-ms-correlation-request-id": [ + "6114946c-e5dd-43b7-a45a-26ba1191ea8d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080341Z:6114946c-e5dd-43b7-a45a-26ba1191ea8d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9381/deployments/EmptyWebsiteTemplate?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazkzODEvZGVwbG95bWVudHMvRW1wdHlXZWJzaXRlVGVtcGxhdGU/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/deployments/EmptyWebsiteTemplate\",\r\n \"name\": \"EmptyWebsiteTemplate\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"siteName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk5452\"\r\n },\r\n \"hostingPlanName\": {\r\n \"type\": \"String\",\r\n \"value\": \"test\"\r\n },\r\n \"siteLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Free\"\r\n },\r\n \"workerSize\": {\r\n \"type\": \"String\",\r\n \"value\": \"0\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-09-11T08:03:32.8666439Z\",\r\n \"correlationId\": \"16eb59b6-ce06-4cc4-bde7-5e4c76a89398\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"serverfarms\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/serverfarms/test\",\r\n \"resourceType\": \"Microsoft.Web/serverfarms\",\r\n \"resourceName\": \"test\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/sites/onesdk5452\",\r\n \"resourceType\": \"Microsoft.Web/sites\",\r\n \"resourceName\": \"onesdk5452\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31971" + ], + "x-ms-request-id": [ + "471a2e23-ca35-4cea-a563-dbe7ff64ef88" + ], + "x-ms-correlation-request-id": [ + "471a2e23-ca35-4cea-a563-dbe7ff64ef88" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080344Z:471a2e23-ca35-4cea-a563-dbe7ff64ef88" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9381/deployments/EmptyWebsiteTemplate?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazkzODEvZGVwbG95bWVudHMvRW1wdHlXZWJzaXRlVGVtcGxhdGU/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/deployments/EmptyWebsiteTemplate\",\r\n \"name\": \"EmptyWebsiteTemplate\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"siteName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk5452\"\r\n },\r\n \"hostingPlanName\": {\r\n \"type\": \"String\",\r\n \"value\": \"test\"\r\n },\r\n \"siteLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Free\"\r\n },\r\n \"workerSize\": {\r\n \"type\": \"String\",\r\n \"value\": \"0\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-09-11T08:03:32.8666439Z\",\r\n \"correlationId\": \"16eb59b6-ce06-4cc4-bde7-5e4c76a89398\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"serverfarms\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/serverfarms/test\",\r\n \"resourceType\": \"Microsoft.Web/serverfarms\",\r\n \"resourceName\": \"test\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/sites/onesdk5452\",\r\n \"resourceType\": \"Microsoft.Web/sites\",\r\n \"resourceName\": \"onesdk5452\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31969" + ], + "x-ms-request-id": [ + "636a6248-794e-4127-a9c8-63f6dcf24b78" + ], + "x-ms-correlation-request-id": [ + "636a6248-794e-4127-a9c8-63f6dcf24b78" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080347Z:636a6248-794e-4127-a9c8-63f6dcf24b78" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:47 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9381/deployments/EmptyWebsiteTemplate?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazkzODEvZGVwbG95bWVudHMvRW1wdHlXZWJzaXRlVGVtcGxhdGU/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/deployments/EmptyWebsiteTemplate\",\r\n \"name\": \"EmptyWebsiteTemplate\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"siteName\": {\r\n \"type\": \"String\",\r\n \"value\": \"onesdk5452\"\r\n },\r\n \"hostingPlanName\": {\r\n \"type\": \"String\",\r\n \"value\": \"test\"\r\n },\r\n \"siteLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"sku\": {\r\n \"type\": \"String\",\r\n \"value\": \"Free\"\r\n },\r\n \"workerSize\": {\r\n \"type\": \"String\",\r\n \"value\": \"0\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-09-11T08:03:49.7355328Z\",\r\n \"correlationId\": \"16eb59b6-ce06-4cc4-bde7-5e4c76a89398\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"serverfarms\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/serverfarms/test\",\r\n \"resourceType\": \"Microsoft.Web/serverfarms\",\r\n \"resourceName\": \"test\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/sites/onesdk5452\",\r\n \"resourceType\": \"Microsoft.Web/sites\",\r\n \"resourceName\": \"onesdk5452\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31967" + ], + "x-ms-request-id": [ + "48f8ae8e-aea2-4661-ba05-3e76e6d4aa4e" + ], + "x-ms-correlation-request-id": [ + "48f8ae8e-aea2-4661-ba05-3e76e6d4aa4e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080349Z:48f8ae8e-aea2-4661-ba05-3e76e6d4aa4e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL29uZXNkazkzODEvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/serverFarms/test\",\r\n \"name\": \"test\",\r\n \"type\": \"Microsoft.Web/serverFarms\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/sites/onesdk5452\",\r\n \"name\": \"onesdk5452\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/serverfarms/test\": \"Resource\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31966" + ], + "x-ms-request-id": [ + "5e493a0b-e714-4a35-a0b1-7b94e7ab7386" + ], + "x-ms-correlation-request-id": [ + "5e493a0b-e714-4a35-a0b1-7b94e7ab7386" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080352Z:5e493a0b-e714-4a35-a0b1-7b94e7ab7386" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL29uZXNkazkzODEvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/serverFarms/test\",\r\n \"name\": \"test\",\r\n \"type\": \"Microsoft.Web/serverFarms\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/sites/onesdk5452\",\r\n \"name\": \"onesdk5452\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/serverfarms/test\": \"Resource\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31964" + ], + "x-ms-request-id": [ + "6b20e10a-471e-46f2-b4a1-a9c2e2fabc06" + ], + "x-ms-correlation-request-id": [ + "6b20e10a-471e-46f2-b4a1-a9c2e2fabc06" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080353Z:6b20e10a-471e-46f2-b4a1-a9c2e2fabc06" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL29uZXNkazkzODEvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/serverFarms/test\",\r\n \"name\": \"test\",\r\n \"type\": \"Microsoft.Web/serverFarms\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/sites/onesdk5452\",\r\n \"name\": \"onesdk5452\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381/providers/Microsoft.Web/serverfarms/test\": \"Resource\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31926" + ], + "x-ms-request-id": [ + "39874882-8d56-42b5-8c7b-fc6181439b97" + ], + "x-ms-correlation-request-id": [ + "39874882-8d56-42b5-8c7b-fc6181439b97" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080423Z:39874882-8d56-42b5-8c7b-fc6181439b97" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:23 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9381/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazkzODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31997" + ], + "x-ms-request-id": [ + "3c43a851-4ea4-44ff-a736-574dbd313def" + ], + "x-ms-correlation-request-id": [ + "3c43a851-4ea4-44ff-a736-574dbd313def" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080352Z:3c43a851-4ea4-44ff-a736-574dbd313def" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:52 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9381/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazkzODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31996" + ], + "x-ms-request-id": [ + "044c1aca-aaab-46bd-a2f1-d6c079b6a4e0" + ], + "x-ms-correlation-request-id": [ + "044c1aca-aaab-46bd-a2f1-d6c079b6a4e0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080354Z:044c1aca-aaab-46bd-a2f1-d6c079b6a4e0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9381/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazkzODEvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31962" + ], + "x-ms-request-id": [ + "5e8aceb3-07ad-4658-a206-d155067ff01f" + ], + "x-ms-correlation-request-id": [ + "5e8aceb3-07ad-4658-a206-d155067ff01f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080424Z:5e8aceb3-07ad-4658-a206-d155067ff01f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9381?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazkzODE/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381\",\r\n \"name\": \"onesdk9381\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31965" + ], + "x-ms-request-id": [ + "7a52eb1d-6bfa-4da5-a444-ed03baf07625" + ], + "x-ms-correlation-request-id": [ + "7a52eb1d-6bfa-4da5-a444-ed03baf07625" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080353Z:7a52eb1d-6bfa-4da5-a444-ed03baf07625" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:52 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/alborno\",\r\n \"name\": \"alborno\",\r\n \"location\": \"eastasia\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/ATMTest23ecb30b-fbd0-46fd-aad7-4b0bc7359668\",\r\n \"name\": \"ATMTest23ecb30b-fbd0-46fd-aad7-4b0bc7359668\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/ATMTest633\",\r\n \"name\": \"ATMTest633\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/ATMTest7293\",\r\n \"name\": \"ATMTest7293\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/azuresdktest03\",\r\n \"name\": \"azuresdktest03\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/azuresdktest05\",\r\n \"name\": \"azuresdktest05\",\r\n \"location\": \"eastasia\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/cli-cs1291\",\r\n \"name\": \"cli-cs1291\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/cli-cs4471\",\r\n \"name\": \"cli-cs4471\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/cli-cs5321\",\r\n \"name\": \"cli-cs5321\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/clitestvm1402\",\r\n \"name\": \"clitestvm1402\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg1067\",\r\n \"name\": \"csmrg1067\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg2713\",\r\n \"name\": \"csmrg2713\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg4357\",\r\n \"name\": \"csmrg4357\",\r\n \"location\": \"southcentralus\",\r\n \"tags\": {\r\n \"department\": \"finance\",\r\n \"tagname\": \"tagvalue\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg5164\",\r\n \"name\": \"csmrg5164\",\r\n \"location\": \"southcentralus\",\r\n \"tags\": {\r\n \"department\": \"finance\",\r\n \"tagname\": \"tagvalue\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg8831\",\r\n \"name\": \"csmrg8831\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Networking\",\r\n \"name\": \"Default-Networking\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-SQL-WestUS\",\r\n \"name\": \"Default-SQL-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-EastAsia\",\r\n \"name\": \"Default-Storage-EastAsia\",\r\n \"location\": \"eastasia\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-EastUS\",\r\n \"name\": \"Default-Storage-EastUS\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-NorthCentralUS\",\r\n \"name\": \"Default-Storage-NorthCentralUS\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-NorthEurope\",\r\n \"name\": \"Default-Storage-NorthEurope\",\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-SouthCentralUS\",\r\n \"name\": \"Default-Storage-SouthCentralUS\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-WestUS\",\r\n \"name\": \"Default-Storage-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Web-EastUS\",\r\n \"name\": \"Default-Web-EastUS\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Web-NorthCentralUS\",\r\n \"name\": \"Default-Web-NorthCentralUS\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Web-WestUS\",\r\n \"name\": \"Default-Web-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/foo13\",\r\n \"name\": \"foo13\",\r\n \"location\": \"southcentralus\",\r\n \"tags\": {\r\n \"foo\": \"bar\",\r\n \"dtag\": \"\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/foo14\",\r\n \"name\": \"foo14\",\r\n \"location\": \"southcentralus\",\r\n \"tags\": {\r\n \"dtag\": \"val2\",\r\n \"department\": \"Accounting\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/jianghlutestcs1\",\r\n \"name\": \"jianghlutestcs1\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/mynoden083001\",\r\n \"name\": \"mynoden083001\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/nodesdk401\",\r\n \"name\": \"nodesdk401\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/nodesdk6749\",\r\n \"name\": \"nodesdk6749\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk2842\",\r\n \"name\": \"onesdk2842\",\r\n \"location\": \"eastasia\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381\",\r\n \"name\": \"onesdk9381\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testrg121\",\r\n \"name\": \"testrg121\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"department\": \"Accounting\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/tr19demostage\",\r\n \"name\": \"tr19demostage\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/VS-azuresdktest01-Group\",\r\n \"name\": \"VS-azuresdktest01-Group\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/xplattestvm2\",\r\n \"name\": \"xplattestvm2\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/zoo\",\r\n \"name\": \"zoo\",\r\n \"location\": \"northeurope\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/zoo2\",\r\n \"name\": \"zoo2\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"dtag2\": \"\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31963" + ], + "x-ms-request-id": [ + "8633b3e8-c703-462a-a094-bade0851bbfd" + ], + "x-ms-correlation-request-id": [ + "8633b3e8-c703-462a-a094-bade0851bbfd" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080354Z:8633b3e8-c703-462a-a094-bade0851bbfd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/alborno\",\r\n \"name\": \"alborno\",\r\n \"location\": \"eastasia\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/ATMTest23ecb30b-fbd0-46fd-aad7-4b0bc7359668\",\r\n \"name\": \"ATMTest23ecb30b-fbd0-46fd-aad7-4b0bc7359668\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/ATMTest633\",\r\n \"name\": \"ATMTest633\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/ATMTest7293\",\r\n \"name\": \"ATMTest7293\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/azuresdktest03\",\r\n \"name\": \"azuresdktest03\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/azuresdktest05\",\r\n \"name\": \"azuresdktest05\",\r\n \"location\": \"eastasia\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/cli-cs1291\",\r\n \"name\": \"cli-cs1291\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/cli-cs4471\",\r\n \"name\": \"cli-cs4471\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/cli-cs5321\",\r\n \"name\": \"cli-cs5321\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/clitestvm1402\",\r\n \"name\": \"clitestvm1402\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg1067\",\r\n \"name\": \"csmrg1067\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg2713\",\r\n \"name\": \"csmrg2713\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg4357\",\r\n \"name\": \"csmrg4357\",\r\n \"location\": \"southcentralus\",\r\n \"tags\": {\r\n \"department\": \"finance\",\r\n \"tagname\": \"tagvalue\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg5164\",\r\n \"name\": \"csmrg5164\",\r\n \"location\": \"southcentralus\",\r\n \"tags\": {\r\n \"department\": \"finance\",\r\n \"tagname\": \"tagvalue\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg8831\",\r\n \"name\": \"csmrg8831\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Networking\",\r\n \"name\": \"Default-Networking\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-SQL-WestUS\",\r\n \"name\": \"Default-SQL-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-EastAsia\",\r\n \"name\": \"Default-Storage-EastAsia\",\r\n \"location\": \"eastasia\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-EastUS\",\r\n \"name\": \"Default-Storage-EastUS\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-NorthCentralUS\",\r\n \"name\": \"Default-Storage-NorthCentralUS\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-NorthEurope\",\r\n \"name\": \"Default-Storage-NorthEurope\",\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-SouthCentralUS\",\r\n \"name\": \"Default-Storage-SouthCentralUS\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-WestUS\",\r\n \"name\": \"Default-Storage-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Web-EastUS\",\r\n \"name\": \"Default-Web-EastUS\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Web-NorthCentralUS\",\r\n \"name\": \"Default-Web-NorthCentralUS\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Web-WestUS\",\r\n \"name\": \"Default-Web-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/foo13\",\r\n \"name\": \"foo13\",\r\n \"location\": \"southcentralus\",\r\n \"tags\": {\r\n \"foo\": \"bar\",\r\n \"dtag\": \"\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/foo14\",\r\n \"name\": \"foo14\",\r\n \"location\": \"southcentralus\",\r\n \"tags\": {\r\n \"dtag\": \"val2\",\r\n \"department\": \"Accounting\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/jianghlutestcs1\",\r\n \"name\": \"jianghlutestcs1\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/mynoden083001\",\r\n \"name\": \"mynoden083001\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/nodesdk401\",\r\n \"name\": \"nodesdk401\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/nodesdk6749\",\r\n \"name\": \"nodesdk6749\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk2842\",\r\n \"name\": \"onesdk2842\",\r\n \"location\": \"eastasia\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381\",\r\n \"name\": \"onesdk9381\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testrg121\",\r\n \"name\": \"testrg121\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"department\": \"Accounting\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/tr19demostage\",\r\n \"name\": \"tr19demostage\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/VS-azuresdktest01-Group\",\r\n \"name\": \"VS-azuresdktest01-Group\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/xplattestvm2\",\r\n \"name\": \"xplattestvm2\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/zoo\",\r\n \"name\": \"zoo\",\r\n \"location\": \"northeurope\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/zoo2\",\r\n \"name\": \"zoo2\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"dtag2\": \"\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31962" + ], + "x-ms-request-id": [ + "83b491df-14e0-4b59-93d8-d7d8e2d3b731" + ], + "x-ms-correlation-request-id": [ + "83b491df-14e0-4b59-93d8-d7d8e2d3b731" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080354Z:83b491df-14e0-4b59-93d8-d7d8e2d3b731" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/alborno\",\r\n \"name\": \"alborno\",\r\n \"location\": \"eastasia\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/ATMTest23ecb30b-fbd0-46fd-aad7-4b0bc7359668\",\r\n \"name\": \"ATMTest23ecb30b-fbd0-46fd-aad7-4b0bc7359668\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/ATMTest633\",\r\n \"name\": \"ATMTest633\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/ATMTest7293\",\r\n \"name\": \"ATMTest7293\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/azuresdktest03\",\r\n \"name\": \"azuresdktest03\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/azuresdktest05\",\r\n \"name\": \"azuresdktest05\",\r\n \"location\": \"eastasia\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/cli-cs1291\",\r\n \"name\": \"cli-cs1291\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/cli-cs4471\",\r\n \"name\": \"cli-cs4471\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/cli-cs5321\",\r\n \"name\": \"cli-cs5321\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/clitestvm1402\",\r\n \"name\": \"clitestvm1402\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg1067\",\r\n \"name\": \"csmrg1067\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg2713\",\r\n \"name\": \"csmrg2713\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg4357\",\r\n \"name\": \"csmrg4357\",\r\n \"location\": \"southcentralus\",\r\n \"tags\": {\r\n \"department\": \"finance\",\r\n \"tagname\": \"tagvalue\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg5164\",\r\n \"name\": \"csmrg5164\",\r\n \"location\": \"southcentralus\",\r\n \"tags\": {\r\n \"department\": \"finance\",\r\n \"tagname\": \"tagvalue\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg8831\",\r\n \"name\": \"csmrg8831\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Networking\",\r\n \"name\": \"Default-Networking\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-SQL-WestUS\",\r\n \"name\": \"Default-SQL-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-EastAsia\",\r\n \"name\": \"Default-Storage-EastAsia\",\r\n \"location\": \"eastasia\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-EastUS\",\r\n \"name\": \"Default-Storage-EastUS\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-NorthCentralUS\",\r\n \"name\": \"Default-Storage-NorthCentralUS\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-NorthEurope\",\r\n \"name\": \"Default-Storage-NorthEurope\",\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-SouthCentralUS\",\r\n \"name\": \"Default-Storage-SouthCentralUS\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-WestUS\",\r\n \"name\": \"Default-Storage-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Web-EastUS\",\r\n \"name\": \"Default-Web-EastUS\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Web-NorthCentralUS\",\r\n \"name\": \"Default-Web-NorthCentralUS\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Web-WestUS\",\r\n \"name\": \"Default-Web-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/foo13\",\r\n \"name\": \"foo13\",\r\n \"location\": \"southcentralus\",\r\n \"tags\": {\r\n \"foo\": \"bar\",\r\n \"dtag\": \"\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/foo14\",\r\n \"name\": \"foo14\",\r\n \"location\": \"southcentralus\",\r\n \"tags\": {\r\n \"dtag\": \"val2\",\r\n \"department\": \"Accounting\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/jianghlutestcs1\",\r\n \"name\": \"jianghlutestcs1\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/mynoden083001\",\r\n \"name\": \"mynoden083001\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/nodesdk401\",\r\n \"name\": \"nodesdk401\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/nodesdk6749\",\r\n \"name\": \"nodesdk6749\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk2842\",\r\n \"name\": \"onesdk2842\",\r\n \"location\": \"eastasia\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381\",\r\n \"name\": \"onesdk9381\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testrg121\",\r\n \"name\": \"testrg121\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"department\": \"Accounting\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/tr19demostage\",\r\n \"name\": \"tr19demostage\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/VS-azuresdktest01-Group\",\r\n \"name\": \"VS-azuresdktest01-Group\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/xplattestvm2\",\r\n \"name\": \"xplattestvm2\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/zoo\",\r\n \"name\": \"zoo\",\r\n \"location\": \"northeurope\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/zoo2\",\r\n \"name\": \"zoo2\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"dtag2\": \"\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31961" + ], + "x-ms-request-id": [ + "81f0d070-f432-4bc8-85ce-10e253db3f32" + ], + "x-ms-correlation-request-id": [ + "81f0d070-f432-4bc8-85ce-10e253db3f32" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080355Z:81f0d070-f432-4bc8-85ce-10e253db3f32" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/alborno\",\r\n \"name\": \"alborno\",\r\n \"location\": \"eastasia\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/ATMTest23ecb30b-fbd0-46fd-aad7-4b0bc7359668\",\r\n \"name\": \"ATMTest23ecb30b-fbd0-46fd-aad7-4b0bc7359668\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/ATMTest633\",\r\n \"name\": \"ATMTest633\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/ATMTest7293\",\r\n \"name\": \"ATMTest7293\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/azuresdktest03\",\r\n \"name\": \"azuresdktest03\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/azuresdktest05\",\r\n \"name\": \"azuresdktest05\",\r\n \"location\": \"eastasia\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/cli-cs1291\",\r\n \"name\": \"cli-cs1291\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/cli-cs4471\",\r\n \"name\": \"cli-cs4471\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/cli-cs5321\",\r\n \"name\": \"cli-cs5321\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/clitestvm1402\",\r\n \"name\": \"clitestvm1402\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg1067\",\r\n \"name\": \"csmrg1067\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg2713\",\r\n \"name\": \"csmrg2713\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg4357\",\r\n \"name\": \"csmrg4357\",\r\n \"location\": \"southcentralus\",\r\n \"tags\": {\r\n \"department\": \"finance\",\r\n \"tagname\": \"tagvalue\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg5164\",\r\n \"name\": \"csmrg5164\",\r\n \"location\": \"southcentralus\",\r\n \"tags\": {\r\n \"department\": \"finance\",\r\n \"tagname\": \"tagvalue\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg8831\",\r\n \"name\": \"csmrg8831\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Networking\",\r\n \"name\": \"Default-Networking\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-SQL-WestUS\",\r\n \"name\": \"Default-SQL-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-EastAsia\",\r\n \"name\": \"Default-Storage-EastAsia\",\r\n \"location\": \"eastasia\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-EastUS\",\r\n \"name\": \"Default-Storage-EastUS\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-NorthCentralUS\",\r\n \"name\": \"Default-Storage-NorthCentralUS\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-NorthEurope\",\r\n \"name\": \"Default-Storage-NorthEurope\",\r\n \"location\": \"northeurope\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-SouthCentralUS\",\r\n \"name\": \"Default-Storage-SouthCentralUS\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-WestUS\",\r\n \"name\": \"Default-Storage-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Web-EastUS\",\r\n \"name\": \"Default-Web-EastUS\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Web-NorthCentralUS\",\r\n \"name\": \"Default-Web-NorthCentralUS\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Web-WestUS\",\r\n \"name\": \"Default-Web-WestUS\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/foo13\",\r\n \"name\": \"foo13\",\r\n \"location\": \"southcentralus\",\r\n \"tags\": {\r\n \"foo\": \"bar\",\r\n \"dtag\": \"\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/foo14\",\r\n \"name\": \"foo14\",\r\n \"location\": \"southcentralus\",\r\n \"tags\": {\r\n \"dtag\": \"val2\",\r\n \"department\": \"Accounting\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/jianghlutestcs1\",\r\n \"name\": \"jianghlutestcs1\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/mynoden083001\",\r\n \"name\": \"mynoden083001\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/nodesdk401\",\r\n \"name\": \"nodesdk401\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/nodesdk6749\",\r\n \"name\": \"nodesdk6749\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk2842\",\r\n \"name\": \"onesdk2842\",\r\n \"location\": \"eastasia\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk9381\",\r\n \"name\": \"onesdk9381\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testrg121\",\r\n \"name\": \"testrg121\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"department\": \"Accounting\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/tr19demostage\",\r\n \"name\": \"tr19demostage\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/VS-azuresdktest01-Group\",\r\n \"name\": \"VS-azuresdktest01-Group\",\r\n \"location\": \"northcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/xplattestvm2\",\r\n \"name\": \"xplattestvm2\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/zoo\",\r\n \"name\": \"zoo\",\r\n \"location\": \"northeurope\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/zoo2\",\r\n \"name\": \"zoo2\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"dtag2\": \"\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31960" + ], + "x-ms-request-id": [ + "1d18798f-9606-4d94-bd86-e0b0c925d0db" + ], + "x-ms-correlation-request-id": [ + "1d18798f-9606-4d94-bd86-e0b0c925d0db" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080355Z:1d18798f-9606-4d94-bd86-e0b0c925d0db" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/alborno/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL2FsYm9ybm8vcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/alborno/providers/Microsoft.ClassicCompute/domainNames/alborno\",\r\n \"name\": \"alborno\",\r\n \"type\": \"Microsoft.ClassicCompute/domainNames\",\r\n \"location\": \"eastasia\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31959" + ], + "x-ms-request-id": [ + "ff89c50f-6957-4d74-afd5-90d1001fc1be" + ], + "x-ms-correlation-request-id": [ + "ff89c50f-6957-4d74-afd5-90d1001fc1be" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080355Z:ff89c50f-6957-4d74-afd5-90d1001fc1be" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/alborno/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL2FsYm9ybm8vcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31995" + ], + "x-ms-request-id": [ + "ea7390f7-d284-44c7-a07e-788232f509ea" + ], + "x-ms-correlation-request-id": [ + "ea7390f7-d284-44c7-a07e-788232f509ea" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080356Z:ea7390f7-d284-44c7-a07e-788232f509ea" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:56 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/ATMTest23ecb30b-fbd0-46fd-aad7-4b0bc7359668/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL0FUTVRlc3QyM2VjYjMwYi1mYmQwLTQ2ZmQtYWFkNy00YjBiYzczNTk2NjgvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31958" + ], + "x-ms-request-id": [ + "d16878e8-efd6-4870-be37-ec032218ee80" + ], + "x-ms-correlation-request-id": [ + "d16878e8-efd6-4870-be37-ec032218ee80" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080356Z:d16878e8-efd6-4870-be37-ec032218ee80" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/ATMTest23ecb30b-fbd0-46fd-aad7-4b0bc7359668/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL0FUTVRlc3QyM2VjYjMwYi1mYmQwLTQ2ZmQtYWFkNy00YjBiYzczNTk2NjgvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31994" + ], + "x-ms-request-id": [ + "f2a454ac-436b-47c1-9f3e-3410c62366df" + ], + "x-ms-correlation-request-id": [ + "f2a454ac-436b-47c1-9f3e-3410c62366df" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080356Z:f2a454ac-436b-47c1-9f3e-3410c62366df" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:56 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/ATMTest633/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL0FUTVRlc3Q2MzMvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31957" + ], + "x-ms-request-id": [ + "632629d8-4ff9-4998-a3b7-d418ca69a5a0" + ], + "x-ms-correlation-request-id": [ + "632629d8-4ff9-4998-a3b7-d418ca69a5a0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080357Z:632629d8-4ff9-4998-a3b7-d418ca69a5a0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/ATMTest633/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL0FUTVRlc3Q2MzMvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31993" + ], + "x-ms-request-id": [ + "5416fee4-8b3f-46c9-addd-3dc2fcbe7cb4" + ], + "x-ms-correlation-request-id": [ + "5416fee4-8b3f-46c9-addd-3dc2fcbe7cb4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080357Z:5416fee4-8b3f-46c9-addd-3dc2fcbe7cb4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/ATMTest7293/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL0FUTVRlc3Q3MjkzL3Jlc291cmNlcz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31956" + ], + "x-ms-request-id": [ + "057c564f-73b5-4985-996e-85b0220c4c0f" + ], + "x-ms-correlation-request-id": [ + "057c564f-73b5-4985-996e-85b0220c4c0f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080357Z:057c564f-73b5-4985-996e-85b0220c4c0f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/ATMTest7293/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL0FUTVRlc3Q3MjkzL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wZXJtaXNzaW9ucz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31992" + ], + "x-ms-request-id": [ + "3c85b834-4aa4-47ac-acff-d82463d15764" + ], + "x-ms-correlation-request-id": [ + "3c85b834-4aa4-47ac-acff-d82463d15764" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080358Z:3c85b834-4aa4-47ac-acff-d82463d15764" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/azuresdktest03/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL2F6dXJlc2RrdGVzdDAzL3Jlc291cmNlcz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31955" + ], + "x-ms-request-id": [ + "33dae8f8-f8f3-4f7b-a6b7-e7f75d44bd5a" + ], + "x-ms-correlation-request-id": [ + "33dae8f8-f8f3-4f7b-a6b7-e7f75d44bd5a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080358Z:33dae8f8-f8f3-4f7b-a6b7-e7f75d44bd5a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/azuresdktest03/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL2F6dXJlc2RrdGVzdDAzL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wZXJtaXNzaW9ucz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31991" + ], + "x-ms-request-id": [ + "3b88dea9-1168-47c9-ac42-d244573d3f2e" + ], + "x-ms-correlation-request-id": [ + "3b88dea9-1168-47c9-ac42-d244573d3f2e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080359Z:3b88dea9-1168-47c9-ac42-d244573d3f2e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/azuresdktest05/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL2F6dXJlc2RrdGVzdDA1L3Jlc291cmNlcz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31954" + ], + "x-ms-request-id": [ + "68ac8c1d-bae1-4243-9d33-88edd3e75f18" + ], + "x-ms-correlation-request-id": [ + "68ac8c1d-bae1-4243-9d33-88edd3e75f18" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080359Z:68ac8c1d-bae1-4243-9d33-88edd3e75f18" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/azuresdktest05/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL2F6dXJlc2RrdGVzdDA1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wZXJtaXNzaW9ucz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31990" + ], + "x-ms-request-id": [ + "875febe2-97a4-4811-8b3e-322dcb142790" + ], + "x-ms-correlation-request-id": [ + "875febe2-97a4-4811-8b3e-322dcb142790" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080359Z:875febe2-97a4-4811-8b3e-322dcb142790" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/cli-cs1291/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL2NsaS1jczEyOTEvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/cli-cs1291/providers/Microsoft.ClassicCompute/domainNames/cli-cs1291\",\r\n \"name\": \"cli-cs1291\",\r\n \"type\": \"Microsoft.ClassicCompute/domainNames\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31953" + ], + "x-ms-request-id": [ + "6a69490b-8637-48bd-89a7-588ead366a16" + ], + "x-ms-correlation-request-id": [ + "6a69490b-8637-48bd-89a7-588ead366a16" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080400Z:6a69490b-8637-48bd-89a7-588ead366a16" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/cli-cs1291/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL2NsaS1jczEyOTEvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31989" + ], + "x-ms-request-id": [ + "87eb6346-c329-468b-a047-e1c80b6fae9b" + ], + "x-ms-correlation-request-id": [ + "87eb6346-c329-468b-a047-e1c80b6fae9b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080400Z:87eb6346-c329-468b-a047-e1c80b6fae9b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/cli-cs4471/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL2NsaS1jczQ0NzEvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/cli-cs4471/providers/Microsoft.ClassicCompute/domainNames/cli-cs4471\",\r\n \"name\": \"cli-cs4471\",\r\n \"type\": \"Microsoft.ClassicCompute/domainNames\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31952" + ], + "x-ms-request-id": [ + "32e27e2e-5a69-44a7-bf37-89456497b8f5" + ], + "x-ms-correlation-request-id": [ + "32e27e2e-5a69-44a7-bf37-89456497b8f5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080400Z:32e27e2e-5a69-44a7-bf37-89456497b8f5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:03:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/cli-cs4471/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL2NsaS1jczQ0NzEvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31988" + ], + "x-ms-request-id": [ + "efeb65ab-6e36-41e5-8394-4ee6e82159ef" + ], + "x-ms-correlation-request-id": [ + "efeb65ab-6e36-41e5-8394-4ee6e82159ef" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080401Z:efeb65ab-6e36-41e5-8394-4ee6e82159ef" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/cli-cs5321/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL2NsaS1jczUzMjEvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/cli-cs5321/providers/Microsoft.ClassicCompute/domainNames/cli-cs5321\",\r\n \"name\": \"cli-cs5321\",\r\n \"type\": \"Microsoft.ClassicCompute/domainNames\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31951" + ], + "x-ms-request-id": [ + "670c05dd-5676-45fe-94fc-568d09cbf2ee" + ], + "x-ms-correlation-request-id": [ + "670c05dd-5676-45fe-94fc-568d09cbf2ee" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080401Z:670c05dd-5676-45fe-94fc-568d09cbf2ee" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/cli-cs5321/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL2NsaS1jczUzMjEvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31987" + ], + "x-ms-request-id": [ + "e8da6d0f-06fe-447c-9645-08cd1d94a85d" + ], + "x-ms-correlation-request-id": [ + "e8da6d0f-06fe-447c-9645-08cd1d94a85d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080401Z:e8da6d0f-06fe-447c-9645-08cd1d94a85d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/clitestvm1402/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL2NsaXRlc3R2bTE0MDIvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/clitestvm1402/providers/Microsoft.ClassicCompute/domainNames/clitestvm1402\",\r\n \"name\": \"clitestvm1402\",\r\n \"type\": \"Microsoft.ClassicCompute/domainNames\",\r\n \"location\": \"eastus\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31950" + ], + "x-ms-request-id": [ + "988a3d50-7aab-49c0-a6e4-2e3373714b2b" + ], + "x-ms-correlation-request-id": [ + "988a3d50-7aab-49c0-a6e4-2e3373714b2b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080402Z:988a3d50-7aab-49c0-a6e4-2e3373714b2b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/clitestvm1402/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL2NsaXRlc3R2bTE0MDIvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31986" + ], + "x-ms-request-id": [ + "7d650f2d-83a6-4bc4-9b5c-9f8f80d2e959" + ], + "x-ms-correlation-request-id": [ + "7d650f2d-83a6-4bc4-9b5c-9f8f80d2e959" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080402Z:7d650f2d-83a6-4bc4-9b5c-9f8f80d2e959" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg1067/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL2NzbXJnMTA2Ny9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg1067/providers/Microsoft.Web/serverFarms/Default1\",\r\n \"name\": \"Default1\",\r\n \"type\": \"Microsoft.Web/serverFarms\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg1067/providers/Microsoft.Web/sites/jianghlutest\",\r\n \"name\": \"jianghlutest\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/csmrg1067/providers/Microsoft.Web/serverfarms/Default1\": \"Resource\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31949" + ], + "x-ms-request-id": [ + "6bbb4566-64ba-4837-a60e-21641b7c18ab" + ], + "x-ms-correlation-request-id": [ + "6bbb4566-64ba-4837-a60e-21641b7c18ab" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080402Z:6bbb4566-64ba-4837-a60e-21641b7c18ab" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:02 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/csmrg1067/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL2NzbXJnMTA2Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31985" + ], + "x-ms-request-id": [ + "38364f26-bba0-48a4-9cfd-7aa9ab6bf7f2" + ], + "x-ms-correlation-request-id": [ + "38364f26-bba0-48a4-9cfd-7aa9ab6bf7f2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080403Z:38364f26-bba0-48a4-9cfd-7aa9ab6bf7f2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg2713/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL2NzbXJnMjcxMy9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31948" + ], + "x-ms-request-id": [ + "99ee00e2-9836-4546-a873-cbf3041eaead" + ], + "x-ms-correlation-request-id": [ + "99ee00e2-9836-4546-a873-cbf3041eaead" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080403Z:99ee00e2-9836-4546-a873-cbf3041eaead" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:02 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/csmrg2713/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL2NzbXJnMjcxMy9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31984" + ], + "x-ms-request-id": [ + "c2fa4efa-6fd3-48a3-9b1b-6aeeb683d4f2" + ], + "x-ms-correlation-request-id": [ + "c2fa4efa-6fd3-48a3-9b1b-6aeeb683d4f2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080403Z:c2fa4efa-6fd3-48a3-9b1b-6aeeb683d4f2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg4357/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL2NzbXJnNDM1Ny9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31947" + ], + "x-ms-request-id": [ + "f5bc5a42-5181-4723-b711-d01cb3a9eaf9" + ], + "x-ms-correlation-request-id": [ + "f5bc5a42-5181-4723-b711-d01cb3a9eaf9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080404Z:f5bc5a42-5181-4723-b711-d01cb3a9eaf9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/csmrg4357/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL2NzbXJnNDM1Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31983" + ], + "x-ms-request-id": [ + "825d29f7-1205-4b1c-bc68-bbe971b7bcc6" + ], + "x-ms-correlation-request-id": [ + "825d29f7-1205-4b1c-bc68-bbe971b7bcc6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080404Z:825d29f7-1205-4b1c-bc68-bbe971b7bcc6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg5164/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL2NzbXJnNTE2NC9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31946" + ], + "x-ms-request-id": [ + "c361790f-0611-4368-b215-1dfe4e34e8eb" + ], + "x-ms-correlation-request-id": [ + "c361790f-0611-4368-b215-1dfe4e34e8eb" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080404Z:c361790f-0611-4368-b215-1dfe4e34e8eb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/csmrg5164/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL2NzbXJnNTE2NC9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31982" + ], + "x-ms-request-id": [ + "d78eb9c0-f951-4d3a-8ce2-e1fba8899a32" + ], + "x-ms-correlation-request-id": [ + "d78eb9c0-f951-4d3a-8ce2-e1fba8899a32" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080406Z:d78eb9c0-f951-4d3a-8ce2-e1fba8899a32" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/csmrg8831/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL2NzbXJnODgzMS9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31945" + ], + "x-ms-request-id": [ + "8eafaa4e-4168-4dbe-92b1-c1aa7e9062f2" + ], + "x-ms-correlation-request-id": [ + "8eafaa4e-4168-4dbe-92b1-c1aa7e9062f2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080406Z:8eafaa4e-4168-4dbe-92b1-c1aa7e9062f2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/csmrg8831/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL2NzbXJnODgzMS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31981" + ], + "x-ms-request-id": [ + "fd7b362f-1527-4d91-bc38-518336c2efef" + ], + "x-ms-correlation-request-id": [ + "fd7b362f-1527-4d91-bc38-518336c2efef" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080406Z:fd7b362f-1527-4d91-bc38-518336c2efef" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Networking/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtTmV0d29ya2luZy9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Networking/providers/Microsoft.ClassicNetwork/virtualNetworks/javasdkci\",\r\n \"name\": \"javasdkci\",\r\n \"type\": \"Microsoft.ClassicNetwork/virtualNetworks\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Networking/providers/Microsoft.ClassicNetwork/virtualNetworks/javatestvndawbblqwwt\",\r\n \"name\": \"javatestvndawbblqwwt\",\r\n \"type\": \"Microsoft.ClassicNetwork/virtualNetworks\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Networking/providers/Microsoft.ClassicNetwork/virtualNetworks/javatestvnmwutwhdyvr\",\r\n \"name\": \"javatestvnmwutwhdyvr\",\r\n \"type\": \"Microsoft.ClassicNetwork/virtualNetworks\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Networking/providers/Microsoft.ClassicNetwork/virtualNetworks/javatestvnwqjwttpwql\",\r\n \"name\": \"javatestvnwqjwttpwql\",\r\n \"type\": \"Microsoft.ClassicNetwork/virtualNetworks\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Networking/providers/Microsoft.ClassicNetwork/virtualNetworks/javatestvnzlovplxlbo\",\r\n \"name\": \"javatestvnzlovplxlbo\",\r\n \"type\": \"Microsoft.ClassicNetwork/virtualNetworks\",\r\n \"location\": \"eastus\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31944" + ], + "x-ms-request-id": [ + "6b75eabc-3cf2-4c26-a42b-b927faa70bab" + ], + "x-ms-correlation-request-id": [ + "6b75eabc-3cf2-4c26-a42b-b927faa70bab" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080407Z:6b75eabc-3cf2-4c26-a42b-b927faa70bab" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/Default-Networking/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL0RlZmF1bHQtTmV0d29ya2luZy9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31980" + ], + "x-ms-request-id": [ + "34a6ac8d-92c3-4f6a-b034-7b74a6d6d81b" + ], + "x-ms-correlation-request-id": [ + "34a6ac8d-92c3-4f6a-b034-7b74a6d6d81b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080407Z:34a6ac8d-92c3-4f6a-b034-7b74a6d6d81b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:07 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-SQL-WestUS/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU1FMLVdlc3RVUy9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31943" + ], + "x-ms-request-id": [ + "c9120b26-c536-44cb-ba91-561708cad6d8" + ], + "x-ms-correlation-request-id": [ + "c9120b26-c536-44cb-ba91-561708cad6d8" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080408Z:c9120b26-c536-44cb-ba91-561708cad6d8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:07 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/Default-SQL-WestUS/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL0RlZmF1bHQtU1FMLVdlc3RVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31979" + ], + "x-ms-request-id": [ + "5bc9dba1-9529-41d0-8752-209cc372227e" + ], + "x-ms-correlation-request-id": [ + "5bc9dba1-9529-41d0-8752-209cc372227e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080409Z:5bc9dba1-9529-41d0-8752-209cc372227e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:09 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-EastAsia/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1FYXN0QXNpYS9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31942" + ], + "x-ms-request-id": [ + "99f3c52e-b622-445e-a4bd-26ad06f522fd" + ], + "x-ms-correlation-request-id": [ + "99f3c52e-b622-445e-a4bd-26ad06f522fd" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080409Z:99f3c52e-b622-445e-a4bd-26ad06f522fd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:08 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/Default-Storage-EastAsia/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1FYXN0QXNpYS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31978" + ], + "x-ms-request-id": [ + "06ba29df-d712-4987-aa1c-f7d5c00ea9b2" + ], + "x-ms-correlation-request-id": [ + "06ba29df-d712-4987-aa1c-f7d5c00ea9b2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080409Z:06ba29df-d712-4987-aa1c-f7d5c00ea9b2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:09 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-EastUS/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1FYXN0VVMvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-EastUS/providers/Microsoft.ClassicStorage/storageAccounts/devtestvhds648784ad3677\",\r\n \"name\": \"devtestvhds648784ad3677\",\r\n \"type\": \"Microsoft.ClassicStorage/storageAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-EastUS/providers/Microsoft.ClassicStorage/storageAccounts/portalvhds3285b8sydlcm1\",\r\n \"name\": \"portalvhds3285b8sydlcm1\",\r\n \"type\": \"Microsoft.ClassicStorage/storageAccounts\",\r\n \"location\": \"eastus\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31941" + ], + "x-ms-request-id": [ + "96b0c013-1df6-4835-9ee0-ba62bdf6f090" + ], + "x-ms-correlation-request-id": [ + "96b0c013-1df6-4835-9ee0-ba62bdf6f090" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080410Z:96b0c013-1df6-4835-9ee0-ba62bdf6f090" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/Default-Storage-EastUS/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1FYXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31977" + ], + "x-ms-request-id": [ + "e5b5a3c9-7ea6-4c9b-ae09-e5c85b019bcb" + ], + "x-ms-correlation-request-id": [ + "e5b5a3c9-7ea6-4c9b-ae09-e5c85b019bcb" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080410Z:e5b5a3c9-7ea6-4c9b-ae09-e5c85b019bcb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-NorthCentralUS/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1Ob3J0aENlbnRyYWxVUy9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31940" + ], + "x-ms-request-id": [ + "44a2f237-c0a5-4ce4-ab83-ca63347724bb" + ], + "x-ms-correlation-request-id": [ + "44a2f237-c0a5-4ce4-ab83-ca63347724bb" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080410Z:44a2f237-c0a5-4ce4-ab83-ca63347724bb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/Default-Storage-NorthCentralUS/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1Ob3J0aENlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31976" + ], + "x-ms-request-id": [ + "8f607da5-36de-4843-9b3b-2a304a448368" + ], + "x-ms-correlation-request-id": [ + "8f607da5-36de-4843-9b3b-2a304a448368" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080412Z:8f607da5-36de-4843-9b3b-2a304a448368" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:11 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-NorthEurope/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1Ob3J0aEV1cm9wZS9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-NorthEurope/providers/Microsoft.ClassicStorage/storageAccounts/othersto\",\r\n \"name\": \"othersto\",\r\n \"type\": \"Microsoft.ClassicStorage/storageAccounts\",\r\n \"location\": \"northeurope\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31939" + ], + "x-ms-request-id": [ + "4ad7af58-66a6-4918-8871-749a134c6dfc" + ], + "x-ms-correlation-request-id": [ + "4ad7af58-66a6-4918-8871-749a134c6dfc" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080412Z:4ad7af58-66a6-4918-8871-749a134c6dfc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:12 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/Default-Storage-NorthEurope/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1Ob3J0aEV1cm9wZS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31975" + ], + "x-ms-request-id": [ + "6ea1bc67-06ed-41e5-a885-51530e5d90e3" + ], + "x-ms-correlation-request-id": [ + "6ea1bc67-06ed-41e5-a885-51530e5d90e3" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080412Z:6ea1bc67-06ed-41e5-a885-51530e5d90e3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:12 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-SouthCentralUS/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1Tb3V0aENlbnRyYWxVUy9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31938" + ], + "x-ms-request-id": [ + "21d6447f-5d13-42ae-b44a-e893377aa802" + ], + "x-ms-correlation-request-id": [ + "21d6447f-5d13-42ae-b44a-e893377aa802" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080413Z:21d6447f-5d13-42ae-b44a-e893377aa802" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:12 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/Default-Storage-SouthCentralUS/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1Tb3V0aENlbnRyYWxVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31974" + ], + "x-ms-request-id": [ + "231e54cf-9cef-4c2a-aa5a-af711b91a020" + ], + "x-ms-correlation-request-id": [ + "231e54cf-9cef-4c2a-aa5a-af711b91a020" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080413Z:231e54cf-9cef-4c2a-aa5a-af711b91a020" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-WestUS/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/aztstmediastoragemqovl\",\r\n \"name\": \"aztstmediastoragemqovl\",\r\n \"type\": \"Microsoft.ClassicStorage/storageAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/aztstvmosycryqj\",\r\n \"name\": \"aztstvmosycryqj\",\r\n \"type\": \"Microsoft.ClassicStorage/storageAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/contosoads5\",\r\n \"name\": \"contosoads5\",\r\n \"type\": \"Microsoft.ClassicStorage/storageAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/devtestvhds0e5c3ff9f9ec\",\r\n \"name\": \"devtestvhds0e5c3ff9f9ec\",\r\n \"type\": \"Microsoft.ClassicStorage/storageAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/devtestvhdsb5a2174ca7c6\",\r\n \"name\": \"devtestvhdsb5a2174ca7c6\",\r\n \"type\": \"Microsoft.ClassicStorage/storageAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/emptysto\",\r\n \"name\": \"emptysto\",\r\n \"type\": \"Microsoft.ClassicStorage/storageAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/gongchen1\",\r\n \"name\": \"gongchen1\",\r\n \"type\": \"Microsoft.ClassicStorage/storageAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/lujavadev\",\r\n \"name\": \"lujavadev\",\r\n \"type\": \"Microsoft.ClassicStorage/storageAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/newacct\",\r\n \"name\": \"newacct\",\r\n \"type\": \"Microsoft.ClassicStorage/storageAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/portalvhds2wdcfvkv5phc9\",\r\n \"name\": \"portalvhds2wdcfvkv5phc9\",\r\n \"type\": \"Microsoft.ClassicStorage/storageAccounts\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/uptestnew\",\r\n \"name\": \"uptestnew\",\r\n \"type\": \"Microsoft.ClassicStorage/storageAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31937" + ], + "x-ms-request-id": [ + "fc3ac6ab-6937-49d2-88dd-5af800ff7382" + ], + "x-ms-correlation-request-id": [ + "fc3ac6ab-6937-49d2-88dd-5af800ff7382" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080414Z:fc3ac6ab-6937-49d2-88dd-5af800ff7382" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/Default-Storage-WestUS/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31973" + ], + "x-ms-request-id": [ + "ada8af74-bff4-4c9b-b1fa-02cc9d0a1f91" + ], + "x-ms-correlation-request-id": [ + "ada8af74-bff4-4c9b-b1fa-02cc9d0a1f91" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080414Z:ada8af74-bff4-4c9b-b1fa-02cc9d0a1f91" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Web-EastUS/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtV2ViLUVhc3RVUy9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Web-EastUS/providers/Microsoft.Web/serverFarms/DefaultServerFarm\",\r\n \"name\": \"DefaultServerFarm\",\r\n \"type\": \"Microsoft.Web/serverFarms\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Web-EastUS/providers/Microsoft.Web/sites/ATMTest8720\",\r\n \"name\": \"ATMTest8720\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/Default-Web-EastUS/providers/Microsoft.Web/serverfarms/DefaultServerFarm\": \"Resource\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31936" + ], + "x-ms-request-id": [ + "69977b7d-2dea-4980-ba4d-ad20271cfae8" + ], + "x-ms-correlation-request-id": [ + "69977b7d-2dea-4980-ba4d-ad20271cfae8" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080414Z:69977b7d-2dea-4980-ba4d-ad20271cfae8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:14 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/Default-Web-EastUS/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL0RlZmF1bHQtV2ViLUVhc3RVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31972" + ], + "x-ms-request-id": [ + "16780abb-895f-47f5-b41d-b334acbda21e" + ], + "x-ms-correlation-request-id": [ + "16780abb-895f-47f5-b41d-b334acbda21e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080416Z:16780abb-895f-47f5-b41d-b334acbda21e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:15 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Web-NorthCentralUS/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtV2ViLU5vcnRoQ2VudHJhbFVTL3Jlc291cmNlcz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31935" + ], + "x-ms-request-id": [ + "1b88adde-5f87-421e-a2b7-e40a8fbd9f41" + ], + "x-ms-correlation-request-id": [ + "1b88adde-5f87-421e-a2b7-e40a8fbd9f41" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080416Z:1b88adde-5f87-421e-a2b7-e40a8fbd9f41" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:16 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/Default-Web-NorthCentralUS/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL0RlZmF1bHQtV2ViLU5vcnRoQ2VudHJhbFVTL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wZXJtaXNzaW9ucz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31971" + ], + "x-ms-request-id": [ + "c8412d76-430e-41e7-ade5-c7dd749f2267" + ], + "x-ms-correlation-request-id": [ + "c8412d76-430e-41e7-ade5-c7dd749f2267" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080417Z:c8412d76-430e-41e7-ade5-c7dd749f2267" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:17 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Web-WestUS/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtV2ViLVdlc3RVUy9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Web-WestUS/providers/Microsoft.Web/serverFarms/Default1\",\r\n \"name\": \"Default1\",\r\n \"type\": \"Microsoft.Web/serverFarms\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Web-WestUS/providers/Microsoft.Web/serverFarms/Default2\",\r\n \"name\": \"Default2\",\r\n \"type\": \"Microsoft.Web/serverFarms\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Web-WestUS/providers/Microsoft.Web/sites/cli7891\",\r\n \"name\": \"cli7891\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/Default-Web-WestUS/providers/Microsoft.Web/serverfarms/Default1\": \"Resource\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Web-WestUS/providers/Microsoft.Web/sites/clisitescale-247\",\r\n \"name\": \"clisitescale-247\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/Default-Web-WestUS/providers/Microsoft.Web/serverfarms/Default1\": \"Resource\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Web-WestUS/providers/Microsoft.Web/sites/clisitescale-697\",\r\n \"name\": \"clisitescale-697\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/Default-Web-WestUS/providers/Microsoft.Web/serverfarms/Default2\": \"Resource\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Web-WestUS/providers/Microsoft.Web/sites/clisitescale-867\",\r\n \"name\": \"clisitescale-867\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/Default-Web-WestUS/providers/Microsoft.Web/serverfarms/Default1\": \"Resource\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Web-WestUS/providers/Microsoft.Web/sites/clitests7029\",\r\n \"name\": \"clitests7029\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/Default-Web-WestUS/providers/Microsoft.Web/serverfarms/Default1\": \"Resource\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Web-WestUS/providers/Microsoft.Web/sites/clitests7360\",\r\n \"name\": \"clitests7360\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/Default-Web-WestUS/providers/Microsoft.Web/serverfarms/Default1\": \"Resource\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Web-WestUS/providers/Microsoft.Web/sites/clitests9978\",\r\n \"name\": \"clitests9978\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/Default-Web-WestUS/providers/Microsoft.Web/serverfarms/Default1\": \"Resource\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31934" + ], + "x-ms-request-id": [ + "e11623df-7315-4851-98c1-5fa3b2c49968" + ], + "x-ms-correlation-request-id": [ + "e11623df-7315-4851-98c1-5fa3b2c49968" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080417Z:e11623df-7315-4851-98c1-5fa3b2c49968" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:16 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/Default-Web-WestUS/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL0RlZmF1bHQtV2ViLVdlc3RVUy9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31970" + ], + "x-ms-request-id": [ + "e727c49c-4e00-4e8d-9826-0d13bc9ac9fd" + ], + "x-ms-correlation-request-id": [ + "e727c49c-4e00-4e8d-9826-0d13bc9ac9fd" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080418Z:e727c49c-4e00-4e8d-9826-0d13bc9ac9fd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:17 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/foo13/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL2ZvbzEzL3Jlc291cmNlcz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31933" + ], + "x-ms-request-id": [ + "3abde7ce-a319-43c7-985f-421e4133946a" + ], + "x-ms-correlation-request-id": [ + "3abde7ce-a319-43c7-985f-421e4133946a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080418Z:3abde7ce-a319-43c7-985f-421e4133946a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:18 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/foo13/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL2ZvbzEzL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wZXJtaXNzaW9ucz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31969" + ], + "x-ms-request-id": [ + "83844d49-92fe-47a2-9f86-6efbf28ba610" + ], + "x-ms-correlation-request-id": [ + "83844d49-92fe-47a2-9f86-6efbf28ba610" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080418Z:83844d49-92fe-47a2-9f86-6efbf28ba610" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:18 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/foo14/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL2ZvbzE0L3Jlc291cmNlcz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31932" + ], + "x-ms-request-id": [ + "af316593-e6ea-497b-9450-24e06020196a" + ], + "x-ms-correlation-request-id": [ + "af316593-e6ea-497b-9450-24e06020196a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080419Z:af316593-e6ea-497b-9450-24e06020196a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/foo14/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL2ZvbzE0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wZXJtaXNzaW9ucz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31968" + ], + "x-ms-request-id": [ + "5606af1b-9333-4735-8262-920339a57435" + ], + "x-ms-correlation-request-id": [ + "5606af1b-9333-4735-8262-920339a57435" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080419Z:5606af1b-9333-4735-8262-920339a57435" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:18 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/jianghlutestcs1/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL2ppYW5naGx1dGVzdGNzMS9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/jianghlutestcs1/providers/microsoft.insights/alertrules/CPUHigh Plan\",\r\n \"name\": \"CPUHigh Plan\",\r\n \"type\": \"microsoft.insights/alertrules\",\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/jianghlutestcs1/providers/Microsoft.Web/serverfarms/Plan\": \"Resource\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/jianghlutestcs1/providers/microsoft.insights/alertrules/ForbiddenRequests xplatIssue1144\",\r\n \"name\": \"ForbiddenRequests xplatIssue1144\",\r\n \"type\": \"microsoft.insights/alertrules\",\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/jianghlutestcs1/providers/Microsoft.Web/sites/xplatIssue1144\": \"Resource\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/jianghlutestcs1/providers/microsoft.insights/alertrules/LongHttpQueue Plan\",\r\n \"name\": \"LongHttpQueue Plan\",\r\n \"type\": \"microsoft.insights/alertrules\",\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/jianghlutestcs1/providers/Microsoft.Web/serverfarms/Plan\": \"Resource\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/jianghlutestcs1/providers/microsoft.insights/alertrules/ServerErrors xplatIssue1144\",\r\n \"name\": \"ServerErrors xplatIssue1144\",\r\n \"type\": \"microsoft.insights/alertrules\",\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/jianghlutestcs1/providers/Microsoft.Web/sites/xplatIssue1144\": \"Resource\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/jianghlutestcs1/providers/microsoft.insights/autoscalesettings/Plan-jianghlutestcs1\",\r\n \"name\": \"Plan-jianghlutestcs1\",\r\n \"type\": \"microsoft.insights/autoscalesettings\",\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/jianghlutestcs1/providers/Microsoft.Web/serverfarms/Plan\": \"Resource\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/jianghlutestcs1/providers/microsoft.insights/components/xplatIssue1144\",\r\n \"name\": \"xplatIssue1144\",\r\n \"type\": \"microsoft.insights/components\",\r\n \"location\": \"centralus\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/jianghlutestcs1/providers/Microsoft.Web/sites/xplatIssue1144\": \"Resource\",\r\n \"applicationType\": \"Web\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31931" + ], + "x-ms-request-id": [ + "e45b05e9-553b-477d-81be-75234abd1223" + ], + "x-ms-correlation-request-id": [ + "e45b05e9-553b-477d-81be-75234abd1223" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080419Z:e45b05e9-553b-477d-81be-75234abd1223" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/jianghlutestcs1/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL2ppYW5naGx1dGVzdGNzMS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31967" + ], + "x-ms-request-id": [ + "8a39f153-95e2-4ada-9182-adac209ff2b5" + ], + "x-ms-correlation-request-id": [ + "8a39f153-95e2-4ada-9182-adac209ff2b5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080420Z:8a39f153-95e2-4ada-9182-adac209ff2b5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:20 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/mynoden083001/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL215bm9kZW4wODMwMDEvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/mynoden083001/providers/Microsoft.ClassicCompute/domainNames/mynoden083001\",\r\n \"name\": \"mynoden083001\",\r\n \"type\": \"Microsoft.ClassicCompute/domainNames\",\r\n \"location\": \"brazilsouth\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31930" + ], + "x-ms-request-id": [ + "d5629a54-2217-494c-86d4-ad0533fc5e12" + ], + "x-ms-correlation-request-id": [ + "d5629a54-2217-494c-86d4-ad0533fc5e12" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080420Z:d5629a54-2217-494c-86d4-ad0533fc5e12" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:20 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/mynoden083001/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL215bm9kZW4wODMwMDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31966" + ], + "x-ms-request-id": [ + "7c66b55d-455b-484d-80c9-ff43b507d9cd" + ], + "x-ms-correlation-request-id": [ + "7c66b55d-455b-484d-80c9-ff43b507d9cd" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080420Z:7c66b55d-455b-484d-80c9-ff43b507d9cd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:20 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/nodesdk401/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL25vZGVzZGs0MDEvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/nodesdk401/providers/Microsoft.ClassicCompute/domainNames/nodesdk401\",\r\n \"name\": \"nodesdk401\",\r\n \"type\": \"Microsoft.ClassicCompute/domainNames\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31929" + ], + "x-ms-request-id": [ + "f50cb203-99dd-4915-b707-d75f3eb63f6c" + ], + "x-ms-correlation-request-id": [ + "f50cb203-99dd-4915-b707-d75f3eb63f6c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080421Z:f50cb203-99dd-4915-b707-d75f3eb63f6c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:21 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/nodesdk401/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL25vZGVzZGs0MDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31965" + ], + "x-ms-request-id": [ + "a98487e9-797f-46d1-9767-862dc48bceac" + ], + "x-ms-correlation-request-id": [ + "a98487e9-797f-46d1-9767-862dc48bceac" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080421Z:a98487e9-797f-46d1-9767-862dc48bceac" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:21 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/nodesdk6749/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL25vZGVzZGs2NzQ5L3Jlc291cmNlcz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/nodesdk6749/providers/Microsoft.ClassicCompute/domainNames/nodesdk6749\",\r\n \"name\": \"nodesdk6749\",\r\n \"type\": \"Microsoft.ClassicCompute/domainNames\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31928" + ], + "x-ms-request-id": [ + "9e35b6dc-6aad-4072-8526-3a65ae662429" + ], + "x-ms-correlation-request-id": [ + "9e35b6dc-6aad-4072-8526-3a65ae662429" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080421Z:9e35b6dc-6aad-4072-8526-3a65ae662429" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:21 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/nodesdk6749/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL25vZGVzZGs2NzQ5L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wZXJtaXNzaW9ucz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31964" + ], + "x-ms-request-id": [ + "3beaca0e-15f9-4332-8cce-bc9e4be5fc3b" + ], + "x-ms-correlation-request-id": [ + "3beaca0e-15f9-4332-8cce-bc9e4be5fc3b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080422Z:3beaca0e-15f9-4332-8cce-bc9e4be5fc3b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk2842/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL29uZXNkazI4NDIvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk2842/providers/Microsoft.ClassicCompute/domainNames/onesdk2842\",\r\n \"name\": \"onesdk2842\",\r\n \"type\": \"Microsoft.ClassicCompute/domainNames\",\r\n \"location\": \"eastasia\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31927" + ], + "x-ms-request-id": [ + "4a4e5c34-c278-46b8-aee4-a52d3704ed6d" + ], + "x-ms-correlation-request-id": [ + "4a4e5c34-c278-46b8-aee4-a52d3704ed6d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080422Z:4a4e5c34-c278-46b8-aee4-a52d3704ed6d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk2842/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazI4NDIvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31963" + ], + "x-ms-request-id": [ + "9ba2481f-b854-4554-be9b-35b67bca6538" + ], + "x-ms-correlation-request-id": [ + "9ba2481f-b854-4554-be9b-35b67bca6538" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080423Z:9ba2481f-b854-4554-be9b-35b67bca6538" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testrg121/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL3Rlc3RyZzEyMS9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31925" + ], + "x-ms-request-id": [ + "c6965094-c7d1-4e3b-8cb5-62777755dc41" + ], + "x-ms-correlation-request-id": [ + "c6965094-c7d1-4e3b-8cb5-62777755dc41" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080424Z:c6965094-c7d1-4e3b-8cb5-62777755dc41" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:23 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/testrg121/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL3Rlc3RyZzEyMS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31961" + ], + "x-ms-request-id": [ + "554f6c40-6742-41fe-97a3-d9d96727314d" + ], + "x-ms-correlation-request-id": [ + "554f6c40-6742-41fe-97a3-d9d96727314d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080424Z:554f6c40-6742-41fe-97a3-d9d96727314d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/tr19demostage/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL3RyMTlkZW1vc3RhZ2UvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/tr19demostage/providers/microsoft.insights/alertrules/CPUHigh tr19demostage\",\r\n \"name\": \"CPUHigh tr19demostage\",\r\n \"type\": \"microsoft.insights/alertrules\",\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/tr19demostage/providers/Microsoft.Web/serverfarms/tr19demostage\": \"Resource\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/tr19demostage/providers/microsoft.insights/alertrules/ForbiddenRequests tr19demostagesite\",\r\n \"name\": \"ForbiddenRequests tr19demostagesite\",\r\n \"type\": \"microsoft.insights/alertrules\",\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/tr19demostage/providers/Microsoft.Web/sites/tr19demostagesite\": \"Resource\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/tr19demostage/providers/microsoft.insights/alertrules/LongHttpQueue tr19demostage\",\r\n \"name\": \"LongHttpQueue tr19demostage\",\r\n \"type\": \"microsoft.insights/alertrules\",\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/tr19demostage/providers/Microsoft.Web/serverfarms/tr19demostage\": \"Resource\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/tr19demostage/providers/microsoft.insights/alertrules/ServerErrors tr19demostagesite\",\r\n \"name\": \"ServerErrors tr19demostagesite\",\r\n \"type\": \"microsoft.insights/alertrules\",\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/tr19demostage/providers/Microsoft.Web/sites/tr19demostagesite\": \"Resource\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/tr19demostage/providers/microsoft.insights/autoscalesettings/tr19demostage-tr19demostage\",\r\n \"name\": \"tr19demostage-tr19demostage\",\r\n \"type\": \"microsoft.insights/autoscalesettings\",\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/tr19demostage/providers/Microsoft.Web/serverfarms/tr19demostage\": \"Resource\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/tr19demostage/providers/microsoft.insights/components/tr19demostagesite\",\r\n \"name\": \"tr19demostagesite\",\r\n \"type\": \"microsoft.insights/components\",\r\n \"location\": \"centralus\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/tr19demostage/providers/Microsoft.Web/sites/tr19demostagesite\": \"Resource\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31924" + ], + "x-ms-request-id": [ + "98f095c7-88cd-4dd3-83d2-f6b9481c31c4" + ], + "x-ms-correlation-request-id": [ + "98f095c7-88cd-4dd3-83d2-f6b9481c31c4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080425Z:98f095c7-88cd-4dd3-83d2-f6b9481c31c4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:25 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/tr19demostage/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL3RyMTlkZW1vc3RhZ2UvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31960" + ], + "x-ms-request-id": [ + "8333e64d-53ce-476f-8657-3f23651f61eb" + ], + "x-ms-correlation-request-id": [ + "8333e64d-53ce-476f-8657-3f23651f61eb" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080425Z:8333e64d-53ce-476f-8657-3f23651f61eb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:25 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/VS-azuresdktest01-Group/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL1ZTLWF6dXJlc2RrdGVzdDAxLUdyb3VwL3Jlc291cmNlcz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/VS-azuresdktest01-Group/providers/Microsoft.VisualStudio/account/azuresdktest01\",\r\n \"name\": \"azuresdktest01\",\r\n \"type\": \"Microsoft.VisualStudio/account\",\r\n \"location\": \"northcentralus\",\r\n \"tags\": {}\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31923" + ], + "x-ms-request-id": [ + "86d73440-fa3f-4a2d-9966-73671cf38fc2" + ], + "x-ms-correlation-request-id": [ + "86d73440-fa3f-4a2d-9966-73671cf38fc2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080425Z:86d73440-fa3f-4a2d-9966-73671cf38fc2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:25 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/VS-azuresdktest01-Group/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL1ZTLWF6dXJlc2RrdGVzdDAxLUdyb3VwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wZXJtaXNzaW9ucz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31959" + ], + "x-ms-request-id": [ + "ef063498-a91e-4c96-922f-f3e592b67cde" + ], + "x-ms-correlation-request-id": [ + "ef063498-a91e-4c96-922f-f3e592b67cde" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080426Z:ef063498-a91e-4c96-922f-f3e592b67cde" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:25 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/xplattestvm2/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL3hwbGF0dGVzdHZtMi9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/xplattestvm2/providers/Microsoft.ClassicCompute/domainNames/xplattestvm2\",\r\n \"name\": \"xplattestvm2\",\r\n \"type\": \"Microsoft.ClassicCompute/domainNames\",\r\n \"location\": \"eastus\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31922" + ], + "x-ms-request-id": [ + "588def44-80da-4815-9f1c-d2daa7311524" + ], + "x-ms-correlation-request-id": [ + "588def44-80da-4815-9f1c-d2daa7311524" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080426Z:588def44-80da-4815-9f1c-d2daa7311524" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/xplattestvm2/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL3hwbGF0dGVzdHZtMi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31958" + ], + "x-ms-request-id": [ + "34af2d50-51fd-4312-8082-98ebdf6993a0" + ], + "x-ms-correlation-request-id": [ + "34af2d50-51fd-4312-8082-98ebdf6993a0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080427Z:34af2d50-51fd-4312-8082-98ebdf6993a0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:27 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/zoo/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL3pvby9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/zoo/providers/Microsoft.Web/serverFarms/Default1\",\r\n \"name\": \"Default1\",\r\n \"type\": \"Microsoft.Web/serverFarms\",\r\n \"location\": \"northeurope\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/zoo/providers/Microsoft.Web/sites/resource4\",\r\n \"name\": \"resource4\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"northeurope\",\r\n \"tags\": {\r\n \"dtag\": \"val\",\r\n \"department\": \"Accounting\",\r\n \"hidden-related:/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/zoo/providers/Microsoft.Web/serverfarms/Default1\": \"Resource\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31921" + ], + "x-ms-request-id": [ + "6349d09f-e667-4c17-924c-15e884ec0ef1" + ], + "x-ms-correlation-request-id": [ + "6349d09f-e667-4c17-924c-15e884ec0ef1" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080427Z:6349d09f-e667-4c17-924c-15e884ec0ef1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:27 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/zoo/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL3pvby9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31957" + ], + "x-ms-request-id": [ + "6761be5f-ee60-4a1f-bba6-2f366138feb0" + ], + "x-ms-correlation-request-id": [ + "6761be5f-ee60-4a1f-bba6-2f366138feb0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080428Z:6761be5f-ee60-4a1f-bba6-2f366138feb0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/zoo2/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL3pvbzIvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31920" + ], + "x-ms-request-id": [ + "f4510cf1-603f-4e4c-816e-0d5870f911b7" + ], + "x-ms-correlation-request-id": [ + "f4510cf1-603f-4e4c-816e-0d5870f911b7" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080428Z:f4510cf1-603f-4e4c-816e-0d5870f911b7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:27 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/zoo2/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL3pvbzIvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31956" + ], + "x-ms-request-id": [ + "7113a9c0-48b8-4eb5-b5e0-57b0fef9bb2f" + ], + "x-ms-correlation-request-id": [ + "7113a9c0-48b8-4eb5-b5e0-57b0fef9bb2f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080429Z:7113a9c0-48b8-4eb5-b5e0-57b0fef9bb2f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk9381?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazkzODE/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "112" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1192" + ], + "x-ms-request-id": [ + "59aef3a0-0915-44c2-a1d3-ec47c134c22c" + ], + "x-ms-correlation-request-id": [ + "59aef3a0-0915-44c2-a1d3-ec47c134c22c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080429Z:59aef3a0-0915-44c2-a1d3-ec47c134c22c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:29 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MzgxLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MzgxLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczVNemd4TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "112" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31918" + ], + "x-ms-request-id": [ + "02676853-59b1-483d-813e-097efb8c6352" + ], + "x-ms-correlation-request-id": [ + "02676853-59b1-483d-813e-097efb8c6352" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080430Z:02676853-59b1-483d-813e-097efb8c6352" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:30 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MzgxLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MzgxLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczVNemd4TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "112" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31917" + ], + "x-ms-request-id": [ + "e8d34616-7220-4369-9125-06a9cf704ae3" + ], + "x-ms-correlation-request-id": [ + "e8d34616-7220-4369-9125-06a9cf704ae3" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080445Z:e8d34616-7220-4369-9125-06a9cf704ae3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:04:45 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MzgxLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MzgxLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczVNemd4TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "112" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31916" + ], + "x-ms-request-id": [ + "8326a93b-422e-4dbc-bf34-2940d25a095b" + ], + "x-ms-correlation-request-id": [ + "8326a93b-422e-4dbc-bf34-2940d25a095b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080500Z:8326a93b-422e-4dbc-bf34-2940d25a095b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:05:00 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MzgxLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MzgxLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczVNemd4TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "112" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31915" + ], + "x-ms-request-id": [ + "5e5b38d4-c8fe-46c1-8ca3-0b26e1f4e84e" + ], + "x-ms-correlation-request-id": [ + "5e5b38d4-c8fe-46c1-8ca3-0b26e1f4e84e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080516Z:5e5b38d4-c8fe-46c1-8ca3-0b26e1f4e84e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:05:15 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MzgxLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MzgxLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczVNemd4TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "112" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31914" + ], + "x-ms-request-id": [ + "fc186eb5-88c9-41a3-9330-c6a72efbbdcb" + ], + "x-ms-correlation-request-id": [ + "fc186eb5-88c9-41a3-9330-c6a72efbbdcb" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080531Z:fc186eb5-88c9-41a3-9330-c6a72efbbdcb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:05:30 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MzgxLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MzgxLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczVNemd4TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "112" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31913" + ], + "x-ms-request-id": [ + "ac862ef2-7150-449a-8ec1-c2063389e2d9" + ], + "x-ms-correlation-request-id": [ + "ac862ef2-7150-449a-8ec1-c2063389e2d9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080547Z:ac862ef2-7150-449a-8ec1-c2063389e2d9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:05:47 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MzgxLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs5MzgxLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczVNemd4TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "112" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31912" + ], + "x-ms-request-id": [ + "0ca5cba5-1e00-4fbd-95da-7982105a9d25" + ], + "x-ms-correlation-request-id": [ + "0ca5cba5-1e00-4fbd-95da-7982105a9d25" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080602Z:0ca5cba5-1e00-4fbd-95da-7982105a9d25" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:06:02 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-NewResourceGroupWithTemplateThenGetWithAndWithoutDetails": [ + "onesdk9381", + "onesdk5452" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceGroupTests/TestRemoveNonExistingResourceGroup.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceGroupTests/TestRemoveNonExistingResourceGroup.json new file mode 100644 index 000000000000..ab9dba9f4a71 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceGroupTests/TestRemoveNonExistingResourceGroup.json @@ -0,0 +1,52 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk5100?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazUxMDA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31999" + ], + "x-ms-request-id": [ + "f6ac24c7-f453-4961-9276-13b1e4ed3b97" + ], + "x-ms-correlation-request-id": [ + "f6ac24c7-f453-4961-9276-13b1e4ed3b97" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080242Z:f6ac24c7-f453-4961-9276-13b1e4ed3b97" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:02:42 GMT" + ] + }, + "StatusCode": 404 + } + ], + "Names": { + "Test-RemoveNonExistingResourceGroup": [ + "onesdk5100" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceGroupTests/TestUpdatesExistingResourceGroup.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceGroupTests/TestUpdatesExistingResourceGroup.json new file mode 100644 index 000000000000..631e58405354 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceGroupTests/TestUpdatesExistingResourceGroup.json @@ -0,0 +1,832 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.batch\",\r\n \"namespace\": \"microsoft.batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\",\r\n \"2014-03-31-beta\",\r\n \"2014-03-31-alpha\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\",\r\n \"2014-03-31-beta\",\r\n \"2014-03-31-alpha\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.visualstudio\",\r\n \"namespace\": \"microsoft.visualstudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourcecontrols\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Central US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31999" + ], + "x-ms-request-id": [ + "c21bc5fa-e3de-4d77-9c10-6b13cbc24876" + ], + "x-ms-correlation-request-id": [ + "c21bc5fa-e3de-4d77-9c10-6b13cbc24876" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075736Z:c21bc5fa-e3de-4d77-9c10-6b13cbc24876" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:57:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk5940?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazU5NDA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceGroupNotFound\",\r\n \"message\": \"Resource group 'onesdk5940' could not be found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31998" + ], + "x-ms-request-id": [ + "a903d76e-a1d1-4565-b6b6-3850f2b91d36" + ], + "x-ms-correlation-request-id": [ + "a903d76e-a1d1-4565-b6b6-3850f2b91d36" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075737Z:a903d76e-a1d1-4565-b6b6-3850f2b91d36" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:57:37 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk5940?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazU5NDA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk5940\",\r\n \"name\": \"onesdk5940\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31995" + ], + "x-ms-request-id": [ + "f9da70b5-fe50-4fe6-96d5-d6e10f3c5b54" + ], + "x-ms-correlation-request-id": [ + "f9da70b5-fe50-4fe6-96d5-d6e10f3c5b54" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075739Z:f9da70b5-fe50-4fe6-96d5-d6e10f3c5b54" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:57:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk5940?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazU5NDA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk5940\",\r\n \"name\": \"onesdk5940\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31994" + ], + "x-ms-request-id": [ + "74b9e790-64b4-480b-9cab-9b1db6c9bd11" + ], + "x-ms-correlation-request-id": [ + "74b9e790-64b4-480b-9cab-9b1db6c9bd11" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075740Z:74b9e790-64b4-480b-9cab-9b1db6c9bd11" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:57:40 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk5940?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazU5NDA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk5940\",\r\n \"name\": \"onesdk5940\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31993" + ], + "x-ms-request-id": [ + "c2e5ecad-c4c2-403f-bdec-888a91217a96" + ], + "x-ms-correlation-request-id": [ + "c2e5ecad-c4c2-403f-bdec-888a91217a96" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075740Z:c2e5ecad-c4c2-403f-bdec-888a91217a96" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:57:40 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk5940?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazU5NDA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk5940\",\r\n \"name\": \"onesdk5940\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31991" + ], + "x-ms-request-id": [ + "4263a6ed-2cd1-4c14-8a05-f2c99c19a8bd" + ], + "x-ms-correlation-request-id": [ + "4263a6ed-2cd1-4c14-8a05-f2c99c19a8bd" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075742Z:4263a6ed-2cd1-4c14-8a05-f2c99c19a8bd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:57:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk5940?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazU5NDA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31997" + ], + "x-ms-request-id": [ + "d8f9ae6c-276b-4363-bb27-b65dc60ae01d" + ], + "x-ms-correlation-request-id": [ + "d8f9ae6c-276b-4363-bb27-b65dc60ae01d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075737Z:d8f9ae6c-276b-4363-bb27-b65dc60ae01d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:57:37 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk5940?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazU5NDA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31989" + ], + "x-ms-request-id": [ + "49f00ad1-ae7d-4fd3-b1cd-794f35c94f9c" + ], + "x-ms-correlation-request-id": [ + "49f00ad1-ae7d-4fd3-b1cd-794f35c94f9c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075743Z:49f00ad1-ae7d-4fd3-b1cd-794f35c94f9c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:57:43 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk5940?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazU5NDA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk5940\",\r\n \"name\": \"onesdk5940\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-request-id": [ + "bb030f93-b18f-46a1-8902-1e7c94bb478f" + ], + "x-ms-correlation-request-id": [ + "bb030f93-b18f-46a1-8902-1e7c94bb478f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075738Z:bb030f93-b18f-46a1-8902-1e7c94bb478f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:57:38 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk5940?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazU5NDA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n }\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk5940\",\r\n \"name\": \"onesdk5940\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-request-id": [ + "9a5e21be-45e1-484c-ac51-022c64a428b2" + ], + "x-ms-correlation-request-id": [ + "9a5e21be-45e1-484c-ac51-022c64a428b2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075741Z:9a5e21be-45e1-484c-ac51-022c64a428b2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:57:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk5940/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL29uZXNkazU5NDAvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31996" + ], + "x-ms-request-id": [ + "abce26ed-07fa-4194-8699-591b8750879f" + ], + "x-ms-correlation-request-id": [ + "abce26ed-07fa-4194-8699-591b8750879f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075738Z:abce26ed-07fa-4194-8699-591b8750879f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:57:38 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk5940/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL29uZXNkazU5NDAvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31992" + ], + "x-ms-request-id": [ + "29cd8131-5845-4cee-9229-c2ee8946f47e" + ], + "x-ms-correlation-request-id": [ + "29cd8131-5845-4cee-9229-c2ee8946f47e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075741Z:29cd8131-5845-4cee-9229-c2ee8946f47e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:57:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk5940/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL29uZXNkazU5NDAvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31990" + ], + "x-ms-request-id": [ + "19ea5d83-395a-4730-b933-801e0c383c36" + ], + "x-ms-correlation-request-id": [ + "19ea5d83-395a-4730-b933-801e0c383c36" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075742Z:19ea5d83-395a-4730-b933-801e0c383c36" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:57:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk5940/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazU5NDAvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31990" + ], + "x-ms-request-id": [ + "1e461d05-1edd-4ddb-a408-ce7619ec3b10" + ], + "x-ms-correlation-request-id": [ + "1e461d05-1edd-4ddb-a408-ce7619ec3b10" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075739Z:1e461d05-1edd-4ddb-a408-ce7619ec3b10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:57:38 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk5940/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazU5NDAvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31989" + ], + "x-ms-request-id": [ + "6ed9d9d0-3c1f-442d-9069-c6f5548411f9" + ], + "x-ms-correlation-request-id": [ + "6ed9d9d0-3c1f-442d-9069-c6f5548411f9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075741Z:6ed9d9d0-3c1f-442d-9069-c6f5548411f9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:57:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk5940/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazU5NDAvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31988" + ], + "x-ms-request-id": [ + "8b851df9-c492-43ae-8701-e5a29169cc54" + ], + "x-ms-correlation-request-id": [ + "8b851df9-c492-43ae-8701-e5a29169cc54" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075743Z:8b851df9-c492-43ae-8701-e5a29169cc54" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:57:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk5940?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazU5NDA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "17" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-request-id": [ + "1911ee4b-6566-4b95-a9c5-257bf7a7cc0f" + ], + "x-ms-correlation-request-id": [ + "1911ee4b-6566-4b95-a9c5-257bf7a7cc0f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075744Z:1911ee4b-6566-4b95-a9c5-257bf7a7cc0f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:57:43 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1OTQwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1OTQwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczFPVFF3TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "17" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31988" + ], + "x-ms-request-id": [ + "cfaebe9a-a06c-4430-840f-4e3f0a8d88dd" + ], + "x-ms-correlation-request-id": [ + "cfaebe9a-a06c-4430-840f-4e3f0a8d88dd" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075744Z:cfaebe9a-a06c-4430-840f-4e3f0a8d88dd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:57:44 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1OTQwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1OTQwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczFPVFF3TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "17" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31987" + ], + "x-ms-request-id": [ + "909cd074-738c-46f1-ae94-b6865b8fc14b" + ], + "x-ms-correlation-request-id": [ + "909cd074-738c-46f1-ae94-b6865b8fc14b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075759Z:909cd074-738c-46f1-ae94-b6865b8fc14b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:57:59 GMT" + ], + "Location": [ + "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1OTQwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1PTkVTREs1OTQwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0=?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFQVGtWVFJFczFPVFF3TFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD0/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-04-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ], + "client-tracking-id": [ + "17" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31986" + ], + "x-ms-request-id": [ + "abe09c64-7fe7-40c0-b512-86cbe7f30612" + ], + "x-ms-correlation-request-id": [ + "abe09c64-7fe7-40c0-b512-86cbe7f30612" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T075815Z:abe09c64-7fe7-40c0-b512-86cbe7f30612" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 07:58:14 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-UpdatesExistingResourceGroup": [ + "onesdk5940" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceTests/TestCreatesNewComplexResource.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceTests/TestCreatesNewComplexResource.json new file mode 100644 index 000000000000..964c6893cf97 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceTests/TestCreatesNewComplexResource.json @@ -0,0 +1,1104 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.batch\",\r\n \"namespace\": \"microsoft.batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\",\r\n \"2014-03-31-beta\",\r\n \"2014-03-31-alpha\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\",\r\n \"2014-03-31-beta\",\r\n \"2014-03-31-alpha\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.visualstudio\",\r\n \"namespace\": \"microsoft.visualstudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourcecontrols\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Central US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31901" + ], + "x-ms-request-id": [ + "c88b5772-d6a8-4e2f-96aa-89cfc78559bc" + ], + "x-ms-correlation-request-id": [ + "c88b5772-d6a8-4e2f-96aa-89cfc78559bc" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081001Z:c88b5772-d6a8-4e2f-96aa-89cfc78559bc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:10:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.batch\",\r\n \"namespace\": \"microsoft.batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\",\r\n \"2014-03-31-beta\",\r\n \"2014-03-31-alpha\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\",\r\n \"2014-03-31-beta\",\r\n \"2014-03-31-alpha\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.visualstudio\",\r\n \"namespace\": \"microsoft.visualstudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourcecontrols\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Central US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31900" + ], + "x-ms-request-id": [ + "ffeda298-be04-4174-b7b4-2c2397ecb732" + ], + "x-ms-correlation-request-id": [ + "ffeda298-be04-4174-b7b4-2c2397ecb732" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081001Z:ffeda298-be04-4174-b7b4-2c2397ecb732" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:10:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk1313?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazEzMTM/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31899" + ], + "x-ms-request-id": [ + "e33e2baf-449f-4379-9308-f9c847ef9b1c" + ], + "x-ms-correlation-request-id": [ + "e33e2baf-449f-4379-9308-f9c847ef9b1c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081001Z:e33e2baf-449f-4379-9308-f9c847ef9b1c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:10:01 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk1313?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazEzMTM/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31897" + ], + "x-ms-request-id": [ + "4383d3ff-331c-409c-89ab-3ca9b3726524" + ], + "x-ms-correlation-request-id": [ + "4383d3ff-331c-409c-89ab-3ca9b3726524" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081003Z:4383d3ff-331c-409c-89ab-3ca9b3726524" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:10:03 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk1313?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazEzMTM/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31893" + ], + "x-ms-request-id": [ + "46fa4e60-57b5-4b3b-ab03-47133f554be8" + ], + "x-ms-correlation-request-id": [ + "46fa4e60-57b5-4b3b-ab03-47133f554be8" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081056Z:46fa4e60-57b5-4b3b-ab03-47133f554be8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:10:56 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk1313?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazEzMTM/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk1313\",\r\n \"name\": \"onesdk1313\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1188" + ], + "x-ms-request-id": [ + "4d36b14b-64f1-48c2-952b-27dc0473b625" + ], + "x-ms-correlation-request-id": [ + "4d36b14b-64f1-48c2-952b-27dc0473b625" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081002Z:4d36b14b-64f1-48c2-952b-27dc0473b625" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:10:01 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk1313/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL29uZXNkazEzMTMvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31898" + ], + "x-ms-request-id": [ + "2f03c55d-410a-487a-85de-bfd7ea0a0b32" + ], + "x-ms-correlation-request-id": [ + "2f03c55d-410a-487a-85de-bfd7ea0a0b32" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081002Z:2f03c55d-410a-487a-85de-bfd7ea0a0b32" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:10:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk1313/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL29uZXNkazEzMTMvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk1313/providers/Microsoft.Sql/servers/onesdk967\",\r\n \"name\": \"onesdk967\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"brazilsouth\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk1313/providers/Microsoft.Sql/servers/onesdk967/databases/onesdk1156\",\r\n \"name\": \"onesdk967/onesdk1156\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"brazilsouth\",\r\n \"tags\": {}\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31889" + ], + "x-ms-request-id": [ + "fe212c26-2801-4ab8-ba97-cd9a1e66e546" + ], + "x-ms-correlation-request-id": [ + "fe212c26-2801-4ab8-ba97-cd9a1e66e546" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081105Z:fe212c26-2801-4ab8-ba97-cd9a1e66e546" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:11:05 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk1313/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazEzMTMvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31951" + ], + "x-ms-request-id": [ + "b2dbbba1-593c-41ff-adc8-dd7b7399f445" + ], + "x-ms-correlation-request-id": [ + "b2dbbba1-593c-41ff-adc8-dd7b7399f445" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081003Z:b2dbbba1-593c-41ff-adc8-dd7b7399f445" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:10:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk1313/providers/Microsoft.Sql//servers/onesdk967?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazEzMTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvL3NlcnZlcnMvb25lc2RrOTY3P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"Resource not found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "6baeaab8-04f0-4ff5-b91f-828b125cdb35" + ], + "x-ms-correlation-request-id": [ + "6baeaab8-04f0-4ff5-b91f-828b125cdb35" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081003Z:6baeaab8-04f0-4ff5-b91f-828b125cdb35" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:10:03 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk1313/providers/Microsoft.Sql//servers/onesdk967?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazEzMTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvL3NlcnZlcnMvb25lc2RrOTY3P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk1313/providers/Microsoft.Sql/servers/onesdk967\",\r\n \"name\": \"onesdk967\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"Brazil South\",\r\n \"properties\": {\r\n \"fullyQualifiedDomainName\": \"onesdk967.database.windows.net\",\r\n \"administratorLogin\": \"adminuser\",\r\n \"administratorLoginPassword\": null,\r\n \"version\": \"2.0\"\r\n }\r\n}", + "ResponseHeaders": { + "x-ms-request-id": [ + "6738fc81-9a3e-431f-80e2-77ca83d32c57" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31895" + ], + "x-ms-correlation-request-id": [ + "1b9bfbb9-87ac-4e37-bdc4-720bf27b9077" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081055Z:1b9bfbb9-87ac-4e37-bdc4-720bf27b9077" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:10:54 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk1313/providers/Microsoft.Sql//servers/onesdk967?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazEzMTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvL3NlcnZlcnMvb25lc2RrOTY3P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk1313/providers/Microsoft.Sql/servers/onesdk967\",\r\n \"name\": \"onesdk967\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"Brazil South\",\r\n \"properties\": {\r\n \"fullyQualifiedDomainName\": \"onesdk967.database.windows.net\",\r\n \"administratorLogin\": \"adminuser\",\r\n \"administratorLoginPassword\": null,\r\n \"version\": \"2.0\"\r\n }\r\n}", + "ResponseHeaders": { + "x-ms-request-id": [ + "6c6fe4bc-7dbc-4c68-90fa-72b29464e966" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31894" + ], + "x-ms-correlation-request-id": [ + "90bebd6b-1bb9-4a63-8011-cea14cd3421b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081056Z:90bebd6b-1bb9-4a63-8011-cea14cd3421b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:10:56 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk1313/providers/Microsoft.Sql//servers/onesdk967?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazEzMTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvL3NlcnZlcnMvb25lc2RrOTY3P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"Brazil South\",\r\n \"properties\": {\r\n \"administratorLoginPassword\": \"P@ssword1\",\r\n \"administratorLogin\": \"adminuser\"\r\n },\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk1313/providers/Microsoft.Sql/servers/onesdk967\",\r\n \"name\": \"onesdk967\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"Brazil South\",\r\n \"properties\": {\r\n \"fullyQualifiedDomainName\": \"onesdk967.database.windows.net\",\r\n \"administratorLogin\": \"adminuser\",\r\n \"administratorLoginPassword\": \"P@ssword1\",\r\n \"version\": \"2.0\"\r\n }\r\n}", + "ResponseHeaders": { + "x-ms-request-id": [ + "fa4fc843-4b73-4bd1-aae4-83deb36df2c3" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1187" + ], + "x-ms-correlation-request-id": [ + "806008f6-7086-4ab0-a1a9-bd0ee0f0e5c3" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081054Z:806008f6-7086-4ab0-a1a9-bd0ee0f0e5c3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:10:54 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk1313/providers/Microsoft.Sql//servers/onesdk967/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazEzMTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvL3NlcnZlcnMvb25lc2RrOTY3L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wZXJtaXNzaW9ucz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31950" + ], + "x-ms-request-id": [ + "6c19633f-8d57-434d-b61f-8b2ddaf0f054" + ], + "x-ms-correlation-request-id": [ + "6c19633f-8d57-434d-b61f-8b2ddaf0f054" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081055Z:6c19633f-8d57-434d-b61f-8b2ddaf0f054" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:10:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk1313/providers/Microsoft.Sql//servers/onesdk967/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazEzMTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvL3NlcnZlcnMvb25lc2RrOTY3L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wZXJtaXNzaW9ucz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31949" + ], + "x-ms-request-id": [ + "65feb902-0707-4930-b736-1084982cf6d2" + ], + "x-ms-correlation-request-id": [ + "65feb902-0707-4930-b736-1084982cf6d2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081056Z:65feb902-0707-4930-b736-1084982cf6d2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:10:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk1313/providers/Microsoft.Sql//servers/onesdk967/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazEzMTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvL3NlcnZlcnMvb25lc2RrOTY3L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wZXJtaXNzaW9ucz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31946" + ], + "x-ms-request-id": [ + "976e173e-a96f-425a-aec6-250b2c4d5c9a" + ], + "x-ms-correlation-request-id": [ + "976e173e-a96f-425a-aec6-250b2c4d5c9a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081106Z:976e173e-a96f-425a-aec6-250b2c4d5c9a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:11:05 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk1313/providers/Microsoft.Sql//servers/onesdk967/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazEzMTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvL3NlcnZlcnMvb25lc2RrOTY3L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wZXJtaXNzaW9ucz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31944" + ], + "x-ms-request-id": [ + "6c2015e1-96d3-4578-abb9-6dfb861e7624" + ], + "x-ms-correlation-request-id": [ + "6c2015e1-96d3-4578-abb9-6dfb861e7624" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081107Z:6c2015e1-96d3-4578-abb9-6dfb861e7624" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:11:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk1313/providers/Microsoft.Sql/servers/onesdk967/databases/onesdk1156?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazEzMTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGs5NjcvZGF0YWJhc2VzL29uZXNkazExNTY/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"Resource not found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "fc3fec37-5361-408d-b25d-882cd51a2af0" + ], + "x-ms-correlation-request-id": [ + "fc3fec37-5361-408d-b25d-882cd51a2af0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081057Z:fc3fec37-5361-408d-b25d-882cd51a2af0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:10:57 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk1313/providers/Microsoft.Sql/servers/onesdk967/databases/onesdk1156?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazEzMTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGs5NjcvZGF0YWJhc2VzL29uZXNkazExNTY/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk1313/providers/Microsoft.Sql/servers/onesdk967/databases/onesdk1156\",\r\n \"name\": \"onesdk1156\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"Brazil South\",\r\n \"properties\": {\r\n \"databaseId\": \"30b7b3f4-a583-48d6-b86a-ddc504fa887e\",\r\n \"edition\": \"Web\",\r\n \"status\": \"Online\",\r\n \"serviceLevelObjective\": \"Shared\",\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": \"1073741824\",\r\n \"creationDate\": \"2014-09-11T08:10:59.477Z\",\r\n \"currentServiceObjectiveId\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\",\r\n \"requestedServiceObjectiveId\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n }\r\n}", + "ResponseHeaders": { + "x-ms-request-id": [ + "978c8861-6da3-4b47-a5ae-72f3b817bc10" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31891" + ], + "x-ms-correlation-request-id": [ + "786b6eeb-1599-430b-8328-55bca3b8d7e1" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081102Z:786b6eeb-1599-430b-8328-55bca3b8d7e1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:11:02 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk1313/providers/Microsoft.Sql/servers/onesdk967/databases/onesdk1156?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazEzMTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGs5NjcvZGF0YWJhc2VzL29uZXNkazExNTY/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk1313/providers/Microsoft.Sql/servers/onesdk967/databases/onesdk1156\",\r\n \"name\": \"onesdk1156\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"Brazil South\",\r\n \"properties\": {\r\n \"databaseId\": \"30b7b3f4-a583-48d6-b86a-ddc504fa887e\",\r\n \"edition\": \"Web\",\r\n \"status\": \"Online\",\r\n \"serviceLevelObjective\": \"Shared\",\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": \"1073741824\",\r\n \"creationDate\": \"2014-09-11T08:10:59.477Z\",\r\n \"currentServiceObjectiveId\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\",\r\n \"requestedServiceObjectiveId\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n }\r\n}", + "ResponseHeaders": { + "x-ms-request-id": [ + "72a27a25-ae3e-46b4-b513-87e84494fb90" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31890" + ], + "x-ms-correlation-request-id": [ + "2e2e954a-aba4-44ad-ab38-32eec2c2a006" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081105Z:2e2e954a-aba4-44ad-ab38-32eec2c2a006" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:11:05 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk1313/providers/Microsoft.Sql/servers/onesdk967/databases/onesdk1156?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazEzMTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGs5NjcvZGF0YWJhc2VzL29uZXNkazExNTY/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"Brazil South\",\r\n \"properties\": {\r\n \"edition\": \"Web\",\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk1313/providers/Microsoft.Sql/servers/onesdk967/databases/onesdk1156\",\r\n \"name\": \"onesdk1156\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"Brazil South\",\r\n \"properties\": {\r\n \"databaseId\": \"30b7b3f4-a583-48d6-b86a-ddc504fa887e\",\r\n \"edition\": \"Web\",\r\n \"status\": \"Online\",\r\n \"serviceLevelObjective\": \"Shared\",\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": \"1073741824\",\r\n \"creationDate\": \"2014-09-11T08:10:59.477Z\",\r\n \"currentServiceObjectiveId\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\",\r\n \"requestedServiceObjectiveId\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n }\r\n}", + "ResponseHeaders": { + "x-ms-request-id": [ + "fcfe21b9-dfbe-48f2-99a9-ef443851f002" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1186" + ], + "x-ms-correlation-request-id": [ + "e785965d-8f88-4c9c-929d-99ba89c46abb" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081100Z:e785965d-8f88-4c9c-929d-99ba89c46abb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:10:59 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk1313/providers/Microsoft.Sql/servers/onesdk967/databases/onesdk1156/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazEzMTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGs5NjcvZGF0YWJhc2VzL29uZXNkazExNTYvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31948" + ], + "x-ms-request-id": [ + "125a51f4-9865-4793-9d3d-fea836f457b9" + ], + "x-ms-correlation-request-id": [ + "125a51f4-9865-4793-9d3d-fea836f457b9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081103Z:125a51f4-9865-4793-9d3d-fea836f457b9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:11:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk1313/providers/Microsoft.Sql/servers/onesdk967/databases/onesdk1156/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazEzMTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGs5NjcvZGF0YWJhc2VzL29uZXNkazExNTYvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31947" + ], + "x-ms-request-id": [ + "52d6e33d-a0b2-4826-9ab3-980b58007756" + ], + "x-ms-correlation-request-id": [ + "52d6e33d-a0b2-4826-9ab3-980b58007756" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081105Z:52d6e33d-a0b2-4826-9ab3-980b58007756" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:11:05 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk1313/providers/Microsoft.Sql/servers/onesdk967/databases/onesdk1156/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazEzMTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGs5NjcvZGF0YWJhc2VzL29uZXNkazExNTYvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31945" + ], + "x-ms-request-id": [ + "ee425548-4801-4db9-8528-d41b1184c127" + ], + "x-ms-correlation-request-id": [ + "ee425548-4801-4db9-8528-d41b1184c127" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081106Z:ee425548-4801-4db9-8528-d41b1184c127" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:11:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk1313/providers/Microsoft.Sql/servers/onesdk967/databases/onesdk1156/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazEzMTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGs5NjcvZGF0YWJhc2VzL29uZXNkazExNTYvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31943" + ], + "x-ms-request-id": [ + "a5cd0bcd-2eb2-4b19-b6b0-d384ff3a2f86" + ], + "x-ms-correlation-request-id": [ + "a5cd0bcd-2eb2-4b19-b6b0-d384ff3a2f86" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081108Z:a5cd0bcd-2eb2-4b19-b6b0-d384ff3a2f86" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:11:08 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk1313/resources?$filter=resourceType%20eq%20'Microsoft.Sql%2Fservers'&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL29uZXNkazEzMTMvcmVzb3VyY2VzPyRmaWx0ZXI9cmVzb3VyY2VUeXBlJTIwZXElMjAnTWljcm9zb2Z0LlNxbCUyRnNlcnZlcnMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk1313/providers/Microsoft.Sql/servers/onesdk967\",\r\n \"name\": \"onesdk967\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"brazilsouth\",\r\n \"tags\": {}\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31888" + ], + "x-ms-request-id": [ + "1171b97c-f9c4-45cc-88d3-2bc856cc0023" + ], + "x-ms-correlation-request-id": [ + "1171b97c-f9c4-45cc-88d3-2bc856cc0023" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081107Z:1171b97c-f9c4-45cc-88d3-2bc856cc0023" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:11:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk1313/resources?$filter=resourceType%20eq%20'Microsoft.Sql%2Fservers%2Fdatabases'&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL29uZXNkazEzMTMvcmVzb3VyY2VzPyRmaWx0ZXI9cmVzb3VyY2VUeXBlJTIwZXElMjAnTWljcm9zb2Z0LlNxbCUyRnNlcnZlcnMlMkZkYXRhYmFzZXMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk1313/providers/Microsoft.Sql/servers/onesdk967/databases/onesdk1156\",\r\n \"name\": \"onesdk967/onesdk1156\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"brazilsouth\",\r\n \"tags\": {}\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31887" + ], + "x-ms-request-id": [ + "97682ee0-52a4-490f-b35a-0c901b1847e1" + ], + "x-ms-correlation-request-id": [ + "97682ee0-52a4-490f-b35a-0c901b1847e1" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081107Z:97682ee0-52a4-490f-b35a-0c901b1847e1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:11:07 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-CreatesNewComplexResource": [ + "onesdk1313", + "onesdk967", + "onesdk1156" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceTests/TestCreatesNewSimpleResource.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceTests/TestCreatesNewSimpleResource.json new file mode 100644 index 000000000000..d8f5767605bc --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceTests/TestCreatesNewSimpleResource.json @@ -0,0 +1,617 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.batch\",\r\n \"namespace\": \"microsoft.batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\",\r\n \"2014-03-31-beta\",\r\n \"2014-03-31-alpha\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\",\r\n \"2014-03-31-beta\",\r\n \"2014-03-31-alpha\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.visualstudio\",\r\n \"namespace\": \"microsoft.visualstudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourcecontrols\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Central US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31911" + ], + "x-ms-request-id": [ + "506ef961-0d12-4aee-9706-a51cf8f7dc81" + ], + "x-ms-correlation-request-id": [ + "506ef961-0d12-4aee-9706-a51cf8f7dc81" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080800Z:506ef961-0d12-4aee-9706-a51cf8f7dc81" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:07:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.batch\",\r\n \"namespace\": \"microsoft.batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\",\r\n \"2014-03-31-beta\",\r\n \"2014-03-31-alpha\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\",\r\n \"2014-03-31-beta\",\r\n \"2014-03-31-alpha\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.visualstudio\",\r\n \"namespace\": \"microsoft.visualstudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourcecontrols\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Central US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31910" + ], + "x-ms-request-id": [ + "2a80f9a8-cf72-4771-8b53-2378fb29eb3a" + ], + "x-ms-correlation-request-id": [ + "2a80f9a8-cf72-4771-8b53-2378fb29eb3a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080800Z:2a80f9a8-cf72-4771-8b53-2378fb29eb3a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:08:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk5298?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazUyOTg/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31909" + ], + "x-ms-request-id": [ + "c2a4456b-10e5-44bb-a95c-6af31fd87220" + ], + "x-ms-correlation-request-id": [ + "c2a4456b-10e5-44bb-a95c-6af31fd87220" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080801Z:c2a4456b-10e5-44bb-a95c-6af31fd87220" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:08:00 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk5298?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazUyOTg/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31907" + ], + "x-ms-request-id": [ + "877ce18d-d752-4c07-953f-5d7cf487e4a4" + ], + "x-ms-correlation-request-id": [ + "877ce18d-d752-4c07-953f-5d7cf487e4a4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080803Z:877ce18d-d752-4c07-953f-5d7cf487e4a4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:08:02 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk5298?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazUyOTg/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk5298\",\r\n \"name\": \"onesdk5298\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1191" + ], + "x-ms-request-id": [ + "1fd615f1-1e03-4761-97ba-45c3b9625b45" + ], + "x-ms-correlation-request-id": [ + "1fd615f1-1e03-4761-97ba-45c3b9625b45" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080801Z:1fd615f1-1e03-4761-97ba-45c3b9625b45" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:08:00 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk5298/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL29uZXNkazUyOTgvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31908" + ], + "x-ms-request-id": [ + "e5d39fc1-0b5a-4a23-ae39-2ec9e692f806" + ], + "x-ms-correlation-request-id": [ + "e5d39fc1-0b5a-4a23-ae39-2ec9e692f806" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080802Z:e5d39fc1-0b5a-4a23-ae39-2ec9e692f806" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:08:02 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk5298/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL29uZXNkazUyOTgvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk5298/providers/Microsoft.Sql/servers/onesdk2638\",\r\n \"name\": \"onesdk2638\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"brazilsouth\",\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31903" + ], + "x-ms-request-id": [ + "7c253cec-9513-4a27-9ab1-02d70f9d5217" + ], + "x-ms-correlation-request-id": [ + "7c253cec-9513-4a27-9ab1-02d70f9d5217" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080856Z:7c253cec-9513-4a27-9ab1-02d70f9d5217" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:08:56 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk5298/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazUyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31955" + ], + "x-ms-request-id": [ + "7056b4b2-6025-4589-b569-68a048002c98" + ], + "x-ms-correlation-request-id": [ + "7056b4b2-6025-4589-b569-68a048002c98" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080802Z:7056b4b2-6025-4589-b569-68a048002c98" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:08:02 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk5298/providers/Microsoft.Sql//servers/onesdk2638?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazUyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvL3NlcnZlcnMvb25lc2RrMjYzOD9hcGktdmVyc2lvbj0yMDE0LTA0LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"Resource not found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "2a055768-16ae-4a89-ac8b-c94dd9f3248e" + ], + "x-ms-correlation-request-id": [ + "2a055768-16ae-4a89-ac8b-c94dd9f3248e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080803Z:2a055768-16ae-4a89-ac8b-c94dd9f3248e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:08:03 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk5298/providers/Microsoft.Sql//servers/onesdk2638?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazUyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvL3NlcnZlcnMvb25lc2RrMjYzOD9hcGktdmVyc2lvbj0yMDE0LTA0LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk5298/providers/Microsoft.Sql/servers/onesdk2638\",\r\n \"name\": \"onesdk2638\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"Brazil South\",\r\n \"properties\": {\r\n \"fullyQualifiedDomainName\": \"onesdk2638.database.windows.net\",\r\n \"administratorLogin\": \"adminuser\",\r\n \"administratorLoginPassword\": null,\r\n \"version\": \"2.0\"\r\n }\r\n}", + "ResponseHeaders": { + "x-ms-request-id": [ + "f90fb596-3d9c-4a18-8619-711baae0bf4d" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31905" + ], + "x-ms-correlation-request-id": [ + "e47497d1-a703-42df-b014-42b3fb5142f3" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080855Z:e47497d1-a703-42df-b014-42b3fb5142f3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:08:55 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk5298/providers/Microsoft.Sql//servers/onesdk2638?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazUyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvL3NlcnZlcnMvb25lc2RrMjYzOD9hcGktdmVyc2lvbj0yMDE0LTA0LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk5298/providers/Microsoft.Sql/servers/onesdk2638\",\r\n \"name\": \"onesdk2638\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"Brazil South\",\r\n \"properties\": {\r\n \"fullyQualifiedDomainName\": \"onesdk2638.database.windows.net\",\r\n \"administratorLogin\": \"adminuser\",\r\n \"administratorLoginPassword\": null,\r\n \"version\": \"2.0\"\r\n }\r\n}", + "ResponseHeaders": { + "x-ms-request-id": [ + "75bc4076-9288-4cd2-9c7f-c1e39822d3e9" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31904" + ], + "x-ms-correlation-request-id": [ + "932a8f98-c812-4819-9684-f9a314394639" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080856Z:932a8f98-c812-4819-9684-f9a314394639" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:08:55 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk5298/providers/Microsoft.Sql//servers/onesdk2638?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazUyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvL3NlcnZlcnMvb25lc2RrMjYzOD9hcGktdmVyc2lvbj0yMDE0LTA0LTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"Brazil South\",\r\n \"properties\": {\r\n \"administratorLoginPassword\": \"P@ssword1\",\r\n \"administratorLogin\": \"adminuser\"\r\n },\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n }\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"tags\": {\r\n \"testtag\": \"testval\"\r\n },\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk5298/providers/Microsoft.Sql/servers/onesdk2638\",\r\n \"name\": \"onesdk2638\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"Brazil South\",\r\n \"properties\": {\r\n \"fullyQualifiedDomainName\": \"onesdk2638.database.windows.net\",\r\n \"administratorLogin\": \"adminuser\",\r\n \"administratorLoginPassword\": \"P@ssword1\",\r\n \"version\": \"2.0\"\r\n }\r\n}", + "ResponseHeaders": { + "x-ms-request-id": [ + "999d1ac4-c1e8-49f8-940c-64eddcbd40e5" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1190" + ], + "x-ms-correlation-request-id": [ + "0e8d25bc-d191-470c-a330-71ab18025056" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080854Z:0e8d25bc-d191-470c-a330-71ab18025056" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:08:54 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk5298/providers/Microsoft.Sql//servers/onesdk2638/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazUyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvL3NlcnZlcnMvb25lc2RrMjYzOC9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31954" + ], + "x-ms-request-id": [ + "0ac084e9-c7f0-4b49-8922-3788759cea4f" + ], + "x-ms-correlation-request-id": [ + "0ac084e9-c7f0-4b49-8922-3788759cea4f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080855Z:0ac084e9-c7f0-4b49-8922-3788759cea4f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:08:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk5298/providers/Microsoft.Sql//servers/onesdk2638/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazUyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvL3NlcnZlcnMvb25lc2RrMjYzOC9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31953" + ], + "x-ms-request-id": [ + "bfaa85e8-03f8-43a0-894c-517d7fe9d555" + ], + "x-ms-correlation-request-id": [ + "bfaa85e8-03f8-43a0-894c-517d7fe9d555" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080856Z:bfaa85e8-03f8-43a0-894c-517d7fe9d555" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:08:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk5298/providers/Microsoft.Sql//servers/onesdk2638/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazUyOTgvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvL3NlcnZlcnMvb25lc2RrMjYzOC9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31952" + ], + "x-ms-request-id": [ + "7a391261-afd7-46fe-9bfd-c5b86f7d4c58" + ], + "x-ms-correlation-request-id": [ + "7a391261-afd7-46fe-9bfd-c5b86f7d4c58" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T080857Z:7a391261-afd7-46fe-9bfd-c5b86f7d4c58" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:08:57 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-CreatesNewSimpleResource": [ + "onesdk5298", + "onesdk2638" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceTests/TestGetResourceForNonExisingResource.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceTests/TestGetResourceForNonExisingResource.json new file mode 100644 index 000000000000..69f9e54710fd --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceTests/TestGetResourceForNonExisingResource.json @@ -0,0 +1,317 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.batch\",\r\n \"namespace\": \"microsoft.batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\",\r\n \"2014-03-31-beta\",\r\n \"2014-03-31-alpha\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\",\r\n \"2014-03-31-beta\",\r\n \"2014-03-31-alpha\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.visualstudio\",\r\n \"namespace\": \"microsoft.visualstudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourcecontrols\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Central US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31878" + ], + "x-ms-request-id": [ + "45764ae3-8066-4efb-8fc9-ee7a88ce80da" + ], + "x-ms-correlation-request-id": [ + "45764ae3-8066-4efb-8fc9-ee7a88ce80da" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081556Z:45764ae3-8066-4efb-8fc9-ee7a88ce80da" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:15:56 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk285?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazI4NT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31877" + ], + "x-ms-request-id": [ + "01eca751-ab60-4df1-a324-466deb5b0f3f" + ], + "x-ms-correlation-request-id": [ + "01eca751-ab60-4df1-a324-466deb5b0f3f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081556Z:01eca751-ab60-4df1-a324-466deb5b0f3f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:15:56 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk285?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazI4NT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk285\",\r\n \"name\": \"onesdk285\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1183" + ], + "x-ms-request-id": [ + "254bd37f-7cd1-4b83-a50c-d0d8ae2fbebd" + ], + "x-ms-correlation-request-id": [ + "254bd37f-7cd1-4b83-a50c-d0d8ae2fbebd" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081557Z:254bd37f-7cd1-4b83-a50c-d0d8ae2fbebd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:15:56 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk285/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL29uZXNkazI4NS9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31876" + ], + "x-ms-request-id": [ + "2e52ac14-789f-4fbb-a750-4a07b2e4b9de" + ], + "x-ms-correlation-request-id": [ + "2e52ac14-789f-4fbb-a750-4a07b2e4b9de" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081557Z:2e52ac14-789f-4fbb-a750-4a07b2e4b9de" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:15:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk285/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazI4NS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31927" + ], + "x-ms-request-id": [ + "5d4d7288-f61a-4399-a89c-39d68f7f5011" + ], + "x-ms-correlation-request-id": [ + "5d4d7288-f61a-4399-a89c-39d68f7f5011" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081558Z:5d4d7288-f61a-4399-a89c-39d68f7f5011" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:15:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk285/providers/Microsoft.Web//sites/onesdk6363?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazI4NS9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi8vc2l0ZXMvb25lc2RrNjM2Mz9hcGktdmVyc2lvbj0yMDE0LTA0LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"Resource not found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "86971375-bb35-4f9f-99c0-d94313328c9e" + ], + "x-ms-correlation-request-id": [ + "86971375-bb35-4f9f-99c0-d94313328c9e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081558Z:86971375-bb35-4f9f-99c0-d94313328c9e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:15:57 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk285/providers/Microsoft.Sql//servers/onesdk6363?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazI4NS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC8vc2VydmVycy9vbmVzZGs2MzYzP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"Resource not found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "d51eb3c4-097a-494d-8552-7a0064d66793" + ], + "x-ms-correlation-request-id": [ + "d51eb3c4-097a-494d-8552-7a0064d66793" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081558Z:d51eb3c4-097a-494d-8552-7a0064d66793" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:15:58 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk285/providers/Microsoft.Fake//nonexisting/onesdk6363?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazI4NS9wcm92aWRlcnMvTWljcm9zb2Z0LkZha2UvL25vbmV4aXN0aW5nL29uZXNkazYzNjM/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"InvalidResourceNamespace\",\r\n \"message\": \"The resource namespace 'Microsoft.Fake' is invalid.\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "da6df6f7-5767-4ad3-a3d8-985c330de66a" + ], + "x-ms-correlation-request-id": [ + "da6df6f7-5767-4ad3-a3d8-985c330de66a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081559Z:da6df6f7-5767-4ad3-a3d8-985c330de66a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:15:58 GMT" + ] + }, + "StatusCode": 404 + } + ], + "Names": { + "Test-GetResourceForNonExisingResource": [ + "onesdk285", + "onesdk6363" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceTests/TestGetResourcesForNonExisingType.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceTests/TestGetResourcesForNonExisingType.json new file mode 100644 index 000000000000..f19ac2c80391 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceTests/TestGetResourcesForNonExisingType.json @@ -0,0 +1,48 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resources?$filter=resourceType%20eq%20'Non-Existing'&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ05vbi1FeGlzdGluZycmYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31964" + ], + "x-ms-request-id": [ + "25a5d758-b9d3-4967-8e00-d8447eb8109b" + ], + "x-ms-correlation-request-id": [ + "25a5d758-b9d3-4967-8e00-d8447eb8109b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081515Z:25a5d758-b9d3-4967-8e00-d8447eb8109b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:15:15 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceTests/TestGetResourcesFromEmptyGroup.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceTests/TestGetResourcesFromEmptyGroup.json new file mode 100644 index 000000000000..6bfb0bf6f744 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceTests/TestGetResourcesFromEmptyGroup.json @@ -0,0 +1,403 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.batch\",\r\n \"namespace\": \"microsoft.batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\",\r\n \"2014-03-31-beta\",\r\n \"2014-03-31-alpha\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\",\r\n \"2014-03-31-beta\",\r\n \"2014-03-31-alpha\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.visualstudio\",\r\n \"namespace\": \"microsoft.visualstudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourcecontrols\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Central US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31886" + ], + "x-ms-request-id": [ + "0b4f0c91-a887-43b4-ad64-a95e5afaf6cb" + ], + "x-ms-correlation-request-id": [ + "0b4f0c91-a887-43b4-ad64-a95e5afaf6cb" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081349Z:0b4f0c91-a887-43b4-ad64-a95e5afaf6cb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:13:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk3167?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxNjc/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31885" + ], + "x-ms-request-id": [ + "15a63e79-d418-49d7-ba78-859cd6529a2f" + ], + "x-ms-correlation-request-id": [ + "15a63e79-d418-49d7-ba78-859cd6529a2f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081350Z:15a63e79-d418-49d7-ba78-859cd6529a2f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:13:50 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk3167?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxNjc/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk3167\",\r\n \"name\": \"onesdk3167\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1185" + ], + "x-ms-request-id": [ + "7ebb8bf8-890d-4039-a4eb-bcbefaf95233" + ], + "x-ms-correlation-request-id": [ + "7ebb8bf8-890d-4039-a4eb-bcbefaf95233" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081350Z:7ebb8bf8-890d-4039-a4eb-bcbefaf95233" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:13:50 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk3167/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL29uZXNkazMxNjcvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31884" + ], + "x-ms-request-id": [ + "fb7fde1c-1799-422a-b13b-599261a975d5" + ], + "x-ms-correlation-request-id": [ + "fb7fde1c-1799-422a-b13b-599261a975d5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081351Z:fb7fde1c-1799-422a-b13b-599261a975d5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:13:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk3167/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL29uZXNkazMxNjcvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31882" + ], + "x-ms-request-id": [ + "c749808c-c530-4ba0-a2cf-2776b41b45ac" + ], + "x-ms-correlation-request-id": [ + "c749808c-c530-4ba0-a2cf-2776b41b45ac" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081352Z:c749808c-c530-4ba0-a2cf-2776b41b45ac" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:13:52 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk3167/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL29uZXNkazMxNjcvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31881" + ], + "x-ms-request-id": [ + "cb6df029-f19c-40aa-bd09-02fffdd3b21b" + ], + "x-ms-correlation-request-id": [ + "cb6df029-f19c-40aa-bd09-02fffdd3b21b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081353Z:cb6df029-f19c-40aa-bd09-02fffdd3b21b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:13:52 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk3167/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL29uZXNkazMxNjcvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31880" + ], + "x-ms-request-id": [ + "054ad00b-a3c4-4807-81b1-56f82eaae0b1" + ], + "x-ms-correlation-request-id": [ + "054ad00b-a3c4-4807-81b1-56f82eaae0b1" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081353Z:054ad00b-a3c4-4807-81b1-56f82eaae0b1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:13:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk3167/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxNjcvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31929" + ], + "x-ms-request-id": [ + "04d4653f-34bb-4378-92fc-1f50f74bbee2" + ], + "x-ms-correlation-request-id": [ + "04d4653f-34bb-4378-92fc-1f50f74bbee2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081351Z:04d4653f-34bb-4378-92fc-1f50f74bbee2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:13:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk3167/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxNjcvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31928" + ], + "x-ms-request-id": [ + "f92e75ca-552c-44dc-a170-814f02f56d58" + ], + "x-ms-correlation-request-id": [ + "f92e75ca-552c-44dc-a170-814f02f56d58" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081353Z:f92e75ca-552c-44dc-a170-814f02f56d58" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:13:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk3167?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazMxNjc/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk3167\",\r\n \"name\": \"onesdk3167\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31883" + ], + "x-ms-request-id": [ + "c9bf0b1d-13b5-4b8c-b8f4-43e6bdc55965" + ], + "x-ms-correlation-request-id": [ + "c9bf0b1d-13b5-4b8c-b8f4-43e6bdc55965" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081352Z:c9bf0b1d-13b5-4b8c-b8f4-43e6bdc55965" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:13:51 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-GetResourcesFromEmptyGroup": [ + "onesdk3167" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceTests/TestGetResourcesFromNonExisingGroup.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceTests/TestGetResourcesFromNonExisingGroup.json new file mode 100644 index 000000000000..a4a2536e005d --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceTests/TestGetResourcesFromNonExisingGroup.json @@ -0,0 +1,52 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk3830/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL29uZXNkazM4MzAvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceGroupNotFound\",\r\n \"message\": \"Resource group 'onesdk3830' could not be found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31992" + ], + "x-ms-request-id": [ + "8b60c3b2-77a8-4757-a557-6bb2b0ff4f13" + ], + "x-ms-correlation-request-id": [ + "8b60c3b2-77a8-4757-a557-6bb2b0ff4f13" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081452Z:8b60c3b2-77a8-4757-a557-6bb2b0ff4f13" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:14:52 GMT" + ] + }, + "StatusCode": 404 + } + ], + "Names": { + "Test-GetResourcesFromNonExisingGroup": [ + "onesdk3830" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceTests/TestGetResourcesViaPiping.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceTests/TestGetResourcesViaPiping.json new file mode 100644 index 000000000000..b2379d90673e --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceTests/TestGetResourcesViaPiping.json @@ -0,0 +1,897 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.batch\",\r\n \"namespace\": \"microsoft.batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\",\r\n \"2014-03-31-beta\",\r\n \"2014-03-31-alpha\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\",\r\n \"2014-03-31-beta\",\r\n \"2014-03-31-alpha\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.visualstudio\",\r\n \"namespace\": \"microsoft.visualstudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourcecontrols\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Central US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31942" + ], + "x-ms-request-id": [ + "e4ff3af3-01a0-48ea-92ab-996be5de4209" + ], + "x-ms-correlation-request-id": [ + "e4ff3af3-01a0-48ea-92ab-996be5de4209" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081156Z:e4ff3af3-01a0-48ea-92ab-996be5de4209" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:11:56 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.batch\",\r\n \"namespace\": \"microsoft.batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\",\r\n \"2014-03-31-beta\",\r\n \"2014-03-31-alpha\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\",\r\n \"2014-03-31-beta\",\r\n \"2014-03-31-alpha\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.visualstudio\",\r\n \"namespace\": \"microsoft.visualstudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourcecontrols\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Central US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31941" + ], + "x-ms-request-id": [ + "18eb62a0-0440-4b0c-8ad0-badaaf8fa5bb" + ], + "x-ms-correlation-request-id": [ + "18eb62a0-0440-4b0c-8ad0-badaaf8fa5bb" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081157Z:18eb62a0-0440-4b0c-8ad0-badaaf8fa5bb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:11:56 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk3675?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM2NzU/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31940" + ], + "x-ms-request-id": [ + "5c1e0a8a-2e2d-461c-969f-559333c68716" + ], + "x-ms-correlation-request-id": [ + "5c1e0a8a-2e2d-461c-969f-559333c68716" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081157Z:5c1e0a8a-2e2d-461c-969f-559333c68716" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:11:57 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk3675?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM2NzU/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31938" + ], + "x-ms-request-id": [ + "3a49c73c-8ba1-4196-afe2-3424c7d6a2c5" + ], + "x-ms-correlation-request-id": [ + "3a49c73c-8ba1-4196-afe2-3424c7d6a2c5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081159Z:3a49c73c-8ba1-4196-afe2-3424c7d6a2c5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:11:58 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk3675?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM2NzU/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31935" + ], + "x-ms-request-id": [ + "f0d93534-7901-442d-9e1d-92b70bc45895" + ], + "x-ms-correlation-request-id": [ + "f0d93534-7901-442d-9e1d-92b70bc45895" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081253Z:f0d93534-7901-442d-9e1d-92b70bc45895" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:12:53 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk3675?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM2NzU/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk3675\",\r\n \"name\": \"onesdk3675\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-request-id": [ + "cc21247f-4941-4523-bf11-adaea9fcd107" + ], + "x-ms-correlation-request-id": [ + "cc21247f-4941-4523-bf11-adaea9fcd107" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081158Z:cc21247f-4941-4523-bf11-adaea9fcd107" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:11:57 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk3675/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL29uZXNkazM2NzUvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31939" + ], + "x-ms-request-id": [ + "7c9b0d4c-3f86-423a-ab24-7ff920f4ad6c" + ], + "x-ms-correlation-request-id": [ + "7c9b0d4c-3f86-423a-ab24-7ff920f4ad6c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081158Z:7c9b0d4c-3f86-423a-ab24-7ff920f4ad6c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:11:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk3675/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL29uZXNkazM2NzUvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk3675/providers/Microsoft.Sql/servers/onesdk8801\",\r\n \"name\": \"onesdk8801\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"brazilsouth\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk3675/providers/Microsoft.Sql/servers/onesdk8801/databases/onesdk2589\",\r\n \"name\": \"onesdk8801/onesdk2589\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"brazilsouth\",\r\n \"tags\": {}\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31931" + ], + "x-ms-request-id": [ + "d2555e6b-cefb-415b-bd96-89555fdc5683" + ], + "x-ms-correlation-request-id": [ + "d2555e6b-cefb-415b-bd96-89555fdc5683" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081300Z:d2555e6b-cefb-415b-bd96-89555fdc5683" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:13:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk3675/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL29uZXNkazM2NzUvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk3675/providers/Microsoft.Sql/servers/onesdk8801\",\r\n \"name\": \"onesdk8801\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"brazilsouth\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk3675/providers/Microsoft.Sql/servers/onesdk8801/databases/onesdk2589\",\r\n \"name\": \"onesdk8801/onesdk2589\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"brazilsouth\",\r\n \"tags\": {}\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31930" + ], + "x-ms-request-id": [ + "52b50102-c612-42a9-9f90-a61344d0dbde" + ], + "x-ms-correlation-request-id": [ + "52b50102-c612-42a9-9f90-a61344d0dbde" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081301Z:52b50102-c612-42a9-9f90-a61344d0dbde" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:13:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk3675/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM2NzUvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31998" + ], + "x-ms-request-id": [ + "5793d583-1241-4796-9b1e-d5036e137373" + ], + "x-ms-correlation-request-id": [ + "5793d583-1241-4796-9b1e-d5036e137373" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081159Z:5793d583-1241-4796-9b1e-d5036e137373" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:11:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk3675/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM2NzUvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31995" + ], + "x-ms-request-id": [ + "fb40e24a-1748-4e3c-ae20-1862fb27f563" + ], + "x-ms-correlation-request-id": [ + "fb40e24a-1748-4e3c-ae20-1862fb27f563" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081300Z:fb40e24a-1748-4e3c-ae20-1862fb27f563" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:13:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk3675/providers/Microsoft.Sql//servers/onesdk8801?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM2NzUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvL3NlcnZlcnMvb25lc2RrODgwMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"Resource not found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "fe3cb7bb-5f2e-43f9-8633-3f8b9f342f81" + ], + "x-ms-correlation-request-id": [ + "fe3cb7bb-5f2e-43f9-8633-3f8b9f342f81" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081200Z:fe3cb7bb-5f2e-43f9-8633-3f8b9f342f81" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:11:59 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk3675/providers/Microsoft.Sql//servers/onesdk8801?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM2NzUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvL3NlcnZlcnMvb25lc2RrODgwMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk3675/providers/Microsoft.Sql/servers/onesdk8801\",\r\n \"name\": \"onesdk8801\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"Brazil South\",\r\n \"properties\": {\r\n \"fullyQualifiedDomainName\": \"onesdk8801.database.windows.net\",\r\n \"administratorLogin\": \"adminuser\",\r\n \"administratorLoginPassword\": null,\r\n \"version\": \"2.0\"\r\n }\r\n}", + "ResponseHeaders": { + "x-ms-request-id": [ + "956ecebf-98a1-4611-bc37-5b3b6fd4bb96" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31936" + ], + "x-ms-correlation-request-id": [ + "be7dee6a-d4a3-41c0-bcba-227fc9489504" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081252Z:be7dee6a-d4a3-41c0-bcba-227fc9489504" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:12:51 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk3675/providers/Microsoft.Sql//servers/onesdk8801?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM2NzUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvL3NlcnZlcnMvb25lc2RrODgwMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"Brazil South\",\r\n \"properties\": {\r\n \"administratorLoginPassword\": \"P@ssword1\",\r\n \"administratorLogin\": \"adminuser\"\r\n },\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk3675/providers/Microsoft.Sql/servers/onesdk8801\",\r\n \"name\": \"onesdk8801\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"Brazil South\",\r\n \"properties\": {\r\n \"fullyQualifiedDomainName\": \"onesdk8801.database.windows.net\",\r\n \"administratorLogin\": \"adminuser\",\r\n \"administratorLoginPassword\": \"P@ssword1\",\r\n \"version\": \"2.0\"\r\n }\r\n}", + "ResponseHeaders": { + "x-ms-request-id": [ + "d0534c9c-3b21-4aa5-9038-a662a1f78323" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "1f98e0fb-660a-4840-a28b-77c55199138c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081251Z:1f98e0fb-660a-4840-a28b-77c55199138c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:12:51 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk3675/providers/Microsoft.Sql//servers/onesdk8801/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM2NzUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvL3NlcnZlcnMvb25lc2RrODgwMS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31997" + ], + "x-ms-request-id": [ + "65e3877d-f474-48f8-9016-a53ee6e114b9" + ], + "x-ms-correlation-request-id": [ + "65e3877d-f474-48f8-9016-a53ee6e114b9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081252Z:65e3877d-f474-48f8-9016-a53ee6e114b9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:12:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk3675/providers/Microsoft.Sql//servers/onesdk8801/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM2NzUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvL3NlcnZlcnMvb25lc2RrODgwMS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31994" + ], + "x-ms-request-id": [ + "a04ba2c2-edf9-47ae-a9b5-9bd0d04fba5c" + ], + "x-ms-correlation-request-id": [ + "a04ba2c2-edf9-47ae-a9b5-9bd0d04fba5c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081301Z:a04ba2c2-edf9-47ae-a9b5-9bd0d04fba5c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:13:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk3675/providers/Microsoft.Sql/servers/onesdk8801/databases/onesdk2589?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM2NzUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGs4ODAxL2RhdGFiYXNlcy9vbmVzZGsyNTg5P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"Resource not found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "73495993-ac3e-4a10-b43c-5a08197bafd1" + ], + "x-ms-correlation-request-id": [ + "73495993-ac3e-4a10-b43c-5a08197bafd1" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081253Z:73495993-ac3e-4a10-b43c-5a08197bafd1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:12:53 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk3675/providers/Microsoft.Sql/servers/onesdk8801/databases/onesdk2589?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM2NzUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGs4ODAxL2RhdGFiYXNlcy9vbmVzZGsyNTg5P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk3675/providers/Microsoft.Sql/servers/onesdk8801/databases/onesdk2589\",\r\n \"name\": \"onesdk2589\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"Brazil South\",\r\n \"properties\": {\r\n \"databaseId\": \"4c8bad64-d8ba-4883-8bcb-e2298b580ccf\",\r\n \"edition\": \"Web\",\r\n \"status\": \"Online\",\r\n \"serviceLevelObjective\": \"Shared\",\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": \"1073741824\",\r\n \"creationDate\": \"2014-09-11T08:12:56.167Z\",\r\n \"currentServiceObjectiveId\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\",\r\n \"requestedServiceObjectiveId\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n }\r\n}", + "ResponseHeaders": { + "x-ms-request-id": [ + "0b03bdde-2b0a-4c4b-ae54-6dcbae7869a3" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31933" + ], + "x-ms-correlation-request-id": [ + "0922cbe9-1c0f-4b4c-af70-151abaf0895d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081259Z:0922cbe9-1c0f-4b4c-af70-151abaf0895d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:12:59 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk3675/providers/Microsoft.Sql/servers/onesdk8801/databases/onesdk2589?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM2NzUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGs4ODAxL2RhdGFiYXNlcy9vbmVzZGsyNTg5P2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"Brazil South\",\r\n \"properties\": {\r\n \"edition\": \"Web\",\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk3675/providers/Microsoft.Sql/servers/onesdk8801/databases/onesdk2589\",\r\n \"name\": \"onesdk2589\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"Brazil South\",\r\n \"properties\": {\r\n \"databaseId\": \"4c8bad64-d8ba-4883-8bcb-e2298b580ccf\",\r\n \"edition\": \"Web\",\r\n \"status\": \"Online\",\r\n \"serviceLevelObjective\": \"Shared\",\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": \"1073741824\",\r\n \"creationDate\": \"2014-09-11T08:12:56.167Z\",\r\n \"currentServiceObjectiveId\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\",\r\n \"requestedServiceObjectiveId\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n }\r\n}", + "ResponseHeaders": { + "x-ms-request-id": [ + "a80c1270-783d-42ec-a3be-f1056f94ba08" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "7ba49563-0d3c-4cba-a816-f119a76341f8" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081257Z:7ba49563-0d3c-4cba-a816-f119a76341f8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:12:56 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk3675/providers/Microsoft.Sql/servers/onesdk8801/databases/onesdk2589/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM2NzUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGs4ODAxL2RhdGFiYXNlcy9vbmVzZGsyNTg5L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wZXJtaXNzaW9ucz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31996" + ], + "x-ms-request-id": [ + "e1e6c3da-7756-4812-ad1c-2f5d7d9e012c" + ], + "x-ms-correlation-request-id": [ + "e1e6c3da-7756-4812-ad1c-2f5d7d9e012c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081259Z:e1e6c3da-7756-4812-ad1c-2f5d7d9e012c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:12:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk3675/providers/Microsoft.Sql/servers/onesdk8801/databases/onesdk2589/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM2NzUvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGs4ODAxL2RhdGFiYXNlcy9vbmVzZGsyNTg5L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wZXJtaXNzaW9ucz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31993" + ], + "x-ms-request-id": [ + "15a308bf-222b-406e-9c51-edd209d29644" + ], + "x-ms-correlation-request-id": [ + "15a308bf-222b-406e-9c51-edd209d29644" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081302Z:15a308bf-222b-406e-9c51-edd209d29644" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:13:02 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk3675?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazM2NzU/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk3675\",\r\n \"name\": \"onesdk3675\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31932" + ], + "x-ms-request-id": [ + "c066ba36-9fe8-49a8-bde3-dc49022a51d5" + ], + "x-ms-correlation-request-id": [ + "c066ba36-9fe8-49a8-bde3-dc49022a51d5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081300Z:c066ba36-9fe8-49a8-bde3-dc49022a51d5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:12:59 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-GetResourcesViaPiping": [ + "onesdk3675", + "onesdk8801", + "onesdk2589" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceTests/TestGetResourcesViaPipingFromAnotherResource.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceTests/TestGetResourcesViaPipingFromAnotherResource.json new file mode 100644 index 000000000000..1a3ae4c62500 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.ResourceTests/TestGetResourcesViaPipingFromAnotherResource.json @@ -0,0 +1,948 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.batch\",\r\n \"namespace\": \"microsoft.batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\",\r\n \"2014-03-31-beta\",\r\n \"2014-03-31-alpha\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\",\r\n \"2014-03-31-beta\",\r\n \"2014-03-31-alpha\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.visualstudio\",\r\n \"namespace\": \"microsoft.visualstudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourcecontrols\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Central US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31926" + ], + "x-ms-request-id": [ + "eaba0fe9-d5e8-464d-a265-3fdd8af844bc" + ], + "x-ms-correlation-request-id": [ + "eaba0fe9-d5e8-464d-a265-3fdd8af844bc" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081646Z:eaba0fe9-d5e8-464d-a265-3fdd8af844bc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:16:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Byb3ZpZGVycz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ApiManagement\",\r\n \"namespace\": \"Microsoft.ApiManagement\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"service\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-14\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.batch\",\r\n \"namespace\": \"microsoft.batch\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"batchAccounts\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-05-01-privatepreview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.cache\",\r\n \"namespace\": \"microsoft.cache\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"Redis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"East Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"Redis/metricDefinitions\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.insights\",\r\n \"namespace\": \"microsoft.insights\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"alertrules\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"autoscalesettings\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"components\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\",\r\n \"2014-03-31-beta\",\r\n \"2014-03-31-alpha\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"eventtypes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitionNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metricNamespace\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webtests\",\r\n \"locations\": [\r\n \"\",\r\n \"Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\",\r\n \"2014-04\",\r\n \"2014-03-31-beta\",\r\n \"2014-03-31-alpha\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/microsoft.visualstudio\",\r\n \"namespace\": \"microsoft.visualstudio\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"account\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"account/project\",\r\n \"locations\": [\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-02-26\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"West US\",\r\n \"Southeast Asia\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"1.0\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourcecontrols\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registering\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/successbricks.cleardb\",\r\n \"namespace\": \"successbricks.cleardb\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databases\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.BizTalkServices\",\r\n \"namespace\": \"Microsoft.BizTalkServices\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"BizTalk\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"East Asia\",\r\n \"North Central US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"South Central US\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicCompute\",\r\n \"namespace\": \"Microsoft.ClassicCompute\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"domainNames\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"capabilities\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/diagnosticSettings\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metricDefinitions\",\r\n \"locations\": [\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\",\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"virtualMachines/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicNetwork\",\r\n \"namespace\": \"Microsoft.ClassicNetwork\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"virtualNetworks\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.ClassicStorage\",\r\n \"namespace\": \"Microsoft.ClassicStorage\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"storageAccounts\",\r\n \"locations\": [\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-04-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"quotas\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-06-01\",\r\n \"2014-01-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services\",\r\n \"locations\": [\r\n \"West US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/services/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metricDefinitions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"storageAccounts/metrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.DataFactory\",\r\n \"namespace\": \"Microsoft.DataFactory\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"dataFactories\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-09-01-preview\",\r\n \"2014-08-01-preview\",\r\n \"2014-07-01-preview\",\r\n \"2014-05-01-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.DocumentDB\",\r\n \"namespace\": \"Microsoft.DocumentDB\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"databaseAccounts\",\r\n \"locations\": [\r\n \"East US\",\r\n \"West US\",\r\n \"North Europe\",\r\n \"West Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-08-21\",\r\n \"2014-07-10\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.IntelligentSystems\",\r\n \"namespace\": \"Microsoft.IntelligentSystems\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"accounts\",\r\n \"locations\": [\r\n \"West US\",\r\n \"North Europe\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-28-preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Resources\",\r\n \"namespace\": \"Microsoft.Resources\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"subscriptions\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/providers\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"subscriptions/operationresults\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"resourceGroups\",\r\n \"locations\": [\r\n \"centralus\",\r\n \"eastasia\",\r\n \"southeastasia\",\r\n \"eastus\",\r\n \"westus\",\r\n \"northcentralus\",\r\n \"southcentralus\",\r\n \"northeurope\",\r\n \"westeurope\"\r\n ],\r\n \"apiVersions\": []\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"North Europe\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-07-31-Preview\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.Sql\",\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"North Central US\",\r\n \"North Europe\",\r\n \"South Central US\",\r\n \"Southeast Asia\",\r\n \"West Europe\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/firewallrules\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityPolicies\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databaseSecurityMetrics\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/usages\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": []\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metricDefinitions\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases/metrics\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"West US\",\r\n \"Central US\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Japan East\",\r\n \"Japan West\",\r\n \"Brazil South\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Providers.Test\",\r\n \"namespace\": \"Providers.Test\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"statelessResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"statefulResources/nestedResources\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"Central US\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"West Europe\",\r\n \"North Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"\"\r\n ],\r\n \"apiVersions\": [\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"NotRegistered\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31925" + ], + "x-ms-request-id": [ + "38743b4f-167b-45e4-a32d-3ab1574cf862" + ], + "x-ms-correlation-request-id": [ + "38743b4f-167b-45e4-a32d-3ab1574cf862" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081648Z:38743b4f-167b-45e4-a32d-3ab1574cf862" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:16:47 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk7053?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcwNTM/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31924" + ], + "x-ms-request-id": [ + "e6f5da2e-5c00-40c1-b837-2b6c62f31a67" + ], + "x-ms-correlation-request-id": [ + "e6f5da2e-5c00-40c1-b837-2b6c62f31a67" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081648Z:e6f5da2e-5c00-40c1-b837-2b6c62f31a67" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:16:47 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk7053?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcwNTM/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31922" + ], + "x-ms-request-id": [ + "23c169aa-fb05-4d97-b9b2-b37abc6d2b4a" + ], + "x-ms-correlation-request-id": [ + "23c169aa-fb05-4d97-b9b2-b37abc6d2b4a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081650Z:23c169aa-fb05-4d97-b9b2-b37abc6d2b4a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:16:50 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk7053?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcwNTM/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31919" + ], + "x-ms-request-id": [ + "e3f16f63-14c9-44cd-a449-57f25b9272c1" + ], + "x-ms-correlation-request-id": [ + "e3f16f63-14c9-44cd-a449-57f25b9272c1" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081742Z:e3f16f63-14c9-44cd-a449-57f25b9272c1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:17:42 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk7053?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcwNTM/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk7053\",\r\n \"name\": \"onesdk7053\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1193" + ], + "x-ms-request-id": [ + "00e72564-a40f-47cc-aa19-ca9a73eaef75" + ], + "x-ms-correlation-request-id": [ + "00e72564-a40f-47cc-aa19-ca9a73eaef75" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081648Z:00e72564-a40f-47cc-aa19-ca9a73eaef75" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:16:48 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk7053/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL29uZXNkazcwNTMvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31923" + ], + "x-ms-request-id": [ + "4162c480-e2e5-4ef8-9e98-8dc290484f9c" + ], + "x-ms-correlation-request-id": [ + "4162c480-e2e5-4ef8-9e98-8dc290484f9c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081649Z:4162c480-e2e5-4ef8-9e98-8dc290484f9c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:16:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk7053/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlR3JvdXBzL29uZXNkazcwNTMvcmVzb3VyY2VzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk7053/providers/Microsoft.Sql/servers/onesdk8259\",\r\n \"name\": \"onesdk8259\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"brazilsouth\",\r\n \"tags\": {}\r\n },\r\n {\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk7053/providers/Microsoft.Sql/servers/onesdk8259/databases/onesdk8603\",\r\n \"name\": \"onesdk8259/onesdk8603\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"brazilsouth\",\r\n \"tags\": {}\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31916" + ], + "x-ms-request-id": [ + "30ac5a3a-e3cc-47ed-bb32-1434a2adfe1c" + ], + "x-ms-correlation-request-id": [ + "30ac5a3a-e3cc-47ed-bb32-1434a2adfe1c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081750Z:30ac5a3a-e3cc-47ed-bb32-1434a2adfe1c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:17:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk7053/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcwNTMvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31990" + ], + "x-ms-request-id": [ + "2634ba85-8814-4f26-97ea-a3a06f6de764" + ], + "x-ms-correlation-request-id": [ + "2634ba85-8814-4f26-97ea-a3a06f6de764" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081649Z:2634ba85-8814-4f26-97ea-a3a06f6de764" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:16:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk7053/providers/Microsoft.Sql//servers/onesdk8259?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcwNTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvL3NlcnZlcnMvb25lc2RrODI1OT9hcGktdmVyc2lvbj0yMDE0LTA0LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"Resource not found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "946514a5-1f2f-4adc-9e5e-d51d11a4ce37" + ], + "x-ms-correlation-request-id": [ + "946514a5-1f2f-4adc-9e5e-d51d11a4ce37" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081650Z:946514a5-1f2f-4adc-9e5e-d51d11a4ce37" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:16:50 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk7053/providers/Microsoft.Sql//servers/onesdk8259?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcwNTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvL3NlcnZlcnMvb25lc2RrODI1OT9hcGktdmVyc2lvbj0yMDE0LTA0LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk7053/providers/Microsoft.Sql/servers/onesdk8259\",\r\n \"name\": \"onesdk8259\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"Brazil South\",\r\n \"properties\": {\r\n \"fullyQualifiedDomainName\": \"onesdk8259.database.windows.net\",\r\n \"administratorLogin\": \"adminuser\",\r\n \"administratorLoginPassword\": null,\r\n \"version\": \"2.0\"\r\n }\r\n}", + "ResponseHeaders": { + "x-ms-request-id": [ + "44b5c9e0-3fb9-44dd-87a5-a5368a1bffd9" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31920" + ], + "x-ms-correlation-request-id": [ + "affb5c10-1249-46b7-92c0-eed548df17a4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081742Z:affb5c10-1249-46b7-92c0-eed548df17a4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:17:41 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk7053/providers/Microsoft.Sql//servers/onesdk8259?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcwNTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvL3NlcnZlcnMvb25lc2RrODI1OT9hcGktdmVyc2lvbj0yMDE0LTA0LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk7053/providers/Microsoft.Sql/servers/onesdk8259\",\r\n \"name\": \"onesdk8259\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"Brazil South\",\r\n \"properties\": {\r\n \"fullyQualifiedDomainName\": \"onesdk8259.database.windows.net\",\r\n \"administratorLogin\": \"adminuser\",\r\n \"administratorLoginPassword\": null,\r\n \"version\": \"2.0\"\r\n }\r\n}", + "ResponseHeaders": { + "x-ms-request-id": [ + "909b0ab8-35ba-4a2b-bcf3-9c4ed517789d" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31915" + ], + "x-ms-correlation-request-id": [ + "7fe9665e-932d-489f-a2f9-fb21d40d02d3" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081751Z:7fe9665e-932d-489f-a2f9-fb21d40d02d3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:17:51 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk7053/providers/Microsoft.Sql//servers/onesdk8259?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcwNTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvL3NlcnZlcnMvb25lc2RrODI1OT9hcGktdmVyc2lvbj0yMDE0LTA0LTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"Brazil South\",\r\n \"properties\": {\r\n \"administratorLoginPassword\": \"P@ssword1\",\r\n \"administratorLogin\": \"adminuser\"\r\n },\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk7053/providers/Microsoft.Sql/servers/onesdk8259\",\r\n \"name\": \"onesdk8259\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"Brazil South\",\r\n \"properties\": {\r\n \"fullyQualifiedDomainName\": \"onesdk8259.database.windows.net\",\r\n \"administratorLogin\": \"adminuser\",\r\n \"administratorLoginPassword\": \"P@ssword1\",\r\n \"version\": \"2.0\"\r\n }\r\n}", + "ResponseHeaders": { + "x-ms-request-id": [ + "57b2d559-9f8a-4a42-9b4e-25019cdd17f5" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1192" + ], + "x-ms-correlation-request-id": [ + "37d77ec6-d15f-4336-b5da-d55a6147c733" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081741Z:37d77ec6-d15f-4336-b5da-d55a6147c733" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:17:41 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk7053/providers/Microsoft.Sql//servers/onesdk8259/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcwNTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvL3NlcnZlcnMvb25lc2RrODI1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31989" + ], + "x-ms-request-id": [ + "cb8b5060-d635-4026-815c-8f4e7715ceba" + ], + "x-ms-correlation-request-id": [ + "cb8b5060-d635-4026-815c-8f4e7715ceba" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081742Z:cb8b5060-d635-4026-815c-8f4e7715ceba" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:17:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk7053/providers/Microsoft.Sql//servers/onesdk8259/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcwNTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvL3NlcnZlcnMvb25lc2RrODI1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31987" + ], + "x-ms-request-id": [ + "68c5f5b0-b161-441a-b6de-76e4f67ccedc" + ], + "x-ms-correlation-request-id": [ + "68c5f5b0-b161-441a-b6de-76e4f67ccedc" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081750Z:68c5f5b0-b161-441a-b6de-76e4f67ccedc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:17:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk7053/providers/Microsoft.Sql//servers/onesdk8259/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcwNTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvL3NlcnZlcnMvb25lc2RrODI1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31985" + ], + "x-ms-request-id": [ + "ddca468c-e6f3-4269-becd-56bbde0d7a9a" + ], + "x-ms-correlation-request-id": [ + "ddca468c-e6f3-4269-becd-56bbde0d7a9a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081752Z:ddca468c-e6f3-4269-becd-56bbde0d7a9a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:17:52 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk7053/providers/Microsoft.Sql/servers/onesdk8259/databases/onesdk8603?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcwNTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGs4MjU5L2RhdGFiYXNlcy9vbmVzZGs4NjAzP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"Resource not found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "af890f42-f1a6-4744-a5b5-71e58fcb3b47" + ], + "x-ms-correlation-request-id": [ + "af890f42-f1a6-4744-a5b5-71e58fcb3b47" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081743Z:af890f42-f1a6-4744-a5b5-71e58fcb3b47" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:17:42 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk7053/providers/Microsoft.Sql/servers/onesdk8259/databases/onesdk8603?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcwNTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGs4MjU5L2RhdGFiYXNlcy9vbmVzZGs4NjAzP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk7053/providers/Microsoft.Sql/servers/onesdk8259/databases/onesdk8603\",\r\n \"name\": \"onesdk8603\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"Brazil South\",\r\n \"properties\": {\r\n \"databaseId\": \"da152c4b-9c91-4013-aaa2-15ac799a583b\",\r\n \"edition\": \"Web\",\r\n \"status\": \"Online\",\r\n \"serviceLevelObjective\": \"Shared\",\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": \"1073741824\",\r\n \"creationDate\": \"2014-09-11T08:17:45.717Z\",\r\n \"currentServiceObjectiveId\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\",\r\n \"requestedServiceObjectiveId\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n }\r\n}", + "ResponseHeaders": { + "x-ms-request-id": [ + "a3835334-ed5f-4ba4-8c31-ced0294d273e" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31917" + ], + "x-ms-correlation-request-id": [ + "fc3fc8f4-baea-49be-9ff2-68512816645e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081748Z:fc3fc8f4-baea-49be-9ff2-68512816645e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:17:47 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk7053/providers/Microsoft.Sql/servers/onesdk8259/databases/onesdk8603?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcwNTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGs4MjU5L2RhdGFiYXNlcy9vbmVzZGs4NjAzP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk7053/providers/Microsoft.Sql/servers/onesdk8259/databases/onesdk8603\",\r\n \"name\": \"onesdk8603\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"Brazil South\",\r\n \"properties\": {\r\n \"databaseId\": \"da152c4b-9c91-4013-aaa2-15ac799a583b\",\r\n \"edition\": \"Web\",\r\n \"status\": \"Online\",\r\n \"serviceLevelObjective\": \"Shared\",\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": \"1073741824\",\r\n \"creationDate\": \"2014-09-11T08:17:45.717Z\",\r\n \"currentServiceObjectiveId\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\",\r\n \"requestedServiceObjectiveId\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n }\r\n}", + "ResponseHeaders": { + "x-ms-request-id": [ + "8076d553-35bb-4039-9088-4b2ed0a5f0a5" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31914" + ], + "x-ms-correlation-request-id": [ + "99ebbbc8-ba24-4353-883c-5ff4fbde2e97" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081754Z:99ebbbc8-ba24-4353-883c-5ff4fbde2e97" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:17:53 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk7053/providers/Microsoft.Sql/servers/onesdk8259/databases/onesdk8603?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcwNTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGs4MjU5L2RhdGFiYXNlcy9vbmVzZGs4NjAzP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"Brazil South\",\r\n \"properties\": {\r\n \"edition\": \"Web\",\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"tags\": {},\r\n \"id\": \"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/onesdk7053/providers/Microsoft.Sql/servers/onesdk8259/databases/onesdk8603\",\r\n \"name\": \"onesdk8603\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"Brazil South\",\r\n \"properties\": {\r\n \"databaseId\": \"da152c4b-9c91-4013-aaa2-15ac799a583b\",\r\n \"edition\": \"Web\",\r\n \"status\": \"Online\",\r\n \"serviceLevelObjective\": \"Shared\",\r\n \"collation\": \"SQL_Latin1_General_CP1_CI_AS\",\r\n \"maxSizeBytes\": \"1073741824\",\r\n \"creationDate\": \"2014-09-11T08:17:45.717Z\",\r\n \"currentServiceObjectiveId\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\",\r\n \"requestedServiceObjectiveId\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n }\r\n}", + "ResponseHeaders": { + "x-ms-request-id": [ + "95db6c92-8b27-48e4-ba83-4a3dd2daff28" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1191" + ], + "x-ms-correlation-request-id": [ + "af0e97e0-3e07-4a9a-9088-660441bd6efd" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081747Z:af0e97e0-3e07-4a9a-9088-660441bd6efd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:17:46 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk7053/providers/Microsoft.Sql/servers/onesdk8259/databases/onesdk8603/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcwNTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGs4MjU5L2RhdGFiYXNlcy9vbmVzZGs4NjAzL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wZXJtaXNzaW9ucz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31988" + ], + "x-ms-request-id": [ + "5def5d7b-2d95-4294-a36c-0dd34912d870" + ], + "x-ms-correlation-request-id": [ + "5def5d7b-2d95-4294-a36c-0dd34912d870" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081749Z:5def5d7b-2d95-4294-a36c-0dd34912d870" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:17:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk7053/providers/Microsoft.Sql/servers/onesdk8259/databases/onesdk8603/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcwNTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGs4MjU5L2RhdGFiYXNlcy9vbmVzZGs4NjAzL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wZXJtaXNzaW9ucz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31986" + ], + "x-ms-request-id": [ + "ac1df56c-8d3b-4519-9149-26f655724240" + ], + "x-ms-correlation-request-id": [ + "ac1df56c-8d3b-4519-9149-26f655724240" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081750Z:ac1df56c-8d3b-4519-9149-26f655724240" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:17:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/onesdk7053/providers/Microsoft.Sql/servers/onesdk8259/databases/onesdk8603/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGIxYWI2ZjAtNDc2OS00YjI3LTkzMGUtMDFlMmVmOWMxMjNjL3Jlc291cmNlZ3JvdXBzL29uZXNkazcwNTMvcHJvdmlkZXJzL01pY3Jvc29mdC5TcWwvc2VydmVycy9vbmVzZGs4MjU5L2RhdGFiYXNlcy9vbmVzZGs4NjAzL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wZXJtaXNzaW9ucz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31984" + ], + "x-ms-request-id": [ + "46bdce9d-ba75-4f48-abaf-4217bde443df" + ], + "x-ms-correlation-request-id": [ + "46bdce9d-ba75-4f48-abaf-4217bde443df" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140911T081755Z:46bdce9d-ba75-4f48-abaf-4217bde443df" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 11 Sep 2014 08:17:54 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-GetResourcesViaPipingFromAnotherResource": [ + "onesdk7053", + "onesdk8259", + "onesdk8603" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaByResource.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaByResource.json new file mode 100644 index 000000000000..e65ba421d4b3 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaByResource.json @@ -0,0 +1,1561 @@ +{ + "Entries": [ + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/groups?&api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9ncm91cHM/JmFwaS12ZXJzaW9uPTEuNDItcHJldmlld0ludGVybmFs", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.Group\",\r\n \"value\": [\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.Group\",\r\n \"objectType\": \"Group\",\r\n \"objectId\": \"1ddba6df-e959-456b-8f02-50252ece007f\",\r\n \"softDeletionTimestamp\": null,\r\n \"appMetadata\": null,\r\n \"exchangeResources\": [],\r\n \"description\": \"group of admins\",\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"admingroup\",\r\n \"groupType\": null,\r\n \"isPublic\": null,\r\n \"lastDirSyncTime\": null,\r\n \"licenseAssignment\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"481689dd-0a1c-44d0-a848-a02e7d591a3a\",\r\n \"mailEnabled\": false,\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"securityEnabled\": true,\r\n \"sharepointResources\": []\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.Group\",\r\n \"objectType\": \"Group\",\r\n \"objectId\": \"2ff5c0e4-40cf-48b6-be7e-174615c4956d\",\r\n \"softDeletionTimestamp\": null,\r\n \"appMetadata\": null,\r\n \"exchangeResources\": [],\r\n \"description\": \"2nd group of readers\",\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"readergroup2\",\r\n \"groupType\": null,\r\n \"isPublic\": null,\r\n \"lastDirSyncTime\": null,\r\n \"licenseAssignment\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"46f915be-2f40-4908-8c6b-9a0232567640\",\r\n \"mailEnabled\": false,\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"securityEnabled\": true,\r\n \"sharepointResources\": []\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.Group\",\r\n \"objectType\": \"Group\",\r\n \"objectId\": \"8fd46a09-454e-41f1-b70f-f28331b12a31\",\r\n \"softDeletionTimestamp\": null,\r\n \"appMetadata\": null,\r\n \"exchangeResources\": [],\r\n \"description\": \"an empty group\",\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"emptygroup\",\r\n \"groupType\": null,\r\n \"isPublic\": null,\r\n \"lastDirSyncTime\": null,\r\n \"licenseAssignment\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"9764488b-bdf2-4169-8045-916fc8083f3d\",\r\n \"mailEnabled\": false,\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"securityEnabled\": true,\r\n \"sharepointResources\": []\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.Group\",\r\n \"objectType\": \"Group\",\r\n \"objectId\": \"d5fbb343-cf1d-47bb-9aa8-5c3dd57b336f\",\r\n \"softDeletionTimestamp\": null,\r\n \"appMetadata\": null,\r\n \"exchangeResources\": [],\r\n \"description\": \"group of owners\",\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"ownergroup\",\r\n \"groupType\": null,\r\n \"isPublic\": null,\r\n \"lastDirSyncTime\": null,\r\n \"licenseAssignment\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"d9dc3124-a996-44d6-9049-3f379194fd1c\",\r\n \"mailEnabled\": false,\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"securityEnabled\": true,\r\n \"sharepointResources\": []\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.Group\",\r\n \"objectType\": \"Group\",\r\n \"objectId\": \"fb7d9586-9377-43c8-95c0-22f1f067915f\",\r\n \"softDeletionTimestamp\": null,\r\n \"appMetadata\": null,\r\n \"exchangeResources\": [],\r\n \"description\": \"group of readers\",\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"readergroup\",\r\n \"groupType\": null,\r\n \"isPublic\": null,\r\n \"lastDirSyncTime\": null,\r\n \"licenseAssignment\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"c7a16934-b86a-43a2-8d96-7c6a8949b206\",\r\n \"mailEnabled\": false,\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"securityEnabled\": true,\r\n \"sharepointResources\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "5TnuYhUaV09bxMxpRfIwQrijH1KPxlCtfSFarwsJz+g=" + ], + "request-id": [ + "4e39792c-9263-4e51-ab7b-58a21ec87566" + ], + "client-request-id": [ + "c48d3a86-84c5-41de-995a-d6628de7bc0e" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "Izt6DXBwvL_zKi8izWa7W7KhhdUD-S3mBdB0URB-_pfLwcO2hzoSiLegrG-I9s4BRAPGF3IMDTXZYqIkybeMub2gZYrSsB3oeo92JEYdVw8._WgFkFGZ8-vgA-toErMdnGVOuRTrzTHasWLx3u_xtLw" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourcegroups?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Jlc291cmNlZ3JvdXBzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1\",\r\n \"name\": \"contrib1\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/owner1\",\r\n \"name\": \"owner1\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/reader1\",\r\n \"name\": \"reader1\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/testg1\",\r\n \"name\": \"testg1\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31939" + ], + "x-ms-request-id": [ + "1197b599-380e-4640-abe9-23804723ea29" + ], + "x-ms-correlation-request-id": [ + "1197b599-380e-4640-abe9-23804723ea29" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015111Z:1197b599-380e-4640-abe9-23804723ea29" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourcegroups?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Jlc291cmNlZ3JvdXBzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1\",\r\n \"name\": \"contrib1\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/owner1\",\r\n \"name\": \"owner1\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/reader1\",\r\n \"name\": \"reader1\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/testg1\",\r\n \"name\": \"testg1\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31938" + ], + "x-ms-request-id": [ + "040cb9d1-dde1-42ce-90d4-aead73e5c244" + ], + "x-ms-correlation-request-id": [ + "040cb9d1-dde1-42ce-90d4-aead73e5c244" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015111Z:040cb9d1-dde1-42ce-90d4-aead73e5c244" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Jlc291cmNlR3JvdXBzL2NvbnRyaWIxL3Jlc291cmNlcz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/microsoft.insights/alertrules/CPUHigh default01\",\r\n \"name\": \"CPUHigh default01\",\r\n \"type\": \"microsoft.insights/alertrules\",\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/Microsoft.Web/serverfarms/default01\": \"Resource\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/microsoft.insights/alertrules/ForbiddenRequests wscontrib002\",\r\n \"name\": \"ForbiddenRequests wscontrib002\",\r\n \"type\": \"microsoft.insights/alertrules\",\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/Microsoft.Web/sites/wscontrib002\": \"Resource\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/microsoft.insights/alertrules/ServerErrors wscontrib002\",\r\n \"name\": \"ServerErrors wscontrib002\",\r\n \"type\": \"microsoft.insights/alertrules\",\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/Microsoft.Web/sites/wscontrib002\": \"Resource\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/microsoft.insights/autoscalesettings/default01-contrib1\",\r\n \"name\": \"default01-contrib1\",\r\n \"type\": \"microsoft.insights/autoscalesettings\",\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/Microsoft.Web/serverfarms/default01\": \"Resource\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/microsoft.insights/components/wscontrib002\",\r\n \"name\": \"wscontrib002\",\r\n \"type\": \"microsoft.insights/components\",\r\n \"location\": \"centralus\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/Microsoft.Web/sites/wscontrib002\": \"Resource\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/Microsoft.Web/serverFarms/default01\",\r\n \"name\": \"default01\",\r\n \"type\": \"Microsoft.Web/serverFarms\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/Microsoft.Web/sites/wscontrib002\",\r\n \"name\": \"wscontrib002\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/Microsoft.Web/serverfarms/default01\": \"Resource\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31937" + ], + "x-ms-request-id": [ + "b1fa901f-c28e-4ccd-bd52-ef040e238ba5" + ], + "x-ms-correlation-request-id": [ + "b1fa901f-c28e-4ccd-bd52-ef040e238ba5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015111Z:b1fa901f-c28e-4ccd-bd52-ef040e238ba5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:11 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourcegroups/contrib1/providers/microsoft.insights//alertrules/CPUHigh%20default01/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Jlc291cmNlZ3JvdXBzL2NvbnRyaWIxL3Byb3ZpZGVycy9taWNyb3NvZnQuaW5zaWdodHMvL2FsZXJ0cnVsZXMvQ1BVSGlnaCUyMGRlZmF1bHQwMS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31902" + ], + "x-ms-request-id": [ + "18d2ad3e-1a23-4545-967f-e806126033dd" + ], + "x-ms-correlation-request-id": [ + "18d2ad3e-1a23-4545-967f-e806126033dd" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015111Z:18d2ad3e-1a23-4545-967f-e806126033dd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:11 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourcegroups/contrib1/providers/microsoft.insights//alertrules/ForbiddenRequests%20wscontrib002/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Jlc291cmNlZ3JvdXBzL2NvbnRyaWIxL3Byb3ZpZGVycy9taWNyb3NvZnQuaW5zaWdodHMvL2FsZXJ0cnVsZXMvRm9yYmlkZGVuUmVxdWVzdHMlMjB3c2NvbnRyaWIwMDIvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31901" + ], + "x-ms-request-id": [ + "0eb4abee-6f23-40f1-83b6-82732e73a448" + ], + "x-ms-correlation-request-id": [ + "0eb4abee-6f23-40f1-83b6-82732e73a448" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015111Z:0eb4abee-6f23-40f1-83b6-82732e73a448" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:11 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourcegroups/contrib1/providers/microsoft.insights//alertrules/ServerErrors%20wscontrib002/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Jlc291cmNlZ3JvdXBzL2NvbnRyaWIxL3Byb3ZpZGVycy9taWNyb3NvZnQuaW5zaWdodHMvL2FsZXJ0cnVsZXMvU2VydmVyRXJyb3JzJTIwd3Njb250cmliMDAyL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wZXJtaXNzaW9ucz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31900" + ], + "x-ms-request-id": [ + "9361dfd3-233f-447f-97fe-2a2f7cf2861f" + ], + "x-ms-correlation-request-id": [ + "9361dfd3-233f-447f-97fe-2a2f7cf2861f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015111Z:9361dfd3-233f-447f-97fe-2a2f7cf2861f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:11 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourcegroups/contrib1/providers/microsoft.insights//autoscalesettings/default01-contrib1/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Jlc291cmNlZ3JvdXBzL2NvbnRyaWIxL3Byb3ZpZGVycy9taWNyb3NvZnQuaW5zaWdodHMvL2F1dG9zY2FsZXNldHRpbmdzL2RlZmF1bHQwMS1jb250cmliMS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31899" + ], + "x-ms-request-id": [ + "6d572757-a89e-4dab-a50d-2568b3816fca" + ], + "x-ms-correlation-request-id": [ + "6d572757-a89e-4dab-a50d-2568b3816fca" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015111Z:6d572757-a89e-4dab-a50d-2568b3816fca" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:11 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourcegroups/contrib1/providers/microsoft.insights//components/wscontrib002/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Jlc291cmNlZ3JvdXBzL2NvbnRyaWIxL3Byb3ZpZGVycy9taWNyb3NvZnQuaW5zaWdodHMvL2NvbXBvbmVudHMvd3Njb250cmliMDAyL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wZXJtaXNzaW9ucz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31898" + ], + "x-ms-request-id": [ + "d2a8218d-e829-4813-9af9-546d2a89e91e" + ], + "x-ms-correlation-request-id": [ + "d2a8218d-e829-4813-9af9-546d2a89e91e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015111Z:d2a8218d-e829-4813-9af9-546d2a89e91e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:11 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourcegroups/contrib1/providers/Microsoft.Web//serverFarms/default01/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Jlc291cmNlZ3JvdXBzL2NvbnRyaWIxL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViLy9zZXJ2ZXJGYXJtcy9kZWZhdWx0MDEvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31897" + ], + "x-ms-request-id": [ + "b151b4ff-503f-45cc-93a4-7036e135689c" + ], + "x-ms-correlation-request-id": [ + "b151b4ff-503f-45cc-93a4-7036e135689c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015111Z:b151b4ff-503f-45cc-93a4-7036e135689c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:11 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourcegroups/contrib1/providers/Microsoft.Web//sites/wscontrib002/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Jlc291cmNlZ3JvdXBzL2NvbnRyaWIxL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViLy9zaXRlcy93c2NvbnRyaWIwMDIvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3Blcm1pc3Npb25zP2FwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31896" + ], + "x-ms-request-id": [ + "73a0475d-4afb-4716-bbe6-a17a778910cb" + ], + "x-ms-correlation-request-id": [ + "73a0475d-4afb-4716-bbe6-a17a778910cb" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015111Z:73a0475d-4afb-4716-bbe6-a17a778910cb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:11 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9yb2xlRGVmaW5pdGlvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"roleName\": \"Contributor\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Contributors can manage everything except access.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": [\r\n \"Microsoft.Authorization/*/Write\",\r\n \"Microsoft.Authorization/*/Delete\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n },\r\n {\r\n \"properties\": {\r\n \"roleName\": \"Owner\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Owners can manage everything, including access.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"8e3af657-a8ff-443c-a75c-2fe8c4bcb635\"\r\n },\r\n {\r\n \"properties\": {\r\n \"roleName\": \"Reader\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Readers can view everything, but can't make changes.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*/read\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"acdd72a7-3385-48ef-bd42-f606fba81ae7\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:992e3388-57fb-45bf-9906-e2b474da3eb4" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31895" + ], + "x-ms-correlation-request-id": [ + "dd9fe193-c96a-4e3b-a7e5-d823db5da62d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015111Z:dd9fe193-c96a-4e3b-a7e5-d823db5da62d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:11 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/Microsoft.Web/sites/wscontrib002/providers/Microsoft.Authorization/roleAssignments/78d6502f-74fc-4800-bb0a-0e1a7bebeca4?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9yZXNvdXJjZUdyb3Vwcy9jb250cmliMS9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy93c2NvbnRyaWIwMDIvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3JvbGVBc3NpZ25tZW50cy83OGQ2NTAyZi03NGZjLTQ4MDAtYmIwYS0wZTFhN2JlYmVjYTQ/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635\",\r\n \"principalId\": \"fb7d9586-9377-43c8-95c0-22f1f067915f\"\r\n }\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635\",\r\n \"principalId\": \"fb7d9586-9377-43c8-95c0-22f1f067915f\",\r\n \"scope\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/Microsoft.Web/sites/wscontrib002\"\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/Microsoft.Web/sites/wscontrib002/providers/Microsoft.Authorization/roleAssignments/78d6502f-74fc-4800-bb0a-0e1a7bebeca4\",\r\n \"type\": \"Microsoft.Authorization/roleAssignments\",\r\n \"name\": \"78d6502f-74fc-4800-bb0a-0e1a7bebeca4\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "westus:fe3d2c94-a7bb-4cb2-99bc-7c024bd204e0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1183" + ], + "x-ms-correlation-request-id": [ + "b1ead3b3-da5a-42d6-a2ac-85e99747b9f9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015113Z:b1ead3b3-da5a-42d6-a2ac-85e99747b9f9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:13 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/Microsoft.Web/sites/wscontrib002/providers/Microsoft.Authorization/roleAssignments/78d6502f-74fc-4800-bb0a-0e1a7bebeca4?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9yZXNvdXJjZUdyb3Vwcy9jb250cmliMS9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy93c2NvbnRyaWIwMDIvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3JvbGVBc3NpZ25tZW50cy83OGQ2NTAyZi03NGZjLTQ4MDAtYmIwYS0wZTFhN2JlYmVjYTQ/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635\",\r\n \"principalId\": \"fb7d9586-9377-43c8-95c0-22f1f067915f\",\r\n \"scope\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/Microsoft.Web/sites/wscontrib002\"\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/Microsoft.Web/sites/wscontrib002/providers/Microsoft.Authorization/roleAssignments/78d6502f-74fc-4800-bb0a-0e1a7bebeca4\",\r\n \"type\": \"Microsoft.Authorization/roleAssignments\",\r\n \"name\": \"78d6502f-74fc-4800-bb0a-0e1a7bebeca4\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:59379dd3-de6b-4666-82f0-3eb9f411d623" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31894" + ], + "x-ms-correlation-request-id": [ + "1330c702-1a5f-4223-a157-76f013c17626" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015113Z:1330c702-1a5f-4223-a157-76f013c17626" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZURlZmluaXRpb25zLzhlM2FmNjU3LWE4ZmYtNDQzYy1hNzVjLTJmZThjNGJjYjYzNT9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleName\": \"Owner\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Owners can manage everything, including access.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"8e3af657-a8ff-443c-a75c-2fe8c4bcb635\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:4be65cfd-b6b4-47ec-8eb4-aa6c39f32336" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31893" + ], + "x-ms-correlation-request-id": [ + "3cfd0994-7164-4ccf-869c-6158629c1c8c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015113Z:3cfd0994-7164-4ccf-869c-6158629c1c8c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZURlZmluaXRpb25zLzhlM2FmNjU3LWE4ZmYtNDQzYy1hNzVjLTJmZThjNGJjYjYzNT9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleName\": \"Owner\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Owners can manage everything, including access.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"8e3af657-a8ff-443c-a75c-2fe8c4bcb635\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:5ddf3188-5bab-4e34-a5c5-573a4db4687b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31890" + ], + "x-ms-correlation-request-id": [ + "d75d5910-9343-4dc5-bc12-d52ac094a527" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015114Z:d75d5910-9343-4dc5-bc12-d52ac094a527" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:14 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/fb7d9586-9377-43c8-95c0-22f1f067915f?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy9mYjdkOTU4Ni05Mzc3LTQzYzgtOTVjMC0yMmYxZjA2NzkxNWY/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.error\": {\r\n \"code\": \"Request_ResourceNotFound\",\r\n \"message\": {\r\n \"lang\": \"en\",\r\n \"value\": \"Resource 'fb7d9586-9377-43c8-95c0-22f1f067915f' does not exist or one of its queried reference-property objects are not present.\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "ocp-aad-diagnostics-server-name": [ + "5TnuYhUaV09bxMxpRfIwQrijH1KPxlCtfSFarwsJz+g=" + ], + "request-id": [ + "9dec184f-822e-4a36-bb68-9ea177589a4f" + ], + "client-request-id": [ + "4c8ff897-ec1c-422f-9f5d-c0305588bb7a" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "RzjQ3nAthrri0Lj9RTGpggwYxlRoCCzmhEBfU0wcEbhy1OQpy1xsF4LxrLQe9CJ1SazuHQ055A5soTISHKAVGainsbUx8C6U8lfgeU0jY8A.hHBXGnpJjG-8ubDu822eiDcOxDYmkEgrnS8tA3Blptc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "private" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:13 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/fb7d9586-9377-43c8-95c0-22f1f067915f?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy9mYjdkOTU4Ni05Mzc3LTQzYzgtOTVjMC0yMmYxZjA2NzkxNWY/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.error\": {\r\n \"code\": \"Request_ResourceNotFound\",\r\n \"message\": {\r\n \"lang\": \"en\",\r\n \"value\": \"Resource 'fb7d9586-9377-43c8-95c0-22f1f067915f' does not exist or one of its queried reference-property objects are not present.\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "ocp-aad-diagnostics-server-name": [ + "5TnuYhUaV09bxMxpRfIwQrijH1KPxlCtfSFarwsJz+g=" + ], + "request-id": [ + "f76f1676-5a04-4844-bf60-495e5ef6d75d" + ], + "client-request-id": [ + "406be2fe-53da-4a05-9cf7-225953ee0708" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "8Q6GwaJpWW6lbBXq61aiPMw4Agwq3Y17isWAhkcDafcxx4sKfEp6KROpr5niO1gjhy_oSJvRscIVhhssm0Ks40N3lpl3rTRRt-Byx1rsipk.GJ-GiysFx-2j_UNdmuRVQn-uyjPlDHQ13_9Jr4PCOS4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "private" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:13 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/fb7d9586-9377-43c8-95c0-22f1f067915f?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy9mYjdkOTU4Ni05Mzc3LTQzYzgtOTVjMC0yMmYxZjA2NzkxNWY/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.error\": {\r\n \"code\": \"Request_ResourceNotFound\",\r\n \"message\": {\r\n \"lang\": \"en\",\r\n \"value\": \"Resource 'fb7d9586-9377-43c8-95c0-22f1f067915f' does not exist or one of its queried reference-property objects are not present.\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "ocp-aad-diagnostics-server-name": [ + "5TnuYhUaV09bxMxpRfIwQrijH1KPxlCtfSFarwsJz+g=" + ], + "request-id": [ + "b90c294c-b933-41a8-8c5a-64d2ddc0f659" + ], + "client-request-id": [ + "9282b293-448c-4abc-8fa7-c9d35c7dde37" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "EwkXFcj0V_Pz21tYUjeA9xl_vHTVQ89Zlji_o6KrJ_-JtGTqDZ-hkAWhhmYodL-Hcm2X5DoxZWu7hDcDksnBxSC6K_I37P8lJj1XzPJeYTA.Gl1cFeNtQhirewsd6uDPQBu71shYKbIEMPq-bIXOFpc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "private" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:14 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/fb7d9586-9377-43c8-95c0-22f1f067915f?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy9mYjdkOTU4Ni05Mzc3LTQzYzgtOTVjMC0yMmYxZjA2NzkxNWY/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.error\": {\r\n \"code\": \"Request_ResourceNotFound\",\r\n \"message\": {\r\n \"lang\": \"en\",\r\n \"value\": \"Resource 'fb7d9586-9377-43c8-95c0-22f1f067915f' does not exist or one of its queried reference-property objects are not present.\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "ocp-aad-diagnostics-server-name": [ + "5TnuYhUaV09bxMxpRfIwQrijH1KPxlCtfSFarwsJz+g=" + ], + "request-id": [ + "56941af9-30b8-4791-b35b-7cd8d149786f" + ], + "client-request-id": [ + "229c673a-8330-4611-ab5d-b217c52783b7" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "EddsNbx3P1g8fYRzTnRyGK01G9uHQ3GQSYhFiDMo54_sG6Yw5Vv3RsjpLbjDAaj-hclVpju-Glx3jnPxDQLs4Qe2qlL8DtQTR35QoMO51C0.MykDGH4UinoxYuxLzvVnrgqO12dBVNJIuq6Lw4_AuzM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "private" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:16 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/servicePrincipals/fb7d9586-9377-43c8-95c0-22f1f067915f?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9zZXJ2aWNlUHJpbmNpcGFscy9mYjdkOTU4Ni05Mzc3LTQzYzgtOTVjMC0yMmYxZjA2NzkxNWY/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.error\": {\r\n \"code\": \"Request_ResourceNotFound\",\r\n \"message\": {\r\n \"lang\": \"en\",\r\n \"value\": \"Resource 'fb7d9586-9377-43c8-95c0-22f1f067915f' does not exist or one of its queried reference-property objects are not present.\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "ocp-aad-diagnostics-server-name": [ + "5TnuYhUaV09bxMxpRfIwQrijH1KPxlCtfSFarwsJz+g=" + ], + "request-id": [ + "61e3ab4a-102c-42aa-9b9d-3813108f10a4" + ], + "client-request-id": [ + "49601815-bf9b-4d6a-88ba-1f1e9e43f707" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "T9yLMbZwnu-brO4lvlOTyjguM-A_0ZA819hOZQLIviVYqj0_-kxXA7W1XLjoC2qR7nKXG_dE7ORqbinL1p8BVzO-OTL7yPdVjfRlpOK4egk.D4T0e7IWMi1yTbGu0gO0aYH4_F-pXPUUU88KO73Xi7c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "private" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:13 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/servicePrincipals/fb7d9586-9377-43c8-95c0-22f1f067915f?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9zZXJ2aWNlUHJpbmNpcGFscy9mYjdkOTU4Ni05Mzc3LTQzYzgtOTVjMC0yMmYxZjA2NzkxNWY/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.error\": {\r\n \"code\": \"Request_ResourceNotFound\",\r\n \"message\": {\r\n \"lang\": \"en\",\r\n \"value\": \"Resource 'fb7d9586-9377-43c8-95c0-22f1f067915f' does not exist or one of its queried reference-property objects are not present.\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "ocp-aad-diagnostics-server-name": [ + "5TnuYhUaV09bxMxpRfIwQrijH1KPxlCtfSFarwsJz+g=" + ], + "request-id": [ + "ee2be43d-62b6-477b-b96a-09c5e9c826bb" + ], + "client-request-id": [ + "28f67a9b-4470-4234-b872-04b26ad05f58" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "jSHf2PsbEhOVh6MCaxZqAguAD_A2_-bbhDtah9iEWWq_-kGV4ArR9iTaQxaDhGB2gIHFuLF0rxJNMbPhfx098qcDIQqoc3NalS4bTDLH0LA.2kQ6ARmjmpgVpiJUtYB2JnLAVnw7IKkwm5T2AlzuEhQ" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "private" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:13 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/servicePrincipals/fb7d9586-9377-43c8-95c0-22f1f067915f?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9zZXJ2aWNlUHJpbmNpcGFscy9mYjdkOTU4Ni05Mzc3LTQzYzgtOTVjMC0yMmYxZjA2NzkxNWY/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.error\": {\r\n \"code\": \"Request_ResourceNotFound\",\r\n \"message\": {\r\n \"lang\": \"en\",\r\n \"value\": \"Resource 'fb7d9586-9377-43c8-95c0-22f1f067915f' does not exist or one of its queried reference-property objects are not present.\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "ocp-aad-diagnostics-server-name": [ + "5TnuYhUaV09bxMxpRfIwQrijH1KPxlCtfSFarwsJz+g=" + ], + "request-id": [ + "2876df1e-3b02-4ac9-a503-c7ce13592763" + ], + "client-request-id": [ + "cfa5926a-a7df-48e9-ae30-7f0357e7628b" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "Yzcq3IbRkCxWRtP3v3xgLtYtMgoVrRC-Lj-MRk6x5fQ5XYOxqMDsh5tT2Xdm8nNdwRtxloxzc5HqpsM8M9VyRX8GmFA0m8q1JJ7KHWSTDO0.9o0eapWwNJ9nLjgksQvdgNCBYyk3i4q3JHhh73cyx3U" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "private" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:14 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/servicePrincipals/fb7d9586-9377-43c8-95c0-22f1f067915f?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9zZXJ2aWNlUHJpbmNpcGFscy9mYjdkOTU4Ni05Mzc3LTQzYzgtOTVjMC0yMmYxZjA2NzkxNWY/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.error\": {\r\n \"code\": \"Request_ResourceNotFound\",\r\n \"message\": {\r\n \"lang\": \"en\",\r\n \"value\": \"Resource 'fb7d9586-9377-43c8-95c0-22f1f067915f' does not exist or one of its queried reference-property objects are not present.\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "ocp-aad-diagnostics-server-name": [ + "5TnuYhUaV09bxMxpRfIwQrijH1KPxlCtfSFarwsJz+g=" + ], + "request-id": [ + "79b5663e-a9d2-4c82-ba2b-39be65bd722e" + ], + "client-request-id": [ + "3d50f490-e120-4228-acf1-c37f5fad5b7f" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "D4g6eTkn14OCdjPXAW7CwKod7x76bhXzQs-9kuai2mx1s_Az8pfvQCuz7nyt23Hr8VYjNXM5S6Kan04diO6mAZiUVhVOTJomddKzMJs6AyQ.3bimeBUGhCTn0iJSctWEPskrIy1FER3Ibq1kCYfCFxc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "private" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:16 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/groups/fb7d9586-9377-43c8-95c0-22f1f067915f?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9ncm91cHMvZmI3ZDk1ODYtOTM3Ny00M2M4LTk1YzAtMjJmMWYwNjc5MTVmP2FwaS12ZXJzaW9uPTEuNDItcHJldmlld0ludGVybmFs", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.Group/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.Group\",\r\n \"objectType\": \"Group\",\r\n \"objectId\": \"fb7d9586-9377-43c8-95c0-22f1f067915f\",\r\n \"softDeletionTimestamp\": null,\r\n \"appMetadata\": null,\r\n \"exchangeResources\": [],\r\n \"description\": \"group of readers\",\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"readergroup\",\r\n \"groupType\": null,\r\n \"isPublic\": null,\r\n \"lastDirSyncTime\": null,\r\n \"licenseAssignment\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"c7a16934-b86a-43a2-8d96-7c6a8949b206\",\r\n \"mailEnabled\": false,\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"securityEnabled\": true,\r\n \"sharepointResources\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "5TnuYhUaV09bxMxpRfIwQrijH1KPxlCtfSFarwsJz+g=" + ], + "request-id": [ + "fff6dfa3-3c85-430c-b55e-bce6c497ab8d" + ], + "client-request-id": [ + "0857c7e4-5a68-4920-9ac6-64e237808bbc" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "XIjREbONfIwkOWuYT4vazg2joAp7w29S7SPHS1FFCZIiHyzfCJJ_g4pWUvGUiwsUprmRfTfTICtm37M6sFpY4_oASNoAfH_0KQiEjbNs1hA.WfCYgwgesHBZDh-HZu73fBA2mftOIOa5iPzf7SnOU5U" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/groups/fb7d9586-9377-43c8-95c0-22f1f067915f?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9ncm91cHMvZmI3ZDk1ODYtOTM3Ny00M2M4LTk1YzAtMjJmMWYwNjc5MTVmP2FwaS12ZXJzaW9uPTEuNDItcHJldmlld0ludGVybmFs", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.Group/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.Group\",\r\n \"objectType\": \"Group\",\r\n \"objectId\": \"fb7d9586-9377-43c8-95c0-22f1f067915f\",\r\n \"softDeletionTimestamp\": null,\r\n \"appMetadata\": null,\r\n \"exchangeResources\": [],\r\n \"description\": \"group of readers\",\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"readergroup\",\r\n \"groupType\": null,\r\n \"isPublic\": null,\r\n \"lastDirSyncTime\": null,\r\n \"licenseAssignment\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"c7a16934-b86a-43a2-8d96-7c6a8949b206\",\r\n \"mailEnabled\": false,\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"securityEnabled\": true,\r\n \"sharepointResources\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "5TnuYhUaV09bxMxpRfIwQrijH1KPxlCtfSFarwsJz+g=" + ], + "request-id": [ + "91860c8f-f268-44ac-80bf-9349bd751c29" + ], + "client-request-id": [ + "8f33c96a-078c-4cfa-990b-b51d1800efa1" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "JbeOEguEZpyA0L-LfBYB9H_WEZdT-P70NQ8QGMDxUpD2RpBmzquB005S-dldtcDeiWV2O4UOzIU7Qgkbr9k3s25gB5LL0NQXvlR9dRn1aq4.kgcyw0kN67b_j-pxFkrzS1oZyb1bAuHTtLQ-pEhWKls" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:14 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/groups/fb7d9586-9377-43c8-95c0-22f1f067915f?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9ncm91cHMvZmI3ZDk1ODYtOTM3Ny00M2M4LTk1YzAtMjJmMWYwNjc5MTVmP2FwaS12ZXJzaW9uPTEuNDItcHJldmlld0ludGVybmFs", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.Group/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.Group\",\r\n \"objectType\": \"Group\",\r\n \"objectId\": \"fb7d9586-9377-43c8-95c0-22f1f067915f\",\r\n \"softDeletionTimestamp\": null,\r\n \"appMetadata\": null,\r\n \"exchangeResources\": [],\r\n \"description\": \"group of readers\",\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"readergroup\",\r\n \"groupType\": null,\r\n \"isPublic\": null,\r\n \"lastDirSyncTime\": null,\r\n \"licenseAssignment\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"c7a16934-b86a-43a2-8d96-7c6a8949b206\",\r\n \"mailEnabled\": false,\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"securityEnabled\": true,\r\n \"sharepointResources\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "5TnuYhUaV09bxMxpRfIwQrijH1KPxlCtfSFarwsJz+g=" + ], + "request-id": [ + "bd4f55d6-8c90-4792-8c42-00346d853d2c" + ], + "client-request-id": [ + "4d92dd6a-9889-487b-a072-a32c676f7d30" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "A0rnzbJgYY74Z7aec9IOgY2HcW6v68cZJLla-s6bNTHCxoBVFFw_D9lFjCNBgYTg9a7ANuh3HoPnzwB_wboD8cGbjzDquRcHlHJ0bOGrqnM.E8pY2pOzrVSz8EpxRFw2Y5iQzLLT06z0ZwQwJTkPx9E" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:14 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/groups/fb7d9586-9377-43c8-95c0-22f1f067915f?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9ncm91cHMvZmI3ZDk1ODYtOTM3Ny00M2M4LTk1YzAtMjJmMWYwNjc5MTVmP2FwaS12ZXJzaW9uPTEuNDItcHJldmlld0ludGVybmFs", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.Group/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.Group\",\r\n \"objectType\": \"Group\",\r\n \"objectId\": \"fb7d9586-9377-43c8-95c0-22f1f067915f\",\r\n \"softDeletionTimestamp\": null,\r\n \"appMetadata\": null,\r\n \"exchangeResources\": [],\r\n \"description\": \"group of readers\",\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"readergroup\",\r\n \"groupType\": null,\r\n \"isPublic\": null,\r\n \"lastDirSyncTime\": null,\r\n \"licenseAssignment\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"c7a16934-b86a-43a2-8d96-7c6a8949b206\",\r\n \"mailEnabled\": false,\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"securityEnabled\": true,\r\n \"sharepointResources\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "5TnuYhUaV09bxMxpRfIwQrijH1KPxlCtfSFarwsJz+g=" + ], + "request-id": [ + "39963c21-cdb4-4eba-af3e-ac352ef1de77" + ], + "client-request-id": [ + "475a3c2d-7def-4b39-abd6-4eac70e855c3" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "DdaR4G_nhTtnC9PavdOglglGzLHjQozZdP5FIBqCSxfROF6_ICGy1p7Jn8Bn-2hHnk-C4FAmAvM1q5m1VP2lS1YYLY52QLljhlnNH7M_lKc.NAPBlIVhafEHmTILwWBzTUOuKLv0lt1-VGokx8kPkRE" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:16 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleAssignments?&$filter=principalId%20eq%20'fb7d9586-9377-43c8-95c0-22f1f067915f'&api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9yb2xlQXNzaWdubWVudHM/JiRmaWx0ZXI9cHJpbmNpcGFsSWQlMjBlcSUyMCdmYjdkOTU4Ni05Mzc3LTQzYzgtOTVjMC0yMmYxZjA2NzkxNWYnJmFwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"principalId\": \"fb7d9586-9377-43c8-95c0-22f1f067915f\",\r\n \"scope\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/reader1\"\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/reader1/providers/Microsoft.Authorization/roleAssignments/76b770a3-1a57-4d41-aa3f-4320cc1fd4b6\",\r\n \"type\": \"Microsoft.Authorization/roleAssignments\",\r\n \"name\": \"76b770a3-1a57-4d41-aa3f-4320cc1fd4b6\"\r\n },\r\n {\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635\",\r\n \"principalId\": \"fb7d9586-9377-43c8-95c0-22f1f067915f\",\r\n \"scope\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/Microsoft.Web/sites/wscontrib002\"\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/Microsoft.Web/sites/wscontrib002/providers/Microsoft.Authorization/roleAssignments/78d6502f-74fc-4800-bb0a-0e1a7bebeca4\",\r\n \"type\": \"Microsoft.Authorization/roleAssignments\",\r\n \"name\": \"78d6502f-74fc-4800-bb0a-0e1a7bebeca4\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:05e24c46-b2eb-44f7-a451-636a402b2ce8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31892" + ], + "x-ms-correlation-request-id": [ + "9e124fe4-778e-4c5b-b7d5-53128ecf3340" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015114Z:9e124fe4-778e-4c5b-b7d5-53128ecf3340" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleAssignments?&$filter=principalId%20eq%20'fb7d9586-9377-43c8-95c0-22f1f067915f'&api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9yb2xlQXNzaWdubWVudHM/JiRmaWx0ZXI9cHJpbmNpcGFsSWQlMjBlcSUyMCdmYjdkOTU4Ni05Mzc3LTQzYzgtOTVjMC0yMmYxZjA2NzkxNWYnJmFwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"principalId\": \"fb7d9586-9377-43c8-95c0-22f1f067915f\",\r\n \"scope\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/reader1\"\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/reader1/providers/Microsoft.Authorization/roleAssignments/76b770a3-1a57-4d41-aa3f-4320cc1fd4b6\",\r\n \"type\": \"Microsoft.Authorization/roleAssignments\",\r\n \"name\": \"76b770a3-1a57-4d41-aa3f-4320cc1fd4b6\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:895cd048-8333-46cf-b148-461972c528b5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31889" + ], + "x-ms-correlation-request-id": [ + "2351af96-aaab-4853-b8da-0b0be26dfdb8" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015115Z:2351af96-aaab-4853-b8da-0b0be26dfdb8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:15 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZURlZmluaXRpb25zL2FjZGQ3MmE3LTMzODUtNDhlZi1iZDQyLWY2MDZmYmE4MWFlNz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleName\": \"Reader\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Readers can view everything, but can't make changes.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*/read\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"acdd72a7-3385-48ef-bd42-f606fba81ae7\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:95b364c2-7ea9-4d2f-b2b6-21449af60d0b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31891" + ], + "x-ms-correlation-request-id": [ + "7a69af23-961d-4e48-b378-5932496460b9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015114Z:7a69af23-961d-4e48-b378-5932496460b9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZURlZmluaXRpb25zL2FjZGQ3MmE3LTMzODUtNDhlZi1iZDQyLWY2MDZmYmE4MWFlNz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleName\": \"Reader\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Readers can view everything, but can't make changes.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*/read\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"acdd72a7-3385-48ef-bd42-f606fba81ae7\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:6ede86d4-95bb-4021-baa3-2761415a66b1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31888" + ], + "x-ms-correlation-request-id": [ + "d87393cb-f70c-4077-800f-b0e94c03dc6e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015116Z:d87393cb-f70c-4077-800f-b0e94c03dc6e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:15 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/Microsoft.Web/sites/wscontrib002/providers/Microsoft.Authorization/roleAssignments/78d6502f-74fc-4800-bb0a-0e1a7bebeca4?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9yZXNvdXJjZUdyb3Vwcy9jb250cmliMS9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy93c2NvbnRyaWIwMDIvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3JvbGVBc3NpZ25tZW50cy83OGQ2NTAyZi03NGZjLTQ4MDAtYmIwYS0wZTFhN2JlYmVjYTQ/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "westus:a49e9a01-0f74-4e60-9f8b-4ba3c61d3360" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1182" + ], + "x-ms-correlation-request-id": [ + "e8bd4700-ee61-4649-88cf-91d927fb528e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015115Z:e8bd4700-ee61-4649-88cf-91d927fb528e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:14 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "3ca49042-782a-4cc9-89b5-ee1b487fe115", + "TenantId": "1449d5b7-8a83-47db-ae4c-9b03e888bad0" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaByResourceGroup.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaByResourceGroup.json new file mode 100644 index 000000000000..d5ee92f1f445 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaByResourceGroup.json @@ -0,0 +1,833 @@ +{ + "Entries": [ + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users?&api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycz8mYXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"value\": [\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"a73a146e-93ad-43bf-8590-2f43343656b5\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Global Administrator for RBAC Testing\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Global\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"admin\",\r\n \"mobile\": null,\r\n \"netId\": \"1003BFFD8B9977C6\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [\r\n \"markcowl@microsoft.com\"\r\n ],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"admin@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"Admin\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"admin@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"f6b529cb-97da-4126-b925-16fecac9679f\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [\r\n {\r\n \"type\": 5,\r\n \"identityProvider\": null,\r\n \"key\": \"EAM//4ueL3M=\"\r\n }\r\n ],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Alternative Owner\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Alternative\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"alt-owner_azsdkposhteamoutlook.onmicrosoft.com#EXT#\",\r\n \"mobile\": null,\r\n \"netId\": \"100300008BA3AFD4\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [\r\n \"alt-owner@azsdkposhteamoutlook.onmicrosoft.com\"\r\n ],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"alt-owner@azsdkposhteamoutlook.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"Owner\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"alt-owner_azsdkposhteamoutlook.onmicrosoft.com#EXT#@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"da03a14a-f92e-4d70-b5c7-b0dad6324b04\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [\r\n {\r\n \"type\": 1,\r\n \"identityProvider\": null,\r\n \"key\": \"AAN//tE+u3M=\"\r\n }\r\n ],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Mark Cowlishaw\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Mark\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"azsdkposhteam_outlook.com#EXT#\",\r\n \"mobile\": null,\r\n \"netId\": \"100300008B9B411F\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [\r\n \"azsdkposhteam@outlook.com\"\r\n ],\r\n \"passwordPolicies\": null,\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"azsdkposhteam@outlook.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"Cowlishaw\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"azsdkposhteam_outlook.com#EXT#@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"bac2a76b-6dc2-4343-be12-4af6dff38cac\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [\r\n {\r\n \"type\": 1,\r\n \"identityProvider\": null,\r\n \"key\": \"AAMAAIngDtI=\"\r\n }\r\n ],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Marky mark\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Mark\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"markcowl_live.com#EXT#\",\r\n \"mobile\": null,\r\n \"netId\": \"1003BFFD8BA27081\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [\r\n \"markcowl@live.com\"\r\n ],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"markcowl@live.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"Cowlishaw\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"markcowl_live.com#EXT#@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"7b45838f-42c3-4fef-a85a-0a9051dfda41\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Owner1\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Owner\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"owner1\",\r\n \"mobile\": null,\r\n \"netId\": \"10033FFF8B95D83D\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"owner1@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"One\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"owner1@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"576b6988-ffa9-4096-a98f-c2151f8ddab1\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Owner2\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Owner\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"owner2\",\r\n \"mobile\": null,\r\n \"netId\": \"1003BFFD8B998B5C\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"owner2@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"Two\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"owner2@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"4f8bcdeb-e36d-4fcd-9e21-c5c76dd38a74\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Reader1\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Reader\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"reader1\",\r\n \"mobile\": null,\r\n \"netId\": \"1003BFFD8B99874F\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"reader1@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"One\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"reader1@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"fcb281e3-9b38-4868-abec-2c640743cfa9\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Reader2\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Reader\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"reader2\",\r\n \"mobile\": null,\r\n \"netId\": \"10033FFF8B95D58F\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"reader2@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"Two\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"reader2@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"546880c8-4956-4527-a17f-6671332ef66a\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"webadmin1\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Web\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"webadmin1\",\r\n \"mobile\": null,\r\n \"netId\": \"10033FFF8B95D9C3\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"webadmin1@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"AdminOne\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"webadmin1@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"5509dd91-9239-4de9-877c-985984f9284e\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"webadmin2\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Web\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"webadmin2\",\r\n \"mobile\": null,\r\n \"netId\": \"1003BFFD8B998CA0\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"webadmin2@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"AdminTwo\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"webadmin2@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "4JBXES2oJSo7EFxoGUZySbVZz5f0jRgg9xWilhxiOOk=" + ], + "request-id": [ + "0178fa54-41c4-4b31-b043-24711b9df42c" + ], + "client-request-id": [ + "e9a7e01d-4cab-49e2-b759-cd6d642ad4a8" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "hoTIeVFSOfrm1XlJUnItTU_3PfdBZm-m6AEtd_JNmQ1PtWywPI5--Ei-yGKR8LTjlrIw73daTXGn21F3hzH__LJ10e0GurrBEVz7KXTd2D8.yPqp4dIsTUCHFEBOcvmCLuuBEr0WieaIoOC7eKwc35Y" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:25 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourcegroups?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Jlc291cmNlZ3JvdXBzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1\",\r\n \"name\": \"contrib1\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/owner1\",\r\n \"name\": \"owner1\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/reader1\",\r\n \"name\": \"reader1\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/testg1\",\r\n \"name\": \"testg1\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31887" + ], + "x-ms-request-id": [ + "6d3614ef-766b-47ce-a7fb-6a3b450deefa" + ], + "x-ms-correlation-request-id": [ + "6d3614ef-766b-47ce-a7fb-6a3b450deefa" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015125Z:6d3614ef-766b-47ce-a7fb-6a3b450deefa" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:25 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourcegroups?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Jlc291cmNlZ3JvdXBzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1\",\r\n \"name\": \"contrib1\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/owner1\",\r\n \"name\": \"owner1\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/reader1\",\r\n \"name\": \"reader1\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/testg1\",\r\n \"name\": \"testg1\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31886" + ], + "x-ms-request-id": [ + "b9ecfe5a-0acb-4739-b3b4-14b606faba2b" + ], + "x-ms-correlation-request-id": [ + "b9ecfe5a-0acb-4739-b3b4-14b606faba2b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015125Z:b9ecfe5a-0acb-4739-b3b4-14b606faba2b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:25 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9yb2xlRGVmaW5pdGlvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"roleName\": \"Contributor\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Contributors can manage everything except access.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": [\r\n \"Microsoft.Authorization/*/Write\",\r\n \"Microsoft.Authorization/*/Delete\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n },\r\n {\r\n \"properties\": {\r\n \"roleName\": \"Owner\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Owners can manage everything, including access.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"8e3af657-a8ff-443c-a75c-2fe8c4bcb635\"\r\n },\r\n {\r\n \"properties\": {\r\n \"roleName\": \"Reader\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Readers can view everything, but can't make changes.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*/read\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"acdd72a7-3385-48ef-bd42-f606fba81ae7\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:f6287ab6-58b7-4f0a-a1b8-08ac5872556c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31936" + ], + "x-ms-correlation-request-id": [ + "3d5810d2-27d6-48d8-9c4f-e527b991ccef" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015125Z:3d5810d2-27d6-48d8-9c4f-e527b991ccef" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/testg1/providers/Microsoft.Authorization/roleAssignments/a4b82891-ebee-4568-b606-632899bf9453?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9yZXNvdXJjZUdyb3Vwcy90ZXN0ZzEvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3JvbGVBc3NpZ25tZW50cy9hNGI4Mjg5MS1lYmVlLTQ1NjgtYjYwNi02MzI4OTliZjk0NTM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\r\n \"principalId\": \"5509dd91-9239-4de9-877c-985984f9284e\"\r\n }\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\r\n \"principalId\": \"5509dd91-9239-4de9-877c-985984f9284e\",\r\n \"scope\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/testg1\"\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/testg1/providers/Microsoft.Authorization/roleAssignments/a4b82891-ebee-4568-b606-632899bf9453\",\r\n \"type\": \"Microsoft.Authorization/roleAssignments\",\r\n \"name\": \"a4b82891-ebee-4568-b606-632899bf9453\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "westus:8dae3881-369c-498c-b104-c495f8431ef2" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1190" + ], + "x-ms-correlation-request-id": [ + "6780d381-a168-4bc1-97c6-475b05a1acaf" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015127Z:6780d381-a168-4bc1-97c6-475b05a1acaf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:26 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/testg1/providers/Microsoft.Authorization/roleAssignments/a4b82891-ebee-4568-b606-632899bf9453?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9yZXNvdXJjZUdyb3Vwcy90ZXN0ZzEvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3JvbGVBc3NpZ25tZW50cy9hNGI4Mjg5MS1lYmVlLTQ1NjgtYjYwNi02MzI4OTliZjk0NTM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\r\n \"principalId\": \"5509dd91-9239-4de9-877c-985984f9284e\",\r\n \"scope\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/testg1\"\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/testg1/providers/Microsoft.Authorization/roleAssignments/a4b82891-ebee-4568-b606-632899bf9453\",\r\n \"type\": \"Microsoft.Authorization/roleAssignments\",\r\n \"name\": \"a4b82891-ebee-4568-b606-632899bf9453\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:a16bff46-b2ea-4a75-8f61-815979173aee" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31935" + ], + "x-ms-correlation-request-id": [ + "1538f4e8-f6d0-435a-a509-14ef6b7473f6" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015127Z:1538f4e8-f6d0-435a-a509-14ef6b7473f6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZURlZmluaXRpb25zL2IyNDk4OGFjLTYxODAtNDJhMC1hYjg4LTIwZjczODJkZDI0Yz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleName\": \"Contributor\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Contributors can manage everything except access.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": [\r\n \"Microsoft.Authorization/*/Write\",\r\n \"Microsoft.Authorization/*/Delete\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:8a9ba971-8547-4d88-b805-01ed96ef4b92" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31934" + ], + "x-ms-correlation-request-id": [ + "0682f03a-410a-40f2-a6fe-f72fd6312ef0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015127Z:0682f03a-410a-40f2-a6fe-f72fd6312ef0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZURlZmluaXRpb25zL2IyNDk4OGFjLTYxODAtNDJhMC1hYjg4LTIwZjczODJkZDI0Yz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleName\": \"Contributor\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Contributors can manage everything except access.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": [\r\n \"Microsoft.Authorization/*/Write\",\r\n \"Microsoft.Authorization/*/Delete\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:4df6c72a-de72-44f5-85f0-e43b6b95a33e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31931" + ], + "x-ms-correlation-request-id": [ + "71a35aa5-835c-4b9e-8716-aba0cbcaaa28" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015127Z:71a35aa5-835c-4b9e-8716-aba0cbcaaa28" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/5509dd91-9239-4de9-877c-985984f9284e?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy81NTA5ZGQ5MS05MjM5LTRkZTktODc3Yy05ODU5ODRmOTI4NGU/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.User/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"5509dd91-9239-4de9-877c-985984f9284e\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"webadmin2\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Web\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"webadmin2\",\r\n \"mobile\": null,\r\n \"netId\": \"1003BFFD8B998CA0\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"webadmin2@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"AdminTwo\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"webadmin2@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "wByDmqOAuV8t6pYQ6JlEvztwcfHFDpgbEASm4svTq80=" + ], + "request-id": [ + "23521066-382b-453d-954d-093a7bc7a0df" + ], + "client-request-id": [ + "5871305c-d888-44dc-9649-363d68d98f6b" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "lZcI48LEpr3JgZD_a9uLUi1f8TjzygfAaVdNSPpIlg-wlkQ90wmjruJ0SjY0FhwimDlM4VSL9wv-1Qh6iiX38oIwfpHiCED2mnYkcUGZ7q8.RtaEcX0QcjrMH7kebp84A7kPRXuWNU37vNABoREbFGk" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:27 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/5509dd91-9239-4de9-877c-985984f9284e?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy81NTA5ZGQ5MS05MjM5LTRkZTktODc3Yy05ODU5ODRmOTI4NGU/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.User/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"5509dd91-9239-4de9-877c-985984f9284e\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"webadmin2\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Web\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"webadmin2\",\r\n \"mobile\": null,\r\n \"netId\": \"1003BFFD8B998CA0\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"webadmin2@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"AdminTwo\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"webadmin2@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "wByDmqOAuV8t6pYQ6JlEvztwcfHFDpgbEASm4svTq80=" + ], + "request-id": [ + "3d4f4a6a-9747-4931-bd30-ac9911171dbb" + ], + "client-request-id": [ + "6a03c780-a2dc-4430-8af3-2289c7e281e8" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "At7ZxFOEJmI5oqABPI66bsp8jnFXhX6ajHHIIm1SwKjrXo-iPlTDFAowmel1gDpFbBOwptJzzw7UKidZUbGie4D-7S4v8LVgxdCT2p0mBnc.Ngmpz8R0xco4JRWsQSARLSLCY9QCrZQu1Te4QOnzhhA" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:27 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/5509dd91-9239-4de9-877c-985984f9284e?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy81NTA5ZGQ5MS05MjM5LTRkZTktODc3Yy05ODU5ODRmOTI4NGU/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.User/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"5509dd91-9239-4de9-877c-985984f9284e\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"webadmin2\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Web\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"webadmin2\",\r\n \"mobile\": null,\r\n \"netId\": \"1003BFFD8B998CA0\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"webadmin2@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"AdminTwo\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"webadmin2@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "wByDmqOAuV8t6pYQ6JlEvztwcfHFDpgbEASm4svTq80=" + ], + "request-id": [ + "3f730acd-e13f-4707-8f57-ca6894fb3a34" + ], + "client-request-id": [ + "4b8f5736-4b9d-46a5-819a-37b009f33b61" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "Fc2LZyuAiFIJFwH-KH4hY8y-bj6shIm61PqTAKZYF8xiyQhKMlxt7Fk2oKCcYTmXz34p4JV9tGLr_WM5knkAA6ds3iQDZdlwyepwM_pK4e4.xAs9DJX9czqN6tmqQ0O8mmo8nqKJAlEQi7qCUdkpaFU" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/5509dd91-9239-4de9-877c-985984f9284e?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy81NTA5ZGQ5MS05MjM5LTRkZTktODc3Yy05ODU5ODRmOTI4NGU/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.User/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"5509dd91-9239-4de9-877c-985984f9284e\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"webadmin2\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Web\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"webadmin2\",\r\n \"mobile\": null,\r\n \"netId\": \"1003BFFD8B998CA0\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"webadmin2@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"AdminTwo\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"webadmin2@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "wByDmqOAuV8t6pYQ6JlEvztwcfHFDpgbEASm4svTq80=" + ], + "request-id": [ + "0ec9f9f5-57b4-4dda-bf0e-90d155a034a9" + ], + "client-request-id": [ + "3242a9b4-9722-4db9-8a24-a15b8b00b2f2" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "sPsqDJ2-f0Rmt9JBoio3XSPbGZ6HMfS4trGcW1_zh7DmGG8oZ5T5CkH1FP2eoj0UnrCG3wUA_LsR-mHDrM4SmUslh4jDlYmnvT_e3DEWVi8.MtW2JP6OvSCII7lREME-p8x-pB5XUSERm53Yd-xEDVM" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleAssignments?&$filter=principalId%20eq%20'5509dd91-9239-4de9-877c-985984f9284e'&api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9yb2xlQXNzaWdubWVudHM/JiRmaWx0ZXI9cHJpbmNpcGFsSWQlMjBlcSUyMCc1NTA5ZGQ5MS05MjM5LTRkZTktODc3Yy05ODU5ODRmOTI4NGUnJmFwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"principalId\": \"5509dd91-9239-4de9-877c-985984f9284e\",\r\n \"scope\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/nonexistentRG\"\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/nonexistentRG/providers/Microsoft.Authorization/roleAssignments/ddfb9670-5239-475b-9428-be0adc07bef1\",\r\n \"type\": \"Microsoft.Authorization/roleAssignments\",\r\n \"name\": \"ddfb9670-5239-475b-9428-be0adc07bef1\"\r\n },\r\n {\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\r\n \"principalId\": \"5509dd91-9239-4de9-877c-985984f9284e\",\r\n \"scope\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/testg1\"\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/testg1/providers/Microsoft.Authorization/roleAssignments/a4b82891-ebee-4568-b606-632899bf9453\",\r\n \"type\": \"Microsoft.Authorization/roleAssignments\",\r\n \"name\": \"a4b82891-ebee-4568-b606-632899bf9453\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:72b7ce50-19b7-4780-a4c2-5b2eee69aa54" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31933" + ], + "x-ms-correlation-request-id": [ + "daa73e12-456a-400a-9044-6cd0b95f17fe" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015127Z:daa73e12-456a-400a-9044-6cd0b95f17fe" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleAssignments?&$filter=principalId%20eq%20'5509dd91-9239-4de9-877c-985984f9284e'&api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9yb2xlQXNzaWdubWVudHM/JiRmaWx0ZXI9cHJpbmNpcGFsSWQlMjBlcSUyMCc1NTA5ZGQ5MS05MjM5LTRkZTktODc3Yy05ODU5ODRmOTI4NGUnJmFwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"principalId\": \"5509dd91-9239-4de9-877c-985984f9284e\",\r\n \"scope\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/nonexistentRG\"\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/nonexistentRG/providers/Microsoft.Authorization/roleAssignments/ddfb9670-5239-475b-9428-be0adc07bef1\",\r\n \"type\": \"Microsoft.Authorization/roleAssignments\",\r\n \"name\": \"ddfb9670-5239-475b-9428-be0adc07bef1\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:2732686b-2755-426f-84b2-0ff19fe97f9e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31930" + ], + "x-ms-correlation-request-id": [ + "686928b9-bb51-4428-b5d5-e0e2d42e08d4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015128Z:686928b9-bb51-4428-b5d5-e0e2d42e08d4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:27 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZURlZmluaXRpb25zL2FjZGQ3MmE3LTMzODUtNDhlZi1iZDQyLWY2MDZmYmE4MWFlNz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleName\": \"Reader\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Readers can view everything, but can't make changes.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*/read\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"acdd72a7-3385-48ef-bd42-f606fba81ae7\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:360ef652-132c-44aa-be8e-88988a092b3f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31932" + ], + "x-ms-correlation-request-id": [ + "323d5d48-a311-487f-aad3-e1459ef61e8f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015127Z:323d5d48-a311-487f-aad3-e1459ef61e8f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZURlZmluaXRpb25zL2FjZGQ3MmE3LTMzODUtNDhlZi1iZDQyLWY2MDZmYmE4MWFlNz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleName\": \"Reader\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Readers can view everything, but can't make changes.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*/read\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"acdd72a7-3385-48ef-bd42-f606fba81ae7\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:984651b1-a17a-4553-b576-77e4a259bb61" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31929" + ], + "x-ms-correlation-request-id": [ + "7cc264e6-3e74-44a8-aa68-95669ce22297" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015128Z:7cc264e6-3e74-44a8-aa68-95669ce22297" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:27 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/testg1/providers/Microsoft.Authorization/roleAssignments/a4b82891-ebee-4568-b606-632899bf9453?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9yZXNvdXJjZUdyb3Vwcy90ZXN0ZzEvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3JvbGVBc3NpZ25tZW50cy9hNGI4Mjg5MS1lYmVlLTQ1NjgtYjYwNi02MzI4OTliZjk0NTM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "westus:6d65c6df-31de-4e36-8f4f-8a88a7ebd878" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1189" + ], + "x-ms-correlation-request-id": [ + "72f4057a-6c35-426c-856c-0f85a666a7a3" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015128Z:72f4057a-6c35-426c-856c-0f85a666a7a3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:51:27 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "3ca49042-782a-4cc9-89b5-ee1b487fe115", + "TenantId": "1449d5b7-8a83-47db-ae4c-9b03e888bad0" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaByScope.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaByScope.json new file mode 100644 index 000000000000..c74694837c32 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaByScope.json @@ -0,0 +1,543 @@ +{ + "Entries": [ + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users?&api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycz8mYXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"value\": [\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"a73a146e-93ad-43bf-8590-2f43343656b5\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Global Administrator for RBAC Testing\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Global\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"admin\",\r\n \"mobile\": null,\r\n \"netId\": \"1003BFFD8B9977C6\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [\r\n \"markcowl@microsoft.com\"\r\n ],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"admin@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"Admin\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"admin@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"f6b529cb-97da-4126-b925-16fecac9679f\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [\r\n {\r\n \"type\": 5,\r\n \"identityProvider\": null,\r\n \"key\": \"EAM//4ueL3M=\"\r\n }\r\n ],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Alternative Owner\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Alternative\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"alt-owner_azsdkposhteamoutlook.onmicrosoft.com#EXT#\",\r\n \"mobile\": null,\r\n \"netId\": \"100300008BA3AFD4\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [\r\n \"alt-owner@azsdkposhteamoutlook.onmicrosoft.com\"\r\n ],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"alt-owner@azsdkposhteamoutlook.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"Owner\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"alt-owner_azsdkposhteamoutlook.onmicrosoft.com#EXT#@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"da03a14a-f92e-4d70-b5c7-b0dad6324b04\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [\r\n {\r\n \"type\": 1,\r\n \"identityProvider\": null,\r\n \"key\": \"AAN//tE+u3M=\"\r\n }\r\n ],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Mark Cowlishaw\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Mark\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"azsdkposhteam_outlook.com#EXT#\",\r\n \"mobile\": null,\r\n \"netId\": \"100300008B9B411F\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [\r\n \"azsdkposhteam@outlook.com\"\r\n ],\r\n \"passwordPolicies\": null,\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"azsdkposhteam@outlook.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"Cowlishaw\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"azsdkposhteam_outlook.com#EXT#@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"bac2a76b-6dc2-4343-be12-4af6dff38cac\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [\r\n {\r\n \"type\": 1,\r\n \"identityProvider\": null,\r\n \"key\": \"AAMAAIngDtI=\"\r\n }\r\n ],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Marky mark\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Mark\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"markcowl_live.com#EXT#\",\r\n \"mobile\": null,\r\n \"netId\": \"1003BFFD8BA27081\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [\r\n \"markcowl@live.com\"\r\n ],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"markcowl@live.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"Cowlishaw\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"markcowl_live.com#EXT#@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"7b45838f-42c3-4fef-a85a-0a9051dfda41\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Owner1\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Owner\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"owner1\",\r\n \"mobile\": null,\r\n \"netId\": \"10033FFF8B95D83D\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"owner1@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"One\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"owner1@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"576b6988-ffa9-4096-a98f-c2151f8ddab1\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Owner2\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Owner\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"owner2\",\r\n \"mobile\": null,\r\n \"netId\": \"1003BFFD8B998B5C\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"owner2@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"Two\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"owner2@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"4f8bcdeb-e36d-4fcd-9e21-c5c76dd38a74\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Reader1\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Reader\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"reader1\",\r\n \"mobile\": null,\r\n \"netId\": \"1003BFFD8B99874F\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"reader1@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"One\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"reader1@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"fcb281e3-9b38-4868-abec-2c640743cfa9\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Reader2\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Reader\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"reader2\",\r\n \"mobile\": null,\r\n \"netId\": \"10033FFF8B95D58F\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"reader2@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"Two\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"reader2@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"546880c8-4956-4527-a17f-6671332ef66a\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"webadmin1\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Web\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"webadmin1\",\r\n \"mobile\": null,\r\n \"netId\": \"10033FFF8B95D9C3\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"webadmin1@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"AdminOne\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"webadmin1@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"5509dd91-9239-4de9-877c-985984f9284e\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"webadmin2\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Web\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"webadmin2\",\r\n \"mobile\": null,\r\n \"netId\": \"1003BFFD8B998CA0\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"webadmin2@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"AdminTwo\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"webadmin2@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "1Ptot0LG1647jq6Jd5jbCVVlBPXTTRRWQ3OcUhRUILc=" + ], + "request-id": [ + "468b5c11-1c38-498d-868f-9906a84b11b2" + ], + "client-request-id": [ + "a12b2967-1eec-4904-86fe-3bff7a166b0d" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "UTlJxnV4fhBX9ZPFJzAwtmWNCga6aVcQKiMSEe1LM2VhlVEkrZSy171cisVFA26XQxPrV7An6BSy7PIcPyHBHACFhjPQwi2tT6fti46xAB4.d8A7joD_MmQ5LPX7PN_ewEgh0_x222nOGPgOlGfuZyU" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 17:09:29 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9yb2xlRGVmaW5pdGlvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"roleName\": \"Contributor\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Contributors can manage everything except access.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": [\r\n \"Microsoft.Authorization/*/Write\",\r\n \"Microsoft.Authorization/*/Delete\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n },\r\n {\r\n \"properties\": {\r\n \"roleName\": \"Owner\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Owners can manage everything, including access.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"8e3af657-a8ff-443c-a75c-2fe8c4bcb635\"\r\n },\r\n {\r\n \"properties\": {\r\n \"roleName\": \"Reader\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Readers can view everything, but can't make changes.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*/read\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"acdd72a7-3385-48ef-bd42-f606fba81ae7\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:65dce94c-0d71-43d0-8c25-6c5c8a7d9c73" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31999" + ], + "x-ms-correlation-request-id": [ + "ac597b0a-0576-4b93-960d-013b3aa68d2e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T170930Z:ac597b0a-0576-4b93-960d-013b3aa68d2e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 17:09:30 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/SomeResourceGroup/providers/Microsoft.Authorization/roleAssignments/8d7dd69e-9ae2-44a1-94d8-f7bc8e12645e?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9yZXNvdXJjZUdyb3Vwcy9Tb21lUmVzb3VyY2VHcm91cC9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZUFzc2lnbm1lbnRzLzhkN2RkNjllLTlhZTItNDRhMS05NGQ4LWY3YmM4ZTEyNjQ1ZT9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"principalId\": \"a73a146e-93ad-43bf-8590-2f43343656b5\"\r\n }\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"principalId\": \"a73a146e-93ad-43bf-8590-2f43343656b5\",\r\n \"scope\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/SomeResourceGroup\"\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/SomeResourceGroup/providers/Microsoft.Authorization/roleAssignments/8d7dd69e-9ae2-44a1-94d8-f7bc8e12645e\",\r\n \"type\": \"Microsoft.Authorization/roleAssignments\",\r\n \"name\": \"8d7dd69e-9ae2-44a1-94d8-f7bc8e12645e\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "westus:1b563d0b-2b62-4417-8f67-d5c6b60d4189" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "b81627c6-7f80-4114-a11d-b8ba18717a29" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T170932Z:b81627c6-7f80-4114-a11d-b8ba18717a29" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 17:09:32 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/SomeResourceGroup/providers/Microsoft.Authorization/roleAssignments/8d7dd69e-9ae2-44a1-94d8-f7bc8e12645e?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9yZXNvdXJjZUdyb3Vwcy9Tb21lUmVzb3VyY2VHcm91cC9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZUFzc2lnbm1lbnRzLzhkN2RkNjllLTlhZTItNDRhMS05NGQ4LWY3YmM4ZTEyNjQ1ZT9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"principalId\": \"a73a146e-93ad-43bf-8590-2f43343656b5\",\r\n \"scope\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/SomeResourceGroup\"\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/SomeResourceGroup/providers/Microsoft.Authorization/roleAssignments/8d7dd69e-9ae2-44a1-94d8-f7bc8e12645e\",\r\n \"type\": \"Microsoft.Authorization/roleAssignments\",\r\n \"name\": \"8d7dd69e-9ae2-44a1-94d8-f7bc8e12645e\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:939e98d6-c393-4227-9a0b-70af4a05601a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31998" + ], + "x-ms-correlation-request-id": [ + "9007f7fb-e1da-48b6-b6cf-e28fcf79dd60" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T170932Z:9007f7fb-e1da-48b6-b6cf-e28fcf79dd60" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 17:09:32 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZURlZmluaXRpb25zL2FjZGQ3MmE3LTMzODUtNDhlZi1iZDQyLWY2MDZmYmE4MWFlNz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleName\": \"Reader\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Readers can view everything, but can't make changes.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*/read\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"acdd72a7-3385-48ef-bd42-f606fba81ae7\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:bdd4ea1e-2717-470b-bcdb-6d41cdbcdbfa" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31997" + ], + "x-ms-correlation-request-id": [ + "97730561-aa7b-4f64-9f26-b016023c7e74" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T170932Z:97730561-aa7b-4f64-9f26-b016023c7e74" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 17:09:32 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZURlZmluaXRpb25zL2FjZGQ3MmE3LTMzODUtNDhlZi1iZDQyLWY2MDZmYmE4MWFlNz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleName\": \"Reader\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Readers can view everything, but can't make changes.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*/read\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"acdd72a7-3385-48ef-bd42-f606fba81ae7\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:b8274877-7402-4a1e-b882-dc43b2243d2a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31995" + ], + "x-ms-correlation-request-id": [ + "61f6d871-f5b2-4a9e-8f16-8ad1233b344c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T170932Z:61f6d871-f5b2-4a9e-8f16-8ad1233b344c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 17:09:32 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/a73a146e-93ad-43bf-8590-2f43343656b5?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy9hNzNhMTQ2ZS05M2FkLTQzYmYtODU5MC0yZjQzMzQzNjU2YjU/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.User/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"a73a146e-93ad-43bf-8590-2f43343656b5\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Global Administrator for RBAC Testing\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Global\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"admin\",\r\n \"mobile\": null,\r\n \"netId\": \"1003BFFD8B9977C6\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [\r\n \"markcowl@microsoft.com\"\r\n ],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"admin@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"Admin\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"admin@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "1Ptot0LG1647jq6Jd5jbCVVlBPXTTRRWQ3OcUhRUILc=" + ], + "request-id": [ + "3a7969c7-c6e0-4838-b98e-2be07535a4c1" + ], + "client-request-id": [ + "8175d51e-628a-4749-898c-3c62870de4f3" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "SVUfJMoW7qydIiU0UJ-AxTM2JoiPKIWie2TIgXl3OB_qz2ggfHVLegPHwiYSNzAllnAEwZTIUSZCgulwElZZuCdGi7h8K9ShA_cEsLJ1hJo.DlUpQHi9DXiB3ZYNtHpSOgMvCFVd_0VFDJmw-teH4rI" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 17:09:31 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/a73a146e-93ad-43bf-8590-2f43343656b5?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy9hNzNhMTQ2ZS05M2FkLTQzYmYtODU5MC0yZjQzMzQzNjU2YjU/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.User/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"a73a146e-93ad-43bf-8590-2f43343656b5\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Global Administrator for RBAC Testing\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Global\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"admin\",\r\n \"mobile\": null,\r\n \"netId\": \"1003BFFD8B9977C6\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [\r\n \"markcowl@microsoft.com\"\r\n ],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"admin@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"Admin\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"admin@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "1Ptot0LG1647jq6Jd5jbCVVlBPXTTRRWQ3OcUhRUILc=" + ], + "request-id": [ + "ac8abe7f-85df-407a-b771-86cddb697af1" + ], + "client-request-id": [ + "a381898c-53ee-47a9-8bb8-481493b9529e" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "ODQK4353WQxz3ZjpKBykUaGRFAxDwDJUCfys4yo_dMjmJL45tRwVW8kKKv7MXNZ1pJAEHAya5_msIDvVwaYBATf4DmwjKI7brji9hkEwbho.bcl_X43Kiy18BEOPEDatREm19khPSR6VwMGl2Gdpms8" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 17:09:32 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleAssignments?&$filter=principalId%20eq%20'a73a146e-93ad-43bf-8590-2f43343656b5'&api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9yb2xlQXNzaWdubWVudHM/JiRmaWx0ZXI9cHJpbmNpcGFsSWQlMjBlcSUyMCdhNzNhMTQ2ZS05M2FkLTQzYmYtODU5MC0yZjQzMzQzNjU2YjUnJmFwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"principalId\": \"a73a146e-93ad-43bf-8590-2f43343656b5\",\r\n \"scope\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/SomeResourceGroup\"\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/SomeResourceGroup/providers/Microsoft.Authorization/roleAssignments/8d7dd69e-9ae2-44a1-94d8-f7bc8e12645e\",\r\n \"type\": \"Microsoft.Authorization/roleAssignments\",\r\n \"name\": \"8d7dd69e-9ae2-44a1-94d8-f7bc8e12645e\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:7d283fda-2eab-48bd-ab54-d748ed8bb09c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31996" + ], + "x-ms-correlation-request-id": [ + "ab32d579-1b4d-4687-bf61-f696012ed277" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T170932Z:ab32d579-1b4d-4687-bf61-f696012ed277" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 17:09:32 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleAssignments?&$filter=principalId%20eq%20'a73a146e-93ad-43bf-8590-2f43343656b5'&api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9yb2xlQXNzaWdubWVudHM/JiRmaWx0ZXI9cHJpbmNpcGFsSWQlMjBlcSUyMCdhNzNhMTQ2ZS05M2FkLTQzYmYtODU5MC0yZjQzMzQzNjU2YjUnJmFwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:769b1f95-8e49-48f5-97ab-3a7fee63b86e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31994" + ], + "x-ms-correlation-request-id": [ + "8921b0f3-f900-4257-8048-9160a7e40c72" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T170933Z:8921b0f3-f900-4257-8048-9160a7e40c72" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 17:09:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/SomeResourceGroup/providers/Microsoft.Authorization/roleAssignments/8d7dd69e-9ae2-44a1-94d8-f7bc8e12645e?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9yZXNvdXJjZUdyb3Vwcy9Tb21lUmVzb3VyY2VHcm91cC9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZUFzc2lnbm1lbnRzLzhkN2RkNjllLTlhZTItNDRhMS05NGQ4LWY3YmM4ZTEyNjQ1ZT9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "westus:9fb9dc83-0be6-4660-a54f-676c22a8540e" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "353fde26-57a8-4f13-be67-cc60f0b600ac" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T170933Z:353fde26-57a8-4f13-be67-cc60f0b600ac" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 17:09:33 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "3ca49042-782a-4cc9-89b5-ee1b487fe115", + "TenantId": "1449d5b7-8a83-47db-ae4c-9b03e888bad0" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaByServicePrincipal.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaByServicePrincipal.json new file mode 100644 index 000000000000..47281922209f --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaByServicePrincipal.json @@ -0,0 +1,1024 @@ +{ + "Entries": [ + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/servicePrincipals?&api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9zZXJ2aWNlUHJpbmNpcGFscz8mYXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal\",\r\n \"value\": [\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal\",\r\n \"objectType\": \"ServicePrincipal\",\r\n \"objectId\": \"038de80f-387d-48b7-b29f-b1f16253bdec\",\r\n \"softDeletionTimestamp\": null,\r\n \"accountEnabled\": true,\r\n \"appDisplayName\": \"Windows Azure Active Directory\",\r\n \"appId\": \"00000002-0000-0000-c000-000000000000\",\r\n \"appMetadata\": null,\r\n \"appOwnerTenantId\": null,\r\n \"appPermissions\": [\r\n {\r\n \"claimValue\": \"user_impersonation\",\r\n \"description\": \"Allow the application to access your organization's directory on behalf of the signed-in user.\",\r\n \"directAccessGrantTypes\": [],\r\n \"displayName\": \"Access your organization's directory (preview)\",\r\n \"impersonationAccessGrantTypes\": [\r\n {\r\n \"impersonated\": \"User\",\r\n \"impersonator\": \"Application\"\r\n }\r\n ],\r\n \"isDisabled\": false,\r\n \"origin\": \"Application\",\r\n \"permissionId\": \"a42657d6-7f20-40e3-b6f0-cee03008a62a\",\r\n \"resourceScopeType\": \"Personal\",\r\n \"userConsentDescription\": \"Allow the application to access your organization's directory information on your behalf, such as photo and contact information from your user profile.\",\r\n \"userConsentDisplayName\": \"Access your organization's directory (preview)\"\r\n },\r\n {\r\n \"claimValue\": \"Directory.Write\",\r\n \"description\": \"Allow the application to read and write data in your organization's directory, such as users and groups.\",\r\n \"directAccessGrantTypes\": [\r\n \"Application\"\r\n ],\r\n \"displayName\": \"Read and write directory data\",\r\n \"impersonationAccessGrantTypes\": [\r\n {\r\n \"impersonated\": \"User\",\r\n \"impersonator\": \"Application\"\r\n }\r\n ],\r\n \"isDisabled\": false,\r\n \"origin\": \"Application\",\r\n \"permissionId\": \"78c8a3c8-a07e-4b9e-af1b-b5ccab50a175\",\r\n \"resourceScopeType\": \"Global\",\r\n \"userConsentDescription\": \"Allow the application to read and write data in your organization's directory, such as users and groups.\",\r\n \"userConsentDisplayName\": \"Read and write directory data\"\r\n },\r\n {\r\n \"claimValue\": \"Directory.Read\",\r\n \"description\": \"Allow the application to read data in your organization's directory, such as users, groups and applications.\",\r\n \"directAccessGrantTypes\": [\r\n \"Application\"\r\n ],\r\n \"displayName\": \"Read directory data\",\r\n \"impersonationAccessGrantTypes\": [\r\n {\r\n \"impersonated\": \"User\",\r\n \"impersonator\": \"Application\"\r\n }\r\n ],\r\n \"isDisabled\": false,\r\n \"origin\": \"Application\",\r\n \"permissionId\": \"5778995a-e1bf-45b8-affa-663a9f3f4d04\",\r\n \"resourceScopeType\": \"Global\",\r\n \"userConsentDescription\": \"Allow the application to read data in your organization's directory, such as users, groups and applications.\",\r\n \"userConsentDisplayName\": \"Read directory data\"\r\n },\r\n {\r\n \"claimValue\": \"UserProfile.Read\",\r\n \"description\": \"Allow users to sign in to the application with their organizational accounts and let the application read the profiles of signed-in users, such as their email address and contact information.\",\r\n \"directAccessGrantTypes\": [],\r\n \"displayName\": \"Enable sign-on and read users' profiles (preview)\",\r\n \"impersonationAccessGrantTypes\": [\r\n {\r\n \"impersonated\": \"User\",\r\n \"impersonator\": \"Application\"\r\n }\r\n ],\r\n \"isDisabled\": false,\r\n \"origin\": \"Application\",\r\n \"permissionId\": \"311a71cc-e848-46a1-bdf8-97ff7156d8e6\",\r\n \"resourceScopeType\": \"Personal\",\r\n \"userConsentDescription\": \"Allow you to sign in to the application with your organizational account and let the application read your profile, such as your email address and contact information.\",\r\n \"userConsentDisplayName\": \"Sign you in and read your profile (preview)\"\r\n }\r\n ],\r\n \"authenticationPolicy\": null,\r\n \"displayName\": \"Microsoft.Azure.ActiveDirectory\",\r\n \"errorUrl\": null,\r\n \"explicitAccessGrantRequired\": false,\r\n \"homepage\": null,\r\n \"keyCredentials\": [],\r\n \"logoutUrl\": null,\r\n \"microsoftFirstParty\": true,\r\n \"passwordCredentials\": [],\r\n \"publisherName\": null,\r\n \"replyUrls\": [],\r\n \"resourceApplicationSet\": null,\r\n \"samlMetadataUrl\": null,\r\n \"servicePrincipalNames\": [\r\n \"https://graph.windows.net\",\r\n \"00000002-0000-0000-c000-000000000000/graph.windows.net\",\r\n \"00000002-0000-0000-c000-000000000000/directory.windows.net\",\r\n \"00000002-0000-0000-c000-000000000000\",\r\n \"Microsoft.Azure.ActiveDirectory\"\r\n ],\r\n \"tags\": [],\r\n \"webApi\": null,\r\n \"webApp\": null\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal\",\r\n \"objectType\": \"ServicePrincipal\",\r\n \"objectId\": \"2f3e66a5-a1b3-4094-a846-4baf81cdfc6d\",\r\n \"softDeletionTimestamp\": null,\r\n \"accountEnabled\": true,\r\n \"appDisplayName\": \"Policy Administration Service\",\r\n \"appId\": \"0469d4cd-df37-4d93-8a61-f8c75b809164\",\r\n \"appMetadata\": null,\r\n \"appOwnerTenantId\": null,\r\n \"appPermissions\": [],\r\n \"authenticationPolicy\": null,\r\n \"displayName\": \"Microsoft Policy Administration Service\",\r\n \"errorUrl\": null,\r\n \"explicitAccessGrantRequired\": false,\r\n \"homepage\": null,\r\n \"keyCredentials\": [],\r\n \"logoutUrl\": null,\r\n \"microsoftFirstParty\": true,\r\n \"passwordCredentials\": [],\r\n \"publisherName\": null,\r\n \"replyUrls\": [\r\n \"https://pas.windows.net\"\r\n ],\r\n \"resourceApplicationSet\": null,\r\n \"samlMetadataUrl\": null,\r\n \"servicePrincipalNames\": [\r\n \"https://pas.windows.net\",\r\n \"0469d4cd-df37-4d93-8a61-f8c75b809164\",\r\n \"Microsoft Policy Administration Service\"\r\n ],\r\n \"tags\": [],\r\n \"webApi\": null,\r\n \"webApp\": null\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal\",\r\n \"objectType\": \"ServicePrincipal\",\r\n \"objectId\": \"58fe5a3b-3a72-4924-ab1f-a4a26b39d9e5\",\r\n \"softDeletionTimestamp\": null,\r\n \"accountEnabled\": true,\r\n \"appDisplayName\": null,\r\n \"appId\": \"0000000f-0000-0000-c000-000000000000\",\r\n \"appMetadata\": null,\r\n \"appOwnerTenantId\": null,\r\n \"appPermissions\": [],\r\n \"authenticationPolicy\": null,\r\n \"displayName\": \"Microsoft.Azure.GraphExplorer\",\r\n \"errorUrl\": null,\r\n \"explicitAccessGrantRequired\": false,\r\n \"homepage\": null,\r\n \"keyCredentials\": [],\r\n \"logoutUrl\": null,\r\n \"microsoftFirstParty\": true,\r\n \"passwordCredentials\": [],\r\n \"publisherName\": null,\r\n \"replyUrls\": [],\r\n \"resourceApplicationSet\": null,\r\n \"samlMetadataUrl\": null,\r\n \"servicePrincipalNames\": [\r\n \"0000000f-0000-0000-c000-000000000000/graphexplorer.windows.net\",\r\n \"0000000f-0000-0000-c000-000000000000\",\r\n \"Microsoft.Azure.GraphExplorer\"\r\n ],\r\n \"tags\": [],\r\n \"webApi\": null,\r\n \"webApp\": null\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal\",\r\n \"objectType\": \"ServicePrincipal\",\r\n \"objectId\": \"5ae77d41-2dec-41e6-9a34-b6928e4312be\",\r\n \"softDeletionTimestamp\": null,\r\n \"accountEnabled\": true,\r\n \"appDisplayName\": null,\r\n \"appId\": \"595d87a1-277b-4c0a-aa7f-44f8a068eafc\",\r\n \"appMetadata\": null,\r\n \"appOwnerTenantId\": null,\r\n \"appPermissions\": [],\r\n \"authenticationPolicy\": null,\r\n \"displayName\": \"Microsoft.SupportTicketSubmission\",\r\n \"errorUrl\": null,\r\n \"explicitAccessGrantRequired\": false,\r\n \"homepage\": null,\r\n \"keyCredentials\": [],\r\n \"logoutUrl\": null,\r\n \"microsoftFirstParty\": true,\r\n \"passwordCredentials\": [],\r\n \"publisherName\": null,\r\n \"replyUrls\": [],\r\n \"resourceApplicationSet\": null,\r\n \"samlMetadataUrl\": null,\r\n \"servicePrincipalNames\": [\r\n \"595d87a1-277b-4c0a-aa7f-44f8a068eafc\",\r\n \"Microsoft.SupportTicketSubmission\"\r\n ],\r\n \"tags\": [],\r\n \"webApi\": null,\r\n \"webApp\": null\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal\",\r\n \"objectType\": \"ServicePrincipal\",\r\n \"objectId\": \"64a789b2-203d-4286-88f4-fcc9ef065b6d\",\r\n \"softDeletionTimestamp\": null,\r\n \"accountEnabled\": true,\r\n \"appDisplayName\": \"RbacBackfill\",\r\n \"appId\": \"914ed757-9257-4200-b68e-a2bed2f12c5a\",\r\n \"appMetadata\": null,\r\n \"appOwnerTenantId\": null,\r\n \"appPermissions\": [],\r\n \"authenticationPolicy\": null,\r\n \"displayName\": \"RbacBackfill\",\r\n \"errorUrl\": null,\r\n \"explicitAccessGrantRequired\": false,\r\n \"homepage\": null,\r\n \"keyCredentials\": [],\r\n \"logoutUrl\": null,\r\n \"microsoftFirstParty\": true,\r\n \"passwordCredentials\": [],\r\n \"publisherName\": null,\r\n \"replyUrls\": [],\r\n \"resourceApplicationSet\": null,\r\n \"samlMetadataUrl\": null,\r\n \"servicePrincipalNames\": [\r\n \"914ed757-9257-4200-b68e-a2bed2f12c5a\",\r\n \"RbacBackfill\"\r\n ],\r\n \"tags\": [],\r\n \"webApi\": null,\r\n \"webApp\": null\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal\",\r\n \"objectType\": \"ServicePrincipal\",\r\n \"objectId\": \"75ed092d-8e37-466a-a09a-63ebb2e85746\",\r\n \"softDeletionTimestamp\": null,\r\n \"accountEnabled\": true,\r\n \"appDisplayName\": \"Azure Portal\",\r\n \"appId\": \"00000013-0000-0000-c000-000000000000\",\r\n \"appMetadata\": null,\r\n \"appOwnerTenantId\": \"f8cdef31-a31e-4b4a-93e4-5f571e91255a\",\r\n \"appPermissions\": [],\r\n \"authenticationPolicy\": null,\r\n \"displayName\": \"Microsoft.Azure.Portal\",\r\n \"errorUrl\": null,\r\n \"explicitAccessGrantRequired\": false,\r\n \"homepage\": null,\r\n \"keyCredentials\": [],\r\n \"logoutUrl\": null,\r\n \"microsoftFirstParty\": true,\r\n \"passwordCredentials\": [],\r\n \"publisherName\": null,\r\n \"replyUrls\": [\r\n \"https://portal.windowsazure.com\",\r\n \"https://manage.windowsazure.com\"\r\n ],\r\n \"resourceApplicationSet\": null,\r\n \"samlMetadataUrl\": null,\r\n \"servicePrincipalNames\": [\r\n \"https://manage.windowsazure.com\",\r\n \"00000013-0000-0000-c000-000000000000\",\r\n \"Microsoft.Azure.Portal\"\r\n ],\r\n \"tags\": [],\r\n \"webApi\": null,\r\n \"webApp\": null\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal\",\r\n \"objectType\": \"ServicePrincipal\",\r\n \"objectId\": \"8f379e12-3dbd-40e2-8e32-341e3d421d11\",\r\n \"softDeletionTimestamp\": null,\r\n \"accountEnabled\": true,\r\n \"appDisplayName\": \"Windows Azure Service Management API\",\r\n \"appId\": \"797f4846-ba00-4fd7-ba43-dac1f8f63013\",\r\n \"appMetadata\": null,\r\n \"appOwnerTenantId\": \"f8cdef31-a31e-4b4a-93e4-5f571e91255a\",\r\n \"appPermissions\": [\r\n {\r\n \"claimValue\": \"user_impersonation\",\r\n \"description\": \"Allow the application to access the Azure Management Service API on behalf of the signed-in user.\",\r\n \"directAccessGrantTypes\": [],\r\n \"displayName\": \"Access Azure Service Management (preview)\",\r\n \"impersonationAccessGrantTypes\": [\r\n {\r\n \"impersonated\": \"User\",\r\n \"impersonator\": \"Application\"\r\n }\r\n ],\r\n \"isDisabled\": false,\r\n \"origin\": \"Application\",\r\n \"permissionId\": \"41094075-9dad-400e-a0bd-54e686782033\",\r\n \"resourceScopeType\": \"Personal\",\r\n \"userConsentDescription\": \"Allow the application to access Azure Service Management API on your behalf.\",\r\n \"userConsentDisplayName\": \"Access Azure Service Management (preview)\"\r\n }\r\n ],\r\n \"authenticationPolicy\": null,\r\n \"displayName\": \"Windows Azure Service Management API\",\r\n \"errorUrl\": null,\r\n \"explicitAccessGrantRequired\": false,\r\n \"homepage\": null,\r\n \"keyCredentials\": [],\r\n \"logoutUrl\": null,\r\n \"microsoftFirstParty\": true,\r\n \"passwordCredentials\": [],\r\n \"publisherName\": null,\r\n \"replyUrls\": [],\r\n \"resourceApplicationSet\": null,\r\n \"samlMetadataUrl\": null,\r\n \"servicePrincipalNames\": [\r\n \"https://management.core.windows.net/\",\r\n \"797f4846-ba00-4fd7-ba43-dac1f8f63013\",\r\n \"Windows Azure Service Management API\"\r\n ],\r\n \"tags\": [],\r\n \"webApi\": null,\r\n \"webApp\": null\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal\",\r\n \"objectType\": \"ServicePrincipal\",\r\n \"objectId\": \"d9d09142-a31e-4e25-a9b3-2c072b6f60f0\",\r\n \"softDeletionTimestamp\": null,\r\n \"accountEnabled\": true,\r\n \"appDisplayName\": \"Office 365 Configure\",\r\n \"appId\": \"aa9ecb1e-fd53-4aaa-a8fe-7a54de2c1334\",\r\n \"appMetadata\": null,\r\n \"appOwnerTenantId\": null,\r\n \"appPermissions\": [],\r\n \"authenticationPolicy\": null,\r\n \"displayName\": \"Microsoft.Office365.Configure\",\r\n \"errorUrl\": null,\r\n \"explicitAccessGrantRequired\": false,\r\n \"homepage\": null,\r\n \"keyCredentials\": [],\r\n \"logoutUrl\": null,\r\n \"microsoftFirstParty\": true,\r\n \"passwordCredentials\": [],\r\n \"publisherName\": null,\r\n \"replyUrls\": [],\r\n \"resourceApplicationSet\": null,\r\n \"samlMetadataUrl\": null,\r\n \"servicePrincipalNames\": [\r\n \"aa9ecb1e-fd53-4aaa-a8fe-7a54de2c1334/configure.office.net\",\r\n \"aa9ecb1e-fd53-4aaa-a8fe-7a54de2c1334\",\r\n \"Microsoft.Office365.Configure\"\r\n ],\r\n \"tags\": [],\r\n \"webApi\": null,\r\n \"webApp\": null\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal\",\r\n \"objectType\": \"ServicePrincipal\",\r\n \"objectId\": \"dbea5a32-0033-4e62-9606-97f75431b5ca\",\r\n \"softDeletionTimestamp\": null,\r\n \"accountEnabled\": true,\r\n \"appDisplayName\": \"Microsoft App Access Panel\",\r\n \"appId\": \"0000000c-0000-0000-c000-000000000000\",\r\n \"appMetadata\": null,\r\n \"appOwnerTenantId\": null,\r\n \"appPermissions\": [],\r\n \"authenticationPolicy\": null,\r\n \"displayName\": \"Microsoft.Azure.ActiveDirectoryUX\",\r\n \"errorUrl\": null,\r\n \"explicitAccessGrantRequired\": false,\r\n \"homepage\": null,\r\n \"keyCredentials\": [],\r\n \"logoutUrl\": null,\r\n \"microsoftFirstParty\": true,\r\n \"passwordCredentials\": [],\r\n \"publisherName\": null,\r\n \"replyUrls\": [],\r\n \"resourceApplicationSet\": null,\r\n \"samlMetadataUrl\": null,\r\n \"servicePrincipalNames\": [\r\n \"0000000c-0000-0000-c000-000000000000/activedirectory.windowsazure.com\",\r\n \"0000000c-0000-0000-c000-000000000000\",\r\n \"Microsoft.Azure.ActiveDirectoryUX\"\r\n ],\r\n \"tags\": [],\r\n \"webApi\": null,\r\n \"webApp\": null\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal\",\r\n \"objectType\": \"ServicePrincipal\",\r\n \"objectId\": \"e68deb93-98e3-476f-8667-1bb60a7f867b\",\r\n \"softDeletionTimestamp\": null,\r\n \"accountEnabled\": true,\r\n \"appDisplayName\": \"sampleapp\",\r\n \"appId\": \"20c58db7-4501-44e8-8e76-6febdb400c6b\",\r\n \"appMetadata\": {\r\n \"version\": 0,\r\n \"data\": []\r\n },\r\n \"appOwnerTenantId\": \"1449d5b7-8a83-47db-ae4c-9b03e888bad0\",\r\n \"appPermissions\": [],\r\n \"authenticationPolicy\": {\r\n \"defaultPolicy\": null,\r\n \"allowedPolicies\": []\r\n },\r\n \"displayName\": \"sampleapp\",\r\n \"errorUrl\": null,\r\n \"explicitAccessGrantRequired\": false,\r\n \"homepage\": \"https://localhost:8080\",\r\n \"keyCredentials\": [],\r\n \"logoutUrl\": null,\r\n \"microsoftFirstParty\": null,\r\n \"passwordCredentials\": [],\r\n \"publisherName\": \"RBAC Testing\",\r\n \"replyUrls\": [\r\n \"https://localhost:8080\"\r\n ],\r\n \"resourceApplicationSet\": null,\r\n \"samlMetadataUrl\": null,\r\n \"servicePrincipalNames\": [\r\n \"https://localhost:8080\",\r\n \"20c58db7-4501-44e8-8e76-6febdb400c6b\"\r\n ],\r\n \"tags\": [\r\n \"WindowsAzureActiveDirectoryIntegratedApp\"\r\n ],\r\n \"webApi\": null,\r\n \"webApp\": false\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal\",\r\n \"objectType\": \"ServicePrincipal\",\r\n \"objectId\": \"f1990eeb-b040-47de-a12e-c45da0f9595a\",\r\n \"softDeletionTimestamp\": null,\r\n \"accountEnabled\": true,\r\n \"appDisplayName\": null,\r\n \"appId\": \"8fca0a66-c008-4564-a876-ab3ae0fd5cff\",\r\n \"appMetadata\": null,\r\n \"appOwnerTenantId\": null,\r\n \"appPermissions\": [],\r\n \"authenticationPolicy\": null,\r\n \"displayName\": \"Microsoft.SMIT\",\r\n \"errorUrl\": null,\r\n \"explicitAccessGrantRequired\": false,\r\n \"homepage\": null,\r\n \"keyCredentials\": [],\r\n \"logoutUrl\": null,\r\n \"microsoftFirstParty\": true,\r\n \"passwordCredentials\": [],\r\n \"publisherName\": null,\r\n \"replyUrls\": [],\r\n \"resourceApplicationSet\": null,\r\n \"samlMetadataUrl\": null,\r\n \"servicePrincipalNames\": [\r\n \"8fca0a66-c008-4564-a876-ab3ae0fd5cff/lowlatency.cloudapp.net\",\r\n \"8fca0a66-c008-4564-a876-ab3ae0fd5cff\",\r\n \"Microsoft.SMIT\"\r\n ],\r\n \"tags\": [],\r\n \"webApi\": null,\r\n \"webApp\": null\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "jC0LEgyX+Xs4wMEfLHHxy6tdbt5rWMqcCmfvwI5RNyo=" + ], + "request-id": [ + "9494cf40-a56e-45dc-8df8-97d638fe98f3" + ], + "client-request-id": [ + "a9963ef0-2c23-4079-8228-fcc5b72de333" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "8_Jea31Z2eaS3S02sh5yBGJK2V8WgwHNRQ69CLy2ym6wiaUVZOJDK1NxP7mndFiMEAH_2Ro84dmTEdNV504tNow9VoWLA2FbFJoeVtMCqv0.d5D8NrQ_XnslTULhZUzjJfQi61YLjLpVAmOJ37fwEgI" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 17:13:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/servicePrincipals?$filter=servicePrincipalNames/any(c:c%20eq%20'Microsoft.SMIT')&api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9zZXJ2aWNlUHJpbmNpcGFscz8kZmlsdGVyPXNlcnZpY2VQcmluY2lwYWxOYW1lcy9hbnkoYzpjJTIwZXElMjAnTWljcm9zb2Z0LlNNSVQnKSZhcGktdmVyc2lvbj0xLjQyLXByZXZpZXdJbnRlcm5hbA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal\",\r\n \"value\": [\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal\",\r\n \"objectType\": \"ServicePrincipal\",\r\n \"objectId\": \"f1990eeb-b040-47de-a12e-c45da0f9595a\",\r\n \"softDeletionTimestamp\": null,\r\n \"accountEnabled\": true,\r\n \"appDisplayName\": null,\r\n \"appId\": \"8fca0a66-c008-4564-a876-ab3ae0fd5cff\",\r\n \"appMetadata\": null,\r\n \"appOwnerTenantId\": null,\r\n \"appPermissions\": [],\r\n \"authenticationPolicy\": null,\r\n \"displayName\": \"Microsoft.SMIT\",\r\n \"errorUrl\": null,\r\n \"explicitAccessGrantRequired\": false,\r\n \"homepage\": null,\r\n \"keyCredentials\": [],\r\n \"logoutUrl\": null,\r\n \"microsoftFirstParty\": true,\r\n \"passwordCredentials\": [],\r\n \"publisherName\": null,\r\n \"replyUrls\": [],\r\n \"resourceApplicationSet\": null,\r\n \"samlMetadataUrl\": null,\r\n \"servicePrincipalNames\": [\r\n \"8fca0a66-c008-4564-a876-ab3ae0fd5cff/lowlatency.cloudapp.net\",\r\n \"8fca0a66-c008-4564-a876-ab3ae0fd5cff\",\r\n \"Microsoft.SMIT\"\r\n ],\r\n \"tags\": [],\r\n \"webApi\": null,\r\n \"webApp\": null\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "jC0LEgyX+Xs4wMEfLHHxy6tdbt5rWMqcCmfvwI5RNyo=" + ], + "request-id": [ + "ac2cefc6-81b2-4784-b9d9-9c3169713ce4" + ], + "client-request-id": [ + "d4d396b4-d0ac-4877-8a8d-2802e8ed8903" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "0wuO22DseV23GTkKelmD8Nrxw4XpQll-R5zvm7YCPzkTbABEkWYYQqQpRc2ImLt7plc9AZNx9O-xWhcNH25-kPeoAHZH8n4Aa38MOBAOppU.y6fTAOOr2MWG4F5jZdu-I4M8aL-omqK93cT9DuNml7w" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 17:13:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9yb2xlRGVmaW5pdGlvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"roleName\": \"Contributor\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Contributors can manage everything except access.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": [\r\n \"Microsoft.Authorization/*/Write\",\r\n \"Microsoft.Authorization/*/Delete\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n },\r\n {\r\n \"properties\": {\r\n \"roleName\": \"Owner\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Owners can manage everything, including access.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"8e3af657-a8ff-443c-a75c-2fe8c4bcb635\"\r\n },\r\n {\r\n \"properties\": {\r\n \"roleName\": \"Reader\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Readers can view everything, but can't make changes.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*/read\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"acdd72a7-3385-48ef-bd42-f606fba81ae7\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:52afb585-f902-4ddf-8c84-0b93336c5493" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31999" + ], + "x-ms-correlation-request-id": [ + "32971fce-1ab8-49f4-b856-875cdd30afe0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T171356Z:32971fce-1ab8-49f4-b856-875cdd30afe0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 17:13:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/SomeResourceGroupForSpn/providers/Microsoft.Authorization/roleAssignments/fa1a4d3b-2cca-406b-8956-6b6b32377641?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9yZXNvdXJjZUdyb3Vwcy9Tb21lUmVzb3VyY2VHcm91cEZvclNwbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZUFzc2lnbm1lbnRzL2ZhMWE0ZDNiLTJjY2EtNDA2Yi04OTU2LTZiNmIzMjM3NzY0MT9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"principalId\": \"f1990eeb-b040-47de-a12e-c45da0f9595a\"\r\n }\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"principalId\": \"f1990eeb-b040-47de-a12e-c45da0f9595a\",\r\n \"scope\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/SomeResourceGroupForSpn\"\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/SomeResourceGroupForSpn/providers/Microsoft.Authorization/roleAssignments/fa1a4d3b-2cca-406b-8956-6b6b32377641\",\r\n \"type\": \"Microsoft.Authorization/roleAssignments\",\r\n \"name\": \"fa1a4d3b-2cca-406b-8956-6b6b32377641\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "westus:2f3ccc15-1c2e-4658-a388-d7be7f5a3bf3" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "073e686e-2420-418d-913e-f552c965870f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T171357Z:073e686e-2420-418d-913e-f552c965870f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 17:13:57 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/SomeResourceGroupForSpn/providers/Microsoft.Authorization/roleAssignments/fa1a4d3b-2cca-406b-8956-6b6b32377641?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9yZXNvdXJjZUdyb3Vwcy9Tb21lUmVzb3VyY2VHcm91cEZvclNwbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZUFzc2lnbm1lbnRzL2ZhMWE0ZDNiLTJjY2EtNDA2Yi04OTU2LTZiNmIzMjM3NzY0MT9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"principalId\": \"f1990eeb-b040-47de-a12e-c45da0f9595a\",\r\n \"scope\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/SomeResourceGroupForSpn\"\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/SomeResourceGroupForSpn/providers/Microsoft.Authorization/roleAssignments/fa1a4d3b-2cca-406b-8956-6b6b32377641\",\r\n \"type\": \"Microsoft.Authorization/roleAssignments\",\r\n \"name\": \"fa1a4d3b-2cca-406b-8956-6b6b32377641\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:86add209-49b4-41cf-aa7e-db42ecde9697" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31998" + ], + "x-ms-correlation-request-id": [ + "ecfb6d32-f3e3-45d5-8eb7-f36886fd668a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T171358Z:ecfb6d32-f3e3-45d5-8eb7-f36886fd668a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 17:13:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZURlZmluaXRpb25zL2FjZGQ3MmE3LTMzODUtNDhlZi1iZDQyLWY2MDZmYmE4MWFlNz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleName\": \"Reader\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Readers can view everything, but can't make changes.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*/read\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"acdd72a7-3385-48ef-bd42-f606fba81ae7\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:d5cfe07f-d5da-4bcc-bdca-b0879bc77d58" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31997" + ], + "x-ms-correlation-request-id": [ + "2f0a1e88-7bb2-47c4-9412-c034f2128e86" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T171358Z:2f0a1e88-7bb2-47c4-9412-c034f2128e86" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 17:13:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZURlZmluaXRpb25zL2FjZGQ3MmE3LTMzODUtNDhlZi1iZDQyLWY2MDZmYmE4MWFlNz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleName\": \"Reader\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Readers can view everything, but can't make changes.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*/read\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"acdd72a7-3385-48ef-bd42-f606fba81ae7\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:427274dd-b1ce-41ca-86e5-76097636d0cf" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31995" + ], + "x-ms-correlation-request-id": [ + "c9e4cb26-7fe8-4bb1-b76e-590a41fba9c5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T171358Z:c9e4cb26-7fe8-4bb1-b76e-590a41fba9c5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 17:13:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZURlZmluaXRpb25zL2FjZGQ3MmE3LTMzODUtNDhlZi1iZDQyLWY2MDZmYmE4MWFlNz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleName\": \"Reader\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Readers can view everything, but can't make changes.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*/read\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"acdd72a7-3385-48ef-bd42-f606fba81ae7\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:c702a86e-2007-4ddb-81ec-209708d8cd02" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31994" + ], + "x-ms-correlation-request-id": [ + "8c5a19da-35ee-4525-a5f0-dcf54e8b8c86" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T171358Z:8c5a19da-35ee-4525-a5f0-dcf54e8b8c86" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 17:13:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZURlZmluaXRpb25zL2FjZGQ3MmE3LTMzODUtNDhlZi1iZDQyLWY2MDZmYmE4MWFlNz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleName\": \"Reader\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Readers can view everything, but can't make changes.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*/read\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"acdd72a7-3385-48ef-bd42-f606fba81ae7\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:04cccf77-7f1a-4609-bda9-2f2e0dd0d37d" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31992" + ], + "x-ms-correlation-request-id": [ + "7bd05457-17f1-41cf-9040-9b768d352d18" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T171400Z:7bd05457-17f1-41cf-9040-9b768d352d18" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 17:14:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/f1990eeb-b040-47de-a12e-c45da0f9595a?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy9mMTk5MGVlYi1iMDQwLTQ3ZGUtYTEyZS1jNDVkYTBmOTU5NWE/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.error\": {\r\n \"code\": \"Request_ResourceNotFound\",\r\n \"message\": {\r\n \"lang\": \"en\",\r\n \"value\": \"Resource 'f1990eeb-b040-47de-a12e-c45da0f9595a' does not exist or one of its queried reference-property objects are not present.\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "ocp-aad-diagnostics-server-name": [ + "jC0LEgyX+Xs4wMEfLHHxy6tdbt5rWMqcCmfvwI5RNyo=" + ], + "request-id": [ + "7c0e3e39-da11-41e0-b7a0-2adbae240ad7" + ], + "client-request-id": [ + "c7d4f827-01d4-47c0-a817-694ee8a04e19" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "dlonYkhzjlJDVZfm0SAHUBds3keZPC--K3FtiB-zOhDWQT_JbS1iMx6-ZYCfg4vh__TtOWcIOBQWPsF6WQdDaIoIvS8W8gmFErC1wNAKcoI.v-IeLNZNb0PASxdm-2OVIRgFjDz06zYv1663deZZL34" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "private" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 17:13:57 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/f1990eeb-b040-47de-a12e-c45da0f9595a?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy9mMTk5MGVlYi1iMDQwLTQ3ZGUtYTEyZS1jNDVkYTBmOTU5NWE/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.error\": {\r\n \"code\": \"Request_ResourceNotFound\",\r\n \"message\": {\r\n \"lang\": \"en\",\r\n \"value\": \"Resource 'f1990eeb-b040-47de-a12e-c45da0f9595a' does not exist or one of its queried reference-property objects are not present.\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "ocp-aad-diagnostics-server-name": [ + "jC0LEgyX+Xs4wMEfLHHxy6tdbt5rWMqcCmfvwI5RNyo=" + ], + "request-id": [ + "c922cc80-c3bd-4394-b00f-e3b2b191d62f" + ], + "client-request-id": [ + "34a6890d-6750-43f3-9aca-8e54882fb719" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "FgQaKYUCI6rPJJ2LbGINFbGa_a7tHLubPbi0zwHvtZRIF7SrXdtCq53jHGSch9srwONCUrkgxYexRYJir_aTz0yfuM4qLHHJ29XITdKuc2Q.ds2YaS6szOn9u_KkehI69iBsyNwVf29VIBuTV45NB1Y" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "private" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 17:13:58 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/f1990eeb-b040-47de-a12e-c45da0f9595a?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy9mMTk5MGVlYi1iMDQwLTQ3ZGUtYTEyZS1jNDVkYTBmOTU5NWE/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.error\": {\r\n \"code\": \"Request_ResourceNotFound\",\r\n \"message\": {\r\n \"lang\": \"en\",\r\n \"value\": \"Resource 'f1990eeb-b040-47de-a12e-c45da0f9595a' does not exist or one of its queried reference-property objects are not present.\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "ocp-aad-diagnostics-server-name": [ + "jC0LEgyX+Xs4wMEfLHHxy6tdbt5rWMqcCmfvwI5RNyo=" + ], + "request-id": [ + "f0d1981b-3e55-416a-a7f4-caeec4156d3e" + ], + "client-request-id": [ + "989cb927-d083-43b6-96be-b52e667e8fda" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "BPyr3WQa0OXZVPV1_KweVO9dUe6u9rExeQK8EjzN9UnZ1nZs1zeJy54thv_DLUFSB7DM4PDnYldFPT3INvgdcXMgpBlSRpY2zooulNvxCyo.j9jifwk_TUSY72TPDQSTINXD2kRjGbnHtQUNYm5IsIM" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "private" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 17:13:58 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/f1990eeb-b040-47de-a12e-c45da0f9595a?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy9mMTk5MGVlYi1iMDQwLTQ3ZGUtYTEyZS1jNDVkYTBmOTU5NWE/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.error\": {\r\n \"code\": \"Request_ResourceNotFound\",\r\n \"message\": {\r\n \"lang\": \"en\",\r\n \"value\": \"Resource 'f1990eeb-b040-47de-a12e-c45da0f9595a' does not exist or one of its queried reference-property objects are not present.\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "ocp-aad-diagnostics-server-name": [ + "jC0LEgyX+Xs4wMEfLHHxy6tdbt5rWMqcCmfvwI5RNyo=" + ], + "request-id": [ + "b5c2d2fd-d825-4926-90c8-b88e9924d34b" + ], + "client-request-id": [ + "a9d82eac-27dd-49f0-a776-cd634b57115f" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "fQ3Ixqs0wJ_N2QFaC1wC-Qe3i4uNaYh9e1UK3NpGwhQv3C_sd2YihPPkjIhGpKcHyNnYxBsn5sB1fBWJKKstaxYsGAMfTGiXpNlIRWgcOyA.Zp_vCPPCXWJhBlcGVprGSw1iBwrverFwyuRJ_pAXGY0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "private" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 17:13:59 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/servicePrincipals/f1990eeb-b040-47de-a12e-c45da0f9595a?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9zZXJ2aWNlUHJpbmNpcGFscy9mMTk5MGVlYi1iMDQwLTQ3ZGUtYTEyZS1jNDVkYTBmOTU5NWE/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal\",\r\n \"objectType\": \"ServicePrincipal\",\r\n \"objectId\": \"f1990eeb-b040-47de-a12e-c45da0f9595a\",\r\n \"softDeletionTimestamp\": null,\r\n \"accountEnabled\": true,\r\n \"appDisplayName\": null,\r\n \"appId\": \"8fca0a66-c008-4564-a876-ab3ae0fd5cff\",\r\n \"appMetadata\": null,\r\n \"appOwnerTenantId\": null,\r\n \"appPermissions\": [],\r\n \"authenticationPolicy\": null,\r\n \"displayName\": \"Microsoft.SMIT\",\r\n \"errorUrl\": null,\r\n \"explicitAccessGrantRequired\": false,\r\n \"homepage\": null,\r\n \"keyCredentials\": [],\r\n \"logoutUrl\": null,\r\n \"microsoftFirstParty\": true,\r\n \"passwordCredentials\": [],\r\n \"publisherName\": null,\r\n \"replyUrls\": [],\r\n \"resourceApplicationSet\": null,\r\n \"samlMetadataUrl\": null,\r\n \"servicePrincipalNames\": [\r\n \"8fca0a66-c008-4564-a876-ab3ae0fd5cff/lowlatency.cloudapp.net\",\r\n \"8fca0a66-c008-4564-a876-ab3ae0fd5cff\",\r\n \"Microsoft.SMIT\"\r\n ],\r\n \"tags\": [],\r\n \"webApi\": null,\r\n \"webApp\": null\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "jC0LEgyX+Xs4wMEfLHHxy6tdbt5rWMqcCmfvwI5RNyo=" + ], + "request-id": [ + "7d34f197-1cf8-4f49-b01d-78e6e4761053" + ], + "client-request-id": [ + "e6bf2a26-569d-4a0d-b4b2-a1ff64ce461f" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "_K9MXjY-cfiwVgUVwDZHQxESMaA5w50dHika0Jtkp4_zAMiiQQnv5KnRe_BLJeg0kKWoYPu0kvIkUcXEwlyZGyWo8s9e7NCHgvFFTShBvjA.U61rlrHg7Ddu3MSTQSHgPi-oA_N_VC1mP-HUBHXushU" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 17:13:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/servicePrincipals/f1990eeb-b040-47de-a12e-c45da0f9595a?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9zZXJ2aWNlUHJpbmNpcGFscy9mMTk5MGVlYi1iMDQwLTQ3ZGUtYTEyZS1jNDVkYTBmOTU5NWE/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal\",\r\n \"objectType\": \"ServicePrincipal\",\r\n \"objectId\": \"f1990eeb-b040-47de-a12e-c45da0f9595a\",\r\n \"softDeletionTimestamp\": null,\r\n \"accountEnabled\": true,\r\n \"appDisplayName\": null,\r\n \"appId\": \"8fca0a66-c008-4564-a876-ab3ae0fd5cff\",\r\n \"appMetadata\": null,\r\n \"appOwnerTenantId\": null,\r\n \"appPermissions\": [],\r\n \"authenticationPolicy\": null,\r\n \"displayName\": \"Microsoft.SMIT\",\r\n \"errorUrl\": null,\r\n \"explicitAccessGrantRequired\": false,\r\n \"homepage\": null,\r\n \"keyCredentials\": [],\r\n \"logoutUrl\": null,\r\n \"microsoftFirstParty\": true,\r\n \"passwordCredentials\": [],\r\n \"publisherName\": null,\r\n \"replyUrls\": [],\r\n \"resourceApplicationSet\": null,\r\n \"samlMetadataUrl\": null,\r\n \"servicePrincipalNames\": [\r\n \"8fca0a66-c008-4564-a876-ab3ae0fd5cff/lowlatency.cloudapp.net\",\r\n \"8fca0a66-c008-4564-a876-ab3ae0fd5cff\",\r\n \"Microsoft.SMIT\"\r\n ],\r\n \"tags\": [],\r\n \"webApi\": null,\r\n \"webApp\": null\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "jC0LEgyX+Xs4wMEfLHHxy6tdbt5rWMqcCmfvwI5RNyo=" + ], + "request-id": [ + "9766c45f-b854-4c6d-8ea5-de6ffb44707e" + ], + "client-request-id": [ + "31303330-bd97-49cf-b206-ba488a127544" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "JWEnX-Ts5W63Aqui9M8uhISNxuXrL7ids30k3bufUoB7wf_GO3PWM1JjkuxM6_t9SzBYbYs0ncSwCVJeFLEli0xSxRbOCaernHXQwZOWjTE._4rrU6FiTmHjjoBORGmOOsPMKq3JJVpucgZ00MVkHD0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 17:13:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/servicePrincipals/f1990eeb-b040-47de-a12e-c45da0f9595a?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9zZXJ2aWNlUHJpbmNpcGFscy9mMTk5MGVlYi1iMDQwLTQ3ZGUtYTEyZS1jNDVkYTBmOTU5NWE/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal\",\r\n \"objectType\": \"ServicePrincipal\",\r\n \"objectId\": \"f1990eeb-b040-47de-a12e-c45da0f9595a\",\r\n \"softDeletionTimestamp\": null,\r\n \"accountEnabled\": true,\r\n \"appDisplayName\": null,\r\n \"appId\": \"8fca0a66-c008-4564-a876-ab3ae0fd5cff\",\r\n \"appMetadata\": null,\r\n \"appOwnerTenantId\": null,\r\n \"appPermissions\": [],\r\n \"authenticationPolicy\": null,\r\n \"displayName\": \"Microsoft.SMIT\",\r\n \"errorUrl\": null,\r\n \"explicitAccessGrantRequired\": false,\r\n \"homepage\": null,\r\n \"keyCredentials\": [],\r\n \"logoutUrl\": null,\r\n \"microsoftFirstParty\": true,\r\n \"passwordCredentials\": [],\r\n \"publisherName\": null,\r\n \"replyUrls\": [],\r\n \"resourceApplicationSet\": null,\r\n \"samlMetadataUrl\": null,\r\n \"servicePrincipalNames\": [\r\n \"8fca0a66-c008-4564-a876-ab3ae0fd5cff/lowlatency.cloudapp.net\",\r\n \"8fca0a66-c008-4564-a876-ab3ae0fd5cff\",\r\n \"Microsoft.SMIT\"\r\n ],\r\n \"tags\": [],\r\n \"webApi\": null,\r\n \"webApp\": null\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "jC0LEgyX+Xs4wMEfLHHxy6tdbt5rWMqcCmfvwI5RNyo=" + ], + "request-id": [ + "4c84466e-da3a-4f39-8b29-89335497fb45" + ], + "client-request-id": [ + "9a5fe4f6-fdc5-48f5-9840-e2ac566467af" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "rvCs5hUrNU4NDaHzcE-rRoVReWaqn-r0aZEk6hz0pCo2hFx9IhK0olP84YdQey6sjfIyRKtfL4ydW3h-ouUVc449A5aKsF8Tf3M1Rafir5Y.Q-mNxsTAp-PCC2Ry7o6H8lwk6Ru7OJh9SoHk87y1CUY" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 17:13:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/servicePrincipals/f1990eeb-b040-47de-a12e-c45da0f9595a?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9zZXJ2aWNlUHJpbmNpcGFscy9mMTk5MGVlYi1iMDQwLTQ3ZGUtYTEyZS1jNDVkYTBmOTU5NWE/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal\",\r\n \"objectType\": \"ServicePrincipal\",\r\n \"objectId\": \"f1990eeb-b040-47de-a12e-c45da0f9595a\",\r\n \"softDeletionTimestamp\": null,\r\n \"accountEnabled\": true,\r\n \"appDisplayName\": null,\r\n \"appId\": \"8fca0a66-c008-4564-a876-ab3ae0fd5cff\",\r\n \"appMetadata\": null,\r\n \"appOwnerTenantId\": null,\r\n \"appPermissions\": [],\r\n \"authenticationPolicy\": null,\r\n \"displayName\": \"Microsoft.SMIT\",\r\n \"errorUrl\": null,\r\n \"explicitAccessGrantRequired\": false,\r\n \"homepage\": null,\r\n \"keyCredentials\": [],\r\n \"logoutUrl\": null,\r\n \"microsoftFirstParty\": true,\r\n \"passwordCredentials\": [],\r\n \"publisherName\": null,\r\n \"replyUrls\": [],\r\n \"resourceApplicationSet\": null,\r\n \"samlMetadataUrl\": null,\r\n \"servicePrincipalNames\": [\r\n \"8fca0a66-c008-4564-a876-ab3ae0fd5cff/lowlatency.cloudapp.net\",\r\n \"8fca0a66-c008-4564-a876-ab3ae0fd5cff\",\r\n \"Microsoft.SMIT\"\r\n ],\r\n \"tags\": [],\r\n \"webApi\": null,\r\n \"webApp\": null\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "jC0LEgyX+Xs4wMEfLHHxy6tdbt5rWMqcCmfvwI5RNyo=" + ], + "request-id": [ + "21abce32-4ea6-4ca4-8422-7098012c9c6e" + ], + "client-request-id": [ + "d76bbecb-4984-4f7a-8424-e76571a447c2" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "8Eo7Qn7MuDo8ecCbApKirA71tVD9N4AYykiNM48cT1E2iZc0h5gWlypRRJremOAd10yHh4mO_QpX-b6tZ8_jog-aON8isdY3yu67ovW1V4U.KYpzRLOcuiWd7V_tImvY-xzfooUzTLNMHUjtHCkqsaQ" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 17:13:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleAssignments?&$filter=principalId%20eq%20'f1990eeb-b040-47de-a12e-c45da0f9595a'&api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9yb2xlQXNzaWdubWVudHM/JiRmaWx0ZXI9cHJpbmNpcGFsSWQlMjBlcSUyMCdmMTk5MGVlYi1iMDQwLTQ3ZGUtYTEyZS1jNDVkYTBmOTU5NWEnJmFwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"principalId\": \"f1990eeb-b040-47de-a12e-c45da0f9595a\",\r\n \"scope\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/nonexistentRGForSpn\"\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/nonexistentRGForSpn/providers/Microsoft.Authorization/roleAssignments/bf13ced9-00e6-452c-bc8a-0121df14c994\",\r\n \"type\": \"Microsoft.Authorization/roleAssignments\",\r\n \"name\": \"bf13ced9-00e6-452c-bc8a-0121df14c994\"\r\n },\r\n {\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"principalId\": \"f1990eeb-b040-47de-a12e-c45da0f9595a\",\r\n \"scope\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/SomeResourceGroupForSpn\"\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/SomeResourceGroupForSpn/providers/Microsoft.Authorization/roleAssignments/fa1a4d3b-2cca-406b-8956-6b6b32377641\",\r\n \"type\": \"Microsoft.Authorization/roleAssignments\",\r\n \"name\": \"fa1a4d3b-2cca-406b-8956-6b6b32377641\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:ac2bc920-ba88-44d9-a366-a7db3d48626e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31996" + ], + "x-ms-correlation-request-id": [ + "5ac499f2-0db9-4448-a1c8-f7fae8ede35d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T171358Z:5ac499f2-0db9-4448-a1c8-f7fae8ede35d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 17:13:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleAssignments?&$filter=principalId%20eq%20'f1990eeb-b040-47de-a12e-c45da0f9595a'&api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9yb2xlQXNzaWdubWVudHM/JiRmaWx0ZXI9cHJpbmNpcGFsSWQlMjBlcSUyMCdmMTk5MGVlYi1iMDQwLTQ3ZGUtYTEyZS1jNDVkYTBmOTU5NWEnJmFwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"principalId\": \"f1990eeb-b040-47de-a12e-c45da0f9595a\",\r\n \"scope\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/nonexistentRGForSpn\"\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/nonexistentRGForSpn/providers/Microsoft.Authorization/roleAssignments/bf13ced9-00e6-452c-bc8a-0121df14c994\",\r\n \"type\": \"Microsoft.Authorization/roleAssignments\",\r\n \"name\": \"bf13ced9-00e6-452c-bc8a-0121df14c994\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:1817520b-91a7-4d68-8cce-710d78334243" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31993" + ], + "x-ms-correlation-request-id": [ + "2ec1d779-2cd7-4d23-861d-b28cfa6a8ba1" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T171400Z:2ec1d779-2cd7-4d23-861d-b28cfa6a8ba1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 17:14:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/SomeResourceGroupForSpn/providers/Microsoft.Authorization/roleAssignments/fa1a4d3b-2cca-406b-8956-6b6b32377641?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9yZXNvdXJjZUdyb3Vwcy9Tb21lUmVzb3VyY2VHcm91cEZvclNwbi9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZUFzc2lnbm1lbnRzL2ZhMWE0ZDNiLTJjY2EtNDA2Yi04OTU2LTZiNmIzMjM3NzY0MT9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "westus:633f4f38-8f08-4f10-8d45-2cc039c69f87" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "62f1e1b6-9951-430c-9a35-545f5f4629a4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T171400Z:62f1e1b6-9951-430c-9a35-545f5f4629a4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 17:14:00 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "3ca49042-782a-4cc9-89b5-ee1b487fe115", + "TenantId": "1449d5b7-8a83-47db-ae4c-9b03e888bad0" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaByUpn.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaByUpn.json new file mode 100644 index 000000000000..29f1b1c387f0 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaByUpn.json @@ -0,0 +1,894 @@ +{ + "Entries": [ + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users?&api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycz8mYXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"value\": [\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"a73a146e-93ad-43bf-8590-2f43343656b5\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Global Administrator for RBAC Testing\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Global\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"admin\",\r\n \"mobile\": null,\r\n \"netId\": \"1003BFFD8B9977C6\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [\r\n \"markcowl@microsoft.com\"\r\n ],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"admin@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"Admin\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"admin@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"f6b529cb-97da-4126-b925-16fecac9679f\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [\r\n {\r\n \"type\": 5,\r\n \"identityProvider\": null,\r\n \"key\": \"EAM//4ueL3M=\"\r\n }\r\n ],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Alternative Owner\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Alternative\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"alt-owner_azsdkposhteamoutlook.onmicrosoft.com#EXT#\",\r\n \"mobile\": null,\r\n \"netId\": \"100300008BA3AFD4\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [\r\n \"alt-owner@azsdkposhteamoutlook.onmicrosoft.com\"\r\n ],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"alt-owner@azsdkposhteamoutlook.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"Owner\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"alt-owner_azsdkposhteamoutlook.onmicrosoft.com#EXT#@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"da03a14a-f92e-4d70-b5c7-b0dad6324b04\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [\r\n {\r\n \"type\": 1,\r\n \"identityProvider\": null,\r\n \"key\": \"AAN//tE+u3M=\"\r\n }\r\n ],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Mark Cowlishaw\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Mark\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"azsdkposhteam_outlook.com#EXT#\",\r\n \"mobile\": null,\r\n \"netId\": \"100300008B9B411F\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [\r\n \"azsdkposhteam@outlook.com\"\r\n ],\r\n \"passwordPolicies\": null,\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"azsdkposhteam@outlook.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"Cowlishaw\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"azsdkposhteam_outlook.com#EXT#@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"bac2a76b-6dc2-4343-be12-4af6dff38cac\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [\r\n {\r\n \"type\": 1,\r\n \"identityProvider\": null,\r\n \"key\": \"AAMAAIngDtI=\"\r\n }\r\n ],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Marky mark\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Mark\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"markcowl_live.com#EXT#\",\r\n \"mobile\": null,\r\n \"netId\": \"1003BFFD8BA27081\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [\r\n \"markcowl@live.com\"\r\n ],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"markcowl@live.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"Cowlishaw\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"markcowl_live.com#EXT#@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"7b45838f-42c3-4fef-a85a-0a9051dfda41\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Owner1\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Owner\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"owner1\",\r\n \"mobile\": null,\r\n \"netId\": \"10033FFF8B95D83D\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"owner1@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"One\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"owner1@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"576b6988-ffa9-4096-a98f-c2151f8ddab1\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Owner2\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Owner\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"owner2\",\r\n \"mobile\": null,\r\n \"netId\": \"1003BFFD8B998B5C\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"owner2@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"Two\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"owner2@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"4f8bcdeb-e36d-4fcd-9e21-c5c76dd38a74\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Reader1\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Reader\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"reader1\",\r\n \"mobile\": null,\r\n \"netId\": \"1003BFFD8B99874F\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"reader1@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"One\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"reader1@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"fcb281e3-9b38-4868-abec-2c640743cfa9\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"Reader2\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Reader\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"reader2\",\r\n \"mobile\": null,\r\n \"netId\": \"10033FFF8B95D58F\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"reader2@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"Two\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"reader2@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"546880c8-4956-4527-a17f-6671332ef66a\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"webadmin1\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Web\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"webadmin1\",\r\n \"mobile\": null,\r\n \"netId\": \"10033FFF8B95D9C3\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"webadmin1@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"AdminOne\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"webadmin1@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n },\r\n {\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"5509dd91-9239-4de9-877c-985984f9284e\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"webadmin2\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Web\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"webadmin2\",\r\n \"mobile\": null,\r\n \"netId\": \"1003BFFD8B998CA0\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"webadmin2@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"AdminTwo\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"webadmin2@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "TeRcHeoqA22BHcRGBKky0IV4jTQ6ab7yWgt9gZFyqCs=" + ], + "request-id": [ + "f48f163f-0fa9-46c2-9a83-b050cc8d9e40" + ], + "client-request-id": [ + "c4706566-918c-4a2a-867e-acb135255632" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "YEa9ta2IYxCGGq1aUN9CXL7QwNO_ifWWGd7sDqJmy3QoKz0T5dLIkhX4XnojaVaNZk_hz1P4TydSdUv1_g4zOThnkdCHOCFuIAoeP-XbrQM.ITARncHmg7JIBFytX3gW7RfyzUrBoBZzBnSDCh4mPrc" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 01:50:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourcegroups?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Jlc291cmNlZ3JvdXBzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1\",\r\n \"name\": \"contrib1\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/owner1\",\r\n \"name\": \"owner1\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/reader1\",\r\n \"name\": \"reader1\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/testg1\",\r\n \"name\": \"testg1\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31941" + ], + "x-ms-request-id": [ + "fc035f1d-42b9-455a-a898-0e0074db0d3a" + ], + "x-ms-correlation-request-id": [ + "fc035f1d-42b9-455a-a898-0e0074db0d3a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015039Z:fc035f1d-42b9-455a-a898-0e0074db0d3a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:50:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourcegroups?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Jlc291cmNlZ3JvdXBzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1\",\r\n \"name\": \"contrib1\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/owner1\",\r\n \"name\": \"owner1\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/reader1\",\r\n \"name\": \"reader1\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/testg1\",\r\n \"name\": \"testg1\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31940" + ], + "x-ms-request-id": [ + "116f3eb9-68f7-4230-889e-eedd748ada26" + ], + "x-ms-correlation-request-id": [ + "116f3eb9-68f7-4230-889e-eedd748ada26" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015039Z:116f3eb9-68f7-4230-889e-eedd748ada26" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:50:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/webadmin2@rbactest.onmicrosoft.com?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy93ZWJhZG1pbjJAcmJhY3Rlc3Qub25taWNyb3NvZnQuY29tP2FwaS12ZXJzaW9uPTEuNDItcHJldmlld0ludGVybmFs", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.User/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"5509dd91-9239-4de9-877c-985984f9284e\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"webadmin2\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Web\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"webadmin2\",\r\n \"mobile\": null,\r\n \"netId\": \"1003BFFD8B998CA0\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"webadmin2@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"AdminTwo\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"webadmin2@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "jC0LEgyX+Xs4wMEfLHHxy6tdbt5rWMqcCmfvwI5RNyo=" + ], + "request-id": [ + "cfe9024e-36ac-4f00-a311-b80dea7e13e0" + ], + "client-request-id": [ + "e1f4a635-4972-47eb-b076-8e9604b513d2" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "GOXHSIAxMCX8o1z7_DhOsw_omguYa-PZK3I1Om953Non79cosbBOTzrclInIPyUdUsVghbkhbGwhDOZ8Nt8kvON-QWnC-mBfhuFZlChBZ3M.bNp0GnEUbw8-f2cJhLgMSXQyhx3Za6WBC1mgqDTnW_A" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 01:50:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9yb2xlRGVmaW5pdGlvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"roleName\": \"Contributor\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Contributors can manage everything except access.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": [\r\n \"Microsoft.Authorization/*/Write\",\r\n \"Microsoft.Authorization/*/Delete\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n },\r\n {\r\n \"properties\": {\r\n \"roleName\": \"Owner\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Owners can manage everything, including access.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"8e3af657-a8ff-443c-a75c-2fe8c4bcb635\"\r\n },\r\n {\r\n \"properties\": {\r\n \"roleName\": \"Reader\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Readers can view everything, but can't make changes.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*/read\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"acdd72a7-3385-48ef-bd42-f606fba81ae7\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:2343b468-f6cf-4a30-a19e-3432a7f8a8ad" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31910" + ], + "x-ms-correlation-request-id": [ + "37e54548-79cf-42ea-b0b7-2a9f08b5cb1a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015040Z:37e54548-79cf-42ea-b0b7-2a9f08b5cb1a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:50:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/testg1/providers/Microsoft.Authorization/roleAssignments/7a750d57-9d92-4be1-ad66-f099cecffc01?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9yZXNvdXJjZUdyb3Vwcy90ZXN0ZzEvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3JvbGVBc3NpZ25tZW50cy83YTc1MGQ1Ny05ZDkyLTRiZTEtYWQ2Ni1mMDk5Y2VjZmZjMDE/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\r\n \"principalId\": \"5509dd91-9239-4de9-877c-985984f9284e\"\r\n }\r\n}", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\r\n \"principalId\": \"5509dd91-9239-4de9-877c-985984f9284e\",\r\n \"scope\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/testg1\"\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/testg1/providers/Microsoft.Authorization/roleAssignments/7a750d57-9d92-4be1-ad66-f099cecffc01\",\r\n \"type\": \"Microsoft.Authorization/roleAssignments\",\r\n \"name\": \"7a750d57-9d92-4be1-ad66-f099cecffc01\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "westus:452dda8f-03ad-4853-84b5-2cddcdb87d2f" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1185" + ], + "x-ms-correlation-request-id": [ + "fdd8c709-d9aa-4631-9d5f-37a875c0edc3" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015041Z:fdd8c709-d9aa-4631-9d5f-37a875c0edc3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:50:40 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/testg1/providers/Microsoft.Authorization/roleAssignments/7a750d57-9d92-4be1-ad66-f099cecffc01?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9yZXNvdXJjZUdyb3Vwcy90ZXN0ZzEvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3JvbGVBc3NpZ25tZW50cy83YTc1MGQ1Ny05ZDkyLTRiZTEtYWQ2Ni1mMDk5Y2VjZmZjMDE/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\r\n \"principalId\": \"5509dd91-9239-4de9-877c-985984f9284e\",\r\n \"scope\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/testg1\"\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/testg1/providers/Microsoft.Authorization/roleAssignments/7a750d57-9d92-4be1-ad66-f099cecffc01\",\r\n \"type\": \"Microsoft.Authorization/roleAssignments\",\r\n \"name\": \"7a750d57-9d92-4be1-ad66-f099cecffc01\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:c0f34d11-74e0-4eb7-a078-b35c594c584e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31909" + ], + "x-ms-correlation-request-id": [ + "d9d63eb2-d557-4496-bc55-016c1bb743ff" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015041Z:d9d63eb2-d557-4496-bc55-016c1bb743ff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:50:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZURlZmluaXRpb25zL2IyNDk4OGFjLTYxODAtNDJhMC1hYjg4LTIwZjczODJkZDI0Yz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleName\": \"Contributor\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Contributors can manage everything except access.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": [\r\n \"Microsoft.Authorization/*/Write\",\r\n \"Microsoft.Authorization/*/Delete\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:5b72b7e7-ef78-4efe-9825-78c78a7bb449" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31908" + ], + "x-ms-correlation-request-id": [ + "9f843a64-88c2-464f-89d9-266c717c455d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015041Z:9f843a64-88c2-464f-89d9-266c717c455d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:50:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZURlZmluaXRpb25zL2IyNDk4OGFjLTYxODAtNDJhMC1hYjg4LTIwZjczODJkZDI0Yz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleName\": \"Contributor\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Contributors can manage everything except access.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": [\r\n \"Microsoft.Authorization/*/Write\",\r\n \"Microsoft.Authorization/*/Delete\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:2684f89a-24dd-425a-b887-4f661b488368" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31905" + ], + "x-ms-correlation-request-id": [ + "580c2c33-98fe-473d-bcc8-2488089790f8" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015042Z:580c2c33-98fe-473d-bcc8-2488089790f8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:50:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/5509dd91-9239-4de9-877c-985984f9284e?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy81NTA5ZGQ5MS05MjM5LTRkZTktODc3Yy05ODU5ODRmOTI4NGU/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.User/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"5509dd91-9239-4de9-877c-985984f9284e\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"webadmin2\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Web\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"webadmin2\",\r\n \"mobile\": null,\r\n \"netId\": \"1003BFFD8B998CA0\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"webadmin2@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"AdminTwo\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"webadmin2@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "jC0LEgyX+Xs4wMEfLHHxy6tdbt5rWMqcCmfvwI5RNyo=" + ], + "request-id": [ + "4474eae0-2c8c-4fc5-b0ef-c1031006f195" + ], + "client-request-id": [ + "e84aab2e-0714-4843-9098-e8f345928830" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "zIKavK5vvep4OMhwSEqLN4lLlAMnTDlBZVYKAw2poao2jZASwu3JcrfATRbOoz6Zu2BykSc19Q2NoWL2jD4LmMU3WTdhf1rweB3eY_DRkBQ.5XqvN83Is7ForfqIz3BC8sCAV28ZLsfdAyrKNEptMyE" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 01:50:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/5509dd91-9239-4de9-877c-985984f9284e?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy81NTA5ZGQ5MS05MjM5LTRkZTktODc3Yy05ODU5ODRmOTI4NGU/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.User/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"5509dd91-9239-4de9-877c-985984f9284e\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"webadmin2\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Web\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"webadmin2\",\r\n \"mobile\": null,\r\n \"netId\": \"1003BFFD8B998CA0\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"webadmin2@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"AdminTwo\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"webadmin2@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "jC0LEgyX+Xs4wMEfLHHxy6tdbt5rWMqcCmfvwI5RNyo=" + ], + "request-id": [ + "f669c5b4-3a1c-4868-8432-858de8c63251" + ], + "client-request-id": [ + "022d46a4-df85-4251-a7d2-0a749f3d784f" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "xdj0Vv_cuQuVJi_rH4vuvvDyqWI9tZyaK40B6USHPa5myzOl44zNzpUJcSIxLpM9jd7sbcDX6pvkLi-aqO4k6-hJ605QWqwihsnnqKEXv-c.W9nf54wk6BZ_V8_CeUR3auGQoGd6NQ85b4ks7_66eqc" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 01:50:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/5509dd91-9239-4de9-877c-985984f9284e?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy81NTA5ZGQ5MS05MjM5LTRkZTktODc3Yy05ODU5ODRmOTI4NGU/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.User/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"5509dd91-9239-4de9-877c-985984f9284e\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"webadmin2\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Web\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"webadmin2\",\r\n \"mobile\": null,\r\n \"netId\": \"1003BFFD8B998CA0\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"webadmin2@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"AdminTwo\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"webadmin2@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "jC0LEgyX+Xs4wMEfLHHxy6tdbt5rWMqcCmfvwI5RNyo=" + ], + "request-id": [ + "ddaed303-67f8-4373-9c27-e1f715802710" + ], + "client-request-id": [ + "acb63867-c8e4-4138-b7fd-4027b8dff67f" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "465TuaCmL9dLd14KbGM3BDsQY7-naTi3icCRlo02ndSVv_3-PRB0F3PxEOdOXPltzxnOA29zA6uFTW3iCGBr9NbI6VQgRVJJmiJT5O2a7q0.7LKplQkrL3pwAfITtin6AMlSaovUSLNa2euLHORTnIw" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 01:50:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/5509dd91-9239-4de9-877c-985984f9284e?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy81NTA5ZGQ5MS05MjM5LTRkZTktODc3Yy05ODU5ODRmOTI4NGU/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.User/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"5509dd91-9239-4de9-877c-985984f9284e\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"webadmin2\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": \"Web\",\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"webadmin2\",\r\n \"mobile\": null,\r\n \"netId\": \"1003BFFD8B998CA0\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": \"None\",\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"webadmin2@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": \"AdminTwo\",\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"webadmin2@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "jC0LEgyX+Xs4wMEfLHHxy6tdbt5rWMqcCmfvwI5RNyo=" + ], + "request-id": [ + "1de3a8fa-bd61-4c26-a44f-80e5dff4b1ac" + ], + "client-request-id": [ + "d95cbd9f-9cdf-40cd-b9ab-f1b9b7b25611" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "YE11z2L4fBwkEZXyntND_Gy_iZIMTdXEo37nRjMGNZjD6msfFhfYFZ-3mXVweOLYPdyEjI7-qk87zMx4piBg06xWu9RCGAufimrqppJ_k0A.90sJoJnQmFjIWk8wUUyn81UwvSKsBoSD3w3A9nO3PzY" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Wed, 17 Sep 2014 01:50:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleAssignments?&$filter=principalId%20eq%20'5509dd91-9239-4de9-877c-985984f9284e'&api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9yb2xlQXNzaWdubWVudHM/JiRmaWx0ZXI9cHJpbmNpcGFsSWQlMjBlcSUyMCc1NTA5ZGQ5MS05MjM5LTRkZTktODc3Yy05ODU5ODRmOTI4NGUnJmFwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"principalId\": \"5509dd91-9239-4de9-877c-985984f9284e\",\r\n \"scope\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/nonexistentRG\"\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/nonexistentRG/providers/Microsoft.Authorization/roleAssignments/ddfb9670-5239-475b-9428-be0adc07bef1\",\r\n \"type\": \"Microsoft.Authorization/roleAssignments\",\r\n \"name\": \"ddfb9670-5239-475b-9428-be0adc07bef1\"\r\n },\r\n {\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\r\n \"principalId\": \"5509dd91-9239-4de9-877c-985984f9284e\",\r\n \"scope\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/testg1\"\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/testg1/providers/Microsoft.Authorization/roleAssignments/7a750d57-9d92-4be1-ad66-f099cecffc01\",\r\n \"type\": \"Microsoft.Authorization/roleAssignments\",\r\n \"name\": \"7a750d57-9d92-4be1-ad66-f099cecffc01\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:dbecf4b2-f5f1-4ea4-89b4-19646c5273e9" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31907" + ], + "x-ms-correlation-request-id": [ + "bb189a8e-3189-47bd-8f03-53f0f6720449" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015042Z:bb189a8e-3189-47bd-8f03-53f0f6720449" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:50:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleAssignments?&$filter=principalId%20eq%20'5509dd91-9239-4de9-877c-985984f9284e'&api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9yb2xlQXNzaWdubWVudHM/JiRmaWx0ZXI9cHJpbmNpcGFsSWQlMjBlcSUyMCc1NTA5ZGQ5MS05MjM5LTRkZTktODc3Yy05ODU5ODRmOTI4NGUnJmFwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"principalId\": \"5509dd91-9239-4de9-877c-985984f9284e\",\r\n \"scope\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/nonexistentRG\"\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/nonexistentRG/providers/Microsoft.Authorization/roleAssignments/ddfb9670-5239-475b-9428-be0adc07bef1\",\r\n \"type\": \"Microsoft.Authorization/roleAssignments\",\r\n \"name\": \"ddfb9670-5239-475b-9428-be0adc07bef1\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:6aaa5d56-1003-4e9a-8e5f-d0af398cabb8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31904" + ], + "x-ms-correlation-request-id": [ + "1f4ec3bd-dc4d-47fa-a8f1-29d7c9dbde9c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015043Z:1f4ec3bd-dc4d-47fa-a8f1-29d7c9dbde9c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:50:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZURlZmluaXRpb25zL2FjZGQ3MmE3LTMzODUtNDhlZi1iZDQyLWY2MDZmYmE4MWFlNz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleName\": \"Reader\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Readers can view everything, but can't make changes.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*/read\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"acdd72a7-3385-48ef-bd42-f606fba81ae7\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:b15d7845-7304-4385-9283-d15185257e47" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31906" + ], + "x-ms-correlation-request-id": [ + "1dd22a71-e3c6-48af-95db-3c073e756392" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015042Z:1dd22a71-e3c6-48af-95db-3c073e756392" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:50:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZURlZmluaXRpb25zL2FjZGQ3MmE3LTMzODUtNDhlZi1iZDQyLWY2MDZmYmE4MWFlNz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleName\": \"Reader\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Readers can view everything, but can't make changes.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*/read\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"acdd72a7-3385-48ef-bd42-f606fba81ae7\"\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:a4dc92ab-dbb9-4c97-8cd8-7caa5572758f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31903" + ], + "x-ms-correlation-request-id": [ + "51547a60-4b81-407c-89ae-eb8f4ce28f72" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015043Z:51547a60-4b81-407c-89ae-eb8f4ce28f72" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:50:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/testg1/providers/Microsoft.Authorization/roleAssignments/7a750d57-9d92-4be1-ad66-f099cecffc01?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9yZXNvdXJjZUdyb3Vwcy90ZXN0ZzEvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3JvbGVBc3NpZ25tZW50cy83YTc1MGQ1Ny05ZDkyLTRiZTEtYWQ2Ni1mMDk5Y2VjZmZjMDE/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "westus:70ab6090-967a-4ced-9d3b-58514d9478de" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1184" + ], + "x-ms-correlation-request-id": [ + "6153d582-fc9b-4681-b11c-8f0e4cbb6bea" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140917T015043Z:6153d582-fc9b-4681-b11c-8f0e4cbb6bea" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 17 Sep 2014 01:50:43 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "3ca49042-782a-4cc9-89b5-ee1b487fe115", + "TenantId": "1449d5b7-8a83-47db-ae4c-9b03e888bad0" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaNegativeScenarios.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaNegativeScenarios.json new file mode 100644 index 000000000000..f10dd856ce60 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaNegativeScenarios.json @@ -0,0 +1,206 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleAssignments?&$filter=principalId%20eq%20'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa'&api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9yb2xlQXNzaWdubWVudHM/JiRmaWx0ZXI9cHJpbmNpcGFsSWQlMjBlcSUyMCdhYWFhYWFhYS1hYWFhLWFhYWEtYWFhYS1hYWFhYWFhYWFhYWEnJmFwaS12ZXJzaW9uPTIwMTQtMDctMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:d0c705e3-fad6-4f89-9a27-f7293422fb24" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31989" + ], + "x-ms-correlation-request-id": [ + "374d21e3-9749-4afc-8b9e-21e2ddfd34a5" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140915T235131Z:374d21e3-9749-4afc-8b9e-21e2ddfd34a5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 Sep 2014 23:51:31 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/nonexistent@provider.com?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy9ub25leGlzdGVudEBwcm92aWRlci5jb20/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.error\": {\r\n \"code\": \"Request_ResourceNotFound\",\r\n \"message\": {\r\n \"lang\": \"en\",\r\n \"value\": \"Resource 'nonexistent@provider.com' does not exist or one of its queried reference-property objects are not present.\"\r\n }\r\n }\r\n}", + "ResponseHeaders": { + "ocp-aad-diagnostics-server-name": [ + "0KG3XJca10JBaCPPVyV6S/TPZvVBRyYmKz0GZKrigX0=" + ], + "request-id": [ + "2a62d192-c67a-4c20-a233-2ac9036772c8" + ], + "client-request-id": [ + "bb4ec3b6-28d4-4aea-be83-33f05d250df6" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "oX-z3dVYrpKpqzPeQaNpWugF8eg9wOxNSHX-vb3Ntp6fOVrdaFyYfQ2MvbtUUv6HTnKdOJ0YoGLpasiMyR0Uqp7m97STF-xi91VvD23DS1A.mfZ-KCp8x6IT8EKPDbHHHYOPhEP1M-Nh3rhXi1uPc_c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "private" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Mon, 15 Sep 2014 23:51:31 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/servicePrincipals?$filter=servicePrincipalNames/any(c:c%20eq%20'bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb')&api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC9zZXJ2aWNlUHJpbmNpcGFscz8kZmlsdGVyPXNlcnZpY2VQcmluY2lwYWxOYW1lcy9hbnkoYzpjJTIwZXElMjAnYmJiYmJiYmItYmJiYi1iYmJiLWJiYmItYmJiYmJiYmJiYmJiJykmYXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.ServicePrincipal\",\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "0KG3XJca10JBaCPPVyV6S/TPZvVBRyYmKz0GZKrigX0=" + ], + "request-id": [ + "0f930761-2271-401b-9686-12aa512722b6" + ], + "client-request-id": [ + "6c3b2a3f-9cf6-4bbe-90d2-e86389cb250d" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "PmJ7L4OP3yAiB8K40dalrv6mxP8E_iQG5r5iNlv0CKix76r1DDj6DIYrlcZ7CWEAp2Yj-KG8IFyT9Xt8qnUIfxqj_ppuCM3YJPVB69xdVCw.q1P0Ad5McuvkwoUf9iEY4p6FIaEomTEov4InznXf2rg" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Mon, 15 Sep 2014 23:51:32 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/nonexistent/providers/Microsoft.Authorization/roleAssignments?$filter=atScope()&api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9wcm92aWRlcnMvbm9uZXhpc3RlbnQvcHJvdmlkZXJzL01pY3Jvc29mdC5BdXRob3JpemF0aW9uL3JvbGVBc3NpZ25tZW50cz8kZmlsdGVyPWF0U2NvcGUoKSZhcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"InvalidResourceNamespace\",\r\n \"message\": \"The resource namespace 'nonexistent' is invalid.\"\r\n }\r\n}", + "ResponseHeaders": { + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "f3e798c6-279b-44c6-ae6b-1357525ee8b2" + ], + "x-ms-correlation-request-id": [ + "f3e798c6-279b-44c6-ae6b-1357525ee8b2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140915T235132Z:f3e798c6-279b-44c6-ae6b-1357525ee8b2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 15 Sep 2014 23:51:31 GMT" + ] + }, + "StatusCode": 404 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "3ca49042-782a-4cc9-89b5-ee1b487fe115", + "TenantId": "1449d5b7-8a83-47db-ae4c-9b03e888bad0" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaUserPermissions_Cleanup.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaUserPermissions_Cleanup.json new file mode 100644 index 000000000000..7df4a1058d50 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaUserPermissions_Cleanup.json @@ -0,0 +1,122 @@ +{ + "Entries": [ + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/68730ae1-2d5c-446b-b37c-bd495a91bf6d?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy82ODczMGFlMS0yZDVjLTQ0NmItYjM3Yy1iZDQ5NWE5MWJmNmQ/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "OijwP55bzFPNFU61dGL7reXxvBErwXnDlELDsunJBUw=" + ], + "request-id": [ + "a26fe1c3-5ac7-4ed0-90f3-8b2389cb6363" + ], + "client-request-id": [ + "d1806fcd-5342-440f-8e9a-cac57ed8088b" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "g76B0s0E53V6bbPU1FYqzXWtq50zj4D291xTO3DNHCC1tyP_Rt3QJgNjVWr2r-Au7iVzBYens9kYkUOV_tSWGnF8C6YhECcZwQ1ftOwQ1r8YTaQMIvXXAR5Uq_F4VLj2_m3rreF5_zoOYe5JObjWyA.rp4UgIeMaoSzJbSRsjzEZrEMSLFVcNQQkG3KP6_ty2M" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "1.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Thu, 25 Sep 2014 17:34:35 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/Microsoft.Authorization/roleAssignments/6a26d717-aba9-44e3-b971-c53694e413b2?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9yZXNvdXJjZUdyb3Vwcy9jb250cmliMS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZUFzc2lnbm1lbnRzLzZhMjZkNzE3LWFiYTktNDRlMy1iOTcxLWM1MzY5NGU0MTNiMj9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "westus:75bb9eee-20db-48f8-b237-0cf3929206eb" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "620b9a6a-dbd8-4d8e-8e7e-d5ac0e4045aa" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140925T173440Z:620b9a6a-dbd8-4d8e-8e7e-d5ac0e4045aa" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 25 Sep 2014 17:34:40 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "3ca49042-782a-4cc9-89b5-ee1b487fe115", + "TenantId": "1449d5b7-8a83-47db-ae4c-9b03e888bad0", + "Domain": "rbactest.onmicrosoft.com" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaUserPermissions_Setup.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaUserPermissions_Setup.json new file mode 100644 index 000000000000..1b098bb19d09 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaUserPermissions_Setup.json @@ -0,0 +1,428 @@ +{ + "Entries": [ + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycz9hcGktdmVyc2lvbj0xLjQyLXByZXZpZXdJbnRlcm5hbA==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"userPrincipalName\": \"aduser2365@rbactest.onmicrosoft.com\",\r\n \"accountEnabled\": true,\r\n \"displayName\": \"aduser2365\",\r\n \"mailNickname\": \"aduser2365test\",\r\n \"passwordProfile\": {\r\n \"password\": \"adpass37690#$\",\r\n \"forceChangePasswordNextLogin\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "269" + ], + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.User/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"68730ae1-2d5c-446b-b37c-bd495a91bf6d\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"aduser2365\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": null,\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"aduser2365test\",\r\n \"mobile\": null,\r\n \"netId\": \"100300008BD7259E\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": null,\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"aduser2365@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": null,\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"aduser2365@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1955" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "GHWom5F4FhO0ryJj9WTZucEuZW4pI1MbWekjNz7LQZA=" + ], + "request-id": [ + "c3a2e03e-51d2-414f-b181-ae628800a2f0" + ], + "client-request-id": [ + "4e4b96a9-abf2-4452-ba23-c5437312841a" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "U7Lwq4chXffR6ij10H7cSArGpCgYmaAAswKZ-PUP7uS19ycF7Jyo3mD2VY1sb5ZG2qzXrMUcgBwZHvJ83kRq31PMZEn6GvH9B3uV_Hns6zZH5OtAuX09KOcDquYwyz1s7nc34B6nGnbJtpUvSiJ8TQ.2kO9okTFU7HGGM-_PHr2CNK3goVeJhw3F1EWVAJq4HE" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Location": [ + "https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/directoryObjects/68730ae1-2d5c-446b-b37c-bd495a91bf6d/Microsoft.WindowsAzure.ActiveDirectory.User" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Thu, 25 Sep 2014 17:33:05 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourcegroups?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Jlc291cmNlZ3JvdXBzPyZhcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1\",\r\n \"name\": \"contrib1\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/owner1\",\r\n \"name\": \"owner1\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/reader1\",\r\n \"name\": \"reader1\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/testg1\",\r\n \"name\": \"testg1\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "721" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31994" + ], + "x-ms-request-id": [ + "8fbcf120-69e1-47ac-8e7d-327a35a1ad03" + ], + "x-ms-correlation-request-id": [ + "8fbcf120-69e1-47ac-8e7d-327a35a1ad03" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140925T173309Z:8fbcf120-69e1-47ac-8e7d-327a35a1ad03" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 25 Sep 2014 17:33:09 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9yb2xlRGVmaW5pdGlvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"roleName\": \"Contributor\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Contributors can manage everything except access.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": [\r\n \"Microsoft.Authorization/*/Write\",\r\n \"Microsoft.Authorization/*/Delete\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"b24988ac-6180-42a0-ab88-20f7382dd24c\"\r\n },\r\n {\r\n \"properties\": {\r\n \"roleName\": \"Owner\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Owners can manage everything, including access.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"8e3af657-a8ff-443c-a75c-2fe8c4bcb635\"\r\n },\r\n {\r\n \"properties\": {\r\n \"roleName\": \"Reader\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Readers can view everything, but can't make changes.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*/read\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"acdd72a7-3385-48ef-bd42-f606fba81ae7\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1370" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:5f60f071-9b39-4e09-a96f-8a5f2296f4db" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31993" + ], + "x-ms-correlation-request-id": [ + "c934665b-827d-4a66-9fda-3b44bfa5c93c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140925T173329Z:c934665b-827d-4a66-9fda-3b44bfa5c93c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 25 Sep 2014 17:33:29 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/Microsoft.Authorization/roleAssignments/6a26d717-aba9-44e3-b971-c53694e413b2?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9yZXNvdXJjZUdyb3Vwcy9jb250cmliMS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZUFzc2lnbm1lbnRzLzZhMjZkNzE3LWFiYTktNDRlMy1iOTcxLWM1MzY5NGU0MTNiMj9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"principalId\": \"68730ae1-2d5c-446b-b37c-bd495a91bf6d\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "254" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"principalId\": \"68730ae1-2d5c-446b-b37c-bd495a91bf6d\",\r\n \"scope\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1\"\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/Microsoft.Authorization/roleAssignments/6a26d717-aba9-44e3-b971-c53694e413b2\",\r\n \"type\": \"Microsoft.Authorization/roleAssignments\",\r\n \"name\": \"6a26d717-aba9-44e3-b971-c53694e413b2\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "580" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "westus:f557056b-afd8-4235-a8c8-27764bbaf858" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "d18985a3-1a81-4860-8e71-6fb409562c4e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140925T173330Z:d18985a3-1a81-4860-8e71-6fb409562c4e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 25 Sep 2014 17:33:30 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/Microsoft.Authorization/roleAssignments/6a26d717-aba9-44e3-b971-c53694e413b2?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9yZXNvdXJjZUdyb3Vwcy9jb250cmliMS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZUFzc2lnbm1lbnRzLzZhMjZkNzE3LWFiYTktNDRlMy1iOTcxLWM1MzY5NGU0MTNiMj9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleDefinitionId\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"principalId\": \"68730ae1-2d5c-446b-b37c-bd495a91bf6d\",\r\n \"scope\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1\"\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/Microsoft.Authorization/roleAssignments/6a26d717-aba9-44e3-b971-c53694e413b2\",\r\n \"type\": \"Microsoft.Authorization/roleAssignments\",\r\n \"name\": \"6a26d717-aba9-44e3-b971-c53694e413b2\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "580" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:624ce38e-7be4-40e3-b361-12e94d005a16" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31992" + ], + "x-ms-correlation-request-id": [ + "54e08685-4dde-49eb-a65f-11dc02f646bc" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140925T173330Z:54e08685-4dde-49eb-a65f-11dc02f646bc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 25 Sep 2014 17:33:30 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "//subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7?api-version=2014-07-01-preview", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzNjYTQ5MDQyLTc4MmEtNGNjOS04OWI1LWVlMWI0ODdmZTExNS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcm9sZURlZmluaXRpb25zL2FjZGQ3MmE3LTMzODUtNDhlZi1iZDQyLWY2MDZmYmE4MWFlNz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-07-01-preview" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"roleName\": \"Reader\",\r\n \"type\": \"BuiltInRole\",\r\n \"description\": \"Readers can view everything, but can't make changes.\",\r\n \"scope\": \"/\",\r\n \"permissions\": [\r\n {\r\n \"actions\": [\r\n \"*/read\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n },\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\r\n \"type\": \"Microsoft.Authorization/roleDefinitions\",\r\n \"name\": \"acdd72a7-3385-48ef-bd42-f606fba81ae7\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "434" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westus:22850d2c-efeb-466e-a60b-f5f1af7191d0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31991" + ], + "x-ms-correlation-request-id": [ + "1eb43a14-921d-406e-8853-4f2d0d25d5ca" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140925T173330Z:1eb43a14-921d-406e-8853-4f2d0d25d5ca" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 25 Sep 2014 17:33:30 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/1449d5b7-8a83-47db-ae4c-9b03e888bad0/users/68730ae1-2d5c-446b-b37c-bd495a91bf6d?api-version=1.42-previewInternal", + "EncodedRequestUri": "LzE0NDlkNWI3LThhODMtNDdkYi1hZTRjLTliMDNlODg4YmFkMC91c2Vycy82ODczMGFlMS0yZDVjLTQ0NmItYjM3Yy1iZDQ5NWE5MWJmNmQ/YXBpLXZlcnNpb249MS40Mi1wcmV2aWV3SW50ZXJuYWw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"odata.metadata\": \"https://graph.windows.net/1449d5b7-8a83-47db-ae4c-9b03e888bad0/$metadata#directoryObjects/Microsoft.WindowsAzure.ActiveDirectory.User/@Element\",\r\n \"odata.type\": \"Microsoft.WindowsAzure.ActiveDirectory.User\",\r\n \"objectType\": \"User\",\r\n \"objectId\": \"68730ae1-2d5c-446b-b37c-bd495a91bf6d\",\r\n \"softDeletionTimestamp\": null,\r\n \"acceptedAs\": null,\r\n \"acceptedOn\": null,\r\n \"accountEnabled\": true,\r\n \"alternativeSecurityIds\": [],\r\n \"appMetadata\": null,\r\n \"assignedLicenses\": [],\r\n \"assignedPlans\": [],\r\n \"city\": null,\r\n \"country\": null,\r\n \"creationType\": null,\r\n \"department\": null,\r\n \"dirSyncEnabled\": null,\r\n \"displayName\": \"aduser2365\",\r\n \"extensionAttribute1\": null,\r\n \"extensionAttribute2\": null,\r\n \"extensionAttribute3\": null,\r\n \"extensionAttribute4\": null,\r\n \"extensionAttribute5\": null,\r\n \"extensionAttribute6\": null,\r\n \"extensionAttribute7\": null,\r\n \"extensionAttribute8\": null,\r\n \"extensionAttribute9\": null,\r\n \"extensionAttribute10\": null,\r\n \"extensionAttribute11\": null,\r\n \"extensionAttribute12\": null,\r\n \"extensionAttribute13\": null,\r\n \"extensionAttribute14\": null,\r\n \"extensionAttribute15\": null,\r\n \"facsimileTelephoneNumber\": null,\r\n \"givenName\": null,\r\n \"immutableId\": null,\r\n \"invitedOn\": null,\r\n \"inviteReplyUrl\": [],\r\n \"inviteResources\": [],\r\n \"inviteTicket\": [],\r\n \"isCompromised\": null,\r\n \"jobTitle\": null,\r\n \"jrnlAddress\": null,\r\n \"lastDirSyncTime\": null,\r\n \"logonIdentifiers\": [],\r\n \"mail\": null,\r\n \"mailNickname\": \"aduser2365test\",\r\n \"mobile\": null,\r\n \"netId\": \"100300008BD7259E\",\r\n \"onPremiseSecurityIdentifier\": null,\r\n \"otherMails\": [],\r\n \"passwordPolicies\": null,\r\n \"passwordProfile\": null,\r\n \"physicalDeliveryOfficeName\": null,\r\n \"postalCode\": null,\r\n \"preferredLanguage\": null,\r\n \"primarySMTPAddress\": null,\r\n \"provisionedPlans\": [],\r\n \"provisioningErrors\": [],\r\n \"proxyAddresses\": [],\r\n \"searchableDeviceKey\": [],\r\n \"selfServePasswordResetData\": null,\r\n \"signInName\": \"aduser2365@rbactest.onmicrosoft.com\",\r\n \"sipProxyAddress\": null,\r\n \"smtpAddresses\": [],\r\n \"state\": null,\r\n \"streetAddress\": null,\r\n \"surname\": null,\r\n \"telephoneNumber\": null,\r\n \"usageLocation\": null,\r\n \"userPrincipalName\": \"aduser2365@rbactest.onmicrosoft.com\",\r\n \"userState\": null,\r\n \"userStateChangedOn\": null,\r\n \"userType\": \"Member\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1955" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "ocp-aad-diagnostics-server-name": [ + "GHWom5F4FhO0ryJj9WTZucEuZW4pI1MbWekjNz7LQZA=" + ], + "request-id": [ + "e6fa0d95-2b96-4eef-a83b-4d785b6a946d" + ], + "client-request-id": [ + "25674de1-b973-4455-b503-e114b5882158" + ], + "x-ms-gateway-rewrite": [ + "false" + ], + "x-ms-dirapi-data-contract-version": [ + "1.42-previewInternal" + ], + "ocp-aad-session-key": [ + "z1VUcReksQX8t7VPCQbY7u_LWqd-RiYc4oTwEhxd215VMDKbWtBb2JuMlCKPYheJeNfoBHGoy9mU59MHSseFQvnjAkCeqR5W-dvANrrHCauQSQSZhq3EKjyEZJ00wMut8XmtjlrqSHyjl7Li1ov0hg.9tIe2ChIZhaLL26oc9RbAIJeIlrVM2EmrABMkkYZTp4" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Server": [ + "Microsoft-IIS/8.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET", + "ASP.NET" + ], + "Date": [ + "Thu, 25 Sep 2014 17:33:30 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "b__2": [ + "aduser2365", + "adpass3769" + ] + }, + "Variables": { + "SubscriptionId": "3ca49042-782a-4cc9-89b5-ee1b487fe115", + "TenantId": "1449d5b7-8a83-47db-ae4c-9b03e888bad0", + "Domain": "rbactest.onmicrosoft.com" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaUserPermissions_Test.json b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaUserPermissions_Test.json new file mode 100644 index 000000000000..d4d46d8f95c2 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/SessionRecords/Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests/RaUserPermissions_Test.json @@ -0,0 +1,155 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourcegroups/contrib1?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Jlc291cmNlZ3JvdXBzL2NvbnRyaWIxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1\",\r\n \"name\": \"contrib1\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "179" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31996" + ], + "x-ms-request-id": [ + "21f2d0d7-c225-405f-9513-0e34694d648e" + ], + "x-ms-correlation-request-id": [ + "21f2d0d7-c225-405f-9513-0e34694d648e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140925T173413Z:21f2d0d7-c225-405f-9513-0e34694d648e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 25 Sep 2014 17:34:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Jlc291cmNlR3JvdXBzL2NvbnRyaWIxL3Jlc291cmNlcz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/microsoft.insights/alertrules/CPUHigh default01\",\r\n \"name\": \"CPUHigh default01\",\r\n \"type\": \"microsoft.insights/alertrules\",\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/Microsoft.Web/serverfarms/default01\": \"Resource\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/microsoft.insights/alertrules/ForbiddenRequests wscontrib002\",\r\n \"name\": \"ForbiddenRequests wscontrib002\",\r\n \"type\": \"microsoft.insights/alertrules\",\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/Microsoft.Web/sites/wscontrib002\": \"Resource\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/microsoft.insights/alertrules/ServerErrors wscontrib002\",\r\n \"name\": \"ServerErrors wscontrib002\",\r\n \"type\": \"microsoft.insights/alertrules\",\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/Microsoft.Web/sites/wscontrib002\": \"Resource\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/microsoft.insights/autoscalesettings/default01-contrib1\",\r\n \"name\": \"default01-contrib1\",\r\n \"type\": \"microsoft.insights/autoscalesettings\",\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/Microsoft.Web/serverfarms/default01\": \"Resource\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/microsoft.insights/components/wscontrib002\",\r\n \"name\": \"wscontrib002\",\r\n \"type\": \"microsoft.insights/components\",\r\n \"location\": \"centralus\",\r\n \"tags\": {\r\n \"hidden-link:/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/Microsoft.Web/sites/wscontrib002\": \"Resource\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/Microsoft.Web/serverFarms/default01\",\r\n \"name\": \"default01\",\r\n \"type\": \"Microsoft.Web/serverFarms\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/Microsoft.Web/sites/wscontrib002\",\r\n \"name\": \"wscontrib002\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"hidden-related:/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourceGroups/contrib1/providers/Microsoft.Web/serverfarms/default01\": \"Resource\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2541" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31995" + ], + "x-ms-request-id": [ + "be81ce03-35f7-40a7-b527-d5867529ac37" + ], + "x-ms-correlation-request-id": [ + "be81ce03-35f7-40a7-b527-d5867529ac37" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140925T173413Z:be81ce03-35f7-40a7-b527-d5867529ac37" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 25 Sep 2014 17:34:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/resourcegroups/contrib1/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2NhNDkwNDItNzgyYS00Y2M5LTg5YjUtZWUxYjQ4N2ZlMTE1L3Jlc291cmNlZ3JvdXBzL2NvbnRyaWIxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXV0aG9yaXphdGlvbi9wZXJtaXNzaW9ucz9hcGktdmVyc2lvbj0yMDE0LTA3LTAxLXByZXZpZXc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*/read\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "50" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "31993" + ], + "x-ms-request-id": [ + "c3371547-844f-463a-aac4-a14ea1d768cf" + ], + "x-ms-correlation-request-id": [ + "c3371547-844f-463a-aac4-a14ea1d768cf" + ], + "x-ms-routing-request-id": [ + "WESTUS:20140925T173413Z:c3371547-844f-463a-aac4-a14ea1d768cf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Thu, 25 Sep 2014 17:34:13 GMT" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "3ca49042-782a-4cc9-89b5-ee1b487fe115", + "UserId": "aduser2365@rbactest.onmicrosoft.com", + "TenantId": "1449d5b7-8a83-47db-ae4c-9b03e888bad0", + "Domain": "rbactest.onmicrosoft.com" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Templates/GetAzureResourceGroupGalleryTemplateCommandTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/Templates/GetAzureResourceGroupGalleryTemplateCommandTests.cs new file mode 100644 index 000000000000..bcf00c1b14df --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Templates/GetAzureResourceGroupGalleryTemplateCommandTests.cs @@ -0,0 +1,83 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.Azure.Commands.Resources.Templates; +using Moq; +using Xunit; + +namespace Microsoft.Azure.Commands.Resources.Test.Resources +{ + public class GetAzureResourceGroupGalleryTemplateCommandTests + { + private GetAzureResourceGroupGalleryTemplateCommand cmdlet; + + private Mock galleryTemplatesClientMock; + + private Mock commandRuntimeMock; + + public GetAzureResourceGroupGalleryTemplateCommandTests() + { + galleryTemplatesClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new GetAzureResourceGroupGalleryTemplateCommand() + { + CommandRuntime = commandRuntimeMock.Object, + GalleryTemplatesClient = galleryTemplatesClientMock.Object + }; + } + + [Fact] + public void GetsGalleryTemplates() + { + FilterGalleryTemplatesOptions options = new FilterGalleryTemplatesOptions() + { + Category = "category", + Identity = "hobba", + Publisher = "Microsoft" + }; + FilterGalleryTemplatesOptions actual = new FilterGalleryTemplatesOptions(); + List result = new List() + { + new PSGalleryItem() + { + Publisher = "Microsoft", + Identity = "T1" + }, + new PSGalleryItem() + { + Publisher = "Microsoft", + Identity = "T2" + }, + }; + galleryTemplatesClientMock.Setup(f => f.FilterGalleryTemplates(It.IsAny())) + .Returns(result) + .Callback((FilterGalleryTemplatesOptions o) => actual = o); + + cmdlet.Category = options.Category; + cmdlet.Identity = options.Identity; + cmdlet.Publisher = options.Publisher; + + cmdlet.ExecuteCmdlet(); + + Assert.Equal(2, result.Count); + Assert.True(result.All(g => g.Publisher == "Microsoft")); + + commandRuntimeMock.Verify(f => f.WriteObject(It.IsAny>(), true), Times.Once()); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Templates/SaveAzureResourceGroupGalleryTemplateCommandTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/Templates/SaveAzureResourceGroupGalleryTemplateCommandTests.cs new file mode 100644 index 000000000000..4addb00f0007 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Templates/SaveAzureResourceGroupGalleryTemplateCommandTests.cs @@ -0,0 +1,72 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Management.Automation; +using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.Azure.Commands.Resources.Templates; +using Moq; +using Xunit; + +namespace Microsoft.Azure.Commands.Resources.Test.Resources +{ + public class SaveAzureResourceGroupGalleryTemplateCommandTests + { + private SaveAzureResourceGroupGalleryTemplateCommand cmdlet; + + private Mock galleryTemplatesClientMock; + + private Mock commandRuntimeMock; + + public SaveAzureResourceGroupGalleryTemplateCommandTests() + { + galleryTemplatesClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new SaveAzureResourceGroupGalleryTemplateCommand() + { + CommandRuntime = commandRuntimeMock.Object, + GalleryTemplatesClient = galleryTemplatesClientMock.Object + }; + } + + [Fact] + public void SavesGalleryTemplateFile() + { + cmdlet.Identity = "fileName"; + cmdlet.Path = "filePath"; + cmdlet.Force = true; + + cmdlet.ExecuteCmdlet(); + + galleryTemplatesClientMock.Verify(f => f.DownloadGalleryTemplateFile("fileName", "filePath", true, It.IsAny>()), Times.Once()); + + commandRuntimeMock.Verify(f => f.WriteObject(It.IsAny()), Times.Once()); + } + + [Fact] + public void CreatesDefaultPathForGalleryTemplate() + { + string expectedPath = Path.Combine(Directory.GetCurrentDirectory(), "fileName"); + + cmdlet.Identity = "fileName"; + + cmdlet.ExecuteCmdlet(); + + galleryTemplatesClientMock.Verify(f => f.DownloadGalleryTemplateFile("fileName", expectedPath, false, It.IsAny>()), Times.Once()); + + commandRuntimeMock.Verify(f => f.WriteObject(It.IsAny()), Times.Once()); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/Templates/TestAzureResourceGroupTemplateCommandTests.cs b/src/ResourceManager/Resources/Commands.Resources.Test/Templates/TestAzureResourceGroupTemplateCommandTests.cs new file mode 100644 index 000000000000..3b5cbb1b098c --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/Templates/TestAzureResourceGroupTemplateCommandTests.cs @@ -0,0 +1,145 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.Azure.Commands.Resources.ResourceGroupDeployments; +using Moq; +using Xunit; + +namespace Microsoft.Azure.Commands.Resources.Test.Resources +{ + public class TestAzureResourceGroupTemplateCommandTests + { + private TestAzureResourceGroupTemplateCommand cmdlet; + + private Mock resourcesClientMock; + + private Mock commandRuntimeMock; + + private string resourceGroupName = "myResourceGroup"; + + private string templateFile = @"Resources\sampleTemplateFile.json"; + + private string storageAccountName = "myStorageAccount"; + + public TestAzureResourceGroupTemplateCommandTests() + { + resourcesClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new TestAzureResourceGroupTemplateCommand() + { + CommandRuntime = commandRuntimeMock.Object, + ResourcesClient = resourcesClientMock.Object + }; + } + + [Fact] + public void ValidatesPSResourceGroupDeploymentWithUserTemplate() + { + ValidatePSResourceGroupDeploymentParameters expectedParameters = new ValidatePSResourceGroupDeploymentParameters() + { + TemplateFile = templateFile, + StorageAccountName = storageAccountName, + TemplateVersion = "1.0" + }; + ValidatePSResourceGroupDeploymentParameters actualParameters = new ValidatePSResourceGroupDeploymentParameters(); + List expected = new List() + { + new PSResourceManagerError() + { + Code = "202", + Message = "bad input", + }, + new PSResourceManagerError() + { + Code = "203", + Message = "bad input 2", + }, + new PSResourceManagerError() + { + Code = "203", + Message = "bad input 3", + } + }; + resourcesClientMock.Setup(f => f.ValidatePSResourceGroupDeployment( + It.IsAny())) + .Returns(expected) + .Callback((ValidatePSResourceGroupDeploymentParameters p) => { actualParameters = p; }); + + cmdlet.ResourceGroupName = resourceGroupName; + cmdlet.TemplateFile = expectedParameters.TemplateFile; + cmdlet.TemplateVersion = expectedParameters.TemplateVersion; + + cmdlet.ExecuteCmdlet(); + + Assert.Equal(expectedParameters.GalleryTemplateIdentity, actualParameters.GalleryTemplateIdentity); + Assert.Equal(expectedParameters.TemplateFile, actualParameters.TemplateFile); + Assert.NotNull(actualParameters.TemplateParameterObject); + Assert.Equal(expectedParameters.TemplateVersion, actualParameters.TemplateVersion); + Assert.Equal(null, actualParameters.StorageAccountName); + + commandRuntimeMock.Verify(f => f.WriteObject(expected), Times.Once()); + } + + [Fact] + public void ValidatesPSResourceGroupDeploymentWithGalleryTemplate() + { + ValidatePSResourceGroupDeploymentParameters expectedParameters = new ValidatePSResourceGroupDeploymentParameters() + { + GalleryTemplateIdentity = "sqlServer", + StorageAccountName = storageAccountName, + TemplateVersion = "1.0" + }; + ValidatePSResourceGroupDeploymentParameters actualParameters = new ValidatePSResourceGroupDeploymentParameters(); + List expected = new List() + { + new PSResourceManagerError() + { + Code = "202", + Message = "bad input", + }, + new PSResourceManagerError() + { + Code = "203", + Message = "bad input 2", + }, + new PSResourceManagerError() + { + Code = "203", + Message = "bad input 3", + } + }; + resourcesClientMock.Setup(f => f.ValidatePSResourceGroupDeployment( + It.IsAny())) + .Returns(expected) + .Callback((ValidatePSResourceGroupDeploymentParameters p) => { actualParameters = p; }); + + cmdlet.ResourceGroupName = resourceGroupName; + cmdlet.GalleryTemplateIdentity = expectedParameters.GalleryTemplateIdentity; + cmdlet.TemplateVersion = expectedParameters.TemplateVersion; + + cmdlet.ExecuteCmdlet(); + + Assert.Equal(expectedParameters.GalleryTemplateIdentity, actualParameters.GalleryTemplateIdentity); + Assert.Equal(expectedParameters.TemplateFile, actualParameters.TemplateFile); + Assert.NotNull(actualParameters.TemplateParameterObject); + Assert.Equal(expectedParameters.TemplateVersion, actualParameters.TemplateVersion); + Assert.Equal(null, actualParameters.StorageAccountName); + + commandRuntimeMock.Verify(f => f.WriteObject(expected), Times.Once()); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources.Test/packages.config b/src/ResourceManager/Resources/Commands.Resources.Test/packages.config new file mode 100644 index 000000000000..5c9cb785aec1 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources.Test/packages.config @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources/ActiveDirectory/GetAzureADGroupCommand.cs b/src/ResourceManager/Resources/Commands.Resources/ActiveDirectory/GetAzureADGroupCommand.cs new file mode 100644 index 000000000000..46826d401dab --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/ActiveDirectory/GetAzureADGroupCommand.cs @@ -0,0 +1,56 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.ActiveDirectory.Models; +using Microsoft.Azure.Commands.Resources.Models.ActiveDirectory; +using System; +using System.Collections.Generic; +using System.Management.Automation; + +namespace Microsoft.Azure.Commands.ActiveDirectory +{ + /// + /// Get AD groups. + /// + [Cmdlet(VerbsCommon.Get, "AzureADGroup", DefaultParameterSetName = ParameterSet.Empty), OutputType(typeof(List))] + public class GetAzureADGroupCommand : ActiveDirectoryBaseCmdlet + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.SearchString, + HelpMessage = "The user or group name.")] + [ValidateNotNullOrEmpty] + public string SearchString { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.Empty, + HelpMessage = "The group id.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ObjectId, + HelpMessage = "The group id.")] + [ValidateNotNullOrEmpty] + public Guid ObjectId { get; set; } + + public override void ExecuteCmdlet() + { + ADObjectFilterOptions options = new ADObjectFilterOptions + { + SearchString = SearchString, + Id = ObjectId == Guid.Empty ? null : ObjectId.ToString(), + Paging = true + }; + + do + { + WriteObject(ActiveDirectoryClient.FilterGroups(options), true); + } while (!string.IsNullOrEmpty(options.NextLink)); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources/ActiveDirectory/GetAzureADGroupMemberCommand.cs b/src/ResourceManager/Resources/Commands.Resources/ActiveDirectory/GetAzureADGroupMemberCommand.cs new file mode 100644 index 000000000000..a23c0b666a9b --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/ActiveDirectory/GetAzureADGroupMemberCommand.cs @@ -0,0 +1,47 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.ActiveDirectory.Models; +using Microsoft.Azure.Commands.Resources.Models.ActiveDirectory; +using System; +using System.Collections.Generic; +using System.Management.Automation; + +namespace Microsoft.Azure.Commands.ActiveDirectory +{ + /// + /// Get AD groups members. + /// + [Cmdlet(VerbsCommon.Get, "AzureADGroupMember", DefaultParameterSetName = ParameterSet.Empty), OutputType(typeof(List))] + public class GetAzureADGroupMemberCommand : ActiveDirectoryBaseCmdlet + { + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The user email address.")] + [ValidateNotNullOrEmpty] + public Guid GroupObjectId { get; set; } + + public override void ExecuteCmdlet() + { + ADObjectFilterOptions options = new ADObjectFilterOptions + { + Id = GroupObjectId == Guid.Empty ? null : GroupObjectId.ToString(), + Paging = true + }; + + do + { + WriteObject(ActiveDirectoryClient.GetGroupMembers(options), true); + } while (!string.IsNullOrEmpty(options.NextLink)); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources/ActiveDirectory/GetAzureADServicePrincipalCommand.cs b/src/ResourceManager/Resources/Commands.Resources/ActiveDirectory/GetAzureADServicePrincipalCommand.cs new file mode 100644 index 000000000000..2d815f0f2769 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/ActiveDirectory/GetAzureADServicePrincipalCommand.cs @@ -0,0 +1,64 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.ActiveDirectory.Models; +using Microsoft.Azure.Commands.Resources.Models.ActiveDirectory; +using System; +using System.Collections.Generic; +using System.Management.Automation; + +namespace Microsoft.Azure.Commands.ActiveDirectory +{ + /// + /// Get AD users. + /// + [Cmdlet(VerbsCommon.Get, "AzureADServicePrincipal", DefaultParameterSetName = ParameterSet.Empty), OutputType(typeof(List))] + public class GetAzureADServicePrincipalCommand : ActiveDirectoryBaseCmdlet + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.SearchString, + HelpMessage = "The service principal search string.")] + [ValidateNotNullOrEmpty] + public string SearchString { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ObjectId, + HelpMessage = "The service principal object id.")] + [ValidateNotNullOrEmpty] + public Guid ObjectId { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.Empty, + HelpMessage = "The user SPN.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.SPN, + HelpMessage = "The user SPN.")] + [ValidateNotNullOrEmpty] + [Alias("SPN")] + public string ServicePrincipalName { get; set; } + + public override void ExecuteCmdlet() + { + ADObjectFilterOptions options = new ADObjectFilterOptions + { + SearchString = SearchString, + SPN = ServicePrincipalName, + Id = ObjectId == Guid.Empty ? null : ObjectId.ToString(), + Paging = true + }; + + do + { + WriteObject(ActiveDirectoryClient.FilterServicePrincipals(options), true); + + } while (!string.IsNullOrEmpty(options.NextLink)); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources/ActiveDirectory/GetAzureADUserCommand.cs b/src/ResourceManager/Resources/Commands.Resources/ActiveDirectory/GetAzureADUserCommand.cs new file mode 100644 index 000000000000..d94f4c669fe9 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/ActiveDirectory/GetAzureADUserCommand.cs @@ -0,0 +1,64 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.ActiveDirectory.Models; +using Microsoft.Azure.Commands.Resources.Models.ActiveDirectory; +using System; +using System.Collections.Generic; +using System.Management.Automation; + +namespace Microsoft.Azure.Commands.ActiveDirectory +{ + /// + /// Get AD users. + /// + [Cmdlet(VerbsCommon.Get, "AzureADUser", DefaultParameterSetName = ParameterSet.Empty), OutputType(typeof(List))] + public class GetAzureADUserCommand : ActiveDirectoryBaseCmdlet + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.SearchString, + HelpMessage = "The user search string.")] + [ValidateNotNullOrEmpty] + public string SearchString { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ObjectId, + HelpMessage = "The user object id.")] + [ValidateNotNullOrEmpty] + public Guid ObjectId { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.Empty, + HelpMessage = "The user UPN.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.UPN, + HelpMessage = "The user UPN.")] + [ValidateNotNullOrEmpty] + [Alias("UPN")] + public string UserPrincipalName { get; set; } + + public override void ExecuteCmdlet() + { + ADObjectFilterOptions options = new ADObjectFilterOptions + { + SearchString = SearchString, + UPN = UserPrincipalName, + Id = ObjectId == Guid.Empty ? null : ObjectId.ToString(), + Paging = true + }; + + do + { + WriteObject(ActiveDirectoryClient.FilterUsers(options), true); + + } while (!string.IsNullOrEmpty(options.NextLink)); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources/AzureResourceManager.psd1 b/src/ResourceManager/Resources/Commands.Resources/AzureResourceManager.psd1 new file mode 100644 index 000000000000..76601dfd3418 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/AzureResourceManager.psd1 @@ -0,0 +1,101 @@ +# +# Module manifest for module 'Microsoft.Azure.Commands.Resources' +# +# Generated by: Microsoft Corporation +# +# Generated on: 4/01/2014 +# + +@{ + +# Version number of this module. +ModuleVersion = '0.8.11' + +# ID used to uniquely identify this module +GUID = '81d522a4-6e5d-4105-8f58-376204c47458' + +# Author of this module +Author = 'Microsoft Corporation' + +# Company or vendor of this module +CompanyName = 'Microsoft Corporation' + +# Copyright statement for this module +Copyright = ' Microsoft Corporation. All rights reserved.' + +# Description of the functionality provided by this module +Description = '' + +# Minimum version of the Windows PowerShell engine required by this module +PowerShellVersion = '3.0' + +# Name of the Windows PowerShell host required by this module +PowerShellHostName = '' + +# Minimum version of the Windows PowerShell host required by this module +PowerShellHostVersion = '' + +# Minimum version of the .NET Framework required by this module +DotNetFrameworkVersion = '4.0' + +# Minimum version of the common language runtime (CLR) required by this module +CLRVersion='4.0' + +# Processor architecture (None, X86, Amd64, IA64) required by this module +ProcessorArchitecture = 'None' + +# Modules that must be imported into the global environment prior to importing this module +RequiredModules = @() + +# Assemblies that must be loaded prior to importing this module +RequiredAssemblies = @() + +# Script files (.ps1) that are run in the caller's environment prior to importing this module +ScriptsToProcess = @() + +# Type files (.ps1xml) to be loaded when importing this module +TypesToProcess = @() + +# Format files (.ps1xml) to be loaded when importing this module +FormatsToProcess = @( + '.\Resources\Microsoft.Azure.Commands.Resources.format.ps1xml', + '.\Tags\Microsoft.Azure.Commands.Tags.format.ps1xml', + '.\Resources\Microsoft.WindowsAzure.Commands.Profile.format.ps1xml', + '.\DataFactories\Microsoft.Azure.Commands.DataFactories.format.ps1xml', + '.\RedisCache\Microsoft.Azure.Commands.RedisCache.format.ps1xml', + '.\Batch\Microsoft.Azure.Commands.Batch.format.ps1xml' +) + +# Modules to import as nested modules of the module specified in ModuleToProcess +NestedModules = @( + '.\Resources\Microsoft.Azure.Commands.Resources.dll', + '.\Resources\Microsoft.WindowsAzure.Commands.Profile.dll', + '.\Tags\Microsoft.Azure.Commands.Tags.dll', + '.\Sql\Microsoft.Azure.Commands.Sql.dll', + '.\DataFactories\Microsoft.Azure.Commands.DataFactories.dll', + '.\RedisCache\Microsoft.Azure.Commands.RedisCache.dll', + '.\Batch\Microsoft.Azure.Commands.Batch.dll' +) + +# Functions to export from this module +FunctionsToExport = '*' + +# Cmdlets to export from this module +CmdletsToExport = '*' + +# Variables to export from this module +VariablesToExport = '*' + +# Aliases to export from this module +AliasesToExport = @() + +# List of all modules packaged with this module +ModuleList = @() + +# List of all files packaged with this module +FileList = @() + +# Private data to pass to the module specified in ModuleToProcess +PrivateData = '' + +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Commands.Resources.csproj b/src/ResourceManager/Resources/Commands.Resources/Commands.Resources.csproj new file mode 100644 index 000000000000..eebaf66df062 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Commands.Resources.csproj @@ -0,0 +1,272 @@ + + + + + Debug + AnyCPU + {E1F5201D-6067-430E-B303-4E367652991B} + Library + Properties + Microsoft.Azure.Commands.Resources + Microsoft.Azure.Commands.Resources + v4.5 + 512 + + ..\..\..\ + true + /assemblyCompareMode:StrongNameIgnoringVersion + + + true + full + false + ..\..\..\Package\Debug\ResourceManager\AzureResourceManager\Resources + DEBUG;TRACE + prompt + 4 + true + true + false + + + ..\..\..\Package\Release\ResourceManager\AzureResourceManager\Resources + TRACE;SIGN + true + pdbonly + AnyCPU + bin\Release\Microsoft.Azure.Commands.Resources.dll.CodeAnalysisLog.xml + true + GlobalSuppressions.cs + prompt + MinimumRecommendedRules.ruleset + ;$(ProgramFiles)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\Rule Sets + ;$(ProgramFiles)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\FxCop\Rules + true + true + MSSharedLibKey.snk + true + false + + + + False + ..\..\..\packages\Microsoft.Azure.Gallery.2.2.0-preview\lib\net40\Microsoft.Azure.Gallery.dll + + + False + ..\..\..\packages\Microsoft.Azure.Graph.RBAC.1.4.0-preview\lib\net40\Microsoft.Azure.Graph.RBAC.dll + + + False + ..\..\..\packages\Microsoft.Azure.Management.Authorization.0.11.0-preview\lib\net40\Microsoft.Azure.Management.Authorization.dll + + + False + ..\..\..\packages\Microsoft.Azure.Monitoring.2.2.0-preview\lib\net40\Microsoft.Azure.Monitoring.dll + + + False + ..\..\..\packages\Microsoft.Azure.Management.Resources.2.7.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll + + + False + ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll + + + False + ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + True + + + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + True + Resources.resx + + + + + + + + + + + + + + + + + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + {c60342b1-47d3-4a0e-8081-9b97ce60b7af} + Commands.Profile + + + {d470e50a-9607-48d6-a924-4f9f86502704} + Commands.Batch + + + {c972e3ef-4461-4758-ba31-93e0947b1253} + Commands.RedisCache + + + {69ed499e-6f3c-488f-86b8-b74cfda4d47e} + Commands.Sql + + + {2493a8f7-1949-4f29-8d53-9d459046c3b8} + Commands.Tags + + + + + Designer + Always + + + Designer + Always + + + PreserveNewest + + + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + + + + + powershell.exe -ExecutionPolicy Unrestricted -File "$(ProjectDir)\PostBuild.ps1" "$(TargetDir)\" + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources/MSSharedLibKey.snk b/src/ResourceManager/Resources/Commands.Resources/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ResourceManager/Resources/Commands.Resources/MSSharedLibKey.snk differ diff --git a/src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.dll-Help.psd1 b/src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.dll-Help.psd1 new file mode 100644 index 000000000000..e9b165e84f9b --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.dll-Help.psd1 @@ -0,0 +1,88 @@ +# +# Module manifest for module 'Microsoft.Azure.Commands.Resources' +# +# Generated by: Microsoft Corporation +# +# Generated on: 4/01/2014 +# + +@{ + +# Version number of this module. +ModuleVersion = '0.8.8' + +# ID used to uniquely identify this module +GUID = '81d522a4-6e5d-4105-8f58-376204c47458' + +# Author of this module +Author = 'Microsoft Corporation' + +# Company or vendor of this module +CompanyName = 'Microsoft Corporation' + +# Copyright statement for this module +Copyright = ' Microsoft Corporation. All rights reserved.' + +# Description of the functionality provided by this module +Description = '' + +# Minimum version of the Windows PowerShell engine required by this module +PowerShellVersion = '3.0' + +# Name of the Windows PowerShell host required by this module +PowerShellHostName = '' + +# Minimum version of the Windows PowerShell host required by this module +PowerShellHostVersion = '' + +# Minimum version of the .NET Framework required by this module +DotNetFrameworkVersion = '4.0' + +# Minimum version of the common language runtime (CLR) required by this module +CLRVersion='4.0' + +# Processor architecture (None, X86, Amd64, IA64) required by this module +ProcessorArchitecture = 'None' + +# Modules that must be imported into the global environment prior to importing this module +RequiredModules = @() + +# Assemblies that must be loaded prior to importing this module +RequiredAssemblies = @() + +# Script files (.ps1) that are run in the caller's environment prior to importing this module +ScriptsToProcess = @() + +# Type files (.ps1xml) to be loaded when importing this module +TypesToProcess = @() + +# Format files (.ps1xml) to be loaded when importing this module +FormatsToProcess = @() + +# Modules to import as nested modules of the module specified in ModuleToProcess +NestedModules = @( + '..\..\..\Package\Debug\ResourceManager\AzureResourceManager\Resources\Microsoft.Azure.Commands.Resources.dll' +) + +# Functions to export from this module +FunctionsToExport = '*' + +# Cmdlets to export from this module +CmdletsToExport = '*' + +# Variables to export from this module +VariablesToExport = '*' + +# Aliases to export from this module +AliasesToExport = @() + +# List of all modules packaged with this module +ModuleList = @() + +# List of all files packaged with this module +FileList = @() + +# Private data to pass to the module specified in ModuleToProcess +PrivateData = '' + +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.dll-Help.xml b/src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.dll-Help.xml new file mode 100644 index 000000000000..8a8d1bdba4bf --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.dll-Help.xml @@ -0,0 +1,8158 @@ + + + + + Get-AzureADGroup + + Filters active directory groups. + + + + + Get + AzureADGroup + + + + + Filters active directory groups. + + + + Get-AzureADGroup + + ObjectId + + Object id of the group. + + Guid + + + + Get-AzureADGroup + + SearchString + + The group display name + + String + + + + Get-AzureADGroup + + ObjectId + + Object id of the group. + + Guid + + + + + + ObjectId + + Object id of the group. + + Guid + + Guid + + + + + + SearchString + + The group display name + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Filters groups using object id -------------------------- + + + + PS C:\> Get-AzureADGroup -ObjectId 85F89C90-780E-4AA6-9F4F-6F268D322EEE + + Gets group with 85F89C90-780E-4AA6-9F4F-6F268D322EEE id + + + + + + + + + -------------------------- Filters groups using Search String -------------------------- + + + + PS C:\> Get-AzureADGroup -SearchString Joe + + Filters all ad groups that has Joe in the display name. + + + + + + + + + -------------------------- List AD groups -------------------------- + + + + PS C:\> Get-AzureADGroup + + Gets all AD groups + + + + + + + + + + + Get-AzureADUser + + + + Get-AzureADServicePrincipal + + + + Get-AzureADGroupMember + + + + + + + + Get-AzureADGroupMember + + Get a group members. + + + + + Get + AzureADGroupMember + + + + + Get a group members. + + + + Get-AzureADGroupMember + + GroupObjectId + + Object id of the group. + + Guid + + + + + + GroupObjectId + + Object id of the group. + + Guid + + Guid + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Filters group members using group object id -------------------------- + + + + PS C:\> Get-AzureADGroupMember -GroupObjectId 85F89C90-780E-4AA6-9F4F-6F268D322EEE + + Gets group members with 85F89C90-780E-4AA6-9F4F-6F268D322EEE id + + + + + + + + + + + Get-AzureADUser + + + + Get-AzureADServicePrincipal + + + + Get-AzureADGroupMemberMember + + + + + + + + Get-AzureADServicePrincipal + + Filters active directory service principals. + + + + + Get + AzureADServicePrincipal + + + + + Filters active directory service principals. + + + + Get-AzureADServicePrincipal + + ServicePrincipalName + + SPN of the service. + + String + + + + Get-AzureADServicePrincipal + + SearchString + + The service principal display name + + String + + + + Get-AzureADServicePrincipal + + ObjectId + + Object id of the service principal. + + Guid + + + + Get-AzureADServicePrincipal + + ServicePrincipalName + + SPN of the service. + + String + + + + + + ServicePrincipalName + + SPN of the service. + + String + + String + + + + + + SearchString + + The service principal display name + + String + + String + + + + + + ObjectId + + Object id of the service principal. + + Guid + + Guid + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Filters service principals using SPN -------------------------- + + + + PS C:\> Get-AzureADServicePrincipal -SPN 36f81fc3-b00f-48cd-8218-3879f51ff39f + + Gets service principals with 36f81fc3-b00f-48cd-8218-3879f51ff39f SPN + + + + + + + + + -------------------------- Filters service principals using Search String -------------------------- + + + + PS C:\> Get-AzureADServicePrincipal -SearchString Web + + Filters all ad service principals that has Web in the display name. + + + + + + + + + -------------------------- List AD service principals -------------------------- + + + + PS C:\> Get-AzureADServicePrincipal + + Gets all AD service principals + + + + + + + + + + + Get-AzureADGroup + + + + Get-AzureADUser + + + + Get-AzureADGroupMember + + + + + + + + Get-AzureADUser + + Filters active directory users. + + + + + Get + AzureADUser + + + + + Filters active directory users. + + + + Get-AzureADUser + + UserPrincipalName + + UPN of the user. + + String + + + + Get-AzureADUser + + SearchString + + The user display name + + String + + + + Get-AzureADUser + + ObjectId + + Object id of the user. + + Guid + + + + Get-AzureADUser + + UserPrincipalName + + UPN of the user. + + String + + + + + + UserPrincipalName + + UPN of the user. + + String + + String + + + + + + SearchString + + The user display name + + String + + String + + + + + + ObjectId + + Object id of the user. + + Guid + + Guid + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Filters users using UPN -------------------------- + + + + PS C:\> Get-AzureADUser -UPN foo@domain.com + + Gets user with foo@domain.com + + + + + + + + + -------------------------- Filters users using Search String -------------------------- + + + + PS C:\> Get-AzureADUser -SearchString Joe + + Filters all ad users that has Joe in the display name. + + + + + + + + + -------------------------- List AD users -------------------------- + + + + PS C:\> Get-AzureADUser + + Gets all AD users + + + + + + + + + + + Get-AzureADGroup + + + + Get-AzureADServicePrincipal + + + + Get-AzureADGroupMember + + + + + + + + Get-AzureLocation + + Gets the resource types and the Azure data center locations that support them. + + + + + Get + AzureLocation + + + + + The Get-AzureLocation cmdlet gets the Azure data center locations that support each resource type. This cmdlet returns all resource types and locations. It has no parameters.A resource is a user-managed entity, such as a website, database server, or database. When you create a resource, you need to specify a location, and not every location supports all resource types. Before you create your resources, use this cmdlet to find a location for each resource.Azure resources are members of a resource group, which is a collection of resources that are deployed as a unit. Resource groups have a location, but the group and its members do not need to be in the same location. + + + + Get-AzureLocation + + + + + + + None + + + + + + + + + + + + Microsoft.Azure.Commands.ResourceManagement.Models.PSResourceProviderType + + + + + + + + + + + + + + + -------------------------- Example 1: Get all locations -------------------------- + + + + PS C:\>Get-AzureLocation +Name Locations + + +---- --------- + + +ResourceGroup East Asia, South East Asia, East US, West US, North Central US, South Central US, Central US, North Europe, West Europebiztalkservices/biztalk Central US, West Europe + + +microsoft.insights/alertrules Central US, East US + + +microsoft.insights/autoscalesettings Central US, East US + + +microsoft.insights/components Central US + + +microsoft.insights/webtests Central US + + +microsoft.network/Subnets Central US, West Europe + + +... + + This command gets all resources and the locations in which they are supported. + + + + + + + + + -------------------------- Example 2: Get locations that support web sites -------------------------- + + + + PS C:\>Get-AzureLocation | Where-Object Name -like "*web*site*" + +Name Locations +---- --------- +Microsoft.Web/sites North Central US, Central USPS + + + +C:\>New-AzureResource -Name MyWebSite -Location 'North Central US' ... + + This examples shows how to find a location that supports a web site resource and how to use the location in a command to create a web site. + + + + The first command uses the Get-AzureLocation cmdlet to get all resource types and their locations. It pipes the output to the Where-Object cmdlet, which selects only resources with names that include "web" and "site". The output shows that the Azure data centers in the North Central US and Central US support web sites.The second command uses the New-AzureResource cmdlet to create a new web site. The value of the Location parameter, which is required, is North Central US. + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=393458 + + + + + + + Get-AzureResource + + Gets Azure resources + + + + + Get + AzureResource + + + + + The Get-AzureResource cmdlet gets the Azure resources in the subscription. By default, it gets all resources in the subscription, but you can use the parameters in the cmdlet to filter the results.An Azure resource is a user-managed Azure entity, such as a database server, database, or website. Every Azure resource is associated with a resource group, which is a collection of resources that are deployed as a unit. + + + + Get-AzureResource + + ResourceGroupName + + Gets only resources in the specified resource group. Wildcards are not permitted. This parameter is required only when you are selecting resources by name. By default, Get-AzureResource gets all resources in the subscription. + + String + + + ResourceType + + Gets only resources of the specified resource type. Wildcards are not permitted. This parameter is required only when you are selecting resources by name. By default, GetAzureResource gets all resources in the subscription. + + String + + + Tag + + Gets resources that have the specified Azure tag. Enter a hash table with a Name key or Name and Value keys. Wildcard characters are not supported.A "tag" is a name-value pair that you can apply to resources and resource groups. Use tags to categorize your resources, such as by department or cost center, or to track notes or comments about the resources. To add a tag to a resource, use the Tag parameter of the New-AzureResource or Set-AzureResource cmdlets. To create a predefined tag, use the New-AzureTag cmdlet.For help with hash tables in Windows PowerShell, type: Get-Help about_Hashtables. + + Hashtable + + + + Get-AzureResource + + Name + + Gets a resource with the specified name. Wildcards are not permitted. This parameter is required only when you are selecting resource by name. By default, Get-AzureResource gets all resources in the subscription. + + String + + + ResourceGroupName + + Gets only resources in the specified resource group. Wildcards are not permitted. This parameter is required only when you are selecting resources by name. By default, Get-AzureResource gets all resources in the subscription. + + String + + + ResourceType + + Gets only resources of the specified resource type. Wildcards are not permitted. This parameter is required only when you are selecting resources by name. By default, GetAzureResource gets all resources in the subscription. + + String + + + ParentResource + + Gets only resources that are children of the specified parent resource. Enter the fully qualified name of the parent resource, such as " Microsoft.Sql/servers/ContosoSQLSvr". Wildcards are not permitted.Use this parameter when the resource is a type that has parents. For example, every SQL Azure database is associated with a SQL Azure database server. A resource group is not a parent of its resources. + + String + + + ApiVersion + + Specifies the API version that is supported by the resource provider. This parameter is required when you use the Name parameter. + + String + + + + + + ResourceGroupName + + Gets only resources in the specified resource group. Wildcards are not permitted. This parameter is required only when you are selecting resources by name. By default, Get-AzureResource gets all resources in the subscription. + + String + + String + + + + + + ResourceType + + Gets only resources of the specified resource type. Wildcards are not permitted. This parameter is required only when you are selecting resources by name. By default, GetAzureResource gets all resources in the subscription. + + String + + String + + + + + + Tag + + Gets resources that have the specified Azure tag. Enter a hash table with a Name key or Name and Value keys. Wildcard characters are not supported.A "tag" is a name-value pair that you can apply to resources and resource groups. Use tags to categorize your resources, such as by department or cost center, or to track notes or comments about the resources. To add a tag to a resource, use the Tag parameter of the New-AzureResource or Set-AzureResource cmdlets. To create a predefined tag, use the New-AzureTag cmdlet.For help with hash tables in Windows PowerShell, type: Get-Help about_Hashtables. + + Hashtable + + Hashtable + + + + + + Name + + Gets a resource with the specified name. Wildcards are not permitted. This parameter is required only when you are selecting resource by name. By default, Get-AzureResource gets all resources in the subscription. + + String + + String + + + + + + ParentResource + + Gets only resources that are children of the specified parent resource. Enter the fully qualified name of the parent resource, such as " Microsoft.Sql/servers/ContosoSQLSvr". Wildcards are not permitted.Use this parameter when the resource is a type that has parents. For example, every SQL Azure database is associated with a SQL Azure database server. A resource group is not a parent of its resources. + + String + + String + + + + + + ApiVersion + + Specifies the API version that is supported by the resource provider. This parameter is required when you use the Name parameter. + + String + + String + + + + + + + + + None + + + + + + + + + + + + Microsoft.Azure.Commands.ResourceManagement.Models.PSResource + + + + + + + + + + + + + + + -------------------------- Example 1: Get all resources -------------------------- + + + + PS C:\>Get-AzureResource +Name : HostingFarm1 +ResourceGroupName : ContosoHosting +ResourceType : Microsoft.Web/serverFarms +Location : southcentralus +ParentResource : + + +Name : ContosoDev +ResourceGroupName : ContosoLabsRG +ResourceType : Microsoft.Web/sites +Location : southcentralus +ParentResource : + +... + + This commands gets all Azure resources in the subscription. + + + + + + + + + -------------------------- Example 2: Get resources by resource group -------------------------- + + + + PS C:\>Get-AzureResource -ResourceGroupName ContosoRG01 + +Name : Default1 +ResourceGroupName : ContosoLabsRG +ResourceType : Microsoft.Web/serverFarms +Location : northeurope +ParentResource : + + +Name : ContosoLabWeb +ResourceGroupName : ContosoLabsRG +ResourceType : Microsoft.Web/sites +Location : northeurope +ParentResource : + + This commands gets all Azure resources in the ContosoRG01 resource group. + + + + + + + + + -------------------------- Example 3: Get resources by resource type -------------------------- + + + + PS C:\>Get-AzureResource | Group-Object ResourceType + +Count Name Group +----- ---- ----- + 6 microsoft.insights/ale... {@{Name=ServerErrors-goorg016 + 6 microsoft.insights/aut... {@{Name=Default23-foorg016; R + 6 microsoft.insights/com... {@{Name=goorg016ws; ResourceG + 1 Microsoft.Web/serverFarms {@{Name=Default1; ResourceGro + 6 Microsoft.Web/sites {@{Name=utr2520; ResourceGrou + +PS C:\>Get-AzureResource -ResourceType Microsoft.Web/serverFarms +Name : Default1 +ResourceGroupName : ContosoLabsRG +ResourceType : Microsoft.Web/serverFarms +Location : southcentralus +ParentResource : + + +Name : Default1 +ResourceGroupName : ContosoRG01 +ResourceType : Microsoft.Web/serverFarms +Location : northeurope +ParentResource : + + +Name : Default1 +ResourceGroupName : ContosoEngineering +ResourceType : Microsoft.Web/serverFarms +Location : southcentralus +ParentResource : + + +Name : Default2 +ResourceGroupName : ContosoEngineering +ResourceType : Microsoft.Web/serverFarms +Location : southcentralus +ParentResource : + + These commands get all resources with a specified resource type. + + + + The first command finds the types of resources in the subscription. It uses the Get-AzureResource cmdlet to get all resources and Group-Object cmdlet to group the objects by resource type. The output shows that there are server farms and web sites in the subscription.The second command uses the ResourceType parameter of Get-AzureResource to get all server farms in the subscription. + + + + + -------------------------- Example 4: Get a resource by name -------------------------- + + + + PS C:\>Get-AzureResource -Name ContosoLabWeb -ResourceGroupName ContosoLabsRG -ResourceType "Microsoft.Web/sites" -ApiVersion 2014-04-01 +Name : ContosoLabWeb +ResourceGroupName : ContosoLabsRG +ResourceType : Microsoft.Web/sites +ParentResource : +Location : North Europe +Properties : + {[name, ContosoLabWeb], [state, Running], [hostNames, + System.Collections.Generic.List`1[System.Object]], [webSpace, + ContosoLabsRG-NorthEuropewebspace]...} +Tags : + + This commands gets the "ContosoLabWeb" web site resource. When you use the Name parameter to get a particular resource, the ResourceGroupName, ResourceType, and APIVersion parameters are required. + + + + You can also use the Where-Object cmdlet to select a resource. For example: Get-AzureResource | Where-Object Name -eq "ConsotoLabWeb" + + + + + -------------------------- Example 5: Get a resource by its tag -------------------------- + + + + PS C:\>Get-AzureResource -Tag @{Name="Department";Value="IT"} + + This command gets resources that have a tag named "Department with a value of "IT". + + + + + + + + + -------------------------- Example 6: Get all tags of a resource -------------------------- + + + + PS C:\>Get-AzureResource -Name ContosoLabWeb -ResourceGroupName ContosoLabsRG -ResourceType "Microsoft.Web/sites" -ApiVersion 2014-04-01 + +PS C:\>(Get-AzureResource -Name ContosoLabWeb -ResourceGroupName ContosoLabsRG -ResourceType "Microsoft.Web/sites" -ApiVersion 2014-04-01).Tags + + +Tags: + + Name Value + ==== ====== + Department IT + Status Approved + FY2016 + + These commands get all tags of the ContosoWeb resource. The first command gets the resource by name with all of its properties. The second command, which uses the Tags property of the output object, gets only the tags. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=393050 + + + + + + + Get-AzureResourceGroup + + Gets Azure resource groups + + + + + Get + AzureResourceGroup + + + + + The Get-AzureResourceGroup cmdlet gets the Azure resource groups in your subscription. You can use the Name parameter to select resource groups by name. The default is all resource groups.An Azure resource is a user-managed Azure entity, such as a database server, database, or web site. An Azure resource group is a collection of Azure resources that are deployed as a unit. + + + + Get-AzureResourceGroup + + Name + + Specifies the name of the resource group. Wildcards are not permitted. This parameter is optional. The default is all resource groups in the subscription + + String + + + + Get-AzureResourceGroup + + Tag + + Gets resource groups that have the specified Azure tags. Enter a hash table with a Name key or Name and Value keys. Wildcard characters are not supported.A "tag" is a name-value pair that you can apply to resources and resource groups. Use tags to categorize your resources, such as by department or cost center, or to track notes or comments about the resources. To add a tag to a resource group, use the Tag parameter of the New-AzureResourceGroup or Set-AzureResourceGroup cmdlets. To create a predefined tag, use the New-AzureTag cmdlet.For help with hash tables in Windows PowerShell, type: Get-Help about_Hashtables. + + Hashtable + + + Detailed + + Return the details of each resource group if specified. + + SwitchParameter + + + + + + Name + + Specifies the name of the resource group. Wildcards are not permitted. This parameter is optional. The default is all resource groups in the subscription + + String + + String + + + + + + Tag + + Gets resource groups that have the specified Azure tags. Enter a hash table with a Name key or Name and Value keys. Wildcard characters are not supported.A "tag" is a name-value pair that you can apply to resources and resource groups. Use tags to categorize your resources, such as by department or cost center, or to track notes or comments about the resources. To add a tag to a resource group, use the Tag parameter of the New-AzureResourceGroup or Set-AzureResourceGroup cmdlets. To create a predefined tag, use the New-AzureTag cmdlet.For help with hash tables in Windows PowerShell, type: Get-Help about_Hashtables. + + Hashtable + + Hashtable + + + + + + Detailed + + Return the details of each resource group if specified. + + SwitchParameter + + SwitchParameter + + + + + + + + + None + + + + + + + + + + + + Microsoft.Azure.Commands.ResourceManagement.PSResourceGroup + + + + + + + + + + + + + + + -------------------------- Example 1: Get all resource groups and their details -------------------------- + + + + PS C:\>Get-AzureResourceGroup -Detailed +Name: Contoso +Location: West US +Resources: + Name Type Location + =============== ======================= ======== + ConstosoWebSite Microsoft.Web/sites West US + sqlsvr03 Microsoft.Sql/servers West US + sqldb01 Microsoft.Sql/databases West US + +Name: EngineerBlog +Location: East US +Resources: + Name Type Location + =============== ======================= ======== + EngineerBlog Microsoft.Web/sites West US + EngSvr01 Microsoft.Sql/servers West US + EngDB02 Microsoft.Sql/databases West US + + This command gets all resource groups in the subscription. + + + + + + + + + -------------------------- Example 2: Get resource groups by name -------------------------- + + + + PS C:\>Get-AzureResourceGroup -Name EngineerBlog +Name: EngineerBlog +Location: East US +Resources: + Name Type Location + =============== ======================= ======== + EngineerBlog Microsoft.Web/sites West US + EngSvr01 Microsoft.Sql/servers West US + EngDB02 Microsoft.Sql/databases West US + + This command gets Azure resource groups in your subscription that have names that begin with "eng". + + + + + + + + + -------------------------- Example 3: Get resource groups by other properties -------------------------- + + + + PS C:\>Get-AzureResourceGroup -Detailed | Where-Object {$_.Resources.Type -like "*serverFarms*"} | Select-Object -Property ResourceGroupName +Contoso +EngineerBlog + + The command uses the Where-Object, ForEach-Object, and Select-Object cmdlets to get the names of resource groups that include Azure database server farms. You can use commands like this one to find resource groups with resources or properties of interest. + + + + The command uses the Get-AzureResourceGroup cmdlet to get all resource groups in the subscription. It pipes the resource groups to the Where-Object cmdlet, which returns only the resource groups that include server farm resources. The command pipes those resource groups to the Select-Object cmdlet, which returns only the value of the ResourceGroupName property of each resource group. + + + + + -------------------------- Example 4: Get resource groups by tag -------------------------- + + + + PS C:\>Get-AzureResourceGroup -Tag @{Name="CostCenter";Value="Development"} + +PS C:\>Get-AzureResourceGroup -Tag @{Name="CostCenter"} + + These commands get resource groups by tag. The first command gets resource groups that have a "CostCenter" tag with a value of "Development". The second command gets all resource groups that have a "CostCenter" tag, regardless of its value. + + + + + + + + + -------------------------- Example 5: Get all tags of a resource group -------------------------- + + + + PS C:\>Get-AzureResourceGroup -Name ContosoRG + +PS C:\>(Get-AzureResourceGroup -Name ContosoRG).Tags + +Tags: + + Name Value + ==== ====== + Department IT + Status Approved + FY2016 + + These commands get all tags of the ContosoRG resource group. The first command gets the resource group by name with all of its properties. The second command, which uses the Tags property of the output object, gets only the tags. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=393047 + + + New-AzureResourceGroup + + + + Remove-AzureResourceGroup + + + + + + + + Get-AzureResourceGroupDeployment + + Gets the deployments in a resource group. + + + + + Get + AzureResourceGroupDeployment + + + + + The Get-AzureResourceGroupDeployment cmdlet gets the deployments in an Azure resource group. You can use the Name (DeploymentName) and ProvisioningState parameters to filter the deployments. By default, Get-AzureResourceGroupDeployment returns all deployments for a specified resource group.An Azure resource is a user-managed Azure entity, such as a database server, database, or web site. An Azure resource group is a collection of Azure resources that are deployed as a unit. A deployment is the operation that makes the resources in the resource group available for use.This cmdlet is very useful for tracking. For debugging, use it with the Get-AzureResourceGroupLog cmdlet. + + + + Get-AzureResourceGroupDeployment + + ResourceGroupName + + Gets the deployments for the specified resource group. Wildcards are not permitted. This parameter is required and you can specify only one resource group in each command. + + String + + + Name + + Gets only the deployment with the specified name. Wildcards are not permitted. This parameter is optional. By default, Get-AzureResourceGroupDeployment returns all deployments for the specified resource group. + + String + + + ProvisioningState + + Gets only the deployments with the specified provisioning state. Valid values include, but are not limited to: Canceled, Deprovisioning, Failed, NotProvisioned, Provisioned, Provisioning, and Succeeded. This parameter is optional. By default, Get-AzureResourceGroupDeployment returns all deployments for the specified resource group. + + String + + + + + + ResourceGroupName + + Gets the deployments for the specified resource group. Wildcards are not permitted. This parameter is required and you can specify only one resource group in each command. + + String + + String + + + + + + Name + + Gets only the deployment with the specified name. Wildcards are not permitted. This parameter is optional. By default, Get-AzureResourceGroupDeployment returns all deployments for the specified resource group. + + String + + String + + + + + + ProvisioningState + + Gets only the deployments with the specified provisioning state. Valid values include, but are not limited to: Canceled, Deprovisioning, Failed, NotProvisioned, Provisioned, Provisioning, and Succeeded. This parameter is optional. By default, Get-AzureResourceGroupDeployment returns all deployments for the specified resource group. + + String + + String + + + + + + + + + None + + + + + + + + + + + + Microsoft.Azure.Commands.ResourceManagement.Models. PSResourceGroupDeployment + + + + + + + + + + + + + + + -------------------------- Example 1: Get all deployments for a resource group -------------------------- + + + + PS C:\>Get-AzureResourceGroupDeployment -ResourceGroupName ContosoLabsRG +DeploymentName : WordPress.WordPress +ResourceGroupName : ContosoLabsRG +ProvisioningState : Succeeded +Timestamp : 3/26/2014 1:56:55 AM +Mode : Incremental +TemplateLink : + Uri : https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.WORDPRESS.WORDPRESS.0.1.0-PREVIEW1/Deplo ymentTemplates/Website_NewHostingPlanBasicStandard_MySQL_NewDB.json + ContentVersion : 1.0.0.0 + + +Parameters : + Name Type Value + =============== ========================= ========== + siteName String wordpress-group-ws01 + hostingPlanName String Plan + siteMode String Limited + computeMode String Dedicated + siteLocation String North Europe + sku String Standard + workerSize String 0 + databaseName String wordpressgroupdbwp1 + databaseLocation String North Europe + databaseSku String + subscriptionId String c9cbd920-c00c-427c-852b-8aaf38babcde + resourceGroup String ContosoLabsRG + dbSubscriptionId String c9cbd920-c00c-427c-852b-8aaf38babcde + dbResourceGroup String WordPress-Group + autoscaleEnabled Bool True +Outputs : + + This command gets all deployments for the ContosoLabsRG resource group. The output shows a deployment for a WordPress blog that used a gallery template. + + + + + + + + + -------------------------- Example 2: Get a deployment by name -------------------------- + + + + PS C:\>Get-AzureResourceGroupDeployment -ResourceGroupName ContosoLabsRG -Name DeployWebsite1 + + This command gets the DeployWebsite1 deployment of the ContosoLabsRG resource group. You can assign a name to a deployment when you create it by using the New-AzureResourceGroup or New-AzureResourceGroupDeployment cmdlets. If you do not assign a name, the cmdlets provide a default name based on the template used to create the deployment. + + + + + + + + + -------------------------- Example 3: Get a deployment by provisioning state -------------------------- + + + + PS C:\>Get-AzureResourceGroupDeployment -ResourceGroupName ContosoLabsRG -ProvisioningState NotProvisioned + + This command gets the deployments of the ContosoLabsRG resource group that are not yet provisioned. + + + + + + + + + -------------------------- Example 4: Get the deployments of all resource groups -------------------------- + + + + PS C:\>Get-AzureResourceGroup | Get-AzureResourceGroupDeployment | Format-Table ResourceGroupName, DeploymentName, ProvisioningState +ResourceGroupName DeploymentName ProvisioningState +----------------- -------------- ----------------- +ContosoAppa001 Microsoft.WebSiteSQLDatabase.0.1.0-p... Succeeded +ContosoAppa001 DBUpdated Canceled +DevTest001 CakeSoftwareFoundation.CakePHP.0.1.0... Succeeded +LabDeploy001 Ghost.Ghost.0.1.0-preview1 Succeeded +ContosoDB CLrg001depl001 Succeeded +ContosoBlog WordPress.WordPress.0.1.0-preview1 Succeeded +ContosoLabsRG WordPress.WordPress Succeeded + + This command gets all deployments of all resource groups in the subscription and formats them in a table with their ResourceGroupName, DeploymentName and ProvisioningState property values. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=393044 + + + + + + + Get-AzureResourceGroupGalleryTemplate + + Gets resource group templates in the gallery + + + + + Get + AzureResourceGroupGalleryTemplate + + + + + The Get-AzureResourceGroupGalleryTemplate cmdlet gets resource group gallery templates from the template gallery that Azure hosts. To save a gallery template as a JSON file, use the Save-AzureResourceGroupGalleryTemplate cmdlet.A resource group template is a JSON string that defines a resource group for a complex entity, such as a web portal, a blog, a photo gallery, a commerce site, or a wiki. The template defines the resources that are typically needed for the entity, such as web sites, database servers, databases and storage accounts, and includes parameters for user-defined values, such as the names and properties of the resources. To create a resource group with a template, just identify the template and provide values for its parameters.You can create your own templates or use the Get-AzureResourceGroupGalleryTemplate get a template from the template gallery that Azure hosts. You can also create templates by editing the gallery templates. If you create or edit a template, be sure to use the Test-AzureResourceGroupTemplate cmdlet to verify that your template and its parameters are valid.To create a resource group with a custom or gallery template, use the New-AzureResourceGroup or New-AzureResourceGroupDeployment cmdlets.By default the cmdlet gets only the latest version of the template. To get all versions, use the -AllVersions parameter flag. + + + + Get-AzureResourceGroupGalleryTemplate + + Publisher + + Gets only gallery templates from the specified publisher. Enter one publisher name. Wildcards are not permitted. This parameter is optional. By default, Get-AzureResourceGroupGalleryTemplate gets all gallery templates. + + String + + + Category + + Gets only gallery templates in the specified category. Wildcards are not permitted. You can specify only one category in each command. This parameter is optional. By default, Get-AzureResourceGroupGalleryTemplate gets all gallery templates. + + String + + + ApplicationName + + + + String + + + AllVersions + + If specified, the cmdlet will return all versions of matching templates. By default only the latest version is returned. + + SwitchParameter + + + + Get-AzureResourceGroupGalleryTemplate + + Identity + + Gets the gallery template with the specified Identity value. Wildcards are not permitted. You can specify only one Identity in each command.To find the Identity of a gallery template, run Get-AzureResourceGroupGalleryTemplate without parameters. + + String + + + + + + Publisher + + Gets only gallery templates from the specified publisher. Enter one publisher name. Wildcards are not permitted. This parameter is optional. By default, Get-AzureResourceGroupGalleryTemplate gets all gallery templates. + + String + + String + + + + + + Category + + Gets only gallery templates in the specified category. Wildcards are not permitted. You can specify only one category in each command. This parameter is optional. By default, Get-AzureResourceGroupGalleryTemplate gets all gallery templates. + + String + + String + + + + + + ApplicationName + + + + String + + String + + + + + + AllVersions + + If specified, the cmdlet will return all versions of matching templates. By default only the latest version is returned. + + SwitchParameter + + SwitchParameter + + + + + + Identity + + Gets the gallery template with the specified Identity value. Wildcards are not permitted. You can specify only one Identity in each command.To find the Identity of a gallery template, run Get-AzureResourceGroupGalleryTemplate without parameters. + + String + + String + + + + + + + + + None + + + + + + + + + + + + System.Management.Automation.PSCustomObject + + + + + + + + + + + + + + + -------------------------- Example 1: Get all gallery templates -------------------------- + + + + PS C:\>Get-AzureResourceGroupGalleryTemplate + +Publisher Identity--------- --------Acquiacom Acquiacom.AcquiaDrupal7MySQL.0.1.0-preview1Acquiacom Acquiacom.AcquiaDrupal7SQL.0.1.0-preview1Avensoft Avensoft.nService.0.1.0-preview1BlogEngineNET BlogEngineNET.BlogEngineNET.0.1.0-preview1Brandoo Brandoo.BrandooWordPressMSSQLorAzureSQL.0.1.0-preview1bugnetproject bugnetproject.BugNET.0.1.0-preview1CakeSoftwareFoundation CakeSoftwareFoundation.CakePHP.0.1.0-preview1CommerceGuys CommerceGuys.DrupalCommerceKickstartMySQL.0.1.0-preview1... + + This command gets all gallery templates in the Azure template gallery and displays the Identity and Description of each gallery template in a list. The list lets you browse through the templates and select the ones that meet your needs. + + + + To save the list in a text file that you can search, use the redirection operator (>). For example, Get-AzureResourceGroupGalleryTemplate | Format-List Identity, Description > $home\Documents\Azure\TemplateDescriptions.txt. + + + + + -------------------------- Example 2: Get a gallery template by its identity -------------------------- + + + + PS C:\> PS C:\ps-test> Get-AzureResourceGroupGalleryTemplate -Identity WikimediaFoundation.MediaWiki.0.1.0-preview1 + + This command uses the Get-AzureResourceGroupGalleryTemplate cmdlet to get the WikimediaFoundation.MediaWiki.0.1.0-preview1 gallery template. You can review the gallery template and its properties, such as icons and screenshots. + + + + + + + + + -------------------------- Example 3: Save a gallery template as a JSON file -------------------------- + + + + PS C:\>Save-AzureResourceGroupGalleryTemplate -Identity Microsoft.PhotoGallery.0.1.0-preview1 -Path $home\Documents\Azure\MyTemplates + +PS C:\>Get-Content -Path $home\Documents\Azure\MyTemplates Microsoft.PhotoGallery.0.1.0-preview1.json { "$schema": "http://johngosmanage.blob.core.windows.net/schemas/2014-04-01-preview/deploymentTemplate.json", "contentVersion": "1.0.0.0", "parameters": { "siteName": { "type": "string" }, "hostingPlanName": { "type": "string" },... "resources": [ { "apiVersion": "2014-04-01", "name": "[parameters('siteName')]", "type": "Microsoft.Web/sites", "location": "[parameters('siteLocation')]", "tags": { "[concat('hidden-related:/subscriptions/', }, "properties": { "name": "[parameters('siteName')]", "serverFarm": "[parameters('hostingPlanName')]", "computeMode": "[parameters('computeMode')]", "siteMode": "[parameters('siteMode')]" }... + + When you find a gallery template that matches your resource needs, +you can save it as a JSON file on disk. This makes it easy to review and analyze the resources that the template creates and the parameters (user-defined values) that it defines for each resource. Then, you can use the template with the New-AzureResourceGroup and New-AzureResourceGroupDeployment cmdlets. + + + + The first command uses the Save-AzureResourceGroupGalleryTemplate cmdlet to save the Microsoft.PhotoGallery.0.1.0-preview1 gallery template as a JSON file in the path that you specify.The second command uses the Get-Content cmdlet to get the content of the template file. The output that's displayed here is just an excerpt of the JSON template file, but you can see the Parameters and Resources attributes that are common to every template file. To see examples of using the template, type: Get-Help New-AzureResourceGroup or Get-Help New-AzureResourceGroupDeployment. + + + + + -------------------------- Example 4: Get the category, identity, and summary of the templates -------------------------- + + + + PS C:\>Get-AzureResourceGroupGalleryTemplate | Foreach-Object {Get-AzureResourceGroupGalleryTemplate -Identity $_.Identity} | Format-List -Property CategoryIds, Identity, Summary +CategoryIds : {web, blogscms, ecommerce} +Identity : Acquiacom.AcquiaDrupal7MySQL.0.1.0-preview1 +Summary : Acquia Drupal 7 provides the fastest on-ramp to build dynamic and social web sites featuring both editorial and user-generated content. Includes Drupal core and popular modules. + + +CategoryIds : {web, other} +Identity : Avensoft.nService.0.1.0-preview1 +Summary : Help desk and service management software that empowers you to provide great services to your employees and customers. This free edition allows one concurrent technician and unlimited end users. +... + + This example shows you how to display the category (CategoryIds property), identity, and summary of each template in a list. You can use commands with this format to get any template property. To find all template properties, pipe a Get-AzureResourceGroupGalleryTemplate command with the Identity parameter to the Get-Member cmdlet. For example: (Get-AzureResourceGroupGalleryTemplate Microsoft.TeamProject.0.1.0-preview1 | Get-Member). + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=393052 + + + + + + + Get-AzureResourceGroupLog + + Gets the deployment log for a resource group + + + + + Get + AzureResourceGroupLog + + + + + The Get-AzureResourceGroupLog cmdlet gets the deployment log entries for a resource group. The entries are very useful for many IT tasks, including maintaining a transaction history, performing statistical analyses, and debugging.By default, Get-AzureResourceGroupLog gets the log entries of the currently running or most recently completed deployment for the resource group, but you can use the cmdlet parameters to get the entries for a particular deployment by name or all deployments. + + + + Get-AzureResourceGroupLog + + Name + + Specifies the name of a resource group. This parameter is required. Enter the name of one resource group in each command. + + String + + + + Get-AzureResourceGroupLog + + Name + + Specifies the name of a resource group. This parameter is required. Enter the name of one resource group in each command. + + String + + + All + + Gets all deployment log entries for the resource group. + + SwitchParameter + + + + Get-AzureResourceGroupLog + + Name + + Specifies the name of a resource group. This parameter is required. Enter the name of one resource group in each command. + + String + + + DeploymentName + + Gets the log entries for the deployments with the specified name.To get the names of deployments for a resource group, use the Get-AzureResourceGroupDeployment cmdlet. To specify a deployment name when deploying resources, use the DeploymentName parameter of New-AzureResourceGroup or the Name parameter (alias DeploymentName) of the New-AzureResourceGroupDeployment cmdlets. + + String + + + + + + Name + + Specifies the name of a resource group. This parameter is required. Enter the name of one resource group in each command. + + String + + String + + + + + + All + + Gets all deployment log entries for the resource group. + + SwitchParameter + + SwitchParameter + + + + + + DeploymentName + + Gets the log entries for the deployments with the specified name.To get the names of deployments for a resource group, use the Get-AzureResourceGroupDeployment cmdlet. To specify a deployment name when deploying resources, use the DeploymentName parameter of New-AzureResourceGroup or the Name parameter (alias DeploymentName) of the New-AzureResourceGroupDeployment cmdlets. + + String + + String + + + + + + + + + None + + + + + + + + + + + + Microsoft.Azure.Commands.ResourceManagement.Models.PSDeploymentEventData + + + + + + + + + + + + + + + -------------------------- Example 1: Get the log entries for the most recent deployment -------------------------- + + + + PS C:\>Get-AzureResourceGroupLog -Name ContosoRG01 +Authorization : + Scope : /subscriptions/9b14a38b-4b93-4554-8bb0-3cefb47a4e1f/resourcegroups/ContosoLabsRG/deployments/LabDeploy02 + Action : Microsoft.Resources/subscriptions/resourcegroups/deployments/write + Role : Subscription Admin + Condition : +ResourceUri : /subscriptions/9b14a38b-4b93-4554-8bb0-3cefb47a4e1f/resourcegroups/ContosoLabsRG/deployments/LabDeploy02 +SubscriptionId : 9b14a38b-4b93-4554-8bb0-3cefb47a4e1f +Timestamp(UTC) : 3/21/2014 9:17:33 PM +OperationName : Update deployment +OperationId : 4877e67f-868b-4b3e-8778-4a40ee3a1af2 +Status : Succeeded +SubStatus : Created +Caller : live.com#auxtm702@live.com +CorrelationId : 4877e67f-868b-4b3e-8778-4a40ee3a1af2Description : +HttpRequest : + ClientId : + Method : PUT + Url : + ClientIpAddress : 131.107.192.39 +Level : Informational +ResourceGroupName : ContosoLabsRG +ResourceProvider : Microsoft Resources +EventSource : Microsoft Resources +Properties : + statusCode : Created + + This command gets the log entries of the currently running or most recently completed deployment of the ContosoRG01 resource group. In this case, the log entries records the addition of a new web site. + + + + + + + + + -------------------------- Example 2: Get log entries by deployment name -------------------------- + + + + PS C:\>(Get-AzureResourceGroupDeployment -ResourceGroupName ContosoLabsRG).DeploymentNameMicrosoft.WebSiteSQLDatabase.0.1.0-preview1LabDeploy02LabDeploy03 +PS C:\>Get-AzureResourceGroupLog -Name ContosoLabsRG -DeploymentName LabDeploy02 + + These commands get the log entries of the LabDeploy02 deployment of the ContosoLabsRG resource group. + + + + The first command uses the Get-AzureResourceGroupDeployment cmdlet to get all deployments for the ContosoLabsRG resource group. It uses the dot method to get the DeploymentName property of each deployment. Notice that the name of the first deployment is a template name, which is the default value when you do not specify a deployment name.The second command uses the Get-AzureResourceGroupLog cmdlet to get the log entries for the LabDeploy02 deployment. + + + + + -------------------------- Example 3: Get all failing log entries for a resource group -------------------------- + + + + PS C:\>Get-AzureResourceGroupLog -Name ContosoRG01 -All | Where-Object Status -eq Failed + + This command gets all log entries of failed operations for the ContosoRG01 resource group. You might use a command like this for debugging. + + + + The first command uses the All parameter of the Get-AzureResourceGroupLog to get log entries for all deployments of the resource group. Then it pipes the log entries to the Where-Object cmdlet, which selects only entries that have a value of Failed for the Status property + + + + + -------------------------- Example 4: Get the logs of the most recent deployment for each resource group -------------------------- + + + + PS C:\>Get-AzureResourceGroup | Get-AzureResourceGroupLog + + This command gets the log entries for the most recent deployment of each resource group in the subscription. The command uses the Get-AzureResourceGroup cmdlet to get all resource groups in the subscription. It pipes the resources groups to the Get-AzureResourceGroupLog which gets the log entries for the last deployment of each resource group. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=393459 + + + + + + + Get-AzureRoleAssignment + + Filters role assignments. + + + + + Get + AzureRoleAssignment + + + + + Filters role assignments. + + + + Get-AzureRoleAssignment + + RoleDefinitionName + + Role to assign the principals with. + + String + + + + Get-AzureRoleAssignment + + ObjectId + + Object id of the user, group or service principal. + + Guid + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + + Get-AzureRoleAssignment + + ObjectId + + Object id of the user, group or service principal. + + Guid + + + ResourceGroupName + + Resource group to assign the role to. + + String + + + ResourceName + + Name of the resource to assign the role to. + + String + + + ResourceType + + Type of the resource to assign the role to. + + String + + + ParentResource + + Parent resource of the resource to assign the role to, if there is any. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + + Get-AzureRoleAssignment + + ObjectId + + Object id of the user, group or service principal. + + Guid + + + ResourceGroupName + + Resource group to assign the role to. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + + Get-AzureRoleAssignment + + ObjectId + + Object id of the user, group or service principal. + + Guid + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + Scope + + Scope of the role assignment. In the format of relative URI. If not specified, will assign the role at subscription level. If specified, it can either start with "/subscriptions/{id}" or the part after that. If it's latter, the current subscription id will be used. + + String + + + + Get-AzureRoleAssignment + + Mail + + Mail of the user or group + + String + + + ResourceGroupName + + Resource group to assign the role to. + + String + + + ResourceName + + Name of the resource to assign the role to. + + String + + + ResourceType + + Type of the resource to assign the role to. + + String + + + ParentResource + + Parent resource of the resource to assign the role to, if there is any. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + + Get-AzureRoleAssignment + + Mail + + Mail of the user or group + + String + + + ResourceGroupName + + Resource group to assign the role to. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + + Get-AzureRoleAssignment + + Mail + + Mail of the user or group + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + Scope + + Scope of the role assignment. In the format of relative URI. If not specified, will assign the role at subscription level. If specified, it can either start with "/subscriptions/{id}" or the part after that. If it's latter, the current subscription id will be used. + + String + + + + Get-AzureRoleAssignment + + Mail + + Mail of the user or group + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + + Get-AzureRoleAssignment + + UserPrincipalName + + UPN of the user. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + + Get-AzureRoleAssignment + + UserPrincipalName + + UPN of the user. + + String + + + ResourceGroupName + + Resource group to assign the role to. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + + Get-AzureRoleAssignment + + UserPrincipalName + + UPN of the user. + + String + + + ResourceGroupName + + Resource group to assign the role to. + + String + + + ResourceName + + Name of the resource to assign the role to. + + String + + + ResourceType + + Type of the resource to assign the role to. + + String + + + ParentResource + + Parent resource of the resource to assign the role to, if there is any. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + + Get-AzureRoleAssignment + + UserPrincipalName + + UPN of the user. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + Scope + + Scope of the role assignment. In the format of relative URI. If not specified, will assign the role at subscription level. If specified, it can either start with "/subscriptions/{id}" or the part after that. If it's latter, the current subscription id will be used. + + String + + + + Get-AzureRoleAssignment + + ServicePrincipalName + + SPN of the service principal. + + String + + + ResourceGroupName + + Resource group to assign the role to. + + String + + + ResourceName + + Name of the resource to assign the role to. + + String + + + ResourceType + + Type of the resource to assign the role to. + + String + + + ParentResource + + Parent resource of the resource to assign the role to, if there is any. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + + Get-AzureRoleAssignment + + ServicePrincipalName + + SPN of the service principal. + + String + + + ResourceGroupName + + Resource group to assign the role to. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + + Get-AzureRoleAssignment + + ServicePrincipalName + + SPN of the service principal. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + + Get-AzureRoleAssignment + + ServicePrincipalName + + SPN of the service principal. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + Scope + + Scope of the role assignment. In the format of relative URI. If not specified, will assign the role at subscription level. If specified, it can either start with "/subscriptions/{id}" or the part after that. If it's latter, the current subscription id will be used. + + String + + + + Get-AzureRoleAssignment + + ResourceGroupName + + Resource group to assign the role to. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + + Get-AzureRoleAssignment + + ResourceGroupName + + Resource group to assign the role to. + + String + + + ResourceName + + Name of the resource to assign the role to. + + String + + + ResourceType + + Type of the resource to assign the role to. + + String + + + ParentResource + + Parent resource of the resource to assign the role to, if there is any. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + + Get-AzureRoleAssignment + + RoleDefinitionName + + Role to assign the principals with. + + String + + + Scope + + Scope of the role assignment. In the format of relative URI. If not specified, will assign the role at subscription level. If specified, it can either start with "/subscriptions/{id}" or the part after that. If it's latter, the current subscription id will be used. + + String + + + + + + RoleDefinitionName + + Role to assign the principals with. + + String + + String + + + + + + ObjectId + + Object id of the user, group or service principal. + + Guid + + Guid + + + + + + ResourceGroupName + + Resource group to assign the role to. + + String + + String + + + + + + ResourceName + + Name of the resource to assign the role to. + + String + + String + + + + + + ResourceType + + Type of the resource to assign the role to. + + String + + String + + + + + + ParentResource + + Parent resource of the resource to assign the role to, if there is any. + + String + + String + + + + + + Scope + + Scope of the role assignment. In the format of relative URI. If not specified, will assign the role at subscription level. If specified, it can either start with "/subscriptions/{id}" or the part after that. If it's latter, the current subscription id will be used. + + String + + String + + + + + + Mail + + Mail of the user or group + + String + + String + + + + + + UserPrincipalName + + UPN of the user. + + String + + String + + + + + + ServicePrincipalName + + SPN of the service principal. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Filters role assignment using UPN, Role Definition and Resource Group -------------------------- + + + + PS C:\> Get-AzureRoleAssignment -ResourceGroupName rg1 -UPN foo@domain.com -RoleDefinitionName Reader + + gets role assignments for principal in a resource group that have Reader role definition + + + + + + + + + -------------------------- Filters role assignments using Service Principal Name -------------------------- + + + + PS C:\> Get-AzureRoleAssignment -ServicePrincipalName 36f81fc3-b00f-48cd-8218-3879f51ff39f -RoleDefinitionName Contributor + + Gets role assignments of a service principal that have contribution role definition. + + + + + + + + + -------------------------- List all role assignments in the subscription -------------------------- + + + + PS C:\> Get-AzureRoleAssignment + + Gets all role assignments under the subscription + + + + + + + + + -------------------------- Filters role assignment using explict Scope -------------------------- + + + + PS C:\> Get-AzureRoleAssignment -Mail allen.young@live.cn -RoleDefinitionName Owner -Scope "/resourcegroups/rg1/providers/Microsoft.Web/sites/site1" + + gets role assignment to a live email on a resource using the generic parameter. Since the scope doens't start with "/subscriptions/{id}", the current subscription id will be used + + + + + + + + + + + New-AzureRoleAssignment + + + + Remove-AzureRoleAssignment + + + + Get-AzureRoleDefinition + + + + + + + + Get-AzureRoleDefinition + + Filters role definitions. + + + + + Get + AzureRoleDefinition + + + + + Gets role definitions. + + + + Get-AzureRoleDefinition + + Name + + Role definition name. + + String + + + + + + Name + + Role definition name. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Gets a role definition -------------------------- + + + + PS C:\> Get-AzureRoleDefinition -Name Reader + + Gets a role definition with Reader name + + + + + + + + + -------------------------- Lists all role definitions -------------------------- + + + + PS C:\> Get-AzureRoleDefinition + + Lists all role definitions + + + + + + + + + + + New-AzureRoleAssignment + + + + Get-AzureRoleAssignment + + + + Get-AzureRoleAssignment + + + + + + + + New-AzureResource + + Creates a new resource in a resource group + + + + + New + AzureResource + + + + + The New-AzureResource cmdlet creates an Azure resource, such as a website, SQL Azure database server, or SQL Azure database, in a new or existing resource group.If a resource with the same name exists in the resource group, the cmdlet prompts for confirmation before replacing the existing resource. To suppress the confirmation prompt, use the Force parameter.A resource is a user-managed Azure entity. A resource group is a collection of resources that are deployed as a unit. Every resource belongs to exactly one resource group.Typically, you use a template to create a resource group (New-AzureResourceGroup) and its resources. Then, if necessary, you can use this cmdlet to add additional resources to it. + + + + New-AzureResource + + Location + + Specifies the location of the resource. This parameter is required. Enter an Azure data center location, such as "West US" or "Southeast Asia".You can place a resource in any location that supports resources of that type. The resource does not have to be in the same location your Azure subscription or the same location as its resource group. Resource groups can contain resources from different locations. To determine which locations support each resource type, use the Get-AzureLocation cmdlet. + + String + + + ApiVersion + + Specifies the API version that is supported by the resource provider. This parameter is required. + + String + + + PropertyObject + + Specifies properties values for the properties of a resource. Enter a hash table in @{propertyName = propertyValue} format. This parameter is optional.Use this parameter to specify the values of properties that are specific to a resource type. To find the properties that you can set for each type of resource, look at a few gallery templates, such as the templates that the Get-AzureResourceGroupGalleryTemplate cmdlet returns.For more information about hash tables in Windows PowerShell, type: Get-Help about_Hash_Tables (http://go.microsoft.com/fwlink/?LinkID=324844). + + Hashtable + + + Tag + + Applies the specified tags to the new resource. Enter new tags or predefined tags that you created by using the New-AzureTag cmdlet.A "tag" is a name-value pair that you can apply to resources and resource groups. Use tags to categorize your resources, such as by department or cost center, or to track notes or comments about the resources. After you assign tags to resources, you can use the Tag parameters of Get-AzureResource and Get-AzureResourceGroup to search for resources and groups by tag name or name and value.Every tag must have a Name key. It can also have an optional Value key with one value. To specify a new tag, use a hash table, such as @{Name="FY2015"} or @{Name="Department";Value="IT"}. To specify multiple tags, use commas to separate the hash tables, such as -Tag @{Name="FY2015"}, @{Name="Department";Value="IT"}. To get your predefined tags, use the Get-AzureTag cmdlet. + + Hashtable[] + + + Force + + Overwrites an existing resource group without warning. This parameter suppresses the confirmation prompt that New-AzureResource displays by default when the resource group already contains a resource with the same resource name. + + SwitchParameter + + + Name + + Specifies a name for a resource. This parameter is required. The resource name must be unique in the resource group. If the name of a particular type of resource must be unique in a larger scope, the command will fail with an message that the name is not unique in the required scope. + + String + + + ResourceGroupName + + Specifies the resource group for this resource. This parameter is required. Enter the name of a new or existing resource group. If the resource group doesn't exist, this cmdlet creates it for you.A resource group is a collection of resources that are deployed as a unit. Every resource belongs to exactly one resource group. + + String + + + ResourceType + + Enter the type of the resource that you are creating, such as "Microsoft.Web/sites" or " Microsoft.Sql/servers/databases". This parameter is required and its value is case-sensitive. Wildcards are not permitted. + + String + + + ParentResource + + Specifies the names of the logical parent of a resource. This parameter is optional. Enter the fully qualified name of the parent resource, such as "Microsoft.Sql/servers/ContosoSQLSvr". The name is case-sensitive. Wildcards are not permitted.Use this parameter when the resource is a type that has parents. For example, every SQL Azure database is associated with a SQL Azure database server. A resource group is not a parent of its resources. + + String + + + + + + Location + + Specifies the location of the resource. This parameter is required. Enter an Azure data center location, such as "West US" or "Southeast Asia".You can place a resource in any location that supports resources of that type. The resource does not have to be in the same location your Azure subscription or the same location as its resource group. Resource groups can contain resources from different locations. To determine which locations support each resource type, use the Get-AzureLocation cmdlet. + + String + + String + + + + + + ApiVersion + + Specifies the API version that is supported by the resource provider. This parameter is required. + + String + + String + + + + + + PropertyObject + + Specifies properties values for the properties of a resource. Enter a hash table in @{propertyName = propertyValue} format. This parameter is optional.Use this parameter to specify the values of properties that are specific to a resource type. To find the properties that you can set for each type of resource, look at a few gallery templates, such as the templates that the Get-AzureResourceGroupGalleryTemplate cmdlet returns.For more information about hash tables in Windows PowerShell, type: Get-Help about_Hash_Tables (http://go.microsoft.com/fwlink/?LinkID=324844). + + Hashtable + + Hashtable + + + + + + Tag + + Applies the specified tags to the new resource. Enter new tags or predefined tags that you created by using the New-AzureTag cmdlet.A "tag" is a name-value pair that you can apply to resources and resource groups. Use tags to categorize your resources, such as by department or cost center, or to track notes or comments about the resources. After you assign tags to resources, you can use the Tag parameters of Get-AzureResource and Get-AzureResourceGroup to search for resources and groups by tag name or name and value.Every tag must have a Name key. It can also have an optional Value key with one value. To specify a new tag, use a hash table, such as @{Name="FY2015"} or @{Name="Department";Value="IT"}. To specify multiple tags, use commas to separate the hash tables, such as -Tag @{Name="FY2015"}, @{Name="Department";Value="IT"}. To get your predefined tags, use the Get-AzureTag cmdlet. + + Hashtable[] + + Hashtable[] + + + + + + Force + + Overwrites an existing resource group without warning. This parameter suppresses the confirmation prompt that New-AzureResource displays by default when the resource group already contains a resource with the same resource name. + + SwitchParameter + + SwitchParameter + + + + + + Name + + Specifies a name for a resource. This parameter is required. The resource name must be unique in the resource group. If the name of a particular type of resource must be unique in a larger scope, the command will fail with an message that the name is not unique in the required scope. + + String + + String + + + + + + ResourceGroupName + + Specifies the resource group for this resource. This parameter is required. Enter the name of a new or existing resource group. If the resource group doesn't exist, this cmdlet creates it for you.A resource group is a collection of resources that are deployed as a unit. Every resource belongs to exactly one resource group. + + String + + String + + + + + + ResourceType + + Enter the type of the resource that you are creating, such as "Microsoft.Web/sites" or " Microsoft.Sql/servers/databases". This parameter is required and its value is case-sensitive. Wildcards are not permitted. + + String + + String + + + + + + ParentResource + + Specifies the names of the logical parent of a resource. This parameter is optional. Enter the fully qualified name of the parent resource, such as "Microsoft.Sql/servers/ContosoSQLSvr". The name is case-sensitive. Wildcards are not permitted.Use this parameter when the resource is a type that has parents. For example, every SQL Azure database is associated with a SQL Azure database server. A resource group is not a parent of its resources. + + String + + String + + + + + + + + + None + + + + + + + + + + + + Microsoft.Azure.Commands.ResourceManagement.Models.PSResource + + + + + + + + + + + + + + + -------------------------- Example 1: Create a new web site -------------------------- + + + + PS C:\>New-AzureResource -Name ContosoEngSite -Location "North Europe" -ResourceGroupName ContosoEngineering -ResourceType "Microsoft.Web/sites" -ApiVersion 2004-04-01 -PropertyObject @{"name" = "ContosoEngSite"; "siteMode" = "Limited"; "computeMode" = "Shared"} +Name : ContosoEngSite +ResourceGroupName : ContosoEngineering +ResourceType : Microsoft.Web/sites +Location : North Europe +Properties : {[name, ContosoEngSite], [state, Running], [hostNames, + System.Collections.Generic.List`1[System.Object]], [webSpace, + ContosoEngineering-NorthEuropewebspace]...} + + This command uses the New-AzureResource cmdlet to create the ContosoEngSite web site in the ContosoEngineering resource group. If the ContosoEngineering resource group doesn't exist, New-AzureResource creates it. If the ContosoEngineering resource group already has a resource named ContosoEngSite, the cmdlet prompt for confirmation before replacing it. + + + + The command uses the Location parameter to place the new web in the "North Europe" data center, although the resource group and its resources are located in several different locations.The cmdlet returns a PSResource object that represents the new database. + + + + + -------------------------- Example 2: Create a web site with property values -------------------------- + + + + PS C:\>$WebsiteProperties = @{name = "ContosoWeb"; serverFarm = CS01; computeMode = "Shared"; siteMode = "Limited";}PS C:\>New-AzureResource -Name ContosoWeb -ResouceGroupName CRG01 -ResourceType 'Microsoft.Web/sites' -Location "South Central US" -ApiVersion 2014-04-01 -PropertyObject $WebsiteProperties +Name : ContosoWeb +ResourceGroupName : ContosoEngineering +ResourceType : Microsoft.Web/sites +Location : South Central US +Properties : {[name, ContosoWeb], [state, Running], [hostNames, + System.Collections.Generic.List`1[System.Object]], [webSpace, + CRG01-Southcentralwebspace]...} + + These commands create the ContosoWeb Azure website in the CRG01 resource group. + + + + The first command creates a hash table of web site properties and saves it in the $WebsiteProperties variable. To find the properties that you can set for an Azure web site, use a gallery template, such as the ones that the Get-AzureResourceGroupGalleryTemplate cmdlet return.The second command uses the New-AzureResource cmdlet to create the web site. The value of the PropertyObject parameter is the hash table in the $WebsiteProperties variable. + + + + + -------------------------- Example 3: Add a website to a resource group -------------------------- + + + + PS C:\>New-AzureResourceGroup -Name ContosoPortal -Location "West US" -GalleryTemplateIdentity WordPress.WordPress.0.1.0-preview1 -TemplateParameterFile ".\WordPressParameters.json" + + +PS C:\>New-AzureResource –Name sqldb03 –ResourceType "Microsoft.Sql/servers/databases" –ResourceGroup ContosoPortal –Location "West US" –ParentResource "Microsoft.Sql/servers/ContosoServer01" –PropertyObject @{Edition = "Enterprise"; MaxSizeGB = 100} + + This example shows a typical use of this cmdlet. The first command uses the New-AzureResourceGroup cmdlet to create the ContosoPortal resource group. The command uses the WordPress gallery template (Get-AzureResourceGroupGalleryTemplate) and a JSON file, WordPressParameters.json, to specify values for the template-specific parameters, such as the name and location of the database, a name for the hosting plan, and web deployment credentials. + + + + The second command uses the New-AzureResource cmdlet to add an additional database to the ContosoPortal resource group. The command uses the PropertyObject parameter to specify a hash table of values for the Edition and MaxSizeGB properties of the new database. For the other databases in the resource group, these values were specified in the PortalParameters.rgcfg resource group configuration file. + + + + + -------------------------- Example 4: Create a resource group with tags -------------------------- + + + + PS C:\>New-AzureResource -Name ContosoEngSite -Location "North Europe" -ResourceGroupName ContosoEngineering -ResourceType "Microsoft.Web/sites" -ApiVersion 2004-04-01 -Tag @{Name="Status";Value="Approved"},@{Name="New"} + + This command creates a new website and applies two tags to it. The command uses the Tag parameter to apply a "Status" tag with a value of "Approved" and a tag named "New" with no value. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=393051 + + + + + + + New-AzureResourceGroup + + Creates an Azure resource group and its resources + + + + + New + AzureResourceGroup + + + + + The New-AzureResourceGroup cmdlet creates an Azure resource group and its resources and returns an object that represents the resource group.Use this cmdlet to create a new resource group. To add a deployment to an existing resource group, use the New-AzureResourceGroupDeployment cmdlet. To add a resource to an existing resource group, use the New-AzureResource cmdlet.An Azure resource is a user-managed Azure entity, such as a database server, database, or web site. An Azure resource group is a collection of Azure resources that are deployed as a unit.You can create a resource group with just a name and location, and then use the New-AzureResource cmdlet to create resources and add them to the resource group. However, typically, you use a resource group template, which is a JSON-based model of a resource group for a complex cloud-based service, such as a web portal. You can find many templates in the Azure template gallery (Get-AzureResourceGroupGalleryTemplate) and you can create your own templates.To find a gallery template, use the Get-AzureResourceGroupGalleryTemplate template cmdlet. To use a gallery template, use the GalleryTemplateIdentity parameter of New-AzureResourceGroup to specify the template identity. Or, use the Save-AzureResourceGalleryTemplate cmdlet to save the gallery template as a JSON file, and then use the TemplateFile or TemplateUri parameters to provide the name and location of the file.You can also create a custom resource group template, either by typing in a text file or by editing a gallery template. To use a custom template to create a resource group, use TemplateFile or TemplateUri parameters to supply the location and file name.The template includes parameters (placeholders) for configurable property values, likes names and sizes. To specify values for the template parameters, use a JSON-formatted parameter file (TemplateParameterFile parameter) or a hash table of parameter names and values (TemplateParameterObject parameter). Or, you can use the template parameters that are added to the command dynamically as soon as you specify a template. To use the dynamic parameters, just type them in the command, or type a minus sign to indicate a parameter name (-) and then press the TAB key repeatedly to cycle through the available parameters. If you miss a required template parameter, the cmdlet prompts you for the value. Template parameter values that you specify at the command line take precedence over template parameter values in a template parameter object or file. + + + + New-AzureResourceGroup + + Name + + Specifies a name for the resource group. This parameter is required. The resource name must be unique in the subscription.You can use -Name or its alias, -ResourceGroupName.If a resource group with that name already exists, the command prompts you for confirmation before replacing the existing resource group. To suppress the confirmation prompt, use the Force parameter. + + String + + + Location + + Specifies the location of the resource group. This parameter is required. Enter an Azure data center location, such as "West US" or "Southeast Asia".You can place a resource group in any location. The resource group does not have to be in the same location your Azure subscription or the same location as its resources. Resource groups can contain resources from different locations. To determine which location support each resource type, use the Get-AzureLocation cmdlet. + + String + + + DeploymentName + + Specifies the name of the deployment project for the resource group. Because the deployment properties are defined in a template, this parameter is valid only when you specify a template. This parameter is optional. The default value is the template name without the .json file name extension. + + String + + + Tag + + Applies the specified tags to the new resource group. Enter new tags or predefined tags that you created by using the New-AzureTag cmdlet.A "tag" is a name-value pair that you can apply to resources and resource groups. Use tags to categorize your resources, such as by department or cost center, or to track notes or comments about the resources. After you assign tags to resources, you can use the Tag parameters of Get-AzureResource and Get-AzureResourceGroup to search for resources and groups by tag name or name and value.Every tag must have a Name key. It can also have an optional Value key with one value. To specify a new tag, use a hash table, such as @{Name="FY2015"} or @{Name="Department";Value="IT"}. To specify multiple tags, use commas to separate the hash tables, such as -Tag @{Name="FY2015"}, @{Name="Department";Value="IT"}. To get your predefined tags, use the Get-AzureTag cmdlet. + + Hashtable[] + + + Force + + Suppresses the confirmation prompt and overwrites an existing resource group with the same name. By default, New-AzureResourceGroup prompts for confirmation before replacing an existing resource group. + + SwitchParameter + + + TemplateVersion + + Specifies a particular version of the gallery or custom template. Enter the version number, such as "2014-04-01-preview". This parameter is optional. If you specify this parameter, New-AzureResourceGroup verifies that the specified template has the matching version and fails if it does not. + + String + + + + New-AzureResourceGroup + + Name + + Specifies a name for the resource group. This parameter is required. The resource name must be unique in the subscription.You can use -Name or its alias, -ResourceGroupName.If a resource group with that name already exists, the command prompts you for confirmation before replacing the existing resource group. To suppress the confirmation prompt, use the Force parameter. + + String + + + Location + + Specifies the location of the resource group. This parameter is required. Enter an Azure data center location, such as "West US" or "Southeast Asia".You can place a resource group in any location. The resource group does not have to be in the same location your Azure subscription or the same location as its resources. Resource groups can contain resources from different locations. To determine which location support each resource type, use the Get-AzureLocation cmdlet. + + String + + + DeploymentName + + Specifies the name of the deployment project for the resource group. Because the deployment properties are defined in a template, this parameter is valid only when you specify a template. This parameter is optional. The default value is the template name without the .json file name extension. + + String + + + Tag + + Applies the specified tags to the new resource group. Enter new tags or predefined tags that you created by using the New-AzureTag cmdlet.A "tag" is a name-value pair that you can apply to resources and resource groups. Use tags to categorize your resources, such as by department or cost center, or to track notes or comments about the resources. After you assign tags to resources, you can use the Tag parameters of Get-AzureResource and Get-AzureResourceGroup to search for resources and groups by tag name or name and value.Every tag must have a Name key. It can also have an optional Value key with one value. To specify a new tag, use a hash table, such as @{Name="FY2015"} or @{Name="Department";Value="IT"}. To specify multiple tags, use commas to separate the hash tables, such as -Tag @{Name="FY2015"}, @{Name="Department";Value="IT"}. To get your predefined tags, use the Get-AzureTag cmdlet. + + Hashtable[] + + + Force + + Suppresses the confirmation prompt and overwrites an existing resource group with the same name. By default, New-AzureResourceGroup prompts for confirmation before replacing an existing resource group. + + SwitchParameter + + + TemplateParameterObject + + Specifies a hash table of template parameter names and values. For help with hash tables in Windows PowerShell, type: Get-Help about_Hash_Tables.This parameter is optional. If a template has parameters, you must specify parameter values, but you can use the TemplateParameterObject or the TemplateParameterFile parameters. Or, you can use the template parameters are added to the command dynamically when you specify a template. To use the dynamic parameters, just type them in the command, or type a minus sign to indicate a parameter name (-) and then press the TAB key repeatedly to cycle through the available parameters. If you miss a required parameter, the cmdlet prompts you for the value. + + Hashtable + + + GalleryTemplateIdentity + + Specifies the identity of a template in the Azure gallery. To find gallery templates, use the Get-AzureResourceGroupGalleryTemplate cmdlet. The value of the Identity property of each gallery item is displayed by default. + + String + + + TemplateVersion + + Specifies a particular version of the gallery or custom template. Enter the version number, such as "2014-04-01-preview". This parameter is optional. If you specify this parameter, New-AzureResourceGroup verifies that the specified template has the matching version and fails if it does not. + + String + + + + New-AzureResourceGroup + + Name + + Specifies a name for the resource group. This parameter is required. The resource name must be unique in the subscription.You can use -Name or its alias, -ResourceGroupName.If a resource group with that name already exists, the command prompts you for confirmation before replacing the existing resource group. To suppress the confirmation prompt, use the Force parameter. + + String + + + Location + + Specifies the location of the resource group. This parameter is required. Enter an Azure data center location, such as "West US" or "Southeast Asia".You can place a resource group in any location. The resource group does not have to be in the same location your Azure subscription or the same location as its resources. Resource groups can contain resources from different locations. To determine which location support each resource type, use the Get-AzureLocation cmdlet. + + String + + + DeploymentName + + Specifies the name of the deployment project for the resource group. Because the deployment properties are defined in a template, this parameter is valid only when you specify a template. This parameter is optional. The default value is the template name without the .json file name extension. + + String + + + Tag + + Applies the specified tags to the new resource group. Enter new tags or predefined tags that you created by using the New-AzureTag cmdlet.A "tag" is a name-value pair that you can apply to resources and resource groups. Use tags to categorize your resources, such as by department or cost center, or to track notes or comments about the resources. After you assign tags to resources, you can use the Tag parameters of Get-AzureResource and Get-AzureResourceGroup to search for resources and groups by tag name or name and value.Every tag must have a Name key. It can also have an optional Value key with one value. To specify a new tag, use a hash table, such as @{Name="FY2015"} or @{Name="Department";Value="IT"}. To specify multiple tags, use commas to separate the hash tables, such as -Tag @{Name="FY2015"}, @{Name="Department";Value="IT"}. To get your predefined tags, use the Get-AzureTag cmdlet. + + Hashtable[] + + + Force + + Suppresses the confirmation prompt and overwrites an existing resource group with the same name. By default, New-AzureResourceGroup prompts for confirmation before replacing an existing resource group. + + SwitchParameter + + + TemplateParameterObject + + Specifies a hash table of template parameter names and values. For help with hash tables in Windows PowerShell, type: Get-Help about_Hash_Tables.This parameter is optional. If a template has parameters, you must specify parameter values, but you can use the TemplateParameterObject or the TemplateParameterFile parameters. Or, you can use the template parameters are added to the command dynamically when you specify a template. To use the dynamic parameters, just type them in the command, or type a minus sign to indicate a parameter name (-) and then press the TAB key repeatedly to cycle through the available parameters. If you miss a required parameter, the cmdlet prompts you for the value. + + Hashtable + + + TemplateFile + + Specifies the path and file name of a JSON template file on disk. This can be a custom template or a gallery template that is saved to disk as a JSON file, such as by using the Save-AzureResourceGroupGalleryTemplate cmdlet.To use this parameter, the subscription must include a storage account where the cmdlet can save the template. By default, this cmdlet uses the current storage account in the subscription, but you can use the StorageAccountName parameter to specify an alternate storage account. If you do not specify a storage account and the subscription does not have a storage account that is designated as "current," the command fails.To create a storage account, use the Switch-AzureMode cmdlet to switch to the Azure module, and then use the New-AzureStorageAccount cmdlet. To make the a storage account the "current storage account" for the subscription, use the CurrentStorageAccountName parameter of the Set-AzureSubscription cmdlet. + + String + + + StorageAccountName + + Specifies the name of a storage account in the subscription. New-AzureResourceGroup saves the contents of template files in the storage account. This parameter is optional, but a storage account is required when you use the TemplateFile parameter.The default value is the current storage account in the subscription. If you do not specify a storage account and the subscription does not have a current storage account, the command fails.To create a storage account, use a Switch-AzureMode -Name AzureServiceManagement command to switch to the Azure module, and then use the New-AzureStorageAccount cmdlet. To make the a storage account the "current storage account" for the subscription, use the CurrentStorageAccountName parameter of the Set-AzureSubscription cmdlet. + + String + + + TemplateVersion + + Specifies a particular version of the gallery or custom template. Enter the version number, such as "2014-04-01-preview". This parameter is optional. If you specify this parameter, New-AzureResourceGroup verifies that the specified template has the matching version and fails if it does not. + + String + + + + New-AzureResourceGroup + + Name + + Specifies a name for the resource group. This parameter is required. The resource name must be unique in the subscription.You can use -Name or its alias, -ResourceGroupName.If a resource group with that name already exists, the command prompts you for confirmation before replacing the existing resource group. To suppress the confirmation prompt, use the Force parameter. + + String + + + Location + + Specifies the location of the resource group. This parameter is required. Enter an Azure data center location, such as "West US" or "Southeast Asia".You can place a resource group in any location. The resource group does not have to be in the same location your Azure subscription or the same location as its resources. Resource groups can contain resources from different locations. To determine which location support each resource type, use the Get-AzureLocation cmdlet. + + String + + + DeploymentName + + Specifies the name of the deployment project for the resource group. Because the deployment properties are defined in a template, this parameter is valid only when you specify a template. This parameter is optional. The default value is the template name without the .json file name extension. + + String + + + Tag + + Applies the specified tags to the new resource group. Enter new tags or predefined tags that you created by using the New-AzureTag cmdlet.A "tag" is a name-value pair that you can apply to resources and resource groups. Use tags to categorize your resources, such as by department or cost center, or to track notes or comments about the resources. After you assign tags to resources, you can use the Tag parameters of Get-AzureResource and Get-AzureResourceGroup to search for resources and groups by tag name or name and value.Every tag must have a Name key. It can also have an optional Value key with one value. To specify a new tag, use a hash table, such as @{Name="FY2015"} or @{Name="Department";Value="IT"}. To specify multiple tags, use commas to separate the hash tables, such as -Tag @{Name="FY2015"}, @{Name="Department";Value="IT"}. To get your predefined tags, use the Get-AzureTag cmdlet. + + Hashtable[] + + + Force + + Suppresses the confirmation prompt and overwrites an existing resource group with the same name. By default, New-AzureResourceGroup prompts for confirmation before replacing an existing resource group. + + SwitchParameter + + + TemplateParameterObject + + Specifies a hash table of template parameter names and values. For help with hash tables in Windows PowerShell, type: Get-Help about_Hash_Tables.This parameter is optional. If a template has parameters, you must specify parameter values, but you can use the TemplateParameterObject or the TemplateParameterFile parameters. Or, you can use the template parameters are added to the command dynamically when you specify a template. To use the dynamic parameters, just type them in the command, or type a minus sign to indicate a parameter name (-) and then press the TAB key repeatedly to cycle through the available parameters. If you miss a required parameter, the cmdlet prompts you for the value. + + Hashtable + + + TemplateUri + + Specifies the URI of a JSON template file. This file can be a custom template or a gallery template that is saved as a JSON file, such as by using the Save-AzureResourceGroupGalleryTemplate cmdlet. + + String + + + TemplateVersion + + Specifies a particular version of the gallery or custom template. Enter the version number, such as "2014-04-01-preview". This parameter is optional. If you specify this parameter, New-AzureResourceGroup verifies that the specified template has the matching version and fails if it does not. + + String + + + + New-AzureResourceGroup + + Name + + Specifies a name for the resource group. This parameter is required. The resource name must be unique in the subscription.You can use -Name or its alias, -ResourceGroupName.If a resource group with that name already exists, the command prompts you for confirmation before replacing the existing resource group. To suppress the confirmation prompt, use the Force parameter. + + String + + + Location + + Specifies the location of the resource group. This parameter is required. Enter an Azure data center location, such as "West US" or "Southeast Asia".You can place a resource group in any location. The resource group does not have to be in the same location your Azure subscription or the same location as its resources. Resource groups can contain resources from different locations. To determine which location support each resource type, use the Get-AzureLocation cmdlet. + + String + + + DeploymentName + + Specifies the name of the deployment project for the resource group. Because the deployment properties are defined in a template, this parameter is valid only when you specify a template. This parameter is optional. The default value is the template name without the .json file name extension. + + String + + + Tag + + Applies the specified tags to the new resource group. Enter new tags or predefined tags that you created by using the New-AzureTag cmdlet.A "tag" is a name-value pair that you can apply to resources and resource groups. Use tags to categorize your resources, such as by department or cost center, or to track notes or comments about the resources. After you assign tags to resources, you can use the Tag parameters of Get-AzureResource and Get-AzureResourceGroup to search for resources and groups by tag name or name and value.Every tag must have a Name key. It can also have an optional Value key with one value. To specify a new tag, use a hash table, such as @{Name="FY2015"} or @{Name="Department";Value="IT"}. To specify multiple tags, use commas to separate the hash tables, such as -Tag @{Name="FY2015"}, @{Name="Department";Value="IT"}. To get your predefined tags, use the Get-AzureTag cmdlet. + + Hashtable[] + + + Force + + Suppresses the confirmation prompt and overwrites an existing resource group with the same name. By default, New-AzureResourceGroup prompts for confirmation before replacing an existing resource group. + + SwitchParameter + + + TemplateParameterFile + + Specifies the path and name of a JSON file with the names and values of the template parameters. This parameter is optional. If a template has parameters, you must specify parameter values, but you can use the TemplateParameterObject or the TemplateParameterFile parameters. Or, you can use the template parameters are added to the command dynamically when you specify a template. To use the dynamic parameters, just type them in the command, or type a minus sign to indicate a parameter name (-) and then press the TAB key repeatedly to cycle through the available parameters. If you miss a required parameter, the cmdlet prompts you for the value. + + String + + + TemplateFile + + Specifies the path and file name of a JSON template file on disk. This can be a custom template or a gallery template that is saved to disk as a JSON file, such as by using the Save-AzureResourceGroupGalleryTemplate cmdlet.To use this parameter, the subscription must include a storage account where the cmdlet can save the template. By default, this cmdlet uses the current storage account in the subscription, but you can use the StorageAccountName parameter to specify an alternate storage account. If you do not specify a storage account and the subscription does not have a storage account that is designated as "current," the command fails.To create a storage account, use the Switch-AzureMode cmdlet to switch to the Azure module, and then use the New-AzureStorageAccount cmdlet. To make the a storage account the "current storage account" for the subscription, use the CurrentStorageAccountName parameter of the Set-AzureSubscription cmdlet. + + String + + + StorageAccountName + + Specifies the name of a storage account in the subscription. New-AzureResourceGroup saves the contents of template files in the storage account. This parameter is optional, but a storage account is required when you use the TemplateFile parameter.The default value is the current storage account in the subscription. If you do not specify a storage account and the subscription does not have a current storage account, the command fails.To create a storage account, use a Switch-AzureMode -Name AzureServiceManagement command to switch to the Azure module, and then use the New-AzureStorageAccount cmdlet. To make the a storage account the "current storage account" for the subscription, use the CurrentStorageAccountName parameter of the Set-AzureSubscription cmdlet. + + String + + + TemplateVersion + + Specifies a particular version of the gallery or custom template. Enter the version number, such as "2014-04-01-preview". This parameter is optional. If you specify this parameter, New-AzureResourceGroup verifies that the specified template has the matching version and fails if it does not. + + String + + + + New-AzureResourceGroup + + Name + + Specifies a name for the resource group. This parameter is required. The resource name must be unique in the subscription.You can use -Name or its alias, -ResourceGroupName.If a resource group with that name already exists, the command prompts you for confirmation before replacing the existing resource group. To suppress the confirmation prompt, use the Force parameter. + + String + + + Location + + Specifies the location of the resource group. This parameter is required. Enter an Azure data center location, such as "West US" or "Southeast Asia".You can place a resource group in any location. The resource group does not have to be in the same location your Azure subscription or the same location as its resources. Resource groups can contain resources from different locations. To determine which location support each resource type, use the Get-AzureLocation cmdlet. + + String + + + DeploymentName + + Specifies the name of the deployment project for the resource group. Because the deployment properties are defined in a template, this parameter is valid only when you specify a template. This parameter is optional. The default value is the template name without the .json file name extension. + + String + + + Tag + + Applies the specified tags to the new resource group. Enter new tags or predefined tags that you created by using the New-AzureTag cmdlet.A "tag" is a name-value pair that you can apply to resources and resource groups. Use tags to categorize your resources, such as by department or cost center, or to track notes or comments about the resources. After you assign tags to resources, you can use the Tag parameters of Get-AzureResource and Get-AzureResourceGroup to search for resources and groups by tag name or name and value.Every tag must have a Name key. It can also have an optional Value key with one value. To specify a new tag, use a hash table, such as @{Name="FY2015"} or @{Name="Department";Value="IT"}. To specify multiple tags, use commas to separate the hash tables, such as -Tag @{Name="FY2015"}, @{Name="Department";Value="IT"}. To get your predefined tags, use the Get-AzureTag cmdlet. + + Hashtable[] + + + Force + + Suppresses the confirmation prompt and overwrites an existing resource group with the same name. By default, New-AzureResourceGroup prompts for confirmation before replacing an existing resource group. + + SwitchParameter + + + TemplateParameterFile + + Specifies the path and name of a JSON file with the names and values of the template parameters. This parameter is optional. If a template has parameters, you must specify parameter values, but you can use the TemplateParameterObject or the TemplateParameterFile parameters. Or, you can use the template parameters are added to the command dynamically when you specify a template. To use the dynamic parameters, just type them in the command, or type a minus sign to indicate a parameter name (-) and then press the TAB key repeatedly to cycle through the available parameters. If you miss a required parameter, the cmdlet prompts you for the value. + + String + + + GalleryTemplateIdentity + + Specifies the identity of a template in the Azure gallery. To find gallery templates, use the Get-AzureResourceGroupGalleryTemplate cmdlet. The value of the Identity property of each gallery item is displayed by default. + + String + + + TemplateVersion + + Specifies a particular version of the gallery or custom template. Enter the version number, such as "2014-04-01-preview". This parameter is optional. If you specify this parameter, New-AzureResourceGroup verifies that the specified template has the matching version and fails if it does not. + + String + + + + New-AzureResourceGroup + + Name + + Specifies a name for the resource group. This parameter is required. The resource name must be unique in the subscription.You can use -Name or its alias, -ResourceGroupName.If a resource group with that name already exists, the command prompts you for confirmation before replacing the existing resource group. To suppress the confirmation prompt, use the Force parameter. + + String + + + Location + + Specifies the location of the resource group. This parameter is required. Enter an Azure data center location, such as "West US" or "Southeast Asia".You can place a resource group in any location. The resource group does not have to be in the same location your Azure subscription or the same location as its resources. Resource groups can contain resources from different locations. To determine which location support each resource type, use the Get-AzureLocation cmdlet. + + String + + + DeploymentName + + Specifies the name of the deployment project for the resource group. Because the deployment properties are defined in a template, this parameter is valid only when you specify a template. This parameter is optional. The default value is the template name without the .json file name extension. + + String + + + Tag + + Applies the specified tags to the new resource group. Enter new tags or predefined tags that you created by using the New-AzureTag cmdlet.A "tag" is a name-value pair that you can apply to resources and resource groups. Use tags to categorize your resources, such as by department or cost center, or to track notes or comments about the resources. After you assign tags to resources, you can use the Tag parameters of Get-AzureResource and Get-AzureResourceGroup to search for resources and groups by tag name or name and value.Every tag must have a Name key. It can also have an optional Value key with one value. To specify a new tag, use a hash table, such as @{Name="FY2015"} or @{Name="Department";Value="IT"}. To specify multiple tags, use commas to separate the hash tables, such as -Tag @{Name="FY2015"}, @{Name="Department";Value="IT"}. To get your predefined tags, use the Get-AzureTag cmdlet. + + Hashtable[] + + + Force + + Suppresses the confirmation prompt and overwrites an existing resource group with the same name. By default, New-AzureResourceGroup prompts for confirmation before replacing an existing resource group. + + SwitchParameter + + + TemplateParameterFile + + Specifies the path and name of a JSON file with the names and values of the template parameters. This parameter is optional. If a template has parameters, you must specify parameter values, but you can use the TemplateParameterObject or the TemplateParameterFile parameters. Or, you can use the template parameters are added to the command dynamically when you specify a template. To use the dynamic parameters, just type them in the command, or type a minus sign to indicate a parameter name (-) and then press the TAB key repeatedly to cycle through the available parameters. If you miss a required parameter, the cmdlet prompts you for the value. + + String + + + TemplateUri + + Specifies the URI of a JSON template file. This file can be a custom template or a gallery template that is saved as a JSON file, such as by using the Save-AzureResourceGroupGalleryTemplate cmdlet. + + String + + + TemplateVersion + + Specifies a particular version of the gallery or custom template. Enter the version number, such as "2014-04-01-preview". This parameter is optional. If you specify this parameter, New-AzureResourceGroup verifies that the specified template has the matching version and fails if it does not. + + String + + + + New-AzureResourceGroup + + Name + + Specifies a name for the resource group. This parameter is required. The resource name must be unique in the subscription.You can use -Name or its alias, -ResourceGroupName.If a resource group with that name already exists, the command prompts you for confirmation before replacing the existing resource group. To suppress the confirmation prompt, use the Force parameter. + + String + + + Location + + Specifies the location of the resource group. This parameter is required. Enter an Azure data center location, such as "West US" or "Southeast Asia".You can place a resource group in any location. The resource group does not have to be in the same location your Azure subscription or the same location as its resources. Resource groups can contain resources from different locations. To determine which location support each resource type, use the Get-AzureLocation cmdlet. + + String + + + DeploymentName + + Specifies the name of the deployment project for the resource group. Because the deployment properties are defined in a template, this parameter is valid only when you specify a template. This parameter is optional. The default value is the template name without the .json file name extension. + + String + + + Tag + + Applies the specified tags to the new resource group. Enter new tags or predefined tags that you created by using the New-AzureTag cmdlet.A "tag" is a name-value pair that you can apply to resources and resource groups. Use tags to categorize your resources, such as by department or cost center, or to track notes or comments about the resources. After you assign tags to resources, you can use the Tag parameters of Get-AzureResource and Get-AzureResourceGroup to search for resources and groups by tag name or name and value.Every tag must have a Name key. It can also have an optional Value key with one value. To specify a new tag, use a hash table, such as @{Name="FY2015"} or @{Name="Department";Value="IT"}. To specify multiple tags, use commas to separate the hash tables, such as -Tag @{Name="FY2015"}, @{Name="Department";Value="IT"}. To get your predefined tags, use the Get-AzureTag cmdlet. + + Hashtable[] + + + Force + + Suppresses the confirmation prompt and overwrites an existing resource group with the same name. By default, New-AzureResourceGroup prompts for confirmation before replacing an existing resource group. + + SwitchParameter + + + GalleryTemplateIdentity + + Specifies the identity of a template in the Azure gallery. To find gallery templates, use the Get-AzureResourceGroupGalleryTemplate cmdlet. The value of the Identity property of each gallery item is displayed by default. + + String + + + TemplateVersion + + Specifies a particular version of the gallery or custom template. Enter the version number, such as "2014-04-01-preview". This parameter is optional. If you specify this parameter, New-AzureResourceGroup verifies that the specified template has the matching version and fails if it does not. + + String + + + + New-AzureResourceGroup + + Name + + Specifies a name for the resource group. This parameter is required. The resource name must be unique in the subscription.You can use -Name or its alias, -ResourceGroupName.If a resource group with that name already exists, the command prompts you for confirmation before replacing the existing resource group. To suppress the confirmation prompt, use the Force parameter. + + String + + + Location + + Specifies the location of the resource group. This parameter is required. Enter an Azure data center location, such as "West US" or "Southeast Asia".You can place a resource group in any location. The resource group does not have to be in the same location your Azure subscription or the same location as its resources. Resource groups can contain resources from different locations. To determine which location support each resource type, use the Get-AzureLocation cmdlet. + + String + + + DeploymentName + + Specifies the name of the deployment project for the resource group. Because the deployment properties are defined in a template, this parameter is valid only when you specify a template. This parameter is optional. The default value is the template name without the .json file name extension. + + String + + + Tag + + Applies the specified tags to the new resource group. Enter new tags or predefined tags that you created by using the New-AzureTag cmdlet.A "tag" is a name-value pair that you can apply to resources and resource groups. Use tags to categorize your resources, such as by department or cost center, or to track notes or comments about the resources. After you assign tags to resources, you can use the Tag parameters of Get-AzureResource and Get-AzureResourceGroup to search for resources and groups by tag name or name and value.Every tag must have a Name key. It can also have an optional Value key with one value. To specify a new tag, use a hash table, such as @{Name="FY2015"} or @{Name="Department";Value="IT"}. To specify multiple tags, use commas to separate the hash tables, such as -Tag @{Name="FY2015"}, @{Name="Department";Value="IT"}. To get your predefined tags, use the Get-AzureTag cmdlet. + + Hashtable[] + + + Force + + Suppresses the confirmation prompt and overwrites an existing resource group with the same name. By default, New-AzureResourceGroup prompts for confirmation before replacing an existing resource group. + + SwitchParameter + + + TemplateFile + + Specifies the path and file name of a JSON template file on disk. This can be a custom template or a gallery template that is saved to disk as a JSON file, such as by using the Save-AzureResourceGroupGalleryTemplate cmdlet.To use this parameter, the subscription must include a storage account where the cmdlet can save the template. By default, this cmdlet uses the current storage account in the subscription, but you can use the StorageAccountName parameter to specify an alternate storage account. If you do not specify a storage account and the subscription does not have a storage account that is designated as "current," the command fails.To create a storage account, use the Switch-AzureMode cmdlet to switch to the Azure module, and then use the New-AzureStorageAccount cmdlet. To make the a storage account the "current storage account" for the subscription, use the CurrentStorageAccountName parameter of the Set-AzureSubscription cmdlet. + + String + + + StorageAccountName + + Specifies the name of a storage account in the subscription. New-AzureResourceGroup saves the contents of template files in the storage account. This parameter is optional, but a storage account is required when you use the TemplateFile parameter.The default value is the current storage account in the subscription. If you do not specify a storage account and the subscription does not have a current storage account, the command fails.To create a storage account, use a Switch-AzureMode -Name AzureServiceManagement command to switch to the Azure module, and then use the New-AzureStorageAccount cmdlet. To make the a storage account the "current storage account" for the subscription, use the CurrentStorageAccountName parameter of the Set-AzureSubscription cmdlet. + + String + + + TemplateVersion + + Specifies a particular version of the gallery or custom template. Enter the version number, such as "2014-04-01-preview". This parameter is optional. If you specify this parameter, New-AzureResourceGroup verifies that the specified template has the matching version and fails if it does not. + + String + + + + New-AzureResourceGroup + + Name + + Specifies a name for the resource group. This parameter is required. The resource name must be unique in the subscription.You can use -Name or its alias, -ResourceGroupName.If a resource group with that name already exists, the command prompts you for confirmation before replacing the existing resource group. To suppress the confirmation prompt, use the Force parameter. + + String + + + Location + + Specifies the location of the resource group. This parameter is required. Enter an Azure data center location, such as "West US" or "Southeast Asia".You can place a resource group in any location. The resource group does not have to be in the same location your Azure subscription or the same location as its resources. Resource groups can contain resources from different locations. To determine which location support each resource type, use the Get-AzureLocation cmdlet. + + String + + + DeploymentName + + Specifies the name of the deployment project for the resource group. Because the deployment properties are defined in a template, this parameter is valid only when you specify a template. This parameter is optional. The default value is the template name without the .json file name extension. + + String + + + Tag + + Applies the specified tags to the new resource group. Enter new tags or predefined tags that you created by using the New-AzureTag cmdlet.A "tag" is a name-value pair that you can apply to resources and resource groups. Use tags to categorize your resources, such as by department or cost center, or to track notes or comments about the resources. After you assign tags to resources, you can use the Tag parameters of Get-AzureResource and Get-AzureResourceGroup to search for resources and groups by tag name or name and value.Every tag must have a Name key. It can also have an optional Value key with one value. To specify a new tag, use a hash table, such as @{Name="FY2015"} or @{Name="Department";Value="IT"}. To specify multiple tags, use commas to separate the hash tables, such as -Tag @{Name="FY2015"}, @{Name="Department";Value="IT"}. To get your predefined tags, use the Get-AzureTag cmdlet. + + Hashtable[] + + + Force + + Suppresses the confirmation prompt and overwrites an existing resource group with the same name. By default, New-AzureResourceGroup prompts for confirmation before replacing an existing resource group. + + SwitchParameter + + + TemplateUri + + Specifies the URI of a JSON template file. This file can be a custom template or a gallery template that is saved as a JSON file, such as by using the Save-AzureResourceGroupGalleryTemplate cmdlet. + + String + + + TemplateVersion + + Specifies a particular version of the gallery or custom template. Enter the version number, such as "2014-04-01-preview". This parameter is optional. If you specify this parameter, New-AzureResourceGroup verifies that the specified template has the matching version and fails if it does not. + + String + + + + + + Name + + Specifies a name for the resource group. This parameter is required. The resource name must be unique in the subscription.You can use -Name or its alias, -ResourceGroupName.If a resource group with that name already exists, the command prompts you for confirmation before replacing the existing resource group. To suppress the confirmation prompt, use the Force parameter. + + String + + String + + + + + + Location + + Specifies the location of the resource group. This parameter is required. Enter an Azure data center location, such as "West US" or "Southeast Asia".You can place a resource group in any location. The resource group does not have to be in the same location your Azure subscription or the same location as its resources. Resource groups can contain resources from different locations. To determine which location support each resource type, use the Get-AzureLocation cmdlet. + + String + + String + + + + + + DeploymentName + + Specifies the name of the deployment project for the resource group. Because the deployment properties are defined in a template, this parameter is valid only when you specify a template. This parameter is optional. The default value is the template name without the .json file name extension. + + String + + String + + + + + + Tag + + Applies the specified tags to the new resource group. Enter new tags or predefined tags that you created by using the New-AzureTag cmdlet.A "tag" is a name-value pair that you can apply to resources and resource groups. Use tags to categorize your resources, such as by department or cost center, or to track notes or comments about the resources. After you assign tags to resources, you can use the Tag parameters of Get-AzureResource and Get-AzureResourceGroup to search for resources and groups by tag name or name and value.Every tag must have a Name key. It can also have an optional Value key with one value. To specify a new tag, use a hash table, such as @{Name="FY2015"} or @{Name="Department";Value="IT"}. To specify multiple tags, use commas to separate the hash tables, such as -Tag @{Name="FY2015"}, @{Name="Department";Value="IT"}. To get your predefined tags, use the Get-AzureTag cmdlet. + + Hashtable[] + + Hashtable[] + + + + + + Force + + Suppresses the confirmation prompt and overwrites an existing resource group with the same name. By default, New-AzureResourceGroup prompts for confirmation before replacing an existing resource group. + + SwitchParameter + + SwitchParameter + + + + + + TemplateVersion + + Specifies a particular version of the gallery or custom template. Enter the version number, such as "2014-04-01-preview". This parameter is optional. If you specify this parameter, New-AzureResourceGroup verifies that the specified template has the matching version and fails if it does not. + + String + + String + + + + + + TemplateParameterObject + + Specifies a hash table of template parameter names and values. For help with hash tables in Windows PowerShell, type: Get-Help about_Hash_Tables.This parameter is optional. If a template has parameters, you must specify parameter values, but you can use the TemplateParameterObject or the TemplateParameterFile parameters. Or, you can use the template parameters are added to the command dynamically when you specify a template. To use the dynamic parameters, just type them in the command, or type a minus sign to indicate a parameter name (-) and then press the TAB key repeatedly to cycle through the available parameters. If you miss a required parameter, the cmdlet prompts you for the value. + + Hashtable + + Hashtable + + + + + + GalleryTemplateIdentity + + Specifies the identity of a template in the Azure gallery. To find gallery templates, use the Get-AzureResourceGroupGalleryTemplate cmdlet. The value of the Identity property of each gallery item is displayed by default. + + String + + String + + + + + + TemplateFile + + Specifies the path and file name of a JSON template file on disk. This can be a custom template or a gallery template that is saved to disk as a JSON file, such as by using the Save-AzureResourceGroupGalleryTemplate cmdlet.To use this parameter, the subscription must include a storage account where the cmdlet can save the template. By default, this cmdlet uses the current storage account in the subscription, but you can use the StorageAccountName parameter to specify an alternate storage account. If you do not specify a storage account and the subscription does not have a storage account that is designated as "current," the command fails.To create a storage account, use the Switch-AzureMode cmdlet to switch to the Azure module, and then use the New-AzureStorageAccount cmdlet. To make the a storage account the "current storage account" for the subscription, use the CurrentStorageAccountName parameter of the Set-AzureSubscription cmdlet. + + String + + String + + + + + + StorageAccountName + + Specifies the name of a storage account in the subscription. New-AzureResourceGroup saves the contents of template files in the storage account. This parameter is optional, but a storage account is required when you use the TemplateFile parameter.The default value is the current storage account in the subscription. If you do not specify a storage account and the subscription does not have a current storage account, the command fails.To create a storage account, use a Switch-AzureMode -Name AzureServiceManagement command to switch to the Azure module, and then use the New-AzureStorageAccount cmdlet. To make the a storage account the "current storage account" for the subscription, use the CurrentStorageAccountName parameter of the Set-AzureSubscription cmdlet. + + String + + String + + + + + + TemplateUri + + Specifies the URI of a JSON template file. This file can be a custom template or a gallery template that is saved as a JSON file, such as by using the Save-AzureResourceGroupGalleryTemplate cmdlet. + + String + + String + + + + + + TemplateParameterFile + + Specifies the path and name of a JSON file with the names and values of the template parameters. This parameter is optional. If a template has parameters, you must specify parameter values, but you can use the TemplateParameterObject or the TemplateParameterFile parameters. Or, you can use the template parameters are added to the command dynamically when you specify a template. To use the dynamic parameters, just type them in the command, or type a minus sign to indicate a parameter name (-) and then press the TAB key repeatedly to cycle through the available parameters. If you miss a required parameter, the cmdlet prompts you for the value. + + String + + String + + + + + + + + + None + + + + + + + + + + + + Microsoft.Azure.Commands.ResourceManagement.Models.PSResourceGroup + + + + + + + + + + + + + + + -------------------------- Example 1: Create an empty resource group -------------------------- + + + + PS C:\>New-AzureResourceGroup -Name RG1 -Location "South Central US" +ResourceGroupName : RG1 +Location : southcentralus +ProvisioningState : Succeeded +Resources + + This command creates a resource group that has no resources. You can use the New-AzureResource or New-AzureResourceGroupDeployment cmdlets to add resources and deployments to this resource group. + + + + + + + + + -------------------------- Example 2: Create a resource group from a custom template -------------------------- + + + + PS C:\>New-AzureResourceGroup –Name ContosoHosting –Location "West US" –TemplateFile D:\Templates\ContosoHosting.json -TemplateVersion "2014-04-01-preview" -DeploymentName ContosoHosting -TemplateParameterFile D:\Templates\ContosoHostingParms.json +Name: ContosoHosting +Location: westus +Resources: + Name Type Location + =============== ======================= ======== + ContosoHosting Microsoft.Web/serverFarms westus + Contoso Microsoft.Web/Sites West US + + This command creates the "ContosoHosting" resource group from a custom template. It uses the TemplateFile parameter to specify the path and file name of the ContosoHosting.json template file and the TemplateParameterFile parameter to specify the ContosoHostingParms.json file, which contains the names and values of the parameters in the template. Because the command does not specify a storage account, New-AzureResourceGroup uses the current storage account in the subscription. + + + + + + + + + -------------------------- Example 3: Create a resource group from a gallery template -------------------------- + + + + PS C:\>New-AzureResourceGroup –Name ContosoRG01 –Location "West US" –GalleryTemplateIdentity Microsoft.WebSite.0.1.0-preview1 -siteName ContosoWeb -hostingPlanName ContosoHosting -siteMode Limited -computeMode Shared -siteLocation "South Central US" -subscriptionID "9b14a38b-4b93-4554-8bb0-3cefb47abcde" -resourceGroup ContosoRG01 +ResourceGroupName : ContosoRG01 +Location : westus +ProvisioningState : Succeeded +Resources : + Name Type Location + =============== ========================= ========== + Default1 Microsoft.Web/serverFarms southcentralus + ContosoWeb Microsoft.Web/sites southcentralus + + This example shows how to create a resource group from a gallery template and use the parameters that are added to the command dynamically to provide the template parameter values. + + + + This command uses the New-AzureResourceGroup cmdlet to create a new resource group. It uses the GalleryTemplateIdentity parameter to specify the identity of the gallery template. In this scenario, you don't need to save the gallery template to disk.After you type the cmdlet parameters and values, type a minus sign (to indicate a parameter name) and then press the TAB key to trigger tab-completion. The cmdlet adds a parameter, such as siteMode. Type the parameter value, type a minus sign, press TAB, and it adds another parameter. To cycle through the parameter names, press TAB repeatedly. If you miss a mandatory template parameter, the cmdlet prompts you for the value. + + + + + -------------------------- Example 4: Create a resource group from a saved gallery template -------------------------- + + + + PS C:\> The first command uses the Get-AzureResourceGroupGalleryTemplate to get a gallery item. It pipes the gallery item to the Save-AzureResourceGroupGalleryTemplate cmdlet, which save the template as a JSON file in the path that you specify. +PS C:\>Get-AzureResourceGroupGalleryTemplate -Identity Microsoft.WebSite.0.1.0-preview1 | Save-AzureResourceGroupTemplate -Path D:\Azure\Templates + +Path: +D:\Azure\Templates\Microsoft.WebSite.0.1.0-preview1.json + +Before we create the hash table of template parameters, we need to know which parameters the template requires. The second command uses the Get-Content cmdlet to get the contents of the template file and its Raw parameter, which ignores line breaks and returns a single JSON string. The command pipes the template to the ConvertFrom-Json cmdlet, which returns a custom object (PSCustomObject) that represents the template and saves it in the $t variable. You can use this technique to manipulate the template in Windows PowerShell. +PS C:\>$t = Get-Content -Raw -Path $home\Documents\Azure\Templates\Microsoft.WebSite.0.1.0-preview1.json | ConvertFrom-Json + + +The third command gets the Parameters property of the template custom object. The object also has a Resources property that represents the resources in the template. +PS C:\>$t.Parameters +siteName : @{type=string} +hostingPlanName : @{type=string} +siteMode : @{type=string} +computeMode : @{type=string} +siteLocation : @{type=string} +subscriptionId : @{type=string} +resourceGroup : @{type=string} + +The fourth command creates a hash table of the template parameters and values and saves them in a $params variable. +PS C:\>$params = @{siteName="ContosoWeb"; hostingPlanName = "ContosoHosting"; siteMode = "Limited"; computeMode = "Shared"; siteLocation = "South Central US"; subscriptionId = "9b14a38b-4b93-4554-8bb0-3cefb47abcde"; resourceGroup = "ContosoRG01"} + + +The fifth command uses the New-AzureResourceGroup cmdlet to create the resource group. It uses the TemplateFile parameter to specify the gallery template file on disk and the TemplateParameterObject parameter to specify the hash table of template parameter names and values in the $params variable. It uses the StorageAccountName parameter to specify the storage account in which the template is stored. You must specify a storage account when you use the TemplateFile parameter and a "current" storage account has not been selected for the subscription.The cmdlet returns an object that represents the new resource group. +PS C:\>New-AzureResourceGroup –Name ContosoRG01 –Location "West US" –StorageAccountName contosostorage01 -DeploymentName WebDeploy01 -TemplateFile $home\Documents\Azure\Templates\Microsoft.WebSite.0.1.0-preview1.json -TemplateParameterObject @params -StorageAccountName ContosoStorage +ResourceGroupName : ContosoRG01 +Location : westus +ProvisioningState : Succeeded +Resources : + Name Type Location + =============== ========================= ========== + Default1 Microsoft.Web/serverFarms southcentralus + ContosoWeb Microsoft.Web/sites southcentralus + + This example shows how to create a resource group from a gallery template that you saved to disk by using the Save-AzureResourceGroupGalleryTemplate cmdlet and a hash table of template parameter names and values. + + + + + + + + + -------------------------- Example 5: Create a resource group with tags -------------------------- + + + + PS C:\>New-AzureResourceGroup -Name RG1 -Location "South Central US" -Tag @{Name="Empty"}, @{Name="Department";Value="Marketing"} + + This command creates a new empty resource group. This command is the same as the command in Example 1, except that it assigns tags to the resource group. The first tag, named "Empty," could be used to identify resource groups that have no resources. The second tag is named "Department" and has a value of "Marketing". You can use a tag like this one to categorize resource groups for administration or budgeting. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=393048 + + + + + + + New-AzureResourceGroupDeployment + + Add an Azure deployment to a resource group. + + + + + New + AzureResourceGroupDeployment + + + + + The New-AzureResourceGroupDeployment cmdlet adds a deployment to an existing resource group, including the resources that the deployment requires. This cmdlet is similar to the New-AzureResourceGroup cmdlet, but it works on existing resource groups, instead of new ones. To add resources to a resource group without using a template, use the New-AzureResource cmdlet.An Azure resource is a user-managed Azure entity, such as a database server, database, website, virtual machine, or storage account. An Azure resource group is a collection of Azure resources that are deployed as a unit, such as the web site, database server, and databases that are required for a financial web site. A deployment uses a resource group template to add resource to a resource group and publish them so they are available in Azure.To add a resource group deployment, specify the name of an existing resource group and a resource group template, which is a JSON string that represents of a resource group for a complex cloud-based service, such as a web portal. The template includes parameter (placeholders) for required resources and configurable property values, likes names and sizes. You can find many templates in the Azure template gallery and you can create your own templates.To find a gallery template, use the Get-AzureResourceGroupGalleryTemplate template cmdlet. To use a gallery template, use the GalleryTemplateIdentity parameter of New-AzureResourceGroupDeployment to specify the template identity. Or, use the Save-AzureResourceGalleryTemplate cmdlet to save the gallery template as a JSON file, and then use the TemplateFile or TemplateUri parameters to provide the name and location of the file.You can also create a custom resource group template, either by typing in a text file or by editing a gallery template. To use a custom template to create a resource group, use TemplateFile or TemplateUri parameters to supply the location and file name.Each template has different parameters for configurable properties. To specify values for the template parameters, use a JSON-formatted parameter file (TemplateParameterFile parameter) or a hash table of parameter names and values (TemplateParameterObject parameter). Or, use the template parameters that are added to the command dynamically as soon as you specify a template. To use the dynamic parameters, just type them in the command, or type a minus sign to indicate a parameter name (-) and then press the TAB key repeatedly to cycle through the available parameters. If you miss a required parameter, the cmdlet prompts you for the value. Template parameter values that are typed at the command line take precedence over values in a template parameter object or file. + + + + New-AzureResourceGroupDeployment + + Name + + Specifies the name of the deployment project for the resource group. Use -Name or its alias -DeploymentName. This parameter is optional. The default value is the template name without the .json file name extension. + + String + + + ResourceGroupName + + Specifies the name of the resource group to which this deployment is added. This parameter is required. If the resource group does not exist, the command fails. + + String + + + TemplateVersion + + Specifies a particular version of the gallery or custom template. Enter the version number, such as "2014-04-01-preview". This parameter is optional. If you specify this parameter, New-AzureResourceGroupDeployment verifies that the specified template has the matching version and fails if it does not. + + String + + + + New-AzureResourceGroupDeployment + + Name + + Specifies the name of the deployment project for the resource group. Use -Name or its alias -DeploymentName. This parameter is optional. The default value is the template name without the .json file name extension. + + String + + + ResourceGroupName + + Specifies the name of the resource group to which this deployment is added. This parameter is required. If the resource group does not exist, the command fails. + + String + + + TemplateParameterObject + + Specifies a hash table of template parameter names and values. This parameter is optional. For help with hash tables in Windows PowerShell, type: Get-Help about_Hash_Tables.If a template has parameters, you must specify parameter values, but you can use this parameter or the TemplateParameterObject parameter. Also, the template parameters are added to the command dynamically when you specify a template. To use the dynamic parameters, just type them in the command, or type a minus sign to indicate a parameter name (-) and then press the TAB key repeatedly to cycle through the available parameters. If you miss a required parameter, the cmdlet prompts you for the value. + + Hashtable + + + GalleryTemplateIdentity + + Specifies the identity of a template in the Azure gallery. To find gallery templates, use the Get-AzureResourceGroupGalleryTemplate cmdlet. The value of the Identity property of each gallery item is displayed by default. + + String + + + TemplateVersion + + Specifies a particular version of the gallery or custom template. Enter the version number, such as "2014-04-01-preview". This parameter is optional. If you specify this parameter, New-AzureResourceGroupDeployment verifies that the specified template has the matching version and fails if it does not. + + String + + + + New-AzureResourceGroupDeployment + + Name + + Specifies the name of the deployment project for the resource group. Use -Name or its alias -DeploymentName. This parameter is optional. The default value is the template name without the .json file name extension. + + String + + + ResourceGroupName + + Specifies the name of the resource group to which this deployment is added. This parameter is required. If the resource group does not exist, the command fails. + + String + + + TemplateParameterObject + + Specifies a hash table of template parameter names and values. This parameter is optional. For help with hash tables in Windows PowerShell, type: Get-Help about_Hash_Tables.If a template has parameters, you must specify parameter values, but you can use this parameter or the TemplateParameterObject parameter. Also, the template parameters are added to the command dynamically when you specify a template. To use the dynamic parameters, just type them in the command, or type a minus sign to indicate a parameter name (-) and then press the TAB key repeatedly to cycle through the available parameters. If you miss a required parameter, the cmdlet prompts you for the value. + + Hashtable + + + TemplateFile + + Specifies the path and file name of a JSON template file on disk. This can be a custom template or a gallery template that is saved to disk as a JSON file, such as by using the Save-AzureResourceGroupGalleryTemplate cmdlet.To use this parameter, the subscription must include a storage account where the cmdlet can save the template. By default, this cmdlet uses the current storage account in the subscription, but you can use the StorageAccountName parameter to specify an alternate storage account. If you do not specify a storage account and the subscription does not have a storage account that is designated as "current," the command fails.To create a storage account, use the Switch-AzureMode cmdlet to switch to the Azure module, and then use the New-AzureStorageAccount cmdlet. To make the a storage account the "current storage account" for the subscription, use the CurrentStorageAccountName parameter of the Set-AzureSubscription cmdlet. + + String + + + StorageAccountName + + Specifies the name of a storage account in the subscription. New-AzureResourceGroupDeployment saves the contents of template files in the storage account. This parameter is optional, but a storage account is required when you use the TemplateFile parameter.The default value is the current storage account in the subscription. If you do not specify a storage account and the subscription does not have a current storage account, the command fails.To create a storage account, use the Switch-AzureMode cmdlet to switch to the Azure module, and then use the New-AzureStorageAccount cmdlet. To make the a storage account the "current storage account" for the subscription, use the CurrentStorageAccountName parameter of the Set-AzureSubscription cmdlet. + + String + + + TemplateVersion + + Specifies a particular version of the gallery or custom template. Enter the version number, such as "2014-04-01-preview". This parameter is optional. If you specify this parameter, New-AzureResourceGroupDeployment verifies that the specified template has the matching version and fails if it does not. + + String + + + + New-AzureResourceGroupDeployment + + Name + + Specifies the name of the deployment project for the resource group. Use -Name or its alias -DeploymentName. This parameter is optional. The default value is the template name without the .json file name extension. + + String + + + ResourceGroupName + + Specifies the name of the resource group to which this deployment is added. This parameter is required. If the resource group does not exist, the command fails. + + String + + + TemplateParameterObject + + Specifies a hash table of template parameter names and values. This parameter is optional. For help with hash tables in Windows PowerShell, type: Get-Help about_Hash_Tables.If a template has parameters, you must specify parameter values, but you can use this parameter or the TemplateParameterObject parameter. Also, the template parameters are added to the command dynamically when you specify a template. To use the dynamic parameters, just type them in the command, or type a minus sign to indicate a parameter name (-) and then press the TAB key repeatedly to cycle through the available parameters. If you miss a required parameter, the cmdlet prompts you for the value. + + Hashtable + + + TemplateUri + + Specifies the URI of a JSON template file. This file can be a custom template or a gallery template that is saved as a JSON file, such as by using the Save-AzureResourceGroupGalleryTemplate cmdlet. + + String + + + TemplateVersion + + Specifies a particular version of the gallery or custom template. Enter the version number, such as "2014-04-01-preview". This parameter is optional. If you specify this parameter, New-AzureResourceGroupDeployment verifies that the specified template has the matching version and fails if it does not. + + String + + + + New-AzureResourceGroupDeployment + + Name + + Specifies the name of the deployment project for the resource group. Use -Name or its alias -DeploymentName. This parameter is optional. The default value is the template name without the .json file name extension. + + String + + + ResourceGroupName + + Specifies the name of the resource group to which this deployment is added. This parameter is required. If the resource group does not exist, the command fails. + + String + + + TemplateParameterFile + + Specifies the path and name of a JSON file with the names and values of the template parameters. This parameter is optional.If a template has parameters, you must specify parameter values, but you can use this parameter or the TemplateParameterObject parameter. Also, the template parameters are added to the command dynamically when you specify a template. To use the dynamic parameters, just type them in the command, or type a minus sign to indicate a parameter name (-) and then press the TAB key repeatedly to cycle through the available parameters. If you miss a required parameter, the cmdlet prompts you for the value. + + String + + + TemplateFile + + Specifies the path and file name of a JSON template file on disk. This can be a custom template or a gallery template that is saved to disk as a JSON file, such as by using the Save-AzureResourceGroupGalleryTemplate cmdlet.To use this parameter, the subscription must include a storage account where the cmdlet can save the template. By default, this cmdlet uses the current storage account in the subscription, but you can use the StorageAccountName parameter to specify an alternate storage account. If you do not specify a storage account and the subscription does not have a storage account that is designated as "current," the command fails.To create a storage account, use the Switch-AzureMode cmdlet to switch to the Azure module, and then use the New-AzureStorageAccount cmdlet. To make the a storage account the "current storage account" for the subscription, use the CurrentStorageAccountName parameter of the Set-AzureSubscription cmdlet. + + String + + + StorageAccountName + + Specifies the name of a storage account in the subscription. New-AzureResourceGroupDeployment saves the contents of template files in the storage account. This parameter is optional, but a storage account is required when you use the TemplateFile parameter.The default value is the current storage account in the subscription. If you do not specify a storage account and the subscription does not have a current storage account, the command fails.To create a storage account, use the Switch-AzureMode cmdlet to switch to the Azure module, and then use the New-AzureStorageAccount cmdlet. To make the a storage account the "current storage account" for the subscription, use the CurrentStorageAccountName parameter of the Set-AzureSubscription cmdlet. + + String + + + TemplateVersion + + Specifies a particular version of the gallery or custom template. Enter the version number, such as "2014-04-01-preview". This parameter is optional. If you specify this parameter, New-AzureResourceGroupDeployment verifies that the specified template has the matching version and fails if it does not. + + String + + + + New-AzureResourceGroupDeployment + + Name + + Specifies the name of the deployment project for the resource group. Use -Name or its alias -DeploymentName. This parameter is optional. The default value is the template name without the .json file name extension. + + String + + + ResourceGroupName + + Specifies the name of the resource group to which this deployment is added. This parameter is required. If the resource group does not exist, the command fails. + + String + + + TemplateParameterFile + + Specifies the path and name of a JSON file with the names and values of the template parameters. This parameter is optional.If a template has parameters, you must specify parameter values, but you can use this parameter or the TemplateParameterObject parameter. Also, the template parameters are added to the command dynamically when you specify a template. To use the dynamic parameters, just type them in the command, or type a minus sign to indicate a parameter name (-) and then press the TAB key repeatedly to cycle through the available parameters. If you miss a required parameter, the cmdlet prompts you for the value. + + String + + + GalleryTemplateIdentity + + Specifies the identity of a template in the Azure gallery. To find gallery templates, use the Get-AzureResourceGroupGalleryTemplate cmdlet. The value of the Identity property of each gallery item is displayed by default. + + String + + + TemplateVersion + + Specifies a particular version of the gallery or custom template. Enter the version number, such as "2014-04-01-preview". This parameter is optional. If you specify this parameter, New-AzureResourceGroupDeployment verifies that the specified template has the matching version and fails if it does not. + + String + + + + New-AzureResourceGroupDeployment + + Name + + Specifies the name of the deployment project for the resource group. Use -Name or its alias -DeploymentName. This parameter is optional. The default value is the template name without the .json file name extension. + + String + + + ResourceGroupName + + Specifies the name of the resource group to which this deployment is added. This parameter is required. If the resource group does not exist, the command fails. + + String + + + TemplateParameterFile + + Specifies the path and name of a JSON file with the names and values of the template parameters. This parameter is optional.If a template has parameters, you must specify parameter values, but you can use this parameter or the TemplateParameterObject parameter. Also, the template parameters are added to the command dynamically when you specify a template. To use the dynamic parameters, just type them in the command, or type a minus sign to indicate a parameter name (-) and then press the TAB key repeatedly to cycle through the available parameters. If you miss a required parameter, the cmdlet prompts you for the value. + + String + + + TemplateUri + + Specifies the URI of a JSON template file. This file can be a custom template or a gallery template that is saved as a JSON file, such as by using the Save-AzureResourceGroupGalleryTemplate cmdlet. + + String + + + TemplateVersion + + Specifies a particular version of the gallery or custom template. Enter the version number, such as "2014-04-01-preview". This parameter is optional. If you specify this parameter, New-AzureResourceGroupDeployment verifies that the specified template has the matching version and fails if it does not. + + String + + + + New-AzureResourceGroupDeployment + + Name + + Specifies the name of the deployment project for the resource group. Use -Name or its alias -DeploymentName. This parameter is optional. The default value is the template name without the .json file name extension. + + String + + + ResourceGroupName + + Specifies the name of the resource group to which this deployment is added. This parameter is required. If the resource group does not exist, the command fails. + + String + + + GalleryTemplateIdentity + + Specifies the identity of a template in the Azure gallery. To find gallery templates, use the Get-AzureResourceGroupGalleryTemplate cmdlet. The value of the Identity property of each gallery item is displayed by default. + + String + + + TemplateVersion + + Specifies a particular version of the gallery or custom template. Enter the version number, such as "2014-04-01-preview". This parameter is optional. If you specify this parameter, New-AzureResourceGroupDeployment verifies that the specified template has the matching version and fails if it does not. + + String + + + + New-AzureResourceGroupDeployment + + Name + + Specifies the name of the deployment project for the resource group. Use -Name or its alias -DeploymentName. This parameter is optional. The default value is the template name without the .json file name extension. + + String + + + ResourceGroupName + + Specifies the name of the resource group to which this deployment is added. This parameter is required. If the resource group does not exist, the command fails. + + String + + + TemplateFile + + Specifies the path and file name of a JSON template file on disk. This can be a custom template or a gallery template that is saved to disk as a JSON file, such as by using the Save-AzureResourceGroupGalleryTemplate cmdlet.To use this parameter, the subscription must include a storage account where the cmdlet can save the template. By default, this cmdlet uses the current storage account in the subscription, but you can use the StorageAccountName parameter to specify an alternate storage account. If you do not specify a storage account and the subscription does not have a storage account that is designated as "current," the command fails.To create a storage account, use the Switch-AzureMode cmdlet to switch to the Azure module, and then use the New-AzureStorageAccount cmdlet. To make the a storage account the "current storage account" for the subscription, use the CurrentStorageAccountName parameter of the Set-AzureSubscription cmdlet. + + String + + + StorageAccountName + + Specifies the name of a storage account in the subscription. New-AzureResourceGroupDeployment saves the contents of template files in the storage account. This parameter is optional, but a storage account is required when you use the TemplateFile parameter.The default value is the current storage account in the subscription. If you do not specify a storage account and the subscription does not have a current storage account, the command fails.To create a storage account, use the Switch-AzureMode cmdlet to switch to the Azure module, and then use the New-AzureStorageAccount cmdlet. To make the a storage account the "current storage account" for the subscription, use the CurrentStorageAccountName parameter of the Set-AzureSubscription cmdlet. + + String + + + TemplateVersion + + Specifies a particular version of the gallery or custom template. Enter the version number, such as "2014-04-01-preview". This parameter is optional. If you specify this parameter, New-AzureResourceGroupDeployment verifies that the specified template has the matching version and fails if it does not. + + String + + + + New-AzureResourceGroupDeployment + + Name + + Specifies the name of the deployment project for the resource group. Use -Name or its alias -DeploymentName. This parameter is optional. The default value is the template name without the .json file name extension. + + String + + + ResourceGroupName + + Specifies the name of the resource group to which this deployment is added. This parameter is required. If the resource group does not exist, the command fails. + + String + + + TemplateUri + + Specifies the URI of a JSON template file. This file can be a custom template or a gallery template that is saved as a JSON file, such as by using the Save-AzureResourceGroupGalleryTemplate cmdlet. + + String + + + TemplateVersion + + Specifies a particular version of the gallery or custom template. Enter the version number, such as "2014-04-01-preview". This parameter is optional. If you specify this parameter, New-AzureResourceGroupDeployment verifies that the specified template has the matching version and fails if it does not. + + String + + + + + + Name + + Specifies the name of the deployment project for the resource group. Use -Name or its alias -DeploymentName. This parameter is optional. The default value is the template name without the .json file name extension. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of the resource group to which this deployment is added. This parameter is required. If the resource group does not exist, the command fails. + + String + + String + + + + + + TemplateVersion + + Specifies a particular version of the gallery or custom template. Enter the version number, such as "2014-04-01-preview". This parameter is optional. If you specify this parameter, New-AzureResourceGroupDeployment verifies that the specified template has the matching version and fails if it does not. + + String + + String + + + + + + TemplateParameterObject + + Specifies a hash table of template parameter names and values. This parameter is optional. For help with hash tables in Windows PowerShell, type: Get-Help about_Hash_Tables.If a template has parameters, you must specify parameter values, but you can use this parameter or the TemplateParameterObject parameter. Also, the template parameters are added to the command dynamically when you specify a template. To use the dynamic parameters, just type them in the command, or type a minus sign to indicate a parameter name (-) and then press the TAB key repeatedly to cycle through the available parameters. If you miss a required parameter, the cmdlet prompts you for the value. + + Hashtable + + Hashtable + + + + + + GalleryTemplateIdentity + + Specifies the identity of a template in the Azure gallery. To find gallery templates, use the Get-AzureResourceGroupGalleryTemplate cmdlet. The value of the Identity property of each gallery item is displayed by default. + + String + + String + + + + + + TemplateFile + + Specifies the path and file name of a JSON template file on disk. This can be a custom template or a gallery template that is saved to disk as a JSON file, such as by using the Save-AzureResourceGroupGalleryTemplate cmdlet.To use this parameter, the subscription must include a storage account where the cmdlet can save the template. By default, this cmdlet uses the current storage account in the subscription, but you can use the StorageAccountName parameter to specify an alternate storage account. If you do not specify a storage account and the subscription does not have a storage account that is designated as "current," the command fails.To create a storage account, use the Switch-AzureMode cmdlet to switch to the Azure module, and then use the New-AzureStorageAccount cmdlet. To make the a storage account the "current storage account" for the subscription, use the CurrentStorageAccountName parameter of the Set-AzureSubscription cmdlet. + + String + + String + + + + + + StorageAccountName + + Specifies the name of a storage account in the subscription. New-AzureResourceGroupDeployment saves the contents of template files in the storage account. This parameter is optional, but a storage account is required when you use the TemplateFile parameter.The default value is the current storage account in the subscription. If you do not specify a storage account and the subscription does not have a current storage account, the command fails.To create a storage account, use the Switch-AzureMode cmdlet to switch to the Azure module, and then use the New-AzureStorageAccount cmdlet. To make the a storage account the "current storage account" for the subscription, use the CurrentStorageAccountName parameter of the Set-AzureSubscription cmdlet. + + String + + String + + + + + + TemplateUri + + Specifies the URI of a JSON template file. This file can be a custom template or a gallery template that is saved as a JSON file, such as by using the Save-AzureResourceGroupGalleryTemplate cmdlet. + + String + + String + + + + + + TemplateParameterFile + + Specifies the path and name of a JSON file with the names and values of the template parameters. This parameter is optional.If a template has parameters, you must specify parameter values, but you can use this parameter or the TemplateParameterObject parameter. Also, the template parameters are added to the command dynamically when you specify a template. To use the dynamic parameters, just type them in the command, or type a minus sign to indicate a parameter name (-) and then press the TAB key repeatedly to cycle through the available parameters. If you miss a required parameter, the cmdlet prompts you for the value. + + String + + String + + + + + + + + + None + + + + + + + + + + + + Microsoft.Azure.Commands.ResourceManager.Models.PSResourceGroupDeployment + + + + + + + + + + + + + + + -------------------------- Create a deployment with a gallery template -------------------------- + + + + PS C:\>New-AzureResourceGroupDeployment -New-AzureResourceGroupDeployment -ResourceGroupName ContosoRG01 -GalleryTemplateIdentity Microsoft.WebSite.0.1.0-preview1 -Name WebDeploy01 -siteName ContosoWeb -hostingPlanName ContosoHosting -siteMode Limited -computeMode Dedicated -siteLocation "North Europe" -subscriptionID "9b14a38b-4b93-4554-8bb0-3cefb47abcde" -resourceGroup ContosoRG01 +DeploymentName : WebDeploy01 +ResourceGroupName : ContosoRG01 +ProvisioningState : Succeeded +Timestamp : 3/26/2014 1:56:55 AM +Mode : Incremental +TemplateLink : + Uri : https://gallerystoreprodch.blob.core.windows.net/prod-microsoft- + ContentVersion : 1.0.0.0 + + +Parameters : + Name Type Value + =============== ========================= ========== + siteName String ContosoWeb + hostingPlanName String ContosoHosting + siteMode String Limited + computeMode String Dedicated + siteLocation String North Europe + subscriptionId String 9b14a38b-4b93-4554-8bb0-3cefb47abcde + resourceGroup String ContosoRG01 + + This example shows how to create a resource group deployment from a gallery template and use the parameters that are added to the command dynamically to provide the template parameter values. + + + + This command uses the New-AzureResourceGroupDeployment cmdlet to create a new deployment in the ContosoRG01 resource group. It uses the GalleryTemplateIdentity parameter to specify the gallery template. In this scenario, you don't need to save the gallery template to disk.Instead of using a template parameter file or a template parameter object, we'll just use the parameters that are added to the command dynamically when you specify the template.After typing the Name parameter and its value, type a minus sign (to indicate a parameter name) and then press the TAB key to trigger tab-completion. The cmdlet adds a parameter, such as siteMode. Type the parameter value, type a minus sign, press TAB, and it adds another parameter. To cycle through the parameter names, press TAB repeatedly. If you miss a mandatory template parameter, the cmdlet prompts you for the value. + + + + + -------------------------- Example 2: Use a custom template and parameter file -------------------------- + + + + PS C:\>New-AzureResourceGroupDeployment -ResourceGroupName ContosoEngineering -TemplateFile D:\Azure\Templates\EngineeringSite.json -TemplateParameterFile D:\Azure\Templates\EngSiteParms.json -TemplateVersion "2.1" -StorageAccountName contosostorage + + This command creates a new deployment by using a custom template and a template file on disk. The command uses the TemplateFile parameter to specify the template and the TemplateParameterFile to specify a file of parameters and parameter values. It uses the TemplateVersion parameter to specify a particular version of the template. Because the template files are stored in a storage account of the subscription, the cmdlet uses the StorageAccountName to specify the storage account to use. + + + + + + + + + -------------------------- Example 3: Use a saved gallery template and parameter object -------------------------- + + + + PS C:\> The first command uses the Save-AzureResourceGroupGalleryTemplate cmdlet to save the WordPress gallery template as a JSON file on disk. +PS C:\>Save-AzureResourceGroupGalleryTemplate -Identity WordPress.WordPress.0.1.0-preview1 -Path D:\Azure\Templates +Path: +D:\Azure\Templates\WordPress.WordPress.0.1.0-preview1.json + +The second command saves a hash table of the template parameter values in the $params variable. +PS C:\> $params = @{siteName="ContosoBlog";hostingPlanName="ContosoHosting";siteMode="Limited";computeMode="Shared";siteLocation="North Europe";sku="Shared";workerSize="0";databaseName=contosodb1;databaseLocation="South Central US";databaseSku="Free";subscriptionId="7363c612-d678-4171-a715-585c237abcde";resourceGroup="ContosoRG01";dbSubscriptionId="7363c612-d678-4171-a715-585c237abcde";dbResourceGroup="ContosoRG01"} + + +The third command uses New-AzureResourceGroupDeployment cmdlet to add the new deployment to the ContosoRG01 resource group.The command uses the TemplateFile parameter to specify the saved gallery template file and the TemplateParameterObject to specify the hash table of parameters and parameter values in the $params variable. Because the template files are stored in a storage account of the subscription, the cmdlet uses the StorageAccountName to specify the storage account to use. +PS C:\>New-AzureResourceGroupDeployment -ResourceGroupName ContosoRG01 -TemplateFile D:\Azure\Templates\WordPress.WordPress.0.1.0-preview1.json -TemplateParameterObject $params -StorageAccountName contosostorage + + This command creates a new deployment by using a gallery template that is saved to disk as a JSON file and a hash table of parameter values. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=393045 + + + + + + + New-AzureRoleAssignment + + Create a role assignment to some principals at a given scope. + + + + + New + AzureRoleAssignment + + + + + Create a role assignment to some principals at a given scope. + + + + New-AzureRoleAssignment + + ObjectId + + Object id of the user, group or service principal. + + Guid + + + Scope + + Scope of the role assignment. In the format of relative URI. If not specified, will assign the role at subscription level. If specified, it can either start with "/subscriptions/{id}" or the part after that. If it's latter, the current subscription id will be used. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + + New-AzureRoleAssignment + + ObjectId + + Object id of the user, group or service principal. + + Guid + + + ResourceGroupName + + Resource group to assign the role to. + + String + + + ResourceName + + Name of the resource to assign the role to. + + String + + + ResourceType + + Type of the resource to assign the role to. + + String + + + ParentResource + + Parent resource of the resource to assign the role to, if there is any. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + + New-AzureRoleAssignment + + ObjectId + + Object id of the user, group or service principal. + + Guid + + + ResourceGroupName + + Resource group to assign the role to. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + + New-AzureRoleAssignment + + ObjectId + + Object id of the user, group or service principal. + + Guid + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + + New-AzureRoleAssignment + + Mail + + Mail of the user or group + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + + New-AzureRoleAssignment + + Mail + + Mail of the user or group + + String + + + ResourceGroupName + + Resource group to assign the role to. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + + New-AzureRoleAssignment + + Mail + + Mail of the user or group + + String + + + ResourceGroupName + + Resource group to assign the role to. + + String + + + ResourceName + + Name of the resource to assign the role to. + + String + + + ResourceType + + Type of the resource to assign the role to. + + String + + + ParentResource + + Parent resource of the resource to assign the role to, if there is any. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + + New-AzureRoleAssignment + + Mail + + Mail of the user or group + + String + + + Scope + + Scope of the role assignment. In the format of relative URI. If not specified, will assign the role at subscription level. If specified, it can either start with "/subscriptions/{id}" or the part after that. If it's latter, the current subscription id will be used. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + + New-AzureRoleAssignment + + UserPrincipalName + + UPN of the user. + + String + + + ResourceGroupName + + Resource group to assign the role to. + + String + + + ResourceName + + Name of the resource to assign the role to. + + String + + + ResourceType + + Type of the resource to assign the role to. + + String + + + ParentResource + + Parent resource of the resource to assign the role to, if there is any. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + + New-AzureRoleAssignment + + UserPrincipalName + + UPN of the user. + + String + + + ResourceGroupName + + Resource group to assign the role to. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + + New-AzureRoleAssignment + + UserPrincipalName + + UPN of the user. + + String + + + Scope + + Scope of the role assignment. In the format of relative URI. If not specified, will assign the role at subscription level. If specified, it can either start with "/subscriptions/{id}" or the part after that. If it's latter, the current subscription id will be used. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + + New-AzureRoleAssignment + + UserPrincipalName + + UPN of the user. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + + New-AzureRoleAssignment + + ServicePrincipalName + + SPN of the service principal. + + String + + + ResourceGroupName + + Resource group to assign the role to. + + String + + + ResourceName + + Name of the resource to assign the role to. + + String + + + ResourceType + + Type of the resource to assign the role to. + + String + + + ParentResource + + Parent resource of the resource to assign the role to, if there is any. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + + New-AzureRoleAssignment + + ServicePrincipalName + + SPN of the service principal. + + String + + + ResourceGroupName + + Resource group to assign the role to. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + + New-AzureRoleAssignment + + ServicePrincipalName + + SPN of the service principal. + + String + + + Scope + + Scope of the role assignment. In the format of relative URI. If not specified, will assign the role at subscription level. If specified, it can either start with "/subscriptions/{id}" or the part after that. If it's latter, the current subscription id will be used. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + + New-AzureRoleAssignment + + ServicePrincipalName + + SPN of the service principal. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + + + + ObjectId + + Object id of the user, group or service principal. + + Guid + + Guid + + + + + + Scope + + Scope of the role assignment. In the format of relative URI. If not specified, will assign the role at subscription level. If specified, it can either start with "/subscriptions/{id}" or the part after that. If it's latter, the current subscription id will be used. + + String + + String + + + + + + RoleDefinitionName + + Role to assign the principals with. + + String + + String + + + + + + ResourceGroupName + + Resource group to assign the role to. + + String + + String + + + + + + ResourceName + + Name of the resource to assign the role to. + + String + + String + + + + + + ResourceType + + Type of the resource to assign the role to. + + String + + String + + + + + + ParentResource + + Parent resource of the resource to assign the role to, if there is any. + + String + + String + + + + + + Mail + + Mail of the user or group + + String + + String + + + + + + UserPrincipalName + + UPN of the user. + + String + + String + + + + + + ServicePrincipalName + + SPN of the service principal. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Create new role assignment using UPN -------------------------- + + + + PS C:\> New-AzureRoleAssignment -ResourceGroupName rg1 -UPN foo@domain.com -RoleDefinitionName Reader + + add role assignment to a principal for a resource group using the separate parameters + + + + + + + + + -------------------------- Create new role assignment using Service Principal Name -------------------------- + + + + PS C:\> New-AzureRoleAssignment -ServicePrincipalName 36f81fc3-b00f-48cd-8218-3879f51ff39f -RoleDefinitionName Contributor + + add role assignment to a service principal for a subscription. + + + + + + + + + -------------------------- Create new role assignment using explict Scope -------------------------- + + + + PS C:\> New-AzureRoleAssignment -Mail allen.young@live.cn -RoleDefinitionName Owner -Scope "/resourcegroups/rg1/providers/Microsoft.Web/sites/site1" + + add role assignment to a principal for a resource using the generic parameter. Since the scope doens't start with "/subscriptions/{id}", the current subscription id will be used + + + + + + + + + + + Get-AzureRoleAssignment + + + + Remove-AzureRoleAssignment + + + + Get-AzureRoleDefinition + + + + + + + + Remove-AzureResource + + Deletes a resource + + + + + Remove + AzureResource + + + + + The Remove-AzureResource cmdlet deletes a resource from your subscription. It does not delete the resource group of the resource. By default, Remove-AzureResource prompts you for confirmation. To suppress the prompt, use the Force parameter. + + + + Remove-AzureResource + + ApiVersion + + Specifies the API version that is supported by the resource provider. This parameter is required. + + String + + + Force + + Suppresses the confirmation prompt. By default, Remove-AzureResource prompts for confirmation before deleting a resource. + + SwitchParameter + + + PassThru + + Returns $True when the remove operation succeeds and $False otherwise. By default, this cmdlet does not return any output. + + SwitchParameter + + + Name + + Specifies the name of the resource. This parameter is required. + + String + + + ResourceGroupName + + Specifies the name of resource group of the resource. This parameter is required. + + String + + + ResourceType + + Specifies the resource type. Enter a provider qualified name, such as "Microsoft.Web/sites". This parameter is required. Wildcards are not permitted. + + String + + + ParentResource + + Specifies the names of the logical parent of a resource. This parameter is optional. Enter the fully qualified name of the parent resource, such as "Microsoft.Sql/servers/ContosoSQLSvr". + + String + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + + + ApiVersion + + Specifies the API version that is supported by the resource provider. This parameter is required. + + String + + String + + + + + + Force + + Suppresses the confirmation prompt. By default, Remove-AzureResource prompts for confirmation before deleting a resource. + + SwitchParameter + + SwitchParameter + + + + + + PassThru + + Returns $True when the remove operation succeeds and $False otherwise. By default, this cmdlet does not return any output. + + SwitchParameter + + SwitchParameter + + + + + + Name + + Specifies the name of the resource. This parameter is required. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of resource group of the resource. This parameter is required. + + String + + String + + + + + + ResourceType + + Specifies the resource type. Enter a provider qualified name, such as "Microsoft.Web/sites". This parameter is required. Wildcards are not permitted. + + String + + String + + + + + + ParentResource + + Specifies the names of the logical parent of a resource. This parameter is optional. Enter the fully qualified name of the parent resource, such as "Microsoft.Sql/servers/ContosoSQLSvr". + + String + + String + + + + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + SwitchParameter + + + false + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + SwitchParameter + + + false + + + + + + None + + + + + + + + + + + + None or Boolean + + + + + + + + + + + + + + + -------------------------- Example 1: Remove a resource -------------------------- + + + + PS C:\>Remove-AzureResource -Name ContosoWeb -ResourceGroupName ContosoRG01 -ResourceType Microsoft.web/sites -ApiVersion 2014-04-01 ConfirmAre you sure you want to remove resource ' ContosoWeb'[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y + + This command removes the ContosoWeb web site from the ContosoRG01 resource group. + + + + + + + + + -------------------------- Example 2: Pipe a resource to RemoveAzureResource -------------------------- + + + + PS C:\>Get-AzureResource -Name contosodb01 -ResourceGroupName ContosoRG01 -ResourceType "Microsoft.Sql/servers/databases" -ParentResource "Microsoft.Sql/servers/contososvr01" -ApiVersion 2.0 | Remove-AzureResource -Passthru ConfirmAre you sure you want to remove resource 'contosodb01'[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y +True + + This command uses the Get-AzureResource cmdlet to get the ContosoDB01 database. The command pipes the database to the Remove-AzureResource cmdlet to remove it. The command uses the Passthru parameter, which causes the cmdlet to return a Boolean value that represents the success or failure of the operation. In this case, it returns True. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=393460 + + + + + + + Remove-AzureResourceGroup + + Deletes a resource group. + + + + + Remove + AzureResourceGroup + + + + + The Remove-AzureResourceGroup cmdlet deletes a resource group and its resources from your subscription. By default, Remove-AzureResourceGroup prompts you for confirmation. To suppress the prompt, use the Force parameter.To delete a resource, but leave the resource group, use the Remove-AzureResource cmdlet. + + + + Remove-AzureResourceGroup + + Name + + Specifies the names of resource groups to delete. This parameter is required. Wildcards are not permitted.Use -Name or its alias, -ResourceGroupName. + + String + + + Force + + Suppresses the confirmation prompt. By default, Remove-AzureResource prompts you to confirm before deleting a resource group. + + SwitchParameter + + + PassThru + + Returns $True if the remove operation was successful and $False if it failed. By default, this cmdlet does not return any output. + + SwitchParameter + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + + + Name + + Specifies the names of resource groups to delete. This parameter is required. Wildcards are not permitted.Use -Name or its alias, -ResourceGroupName. + + String + + String + + + + + + Force + + Suppresses the confirmation prompt. By default, Remove-AzureResource prompts you to confirm before deleting a resource group. + + SwitchParameter + + SwitchParameter + + + + + + PassThru + + Returns $True if the remove operation was successful and $False if it failed. By default, this cmdlet does not return any output. + + SwitchParameter + + SwitchParameter + + + + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + SwitchParameter + + + false + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + SwitchParameter + + + false + + + + + + None + + + + + + + + + + + + None or System.Boolean + + + + + + + + + + + + + + + -------------------------- Example 1: Remove a resource group -------------------------- + + + + PS C:\>Remove-AzureResourceGroup -Name -ContosoRG01 +Confirm + +Are you sure you want to remove resource group 'ContosoRG01' + +[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y + + This command removes the ContosoRG01 resource group from the subscription. The cmdlet prompts for confirmation and does not return any output by default. + + + + + + + + + -------------------------- Example 2: Use the Force parameter -------------------------- + + + + PS C:\>Get-AzureResourceGroup -Name ContosoRG01 | Remove-AzureResourceGroup -Verbose -Force +VERBOSE: Performing the operation "Removing resource group ..." on target "ContosoRG01". + + This command deletes the ContosoRG01 resource group from the subscription. It uses the Get-AzureResourceGroup cmdlet to get the resource group and pipes the resource group (by name) to the Remove-AzureResourceGroup cmdlet. The Remove-AzureResourceGroup command uses the Verbose common parameter to get status information about the operation and the Force parameter to suppress the confirmation prompt. + + + + + + + + + -------------------------- Example 3: Remove all resource groups -------------------------- + + + + PS C:\>Get-AzureResourceGroup | Remove-AzureResourceGroup -PassThru + +Confirm + +Are you sure you want to remove resource group 'ContosoRG01' + +[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y + +True + + + +Confirm + +Are you sure you want to remove resource group 'ContosoRG02' + +[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y + +True + + This command deletes all resource groups in the subscription. To get all resource groups, it uses a Get-AzureResourceGroup command with no parameters. Then, it pipes the resource groups to the Remove-AzureResourceGroup cmdlet. The Remove-AzureResourceGroup command uses the Passthru parameter. As a result, the cmdlet returns a value of $True for each operation that succeeds. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=393049 + + + + + + + Remove-AzureRoleAssignment + + Removes a role assignment. + + + + + Remove + AzureRoleAssignment + + + + + Removes a role assignments. + + + + Remove-AzureRoleAssignment + + ObjectId + + Object id of the user, group or service principal. + + Guid + + + ResourceGroupName + + Resource group to assign the role to. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + Force + + + + SwitchParameter + + + PassThru + + + + SwitchParameter + + + + Remove-AzureRoleAssignment + + ObjectId + + Object id of the user, group or service principal. + + Guid + + + ResourceGroupName + + Resource group to assign the role to. + + String + + + ResourceName + + Name of the resource to assign the role to. + + String + + + ResourceType + + Type of the resource to assign the role to. + + String + + + ParentResource + + Parent resource of the resource to assign the role to, if there is any. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + Force + + + + SwitchParameter + + + PassThru + + + + SwitchParameter + + + + Remove-AzureRoleAssignment + + ObjectId + + Object id of the user, group or service principal. + + Guid + + + Scope + + Scope of the role assignment. In the format of relative URI. If not specified, will assign the role at subscription level. If specified, it can either start with "/subscriptions/{id}" or the part after that. If it's latter, the current subscription id will be used. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + Force + + + + SwitchParameter + + + PassThru + + + + SwitchParameter + + + + Remove-AzureRoleAssignment + + ObjectId + + Object id of the user, group or service principal. + + Guid + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + Force + + + + SwitchParameter + + + PassThru + + + + SwitchParameter + + + + Remove-AzureRoleAssignment + + Mail + + Mail of the user or group + + String + + + Scope + + Scope of the role assignment. In the format of relative URI. If not specified, will assign the role at subscription level. If specified, it can either start with "/subscriptions/{id}" or the part after that. If it's latter, the current subscription id will be used. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + Force + + + + SwitchParameter + + + PassThru + + + + SwitchParameter + + + + Remove-AzureRoleAssignment + + Mail + + Mail of the user or group + + String + + + ResourceGroupName + + Resource group to assign the role to. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + Force + + + + SwitchParameter + + + PassThru + + + + SwitchParameter + + + + Remove-AzureRoleAssignment + + Mail + + Mail of the user or group + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + Force + + + + SwitchParameter + + + PassThru + + + + SwitchParameter + + + + Remove-AzureRoleAssignment + + Mail + + Mail of the user or group + + String + + + ResourceGroupName + + Resource group to assign the role to. + + String + + + ResourceName + + Name of the resource to assign the role to. + + String + + + ResourceType + + Type of the resource to assign the role to. + + String + + + ParentResource + + Parent resource of the resource to assign the role to, if there is any. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + Force + + + + SwitchParameter + + + PassThru + + + + SwitchParameter + + + + Remove-AzureRoleAssignment + + UserPrincipalName + + UPN of the user. + + String + + + Scope + + Scope of the role assignment. In the format of relative URI. If not specified, will assign the role at subscription level. If specified, it can either start with "/subscriptions/{id}" or the part after that. If it's latter, the current subscription id will be used. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + Force + + + + SwitchParameter + + + PassThru + + + + SwitchParameter + + + + Remove-AzureRoleAssignment + + UserPrincipalName + + UPN of the user. + + String + + + ResourceGroupName + + Resource group to assign the role to. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + Force + + + + SwitchParameter + + + PassThru + + + + SwitchParameter + + + + Remove-AzureRoleAssignment + + UserPrincipalName + + UPN of the user. + + String + + + ResourceGroupName + + Resource group to assign the role to. + + String + + + ResourceName + + Name of the resource to assign the role to. + + String + + + ResourceType + + Type of the resource to assign the role to. + + String + + + ParentResource + + Parent resource of the resource to assign the role to, if there is any. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + Force + + + + SwitchParameter + + + PassThru + + + + SwitchParameter + + + + Remove-AzureRoleAssignment + + UserPrincipalName + + UPN of the user. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + Force + + + + SwitchParameter + + + PassThru + + + + SwitchParameter + + + + Remove-AzureRoleAssignment + + ServicePrincipalName + + SPN of the service principal. + + String + + + ResourceGroupName + + Resource group to assign the role to. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + Force + + + + SwitchParameter + + + PassThru + + + + SwitchParameter + + + + Remove-AzureRoleAssignment + + ServicePrincipalName + + SPN of the service principal. + + String + + + ResourceGroupName + + Resource group to assign the role to. + + String + + + ResourceName + + Name of the resource to assign the role to. + + String + + + ResourceType + + Type of the resource to assign the role to. + + String + + + ParentResource + + Parent resource of the resource to assign the role to, if there is any. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + Force + + + + SwitchParameter + + + PassThru + + + + SwitchParameter + + + + Remove-AzureRoleAssignment + + ServicePrincipalName + + SPN of the service principal. + + String + + + Scope + + Scope of the role assignment. In the format of relative URI. If not specified, will assign the role at subscription level. If specified, it can either start with "/subscriptions/{id}" or the part after that. If it's latter, the current subscription id will be used. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + Force + + + + SwitchParameter + + + PassThru + + + + SwitchParameter + + + + Remove-AzureRoleAssignment + + ServicePrincipalName + + SPN of the service principal. + + String + + + RoleDefinitionName + + Role to assign the principals with. + + String + + + Force + + + + SwitchParameter + + + PassThru + + + + SwitchParameter + + + + + + ObjectId + + Object id of the user, group or service principal. + + Guid + + Guid + + + + + + ResourceGroupName + + Resource group to assign the role to. + + String + + String + + + + + + RoleDefinitionName + + Role to assign the principals with. + + String + + String + + + + + + Force + + + + SwitchParameter + + SwitchParameter + + + + + + PassThru + + + + SwitchParameter + + SwitchParameter + + + + + + ResourceName + + Name of the resource to assign the role to. + + String + + String + + + + + + ResourceType + + Type of the resource to assign the role to. + + String + + String + + + + + + ParentResource + + Parent resource of the resource to assign the role to, if there is any. + + String + + String + + + + + + Scope + + Scope of the role assignment. In the format of relative URI. If not specified, will assign the role at subscription level. If specified, it can either start with "/subscriptions/{id}" or the part after that. If it's latter, the current subscription id will be used. + + String + + String + + + + + + Mail + + Mail of the user or group + + String + + String + + + + + + UserPrincipalName + + UPN of the user. + + String + + String + + + + + + ServicePrincipalName + + SPN of the service principal. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Removes role assignment using UPN, Role Definition and Resource Group -------------------------- + + + + PS C:\> Remove-AzureRoleAssignment -ResourceGroupName rg1 -UPN foo@domain.com -RoleDefinitionName Reader + + Removes a role assignment for principal in a resource group that have Reader role definition + + + + + + + + + + + New-AzureRoleAssignment + + + + Get-AzureRoleAssignment + + + + Get-AzureRoleDefinition + + + + + + + + Save-AzureResourceGroupGalleryTemplate + + Saves a gallery template to a JSON file + + + + + Save + AzureResourceGroupGalleryTemplate + + + + + The Save-AzureResourceGroupGalleryTemplate cmdlet saves a template from the Azure template gallery as a JSON file on disk and returns the path to the saved file. You can to use the template to create Azure resource groups and deploymentsA resource is a user-managed entity, such as a website, database server, or database. A resource group is a collection of resources that are deployed as a unit. You can create resources individually and add them to resource groups. However, typically, you create a resource group by using a template.A template is a JSON string that defines a resource group for a complex entity, such as a web hosting site or web portal. The template defines the resources that are typically needed for the entity, such as websites, databases, and storage accounts, and includes parameters for user-defined values, such as the names and properties of the resources. To get a resource group template, use the Get-AzureResourceGroupGalleryTemplate cmdlet to get a gallery template and then use the Save-AzureResourceGroupGalleryTemplate cmdlet to save the template as a JSON file. Or, you can create your own templates, either from scratch or by editing a gallery template. To verify the syntax of a template, use the Test-AzureResourceGroupTemplate cmdlet.To use a template to create a resource group, use the New-AzureResourceGroup or New-AzureResourceGroupDeployment cmdlets. Just identify the template and provide values for its parameters. + + + + Save-AzureResourceGroupGalleryTemplate + + Identity + + Specifies the identity of the gallery item. This parameter is required. The gallery item identity is also used as the name of the template file on disk with a .JSON file name extension. + + String + + + Path + + Specifies the path to the directory in which the template is saved. This parameter is optional. The default is the current directory. + + String + + + Force + + Suppresses the confirmation prompt. By default, if you specify a path and file name that already exists, Save-AzureResourceGroupGalleryTemplate prompts before overwriting the file. + + SwitchParameter + + + + + + Identity + + Specifies the identity of the gallery item. This parameter is required. The gallery item identity is also used as the name of the template file on disk with a .JSON file name extension. + + String + + String + + + + + + Path + + Specifies the path to the directory in which the template is saved. This parameter is optional. The default is the current directory. + + String + + String + + + + + + Force + + Suppresses the confirmation prompt. By default, if you specify a path and file name that already exists, Save-AzureResourceGroupGalleryTemplate prompts before overwriting the file. + + SwitchParameter + + SwitchParameter + + + + + + + + + None + + + + + + + + + + + + System.Management.Automation.PSCustomObject + + + + + + + + + + + + + + + -------------------------- Example 1: Save a template -------------------------- + + + + PS C:\>Save-AzureResourceGroupGalleryTemplate -Identity Microsoft.WebSite.0.1.0-preview1 +Path: + +C:\ Microsoft.WebSite.0.1.0-preview1.json + + This command saves the Microsoft.WebSite.0.1.0-preview1 template to the current directory as Microsoft.WebSite.0.1.0-preview1.json. + + + + + + + + + -------------------------- Example 2: Pipe a gallery item to SaveAzureResourceGroupGalleryTemplate -------------------------- + + + + PS C:\>Get-AzureResourceGroupGalleryTemplate -Identity Microsoft.WebSite.0.1.0-preview1 | Save-AzureResourceGroupGalleryTemplate -Path $home\Documents\MyTemplates +Path + +C:\Users\User01\Documents\MyTemplates\ Microsoft.WebSite.0.1.0-preview1.json + + This command pipes the Microsoft.WebSite.0.1.0-preview1 gallery item from the Get-AzureResourceGroupGalleryTemplate cmdlet to the Save-AzureResourceGroupGalleryTemplate cmdlet. The command uses the Path parameter to save the JSON template in an alternate directory. Because the command uses the Passthru parameter, the cmdlet returns True to indicate that the save operation succeeded. + + + + + + + + + -------------------------- Example 3: Save and use a gallery template -------------------------- + + + + PS C:\> The first command uses the Save-AzureResourceGalleryTemplate cmdlet to save a template to disk. The cmdlet returns the path to the JSON file. +PS C:\>Save-AzureResourceGroupGalleryTemplate -Identity TechInfoSystems.GalleryServerPro.0.1.0-preview1 -Path $home\Documents\MyTemplates +Path + +C:\Users\User01\Documents\MyTemplates\TechInfoSystems.GalleryServerPro.0.1.0-preview1.json + +The second command uses the New-AzureResourceGroup cmdlet to create a new resource group based on the template. To specify the saved template, the command uses the TemplateFile parameter, which takes a path to a JSON file on disk. To specify the template parameters, the command uses the TemplateParameterFile parameter, which takes a path to a JSON file of parameters and parameter values.The command returns the newly created resource group. +PS C:\>New-AzureResourceGroup -Name ContosoRG02 -Location 'South Central US' -DeploymentName DeployWeb1 –StorageAccountName contosostorage01 -TemplateFile $home\Documents\MyTemplates\TechInfoSystems.GalleryServerPro.0.1.0-preview1.json -TemplateParameterFile $home\Documents\MyTemplates\TechInfoParameters.json + + This example shows how to use a saved gallery template to create a new resource group. + + + + It's often useful to save a gallery template to disk before using it to create a resource group or a deployment. This gives you the opportunity to review the template and the resources that it creates and to determine that values that you will use for the parameters. But, you do not need to save a gallery template before using it to create a resource group. To use a gallery template without saving it, use the GalleryTemplateIdentity parameter of the New-AzureResourceGroup or New-AzureResourceGroupDeployment cmdlets. + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=393053 + + + + + + + Set-AzureResource + + Changes the properties of an Azure resource. + + + + + Set + AzureResource + + + + + The Set-AzureResource cmdlet changes the properties of an Azure resource. To use the cmdlet, use the Name, ResourceGroupName, ResourceGroupType, and ParentResource parameters to identify the resource, and the PropertyObject parameter to specify the new property names and values.If the command succeeds, it returns the resource with the new properties and values.An Azure resource is a user-managed entity, such as an Azure Website or Azure SQL Database. Some resources have properties, which are user-configured values, like sizes and operational modes. You can specify these values when you create the resource, such as by using the New-AzureResource, New-AzureResourceGroup, or New-AzureResourceGroupDeployment cmdlets. And, you can change the properties by using this cmdlet.To get the properties of a resource, use the Get-AzureResource cmdlet to get the resource. Then use the dot method to get the Properties property collection and a particular named property. For example, to get the siteMode property of an object, type (Get-AzureResource -Name MyWebSite -ResourceGroupName RG -ResourceType Microsoft.Web/sites -ApiVersion 2014-04-01).Properties.siteMode + + + + Set-AzureResource + + ApiVersion + + Specifies the API version that is supported by the resource provider. This parameter is required. + + String + + + PropertyObject + + Specifies the new property values. Enter a hash table of property names and values. The names and values are case-sensitive. + + Hashtable + + + Tag + + Replaces the tags for the resource with the specified new or predefined tags. To change any resource tag, you must replace the collection of tags for the resource.A "tag" is a name-value pair that you can apply to resources and resource groups. Use tags to categorize your resources, such as by department or cost center, or to track notes or comments about the resources. After you assign tags to resources, you can use the Tag parameters of Get-AzureResource and Get-AzureResourceGroup to search for resources and groups by tag name or name and value.Each tag must have a Name key. It can also have an optional Value key with one value. To specify a new tag, use a hash table, such as @{Name="FY2015"} or @{Name="Department";Value="IT"}. To specify multiple tags, use commas to separate the hash tables, such as -Tag @{Name="FY2015"}, @{Name="Department";Value="IT"}. To specify a predefined tag, use the Get-AzureTag cmdlet.To delete a tag, enter a hash table with all tags currently applied to the resource (from Get-AzureResource), except for the tag you want to delete. To delete all tags from the resource, enter an empty hash table (-Tag @{}). + + Hashtable[] + + + Name + + Specifies the name of the Azure resource. The name is case-sensitive. Wildcards are not permitted. This value identifies the resource. You cannot use this cmdlet to change the resource name. + + String + + + ResourceGroupName + + Specifies the name of the resource group of the resource. Wildcards are not permitted. This value identifies the resource. You cannot use this cmdlet to change the resource group of a resource. + + String + + + ResourceType + + Specifies the resource type. Wildcards are not permitted. This value identifies the resource. You cannot use this cmdlet to change the resource type. + + String + + + ParentResource + + Specifies the names of the logical parent of a resource. Enter the fully qualified name of the parent resource, such as " Microsoft.Sql/servers/ContosoSQLSvr". Wildcards are not permitted. This value identifies the resource. You cannot use this cmdlet to change the resource parent.Use this parameter when the resource is a type that has parents. For example, every SQL Azure database has a parent SQL Azure database server. A resource group is not a parent of its resources. + + String + + + + + + ApiVersion + + Specifies the API version that is supported by the resource provider. This parameter is required. + + String + + String + + + + + + PropertyObject + + Specifies the new property values. Enter a hash table of property names and values. The names and values are case-sensitive. + + Hashtable + + Hashtable + + + + + + Tag + + Replaces the tags for the resource with the specified new or predefined tags. To change any resource tag, you must replace the collection of tags for the resource.A "tag" is a name-value pair that you can apply to resources and resource groups. Use tags to categorize your resources, such as by department or cost center, or to track notes or comments about the resources. After you assign tags to resources, you can use the Tag parameters of Get-AzureResource and Get-AzureResourceGroup to search for resources and groups by tag name or name and value.Each tag must have a Name key. It can also have an optional Value key with one value. To specify a new tag, use a hash table, such as @{Name="FY2015"} or @{Name="Department";Value="IT"}. To specify multiple tags, use commas to separate the hash tables, such as -Tag @{Name="FY2015"}, @{Name="Department";Value="IT"}. To specify a predefined tag, use the Get-AzureTag cmdlet.To delete a tag, enter a hash table with all tags currently applied to the resource (from Get-AzureResource), except for the tag you want to delete. To delete all tags from the resource, enter an empty hash table (-Tag @{}). + + Hashtable[] + + Hashtable[] + + + + + + Name + + Specifies the name of the Azure resource. The name is case-sensitive. Wildcards are not permitted. This value identifies the resource. You cannot use this cmdlet to change the resource name. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of the resource group of the resource. Wildcards are not permitted. This value identifies the resource. You cannot use this cmdlet to change the resource group of a resource. + + String + + String + + + + + + ResourceType + + Specifies the resource type. Wildcards are not permitted. This value identifies the resource. You cannot use this cmdlet to change the resource type. + + String + + String + + + + + + ParentResource + + Specifies the names of the logical parent of a resource. Enter the fully qualified name of the parent resource, such as " Microsoft.Sql/servers/ContosoSQLSvr". Wildcards are not permitted. This value identifies the resource. You cannot use this cmdlet to change the resource parent.Use this parameter when the resource is a type that has parents. For example, every SQL Azure database has a parent SQL Azure database server. A resource group is not a parent of its resources. + + String + + String + + + + + + + + + None + + + + + + + + + + + + Microsoft.Azure.Commands.ResourceManager.Models.PSResource + + + + + + + + + + + + + + + -------------------------- Example 1: Change the properties of a resource -------------------------- + + + + PS C:\> The first command uses the Get-AzureResource cmdlet to get the ContosoLabWeb2 web site. The command saves the resource in the $r variable. +PS C:\>$r = Get-AzureResource -Name ContosoLabWeb2 -ResourceGroupName ContosoLabsRG -ResourceType "Microsoft.Web/sites" -ApiVersion 2004-04-01 + +The second command saves the Properties property (and its properties) of the resource in the $p variable. The Properties object is a Dictionary, but because it is convertible to a hash table, you can use it as the value of the PropertyObject parameter of Set-AzureResource without casting. +PS C:\>$p = $r.Properties + +The third command displays the properties in the $p variable. +PS C:\>$pName Value---- -----name ContosoLabWeb2storageRecoveryDefaultState RunningavailabilityState 0trafficManagerHostNamesrepositorySiteName ContosoLabWeb2runtimeAvailabilityState 0siteMode LimitedruntimeADUserlastModifiedTimeUtc 3/25/2014 6:00:04 PMusageState 0hostNames {contosolabweb2.antares-int.windows-int.net}adminEnabled TruehostNameSslStates {System.Collections.Generic.Dictionary`2[System.String,System.Object], System.Collect...runtimeADUserDomainenabled TruedeploymentId ContosoLabWeb2selfLink https://antpreview2.api.admin-antares-int.windows-int.net:454/20130801/websystems/web...computeMode 0webSpace ContosoLabsRG-NorthEuropewebspacecsrs {}siteConfigintegratedSqlAuthEnabled Falsestate RunningruntimeADUserPasswordserverFarm Default1sslCertificates {}cerscontentAvailabilityState 0enabledHostNames {contosolabweb2.antares-int.windows-int.net, contosolabweb2.scm.antares-int.windows-i...windowsAuthEnabled 0ownersiteProperties {[metadata, ], [properties, System.Collections.Generic.List`1[System.Object]], [appSe...sku Free + +The fourth command is actually a series of commands (delimited by semi-colons) that change the values of the properties in the $p variable. +PS C:\>$p.siteMode = "Basic"; $p.sku = "Basic"; $p.computeMode = "Dedicated"; $p.serverFarm = "Default2" + +The fifth command uses the Set-AzureResource cmdlet to change the change the properties of the ContosoLabWeb2 web site. The value of the PropertyObject parameter is the $p variable that contains the Properties object and the new values. The command saves the output (the updated resource) in the $r2 variable. +PS C:\>$r2 = Set-AzureResource -Name ContosoLabWeb2 -ResourceGroupName ContosoLabsRG -ResourceType "Microsoft.Web/sites" -ApiVersion 2004-04-01 -PropertyObject $p + +The sixth command displays the Properties property of the resource in the $r2 variable. You can see that the properties have the new values. +PS C:\>$r2.PropertiesName Value---- -----storageRecoveryDefaultState RunningavailabilityState 0trafficManagerHostNamesrepositorySiteName ContosoLabWeb2runtimeAvailabilityState 0siteMode BasicruntimeADUserlastModifiedTimeUtc 3/25/2014 6:00:04 PMusageState 0hostNames {contosolabweb2.antares-int.windows-int.net}adminEnabled TruehostNameSslStates {System.Collections.Generic.Dictionary`2[System.String,System.Object], System.Collect...runtimeADUserDomainenabled TruedeploymentId ContosoLabWeb2selfLink https://antpreview2.api.admin-antares-int.windows-int.net:454/20130801/websystems/web...computeMode DedicatedwebSpace ContosoLabsRG-NorthEuropewebspacecsrs {}siteConfigintegratedSqlAuthEnabled Falsestate RunningruntimeADUserPasswordserverFarm Default2sslCertificates {}cerscontentAvailabilityState 0enabledHostNames {contosolabweb2.antares-int.windows-int.net, contosolabweb2.scm.antares-int.windows-i...windowsAuthEnabled 0ownersiteProperties {[metadata, ], [properties, System.Collections.Generic.List`1[System.Object]], [appSe...sku Basicname ContosoLabWeb2 + + This example shows how to change the properties of an Azure resource. In this case, we'll shift a web site from one server farm to another. To do that, we have to change the web site properties to be compatible with the new server farm. + + + + + + + + + -------------------------- Example 2: Apply a tag to a resource -------------------------- + + + + PS C:\>Get-AzureResource -Name ContosoLabWeb2 -ResourceGroupName ContosoLabsRG -ResourceType "Microsoft.Web/sites" -ApiVersion 2004-04-01 -Tag @{Name="CostCenter";Value="Sales"} + + This command uses the Tag parameter to add a CostCenter tag with a value of "Sales" to a resource that did not have any existing tags. + + + + + + + + + -------------------------- Example 3: Add tags to a resource -------------------------- + + + + PS C:\>$tags = (Get-AzureResource -Name ContosoWeb -ResourceGroupName ContosoLabsRG -ResourceType "Microsoft.Web/sites" -ApiVersion 2004-04-01).Tags + +PS C:\>$tags + + +Tags: + + Name Value + ==== ====== + Department IT + + +PS C:\>$tags += @{Name="Status";Value="Approved"}, @{Name="FY2016"} + +PS C:\>Set-AzureResource -Name ContosoWeb -ResourceGroupName ContosoLabsRG -ResourceType "Microsoft.Web/sites" -ApiVersion 2004-04-01 -Tag $tags + +PS C:>(Get-AzureResource -Name ContosoWeb -ResourceGroupName ContosoLabsRG -ResourceType "Microsoft.Web/sites" -ApiVersion 2004-04-01).Tags + + +Tags: + + Name Value + ==== ====== + Department IT + Status Approved + FY2016 + + This command adds a "Status" tag with a value of "Approved" and an "FY2016" tag to a resource that has existing tags. Because the tags you specify replace the existing tags, you must include the existing tags in the new tag collection or you will lose them. + + + + The first command gets all existing tags of the ContosoWeb resource. It uses the Get-AzureResource cmdlet to get the resource and then uses the dot method to get the value of its Tags property. It saves the existing tags in a $tags variable.The second command gets the tags in the $tags variable.The third command uses a "+=" operator to add the Status and FY2016 tags to the collection (array) of tags in the $tags variable.The fourth command uses the Tag parameter of Set-AzureResource to apply the tags in the $tags variable to the ContosoWeb resource.The fifth command shows the effect of the change. It gets all of the tags applied to the ContosoWeb resource. The output shows that the resource has the Department tag and the two new tags, Status and FY2015. + + + + + -------------------------- Example 4: Delete all tags -------------------------- + + + + PS C:\>Get-AzureResource -Name ContosoLabWeb2 -ResourceGroupName ContosoLabsRG -ResourceType "Microsoft.Web/sites" -ApiVersion 2004-04-01 -Tag @{} + + This command uses the Tag parameter and an empty hash table value to delete all tags from a resource. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=393461 + + + + + + + Set-AzureResourceGroup + + Changes the properties of a resource group + + + + + Set + AzureResourceGroup + + + + + The Set-AzureResourceGroup cmdlet changes the properties of a resource group. You can use this cmdlet to add, change, or delete the Azure tags applied to a resource group. Use the Name parameter to identify the resource group and the Tag parameter to change the tags. You cannot use this cmdlet to change the name of a resource group. + + + + Set-AzureResourceGroup + + Name + + Specifies the name of the resource group. This parameter identifies the resource group that you want to change. + + String + + + Tag + + Replaces the tags for the resource group with the specified tags. To add or change a single tag, you must replace the collection of tags for the resource group.A "tag" is a name-value pair that you can create and apply to resources and resource groups. After you assign tags to resources and groups, you can use the Tag parameters of Get-AzureResource and Get-AzureResourceGroup to search for resources and groups by tag name or name and value. Use tags to categorize your resources, such as by department or cost center, or to track notes or comments about the resources.Each tag must have a Name key. It can also have an optional Value key with one value. To specify a tag, use a hash table, such as @{Name="FY2015"} or @{Name="Department";Value="IT"}. To specify multiple tags, use commas to separate the hash tables, such as -Tag @{Name="FY2015"}, @{Name="Department";Value="IT"}.To delete a tag, enter a hash table with all tags currently applied to the resource group (from Get-AzureResourceGroup), except for the tag you want to delete. To delete all tags from a resource group, enter an empty hash table (-Tag @{}). + + Hashtable[] + + + + + + Name + + Specifies the name of the resource group. This parameter identifies the resource group that you want to change. + + String + + String + + + + + + Tag + + Replaces the tags for the resource group with the specified tags. To add or change a single tag, you must replace the collection of tags for the resource group.A "tag" is a name-value pair that you can create and apply to resources and resource groups. After you assign tags to resources and groups, you can use the Tag parameters of Get-AzureResource and Get-AzureResourceGroup to search for resources and groups by tag name or name and value. Use tags to categorize your resources, such as by department or cost center, or to track notes or comments about the resources.Each tag must have a Name key. It can also have an optional Value key with one value. To specify a tag, use a hash table, such as @{Name="FY2015"} or @{Name="Department";Value="IT"}. To specify multiple tags, use commas to separate the hash tables, such as -Tag @{Name="FY2015"}, @{Name="Department";Value="IT"}.To delete a tag, enter a hash table with all tags currently applied to the resource group (from Get-AzureResourceGroup), except for the tag you want to delete. To delete all tags from a resource group, enter an empty hash table (-Tag @{}). + + Hashtable[] + + Hashtable[] + + + + + + + + + None + + + + + + + + + + + + Microsoft.Azure.Commands.Resources.Models.PSResourceGroup + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Apply a tag to a resource group -------------------------- + + + + PS C:\>Set-AzureResourceGroup -Name ContosoRG -Tag @{Name="Department";Value="IT"} + + This command applies a "Department" tag with a value of "IT" to a resource group that has no existing tags. + + + + + + + + + -------------------------- Example 2: Add tags to a resource group -------------------------- + + + + PS C:\>$tags = (Get-AzureResourceGroup -Name ContosoRG).Tags + +PS C:\>$tags + + +Tags: + + Name Value + ==== ====== + Department IT + + +PS C:\>$tags += @{Name="Status";Value="Approved"}, @{Name="FY2016"} + +PS C:\>Set-AzureResourceGroup -Name ContosoRG -Tag $tags + +PS C:>(Get-AzureResourceGroup -Name ContosoRG).Tags + + +Tags: + + Name Value + ==== ====== + Department IT + Status Approved + FY2016 + + This command adds a "Status" tag with a value of "Approved" and an "FY2016" tag to a resource group that has existing tags. Because the tags you specify replace the existing tags, you must include the existing tags in the new tag collection or you will lose them. + + + + The first command gets all existing tags of the ContosoRG resource group. It uses the Get-AzureResourceGroup cmdlet to get the ContosoRG resource group and then uses the dot method to get the value of its Tags property. It saves the existing tags in a $tags variable.The second command gets the tags in the $tags variable.The third command uses a "+=" operator to add the Status and FY2016 tags to the collection (array) of tags in the $tags variable.The fourth command uses the Tag parameter of Set-AzureResourceGroup to apply the tags in the $tags variable to the ContosoRG resource group.The fifth command shows the effect of the change. It gets all of the tags applied to the ContosoRG resource group. The output shows that the resource group has the Department tag and the two new tags, Status and FY2015. + + + + + -------------------------- Example 3: Delete all tags -------------------------- + + + + PS C:\>Set-AzureResourceGroup -Name ContosoRG -Tag @{} + + This command deletes all tags from the ContosoRG resource group. It uses the Tag parameter with an empty hash table value. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=404152 + + + + + + + Stop-AzureResourceGroupDeployment + + Cancels a resource group deployment + + + + + Stop + AzureResourceGroupDeployment + + + + + The Stop-AzureResourceGroupDeployment cmdlet cancels an Azure resource group deployment that is started, but not completed. To stop a deployment, the deployment must have an incomplete provisioning state, such as Provisioning, and not a completed state, such as Provisioned or Failed.An Azure resource is a user-managed entity, such as a website, database, or database server. A resource group is a collection of resources that are deployed as a unit. To deploy a resource group, use the New-AzureResourceGroup or New-AzureResourceGroupDeployment cmdlets. The New-AzureResource cmdlet creates a new resource, but it does not trigger a resource group deployment operation that this cmdlet can stop.This cmdlet stops only one running deployment. Use the Name parameter to stop a particular deployment. If you omit the Name parameter, Stop-AzureResourceGroupDeployment searches for a running deployment and stops it, but if it finds more than one running deployment, the command fails.By default, Stop-AzureResourceGroupDeployment prompts you for confirmation. To suppress the prompt, use the Force parameter. + + + + Stop-AzureResourceGroupDeployment + + ResourceGroupName + + Stops the deployment of the specified resource group. This parameter is required. + + String + + + Name + + Stops the specified deployment. Enter the deployment name. This parameter is optional.Without this parameter, Stop-AzureResourceGroupDeployment searches for a running deployment in the resource group and stops it, but if it finds more than one running deployment, the command fails.You can use -Name or its alias, -DeploymentName.To find the deployment name, use the Get-AzureResourceGroupDeployment cmdlet. + + String + + + Force + + Suppresses the confirmation prompt. By default, Stop-AzureResourceGroupDeployment prompts you before stopping a deployment. + + SwitchParameter + + + PassThru + + Returns $True when the stopping operation succeeds and $False when it fails. By default, this cmdlet does not generate any output. + + SwitchParameter + + + + + + ResourceGroupName + + Stops the deployment of the specified resource group. This parameter is required. + + String + + String + + + + + + Name + + Stops the specified deployment. Enter the deployment name. This parameter is optional.Without this parameter, Stop-AzureResourceGroupDeployment searches for a running deployment in the resource group and stops it, but if it finds more than one running deployment, the command fails.You can use -Name or its alias, -DeploymentName.To find the deployment name, use the Get-AzureResourceGroupDeployment cmdlet. + + String + + String + + + + + + Force + + Suppresses the confirmation prompt. By default, Stop-AzureResourceGroupDeployment prompts you before stopping a deployment. + + SwitchParameter + + SwitchParameter + + + + + + PassThru + + Returns $True when the stopping operation succeeds and $False when it fails. By default, this cmdlet does not generate any output. + + SwitchParameter + + SwitchParameter + + + + + + + + + None + + + + + + + + + + + + None or Boolean + + + + + + + + + + + + + + + -------------------------- Example 1: Stop a resource group deployment -------------------------- + + + + PS C:\>New-AzureResourceGroup -ResourceGroupName ContosoRG01 -GalleryTemplateName WebHosting -TemplateParameterFile .\HostingTemplateValues + +PS C:\>Stop-AzureResourceGroupDeployment -ResourceGroupName ContosoRG01 -Force + + This example shows how to use the Stop-AzureResourceGroupDeployment command to stop a deployment in progress. The first command uses the New-AzureResourceGroup cmdlet to create and deploy a new resource group. + + + + Immediately after pressing enter, you remember that you need to get manager approval before deploying new resources. The second command uses the Stop-AzureResourceGroupDeployment cmdlet to stop the deployment before it completes. The command uses the ResourceGroupName parameter to identify the deployment. It also uses the Force parameter to suppress the confirmation prompt. + + + + + -------------------------- Example 2: Stop a resource group deployment by deployment name -------------------------- + + + + PS C:\>New-AzureResourceGroup -ResourceGroupName ContosoRG01 -GalleryTemplateName WebHosting -TemplateParameterFile .\HostingTemplateValues -DeploymentName DeployHost + +PS C:\>New-AzureResourceGroupDeployment -ResourceGroupName ContosoRG01 -TemplateParameterFile .\PortalTemplateValues -GalleryTemplateName WebPortal -DeploymentName DeployPortal + +PS C:\>Stop-AzureResourceGroupDeployment -ResourceGroupName ContosoRG01 -Name DeployPortal -Passthru +True + + This example shows how to use the Name (alias DeploymentName) parameter of the Stop-AzureResourceGroupDeployment command to stop a deployment in progress. + + + + The first command uses the New-AzureResourceGroup cmdlet to create and deploy a new "ContosoRG01" resource group with a "DeployHost" deployment. The second command uses the New-AzureResourceGroupDeployment to add the "DeployPortal" deployment to the "ContosoRG01" resource group.The third command uses the Stop-AzureResourceGroupDeployment cmdlet to stop the "DeployPortal" deployment before it completes. The command uses the ResourceGroupName parameter to identify the resource group and the Name parameter to specify the deployment name. Because the command include the Passthru parameter, the cmdlet returns a value of True ($True) to indicate that the deployment stopped. + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=393046 + + + + + + + Test-AzureResourceGroupTemplate + + Detects errors in a resource group template or template parameters + + + + + Test + AzureResourceGroupTemplate + + + + + The Test-AzureResourceGroupTemplate cmdlet verifies the validity of a resource group template, its parameters, and parameter values. It returns errors that it finds. Otherwise, it does not return any output.To specify a template, use the GalleryTemplateIdentity or TemplateFile parameters. To specify the template parameter values, use the TemplateParameterFile or TemplateParameterObject parameters, or use the template parameters that are added to the command dynamically when you specify the template. To get the parameters, just type a minus sign (-) to indicate a parameter name and press the TAB key to trigger tab-completion. If you miss a required parameter, the cmdlet prompts you for the value. Parameter values typed at the command line take precedence over values in a template parameter object or file.A resource group template is a JSON-based model of a resource group for a complex cloud-based service, such as a web portal. You can use a resource group template to create a resource group or resource group deployment. The template includes parameter (placeholders) for configurable property values, likes names and sizes. You can find many templates in the Azure template gallery (Get-AzureResourceGroupGalleryTemplate) and you can create your own templates. + + + + Test-AzureResourceGroupTemplate + + ResourceGroupName + + Specify the name of the resource group. This parameter is mandatory. Wildcards are not permitted. + + String + + + TemplateFile + + Specifies the path and file name of a JSON template file on disk. This can be a custom template or a gallery template that is saved to disk as a JSON file, such as by using the Save-AzureResourceGroupGalleryTemplate cmdlet.To use this parameter, the subscription must include a storage account where the cmdlet can save the template. By default, this cmdlet uses the current storage account in the subscription, but you can use the StorageAccountName parameter to specify an alternate storage account. If you do not specify a storage account and the subscription does not have a storage account that is designated as "current," the command fails.To create a storage account, use the Switch-AzureMode cmdlet to switch to the Azure module, and then use the New-AzureStorageAccount cmdlet. To make the a storage account the "current storage account" for the subscription, use the CurrentStorageAccountName parameter of the Set-AzureSubscription cmdlet. + + String + + + StorageAccountName + + Specifies the name of a storage account in the subscription. Test-AzureResourceGroupGalleryTemplate saves the contents of local template files in the storage account. This parameter is optional, but a storage account is required when you use the TemplateFile parameter.The default value is the current storage account in the subscription. If you do not specify a storage account and the subscription does not have a storage account that it designated as "current," the command fails.To create a storage account, use the Switch-AzureMode cmdlet to switch to the Azure module, and then use the New-AzureStorageAccount cmdlet. To make the a storage account the "current storage account" for the subscription, use the CurrentStorageAccountName parameter of the Set-AzureSubscription cmdlet. + + String + + + TemplateVersion + + Specifies a particular version of the gallery or custom template. Enter the API version number, such as "2014-04-01-preview". This parameter is optional. If you specify this parameter, Test-AzureResourceGroupGalleryTemplate verifies that the specified template has the matching version and fails if it does not. + + String + + + + Test-AzureResourceGroupTemplate + + ResourceGroupName + + Specify the name of the resource group. This parameter is mandatory. Wildcards are not permitted. + + String + + + TemplateParameterObject + + Specifies a hash table of template parameter names and values. The parameters and values are case-sensitive. You must specify values for the template parameters, but you can use this parameter, the TemplateParameterFile parameter, or use the parameters that are added to the command dynamically when you specify the template. + + Hashtable + + + GalleryTemplateIdentity + + Specifies the identity of the gallery template to test. Enter an Identity value not a file name. Wildcards are not permitted.To get the identity of a gallery template, use the Get-AzureResourceGroupGalleryTemplate cmdlet. To test a gallery template that is saved as a JSON file on disk, use the TemplateFile parameter. + + String + + + TemplateVersion + + Specifies a particular version of the gallery or custom template. Enter the API version number, such as "2014-04-01-preview". This parameter is optional. If you specify this parameter, Test-AzureResourceGroupGalleryTemplate verifies that the specified template has the matching version and fails if it does not. + + String + + + + Test-AzureResourceGroupTemplate + + ResourceGroupName + + Specify the name of the resource group. This parameter is mandatory. Wildcards are not permitted. + + String + + + TemplateParameterObject + + Specifies a hash table of template parameter names and values. The parameters and values are case-sensitive. You must specify values for the template parameters, but you can use this parameter, the TemplateParameterFile parameter, or use the parameters that are added to the command dynamically when you specify the template. + + Hashtable + + + TemplateFile + + Specifies the path and file name of a JSON template file on disk. This can be a custom template or a gallery template that is saved to disk as a JSON file, such as by using the Save-AzureResourceGroupGalleryTemplate cmdlet.To use this parameter, the subscription must include a storage account where the cmdlet can save the template. By default, this cmdlet uses the current storage account in the subscription, but you can use the StorageAccountName parameter to specify an alternate storage account. If you do not specify a storage account and the subscription does not have a storage account that is designated as "current," the command fails.To create a storage account, use the Switch-AzureMode cmdlet to switch to the Azure module, and then use the New-AzureStorageAccount cmdlet. To make the a storage account the "current storage account" for the subscription, use the CurrentStorageAccountName parameter of the Set-AzureSubscription cmdlet. + + String + + + StorageAccountName + + Specifies the name of a storage account in the subscription. Test-AzureResourceGroupGalleryTemplate saves the contents of local template files in the storage account. This parameter is optional, but a storage account is required when you use the TemplateFile parameter.The default value is the current storage account in the subscription. If you do not specify a storage account and the subscription does not have a storage account that it designated as "current," the command fails.To create a storage account, use the Switch-AzureMode cmdlet to switch to the Azure module, and then use the New-AzureStorageAccount cmdlet. To make the a storage account the "current storage account" for the subscription, use the CurrentStorageAccountName parameter of the Set-AzureSubscription cmdlet. + + String + + + TemplateVersion + + Specifies a particular version of the gallery or custom template. Enter the API version number, such as "2014-04-01-preview". This parameter is optional. If you specify this parameter, Test-AzureResourceGroupGalleryTemplate verifies that the specified template has the matching version and fails if it does not. + + String + + + + Test-AzureResourceGroupTemplate + + ResourceGroupName + + Specify the name of the resource group. This parameter is mandatory. Wildcards are not permitted. + + String + + + TemplateParameterObject + + Specifies a hash table of template parameter names and values. The parameters and values are case-sensitive. You must specify values for the template parameters, but you can use this parameter, the TemplateParameterFile parameter, or use the parameters that are added to the command dynamically when you specify the template. + + Hashtable + + + TemplateUri + + Specifies the URI of a JSON template file. This file can be a custom template or a gallery template that is saved as a JSON file, such as by using the Save-AzureResourceGroupGalleryTemplate cmdlet. + + String + + + TemplateVersion + + Specifies a particular version of the gallery or custom template. Enter the API version number, such as "2014-04-01-preview". This parameter is optional. If you specify this parameter, Test-AzureResourceGroupGalleryTemplate verifies that the specified template has the matching version and fails if it does not. + + String + + + + Test-AzureResourceGroupTemplate + + ResourceGroupName + + Specify the name of the resource group. This parameter is mandatory. Wildcards are not permitted. + + String + + + TemplateParameterFile + + Specifies the path and name of a JSON file of template parameter names and values. You must specify values for the template parameters, but you can use this parameter, the TemplateParameterObject parameter, or use the parameters that are added to the command dynamically when you specify the template. + + String + + + TemplateFile + + Specifies the path and file name of a JSON template file on disk. This can be a custom template or a gallery template that is saved to disk as a JSON file, such as by using the Save-AzureResourceGroupGalleryTemplate cmdlet.To use this parameter, the subscription must include a storage account where the cmdlet can save the template. By default, this cmdlet uses the current storage account in the subscription, but you can use the StorageAccountName parameter to specify an alternate storage account. If you do not specify a storage account and the subscription does not have a storage account that is designated as "current," the command fails.To create a storage account, use the Switch-AzureMode cmdlet to switch to the Azure module, and then use the New-AzureStorageAccount cmdlet. To make the a storage account the "current storage account" for the subscription, use the CurrentStorageAccountName parameter of the Set-AzureSubscription cmdlet. + + String + + + StorageAccountName + + Specifies the name of a storage account in the subscription. Test-AzureResourceGroupGalleryTemplate saves the contents of local template files in the storage account. This parameter is optional, but a storage account is required when you use the TemplateFile parameter.The default value is the current storage account in the subscription. If you do not specify a storage account and the subscription does not have a storage account that it designated as "current," the command fails.To create a storage account, use the Switch-AzureMode cmdlet to switch to the Azure module, and then use the New-AzureStorageAccount cmdlet. To make the a storage account the "current storage account" for the subscription, use the CurrentStorageAccountName parameter of the Set-AzureSubscription cmdlet. + + String + + + TemplateVersion + + Specifies a particular version of the gallery or custom template. Enter the API version number, such as "2014-04-01-preview". This parameter is optional. If you specify this parameter, Test-AzureResourceGroupGalleryTemplate verifies that the specified template has the matching version and fails if it does not. + + String + + + + Test-AzureResourceGroupTemplate + + ResourceGroupName + + Specify the name of the resource group. This parameter is mandatory. Wildcards are not permitted. + + String + + + TemplateParameterFile + + Specifies the path and name of a JSON file of template parameter names and values. You must specify values for the template parameters, but you can use this parameter, the TemplateParameterObject parameter, or use the parameters that are added to the command dynamically when you specify the template. + + String + + + GalleryTemplateIdentity + + Specifies the identity of the gallery template to test. Enter an Identity value not a file name. Wildcards are not permitted.To get the identity of a gallery template, use the Get-AzureResourceGroupGalleryTemplate cmdlet. To test a gallery template that is saved as a JSON file on disk, use the TemplateFile parameter. + + String + + + TemplateVersion + + Specifies a particular version of the gallery or custom template. Enter the API version number, such as "2014-04-01-preview". This parameter is optional. If you specify this parameter, Test-AzureResourceGroupGalleryTemplate verifies that the specified template has the matching version and fails if it does not. + + String + + + + Test-AzureResourceGroupTemplate + + ResourceGroupName + + Specify the name of the resource group. This parameter is mandatory. Wildcards are not permitted. + + String + + + TemplateParameterFile + + Specifies the path and name of a JSON file of template parameter names and values. You must specify values for the template parameters, but you can use this parameter, the TemplateParameterObject parameter, or use the parameters that are added to the command dynamically when you specify the template. + + String + + + TemplateUri + + Specifies the URI of a JSON template file. This file can be a custom template or a gallery template that is saved as a JSON file, such as by using the Save-AzureResourceGroupGalleryTemplate cmdlet. + + String + + + TemplateVersion + + Specifies a particular version of the gallery or custom template. Enter the API version number, such as "2014-04-01-preview". This parameter is optional. If you specify this parameter, Test-AzureResourceGroupGalleryTemplate verifies that the specified template has the matching version and fails if it does not. + + String + + + + Test-AzureResourceGroupTemplate + + ResourceGroupName + + Specify the name of the resource group. This parameter is mandatory. Wildcards are not permitted. + + String + + + GalleryTemplateIdentity + + Specifies the identity of the gallery template to test. Enter an Identity value not a file name. Wildcards are not permitted.To get the identity of a gallery template, use the Get-AzureResourceGroupGalleryTemplate cmdlet. To test a gallery template that is saved as a JSON file on disk, use the TemplateFile parameter. + + String + + + TemplateVersion + + Specifies a particular version of the gallery or custom template. Enter the API version number, such as "2014-04-01-preview". This parameter is optional. If you specify this parameter, Test-AzureResourceGroupGalleryTemplate verifies that the specified template has the matching version and fails if it does not. + + String + + + + Test-AzureResourceGroupTemplate + + ResourceGroupName + + Specify the name of the resource group. This parameter is mandatory. Wildcards are not permitted. + + String + + + TemplateUri + + Specifies the URI of a JSON template file. This file can be a custom template or a gallery template that is saved as a JSON file, such as by using the Save-AzureResourceGroupGalleryTemplate cmdlet. + + String + + + TemplateVersion + + Specifies a particular version of the gallery or custom template. Enter the API version number, such as "2014-04-01-preview". This parameter is optional. If you specify this parameter, Test-AzureResourceGroupGalleryTemplate verifies that the specified template has the matching version and fails if it does not. + + String + + + + + + ResourceGroupName + + Specify the name of the resource group. This parameter is mandatory. Wildcards are not permitted. + + String + + String + + + + + + TemplateFile + + Specifies the path and file name of a JSON template file on disk. This can be a custom template or a gallery template that is saved to disk as a JSON file, such as by using the Save-AzureResourceGroupGalleryTemplate cmdlet.To use this parameter, the subscription must include a storage account where the cmdlet can save the template. By default, this cmdlet uses the current storage account in the subscription, but you can use the StorageAccountName parameter to specify an alternate storage account. If you do not specify a storage account and the subscription does not have a storage account that is designated as "current," the command fails.To create a storage account, use the Switch-AzureMode cmdlet to switch to the Azure module, and then use the New-AzureStorageAccount cmdlet. To make the a storage account the "current storage account" for the subscription, use the CurrentStorageAccountName parameter of the Set-AzureSubscription cmdlet. + + String + + String + + + + + + StorageAccountName + + Specifies the name of a storage account in the subscription. Test-AzureResourceGroupGalleryTemplate saves the contents of local template files in the storage account. This parameter is optional, but a storage account is required when you use the TemplateFile parameter.The default value is the current storage account in the subscription. If you do not specify a storage account and the subscription does not have a storage account that it designated as "current," the command fails.To create a storage account, use the Switch-AzureMode cmdlet to switch to the Azure module, and then use the New-AzureStorageAccount cmdlet. To make the a storage account the "current storage account" for the subscription, use the CurrentStorageAccountName parameter of the Set-AzureSubscription cmdlet. + + String + + String + + + + + + TemplateVersion + + Specifies a particular version of the gallery or custom template. Enter the API version number, such as "2014-04-01-preview". This parameter is optional. If you specify this parameter, Test-AzureResourceGroupGalleryTemplate verifies that the specified template has the matching version and fails if it does not. + + String + + String + + + + + + TemplateParameterObject + + Specifies a hash table of template parameter names and values. The parameters and values are case-sensitive. You must specify values for the template parameters, but you can use this parameter, the TemplateParameterFile parameter, or use the parameters that are added to the command dynamically when you specify the template. + + Hashtable + + Hashtable + + + + + + GalleryTemplateIdentity + + Specifies the identity of the gallery template to test. Enter an Identity value not a file name. Wildcards are not permitted.To get the identity of a gallery template, use the Get-AzureResourceGroupGalleryTemplate cmdlet. To test a gallery template that is saved as a JSON file on disk, use the TemplateFile parameter. + + String + + String + + + + + + TemplateUri + + Specifies the URI of a JSON template file. This file can be a custom template or a gallery template that is saved as a JSON file, such as by using the Save-AzureResourceGroupGalleryTemplate cmdlet. + + String + + String + + + + + + TemplateParameterFile + + Specifies the path and name of a JSON file of template parameter names and values. You must specify values for the template parameters, but you can use this parameter, the TemplateParameterObject parameter, or use the parameters that are added to the command dynamically when you specify the template. + + String + + String + + + + + + + + + None + + + + + + + + + + + + Microsoft.Azure.Commands.ResourceManager.Models.PSResourceManagerError + + + + + + + + + + + + + + + -------------------------- Example 1: Test a custom template file -------------------------- + + + + PS C:\>Test-AzureResourceGroupTemplate -ResourceGroupName ContosoLabsRG -TemplateFile $home\Documents\Azure\Templates\CustomHostingPlan.json -TemplateParameterFile $home\Documents\Azure\Templates\HostingPlanParms.jsonPS C:> + + This command tests a custom template file, CustomHostingPlan.json, and a template parameter file, HostingPlanParms.json. Because the cmdlet does not find any errors, it does not return any output. + + + + + + + + + -------------------------- Example 2: Test a parameter object for a gallery template -------------------------- + + + + PS C:\>Test-AzureResourceGroupTemplate -ResourceGroupName ContosoLabsRG -GalleryTemplateIdentity Microsoft.WebSite.0.1.0-preview1 -TemplateParameterObject @{siteName = "ContosoSite";hostingPlanName="ContosoHosting";siteMode="Limited";computeMode="Shared";subscriptionID='9b14a38b-4b93-4554-8bb0-3cefb47a4e1f';resourceGroup='ContosoLabsRG'}cmdlet Test-AzureResourceGroupTemplate at command pipeline position 1Supply values for the following parameters:(Type !? for Help.)siteLocation:"South Central US"Code : InvalidTemplateMessage : Deployment template validation failed: 'The template parameters 'subscriptionID' are not valid; they are not present in the original template and can therefore not be provided at deployment time. The only supportedparameters for this template are 'siteName, hostingPlanName, siteMode, computeMode, siteLocation, subscriptionId, resourceGroup'.'.a + +PS C:\>Test-AzureResourceGroupTemplate -ResourceGroupName ContosoLabsRG -GalleryTemplateIdentity Microsoft.WebSite.0.1.0-preview1 -TemplateParameterObject @{siteName = "ContosoSite";hostingPlanName="ContosoHosting";siteMode="Limited";computeMode="Shared";subscriptionId='9b14a38b-4b93-4554-8bb0-3cefb47a4e1f';resourceGroup='ContosoLabsRG';siteLocation='South Central US'} + + This command tests gallery template and a hash table of parameter names and values. The command uses the GalleryTemplateIdentity parameter to specify the identity of the gallery template. It uses the TemplateParameterObject cmdlet to specify the template parameters and their values. + + + + In this case, the template parameter hash table is missing the siteLocation parameter. The cmdlet recognizes the omission and prompts for a value. However, the cmdlet still returns an error, because the subscriptionId parameter in hash table is misspelled as "subscriptionID".In the second command, the errors are corrected, and the cmdlet does not return any output. + + + + + -------------------------- Example 3: Test a template with dynamic parameter values -------------------------- + + + + PS C:\>Test-AzureResourceGroupTemplate -ResourceGroupName ContosoLabsRG -TemplateFile C:\Users\juneb\Documents\Azure\Templates\NewHostingPlan.json -siteName ContosoDev -siteMode Limited -computeMode Shared -siteLocation 'South Central US' -sku FreeCode : InvalidTemplateMessage : Deployment template validation failed: 'The template parameter 'hostingPlanName' is not valid.'. + + This command uses the Test-AzureResourceGroupTemplate cmdlet to test a custom template. Instead of providing the template parameter names, we used the feature that adds the template parameters to command dynamically. + + + + To use the dynamic parameters, type a minus sign (-) to indicate a parameter name and press the TAB key. The tab-completion feature supplies parameter name. To cycle through all of the parameter names, press the TAB key repeatedly. In this case, we used the dynamic parameters to specify all of the parameter names at the command line.In this case, even though the template parameter names and values are correct, the Parameters section in the custom template is missing the hostingPlan parameter that is specified in the Resource section of the template. The cmdlet detects and reports this error. + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=393054 + + + + \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.format.ps1xml b/src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.format.ps1xml new file mode 100644 index 000000000000..d5889be604da --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Microsoft.Azure.Commands.Resources.format.ps1xml @@ -0,0 +1,374 @@ + + + + + Microsoft.Azure.Commands.Resources.Models.PSResourceManagerError + + Microsoft.Azure.Commands.Resources.Models.PSResourceManagerError + + + + + + + + Code + + + + Message + + + + + + + + Microsoft.Azure.Commands.Resources.Models.PSResource + + Microsoft.Azure.Commands.Resources.Models.PSResource + + + + + + + + Name + + + + ResourceGroupName + + + + ResourceType + + + + ParentResource + + + + Location + + + + PropertiesText + + + + TagsTable + + + + PermissionsTable + + + + ResourceId + + + + + + + + Microsoft.Azure.Commands.Resources.Models.PSResourceGroup + + Microsoft.Azure.Commands.Resources.Models.PSResourceGroup + + + + + + + + ResourceGroupName + + + + Location + + + + ProvisioningState + + + + TagsTable + + + + PermissionsTable + + PermissionsTable + + + + + ResourcesTable + + ResourcesTable + + + + + ResourceId + + + + + + + + Microsoft.Azure.Commands.Resources.Models.PSResourceGroupDeployment + + Microsoft.Azure.Commands.Resources.Models.PSResourceGroupDeployment + + + + + + + + DeploymentName + + + + ResourceGroupName + + + + ProvisioningState + + + + Timestamp + + + + Mode + + + + TemplateLinkString + + + + ParametersString + + + + OutputsString + + + + + + + + Microsoft.Azure.Commands.Resources.Models.PSResourceProviderType + + Microsoft.Azure.Commands.Resources.Models.PSResourceProviderType + + + + + + 50 + + + + + + + + + + + $_.Name + + + $_.LocationsString + + + + + + + + Microsoft.Azure.Commands.Resources.Models.ActiveDirectory.PSADObject + + Microsoft.Azure.Commands.Resources.Models.ActiveDirectory.PSADObject + + + + + + 30 + + + + 30 + + + + + + + + + + + DisplayName + + + Type + + + Id + + + + + + + + Microsoft.Azure.Commands.Resources.Models.PSDeploymentEventData + + Microsoft.Azure.Commands.Resources.Models.PSDeploymentEventData + + + + + + + + Authorization + + + + ResourceUri + + + + SubscriptionId + + + + Timestamp + + + + OperationName + + + + OperationId + + + + Status + + + + SubStatus + + + + Caller + + + + CorrelationId + + + + Description + + + + HttpRequest + + + + Level + + + + ResourceGroupName + + + + ResourceProvider + + + + EventSource + + + + PropertiesText + + + + + + + + Microsoft.Azure.Commands.Resources.Models.PSGalleryItem + + Microsoft.Azure.Commands.Resources.Models.PSGalleryItem + + + + + + + + Identity + + + + Publisher + + + + Name + + + + Version + + + + CategoryIds + + + + PublisherDisplayName + + + + DisplayName + + + + DefinitionTemplatesText + + + + Summary + + + + Description + + + + + + + + diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/ADObjectFilterOptions.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/ADObjectFilterOptions.cs new file mode 100644 index 000000000000..f6ed5686b790 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/ADObjectFilterOptions.cs @@ -0,0 +1,58 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +namespace Microsoft.Azure.Commands.Resources.Models.ActiveDirectory +{ + public class ADObjectFilterOptions + { + public string SearchString { get; set; } + + public string Mail { get; set; } + + public string UPN { get; set; } + + public string SPN { get; set; } + + public string Id { get; set; } + + public bool Paging { get; set; } + + /// + /// Used internally to track the paging for the listing, do not change manually. + /// + public string NextLink { get; set; } + + public bool HasFilter { get { return !string.IsNullOrEmpty(ActiveFilter); } } + + public string ActiveFilter + { + get + { + if (!string.IsNullOrEmpty(Id)) + return Id; + else if (!string.IsNullOrEmpty(UPN)) + return UPN; + else if (!string.IsNullOrEmpty(SPN)) + return SPN; + else if (!string.IsNullOrEmpty(Mail)) + return Mail; + else if (!string.IsNullOrEmpty(SearchString)) + return SearchString; + else + return null; + } + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/ActiveDirectoryBaseCmdlet.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/ActiveDirectoryBaseCmdlet.cs new file mode 100644 index 000000000000..d181789e1e3e --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/ActiveDirectoryBaseCmdlet.cs @@ -0,0 +1,39 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Resources.Models.ActiveDirectory; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.Azure.Commands.ActiveDirectory.Models +{ + public abstract class ActiveDirectoryBaseCmdlet : AzurePSCmdlet + { + private ActiveDirectoryClient activeDirectoryClient; + + public ActiveDirectoryClient ActiveDirectoryClient + { + get + { + if (activeDirectoryClient == null) + { + activeDirectoryClient = new ActiveDirectoryClient(CurrentContext); + } + + return activeDirectoryClient; + } + + set { activeDirectoryClient = value; } + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/ActiveDirectoryClient.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/ActiveDirectoryClient.cs new file mode 100644 index 000000000000..b7475ca21fcc --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/ActiveDirectoryClient.cs @@ -0,0 +1,347 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Graph.RBAC; +using Microsoft.Azure.Graph.RBAC.Models; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common.Authentication; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; + +namespace Microsoft.Azure.Commands.Resources.Models.ActiveDirectory +{ + public class ActiveDirectoryClient + { + public GraphRbacManagementClient GraphClient { get; private set; } + + /// + /// Creates new ActiveDirectoryClient using WindowsAzureSubscription. + /// + /// + public ActiveDirectoryClient(AzureContext context) + { + AccessTokenCredential creds = (AccessTokenCredential)AzureSession.AuthenticationFactory.GetSubscriptionCloudCredentials(context); + GraphClient = AzureSession.ClientFactory.CreateCustomClient( + creds.TenantID, + creds, + context.Environment.GetEndpointAsUri(AzureEnvironment.Endpoint.Graph)); + } + + public PSADObject GetADObject(ADObjectFilterOptions options) + { + PSADObject result = null; + + Debug.Assert(options != null); + + if (IsSet(options.Mail, options.UPN, options.Id)) + { + result = FilterUsers(options).FirstOrDefault(); + } + + if (result == null && IsSet(options.SPN, options.Id)) + { + result = FilterServicePrincipals(options).FirstOrDefault(); + } + + if (result == null && IsSet(options.Mail, options.Id)) + { + result = FilterGroups(options).FirstOrDefault(); + } + + return result; + } + + private static bool IsSet(params string[] strings) + { + return strings.Any(s => !string.IsNullOrEmpty(s)); + } + + private static string Normalize(string s) + { + return string.IsNullOrEmpty(s) ? null : s; + } + + public List FilterServicePrincipals(ADObjectFilterOptions options) + { + List servicePrincipals = new List(); + ServicePrincipalListResult result = new ServicePrincipalListResult(); + ServicePrincipal servicePrincipal = null; + + if (!string.IsNullOrEmpty(options.Id)) + { + try + { + servicePrincipal = GraphClient.ServicePrincipal.Get(options.Id).ServicePrincipal; + } + catch { /* The user does not exist, ignore the exception. */ } + + if (servicePrincipal != null) + { + servicePrincipals.Add(servicePrincipal.ToPSADServicePrincipal()); + } + } + else if (!string.IsNullOrEmpty(options.SPN)) + { + try + { + servicePrincipal = GraphClient.ServicePrincipal.GetByServicePrincipalName(options.SPN).ServicePrincipals.FirstOrDefault(); + } + catch { /* The user does not exist, ignore the exception. */ } + + if (servicePrincipal != null) + { + servicePrincipals.Add(servicePrincipal.ToPSADServicePrincipal()); + } + } + else + { + if (options.Paging) + { + if (string.IsNullOrEmpty(options.NextLink)) + { + result = GraphClient.ServicePrincipal.List(options.SearchString); + } + else + { + result = GraphClient.ServicePrincipal.ListNext(options.NextLink); + } + + servicePrincipals.AddRange(result.ServicePrincipals.Select(u => u.ToPSADServicePrincipal())); + options.NextLink = result.NextLink; + } + else + { + result = GraphClient.ServicePrincipal.List(options.SearchString); + servicePrincipals.AddRange(result.ServicePrincipals.Select(u => u.ToPSADServicePrincipal())); + + while (!string.IsNullOrEmpty(result.NextLink)) + { + result = GraphClient.ServicePrincipal.ListNext(result.NextLink); + servicePrincipals.AddRange(result.ServicePrincipals.Select(u => u.ToPSADServicePrincipal())); + } + } + } + + return servicePrincipals; + } + + public List FilterServices() + { + return FilterServicePrincipals(new ADObjectFilterOptions()); + } + + public List FilterUsers(ADObjectFilterOptions options) + { + List users = new List(); + UserListResult result = new UserListResult(); + User user = null; + + if (!string.IsNullOrEmpty(options.Id) || !string.IsNullOrEmpty(options.UPN)) + { + try + { + user = GraphClient.User.Get(Normalize(options.Id) ?? Normalize(options.UPN)).User; + } + catch { /* The user does not exist, ignore the exception. */ } + + if (user != null) + { + users.Add(user.ToPSADUser()); + } + } + else if (!string.IsNullOrEmpty(options.Mail)) + { + try + { + user = GraphClient.User.GetBySignInName(options.Mail).Users.FirstOrDefault(); + } + catch { /* The user does not exist, ignore the exception. */ } + + if (user != null) + { + users.Add(user.ToPSADUser()); + } + } + else + { + if (options.Paging) + { + if (string.IsNullOrEmpty(options.NextLink)) + { + result = GraphClient.User.List(null, options.SearchString); + } + else + { + result = GraphClient.User.ListNext(options.NextLink); + } + + users.AddRange(result.Users.Select(u => u.ToPSADUser())); + options.NextLink = result.NextLink; + } + else + { + result = GraphClient.User.List(null, options.SearchString); + users.AddRange(result.Users.Select(u => u.ToPSADUser())); + + while (!string.IsNullOrEmpty(result.NextLink)) + { + result = GraphClient.User.ListNext(result.NextLink); + users.AddRange(result.Users.Select(u => u.ToPSADUser())); + } + } + } + + return users; + } + + public List FilterUsers() + { + return FilterUsers(new ADObjectFilterOptions()); + } + + public List ListUserGroups(string principal) + { + List result = new List(); + Guid objectId = GetObjectId(new ADObjectFilterOptions { UPN = principal }); + PSADObject user = GetADObject(new ADObjectFilterOptions { Id = objectId.ToString() }); + var groupsIds = GraphClient.User.GetMemberGroups(new UserGetMemberGroupsParameters { ObjectId = user.Id.ToString() }).ObjectIds; + var groupsResult = GraphClient.Objects.GetObjectsByObjectIds(new GetObjectsParameters { Ids = groupsIds }); + result.AddRange(groupsResult.AADObject.Select(g => g.ToPSADGroup())); + + return result; + } + + public List FilterGroups(ADObjectFilterOptions options) + { + List groups = new List(); + Group group = null; + + if (!string.IsNullOrEmpty(options.Id)) + { + try + { + group = GraphClient.Group.Get(options.Id).Group; + } + catch { /* The group does not exist, ignore the exception */ } + + if (group != null) + { + groups.Add(group.ToPSADGroup()); + } + } + else + { + GroupListResult result = new GroupListResult(); + + if (options.Paging) + { + if (string.IsNullOrEmpty(options.NextLink)) + { + result = GraphClient.Group.List(options.Mail, options.SearchString); + } + else + { + result = GraphClient.Group.ListNext(options.NextLink); + } + + groups.AddRange(result.Groups.Select(g => g.ToPSADGroup())); + options.NextLink = result.NextLink; + } + else + { + result = GraphClient.Group.List(options.Mail, options.SearchString); + groups.AddRange(result.Groups.Select(g => g.ToPSADGroup())); + + while (!string.IsNullOrEmpty(result.NextLink)) + { + result = GraphClient.Group.ListNext(result.NextLink); + groups.AddRange(result.Groups.Select(g => g.ToPSADGroup())); + } + } + } + + return groups; + } + + public List FilterGroups() + { + return FilterGroups(new ADObjectFilterOptions()); + } + + public List GetGroupMembers(ADObjectFilterOptions options) + { + List members = new List(); + PSADObject group = FilterGroups(options).FirstOrDefault(); + + if (group != null) + { + GetObjectsResult result = new GetObjectsResult(); + + if (options.Paging) + { + if (string.IsNullOrEmpty(options.NextLink)) + { + result = GraphClient.Group.GetGroupMembers(group.Id.ToString()); + } + else + { + result = GraphClient.Group.GetGroupMembersNext(result.NextLink); + } + + members.AddRange(result.AADObject.Select(u => u.ToPSADObject())); + options.NextLink = result.NextLink; + } + else + { + result = GraphClient.Group.GetGroupMembers(group.Id.ToString()); + members.AddRange(result.AADObject.Select(u => u.ToPSADObject())); + + while (!string.IsNullOrEmpty(result.NextLink)) + { + result = GraphClient.Group.GetGroupMembersNext(result.NextLink); + members.AddRange(result.AADObject.Select(u => u.ToPSADObject())); + } + } + } + + return members; + } + + public Guid GetObjectId(ADObjectFilterOptions options) + { + Guid principalId; + if (options != null && options.Id != null + && Guid.TryParse(options.Id, out principalId)) + { + // do nothing, we have parsed the guid + } + else + { + PSADObject adObj = GetADObject(options); + + if (adObj == null) + { + throw new KeyNotFoundException("The provided information does not map to an AD object id."); + } + + principalId = adObj.Id; + } + + return principalId; + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/ActiveDirectoryClientExtensions.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/ActiveDirectoryClientExtensions.cs new file mode 100644 index 000000000000..feb78bd10063 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/ActiveDirectoryClientExtensions.cs @@ -0,0 +1,119 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Graph.RBAC.Models; +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Microsoft.Azure.Commands.Resources.Models.ActiveDirectory +{ + internal static class ActiveDirectoryClientExtensions + { + public static PSADObject ToPSADObject(this User user) + { + return new PSADObject() + { + DisplayName = user.DisplayName, + Id = new Guid(user.ObjectId) + }; + } + + public static PSADObject ToPSADObject(this Group group) + { + return new PSADObject() + { + DisplayName = group.DisplayName, + Id = new Guid(group.ObjectId) + }; + } + + public static PSADObject ToPSADObject(this AADObject obj) + { + if (obj == null) throw new ArgumentNullException(); + + if (obj.ObjectType == typeof(User).Name) + { + return new PSADUser() + { + DisplayName = obj.DisplayName, + Id = new Guid(obj.ObjectId), + Type = obj.ObjectType, + UserPrincipalName = obj.UserPrincipalName, + Mail = obj.Mail + }; + } + else if (obj.ObjectType == typeof(Group).Name) + { + return new PSADGroup() + { + DisplayName = obj.DisplayName, + Type = obj.ObjectType, + Id = new Guid(obj.ObjectId)/*, + Mail = group.Mail*/ + }; + + } + else + { + return new PSADObject() + { + DisplayName = obj.DisplayName, + Id = new Guid(obj.ObjectId), + Type = obj.ObjectType + }; + } + } + + public static PSADObject ToPSADGroup(this AADObject obj) + { + return new PSADObject() + { + DisplayName = obj.DisplayName, + Id = new Guid(obj.ObjectId) + }; + } + + public static PSADUser ToPSADUser(this User user) + { + return new PSADUser() + { + DisplayName = user.DisplayName, + Id = new Guid(user.ObjectId), + UserPrincipalName = user.UserPrincipalName, + Mail = user.SignInName + }; + } + + public static PSADGroup ToPSADGroup(this Group group) + { + return new PSADGroup() + { + DisplayName = group.DisplayName, + Id = new Guid(group.ObjectId)/*, + Mail = group.Mail*/ + }; + } + + public static PSADServicePrincipal ToPSADServicePrincipal(this ServicePrincipal servicePrincipal) + { + return new PSADServicePrincipal() + { + DisplayName = servicePrincipal.DisplayName, + Id = new Guid(servicePrincipal.ObjectId), + ServicePrincipalName = servicePrincipal.ServicePrincipalNames.FirstOrDefault() + }; + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/PSADGroup.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/PSADGroup.cs new file mode 100644 index 000000000000..2a705cec6a64 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/PSADGroup.cs @@ -0,0 +1,21 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Resources.Models.ActiveDirectory +{ + public class PSADGroup : PSADObject + { + public string Mail { get; set; } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/PSADObject.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/PSADObject.cs new file mode 100644 index 000000000000..493ca15dd90e --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/PSADObject.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common.Utilities; + +namespace Microsoft.Azure.Commands.Resources.Models.ActiveDirectory +{ + public class PSADObject + { + public string DisplayName { get; set; } + + public Guid Id { get; set; } + + public string Type { get; set; } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/PSADServicePrincipal.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/PSADServicePrincipal.cs new file mode 100644 index 000000000000..2b833aba18d7 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/PSADServicePrincipal.cs @@ -0,0 +1,21 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Resources.Models.ActiveDirectory +{ + public class PSADServicePrincipal : PSADObject + { + public string ServicePrincipalName { get; set; } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/PSADUser.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/PSADUser.cs new file mode 100644 index 000000000000..9a932096a175 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/PSADUser.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Resources.Models.ActiveDirectory +{ + public class PSADUser : PSADObject + { + public string UserPrincipalName { get; set; } + + public string Mail { get; set; } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/ParameterSet.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/ParameterSet.cs new file mode 100644 index 000000000000..20f9b85d297c --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ActiveDirectory/ParameterSet.cs @@ -0,0 +1,61 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Resources.Models.ActiveDirectory +{ + internal static class ParameterSet + { + public const string Mail = "MailParameterSet"; + + public const string UPN = "UPNParameterSet"; + + public const string SPN = "SPNParameterSet"; + + public const string SearchString = "SearchStringParameterSet"; + + public const string ObjectId = "ObjectIdParameterSet"; + + public const string Scope = "ScopeParameterSet"; + + public const string ScopeWithMail = "ScopeWithMailParameterSet"; + + public const string ScopeWithUPN = "ScopeWithUPNParameterSet"; + + public const string ScopeWithSPN = "ScopeWithSPNParameterSet"; + + public const string ScopeWithObjectId = "ScopeWithObjectIdParameterSet"; + + public const string ResourceGroup = "ResourceGroupParameterSet"; + + public const string ResourceGroupWithMail = "ResourceGroupWithMailParameterSet"; + + public const string ResourceGroupWithUPN = "ResourceGroupWithUPNParameterSet"; + + public const string ResourceGroupWithSPN = "ResourceGroupWithSPNParameterSet"; + + public const string ResourceGroupWithObjectId = "ResourceGroupWithObjectIdParameterSet"; + + public const string Resource = "ResourceParameterSet"; + + public const string ResourceWithMail = "ResourceWithMailParameterSet"; + + public const string ResourceWithUPN = "ResourceWithUPNParameterSet"; + + public const string ResourceWithSPN = "ResourceWithSPNParameterSet"; + + public const string ResourceWithObjectId = "ResourceWithObjectIdParameterSet"; + + public const string Empty = "EmptyParameterSet"; + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/AuthorizationClient.cs b/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/AuthorizationClient.cs new file mode 100644 index 000000000000..6ef94d622729 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/AuthorizationClient.cs @@ -0,0 +1,181 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Resources.Models.ActiveDirectory; +using Microsoft.Azure.Management.Authorization; +using Microsoft.Azure.Management.Authorization.Models; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System; +using System.Collections.Generic; +using System.Linq; +using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources; + +namespace Microsoft.Azure.Commands.Resources.Models.Authorization +{ + public class AuthorizationClient + { + /// + /// This queue is used by the tests to assign fixed role assignment + /// names every time the test runs. + /// + public static Queue RoleAssignmentNames { get; set; } + + public IAuthorizationManagementClient AuthorizationManagementClient { get; set; } + + public ActiveDirectoryClient ActiveDirectoryClient { get; set; } + + static AuthorizationClient() + { + RoleAssignmentNames = new Queue(); + } + + /// + /// Creates PoliciesClient using WindowsAzureSubscription instance. + /// + /// The WindowsAzureSubscription instance + public AuthorizationClient(AzureContext context) + { + ActiveDirectoryClient = new ActiveDirectoryClient(context); + AuthorizationManagementClient = AzureSession.ClientFactory.CreateClient(context, AzureEnvironment.Endpoint.ResourceManager); + } + + public PSRoleDefinition GetRoleDefinition(string roleId) + { + return AuthorizationManagementClient.RoleDefinitions.GetById(roleId).RoleDefinition.ToPSRoleDefinition(); + } + + /// + /// Filters the existing role Definitions. + /// + /// The role name + /// The matched role Definitions + public List FilterRoleDefinitions(string name) + { + List result = new List(); + + if (string.IsNullOrEmpty(name)) + { + result.AddRange(AuthorizationManagementClient.RoleDefinitions.List().RoleDefinitions.Select(r => r.ToPSRoleDefinition())); + } + else + { + result.Add(AuthorizationManagementClient.RoleDefinitions.List().RoleDefinitions + .FirstOrDefault(r => r.Properties.RoleName.Equals(name, StringComparison.OrdinalIgnoreCase)) + .ToPSRoleDefinition()); + } + + return result; + } + + /// + /// Creates new role assignment. + /// + /// The create parameters + /// The created role assignment object + public PSRoleAssignment CreateRoleAssignment(FilterRoleAssignmentsOptions parameters) + { + Guid principalId = ActiveDirectoryClient.GetObjectId(parameters.ADObjectFilter); + Guid roleAssignmentId = RoleAssignmentNames.Count == 0 ? Guid.NewGuid() : RoleAssignmentNames.Dequeue(); + string roleDefinitionId = GetRoleRoleDefinition(parameters.RoleDefinition).Id; + + RoleAssignmentCreateParameters createParameters = new RoleAssignmentCreateParameters + { + PrincipalId = principalId, + RoleDefinitionId = roleDefinitionId + }; + + AuthorizationManagementClient.RoleAssignments.Create(parameters.Scope, roleAssignmentId, createParameters); + return AuthorizationManagementClient.RoleAssignments.Get(parameters.Scope, roleAssignmentId).RoleAssignment.ToPSRoleAssignment(this, ActiveDirectoryClient); + } + + /// + /// Filters role assignments based on the passed options. + /// + /// The filtering options + /// The filtered role assignments + public List FilterRoleAssignments(FilterRoleAssignmentsOptions options) + { + List result = new List(); + ListAssignmentsFilterParameters parameters = new ListAssignmentsFilterParameters(); + + if (options.ADObjectFilter.HasFilter) + { + // Filter first by principal + parameters.PrincipalId = string.IsNullOrEmpty(options.ADObjectFilter.Id) ? ActiveDirectoryClient.GetObjectId(options.ADObjectFilter) : Guid.Parse(options.ADObjectFilter.Id); + result.AddRange(AuthorizationManagementClient.RoleAssignments.List(parameters) + .RoleAssignments.Select(r => r.ToPSRoleAssignment(this, ActiveDirectoryClient))); + + // Filter out by scope + if (!string.IsNullOrEmpty(options.Scope)) + { + result.RemoveAll(r => !options.Scope.StartsWith(r.Scope)); + } + } + else if (!string.IsNullOrEmpty(options.Scope)) + { + // Filter by scope and above directly + parameters.AtScope = true; + result.AddRange(AuthorizationManagementClient.RoleAssignments.ListForScope(options.Scope, parameters) + .RoleAssignments.Select(r => r.ToPSRoleAssignment(this, ActiveDirectoryClient))); + } + else + { + result.AddRange(AuthorizationManagementClient.RoleAssignments.List(parameters) + .RoleAssignments.Select(r => r.ToPSRoleAssignment(this, ActiveDirectoryClient))); + } + + if (!string.IsNullOrEmpty(options.RoleDefinition)) + { + result = result.Where(r => r.RoleDefinitionName.Equals(options.RoleDefinition, StringComparison.OrdinalIgnoreCase)).ToList(); + } + + return result; + } + + /// + /// Deletes a role assignments based on the used options. + /// + /// The role assignment filtering options + /// The deleted role assignments + public PSRoleAssignment RemoveRoleAssignment(FilterRoleAssignmentsOptions options) + { + PSRoleAssignment roleAssignment = FilterRoleAssignments(options).FirstOrDefault(); + + if (roleAssignment != null) + { + AuthorizationManagementClient.RoleAssignments.DeleteById(roleAssignment.RoleAssignmentId); + } + else + { + throw new KeyNotFoundException("The provided information does not map to a role assignment."); + } + + return roleAssignment; + } + + public PSRoleDefinition GetRoleRoleDefinition(string name) + { + PSRoleDefinition role = FilterRoleDefinitions(name).FirstOrDefault(); + + if (role == null) + { + throw new KeyNotFoundException(string.Format(ProjectResources.RoleDefinitionNotFound, name)); + } + + return role; + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/AuthorizationClientExtensions.cs b/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/AuthorizationClientExtensions.cs new file mode 100644 index 000000000000..3d5c1c0ec9ad --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/AuthorizationClientExtensions.cs @@ -0,0 +1,105 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Resources.Models.ActiveDirectory; +using Microsoft.Azure.Management.Authorization.Models; +using System.Collections.Generic; +using System.Linq; + +namespace Microsoft.Azure.Commands.Resources.Models.Authorization +{ + internal static class AuthorizationClientExtensions + { + public static PSRoleDefinition ToPSRoleDefinition(this RoleDefinition role) + { + PSRoleDefinition roleDefinition = null; + + if (role != null) + { + roleDefinition = new PSRoleDefinition + { + Name = role.Properties.RoleName, + Actions = new List(role.Properties.Permissions.SelectMany(r => r.Actions)), + NotActions = new List(role.Properties.Permissions.SelectMany(r => r.NotActions)), + Id = role.Id + }; + } + + return roleDefinition; + } + + public static PSRoleAssignment ToPSRoleAssignment(this RoleAssignment role, AuthorizationClient policyClient, ActiveDirectoryClient activeDirectoryClient) + { + PSRoleDefinition roleDefinition = policyClient.GetRoleDefinition(role.Properties.RoleDefinitionId); + PSADObject adObject = activeDirectoryClient.GetADObject(new ADObjectFilterOptions { Id = role.Properties.PrincipalId.ToString() }) ?? new PSADObject() { Id = role.Properties.PrincipalId }; + + if (adObject is PSADUser) + { + return new PSUserRoleAssignment() + { + RoleAssignmentId = role.Id, + DisplayName = adObject.DisplayName, + Actions = roleDefinition.Actions, + NotActions = roleDefinition.NotActions, + RoleDefinitionName = roleDefinition.Name, + Scope = role.Properties.Scope, + UserPrincipalName = ((PSADUser)adObject).UserPrincipalName, + Mail = ((PSADUser)adObject).Mail, + ObjectId = adObject.Id + }; + } + else if (adObject is PSADGroup) + { + return new PSGroupRoleAssignment() + { + RoleAssignmentId = role.Id, + DisplayName = adObject.DisplayName, + Actions = roleDefinition.Actions, + NotActions = roleDefinition.NotActions, + RoleDefinitionName = roleDefinition.Name, + Scope = role.Properties.Scope, + Mail = ((PSADGroup)adObject).Mail, + ObjectId = adObject.Id + }; + } + else if (adObject is PSADServicePrincipal) + { + return new PSServiceRoleAssignment() + { + RoleAssignmentId = role.Id, + DisplayName = adObject.DisplayName, + Actions = roleDefinition.Actions, + NotActions = roleDefinition.NotActions, + RoleDefinitionName = roleDefinition.Name, + Scope = role.Properties.Scope, + ServicePrincipalName = ((PSADServicePrincipal)adObject).ServicePrincipalName, + ObjectId = adObject.Id + }; + } + else + { + return new PSRoleAssignment() + { + RoleAssignmentId = role.Id, + DisplayName = adObject.DisplayName, + Actions = roleDefinition.Actions, + NotActions = roleDefinition.NotActions, + RoleDefinitionName = roleDefinition.Name, + Scope = role.Properties.Scope, + ObjectId = adObject.Id + }; + } + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/FilterRoleAssignmentsOptions.cs b/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/FilterRoleAssignmentsOptions.cs new file mode 100644 index 000000000000..0aaea2406a38 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/FilterRoleAssignmentsOptions.cs @@ -0,0 +1,57 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Resources.Models.ActiveDirectory; + +namespace Microsoft.Azure.Commands.Resources.Models.Authorization +{ + public class FilterRoleAssignmentsOptions + { + public string RoleDefinition { get; set; } + + private string scope; + + public string Scope + { + get + { + string result; + string resourceIdentifier = ResourceIdentifier.ToString(); + + if (!string.IsNullOrEmpty(scope)) + { + result = scope; + } + else if (!string.IsNullOrEmpty(resourceIdentifier)) + { + result = resourceIdentifier; + } + else + { + result = null; + } + + return result; + } + set + { + scope = value; + } + } + + public ResourceIdentifier ResourceIdentifier { get; set; } + + public ADObjectFilterOptions ADObjectFilter { get; set; } + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/PSGroupRoleAssignment.cs b/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/PSGroupRoleAssignment.cs new file mode 100644 index 000000000000..1cb6bf0d4ee7 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/PSGroupRoleAssignment.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; + +namespace Microsoft.Azure.Commands.Resources.Models.Authorization +{ + public class PSGroupRoleAssignment : PSRoleAssignment + { + public string Mail { get; set; } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/PSPermission.cs b/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/PSPermission.cs new file mode 100644 index 000000000000..dfbee17e2333 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/PSPermission.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; + +namespace Microsoft.Azure.Commands.Resources.Models.Authorization +{ + public class PSPermission + { + public List Actions { get; set; } + + public string ActionsString { get { return string.Join(", ", Actions); } } + + public List NotActions { get; set; } + + public string NotActionsString { get { return string.Join(", ", NotActions); } } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/PSRoleAssignment.cs b/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/PSRoleAssignment.cs new file mode 100644 index 000000000000..f6964f43d899 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/PSRoleAssignment.cs @@ -0,0 +1,36 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; + +namespace Microsoft.Azure.Commands.Resources.Models.Authorization +{ + public class PSRoleAssignment + { + public string RoleAssignmentId { get; set; } + + public string DisplayName { get; set; } + + public string RoleDefinitionName { get; set; } + + public List Actions { get; set; } + + public List NotActions { get; set; } + + public string Scope { get; set; } + + public Guid ObjectId { get; set; } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/PSRoleDefinition.cs b/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/PSRoleDefinition.cs new file mode 100644 index 000000000000..d6b445feff0b --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/PSRoleDefinition.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; + +namespace Microsoft.Azure.Commands.Resources.Models.Authorization +{ + public class PSRoleDefinition + { + public string Name { get; set; } + + public string Id { get; set; } + + public List Actions { get; set; } + + public List NotActions { get; set; } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/PSServiceRoleAssignment.cs b/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/PSServiceRoleAssignment.cs new file mode 100644 index 000000000000..935977a74f97 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/PSServiceRoleAssignment.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; + +namespace Microsoft.Azure.Commands.Resources.Models.Authorization +{ + public class PSServiceRoleAssignment : PSRoleAssignment + { + public string ServicePrincipalName { get; set; } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/PSUserRoleAssignment.cs b/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/PSUserRoleAssignment.cs new file mode 100644 index 000000000000..61e6c72bfd81 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.Authorization/PSUserRoleAssignment.cs @@ -0,0 +1,25 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; + +namespace Microsoft.Azure.Commands.Resources.Models.Authorization +{ + public class PSUserRoleAssignment : PSRoleAssignment + { + public string UserPrincipalName { get; set; } + + public string Mail { get; set; } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/BasePSResourceParameters.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/BasePSResourceParameters.cs new file mode 100644 index 000000000000..4fbea8880a36 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/BasePSResourceParameters.cs @@ -0,0 +1,47 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using Microsoft.Azure.Management.Resources.Models; +using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources; + +namespace Microsoft.Azure.Commands.Resources.Models +{ + public class BasePSResourceParameters + { + public string Name { get; set; } + + public string ResourceGroupName { get; set; } + + public string ResourceType { get; set; } + + public string ParentResource { get; set; } + + public string ApiVersion { get; set; } + + public Hashtable[] Tag { get; set; } + + public ResourceIdentity ToResourceIdentity() + { + return new ResourceIdentifier() + { + ParentResource = ParentResource, + ResourceGroupName = ResourceGroupName, + ResourceName = Name, + ResourceType = ResourceType + }.ToResourceIdentity(ApiVersion); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/CreatePSDeploymentParameters.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/CreatePSDeploymentParameters.cs new file mode 100644 index 000000000000..1b6846854d66 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/CreatePSDeploymentParameters.cs @@ -0,0 +1,22 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +namespace Microsoft.Azure.Commands.Resources.Models +{ + public class CreatePSResourceGroupDeploymentParameters : ValidatePSResourceGroupDeploymentParameters + { + public string DeploymentName { get; set; } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/CreatePSResourceGroupParameters.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/CreatePSResourceGroupParameters.cs new file mode 100644 index 000000000000..7f6e8a6066a0 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/CreatePSResourceGroupParameters.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; + +namespace Microsoft.Azure.Commands.Resources.Models +{ + public class CreatePSResourceGroupParameters : CreatePSResourceGroupDeploymentParameters + { + public string Location { get; set; } + + public bool Force { get; set; } + + public Hashtable[] Tag { get; set; } + + public Action ConfirmAction { get; set; } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/CreatePSResourceParameters.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/CreatePSResourceParameters.cs new file mode 100644 index 000000000000..56071160801b --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/CreatePSResourceParameters.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; + +namespace Microsoft.Azure.Commands.Resources.Models +{ + public class CreatePSResourceParameters : BasePSResourceParameters + { + public string Location { get; set; } + + public Hashtable PropertyObject { get; set; } + + public bool Force { get; set; } + + public Action ConfirmAction { get; set; } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/DeploymentVariable.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/DeploymentVariable.cs new file mode 100644 index 000000000000..cd67ba3e3a9c --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/DeploymentVariable.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Newtonsoft.Json; + +namespace Microsoft.Azure.Commands.Resources.Models +{ + public class DeploymentVariable + { + [JsonProperty("type")] + public string Type { get; set; } + + [JsonProperty("value")] + public object Value { get; set; } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/FilterPSGalleryTemplatesOptions.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/FilterPSGalleryTemplatesOptions.cs new file mode 100644 index 000000000000..9c07b03807a3 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/FilterPSGalleryTemplatesOptions.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Resources.Models +{ + public class FilterGalleryTemplatesOptions + { + public string Identity { get; set; } + + public string Category { get; set; } + + public string Publisher { get; set; } + + public string ApplicationName { get; set; } + + public bool AllVersions { get; set; } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/FilterResourceGroupDeploymentOptions.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/FilterResourceGroupDeploymentOptions.cs new file mode 100644 index 000000000000..59a730cab128 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/FilterResourceGroupDeploymentOptions.cs @@ -0,0 +1,37 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; + +namespace Microsoft.Azure.Commands.Resources.Models +{ + public class FilterResourceGroupDeploymentOptions + { + public string DeploymentName { get; set; } + + public string ResourceGroupName { get; set; } + + public List ProvisioningStates { get; set; } + + public List ExcludedProvisioningStates { get; set; } + + public FilterResourceGroupDeploymentOptions() + { + DeploymentName = null; + ResourceGroupName = null; + ProvisioningStates = new List(); + ExcludedProvisioningStates = new List(); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/FilterResourcesOptions.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/FilterResourcesOptions.cs new file mode 100644 index 000000000000..354aa2af1b23 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/FilterResourcesOptions.cs @@ -0,0 +1,32 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Resources.Models +{ + public class FilterResourcesOptions + { + public string Name { get; set; } + + public string ResourceGroup { get; set; } + + public string ResourceType { get; set; } + + public FilterResourcesOptions() + { + Name = null; + ResourceGroup = null; + ResourceType = null; + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/GalleryTemplatesClient.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/GalleryTemplatesClient.cs new file mode 100644 index 000000000000..dbe14c7bbeba --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/GalleryTemplatesClient.cs @@ -0,0 +1,456 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Security; +using System.Text; +using System.Text.RegularExpressions; + +using Microsoft.Azure.Gallery; +using Microsoft.Azure.Gallery.Models; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Common.OData; +using Newtonsoft.Json; +using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources; + +namespace Microsoft.Azure.Commands.Resources.Models +{ + public class GalleryTemplatesClient + { + public IGalleryClient GalleryClient { get; set; } + + public GalleryTemplatesClient(AzureContext context) + : this(AzureSession.ClientFactory.CreateClient(context, AzureEnvironment.Endpoint.Gallery)) + { + + } + + public GalleryTemplatesClient(IGalleryClient galleryClient) + { + GalleryClient = galleryClient; + } + + /// + /// Parameterless constructor for mocking + /// + public GalleryTemplatesClient() + { + + } + + /// + /// Gets the uri of the specified template name. + /// + /// The fully qualified template name + /// The template uri + public virtual string GetGalleryTemplateFile(string templateIdentity) + { + try + { + DefinitionTemplates definitionTemplates = GalleryClient.Items.Get(templateIdentity).Item.DefinitionTemplates; + return definitionTemplates.DeploymentTemplateFileUrls[definitionTemplates.DefaultDeploymentTemplateId]; + } + catch (CloudException) + { + throw new ArgumentException(string.Format(ProjectResources.InvalidTemplateIdentity, templateIdentity)); + } + } + + /// + /// Filters gallery templates based on the passed options. + /// + /// The filter options + /// The filtered list + public virtual List FilterGalleryTemplates(FilterGalleryTemplatesOptions options) + { + List filterStrings = new List(); + ItemListParameters parameters = null; + List result = new List(); + + if (!string.IsNullOrEmpty(options.Identity)) + { + result.Add(GalleryClient.Items.Get(options.Identity).Item); + } + else + { + result.AddRange(QueryGalleryTemplates(options, filterStrings, parameters)); + } + + if (!options.AllVersions && result.Count > 1) + { + if (!string.IsNullOrEmpty(options.Publisher) && string.IsNullOrEmpty(options.ApplicationName) && string.IsNullOrEmpty(options.Identity)) + { + // we return a list of the most recent templates, for each name. + List latest = new List(); + IEnumerable distinctNames = result.Select(g => g.Name).Distinct(); + foreach (var name in distinctNames) + { + List galleryItems = result.Where(x => x.Name.Equals(name)).ToList(); + GalleryItem recentTemplate = this.MostRecentTemplate(galleryItems); + if (recentTemplate != null) + { + latest.Add(recentTemplate); + } + } + + return latest.Select(i => i.ToPSGalleryItem()).ToList(); + } + + // Take only the most recent version + GalleryItem mostRecentTemplate = MostRecentTemplate(result); + if (mostRecentTemplate != null) + { + return new List() { mostRecentTemplate.ToPSGalleryItem() }; + } + } + + return result.Select(i => i.ToPSGalleryItem()).ToList(); + } + + private GalleryItem MostRecentTemplate(List galleryItems) + { + if (galleryItems == null || galleryItems.Count == 0) + { + return null; + } + + if (galleryItems.Count == 1) + { + return galleryItems[0]; + } + + GalleryItem mostRecent = galleryItems[0]; + foreach (var galleryItem in galleryItems) + { + // if CompareTo is greater then the present galleryItem is a higher version + string galleryItemVersion = galleryItem.Version == null ? "0.0.0.0" : galleryItem.Version.Replace("-preview", string.Empty); + string mostRecentVersion = mostRecent.Version == null ? "0.0.0.0" : mostRecent.Version.Replace("-preview", string.Empty); + galleryItemVersion = galleryItemVersion.Replace("-placeholder", string.Empty); + mostRecentVersion = mostRecentVersion.Replace("-placeholder", string.Empty); + if ((new Version(galleryItemVersion)).CompareTo(new Version(mostRecentVersion)) > 0) + { + mostRecent = galleryItem; + } + } + + return mostRecent; + } + + /// + /// Downloads a gallery template file into specific directory. + /// + /// The gallery template file identity + /// The file output path + /// Overrides existing file + /// The confirmation action + /// The file path + public virtual string DownloadGalleryTemplateFile(string identity, string outputPath, bool overwrite, Action confirmAction) + { + string fileUri = GetGalleryTemplateFile(identity); + StringBuilder finalOutputPath = new StringBuilder(); + string contents = GeneralUtilities.DownloadFile(fileUri); + + if (!FileUtilities.IsValidDirectoryPath(outputPath)) + { + // Try create the directory if it does not exist. + FileUtilities.DataStore.CreateDirectory(Path.GetDirectoryName(outputPath)); + } + + if (FileUtilities.IsValidDirectoryPath(outputPath)) + { + finalOutputPath.Append(Path.Combine(outputPath, identity + ".json")); + } + else + { + finalOutputPath.Append(outputPath); + if (!outputPath.EndsWith(".json")) + { + finalOutputPath.Append(".json"); + } + } + + Action saveFile = () => FileUtilities.DataStore.WriteFile(finalOutputPath.ToString(), contents); + + if (FileUtilities.DataStore.FileExists(finalOutputPath.ToString()) && confirmAction != null) + { + confirmAction( + overwrite, + string.Format(ProjectResources.FileAlreadyExists, finalOutputPath.ToString()), + ProjectResources.OverrdingFile, + finalOutputPath.ToString(), + saveFile); + } + else + { + saveFile(); + } + + return finalOutputPath.ToString(); + } + + /// + /// Gets the parameters for a given gallery template. + /// + /// The gallery template name + /// Existing template parameter object + /// Path to the template parameter file if present + /// The existing PowerShell cmdlet parameters + /// The template parameters + public virtual RuntimeDefinedParameterDictionary GetTemplateParametersFromGallery(string templateIdentity, Hashtable templateParameterObject, string templateParameterFilePath, string[] staticParameters) + { + RuntimeDefinedParameterDictionary dynamicParameters = new RuntimeDefinedParameterDictionary(); + string templateContent = null; + + templateContent = GeneralUtilities.DownloadFile(GetGalleryTemplateFile(templateIdentity)); + + dynamicParameters = ParseTemplateAndExtractParameters(templateContent, templateParameterObject, templateParameterFilePath, staticParameters); + return dynamicParameters; + } + + /// + /// Gets the parameters for a given template file. + /// + /// The gallery template path (local or remote) + /// Existing template parameter object + /// Path to the template parameter file if present + /// The existing PowerShell cmdlet parameters + /// The template parameters + public virtual RuntimeDefinedParameterDictionary GetTemplateParametersFromFile(string templateFilePath, Hashtable templateParameterObject, string templateParameterFilePath, string[] staticParameters) + { + RuntimeDefinedParameterDictionary dynamicParameters = new RuntimeDefinedParameterDictionary(); + string templateContent = null; + + if (templateFilePath != null) + { + if (Uri.IsWellFormedUriString(templateFilePath, UriKind.Absolute)) + { + templateContent = GeneralUtilities.DownloadFile(templateFilePath); + } + else if (FileUtilities.DataStore.FileExists(templateFilePath)) + { + templateContent = FileUtilities.DataStore.ReadFileAsText(templateFilePath); + } + } + + dynamicParameters = ParseTemplateAndExtractParameters(templateContent, templateParameterObject, templateParameterFilePath, staticParameters); + + return dynamicParameters; + } + + public Dictionary ParseTemplateParameterFileContents(string templateParameterFilePath) + { + Dictionary parameters = new Dictionary(); + + if (!string.IsNullOrEmpty(templateParameterFilePath) && FileUtilities.DataStore.FileExists(templateParameterFilePath)) + { + try + { + parameters = JsonConvert.DeserializeObject>(FileUtilities.DataStore.ReadFileAsText(templateParameterFilePath)); + } + catch (JsonSerializationException) + { + parameters = new Dictionary( + JsonConvert.DeserializeObject(FileUtilities.DataStore.ReadFileAsText(templateParameterFilePath)).Parameters); + } + } + + return parameters; + } + + private RuntimeDefinedParameterDictionary ParseTemplateAndExtractParameters(string templateContent, Hashtable templateParameterObject, string templateParameterFilePath, string[] staticParameters) + { + RuntimeDefinedParameterDictionary dynamicParameters = new RuntimeDefinedParameterDictionary(); + + if (!string.IsNullOrEmpty(templateContent)) + { + TemplateFile templateFile = null; + + try + { + templateFile = JsonConvert.DeserializeObject(templateContent); + } + catch + { + // Can't parse the template file, do not generate dynamic parameters + return dynamicParameters; + } + + foreach (KeyValuePair parameter in templateFile.Parameters) + { + RuntimeDefinedParameter dynamicParameter = ConstructDynamicParameter(staticParameters, parameter); + dynamicParameters.Add(dynamicParameter.Name, dynamicParameter); + } + } + if (templateParameterObject != null) + { + UpdateParametersWithObject(dynamicParameters, templateParameterObject); + } + if (templateParameterFilePath != null && FileUtilities.DataStore.FileExists(templateParameterFilePath)) + { + var parametersFromFile = ParseTemplateParameterFileContents(templateParameterFilePath); + UpdateParametersWithObject(dynamicParameters, new Hashtable(parametersFromFile)); + } + return dynamicParameters; + } + + private void UpdateParametersWithObject(RuntimeDefinedParameterDictionary dynamicParameters, Hashtable templateParameterObject) + { + if (templateParameterObject != null) + { + foreach (KeyValuePair dynamicParameter in dynamicParameters) + { + try + { + foreach (string key in templateParameterObject.Keys) + { + if (key.Equals(dynamicParameter.Key, StringComparison.InvariantCultureIgnoreCase)) + { + if (templateParameterObject[key] is TemplateFileParameterV1) + { + dynamicParameter.Value.Value = (templateParameterObject[key] as TemplateFileParameterV1).Value; + } + else + { + dynamicParameter.Value.Value = templateParameterObject[key]; + } + dynamicParameter.Value.IsSet = true; + ((ParameterAttribute)dynamicParameter.Value.Attributes[0]).Mandatory = false; + } + } + } + catch + { + throw new ArgumentException(string.Format(ProjectResources.FailureParsingTemplateParameterObject, + dynamicParameter.Key, + templateParameterObject[dynamicParameter.Key])); + } + } + } + } + + private Type GetParameterType(string resourceParameterType) + { + Debug.Assert(!string.IsNullOrEmpty(resourceParameterType)); + const string stringType = "string"; + const string intType = "int"; + const string boolType = "bool"; + const string secureStringType = "SecureString"; + Type typeObject = typeof(object); + + if (resourceParameterType.Equals(stringType, StringComparison.OrdinalIgnoreCase)) + { + typeObject = typeof(string); + } + else if (resourceParameterType.Equals(intType, StringComparison.OrdinalIgnoreCase)) + { + typeObject = typeof(int); + } + else if (resourceParameterType.Equals(secureStringType, StringComparison.OrdinalIgnoreCase)) + { + typeObject = typeof(SecureString); + } + else if (resourceParameterType.Equals(boolType, StringComparison.OrdinalIgnoreCase)) + { + typeObject = typeof(bool); + } + + return typeObject; + } + + internal RuntimeDefinedParameter ConstructDynamicParameter(string[] staticParameters, KeyValuePair parameter) + { + const string duplicatedParameterSuffix = "FromTemplate"; + string name = parameter.Key; + object defaultValue = parameter.Value.DefaultValue; + + RuntimeDefinedParameter runtimeParameter = new RuntimeDefinedParameter() + { + // For duplicated template parameter names, add a suffix FromTemplate to distinguish them from the cmdlet parameter. + Name = staticParameters.Any(n => n.StartsWith(name, StringComparison.OrdinalIgnoreCase)) + ? name + duplicatedParameterSuffix : name, + ParameterType = GetParameterType(parameter.Value.Type), + Value = defaultValue + }; + runtimeParameter.Attributes.Add(new ParameterAttribute() + { + Mandatory = defaultValue == null ? true : false, + ValueFromPipelineByPropertyName = true, + // Rely on the HelpMessage property to detect the original name for the dynamic parameter. + HelpMessage = name + }); + + if (parameter.Value.AllowedValues != null && parameter.Value.AllowedValues.Count > 0) + { + runtimeParameter.Attributes.Add(new ValidateSetAttribute(parameter.Value.AllowedValues.ToArray()) + { + IgnoreCase = true, + }); + } + + if (!string.IsNullOrEmpty(parameter.Value.MinLength) && + !string.IsNullOrEmpty(parameter.Value.MaxLength)) + { + runtimeParameter.Attributes.Add(new ValidateLengthAttribute(int.Parse(parameter.Value.MinLength), int.Parse(parameter.Value.MaxLength))); + } + + return runtimeParameter; + } + + private List QueryGalleryTemplates(FilterGalleryTemplatesOptions options, List filterStrings, ItemListParameters parameters) + { + if (!string.IsNullOrEmpty(options.Publisher)) + { + filterStrings.Add(FilterString.Generate(f => f.Publisher == options.Publisher)); + } + + if (!string.IsNullOrEmpty(options.Category)) + { + filterStrings.Add(FilterString.Generate(f => f.CategoryIds.Contains(options.Category))); + } + + if (filterStrings.Count > 0) + { + parameters = new ItemListParameters() { Filter = string.Join(" and ", filterStrings) }; + } + + List galleryItems = GalleryClient.Items.List(parameters).Items.ToList(); + if (!string.IsNullOrEmpty(options.ApplicationName)) + { + List result = new List(); + string wildcardApplicationName = Regex.Escape(options.ApplicationName).Replace(@"\*", ".*").Replace(@"\?", "."); + Regex regex = new Regex(wildcardApplicationName, RegexOptions.IgnoreCase); + foreach (var galleryItem in galleryItems) + { + if (regex.IsMatch(galleryItem.Name)) + { + result.Add(galleryItem); + } + } + + return result; + } + + return galleryItems; + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/GetPSResourceGroupLogParameters.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/GetPSResourceGroupLogParameters.cs new file mode 100644 index 000000000000..bbb55112a2c4 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/GetPSResourceGroupLogParameters.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +namespace Microsoft.Azure.Commands.Resources.Models +{ + public class GetPSResourceGroupLogParameters + { + public string Name { get; set; } + + public string DeploymentName { get; set; } + + public bool All { get; set; } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSDeploymentEventData.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSDeploymentEventData.cs new file mode 100644 index 000000000000..e12bb9293992 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSDeploymentEventData.cs @@ -0,0 +1,99 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text; + +namespace Microsoft.Azure.Commands.Resources.Models +{ + public class PSDeploymentEventData + { + public string EventId { get; set; } + + public string EventName { get; set; } + + public string EventSource { get; set; } + + public string Channels { get; set; } + + public string Level { get; set; } + + public string Description { get; set; } + + public DateTime Timestamp { get; set; } + + public string OperationId { get; set; } + + public string OperationName { get; set; } + + public string Status { get; set; } + + public string SubscriptionId { get; set; } + + public string SubStatus { get; set; } + + public string Caller { get; set; } + + public string CorrelationId { get; set; } + + public string ResourceGroupName { get; set; } + + public string ResourceProvider { get; set; } + + public string ResourceUri { get; set; } + + public PSDeploymentEventDataHttpRequest HttpRequest { get; set; } + + public PSDeploymentEventDataAuthorization Authorization { get; set; } + + public Dictionary Claims { get; set; } + + public string ClaimsText + { + get + { + StringBuilder output = new StringBuilder(); + if (Claims != null) + { + output.AppendLine(); + foreach (var keyValuePair in Claims) + { + output.AppendLine(string.Format("{0, -15}: {1}", keyValuePair.Key, keyValuePair.Value)); + } + } + return output.ToString(); + } + } + + public Dictionary Properties { get; set; } + + public string PropertiesText + { + get + { + StringBuilder output = new StringBuilder(); + if (Properties != null) + { + output.AppendLine(); + foreach (var keyValuePair in Properties) + { + output.AppendLine(string.Format("{0, -15}: {1}", keyValuePair.Key, keyValuePair.Value)); + } + } + return output.ToString(); + } + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSDeploymentEventDataAuthorization.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSDeploymentEventDataAuthorization.cs new file mode 100644 index 000000000000..3755bfc76035 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSDeploymentEventDataAuthorization.cs @@ -0,0 +1,40 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Text; + +namespace Microsoft.Azure.Commands.Resources.Models +{ + public class PSDeploymentEventDataAuthorization + { + public string Scope { get; set; } + + public string Action { get; set; } + + public string Role { get; set; } + + public string Condition { get; set; } + + public override string ToString() + { + StringBuilder output = new StringBuilder(); + output.AppendLine(); + output.AppendLine("Scope : " + Scope); + output.AppendLine("Action : " + Action); + output.AppendLine("Role : " + Role); + output.AppendLine("Condition : " + Condition); + return output.ToString(); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSDeploymentEventDataHttpRequest.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSDeploymentEventDataHttpRequest.cs new file mode 100644 index 000000000000..ca37be5f9fa4 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSDeploymentEventDataHttpRequest.cs @@ -0,0 +1,40 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Text; + +namespace Microsoft.Azure.Commands.Resources.Models +{ + public class PSDeploymentEventDataHttpRequest + { + public string ClientId { get; set; } + + public string Method { get; set; } + + public string Url { get; set; } + + public string ClientIpAddress { get; set; } + + public override string ToString() + { + StringBuilder output = new StringBuilder(); + output.AppendLine(); + output.AppendLine("ClientId : " + ClientId); + output.AppendLine("Method : " + Method); + output.AppendLine("Url : " + Url); + output.AppendLine("ClientIpAddress : " + ClientIpAddress); + return output.ToString(); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSGalleryItem.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSGalleryItem.cs new file mode 100644 index 000000000000..4e8949c3b6e8 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSGalleryItem.cs @@ -0,0 +1,38 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Gallery; + +namespace Microsoft.Azure.Commands.Resources.Models +{ + public class PSGalleryItem : GalleryItem + { + public string DefinitionTemplatesText + { + get + { + if (DefinitionTemplates != null && + DefinitionTemplates.DeploymentTemplateFileUrls != null && + DefinitionTemplates.DeploymentTemplateFileUrls.ContainsKey(DefinitionTemplates.DefaultDeploymentTemplateId)) + { + return DefinitionTemplates.DeploymentTemplateFileUrls[DefinitionTemplates.DefaultDeploymentTemplateId]; + } + else + { + return null; + } + } + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSResource.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSResource.cs new file mode 100644 index 000000000000..e5782dd91731 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSResource.cs @@ -0,0 +1,55 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Resources.Models.Authorization; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.Commands.Resources.Models +{ + public class PSResource + { + public string Name { get; set; } + + public string ResourceGroupName { get; set; } + + public string ResourceType { get; set; } + + public string ParentResource { get; set; } + + public string Location { get; set; } + + public IDictionary Properties { get; set; } + + public string PropertiesText { get; set; } + + public List Permissions { get; set; } + + public string PermissionsTable + { + get { return ResourcesExtensions.ConstructPermissionsTable(Permissions); } + } + + public string ApiVersion { get; set; } + + public Hashtable[] Tags { get; set; } + + public string TagsTable + { + get { return ResourcesExtensions.ConstructTagsTable(Tags); } + } + + public string ResourceId { get; set; } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSResourceGroup.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSResourceGroup.cs new file mode 100644 index 000000000000..363ee69cc215 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSResourceGroup.cs @@ -0,0 +1,52 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Resources.Models.Authorization; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.Commands.Resources.Models +{ + public class PSResourceGroup + { + public string ResourceGroupName { get; set; } + + public string Location { get; set; } + + public List Resources { get; set; } + + public string ResourcesTable + { + get { return ResourcesExtensions.ConstructResourcesTable(Resources); } + } + + public string ProvisioningState { get; set; } + + public List Permissions { get; set; } + + public string PermissionsTable + { + get { return ResourcesExtensions.ConstructPermissionsTable(Permissions); } + } + + public Hashtable[] Tags { get; set; } + + public string TagsTable + { + get { return ResourcesExtensions.ConstructTagsTable(Tags); } + } + + public string ResourceId { get; set; } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSResourceGroupDeployment.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSResourceGroupDeployment.cs new file mode 100644 index 000000000000..0a90444d652a --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSResourceGroupDeployment.cs @@ -0,0 +1,53 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Microsoft.Azure.Management.Resources.Models; + +namespace Microsoft.Azure.Commands.Resources.Models +{ + public class PSResourceGroupDeployment + { + public string DeploymentName { get; set; } + + public string CorrelationId { get; set; } + + public string ResourceGroupName { get; set; } + + public string ProvisioningState { get; set; } + + public DateTime Timestamp { get; set; } + + public DeploymentMode Mode { get; set; } + + public TemplateLink TemplateLink { get; set; } + + public string TemplateLinkString { get; set; } + + public Dictionary Parameters { get; set; } + + public string ParametersString + { + get { return ResourcesExtensions.ConstructDeploymentVariableTable(Parameters); } + } + + public Dictionary Outputs { get; set; } + + public string OutputsString + { + get { return ResourcesExtensions.ConstructDeploymentVariableTable(Outputs); } + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSResourceManagerError.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSResourceManagerError.cs new file mode 100644 index 000000000000..a2b008a3e713 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSResourceManagerError.cs @@ -0,0 +1,24 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +namespace Microsoft.Azure.Commands.Resources.Models +{ + public class PSResourceManagerError + { + public string Code { get; set; } + + public string Message { get; set; } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSResourceProviderType.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSResourceProviderType.cs new file mode 100644 index 000000000000..429b355a2d22 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSResourceProviderType.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; + +namespace Microsoft.Azure.Commands.Resources.Models +{ + public class PSResourceProviderType + { + public string Name { get; set; } + + public List Locations { get; set; } + + public string LocationsString { get; set; } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSTagValuePair.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSTagValuePair.cs new file mode 100644 index 000000000000..7915fae7d2de --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/PSTagValuePair.cs @@ -0,0 +1,22 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Resources.Models +{ + public class PSTagValuePair + { + public string Name { get; set; } + public string Value { get; set; } + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceBaseCmdlet.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceBaseCmdlet.cs new file mode 100644 index 000000000000..8bed6324c48d --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceBaseCmdlet.cs @@ -0,0 +1,38 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Resources.Models; +using System.Management.Automation; + +namespace Microsoft.Azure.Commands.Resources +{ + public abstract class ResourceBaseCmdlet : ResourcesBaseCmdlet + { + [Alias("ResourceName")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource name.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group name.")] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource type. In the format ResourceProvider/type.")] + [ValidateNotNullOrEmpty] + public string ResourceType { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the parent resource if needed. In the format of greatgranda/grandpa/dad.")] + public string ParentResource { get; set; } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.Events.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.Events.cs new file mode 100644 index 000000000000..dd7ff94dbb7c --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.Events.cs @@ -0,0 +1,103 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.Azure.Management.Resources; +using Microsoft.Azure.Management.Resources.Models; +using Microsoft.WindowsAzure.Management.Monitoring.Events; +using Microsoft.WindowsAzure.Management.Monitoring.Events.Models; +using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources; + +namespace Microsoft.Azure.Commands.Resources.Models +{ + public partial class ResourcesClient + { + private const int EventRetentionPeriod = 89; + + /// + /// Gets event logs. + /// + /// Input parameters + /// Logs. + public virtual IEnumerable GetResourceGroupLogs(GetPSResourceGroupLogParameters parameters) + { + if (parameters.All) + { + EventDataListResponse listOfEvents = + EventsClient.EventData.ListEventsForResourceGroup(new ListEventsForResourceGroupParameters + { + ResourceGroupName = parameters.Name, + StartTime = DateTime.UtcNow - TimeSpan.FromDays(EventRetentionPeriod), + EndTime = DateTime.UtcNow + }); + return listOfEvents.EventDataCollection.Value.Select(e => e.ToPSDeploymentEventData()); + } + else if (!string.IsNullOrEmpty(parameters.DeploymentName)) + { + DeploymentGetResult deploymentGetResult; + try + { + deploymentGetResult = ResourceManagementClient.Deployments.Get(parameters.Name, + parameters.DeploymentName); + } + catch + { + throw new ArgumentException(string.Format(ProjectResources.DeploymentWithNameNotFound, parameters.DeploymentName)); + } + + return GetDeploymentLogs(deploymentGetResult.Deployment.Properties.CorrelationId); + } + else + { + DeploymentListResult deploymentListResult; + try + { + deploymentListResult = ResourceManagementClient.Deployments.List(parameters.Name, + new DeploymentListParameters + { + Top = 1 + }); + if (deploymentListResult.Deployments.Count == 0) + { + throw new ArgumentException(string.Format(ProjectResources.NoDeploymentWereFound, parameters.Name)); + } + } + catch + { + throw new ArgumentException(string.Format(ProjectResources.NoDeploymentWereFound, parameters.Name)); + } + + return GetDeploymentLogs(deploymentListResult.Deployments[0].Properties.CorrelationId); + } + } + + /// + /// Gets event logs by tracking Id. + /// + /// CorrelationId Id of the deployment + /// Logs. + public virtual IEnumerable GetDeploymentLogs(string correlationId) + { + EventDataListResponse listOfEvents = EventsClient.EventData.ListEventsForCorrelationId(new ListEventsForCorrelationIdParameters + { + CorrelationId = correlationId, + StartTime = DateTime.UtcNow - TimeSpan.FromDays(EventRetentionPeriod), + EndTime = DateTime.UtcNow + }); + return listOfEvents.EventDataCollection.Value.Select(e => e.ToPSDeploymentEventData()); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.ResourceManager.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.ResourceManager.cs new file mode 100644 index 000000000000..999112c845b5 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.ResourceManager.cs @@ -0,0 +1,599 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using Microsoft.Azure.Management.Resources; +using Microsoft.Azure.Management.Resources.Models; +using Microsoft.WindowsAzure; +using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources; + +namespace Microsoft.Azure.Commands.Resources.Models +{ + public partial class ResourcesClient + { + public const string ResourceGroupTypeName = "ResourceGroup"; + + public static List KnownLocations = new List + { + "East Asia", "South East Asia", "East US", "West US", "North Central US", + "South Central US", "Central US", "North Europe", "West Europe" + }; + + internal static List KnownLocationsNormalized = KnownLocations + .Select(loc => loc.ToLower().Replace(" ", "")).ToList(); + + /// + /// Creates a new resource. + /// + /// The create parameters + /// The created resource + public virtual PSResource CreatePSResource(CreatePSResourceParameters parameters) + { + ResourceIdentity resourceIdentity = parameters.ToResourceIdentity(); + + if (ResourceManagementClient.ResourceGroups.CheckExistence(parameters.ResourceGroupName).Exists) + { + WriteVerbose(string.Format("Resource group \"{0}\" is found.", parameters.ResourceGroupName)); + } + else + { + parameters.ConfirmAction(parameters.Force, + ProjectResources.ResourceGroupDoesntExistsAdd, + ProjectResources.AddingResourceGroup, + parameters.Name, + () => CreateOrUpdateResourceGroup(parameters.ResourceGroupName, parameters.Location, null)); + + if (!ResourceManagementClient.ResourceGroups.CheckExistence(parameters.ResourceGroupName).Exists) + { + throw new ArgumentException(ProjectResources.ResourceGroupDoesntExists); + } + else + { + WriteVerbose(string.Format("Created resource group '{0}' in location '{1}'", parameters.Name, parameters.Location)); + } + } + + bool resourceExists = ResourceManagementClient.Resources.CheckExistence(parameters.ResourceGroupName, resourceIdentity).Exists; + + Action createOrUpdateResource = () => + { + WriteVerbose(string.Format("Creating resource \"{0}\" started.", parameters.Name)); + + Dictionary tagDictionary = TagsConversionHelper.CreateTagDictionary(parameters.Tag, validate: true); + + ResourceCreateOrUpdateResult createOrUpdateResult = ResourceManagementClient.Resources.CreateOrUpdate(parameters.ResourceGroupName, + resourceIdentity, + new BasicResource + { + Location = parameters.Location, + Properties = SerializeHashtable(parameters.PropertyObject, addValueLayer: false), + Tags = tagDictionary + }); + + if (createOrUpdateResult.Resource != null) + { + WriteVerbose(string.Format("Creating resource \"{0}\" complete.", parameters.Name)); + } + }; + + if (resourceExists && !parameters.Force) + { + parameters.ConfirmAction(parameters.Force, + ProjectResources.ResourceAlreadyExists, + ProjectResources.NewResourceMessage, + parameters.Name, + createOrUpdateResource); + } + else + { + createOrUpdateResource(); + } + + ResourceGetResult getResult = ResourceManagementClient.Resources.Get(parameters.ResourceGroupName, resourceIdentity); + + return getResult.Resource.ToPSResource(this, false); + } + + /// + /// Updates an existing resource. + /// + /// The update parameters + /// The updated resource + public virtual PSResource UpdatePSResource(UpdatePSResourceParameters parameters) + { + ResourceIdentity resourceIdentity = parameters.ToResourceIdentity(); + + ResourceGetResult getResource; + + try + { + getResource = ResourceManagementClient.Resources.Get(parameters.ResourceGroupName, + resourceIdentity); + } + catch (CloudException) + { + throw new ArgumentException(ProjectResources.ResourceDoesntExists); + } + + string newProperty = SerializeHashtable(parameters.PropertyObject, + addValueLayer: false); + + Dictionary tagDictionary = TagsConversionHelper.CreateTagDictionary(parameters.Tag, validate: true); + + ResourceManagementClient.Resources.CreateOrUpdate(parameters.ResourceGroupName, resourceIdentity, + new BasicResource + { + Location = getResource.Resource.Location, + Properties = newProperty, + Tags = tagDictionary + }); + + ResourceGetResult getResult = ResourceManagementClient.Resources.Get(parameters.ResourceGroupName, resourceIdentity); + + return getResult.Resource.ToPSResource(this, false); + } + + /// + /// Get an existing resource or resources. + /// + /// The get parameters + /// List of resources + public virtual List FilterPSResources(BasePSResourceParameters parameters) + { + List resources = new List(); + + if (!string.IsNullOrEmpty(parameters.Name)) + { + ResourceIdentity resourceIdentity = parameters.ToResourceIdentity(); + + ResourceGetResult getResult; + + try + { + getResult = ResourceManagementClient.Resources.Get(parameters.ResourceGroupName, resourceIdentity); + } + catch (CloudException) + { + throw new ArgumentException(ProjectResources.ResourceDoesntExists); + } + + resources.Add(getResult.Resource.ToPSResource(this, false)); + } + else + { + PSTagValuePair tagValuePair = new PSTagValuePair(); + if (parameters.Tag != null && parameters.Tag.Length == 1 && parameters.Tag[0] != null) + { + tagValuePair = TagsConversionHelper.Create(parameters.Tag[0]); + if (tagValuePair == null) + { + throw new ArgumentException(ProjectResources.InvalidTagFormat); + } + } + ResourceListResult listResult = ResourceManagementClient.Resources.List(new ResourceListParameters + { + ResourceGroupName = parameters.ResourceGroupName, + ResourceType = parameters.ResourceType, + TagName = tagValuePair.Name, + TagValue = tagValuePair.Value + }); + + if (listResult.Resources != null) + { + resources.AddRange(listResult.Resources.Select(r => r.ToPSResource(this, false))); + } + } + return resources; + } + + /// + /// Creates a new resource group and deployment using the passed template file option which + /// can be user customized or from gallery templates. + /// + /// The create parameters + /// The created resource group + public virtual PSResourceGroup CreatePSResourceGroup(CreatePSResourceGroupParameters parameters) + { + bool createDeployment = !string.IsNullOrEmpty(parameters.GalleryTemplateIdentity) || !string.IsNullOrEmpty(parameters.TemplateFile); + bool resourceExists = ResourceManagementClient.ResourceGroups.CheckExistence(parameters.ResourceGroupName).Exists; + + ResourceGroup resourceGroup = null; + Action createOrUpdateResourceGroup = () => + { + resourceGroup = CreateOrUpdateResourceGroup(parameters.ResourceGroupName, parameters.Location, parameters.Tag); + WriteVerbose(string.Format("Created resource group '{0}' in location '{1}'", resourceGroup.Name, resourceGroup.Location)); + + if (createDeployment) + { + ExecuteDeployment(parameters); + } + }; + + if (resourceExists && !parameters.Force) + { + parameters.ConfirmAction(parameters.Force, + ProjectResources.ResourceGroupAlreadyExists, + ProjectResources.NewResourceGroupMessage, + parameters.DeploymentName, + createOrUpdateResourceGroup); + resourceGroup = ResourceManagementClient.ResourceGroups.Get(parameters.ResourceGroupName).ResourceGroup; + } + else + { + createOrUpdateResourceGroup(); + } + + return resourceGroup.ToPSResourceGroup(this, true); + } + + /// + /// Updates a resource group. + /// + /// The create parameters + /// The created resource group + public virtual PSResourceGroup UpdatePSResourceGroup(UpdatePSResourceGroupParameters parameters) + { + ResourceGroup resourceGroup = ResourceManagementClient.ResourceGroups.Get(parameters.ResourceGroupName).ResourceGroup; + + resourceGroup = CreateOrUpdateResourceGroup(parameters.ResourceGroupName, resourceGroup.Location, parameters.Tag); + WriteVerbose(string.Format("Updated resource group '{0}' in location '{1}'", resourceGroup.Name, resourceGroup.Location)); + + return resourceGroup.ToPSResourceGroup(this, true); + } + + /// + /// Filters a given resource group resources. + /// + /// The filtering options + /// The filtered set of resources matching the filter criteria + public virtual List FilterResources(FilterResourcesOptions options) + { + List resources = new List(); + + if (!string.IsNullOrEmpty(options.ResourceGroup) && !string.IsNullOrEmpty(options.Name)) + { + resources.Add(ResourceManagementClient.Resources.Get(options.ResourceGroup, + new ResourceIdentity { ResourceName = options.Name }).Resource); + } + else + { + ResourceListResult result = ResourceManagementClient.Resources.List(new ResourceListParameters + { + ResourceGroupName = options.ResourceGroup, + ResourceType = options.ResourceType + }); + + resources.AddRange(result.Resources); + + while (!string.IsNullOrEmpty(result.NextLink)) + { + result = ResourceManagementClient.Resources.ListNext(result.NextLink); + resources.AddRange(result.Resources); + } + } + + return resources; + } + + /// + /// Creates new deployment using the passed template file which can be user customized or + /// from gallery templates. + /// + /// The create deployment parameters + /// The created deployment instance + public virtual PSResourceGroupDeployment ExecuteDeployment(CreatePSResourceGroupDeploymentParameters parameters) + { + parameters.DeploymentName = GenerateDeploymentName(parameters); + BasicDeployment deployment = CreateBasicDeployment(parameters); + TemplateValidationInfo validationInfo = CheckBasicDeploymentErrors(parameters.ResourceGroupName, parameters.DeploymentName, deployment); + + if (validationInfo.Errors.Count != 0) + { + int counter = 1; + string errorFormat = "Error {0}: Code={1}; Message={2}\r\n"; + StringBuilder errorsString = new StringBuilder(); + validationInfo.Errors.ForEach(e => errorsString.AppendFormat(errorFormat, counter++, e.Code, e.Message)); + throw new ArgumentException(errorsString.ToString()); + } + else + { + WriteVerbose(ProjectResources.TemplateValid); + } + + if (!string.IsNullOrEmpty(parameters.StorageAccountName)) + { + WriteWarning("The StorageAccountName parameter is no longer used and will be removed in a future release. Please update scripts to remove this parameter."); + } + + ResourceManagementClient.Deployments.CreateOrUpdate(parameters.ResourceGroupName, parameters.DeploymentName, deployment); + WriteVerbose(string.Format("Create template deployment '{0}'.", parameters.DeploymentName)); + Deployment result = ProvisionDeploymentStatus(parameters.ResourceGroupName, parameters.DeploymentName, deployment); + + return result.ToPSResourceGroupDeployment(parameters.ResourceGroupName); + } + + private string GenerateDeploymentName(CreatePSResourceGroupDeploymentParameters parameters) + { + if (!string.IsNullOrEmpty(parameters.DeploymentName)) + { + return parameters.DeploymentName; + } + else if (!string.IsNullOrEmpty(parameters.TemplateFile)) + { + return Path.GetFileNameWithoutExtension(parameters.TemplateFile); + } + else if (!string.IsNullOrEmpty(parameters.GalleryTemplateIdentity)) + { + return parameters.GalleryTemplateIdentity; + } + else + { + return Guid.NewGuid().ToString(); + } + } + + /// + /// Filters the subscription's resource groups. + /// + /// The resource group name. + /// The resource group tag. + /// The filtered resource groups + public virtual List FilterResourceGroups(string name, Hashtable tag, bool detailed) + { + List result = new List(); + if (string.IsNullOrEmpty(name)) + { + var response = ResourceManagementClient.ResourceGroups.List(null); + List resourceGroups = ResourceManagementClient.ResourceGroups.List(null).ResourceGroups.ToList(); + + while (!string.IsNullOrEmpty(response.NextLink)) + { + resourceGroups.AddRange(response.ResourceGroups); + } + + // TODO: Replace with server side filtering when available + if (tag != null && tag.Count >= 1) + { + PSTagValuePair tagValuePair = TagsConversionHelper.Create(tag); + if (tagValuePair == null) + { + throw new ArgumentException(ProjectResources.InvalidTagFormat); + } + if (string.IsNullOrEmpty(tagValuePair.Value)) + { + resourceGroups = + resourceGroups.Where(rg => rg.Tags != null + && rg.Tags.Keys.Contains(tagValuePair.Name, + StringComparer.OrdinalIgnoreCase)) + .Select(rg => rg).ToList(); + } + else + { + resourceGroups = + resourceGroups.Where(rg => rg.Tags != null && rg.Tags.Keys.Contains(tagValuePair.Name, + StringComparer.OrdinalIgnoreCase)) + .Where(rg => rg.Tags.Values.Contains(tagValuePair.Value, + StringComparer.OrdinalIgnoreCase)) + .Select(rg => rg).ToList(); + } + } + result.AddRange(resourceGroups.Select(rg => rg.ToPSResourceGroup(this, detailed))); + } + else + { + try + { + result.Add(ResourceManagementClient.ResourceGroups.Get(name).ResourceGroup.ToPSResourceGroup(this, detailed)); + } + catch (CloudException) + { + throw new ArgumentException(ProjectResources.ResourceGroupDoesntExists); + } + } + + return result; + } + + /// + /// Deletes a given resource + /// + /// The resource identification + public virtual void DeleteResource(BasePSResourceParameters parameters) + { + ResourceIdentity resourceIdentity = parameters.ToResourceIdentity(); + + if (!ResourceManagementClient.Resources.CheckExistence(parameters.ResourceGroupName, resourceIdentity).Exists) + { + throw new ArgumentException(ProjectResources.ResourceDoesntExists); + } + + ResourceManagementClient.Resources.Delete(parameters.ResourceGroupName, resourceIdentity); + } + + /// + /// Deletes a given resource group + /// + /// The resource group name + public virtual void DeleteResourceGroup(string name) + { + if (!ResourceManagementClient.ResourceGroups.CheckExistence(name).Exists) + { + throw new ArgumentException(ProjectResources.ResourceGroupDoesntExists); + } + + ResourceManagementClient.ResourceGroups.Delete(name); + } + + /// + /// Filters the resource group deployments + /// + /// The filtering options + /// The filtered list of deployments + public virtual List FilterResourceGroupDeployments(FilterResourceGroupDeploymentOptions options) + { + List deployments = new List(); + string resourceGroup = options.ResourceGroupName; + string name = options.DeploymentName; + List excludedProvisioningStates = options.ExcludedProvisioningStates ?? new List(); + List provisioningStates = options.ProvisioningStates ?? new List(); + + if (!string.IsNullOrEmpty(resourceGroup) && !string.IsNullOrEmpty(name)) + { + deployments.Add(ResourceManagementClient.Deployments.Get(resourceGroup, name).ToPSResourceGroupDeployment(options.ResourceGroupName)); + } + else if (!string.IsNullOrEmpty(resourceGroup)) + { + DeploymentListParameters parameters = new DeploymentListParameters(); + + if (provisioningStates.Count == 1) + { + parameters.ProvisioningState = provisioningStates.First(); + } + + DeploymentListResult result = ResourceManagementClient.Deployments.List(resourceGroup, parameters); + + deployments.AddRange(result.Deployments.Select(d => d.ToPSResourceGroupDeployment(options.ResourceGroupName))); + + while (!string.IsNullOrEmpty(result.NextLink)) + { + result = ResourceManagementClient.Deployments.ListNext(result.NextLink); + deployments.AddRange(result.Deployments.Select(d => d.ToPSResourceGroupDeployment(options.ResourceGroupName))); + } + } + + if (provisioningStates.Count > 1) + { + return deployments.Where(d => provisioningStates + .Any(s => s.Equals(d.ProvisioningState, StringComparison.OrdinalIgnoreCase))).ToList(); + } + else if (provisioningStates.Count == 0 && excludedProvisioningStates.Count > 0) + { + return deployments.Where(d => excludedProvisioningStates + .All(s => !s.Equals(d.ProvisioningState, StringComparison.OrdinalIgnoreCase))).ToList(); + } + else + { + return deployments; + } + } + + /// + /// Cancels the active deployment. + /// + /// The resource group name + /// Deployment name + public virtual void CancelDeployment(string resourceGroup, string deploymentName) + { + FilterResourceGroupDeploymentOptions options = new FilterResourceGroupDeploymentOptions + { + DeploymentName = deploymentName, + ResourceGroupName = resourceGroup + }; + + if (string.IsNullOrEmpty(deploymentName)) + { + options.ExcludedProvisioningStates = new List + { + ProvisioningState.Failed, + ProvisioningState.Succeeded + }; + } + + List deployments = FilterResourceGroupDeployments(options); + + if (deployments.Count == 0) + { + if (string.IsNullOrEmpty(deploymentName)) + { + throw new ArgumentException(string.Format("There is no deployment called '{0}' to cancel", deploymentName)); + } + else + { + throw new ArgumentException(string.Format("There are no running deployments under resource group '{0}'", resourceGroup)); + } + } + else if (deployments.Count == 1) + { + ResourceManagementClient.Deployments.Cancel(resourceGroup, deployments.First().DeploymentName); + } + else + { + throw new ArgumentException("There are more than one running deployment please specify one"); + } + } + + /// + /// Validates a given deployment. + /// + /// The deployment create options + /// True if valid, false otherwise. + public virtual List ValidatePSResourceGroupDeployment(ValidatePSResourceGroupDeploymentParameters parameters) + { + BasicDeployment deployment = CreateBasicDeployment(parameters); + TemplateValidationInfo validationInfo = CheckBasicDeploymentErrors(parameters.ResourceGroupName, Guid.NewGuid().ToString(), deployment); + + if (validationInfo.Errors.Count == 0) + { + WriteVerbose(ProjectResources.TemplateValid); + } + return validationInfo.Errors.Select(e => e.ToPSResourceManagerError()).ToList(); + } + + /// + /// Gets available locations for the specified resource type. + /// + /// The resource types + /// Mapping between each resource type and its available locations + public virtual List GetLocations(params string[] resourceTypes) + { + if (resourceTypes == null) + { + resourceTypes = new string[0]; + } + List providerNames = resourceTypes.Select(r => r.Split('/').First()).ToList(); + List result = new List(); + List providers = new List(); + + if (resourceTypes.Length == 0 || resourceTypes.Any(r => r.Equals(ResourceGroupTypeName, StringComparison.OrdinalIgnoreCase))) + { + result.Add(new ProviderResourceType + { + Name = ResourceGroupTypeName, + Locations = KnownLocations + }.ToPSResourceProviderType(null)); + } + + if (resourceTypes.Length > 0) + { + providers.AddRange(ListResourceProviders() + .Where(p => providerNames.Any(pn => pn.Equals(p.Namespace, StringComparison.OrdinalIgnoreCase)))); + } + else + { + providers.AddRange(ListResourceProviders()); + } + + result.AddRange(providers.SelectMany(p => p.ResourceTypes + .Select(r => r.ToPSResourceProviderType(p.Namespace))) + .Where(r => r.Locations != null && r.Locations.Count > 0)); + + return result; + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.cs new file mode 100644 index 000000000000..1111d933e694 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceClient.cs @@ -0,0 +1,367 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.Serialization.Formatters; +using System.Threading; +using Microsoft.Azure.Management.Resources; +using Microsoft.Azure.Management.Resources.Models; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Monitoring.Events; +using Newtonsoft.Json; +using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources; +using Microsoft.Azure.Management.Authorization; +using Microsoft.Azure.Management.Authorization.Models; +using Microsoft.Azure.Commands.Resources.Models.Authorization; +using System.Diagnostics; + +namespace Microsoft.Azure.Commands.Resources.Models +{ + public partial class ResourcesClient + { + /// + /// Used when provisioning the deployment status. + /// + private List operations; + + public IResourceManagementClient ResourceManagementClient { get; set; } + + public IAuthorizationManagementClient AuthorizationManagementClient { get; set; } + + public GalleryTemplatesClient GalleryTemplatesClient { get; set; } + + public IEventsClient EventsClient { get; set; } + + public Action VerboseLogger { get; set; } + + public Action ErrorLogger { get; set; } + + public Action WarningLogger { get; set; } + + /// + /// Creates new ResourceManagementClient + /// + /// Subscription containing resources to manipulate + public ResourcesClient(AzureContext context) + : this( + AzureSession.ClientFactory.CreateClient(context, AzureEnvironment.Endpoint.ResourceManager), + new GalleryTemplatesClient(context), + AzureSession.ClientFactory.CreateClient(context, AzureEnvironment.Endpoint.ResourceManager), + AzureSession.ClientFactory.CreateClient(context, AzureEnvironment.Endpoint.ResourceManager)) + { + + } + + /// + /// Creates new ResourcesClient instance + /// + /// The IResourceManagementClient instance + /// The IGalleryClient instance + /// The IEventsClient instance + public ResourcesClient( + IResourceManagementClient resourceManagementClient, + GalleryTemplatesClient galleryTemplatesClient, + IEventsClient eventsClient, + IAuthorizationManagementClient authorizationManagementClient) + { + ResourceManagementClient = resourceManagementClient; + GalleryTemplatesClient = galleryTemplatesClient; + EventsClient = eventsClient; + AuthorizationManagementClient = authorizationManagementClient; + } + + /// + /// Parameterless constructor for mocking + /// + public ResourcesClient() + { + + } + + private string GetDeploymentParameters(Hashtable templateParameterObject) + { + if (templateParameterObject != null) + { + return SerializeHashtable(templateParameterObject, addValueLayer: true); + } + else + { + return null; + } + } + + private List ListResourceProviders() + { + ProviderListResult result = ResourceManagementClient.Providers.List(null); + List providers = new List(result.Providers); + + while (!string.IsNullOrEmpty(result.NextLink)) + { + result = ResourceManagementClient.Providers.ListNext(result.NextLink); + providers.AddRange(result.Providers); + } + return providers; + } + + public string SerializeHashtable(Hashtable templateParameterObject, bool addValueLayer) + { + if (templateParameterObject == null) + { + return null; + } + Dictionary parametersDictionary = templateParameterObject.ToDictionary(addValueLayer); + return JsonConvert.SerializeObject(parametersDictionary, new JsonSerializerSettings + { + TypeNameAssemblyFormat = FormatterAssemblyStyle.Simple, + TypeNameHandling = TypeNameHandling.None, + Formatting = Formatting.Indented + }); + } + + public virtual void UnregisterProvider(string RPName) + { + ResourceManagementClient.Providers.Unregister(RPName); + } + + private string GetTemplate(string templateFile, string galleryTemplateName) + { + string template; + + if (!string.IsNullOrEmpty(templateFile)) + { + if (Uri.IsWellFormedUriString(templateFile, UriKind.Absolute)) + { + template = GeneralUtilities.DownloadFile(templateFile); + } + else + { + template = FileUtilities.DataStore.ReadFileAsText(templateFile); + } + } + else + { + Debug.Assert(!string.IsNullOrEmpty(galleryTemplateName)); + string templateUri = GalleryTemplatesClient.GetGalleryTemplateFile(galleryTemplateName); + template = GeneralUtilities.DownloadFile(templateUri); + } + + return template; + } + + private ResourceGroup CreateOrUpdateResourceGroup(string name, string location, Hashtable[] tags) + { + Dictionary tagDictionary = TagsConversionHelper.CreateTagDictionary(tags, validate: true); + + var result = ResourceManagementClient.ResourceGroups.CreateOrUpdate(name, + new BasicResourceGroup + { + Location = location, + Tags = tagDictionary + }); + + return result.ResourceGroup; + } + + private void WriteVerbose(string progress) + { + if (VerboseLogger != null) + { + VerboseLogger(progress); + } + } + + private void WriteWarning(string warning) + { + if (WarningLogger != null) + { + WarningLogger(warning); + } + } + + private void WriteError(string error) + { + if (ErrorLogger != null) + { + ErrorLogger(error); + } + } + + private Deployment ProvisionDeploymentStatus(string resourceGroup, string deploymentName, BasicDeployment deployment) + { + operations = new List(); + + return WaitDeploymentStatus( + resourceGroup, + deploymentName, + deployment, + WriteDeploymentProgress, + ProvisioningState.Canceled, + ProvisioningState.Succeeded, + ProvisioningState.Failed); + } + + private void WriteDeploymentProgress(string resourceGroup, string deploymentName, BasicDeployment deployment) + { + const string normalStatusFormat = "Resource {0} '{1}' provisioning status is {2}"; + const string failureStatusFormat = "Resource {0} '{1}' failed with message '{2}'"; + List newOperations; + DeploymentOperationsListResult result; + + result = ResourceManagementClient.DeploymentOperations.List(resourceGroup, deploymentName, null); + newOperations = GetNewOperations(operations, result.Operations); + operations.AddRange(newOperations); + + while (!string.IsNullOrEmpty(result.NextLink)) + { + result = ResourceManagementClient.DeploymentOperations.ListNext(result.NextLink); + newOperations = GetNewOperations(operations, result.Operations); + operations.AddRange(newOperations); + } + + foreach (DeploymentOperation operation in newOperations) + { + string statusMessage; + + if (operation.Properties.ProvisioningState != ProvisioningState.Failed) + { + statusMessage = string.Format(normalStatusFormat, + operation.Properties.TargetResource.ResourceType, + operation.Properties.TargetResource.ResourceName, + operation.Properties.ProvisioningState.ToLower()); + + WriteVerbose(statusMessage); + } + else + { + string errorMessage = ParseErrorMessage(operation.Properties.StatusMessage); + + statusMessage = string.Format(failureStatusFormat, + operation.Properties.TargetResource.ResourceType, + operation.Properties.TargetResource.ResourceName, + errorMessage); + + WriteError(statusMessage); + } + } + } + + public static string ParseErrorMessage(string statusMessage) + { + CloudError error = CloudException.ParseXmlOrJsonError(statusMessage); + if (error.Message == null) + { + return error.OriginalMessage; + } + else + { + return error.Message; + } + } + + private Deployment WaitDeploymentStatus( + string resourceGroup, + string deploymentName, + BasicDeployment basicDeployment, + Action job, + params string[] status) + { + Deployment deployment; + + do + { + if (job != null) + { + job(resourceGroup, deploymentName, basicDeployment); + } + + deployment = ResourceManagementClient.Deployments.Get(resourceGroup, deploymentName).Deployment; + Thread.Sleep(2000); + + } while (!status.Any(s => s.Equals(deployment.Properties.ProvisioningState, StringComparison.OrdinalIgnoreCase))); + + return deployment; + } + + private List GetNewOperations(List old, IList current) + { + List newOperations = new List(); + foreach (DeploymentOperation operation in current) + { + DeploymentOperation operationWithSameIdAndProvisioningState = old.Find(o => o.OperationId.Equals(operation.OperationId) && o.Properties.ProvisioningState.Equals(operation.Properties.ProvisioningState)); + if (operationWithSameIdAndProvisioningState == null) + { + newOperations.Add(operation); + } + } + + return newOperations; + } + + private BasicDeployment CreateBasicDeployment(ValidatePSResourceGroupDeploymentParameters parameters) + { + BasicDeployment deployment = new BasicDeployment + { + Mode = DeploymentMode.Incremental, + Template = GetTemplate(parameters.TemplateFile, parameters.GalleryTemplateIdentity), + Parameters = GetDeploymentParameters(parameters.TemplateParameterObject) + }; + + return deployment; + } + + private TemplateValidationInfo CheckBasicDeploymentErrors(string resourceGroup, string deploymentName, BasicDeployment deployment) + { + DeploymentValidateResponse validationResult = ResourceManagementClient.Deployments.Validate( + resourceGroup, + deploymentName, + deployment); + + return new TemplateValidationInfo(validationResult); + } + + internal List GetResourceGroupPermissions(string resourceGroup) + { + PermissionGetResult permissionsResult = AuthorizationManagementClient.Permissions.ListForResourceGroup(resourceGroup); + + if (permissionsResult != null) + { + return permissionsResult.Permissions.Select(p => p.ToPSPermission()).ToList(); + } + + return null; + } + + internal List GetResourcePermissions(ResourceIdentifier identity) + { + PermissionGetResult permissionsResult = AuthorizationManagementClient.Permissions.ListForResource( + identity.ResourceGroupName, + identity.ToResourceIdentity()); + + if (permissionsResult != null) + { + return permissionsResult.Permissions.Select(p => p.ToPSPermission()).ToList(); + } + + return null; + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceIdentifier.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceIdentifier.cs new file mode 100644 index 000000000000..a54c06a88290 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceIdentifier.cs @@ -0,0 +1,178 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text; +using AuthorizationResourceIdentity = Microsoft.Azure.Management.Authorization.Models.ResourceIdentity; +using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources; +using ResourcesResourceIdentity = Microsoft.Azure.Management.Resources.Models.ResourceIdentity; + +namespace Microsoft.Azure.Commands.Resources.Models +{ + public class ResourceIdentifier + { + public string ResourceType { get; set; } + + public string ResourceGroupName { get; set; } + + public string ResourceName { get; set; } + + public string ParentResource { get; set; } + + public string Subscription { get; set; } + + public ResourceIdentifier() { } + + public ResourceIdentifier(string idFromServer) + { + if (!string.IsNullOrEmpty(idFromServer)) + { + string[] tokens = idFromServer.Split(new[] {'/'}, StringSplitOptions.RemoveEmptyEntries); + if (tokens.Length < 8) + { + throw new ArgumentException(ProjectResources.InvalidFormatOfResourceId, "idFromServer"); + } + Subscription = tokens[1]; + ResourceGroupName = tokens[3]; + ResourceName = tokens[tokens.Length - 1]; + + List resourceTypeBuilder = new List(); + resourceTypeBuilder.Add(tokens[5]); + + List parentResourceBuilder = new List(); + for (int i = 6; i <= tokens.Length - 3; i++) + { + parentResourceBuilder.Add(tokens[i]); + // Add every other token to type + if (i%2 == 0) + { + resourceTypeBuilder.Add(tokens[i]); + } + } + resourceTypeBuilder.Add(tokens[tokens.Length - 2]); + + if (parentResourceBuilder.Count > 0) + { + ParentResource = string.Join("/", parentResourceBuilder); + } + if (resourceTypeBuilder.Count > 0) + { + ResourceType = string.Join("/", resourceTypeBuilder); + } + } + } + + public static string GetProviderFromResourceType(string resourceType) + { + if (resourceType == null) + { + return null; + } + + int indexOfSlash = resourceType.IndexOf('/'); + if (indexOfSlash < 0) + { + return string.Empty; + } + else + { + return resourceType.Substring(0, indexOfSlash); + } + } + + public static string GetTypeFromResourceType(string resourceType) + { + if (resourceType == null) + { + return null; + } + + int lastIndexOfSlash = resourceType.LastIndexOf('/'); + if (lastIndexOfSlash < 0) + { + return string.Empty; + } + else + { + return resourceType.Substring(lastIndexOfSlash + 1); + } + } + + public override string ToString() + { + string provider = GetProviderFromResourceType(ResourceType); + string type = GetTypeFromResourceType(ResourceType); + string parentAndType = string.IsNullOrEmpty(ParentResource) ? type : ParentResource + "/" + type; + StringBuilder resourceId = new StringBuilder(); + + AppendIfNotNull(ref resourceId, "/subscriptions/{0}", Subscription); + AppendIfNotNull(ref resourceId, "/resourceGroups/{0}", ResourceGroupName); + AppendIfNotNull(ref resourceId, "/providers/{0}", provider); + AppendIfNotNull(ref resourceId, "/{0}", parentAndType); + AppendIfNotNull(ref resourceId, "/{0}", ResourceName); + + return resourceId.ToString(); + } + + public AuthorizationResourceIdentity ToResourceIdentity() + { + AuthorizationResourceIdentity identity = null; + + if (!string.IsNullOrEmpty(ResourceType) && ResourceType.IndexOf('/') > 0) + { + identity = new AuthorizationResourceIdentity + { + ResourceName = ResourceName, + ParentResourcePath = ParentResource, + ResourceProviderNamespace = ResourceIdentifier.GetProviderFromResourceType(ResourceType), + ResourceType = ResourceIdentifier.GetTypeFromResourceType(ResourceType) + }; + } + + return identity; + } + + public ResourcesResourceIdentity ToResourceIdentity(string apiVersion) + { + if (string.IsNullOrEmpty(ResourceType)) + { + throw new ArgumentNullException("ResourceType"); + } + if (ResourceType.IndexOf('/') < 0) + { + throw new ArgumentException(ProjectResources.ResourceTypeFormat, "ResourceType"); + } + + ResourcesResourceIdentity identity = new ResourcesResourceIdentity + { + ResourceName = ResourceName, + ParentResourcePath = ParentResource, + ResourceProviderNamespace = ResourceIdentifier.GetProviderFromResourceType(ResourceType), + ResourceType = ResourceIdentifier.GetTypeFromResourceType(ResourceType), + ResourceProviderApiVersion = apiVersion + }; + + return identity; + } + + private void AppendIfNotNull(ref StringBuilder resourceId, string format, string value) + { + if (!string.IsNullOrEmpty(value)) + { + resourceId.AppendFormat(format, value); + } + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceWithParameterBaseCmdlet.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceWithParameterBaseCmdlet.cs new file mode 100644 index 000000000000..da0d9563989a --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourceWithParameterBaseCmdlet.cs @@ -0,0 +1,194 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; + +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.Azure.Commands.Resources.Models; + +namespace Microsoft.Azure.Commands.Resources +{ + public abstract class ResourceWithParameterBaseCmdlet : ResourcesBaseCmdlet + { + protected const string BaseParameterSetName = "Default"; + protected const string GalleryTemplateParameterObjectParameterSetName = "Deployment via Gallery and template parameters object"; + protected const string GalleryTemplateParameterFileParameterSetName = "Deployment via Gallery and template parameters file"; + protected const string TemplateFileParameterObjectParameterSetName = "Deployment via template file and template parameters object"; + protected const string TemplateFileParameterFileParameterSetName = "Deployment via template file and template parameters file"; + protected const string TemplateUriParameterObjectParameterSetName = "Deployment via template uri and template parameters object"; + protected const string TemplateUriParameterFileParameterSetName = "Deployment via template uri and template parameters file"; + protected const string ParameterlessTemplateFileParameterSetName = "Deployment via template file without parameters"; + protected const string ParameterlessGalleryTemplateParameterSetName = "Deployment via Gallery without parameters"; + protected const string ParameterlessTemplateUriParameterSetName = "Deployment via template uri without parameters"; + + protected RuntimeDefinedParameterDictionary dynamicParameters; + + private string galleryTemplateName; + + private string templateFile; + + private string templateUri; + + protected ResourceWithParameterBaseCmdlet() + { + dynamicParameters = new RuntimeDefinedParameterDictionary(); + galleryTemplateName = null; + } + + [Parameter(ParameterSetName = GalleryTemplateParameterObjectParameterSetName, + Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "A hash table which represents the parameters.")] + [Parameter(ParameterSetName = TemplateFileParameterObjectParameterSetName, + Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "A hash table which represents the parameters.")] + [Parameter(ParameterSetName = TemplateUriParameterObjectParameterSetName, + Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "A hash table which represents the parameters.")] + public Hashtable TemplateParameterObject { get; set; } + + [Parameter(ParameterSetName = GalleryTemplateParameterFileParameterSetName, + Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "A file that has the template parameters.")] + [Parameter(ParameterSetName = TemplateFileParameterFileParameterSetName, + Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "A file that has the template parameters.")] + [Parameter(ParameterSetName = TemplateUriParameterFileParameterSetName, + Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "A file that has the template parameters.")] + [ValidateNotNullOrEmpty] + public string TemplateParameterFile { get; set; } + + [Parameter(ParameterSetName = GalleryTemplateParameterObjectParameterSetName, + Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the template in the gallery.")] + [Parameter(ParameterSetName = GalleryTemplateParameterFileParameterSetName, + Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the template in the gallery.")] + [Parameter(ParameterSetName = ParameterlessGalleryTemplateParameterSetName, + Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the template in the gallery.")] + [ValidateNotNullOrEmpty] + public string GalleryTemplateIdentity { get; set; } + + [Parameter(ParameterSetName = TemplateFileParameterObjectParameterSetName, + Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Local path to the template file.")] + [Parameter(ParameterSetName = TemplateFileParameterFileParameterSetName, + Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Local path to the template file.")] + [Parameter(ParameterSetName = ParameterlessTemplateFileParameterSetName, + Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Local path to the template file.")] + [ValidateNotNullOrEmpty] + public string TemplateFile { get; set; } + + [Parameter(ParameterSetName = TemplateUriParameterObjectParameterSetName, + Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Uri to the template file.")] + [Parameter(ParameterSetName = TemplateUriParameterFileParameterSetName, + Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Uri to the template file.")] + [Parameter(ParameterSetName = ParameterlessTemplateUriParameterSetName, + Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Uri to the template file.")] + [ValidateNotNullOrEmpty] + public string TemplateUri { get; set; } + + [Parameter(ParameterSetName = TemplateFileParameterObjectParameterSetName, + Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The storage account which the cmdlet to upload the template file to. If not specified, the current storage account of the subscription will be used.")] + [Parameter(ParameterSetName = TemplateFileParameterFileParameterSetName, + Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The storage account which the cmdlet to upload the template file to. If not specified, the current storage account of the subscription will be used.")] + [Parameter(ParameterSetName = ParameterlessTemplateFileParameterSetName, + Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The storage account which the cmdlet to upload the template file to. If not specified, the current storage account of the subscription will be used.")] + [ValidateNotNullOrEmpty] + public string StorageAccountName { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The expect content version of the template.")] + [ValidateNotNullOrEmpty] + public string TemplateVersion { get; set; } + + public object GetDynamicParameters() + { + if (!string.IsNullOrEmpty(GalleryTemplateIdentity)) + { + List galleryItems = new List(); + try + { + galleryItems = GalleryTemplatesClient.FilterGalleryTemplates(new FilterGalleryTemplatesOptions() { Identity = GalleryTemplateIdentity }); + } + catch (CloudException) + { + // we could not find a template with that identity + } + + if (galleryItems.Count == 0) + { + galleryItems = GalleryTemplatesClient.FilterGalleryTemplates(new FilterGalleryTemplatesOptions() { ApplicationName = GalleryTemplateIdentity, AllVersions = false }); + if (galleryItems == null || galleryItems.Count == 0) + { + throw new ArgumentException(string.Format(Properties.Resources.InvalidTemplateIdentity, GalleryTemplateIdentity)); + } + + GalleryTemplateIdentity = galleryItems[0].Identity; + } + } + + if (!string.IsNullOrEmpty(GalleryTemplateIdentity) && + !GalleryTemplateIdentity.Equals(galleryTemplateName, StringComparison.OrdinalIgnoreCase)) + { + galleryTemplateName = GalleryTemplateIdentity; + dynamicParameters = GalleryTemplatesClient.GetTemplateParametersFromGallery( + GalleryTemplateIdentity, + TemplateParameterObject, + this.TryResolvePath(TemplateParameterFile), + MyInvocation.MyCommand.Parameters.Keys.ToArray()); + } + else if (!string.IsNullOrEmpty(TemplateFile) && + !TemplateFile.Equals(templateFile, StringComparison.OrdinalIgnoreCase)) + { + templateFile = TemplateFile; + dynamicParameters = GalleryTemplatesClient.GetTemplateParametersFromFile( + this.TryResolvePath(TemplateFile), + TemplateParameterObject, + this.TryResolvePath(TemplateParameterFile), + MyInvocation.MyCommand.Parameters.Keys.ToArray()); + } + else if (!string.IsNullOrEmpty(TemplateUri) && + !TemplateUri.Equals(templateUri, StringComparison.OrdinalIgnoreCase)) + { + templateUri = TemplateUri; + dynamicParameters = GalleryTemplatesClient.GetTemplateParametersFromFile( + TemplateUri, + TemplateParameterObject, + this.TryResolvePath(TemplateParameterFile), + MyInvocation.MyCommand.Parameters.Keys.ToArray()); + } + + return dynamicParameters; + } + + protected Hashtable GetTemplateParameterObject(Hashtable templateParameterObject) + { + templateParameterObject = templateParameterObject ?? new Hashtable(); + + // Load parameters from the file + string templateParameterFilePath = this.TryResolvePath(TemplateParameterFile); + if (templateParameterFilePath != null && FileUtilities.DataStore.FileExists(templateParameterFilePath)) + { + var parametersFromFile = GalleryTemplatesClient.ParseTemplateParameterFileContents(templateParameterFilePath); + parametersFromFile.ForEach(dp => templateParameterObject[dp.Key] = dp.Value.Value); + } + + // Load dynamic parameters + IEnumerable parameters = PowerShellUtilities.GetUsedDynamicParameters(dynamicParameters, MyInvocation); + if (parameters.Any()) + { + parameters.ForEach(dp => templateParameterObject[((ParameterAttribute)dp.Attributes[0]).HelpMessage] = dp.Value); + } + + return templateParameterObject; + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourcesBaseCmdlet.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourcesBaseCmdlet.cs new file mode 100644 index 000000000000..f290bc29771a --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourcesBaseCmdlet.cs @@ -0,0 +1,75 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Resources.Models.Authorization; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.Azure.Commands.Resources.Models +{ + public abstract class ResourcesBaseCmdlet : AzurePSCmdlet + { + private ResourcesClient resourcesClient; + + private GalleryTemplatesClient galleryTemplatesClient; + + private AuthorizationClient policiesClient; + + public ResourcesClient ResourcesClient + { + get + { + if (resourcesClient == null) + { + resourcesClient = new ResourcesClient(CurrentContext) + { + VerboseLogger = WriteVerboseWithTimestamp, + ErrorLogger = WriteErrorWithTimestamp, + WarningLogger = WriteWarningWithTimestamp + }; + } + return resourcesClient; + } + + set { resourcesClient = value; } + } + + public GalleryTemplatesClient GalleryTemplatesClient + { + get + { + if (galleryTemplatesClient == null) + { + galleryTemplatesClient = new GalleryTemplatesClient(CurrentContext); + } + return galleryTemplatesClient; + } + + set { galleryTemplatesClient = value; } + } + + public AuthorizationClient PoliciesClient + { + get + { + if (policiesClient == null) + { + policiesClient = new AuthorizationClient(CurrentContext); + } + return policiesClient; + } + + set { policiesClient = value; } + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourcesExtensions.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourcesExtensions.cs new file mode 100644 index 000000000000..76bec9fdb307 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ResourcesExtensions.cs @@ -0,0 +1,438 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using Microsoft.Azure.Commands.Tags.Model; +using Microsoft.Azure.Gallery; +using Microsoft.Azure.Management.Resources.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Monitoring.Events.Models; +using Newtonsoft.Json; +using Microsoft.Azure.Commands.Resources.Models.Authorization; +using Microsoft.Azure.Management.Authorization.Models; + +namespace Microsoft.Azure.Commands.Resources.Models +{ + public static class ResourcesExtensions + { + public static PSResourceGroup ToPSResourceGroup(this ResourceGroup resourceGroup, ResourcesClient client, bool detailed) + { + var result = new PSResourceGroup + { + ResourceGroupName = resourceGroup.Name, + Location = resourceGroup.Location, + ProvisioningState = resourceGroup.ProvisioningState, + Tags = TagsConversionHelper.CreateTagHashtable(resourceGroup.Tags), + ResourceId = resourceGroup.Id + }; + + if (detailed) + { + result.Resources = client.FilterResources(new FilterResourcesOptions { ResourceGroup = resourceGroup.Name }) + .Select(r => r.ToPSResource(client, true)).ToList(); + result.Permissions = client.GetResourceGroupPermissions(resourceGroup.Name); + } + + return result; + } + + public static PSResourceGroupDeployment ToPSResourceGroupDeployment(this DeploymentGetResult result, string resourceGroup) + { + PSResourceGroupDeployment deployment = new PSResourceGroupDeployment(); + + if (result != null) + { + deployment = CreatePSResourceGroupDeployment(result.Deployment.Name, resourceGroup, result.Deployment.Properties); + } + + return deployment; + } + + public static PSResourceGroupDeployment ToPSResourceGroupDeployment(this Deployment result, string resourceGroup) + { + PSResourceGroupDeployment deployment = new PSResourceGroupDeployment(); + + if (result != null) + { + deployment = CreatePSResourceGroupDeployment(result.Name, resourceGroup, result.Properties); + } + + return deployment; + } + + public static PSResourceManagerError ToPSResourceManagerError(this ResourceManagementError error) + { + return new PSResourceManagerError + { + Code = error.Code, + Message = error.Message + }; + } + + public static PSResource ToPSResource(this Resource resource, ResourcesClient client, bool minimal) + { + ResourceIdentifier identifier = new ResourceIdentifier(resource.Id); + return new PSResource + { + Name = identifier.ResourceName, + Location = resource.Location, + ResourceType = identifier.ResourceType, + ResourceGroupName = identifier.ResourceGroupName, + ParentResource = identifier.ParentResource, + Properties = JsonUtilities.DeserializeJson(resource.Properties), + PropertiesText = resource.Properties, + Tags = TagsConversionHelper.CreateTagHashtable(resource.Tags), + Permissions = minimal ? null : client.GetResourcePermissions(identifier), + ResourceId = identifier.ToString() + }; + } + + public static PSResourceProviderType ToPSResourceProviderType(this ProviderResourceType resourceType, string providerNamespace) + { + PSResourceProviderType result = new PSResourceProviderType(); + if (resourceType != null) + { + resourceType.Locations = resourceType.Locations ?? new List(); + for (int i = 0; i < ResourcesClient.KnownLocationsNormalized.Count; i++) + { + if (resourceType.Locations.Remove(ResourcesClient.KnownLocationsNormalized[i])) + { + resourceType.Locations.Add(ResourcesClient.KnownLocations[i]); + } + } + + result.Name = string.IsNullOrEmpty(providerNamespace) ? resourceType.Name : string.Join("/", providerNamespace, resourceType.Name); + result.Locations = resourceType.Locations.Where(s => !string.IsNullOrWhiteSpace(s)).Distinct(StringComparer.CurrentCultureIgnoreCase).ToList(); + result.LocationsString = string.Join(", ", result.Locations); + } + + return result; + } + + public static PSGalleryItem ToPSGalleryItem(this GalleryItem gallery) + { + PSGalleryItem psGalleryItem = new PSGalleryItem(); + foreach (PropertyInfo prop in gallery.GetType().GetProperties()) + { + (typeof(PSGalleryItem)).GetProperty(prop.Name).SetValue(psGalleryItem, prop.GetValue(gallery, null), null); + } + + return psGalleryItem; + } + + public static PSDeploymentEventData ToPSDeploymentEventData(this EventData eventData) + { + if (eventData == null) + { + return null; + } + PSDeploymentEventData psObject = new PSDeploymentEventData + { + Authorization = eventData.Authorization.ToPSDeploymentEventDataAuthorization(), + ResourceUri = eventData.ResourceUri, + SubscriptionId = eventData.SubscriptionId, + EventId = eventData.EventDataId, + EventName = eventData.EventName.LocalizedValue, + EventSource = eventData.EventSource.LocalizedValue, + Channels = eventData.EventChannels.ToString(), + Level = eventData.Level.ToString(), + Description = eventData.Description, + Timestamp = eventData.EventTimestamp, + OperationId = eventData.OperationId, + OperationName = eventData.OperationName.LocalizedValue, + Status = eventData.Status.LocalizedValue, + SubStatus = eventData.SubStatus.LocalizedValue, + Caller = GetEventDataCaller(eventData.Claims), + CorrelationId = eventData.CorrelationId, + ResourceGroupName = eventData.ResourceGroupName, + ResourceProvider = eventData.ResourceProviderName.LocalizedValue, + HttpRequest = eventData.HttpRequest.ToPSDeploymentEventDataHttpRequest(), + Claims = eventData.Claims, + Properties = eventData.Properties + }; + return psObject; + } + + public static PSDeploymentEventDataHttpRequest ToPSDeploymentEventDataHttpRequest(this HttpRequestInfo httpRequest) + { + if (httpRequest == null) + { + return null; + } + PSDeploymentEventDataHttpRequest psObject = new PSDeploymentEventDataHttpRequest + { + ClientId = httpRequest.ClientRequestId, + Method = httpRequest.Method, + Url = httpRequest.Uri, + ClientIpAddress = httpRequest.ClientIpAddress + }; + return psObject; + } + + public static PSDeploymentEventDataAuthorization ToPSDeploymentEventDataAuthorization(this SenderAuthorization authorization) + { + if (authorization == null) + { + return null; + } + PSDeploymentEventDataAuthorization psObject = new PSDeploymentEventDataAuthorization + { + Action = authorization.Action, + Role = authorization.Role, + Scope = authorization.Scope, + Condition = authorization.Condition + }; + return psObject; + } + + public static string ConstructResourcesTable(List resources) + { + StringBuilder resourcesTable = new StringBuilder(); + + if (resources != null && resources.Count > 0) + { + int maxNameLength = Math.Max("Name".Length, resources.Where(r => r.Name != null).DefaultIfEmpty(EmptyResource).Max(r => r.Name.Length)); + int maxTypeLength = Math.Max("Type".Length, resources.Where(r => r.ResourceType != null).DefaultIfEmpty(EmptyResource).Max(r => r.ResourceType.Length)); + int maxLocationLength = Math.Max("Location".Length, resources.Where(r => r.Location != null).DefaultIfEmpty(EmptyResource).Max(r => r.Location.Length)); + + string rowFormat = "{0, -" + maxNameLength + "} {1, -" + maxTypeLength + "} {2, -" + maxLocationLength + "}\r\n"; + resourcesTable.AppendLine(); + resourcesTable.AppendFormat(rowFormat, "Name", "Type", "Location"); + resourcesTable.AppendFormat(rowFormat, + GeneralUtilities.GenerateSeparator(maxNameLength, "="), + GeneralUtilities.GenerateSeparator(maxTypeLength, "="), + GeneralUtilities.GenerateSeparator(maxLocationLength, "=")); + + foreach (PSResource resource in resources) + { + resourcesTable.AppendFormat(rowFormat, resource.Name, resource.ResourceType, resource.Location); + } + } + + return resourcesTable.ToString(); + } + + public static string ConstructTagsTable(Hashtable[] tags) + { + if (tags == null) + { + return null; + } + + Hashtable emptyHashtable = new Hashtable + { + {"Name", string.Empty}, + {"Value", string.Empty} + }; + StringBuilder resourcesTable = new StringBuilder(); + + if (tags.Length > 0) + { + int maxNameLength = Math.Max("Name".Length, tags.Where(ht => ht.ContainsKey("Name")).DefaultIfEmpty(emptyHashtable).Max(ht => ht["Name"].ToString().Length)); + int maxValueLength = Math.Max("Value".Length, tags.Where(ht => ht.ContainsKey("Value")).DefaultIfEmpty(emptyHashtable).Max(ht => ht["Value"].ToString().Length)); + + string rowFormat = "{0, -" + maxNameLength + "} {1, -" + maxValueLength + "}\r\n"; + resourcesTable.AppendLine(); + resourcesTable.AppendFormat(rowFormat, "Name", "Value"); + resourcesTable.AppendFormat(rowFormat, + GeneralUtilities.GenerateSeparator(maxNameLength, "="), + GeneralUtilities.GenerateSeparator(maxValueLength, "=")); + + foreach (Hashtable tag in tags) + { + PSTagValuePair tagValuePair = TagsConversionHelper.Create(tag); + if (tagValuePair != null) + { + if (tagValuePair.Name.StartsWith(TagsClient.ExecludedTagPrefix)) + { + continue; + } + + if (tagValuePair.Value == null) + { + tagValuePair.Value = string.Empty; + } + resourcesTable.AppendFormat(rowFormat, tagValuePair.Name, tagValuePair.Value); + } + } + } + + return resourcesTable.ToString(); + } + + private static string ConstructTemplateLinkView(TemplateLink templateLink) + { + if (templateLink == null) + { + return string.Empty; + } + + StringBuilder result = new StringBuilder(); + + result.AppendLine(); + result.AppendLine(string.Format("{0, -15}: {1}", "Uri", templateLink.Uri)); + result.AppendLine(string.Format("{0, -15}: {1}", "ContentVersion", templateLink.ContentVersion)); + + return result.ToString(); + } + + public static string ConstructDeploymentVariableTable(Dictionary dictionary) + { + if (dictionary == null) + { + return null; + } + + StringBuilder result = new StringBuilder(); + + if (dictionary.Count > 0) + { + string rowFormat = "{0, -15} {1, -25} {2, -10}\r\n"; + result.AppendLine(); + result.AppendFormat(rowFormat, "Name", "Type", "Value"); + result.AppendFormat(rowFormat, GeneralUtilities.GenerateSeparator(15, "="), GeneralUtilities.GenerateSeparator(25, "="), GeneralUtilities.GenerateSeparator(10, "=")); + + foreach (KeyValuePair pair in dictionary) + { + result.AppendFormat(rowFormat, pair.Key, pair.Value.Type, pair.Value.Value); + } + } + + return result.ToString(); + + } + + private static PSResourceGroupDeployment CreatePSResourceGroupDeployment( + string name, + string gesourceGroup, + DeploymentProperties properties) + { + PSResourceGroupDeployment deploymentObject = new PSResourceGroupDeployment(); + + deploymentObject.DeploymentName = name; + deploymentObject.ResourceGroupName = gesourceGroup; + + if (properties != null) + { + deploymentObject.Mode = properties.Mode; + deploymentObject.ProvisioningState = properties.ProvisioningState; + deploymentObject.TemplateLink = properties.TemplateLink; + deploymentObject.Timestamp = properties.Timestamp; + deploymentObject.CorrelationId = properties.CorrelationId; + + if (!string.IsNullOrEmpty(properties.Outputs)) + { + Dictionary outputs = JsonConvert.DeserializeObject>(properties.Outputs); + deploymentObject.Outputs = outputs; + } + + if (!string.IsNullOrEmpty(properties.Parameters)) + { + Dictionary parameters = JsonConvert.DeserializeObject>(properties.Parameters); + deploymentObject.Parameters = parameters; + } + + if (properties.TemplateLink != null) + { + deploymentObject.TemplateLinkString = ConstructTemplateLinkView(properties.TemplateLink); + } + } + + return deploymentObject; + } + + private static string GetEventDataCaller(Dictionary claims) + { + string name = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name"; + + if (claims == null || !claims.ContainsKey(name)) + { + return null; + } + else + { + return claims[name]; + } + } + + private static PSResource EmptyResource + { + get + { + return new PSResource + { + Name = string.Empty, + Location = string.Empty, + ParentResource = string.Empty, + PropertiesText = string.Empty, + ResourceGroupName = string.Empty, + Properties = new Dictionary(), + ResourceType = string.Empty, + ResourceId = string.Empty + }; + } + } + + private static PSPermission EmptyPermission + { + get + { + return new PSPermission() + { + Actions = new List(), + NotActions = new List() + }; + } + } + + public static string ConstructPermissionsTable(List permissions) + { + StringBuilder permissionsTable = new StringBuilder(); + + if (permissions != null && permissions.Count > 0) + { + int maxActionsLength = Math.Max("Actions".Length, permissions.Where(p => p.Actions != null).DefaultIfEmpty(EmptyPermission).Max(p => p.ActionsString.Length)); + int maxNotActionsLength = Math.Max("NotActions".Length, permissions.Where(p => p.NotActions != null).DefaultIfEmpty(EmptyPermission).Max(p => p.NotActionsString.Length)); + + string rowFormat = "{0, -" + maxActionsLength + "} {1, -" + maxNotActionsLength + "}\r\n"; + permissionsTable.AppendLine(); + permissionsTable.AppendFormat(rowFormat, "Actions", "NotActions"); + permissionsTable.AppendFormat(rowFormat, + GeneralUtilities.GenerateSeparator(maxActionsLength, "="), + GeneralUtilities.GenerateSeparator(maxNotActionsLength, "=")); + + foreach (PSPermission permission in permissions) + { + permissionsTable.AppendFormat(rowFormat, permission.ActionsString, permission.NotActionsString); + } + } + + return permissionsTable.ToString(); + } + + public static PSPermission ToPSPermission(this Permission permission) + { + return new PSPermission() + { + Actions = new List(permission.Actions), + NotActions = new List(permission.NotActions) + }; + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/SetResourceMode.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/SetResourceMode.cs new file mode 100644 index 000000000000..1db552769437 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/SetResourceMode.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +namespace Microsoft.Azure.Commands.Resources.Models +{ + /// + /// Update resource mode. + /// + public enum SetResourceMode + { + Update, + Replace + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/TagsConversionHelper.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/TagsConversionHelper.cs new file mode 100644 index 000000000000..64363445b2df --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/TagsConversionHelper.cs @@ -0,0 +1,96 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Collections.Generic; +using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources; + +namespace Microsoft.Azure.Commands.Resources.Models +{ + public class TagsConversionHelper + { + public static PSTagValuePair Create(Hashtable hashtable) + { + if (hashtable == null || + !hashtable.ContainsKey("Name")) + { + return null; + } + + PSTagValuePair tagValue = new PSTagValuePair(); + tagValue.Name = hashtable["Name"].ToString(); + + if (hashtable.ContainsKey("Value")) + { + tagValue.Value = hashtable["Value"].ToString(); + } + + return tagValue; + } + + public static Dictionary CreateTagDictionary(Hashtable[] hashtableArray, bool validate) + { + Dictionary tagDictionary = null; + if (hashtableArray != null && hashtableArray.Length > 0) + { + tagDictionary = new Dictionary(); + foreach (var tag in hashtableArray) + { + var tagValuePair = Create(tag); + if (tagValuePair != null) + { + if (tagValuePair.Value != null) + { + tagDictionary[tagValuePair.Name] = tagValuePair.Value; + } + else + { + tagDictionary[tagValuePair.Name] = ""; + } + } + } + } + if (validate) + { + if (hashtableArray != null && hashtableArray.Length > 0 && hashtableArray[0].Count > 0 && + (tagDictionary == null || tagDictionary.Count == 0)) + { + throw new ArgumentException(ProjectResources.InvalidTagFormat); + } + if (hashtableArray != null && hashtableArray.Length > 0 && hashtableArray[0].Count > 0 && + (tagDictionary == null || hashtableArray.Length != tagDictionary.Count)) + { + throw new ArgumentException(ProjectResources.InvalidTagFormatNotUniqueName); + } + } + + return tagDictionary; + } + + public static Hashtable[] CreateTagHashtable(IDictionary dictionary) + { + List tagHashtable = new List(); + foreach (string key in dictionary.Keys) + { + tagHashtable.Add(new Hashtable + { + {"Name", key}, + {"Value", dictionary[key]} + }); + } + return tagHashtable.ToArray(); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/TemplateFile.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/TemplateFile.cs new file mode 100644 index 000000000000..7c396ed0a4b2 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/TemplateFile.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace Microsoft.Azure.Commands.Resources.Models +{ + public class TemplateFile + { + [JsonProperty("parameters")] + public IDictionary Parameters { get; set; } + + [JsonProperty("resources")] + public List Resources { get; set; } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/TemplateFileParameterV1.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/TemplateFileParameterV1.cs new file mode 100644 index 000000000000..4fc0ff7fb58d --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/TemplateFileParameterV1.cs @@ -0,0 +1,40 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace Microsoft.Azure.Commands.Resources.Models +{ + public class TemplateFileParameterV1 + { + [JsonProperty("type")] + public string Type { get; set; } + + [JsonProperty("value")] + public object Value { get; set; } + + [JsonProperty("defaultValue")] + public object DefaultValue { get; set; } + + [JsonProperty("allowedValues")] + public List AllowedValues { get; set; } + + [JsonProperty("minLength")] + public string MinLength { get; set; } + + [JsonProperty("maxLength")] + public string MaxLength { get; set; } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/TemplateFileParameterv2.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/TemplateFileParameterv2.cs new file mode 100644 index 000000000000..0abf41b1bad7 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/TemplateFileParameterv2.cs @@ -0,0 +1,31 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace Microsoft.Azure.Commands.Resources.Models +{ + public class TemplateFileParameterV2 + { + [JsonProperty("$schema")] + public string Schema { get; set; } + + [JsonProperty("contentVersion")] + public string ContentVersion { get; set; } + + [JsonProperty("parameters")] + public IDictionary Parameters { get; set; } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/TemplateFileResource.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/TemplateFileResource.cs new file mode 100644 index 000000000000..291822fb9685 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/TemplateFileResource.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Newtonsoft.Json; + +namespace Microsoft.Azure.Commands.Resources.Models +{ + public class TemplateFileResource + { + [JsonProperty("type")] + public string Type { get; set; } + + [JsonProperty("apiVersion")] + public string ApiVersion { get; set; } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/TemplateValidationInfo.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/TemplateValidationInfo.cs new file mode 100644 index 000000000000..31274dac5b3e --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/TemplateValidationInfo.cs @@ -0,0 +1,50 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Microsoft.Azure.Management.Resources.Models; + +namespace Microsoft.Azure.Commands.Resources.Models +{ + internal class TemplateValidationInfo + { + public TemplateValidationInfo(DeploymentValidateResponse validationResult) + { + Errors = new List(); + RequiredProviders = new List(); + + if (!validationResult.IsValid) + { + if (validationResult.Error != null) + { + Errors.Add(validationResult.Error); + if (validationResult.Error.Details != null && validationResult.Error.Details.Count > 0) + { + Errors.AddRange(validationResult.Error.Details); + } + } + } + + if(validationResult.Properties != null && + validationResult.Properties.Providers !=null) + { + RequiredProviders.AddRange(validationResult.Properties.Providers); + } + } + + public List Errors { get; set; } + + public List RequiredProviders { get; set; } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/UpdatePSResourceGroupParameters.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/UpdatePSResourceGroupParameters.cs new file mode 100644 index 000000000000..2b523394eddf --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/UpdatePSResourceGroupParameters.cs @@ -0,0 +1,25 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections; + +namespace Microsoft.Azure.Commands.Resources.Models +{ + public class UpdatePSResourceGroupParameters + { + public string ResourceGroupName { get; set; } + + public Hashtable[] Tag { get; set; } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/UpdatePSResourceParameters.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/UpdatePSResourceParameters.cs new file mode 100644 index 000000000000..d6ee76f1abab --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/UpdatePSResourceParameters.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections; + +namespace Microsoft.Azure.Commands.Resources.Models +{ + public class UpdatePSResourceParameters : BasePSResourceParameters + { + public Hashtable PropertyObject { get; set; } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ValidatePSResourceGroupDeploymentParameters.cs b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ValidatePSResourceGroupDeploymentParameters.cs new file mode 100644 index 000000000000..8d9c9c3d913e --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Models.ResourceGroups/ValidatePSResourceGroupDeploymentParameters.cs @@ -0,0 +1,33 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections; + +namespace Microsoft.Azure.Commands.Resources.Models +{ + public class ValidatePSResourceGroupDeploymentParameters + { + public string ResourceGroupName { get; set; } + + public string GalleryTemplateIdentity { get; set; } + + public string TemplateFile { get; set; } + + public Hashtable TemplateParameterObject { get; set; } + + public string TemplateVersion { get; set; } + + public string StorageAccountName { get; set; } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/PostBuild.ps1 b/src/ResourceManager/Resources/Commands.Resources/PostBuild.ps1 new file mode 100644 index 000000000000..d8b5007e4273 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/PostBuild.ps1 @@ -0,0 +1,33 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +Write-Output -InputObject 'Starting post-build script'; + +$sourceDir = $args[0]; +Write-Output -InputObject $sourceDir; + +$sourcePath = $sourceDir + "AzureResourceManager.psd1" +$destDir = Split-Path -Path $sourceDir + +if (Test-Path -Path $sourcePath) { + Write-Output -InputObject "Copying '$sourcePath' to directory '$destDir'"; + Copy-Item -Path $sourcePath -Destination $destDir; +} + +if (Test-Path -Path $sourcePath) { + Write-Output "Removing $sourcePath"; + Remove-Item -Path $sourcePath -Force; +} + +Write-Output -InputObject 'Finished post-build script'; \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources/Properties/AssemblyInfo.cs b/src/ResourceManager/Resources/Commands.Resources/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..0271e56caa08 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Properties/AssemblyInfo.cs @@ -0,0 +1,34 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Microsoft Azure Powershell - Resource Manager")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] + +[assembly: ComVisible(false)] +[assembly: CLSCompliant(false)] +[assembly: Guid("e386b843-f3f0-4db3-8664-37d16b860dde")] +[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] +[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] +#if SIGN +[assembly: InternalsVisibleTo("Microsoft.Azure.Commands.Resources.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +#else +[assembly: InternalsVisibleTo("Microsoft.Azure.Commands.Resources.Test")] +#endif \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources/Properties/Resources.Designer.cs b/src/ResourceManager/Resources/Commands.Resources/Properties/Resources.Designer.cs new file mode 100644 index 000000000000..65cb7ab0f07e --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Properties/Resources.Designer.cs @@ -0,0 +1,342 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.Azure.Commands.Resources.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Azure.Commands.Resources.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Adding resource group.... + /// + internal static string AddingResourceGroup { + get { + return ResourceManager.GetString("AddingResourceGroup", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to cancel the active deployment of resource group '{0}'?. + /// + internal static string CancelResourceGroupDeployment { + get { + return ResourceManager.GetString("CancelResourceGroupDeployment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cancelling active resource group deployment .... + /// + internal static string CancelResourceGroupDeploymentMessage { + get { + return ResourceManager.GetString("CancelResourceGroupDeploymentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find a deployment with name '{0}'.. + /// + internal static string DeploymentWithNameNotFound { + get { + return ResourceManager.GetString("DeploymentWithNameNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot parse {0} '{1}'. + /// + internal static string FailedToParseProperty { + get { + return ResourceManager.GetString("FailedToParseProperty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot set parameter '{0}' from TemplateParameterFile. Incompatible value '{1}'.. + /// + internal static string FailureParsingTemplateParameterFile { + get { + return ResourceManager.GetString("FailureParsingTemplateParameterFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot set parameter '{0}' from TemplateParameterObject. Incompatible value '{1}'.. + /// + internal static string FailureParsingTemplateParameterObject { + get { + return ResourceManager.GetString("FailureParsingTemplateParameterObject", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided file path '{0}' already exists, do you want to override it?. + /// + internal static string FileAlreadyExists { + get { + return ResourceManager.GetString("FileAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid format of the resource identifier.. + /// + internal static string InvalidFormatOfResourceId { + get { + return ResourceManager.GetString("InvalidFormatOfResourceId", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid tag format. Expect @{Name = "tagName"} or @{Name = "tagName"; Value = "tagValue"}. + /// + internal static string InvalidTagFormat { + get { + return ResourceManager.GetString("InvalidTagFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid tag format. Ensure that each tag has a unique name. Example: @{Name = "tagName1"; Value = "tagValue1"}, @{Name = "tagName2"; Value = "tagValue2"}. + /// + internal static string InvalidTagFormatNotUniqueName { + get { + return ResourceManager.GetString("InvalidTagFormatNotUniqueName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find a template with identity '{0}'. Check the template identity and try the command again.. + /// + internal static string InvalidTemplateIdentity { + get { + return ResourceManager.GetString("InvalidTemplateIdentity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Replacing resource group .... + /// + internal static string NewResourceGroupMessage { + get { + return ResourceManager.GetString("NewResourceGroupMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Replacing resource .... + /// + internal static string NewResourceMessage { + get { + return ResourceManager.GetString("NewResourceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find any deployments in resource group '{0}'.. + /// + internal static string NoDeploymentWereFound { + get { + return ResourceManager.GetString("NoDeploymentWereFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Overriding the existing file.. + /// + internal static string OverrdingFile { + get { + return ResourceManager.GetString("OverrdingFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing resource group .... + /// + internal static string RemoveResourceGroupMessage { + get { + return ResourceManager.GetString("RemoveResourceGroupMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing resource .... + /// + internal static string RemoveResourceMessage { + get { + return ResourceManager.GetString("RemoveResourceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove resource '{0}'. + /// + internal static string RemovingResource { + get { + return ResourceManager.GetString("RemovingResource", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove resource group '{0}'. + /// + internal static string RemovingResourceGroup { + get { + return ResourceManager.GetString("RemovingResourceGroup", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing role assignment for AD object '{0}' on scope '{1}' with role definition '{2}' . + /// + internal static string RemovingRoleAssignment { + get { + return ResourceManager.GetString("RemovingRoleAssignment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Provided resource already exists. Are you sure you want to replace it?. + /// + internal static string ResourceAlreadyExists { + get { + return ResourceManager.GetString("ResourceAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Provided resource does not exist.. + /// + internal static string ResourceDoesntExists { + get { + return ResourceManager.GetString("ResourceDoesntExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Provided resource group already exists. Are you sure you want to update it?. + /// + internal static string ResourceGroupAlreadyExists { + get { + return ResourceManager.GetString("ResourceGroupAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Provided resource group does not exist.. + /// + internal static string ResourceGroupDoesntExists { + get { + return ResourceManager.GetString("ResourceGroupDoesntExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Provided resource group does not exist. Would you like to create it?. + /// + internal static string ResourceGroupDoesntExistsAdd { + get { + return ResourceManager.GetString("ResourceGroupDoesntExistsAdd", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resource type needs to be in the ResourceProvider/type format. For example Microsoft.Web/sites.. + /// + internal static string ResourceTypeFormat { + get { + return ResourceManager.GetString("ResourceTypeFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Can not find role definition with name '{0}'.. + /// + internal static string RoleDefinitionNotFound { + get { + return ResourceManager.GetString("RoleDefinitionNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Because the current subscription does not have a current storage account, you must specify the StorageAccountName parameter.. + /// + internal static string StorageAccountNameNeedsToBeSpecified { + get { + return ResourceManager.GetString("StorageAccountNameNeedsToBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Template is valid.. + /// + internal static string TemplateValid { + get { + return ResourceManager.GetString("TemplateValid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find Gallery item '{0}'.. + /// + internal static string UnableToFindGallery { + get { + return ResourceManager.GetString("UnableToFindGallery", resourceCulture); + } + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Properties/Resources.resx b/src/ResourceManager/Resources/Commands.Resources/Properties/Resources.resx new file mode 100644 index 000000000000..76380f5813a5 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Properties/Resources.resx @@ -0,0 +1,213 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Adding resource group... + + + Are you sure you want to cancel the active deployment of resource group '{0}'? + + + Cancelling active resource group deployment ... + + + Cannot find a deployment with name '{0}'. + + + Cannot parse {0} '{1}' + + + Cannot set parameter '{0}' from TemplateParameterFile. Incompatible value '{1}'. + + + Cannot set parameter '{0}' from TemplateParameterObject. Incompatible value '{1}'. + + + The provided file path '{0}' already exists, do you want to override it? + + + Cannot find a template with identity '{0}'. Check the template identity and try the command again. + + + Replacing resource group ... + + + Replacing resource ... + + + Overriding the existing file. + + + Cannot find any deployments in resource group '{0}'. + + + Removing resource group ... + + + Removing resource ... + + + Are you sure you want to remove resource '{0}' + + + Are you sure you want to remove resource group '{0}' + + + Provided resource already exists. Are you sure you want to replace it? + + + Provided resource does not exist. + + + Provided resource group already exists. Are you sure you want to update it? + + + Provided resource group does not exist. + + + Provided resource group does not exist. Would you like to create it? + + + Resource type needs to be in the ResourceProvider/type format. For example Microsoft.Web/sites. + + + Because the current subscription does not have a current storage account, you must specify the StorageAccountName parameter. + + + Template is valid. + + + Cannot find Gallery item '{0}'. + + + Invalid format of the resource identifier. + + + Invalid tag format. Expect @{Name = "tagName"} or @{Name = "tagName"; Value = "tagValue"} + + + Removing role assignment for AD object '{0}' on scope '{1}' with role definition '{2}' + + + Invalid tag format. Ensure that each tag has a unique name. Example: @{Name = "tagName1"; Value = "tagValue1"}, @{Name = "tagName2"; Value = "tagValue2"} + + + Can not find role definition with name '{0}'. + + \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources/ResourceGroupDeployments/GetAzureResourceGroupDeploymentCommand.cs b/src/ResourceManager/Resources/Commands.Resources/ResourceGroupDeployments/GetAzureResourceGroupDeploymentCommand.cs new file mode 100644 index 000000000000..03159c852894 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/ResourceGroupDeployments/GetAzureResourceGroupDeploymentCommand.cs @@ -0,0 +1,53 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.Azure.Commands.Resources.Models; + +namespace Microsoft.Azure.Commands.Resources +{ + /// + /// Filters resource group deployments. + /// + [Cmdlet(VerbsCommon.Get, "AzureResourceGroupDeployment"), OutputType(typeof(List))] + public class GetAzureResourceGroupDeploymentCommand : ResourcesBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the resource group.")] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Alias("DeploymentName")] + [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the resource group deployment.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Position = 2, Mandatory = false, ValueFromPipelineByPropertyName = false, HelpMessage = "The provisioning state of the resource group deployment.")] + [ValidateNotNullOrEmpty] + public string ProvisioningState { get; set; } + + public override void ExecuteCmdlet() + { + FilterResourceGroupDeploymentOptions options = new FilterResourceGroupDeploymentOptions() + { + ResourceGroupName = ResourceGroupName, + DeploymentName = Name, + ProvisioningStates = string.IsNullOrEmpty(ProvisioningState) ? new List() : + new List() { ProvisioningState } + }; + + WriteObject(ResourcesClient.FilterResourceGroupDeployments(options), true); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources/ResourceGroupDeployments/NewAzureResourceGroupDeploymentCommand.cs b/src/ResourceManager/Resources/Commands.Resources/ResourceGroupDeployments/NewAzureResourceGroupDeploymentCommand.cs new file mode 100644 index 000000000000..a85e0dc8ecff --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/ResourceGroupDeployments/NewAzureResourceGroupDeploymentCommand.cs @@ -0,0 +1,53 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.Azure.Commands.Resources +{ + /// + /// Creates a new resource group deployment. + /// + [Cmdlet(VerbsCommon.New, "AzureResourceGroupDeployment", DefaultParameterSetName = BaseParameterSetName), OutputType(typeof(PSResourceGroupDeployment))] + public class NewAzureResourceGroupDeploymentCommand : ResourceWithParameterBaseCmdlet, IDynamicParameters + { + [Alias("DeploymentName")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The name of the deployment it's going to create. Only valid when a template is used. When a template is used, if the user doesn't specify a deployment name, use the current time, like \"20131223140835\".")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group name.")] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + public override void ExecuteCmdlet() + { + CreatePSResourceGroupDeploymentParameters parameters = new CreatePSResourceGroupDeploymentParameters() + { + ResourceGroupName = ResourceGroupName, + DeploymentName = Name, + GalleryTemplateIdentity = GalleryTemplateIdentity, + TemplateFile = TemplateUri ?? this.TryResolvePath(TemplateFile), + TemplateParameterObject = GetTemplateParameterObject(TemplateParameterObject), + TemplateVersion = TemplateVersion, + StorageAccountName = StorageAccountName + }; + + WriteObject(ResourcesClient.ExecuteDeployment(parameters)); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/ResourceGroupDeployments/StopAzureResourceGroupDeploymentCommand.cs b/src/ResourceManager/Resources/Commands.Resources/ResourceGroupDeployments/StopAzureResourceGroupDeploymentCommand.cs new file mode 100644 index 000000000000..7ddcb77495fe --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/ResourceGroupDeployments/StopAzureResourceGroupDeploymentCommand.cs @@ -0,0 +1,57 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Resources.Models; +using System.Management.Automation; +using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources; + +namespace Microsoft.Azure.Commands.Resources.ResourceGroups +{ + /// + /// Cancel a running deployment. + /// + [Cmdlet(VerbsLifecycle.Stop, "AzureResourceGroupDeployment"), OutputType(typeof(bool))] + public class StopAzureResourceGroupDeploymentCommand : ResourcesBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the resource group.")] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Alias("DeploymentName")] + [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the deployment.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Position = 2, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Do not confirm the stop.")] + public SwitchParameter Force { get; set; } + + [Parameter(Position = 3, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "True if succeed, false otherwise.")] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + ConfirmAction( + Force.IsPresent, + string.Format(ProjectResources.CancelResourceGroupDeployment, ResourceGroupName), + ProjectResources.CancelResourceGroupDeploymentMessage, + ResourceGroupName, + () => ResourcesClient.CancelDeployment(ResourceGroupName, Name)); + + if (PassThru) + { + WriteObject(true); + } + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/GetAzureLocationCommand.cs b/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/GetAzureLocationCommand.cs new file mode 100644 index 000000000000..6b0526179bba --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/GetAzureLocationCommand.cs @@ -0,0 +1,32 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.Azure.Commands.Resources.Models; + +namespace Microsoft.Azure.Commands.Resources +{ + /// + /// Get the available locations for certain resource types. + /// + [Cmdlet(VerbsCommon.Get, "AzureLocation"), OutputType(typeof(List))] + public class GetAzureLocationCommand : ResourcesBaseCmdlet + { + public override void ExecuteCmdlet() + { + WriteObject(ResourcesClient.GetLocations(), true); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/GetAzureResourceGroupCommand.cs b/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/GetAzureResourceGroupCommand.cs new file mode 100644 index 000000000000..12ece2649c21 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/GetAzureResourceGroupCommand.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Resources.Models; +using System.Collections; +using System.Collections.Generic; +using System.Management.Automation; + +namespace Microsoft.Azure.Commands.Resources +{ + /// + /// Filters resource groups. + /// + [Cmdlet(VerbsCommon.Get, "AzureResourceGroup"), OutputType(typeof(List))] + public class GetAzureResourceGroupCommand : ResourcesBaseCmdlet + { + [Alias("ResourceGroupName")] + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = "GetSingle")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Position = 0, Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = "GetMultiple")] + public Hashtable Tag { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = "GetMultiple")] + public SwitchParameter Detailed { get; set; } + + public override void ExecuteCmdlet() + { + var detailed = Detailed.IsPresent || !string.IsNullOrEmpty(Name); + WriteObject(ResourcesClient.FilterResourceGroups(Name, Tag, detailed), true); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/GetAzureResourceGroupLogCommand.cs b/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/GetAzureResourceGroupLogCommand.cs new file mode 100644 index 000000000000..227b4bfa8a78 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/GetAzureResourceGroupLogCommand.cs @@ -0,0 +1,56 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.Azure.Commands.Resources.Models; + +namespace Microsoft.Azure.Commands.Resources +{ + /// + /// Get the list of events for a deployment. + /// + [Cmdlet(VerbsCommon.Get, "AzureResourceGroupLog", DefaultParameterSetName = LastDeploymentSetName), OutputType(typeof(List))] + public class GetAzureResourceGroupLogCommand : ResourcesBaseCmdlet + { + internal const string AllSetName = "All"; + internal const string LastDeploymentSetName = "Last deployment"; + internal const string DeploymentNameSetName = "Deployment by name"; + + [Alias("ResourceGroupName")] + [Parameter(Position = 0, ParameterSetName = AllSetName, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the resource group you want to see the logs.")] + [Parameter(Position = 0, ParameterSetName = LastDeploymentSetName, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the resource group you want to see the logs.")] + [Parameter(Position = 0, ParameterSetName = DeploymentNameSetName, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the resource group you want to see the logs.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(ParameterSetName = DeploymentNameSetName, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the deployment whose logs you want to see.")] + [ValidateNotNullOrEmpty] + public string DeploymentName { get; set; } + + [Parameter(ParameterSetName = AllSetName, HelpMessage = "Optional. If given, return logs of all the operations including CRUD and deployment.")] + public SwitchParameter All { get; set; } + + public override void ExecuteCmdlet() + { + GetPSResourceGroupLogParameters parameters = new GetPSResourceGroupLogParameters + { + Name = Name, + DeploymentName = DeploymentName, + All = All.IsPresent + }; + WriteObject(ResourcesClient.GetResourceGroupLogs(parameters), true); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/NewAzureResourceGroupCommand.cs b/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/NewAzureResourceGroupCommand.cs new file mode 100644 index 000000000000..65749bef5122 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/NewAzureResourceGroupCommand.cs @@ -0,0 +1,69 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections; +using System.Management.Automation; +using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.Azure.Commands.Resources +{ + /// + /// Creates a new resource group. + /// + [Cmdlet(VerbsCommon.New, "AzureResourceGroup", DefaultParameterSetName = BaseParameterSetName), OutputType(typeof(PSResourceGroup))] + public class NewAzureResourceGroupCommand : ResourceWithParameterBaseCmdlet, IDynamicParameters + { + [Alias("ResourceGroupName")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group name.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group location.")] + [ValidateNotNullOrEmpty] + public string Location { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The name of the deployment it's going to create. Only valid when a template is used. When a template is used, if the user doesn't specify a deployment name, use the current time, like \"20131223140835\".")] + [ValidateNotNullOrEmpty] + public string DeploymentName { get; set; } + + [Alias("Tags")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "An array of hashtables which represents resource tags.")] + public Hashtable[] Tag { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Do not ask for confirmation.")] + public SwitchParameter Force { get; set; } + + public override void ExecuteCmdlet() + { + CreatePSResourceGroupParameters parameters = new CreatePSResourceGroupParameters + { + ResourceGroupName = Name, + Location = Location, + DeploymentName = DeploymentName, + GalleryTemplateIdentity = GalleryTemplateIdentity, + TemplateFile = TemplateUri ?? this.TryResolvePath(TemplateFile), + TemplateParameterObject = GetTemplateParameterObject(TemplateParameterObject), + TemplateVersion = TemplateVersion, + StorageAccountName = StorageAccountName, + Force = Force.IsPresent, + Tag = Tag, + ConfirmAction = ConfirmAction + }; + + WriteObject(ResourcesClient.CreatePSResourceGroup(parameters)); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/RemoveAzureResourceGroupCommand.cs b/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/RemoveAzureResourceGroupCommand.cs new file mode 100644 index 000000000000..3466c35e8ee1 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/RemoveAzureResourceGroupCommand.cs @@ -0,0 +1,53 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Resources.Models; +using System.Management.Automation; +using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources; + +namespace Microsoft.Azure.Commands.Resources +{ + /// + /// Removes a new resource group. + /// + [Cmdlet(VerbsCommon.Remove, "AzureResourceGroup", SupportsShouldProcess = true), OutputType(typeof(bool))] + public class RemoveAzureResourceGroupCommand : ResourcesBaseCmdlet + { + [Alias("ResourceGroupName")] + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the resource group.")] + [ValidateNotNullOrEmpty] + public string Name {get; set;} + + [Parameter(Mandatory = false, HelpMessage = "Do not ask for confirmation.")] + public SwitchParameter Force { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + ConfirmAction( + Force.IsPresent, + string.Format(ProjectResources.RemovingResourceGroup, Name), + ProjectResources.RemoveResourceGroupMessage, + Name, + () => ResourcesClient.DeleteResourceGroup(Name)); + + if (PassThru) + { + WriteObject(true); + } + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/SetAzureResourceGroupCommand.cs b/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/SetAzureResourceGroupCommand.cs new file mode 100644 index 000000000000..f0229511ca01 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/ResourceGroups/SetAzureResourceGroupCommand.cs @@ -0,0 +1,47 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections; +using System.Management.Automation; +using Microsoft.Azure.Commands.Resources.Models; + +namespace Microsoft.Azure.Commands.Resources +{ + /// + /// Updates an existing resource group. + /// + [Cmdlet(VerbsCommon.Set, "AzureResourceGroup"), OutputType(typeof(PSResourceGroup))] + public class SetAzureResourceGroupCommand : ResourcesBaseCmdlet + { + [Alias("ResourceGroupName")] + [Parameter(Mandatory = true, Position = 0, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group name.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Alias("Tags")] + [Parameter(Mandatory = true, Position = 1, ValueFromPipelineByPropertyName = true, HelpMessage = "An array of hashtables which represents resource tags.")] + public Hashtable[] Tag { get; set; } + + public override void ExecuteCmdlet() + { + UpdatePSResourceGroupParameters parameters = new UpdatePSResourceGroupParameters + { + ResourceGroupName = Name, + Tag = Tag + }; + + WriteObject(ResourcesClient.UpdatePSResourceGroup(parameters)); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Resources/GetAzureResourceCommand.cs b/src/ResourceManager/Resources/Commands.Resources/Resources/GetAzureResourceCommand.cs new file mode 100644 index 000000000000..97ad9cd3dcaf --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Resources/GetAzureResourceCommand.cs @@ -0,0 +1,93 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Resources.Models; +using System.Collections; +using System.Collections.Generic; +using System.Management.Automation; + +namespace Microsoft.Azure.Commands.Resources +{ + /// + /// Get an existing resource. + /// + [Cmdlet(VerbsCommon.Get, "AzureResource", DefaultParameterSetName = BaseParameterSetName), OutputType(typeof(PSResource))] + public class GetAzureResourceCommand : ResourcesBaseCmdlet + { + internal const string BaseParameterSetName = "List resources"; + internal const string ParameterSetNameWithId = "Get a single resource"; + + [Alias("ResourceName")] + [Parameter(ParameterSetName = ParameterSetNameWithId, Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource name.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(ParameterSetName = ParameterSetNameWithId, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group name.")] + [Parameter(ParameterSetName = BaseParameterSetName, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group name.")] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(ParameterSetName = ParameterSetNameWithId, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource type. In the format ResourceProvider/type.")] + [Parameter(ParameterSetName = BaseParameterSetName, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource type. In the format ResourceProvider/type.")] + [ValidateNotNullOrEmpty] + public string ResourceType { get; set; } + + [Parameter(ParameterSetName = BaseParameterSetName, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource tags.")] + public Hashtable Tag { get; set; } + + [Parameter(ParameterSetName = ParameterSetNameWithId, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the parent resource if needed. In the format of greatgrandpa/grandpa/dad.")] + public string ParentResource { get; set; } + + [Parameter(ParameterSetName = ParameterSetNameWithId, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Version of the resource provider API.")] + [ValidateNotNullOrEmpty] + public string ApiVersion { get; set; } + + public override void ExecuteCmdlet() + { + BasePSResourceParameters parameters = new BasePSResourceParameters() + { + Name = Name, + ResourceGroupName = ResourceGroupName, + ResourceType = ResourceType, + ParentResource = ParentResource, + ApiVersion = ApiVersion, + Tag = new[] { Tag } + }; + + List resourceList = ResourcesClient.FilterPSResources(parameters); + if (resourceList != null) + { + if (resourceList.Count == 1 && Name != null) + { + WriteObject(resourceList[0]); + } + else + { + List output = new List(); + resourceList.ForEach(r => output.Add(base.ConstructPSObject( + null, + "Name", r.Name, + "ResourceGroupName", r.ResourceGroupName, + "ResourceType", r.ResourceType, + "ParentResource", r.ParentResource, + "Location", r.Location, + "Permissions", r.PermissionsTable, + "ResourceId", r.ResourceId))); + + WriteObject(output, true); + } + } + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Resources/NewAzureResourceCommand.cs b/src/ResourceManager/Resources/Commands.Resources/Resources/NewAzureResourceCommand.cs new file mode 100644 index 000000000000..d3225e2ac825 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Resources/NewAzureResourceCommand.cs @@ -0,0 +1,64 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections; +using System.Management.Automation; +using Microsoft.Azure.Commands.Resources.Models; + +namespace Microsoft.Azure.Commands.Resources +{ + /// + /// Creates a new resource. + /// + [Cmdlet(VerbsCommon.New, "AzureResource"), OutputType(typeof(PSResource))] + public class NewAzureResourceCommand : ResourceBaseCmdlet + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource location.")] + [ValidateNotNullOrEmpty] + public string Location { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Version of the resource provider API.")] + [ValidateNotNullOrEmpty] + public string ApiVersion { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "A hash table which represents resource properties.")] + public Hashtable PropertyObject { get; set; } + + [Alias("Tags")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "A hash table which represents resource tags.")] + public Hashtable[] Tag { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Do not ask for confirmation.")] + public SwitchParameter Force { get; set; } + + public override void ExecuteCmdlet() + { + CreatePSResourceParameters parameters = new CreatePSResourceParameters() + { + Name = Name, + ResourceGroupName = ResourceGroupName, + ResourceType = ResourceType, + Location = Location, + ParentResource = ParentResource, + PropertyObject = PropertyObject, + Tag = Tag, + Force = Force.IsPresent, + ConfirmAction = ConfirmAction, + ApiVersion = ApiVersion, + }; + + WriteObject(ResourcesClient.CreatePSResource(parameters)); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Resources/RemoveAzureResourceCommand.cs b/src/ResourceManager/Resources/Commands.Resources/Resources/RemoveAzureResourceCommand.cs new file mode 100644 index 000000000000..cb2d5fdf54e1 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Resources/RemoveAzureResourceCommand.cs @@ -0,0 +1,61 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.Azure.Commands.Resources.Models; +using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources; + +namespace Microsoft.Azure.Commands.Resources +{ + /// + /// Deletes an existing resource. + /// + [Cmdlet(VerbsCommon.Remove, "AzureResource", SupportsShouldProcess = true), OutputType(typeof(bool))] + public class RemoveAzureResourceCommand : ResourceBaseCmdlet + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Version of the resource provider API.")] + [ValidateNotNullOrEmpty] + public string ApiVersion { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Do not ask for confirmation.")] + public SwitchParameter Force { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + BasePSResourceParameters parameters = new BasePSResourceParameters() + { + Name = Name, + ResourceGroupName = ResourceGroupName, + ResourceType = ResourceType, + ParentResource = ParentResource, + ApiVersion = ApiVersion + }; + + ConfirmAction( + Force.IsPresent, + string.Format(ProjectResources.RemovingResource, Name), + ProjectResources.RemoveResourceMessage, + Name, + () => ResourcesClient.DeleteResource(parameters)); + + if (PassThru) + { + WriteObject(true); + } + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Resources/SetAzureResourceCommand.cs b/src/ResourceManager/Resources/Commands.Resources/Resources/SetAzureResourceCommand.cs new file mode 100644 index 000000000000..6437c1d2631b --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Resources/SetAzureResourceCommand.cs @@ -0,0 +1,55 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections; +using System.Management.Automation; +using Microsoft.Azure.Commands.Resources.Models; + +namespace Microsoft.Azure.Commands.Resources +{ + /// + /// Updates an existing resource. + /// + [Cmdlet(VerbsCommon.Set, "AzureResource"), OutputType(typeof(PSResource))] + public class SetAzureResourceCommand : ResourceBaseCmdlet + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Version of the resource provider API.")] + [ValidateNotNullOrEmpty] + public string ApiVersion { get; set; } + + [Alias("Properties")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "A hash table which represents resource properties.")] + public Hashtable PropertyObject { get; set; } + + [Alias("Tags")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "An array of hashtables which represents resource tags.")] + public Hashtable[] Tag { get; set; } + + public override void ExecuteCmdlet() + { + UpdatePSResourceParameters parameters = new UpdatePSResourceParameters() + { + Name = Name, + ResourceGroupName = ResourceGroupName, + ResourceType = ResourceType, + ParentResource = ParentResource, + PropertyObject = PropertyObject, + ApiVersion = ApiVersion, + Tag = Tag + }; + + WriteObject(ResourcesClient.UpdatePSResource(parameters)); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/RoleAssignments/GetAzureRoleAssignmentCommand.cs b/src/ResourceManager/Resources/Commands.Resources/RoleAssignments/GetAzureRoleAssignmentCommand.cs new file mode 100644 index 000000000000..89285126a0f3 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/RoleAssignments/GetAzureRoleAssignmentCommand.cs @@ -0,0 +1,220 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.Azure.Commands.Resources.Models.ActiveDirectory; +using Microsoft.Azure.Commands.Resources.Models.Authorization; +using System; +using System.Collections.Generic; +using System.Management.Automation; + +namespace Microsoft.Azure.Commands.Resources +{ + /// + /// Filters role assignments + /// + [Cmdlet(VerbsCommon.Get, "AzureRoleAssignment", DefaultParameterSetName = ParameterSet.Empty), OutputType(typeof(List))] + public class GetAzureRoleAssignmentCommand : ResourcesBaseCmdlet + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ObjectId, + HelpMessage = "The user or group object id.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceGroupWithObjectId, + HelpMessage = "The user or group object id.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithObjectId, + HelpMessage = "The user or group object id.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ScopeWithObjectId, + HelpMessage = "The user or group object id.")] + [ValidateNotNullOrEmpty] + public Guid ObjectId { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.Mail, + HelpMessage = "The user email address.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceGroupWithMail, + HelpMessage = "The user email address.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithMail, + HelpMessage = "The user email address.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ScopeWithMail, + HelpMessage = "The user email address.")] + [ValidateNotNullOrEmpty] + public string Mail { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceGroupWithUPN, + HelpMessage = "The user UPN.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithUPN, + HelpMessage = "The user UPN.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ScopeWithUPN, + HelpMessage = "The user UPN.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.UPN, + HelpMessage = "The user UPN.")] + [ValidateNotNullOrEmpty] + [Alias("UPN")] + public string UserPrincipalName { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceGroupWithSPN, + HelpMessage = "The app SPN.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithSPN, + HelpMessage = "The app SPN.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ScopeWithSPN, + HelpMessage = "The app SPN.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.SPN, + HelpMessage = "The app SPN.")] + [ValidateNotNullOrEmpty] + [Alias("SPN")] + public string ServicePrincipalName { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceGroup, + HelpMessage = "Resource group to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.Resource, + HelpMessage = "Resource group to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceGroupWithObjectId, + HelpMessage = "Resource group to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithObjectId, + HelpMessage = "Resource group to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceGroupWithMail, + HelpMessage = "Resource group to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithMail, + HelpMessage = "Resource group to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceGroupWithUPN, + HelpMessage = "Resource group to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithUPN, + HelpMessage = "Resource group to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceGroupWithSPN, + HelpMessage = "Resource group to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithSPN, + HelpMessage = "Resource group to assign the role to.")] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.Resource, + HelpMessage = "Resource to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithObjectId, + HelpMessage = "Resource to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithMail, + HelpMessage = "Resource to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithUPN, + HelpMessage = "Resource to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithSPN, + HelpMessage = "Resource to assign the role to.")] + [ValidateNotNullOrEmpty] + public string ResourceName { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.Resource, + HelpMessage = "Type of the resource to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithObjectId, + HelpMessage = "Type of the resource to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithMail, + HelpMessage = "Type of the resource to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithUPN, + HelpMessage = "Type of the resource to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithSPN, + HelpMessage = "Type of the resource to assign the role to.")] + [ValidateNotNullOrEmpty] + public string ResourceType { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.Resource, + HelpMessage = "Parent resource of the resource to assign the role to, if there is any.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithObjectId, + HelpMessage = "Parent resource of the resource to assign the role to, if there is any.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithMail, + HelpMessage = "Parent resource of the resource to assign the role to, if there is any.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithUPN, + HelpMessage = "Parent resource of the resource to assign the role to, if there is any.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithSPN, + HelpMessage = "Parent resource of the resource to assign the role to, if there is any.")] + [ValidateNotNullOrEmpty] + public string ParentResource { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.Empty, + HelpMessage = "Role to assign the principals with.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.Mail, + HelpMessage = "Role to assign the principals with.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ObjectId, + HelpMessage = "Role to assign the principals with.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.UPN, + HelpMessage = "Role to assign the principals with.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.SPN, + HelpMessage = "Role to assign the principals with.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.Scope, + HelpMessage = "Role to assign the principals with.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ScopeWithMail, + HelpMessage = "Role to assign the principals with.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ScopeWithObjectId, + HelpMessage = "Role to assign the principals with.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ScopeWithUPN, + HelpMessage = "Role to assign the principals with.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ScopeWithSPN, + HelpMessage = "Role to assign the principals with.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceGroup, + HelpMessage = "Role to assign the principals with.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceGroupWithMail, + HelpMessage = "Role to assign the principals with.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceGroupWithObjectId, + HelpMessage = "Role to assign the principals with.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceGroupWithUPN, + HelpMessage = "Role to assign the principals with.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceGroupWithSPN, + HelpMessage = "Role to assign the principals with.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.Resource, + HelpMessage = "Role to assign the principals with.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithMail, + HelpMessage = "Role to assign the principals with.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithObjectId, + HelpMessage = "Role to assign the principals with.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithUPN, + HelpMessage = "Role to assign the principals with.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithSPN, + HelpMessage = "Role to assign the principals with.")] + [ValidateNotNullOrEmpty] + public string RoleDefinitionName { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.Scope, + HelpMessage = "Scope of the role assignment. In the format of relative URI.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ScopeWithObjectId, + HelpMessage = "Scope of the role assignment. In the format of relative URI.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ScopeWithMail, + HelpMessage = "Scope of the role assignment. In the format of relative URI.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ScopeWithUPN, + HelpMessage = "Scope of the role assignment. In the format of relative URI.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ScopeWithSPN, + HelpMessage = "Scope of the role assignment. In the format of relative URI.")] + [ValidateNotNullOrEmpty] + public string Scope { get; set; } + + public override void ExecuteCmdlet() + { + FilterRoleAssignmentsOptions options = new FilterRoleAssignmentsOptions() + { + Scope = Scope, + RoleDefinition = RoleDefinitionName, + ADObjectFilter = new ADObjectFilterOptions + { + Mail = Mail, + UPN = UserPrincipalName, + SPN = ServicePrincipalName, + Id = ObjectId == Guid.Empty ? null : ObjectId.ToString(), + }, + ResourceIdentifier = new ResourceIdentifier() + { + ParentResource = ParentResource, + ResourceGroupName = ResourceGroupName, + ResourceName = ResourceName, + ResourceType = ResourceType, + Subscription = string.IsNullOrEmpty(ResourceGroupName) ? null : CurrentContext.Subscription.Id.ToString() + } + }; + + WriteObject(PoliciesClient.FilterRoleAssignments(options), true); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources/RoleAssignments/NewAzureRoleAssignmentCommand.cs b/src/ResourceManager/Resources/Commands.Resources/RoleAssignments/NewAzureRoleAssignmentCommand.cs new file mode 100644 index 000000000000..ebceb5d7a2f0 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/RoleAssignments/NewAzureRoleAssignmentCommand.cs @@ -0,0 +1,169 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.Azure.Commands.Resources.Models.ActiveDirectory; +using Microsoft.Azure.Commands.Resources.Models.Authorization; +using System; +using System.Management.Automation; + +namespace Microsoft.Azure.Commands.Resources +{ + /// + /// Creates new role assignment. + /// + [Cmdlet(VerbsCommon.New, "AzureRoleAssignment"), OutputType(typeof(PSRoleAssignment))] + public class NewAzureRoleAssignmentCommand : ResourcesBaseCmdlet + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceGroupWithObjectId, + HelpMessage = "The user or group object id.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithObjectId, + HelpMessage = "The user or group object id.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ScopeWithObjectId, + HelpMessage = "The user or group object id.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ObjectId, + HelpMessage = "The user or group object id.")] + [ValidateNotNullOrEmpty] + [Alias("Id")] + public Guid ObjectId { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceGroupWithMail, + HelpMessage = "The user or group email address.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithMail, + HelpMessage = "The user or group email address.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ScopeWithMail, + HelpMessage = "The user or group email address.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.Mail, + HelpMessage = "The user or group email address.")] + [ValidateNotNullOrEmpty] + public string Mail { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceGroupWithUPN, + HelpMessage = "The user UPN.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithUPN, + HelpMessage = "The user UPN.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ScopeWithUPN, + HelpMessage = "The user UPN.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.UPN, + HelpMessage = "The user UPN.")] + [ValidateNotNullOrEmpty] + [Alias("UPN")] + public string UserPrincipalName { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceGroupWithSPN, + HelpMessage = "The app SPN.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithSPN, + HelpMessage = "The app SPN.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ScopeWithSPN, + HelpMessage = "The app SPN.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.SPN, + HelpMessage = "The app SPN.")] + [ValidateNotNullOrEmpty] + [Alias("SPN")] + public string ServicePrincipalName { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceGroupWithObjectId, + HelpMessage = "Resource group to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithObjectId, + HelpMessage = "Resource group to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceGroupWithMail, + HelpMessage = "Resource group to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithMail, + HelpMessage = "Resource group to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceGroupWithUPN, + HelpMessage = "Resource group to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithUPN, + HelpMessage = "Resource group to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceGroupWithSPN, + HelpMessage = "Resource group to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithSPN, + HelpMessage = "Resource group to assign the role to.")] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithObjectId, + HelpMessage = "Resource to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithMail, + HelpMessage = "Resource to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithUPN, + HelpMessage = "Resource to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithSPN, + HelpMessage = "Resource to assign the role to.")] + [ValidateNotNullOrEmpty] + public string ResourceName { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithObjectId, + HelpMessage = "Type of the resource to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithMail, + HelpMessage = "Type of the resource to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithUPN, + HelpMessage = "Type of the resource to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithSPN, + HelpMessage = "Type of the resource to assign the role to.")] + [ValidateNotNullOrEmpty] + public string ResourceType { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithObjectId, + HelpMessage = "Parent resource of the resource to assign the role to, if there is any.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithMail, + HelpMessage = "Parent resource of the resource to assign the role to, if there is any.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithUPN, + HelpMessage = "Parent resource of the resource to assign the role to, if there is any.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithSPN, + HelpMessage = "Parent resource of the resource to assign the role to, if there is any.")] + [ValidateNotNullOrEmpty] + public string ParentResource { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ScopeWithObjectId, + HelpMessage = "Scope of the role assignment. In the format of relative URI. If not specified, will assign the role at subscription level. If specified, it can either start with \"/subscriptions/\" or the part after that. If it's latter, the current subscription id will be used.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ScopeWithMail, + HelpMessage = "Scope of the role assignment. In the format of relative URI. If not specified, will assign the role at subscription level. If specified, it can either start with \"/subscriptions/\" or the part after that. If it's latter, the current subscription id will be used.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ScopeWithUPN, + HelpMessage = "Scope of the role assignment. In the format of relative URI. If not specified, will assign the role at subscription level. If specified, it can either start with \"/subscriptions/\" or the part after that. If it's latter, the current subscription id will be used.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ScopeWithSPN, + HelpMessage = "Scope of the role assignment. In the format of relative URI. If not specified, will assign the role at subscription level. If specified, it can either start with \"/subscriptions/\" or the part after that. If it's latter, the current subscription id will be used.")] + [ValidateNotNullOrEmpty] + public string Scope { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Role to assign the principals with.")] + [ValidateNotNullOrEmpty] + public string RoleDefinitionName { get; set; } + + public override void ExecuteCmdlet() + { + FilterRoleAssignmentsOptions parameters = new FilterRoleAssignmentsOptions() + { + Scope = Scope, + RoleDefinition = RoleDefinitionName, + ADObjectFilter = new ADObjectFilterOptions + { + Mail = Mail, + UPN = UserPrincipalName, + SPN = ServicePrincipalName, + Id = ObjectId == Guid.Empty ? null : ObjectId.ToString(), + }, + ResourceIdentifier = new ResourceIdentifier() + { + ParentResource = ParentResource, + ResourceGroupName = ResourceGroupName, + ResourceName = ResourceName, + ResourceType = ResourceType, + Subscription = CurrentContext.Subscription.Id.ToString(), + } + }; + + WriteObject(PoliciesClient.CreateRoleAssignment(parameters)); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources/RoleAssignments/RemoveAzureRoleAssignmentCommand.cs b/src/ResourceManager/Resources/Commands.Resources/RoleAssignments/RemoveAzureRoleAssignmentCommand.cs new file mode 100644 index 000000000000..4bd28130aec6 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/RoleAssignments/RemoveAzureRoleAssignmentCommand.cs @@ -0,0 +1,191 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.Azure.Commands.Resources.Models.ActiveDirectory; +using Microsoft.Azure.Commands.Resources.Models.Authorization; +using System; +using System.Collections.Generic; +using System.Management.Automation; +using ProjectResources = Microsoft.Azure.Commands.Resources.Properties.Resources; + +namespace Microsoft.Azure.Commands.Resources +{ + /// + /// Removes a given role assignment. + /// + [Cmdlet(VerbsCommon.Remove, "AzureRoleAssignment"), OutputType(typeof(List))] + public class RemoveAzureRoleAssignmentCommand : ResourcesBaseCmdlet + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceGroupWithObjectId, + HelpMessage = "The user or group object id.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithObjectId, + HelpMessage = "The user or group object id.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ScopeWithObjectId, + HelpMessage = "The user or group object id.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ObjectId, + HelpMessage = "The user or group object id.")] + [ValidateNotNullOrEmpty] + [Alias("Id")] + public Guid ObjectId { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceGroupWithMail, + HelpMessage = "The user or group email address.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithMail, + HelpMessage = "The user or group email address.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ScopeWithMail, + HelpMessage = "The user or group email address.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.Mail, + HelpMessage = "The user or group email address.")] + [ValidateNotNullOrEmpty] + public string Mail { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceGroupWithUPN, + HelpMessage = "The user UPN.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithUPN, + HelpMessage = "The user UPN.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ScopeWithUPN, + HelpMessage = "The user UPN.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.UPN, + HelpMessage = "The user UPN.")] + [ValidateNotNullOrEmpty] + [Alias("UPN")] + public string UserPrincipalName { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceGroupWithSPN, + HelpMessage = "The app SPN.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithSPN, + HelpMessage = "The app SPN.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ScopeWithSPN, + HelpMessage = "The app SPN.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.SPN, + HelpMessage = "The app SPN.")] + [ValidateNotNullOrEmpty] + [Alias("SPN")] + public string ServicePrincipalName { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceGroupWithObjectId, + HelpMessage = "Resource group to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithObjectId, + HelpMessage = "Resource group to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceGroupWithMail, + HelpMessage = "Resource group to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithMail, + HelpMessage = "Resource group to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceGroupWithUPN, + HelpMessage = "Resource group to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithUPN, + HelpMessage = "Resource group to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceGroupWithSPN, + HelpMessage = "Resource group to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithSPN, + HelpMessage = "Resource group to assign the role to.")] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithObjectId, + HelpMessage = "Resource to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithMail, + HelpMessage = "Resource to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithUPN, + HelpMessage = "Resource to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithSPN, + HelpMessage = "Resource to assign the role to.")] + [ValidateNotNullOrEmpty] + public string ResourceName { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithObjectId, + HelpMessage = "Type of the resource to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithMail, + HelpMessage = "Type of the resource to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithUPN, + HelpMessage = "Type of the resource to assign the role to.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithSPN, + HelpMessage = "Type of the resource to assign the role to.")] + [ValidateNotNullOrEmpty] + public string ResourceType { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithObjectId, + HelpMessage = "Parent resource of the resource to assign the role to, if there is any.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithMail, + HelpMessage = "Parent resource of the resource to assign the role to, if there is any.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithUPN, + HelpMessage = "Parent resource of the resource to assign the role to, if there is any.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithSPN, + HelpMessage = "Parent resource of the resource to assign the role to, if there is any.")] + [ValidateNotNullOrEmpty] + public string ParentResource { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ScopeWithObjectId, + HelpMessage = "Scope of the role assignment. In the format of relative URI. If not specified, will assign the role at subscription level. If specified, it can either start with \"/subscriptions/\" or the part after that. If it's latter, the current subscription id will be used.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ScopeWithMail, + HelpMessage = "Scope of the role assignment. In the format of relative URI. If not specified, will assign the role at subscription level. If specified, it can either start with \"/subscriptions/\" or the part after that. If it's latter, the current subscription id will be used.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ScopeWithUPN, + HelpMessage = "Scope of the role assignment. In the format of relative URI. If not specified, will assign the role at subscription level. If specified, it can either start with \"/subscriptions/\" or the part after that. If it's latter, the current subscription id will be used.")] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ScopeWithSPN, + HelpMessage = "Scope of the role assignment. In the format of relative URI. If not specified, will assign the role at subscription level. If specified, it can either start with \"/subscriptions/\" or the part after that. If it's latter, the current subscription id will be used.")] + [ValidateNotNullOrEmpty] + public string Scope { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Role to assign the principals with.")] + [ValidateNotNullOrEmpty] + public string RoleDefinitionName { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter Force { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + PSRoleAssignment roleAssignment = null; + FilterRoleAssignmentsOptions options = new FilterRoleAssignmentsOptions() + { + Scope = Scope, + RoleDefinition = RoleDefinitionName, + ADObjectFilter = new ADObjectFilterOptions + { + Mail = Mail, + Id = ObjectId == Guid.Empty ? null : ObjectId.ToString(), + UPN = UserPrincipalName, + SPN = ServicePrincipalName + }, + ResourceIdentifier = new ResourceIdentifier() + { + ParentResource = ParentResource, + ResourceGroupName = ResourceGroupName, + ResourceName = ResourceName, + ResourceType = ResourceType, + Subscription = CurrentContext.Subscription.Id.ToString() + } + }; + + ConfirmAction( + Force.IsPresent, + string.Format(ProjectResources.RemovingRoleAssignment, + options.ADObjectFilter.ActiveFilter, + options.Scope, + options.RoleDefinition), + ProjectResources.RemovingRoleAssignment, + null, + () => roleAssignment = PoliciesClient.RemoveRoleAssignment(options)); + + if (PassThru) + { + WriteObject(roleAssignment); + } + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources/RoleDefinitions/GetAzureRoleDefinitionCommand.cs b/src/ResourceManager/Resources/Commands.Resources/RoleDefinitions/GetAzureRoleDefinitionCommand.cs new file mode 100644 index 000000000000..6faef0ec68cb --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/RoleDefinitions/GetAzureRoleDefinitionCommand.cs @@ -0,0 +1,37 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.Azure.Commands.Resources.Models.Authorization; +using System.Collections.Generic; +using System.Management.Automation; + +namespace Microsoft.Azure.Commands.Resources +{ + /// + /// Get the available role Definitions for certain resource types. + /// + [Cmdlet(VerbsCommon.Get, "AzureRoleDefinition"), OutputType(typeof(List))] + public class GetAzureRoleDefinitionCommand : ResourcesBaseCmdlet + { + [Parameter(Position = 0, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Optional. The name of the role Definition.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + public override void ExecuteCmdlet() + { + WriteObject(PoliciesClient.FilterRoleDefinitions(Name), true); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources/Templates/GetAzureResourceGroupGalleryTemplateCommand.cs b/src/ResourceManager/Resources/Commands.Resources/Templates/GetAzureResourceGroupGalleryTemplateCommand.cs new file mode 100644 index 000000000000..54fdb43e08f3 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Templates/GetAzureResourceGroupGalleryTemplateCommand.cs @@ -0,0 +1,90 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using Microsoft.Azure.Commands.Resources.Models; + +namespace Microsoft.Azure.Commands.Resources.Templates +{ + /// + /// Get one template or a list of templates from the gallery. + /// + [Cmdlet(VerbsCommon.Get, "AzureResourceGroupGalleryTemplate", DefaultParameterSetName = BaseParameterSetName), OutputType(typeof(List))] + public class GetAzureResourceGroupGalleryTemplateCommand : ResourcesBaseCmdlet + { + internal const string BaseParameterSetName = "List gallery templates"; + internal const string ParameterSetNameWithIdentity = "Get a single gallery template"; + + [Parameter(Position = 0, ParameterSetName = ParameterSetNameWithIdentity, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Optional. Name of the template.")] + [ValidateNotNullOrEmpty] + public string Identity { get; set; } + + [Parameter(Position = 1, ParameterSetName = BaseParameterSetName, Mandatory = false, HelpMessage = "Optional. Publisher of the template.")] + [ValidateNotNullOrEmpty] + public string Publisher { get; set; } + + [Parameter(Position = 2, ParameterSetName = BaseParameterSetName, Mandatory = false, HelpMessage = "Optional. Category of the template.")] + [ValidateNotNullOrEmpty] + public string Category { get; set; } + + [Parameter(Position = 3, ParameterSetName = BaseParameterSetName, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Optional. Name of the application.")] + [ValidateNotNullOrEmpty] + public string ApplicationName { get; set; } + + [Parameter(Position = 4, ParameterSetName = BaseParameterSetName, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Optional. Include all versions.")] + public SwitchParameter AllVersions { get; set; } + + public override void ExecuteCmdlet() + { + FilterGalleryTemplatesOptions options = new FilterGalleryTemplatesOptions() + { + Category = Category, + Identity = Identity, + Publisher = Publisher, + ApplicationName = ApplicationName, + AllVersions = AllVersions + }; + + if (Category == null && Identity == null && Publisher == null && ApplicationName == null) + { + // if there are no filter parameters, return everything + options.AllVersions = true; + } + + List galleryItems = GalleryTemplatesClient.FilterGalleryTemplates(options); + + if (galleryItems != null) + { + if (galleryItems.Count == 1 && !string.IsNullOrEmpty(Identity)) + { + WriteObject(galleryItems[0]); + } + else + { + List output = new List(); + galleryItems.Where(gi => !gi.Identity.EndsWith("-placeholder")) + .OrderBy(gi => gi.Identity) + .ToList() + .ForEach(gi => output.Add(base.ConstructPSObject( + null, + "Publisher", gi.Publisher, + "Identity", gi.Identity))); + WriteObject(output, true); + } + } + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Templates/SaveAzureResourceGroupGalleryTemplateCommand.cs b/src/ResourceManager/Resources/Commands.Resources/Templates/SaveAzureResourceGroupGalleryTemplateCommand.cs new file mode 100644 index 000000000000..b16092d8d93f --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Templates/SaveAzureResourceGroupGalleryTemplateCommand.cs @@ -0,0 +1,48 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.Azure.Commands.Resources.Models; + +namespace Microsoft.Azure.Commands.Resources.Templates +{ + /// + /// Downloads a template file to the disk. + /// + [Cmdlet(VerbsData.Save, "AzureResourceGroupGalleryTemplate"), OutputType(typeof(PSObject))] + public class SaveAzureResourceGroupGalleryTemplateCommand : ResourcesBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The gallery template identity.")] + [ValidateNotNullOrEmpty] + public string Identity { get; set; } + + [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The output path of the file.")] + [ValidateNotNullOrEmpty] + public string Path { get; set; } + + [Parameter(Position = 2, Mandatory = false, HelpMessage = "Do not ask for confirmation.")] + public SwitchParameter Force { get; set; } + + public override void ExecuteCmdlet() + { + string path = GalleryTemplatesClient.DownloadGalleryTemplateFile( + Identity, + string.IsNullOrEmpty(Path) ? System.IO.Path.Combine(CurrentPath(), Identity) : this.TryResolvePath(Path), + Force, + ConfirmAction); + WriteObject(PowerShellUtilities.ConstructPSObject(null, "Path", path)); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/Templates/TestAzureResourceGroupTemplateCommand.cs b/src/ResourceManager/Resources/Commands.Resources/Templates/TestAzureResourceGroupTemplateCommand.cs new file mode 100644 index 000000000000..841a88499d0a --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/Templates/TestAzureResourceGroupTemplateCommand.cs @@ -0,0 +1,47 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.Azure.Commands.Resources.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.Azure.Commands.Resources.ResourceGroupDeployments +{ + /// + /// Validate a template to see whether it's using the right syntax, resource providers, resource types, etc. + /// + [Cmdlet(VerbsDiagnostic.Test, "AzureResourceGroupTemplate", DefaultParameterSetName = ParameterlessTemplateFileParameterSetName), OutputType(typeof(List))] + public class TestAzureResourceGroupTemplateCommand : ResourceWithParameterBaseCmdlet, IDynamicParameters + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group name.")] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + public override void ExecuteCmdlet() + { + ValidatePSResourceGroupDeploymentParameters parameters = new ValidatePSResourceGroupDeploymentParameters() + { + ResourceGroupName = ResourceGroupName, + GalleryTemplateIdentity = GalleryTemplateIdentity, + TemplateFile = TemplateUri ?? this.TryResolvePath(TemplateFile), + TemplateParameterObject = GetTemplateParameterObject(TemplateParameterObject), + TemplateVersion = TemplateVersion, + StorageAccountName = StorageAccountName + }; + + WriteObject(ResourcesClient.ValidatePSResourceGroupDeployment(parameters)); + } + } +} diff --git a/src/ResourceManager/Resources/Commands.Resources/packages.config b/src/ResourceManager/Resources/Commands.Resources/packages.config new file mode 100644 index 000000000000..4af1bc0c2f29 --- /dev/null +++ b/src/ResourceManager/Resources/Commands.Resources/packages.config @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/Commands.Sql.Test.csproj b/src/ResourceManager/Sql/Commands.Sql.Test/Commands.Sql.Test.csproj new file mode 100644 index 000000000000..96f800352f71 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/Commands.Sql.Test.csproj @@ -0,0 +1,286 @@ + + + + + Debug + AnyCPU + {56ED8C97-53B9-4DF6-ACB5-7E6800105BF8} + Library + Properties + Microsoft.Azure.Commands.Sql.Test + Microsoft.Azure.Commands.Sql.Test + v4.5 + 512 + + ..\..\..\ + true + /assemblyCompareMode:StrongNameIgnoringVersion + + + true + MSSharedLibKey.snk + true + true + false + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + bin\Release\ + TRACE;SIGN + true + pdbonly + AnyCPU + prompt + false + + + + False + ..\..\..\packages\Microsoft.Azure.Gallery.2.2.1-preview\lib\net40\Microsoft.Azure.Gallery.dll + + + False + ..\..\..\packages\Microsoft.Azure.Management.Sql.0.14.0-prerelease\lib\net40\Microsoft.Azure.Management.Sql.dll + + + False + ..\..\..\packages\Microsoft.Azure.Monitoring.2.2.1-preview\lib\net40\Microsoft.Azure.Monitoring.dll + + + False + ..\..\..\packages\Microsoft.Azure.Management.Resources.2.7.1-preview\lib\net40\Microsoft.Azure.ResourceManager.dll + + + False + ..\..\..\packages\Hydra.HttpRecorder.1.0.5417.13285-prerelease\lib\net45\Microsoft.Azure.Utilities.HttpRecorder.dll + + + False + ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll + + + False + ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.3.1.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll + + + False + ..\..\..\packages\Hydra.SpecTestSupport.1.0.5417.13285-prerelease\lib\net45\Microsoft.WindowsAzure.Testing.dll + + + False + ..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll + + + False + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + + + + + False + C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Management.Automation\v4.0_3.0.0.0__31bf3856ad364e35\System.Management.Automation.dll + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + + + + + False + ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + + False + ..\..\..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + + + + + True + True + Resources.resx + + + + + + + {c1bda476-a5cc-4394-914d-48b0ec31a710} + Commands.ScenarioTests.Common + + + {bc420543-c04e-4bf3-96e1-cd81b823bdd7} + Commands.Test.Utilities + + + {e1f5201d-6067-430e-b303-4e367652991b} + Commands.Resources + + + {65c3a86a-716d-4e7d-ab67-1db00b3bf72d} + Commands.Common.Storage + + + {3b48a77b-5956-4a62-9081-92ba04b02b27} + Commands.Common.Test + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + {69ed499e-6f3c-488f-86b8-b74cfda4d47e} + Commands.Sql + + + + + + + + + Designer + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + + + + + + + xcopy "$(SolutionDir)Package\$(ConfigurationName)\*.*" $(TargetDir) /Y /E + + + \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/MSSharedLibKey.snk b/src/ResourceManager/Sql/Commands.Sql.Test/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ResourceManager/Sql/Commands.Sql.Test/MSSharedLibKey.snk differ diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/Properties/AssemblyInfo.cs b/src/ResourceManager/Sql/Commands.Sql.Test/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..ce38135abe81 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft.Azure.Commands.Sql.Test")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Microsoft.Azure.Commands.Sql.Test")] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("f6f46134-9c1b-4599-8dd0-789299c076ef")] + +[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] +[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/Properties/Resources.Designer.cs b/src/ResourceManager/Sql/Commands.Sql.Test/Properties/Resources.Designer.cs new file mode 100644 index 000000000000..041d3fef99af --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.Azure.Commands.Resources.Test.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Azure.Commands.Resources.Test.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/Properties/Resources.resx b/src/ResourceManager/Sql/Commands.Sql.Test/Properties/Resources.resx new file mode 100644 index 000000000000..4fdb1b6aff69 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/Properties/Resources.resx @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/Common.ps1 b/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/Common.ps1 new file mode 100644 index 000000000000..04bc9885c34c --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/Common.ps1 @@ -0,0 +1,47 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +<# +.SYNOPSIS +Gets the values of the parameters used at the auditing tests +#> +function Get-SqlAuditingTestEnvironmentParameters ($testSuffix) +{ + return @{ rgname = "sql-audit-cmdlet-test-rg" +$testSuffix; + serverName = "sql-audit-cmdlet-server" +$testSuffix; + databaseName = "sql-audit-cmdlet-db" + $testSuffix; + storageAccount = "auditcmdlets" +$testSuffix + } +} + +<# +.SYNOPSIS +Creates the test environment needed to perform the Sql auditing tests +#> +function Create-TestEnvironment ($testSuffix) +{ + $params = Get-SqlAuditingTestEnvironmentParameters $testSuffix + New-AzureStorageAccount -StorageAccountName $params.storageAccount -Location "West US" + New-AzureResourceGroup -Name $params.rgname -Location "West US" -TemplateFile ".\Templates\sql-audit-test-env-setup.json" -serverName $params.serverName -databaseName $params.databaseName -EnvLocation "West US" -Force +} + +<# +.SYNOPSIS +Removes the test environment that was needed to perform the Sql auditing tests +#> +function Remove-TestEnvironment ($testSuffix) +{ + $params = Get-SqlAuditingTestEnvironmentParameters $testSuffix + Remove-AzureStorageAccount -StorageAccountName $params.storageAccount +} \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/SecurityTests.cs b/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/SecurityTests.cs new file mode 100644 index 000000000000..8a69b6f75149 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/SecurityTests.cs @@ -0,0 +1,196 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Xunit; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; + +namespace Microsoft.Azure.Commands.ScenarioTest.SqlTests +{ + public class SecurityTests : SqlTestsBase + { + [Fact(Skip = "Skip for the version header upgrade on Storage library.")] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestDatabaseUpdatePolicyWithStorage() + { + RunPowerShellTest("Test-DatabaseUpdatePolicyWithStorage"); + } + + [Fact(Skip = "Skip for the version header upgrade on Storage library.")] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestServerUpdatePolicyWithStorage() + { + RunPowerShellTest("Test-ServerUpdatePolicyWithStorage"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestDatabaseUpdatePolicyWithEventTypes() + { + RunPowerShellTest("Test-DatabaseUpdatePolicyWithEventTypes"); + } + + [Fact(Skip = "Skip for the version header upgrade on Storage library.")] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestServerUpdatePolicyWithEventTypes() + { + RunPowerShellTest("Test-ServerUpdatePolicyWithEventTypes"); + } + + [Fact(Skip = "Skip for the version header upgrade on Storage library.")] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestDisableDatabaseAuditing() + { + RunPowerShellTest("Test-DisableDatabaseAuditing"); + } + + [Fact(Skip = "Skip for the version header upgrade on Storage library.")] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestDisableServerAuditing() + { + RunPowerShellTest("Test-DisableServerAuditing"); + } + + [Fact(Skip = "Skip for the version header upgrade on Storage library.")] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestDatabaseDisableEnableKeepProperties() + { + RunPowerShellTest("Test-DatabaseDisableEnableKeepProperties"); + } + + [Fact(Skip = "Skip for the version header upgrade on Storage library.")] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestServerDisableEnableKeepProperties() + { + RunPowerShellTest("Test-ServerDisableEnableKeepProperties"); + } + + [Fact(Skip = "Skip for the version header upgrade on Storage library.")] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestUseServerDefault() + { + RunPowerShellTest("Test-UseServerDefault"); + } + + [Fact(Skip = "Skip for the version header upgrade on Storage library.")] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestFailedDatabaseUpdatePolicyWithNoStorage() + { + RunPowerShellTest("Test-FailedDatabaseUpdatePolicyWithNoStorage"); + } + + [Fact(Skip = "Skip for the version header upgrade on Storage library.")] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestFailedServerUpdatePolicyWithNoStorage() + { + RunPowerShellTest("Test-FailedServerUpdatePolicyWithNoStorage"); + } + + [Fact(Skip = "Skip for the version header upgrade on Storage library.")] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestFailedUseServerDefault() + { + RunPowerShellTest("Test-FailedUseServerDefault"); + } + + [Fact(Skip = "Skip for the version header upgrade on Storage library.")] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestDatabaseUpdatePolicyWithEventTypeShortcuts() + { + RunPowerShellTest("Test-DatabaseUpdatePolicyWithEventTypeShortcuts"); + } + + [Fact(Skip = "Skip for the version header upgrade on Storage library.")] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestServerUpdatePolicyWithEventTypeShortcuts() + { + RunPowerShellTest("Test-ServerUpdatePolicyWithEventTypeShortcuts"); + } + + [Fact(Skip = "Skip for the version header upgrade on Storage library.")] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestDatabaseUpdatePolicyKeepPreviousStorage() + { + RunPowerShellTest("Test-DatabaseUpdatePolicyKeepPreviousStorage"); + } + + [Fact(Skip = "Skip for the version header upgrade on Storage library.")] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestServerUpdatePolicyKeepPreviousStorage() + { + RunPowerShellTest("Test-ServerUpdatePolicyKeepPreviousStorage"); + } + + [Fact(Skip = "Skip for the version header upgrade on Storage library.")] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestFailWithBadDatabaseIndentity() + { + RunPowerShellTest("Test-FailWithBadDatabaseIndentity"); + } + + [Fact(Skip = "Skip for the version header upgrade on Storage library.")] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestFailWithBadServerIndentity() + { + RunPowerShellTest("Test-FailWithBadServerIndentity"); + } + + [Fact(Skip = "Skip for the version header upgrade on Storage library.")] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestDatabaseDirectAccess() + { + RunPowerShellTest("Test-DatabaseDirectAccess"); + } + + [Fact(Skip = "Skip for the version header upgrade on Storage library.")] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestServerDirectAccess() + { + RunPowerShellTest("Test-ServerDirectAccess"); + } + + [Fact(Skip = "Skip for the version header upgrade on Storage library.")] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestDatabaseStorageKeyRotation() + { + RunPowerShellTest("Test-DatabaseStorageKeyRotation"); + } + + [Fact(Skip = "Skip for the version header upgrade on Storage library.")] + [Trait(Category.RunType, Category.LiveOnly)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestServerStorageKeyRotation() + { + RunPowerShellTest("Test-ServerStorageKeyRotation"); + } + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/SecurityTests.ps1 b/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/SecurityTests.ps1 new file mode 100644 index 000000000000..0da52040e98c --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/SecurityTests.ps1 @@ -0,0 +1,771 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +<# +.SYNOPSIS +Tests that when setting the storage account property's value in a database's auditing policy, that value is later fetched properly +#> +function Test-DatabaseUpdatePolicyWithStorage +{ + # Setup + $testSuffix = 101 + Create-TestEnvironment $testSuffix + $params = Get-SqlAuditingTestEnvironmentParameters $testSuffix + + try + { + # Test + Set-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName -StorageAccountName $params.storageAccount + $policy = Get-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName + + # Assert + Assert-AreEqual $policy.StorageAccountName $params.storageAccount + Assert-True { $policy.IsEnabled } + Assert-False { $policy.UseServerDefault } + } + finally + { + # Cleanup + Remove-TestEnvironment $testSuffix + } +} + +<# +.SYNOPSIS +Tests that when setting the storage account property's value in a server's auditing policy, that value is later fetched properly +#> +function Test-ServerUpdatePolicyWithStorage +{ + # Setup + $testSuffix = 201 + Create-TestEnvironment $testSuffix + $params = Get-SqlAuditingTestEnvironmentParameters $testSuffix + + try + { + # Test + Set-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -StorageAccountName $params.storageAccount + $policy = Get-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName + + # Assert + Assert-AreEqual $policy.StorageAccountName $params.storageAccount + Assert-True { $policy.IsEnabled } + } + finally + { + # Cleanup + Remove-TestEnvironment $testSuffix + } +} + +<# +.SYNOPSIS +Tests that after setting the storage account property's value in a database's auditing policy, this value is used on next policy set operations as default. Meaning: if you don't want to change the +storage account, you don't need to provide it. +#> +function Test-DatabaseUpdatePolicyKeepPreviousStorage +{ + # Setup + $testSuffix = 301 + Create-TestEnvironment $testSuffix + $params = Get-SqlAuditingTestEnvironmentParameters $testSuffix + + try + { + # Test + Set-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName -StorageAccountName $params.storageAccount + $policyBefore = Get-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName + + Set-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName + $policyAfter = Get-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName + + # Assert + Assert-AreEqual $policyBefore.StorageAccountName $policyAfter.StorageAccountName + Assert-AreEqual $policyAfter.StorageAccountName $params.storageAccount + + } + finally + { + # Cleanup + Remove-TestEnvironment $testSuffix + } +} + +<# +.SYNOPSIS +Tests that after setting the storage account property's value in a server's auditing policy, this value is used on next policy set operations as default. Meaning: if you don't want to change the +storage account, you don't need to provide it. +#> +function Test-ServerUpdatePolicyKeepPreviousStorage +{ + # Setup + $testSuffix = 401 + Create-TestEnvironment $testSuffix + $params = Get-SqlAuditingTestEnvironmentParameters $testSuffix + + try + { + # Test + Set-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -StorageAccountName $params.storageAccount + $policyBefore = Get-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName + + Set-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName + $policyAfter = Get-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName + + # Assert + Assert-AreEqual $policyBefore.StorageAccountName $policyAfter.StorageAccountName + Assert-AreEqual $policyAfter.StorageAccountName $params.storageAccount + + } + finally + { + # Cleanup + Remove-TestEnvironment $testSuffix + } +} + +<# +.SYNOPSIS +Tests that when modifying the eventType property of a databases's auditing policy (including the All and None values), these properties are later fetched properly +#> +function Test-DatabaseUpdatePolicyWithEventTypes +{ + # Setup + $testSuffix = 501 + Create-TestEnvironment $testSuffix + $params = Get-SqlAuditingTestEnvironmentParameters $testSuffix + + try + { + # Test + Set-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName -StorageAccountName $params.storageAccount -EventType "All" + $policy = Get-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName + + # Assert + Assert-AreEqual $policy.EventType.Length 5 + + # Test + Set-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName -StorageAccountName $params.storageAccount -EventType "DataAccess","DataChanges","RevokePermissions" + $policy = Get-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName + + # Assert + Assert-AreEqual $policy.EventType.Length 3 + Assert-True {$policy.EventType.Contains("DataAccess")} + Assert-True {$policy.EventType.Contains("DataChanges")} + Assert-True {$policy.EventType.Contains("RevokePermissions")} + + # Test + Set-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName -StorageAccountName $params.storageAccount -EventType "None" + $policy = Get-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName + + # Assert + Assert-AreEqual $policy.EventType.Length 0 + } + finally + { + # Cleanup + Remove-TestEnvironment $testSuffix + } +} + +<# +.SYNOPSIS +Tests that when modifying the eventType property of a server's auditing policy (including the All and None values), these properties are later fetched properly +#> +function Test-ServerUpdatePolicyWithEventTypes +{ + # Setup + $testSuffix = 601 + Create-TestEnvironment $testSuffix + $params = Get-SqlAuditingTestEnvironmentParameters $testSuffix + + try + { + # Test + Set-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -StorageAccountName $params.storageAccount -EventType "All" + $policy = Get-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName + + # Assert + Assert-AreEqual $policy.EventType.Length 5 + + # Test + Set-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -StorageAccountName $params.storageAccount -EventType "DataAccess","DataChanges","RevokePermissions" + $policy = Get-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName + + # Assert + Assert-AreEqual $policy.EventType.Length 3 + Assert-True {$policy.EventType.Contains("DataAccess")} + Assert-True {$policy.EventType.Contains("DataChanges")} + Assert-True {$policy.EventType.Contains("RevokePermissions")} + + # Test + Set-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -StorageAccountName $params.storageAccount -EventType "None" + $policy = Get-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName + + # Assert + Assert-AreEqual $policy.EventType.Length 0 + } + finally + { + # Cleanup + Remove-TestEnvironment $testSuffix + } +} + +<# +.SYNOPSIS +Tests the modification of a database's auting policy event types with the 'All' or 'None' shortcuts +#> +function Test-DatabaseUpdatePolicyWithEventTypeShortcuts +{ + # Setup + $testSuffix = 701 + Create-TestEnvironment $testSuffix + $params = Get-SqlAuditingTestEnvironmentParameters $testSuffix + + try + { + # Test + Set-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName -StorageAccountName $params.storageAccount -EventType "All" + $policy = Get-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName + + # Assert + Assert-AreEqual $policy.EventType.Length 5 + + # Test + Set-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName -StorageAccountName $params.storageAccount -EventType "All", "All" + $policy = Get-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName + + # Assert + Assert-AreEqual $policy.EventType.Length 5 + + + # Test + Set-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName -StorageAccountName $params.storageAccount -EventType "None" + $policy = Get-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName + + # Assert + Assert-AreEqual $policy.EventType.Length 0 + + # Test + Set-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName -StorageAccountName $params.storageAccount -EventType "None", "None" + $policy = Get-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName + + # Assert + Assert-AreEqual $policy.EventType.Length 0 + + # Test + Assert-Throws {Set-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName -StorageAccountName $params.storageAccount -EventType "All", "None"} + Assert-Throws {Set-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName -StorageAccountName $params.storageAccount -EventType "None", "All"} + Assert-Throws {Set-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName -StorageAccountName $params.storageAccount -EventType "DataChanges", "All"} + Assert-Throws {Set-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName -StorageAccountName $params.storageAccount -EventType "DataChanges", "None"} + } + finally + { + # Cleanup + Remove-TestEnvironment $testSuffix + } +} + +<# +.SYNOPSIS +Tests the modification of a server's auditing policy event types with the 'All' or 'None' shortcuts +#> +function Test-ServerUpdatePolicyWithEventTypeShortcuts +{ + # Setup + $testSuffix = 801 + Create-TestEnvironment $testSuffix + $params = Get-SqlAuditingTestEnvironmentParameters $testSuffix + + try + { + # Test + Set-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -StorageAccountName $params.storageAccount -EventType "All" + $policy = Get-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName + + # Assert + Assert-AreEqual $policy.EventType.Length 5 + + # Test + Set-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -StorageAccountName $params.storageAccount -EventType "All", "All" + $policy = Get-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName + + # Assert + Assert-AreEqual $policy.EventType.Length 5 + + + # Test + Set-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -StorageAccountName $params.storageAccount -EventType "None" + $policy = Get-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName + + # Assert + Assert-AreEqual $policy.EventType.Length 0 + + # Test + Set-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -StorageAccountName $params.storageAccount -EventType "None", "None" + $policy = Get-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName + + # Assert + Assert-AreEqual $policy.EventType.Length 0 + + # Test + Assert-Throws {Set-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -StorageAccountName $params.storageAccount -EventType "All", "None"} + Assert-Throws {Set-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -StorageAccountName $params.storageAccount -EventType "None", "All"} + Assert-Throws {Set-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -StorageAccountName $params.storageAccount -EventType "DataChanges", "All"} + Assert-Throws {Set-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -StorageAccountName $params.storageAccount -EventType "DataChanges", "None"} + } + finally + { + # Cleanup + Remove-TestEnvironment $testSuffix + } +} + +<# +.SYNOPSIS +Tests that when asking to disable auditing of a database, later when fetching the policy, it is marked as disabled +#> +function Test-DisableDatabaseAuditing +{ + # Setup + $testSuffix = 901 + Create-TestEnvironment $testSuffix + $params = Get-SqlAuditingTestEnvironmentParameters $testSuffix + + try + { + # Test + Set-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName -StorageAccountName $params.storageAccount + Remove-AzureSqlDatabaseAuditing -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName + $policy = Get-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName + + # Assert + Assert-False { $policy.IsEnabled } + } + finally + { + # Cleanup + Remove-TestEnvironment $testSuffix + } +} + +<# +.SYNOPSIS +Tests that when asking to disable auditing of a server, later when fetching the policy, it is marked as disabled +#> +function Test-DisableServerAuditing +{ + # Setup + $testSuffix = 111 + Create-TestEnvironment $testSuffix + $params = Get-SqlAuditingTestEnvironmentParameters $testSuffix + + try + { + # Test + Set-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -StorageAccountName $params.storageAccount + Remove-AzureSqlDatabaseServerAuditing -ResourceGroupName $params.rgname -ServerName $params.serverName + $policy = Get-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName + + # Assert + Assert-False { $policy.IsEnabled } + } + finally + { + # Cleanup + Remove-TestEnvironment $testSuffix + } +} + +<# +.SYNOPSIS +Tests that when disabling an already existing auditing policy on a database and then re-enabling it, the properties of the policy are kept +#> +function Test-DatabaseDisableEnableKeepProperties +{ + # Setup + $testSuffix = 121 + Create-TestEnvironment $testSuffix + $params = Get-SqlAuditingTestEnvironmentParameters $testSuffix + + try + { + # Test + Set-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName -StorageAccountName $params.storageAccount -EventType "SecurityExceptions" + Remove-AzureSqlDatabaseAuditing -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName + Set-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName + $policy = Get-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName + + # Assert + Assert-AreEqual $policy.StorageAccountName $params.storageAccount + Assert-True { $policy.IsEnabled } + Assert-False { $policy.UseServerDefault } + Assert-AreEqual $policy.EventType.Length 1 + Assert-True {$policy.EventType.Contains("SecurityExceptions")} + } + finally + { + # Cleanup + Remove-TestEnvironment $testSuffix + } +} + +<# +.SYNOPSIS +Tests that when disabling an already existing auditing policy on a server and then re-enabling it, the properties of the policy are kept +#> +function Test-ServerDisableEnableKeepProperties +{ + # Setup + $testSuffix = 131 + Create-TestEnvironment $testSuffix + $params = Get-SqlAuditingTestEnvironmentParameters $testSuffix + + try + { + # Test + Set-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -StorageAccountName $params.storageAccount -EventType "RevokePermissions" + Remove-AzureSqlDatabaseServerAuditing -ResourceGroupName $params.rgname -ServerName $params.serverName + Set-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName + $policy = Get-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName + + # Assert + Assert-AreEqual $policy.StorageAccountName $params.storageAccount + Assert-True { $policy.IsEnabled } + Assert-False { $policy.UseServerDefault } + Assert-AreEqual $policy.EventType.Length 1 + Assert-True {$policy.EventType.Contains("RevokePermissions")} + } + finally + { + # Cleanup + Remove-TestEnvironment $testSuffix + } +} + +<# +.SYNOPSIS +Tests that after marking a database as using its server's policy, when fetching the database's policy, it is marked as using the server's policy +#> +function Test-UseServerDefault +{ + # Setup + $testSuffix = 141 + Create-TestEnvironment $testSuffix + $params = Get-SqlAuditingTestEnvironmentParameters $testSuffix + + try + { + # Test + Set-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -StorageAccountName $params.storageAccount + Use-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName + $policy = Get-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName + + # Assert + Assert-True {$policy.UseServerDefault} + } + finally + { + # Cleanup + Remove-TestEnvironment $testSuffix + } +} + +<# +.SYNOPSIS +Tests that a failure occurs when trying to set a policy to a database, and that database does not have a polic as well as the policy does not have a storage account +#> +function Test-FailedDatabaseUpdatePolicyWithNoStorage +{ + # Setup + $testSuffix = 151 + Create-TestEnvironment $testSuffix + $params = Get-SqlAuditingTestEnvironmentParameters $testSuffix + + try + { + # Assert + Assert-Throws { Set-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverWithoutPolicy -DatabaseName $params.databaseWithoutPolicy } + } + finally + { + # Cleanup + Remove-TestEnvironment $testSuffix + } +} + +<# +.SYNOPSIS +Tests that a failure occurs when trying to set a policy to a server, and that policy does not have a storage account +#> +function Test-FailedServerUpdatePolicyWithNoStorage +{ + # Setup + $testSuffix = 161 + Create-TestEnvironment $testSuffix + $params = Get-SqlAuditingTestEnvironmentParameters $testSuffix + + try + { + # Assert + Assert-Throws { Set-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverWithoutPolicy} + } + finally + { + # Cleanup + Remove-TestEnvironment $testSuffix + } +} + +<# +.SYNOPSIS +Tests that a failure occurs when trying to make a database use its server's auditing policy when the server's policy does not have a storage account +#> +function Test-FailedUseServerDefault +{ + # Setup + $testSuffix = 171 + Create-TestEnvironment $testSuffix + $params = Get-SqlAuditingTestEnvironmentParameters $testSuffix + + try + { + # Assert + Assert-Throws { Use-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverWithoutPolicy -DatabaseName $params.databaseWithoutPolicy } + } + finally + { + # Cleanup + Remove-TestEnvironment $testSuffix + } +} + +<# +.SYNOPSIS +Tests that it is impossible to use non existing database with the cmdlets +#> +function Test-FailWithBadDatabaseIndentity +{ + # Setup + $testSuffix = 181 + Create-TestEnvironment $testSuffix + $params = Get-SqlAuditingTestEnvironmentParameters $testSuffix + + try + { + # Assert + Assert-Throws { Get-AzureSqlDatabaseAuditingPolicy -ResourceGroupName "NONEXISTING-RG" -ServerName $params.serverName -DatabaseName $params.databaseName } + Assert-Throws { Get-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName "NONEXISTING-SERVER"-DatabaseName $params.databaseName } + Assert-Throws { Set-AzureSqlDatabaseAuditingPolicy -ResourceGroupName "NONEXISTING-RG" -ServerName $params.serverName -DatabaseName $params.databaseName -StorageAccountName $params.storageAccount} + Assert-Throws { Set-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName "NONEXISTING-SERVER" -DatabaseName $params.databaseName -StorageAccountName $params.storageAccount} + } + finally + { + # Cleanup + Remove-TestEnvironment $testSuffix + } +} + +<# +.SYNOPSIS +Tests that it is impossible to use non existing server with the cmdlets +#> +function Test-FailWithBadServerIndentity +{ + # Setup + $testSuffix = 191 + Create-TestEnvironment $testSuffix + $params = Get-SqlAuditingTestEnvironmentParameters $testSuffix + + try + { + # Assert + Assert-Throws { Get-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName "NONEXISTING-RG" -ServerName $params.serverName } + Assert-Throws { Get-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName "NONEXISTING-SERVER" } + Assert-Throws { Set-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName "NONEXISTING-RG" -ServerName $params.serverName -StorageAccountName $params.storageAccount} + Assert-Throws { Set-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName "NONEXISTING-SERVER" -StorageAccountName $params.storageAccount} + } + finally + { + # Cleanup + Remove-TestEnvironment $testSuffix + } +} + +<# +.SYNOPSIS +Tests that the direct access property is getting updated correctly for a sql database +#> +function Test-DatabaseDirectAccess +{ + # Setup + $testSuffix = 551 + Create-TestEnvironment $testSuffix + $params = Get-SqlAuditingTestEnvironmentParameters $testSuffix + + try + { + # Test + Set-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName -StorageAccountName $params.storageAccount + Enable-AzureSqlDatabaseDirectAccess -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName + $policy = Get-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName + + # Assert + Assert-True { $policy.DirectAccessEnabled } + + # Test + Disable-AzureSqlDatabaseDirectAccess -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName + $policy = Get-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName + + # Assert + Assert-False { $policy.DirectAccessEnabled } + + # Test + Enable-AzureSqlDatabaseDirectAccess -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName + $policy = Get-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName + + # Assert + Assert-True { $policy.DirectAccessEnabled } + } + finally + { + # Cleanup + Remove-TestEnvironment $testSuffix + } +} + +<# +.SYNOPSIS +Tests that the direct access property is getting updated correctly for a sql database server +#> +function Test-ServerDirectAccess +{ + # Setup + $testSuffix = 650 + Create-TestEnvironment $testSuffix + $params = Get-SqlAuditingTestEnvironmentParameters $testSuffix + + try + { + # Test + Set-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -StorageAccountName $params.storageAccount + Enable-AzureSqlDatabaseServerDirectAccess -ResourceGroupName $params.rgname -ServerName $params.serverName + $policy = Get-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName + + # Assert + Assert-True { $policy.DirectAccessEnabled } + + # Test + Disable-AzureSqlDatabaseServerDirectAccess -ResourceGroupName $params.rgname -ServerName $params.serverName + $policy = Get-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName + + # Assert + Assert-False { $policy.DirectAccessEnabled } + + # Test + Enable-AzureSqlDatabaseServerDirectAccess -ResourceGroupName $params.rgname -ServerName $params.serverName + $policy = Get-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName + + # Assert + Assert-True { $policy.DirectAccessEnabled } + } + finally + { + # Cleanup + Remove-TestEnvironment $testSuffix + } +} + +<# +.SYNOPSIS +Tests that storage key rotatation process for a policy of a Sql database server is managed properly +#> +function Test-ServerStorageKeyRotation +{ + # Setup + $testSuffix = 680 + Create-TestEnvironment $testSuffix + $params = Get-SqlAuditingTestEnvironmentParameters $testSuffix + + try + { + # Test + Set-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -StorageAccountName $params.storageAccount -StorageKeyType "Primary" + $policy = Get-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName + + # Assert + Assert-True { $policy.StorageKeyType -eq "Primary"} + + # Test + Set-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -StorageAccountName $params.storageAccount -StorageKeyType "Secondary" + $policy = Get-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName + + # Assert + Assert-True { $policy.StorageKeyType -eq "Secondary"} + + # Test + Set-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -StorageAccountName $params.storageAccount -StorageKeyType "Primary" + $policy = Get-AzureSqlDatabaseServerAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName + + # Assert + Assert-True { $policy.StorageKeyType -eq "Primary"} + } + finally + { + # Cleanup + Remove-TestEnvironment $testSuffix + } +} + +<# +.SYNOPSIS +Tests that storage key rotatation process for a policy of a Sql database is managed properly +#> +function Test-DatabaseStorageKeyRotation +{ + # Setup + $testSuffix = 680 + Create-TestEnvironment $testSuffix + $params = Get-SqlAuditingTestEnvironmentParameters $testSuffix + + try + { + # Test + Set-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName -StorageAccountName $params.storageAccount -StorageKeyType "Primary" + $policy = Get-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName + + # Assert + Assert-True { $policy.StorageKeyType -eq "Primary"} + + # Test + Set-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName -StorageAccountName $params.storageAccount -StorageKeyType "Secondary" + $policy = Get-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName + + # Assert + Assert-True { $policy.StorageKeyType -eq "Secondary"} + + # Test + Set-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName -StorageAccountName $params.storageAccount -StorageKeyType "Primary" + $policy = Get-AzureSqlDatabaseAuditingPolicy -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName + + # Assert + Assert-True { $policy.StorageKeyType -eq "Primary"} + } + finally + { + # Cleanup + Remove-TestEnvironment $testSuffix + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/SqlTestsBase.cs b/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/SqlTestsBase.cs new file mode 100644 index 000000000000..132bcad207cb --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/SqlTestsBase.cs @@ -0,0 +1,75 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Management.Sql; +using Microsoft.Azure.Management.Resources; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Storage; +using Microsoft.WindowsAzure.Testing; + +namespace Microsoft.Azure.Commands.ScenarioTest.SqlTests +{ + public class SqlTestsBase + { + private EnvironmentSetupHelper helper; + + protected SqlTestsBase() + { + helper = new EnvironmentSetupHelper(); + } + + protected void SetupManagementClients() + { + var sqlCSMClient = GetSqlCSMClient(); // to interact with the security endpoints + var storageClient = GetStorageClient(); + var resourcesClient = GetResourcesClient(); + helper.SetupSomeOfManagementClients(sqlCSMClient, storageClient, resourcesClient); + } + + protected void RunPowerShellTest(params string[] scripts) + { + // Enable undo functionality as well as mock recording + using (UndoContext context = UndoContext.Current) + { + // Configure recordings + context.Start(TestUtilities.GetCallingClass(2), TestUtilities.GetCurrentMethodName(2)); + + SetupManagementClients(); + + helper.SetupEnvironment(AzureModule.AzureResourceManager); + + helper.SetupModules(AzureModule.AzureProfile, "ScenarioTests\\Common.ps1", + "ScenarioTests\\" + this.GetType().Name + ".ps1"); + + helper.RunPowerShellTest(scripts); + } + } + + protected SqlManagementClient GetSqlCSMClient() + { + return TestBase.GetServiceClient(new CSMTestEnvironmentFactory()); + } + + protected StorageManagementClient GetStorageClient() + { + return TestBase.GetServiceClient(new RDFETestEnvironmentFactory()); + } + + protected ResourceManagementClient GetResourcesClient() + { + return TestBase.GetServiceClient(new CSMTestEnvironmentFactory()); + } + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestDatabaseDirectAccess.json b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestDatabaseDirectAccess.json new file mode 100644 index 000000000000..d6d57af0b6c2 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestDatabaseDirectAccess.json @@ -0,0 +1,3827 @@ +{ + "Entries": [ + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXM=", + "RequestMethod": "POST", + "RequestBody": "\r\n auditcmdlets551\r\n \r\n \r\n West US\r\n \r\n Standard_GRS\r\n", + "RequestHeaders": { + "Content-Type": [ + "application/xml" + ], + "Content-Length": [ + "379" + ], + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "1126" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "a97016eea68c2f03acca4f1c998ed876" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:46:58 GMT" + ], + "Location": [ + "https://management.core.windows.net/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/storage/auditcmdlets551" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/a97016eea68c2f03acca4f1c998ed876", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zL2E5NzAxNmVlYTY4YzJmMDNhY2NhNGYxYzk5OGVkODc2", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "1126" + ] + }, + "ResponseBody": "\r\n a97016ee-a68c-2f03-acca-4f1c998ed876\r\n InProgress\r\n", + "ResponseHeaders": { + "Content-Length": [ + "197" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "080bfd6c02732b4396ed42423807c986" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:46:58 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/a97016eea68c2f03acca4f1c998ed876", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zL2E5NzAxNmVlYTY4YzJmMDNhY2NhNGYxYzk5OGVkODc2", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "1126" + ] + }, + "ResponseBody": "\r\n a97016ee-a68c-2f03-acca-4f1c998ed876\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "27bcca0822e62d608eef3ca12f4e167d" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:47:29 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "119" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799926" + ], + "x-ms-request-id": [ + "68eb9de0-07d6-4b55-b465-94dba4099f6c" + ], + "x-ms-correlation-request-id": [ + "68eb9de0-07d6-4b55-b465-94dba4099f6c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214730Z:68eb9de0-07d6-4b55-b465-94dba4099f6c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:47:30 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551\",\r\n \"name\": \"sql-audit-cmdlet-test-rg551\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "217" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11976" + ], + "x-ms-request-id": [ + "8506fb37-1f20-4ec7-9f0b-26cc06437732" + ], + "x-ms-correlation-request-id": [ + "8506fb37-1f20-4ec7-9f0b-26cc06437732" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214731Z:8506fb37-1f20-4ec7-9f0b-26cc06437732" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:47:31 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup/validate?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvdmFsaWRhdGU/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db551\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server551\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db551\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server551\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:47:32.4629717Z\",\r\n \"correlationId\": \"e35d795c-8bc3-41ef-96a2-da30ba0e9c91\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databases/sql-audit-cmdlet-db551\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551/sql-audit-cmdlet-db551\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11975" + ], + "x-ms-request-id": [ + "e35d795c-8bc3-41ef-96a2-da30ba0e9c91" + ], + "x-ms-correlation-request-id": [ + "e35d795c-8bc3-41ef-96a2-da30ba0e9c91" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214732Z:e35d795c-8bc3-41ef-96a2-da30ba0e9c91" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:47:31 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db551\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server551\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db551\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server551\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:47:33.7659169Z\",\r\n \"correlationId\": \"dfff4d2f-cb1f-4fa9-9a8b-e89b05bd6ba8\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databases/sql-audit-cmdlet-db551\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551/sql-audit-cmdlet-db551\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11974" + ], + "x-ms-request-id": [ + "dfff4d2f-cb1f-4fa9-9a8b-e89b05bd6ba8" + ], + "x-ms-correlation-request-id": [ + "dfff4d2f-cb1f-4fa9-9a8b-e89b05bd6ba8" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214734Z:dfff4d2f-cb1f-4fa9-9a8b-e89b05bd6ba8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:47:33 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799925" + ], + "x-ms-request-id": [ + "a97e97c8-b922-43c8-877b-31d1147ed3d2" + ], + "x-ms-correlation-request-id": [ + "a97e97c8-b922-43c8-877b-31d1147ed3d2" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214734Z:a97e97c8-b922-43c8-877b-31d1147ed3d2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:47:34 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799923" + ], + "x-ms-request-id": [ + "582a9b55-4578-4743-8527-8ca2e97cbe2e" + ], + "x-ms-correlation-request-id": [ + "582a9b55-4578-4743-8527-8ca2e97cbe2e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214737Z:582a9b55-4578-4743-8527-8ca2e97cbe2e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:47:37 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799921" + ], + "x-ms-request-id": [ + "51999a3d-d199-4821-85c0-d30149eb1a9e" + ], + "x-ms-correlation-request-id": [ + "51999a3d-d199-4821-85c0-d30149eb1a9e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214740Z:51999a3d-d199-4821-85c0-d30149eb1a9e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:47:40 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799919" + ], + "x-ms-request-id": [ + "940e1fd0-458e-40d0-98db-89b494d94686" + ], + "x-ms-correlation-request-id": [ + "940e1fd0-458e-40d0-98db-89b494d94686" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214744Z:940e1fd0-458e-40d0-98db-89b494d94686" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:47:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799917" + ], + "x-ms-request-id": [ + "da0eaeb5-9822-4fd7-b111-471a0d066065" + ], + "x-ms-correlation-request-id": [ + "da0eaeb5-9822-4fd7-b111-471a0d066065" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214747Z:da0eaeb5-9822-4fd7-b111-471a0d066065" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:47:47 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799915" + ], + "x-ms-request-id": [ + "93b268af-d71c-491c-821b-3994669091a2" + ], + "x-ms-correlation-request-id": [ + "93b268af-d71c-491c-821b-3994669091a2" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214750Z:93b268af-d71c-491c-821b-3994669091a2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:47:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799913" + ], + "x-ms-request-id": [ + "83deda11-5e4f-4803-a459-66dc66357d5c" + ], + "x-ms-correlation-request-id": [ + "83deda11-5e4f-4803-a459-66dc66357d5c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214753Z:83deda11-5e4f-4803-a459-66dc66357d5c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:47:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799911" + ], + "x-ms-request-id": [ + "f2f99e4b-2099-4d7d-8238-61fc9db8116b" + ], + "x-ms-correlation-request-id": [ + "f2f99e4b-2099-4d7d-8238-61fc9db8116b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214756Z:f2f99e4b-2099-4d7d-8238-61fc9db8116b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:47:56 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799909" + ], + "x-ms-request-id": [ + "47f1af3f-84ba-4505-afe4-1e0c98c877b4" + ], + "x-ms-correlation-request-id": [ + "47f1af3f-84ba-4505-afe4-1e0c98c877b4" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214759Z:47f1af3f-84ba-4505-afe4-1e0c98c877b4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:47:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799907" + ], + "x-ms-request-id": [ + "431d867f-5ccb-453e-9063-40db727de596" + ], + "x-ms-correlation-request-id": [ + "431d867f-5ccb-453e-9063-40db727de596" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214802Z:431d867f-5ccb-453e-9063-40db727de596" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:02 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799905" + ], + "x-ms-request-id": [ + "6fe67061-8e24-4a80-8173-8264b61a4384" + ], + "x-ms-correlation-request-id": [ + "6fe67061-8e24-4a80-8173-8264b61a4384" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214805Z:6fe67061-8e24-4a80-8173-8264b61a4384" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:05 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799903" + ], + "x-ms-request-id": [ + "b53704f3-f400-45a0-816a-48b4fd32ee83" + ], + "x-ms-correlation-request-id": [ + "b53704f3-f400-45a0-816a-48b4fd32ee83" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214808Z:b53704f3-f400-45a0-816a-48b4fd32ee83" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:08 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799901" + ], + "x-ms-request-id": [ + "efe6996a-6175-4957-9952-db1822bcc2be" + ], + "x-ms-correlation-request-id": [ + "efe6996a-6175-4957-9952-db1822bcc2be" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214811Z:efe6996a-6175-4957-9952-db1822bcc2be" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:11 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799899" + ], + "x-ms-request-id": [ + "898e454b-9bd6-4c75-b3b1-2a6bb5feacbc" + ], + "x-ms-correlation-request-id": [ + "898e454b-9bd6-4c75-b3b1-2a6bb5feacbc" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214815Z:898e454b-9bd6-4c75-b3b1-2a6bb5feacbc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:15 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799897" + ], + "x-ms-request-id": [ + "0bd5eca1-4d95-4fd9-9f6b-672fa9d9eb09" + ], + "x-ms-correlation-request-id": [ + "0bd5eca1-4d95-4fd9-9f6b-672fa9d9eb09" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214818Z:0bd5eca1-4d95-4fd9-9f6b-672fa9d9eb09" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:17 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799895" + ], + "x-ms-request-id": [ + "b6ef462b-3451-4522-a016-4abbf319b908" + ], + "x-ms-correlation-request-id": [ + "b6ef462b-3451-4522-a016-4abbf319b908" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214821Z:b6ef462b-3451-4522-a016-4abbf319b908" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:21 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799893" + ], + "x-ms-request-id": [ + "fef46dc6-0a25-4deb-9ca1-53a81bd9296b" + ], + "x-ms-correlation-request-id": [ + "fef46dc6-0a25-4deb-9ca1-53a81bd9296b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214824Z:fef46dc6-0a25-4deb-9ca1-53a81bd9296b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:23 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799891" + ], + "x-ms-request-id": [ + "bce9850a-8124-4b28-8843-bc7f2aa3ae10" + ], + "x-ms-correlation-request-id": [ + "bce9850a-8124-4b28-8843-bc7f2aa3ae10" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214827Z:bce9850a-8124-4b28-8843-bc7f2aa3ae10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:27 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799889" + ], + "x-ms-request-id": [ + "2beda373-324a-4d94-82bd-309409ad4374" + ], + "x-ms-correlation-request-id": [ + "2beda373-324a-4d94-82bd-309409ad4374" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214830Z:2beda373-324a-4d94-82bd-309409ad4374" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:30 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799887" + ], + "x-ms-request-id": [ + "3579504f-bfdd-4dcf-8c92-d146fc555e08" + ], + "x-ms-correlation-request-id": [ + "3579504f-bfdd-4dcf-8c92-d146fc555e08" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214833Z:3579504f-bfdd-4dcf-8c92-d146fc555e08" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup/operations/515CF53DC8916E9A\",\r\n \"operationId\": \"515CF53DC8916E9A\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:48:34.3076763Z\",\r\n \"trackingId\": \"433c229a-babf-4bda-bdd0-98b3578a7974\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799885" + ], + "x-ms-request-id": [ + "57b035d0-993c-4738-923d-e91b39d77f80" + ], + "x-ms-correlation-request-id": [ + "57b035d0-993c-4738-923d-e91b39d77f80" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214836Z:57b035d0-993c-4738-923d-e91b39d77f80" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:36 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup/operations/515CF53DC8916E9A\",\r\n \"operationId\": \"515CF53DC8916E9A\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:48:34.3076763Z\",\r\n \"trackingId\": \"433c229a-babf-4bda-bdd0-98b3578a7974\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799883" + ], + "x-ms-request-id": [ + "e4ad20bb-41d1-4103-ba01-5c9d45c9efc6" + ], + "x-ms-correlation-request-id": [ + "e4ad20bb-41d1-4103-ba01-5c9d45c9efc6" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214839Z:e4ad20bb-41d1-4103-ba01-5c9d45c9efc6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup/operations/B7F2A8F3EC6926F1\",\r\n \"operationId\": \"B7F2A8F3EC6926F1\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:48:42.4562068Z\",\r\n \"trackingId\": \"9c572d9f-f617-449a-976a-cc0db91d2904\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databases/sql-audit-cmdlet-db551\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551/sql-audit-cmdlet-db551\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup/operations/515CF53DC8916E9A\",\r\n \"operationId\": \"515CF53DC8916E9A\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:48:34.3076763Z\",\r\n \"trackingId\": \"433c229a-babf-4bda-bdd0-98b3578a7974\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799881" + ], + "x-ms-request-id": [ + "2ee6f8ac-d463-425d-97e8-6899a720df31" + ], + "x-ms-correlation-request-id": [ + "2ee6f8ac-d463-425d-97e8-6899a720df31" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214842Z:2ee6f8ac-d463-425d-97e8-6899a720df31" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup/operations/B7F2A8F3EC6926F1\",\r\n \"operationId\": \"B7F2A8F3EC6926F1\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:48:42.4562068Z\",\r\n \"trackingId\": \"9c572d9f-f617-449a-976a-cc0db91d2904\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databases/sql-audit-cmdlet-db551\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551/sql-audit-cmdlet-db551\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup/operations/515CF53DC8916E9A\",\r\n \"operationId\": \"515CF53DC8916E9A\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:48:34.3076763Z\",\r\n \"trackingId\": \"433c229a-babf-4bda-bdd0-98b3578a7974\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799879" + ], + "x-ms-request-id": [ + "c25bf56e-22f6-43df-b2ee-2064df485a2a" + ], + "x-ms-correlation-request-id": [ + "c25bf56e-22f6-43df-b2ee-2064df485a2a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214845Z:c25bf56e-22f6-43df-b2ee-2064df485a2a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup/operations/B7F2A8F3EC6926F1\",\r\n \"operationId\": \"B7F2A8F3EC6926F1\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:48:42.4562068Z\",\r\n \"trackingId\": \"9c572d9f-f617-449a-976a-cc0db91d2904\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databases/sql-audit-cmdlet-db551\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551/sql-audit-cmdlet-db551\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup/operations/515CF53DC8916E9A\",\r\n \"operationId\": \"515CF53DC8916E9A\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:48:34.3076763Z\",\r\n \"trackingId\": \"433c229a-babf-4bda-bdd0-98b3578a7974\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799877" + ], + "x-ms-request-id": [ + "1ee07fcb-29d1-44d1-b3a7-5a6c088585a1" + ], + "x-ms-correlation-request-id": [ + "1ee07fcb-29d1-44d1-b3a7-5a6c088585a1" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214849Z:1ee07fcb-29d1-44d1-b3a7-5a6c088585a1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db551\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server551\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:47:33.7659169Z\",\r\n \"correlationId\": \"dfff4d2f-cb1f-4fa9-9a8b-e89b05bd6ba8\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databases/sql-audit-cmdlet-db551\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551/sql-audit-cmdlet-db551\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799924" + ], + "x-ms-request-id": [ + "c1ac11d4-29d8-4fda-ae4f-b7f7058f9005" + ], + "x-ms-correlation-request-id": [ + "c1ac11d4-29d8-4fda-ae4f-b7f7058f9005" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214735Z:c1ac11d4-29d8-4fda-ae4f-b7f7058f9005" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:47:34 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db551\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server551\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:47:37.3245576Z\",\r\n \"correlationId\": \"dfff4d2f-cb1f-4fa9-9a8b-e89b05bd6ba8\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databases/sql-audit-cmdlet-db551\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551/sql-audit-cmdlet-db551\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799922" + ], + "x-ms-request-id": [ + "aead1b6a-d8a5-4620-b99f-f3aa9133d7a1" + ], + "x-ms-correlation-request-id": [ + "aead1b6a-d8a5-4620-b99f-f3aa9133d7a1" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214738Z:aead1b6a-d8a5-4620-b99f-f3aa9133d7a1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:47:37 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db551\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server551\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:47:37.3245576Z\",\r\n \"correlationId\": \"dfff4d2f-cb1f-4fa9-9a8b-e89b05bd6ba8\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databases/sql-audit-cmdlet-db551\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551/sql-audit-cmdlet-db551\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799920" + ], + "x-ms-request-id": [ + "e8fc53a0-8325-4181-8400-793d17349f03" + ], + "x-ms-correlation-request-id": [ + "e8fc53a0-8325-4181-8400-793d17349f03" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214741Z:e8fc53a0-8325-4181-8400-793d17349f03" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:47:40 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db551\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server551\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:47:37.3245576Z\",\r\n \"correlationId\": \"dfff4d2f-cb1f-4fa9-9a8b-e89b05bd6ba8\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databases/sql-audit-cmdlet-db551\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551/sql-audit-cmdlet-db551\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799918" + ], + "x-ms-request-id": [ + "9587fea9-8949-421e-946a-f28e975e77c3" + ], + "x-ms-correlation-request-id": [ + "9587fea9-8949-421e-946a-f28e975e77c3" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214744Z:9587fea9-8949-421e-946a-f28e975e77c3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:47:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db551\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server551\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:47:37.3245576Z\",\r\n \"correlationId\": \"dfff4d2f-cb1f-4fa9-9a8b-e89b05bd6ba8\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databases/sql-audit-cmdlet-db551\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551/sql-audit-cmdlet-db551\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799916" + ], + "x-ms-request-id": [ + "a432b4b7-2856-497e-9513-696d630177fd" + ], + "x-ms-correlation-request-id": [ + "a432b4b7-2856-497e-9513-696d630177fd" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214747Z:a432b4b7-2856-497e-9513-696d630177fd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:47:47 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db551\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server551\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:47:37.3245576Z\",\r\n \"correlationId\": \"dfff4d2f-cb1f-4fa9-9a8b-e89b05bd6ba8\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databases/sql-audit-cmdlet-db551\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551/sql-audit-cmdlet-db551\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799914" + ], + "x-ms-request-id": [ + "a8ec3458-f17e-4761-8060-40de19dd8adc" + ], + "x-ms-correlation-request-id": [ + "a8ec3458-f17e-4761-8060-40de19dd8adc" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214750Z:a8ec3458-f17e-4761-8060-40de19dd8adc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:47:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db551\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server551\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:47:37.3245576Z\",\r\n \"correlationId\": \"dfff4d2f-cb1f-4fa9-9a8b-e89b05bd6ba8\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databases/sql-audit-cmdlet-db551\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551/sql-audit-cmdlet-db551\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799912" + ], + "x-ms-request-id": [ + "238e6814-439e-489b-897f-744120f911e9" + ], + "x-ms-correlation-request-id": [ + "238e6814-439e-489b-897f-744120f911e9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214754Z:238e6814-439e-489b-897f-744120f911e9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:47:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db551\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server551\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:47:37.3245576Z\",\r\n \"correlationId\": \"dfff4d2f-cb1f-4fa9-9a8b-e89b05bd6ba8\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databases/sql-audit-cmdlet-db551\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551/sql-audit-cmdlet-db551\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799910" + ], + "x-ms-request-id": [ + "476b560d-73a0-4e56-abc2-79887ed41d6b" + ], + "x-ms-correlation-request-id": [ + "476b560d-73a0-4e56-abc2-79887ed41d6b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214757Z:476b560d-73a0-4e56-abc2-79887ed41d6b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:47:56 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db551\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server551\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:47:37.3245576Z\",\r\n \"correlationId\": \"dfff4d2f-cb1f-4fa9-9a8b-e89b05bd6ba8\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databases/sql-audit-cmdlet-db551\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551/sql-audit-cmdlet-db551\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799908" + ], + "x-ms-request-id": [ + "ee1ddbd6-b8e2-4de4-8530-575113d2eef2" + ], + "x-ms-correlation-request-id": [ + "ee1ddbd6-b8e2-4de4-8530-575113d2eef2" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214800Z:ee1ddbd6-b8e2-4de4-8530-575113d2eef2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:47:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db551\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server551\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:47:37.3245576Z\",\r\n \"correlationId\": \"dfff4d2f-cb1f-4fa9-9a8b-e89b05bd6ba8\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databases/sql-audit-cmdlet-db551\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551/sql-audit-cmdlet-db551\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799906" + ], + "x-ms-request-id": [ + "00060822-7737-4abe-bfe8-0737fa1e311c" + ], + "x-ms-correlation-request-id": [ + "00060822-7737-4abe-bfe8-0737fa1e311c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214803Z:00060822-7737-4abe-bfe8-0737fa1e311c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:02 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db551\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server551\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:47:37.3245576Z\",\r\n \"correlationId\": \"dfff4d2f-cb1f-4fa9-9a8b-e89b05bd6ba8\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databases/sql-audit-cmdlet-db551\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551/sql-audit-cmdlet-db551\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799904" + ], + "x-ms-request-id": [ + "210d6397-bf46-430d-abdc-9b5202273c85" + ], + "x-ms-correlation-request-id": [ + "210d6397-bf46-430d-abdc-9b5202273c85" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214806Z:210d6397-bf46-430d-abdc-9b5202273c85" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:05 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db551\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server551\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:47:37.3245576Z\",\r\n \"correlationId\": \"dfff4d2f-cb1f-4fa9-9a8b-e89b05bd6ba8\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databases/sql-audit-cmdlet-db551\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551/sql-audit-cmdlet-db551\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799902" + ], + "x-ms-request-id": [ + "f465a67e-881f-4edf-a31a-4d2e9ba98d4d" + ], + "x-ms-correlation-request-id": [ + "f465a67e-881f-4edf-a31a-4d2e9ba98d4d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214809Z:f465a67e-881f-4edf-a31a-4d2e9ba98d4d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:08 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db551\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server551\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:47:37.3245576Z\",\r\n \"correlationId\": \"dfff4d2f-cb1f-4fa9-9a8b-e89b05bd6ba8\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databases/sql-audit-cmdlet-db551\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551/sql-audit-cmdlet-db551\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799900" + ], + "x-ms-request-id": [ + "ad4e3d30-1fd1-4051-801c-9bd6adf4ad35" + ], + "x-ms-correlation-request-id": [ + "ad4e3d30-1fd1-4051-801c-9bd6adf4ad35" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214812Z:ad4e3d30-1fd1-4051-801c-9bd6adf4ad35" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:11 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db551\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server551\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:47:37.3245576Z\",\r\n \"correlationId\": \"dfff4d2f-cb1f-4fa9-9a8b-e89b05bd6ba8\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databases/sql-audit-cmdlet-db551\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551/sql-audit-cmdlet-db551\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799898" + ], + "x-ms-request-id": [ + "fbc88c59-1d3d-4746-94c4-a300486dff7e" + ], + "x-ms-correlation-request-id": [ + "fbc88c59-1d3d-4746-94c4-a300486dff7e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214815Z:fbc88c59-1d3d-4746-94c4-a300486dff7e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:15 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db551\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server551\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:47:37.3245576Z\",\r\n \"correlationId\": \"dfff4d2f-cb1f-4fa9-9a8b-e89b05bd6ba8\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databases/sql-audit-cmdlet-db551\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551/sql-audit-cmdlet-db551\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799896" + ], + "x-ms-request-id": [ + "46ebb7b8-d8f2-4f59-9c99-db3c5a431af0" + ], + "x-ms-correlation-request-id": [ + "46ebb7b8-d8f2-4f59-9c99-db3c5a431af0" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214818Z:46ebb7b8-d8f2-4f59-9c99-db3c5a431af0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:17 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db551\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server551\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:47:37.3245576Z\",\r\n \"correlationId\": \"dfff4d2f-cb1f-4fa9-9a8b-e89b05bd6ba8\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databases/sql-audit-cmdlet-db551\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551/sql-audit-cmdlet-db551\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799894" + ], + "x-ms-request-id": [ + "68a7b863-efff-42ef-98f5-6c9c4a758349" + ], + "x-ms-correlation-request-id": [ + "68a7b863-efff-42ef-98f5-6c9c4a758349" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214821Z:68a7b863-efff-42ef-98f5-6c9c4a758349" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:21 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db551\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server551\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:47:37.3245576Z\",\r\n \"correlationId\": \"dfff4d2f-cb1f-4fa9-9a8b-e89b05bd6ba8\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databases/sql-audit-cmdlet-db551\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551/sql-audit-cmdlet-db551\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799892" + ], + "x-ms-request-id": [ + "cac9edc7-ef64-48af-858b-d64486eaaef9" + ], + "x-ms-correlation-request-id": [ + "cac9edc7-ef64-48af-858b-d64486eaaef9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214824Z:cac9edc7-ef64-48af-858b-d64486eaaef9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db551\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server551\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:47:37.3245576Z\",\r\n \"correlationId\": \"dfff4d2f-cb1f-4fa9-9a8b-e89b05bd6ba8\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databases/sql-audit-cmdlet-db551\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551/sql-audit-cmdlet-db551\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799890" + ], + "x-ms-request-id": [ + "3789ee89-ae98-4165-aa23-87b222a77361" + ], + "x-ms-correlation-request-id": [ + "3789ee89-ae98-4165-aa23-87b222a77361" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214827Z:3789ee89-ae98-4165-aa23-87b222a77361" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:27 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db551\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server551\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:47:37.3245576Z\",\r\n \"correlationId\": \"dfff4d2f-cb1f-4fa9-9a8b-e89b05bd6ba8\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databases/sql-audit-cmdlet-db551\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551/sql-audit-cmdlet-db551\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799888" + ], + "x-ms-request-id": [ + "9c479689-be09-4eca-8625-a969287951b7" + ], + "x-ms-correlation-request-id": [ + "9c479689-be09-4eca-8625-a969287951b7" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214830Z:9c479689-be09-4eca-8625-a969287951b7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:30 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db551\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server551\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:47:37.3245576Z\",\r\n \"correlationId\": \"dfff4d2f-cb1f-4fa9-9a8b-e89b05bd6ba8\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databases/sql-audit-cmdlet-db551\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551/sql-audit-cmdlet-db551\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799886" + ], + "x-ms-request-id": [ + "69362dcb-15fc-4f97-9e93-b9735ff662d9" + ], + "x-ms-correlation-request-id": [ + "69362dcb-15fc-4f97-9e93-b9735ff662d9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214833Z:69362dcb-15fc-4f97-9e93-b9735ff662d9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db551\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server551\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:47:37.3245576Z\",\r\n \"correlationId\": \"dfff4d2f-cb1f-4fa9-9a8b-e89b05bd6ba8\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databases/sql-audit-cmdlet-db551\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551/sql-audit-cmdlet-db551\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799884" + ], + "x-ms-request-id": [ + "afe66d1a-d0ee-455e-8e16-111dab306ec5" + ], + "x-ms-correlation-request-id": [ + "afe66d1a-d0ee-455e-8e16-111dab306ec5" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214836Z:afe66d1a-d0ee-455e-8e16-111dab306ec5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:36 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db551\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server551\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:47:37.3245576Z\",\r\n \"correlationId\": \"dfff4d2f-cb1f-4fa9-9a8b-e89b05bd6ba8\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databases/sql-audit-cmdlet-db551\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551/sql-audit-cmdlet-db551\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799882" + ], + "x-ms-request-id": [ + "cbc023b3-b14e-4a7a-86e1-86746582a774" + ], + "x-ms-correlation-request-id": [ + "cbc023b3-b14e-4a7a-86e1-86746582a774" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214839Z:cbc023b3-b14e-4a7a-86e1-86746582a774" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db551\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server551\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:47:37.3245576Z\",\r\n \"correlationId\": \"dfff4d2f-cb1f-4fa9-9a8b-e89b05bd6ba8\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databases/sql-audit-cmdlet-db551\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551/sql-audit-cmdlet-db551\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799880" + ], + "x-ms-request-id": [ + "7e47ca8a-ac06-49c3-a153-7441e34f4608" + ], + "x-ms-correlation-request-id": [ + "7e47ca8a-ac06-49c3-a153-7441e34f4608" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214843Z:7e47ca8a-ac06-49c3-a153-7441e34f4608" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db551\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server551\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:47:37.3245576Z\",\r\n \"correlationId\": \"dfff4d2f-cb1f-4fa9-9a8b-e89b05bd6ba8\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databases/sql-audit-cmdlet-db551\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551/sql-audit-cmdlet-db551\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799878" + ], + "x-ms-request-id": [ + "f5aa5911-294e-4f43-ba8c-d510d18090e7" + ], + "x-ms-correlation-request-id": [ + "f5aa5911-294e-4f43-ba8c-d510d18090e7" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214846Z:f5aa5911-294e-4f43-ba8c-d510d18090e7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db551\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server551\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:48:46.4451664Z\",\r\n \"correlationId\": \"dfff4d2f-cb1f-4fa9-9a8b-e89b05bd6ba8\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databases/sql-audit-cmdlet-db551\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server551/sql-audit-cmdlet-db551\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1626" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799876" + ], + "x-ms-request-id": [ + "71e94f3e-f3a5-4300-94e3-3f098015dbb7" + ], + "x-ms-correlation-request-id": [ + "71e94f3e-f3a5-4300-94e3-3f098015dbb7" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214849Z:71e94f3e-f3a5-4300-94e3-3f098015dbb7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551\",\r\n \"name\": \"sql-audit-cmdlet-server551\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databases/sql-audit-cmdlet-db551\",\r\n \"name\": \"sql-audit-cmdlet-server551/sql-audit-cmdlet-db551\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "577" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799875" + ], + "x-ms-request-id": [ + "5492efca-12f3-4bb2-b29a-00935da34ccf" + ], + "x-ms-correlation-request-id": [ + "5492efca-12f3-4bb2-b29a-00935da34ccf" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214851Z:5492efca-12f3-4bb2-b29a-00935da34ccf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westeurope:dc39b4dc-9441-45bc-aea4-64d0be18359e" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799874" + ], + "x-ms-correlation-request-id": [ + "8506ce49-e52d-42a7-9c97-e7c9cc3e7096" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214852Z:8506ce49-e52d-42a7-9c97-e7c9cc3e7096" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:52 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databaseSecurityPolicies/sql-audit-cmdlet-db551?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNTUxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNTUxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "4efd1210-7146-4ef1-8a58-2d23c9924c64-2014-10-31 21:48:54Z" + ], + "x-ms-client-request-id": [ + "01f397a0-53bc-433d-9f94-e7b8a73239c3-2014-10-31 21:48:54Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets551\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets551.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server551.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db551;User ID={0}@sql-audit-cmdlet-server551;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server551.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db551;Uid={0}@sql-audit-cmdlet-server551;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server551.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db551\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server551.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db551\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server551\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db551\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server551.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server551.database.secure.windows.net:1433;database=sql-audit-cmdlet-db551;user={0}@sql-audit-cmdlet-server551;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server551.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databaseSecurityPolicies/sql-audit-cmdlet-db551\",\r\n \"name\": \"sql-audit-cmdlet-db551\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2812" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "52043dfa-9143-484e-92f8-3985a5ab5d43" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799822" + ], + "x-ms-correlation-request-id": [ + "962d0ea0-b9b9-4fa7-a291-c1d0c8683974" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214854Z:962d0ea0-b9b9-4fa7-a291-c1d0c8683974" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:54 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databaseSecurityPolicies/sql-audit-cmdlet-db551?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNTUxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNTUxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "4efd1210-7146-4ef1-8a58-2d23c9924c64-2014-10-31 21:48:54Z" + ], + "x-ms-client-request-id": [ + "4c059aa5-fe3b-4cc8-9459-ced74282e725-2014-10-31 21:49:00Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets551\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets551.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server551.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db551;User ID={0}@sql-audit-cmdlet-server551;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server551.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db551;Uid={0}@sql-audit-cmdlet-server551;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server551.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db551\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server551.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db551\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server551\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db551\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server551.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server551.database.secure.windows.net:1433;database=sql-audit-cmdlet-db551;user={0}@sql-audit-cmdlet-server551;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server551.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databaseSecurityPolicies/sql-audit-cmdlet-db551\",\r\n \"name\": \"sql-audit-cmdlet-db551\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2812" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "5cee5bd5-bd1c-4d55-b73e-62c9b8d625e6" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799821" + ], + "x-ms-correlation-request-id": [ + "f88581f7-b7e3-4426-b33c-d9217d2bac61" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214900Z:f88581f7-b7e3-4426-b33c-d9217d2bac61" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:49:00 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databaseSecurityPolicies/sql-audit-cmdlet-db551?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNTUxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNTUxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "4efd1210-7146-4ef1-8a58-2d23c9924c64-2014-10-31 21:48:54Z" + ], + "x-ms-client-request-id": [ + "552aa440-c02c-4f6f-9094-3c656e28a8b6-2014-10-31 21:49:05Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets551\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets551.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server551.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db551;User ID={0}@sql-audit-cmdlet-server551;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server551.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db551;Uid={0}@sql-audit-cmdlet-server551;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server551.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db551\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server551.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db551\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server551\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db551\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server551.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server551.database.secure.windows.net:1433;database=sql-audit-cmdlet-db551;user={0}@sql-audit-cmdlet-server551;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server551.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databaseSecurityPolicies/sql-audit-cmdlet-db551\",\r\n \"name\": \"sql-audit-cmdlet-db551\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2812" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "8a9612de-e6a5-4154-8eff-3e9f61b66ad7" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799820" + ], + "x-ms-correlation-request-id": [ + "59875ccd-a8e1-44f2-8a8d-f313bacea319" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214905Z:59875ccd-a8e1-44f2-8a8d-f313bacea319" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:49:05 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databaseSecurityPolicies/sql-audit-cmdlet-db551?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNTUxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNTUxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "4efd1210-7146-4ef1-8a58-2d23c9924c64-2014-10-31 21:48:54Z" + ], + "x-ms-client-request-id": [ + "5b801f97-d2a0-4dcd-b85e-7fccda7ba6cc-2014-10-31 21:49:07Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets551\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets551.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server551.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db551;User ID={0}@sql-audit-cmdlet-server551;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server551.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db551;Uid={0}@sql-audit-cmdlet-server551;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server551.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db551\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server551.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db551\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server551\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db551\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server551.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server551.database.secure.windows.net:1433;database=sql-audit-cmdlet-db551;user={0}@sql-audit-cmdlet-server551;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server551.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databaseSecurityPolicies/sql-audit-cmdlet-db551\",\r\n \"name\": \"sql-audit-cmdlet-db551\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2812" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "6ed522bf-07fa-4984-b950-d5e77649ed5c" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799819" + ], + "x-ms-correlation-request-id": [ + "1f369307-feea-4bdc-a951-ef284ff76fcf" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214907Z:1f369307-feea-4bdc-a951-ef284ff76fcf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:49:07 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databaseSecurityPolicies/sql-audit-cmdlet-db551?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNTUxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNTUxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "4efd1210-7146-4ef1-8a58-2d23c9924c64-2014-10-31 21:48:54Z" + ], + "x-ms-client-request-id": [ + "76119155-b752-4b8f-8fed-49c55192ec40-2014-10-31 21:49:11Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets551\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets551.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server551.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db551;User ID={0}@sql-audit-cmdlet-server551;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server551.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db551;Uid={0}@sql-audit-cmdlet-server551;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server551.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db551\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server551.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db551\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server551\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db551\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server551.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server551.database.secure.windows.net:1433;database=sql-audit-cmdlet-db551;user={0}@sql-audit-cmdlet-server551;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server551.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": true\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databaseSecurityPolicies/sql-audit-cmdlet-db551\",\r\n \"name\": \"sql-audit-cmdlet-db551\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2811" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "9a377622-3d8d-4dd0-aa9c-7c02206057f6" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799818" + ], + "x-ms-correlation-request-id": [ + "ab44aef5-1026-41a4-a046-dd706174a38b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214912Z:ab44aef5-1026-41a4-a046-dd706174a38b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:49:12 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databaseSecurityPolicies/sql-audit-cmdlet-db551?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNTUxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNTUxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "4efd1210-7146-4ef1-8a58-2d23c9924c64-2014-10-31 21:48:54Z" + ], + "x-ms-client-request-id": [ + "c9bcbac3-439b-4d4c-bbe4-7936e768be03-2014-10-31 21:49:13Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets551\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets551.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server551.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db551;User ID={0}@sql-audit-cmdlet-server551;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server551.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db551;Uid={0}@sql-audit-cmdlet-server551;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server551.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db551\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server551.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db551\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server551\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db551\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server551.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server551.database.secure.windows.net:1433;database=sql-audit-cmdlet-db551;user={0}@sql-audit-cmdlet-server551;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server551.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": true\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databaseSecurityPolicies/sql-audit-cmdlet-db551\",\r\n \"name\": \"sql-audit-cmdlet-db551\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2811" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "0ab7824b-97b6-49c7-830f-ca7351b944e8" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799817" + ], + "x-ms-correlation-request-id": [ + "a8ac2a55-1bd5-4b11-8724-01001df1b25b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214913Z:a8ac2a55-1bd5-4b11-8724-01001df1b25b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:49:13 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databaseSecurityPolicies/sql-audit-cmdlet-db551?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNTUxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNTUxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "4efd1210-7146-4ef1-8a58-2d23c9924c64-2014-10-31 21:48:54Z" + ], + "x-ms-client-request-id": [ + "870dd1ef-5bcf-4e68-8242-944c11dfc0ee-2014-10-31 21:49:17Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets551\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets551.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server551.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db551;User ID={0}@sql-audit-cmdlet-server551;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server551.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db551;Uid={0}@sql-audit-cmdlet-server551;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server551.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db551\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server551.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db551\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server551\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db551\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server551.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server551.database.secure.windows.net:1433;database=sql-audit-cmdlet-db551;user={0}@sql-audit-cmdlet-server551;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server551.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databaseSecurityPolicies/sql-audit-cmdlet-db551\",\r\n \"name\": \"sql-audit-cmdlet-db551\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2812" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "354cda00-0701-4518-8aaf-b6023d5b6e34" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799816" + ], + "x-ms-correlation-request-id": [ + "161035d3-a4b0-4e6b-b402-9fb72a52e3b9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214917Z:161035d3-a4b0-4e6b-b402-9fb72a52e3b9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:49:17 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets551/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzNTUxL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "4efd1210-7146-4ef1-8a58-2d23c9924c64-2014-10-31 21:48:54Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"C/O+2aYBCflnSc8epTBidMW2JZeW+vNnPuFWzjg9UM17Yi2YfTUg6ACf1XCL3ImiDqVw657AGHX0L5L4b6gnWQ==\",\r\n \"secondaryKey\": \"uVueW1Ow98dRhBy3kJS4DW+dJT2A37298lVbgSgNB+6tn/hkrP7OS4OVWUz8pYFnuSdKzKnYna6JGvGS7CPb/g==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:cc4084bd-d72c-4b30-ac3b-79a25b5e8afe" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11969" + ], + "x-ms-correlation-request-id": [ + "36058551-2117-49fc-9e55-b02ddb5860cf" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214856Z:36058551-2117-49fc-9e55-b02ddb5860cf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:56 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets551/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzNTUxL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "4efd1210-7146-4ef1-8a58-2d23c9924c64-2014-10-31 21:48:54Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"C/O+2aYBCflnSc8epTBidMW2JZeW+vNnPuFWzjg9UM17Yi2YfTUg6ACf1XCL3ImiDqVw657AGHX0L5L4b6gnWQ==\",\r\n \"secondaryKey\": \"uVueW1Ow98dRhBy3kJS4DW+dJT2A37298lVbgSgNB+6tn/hkrP7OS4OVWUz8pYFnuSdKzKnYna6JGvGS7CPb/g==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:17d97245-1e70-46ec-b36a-6d93494c4b5f" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11967" + ], + "x-ms-correlation-request-id": [ + "2c61eecc-b5ee-44d4-becc-cc7cebd07e73" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214901Z:2c61eecc-b5ee-44d4-becc-cc7cebd07e73" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:49:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets551/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzNTUxL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "4efd1210-7146-4ef1-8a58-2d23c9924c64-2014-10-31 21:48:54Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"C/O+2aYBCflnSc8epTBidMW2JZeW+vNnPuFWzjg9UM17Yi2YfTUg6ACf1XCL3ImiDqVw657AGHX0L5L4b6gnWQ==\",\r\n \"secondaryKey\": \"uVueW1Ow98dRhBy3kJS4DW+dJT2A37298lVbgSgNB+6tn/hkrP7OS4OVWUz8pYFnuSdKzKnYna6JGvGS7CPb/g==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:2719e0d3-087c-486a-a96e-d132976a3446" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11965" + ], + "x-ms-correlation-request-id": [ + "3d1e98c8-8bf8-4de5-bbae-faa54fc3de84" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214908Z:3d1e98c8-8bf8-4de5-bbae-faa54fc3de84" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:49:07 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets551/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzNTUxL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "4efd1210-7146-4ef1-8a58-2d23c9924c64-2014-10-31 21:48:54Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"C/O+2aYBCflnSc8epTBidMW2JZeW+vNnPuFWzjg9UM17Yi2YfTUg6ACf1XCL3ImiDqVw657AGHX0L5L4b6gnWQ==\",\r\n \"secondaryKey\": \"uVueW1Ow98dRhBy3kJS4DW+dJT2A37298lVbgSgNB+6tn/hkrP7OS4OVWUz8pYFnuSdKzKnYna6JGvGS7CPb/g==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:ecbe0337-1880-4e19-a85a-06e3b1980908" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11963" + ], + "x-ms-correlation-request-id": [ + "c4f0c3c1-4a35-4cfc-8f4b-f7d2f6b76007" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214914Z:c4f0c3c1-4a35-4cfc-8f4b-f7d2f6b76007" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:49:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databaseSecurityPolicies/sql-audit-cmdlet-db551?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNTUxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNTUxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets551\",\r\n \"storageAccountKey\": \"C/O+2aYBCflnSc8epTBidMW2JZeW+vNnPuFWzjg9UM17Yi2YfTUg6ACf1XCL3ImiDqVw657AGHX0L5L4b6gnWQ==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets551.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "784" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "4efd1210-7146-4ef1-8a58-2d23c9924c64-2014-10-31 21:48:54Z" + ], + "x-ms-client-request-id": [ + "01f397a0-53bc-433d-9f94-e7b8a73239c3-2014-10-31 21:48:54Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets551\",\r\n \"storageAccountKey\": \"C/O+2aYBCflnSc8epTBidMW2JZeW+vNnPuFWzjg9UM17Yi2YfTUg6ACf1XCL3ImiDqVw657AGHX0L5L4b6gnWQ==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets551.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databaseSecurityPolicies/sql-audit-cmdlet-db551\",\r\n \"name\": \"sql-audit-cmdlet-db551\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1155" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "74c3d599-5831-4cf6-aa35-b3cdf818eb01" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11968" + ], + "x-ms-correlation-request-id": [ + "6e816c31-06da-4b6b-9b03-7887ed7f9e59" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214859Z:6e816c31-06da-4b6b-9b03-7887ed7f9e59" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:48:59 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databaseSecurityPolicies/sql-audit-cmdlet-db551?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNTUxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNTUxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets551\",\r\n \"storageAccountKey\": \"C/O+2aYBCflnSc8epTBidMW2JZeW+vNnPuFWzjg9UM17Yi2YfTUg6ACf1XCL3ImiDqVw657AGHX0L5L4b6gnWQ==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets551.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "784" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "4efd1210-7146-4ef1-8a58-2d23c9924c64-2014-10-31 21:48:54Z" + ], + "x-ms-client-request-id": [ + "4c059aa5-fe3b-4cc8-9459-ced74282e725-2014-10-31 21:49:00Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets551\",\r\n \"storageAccountKey\": \"C/O+2aYBCflnSc8epTBidMW2JZeW+vNnPuFWzjg9UM17Yi2YfTUg6ACf1XCL3ImiDqVw657AGHX0L5L4b6gnWQ==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets551.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databaseSecurityPolicies/sql-audit-cmdlet-db551\",\r\n \"name\": \"sql-audit-cmdlet-db551\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1155" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "af335c6d-4351-4b21-a5c2-ae21d63d36a0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11966" + ], + "x-ms-correlation-request-id": [ + "fd766e7b-dd71-4a83-b54f-eab9198b24a6" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214904Z:fd766e7b-dd71-4a83-b54f-eab9198b24a6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:49:04 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databaseSecurityPolicies/sql-audit-cmdlet-db551?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNTUxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNTUxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets551\",\r\n \"storageAccountKey\": \"C/O+2aYBCflnSc8epTBidMW2JZeW+vNnPuFWzjg9UM17Yi2YfTUg6ACf1XCL3ImiDqVw657AGHX0L5L4b6gnWQ==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets551.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": true\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "783" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "4efd1210-7146-4ef1-8a58-2d23c9924c64-2014-10-31 21:48:54Z" + ], + "x-ms-client-request-id": [ + "5b801f97-d2a0-4dcd-b85e-7fccda7ba6cc-2014-10-31 21:49:07Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets551\",\r\n \"storageAccountKey\": \"C/O+2aYBCflnSc8epTBidMW2JZeW+vNnPuFWzjg9UM17Yi2YfTUg6ACf1XCL3ImiDqVw657AGHX0L5L4b6gnWQ==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets551.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": true\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databaseSecurityPolicies/sql-audit-cmdlet-db551\",\r\n \"name\": \"sql-audit-cmdlet-db551\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1154" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "11f9d613-a63e-4c41-83ba-900baa4b55ee" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11964" + ], + "x-ms-correlation-request-id": [ + "c1ecf110-12ec-44d2-8ce9-522e0f9d911c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214910Z:c1ecf110-12ec-44d2-8ce9-522e0f9d911c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:49:10 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databaseSecurityPolicies/sql-audit-cmdlet-db551?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzU1MS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNTUxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNTUxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets551\",\r\n \"storageAccountKey\": \"C/O+2aYBCflnSc8epTBidMW2JZeW+vNnPuFWzjg9UM17Yi2YfTUg6ACf1XCL3ImiDqVw657AGHX0L5L4b6gnWQ==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets551.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "784" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "4efd1210-7146-4ef1-8a58-2d23c9924c64-2014-10-31 21:48:54Z" + ], + "x-ms-client-request-id": [ + "c9bcbac3-439b-4d4c-bbe4-7936e768be03-2014-10-31 21:49:13Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets551\",\r\n \"storageAccountKey\": \"C/O+2aYBCflnSc8epTBidMW2JZeW+vNnPuFWzjg9UM17Yi2YfTUg6ACf1XCL3ImiDqVw657AGHX0L5L4b6gnWQ==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets551.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg551/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server551/databaseSecurityPolicies/sql-audit-cmdlet-db551\",\r\n \"name\": \"sql-audit-cmdlet-db551\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1155" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "64cb91f0-b2f9-4aa6-9602-0c9c8d56c28b" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11962" + ], + "x-ms-correlation-request-id": [ + "0b0e23a0-697f-49a2-83f4-71057e7a15e7" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214916Z:0b0e23a0-697f-49a2-83f4-71057e7a15e7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:49:16 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices/auditcmdlets551", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXMvYXVkaXRjbWRsZXRzNTUx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "21dd02fe8e4e280887672146f1ca08da" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:49:22 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/21dd02fe8e4e280887672146f1ca08da", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zLzIxZGQwMmZlOGU0ZTI4MDg4NzY3MjE0NmYxY2EwOGRh", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/2.0.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "\r\n 21dd02fe-8e4e-2808-8767-2146f1ca08da\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "6aec3c7eeeed26069b5f7ef54291054b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:49:24 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "cca24ec8-99b5-4aa7-9ff6-486e886f304c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestDatabaseDisableEnableKeepProperties.json b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestDatabaseDisableEnableKeepProperties.json new file mode 100644 index 000000000000..188a6fc5e0d3 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestDatabaseDisableEnableKeepProperties.json @@ -0,0 +1,3380 @@ +{ + "Entries": [ + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXM=", + "RequestMethod": "POST", + "RequestBody": "\r\n auditcmdlets121\r\n \r\n \r\n West US\r\n \r\n Standard_GRS\r\n", + "RequestHeaders": { + "Content-Type": [ + "application/xml" + ], + "Content-Length": [ + "379" + ], + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "398" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "5397540bf2f82f22ad173f6e387d6f2c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:14:15 GMT" + ], + "Location": [ + "https://management.core.windows.net/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/storage/auditcmdlets121" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/5397540bf2f82f22ad173f6e387d6f2c", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zLzUzOTc1NDBiZjJmODJmMjJhZDE3M2Y2ZTM4N2Q2ZjJj", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "398" + ] + }, + "ResponseBody": "\r\n 5397540b-f2f8-2f22-ad17-3f6e387d6f2c\r\n InProgress\r\n", + "ResponseHeaders": { + "Content-Length": [ + "197" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "333601910f452d64b86a4b9b1fa47e52" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:14:16 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/5397540bf2f82f22ad173f6e387d6f2c", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zLzUzOTc1NDBiZjJmODJmMjJhZDE3M2Y2ZTM4N2Q2ZjJj", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "398" + ] + }, + "ResponseBody": "\r\n 5397540b-f2f8-2f22-ad17-3f6e387d6f2c\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "b896ce22103424a5af6ffd55b1581a59" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:14:45 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "119" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799989" + ], + "x-ms-request-id": [ + "70373b30-717e-446b-95aa-33d746f9590a" + ], + "x-ms-correlation-request-id": [ + "70373b30-717e-446b-95aa-33d746f9590a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211446Z:70373b30-717e-446b-95aa-33d746f9590a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:14:46 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121\",\r\n \"name\": \"sql-audit-cmdlet-test-rg121\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "217" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11993" + ], + "x-ms-request-id": [ + "d3f4be11-cb0b-4a35-8024-cadf7fd52727" + ], + "x-ms-correlation-request-id": [ + "d3f4be11-cb0b-4a35-8024-cadf7fd52727" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211448Z:d3f4be11-cb0b-4a35-8024-cadf7fd52727" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:14:48 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup/validate?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvdmFsaWRhdGU/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db121\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server121\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db121\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server121\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:14:49.2584598Z\",\r\n \"correlationId\": \"e15a9bcf-c298-4c19-96da-d77ae6ae54b3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databases/sql-audit-cmdlet-db121\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121/sql-audit-cmdlet-db121\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11992" + ], + "x-ms-request-id": [ + "e15a9bcf-c298-4c19-96da-d77ae6ae54b3" + ], + "x-ms-correlation-request-id": [ + "e15a9bcf-c298-4c19-96da-d77ae6ae54b3" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211449Z:e15a9bcf-c298-4c19-96da-d77ae6ae54b3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:14:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db121\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server121\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db121\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server121\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:14:50.9374671Z\",\r\n \"correlationId\": \"64b25de6-6d8c-49d4-9a83-5c4997ce4717\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databases/sql-audit-cmdlet-db121\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121/sql-audit-cmdlet-db121\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11991" + ], + "x-ms-request-id": [ + "64b25de6-6d8c-49d4-9a83-5c4997ce4717" + ], + "x-ms-correlation-request-id": [ + "64b25de6-6d8c-49d4-9a83-5c4997ce4717" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211451Z:64b25de6-6d8c-49d4-9a83-5c4997ce4717" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:14:51 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799988" + ], + "x-ms-request-id": [ + "044c985c-ca0b-4fba-988b-db594a508fd2" + ], + "x-ms-correlation-request-id": [ + "044c985c-ca0b-4fba-988b-db594a508fd2" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211452Z:044c985c-ca0b-4fba-988b-db594a508fd2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:14:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799986" + ], + "x-ms-request-id": [ + "16a901bf-f3dd-425d-8d7c-34401b5a4999" + ], + "x-ms-correlation-request-id": [ + "16a901bf-f3dd-425d-8d7c-34401b5a4999" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211455Z:16a901bf-f3dd-425d-8d7c-34401b5a4999" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:14:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799984" + ], + "x-ms-request-id": [ + "6f25d7ef-d9ea-4186-97b9-ed6e5af38fc6" + ], + "x-ms-correlation-request-id": [ + "6f25d7ef-d9ea-4186-97b9-ed6e5af38fc6" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211458Z:6f25d7ef-d9ea-4186-97b9-ed6e5af38fc6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:14:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799982" + ], + "x-ms-request-id": [ + "2caebf08-adf8-46bd-bbcd-2200172363d8" + ], + "x-ms-correlation-request-id": [ + "2caebf08-adf8-46bd-bbcd-2200172363d8" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211501Z:2caebf08-adf8-46bd-bbcd-2200172363d8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799980" + ], + "x-ms-request-id": [ + "4563f28b-99a2-49ac-bd5a-c2de189a117e" + ], + "x-ms-correlation-request-id": [ + "4563f28b-99a2-49ac-bd5a-c2de189a117e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211504Z:4563f28b-99a2-49ac-bd5a-c2de189a117e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799978" + ], + "x-ms-request-id": [ + "61459d0e-ff96-4ba9-b089-74147aea69b9" + ], + "x-ms-correlation-request-id": [ + "61459d0e-ff96-4ba9-b089-74147aea69b9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211508Z:61459d0e-ff96-4ba9-b089-74147aea69b9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:08 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799976" + ], + "x-ms-request-id": [ + "c1af661c-975f-49dd-97cc-b8a618c91877" + ], + "x-ms-correlation-request-id": [ + "c1af661c-975f-49dd-97cc-b8a618c91877" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211511Z:c1af661c-975f-49dd-97cc-b8a618c91877" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:11 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799974" + ], + "x-ms-request-id": [ + "27449282-04b4-4b01-9da2-9d3993f13ebc" + ], + "x-ms-correlation-request-id": [ + "27449282-04b4-4b01-9da2-9d3993f13ebc" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211514Z:27449282-04b4-4b01-9da2-9d3993f13ebc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799972" + ], + "x-ms-request-id": [ + "89c1e6b4-e7a2-44ed-bb6b-20519d38de7c" + ], + "x-ms-correlation-request-id": [ + "89c1e6b4-e7a2-44ed-bb6b-20519d38de7c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211517Z:89c1e6b4-e7a2-44ed-bb6b-20519d38de7c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:17 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799970" + ], + "x-ms-request-id": [ + "42fb8ae0-d849-4355-bd17-1be34a8dfe55" + ], + "x-ms-correlation-request-id": [ + "42fb8ae0-d849-4355-bd17-1be34a8dfe55" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211520Z:42fb8ae0-d849-4355-bd17-1be34a8dfe55" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799968" + ], + "x-ms-request-id": [ + "1d666dc5-29c4-485f-9f7e-be336fe11dbc" + ], + "x-ms-correlation-request-id": [ + "1d666dc5-29c4-485f-9f7e-be336fe11dbc" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211523Z:1d666dc5-29c4-485f-9f7e-be336fe11dbc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:23 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799966" + ], + "x-ms-request-id": [ + "7d8b9a5b-3b59-47a5-ab0f-155670b44435" + ], + "x-ms-correlation-request-id": [ + "7d8b9a5b-3b59-47a5-ab0f-155670b44435" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211526Z:7d8b9a5b-3b59-47a5-ab0f-155670b44435" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:25 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799964" + ], + "x-ms-request-id": [ + "e35442b2-4882-46c0-be98-5de2f8853617" + ], + "x-ms-correlation-request-id": [ + "e35442b2-4882-46c0-be98-5de2f8853617" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211529Z:e35442b2-4882-46c0-be98-5de2f8853617" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:29 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799962" + ], + "x-ms-request-id": [ + "c578ef30-e7f6-4039-8773-18ab8e1441a7" + ], + "x-ms-correlation-request-id": [ + "c578ef30-e7f6-4039-8773-18ab8e1441a7" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211532Z:c578ef30-e7f6-4039-8773-18ab8e1441a7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:32 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799960" + ], + "x-ms-request-id": [ + "ac85aee3-e6ee-4f5e-9409-29856c37ae56" + ], + "x-ms-correlation-request-id": [ + "ac85aee3-e6ee-4f5e-9409-29856c37ae56" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211536Z:ac85aee3-e6ee-4f5e-9409-29856c37ae56" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:36 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799958" + ], + "x-ms-request-id": [ + "5c5492b1-be8b-489b-bba6-b4b6f98f0af6" + ], + "x-ms-correlation-request-id": [ + "5c5492b1-be8b-489b-bba6-b4b6f98f0af6" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211539Z:5c5492b1-be8b-489b-bba6-b4b6f98f0af6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799956" + ], + "x-ms-request-id": [ + "15ccabe7-02f6-4f75-89f3-91267bf7defe" + ], + "x-ms-correlation-request-id": [ + "15ccabe7-02f6-4f75-89f3-91267bf7defe" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211542Z:15ccabe7-02f6-4f75-89f3-91267bf7defe" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799954" + ], + "x-ms-request-id": [ + "9f3f6fe3-d963-4614-8ae6-88168b4df680" + ], + "x-ms-correlation-request-id": [ + "9f3f6fe3-d963-4614-8ae6-88168b4df680" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211545Z:9f3f6fe3-d963-4614-8ae6-88168b4df680" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup/operations/4E3E3392FA56B90F\",\r\n \"operationId\": \"4E3E3392FA56B90F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:15:47.880344Z\",\r\n \"trackingId\": \"8c9ea6fe-2492-4ffc-8fe3-cc134f214581\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "640" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799952" + ], + "x-ms-request-id": [ + "50b20716-4fd1-44ee-9184-67ed4f411586" + ], + "x-ms-correlation-request-id": [ + "50b20716-4fd1-44ee-9184-67ed4f411586" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211548Z:50b20716-4fd1-44ee-9184-67ed4f411586" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:47 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup/operations/4E3E3392FA56B90F\",\r\n \"operationId\": \"4E3E3392FA56B90F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:15:47.880344Z\",\r\n \"trackingId\": \"8c9ea6fe-2492-4ffc-8fe3-cc134f214581\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "640" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799950" + ], + "x-ms-request-id": [ + "c8be9dc4-6de3-40b4-9404-e79eda4646df" + ], + "x-ms-correlation-request-id": [ + "c8be9dc4-6de3-40b4-9404-e79eda4646df" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211551Z:c8be9dc4-6de3-40b4-9404-e79eda4646df" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup/operations/4E3E3392FA56B90F\",\r\n \"operationId\": \"4E3E3392FA56B90F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:15:47.880344Z\",\r\n \"trackingId\": \"8c9ea6fe-2492-4ffc-8fe3-cc134f214581\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "640" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799948" + ], + "x-ms-request-id": [ + "190e56bf-70e4-4170-a6b9-800c279becc3" + ], + "x-ms-correlation-request-id": [ + "190e56bf-70e4-4170-a6b9-800c279becc3" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211554Z:190e56bf-70e4-4170-a6b9-800c279becc3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup/operations/A83328B581459D84\",\r\n \"operationId\": \"A83328B581459D84\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:15:56.8503944Z\",\r\n \"trackingId\": \"4b0fe5a9-9dfb-45a8-b451-193f09626740\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databases/sql-audit-cmdlet-db121\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121/sql-audit-cmdlet-db121\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup/operations/4E3E3392FA56B90F\",\r\n \"operationId\": \"4E3E3392FA56B90F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:15:47.880344Z\",\r\n \"trackingId\": \"8c9ea6fe-2492-4ffc-8fe3-cc134f214581\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1336" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799946" + ], + "x-ms-request-id": [ + "63aa99b3-94d1-4479-b06c-1da3bb0c1a3a" + ], + "x-ms-correlation-request-id": [ + "63aa99b3-94d1-4479-b06c-1da3bb0c1a3a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211557Z:63aa99b3-94d1-4479-b06c-1da3bb0c1a3a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup/operations/A83328B581459D84\",\r\n \"operationId\": \"A83328B581459D84\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:15:56.8503944Z\",\r\n \"trackingId\": \"4b0fe5a9-9dfb-45a8-b451-193f09626740\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databases/sql-audit-cmdlet-db121\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121/sql-audit-cmdlet-db121\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup/operations/4E3E3392FA56B90F\",\r\n \"operationId\": \"4E3E3392FA56B90F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:15:47.880344Z\",\r\n \"trackingId\": \"8c9ea6fe-2492-4ffc-8fe3-cc134f214581\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1336" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799944" + ], + "x-ms-request-id": [ + "646a3336-9457-4d68-ba91-67901a514a02" + ], + "x-ms-correlation-request-id": [ + "646a3336-9457-4d68-ba91-67901a514a02" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211600Z:646a3336-9457-4d68-ba91-67901a514a02" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup/operations/A83328B581459D84\",\r\n \"operationId\": \"A83328B581459D84\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:15:56.8503944Z\",\r\n \"trackingId\": \"4b0fe5a9-9dfb-45a8-b451-193f09626740\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databases/sql-audit-cmdlet-db121\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121/sql-audit-cmdlet-db121\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup/operations/4E3E3392FA56B90F\",\r\n \"operationId\": \"4E3E3392FA56B90F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:15:47.880344Z\",\r\n \"trackingId\": \"8c9ea6fe-2492-4ffc-8fe3-cc134f214581\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1336" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799942" + ], + "x-ms-request-id": [ + "c7d68545-7f28-4d49-ad13-31f21ee6e21b" + ], + "x-ms-correlation-request-id": [ + "c7d68545-7f28-4d49-ad13-31f21ee6e21b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211604Z:c7d68545-7f28-4d49-ad13-31f21ee6e21b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:16:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db121\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server121\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:14:50.9374671Z\",\r\n \"correlationId\": \"64b25de6-6d8c-49d4-9a83-5c4997ce4717\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databases/sql-audit-cmdlet-db121\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121/sql-audit-cmdlet-db121\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799987" + ], + "x-ms-request-id": [ + "040728c3-75d6-419a-9611-39576dcad9bf" + ], + "x-ms-correlation-request-id": [ + "040728c3-75d6-419a-9611-39576dcad9bf" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211452Z:040728c3-75d6-419a-9611-39576dcad9bf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:14:52 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db121\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server121\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:14:53.5451782Z\",\r\n \"correlationId\": \"64b25de6-6d8c-49d4-9a83-5c4997ce4717\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databases/sql-audit-cmdlet-db121\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121/sql-audit-cmdlet-db121\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799985" + ], + "x-ms-request-id": [ + "8fe15f98-4d02-4e84-968f-c2f6a49c6556" + ], + "x-ms-correlation-request-id": [ + "8fe15f98-4d02-4e84-968f-c2f6a49c6556" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211455Z:8fe15f98-4d02-4e84-968f-c2f6a49c6556" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:14:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db121\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server121\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:14:53.5451782Z\",\r\n \"correlationId\": \"64b25de6-6d8c-49d4-9a83-5c4997ce4717\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databases/sql-audit-cmdlet-db121\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121/sql-audit-cmdlet-db121\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799983" + ], + "x-ms-request-id": [ + "14e50850-c5ca-45c8-8ac5-07fb07cee618" + ], + "x-ms-correlation-request-id": [ + "14e50850-c5ca-45c8-8ac5-07fb07cee618" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211458Z:14e50850-c5ca-45c8-8ac5-07fb07cee618" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:14:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db121\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server121\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:14:53.5451782Z\",\r\n \"correlationId\": \"64b25de6-6d8c-49d4-9a83-5c4997ce4717\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databases/sql-audit-cmdlet-db121\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121/sql-audit-cmdlet-db121\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799981" + ], + "x-ms-request-id": [ + "ffae382b-05d6-4f95-bf98-11f47c6895a6" + ], + "x-ms-correlation-request-id": [ + "ffae382b-05d6-4f95-bf98-11f47c6895a6" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211502Z:ffae382b-05d6-4f95-bf98-11f47c6895a6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db121\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server121\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:14:53.5451782Z\",\r\n \"correlationId\": \"64b25de6-6d8c-49d4-9a83-5c4997ce4717\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databases/sql-audit-cmdlet-db121\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121/sql-audit-cmdlet-db121\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799979" + ], + "x-ms-request-id": [ + "6510aa6f-9953-4cad-9207-10f2d7b493d7" + ], + "x-ms-correlation-request-id": [ + "6510aa6f-9953-4cad-9207-10f2d7b493d7" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211505Z:6510aa6f-9953-4cad-9207-10f2d7b493d7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db121\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server121\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:14:53.5451782Z\",\r\n \"correlationId\": \"64b25de6-6d8c-49d4-9a83-5c4997ce4717\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databases/sql-audit-cmdlet-db121\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121/sql-audit-cmdlet-db121\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799977" + ], + "x-ms-request-id": [ + "5434d1c5-a7e7-4a79-ae25-434d3f7e45ad" + ], + "x-ms-correlation-request-id": [ + "5434d1c5-a7e7-4a79-ae25-434d3f7e45ad" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211508Z:5434d1c5-a7e7-4a79-ae25-434d3f7e45ad" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:08 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db121\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server121\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:14:53.5451782Z\",\r\n \"correlationId\": \"64b25de6-6d8c-49d4-9a83-5c4997ce4717\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databases/sql-audit-cmdlet-db121\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121/sql-audit-cmdlet-db121\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799975" + ], + "x-ms-request-id": [ + "d8af5d85-30f0-4ee3-b376-9ebf213ce565" + ], + "x-ms-correlation-request-id": [ + "d8af5d85-30f0-4ee3-b376-9ebf213ce565" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211511Z:d8af5d85-30f0-4ee3-b376-9ebf213ce565" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:11 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db121\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server121\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:14:53.5451782Z\",\r\n \"correlationId\": \"64b25de6-6d8c-49d4-9a83-5c4997ce4717\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databases/sql-audit-cmdlet-db121\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121/sql-audit-cmdlet-db121\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799973" + ], + "x-ms-request-id": [ + "8dab63da-5c43-4f91-9638-97d4b88145e8" + ], + "x-ms-correlation-request-id": [ + "8dab63da-5c43-4f91-9638-97d4b88145e8" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211514Z:8dab63da-5c43-4f91-9638-97d4b88145e8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db121\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server121\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:14:53.5451782Z\",\r\n \"correlationId\": \"64b25de6-6d8c-49d4-9a83-5c4997ce4717\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databases/sql-audit-cmdlet-db121\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121/sql-audit-cmdlet-db121\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799971" + ], + "x-ms-request-id": [ + "cc7350ab-9bfc-413e-a8b1-38f18d9c1574" + ], + "x-ms-correlation-request-id": [ + "cc7350ab-9bfc-413e-a8b1-38f18d9c1574" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211517Z:cc7350ab-9bfc-413e-a8b1-38f18d9c1574" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:17 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db121\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server121\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:14:53.5451782Z\",\r\n \"correlationId\": \"64b25de6-6d8c-49d4-9a83-5c4997ce4717\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databases/sql-audit-cmdlet-db121\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121/sql-audit-cmdlet-db121\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799969" + ], + "x-ms-request-id": [ + "10245fcd-f687-4c45-b9dc-91103082aa48" + ], + "x-ms-correlation-request-id": [ + "10245fcd-f687-4c45-b9dc-91103082aa48" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211520Z:10245fcd-f687-4c45-b9dc-91103082aa48" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:20 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db121\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server121\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:14:53.5451782Z\",\r\n \"correlationId\": \"64b25de6-6d8c-49d4-9a83-5c4997ce4717\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databases/sql-audit-cmdlet-db121\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121/sql-audit-cmdlet-db121\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799967" + ], + "x-ms-request-id": [ + "a9716157-66c0-4ba7-8d4a-c1f6412a37b9" + ], + "x-ms-correlation-request-id": [ + "a9716157-66c0-4ba7-8d4a-c1f6412a37b9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211523Z:a9716157-66c0-4ba7-8d4a-c1f6412a37b9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:23 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db121\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server121\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:14:53.5451782Z\",\r\n \"correlationId\": \"64b25de6-6d8c-49d4-9a83-5c4997ce4717\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databases/sql-audit-cmdlet-db121\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121/sql-audit-cmdlet-db121\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799965" + ], + "x-ms-request-id": [ + "7bba02be-ed28-4db0-ab22-6b96c57482fa" + ], + "x-ms-correlation-request-id": [ + "7bba02be-ed28-4db0-ab22-6b96c57482fa" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211526Z:7bba02be-ed28-4db0-ab22-6b96c57482fa" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db121\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server121\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:14:53.5451782Z\",\r\n \"correlationId\": \"64b25de6-6d8c-49d4-9a83-5c4997ce4717\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databases/sql-audit-cmdlet-db121\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121/sql-audit-cmdlet-db121\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799963" + ], + "x-ms-request-id": [ + "0ff79758-702d-44d0-859c-0c7eac4764d9" + ], + "x-ms-correlation-request-id": [ + "0ff79758-702d-44d0-859c-0c7eac4764d9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211530Z:0ff79758-702d-44d0-859c-0c7eac4764d9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:29 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db121\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server121\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:14:53.5451782Z\",\r\n \"correlationId\": \"64b25de6-6d8c-49d4-9a83-5c4997ce4717\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databases/sql-audit-cmdlet-db121\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121/sql-audit-cmdlet-db121\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799961" + ], + "x-ms-request-id": [ + "0869a5c5-e1ac-454d-91aa-918b0b4f9e7a" + ], + "x-ms-correlation-request-id": [ + "0869a5c5-e1ac-454d-91aa-918b0b4f9e7a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211533Z:0869a5c5-e1ac-454d-91aa-918b0b4f9e7a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:32 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db121\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server121\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:14:53.5451782Z\",\r\n \"correlationId\": \"64b25de6-6d8c-49d4-9a83-5c4997ce4717\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databases/sql-audit-cmdlet-db121\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121/sql-audit-cmdlet-db121\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799959" + ], + "x-ms-request-id": [ + "52228916-4470-4904-9dcb-cfe8bf875411" + ], + "x-ms-correlation-request-id": [ + "52228916-4470-4904-9dcb-cfe8bf875411" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211536Z:52228916-4470-4904-9dcb-cfe8bf875411" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:36 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db121\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server121\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:14:53.5451782Z\",\r\n \"correlationId\": \"64b25de6-6d8c-49d4-9a83-5c4997ce4717\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databases/sql-audit-cmdlet-db121\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121/sql-audit-cmdlet-db121\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799957" + ], + "x-ms-request-id": [ + "3663fa70-f96b-4fd6-be8e-968de8f9768a" + ], + "x-ms-correlation-request-id": [ + "3663fa70-f96b-4fd6-be8e-968de8f9768a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211539Z:3663fa70-f96b-4fd6-be8e-968de8f9768a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db121\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server121\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:14:53.5451782Z\",\r\n \"correlationId\": \"64b25de6-6d8c-49d4-9a83-5c4997ce4717\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databases/sql-audit-cmdlet-db121\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121/sql-audit-cmdlet-db121\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799955" + ], + "x-ms-request-id": [ + "e83c38e4-7446-4527-a77a-b176c156f093" + ], + "x-ms-correlation-request-id": [ + "e83c38e4-7446-4527-a77a-b176c156f093" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211542Z:e83c38e4-7446-4527-a77a-b176c156f093" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db121\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server121\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:14:53.5451782Z\",\r\n \"correlationId\": \"64b25de6-6d8c-49d4-9a83-5c4997ce4717\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databases/sql-audit-cmdlet-db121\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121/sql-audit-cmdlet-db121\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799953" + ], + "x-ms-request-id": [ + "d5e210f7-2622-4252-a116-5a83d077a268" + ], + "x-ms-correlation-request-id": [ + "d5e210f7-2622-4252-a116-5a83d077a268" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211545Z:d5e210f7-2622-4252-a116-5a83d077a268" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db121\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server121\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:14:53.5451782Z\",\r\n \"correlationId\": \"64b25de6-6d8c-49d4-9a83-5c4997ce4717\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databases/sql-audit-cmdlet-db121\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121/sql-audit-cmdlet-db121\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799951" + ], + "x-ms-request-id": [ + "b04e0e16-3611-4bfe-9c98-7d0ef72303d3" + ], + "x-ms-correlation-request-id": [ + "b04e0e16-3611-4bfe-9c98-7d0ef72303d3" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211548Z:b04e0e16-3611-4bfe-9c98-7d0ef72303d3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db121\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server121\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:14:53.5451782Z\",\r\n \"correlationId\": \"64b25de6-6d8c-49d4-9a83-5c4997ce4717\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databases/sql-audit-cmdlet-db121\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121/sql-audit-cmdlet-db121\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799949" + ], + "x-ms-request-id": [ + "1fce038b-4b67-424c-8154-e9d41928109b" + ], + "x-ms-correlation-request-id": [ + "1fce038b-4b67-424c-8154-e9d41928109b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211551Z:1fce038b-4b67-424c-8154-e9d41928109b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db121\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server121\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:14:53.5451782Z\",\r\n \"correlationId\": \"64b25de6-6d8c-49d4-9a83-5c4997ce4717\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databases/sql-audit-cmdlet-db121\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121/sql-audit-cmdlet-db121\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799947" + ], + "x-ms-request-id": [ + "8a59ea70-5826-4733-9f87-2e255c629bb6" + ], + "x-ms-correlation-request-id": [ + "8a59ea70-5826-4733-9f87-2e255c629bb6" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211554Z:8a59ea70-5826-4733-9f87-2e255c629bb6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db121\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server121\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:14:53.5451782Z\",\r\n \"correlationId\": \"64b25de6-6d8c-49d4-9a83-5c4997ce4717\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databases/sql-audit-cmdlet-db121\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121/sql-audit-cmdlet-db121\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799945" + ], + "x-ms-request-id": [ + "e090a306-50ce-44c6-b45b-e7e04790b59f" + ], + "x-ms-correlation-request-id": [ + "e090a306-50ce-44c6-b45b-e7e04790b59f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211558Z:e090a306-50ce-44c6-b45b-e7e04790b59f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:15:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db121\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server121\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:14:53.5451782Z\",\r\n \"correlationId\": \"64b25de6-6d8c-49d4-9a83-5c4997ce4717\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databases/sql-audit-cmdlet-db121\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121/sql-audit-cmdlet-db121\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799943" + ], + "x-ms-request-id": [ + "3f8bbfeb-919e-48d6-840a-7cc9ae937dc5" + ], + "x-ms-correlation-request-id": [ + "3f8bbfeb-919e-48d6-840a-7cc9ae937dc5" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211601Z:3f8bbfeb-919e-48d6-840a-7cc9ae937dc5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:16:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db121\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server121\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:16:01.7985814Z\",\r\n \"correlationId\": \"64b25de6-6d8c-49d4-9a83-5c4997ce4717\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databases/sql-audit-cmdlet-db121\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server121/sql-audit-cmdlet-db121\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1626" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799941" + ], + "x-ms-request-id": [ + "24c6dcd0-b559-4fca-901f-956f5a6051dc" + ], + "x-ms-correlation-request-id": [ + "24c6dcd0-b559-4fca-901f-956f5a6051dc" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211604Z:24c6dcd0-b559-4fca-901f-956f5a6051dc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:16:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121\",\r\n \"name\": \"sql-audit-cmdlet-server121\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databases/sql-audit-cmdlet-db121\",\r\n \"name\": \"sql-audit-cmdlet-server121/sql-audit-cmdlet-db121\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "577" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799940" + ], + "x-ms-request-id": [ + "5dd953f0-9709-464f-86af-4d2e2edf6a53" + ], + "x-ms-correlation-request-id": [ + "5dd953f0-9709-464f-86af-4d2e2edf6a53" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211606Z:5dd953f0-9709-464f-86af-4d2e2edf6a53" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:16:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westeurope:192fbd51-8263-4704-a1c0-560d6d95d066" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799939" + ], + "x-ms-correlation-request-id": [ + "ad117b05-6a80-43cd-af03-df9539dda22f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211607Z:ad117b05-6a80-43cd-af03-df9539dda22f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:16:07 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databaseSecurityPolicies/sql-audit-cmdlet-db121?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMTIxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiMTIxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "8d2b324f-9121-431a-b93f-a2bb7f5449f0-2014-10-31 21:16:08Z" + ], + "x-ms-client-request-id": [ + "f6ef51cd-8c71-42f4-b9ab-30786190326c-2014-10-31 21:16:08Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets121\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets121.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server121.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db121;User ID={0}@sql-audit-cmdlet-server121;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server121.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db121;Uid={0}@sql-audit-cmdlet-server121;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server121.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db121\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server121.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db121\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server121\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db121\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server121.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server121.database.secure.windows.net:1433;database=sql-audit-cmdlet-db121;user={0}@sql-audit-cmdlet-server121;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server121.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databaseSecurityPolicies/sql-audit-cmdlet-db121\",\r\n \"name\": \"sql-audit-cmdlet-db121\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2816" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "a81e2893-0e61-41a6-bfd4-e905faa72a93" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799846" + ], + "x-ms-correlation-request-id": [ + "63e0cbd9-061c-48cc-852b-633463585fcf" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211610Z:63e0cbd9-061c-48cc-852b-633463585fcf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:16:10 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databaseSecurityPolicies/sql-audit-cmdlet-db121?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMTIxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiMTIxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "8d2b324f-9121-431a-b93f-a2bb7f5449f0-2014-10-31 21:16:08Z" + ], + "x-ms-client-request-id": [ + "7b6d9e52-5b82-43e0-b3df-b509034e363f-2014-10-31 21:16:15Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets121\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets121.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server121.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db121;User ID={0}@sql-audit-cmdlet-server121;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server121.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db121;Uid={0}@sql-audit-cmdlet-server121;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server121.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db121\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server121.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db121\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server121\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db121\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server121.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server121.database.secure.windows.net:1433;database=sql-audit-cmdlet-db121;user={0}@sql-audit-cmdlet-server121;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server121.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databaseSecurityPolicies/sql-audit-cmdlet-db121\",\r\n \"name\": \"sql-audit-cmdlet-db121\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2816" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "0ba4ce52-28d3-4e0b-ac24-16579b24fcd7" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799845" + ], + "x-ms-correlation-request-id": [ + "33d65a59-4f78-4cb9-b7f8-ec064ceca142" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211615Z:33d65a59-4f78-4cb9-b7f8-ec064ceca142" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:16:15 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databaseSecurityPolicies/sql-audit-cmdlet-db121?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMTIxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiMTIxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "8d2b324f-9121-431a-b93f-a2bb7f5449f0-2014-10-31 21:16:08Z" + ], + "x-ms-client-request-id": [ + "28d2635c-0c16-46b6-98ac-0cce4f56f4d3-2014-10-31 21:16:19Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": false,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets121\",\r\n \"storageAccountKey\": null,\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets121.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server121.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db121;User ID={0}@sql-audit-cmdlet-server121;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server121.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db121;Uid={0}@sql-audit-cmdlet-server121;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server121.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db121\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server121.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db121\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server121\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db121\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server121.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server121.database.secure.windows.net:1433;database=sql-audit-cmdlet-db121;user={0}@sql-audit-cmdlet-server121;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server121.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databaseSecurityPolicies/sql-audit-cmdlet-db121\",\r\n \"name\": \"sql-audit-cmdlet-db121\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2811" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "ff319eba-fc20-4739-9671-68e8659a8753" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799844" + ], + "x-ms-correlation-request-id": [ + "d66336a7-16c7-4097-a22f-0effaa83c208" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211619Z:d66336a7-16c7-4097-a22f-0effaa83c208" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:16:19 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databaseSecurityPolicies/sql-audit-cmdlet-db121?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMTIxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiMTIxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "8d2b324f-9121-431a-b93f-a2bb7f5449f0-2014-10-31 21:16:08Z" + ], + "x-ms-client-request-id": [ + "db0f3f26-9486-46b1-b9e4-e752ba1ef542-2014-10-31 21:16:24Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets121\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets121.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server121.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db121;User ID={0}@sql-audit-cmdlet-server121;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server121.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db121;Uid={0}@sql-audit-cmdlet-server121;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server121.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db121\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server121.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db121\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server121\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db121\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server121.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server121.database.secure.windows.net:1433;database=sql-audit-cmdlet-db121;user={0}@sql-audit-cmdlet-server121;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server121.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databaseSecurityPolicies/sql-audit-cmdlet-db121\",\r\n \"name\": \"sql-audit-cmdlet-db121\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2816" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "9eabdbad-d002-4632-a59e-2b15520014fb" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799843" + ], + "x-ms-correlation-request-id": [ + "8e35c6ea-c2af-41af-8a3c-1c9cc28fe564" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211624Z:8e35c6ea-c2af-41af-8a3c-1c9cc28fe564" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:16:24 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets121/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzMTIxL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "8d2b324f-9121-431a-b93f-a2bb7f5449f0-2014-10-31 21:16:08Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"303JiLJXGpnMZzy7eJSCgqwFQNKX7j1eRJOY8WFULJuzGuGApA1BpRzAkXNesziPX/3kIgBCsz+uTpbAMwrKbA==\",\r\n \"secondaryKey\": \"8N7HQmCf66/4ZSL+DPQf+MeWjebPfmXW7KgIv0/2tdPk05f/ZHyknzkmkZc96DJBMiQEZ0PydY6iyMuolkvOxw==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:0bcccf22-14c8-4578-a9c5-6b120a3319b0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11988" + ], + "x-ms-correlation-request-id": [ + "159d181e-2c7f-43ea-abbf-bf035cccae20" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211611Z:159d181e-2c7f-43ea-abbf-bf035cccae20" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:16:11 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets121/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzMTIxL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "8d2b324f-9121-431a-b93f-a2bb7f5449f0-2014-10-31 21:16:08Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"303JiLJXGpnMZzy7eJSCgqwFQNKX7j1eRJOY8WFULJuzGuGApA1BpRzAkXNesziPX/3kIgBCsz+uTpbAMwrKbA==\",\r\n \"secondaryKey\": \"8N7HQmCf66/4ZSL+DPQf+MeWjebPfmXW7KgIv0/2tdPk05f/ZHyknzkmkZc96DJBMiQEZ0PydY6iyMuolkvOxw==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:ec06e1f4-f836-456f-9daf-2f1dd58bdab8" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11985" + ], + "x-ms-correlation-request-id": [ + "a81b15cc-37da-4690-999a-128e1fb96eb2" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211620Z:a81b15cc-37da-4690-999a-128e1fb96eb2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:16:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databaseSecurityPolicies/sql-audit-cmdlet-db121?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMTIxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiMTIxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets121\",\r\n \"storageAccountKey\": \"303JiLJXGpnMZzy7eJSCgqwFQNKX7j1eRJOY8WFULJuzGuGApA1BpRzAkXNesziPX/3kIgBCsz+uTpbAMwrKbA==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets121.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "788" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "8d2b324f-9121-431a-b93f-a2bb7f5449f0-2014-10-31 21:16:08Z" + ], + "x-ms-client-request-id": [ + "f6ef51cd-8c71-42f4-b9ab-30786190326c-2014-10-31 21:16:08Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets121\",\r\n \"storageAccountKey\": \"303JiLJXGpnMZzy7eJSCgqwFQNKX7j1eRJOY8WFULJuzGuGApA1BpRzAkXNesziPX/3kIgBCsz+uTpbAMwrKbA==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets121.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databaseSecurityPolicies/sql-audit-cmdlet-db121\",\r\n \"name\": \"sql-audit-cmdlet-db121\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1159" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "fe466cc3-deef-4682-97e4-610213514f9c" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11987" + ], + "x-ms-correlation-request-id": [ + "4c52f169-486d-4337-b961-62ec3f6d6adc" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211613Z:4c52f169-486d-4337-b961-62ec3f6d6adc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:16:13 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databaseSecurityPolicies/sql-audit-cmdlet-db121?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMTIxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiMTIxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": false,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets121\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets121.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "671" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "8d2b324f-9121-431a-b93f-a2bb7f5449f0-2014-10-31 21:16:08Z" + ], + "x-ms-client-request-id": [ + "7b6d9e52-5b82-43e0-b3df-b509034e363f-2014-10-31 21:16:15Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": false,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets121\",\r\n \"storageAccountKey\": null,\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets121.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databaseSecurityPolicies/sql-audit-cmdlet-db121\",\r\n \"name\": \"sql-audit-cmdlet-db121\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1074" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "ebe89ec1-0097-407f-8732-6db55a1846f5" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11986" + ], + "x-ms-correlation-request-id": [ + "7a287b91-57e3-4658-bd82-cb8c1bda63a6" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211618Z:7a287b91-57e3-4658-bd82-cb8c1bda63a6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:16:17 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databaseSecurityPolicies/sql-audit-cmdlet-db121?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEyMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMTIxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiMTIxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets121\",\r\n \"storageAccountKey\": \"303JiLJXGpnMZzy7eJSCgqwFQNKX7j1eRJOY8WFULJuzGuGApA1BpRzAkXNesziPX/3kIgBCsz+uTpbAMwrKbA==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets121.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "788" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "8d2b324f-9121-431a-b93f-a2bb7f5449f0-2014-10-31 21:16:08Z" + ], + "x-ms-client-request-id": [ + "28d2635c-0c16-46b6-98ac-0cce4f56f4d3-2014-10-31 21:16:19Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets121\",\r\n \"storageAccountKey\": \"303JiLJXGpnMZzy7eJSCgqwFQNKX7j1eRJOY8WFULJuzGuGApA1BpRzAkXNesziPX/3kIgBCsz+uTpbAMwrKbA==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets121.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg121/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server121/databaseSecurityPolicies/sql-audit-cmdlet-db121\",\r\n \"name\": \"sql-audit-cmdlet-db121\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1159" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "3bb6062e-79f7-4c6f-84cf-3f258489619f" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11984" + ], + "x-ms-correlation-request-id": [ + "e7de8968-0fa3-46b9-ac4a-b789ad77b67d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211623Z:e7de8968-0fa3-46b9-ac4a-b789ad77b67d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:16:23 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices/auditcmdlets121", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXMvYXVkaXRjbWRsZXRzMTIx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "ba2759af44fe2495ad8504fe48488703" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:16:28 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/ba2759af44fe2495ad8504fe48488703", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zL2JhMjc1OWFmNDRmZTI0OTVhZDg1MDRmZTQ4NDg4NzAz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/2.0.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "\r\n ba2759af-44fe-2495-ad85-04fe48488703\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "fee0831827102a7fb4a58c9cc0f61d97" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:16:29 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "cca24ec8-99b5-4aa7-9ff6-486e886f304c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestDatabaseStorageKeyRotation.json b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestDatabaseStorageKeyRotation.json new file mode 100644 index 000000000000..9caadee60d3c --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestDatabaseStorageKeyRotation.json @@ -0,0 +1,3551 @@ +{ + "Entries": [ + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXM=", + "RequestMethod": "POST", + "RequestBody": "\r\n auditcmdlets680\r\n \r\n \r\n West US\r\n \r\n Standard_GRS\r\n", + "RequestHeaders": { + "Content-Type": [ + "application/xml" + ], + "Content-Length": [ + "379" + ], + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "927" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "dcf16cc25a162cc5b6f426d2e0d473c6" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:38:02 GMT" + ], + "Location": [ + "https://management.core.windows.net/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/storage/auditcmdlets680" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/dcf16cc25a162cc5b6f426d2e0d473c6", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zL2RjZjE2Y2MyNWExNjJjYzViNmY0MjZkMmUwZDQ3M2M2", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "927" + ] + }, + "ResponseBody": "\r\n dcf16cc2-5a16-2cc5-b6f4-26d2e0d473c6\r\n InProgress\r\n", + "ResponseHeaders": { + "Content-Length": [ + "197" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "b1a0d3300e312ab7b82da3c4a8576cfb" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:38:02 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/dcf16cc25a162cc5b6f426d2e0d473c6", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zL2RjZjE2Y2MyNWExNjJjYzViNmY0MjZkMmUwZDQ3M2M2", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "927" + ] + }, + "ResponseBody": "\r\n dcf16cc2-5a16-2cc5-b6f4-26d2e0d473c6\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "408e805cb61f236a9e4ef4ae2f66ff65" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:38:33 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "119" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799629" + ], + "x-ms-request-id": [ + "55c717b8-903f-4684-83b5-e49ce316de37" + ], + "x-ms-correlation-request-id": [ + "55c717b8-903f-4684-83b5-e49ce316de37" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213834Z:55c717b8-903f-4684-83b5-e49ce316de37" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:38:33 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680\",\r\n \"name\": \"sql-audit-cmdlet-test-rg680\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "217" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11960" + ], + "x-ms-request-id": [ + "8aee66be-9684-48b8-882c-004f79ba608a" + ], + "x-ms-correlation-request-id": [ + "8aee66be-9684-48b8-882c-004f79ba608a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213836Z:8aee66be-9684-48b8-882c-004f79ba608a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:38:35 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/validate?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvdmFsaWRhdGU/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:38:36.9197664Z\",\r\n \"correlationId\": \"30ebca8b-ab62-4f0d-8d72-d9c1049e8544\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11959" + ], + "x-ms-request-id": [ + "30ebca8b-ab62-4f0d-8d72-d9c1049e8544" + ], + "x-ms-correlation-request-id": [ + "30ebca8b-ab62-4f0d-8d72-d9c1049e8544" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213836Z:30ebca8b-ab62-4f0d-8d72-d9c1049e8544" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:38:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:38:38.6419812Z\",\r\n \"correlationId\": \"a0ef85ab-04a0-46cb-a3b3-69a46585f10a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11958" + ], + "x-ms-request-id": [ + "a0ef85ab-04a0-46cb-a3b3-69a46585f10a" + ], + "x-ms-correlation-request-id": [ + "a0ef85ab-04a0-46cb-a3b3-69a46585f10a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213839Z:a0ef85ab-04a0-46cb-a3b3-69a46585f10a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:38:39 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799628" + ], + "x-ms-request-id": [ + "851d83af-c6fe-471f-8538-557e95881c21" + ], + "x-ms-correlation-request-id": [ + "851d83af-c6fe-471f-8538-557e95881c21" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213839Z:851d83af-c6fe-471f-8538-557e95881c21" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:38:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799626" + ], + "x-ms-request-id": [ + "8bbb4a6b-8d83-4cf9-9767-85cdd70d52fe" + ], + "x-ms-correlation-request-id": [ + "8bbb4a6b-8d83-4cf9-9767-85cdd70d52fe" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213842Z:8bbb4a6b-8d83-4cf9-9767-85cdd70d52fe" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:38:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799624" + ], + "x-ms-request-id": [ + "ec4e5be3-ad35-4a4b-b9bd-69aed655e476" + ], + "x-ms-correlation-request-id": [ + "ec4e5be3-ad35-4a4b-b9bd-69aed655e476" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213845Z:ec4e5be3-ad35-4a4b-b9bd-69aed655e476" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:38:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799622" + ], + "x-ms-request-id": [ + "c806614a-07bc-41d2-84b6-b9dd1d224118" + ], + "x-ms-correlation-request-id": [ + "c806614a-07bc-41d2-84b6-b9dd1d224118" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213848Z:c806614a-07bc-41d2-84b6-b9dd1d224118" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:38:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799620" + ], + "x-ms-request-id": [ + "7862f954-999a-4ea9-8a3a-a4c3ab5cc4f2" + ], + "x-ms-correlation-request-id": [ + "7862f954-999a-4ea9-8a3a-a4c3ab5cc4f2" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213852Z:7862f954-999a-4ea9-8a3a-a4c3ab5cc4f2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:38:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799618" + ], + "x-ms-request-id": [ + "b57ad619-70eb-4532-bbfd-a236a4ba95ec" + ], + "x-ms-correlation-request-id": [ + "b57ad619-70eb-4532-bbfd-a236a4ba95ec" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213855Z:b57ad619-70eb-4532-bbfd-a236a4ba95ec" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:38:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799616" + ], + "x-ms-request-id": [ + "25c8d31d-fe6a-4f64-b16f-03db11db857f" + ], + "x-ms-correlation-request-id": [ + "25c8d31d-fe6a-4f64-b16f-03db11db857f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213858Z:25c8d31d-fe6a-4f64-b16f-03db11db857f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:38:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799614" + ], + "x-ms-request-id": [ + "6af88c3e-d9c2-4650-9520-caae31b5b62a" + ], + "x-ms-correlation-request-id": [ + "6af88c3e-d9c2-4650-9520-caae31b5b62a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213901Z:6af88c3e-d9c2-4650-9520-caae31b5b62a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799612" + ], + "x-ms-request-id": [ + "7ec3c4ad-0e52-45e1-bbfb-df9c344edc6e" + ], + "x-ms-correlation-request-id": [ + "7ec3c4ad-0e52-45e1-bbfb-df9c344edc6e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213904Z:7ec3c4ad-0e52-45e1-bbfb-df9c344edc6e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799610" + ], + "x-ms-request-id": [ + "01472db5-978b-4d45-9e08-0572bf822b44" + ], + "x-ms-correlation-request-id": [ + "01472db5-978b-4d45-9e08-0572bf822b44" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213907Z:01472db5-978b-4d45-9e08-0572bf822b44" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:07 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799608" + ], + "x-ms-request-id": [ + "14fdc560-32b9-482f-a5b8-db796bca3684" + ], + "x-ms-correlation-request-id": [ + "14fdc560-32b9-482f-a5b8-db796bca3684" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213910Z:14fdc560-32b9-482f-a5b8-db796bca3684" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799606" + ], + "x-ms-request-id": [ + "a5f52548-8e28-471c-9816-45ba23ea1906" + ], + "x-ms-correlation-request-id": [ + "a5f52548-8e28-471c-9816-45ba23ea1906" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213913Z:a5f52548-8e28-471c-9816-45ba23ea1906" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799604" + ], + "x-ms-request-id": [ + "37226fdc-11b9-4396-945d-33e445dcdd42" + ], + "x-ms-correlation-request-id": [ + "37226fdc-11b9-4396-945d-33e445dcdd42" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213916Z:37226fdc-11b9-4396-945d-33e445dcdd42" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:16 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799602" + ], + "x-ms-request-id": [ + "d22a7421-466d-4acf-9c24-f180645edeed" + ], + "x-ms-correlation-request-id": [ + "d22a7421-466d-4acf-9c24-f180645edeed" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213919Z:d22a7421-466d-4acf-9c24-f180645edeed" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799600" + ], + "x-ms-request-id": [ + "e677d754-e12e-4a6c-ad28-32a28295a78a" + ], + "x-ms-correlation-request-id": [ + "e677d754-e12e-4a6c-ad28-32a28295a78a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213922Z:e677d754-e12e-4a6c-ad28-32a28295a78a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799598" + ], + "x-ms-request-id": [ + "f9d2f770-2bc7-4c8e-9411-f8037fac42f8" + ], + "x-ms-correlation-request-id": [ + "f9d2f770-2bc7-4c8e-9411-f8037fac42f8" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213925Z:f9d2f770-2bc7-4c8e-9411-f8037fac42f8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:25 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799596" + ], + "x-ms-request-id": [ + "f911e760-3009-4b72-9ee1-8e7f6df889cc" + ], + "x-ms-correlation-request-id": [ + "f911e760-3009-4b72-9ee1-8e7f6df889cc" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213928Z:f911e760-3009-4b72-9ee1-8e7f6df889cc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799594" + ], + "x-ms-request-id": [ + "479eefdf-204a-4359-96ee-5a2a0f718d56" + ], + "x-ms-correlation-request-id": [ + "479eefdf-204a-4359-96ee-5a2a0f718d56" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213931Z:479eefdf-204a-4359-96ee-5a2a0f718d56" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:31 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799592" + ], + "x-ms-request-id": [ + "b98fc362-1e6e-45c6-a96f-d39d7e6b4a64" + ], + "x-ms-correlation-request-id": [ + "b98fc362-1e6e-45c6-a96f-d39d7e6b4a64" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213934Z:b98fc362-1e6e-45c6-a96f-d39d7e6b4a64" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:34 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations/3DDCB0C4C59F9132\",\r\n \"operationId\": \"3DDCB0C4C59F9132\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:39:35.1369818Z\",\r\n \"trackingId\": \"92602253-ac16-4ec9-a215-19cc3f553de5\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799590" + ], + "x-ms-request-id": [ + "26f21164-a4f0-46eb-af20-6fe0b2396fb0" + ], + "x-ms-correlation-request-id": [ + "26f21164-a4f0-46eb-af20-6fe0b2396fb0" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213937Z:26f21164-a4f0-46eb-af20-6fe0b2396fb0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:37 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations/3DDCB0C4C59F9132\",\r\n \"operationId\": \"3DDCB0C4C59F9132\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:39:35.1369818Z\",\r\n \"trackingId\": \"92602253-ac16-4ec9-a215-19cc3f553de5\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799588" + ], + "x-ms-request-id": [ + "e3881ef3-64b0-49ba-b6ba-228f3d5b23eb" + ], + "x-ms-correlation-request-id": [ + "e3881ef3-64b0-49ba-b6ba-228f3d5b23eb" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213941Z:e3881ef3-64b0-49ba-b6ba-228f3d5b23eb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations/1F97A67882C6532C\",\r\n \"operationId\": \"1F97A67882C6532C\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:39:43.3896894Z\",\r\n \"trackingId\": \"84588051-f28f-4dae-b8a1-dc18ece58828\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations/3DDCB0C4C59F9132\",\r\n \"operationId\": \"3DDCB0C4C59F9132\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:39:35.1369818Z\",\r\n \"trackingId\": \"92602253-ac16-4ec9-a215-19cc3f553de5\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799586" + ], + "x-ms-request-id": [ + "a9d4302e-76b5-41a2-a527-864343d4a889" + ], + "x-ms-correlation-request-id": [ + "a9d4302e-76b5-41a2-a527-864343d4a889" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213944Z:a9d4302e-76b5-41a2-a527-864343d4a889" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations/1F97A67882C6532C\",\r\n \"operationId\": \"1F97A67882C6532C\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:39:43.3896894Z\",\r\n \"trackingId\": \"84588051-f28f-4dae-b8a1-dc18ece58828\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations/3DDCB0C4C59F9132\",\r\n \"operationId\": \"3DDCB0C4C59F9132\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:39:35.1369818Z\",\r\n \"trackingId\": \"92602253-ac16-4ec9-a215-19cc3f553de5\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799584" + ], + "x-ms-request-id": [ + "ebd541bb-ff9b-4155-a851-f355d5bfefe0" + ], + "x-ms-correlation-request-id": [ + "ebd541bb-ff9b-4155-a851-f355d5bfefe0" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213947Z:ebd541bb-ff9b-4155-a851-f355d5bfefe0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations/1F97A67882C6532C\",\r\n \"operationId\": \"1F97A67882C6532C\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:39:43.3896894Z\",\r\n \"trackingId\": \"84588051-f28f-4dae-b8a1-dc18ece58828\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations/3DDCB0C4C59F9132\",\r\n \"operationId\": \"3DDCB0C4C59F9132\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:39:35.1369818Z\",\r\n \"trackingId\": \"92602253-ac16-4ec9-a215-19cc3f553de5\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799582" + ], + "x-ms-request-id": [ + "136f06cd-83cf-4079-86ea-594d59c42cba" + ], + "x-ms-correlation-request-id": [ + "136f06cd-83cf-4079-86ea-594d59c42cba" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213950Z:136f06cd-83cf-4079-86ea-594d59c42cba" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:38:38.6419812Z\",\r\n \"correlationId\": \"a0ef85ab-04a0-46cb-a3b3-69a46585f10a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799627" + ], + "x-ms-request-id": [ + "5618fe2c-baec-4ea3-b4f9-a67543a0ff9d" + ], + "x-ms-correlation-request-id": [ + "5618fe2c-baec-4ea3-b4f9-a67543a0ff9d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213840Z:5618fe2c-baec-4ea3-b4f9-a67543a0ff9d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:38:40 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:38:41.8116189Z\",\r\n \"correlationId\": \"a0ef85ab-04a0-46cb-a3b3-69a46585f10a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799625" + ], + "x-ms-request-id": [ + "2d914544-9919-471e-abb0-abf6c93e6723" + ], + "x-ms-correlation-request-id": [ + "2d914544-9919-471e-abb0-abf6c93e6723" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213843Z:2d914544-9919-471e-abb0-abf6c93e6723" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:38:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:38:41.8116189Z\",\r\n \"correlationId\": \"a0ef85ab-04a0-46cb-a3b3-69a46585f10a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799623" + ], + "x-ms-request-id": [ + "61c47d87-9b6f-4972-a8eb-17a7ed12e6d8" + ], + "x-ms-correlation-request-id": [ + "61c47d87-9b6f-4972-a8eb-17a7ed12e6d8" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213846Z:61c47d87-9b6f-4972-a8eb-17a7ed12e6d8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:38:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:38:41.8116189Z\",\r\n \"correlationId\": \"a0ef85ab-04a0-46cb-a3b3-69a46585f10a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799621" + ], + "x-ms-request-id": [ + "3f7bd9e7-ff5a-4d9a-9e38-1cc73cbc0fae" + ], + "x-ms-correlation-request-id": [ + "3f7bd9e7-ff5a-4d9a-9e38-1cc73cbc0fae" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213849Z:3f7bd9e7-ff5a-4d9a-9e38-1cc73cbc0fae" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:38:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:38:41.8116189Z\",\r\n \"correlationId\": \"a0ef85ab-04a0-46cb-a3b3-69a46585f10a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799619" + ], + "x-ms-request-id": [ + "91a3f566-20fa-48a0-baec-a39dcc61af91" + ], + "x-ms-correlation-request-id": [ + "91a3f566-20fa-48a0-baec-a39dcc61af91" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213852Z:91a3f566-20fa-48a0-baec-a39dcc61af91" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:38:52 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:38:41.8116189Z\",\r\n \"correlationId\": \"a0ef85ab-04a0-46cb-a3b3-69a46585f10a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799617" + ], + "x-ms-request-id": [ + "25b21ea1-6830-4d6a-9da5-d33d57e5ac42" + ], + "x-ms-correlation-request-id": [ + "25b21ea1-6830-4d6a-9da5-d33d57e5ac42" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213855Z:25b21ea1-6830-4d6a-9da5-d33d57e5ac42" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:38:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:38:41.8116189Z\",\r\n \"correlationId\": \"a0ef85ab-04a0-46cb-a3b3-69a46585f10a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799615" + ], + "x-ms-request-id": [ + "35ee2b9c-4f13-40d1-bc17-ee7d6d788646" + ], + "x-ms-correlation-request-id": [ + "35ee2b9c-4f13-40d1-bc17-ee7d6d788646" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213858Z:35ee2b9c-4f13-40d1-bc17-ee7d6d788646" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:38:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:38:41.8116189Z\",\r\n \"correlationId\": \"a0ef85ab-04a0-46cb-a3b3-69a46585f10a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799613" + ], + "x-ms-request-id": [ + "71db2639-759f-4dd0-87b0-5335aefd4288" + ], + "x-ms-correlation-request-id": [ + "71db2639-759f-4dd0-87b0-5335aefd4288" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213901Z:71db2639-759f-4dd0-87b0-5335aefd4288" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:38:41.8116189Z\",\r\n \"correlationId\": \"a0ef85ab-04a0-46cb-a3b3-69a46585f10a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799611" + ], + "x-ms-request-id": [ + "f3019d38-bd12-42b8-8fc6-c60de0287668" + ], + "x-ms-correlation-request-id": [ + "f3019d38-bd12-42b8-8fc6-c60de0287668" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213904Z:f3019d38-bd12-42b8-8fc6-c60de0287668" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:38:41.8116189Z\",\r\n \"correlationId\": \"a0ef85ab-04a0-46cb-a3b3-69a46585f10a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799609" + ], + "x-ms-request-id": [ + "0af702da-652c-4a87-88b1-c595a16fb827" + ], + "x-ms-correlation-request-id": [ + "0af702da-652c-4a87-88b1-c595a16fb827" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213907Z:0af702da-652c-4a87-88b1-c595a16fb827" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:07 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:38:41.8116189Z\",\r\n \"correlationId\": \"a0ef85ab-04a0-46cb-a3b3-69a46585f10a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799607" + ], + "x-ms-request-id": [ + "42c3ca5a-2fda-419f-bdbd-872e0aacd8c2" + ], + "x-ms-correlation-request-id": [ + "42c3ca5a-2fda-419f-bdbd-872e0aacd8c2" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213910Z:42c3ca5a-2fda-419f-bdbd-872e0aacd8c2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:38:41.8116189Z\",\r\n \"correlationId\": \"a0ef85ab-04a0-46cb-a3b3-69a46585f10a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799605" + ], + "x-ms-request-id": [ + "3c8a91ff-7bc6-4e3f-837b-a34a50a542df" + ], + "x-ms-correlation-request-id": [ + "3c8a91ff-7bc6-4e3f-837b-a34a50a542df" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213913Z:3c8a91ff-7bc6-4e3f-837b-a34a50a542df" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:38:41.8116189Z\",\r\n \"correlationId\": \"a0ef85ab-04a0-46cb-a3b3-69a46585f10a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799603" + ], + "x-ms-request-id": [ + "027fa48d-abc3-423d-bf19-c694a33fc438" + ], + "x-ms-correlation-request-id": [ + "027fa48d-abc3-423d-bf19-c694a33fc438" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213916Z:027fa48d-abc3-423d-bf19-c694a33fc438" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:16 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:38:41.8116189Z\",\r\n \"correlationId\": \"a0ef85ab-04a0-46cb-a3b3-69a46585f10a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799601" + ], + "x-ms-request-id": [ + "bb1708c5-ea4d-4fbd-9642-c04c9630acea" + ], + "x-ms-correlation-request-id": [ + "bb1708c5-ea4d-4fbd-9642-c04c9630acea" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213920Z:bb1708c5-ea4d-4fbd-9642-c04c9630acea" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:38:41.8116189Z\",\r\n \"correlationId\": \"a0ef85ab-04a0-46cb-a3b3-69a46585f10a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799599" + ], + "x-ms-request-id": [ + "08ff0e41-bedb-4343-8cd3-4028bbed2a92" + ], + "x-ms-correlation-request-id": [ + "08ff0e41-bedb-4343-8cd3-4028bbed2a92" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213923Z:08ff0e41-bedb-4343-8cd3-4028bbed2a92" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:23 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:38:41.8116189Z\",\r\n \"correlationId\": \"a0ef85ab-04a0-46cb-a3b3-69a46585f10a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799597" + ], + "x-ms-request-id": [ + "bd3fa3b9-1af4-48d5-a872-550e0db0dc54" + ], + "x-ms-correlation-request-id": [ + "bd3fa3b9-1af4-48d5-a872-550e0db0dc54" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213926Z:bd3fa3b9-1af4-48d5-a872-550e0db0dc54" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:25 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:38:41.8116189Z\",\r\n \"correlationId\": \"a0ef85ab-04a0-46cb-a3b3-69a46585f10a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799595" + ], + "x-ms-request-id": [ + "c1fa2ed1-6d5a-4d87-8e87-308577a36a7d" + ], + "x-ms-correlation-request-id": [ + "c1fa2ed1-6d5a-4d87-8e87-308577a36a7d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213929Z:c1fa2ed1-6d5a-4d87-8e87-308577a36a7d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:38:41.8116189Z\",\r\n \"correlationId\": \"a0ef85ab-04a0-46cb-a3b3-69a46585f10a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799593" + ], + "x-ms-request-id": [ + "d4c0f197-814e-4cd2-b0a8-940351fbfd97" + ], + "x-ms-correlation-request-id": [ + "d4c0f197-814e-4cd2-b0a8-940351fbfd97" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213932Z:d4c0f197-814e-4cd2-b0a8-940351fbfd97" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:31 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:38:41.8116189Z\",\r\n \"correlationId\": \"a0ef85ab-04a0-46cb-a3b3-69a46585f10a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799591" + ], + "x-ms-request-id": [ + "5d066e2c-3375-4237-9f7f-b932925e43b3" + ], + "x-ms-correlation-request-id": [ + "5d066e2c-3375-4237-9f7f-b932925e43b3" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213935Z:5d066e2c-3375-4237-9f7f-b932925e43b3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:34 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:38:41.8116189Z\",\r\n \"correlationId\": \"a0ef85ab-04a0-46cb-a3b3-69a46585f10a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799589" + ], + "x-ms-request-id": [ + "ee259db8-6075-45e9-a89c-9a776749df77" + ], + "x-ms-correlation-request-id": [ + "ee259db8-6075-45e9-a89c-9a776749df77" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213938Z:ee259db8-6075-45e9-a89c-9a776749df77" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:38 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:38:41.8116189Z\",\r\n \"correlationId\": \"a0ef85ab-04a0-46cb-a3b3-69a46585f10a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799587" + ], + "x-ms-request-id": [ + "ad72f897-f41d-4928-b3cc-da9087bddb14" + ], + "x-ms-correlation-request-id": [ + "ad72f897-f41d-4928-b3cc-da9087bddb14" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213941Z:ad72f897-f41d-4928-b3cc-da9087bddb14" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:38:41.8116189Z\",\r\n \"correlationId\": \"a0ef85ab-04a0-46cb-a3b3-69a46585f10a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799585" + ], + "x-ms-request-id": [ + "777b0f78-2713-4ecc-8531-fde474e4118a" + ], + "x-ms-correlation-request-id": [ + "777b0f78-2713-4ecc-8531-fde474e4118a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213944Z:777b0f78-2713-4ecc-8531-fde474e4118a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:38:41.8116189Z\",\r\n \"correlationId\": \"a0ef85ab-04a0-46cb-a3b3-69a46585f10a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799583" + ], + "x-ms-request-id": [ + "8edc8ab3-2111-4573-a646-fd23e38a1d7c" + ], + "x-ms-correlation-request-id": [ + "8edc8ab3-2111-4573-a646-fd23e38a1d7c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213947Z:8edc8ab3-2111-4573-a646-fd23e38a1d7c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:39:47.7466886Z\",\r\n \"correlationId\": \"a0ef85ab-04a0-46cb-a3b3-69a46585f10a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1626" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799581" + ], + "x-ms-request-id": [ + "3e776fc2-5f05-426e-8758-229b187682c7" + ], + "x-ms-correlation-request-id": [ + "3e776fc2-5f05-426e-8758-229b187682c7" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213951Z:3e776fc2-5f05-426e-8758-229b187682c7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"name\": \"sql-audit-cmdlet-server680\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"name\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "577" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799580" + ], + "x-ms-request-id": [ + "2571046f-a1e7-4bac-a9db-f3408fade8e5" + ], + "x-ms-correlation-request-id": [ + "2571046f-a1e7-4bac-a9db-f3408fade8e5" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213953Z:2571046f-a1e7-4bac-a9db-f3408fade8e5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westeurope:99a2a9cd-8416-47ee-ae9c-d95f0236203a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799875" + ], + "x-ms-correlation-request-id": [ + "1dc33c1c-027e-47d1-9319-a11bcaf69525" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213954Z:1dc33c1c-027e-47d1-9319-a11bcaf69525" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/sql-audit-cmdlet-db680?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjgwL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNjgwP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "4efc69fe-7443-406e-9a54-b758b67012ad-2014-10-31 21:39:56Z" + ], + "x-ms-client-request-id": [ + "63e86a0e-d42b-4e52-b89a-35a853fbcc7c-2014-10-31 21:39:56Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets680\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets680.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db680;User ID={0}@sql-audit-cmdlet-server680;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db680;Uid={0}@sql-audit-cmdlet-server680;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server680.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db680\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db680\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server680\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db680\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server680.database.secure.windows.net:1433;database=sql-audit-cmdlet-db680;user={0}@sql-audit-cmdlet-server680;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server680.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/sql-audit-cmdlet-db680\",\r\n \"name\": \"sql-audit-cmdlet-db680\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2812" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "72ee14fe-78b8-4d86-89d4-fd8dbb167ac8" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799984" + ], + "x-ms-correlation-request-id": [ + "4a195b30-c0da-4694-bf8f-f3c20e4f96ff" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213957Z:4a195b30-c0da-4694-bf8f-f3c20e4f96ff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:57 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/sql-audit-cmdlet-db680?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjgwL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNjgwP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "4efc69fe-7443-406e-9a54-b758b67012ad-2014-10-31 21:39:56Z" + ], + "x-ms-client-request-id": [ + "3beab6a3-f4f3-44d6-a4c4-69ae8c12c814-2014-10-31 21:40:02Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets680\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets680.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db680;User ID={0}@sql-audit-cmdlet-server680;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db680;Uid={0}@sql-audit-cmdlet-server680;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server680.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db680\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db680\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server680\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db680\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server680.database.secure.windows.net:1433;database=sql-audit-cmdlet-db680;user={0}@sql-audit-cmdlet-server680;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server680.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/sql-audit-cmdlet-db680\",\r\n \"name\": \"sql-audit-cmdlet-db680\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2812" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "09e056bf-a3de-422a-9fcd-19aab7b640d8" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799983" + ], + "x-ms-correlation-request-id": [ + "c1263921-1e8d-4645-b030-e40686254408" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214002Z:c1263921-1e8d-4645-b030-e40686254408" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:40:02 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/sql-audit-cmdlet-db680?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjgwL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNjgwP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "4efc69fe-7443-406e-9a54-b758b67012ad-2014-10-31 21:39:56Z" + ], + "x-ms-client-request-id": [ + "c75a525a-319c-428f-a0cb-eb70260fc57c-2014-10-31 21:40:04Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets680\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets680.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db680;User ID={0}@sql-audit-cmdlet-server680;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db680;Uid={0}@sql-audit-cmdlet-server680;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server680.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db680\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db680\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server680\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db680\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server680.database.secure.windows.net:1433;database=sql-audit-cmdlet-db680;user={0}@sql-audit-cmdlet-server680;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server680.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/sql-audit-cmdlet-db680\",\r\n \"name\": \"sql-audit-cmdlet-db680\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2812" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "81815ed7-8815-400e-879a-f9f5edd7d7b0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799982" + ], + "x-ms-correlation-request-id": [ + "3abb34c1-835c-4490-87a9-c95b21e5928a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214004Z:3abb34c1-835c-4490-87a9-c95b21e5928a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:40:04 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/sql-audit-cmdlet-db680?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjgwL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNjgwP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "4efc69fe-7443-406e-9a54-b758b67012ad-2014-10-31 21:39:56Z" + ], + "x-ms-client-request-id": [ + "c46cce04-7f7b-4349-a797-6d85649f8ba3-2014-10-31 21:40:10Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets680\",\r\n \"storageAccountKey\": null,\r\n \"secondaryStorageAccountKey\": \"********\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets680.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db680;User ID={0}@sql-audit-cmdlet-server680;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db680;Uid={0}@sql-audit-cmdlet-server680;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server680.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db680\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db680\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server680\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db680\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server680.database.secure.windows.net:1433;database=sql-audit-cmdlet-db680;user={0}@sql-audit-cmdlet-server680;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server680.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/sql-audit-cmdlet-db680\",\r\n \"name\": \"sql-audit-cmdlet-db680\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2812" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "94653d40-ae23-4580-ad2d-702bff998ea8" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799981" + ], + "x-ms-correlation-request-id": [ + "b49ac61d-4f9c-46e0-ada0-4c9e32e973c5" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214010Z:b49ac61d-4f9c-46e0-ada0-4c9e32e973c5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:40:10 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/sql-audit-cmdlet-db680?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjgwL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNjgwP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "4efc69fe-7443-406e-9a54-b758b67012ad-2014-10-31 21:39:56Z" + ], + "x-ms-client-request-id": [ + "c74badaf-e54f-4e22-883c-78da0556fae7-2014-10-31 21:40:12Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets680\",\r\n \"storageAccountKey\": null,\r\n \"secondaryStorageAccountKey\": \"********\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets680.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db680;User ID={0}@sql-audit-cmdlet-server680;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db680;Uid={0}@sql-audit-cmdlet-server680;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server680.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db680\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db680\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server680\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db680\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server680.database.secure.windows.net:1433;database=sql-audit-cmdlet-db680;user={0}@sql-audit-cmdlet-server680;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server680.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/sql-audit-cmdlet-db680\",\r\n \"name\": \"sql-audit-cmdlet-db680\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2812" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "b0e0293a-ad73-447e-ad46-c575fd398e62" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799980" + ], + "x-ms-correlation-request-id": [ + "04c4f3b3-165a-42c9-bf51-b199ffb44a24" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214012Z:04c4f3b3-165a-42c9-bf51-b199ffb44a24" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:40:12 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/sql-audit-cmdlet-db680?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjgwL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNjgwP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "4efc69fe-7443-406e-9a54-b758b67012ad-2014-10-31 21:39:56Z" + ], + "x-ms-client-request-id": [ + "869f12fa-04c7-4541-b06d-3344876e8fdb-2014-10-31 21:40:16Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets680\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets680.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db680;User ID={0}@sql-audit-cmdlet-server680;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db680;Uid={0}@sql-audit-cmdlet-server680;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server680.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db680\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db680\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server680\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db680\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server680.database.secure.windows.net:1433;database=sql-audit-cmdlet-db680;user={0}@sql-audit-cmdlet-server680;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server680.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/sql-audit-cmdlet-db680\",\r\n \"name\": \"sql-audit-cmdlet-db680\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2812" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "86dba916-907e-4741-b3a7-97e5a8150046" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799979" + ], + "x-ms-correlation-request-id": [ + "afcbb4a6-91bf-4215-9dbe-eed037ecc383" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214017Z:afcbb4a6-91bf-4215-9dbe-eed037ecc383" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:40:17 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets680/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzNjgwL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "4efc69fe-7443-406e-9a54-b758b67012ad-2014-10-31 21:39:56Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"HDcnoH1NNsVsQ1sLdvuohIEMyF+9pwVr+h749095vWo5i1EHi7yliL5ZyXLBg/kog7dviqSt/hZdnhtBMhdYzA==\",\r\n \"secondaryKey\": \"tyZD8Rpon4fjtdFbaeaF+u/zmFGFKI7XZC60wWAlTZHoE02W2mciRVl7f545q3FNsvdFLgumVz42bXjdoqkxyg==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:8554615d-1a9c-4607-8845-94711d77534e" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11986" + ], + "x-ms-correlation-request-id": [ + "56d0b07d-f5d6-41b1-904d-aac2baf62560" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213958Z:56d0b07d-f5d6-41b1-904d-aac2baf62560" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:39:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets680/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzNjgwL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "4efc69fe-7443-406e-9a54-b758b67012ad-2014-10-31 21:39:56Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"HDcnoH1NNsVsQ1sLdvuohIEMyF+9pwVr+h749095vWo5i1EHi7yliL5ZyXLBg/kog7dviqSt/hZdnhtBMhdYzA==\",\r\n \"secondaryKey\": \"tyZD8Rpon4fjtdFbaeaF+u/zmFGFKI7XZC60wWAlTZHoE02W2mciRVl7f545q3FNsvdFLgumVz42bXjdoqkxyg==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:15ac3657-c623-4056-8aa1-eebf18cb7bae" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11984" + ], + "x-ms-correlation-request-id": [ + "1b32fe1f-53c9-44f6-9b79-efe4885d2a10" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214005Z:1b32fe1f-53c9-44f6-9b79-efe4885d2a10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:40:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets680/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzNjgwL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "4efc69fe-7443-406e-9a54-b758b67012ad-2014-10-31 21:39:56Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"HDcnoH1NNsVsQ1sLdvuohIEMyF+9pwVr+h749095vWo5i1EHi7yliL5ZyXLBg/kog7dviqSt/hZdnhtBMhdYzA==\",\r\n \"secondaryKey\": \"tyZD8Rpon4fjtdFbaeaF+u/zmFGFKI7XZC60wWAlTZHoE02W2mciRVl7f545q3FNsvdFLgumVz42bXjdoqkxyg==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:e4610933-dfd9-4c48-911e-3caf3aeffff7" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11982" + ], + "x-ms-correlation-request-id": [ + "aca5adaf-b216-4da4-983f-edc4022a86e5" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214012Z:aca5adaf-b216-4da4-983f-edc4022a86e5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:40:12 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/sql-audit-cmdlet-db680?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjgwL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNjgwP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets680\",\r\n \"storageAccountKey\": \"HDcnoH1NNsVsQ1sLdvuohIEMyF+9pwVr+h749095vWo5i1EHi7yliL5ZyXLBg/kog7dviqSt/hZdnhtBMhdYzA==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets680.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "784" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "4efc69fe-7443-406e-9a54-b758b67012ad-2014-10-31 21:39:56Z" + ], + "x-ms-client-request-id": [ + "63e86a0e-d42b-4e52-b89a-35a853fbcc7c-2014-10-31 21:39:56Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets680\",\r\n \"storageAccountKey\": \"HDcnoH1NNsVsQ1sLdvuohIEMyF+9pwVr+h749095vWo5i1EHi7yliL5ZyXLBg/kog7dviqSt/hZdnhtBMhdYzA==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets680.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/sql-audit-cmdlet-db680\",\r\n \"name\": \"sql-audit-cmdlet-db680\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1155" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "9665cfd9-eb1d-400a-b0a9-58a21cc19ad3" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11985" + ], + "x-ms-correlation-request-id": [ + "4622a392-79a1-486f-b514-33a156b415a3" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214001Z:4622a392-79a1-486f-b514-33a156b415a3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:40:01 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/sql-audit-cmdlet-db680?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjgwL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNjgwP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets680\",\r\n \"secondaryStorageAccountKey\": \"tyZD8Rpon4fjtdFbaeaF+u/zmFGFKI7XZC60wWAlTZHoE02W2mciRVl7f545q3FNsvdFLgumVz42bXjdoqkxyg==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets680.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "793" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "4efc69fe-7443-406e-9a54-b758b67012ad-2014-10-31 21:39:56Z" + ], + "x-ms-client-request-id": [ + "c75a525a-319c-428f-a0cb-eb70260fc57c-2014-10-31 21:40:04Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets680\",\r\n \"storageAccountKey\": null,\r\n \"secondaryStorageAccountKey\": \"tyZD8Rpon4fjtdFbaeaF+u/zmFGFKI7XZC60wWAlTZHoE02W2mciRVl7f545q3FNsvdFLgumVz42bXjdoqkxyg==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets680.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/sql-audit-cmdlet-db680\",\r\n \"name\": \"sql-audit-cmdlet-db680\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1155" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "5a1b041f-6bc5-485f-a709-930919036094" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11983" + ], + "x-ms-correlation-request-id": [ + "a7c71a89-ca61-4b01-9e21-fd977630a361" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214008Z:a7c71a89-ca61-4b01-9e21-fd977630a361" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:40:08 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/sql-audit-cmdlet-db680?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjgwL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNjgwP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets680\",\r\n \"storageAccountKey\": \"HDcnoH1NNsVsQ1sLdvuohIEMyF+9pwVr+h749095vWo5i1EHi7yliL5ZyXLBg/kog7dviqSt/hZdnhtBMhdYzA==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets680.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "784" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "4efc69fe-7443-406e-9a54-b758b67012ad-2014-10-31 21:39:56Z" + ], + "x-ms-client-request-id": [ + "c74badaf-e54f-4e22-883c-78da0556fae7-2014-10-31 21:40:12Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets680\",\r\n \"storageAccountKey\": \"HDcnoH1NNsVsQ1sLdvuohIEMyF+9pwVr+h749095vWo5i1EHi7yliL5ZyXLBg/kog7dviqSt/hZdnhtBMhdYzA==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets680.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/sql-audit-cmdlet-db680\",\r\n \"name\": \"sql-audit-cmdlet-db680\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1155" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "b754ee8c-322b-424c-9788-80c61bd63a06" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11981" + ], + "x-ms-correlation-request-id": [ + "b4903429-71e6-4e5c-b218-a6b443d00a69" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214015Z:b4903429-71e6-4e5c-b218-a6b443d00a69" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:40:14 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices/auditcmdlets680", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXMvYXVkaXRjbWRsZXRzNjgw", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "3b6684e608ef29919e9e7dd257732cd5" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:40:21 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/3b6684e608ef29919e9e7dd257732cd5", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zLzNiNjY4NGU2MDhlZjI5OTE5ZTllN2RkMjU3NzMyY2Q1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/2.0.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "\r\n 3b6684e6-08ef-2991-9e9e-7dd257732cd5\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "89205ebe223c2086a0df648c11989a85" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:40:23 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "cca24ec8-99b5-4aa7-9ff6-486e886f304c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestDatabaseUpdatePolicyKeepPreviousStorage.json b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestDatabaseUpdatePolicyKeepPreviousStorage.json new file mode 100644 index 000000000000..3d0f827e74b0 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestDatabaseUpdatePolicyKeepPreviousStorage.json @@ -0,0 +1,3314 @@ +{ + "Entries": [ + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXM=", + "RequestMethod": "POST", + "RequestBody": "\r\n auditcmdlets301\r\n \r\n \r\n West US\r\n \r\n Standard_GRS\r\n", + "RequestHeaders": { + "Content-Type": [ + "application/xml" + ], + "Content-Length": [ + "379" + ], + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "664" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "35dc0ab7a53821709a6ba900c0bf9b5a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:26:01 GMT" + ], + "Location": [ + "https://management.core.windows.net/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/storage/auditcmdlets301" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/35dc0ab7a53821709a6ba900c0bf9b5a", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zLzM1ZGMwYWI3YTUzODIxNzA5YTZiYTkwMGMwYmY5YjVh", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "664" + ] + }, + "ResponseBody": "\r\n 35dc0ab7-a538-2170-9a6b-a900c0bf9b5a\r\n InProgress\r\n", + "ResponseHeaders": { + "Content-Length": [ + "197" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "d46d7ebcb46c2cf0a15b672b31fe3575" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:26:02 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/35dc0ab7a53821709a6ba900c0bf9b5a", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zLzM1ZGMwYWI3YTUzODIxNzA5YTZiYTkwMGMwYmY5YjVh", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "664" + ] + }, + "ResponseBody": "\r\n 35dc0ab7-a538-2170-9a6b-a900c0bf9b5a\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "b50454ca7b8324ada7266f56a3bd4eca" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:26:32 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "119" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799784" + ], + "x-ms-request-id": [ + "b0618270-7b4a-4237-a397-c805cb4dc5eb" + ], + "x-ms-correlation-request-id": [ + "b0618270-7b4a-4237-a397-c805cb4dc5eb" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212633Z:b0618270-7b4a-4237-a397-c805cb4dc5eb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:26:33 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301\",\r\n \"name\": \"sql-audit-cmdlet-test-rg301\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "217" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11979" + ], + "x-ms-request-id": [ + "4391f7b3-3427-4df2-8993-5492f82c900c" + ], + "x-ms-correlation-request-id": [ + "4391f7b3-3427-4df2-8993-5492f82c900c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212635Z:4391f7b3-3427-4df2-8993-5492f82c900c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:26:35 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup/validate?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvdmFsaWRhdGU/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db301\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server301\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db301\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server301\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:26:35.9634071Z\",\r\n \"correlationId\": \"28da89a1-2bf5-433d-a316-34eb902d0cdd\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databases/sql-audit-cmdlet-db301\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301/sql-audit-cmdlet-db301\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11978" + ], + "x-ms-request-id": [ + "28da89a1-2bf5-433d-a316-34eb902d0cdd" + ], + "x-ms-correlation-request-id": [ + "28da89a1-2bf5-433d-a316-34eb902d0cdd" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212635Z:28da89a1-2bf5-433d-a316-34eb902d0cdd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:26:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db301\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server301\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db301\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server301\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:26:37.6436859Z\",\r\n \"correlationId\": \"af5a1a80-68a9-4ae4-bff4-4382f9958d9b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databases/sql-audit-cmdlet-db301\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301/sql-audit-cmdlet-db301\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11977" + ], + "x-ms-request-id": [ + "af5a1a80-68a9-4ae4-bff4-4382f9958d9b" + ], + "x-ms-correlation-request-id": [ + "af5a1a80-68a9-4ae4-bff4-4382f9958d9b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212638Z:af5a1a80-68a9-4ae4-bff4-4382f9958d9b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:26:38 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799783" + ], + "x-ms-request-id": [ + "8f2c65c3-ffd9-4149-b092-8e6fc10a1e88" + ], + "x-ms-correlation-request-id": [ + "8f2c65c3-ffd9-4149-b092-8e6fc10a1e88" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212638Z:8f2c65c3-ffd9-4149-b092-8e6fc10a1e88" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:26:38 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799781" + ], + "x-ms-request-id": [ + "bda354c6-754c-4369-9e58-995ce4704882" + ], + "x-ms-correlation-request-id": [ + "bda354c6-754c-4369-9e58-995ce4704882" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212641Z:bda354c6-754c-4369-9e58-995ce4704882" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:26:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799779" + ], + "x-ms-request-id": [ + "27ea8fc0-fab5-48e4-8462-8c36b86cb154" + ], + "x-ms-correlation-request-id": [ + "27ea8fc0-fab5-48e4-8462-8c36b86cb154" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212645Z:27ea8fc0-fab5-48e4-8462-8c36b86cb154" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:26:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799777" + ], + "x-ms-request-id": [ + "bda31855-3d20-4c45-83bc-825dc4125c15" + ], + "x-ms-correlation-request-id": [ + "bda31855-3d20-4c45-83bc-825dc4125c15" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212648Z:bda31855-3d20-4c45-83bc-825dc4125c15" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:26:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799775" + ], + "x-ms-request-id": [ + "3045dcd6-dfb6-487d-a19a-d6ad7f8afafb" + ], + "x-ms-correlation-request-id": [ + "3045dcd6-dfb6-487d-a19a-d6ad7f8afafb" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212651Z:3045dcd6-dfb6-487d-a19a-d6ad7f8afafb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:26:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799773" + ], + "x-ms-request-id": [ + "9f3df048-049a-40d3-8dcf-9d4fa66a6680" + ], + "x-ms-correlation-request-id": [ + "9f3df048-049a-40d3-8dcf-9d4fa66a6680" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212654Z:9f3df048-049a-40d3-8dcf-9d4fa66a6680" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:26:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799771" + ], + "x-ms-request-id": [ + "ed3f456c-7104-4c9a-b988-5652ee17b944" + ], + "x-ms-correlation-request-id": [ + "ed3f456c-7104-4c9a-b988-5652ee17b944" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212657Z:ed3f456c-7104-4c9a-b988-5652ee17b944" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:26:56 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799769" + ], + "x-ms-request-id": [ + "5bb1b628-0705-4bb5-80ab-d875c30b8b6a" + ], + "x-ms-correlation-request-id": [ + "5bb1b628-0705-4bb5-80ab-d875c30b8b6a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212700Z:5bb1b628-0705-4bb5-80ab-d875c30b8b6a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799767" + ], + "x-ms-request-id": [ + "a138597e-559e-4d83-9194-9f03bcac7e94" + ], + "x-ms-correlation-request-id": [ + "a138597e-559e-4d83-9194-9f03bcac7e94" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212703Z:a138597e-559e-4d83-9194-9f03bcac7e94" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799765" + ], + "x-ms-request-id": [ + "2d3f2033-6dfc-4033-a288-4d250253a225" + ], + "x-ms-correlation-request-id": [ + "2d3f2033-6dfc-4033-a288-4d250253a225" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212706Z:2d3f2033-6dfc-4033-a288-4d250253a225" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799763" + ], + "x-ms-request-id": [ + "c4ebb93a-0037-4803-a597-19f51845cc0b" + ], + "x-ms-correlation-request-id": [ + "c4ebb93a-0037-4803-a597-19f51845cc0b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212709Z:c4ebb93a-0037-4803-a597-19f51845cc0b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:09 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799761" + ], + "x-ms-request-id": [ + "550622e0-276f-4bf3-8f99-3240c0ecfcdf" + ], + "x-ms-correlation-request-id": [ + "550622e0-276f-4bf3-8f99-3240c0ecfcdf" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212712Z:550622e0-276f-4bf3-8f99-3240c0ecfcdf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:12 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799759" + ], + "x-ms-request-id": [ + "fe91e6a1-8368-4737-893d-ab0b358097b2" + ], + "x-ms-correlation-request-id": [ + "fe91e6a1-8368-4737-893d-ab0b358097b2" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212715Z:fe91e6a1-8368-4737-893d-ab0b358097b2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:15 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799757" + ], + "x-ms-request-id": [ + "e89d299b-46fd-4c54-bbfa-9e160720a822" + ], + "x-ms-correlation-request-id": [ + "e89d299b-46fd-4c54-bbfa-9e160720a822" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212718Z:e89d299b-46fd-4c54-bbfa-9e160720a822" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:18 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799755" + ], + "x-ms-request-id": [ + "7cad1b01-f202-4dd9-a524-cdaf4593abd8" + ], + "x-ms-correlation-request-id": [ + "7cad1b01-f202-4dd9-a524-cdaf4593abd8" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212721Z:7cad1b01-f202-4dd9-a524-cdaf4593abd8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:21 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799753" + ], + "x-ms-request-id": [ + "80d4a6de-cacf-4804-8bfe-ae4273e7a05c" + ], + "x-ms-correlation-request-id": [ + "80d4a6de-cacf-4804-8bfe-ae4273e7a05c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212725Z:80d4a6de-cacf-4804-8bfe-ae4273e7a05c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:25 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799751" + ], + "x-ms-request-id": [ + "254debf0-1a60-4f9f-b0dc-d1ef9739911e" + ], + "x-ms-correlation-request-id": [ + "254debf0-1a60-4f9f-b0dc-d1ef9739911e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212728Z:254debf0-1a60-4f9f-b0dc-d1ef9739911e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799749" + ], + "x-ms-request-id": [ + "d79840fb-16c4-42b5-839e-26223c9195d8" + ], + "x-ms-correlation-request-id": [ + "d79840fb-16c4-42b5-839e-26223c9195d8" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212732Z:d79840fb-16c4-42b5-839e-26223c9195d8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:32 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799747" + ], + "x-ms-request-id": [ + "b69704c1-d02e-492a-a839-bf38d9a922a9" + ], + "x-ms-correlation-request-id": [ + "b69704c1-d02e-492a-a839-bf38d9a922a9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212735Z:b69704c1-d02e-492a-a839-bf38d9a922a9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup/operations/0A66FDB400D214A7\",\r\n \"operationId\": \"0A66FDB400D214A7\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:27:36.7038147Z\",\r\n \"trackingId\": \"21b7dce9-4a25-4f91-b26e-ab44c91b105a\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799745" + ], + "x-ms-request-id": [ + "030156c1-e3f4-4f3b-9403-6eec9cb5eb1c" + ], + "x-ms-correlation-request-id": [ + "030156c1-e3f4-4f3b-9403-6eec9cb5eb1c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212738Z:030156c1-e3f4-4f3b-9403-6eec9cb5eb1c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:38 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup/operations/0A66FDB400D214A7\",\r\n \"operationId\": \"0A66FDB400D214A7\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:27:36.7038147Z\",\r\n \"trackingId\": \"21b7dce9-4a25-4f91-b26e-ab44c91b105a\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799743" + ], + "x-ms-request-id": [ + "c3f931cd-24a3-4f46-8877-0e285e7f0d9f" + ], + "x-ms-correlation-request-id": [ + "c3f931cd-24a3-4f46-8877-0e285e7f0d9f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212741Z:c3f931cd-24a3-4f46-8877-0e285e7f0d9f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:40 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup/operations/285A958569840D9F\",\r\n \"operationId\": \"285A958569840D9F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:27:43.6661262Z\",\r\n \"trackingId\": \"c3ba19da-0f2f-4776-8575-41327d7ae068\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databases/sql-audit-cmdlet-db301\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301/sql-audit-cmdlet-db301\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup/operations/0A66FDB400D214A7\",\r\n \"operationId\": \"0A66FDB400D214A7\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:27:36.7038147Z\",\r\n \"trackingId\": \"21b7dce9-4a25-4f91-b26e-ab44c91b105a\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799741" + ], + "x-ms-request-id": [ + "35f06c7a-cfd1-49dc-bcb6-586be8d62795" + ], + "x-ms-correlation-request-id": [ + "35f06c7a-cfd1-49dc-bcb6-586be8d62795" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212744Z:35f06c7a-cfd1-49dc-bcb6-586be8d62795" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup/operations/285A958569840D9F\",\r\n \"operationId\": \"285A958569840D9F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:27:43.6661262Z\",\r\n \"trackingId\": \"c3ba19da-0f2f-4776-8575-41327d7ae068\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databases/sql-audit-cmdlet-db301\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301/sql-audit-cmdlet-db301\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup/operations/0A66FDB400D214A7\",\r\n \"operationId\": \"0A66FDB400D214A7\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:27:36.7038147Z\",\r\n \"trackingId\": \"21b7dce9-4a25-4f91-b26e-ab44c91b105a\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799739" + ], + "x-ms-request-id": [ + "88cdcdee-bdf2-4020-a8b9-f2dcf9ce170a" + ], + "x-ms-correlation-request-id": [ + "88cdcdee-bdf2-4020-a8b9-f2dcf9ce170a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212747Z:88cdcdee-bdf2-4020-a8b9-f2dcf9ce170a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup/operations/285A958569840D9F\",\r\n \"operationId\": \"285A958569840D9F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:27:43.6661262Z\",\r\n \"trackingId\": \"c3ba19da-0f2f-4776-8575-41327d7ae068\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databases/sql-audit-cmdlet-db301\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301/sql-audit-cmdlet-db301\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup/operations/0A66FDB400D214A7\",\r\n \"operationId\": \"0A66FDB400D214A7\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:27:36.7038147Z\",\r\n \"trackingId\": \"21b7dce9-4a25-4f91-b26e-ab44c91b105a\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799737" + ], + "x-ms-request-id": [ + "d95556b7-b430-4686-9b49-951f1c581a9f" + ], + "x-ms-correlation-request-id": [ + "d95556b7-b430-4686-9b49-951f1c581a9f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212750Z:d95556b7-b430-4686-9b49-951f1c581a9f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db301\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server301\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:26:37.6436859Z\",\r\n \"correlationId\": \"af5a1a80-68a9-4ae4-bff4-4382f9958d9b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databases/sql-audit-cmdlet-db301\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301/sql-audit-cmdlet-db301\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799782" + ], + "x-ms-request-id": [ + "5a86290c-b21b-4a7d-9d11-b9033c9a34bb" + ], + "x-ms-correlation-request-id": [ + "5a86290c-b21b-4a7d-9d11-b9033c9a34bb" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212639Z:5a86290c-b21b-4a7d-9d11-b9033c9a34bb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:26:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db301\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server301\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:26:40.9836305Z\",\r\n \"correlationId\": \"af5a1a80-68a9-4ae4-bff4-4382f9958d9b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databases/sql-audit-cmdlet-db301\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301/sql-audit-cmdlet-db301\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799780" + ], + "x-ms-request-id": [ + "b1831fdc-62ad-4890-bdf0-66dd7b46520b" + ], + "x-ms-correlation-request-id": [ + "b1831fdc-62ad-4890-bdf0-66dd7b46520b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212642Z:b1831fdc-62ad-4890-bdf0-66dd7b46520b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:26:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db301\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server301\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:26:40.9836305Z\",\r\n \"correlationId\": \"af5a1a80-68a9-4ae4-bff4-4382f9958d9b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databases/sql-audit-cmdlet-db301\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301/sql-audit-cmdlet-db301\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799778" + ], + "x-ms-request-id": [ + "521c3b05-1a66-49c4-8dc3-3c54cbdace56" + ], + "x-ms-correlation-request-id": [ + "521c3b05-1a66-49c4-8dc3-3c54cbdace56" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212645Z:521c3b05-1a66-49c4-8dc3-3c54cbdace56" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:26:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db301\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server301\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:26:40.9836305Z\",\r\n \"correlationId\": \"af5a1a80-68a9-4ae4-bff4-4382f9958d9b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databases/sql-audit-cmdlet-db301\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301/sql-audit-cmdlet-db301\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799776" + ], + "x-ms-request-id": [ + "339cddc7-5786-4db2-bb34-74818749f03d" + ], + "x-ms-correlation-request-id": [ + "339cddc7-5786-4db2-bb34-74818749f03d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212648Z:339cddc7-5786-4db2-bb34-74818749f03d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:26:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db301\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server301\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:26:40.9836305Z\",\r\n \"correlationId\": \"af5a1a80-68a9-4ae4-bff4-4382f9958d9b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databases/sql-audit-cmdlet-db301\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301/sql-audit-cmdlet-db301\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799774" + ], + "x-ms-request-id": [ + "9f80f605-b3c9-4426-9e39-98ade701de9e" + ], + "x-ms-correlation-request-id": [ + "9f80f605-b3c9-4426-9e39-98ade701de9e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212651Z:9f80f605-b3c9-4426-9e39-98ade701de9e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:26:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db301\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server301\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:26:40.9836305Z\",\r\n \"correlationId\": \"af5a1a80-68a9-4ae4-bff4-4382f9958d9b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databases/sql-audit-cmdlet-db301\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301/sql-audit-cmdlet-db301\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799772" + ], + "x-ms-request-id": [ + "6d610a11-ec66-412a-8c96-c1b9f0bedf5f" + ], + "x-ms-correlation-request-id": [ + "6d610a11-ec66-412a-8c96-c1b9f0bedf5f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212654Z:6d610a11-ec66-412a-8c96-c1b9f0bedf5f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:26:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db301\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server301\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:26:40.9836305Z\",\r\n \"correlationId\": \"af5a1a80-68a9-4ae4-bff4-4382f9958d9b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databases/sql-audit-cmdlet-db301\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301/sql-audit-cmdlet-db301\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799770" + ], + "x-ms-request-id": [ + "c398b075-36eb-4cb4-90e8-6a9f678357da" + ], + "x-ms-correlation-request-id": [ + "c398b075-36eb-4cb4-90e8-6a9f678357da" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212657Z:c398b075-36eb-4cb4-90e8-6a9f678357da" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:26:56 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db301\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server301\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:26:40.9836305Z\",\r\n \"correlationId\": \"af5a1a80-68a9-4ae4-bff4-4382f9958d9b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databases/sql-audit-cmdlet-db301\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301/sql-audit-cmdlet-db301\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799768" + ], + "x-ms-request-id": [ + "5e9714cd-f441-474f-baae-ee3eab8d5cdf" + ], + "x-ms-correlation-request-id": [ + "5e9714cd-f441-474f-baae-ee3eab8d5cdf" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212700Z:5e9714cd-f441-474f-baae-ee3eab8d5cdf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db301\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server301\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:26:40.9836305Z\",\r\n \"correlationId\": \"af5a1a80-68a9-4ae4-bff4-4382f9958d9b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databases/sql-audit-cmdlet-db301\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301/sql-audit-cmdlet-db301\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799766" + ], + "x-ms-request-id": [ + "a65124c1-4e99-46c2-a1a3-e76787b9ad5d" + ], + "x-ms-correlation-request-id": [ + "a65124c1-4e99-46c2-a1a3-e76787b9ad5d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212703Z:a65124c1-4e99-46c2-a1a3-e76787b9ad5d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db301\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server301\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:26:40.9836305Z\",\r\n \"correlationId\": \"af5a1a80-68a9-4ae4-bff4-4382f9958d9b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databases/sql-audit-cmdlet-db301\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301/sql-audit-cmdlet-db301\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799764" + ], + "x-ms-request-id": [ + "2378e9b7-2c07-4beb-883f-9440786164c4" + ], + "x-ms-correlation-request-id": [ + "2378e9b7-2c07-4beb-883f-9440786164c4" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212707Z:2378e9b7-2c07-4beb-883f-9440786164c4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db301\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server301\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:26:40.9836305Z\",\r\n \"correlationId\": \"af5a1a80-68a9-4ae4-bff4-4382f9958d9b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databases/sql-audit-cmdlet-db301\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301/sql-audit-cmdlet-db301\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799762" + ], + "x-ms-request-id": [ + "3f11fb8f-1502-4740-9cb3-dce891df47ca" + ], + "x-ms-correlation-request-id": [ + "3f11fb8f-1502-4740-9cb3-dce891df47ca" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212710Z:3f11fb8f-1502-4740-9cb3-dce891df47ca" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:09 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db301\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server301\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:26:40.9836305Z\",\r\n \"correlationId\": \"af5a1a80-68a9-4ae4-bff4-4382f9958d9b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databases/sql-audit-cmdlet-db301\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301/sql-audit-cmdlet-db301\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799760" + ], + "x-ms-request-id": [ + "6e9d0300-6de6-430f-84cc-47832c7fba49" + ], + "x-ms-correlation-request-id": [ + "6e9d0300-6de6-430f-84cc-47832c7fba49" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212713Z:6e9d0300-6de6-430f-84cc-47832c7fba49" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:12 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db301\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server301\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:26:40.9836305Z\",\r\n \"correlationId\": \"af5a1a80-68a9-4ae4-bff4-4382f9958d9b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databases/sql-audit-cmdlet-db301\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301/sql-audit-cmdlet-db301\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799758" + ], + "x-ms-request-id": [ + "863ca0cd-cd92-4d62-9735-b8da27893a8f" + ], + "x-ms-correlation-request-id": [ + "863ca0cd-cd92-4d62-9735-b8da27893a8f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212716Z:863ca0cd-cd92-4d62-9735-b8da27893a8f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:15 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db301\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server301\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:26:40.9836305Z\",\r\n \"correlationId\": \"af5a1a80-68a9-4ae4-bff4-4382f9958d9b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databases/sql-audit-cmdlet-db301\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301/sql-audit-cmdlet-db301\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799756" + ], + "x-ms-request-id": [ + "5202c673-17a3-4e52-bfb4-ff325871ccc3" + ], + "x-ms-correlation-request-id": [ + "5202c673-17a3-4e52-bfb4-ff325871ccc3" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212719Z:5202c673-17a3-4e52-bfb4-ff325871ccc3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:18 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db301\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server301\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:26:40.9836305Z\",\r\n \"correlationId\": \"af5a1a80-68a9-4ae4-bff4-4382f9958d9b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databases/sql-audit-cmdlet-db301\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301/sql-audit-cmdlet-db301\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799754" + ], + "x-ms-request-id": [ + "239ff46c-4e11-4803-bda6-46c7bd9690a7" + ], + "x-ms-correlation-request-id": [ + "239ff46c-4e11-4803-bda6-46c7bd9690a7" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212722Z:239ff46c-4e11-4803-bda6-46c7bd9690a7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:21 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db301\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server301\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:26:40.9836305Z\",\r\n \"correlationId\": \"af5a1a80-68a9-4ae4-bff4-4382f9958d9b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databases/sql-audit-cmdlet-db301\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301/sql-audit-cmdlet-db301\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799752" + ], + "x-ms-request-id": [ + "777f5478-26b3-41ab-b5fc-5c44f88760fb" + ], + "x-ms-correlation-request-id": [ + "777f5478-26b3-41ab-b5fc-5c44f88760fb" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212725Z:777f5478-26b3-41ab-b5fc-5c44f88760fb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:25 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db301\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server301\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:26:40.9836305Z\",\r\n \"correlationId\": \"af5a1a80-68a9-4ae4-bff4-4382f9958d9b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databases/sql-audit-cmdlet-db301\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301/sql-audit-cmdlet-db301\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799750" + ], + "x-ms-request-id": [ + "5dfaf0c6-cd9a-44dc-8d35-aee8556f3e81" + ], + "x-ms-correlation-request-id": [ + "5dfaf0c6-cd9a-44dc-8d35-aee8556f3e81" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212729Z:5dfaf0c6-cd9a-44dc-8d35-aee8556f3e81" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:29 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db301\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server301\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:26:40.9836305Z\",\r\n \"correlationId\": \"af5a1a80-68a9-4ae4-bff4-4382f9958d9b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databases/sql-audit-cmdlet-db301\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301/sql-audit-cmdlet-db301\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799748" + ], + "x-ms-request-id": [ + "469d5de7-78b4-443b-b26b-14cfd9930659" + ], + "x-ms-correlation-request-id": [ + "469d5de7-78b4-443b-b26b-14cfd9930659" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212732Z:469d5de7-78b4-443b-b26b-14cfd9930659" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:32 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db301\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server301\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:26:40.9836305Z\",\r\n \"correlationId\": \"af5a1a80-68a9-4ae4-bff4-4382f9958d9b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databases/sql-audit-cmdlet-db301\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301/sql-audit-cmdlet-db301\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799746" + ], + "x-ms-request-id": [ + "10e12f7f-6fbd-4df8-8590-08965bf48baf" + ], + "x-ms-correlation-request-id": [ + "10e12f7f-6fbd-4df8-8590-08965bf48baf" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212735Z:10e12f7f-6fbd-4df8-8590-08965bf48baf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db301\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server301\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:26:40.9836305Z\",\r\n \"correlationId\": \"af5a1a80-68a9-4ae4-bff4-4382f9958d9b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databases/sql-audit-cmdlet-db301\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301/sql-audit-cmdlet-db301\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799744" + ], + "x-ms-request-id": [ + "12e4788e-f93c-4578-a5c7-e5cad95b5a70" + ], + "x-ms-correlation-request-id": [ + "12e4788e-f93c-4578-a5c7-e5cad95b5a70" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212738Z:12e4788e-f93c-4578-a5c7-e5cad95b5a70" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:38 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db301\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server301\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:26:40.9836305Z\",\r\n \"correlationId\": \"af5a1a80-68a9-4ae4-bff4-4382f9958d9b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databases/sql-audit-cmdlet-db301\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301/sql-audit-cmdlet-db301\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799742" + ], + "x-ms-request-id": [ + "aa843194-d39e-4851-88e0-cc9d5e560d34" + ], + "x-ms-correlation-request-id": [ + "aa843194-d39e-4851-88e0-cc9d5e560d34" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212741Z:aa843194-d39e-4851-88e0-cc9d5e560d34" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db301\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server301\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:26:40.9836305Z\",\r\n \"correlationId\": \"af5a1a80-68a9-4ae4-bff4-4382f9958d9b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databases/sql-audit-cmdlet-db301\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301/sql-audit-cmdlet-db301\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799740" + ], + "x-ms-request-id": [ + "00db6e2a-9f2f-4d7f-8aef-4c5c5df8c7f1" + ], + "x-ms-correlation-request-id": [ + "00db6e2a-9f2f-4d7f-8aef-4c5c5df8c7f1" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212744Z:00db6e2a-9f2f-4d7f-8aef-4c5c5df8c7f1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db301\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server301\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:26:40.9836305Z\",\r\n \"correlationId\": \"af5a1a80-68a9-4ae4-bff4-4382f9958d9b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databases/sql-audit-cmdlet-db301\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301/sql-audit-cmdlet-db301\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799738" + ], + "x-ms-request-id": [ + "75ff9caf-4664-4697-8167-7436c3d12807" + ], + "x-ms-correlation-request-id": [ + "75ff9caf-4664-4697-8167-7436c3d12807" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212748Z:75ff9caf-4664-4697-8167-7436c3d12807" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db301\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server301\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:27:47.9060301Z\",\r\n \"correlationId\": \"af5a1a80-68a9-4ae4-bff4-4382f9958d9b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databases/sql-audit-cmdlet-db301\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server301/sql-audit-cmdlet-db301\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1626" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799736" + ], + "x-ms-request-id": [ + "7975b79c-727c-4022-b52f-d11bfff60672" + ], + "x-ms-correlation-request-id": [ + "7975b79c-727c-4022-b52f-d11bfff60672" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212751Z:7975b79c-727c-4022-b52f-d11bfff60672" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301\",\r\n \"name\": \"sql-audit-cmdlet-server301\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databases/sql-audit-cmdlet-db301\",\r\n \"name\": \"sql-audit-cmdlet-server301/sql-audit-cmdlet-db301\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "577" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799735" + ], + "x-ms-request-id": [ + "953a07f4-f454-4f4e-b8ec-f0b70c856e71" + ], + "x-ms-correlation-request-id": [ + "953a07f4-f454-4f4e-b8ec-f0b70c856e71" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212753Z:953a07f4-f454-4f4e-b8ec-f0b70c856e71" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westeurope:e3e25b59-398e-4775-9182-eb6a6dd5df6c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799986" + ], + "x-ms-correlation-request-id": [ + "de1759ec-278e-4758-9055-d0dbd06dfc5a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212754Z:de1759ec-278e-4758-9055-d0dbd06dfc5a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databaseSecurityPolicies/sql-audit-cmdlet-db301?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMzAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiMzAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "c5f9324e-9b7c-4404-b9ee-eb28330474ce-2014-10-31 21:27:55Z" + ], + "x-ms-client-request-id": [ + "4bf0f85b-75ff-434f-a9a7-33efedc63674-2014-10-31 21:27:55Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets301\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets301.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server301.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db301;User ID={0}@sql-audit-cmdlet-server301;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server301.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db301;Uid={0}@sql-audit-cmdlet-server301;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server301.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db301\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server301.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db301\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server301\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db301\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server301.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server301.database.secure.windows.net:1433;database=sql-audit-cmdlet-db301;user={0}@sql-audit-cmdlet-server301;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server301.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databaseSecurityPolicies/sql-audit-cmdlet-db301\",\r\n \"name\": \"sql-audit-cmdlet-db301\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2812" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "690fd0a2-3bbc-4ec0-9635-d601689b91de" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799887" + ], + "x-ms-correlation-request-id": [ + "bab30c6b-f95e-4196-a22d-a94ebbf7aa6c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212757Z:bab30c6b-f95e-4196-a22d-a94ebbf7aa6c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:57 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databaseSecurityPolicies/sql-audit-cmdlet-db301?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMzAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiMzAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "c5f9324e-9b7c-4404-b9ee-eb28330474ce-2014-10-31 21:27:55Z" + ], + "x-ms-client-request-id": [ + "136ba0e2-246c-498d-a9c7-727588b6421a-2014-10-31 21:28:02Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets301\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets301.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server301.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db301;User ID={0}@sql-audit-cmdlet-server301;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server301.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db301;Uid={0}@sql-audit-cmdlet-server301;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server301.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db301\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server301.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db301\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server301\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db301\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server301.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server301.database.secure.windows.net:1433;database=sql-audit-cmdlet-db301;user={0}@sql-audit-cmdlet-server301;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server301.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databaseSecurityPolicies/sql-audit-cmdlet-db301\",\r\n \"name\": \"sql-audit-cmdlet-db301\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2812" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "329b728a-db8b-47b5-96d4-f49cee6dc2c7" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799886" + ], + "x-ms-correlation-request-id": [ + "db7ac550-331c-471b-b234-2cd2d2aee11e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212802Z:db7ac550-331c-471b-b234-2cd2d2aee11e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:28:02 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databaseSecurityPolicies/sql-audit-cmdlet-db301?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMzAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiMzAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "c5f9324e-9b7c-4404-b9ee-eb28330474ce-2014-10-31 21:27:55Z" + ], + "x-ms-client-request-id": [ + "a84d1666-9114-4315-908e-89070082625f-2014-10-31 21:28:04Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets301\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets301.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server301.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db301;User ID={0}@sql-audit-cmdlet-server301;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server301.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db301;Uid={0}@sql-audit-cmdlet-server301;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server301.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db301\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server301.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db301\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server301\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db301\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server301.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server301.database.secure.windows.net:1433;database=sql-audit-cmdlet-db301;user={0}@sql-audit-cmdlet-server301;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server301.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databaseSecurityPolicies/sql-audit-cmdlet-db301\",\r\n \"name\": \"sql-audit-cmdlet-db301\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2812" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "508a2fd1-1004-4a10-ad94-5a7318fdd3d5" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799885" + ], + "x-ms-correlation-request-id": [ + "d8e0dc01-4569-4ff6-855f-710ce3d21ffd" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212804Z:d8e0dc01-4569-4ff6-855f-710ce3d21ffd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:28:04 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databaseSecurityPolicies/sql-audit-cmdlet-db301?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMzAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiMzAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "c5f9324e-9b7c-4404-b9ee-eb28330474ce-2014-10-31 21:27:55Z" + ], + "x-ms-client-request-id": [ + "cbeeae14-eec5-4537-9fb3-5e9131b3ee65-2014-10-31 21:28:09Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets301\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets301.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server301.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db301;User ID={0}@sql-audit-cmdlet-server301;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server301.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db301;Uid={0}@sql-audit-cmdlet-server301;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server301.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db301\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server301.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db301\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server301\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db301\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server301.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server301.database.secure.windows.net:1433;database=sql-audit-cmdlet-db301;user={0}@sql-audit-cmdlet-server301;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server301.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databaseSecurityPolicies/sql-audit-cmdlet-db301\",\r\n \"name\": \"sql-audit-cmdlet-db301\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2812" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "821e1568-c4a9-443e-9ec4-3fd0a3c7d14d" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799884" + ], + "x-ms-correlation-request-id": [ + "c94d47c3-4b57-4112-af7b-e108db75745c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212809Z:c94d47c3-4b57-4112-af7b-e108db75745c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:28:09 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets301/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzMzAxL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "c5f9324e-9b7c-4404-b9ee-eb28330474ce-2014-10-31 21:27:55Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"YsJtkW5qCAOAkZRQteQqERCq0hseBQ9Jd6BCszrnkZ36lW13WJ7LtNYlU8xxICDhurIzGvWybrrra+5BUKwkzA==\",\r\n \"secondaryKey\": \"JctoZMwMFNctHS8pKU3Oqb0SvZV8Qpvj9ZgODN/Yqjk7ZSzoFcFM9dowqThiMEOcofylOeDDyQpHYKF1kMGdPQ==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:78e3ac4f-74d2-4eb8-8b9d-38138f1f9d25" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11986" + ], + "x-ms-correlation-request-id": [ + "6f4d598c-b2a9-49c0-88a4-5b4c7abc4fb3" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212758Z:6f4d598c-b2a9-49c0-88a4-5b4c7abc4fb3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:27:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets301/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzMzAxL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "c5f9324e-9b7c-4404-b9ee-eb28330474ce-2014-10-31 21:27:55Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"YsJtkW5qCAOAkZRQteQqERCq0hseBQ9Jd6BCszrnkZ36lW13WJ7LtNYlU8xxICDhurIzGvWybrrra+5BUKwkzA==\",\r\n \"secondaryKey\": \"JctoZMwMFNctHS8pKU3Oqb0SvZV8Qpvj9ZgODN/Yqjk7ZSzoFcFM9dowqThiMEOcofylOeDDyQpHYKF1kMGdPQ==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:f7ca4d75-2dbf-4046-9e02-4ed908c4b4c1" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11984" + ], + "x-ms-correlation-request-id": [ + "480764ed-9979-4139-9039-6b7b74b42a45" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212805Z:480764ed-9979-4139-9039-6b7b74b42a45" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:28:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databaseSecurityPolicies/sql-audit-cmdlet-db301?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMzAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiMzAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets301\",\r\n \"storageAccountKey\": \"YsJtkW5qCAOAkZRQteQqERCq0hseBQ9Jd6BCszrnkZ36lW13WJ7LtNYlU8xxICDhurIzGvWybrrra+5BUKwkzA==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets301.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "784" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "c5f9324e-9b7c-4404-b9ee-eb28330474ce-2014-10-31 21:27:55Z" + ], + "x-ms-client-request-id": [ + "4bf0f85b-75ff-434f-a9a7-33efedc63674-2014-10-31 21:27:55Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets301\",\r\n \"storageAccountKey\": \"YsJtkW5qCAOAkZRQteQqERCq0hseBQ9Jd6BCszrnkZ36lW13WJ7LtNYlU8xxICDhurIzGvWybrrra+5BUKwkzA==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets301.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databaseSecurityPolicies/sql-audit-cmdlet-db301\",\r\n \"name\": \"sql-audit-cmdlet-db301\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1155" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "d964d9a0-b45b-42e1-b2a3-d1a115fa1531" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11985" + ], + "x-ms-correlation-request-id": [ + "ee340133-24bd-4b29-a1d9-c4efdcc8879c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212800Z:ee340133-24bd-4b29-a1d9-c4efdcc8879c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:28:00 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databaseSecurityPolicies/sql-audit-cmdlet-db301?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzMwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMzAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiMzAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets301\",\r\n \"storageAccountKey\": \"YsJtkW5qCAOAkZRQteQqERCq0hseBQ9Jd6BCszrnkZ36lW13WJ7LtNYlU8xxICDhurIzGvWybrrra+5BUKwkzA==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets301.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "784" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "c5f9324e-9b7c-4404-b9ee-eb28330474ce-2014-10-31 21:27:55Z" + ], + "x-ms-client-request-id": [ + "a84d1666-9114-4315-908e-89070082625f-2014-10-31 21:28:04Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets301\",\r\n \"storageAccountKey\": \"YsJtkW5qCAOAkZRQteQqERCq0hseBQ9Jd6BCszrnkZ36lW13WJ7LtNYlU8xxICDhurIzGvWybrrra+5BUKwkzA==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets301.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg301/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server301/databaseSecurityPolicies/sql-audit-cmdlet-db301\",\r\n \"name\": \"sql-audit-cmdlet-db301\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1155" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "235be678-327d-4566-a9fe-99e68e546385" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11983" + ], + "x-ms-correlation-request-id": [ + "17cd7913-5590-4643-b6c5-e115761eebcd" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212808Z:17cd7913-5590-4643-b6c5-e115761eebcd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:28:07 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices/auditcmdlets301", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXMvYXVkaXRjbWRsZXRzMzAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "11e0e164462d296fb3af4cdb948edee4" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:28:13 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/11e0e164462d296fb3af4cdb948edee4", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zLzExZTBlMTY0NDYyZDI5NmZiM2FmNGNkYjk0OGVkZWU0", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/2.0.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "\r\n 11e0e164-462d-296f-b3af-4cdb948edee4\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "e1c50b41b6a62b78b78dca6d60c4834a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:28:14 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "cca24ec8-99b5-4aa7-9ff6-486e886f304c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestDatabaseUpdatePolicyWithEventTypeShortcuts.json b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestDatabaseUpdatePolicyWithEventTypeShortcuts.json new file mode 100644 index 000000000000..60d96431142c --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestDatabaseUpdatePolicyWithEventTypeShortcuts.json @@ -0,0 +1,3824 @@ +{ + "Entries": [ + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXM=", + "RequestMethod": "POST", + "RequestBody": "\r\n auditcmdlets701\r\n \r\n \r\n West US\r\n \r\n Standard_GRS\r\n", + "RequestHeaders": { + "Content-Type": [ + "application/xml" + ], + "Content-Length": [ + "379" + ], + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "1452" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "d3dd6228cfa42832a799ab32db0c3ad6" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:01:12 GMT" + ], + "Location": [ + "https://management.core.windows.net/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/storage/auditcmdlets701" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/d3dd6228cfa42832a799ab32db0c3ad6", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zL2QzZGQ2MjI4Y2ZhNDI4MzJhNzk5YWIzMmRiMGMzYWQ2", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "1452" + ] + }, + "ResponseBody": "\r\n d3dd6228-cfa4-2832-a799-ab32db0c3ad6\r\n InProgress\r\n", + "ResponseHeaders": { + "Content-Length": [ + "197" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "83dee37da61a2135951cf57fd5b65bab" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:01:13 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/d3dd6228cfa42832a799ab32db0c3ad6", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zL2QzZGQ2MjI4Y2ZhNDI4MzJhNzk5YWIzMmRiMGMzYWQ2", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "1452" + ] + }, + "ResponseBody": "\r\n d3dd6228-cfa4-2832-a799-ab32db0c3ad6\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "98dd347993f82561ab562f79cde40afa" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:01:43 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "119" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799738" + ], + "x-ms-request-id": [ + "446c3db0-b8e5-4ab7-976c-9187b18a8e50" + ], + "x-ms-correlation-request-id": [ + "446c3db0-b8e5-4ab7-976c-9187b18a8e50" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220145Z:446c3db0-b8e5-4ab7-976c-9187b18a8e50" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:01:45 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701\",\r\n \"name\": \"sql-audit-cmdlet-test-rg701\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "217" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11965" + ], + "x-ms-request-id": [ + "4785684f-5149-4531-8339-90c110b8b4a0" + ], + "x-ms-correlation-request-id": [ + "4785684f-5149-4531-8339-90c110b8b4a0" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220148Z:4785684f-5149-4531-8339-90c110b8b4a0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:01:48 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup/validate?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvdmFsaWRhdGU/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db701\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server701\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db701\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server701\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T22:01:48.7400579Z\",\r\n \"correlationId\": \"c99133b7-4abc-42f5-af43-218c0e4fa402\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databases/sql-audit-cmdlet-db701\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701/sql-audit-cmdlet-db701\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11964" + ], + "x-ms-request-id": [ + "c99133b7-4abc-42f5-af43-218c0e4fa402" + ], + "x-ms-correlation-request-id": [ + "c99133b7-4abc-42f5-af43-218c0e4fa402" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220148Z:c99133b7-4abc-42f5-af43-218c0e4fa402" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:01:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db701\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server701\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db701\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server701\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T22:01:50.392042Z\",\r\n \"correlationId\": \"430ce445-9b99-4230-82cb-0bc8e7a3b6aa\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databases/sql-audit-cmdlet-db701\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701/sql-audit-cmdlet-db701\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11963" + ], + "x-ms-request-id": [ + "430ce445-9b99-4230-82cb-0bc8e7a3b6aa" + ], + "x-ms-correlation-request-id": [ + "430ce445-9b99-4230-82cb-0bc8e7a3b6aa" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220150Z:430ce445-9b99-4230-82cb-0bc8e7a3b6aa" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:01:50 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799737" + ], + "x-ms-request-id": [ + "91f6d53d-2f81-48b1-8635-bd851d51788f" + ], + "x-ms-correlation-request-id": [ + "91f6d53d-2f81-48b1-8635-bd851d51788f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220151Z:91f6d53d-2f81-48b1-8635-bd851d51788f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:01:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799735" + ], + "x-ms-request-id": [ + "3de38cbf-3d23-45e7-8656-2b7c50256af1" + ], + "x-ms-correlation-request-id": [ + "3de38cbf-3d23-45e7-8656-2b7c50256af1" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220155Z:3de38cbf-3d23-45e7-8656-2b7c50256af1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:01:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799733" + ], + "x-ms-request-id": [ + "6dda28f2-623a-4493-bf00-09aa36618bef" + ], + "x-ms-correlation-request-id": [ + "6dda28f2-623a-4493-bf00-09aa36618bef" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220158Z:6dda28f2-623a-4493-bf00-09aa36618bef" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:01:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799731" + ], + "x-ms-request-id": [ + "2b48ca2b-502d-4354-89ee-72f1289b095b" + ], + "x-ms-correlation-request-id": [ + "2b48ca2b-502d-4354-89ee-72f1289b095b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220201Z:2b48ca2b-502d-4354-89ee-72f1289b095b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799729" + ], + "x-ms-request-id": [ + "730fbd27-3dc2-46c0-b488-fface35e689b" + ], + "x-ms-correlation-request-id": [ + "730fbd27-3dc2-46c0-b488-fface35e689b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220204Z:730fbd27-3dc2-46c0-b488-fface35e689b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799727" + ], + "x-ms-request-id": [ + "aa15fc9d-1d22-4a85-8570-2ae5764b4186" + ], + "x-ms-correlation-request-id": [ + "aa15fc9d-1d22-4a85-8570-2ae5764b4186" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220207Z:aa15fc9d-1d22-4a85-8570-2ae5764b4186" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:07 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799725" + ], + "x-ms-request-id": [ + "838c8821-b404-420c-bdda-c603d4301ec5" + ], + "x-ms-correlation-request-id": [ + "838c8821-b404-420c-bdda-c603d4301ec5" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220210Z:838c8821-b404-420c-bdda-c603d4301ec5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799723" + ], + "x-ms-request-id": [ + "e715b9df-e855-4dcf-b305-022d7f77b116" + ], + "x-ms-correlation-request-id": [ + "e715b9df-e855-4dcf-b305-022d7f77b116" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220213Z:e715b9df-e855-4dcf-b305-022d7f77b116" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799721" + ], + "x-ms-request-id": [ + "0c7387c1-a13d-43c4-846b-525309c07871" + ], + "x-ms-correlation-request-id": [ + "0c7387c1-a13d-43c4-846b-525309c07871" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220216Z:0c7387c1-a13d-43c4-846b-525309c07871" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:16 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799719" + ], + "x-ms-request-id": [ + "79b66fee-94e5-454d-af16-4f81b9c6a347" + ], + "x-ms-correlation-request-id": [ + "79b66fee-94e5-454d-af16-4f81b9c6a347" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220219Z:79b66fee-94e5-454d-af16-4f81b9c6a347" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799717" + ], + "x-ms-request-id": [ + "ff836adc-53fc-45aa-8d25-59b6a4234b6f" + ], + "x-ms-correlation-request-id": [ + "ff836adc-53fc-45aa-8d25-59b6a4234b6f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220223Z:ff836adc-53fc-45aa-8d25-59b6a4234b6f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799715" + ], + "x-ms-request-id": [ + "0fd6fd05-4b2c-4a7c-8931-2cdf86021783" + ], + "x-ms-correlation-request-id": [ + "0fd6fd05-4b2c-4a7c-8931-2cdf86021783" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220226Z:0fd6fd05-4b2c-4a7c-8931-2cdf86021783" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799713" + ], + "x-ms-request-id": [ + "855673d6-0e62-4307-b2d7-1be923e2885a" + ], + "x-ms-correlation-request-id": [ + "855673d6-0e62-4307-b2d7-1be923e2885a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220229Z:855673d6-0e62-4307-b2d7-1be923e2885a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:29 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799711" + ], + "x-ms-request-id": [ + "b2e90b9c-480b-49b8-92eb-cb0eeaa75cc8" + ], + "x-ms-correlation-request-id": [ + "b2e90b9c-480b-49b8-92eb-cb0eeaa75cc8" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220232Z:b2e90b9c-480b-49b8-92eb-cb0eeaa75cc8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:32 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799709" + ], + "x-ms-request-id": [ + "d343312b-417b-449f-8bf4-dc9b4eb37a4b" + ], + "x-ms-correlation-request-id": [ + "d343312b-417b-449f-8bf4-dc9b4eb37a4b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220235Z:d343312b-417b-449f-8bf4-dc9b4eb37a4b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799707" + ], + "x-ms-request-id": [ + "6f2243cf-0ea5-41e2-9309-fc41cba17c38" + ], + "x-ms-correlation-request-id": [ + "6f2243cf-0ea5-41e2-9309-fc41cba17c38" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220238Z:6f2243cf-0ea5-41e2-9309-fc41cba17c38" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:38 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799705" + ], + "x-ms-request-id": [ + "68fb6cac-fdd6-4897-b900-e67fc857b835" + ], + "x-ms-correlation-request-id": [ + "68fb6cac-fdd6-4897-b900-e67fc857b835" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220242Z:68fb6cac-fdd6-4897-b900-e67fc857b835" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799703" + ], + "x-ms-request-id": [ + "783bb9af-ebf8-4cda-bed2-43cb163f1e9d" + ], + "x-ms-correlation-request-id": [ + "783bb9af-ebf8-4cda-bed2-43cb163f1e9d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220245Z:783bb9af-ebf8-4cda-bed2-43cb163f1e9d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799701" + ], + "x-ms-request-id": [ + "ec61eeda-7264-478f-8a23-2a6346dba6c5" + ], + "x-ms-correlation-request-id": [ + "ec61eeda-7264-478f-8a23-2a6346dba6c5" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220248Z:ec61eeda-7264-478f-8a23-2a6346dba6c5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup/operations/CF8B59EAD6182D32\",\r\n \"operationId\": \"CF8B59EAD6182D32\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T22:02:48.7184094Z\",\r\n \"trackingId\": \"6d519dbf-7af2-49ac-83a3-e40207290c30\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799699" + ], + "x-ms-request-id": [ + "7a1b890b-86cf-407d-876a-069c0caeb9fb" + ], + "x-ms-correlation-request-id": [ + "7a1b890b-86cf-407d-876a-069c0caeb9fb" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220251Z:7a1b890b-86cf-407d-876a-069c0caeb9fb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup/operations/3BE02D34F7ABD946\",\r\n \"operationId\": \"3BE02D34F7ABD946\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T22:02:54.5378469Z\",\r\n \"trackingId\": \"69d584c2-451b-4734-9ff4-47ade27ede41\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databases/sql-audit-cmdlet-db701\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701/sql-audit-cmdlet-db701\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup/operations/CF8B59EAD6182D32\",\r\n \"operationId\": \"CF8B59EAD6182D32\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T22:02:48.7184094Z\",\r\n \"trackingId\": \"6d519dbf-7af2-49ac-83a3-e40207290c30\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799697" + ], + "x-ms-request-id": [ + "c8df09fa-31a7-4f50-b629-464f428d80d0" + ], + "x-ms-correlation-request-id": [ + "c8df09fa-31a7-4f50-b629-464f428d80d0" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220254Z:c8df09fa-31a7-4f50-b629-464f428d80d0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup/operations/3BE02D34F7ABD946\",\r\n \"operationId\": \"3BE02D34F7ABD946\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T22:02:54.5378469Z\",\r\n \"trackingId\": \"69d584c2-451b-4734-9ff4-47ade27ede41\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databases/sql-audit-cmdlet-db701\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701/sql-audit-cmdlet-db701\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup/operations/CF8B59EAD6182D32\",\r\n \"operationId\": \"CF8B59EAD6182D32\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T22:02:48.7184094Z\",\r\n \"trackingId\": \"6d519dbf-7af2-49ac-83a3-e40207290c30\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799695" + ], + "x-ms-request-id": [ + "1819a526-563a-4b89-ac77-fc7af92547e8" + ], + "x-ms-correlation-request-id": [ + "1819a526-563a-4b89-ac77-fc7af92547e8" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220258Z:1819a526-563a-4b89-ac77-fc7af92547e8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db701\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server701\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T22:01:50.392042Z\",\r\n \"correlationId\": \"430ce445-9b99-4230-82cb-0bc8e7a3b6aa\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databases/sql-audit-cmdlet-db701\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701/sql-audit-cmdlet-db701\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799736" + ], + "x-ms-request-id": [ + "68893607-353c-4cf0-8e5b-c798a51b7d0f" + ], + "x-ms-correlation-request-id": [ + "68893607-353c-4cf0-8e5b-c798a51b7d0f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220152Z:68893607-353c-4cf0-8e5b-c798a51b7d0f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:01:52 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db701\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server701\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T22:01:53.1541656Z\",\r\n \"correlationId\": \"430ce445-9b99-4230-82cb-0bc8e7a3b6aa\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databases/sql-audit-cmdlet-db701\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701/sql-audit-cmdlet-db701\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799734" + ], + "x-ms-request-id": [ + "ffb5f00f-aceb-4dae-b138-39271ef8041e" + ], + "x-ms-correlation-request-id": [ + "ffb5f00f-aceb-4dae-b138-39271ef8041e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220155Z:ffb5f00f-aceb-4dae-b138-39271ef8041e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:01:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db701\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server701\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T22:01:53.1541656Z\",\r\n \"correlationId\": \"430ce445-9b99-4230-82cb-0bc8e7a3b6aa\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databases/sql-audit-cmdlet-db701\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701/sql-audit-cmdlet-db701\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799732" + ], + "x-ms-request-id": [ + "acf7b09c-fcb2-4a10-96ac-c311befa8b23" + ], + "x-ms-correlation-request-id": [ + "acf7b09c-fcb2-4a10-96ac-c311befa8b23" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220158Z:acf7b09c-fcb2-4a10-96ac-c311befa8b23" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:01:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db701\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server701\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T22:01:53.1541656Z\",\r\n \"correlationId\": \"430ce445-9b99-4230-82cb-0bc8e7a3b6aa\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databases/sql-audit-cmdlet-db701\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701/sql-audit-cmdlet-db701\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799730" + ], + "x-ms-request-id": [ + "afbb83e1-162a-4059-bb14-0cd9043e3b1e" + ], + "x-ms-correlation-request-id": [ + "afbb83e1-162a-4059-bb14-0cd9043e3b1e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220201Z:afbb83e1-162a-4059-bb14-0cd9043e3b1e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db701\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server701\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T22:01:53.1541656Z\",\r\n \"correlationId\": \"430ce445-9b99-4230-82cb-0bc8e7a3b6aa\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databases/sql-audit-cmdlet-db701\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701/sql-audit-cmdlet-db701\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799728" + ], + "x-ms-request-id": [ + "62cb0c8f-104a-4dcb-a56b-f6cb9aaa7378" + ], + "x-ms-correlation-request-id": [ + "62cb0c8f-104a-4dcb-a56b-f6cb9aaa7378" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220204Z:62cb0c8f-104a-4dcb-a56b-f6cb9aaa7378" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db701\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server701\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T22:01:53.1541656Z\",\r\n \"correlationId\": \"430ce445-9b99-4230-82cb-0bc8e7a3b6aa\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databases/sql-audit-cmdlet-db701\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701/sql-audit-cmdlet-db701\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799726" + ], + "x-ms-request-id": [ + "12fb4995-87be-40cc-a353-8eec9e7cff49" + ], + "x-ms-correlation-request-id": [ + "12fb4995-87be-40cc-a353-8eec9e7cff49" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220207Z:12fb4995-87be-40cc-a353-8eec9e7cff49" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:07 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db701\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server701\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T22:01:53.1541656Z\",\r\n \"correlationId\": \"430ce445-9b99-4230-82cb-0bc8e7a3b6aa\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databases/sql-audit-cmdlet-db701\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701/sql-audit-cmdlet-db701\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799724" + ], + "x-ms-request-id": [ + "922bf01e-e9fa-4f9d-83b0-53962f5a7654" + ], + "x-ms-correlation-request-id": [ + "922bf01e-e9fa-4f9d-83b0-53962f5a7654" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220211Z:922bf01e-e9fa-4f9d-83b0-53962f5a7654" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db701\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server701\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T22:01:53.1541656Z\",\r\n \"correlationId\": \"430ce445-9b99-4230-82cb-0bc8e7a3b6aa\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databases/sql-audit-cmdlet-db701\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701/sql-audit-cmdlet-db701\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799722" + ], + "x-ms-request-id": [ + "c2b27417-65cb-45ff-ba09-9691165e79cf" + ], + "x-ms-correlation-request-id": [ + "c2b27417-65cb-45ff-ba09-9691165e79cf" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220214Z:c2b27417-65cb-45ff-ba09-9691165e79cf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db701\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server701\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T22:01:53.1541656Z\",\r\n \"correlationId\": \"430ce445-9b99-4230-82cb-0bc8e7a3b6aa\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databases/sql-audit-cmdlet-db701\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701/sql-audit-cmdlet-db701\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799720" + ], + "x-ms-request-id": [ + "9baeae01-d2b0-40ea-8374-191235aca778" + ], + "x-ms-correlation-request-id": [ + "9baeae01-d2b0-40ea-8374-191235aca778" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220217Z:9baeae01-d2b0-40ea-8374-191235aca778" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:16 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db701\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server701\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T22:01:53.1541656Z\",\r\n \"correlationId\": \"430ce445-9b99-4230-82cb-0bc8e7a3b6aa\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databases/sql-audit-cmdlet-db701\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701/sql-audit-cmdlet-db701\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799718" + ], + "x-ms-request-id": [ + "dd4defcb-8213-466e-bf8d-5c10f43aaae1" + ], + "x-ms-correlation-request-id": [ + "dd4defcb-8213-466e-bf8d-5c10f43aaae1" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220220Z:dd4defcb-8213-466e-bf8d-5c10f43aaae1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db701\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server701\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T22:01:53.1541656Z\",\r\n \"correlationId\": \"430ce445-9b99-4230-82cb-0bc8e7a3b6aa\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databases/sql-audit-cmdlet-db701\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701/sql-audit-cmdlet-db701\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799716" + ], + "x-ms-request-id": [ + "e3b49a48-f1e5-42ce-9e82-3c6c17a87743" + ], + "x-ms-correlation-request-id": [ + "e3b49a48-f1e5-42ce-9e82-3c6c17a87743" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220223Z:e3b49a48-f1e5-42ce-9e82-3c6c17a87743" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:23 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db701\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server701\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T22:01:53.1541656Z\",\r\n \"correlationId\": \"430ce445-9b99-4230-82cb-0bc8e7a3b6aa\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databases/sql-audit-cmdlet-db701\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701/sql-audit-cmdlet-db701\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799714" + ], + "x-ms-request-id": [ + "9e9f851e-e895-442a-9102-965e1a20dde5" + ], + "x-ms-correlation-request-id": [ + "9e9f851e-e895-442a-9102-965e1a20dde5" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220226Z:9e9f851e-e895-442a-9102-965e1a20dde5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db701\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server701\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T22:01:53.1541656Z\",\r\n \"correlationId\": \"430ce445-9b99-4230-82cb-0bc8e7a3b6aa\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databases/sql-audit-cmdlet-db701\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701/sql-audit-cmdlet-db701\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799712" + ], + "x-ms-request-id": [ + "e5f71ba2-6317-4dc3-b8e5-b7754337d9ef" + ], + "x-ms-correlation-request-id": [ + "e5f71ba2-6317-4dc3-b8e5-b7754337d9ef" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220229Z:e5f71ba2-6317-4dc3-b8e5-b7754337d9ef" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:29 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db701\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server701\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T22:01:53.1541656Z\",\r\n \"correlationId\": \"430ce445-9b99-4230-82cb-0bc8e7a3b6aa\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databases/sql-audit-cmdlet-db701\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701/sql-audit-cmdlet-db701\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799710" + ], + "x-ms-request-id": [ + "8fb57a23-0153-4451-8d3f-16c2897497e9" + ], + "x-ms-correlation-request-id": [ + "8fb57a23-0153-4451-8d3f-16c2897497e9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220233Z:8fb57a23-0153-4451-8d3f-16c2897497e9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:32 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db701\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server701\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T22:01:53.1541656Z\",\r\n \"correlationId\": \"430ce445-9b99-4230-82cb-0bc8e7a3b6aa\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databases/sql-audit-cmdlet-db701\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701/sql-audit-cmdlet-db701\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799708" + ], + "x-ms-request-id": [ + "ea5e7107-954c-4e9b-be84-8bbd75d39455" + ], + "x-ms-correlation-request-id": [ + "ea5e7107-954c-4e9b-be84-8bbd75d39455" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220236Z:ea5e7107-954c-4e9b-be84-8bbd75d39455" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db701\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server701\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T22:01:53.1541656Z\",\r\n \"correlationId\": \"430ce445-9b99-4230-82cb-0bc8e7a3b6aa\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databases/sql-audit-cmdlet-db701\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701/sql-audit-cmdlet-db701\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799706" + ], + "x-ms-request-id": [ + "4188746f-1e3e-4af6-9603-b1801d69565b" + ], + "x-ms-correlation-request-id": [ + "4188746f-1e3e-4af6-9603-b1801d69565b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220239Z:4188746f-1e3e-4af6-9603-b1801d69565b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:38 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db701\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server701\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T22:01:53.1541656Z\",\r\n \"correlationId\": \"430ce445-9b99-4230-82cb-0bc8e7a3b6aa\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databases/sql-audit-cmdlet-db701\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701/sql-audit-cmdlet-db701\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799704" + ], + "x-ms-request-id": [ + "c9a97088-ad8f-4d3b-a031-7f420fde723a" + ], + "x-ms-correlation-request-id": [ + "c9a97088-ad8f-4d3b-a031-7f420fde723a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220242Z:c9a97088-ad8f-4d3b-a031-7f420fde723a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db701\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server701\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T22:01:53.1541656Z\",\r\n \"correlationId\": \"430ce445-9b99-4230-82cb-0bc8e7a3b6aa\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databases/sql-audit-cmdlet-db701\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701/sql-audit-cmdlet-db701\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799702" + ], + "x-ms-request-id": [ + "c2f95512-2011-4043-b87e-cc884c66f270" + ], + "x-ms-correlation-request-id": [ + "c2f95512-2011-4043-b87e-cc884c66f270" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220245Z:c2f95512-2011-4043-b87e-cc884c66f270" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db701\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server701\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T22:01:53.1541656Z\",\r\n \"correlationId\": \"430ce445-9b99-4230-82cb-0bc8e7a3b6aa\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databases/sql-audit-cmdlet-db701\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701/sql-audit-cmdlet-db701\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799700" + ], + "x-ms-request-id": [ + "0236db3f-8b95-4b00-876f-342be5c3b532" + ], + "x-ms-correlation-request-id": [ + "0236db3f-8b95-4b00-876f-342be5c3b532" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220248Z:0236db3f-8b95-4b00-876f-342be5c3b532" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db701\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server701\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T22:01:53.1541656Z\",\r\n \"correlationId\": \"430ce445-9b99-4230-82cb-0bc8e7a3b6aa\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databases/sql-audit-cmdlet-db701\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701/sql-audit-cmdlet-db701\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799698" + ], + "x-ms-request-id": [ + "9798e872-54ff-4119-9203-7f4f34859564" + ], + "x-ms-correlation-request-id": [ + "9798e872-54ff-4119-9203-7f4f34859564" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220251Z:9798e872-54ff-4119-9203-7f4f34859564" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db701\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server701\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T22:01:53.1541656Z\",\r\n \"correlationId\": \"430ce445-9b99-4230-82cb-0bc8e7a3b6aa\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databases/sql-audit-cmdlet-db701\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701/sql-audit-cmdlet-db701\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799696" + ], + "x-ms-request-id": [ + "67f091e0-6c6a-4c51-bf44-4a3522ea49ba" + ], + "x-ms-correlation-request-id": [ + "67f091e0-6c6a-4c51-bf44-4a3522ea49ba" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220255Z:67f091e0-6c6a-4c51-bf44-4a3522ea49ba" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db701\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server701\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T22:02:58.2387243Z\",\r\n \"correlationId\": \"430ce445-9b99-4230-82cb-0bc8e7a3b6aa\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databases/sql-audit-cmdlet-db701\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server701/sql-audit-cmdlet-db701\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1626" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799694" + ], + "x-ms-request-id": [ + "b8a17bc1-6238-42e9-bb69-d240e3a32809" + ], + "x-ms-correlation-request-id": [ + "b8a17bc1-6238-42e9-bb69-d240e3a32809" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220258Z:b8a17bc1-6238-42e9-bb69-d240e3a32809" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:02:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701\",\r\n \"name\": \"sql-audit-cmdlet-server701\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databases/sql-audit-cmdlet-db701\",\r\n \"name\": \"sql-audit-cmdlet-server701/sql-audit-cmdlet-db701\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "577" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799693" + ], + "x-ms-request-id": [ + "a2ca5e8f-16c2-4e6b-93e6-66e28ff0a04a" + ], + "x-ms-correlation-request-id": [ + "a2ca5e8f-16c2-4e6b-93e6-66e28ff0a04a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220300Z:a2ca5e8f-16c2-4e6b-93e6-66e28ff0a04a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:03:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westeurope:c2ab5b90-58de-4a1d-afe5-4fe704475b0b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799661" + ], + "x-ms-correlation-request-id": [ + "330afd60-c717-427b-8cec-cabbf263b8df" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220301Z:330afd60-c717-427b-8cec-cabbf263b8df" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:03:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databaseSecurityPolicies/sql-audit-cmdlet-db701?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNzAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNzAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "60de2d69-decc-43a5-b44c-732977a0da0b-2014-10-31 22:03:03Z" + ], + "x-ms-client-request-id": [ + "6d16b3c1-e65d-4801-885a-fb5ff8263d97-2014-10-31 22:03:03Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets701\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets701.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db701;User ID={0}@sql-audit-cmdlet-server701;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db701;Uid={0}@sql-audit-cmdlet-server701;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server701.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db701\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db701\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server701\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db701\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server701.database.secure.windows.net:1433;database=sql-audit-cmdlet-db701;user={0}@sql-audit-cmdlet-server701;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server701.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databaseSecurityPolicies/sql-audit-cmdlet-db701\",\r\n \"name\": \"sql-audit-cmdlet-db701\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2817" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "d2c33097-a3f5-4512-832b-f69c5dc34e36" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799692" + ], + "x-ms-correlation-request-id": [ + "10286683-6f1f-4b3f-954e-2b6a5f6e1fe6" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220304Z:10286683-6f1f-4b3f-954e-2b6a5f6e1fe6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:03:03 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databaseSecurityPolicies/sql-audit-cmdlet-db701?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNzAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNzAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "60de2d69-decc-43a5-b44c-732977a0da0b-2014-10-31 22:03:03Z" + ], + "x-ms-client-request-id": [ + "d692089e-c987-4e03-bd62-b06f3d1d2276-2014-10-31 22:03:09Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets701\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets701.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db701;User ID={0}@sql-audit-cmdlet-server701;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db701;Uid={0}@sql-audit-cmdlet-server701;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server701.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db701\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db701\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server701\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db701\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server701.database.secure.windows.net:1433;database=sql-audit-cmdlet-db701;user={0}@sql-audit-cmdlet-server701;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server701.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databaseSecurityPolicies/sql-audit-cmdlet-db701\",\r\n \"name\": \"sql-audit-cmdlet-db701\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2812" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "63315dfe-b600-4515-8f34-e1fce716c201" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799691" + ], + "x-ms-correlation-request-id": [ + "ae1119ca-bbb6-4b38-81bd-d88ba1c7f732" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220311Z:ae1119ca-bbb6-4b38-81bd-d88ba1c7f732" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:03:10 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databaseSecurityPolicies/sql-audit-cmdlet-db701?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNzAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNzAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "60de2d69-decc-43a5-b44c-732977a0da0b-2014-10-31 22:03:03Z" + ], + "x-ms-client-request-id": [ + "2e64aa20-ad87-4f6e-a57a-607f2b894033-2014-10-31 22:03:12Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets701\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets701.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db701;User ID={0}@sql-audit-cmdlet-server701;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db701;Uid={0}@sql-audit-cmdlet-server701;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server701.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db701\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db701\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server701\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db701\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server701.database.secure.windows.net:1433;database=sql-audit-cmdlet-db701;user={0}@sql-audit-cmdlet-server701;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server701.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databaseSecurityPolicies/sql-audit-cmdlet-db701\",\r\n \"name\": \"sql-audit-cmdlet-db701\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2812" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "ecfed855-b39e-479c-afd0-88524c27a80c" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799690" + ], + "x-ms-correlation-request-id": [ + "b9c6d468-1060-46e3-9fd4-c77c0d55c90b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220313Z:b9c6d468-1060-46e3-9fd4-c77c0d55c90b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:03:13 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databaseSecurityPolicies/sql-audit-cmdlet-db701?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNzAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNzAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "60de2d69-decc-43a5-b44c-732977a0da0b-2014-10-31 22:03:03Z" + ], + "x-ms-client-request-id": [ + "5548c268-7867-4246-b132-bc23716f7c98-2014-10-31 22:03:18Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets701\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets701.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db701;User ID={0}@sql-audit-cmdlet-server701;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db701;Uid={0}@sql-audit-cmdlet-server701;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server701.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db701\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db701\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server701\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db701\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server701.database.secure.windows.net:1433;database=sql-audit-cmdlet-db701;user={0}@sql-audit-cmdlet-server701;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server701.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databaseSecurityPolicies/sql-audit-cmdlet-db701\",\r\n \"name\": \"sql-audit-cmdlet-db701\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2812" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "c63f8f35-90c2-44b9-a099-494d3147c5ce" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799689" + ], + "x-ms-correlation-request-id": [ + "dcb13773-bae9-4722-94f0-317b65933aa4" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220319Z:dcb13773-bae9-4722-94f0-317b65933aa4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:03:19 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databaseSecurityPolicies/sql-audit-cmdlet-db701?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNzAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNzAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "60de2d69-decc-43a5-b44c-732977a0da0b-2014-10-31 22:03:03Z" + ], + "x-ms-client-request-id": [ + "186e8559-7bfa-4928-9959-1af8530dc56a-2014-10-31 22:03:20Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets701\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets701.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db701;User ID={0}@sql-audit-cmdlet-server701;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db701;Uid={0}@sql-audit-cmdlet-server701;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server701.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db701\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db701\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server701\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db701\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server701.database.secure.windows.net:1433;database=sql-audit-cmdlet-db701;user={0}@sql-audit-cmdlet-server701;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server701.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databaseSecurityPolicies/sql-audit-cmdlet-db701\",\r\n \"name\": \"sql-audit-cmdlet-db701\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2812" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "c143da28-8805-4716-85ec-00f8bb4df0c1" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799688" + ], + "x-ms-correlation-request-id": [ + "5974201b-5fbf-49e0-87e7-ba1b048eca08" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220320Z:5974201b-5fbf-49e0-87e7-ba1b048eca08" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:03:20 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databaseSecurityPolicies/sql-audit-cmdlet-db701?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNzAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNzAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "60de2d69-decc-43a5-b44c-732977a0da0b-2014-10-31 22:03:03Z" + ], + "x-ms-client-request-id": [ + "c86892b3-846b-4ec2-8a10-d59ed9e2dc7e-2014-10-31 22:03:24Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets701\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets701.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db701;User ID={0}@sql-audit-cmdlet-server701;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db701;Uid={0}@sql-audit-cmdlet-server701;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server701.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db701\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db701\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server701\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db701\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server701.database.secure.windows.net:1433;database=sql-audit-cmdlet-db701;user={0}@sql-audit-cmdlet-server701;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server701.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databaseSecurityPolicies/sql-audit-cmdlet-db701\",\r\n \"name\": \"sql-audit-cmdlet-db701\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2817" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "9d3615f3-ccbb-44c9-bd4b-2b13c631723a" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799687" + ], + "x-ms-correlation-request-id": [ + "fa058ea7-a7e8-4316-a00b-64bd4895388d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220325Z:fa058ea7-a7e8-4316-a00b-64bd4895388d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:03:25 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databaseSecurityPolicies/sql-audit-cmdlet-db701?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNzAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNzAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "60de2d69-decc-43a5-b44c-732977a0da0b-2014-10-31 22:03:03Z" + ], + "x-ms-client-request-id": [ + "57a1eeae-6fa5-488b-afaf-4b225f2e1f5c-2014-10-31 22:03:27Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets701\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets701.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db701;User ID={0}@sql-audit-cmdlet-server701;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db701;Uid={0}@sql-audit-cmdlet-server701;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server701.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db701\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db701\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server701\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db701\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server701.database.secure.windows.net:1433;database=sql-audit-cmdlet-db701;user={0}@sql-audit-cmdlet-server701;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server701.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databaseSecurityPolicies/sql-audit-cmdlet-db701\",\r\n \"name\": \"sql-audit-cmdlet-db701\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2817" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "af1f1613-a8e2-49d7-acef-636062202a8f" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799686" + ], + "x-ms-correlation-request-id": [ + "42689b7d-3a11-42f8-98c4-edbffee5e760" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220327Z:42689b7d-3a11-42f8-98c4-edbffee5e760" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:03:26 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databaseSecurityPolicies/sql-audit-cmdlet-db701?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNzAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNzAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "60de2d69-decc-43a5-b44c-732977a0da0b-2014-10-31 22:03:03Z" + ], + "x-ms-client-request-id": [ + "77042268-830f-41c1-b236-a8fdcd27c791-2014-10-31 22:03:31Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets701\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets701.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db701;User ID={0}@sql-audit-cmdlet-server701;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db701;Uid={0}@sql-audit-cmdlet-server701;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server701.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db701\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db701\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server701\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db701\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server701.database.secure.windows.net:1433;database=sql-audit-cmdlet-db701;user={0}@sql-audit-cmdlet-server701;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server701.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databaseSecurityPolicies/sql-audit-cmdlet-db701\",\r\n \"name\": \"sql-audit-cmdlet-db701\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2817" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "6325a5f0-b94b-42d8-bdf7-d868c8c0cd3b" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799685" + ], + "x-ms-correlation-request-id": [ + "de19d2a1-586a-496e-b311-da1a246f2539" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220332Z:de19d2a1-586a-496e-b311-da1a246f2539" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:03:32 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databaseSecurityPolicies/sql-audit-cmdlet-db701?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNzAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNzAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "60de2d69-decc-43a5-b44c-732977a0da0b-2014-10-31 22:03:03Z" + ], + "x-ms-client-request-id": [ + "a0bca7bc-68cd-4765-8a91-f969df9eec6a-2014-10-31 22:03:33Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets701\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets701.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db701;User ID={0}@sql-audit-cmdlet-server701;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db701;Uid={0}@sql-audit-cmdlet-server701;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server701.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db701\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db701\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server701\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db701\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server701.database.secure.windows.net:1433;database=sql-audit-cmdlet-db701;user={0}@sql-audit-cmdlet-server701;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server701.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databaseSecurityPolicies/sql-audit-cmdlet-db701\",\r\n \"name\": \"sql-audit-cmdlet-db701\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2817" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "7ef19574-39a6-4738-a0e1-650b73935d49" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799684" + ], + "x-ms-correlation-request-id": [ + "5efd570b-cea0-4c34-8e24-3a88b8b010a9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220334Z:5efd570b-cea0-4c34-8e24-3a88b8b010a9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:03:34 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databaseSecurityPolicies/sql-audit-cmdlet-db701?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNzAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNzAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "60de2d69-decc-43a5-b44c-732977a0da0b-2014-10-31 22:03:03Z" + ], + "x-ms-client-request-id": [ + "c179d683-59ee-4246-8a7d-b41270ac3a01-2014-10-31 22:03:35Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets701\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets701.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db701;User ID={0}@sql-audit-cmdlet-server701;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db701;Uid={0}@sql-audit-cmdlet-server701;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server701.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db701\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db701\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server701\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db701\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server701.database.secure.windows.net:1433;database=sql-audit-cmdlet-db701;user={0}@sql-audit-cmdlet-server701;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server701.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databaseSecurityPolicies/sql-audit-cmdlet-db701\",\r\n \"name\": \"sql-audit-cmdlet-db701\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2817" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "f29f5b7b-07d5-436e-b205-38dbc28825b2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799683" + ], + "x-ms-correlation-request-id": [ + "21355aa4-b7d8-4dc8-ba07-52544ee19deb" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220335Z:21355aa4-b7d8-4dc8-ba07-52544ee19deb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:03:35 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databaseSecurityPolicies/sql-audit-cmdlet-db701?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNzAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNzAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "60de2d69-decc-43a5-b44c-732977a0da0b-2014-10-31 22:03:03Z" + ], + "x-ms-client-request-id": [ + "10887c06-fda5-4f00-9495-5b033491a184-2014-10-31 22:03:36Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets701\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets701.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db701;User ID={0}@sql-audit-cmdlet-server701;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db701;Uid={0}@sql-audit-cmdlet-server701;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server701.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db701\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db701\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server701\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db701\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server701.database.secure.windows.net:1433;database=sql-audit-cmdlet-db701;user={0}@sql-audit-cmdlet-server701;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server701.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databaseSecurityPolicies/sql-audit-cmdlet-db701\",\r\n \"name\": \"sql-audit-cmdlet-db701\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2817" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "a6d6edc1-601e-4cdb-8c1b-42fc142b647d" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799682" + ], + "x-ms-correlation-request-id": [ + "8bd7941d-10c2-434c-bb04-b8f9d6209c66" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220336Z:8bd7941d-10c2-434c-bb04-b8f9d6209c66" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:03:36 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databaseSecurityPolicies/sql-audit-cmdlet-db701?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNzAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNzAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "60de2d69-decc-43a5-b44c-732977a0da0b-2014-10-31 22:03:03Z" + ], + "x-ms-client-request-id": [ + "8b78b721-93f6-4073-8d27-c2585b9ca578-2014-10-31 22:03:38Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets701\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets701.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db701;User ID={0}@sql-audit-cmdlet-server701;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db701;Uid={0}@sql-audit-cmdlet-server701;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server701.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db701\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db701\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server701\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db701\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server701.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server701.database.secure.windows.net:1433;database=sql-audit-cmdlet-db701;user={0}@sql-audit-cmdlet-server701;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server701.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databaseSecurityPolicies/sql-audit-cmdlet-db701\",\r\n \"name\": \"sql-audit-cmdlet-db701\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2817" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "3e4f6900-40a3-4ec6-93e1-e1d7f65d5c61" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799681" + ], + "x-ms-correlation-request-id": [ + "135b456d-e8a8-445c-b24b-97773a3445bb" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220338Z:135b456d-e8a8-445c-b24b-97773a3445bb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:03:38 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets701/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzNzAxL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "60de2d69-decc-43a5-b44c-732977a0da0b-2014-10-31 22:03:03Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"hMQv41Zh673bFe/b/qaYwGsMiHWNaZHGrk6HMhFNEp6zp8uB41D62PZNaOEnmhEtu0D17TwrObQ4CgStc4+rQQ==\",\r\n \"secondaryKey\": \"unvvqUOKAp1TND1LrBQiwx6QTBUUPRj71dQp7dTP77sGRFH21oDapewjBO2V2tz0dnH/u5mJHmwRnRoqohajlg==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:0dec3b67-1098-44ab-b801-30f40e240d3a" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11962" + ], + "x-ms-correlation-request-id": [ + "451cc2e6-4c59-496b-9501-3bc049fb6a58" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220305Z:451cc2e6-4c59-496b-9501-3bc049fb6a58" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:03:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets701/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzNzAxL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "60de2d69-decc-43a5-b44c-732977a0da0b-2014-10-31 22:03:03Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"hMQv41Zh673bFe/b/qaYwGsMiHWNaZHGrk6HMhFNEp6zp8uB41D62PZNaOEnmhEtu0D17TwrObQ4CgStc4+rQQ==\",\r\n \"secondaryKey\": \"unvvqUOKAp1TND1LrBQiwx6QTBUUPRj71dQp7dTP77sGRFH21oDapewjBO2V2tz0dnH/u5mJHmwRnRoqohajlg==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:e915b347-06f5-4e5c-824e-1d6b8d79973b" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11960" + ], + "x-ms-correlation-request-id": [ + "392e97cc-c164-44b0-b88b-51201c4936b7" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220314Z:392e97cc-c164-44b0-b88b-51201c4936b7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:03:14 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets701/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzNzAxL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "60de2d69-decc-43a5-b44c-732977a0da0b-2014-10-31 22:03:03Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"hMQv41Zh673bFe/b/qaYwGsMiHWNaZHGrk6HMhFNEp6zp8uB41D62PZNaOEnmhEtu0D17TwrObQ4CgStc4+rQQ==\",\r\n \"secondaryKey\": \"unvvqUOKAp1TND1LrBQiwx6QTBUUPRj71dQp7dTP77sGRFH21oDapewjBO2V2tz0dnH/u5mJHmwRnRoqohajlg==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:561d3075-5fc5-491e-8846-5ebf4a5327c2" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11958" + ], + "x-ms-correlation-request-id": [ + "75240b2f-8a30-474e-a1b1-42fd8830a708" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220321Z:75240b2f-8a30-474e-a1b1-42fd8830a708" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:03:20 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets701/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzNzAxL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "60de2d69-decc-43a5-b44c-732977a0da0b-2014-10-31 22:03:03Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"hMQv41Zh673bFe/b/qaYwGsMiHWNaZHGrk6HMhFNEp6zp8uB41D62PZNaOEnmhEtu0D17TwrObQ4CgStc4+rQQ==\",\r\n \"secondaryKey\": \"unvvqUOKAp1TND1LrBQiwx6QTBUUPRj71dQp7dTP77sGRFH21oDapewjBO2V2tz0dnH/u5mJHmwRnRoqohajlg==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:b0a73e31-7dd3-4eb5-97c7-aab96e316041" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11956" + ], + "x-ms-correlation-request-id": [ + "107063d1-8112-4382-9655-6d7bf67150f5" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220327Z:107063d1-8112-4382-9655-6d7bf67150f5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:03:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databaseSecurityPolicies/sql-audit-cmdlet-db701?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNzAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNzAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets701\",\r\n \"storageAccountKey\": \"hMQv41Zh673bFe/b/qaYwGsMiHWNaZHGrk6HMhFNEp6zp8uB41D62PZNaOEnmhEtu0D17TwrObQ4CgStc4+rQQ==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets701.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "784" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "60de2d69-decc-43a5-b44c-732977a0da0b-2014-10-31 22:03:03Z" + ], + "x-ms-client-request-id": [ + "6d16b3c1-e65d-4801-885a-fb5ff8263d97-2014-10-31 22:03:03Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets701\",\r\n \"storageAccountKey\": \"hMQv41Zh673bFe/b/qaYwGsMiHWNaZHGrk6HMhFNEp6zp8uB41D62PZNaOEnmhEtu0D17TwrObQ4CgStc4+rQQ==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets701.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databaseSecurityPolicies/sql-audit-cmdlet-db701\",\r\n \"name\": \"sql-audit-cmdlet-db701\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1155" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "8ccc466d-c382-4caf-83c1-9c1beabeb366" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11961" + ], + "x-ms-correlation-request-id": [ + "d923724a-34f3-4560-b305-d30af98685ec" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220308Z:d923724a-34f3-4560-b305-d30af98685ec" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:03:08 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databaseSecurityPolicies/sql-audit-cmdlet-db701?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNzAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNzAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets701\",\r\n \"storageAccountKey\": \"hMQv41Zh673bFe/b/qaYwGsMiHWNaZHGrk6HMhFNEp6zp8uB41D62PZNaOEnmhEtu0D17TwrObQ4CgStc4+rQQ==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets701.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "784" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "60de2d69-decc-43a5-b44c-732977a0da0b-2014-10-31 22:03:03Z" + ], + "x-ms-client-request-id": [ + "2e64aa20-ad87-4f6e-a57a-607f2b894033-2014-10-31 22:03:12Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets701\",\r\n \"storageAccountKey\": \"hMQv41Zh673bFe/b/qaYwGsMiHWNaZHGrk6HMhFNEp6zp8uB41D62PZNaOEnmhEtu0D17TwrObQ4CgStc4+rQQ==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets701.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databaseSecurityPolicies/sql-audit-cmdlet-db701\",\r\n \"name\": \"sql-audit-cmdlet-db701\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1155" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "c0c0906d-f6b6-472d-ac1e-03abd67dc5b2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11959" + ], + "x-ms-correlation-request-id": [ + "14c122d8-f73e-4620-9b0b-f9e06c15161d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220317Z:14c122d8-f73e-4620-9b0b-f9e06c15161d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:03:16 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databaseSecurityPolicies/sql-audit-cmdlet-db701?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNzAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNzAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets701\",\r\n \"storageAccountKey\": \"hMQv41Zh673bFe/b/qaYwGsMiHWNaZHGrk6HMhFNEp6zp8uB41D62PZNaOEnmhEtu0D17TwrObQ4CgStc4+rQQ==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets701.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "789" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "60de2d69-decc-43a5-b44c-732977a0da0b-2014-10-31 22:03:03Z" + ], + "x-ms-client-request-id": [ + "186e8559-7bfa-4928-9959-1af8530dc56a-2014-10-31 22:03:20Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets701\",\r\n \"storageAccountKey\": \"hMQv41Zh673bFe/b/qaYwGsMiHWNaZHGrk6HMhFNEp6zp8uB41D62PZNaOEnmhEtu0D17TwrObQ4CgStc4+rQQ==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets701.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databaseSecurityPolicies/sql-audit-cmdlet-db701\",\r\n \"name\": \"sql-audit-cmdlet-db701\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1160" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "b4de9169-ed9d-4390-a779-e56fcea05cbc" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11957" + ], + "x-ms-correlation-request-id": [ + "6fab5af6-43db-4633-840f-9978d4c3cd9c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220323Z:6fab5af6-43db-4633-840f-9978d4c3cd9c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:03:23 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databaseSecurityPolicies/sql-audit-cmdlet-db701?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzcwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNzAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNzAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets701\",\r\n \"storageAccountKey\": \"hMQv41Zh673bFe/b/qaYwGsMiHWNaZHGrk6HMhFNEp6zp8uB41D62PZNaOEnmhEtu0D17TwrObQ4CgStc4+rQQ==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets701.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "789" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "60de2d69-decc-43a5-b44c-732977a0da0b-2014-10-31 22:03:03Z" + ], + "x-ms-client-request-id": [ + "57a1eeae-6fa5-488b-afaf-4b225f2e1f5c-2014-10-31 22:03:27Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets701\",\r\n \"storageAccountKey\": \"hMQv41Zh673bFe/b/qaYwGsMiHWNaZHGrk6HMhFNEp6zp8uB41D62PZNaOEnmhEtu0D17TwrObQ4CgStc4+rQQ==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets701.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg701/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server701/databaseSecurityPolicies/sql-audit-cmdlet-db701\",\r\n \"name\": \"sql-audit-cmdlet-db701\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1160" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "04bd6819-cb5e-449c-8e36-750832d9fc0c" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11955" + ], + "x-ms-correlation-request-id": [ + "4827def3-f531-407e-b589-e08271b4a5b6" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220329Z:4827def3-f531-407e-b589-e08271b4a5b6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:03:29 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices/auditcmdlets701", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXMvYXVkaXRjbWRsZXRzNzAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "e5394277ae952f48a47f2cd32c9d7df4" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:03:43 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/e5394277ae952f48a47f2cd32c9d7df4", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zL2U1Mzk0Mjc3YWU5NTJmNDhhNDdmMmNkMzJjOWQ3ZGY0", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/2.0.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "\r\n e5394277-ae95-2f48-a47f-2cd32c9d7df4\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "db80d9b8c3ab27fcb0e90af70c1a856c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:03:45 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "cca24ec8-99b5-4aa7-9ff6-486e886f304c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestDatabaseUpdatePolicyWithEventTypes.json b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestDatabaseUpdatePolicyWithEventTypes.json new file mode 100644 index 000000000000..5916252ace2d --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestDatabaseUpdatePolicyWithEventTypes.json @@ -0,0 +1,3455 @@ +{ + "Entries": [ + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXM=", + "RequestMethod": "POST", + "RequestBody": "\r\n auditcmdlets501\r\n \r\n \r\n West US\r\n \r\n Standard_GRS\r\n", + "RequestHeaders": { + "Content-Type": [ + "application/xml" + ], + "Content-Length": [ + "379" + ], + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "329" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "97a877b4760722f0972e62a7ff817c17" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:11:05 GMT" + ], + "Location": [ + "https://management.core.windows.net/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/storage/auditcmdlets501" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/97a877b4760722f0972e62a7ff817c17", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zLzk3YTg3N2I0NzYwNzIyZjA5NzJlNjJhN2ZmODE3YzE3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "329" + ] + }, + "ResponseBody": "\r\n 97a877b4-7607-22f0-972e-62a7ff817c17\r\n InProgress\r\n", + "ResponseHeaders": { + "Content-Length": [ + "197" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "0dfb36930dab24cfac93544e70ed4940" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:11:06 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/97a877b4760722f0972e62a7ff817c17", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zLzk3YTg3N2I0NzYwNzIyZjA5NzJlNjJhN2ZmODE3YzE3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "329" + ] + }, + "ResponseBody": "\r\n 97a877b4-7607-22f0-972e-62a7ff817c17\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "8f9c920ea68c2b68897a7382492e6644" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:11:35 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "119" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799896" + ], + "x-ms-request-id": [ + "dbc0ae25-7134-4b93-a92e-82b8e3107283" + ], + "x-ms-correlation-request-id": [ + "dbc0ae25-7134-4b93-a92e-82b8e3107283" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211137Z:dbc0ae25-7134-4b93-a92e-82b8e3107283" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:11:37 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501\",\r\n \"name\": \"sql-audit-cmdlet-test-rg501\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "217" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11988" + ], + "x-ms-request-id": [ + "72467f3a-2e59-421a-a274-6a60fd871d1e" + ], + "x-ms-correlation-request-id": [ + "72467f3a-2e59-421a-a274-6a60fd871d1e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211139Z:72467f3a-2e59-421a-a274-6a60fd871d1e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:11:39 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup/validate?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvdmFsaWRhdGU/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db501\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server501\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db501\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server501\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:11:40.2041476Z\",\r\n \"correlationId\": \"1abb1b5b-d8db-42f0-a4a2-df51c242fdcf\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databases/sql-audit-cmdlet-db501\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501/sql-audit-cmdlet-db501\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11987" + ], + "x-ms-request-id": [ + "1abb1b5b-d8db-42f0-a4a2-df51c242fdcf" + ], + "x-ms-correlation-request-id": [ + "1abb1b5b-d8db-42f0-a4a2-df51c242fdcf" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211140Z:1abb1b5b-d8db-42f0-a4a2-df51c242fdcf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:11:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db501\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server501\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db501\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server501\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:11:41.8091101Z\",\r\n \"correlationId\": \"1bbefec3-2308-43f7-8b26-8a6bb2d414de\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databases/sql-audit-cmdlet-db501\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501/sql-audit-cmdlet-db501\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11986" + ], + "x-ms-request-id": [ + "1bbefec3-2308-43f7-8b26-8a6bb2d414de" + ], + "x-ms-correlation-request-id": [ + "1bbefec3-2308-43f7-8b26-8a6bb2d414de" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211142Z:1bbefec3-2308-43f7-8b26-8a6bb2d414de" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:11:41 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799895" + ], + "x-ms-request-id": [ + "c6562d27-2634-4846-869f-d924a6d7d23f" + ], + "x-ms-correlation-request-id": [ + "c6562d27-2634-4846-869f-d924a6d7d23f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211142Z:c6562d27-2634-4846-869f-d924a6d7d23f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:11:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799893" + ], + "x-ms-request-id": [ + "888930e5-66e3-471f-96fc-01bc45c45913" + ], + "x-ms-correlation-request-id": [ + "888930e5-66e3-471f-96fc-01bc45c45913" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211146Z:888930e5-66e3-471f-96fc-01bc45c45913" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:11:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799891" + ], + "x-ms-request-id": [ + "3a6c038e-0f9d-4347-b24c-e63ea5688c63" + ], + "x-ms-correlation-request-id": [ + "3a6c038e-0f9d-4347-b24c-e63ea5688c63" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211149Z:3a6c038e-0f9d-4347-b24c-e63ea5688c63" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:11:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799889" + ], + "x-ms-request-id": [ + "40f86d4d-08dd-4bc7-890e-9df91f70de90" + ], + "x-ms-correlation-request-id": [ + "40f86d4d-08dd-4bc7-890e-9df91f70de90" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211152Z:40f86d4d-08dd-4bc7-890e-9df91f70de90" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:11:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799887" + ], + "x-ms-request-id": [ + "b142ee7b-9fe3-40b6-9f31-9d448789f130" + ], + "x-ms-correlation-request-id": [ + "b142ee7b-9fe3-40b6-9f31-9d448789f130" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211155Z:b142ee7b-9fe3-40b6-9f31-9d448789f130" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:11:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799885" + ], + "x-ms-request-id": [ + "a8aaf2e4-041d-438e-8429-8d1d0b8b8350" + ], + "x-ms-correlation-request-id": [ + "a8aaf2e4-041d-438e-8429-8d1d0b8b8350" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211158Z:a8aaf2e4-041d-438e-8429-8d1d0b8b8350" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:11:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799883" + ], + "x-ms-request-id": [ + "4a9e2cbe-328b-4742-a601-233187660127" + ], + "x-ms-correlation-request-id": [ + "4a9e2cbe-328b-4742-a601-233187660127" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211201Z:4a9e2cbe-328b-4742-a601-233187660127" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799881" + ], + "x-ms-request-id": [ + "b5688f2b-9c1b-41f5-9d33-a2362b00454b" + ], + "x-ms-correlation-request-id": [ + "b5688f2b-9c1b-41f5-9d33-a2362b00454b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211204Z:b5688f2b-9c1b-41f5-9d33-a2362b00454b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799879" + ], + "x-ms-request-id": [ + "67421590-c906-43cb-9ba9-4fe9bde7f83a" + ], + "x-ms-correlation-request-id": [ + "67421590-c906-43cb-9ba9-4fe9bde7f83a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211208Z:67421590-c906-43cb-9ba9-4fe9bde7f83a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:08 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799877" + ], + "x-ms-request-id": [ + "a5e837b8-8f9b-4cc6-8b0a-16998540342e" + ], + "x-ms-correlation-request-id": [ + "a5e837b8-8f9b-4cc6-8b0a-16998540342e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211211Z:a5e837b8-8f9b-4cc6-8b0a-16998540342e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:11 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799875" + ], + "x-ms-request-id": [ + "6570dbe8-c779-4e28-bf8d-26b7d8826e21" + ], + "x-ms-correlation-request-id": [ + "6570dbe8-c779-4e28-bf8d-26b7d8826e21" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211214Z:6570dbe8-c779-4e28-bf8d-26b7d8826e21" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799873" + ], + "x-ms-request-id": [ + "d0a7292e-17f1-4298-a85a-834dbafd66f6" + ], + "x-ms-correlation-request-id": [ + "d0a7292e-17f1-4298-a85a-834dbafd66f6" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211217Z:d0a7292e-17f1-4298-a85a-834dbafd66f6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:17 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799871" + ], + "x-ms-request-id": [ + "0a32fc4a-5aef-4c69-aa3b-ff7526ca31b7" + ], + "x-ms-correlation-request-id": [ + "0a32fc4a-5aef-4c69-aa3b-ff7526ca31b7" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211220Z:0a32fc4a-5aef-4c69-aa3b-ff7526ca31b7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:20 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799869" + ], + "x-ms-request-id": [ + "759da296-6a89-4fe1-9ac7-f4049e6dec62" + ], + "x-ms-correlation-request-id": [ + "759da296-6a89-4fe1-9ac7-f4049e6dec62" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211223Z:759da296-6a89-4fe1-9ac7-f4049e6dec62" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799867" + ], + "x-ms-request-id": [ + "b853447f-8bb5-4377-9adf-3f738c32a176" + ], + "x-ms-correlation-request-id": [ + "b853447f-8bb5-4377-9adf-3f738c32a176" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211226Z:b853447f-8bb5-4377-9adf-3f738c32a176" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799865" + ], + "x-ms-request-id": [ + "490e5256-8a85-499e-8e81-cd61deec85e1" + ], + "x-ms-correlation-request-id": [ + "490e5256-8a85-499e-8e81-cd61deec85e1" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211229Z:490e5256-8a85-499e-8e81-cd61deec85e1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:29 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799863" + ], + "x-ms-request-id": [ + "3ed02d17-d530-4775-b426-14499febb810" + ], + "x-ms-correlation-request-id": [ + "3ed02d17-d530-4775-b426-14499febb810" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211233Z:3ed02d17-d530-4775-b426-14499febb810" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799861" + ], + "x-ms-request-id": [ + "01781c0a-98ad-4325-a184-e2b7e78a4c63" + ], + "x-ms-correlation-request-id": [ + "01781c0a-98ad-4325-a184-e2b7e78a4c63" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211236Z:01781c0a-98ad-4325-a184-e2b7e78a4c63" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:36 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799859" + ], + "x-ms-request-id": [ + "1eb86881-4320-4219-bf13-6bf689bc6269" + ], + "x-ms-correlation-request-id": [ + "1eb86881-4320-4219-bf13-6bf689bc6269" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211240Z:1eb86881-4320-4219-bf13-6bf689bc6269" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:40 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup/operations/B0E7851820B767E8\",\r\n \"operationId\": \"B0E7851820B767E8\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:12:40.586294Z\",\r\n \"trackingId\": \"36140769-e549-4dcd-8ef9-441cae8aa187\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "640" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799857" + ], + "x-ms-request-id": [ + "bf13c5c3-eefe-4a4f-a1b1-3971bce4d3d6" + ], + "x-ms-correlation-request-id": [ + "bf13c5c3-eefe-4a4f-a1b1-3971bce4d3d6" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211243Z:bf13c5c3-eefe-4a4f-a1b1-3971bce4d3d6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup/operations/B0E7851820B767E8\",\r\n \"operationId\": \"B0E7851820B767E8\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:12:40.586294Z\",\r\n \"trackingId\": \"36140769-e549-4dcd-8ef9-441cae8aa187\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "640" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799855" + ], + "x-ms-request-id": [ + "28ad9927-37ee-43ec-9c19-282254925569" + ], + "x-ms-correlation-request-id": [ + "28ad9927-37ee-43ec-9c19-282254925569" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211246Z:28ad9927-37ee-43ec-9c19-282254925569" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup/operations/5B8329E6C678C2A2\",\r\n \"operationId\": \"5B8329E6C678C2A2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:12:47.2953518Z\",\r\n \"trackingId\": \"5a9e919f-9226-4302-9ccb-d46ae7ffd2d6\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databases/sql-audit-cmdlet-db501\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501/sql-audit-cmdlet-db501\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup/operations/B0E7851820B767E8\",\r\n \"operationId\": \"B0E7851820B767E8\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:12:40.586294Z\",\r\n \"trackingId\": \"36140769-e549-4dcd-8ef9-441cae8aa187\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1336" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799853" + ], + "x-ms-request-id": [ + "45fcff60-877a-4b69-a4bb-45fc9f26f9af" + ], + "x-ms-correlation-request-id": [ + "45fcff60-877a-4b69-a4bb-45fc9f26f9af" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211249Z:45fcff60-877a-4b69-a4bb-45fc9f26f9af" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup/operations/5B8329E6C678C2A2\",\r\n \"operationId\": \"5B8329E6C678C2A2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:12:47.2953518Z\",\r\n \"trackingId\": \"5a9e919f-9226-4302-9ccb-d46ae7ffd2d6\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databases/sql-audit-cmdlet-db501\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501/sql-audit-cmdlet-db501\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup/operations/B0E7851820B767E8\",\r\n \"operationId\": \"B0E7851820B767E8\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:12:40.586294Z\",\r\n \"trackingId\": \"36140769-e549-4dcd-8ef9-441cae8aa187\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1336" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799851" + ], + "x-ms-request-id": [ + "91a22541-4797-4a58-ab36-688c3c13f865" + ], + "x-ms-correlation-request-id": [ + "91a22541-4797-4a58-ab36-688c3c13f865" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211253Z:91a22541-4797-4a58-ab36-688c3c13f865" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db501\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server501\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:11:41.8091101Z\",\r\n \"correlationId\": \"1bbefec3-2308-43f7-8b26-8a6bb2d414de\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databases/sql-audit-cmdlet-db501\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501/sql-audit-cmdlet-db501\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799894" + ], + "x-ms-request-id": [ + "af65b60b-326a-45a3-aef4-43b41c571aa8" + ], + "x-ms-correlation-request-id": [ + "af65b60b-326a-45a3-aef4-43b41c571aa8" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211143Z:af65b60b-326a-45a3-aef4-43b41c571aa8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:11:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db501\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server501\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:11:44.6267503Z\",\r\n \"correlationId\": \"1bbefec3-2308-43f7-8b26-8a6bb2d414de\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databases/sql-audit-cmdlet-db501\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501/sql-audit-cmdlet-db501\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799892" + ], + "x-ms-request-id": [ + "fe14d266-f7c1-4d70-a83d-79704ad31b32" + ], + "x-ms-correlation-request-id": [ + "fe14d266-f7c1-4d70-a83d-79704ad31b32" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211146Z:fe14d266-f7c1-4d70-a83d-79704ad31b32" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:11:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db501\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server501\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:11:44.6267503Z\",\r\n \"correlationId\": \"1bbefec3-2308-43f7-8b26-8a6bb2d414de\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databases/sql-audit-cmdlet-db501\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501/sql-audit-cmdlet-db501\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799890" + ], + "x-ms-request-id": [ + "730d069b-1cbc-4594-bf26-444627957689" + ], + "x-ms-correlation-request-id": [ + "730d069b-1cbc-4594-bf26-444627957689" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211149Z:730d069b-1cbc-4594-bf26-444627957689" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:11:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db501\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server501\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:11:44.6267503Z\",\r\n \"correlationId\": \"1bbefec3-2308-43f7-8b26-8a6bb2d414de\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databases/sql-audit-cmdlet-db501\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501/sql-audit-cmdlet-db501\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799888" + ], + "x-ms-request-id": [ + "d6402d05-19e0-4c81-b40e-c149cc199d99" + ], + "x-ms-correlation-request-id": [ + "d6402d05-19e0-4c81-b40e-c149cc199d99" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211152Z:d6402d05-19e0-4c81-b40e-c149cc199d99" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:11:52 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db501\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server501\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:11:44.6267503Z\",\r\n \"correlationId\": \"1bbefec3-2308-43f7-8b26-8a6bb2d414de\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databases/sql-audit-cmdlet-db501\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501/sql-audit-cmdlet-db501\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799886" + ], + "x-ms-request-id": [ + "367c86c3-17ef-4203-acfd-c76c31f5df68" + ], + "x-ms-correlation-request-id": [ + "367c86c3-17ef-4203-acfd-c76c31f5df68" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211156Z:367c86c3-17ef-4203-acfd-c76c31f5df68" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:11:56 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db501\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server501\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:11:44.6267503Z\",\r\n \"correlationId\": \"1bbefec3-2308-43f7-8b26-8a6bb2d414de\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databases/sql-audit-cmdlet-db501\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501/sql-audit-cmdlet-db501\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799884" + ], + "x-ms-request-id": [ + "e9e97b18-f0f7-45b7-8bbd-40468e475a7d" + ], + "x-ms-correlation-request-id": [ + "e9e97b18-f0f7-45b7-8bbd-40468e475a7d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211159Z:e9e97b18-f0f7-45b7-8bbd-40468e475a7d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:11:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db501\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server501\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:11:44.6267503Z\",\r\n \"correlationId\": \"1bbefec3-2308-43f7-8b26-8a6bb2d414de\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databases/sql-audit-cmdlet-db501\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501/sql-audit-cmdlet-db501\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799882" + ], + "x-ms-request-id": [ + "32fea087-a658-4044-b895-b01f39e26b62" + ], + "x-ms-correlation-request-id": [ + "32fea087-a658-4044-b895-b01f39e26b62" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211202Z:32fea087-a658-4044-b895-b01f39e26b62" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db501\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server501\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:11:44.6267503Z\",\r\n \"correlationId\": \"1bbefec3-2308-43f7-8b26-8a6bb2d414de\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databases/sql-audit-cmdlet-db501\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501/sql-audit-cmdlet-db501\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799880" + ], + "x-ms-request-id": [ + "73600425-88d2-4d3a-b6ad-505611eba065" + ], + "x-ms-correlation-request-id": [ + "73600425-88d2-4d3a-b6ad-505611eba065" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211205Z:73600425-88d2-4d3a-b6ad-505611eba065" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db501\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server501\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:11:44.6267503Z\",\r\n \"correlationId\": \"1bbefec3-2308-43f7-8b26-8a6bb2d414de\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databases/sql-audit-cmdlet-db501\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501/sql-audit-cmdlet-db501\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799878" + ], + "x-ms-request-id": [ + "56cee524-f652-4391-940c-cae3fe56ecdd" + ], + "x-ms-correlation-request-id": [ + "56cee524-f652-4391-940c-cae3fe56ecdd" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211208Z:56cee524-f652-4391-940c-cae3fe56ecdd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:08 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db501\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server501\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:11:44.6267503Z\",\r\n \"correlationId\": \"1bbefec3-2308-43f7-8b26-8a6bb2d414de\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databases/sql-audit-cmdlet-db501\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501/sql-audit-cmdlet-db501\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799876" + ], + "x-ms-request-id": [ + "a2a21b2c-4ad1-41e5-a7d4-5ceb165dd916" + ], + "x-ms-correlation-request-id": [ + "a2a21b2c-4ad1-41e5-a7d4-5ceb165dd916" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211211Z:a2a21b2c-4ad1-41e5-a7d4-5ceb165dd916" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:11 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db501\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server501\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:11:44.6267503Z\",\r\n \"correlationId\": \"1bbefec3-2308-43f7-8b26-8a6bb2d414de\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databases/sql-audit-cmdlet-db501\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501/sql-audit-cmdlet-db501\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799874" + ], + "x-ms-request-id": [ + "488769b8-e13d-424a-bbee-35e9d4984927" + ], + "x-ms-correlation-request-id": [ + "488769b8-e13d-424a-bbee-35e9d4984927" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211214Z:488769b8-e13d-424a-bbee-35e9d4984927" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db501\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server501\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:11:44.6267503Z\",\r\n \"correlationId\": \"1bbefec3-2308-43f7-8b26-8a6bb2d414de\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databases/sql-audit-cmdlet-db501\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501/sql-audit-cmdlet-db501\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799872" + ], + "x-ms-request-id": [ + "dd641b67-b553-4705-bf43-6b1e4988e775" + ], + "x-ms-correlation-request-id": [ + "dd641b67-b553-4705-bf43-6b1e4988e775" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211218Z:dd641b67-b553-4705-bf43-6b1e4988e775" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:17 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db501\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server501\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:11:44.6267503Z\",\r\n \"correlationId\": \"1bbefec3-2308-43f7-8b26-8a6bb2d414de\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databases/sql-audit-cmdlet-db501\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501/sql-audit-cmdlet-db501\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799870" + ], + "x-ms-request-id": [ + "409f71b5-6673-4d44-93be-013ac0d35b9f" + ], + "x-ms-correlation-request-id": [ + "409f71b5-6673-4d44-93be-013ac0d35b9f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211221Z:409f71b5-6673-4d44-93be-013ac0d35b9f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:20 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db501\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server501\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:11:44.6267503Z\",\r\n \"correlationId\": \"1bbefec3-2308-43f7-8b26-8a6bb2d414de\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databases/sql-audit-cmdlet-db501\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501/sql-audit-cmdlet-db501\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799868" + ], + "x-ms-request-id": [ + "5bef868b-b0d4-4244-ad4c-3ded1537de11" + ], + "x-ms-correlation-request-id": [ + "5bef868b-b0d4-4244-ad4c-3ded1537de11" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211224Z:5bef868b-b0d4-4244-ad4c-3ded1537de11" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db501\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server501\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:11:44.6267503Z\",\r\n \"correlationId\": \"1bbefec3-2308-43f7-8b26-8a6bb2d414de\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databases/sql-audit-cmdlet-db501\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501/sql-audit-cmdlet-db501\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799866" + ], + "x-ms-request-id": [ + "74fb4f9e-48c4-433f-a57e-91316d501592" + ], + "x-ms-correlation-request-id": [ + "74fb4f9e-48c4-433f-a57e-91316d501592" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211227Z:74fb4f9e-48c4-433f-a57e-91316d501592" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db501\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server501\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:11:44.6267503Z\",\r\n \"correlationId\": \"1bbefec3-2308-43f7-8b26-8a6bb2d414de\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databases/sql-audit-cmdlet-db501\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501/sql-audit-cmdlet-db501\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799864" + ], + "x-ms-request-id": [ + "2dace719-b170-494c-bd31-67a6d53f27cc" + ], + "x-ms-correlation-request-id": [ + "2dace719-b170-494c-bd31-67a6d53f27cc" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211230Z:2dace719-b170-494c-bd31-67a6d53f27cc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:29 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db501\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server501\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:11:44.6267503Z\",\r\n \"correlationId\": \"1bbefec3-2308-43f7-8b26-8a6bb2d414de\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databases/sql-audit-cmdlet-db501\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501/sql-audit-cmdlet-db501\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799862" + ], + "x-ms-request-id": [ + "2539d2dd-8ad7-4388-8d3b-cde26fce072a" + ], + "x-ms-correlation-request-id": [ + "2539d2dd-8ad7-4388-8d3b-cde26fce072a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211233Z:2539d2dd-8ad7-4388-8d3b-cde26fce072a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db501\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server501\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:11:44.6267503Z\",\r\n \"correlationId\": \"1bbefec3-2308-43f7-8b26-8a6bb2d414de\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databases/sql-audit-cmdlet-db501\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501/sql-audit-cmdlet-db501\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799860" + ], + "x-ms-request-id": [ + "9c0b6361-f67d-492c-a61a-0ed207c11b7e" + ], + "x-ms-correlation-request-id": [ + "9c0b6361-f67d-492c-a61a-0ed207c11b7e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211237Z:9c0b6361-f67d-492c-a61a-0ed207c11b7e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:37 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db501\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server501\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:11:44.6267503Z\",\r\n \"correlationId\": \"1bbefec3-2308-43f7-8b26-8a6bb2d414de\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databases/sql-audit-cmdlet-db501\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501/sql-audit-cmdlet-db501\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799858" + ], + "x-ms-request-id": [ + "bc61ce7e-6e61-423c-8896-ae579193b92f" + ], + "x-ms-correlation-request-id": [ + "bc61ce7e-6e61-423c-8896-ae579193b92f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211240Z:bc61ce7e-6e61-423c-8896-ae579193b92f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:40 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db501\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server501\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:11:44.6267503Z\",\r\n \"correlationId\": \"1bbefec3-2308-43f7-8b26-8a6bb2d414de\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databases/sql-audit-cmdlet-db501\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501/sql-audit-cmdlet-db501\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799856" + ], + "x-ms-request-id": [ + "78c6a637-748a-4a69-a433-e92d2c714162" + ], + "x-ms-correlation-request-id": [ + "78c6a637-748a-4a69-a433-e92d2c714162" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211243Z:78c6a637-748a-4a69-a433-e92d2c714162" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db501\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server501\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:11:44.6267503Z\",\r\n \"correlationId\": \"1bbefec3-2308-43f7-8b26-8a6bb2d414de\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databases/sql-audit-cmdlet-db501\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501/sql-audit-cmdlet-db501\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799854" + ], + "x-ms-request-id": [ + "5db795a1-c731-44c1-9990-3f433f16b0aa" + ], + "x-ms-correlation-request-id": [ + "5db795a1-c731-44c1-9990-3f433f16b0aa" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211247Z:5db795a1-c731-44c1-9990-3f433f16b0aa" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db501\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server501\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:11:44.6267503Z\",\r\n \"correlationId\": \"1bbefec3-2308-43f7-8b26-8a6bb2d414de\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databases/sql-audit-cmdlet-db501\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501/sql-audit-cmdlet-db501\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799852" + ], + "x-ms-request-id": [ + "b1f2f456-35ba-4998-9872-3cd6c3c30a0f" + ], + "x-ms-correlation-request-id": [ + "b1f2f456-35ba-4998-9872-3cd6c3c30a0f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211250Z:b1f2f456-35ba-4998-9872-3cd6c3c30a0f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db501\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server501\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:12:51.6536297Z\",\r\n \"correlationId\": \"1bbefec3-2308-43f7-8b26-8a6bb2d414de\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databases/sql-audit-cmdlet-db501\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server501/sql-audit-cmdlet-db501\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1626" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799850" + ], + "x-ms-request-id": [ + "ef3489d5-ae6f-492b-87fd-5ceab26c811f" + ], + "x-ms-correlation-request-id": [ + "ef3489d5-ae6f-492b-87fd-5ceab26c811f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211253Z:ef3489d5-ae6f-492b-87fd-5ceab26c811f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501\",\r\n \"name\": \"sql-audit-cmdlet-server501\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databases/sql-audit-cmdlet-db501\",\r\n \"name\": \"sql-audit-cmdlet-server501/sql-audit-cmdlet-db501\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "577" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799849" + ], + "x-ms-request-id": [ + "17f5f5fd-1731-46cd-be6a-01faf8050883" + ], + "x-ms-correlation-request-id": [ + "17f5f5fd-1731-46cd-be6a-01faf8050883" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211255Z:17f5f5fd-1731-46cd-be6a-01faf8050883" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westeurope:1d113616-c13b-4c69-9deb-547296a64e24" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799848" + ], + "x-ms-correlation-request-id": [ + "bb1d01be-c3bf-4d08-9479-2097b9e85c5f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211256Z:bb1d01be-c3bf-4d08-9479-2097b9e85c5f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:56 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databaseSecurityPolicies/sql-audit-cmdlet-db501?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNTAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNTAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "9c53d151-126d-4311-abac-376016311d03-2014-10-31 21:12:58Z" + ], + "x-ms-client-request-id": [ + "de17344c-0a48-4493-95ef-f8319e485c08-2014-10-31 21:12:58Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets501\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets501.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server501.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db501;User ID={0}@sql-audit-cmdlet-server501;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server501.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db501;Uid={0}@sql-audit-cmdlet-server501;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server501.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db501\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server501.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db501\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server501\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db501\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server501.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server501.database.secure.windows.net:1433;database=sql-audit-cmdlet-db501;user={0}@sql-audit-cmdlet-server501;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server501.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databaseSecurityPolicies/sql-audit-cmdlet-db501\",\r\n \"name\": \"sql-audit-cmdlet-db501\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2817" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "111f1962-a9fe-468d-9ba6-f41e6972ef59" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799848" + ], + "x-ms-correlation-request-id": [ + "9f95fc1a-a64c-49f9-8300-1c755808ed60" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211259Z:9f95fc1a-a64c-49f9-8300-1c755808ed60" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:58 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databaseSecurityPolicies/sql-audit-cmdlet-db501?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNTAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNTAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "9c53d151-126d-4311-abac-376016311d03-2014-10-31 21:12:58Z" + ], + "x-ms-client-request-id": [ + "246eab93-75d3-4348-ad98-60afdfe40939-2014-10-31 21:13:05Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets501\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets501.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server501.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db501;User ID={0}@sql-audit-cmdlet-server501;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server501.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db501;Uid={0}@sql-audit-cmdlet-server501;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server501.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db501\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server501.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db501\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server501\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db501\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server501.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server501.database.secure.windows.net:1433;database=sql-audit-cmdlet-db501;user={0}@sql-audit-cmdlet-server501;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server501.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databaseSecurityPolicies/sql-audit-cmdlet-db501\",\r\n \"name\": \"sql-audit-cmdlet-db501\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2812" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "68a4ce49-245e-419d-bb8b-3b11de3afba2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799847" + ], + "x-ms-correlation-request-id": [ + "bd4a370f-e98b-4d11-b8fd-fe48a791b301" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211306Z:bd4a370f-e98b-4d11-b8fd-fe48a791b301" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:13:05 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databaseSecurityPolicies/sql-audit-cmdlet-db501?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNTAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNTAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "9c53d151-126d-4311-abac-376016311d03-2014-10-31 21:12:58Z" + ], + "x-ms-client-request-id": [ + "263f7391-2db2-4e30-ace8-f9daf60dc56e-2014-10-31 21:13:07Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets501\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets501.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server501.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db501;User ID={0}@sql-audit-cmdlet-server501;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server501.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db501;Uid={0}@sql-audit-cmdlet-server501;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server501.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db501\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server501.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db501\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server501\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db501\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server501.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server501.database.secure.windows.net:1433;database=sql-audit-cmdlet-db501;user={0}@sql-audit-cmdlet-server501;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server501.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databaseSecurityPolicies/sql-audit-cmdlet-db501\",\r\n \"name\": \"sql-audit-cmdlet-db501\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2812" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "7518ee61-d339-4fe3-8b03-f42be5e9c14b" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799846" + ], + "x-ms-correlation-request-id": [ + "93d22ad5-f935-4d8b-9217-5510291bdc35" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211307Z:93d22ad5-f935-4d8b-9217-5510291bdc35" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:13:06 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databaseSecurityPolicies/sql-audit-cmdlet-db501?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNTAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNTAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "9c53d151-126d-4311-abac-376016311d03-2014-10-31 21:12:58Z" + ], + "x-ms-client-request-id": [ + "bfad672d-4143-447c-9573-3b69e9c7a621-2014-10-31 21:13:12Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets501\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets501.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server501.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db501;User ID={0}@sql-audit-cmdlet-server501;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server501.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db501;Uid={0}@sql-audit-cmdlet-server501;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server501.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db501\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server501.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db501\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server501\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db501\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server501.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server501.database.secure.windows.net:1433;database=sql-audit-cmdlet-db501;user={0}@sql-audit-cmdlet-server501;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server501.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databaseSecurityPolicies/sql-audit-cmdlet-db501\",\r\n \"name\": \"sql-audit-cmdlet-db501\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2814" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "25f47e0b-dc07-4094-851a-4c54573589cd" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799845" + ], + "x-ms-correlation-request-id": [ + "cbf36397-35e9-4edf-adf2-6e91b833f213" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211312Z:cbf36397-35e9-4edf-adf2-6e91b833f213" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:13:12 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databaseSecurityPolicies/sql-audit-cmdlet-db501?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNTAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNTAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "9c53d151-126d-4311-abac-376016311d03-2014-10-31 21:12:58Z" + ], + "x-ms-client-request-id": [ + "04346252-7342-4480-aa8a-43c01dae7cbc-2014-10-31 21:13:14Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets501\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets501.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server501.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db501;User ID={0}@sql-audit-cmdlet-server501;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server501.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db501;Uid={0}@sql-audit-cmdlet-server501;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server501.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db501\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server501.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db501\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server501\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db501\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server501.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server501.database.secure.windows.net:1433;database=sql-audit-cmdlet-db501;user={0}@sql-audit-cmdlet-server501;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server501.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databaseSecurityPolicies/sql-audit-cmdlet-db501\",\r\n \"name\": \"sql-audit-cmdlet-db501\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2814" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "9e457f91-ac10-411e-ba51-2e99b692b214" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799844" + ], + "x-ms-correlation-request-id": [ + "40c537f6-b36d-4de6-bbb6-0b2e98afa7cf" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211315Z:40c537f6-b36d-4de6-bbb6-0b2e98afa7cf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:13:14 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databaseSecurityPolicies/sql-audit-cmdlet-db501?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNTAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNTAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "9c53d151-126d-4311-abac-376016311d03-2014-10-31 21:12:58Z" + ], + "x-ms-client-request-id": [ + "addd7ed0-14fe-4427-8519-b6ae8a736cca-2014-10-31 21:13:19Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets501\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets501.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server501.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db501;User ID={0}@sql-audit-cmdlet-server501;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server501.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db501;Uid={0}@sql-audit-cmdlet-server501;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server501.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db501\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server501.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db501\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server501\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db501\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server501.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server501.database.secure.windows.net:1433;database=sql-audit-cmdlet-db501;user={0}@sql-audit-cmdlet-server501;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server501.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databaseSecurityPolicies/sql-audit-cmdlet-db501\",\r\n \"name\": \"sql-audit-cmdlet-db501\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2817" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "9c9f5be1-08eb-441d-bc42-f7e5a6db4086" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799843" + ], + "x-ms-correlation-request-id": [ + "46ae0c92-ee48-473b-86ff-af7d7b0f2ea8" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211319Z:46ae0c92-ee48-473b-86ff-af7d7b0f2ea8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:13:19 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets501/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzNTAxL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "9c53d151-126d-4311-abac-376016311d03-2014-10-31 21:12:58Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"stSb1ft73rjvOml0UYMu3JdDDRX3g+q+OGQKfxWlyzzCU9MHP3xmgvtybQDXh8iqQiPoEy3Uewz2HuwkIKNwtA==\",\r\n \"secondaryKey\": \"jBriF7kkChFAtYGOHhpm/kGMCHVgPwazKZBemttOWLtSXNjPJLB2+rqcZPicwJQL4EXLQaTDXQT34sOlbgrjYQ==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:dbcc5d52-8dfc-45bc-ab2f-5dd979703551" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11985" + ], + "x-ms-correlation-request-id": [ + "a76c1bed-194e-4ef4-b63e-98d572cfe6ff" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211300Z:a76c1bed-194e-4ef4-b63e-98d572cfe6ff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:12:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets501/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzNTAxL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "9c53d151-126d-4311-abac-376016311d03-2014-10-31 21:12:58Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"stSb1ft73rjvOml0UYMu3JdDDRX3g+q+OGQKfxWlyzzCU9MHP3xmgvtybQDXh8iqQiPoEy3Uewz2HuwkIKNwtA==\",\r\n \"secondaryKey\": \"jBriF7kkChFAtYGOHhpm/kGMCHVgPwazKZBemttOWLtSXNjPJLB2+rqcZPicwJQL4EXLQaTDXQT34sOlbgrjYQ==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:a5ef6609-174b-40a2-bb26-7d212e05cb51" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11983" + ], + "x-ms-correlation-request-id": [ + "c58ad603-a376-46c4-be08-9f2465997eb0" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211308Z:c58ad603-a376-46c4-be08-9f2465997eb0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:13:08 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets501/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzNTAxL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "9c53d151-126d-4311-abac-376016311d03-2014-10-31 21:12:58Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"stSb1ft73rjvOml0UYMu3JdDDRX3g+q+OGQKfxWlyzzCU9MHP3xmgvtybQDXh8iqQiPoEy3Uewz2HuwkIKNwtA==\",\r\n \"secondaryKey\": \"jBriF7kkChFAtYGOHhpm/kGMCHVgPwazKZBemttOWLtSXNjPJLB2+rqcZPicwJQL4EXLQaTDXQT34sOlbgrjYQ==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:b9ac3d4e-bd99-428e-bd1a-3eb96dedd222" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11981" + ], + "x-ms-correlation-request-id": [ + "495a0f6c-3885-4a66-845c-cd21cb4ebce1" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211315Z:495a0f6c-3885-4a66-845c-cd21cb4ebce1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:13:15 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databaseSecurityPolicies/sql-audit-cmdlet-db501?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNTAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNTAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets501\",\r\n \"storageAccountKey\": \"stSb1ft73rjvOml0UYMu3JdDDRX3g+q+OGQKfxWlyzzCU9MHP3xmgvtybQDXh8iqQiPoEy3Uewz2HuwkIKNwtA==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets501.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "784" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "9c53d151-126d-4311-abac-376016311d03-2014-10-31 21:12:58Z" + ], + "x-ms-client-request-id": [ + "de17344c-0a48-4493-95ef-f8319e485c08-2014-10-31 21:12:58Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets501\",\r\n \"storageAccountKey\": \"stSb1ft73rjvOml0UYMu3JdDDRX3g+q+OGQKfxWlyzzCU9MHP3xmgvtybQDXh8iqQiPoEy3Uewz2HuwkIKNwtA==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets501.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databaseSecurityPolicies/sql-audit-cmdlet-db501\",\r\n \"name\": \"sql-audit-cmdlet-db501\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1155" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "9ccd2188-8e51-402b-9519-3f34dc13380a" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11984" + ], + "x-ms-correlation-request-id": [ + "06cd57c0-ebd4-4a82-b58c-6e9d53f50e52" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211304Z:06cd57c0-ebd4-4a82-b58c-6e9d53f50e52" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:13:03 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databaseSecurityPolicies/sql-audit-cmdlet-db501?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNTAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNTAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets501\",\r\n \"storageAccountKey\": \"stSb1ft73rjvOml0UYMu3JdDDRX3g+q+OGQKfxWlyzzCU9MHP3xmgvtybQDXh8iqQiPoEy3Uewz2HuwkIKNwtA==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets501.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "786" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "9c53d151-126d-4311-abac-376016311d03-2014-10-31 21:12:58Z" + ], + "x-ms-client-request-id": [ + "263f7391-2db2-4e30-ace8-f9daf60dc56e-2014-10-31 21:13:07Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets501\",\r\n \"storageAccountKey\": \"stSb1ft73rjvOml0UYMu3JdDDRX3g+q+OGQKfxWlyzzCU9MHP3xmgvtybQDXh8iqQiPoEy3Uewz2HuwkIKNwtA==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets501.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databaseSecurityPolicies/sql-audit-cmdlet-db501\",\r\n \"name\": \"sql-audit-cmdlet-db501\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1157" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "b5df1a0d-4d91-439d-91e2-519cfe071308" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11982" + ], + "x-ms-correlation-request-id": [ + "af1c29b7-a1d9-4e71-a14e-90f9105e029c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211311Z:af1c29b7-a1d9-4e71-a14e-90f9105e029c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:13:11 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databaseSecurityPolicies/sql-audit-cmdlet-db501?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzUwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNTAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiNTAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets501\",\r\n \"storageAccountKey\": \"stSb1ft73rjvOml0UYMu3JdDDRX3g+q+OGQKfxWlyzzCU9MHP3xmgvtybQDXh8iqQiPoEy3Uewz2HuwkIKNwtA==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets501.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "789" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "9c53d151-126d-4311-abac-376016311d03-2014-10-31 21:12:58Z" + ], + "x-ms-client-request-id": [ + "04346252-7342-4480-aa8a-43c01dae7cbc-2014-10-31 21:13:14Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets501\",\r\n \"storageAccountKey\": \"stSb1ft73rjvOml0UYMu3JdDDRX3g+q+OGQKfxWlyzzCU9MHP3xmgvtybQDXh8iqQiPoEy3Uewz2HuwkIKNwtA==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets501.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg501/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server501/databaseSecurityPolicies/sql-audit-cmdlet-db501\",\r\n \"name\": \"sql-audit-cmdlet-db501\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1160" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "6ba9cf03-852d-481d-b5e8-9f9ce892f4f8" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11980" + ], + "x-ms-correlation-request-id": [ + "ca2726cd-9c3d-411a-9ece-cae3bd73096b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211318Z:ca2726cd-9c3d-411a-9ece-cae3bd73096b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:13:17 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices/auditcmdlets501", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXMvYXVkaXRjbWRsZXRzNTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "11861ff11ce520df84e6b535c4366fb7" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:13:25 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/11861ff11ce520df84e6b535c4366fb7", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zLzExODYxZmYxMWNlNTIwZGY4NGU2YjUzNWM0MzY2ZmI3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/2.0.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "\r\n 11861ff1-1ce5-20df-84e6-b535c4366fb7\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "5d5df7875026269bbd18e0db4eea3f38" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:13:26 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "cca24ec8-99b5-4aa7-9ff6-486e886f304c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestDatabaseUpdatePolicyWithStorage.json b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestDatabaseUpdatePolicyWithStorage.json new file mode 100644 index 000000000000..d34a4380c377 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestDatabaseUpdatePolicyWithStorage.json @@ -0,0 +1,2981 @@ +{ + "Entries": [ + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXM=", + "RequestMethod": "POST", + "RequestBody": "\r\n auditcmdlets101\r\n \r\n \r\n West US\r\n \r\n Standard_GRS\r\n", + "RequestHeaders": { + "Content-Type": [ + "application/xml" + ], + "Content-Length": [ + "379" + ], + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "266" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "c7fb2c7a35692be986f39c9d472a4ff7" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:07:40 GMT" + ], + "Location": [ + "https://management.core.windows.net/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/storage/auditcmdlets101" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/c7fb2c7a35692be986f39c9d472a4ff7", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zL2M3ZmIyYzdhMzU2OTJiZTk4NmYzOWM5ZDQ3MmE0ZmY3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "266" + ] + }, + "ResponseBody": "\r\n c7fb2c7a-3569-2be9-86f3-9c9d472a4ff7\r\n InProgress\r\n", + "ResponseHeaders": { + "Content-Length": [ + "197" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "cda6a4fc520221e4bf0ef41733913b5c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:07:41 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/c7fb2c7a35692be986f39c9d472a4ff7", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zL2M3ZmIyYzdhMzU2OTJiZTk4NmYzOWM5ZDQ3MmE0ZmY3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "266" + ] + }, + "ResponseBody": "\r\n c7fb2c7a-3569-2be9-86f3-9c9d472a4ff7\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "a86cfeee5dd2253c8ccfe20c87aeeeb8" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:08:12 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "119" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799946" + ], + "x-ms-request-id": [ + "34a1c3ec-27cd-4b0e-8bbd-c0497225028d" + ], + "x-ms-correlation-request-id": [ + "34a1c3ec-27cd-4b0e-8bbd-c0497225028d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210813Z:34a1c3ec-27cd-4b0e-8bbd-c0497225028d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:08:12 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101\",\r\n \"name\": \"sql-audit-cmdlet-test-rg101\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "217" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11993" + ], + "x-ms-request-id": [ + "d56571cf-16d0-4f6e-b8cc-0556738c35b5" + ], + "x-ms-correlation-request-id": [ + "d56571cf-16d0-4f6e-b8cc-0556738c35b5" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210815Z:d56571cf-16d0-4f6e-b8cc-0556738c35b5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:08:15 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup/validate?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvdmFsaWRhdGU/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db101\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server101\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db101\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server101\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:08:16.2537185Z\",\r\n \"correlationId\": \"39920cd5-7745-4d05-900c-62c44cde5dcc\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databases/sql-audit-cmdlet-db101\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101/sql-audit-cmdlet-db101\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11992" + ], + "x-ms-request-id": [ + "39920cd5-7745-4d05-900c-62c44cde5dcc" + ], + "x-ms-correlation-request-id": [ + "39920cd5-7745-4d05-900c-62c44cde5dcc" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210816Z:39920cd5-7745-4d05-900c-62c44cde5dcc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:08:16 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db101\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server101\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db101\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server101\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:08:18.0125379Z\",\r\n \"correlationId\": \"b006bf98-c8f6-476a-8c67-0d567eedf5f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databases/sql-audit-cmdlet-db101\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101/sql-audit-cmdlet-db101\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11991" + ], + "x-ms-request-id": [ + "b006bf98-c8f6-476a-8c67-0d567eedf5f3" + ], + "x-ms-correlation-request-id": [ + "b006bf98-c8f6-476a-8c67-0d567eedf5f3" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210818Z:b006bf98-c8f6-476a-8c67-0d567eedf5f3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:08:17 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799945" + ], + "x-ms-request-id": [ + "5cb7d02c-f7b1-4d70-ac35-71bbd1b3e54c" + ], + "x-ms-correlation-request-id": [ + "5cb7d02c-f7b1-4d70-ac35-71bbd1b3e54c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210819Z:5cb7d02c-f7b1-4d70-ac35-71bbd1b3e54c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:08:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799943" + ], + "x-ms-request-id": [ + "11b9454d-cb02-4bde-9b24-00fda9f86202" + ], + "x-ms-correlation-request-id": [ + "11b9454d-cb02-4bde-9b24-00fda9f86202" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210822Z:11b9454d-cb02-4bde-9b24-00fda9f86202" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:08:21 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799941" + ], + "x-ms-request-id": [ + "0652ff8e-4d69-4524-aabe-fa6cb4460142" + ], + "x-ms-correlation-request-id": [ + "0652ff8e-4d69-4524-aabe-fa6cb4460142" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210825Z:0652ff8e-4d69-4524-aabe-fa6cb4460142" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:08:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799939" + ], + "x-ms-request-id": [ + "4a5c3ffc-bee9-4386-bb09-08d0c7c97a1a" + ], + "x-ms-correlation-request-id": [ + "4a5c3ffc-bee9-4386-bb09-08d0c7c97a1a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210828Z:4a5c3ffc-bee9-4386-bb09-08d0c7c97a1a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:08:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799937" + ], + "x-ms-request-id": [ + "29634068-67e7-45b8-8f38-694d79e42b3b" + ], + "x-ms-correlation-request-id": [ + "29634068-67e7-45b8-8f38-694d79e42b3b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210831Z:29634068-67e7-45b8-8f38-694d79e42b3b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:08:31 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799935" + ], + "x-ms-request-id": [ + "9d74dc45-e41b-4a11-871d-936b93667a20" + ], + "x-ms-correlation-request-id": [ + "9d74dc45-e41b-4a11-871d-936b93667a20" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210834Z:9d74dc45-e41b-4a11-871d-936b93667a20" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:08:34 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799933" + ], + "x-ms-request-id": [ + "63a538da-8a6c-4a9f-9cd2-b7900b55ebfb" + ], + "x-ms-correlation-request-id": [ + "63a538da-8a6c-4a9f-9cd2-b7900b55ebfb" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210838Z:63a538da-8a6c-4a9f-9cd2-b7900b55ebfb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:08:38 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799931" + ], + "x-ms-request-id": [ + "5630aeba-3c5e-492f-9da2-bb6ec8865a03" + ], + "x-ms-correlation-request-id": [ + "5630aeba-3c5e-492f-9da2-bb6ec8865a03" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210841Z:5630aeba-3c5e-492f-9da2-bb6ec8865a03" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:08:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799929" + ], + "x-ms-request-id": [ + "dd2004f0-15db-4141-aeef-7a9d764b8122" + ], + "x-ms-correlation-request-id": [ + "dd2004f0-15db-4141-aeef-7a9d764b8122" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210844Z:dd2004f0-15db-4141-aeef-7a9d764b8122" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:08:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799927" + ], + "x-ms-request-id": [ + "6d22b3ce-3738-40a3-99f3-4ec1b8de1c42" + ], + "x-ms-correlation-request-id": [ + "6d22b3ce-3738-40a3-99f3-4ec1b8de1c42" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210848Z:6d22b3ce-3738-40a3-99f3-4ec1b8de1c42" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:08:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799925" + ], + "x-ms-request-id": [ + "d145d76a-d352-469c-84f3-b28a70a58960" + ], + "x-ms-correlation-request-id": [ + "d145d76a-d352-469c-84f3-b28a70a58960" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210851Z:d145d76a-d352-469c-84f3-b28a70a58960" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:08:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799923" + ], + "x-ms-request-id": [ + "f3db22b5-b86e-453d-a226-93caf6beaf5e" + ], + "x-ms-correlation-request-id": [ + "f3db22b5-b86e-453d-a226-93caf6beaf5e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210854Z:f3db22b5-b86e-453d-a226-93caf6beaf5e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:08:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799921" + ], + "x-ms-request-id": [ + "e1172c15-f3e6-4d6b-aa61-67cfac0b168c" + ], + "x-ms-correlation-request-id": [ + "e1172c15-f3e6-4d6b-aa61-67cfac0b168c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210857Z:e1172c15-f3e6-4d6b-aa61-67cfac0b168c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:08:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799919" + ], + "x-ms-request-id": [ + "c3c4f813-24ab-4142-b6b8-764a5e4e51c6" + ], + "x-ms-correlation-request-id": [ + "c3c4f813-24ab-4142-b6b8-764a5e4e51c6" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210900Z:c3c4f813-24ab-4142-b6b8-764a5e4e51c6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:09:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799917" + ], + "x-ms-request-id": [ + "15da2755-d371-41f2-a270-ed9858509542" + ], + "x-ms-correlation-request-id": [ + "15da2755-d371-41f2-a270-ed9858509542" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210904Z:15da2755-d371-41f2-a270-ed9858509542" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:09:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799915" + ], + "x-ms-request-id": [ + "5cf31543-489d-4746-ac61-c8aa55bbac6d" + ], + "x-ms-correlation-request-id": [ + "5cf31543-489d-4746-ac61-c8aa55bbac6d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210907Z:5cf31543-489d-4746-ac61-c8aa55bbac6d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:09:07 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799913" + ], + "x-ms-request-id": [ + "c6b0c5c2-6f57-48b4-adc2-4581a36ed1b6" + ], + "x-ms-correlation-request-id": [ + "c6b0c5c2-6f57-48b4-adc2-4581a36ed1b6" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210910Z:c6b0c5c2-6f57-48b4-adc2-4581a36ed1b6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:09:09 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799911" + ], + "x-ms-request-id": [ + "c46dc78f-ad4f-4beb-9314-eb1c4b7059e9" + ], + "x-ms-correlation-request-id": [ + "c46dc78f-ad4f-4beb-9314-eb1c4b7059e9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210913Z:c46dc78f-ad4f-4beb-9314-eb1c4b7059e9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:09:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup/operations/A012755FF82A4EF4\",\r\n \"operationId\": \"A012755FF82A4EF4\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:09:16.507131Z\",\r\n \"trackingId\": \"2023466c-aab3-477e-975c-47e3f91d00fc\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "640" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799909" + ], + "x-ms-request-id": [ + "2682b132-63d3-4f56-8ede-58cd29daa9c6" + ], + "x-ms-correlation-request-id": [ + "2682b132-63d3-4f56-8ede-58cd29daa9c6" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210916Z:2682b132-63d3-4f56-8ede-58cd29daa9c6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:09:16 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup/operations/A012755FF82A4EF4\",\r\n \"operationId\": \"A012755FF82A4EF4\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:09:16.507131Z\",\r\n \"trackingId\": \"2023466c-aab3-477e-975c-47e3f91d00fc\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "640" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799907" + ], + "x-ms-request-id": [ + "1d295ad1-e11e-47fd-bbc1-006a5c8988e4" + ], + "x-ms-correlation-request-id": [ + "1d295ad1-e11e-47fd-bbc1-006a5c8988e4" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210919Z:1d295ad1-e11e-47fd-bbc1-006a5c8988e4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:09:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup/operations/AE9DE859643E3D34\",\r\n \"operationId\": \"AE9DE859643E3D34\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:09:22.8160247Z\",\r\n \"trackingId\": \"3da231be-fcf1-459b-acd5-3b38c2faf6c8\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databases/sql-audit-cmdlet-db101\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101/sql-audit-cmdlet-db101\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup/operations/A012755FF82A4EF4\",\r\n \"operationId\": \"A012755FF82A4EF4\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:09:16.507131Z\",\r\n \"trackingId\": \"2023466c-aab3-477e-975c-47e3f91d00fc\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1336" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799905" + ], + "x-ms-request-id": [ + "a6022164-6982-4a3c-af9d-80dddcab45bf" + ], + "x-ms-correlation-request-id": [ + "a6022164-6982-4a3c-af9d-80dddcab45bf" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210923Z:a6022164-6982-4a3c-af9d-80dddcab45bf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:09:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup/operations/AE9DE859643E3D34\",\r\n \"operationId\": \"AE9DE859643E3D34\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:09:22.8160247Z\",\r\n \"trackingId\": \"3da231be-fcf1-459b-acd5-3b38c2faf6c8\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databases/sql-audit-cmdlet-db101\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101/sql-audit-cmdlet-db101\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup/operations/A012755FF82A4EF4\",\r\n \"operationId\": \"A012755FF82A4EF4\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:09:16.507131Z\",\r\n \"trackingId\": \"2023466c-aab3-477e-975c-47e3f91d00fc\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1336" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799903" + ], + "x-ms-request-id": [ + "088e6ea1-b4e8-4e55-8363-431900b09c2a" + ], + "x-ms-correlation-request-id": [ + "088e6ea1-b4e8-4e55-8363-431900b09c2a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210926Z:088e6ea1-b4e8-4e55-8363-431900b09c2a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:09:25 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup/operations/AE9DE859643E3D34\",\r\n \"operationId\": \"AE9DE859643E3D34\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:09:22.8160247Z\",\r\n \"trackingId\": \"3da231be-fcf1-459b-acd5-3b38c2faf6c8\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databases/sql-audit-cmdlet-db101\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101/sql-audit-cmdlet-db101\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup/operations/A012755FF82A4EF4\",\r\n \"operationId\": \"A012755FF82A4EF4\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:09:16.507131Z\",\r\n \"trackingId\": \"2023466c-aab3-477e-975c-47e3f91d00fc\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1336" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799901" + ], + "x-ms-request-id": [ + "e77c77bd-b22c-4e6e-985d-0a4830120759" + ], + "x-ms-correlation-request-id": [ + "e77c77bd-b22c-4e6e-985d-0a4830120759" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210929Z:e77c77bd-b22c-4e6e-985d-0a4830120759" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:09:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db101\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server101\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:08:18.0125379Z\",\r\n \"correlationId\": \"b006bf98-c8f6-476a-8c67-0d567eedf5f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databases/sql-audit-cmdlet-db101\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101/sql-audit-cmdlet-db101\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799944" + ], + "x-ms-request-id": [ + "585cceef-327c-4aa2-b288-dffeeba5923d" + ], + "x-ms-correlation-request-id": [ + "585cceef-327c-4aa2-b288-dffeeba5923d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210819Z:585cceef-327c-4aa2-b288-dffeeba5923d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:08:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db101\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server101\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:08:20.7942042Z\",\r\n \"correlationId\": \"b006bf98-c8f6-476a-8c67-0d567eedf5f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databases/sql-audit-cmdlet-db101\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101/sql-audit-cmdlet-db101\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799942" + ], + "x-ms-request-id": [ + "62ea1991-f367-4828-bc17-14dc76411176" + ], + "x-ms-correlation-request-id": [ + "62ea1991-f367-4828-bc17-14dc76411176" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210822Z:62ea1991-f367-4828-bc17-14dc76411176" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:08:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db101\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server101\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:08:20.7942042Z\",\r\n \"correlationId\": \"b006bf98-c8f6-476a-8c67-0d567eedf5f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databases/sql-audit-cmdlet-db101\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101/sql-audit-cmdlet-db101\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799940" + ], + "x-ms-request-id": [ + "157cbd7b-c1dc-4717-9869-f2adcaed6076" + ], + "x-ms-correlation-request-id": [ + "157cbd7b-c1dc-4717-9869-f2adcaed6076" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210825Z:157cbd7b-c1dc-4717-9869-f2adcaed6076" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:08:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db101\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server101\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:08:20.7942042Z\",\r\n \"correlationId\": \"b006bf98-c8f6-476a-8c67-0d567eedf5f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databases/sql-audit-cmdlet-db101\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101/sql-audit-cmdlet-db101\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799938" + ], + "x-ms-request-id": [ + "d5340984-d997-4624-8547-c9c929622b43" + ], + "x-ms-correlation-request-id": [ + "d5340984-d997-4624-8547-c9c929622b43" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210829Z:d5340984-d997-4624-8547-c9c929622b43" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:08:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db101\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server101\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:08:20.7942042Z\",\r\n \"correlationId\": \"b006bf98-c8f6-476a-8c67-0d567eedf5f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databases/sql-audit-cmdlet-db101\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101/sql-audit-cmdlet-db101\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799936" + ], + "x-ms-request-id": [ + "e1ee3a0c-393e-4d5c-99a1-7e3783fb60b0" + ], + "x-ms-correlation-request-id": [ + "e1ee3a0c-393e-4d5c-99a1-7e3783fb60b0" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210832Z:e1ee3a0c-393e-4d5c-99a1-7e3783fb60b0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:08:31 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db101\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server101\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:08:20.7942042Z\",\r\n \"correlationId\": \"b006bf98-c8f6-476a-8c67-0d567eedf5f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databases/sql-audit-cmdlet-db101\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101/sql-audit-cmdlet-db101\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799934" + ], + "x-ms-request-id": [ + "20f621db-68d0-430f-9c8b-db03cfc2b5b6" + ], + "x-ms-correlation-request-id": [ + "20f621db-68d0-430f-9c8b-db03cfc2b5b6" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210835Z:20f621db-68d0-430f-9c8b-db03cfc2b5b6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:08:34 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db101\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server101\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:08:20.7942042Z\",\r\n \"correlationId\": \"b006bf98-c8f6-476a-8c67-0d567eedf5f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databases/sql-audit-cmdlet-db101\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101/sql-audit-cmdlet-db101\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799932" + ], + "x-ms-request-id": [ + "fdec35a7-ff33-47a5-ae40-1dea4b45b370" + ], + "x-ms-correlation-request-id": [ + "fdec35a7-ff33-47a5-ae40-1dea4b45b370" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210838Z:fdec35a7-ff33-47a5-ae40-1dea4b45b370" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:08:38 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db101\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server101\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:08:20.7942042Z\",\r\n \"correlationId\": \"b006bf98-c8f6-476a-8c67-0d567eedf5f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databases/sql-audit-cmdlet-db101\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101/sql-audit-cmdlet-db101\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799930" + ], + "x-ms-request-id": [ + "9b368758-294e-4e4a-84d0-979ba7efe058" + ], + "x-ms-correlation-request-id": [ + "9b368758-294e-4e4a-84d0-979ba7efe058" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210841Z:9b368758-294e-4e4a-84d0-979ba7efe058" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:08:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db101\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server101\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:08:20.7942042Z\",\r\n \"correlationId\": \"b006bf98-c8f6-476a-8c67-0d567eedf5f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databases/sql-audit-cmdlet-db101\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101/sql-audit-cmdlet-db101\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799928" + ], + "x-ms-request-id": [ + "0533a546-16fd-4227-9ea1-d25e1cbd40bf" + ], + "x-ms-correlation-request-id": [ + "0533a546-16fd-4227-9ea1-d25e1cbd40bf" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210845Z:0533a546-16fd-4227-9ea1-d25e1cbd40bf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:08:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db101\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server101\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:08:20.7942042Z\",\r\n \"correlationId\": \"b006bf98-c8f6-476a-8c67-0d567eedf5f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databases/sql-audit-cmdlet-db101\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101/sql-audit-cmdlet-db101\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799926" + ], + "x-ms-request-id": [ + "78eb61a7-b5d6-436e-a3aa-3cfea98e30de" + ], + "x-ms-correlation-request-id": [ + "78eb61a7-b5d6-436e-a3aa-3cfea98e30de" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210848Z:78eb61a7-b5d6-436e-a3aa-3cfea98e30de" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:08:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db101\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server101\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:08:20.7942042Z\",\r\n \"correlationId\": \"b006bf98-c8f6-476a-8c67-0d567eedf5f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databases/sql-audit-cmdlet-db101\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101/sql-audit-cmdlet-db101\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799924" + ], + "x-ms-request-id": [ + "ee478cef-062f-46f4-a242-2422b22512d0" + ], + "x-ms-correlation-request-id": [ + "ee478cef-062f-46f4-a242-2422b22512d0" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210851Z:ee478cef-062f-46f4-a242-2422b22512d0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:08:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db101\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server101\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:08:20.7942042Z\",\r\n \"correlationId\": \"b006bf98-c8f6-476a-8c67-0d567eedf5f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databases/sql-audit-cmdlet-db101\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101/sql-audit-cmdlet-db101\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799922" + ], + "x-ms-request-id": [ + "0512c81e-06fa-4b11-a31d-d4e8a48d8fa5" + ], + "x-ms-correlation-request-id": [ + "0512c81e-06fa-4b11-a31d-d4e8a48d8fa5" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210855Z:0512c81e-06fa-4b11-a31d-d4e8a48d8fa5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:08:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db101\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server101\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:08:20.7942042Z\",\r\n \"correlationId\": \"b006bf98-c8f6-476a-8c67-0d567eedf5f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databases/sql-audit-cmdlet-db101\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101/sql-audit-cmdlet-db101\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799920" + ], + "x-ms-request-id": [ + "82332896-7531-42e1-a6e4-548b9949dbf4" + ], + "x-ms-correlation-request-id": [ + "82332896-7531-42e1-a6e4-548b9949dbf4" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210858Z:82332896-7531-42e1-a6e4-548b9949dbf4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:08:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db101\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server101\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:08:20.7942042Z\",\r\n \"correlationId\": \"b006bf98-c8f6-476a-8c67-0d567eedf5f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databases/sql-audit-cmdlet-db101\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101/sql-audit-cmdlet-db101\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799918" + ], + "x-ms-request-id": [ + "ee47de6a-8e62-4d87-86ba-5832c2341014" + ], + "x-ms-correlation-request-id": [ + "ee47de6a-8e62-4d87-86ba-5832c2341014" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210901Z:ee47de6a-8e62-4d87-86ba-5832c2341014" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:09:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db101\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server101\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:08:20.7942042Z\",\r\n \"correlationId\": \"b006bf98-c8f6-476a-8c67-0d567eedf5f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databases/sql-audit-cmdlet-db101\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101/sql-audit-cmdlet-db101\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799916" + ], + "x-ms-request-id": [ + "ffe82602-5e1f-47ee-82bf-84261aab2b1e" + ], + "x-ms-correlation-request-id": [ + "ffe82602-5e1f-47ee-82bf-84261aab2b1e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210904Z:ffe82602-5e1f-47ee-82bf-84261aab2b1e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:09:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db101\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server101\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:08:20.7942042Z\",\r\n \"correlationId\": \"b006bf98-c8f6-476a-8c67-0d567eedf5f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databases/sql-audit-cmdlet-db101\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101/sql-audit-cmdlet-db101\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799914" + ], + "x-ms-request-id": [ + "3445125e-d7da-4887-9389-4f3eeb1fa6bc" + ], + "x-ms-correlation-request-id": [ + "3445125e-d7da-4887-9389-4f3eeb1fa6bc" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210907Z:3445125e-d7da-4887-9389-4f3eeb1fa6bc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:09:07 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db101\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server101\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:08:20.7942042Z\",\r\n \"correlationId\": \"b006bf98-c8f6-476a-8c67-0d567eedf5f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databases/sql-audit-cmdlet-db101\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101/sql-audit-cmdlet-db101\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799912" + ], + "x-ms-request-id": [ + "cdf2c072-b548-42ed-88f7-b3fcf4289306" + ], + "x-ms-correlation-request-id": [ + "cdf2c072-b548-42ed-88f7-b3fcf4289306" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210910Z:cdf2c072-b548-42ed-88f7-b3fcf4289306" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:09:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db101\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server101\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:08:20.7942042Z\",\r\n \"correlationId\": \"b006bf98-c8f6-476a-8c67-0d567eedf5f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databases/sql-audit-cmdlet-db101\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101/sql-audit-cmdlet-db101\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799910" + ], + "x-ms-request-id": [ + "d6fc5ed4-c871-4979-80e8-e4e2682c3f52" + ], + "x-ms-correlation-request-id": [ + "d6fc5ed4-c871-4979-80e8-e4e2682c3f52" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210914Z:d6fc5ed4-c871-4979-80e8-e4e2682c3f52" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:09:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db101\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server101\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:08:20.7942042Z\",\r\n \"correlationId\": \"b006bf98-c8f6-476a-8c67-0d567eedf5f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databases/sql-audit-cmdlet-db101\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101/sql-audit-cmdlet-db101\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799908" + ], + "x-ms-request-id": [ + "c4adea85-5a6a-42dc-b20d-571a968a13a9" + ], + "x-ms-correlation-request-id": [ + "c4adea85-5a6a-42dc-b20d-571a968a13a9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210917Z:c4adea85-5a6a-42dc-b20d-571a968a13a9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:09:16 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db101\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server101\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:08:20.7942042Z\",\r\n \"correlationId\": \"b006bf98-c8f6-476a-8c67-0d567eedf5f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databases/sql-audit-cmdlet-db101\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101/sql-audit-cmdlet-db101\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799906" + ], + "x-ms-request-id": [ + "43aba6c3-653b-47dc-9483-9a5d3d0bf135" + ], + "x-ms-correlation-request-id": [ + "43aba6c3-653b-47dc-9483-9a5d3d0bf135" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210920Z:43aba6c3-653b-47dc-9483-9a5d3d0bf135" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:09:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db101\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server101\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:08:20.7942042Z\",\r\n \"correlationId\": \"b006bf98-c8f6-476a-8c67-0d567eedf5f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databases/sql-audit-cmdlet-db101\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101/sql-audit-cmdlet-db101\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799904" + ], + "x-ms-request-id": [ + "d2579229-3d5f-4630-95e6-391b07078a63" + ], + "x-ms-correlation-request-id": [ + "d2579229-3d5f-4630-95e6-391b07078a63" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210923Z:d2579229-3d5f-4630-95e6-391b07078a63" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:09:23 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db101\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server101\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:08:20.7942042Z\",\r\n \"correlationId\": \"b006bf98-c8f6-476a-8c67-0d567eedf5f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databases/sql-audit-cmdlet-db101\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101/sql-audit-cmdlet-db101\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799902" + ], + "x-ms-request-id": [ + "9795e1f6-6002-4192-a8ac-ddd6cfbd793a" + ], + "x-ms-correlation-request-id": [ + "9795e1f6-6002-4192-a8ac-ddd6cfbd793a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210926Z:9795e1f6-6002-4192-a8ac-ddd6cfbd793a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:09:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db101\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server101\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:09:27.2264805Z\",\r\n \"correlationId\": \"b006bf98-c8f6-476a-8c67-0d567eedf5f3\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databases/sql-audit-cmdlet-db101\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server101/sql-audit-cmdlet-db101\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1626" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799900" + ], + "x-ms-request-id": [ + "1442003f-545f-4b93-8565-0fce1d8a93e4" + ], + "x-ms-correlation-request-id": [ + "1442003f-545f-4b93-8565-0fce1d8a93e4" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210930Z:1442003f-545f-4b93-8565-0fce1d8a93e4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:09:30 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101\",\r\n \"name\": \"sql-audit-cmdlet-server101\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databases/sql-audit-cmdlet-db101\",\r\n \"name\": \"sql-audit-cmdlet-server101/sql-audit-cmdlet-db101\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "577" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799899" + ], + "x-ms-request-id": [ + "cc959840-36ac-4945-81ba-7c256ff1e3d8" + ], + "x-ms-correlation-request-id": [ + "cc959840-36ac-4945-81ba-7c256ff1e3d8" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210932Z:cc959840-36ac-4945-81ba-7c256ff1e3d8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:09:32 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westeurope:eadf68ef-551b-4c3a-a673-248887b25be5" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799849" + ], + "x-ms-correlation-request-id": [ + "cce874ce-4a5f-4d05-bc3b-16f3aa9e5c36" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210933Z:cce874ce-4a5f-4d05-bc3b-16f3aa9e5c36" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:09:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databaseSecurityPolicies/sql-audit-cmdlet-db101?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMTAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiMTAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "231af410-b4c2-4475-8b25-0035514c3232-2014-10-31 21:09:35Z" + ], + "x-ms-client-request-id": [ + "6f24def8-aff7-4c3a-9e81-263bc0dbb3d8-2014-10-31 21:09:35Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets101\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets101.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server101.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db101;User ID={0}@sql-audit-cmdlet-server101;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server101.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db101;Uid={0}@sql-audit-cmdlet-server101;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server101.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db101\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server101.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db101\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server101\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db101\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server101.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server101.database.secure.windows.net:1433;database=sql-audit-cmdlet-db101;user={0}@sql-audit-cmdlet-server101;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server101.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databaseSecurityPolicies/sql-audit-cmdlet-db101\",\r\n \"name\": \"sql-audit-cmdlet-db101\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2812" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "230549b9-62c3-41b8-b576-df9fce77fdfb" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799898" + ], + "x-ms-correlation-request-id": [ + "0aa9722d-a130-477a-ac4f-f8a205859acb" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210936Z:0aa9722d-a130-477a-ac4f-f8a205859acb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:09:35 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databaseSecurityPolicies/sql-audit-cmdlet-db101?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMTAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiMTAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "231af410-b4c2-4475-8b25-0035514c3232-2014-10-31 21:09:35Z" + ], + "x-ms-client-request-id": [ + "4957e902-e04e-4799-9457-e020cdafa45d-2014-10-31 21:09:41Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets101\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets101.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server101.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db101;User ID={0}@sql-audit-cmdlet-server101;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server101.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db101;Uid={0}@sql-audit-cmdlet-server101;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server101.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db101\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server101.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db101\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server101\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db101\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server101.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server101.database.secure.windows.net:1433;database=sql-audit-cmdlet-db101;user={0}@sql-audit-cmdlet-server101;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server101.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databaseSecurityPolicies/sql-audit-cmdlet-db101\",\r\n \"name\": \"sql-audit-cmdlet-db101\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2812" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "5906ba53-ca2f-4a05-bea1-01fb95ff647b" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799897" + ], + "x-ms-correlation-request-id": [ + "bf83482b-b11c-4898-ad96-9e248aa1820d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210942Z:bf83482b-b11c-4898-ad96-9e248aa1820d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:09:42 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets101/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzMTAxL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "231af410-b4c2-4475-8b25-0035514c3232-2014-10-31 21:09:35Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"qoUbjoQKlOH7lX8tUFWdCymDoHJ1zffHxrh+G7etjjPOI5huKPHYDFDnF+D9Hit0u+yJ41HKxmd5Wy2jNW9Vrg==\",\r\n \"secondaryKey\": \"ZSi7jncpzVq7KRGZwtePkxcewT4qx0MIlcU90i5qtINpyGlSzgglprQPiKvjTEa1B4F6wuKUCFk7NBczFOhoSg==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:28a01734-c888-4190-aa27-b83f67c7c15f" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11990" + ], + "x-ms-correlation-request-id": [ + "ebc2743e-ed5e-40f4-b923-719bc7027383" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210937Z:ebc2743e-ed5e-40f4-b923-719bc7027383" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:09:37 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databaseSecurityPolicies/sql-audit-cmdlet-db101?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMTAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiMTAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets101\",\r\n \"storageAccountKey\": \"qoUbjoQKlOH7lX8tUFWdCymDoHJ1zffHxrh+G7etjjPOI5huKPHYDFDnF+D9Hit0u+yJ41HKxmd5Wy2jNW9Vrg==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets101.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "784" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "231af410-b4c2-4475-8b25-0035514c3232-2014-10-31 21:09:35Z" + ], + "x-ms-client-request-id": [ + "6f24def8-aff7-4c3a-9e81-263bc0dbb3d8-2014-10-31 21:09:35Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets101\",\r\n \"storageAccountKey\": \"qoUbjoQKlOH7lX8tUFWdCymDoHJ1zffHxrh+G7etjjPOI5huKPHYDFDnF+D9Hit0u+yJ41HKxmd5Wy2jNW9Vrg==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets101.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg101/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server101/databaseSecurityPolicies/sql-audit-cmdlet-db101\",\r\n \"name\": \"sql-audit-cmdlet-db101\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1155" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "c810168f-e641-40c3-8a07-ddedcba49367" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11989" + ], + "x-ms-correlation-request-id": [ + "4dcab497-aa20-4a4a-b0ce-429f2c66f846" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210940Z:4dcab497-aa20-4a4a-b0ce-429f2c66f846" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:09:39 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices/auditcmdlets101", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXMvYXVkaXRjbWRsZXRzMTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "90e82207f5b128fd97bc101e05945152" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:09:45 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/90e82207f5b128fd97bc101e05945152", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zLzkwZTgyMjA3ZjViMTI4ZmQ5N2JjMTAxZTA1OTQ1MTUy", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/2.0.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "\r\n 90e82207-f5b1-28fd-97bc-101e05945152\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "f89991264f2c215fb8ba61da04d433ab" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:09:47 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "cca24ec8-99b5-4aa7-9ff6-486e886f304c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestDisableDatabaseAuditing.json b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestDisableDatabaseAuditing.json new file mode 100644 index 000000000000..8601d3528e9c --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestDisableDatabaseAuditing.json @@ -0,0 +1,3104 @@ +{ + "Entries": [ + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXM=", + "RequestMethod": "POST", + "RequestBody": "\r\n auditcmdlets901\r\n \r\n \r\n West US\r\n \r\n Standard_GRS\r\n", + "RequestHeaders": { + "Content-Type": [ + "application/xml" + ], + "Content-Length": [ + "379" + ], + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "1273" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "705dea15bfb921739a31b222eafd3c8d" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:53:56 GMT" + ], + "Location": [ + "https://management.core.windows.net/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/storage/auditcmdlets901" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/705dea15bfb921739a31b222eafd3c8d", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zLzcwNWRlYTE1YmZiOTIxNzM5YTMxYjIyMmVhZmQzYzhk", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "1273" + ] + }, + "ResponseBody": "\r\n 705dea15-bfb9-2173-9a31-b222eafd3c8d\r\n InProgress\r\n", + "ResponseHeaders": { + "Content-Length": [ + "197" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "3cd7efcdb0782bc99e4a7893088f6297" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:53:56 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/705dea15bfb921739a31b222eafd3c8d", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zLzcwNWRlYTE1YmZiOTIxNzM5YTMxYjIyMmVhZmQzYzhk", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "1273" + ] + }, + "ResponseBody": "\r\n 705dea15-bfb9-2173-9a31-b222eafd3c8d\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "aa7d38ead1752fcf92801f828d335dc2" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:54:27 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "119" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799873" + ], + "x-ms-request-id": [ + "256ed383-0c0c-4d54-b27b-6432899bbe85" + ], + "x-ms-correlation-request-id": [ + "256ed383-0c0c-4d54-b27b-6432899bbe85" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215427Z:256ed383-0c0c-4d54-b27b-6432899bbe85" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:54:26 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901\",\r\n \"name\": \"sql-audit-cmdlet-test-rg901\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "217" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11973" + ], + "x-ms-request-id": [ + "4cf1dae8-48d3-46c8-8c0d-09db5665da05" + ], + "x-ms-correlation-request-id": [ + "4cf1dae8-48d3-46c8-8c0d-09db5665da05" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215429Z:4cf1dae8-48d3-46c8-8c0d-09db5665da05" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:54:29 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup/validate?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvdmFsaWRhdGU/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db901\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server901\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db901\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server901\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:54:30.250603Z\",\r\n \"correlationId\": \"3dcbab61-dd27-4621-b3dd-9ebcc954c9a7\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databases/sql-audit-cmdlet-db901\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901/sql-audit-cmdlet-db901\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11972" + ], + "x-ms-request-id": [ + "3dcbab61-dd27-4621-b3dd-9ebcc954c9a7" + ], + "x-ms-correlation-request-id": [ + "3dcbab61-dd27-4621-b3dd-9ebcc954c9a7" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215430Z:3dcbab61-dd27-4621-b3dd-9ebcc954c9a7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:54:29 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db901\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server901\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db901\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server901\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:54:31.8569525Z\",\r\n \"correlationId\": \"400634d0-cd03-4e41-80aa-2abbb936f28f\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databases/sql-audit-cmdlet-db901\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901/sql-audit-cmdlet-db901\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11971" + ], + "x-ms-request-id": [ + "400634d0-cd03-4e41-80aa-2abbb936f28f" + ], + "x-ms-correlation-request-id": [ + "400634d0-cd03-4e41-80aa-2abbb936f28f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215432Z:400634d0-cd03-4e41-80aa-2abbb936f28f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:54:32 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799872" + ], + "x-ms-request-id": [ + "8a5a0f6a-e1d1-4216-a0be-22f4c93386cb" + ], + "x-ms-correlation-request-id": [ + "8a5a0f6a-e1d1-4216-a0be-22f4c93386cb" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215432Z:8a5a0f6a-e1d1-4216-a0be-22f4c93386cb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:54:32 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799870" + ], + "x-ms-request-id": [ + "bd0213c9-bd45-491c-bd14-5c910862ed9a" + ], + "x-ms-correlation-request-id": [ + "bd0213c9-bd45-491c-bd14-5c910862ed9a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215436Z:bd0213c9-bd45-491c-bd14-5c910862ed9a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:54:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799868" + ], + "x-ms-request-id": [ + "7a708537-0ca1-49e4-9465-b5a2b1f02260" + ], + "x-ms-correlation-request-id": [ + "7a708537-0ca1-49e4-9465-b5a2b1f02260" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215439Z:7a708537-0ca1-49e4-9465-b5a2b1f02260" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:54:38 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799866" + ], + "x-ms-request-id": [ + "e54cdc07-11d5-4ad6-a85a-c359c1475d8d" + ], + "x-ms-correlation-request-id": [ + "e54cdc07-11d5-4ad6-a85a-c359c1475d8d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215442Z:e54cdc07-11d5-4ad6-a85a-c359c1475d8d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:54:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799864" + ], + "x-ms-request-id": [ + "c6fc8c10-fa54-456e-855b-8b79a173cb74" + ], + "x-ms-correlation-request-id": [ + "c6fc8c10-fa54-456e-855b-8b79a173cb74" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215445Z:c6fc8c10-fa54-456e-855b-8b79a173cb74" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:54:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799862" + ], + "x-ms-request-id": [ + "84dd8e66-3d5b-4c79-8727-e94f3720236e" + ], + "x-ms-correlation-request-id": [ + "84dd8e66-3d5b-4c79-8727-e94f3720236e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215448Z:84dd8e66-3d5b-4c79-8727-e94f3720236e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:54:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799860" + ], + "x-ms-request-id": [ + "878d31d7-66d9-4a3f-a35a-3a9408477b1f" + ], + "x-ms-correlation-request-id": [ + "878d31d7-66d9-4a3f-a35a-3a9408477b1f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215451Z:878d31d7-66d9-4a3f-a35a-3a9408477b1f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:54:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799858" + ], + "x-ms-request-id": [ + "140348c0-66e7-4a54-ae7b-6da92dc33750" + ], + "x-ms-correlation-request-id": [ + "140348c0-66e7-4a54-ae7b-6da92dc33750" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215454Z:140348c0-66e7-4a54-ae7b-6da92dc33750" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:54:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799856" + ], + "x-ms-request-id": [ + "5aa92ab3-d2f2-4ab0-b43d-b3c3bbf8448c" + ], + "x-ms-correlation-request-id": [ + "5aa92ab3-d2f2-4ab0-b43d-b3c3bbf8448c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215457Z:5aa92ab3-d2f2-4ab0-b43d-b3c3bbf8448c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:54:56 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799854" + ], + "x-ms-request-id": [ + "82571a02-d271-4571-9e66-ccd39500a5e1" + ], + "x-ms-correlation-request-id": [ + "82571a02-d271-4571-9e66-ccd39500a5e1" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215500Z:82571a02-d271-4571-9e66-ccd39500a5e1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799852" + ], + "x-ms-request-id": [ + "26e699a5-1b98-42a5-927b-775b3b391cfb" + ], + "x-ms-correlation-request-id": [ + "26e699a5-1b98-42a5-927b-775b3b391cfb" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215503Z:26e699a5-1b98-42a5-927b-775b3b391cfb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799850" + ], + "x-ms-request-id": [ + "08e1469f-00b5-42c0-83dd-7783d3bfe58a" + ], + "x-ms-correlation-request-id": [ + "08e1469f-00b5-42c0-83dd-7783d3bfe58a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215506Z:08e1469f-00b5-42c0-83dd-7783d3bfe58a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:05 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799848" + ], + "x-ms-request-id": [ + "b799ec11-9d73-433a-a444-5bf09c9dd23f" + ], + "x-ms-correlation-request-id": [ + "b799ec11-9d73-433a-a444-5bf09c9dd23f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215509Z:b799ec11-9d73-433a-a444-5bf09c9dd23f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:09 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799846" + ], + "x-ms-request-id": [ + "c02a0335-2a2b-4073-9cab-11c0c442575d" + ], + "x-ms-correlation-request-id": [ + "c02a0335-2a2b-4073-9cab-11c0c442575d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215512Z:c02a0335-2a2b-4073-9cab-11c0c442575d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:12 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799844" + ], + "x-ms-request-id": [ + "d7cb89f6-2d19-488b-8943-88307d7e462a" + ], + "x-ms-correlation-request-id": [ + "d7cb89f6-2d19-488b-8943-88307d7e462a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215515Z:d7cb89f6-2d19-488b-8943-88307d7e462a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:15 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799842" + ], + "x-ms-request-id": [ + "03608872-58aa-4b01-bcb6-7b3a4700e320" + ], + "x-ms-correlation-request-id": [ + "03608872-58aa-4b01-bcb6-7b3a4700e320" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215518Z:03608872-58aa-4b01-bcb6-7b3a4700e320" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:18 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799840" + ], + "x-ms-request-id": [ + "7d6cad87-ef5d-44f1-9976-d2bb85f35309" + ], + "x-ms-correlation-request-id": [ + "7d6cad87-ef5d-44f1-9976-d2bb85f35309" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215522Z:7d6cad87-ef5d-44f1-9976-d2bb85f35309" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799838" + ], + "x-ms-request-id": [ + "b5f51baa-30fa-4581-9aa1-65806167579f" + ], + "x-ms-correlation-request-id": [ + "b5f51baa-30fa-4581-9aa1-65806167579f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215525Z:b5f51baa-30fa-4581-9aa1-65806167579f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:25 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup/operations/22921F90E69AEB5F\",\r\n \"operationId\": \"22921F90E69AEB5F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:55:27.4765153Z\",\r\n \"trackingId\": \"b9694db8-c90a-4ee5-b025-72b5dc9b5b64\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799836" + ], + "x-ms-request-id": [ + "70713904-16ee-4f9b-a607-9b3b6c3b4088" + ], + "x-ms-correlation-request-id": [ + "70713904-16ee-4f9b-a607-9b3b6c3b4088" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215528Z:70713904-16ee-4f9b-a607-9b3b6c3b4088" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:27 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup/operations/22921F90E69AEB5F\",\r\n \"operationId\": \"22921F90E69AEB5F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:55:27.4765153Z\",\r\n \"trackingId\": \"b9694db8-c90a-4ee5-b025-72b5dc9b5b64\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799834" + ], + "x-ms-request-id": [ + "3fd1ef69-1ed9-4c0f-80de-827de5a0fd99" + ], + "x-ms-correlation-request-id": [ + "3fd1ef69-1ed9-4c0f-80de-827de5a0fd99" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215531Z:3fd1ef69-1ed9-4c0f-80de-827de5a0fd99" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:31 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup/operations/18494D92D3E5A133\",\r\n \"operationId\": \"18494D92D3E5A133\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:55:33.3077671Z\",\r\n \"trackingId\": \"b15aa25f-2888-46c6-9293-ef730b7b33db\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databases/sql-audit-cmdlet-db901\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901/sql-audit-cmdlet-db901\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup/operations/22921F90E69AEB5F\",\r\n \"operationId\": \"22921F90E69AEB5F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:55:27.4765153Z\",\r\n \"trackingId\": \"b9694db8-c90a-4ee5-b025-72b5dc9b5b64\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799832" + ], + "x-ms-request-id": [ + "c54e35d7-fd26-4262-9155-fffbe5e959a2" + ], + "x-ms-correlation-request-id": [ + "c54e35d7-fd26-4262-9155-fffbe5e959a2" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215534Z:c54e35d7-fd26-4262-9155-fffbe5e959a2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup/operations/18494D92D3E5A133\",\r\n \"operationId\": \"18494D92D3E5A133\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:55:33.3077671Z\",\r\n \"trackingId\": \"b15aa25f-2888-46c6-9293-ef730b7b33db\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databases/sql-audit-cmdlet-db901\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901/sql-audit-cmdlet-db901\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup/operations/22921F90E69AEB5F\",\r\n \"operationId\": \"22921F90E69AEB5F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:55:27.4765153Z\",\r\n \"trackingId\": \"b9694db8-c90a-4ee5-b025-72b5dc9b5b64\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799830" + ], + "x-ms-request-id": [ + "6a02c1f1-8cff-404e-806c-4565be4aa5ef" + ], + "x-ms-correlation-request-id": [ + "6a02c1f1-8cff-404e-806c-4565be4aa5ef" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215537Z:6a02c1f1-8cff-404e-806c-4565be4aa5ef" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:37 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup/operations/18494D92D3E5A133\",\r\n \"operationId\": \"18494D92D3E5A133\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:55:33.3077671Z\",\r\n \"trackingId\": \"b15aa25f-2888-46c6-9293-ef730b7b33db\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databases/sql-audit-cmdlet-db901\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901/sql-audit-cmdlet-db901\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup/operations/22921F90E69AEB5F\",\r\n \"operationId\": \"22921F90E69AEB5F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:55:27.4765153Z\",\r\n \"trackingId\": \"b9694db8-c90a-4ee5-b025-72b5dc9b5b64\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799828" + ], + "x-ms-request-id": [ + "4974efc5-e38a-4144-8650-79ad93fd9f90" + ], + "x-ms-correlation-request-id": [ + "4974efc5-e38a-4144-8650-79ad93fd9f90" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215540Z:4974efc5-e38a-4144-8650-79ad93fd9f90" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:40 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db901\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server901\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:54:31.8569525Z\",\r\n \"correlationId\": \"400634d0-cd03-4e41-80aa-2abbb936f28f\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databases/sql-audit-cmdlet-db901\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901/sql-audit-cmdlet-db901\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799871" + ], + "x-ms-request-id": [ + "7d75fde1-9482-4aae-b93e-ccd8e1d9fc89" + ], + "x-ms-correlation-request-id": [ + "7d75fde1-9482-4aae-b93e-ccd8e1d9fc89" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215433Z:7d75fde1-9482-4aae-b93e-ccd8e1d9fc89" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:54:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db901\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server901\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:54:34.3742168Z\",\r\n \"correlationId\": \"400634d0-cd03-4e41-80aa-2abbb936f28f\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databases/sql-audit-cmdlet-db901\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901/sql-audit-cmdlet-db901\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799869" + ], + "x-ms-request-id": [ + "4efa5d2e-e99d-4166-ab7a-fc84728880dc" + ], + "x-ms-correlation-request-id": [ + "4efa5d2e-e99d-4166-ab7a-fc84728880dc" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215436Z:4efa5d2e-e99d-4166-ab7a-fc84728880dc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:54:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db901\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server901\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:54:34.3742168Z\",\r\n \"correlationId\": \"400634d0-cd03-4e41-80aa-2abbb936f28f\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databases/sql-audit-cmdlet-db901\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901/sql-audit-cmdlet-db901\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799867" + ], + "x-ms-request-id": [ + "e3c92e59-d866-4ba5-8614-0040e6ca3306" + ], + "x-ms-correlation-request-id": [ + "e3c92e59-d866-4ba5-8614-0040e6ca3306" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215439Z:e3c92e59-d866-4ba5-8614-0040e6ca3306" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:54:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db901\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server901\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:54:34.3742168Z\",\r\n \"correlationId\": \"400634d0-cd03-4e41-80aa-2abbb936f28f\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databases/sql-audit-cmdlet-db901\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901/sql-audit-cmdlet-db901\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799865" + ], + "x-ms-request-id": [ + "acfa03c6-9595-40b4-adb0-f34aadb0d8de" + ], + "x-ms-correlation-request-id": [ + "acfa03c6-9595-40b4-adb0-f34aadb0d8de" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215442Z:acfa03c6-9595-40b4-adb0-f34aadb0d8de" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:54:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db901\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server901\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:54:34.3742168Z\",\r\n \"correlationId\": \"400634d0-cd03-4e41-80aa-2abbb936f28f\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databases/sql-audit-cmdlet-db901\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901/sql-audit-cmdlet-db901\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799863" + ], + "x-ms-request-id": [ + "f4e1e80d-3a69-49bc-8527-10d5b5d7628b" + ], + "x-ms-correlation-request-id": [ + "f4e1e80d-3a69-49bc-8527-10d5b5d7628b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215445Z:f4e1e80d-3a69-49bc-8527-10d5b5d7628b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:54:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db901\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server901\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:54:34.3742168Z\",\r\n \"correlationId\": \"400634d0-cd03-4e41-80aa-2abbb936f28f\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databases/sql-audit-cmdlet-db901\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901/sql-audit-cmdlet-db901\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799861" + ], + "x-ms-request-id": [ + "f5096ee9-a259-459f-82fe-0432c7cf3d47" + ], + "x-ms-correlation-request-id": [ + "f5096ee9-a259-459f-82fe-0432c7cf3d47" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215448Z:f5096ee9-a259-459f-82fe-0432c7cf3d47" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:54:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db901\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server901\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:54:34.3742168Z\",\r\n \"correlationId\": \"400634d0-cd03-4e41-80aa-2abbb936f28f\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databases/sql-audit-cmdlet-db901\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901/sql-audit-cmdlet-db901\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799859" + ], + "x-ms-request-id": [ + "325c74fd-a8ce-4913-97da-8e55ba3bddd0" + ], + "x-ms-correlation-request-id": [ + "325c74fd-a8ce-4913-97da-8e55ba3bddd0" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215451Z:325c74fd-a8ce-4913-97da-8e55ba3bddd0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:54:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db901\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server901\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:54:34.3742168Z\",\r\n \"correlationId\": \"400634d0-cd03-4e41-80aa-2abbb936f28f\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databases/sql-audit-cmdlet-db901\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901/sql-audit-cmdlet-db901\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799857" + ], + "x-ms-request-id": [ + "41cc5588-d138-46b9-95c1-e099e1a53736" + ], + "x-ms-correlation-request-id": [ + "41cc5588-d138-46b9-95c1-e099e1a53736" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215454Z:41cc5588-d138-46b9-95c1-e099e1a53736" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:54:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db901\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server901\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:54:34.3742168Z\",\r\n \"correlationId\": \"400634d0-cd03-4e41-80aa-2abbb936f28f\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databases/sql-audit-cmdlet-db901\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901/sql-audit-cmdlet-db901\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799855" + ], + "x-ms-request-id": [ + "120cfcbf-b22e-46cf-b9cc-a3c8bc578cd3" + ], + "x-ms-correlation-request-id": [ + "120cfcbf-b22e-46cf-b9cc-a3c8bc578cd3" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215458Z:120cfcbf-b22e-46cf-b9cc-a3c8bc578cd3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:54:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db901\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server901\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:54:34.3742168Z\",\r\n \"correlationId\": \"400634d0-cd03-4e41-80aa-2abbb936f28f\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databases/sql-audit-cmdlet-db901\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901/sql-audit-cmdlet-db901\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799853" + ], + "x-ms-request-id": [ + "e36902ad-3988-413c-bfee-8e25978468f9" + ], + "x-ms-correlation-request-id": [ + "e36902ad-3988-413c-bfee-8e25978468f9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215501Z:e36902ad-3988-413c-bfee-8e25978468f9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db901\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server901\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:54:34.3742168Z\",\r\n \"correlationId\": \"400634d0-cd03-4e41-80aa-2abbb936f28f\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databases/sql-audit-cmdlet-db901\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901/sql-audit-cmdlet-db901\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799851" + ], + "x-ms-request-id": [ + "01e15704-7ae7-43de-92ae-027de2805f3a" + ], + "x-ms-correlation-request-id": [ + "01e15704-7ae7-43de-92ae-027de2805f3a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215504Z:01e15704-7ae7-43de-92ae-027de2805f3a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db901\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server901\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:54:34.3742168Z\",\r\n \"correlationId\": \"400634d0-cd03-4e41-80aa-2abbb936f28f\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databases/sql-audit-cmdlet-db901\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901/sql-audit-cmdlet-db901\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799849" + ], + "x-ms-request-id": [ + "99d14671-1a90-4ec3-900b-5f0936f78685" + ], + "x-ms-correlation-request-id": [ + "99d14671-1a90-4ec3-900b-5f0936f78685" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215507Z:99d14671-1a90-4ec3-900b-5f0936f78685" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:07 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db901\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server901\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:54:34.3742168Z\",\r\n \"correlationId\": \"400634d0-cd03-4e41-80aa-2abbb936f28f\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databases/sql-audit-cmdlet-db901\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901/sql-audit-cmdlet-db901\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799847" + ], + "x-ms-request-id": [ + "ffc0c0b6-2f24-4ba6-add9-6e60ccffe008" + ], + "x-ms-correlation-request-id": [ + "ffc0c0b6-2f24-4ba6-add9-6e60ccffe008" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215510Z:ffc0c0b6-2f24-4ba6-add9-6e60ccffe008" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:09 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db901\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server901\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:54:34.3742168Z\",\r\n \"correlationId\": \"400634d0-cd03-4e41-80aa-2abbb936f28f\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databases/sql-audit-cmdlet-db901\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901/sql-audit-cmdlet-db901\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799845" + ], + "x-ms-request-id": [ + "a4e91d9c-0f08-42ca-a9c5-6089edb5c62c" + ], + "x-ms-correlation-request-id": [ + "a4e91d9c-0f08-42ca-a9c5-6089edb5c62c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215513Z:a4e91d9c-0f08-42ca-a9c5-6089edb5c62c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:12 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db901\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server901\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:54:34.3742168Z\",\r\n \"correlationId\": \"400634d0-cd03-4e41-80aa-2abbb936f28f\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databases/sql-audit-cmdlet-db901\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901/sql-audit-cmdlet-db901\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799843" + ], + "x-ms-request-id": [ + "20811899-34c9-4c59-a5f2-927ad33148d0" + ], + "x-ms-correlation-request-id": [ + "20811899-34c9-4c59-a5f2-927ad33148d0" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215516Z:20811899-34c9-4c59-a5f2-927ad33148d0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:16 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db901\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server901\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:54:34.3742168Z\",\r\n \"correlationId\": \"400634d0-cd03-4e41-80aa-2abbb936f28f\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databases/sql-audit-cmdlet-db901\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901/sql-audit-cmdlet-db901\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799841" + ], + "x-ms-request-id": [ + "ea788fbd-6398-4b24-b502-10e2f4a6687d" + ], + "x-ms-correlation-request-id": [ + "ea788fbd-6398-4b24-b502-10e2f4a6687d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215519Z:ea788fbd-6398-4b24-b502-10e2f4a6687d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:18 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db901\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server901\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:54:34.3742168Z\",\r\n \"correlationId\": \"400634d0-cd03-4e41-80aa-2abbb936f28f\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databases/sql-audit-cmdlet-db901\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901/sql-audit-cmdlet-db901\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799839" + ], + "x-ms-request-id": [ + "38dd8edf-5d78-4dfc-a13d-1c63c600c0ae" + ], + "x-ms-correlation-request-id": [ + "38dd8edf-5d78-4dfc-a13d-1c63c600c0ae" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215522Z:38dd8edf-5d78-4dfc-a13d-1c63c600c0ae" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db901\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server901\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:54:34.3742168Z\",\r\n \"correlationId\": \"400634d0-cd03-4e41-80aa-2abbb936f28f\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databases/sql-audit-cmdlet-db901\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901/sql-audit-cmdlet-db901\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799837" + ], + "x-ms-request-id": [ + "20f5cb1d-a2bb-49b4-90c3-41ec7efcd848" + ], + "x-ms-correlation-request-id": [ + "20f5cb1d-a2bb-49b4-90c3-41ec7efcd848" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215525Z:20f5cb1d-a2bb-49b4-90c3-41ec7efcd848" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:25 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db901\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server901\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:54:34.3742168Z\",\r\n \"correlationId\": \"400634d0-cd03-4e41-80aa-2abbb936f28f\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databases/sql-audit-cmdlet-db901\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901/sql-audit-cmdlet-db901\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799835" + ], + "x-ms-request-id": [ + "73233eb6-7089-4c23-a33f-20c25c23c909" + ], + "x-ms-correlation-request-id": [ + "73233eb6-7089-4c23-a33f-20c25c23c909" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215528Z:73233eb6-7089-4c23-a33f-20c25c23c909" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db901\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server901\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:54:34.3742168Z\",\r\n \"correlationId\": \"400634d0-cd03-4e41-80aa-2abbb936f28f\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databases/sql-audit-cmdlet-db901\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901/sql-audit-cmdlet-db901\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799833" + ], + "x-ms-request-id": [ + "fdeb5a10-1d13-4ecf-a3e2-db98ee563ac8" + ], + "x-ms-correlation-request-id": [ + "fdeb5a10-1d13-4ecf-a3e2-db98ee563ac8" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215531Z:fdeb5a10-1d13-4ecf-a3e2-db98ee563ac8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:31 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db901\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server901\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:54:34.3742168Z\",\r\n \"correlationId\": \"400634d0-cd03-4e41-80aa-2abbb936f28f\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databases/sql-audit-cmdlet-db901\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901/sql-audit-cmdlet-db901\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799831" + ], + "x-ms-request-id": [ + "21cba233-2814-45bc-beb8-9ab966ee33ee" + ], + "x-ms-correlation-request-id": [ + "21cba233-2814-45bc-beb8-9ab966ee33ee" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215534Z:21cba233-2814-45bc-beb8-9ab966ee33ee" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:34 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db901\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server901\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:54:34.3742168Z\",\r\n \"correlationId\": \"400634d0-cd03-4e41-80aa-2abbb936f28f\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databases/sql-audit-cmdlet-db901\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901/sql-audit-cmdlet-db901\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799829" + ], + "x-ms-request-id": [ + "78029c22-8431-4531-82a3-d3cc0f31c063" + ], + "x-ms-correlation-request-id": [ + "78029c22-8431-4531-82a3-d3cc0f31c063" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215538Z:78029c22-8431-4531-82a3-d3cc0f31c063" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:38 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db901\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server901\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:55:37.7634565Z\",\r\n \"correlationId\": \"400634d0-cd03-4e41-80aa-2abbb936f28f\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databases/sql-audit-cmdlet-db901\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server901/sql-audit-cmdlet-db901\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1626" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799827" + ], + "x-ms-request-id": [ + "e5355ade-2a8d-4a01-af2e-7c7d88e95b1a" + ], + "x-ms-correlation-request-id": [ + "e5355ade-2a8d-4a01-af2e-7c7d88e95b1a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215541Z:e5355ade-2a8d-4a01-af2e-7c7d88e95b1a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:40 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901\",\r\n \"name\": \"sql-audit-cmdlet-server901\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databases/sql-audit-cmdlet-db901\",\r\n \"name\": \"sql-audit-cmdlet-server901/sql-audit-cmdlet-db901\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "577" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799826" + ], + "x-ms-request-id": [ + "bea6e043-817b-4cab-b3c6-313de6afc914" + ], + "x-ms-correlation-request-id": [ + "bea6e043-817b-4cab-b3c6-313de6afc914" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215543Z:bea6e043-817b-4cab-b3c6-313de6afc914" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westeurope:5c77e1b2-6bbc-453f-b4e9-3ba596022f6a" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799816" + ], + "x-ms-correlation-request-id": [ + "958cca6b-bb9b-48ee-b3e2-f126b76237ac" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215545Z:958cca6b-bb9b-48ee-b3e2-f126b76237ac" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databaseSecurityPolicies/sql-audit-cmdlet-db901?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyOTAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiOTAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "1e3bdfc1-ce07-4c0a-9e48-1841302838f8-2014-10-31 21:55:46Z" + ], + "x-ms-client-request-id": [ + "13e6ac47-b3b6-4b2d-841b-aac88bc7bb33-2014-10-31 21:55:46Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": false,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets901\",\r\n \"storageAccountKey\": null,\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets901.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server901.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db901;User ID={0}@sql-audit-cmdlet-server901;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server901.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db901;Uid={0}@sql-audit-cmdlet-server901;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server901.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db901\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server901.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db901\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server901\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db901\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server901.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server901.database.secure.windows.net:1433;database=sql-audit-cmdlet-db901;user={0}@sql-audit-cmdlet-server901;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server901.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databaseSecurityPolicies/sql-audit-cmdlet-db901\",\r\n \"name\": \"sql-audit-cmdlet-db901\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2807" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "6ab1feea-a549-47f1-a91d-6cfd47e3404b" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799650" + ], + "x-ms-correlation-request-id": [ + "055b4a34-fd19-477d-b75e-4bc483b7429c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215548Z:055b4a34-fd19-477d-b75e-4bc483b7429c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:47 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databaseSecurityPolicies/sql-audit-cmdlet-db901?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyOTAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiOTAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "1e3bdfc1-ce07-4c0a-9e48-1841302838f8-2014-10-31 21:55:46Z" + ], + "x-ms-client-request-id": [ + "cce6b273-54ba-4f19-9251-17f96bca89a4-2014-10-31 21:55:54Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets901\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets901.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server901.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db901;User ID={0}@sql-audit-cmdlet-server901;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server901.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db901;Uid={0}@sql-audit-cmdlet-server901;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server901.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db901\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server901.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db901\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server901\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db901\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server901.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server901.database.secure.windows.net:1433;database=sql-audit-cmdlet-db901;user={0}@sql-audit-cmdlet-server901;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server901.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databaseSecurityPolicies/sql-audit-cmdlet-db901\",\r\n \"name\": \"sql-audit-cmdlet-db901\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2812" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "47fc018e-7fa8-4242-a2ee-3038bd3efbff" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799649" + ], + "x-ms-correlation-request-id": [ + "387b417d-3b7d-4a0f-8a3e-85b4ff382dc5" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215554Z:387b417d-3b7d-4a0f-8a3e-85b4ff382dc5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:54 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databaseSecurityPolicies/sql-audit-cmdlet-db901?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyOTAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiOTAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "1e3bdfc1-ce07-4c0a-9e48-1841302838f8-2014-10-31 21:55:46Z" + ], + "x-ms-client-request-id": [ + "ec9041f6-e9a5-4a0a-be2c-396fba2a0ec9-2014-10-31 21:55:58Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": false,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets901\",\r\n \"storageAccountKey\": null,\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets901.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server901.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db901;User ID={0}@sql-audit-cmdlet-server901;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server901.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db901;Uid={0}@sql-audit-cmdlet-server901;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server901.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db901\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server901.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db901\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server901\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db901\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server901.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server901.database.secure.windows.net:1433;database=sql-audit-cmdlet-db901;user={0}@sql-audit-cmdlet-server901;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server901.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databaseSecurityPolicies/sql-audit-cmdlet-db901\",\r\n \"name\": \"sql-audit-cmdlet-db901\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2807" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "b7118350-03be-47dd-ae31-105fb8c536ea" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799648" + ], + "x-ms-correlation-request-id": [ + "dc3aca10-5e0c-4290-b0ff-e6f5ee9f6c90" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215559Z:dc3aca10-5e0c-4290-b0ff-e6f5ee9f6c90" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:59 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets901/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzOTAxL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "1e3bdfc1-ce07-4c0a-9e48-1841302838f8-2014-10-31 21:55:46Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"inWHuEfGqpHOGL6gr3wetDvb0h9irNv56Mx/sUTaVZBqX9h6fnQEkW842q/XbJDxabbRYAcbxNglNJsO6DMjsw==\",\r\n \"secondaryKey\": \"ehZH0X1iKFS/MuWsBlCTTg95+nXvQwZrOj3jt/OlQLN8MFuH2tEeWNCyFnv23O6qqI8SBRjYijwZZEcrBYwL8w==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:5b044460-7444-4462-80e2-cb6b0c5e67d9" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11962" + ], + "x-ms-correlation-request-id": [ + "e045493b-bb78-4770-ad22-3bca9f2e59cb" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215549Z:e045493b-bb78-4770-ad22-3bca9f2e59cb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databaseSecurityPolicies/sql-audit-cmdlet-db901?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyOTAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiOTAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets901\",\r\n \"storageAccountKey\": \"inWHuEfGqpHOGL6gr3wetDvb0h9irNv56Mx/sUTaVZBqX9h6fnQEkW842q/XbJDxabbRYAcbxNglNJsO6DMjsw==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets901.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "784" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "1e3bdfc1-ce07-4c0a-9e48-1841302838f8-2014-10-31 21:55:46Z" + ], + "x-ms-client-request-id": [ + "13e6ac47-b3b6-4b2d-841b-aac88bc7bb33-2014-10-31 21:55:46Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets901\",\r\n \"storageAccountKey\": \"inWHuEfGqpHOGL6gr3wetDvb0h9irNv56Mx/sUTaVZBqX9h6fnQEkW842q/XbJDxabbRYAcbxNglNJsO6DMjsw==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets901.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databaseSecurityPolicies/sql-audit-cmdlet-db901\",\r\n \"name\": \"sql-audit-cmdlet-db901\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1155" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "c63f5113-450a-492c-80d3-e8bd5e233fba" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11961" + ], + "x-ms-correlation-request-id": [ + "6e79f7c7-a435-4513-9d1f-aa0451c11959" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215552Z:6e79f7c7-a435-4513-9d1f-aa0451c11959" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:52 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databaseSecurityPolicies/sql-audit-cmdlet-db901?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzkwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyOTAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiOTAxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": false,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets901\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets901.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "667" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "1e3bdfc1-ce07-4c0a-9e48-1841302838f8-2014-10-31 21:55:46Z" + ], + "x-ms-client-request-id": [ + "cce6b273-54ba-4f19-9251-17f96bca89a4-2014-10-31 21:55:54Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": false,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets901\",\r\n \"storageAccountKey\": null,\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets901.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg901/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server901/databaseSecurityPolicies/sql-audit-cmdlet-db901\",\r\n \"name\": \"sql-audit-cmdlet-db901\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1070" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "7d9e8423-6325-45ce-889a-e596f0fbd93a" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11960" + ], + "x-ms-correlation-request-id": [ + "eca03d7e-80a6-43ba-aed2-5f7e841070cd" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215557Z:eca03d7e-80a6-43ba-aed2-5f7e841070cd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:55:57 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices/auditcmdlets901", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXMvYXVkaXRjbWRsZXRzOTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "048c96edf2f2279c96b23f18f61a3748" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:56:04 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/048c96edf2f2279c96b23f18f61a3748", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zLzA0OGM5NmVkZjJmMjI3OWM5NmIyM2YxOGY2MWEzNzQ4", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/2.0.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "\r\n 048c96ed-f2f2-279c-96b2-3f18f61a3748\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "a8926daf97c92edcaba8a0770d520c55" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:56:04 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "cca24ec8-99b5-4aa7-9ff6-486e886f304c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestDisableServerAuditing.json b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestDisableServerAuditing.json new file mode 100644 index 000000000000..163af467e1bb --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestDisableServerAuditing.json @@ -0,0 +1,3200 @@ +{ + "Entries": [ + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXM=", + "RequestMethod": "POST", + "RequestBody": "\r\n auditcmdlets111\r\n \r\n \r\n West US\r\n \r\n Standard_GRS\r\n", + "RequestHeaders": { + "Content-Type": [ + "application/xml" + ], + "Content-Length": [ + "379" + ], + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "64" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "a51506e87d79221d8097ad5fda0839a7" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:58:46 GMT" + ], + "Location": [ + "https://management.core.windows.net/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/storage/auditcmdlets111" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/a51506e87d79221d8097ad5fda0839a7", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zL2E1MTUwNmU4N2Q3OTIyMWQ4MDk3YWQ1ZmRhMDgzOWE3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "64" + ] + }, + "ResponseBody": "\r\n a51506e8-7d79-221d-8097-ad5fda0839a7\r\n InProgress\r\n", + "ResponseHeaders": { + "Content-Length": [ + "197" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "3a0bc331bd1e2398957f3ffe68e987a9" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:58:46 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/a51506e87d79221d8097ad5fda0839a7", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zL2E1MTUwNmU4N2Q3OTIyMWQ4MDk3YWQ1ZmRhMDgzOWE3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "64" + ] + }, + "ResponseBody": "\r\n a51506e8-7d79-221d-8097-ad5fda0839a7\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "45a18c2665d02816808ab6747f02ad17" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:59:16 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "119" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799950" + ], + "x-ms-request-id": [ + "6fe2e398-ddde-465b-8d36-c3411b0f4a1f" + ], + "x-ms-correlation-request-id": [ + "6fe2e398-ddde-465b-8d36-c3411b0f4a1f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205918Z:6fe2e398-ddde-465b-8d36-c3411b0f4a1f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:59:18 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111\",\r\n \"name\": \"sql-audit-cmdlet-test-rg111\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "217" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11996" + ], + "x-ms-request-id": [ + "61aff452-3570-4ebe-b828-9c25182cb789" + ], + "x-ms-correlation-request-id": [ + "61aff452-3570-4ebe-b828-9c25182cb789" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205920Z:61aff452-3570-4ebe-b828-9c25182cb789" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:59:20 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup/validate?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvdmFsaWRhdGU/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db111\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server111\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db111\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server111\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T20:59:20.8804953Z\",\r\n \"correlationId\": \"01e4e7cf-4a26-4aa9-9a87-0ca8bbbdc023\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databases/sql-audit-cmdlet-db111\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111/sql-audit-cmdlet-db111\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11995" + ], + "x-ms-request-id": [ + "01e4e7cf-4a26-4aa9-9a87-0ca8bbbdc023" + ], + "x-ms-correlation-request-id": [ + "01e4e7cf-4a26-4aa9-9a87-0ca8bbbdc023" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205920Z:01e4e7cf-4a26-4aa9-9a87-0ca8bbbdc023" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:59:20 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db111\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server111\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db111\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server111\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T20:59:22.5144944Z\",\r\n \"correlationId\": \"bce92d8c-84b2-4bd2-945b-29f64c138eff\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databases/sql-audit-cmdlet-db111\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111/sql-audit-cmdlet-db111\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11994" + ], + "x-ms-request-id": [ + "bce92d8c-84b2-4bd2-945b-29f64c138eff" + ], + "x-ms-correlation-request-id": [ + "bce92d8c-84b2-4bd2-945b-29f64c138eff" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205923Z:bce92d8c-84b2-4bd2-945b-29f64c138eff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:59:22 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799949" + ], + "x-ms-request-id": [ + "42646ee7-1130-4a36-92ee-a7f3f6cbcdd2" + ], + "x-ms-correlation-request-id": [ + "42646ee7-1130-4a36-92ee-a7f3f6cbcdd2" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205923Z:42646ee7-1130-4a36-92ee-a7f3f6cbcdd2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:59:23 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799947" + ], + "x-ms-request-id": [ + "8b30d8a9-dcb4-4a18-b1db-cdf74ecc563d" + ], + "x-ms-correlation-request-id": [ + "8b30d8a9-dcb4-4a18-b1db-cdf74ecc563d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205927Z:8b30d8a9-dcb4-4a18-b1db-cdf74ecc563d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:59:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799945" + ], + "x-ms-request-id": [ + "ab473745-4d93-48ae-9dfd-a993f72c372b" + ], + "x-ms-correlation-request-id": [ + "ab473745-4d93-48ae-9dfd-a993f72c372b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205930Z:ab473745-4d93-48ae-9dfd-a993f72c372b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:59:29 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799943" + ], + "x-ms-request-id": [ + "c2fd3ebf-2ba3-466b-a3cc-4f8db22973f6" + ], + "x-ms-correlation-request-id": [ + "c2fd3ebf-2ba3-466b-a3cc-4f8db22973f6" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205933Z:c2fd3ebf-2ba3-466b-a3cc-4f8db22973f6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:59:32 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799941" + ], + "x-ms-request-id": [ + "317e432e-bf27-44fe-8515-e1b2a88c5f8c" + ], + "x-ms-correlation-request-id": [ + "317e432e-bf27-44fe-8515-e1b2a88c5f8c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205936Z:317e432e-bf27-44fe-8515-e1b2a88c5f8c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:59:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799939" + ], + "x-ms-request-id": [ + "e7ebc62d-370e-41cb-885c-38f985a66892" + ], + "x-ms-correlation-request-id": [ + "e7ebc62d-370e-41cb-885c-38f985a66892" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205939Z:e7ebc62d-370e-41cb-885c-38f985a66892" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:59:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799937" + ], + "x-ms-request-id": [ + "a2c70f69-a824-497d-87fa-b8e927f9ba71" + ], + "x-ms-correlation-request-id": [ + "a2c70f69-a824-497d-87fa-b8e927f9ba71" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205942Z:a2c70f69-a824-497d-87fa-b8e927f9ba71" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:59:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799935" + ], + "x-ms-request-id": [ + "3c7b90bf-4cdb-4100-856a-56c9a67642cc" + ], + "x-ms-correlation-request-id": [ + "3c7b90bf-4cdb-4100-856a-56c9a67642cc" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205945Z:3c7b90bf-4cdb-4100-856a-56c9a67642cc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:59:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799933" + ], + "x-ms-request-id": [ + "070de335-cc4e-4f70-97b3-617c10f5f820" + ], + "x-ms-correlation-request-id": [ + "070de335-cc4e-4f70-97b3-617c10f5f820" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205948Z:070de335-cc4e-4f70-97b3-617c10f5f820" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:59:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799931" + ], + "x-ms-request-id": [ + "1cbfba46-17c7-4114-aa6b-69c2aea1970e" + ], + "x-ms-correlation-request-id": [ + "1cbfba46-17c7-4114-aa6b-69c2aea1970e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205951Z:1cbfba46-17c7-4114-aa6b-69c2aea1970e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:59:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799929" + ], + "x-ms-request-id": [ + "06c176c0-54e3-4054-a93d-0ba2ed2d32d5" + ], + "x-ms-correlation-request-id": [ + "06c176c0-54e3-4054-a93d-0ba2ed2d32d5" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205954Z:06c176c0-54e3-4054-a93d-0ba2ed2d32d5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:59:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799927" + ], + "x-ms-request-id": [ + "c434ec2c-6cfb-4bb1-9d26-fbe30eebef67" + ], + "x-ms-correlation-request-id": [ + "c434ec2c-6cfb-4bb1-9d26-fbe30eebef67" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205957Z:c434ec2c-6cfb-4bb1-9d26-fbe30eebef67" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:59:56 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799925" + ], + "x-ms-request-id": [ + "700203ba-c1e1-4a88-9c7e-6ec03913e888" + ], + "x-ms-correlation-request-id": [ + "700203ba-c1e1-4a88-9c7e-6ec03913e888" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210000Z:700203ba-c1e1-4a88-9c7e-6ec03913e888" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:00:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799923" + ], + "x-ms-request-id": [ + "0672f7c8-dc0c-4f22-9e7f-168655953e95" + ], + "x-ms-correlation-request-id": [ + "0672f7c8-dc0c-4f22-9e7f-168655953e95" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210004Z:0672f7c8-dc0c-4f22-9e7f-168655953e95" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:00:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799921" + ], + "x-ms-request-id": [ + "8bff2e4d-ac3c-493b-b42b-66ae2a4ec8ee" + ], + "x-ms-correlation-request-id": [ + "8bff2e4d-ac3c-493b-b42b-66ae2a4ec8ee" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210007Z:8bff2e4d-ac3c-493b-b42b-66ae2a4ec8ee" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:00:07 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799919" + ], + "x-ms-request-id": [ + "d0f93900-6818-48de-b089-dc909b1750d3" + ], + "x-ms-correlation-request-id": [ + "d0f93900-6818-48de-b089-dc909b1750d3" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210010Z:d0f93900-6818-48de-b089-dc909b1750d3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:00:09 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799917" + ], + "x-ms-request-id": [ + "e73dc63c-7839-41d8-965b-ce18acbfcd81" + ], + "x-ms-correlation-request-id": [ + "e73dc63c-7839-41d8-965b-ce18acbfcd81" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210013Z:e73dc63c-7839-41d8-965b-ce18acbfcd81" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:00:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799915" + ], + "x-ms-request-id": [ + "93c1a401-c6ce-4da6-a080-651c09414374" + ], + "x-ms-correlation-request-id": [ + "93c1a401-c6ce-4da6-a080-651c09414374" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210016Z:93c1a401-c6ce-4da6-a080-651c09414374" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:00:16 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799913" + ], + "x-ms-request-id": [ + "1a92c56d-5ef5-4357-9a5c-aed1f2e9b014" + ], + "x-ms-correlation-request-id": [ + "1a92c56d-5ef5-4357-9a5c-aed1f2e9b014" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210019Z:1a92c56d-5ef5-4357-9a5c-aed1f2e9b014" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:00:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799911" + ], + "x-ms-request-id": [ + "337bf2ce-1a65-48c6-b4d1-30b460a51211" + ], + "x-ms-correlation-request-id": [ + "337bf2ce-1a65-48c6-b4d1-30b460a51211" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210022Z:337bf2ce-1a65-48c6-b4d1-30b460a51211" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:00:21 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup/operations/2BBF7A4A4AF5C0C8\",\r\n \"operationId\": \"2BBF7A4A4AF5C0C8\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:00:22.4508088Z\",\r\n \"trackingId\": \"f6650419-639a-4501-aad8-72b907429142\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799909" + ], + "x-ms-request-id": [ + "f41c4b80-38e8-448f-8192-c1c20f0b1def" + ], + "x-ms-correlation-request-id": [ + "f41c4b80-38e8-448f-8192-c1c20f0b1def" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210025Z:f41c4b80-38e8-448f-8192-c1c20f0b1def" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:00:25 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup/operations/2BBF7A4A4AF5C0C8\",\r\n \"operationId\": \"2BBF7A4A4AF5C0C8\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:00:22.4508088Z\",\r\n \"trackingId\": \"f6650419-639a-4501-aad8-72b907429142\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799907" + ], + "x-ms-request-id": [ + "ad6aa943-a094-4344-a665-a00a37a2cd19" + ], + "x-ms-correlation-request-id": [ + "ad6aa943-a094-4344-a665-a00a37a2cd19" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210028Z:ad6aa943-a094-4344-a665-a00a37a2cd19" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:00:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup/operations/7DE63A476CAF8C90\",\r\n \"operationId\": \"7DE63A476CAF8C90\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:00:29.7385164Z\",\r\n \"trackingId\": \"209c4e43-e431-44f8-988d-20bcba46b0bc\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databases/sql-audit-cmdlet-db111\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111/sql-audit-cmdlet-db111\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup/operations/2BBF7A4A4AF5C0C8\",\r\n \"operationId\": \"2BBF7A4A4AF5C0C8\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:00:22.4508088Z\",\r\n \"trackingId\": \"f6650419-639a-4501-aad8-72b907429142\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799905" + ], + "x-ms-request-id": [ + "eb791d3d-4964-4be4-a982-b339e911c368" + ], + "x-ms-correlation-request-id": [ + "eb791d3d-4964-4be4-a982-b339e911c368" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210031Z:eb791d3d-4964-4be4-a982-b339e911c368" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:00:31 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup/operations/7DE63A476CAF8C90\",\r\n \"operationId\": \"7DE63A476CAF8C90\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:00:29.7385164Z\",\r\n \"trackingId\": \"209c4e43-e431-44f8-988d-20bcba46b0bc\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databases/sql-audit-cmdlet-db111\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111/sql-audit-cmdlet-db111\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup/operations/2BBF7A4A4AF5C0C8\",\r\n \"operationId\": \"2BBF7A4A4AF5C0C8\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:00:22.4508088Z\",\r\n \"trackingId\": \"f6650419-639a-4501-aad8-72b907429142\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799903" + ], + "x-ms-request-id": [ + "fe4d6b2e-5582-409d-958f-0b692b79481a" + ], + "x-ms-correlation-request-id": [ + "fe4d6b2e-5582-409d-958f-0b692b79481a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210035Z:fe4d6b2e-5582-409d-958f-0b692b79481a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:00:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db111\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server111\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T20:59:22.5144944Z\",\r\n \"correlationId\": \"bce92d8c-84b2-4bd2-945b-29f64c138eff\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databases/sql-audit-cmdlet-db111\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111/sql-audit-cmdlet-db111\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799948" + ], + "x-ms-request-id": [ + "23a29e4c-29ee-4215-91c3-2e8cba2d5383" + ], + "x-ms-correlation-request-id": [ + "23a29e4c-29ee-4215-91c3-2e8cba2d5383" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205924Z:23a29e4c-29ee-4215-91c3-2e8cba2d5383" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:59:23 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db111\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server111\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:59:25.750305Z\",\r\n \"correlationId\": \"bce92d8c-84b2-4bd2-945b-29f64c138eff\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databases/sql-audit-cmdlet-db111\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111/sql-audit-cmdlet-db111\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799946" + ], + "x-ms-request-id": [ + "9c242835-3c88-49db-9aa2-96a6a2962083" + ], + "x-ms-correlation-request-id": [ + "9c242835-3c88-49db-9aa2-96a6a2962083" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205927Z:9c242835-3c88-49db-9aa2-96a6a2962083" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:59:27 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db111\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server111\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:59:25.750305Z\",\r\n \"correlationId\": \"bce92d8c-84b2-4bd2-945b-29f64c138eff\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databases/sql-audit-cmdlet-db111\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111/sql-audit-cmdlet-db111\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799944" + ], + "x-ms-request-id": [ + "7517198a-cc62-496e-ba8f-030d00e5f360" + ], + "x-ms-correlation-request-id": [ + "7517198a-cc62-496e-ba8f-030d00e5f360" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205930Z:7517198a-cc62-496e-ba8f-030d00e5f360" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:59:30 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db111\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server111\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:59:25.750305Z\",\r\n \"correlationId\": \"bce92d8c-84b2-4bd2-945b-29f64c138eff\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databases/sql-audit-cmdlet-db111\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111/sql-audit-cmdlet-db111\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799942" + ], + "x-ms-request-id": [ + "8ca1f949-ce59-408f-a119-505ba81c94a5" + ], + "x-ms-correlation-request-id": [ + "8ca1f949-ce59-408f-a119-505ba81c94a5" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205933Z:8ca1f949-ce59-408f-a119-505ba81c94a5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:59:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db111\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server111\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:59:25.750305Z\",\r\n \"correlationId\": \"bce92d8c-84b2-4bd2-945b-29f64c138eff\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databases/sql-audit-cmdlet-db111\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111/sql-audit-cmdlet-db111\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799940" + ], + "x-ms-request-id": [ + "6f01a06e-e98a-43c8-9f09-28f884e5a1b3" + ], + "x-ms-correlation-request-id": [ + "6f01a06e-e98a-43c8-9f09-28f884e5a1b3" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205936Z:6f01a06e-e98a-43c8-9f09-28f884e5a1b3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:59:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db111\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server111\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:59:25.750305Z\",\r\n \"correlationId\": \"bce92d8c-84b2-4bd2-945b-29f64c138eff\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databases/sql-audit-cmdlet-db111\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111/sql-audit-cmdlet-db111\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799938" + ], + "x-ms-request-id": [ + "3d60a3f8-0bd3-46de-8094-8ce4a8b22f13" + ], + "x-ms-correlation-request-id": [ + "3d60a3f8-0bd3-46de-8094-8ce4a8b22f13" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205939Z:3d60a3f8-0bd3-46de-8094-8ce4a8b22f13" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:59:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db111\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server111\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:59:25.750305Z\",\r\n \"correlationId\": \"bce92d8c-84b2-4bd2-945b-29f64c138eff\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databases/sql-audit-cmdlet-db111\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111/sql-audit-cmdlet-db111\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799936" + ], + "x-ms-request-id": [ + "2364cbde-864e-471f-b8f1-3a7b5a35ac46" + ], + "x-ms-correlation-request-id": [ + "2364cbde-864e-471f-b8f1-3a7b5a35ac46" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205942Z:2364cbde-864e-471f-b8f1-3a7b5a35ac46" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:59:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db111\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server111\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:59:25.750305Z\",\r\n \"correlationId\": \"bce92d8c-84b2-4bd2-945b-29f64c138eff\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databases/sql-audit-cmdlet-db111\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111/sql-audit-cmdlet-db111\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799934" + ], + "x-ms-request-id": [ + "8ec353d9-45c4-4322-8ea8-f9a499c00d0f" + ], + "x-ms-correlation-request-id": [ + "8ec353d9-45c4-4322-8ea8-f9a499c00d0f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205946Z:8ec353d9-45c4-4322-8ea8-f9a499c00d0f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:59:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db111\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server111\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:59:25.750305Z\",\r\n \"correlationId\": \"bce92d8c-84b2-4bd2-945b-29f64c138eff\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databases/sql-audit-cmdlet-db111\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111/sql-audit-cmdlet-db111\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799932" + ], + "x-ms-request-id": [ + "1be7b840-58dc-4d71-9f7a-3d0c4d42f16e" + ], + "x-ms-correlation-request-id": [ + "1be7b840-58dc-4d71-9f7a-3d0c4d42f16e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205949Z:1be7b840-58dc-4d71-9f7a-3d0c4d42f16e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:59:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db111\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server111\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:59:25.750305Z\",\r\n \"correlationId\": \"bce92d8c-84b2-4bd2-945b-29f64c138eff\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databases/sql-audit-cmdlet-db111\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111/sql-audit-cmdlet-db111\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799930" + ], + "x-ms-request-id": [ + "119f0900-6691-41a7-932f-d1c1cff05cdf" + ], + "x-ms-correlation-request-id": [ + "119f0900-6691-41a7-932f-d1c1cff05cdf" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205952Z:119f0900-6691-41a7-932f-d1c1cff05cdf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:59:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db111\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server111\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:59:25.750305Z\",\r\n \"correlationId\": \"bce92d8c-84b2-4bd2-945b-29f64c138eff\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databases/sql-audit-cmdlet-db111\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111/sql-audit-cmdlet-db111\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799928" + ], + "x-ms-request-id": [ + "da180db0-84a2-44fb-9cf5-0d492a2875fe" + ], + "x-ms-correlation-request-id": [ + "da180db0-84a2-44fb-9cf5-0d492a2875fe" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205955Z:da180db0-84a2-44fb-9cf5-0d492a2875fe" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:59:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db111\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server111\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:59:25.750305Z\",\r\n \"correlationId\": \"bce92d8c-84b2-4bd2-945b-29f64c138eff\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databases/sql-audit-cmdlet-db111\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111/sql-audit-cmdlet-db111\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799926" + ], + "x-ms-request-id": [ + "cf929e24-5ccb-49d4-b97c-a9412e30775e" + ], + "x-ms-correlation-request-id": [ + "cf929e24-5ccb-49d4-b97c-a9412e30775e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205958Z:cf929e24-5ccb-49d4-b97c-a9412e30775e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:59:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db111\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server111\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:59:25.750305Z\",\r\n \"correlationId\": \"bce92d8c-84b2-4bd2-945b-29f64c138eff\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databases/sql-audit-cmdlet-db111\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111/sql-audit-cmdlet-db111\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799924" + ], + "x-ms-request-id": [ + "cb4e7bda-a103-49b4-9050-45b749ea0191" + ], + "x-ms-correlation-request-id": [ + "cb4e7bda-a103-49b4-9050-45b749ea0191" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210001Z:cb4e7bda-a103-49b4-9050-45b749ea0191" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:00:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db111\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server111\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:59:25.750305Z\",\r\n \"correlationId\": \"bce92d8c-84b2-4bd2-945b-29f64c138eff\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databases/sql-audit-cmdlet-db111\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111/sql-audit-cmdlet-db111\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799922" + ], + "x-ms-request-id": [ + "d9b35cf8-1432-4889-b79b-8fe099aba403" + ], + "x-ms-correlation-request-id": [ + "d9b35cf8-1432-4889-b79b-8fe099aba403" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210004Z:d9b35cf8-1432-4889-b79b-8fe099aba403" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:00:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db111\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server111\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:59:25.750305Z\",\r\n \"correlationId\": \"bce92d8c-84b2-4bd2-945b-29f64c138eff\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databases/sql-audit-cmdlet-db111\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111/sql-audit-cmdlet-db111\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799920" + ], + "x-ms-request-id": [ + "3fa2488c-58b7-49b6-95e3-b7fd3aeb1536" + ], + "x-ms-correlation-request-id": [ + "3fa2488c-58b7-49b6-95e3-b7fd3aeb1536" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210007Z:3fa2488c-58b7-49b6-95e3-b7fd3aeb1536" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:00:07 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db111\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server111\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:59:25.750305Z\",\r\n \"correlationId\": \"bce92d8c-84b2-4bd2-945b-29f64c138eff\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databases/sql-audit-cmdlet-db111\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111/sql-audit-cmdlet-db111\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799918" + ], + "x-ms-request-id": [ + "0db53f9f-0f12-4839-85e8-4c63ec07245b" + ], + "x-ms-correlation-request-id": [ + "0db53f9f-0f12-4839-85e8-4c63ec07245b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210010Z:0db53f9f-0f12-4839-85e8-4c63ec07245b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:00:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db111\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server111\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:59:25.750305Z\",\r\n \"correlationId\": \"bce92d8c-84b2-4bd2-945b-29f64c138eff\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databases/sql-audit-cmdlet-db111\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111/sql-audit-cmdlet-db111\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799916" + ], + "x-ms-request-id": [ + "237dfe8a-696e-4bb9-9629-0938eadd5d16" + ], + "x-ms-correlation-request-id": [ + "237dfe8a-696e-4bb9-9629-0938eadd5d16" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210013Z:237dfe8a-696e-4bb9-9629-0938eadd5d16" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:00:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db111\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server111\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:59:25.750305Z\",\r\n \"correlationId\": \"bce92d8c-84b2-4bd2-945b-29f64c138eff\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databases/sql-audit-cmdlet-db111\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111/sql-audit-cmdlet-db111\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799914" + ], + "x-ms-request-id": [ + "885920e6-f4ac-4f87-a412-9c209f1facd5" + ], + "x-ms-correlation-request-id": [ + "885920e6-f4ac-4f87-a412-9c209f1facd5" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210016Z:885920e6-f4ac-4f87-a412-9c209f1facd5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:00:16 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db111\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server111\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:59:25.750305Z\",\r\n \"correlationId\": \"bce92d8c-84b2-4bd2-945b-29f64c138eff\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databases/sql-audit-cmdlet-db111\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111/sql-audit-cmdlet-db111\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799912" + ], + "x-ms-request-id": [ + "a511156b-4faf-472d-b2a8-c65d119b64ff" + ], + "x-ms-correlation-request-id": [ + "a511156b-4faf-472d-b2a8-c65d119b64ff" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210019Z:a511156b-4faf-472d-b2a8-c65d119b64ff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:00:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db111\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server111\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:59:25.750305Z\",\r\n \"correlationId\": \"bce92d8c-84b2-4bd2-945b-29f64c138eff\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databases/sql-audit-cmdlet-db111\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111/sql-audit-cmdlet-db111\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799910" + ], + "x-ms-request-id": [ + "28bd0e2a-e444-44e6-856d-cb9532a8e59c" + ], + "x-ms-correlation-request-id": [ + "28bd0e2a-e444-44e6-856d-cb9532a8e59c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210022Z:28bd0e2a-e444-44e6-856d-cb9532a8e59c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:00:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db111\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server111\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:59:25.750305Z\",\r\n \"correlationId\": \"bce92d8c-84b2-4bd2-945b-29f64c138eff\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databases/sql-audit-cmdlet-db111\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111/sql-audit-cmdlet-db111\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799908" + ], + "x-ms-request-id": [ + "f5fc652d-bdfe-46b1-ae3b-0249ea32342e" + ], + "x-ms-correlation-request-id": [ + "f5fc652d-bdfe-46b1-ae3b-0249ea32342e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210025Z:f5fc652d-bdfe-46b1-ae3b-0249ea32342e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:00:25 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db111\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server111\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:59:25.750305Z\",\r\n \"correlationId\": \"bce92d8c-84b2-4bd2-945b-29f64c138eff\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databases/sql-audit-cmdlet-db111\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111/sql-audit-cmdlet-db111\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799906" + ], + "x-ms-request-id": [ + "6af4a0dc-8e8d-4649-9e86-b1cb532d715e" + ], + "x-ms-correlation-request-id": [ + "6af4a0dc-8e8d-4649-9e86-b1cb532d715e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210029Z:6af4a0dc-8e8d-4649-9e86-b1cb532d715e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:00:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db111\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server111\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:59:25.750305Z\",\r\n \"correlationId\": \"bce92d8c-84b2-4bd2-945b-29f64c138eff\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databases/sql-audit-cmdlet-db111\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111/sql-audit-cmdlet-db111\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799904" + ], + "x-ms-request-id": [ + "42eff92b-6e8e-4466-8869-53b613295e14" + ], + "x-ms-correlation-request-id": [ + "42eff92b-6e8e-4466-8869-53b613295e14" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210032Z:42eff92b-6e8e-4466-8869-53b613295e14" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:00:32 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db111\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server111\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:00:33.3169344Z\",\r\n \"correlationId\": \"bce92d8c-84b2-4bd2-945b-29f64c138eff\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databases/sql-audit-cmdlet-db111\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server111/sql-audit-cmdlet-db111\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1626" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799902" + ], + "x-ms-request-id": [ + "8d860f11-068c-4edd-8477-7e598ba5e44f" + ], + "x-ms-correlation-request-id": [ + "8d860f11-068c-4edd-8477-7e598ba5e44f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210035Z:8d860f11-068c-4edd-8477-7e598ba5e44f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:00:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111\",\r\n \"name\": \"sql-audit-cmdlet-server111\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databases/sql-audit-cmdlet-db111\",\r\n \"name\": \"sql-audit-cmdlet-server111/sql-audit-cmdlet-db111\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "577" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799901" + ], + "x-ms-request-id": [ + "704c065c-2394-43b2-8a7c-45dcce2d711d" + ], + "x-ms-correlation-request-id": [ + "704c065c-2394-43b2-8a7c-45dcce2d711d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210037Z:704c065c-2394-43b2-8a7c-45dcce2d711d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:00:37 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westeurope:028ed862-59d9-4e15-8158-03106a3264f2" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799997" + ], + "x-ms-correlation-request-id": [ + "bfd998d3-7c70-49a9-b844-cf4d163fdf1e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210038Z:bfd998d3-7c70-49a9-b844-cf4d163fdf1e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:00:38 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMTExL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "7cc99722-d376-4c5a-81e6-fce6fe70a618-2014-10-31 21:00:39Z" + ], + "x-ms-client-request-id": [ + "af3b5a00-3bb0-49fa-9a94-2b70c2a1727a-2014-10-31 21:00:39Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": false,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets111\",\r\n \"storageAccountKey\": null,\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets111.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server111.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server111;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server111.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server111;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server111.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server111.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server111\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server111.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server111.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server111;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server111.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2919" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "b431aca0-de38-47ba-b34d-4e978758a27e" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799998" + ], + "x-ms-correlation-request-id": [ + "33b083d0-05df-467c-bce1-713abd52c1bf" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210040Z:33b083d0-05df-467c-bce1-713abd52c1bf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:00:40 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMTExL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "7cc99722-d376-4c5a-81e6-fce6fe70a618-2014-10-31 21:00:39Z" + ], + "x-ms-client-request-id": [ + "9835d7f2-829a-41f2-b104-430e2c2c2b25-2014-10-31 21:00:46Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets111\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets111.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server111.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server111;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server111.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server111;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server111.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server111.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server111\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server111.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server111.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server111;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server111.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2924" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "4c79f045-e3c0-43cd-bf55-91653eb7b748" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799997" + ], + "x-ms-correlation-request-id": [ + "e5be4fb4-2e06-4902-bd9e-482b3f6f0520" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210047Z:e5be4fb4-2e06-4902-bd9e-482b3f6f0520" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:00:46 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMTExL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "7cc99722-d376-4c5a-81e6-fce6fe70a618-2014-10-31 21:00:39Z" + ], + "x-ms-client-request-id": [ + "249cbcc1-e207-46fe-9892-fb7909466bba-2014-10-31 21:00:51Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": false,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets111\",\r\n \"storageAccountKey\": null,\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets111.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server111.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server111;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server111.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server111;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server111.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server111.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server111\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server111.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server111.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server111;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server111.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2919" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "a3014a49-a90d-4a2b-baf8-d429f3189778" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799996" + ], + "x-ms-correlation-request-id": [ + "67758f6c-0c5a-419c-aac3-40c18168ff47" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210052Z:67758f6c-0c5a-419c-aac3-40c18168ff47" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:00:52 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets111/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzMTExL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "7cc99722-d376-4c5a-81e6-fce6fe70a618-2014-10-31 21:00:39Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"i1hpZu1N5v+lVEVEyXKcuB3hNoMp/Y4qu2zXPu1XrHHN2CD7RzTk2/nHsyiDVuL4M5QUGG6JWVTNO1fSfkGwSA==\",\r\n \"secondaryKey\": \"Fjmet4vfnDUqutG97EOjIk0vgiLhmQL1H5XXulYMm9MCf6Fz4WxiEJ/7IdCT6kTk1aNwrkrjNvesN+DgWfzJCA==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:07863c8c-b2eb-455a-a844-807ca2ea5014" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11998" + ], + "x-ms-correlation-request-id": [ + "eadb612c-233f-453a-9440-cd5cc1699ef7" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210042Z:eadb612c-233f-453a-9440-cd5cc1699ef7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:00:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMTExL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets111\",\r\n \"storageAccountKey\": \"i1hpZu1N5v+lVEVEyXKcuB3hNoMp/Y4qu2zXPu1XrHHN2CD7RzTk2/nHsyiDVuL4M5QUGG6JWVTNO1fSfkGwSA==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets111.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "784" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "7cc99722-d376-4c5a-81e6-fce6fe70a618-2014-10-31 21:00:39Z" + ], + "x-ms-client-request-id": [ + "af3b5a00-3bb0-49fa-9a94-2b70c2a1727a-2014-10-31 21:00:39Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets111\",\r\n \"storageAccountKey\": \"i1hpZu1N5v+lVEVEyXKcuB3hNoMp/Y4qu2zXPu1XrHHN2CD7RzTk2/nHsyiDVuL4M5QUGG6JWVTNO1fSfkGwSA==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets111.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1183" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "53f8fb13-2a42-4d73-8c5f-e5e14707a5a6" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11997" + ], + "x-ms-correlation-request-id": [ + "d6c34dca-484c-4fb7-bf82-cf4e86f2750b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210045Z:d6c34dca-484c-4fb7-bf82-cf4e86f2750b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:00:45 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzExMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMTExL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": false,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets111\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets111.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "667" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "7cc99722-d376-4c5a-81e6-fce6fe70a618-2014-10-31 21:00:39Z" + ], + "x-ms-client-request-id": [ + "9835d7f2-829a-41f2-b104-430e2c2c2b25-2014-10-31 21:00:46Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": false,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets111\",\r\n \"storageAccountKey\": null,\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets111.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg111/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server111/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1098" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "328f1e0c-c727-49a1-a0f2-01a0b4ffaf40" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11996" + ], + "x-ms-correlation-request-id": [ + "641f26d6-c1f4-408a-8e78-b30ca91f317d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210049Z:641f26d6-c1f4-408a-8e78-b30ca91f317d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:00:49 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices/auditcmdlets111", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXMvYXVkaXRjbWRsZXRzMTEx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "17ccd7e2963025b799a76a45e120be0f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:00:56 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/17ccd7e2963025b799a76a45e120be0f", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zLzE3Y2NkN2UyOTYzMDI1Yjc5OWE3NmE0NWUxMjBiZTBm", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/2.0.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "\r\n 17ccd7e2-9630-25b7-99a7-6a45e120be0f\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "bec238e53f382dfc96afff50e1406850" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:00:58 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "cca24ec8-99b5-4aa7-9ff6-486e886f304c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestFailWithBadDatabaseIndentity.json b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestFailWithBadDatabaseIndentity.json new file mode 100644 index 000000000000..7453bc413aa9 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestFailWithBadDatabaseIndentity.json @@ -0,0 +1,2852 @@ +{ + "Entries": [ + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXM=", + "RequestMethod": "POST", + "RequestBody": "\r\n auditcmdlets181\r\n \r\n \r\n West US\r\n \r\n Standard_GRS\r\n", + "RequestHeaders": { + "Content-Type": [ + "application/xml" + ], + "Content-Length": [ + "379" + ], + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "799" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "d641fc96be5128a09a5374acd37c0570" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:32:19 GMT" + ], + "Location": [ + "https://management.core.windows.net/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/storage/auditcmdlets181" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/d641fc96be5128a09a5374acd37c0570", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zL2Q2NDFmYzk2YmU1MTI4YTA5YTUzNzRhY2QzN2MwNTcw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "799" + ] + }, + "ResponseBody": "\r\n d641fc96-be51-28a0-9a53-74acd37c0570\r\n InProgress\r\n", + "ResponseHeaders": { + "Content-Length": [ + "197" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "4af1b2e1a1cb27af94ccbf4481bc36d3" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:32:19 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/d641fc96be5128a09a5374acd37c0570", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zL2Q2NDFmYzk2YmU1MTI4YTA5YTUzNzRhY2QzN2MwNTcw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "799" + ] + }, + "ResponseBody": "\r\n d641fc96-be51-28a0-9a53-74acd37c0570\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "e16c7b913edc28b2a4a028db671ed18f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:32:51 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "119" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799792" + ], + "x-ms-request-id": [ + "207c4947-f5da-487a-b594-6fb0a11a42b5" + ], + "x-ms-correlation-request-id": [ + "207c4947-f5da-487a-b594-6fb0a11a42b5" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213251Z:207c4947-f5da-487a-b594-6fb0a11a42b5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:32:50 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181\",\r\n \"name\": \"sql-audit-cmdlet-test-rg181\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "217" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11976" + ], + "x-ms-request-id": [ + "cde8a5dc-6664-4728-b747-76fd9d89d424" + ], + "x-ms-correlation-request-id": [ + "cde8a5dc-6664-4728-b747-76fd9d89d424" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213253Z:cde8a5dc-6664-4728-b747-76fd9d89d424" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:32:53 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup/validate?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvdmFsaWRhdGU/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db181\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server181\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db181\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server181\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:32:54.3456885Z\",\r\n \"correlationId\": \"8d19090b-1231-4cec-938f-c05ecec75b69\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181/databases/sql-audit-cmdlet-db181\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181/sql-audit-cmdlet-db181\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11975" + ], + "x-ms-request-id": [ + "8d19090b-1231-4cec-938f-c05ecec75b69" + ], + "x-ms-correlation-request-id": [ + "8d19090b-1231-4cec-938f-c05ecec75b69" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213254Z:8d19090b-1231-4cec-938f-c05ecec75b69" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:32:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db181\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server181\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db181\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server181\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:32:56.0074814Z\",\r\n \"correlationId\": \"431504b7-2597-4abb-95c2-5bd926a0e83b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181/databases/sql-audit-cmdlet-db181\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181/sql-audit-cmdlet-db181\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11974" + ], + "x-ms-request-id": [ + "431504b7-2597-4abb-95c2-5bd926a0e83b" + ], + "x-ms-correlation-request-id": [ + "431504b7-2597-4abb-95c2-5bd926a0e83b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213256Z:431504b7-2597-4abb-95c2-5bd926a0e83b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:32:55 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799791" + ], + "x-ms-request-id": [ + "188d1a83-0e5d-436e-bf13-4461d77f3747" + ], + "x-ms-correlation-request-id": [ + "188d1a83-0e5d-436e-bf13-4461d77f3747" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213257Z:188d1a83-0e5d-436e-bf13-4461d77f3747" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:32:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799789" + ], + "x-ms-request-id": [ + "d4453e72-19d8-47dc-a992-1f3eb7e5bac1" + ], + "x-ms-correlation-request-id": [ + "d4453e72-19d8-47dc-a992-1f3eb7e5bac1" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213300Z:d4453e72-19d8-47dc-a992-1f3eb7e5bac1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799787" + ], + "x-ms-request-id": [ + "bd69103c-f115-4766-b798-3817d799cc95" + ], + "x-ms-correlation-request-id": [ + "bd69103c-f115-4766-b798-3817d799cc95" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213303Z:bd69103c-f115-4766-b798-3817d799cc95" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799785" + ], + "x-ms-request-id": [ + "a418b024-a0d9-408a-95f9-7d0ff4afdccb" + ], + "x-ms-correlation-request-id": [ + "a418b024-a0d9-408a-95f9-7d0ff4afdccb" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213306Z:a418b024-a0d9-408a-95f9-7d0ff4afdccb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799783" + ], + "x-ms-request-id": [ + "7bcad295-9feb-4684-955e-41a62b96c139" + ], + "x-ms-correlation-request-id": [ + "7bcad295-9feb-4684-955e-41a62b96c139" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213310Z:7bcad295-9feb-4684-955e-41a62b96c139" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799781" + ], + "x-ms-request-id": [ + "ce84e96f-249c-4962-978b-80a694d638a0" + ], + "x-ms-correlation-request-id": [ + "ce84e96f-249c-4962-978b-80a694d638a0" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213313Z:ce84e96f-249c-4962-978b-80a694d638a0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799779" + ], + "x-ms-request-id": [ + "ce41788a-3dca-4bd4-ab41-2102ccec35b2" + ], + "x-ms-correlation-request-id": [ + "ce41788a-3dca-4bd4-ab41-2102ccec35b2" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213316Z:ce41788a-3dca-4bd4-ab41-2102ccec35b2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:16 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799777" + ], + "x-ms-request-id": [ + "6736b7f9-1bfb-44af-b88e-bdff672b66c4" + ], + "x-ms-correlation-request-id": [ + "6736b7f9-1bfb-44af-b88e-bdff672b66c4" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213319Z:6736b7f9-1bfb-44af-b88e-bdff672b66c4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799775" + ], + "x-ms-request-id": [ + "7728fda9-e6e3-40e4-9076-d4fb46442b46" + ], + "x-ms-correlation-request-id": [ + "7728fda9-e6e3-40e4-9076-d4fb46442b46" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213322Z:7728fda9-e6e3-40e4-9076-d4fb46442b46" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:21 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799773" + ], + "x-ms-request-id": [ + "7c91cf5d-913b-428c-8c9e-e41a902d55d4" + ], + "x-ms-correlation-request-id": [ + "7c91cf5d-913b-428c-8c9e-e41a902d55d4" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213325Z:7c91cf5d-913b-428c-8c9e-e41a902d55d4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:25 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799771" + ], + "x-ms-request-id": [ + "748cd37e-dcea-4999-8459-f83f9a799af9" + ], + "x-ms-correlation-request-id": [ + "748cd37e-dcea-4999-8459-f83f9a799af9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213328Z:748cd37e-dcea-4999-8459-f83f9a799af9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799769" + ], + "x-ms-request-id": [ + "d5b3861a-dab4-4999-83f5-11f52758f136" + ], + "x-ms-correlation-request-id": [ + "d5b3861a-dab4-4999-83f5-11f52758f136" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213331Z:d5b3861a-dab4-4999-83f5-11f52758f136" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:31 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799767" + ], + "x-ms-request-id": [ + "c0624cee-2bde-43d4-a93e-42d102ff4eed" + ], + "x-ms-correlation-request-id": [ + "c0624cee-2bde-43d4-a93e-42d102ff4eed" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213334Z:c0624cee-2bde-43d4-a93e-42d102ff4eed" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:34 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799765" + ], + "x-ms-request-id": [ + "02994891-9907-4ba9-bc36-a0f1003b8c24" + ], + "x-ms-correlation-request-id": [ + "02994891-9907-4ba9-bc36-a0f1003b8c24" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213337Z:02994891-9907-4ba9-bc36-a0f1003b8c24" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:37 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799763" + ], + "x-ms-request-id": [ + "c86ca410-456a-45f6-a61d-d9cf6795f22f" + ], + "x-ms-correlation-request-id": [ + "c86ca410-456a-45f6-a61d-d9cf6795f22f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213341Z:c86ca410-456a-45f6-a61d-d9cf6795f22f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:40 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799761" + ], + "x-ms-request-id": [ + "6def2648-8af6-4796-a282-43dbdfcbb9d8" + ], + "x-ms-correlation-request-id": [ + "6def2648-8af6-4796-a282-43dbdfcbb9d8" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213344Z:6def2648-8af6-4796-a282-43dbdfcbb9d8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799759" + ], + "x-ms-request-id": [ + "c457a052-e584-4531-a219-0c9cd9de4f58" + ], + "x-ms-correlation-request-id": [ + "c457a052-e584-4531-a219-0c9cd9de4f58" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213347Z:c457a052-e584-4531-a219-0c9cd9de4f58" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799757" + ], + "x-ms-request-id": [ + "0d867736-2ad9-46b2-91c8-9dd0374db25d" + ], + "x-ms-correlation-request-id": [ + "0d867736-2ad9-46b2-91c8-9dd0374db25d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213350Z:0d867736-2ad9-46b2-91c8-9dd0374db25d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup/operations/6E151FAF5F136184\",\r\n \"operationId\": \"6E151FAF5F136184\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:33:52.8538501Z\",\r\n \"trackingId\": \"716c389d-250b-43b9-bb69-0a0398c9870f\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799755" + ], + "x-ms-request-id": [ + "6c62bf67-1a9d-47ce-889c-cdb7bb736da4" + ], + "x-ms-correlation-request-id": [ + "6c62bf67-1a9d-47ce-889c-cdb7bb736da4" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213354Z:6c62bf67-1a9d-47ce-889c-cdb7bb736da4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup/operations/6E151FAF5F136184\",\r\n \"operationId\": \"6E151FAF5F136184\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:33:52.8538501Z\",\r\n \"trackingId\": \"716c389d-250b-43b9-bb69-0a0398c9870f\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799753" + ], + "x-ms-request-id": [ + "3bb8ba34-a8b6-4982-8aea-ead371cb1722" + ], + "x-ms-correlation-request-id": [ + "3bb8ba34-a8b6-4982-8aea-ead371cb1722" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213357Z:3bb8ba34-a8b6-4982-8aea-ead371cb1722" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup/operations/93D955A3559F694A\",\r\n \"operationId\": \"93D955A3559F694A\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:33:58.5325439Z\",\r\n \"trackingId\": \"a5b5b62e-8321-4b07-9836-380f626abfba\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181/databases/sql-audit-cmdlet-db181\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181/sql-audit-cmdlet-db181\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup/operations/6E151FAF5F136184\",\r\n \"operationId\": \"6E151FAF5F136184\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:33:52.8538501Z\",\r\n \"trackingId\": \"716c389d-250b-43b9-bb69-0a0398c9870f\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799751" + ], + "x-ms-request-id": [ + "db9b0004-5380-4bb4-9c35-895400923450" + ], + "x-ms-correlation-request-id": [ + "db9b0004-5380-4bb4-9c35-895400923450" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213400Z:db9b0004-5380-4bb4-9c35-895400923450" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup/operations/93D955A3559F694A\",\r\n \"operationId\": \"93D955A3559F694A\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:33:58.5325439Z\",\r\n \"trackingId\": \"a5b5b62e-8321-4b07-9836-380f626abfba\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181/databases/sql-audit-cmdlet-db181\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181/sql-audit-cmdlet-db181\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup/operations/6E151FAF5F136184\",\r\n \"operationId\": \"6E151FAF5F136184\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:33:52.8538501Z\",\r\n \"trackingId\": \"716c389d-250b-43b9-bb69-0a0398c9870f\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799749" + ], + "x-ms-request-id": [ + "bfa2dc6f-4e3e-45d9-b49c-bf0ef3985afe" + ], + "x-ms-correlation-request-id": [ + "bfa2dc6f-4e3e-45d9-b49c-bf0ef3985afe" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213403Z:bfa2dc6f-4e3e-45d9-b49c-bf0ef3985afe" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:34:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db181\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server181\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:32:56.0074814Z\",\r\n \"correlationId\": \"431504b7-2597-4abb-95c2-5bd926a0e83b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181/databases/sql-audit-cmdlet-db181\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181/sql-audit-cmdlet-db181\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799790" + ], + "x-ms-request-id": [ + "f219020a-042d-4d14-9747-6327efc6f314" + ], + "x-ms-correlation-request-id": [ + "f219020a-042d-4d14-9747-6327efc6f314" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213257Z:f219020a-042d-4d14-9747-6327efc6f314" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:32:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db181\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server181\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:32:58.5445094Z\",\r\n \"correlationId\": \"431504b7-2597-4abb-95c2-5bd926a0e83b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181/databases/sql-audit-cmdlet-db181\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181/sql-audit-cmdlet-db181\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799788" + ], + "x-ms-request-id": [ + "d8d8ce3e-0534-4957-be8d-4d9d2390d7de" + ], + "x-ms-correlation-request-id": [ + "d8d8ce3e-0534-4957-be8d-4d9d2390d7de" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213301Z:d8d8ce3e-0534-4957-be8d-4d9d2390d7de" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db181\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server181\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:32:58.5445094Z\",\r\n \"correlationId\": \"431504b7-2597-4abb-95c2-5bd926a0e83b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181/databases/sql-audit-cmdlet-db181\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181/sql-audit-cmdlet-db181\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799786" + ], + "x-ms-request-id": [ + "9e94d881-ad2d-4cd5-9009-44374ab27ed7" + ], + "x-ms-correlation-request-id": [ + "9e94d881-ad2d-4cd5-9009-44374ab27ed7" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213304Z:9e94d881-ad2d-4cd5-9009-44374ab27ed7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db181\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server181\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:32:58.5445094Z\",\r\n \"correlationId\": \"431504b7-2597-4abb-95c2-5bd926a0e83b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181/databases/sql-audit-cmdlet-db181\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181/sql-audit-cmdlet-db181\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799784" + ], + "x-ms-request-id": [ + "459d4b58-d743-46f1-84bc-16a375c57b19" + ], + "x-ms-correlation-request-id": [ + "459d4b58-d743-46f1-84bc-16a375c57b19" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213307Z:459d4b58-d743-46f1-84bc-16a375c57b19" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db181\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server181\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:32:58.5445094Z\",\r\n \"correlationId\": \"431504b7-2597-4abb-95c2-5bd926a0e83b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181/databases/sql-audit-cmdlet-db181\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181/sql-audit-cmdlet-db181\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799782" + ], + "x-ms-request-id": [ + "273e4034-44e6-4f0a-84e2-3a33e30f4206" + ], + "x-ms-correlation-request-id": [ + "273e4034-44e6-4f0a-84e2-3a33e30f4206" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213310Z:273e4034-44e6-4f0a-84e2-3a33e30f4206" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db181\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server181\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:32:58.5445094Z\",\r\n \"correlationId\": \"431504b7-2597-4abb-95c2-5bd926a0e83b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181/databases/sql-audit-cmdlet-db181\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181/sql-audit-cmdlet-db181\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799780" + ], + "x-ms-request-id": [ + "6e5a02a1-570e-46de-9226-379d26a396db" + ], + "x-ms-correlation-request-id": [ + "6e5a02a1-570e-46de-9226-379d26a396db" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213313Z:6e5a02a1-570e-46de-9226-379d26a396db" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db181\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server181\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:32:58.5445094Z\",\r\n \"correlationId\": \"431504b7-2597-4abb-95c2-5bd926a0e83b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181/databases/sql-audit-cmdlet-db181\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181/sql-audit-cmdlet-db181\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799778" + ], + "x-ms-request-id": [ + "52cf575b-95c7-4838-b65f-e0bff51b1e89" + ], + "x-ms-correlation-request-id": [ + "52cf575b-95c7-4838-b65f-e0bff51b1e89" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213316Z:52cf575b-95c7-4838-b65f-e0bff51b1e89" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:16 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db181\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server181\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:32:58.5445094Z\",\r\n \"correlationId\": \"431504b7-2597-4abb-95c2-5bd926a0e83b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181/databases/sql-audit-cmdlet-db181\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181/sql-audit-cmdlet-db181\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799776" + ], + "x-ms-request-id": [ + "24fe640d-5048-4958-a981-1f590dad5ced" + ], + "x-ms-correlation-request-id": [ + "24fe640d-5048-4958-a981-1f590dad5ced" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213319Z:24fe640d-5048-4958-a981-1f590dad5ced" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db181\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server181\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:32:58.5445094Z\",\r\n \"correlationId\": \"431504b7-2597-4abb-95c2-5bd926a0e83b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181/databases/sql-audit-cmdlet-db181\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181/sql-audit-cmdlet-db181\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799774" + ], + "x-ms-request-id": [ + "cff32d46-689b-47ab-bd90-2c4fd3c80de0" + ], + "x-ms-correlation-request-id": [ + "cff32d46-689b-47ab-bd90-2c4fd3c80de0" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213322Z:cff32d46-689b-47ab-bd90-2c4fd3c80de0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db181\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server181\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:32:58.5445094Z\",\r\n \"correlationId\": \"431504b7-2597-4abb-95c2-5bd926a0e83b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181/databases/sql-audit-cmdlet-db181\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181/sql-audit-cmdlet-db181\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799772" + ], + "x-ms-request-id": [ + "156b0e19-d73f-4353-bf30-9adc1fbe7d1a" + ], + "x-ms-correlation-request-id": [ + "156b0e19-d73f-4353-bf30-9adc1fbe7d1a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213326Z:156b0e19-d73f-4353-bf30-9adc1fbe7d1a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:25 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db181\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server181\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:32:58.5445094Z\",\r\n \"correlationId\": \"431504b7-2597-4abb-95c2-5bd926a0e83b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181/databases/sql-audit-cmdlet-db181\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181/sql-audit-cmdlet-db181\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799770" + ], + "x-ms-request-id": [ + "c9cd7365-38e0-4425-a1aa-79fdeb12b756" + ], + "x-ms-correlation-request-id": [ + "c9cd7365-38e0-4425-a1aa-79fdeb12b756" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213329Z:c9cd7365-38e0-4425-a1aa-79fdeb12b756" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db181\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server181\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:32:58.5445094Z\",\r\n \"correlationId\": \"431504b7-2597-4abb-95c2-5bd926a0e83b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181/databases/sql-audit-cmdlet-db181\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181/sql-audit-cmdlet-db181\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799768" + ], + "x-ms-request-id": [ + "dc22ca72-1bb7-44bf-b649-9a109ca235ca" + ], + "x-ms-correlation-request-id": [ + "dc22ca72-1bb7-44bf-b649-9a109ca235ca" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213332Z:dc22ca72-1bb7-44bf-b649-9a109ca235ca" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:31 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db181\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server181\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:32:58.5445094Z\",\r\n \"correlationId\": \"431504b7-2597-4abb-95c2-5bd926a0e83b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181/databases/sql-audit-cmdlet-db181\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181/sql-audit-cmdlet-db181\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799766" + ], + "x-ms-request-id": [ + "7e10eefd-54f6-4a7e-9d31-6f42435e2cc0" + ], + "x-ms-correlation-request-id": [ + "7e10eefd-54f6-4a7e-9d31-6f42435e2cc0" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213335Z:7e10eefd-54f6-4a7e-9d31-6f42435e2cc0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:34 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db181\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server181\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:32:58.5445094Z\",\r\n \"correlationId\": \"431504b7-2597-4abb-95c2-5bd926a0e83b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181/databases/sql-audit-cmdlet-db181\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181/sql-audit-cmdlet-db181\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799764" + ], + "x-ms-request-id": [ + "f83d53db-532b-47a3-9d34-05d83bdcbe52" + ], + "x-ms-correlation-request-id": [ + "f83d53db-532b-47a3-9d34-05d83bdcbe52" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213338Z:f83d53db-532b-47a3-9d34-05d83bdcbe52" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:37 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db181\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server181\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:32:58.5445094Z\",\r\n \"correlationId\": \"431504b7-2597-4abb-95c2-5bd926a0e83b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181/databases/sql-audit-cmdlet-db181\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181/sql-audit-cmdlet-db181\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799762" + ], + "x-ms-request-id": [ + "8dbf1a15-f367-4a4c-8413-f1298994e481" + ], + "x-ms-correlation-request-id": [ + "8dbf1a15-f367-4a4c-8413-f1298994e481" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213341Z:8dbf1a15-f367-4a4c-8413-f1298994e481" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db181\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server181\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:32:58.5445094Z\",\r\n \"correlationId\": \"431504b7-2597-4abb-95c2-5bd926a0e83b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181/databases/sql-audit-cmdlet-db181\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181/sql-audit-cmdlet-db181\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799760" + ], + "x-ms-request-id": [ + "aa189fbf-421d-4074-9374-37c211947dbe" + ], + "x-ms-correlation-request-id": [ + "aa189fbf-421d-4074-9374-37c211947dbe" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213344Z:aa189fbf-421d-4074-9374-37c211947dbe" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db181\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server181\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:32:58.5445094Z\",\r\n \"correlationId\": \"431504b7-2597-4abb-95c2-5bd926a0e83b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181/databases/sql-audit-cmdlet-db181\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181/sql-audit-cmdlet-db181\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799758" + ], + "x-ms-request-id": [ + "4ceccc2a-2448-43de-a047-e7f5b123b1aa" + ], + "x-ms-correlation-request-id": [ + "4ceccc2a-2448-43de-a047-e7f5b123b1aa" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213347Z:4ceccc2a-2448-43de-a047-e7f5b123b1aa" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:47 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db181\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server181\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:32:58.5445094Z\",\r\n \"correlationId\": \"431504b7-2597-4abb-95c2-5bd926a0e83b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181/databases/sql-audit-cmdlet-db181\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181/sql-audit-cmdlet-db181\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799756" + ], + "x-ms-request-id": [ + "85b1978c-052b-452c-8885-69c0065c0f71" + ], + "x-ms-correlation-request-id": [ + "85b1978c-052b-452c-8885-69c0065c0f71" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213351Z:85b1978c-052b-452c-8885-69c0065c0f71" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db181\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server181\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:32:58.5445094Z\",\r\n \"correlationId\": \"431504b7-2597-4abb-95c2-5bd926a0e83b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181/databases/sql-audit-cmdlet-db181\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181/sql-audit-cmdlet-db181\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799754" + ], + "x-ms-request-id": [ + "0b8873b8-99a6-42b9-9e62-8ad7349aadc9" + ], + "x-ms-correlation-request-id": [ + "0b8873b8-99a6-42b9-9e62-8ad7349aadc9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213354Z:0b8873b8-99a6-42b9-9e62-8ad7349aadc9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db181\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server181\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:32:58.5445094Z\",\r\n \"correlationId\": \"431504b7-2597-4abb-95c2-5bd926a0e83b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181/databases/sql-audit-cmdlet-db181\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181/sql-audit-cmdlet-db181\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799752" + ], + "x-ms-request-id": [ + "9206ad37-7316-4d29-bd44-f51f33c019ec" + ], + "x-ms-correlation-request-id": [ + "9206ad37-7316-4d29-bd44-f51f33c019ec" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213357Z:9206ad37-7316-4d29-bd44-f51f33c019ec" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:33:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db181\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server181\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:32:58.5445094Z\",\r\n \"correlationId\": \"431504b7-2597-4abb-95c2-5bd926a0e83b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181/databases/sql-audit-cmdlet-db181\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181/sql-audit-cmdlet-db181\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799750" + ], + "x-ms-request-id": [ + "415e088c-8f23-4299-838d-7363aab65195" + ], + "x-ms-correlation-request-id": [ + "415e088c-8f23-4299-838d-7363aab65195" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213400Z:415e088c-8f23-4299-838d-7363aab65195" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:34:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db181\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server181\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:34:03.1397554Z\",\r\n \"correlationId\": \"431504b7-2597-4abb-95c2-5bd926a0e83b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181/databases/sql-audit-cmdlet-db181\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server181/sql-audit-cmdlet-db181\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1626" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799748" + ], + "x-ms-request-id": [ + "ab3df9dd-afba-4e78-a18a-67ea4182c9a9" + ], + "x-ms-correlation-request-id": [ + "ab3df9dd-afba-4e78-a18a-67ea4182c9a9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213404Z:ab3df9dd-afba-4e78-a18a-67ea4182c9a9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:34:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181\",\r\n \"name\": \"sql-audit-cmdlet-server181\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181/databases/sql-audit-cmdlet-db181\",\r\n \"name\": \"sql-audit-cmdlet-server181/sql-audit-cmdlet-db181\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "577" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799747" + ], + "x-ms-request-id": [ + "d10e71ad-c3f3-4f3f-b34c-8bd5400ae26c" + ], + "x-ms-correlation-request-id": [ + "d10e71ad-c3f3-4f3f-b34c-8bd5400ae26c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213406Z:d10e71ad-c3f3-4f3f-b34c-8bd5400ae26c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:34:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westeurope:dc3cce45-2ffa-412f-bdb5-40bfc957dae6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799881" + ], + "x-ms-correlation-request-id": [ + "380d4f55-73ed-42da-bdc7-51bcb5f86349" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213407Z:380d4f55-73ed-42da-bdc7-51bcb5f86349" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:34:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/NONEXISTING-RG/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181/databaseSecurityPolicies/sql-audit-cmdlet-db181?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL05PTkVYSVNUSU5HLVJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuU3FsL3NlcnZlcnMvc3FsLWF1ZGl0LWNtZGxldC1zZXJ2ZXIxODEvZGF0YWJhc2VTZWN1cml0eVBvbGljaWVzL3NxbC1hdWRpdC1jbWRsZXQtZGIxODE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "0059f906-8c34-4d8a-bc1c-24c38010654a-2014-10-31 21:34:08Z" + ], + "x-ms-client-request-id": [ + "132f1eae-32ac-4115-b897-1c5fab6bb8ee-2014-10-31 21:34:08Z" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceGroupNotFound\",\r\n \"message\": \"Resource group 'NONEXISTING-RG' could not be found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "106" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "9f37f905-8afa-4124-b4a8-fd2af48503ce" + ], + "x-ms-correlation-request-id": [ + "9f37f905-8afa-4124-b4a8-fd2af48503ce" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213408Z:9f37f905-8afa-4124-b4a8-fd2af48503ce" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:34:08 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/NONEXISTING-RG/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server181/databaseSecurityPolicies/sql-audit-cmdlet-db181?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL05PTkVYSVNUSU5HLVJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuU3FsL3NlcnZlcnMvc3FsLWF1ZGl0LWNtZGxldC1zZXJ2ZXIxODEvZGF0YWJhc2VTZWN1cml0eVBvbGljaWVzL3NxbC1hdWRpdC1jbWRsZXQtZGIxODE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "0059f906-8c34-4d8a-bc1c-24c38010654a-2014-10-31 21:34:08Z" + ], + "x-ms-client-request-id": [ + "21c92abb-cdd8-4581-b558-f36e5fa498a8-2014-10-31 21:34:10Z" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceGroupNotFound\",\r\n \"message\": \"Resource group 'NONEXISTING-RG' could not be found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "106" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "ff3a55bb-34ef-4f62-9a0c-aa37750b7cc3" + ], + "x-ms-correlation-request-id": [ + "ff3a55bb-34ef-4f62-9a0c-aa37750b7cc3" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213409Z:ff3a55bb-34ef-4f62-9a0c-aa37750b7cc3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:34:09 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/NONEXISTING-SERVER/databaseSecurityPolicies/sql-audit-cmdlet-db181?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL05PTkVYSVNUSU5HLVNFUlZFUi9kYXRhYmFzZVNlY3VyaXR5UG9saWNpZXMvc3FsLWF1ZGl0LWNtZGxldC1kYjE4MT9hcGktdmVyc2lvbj0yMDE0LTA0LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "0059f906-8c34-4d8a-bc1c-24c38010654a-2014-10-31 21:34:08Z" + ], + "x-ms-client-request-id": [ + "577e9459-4056-4f88-8ecd-ab661fafd798-2014-10-31 21:34:09Z" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ParentResourceNotFound\",\r\n \"message\": \"Can not create nested resource. Parent resource 'NONEXISTING-SERVER' not found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "135" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "4c93bb7a-5ef7-4a5c-876e-71f855b2ecc0" + ], + "x-ms-correlation-request-id": [ + "4c93bb7a-5ef7-4a5c-876e-71f855b2ecc0" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213409Z:4c93bb7a-5ef7-4a5c-876e-71f855b2ecc0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:34:08 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg181/providers/Microsoft.Sql/servers/NONEXISTING-SERVER/databaseSecurityPolicies/sql-audit-cmdlet-db181?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE4MS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL05PTkVYSVNUSU5HLVNFUlZFUi9kYXRhYmFzZVNlY3VyaXR5UG9saWNpZXMvc3FsLWF1ZGl0LWNtZGxldC1kYjE4MT9hcGktdmVyc2lvbj0yMDE0LTA0LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "0059f906-8c34-4d8a-bc1c-24c38010654a-2014-10-31 21:34:08Z" + ], + "x-ms-client-request-id": [ + "16f494d3-48f5-4553-b48a-015f6783dfa0-2014-10-31 21:34:10Z" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ParentResourceNotFound\",\r\n \"message\": \"Can not create nested resource. Parent resource 'NONEXISTING-SERVER' not found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "135" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "6be99535-1b2b-48de-92e5-94c9342dc271" + ], + "x-ms-correlation-request-id": [ + "6be99535-1b2b-48de-92e5-94c9342dc271" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213409Z:6be99535-1b2b-48de-92e5-94c9342dc271" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:34:09 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices/auditcmdlets181", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXMvYXVkaXRjbWRsZXRzMTgx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "0105ef75b2d02fd8876a678804da0d54" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:34:14 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/0105ef75b2d02fd8876a678804da0d54", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zLzAxMDVlZjc1YjJkMDJmZDg4NzZhNjc4ODA0ZGEwZDU0", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/2.0.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "\r\n 0105ef75-b2d0-2fd8-876a-678804da0d54\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "8a1ba61b4f6d21a19b3a1d2fa1825915" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:34:15 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "cca24ec8-99b5-4aa7-9ff6-486e886f304c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestFailWithBadServerIndentity.json b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestFailWithBadServerIndentity.json new file mode 100644 index 000000000000..cbb1f80d8b22 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestFailWithBadServerIndentity.json @@ -0,0 +1,3044 @@ +{ + "Entries": [ + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXM=", + "RequestMethod": "POST", + "RequestBody": "\r\n auditcmdlets191\r\n \r\n \r\n West US\r\n \r\n Standard_GRS\r\n", + "RequestHeaders": { + "Content-Type": [ + "application/xml" + ], + "Content-Length": [ + "379" + ], + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "200" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "7ee02da08caf27518363f9934bf1c0fc" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:04:53 GMT" + ], + "Location": [ + "https://management.core.windows.net/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/storage/auditcmdlets191" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/7ee02da08caf27518363f9934bf1c0fc", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zLzdlZTAyZGEwOGNhZjI3NTE4MzYzZjk5MzRiZjFjMGZj", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "200" + ] + }, + "ResponseBody": "\r\n 7ee02da0-8caf-2751-8363-f9934bf1c0fc\r\n InProgress\r\n", + "ResponseHeaders": { + "Content-Length": [ + "197" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "aae3f35e0ae72321bfd949d086b277c8" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:04:53 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/7ee02da08caf27518363f9934bf1c0fc", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zLzdlZTAyZGEwOGNhZjI3NTE4MzYzZjk5MzRiZjFjMGZj", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "200" + ] + }, + "ResponseBody": "\r\n 7ee02da0-8caf-2751-8363-f9934bf1c0fc\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "f8d2cb89c1252d7893769a99c5f54c89" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:05:23 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "119" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799899" + ], + "x-ms-request-id": [ + "8bc291c3-4465-45c3-83dd-ab4d7d76f85c" + ], + "x-ms-correlation-request-id": [ + "8bc291c3-4465-45c3-83dd-ab4d7d76f85c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210525Z:8bc291c3-4465-45c3-83dd-ab4d7d76f85c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:05:24 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191\",\r\n \"name\": \"sql-audit-cmdlet-test-rg191\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "217" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11992" + ], + "x-ms-request-id": [ + "909c4a52-a066-49de-a1e8-295108d30cdb" + ], + "x-ms-correlation-request-id": [ + "909c4a52-a066-49de-a1e8-295108d30cdb" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210527Z:909c4a52-a066-49de-a1e8-295108d30cdb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:05:27 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup/validate?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvdmFsaWRhdGU/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db191\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server191\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db191\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server191\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:05:27.9678955Z\",\r\n \"correlationId\": \"8fb0f656-e349-47e8-90b0-0f5284aadb00\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191/databases/sql-audit-cmdlet-db191\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191/sql-audit-cmdlet-db191\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11991" + ], + "x-ms-request-id": [ + "8fb0f656-e349-47e8-90b0-0f5284aadb00" + ], + "x-ms-correlation-request-id": [ + "8fb0f656-e349-47e8-90b0-0f5284aadb00" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210527Z:8fb0f656-e349-47e8-90b0-0f5284aadb00" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:05:27 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db191\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server191\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db191\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server191\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:05:29.5922299Z\",\r\n \"correlationId\": \"c894e160-4706-477a-90ee-456aa88a73dc\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191/databases/sql-audit-cmdlet-db191\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191/sql-audit-cmdlet-db191\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11990" + ], + "x-ms-request-id": [ + "c894e160-4706-477a-90ee-456aa88a73dc" + ], + "x-ms-correlation-request-id": [ + "c894e160-4706-477a-90ee-456aa88a73dc" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210530Z:c894e160-4706-477a-90ee-456aa88a73dc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:05:30 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799898" + ], + "x-ms-request-id": [ + "1a2d93fc-7422-42d3-8ef7-6a0c910b5499" + ], + "x-ms-correlation-request-id": [ + "1a2d93fc-7422-42d3-8ef7-6a0c910b5499" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210530Z:1a2d93fc-7422-42d3-8ef7-6a0c910b5499" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:05:30 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799896" + ], + "x-ms-request-id": [ + "fa7bccef-4365-4973-92f1-4ceeae541fba" + ], + "x-ms-correlation-request-id": [ + "fa7bccef-4365-4973-92f1-4ceeae541fba" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210533Z:fa7bccef-4365-4973-92f1-4ceeae541fba" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:05:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799894" + ], + "x-ms-request-id": [ + "bd0b8f58-42ae-4acc-a568-9c6aab9d7239" + ], + "x-ms-correlation-request-id": [ + "bd0b8f58-42ae-4acc-a568-9c6aab9d7239" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210536Z:bd0b8f58-42ae-4acc-a568-9c6aab9d7239" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:05:36 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799892" + ], + "x-ms-request-id": [ + "988d466c-5838-4231-9233-64f19df62fef" + ], + "x-ms-correlation-request-id": [ + "988d466c-5838-4231-9233-64f19df62fef" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210539Z:988d466c-5838-4231-9233-64f19df62fef" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:05:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799890" + ], + "x-ms-request-id": [ + "46a9d8c9-2f34-47a7-862b-2253df487d58" + ], + "x-ms-correlation-request-id": [ + "46a9d8c9-2f34-47a7-862b-2253df487d58" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210543Z:46a9d8c9-2f34-47a7-862b-2253df487d58" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:05:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799888" + ], + "x-ms-request-id": [ + "38271b2c-a98d-4207-8470-1e8324d56dac" + ], + "x-ms-correlation-request-id": [ + "38271b2c-a98d-4207-8470-1e8324d56dac" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210546Z:38271b2c-a98d-4207-8470-1e8324d56dac" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:05:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799886" + ], + "x-ms-request-id": [ + "89427adc-e5a0-4bc8-a0b8-396fab0688a4" + ], + "x-ms-correlation-request-id": [ + "89427adc-e5a0-4bc8-a0b8-396fab0688a4" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210549Z:89427adc-e5a0-4bc8-a0b8-396fab0688a4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:05:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799884" + ], + "x-ms-request-id": [ + "f4255a3c-d55b-40a9-b4ae-cdbe3be9e7e7" + ], + "x-ms-correlation-request-id": [ + "f4255a3c-d55b-40a9-b4ae-cdbe3be9e7e7" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210552Z:f4255a3c-d55b-40a9-b4ae-cdbe3be9e7e7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:05:52 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799882" + ], + "x-ms-request-id": [ + "6d56a351-a00c-413c-8cc1-39a9674aa035" + ], + "x-ms-correlation-request-id": [ + "6d56a351-a00c-413c-8cc1-39a9674aa035" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210555Z:6d56a351-a00c-413c-8cc1-39a9674aa035" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:05:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799880" + ], + "x-ms-request-id": [ + "f979cf21-6576-4f1b-ba59-8721721da57c" + ], + "x-ms-correlation-request-id": [ + "f979cf21-6576-4f1b-ba59-8721721da57c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210558Z:f979cf21-6576-4f1b-ba59-8721721da57c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:05:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799878" + ], + "x-ms-request-id": [ + "a41aa8af-36bf-4641-b3d4-61b921ec7091" + ], + "x-ms-correlation-request-id": [ + "a41aa8af-36bf-4641-b3d4-61b921ec7091" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210601Z:a41aa8af-36bf-4641-b3d4-61b921ec7091" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799876" + ], + "x-ms-request-id": [ + "8f9fc173-53d5-405d-a0da-1fb5f88a5e31" + ], + "x-ms-correlation-request-id": [ + "8f9fc173-53d5-405d-a0da-1fb5f88a5e31" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210604Z:8f9fc173-53d5-405d-a0da-1fb5f88a5e31" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799874" + ], + "x-ms-request-id": [ + "7ed49813-d89e-42c6-844d-fad045e582a2" + ], + "x-ms-correlation-request-id": [ + "7ed49813-d89e-42c6-844d-fad045e582a2" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210607Z:7ed49813-d89e-42c6-844d-fad045e582a2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:07 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799872" + ], + "x-ms-request-id": [ + "89f338a2-07d0-49ad-a386-6c331e04598e" + ], + "x-ms-correlation-request-id": [ + "89f338a2-07d0-49ad-a386-6c331e04598e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210611Z:89f338a2-07d0-49ad-a386-6c331e04598e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799870" + ], + "x-ms-request-id": [ + "f77ebea2-f286-4de5-9f6f-cab4c72fcbac" + ], + "x-ms-correlation-request-id": [ + "f77ebea2-f286-4de5-9f6f-cab4c72fcbac" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210614Z:f77ebea2-f286-4de5-9f6f-cab4c72fcbac" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:14 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799868" + ], + "x-ms-request-id": [ + "5071e76b-7a5d-4ec0-a363-8cbb33bf7b30" + ], + "x-ms-correlation-request-id": [ + "5071e76b-7a5d-4ec0-a363-8cbb33bf7b30" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210617Z:5071e76b-7a5d-4ec0-a363-8cbb33bf7b30" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:17 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799866" + ], + "x-ms-request-id": [ + "829d24b8-60cd-49a2-a001-78d535e0f65d" + ], + "x-ms-correlation-request-id": [ + "829d24b8-60cd-49a2-a001-78d535e0f65d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210620Z:829d24b8-60cd-49a2-a001-78d535e0f65d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:20 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799864" + ], + "x-ms-request-id": [ + "4baca5c2-4351-4930-99b7-178219000b20" + ], + "x-ms-correlation-request-id": [ + "4baca5c2-4351-4930-99b7-178219000b20" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210623Z:4baca5c2-4351-4930-99b7-178219000b20" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799862" + ], + "x-ms-request-id": [ + "c4f8326b-084a-4a4e-be96-9d90478dbb5b" + ], + "x-ms-correlation-request-id": [ + "c4f8326b-084a-4a4e-be96-9d90478dbb5b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210627Z:c4f8326b-084a-4a4e-be96-9d90478dbb5b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:27 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup/operations/CF637863FD2FEB77\",\r\n \"operationId\": \"CF637863FD2FEB77\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:06:29.0683425Z\",\r\n \"trackingId\": \"984bffdb-289d-403f-b6bd-880a344ad411\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799860" + ], + "x-ms-request-id": [ + "563ca5a6-6ab1-4134-bbc1-df38e4991aad" + ], + "x-ms-correlation-request-id": [ + "563ca5a6-6ab1-4134-bbc1-df38e4991aad" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210630Z:563ca5a6-6ab1-4134-bbc1-df38e4991aad" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:30 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup/operations/CF637863FD2FEB77\",\r\n \"operationId\": \"CF637863FD2FEB77\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:06:29.0683425Z\",\r\n \"trackingId\": \"984bffdb-289d-403f-b6bd-880a344ad411\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799858" + ], + "x-ms-request-id": [ + "56e9bf40-ba60-4a0d-8ca6-37acc79736f7" + ], + "x-ms-correlation-request-id": [ + "56e9bf40-ba60-4a0d-8ca6-37acc79736f7" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210633Z:56e9bf40-ba60-4a0d-8ca6-37acc79736f7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup/operations/CF637863FD2FEB77\",\r\n \"operationId\": \"CF637863FD2FEB77\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:06:29.0683425Z\",\r\n \"trackingId\": \"984bffdb-289d-403f-b6bd-880a344ad411\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799856" + ], + "x-ms-request-id": [ + "220cde0a-d5ad-4917-b698-48f29d07c8c2" + ], + "x-ms-correlation-request-id": [ + "220cde0a-d5ad-4917-b698-48f29d07c8c2" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210636Z:220cde0a-d5ad-4917-b698-48f29d07c8c2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:36 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup/operations/A031536E3EB0C966\",\r\n \"operationId\": \"A031536E3EB0C966\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:06:38.1540497Z\",\r\n \"trackingId\": \"bfa4126b-be96-4b4a-a61c-faf1cebb11fc\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191/databases/sql-audit-cmdlet-db191\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191/sql-audit-cmdlet-db191\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup/operations/CF637863FD2FEB77\",\r\n \"operationId\": \"CF637863FD2FEB77\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:06:29.0683425Z\",\r\n \"trackingId\": \"984bffdb-289d-403f-b6bd-880a344ad411\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799854" + ], + "x-ms-request-id": [ + "ac2d655f-7829-44ed-afc6-a547e42b9971" + ], + "x-ms-correlation-request-id": [ + "ac2d655f-7829-44ed-afc6-a547e42b9971" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210639Z:ac2d655f-7829-44ed-afc6-a547e42b9971" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup/operations/A031536E3EB0C966\",\r\n \"operationId\": \"A031536E3EB0C966\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:06:38.1540497Z\",\r\n \"trackingId\": \"bfa4126b-be96-4b4a-a61c-faf1cebb11fc\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191/databases/sql-audit-cmdlet-db191\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191/sql-audit-cmdlet-db191\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup/operations/CF637863FD2FEB77\",\r\n \"operationId\": \"CF637863FD2FEB77\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:06:29.0683425Z\",\r\n \"trackingId\": \"984bffdb-289d-403f-b6bd-880a344ad411\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799852" + ], + "x-ms-request-id": [ + "f2e5ce20-53f9-4e11-b0c9-13ad6c80c64f" + ], + "x-ms-correlation-request-id": [ + "f2e5ce20-53f9-4e11-b0c9-13ad6c80c64f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210642Z:f2e5ce20-53f9-4e11-b0c9-13ad6c80c64f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db191\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server191\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:05:29.5922299Z\",\r\n \"correlationId\": \"c894e160-4706-477a-90ee-456aa88a73dc\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191/databases/sql-audit-cmdlet-db191\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191/sql-audit-cmdlet-db191\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799897" + ], + "x-ms-request-id": [ + "09c363e9-419d-4dc4-bda0-8598ab4da62f" + ], + "x-ms-correlation-request-id": [ + "09c363e9-419d-4dc4-bda0-8598ab4da62f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210531Z:09c363e9-419d-4dc4-bda0-8598ab4da62f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:05:31 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db191\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server191\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:05:32.0712419Z\",\r\n \"correlationId\": \"c894e160-4706-477a-90ee-456aa88a73dc\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191/databases/sql-audit-cmdlet-db191\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191/sql-audit-cmdlet-db191\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799895" + ], + "x-ms-request-id": [ + "87dae096-9153-44c0-9828-e7b8b6fcdc19" + ], + "x-ms-correlation-request-id": [ + "87dae096-9153-44c0-9828-e7b8b6fcdc19" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210534Z:87dae096-9153-44c0-9828-e7b8b6fcdc19" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:05:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db191\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server191\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:05:32.0712419Z\",\r\n \"correlationId\": \"c894e160-4706-477a-90ee-456aa88a73dc\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191/databases/sql-audit-cmdlet-db191\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191/sql-audit-cmdlet-db191\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799893" + ], + "x-ms-request-id": [ + "3a856e66-4da4-42a2-b147-3b77d61ad267" + ], + "x-ms-correlation-request-id": [ + "3a856e66-4da4-42a2-b147-3b77d61ad267" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210537Z:3a856e66-4da4-42a2-b147-3b77d61ad267" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:05:36 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db191\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server191\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:05:32.0712419Z\",\r\n \"correlationId\": \"c894e160-4706-477a-90ee-456aa88a73dc\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191/databases/sql-audit-cmdlet-db191\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191/sql-audit-cmdlet-db191\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799891" + ], + "x-ms-request-id": [ + "4c275e43-0a5f-4d7c-8f03-b471bb2bb72b" + ], + "x-ms-correlation-request-id": [ + "4c275e43-0a5f-4d7c-8f03-b471bb2bb72b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210540Z:4c275e43-0a5f-4d7c-8f03-b471bb2bb72b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:05:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db191\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server191\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:05:32.0712419Z\",\r\n \"correlationId\": \"c894e160-4706-477a-90ee-456aa88a73dc\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191/databases/sql-audit-cmdlet-db191\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191/sql-audit-cmdlet-db191\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799889" + ], + "x-ms-request-id": [ + "32a6bd94-e2cd-4967-b671-b06ffa39c2c6" + ], + "x-ms-correlation-request-id": [ + "32a6bd94-e2cd-4967-b671-b06ffa39c2c6" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210543Z:32a6bd94-e2cd-4967-b671-b06ffa39c2c6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:05:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db191\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server191\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:05:32.0712419Z\",\r\n \"correlationId\": \"c894e160-4706-477a-90ee-456aa88a73dc\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191/databases/sql-audit-cmdlet-db191\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191/sql-audit-cmdlet-db191\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799887" + ], + "x-ms-request-id": [ + "15376855-5089-4969-99a2-7458695cbc4c" + ], + "x-ms-correlation-request-id": [ + "15376855-5089-4969-99a2-7458695cbc4c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210546Z:15376855-5089-4969-99a2-7458695cbc4c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:05:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db191\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server191\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:05:32.0712419Z\",\r\n \"correlationId\": \"c894e160-4706-477a-90ee-456aa88a73dc\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191/databases/sql-audit-cmdlet-db191\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191/sql-audit-cmdlet-db191\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799885" + ], + "x-ms-request-id": [ + "4d569e81-87f7-4f06-b53d-bd9dd2df6051" + ], + "x-ms-correlation-request-id": [ + "4d569e81-87f7-4f06-b53d-bd9dd2df6051" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210549Z:4d569e81-87f7-4f06-b53d-bd9dd2df6051" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:05:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db191\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server191\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:05:32.0712419Z\",\r\n \"correlationId\": \"c894e160-4706-477a-90ee-456aa88a73dc\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191/databases/sql-audit-cmdlet-db191\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191/sql-audit-cmdlet-db191\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799883" + ], + "x-ms-request-id": [ + "e740e003-957f-4f35-941f-3ec87013ed63" + ], + "x-ms-correlation-request-id": [ + "e740e003-957f-4f35-941f-3ec87013ed63" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210553Z:e740e003-957f-4f35-941f-3ec87013ed63" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:05:52 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db191\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server191\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:05:32.0712419Z\",\r\n \"correlationId\": \"c894e160-4706-477a-90ee-456aa88a73dc\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191/databases/sql-audit-cmdlet-db191\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191/sql-audit-cmdlet-db191\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799881" + ], + "x-ms-request-id": [ + "e7a2e237-91fb-49f7-a8bb-77b338b4feb9" + ], + "x-ms-correlation-request-id": [ + "e7a2e237-91fb-49f7-a8bb-77b338b4feb9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210556Z:e7a2e237-91fb-49f7-a8bb-77b338b4feb9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:05:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db191\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server191\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:05:32.0712419Z\",\r\n \"correlationId\": \"c894e160-4706-477a-90ee-456aa88a73dc\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191/databases/sql-audit-cmdlet-db191\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191/sql-audit-cmdlet-db191\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799879" + ], + "x-ms-request-id": [ + "f8972f0b-d2a2-4ae0-a379-278f2bfb3115" + ], + "x-ms-correlation-request-id": [ + "f8972f0b-d2a2-4ae0-a379-278f2bfb3115" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210559Z:f8972f0b-d2a2-4ae0-a379-278f2bfb3115" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:05:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db191\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server191\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:05:32.0712419Z\",\r\n \"correlationId\": \"c894e160-4706-477a-90ee-456aa88a73dc\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191/databases/sql-audit-cmdlet-db191\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191/sql-audit-cmdlet-db191\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799877" + ], + "x-ms-request-id": [ + "321ea949-0bd3-468d-be6c-901df42421c0" + ], + "x-ms-correlation-request-id": [ + "321ea949-0bd3-468d-be6c-901df42421c0" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210602Z:321ea949-0bd3-468d-be6c-901df42421c0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db191\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server191\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:05:32.0712419Z\",\r\n \"correlationId\": \"c894e160-4706-477a-90ee-456aa88a73dc\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191/databases/sql-audit-cmdlet-db191\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191/sql-audit-cmdlet-db191\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799875" + ], + "x-ms-request-id": [ + "8cca9757-dc1f-4b54-b1b4-f72758db6695" + ], + "x-ms-correlation-request-id": [ + "8cca9757-dc1f-4b54-b1b4-f72758db6695" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210605Z:8cca9757-dc1f-4b54-b1b4-f72758db6695" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db191\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server191\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:05:32.0712419Z\",\r\n \"correlationId\": \"c894e160-4706-477a-90ee-456aa88a73dc\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191/databases/sql-audit-cmdlet-db191\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191/sql-audit-cmdlet-db191\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799873" + ], + "x-ms-request-id": [ + "473e86b2-57df-4541-abea-e95b488a7369" + ], + "x-ms-correlation-request-id": [ + "473e86b2-57df-4541-abea-e95b488a7369" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210608Z:473e86b2-57df-4541-abea-e95b488a7369" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:07 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db191\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server191\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:05:32.0712419Z\",\r\n \"correlationId\": \"c894e160-4706-477a-90ee-456aa88a73dc\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191/databases/sql-audit-cmdlet-db191\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191/sql-audit-cmdlet-db191\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799871" + ], + "x-ms-request-id": [ + "db030714-1db8-4cad-8144-1b0ce4518a37" + ], + "x-ms-correlation-request-id": [ + "db030714-1db8-4cad-8144-1b0ce4518a37" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210611Z:db030714-1db8-4cad-8144-1b0ce4518a37" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:11 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db191\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server191\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:05:32.0712419Z\",\r\n \"correlationId\": \"c894e160-4706-477a-90ee-456aa88a73dc\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191/databases/sql-audit-cmdlet-db191\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191/sql-audit-cmdlet-db191\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799869" + ], + "x-ms-request-id": [ + "f0c48d20-ba6b-488f-86fa-5e57bd143237" + ], + "x-ms-correlation-request-id": [ + "f0c48d20-ba6b-488f-86fa-5e57bd143237" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210614Z:f0c48d20-ba6b-488f-86fa-5e57bd143237" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:14 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db191\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server191\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:05:32.0712419Z\",\r\n \"correlationId\": \"c894e160-4706-477a-90ee-456aa88a73dc\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191/databases/sql-audit-cmdlet-db191\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191/sql-audit-cmdlet-db191\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799867" + ], + "x-ms-request-id": [ + "ea1bed52-58c8-4c09-bd19-db6cbeb34afc" + ], + "x-ms-correlation-request-id": [ + "ea1bed52-58c8-4c09-bd19-db6cbeb34afc" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210617Z:ea1bed52-58c8-4c09-bd19-db6cbeb34afc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:17 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db191\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server191\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:05:32.0712419Z\",\r\n \"correlationId\": \"c894e160-4706-477a-90ee-456aa88a73dc\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191/databases/sql-audit-cmdlet-db191\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191/sql-audit-cmdlet-db191\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799865" + ], + "x-ms-request-id": [ + "137601f9-796a-4671-88b7-9e6171e0d139" + ], + "x-ms-correlation-request-id": [ + "137601f9-796a-4671-88b7-9e6171e0d139" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210621Z:137601f9-796a-4671-88b7-9e6171e0d139" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:20 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db191\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server191\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:05:32.0712419Z\",\r\n \"correlationId\": \"c894e160-4706-477a-90ee-456aa88a73dc\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191/databases/sql-audit-cmdlet-db191\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191/sql-audit-cmdlet-db191\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799863" + ], + "x-ms-request-id": [ + "daa36d39-f35b-4bea-bb69-af446852881a" + ], + "x-ms-correlation-request-id": [ + "daa36d39-f35b-4bea-bb69-af446852881a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210624Z:daa36d39-f35b-4bea-bb69-af446852881a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db191\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server191\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:05:32.0712419Z\",\r\n \"correlationId\": \"c894e160-4706-477a-90ee-456aa88a73dc\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191/databases/sql-audit-cmdlet-db191\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191/sql-audit-cmdlet-db191\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799861" + ], + "x-ms-request-id": [ + "14892ddc-242f-4754-bcc4-8a61d3375530" + ], + "x-ms-correlation-request-id": [ + "14892ddc-242f-4754-bcc4-8a61d3375530" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210627Z:14892ddc-242f-4754-bcc4-8a61d3375530" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:27 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db191\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server191\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:05:32.0712419Z\",\r\n \"correlationId\": \"c894e160-4706-477a-90ee-456aa88a73dc\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191/databases/sql-audit-cmdlet-db191\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191/sql-audit-cmdlet-db191\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799859" + ], + "x-ms-request-id": [ + "9c6ddb9e-6b5f-4e5d-8a6f-9c37296b78f3" + ], + "x-ms-correlation-request-id": [ + "9c6ddb9e-6b5f-4e5d-8a6f-9c37296b78f3" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210630Z:9c6ddb9e-6b5f-4e5d-8a6f-9c37296b78f3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:30 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db191\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server191\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:05:32.0712419Z\",\r\n \"correlationId\": \"c894e160-4706-477a-90ee-456aa88a73dc\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191/databases/sql-audit-cmdlet-db191\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191/sql-audit-cmdlet-db191\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799857" + ], + "x-ms-request-id": [ + "66acc2aa-46f5-4774-9518-c203486285ff" + ], + "x-ms-correlation-request-id": [ + "66acc2aa-46f5-4774-9518-c203486285ff" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210633Z:66acc2aa-46f5-4774-9518-c203486285ff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db191\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server191\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:05:32.0712419Z\",\r\n \"correlationId\": \"c894e160-4706-477a-90ee-456aa88a73dc\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191/databases/sql-audit-cmdlet-db191\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191/sql-audit-cmdlet-db191\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799855" + ], + "x-ms-request-id": [ + "d5738160-80f9-4edb-b478-9062c7474dcb" + ], + "x-ms-correlation-request-id": [ + "d5738160-80f9-4edb-b478-9062c7474dcb" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210636Z:d5738160-80f9-4edb-b478-9062c7474dcb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:36 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db191\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server191\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:05:32.0712419Z\",\r\n \"correlationId\": \"c894e160-4706-477a-90ee-456aa88a73dc\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191/databases/sql-audit-cmdlet-db191\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191/sql-audit-cmdlet-db191\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799853" + ], + "x-ms-request-id": [ + "56f8e362-3983-4d7d-bd35-cce6d53e2b86" + ], + "x-ms-correlation-request-id": [ + "56f8e362-3983-4d7d-bd35-cce6d53e2b86" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210639Z:56f8e362-3983-4d7d-bd35-cce6d53e2b86" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db191\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server191\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:06:42.219599Z\",\r\n \"correlationId\": \"c894e160-4706-477a-90ee-456aa88a73dc\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191/databases/sql-audit-cmdlet-db191\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server191/sql-audit-cmdlet-db191\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799851" + ], + "x-ms-request-id": [ + "dda1e3f7-b312-457c-99f4-f2ee7f1c0d98" + ], + "x-ms-correlation-request-id": [ + "dda1e3f7-b312-457c-99f4-f2ee7f1c0d98" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210643Z:dda1e3f7-b312-457c-99f4-f2ee7f1c0d98" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191\",\r\n \"name\": \"sql-audit-cmdlet-server191\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191/databases/sql-audit-cmdlet-db191\",\r\n \"name\": \"sql-audit-cmdlet-server191/sql-audit-cmdlet-db191\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "577" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799850" + ], + "x-ms-request-id": [ + "50d68b1e-359f-4ce9-a4ab-3998bc4397e5" + ], + "x-ms-correlation-request-id": [ + "50d68b1e-359f-4ce9-a4ab-3998bc4397e5" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210645Z:50d68b1e-359f-4ce9-a4ab-3998bc4397e5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westeurope:5bc3c00c-8b54-4637-92bb-c324f39c3002" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799993" + ], + "x-ms-correlation-request-id": [ + "bdc8df19-866f-49bc-bfb2-cf919af39946" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210645Z:bdc8df19-866f-49bc-bfb2-cf919af39946" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/NONEXISTING-RG/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL05PTkVYSVNUSU5HLVJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuU3FsL3NlcnZlcnMvc3FsLWF1ZGl0LWNtZGxldC1zZXJ2ZXIxOTEvZGF0YWJhc2VTZWN1cml0eVBvbGljaWVzL2MzZDkwNWJiLWU0NjAtNDhiYi04ODRkLTc1ZmFjOGY2M2UxMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "00277a1b-ac9f-439e-8435-809bc054ddb7-2014-10-31 21:06:47Z" + ], + "x-ms-client-request-id": [ + "7f6d0aa5-6b1f-4301-8477-d92e0294f459-2014-10-31 21:06:47Z" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceGroupNotFound\",\r\n \"message\": \"Resource group 'NONEXISTING-RG' could not be found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "106" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "ce3f3b61-0a50-456b-b1c7-5431493c70c4" + ], + "x-ms-correlation-request-id": [ + "ce3f3b61-0a50-456b-b1c7-5431493c70c4" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210646Z:ce3f3b61-0a50-456b-b1c7-5431493c70c4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:46 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/NONEXISTING-RG/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server191/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL05PTkVYSVNUSU5HLVJHL3Byb3ZpZGVycy9NaWNyb3NvZnQuU3FsL3NlcnZlcnMvc3FsLWF1ZGl0LWNtZGxldC1zZXJ2ZXIxOTEvZGF0YWJhc2VTZWN1cml0eVBvbGljaWVzL2MzZDkwNWJiLWU0NjAtNDhiYi04ODRkLTc1ZmFjOGY2M2UxMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "00277a1b-ac9f-439e-8435-809bc054ddb7-2014-10-31 21:06:47Z" + ], + "x-ms-client-request-id": [ + "c1c40604-f495-4f29-9ac3-7e9986b6b1e0-2014-10-31 21:06:48Z" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceGroupNotFound\",\r\n \"message\": \"Resource group 'NONEXISTING-RG' could not be found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "106" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "2ecdd0c6-2a16-4cef-8ded-73ef9eae7932" + ], + "x-ms-correlation-request-id": [ + "2ecdd0c6-2a16-4cef-8ded-73ef9eae7932" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210647Z:2ecdd0c6-2a16-4cef-8ded-73ef9eae7932" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:47 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/NONEXISTING-SERVER/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL05PTkVYSVNUSU5HLVNFUlZFUi9kYXRhYmFzZVNlY3VyaXR5UG9saWNpZXMvYzNkOTA1YmItZTQ2MC00OGJiLTg4NGQtNzVmYWM4ZjYzZTExP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "00277a1b-ac9f-439e-8435-809bc054ddb7-2014-10-31 21:06:47Z" + ], + "x-ms-client-request-id": [ + "f6469cb5-4eb0-446f-a864-19ff942bc18f-2014-10-31 21:06:48Z" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ParentResourceNotFound\",\r\n \"message\": \"Can not create nested resource. Parent resource 'NONEXISTING-SERVER' not found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "135" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "ec771030-bd40-4ea1-a283-9a65616e0987" + ], + "x-ms-correlation-request-id": [ + "ec771030-bd40-4ea1-a283-9a65616e0987" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210647Z:ec771030-bd40-4ea1-a283-9a65616e0987" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:47 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg191/providers/Microsoft.Sql/servers/NONEXISTING-SERVER/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE5MS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL05PTkVYSVNUSU5HLVNFUlZFUi9kYXRhYmFzZVNlY3VyaXR5UG9saWNpZXMvYzNkOTA1YmItZTQ2MC00OGJiLTg4NGQtNzVmYWM4ZjYzZTExP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "00277a1b-ac9f-439e-8435-809bc054ddb7-2014-10-31 21:06:47Z" + ], + "x-ms-client-request-id": [ + "553400f3-6ffc-4b77-aae1-4dd14c1aa76d-2014-10-31 21:06:48Z" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ParentResourceNotFound\",\r\n \"message\": \"Can not create nested resource. Parent resource 'NONEXISTING-SERVER' not found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "135" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "c1f18389-3c01-41ed-9174-022438eb48d5" + ], + "x-ms-correlation-request-id": [ + "c1f18389-3c01-41ed-9174-022438eb48d5" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210647Z:c1f18389-3c01-41ed-9174-022438eb48d5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:47 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices/auditcmdlets191", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXMvYXVkaXRjbWRsZXRzMTkx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "683712e7847b248b91ff094239fa5d96" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:52 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/683712e7847b248b91ff094239fa5d96", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zLzY4MzcxMmU3ODQ3YjI0OGI5MWZmMDk0MjM5ZmE1ZDk2", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/2.0.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "\r\n 683712e7-847b-248b-91ff-094239fa5d96\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "14e8a550b0452525a674f3d5d929e607" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:06:53 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "cca24ec8-99b5-4aa7-9ff6-486e886f304c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestFailedDatabaseUpdatePolicyWithNoStorage.json b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestFailedDatabaseUpdatePolicyWithNoStorage.json new file mode 100644 index 000000000000..b791b4a92a7f --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestFailedDatabaseUpdatePolicyWithNoStorage.json @@ -0,0 +1,2840 @@ +{ + "Entries": [ + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXM=", + "RequestMethod": "POST", + "RequestBody": "\r\n auditcmdlets151\r\n \r\n \r\n West US\r\n \r\n Standard_GRS\r\n", + "RequestHeaders": { + "Content-Type": [ + "application/xml" + ], + "Content-Length": [ + "379" + ], + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "1064" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "c30c56a821ea233d8ccfd062bff2213a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:44:10 GMT" + ], + "Location": [ + "https://management.core.windows.net/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/storage/auditcmdlets151" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/c30c56a821ea233d8ccfd062bff2213a", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zL2MzMGM1NmE4MjFlYTIzM2Q4Y2NmZDA2MmJmZjIyMTNh", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "1064" + ] + }, + "ResponseBody": "\r\n c30c56a8-21ea-233d-8ccf-d062bff2213a\r\n InProgress\r\n", + "ResponseHeaders": { + "Content-Length": [ + "197" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "4b3cd18fa9f42cd79a3cc60b1872b003" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:44:10 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/c30c56a821ea233d8ccfd062bff2213a", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zL2MzMGM1NmE4MjFlYTIzM2Q4Y2NmZDA2MmJmZjIyMTNh", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "1064" + ] + }, + "ResponseBody": "\r\n c30c56a8-21ea-233d-8ccf-d062bff2213a\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "302ecb69bdad2dfbaa10aa323da9192e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:44:41 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "119" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799978" + ], + "x-ms-request-id": [ + "c2be677b-ebf3-4dec-9d9c-425bb81a506c" + ], + "x-ms-correlation-request-id": [ + "c2be677b-ebf3-4dec-9d9c-425bb81a506c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214443Z:c2be677b-ebf3-4dec-9d9c-425bb81a506c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:44:42 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151\",\r\n \"name\": \"sql-audit-cmdlet-test-rg151\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "217" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11980" + ], + "x-ms-request-id": [ + "483c13cb-ba4b-4059-8879-3b4739322928" + ], + "x-ms-correlation-request-id": [ + "483c13cb-ba4b-4059-8879-3b4739322928" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214444Z:483c13cb-ba4b-4059-8879-3b4739322928" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:44:44 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup/validate?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvdmFsaWRhdGU/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db151\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server151\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db151\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server151\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:44:45.6654774Z\",\r\n \"correlationId\": \"dd017e51-c517-4f0e-bca3-78770ed3c41f\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151/databases/sql-audit-cmdlet-db151\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151/sql-audit-cmdlet-db151\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11979" + ], + "x-ms-request-id": [ + "dd017e51-c517-4f0e-bca3-78770ed3c41f" + ], + "x-ms-correlation-request-id": [ + "dd017e51-c517-4f0e-bca3-78770ed3c41f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214445Z:dd017e51-c517-4f0e-bca3-78770ed3c41f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:44:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db151\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server151\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db151\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server151\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:44:47.2653147Z\",\r\n \"correlationId\": \"762eb91e-42e8-415f-99ad-7095615c0a7b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151/databases/sql-audit-cmdlet-db151\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151/sql-audit-cmdlet-db151\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11978" + ], + "x-ms-request-id": [ + "762eb91e-42e8-415f-99ad-7095615c0a7b" + ], + "x-ms-correlation-request-id": [ + "762eb91e-42e8-415f-99ad-7095615c0a7b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214447Z:762eb91e-42e8-415f-99ad-7095615c0a7b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:44:47 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799977" + ], + "x-ms-request-id": [ + "20884fc0-f0e3-4e50-8546-3d73dedbe505" + ], + "x-ms-correlation-request-id": [ + "20884fc0-f0e3-4e50-8546-3d73dedbe505" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214448Z:20884fc0-f0e3-4e50-8546-3d73dedbe505" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:44:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799975" + ], + "x-ms-request-id": [ + "a4d4af31-b53a-4ff9-bbb6-c1de2c19e682" + ], + "x-ms-correlation-request-id": [ + "a4d4af31-b53a-4ff9-bbb6-c1de2c19e682" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214451Z:a4d4af31-b53a-4ff9-bbb6-c1de2c19e682" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:44:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799973" + ], + "x-ms-request-id": [ + "677c1dd5-5610-4314-9890-933e04470dc9" + ], + "x-ms-correlation-request-id": [ + "677c1dd5-5610-4314-9890-933e04470dc9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214454Z:677c1dd5-5610-4314-9890-933e04470dc9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:44:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799971" + ], + "x-ms-request-id": [ + "a351ad06-1744-41d4-88f0-c650aede6dc5" + ], + "x-ms-correlation-request-id": [ + "a351ad06-1744-41d4-88f0-c650aede6dc5" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214457Z:a351ad06-1744-41d4-88f0-c650aede6dc5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:44:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799969" + ], + "x-ms-request-id": [ + "2f937f2c-0357-47fd-81f0-87eaddbc33f9" + ], + "x-ms-correlation-request-id": [ + "2f937f2c-0357-47fd-81f0-87eaddbc33f9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214500Z:2f937f2c-0357-47fd-81f0-87eaddbc33f9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799967" + ], + "x-ms-request-id": [ + "8bdddb87-9daf-446d-98d5-0f4296963e8d" + ], + "x-ms-correlation-request-id": [ + "8bdddb87-9daf-446d-98d5-0f4296963e8d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214503Z:8bdddb87-9daf-446d-98d5-0f4296963e8d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799965" + ], + "x-ms-request-id": [ + "0ab71866-4bfd-476f-8630-ab0015fb8f9e" + ], + "x-ms-correlation-request-id": [ + "0ab71866-4bfd-476f-8630-ab0015fb8f9e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214506Z:0ab71866-4bfd-476f-8630-ab0015fb8f9e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799963" + ], + "x-ms-request-id": [ + "364e781e-0066-4af9-887d-afb8923a6bed" + ], + "x-ms-correlation-request-id": [ + "364e781e-0066-4af9-887d-afb8923a6bed" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214509Z:364e781e-0066-4af9-887d-afb8923a6bed" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:09 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799961" + ], + "x-ms-request-id": [ + "9dafdc60-2efa-4f63-a07b-9e3cd4af5023" + ], + "x-ms-correlation-request-id": [ + "9dafdc60-2efa-4f63-a07b-9e3cd4af5023" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214512Z:9dafdc60-2efa-4f63-a07b-9e3cd4af5023" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:12 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799959" + ], + "x-ms-request-id": [ + "2eb05765-2b31-4c96-97bd-6d170238b047" + ], + "x-ms-correlation-request-id": [ + "2eb05765-2b31-4c96-97bd-6d170238b047" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214515Z:2eb05765-2b31-4c96-97bd-6d170238b047" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:15 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799957" + ], + "x-ms-request-id": [ + "b66e1de6-335c-4d2a-9f2a-1c44f6452b51" + ], + "x-ms-correlation-request-id": [ + "b66e1de6-335c-4d2a-9f2a-1c44f6452b51" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214518Z:b66e1de6-335c-4d2a-9f2a-1c44f6452b51" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:18 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799955" + ], + "x-ms-request-id": [ + "d81aa9d9-fd3d-4a34-8b53-93b566b3a3c2" + ], + "x-ms-correlation-request-id": [ + "d81aa9d9-fd3d-4a34-8b53-93b566b3a3c2" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214521Z:d81aa9d9-fd3d-4a34-8b53-93b566b3a3c2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:21 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799953" + ], + "x-ms-request-id": [ + "6196734b-9cc5-4722-b5b1-b5cb558bb9d4" + ], + "x-ms-correlation-request-id": [ + "6196734b-9cc5-4722-b5b1-b5cb558bb9d4" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214525Z:6196734b-9cc5-4722-b5b1-b5cb558bb9d4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799951" + ], + "x-ms-request-id": [ + "0b305e59-ad63-47e2-a3ab-daa795c34ae4" + ], + "x-ms-correlation-request-id": [ + "0b305e59-ad63-47e2-a3ab-daa795c34ae4" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214528Z:0b305e59-ad63-47e2-a3ab-daa795c34ae4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799949" + ], + "x-ms-request-id": [ + "3df57a13-5114-4374-9ca4-d2bee2c0a1d4" + ], + "x-ms-correlation-request-id": [ + "3df57a13-5114-4374-9ca4-d2bee2c0a1d4" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214531Z:3df57a13-5114-4374-9ca4-d2bee2c0a1d4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:30 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799947" + ], + "x-ms-request-id": [ + "7b36e036-d971-4f65-887f-7bb78b7268bd" + ], + "x-ms-correlation-request-id": [ + "7b36e036-d971-4f65-887f-7bb78b7268bd" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214534Z:7b36e036-d971-4f65-887f-7bb78b7268bd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:34 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799945" + ], + "x-ms-request-id": [ + "0044bdc0-c720-4ea1-804e-893121c36a32" + ], + "x-ms-correlation-request-id": [ + "0044bdc0-c720-4ea1-804e-893121c36a32" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214537Z:0044bdc0-c720-4ea1-804e-893121c36a32" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:36 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799943" + ], + "x-ms-request-id": [ + "ca38b8d8-244c-4993-8920-66358897ce64" + ], + "x-ms-correlation-request-id": [ + "ca38b8d8-244c-4993-8920-66358897ce64" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214540Z:ca38b8d8-244c-4993-8920-66358897ce64" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799941" + ], + "x-ms-request-id": [ + "207739fd-91f7-493c-877f-5ed494021906" + ], + "x-ms-correlation-request-id": [ + "207739fd-91f7-493c-877f-5ed494021906" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214543Z:207739fd-91f7-493c-877f-5ed494021906" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup/operations/998F3AB3E2AF54D2\",\r\n \"operationId\": \"998F3AB3E2AF54D2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:45:45.3427802Z\",\r\n \"trackingId\": \"f2a834f7-56ef-4655-a8dd-ff7dbe9b6f09\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799939" + ], + "x-ms-request-id": [ + "5b033fb0-0899-40f6-8a1f-a2159043382c" + ], + "x-ms-correlation-request-id": [ + "5b033fb0-0899-40f6-8a1f-a2159043382c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214546Z:5b033fb0-0899-40f6-8a1f-a2159043382c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup/operations/998F3AB3E2AF54D2\",\r\n \"operationId\": \"998F3AB3E2AF54D2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:45:45.3427802Z\",\r\n \"trackingId\": \"f2a834f7-56ef-4655-a8dd-ff7dbe9b6f09\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799937" + ], + "x-ms-request-id": [ + "d53608b7-e6e5-4ec4-9909-1f97f3dca73e" + ], + "x-ms-correlation-request-id": [ + "d53608b7-e6e5-4ec4-9909-1f97f3dca73e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214549Z:d53608b7-e6e5-4ec4-9909-1f97f3dca73e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup/operations/998F3AB3E2AF54D2\",\r\n \"operationId\": \"998F3AB3E2AF54D2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:45:45.3427802Z\",\r\n \"trackingId\": \"f2a834f7-56ef-4655-a8dd-ff7dbe9b6f09\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799935" + ], + "x-ms-request-id": [ + "295f163e-c1b5-469c-a25f-c7d363e71db1" + ], + "x-ms-correlation-request-id": [ + "295f163e-c1b5-469c-a25f-c7d363e71db1" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214552Z:295f163e-c1b5-469c-a25f-c7d363e71db1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:52 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup/operations/A6B2323CBC15A55A\",\r\n \"operationId\": \"A6B2323CBC15A55A\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:45:53.9307266Z\",\r\n \"trackingId\": \"6b9347ba-35e5-456c-b5e4-51558b0e94f0\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151/databases/sql-audit-cmdlet-db151\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151/sql-audit-cmdlet-db151\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup/operations/998F3AB3E2AF54D2\",\r\n \"operationId\": \"998F3AB3E2AF54D2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:45:45.3427802Z\",\r\n \"trackingId\": \"f2a834f7-56ef-4655-a8dd-ff7dbe9b6f09\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799933" + ], + "x-ms-request-id": [ + "0c645083-8a38-494b-b427-f67655b7bf10" + ], + "x-ms-correlation-request-id": [ + "0c645083-8a38-494b-b427-f67655b7bf10" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214556Z:0c645083-8a38-494b-b427-f67655b7bf10" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:56 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup/operations/A6B2323CBC15A55A\",\r\n \"operationId\": \"A6B2323CBC15A55A\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:45:53.9307266Z\",\r\n \"trackingId\": \"6b9347ba-35e5-456c-b5e4-51558b0e94f0\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151/databases/sql-audit-cmdlet-db151\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151/sql-audit-cmdlet-db151\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup/operations/998F3AB3E2AF54D2\",\r\n \"operationId\": \"998F3AB3E2AF54D2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:45:45.3427802Z\",\r\n \"trackingId\": \"f2a834f7-56ef-4655-a8dd-ff7dbe9b6f09\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799931" + ], + "x-ms-request-id": [ + "125e12a6-57f0-40c5-8723-b2562f2dba29" + ], + "x-ms-correlation-request-id": [ + "125e12a6-57f0-40c5-8723-b2562f2dba29" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214559Z:125e12a6-57f0-40c5-8723-b2562f2dba29" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db151\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server151\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:44:47.2653147Z\",\r\n \"correlationId\": \"762eb91e-42e8-415f-99ad-7095615c0a7b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151/databases/sql-audit-cmdlet-db151\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151/sql-audit-cmdlet-db151\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799976" + ], + "x-ms-request-id": [ + "0a20e264-54bb-4db8-9463-9741828d044d" + ], + "x-ms-correlation-request-id": [ + "0a20e264-54bb-4db8-9463-9741828d044d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214448Z:0a20e264-54bb-4db8-9463-9741828d044d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:44:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db151\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server151\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:44:49.9898142Z\",\r\n \"correlationId\": \"762eb91e-42e8-415f-99ad-7095615c0a7b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151/databases/sql-audit-cmdlet-db151\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151/sql-audit-cmdlet-db151\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799974" + ], + "x-ms-request-id": [ + "9153f3b0-f06f-4fea-893c-357119f3eca5" + ], + "x-ms-correlation-request-id": [ + "9153f3b0-f06f-4fea-893c-357119f3eca5" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214451Z:9153f3b0-f06f-4fea-893c-357119f3eca5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:44:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db151\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server151\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:44:49.9898142Z\",\r\n \"correlationId\": \"762eb91e-42e8-415f-99ad-7095615c0a7b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151/databases/sql-audit-cmdlet-db151\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151/sql-audit-cmdlet-db151\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799972" + ], + "x-ms-request-id": [ + "a10934b6-0bd4-45ae-963c-8ef8c11e259d" + ], + "x-ms-correlation-request-id": [ + "a10934b6-0bd4-45ae-963c-8ef8c11e259d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214454Z:a10934b6-0bd4-45ae-963c-8ef8c11e259d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:44:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db151\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server151\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:44:49.9898142Z\",\r\n \"correlationId\": \"762eb91e-42e8-415f-99ad-7095615c0a7b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151/databases/sql-audit-cmdlet-db151\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151/sql-audit-cmdlet-db151\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799970" + ], + "x-ms-request-id": [ + "9a88a391-75cc-4d1f-ac2b-2b5fdb5d5350" + ], + "x-ms-correlation-request-id": [ + "9a88a391-75cc-4d1f-ac2b-2b5fdb5d5350" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214458Z:9a88a391-75cc-4d1f-ac2b-2b5fdb5d5350" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:44:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db151\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server151\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:44:49.9898142Z\",\r\n \"correlationId\": \"762eb91e-42e8-415f-99ad-7095615c0a7b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151/databases/sql-audit-cmdlet-db151\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151/sql-audit-cmdlet-db151\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799968" + ], + "x-ms-request-id": [ + "0deb939d-4096-4d93-9348-3a0d51820029" + ], + "x-ms-correlation-request-id": [ + "0deb939d-4096-4d93-9348-3a0d51820029" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214501Z:0deb939d-4096-4d93-9348-3a0d51820029" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db151\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server151\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:44:49.9898142Z\",\r\n \"correlationId\": \"762eb91e-42e8-415f-99ad-7095615c0a7b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151/databases/sql-audit-cmdlet-db151\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151/sql-audit-cmdlet-db151\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799966" + ], + "x-ms-request-id": [ + "96117858-0d89-45da-bc3f-012f4b7c8b2f" + ], + "x-ms-correlation-request-id": [ + "96117858-0d89-45da-bc3f-012f4b7c8b2f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214504Z:96117858-0d89-45da-bc3f-012f4b7c8b2f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db151\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server151\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:44:49.9898142Z\",\r\n \"correlationId\": \"762eb91e-42e8-415f-99ad-7095615c0a7b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151/databases/sql-audit-cmdlet-db151\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151/sql-audit-cmdlet-db151\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799964" + ], + "x-ms-request-id": [ + "f546682a-d98a-41ee-92f8-be8aaa81d710" + ], + "x-ms-correlation-request-id": [ + "f546682a-d98a-41ee-92f8-be8aaa81d710" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214507Z:f546682a-d98a-41ee-92f8-be8aaa81d710" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db151\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server151\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:44:49.9898142Z\",\r\n \"correlationId\": \"762eb91e-42e8-415f-99ad-7095615c0a7b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151/databases/sql-audit-cmdlet-db151\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151/sql-audit-cmdlet-db151\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799962" + ], + "x-ms-request-id": [ + "a5e081bc-8938-49f3-8ede-58ef1d05fe89" + ], + "x-ms-correlation-request-id": [ + "a5e081bc-8938-49f3-8ede-58ef1d05fe89" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214510Z:a5e081bc-8938-49f3-8ede-58ef1d05fe89" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:09 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db151\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server151\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:44:49.9898142Z\",\r\n \"correlationId\": \"762eb91e-42e8-415f-99ad-7095615c0a7b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151/databases/sql-audit-cmdlet-db151\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151/sql-audit-cmdlet-db151\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799960" + ], + "x-ms-request-id": [ + "a12541ab-4ded-4ae5-b1e0-a769d33cf683" + ], + "x-ms-correlation-request-id": [ + "a12541ab-4ded-4ae5-b1e0-a769d33cf683" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214513Z:a12541ab-4ded-4ae5-b1e0-a769d33cf683" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:12 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db151\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server151\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:44:49.9898142Z\",\r\n \"correlationId\": \"762eb91e-42e8-415f-99ad-7095615c0a7b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151/databases/sql-audit-cmdlet-db151\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151/sql-audit-cmdlet-db151\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799958" + ], + "x-ms-request-id": [ + "0c535ccd-e72f-4c4b-97ba-05ce3f942e1d" + ], + "x-ms-correlation-request-id": [ + "0c535ccd-e72f-4c4b-97ba-05ce3f942e1d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214516Z:0c535ccd-e72f-4c4b-97ba-05ce3f942e1d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:15 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db151\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server151\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:44:49.9898142Z\",\r\n \"correlationId\": \"762eb91e-42e8-415f-99ad-7095615c0a7b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151/databases/sql-audit-cmdlet-db151\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151/sql-audit-cmdlet-db151\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799956" + ], + "x-ms-request-id": [ + "15f9bcfe-c15d-45e4-ad59-c8981fed1efa" + ], + "x-ms-correlation-request-id": [ + "15f9bcfe-c15d-45e4-ad59-c8981fed1efa" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214519Z:15f9bcfe-c15d-45e4-ad59-c8981fed1efa" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db151\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server151\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:44:49.9898142Z\",\r\n \"correlationId\": \"762eb91e-42e8-415f-99ad-7095615c0a7b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151/databases/sql-audit-cmdlet-db151\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151/sql-audit-cmdlet-db151\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799954" + ], + "x-ms-request-id": [ + "66bd5c3e-6514-4d69-83b4-817a84099120" + ], + "x-ms-correlation-request-id": [ + "66bd5c3e-6514-4d69-83b4-817a84099120" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214522Z:66bd5c3e-6514-4d69-83b4-817a84099120" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:21 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db151\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server151\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:44:49.9898142Z\",\r\n \"correlationId\": \"762eb91e-42e8-415f-99ad-7095615c0a7b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151/databases/sql-audit-cmdlet-db151\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151/sql-audit-cmdlet-db151\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799952" + ], + "x-ms-request-id": [ + "e21a7fe0-9fc7-4fb6-abe5-c1f4ee3b1ee0" + ], + "x-ms-correlation-request-id": [ + "e21a7fe0-9fc7-4fb6-abe5-c1f4ee3b1ee0" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214525Z:e21a7fe0-9fc7-4fb6-abe5-c1f4ee3b1ee0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:25 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db151\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server151\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:44:49.9898142Z\",\r\n \"correlationId\": \"762eb91e-42e8-415f-99ad-7095615c0a7b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151/databases/sql-audit-cmdlet-db151\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151/sql-audit-cmdlet-db151\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799950" + ], + "x-ms-request-id": [ + "1a71f8e6-e396-4653-a14d-2d7c238e3aa1" + ], + "x-ms-correlation-request-id": [ + "1a71f8e6-e396-4653-a14d-2d7c238e3aa1" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214528Z:1a71f8e6-e396-4653-a14d-2d7c238e3aa1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db151\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server151\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:44:49.9898142Z\",\r\n \"correlationId\": \"762eb91e-42e8-415f-99ad-7095615c0a7b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151/databases/sql-audit-cmdlet-db151\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151/sql-audit-cmdlet-db151\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799948" + ], + "x-ms-request-id": [ + "323d9599-c88d-4da0-89cc-088e3ad080df" + ], + "x-ms-correlation-request-id": [ + "323d9599-c88d-4da0-89cc-088e3ad080df" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214531Z:323d9599-c88d-4da0-89cc-088e3ad080df" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:31 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db151\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server151\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:44:49.9898142Z\",\r\n \"correlationId\": \"762eb91e-42e8-415f-99ad-7095615c0a7b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151/databases/sql-audit-cmdlet-db151\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151/sql-audit-cmdlet-db151\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799946" + ], + "x-ms-request-id": [ + "792f20c3-8e99-43e5-909f-585db74c6b33" + ], + "x-ms-correlation-request-id": [ + "792f20c3-8e99-43e5-909f-585db74c6b33" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214534Z:792f20c3-8e99-43e5-909f-585db74c6b33" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:34 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db151\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server151\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:44:49.9898142Z\",\r\n \"correlationId\": \"762eb91e-42e8-415f-99ad-7095615c0a7b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151/databases/sql-audit-cmdlet-db151\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151/sql-audit-cmdlet-db151\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799944" + ], + "x-ms-request-id": [ + "7d65534e-8acb-4729-ad7c-48d1f9241223" + ], + "x-ms-correlation-request-id": [ + "7d65534e-8acb-4729-ad7c-48d1f9241223" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214537Z:7d65534e-8acb-4729-ad7c-48d1f9241223" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:36 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db151\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server151\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:44:49.9898142Z\",\r\n \"correlationId\": \"762eb91e-42e8-415f-99ad-7095615c0a7b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151/databases/sql-audit-cmdlet-db151\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151/sql-audit-cmdlet-db151\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799942" + ], + "x-ms-request-id": [ + "6268ad9a-4f7b-462d-8654-dc28dbd75ad6" + ], + "x-ms-correlation-request-id": [ + "6268ad9a-4f7b-462d-8654-dc28dbd75ad6" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214540Z:6268ad9a-4f7b-462d-8654-dc28dbd75ad6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db151\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server151\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:44:49.9898142Z\",\r\n \"correlationId\": \"762eb91e-42e8-415f-99ad-7095615c0a7b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151/databases/sql-audit-cmdlet-db151\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151/sql-audit-cmdlet-db151\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799940" + ], + "x-ms-request-id": [ + "7848455a-28c5-4674-93d7-a53deb60afa6" + ], + "x-ms-correlation-request-id": [ + "7848455a-28c5-4674-93d7-a53deb60afa6" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214543Z:7848455a-28c5-4674-93d7-a53deb60afa6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db151\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server151\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:44:49.9898142Z\",\r\n \"correlationId\": \"762eb91e-42e8-415f-99ad-7095615c0a7b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151/databases/sql-audit-cmdlet-db151\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151/sql-audit-cmdlet-db151\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799938" + ], + "x-ms-request-id": [ + "d8cbc881-1777-427c-a8f6-ea4d1925e461" + ], + "x-ms-correlation-request-id": [ + "d8cbc881-1777-427c-a8f6-ea4d1925e461" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214547Z:d8cbc881-1777-427c-a8f6-ea4d1925e461" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db151\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server151\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:44:49.9898142Z\",\r\n \"correlationId\": \"762eb91e-42e8-415f-99ad-7095615c0a7b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151/databases/sql-audit-cmdlet-db151\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151/sql-audit-cmdlet-db151\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799936" + ], + "x-ms-request-id": [ + "6f86cf93-3be6-4683-b880-2d5e3c75c3e5" + ], + "x-ms-correlation-request-id": [ + "6f86cf93-3be6-4683-b880-2d5e3c75c3e5" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214550Z:6f86cf93-3be6-4683-b880-2d5e3c75c3e5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db151\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server151\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:44:49.9898142Z\",\r\n \"correlationId\": \"762eb91e-42e8-415f-99ad-7095615c0a7b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151/databases/sql-audit-cmdlet-db151\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151/sql-audit-cmdlet-db151\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799934" + ], + "x-ms-request-id": [ + "90933ff5-3a75-4548-82c8-ed1dc50f0fc3" + ], + "x-ms-correlation-request-id": [ + "90933ff5-3a75-4548-82c8-ed1dc50f0fc3" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214553Z:90933ff5-3a75-4548-82c8-ed1dc50f0fc3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db151\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server151\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:44:49.9898142Z\",\r\n \"correlationId\": \"762eb91e-42e8-415f-99ad-7095615c0a7b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151/databases/sql-audit-cmdlet-db151\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151/sql-audit-cmdlet-db151\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799932" + ], + "x-ms-request-id": [ + "6c44f82f-1a8e-436d-a4d5-8a5839633b6f" + ], + "x-ms-correlation-request-id": [ + "6c44f82f-1a8e-436d-a4d5-8a5839633b6f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214556Z:6c44f82f-1a8e-436d-a4d5-8a5839633b6f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:56 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db151\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server151\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:45:58.3578515Z\",\r\n \"correlationId\": \"762eb91e-42e8-415f-99ad-7095615c0a7b\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151/databases/sql-audit-cmdlet-db151\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server151/sql-audit-cmdlet-db151\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1626" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799930" + ], + "x-ms-request-id": [ + "c4532865-59da-4cf8-9cc0-86298c05af83" + ], + "x-ms-correlation-request-id": [ + "c4532865-59da-4cf8-9cc0-86298c05af83" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214600Z:c4532865-59da-4cf8-9cc0-86298c05af83" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:45:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151\",\r\n \"name\": \"sql-audit-cmdlet-server151\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server151/databases/sql-audit-cmdlet-db151\",\r\n \"name\": \"sql-audit-cmdlet-server151/sql-audit-cmdlet-db151\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "577" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799929" + ], + "x-ms-request-id": [ + "6e73c295-6385-479c-97b2-96e362d1ee43" + ], + "x-ms-correlation-request-id": [ + "6e73c295-6385-479c-97b2-96e362d1ee43" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214602Z:6e73c295-6385-479c-97b2-96e362d1ee43" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:46:02 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg151/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE1MS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westeurope:4b44d3cc-8cd1-4064-a87f-6be091222686" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799928" + ], + "x-ms-correlation-request-id": [ + "2be13f91-5c5c-45b5-aee6-91d71c61c701" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214603Z:2be13f91-5c5c-45b5-aee6-91d71c61c701" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:46:02 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices/auditcmdlets151", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXMvYXVkaXRjbWRsZXRzMTUx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "32bb94ae141d23dd8a9b3f8e87b7b3fb" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:46:08 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/32bb94ae141d23dd8a9b3f8e87b7b3fb", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zLzMyYmI5NGFlMTQxZDIzZGQ4YTliM2Y4ZTg3YjdiM2Zi", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/2.0.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "\r\n 32bb94ae-141d-23dd-8a9b-3f8e87b7b3fb\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "1ed909f7cbbd21418bbdf1027677235e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:46:09 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "cca24ec8-99b5-4aa7-9ff6-486e886f304c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestFailedServerUpdatePolicyWithNoStorage.json b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestFailedServerUpdatePolicyWithNoStorage.json new file mode 100644 index 000000000000..294ce4c56c66 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestFailedServerUpdatePolicyWithNoStorage.json @@ -0,0 +1,3128 @@ +{ + "Entries": [ + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXM=", + "RequestMethod": "POST", + "RequestBody": "\r\n auditcmdlets161\r\n \r\n \r\n West US\r\n \r\n Standard_GRS\r\n", + "RequestHeaders": { + "Content-Type": [ + "application/xml" + ], + "Content-Length": [ + "379" + ], + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "529" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "b30d746136172ccfacdf4994c1641c68" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:20:02 GMT" + ], + "Location": [ + "https://management.core.windows.net/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/storage/auditcmdlets161" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/b30d746136172ccfacdf4994c1641c68", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zL2IzMGQ3NDYxMzYxNzJjY2ZhY2RmNDk5NGMxNjQxYzY4", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "529" + ] + }, + "ResponseBody": "\r\n b30d7461-3617-2ccf-acdf-4994c1641c68\r\n InProgress\r\n", + "ResponseHeaders": { + "Content-Length": [ + "197" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "ed885015dc812f2c89c2aae41d0fbcb5" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:20:03 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/b30d746136172ccfacdf4994c1641c68", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zL2IzMGQ3NDYxMzYxNzJjY2ZhY2RmNDk5NGMxNjQxYzY4", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "529" + ] + }, + "ResponseBody": "\r\n b30d7461-3617-2ccf-acdf-4994c1641c68\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "557f7e8fbd6d2a9b9f8d1769a1d847b4" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:20:33 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "119" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799841" + ], + "x-ms-request-id": [ + "476815f6-8c6a-4550-a25d-9da4dcce6d2d" + ], + "x-ms-correlation-request-id": [ + "476815f6-8c6a-4550-a25d-9da4dcce6d2d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212034Z:476815f6-8c6a-4550-a25d-9da4dcce6d2d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:20:34 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161\",\r\n \"name\": \"sql-audit-cmdlet-test-rg161\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "217" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11983" + ], + "x-ms-request-id": [ + "e34f933f-7bf3-4231-a562-a5e79d34650f" + ], + "x-ms-correlation-request-id": [ + "e34f933f-7bf3-4231-a562-a5e79d34650f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212036Z:e34f933f-7bf3-4231-a562-a5e79d34650f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:20:36 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/validate?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvdmFsaWRhdGU/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db161\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server161\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db161\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server161\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:20:37.5161636Z\",\r\n \"correlationId\": \"d2787c1c-91b2-4ee9-8e59-c9d5c4460484\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161/databases/sql-audit-cmdlet-db161\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161/sql-audit-cmdlet-db161\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11982" + ], + "x-ms-request-id": [ + "d2787c1c-91b2-4ee9-8e59-c9d5c4460484" + ], + "x-ms-correlation-request-id": [ + "d2787c1c-91b2-4ee9-8e59-c9d5c4460484" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212037Z:d2787c1c-91b2-4ee9-8e59-c9d5c4460484" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:20:36 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db161\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server161\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db161\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server161\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:20:39.1830353Z\",\r\n \"correlationId\": \"95e78bfd-aa77-4cd0-b7d1-e89f539d1638\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161/databases/sql-audit-cmdlet-db161\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161/sql-audit-cmdlet-db161\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11981" + ], + "x-ms-request-id": [ + "95e78bfd-aa77-4cd0-b7d1-e89f539d1638" + ], + "x-ms-correlation-request-id": [ + "95e78bfd-aa77-4cd0-b7d1-e89f539d1638" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212039Z:95e78bfd-aa77-4cd0-b7d1-e89f539d1638" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:20:38 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799840" + ], + "x-ms-request-id": [ + "1b4e1233-d0cd-4023-8e29-340f18f48ecb" + ], + "x-ms-correlation-request-id": [ + "1b4e1233-d0cd-4023-8e29-340f18f48ecb" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212040Z:1b4e1233-d0cd-4023-8e29-340f18f48ecb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:20:40 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799838" + ], + "x-ms-request-id": [ + "03e9d5b9-d50e-439a-8944-0af72a62be68" + ], + "x-ms-correlation-request-id": [ + "03e9d5b9-d50e-439a-8944-0af72a62be68" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212043Z:03e9d5b9-d50e-439a-8944-0af72a62be68" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:20:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799836" + ], + "x-ms-request-id": [ + "5574c1fd-e973-4e3d-95b2-56ff1a1517bf" + ], + "x-ms-correlation-request-id": [ + "5574c1fd-e973-4e3d-95b2-56ff1a1517bf" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212046Z:5574c1fd-e973-4e3d-95b2-56ff1a1517bf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:20:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799834" + ], + "x-ms-request-id": [ + "47dcdd87-6ab6-42f6-bcb9-cdab4a925a67" + ], + "x-ms-correlation-request-id": [ + "47dcdd87-6ab6-42f6-bcb9-cdab4a925a67" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212049Z:47dcdd87-6ab6-42f6-bcb9-cdab4a925a67" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:20:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799832" + ], + "x-ms-request-id": [ + "6abe8e4d-8f7b-4dc8-a1aa-ec450cbbc5dc" + ], + "x-ms-correlation-request-id": [ + "6abe8e4d-8f7b-4dc8-a1aa-ec450cbbc5dc" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212052Z:6abe8e4d-8f7b-4dc8-a1aa-ec450cbbc5dc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:20:52 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799830" + ], + "x-ms-request-id": [ + "b176ac68-82e4-4e20-9763-421c275ae921" + ], + "x-ms-correlation-request-id": [ + "b176ac68-82e4-4e20-9763-421c275ae921" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212055Z:b176ac68-82e4-4e20-9763-421c275ae921" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:20:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799828" + ], + "x-ms-request-id": [ + "f54c56e9-10c5-4f52-8ca0-7e26130ed847" + ], + "x-ms-correlation-request-id": [ + "f54c56e9-10c5-4f52-8ca0-7e26130ed847" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212058Z:f54c56e9-10c5-4f52-8ca0-7e26130ed847" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:20:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799826" + ], + "x-ms-request-id": [ + "c6b29f97-a462-430e-bb96-ca9fb46ff2d4" + ], + "x-ms-correlation-request-id": [ + "c6b29f97-a462-430e-bb96-ca9fb46ff2d4" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212101Z:c6b29f97-a462-430e-bb96-ca9fb46ff2d4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799824" + ], + "x-ms-request-id": [ + "815016bc-aa5b-4750-a53e-50058b0f9db1" + ], + "x-ms-correlation-request-id": [ + "815016bc-aa5b-4750-a53e-50058b0f9db1" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212104Z:815016bc-aa5b-4750-a53e-50058b0f9db1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799822" + ], + "x-ms-request-id": [ + "fd810ee2-9714-48d9-a5ce-a6f673258535" + ], + "x-ms-correlation-request-id": [ + "fd810ee2-9714-48d9-a5ce-a6f673258535" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212107Z:fd810ee2-9714-48d9-a5ce-a6f673258535" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:07 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799820" + ], + "x-ms-request-id": [ + "1c5cc19e-380d-4a41-a2de-924d0dde655c" + ], + "x-ms-correlation-request-id": [ + "1c5cc19e-380d-4a41-a2de-924d0dde655c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212111Z:1c5cc19e-380d-4a41-a2de-924d0dde655c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799818" + ], + "x-ms-request-id": [ + "5d842f61-9afc-4b6e-8939-ce8fce996561" + ], + "x-ms-correlation-request-id": [ + "5d842f61-9afc-4b6e-8939-ce8fce996561" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212114Z:5d842f61-9afc-4b6e-8939-ce8fce996561" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799816" + ], + "x-ms-request-id": [ + "051aa1d1-dc2d-49bc-841d-ab949321473e" + ], + "x-ms-correlation-request-id": [ + "051aa1d1-dc2d-49bc-841d-ab949321473e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212117Z:051aa1d1-dc2d-49bc-841d-ab949321473e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:17 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799814" + ], + "x-ms-request-id": [ + "ed564bb1-b912-4500-ba16-4ba893030092" + ], + "x-ms-correlation-request-id": [ + "ed564bb1-b912-4500-ba16-4ba893030092" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212120Z:ed564bb1-b912-4500-ba16-4ba893030092" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:20 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799812" + ], + "x-ms-request-id": [ + "811bd512-2528-4d65-aa92-6afd48bff800" + ], + "x-ms-correlation-request-id": [ + "811bd512-2528-4d65-aa92-6afd48bff800" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212123Z:811bd512-2528-4d65-aa92-6afd48bff800" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799810" + ], + "x-ms-request-id": [ + "84e9364a-003b-4d7f-b400-3b147ef8e701" + ], + "x-ms-correlation-request-id": [ + "84e9364a-003b-4d7f-b400-3b147ef8e701" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212126Z:84e9364a-003b-4d7f-b400-3b147ef8e701" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799808" + ], + "x-ms-request-id": [ + "5f9b2043-9e3c-42d7-97c8-de174ac69a43" + ], + "x-ms-correlation-request-id": [ + "5f9b2043-9e3c-42d7-97c8-de174ac69a43" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212129Z:5f9b2043-9e3c-42d7-97c8-de174ac69a43" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:29 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799806" + ], + "x-ms-request-id": [ + "80b6d6c2-3870-4d62-9105-21616a6e70b0" + ], + "x-ms-correlation-request-id": [ + "80b6d6c2-3870-4d62-9105-21616a6e70b0" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212132Z:80b6d6c2-3870-4d62-9105-21616a6e70b0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:32 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799804" + ], + "x-ms-request-id": [ + "ab972935-cbed-48db-aa87-75e5e18f9438" + ], + "x-ms-correlation-request-id": [ + "ab972935-cbed-48db-aa87-75e5e18f9438" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212135Z:ab972935-cbed-48db-aa87-75e5e18f9438" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799802" + ], + "x-ms-request-id": [ + "72160ef0-4cb1-45d9-97e4-18e7e4a3bb1a" + ], + "x-ms-correlation-request-id": [ + "72160ef0-4cb1-45d9-97e4-18e7e4a3bb1a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212138Z:72160ef0-4cb1-45d9-97e4-18e7e4a3bb1a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:38 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799800" + ], + "x-ms-request-id": [ + "e94a1f12-2b9c-49a0-8fa1-1cb42f875975" + ], + "x-ms-correlation-request-id": [ + "e94a1f12-2b9c-49a0-8fa1-1cb42f875975" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212141Z:e94a1f12-2b9c-49a0-8fa1-1cb42f875975" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations/6E5DF2E334CF047A\",\r\n \"operationId\": \"6E5DF2E334CF047A\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:21:44.6926307Z\",\r\n \"trackingId\": \"5945f3a6-680c-4fef-8577-c658785ba4ef\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799798" + ], + "x-ms-request-id": [ + "83dd591d-c22d-4e7d-813f-6cdb6c7519d7" + ], + "x-ms-correlation-request-id": [ + "83dd591d-c22d-4e7d-813f-6cdb6c7519d7" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212145Z:83dd591d-c22d-4e7d-813f-6cdb6c7519d7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations/6E5DF2E334CF047A\",\r\n \"operationId\": \"6E5DF2E334CF047A\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:21:44.6926307Z\",\r\n \"trackingId\": \"5945f3a6-680c-4fef-8577-c658785ba4ef\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799796" + ], + "x-ms-request-id": [ + "c1b0c0a8-7ffc-4c45-bbb7-919a010ce6a4" + ], + "x-ms-correlation-request-id": [ + "c1b0c0a8-7ffc-4c45-bbb7-919a010ce6a4" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212148Z:c1b0c0a8-7ffc-4c45-bbb7-919a010ce6a4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations/6E5DF2E334CF047A\",\r\n \"operationId\": \"6E5DF2E334CF047A\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:21:44.6926307Z\",\r\n \"trackingId\": \"5945f3a6-680c-4fef-8577-c658785ba4ef\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799794" + ], + "x-ms-request-id": [ + "4d87ac2a-1998-492c-83a6-e406c1c1d626" + ], + "x-ms-correlation-request-id": [ + "4d87ac2a-1998-492c-83a6-e406c1c1d626" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212151Z:4d87ac2a-1998-492c-83a6-e406c1c1d626" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations/BC6E2DC8B28C2A84\",\r\n \"operationId\": \"BC6E2DC8B28C2A84\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:21:53.7342242Z\",\r\n \"trackingId\": \"845e9375-7b2e-4861-b3dc-56074433afca\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161/databases/sql-audit-cmdlet-db161\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161/sql-audit-cmdlet-db161\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations/6E5DF2E334CF047A\",\r\n \"operationId\": \"6E5DF2E334CF047A\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:21:44.6926307Z\",\r\n \"trackingId\": \"5945f3a6-680c-4fef-8577-c658785ba4ef\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799792" + ], + "x-ms-request-id": [ + "6b40ac20-8d64-458d-b264-3b8bf382e47d" + ], + "x-ms-correlation-request-id": [ + "6b40ac20-8d64-458d-b264-3b8bf382e47d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212154Z:6b40ac20-8d64-458d-b264-3b8bf382e47d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations/BC6E2DC8B28C2A84\",\r\n \"operationId\": \"BC6E2DC8B28C2A84\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:21:53.7342242Z\",\r\n \"trackingId\": \"845e9375-7b2e-4861-b3dc-56074433afca\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161/databases/sql-audit-cmdlet-db161\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161/sql-audit-cmdlet-db161\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations/6E5DF2E334CF047A\",\r\n \"operationId\": \"6E5DF2E334CF047A\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:21:44.6926307Z\",\r\n \"trackingId\": \"5945f3a6-680c-4fef-8577-c658785ba4ef\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799790" + ], + "x-ms-request-id": [ + "4205f04e-9fa2-481b-9e8f-e1f91391bfcb" + ], + "x-ms-correlation-request-id": [ + "4205f04e-9fa2-481b-9e8f-e1f91391bfcb" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212157Z:4205f04e-9fa2-481b-9e8f-e1f91391bfcb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations/BC6E2DC8B28C2A84\",\r\n \"operationId\": \"BC6E2DC8B28C2A84\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:21:53.7342242Z\",\r\n \"trackingId\": \"845e9375-7b2e-4861-b3dc-56074433afca\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161/databases/sql-audit-cmdlet-db161\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161/sql-audit-cmdlet-db161\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup/operations/6E5DF2E334CF047A\",\r\n \"operationId\": \"6E5DF2E334CF047A\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:21:44.6926307Z\",\r\n \"trackingId\": \"5945f3a6-680c-4fef-8577-c658785ba4ef\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799788" + ], + "x-ms-request-id": [ + "cd7bf3aa-aafb-4fb5-9d0b-2a72e570e30c" + ], + "x-ms-correlation-request-id": [ + "cd7bf3aa-aafb-4fb5-9d0b-2a72e570e30c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212200Z:cd7bf3aa-aafb-4fb5-9d0b-2a72e570e30c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:22:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db161\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server161\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:20:39.1830353Z\",\r\n \"correlationId\": \"95e78bfd-aa77-4cd0-b7d1-e89f539d1638\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161/databases/sql-audit-cmdlet-db161\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161/sql-audit-cmdlet-db161\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799839" + ], + "x-ms-request-id": [ + "91e94e00-4063-4818-b569-3bb45b76293d" + ], + "x-ms-correlation-request-id": [ + "91e94e00-4063-4818-b569-3bb45b76293d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212040Z:91e94e00-4063-4818-b569-3bb45b76293d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:20:40 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db161\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server161\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:20:41.9759782Z\",\r\n \"correlationId\": \"95e78bfd-aa77-4cd0-b7d1-e89f539d1638\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161/databases/sql-audit-cmdlet-db161\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161/sql-audit-cmdlet-db161\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799837" + ], + "x-ms-request-id": [ + "4e01114f-2635-41d1-9b0f-fa5a344c330f" + ], + "x-ms-correlation-request-id": [ + "4e01114f-2635-41d1-9b0f-fa5a344c330f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212043Z:4e01114f-2635-41d1-9b0f-fa5a344c330f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:20:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db161\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server161\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:20:41.9759782Z\",\r\n \"correlationId\": \"95e78bfd-aa77-4cd0-b7d1-e89f539d1638\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161/databases/sql-audit-cmdlet-db161\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161/sql-audit-cmdlet-db161\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799835" + ], + "x-ms-request-id": [ + "b2962e13-fdba-47bd-ab80-8012ae66464a" + ], + "x-ms-correlation-request-id": [ + "b2962e13-fdba-47bd-ab80-8012ae66464a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212046Z:b2962e13-fdba-47bd-ab80-8012ae66464a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:20:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db161\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server161\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:20:41.9759782Z\",\r\n \"correlationId\": \"95e78bfd-aa77-4cd0-b7d1-e89f539d1638\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161/databases/sql-audit-cmdlet-db161\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161/sql-audit-cmdlet-db161\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799833" + ], + "x-ms-request-id": [ + "30e59dc8-b5fd-4e1a-a3b7-726b7c4e7129" + ], + "x-ms-correlation-request-id": [ + "30e59dc8-b5fd-4e1a-a3b7-726b7c4e7129" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212049Z:30e59dc8-b5fd-4e1a-a3b7-726b7c4e7129" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:20:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db161\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server161\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:20:41.9759782Z\",\r\n \"correlationId\": \"95e78bfd-aa77-4cd0-b7d1-e89f539d1638\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161/databases/sql-audit-cmdlet-db161\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161/sql-audit-cmdlet-db161\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799831" + ], + "x-ms-request-id": [ + "1acdb959-510c-4c0d-aaf8-5734c6d93174" + ], + "x-ms-correlation-request-id": [ + "1acdb959-510c-4c0d-aaf8-5734c6d93174" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212053Z:1acdb959-510c-4c0d-aaf8-5734c6d93174" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:20:52 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db161\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server161\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:20:41.9759782Z\",\r\n \"correlationId\": \"95e78bfd-aa77-4cd0-b7d1-e89f539d1638\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161/databases/sql-audit-cmdlet-db161\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161/sql-audit-cmdlet-db161\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799829" + ], + "x-ms-request-id": [ + "e1f26aa7-76f3-4c32-9eb6-191667f2e8df" + ], + "x-ms-correlation-request-id": [ + "e1f26aa7-76f3-4c32-9eb6-191667f2e8df" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212056Z:e1f26aa7-76f3-4c32-9eb6-191667f2e8df" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:20:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db161\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server161\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:20:41.9759782Z\",\r\n \"correlationId\": \"95e78bfd-aa77-4cd0-b7d1-e89f539d1638\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161/databases/sql-audit-cmdlet-db161\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161/sql-audit-cmdlet-db161\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799827" + ], + "x-ms-request-id": [ + "8f7fea90-2a17-4cce-923a-25ef911be6c5" + ], + "x-ms-correlation-request-id": [ + "8f7fea90-2a17-4cce-923a-25ef911be6c5" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212059Z:8f7fea90-2a17-4cce-923a-25ef911be6c5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:20:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db161\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server161\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:20:41.9759782Z\",\r\n \"correlationId\": \"95e78bfd-aa77-4cd0-b7d1-e89f539d1638\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161/databases/sql-audit-cmdlet-db161\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161/sql-audit-cmdlet-db161\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799825" + ], + "x-ms-request-id": [ + "79d355c8-bb94-4e66-80bc-d5cb82f4a235" + ], + "x-ms-correlation-request-id": [ + "79d355c8-bb94-4e66-80bc-d5cb82f4a235" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212102Z:79d355c8-bb94-4e66-80bc-d5cb82f4a235" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:02 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db161\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server161\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:20:41.9759782Z\",\r\n \"correlationId\": \"95e78bfd-aa77-4cd0-b7d1-e89f539d1638\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161/databases/sql-audit-cmdlet-db161\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161/sql-audit-cmdlet-db161\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799823" + ], + "x-ms-request-id": [ + "593c4ffc-533d-4e88-af7b-10a31697bc2f" + ], + "x-ms-correlation-request-id": [ + "593c4ffc-533d-4e88-af7b-10a31697bc2f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212105Z:593c4ffc-533d-4e88-af7b-10a31697bc2f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db161\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server161\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:20:41.9759782Z\",\r\n \"correlationId\": \"95e78bfd-aa77-4cd0-b7d1-e89f539d1638\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161/databases/sql-audit-cmdlet-db161\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161/sql-audit-cmdlet-db161\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799821" + ], + "x-ms-request-id": [ + "5a72bf68-e3b8-4f01-a635-a1bc72207810" + ], + "x-ms-correlation-request-id": [ + "5a72bf68-e3b8-4f01-a635-a1bc72207810" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212108Z:5a72bf68-e3b8-4f01-a635-a1bc72207810" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:07 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db161\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server161\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:20:41.9759782Z\",\r\n \"correlationId\": \"95e78bfd-aa77-4cd0-b7d1-e89f539d1638\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161/databases/sql-audit-cmdlet-db161\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161/sql-audit-cmdlet-db161\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799819" + ], + "x-ms-request-id": [ + "f4526473-63e3-42dc-bfc5-1127f51e65fc" + ], + "x-ms-correlation-request-id": [ + "f4526473-63e3-42dc-bfc5-1127f51e65fc" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212111Z:f4526473-63e3-42dc-bfc5-1127f51e65fc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:11 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db161\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server161\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:20:41.9759782Z\",\r\n \"correlationId\": \"95e78bfd-aa77-4cd0-b7d1-e89f539d1638\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161/databases/sql-audit-cmdlet-db161\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161/sql-audit-cmdlet-db161\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799817" + ], + "x-ms-request-id": [ + "30ccf27c-91df-4e28-bc38-d4858cea85f8" + ], + "x-ms-correlation-request-id": [ + "30ccf27c-91df-4e28-bc38-d4858cea85f8" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212114Z:30ccf27c-91df-4e28-bc38-d4858cea85f8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db161\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server161\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:20:41.9759782Z\",\r\n \"correlationId\": \"95e78bfd-aa77-4cd0-b7d1-e89f539d1638\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161/databases/sql-audit-cmdlet-db161\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161/sql-audit-cmdlet-db161\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799815" + ], + "x-ms-request-id": [ + "d06d7dd1-25e1-4745-aaa7-7f956c72061d" + ], + "x-ms-correlation-request-id": [ + "d06d7dd1-25e1-4745-aaa7-7f956c72061d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212117Z:d06d7dd1-25e1-4745-aaa7-7f956c72061d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:17 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db161\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server161\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:20:41.9759782Z\",\r\n \"correlationId\": \"95e78bfd-aa77-4cd0-b7d1-e89f539d1638\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161/databases/sql-audit-cmdlet-db161\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161/sql-audit-cmdlet-db161\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799813" + ], + "x-ms-request-id": [ + "137f20bd-d4da-412b-9358-8329eed29364" + ], + "x-ms-correlation-request-id": [ + "137f20bd-d4da-412b-9358-8329eed29364" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212120Z:137f20bd-d4da-412b-9358-8329eed29364" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:20 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db161\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server161\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:20:41.9759782Z\",\r\n \"correlationId\": \"95e78bfd-aa77-4cd0-b7d1-e89f539d1638\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161/databases/sql-audit-cmdlet-db161\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161/sql-audit-cmdlet-db161\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799811" + ], + "x-ms-request-id": [ + "32882d3e-aafd-4662-bfbf-ad0d38493c5e" + ], + "x-ms-correlation-request-id": [ + "32882d3e-aafd-4662-bfbf-ad0d38493c5e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212123Z:32882d3e-aafd-4662-bfbf-ad0d38493c5e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db161\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server161\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:20:41.9759782Z\",\r\n \"correlationId\": \"95e78bfd-aa77-4cd0-b7d1-e89f539d1638\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161/databases/sql-audit-cmdlet-db161\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161/sql-audit-cmdlet-db161\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799809" + ], + "x-ms-request-id": [ + "2e74a402-8360-4fb8-955c-29c658f32c74" + ], + "x-ms-correlation-request-id": [ + "2e74a402-8360-4fb8-955c-29c658f32c74" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212126Z:2e74a402-8360-4fb8-955c-29c658f32c74" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db161\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server161\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:20:41.9759782Z\",\r\n \"correlationId\": \"95e78bfd-aa77-4cd0-b7d1-e89f539d1638\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161/databases/sql-audit-cmdlet-db161\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161/sql-audit-cmdlet-db161\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799807" + ], + "x-ms-request-id": [ + "76a059e4-12e3-44a2-8164-4a5f9129251f" + ], + "x-ms-correlation-request-id": [ + "76a059e4-12e3-44a2-8164-4a5f9129251f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212130Z:76a059e4-12e3-44a2-8164-4a5f9129251f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:29 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db161\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server161\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:20:41.9759782Z\",\r\n \"correlationId\": \"95e78bfd-aa77-4cd0-b7d1-e89f539d1638\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161/databases/sql-audit-cmdlet-db161\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161/sql-audit-cmdlet-db161\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799805" + ], + "x-ms-request-id": [ + "82080d33-0d58-4db9-9346-c891bb7ccf5a" + ], + "x-ms-correlation-request-id": [ + "82080d33-0d58-4db9-9346-c891bb7ccf5a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212133Z:82080d33-0d58-4db9-9346-c891bb7ccf5a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db161\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server161\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:20:41.9759782Z\",\r\n \"correlationId\": \"95e78bfd-aa77-4cd0-b7d1-e89f539d1638\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161/databases/sql-audit-cmdlet-db161\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161/sql-audit-cmdlet-db161\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799803" + ], + "x-ms-request-id": [ + "3c18d442-43cd-4ae0-bd00-9130ccadeecd" + ], + "x-ms-correlation-request-id": [ + "3c18d442-43cd-4ae0-bd00-9130ccadeecd" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212136Z:3c18d442-43cd-4ae0-bd00-9130ccadeecd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db161\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server161\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:20:41.9759782Z\",\r\n \"correlationId\": \"95e78bfd-aa77-4cd0-b7d1-e89f539d1638\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161/databases/sql-audit-cmdlet-db161\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161/sql-audit-cmdlet-db161\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799801" + ], + "x-ms-request-id": [ + "348e7044-d4fd-4587-8530-a977ffd8cf58" + ], + "x-ms-correlation-request-id": [ + "348e7044-d4fd-4587-8530-a977ffd8cf58" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212139Z:348e7044-d4fd-4587-8530-a977ffd8cf58" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db161\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server161\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:20:41.9759782Z\",\r\n \"correlationId\": \"95e78bfd-aa77-4cd0-b7d1-e89f539d1638\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161/databases/sql-audit-cmdlet-db161\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161/sql-audit-cmdlet-db161\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799799" + ], + "x-ms-request-id": [ + "5d337192-595d-4039-af37-67c8a271be7b" + ], + "x-ms-correlation-request-id": [ + "5d337192-595d-4039-af37-67c8a271be7b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212142Z:5d337192-595d-4039-af37-67c8a271be7b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db161\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server161\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:20:41.9759782Z\",\r\n \"correlationId\": \"95e78bfd-aa77-4cd0-b7d1-e89f539d1638\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161/databases/sql-audit-cmdlet-db161\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161/sql-audit-cmdlet-db161\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799797" + ], + "x-ms-request-id": [ + "e1f6acb3-754d-429f-82c1-f1cc0f8c31ac" + ], + "x-ms-correlation-request-id": [ + "e1f6acb3-754d-429f-82c1-f1cc0f8c31ac" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212145Z:e1f6acb3-754d-429f-82c1-f1cc0f8c31ac" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db161\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server161\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:20:41.9759782Z\",\r\n \"correlationId\": \"95e78bfd-aa77-4cd0-b7d1-e89f539d1638\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161/databases/sql-audit-cmdlet-db161\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161/sql-audit-cmdlet-db161\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799795" + ], + "x-ms-request-id": [ + "c6026a41-4b0c-4a91-9d7d-d44e085f25ea" + ], + "x-ms-correlation-request-id": [ + "c6026a41-4b0c-4a91-9d7d-d44e085f25ea" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212148Z:c6026a41-4b0c-4a91-9d7d-d44e085f25ea" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db161\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server161\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:20:41.9759782Z\",\r\n \"correlationId\": \"95e78bfd-aa77-4cd0-b7d1-e89f539d1638\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161/databases/sql-audit-cmdlet-db161\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161/sql-audit-cmdlet-db161\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799793" + ], + "x-ms-request-id": [ + "49c7c993-9c24-4db9-aa01-b2e9afd379d4" + ], + "x-ms-correlation-request-id": [ + "49c7c993-9c24-4db9-aa01-b2e9afd379d4" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212151Z:49c7c993-9c24-4db9-aa01-b2e9afd379d4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db161\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server161\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:20:41.9759782Z\",\r\n \"correlationId\": \"95e78bfd-aa77-4cd0-b7d1-e89f539d1638\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161/databases/sql-audit-cmdlet-db161\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161/sql-audit-cmdlet-db161\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799791" + ], + "x-ms-request-id": [ + "679d338e-3db9-431b-89bf-50da94000450" + ], + "x-ms-correlation-request-id": [ + "679d338e-3db9-431b-89bf-50da94000450" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212155Z:679d338e-3db9-431b-89bf-50da94000450" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db161\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server161\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:20:41.9759782Z\",\r\n \"correlationId\": \"95e78bfd-aa77-4cd0-b7d1-e89f539d1638\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161/databases/sql-audit-cmdlet-db161\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161/sql-audit-cmdlet-db161\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799789" + ], + "x-ms-request-id": [ + "759e646c-3508-4453-b18e-b39c1344c0be" + ], + "x-ms-correlation-request-id": [ + "759e646c-3508-4453-b18e-b39c1344c0be" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212158Z:759e646c-3508-4453-b18e-b39c1344c0be" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:21:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db161\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server161\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:21:58.2183281Z\",\r\n \"correlationId\": \"95e78bfd-aa77-4cd0-b7d1-e89f539d1638\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161/databases/sql-audit-cmdlet-db161\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server161/sql-audit-cmdlet-db161\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1626" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799787" + ], + "x-ms-request-id": [ + "c8fd6d44-94ca-41dd-8e7f-9f8e4f933f3c" + ], + "x-ms-correlation-request-id": [ + "c8fd6d44-94ca-41dd-8e7f-9f8e4f933f3c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212201Z:c8fd6d44-94ca-41dd-8e7f-9f8e4f933f3c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:22:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161\",\r\n \"name\": \"sql-audit-cmdlet-server161\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server161/databases/sql-audit-cmdlet-db161\",\r\n \"name\": \"sql-audit-cmdlet-server161/sql-audit-cmdlet-db161\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "577" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799786" + ], + "x-ms-request-id": [ + "c725efae-234f-4362-b2ea-c04bf8e358c1" + ], + "x-ms-correlation-request-id": [ + "c725efae-234f-4362-b2ea-c04bf8e358c1" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212203Z:c725efae-234f-4362-b2ea-c04bf8e358c1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:22:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg161/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE2MS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westeurope:c9023ccd-0d4e-4b72-a84a-5bbead88acf8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799842" + ], + "x-ms-correlation-request-id": [ + "12101baf-1375-4308-9bb3-fbaeeb55cdfe" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212204Z:12101baf-1375-4308-9bb3-fbaeeb55cdfe" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:22:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices/auditcmdlets161", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXMvYXVkaXRjbWRsZXRzMTYx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "0143f07d5aad2b28863ec31616ddf14f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:22:08 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/0143f07d5aad2b28863ec31616ddf14f", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zLzAxNDNmMDdkNWFhZDJiMjg4NjNlYzMxNjE2ZGRmMTRm", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/2.0.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "\r\n 0143f07d-5aad-2b28-863e-c31616ddf14f\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "31679d08926525aea07749d78399855f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:22:09 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "cca24ec8-99b5-4aa7-9ff6-486e886f304c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestFailedUseServerDefault.json b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestFailedUseServerDefault.json new file mode 100644 index 000000000000..a869a236d114 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestFailedUseServerDefault.json @@ -0,0 +1,2840 @@ +{ + "Entries": [ + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXM=", + "RequestMethod": "POST", + "RequestBody": "\r\n auditcmdlets171\r\n \r\n \r\n West US\r\n \r\n Standard_GRS\r\n", + "RequestHeaders": { + "Content-Type": [ + "application/xml" + ], + "Content-Length": [ + "379" + ], + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "467" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "5c0cdf2ef4aa2482b269141f164a13a9" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:17:17 GMT" + ], + "Location": [ + "https://management.core.windows.net/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/storage/auditcmdlets171" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/5c0cdf2ef4aa2482b269141f164a13a9", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zLzVjMGNkZjJlZjRhYTI0ODJiMjY5MTQxZjE2NGExM2E5", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "467" + ] + }, + "ResponseBody": "\r\n 5c0cdf2e-f4aa-2482-b269-141f164a13a9\r\n InProgress\r\n", + "ResponseHeaders": { + "Content-Length": [ + "197" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "295faefc28c52d9ebb3cad34c97d5615" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:17:17 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/5c0cdf2ef4aa2482b269141f164a13a9", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zLzVjMGNkZjJlZjRhYTI0ODJiMjY5MTQxZjE2NGExM2E5", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "467" + ] + }, + "ResponseBody": "\r\n 5c0cdf2e-f4aa-2482-b269-141f164a13a9\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "afc6d5d64190287b9296ab0796a19002" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:17:48 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "119" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799938" + ], + "x-ms-request-id": [ + "2809c889-a0bb-4719-b76e-499d69ebe3c3" + ], + "x-ms-correlation-request-id": [ + "2809c889-a0bb-4719-b76e-499d69ebe3c3" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211748Z:2809c889-a0bb-4719-b76e-499d69ebe3c3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:17:48 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171\",\r\n \"name\": \"sql-audit-cmdlet-test-rg171\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "217" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11990" + ], + "x-ms-request-id": [ + "f6ebe886-2df0-4955-9eff-393aa7e90aa4" + ], + "x-ms-correlation-request-id": [ + "f6ebe886-2df0-4955-9eff-393aa7e90aa4" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211750Z:f6ebe886-2df0-4955-9eff-393aa7e90aa4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:17:49 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup/validate?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvdmFsaWRhdGU/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db171\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server171\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db171\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server171\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:17:51.0011094Z\",\r\n \"correlationId\": \"6e552260-e3b6-453d-8164-525cf9ca50a6\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171/databases/sql-audit-cmdlet-db171\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171/sql-audit-cmdlet-db171\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11989" + ], + "x-ms-request-id": [ + "6e552260-e3b6-453d-8164-525cf9ca50a6" + ], + "x-ms-correlation-request-id": [ + "6e552260-e3b6-453d-8164-525cf9ca50a6" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211750Z:6e552260-e3b6-453d-8164-525cf9ca50a6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:17:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db171\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server171\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db171\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server171\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:17:52.6407056Z\",\r\n \"correlationId\": \"378d5413-a15e-40df-8156-0212ad892dda\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171/databases/sql-audit-cmdlet-db171\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171/sql-audit-cmdlet-db171\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11988" + ], + "x-ms-request-id": [ + "378d5413-a15e-40df-8156-0212ad892dda" + ], + "x-ms-correlation-request-id": [ + "378d5413-a15e-40df-8156-0212ad892dda" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211753Z:378d5413-a15e-40df-8156-0212ad892dda" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:17:52 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799937" + ], + "x-ms-request-id": [ + "d65ddf2b-f72a-4790-b353-f981f41e3fe3" + ], + "x-ms-correlation-request-id": [ + "d65ddf2b-f72a-4790-b353-f981f41e3fe3" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211753Z:d65ddf2b-f72a-4790-b353-f981f41e3fe3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:17:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799935" + ], + "x-ms-request-id": [ + "368d1f83-bec4-4e0b-9425-4c829e43b6e3" + ], + "x-ms-correlation-request-id": [ + "368d1f83-bec4-4e0b-9425-4c829e43b6e3" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211756Z:368d1f83-bec4-4e0b-9425-4c829e43b6e3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:17:56 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799933" + ], + "x-ms-request-id": [ + "331d405a-0967-45cf-a9e8-b6b6b7b15b45" + ], + "x-ms-correlation-request-id": [ + "331d405a-0967-45cf-a9e8-b6b6b7b15b45" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211759Z:331d405a-0967-45cf-a9e8-b6b6b7b15b45" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:17:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799931" + ], + "x-ms-request-id": [ + "a6f55ec9-9940-4042-ac13-ce933405d6a7" + ], + "x-ms-correlation-request-id": [ + "a6f55ec9-9940-4042-ac13-ce933405d6a7" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211803Z:a6f55ec9-9940-4042-ac13-ce933405d6a7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799929" + ], + "x-ms-request-id": [ + "adee3949-ff4e-48d3-b222-d5bd14aad3a0" + ], + "x-ms-correlation-request-id": [ + "adee3949-ff4e-48d3-b222-d5bd14aad3a0" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211806Z:adee3949-ff4e-48d3-b222-d5bd14aad3a0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:05 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799927" + ], + "x-ms-request-id": [ + "ab3e2162-e32d-46f3-a6b0-35e8383ece72" + ], + "x-ms-correlation-request-id": [ + "ab3e2162-e32d-46f3-a6b0-35e8383ece72" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211809Z:ab3e2162-e32d-46f3-a6b0-35e8383ece72" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:08 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799925" + ], + "x-ms-request-id": [ + "868fe421-b1e4-4693-bb60-bcde93c79764" + ], + "x-ms-correlation-request-id": [ + "868fe421-b1e4-4693-bb60-bcde93c79764" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211812Z:868fe421-b1e4-4693-bb60-bcde93c79764" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:12 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799923" + ], + "x-ms-request-id": [ + "46bcbd35-180e-4cab-bb70-c9f4cae369b5" + ], + "x-ms-correlation-request-id": [ + "46bcbd35-180e-4cab-bb70-c9f4cae369b5" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211815Z:46bcbd35-180e-4cab-bb70-c9f4cae369b5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:15 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799921" + ], + "x-ms-request-id": [ + "83794ca1-4dd3-41bd-a814-e65125f3b1b5" + ], + "x-ms-correlation-request-id": [ + "83794ca1-4dd3-41bd-a814-e65125f3b1b5" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211818Z:83794ca1-4dd3-41bd-a814-e65125f3b1b5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:17 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799919" + ], + "x-ms-request-id": [ + "7d835dc3-b51a-4b10-855f-5fceff6e2fcc" + ], + "x-ms-correlation-request-id": [ + "7d835dc3-b51a-4b10-855f-5fceff6e2fcc" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211821Z:7d835dc3-b51a-4b10-855f-5fceff6e2fcc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:21 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799917" + ], + "x-ms-request-id": [ + "00a47410-326b-442d-ab30-0af2d2b59c45" + ], + "x-ms-correlation-request-id": [ + "00a47410-326b-442d-ab30-0af2d2b59c45" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211824Z:00a47410-326b-442d-ab30-0af2d2b59c45" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799915" + ], + "x-ms-request-id": [ + "7826bc67-e870-48de-a731-9804e4c2c946" + ], + "x-ms-correlation-request-id": [ + "7826bc67-e870-48de-a731-9804e4c2c946" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211828Z:7826bc67-e870-48de-a731-9804e4c2c946" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799913" + ], + "x-ms-request-id": [ + "37fb078b-e0de-42e7-99f2-c19ef625fa3c" + ], + "x-ms-correlation-request-id": [ + "37fb078b-e0de-42e7-99f2-c19ef625fa3c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211831Z:37fb078b-e0de-42e7-99f2-c19ef625fa3c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:30 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799911" + ], + "x-ms-request-id": [ + "4af51699-dfa6-432b-aff8-3993434ddfad" + ], + "x-ms-correlation-request-id": [ + "4af51699-dfa6-432b-aff8-3993434ddfad" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211834Z:4af51699-dfa6-432b-aff8-3993434ddfad" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799909" + ], + "x-ms-request-id": [ + "8ba35954-47bd-4a13-964d-a34c1bb46773" + ], + "x-ms-correlation-request-id": [ + "8ba35954-47bd-4a13-964d-a34c1bb46773" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211837Z:8ba35954-47bd-4a13-964d-a34c1bb46773" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:37 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799907" + ], + "x-ms-request-id": [ + "69dc1a5b-b36b-498a-ba40-f5c6a6b9a306" + ], + "x-ms-correlation-request-id": [ + "69dc1a5b-b36b-498a-ba40-f5c6a6b9a306" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211840Z:69dc1a5b-b36b-498a-ba40-f5c6a6b9a306" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799905" + ], + "x-ms-request-id": [ + "782f6a53-c655-40a8-8ee7-4e3062606fdc" + ], + "x-ms-correlation-request-id": [ + "782f6a53-c655-40a8-8ee7-4e3062606fdc" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211843Z:782f6a53-c655-40a8-8ee7-4e3062606fdc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799903" + ], + "x-ms-request-id": [ + "b5ac76ca-e2ef-4c7b-9de0-ad07a4a14c8e" + ], + "x-ms-correlation-request-id": [ + "b5ac76ca-e2ef-4c7b-9de0-ad07a4a14c8e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211846Z:b5ac76ca-e2ef-4c7b-9de0-ad07a4a14c8e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup/operations/AEA9A39C669EA442\",\r\n \"operationId\": \"AEA9A39C669EA442\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:18:47.9467442Z\",\r\n \"trackingId\": \"0dbe9a4f-a0c2-4b2a-8d7c-29f117ca2613\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799901" + ], + "x-ms-request-id": [ + "f2ebcbe3-2d23-4902-bc8c-05fe47fd8758" + ], + "x-ms-correlation-request-id": [ + "f2ebcbe3-2d23-4902-bc8c-05fe47fd8758" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211849Z:f2ebcbe3-2d23-4902-bc8c-05fe47fd8758" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup/operations/AEA9A39C669EA442\",\r\n \"operationId\": \"AEA9A39C669EA442\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:18:47.9467442Z\",\r\n \"trackingId\": \"0dbe9a4f-a0c2-4b2a-8d7c-29f117ca2613\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799899" + ], + "x-ms-request-id": [ + "eebc7f3e-6c98-48d6-8980-cf19eebba516" + ], + "x-ms-correlation-request-id": [ + "eebc7f3e-6c98-48d6-8980-cf19eebba516" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211852Z:eebc7f3e-6c98-48d6-8980-cf19eebba516" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup/operations/AEA9A39C669EA442\",\r\n \"operationId\": \"AEA9A39C669EA442\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:18:47.9467442Z\",\r\n \"trackingId\": \"0dbe9a4f-a0c2-4b2a-8d7c-29f117ca2613\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799897" + ], + "x-ms-request-id": [ + "5e6b7518-c576-439b-bc44-f12e1b0bf39d" + ], + "x-ms-correlation-request-id": [ + "5e6b7518-c576-439b-bc44-f12e1b0bf39d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211855Z:5e6b7518-c576-439b-bc44-f12e1b0bf39d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup/operations/DD63DBEE1EB10342\",\r\n \"operationId\": \"DD63DBEE1EB10342\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:18:57.0100904Z\",\r\n \"trackingId\": \"9fc4c42d-8867-44c1-bf81-84db98a141b8\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171/databases/sql-audit-cmdlet-db171\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171/sql-audit-cmdlet-db171\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup/operations/AEA9A39C669EA442\",\r\n \"operationId\": \"AEA9A39C669EA442\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:18:47.9467442Z\",\r\n \"trackingId\": \"0dbe9a4f-a0c2-4b2a-8d7c-29f117ca2613\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799895" + ], + "x-ms-request-id": [ + "795addf3-0148-4277-9949-1561a2398073" + ], + "x-ms-correlation-request-id": [ + "795addf3-0148-4277-9949-1561a2398073" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211858Z:795addf3-0148-4277-9949-1561a2398073" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup/operations/DD63DBEE1EB10342\",\r\n \"operationId\": \"DD63DBEE1EB10342\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:18:57.0100904Z\",\r\n \"trackingId\": \"9fc4c42d-8867-44c1-bf81-84db98a141b8\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171/databases/sql-audit-cmdlet-db171\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171/sql-audit-cmdlet-db171\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup/operations/AEA9A39C669EA442\",\r\n \"operationId\": \"AEA9A39C669EA442\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:18:47.9467442Z\",\r\n \"trackingId\": \"0dbe9a4f-a0c2-4b2a-8d7c-29f117ca2613\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799893" + ], + "x-ms-request-id": [ + "b2a8dd1c-e743-4199-b196-a1e811fd282e" + ], + "x-ms-correlation-request-id": [ + "b2a8dd1c-e743-4199-b196-a1e811fd282e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211902Z:b2a8dd1c-e743-4199-b196-a1e811fd282e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:19:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup/operations/DD63DBEE1EB10342\",\r\n \"operationId\": \"DD63DBEE1EB10342\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:18:57.0100904Z\",\r\n \"trackingId\": \"9fc4c42d-8867-44c1-bf81-84db98a141b8\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171/databases/sql-audit-cmdlet-db171\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171/sql-audit-cmdlet-db171\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup/operations/AEA9A39C669EA442\",\r\n \"operationId\": \"AEA9A39C669EA442\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:18:47.9467442Z\",\r\n \"trackingId\": \"0dbe9a4f-a0c2-4b2a-8d7c-29f117ca2613\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799891" + ], + "x-ms-request-id": [ + "ae892245-bc3e-4e60-8172-7b24a06fa1c9" + ], + "x-ms-correlation-request-id": [ + "ae892245-bc3e-4e60-8172-7b24a06fa1c9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211905Z:ae892245-bc3e-4e60-8172-7b24a06fa1c9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:19:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db171\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server171\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:17:52.6407056Z\",\r\n \"correlationId\": \"378d5413-a15e-40df-8156-0212ad892dda\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171/databases/sql-audit-cmdlet-db171\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171/sql-audit-cmdlet-db171\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799936" + ], + "x-ms-request-id": [ + "3c9b3c41-d801-47b1-90d5-18d220b7ed05" + ], + "x-ms-correlation-request-id": [ + "3c9b3c41-d801-47b1-90d5-18d220b7ed05" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211754Z:3c9b3c41-d801-47b1-90d5-18d220b7ed05" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:17:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db171\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server171\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:17:55.243176Z\",\r\n \"correlationId\": \"378d5413-a15e-40df-8156-0212ad892dda\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171/databases/sql-audit-cmdlet-db171\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171/sql-audit-cmdlet-db171\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799934" + ], + "x-ms-request-id": [ + "abc2eb2e-9af5-4c00-9d61-6e68046a6acb" + ], + "x-ms-correlation-request-id": [ + "abc2eb2e-9af5-4c00-9d61-6e68046a6acb" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211757Z:abc2eb2e-9af5-4c00-9d61-6e68046a6acb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:17:56 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db171\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server171\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:17:55.243176Z\",\r\n \"correlationId\": \"378d5413-a15e-40df-8156-0212ad892dda\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171/databases/sql-audit-cmdlet-db171\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171/sql-audit-cmdlet-db171\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799932" + ], + "x-ms-request-id": [ + "30d55946-ff66-4999-b512-29ccadb0e1d0" + ], + "x-ms-correlation-request-id": [ + "30d55946-ff66-4999-b512-29ccadb0e1d0" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211800Z:30d55946-ff66-4999-b512-29ccadb0e1d0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db171\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server171\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:17:55.243176Z\",\r\n \"correlationId\": \"378d5413-a15e-40df-8156-0212ad892dda\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171/databases/sql-audit-cmdlet-db171\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171/sql-audit-cmdlet-db171\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799930" + ], + "x-ms-request-id": [ + "8409f531-5872-4d39-85f3-0c0bce2f5172" + ], + "x-ms-correlation-request-id": [ + "8409f531-5872-4d39-85f3-0c0bce2f5172" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211803Z:8409f531-5872-4d39-85f3-0c0bce2f5172" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db171\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server171\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:17:55.243176Z\",\r\n \"correlationId\": \"378d5413-a15e-40df-8156-0212ad892dda\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171/databases/sql-audit-cmdlet-db171\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171/sql-audit-cmdlet-db171\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799928" + ], + "x-ms-request-id": [ + "fd48a040-a005-412a-b143-ee0d6af97444" + ], + "x-ms-correlation-request-id": [ + "fd48a040-a005-412a-b143-ee0d6af97444" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211806Z:fd48a040-a005-412a-b143-ee0d6af97444" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:05 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db171\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server171\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:17:55.243176Z\",\r\n \"correlationId\": \"378d5413-a15e-40df-8156-0212ad892dda\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171/databases/sql-audit-cmdlet-db171\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171/sql-audit-cmdlet-db171\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799926" + ], + "x-ms-request-id": [ + "a9554c23-aee6-446c-81b3-bbe7f42abe95" + ], + "x-ms-correlation-request-id": [ + "a9554c23-aee6-446c-81b3-bbe7f42abe95" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211809Z:a9554c23-aee6-446c-81b3-bbe7f42abe95" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:08 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db171\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server171\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:17:55.243176Z\",\r\n \"correlationId\": \"378d5413-a15e-40df-8156-0212ad892dda\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171/databases/sql-audit-cmdlet-db171\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171/sql-audit-cmdlet-db171\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799924" + ], + "x-ms-request-id": [ + "a5344e05-71a1-4720-bb17-700461b0dd67" + ], + "x-ms-correlation-request-id": [ + "a5344e05-71a1-4720-bb17-700461b0dd67" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211813Z:a5344e05-71a1-4720-bb17-700461b0dd67" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:12 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db171\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server171\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:17:55.243176Z\",\r\n \"correlationId\": \"378d5413-a15e-40df-8156-0212ad892dda\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171/databases/sql-audit-cmdlet-db171\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171/sql-audit-cmdlet-db171\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799922" + ], + "x-ms-request-id": [ + "f2ed068d-3c47-4f44-9220-40b7c5722920" + ], + "x-ms-correlation-request-id": [ + "f2ed068d-3c47-4f44-9220-40b7c5722920" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211816Z:f2ed068d-3c47-4f44-9220-40b7c5722920" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:15 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db171\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server171\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:17:55.243176Z\",\r\n \"correlationId\": \"378d5413-a15e-40df-8156-0212ad892dda\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171/databases/sql-audit-cmdlet-db171\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171/sql-audit-cmdlet-db171\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799920" + ], + "x-ms-request-id": [ + "46b291b3-e272-4994-a952-ccf54cecb882" + ], + "x-ms-correlation-request-id": [ + "46b291b3-e272-4994-a952-ccf54cecb882" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211819Z:46b291b3-e272-4994-a952-ccf54cecb882" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:18 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db171\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server171\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:17:55.243176Z\",\r\n \"correlationId\": \"378d5413-a15e-40df-8156-0212ad892dda\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171/databases/sql-audit-cmdlet-db171\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171/sql-audit-cmdlet-db171\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799918" + ], + "x-ms-request-id": [ + "5eddc847-3e7e-4958-8040-f113167c4848" + ], + "x-ms-correlation-request-id": [ + "5eddc847-3e7e-4958-8040-f113167c4848" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211822Z:5eddc847-3e7e-4958-8040-f113167c4848" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db171\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server171\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:17:55.243176Z\",\r\n \"correlationId\": \"378d5413-a15e-40df-8156-0212ad892dda\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171/databases/sql-audit-cmdlet-db171\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171/sql-audit-cmdlet-db171\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799916" + ], + "x-ms-request-id": [ + "219c35dd-9a0c-4681-9b46-84f3439884dd" + ], + "x-ms-correlation-request-id": [ + "219c35dd-9a0c-4681-9b46-84f3439884dd" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211825Z:219c35dd-9a0c-4681-9b46-84f3439884dd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db171\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server171\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:17:55.243176Z\",\r\n \"correlationId\": \"378d5413-a15e-40df-8156-0212ad892dda\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171/databases/sql-audit-cmdlet-db171\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171/sql-audit-cmdlet-db171\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799914" + ], + "x-ms-request-id": [ + "c20d18bb-08a2-4ca6-87f3-4ce2f081eba6" + ], + "x-ms-correlation-request-id": [ + "c20d18bb-08a2-4ca6-87f3-4ce2f081eba6" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211828Z:c20d18bb-08a2-4ca6-87f3-4ce2f081eba6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db171\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server171\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:17:55.243176Z\",\r\n \"correlationId\": \"378d5413-a15e-40df-8156-0212ad892dda\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171/databases/sql-audit-cmdlet-db171\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171/sql-audit-cmdlet-db171\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799912" + ], + "x-ms-request-id": [ + "a97b5db2-9647-4a00-8d0e-6740bd397f8f" + ], + "x-ms-correlation-request-id": [ + "a97b5db2-9647-4a00-8d0e-6740bd397f8f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211831Z:a97b5db2-9647-4a00-8d0e-6740bd397f8f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:31 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db171\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server171\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:17:55.243176Z\",\r\n \"correlationId\": \"378d5413-a15e-40df-8156-0212ad892dda\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171/databases/sql-audit-cmdlet-db171\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171/sql-audit-cmdlet-db171\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799910" + ], + "x-ms-request-id": [ + "c1b3d92a-8069-4a7f-a309-527b32046144" + ], + "x-ms-correlation-request-id": [ + "c1b3d92a-8069-4a7f-a309-527b32046144" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211834Z:c1b3d92a-8069-4a7f-a309-527b32046144" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:34 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db171\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server171\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:17:55.243176Z\",\r\n \"correlationId\": \"378d5413-a15e-40df-8156-0212ad892dda\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171/databases/sql-audit-cmdlet-db171\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171/sql-audit-cmdlet-db171\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799908" + ], + "x-ms-request-id": [ + "b5c0770c-b23a-4ba8-aea5-75def5d4167b" + ], + "x-ms-correlation-request-id": [ + "b5c0770c-b23a-4ba8-aea5-75def5d4167b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211837Z:b5c0770c-b23a-4ba8-aea5-75def5d4167b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:37 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db171\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server171\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:17:55.243176Z\",\r\n \"correlationId\": \"378d5413-a15e-40df-8156-0212ad892dda\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171/databases/sql-audit-cmdlet-db171\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171/sql-audit-cmdlet-db171\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799906" + ], + "x-ms-request-id": [ + "4963f8c4-7057-40fc-9e5f-4b408d25dc79" + ], + "x-ms-correlation-request-id": [ + "4963f8c4-7057-40fc-9e5f-4b408d25dc79" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211840Z:4963f8c4-7057-40fc-9e5f-4b408d25dc79" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:40 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db171\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server171\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:17:55.243176Z\",\r\n \"correlationId\": \"378d5413-a15e-40df-8156-0212ad892dda\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171/databases/sql-audit-cmdlet-db171\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171/sql-audit-cmdlet-db171\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799904" + ], + "x-ms-request-id": [ + "cbc8290a-4e6f-43ef-83e1-d0f4a8b85e72" + ], + "x-ms-correlation-request-id": [ + "cbc8290a-4e6f-43ef-83e1-d0f4a8b85e72" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211843Z:cbc8290a-4e6f-43ef-83e1-d0f4a8b85e72" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db171\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server171\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:17:55.243176Z\",\r\n \"correlationId\": \"378d5413-a15e-40df-8156-0212ad892dda\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171/databases/sql-audit-cmdlet-db171\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171/sql-audit-cmdlet-db171\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799902" + ], + "x-ms-request-id": [ + "abec91de-bd20-45fe-89e2-e87a5cd19d94" + ], + "x-ms-correlation-request-id": [ + "abec91de-bd20-45fe-89e2-e87a5cd19d94" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211846Z:abec91de-bd20-45fe-89e2-e87a5cd19d94" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db171\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server171\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:17:55.243176Z\",\r\n \"correlationId\": \"378d5413-a15e-40df-8156-0212ad892dda\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171/databases/sql-audit-cmdlet-db171\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171/sql-audit-cmdlet-db171\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799900" + ], + "x-ms-request-id": [ + "1dde3e4f-bab7-4b0e-83b5-d4166668a504" + ], + "x-ms-correlation-request-id": [ + "1dde3e4f-bab7-4b0e-83b5-d4166668a504" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211849Z:1dde3e4f-bab7-4b0e-83b5-d4166668a504" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db171\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server171\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:17:55.243176Z\",\r\n \"correlationId\": \"378d5413-a15e-40df-8156-0212ad892dda\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171/databases/sql-audit-cmdlet-db171\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171/sql-audit-cmdlet-db171\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799898" + ], + "x-ms-request-id": [ + "dda55da1-7a9d-48dd-bb1e-621d320a8c07" + ], + "x-ms-correlation-request-id": [ + "dda55da1-7a9d-48dd-bb1e-621d320a8c07" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211853Z:dda55da1-7a9d-48dd-bb1e-621d320a8c07" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db171\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server171\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:17:55.243176Z\",\r\n \"correlationId\": \"378d5413-a15e-40df-8156-0212ad892dda\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171/databases/sql-audit-cmdlet-db171\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171/sql-audit-cmdlet-db171\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799896" + ], + "x-ms-request-id": [ + "29e9e9e6-dd46-4812-afbb-6872cb519ae2" + ], + "x-ms-correlation-request-id": [ + "29e9e9e6-dd46-4812-afbb-6872cb519ae2" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211856Z:29e9e9e6-dd46-4812-afbb-6872cb519ae2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db171\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server171\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:17:55.243176Z\",\r\n \"correlationId\": \"378d5413-a15e-40df-8156-0212ad892dda\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171/databases/sql-audit-cmdlet-db171\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171/sql-audit-cmdlet-db171\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799894" + ], + "x-ms-request-id": [ + "fcf577b1-e833-48e3-aa3e-2aaf8b767270" + ], + "x-ms-correlation-request-id": [ + "fcf577b1-e833-48e3-aa3e-2aaf8b767270" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211859Z:fcf577b1-e833-48e3-aa3e-2aaf8b767270" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:18:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db171\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server171\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:17:55.243176Z\",\r\n \"correlationId\": \"378d5413-a15e-40df-8156-0212ad892dda\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171/databases/sql-audit-cmdlet-db171\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171/sql-audit-cmdlet-db171\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1623" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799892" + ], + "x-ms-request-id": [ + "ca3b02cc-44af-4621-bef1-8b148eb91648" + ], + "x-ms-correlation-request-id": [ + "ca3b02cc-44af-4621-bef1-8b148eb91648" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211902Z:ca3b02cc-44af-4621-bef1-8b148eb91648" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:19:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db171\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server171\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:19:02.4827763Z\",\r\n \"correlationId\": \"378d5413-a15e-40df-8156-0212ad892dda\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171/databases/sql-audit-cmdlet-db171\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server171/sql-audit-cmdlet-db171\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1626" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799890" + ], + "x-ms-request-id": [ + "1348cfcd-85b3-4cf9-b558-6c7f6cbbf60e" + ], + "x-ms-correlation-request-id": [ + "1348cfcd-85b3-4cf9-b558-6c7f6cbbf60e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211905Z:1348cfcd-85b3-4cf9-b558-6c7f6cbbf60e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:19:05 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171\",\r\n \"name\": \"sql-audit-cmdlet-server171\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server171/databases/sql-audit-cmdlet-db171\",\r\n \"name\": \"sql-audit-cmdlet-server171/sql-audit-cmdlet-db171\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "577" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799889" + ], + "x-ms-request-id": [ + "b75f66b4-f942-4cbe-882a-ebef4eb1dc00" + ], + "x-ms-correlation-request-id": [ + "b75f66b4-f942-4cbe-882a-ebef4eb1dc00" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211907Z:b75f66b4-f942-4cbe-882a-ebef4eb1dc00" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:19:07 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg171/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE3MS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westeurope:743dcfac-beba-4f86-9c79-12c54e1da28b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799842" + ], + "x-ms-correlation-request-id": [ + "34c13396-8b42-4e0a-a714-45227ae60bc7" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T211909Z:34c13396-8b42-4e0a-a714-45227ae60bc7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:19:09 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices/auditcmdlets171", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXMvYXVkaXRjbWRsZXRzMTcx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "14b5dc978c2c2d349558c79ec39def19" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:19:13 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/14b5dc978c2c2d349558c79ec39def19", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zLzE0YjVkYzk3OGMyYzJkMzQ5NTU4Yzc5ZWMzOWRlZjE5", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/2.0.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "\r\n 14b5dc97-8c2c-2d34-9558-c79ec39def19\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "23423455ba3b260ba48280d8482ad897" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:19:15 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "cca24ec8-99b5-4aa7-9ff6-486e886f304c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestServerDirectAccess.json b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestServerDirectAccess.json new file mode 100644 index 000000000000..a7fefcc52bf4 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestServerDirectAccess.json @@ -0,0 +1,3443 @@ +{ + "Entries": [ + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXM=", + "RequestMethod": "POST", + "RequestBody": "\r\n auditcmdlets650\r\n \r\n \r\n West US\r\n \r\n Standard_GRS\r\n", + "RequestHeaders": { + "Content-Type": [ + "application/xml" + ], + "Content-Length": [ + "379" + ], + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "732" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "bc906a90e1a62629b16f78eb1e0b8ded" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:29:03 GMT" + ], + "Location": [ + "https://management.core.windows.net/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/storage/auditcmdlets650" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/bc906a90e1a62629b16f78eb1e0b8ded", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zL2JjOTA2YTkwZTFhNjI2MjliMTZmNzhlYjFlMGI4ZGVk", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "732" + ] + }, + "ResponseBody": "\r\n bc906a90-e1a6-2629-b16f-78eb1e0b8ded\r\n InProgress\r\n", + "ResponseHeaders": { + "Content-Length": [ + "197" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "b4a8aa05d3702b75bea729175179f6d5" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:29:03 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/bc906a90e1a62629b16f78eb1e0b8ded", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zL2JjOTA2YTkwZTFhNjI2MjliMTZmNzhlYjFlMGI4ZGVk", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "732" + ] + }, + "ResponseBody": "\r\n bc906a90-e1a6-2629-b16f-78eb1e0b8ded\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "3548c058438828e58ffc34c321ce37e9" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:29:33 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "119" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799734" + ], + "x-ms-request-id": [ + "1b934d4d-bfb5-4fd9-86a9-7273a2805338" + ], + "x-ms-correlation-request-id": [ + "1b934d4d-bfb5-4fd9-86a9-7273a2805338" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212935Z:1b934d4d-bfb5-4fd9-86a9-7273a2805338" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:29:35 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650\",\r\n \"name\": \"sql-audit-cmdlet-test-rg650\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "217" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11976" + ], + "x-ms-request-id": [ + "f4cc704e-b94c-4d9e-b8f9-e2105c26def0" + ], + "x-ms-correlation-request-id": [ + "f4cc704e-b94c-4d9e-b8f9-e2105c26def0" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212937Z:f4cc704e-b94c-4d9e-b8f9-e2105c26def0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:29:37 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup/validate?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvdmFsaWRhdGU/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db650\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server650\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db650\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server650\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:29:38.3831313Z\",\r\n \"correlationId\": \"e228d987-6f69-4f82-aea3-afd4f4e06f04\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databases/sql-audit-cmdlet-db650\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650/sql-audit-cmdlet-db650\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11975" + ], + "x-ms-request-id": [ + "e228d987-6f69-4f82-aea3-afd4f4e06f04" + ], + "x-ms-correlation-request-id": [ + "e228d987-6f69-4f82-aea3-afd4f4e06f04" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212938Z:e228d987-6f69-4f82-aea3-afd4f4e06f04" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:29:38 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db650\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server650\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db650\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server650\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:29:40.1806504Z\",\r\n \"correlationId\": \"864a7ae5-1d91-4fa4-934a-c4bc72681e5e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databases/sql-audit-cmdlet-db650\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650/sql-audit-cmdlet-db650\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11974" + ], + "x-ms-request-id": [ + "864a7ae5-1d91-4fa4-934a-c4bc72681e5e" + ], + "x-ms-correlation-request-id": [ + "864a7ae5-1d91-4fa4-934a-c4bc72681e5e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212940Z:864a7ae5-1d91-4fa4-934a-c4bc72681e5e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:29:40 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799733" + ], + "x-ms-request-id": [ + "76e9fab2-55ee-4744-a63d-3e227fa3d630" + ], + "x-ms-correlation-request-id": [ + "76e9fab2-55ee-4744-a63d-3e227fa3d630" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212941Z:76e9fab2-55ee-4744-a63d-3e227fa3d630" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:29:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799731" + ], + "x-ms-request-id": [ + "a5c27e1c-8f74-40d3-83a4-93b26a3c5572" + ], + "x-ms-correlation-request-id": [ + "a5c27e1c-8f74-40d3-83a4-93b26a3c5572" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212945Z:a5c27e1c-8f74-40d3-83a4-93b26a3c5572" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:29:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799729" + ], + "x-ms-request-id": [ + "9ae566ed-2e82-4bba-8b87-8d9159cd2774" + ], + "x-ms-correlation-request-id": [ + "9ae566ed-2e82-4bba-8b87-8d9159cd2774" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212951Z:9ae566ed-2e82-4bba-8b87-8d9159cd2774" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:29:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799727" + ], + "x-ms-request-id": [ + "b0bbdc95-c6d0-4e2c-82d0-bb0d606036bc" + ], + "x-ms-correlation-request-id": [ + "b0bbdc95-c6d0-4e2c-82d0-bb0d606036bc" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212955Z:b0bbdc95-c6d0-4e2c-82d0-bb0d606036bc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:29:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799725" + ], + "x-ms-request-id": [ + "af29ba2c-2950-4ab7-9240-b01db0f89a30" + ], + "x-ms-correlation-request-id": [ + "af29ba2c-2950-4ab7-9240-b01db0f89a30" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212958Z:af29ba2c-2950-4ab7-9240-b01db0f89a30" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:29:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799723" + ], + "x-ms-request-id": [ + "4955ba5c-249f-4020-9fba-13dd15c45071" + ], + "x-ms-correlation-request-id": [ + "4955ba5c-249f-4020-9fba-13dd15c45071" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213001Z:4955ba5c-249f-4020-9fba-13dd15c45071" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799721" + ], + "x-ms-request-id": [ + "3add809a-6c49-441f-adec-b955aadcec0c" + ], + "x-ms-correlation-request-id": [ + "3add809a-6c49-441f-adec-b955aadcec0c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213006Z:3add809a-6c49-441f-adec-b955aadcec0c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:05 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799719" + ], + "x-ms-request-id": [ + "bec7acbe-51f3-4c25-b6a6-935af1b8fc31" + ], + "x-ms-correlation-request-id": [ + "bec7acbe-51f3-4c25-b6a6-935af1b8fc31" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213009Z:bec7acbe-51f3-4c25-b6a6-935af1b8fc31" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:09 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799717" + ], + "x-ms-request-id": [ + "cff52d53-cd4a-4f06-b5b5-e5f635671d0b" + ], + "x-ms-correlation-request-id": [ + "cff52d53-cd4a-4f06-b5b5-e5f635671d0b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213013Z:cff52d53-cd4a-4f06-b5b5-e5f635671d0b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799715" + ], + "x-ms-request-id": [ + "4b11a341-8079-4b8a-889a-d19cc4a85936" + ], + "x-ms-correlation-request-id": [ + "4b11a341-8079-4b8a-889a-d19cc4a85936" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213018Z:4b11a341-8079-4b8a-889a-d19cc4a85936" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:18 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799713" + ], + "x-ms-request-id": [ + "92e180af-4286-4eb1-8adb-ab1b4ae4279f" + ], + "x-ms-correlation-request-id": [ + "92e180af-4286-4eb1-8adb-ab1b4ae4279f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213021Z:92e180af-4286-4eb1-8adb-ab1b4ae4279f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:20 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799711" + ], + "x-ms-request-id": [ + "44acd706-9298-44a4-8d79-258c791a7213" + ], + "x-ms-correlation-request-id": [ + "44acd706-9298-44a4-8d79-258c791a7213" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213024Z:44acd706-9298-44a4-8d79-258c791a7213" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799709" + ], + "x-ms-request-id": [ + "e28632db-11b7-43c3-b5d4-2f768d18cc8e" + ], + "x-ms-correlation-request-id": [ + "e28632db-11b7-43c3-b5d4-2f768d18cc8e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213027Z:e28632db-11b7-43c3-b5d4-2f768d18cc8e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:27 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799707" + ], + "x-ms-request-id": [ + "aa2d955c-fad7-4a3c-84ff-ab7dba715ec3" + ], + "x-ms-correlation-request-id": [ + "aa2d955c-fad7-4a3c-84ff-ab7dba715ec3" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213030Z:aa2d955c-fad7-4a3c-84ff-ab7dba715ec3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:30 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799705" + ], + "x-ms-request-id": [ + "32f899b0-e015-4756-8bc3-ae99683d8caf" + ], + "x-ms-correlation-request-id": [ + "32f899b0-e015-4756-8bc3-ae99683d8caf" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213033Z:32f899b0-e015-4756-8bc3-ae99683d8caf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:32 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799703" + ], + "x-ms-request-id": [ + "bf01caa5-3634-47d1-9130-c24fbaf678be" + ], + "x-ms-correlation-request-id": [ + "bf01caa5-3634-47d1-9130-c24fbaf678be" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213036Z:bf01caa5-3634-47d1-9130-c24fbaf678be" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:36 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup/operations/C328B3966D1D3AE5\",\r\n \"operationId\": \"C328B3966D1D3AE5\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:30:36.8080022Z\",\r\n \"trackingId\": \"50470a0a-6289-4069-bbcc-cb5e3bdffe27\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799701" + ], + "x-ms-request-id": [ + "50832df4-e2ef-4fe9-b790-71cd7fdcd39b" + ], + "x-ms-correlation-request-id": [ + "50832df4-e2ef-4fe9-b790-71cd7fdcd39b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213039Z:50832df4-e2ef-4fe9-b790-71cd7fdcd39b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup/operations/C328B3966D1D3AE5\",\r\n \"operationId\": \"C328B3966D1D3AE5\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:30:36.8080022Z\",\r\n \"trackingId\": \"50470a0a-6289-4069-bbcc-cb5e3bdffe27\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799699" + ], + "x-ms-request-id": [ + "13a89c7f-d975-4bfe-bebd-9efa4ae4bf9a" + ], + "x-ms-correlation-request-id": [ + "13a89c7f-d975-4bfe-bebd-9efa4ae4bf9a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213042Z:13a89c7f-d975-4bfe-bebd-9efa4ae4bf9a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup/operations/CAA9046DC28F14C0\",\r\n \"operationId\": \"CAA9046DC28F14C0\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:30:45.4336896Z\",\r\n \"trackingId\": \"280e3bba-1441-4a26-a516-d7b7a548ac79\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databases/sql-audit-cmdlet-db650\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650/sql-audit-cmdlet-db650\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup/operations/C328B3966D1D3AE5\",\r\n \"operationId\": \"C328B3966D1D3AE5\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:30:36.8080022Z\",\r\n \"trackingId\": \"50470a0a-6289-4069-bbcc-cb5e3bdffe27\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799697" + ], + "x-ms-request-id": [ + "ed45fbec-7a96-40dd-ba1c-ccc756a61358" + ], + "x-ms-correlation-request-id": [ + "ed45fbec-7a96-40dd-ba1c-ccc756a61358" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213046Z:ed45fbec-7a96-40dd-ba1c-ccc756a61358" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup/operations/CAA9046DC28F14C0\",\r\n \"operationId\": \"CAA9046DC28F14C0\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:30:45.4336896Z\",\r\n \"trackingId\": \"280e3bba-1441-4a26-a516-d7b7a548ac79\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databases/sql-audit-cmdlet-db650\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650/sql-audit-cmdlet-db650\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup/operations/C328B3966D1D3AE5\",\r\n \"operationId\": \"C328B3966D1D3AE5\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:30:36.8080022Z\",\r\n \"trackingId\": \"50470a0a-6289-4069-bbcc-cb5e3bdffe27\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799695" + ], + "x-ms-request-id": [ + "e72b09c5-8a6e-43d2-a803-8bbd927abac4" + ], + "x-ms-correlation-request-id": [ + "e72b09c5-8a6e-43d2-a803-8bbd927abac4" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213049Z:e72b09c5-8a6e-43d2-a803-8bbd927abac4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup/operations/CAA9046DC28F14C0\",\r\n \"operationId\": \"CAA9046DC28F14C0\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:30:45.4336896Z\",\r\n \"trackingId\": \"280e3bba-1441-4a26-a516-d7b7a548ac79\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databases/sql-audit-cmdlet-db650\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650/sql-audit-cmdlet-db650\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup/operations/C328B3966D1D3AE5\",\r\n \"operationId\": \"C328B3966D1D3AE5\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:30:36.8080022Z\",\r\n \"trackingId\": \"50470a0a-6289-4069-bbcc-cb5e3bdffe27\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799693" + ], + "x-ms-request-id": [ + "0f550d92-a2b4-4f11-8d45-30955676173a" + ], + "x-ms-correlation-request-id": [ + "0f550d92-a2b4-4f11-8d45-30955676173a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213052Z:0f550d92-a2b4-4f11-8d45-30955676173a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:52 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db650\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server650\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:29:40.1806504Z\",\r\n \"correlationId\": \"864a7ae5-1d91-4fa4-934a-c4bc72681e5e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databases/sql-audit-cmdlet-db650\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650/sql-audit-cmdlet-db650\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799732" + ], + "x-ms-request-id": [ + "0f1ae90d-61f4-4e2e-a762-92afe4c24e78" + ], + "x-ms-correlation-request-id": [ + "0f1ae90d-61f4-4e2e-a762-92afe4c24e78" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212942Z:0f1ae90d-61f4-4e2e-a762-92afe4c24e78" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:29:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db650\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server650\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:29:42.6154795Z\",\r\n \"correlationId\": \"864a7ae5-1d91-4fa4-934a-c4bc72681e5e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databases/sql-audit-cmdlet-db650\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650/sql-audit-cmdlet-db650\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799730" + ], + "x-ms-request-id": [ + "e1bb5a16-02bc-46c0-8836-eb813090eb69" + ], + "x-ms-correlation-request-id": [ + "e1bb5a16-02bc-46c0-8836-eb813090eb69" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212948Z:e1bb5a16-02bc-46c0-8836-eb813090eb69" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:29:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db650\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server650\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:29:42.6154795Z\",\r\n \"correlationId\": \"864a7ae5-1d91-4fa4-934a-c4bc72681e5e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databases/sql-audit-cmdlet-db650\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650/sql-audit-cmdlet-db650\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799728" + ], + "x-ms-request-id": [ + "89e4570e-0fd6-4bc6-b290-525c100481ee" + ], + "x-ms-correlation-request-id": [ + "89e4570e-0fd6-4bc6-b290-525c100481ee" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212952Z:89e4570e-0fd6-4bc6-b290-525c100481ee" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:29:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db650\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server650\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:29:42.6154795Z\",\r\n \"correlationId\": \"864a7ae5-1d91-4fa4-934a-c4bc72681e5e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databases/sql-audit-cmdlet-db650\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650/sql-audit-cmdlet-db650\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799726" + ], + "x-ms-request-id": [ + "1bea0c6c-3429-4c10-b0f0-e61d4f83166d" + ], + "x-ms-correlation-request-id": [ + "1bea0c6c-3429-4c10-b0f0-e61d4f83166d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212955Z:1bea0c6c-3429-4c10-b0f0-e61d4f83166d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:29:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db650\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server650\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:29:42.6154795Z\",\r\n \"correlationId\": \"864a7ae5-1d91-4fa4-934a-c4bc72681e5e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databases/sql-audit-cmdlet-db650\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650/sql-audit-cmdlet-db650\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799724" + ], + "x-ms-request-id": [ + "54f5cb5b-ed11-47b2-a5d1-a2f96205a983" + ], + "x-ms-correlation-request-id": [ + "54f5cb5b-ed11-47b2-a5d1-a2f96205a983" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212958Z:54f5cb5b-ed11-47b2-a5d1-a2f96205a983" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:29:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db650\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server650\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:29:42.6154795Z\",\r\n \"correlationId\": \"864a7ae5-1d91-4fa4-934a-c4bc72681e5e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databases/sql-audit-cmdlet-db650\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650/sql-audit-cmdlet-db650\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799722" + ], + "x-ms-request-id": [ + "040c1a34-6623-4717-8d7a-03343889c612" + ], + "x-ms-correlation-request-id": [ + "040c1a34-6623-4717-8d7a-03343889c612" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213002Z:040c1a34-6623-4717-8d7a-03343889c612" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db650\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server650\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:29:42.6154795Z\",\r\n \"correlationId\": \"864a7ae5-1d91-4fa4-934a-c4bc72681e5e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databases/sql-audit-cmdlet-db650\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650/sql-audit-cmdlet-db650\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799720" + ], + "x-ms-request-id": [ + "79752b2d-f4e9-4d18-a916-144fc743ce1f" + ], + "x-ms-correlation-request-id": [ + "79752b2d-f4e9-4d18-a916-144fc743ce1f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213006Z:79752b2d-f4e9-4d18-a916-144fc743ce1f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db650\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server650\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:29:42.6154795Z\",\r\n \"correlationId\": \"864a7ae5-1d91-4fa4-934a-c4bc72681e5e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databases/sql-audit-cmdlet-db650\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650/sql-audit-cmdlet-db650\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799718" + ], + "x-ms-request-id": [ + "6e9485e8-4cb1-4ce4-a862-dd05762419a4" + ], + "x-ms-correlation-request-id": [ + "6e9485e8-4cb1-4ce4-a862-dd05762419a4" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213009Z:6e9485e8-4cb1-4ce4-a862-dd05762419a4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:09 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db650\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server650\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:29:42.6154795Z\",\r\n \"correlationId\": \"864a7ae5-1d91-4fa4-934a-c4bc72681e5e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databases/sql-audit-cmdlet-db650\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650/sql-audit-cmdlet-db650\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799716" + ], + "x-ms-request-id": [ + "cf55b39d-0e2c-4362-9088-588ca9014bf6" + ], + "x-ms-correlation-request-id": [ + "cf55b39d-0e2c-4362-9088-588ca9014bf6" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213014Z:cf55b39d-0e2c-4362-9088-588ca9014bf6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:14 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db650\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server650\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:29:42.6154795Z\",\r\n \"correlationId\": \"864a7ae5-1d91-4fa4-934a-c4bc72681e5e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databases/sql-audit-cmdlet-db650\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650/sql-audit-cmdlet-db650\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799714" + ], + "x-ms-request-id": [ + "c57c7f5c-bd14-41be-b9a1-2eae75f9ff18" + ], + "x-ms-correlation-request-id": [ + "c57c7f5c-bd14-41be-b9a1-2eae75f9ff18" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213018Z:c57c7f5c-bd14-41be-b9a1-2eae75f9ff18" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:18 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db650\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server650\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:29:42.6154795Z\",\r\n \"correlationId\": \"864a7ae5-1d91-4fa4-934a-c4bc72681e5e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databases/sql-audit-cmdlet-db650\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650/sql-audit-cmdlet-db650\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799712" + ], + "x-ms-request-id": [ + "d3e70b74-bfca-4d32-adb8-b69c4d75c76b" + ], + "x-ms-correlation-request-id": [ + "d3e70b74-bfca-4d32-adb8-b69c4d75c76b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213021Z:d3e70b74-bfca-4d32-adb8-b69c4d75c76b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:21 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db650\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server650\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:29:42.6154795Z\",\r\n \"correlationId\": \"864a7ae5-1d91-4fa4-934a-c4bc72681e5e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databases/sql-audit-cmdlet-db650\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650/sql-audit-cmdlet-db650\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799710" + ], + "x-ms-request-id": [ + "2c822f32-c400-40f7-b163-0f9848217ef2" + ], + "x-ms-correlation-request-id": [ + "2c822f32-c400-40f7-b163-0f9848217ef2" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213024Z:2c822f32-c400-40f7-b163-0f9848217ef2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db650\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server650\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:29:42.6154795Z\",\r\n \"correlationId\": \"864a7ae5-1d91-4fa4-934a-c4bc72681e5e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databases/sql-audit-cmdlet-db650\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650/sql-audit-cmdlet-db650\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799708" + ], + "x-ms-request-id": [ + "b679d6bc-152e-4016-a25c-f8d289f06243" + ], + "x-ms-correlation-request-id": [ + "b679d6bc-152e-4016-a25c-f8d289f06243" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213027Z:b679d6bc-152e-4016-a25c-f8d289f06243" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:27 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db650\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server650\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:29:42.6154795Z\",\r\n \"correlationId\": \"864a7ae5-1d91-4fa4-934a-c4bc72681e5e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databases/sql-audit-cmdlet-db650\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650/sql-audit-cmdlet-db650\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799706" + ], + "x-ms-request-id": [ + "8c4619fb-3ebc-4886-bf37-edb78d8e1890" + ], + "x-ms-correlation-request-id": [ + "8c4619fb-3ebc-4886-bf37-edb78d8e1890" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213031Z:8c4619fb-3ebc-4886-bf37-edb78d8e1890" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:31 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db650\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server650\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:29:42.6154795Z\",\r\n \"correlationId\": \"864a7ae5-1d91-4fa4-934a-c4bc72681e5e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databases/sql-audit-cmdlet-db650\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650/sql-audit-cmdlet-db650\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799704" + ], + "x-ms-request-id": [ + "649d528f-164f-4bcc-99c7-6ff054b94dd7" + ], + "x-ms-correlation-request-id": [ + "649d528f-164f-4bcc-99c7-6ff054b94dd7" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213034Z:649d528f-164f-4bcc-99c7-6ff054b94dd7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:34 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db650\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server650\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:29:42.6154795Z\",\r\n \"correlationId\": \"864a7ae5-1d91-4fa4-934a-c4bc72681e5e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databases/sql-audit-cmdlet-db650\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650/sql-audit-cmdlet-db650\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799702" + ], + "x-ms-request-id": [ + "da21621a-7c0e-4a89-a1a0-771832d2defb" + ], + "x-ms-correlation-request-id": [ + "da21621a-7c0e-4a89-a1a0-771832d2defb" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213037Z:da21621a-7c0e-4a89-a1a0-771832d2defb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:36 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db650\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server650\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:29:42.6154795Z\",\r\n \"correlationId\": \"864a7ae5-1d91-4fa4-934a-c4bc72681e5e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databases/sql-audit-cmdlet-db650\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650/sql-audit-cmdlet-db650\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799700" + ], + "x-ms-request-id": [ + "2dd4ad9e-b5ea-4eac-bfbc-d7f9784afdfc" + ], + "x-ms-correlation-request-id": [ + "2dd4ad9e-b5ea-4eac-bfbc-d7f9784afdfc" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213040Z:2dd4ad9e-b5ea-4eac-bfbc-d7f9784afdfc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db650\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server650\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:29:42.6154795Z\",\r\n \"correlationId\": \"864a7ae5-1d91-4fa4-934a-c4bc72681e5e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databases/sql-audit-cmdlet-db650\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650/sql-audit-cmdlet-db650\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799698" + ], + "x-ms-request-id": [ + "f9bdc76e-3025-4085-a2cc-2294a2711808" + ], + "x-ms-correlation-request-id": [ + "f9bdc76e-3025-4085-a2cc-2294a2711808" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213043Z:f9bdc76e-3025-4085-a2cc-2294a2711808" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db650\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server650\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:29:42.6154795Z\",\r\n \"correlationId\": \"864a7ae5-1d91-4fa4-934a-c4bc72681e5e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databases/sql-audit-cmdlet-db650\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650/sql-audit-cmdlet-db650\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799696" + ], + "x-ms-request-id": [ + "89823541-e496-46b5-9193-a29e8df9ab0c" + ], + "x-ms-correlation-request-id": [ + "89823541-e496-46b5-9193-a29e8df9ab0c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213046Z:89823541-e496-46b5-9193-a29e8df9ab0c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db650\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server650\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:29:42.6154795Z\",\r\n \"correlationId\": \"864a7ae5-1d91-4fa4-934a-c4bc72681e5e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databases/sql-audit-cmdlet-db650\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650/sql-audit-cmdlet-db650\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799694" + ], + "x-ms-request-id": [ + "33309bc4-3f5d-4b5b-9f7c-7fd709de61fc" + ], + "x-ms-correlation-request-id": [ + "33309bc4-3f5d-4b5b-9f7c-7fd709de61fc" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213049Z:33309bc4-3f5d-4b5b-9f7c-7fd709de61fc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db650\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server650\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:30:50.5298658Z\",\r\n \"correlationId\": \"864a7ae5-1d91-4fa4-934a-c4bc72681e5e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databases/sql-audit-cmdlet-db650\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server650/sql-audit-cmdlet-db650\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1626" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799692" + ], + "x-ms-request-id": [ + "f4f18889-f89c-4d01-b7a0-94f9a006aea6" + ], + "x-ms-correlation-request-id": [ + "f4f18889-f89c-4d01-b7a0-94f9a006aea6" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213053Z:f4f18889-f89c-4d01-b7a0-94f9a006aea6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:52 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650\",\r\n \"name\": \"sql-audit-cmdlet-server650\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databases/sql-audit-cmdlet-db650\",\r\n \"name\": \"sql-audit-cmdlet-server650/sql-audit-cmdlet-db650\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "577" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799691" + ], + "x-ms-request-id": [ + "93c396df-c382-482e-b467-cb0b7d2c6171" + ], + "x-ms-correlation-request-id": [ + "93c396df-c382-482e-b467-cb0b7d2c6171" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213055Z:93c396df-c382-482e-b467-cb0b7d2c6171" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westeurope:9ba8d4a4-f8c0-44ea-9aa6-6fc466f2430f" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799882" + ], + "x-ms-correlation-request-id": [ + "1209864e-f27d-480e-994f-afc5d58330e7" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213055Z:1209864e-f27d-480e-994f-afc5d58330e7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjUwL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "002831dd-9e91-4c23-977c-e354b36e3f67-2014-10-31 21:30:57Z" + ], + "x-ms-client-request-id": [ + "03427f70-4a29-4da8-b165-9c811a0957cc-2014-10-31 21:30:57Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets650\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets650.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server650.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server650;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server650.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server650;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server650.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server650.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server650\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server650.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server650.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server650;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server650.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2924" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "f2ca0a23-d5bb-4665-af1e-6669794a619b" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799690" + ], + "x-ms-correlation-request-id": [ + "1622f2cf-a5a1-40f5-af04-7963add0929a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213059Z:1622f2cf-a5a1-40f5-af04-7963add0929a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:30:59 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjUwL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "002831dd-9e91-4c23-977c-e354b36e3f67-2014-10-31 21:30:57Z" + ], + "x-ms-client-request-id": [ + "20e09e01-afe6-4918-a9e0-7a4bd16b551a-2014-10-31 21:31:05Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets650\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets650.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server650.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server650;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server650.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server650;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server650.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server650.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server650\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server650.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server650.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server650;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server650.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2924" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "89d32982-0b88-4da9-9ab5-6cccf71ee5fe" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799689" + ], + "x-ms-correlation-request-id": [ + "d94038bd-e581-440d-a12b-54f74a2b6251" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213106Z:d94038bd-e581-440d-a12b-54f74a2b6251" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:31:06 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjUwL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "002831dd-9e91-4c23-977c-e354b36e3f67-2014-10-31 21:30:57Z" + ], + "x-ms-client-request-id": [ + "221fe515-f4a6-4c51-9497-2a285273789e-2014-10-31 21:31:11Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets650\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets650.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server650.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server650;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server650.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server650;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server650.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server650.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server650\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server650.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server650.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server650;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server650.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2924" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "d84a3b57-2561-4842-9d47-084284554528" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799688" + ], + "x-ms-correlation-request-id": [ + "a94b7c8a-9b85-4f5c-9e3b-bf9ccbd402a9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213111Z:a94b7c8a-9b85-4f5c-9e3b-bf9ccbd402a9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:31:11 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjUwL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "002831dd-9e91-4c23-977c-e354b36e3f67-2014-10-31 21:30:57Z" + ], + "x-ms-client-request-id": [ + "f4115276-336f-4289-a1b4-2033f65af1bf-2014-10-31 21:31:13Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets650\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets650.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server650.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server650;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server650.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server650;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server650.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server650.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server650\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server650.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server650.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server650;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server650.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2924" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "8ff4a212-7a30-42b7-a6ae-8733767b3ae6" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799687" + ], + "x-ms-correlation-request-id": [ + "677b01d5-7aff-4372-898e-3e286fb2c763" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213113Z:677b01d5-7aff-4372-898e-3e286fb2c763" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:31:13 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjUwL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "002831dd-9e91-4c23-977c-e354b36e3f67-2014-10-31 21:30:57Z" + ], + "x-ms-client-request-id": [ + "cb0198b3-0aee-4233-9917-5a0e100b740f-2014-10-31 21:31:18Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets650\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets650.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server650.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server650;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server650.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server650;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server650.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server650.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server650\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server650.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server650.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server650;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server650.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": true\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2923" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "68fe2d22-7e7c-473c-8b06-aedda4659228" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799686" + ], + "x-ms-correlation-request-id": [ + "19f606a6-0abe-4a3b-a72a-ffa5348628bf" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213118Z:19f606a6-0abe-4a3b-a72a-ffa5348628bf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:31:18 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjUwL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "002831dd-9e91-4c23-977c-e354b36e3f67-2014-10-31 21:30:57Z" + ], + "x-ms-client-request-id": [ + "c53b1de7-862c-472d-933d-a42a022ce46f-2014-10-31 21:31:19Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets650\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets650.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server650.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server650;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server650.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server650;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server650.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server650.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server650\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server650.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server650.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server650;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server650.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": true\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2923" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "e279ead8-de89-43ff-b883-89e486dca606" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799685" + ], + "x-ms-correlation-request-id": [ + "6272444b-1c5a-4504-ab5f-01fa45a1c936" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213121Z:6272444b-1c5a-4504-ab5f-01fa45a1c936" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:31:21 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjUwL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "002831dd-9e91-4c23-977c-e354b36e3f67-2014-10-31 21:30:57Z" + ], + "x-ms-client-request-id": [ + "ad47bfa3-9c3c-440f-b23a-38b49072ea21-2014-10-31 21:31:26Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets650\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets650.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server650.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server650;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server650.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server650;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server650.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server650.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server650\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server650.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server650.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server650;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server650.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2924" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "86e748f7-2168-44cf-8d34-e1076471dc4e" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799684" + ], + "x-ms-correlation-request-id": [ + "deffd0c8-edcc-4e31-9dd7-c104299a7044" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213126Z:deffd0c8-edcc-4e31-9dd7-c104299a7044" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:31:26 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets650/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzNjUwL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "002831dd-9e91-4c23-977c-e354b36e3f67-2014-10-31 21:30:57Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"p03AitvP5d1qS4gUt0pcPUMjkCAfTQ4NccOb4W/6K0oQOZ1UK1iSxxgpvz3kZJFV6bLeyqNcYFGS9AbviIST5Q==\",\r\n \"secondaryKey\": \"+AyrQGv9kNicUExGZWlQnDz4G/2ssO48xv2jysfkaJH7YJ1NKmQI9mRV5UW11lh6+8+QC/hjyJ+9qiyGXJ90Gw==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:654419c4-8c56-4b91-81b0-71a6c688a41e" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11973" + ], + "x-ms-correlation-request-id": [ + "a797f988-dd9b-484e-b832-39ec711cd39b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213101Z:a797f988-dd9b-484e-b832-39ec711cd39b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:31:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets650/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzNjUwL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "002831dd-9e91-4c23-977c-e354b36e3f67-2014-10-31 21:30:57Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"p03AitvP5d1qS4gUt0pcPUMjkCAfTQ4NccOb4W/6K0oQOZ1UK1iSxxgpvz3kZJFV6bLeyqNcYFGS9AbviIST5Q==\",\r\n \"secondaryKey\": \"+AyrQGv9kNicUExGZWlQnDz4G/2ssO48xv2jysfkaJH7YJ1NKmQI9mRV5UW11lh6+8+QC/hjyJ+9qiyGXJ90Gw==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:34c15f70-6e44-455c-a788-6faf860c64cc" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11971" + ], + "x-ms-correlation-request-id": [ + "4325484f-da2d-4408-bd32-445e739d6f2b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213107Z:4325484f-da2d-4408-bd32-445e739d6f2b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:31:07 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets650/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzNjUwL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "002831dd-9e91-4c23-977c-e354b36e3f67-2014-10-31 21:30:57Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"p03AitvP5d1qS4gUt0pcPUMjkCAfTQ4NccOb4W/6K0oQOZ1UK1iSxxgpvz3kZJFV6bLeyqNcYFGS9AbviIST5Q==\",\r\n \"secondaryKey\": \"+AyrQGv9kNicUExGZWlQnDz4G/2ssO48xv2jysfkaJH7YJ1NKmQI9mRV5UW11lh6+8+QC/hjyJ+9qiyGXJ90Gw==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:18f89fec-087b-4309-8fc4-4592a9c720b6" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11969" + ], + "x-ms-correlation-request-id": [ + "899a0236-c2b7-4ac1-a2ca-151d5015e99a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213114Z:899a0236-c2b7-4ac1-a2ca-151d5015e99a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:31:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets650/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzNjUwL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "002831dd-9e91-4c23-977c-e354b36e3f67-2014-10-31 21:30:57Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"p03AitvP5d1qS4gUt0pcPUMjkCAfTQ4NccOb4W/6K0oQOZ1UK1iSxxgpvz3kZJFV6bLeyqNcYFGS9AbviIST5Q==\",\r\n \"secondaryKey\": \"+AyrQGv9kNicUExGZWlQnDz4G/2ssO48xv2jysfkaJH7YJ1NKmQI9mRV5UW11lh6+8+QC/hjyJ+9qiyGXJ90Gw==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:642f60d7-6ac4-40b3-a102-63fd1489883d" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11967" + ], + "x-ms-correlation-request-id": [ + "445a5f26-0c0f-469f-8933-32c3f54e99b6" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213122Z:445a5f26-0c0f-469f-8933-32c3f54e99b6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:31:21 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjUwL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets650\",\r\n \"storageAccountKey\": \"p03AitvP5d1qS4gUt0pcPUMjkCAfTQ4NccOb4W/6K0oQOZ1UK1iSxxgpvz3kZJFV6bLeyqNcYFGS9AbviIST5Q==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets650.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "784" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "002831dd-9e91-4c23-977c-e354b36e3f67-2014-10-31 21:30:57Z" + ], + "x-ms-client-request-id": [ + "03427f70-4a29-4da8-b165-9c811a0957cc-2014-10-31 21:30:57Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets650\",\r\n \"storageAccountKey\": \"p03AitvP5d1qS4gUt0pcPUMjkCAfTQ4NccOb4W/6K0oQOZ1UK1iSxxgpvz3kZJFV6bLeyqNcYFGS9AbviIST5Q==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets650.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1183" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "3058bce4-f48e-495a-8553-fdbf1d956b92" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11972" + ], + "x-ms-correlation-request-id": [ + "dac37456-cb7e-4d96-b9bd-a99d9a9d4c37" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213104Z:dac37456-cb7e-4d96-b9bd-a99d9a9d4c37" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:31:04 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjUwL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets650\",\r\n \"storageAccountKey\": \"p03AitvP5d1qS4gUt0pcPUMjkCAfTQ4NccOb4W/6K0oQOZ1UK1iSxxgpvz3kZJFV6bLeyqNcYFGS9AbviIST5Q==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets650.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "784" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "002831dd-9e91-4c23-977c-e354b36e3f67-2014-10-31 21:30:57Z" + ], + "x-ms-client-request-id": [ + "20e09e01-afe6-4918-a9e0-7a4bd16b551a-2014-10-31 21:31:05Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets650\",\r\n \"storageAccountKey\": \"p03AitvP5d1qS4gUt0pcPUMjkCAfTQ4NccOb4W/6K0oQOZ1UK1iSxxgpvz3kZJFV6bLeyqNcYFGS9AbviIST5Q==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets650.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1183" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "7297b6f5-5e09-4790-819f-d06d3e1d1533" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11970" + ], + "x-ms-correlation-request-id": [ + "3e637be8-1aa3-4bdf-85ce-dff1287ebdf4" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213110Z:3e637be8-1aa3-4bdf-85ce-dff1287ebdf4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:31:10 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjUwL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets650\",\r\n \"storageAccountKey\": \"p03AitvP5d1qS4gUt0pcPUMjkCAfTQ4NccOb4W/6K0oQOZ1UK1iSxxgpvz3kZJFV6bLeyqNcYFGS9AbviIST5Q==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets650.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": true\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "783" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "002831dd-9e91-4c23-977c-e354b36e3f67-2014-10-31 21:30:57Z" + ], + "x-ms-client-request-id": [ + "f4115276-336f-4289-a1b4-2033f65af1bf-2014-10-31 21:31:13Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets650\",\r\n \"storageAccountKey\": \"p03AitvP5d1qS4gUt0pcPUMjkCAfTQ4NccOb4W/6K0oQOZ1UK1iSxxgpvz3kZJFV6bLeyqNcYFGS9AbviIST5Q==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets650.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": true\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1182" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "fb889f06-f92f-4b0e-abf2-8ebe23dc1487" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11968" + ], + "x-ms-correlation-request-id": [ + "e86435f3-1c79-4110-bb2a-983cfc345acb" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213116Z:e86435f3-1c79-4110-bb2a-983cfc345acb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:31:16 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY1MC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjUwL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets650\",\r\n \"storageAccountKey\": \"p03AitvP5d1qS4gUt0pcPUMjkCAfTQ4NccOb4W/6K0oQOZ1UK1iSxxgpvz3kZJFV6bLeyqNcYFGS9AbviIST5Q==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets650.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "784" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "002831dd-9e91-4c23-977c-e354b36e3f67-2014-10-31 21:30:57Z" + ], + "x-ms-client-request-id": [ + "c53b1de7-862c-472d-933d-a42a022ce46f-2014-10-31 21:31:19Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets650\",\r\n \"storageAccountKey\": \"p03AitvP5d1qS4gUt0pcPUMjkCAfTQ4NccOb4W/6K0oQOZ1UK1iSxxgpvz3kZJFV6bLeyqNcYFGS9AbviIST5Q==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets650.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg650/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server650/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1183" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "25ffd569-9d4f-43bb-9607-47c3a64f59f3" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11966" + ], + "x-ms-correlation-request-id": [ + "7144df52-0017-448d-b9c4-96e26c7e5843" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213125Z:7144df52-0017-448d-b9c4-96e26c7e5843" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:31:24 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices/auditcmdlets650", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXMvYXVkaXRjbWRsZXRzNjUw", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "d3f3d1316e9825f29c454d88f3ec99f1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:31:31 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/d3f3d1316e9825f29c454d88f3ec99f1", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zL2QzZjNkMTMxNmU5ODI1ZjI5YzQ1NGQ4OGYzZWM5OWYx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/2.0.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "\r\n d3f3d131-6e98-25f2-9c45-4d88f3ec99f1\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "4c5e26b08be123f5bba0cb0501fadc90" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:31:33 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "cca24ec8-99b5-4aa7-9ff6-486e886f304c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestServerDisableEnableKeepProperties.json b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestServerDisableEnableKeepProperties.json new file mode 100644 index 000000000000..7e5efe6e4381 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestServerDisableEnableKeepProperties.json @@ -0,0 +1,3284 @@ +{ + "Entries": [ + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXM=", + "RequestMethod": "POST", + "RequestBody": "\r\n auditcmdlets131\r\n \r\n \r\n West US\r\n \r\n Standard_GRS\r\n", + "RequestHeaders": { + "Content-Type": [ + "application/xml" + ], + "Content-Length": [ + "379" + ], + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "597" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "e5861fb04a6c2652ae2e76d470bbaf0b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:22:59 GMT" + ], + "Location": [ + "https://management.core.windows.net/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/storage/auditcmdlets131" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/e5861fb04a6c2652ae2e76d470bbaf0b", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zL2U1ODYxZmIwNGE2YzI2NTJhZTJlNzZkNDcwYmJhZjBi", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "597" + ] + }, + "ResponseBody": "\r\n e5861fb0-4a6c-2652-ae2e-76d470bbaf0b\r\n InProgress\r\n", + "ResponseHeaders": { + "Content-Length": [ + "197" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "bdbffdff002a236c8de5b6a4a0f0ac44" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:22:59 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/e5861fb04a6c2652ae2e76d470bbaf0b", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zL2U1ODYxZmIwNGE2YzI2NTJhZTJlNzZkNDcwYmJhZjBi", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "597" + ] + }, + "ResponseBody": "\r\n e5861fb0-4a6c-2652-ae2e-76d470bbaf0b\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "67a7c484499d2b8e81611f01c66630c4" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:23:29 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "119" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799841" + ], + "x-ms-request-id": [ + "2fb7cf9c-d176-41a1-b4a4-ca8e2216be85" + ], + "x-ms-correlation-request-id": [ + "2fb7cf9c-d176-41a1-b4a4-ca8e2216be85" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212331Z:2fb7cf9c-d176-41a1-b4a4-ca8e2216be85" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:23:30 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131\",\r\n \"name\": \"sql-audit-cmdlet-test-rg131\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "217" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11979" + ], + "x-ms-request-id": [ + "3f3813c3-c43d-460b-a7fa-d7144d5e5609" + ], + "x-ms-correlation-request-id": [ + "3f3813c3-c43d-460b-a7fa-d7144d5e5609" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212333Z:3f3813c3-c43d-460b-a7fa-d7144d5e5609" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:23:32 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup/validate?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvdmFsaWRhdGU/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db131\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server131\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db131\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server131\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:23:34.1804583Z\",\r\n \"correlationId\": \"125eaa7d-dae3-4040-9f7a-46e5bd1551a5\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databases/sql-audit-cmdlet-db131\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131/sql-audit-cmdlet-db131\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11978" + ], + "x-ms-request-id": [ + "125eaa7d-dae3-4040-9f7a-46e5bd1551a5" + ], + "x-ms-correlation-request-id": [ + "125eaa7d-dae3-4040-9f7a-46e5bd1551a5" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212334Z:125eaa7d-dae3-4040-9f7a-46e5bd1551a5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:23:34 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db131\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server131\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db131\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server131\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:23:35.696892Z\",\r\n \"correlationId\": \"6d507e7e-8a7d-4f9a-8c5a-63a0c5159c44\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databases/sql-audit-cmdlet-db131\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131/sql-audit-cmdlet-db131\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11977" + ], + "x-ms-request-id": [ + "6d507e7e-8a7d-4f9a-8c5a-63a0c5159c44" + ], + "x-ms-correlation-request-id": [ + "6d507e7e-8a7d-4f9a-8c5a-63a0c5159c44" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212336Z:6d507e7e-8a7d-4f9a-8c5a-63a0c5159c44" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:23:35 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799840" + ], + "x-ms-request-id": [ + "cdbbd2f8-5327-4caf-9d26-29e93d85ed07" + ], + "x-ms-correlation-request-id": [ + "cdbbd2f8-5327-4caf-9d26-29e93d85ed07" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212336Z:cdbbd2f8-5327-4caf-9d26-29e93d85ed07" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:23:36 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799838" + ], + "x-ms-request-id": [ + "1659bf73-e431-401d-adbf-cc49770594b1" + ], + "x-ms-correlation-request-id": [ + "1659bf73-e431-401d-adbf-cc49770594b1" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212339Z:1659bf73-e431-401d-adbf-cc49770594b1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:23:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799836" + ], + "x-ms-request-id": [ + "b8dcc98a-a829-43c6-a040-7078ea111c2b" + ], + "x-ms-correlation-request-id": [ + "b8dcc98a-a829-43c6-a040-7078ea111c2b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212342Z:b8dcc98a-a829-43c6-a040-7078ea111c2b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:23:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799834" + ], + "x-ms-request-id": [ + "db12f8c3-635d-48ab-9201-85faa9fecda9" + ], + "x-ms-correlation-request-id": [ + "db12f8c3-635d-48ab-9201-85faa9fecda9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212346Z:db12f8c3-635d-48ab-9201-85faa9fecda9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:23:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799832" + ], + "x-ms-request-id": [ + "08770bc4-8531-4f67-a965-f730fd359855" + ], + "x-ms-correlation-request-id": [ + "08770bc4-8531-4f67-a965-f730fd359855" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212349Z:08770bc4-8531-4f67-a965-f730fd359855" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:23:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799830" + ], + "x-ms-request-id": [ + "d797df63-0ee9-47bb-97d9-df3909e4d622" + ], + "x-ms-correlation-request-id": [ + "d797df63-0ee9-47bb-97d9-df3909e4d622" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212352Z:d797df63-0ee9-47bb-97d9-df3909e4d622" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:23:52 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799828" + ], + "x-ms-request-id": [ + "8ad15e4e-9654-4952-90f9-91fd7eaedc85" + ], + "x-ms-correlation-request-id": [ + "8ad15e4e-9654-4952-90f9-91fd7eaedc85" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212355Z:8ad15e4e-9654-4952-90f9-91fd7eaedc85" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:23:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799826" + ], + "x-ms-request-id": [ + "36042d4a-2818-4198-8c01-6aa8dda1f8ac" + ], + "x-ms-correlation-request-id": [ + "36042d4a-2818-4198-8c01-6aa8dda1f8ac" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212358Z:36042d4a-2818-4198-8c01-6aa8dda1f8ac" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:23:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799824" + ], + "x-ms-request-id": [ + "2bfba1f9-572c-4624-9083-947aa4b26c88" + ], + "x-ms-correlation-request-id": [ + "2bfba1f9-572c-4624-9083-947aa4b26c88" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212401Z:2bfba1f9-572c-4624-9083-947aa4b26c88" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799822" + ], + "x-ms-request-id": [ + "3310d881-0cdf-4897-9c4c-9679e47dbf75" + ], + "x-ms-correlation-request-id": [ + "3310d881-0cdf-4897-9c4c-9679e47dbf75" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212405Z:3310d881-0cdf-4897-9c4c-9679e47dbf75" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799820" + ], + "x-ms-request-id": [ + "eaa9a5ee-9787-496c-a6cb-32eab136f891" + ], + "x-ms-correlation-request-id": [ + "eaa9a5ee-9787-496c-a6cb-32eab136f891" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212408Z:eaa9a5ee-9787-496c-a6cb-32eab136f891" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:08 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799818" + ], + "x-ms-request-id": [ + "5b0c83d3-fd3b-484d-8546-ce9e72752a2e" + ], + "x-ms-correlation-request-id": [ + "5b0c83d3-fd3b-484d-8546-ce9e72752a2e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212411Z:5b0c83d3-fd3b-484d-8546-ce9e72752a2e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:11 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799816" + ], + "x-ms-request-id": [ + "b96f38a5-0ac0-4a3c-a2d6-f51e73209240" + ], + "x-ms-correlation-request-id": [ + "b96f38a5-0ac0-4a3c-a2d6-f51e73209240" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212414Z:b96f38a5-0ac0-4a3c-a2d6-f51e73209240" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:14 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799814" + ], + "x-ms-request-id": [ + "f0a72285-3298-48d8-bc75-9739255941ae" + ], + "x-ms-correlation-request-id": [ + "f0a72285-3298-48d8-bc75-9739255941ae" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212417Z:f0a72285-3298-48d8-bc75-9739255941ae" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:16 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799812" + ], + "x-ms-request-id": [ + "053af39f-4ee7-4571-a9bd-c53995897570" + ], + "x-ms-correlation-request-id": [ + "053af39f-4ee7-4571-a9bd-c53995897570" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212420Z:053af39f-4ee7-4571-a9bd-c53995897570" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799810" + ], + "x-ms-request-id": [ + "7ad08cc6-3543-497f-9865-1ea68f4d5d1a" + ], + "x-ms-correlation-request-id": [ + "7ad08cc6-3543-497f-9865-1ea68f4d5d1a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212423Z:7ad08cc6-3543-497f-9865-1ea68f4d5d1a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:23 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799808" + ], + "x-ms-request-id": [ + "ca4c2ece-eaa1-434f-82e4-b5546b8e902a" + ], + "x-ms-correlation-request-id": [ + "ca4c2ece-eaa1-434f-82e4-b5546b8e902a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212427Z:ca4c2ece-eaa1-434f-82e4-b5546b8e902a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799806" + ], + "x-ms-request-id": [ + "18002357-f6af-477b-b4ce-88ff2d963c72" + ], + "x-ms-correlation-request-id": [ + "18002357-f6af-477b-b4ce-88ff2d963c72" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212430Z:18002357-f6af-477b-b4ce-88ff2d963c72" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:30 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup/operations/94ECE4F7F3439B2A\",\r\n \"operationId\": \"94ECE4F7F3439B2A\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:24:31.6124597Z\",\r\n \"trackingId\": \"4789e08f-ea7a-45fe-a713-b7354cfc7733\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799804" + ], + "x-ms-request-id": [ + "0423c258-bdbb-47d2-b9ec-074e25108ad1" + ], + "x-ms-correlation-request-id": [ + "0423c258-bdbb-47d2-b9ec-074e25108ad1" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212433Z:0423c258-bdbb-47d2-b9ec-074e25108ad1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:32 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup/operations/94ECE4F7F3439B2A\",\r\n \"operationId\": \"94ECE4F7F3439B2A\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:24:31.6124597Z\",\r\n \"trackingId\": \"4789e08f-ea7a-45fe-a713-b7354cfc7733\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799802" + ], + "x-ms-request-id": [ + "c2ca58e9-0fdc-4dd3-9137-5c6380435766" + ], + "x-ms-correlation-request-id": [ + "c2ca58e9-0fdc-4dd3-9137-5c6380435766" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212436Z:c2ca58e9-0fdc-4dd3-9137-5c6380435766" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:36 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup/operations/94ECE4F7F3439B2A\",\r\n \"operationId\": \"94ECE4F7F3439B2A\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:24:31.6124597Z\",\r\n \"trackingId\": \"4789e08f-ea7a-45fe-a713-b7354cfc7733\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799800" + ], + "x-ms-request-id": [ + "f39d104a-9c1e-4250-a587-4753b2ec2d30" + ], + "x-ms-correlation-request-id": [ + "f39d104a-9c1e-4250-a587-4753b2ec2d30" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212439Z:f39d104a-9c1e-4250-a587-4753b2ec2d30" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup/operations/F5605F68CD6057BD\",\r\n \"operationId\": \"F5605F68CD6057BD\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:24:40.2540515Z\",\r\n \"trackingId\": \"625d8ff4-f22c-4ea7-aa3e-a3cfc7145e36\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databases/sql-audit-cmdlet-db131\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131/sql-audit-cmdlet-db131\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup/operations/94ECE4F7F3439B2A\",\r\n \"operationId\": \"94ECE4F7F3439B2A\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:24:31.6124597Z\",\r\n \"trackingId\": \"4789e08f-ea7a-45fe-a713-b7354cfc7733\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799798" + ], + "x-ms-request-id": [ + "d71bda8c-a3c7-42ba-91b6-2751a72efcaa" + ], + "x-ms-correlation-request-id": [ + "d71bda8c-a3c7-42ba-91b6-2751a72efcaa" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212443Z:d71bda8c-a3c7-42ba-91b6-2751a72efcaa" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup/operations/F5605F68CD6057BD\",\r\n \"operationId\": \"F5605F68CD6057BD\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:24:40.2540515Z\",\r\n \"trackingId\": \"625d8ff4-f22c-4ea7-aa3e-a3cfc7145e36\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databases/sql-audit-cmdlet-db131\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131/sql-audit-cmdlet-db131\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup/operations/94ECE4F7F3439B2A\",\r\n \"operationId\": \"94ECE4F7F3439B2A\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:24:31.6124597Z\",\r\n \"trackingId\": \"4789e08f-ea7a-45fe-a713-b7354cfc7733\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799796" + ], + "x-ms-request-id": [ + "5e0d5b03-3e47-4a1a-90e4-ac445fffcf33" + ], + "x-ms-correlation-request-id": [ + "5e0d5b03-3e47-4a1a-90e4-ac445fffcf33" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212446Z:5e0d5b03-3e47-4a1a-90e4-ac445fffcf33" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db131\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server131\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:23:35.696892Z\",\r\n \"correlationId\": \"6d507e7e-8a7d-4f9a-8c5a-63a0c5159c44\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databases/sql-audit-cmdlet-db131\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131/sql-audit-cmdlet-db131\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799839" + ], + "x-ms-request-id": [ + "5c9de3a2-3cff-4262-9e7e-08797c0fd149" + ], + "x-ms-correlation-request-id": [ + "5c9de3a2-3cff-4262-9e7e-08797c0fd149" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212337Z:5c9de3a2-3cff-4262-9e7e-08797c0fd149" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:23:36 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db131\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server131\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:23:38.2313135Z\",\r\n \"correlationId\": \"6d507e7e-8a7d-4f9a-8c5a-63a0c5159c44\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databases/sql-audit-cmdlet-db131\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131/sql-audit-cmdlet-db131\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799837" + ], + "x-ms-request-id": [ + "d8a76f70-2062-421f-869b-3f24eae41bdd" + ], + "x-ms-correlation-request-id": [ + "d8a76f70-2062-421f-869b-3f24eae41bdd" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212340Z:d8a76f70-2062-421f-869b-3f24eae41bdd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:23:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db131\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server131\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:23:38.2313135Z\",\r\n \"correlationId\": \"6d507e7e-8a7d-4f9a-8c5a-63a0c5159c44\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databases/sql-audit-cmdlet-db131\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131/sql-audit-cmdlet-db131\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799835" + ], + "x-ms-request-id": [ + "f7c40456-2f59-42f8-b8a5-479ecc0064f9" + ], + "x-ms-correlation-request-id": [ + "f7c40456-2f59-42f8-b8a5-479ecc0064f9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212343Z:f7c40456-2f59-42f8-b8a5-479ecc0064f9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:23:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db131\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server131\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:23:38.2313135Z\",\r\n \"correlationId\": \"6d507e7e-8a7d-4f9a-8c5a-63a0c5159c44\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databases/sql-audit-cmdlet-db131\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131/sql-audit-cmdlet-db131\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799833" + ], + "x-ms-request-id": [ + "2db0f070-27b0-48ae-9413-e9d0c4b932ad" + ], + "x-ms-correlation-request-id": [ + "2db0f070-27b0-48ae-9413-e9d0c4b932ad" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212346Z:2db0f070-27b0-48ae-9413-e9d0c4b932ad" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:23:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db131\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server131\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:23:38.2313135Z\",\r\n \"correlationId\": \"6d507e7e-8a7d-4f9a-8c5a-63a0c5159c44\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databases/sql-audit-cmdlet-db131\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131/sql-audit-cmdlet-db131\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799831" + ], + "x-ms-request-id": [ + "e532f576-cc6d-4d7a-8c45-fc521c256dc5" + ], + "x-ms-correlation-request-id": [ + "e532f576-cc6d-4d7a-8c45-fc521c256dc5" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212349Z:e532f576-cc6d-4d7a-8c45-fc521c256dc5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:23:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db131\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server131\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:23:38.2313135Z\",\r\n \"correlationId\": \"6d507e7e-8a7d-4f9a-8c5a-63a0c5159c44\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databases/sql-audit-cmdlet-db131\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131/sql-audit-cmdlet-db131\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799829" + ], + "x-ms-request-id": [ + "f7d015cb-c7bd-4ee5-a2c8-1cdb9b4719f5" + ], + "x-ms-correlation-request-id": [ + "f7d015cb-c7bd-4ee5-a2c8-1cdb9b4719f5" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212352Z:f7d015cb-c7bd-4ee5-a2c8-1cdb9b4719f5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:23:52 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db131\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server131\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:23:38.2313135Z\",\r\n \"correlationId\": \"6d507e7e-8a7d-4f9a-8c5a-63a0c5159c44\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databases/sql-audit-cmdlet-db131\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131/sql-audit-cmdlet-db131\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799827" + ], + "x-ms-request-id": [ + "9a47e3b9-ae87-43e4-9d7f-1d743a66b8e2" + ], + "x-ms-correlation-request-id": [ + "9a47e3b9-ae87-43e4-9d7f-1d743a66b8e2" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212355Z:9a47e3b9-ae87-43e4-9d7f-1d743a66b8e2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:23:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db131\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server131\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:23:38.2313135Z\",\r\n \"correlationId\": \"6d507e7e-8a7d-4f9a-8c5a-63a0c5159c44\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databases/sql-audit-cmdlet-db131\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131/sql-audit-cmdlet-db131\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799825" + ], + "x-ms-request-id": [ + "6747316d-cdc7-4788-856d-b15e738cb396" + ], + "x-ms-correlation-request-id": [ + "6747316d-cdc7-4788-856d-b15e738cb396" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212358Z:6747316d-cdc7-4788-856d-b15e738cb396" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:23:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db131\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server131\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:23:38.2313135Z\",\r\n \"correlationId\": \"6d507e7e-8a7d-4f9a-8c5a-63a0c5159c44\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databases/sql-audit-cmdlet-db131\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131/sql-audit-cmdlet-db131\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799823" + ], + "x-ms-request-id": [ + "57c2e153-4eec-423f-9154-9b3773b435de" + ], + "x-ms-correlation-request-id": [ + "57c2e153-4eec-423f-9154-9b3773b435de" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212402Z:57c2e153-4eec-423f-9154-9b3773b435de" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db131\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server131\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:23:38.2313135Z\",\r\n \"correlationId\": \"6d507e7e-8a7d-4f9a-8c5a-63a0c5159c44\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databases/sql-audit-cmdlet-db131\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131/sql-audit-cmdlet-db131\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799821" + ], + "x-ms-request-id": [ + "64111260-cddd-46a1-8d57-4fb4c58a0d8c" + ], + "x-ms-correlation-request-id": [ + "64111260-cddd-46a1-8d57-4fb4c58a0d8c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212405Z:64111260-cddd-46a1-8d57-4fb4c58a0d8c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db131\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server131\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:23:38.2313135Z\",\r\n \"correlationId\": \"6d507e7e-8a7d-4f9a-8c5a-63a0c5159c44\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databases/sql-audit-cmdlet-db131\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131/sql-audit-cmdlet-db131\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799819" + ], + "x-ms-request-id": [ + "17d44180-d543-4a8e-aa26-1f2f6e440849" + ], + "x-ms-correlation-request-id": [ + "17d44180-d543-4a8e-aa26-1f2f6e440849" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212408Z:17d44180-d543-4a8e-aa26-1f2f6e440849" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:08 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db131\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server131\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:23:38.2313135Z\",\r\n \"correlationId\": \"6d507e7e-8a7d-4f9a-8c5a-63a0c5159c44\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databases/sql-audit-cmdlet-db131\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131/sql-audit-cmdlet-db131\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799817" + ], + "x-ms-request-id": [ + "4968f88e-f0f7-4504-9319-de9d5f542313" + ], + "x-ms-correlation-request-id": [ + "4968f88e-f0f7-4504-9319-de9d5f542313" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212411Z:4968f88e-f0f7-4504-9319-de9d5f542313" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:11 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db131\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server131\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:23:38.2313135Z\",\r\n \"correlationId\": \"6d507e7e-8a7d-4f9a-8c5a-63a0c5159c44\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databases/sql-audit-cmdlet-db131\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131/sql-audit-cmdlet-db131\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799815" + ], + "x-ms-request-id": [ + "18da8d66-3c20-4e2a-a3ca-a365aa385c1e" + ], + "x-ms-correlation-request-id": [ + "18da8d66-3c20-4e2a-a3ca-a365aa385c1e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212414Z:18da8d66-3c20-4e2a-a3ca-a365aa385c1e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:14 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db131\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server131\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:23:38.2313135Z\",\r\n \"correlationId\": \"6d507e7e-8a7d-4f9a-8c5a-63a0c5159c44\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databases/sql-audit-cmdlet-db131\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131/sql-audit-cmdlet-db131\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799813" + ], + "x-ms-request-id": [ + "f2589636-c39a-48cb-a727-46b42b697527" + ], + "x-ms-correlation-request-id": [ + "f2589636-c39a-48cb-a727-46b42b697527" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212417Z:f2589636-c39a-48cb-a727-46b42b697527" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:17 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db131\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server131\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:23:38.2313135Z\",\r\n \"correlationId\": \"6d507e7e-8a7d-4f9a-8c5a-63a0c5159c44\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databases/sql-audit-cmdlet-db131\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131/sql-audit-cmdlet-db131\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799811" + ], + "x-ms-request-id": [ + "bc8f9e36-d38a-465f-ac9d-e220604af141" + ], + "x-ms-correlation-request-id": [ + "bc8f9e36-d38a-465f-ac9d-e220604af141" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212420Z:bc8f9e36-d38a-465f-ac9d-e220604af141" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db131\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server131\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:23:38.2313135Z\",\r\n \"correlationId\": \"6d507e7e-8a7d-4f9a-8c5a-63a0c5159c44\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databases/sql-audit-cmdlet-db131\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131/sql-audit-cmdlet-db131\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799809" + ], + "x-ms-request-id": [ + "21740b4b-80dd-408a-a020-c3c8a31a8cb4" + ], + "x-ms-correlation-request-id": [ + "21740b4b-80dd-408a-a020-c3c8a31a8cb4" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212424Z:21740b4b-80dd-408a-a020-c3c8a31a8cb4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:23 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db131\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server131\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:23:38.2313135Z\",\r\n \"correlationId\": \"6d507e7e-8a7d-4f9a-8c5a-63a0c5159c44\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databases/sql-audit-cmdlet-db131\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131/sql-audit-cmdlet-db131\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799807" + ], + "x-ms-request-id": [ + "7595bb7a-417d-420f-b8c3-a85659aa81b9" + ], + "x-ms-correlation-request-id": [ + "7595bb7a-417d-420f-b8c3-a85659aa81b9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212427Z:7595bb7a-417d-420f-b8c3-a85659aa81b9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:27 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db131\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server131\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:23:38.2313135Z\",\r\n \"correlationId\": \"6d507e7e-8a7d-4f9a-8c5a-63a0c5159c44\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databases/sql-audit-cmdlet-db131\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131/sql-audit-cmdlet-db131\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799805" + ], + "x-ms-request-id": [ + "740a0667-9d13-4492-96ae-026a520c27a9" + ], + "x-ms-correlation-request-id": [ + "740a0667-9d13-4492-96ae-026a520c27a9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212430Z:740a0667-9d13-4492-96ae-026a520c27a9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:30 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db131\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server131\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:23:38.2313135Z\",\r\n \"correlationId\": \"6d507e7e-8a7d-4f9a-8c5a-63a0c5159c44\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databases/sql-audit-cmdlet-db131\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131/sql-audit-cmdlet-db131\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799803" + ], + "x-ms-request-id": [ + "63f3eb43-3445-4b97-99a3-f0d2420c6abe" + ], + "x-ms-correlation-request-id": [ + "63f3eb43-3445-4b97-99a3-f0d2420c6abe" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212433Z:63f3eb43-3445-4b97-99a3-f0d2420c6abe" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db131\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server131\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:23:38.2313135Z\",\r\n \"correlationId\": \"6d507e7e-8a7d-4f9a-8c5a-63a0c5159c44\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databases/sql-audit-cmdlet-db131\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131/sql-audit-cmdlet-db131\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799801" + ], + "x-ms-request-id": [ + "9092f5d6-1f02-47db-80da-3a2e2016b48c" + ], + "x-ms-correlation-request-id": [ + "9092f5d6-1f02-47db-80da-3a2e2016b48c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212437Z:9092f5d6-1f02-47db-80da-3a2e2016b48c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:36 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db131\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server131\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:23:38.2313135Z\",\r\n \"correlationId\": \"6d507e7e-8a7d-4f9a-8c5a-63a0c5159c44\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databases/sql-audit-cmdlet-db131\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131/sql-audit-cmdlet-db131\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799799" + ], + "x-ms-request-id": [ + "6b50587e-925b-490e-9e86-61078fbb2845" + ], + "x-ms-correlation-request-id": [ + "6b50587e-925b-490e-9e86-61078fbb2845" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212440Z:6b50587e-925b-490e-9e86-61078fbb2845" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:40 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db131\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server131\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:23:38.2313135Z\",\r\n \"correlationId\": \"6d507e7e-8a7d-4f9a-8c5a-63a0c5159c44\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databases/sql-audit-cmdlet-db131\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131/sql-audit-cmdlet-db131\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799797" + ], + "x-ms-request-id": [ + "6bef014e-0c6b-4d2d-ac9e-92f3d2f60dec" + ], + "x-ms-correlation-request-id": [ + "6bef014e-0c6b-4d2d-ac9e-92f3d2f60dec" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212443Z:6bef014e-0c6b-4d2d-ac9e-92f3d2f60dec" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db131\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server131\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:24:44.1472274Z\",\r\n \"correlationId\": \"6d507e7e-8a7d-4f9a-8c5a-63a0c5159c44\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databases/sql-audit-cmdlet-db131\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server131/sql-audit-cmdlet-db131\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1626" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799795" + ], + "x-ms-request-id": [ + "16176ccd-847d-4616-92c1-b1a0a503ef58" + ], + "x-ms-correlation-request-id": [ + "16176ccd-847d-4616-92c1-b1a0a503ef58" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212446Z:16176ccd-847d-4616-92c1-b1a0a503ef58" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131\",\r\n \"name\": \"sql-audit-cmdlet-server131\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databases/sql-audit-cmdlet-db131\",\r\n \"name\": \"sql-audit-cmdlet-server131/sql-audit-cmdlet-db131\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "577" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799794" + ], + "x-ms-request-id": [ + "5cc556df-0dad-437c-ab43-46fab9bf2fb2" + ], + "x-ms-correlation-request-id": [ + "5cc556df-0dad-437c-ab43-46fab9bf2fb2" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212448Z:5cc556df-0dad-437c-ab43-46fab9bf2fb2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westeurope:0aa4013c-768e-4d6e-8f4a-f561308d23b1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799793" + ], + "x-ms-correlation-request-id": [ + "cc58afda-c5b9-4c34-952a-2374d231bd74" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212450Z:cc58afda-c5b9-4c34-952a-2374d231bd74" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMTMxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "27dbce44-6760-43ed-af7f-0e9444e27b50-2014-10-31 21:24:51Z" + ], + "x-ms-client-request-id": [ + "a0c23b27-a9c7-46b0-8d33-ce41445ca543-2014-10-31 21:24:51Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets131\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets131.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server131.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server131;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server131.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server131;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server131.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server131.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server131\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server131.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server131.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server131;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server131.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2928" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "8843f64f-b371-4436-828a-db006c7f42ca" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799990" + ], + "x-ms-correlation-request-id": [ + "f28bbec0-1c43-4525-b323-19438cc72a33" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212452Z:f28bbec0-1c43-4525-b323-19438cc72a33" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:52 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMTMxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "27dbce44-6760-43ed-af7f-0e9444e27b50-2014-10-31 21:24:51Z" + ], + "x-ms-client-request-id": [ + "9568bc08-6bf7-4f32-8f5d-91b176d516ca-2014-10-31 21:24:58Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets131\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets131.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server131.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server131;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server131.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server131;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server131.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server131.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server131\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server131.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server131.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server131;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server131.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2928" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "0996d1cf-445d-4465-8294-a18821a81793" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799989" + ], + "x-ms-correlation-request-id": [ + "937f2f42-cacd-44b1-b456-f7c43f6c8058" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212458Z:937f2f42-cacd-44b1-b456-f7c43f6c8058" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:58 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMTMxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "27dbce44-6760-43ed-af7f-0e9444e27b50-2014-10-31 21:24:51Z" + ], + "x-ms-client-request-id": [ + "bdef1882-6089-4013-b56c-49ad31518b1e-2014-10-31 21:25:02Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": false,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets131\",\r\n \"storageAccountKey\": null,\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets131.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server131.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server131;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server131.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server131;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server131.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server131.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server131\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server131.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server131.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server131;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server131.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2923" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "9d02f811-93fa-4156-8592-9303093a10fb" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799988" + ], + "x-ms-correlation-request-id": [ + "49c6f4c9-6eea-4a06-99c2-0d478c7f4337" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212503Z:49c6f4c9-6eea-4a06-99c2-0d478c7f4337" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:25:03 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMTMxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "27dbce44-6760-43ed-af7f-0e9444e27b50-2014-10-31 21:24:51Z" + ], + "x-ms-client-request-id": [ + "d8bdcec7-4518-4b29-8f6d-a81f8b82835c-2014-10-31 21:25:07Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets131\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets131.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server131.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server131;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server131.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server131;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server131.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server131.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server131\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server131.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server131.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server131;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server131.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2928" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "61bcf0bc-025f-43f6-8ab1-012248d8f9e0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799987" + ], + "x-ms-correlation-request-id": [ + "93b51e3a-fe14-4dc1-9144-bd7a04f92b04" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212508Z:93b51e3a-fe14-4dc1-9144-bd7a04f92b04" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:25:08 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets131/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzMTMxL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "27dbce44-6760-43ed-af7f-0e9444e27b50-2014-10-31 21:24:51Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"MDdzKTPCL4Biz2GJu+AV4h8t6ezQeExj2GoQAR8emP9ZlQ0Wz9kj8l4upX+wD/wXpfms7bVKhB9X7K1UeL3hBQ==\",\r\n \"secondaryKey\": \"Lsa9knP8ITwrQbyZiNdLxqJ5WDshjaxb56KHaphuv630vzbbuZXwZIu/CZ0QCvtitFSsYTEoeVb+yQXNN7x8XQ==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:474b3542-3f0d-4ab4-9e40-6d84d692b881" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11991" + ], + "x-ms-correlation-request-id": [ + "f2fd9ddb-dbe3-4996-96bd-cd103f09bcf7" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212453Z:f2fd9ddb-dbe3-4996-96bd-cd103f09bcf7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets131/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzMTMxL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "27dbce44-6760-43ed-af7f-0e9444e27b50-2014-10-31 21:24:51Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"MDdzKTPCL4Biz2GJu+AV4h8t6ezQeExj2GoQAR8emP9ZlQ0Wz9kj8l4upX+wD/wXpfms7bVKhB9X7K1UeL3hBQ==\",\r\n \"secondaryKey\": \"Lsa9knP8ITwrQbyZiNdLxqJ5WDshjaxb56KHaphuv630vzbbuZXwZIu/CZ0QCvtitFSsYTEoeVb+yQXNN7x8XQ==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:2c2073e6-7a49-4d93-a8cf-f13450661ea0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11988" + ], + "x-ms-correlation-request-id": [ + "674d29ef-d74f-43da-ba58-3a4b916c0bce" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212504Z:674d29ef-d74f-43da-ba58-3a4b916c0bce" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:25:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMTMxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets131\",\r\n \"storageAccountKey\": \"MDdzKTPCL4Biz2GJu+AV4h8t6ezQeExj2GoQAR8emP9ZlQ0Wz9kj8l4upX+wD/wXpfms7bVKhB9X7K1UeL3hBQ==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets131.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "788" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "27dbce44-6760-43ed-af7f-0e9444e27b50-2014-10-31 21:24:51Z" + ], + "x-ms-client-request-id": [ + "a0c23b27-a9c7-46b0-8d33-ce41445ca543-2014-10-31 21:24:51Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets131\",\r\n \"storageAccountKey\": \"MDdzKTPCL4Biz2GJu+AV4h8t6ezQeExj2GoQAR8emP9ZlQ0Wz9kj8l4upX+wD/wXpfms7bVKhB9X7K1UeL3hBQ==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets131.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1187" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "bda5814b-eeeb-49ba-8a83-b6ed3f606ce5" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11990" + ], + "x-ms-correlation-request-id": [ + "dab78a45-0a19-4a2f-9dc3-499ada94b115" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212456Z:dab78a45-0a19-4a2f-9dc3-499ada94b115" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:24:56 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMTMxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": false,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets131\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets131.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "671" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "27dbce44-6760-43ed-af7f-0e9444e27b50-2014-10-31 21:24:51Z" + ], + "x-ms-client-request-id": [ + "9568bc08-6bf7-4f32-8f5d-91b176d516ca-2014-10-31 21:24:58Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": false,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets131\",\r\n \"storageAccountKey\": null,\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets131.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1102" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "06b1b111-31a0-4e1c-bad9-5d33ac713523" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11989" + ], + "x-ms-correlation-request-id": [ + "408ae9a2-7bf8-4bf5-87fe-526fdb674a5b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212501Z:408ae9a2-7bf8-4bf5-87fe-526fdb674a5b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:25:00 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzEzMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMTMxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets131\",\r\n \"storageAccountKey\": \"MDdzKTPCL4Biz2GJu+AV4h8t6ezQeExj2GoQAR8emP9ZlQ0Wz9kj8l4upX+wD/wXpfms7bVKhB9X7K1UeL3hBQ==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets131.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "788" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "27dbce44-6760-43ed-af7f-0e9444e27b50-2014-10-31 21:24:51Z" + ], + "x-ms-client-request-id": [ + "bdef1882-6089-4013-b56c-49ad31518b1e-2014-10-31 21:25:02Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets131\",\r\n \"storageAccountKey\": \"MDdzKTPCL4Biz2GJu+AV4h8t6ezQeExj2GoQAR8emP9ZlQ0Wz9kj8l4upX+wD/wXpfms7bVKhB9X7K1UeL3hBQ==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets131.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg131/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server131/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1187" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "fcb298a1-998a-4133-a600-d8ef12f40fb8" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11987" + ], + "x-ms-correlation-request-id": [ + "e845b7d5-ed7d-49e8-8775-d83e4e74c26a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T212506Z:e845b7d5-ed7d-49e8-8775-d83e4e74c26a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:25:06 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices/auditcmdlets131", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXMvYXVkaXRjbWRsZXRzMTMx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "4496797470232295a4d0bd1100500262" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:25:11 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/4496797470232295a4d0bd1100500262", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zLzQ0OTY3OTc0NzAyMzIyOTVhNGQwYmQxMTAwNTAwMjYy", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/2.0.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "\r\n 44967974-7023-2295-a4d0-bd1100500262\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "7fe18d5bec2520c2a483d470708e319a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:25:13 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "cca24ec8-99b5-4aa7-9ff6-486e886f304c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestServerStorageKeyRotation.json b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestServerStorageKeyRotation.json new file mode 100644 index 000000000000..3d0ce2cdbd8b --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestServerStorageKeyRotation.json @@ -0,0 +1,3595 @@ +{ + "Entries": [ + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXM=", + "RequestMethod": "POST", + "RequestBody": "\r\n auditcmdlets680\r\n \r\n \r\n West US\r\n \r\n Standard_GRS\r\n", + "RequestHeaders": { + "Content-Type": [ + "application/xml" + ], + "Content-Length": [ + "379" + ], + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "1201" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "b2d2042530142222b5189942352d256a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:50:13 GMT" + ], + "Location": [ + "https://management.core.windows.net/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/storage/auditcmdlets680" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/b2d2042530142222b5189942352d256a", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zL2IyZDIwNDI1MzAxNDIyMjJiNTE4OTk0MjM1MmQyNTZh", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "1201" + ] + }, + "ResponseBody": "\r\n b2d20425-3014-2222-b518-9942352d256a\r\n InProgress\r\n", + "ResponseHeaders": { + "Content-Length": [ + "197" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "672c9bd3327923feb5164ce360a4575f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:50:13 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/b2d2042530142222b5189942352d256a", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zL2IyZDIwNDI1MzAxNDIyMjJiNTE4OTk0MjM1MmQyNTZh", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "1201" + ] + }, + "ResponseBody": "\r\n b2d20425-3014-2222-b518-9942352d256a\r\n InProgress\r\n", + "ResponseHeaders": { + "Content-Length": [ + "197" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "40d29ec7feb42d5e897a7b2c37da293c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:50:44 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/b2d2042530142222b5189942352d256a", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zL2IyZDIwNDI1MzAxNDIyMjJiNTE4OTk0MjM1MmQyNTZh", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "1201" + ] + }, + "ResponseBody": "\r\n b2d20425-3014-2222-b518-9942352d256a\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "c5165a56b85b22968311a04494770e89" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:51:14 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "119" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799744" + ], + "x-ms-request-id": [ + "0cf54415-d789-402d-b7c6-235f530ae647" + ], + "x-ms-correlation-request-id": [ + "0cf54415-d789-402d-b7c6-235f530ae647" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215115Z:0cf54415-d789-402d-b7c6-235f530ae647" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:51:15 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MD9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680\",\r\n \"name\": \"sql-audit-cmdlet-test-rg680\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "217" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11971" + ], + "x-ms-request-id": [ + "8483b6ee-19f6-41d5-b3d0-3789c3908b3e" + ], + "x-ms-correlation-request-id": [ + "8483b6ee-19f6-41d5-b3d0-3789c3908b3e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215117Z:8483b6ee-19f6-41d5-b3d0-3789c3908b3e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:51:17 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/validate?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvdmFsaWRhdGU/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:51:18.4417618Z\",\r\n \"correlationId\": \"e6ddbf7a-b049-407b-8702-200ffefdfbc7\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11970" + ], + "x-ms-request-id": [ + "e6ddbf7a-b049-407b-8702-200ffefdfbc7" + ], + "x-ms-correlation-request-id": [ + "e6ddbf7a-b049-407b-8702-200ffefdfbc7" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215118Z:e6ddbf7a-b049-407b-8702-200ffefdfbc7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:51:17 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:51:20.296823Z\",\r\n \"correlationId\": \"ceb7ae42-f4c1-4bc0-aadd-512d2d65dfc5\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11969" + ], + "x-ms-request-id": [ + "ceb7ae42-f4c1-4bc0-aadd-512d2d65dfc5" + ], + "x-ms-correlation-request-id": [ + "ceb7ae42-f4c1-4bc0-aadd-512d2d65dfc5" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215120Z:ceb7ae42-f4c1-4bc0-aadd-512d2d65dfc5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:51:19 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799743" + ], + "x-ms-request-id": [ + "10f28129-88d8-4e4b-abe0-6534564dc1f9" + ], + "x-ms-correlation-request-id": [ + "10f28129-88d8-4e4b-abe0-6534564dc1f9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215121Z:10f28129-88d8-4e4b-abe0-6534564dc1f9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:51:21 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799741" + ], + "x-ms-request-id": [ + "abc3c363-1c67-421f-9d28-6c719e1a3192" + ], + "x-ms-correlation-request-id": [ + "abc3c363-1c67-421f-9d28-6c719e1a3192" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215124Z:abc3c363-1c67-421f-9d28-6c719e1a3192" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:51:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799739" + ], + "x-ms-request-id": [ + "5b25c0d3-b050-4594-9ab2-f9f3896826b3" + ], + "x-ms-correlation-request-id": [ + "5b25c0d3-b050-4594-9ab2-f9f3896826b3" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215128Z:5b25c0d3-b050-4594-9ab2-f9f3896826b3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:51:27 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799737" + ], + "x-ms-request-id": [ + "00505553-b120-4aa9-90d5-9086b7978c0d" + ], + "x-ms-correlation-request-id": [ + "00505553-b120-4aa9-90d5-9086b7978c0d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215131Z:00505553-b120-4aa9-90d5-9086b7978c0d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:51:31 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799735" + ], + "x-ms-request-id": [ + "e6390650-e02c-4e2f-892e-6dc5249c6829" + ], + "x-ms-correlation-request-id": [ + "e6390650-e02c-4e2f-892e-6dc5249c6829" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215134Z:e6390650-e02c-4e2f-892e-6dc5249c6829" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:51:34 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799733" + ], + "x-ms-request-id": [ + "2800be7c-263e-4240-9e6c-0e94ca3aee2d" + ], + "x-ms-correlation-request-id": [ + "2800be7c-263e-4240-9e6c-0e94ca3aee2d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215137Z:2800be7c-263e-4240-9e6c-0e94ca3aee2d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:51:37 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799731" + ], + "x-ms-request-id": [ + "226ec188-84fc-4eee-9447-3e3a9d0e03ac" + ], + "x-ms-correlation-request-id": [ + "226ec188-84fc-4eee-9447-3e3a9d0e03ac" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215140Z:226ec188-84fc-4eee-9447-3e3a9d0e03ac" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:51:40 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799729" + ], + "x-ms-request-id": [ + "cd626e34-979f-44b1-8390-7e3470753447" + ], + "x-ms-correlation-request-id": [ + "cd626e34-979f-44b1-8390-7e3470753447" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215144Z:cd626e34-979f-44b1-8390-7e3470753447" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:51:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799727" + ], + "x-ms-request-id": [ + "869f4974-c2d3-4c54-80aa-0a373a39a69a" + ], + "x-ms-correlation-request-id": [ + "869f4974-c2d3-4c54-80aa-0a373a39a69a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215147Z:869f4974-c2d3-4c54-80aa-0a373a39a69a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:51:47 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799725" + ], + "x-ms-request-id": [ + "271065e7-63fb-473a-b131-d77369e72055" + ], + "x-ms-correlation-request-id": [ + "271065e7-63fb-473a-b131-d77369e72055" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215150Z:271065e7-63fb-473a-b131-d77369e72055" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:51:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799723" + ], + "x-ms-request-id": [ + "9891be10-308a-42b1-bd07-98815f01d0a1" + ], + "x-ms-correlation-request-id": [ + "9891be10-308a-42b1-bd07-98815f01d0a1" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215153Z:9891be10-308a-42b1-bd07-98815f01d0a1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:51:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799721" + ], + "x-ms-request-id": [ + "3929d735-385d-4030-9333-3a08affdbd63" + ], + "x-ms-correlation-request-id": [ + "3929d735-385d-4030-9333-3a08affdbd63" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215156Z:3929d735-385d-4030-9333-3a08affdbd63" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:51:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799719" + ], + "x-ms-request-id": [ + "12cfd728-ba58-467e-b68a-07519629f2fd" + ], + "x-ms-correlation-request-id": [ + "12cfd728-ba58-467e-b68a-07519629f2fd" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215159Z:12cfd728-ba58-467e-b68a-07519629f2fd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:51:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799717" + ], + "x-ms-request-id": [ + "2000d73e-c6e3-4de8-a56b-7a519bcf81df" + ], + "x-ms-correlation-request-id": [ + "2000d73e-c6e3-4de8-a56b-7a519bcf81df" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215202Z:2000d73e-c6e3-4de8-a56b-7a519bcf81df" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:02 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799715" + ], + "x-ms-request-id": [ + "82188b3f-f0fa-4274-bbfa-58aa3baf2fa5" + ], + "x-ms-correlation-request-id": [ + "82188b3f-f0fa-4274-bbfa-58aa3baf2fa5" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215205Z:82188b3f-f0fa-4274-bbfa-58aa3baf2fa5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:05 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799713" + ], + "x-ms-request-id": [ + "e0037767-f93c-462c-93e7-064dd16fc019" + ], + "x-ms-correlation-request-id": [ + "e0037767-f93c-462c-93e7-064dd16fc019" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215208Z:e0037767-f93c-462c-93e7-064dd16fc019" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:08 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799711" + ], + "x-ms-request-id": [ + "bdd2b65a-d0d0-4197-b9df-a9c907fbd7db" + ], + "x-ms-correlation-request-id": [ + "bdd2b65a-d0d0-4197-b9df-a9c907fbd7db" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215212Z:bdd2b65a-d0d0-4197-b9df-a9c907fbd7db" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:12 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799709" + ], + "x-ms-request-id": [ + "5bff1743-8c4f-4c5b-8dc5-61d4abee44f5" + ], + "x-ms-correlation-request-id": [ + "5bff1743-8c4f-4c5b-8dc5-61d4abee44f5" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215215Z:5bff1743-8c4f-4c5b-8dc5-61d4abee44f5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:15 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799707" + ], + "x-ms-request-id": [ + "8f4e2754-090e-4669-87a8-079c34a080a3" + ], + "x-ms-correlation-request-id": [ + "8f4e2754-090e-4669-87a8-079c34a080a3" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215218Z:8f4e2754-090e-4669-87a8-079c34a080a3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:18 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations/3DDCB0C4C59F9132\",\r\n \"operationId\": \"3DDCB0C4C59F9132\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:52:19.5439641Z\",\r\n \"trackingId\": \"3d7e6a91-2c41-42df-b9b7-d3d8929aebfa\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799705" + ], + "x-ms-request-id": [ + "2a811aab-86f1-42dc-8c87-63c5dd76d9b9" + ], + "x-ms-correlation-request-id": [ + "2a811aab-86f1-42dc-8c87-63c5dd76d9b9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215221Z:2a811aab-86f1-42dc-8c87-63c5dd76d9b9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:21 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations/3DDCB0C4C59F9132\",\r\n \"operationId\": \"3DDCB0C4C59F9132\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:52:19.5439641Z\",\r\n \"trackingId\": \"3d7e6a91-2c41-42df-b9b7-d3d8929aebfa\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799703" + ], + "x-ms-request-id": [ + "40e883c0-9064-47d5-a7a2-c1286ade8d40" + ], + "x-ms-correlation-request-id": [ + "40e883c0-9064-47d5-a7a2-c1286ade8d40" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215225Z:40e883c0-9064-47d5-a7a2-c1286ade8d40" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations/3DDCB0C4C59F9132\",\r\n \"operationId\": \"3DDCB0C4C59F9132\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:52:19.5439641Z\",\r\n \"trackingId\": \"3d7e6a91-2c41-42df-b9b7-d3d8929aebfa\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799701" + ], + "x-ms-request-id": [ + "a0da93d5-42e8-4c4d-8f7f-c024de7f8509" + ], + "x-ms-correlation-request-id": [ + "a0da93d5-42e8-4c4d-8f7f-c024de7f8509" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215228Z:a0da93d5-42e8-4c4d-8f7f-c024de7f8509" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:27 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations/1F97A67882C6532C\",\r\n \"operationId\": \"1F97A67882C6532C\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:52:28.4166529Z\",\r\n \"trackingId\": \"4fe8f6a9-f221-4450-8880-0a2b2a0857c4\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations/3DDCB0C4C59F9132\",\r\n \"operationId\": \"3DDCB0C4C59F9132\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:52:19.5439641Z\",\r\n \"trackingId\": \"3d7e6a91-2c41-42df-b9b7-d3d8929aebfa\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799699" + ], + "x-ms-request-id": [ + "840ae636-a331-4c82-baa5-682153bcfa61" + ], + "x-ms-correlation-request-id": [ + "840ae636-a331-4c82-baa5-682153bcfa61" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215231Z:840ae636-a331-4c82-baa5-682153bcfa61" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:31 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations/1F97A67882C6532C\",\r\n \"operationId\": \"1F97A67882C6532C\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:52:28.4166529Z\",\r\n \"trackingId\": \"4fe8f6a9-f221-4450-8880-0a2b2a0857c4\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup/operations/3DDCB0C4C59F9132\",\r\n \"operationId\": \"3DDCB0C4C59F9132\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:52:19.5439641Z\",\r\n \"trackingId\": \"3d7e6a91-2c41-42df-b9b7-d3d8929aebfa\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799697" + ], + "x-ms-request-id": [ + "11e0e67b-5d87-4c31-bd68-dbfb2ef15a58" + ], + "x-ms-correlation-request-id": [ + "11e0e67b-5d87-4c31-bd68-dbfb2ef15a58" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215234Z:11e0e67b-5d87-4c31-bd68-dbfb2ef15a58" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:51:20.296823Z\",\r\n \"correlationId\": \"ceb7ae42-f4c1-4bc0-aadd-512d2d65dfc5\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799742" + ], + "x-ms-request-id": [ + "91b8d896-4fdd-48e7-a189-aca8f0db9f9f" + ], + "x-ms-correlation-request-id": [ + "91b8d896-4fdd-48e7-a189-aca8f0db9f9f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215121Z:91b8d896-4fdd-48e7-a189-aca8f0db9f9f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:51:21 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:51:22.8336144Z\",\r\n \"correlationId\": \"ceb7ae42-f4c1-4bc0-aadd-512d2d65dfc5\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799740" + ], + "x-ms-request-id": [ + "66f25a56-c1ad-4ce0-9975-b918453f364c" + ], + "x-ms-correlation-request-id": [ + "66f25a56-c1ad-4ce0-9975-b918453f364c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215125Z:66f25a56-c1ad-4ce0-9975-b918453f364c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:51:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:51:22.8336144Z\",\r\n \"correlationId\": \"ceb7ae42-f4c1-4bc0-aadd-512d2d65dfc5\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799738" + ], + "x-ms-request-id": [ + "4ddbe9f6-8647-4626-b052-8a12dc9ac17c" + ], + "x-ms-correlation-request-id": [ + "4ddbe9f6-8647-4626-b052-8a12dc9ac17c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215128Z:4ddbe9f6-8647-4626-b052-8a12dc9ac17c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:51:27 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:51:22.8336144Z\",\r\n \"correlationId\": \"ceb7ae42-f4c1-4bc0-aadd-512d2d65dfc5\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799736" + ], + "x-ms-request-id": [ + "be883bbf-5bbb-48c6-a341-fe9932027da2" + ], + "x-ms-correlation-request-id": [ + "be883bbf-5bbb-48c6-a341-fe9932027da2" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215131Z:be883bbf-5bbb-48c6-a341-fe9932027da2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:51:31 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:51:22.8336144Z\",\r\n \"correlationId\": \"ceb7ae42-f4c1-4bc0-aadd-512d2d65dfc5\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799734" + ], + "x-ms-request-id": [ + "4ede6d35-2e80-42ef-acc6-82e8ba039dbb" + ], + "x-ms-correlation-request-id": [ + "4ede6d35-2e80-42ef-acc6-82e8ba039dbb" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215134Z:4ede6d35-2e80-42ef-acc6-82e8ba039dbb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:51:34 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:51:22.8336144Z\",\r\n \"correlationId\": \"ceb7ae42-f4c1-4bc0-aadd-512d2d65dfc5\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799732" + ], + "x-ms-request-id": [ + "4d28cd5d-f5f0-49bc-9541-635a078af8e5" + ], + "x-ms-correlation-request-id": [ + "4d28cd5d-f5f0-49bc-9541-635a078af8e5" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215137Z:4d28cd5d-f5f0-49bc-9541-635a078af8e5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:51:37 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:51:22.8336144Z\",\r\n \"correlationId\": \"ceb7ae42-f4c1-4bc0-aadd-512d2d65dfc5\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799730" + ], + "x-ms-request-id": [ + "c51cd2f4-549d-4cae-a306-eede8f0ce70f" + ], + "x-ms-correlation-request-id": [ + "c51cd2f4-549d-4cae-a306-eede8f0ce70f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215141Z:c51cd2f4-549d-4cae-a306-eede8f0ce70f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:51:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:51:22.8336144Z\",\r\n \"correlationId\": \"ceb7ae42-f4c1-4bc0-aadd-512d2d65dfc5\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799728" + ], + "x-ms-request-id": [ + "12972028-6c7e-45a7-a29f-a51b4c353249" + ], + "x-ms-correlation-request-id": [ + "12972028-6c7e-45a7-a29f-a51b4c353249" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215144Z:12972028-6c7e-45a7-a29f-a51b4c353249" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:51:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:51:22.8336144Z\",\r\n \"correlationId\": \"ceb7ae42-f4c1-4bc0-aadd-512d2d65dfc5\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799726" + ], + "x-ms-request-id": [ + "deba511c-a6a8-4b39-b6fd-d28baa28f8f4" + ], + "x-ms-correlation-request-id": [ + "deba511c-a6a8-4b39-b6fd-d28baa28f8f4" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215147Z:deba511c-a6a8-4b39-b6fd-d28baa28f8f4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:51:47 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:51:22.8336144Z\",\r\n \"correlationId\": \"ceb7ae42-f4c1-4bc0-aadd-512d2d65dfc5\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799724" + ], + "x-ms-request-id": [ + "eeef91ee-6331-4c2d-af65-62e9243992df" + ], + "x-ms-correlation-request-id": [ + "eeef91ee-6331-4c2d-af65-62e9243992df" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215150Z:eeef91ee-6331-4c2d-af65-62e9243992df" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:51:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:51:22.8336144Z\",\r\n \"correlationId\": \"ceb7ae42-f4c1-4bc0-aadd-512d2d65dfc5\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799722" + ], + "x-ms-request-id": [ + "37eb1031-c06d-441e-9a42-9b4f723a865f" + ], + "x-ms-correlation-request-id": [ + "37eb1031-c06d-441e-9a42-9b4f723a865f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215153Z:37eb1031-c06d-441e-9a42-9b4f723a865f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:51:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:51:22.8336144Z\",\r\n \"correlationId\": \"ceb7ae42-f4c1-4bc0-aadd-512d2d65dfc5\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799720" + ], + "x-ms-request-id": [ + "4397dcf4-8c5a-41e3-b25d-d483b8b14c8e" + ], + "x-ms-correlation-request-id": [ + "4397dcf4-8c5a-41e3-b25d-d483b8b14c8e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215156Z:4397dcf4-8c5a-41e3-b25d-d483b8b14c8e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:51:56 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:51:22.8336144Z\",\r\n \"correlationId\": \"ceb7ae42-f4c1-4bc0-aadd-512d2d65dfc5\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799718" + ], + "x-ms-request-id": [ + "25b8a7ae-6454-4b7e-af77-853927515590" + ], + "x-ms-correlation-request-id": [ + "25b8a7ae-6454-4b7e-af77-853927515590" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215200Z:25b8a7ae-6454-4b7e-af77-853927515590" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:51:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:51:22.8336144Z\",\r\n \"correlationId\": \"ceb7ae42-f4c1-4bc0-aadd-512d2d65dfc5\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799716" + ], + "x-ms-request-id": [ + "4f73f249-66d6-49fe-ba2c-68418cb52c07" + ], + "x-ms-correlation-request-id": [ + "4f73f249-66d6-49fe-ba2c-68418cb52c07" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215203Z:4f73f249-66d6-49fe-ba2c-68418cb52c07" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:02 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:51:22.8336144Z\",\r\n \"correlationId\": \"ceb7ae42-f4c1-4bc0-aadd-512d2d65dfc5\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799714" + ], + "x-ms-request-id": [ + "ff9698ec-633c-4058-92bd-c218303e4031" + ], + "x-ms-correlation-request-id": [ + "ff9698ec-633c-4058-92bd-c218303e4031" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215206Z:ff9698ec-633c-4058-92bd-c218303e4031" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:05 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:51:22.8336144Z\",\r\n \"correlationId\": \"ceb7ae42-f4c1-4bc0-aadd-512d2d65dfc5\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799712" + ], + "x-ms-request-id": [ + "50a64002-c3b9-48cd-8bfc-3118910a5f0b" + ], + "x-ms-correlation-request-id": [ + "50a64002-c3b9-48cd-8bfc-3118910a5f0b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215209Z:50a64002-c3b9-48cd-8bfc-3118910a5f0b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:08 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:51:22.8336144Z\",\r\n \"correlationId\": \"ceb7ae42-f4c1-4bc0-aadd-512d2d65dfc5\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799710" + ], + "x-ms-request-id": [ + "1e6c1f6a-40a3-40be-8d91-9687ef91a8ca" + ], + "x-ms-correlation-request-id": [ + "1e6c1f6a-40a3-40be-8d91-9687ef91a8ca" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215212Z:1e6c1f6a-40a3-40be-8d91-9687ef91a8ca" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:12 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:51:22.8336144Z\",\r\n \"correlationId\": \"ceb7ae42-f4c1-4bc0-aadd-512d2d65dfc5\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799708" + ], + "x-ms-request-id": [ + "f49dd296-f780-4bfe-8ed7-843828de1561" + ], + "x-ms-correlation-request-id": [ + "f49dd296-f780-4bfe-8ed7-843828de1561" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215216Z:f49dd296-f780-4bfe-8ed7-843828de1561" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:15 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:51:22.8336144Z\",\r\n \"correlationId\": \"ceb7ae42-f4c1-4bc0-aadd-512d2d65dfc5\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799706" + ], + "x-ms-request-id": [ + "dd25c43e-5d5d-4c44-bede-690a099e7d52" + ], + "x-ms-correlation-request-id": [ + "dd25c43e-5d5d-4c44-bede-690a099e7d52" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215219Z:dd25c43e-5d5d-4c44-bede-690a099e7d52" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:18 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:51:22.8336144Z\",\r\n \"correlationId\": \"ceb7ae42-f4c1-4bc0-aadd-512d2d65dfc5\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799704" + ], + "x-ms-request-id": [ + "7b4e1d87-aa65-47a3-b545-d281b89be1a1" + ], + "x-ms-correlation-request-id": [ + "7b4e1d87-aa65-47a3-b545-d281b89be1a1" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215222Z:7b4e1d87-aa65-47a3-b545-d281b89be1a1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:21 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:51:22.8336144Z\",\r\n \"correlationId\": \"ceb7ae42-f4c1-4bc0-aadd-512d2d65dfc5\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799702" + ], + "x-ms-request-id": [ + "b7cd5ee2-36be-45c3-890c-7c204d989aa7" + ], + "x-ms-correlation-request-id": [ + "b7cd5ee2-36be-45c3-890c-7c204d989aa7" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215225Z:b7cd5ee2-36be-45c3-890c-7c204d989aa7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:51:22.8336144Z\",\r\n \"correlationId\": \"ceb7ae42-f4c1-4bc0-aadd-512d2d65dfc5\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799700" + ], + "x-ms-request-id": [ + "b9f8a9ae-3069-42af-9d80-993075347c51" + ], + "x-ms-correlation-request-id": [ + "b9f8a9ae-3069-42af-9d80-993075347c51" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215228Z:b9f8a9ae-3069-42af-9d80-993075347c51" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:51:22.8336144Z\",\r\n \"correlationId\": \"ceb7ae42-f4c1-4bc0-aadd-512d2d65dfc5\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799698" + ], + "x-ms-request-id": [ + "a9b9c9e2-5f7e-4298-a7d4-4209892f5b36" + ], + "x-ms-correlation-request-id": [ + "a9b9c9e2-5f7e-4298-a7d4-4209892f5b36" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215231Z:a9b9c9e2-5f7e-4298-a7d4-4209892f5b36" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:31 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db680\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server680\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:52:33.0748856Z\",\r\n \"correlationId\": \"ceb7ae42-f4c1-4bc0-aadd-512d2d65dfc5\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1626" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799696" + ], + "x-ms-request-id": [ + "a435af58-368a-4326-91f1-d106fe78b121" + ], + "x-ms-correlation-request-id": [ + "a435af58-368a-4326-91f1-d106fe78b121" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215235Z:a435af58-368a-4326-91f1-d106fe78b121" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680\",\r\n \"name\": \"sql-audit-cmdlet-server680\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databases/sql-audit-cmdlet-db680\",\r\n \"name\": \"sql-audit-cmdlet-server680/sql-audit-cmdlet-db680\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "577" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799695" + ], + "x-ms-request-id": [ + "a566672a-097c-4e51-aa55-33982a554297" + ], + "x-ms-correlation-request-id": [ + "a566672a-097c-4e51-aa55-33982a554297" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215237Z:a566672a-097c-4e51-aa55-33982a554297" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:37 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westeurope:16910b4f-7606-4996-ba5d-363f82e5bd0b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799577" + ], + "x-ms-correlation-request-id": [ + "99a3f37b-6624-411c-b569-76627ece2586" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215238Z:99a3f37b-6624-411c-b569-76627ece2586" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:38 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjgwL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "3501dc35-42f7-4aaf-8022-71baf7f14406-2014-10-31 21:52:39Z" + ], + "x-ms-client-request-id": [ + "dfd545e3-2ee3-4286-a390-2cf8a39ac325-2014-10-31 21:52:39Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets680\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets680.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server680;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server680;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server680.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server680\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server680.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server680;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server680.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2924" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "973d39af-61ff-45d5-883c-5ba8a149fed8" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799694" + ], + "x-ms-correlation-request-id": [ + "73e99c70-67f0-4b58-a7b9-36d4ca6c33ec" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215240Z:73e99c70-67f0-4b58-a7b9-36d4ca6c33ec" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:40 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjgwL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "3501dc35-42f7-4aaf-8022-71baf7f14406-2014-10-31 21:52:39Z" + ], + "x-ms-client-request-id": [ + "90a4d6a8-e0e8-41a5-adad-0ff808310558-2014-10-31 21:52:45Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets680\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets680.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server680;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server680;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server680.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server680\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server680.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server680;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server680.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2924" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "674c32d0-fa9d-4b5d-bee1-493c836d6ab8" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799693" + ], + "x-ms-correlation-request-id": [ + "93ec2578-4c24-4dc9-a0e5-bc602d0846ac" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215246Z:93ec2578-4c24-4dc9-a0e5-bc602d0846ac" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:45 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjgwL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "3501dc35-42f7-4aaf-8022-71baf7f14406-2014-10-31 21:52:39Z" + ], + "x-ms-client-request-id": [ + "5c02330e-3aa1-4de3-b6d5-4ebab27d2d2b-2014-10-31 21:52:47Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets680\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets680.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server680;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server680;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server680.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server680\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server680.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server680;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server680.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2924" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "23ca3383-2d61-4dae-8937-7e21718412b1" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799692" + ], + "x-ms-correlation-request-id": [ + "021206d1-7348-436a-af53-c05bf78d5224" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215249Z:021206d1-7348-436a-af53-c05bf78d5224" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:48 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjgwL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "3501dc35-42f7-4aaf-8022-71baf7f14406-2014-10-31 21:52:39Z" + ], + "x-ms-client-request-id": [ + "5c0eafb5-e784-47cb-88be-d06595e11e75-2014-10-31 21:52:53Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets680\",\r\n \"storageAccountKey\": null,\r\n \"secondaryStorageAccountKey\": \"********\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets680.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server680;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server680;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server680.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server680\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server680.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server680;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server680.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2924" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "a277c0ce-9ff9-44e2-b3c6-3b850161bb3d" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799691" + ], + "x-ms-correlation-request-id": [ + "aead7036-6d21-4894-9906-e20e03e8ae54" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215253Z:aead7036-6d21-4894-9906-e20e03e8ae54" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:53 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjgwL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "3501dc35-42f7-4aaf-8022-71baf7f14406-2014-10-31 21:52:39Z" + ], + "x-ms-client-request-id": [ + "bf96feb3-8697-4f0e-9726-5a8974d6b84c-2014-10-31 21:52:55Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets680\",\r\n \"storageAccountKey\": null,\r\n \"secondaryStorageAccountKey\": \"********\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets680.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server680;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server680;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server680.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server680\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server680.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server680;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server680.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2924" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "8c95d9e8-8d1c-4b12-ac00-2162ef8a44c9" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799690" + ], + "x-ms-correlation-request-id": [ + "02585987-5029-4858-bdba-00075902e13d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215255Z:02585987-5029-4858-bdba-00075902e13d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:55 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjgwL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "3501dc35-42f7-4aaf-8022-71baf7f14406-2014-10-31 21:52:39Z" + ], + "x-ms-client-request-id": [ + "1ec54907-20ab-43e5-9ef9-0447a6087c10-2014-10-31 21:53:00Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets680\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets680.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server680;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server680;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server680.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server680\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server680.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server680.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server680;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server680.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2924" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "99495a5e-32f3-4f9e-8a0f-e72ef9a59887" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799689" + ], + "x-ms-correlation-request-id": [ + "64ad970e-6b49-4eab-a42c-29655c759dc4" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215301Z:64ad970e-6b49-4eab-a42c-29655c759dc4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:53:01 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets680/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzNjgwL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "3501dc35-42f7-4aaf-8022-71baf7f14406-2014-10-31 21:52:39Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"kTiKRlUklxKDS+uCP392+S1Z1cD6bXIzIfKeIvaH+4TUiBK2WNWT2noTe4yCfZ2y4yVDI7R8rc0tpU8rO0jbOQ==\",\r\n \"secondaryKey\": \"NFQHnjpPSeIK0GvplWWeVx8OQZDctTKXfGvHM8bcBsZkpV8STLsVLKg98Up4GBM6/l+/fa2tD1tsc4VQZnYqAg==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:e3327d67-2a00-42fa-974d-71412775543f" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11968" + ], + "x-ms-correlation-request-id": [ + "ad5aab61-f1e1-462f-bafb-c991704531f1" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215241Z:ad5aab61-f1e1-462f-bafb-c991704531f1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets680/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzNjgwL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "3501dc35-42f7-4aaf-8022-71baf7f14406-2014-10-31 21:52:39Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"kTiKRlUklxKDS+uCP392+S1Z1cD6bXIzIfKeIvaH+4TUiBK2WNWT2noTe4yCfZ2y4yVDI7R8rc0tpU8rO0jbOQ==\",\r\n \"secondaryKey\": \"NFQHnjpPSeIK0GvplWWeVx8OQZDctTKXfGvHM8bcBsZkpV8STLsVLKg98Up4GBM6/l+/fa2tD1tsc4VQZnYqAg==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:6103256b-ef1c-4791-aa24-b75448ad15c9" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11966" + ], + "x-ms-correlation-request-id": [ + "9132cbcf-0f06-4352-a849-1f5844bd9fee" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215249Z:9132cbcf-0f06-4352-a849-1f5844bd9fee" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets680/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzNjgwL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "3501dc35-42f7-4aaf-8022-71baf7f14406-2014-10-31 21:52:39Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"kTiKRlUklxKDS+uCP392+S1Z1cD6bXIzIfKeIvaH+4TUiBK2WNWT2noTe4yCfZ2y4yVDI7R8rc0tpU8rO0jbOQ==\",\r\n \"secondaryKey\": \"NFQHnjpPSeIK0GvplWWeVx8OQZDctTKXfGvHM8bcBsZkpV8STLsVLKg98Up4GBM6/l+/fa2tD1tsc4VQZnYqAg==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:6642733e-a9c1-4a24-9afb-db07310606de" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11964" + ], + "x-ms-correlation-request-id": [ + "3b64550b-ef3f-4065-be06-3f6d68861b88" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215256Z:3b64550b-ef3f-4065-be06-3f6d68861b88" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:56 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjgwL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets680\",\r\n \"storageAccountKey\": \"kTiKRlUklxKDS+uCP392+S1Z1cD6bXIzIfKeIvaH+4TUiBK2WNWT2noTe4yCfZ2y4yVDI7R8rc0tpU8rO0jbOQ==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets680.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "784" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "3501dc35-42f7-4aaf-8022-71baf7f14406-2014-10-31 21:52:39Z" + ], + "x-ms-client-request-id": [ + "dfd545e3-2ee3-4286-a390-2cf8a39ac325-2014-10-31 21:52:39Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets680\",\r\n \"storageAccountKey\": \"kTiKRlUklxKDS+uCP392+S1Z1cD6bXIzIfKeIvaH+4TUiBK2WNWT2noTe4yCfZ2y4yVDI7R8rc0tpU8rO0jbOQ==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets680.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1183" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "a3fda048-8266-4fb0-abc7-4f0832248f7e" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11967" + ], + "x-ms-correlation-request-id": [ + "9071734e-34e7-4f13-b200-028547a2193c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215244Z:9071734e-34e7-4f13-b200-028547a2193c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:43 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjgwL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets680\",\r\n \"secondaryStorageAccountKey\": \"NFQHnjpPSeIK0GvplWWeVx8OQZDctTKXfGvHM8bcBsZkpV8STLsVLKg98Up4GBM6/l+/fa2tD1tsc4VQZnYqAg==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets680.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "793" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "3501dc35-42f7-4aaf-8022-71baf7f14406-2014-10-31 21:52:39Z" + ], + "x-ms-client-request-id": [ + "5c02330e-3aa1-4de3-b6d5-4ebab27d2d2b-2014-10-31 21:52:47Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets680\",\r\n \"storageAccountKey\": null,\r\n \"secondaryStorageAccountKey\": \"NFQHnjpPSeIK0GvplWWeVx8OQZDctTKXfGvHM8bcBsZkpV8STLsVLKg98Up4GBM6/l+/fa2tD1tsc4VQZnYqAg==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets680.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1183" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "d11e8206-c2fc-4356-9e14-aafb44d72480" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11965" + ], + "x-ms-correlation-request-id": [ + "77e612ac-f7af-4d96-b40a-71b40541a602" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215252Z:77e612ac-f7af-4d96-b40a-71b40541a602" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:51 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzY4MC9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjgwL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets680\",\r\n \"storageAccountKey\": \"kTiKRlUklxKDS+uCP392+S1Z1cD6bXIzIfKeIvaH+4TUiBK2WNWT2noTe4yCfZ2y4yVDI7R8rc0tpU8rO0jbOQ==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets680.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "784" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "3501dc35-42f7-4aaf-8022-71baf7f14406-2014-10-31 21:52:39Z" + ], + "x-ms-client-request-id": [ + "bf96feb3-8697-4f0e-9726-5a8974d6b84c-2014-10-31 21:52:55Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets680\",\r\n \"storageAccountKey\": \"kTiKRlUklxKDS+uCP392+S1Z1cD6bXIzIfKeIvaH+4TUiBK2WNWT2noTe4yCfZ2y4yVDI7R8rc0tpU8rO0jbOQ==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets680.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg680/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server680/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1183" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "4e51057d-06dc-436c-81d2-ed10ea6a48aa" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11963" + ], + "x-ms-correlation-request-id": [ + "f7b22346-7cdd-4bcd-8b23-e2230544e191" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215259Z:f7b22346-7cdd-4bcd-8b23-e2230544e191" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:52:58 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices/auditcmdlets680", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXMvYXVkaXRjbWRsZXRzNjgw", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "026515ca23e12aa084cfa64d952de443" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:53:06 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/026515ca23e12aa084cfa64d952de443", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zLzAyNjUxNWNhMjNlMTJhYTA4NGNmYTY0ZDk1MmRlNDQz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/2.0.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "\r\n 026515ca-23e1-2aa0-84cf-a64d952de443\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "ad52c428043c231f94619657d405991b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:53:08 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "cca24ec8-99b5-4aa7-9ff6-486e886f304c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestServerUpdatePolicyKeepPreviousStorage.json b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestServerUpdatePolicyKeepPreviousStorage.json new file mode 100644 index 000000000000..f51d41a07f93 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestServerUpdatePolicyKeepPreviousStorage.json @@ -0,0 +1,3218 @@ +{ + "Entries": [ + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXM=", + "RequestMethod": "POST", + "RequestBody": "\r\n auditcmdlets401\r\n \r\n \r\n West US\r\n \r\n Standard_GRS\r\n", + "RequestHeaders": { + "Content-Type": [ + "application/xml" + ], + "Content-Length": [ + "379" + ], + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "861" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "df03d9eb58a72c1388d4967818c74bbb" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:35:03 GMT" + ], + "Location": [ + "https://management.core.windows.net/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/storage/auditcmdlets401" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/df03d9eb58a72c1388d4967818c74bbb", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zL2RmMDNkOWViNThhNzJjMTM4OGQ0OTY3ODE4Yzc0YmJi", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "861" + ] + }, + "ResponseBody": "\r\n df03d9eb-58a7-2c13-88d4-967818c74bbb\r\n InProgress\r\n", + "ResponseHeaders": { + "Content-Length": [ + "197" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "46c5ddc657472a789d651da2d0e2c7d4" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:35:03 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/df03d9eb58a72c1388d4967818c74bbb", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zL2RmMDNkOWViNThhNzJjMTM4OGQ0OTY3ODE4Yzc0YmJi", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "861" + ] + }, + "ResponseBody": "\r\n df03d9eb-58a7-2c13-88d4-967818c74bbb\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "568c4b7933ad2be49f68791521d7b315" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:35:33 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "119" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799678" + ], + "x-ms-request-id": [ + "bd9ea6d2-10b7-426e-9653-f2f54139fd5a" + ], + "x-ms-correlation-request-id": [ + "bd9ea6d2-10b7-426e-9653-f2f54139fd5a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213534Z:bd9ea6d2-10b7-426e-9653-f2f54139fd5a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:35:34 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401\",\r\n \"name\": \"sql-audit-cmdlet-test-rg401\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "217" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11964" + ], + "x-ms-request-id": [ + "5ddb1baf-d27d-4b17-836c-feee06989c0a" + ], + "x-ms-correlation-request-id": [ + "5ddb1baf-d27d-4b17-836c-feee06989c0a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213536Z:5ddb1baf-d27d-4b17-836c-feee06989c0a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:35:36 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup/validate?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvdmFsaWRhdGU/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db401\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server401\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db401\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server401\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:35:37.4528758Z\",\r\n \"correlationId\": \"ab55401a-f510-44d5-9d27-0a19c429a6f9\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databases/sql-audit-cmdlet-db401\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401/sql-audit-cmdlet-db401\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11963" + ], + "x-ms-request-id": [ + "ab55401a-f510-44d5-9d27-0a19c429a6f9" + ], + "x-ms-correlation-request-id": [ + "ab55401a-f510-44d5-9d27-0a19c429a6f9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213537Z:ab55401a-f510-44d5-9d27-0a19c429a6f9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:35:37 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db401\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server401\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db401\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server401\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:35:39.0606326Z\",\r\n \"correlationId\": \"d3537d50-240b-4c3a-be86-4daf55fc7e40\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databases/sql-audit-cmdlet-db401\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401/sql-audit-cmdlet-db401\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11962" + ], + "x-ms-request-id": [ + "d3537d50-240b-4c3a-be86-4daf55fc7e40" + ], + "x-ms-correlation-request-id": [ + "d3537d50-240b-4c3a-be86-4daf55fc7e40" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213539Z:d3537d50-240b-4c3a-be86-4daf55fc7e40" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:35:39 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799677" + ], + "x-ms-request-id": [ + "40a6aa8b-d6ac-4c87-b91c-cf41197e9d8b" + ], + "x-ms-correlation-request-id": [ + "40a6aa8b-d6ac-4c87-b91c-cf41197e9d8b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213540Z:40a6aa8b-d6ac-4c87-b91c-cf41197e9d8b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:35:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799675" + ], + "x-ms-request-id": [ + "6717e1d6-4f1f-440d-814c-bb4d43f0224c" + ], + "x-ms-correlation-request-id": [ + "6717e1d6-4f1f-440d-814c-bb4d43f0224c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213543Z:6717e1d6-4f1f-440d-814c-bb4d43f0224c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:35:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799673" + ], + "x-ms-request-id": [ + "aceebeda-4f8f-4b4c-9035-4fc9d028459a" + ], + "x-ms-correlation-request-id": [ + "aceebeda-4f8f-4b4c-9035-4fc9d028459a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213546Z:aceebeda-4f8f-4b4c-9035-4fc9d028459a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:35:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799671" + ], + "x-ms-request-id": [ + "ed33e87b-8995-47ae-a6d2-c4c3229256df" + ], + "x-ms-correlation-request-id": [ + "ed33e87b-8995-47ae-a6d2-c4c3229256df" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213549Z:ed33e87b-8995-47ae-a6d2-c4c3229256df" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:35:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799669" + ], + "x-ms-request-id": [ + "c4de830e-a1eb-4fa9-b22c-01ebafdb4d17" + ], + "x-ms-correlation-request-id": [ + "c4de830e-a1eb-4fa9-b22c-01ebafdb4d17" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213552Z:c4de830e-a1eb-4fa9-b22c-01ebafdb4d17" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:35:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799667" + ], + "x-ms-request-id": [ + "158b3656-cff5-4691-986f-030879fcd7a0" + ], + "x-ms-correlation-request-id": [ + "158b3656-cff5-4691-986f-030879fcd7a0" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213555Z:158b3656-cff5-4691-986f-030879fcd7a0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:35:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799665" + ], + "x-ms-request-id": [ + "c58ba190-c97b-4ed4-a178-355527aff1af" + ], + "x-ms-correlation-request-id": [ + "c58ba190-c97b-4ed4-a178-355527aff1af" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213558Z:c58ba190-c97b-4ed4-a178-355527aff1af" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:35:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799663" + ], + "x-ms-request-id": [ + "7d12ae56-f612-4856-b420-6e46501ec74b" + ], + "x-ms-correlation-request-id": [ + "7d12ae56-f612-4856-b420-6e46501ec74b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213601Z:7d12ae56-f612-4856-b420-6e46501ec74b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799661" + ], + "x-ms-request-id": [ + "00057c0d-be9e-44c4-ad72-78b13d806209" + ], + "x-ms-correlation-request-id": [ + "00057c0d-be9e-44c4-ad72-78b13d806209" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213604Z:00057c0d-be9e-44c4-ad72-78b13d806209" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799659" + ], + "x-ms-request-id": [ + "2b0a23bf-b144-4993-9ff7-97a9d125c58c" + ], + "x-ms-correlation-request-id": [ + "2b0a23bf-b144-4993-9ff7-97a9d125c58c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213608Z:2b0a23bf-b144-4993-9ff7-97a9d125c58c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:07 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799657" + ], + "x-ms-request-id": [ + "990e9e55-aaea-4f75-b39a-5c97e62202e4" + ], + "x-ms-correlation-request-id": [ + "990e9e55-aaea-4f75-b39a-5c97e62202e4" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213611Z:990e9e55-aaea-4f75-b39a-5c97e62202e4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799655" + ], + "x-ms-request-id": [ + "c9515c52-cfda-44a3-81b9-f4b7e20f4c07" + ], + "x-ms-correlation-request-id": [ + "c9515c52-cfda-44a3-81b9-f4b7e20f4c07" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213614Z:c9515c52-cfda-44a3-81b9-f4b7e20f4c07" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:14 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799653" + ], + "x-ms-request-id": [ + "184b9165-d2e6-43b0-ab77-40a874b3ba6b" + ], + "x-ms-correlation-request-id": [ + "184b9165-d2e6-43b0-ab77-40a874b3ba6b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213617Z:184b9165-d2e6-43b0-ab77-40a874b3ba6b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:17 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799651" + ], + "x-ms-request-id": [ + "7e8477c1-7e5f-4716-afde-dadbd834d2f1" + ], + "x-ms-correlation-request-id": [ + "7e8477c1-7e5f-4716-afde-dadbd834d2f1" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213620Z:7e8477c1-7e5f-4716-afde-dadbd834d2f1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:20 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799649" + ], + "x-ms-request-id": [ + "b4f746b8-b8c7-46a4-a266-99ca88aa30c0" + ], + "x-ms-correlation-request-id": [ + "b4f746b8-b8c7-46a4-a266-99ca88aa30c0" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213623Z:b4f746b8-b8c7-46a4-a266-99ca88aa30c0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:23 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799647" + ], + "x-ms-request-id": [ + "6e2c0ae7-ff51-4bce-b7a7-18291e1ffc3f" + ], + "x-ms-correlation-request-id": [ + "6e2c0ae7-ff51-4bce-b7a7-18291e1ffc3f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213626Z:6e2c0ae7-ff51-4bce-b7a7-18291e1ffc3f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799645" + ], + "x-ms-request-id": [ + "16ee0e3a-b2bd-4fc5-94bc-e58ca7cfcbf7" + ], + "x-ms-correlation-request-id": [ + "16ee0e3a-b2bd-4fc5-94bc-e58ca7cfcbf7" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213629Z:16ee0e3a-b2bd-4fc5-94bc-e58ca7cfcbf7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:29 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799643" + ], + "x-ms-request-id": [ + "11b97075-ae3a-4b1d-b164-787fff1dba9c" + ], + "x-ms-correlation-request-id": [ + "11b97075-ae3a-4b1d-b164-787fff1dba9c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213633Z:11b97075-ae3a-4b1d-b164-787fff1dba9c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup/operations/0BFAA98F209E2AC0\",\r\n \"operationId\": \"0BFAA98F209E2AC0\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:36:34.4152672Z\",\r\n \"trackingId\": \"1a39fd8d-230b-4523-8f84-5054fd25cb0c\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799641" + ], + "x-ms-request-id": [ + "1b3939bc-6a50-429c-a472-87df194e1d52" + ], + "x-ms-correlation-request-id": [ + "1b3939bc-6a50-429c-a472-87df194e1d52" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213636Z:1b3939bc-6a50-429c-a472-87df194e1d52" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:36 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup/operations/0BFAA98F209E2AC0\",\r\n \"operationId\": \"0BFAA98F209E2AC0\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:36:34.4152672Z\",\r\n \"trackingId\": \"1a39fd8d-230b-4523-8f84-5054fd25cb0c\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799639" + ], + "x-ms-request-id": [ + "b9bd152a-2498-4f88-b673-c3439a2c6a03" + ], + "x-ms-correlation-request-id": [ + "b9bd152a-2498-4f88-b673-c3439a2c6a03" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213639Z:b9bd152a-2498-4f88-b673-c3439a2c6a03" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:38 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup/operations/0BFAA98F209E2AC0\",\r\n \"operationId\": \"0BFAA98F209E2AC0\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:36:34.4152672Z\",\r\n \"trackingId\": \"1a39fd8d-230b-4523-8f84-5054fd25cb0c\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799637" + ], + "x-ms-request-id": [ + "994c6feb-1e46-477e-9810-dcab84bb942b" + ], + "x-ms-correlation-request-id": [ + "994c6feb-1e46-477e-9810-dcab84bb942b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213642Z:994c6feb-1e46-477e-9810-dcab84bb942b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup/operations/1D43CCE355A6BA3E\",\r\n \"operationId\": \"1D43CCE355A6BA3E\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:36:44.3203753Z\",\r\n \"trackingId\": \"f2bbbbef-1c56-4368-9d89-4d3d64890698\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databases/sql-audit-cmdlet-db401\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401/sql-audit-cmdlet-db401\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup/operations/0BFAA98F209E2AC0\",\r\n \"operationId\": \"0BFAA98F209E2AC0\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:36:34.4152672Z\",\r\n \"trackingId\": \"1a39fd8d-230b-4523-8f84-5054fd25cb0c\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799635" + ], + "x-ms-request-id": [ + "b27457de-d295-4f68-bf6d-83d7442d6a4c" + ], + "x-ms-correlation-request-id": [ + "b27457de-d295-4f68-bf6d-83d7442d6a4c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213645Z:b27457de-d295-4f68-bf6d-83d7442d6a4c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup/operations/1D43CCE355A6BA3E\",\r\n \"operationId\": \"1D43CCE355A6BA3E\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:36:44.3203753Z\",\r\n \"trackingId\": \"f2bbbbef-1c56-4368-9d89-4d3d64890698\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databases/sql-audit-cmdlet-db401\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401/sql-audit-cmdlet-db401\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup/operations/0BFAA98F209E2AC0\",\r\n \"operationId\": \"0BFAA98F209E2AC0\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:36:34.4152672Z\",\r\n \"trackingId\": \"1a39fd8d-230b-4523-8f84-5054fd25cb0c\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799633" + ], + "x-ms-request-id": [ + "02149780-5a94-4057-8899-7c864cec4d26" + ], + "x-ms-correlation-request-id": [ + "02149780-5a94-4057-8899-7c864cec4d26" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213648Z:02149780-5a94-4057-8899-7c864cec4d26" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db401\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server401\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:35:39.0606326Z\",\r\n \"correlationId\": \"d3537d50-240b-4c3a-be86-4daf55fc7e40\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databases/sql-audit-cmdlet-db401\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401/sql-audit-cmdlet-db401\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799676" + ], + "x-ms-request-id": [ + "4cefa800-cd3e-4e23-9c90-99ba50a02ed7" + ], + "x-ms-correlation-request-id": [ + "4cefa800-cd3e-4e23-9c90-99ba50a02ed7" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213540Z:4cefa800-cd3e-4e23-9c90-99ba50a02ed7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:35:40 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db401\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server401\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:35:41.5780553Z\",\r\n \"correlationId\": \"d3537d50-240b-4c3a-be86-4daf55fc7e40\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databases/sql-audit-cmdlet-db401\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401/sql-audit-cmdlet-db401\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799674" + ], + "x-ms-request-id": [ + "288eeadc-eda4-4197-b777-d40e73310686" + ], + "x-ms-correlation-request-id": [ + "288eeadc-eda4-4197-b777-d40e73310686" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213543Z:288eeadc-eda4-4197-b777-d40e73310686" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:35:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db401\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server401\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:35:41.5780553Z\",\r\n \"correlationId\": \"d3537d50-240b-4c3a-be86-4daf55fc7e40\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databases/sql-audit-cmdlet-db401\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401/sql-audit-cmdlet-db401\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799672" + ], + "x-ms-request-id": [ + "0422e7bf-ad7b-461f-a0d3-64843bfd906c" + ], + "x-ms-correlation-request-id": [ + "0422e7bf-ad7b-461f-a0d3-64843bfd906c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213546Z:0422e7bf-ad7b-461f-a0d3-64843bfd906c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:35:46 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db401\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server401\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:35:41.5780553Z\",\r\n \"correlationId\": \"d3537d50-240b-4c3a-be86-4daf55fc7e40\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databases/sql-audit-cmdlet-db401\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401/sql-audit-cmdlet-db401\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799670" + ], + "x-ms-request-id": [ + "16b6b2dd-58fe-4972-b6ed-253bde0b9902" + ], + "x-ms-correlation-request-id": [ + "16b6b2dd-58fe-4972-b6ed-253bde0b9902" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213549Z:16b6b2dd-58fe-4972-b6ed-253bde0b9902" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:35:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db401\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server401\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:35:41.5780553Z\",\r\n \"correlationId\": \"d3537d50-240b-4c3a-be86-4daf55fc7e40\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databases/sql-audit-cmdlet-db401\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401/sql-audit-cmdlet-db401\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799668" + ], + "x-ms-request-id": [ + "7efcdd5b-5dce-4a1a-84f9-3421815579e5" + ], + "x-ms-correlation-request-id": [ + "7efcdd5b-5dce-4a1a-84f9-3421815579e5" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213552Z:7efcdd5b-5dce-4a1a-84f9-3421815579e5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:35:52 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db401\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server401\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:35:41.5780553Z\",\r\n \"correlationId\": \"d3537d50-240b-4c3a-be86-4daf55fc7e40\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databases/sql-audit-cmdlet-db401\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401/sql-audit-cmdlet-db401\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799666" + ], + "x-ms-request-id": [ + "1501f0eb-de6c-415d-9c34-95e31d9b1b2e" + ], + "x-ms-correlation-request-id": [ + "1501f0eb-de6c-415d-9c34-95e31d9b1b2e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213555Z:1501f0eb-de6c-415d-9c34-95e31d9b1b2e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:35:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db401\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server401\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:35:41.5780553Z\",\r\n \"correlationId\": \"d3537d50-240b-4c3a-be86-4daf55fc7e40\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databases/sql-audit-cmdlet-db401\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401/sql-audit-cmdlet-db401\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799664" + ], + "x-ms-request-id": [ + "e2048964-a17e-4401-985d-28c1fd03bca1" + ], + "x-ms-correlation-request-id": [ + "e2048964-a17e-4401-985d-28c1fd03bca1" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213559Z:e2048964-a17e-4401-985d-28c1fd03bca1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:35:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db401\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server401\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:35:41.5780553Z\",\r\n \"correlationId\": \"d3537d50-240b-4c3a-be86-4daf55fc7e40\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databases/sql-audit-cmdlet-db401\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401/sql-audit-cmdlet-db401\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799662" + ], + "x-ms-request-id": [ + "2fb2d7d5-3b46-4fcb-ab2a-e0edfab85125" + ], + "x-ms-correlation-request-id": [ + "2fb2d7d5-3b46-4fcb-ab2a-e0edfab85125" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213602Z:2fb2d7d5-3b46-4fcb-ab2a-e0edfab85125" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db401\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server401\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:35:41.5780553Z\",\r\n \"correlationId\": \"d3537d50-240b-4c3a-be86-4daf55fc7e40\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databases/sql-audit-cmdlet-db401\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401/sql-audit-cmdlet-db401\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799660" + ], + "x-ms-request-id": [ + "6332c577-387f-498f-8345-2fb4026238be" + ], + "x-ms-correlation-request-id": [ + "6332c577-387f-498f-8345-2fb4026238be" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213605Z:6332c577-387f-498f-8345-2fb4026238be" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db401\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server401\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:35:41.5780553Z\",\r\n \"correlationId\": \"d3537d50-240b-4c3a-be86-4daf55fc7e40\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databases/sql-audit-cmdlet-db401\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401/sql-audit-cmdlet-db401\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799658" + ], + "x-ms-request-id": [ + "11274f72-38d7-42b9-a686-f1ef874f5003" + ], + "x-ms-correlation-request-id": [ + "11274f72-38d7-42b9-a686-f1ef874f5003" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213609Z:11274f72-38d7-42b9-a686-f1ef874f5003" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:09 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db401\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server401\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:35:41.5780553Z\",\r\n \"correlationId\": \"d3537d50-240b-4c3a-be86-4daf55fc7e40\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databases/sql-audit-cmdlet-db401\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401/sql-audit-cmdlet-db401\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799656" + ], + "x-ms-request-id": [ + "94ae7795-d618-4cff-9f3d-8aa8d221ac2f" + ], + "x-ms-correlation-request-id": [ + "94ae7795-d618-4cff-9f3d-8aa8d221ac2f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213612Z:94ae7795-d618-4cff-9f3d-8aa8d221ac2f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:12 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db401\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server401\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:35:41.5780553Z\",\r\n \"correlationId\": \"d3537d50-240b-4c3a-be86-4daf55fc7e40\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databases/sql-audit-cmdlet-db401\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401/sql-audit-cmdlet-db401\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799654" + ], + "x-ms-request-id": [ + "119310ee-4811-4c00-9413-fe2b120dd3fc" + ], + "x-ms-correlation-request-id": [ + "119310ee-4811-4c00-9413-fe2b120dd3fc" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213615Z:119310ee-4811-4c00-9413-fe2b120dd3fc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:14 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db401\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server401\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:35:41.5780553Z\",\r\n \"correlationId\": \"d3537d50-240b-4c3a-be86-4daf55fc7e40\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databases/sql-audit-cmdlet-db401\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401/sql-audit-cmdlet-db401\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799652" + ], + "x-ms-request-id": [ + "13033fec-0d6e-4338-bafc-09552dda79ae" + ], + "x-ms-correlation-request-id": [ + "13033fec-0d6e-4338-bafc-09552dda79ae" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213618Z:13033fec-0d6e-4338-bafc-09552dda79ae" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:18 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db401\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server401\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:35:41.5780553Z\",\r\n \"correlationId\": \"d3537d50-240b-4c3a-be86-4daf55fc7e40\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databases/sql-audit-cmdlet-db401\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401/sql-audit-cmdlet-db401\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799650" + ], + "x-ms-request-id": [ + "dc0ff9ba-c6a7-4d63-9a2b-484deff6498d" + ], + "x-ms-correlation-request-id": [ + "dc0ff9ba-c6a7-4d63-9a2b-484deff6498d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213621Z:dc0ff9ba-c6a7-4d63-9a2b-484deff6498d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:20 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db401\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server401\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:35:41.5780553Z\",\r\n \"correlationId\": \"d3537d50-240b-4c3a-be86-4daf55fc7e40\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databases/sql-audit-cmdlet-db401\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401/sql-audit-cmdlet-db401\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799648" + ], + "x-ms-request-id": [ + "aa964176-0fc5-459a-b79e-73f6979bc7fe" + ], + "x-ms-correlation-request-id": [ + "aa964176-0fc5-459a-b79e-73f6979bc7fe" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213624Z:aa964176-0fc5-459a-b79e-73f6979bc7fe" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db401\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server401\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:35:41.5780553Z\",\r\n \"correlationId\": \"d3537d50-240b-4c3a-be86-4daf55fc7e40\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databases/sql-audit-cmdlet-db401\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401/sql-audit-cmdlet-db401\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799646" + ], + "x-ms-request-id": [ + "974f91cf-4008-4ef2-a5b9-add43adc6447" + ], + "x-ms-correlation-request-id": [ + "974f91cf-4008-4ef2-a5b9-add43adc6447" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213627Z:974f91cf-4008-4ef2-a5b9-add43adc6447" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db401\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server401\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:35:41.5780553Z\",\r\n \"correlationId\": \"d3537d50-240b-4c3a-be86-4daf55fc7e40\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databases/sql-audit-cmdlet-db401\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401/sql-audit-cmdlet-db401\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799644" + ], + "x-ms-request-id": [ + "2505c7f7-f7d4-494d-a99f-9c71d3f34bba" + ], + "x-ms-correlation-request-id": [ + "2505c7f7-f7d4-494d-a99f-9c71d3f34bba" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213630Z:2505c7f7-f7d4-494d-a99f-9c71d3f34bba" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:29 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db401\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server401\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:35:41.5780553Z\",\r\n \"correlationId\": \"d3537d50-240b-4c3a-be86-4daf55fc7e40\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databases/sql-audit-cmdlet-db401\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401/sql-audit-cmdlet-db401\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799642" + ], + "x-ms-request-id": [ + "c5daf147-4577-4e7d-a3ee-aedd3cd829a7" + ], + "x-ms-correlation-request-id": [ + "c5daf147-4577-4e7d-a3ee-aedd3cd829a7" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213633Z:c5daf147-4577-4e7d-a3ee-aedd3cd829a7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db401\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server401\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:35:41.5780553Z\",\r\n \"correlationId\": \"d3537d50-240b-4c3a-be86-4daf55fc7e40\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databases/sql-audit-cmdlet-db401\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401/sql-audit-cmdlet-db401\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799640" + ], + "x-ms-request-id": [ + "b1614423-119f-4f10-8eba-a82f9a0859fa" + ], + "x-ms-correlation-request-id": [ + "b1614423-119f-4f10-8eba-a82f9a0859fa" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213636Z:b1614423-119f-4f10-8eba-a82f9a0859fa" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:36 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db401\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server401\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:35:41.5780553Z\",\r\n \"correlationId\": \"d3537d50-240b-4c3a-be86-4daf55fc7e40\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databases/sql-audit-cmdlet-db401\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401/sql-audit-cmdlet-db401\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799638" + ], + "x-ms-request-id": [ + "d02c0d6f-7e01-4b3f-9146-9f7e6bc21187" + ], + "x-ms-correlation-request-id": [ + "d02c0d6f-7e01-4b3f-9146-9f7e6bc21187" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213639Z:d02c0d6f-7e01-4b3f-9146-9f7e6bc21187" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db401\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server401\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:35:41.5780553Z\",\r\n \"correlationId\": \"d3537d50-240b-4c3a-be86-4daf55fc7e40\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databases/sql-audit-cmdlet-db401\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401/sql-audit-cmdlet-db401\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799636" + ], + "x-ms-request-id": [ + "1d2185a7-7e11-4dc2-97be-70f8e3e11917" + ], + "x-ms-correlation-request-id": [ + "1d2185a7-7e11-4dc2-97be-70f8e3e11917" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213642Z:1d2185a7-7e11-4dc2-97be-70f8e3e11917" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db401\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server401\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:35:41.5780553Z\",\r\n \"correlationId\": \"d3537d50-240b-4c3a-be86-4daf55fc7e40\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databases/sql-audit-cmdlet-db401\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401/sql-audit-cmdlet-db401\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799634" + ], + "x-ms-request-id": [ + "89acefc1-50b0-4069-b934-2d7aa87c84ce" + ], + "x-ms-correlation-request-id": [ + "89acefc1-50b0-4069-b934-2d7aa87c84ce" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213645Z:89acefc1-50b0-4069-b934-2d7aa87c84ce" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db401\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server401\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:36:48.3490378Z\",\r\n \"correlationId\": \"d3537d50-240b-4c3a-be86-4daf55fc7e40\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databases/sql-audit-cmdlet-db401\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server401/sql-audit-cmdlet-db401\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1626" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799632" + ], + "x-ms-request-id": [ + "f6b09cd9-3f9e-44d3-b99c-98aa217a38e9" + ], + "x-ms-correlation-request-id": [ + "f6b09cd9-3f9e-44d3-b99c-98aa217a38e9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213649Z:f6b09cd9-3f9e-44d3-b99c-98aa217a38e9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401\",\r\n \"name\": \"sql-audit-cmdlet-server401\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databases/sql-audit-cmdlet-db401\",\r\n \"name\": \"sql-audit-cmdlet-server401/sql-audit-cmdlet-db401\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "577" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799631" + ], + "x-ms-request-id": [ + "da244661-ab2a-41dd-a051-c5d9325cdb43" + ], + "x-ms-correlation-request-id": [ + "da244661-ab2a-41dd-a051-c5d9325cdb43" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213651Z:da244661-ab2a-41dd-a051-c5d9325cdb43" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westeurope:fa476328-d559-4a63-bff7-2e213890cbb7" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799985" + ], + "x-ms-correlation-request-id": [ + "cf84a306-78ff-4df8-b97b-0260c972f742" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213652Z:cf84a306-78ff-4df8-b97b-0260c972f742" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:52 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNDAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "497139d5-53bc-4853-b14b-3180f3a1d1fb-2014-10-31 21:36:53Z" + ], + "x-ms-client-request-id": [ + "6cc83cd8-3563-4070-992d-7441fb67d9db-2014-10-31 21:36:53Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets401\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets401.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server401.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server401;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server401.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server401;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server401.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server401.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server401\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server401.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server401.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server401;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server401.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2924" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "695873f2-70d8-4739-8743-e4eb4092b67c" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799879" + ], + "x-ms-correlation-request-id": [ + "4d358169-1ff0-4c5f-bc58-f09d1f8ed352" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213654Z:4d358169-1ff0-4c5f-bc58-f09d1f8ed352" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:54 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNDAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "497139d5-53bc-4853-b14b-3180f3a1d1fb-2014-10-31 21:36:53Z" + ], + "x-ms-client-request-id": [ + "6cb932e8-4f0f-406e-87c6-8026c6df3d43-2014-10-31 21:37:00Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets401\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets401.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server401.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server401;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server401.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server401;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server401.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server401.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server401\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server401.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server401.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server401;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server401.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2924" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "687a8bcc-a507-498b-8c76-001aab89f326" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799878" + ], + "x-ms-correlation-request-id": [ + "77dc7b90-e971-49df-9455-619410c2bb6d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213700Z:77dc7b90-e971-49df-9455-619410c2bb6d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:37:00 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNDAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "497139d5-53bc-4853-b14b-3180f3a1d1fb-2014-10-31 21:36:53Z" + ], + "x-ms-client-request-id": [ + "1eb185c6-d1bf-435a-aa67-7d269f073c16-2014-10-31 21:37:02Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets401\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets401.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server401.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server401;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server401.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server401;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server401.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server401.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server401\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server401.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server401.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server401;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server401.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2924" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "2a4141ca-71a9-4998-9828-819dae98dab4" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799877" + ], + "x-ms-correlation-request-id": [ + "cb7b862c-6738-4bd8-b1bd-a33b1e0a210e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213703Z:cb7b862c-6738-4bd8-b1bd-a33b1e0a210e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:37:03 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNDAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "497139d5-53bc-4853-b14b-3180f3a1d1fb-2014-10-31 21:36:53Z" + ], + "x-ms-client-request-id": [ + "b9c2e26c-81ed-48b0-abf5-39da15e0eef9-2014-10-31 21:37:08Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets401\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets401.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server401.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server401;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server401.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server401;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server401.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server401.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server401\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server401.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server401.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server401;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server401.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2924" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "66d2df71-920e-4a62-ad50-77918322ab06" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799876" + ], + "x-ms-correlation-request-id": [ + "b7479192-3301-4df9-a5db-2a558bf5d533" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213709Z:b7479192-3301-4df9-a5db-2a558bf5d533" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:37:08 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets401/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzNDAxL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "497139d5-53bc-4853-b14b-3180f3a1d1fb-2014-10-31 21:36:53Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"2k5s0ghsdxnTdDoEvOrfLkO2C31H2ftXOrB+x3X0lUNBN1qADrPBLUtROgKMbReoe1vkXPaHWRa48lDQ4gaxZQ==\",\r\n \"secondaryKey\": \"Tn+Z+ypOhDt+Jc13s6UeQR+3dYJ2lbAAOYBLinKi+98QwKLNplpEC26ZNppWqWMFp1XQMkXheT0YvHeiJy8g8g==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:b2bc939c-dc4a-4c89-8631-79a037cba61c" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11980" + ], + "x-ms-correlation-request-id": [ + "3c2f31b2-5c6e-4ac8-bb7b-499bd6b02d1e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213656Z:3c2f31b2-5c6e-4ac8-bb7b-499bd6b02d1e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets401/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzNDAxL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "497139d5-53bc-4853-b14b-3180f3a1d1fb-2014-10-31 21:36:53Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"2k5s0ghsdxnTdDoEvOrfLkO2C31H2ftXOrB+x3X0lUNBN1qADrPBLUtROgKMbReoe1vkXPaHWRa48lDQ4gaxZQ==\",\r\n \"secondaryKey\": \"Tn+Z+ypOhDt+Jc13s6UeQR+3dYJ2lbAAOYBLinKi+98QwKLNplpEC26ZNppWqWMFp1XQMkXheT0YvHeiJy8g8g==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:15b41595-73c2-461d-8065-6bc438e319e4" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11978" + ], + "x-ms-correlation-request-id": [ + "4b1a6394-4d5d-40e6-8227-8e93aef4e4b0" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213704Z:4b1a6394-4d5d-40e6-8227-8e93aef4e4b0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:37:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNDAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets401\",\r\n \"storageAccountKey\": \"2k5s0ghsdxnTdDoEvOrfLkO2C31H2ftXOrB+x3X0lUNBN1qADrPBLUtROgKMbReoe1vkXPaHWRa48lDQ4gaxZQ==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets401.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "784" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "497139d5-53bc-4853-b14b-3180f3a1d1fb-2014-10-31 21:36:53Z" + ], + "x-ms-client-request-id": [ + "6cc83cd8-3563-4070-992d-7441fb67d9db-2014-10-31 21:36:53Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets401\",\r\n \"storageAccountKey\": \"2k5s0ghsdxnTdDoEvOrfLkO2C31H2ftXOrB+x3X0lUNBN1qADrPBLUtROgKMbReoe1vkXPaHWRa48lDQ4gaxZQ==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets401.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1183" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "96d3ab78-4bfa-4493-a5a9-13f1fca67953" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11979" + ], + "x-ms-correlation-request-id": [ + "febb31a5-7116-43c1-a2b6-80d5efd78cc9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213659Z:febb31a5-7116-43c1-a2b6-80d5efd78cc9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:36:59 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzQwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNDAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets401\",\r\n \"storageAccountKey\": \"2k5s0ghsdxnTdDoEvOrfLkO2C31H2ftXOrB+x3X0lUNBN1qADrPBLUtROgKMbReoe1vkXPaHWRa48lDQ4gaxZQ==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets401.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "784" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "497139d5-53bc-4853-b14b-3180f3a1d1fb-2014-10-31 21:36:53Z" + ], + "x-ms-client-request-id": [ + "1eb185c6-d1bf-435a-aa67-7d269f073c16-2014-10-31 21:37:02Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets401\",\r\n \"storageAccountKey\": \"2k5s0ghsdxnTdDoEvOrfLkO2C31H2ftXOrB+x3X0lUNBN1qADrPBLUtROgKMbReoe1vkXPaHWRa48lDQ4gaxZQ==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets401.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg401/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server401/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1183" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "13287573-cf47-49f8-8d1c-784e65045525" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11977" + ], + "x-ms-correlation-request-id": [ + "16044f53-8548-41a4-9fd5-1ea7daf218f1" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T213707Z:16044f53-8548-41a4-9fd5-1ea7daf218f1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:37:06 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices/auditcmdlets401", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXMvYXVkaXRjbWRsZXRzNDAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "bac46522ec9d2f81a6a16daa9d6d8a1e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:37:13 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/bac46522ec9d2f81a6a16daa9d6d8a1e", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zL2JhYzQ2NTIyZWM5ZDJmODFhNmExNmRhYTlkNmQ4YTFl", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/2.0.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "\r\n bac46522-ec9d-2f81-a6a1-6daa9d6d8a1e\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "073225fc40392ba08bde116f5604a69c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:37:15 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "cca24ec8-99b5-4aa7-9ff6-486e886f304c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestServerUpdatePolicyWithEventTypeShortcuts.json b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestServerUpdatePolicyWithEventTypeShortcuts.json new file mode 100644 index 000000000000..2200e02d3447 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestServerUpdatePolicyWithEventTypeShortcuts.json @@ -0,0 +1,5744 @@ +{ + "Entries": [ + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXM=", + "RequestMethod": "POST", + "RequestBody": "\r\n auditcmdlets801\r\n \r\n \r\n West US\r\n \r\n Standard_GRS\r\n", + "RequestHeaders": { + "Content-Type": [ + "application/xml" + ], + "Content-Length": [ + "379" + ], + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "1338" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "ea515fc00d672907ad9c7907a85731dd" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:56:53 GMT" + ], + "Location": [ + "https://management.core.windows.net/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/storage/auditcmdlets801" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/ea515fc00d672907ad9c7907a85731dd", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zL2VhNTE1ZmMwMGQ2NzI5MDdhZDljNzkwN2E4NTczMWRk", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "1338" + ] + }, + "ResponseBody": "\r\n ea515fc0-0d67-2907-ad9c-7907a85731dd\r\n InProgress\r\n", + "ResponseHeaders": { + "Content-Length": [ + "197" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "98fc503df6322647a0dc3d1d59e619a7" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:56:53 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/ea515fc00d672907ad9c7907a85731dd", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zL2VhNTE1ZmMwMGQ2NzI5MDdhZDljNzkwN2E4NTczMWRk", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "1338" + ] + }, + "ResponseBody": "\r\n ea515fc0-0d67-2907-ad9c-7907a85731dd\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "df3434ed382b2e9c9c31031ce77abd4b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:57:23 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "119" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799824" + ], + "x-ms-request-id": [ + "00456187-a284-4e21-acc6-8cb79c80c8ac" + ], + "x-ms-correlation-request-id": [ + "00456187-a284-4e21-acc6-8cb79c80c8ac" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215724Z:00456187-a284-4e21-acc6-8cb79c80c8ac" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:57:24 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801\",\r\n \"name\": \"sql-audit-cmdlet-test-rg801\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "217" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11969" + ], + "x-ms-request-id": [ + "960d8f95-364d-43a0-a0e3-b4ce67e286c0" + ], + "x-ms-correlation-request-id": [ + "960d8f95-364d-43a0-a0e3-b4ce67e286c0" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215726Z:960d8f95-364d-43a0-a0e3-b4ce67e286c0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:57:26 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/validate?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvdmFsaWRhdGU/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:57:27.2755539Z\",\r\n \"correlationId\": \"8934b066-225d-4f78-8d4e-94b7529dee0a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11968" + ], + "x-ms-request-id": [ + "8934b066-225d-4f78-8d4e-94b7529dee0a" + ], + "x-ms-correlation-request-id": [ + "8934b066-225d-4f78-8d4e-94b7529dee0a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215727Z:8934b066-225d-4f78-8d4e-94b7529dee0a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:57:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:57:28.9522243Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11967" + ], + "x-ms-request-id": [ + "c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e" + ], + "x-ms-correlation-request-id": [ + "c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215729Z:c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:57:28 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799823" + ], + "x-ms-request-id": [ + "bc92af47-b655-439f-b80c-f2e0f401c27a" + ], + "x-ms-correlation-request-id": [ + "bc92af47-b655-439f-b80c-f2e0f401c27a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215730Z:bc92af47-b655-439f-b80c-f2e0f401c27a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:57:30 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799821" + ], + "x-ms-request-id": [ + "bd4214fc-aee6-44f4-97a7-bf67f4ae453b" + ], + "x-ms-correlation-request-id": [ + "bd4214fc-aee6-44f4-97a7-bf67f4ae453b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215733Z:bd4214fc-aee6-44f4-97a7-bf67f4ae453b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:57:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799819" + ], + "x-ms-request-id": [ + "d71e0319-16d1-4aab-b06d-32303d593342" + ], + "x-ms-correlation-request-id": [ + "d71e0319-16d1-4aab-b06d-32303d593342" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215736Z:d71e0319-16d1-4aab-b06d-32303d593342" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:57:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799817" + ], + "x-ms-request-id": [ + "c247cebd-0370-4bc3-9ab2-c3264f5d5db3" + ], + "x-ms-correlation-request-id": [ + "c247cebd-0370-4bc3-9ab2-c3264f5d5db3" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215739Z:c247cebd-0370-4bc3-9ab2-c3264f5d5db3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:57:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799815" + ], + "x-ms-request-id": [ + "efc26db7-83dd-49e2-afac-413d79476a3b" + ], + "x-ms-correlation-request-id": [ + "efc26db7-83dd-49e2-afac-413d79476a3b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215742Z:efc26db7-83dd-49e2-afac-413d79476a3b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:57:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799813" + ], + "x-ms-request-id": [ + "224abd61-f8f2-492c-85e1-a8e0f9a915fe" + ], + "x-ms-correlation-request-id": [ + "224abd61-f8f2-492c-85e1-a8e0f9a915fe" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215745Z:224abd61-f8f2-492c-85e1-a8e0f9a915fe" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:57:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799811" + ], + "x-ms-request-id": [ + "0c7d4df4-5714-4be7-8d37-b6971cf31f0f" + ], + "x-ms-correlation-request-id": [ + "0c7d4df4-5714-4be7-8d37-b6971cf31f0f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215748Z:0c7d4df4-5714-4be7-8d37-b6971cf31f0f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:57:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799809" + ], + "x-ms-request-id": [ + "9ede4ab2-9ac3-47f2-a2c7-52ab17854405" + ], + "x-ms-correlation-request-id": [ + "9ede4ab2-9ac3-47f2-a2c7-52ab17854405" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215751Z:9ede4ab2-9ac3-47f2-a2c7-52ab17854405" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:57:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799807" + ], + "x-ms-request-id": [ + "3fcf599d-cf7b-4ef5-8997-c667888045fc" + ], + "x-ms-correlation-request-id": [ + "3fcf599d-cf7b-4ef5-8997-c667888045fc" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215754Z:3fcf599d-cf7b-4ef5-8997-c667888045fc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:57:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799805" + ], + "x-ms-request-id": [ + "1c0a6ec8-6ddc-4167-ba05-941eebc15a8d" + ], + "x-ms-correlation-request-id": [ + "1c0a6ec8-6ddc-4167-ba05-941eebc15a8d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215757Z:1c0a6ec8-6ddc-4167-ba05-941eebc15a8d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:57:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799803" + ], + "x-ms-request-id": [ + "1c628628-b0b9-428d-b0cc-779bf08679d4" + ], + "x-ms-correlation-request-id": [ + "1c628628-b0b9-428d-b0cc-779bf08679d4" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215800Z:1c628628-b0b9-428d-b0cc-779bf08679d4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799801" + ], + "x-ms-request-id": [ + "9552298a-9c24-4090-9c23-c9006d65e7c9" + ], + "x-ms-correlation-request-id": [ + "9552298a-9c24-4090-9c23-c9006d65e7c9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215803Z:9552298a-9c24-4090-9c23-c9006d65e7c9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799799" + ], + "x-ms-request-id": [ + "057e51c2-4a83-46fa-9beb-e1905734442f" + ], + "x-ms-correlation-request-id": [ + "057e51c2-4a83-46fa-9beb-e1905734442f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215806Z:057e51c2-4a83-46fa-9beb-e1905734442f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799797" + ], + "x-ms-request-id": [ + "2222d5f2-b5fc-41b7-9df2-6f4c80afb9bf" + ], + "x-ms-correlation-request-id": [ + "2222d5f2-b5fc-41b7-9df2-6f4c80afb9bf" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215809Z:2222d5f2-b5fc-41b7-9df2-6f4c80afb9bf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:08 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799795" + ], + "x-ms-request-id": [ + "7eb01dd5-56c3-439e-bd22-983adcb25f02" + ], + "x-ms-correlation-request-id": [ + "7eb01dd5-56c3-439e-bd22-983adcb25f02" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215812Z:7eb01dd5-56c3-439e-bd22-983adcb25f02" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:12 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799793" + ], + "x-ms-request-id": [ + "be2be671-54c0-4bed-9bc5-a1411f6cd846" + ], + "x-ms-correlation-request-id": [ + "be2be671-54c0-4bed-9bc5-a1411f6cd846" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215816Z:be2be671-54c0-4bed-9bc5-a1411f6cd846" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:16 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799791" + ], + "x-ms-request-id": [ + "bad4fa93-d135-4122-8f92-899688c52099" + ], + "x-ms-correlation-request-id": [ + "bad4fa93-d135-4122-8f92-899688c52099" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215819Z:bad4fa93-d135-4122-8f92-899688c52099" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799789" + ], + "x-ms-request-id": [ + "e4d87db1-7dbb-4d69-9960-9b2ce79e7dea" + ], + "x-ms-correlation-request-id": [ + "e4d87db1-7dbb-4d69-9960-9b2ce79e7dea" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215822Z:e4d87db1-7dbb-4d69-9960-9b2ce79e7dea" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799787" + ], + "x-ms-request-id": [ + "9604046c-6e36-48cd-a5ed-e0f36c2813dc" + ], + "x-ms-correlation-request-id": [ + "9604046c-6e36-48cd-a5ed-e0f36c2813dc" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215825Z:9604046c-6e36-48cd-a5ed-e0f36c2813dc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:25 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/BC8F02D5C0856B66\",\r\n \"operationId\": \"BC8F02D5C0856B66\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:26.4623331Z\",\r\n \"trackingId\": \"c32acbf1-d0ce-4f1d-8544-8eeaa85d75cf\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799785" + ], + "x-ms-request-id": [ + "3cf524e5-6962-459d-ac87-d9a60fa3e1bb" + ], + "x-ms-correlation-request-id": [ + "3cf524e5-6962-459d-ac87-d9a60fa3e1bb" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215828Z:3cf524e5-6962-459d-ac87-d9a60fa3e1bb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/BC8F02D5C0856B66\",\r\n \"operationId\": \"BC8F02D5C0856B66\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:26.4623331Z\",\r\n \"trackingId\": \"c32acbf1-d0ce-4f1d-8544-8eeaa85d75cf\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799783" + ], + "x-ms-request-id": [ + "39138d4e-ba5d-4a7d-890a-cd1874e04207" + ], + "x-ms-correlation-request-id": [ + "39138d4e-ba5d-4a7d-890a-cd1874e04207" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215831Z:39138d4e-ba5d-4a7d-890a-cd1874e04207" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:31 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/BC8F02D5C0856B66\",\r\n \"operationId\": \"BC8F02D5C0856B66\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:26.4623331Z\",\r\n \"trackingId\": \"c32acbf1-d0ce-4f1d-8544-8eeaa85d75cf\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799781" + ], + "x-ms-request-id": [ + "b3c8b9c8-3d7d-4af5-957b-3c34aa40e3b9" + ], + "x-ms-correlation-request-id": [ + "b3c8b9c8-3d7d-4af5-957b-3c34aa40e3b9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215834Z:b3c8b9c8-3d7d-4af5-957b-3c34aa40e3b9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:34 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/950B6A4B4675DD5F\",\r\n \"operationId\": \"950B6A4B4675DD5F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:35.0690289Z\",\r\n \"trackingId\": \"e207a138-3cb1-46db-8cb1-a3e7b18660ce\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/BC8F02D5C0856B66\",\r\n \"operationId\": \"BC8F02D5C0856B66\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:26.4623331Z\",\r\n \"trackingId\": \"c32acbf1-d0ce-4f1d-8544-8eeaa85d75cf\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799779" + ], + "x-ms-request-id": [ + "bb1ad3ac-a502-4007-a0a6-9051c84ae7a9" + ], + "x-ms-correlation-request-id": [ + "bb1ad3ac-a502-4007-a0a6-9051c84ae7a9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215837Z:bb1ad3ac-a502-4007-a0a6-9051c84ae7a9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:37 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/950B6A4B4675DD5F\",\r\n \"operationId\": \"950B6A4B4675DD5F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:35.0690289Z\",\r\n \"trackingId\": \"e207a138-3cb1-46db-8cb1-a3e7b18660ce\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/BC8F02D5C0856B66\",\r\n \"operationId\": \"BC8F02D5C0856B66\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:26.4623331Z\",\r\n \"trackingId\": \"c32acbf1-d0ce-4f1d-8544-8eeaa85d75cf\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799777" + ], + "x-ms-request-id": [ + "328e2daf-2817-4a2a-a1c0-ba4b5461d088" + ], + "x-ms-correlation-request-id": [ + "328e2daf-2817-4a2a-a1c0-ba4b5461d088" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215840Z:328e2daf-2817-4a2a-a1c0-ba4b5461d088" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:40 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/950B6A4B4675DD5F\",\r\n \"operationId\": \"950B6A4B4675DD5F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:35.0690289Z\",\r\n \"trackingId\": \"e207a138-3cb1-46db-8cb1-a3e7b18660ce\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/BC8F02D5C0856B66\",\r\n \"operationId\": \"BC8F02D5C0856B66\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:26.4623331Z\",\r\n \"trackingId\": \"c32acbf1-d0ce-4f1d-8544-8eeaa85d75cf\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799775" + ], + "x-ms-request-id": [ + "b273f6d3-f76a-4883-98be-a21b902a5cca" + ], + "x-ms-correlation-request-id": [ + "b273f6d3-f76a-4883-98be-a21b902a5cca" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215844Z:b273f6d3-f76a-4883-98be-a21b902a5cca" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/950B6A4B4675DD5F\",\r\n \"operationId\": \"950B6A4B4675DD5F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:35.0690289Z\",\r\n \"trackingId\": \"e207a138-3cb1-46db-8cb1-a3e7b18660ce\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/BC8F02D5C0856B66\",\r\n \"operationId\": \"BC8F02D5C0856B66\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:26.4623331Z\",\r\n \"trackingId\": \"c32acbf1-d0ce-4f1d-8544-8eeaa85d75cf\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799773" + ], + "x-ms-request-id": [ + "828e83ee-809e-4785-906a-1718dee03bda" + ], + "x-ms-correlation-request-id": [ + "828e83ee-809e-4785-906a-1718dee03bda" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215847Z:828e83ee-809e-4785-906a-1718dee03bda" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:47 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/950B6A4B4675DD5F\",\r\n \"operationId\": \"950B6A4B4675DD5F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:35.0690289Z\",\r\n \"trackingId\": \"e207a138-3cb1-46db-8cb1-a3e7b18660ce\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/BC8F02D5C0856B66\",\r\n \"operationId\": \"BC8F02D5C0856B66\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:26.4623331Z\",\r\n \"trackingId\": \"c32acbf1-d0ce-4f1d-8544-8eeaa85d75cf\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799771" + ], + "x-ms-request-id": [ + "5f6c738a-8ed1-487d-8569-61747ed6991d" + ], + "x-ms-correlation-request-id": [ + "5f6c738a-8ed1-487d-8569-61747ed6991d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215850Z:5f6c738a-8ed1-487d-8569-61747ed6991d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/950B6A4B4675DD5F\",\r\n \"operationId\": \"950B6A4B4675DD5F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:35.0690289Z\",\r\n \"trackingId\": \"e207a138-3cb1-46db-8cb1-a3e7b18660ce\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/BC8F02D5C0856B66\",\r\n \"operationId\": \"BC8F02D5C0856B66\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:26.4623331Z\",\r\n \"trackingId\": \"c32acbf1-d0ce-4f1d-8544-8eeaa85d75cf\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799769" + ], + "x-ms-request-id": [ + "dd401ff1-f696-4c87-b789-18e01926a0bf" + ], + "x-ms-correlation-request-id": [ + "dd401ff1-f696-4c87-b789-18e01926a0bf" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215853Z:dd401ff1-f696-4c87-b789-18e01926a0bf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/950B6A4B4675DD5F\",\r\n \"operationId\": \"950B6A4B4675DD5F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:35.0690289Z\",\r\n \"trackingId\": \"e207a138-3cb1-46db-8cb1-a3e7b18660ce\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/BC8F02D5C0856B66\",\r\n \"operationId\": \"BC8F02D5C0856B66\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:26.4623331Z\",\r\n \"trackingId\": \"c32acbf1-d0ce-4f1d-8544-8eeaa85d75cf\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799767" + ], + "x-ms-request-id": [ + "f8f4fc70-5d04-4d0c-84f9-4b6f584a68f8" + ], + "x-ms-correlation-request-id": [ + "f8f4fc70-5d04-4d0c-84f9-4b6f584a68f8" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215856Z:f8f4fc70-5d04-4d0c-84f9-4b6f584a68f8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:56 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/950B6A4B4675DD5F\",\r\n \"operationId\": \"950B6A4B4675DD5F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:35.0690289Z\",\r\n \"trackingId\": \"e207a138-3cb1-46db-8cb1-a3e7b18660ce\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/BC8F02D5C0856B66\",\r\n \"operationId\": \"BC8F02D5C0856B66\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:26.4623331Z\",\r\n \"trackingId\": \"c32acbf1-d0ce-4f1d-8544-8eeaa85d75cf\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799765" + ], + "x-ms-request-id": [ + "8a897436-acec-44c3-9ba0-48d0c84d3ba1" + ], + "x-ms-correlation-request-id": [ + "8a897436-acec-44c3-9ba0-48d0c84d3ba1" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215900Z:8a897436-acec-44c3-9ba0-48d0c84d3ba1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/950B6A4B4675DD5F\",\r\n \"operationId\": \"950B6A4B4675DD5F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:35.0690289Z\",\r\n \"trackingId\": \"e207a138-3cb1-46db-8cb1-a3e7b18660ce\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/BC8F02D5C0856B66\",\r\n \"operationId\": \"BC8F02D5C0856B66\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:26.4623331Z\",\r\n \"trackingId\": \"c32acbf1-d0ce-4f1d-8544-8eeaa85d75cf\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799763" + ], + "x-ms-request-id": [ + "e876119d-9e22-4f1b-a7bd-eeb97f4f21e6" + ], + "x-ms-correlation-request-id": [ + "e876119d-9e22-4f1b-a7bd-eeb97f4f21e6" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215903Z:e876119d-9e22-4f1b-a7bd-eeb97f4f21e6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:02 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/950B6A4B4675DD5F\",\r\n \"operationId\": \"950B6A4B4675DD5F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:35.0690289Z\",\r\n \"trackingId\": \"e207a138-3cb1-46db-8cb1-a3e7b18660ce\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/BC8F02D5C0856B66\",\r\n \"operationId\": \"BC8F02D5C0856B66\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:26.4623331Z\",\r\n \"trackingId\": \"c32acbf1-d0ce-4f1d-8544-8eeaa85d75cf\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799761" + ], + "x-ms-request-id": [ + "89b61b5e-b426-4efe-b735-7d5d71bbd8df" + ], + "x-ms-correlation-request-id": [ + "89b61b5e-b426-4efe-b735-7d5d71bbd8df" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215906Z:89b61b5e-b426-4efe-b735-7d5d71bbd8df" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/950B6A4B4675DD5F\",\r\n \"operationId\": \"950B6A4B4675DD5F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:35.0690289Z\",\r\n \"trackingId\": \"e207a138-3cb1-46db-8cb1-a3e7b18660ce\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/BC8F02D5C0856B66\",\r\n \"operationId\": \"BC8F02D5C0856B66\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:26.4623331Z\",\r\n \"trackingId\": \"c32acbf1-d0ce-4f1d-8544-8eeaa85d75cf\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799759" + ], + "x-ms-request-id": [ + "fd92ab45-fcf9-4a5a-b5d3-803dcfa438f3" + ], + "x-ms-correlation-request-id": [ + "fd92ab45-fcf9-4a5a-b5d3-803dcfa438f3" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215909Z:fd92ab45-fcf9-4a5a-b5d3-803dcfa438f3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:09 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/950B6A4B4675DD5F\",\r\n \"operationId\": \"950B6A4B4675DD5F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:35.0690289Z\",\r\n \"trackingId\": \"e207a138-3cb1-46db-8cb1-a3e7b18660ce\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/BC8F02D5C0856B66\",\r\n \"operationId\": \"BC8F02D5C0856B66\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:26.4623331Z\",\r\n \"trackingId\": \"c32acbf1-d0ce-4f1d-8544-8eeaa85d75cf\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799757" + ], + "x-ms-request-id": [ + "e4a5d563-5e1d-4c75-a304-071512391107" + ], + "x-ms-correlation-request-id": [ + "e4a5d563-5e1d-4c75-a304-071512391107" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215912Z:e4a5d563-5e1d-4c75-a304-071512391107" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:12 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/950B6A4B4675DD5F\",\r\n \"operationId\": \"950B6A4B4675DD5F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:35.0690289Z\",\r\n \"trackingId\": \"e207a138-3cb1-46db-8cb1-a3e7b18660ce\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/BC8F02D5C0856B66\",\r\n \"operationId\": \"BC8F02D5C0856B66\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:26.4623331Z\",\r\n \"trackingId\": \"c32acbf1-d0ce-4f1d-8544-8eeaa85d75cf\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799755" + ], + "x-ms-request-id": [ + "5446d52b-2806-49ce-9f39-984e9ce0dd18" + ], + "x-ms-correlation-request-id": [ + "5446d52b-2806-49ce-9f39-984e9ce0dd18" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215916Z:5446d52b-2806-49ce-9f39-984e9ce0dd18" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:15 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/950B6A4B4675DD5F\",\r\n \"operationId\": \"950B6A4B4675DD5F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:35.0690289Z\",\r\n \"trackingId\": \"e207a138-3cb1-46db-8cb1-a3e7b18660ce\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/BC8F02D5C0856B66\",\r\n \"operationId\": \"BC8F02D5C0856B66\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:26.4623331Z\",\r\n \"trackingId\": \"c32acbf1-d0ce-4f1d-8544-8eeaa85d75cf\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799753" + ], + "x-ms-request-id": [ + "5a8c903b-5d59-4417-8e98-63c1a3c81a64" + ], + "x-ms-correlation-request-id": [ + "5a8c903b-5d59-4417-8e98-63c1a3c81a64" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215919Z:5a8c903b-5d59-4417-8e98-63c1a3c81a64" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/950B6A4B4675DD5F\",\r\n \"operationId\": \"950B6A4B4675DD5F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:35.0690289Z\",\r\n \"trackingId\": \"e207a138-3cb1-46db-8cb1-a3e7b18660ce\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/BC8F02D5C0856B66\",\r\n \"operationId\": \"BC8F02D5C0856B66\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:26.4623331Z\",\r\n \"trackingId\": \"c32acbf1-d0ce-4f1d-8544-8eeaa85d75cf\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799751" + ], + "x-ms-request-id": [ + "3be593d9-90ce-4b1e-8ec8-5d16eddec14d" + ], + "x-ms-correlation-request-id": [ + "3be593d9-90ce-4b1e-8ec8-5d16eddec14d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215922Z:3be593d9-90ce-4b1e-8ec8-5d16eddec14d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:21 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/950B6A4B4675DD5F\",\r\n \"operationId\": \"950B6A4B4675DD5F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:35.0690289Z\",\r\n \"trackingId\": \"e207a138-3cb1-46db-8cb1-a3e7b18660ce\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/BC8F02D5C0856B66\",\r\n \"operationId\": \"BC8F02D5C0856B66\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:26.4623331Z\",\r\n \"trackingId\": \"c32acbf1-d0ce-4f1d-8544-8eeaa85d75cf\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799749" + ], + "x-ms-request-id": [ + "bf8e3c03-eac3-412d-9067-76997f63f60a" + ], + "x-ms-correlation-request-id": [ + "bf8e3c03-eac3-412d-9067-76997f63f60a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215925Z:bf8e3c03-eac3-412d-9067-76997f63f60a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:25 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/950B6A4B4675DD5F\",\r\n \"operationId\": \"950B6A4B4675DD5F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:35.0690289Z\",\r\n \"trackingId\": \"e207a138-3cb1-46db-8cb1-a3e7b18660ce\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/BC8F02D5C0856B66\",\r\n \"operationId\": \"BC8F02D5C0856B66\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:26.4623331Z\",\r\n \"trackingId\": \"c32acbf1-d0ce-4f1d-8544-8eeaa85d75cf\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799747" + ], + "x-ms-request-id": [ + "263296d1-ffd3-4d1e-9447-388c9dd73c6c" + ], + "x-ms-correlation-request-id": [ + "263296d1-ffd3-4d1e-9447-388c9dd73c6c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215929Z:263296d1-ffd3-4d1e-9447-388c9dd73c6c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:29 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/950B6A4B4675DD5F\",\r\n \"operationId\": \"950B6A4B4675DD5F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:35.0690289Z\",\r\n \"trackingId\": \"e207a138-3cb1-46db-8cb1-a3e7b18660ce\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/BC8F02D5C0856B66\",\r\n \"operationId\": \"BC8F02D5C0856B66\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:26.4623331Z\",\r\n \"trackingId\": \"c32acbf1-d0ce-4f1d-8544-8eeaa85d75cf\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799745" + ], + "x-ms-request-id": [ + "c0924660-47c2-49a2-b4a6-df80954d2d59" + ], + "x-ms-correlation-request-id": [ + "c0924660-47c2-49a2-b4a6-df80954d2d59" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215932Z:c0924660-47c2-49a2-b4a6-df80954d2d59" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:32 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/950B6A4B4675DD5F\",\r\n \"operationId\": \"950B6A4B4675DD5F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:35.0690289Z\",\r\n \"trackingId\": \"e207a138-3cb1-46db-8cb1-a3e7b18660ce\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/BC8F02D5C0856B66\",\r\n \"operationId\": \"BC8F02D5C0856B66\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:26.4623331Z\",\r\n \"trackingId\": \"c32acbf1-d0ce-4f1d-8544-8eeaa85d75cf\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799743" + ], + "x-ms-request-id": [ + "8fd76f5c-2570-431c-9a75-a25b16d7205e" + ], + "x-ms-correlation-request-id": [ + "8fd76f5c-2570-431c-9a75-a25b16d7205e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215935Z:8fd76f5c-2570-431c-9a75-a25b16d7205e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/950B6A4B4675DD5F\",\r\n \"operationId\": \"950B6A4B4675DD5F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:35.0690289Z\",\r\n \"trackingId\": \"e207a138-3cb1-46db-8cb1-a3e7b18660ce\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup/operations/BC8F02D5C0856B66\",\r\n \"operationId\": \"BC8F02D5C0856B66\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:58:26.4623331Z\",\r\n \"trackingId\": \"c32acbf1-d0ce-4f1d-8544-8eeaa85d75cf\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799741" + ], + "x-ms-request-id": [ + "b2b27c75-c143-4053-afcd-3d962c549868" + ], + "x-ms-correlation-request-id": [ + "b2b27c75-c143-4053-afcd-3d962c549868" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215939Z:b2b27c75-c143-4053-afcd-3d962c549868" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:38 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:57:28.9522243Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799822" + ], + "x-ms-request-id": [ + "9b27fa70-01f8-4bb3-aedd-850d3495fa1f" + ], + "x-ms-correlation-request-id": [ + "9b27fa70-01f8-4bb3-aedd-850d3495fa1f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215730Z:9b27fa70-01f8-4bb3-aedd-850d3495fa1f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:57:30 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799820" + ], + "x-ms-request-id": [ + "b11d4df9-b96c-4549-b36e-136db6c42ea8" + ], + "x-ms-correlation-request-id": [ + "b11d4df9-b96c-4549-b36e-136db6c42ea8" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215733Z:b11d4df9-b96c-4549-b36e-136db6c42ea8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:57:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799818" + ], + "x-ms-request-id": [ + "4ded7774-b093-4bee-926b-7e3891eb7436" + ], + "x-ms-correlation-request-id": [ + "4ded7774-b093-4bee-926b-7e3891eb7436" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215736Z:4ded7774-b093-4bee-926b-7e3891eb7436" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:57:36 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799816" + ], + "x-ms-request-id": [ + "9cc5ff97-afa0-4901-9184-c815caf98585" + ], + "x-ms-correlation-request-id": [ + "9cc5ff97-afa0-4901-9184-c815caf98585" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215739Z:9cc5ff97-afa0-4901-9184-c815caf98585" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:57:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799814" + ], + "x-ms-request-id": [ + "ad0b7930-6fc7-4b64-b0cd-8668fc705ecc" + ], + "x-ms-correlation-request-id": [ + "ad0b7930-6fc7-4b64-b0cd-8668fc705ecc" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215742Z:ad0b7930-6fc7-4b64-b0cd-8668fc705ecc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:57:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799812" + ], + "x-ms-request-id": [ + "8af2f405-97a1-46da-822a-c8dbb43b4d68" + ], + "x-ms-correlation-request-id": [ + "8af2f405-97a1-46da-822a-c8dbb43b4d68" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215745Z:8af2f405-97a1-46da-822a-c8dbb43b4d68" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:57:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799810" + ], + "x-ms-request-id": [ + "6156ea1d-e810-49f2-8644-a496a60b93d4" + ], + "x-ms-correlation-request-id": [ + "6156ea1d-e810-49f2-8644-a496a60b93d4" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215748Z:6156ea1d-e810-49f2-8644-a496a60b93d4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:57:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799808" + ], + "x-ms-request-id": [ + "9a38b521-3db2-4b32-922e-b1519ee1014f" + ], + "x-ms-correlation-request-id": [ + "9a38b521-3db2-4b32-922e-b1519ee1014f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215751Z:9a38b521-3db2-4b32-922e-b1519ee1014f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:57:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799806" + ], + "x-ms-request-id": [ + "c966a3db-ccd8-4338-88ff-0b79fe3f9264" + ], + "x-ms-correlation-request-id": [ + "c966a3db-ccd8-4338-88ff-0b79fe3f9264" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215755Z:c966a3db-ccd8-4338-88ff-0b79fe3f9264" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:57:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799804" + ], + "x-ms-request-id": [ + "27db57ed-5dd9-4c18-b3cc-18bdd07bbaf1" + ], + "x-ms-correlation-request-id": [ + "27db57ed-5dd9-4c18-b3cc-18bdd07bbaf1" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215758Z:27db57ed-5dd9-4c18-b3cc-18bdd07bbaf1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:57:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799802" + ], + "x-ms-request-id": [ + "cbd5a78b-bc58-4179-84c8-dc4159f663b0" + ], + "x-ms-correlation-request-id": [ + "cbd5a78b-bc58-4179-84c8-dc4159f663b0" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215801Z:cbd5a78b-bc58-4179-84c8-dc4159f663b0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799800" + ], + "x-ms-request-id": [ + "fac782b0-f6bd-4d7d-8118-ea971ee0d6c4" + ], + "x-ms-correlation-request-id": [ + "fac782b0-f6bd-4d7d-8118-ea971ee0d6c4" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215804Z:fac782b0-f6bd-4d7d-8118-ea971ee0d6c4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799798" + ], + "x-ms-request-id": [ + "1a3cf8b4-a281-4365-aed0-daab490a93b3" + ], + "x-ms-correlation-request-id": [ + "1a3cf8b4-a281-4365-aed0-daab490a93b3" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215807Z:1a3cf8b4-a281-4365-aed0-daab490a93b3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799796" + ], + "x-ms-request-id": [ + "68eff1ba-ab0f-499a-bef5-100a5930cef2" + ], + "x-ms-correlation-request-id": [ + "68eff1ba-ab0f-499a-bef5-100a5930cef2" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215810Z:68eff1ba-ab0f-499a-bef5-100a5930cef2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799794" + ], + "x-ms-request-id": [ + "5b662682-b4f2-4a7f-9f02-1e31144303c1" + ], + "x-ms-correlation-request-id": [ + "5b662682-b4f2-4a7f-9f02-1e31144303c1" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215813Z:5b662682-b4f2-4a7f-9f02-1e31144303c1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:12 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799792" + ], + "x-ms-request-id": [ + "03c00452-7580-4144-880f-499609a5fe4b" + ], + "x-ms-correlation-request-id": [ + "03c00452-7580-4144-880f-499609a5fe4b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215816Z:03c00452-7580-4144-880f-499609a5fe4b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:16 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799790" + ], + "x-ms-request-id": [ + "ae3ab2ca-efc2-4dee-bc8e-2fce8591a95a" + ], + "x-ms-correlation-request-id": [ + "ae3ab2ca-efc2-4dee-bc8e-2fce8591a95a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215819Z:ae3ab2ca-efc2-4dee-bc8e-2fce8591a95a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799788" + ], + "x-ms-request-id": [ + "fe6a7bc0-88c1-4854-8030-91a492daf847" + ], + "x-ms-correlation-request-id": [ + "fe6a7bc0-88c1-4854-8030-91a492daf847" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215822Z:fe6a7bc0-88c1-4854-8030-91a492daf847" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799786" + ], + "x-ms-request-id": [ + "07441f8c-b1e2-4b6e-b097-9cb98f6e811a" + ], + "x-ms-correlation-request-id": [ + "07441f8c-b1e2-4b6e-b097-9cb98f6e811a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215825Z:07441f8c-b1e2-4b6e-b097-9cb98f6e811a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:25 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799784" + ], + "x-ms-request-id": [ + "17b64169-5853-4c72-8739-c8a7043c2762" + ], + "x-ms-correlation-request-id": [ + "17b64169-5853-4c72-8739-c8a7043c2762" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215828Z:17b64169-5853-4c72-8739-c8a7043c2762" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799782" + ], + "x-ms-request-id": [ + "b9d38cda-5e65-41bc-ad09-527b7405c433" + ], + "x-ms-correlation-request-id": [ + "b9d38cda-5e65-41bc-ad09-527b7405c433" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215831Z:b9d38cda-5e65-41bc-ad09-527b7405c433" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:31 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799780" + ], + "x-ms-request-id": [ + "c4a21320-2d53-4aea-b07b-99668898234c" + ], + "x-ms-correlation-request-id": [ + "c4a21320-2d53-4aea-b07b-99668898234c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215834Z:c4a21320-2d53-4aea-b07b-99668898234c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:34 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799778" + ], + "x-ms-request-id": [ + "6ff879b7-34f2-4331-a377-86a9a4be3028" + ], + "x-ms-correlation-request-id": [ + "6ff879b7-34f2-4331-a377-86a9a4be3028" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215838Z:6ff879b7-34f2-4331-a377-86a9a4be3028" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:37 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799776" + ], + "x-ms-request-id": [ + "2204ffba-a205-4e95-b19a-bccc3ae1f57f" + ], + "x-ms-correlation-request-id": [ + "2204ffba-a205-4e95-b19a-bccc3ae1f57f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215841Z:2204ffba-a205-4e95-b19a-bccc3ae1f57f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799774" + ], + "x-ms-request-id": [ + "4173a3f5-2a7d-49b9-b657-fb0a00281786" + ], + "x-ms-correlation-request-id": [ + "4173a3f5-2a7d-49b9-b657-fb0a00281786" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215844Z:4173a3f5-2a7d-49b9-b657-fb0a00281786" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799772" + ], + "x-ms-request-id": [ + "fe59ff1c-c649-4422-ae44-541d44b96783" + ], + "x-ms-correlation-request-id": [ + "fe59ff1c-c649-4422-ae44-541d44b96783" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215847Z:fe59ff1c-c649-4422-ae44-541d44b96783" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:47 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799770" + ], + "x-ms-request-id": [ + "68bd7260-6f78-4fd0-9a9f-7bfcff288f95" + ], + "x-ms-correlation-request-id": [ + "68bd7260-6f78-4fd0-9a9f-7bfcff288f95" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215850Z:68bd7260-6f78-4fd0-9a9f-7bfcff288f95" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799768" + ], + "x-ms-request-id": [ + "663dd6cd-67df-48e8-a115-13828e357b6e" + ], + "x-ms-correlation-request-id": [ + "663dd6cd-67df-48e8-a115-13828e357b6e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215854Z:663dd6cd-67df-48e8-a115-13828e357b6e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799766" + ], + "x-ms-request-id": [ + "9379d2a1-fd7d-4303-a975-6c92f19d4c63" + ], + "x-ms-correlation-request-id": [ + "9379d2a1-fd7d-4303-a975-6c92f19d4c63" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215857Z:9379d2a1-fd7d-4303-a975-6c92f19d4c63" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:58:56 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799764" + ], + "x-ms-request-id": [ + "bb39f503-8e84-4c78-ab85-706696accffa" + ], + "x-ms-correlation-request-id": [ + "bb39f503-8e84-4c78-ab85-706696accffa" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215900Z:bb39f503-8e84-4c78-ab85-706696accffa" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799762" + ], + "x-ms-request-id": [ + "84cd79ab-33d4-4907-ba75-83b6b1d7190d" + ], + "x-ms-correlation-request-id": [ + "84cd79ab-33d4-4907-ba75-83b6b1d7190d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215903Z:84cd79ab-33d4-4907-ba75-83b6b1d7190d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799760" + ], + "x-ms-request-id": [ + "65efe098-4acd-4ea4-93d4-7362b5af8669" + ], + "x-ms-correlation-request-id": [ + "65efe098-4acd-4ea4-93d4-7362b5af8669" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215906Z:65efe098-4acd-4ea4-93d4-7362b5af8669" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799758" + ], + "x-ms-request-id": [ + "34cf7331-41eb-4198-adfb-8d1e88ee5773" + ], + "x-ms-correlation-request-id": [ + "34cf7331-41eb-4198-adfb-8d1e88ee5773" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215910Z:34cf7331-41eb-4198-adfb-8d1e88ee5773" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:09 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799756" + ], + "x-ms-request-id": [ + "67d2b25b-1dff-4004-a530-ff9ccb656e0e" + ], + "x-ms-correlation-request-id": [ + "67d2b25b-1dff-4004-a530-ff9ccb656e0e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215913Z:67d2b25b-1dff-4004-a530-ff9ccb656e0e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:12 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799754" + ], + "x-ms-request-id": [ + "fedf001e-54b3-4263-a61a-fe986e00a26e" + ], + "x-ms-correlation-request-id": [ + "fedf001e-54b3-4263-a61a-fe986e00a26e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215916Z:fedf001e-54b3-4263-a61a-fe986e00a26e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:16 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799752" + ], + "x-ms-request-id": [ + "d72c4d64-403a-447b-a7bf-415a67ec0c45" + ], + "x-ms-correlation-request-id": [ + "d72c4d64-403a-447b-a7bf-415a67ec0c45" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215919Z:d72c4d64-403a-447b-a7bf-415a67ec0c45" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799750" + ], + "x-ms-request-id": [ + "65c85c3d-2823-4021-815c-227396f47343" + ], + "x-ms-correlation-request-id": [ + "65c85c3d-2823-4021-815c-227396f47343" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215922Z:65c85c3d-2823-4021-815c-227396f47343" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:21 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799748" + ], + "x-ms-request-id": [ + "1e067c9f-85a4-41b2-ba17-d5da11d330e1" + ], + "x-ms-correlation-request-id": [ + "1e067c9f-85a4-41b2-ba17-d5da11d330e1" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215926Z:1e067c9f-85a4-41b2-ba17-d5da11d330e1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:25 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799746" + ], + "x-ms-request-id": [ + "439d31d2-f531-48ee-9f9c-0f11af6ccf81" + ], + "x-ms-correlation-request-id": [ + "439d31d2-f531-48ee-9f9c-0f11af6ccf81" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215929Z:439d31d2-f531-48ee-9f9c-0f11af6ccf81" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:29 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799744" + ], + "x-ms-request-id": [ + "66545d45-b5b0-43b8-a35c-96fe1c5dd506" + ], + "x-ms-correlation-request-id": [ + "66545d45-b5b0-43b8-a35c-96fe1c5dd506" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215933Z:66545d45-b5b0-43b8-a35c-96fe1c5dd506" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:32 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:57:31.7404785Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799742" + ], + "x-ms-request-id": [ + "79f4385a-fbbd-460d-8114-224572b152c0" + ], + "x-ms-correlation-request-id": [ + "79f4385a-fbbd-460d-8114-224572b152c0" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215936Z:79f4385a-fbbd-460d-8114-224572b152c0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db801\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server801\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:59:36.3258858Z\",\r\n \"correlationId\": \"c47d2bb7-d0a5-4bf1-ba2e-69dafe330b7e\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1626" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799740" + ], + "x-ms-request-id": [ + "7278c667-f7c1-4087-9694-e9c4382a2988" + ], + "x-ms-correlation-request-id": [ + "7278c667-f7c1-4087-9694-e9c4382a2988" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215940Z:7278c667-f7c1-4087-9694-e9c4382a2988" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801\",\r\n \"name\": \"sql-audit-cmdlet-server801\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databases/sql-audit-cmdlet-db801\",\r\n \"name\": \"sql-audit-cmdlet-server801/sql-audit-cmdlet-db801\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "577" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799739" + ], + "x-ms-request-id": [ + "27371ba3-e45a-4f6d-b3c8-a1ad75dfdf5c" + ], + "x-ms-correlation-request-id": [ + "27371ba3-e45a-4f6d-b3c8-a1ad75dfdf5c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215942Z:27371ba3-e45a-4f6d-b3c8-a1ad75dfdf5c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westeurope:dd858ff6-49ac-46af-b633-dbbb6338a9fd" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799815" + ], + "x-ms-correlation-request-id": [ + "e00cd350-c6f4-46e8-8349-24276e86f520" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215943Z:e00cd350-c6f4-46e8-8349-24276e86f520" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyODAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "d566c15b-3d9e-4cd6-b8dd-e6e0c5b447f7-2014-10-31 21:59:44Z" + ], + "x-ms-client-request-id": [ + "edcf618a-6802-48a2-8357-5598f7a6e049-2014-10-31 21:59:44Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets801\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets801.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server801;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server801;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server801.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server801\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server801.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server801;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server801.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2929" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "56709a6b-375e-489a-88d2-f3f7cbeaed63" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799647" + ], + "x-ms-correlation-request-id": [ + "44539928-1576-4822-b05d-ab75329f46cf" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215946Z:44539928-1576-4822-b05d-ab75329f46cf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:46 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyODAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "d566c15b-3d9e-4cd6-b8dd-e6e0c5b447f7-2014-10-31 21:59:44Z" + ], + "x-ms-client-request-id": [ + "e65eac70-09ca-447b-bbe1-9a21ec8ad9be-2014-10-31 21:59:52Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets801\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets801.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server801;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server801;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server801.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server801\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server801.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server801;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server801.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2924" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "e5f0973a-d64d-4693-8ed5-43790866138a" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799646" + ], + "x-ms-correlation-request-id": [ + "ae5cf1ea-11ab-4b92-af1b-26a88f364e3e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215953Z:ae5cf1ea-11ab-4b92-af1b-26a88f364e3e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:53 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyODAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "d566c15b-3d9e-4cd6-b8dd-e6e0c5b447f7-2014-10-31 21:59:44Z" + ], + "x-ms-client-request-id": [ + "fa3f321c-524b-4417-b21c-c7cb5fa77532-2014-10-31 21:59:54Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets801\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets801.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server801;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server801;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server801.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server801\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server801.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server801;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server801.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2924" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "89c4da87-f094-42be-8779-7aee7a1d9799" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799645" + ], + "x-ms-correlation-request-id": [ + "2fbaa511-77af-40f9-b239-95eea199eaa8" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215954Z:2fbaa511-77af-40f9-b239-95eea199eaa8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:54 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyODAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "d566c15b-3d9e-4cd6-b8dd-e6e0c5b447f7-2014-10-31 21:59:44Z" + ], + "x-ms-client-request-id": [ + "e538b82a-f76d-4577-856e-aa19ced6a894-2014-10-31 21:59:59Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets801\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets801.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server801;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server801;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server801.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server801\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server801.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server801;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server801.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2924" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "81a72fea-1449-4449-a9a5-de675f086263" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799644" + ], + "x-ms-correlation-request-id": [ + "8ae5e8e3-6f9e-452d-bf93-cb0ff14c3368" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220000Z:8ae5e8e3-6f9e-452d-bf93-cb0ff14c3368" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:59 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyODAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "d566c15b-3d9e-4cd6-b8dd-e6e0c5b447f7-2014-10-31 21:59:44Z" + ], + "x-ms-client-request-id": [ + "06c86730-1a3c-4f21-8c63-1b10180b7c57-2014-10-31 22:00:01Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets801\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets801.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server801;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server801;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server801.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server801\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server801.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server801;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server801.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2924" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "68a81880-21fd-4985-9100-6b2d9372ca10" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799669" + ], + "x-ms-correlation-request-id": [ + "eea65403-64e1-46e6-aad9-0d09c9f6c69b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220001Z:eea65403-64e1-46e6-aad9-0d09c9f6c69b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:00:01 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyODAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "d566c15b-3d9e-4cd6-b8dd-e6e0c5b447f7-2014-10-31 21:59:44Z" + ], + "x-ms-client-request-id": [ + "98dd73d3-516e-4a24-9015-ddbab1e53906-2014-10-31 22:00:06Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets801\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets801.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server801;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server801;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server801.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server801\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server801.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server801;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server801.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2929" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "26259dfe-c436-4a6a-9dbd-12d55024a97f" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799668" + ], + "x-ms-correlation-request-id": [ + "293c985f-b3a6-4edc-b0f5-2436e62c3c62" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220006Z:293c985f-b3a6-4edc-b0f5-2436e62c3c62" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:00:06 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyODAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "d566c15b-3d9e-4cd6-b8dd-e6e0c5b447f7-2014-10-31 21:59:44Z" + ], + "x-ms-client-request-id": [ + "eda53bd4-dff7-407b-9a2b-07613b4d6261-2014-10-31 22:00:08Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets801\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets801.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server801;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server801;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server801.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server801\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server801.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server801;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server801.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2929" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "bc35c80e-fa2c-47aa-bb19-9e66d9de6b47" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799667" + ], + "x-ms-correlation-request-id": [ + "82e1107c-c7a8-4f25-b479-8abfbff9bc93" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220008Z:82e1107c-c7a8-4f25-b479-8abfbff9bc93" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:00:07 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyODAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "d566c15b-3d9e-4cd6-b8dd-e6e0c5b447f7-2014-10-31 21:59:44Z" + ], + "x-ms-client-request-id": [ + "316693b0-301f-4506-b887-e31139bd6c68-2014-10-31 22:00:12Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets801\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets801.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server801;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server801;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server801.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server801\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server801.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server801;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server801.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2929" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "60366177-d534-431e-b29a-2f3507f10c07" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799666" + ], + "x-ms-correlation-request-id": [ + "a13f8147-c5a8-414c-b2c2-3d23995919d9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220012Z:a13f8147-c5a8-414c-b2c2-3d23995919d9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:00:12 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyODAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "d566c15b-3d9e-4cd6-b8dd-e6e0c5b447f7-2014-10-31 21:59:44Z" + ], + "x-ms-client-request-id": [ + "2bf11a6c-2bd0-4588-82a1-9444bace17c9-2014-10-31 22:00:14Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets801\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets801.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server801;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server801;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server801.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server801\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server801.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server801;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server801.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2929" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "c12a459d-f24f-4af5-afaa-2b450ba74b6a" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799665" + ], + "x-ms-correlation-request-id": [ + "78d9fe34-8e00-4367-b1d4-3b0654e7172c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220014Z:78d9fe34-8e00-4367-b1d4-3b0654e7172c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:00:14 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyODAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "d566c15b-3d9e-4cd6-b8dd-e6e0c5b447f7-2014-10-31 21:59:44Z" + ], + "x-ms-client-request-id": [ + "04262aa6-b035-478b-ab09-b44817e49908-2014-10-31 22:00:15Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets801\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets801.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server801;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server801;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server801.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server801\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server801.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server801;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server801.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2929" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "664bc5f8-87b0-43bb-80a2-75676f9a2e65" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799664" + ], + "x-ms-correlation-request-id": [ + "33c6354c-6cf0-4d61-86bf-48629781e7fe" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220016Z:33c6354c-6cf0-4d61-86bf-48629781e7fe" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:00:15 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyODAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "d566c15b-3d9e-4cd6-b8dd-e6e0c5b447f7-2014-10-31 21:59:44Z" + ], + "x-ms-client-request-id": [ + "79a1ef47-9911-4d5e-ab1b-2d58b7da40fb-2014-10-31 22:00:17Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets801\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets801.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server801;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server801;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server801.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server801\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server801.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server801;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server801.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2929" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "2352b850-f89a-4624-9ec5-2f6db3b3c286" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799663" + ], + "x-ms-correlation-request-id": [ + "3d7eb766-bf7b-41e5-ae6a-43e60294ad0e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220017Z:3d7eb766-bf7b-41e5-ae6a-43e60294ad0e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:00:17 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyODAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "d566c15b-3d9e-4cd6-b8dd-e6e0c5b447f7-2014-10-31 21:59:44Z" + ], + "x-ms-client-request-id": [ + "c2baa6ce-062c-4d6f-b479-bc3e3f8a4545-2014-10-31 22:00:18Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets801\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets801.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server801;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server801;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server801.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server801\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server801.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server801.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server801;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server801.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2929" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "1478ff85-28a4-4b74-83cc-f6e196fdc084" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799662" + ], + "x-ms-correlation-request-id": [ + "ab66e4e9-0d68-40a6-82b6-83ce57bd6c62" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220019Z:ab66e4e9-0d68-40a6-82b6-83ce57bd6c62" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:00:18 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets801/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzODAxL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "d566c15b-3d9e-4cd6-b8dd-e6e0c5b447f7-2014-10-31 21:59:44Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"0hEmfh/SEeFrCZmzyZ9jH7FbXX0wvz8ywNpjSl320OA1na1h+faCaTQRFi604Em7puUYPfF3RlCI2z35YNYJDA==\",\r\n \"secondaryKey\": \"YrK63Y6BHna7NT3zS68eZPaESRyLZBLpIZpaxCg66gILQO+/2oGRiFR/PZT2btRkGcOunvLFRRTKRCcNK2eOdg==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:f0af2fbe-6ef4-446f-8ee2-974b8cd145db" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11959" + ], + "x-ms-correlation-request-id": [ + "5520ed70-ee90-4b46-87c1-9f479a96d736" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215947Z:5520ed70-ee90-4b46-87c1-9f479a96d736" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:47 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets801/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzODAxL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "d566c15b-3d9e-4cd6-b8dd-e6e0c5b447f7-2014-10-31 21:59:44Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"0hEmfh/SEeFrCZmzyZ9jH7FbXX0wvz8ywNpjSl320OA1na1h+faCaTQRFi604Em7puUYPfF3RlCI2z35YNYJDA==\",\r\n \"secondaryKey\": \"YrK63Y6BHna7NT3zS68eZPaESRyLZBLpIZpaxCg66gILQO+/2oGRiFR/PZT2btRkGcOunvLFRRTKRCcNK2eOdg==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:f6e10ecf-472d-44c9-8ec1-a9748b32ce17" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11957" + ], + "x-ms-correlation-request-id": [ + "5e61cdde-c88d-4a10-96a4-4bf1f760b9e2" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215955Z:5e61cdde-c88d-4a10-96a4-4bf1f760b9e2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets801/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzODAxL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "d566c15b-3d9e-4cd6-b8dd-e6e0c5b447f7-2014-10-31 21:59:44Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"0hEmfh/SEeFrCZmzyZ9jH7FbXX0wvz8ywNpjSl320OA1na1h+faCaTQRFi604Em7puUYPfF3RlCI2z35YNYJDA==\",\r\n \"secondaryKey\": \"YrK63Y6BHna7NT3zS68eZPaESRyLZBLpIZpaxCg66gILQO+/2oGRiFR/PZT2btRkGcOunvLFRRTKRCcNK2eOdg==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:4dd49001-0f90-481e-bf97-ec841e9295ad" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11956" + ], + "x-ms-correlation-request-id": [ + "bd9e2890-f197-437b-b8a2-8fe776e27082" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220002Z:bd9e2890-f197-437b-b8a2-8fe776e27082" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:00:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets801/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzODAxL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "d566c15b-3d9e-4cd6-b8dd-e6e0c5b447f7-2014-10-31 21:59:44Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"0hEmfh/SEeFrCZmzyZ9jH7FbXX0wvz8ywNpjSl320OA1na1h+faCaTQRFi604Em7puUYPfF3RlCI2z35YNYJDA==\",\r\n \"secondaryKey\": \"YrK63Y6BHna7NT3zS68eZPaESRyLZBLpIZpaxCg66gILQO+/2oGRiFR/PZT2btRkGcOunvLFRRTKRCcNK2eOdg==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:2dc6b0d2-1ff4-42f8-b232-823a4f15a74c" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11954" + ], + "x-ms-correlation-request-id": [ + "239eec3c-3184-472f-8819-a5068e401b3d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220009Z:239eec3c-3184-472f-8819-a5068e401b3d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:00:09 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyODAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets801\",\r\n \"storageAccountKey\": \"0hEmfh/SEeFrCZmzyZ9jH7FbXX0wvz8ywNpjSl320OA1na1h+faCaTQRFi604Em7puUYPfF3RlCI2z35YNYJDA==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets801.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "784" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "d566c15b-3d9e-4cd6-b8dd-e6e0c5b447f7-2014-10-31 21:59:44Z" + ], + "x-ms-client-request-id": [ + "edcf618a-6802-48a2-8357-5598f7a6e049-2014-10-31 21:59:44Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets801\",\r\n \"storageAccountKey\": \"0hEmfh/SEeFrCZmzyZ9jH7FbXX0wvz8ywNpjSl320OA1na1h+faCaTQRFi604Em7puUYPfF3RlCI2z35YNYJDA==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets801.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1183" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "5d49d085-426c-4564-9d0d-ec032579d44e" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11958" + ], + "x-ms-correlation-request-id": [ + "1d1d2350-5d29-4379-b274-f564c1af4621" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215951Z:1d1d2350-5d29-4379-b274-f564c1af4621" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:50 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyODAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets801\",\r\n \"storageAccountKey\": \"0hEmfh/SEeFrCZmzyZ9jH7FbXX0wvz8ywNpjSl320OA1na1h+faCaTQRFi604Em7puUYPfF3RlCI2z35YNYJDA==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets801.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "784" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "d566c15b-3d9e-4cd6-b8dd-e6e0c5b447f7-2014-10-31 21:59:44Z" + ], + "x-ms-client-request-id": [ + "fa3f321c-524b-4417-b21c-c7cb5fa77532-2014-10-31 21:59:54Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets801\",\r\n \"storageAccountKey\": \"0hEmfh/SEeFrCZmzyZ9jH7FbXX0wvz8ywNpjSl320OA1na1h+faCaTQRFi604Em7puUYPfF3RlCI2z35YNYJDA==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets801.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1183" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "32075f5f-9f94-4ed5-bacd-2373341af048" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11956" + ], + "x-ms-correlation-request-id": [ + "baf5e7c8-2452-4911-926e-fa99f2aa2236" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T215958Z:baf5e7c8-2452-4911-926e-fa99f2aa2236" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:59:58 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyODAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets801\",\r\n \"storageAccountKey\": \"0hEmfh/SEeFrCZmzyZ9jH7FbXX0wvz8ywNpjSl320OA1na1h+faCaTQRFi604Em7puUYPfF3RlCI2z35YNYJDA==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets801.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "789" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "d566c15b-3d9e-4cd6-b8dd-e6e0c5b447f7-2014-10-31 21:59:44Z" + ], + "x-ms-client-request-id": [ + "06c86730-1a3c-4f21-8c63-1b10180b7c57-2014-10-31 22:00:01Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets801\",\r\n \"storageAccountKey\": \"0hEmfh/SEeFrCZmzyZ9jH7FbXX0wvz8ywNpjSl320OA1na1h+faCaTQRFi604Em7puUYPfF3RlCI2z35YNYJDA==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets801.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1188" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "56a68116-928b-4618-9d01-1e6b0c38d8e2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11955" + ], + "x-ms-correlation-request-id": [ + "adaf6147-dac2-420d-a674-0b1424726e16" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220004Z:adaf6147-dac2-420d-a674-0b1424726e16" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:00:04 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzgwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyODAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets801\",\r\n \"storageAccountKey\": \"0hEmfh/SEeFrCZmzyZ9jH7FbXX0wvz8ywNpjSl320OA1na1h+faCaTQRFi604Em7puUYPfF3RlCI2z35YNYJDA==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets801.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "789" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "d566c15b-3d9e-4cd6-b8dd-e6e0c5b447f7-2014-10-31 21:59:44Z" + ], + "x-ms-client-request-id": [ + "eda53bd4-dff7-407b-9a2b-07613b4d6261-2014-10-31 22:00:08Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets801\",\r\n \"storageAccountKey\": \"0hEmfh/SEeFrCZmzyZ9jH7FbXX0wvz8ywNpjSl320OA1na1h+faCaTQRFi604Em7puUYPfF3RlCI2z35YNYJDA==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets801.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg801/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server801/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1188" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "255d2149-ffe5-4616-83fb-00fc47fa0028" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11953" + ], + "x-ms-correlation-request-id": [ + "a51e7310-e816-4786-a174-4066df76c1dd" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T220011Z:a51e7310-e816-4786-a174-4066df76c1dd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:00:11 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices/auditcmdlets801", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXMvYXVkaXRjbWRsZXRzODAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "a19c0f7a35572d4d9598aab574872290" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:00:24 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/a19c0f7a35572d4d9598aab574872290", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zL2ExOWMwZjdhMzU1NzJkNGQ5NTk4YWFiNTc0ODcyMjkw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/2.0.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "\r\n a19c0f7a-3557-2d4d-9598-aab574872290\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "d6dcc4083df82d81b73bc6c672d90f39" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 22:00:26 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "cca24ec8-99b5-4aa7-9ff6-486e886f304c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestServerUpdatePolicyWithEventTypes.json b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestServerUpdatePolicyWithEventTypes.json new file mode 100644 index 000000000000..fdf15ea5f229 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestServerUpdatePolicyWithEventTypes.json @@ -0,0 +1,3455 @@ +{ + "Entries": [ + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXM=", + "RequestMethod": "POST", + "RequestBody": "\r\n auditcmdlets601\r\n \r\n \r\n West US\r\n \r\n Standard_GRS\r\n", + "RequestHeaders": { + "Content-Type": [ + "application/xml" + ], + "Content-Length": [ + "379" + ], + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "131" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "1d8748ae29692781a453c65f92c21e3f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:01:45 GMT" + ], + "Location": [ + "https://management.core.windows.net/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/storage/auditcmdlets601" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/1d8748ae29692781a453c65f92c21e3f", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zLzFkODc0OGFlMjk2OTI3ODFhNDUzYzY1ZjkyYzIxZTNm", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "131" + ] + }, + "ResponseBody": "\r\n 1d8748ae-2969-2781-a453-c65f92c21e3f\r\n InProgress\r\n", + "ResponseHeaders": { + "Content-Length": [ + "197" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "8d96f62fe30f27778dad622e20dde283" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:01:46 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/1d8748ae29692781a453c65f92c21e3f", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zLzFkODc0OGFlMjk2OTI3ODFhNDUzYzY1ZjkyYzIxZTNm", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "131" + ] + }, + "ResponseBody": "\r\n 1d8748ae-2969-2781-a453-c65f92c21e3f\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "04cacce9b68f2f16826f7f498e0bc129" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:02:15 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "119" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799996" + ], + "x-ms-request-id": [ + "ba008e86-4688-40d7-a68f-122e310cf726" + ], + "x-ms-correlation-request-id": [ + "ba008e86-4688-40d7-a68f-122e310cf726" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210217Z:ba008e86-4688-40d7-a68f-122e310cf726" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:02:17 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601\",\r\n \"name\": \"sql-audit-cmdlet-test-rg601\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "217" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11997" + ], + "x-ms-request-id": [ + "559f2b32-1796-4fe7-9045-14f1fcf0bd0e" + ], + "x-ms-correlation-request-id": [ + "559f2b32-1796-4fe7-9045-14f1fcf0bd0e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210219Z:559f2b32-1796-4fe7-9045-14f1fcf0bd0e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:02:19 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup/validate?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvdmFsaWRhdGU/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db601\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server601\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db601\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server601\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:02:20.5869052Z\",\r\n \"correlationId\": \"b448858d-167a-461d-8ce7-1e8c4be71460\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databases/sql-audit-cmdlet-db601\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601/sql-audit-cmdlet-db601\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11996" + ], + "x-ms-request-id": [ + "b448858d-167a-461d-8ce7-1e8c4be71460" + ], + "x-ms-correlation-request-id": [ + "b448858d-167a-461d-8ce7-1e8c4be71460" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210220Z:b448858d-167a-461d-8ce7-1e8c4be71460" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:02:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db601\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server601\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db601\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server601\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:02:22.3148839Z\",\r\n \"correlationId\": \"4563a997-e673-4e07-aea2-af12819ad528\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databases/sql-audit-cmdlet-db601\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601/sql-audit-cmdlet-db601\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11995" + ], + "x-ms-request-id": [ + "4563a997-e673-4e07-aea2-af12819ad528" + ], + "x-ms-correlation-request-id": [ + "4563a997-e673-4e07-aea2-af12819ad528" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210222Z:4563a997-e673-4e07-aea2-af12819ad528" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:02:22 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799995" + ], + "x-ms-request-id": [ + "12d51005-34c0-40de-ae60-e07a97ba1c1e" + ], + "x-ms-correlation-request-id": [ + "12d51005-34c0-40de-ae60-e07a97ba1c1e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210223Z:12d51005-34c0-40de-ae60-e07a97ba1c1e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:02:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799993" + ], + "x-ms-request-id": [ + "752b5fcf-ac3d-4c4a-8345-7642a6d00a84" + ], + "x-ms-correlation-request-id": [ + "752b5fcf-ac3d-4c4a-8345-7642a6d00a84" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210226Z:752b5fcf-ac3d-4c4a-8345-7642a6d00a84" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:02:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799991" + ], + "x-ms-request-id": [ + "e0fc1fe3-3ee6-46f2-840c-310cebaa632c" + ], + "x-ms-correlation-request-id": [ + "e0fc1fe3-3ee6-46f2-840c-310cebaa632c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210229Z:e0fc1fe3-3ee6-46f2-840c-310cebaa632c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:02:29 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799989" + ], + "x-ms-request-id": [ + "415a8b39-58b1-4129-853d-9d142f0498a8" + ], + "x-ms-correlation-request-id": [ + "415a8b39-58b1-4129-853d-9d142f0498a8" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210232Z:415a8b39-58b1-4129-853d-9d142f0498a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:02:32 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799987" + ], + "x-ms-request-id": [ + "da86a75b-9723-4102-b8e7-da53be4ff716" + ], + "x-ms-correlation-request-id": [ + "da86a75b-9723-4102-b8e7-da53be4ff716" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210235Z:da86a75b-9723-4102-b8e7-da53be4ff716" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:02:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799985" + ], + "x-ms-request-id": [ + "b5c6d27e-d87d-4956-ac41-a426174a84e1" + ], + "x-ms-correlation-request-id": [ + "b5c6d27e-d87d-4956-ac41-a426174a84e1" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210239Z:b5c6d27e-d87d-4956-ac41-a426174a84e1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:02:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799983" + ], + "x-ms-request-id": [ + "4595d510-0f83-4163-baa0-b8fa6958a697" + ], + "x-ms-correlation-request-id": [ + "4595d510-0f83-4163-baa0-b8fa6958a697" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210242Z:4595d510-0f83-4163-baa0-b8fa6958a697" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:02:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799981" + ], + "x-ms-request-id": [ + "2da82648-5a5e-44f7-bf44-adfaf522a708" + ], + "x-ms-correlation-request-id": [ + "2da82648-5a5e-44f7-bf44-adfaf522a708" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210245Z:2da82648-5a5e-44f7-bf44-adfaf522a708" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:02:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799979" + ], + "x-ms-request-id": [ + "61740902-9cbd-42f5-8ccf-ea32361ec3f2" + ], + "x-ms-correlation-request-id": [ + "61740902-9cbd-42f5-8ccf-ea32361ec3f2" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210248Z:61740902-9cbd-42f5-8ccf-ea32361ec3f2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:02:47 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799977" + ], + "x-ms-request-id": [ + "9ca3101f-359d-4e3c-8c2c-850b35df8d11" + ], + "x-ms-correlation-request-id": [ + "9ca3101f-359d-4e3c-8c2c-850b35df8d11" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210251Z:9ca3101f-359d-4e3c-8c2c-850b35df8d11" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:02:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799975" + ], + "x-ms-request-id": [ + "d001b438-5bd2-44a5-a647-7f2a17d4be54" + ], + "x-ms-correlation-request-id": [ + "d001b438-5bd2-44a5-a647-7f2a17d4be54" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210254Z:d001b438-5bd2-44a5-a647-7f2a17d4be54" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:02:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799973" + ], + "x-ms-request-id": [ + "909c8bf6-3297-46f5-9c32-12897a906bc9" + ], + "x-ms-correlation-request-id": [ + "909c8bf6-3297-46f5-9c32-12897a906bc9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210257Z:909c8bf6-3297-46f5-9c32-12897a906bc9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:02:56 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799971" + ], + "x-ms-request-id": [ + "9247e44a-0af8-4533-b83c-e0b8279f2e61" + ], + "x-ms-correlation-request-id": [ + "9247e44a-0af8-4533-b83c-e0b8279f2e61" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210300Z:9247e44a-0af8-4533-b83c-e0b8279f2e61" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799969" + ], + "x-ms-request-id": [ + "353bc366-72b5-471e-a8f8-d26418839be7" + ], + "x-ms-correlation-request-id": [ + "353bc366-72b5-471e-a8f8-d26418839be7" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210303Z:353bc366-72b5-471e-a8f8-d26418839be7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799967" + ], + "x-ms-request-id": [ + "64e8b26c-7a22-4ece-b985-c258f1ca9a9b" + ], + "x-ms-correlation-request-id": [ + "64e8b26c-7a22-4ece-b985-c258f1ca9a9b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210306Z:64e8b26c-7a22-4ece-b985-c258f1ca9a9b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799965" + ], + "x-ms-request-id": [ + "28ed0aab-0417-4227-8903-7c84db17a8ac" + ], + "x-ms-correlation-request-id": [ + "28ed0aab-0417-4227-8903-7c84db17a8ac" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210309Z:28ed0aab-0417-4227-8903-7c84db17a8ac" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:09 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799963" + ], + "x-ms-request-id": [ + "baa5ed50-7ea5-479d-8745-a58518bbef2f" + ], + "x-ms-correlation-request-id": [ + "baa5ed50-7ea5-479d-8745-a58518bbef2f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210313Z:baa5ed50-7ea5-479d-8745-a58518bbef2f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:12 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799961" + ], + "x-ms-request-id": [ + "dff56262-29f2-491c-987e-25aa8e18e830" + ], + "x-ms-correlation-request-id": [ + "dff56262-29f2-491c-987e-25aa8e18e830" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210316Z:dff56262-29f2-491c-987e-25aa8e18e830" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:15 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799959" + ], + "x-ms-request-id": [ + "83b9da1c-6d64-452e-81a6-bba197fab362" + ], + "x-ms-correlation-request-id": [ + "83b9da1c-6d64-452e-81a6-bba197fab362" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210319Z:83b9da1c-6d64-452e-81a6-bba197fab362" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:18 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup/operations/CC441065B89B7261\",\r\n \"operationId\": \"CC441065B89B7261\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:03:20.2763965Z\",\r\n \"trackingId\": \"5fafceb6-fbf1-43ea-9bcb-4354e731d1a6\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799957" + ], + "x-ms-request-id": [ + "d843cca4-af31-4999-be9e-b189d4f1f92b" + ], + "x-ms-correlation-request-id": [ + "d843cca4-af31-4999-be9e-b189d4f1f92b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210322Z:d843cca4-af31-4999-be9e-b189d4f1f92b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup/operations/CC441065B89B7261\",\r\n \"operationId\": \"CC441065B89B7261\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:03:20.2763965Z\",\r\n \"trackingId\": \"5fafceb6-fbf1-43ea-9bcb-4354e731d1a6\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799955" + ], + "x-ms-request-id": [ + "6dcf4c4f-ce10-46fd-bcc5-ae70174a603b" + ], + "x-ms-correlation-request-id": [ + "6dcf4c4f-ce10-46fd-bcc5-ae70174a603b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210325Z:6dcf4c4f-ce10-46fd-bcc5-ae70174a603b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup/operations/575FAFDB90437210\",\r\n \"operationId\": \"575FAFDB90437210\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:03:26.9341016Z\",\r\n \"trackingId\": \"9c50f667-6e98-41b9-97c1-dfd93d388dd7\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databases/sql-audit-cmdlet-db601\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601/sql-audit-cmdlet-db601\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup/operations/CC441065B89B7261\",\r\n \"operationId\": \"CC441065B89B7261\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:03:20.2763965Z\",\r\n \"trackingId\": \"5fafceb6-fbf1-43ea-9bcb-4354e731d1a6\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799953" + ], + "x-ms-request-id": [ + "bbbd0d0a-ccc8-4aec-8c72-a2fdd43584d4" + ], + "x-ms-correlation-request-id": [ + "bbbd0d0a-ccc8-4aec-8c72-a2fdd43584d4" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210328Z:bbbd0d0a-ccc8-4aec-8c72-a2fdd43584d4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup/operations/575FAFDB90437210\",\r\n \"operationId\": \"575FAFDB90437210\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:03:26.9341016Z\",\r\n \"trackingId\": \"9c50f667-6e98-41b9-97c1-dfd93d388dd7\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databases/sql-audit-cmdlet-db601\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601/sql-audit-cmdlet-db601\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup/operations/CC441065B89B7261\",\r\n \"operationId\": \"CC441065B89B7261\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:03:20.2763965Z\",\r\n \"trackingId\": \"5fafceb6-fbf1-43ea-9bcb-4354e731d1a6\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799951" + ], + "x-ms-request-id": [ + "99899c35-5011-403a-a9d5-762a7853676d" + ], + "x-ms-correlation-request-id": [ + "99899c35-5011-403a-a9d5-762a7853676d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210331Z:99899c35-5011-403a-a9d5-762a7853676d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:31 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db601\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server601\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:02:22.3148839Z\",\r\n \"correlationId\": \"4563a997-e673-4e07-aea2-af12819ad528\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databases/sql-audit-cmdlet-db601\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601/sql-audit-cmdlet-db601\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799994" + ], + "x-ms-request-id": [ + "931d6285-a436-446a-9fa9-781734d735ac" + ], + "x-ms-correlation-request-id": [ + "931d6285-a436-446a-9fa9-781734d735ac" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210224Z:931d6285-a436-446a-9fa9-781734d735ac" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:02:23 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db601\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server601\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:02:24.7480237Z\",\r\n \"correlationId\": \"4563a997-e673-4e07-aea2-af12819ad528\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databases/sql-audit-cmdlet-db601\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601/sql-audit-cmdlet-db601\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799992" + ], + "x-ms-request-id": [ + "7e304669-3410-43fc-a931-9b3c57c4ff8e" + ], + "x-ms-correlation-request-id": [ + "7e304669-3410-43fc-a931-9b3c57c4ff8e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210227Z:7e304669-3410-43fc-a931-9b3c57c4ff8e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:02:26 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db601\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server601\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:02:24.7480237Z\",\r\n \"correlationId\": \"4563a997-e673-4e07-aea2-af12819ad528\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databases/sql-audit-cmdlet-db601\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601/sql-audit-cmdlet-db601\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799990" + ], + "x-ms-request-id": [ + "0248cdeb-dd4a-4311-8fe3-bfbf73ffddfb" + ], + "x-ms-correlation-request-id": [ + "0248cdeb-dd4a-4311-8fe3-bfbf73ffddfb" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210230Z:0248cdeb-dd4a-4311-8fe3-bfbf73ffddfb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:02:29 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db601\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server601\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:02:24.7480237Z\",\r\n \"correlationId\": \"4563a997-e673-4e07-aea2-af12819ad528\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databases/sql-audit-cmdlet-db601\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601/sql-audit-cmdlet-db601\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799988" + ], + "x-ms-request-id": [ + "caa5a9b8-c883-45c8-8137-dee85257ca44" + ], + "x-ms-correlation-request-id": [ + "caa5a9b8-c883-45c8-8137-dee85257ca44" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210233Z:caa5a9b8-c883-45c8-8137-dee85257ca44" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:02:32 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db601\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server601\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:02:24.7480237Z\",\r\n \"correlationId\": \"4563a997-e673-4e07-aea2-af12819ad528\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databases/sql-audit-cmdlet-db601\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601/sql-audit-cmdlet-db601\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799986" + ], + "x-ms-request-id": [ + "2a5b2230-e947-41e1-b74b-a41efa255416" + ], + "x-ms-correlation-request-id": [ + "2a5b2230-e947-41e1-b74b-a41efa255416" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210236Z:2a5b2230-e947-41e1-b74b-a41efa255416" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:02:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db601\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server601\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:02:24.7480237Z\",\r\n \"correlationId\": \"4563a997-e673-4e07-aea2-af12819ad528\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databases/sql-audit-cmdlet-db601\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601/sql-audit-cmdlet-db601\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799984" + ], + "x-ms-request-id": [ + "7720de78-565b-4613-a55b-7e8feb6c2d40" + ], + "x-ms-correlation-request-id": [ + "7720de78-565b-4613-a55b-7e8feb6c2d40" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210239Z:7720de78-565b-4613-a55b-7e8feb6c2d40" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:02:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db601\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server601\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:02:24.7480237Z\",\r\n \"correlationId\": \"4563a997-e673-4e07-aea2-af12819ad528\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databases/sql-audit-cmdlet-db601\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601/sql-audit-cmdlet-db601\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799982" + ], + "x-ms-request-id": [ + "dba75712-0ae4-4cc1-b206-50855f5b8716" + ], + "x-ms-correlation-request-id": [ + "dba75712-0ae4-4cc1-b206-50855f5b8716" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210242Z:dba75712-0ae4-4cc1-b206-50855f5b8716" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:02:42 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db601\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server601\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:02:24.7480237Z\",\r\n \"correlationId\": \"4563a997-e673-4e07-aea2-af12819ad528\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databases/sql-audit-cmdlet-db601\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601/sql-audit-cmdlet-db601\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799980" + ], + "x-ms-request-id": [ + "3175abed-a040-4095-9919-fd07a1b721e2" + ], + "x-ms-correlation-request-id": [ + "3175abed-a040-4095-9919-fd07a1b721e2" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210245Z:3175abed-a040-4095-9919-fd07a1b721e2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:02:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db601\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server601\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:02:24.7480237Z\",\r\n \"correlationId\": \"4563a997-e673-4e07-aea2-af12819ad528\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databases/sql-audit-cmdlet-db601\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601/sql-audit-cmdlet-db601\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799978" + ], + "x-ms-request-id": [ + "c947fcff-7fc3-4361-a27f-9b03c04be4bc" + ], + "x-ms-correlation-request-id": [ + "c947fcff-7fc3-4361-a27f-9b03c04be4bc" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210248Z:c947fcff-7fc3-4361-a27f-9b03c04be4bc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:02:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db601\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server601\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:02:24.7480237Z\",\r\n \"correlationId\": \"4563a997-e673-4e07-aea2-af12819ad528\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databases/sql-audit-cmdlet-db601\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601/sql-audit-cmdlet-db601\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799976" + ], + "x-ms-request-id": [ + "046acdfa-a28d-4a0a-98b5-30c80ac9ef7d" + ], + "x-ms-correlation-request-id": [ + "046acdfa-a28d-4a0a-98b5-30c80ac9ef7d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210252Z:046acdfa-a28d-4a0a-98b5-30c80ac9ef7d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:02:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db601\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server601\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:02:24.7480237Z\",\r\n \"correlationId\": \"4563a997-e673-4e07-aea2-af12819ad528\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databases/sql-audit-cmdlet-db601\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601/sql-audit-cmdlet-db601\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799974" + ], + "x-ms-request-id": [ + "75595dab-7f89-4989-860d-3cf4abe8d8fd" + ], + "x-ms-correlation-request-id": [ + "75595dab-7f89-4989-860d-3cf4abe8d8fd" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210255Z:75595dab-7f89-4989-860d-3cf4abe8d8fd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:02:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db601\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server601\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:02:24.7480237Z\",\r\n \"correlationId\": \"4563a997-e673-4e07-aea2-af12819ad528\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databases/sql-audit-cmdlet-db601\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601/sql-audit-cmdlet-db601\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799972" + ], + "x-ms-request-id": [ + "e32422ea-de57-4b60-9650-1c24d58a553e" + ], + "x-ms-correlation-request-id": [ + "e32422ea-de57-4b60-9650-1c24d58a553e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210258Z:e32422ea-de57-4b60-9650-1c24d58a553e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:02:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db601\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server601\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:02:24.7480237Z\",\r\n \"correlationId\": \"4563a997-e673-4e07-aea2-af12819ad528\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databases/sql-audit-cmdlet-db601\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601/sql-audit-cmdlet-db601\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799970" + ], + "x-ms-request-id": [ + "79498937-f6a2-4301-9f05-7c57eb87e6b0" + ], + "x-ms-correlation-request-id": [ + "79498937-f6a2-4301-9f05-7c57eb87e6b0" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210301Z:79498937-f6a2-4301-9f05-7c57eb87e6b0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db601\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server601\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:02:24.7480237Z\",\r\n \"correlationId\": \"4563a997-e673-4e07-aea2-af12819ad528\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databases/sql-audit-cmdlet-db601\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601/sql-audit-cmdlet-db601\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799968" + ], + "x-ms-request-id": [ + "ae34442e-3b66-4da5-bf20-a91453d44007" + ], + "x-ms-correlation-request-id": [ + "ae34442e-3b66-4da5-bf20-a91453d44007" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210304Z:ae34442e-3b66-4da5-bf20-a91453d44007" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:03 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db601\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server601\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:02:24.7480237Z\",\r\n \"correlationId\": \"4563a997-e673-4e07-aea2-af12819ad528\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databases/sql-audit-cmdlet-db601\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601/sql-audit-cmdlet-db601\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799966" + ], + "x-ms-request-id": [ + "9dc77547-5823-4180-9518-d54756553eb3" + ], + "x-ms-correlation-request-id": [ + "9dc77547-5823-4180-9518-d54756553eb3" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210307Z:9dc77547-5823-4180-9518-d54756553eb3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:06 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db601\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server601\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:02:24.7480237Z\",\r\n \"correlationId\": \"4563a997-e673-4e07-aea2-af12819ad528\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databases/sql-audit-cmdlet-db601\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601/sql-audit-cmdlet-db601\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799964" + ], + "x-ms-request-id": [ + "de937dd7-0d9b-4ef2-a905-14d70b412759" + ], + "x-ms-correlation-request-id": [ + "de937dd7-0d9b-4ef2-a905-14d70b412759" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210310Z:de937dd7-0d9b-4ef2-a905-14d70b412759" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db601\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server601\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:02:24.7480237Z\",\r\n \"correlationId\": \"4563a997-e673-4e07-aea2-af12819ad528\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databases/sql-audit-cmdlet-db601\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601/sql-audit-cmdlet-db601\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799962" + ], + "x-ms-request-id": [ + "24ce6314-eba0-4e21-be59-cb3377df7655" + ], + "x-ms-correlation-request-id": [ + "24ce6314-eba0-4e21-be59-cb3377df7655" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210313Z:24ce6314-eba0-4e21-be59-cb3377df7655" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:12 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db601\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server601\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:02:24.7480237Z\",\r\n \"correlationId\": \"4563a997-e673-4e07-aea2-af12819ad528\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databases/sql-audit-cmdlet-db601\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601/sql-audit-cmdlet-db601\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799960" + ], + "x-ms-request-id": [ + "a4cf9254-6fed-4d15-95af-78b2e7eea342" + ], + "x-ms-correlation-request-id": [ + "a4cf9254-6fed-4d15-95af-78b2e7eea342" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210316Z:a4cf9254-6fed-4d15-95af-78b2e7eea342" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:15 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db601\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server601\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:02:24.7480237Z\",\r\n \"correlationId\": \"4563a997-e673-4e07-aea2-af12819ad528\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databases/sql-audit-cmdlet-db601\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601/sql-audit-cmdlet-db601\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799958" + ], + "x-ms-request-id": [ + "b9d2f192-9161-4797-9758-4d8d2dd16c99" + ], + "x-ms-correlation-request-id": [ + "b9d2f192-9161-4797-9758-4d8d2dd16c99" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210319Z:b9d2f192-9161-4797-9758-4d8d2dd16c99" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db601\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server601\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:02:24.7480237Z\",\r\n \"correlationId\": \"4563a997-e673-4e07-aea2-af12819ad528\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databases/sql-audit-cmdlet-db601\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601/sql-audit-cmdlet-db601\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799956" + ], + "x-ms-request-id": [ + "3350fa7d-20fe-495f-89d0-ea2547c4813b" + ], + "x-ms-correlation-request-id": [ + "3350fa7d-20fe-495f-89d0-ea2547c4813b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210322Z:3350fa7d-20fe-495f-89d0-ea2547c4813b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db601\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server601\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:02:24.7480237Z\",\r\n \"correlationId\": \"4563a997-e673-4e07-aea2-af12819ad528\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databases/sql-audit-cmdlet-db601\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601/sql-audit-cmdlet-db601\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799954" + ], + "x-ms-request-id": [ + "a14fe1b6-9d2c-4ec9-be39-c7fbcb53ed78" + ], + "x-ms-correlation-request-id": [ + "a14fe1b6-9d2c-4ec9-be39-c7fbcb53ed78" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210325Z:a14fe1b6-9d2c-4ec9-be39-c7fbcb53ed78" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:25 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db601\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server601\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:02:24.7480237Z\",\r\n \"correlationId\": \"4563a997-e673-4e07-aea2-af12819ad528\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databases/sql-audit-cmdlet-db601\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601/sql-audit-cmdlet-db601\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799952" + ], + "x-ms-request-id": [ + "723e3aec-cb59-45ca-86bd-41eeaacc6310" + ], + "x-ms-correlation-request-id": [ + "723e3aec-cb59-45ca-86bd-41eeaacc6310" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210329Z:723e3aec-cb59-45ca-86bd-41eeaacc6310" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db601\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server601\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:03:31.1202814Z\",\r\n \"correlationId\": \"4563a997-e673-4e07-aea2-af12819ad528\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databases/sql-audit-cmdlet-db601\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server601/sql-audit-cmdlet-db601\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1626" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799950" + ], + "x-ms-request-id": [ + "f2014515-0dc4-4393-a38e-48c1c9e8e4dd" + ], + "x-ms-correlation-request-id": [ + "f2014515-0dc4-4393-a38e-48c1c9e8e4dd" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210332Z:f2014515-0dc4-4393-a38e-48c1c9e8e4dd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:31 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601\",\r\n \"name\": \"sql-audit-cmdlet-server601\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databases/sql-audit-cmdlet-db601\",\r\n \"name\": \"sql-audit-cmdlet-server601/sql-audit-cmdlet-db601\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "577" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799949" + ], + "x-ms-request-id": [ + "111f53f2-2432-452c-84f4-42e2e1976536" + ], + "x-ms-correlation-request-id": [ + "111f53f2-2432-452c-84f4-42e2e1976536" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210334Z:111f53f2-2432-452c-84f4-42e2e1976536" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:34 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westeurope:11abf81a-fb81-4f04-a8f2-b8cd5c9be140" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799948" + ], + "x-ms-correlation-request-id": [ + "70caac96-aacb-4db1-afbd-3ed7ee9adae6" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210335Z:70caac96-aacb-4db1-afbd-3ed7ee9adae6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "a63a4548-d08c-4f4a-ae24-e7e48bb6f769-2014-10-31 21:03:36Z" + ], + "x-ms-client-request-id": [ + "8b8cfbda-1261-447f-b815-d29c1f4e432d-2014-10-31 21:03:36Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets601\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets601.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server601.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server601;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server601.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server601;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server601.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server601.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server601\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server601.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server601.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server601;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server601.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2929" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "a009a85c-273b-4e98-a024-de14edd4080f" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799999" + ], + "x-ms-correlation-request-id": [ + "8fedde79-d7f5-4deb-a107-aca27cc86d2d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210338Z:8fedde79-d7f5-4deb-a107-aca27cc86d2d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:37 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "a63a4548-d08c-4f4a-ae24-e7e48bb6f769-2014-10-31 21:03:36Z" + ], + "x-ms-client-request-id": [ + "f390bcec-8957-4363-b470-96f54b7832a8-2014-10-31 21:03:43Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets601\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets601.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server601.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server601;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server601.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server601;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server601.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server601.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server601\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server601.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server601.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server601;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server601.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2924" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "ba395dc8-4ddb-4dcd-bbf4-acfa4030b505" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799998" + ], + "x-ms-correlation-request-id": [ + "b39466e7-9f30-4114-a203-176039bbdea9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210344Z:b39466e7-9f30-4114-a203-176039bbdea9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:44 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "a63a4548-d08c-4f4a-ae24-e7e48bb6f769-2014-10-31 21:03:36Z" + ], + "x-ms-client-request-id": [ + "a4701473-141b-4544-b93a-1bc7d36dc5e4-2014-10-31 21:03:46Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets601\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets601.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server601.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server601;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server601.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server601;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server601.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server601.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server601\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server601.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server601.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server601;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server601.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2924" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "0c4bdccb-730b-4cf5-a299-eef7b5745039" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799997" + ], + "x-ms-correlation-request-id": [ + "223228c8-991d-4189-b2c0-aeeb5bd5ec4d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210347Z:223228c8-991d-4189-b2c0-aeeb5bd5ec4d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:47 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "a63a4548-d08c-4f4a-ae24-e7e48bb6f769-2014-10-31 21:03:36Z" + ], + "x-ms-client-request-id": [ + "a1fa02fd-aaeb-414b-bb2a-ed9c834f4915-2014-10-31 21:03:52Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets601\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets601.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server601.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server601;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server601.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server601;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server601.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server601.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server601\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server601.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server601.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server601;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server601.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2926" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "3e66d60a-8fe0-40e1-9048-57a8ba26de43" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799996" + ], + "x-ms-correlation-request-id": [ + "90258bd6-a342-45ef-a104-d60c74994bbb" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210353Z:90258bd6-a342-45ef-a104-d60c74994bbb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:53 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "a63a4548-d08c-4f4a-ae24-e7e48bb6f769-2014-10-31 21:03:36Z" + ], + "x-ms-client-request-id": [ + "aa1191b5-ef11-4031-8118-949446852f61-2014-10-31 21:03:54Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets601\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets601.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server601.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server601;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server601.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server601;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server601.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server601.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server601\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server601.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server601.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server601;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server601.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2926" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "3384cb0e-af05-453a-aae2-d919802d428b" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799995" + ], + "x-ms-correlation-request-id": [ + "12c7f638-e84f-4987-88c7-0fb061016d8f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210354Z:12c7f638-e84f-4987-88c7-0fb061016d8f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:54 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "a63a4548-d08c-4f4a-ae24-e7e48bb6f769-2014-10-31 21:03:36Z" + ], + "x-ms-client-request-id": [ + "757447d8-3023-48c6-9526-d622e03bd814-2014-10-31 21:03:59Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets601\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets601.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server601.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server601;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server601.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server601;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server601.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server601.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server601\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server601.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server601.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server601;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server601.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2929" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "a0fc5ebb-5cfe-4319-a7ff-312c83198002" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799994" + ], + "x-ms-correlation-request-id": [ + "f101c32c-6c2e-46ef-8c45-7a42ca816c99" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210359Z:f101c32c-6c2e-46ef-8c45-7a42ca816c99" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:59 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets601/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzNjAxL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "a63a4548-d08c-4f4a-ae24-e7e48bb6f769-2014-10-31 21:03:36Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"ZQ2Dv0l4qa3kYIx5DezdfQzqARJfAXPd4OCzBjbCtfmUZeh4or5SfCFyYMPmH09iBUSN+UvsZZosC6iFnEAHTA==\",\r\n \"secondaryKey\": \"VuMJxYd4P8CtdzXqc46O8SvTAfWTuGuNwxbhHd36ypxZEc0jbQh0vxOqAPJUasgqTtrtQcGTgh7eHxIIbpuW0w==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:d4b2db85-9afa-442d-9c2e-a8cf690b75a7" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11999" + ], + "x-ms-correlation-request-id": [ + "89c1c798-4fb3-46ae-afdf-34469483cada" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210339Z:89c1c798-4fb3-46ae-afdf-34469483cada" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets601/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzNjAxL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "a63a4548-d08c-4f4a-ae24-e7e48bb6f769-2014-10-31 21:03:36Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"ZQ2Dv0l4qa3kYIx5DezdfQzqARJfAXPd4OCzBjbCtfmUZeh4or5SfCFyYMPmH09iBUSN+UvsZZosC6iFnEAHTA==\",\r\n \"secondaryKey\": \"VuMJxYd4P8CtdzXqc46O8SvTAfWTuGuNwxbhHd36ypxZEc0jbQh0vxOqAPJUasgqTtrtQcGTgh7eHxIIbpuW0w==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:18fa5217-b701-4dd9-8897-69fcb8a5dc6e" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11997" + ], + "x-ms-correlation-request-id": [ + "1292ed64-1530-4b71-9d72-fc00d82ea20d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210348Z:1292ed64-1530-4b71-9d72-fc00d82ea20d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets601/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzNjAxL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "a63a4548-d08c-4f4a-ae24-e7e48bb6f769-2014-10-31 21:03:36Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"ZQ2Dv0l4qa3kYIx5DezdfQzqARJfAXPd4OCzBjbCtfmUZeh4or5SfCFyYMPmH09iBUSN+UvsZZosC6iFnEAHTA==\",\r\n \"secondaryKey\": \"VuMJxYd4P8CtdzXqc46O8SvTAfWTuGuNwxbhHd36ypxZEc0jbQh0vxOqAPJUasgqTtrtQcGTgh7eHxIIbpuW0w==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:6de2e294-432a-4db0-a2be-03fdcfed6930" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11995" + ], + "x-ms-correlation-request-id": [ + "df06f075-b52b-443f-bb54-b41a7d3e68ee" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210355Z:df06f075-b52b-443f-bb54-b41a7d3e68ee" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:54 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets601\",\r\n \"storageAccountKey\": \"ZQ2Dv0l4qa3kYIx5DezdfQzqARJfAXPd4OCzBjbCtfmUZeh4or5SfCFyYMPmH09iBUSN+UvsZZosC6iFnEAHTA==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets601.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "784" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "a63a4548-d08c-4f4a-ae24-e7e48bb6f769-2014-10-31 21:03:36Z" + ], + "x-ms-client-request-id": [ + "8b8cfbda-1261-447f-b815-d29c1f4e432d-2014-10-31 21:03:36Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets601\",\r\n \"storageAccountKey\": \"ZQ2Dv0l4qa3kYIx5DezdfQzqARJfAXPd4OCzBjbCtfmUZeh4or5SfCFyYMPmH09iBUSN+UvsZZosC6iFnEAHTA==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets601.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1183" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "1aa4d946-b0ad-4b46-a7c6-5333db96e1e5" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11998" + ], + "x-ms-correlation-request-id": [ + "af025315-0813-46a5-8d80-af7af8f234ce" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210342Z:af025315-0813-46a5-8d80-af7af8f234ce" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:42 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets601\",\r\n \"storageAccountKey\": \"ZQ2Dv0l4qa3kYIx5DezdfQzqARJfAXPd4OCzBjbCtfmUZeh4or5SfCFyYMPmH09iBUSN+UvsZZosC6iFnEAHTA==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets601.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "786" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "a63a4548-d08c-4f4a-ae24-e7e48bb6f769-2014-10-31 21:03:36Z" + ], + "x-ms-client-request-id": [ + "a4701473-141b-4544-b93a-1bc7d36dc5e4-2014-10-31 21:03:46Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets601\",\r\n \"storageAccountKey\": \"ZQ2Dv0l4qa3kYIx5DezdfQzqARJfAXPd4OCzBjbCtfmUZeh4or5SfCFyYMPmH09iBUSN+UvsZZosC6iFnEAHTA==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets601.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1185" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "e75e7737-ef41-44c7-9b37-5a65395d4744" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11996" + ], + "x-ms-correlation-request-id": [ + "ac1b1962-6299-4185-a855-2f7e9a16407f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210350Z:ac1b1962-6299-4185-a855-2f7e9a16407f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:50 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzYwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyNjAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets601\",\r\n \"storageAccountKey\": \"ZQ2Dv0l4qa3kYIx5DezdfQzqARJfAXPd4OCzBjbCtfmUZeh4or5SfCFyYMPmH09iBUSN+UvsZZosC6iFnEAHTA==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets601.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "789" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "a63a4548-d08c-4f4a-ae24-e7e48bb6f769-2014-10-31 21:03:36Z" + ], + "x-ms-client-request-id": [ + "aa1191b5-ef11-4031-8118-949446852f61-2014-10-31 21:03:54Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": false,\r\n \"isEventTypeSchemaChangeEnabled\": false,\r\n \"isEventTypeDataChangesEnabled\": false,\r\n \"isEventTypeSecurityExceptionsEnabled\": false,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": false,\r\n \"storageAccountName\": \"auditcmdlets601\",\r\n \"storageAccountKey\": \"ZQ2Dv0l4qa3kYIx5DezdfQzqARJfAXPd4OCzBjbCtfmUZeh4or5SfCFyYMPmH09iBUSN+UvsZZosC6iFnEAHTA==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets601.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg601/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server601/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1188" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "4682e2c3-4cea-45c0-8b2e-5a967732205f" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11994" + ], + "x-ms-correlation-request-id": [ + "20cd6607-84e4-47d7-9e22-700826502158" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T210358Z:20cd6607-84e4-47d7-9e22-700826502158" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:03:57 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices/auditcmdlets601", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXMvYXVkaXRjbWRsZXRzNjAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "e51de8c870f32cae9adb54b9b7c82a1f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:04:04 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/e51de8c870f32cae9adb54b9b7c82a1f", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zL2U1MWRlOGM4NzBmMzJjYWU5YWRiNTRiOWI3YzgyYTFm", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/2.0.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "\r\n e51de8c8-70f3-2cae-9adb-54b9b7c82a1f\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "d5828b5464a7220e9c40bf759d7cd22e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:04:06 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "cca24ec8-99b5-4aa7-9ff6-486e886f304c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestServerUpdatePolicyWithStorage.json b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestServerUpdatePolicyWithStorage.json new file mode 100644 index 000000000000..38492d89790f --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestServerUpdatePolicyWithStorage.json @@ -0,0 +1,2981 @@ +{ + "Entries": [ + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXM=", + "RequestMethod": "POST", + "RequestBody": "\r\n auditcmdlets201\r\n \r\n \r\n West US\r\n \r\n Standard_GRS\r\n", + "RequestHeaders": { + "Content-Type": [ + "application/xml" + ], + "Content-Length": [ + "379" + ], + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "1" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "0c921b2583aa202f8d77042bbc6786cc" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:55:53 GMT" + ], + "Location": [ + "https://management.core.windows.net/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/storage/auditcmdlets201" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/0c921b2583aa202f8d77042bbc6786cc", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zLzBjOTIxYjI1ODNhYTIwMmY4ZDc3MDQyYmJjNjc4NmNj", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "1" + ] + }, + "ResponseBody": "\r\n 0c921b25-83aa-202f-8d77-042bbc6786cc\r\n InProgress\r\n", + "ResponseHeaders": { + "Content-Length": [ + "197" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "080ca2836035244fb8b3846079eb3123" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:55:54 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/0c921b2583aa202f8d77042bbc6786cc", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zLzBjOTIxYjI1ODNhYTIwMmY4ZDc3MDQyYmJjNjc4NmNj", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "1" + ] + }, + "ResponseBody": "\r\n 0c921b25-83aa-202f-8d77-042bbc6786cc\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "39996f0ac16a2c708ac440179c62ab3f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:56:25 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "119" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799999" + ], + "x-ms-request-id": [ + "b1e16542-9e54-4ed6-aed2-dd2eaeca8553" + ], + "x-ms-correlation-request-id": [ + "b1e16542-9e54-4ed6-aed2-dd2eaeca8553" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205626Z:b1e16542-9e54-4ed6-aed2-dd2eaeca8553" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:56:25 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201\",\r\n \"name\": \"sql-audit-cmdlet-test-rg201\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "217" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11999" + ], + "x-ms-request-id": [ + "df475584-8557-41e4-adc8-e6efc609de65" + ], + "x-ms-correlation-request-id": [ + "df475584-8557-41e4-adc8-e6efc609de65" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205628Z:df475584-8557-41e4-adc8-e6efc609de65" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:56:28 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup/validate?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvdmFsaWRhdGU/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db201\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server201\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db201\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server201\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T20:56:29.3047061Z\",\r\n \"correlationId\": \"ad829bf6-a28e-4b9b-b643-7d65b1621760\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databases/sql-audit-cmdlet-db201\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201/sql-audit-cmdlet-db201\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11998" + ], + "x-ms-request-id": [ + "ad829bf6-a28e-4b9b-b643-7d65b1621760" + ], + "x-ms-correlation-request-id": [ + "ad829bf6-a28e-4b9b-b643-7d65b1621760" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205629Z:ad829bf6-a28e-4b9b-b643-7d65b1621760" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:56:29 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db201\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server201\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db201\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server201\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T20:56:30.9780085Z\",\r\n \"correlationId\": \"88bef81e-a652-4a51-b3e9-d15e0023c90a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databases/sql-audit-cmdlet-db201\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201/sql-audit-cmdlet-db201\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11997" + ], + "x-ms-request-id": [ + "88bef81e-a652-4a51-b3e9-d15e0023c90a" + ], + "x-ms-correlation-request-id": [ + "88bef81e-a652-4a51-b3e9-d15e0023c90a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205631Z:88bef81e-a652-4a51-b3e9-d15e0023c90a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:56:31 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799998" + ], + "x-ms-request-id": [ + "908231b1-f7b6-44bd-83eb-4b862f067bc3" + ], + "x-ms-correlation-request-id": [ + "908231b1-f7b6-44bd-83eb-4b862f067bc3" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205632Z:908231b1-f7b6-44bd-83eb-4b862f067bc3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:56:31 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799996" + ], + "x-ms-request-id": [ + "43817a9f-e176-48d2-a2d0-d50bf535f347" + ], + "x-ms-correlation-request-id": [ + "43817a9f-e176-48d2-a2d0-d50bf535f347" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205635Z:43817a9f-e176-48d2-a2d0-d50bf535f347" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:56:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799994" + ], + "x-ms-request-id": [ + "d697861a-9184-411e-a1c9-2809815d2bac" + ], + "x-ms-correlation-request-id": [ + "d697861a-9184-411e-a1c9-2809815d2bac" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205638Z:d697861a-9184-411e-a1c9-2809815d2bac" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:56:38 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799992" + ], + "x-ms-request-id": [ + "09fcb7c0-b86c-4ffb-bae3-32ae5f30560c" + ], + "x-ms-correlation-request-id": [ + "09fcb7c0-b86c-4ffb-bae3-32ae5f30560c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205641Z:09fcb7c0-b86c-4ffb-bae3-32ae5f30560c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:56:40 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799990" + ], + "x-ms-request-id": [ + "9cb2d36e-7f63-46f2-866f-500d7e4ca3d2" + ], + "x-ms-correlation-request-id": [ + "9cb2d36e-7f63-46f2-866f-500d7e4ca3d2" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205644Z:9cb2d36e-7f63-46f2-866f-500d7e4ca3d2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:56:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799988" + ], + "x-ms-request-id": [ + "051f9783-3de5-4fd2-8651-a090e3a03154" + ], + "x-ms-correlation-request-id": [ + "051f9783-3de5-4fd2-8651-a090e3a03154" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205647Z:051f9783-3de5-4fd2-8651-a090e3a03154" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:56:47 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799986" + ], + "x-ms-request-id": [ + "b160f79b-bcff-43a9-b0a6-baca87f48b36" + ], + "x-ms-correlation-request-id": [ + "b160f79b-bcff-43a9-b0a6-baca87f48b36" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205650Z:b160f79b-bcff-43a9-b0a6-baca87f48b36" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:56:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799984" + ], + "x-ms-request-id": [ + "eb32a680-94cd-4a73-9aa5-75edff7d02d0" + ], + "x-ms-correlation-request-id": [ + "eb32a680-94cd-4a73-9aa5-75edff7d02d0" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205653Z:eb32a680-94cd-4a73-9aa5-75edff7d02d0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:56:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799982" + ], + "x-ms-request-id": [ + "471bc53e-33e2-44b8-a786-11819253d184" + ], + "x-ms-correlation-request-id": [ + "471bc53e-33e2-44b8-a786-11819253d184" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205656Z:471bc53e-33e2-44b8-a786-11819253d184" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:56:56 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799980" + ], + "x-ms-request-id": [ + "d0daa408-6450-4266-adc6-498a2c9e9062" + ], + "x-ms-correlation-request-id": [ + "d0daa408-6450-4266-adc6-498a2c9e9062" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205659Z:d0daa408-6450-4266-adc6-498a2c9e9062" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:56:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799978" + ], + "x-ms-request-id": [ + "7372e172-aa0e-4fdb-80ae-9ceac121d790" + ], + "x-ms-correlation-request-id": [ + "7372e172-aa0e-4fdb-80ae-9ceac121d790" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205702Z:7372e172-aa0e-4fdb-80ae-9ceac121d790" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:57:02 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799976" + ], + "x-ms-request-id": [ + "31501dce-0999-4dc0-8277-03aaff787bef" + ], + "x-ms-correlation-request-id": [ + "31501dce-0999-4dc0-8277-03aaff787bef" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205705Z:31501dce-0999-4dc0-8277-03aaff787bef" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:57:05 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799974" + ], + "x-ms-request-id": [ + "8ec2edd4-3a8c-492e-bdaa-f1100487e357" + ], + "x-ms-correlation-request-id": [ + "8ec2edd4-3a8c-492e-bdaa-f1100487e357" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205709Z:8ec2edd4-3a8c-492e-bdaa-f1100487e357" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:57:09 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799972" + ], + "x-ms-request-id": [ + "07022cac-0d2f-4fc8-937e-7f0f40683998" + ], + "x-ms-correlation-request-id": [ + "07022cac-0d2f-4fc8-937e-7f0f40683998" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205712Z:07022cac-0d2f-4fc8-937e-7f0f40683998" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:57:11 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799970" + ], + "x-ms-request-id": [ + "724f961a-0f9a-4b42-913a-e7cfe47cd6ff" + ], + "x-ms-correlation-request-id": [ + "724f961a-0f9a-4b42-913a-e7cfe47cd6ff" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205715Z:724f961a-0f9a-4b42-913a-e7cfe47cd6ff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:57:14 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799968" + ], + "x-ms-request-id": [ + "5d3a7ad0-4ff3-4e52-9c15-5ea0a9da34ce" + ], + "x-ms-correlation-request-id": [ + "5d3a7ad0-4ff3-4e52-9c15-5ea0a9da34ce" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205718Z:5d3a7ad0-4ff3-4e52-9c15-5ea0a9da34ce" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:57:18 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799966" + ], + "x-ms-request-id": [ + "91da247e-7c4f-4118-96e9-92fd900593a1" + ], + "x-ms-correlation-request-id": [ + "91da247e-7c4f-4118-96e9-92fd900593a1" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205721Z:91da247e-7c4f-4118-96e9-92fd900593a1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:57:20 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799964" + ], + "x-ms-request-id": [ + "667e4b23-158b-4e3c-916b-9d8150f4c581" + ], + "x-ms-correlation-request-id": [ + "667e4b23-158b-4e3c-916b-9d8150f4c581" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205724Z:667e4b23-158b-4e3c-916b-9d8150f4c581" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:57:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup/operations/70ED637B94D3908F\",\r\n \"operationId\": \"70ED637B94D3908F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T20:57:27.0005398Z\",\r\n \"trackingId\": \"acdc8c11-05ab-4816-8ac6-7f1bb08f5d36\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799962" + ], + "x-ms-request-id": [ + "4bb28b2c-ac6a-45b2-bd6a-887efcc65a1f" + ], + "x-ms-correlation-request-id": [ + "4bb28b2c-ac6a-45b2-bd6a-887efcc65a1f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205727Z:4bb28b2c-ac6a-45b2-bd6a-887efcc65a1f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:57:27 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup/operations/70ED637B94D3908F\",\r\n \"operationId\": \"70ED637B94D3908F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T20:57:27.0005398Z\",\r\n \"trackingId\": \"acdc8c11-05ab-4816-8ac6-7f1bb08f5d36\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799960" + ], + "x-ms-request-id": [ + "76f1fa10-07be-47d0-965f-9075c1f8d116" + ], + "x-ms-correlation-request-id": [ + "76f1fa10-07be-47d0-965f-9075c1f8d116" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205730Z:76f1fa10-07be-47d0-965f-9075c1f8d116" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:57:30 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup/operations/4AE56E83ACD522CE\",\r\n \"operationId\": \"4AE56E83ACD522CE\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T20:57:32.8846114Z\",\r\n \"trackingId\": \"fabbca37-727b-4d18-8d1b-6dada458f10f\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databases/sql-audit-cmdlet-db201\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201/sql-audit-cmdlet-db201\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup/operations/70ED637B94D3908F\",\r\n \"operationId\": \"70ED637B94D3908F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T20:57:27.0005398Z\",\r\n \"trackingId\": \"acdc8c11-05ab-4816-8ac6-7f1bb08f5d36\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799958" + ], + "x-ms-request-id": [ + "3d5029ed-dcd0-42f0-b1c8-1a315c6a4a8c" + ], + "x-ms-correlation-request-id": [ + "3d5029ed-dcd0-42f0-b1c8-1a315c6a4a8c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205733Z:3d5029ed-dcd0-42f0-b1c8-1a315c6a4a8c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:57:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup/operations/4AE56E83ACD522CE\",\r\n \"operationId\": \"4AE56E83ACD522CE\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T20:57:32.8846114Z\",\r\n \"trackingId\": \"fabbca37-727b-4d18-8d1b-6dada458f10f\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databases/sql-audit-cmdlet-db201\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201/sql-audit-cmdlet-db201\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup/operations/70ED637B94D3908F\",\r\n \"operationId\": \"70ED637B94D3908F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T20:57:27.0005398Z\",\r\n \"trackingId\": \"acdc8c11-05ab-4816-8ac6-7f1bb08f5d36\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799956" + ], + "x-ms-request-id": [ + "3bd96325-0173-43f8-bdf4-986099e1ef75" + ], + "x-ms-correlation-request-id": [ + "3bd96325-0173-43f8-bdf4-986099e1ef75" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205736Z:3bd96325-0173-43f8-bdf4-986099e1ef75" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:57:36 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup/operations/4AE56E83ACD522CE\",\r\n \"operationId\": \"4AE56E83ACD522CE\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T20:57:32.8846114Z\",\r\n \"trackingId\": \"fabbca37-727b-4d18-8d1b-6dada458f10f\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databases/sql-audit-cmdlet-db201\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201/sql-audit-cmdlet-db201\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup/operations/70ED637B94D3908F\",\r\n \"operationId\": \"70ED637B94D3908F\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T20:57:27.0005398Z\",\r\n \"trackingId\": \"acdc8c11-05ab-4816-8ac6-7f1bb08f5d36\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799954" + ], + "x-ms-request-id": [ + "56cdd1d8-1229-4e61-a911-80cc5bc48f7b" + ], + "x-ms-correlation-request-id": [ + "56cdd1d8-1229-4e61-a911-80cc5bc48f7b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205740Z:56cdd1d8-1229-4e61-a911-80cc5bc48f7b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:57:39 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db201\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server201\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T20:56:30.9780085Z\",\r\n \"correlationId\": \"88bef81e-a652-4a51-b3e9-d15e0023c90a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databases/sql-audit-cmdlet-db201\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201/sql-audit-cmdlet-db201\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799997" + ], + "x-ms-request-id": [ + "27b2a01b-bc75-40b5-9494-4201fb5e72e1" + ], + "x-ms-correlation-request-id": [ + "27b2a01b-bc75-40b5-9494-4201fb5e72e1" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205632Z:27b2a01b-bc75-40b5-9494-4201fb5e72e1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:56:32 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db201\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server201\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:56:33.5245461Z\",\r\n \"correlationId\": \"88bef81e-a652-4a51-b3e9-d15e0023c90a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databases/sql-audit-cmdlet-db201\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201/sql-audit-cmdlet-db201\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799995" + ], + "x-ms-request-id": [ + "206ab90c-87f7-4266-a3a6-0b3b1fdb9a86" + ], + "x-ms-correlation-request-id": [ + "206ab90c-87f7-4266-a3a6-0b3b1fdb9a86" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205635Z:206ab90c-87f7-4266-a3a6-0b3b1fdb9a86" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:56:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db201\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server201\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:56:33.5245461Z\",\r\n \"correlationId\": \"88bef81e-a652-4a51-b3e9-d15e0023c90a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databases/sql-audit-cmdlet-db201\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201/sql-audit-cmdlet-db201\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799993" + ], + "x-ms-request-id": [ + "4e6bf474-58b3-4dcd-a844-6bef80ce16ca" + ], + "x-ms-correlation-request-id": [ + "4e6bf474-58b3-4dcd-a844-6bef80ce16ca" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205638Z:4e6bf474-58b3-4dcd-a844-6bef80ce16ca" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:56:38 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db201\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server201\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:56:33.5245461Z\",\r\n \"correlationId\": \"88bef81e-a652-4a51-b3e9-d15e0023c90a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databases/sql-audit-cmdlet-db201\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201/sql-audit-cmdlet-db201\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799991" + ], + "x-ms-request-id": [ + "fa0b13eb-c85e-4472-9cdb-bd23c23aecde" + ], + "x-ms-correlation-request-id": [ + "fa0b13eb-c85e-4472-9cdb-bd23c23aecde" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205641Z:fa0b13eb-c85e-4472-9cdb-bd23c23aecde" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:56:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db201\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server201\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:56:33.5245461Z\",\r\n \"correlationId\": \"88bef81e-a652-4a51-b3e9-d15e0023c90a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databases/sql-audit-cmdlet-db201\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201/sql-audit-cmdlet-db201\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799989" + ], + "x-ms-request-id": [ + "f222544c-c91f-4854-bf83-70d96bea97ec" + ], + "x-ms-correlation-request-id": [ + "f222544c-c91f-4854-bf83-70d96bea97ec" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205644Z:f222544c-c91f-4854-bf83-70d96bea97ec" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:56:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db201\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server201\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:56:33.5245461Z\",\r\n \"correlationId\": \"88bef81e-a652-4a51-b3e9-d15e0023c90a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databases/sql-audit-cmdlet-db201\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201/sql-audit-cmdlet-db201\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799987" + ], + "x-ms-request-id": [ + "bafb531a-1263-4c3f-ac2b-36591696e7fd" + ], + "x-ms-correlation-request-id": [ + "bafb531a-1263-4c3f-ac2b-36591696e7fd" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205648Z:bafb531a-1263-4c3f-ac2b-36591696e7fd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:56:47 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db201\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server201\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:56:33.5245461Z\",\r\n \"correlationId\": \"88bef81e-a652-4a51-b3e9-d15e0023c90a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databases/sql-audit-cmdlet-db201\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201/sql-audit-cmdlet-db201\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799985" + ], + "x-ms-request-id": [ + "2781ea7c-4ea9-49cf-9811-976bf152f0c3" + ], + "x-ms-correlation-request-id": [ + "2781ea7c-4ea9-49cf-9811-976bf152f0c3" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205651Z:2781ea7c-4ea9-49cf-9811-976bf152f0c3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:56:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db201\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server201\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:56:33.5245461Z\",\r\n \"correlationId\": \"88bef81e-a652-4a51-b3e9-d15e0023c90a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databases/sql-audit-cmdlet-db201\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201/sql-audit-cmdlet-db201\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799983" + ], + "x-ms-request-id": [ + "405227c5-f555-46d4-89d5-cbd028ef6b58" + ], + "x-ms-correlation-request-id": [ + "405227c5-f555-46d4-89d5-cbd028ef6b58" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205654Z:405227c5-f555-46d4-89d5-cbd028ef6b58" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:56:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db201\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server201\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:56:33.5245461Z\",\r\n \"correlationId\": \"88bef81e-a652-4a51-b3e9-d15e0023c90a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databases/sql-audit-cmdlet-db201\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201/sql-audit-cmdlet-db201\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799981" + ], + "x-ms-request-id": [ + "0677e6aa-2981-4943-bace-b1ea1dcb98eb" + ], + "x-ms-correlation-request-id": [ + "0677e6aa-2981-4943-bace-b1ea1dcb98eb" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205657Z:0677e6aa-2981-4943-bace-b1ea1dcb98eb" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:56:56 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db201\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server201\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:56:33.5245461Z\",\r\n \"correlationId\": \"88bef81e-a652-4a51-b3e9-d15e0023c90a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databases/sql-audit-cmdlet-db201\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201/sql-audit-cmdlet-db201\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799979" + ], + "x-ms-request-id": [ + "3ed881c6-b95a-4627-860f-110a85585396" + ], + "x-ms-correlation-request-id": [ + "3ed881c6-b95a-4627-860f-110a85585396" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205700Z:3ed881c6-b95a-4627-860f-110a85585396" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:56:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db201\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server201\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:56:33.5245461Z\",\r\n \"correlationId\": \"88bef81e-a652-4a51-b3e9-d15e0023c90a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databases/sql-audit-cmdlet-db201\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201/sql-audit-cmdlet-db201\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799977" + ], + "x-ms-request-id": [ + "955afe2f-a820-4287-8dae-fd8127289d35" + ], + "x-ms-correlation-request-id": [ + "955afe2f-a820-4287-8dae-fd8127289d35" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205703Z:955afe2f-a820-4287-8dae-fd8127289d35" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:57:02 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db201\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server201\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:56:33.5245461Z\",\r\n \"correlationId\": \"88bef81e-a652-4a51-b3e9-d15e0023c90a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databases/sql-audit-cmdlet-db201\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201/sql-audit-cmdlet-db201\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799975" + ], + "x-ms-request-id": [ + "0e550263-3db2-408d-9460-2076ee9dcbe5" + ], + "x-ms-correlation-request-id": [ + "0e550263-3db2-408d-9460-2076ee9dcbe5" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205706Z:0e550263-3db2-408d-9460-2076ee9dcbe5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:57:05 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db201\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server201\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:56:33.5245461Z\",\r\n \"correlationId\": \"88bef81e-a652-4a51-b3e9-d15e0023c90a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databases/sql-audit-cmdlet-db201\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201/sql-audit-cmdlet-db201\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799973" + ], + "x-ms-request-id": [ + "4dce8f2a-5a23-4025-b1d1-0181c4736ee2" + ], + "x-ms-correlation-request-id": [ + "4dce8f2a-5a23-4025-b1d1-0181c4736ee2" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205709Z:4dce8f2a-5a23-4025-b1d1-0181c4736ee2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:57:09 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db201\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server201\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:56:33.5245461Z\",\r\n \"correlationId\": \"88bef81e-a652-4a51-b3e9-d15e0023c90a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databases/sql-audit-cmdlet-db201\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201/sql-audit-cmdlet-db201\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799971" + ], + "x-ms-request-id": [ + "0bbd4989-83fd-4f72-92ba-9c58dd77dcae" + ], + "x-ms-correlation-request-id": [ + "0bbd4989-83fd-4f72-92ba-9c58dd77dcae" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205712Z:0bbd4989-83fd-4f72-92ba-9c58dd77dcae" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:57:11 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db201\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server201\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:56:33.5245461Z\",\r\n \"correlationId\": \"88bef81e-a652-4a51-b3e9-d15e0023c90a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databases/sql-audit-cmdlet-db201\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201/sql-audit-cmdlet-db201\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799969" + ], + "x-ms-request-id": [ + "4516c402-89b2-44f4-a5a2-90f481821576" + ], + "x-ms-correlation-request-id": [ + "4516c402-89b2-44f4-a5a2-90f481821576" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205715Z:4516c402-89b2-44f4-a5a2-90f481821576" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:57:14 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db201\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server201\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:56:33.5245461Z\",\r\n \"correlationId\": \"88bef81e-a652-4a51-b3e9-d15e0023c90a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databases/sql-audit-cmdlet-db201\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201/sql-audit-cmdlet-db201\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799967" + ], + "x-ms-request-id": [ + "3b49d7ef-2622-4551-ade6-0cad4b797afd" + ], + "x-ms-correlation-request-id": [ + "3b49d7ef-2622-4551-ade6-0cad4b797afd" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205718Z:3b49d7ef-2622-4551-ade6-0cad4b797afd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:57:18 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db201\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server201\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:56:33.5245461Z\",\r\n \"correlationId\": \"88bef81e-a652-4a51-b3e9-d15e0023c90a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databases/sql-audit-cmdlet-db201\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201/sql-audit-cmdlet-db201\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799965" + ], + "x-ms-request-id": [ + "a18dc79c-8b7a-432e-add8-f8d999fd8112" + ], + "x-ms-correlation-request-id": [ + "a18dc79c-8b7a-432e-add8-f8d999fd8112" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205721Z:a18dc79c-8b7a-432e-add8-f8d999fd8112" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:57:21 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db201\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server201\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:56:33.5245461Z\",\r\n \"correlationId\": \"88bef81e-a652-4a51-b3e9-d15e0023c90a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databases/sql-audit-cmdlet-db201\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201/sql-audit-cmdlet-db201\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799963" + ], + "x-ms-request-id": [ + "064fece9-637b-4366-98ef-2a92cbf09243" + ], + "x-ms-correlation-request-id": [ + "064fece9-637b-4366-98ef-2a92cbf09243" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205724Z:064fece9-637b-4366-98ef-2a92cbf09243" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:57:24 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db201\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server201\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:56:33.5245461Z\",\r\n \"correlationId\": \"88bef81e-a652-4a51-b3e9-d15e0023c90a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databases/sql-audit-cmdlet-db201\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201/sql-audit-cmdlet-db201\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799961" + ], + "x-ms-request-id": [ + "3c1f9663-b426-4ad4-a7e2-0dc9eb3c2f55" + ], + "x-ms-correlation-request-id": [ + "3c1f9663-b426-4ad4-a7e2-0dc9eb3c2f55" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205727Z:3c1f9663-b426-4ad4-a7e2-0dc9eb3c2f55" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:57:27 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db201\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server201\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:56:33.5245461Z\",\r\n \"correlationId\": \"88bef81e-a652-4a51-b3e9-d15e0023c90a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databases/sql-audit-cmdlet-db201\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201/sql-audit-cmdlet-db201\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799959" + ], + "x-ms-request-id": [ + "b175e965-0816-4c94-8bcb-0c76a19900e8" + ], + "x-ms-correlation-request-id": [ + "b175e965-0816-4c94-8bcb-0c76a19900e8" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205730Z:b175e965-0816-4c94-8bcb-0c76a19900e8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:57:30 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db201\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server201\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:56:33.5245461Z\",\r\n \"correlationId\": \"88bef81e-a652-4a51-b3e9-d15e0023c90a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databases/sql-audit-cmdlet-db201\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201/sql-audit-cmdlet-db201\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799957" + ], + "x-ms-request-id": [ + "289c44ce-2cde-407c-9b17-1f7bb47aaaef" + ], + "x-ms-correlation-request-id": [ + "289c44ce-2cde-407c-9b17-1f7bb47aaaef" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205734Z:289c44ce-2cde-407c-9b17-1f7bb47aaaef" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:57:33 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db201\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server201\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T20:56:33.5245461Z\",\r\n \"correlationId\": \"88bef81e-a652-4a51-b3e9-d15e0023c90a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databases/sql-audit-cmdlet-db201\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201/sql-audit-cmdlet-db201\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799955" + ], + "x-ms-request-id": [ + "4381fcc6-2d0e-4989-81b0-a1b59c3d2628" + ], + "x-ms-correlation-request-id": [ + "4381fcc6-2d0e-4989-81b0-a1b59c3d2628" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205737Z:4381fcc6-2d0e-4989-81b0-a1b59c3d2628" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:57:36 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db201\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server201\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T20:57:36.9488504Z\",\r\n \"correlationId\": \"88bef81e-a652-4a51-b3e9-d15e0023c90a\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databases/sql-audit-cmdlet-db201\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server201/sql-audit-cmdlet-db201\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1626" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799953" + ], + "x-ms-request-id": [ + "e19d2115-4058-45b2-b3a6-9f22ff7f74a0" + ], + "x-ms-correlation-request-id": [ + "e19d2115-4058-45b2-b3a6-9f22ff7f74a0" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205740Z:e19d2115-4058-45b2-b3a6-9f22ff7f74a0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:57:40 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201\",\r\n \"name\": \"sql-audit-cmdlet-server201\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databases/sql-audit-cmdlet-db201\",\r\n \"name\": \"sql-audit-cmdlet-server201/sql-audit-cmdlet-db201\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "577" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799952" + ], + "x-ms-request-id": [ + "6f6b9e75-8b6e-4427-9233-c41e39d34c01" + ], + "x-ms-correlation-request-id": [ + "6f6b9e75-8b6e-4427-9233-c41e39d34c01" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205742Z:6f6b9e75-8b6e-4427-9233-c41e39d34c01" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:57:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westeurope:6f2607c6-e1dc-4009-8b03-579011a3c045" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799951" + ], + "x-ms-correlation-request-id": [ + "a1428e7f-fc67-4e07-a3ad-a31691352cb1" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205743Z:a1428e7f-fc67-4e07-a3ad-a31691352cb1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:57:43 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMjAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "6a8e20c2-67a3-4eb5-8df7-2d57b99695fb-2014-10-31 20:57:44Z" + ], + "x-ms-client-request-id": [ + "198f1b17-2bab-452c-be6b-64b4673c6370-2014-10-31 20:57:44Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets201\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets201.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server201.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server201;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server201.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server201;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server201.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server201.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server201\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server201.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server201.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server201;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server201.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2924" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "8122a8d9-4b6c-4f09-a4b5-4432e0c502ab" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799999" + ], + "x-ms-correlation-request-id": [ + "703d32b1-d73a-4d98-8090-0702b43424d5" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205746Z:703d32b1-d73a-4d98-8090-0702b43424d5" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:57:46 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMjAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "6a8e20c2-67a3-4eb5-8df7-2d57b99695fb-2014-10-31 20:57:44Z" + ], + "x-ms-client-request-id": [ + "3751cc08-e86c-44c1-8d8b-b915aae9c795-2014-10-31 20:57:51Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets201\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets201.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server201.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server201;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server201.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server201;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server201.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server201.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server201\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server201.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server201.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server201;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server201.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2924" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "e8227272-b2ae-49a6-9452-eee46d0be3f0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799998" + ], + "x-ms-correlation-request-id": [ + "b0f8652b-2551-4824-978f-b94a633f9923" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205751Z:b0f8652b-2551-4824-978f-b94a633f9923" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:57:51 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets201/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzMjAxL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "6a8e20c2-67a3-4eb5-8df7-2d57b99695fb-2014-10-31 20:57:44Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"Ysl6v3iBEkyi8iteDDiH0rvC40zAM9/1ldQeAVtFF0lHknCTgsvSG3LRzMv7tFp/3g2xhuU7LdoyUOToE2Acmg==\",\r\n \"secondaryKey\": \"pL/8avV4umhPG2Se8l2iJdI1dGs4HWPaO5kzTk1XFlqlACQKGp2beS7F83IiOz/nbMTvVl1khiFgafncuXCvqA==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:a78d5d6d-2401-4313-953a-3a312360ca25" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11999" + ], + "x-ms-correlation-request-id": [ + "d1ec7525-b940-44a0-9a95-7737e2b7f367" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205747Z:d1ec7525-b940-44a0-9a95-7737e2b7f367" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:57:47 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzIwMS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMjAxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets201\",\r\n \"storageAccountKey\": \"Ysl6v3iBEkyi8iteDDiH0rvC40zAM9/1ldQeAVtFF0lHknCTgsvSG3LRzMv7tFp/3g2xhuU7LdoyUOToE2Acmg==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets201.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "784" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "6a8e20c2-67a3-4eb5-8df7-2d57b99695fb-2014-10-31 20:57:44Z" + ], + "x-ms-client-request-id": [ + "198f1b17-2bab-452c-be6b-64b4673c6370-2014-10-31 20:57:44Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets201\",\r\n \"storageAccountKey\": \"Ysl6v3iBEkyi8iteDDiH0rvC40zAM9/1ldQeAVtFF0lHknCTgsvSG3LRzMv7tFp/3g2xhuU7LdoyUOToE2Acmg==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets201.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg201/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server201/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1183" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "3b03bf06-64ce-4486-835d-4303fd91c665" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11998" + ], + "x-ms-correlation-request-id": [ + "f3367e42-b0b8-471c-b2df-df62846c7a06" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T205750Z:f3367e42-b0b8-471c-b2df-df62846c7a06" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:57:49 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices/auditcmdlets201", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXMvYXVkaXRjbWRsZXRzMjAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "011a08feb9482898863bb098cf42e374" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:57:56 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/011a08feb9482898863bb098cf42e374", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zLzAxMWEwOGZlYjk0ODI4OTg4NjNiYjA5OGNmNDJlMzc0", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/2.0.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "\r\n 011a08fe-b948-2898-863b-b098cf42e374\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "54eb726f9cd7266497a20a50db4e0439" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 20:57:57 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "cca24ec8-99b5-4aa7-9ff6-486e886f304c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestUseServerDefault.json b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestUseServerDefault.json new file mode 100644 index 000000000000..356d22524567 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.SqlTests.SecurityTests/TestUseServerDefault.json @@ -0,0 +1,3218 @@ +{ + "Entries": [ + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXM=", + "RequestMethod": "POST", + "RequestBody": "\r\n auditcmdlets141\r\n \r\n \r\n West US\r\n \r\n Standard_GRS\r\n", + "RequestHeaders": { + "Content-Type": [ + "application/xml" + ], + "Content-Length": [ + "379" + ], + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "998" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "0d02552968f829368d5a2a3844c428b0" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:41:10 GMT" + ], + "Location": [ + "https://management.core.windows.net/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/storage/auditcmdlets141" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/0d02552968f829368d5a2a3844c428b0", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zLzBkMDI1NTI5NjhmODI5MzY4ZDVhMmEzODQ0YzQyOGIw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "998" + ] + }, + "ResponseBody": "\r\n 0d025529-68f8-2936-8d5a-2a3844c428b0\r\n InProgress\r\n", + "ResponseHeaders": { + "Content-Length": [ + "197" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "60a3d00a600f21659cc79792db3d9f79" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:41:11 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/0d02552968f829368d5a2a3844c428b0", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zLzBkMDI1NTI5NjhmODI5MzY4ZDVhMmEzODQ0YzQyOGIw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "998" + ] + }, + "ResponseBody": "\r\n 0d025529-68f8-2936-8d5a-2a3844c428b0\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "0e2f2ffde22825fc989e05945301c51e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:41:41 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "119" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799874" + ], + "x-ms-request-id": [ + "0cefe2ee-71a1-4bca-8836-2341b0b3b18b" + ], + "x-ms-correlation-request-id": [ + "0cefe2ee-71a1-4bca-8836-2341b0b3b18b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214142Z:0cefe2ee-71a1-4bca-8836-2341b0b3b18b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:41:42 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MT9hcGktdmVyc2lvbj0yMDE0LTA0LTAxLXByZXZpZXc=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "44" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141\",\r\n \"name\": \"sql-audit-cmdlet-test-rg141\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "217" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11976" + ], + "x-ms-request-id": [ + "35a14c84-7ed8-41f4-9c21-1153f891c61e" + ], + "x-ms-correlation-request-id": [ + "35a14c84-7ed8-41f4-9c21-1153f891c61e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214145Z:35a14c84-7ed8-41f4-9c21-1153f891c61e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:41:44 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup/validate?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvdmFsaWRhdGU/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db141\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server141\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db141\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server141\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:41:45.8149459Z\",\r\n \"correlationId\": \"ebaf1ba2-fc50-40b7-920f-0aae3a3f81c9\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databases/sql-audit-cmdlet-db141\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141/sql-audit-cmdlet-db141\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11975" + ], + "x-ms-request-id": [ + "ebaf1ba2-fc50-40b7-920f-0aae3a3f81c9" + ], + "x-ms-correlation-request-id": [ + "ebaf1ba2-fc50-40b7-920f-0aae3a3f81c9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214145Z:ebaf1ba2-fc50-40b7-920f-0aae3a3f81c9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:41:45 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"template\": {\r\n \"$schema\": \"http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview\",\r\n \"contentVersion\": \"1.0.0.0\",\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"securestring\",\r\n \"defaultValue\": \"testp@ssMakingIt1007Longer\"\r\n },\r\n \"collation\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"string\"\r\n },\r\n \"edition\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"string\",\r\n \"defaultValue\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"EnvLocation\": {\r\n \"type\": \"string\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('serverName')]\",\r\n \"properties\": {\r\n \"administratorLogin\": \"[parameters('administratorLogin')]\",\r\n \"administratorLoginPassword\": \"[parameters('administratorLoginPassword')]\"\r\n },\r\n \"resources\": [\r\n {\r\n \"apiVersion\": \"2.0\",\r\n \"dependsOn\": [\r\n \"[concat('Microsoft.Sql/servers/', parameters('serverName'))]\"\r\n ],\r\n \"location\": \"[parameters('EnvLocation')]\",\r\n \"name\": \"[parameters('databaseName')]\",\r\n \"properties\": {\r\n \"collation\": \"[parameters('collation')]\",\r\n \"edition\": \"[parameters('edition')]\",\r\n \"maxSizeBytes\": \"1073741824\"\r\n },\r\n \"type\": \"databases\"\r\n }\r\n ],\r\n \"type\": \"Microsoft.Sql/servers\"\r\n }\r\n ]\r\n },\r\n \"parameters\": {\r\n \"databaseName\": {\r\n \"value\": \"sql-audit-cmdlet-db141\"\r\n },\r\n \"serverName\": {\r\n \"value\": \"sql-audit-cmdlet-server141\"\r\n },\r\n \"EnvLocation\": {\r\n \"value\": \"West US\"\r\n }\r\n },\r\n \"mode\": \"Incremental\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2360" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db141\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server141\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:41:47.5836953Z\",\r\n \"correlationId\": \"95c4d46a-03a8-48bc-a4df-2430ec3f9b20\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databases/sql-audit-cmdlet-db141\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141/sql-audit-cmdlet-db141\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11974" + ], + "x-ms-request-id": [ + "95c4d46a-03a8-48bc-a4df-2430ec3f9b20" + ], + "x-ms-correlation-request-id": [ + "95c4d46a-03a8-48bc-a4df-2430ec3f9b20" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214148Z:95c4d46a-03a8-48bc-a4df-2430ec3f9b20" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:41:48 GMT" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799873" + ], + "x-ms-request-id": [ + "7a8cf6e4-8091-49b2-9a0c-6e3ba3f15bd1" + ], + "x-ms-correlation-request-id": [ + "7a8cf6e4-8091-49b2-9a0c-6e3ba3f15bd1" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214148Z:7a8cf6e4-8091-49b2-9a0c-6e3ba3f15bd1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:41:48 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799871" + ], + "x-ms-request-id": [ + "faaa06b9-0182-4627-8d8e-7186097ac7d9" + ], + "x-ms-correlation-request-id": [ + "faaa06b9-0182-4627-8d8e-7186097ac7d9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214152Z:faaa06b9-0182-4627-8d8e-7186097ac7d9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:41:51 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799869" + ], + "x-ms-request-id": [ + "16dc7b56-3802-4482-8b34-9e396767307b" + ], + "x-ms-correlation-request-id": [ + "16dc7b56-3802-4482-8b34-9e396767307b" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214155Z:16dc7b56-3802-4482-8b34-9e396767307b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:41:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799867" + ], + "x-ms-request-id": [ + "9552eb61-eacb-428e-ba84-d0288f5b5c34" + ], + "x-ms-correlation-request-id": [ + "9552eb61-eacb-428e-ba84-d0288f5b5c34" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214158Z:9552eb61-eacb-428e-ba84-d0288f5b5c34" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:41:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799865" + ], + "x-ms-request-id": [ + "fd2306b9-0141-42c6-ac4b-b94a5f9d664c" + ], + "x-ms-correlation-request-id": [ + "fd2306b9-0141-42c6-ac4b-b94a5f9d664c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214201Z:fd2306b9-0141-42c6-ac4b-b94a5f9d664c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799863" + ], + "x-ms-request-id": [ + "b76e751f-9b72-4462-ba9c-315791f7bc05" + ], + "x-ms-correlation-request-id": [ + "b76e751f-9b72-4462-ba9c-315791f7bc05" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214204Z:b76e751f-9b72-4462-ba9c-315791f7bc05" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799861" + ], + "x-ms-request-id": [ + "399a23d3-4bd1-4566-9ea5-dffd61f99b38" + ], + "x-ms-correlation-request-id": [ + "399a23d3-4bd1-4566-9ea5-dffd61f99b38" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214207Z:399a23d3-4bd1-4566-9ea5-dffd61f99b38" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:07 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799859" + ], + "x-ms-request-id": [ + "2046f40d-eff8-42fc-a4a5-88c6cc938567" + ], + "x-ms-correlation-request-id": [ + "2046f40d-eff8-42fc-a4a5-88c6cc938567" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214210Z:2046f40d-eff8-42fc-a4a5-88c6cc938567" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:09 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799857" + ], + "x-ms-request-id": [ + "c6c525d4-efe0-4cba-b9fc-fab3079dcc59" + ], + "x-ms-correlation-request-id": [ + "c6c525d4-efe0-4cba-b9fc-fab3079dcc59" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214213Z:c6c525d4-efe0-4cba-b9fc-fab3079dcc59" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799855" + ], + "x-ms-request-id": [ + "3f874f99-265d-4ddf-a652-296fb51a2de3" + ], + "x-ms-correlation-request-id": [ + "3f874f99-265d-4ddf-a652-296fb51a2de3" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214216Z:3f874f99-265d-4ddf-a652-296fb51a2de3" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:16 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799853" + ], + "x-ms-request-id": [ + "14a3adf4-fef9-4fca-ad56-50a5e468f150" + ], + "x-ms-correlation-request-id": [ + "14a3adf4-fef9-4fca-ad56-50a5e468f150" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214219Z:14a3adf4-fef9-4fca-ad56-50a5e468f150" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799851" + ], + "x-ms-request-id": [ + "917e29ab-daa8-4761-bbc8-7cfe92991a49" + ], + "x-ms-correlation-request-id": [ + "917e29ab-daa8-4761-bbc8-7cfe92991a49" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214222Z:917e29ab-daa8-4761-bbc8-7cfe92991a49" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:22 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799849" + ], + "x-ms-request-id": [ + "7bc6f0c3-99f8-429c-83bf-1dc1065f5e33" + ], + "x-ms-correlation-request-id": [ + "7bc6f0c3-99f8-429c-83bf-1dc1065f5e33" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214225Z:7bc6f0c3-99f8-429c-83bf-1dc1065f5e33" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:25 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799847" + ], + "x-ms-request-id": [ + "7c1f1027-c9b1-4478-b60a-ab3b7a625c28" + ], + "x-ms-correlation-request-id": [ + "7c1f1027-c9b1-4478-b60a-ab3b7a625c28" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214228Z:7c1f1027-c9b1-4478-b60a-ab3b7a625c28" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799845" + ], + "x-ms-request-id": [ + "0934a672-f079-4e09-a944-561112f57939" + ], + "x-ms-correlation-request-id": [ + "0934a672-f079-4e09-a944-561112f57939" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214231Z:0934a672-f079-4e09-a944-561112f57939" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:31 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799843" + ], + "x-ms-request-id": [ + "aac36998-bf7d-4e60-84b3-fcfff4481892" + ], + "x-ms-correlation-request-id": [ + "aac36998-bf7d-4e60-84b3-fcfff4481892" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214234Z:aac36998-bf7d-4e60-84b3-fcfff4481892" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:34 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799841" + ], + "x-ms-request-id": [ + "a44ae075-e12d-48be-a16d-1e3c1e849a44" + ], + "x-ms-correlation-request-id": [ + "a44ae075-e12d-48be-a16d-1e3c1e849a44" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214238Z:a44ae075-e12d-48be-a16d-1e3c1e849a44" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:38 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799839" + ], + "x-ms-request-id": [ + "d977ce37-d24d-4ecf-a86e-17f95797d0db" + ], + "x-ms-correlation-request-id": [ + "d977ce37-d24d-4ecf-a86e-17f95797d0db" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214241Z:d977ce37-d24d-4ecf-a86e-17f95797d0db" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": []\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "12" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799837" + ], + "x-ms-request-id": [ + "fadc9984-f086-4ec0-ba0e-87622fa4da4e" + ], + "x-ms-correlation-request-id": [ + "fadc9984-f086-4ec0-ba0e-87622fa4da4e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214244Z:fadc9984-f086-4ec0-ba0e-87622fa4da4e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup/operations/7BAF7DBAA77B3C08\",\r\n \"operationId\": \"7BAF7DBAA77B3C08\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:42:45.8274007Z\",\r\n \"trackingId\": \"70b8f54d-b340-4920-a366-ae94a767798d\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799835" + ], + "x-ms-request-id": [ + "47e551bd-e2a4-4b84-b41a-736d1565ada0" + ], + "x-ms-correlation-request-id": [ + "47e551bd-e2a4-4b84-b41a-736d1565ada0" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214247Z:47e551bd-e2a4-4b84-b41a-736d1565ada0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:47 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup/operations/7BAF7DBAA77B3C08\",\r\n \"operationId\": \"7BAF7DBAA77B3C08\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:42:45.8274007Z\",\r\n \"trackingId\": \"70b8f54d-b340-4920-a366-ae94a767798d\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "641" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799833" + ], + "x-ms-request-id": [ + "f5de19d3-20d1-4975-a14c-f3a616d03732" + ], + "x-ms-correlation-request-id": [ + "f5de19d3-20d1-4975-a14c-f3a616d03732" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214250Z:f5de19d3-20d1-4975-a14c-f3a616d03732" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup/operations/A5C30C6EE09ECB68\",\r\n \"operationId\": \"A5C30C6EE09ECB68\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:42:52.0646774Z\",\r\n \"trackingId\": \"402bf8a8-81ac-41d4-af34-3c5733b64a7d\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databases/sql-audit-cmdlet-db141\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141/sql-audit-cmdlet-db141\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup/operations/7BAF7DBAA77B3C08\",\r\n \"operationId\": \"7BAF7DBAA77B3C08\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:42:45.8274007Z\",\r\n \"trackingId\": \"70b8f54d-b340-4920-a366-ae94a767798d\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799831" + ], + "x-ms-request-id": [ + "3309746c-96b1-4a42-9ae9-90a70ae9b2e8" + ], + "x-ms-correlation-request-id": [ + "3309746c-96b1-4a42-9ae9-90a70ae9b2e8" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214253Z:3309746c-96b1-4a42-9ae9-90a70ae9b2e8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup/operations?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXAvb3BlcmF0aW9ucz8mYXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup/operations/A5C30C6EE09ECB68\",\r\n \"operationId\": \"A5C30C6EE09ECB68\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:42:52.0646774Z\",\r\n \"trackingId\": \"402bf8a8-81ac-41d4-af34-3c5733b64a7d\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databases/sql-audit-cmdlet-db141\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141/sql-audit-cmdlet-db141\"\r\n }\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup/operations/7BAF7DBAA77B3C08\",\r\n \"operationId\": \"7BAF7DBAA77B3C08\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:42:45.8274007Z\",\r\n \"trackingId\": \"70b8f54d-b340-4920-a366-ae94a767798d\",\r\n \"statusCode\": \"Created\",\r\n \"targetResource\": {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141\"\r\n }\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1337" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799829" + ], + "x-ms-request-id": [ + "85b10c39-71b0-4220-a780-5ec6bc30e1f1" + ], + "x-ms-correlation-request-id": [ + "85b10c39-71b0-4220-a780-5ec6bc30e1f1" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214257Z:85b10c39-71b0-4220-a780-5ec6bc30e1f1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db141\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server141\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Accepted\",\r\n \"timestamp\": \"2014-10-31T21:41:47.5836953Z\",\r\n \"correlationId\": \"95c4d46a-03a8-48bc-a4df-2430ec3f9b20\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databases/sql-audit-cmdlet-db141\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141/sql-audit-cmdlet-db141\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1625" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799872" + ], + "x-ms-request-id": [ + "e89324ae-b2fa-44fe-b3f9-244f14d5bc67" + ], + "x-ms-correlation-request-id": [ + "e89324ae-b2fa-44fe-b3f9-244f14d5bc67" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214149Z:e89324ae-b2fa-44fe-b3f9-244f14d5bc67" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:41:49 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db141\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server141\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:41:50.2877903Z\",\r\n \"correlationId\": \"95c4d46a-03a8-48bc-a4df-2430ec3f9b20\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databases/sql-audit-cmdlet-db141\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141/sql-audit-cmdlet-db141\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799870" + ], + "x-ms-request-id": [ + "cf79ba9b-e013-4894-b235-7fef330450af" + ], + "x-ms-correlation-request-id": [ + "cf79ba9b-e013-4894-b235-7fef330450af" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214152Z:cf79ba9b-e013-4894-b235-7fef330450af" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:41:52 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db141\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server141\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:41:50.2877903Z\",\r\n \"correlationId\": \"95c4d46a-03a8-48bc-a4df-2430ec3f9b20\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databases/sql-audit-cmdlet-db141\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141/sql-audit-cmdlet-db141\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799868" + ], + "x-ms-request-id": [ + "40b1a76d-0322-48f0-b669-5955a7c38c1a" + ], + "x-ms-correlation-request-id": [ + "40b1a76d-0322-48f0-b669-5955a7c38c1a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214155Z:40b1a76d-0322-48f0-b669-5955a7c38c1a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:41:55 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db141\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server141\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:41:50.2877903Z\",\r\n \"correlationId\": \"95c4d46a-03a8-48bc-a4df-2430ec3f9b20\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databases/sql-audit-cmdlet-db141\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141/sql-audit-cmdlet-db141\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799866" + ], + "x-ms-request-id": [ + "eb0967b8-cc2a-4b16-99a8-bd4a6be5c1bc" + ], + "x-ms-correlation-request-id": [ + "eb0967b8-cc2a-4b16-99a8-bd4a6be5c1bc" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214158Z:eb0967b8-cc2a-4b16-99a8-bd4a6be5c1bc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:41:58 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db141\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server141\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:41:50.2877903Z\",\r\n \"correlationId\": \"95c4d46a-03a8-48bc-a4df-2430ec3f9b20\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databases/sql-audit-cmdlet-db141\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141/sql-audit-cmdlet-db141\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799864" + ], + "x-ms-request-id": [ + "7bf9f832-4d45-40b0-881e-b88b3c6ece06" + ], + "x-ms-correlation-request-id": [ + "7bf9f832-4d45-40b0-881e-b88b3c6ece06" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214201Z:7bf9f832-4d45-40b0-881e-b88b3c6ece06" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:01 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db141\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server141\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:41:50.2877903Z\",\r\n \"correlationId\": \"95c4d46a-03a8-48bc-a4df-2430ec3f9b20\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databases/sql-audit-cmdlet-db141\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141/sql-audit-cmdlet-db141\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799862" + ], + "x-ms-request-id": [ + "2cbf07f6-6c69-4861-8a80-d10887cfec61" + ], + "x-ms-correlation-request-id": [ + "2cbf07f6-6c69-4861-8a80-d10887cfec61" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214204Z:2cbf07f6-6c69-4861-8a80-d10887cfec61" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db141\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server141\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:41:50.2877903Z\",\r\n \"correlationId\": \"95c4d46a-03a8-48bc-a4df-2430ec3f9b20\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databases/sql-audit-cmdlet-db141\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141/sql-audit-cmdlet-db141\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799860" + ], + "x-ms-request-id": [ + "5baabac7-48fb-4b20-b07e-e0c6fd7ed4df" + ], + "x-ms-correlation-request-id": [ + "5baabac7-48fb-4b20-b07e-e0c6fd7ed4df" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214207Z:5baabac7-48fb-4b20-b07e-e0c6fd7ed4df" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:07 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db141\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server141\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:41:50.2877903Z\",\r\n \"correlationId\": \"95c4d46a-03a8-48bc-a4df-2430ec3f9b20\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databases/sql-audit-cmdlet-db141\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141/sql-audit-cmdlet-db141\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799858" + ], + "x-ms-request-id": [ + "75c5a911-31c6-460d-b731-28b19a02d03c" + ], + "x-ms-correlation-request-id": [ + "75c5a911-31c6-460d-b731-28b19a02d03c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214210Z:75c5a911-31c6-460d-b731-28b19a02d03c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:10 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db141\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server141\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:41:50.2877903Z\",\r\n \"correlationId\": \"95c4d46a-03a8-48bc-a4df-2430ec3f9b20\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databases/sql-audit-cmdlet-db141\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141/sql-audit-cmdlet-db141\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799856" + ], + "x-ms-request-id": [ + "c1acb37c-2e6b-416e-b838-abcac2eb234f" + ], + "x-ms-correlation-request-id": [ + "c1acb37c-2e6b-416e-b838-abcac2eb234f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214213Z:c1acb37c-2e6b-416e-b838-abcac2eb234f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:13 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db141\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server141\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:41:50.2877903Z\",\r\n \"correlationId\": \"95c4d46a-03a8-48bc-a4df-2430ec3f9b20\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databases/sql-audit-cmdlet-db141\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141/sql-audit-cmdlet-db141\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799854" + ], + "x-ms-request-id": [ + "40a2fc0c-0e4e-4758-8072-ccf63eb5e88c" + ], + "x-ms-correlation-request-id": [ + "40a2fc0c-0e4e-4758-8072-ccf63eb5e88c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214217Z:40a2fc0c-0e4e-4758-8072-ccf63eb5e88c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:16 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db141\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server141\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:41:50.2877903Z\",\r\n \"correlationId\": \"95c4d46a-03a8-48bc-a4df-2430ec3f9b20\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databases/sql-audit-cmdlet-db141\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141/sql-audit-cmdlet-db141\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799852" + ], + "x-ms-request-id": [ + "116aec6f-90e9-4919-9db1-9a36ad36c4a9" + ], + "x-ms-correlation-request-id": [ + "116aec6f-90e9-4919-9db1-9a36ad36c4a9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214220Z:116aec6f-90e9-4919-9db1-9a36ad36c4a9" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:19 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db141\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server141\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:41:50.2877903Z\",\r\n \"correlationId\": \"95c4d46a-03a8-48bc-a4df-2430ec3f9b20\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databases/sql-audit-cmdlet-db141\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141/sql-audit-cmdlet-db141\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799850" + ], + "x-ms-request-id": [ + "dd5343a6-67bd-4c09-a471-01e069239ab7" + ], + "x-ms-correlation-request-id": [ + "dd5343a6-67bd-4c09-a471-01e069239ab7" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214223Z:dd5343a6-67bd-4c09-a471-01e069239ab7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:23 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db141\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server141\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:41:50.2877903Z\",\r\n \"correlationId\": \"95c4d46a-03a8-48bc-a4df-2430ec3f9b20\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databases/sql-audit-cmdlet-db141\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141/sql-audit-cmdlet-db141\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799848" + ], + "x-ms-request-id": [ + "f8813eac-9973-4f03-9dd0-67cb9d9e3d1c" + ], + "x-ms-correlation-request-id": [ + "f8813eac-9973-4f03-9dd0-67cb9d9e3d1c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214226Z:f8813eac-9973-4f03-9dd0-67cb9d9e3d1c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:25 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db141\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server141\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:41:50.2877903Z\",\r\n \"correlationId\": \"95c4d46a-03a8-48bc-a4df-2430ec3f9b20\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databases/sql-audit-cmdlet-db141\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141/sql-audit-cmdlet-db141\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799846" + ], + "x-ms-request-id": [ + "f7292717-bd9b-4620-a2f6-cdf76ca219c2" + ], + "x-ms-correlation-request-id": [ + "f7292717-bd9b-4620-a2f6-cdf76ca219c2" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214229Z:f7292717-bd9b-4620-a2f6-cdf76ca219c2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:28 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db141\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server141\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:41:50.2877903Z\",\r\n \"correlationId\": \"95c4d46a-03a8-48bc-a4df-2430ec3f9b20\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databases/sql-audit-cmdlet-db141\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141/sql-audit-cmdlet-db141\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799844" + ], + "x-ms-request-id": [ + "f6cda8f3-f87b-498d-87c9-687b2218e5df" + ], + "x-ms-correlation-request-id": [ + "f6cda8f3-f87b-498d-87c9-687b2218e5df" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214232Z:f6cda8f3-f87b-498d-87c9-687b2218e5df" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:31 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db141\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server141\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:41:50.2877903Z\",\r\n \"correlationId\": \"95c4d46a-03a8-48bc-a4df-2430ec3f9b20\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databases/sql-audit-cmdlet-db141\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141/sql-audit-cmdlet-db141\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799842" + ], + "x-ms-request-id": [ + "d3e89bc1-f051-4745-b299-50a2677f137c" + ], + "x-ms-correlation-request-id": [ + "d3e89bc1-f051-4745-b299-50a2677f137c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214235Z:d3e89bc1-f051-4745-b299-50a2677f137c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:35 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db141\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server141\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:41:50.2877903Z\",\r\n \"correlationId\": \"95c4d46a-03a8-48bc-a4df-2430ec3f9b20\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databases/sql-audit-cmdlet-db141\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141/sql-audit-cmdlet-db141\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799840" + ], + "x-ms-request-id": [ + "1aaf9e69-5146-470f-b9b7-b5d04a257d3c" + ], + "x-ms-correlation-request-id": [ + "1aaf9e69-5146-470f-b9b7-b5d04a257d3c" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214238Z:1aaf9e69-5146-470f-b9b7-b5d04a257d3c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:38 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db141\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server141\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:41:50.2877903Z\",\r\n \"correlationId\": \"95c4d46a-03a8-48bc-a4df-2430ec3f9b20\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databases/sql-audit-cmdlet-db141\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141/sql-audit-cmdlet-db141\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799838" + ], + "x-ms-request-id": [ + "816a51e7-8058-4701-bc35-de897d411daf" + ], + "x-ms-correlation-request-id": [ + "816a51e7-8058-4701-bc35-de897d411daf" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214241Z:816a51e7-8058-4701-bc35-de897d411daf" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:41 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db141\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server141\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:41:50.2877903Z\",\r\n \"correlationId\": \"95c4d46a-03a8-48bc-a4df-2430ec3f9b20\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databases/sql-audit-cmdlet-db141\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141/sql-audit-cmdlet-db141\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799836" + ], + "x-ms-request-id": [ + "33832365-6e69-4991-909f-f17e8fca9e24" + ], + "x-ms-correlation-request-id": [ + "33832365-6e69-4991-909f-f17e8fca9e24" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214244Z:33832365-6e69-4991-909f-f17e8fca9e24" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:44 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db141\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server141\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:41:50.2877903Z\",\r\n \"correlationId\": \"95c4d46a-03a8-48bc-a4df-2430ec3f9b20\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databases/sql-audit-cmdlet-db141\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141/sql-audit-cmdlet-db141\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799834" + ], + "x-ms-request-id": [ + "c19c7c0e-ae4e-4e0f-94b6-1bb70d5ca277" + ], + "x-ms-correlation-request-id": [ + "c19c7c0e-ae4e-4e0f-94b6-1bb70d5ca277" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214248Z:c19c7c0e-ae4e-4e0f-94b6-1bb70d5ca277" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:47 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db141\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server141\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:41:50.2877903Z\",\r\n \"correlationId\": \"95c4d46a-03a8-48bc-a4df-2430ec3f9b20\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databases/sql-audit-cmdlet-db141\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141/sql-audit-cmdlet-db141\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799832" + ], + "x-ms-request-id": [ + "fa495b81-4d34-4bb4-bf2a-bcfebe391791" + ], + "x-ms-correlation-request-id": [ + "fa495b81-4d34-4bb4-bf2a-bcfebe391791" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214251Z:fa495b81-4d34-4bb4-bf2a-bcfebe391791" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:50 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db141\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server141\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Running\",\r\n \"timestamp\": \"2014-10-31T21:41:50.2877903Z\",\r\n \"correlationId\": \"95c4d46a-03a8-48bc-a4df-2430ec3f9b20\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databases/sql-audit-cmdlet-db141\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141/sql-audit-cmdlet-db141\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1624" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799830" + ], + "x-ms-request-id": [ + "c2e123d2-6667-4509-b1e5-80344784a8dc" + ], + "x-ms-correlation-request-id": [ + "c2e123d2-6667-4509-b1e5-80344784a8dc" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214254Z:c2e123d2-6667-4509-b1e5-80344784a8dc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:53 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup?api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9kZXBsb3ltZW50cy9zcWwtYXVkaXQtdGVzdC1lbnYtc2V0dXA/YXBpLXZlcnNpb249MjAxNC0wNC0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/deployments/sql-audit-test-env-setup\",\r\n \"name\": \"sql-audit-test-env-setup\",\r\n \"properties\": {\r\n \"parameters\": {\r\n \"administratorLogin\": {\r\n \"type\": \"String\",\r\n \"value\": \"testlogin\"\r\n },\r\n \"administratorLoginPassword\": {\r\n \"type\": \"SecureString\"\r\n },\r\n \"collation\": {\r\n \"type\": \"String\",\r\n \"value\": \"SQL_Latin1_General_CP1_CI_AS\"\r\n },\r\n \"databaseName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-db141\"\r\n },\r\n \"edition\": {\r\n \"type\": \"String\",\r\n \"value\": \"Basic\"\r\n },\r\n \"configuredServiceLevelObjectiveId\": {\r\n \"type\": \"String\",\r\n \"value\": \"910b4fcb-8a29-4c3e-958f-f7ba794388b2\"\r\n },\r\n \"envLocation\": {\r\n \"type\": \"String\",\r\n \"value\": \"West US\"\r\n },\r\n \"serverName\": {\r\n \"type\": \"String\",\r\n \"value\": \"sql-audit-cmdlet-server141\"\r\n }\r\n },\r\n \"mode\": \"Incremental\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"timestamp\": \"2014-10-31T21:42:56.3440888Z\",\r\n \"correlationId\": \"95c4d46a-03a8-48bc-a4df-2430ec3f9b20\",\r\n \"providers\": [\r\n {\r\n \"namespace\": \"Microsoft.Sql\",\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"servers\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"servers/databases\",\r\n \"locations\": [\r\n \"westus\"\r\n ]\r\n }\r\n ]\r\n }\r\n ],\r\n \"dependencies\": [\r\n {\r\n \"dependsOn\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141\",\r\n \"resourceType\": \"Microsoft.Sql/servers\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141\"\r\n }\r\n ],\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databases/sql-audit-cmdlet-db141\",\r\n \"resourceType\": \"Microsoft.Sql/servers/databases\",\r\n \"resourceName\": \"sql-audit-cmdlet-server141/sql-audit-cmdlet-db141\"\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1626" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799828" + ], + "x-ms-request-id": [ + "300cfaea-2711-4a37-8edf-91468a21f0f4" + ], + "x-ms-correlation-request-id": [ + "300cfaea-2711-4a37-8edf-91468a21f0f4" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214257Z:300cfaea-2711-4a37-8edf-91468a21f0f4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:57 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/resources?&api-version=2014-04-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9yZXNvdXJjZXM/JmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141\",\r\n \"name\": \"sql-audit-cmdlet-server141\",\r\n \"type\": \"Microsoft.Sql/servers\",\r\n \"location\": \"westus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databases/sql-audit-cmdlet-db141\",\r\n \"name\": \"sql-audit-cmdlet-server141/sql-audit-cmdlet-db141\",\r\n \"type\": \"Microsoft.Sql/servers/databases\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "577" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799827" + ], + "x-ms-request-id": [ + "8d3a2625-30be-44c6-921e-3b67ad5f770a" + ], + "x-ms-correlation-request-id": [ + "8d3a2625-30be-44c6-921e-3b67ad5f770a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214259Z:8d3a2625-30be-44c6-921e-3b67ad5f770a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:42:59 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourcegroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Authorization/permissions?api-version=2014-07-01-preview", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlZ3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9wcm92aWRlcnMvTWljcm9zb2Z0LkF1dGhvcml6YXRpb24vcGVybWlzc2lvbnM/YXBpLXZlcnNpb249MjAxNC0wNy0wMS1wcmV2aWV3", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Authorization.AuthorizationManagementClient/0.9.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"actions\": [\r\n \"*\"\r\n ],\r\n \"notActions\": []\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "45" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "westeurope:3815ac13-480a-4441-9cd5-f98f6be2c7f8" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799579" + ], + "x-ms-correlation-request-id": [ + "49ceb2a6-3753-4629-93ce-6caaf84759f6" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214300Z:49ceb2a6-3753-4629-93ce-6caaf84759f6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:43:00 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMTQxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "be338881-8ed9-4002-8119-3f969b7f3e68-2014-10-31 21:43:02Z" + ], + "x-ms-client-request-id": [ + "c9bd30f4-c12a-41e8-98f3-8dabbfe477c4-2014-10-31 21:43:02Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets141\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets141.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server141.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server141;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server141.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server141;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server141.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server141.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server141\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server141.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server141.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server141;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server141.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2924" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "b1591e5e-c806-4b45-995c-76c14da5b01b" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799826" + ], + "x-ms-correlation-request-id": [ + "152a076a-ca20-4707-a3ad-253ca7b5c42d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214303Z:152a076a-ca20-4707-a3ad-253ca7b5c42d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:43:02 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMTQxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "be338881-8ed9-4002-8119-3f969b7f3e68-2014-10-31 21:43:02Z" + ], + "x-ms-client-request-id": [ + "3f10ce04-4416-41ce-84c3-52920b9cef5b-2014-10-31 21:43:08Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets141\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets141.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server141.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;User ID={0}@sql-audit-cmdlet-server141;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server141.database.secure.windows.net,1433;Database=c3d905bb-e460-48bb-884d-75fac8f63e11;Uid={0}@sql-audit-cmdlet-server141;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server141.database.secure.windows.net,1433 \\r\\nSQL Database: c3d905bb-e460-48bb-884d-75fac8f63e11\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server141.database.secure.windows.net,1433; Database = c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server141\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"c3d905bb-e460-48bb-884d-75fac8f63e11\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server141.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server141.database.secure.windows.net:1433;database=c3d905bb-e460-48bb-884d-75fac8f63e11;user={0}@sql-audit-cmdlet-server141;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server141.database.secure.windows.net\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2924" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "462ee709-95a1-4526-9e52-fe28df86b619" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799824" + ], + "x-ms-correlation-request-id": [ + "d521c979-4052-4324-a7e8-60ffc9b746b6" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214310Z:d521c979-4052-4324-a7e8-60ffc9b746b6" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:43:10 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets141/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzMTQxL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "be338881-8ed9-4002-8119-3f969b7f3e68-2014-10-31 21:43:02Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"oCMhB8MOEd8KMI29uv7XrYoNoRO8C25iXSbrlL1GbdbCvNs+Njs1FD+vVNEIK0sJjYB4SKKMkuYnH5bSbvtAaQ==\",\r\n \"secondaryKey\": \"XNnj5y/2ZnKVHEtg9vCRdoHT6E6et8JPgiFGD+2c23drWAxzcICmKuLXk73jcFuRuU7V5/QUPdVbfPKAlwNZpA==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:37a49e30-53e7-49fb-b041-ef51bcd4a0a3" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11973" + ], + "x-ms-correlation-request-id": [ + "da292384-4e70-47b5-b231-9e4ecaf105d7" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214304Z:da292384-4e70-47b5-b231-9e4ecaf105d7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:43:04 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/auditcmdlets141/listKeys?api-version=2014-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtU3RvcmFnZS1XZXN0VVMvcHJvdmlkZXJzL01pY3Jvc29mdC5DbGFzc2ljU3RvcmFnZS9zdG9yYWdlQWNjb3VudHMvYXVkaXRjbWRsZXRzMTQxL2xpc3RLZXlzP2FwaS12ZXJzaW9uPTIwMTQtMDYtMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "be338881-8ed9-4002-8119-3f969b7f3e68-2014-10-31 21:43:02Z" + ], + "x-ms-client-request-id": [ + "none" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"oCMhB8MOEd8KMI29uv7XrYoNoRO8C25iXSbrlL1GbdbCvNs+Njs1FD+vVNEIK0sJjYB4SKKMkuYnH5bSbvtAaQ==\",\r\n \"secondaryKey\": \"XNnj5y/2ZnKVHEtg9vCRdoHT6E6et8JPgiFGD+2c23drWAxzcICmKuLXk73jcFuRuU7V5/QUPdVbfPKAlwNZpA==\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "211" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "southcentralus:af87f02e-1116-47ce-b494-66e05b87e22e" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11971" + ], + "x-ms-correlation-request-id": [ + "9e5721db-d7dc-4a78-81c6-4cffd9c21122" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214311Z:9e5721db-d7dc-4a78-81c6-4cffd9c21122" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:43:11 GMT" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMTQxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9jM2Q5MDViYi1lNDYwLTQ4YmItODg0ZC03NWZhYzhmNjNlMTE/YXBpLXZlcnNpb249MjAxNC0wNC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets141\",\r\n \"storageAccountKey\": \"oCMhB8MOEd8KMI29uv7XrYoNoRO8C25iXSbrlL1GbdbCvNs+Njs1FD+vVNEIK0sJjYB4SKKMkuYnH5bSbvtAaQ==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets141.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "784" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "be338881-8ed9-4002-8119-3f969b7f3e68-2014-10-31 21:43:02Z" + ], + "x-ms-client-request-id": [ + "c9bd30f4-c12a-41e8-98f3-8dabbfe477c4-2014-10-31 21:43:02Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets141\",\r\n \"storageAccountKey\": \"oCMhB8MOEd8KMI29uv7XrYoNoRO8C25iXSbrlL1GbdbCvNs+Njs1FD+vVNEIK0sJjYB4SKKMkuYnH5bSbvtAaQ==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets141.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": false,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databaseSecurityPolicies/c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"name\": \"c3d905bb-e460-48bb-884d-75fac8f63e11\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1183" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "87754807-a404-45ff-aaf6-f40a318f2a8d" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11972" + ], + "x-ms-correlation-request-id": [ + "d22924e4-6e0a-45d7-be37-b65ff59272d1" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214307Z:d22924e4-6e0a-45d7-be37-b65ff59272d1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:43:07 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databaseSecurityPolicies/sql-audit-cmdlet-db141?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMTQxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiMTQxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "be338881-8ed9-4002-8119-3f969b7f3e68-2014-10-31 21:43:02Z" + ], + "x-ms-client-request-id": [ + "3f10ce04-4416-41ce-84c3-52920b9cef5b-2014-10-31 21:43:08Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets141\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets141.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server141.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db141;User ID={0}@sql-audit-cmdlet-server141;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server141.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db141;Uid={0}@sql-audit-cmdlet-server141;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server141.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db141\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server141.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db141\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server141\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db141\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server141.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server141.database.secure.windows.net:1433;database=sql-audit-cmdlet-db141;user={0}@sql-audit-cmdlet-server141;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server141.database.secure.windows.net\",\r\n \"useServerDefault\": true,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databaseSecurityPolicies/sql-audit-cmdlet-db141\",\r\n \"name\": \"sql-audit-cmdlet-db141\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2811" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "a710ceb0-dc72-4314-a7e3-7ff9d1d913d8" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799825" + ], + "x-ms-correlation-request-id": [ + "f9ff7984-a6e9-4822-bade-b45bfa7d706a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214308Z:f9ff7984-a6e9-4822-bade-b45bfa7d706a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:43:08 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databaseSecurityPolicies/sql-audit-cmdlet-db141?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMTQxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiMTQxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "be338881-8ed9-4002-8119-3f969b7f3e68-2014-10-31 21:43:02Z" + ], + "x-ms-client-request-id": [ + "10b2dea7-cdf0-48b9-bced-f7dc94aaade7-2014-10-31 21:43:14Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets141\",\r\n \"storageAccountKey\": \"********\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets141.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": \"Server=tcp:sql-audit-cmdlet-server141.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db141;User ID={0}@sql-audit-cmdlet-server141;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;\",\r\n \"odbcConnectionString\": \"Driver={SQL Server Native Client 11.0};Server=tcp:sql-audit-cmdlet-server141.database.secure.windows.net,1433;Database=sql-audit-cmdlet-db141;Uid={0}@sql-audit-cmdlet-server141;Pwd={your_password_here};Encrypt=yes;Connection Timeout=30;\",\r\n \"phpConnectionString\": \"Server: sql-audit-cmdlet-server141.database.secure.windows.net,1433 \\r\\nSQL Database: sql-audit-cmdlet-db141\\r\\nUser Name: {0}\\r\\n\\r\\nPHP Data Objects(PDO) Sample Code:\\r\\n\\r\\ntry {\\r\\n $conn = new PDO ( \\\"sqlsrv:server = tcp:sql-audit-cmdlet-server141.database.secure.windows.net,1433; Database = sql-audit-cmdlet-db141\\\", \\\"{0}\\\", \\\"{your_password_here}\\\");\\r\\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\\r\\n}\\r\\ncatch ( PDOException $e ) {\\r\\n print( \\\"Error connecting to SQL Server.\\\" );\\r\\n die(print_r($e));\\r\\n}\\r\\n\\rSQL Server Extension Sample Code:\\r\\n\\r\\n$connectionInfo = array(\\\"UID\\\" => \\\"{0}@sql-audit-cmdlet-server141\\\", \\\"pwd\\\" => \\\"{your_password_here}\\\", \\\"Database\\\" => \\\"sql-audit-cmdlet-db141\\\", \\\"LoginTimeout\\\" => 30, \\\"Encrypt\\\" => 1);\\r\\n$serverName = \\\"tcp:sql-audit-cmdlet-server141.database.secure.windows.net,1433\\\";\\r\\n$conn = sqlsrv_connect($serverName, $connectionInfo);\",\r\n \"jdbcConnectionString\": \"jdbc:sqlserver://sql-audit-cmdlet-server141.database.secure.windows.net:1433;database=sql-audit-cmdlet-db141;user={0}@sql-audit-cmdlet-server141;password={your_password_here};encrypt=true;hostNameInCertificate=*.database.secure.windows.net;loginTimeout=30;\",\r\n \"proxyDnsName\": \"sql-audit-cmdlet-server141.database.secure.windows.net\",\r\n \"useServerDefault\": true,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databaseSecurityPolicies/sql-audit-cmdlet-db141\",\r\n \"name\": \"sql-audit-cmdlet-db141\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": \"West US\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "2811" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "2e030987-6114-4d3d-83d0-53e9f25aa582" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "799823" + ], + "x-ms-correlation-request-id": [ + "a3316a48-486f-4bd1-a1b4-d77e1a0a185d" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214316Z:a3316a48-486f-4bd1-a1b4-d77e1a0a185d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:43:16 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databaseSecurityPolicies/sql-audit-cmdlet-db141?api-version=2014-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvY2NhMjRlYzgtOTliNS00YWE3LTlmZjYtNDg2ZTg4NmYzMDRjL3Jlc291cmNlR3JvdXBzL3NxbC1hdWRpdC1jbWRsZXQtdGVzdC1yZzE0MS9wcm92aWRlcnMvTWljcm9zb2Z0LlNxbC9zZXJ2ZXJzL3NxbC1hdWRpdC1jbWRsZXQtc2VydmVyMTQxL2RhdGFiYXNlU2VjdXJpdHlQb2xpY2llcy9zcWwtYXVkaXQtY21kbGV0LWRiMTQxP2FwaS12ZXJzaW9uPTIwMTQtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets141\",\r\n \"storageAccountKey\": \"oCMhB8MOEd8KMI29uv7XrYoNoRO8C25iXSbrlL1GbdbCvNs+Njs1FD+vVNEIK0sJjYB4SKKMkuYnH5bSbvtAaQ==\",\r\n \"storageTableEndpoint\": \"https://auditcmdlets141.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"useServerDefault\": true,\r\n \"isBlockDirectAccessEnabled\": false\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json" + ], + "Content-Length": [ + "783" + ], + "User-Agent": [ + "Microsoft.Azure.Management.Sql.SqlManagementClient/0.9.0.0" + ], + "x-ms-client-session-id": [ + "be338881-8ed9-4002-8119-3f969b7f3e68-2014-10-31 21:43:02Z" + ], + "x-ms-client-request-id": [ + "3f10ce04-4416-41ce-84c3-52920b9cef5b-2014-10-31 21:43:08Z" + ] + }, + "ResponseBody": "{\r\n \"properties\": {\r\n \"isAuditingEnabled\": true,\r\n \"retentionDays\": 90,\r\n \"isEventTypeDataAccessEnabled\": true,\r\n \"isEventTypeSchemaChangeEnabled\": true,\r\n \"isEventTypeDataChangesEnabled\": true,\r\n \"isEventTypeSecurityExceptionsEnabled\": true,\r\n \"isEventTypeGrantRevokePermissionsEnabled\": true,\r\n \"storageAccountName\": \"auditcmdlets141\",\r\n \"storageAccountKey\": \"oCMhB8MOEd8KMI29uv7XrYoNoRO8C25iXSbrlL1GbdbCvNs+Njs1FD+vVNEIK0sJjYB4SKKMkuYnH5bSbvtAaQ==\",\r\n \"secondaryStorageAccountKey\": null,\r\n \"storageTableEndpoint\": \"https://auditcmdlets141.table.core.windows.net/\",\r\n \"storageAccountResourceGroupName\": \"Default-Storage-WestUS\",\r\n \"storageAccountSubscriptionId\": \"cca24ec8-99b5-4aa7-9ff6-486e886f304c\",\r\n \"adoNetConnectionString\": null,\r\n \"odbcConnectionString\": null,\r\n \"phpConnectionString\": null,\r\n \"jdbcConnectionString\": null,\r\n \"proxyDnsName\": null,\r\n \"useServerDefault\": true,\r\n \"isBlockDirectAccessEnabled\": false\r\n },\r\n \"id\": \"/subscriptions/cca24ec8-99b5-4aa7-9ff6-486e886f304c/resourceGroups/sql-audit-cmdlet-test-rg141/providers/Microsoft.Sql/servers/sql-audit-cmdlet-server141/databaseSecurityPolicies/sql-audit-cmdlet-db141\",\r\n \"name\": \"sql-audit-cmdlet-db141\",\r\n \"type\": \"Microsoft.Sql/servers/databaseSecurityPolicies\",\r\n \"location\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1154" + ], + "Content-Type": [ + "application/json; odata=minimalmetadata; streaming=true; charset=utf-8" + ], + "x-ms-request-id": [ + "b72424ff-c652-4776-972c-3e62964b603a" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Preference-Applied": [ + "return-content" + ], + "DataServiceVersion": [ + "3.0;" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "11970" + ], + "x-ms-correlation-request-id": [ + "dc6ff6fb-7b05-4379-9698-dc5d2a8bebba" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20141031T214313Z:dc6ff6fb-7b05-4379-9698-dc5d2a8bebba" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-store, no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:43:13 GMT" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/services/storageservices/auditcmdlets141", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9zZXJ2aWNlcy9zdG9yYWdlc2VydmljZXMvYXVkaXRjbWRsZXRzMTQx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Storage.StorageManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "dbe1824669c6242c92f59c1a46c47cb0" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:43:20 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/cca24ec8-99b5-4aa7-9ff6-486e886f304c/operations/dbe1824669c6242c92f59c1a46c47cb0", + "EncodedRequestUri": "L2NjYTI0ZWM4LTk5YjUtNGFhNy05ZmY2LTQ4NmU4ODZmMzA0Yy9vcGVyYXRpb25zL2RiZTE4MjQ2NjljNjI0MmM5MmY1OWMxYTQ2YzQ3Y2Iw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-10-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/2.0.0.0", + "AzurePowershell/v0.8.10" + ] + }, + "ResponseBody": "\r\n dbe18246-69c6-242c-92f5-9c1a46c47cb0\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "Content-Length": [ + "232" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "dbc751795eb6266ebe309253acce537e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 31 Oct 2014 21:43:22 GMT" + ], + "Server": [ + "1.0.6198.153", + "(rd_rdfe_stable.141027-2149)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "cca24ec8-99b5-4aa7-9ff6-486e886f304c" + } +} \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/Templates/sql-audit-test-env-setup.json b/src/ResourceManager/Sql/Commands.Sql.Test/Templates/sql-audit-test-env-setup.json new file mode 100644 index 000000000000..8510a0b96361 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/Templates/sql-audit-test-env-setup.json @@ -0,0 +1,67 @@ +{ + "$schema": "http://schemas.management.azure.com/deploymentTemplate?api-version=2014-04-01-preview", + "contentVersion": "1.0.0.0", + "parameters": { + "administratorLogin": { + "type": "string", + "defaultValue": "testlogin" + + }, + "administratorLoginPassword": { + "type": "securestring", + "defaultValue": "testp@ssMakingIt1007Longer" + }, + "collation": { + "type": "string", + "defaultValue": "SQL_Latin1_General_CP1_CI_AS" + }, + "databaseName": { + "type": "string" + }, + "edition": { + "type": "string", + "defaultValue": "Basic" + }, + "configuredServiceLevelObjectiveId": { + "type": "string", + "defaultValue": "910b4fcb-8a29-4c3e-958f-f7ba794388b2" + }, + "EnvLocation": { + "type": "string" + }, + "serverName": { + "type": "string" + } + + }, + "resources": [ + { + "apiVersion": "2.0", + "location": "[parameters('EnvLocation')]", + "name": "[parameters('serverName')]", + "properties": { + "administratorLogin": "[parameters('administratorLogin')]", + "administratorLoginPassword": "[parameters('administratorLoginPassword')]" + }, + "resources": [ + { + "apiVersion": "2.0", + "dependsOn": [ + "[concat('Microsoft.Sql/servers/', parameters('serverName'))]" + ], + "location": "[parameters('EnvLocation')]", + "name": "[parameters('databaseName')]", + "properties": { + "collation": "[parameters('collation')]", + "edition": "[parameters('edition')]", + "maxSizeBytes": "1073741824" + }, + "type": "databases" + } + + ], + "type": "Microsoft.Sql/servers" + } + + ] +} diff --git a/src/ResourceManager/Sql/Commands.Sql.Test/packages.config b/src/ResourceManager/Sql/Commands.Sql.Test/packages.config new file mode 100644 index 000000000000..5c5fc03033b0 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql.Test/packages.config @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql/Commands.Sql.csproj b/src/ResourceManager/Sql/Commands.Sql/Commands.Sql.csproj new file mode 100644 index 000000000000..4e6abf259975 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/Commands.Sql.csproj @@ -0,0 +1,182 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {69ED499E-6F3C-488F-86B8-B74CFDA4D47E} + Library + Properties + Microsoft.Azure.Commands.Sql + Microsoft.Azure.Commands.Sql + v4.5 + 512 + + ..\..\..\ + true + + + true + full + false + ..\..\..\Package\Debug\ResourceManager\AzureResourceManager\Sql + DEBUG;TRACE + prompt + 4 + true + true + false + + + OnBuildSuccess + + + true + MSSharedLibKey.snk + true + ..\..\..\Package\Release\ResourceManager\AzureResourceManager\Sql\ + TRACE;SIGN + true + pdbonly + AnyCPU + bin\Release\Microsoft.Azure.Management.SqlDatabase.dll.CodeAnalysisLog.xml + true + GlobalSuppressions.cs + prompt + MinimumRecommendedRules.ruleset + ;$(ProgramFiles)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\Rule Sets + ;$(ProgramFiles)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\FxCop\Rules + true + false + + + + + True + True + Resources.resx + + + + + + + + + + + + + + + + + + + + + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + + + False + ..\..\..\packages\Microsoft.Azure.Management.Sql.0.14.0-prerelease\lib\net40\Microsoft.Azure.Management.Sql.dll + + + False + ..\..\..\packages\Microsoft.Azure.Management.Resources.2.7.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll + + + ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll + + + ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll + + + ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.1.8.0.0\lib\net35-full\Microsoft.WindowsAzure.Configuration.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.2.1.0\lib\net40\Microsoft.WindowsAzure.Management.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.3.1.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll + + + False + ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll + + + False + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + + + + + + False + ..\..\..\..\..\..\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Management.Automation\v4.0_3.0.0.0__31bf3856ad364e35\System.Management.Automation.dll + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll + + + + + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + + + Designer + Always + + + + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql/MSSharedLibKey.snk b/src/ResourceManager/Sql/Commands.Sql/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ResourceManager/Sql/Commands.Sql/MSSharedLibKey.snk differ diff --git a/src/ResourceManager/Sql/Commands.Sql/Microsoft.Azure.Commands.Sql.dll-Help.psd1 b/src/ResourceManager/Sql/Commands.Sql/Microsoft.Azure.Commands.Sql.dll-Help.psd1 new file mode 100644 index 000000000000..f6ee542d13a7 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/Microsoft.Azure.Commands.Sql.dll-Help.psd1 @@ -0,0 +1,88 @@ +# +# Module manifest for module 'Microsoft.Azure.Commands.Resources' +# +# Generated by: Microsoft Corporation +# +# Generated on: 4/01/2014 +# + +@{ + +# Version number of this module. +ModuleVersion = '0.8.8' + +# ID used to uniquely identify this module +GUID = '81d522a4-6e5d-4105-8f58-376204c47458' + +# Author of this module +Author = 'Microsoft Corporation' + +# Company or vendor of this module +CompanyName = 'Microsoft Corporation' + +# Copyright statement for this module +Copyright = ' Microsoft Corporation. All rights reserved.' + +# Description of the functionality provided by this module +Description = '' + +# Minimum version of the Windows PowerShell engine required by this module +PowerShellVersion = '3.0' + +# Name of the Windows PowerShell host required by this module +PowerShellHostName = '' + +# Minimum version of the Windows PowerShell host required by this module +PowerShellHostVersion = '' + +# Minimum version of the .NET Framework required by this module +DotNetFrameworkVersion = '4.0' + +# Minimum version of the common language runtime (CLR) required by this module +CLRVersion='4.0' + +# Processor architecture (None, X86, Amd64, IA64) required by this module +ProcessorArchitecture = 'None' + +# Modules that must be imported into the global environment prior to importing this module +RequiredModules = @() + +# Assemblies that must be loaded prior to importing this module +RequiredAssemblies = @() + +# Script files (.ps1) that are run in the caller's environment prior to importing this module +ScriptsToProcess = @() + +# Type files (.ps1xml) to be loaded when importing this module +TypesToProcess = @() + +# Format files (.ps1xml) to be loaded when importing this module +FormatsToProcess = @() + +# Modules to import as nested modules of the module specified in ModuleToProcess +NestedModules = @( + '..\..\..\Package\Debug\ResourceManager\AzureResourceManager\Sql\Microsoft.Azure.Commands.Sql.dll' +) + +# Functions to export from this module +FunctionsToExport = '*' + +# Cmdlets to export from this module +CmdletsToExport = '*' + +# Variables to export from this module +VariablesToExport = '*' + +# Aliases to export from this module +AliasesToExport = @() + +# List of all modules packaged with this module +ModuleList = @() + +# List of all files packaged with this module +FileList = @() + +# Private data to pass to the module specified in ModuleToProcess +PrivateData = '' + +} diff --git a/src/ResourceManager/Sql/Commands.Sql/Microsoft.Azure.Commands.Sql.dll-Help.xml b/src/ResourceManager/Sql/Commands.Sql/Microsoft.Azure.Commands.Sql.dll-Help.xml new file mode 100644 index 000000000000..b80e8129e158 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/Microsoft.Azure.Commands.Sql.dll-Help.xml @@ -0,0 +1,1533 @@ + + + + + Remove-AzureSqlDatabaseAuditing + + Disables an Azure Sql database's auditing. + + + + + Remove + AzureSqlDatabaseAuditing + + + + + The Remove-AzureSqlDatabaseAuditing cmdlet disables the auditing of an Azure Sql database. To use the cmdlet, use the ResourceGroupName, ServerName and DatabaseName parameters to identify the database.After the successful execution of the cmdlet, auditing of the database is disabled. If the command succeeds and the PassThru switch is on, it returns an object describing the current auditing policy used as well as the database identifiers (i.e., ResourceGroupName, ServerName and DatabaseName) + It is important to note that this cmdlet can be executed only in Azure Resource Manager mode. To switch to that mode run: Switch-AzureMode AzureResourceManager + + + + Remove-AzureSqlDatabaseAuditing + + DatabaseName + + Specifies the name of the database. Wildcards are not permitted. + + String + + + PassThru + + Returns an object describing the auditing policy as well as the database's identifiers (i.e., ResourceGroupName, ServerName and DatabaseName) when the cmdlet succeeds. By default, this cmdlet does not return any output. + + SwitchParameter + + + ServerName + + Specifies the name of the database server holding the database. Wildcards are not permitted. + + String + + + ResourceGroupName + + Specifies the name of the resource group of the database. Wildcards are not permitted. + + String + + + + + + DatabaseName + + Specifies the name of the database. Wildcards are not permitted. + + String + + String + + + + + + PassThru + + Returns an object describing the auditing policy as well as the database's identifiers (i.e., ResourceGroupName, ServerName and DatabaseName) when the cmdlet succeeds. By default, this cmdlet does not return any output. + + SwitchParameter + + SwitchParameter + + + none + + + ServerName + + Specifies the name of the database server holding the database. Wildcards are not permitted. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of the resource group of the database. Wildcards are not permitted. + + String + + String + + + + + + + + + None + + + + + + + + + + + + Microsoft.Azure.Commands.Sql.Security.Model.AuditingPolicy + + + + + + + + + + + + + + + + + + + + + + + + + Remove-AzureSqlDatabaseServerAuditing + + Disables auditing of all the databases that rely on the auditing policy of the given database server. + + + + + Remove + AzureSqlDatabaseServerAuditing + + + + + The Remove-AzureSqlDatabaseServerAuditing cmdlet disables auditing of all the databases that rely on the auditing policy of the given database server. To use the cmdlet, use the ResourceGroupName and ServerName parameters to identify the database server.After the successful execution of the cmdlet, auditing of the database is disabled. If the command succeeds and the PassThru switch is on, it returns an object describing the current auditing policy used as well as the database server identifiers (i.e., ResourceGroupName and ServerName) + It is important to note that this cmdlet can be executed only in Azure Resource Manager mode. To switch to that mode run: Switch-AzureMode AzureResourceManager + + + + Remove-AzureSqlDatabaseServerAuditing + + PassThru + + Returns an object describing the auditing policy as well as the database's identifiers (i.e., ResourceGroupName, ServerName and DatabaseName) when the cmdlet succeeds. By default, this cmdlet does not return any output. + + SwitchParameter + + + ServerName + + Specifies the name of the database server. Wildcards are not permitted. + + String + + + ResourceGroupName + + Specifies the name of the resource group of the database server. Wildcards are not permitted. + + String + + + + + + PassThru + + Returns an object describing the auditing policy as well as the database's identifiers (i.e., ResourceGroupName, ServerName and DatabaseName) when the cmdlet succeeds. By default, this cmdlet does not return any output. + + SwitchParameter + + SwitchParameter + + + none + + + ServerName + + Specifies the name of the database server. Wildcards are not permitted. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of the resource group of the database server. Wildcards are not permitted. + + String + + String + + + + + + + + + None + + + + + + + + + + + + Microsoft.Azure.Commands.Sql.Security.Model.AuditingPolicy + + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureSqlDatabaseAuditingPolicy + + Gets an Azure Sql database's auditing policy. + + + + + Get + AzureSqlDatabaseAuditingPolicy + + + + + The Get-AzureSqlDatabaseAuditingPolicy cmdlet gets the auditing policy of an Azure Sql database. To use the cmdlet, use the ResourceGroupName, ServerName and DatabaseName parameters to identify the database. + It is important to note that this cmdlet can be executed only in Azure Resource Manager mode. To switch to that mode run: Switch-AzureMode AzureResourceManager + + + + Get-AzureSqlDatabaseAuditingPolicy + + DatabaseName + + Specifies the name of the database. Wildcards are not permitted. + + String + + + ServerName + + Specifies the name of the database server holding the database. Wildcards are not permitted. + + String + + + ResourceGroupName + + Specifies the name of the resource group of the database. Wildcards are not permitted. + + String + + + + + + DatabaseName + + Specifies the name of the database. Wildcards are not permitted. + + String + + String + + + + + + ServerName + + Specifies the name of the database server holding the database. Wildcards are not permitted. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of the resource group of the database. Wildcards are not permitted. + + String + + String + + + + + + + + + None + + + + + + + + + + + + Microsoft.Azure.Commands.Sql.Security.Model.AuditingPolicy + + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureSqlDatabaseServerAuditingPolicy + + Gets an Azure Sql server's auditing policy. + + + + + Get + AzureSqlDatabaseServerAuditingPolicy + + + + + The Get-AzureSqlDatabaseServerAuditingPolicy cmdlet gets the auditing policy of an Azure Sql server. To use the cmdlet, use the ResourceGroupName and the ServerName parameters to identify the database server. + It is important to note that this cmdlet can be executed only in Azure Resource Manager mode. To switch to that mode run: Switch-AzureMode AzureResourceManager + + + + Get-AzureSqlDatabaseServerAuditingPolicy + + ServerName + + Specifies the name of the database server. Wildcards are not permitted. + + String + + + ResourceGroupName + + Specifies the name of the resource group of the database server. Wildcards are not permitted. + + String + + + + + + ServerName + + Specifies the name of the database server. Wildcards are not permitted. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of the resource group of the database server. Wildcards are not permitted. + + String + + String + + + + + + + + + None + + + + + + + + + + + + Microsoft.Azure.Commands.Sql.Security.Model.AuditingPolicy + + + + + + + + + + + + + + + + + + + + + + + + + Set-AzureSqlDatabaseAuditingPolicy + + Sets an Azure Sql database's auditing policy. + + + + + Set + AzureSqlDatabaseAuditingPolicy + + + + + The Set-AzureSqlDatabaseAuditingPolicy cmdlet changes the auditing policy of an Azure Sql database. To use the cmdlet, use the ResourceGroupName, ServerName and DatabaseName parameters to identify the database, the StorageAccountName parameter to specify the storage account to be used for the audit logs and the EventType parameter to define which event types to audit.After the successful execution of the cmdlet, auditing of the database is enabled. These settings override the server default auditing policy. If the command succeeds and the PassThru switch is on, it returns an object describing the current auditing policy used as well as the database identifiers (ResourceGroupName, ServerName and DatabaseName) + It is important to note that this cmdlet can be executed only in Azure Resource Manager mode. To switch to that mode run: Switch-AzureMode AzureResourceManager + + + + Set-AzureSqlDatabaseAuditingPolicy + + DatabaseName + + Specifies the name of the database. Wildcards are not permitted. + + String + + + PassThru + + Returns an object describing the auditing policy as well as the database's identifiers (i.e., ResourceGroupName, ServerName and DatabaseName) when the cmdlet succeeds. By default, this cmdlet does not return any output. + + SwitchParameter + + + StorageAccountName + + Specifies the name of the storage account to be used when auditing the database. Wildcards are not permitted.Note that this parameter is not required. When this parameter is not provided, the cmdlet would use the storage account that was defined previously as part of the auditing policy of the database. If this is the first time an auditing policy is defined for the database and this parameter is not provided, the cmdlet will fail. + + String + + + StorageKeyType + + Specifies which of the storage access keys to use (defaults to 'Primary') + Valid values are: + -- Primary + -- Secondary + + + String + + + EventType + + Specifies the event types to audit + Valid values are: + -- DataAccess + -- DataChanges + -- SchemaChanges + -- SecurityExceptions + -- RevokePermissions + -- All + -- None + Note that is possible to specify several event types. You can specify 'All' to audit all of the event types or 'None' to specify that none of the events will be audited. Specifying 'All' or 'None' alongside other event types would result in failure to execute the cmdlet. + + + String[] + + + ServerName + + Specifies the name of the database server holding the database. Wildcards are not permitted. + + String + + + ResourceGroupName + + Specifies the name of the resource group of the database. Wildcards are not permitted. + + String + + + + + + DatabaseName + + Specifies the name of the database. Wildcards are not permitted. + + String + + String + + + + + + PassThru + + Returns an object describing the auditing policy as well as the database's identifiers (i.e., ResourceGroupName, ServerName and DatabaseName) when the cmdlet succeeds. By default, this cmdlet does not return any output. + + SwitchParameter + + SwitchParameter + + + none + + + StorageAccountName + + Specifies the name of the storage account to be used when auditing the database. Wildcards are not permitted.Note that this parameter is not required. When this parameter is not provided, the cmdlet would use the storage account that was defined previously as part of the auditing policy of the database. If this is the first time an auditing policy is defined for the database and this parameter is not provided, the cmdlet will fail. + + String + + String + + + + + + StorageKeyType + + Specifies which of the storage access keys to use (defaults to 'Primary') + Valid values are: + -- Primary + -- Secondary + + + String + + + EventType + + Specifies the event types to audit + Valid values are: + -- DataAccess + -- DataChanges + -- SchemaChanges + -- SecurityExceptions + -- RevokePermissions + -- All + -- None + Note that is possible to specify several event types. You can specify 'All' to audit all of the event types or 'None' to specify that none of the events will be audited. Specifying 'All' or 'None' alongside other event types would result in failure to execute the cmdlet. + + String[] + + String[] + + + + + + ServerName + + Specifies the name of the database server holding the database. Wildcards are not permitted. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of the resource group of the database. Wildcards are not permitted. + + String + + String + + + + + + + + + None + + + + + + + + + + + + Microsoft.Azure.Commands.Sql.Security.Model.AuditingPolicy + + + + + + + + + + + + + + + + + + + + + + + + + Set-AzureSqlDatabaseServerAuditingPolicy + + Sets an Azure Sql database server's auditing policy. + + + + + Set + AzureSqlDatabaseServerAuditingPolicy + + + + + The Set-AzureSqlDatabaseServerAuditingPolicy cmdlet changes the auditing policy of an Azure Sql database server. To use the cmdlet, use the ResourceGroupName and ServerName parameters to identify the database server, the StorageAccountName parameter to specify the storage account to be used for the audit logs and the EventType parameter to define which event types to audit.The auditing policy of a database server apply to all the databases in this server that are marked as using the server's auditing policy, as well as all newly created databases.If the command succeeds and the PassThru switch is on, it returns an object describing the current auditing policy used as well as the server's identifiers (i.e., ResourceGroupName and ServerName) + It is important to note that this cmdlet can be executed only in Azure Resource Manager mode. To switch to that mode run: Switch-AzureMode AzureResourceManager + + + + Set-AzureSqlDatabaseServerAuditingPolicy + + PassThru + + Returns an object describing the auditing policy as well as the database server's identifiers (i.e., ResourceGroupName, ServerName and DatabaseName) when the cmdletsucceeds. By default, this cmdlet does not return any output. + + SwitchParameter + + + StorageAccountName + + Specifies the name of the storage account to be used when auditing the databases that rely on this server's auditing policy. Wildcards are not permitted.Note that this parameter is not required. When this parameter is not provided, the cmdlet would use the storage account that was defined previously as part of the auditing policy of the database. If this is the first time an auditing policy is defined for the database and this parameter is not provided, the cmdlet will fail. + + String + + + EventType + + Specifies the event types to audit + Valid values are: + -- DataAccess + -- DataChanges + -- SchemaChanges + -- SecurityExceptions + -- RevokePermissions + -- All + -- None + Note that is possible to specify several event types. You can specify 'All' to audit all of the event types or 'None' to specify that none of the events will be audited. Specifying 'All' or 'None' alongside other event types would result in failure to execute the cmdlet. + + String[] + + + ServerName + + Specifies the name of the database server. Wildcards are not permitted. + + String + + + ResourceGroupName + + Specifies the name of the resource group of the database server. Wildcards are not permitted. + + String + + + + + + PassThru + + Returns an object describing the auditing policy as well as the database server's identifiers (i.e., ResourceGroupName, ServerName and DatabaseName) when the cmdletsucceeds. By default, this cmdlet does not return any output. + + SwitchParameter + + SwitchParameter + + + none + + + StorageAccountName + + Specifies the name of the storage account to be used when auditing the databases that rely on this server's auditing policy. Wildcards are not permitted.Note that this parameter is not required. When this parameter is not provided, the cmdlet would use the storage account that was defined previously as part of the auditing policy of the database. If this is the first time an auditing policy is defined for the database and this parameter is not provided, the cmdlet will fail. + + String + + String + + + + + + EventType + + Specifies the event types to audit + Valid values are: + -- DataAccess + -- DataChanges + -- SchemaChanges + -- SecurityExceptions + -- RevokePermissions + -- All + -- None + Note that is possible to specify several event types. You can specify 'All' to audit all of the event types or 'None' to specify that none of the events will be audited. Specifying 'All' or 'None' alongside other event types would result in failure to execute the cmdlet. + + String[] + + String[] + + + + + + ServerName + + Specifies the name of the database server. Wildcards are not permitted. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of the resource group of the database server. Wildcards are not permitted. + + String + + String + + + + + + + + + None + + + + + + + + + + + + Microsoft.Azure.Commands.Sql.Security.Model.AuditingPolicy + + + + + + + + + + + + + + + + + + + + + + + + + Use-AzureSqlDatabaseServerAuditingPolicy + + Marks an Azure Sql database as using its server's auditing policy. + + + + + Use + AzureSqlDatabaseServerAuditingPolicy + + + + + The Use-AzureSqlDatabaseServerAuditingPolicy cmdlet marks an Azure Sql database as using its server's auditing policy. To use the cmdlet, use the ResourceGroupName, ServerName and DatabaseName parameters to identify the database.If no auditing policy was defined already for the database server, this cmdlet would fail. + It is important to note that this cmdlet can be executed only in Azure Resource Manager mode. To switch to that mode run: Switch-AzureMode AzureResourceManager + + + + Use-AzureSqlDatabaseServerAuditingPolicy + + DatabaseName + + Specifies the name of the database. Wildcards are not permitted. + + String + + + PassThru + + Returns an object describing the auditing policy as well as the database's identifiers (i.e., ResourceGroupName, ServerName and DatabaseName) when the cmdlet succeeds. By default, this cmdlet does not return any output. + + SwitchParameter + + + ServerName + + Specifies the name of the database server holding the database. Wildcards are not permitted. + + String + + + ResourceGroupName + + Specifies the name of the resource group of the database. Wildcards are not permitted. + + String + + + + + + DatabaseName + + Specifies the name of the database. Wildcards are not permitted. + + String + + String + + + + + + PassThru + + Returns an object describing the auditing policy as well as the database's identifiers (i.e., ResourceGroupName, ServerName and DatabaseName) when the cmdlet succeeds. By default, this cmdlet does not return any output. + + SwitchParameter + + SwitchParameter + + + none + + + ServerName + + Specifies the name of the database server holding the database. Wildcards are not permitted. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of the resource group of the database. Wildcards are not permitted. + + String + + String + + + + + + + + + None + + + + + + + + + + + + Microsoft.Azure.Commands.Sql.Security.Model.AuditingPolicy + + + + + + + + + + + + + + + + + + + + + + + + + Disable-AzureSqlDatabaseDirectAccess + + Disables the option to directly access to an Azure Sql database (without auditing) + + + + + Disable + AzureSqlDatabaseDirectAccess + + + + + The Disable-AzureSqlDatabaseDirectAccess cmdlet disables the possibility of accessing an Azure Sql database without auditing. To use the cmdlet, use the ResourceGroupName, ServerName and DatabaseName parameters to identify the database.After the successful execution of the cmdlet, directly accessing to an Azure Sql database is disabled. If the command succeeds and the PassThru switch is on, it returns an object describing the current auditing policy used as well as the database identifiers (i.e., ResourceGroupName, ServerName and DatabaseName) + It is important to note that this cmdlet can be executed only in Azure Resource Manager mode. To switch to that mode run: Switch-AzureMode AzureResourceManager + + + + Disable-AzureSqlDatabaseDirectAccess + + DatabaseName + + Specifies the name of the database. Wildcards are not permitted. + + String + + + PassThru + + Returns an object describing the auditing policy as well as the database's identifiers (i.e., ResourceGroupName, ServerName and DatabaseName) when the cmdlet succeeds. By default, this cmdlet does not return any output. + + SwitchParameter + + + ServerName + + Specifies the name of the database server holding the database. Wildcards are not permitted. + + String + + + ResourceGroupName + + Specifies the name of the resource group of the database. Wildcards are not permitted. + + String + + + + + + DatabaseName + + Specifies the name of the database. Wildcards are not permitted. + + String + + String + + + + + + PassThru + + Returns an object describing the auditing policy as well as the database's identifiers (i.e., ResourceGroupName, ServerName and DatabaseName) when the cmdlet succeeds. By default, this cmdlet does not return any output. + + SwitchParameter + + SwitchParameter + + + none + + + ServerName + + Specifies the name of the database server holding the database. Wildcards are not permitted. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of the resource group of the database. Wildcards are not permitted. + + String + + String + + + + + + + + + None + + + + + + + + + + + + Microsoft.Azure.Commands.Sql.Security.Model.AuditingPolicy + + + + + + + + + + + + + + + + + + + + + + + + + Enable-AzureSqlDatabaseDirectAccess + + Enables the option to directly access to an Azure Sql database (with auditing) + + + + + Enable + AzureSqlDatabaseDirectAccess + + + + + The Enable-AzureSqlDatabaseDirectAccess cmdlet enables the possibility of accessing an Azure Sql database without auditing. To use the cmdlet, use the ResourceGroupName, ServerName and DatabaseName parameters to identify the database.After the successful execution of the cmdlet, directly accessing to an Azure Sql database is disabled. If the command succeeds and the PassThru switch is on, it returns an object describing the current auditing policy used as well as the database identifiers (i.e., ResourceGroupName, ServerName and DatabaseName) + It is important to note that this cmdlet can be executed only in Azure Resource Manager mode. To switch to that mode run: Switch-AzureMode AzureResourceManager + + + + Enable-AzureSqlDatabaseDirectAccess + + DatabaseName + + Specifies the name of the database. Wildcards are not permitted. + + String + + + PassThru + + Returns an object describing the auditing policy as well as the database's identifiers (i.e., ResourceGroupName, ServerName and DatabaseName) when the cmdlet succeeds. By default, this cmdlet does not return any output. + + SwitchParameter + + + ServerName + + Specifies the name of the database server holding the database. Wildcards are not permitted. + + String + + + ResourceGroupName + + Specifies the name of the resource group of the database. Wildcards are not permitted. + + String + + + + + + DatabaseName + + Specifies the name of the database. Wildcards are not permitted. + + String + + String + + + + + + PassThru + + Returns an object describing the auditing policy as well as the database's identifiers (i.e., ResourceGroupName, ServerName and DatabaseName) when the cmdlet succeeds. By default, this cmdlet does not return any output. + + SwitchParameter + + SwitchParameter + + + none + + + ServerName + + Specifies the name of the database server holding the database. Wildcards are not permitted. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of the resource group of the database. Wildcards are not permitted. + + String + + String + + + + + + + + + None + + + + + + + + + + + + Microsoft.Azure.Commands.Sql.Security.Model.AuditingPolicy + + + + + + + + + + + + + + + + + + + + + + + + + Disable-AzureSqlDatabaseServerDirectAccess + + Disables direct access to all Azure Sql databases that use the audit policy of a Sql database server + + + + + Disable + AzureSqlDatabaseServerDirectAccess + + + + + The Disable-AzureSqlDatabaseServerDirectAccess cmdlet disables the possibility of accessing all the Azure Sql database that use the auditing policy of an Azure Sql database server (without auditing). To use the cmdlet, use the ResourceGroupName and ServerName parameters to identify the database server.After the successful execution of the cmdlet, directly accessing to all Azure Sql databases that use the audit policy of the Azure Sql server is disabled. If the command succeeds and the PassThru switch is on, it returns an object describing the current auditing policy used as well as the server's identifiers (i.e., ResourceGroupName and ServerName) + It is important to note that this cmdlet can be executed only in Azure Resource Manager mode. To switch to that mode run: Switch-AzureMode AzureResourceManager + + + + isable-AzureSqlDatabaseServerDirectAccess + + PassThru + + Returns an object describing the auditing policy as well as the database's identifiers (i.e., ResourceGroupName, ServerName and DatabaseName) when the cmdlet succeeds. By default, this cmdlet does not return any output. + + SwitchParameter + + + ServerName + + Specifies the name of the database server. Wildcards are not permitted. + + String + + + ResourceGroupName + + Specifies the name of the resource group of the server. Wildcards are not permitted. + + String + + + + + + PassThru + + Returns an object describing the auditing policy as well as the database's identifiers (i.e., ResourceGroupName, ServerName and DatabaseName) when the cmdlet succeeds. By default, this cmdlet does not return any output. + + SwitchParameter + + SwitchParameter + + + none + + + ServerName + + Specifies the name of the database server holding the database. Wildcards are not permitted. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of the resource group of the database. Wildcards are not permitted. + + String + + String + + + + + + + + + None + + + + + + + + + + + + Microsoft.Azure.Commands.Sql.Security.Model.AuditingPolicy + + + + + + + + + + + + + + + + + + + + + + + + + Enable-AzureSqlDatabaseServerDirectAccess + + Enables direct access to all Azure Sql databases that use the audit policy of a Sql database server + + + + + Enable + AzureSqlDatabaseServerDirectAccess + + + + + The Enable-AzureSqlDatabaseServerDirectAccess cmdlet enables the possibility of accessing all the Azure Sql database that use the auditing policy of an Azure Sql database server (with auditing). To use the cmdlet, use the ResourceGroupName and ServerName parameters to identify the database server.After the successful execution of the cmdlet, directly accessing to all Azure Sql databases that use the audit policy of the Azure Sql server is enabled. If the command succeeds and the PassThru switch is on, it returns an object describing the current auditing policy used as well as the server's identifiers (i.e., ResourceGroupName and ServerName) + It is important to note that this cmdlet can be executed only in Azure Resource Manager mode. To switch to that mode run: Switch-AzureMode AzureResourceManager + + + + isable-AzureSqlDatabaseServerDirectAccess + + PassThru + + Returns an object describing the auditing policy as well as the database's identifiers (i.e., ResourceGroupName, ServerName and DatabaseName) when the cmdlet succeeds. By default, this cmdlet does not return any output. + + SwitchParameter + + + ServerName + + Specifies the name of the database server. Wildcards are not permitted. + + String + + + ResourceGroupName + + Specifies the name of the resource group of the server. Wildcards are not permitted. + + String + + + + + + PassThru + + Returns an object describing the auditing policy as well as the database's identifiers (i.e., ResourceGroupName, ServerName and DatabaseName) when the cmdlet succeeds. By default, this cmdlet does not return any output. + + SwitchParameter + + SwitchParameter + + + none + + + ServerName + + Specifies the name of the database server holding the database. Wildcards are not permitted. + + String + + String + + + + + + ResourceGroupName + + Specifies the name of the resource group of the database. Wildcards are not permitted. + + String + + String + + + + + + + + + None + + + + + + + + + + + + Microsoft.Azure.Commands.Sql.Security.Model.AuditingPolicy + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql/Properties/AssemblyInfo.cs b/src/ResourceManager/Sql/Commands.Sql/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..23c49bdf05a8 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/Properties/AssemblyInfo.cs @@ -0,0 +1,53 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft Azure Powershell - Sql")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] +[assembly: CLSCompliant(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("213449a5-96f5-4a96-b650-681cf9ed15c6")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] +[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] +#if SIGN +[assembly: InternalsVisibleTo("Microsoft.Azure.Commands.Resources.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +#else +[assembly: InternalsVisibleTo("Microsoft.Azure.Commands.Resources.Test")] +#endif diff --git a/src/ResourceManager/Sql/Commands.Sql/Properties/Resources.Designer.cs b/src/ResourceManager/Sql/Commands.Sql/Properties/Resources.Designer.cs new file mode 100644 index 000000000000..757628091ed5 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/Properties/Resources.Designer.cs @@ -0,0 +1,99 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.Azure.Commands.Sql.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Azure.Commands.Sql.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Cannot use the '{0}' option with other event types.. + /// + internal static string InvalidEventTypeSet { + get { + return ResourceManager.GetString("InvalidEventTypeSet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot set auditing policy without a storage account name.. + /// + internal static string NoStorageAccountWhenConfiguringAuditingPolicy { + get { + return ResourceManager.GetString("NoStorageAccountWhenConfiguringAuditingPolicy", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find a storage account with the name '{0}'. It either does not exist, associated with a different subscription or you do not have the appropriate credentials to access it.. + /// + internal static string StorageAccountNotFound { + get { + return ResourceManager.GetString("StorageAccountNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot use a server's auditing policy before it is configured.. + /// + internal static string UseServerWithoutStorageAccount { + get { + return ResourceManager.GetString("UseServerWithoutStorageAccount", resourceCulture); + } + } + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql/Properties/Resources.resx b/src/ResourceManager/Sql/Commands.Sql/Properties/Resources.resx new file mode 100644 index 000000000000..0bb1355309aa --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/Properties/Resources.resx @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Cannot use the '{0}' option with other event types. + + + Cannot set auditing policy without a storage account name. + + + Cannot find a storage account with the name '{0}'. It either does not exist, associated with a different subscription or you do not have the appropriate credentials to access it. + + + Cannot use a server's auditing policy before it is configured. + + \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/DisableAzureSqlDatabaseDirectAccess.cs b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/DisableAzureSqlDatabaseDirectAccess.cs new file mode 100644 index 000000000000..09d4165921b6 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/DisableAzureSqlDatabaseDirectAccess.cs @@ -0,0 +1,60 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.Azure.Management.Sql.Models; +using Microsoft.Azure.Commands.Sql.Services; +using Microsoft.Azure.Commands.Sql.Security.Model; + +namespace Microsoft.Azure.Commands.Sql.Security.Cmdlet +{ + /// + /// Disables direct access to an Azure Sql database + /// + [Cmdlet(VerbsLifecycle.Disable, "AzureSqlDatabaseDirectAccess"), OutputType(typeof(AuditingPolicy))] + public class DisableAzureSqlDatabaseDirectAccess : SqlDatabaseSecurityCmdletBase + { + + /// + /// Gets or sets the name of the database to use. + /// + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "SQL Database name.")] + [ValidateNotNullOrEmpty] + public string DatabaseName { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + /// + /// Provides the auditing policy that this cmdlet operates on + /// + /// An auditingPolicy object + protected override AuditingPolicy GetPolicy() + { + return this.PolicyHandler.GetDatabaseAuditingPolicy(this.ResourceGroupName, this.ServerName, this.DatabaseName, this.clientRequestId); + } + + protected override bool writeResult() { return PassThru; } + + protected override void UpdatePolicy(AuditingPolicy policy) + { + policy.DirectAccessEnabled = false; + } + + protected override void SendPolicy(AuditingPolicy policy) + { + this.PolicyHandler.SetDatabaseAuditingPolicy(policy, clientRequestId); + } + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/DisableAzureSqlDatabaseServerDirectAccess.cs b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/DisableAzureSqlDatabaseServerDirectAccess.cs new file mode 100644 index 000000000000..2e1b691f72ec --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/DisableAzureSqlDatabaseServerDirectAccess.cs @@ -0,0 +1,53 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.Azure.Management.Sql.Models; +using Microsoft.Azure.Commands.Sql.Services; +using Microsoft.Azure.Commands.Sql.Security.Model; + +namespace Microsoft.Azure.Commands.Sql.Security.Cmdlet +{ + /// + /// Disables direct access to all Azure Sql databases that use the audit policy of a Sql database server + /// + [Cmdlet(VerbsLifecycle.Disable, "AzureSqlDatabaseServerDirectAccess"), OutputType(typeof(AuditingPolicy))] + public class DisableAzureSqlDatabaseServerDirectAccess : SqlDatabaseSecurityCmdletBase + { + + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + /// + /// Provides the auditing policy that this cmdlet operates on + /// + /// An auditingPolicy object + protected override AuditingPolicy GetPolicy() + { + return this.PolicyHandler.GetServerAuditingPolicy(this.ResourceGroupName, this.ServerName, this.clientRequestId); + } + + protected override bool writeResult() { return PassThru; } + + protected override void UpdatePolicy(AuditingPolicy policy) + { + policy.DirectAccessEnabled = false; + } + + protected override void SendPolicy(AuditingPolicy policy) + { + this.PolicyHandler.SetServerAuditingPolicy(policy, clientRequestId); + } + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/DisableSqlDatabaseAuditing.cs b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/DisableSqlDatabaseAuditing.cs new file mode 100644 index 000000000000..3db1d5741649 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/DisableSqlDatabaseAuditing.cs @@ -0,0 +1,61 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.Azure.Management.Sql.Models; +using Microsoft.Azure.Commands.Sql.Services; +using Microsoft.Azure.Commands.Sql.Security.Model; + +namespace Microsoft.Azure.Commands.Sql.Security.Cmdlet +{ + /// + /// Disables auditing on a specific database. + /// + [Cmdlet(VerbsLifecycle.Disable, "AzureSqlDatabaseAuditing"), OutputType(typeof(AuditingPolicy))] + public class DisableSqlDatabaseAuditing : SqlDatabaseSecurityCmdletBase + { + + /// + /// Gets or sets the name of the database to use. + /// + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "SQL Database name.")] + [ValidateNotNullOrEmpty] + public string DatabaseName { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + /// + /// Provides the auditing policy that this cmdlet operates on + /// + /// An auditingPolicy object + protected override AuditingPolicy GetPolicy() + { + return this.PolicyHandler.GetDatabaseAuditingPolicy(this.ResourceGroupName, this.ServerName, this.DatabaseName, this.clientRequestId); + } + + protected override bool writeResult() { return PassThru; } + + protected override void UpdatePolicy(AuditingPolicy policy) + { + policy.IsEnabled = false; + } + + protected override void SendPolicy(AuditingPolicy policy) + { + this.PolicyHandler.IgnoreStorage = true; + this.PolicyHandler.SetDatabaseAuditingPolicy(policy, clientRequestId); + } + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/DisableSqlServerAuditing.cs b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/DisableSqlServerAuditing.cs new file mode 100644 index 000000000000..d5005d45d38a --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/DisableSqlServerAuditing.cs @@ -0,0 +1,53 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.Azure.Management.Sql.Models; +using Microsoft.Azure.Commands.Sql.Services; +using Microsoft.Azure.Commands.Sql.Security.Model; + +namespace Microsoft.Azure.Commands.Sql.Security.Cmdlet +{ + /// + /// Disable auditing on a database server, therefore all of the databases that use their server's auditing policy will not be audited, as well as + /// all new databases within this database server. + /// + [Cmdlet(VerbsLifecycle.Disable, "AzureSqlServerAuditing"), OutputType(typeof(AuditingPolicy))] + public class DisableSqlServerAuditing : SqlDatabaseSecurityCmdletBase + { + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + /// + /// Provides the auditing policy that this cmdlet operates on + /// + /// An auditingPolicy object + protected override AuditingPolicy GetPolicy() + { + return this.PolicyHandler.GetServerAuditingPolicy(this.ResourceGroupName, this.ServerName, this.clientRequestId); + } + + protected override bool writeResult() { return PassThru; } + + protected override void UpdatePolicy(AuditingPolicy policy) + { + policy.IsEnabled = false; + } + protected override void SendPolicy(AuditingPolicy policy) + { + this.PolicyHandler.IgnoreStorage = true; + this.PolicyHandler.SetServerAuditingPolicy(policy, clientRequestId); + } + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/EnableAzureSqlDatabaseDirectAccess.cs b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/EnableAzureSqlDatabaseDirectAccess.cs new file mode 100644 index 000000000000..ada709ead2f0 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/EnableAzureSqlDatabaseDirectAccess.cs @@ -0,0 +1,60 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.Azure.Management.Sql.Models; +using Microsoft.Azure.Commands.Sql.Services; +using Microsoft.Azure.Commands.Sql.Security.Model; + +namespace Microsoft.Azure.Commands.Sql.Security.Cmdlet +{ + /// + /// Enables direct access to an Azure Sql database. + /// + [Cmdlet(VerbsLifecycle.Enable, "AzureSqlDatabaseDirectAccess"), OutputType(typeof(AuditingPolicy))] + public class EnableAzureSqlDatabaseDirectAccess : SqlDatabaseSecurityCmdletBase + { + + /// + /// Gets or sets the name of the database to use. + /// + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "SQL Database name.")] + [ValidateNotNullOrEmpty] + public string DatabaseName { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + /// + /// Provides the auditing policy that this cmdlet operates on + /// + /// An auditingPolicy object + protected override AuditingPolicy GetPolicy() + { + return this.PolicyHandler.GetDatabaseAuditingPolicy(this.ResourceGroupName, this.ServerName, this.DatabaseName, this.clientRequestId); + } + + protected override bool writeResult() { return PassThru; } + + protected override void UpdatePolicy(AuditingPolicy policy) + { + policy.DirectAccessEnabled = true; + } + + protected override void SendPolicy(AuditingPolicy policy) + { + this.PolicyHandler.SetDatabaseAuditingPolicy(policy, clientRequestId); + } + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/EnableAzureSqlDatabaseServerDirectAccess.cs b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/EnableAzureSqlDatabaseServerDirectAccess.cs new file mode 100644 index 000000000000..ad6ea0744cb0 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/EnableAzureSqlDatabaseServerDirectAccess.cs @@ -0,0 +1,53 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.Azure.Management.Sql.Models; +using Microsoft.Azure.Commands.Sql.Services; +using Microsoft.Azure.Commands.Sql.Security.Model; + +namespace Microsoft.Azure.Commands.Sql.Security.Cmdlet +{ + /// + /// Disables direct access to all Azure Sql databases that use the audit policy of a Sql database server + /// + [Cmdlet(VerbsLifecycle.Enable, "AzureSqlDatabaseServerDirectAccess"), OutputType(typeof(AuditingPolicy))] + public class EnableAzureSqlDatabaseServerDirectAccess : SqlDatabaseSecurityCmdletBase + { + + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + /// + /// Provides the auditing policy that this cmdlet operates on + /// + /// An auditingPolicy object + protected override AuditingPolicy GetPolicy() + { + return this.PolicyHandler.GetServerAuditingPolicy(this.ResourceGroupName, this.ServerName, this.clientRequestId); + } + + protected override bool writeResult() { return PassThru; } + + protected override void UpdatePolicy(AuditingPolicy policy) + { + policy.DirectAccessEnabled = true; + } + + protected override void SendPolicy(AuditingPolicy policy) + { + this.PolicyHandler.SetServerAuditingPolicy(policy, clientRequestId); + } + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/GetAzureSqlDatabaseAuditingPolicy.cs b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/GetAzureSqlDatabaseAuditingPolicy.cs new file mode 100644 index 000000000000..86126194ad51 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/GetAzureSqlDatabaseAuditingPolicy.cs @@ -0,0 +1,46 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Sql.Security.Model; +using Microsoft.Azure.Commands.Sql.Services; +using Microsoft.Azure.Management.Sql.Models; +using System.Management.Automation; + +namespace Microsoft.Azure.Commands.Sql.Security.Cmdlet +{ + /// + /// Returns the auditing policy of a specific database. + /// + [Cmdlet(VerbsCommon.Get, "AzureSqlDatabaseAuditingPolicy"), OutputType(typeof(AuditingPolicy))] + public class GetAzureSqlDatabaseAuditingPolicy : SqlDatabaseSecurityCmdletBase + { + + /// + /// Gets or sets the name of the database to use. + /// + [Parameter(ValueFromPipelineByPropertyName = true, Mandatory=true, HelpMessage = "SQL Database name.")] + [ValidateNotNullOrEmpty] + public string DatabaseName { get; set; } + + /// + /// Provides the auditing policy that this cmdlet operates on + /// + /// An auditingPolicy object + protected override AuditingPolicy GetPolicy() + { + return this.PolicyHandler.GetDatabaseAuditingPolicy(this.ResourceGroupName, this.ServerName, this.DatabaseName, this.clientRequestId); + } + + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/GetAzureSqlDatabaseAuditingSetting.cs b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/GetAzureSqlDatabaseAuditingSetting.cs new file mode 100644 index 000000000000..47041f613154 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/GetAzureSqlDatabaseAuditingSetting.cs @@ -0,0 +1,46 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Sql.Security.Model; +using Microsoft.Azure.Commands.Sql.Services; +using Microsoft.Azure.Management.Sql.Models; +using System.Management.Automation; + +namespace Microsoft.Azure.Commands.Sql.Security.Cmdlet +{ + /// + /// Returns the auditing policy of a specific database. + /// + [Cmdlet(VerbsCommon.Get, "AzureSqlDatabaseAuditingSetting"), OutputType(typeof(AuditingPolicy))] + public class GetAzureSqlDatabaseAuditingSetting : SqlDatabaseSecurityCmdletBase + { + + /// + /// Gets or sets the name of the database to use. + /// + [Parameter(ValueFromPipelineByPropertyName = true, Mandatory=true, HelpMessage = "SQL Database name.")] + [ValidateNotNullOrEmpty] + public string DatabaseName { get; set; } + + /// + /// Provides the auditing policy that this cmdlet operates on + /// + /// An auditingPolicy object + protected override AuditingPolicy GetPolicy() + { + return this.PolicyHandler.GetDatabaseAuditingPolicy(this.ResourceGroupName, this.ServerName, this.DatabaseName, this.clientRequestId); + } + + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/GetAzureSqlDatabaseServerAuditingPolicy.cs b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/GetAzureSqlDatabaseServerAuditingPolicy.cs new file mode 100644 index 000000000000..a285abd0720a --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/GetAzureSqlDatabaseServerAuditingPolicy.cs @@ -0,0 +1,36 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Sql.Security.Model; +using Microsoft.Azure.Commands.Sql.Services; +using System.Management.Automation; + +namespace Microsoft.Azure.Commands.Sql.Security.Cmdlet +{ + /// + /// Returns the auditing policy of a specific database server. + /// + [Cmdlet(VerbsCommon.Get, "AzureSqlDatabaseServerAuditingPolicy"), OutputType(typeof(AuditingPolicy))] + public class GetAzureSqlDatabaseServerAuditingPolicy : SqlDatabaseSecurityCmdletBase + { + /// + /// Provides the auditing policy that this cmdlet operates on + /// + /// An auditingPolicy object + protected override AuditingPolicy GetPolicy() + { + return this.PolicyHandler.GetServerAuditingPolicy(this.ResourceGroupName, this.ServerName, this.clientRequestId); + } + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/GetAzureSqlServerAuditingSetting.cs b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/GetAzureSqlServerAuditingSetting.cs new file mode 100644 index 000000000000..eccbdfb36205 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/GetAzureSqlServerAuditingSetting.cs @@ -0,0 +1,36 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Sql.Security.Model; +using Microsoft.Azure.Commands.Sql.Services; +using System.Management.Automation; + +namespace Microsoft.Azure.Commands.Sql.Security.Cmdlet +{ + /// + /// Returns the auditing policy of a specific database server. + /// + [Cmdlet(VerbsCommon.Get, "AzureSqlServerAuditingSetting"), OutputType(typeof(AuditingPolicy))] + public class GetAzureSqlServerAuditingSetting : SqlDatabaseSecurityCmdletBase + { + /// + /// Provides the auditing policy that this cmdlet operates on + /// + /// An auditingPolicy object + protected override AuditingPolicy GetPolicy() + { + return this.PolicyHandler.GetServerAuditingPolicy(this.ResourceGroupName, this.ServerName, this.clientRequestId); + } + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/RemoveSqlDatabaseAuditing.cs b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/RemoveSqlDatabaseAuditing.cs new file mode 100644 index 000000000000..877177e9c0e6 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/RemoveSqlDatabaseAuditing.cs @@ -0,0 +1,61 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.Azure.Management.Sql.Models; +using Microsoft.Azure.Commands.Sql.Services; +using Microsoft.Azure.Commands.Sql.Security.Model; + +namespace Microsoft.Azure.Commands.Sql.Security.Cmdlet +{ + /// + /// Disables auditing on a specific database. + /// + [Cmdlet(VerbsCommon.Remove, "AzureSqlDatabaseAuditing"), OutputType(typeof(AuditingPolicy))] + public class RemoveSqlDatabaseAuditing : SqlDatabaseSecurityCmdletBase + { + + /// + /// Gets or sets the name of the database to use. + /// + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "SQL Database name.")] + [ValidateNotNullOrEmpty] + public string DatabaseName { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + /// + /// Provides the auditing policy that this cmdlet operates on + /// + /// An auditingPolicy object + protected override AuditingPolicy GetPolicy() + { + return this.PolicyHandler.GetDatabaseAuditingPolicy(this.ResourceGroupName, this.ServerName, this.DatabaseName, this.clientRequestId); + } + + protected override bool writeResult() { return PassThru; } + + protected override void UpdatePolicy(AuditingPolicy policy) + { + policy.IsEnabled = false; + } + + protected override void SendPolicy(AuditingPolicy policy) + { + this.PolicyHandler.IgnoreStorage = true; + this.PolicyHandler.SetDatabaseAuditingPolicy(policy, clientRequestId); + } + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/RemoveSqlDatabaseServerAuditing.cs b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/RemoveSqlDatabaseServerAuditing.cs new file mode 100644 index 000000000000..b8000dbb6f69 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/RemoveSqlDatabaseServerAuditing.cs @@ -0,0 +1,53 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.Azure.Management.Sql.Models; +using Microsoft.Azure.Commands.Sql.Services; +using Microsoft.Azure.Commands.Sql.Security.Model; + +namespace Microsoft.Azure.Commands.Sql.Security.Cmdlet +{ + /// + /// Disable auditing on a database server, therefore all of the databases that use their server's auditing policy will not be audited, as well as + /// all new databases within this database server. + /// + [Cmdlet(VerbsCommon.Remove, "AzureSqlDatabaseServerAuditing"), OutputType(typeof(AuditingPolicy))] + public class RemoveSqlDatabaseServerAuditing : SqlDatabaseSecurityCmdletBase + { + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + /// + /// Provides the auditing policy that this cmdlet operates on + /// + /// An auditingPolicy object + protected override AuditingPolicy GetPolicy() + { + return this.PolicyHandler.GetServerAuditingPolicy(this.ResourceGroupName, this.ServerName, this.clientRequestId); + } + + protected override bool writeResult() { return PassThru; } + + protected override void UpdatePolicy(AuditingPolicy policy) + { + policy.IsEnabled = false; + } + protected override void SendPolicy(AuditingPolicy policy) + { + this.PolicyHandler.IgnoreStorage = true; + this.PolicyHandler.SetServerAuditingPolicy(policy, clientRequestId); + } + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/SetAuditingPolicyBase .cs b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/SetAuditingPolicyBase .cs new file mode 100644 index 000000000000..33cf56386eb9 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/SetAuditingPolicyBase .cs @@ -0,0 +1,65 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Sql.Security.Model; +using System.Management.Automation; + +namespace Microsoft.Azure.Commands.Sql.Security.Cmdlet +{ + /// + /// Base class for the cmdlets that set all the properties relate to auditing. + /// + public abstract class SetAuditingPolicyBase : SqlDatabaseSecurityCmdletBase + { + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + /// + /// Gets or sets the names of the event types to use. + /// + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Event types to audit")] + [ValidateSet(Constants.Access, Constants.Schema, Constants.Data, Constants.Security, Constants.RevokePermissions, Constants.All, Constants.None, IgnoreCase = false)] + public string[] EventType { get; set; } + + /// + /// Gets or sets the name of the storage account to use. + /// + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the storage account")] + [ValidateNotNullOrEmpty] + public string StorageAccountName { get; set; } + + /// + /// Gets or sets the name of the storage account to use. + /// + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The type of the storage key")] + [ValidateSet(Constants.Primary, Constants.Secondary, IgnoreCase = false)] + [ValidateNotNullOrEmpty] + public string StorageKeyType { get; set; } + + protected override bool writeResult() { return PassThru; } + + protected override void UpdatePolicy(AuditingPolicy policy) + { + base.UpdatePolicy(policy); + policy.IsEnabled = true; + if (EventType != null && EventType.Length != 0) policy.EventType = EventType; + if (StorageAccountName != null) policy.StorageAccountName = StorageAccountName; + if (!string.IsNullOrEmpty(StorageKeyType)) // the user enter a key type - we use it + { + policy.StorageKeyType = (StorageKeyType == Constants.Primary) ? Constants.StorageKeyTypes.Primary : Constants.StorageKeyTypes.Secondary; + } + + } + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/SetAuditingSettingsBase .cs b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/SetAuditingSettingsBase .cs new file mode 100644 index 000000000000..054f5d2a8bee --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/SetAuditingSettingsBase .cs @@ -0,0 +1,53 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Sql.Security.Model; +using System.Management.Automation; + +namespace Microsoft.Azure.Commands.Sql.Security.Cmdlet +{ + /// + /// Base class for the cmdlets that set all the properties relate to auditing. + /// + public abstract class SetAuditingSettingsBase : SqlDatabaseSecurityCmdletBase + { + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + /// + /// Gets or sets the name of the storage account to use. + /// + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the storage account")] + [ValidateNotNullOrEmpty] + public string StorageAccountName { get; set; } + + /// + /// Gets or sets the names of the event types to use. + /// + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Event types to audit")] + [ValidateSet(Constants.Access, Constants.Schema, Constants.Data, Constants.Security, Constants.RevokePermissions, Constants.All, Constants.None, IgnoreCase = true)] + public string[] EventType { get; set; } + + protected override bool writeResult() { return PassThru; } + + protected override void UpdatePolicy(AuditingPolicy policy) + { + base.UpdatePolicy(policy); + policy.IsEnabled = true; + if (StorageAccountName != null) policy.StorageAccountName = StorageAccountName; + if (EventType != null && EventType.Length != 0) policy.EventType = EventType; + } + + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/SetAzureSqlDatabaseAuditingPolicy.cs b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/SetAzureSqlDatabaseAuditingPolicy.cs new file mode 100644 index 000000000000..10a2a3dd374b --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/SetAzureSqlDatabaseAuditingPolicy.cs @@ -0,0 +1,57 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.Azure.Management.Sql.Models; +using Microsoft.Azure.Commands.Sql.Services; +using Microsoft.Azure.Commands.Sql.Security.Model; +using System; + +namespace Microsoft.Azure.Commands.Sql.Security.Cmdlet +{ + /// + /// Sets the auditing policy properties for a specific database. + /// + [Cmdlet(VerbsCommon.Set, "AzureSqlDatabaseAuditingPolicy"), OutputType(typeof(AuditingPolicy))] + public class SetAzureSqlDatabaseAuditingPolicy : SetAuditingPolicyBase + { + + /// + /// Gets or sets the name of the database to use. + /// + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "SQL Database name.")] + [ValidateNotNullOrEmpty] + public string DatabaseName { get; set; } + + /// + /// Provides the auditing policy that this cmdlet operates on + /// + /// An auditingPolicy object + protected override AuditingPolicy GetPolicy() + { + return this.PolicyHandler.GetDatabaseAuditingPolicy(this.ResourceGroupName, this.ServerName, this.DatabaseName, this.clientRequestId); + } + + protected override void UpdatePolicy(AuditingPolicy policy) + { + base.UpdatePolicy(policy); + policy.UseServerDefault = false; + } + + protected override void SendPolicy(AuditingPolicy policy) + { + this.PolicyHandler.SetDatabaseAuditingPolicy(policy, clientRequestId); + } + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/SetAzureSqlDatabaseAuditingSetting.cs b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/SetAzureSqlDatabaseAuditingSetting.cs new file mode 100644 index 000000000000..4b9ad1ce18ed --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/SetAzureSqlDatabaseAuditingSetting.cs @@ -0,0 +1,56 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.Azure.Management.Sql.Models; +using Microsoft.Azure.Commands.Sql.Services; +using Microsoft.Azure.Commands.Sql.Security.Model; + +namespace Microsoft.Azure.Commands.Sql.Security.Cmdlet +{ + /// + /// Sets the auditing policy properties for a specific database. + /// + [Cmdlet(VerbsCommon.Set, "AzureSqlDatabaseAuditingSetting"), OutputType(typeof(AuditingPolicy))] + public class SetAzureSqlDatabaseAuditingSetting : SetAuditingSettingsBase + { + + /// + /// Gets or sets the name of the database to use. + /// + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "SQL Database name.")] + [ValidateNotNullOrEmpty] + public string DatabaseName { get; set; } + + /// + /// Provides the auditing policy that this cmdlet operates on + /// + /// An auditingPolicy object + protected override AuditingPolicy GetPolicy() + { + return this.PolicyHandler.GetDatabaseAuditingPolicy(this.ResourceGroupName, this.ServerName, this.DatabaseName, this.clientRequestId); + } + + protected override void UpdatePolicy(AuditingPolicy policy) + { + base.UpdatePolicy(policy); + policy.UseServerDefault = false; + } + + protected override void SendPolicy(AuditingPolicy policy) + { + this.PolicyHandler.SetDatabaseAuditingPolicy(policy, clientRequestId); + } + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/SetAzureSqlDatabaseServerAuditingPolicy.cs b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/SetAzureSqlDatabaseServerAuditingPolicy.cs new file mode 100644 index 000000000000..c7d7cc1557d3 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/SetAzureSqlDatabaseServerAuditingPolicy.cs @@ -0,0 +1,43 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Sql.Security.Model; +using Microsoft.Azure.Commands.Sql.Services; +using Microsoft.Azure.Management.Sql.Models; +using System.Management.Automation; + +namespace Microsoft.Azure.Commands.Sql.Security.Cmdlet +{ + /// + /// Sets the auditing policy properties for a specific database server. + /// + [Cmdlet(VerbsCommon.Set, "AzureSqlDatabaseServerAuditingPolicy"), OutputType(typeof(AuditingPolicy))] + public class SetAzureSqlDatabaseServerAuditingPolicy : SetAuditingPolicyBase + { + + /// + /// Provides the auditing policy that this cmdlet operates on + /// + /// An auditingPolicy object + protected override AuditingPolicy GetPolicy() + { + return this.PolicyHandler.GetServerAuditingPolicy(this.ResourceGroupName, this.ServerName, this.clientRequestId); + } + + protected override void SendPolicy(AuditingPolicy policy) + { + this.PolicyHandler.SetServerAuditingPolicy(policy, clientRequestId); + } + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/SetAzureSqlServerAuditingSetting.cs b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/SetAzureSqlServerAuditingSetting.cs new file mode 100644 index 000000000000..4dee23502a4e --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/SetAzureSqlServerAuditingSetting.cs @@ -0,0 +1,43 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Sql.Security.Model; +using Microsoft.Azure.Commands.Sql.Services; +using Microsoft.Azure.Management.Sql.Models; +using System.Management.Automation; + +namespace Microsoft.Azure.Commands.Sql.Security.Cmdlet +{ + /// + /// Sets the auditing policy properties for a specific database server. + /// + [Cmdlet(VerbsCommon.Set, "AzureSqlServerAuditingSetting"), OutputType(typeof(AuditingPolicy))] + public class SetAzureSqlServerAuditingSetting : SetAuditingSettingsBase + { + + /// + /// Provides the auditing policy that this cmdlet operates on + /// + /// An auditingPolicy object + protected override AuditingPolicy GetPolicy() + { + return this.PolicyHandler.GetServerAuditingPolicy(this.ResourceGroupName, this.ServerName, this.clientRequestId); + } + + protected override void SendPolicy(AuditingPolicy policy) + { + this.PolicyHandler.SetServerAuditingPolicy(policy, clientRequestId); + } + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/SqlDatabaseSecurityCmdletBase.cs b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/SqlDatabaseSecurityCmdletBase.cs new file mode 100644 index 000000000000..e4e0314b69c8 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/SqlDatabaseSecurityCmdletBase.cs @@ -0,0 +1,83 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Sql.Security.Model; +using Microsoft.Azure.Commands.Sql.Security.Services; +using Microsoft.Azure.Commands.Sql.Services; +using System.Management.Automation; + +namespace Microsoft.Azure.Commands.Sql.Security.Cmdlet +{ + /// + /// The base class for all Azure Sql Database security Management Cmdlets + /// + public abstract class SqlDatabaseSecurityCmdletBase : SqlDatabaseCmdletBase + { + /// + /// Gets or sets the name of the database server to use. + /// + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "SQL Database server name.")] + [ValidateNotNullOrEmpty] + public string ServerName { get; set; } + + /// + /// Gets or sets the name of the resource group to use. + /// + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the resource group")] + [ValidateNotNullOrEmpty] + public string ResourceGroupName { get; set; } + + /// + /// The PolicyHandler object mapped to this cmdlet + /// + public SqlClient PolicyHandler { get; internal set; } + + /// + /// Provides the auditing policy that this cmdlet operates on + /// + /// An auditingPolicy object + protected abstract AuditingPolicy GetPolicy(); + + /// + /// Updates the given policy with the cmdlet specific operation + /// + /// An AuditingPolicy object representing the policy of the current resource + protected virtual void UpdatePolicy(AuditingPolicy policy) { } + + /// + /// This method is responsible to call the right API that eventually send the information found in the given AuditingPolicy + /// object to the backend + /// + /// The AuditingPolicy object with the data to be sent to the backend + protected virtual void SendPolicy(AuditingPolicy policy) { } + + /// + /// Returns true if the AuditingPolicy that was developed by this cmdlet should be written out + /// + /// True if the AuditingPolicy should be written out, False otherwise + protected virtual bool writeResult() { return true; } + + /// + /// Executes the cmdlet + /// + public override void ExecuteCmdlet() + { + PolicyHandler = new SqlClient(CurrentContext.Subscription); + AuditingPolicy policy = this.GetPolicy(); + this.UpdatePolicy(policy); + this.SendPolicy(policy); + if (writeResult()) this.WriteObject(policy); + } + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/UseAzureSqlDatabaseServerAuditingPolicy.cs b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/UseAzureSqlDatabaseServerAuditingPolicy.cs new file mode 100644 index 000000000000..f85413ab7240 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/UseAzureSqlDatabaseServerAuditingPolicy.cs @@ -0,0 +1,70 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Management.Sql.Models; +using Microsoft.Azure.Commands.Sql.Properties; +using Microsoft.Azure.Commands.Sql.Security.Model; +using Microsoft.Azure.Commands.Sql.Security.Services; +using System; +using System.Management.Automation; + +namespace Microsoft.Azure.Commands.Sql.Security.Cmdlet +{ + /// + /// Marks the given database as using its server's default policy instead of its own policy. + /// + [Cmdlet(VerbsOther.Use, "AzureSqlDatabaseServerAuditingPolicy"), OutputType(typeof(AuditingPolicy))] + public class UseAzureSqlDatabaseServerAuditingPolicy : SqlDatabaseSecurityCmdletBase + { + /// + /// Gets or sets the name of the database to use. + /// + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "SQL Database name.")] + [ValidateNotNullOrEmpty] + public string DatabaseName { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + /// + /// Provides the auditing policy that this cmdlet operates on + /// + /// An auditingPolicy object + protected override AuditingPolicy GetPolicy() + { + return this.PolicyHandler.GetDatabaseAuditingPolicy(this.ResourceGroupName, this.ServerName, this.DatabaseName, this.clientRequestId); + } + + protected override void UpdatePolicy(AuditingPolicy policy) + { + policy.UseServerDefault = true; + policy.IsEnabled = true; + policy.StorageAccountName = GetStorageAccountName(); + } + protected override void SendPolicy(AuditingPolicy policy) + { + this.PolicyHandler.SetDatabaseAuditingPolicy(policy, clientRequestId); + } + + protected string GetStorageAccountName() + { + string storageAccountName = this.PolicyHandler.GetServerStorageAccount(this.ResourceGroupName, this.ServerName, this.clientRequestId); + if (string.IsNullOrEmpty(storageAccountName)) + throw new Exception(string.Format(Microsoft.Azure.Commands.Sql.Properties.Resources.UseServerWithoutStorageAccount)); + return storageAccountName; + } + + protected override bool writeResult() { return PassThru; } + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/UseAzureSqlServerAuditingSetting.cs b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/UseAzureSqlServerAuditingSetting.cs new file mode 100644 index 000000000000..acab152e1e9b --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/Security/Cmdlet/UseAzureSqlServerAuditingSetting.cs @@ -0,0 +1,79 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Management.Sql.Models; +using Microsoft.Azure.Commands.Sql.Properties; +using Microsoft.Azure.Commands.Sql.Security.Model; +using Microsoft.Azure.Commands.Sql.Security.Services; +using System; +using System.Management.Automation; + +namespace Microsoft.Azure.Commands.Sql.Security.Cmdlet +{ + /// + /// Marks the given database as using its server's default policy instead of its own policy. + /// + [Cmdlet(VerbsOther.Use, "AzureSqlServerAuditingSetting"), OutputType(typeof(AuditingPolicy))] + public class UseAzureSqlServerAuditingSetting : SqlDatabaseSecurityCmdletBase + { + /// + /// Gets or sets the name of the database to use. + /// + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "SQL Database name.")] + [ValidateNotNullOrEmpty] + public string DatabaseName { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + /// + /// Provides the auditing policy that this cmdlet operates on + /// + /// An auditingPolicy object + protected override AuditingPolicy GetPolicy() + { + return this.PolicyHandler.GetDatabaseAuditingPolicy(this.ResourceGroupName, this.ServerName, this.DatabaseName, this.clientRequestId); + } + + protected override void UpdatePolicy(AuditingPolicy policy) + { + policy.UseServerDefault = true; + policy.IsEnabled = true; + policy.StorageAccountName = GetStorageAccountName(); + } + protected override void SendPolicy(AuditingPolicy policy) + { + this.PolicyHandler.SetDatabaseAuditingPolicy(policy, clientRequestId); + } + + private string GetStorageAccountName() + { + string storageAccountName = this.GetServerProperties().StorageAccountName; + if (string.IsNullOrEmpty(storageAccountName)) + throw new Exception(string.Format(Microsoft.Azure.Commands.Sql.Properties.Resources.NoServerStorageAccount)); + return storageAccountName; + } + + protected override bool writeResult() { return PassThru; } + + /// + /// Returns the security policy properties of of the current database server + /// + /// A DatabaseSecurityPolicyProperties object describing the security policy of the current database server + private DatabaseSecurityPolicyProperties GetServerProperties() + { + return new EndpointsCommunicator(CurrentContext.Subscription).GetServerSecurityPolicy(this.ResourceGroupName, this.ServerName, this.clientRequestId).Properties; + } + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql/Security/Model/AuditingPolicy.cs b/src/ResourceManager/Sql/Commands.Sql/Security/Model/AuditingPolicy.cs new file mode 100644 index 000000000000..520b41fdfbd2 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/Security/Model/AuditingPolicy.cs @@ -0,0 +1,56 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Sql.Security.Model +{ + public class AuditingPolicy + { + + public AuditingPolicy() + { + ConnectionStrings = new ConnectionStrings(); + } + + public string ResourceGroupName { get; set; } + + public string ServerName { get; set; } + + public string DatabaseName { get; set; } + + public string StorageAccountName { get; set; } + + public Constants.StorageKeyTypes StorageKeyType { get; set; } + + public string[] EventType { get; set; } + + public bool IsEnabled { get; set; } + + public bool UseServerDefault { get; set; } + + public bool DirectAccessEnabled { get; set; } + + public ConnectionStrings ConnectionStrings { get; set; } + } + + public class ConnectionStrings + { + public string AdoNetConnectionString { get; set; } + + public string OdbcConnectionString { get; set; } + + public string PhpConnectionString { get; set; } + + public string JdbcConnectionString { get; set; } + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql/Security/Model/Constants.cs b/src/ResourceManager/Sql/Commands.Sql/Security/Model/Constants.cs new file mode 100644 index 000000000000..6c2641bbde32 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/Security/Model/Constants.cs @@ -0,0 +1,41 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Sql.Security.Model +{ + public class Constants + { + // Event types + public const string Access = "DataAccess"; + public const string Schema = "SchemaChanges"; + public const string Data = "DataChanges"; + public const string Security = "SecurityExceptions"; + public const string RevokePermissions = "RevokePermissions"; + public const string All = "All"; + public const string None = "None"; + + // request headers names + public const string ClientSessionIdHeaderName = "x-ms-client-session-id"; + public const string ClientRequestIdHeaderName = "x-ms-client-request-id"; + + //id to locate a server's security policy + public const string ServerPolicyId = "c3d905bb-e460-48bb-884d-75fac8f63e11"; + + // types of storage keys + public enum StorageKeyTypes {Primary, Secondary}; + + public const string Primary = "Primary"; + public const string Secondary = "Secondary"; + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql/Security/Services/EndpointsCommunicator.cs b/src/ResourceManager/Sql/Commands.Sql/Security/Services/EndpointsCommunicator.cs new file mode 100644 index 000000000000..241f3315f915 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/Security/Services/EndpointsCommunicator.cs @@ -0,0 +1,228 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Sql.Security.Model; +using Microsoft.Azure.Commands.Sql.Services; +using Microsoft.Azure.Management.Resources; +using Microsoft.Azure.Management.Resources.Models; +using Microsoft.Azure.Management.Sql; +using Microsoft.Azure.Management.Sql.Models; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Management.Storage; +using Microsoft.WindowsAzure.Management.Storage.Models; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; + +namespace Microsoft.Azure.Commands.Sql.Security.Services +{ + /// + /// This class is responsible for all the REST communication with the management libraries + /// + public class EndpointsCommunicator + { + private static SqlManagementClient SqlClient { get; set; } + + private static StorageManagementClient StorageClient { get; set; } + + private static AzureSubscription Subscription {get ; set; } + + private static ResourceManagementClient ResourcesClient { get; set; } + + public EndpointsCommunicator(AzureSubscription subscription) + { + if (subscription != Subscription) + { + Subscription = subscription; + SqlClient = null; + StorageClient = null; + ResourcesClient = null; + } + } + + /// + /// Gets the database security policy for the given database in the given database server in the given resource group + /// + public DatabaseSecurityPolicy GetDatabaseSecurityPolicy(string resourceGroupName, string serverName, string databaseName, string clientRequestId) + { + ISecurityOperations operations = GetCurrentSqlClient(clientRequestId).DatabaseSecurity; + DatabaseSecurityPolicyGetResponse response = operations.Get(resourceGroupName, serverName, databaseName); + return response.DatabaseSecurityPolicy; + } + + /// + /// Gets the database server security policy of the given database server in the given resource group + /// + public DatabaseSecurityPolicy GetServerSecurityPolicy(string resourceGroupName, string serverName, string clientRequestId) + { + ISecurityOperations operations = GetCurrentSqlClient(clientRequestId).DatabaseSecurity; + DatabaseSecurityPolicyGetResponse response = operations.Get(resourceGroupName, serverName, Constants.ServerPolicyId); + return response.DatabaseSecurityPolicy; + } + + /// + /// Sets the database security policy for the given database in the given database server in the given resource group + /// + public void SetDatabaseSecurityPolicy(string resourceGroupName, string serverName, string databaseName, string clientRequestId, DatabaseSecurityPolicyUpdateParameters parameters) + { + ISecurityOperations operations = GetCurrentSqlClient(clientRequestId).DatabaseSecurity; + operations.Update(resourceGroupName, serverName, databaseName, parameters); + } + + /// + /// Sets the database server security policy of the given database server in the given resource group + /// + public void SetServerSecurityPolicy(string resourceGroupName, string serverName, string clientRequestId, DatabaseSecurityPolicyUpdateParameters parameters) + { + ISecurityOperations operations = GetCurrentSqlClient(clientRequestId).DatabaseSecurity; + operations.Update(resourceGroupName, serverName, Constants.ServerPolicyId, parameters); + } + + + public async Task> GetStorageKeysAsync(string resourceGroupName, string storageAccountName) + { + SqlManagementClient client = GetCurrentSqlClient("none"); + + string url = "https://management.azure.com"; + url = url + "/subscriptions/" + (client.Credentials.SubscriptionId != null ? client.Credentials.SubscriptionId.Trim() : ""); + url = url + "/resourceGroups/" + resourceGroupName; + url = url + "/providers/Microsoft.ClassicStorage/storageAccounts/" + storageAccountName; + url = url + "/listKeys?api-version=2014-06-01"; + + + + HttpRequestMessage httpRequest = new HttpRequestMessage(); + httpRequest.Method = HttpMethod.Post; + httpRequest.RequestUri = new Uri(url); + + await client.Credentials.ProcessHttpRequestAsync(httpRequest, CancellationToken.None).ConfigureAwait(false); + HttpResponseMessage httpResponse = await client.HttpClient.SendAsync(httpRequest, CancellationToken.None).ConfigureAwait(false); + string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + JToken responseDoc = JToken.Parse(responseContent); + + Dictionary result = new Dictionary(); + string primaryKey = (string)responseDoc["primaryKey"]; + string secondaryKey = (string)responseDoc["secondaryKey"]; + if(string.IsNullOrEmpty(primaryKey) || string.IsNullOrEmpty(secondaryKey)) + throw new Exception(); // this is caught by the synced wrapper + result.Add(Constants.StorageKeyTypes.Primary, primaryKey); + result.Add(Constants.StorageKeyTypes.Secondary, secondaryKey); + return result; + } + + + /// + /// Gets the storage keys for the given storage account. + /// + public Dictionary GetStorageKeys(string resourceGroupName, string storageAccountName) + { + try + { + return Task.Factory.StartNew((object epc) => + { + return ((EndpointsCommunicator)epc).GetStorageKeysAsync(resourceGroupName, storageAccountName); + } + , this, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + } + catch + { + throw new Exception(string.Format(Microsoft.Azure.Commands.Sql.Properties.Resources.StorageAccountNotFound, storageAccountName)); + } + } + + public string GetStorageResourceGroup(string storageAccountName) + { + ResourceManagementClient resourcesClient = GetCurrentResourcesClient(); + + ResourceListResult res = resourcesClient.Resources.List(new ResourceListParameters + { + ResourceGroupName = null, + ResourceType = "Microsoft.ClassicStorage/storageAccounts", + TagName = null, + TagValue = null + }); + List allResources = new List(res.Resources); + + if (allResources.Count != 0) + { + Resource account = allResources.Find(r => r.Name == storageAccountName); + if (account != null) + { + String resId = account.Id; + String[] segments = resId.Split('/'); + int indexOfResoureGroup = new List(segments).IndexOf("resourceGroups") +1; + return segments[indexOfResoureGroup]; + } + else + { + throw new Exception(string.Format(Microsoft.Azure.Commands.Sql.Properties.Resources.StorageAccountNotFound, storageAccountName)); + } + } + return null; + } + + /// + /// Gets the storage table endpoint the given storage account + /// + public string GetStorageTableEndpoint(string storageAccountName) + { + try + { + List endpoints = new List(GetCurrentStorageClient().StorageAccounts.Get(storageAccountName).StorageAccount.Properties.Endpoints); + return endpoints.Find(u => u.AbsoluteUri.Contains(".table.")).AbsoluteUri; + } + catch + { + throw new Exception(string.Format(Microsoft.Azure.Commands.Sql.Properties.Resources.StorageAccountNotFound, storageAccountName)); + } + } + + private StorageManagementClient GetCurrentStorageClient() + { + if(StorageClient == null) + StorageClient = AzureSession.ClientFactory.CreateClient(Subscription, AzureEnvironment.Endpoint.ServiceManagement); + return StorageClient; + } + + private ResourceManagementClient GetCurrentResourcesClient() + { + if (ResourcesClient == null) + ResourcesClient = AzureSession.ClientFactory.CreateClient(Subscription, AzureEnvironment.Endpoint.ResourceManager); + return ResourcesClient; + } + + /// + /// Retrieve the SQL Management client for the currently selected subscription, adding the session and request + /// id tracing headers for the current cmdlet invocation. + /// + /// The SQL Management client for the currently selected subscription. + private SqlManagementClient GetCurrentSqlClient(String clientRequestId) + { + // Get the SQL management client for the current subscription + if (SqlClient == null) + { + SqlClient = AzureSession.ClientFactory.CreateClient(Subscription, AzureEnvironment.Endpoint.ResourceManager); + SqlClient.HttpClient.DefaultRequestHeaders.Add(Constants.ClientSessionIdHeaderName, Util.GenerateTracingId()); + } + SqlClient.HttpClient.DefaultRequestHeaders.Remove(Constants.ClientRequestIdHeaderName); + SqlClient.HttpClient.DefaultRequestHeaders.Add(Constants.ClientRequestIdHeaderName, clientRequestId); + return SqlClient; + } + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql/Security/Services/SqlClient.cs b/src/ResourceManager/Sql/Commands.Sql/Security/Services/SqlClient.cs new file mode 100644 index 000000000000..4bfada279e82 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/Security/Services/SqlClient.cs @@ -0,0 +1,239 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Sql.Security.Model; +using Microsoft.Azure.Management.Sql.Models; +using Microsoft.WindowsAzure.Commands.Common.Models; +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Microsoft.Azure.Commands.Sql.Security.Services +{ + /// + /// The SqlClient class is resposible for the mapping of data between two models: + /// The communication model as defined by the endpoint APIs and the cmdlet model that is defined by the + /// AuditingPolicy class. This class knows how to wrap a policy in its communication model and return + /// a policy in its cmdlet model and vice versa (i.e., unwrapping). + /// + public class SqlClient + { + private AzureSubscription Subscription { get; set; } + + private EndpointsCommunicator Communicator { get; set; } + + // cacheing the fetched properties to prevent constly network interaction in cases it is not needed + private DatabaseSecurityPolicyProperties FetchedProperties; + + // In cases when storage is not needed and not provided, theres's no need to perform storage related network interaction that may fail + public bool IgnoreStorage { get; set; } + + public SqlClient(AzureSubscription subscription) + { + Subscription = subscription; + Communicator = new EndpointsCommunicator(subscription); + IgnoreStorage = false; + } + + /// + /// Returns the storage account name of the given database server + /// + /// The name of the resouce group to which the server belongs + /// The server's name + /// The Id to use in the request + /// The name of the storage accunt, null if it doesn't exist + public string GetServerStorageAccount(string resourceGroupName, string serverName, string requestId) + { + return Communicator.GetServerSecurityPolicy(resourceGroupName, serverName, requestId).Properties.StorageAccountName; + } + + public AuditingPolicy GetDatabaseAuditingPolicy(string resourceGroup, string serverName, string databaseName, string requestId) + { + DatabaseSecurityPolicy policy = Communicator.GetDatabaseSecurityPolicy(resourceGroup, serverName, databaseName, requestId); + AuditingPolicy wrapper = WrapPolicy(policy); + wrapper.ResourceGroupName = resourceGroup; + wrapper.ServerName = serverName; + wrapper.DatabaseName = databaseName; + return wrapper; + } + + public AuditingPolicy GetServerAuditingPolicy(string resourceGroup, string serverName, string requestId) + { + DatabaseSecurityPolicy policy = Communicator.GetServerSecurityPolicy(resourceGroup, serverName, requestId); + AuditingPolicy wrapper = WrapPolicy(policy); + wrapper.ResourceGroupName = resourceGroup; + wrapper.ServerName = serverName; + return wrapper; + } + + private AuditingPolicy WrapPolicy(DatabaseSecurityPolicy policy) + { + AuditingPolicy wrapper = new AuditingPolicy(); + DatabaseSecurityPolicyProperties properties = policy.Properties; + wrapper.UseServerDefault = properties.UseServerDefault; + wrapper.IsEnabled = properties.IsAuditingEnabled; + wrapper.DirectAccessEnabled = !properties.IsBlockDirectAccessEnabled; + addStorageInfoToWrapperFromPolicy(wrapper, properties); + AddEventTypesToWrapperFromPolicy(wrapper, properties); + AddConnectionStringsToWrapperFromPolicy(wrapper, properties); + this.FetchedProperties = properties; + return wrapper; + } + + private void addStorageInfoToWrapperFromPolicy(AuditingPolicy wrapper, DatabaseSecurityPolicyProperties properties) + { + wrapper.StorageAccountName = properties.StorageAccountName; + if (properties.StorageAccountKey != null) + wrapper.StorageKeyType = Constants.StorageKeyTypes.Primary; // TODO - until we have in prodcution the secondary field - handle as alway primary + if (properties.SecondaryStorageAccountKey != null) + wrapper.StorageKeyType = Constants.StorageKeyTypes.Secondary; + } + + private void AddConnectionStringsToWrapperFromPolicy(AuditingPolicy wrapper, DatabaseSecurityPolicyProperties properties) + { + wrapper.ConnectionStrings.AdoNetConnectionString = properties.AdoNetConnectionString; + wrapper.ConnectionStrings.OdbcConnectionString = properties.OdbcConnectionString; + wrapper.ConnectionStrings.JdbcConnectionString = properties.JdbcConnectionString; + wrapper.ConnectionStrings.PhpConnectionString = properties.PhpConnectionString; + } + + private void AddEventTypesToWrapperFromPolicy(AuditingPolicy wrapper, DatabaseSecurityPolicyProperties properties) + { + HashSet events = new HashSet(); + if (properties.IsEventTypeDataAccessEnabled) events.Add(Constants.Access); + if (properties.IsEventTypeDataChangesEnabled) events.Add(Constants.Data); + if (properties.IsEventTypeSchemaChangeEnabled) events.Add(Constants.Schema); + if (properties.IsEventTypeGrantRevokePermissionsEnabled) events.Add(Constants.RevokePermissions); + if (properties.IsEventTypeSecurityExceptionsEnabled) events.Add(Constants.Security); + wrapper.EventType = events.ToArray(); + } + + public void SetServerAuditingPolicy(AuditingPolicy policy, String clientId) + { + DatabaseSecurityPolicyUpdateParameters parameters = UnwrapPolicy(policy); + Communicator.SetServerSecurityPolicy(policy.ResourceGroupName, policy.ServerName, clientId, parameters); + } + + public void SetDatabaseAuditingPolicy(AuditingPolicy policy, String clientId) + { + DatabaseSecurityPolicyUpdateParameters parameters = UnwrapPolicy(policy); + Communicator.SetDatabaseSecurityPolicy(policy.ResourceGroupName, policy.ServerName, policy.DatabaseName, clientId, parameters); + } + + /// + /// Unwrap the cmdlets model object and transform it to the communication model object + /// + /// The AuditingPolicy object + /// The communication model object + private DatabaseSecurityPolicyUpdateParameters UnwrapPolicy(AuditingPolicy policy) + { + DatabaseSecurityPolicyUpdateParameters updateParameters = new DatabaseSecurityPolicyUpdateParameters(); + DatabaseSecurityPolicyProperties properties = new DatabaseSecurityPolicyProperties(); + updateParameters.Properties = properties; + properties.RetentionDays = 90; + properties.IsAuditingEnabled = policy.IsEnabled; + properties.UseServerDefault = policy.UseServerDefault; + properties.IsBlockDirectAccessEnabled = !policy.DirectAccessEnabled; + UpdateEventTypes(policy, properties); + UpdateStorage(policy, properties); + return updateParameters; + } + + /// + /// Check that the user didn't enter a shortcut option (All or None) with other event types. + /// + private bool ValidateShortcutUsage(HashSet userEnteredEventType, string option) + { + return userEnteredEventType.Count == 1 || !userEnteredEventType.Contains(option); + } + + /// + /// Updates the storage properties of the policy that this object operates on + /// + private void UpdateEventTypes(AuditingPolicy wrappedPolicy, DatabaseSecurityPolicyProperties properties) + { + string[] userEnteredEventType = wrappedPolicy.EventType; + if (userEnteredEventType == null || userEnteredEventType.Length == 0) + return; + HashSet eventTypes = new HashSet(userEnteredEventType); + + if (!ValidateShortcutUsage(eventTypes, Constants.All)) + throw new Exception(string.Format(Microsoft.Azure.Commands.Sql.Properties.Resources.InvalidEventTypeSet, Constants.All)); + if (!ValidateShortcutUsage(eventTypes, Constants.None)) + throw new Exception(string.Format(Microsoft.Azure.Commands.Sql.Properties.Resources.InvalidEventTypeSet, Constants.None)); + + properties.IsEventTypeDataAccessEnabled = ValueOfProperty(eventTypes, Constants.Access); + properties.IsEventTypeSchemaChangeEnabled = ValueOfProperty(eventTypes, Constants.Schema); + properties.IsEventTypeDataChangesEnabled = ValueOfProperty(eventTypes, Constants.Data); + properties.IsEventTypeSecurityExceptionsEnabled = ValueOfProperty(eventTypes, Constants.Security); + properties.IsEventTypeGrantRevokePermissionsEnabled = ValueOfProperty(eventTypes, Constants.RevokePermissions); + + // we need to re-add the event types to the AuditingPolicy object to replace the All / None with the real values + if (userEnteredEventType.Contains(Constants.All) || userEnteredEventType.Contains(Constants.None)) + AddEventTypesToWrapperFromPolicy(wrappedPolicy, properties); + } + + /// + /// Updates the storage properties of the policy that this object operates on + /// + private void UpdateStorage(AuditingPolicy policy, DatabaseSecurityPolicyProperties properties) + { + string storageAccountName = policy.StorageAccountName; + if (storageAccountName != null) + properties.StorageAccountName = storageAccountName; + + if (string.IsNullOrEmpty(properties.StorageAccountName) && (!IgnoreStorage)) // can happen if the user didn't provide account name for a policy that lacked it + { + throw new Exception(string.Format(Microsoft.Azure.Commands.Sql.Properties.Resources.NoStorageAccountWhenConfiguringAuditingPolicy)); + } + + // no need to do time consuming http inteaction to fetch these properties if the storage account was not changed + if (properties.StorageAccountName == this.FetchedProperties.StorageAccountName) + { + properties.StorageAccountResourceGroupName = this.FetchedProperties.StorageAccountResourceGroupName; + properties.StorageAccountSubscriptionId = this.FetchedProperties.StorageAccountSubscriptionId; + properties.StorageTableEndpoint = this.FetchedProperties.StorageTableEndpoint; + } + else + { + properties.StorageAccountSubscriptionId = Subscription.Id.ToString(); + properties.StorageAccountResourceGroupName = Communicator.GetStorageResourceGroup(properties.StorageAccountName); + properties.StorageTableEndpoint = Communicator.GetStorageTableEndpoint(properties.StorageAccountName); + } + + if (!IgnoreStorage) + { + // storage keys are not sent when fetching the policy, so if they are needed, they should be fetched + Dictionary keys = Communicator.GetStorageKeys(properties.StorageAccountResourceGroupName, properties.StorageAccountName); + if (policy.StorageKeyType == Constants.StorageKeyTypes.Primary) + properties.StorageAccountKey = keys[Constants.StorageKeyTypes.Primary]; + else + properties.SecondaryStorageAccountKey = keys[Constants.StorageKeyTypes.Secondary]; + } + } + + /// + /// The value of a property from a set of event types + /// + /// A set of the event types that the user selected to use + /// The property for which we'd like to know if the user selected to enable or disable + /// A bool stating whether the user selected to enable or disable the given property + private bool ValueOfProperty(HashSet eventTypes, String propertyName) + { + if (eventTypes.Contains(Constants.None)) return false; + if (eventTypes.Contains(Constants.All)) return true; + return eventTypes.Contains(propertyName); + } + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql/Services/Util.cs b/src/ResourceManager/Sql/Commands.Sql/Services/Util.cs new file mode 100644 index 000000000000..4edf1a70ee70 --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/Services/Util.cs @@ -0,0 +1,36 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; + +namespace Microsoft.Azure.Commands.Sql.Services +{ + public class Util + { + /// + /// Generates a client side tracing Id of the format: + /// [Guid]-[Time in UTC] + /// + /// A string representation of the client side tracing Id. + public static string GenerateTracingId() + { + return string.Format( + CultureInfo.InvariantCulture, + "{0}-{1}", + Guid.NewGuid().ToString(), + DateTime.UtcNow.ToString("u")); + } + } +} diff --git a/src/ResourceManager/Sql/Commands.Sql/SqlDatabaseCmdletBase.cs b/src/ResourceManager/Sql/Commands.Sql/SqlDatabaseCmdletBase.cs new file mode 100644 index 000000000000..78b8d75d9b5f --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/SqlDatabaseCmdletBase.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Sql.Services; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.Azure.Commands.Sql +{ + /// + /// The base class for all Azure Sql Database Management Cmdlets + /// + public abstract class SqlDatabaseCmdletBase : AzurePSCmdlet + { + /// + /// Stores the per request session Id for all request made in this cmdlet call. + /// + protected string clientRequestId { get; set; } + + internal SqlDatabaseCmdletBase() + { + this.clientRequestId = Util.GenerateTracingId(); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/Sql/Commands.Sql/packages.config b/src/ResourceManager/Sql/Commands.Sql/packages.config new file mode 100644 index 000000000000..f72e111e16ce --- /dev/null +++ b/src/ResourceManager/Sql/Commands.Sql/packages.config @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/Tags/Commands.Tags/Commands.Tags.csproj b/src/ResourceManager/Tags/Commands.Tags/Commands.Tags.csproj new file mode 100644 index 000000000000..66baca79a544 --- /dev/null +++ b/src/ResourceManager/Tags/Commands.Tags/Commands.Tags.csproj @@ -0,0 +1,166 @@ + + + + + Debug + AnyCPU + {2493A8F7-1949-4F29-8D53-9D459046C3B8} + Library + Properties + Microsoft.Azure.Commands.Tags + Microsoft.Azure.Commands.Tags + v4.5 + 512 + + ..\..\..\ + true + /assemblyCompareMode:StrongNameIgnoringVersion + + + true + full + false + ..\..\..\Package\Debug\ResourceManager\AzureResourceManager\Tags + DEBUG;TRACE + prompt + 4 + true + true + false + + + ..\..\..\Package\Release\ResourceManager\AzureResourceManager\Tags + TRACE;SIGN + true + pdbonly + AnyCPU + bin\Release\Microsoft.Azure.Commands.Tags.dll.CodeAnalysisLog.xml + true + GlobalSuppressions.cs + prompt + MinimumRecommendedRules.ruleset + ;$(ProgramFiles)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\Rule Sets + ;$(ProgramFiles)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\FxCop\Rules + true + true + MSSharedLibKey.snk + true + false + + + + False + ..\..\..\packages\Microsoft.Azure.Management.Resources.2.7.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll + + + False + ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll + + + False + ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + True + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + True + + + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + + + + + + + + + {65c3a86a-716d-4e7d-ab67-1db00b3bf72d} + Commands.Common.Storage + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + {c60342b1-47d3-4a0e-8081-9b97ce60b7af} + Commands.Profile + + + + + PreserveNewest + + + Designer + PreserveNewest + + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + + + + + + + True + True + Resources.resx + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ResourceManager/Tags/Commands.Tags/MSSharedLibKey.snk b/src/ResourceManager/Tags/Commands.Tags/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ResourceManager/Tags/Commands.Tags/MSSharedLibKey.snk differ diff --git a/src/ResourceManager/Tags/Commands.Tags/Microsoft.Azure.Commands.Tags.dll-help.psd1 b/src/ResourceManager/Tags/Commands.Tags/Microsoft.Azure.Commands.Tags.dll-help.psd1 new file mode 100644 index 000000000000..76b408714958 --- /dev/null +++ b/src/ResourceManager/Tags/Commands.Tags/Microsoft.Azure.Commands.Tags.dll-help.psd1 @@ -0,0 +1,88 @@ +# +# Module manifest for module 'Microsoft.Azure.Commands.Resources' +# +# Generated by: Microsoft Corporation +# +# Generated on: 4/01/2014 +# + +@{ + +# Version number of this module. +ModuleVersion = '0.8.8' + +# ID used to uniquely identify this module +GUID = '81d522a4-6e5d-4105-8f58-376204c47458' + +# Author of this module +Author = 'Microsoft Corporation' + +# Company or vendor of this module +CompanyName = 'Microsoft Corporation' + +# Copyright statement for this module +Copyright = ' Microsoft Corporation. All rights reserved.' + +# Description of the functionality provided by this module +Description = '' + +# Minimum version of the Windows PowerShell engine required by this module +PowerShellVersion = '3.0' + +# Name of the Windows PowerShell host required by this module +PowerShellHostName = '' + +# Minimum version of the Windows PowerShell host required by this module +PowerShellHostVersion = '' + +# Minimum version of the .NET Framework required by this module +DotNetFrameworkVersion = '4.0' + +# Minimum version of the common language runtime (CLR) required by this module +CLRVersion='4.0' + +# Processor architecture (None, X86, Amd64, IA64) required by this module +ProcessorArchitecture = 'None' + +# Modules that must be imported into the global environment prior to importing this module +RequiredModules = @() + +# Assemblies that must be loaded prior to importing this module +RequiredAssemblies = @() + +# Script files (.ps1) that are run in the caller's environment prior to importing this module +ScriptsToProcess = @() + +# Type files (.ps1xml) to be loaded when importing this module +TypesToProcess = @() + +# Format files (.ps1xml) to be loaded when importing this module +FormatsToProcess = @() + +# Modules to import as nested modules of the module specified in ModuleToProcess +NestedModules = @( + '..\..\..\Package\Debug\ResourceManager\AzureResourceManager\Tags\Microsoft.Azure.Commands.Tags.dll' +) + +# Functions to export from this module +FunctionsToExport = '*' + +# Cmdlets to export from this module +CmdletsToExport = '*' + +# Variables to export from this module +VariablesToExport = '*' + +# Aliases to export from this module +AliasesToExport = @() + +# List of all modules packaged with this module +ModuleList = @() + +# List of all files packaged with this module +FileList = @() + +# Private data to pass to the module specified in ModuleToProcess +PrivateData = '' + +} diff --git a/src/ResourceManager/Tags/Commands.Tags/Microsoft.Azure.Commands.Tags.dll-help.xml b/src/ResourceManager/Tags/Commands.Tags/Microsoft.Azure.Commands.Tags.dll-help.xml new file mode 100644 index 000000000000..1aee30ad1b7e --- /dev/null +++ b/src/ResourceManager/Tags/Commands.Tags/Microsoft.Azure.Commands.Tags.dll-help.xml @@ -0,0 +1,674 @@ + + + + + Get-AzureTag + + Gets predefined Azure tags + + + + + Get + AzureTag + + + + + The Get-AzureTag cmdlet gets predefined Azure tags in your subscription. This cmdlet returns basic information about the tags or detailed information about tags and their values. All output objects include a Count property that represents the number of resources and resource groups to which the tags and values have been applied. Get-AzureTag is part of a set of cmdlets (New/Get/Remove) that help you manage predefined Azure tags.An Azure "tag" is a name-value pair that you can use to categorize your Azure resources and resource groups, such as by department or cost center, or to track notes or comments about the resources and groups. You can define and apply tags in a single step, but predefined tags let you establish standard, consistent, predictable names and values for the tags in your subscription. If the subscription includes any predefined tags, you cannot apply undefined tags or values to any resource or resource group in the subscription.To create a predefined tag, use the New-AzureTag cmdlet. To apply a predefined tag to a resource or resource group. use the Tag parameters of the New and Set cmdlets in the AzureResourceManager module. To search for resources or resource groups with a specified tag name or name and value, use the Tag parameters of the Get-AzureResource and Get-AzureResourceGroup cmdlets. + + + + Get-AzureTag + + Name + + Gets detailed information about the predefined tag with the specified name. By default, Get-AzureTag gets basic information about all predefined tags in the subscription.When you use the Name parameter, the Detailed parameter has no effect. + + String + + + Detailed + + Adds information about tag values to the output. + + SwitchParameter + + + + + + Name + + Gets detailed information about the predefined tag with the specified name. By default, Get-AzureTag gets basic information about all predefined tags in the subscription.When you use the Name parameter, the Detailed parameter has no effect. + + String + + String + + + + + + Detailed + + Adds information about tag values to the output. + + SwitchParameter + + SwitchParameter + + + + + + + + + None + + + + + + + + + + + + Microsoft.Azure.Commands.Tags.Model.PSTag, Microsoft.Azure.Commands.Tags + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Get all predefined tags -------------------------- + + + + PS C:\>Get-AzureTag +Name Count + +======== ===== + +Department 5 + +FY2015 2 + +CostCenter 20 + + This command gets all predefined tags in the subscription. The Count property shows how many times the tag has been applied to resources and resource groups in the subscription. + + + + + + + + + -------------------------- Example 2: Get a tag by name -------------------------- + + + + PS C:\>Get-AzureTag -Name Department +Name: Department + +Count: 5 + +Values: + + Name Count + + ========== ===== + + Finance 2 + + IT 3 + + This command gets detailed information about the Department tag and its values. The Count property shows how many times the tag and each of its values has been applied to resources and resource groups in the subscription. + + + + + + + + + -------------------------- Example 3: Get values of all tags -------------------------- + + + + PS C:\>Get-AzureTag -Detailed +Name: Department + +Count: 5 + +Values: + + Name Count + + ========== ===== + + Finance 2 + + IT 3 + + +Name: FY2015 + +Count: 2 + + +Name: CostCenter + +Count: 20 + +Values: + + Name Count + + ========== ===== + + 0001 5 + + 0002 10 + + 0003 5 + + This command uses the Detailed parameter to get detailed information about all predefined tags in the subscription. It's the equivalent of using the Name parameter for every tag. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=404173 + + + New-AzureTag + + + + Remove-AzureTag + + + + + + + + New-AzureTag + + Creates a predefined Azure tag or adds values to an existing tag + + + + + New + AzureTag + + + + + The New-AzureTag cmdlet creates a predefined Azure tag with an optional predefined value. You can also use it to add additional values to existing predefined tags. To create a new predefined tag, enter a unique tag name. To add a value to an existing predefined tag, specify the name of the existing tag and the new value. This cmdlet returns an object that represents the new or changed tag with its values and the number of resources to which it has been applied. New-AzureTag is part of a set of cmdlets (New/Get/Remove) that let you manage predefined Azure tags.An Azure "tag" is a name-value pair that you can use to categorize your Azure resources and resource groups, such as by department or cost center, or to track notes or comments about the resources and groups. You can define and apply tags in a single step, but predefined tags let you establish standard, consistent, predictable names and values for the tags in your subscription. If the subscription includes any predefined tags, you cannot apply undefined tags or values to any resource or resource group in the subscription.To apply a predefined tag to a resource or resource group. use the Tag parameters of the New and Set cmdlets in the AzureResourceManager module. To search for resources or resource groups with a specified tag name or name and value, use the Tag parameters of the Get-AzureResource and Get-AzureResourceGroup cmdlets.Every tag has a name. The values are optional. A predefined Azure tag can have multiple values, but when you apply the tag to a resource or resource group, you apply the tag name and only one of its values. For example, you can create a predefined Department tag with a value for each department, such as Finance, Human Resources, and IT. When you apply the Department tag to a resource, you apply only one predefined value, such as Finance. + + + + New-AzureTag + + Name + + Specifies the tag name. To create a new predefined tag, enter a unique name. To add a new value to an existing tag, enter the name of the existing tag.If an existing predefined tag has the specified name, New-AzureTag adds the specified value, if any, to the tag with that name, instead of creating a new tag. + + String + + + Value + + Specifies a tag value. Predefined tags can have multiple value, but you can enter only one value in each command. This parameter is optional, because tags can have names and no values. + + String + + + + + + Name + + Specifies the tag name. To create a new predefined tag, enter a unique name. To add a new value to an existing tag, enter the name of the existing tag.If an existing predefined tag has the specified name, New-AzureTag adds the specified value, if any, to the tag with that name, instead of creating a new tag. + + String + + String + + + + + + Value + + Specifies a tag value. Predefined tags can have multiple value, but you can enter only one value in each command. This parameter is optional, because tags can have names and no values. + + String + + String + + + + + + + + + None + + + + + + + + + + + + Microsoft.Azure.Commands.Tags.Model.PSTag + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Create a predefined tag -------------------------- + + + + PS C:\>New-AzureTag -Name FY2015 +Name: Department + +Count: 0 + +Values: + + Name Count + + ========= ===== + + Finance 0 + + This command creates a predefined tag named "FY2015". This tag has no values. You can apply a tag with no values to a resource or resource group, or use New-AzureTag to add values to the tag. You can also specify a value when you apply the tag to the resource or resource group. + + + + + + + + + -------------------------- Example 2: Create a predefined tag with a value -------------------------- + + + + PS C:\>New-AzureTag -Name Department -Value Finance +Name: Department + +Count: 0 + +Values: + + Name Count + + ========= ===== + + Finance 0 + + This command creates a Department predefined tag with a value of Finance. + + + + + + + + + -------------------------- Example 3: Add a value to a predefined tag -------------------------- + + + + PS C:\>New-AzureTag -Name Department -Value Finance +Name: Department + +Count: 0 +Values: + Name Count + ========= ===== + Finance 0 + + +PS C:\>New-AzureTag -Name Department -Value IT + +Name: Department +Count: 0 +Values: + Name Count + ========= ===== + Finance 0 + IT 0 + + These commands creates a Department predefined tag with two values. When the tag name exists, New-AzureTag adds the value to the existing tag, instead of creating a new one. + + + + You can create multiple values for a predefined tag. When you apply the tag to a resource, you apply just one of its values. + + + + + -------------------------- Example 4: Use a predefined tag -------------------------- + + + + PS C:\>New-AzureTag -Name CostCenter -Value 0001 + + +Name: CostCenter +Count: 0 +Values: + Name Count + ========= ===== + 0001 0 + + +PS C:\>Set-AzureResourceGroup -Name EngineerBlog -Tag @{Name="CostCenter";Value="0001"} + + +Name: EngineerBlog +Location: East US +Resources: + + Name Type Location + =============== ======================= ======== + EngineerBlog Microsoft.Web/sites West US + EngSvr01 Microsoft.Sql/servers West US + EngDB02 Microsoft.Sql/databases West US +Tags: + Name Value + ========== ===== + CostCenter 0001 + + +PS C:\>Get-AzureTag -Name CostCenter + + +Name: CostCenter +Count: 1 +Values: + Name Count + ========= ===== + 0001 1 + +PS C:\>Get-AzureResourceGroup -Tag @{Name="CostCenter"} + +Name: EngineerBlog +Location: East US +Resources: + Name Type Location + =============== ======================= ======== + EngineerBlog Microsoft.Web/sites West US + + EngSvr01 Microsoft.Sql/servers West US + EngDB02 Microsoft.Sql/databases West US +Tags: + Name Value + ========== ===== + CostCenter 0001 + + The commands in this example create and use a predefined tag. + + + + The first command uses the New-AzureTag cmdlet to create a predefined CostCenter tag with a value of 0001. You can use New-AzureTag again to add more values to the predefined tag.The second command uses the Set-AzureResourceGroup cmdlet to apply the CostCenter tag to the EngineerBlog resource group.The third command uses the Get-AzureTag cmdlet to get the CostCenter tag. The output shows that the Count property of the tag and its values were incremented when the tag was applied to the EngineeringBlog resource group.The fourth command uses the Tag parameter of the Get-AzureResource cmdlet to search for resource groups with the CostCenter tag (and any value). The cmdlet returns the EngineeringBlog resource group. + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=404172 + + + Get-AzureTag + + + + Remove-AzureTag + + + + + + + + Remove-AzureTag + + Deletes predefined Azure tags or values + + + + + Remove + AzureTag + + + + + The Remove-AzureTag cmdlet deletes predefined Azure tags and values from your subscription. To delete particular values from a predefined tag, use the Value parameter. By default, Remove-AzureTag deletes the specified tag and all of its values.You cannot delete a tag or value that is currently applied to a resource or resource group. Before using Remove-AzureTag, use the Tag parameter of the Set-AzureResource or Set-AzureResourceGroup cmdlets to delete the tag or values from the resource or resource group. The Remove-AzureTag cmdlet is part of a set of cmdlets (New/Get/Remove) that help you to manage your predefined Azure tags.An Azure "tag" is a name-value pair that you can use to categorize your Azure resources and resource groups, such as by department or cost center, or to track notes or comments about the resources and groups.You can define and apply tags in a single step, but predefined tags let you establish standard, consistent, predictable names and values for the tags in your subscription. If the subscription includes any predefined tags, you cannot apply undefined tags or values to any resource or resource group in the subscription. + + + + Remove-AzureTag + + Name + + Specifies the name of the tag to be deleted. This parameter is required. By default, Remove-AzureTag removes the specified tag and all of its values. To delete selected values, but not delete the tag, use the Value parameter. + + String + + + Value + + Deletes the specified values from the predefined tag, but does not delete the tag. + + String[] + + + Force + + Suppresses the confirmation prompt. By default, Remove-AzureTag prompts for confirmation before deleting a predefined Azure tag. + + SwitchParameter + + + PassThru + + Returns an object that represents the deleted tag or the resulting tag with deleted valued. + + SwitchParameter + + + + + + Name + + Specifies the name of the tag to be deleted. This parameter is required. By default, Remove-AzureTag removes the specified tag and all of its values. To delete selected values, but not delete the tag, use the Value parameter. + + String + + String + + + + + + Value + + Deletes the specified values from the predefined tag, but does not delete the tag. + + String[] + + String[] + + + + + + Force + + Suppresses the confirmation prompt. By default, Remove-AzureTag prompts for confirmation before deleting a predefined Azure tag. + + SwitchParameter + + SwitchParameter + + + + + + PassThru + + Returns an object that represents the deleted tag or the resulting tag with deleted valued. + + SwitchParameter + + SwitchParameter + + + + + + + + + None + + + + + + + + + + + + None or Microsoft.Azure.Commands.Tags.Model.PSTag + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Delete a predefined tag -------------------------- + + + + PS C:\>Remove-AzureTag -Name Department + + This command deletes the predefined Department tag and all of its resources. If the tag has been applied to any resources or resource groups, the command fails. + + + + + + + + + -------------------------- Example 2: Delete a value from a predefined tag -------------------------- + + + + PS C:\>Remove-AzureTag -Name Department -Value HumanResources -PassThru +Name: Department + +Count: 14 + +Values: + + Name Count + + ========= ===== + + Finance 2 + + IT 12 + + This command deletes the HumanResources value from the predefined Department tag. It does not delete the tag. If the value has been applied to any resources or resource groups, the command fails. + + + + Because the command uses the PassThru parameter, the cmdlet returns the object tag without the HumanResources value. + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=404174 + + + Get-AzureTag + + + + New-AzureTag + + + + + \ No newline at end of file diff --git a/src/ResourceManager/Tags/Commands.Tags/Microsoft.Azure.Commands.Tags.format.ps1xml b/src/ResourceManager/Tags/Commands.Tags/Microsoft.Azure.Commands.Tags.format.ps1xml new file mode 100644 index 000000000000..f2b4b7433cc7 --- /dev/null +++ b/src/ResourceManager/Tags/Commands.Tags/Microsoft.Azure.Commands.Tags.format.ps1xml @@ -0,0 +1,31 @@ + + + + + Microsoft.Azure.Commands.Tags.Model.PSTag + + Microsoft.Azure.Commands.Tags.Model.PSTag + + + + + + + + Name + + + + Count + + + + ValuesTable + + + + + + + + diff --git a/src/ResourceManager/Tags/Commands.Tags/Model/PSTag.cs b/src/ResourceManager/Tags/Commands.Tags/Model/PSTag.cs new file mode 100644 index 000000000000..0bb459bb5f9a --- /dev/null +++ b/src/ResourceManager/Tags/Commands.Tags/Model/PSTag.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; + +namespace Microsoft.Azure.Commands.Tags.Model +{ + public class PSTag + { + public string Name { get; set; } + + public string ValuesTable { get; set; } + + public string Count { get; set; } + + public List Values { get; set; } + } +} diff --git a/src/ResourceManager/Tags/Commands.Tags/Model/PSTagValue.cs b/src/ResourceManager/Tags/Commands.Tags/Model/PSTagValue.cs new file mode 100644 index 000000000000..489758084442 --- /dev/null +++ b/src/ResourceManager/Tags/Commands.Tags/Model/PSTagValue.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Tags.Model +{ + public class PSTagValue + { + public string Name { get; set; } + + public string Count { get; set; } + } +} diff --git a/src/ResourceManager/Tags/Commands.Tags/Model/TagBaseCmdlet.cs b/src/ResourceManager/Tags/Commands.Tags/Model/TagBaseCmdlet.cs new file mode 100644 index 000000000000..87adae564266 --- /dev/null +++ b/src/ResourceManager/Tags/Commands.Tags/Model/TagBaseCmdlet.cs @@ -0,0 +1,41 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.Azure.Commands.Tags.Model +{ + public abstract class TagBaseCmdlet : AzurePSCmdlet + { + private TagsClient tagsClient; + + public TagsClient TagsClient + { + get + { + if (tagsClient == null) + { + tagsClient = new TagsClient(CurrentContext.Subscription) + { + VerboseLogger = WriteVerboseWithTimestamp, + ErrorLogger = WriteErrorWithTimestamp + }; + } + return tagsClient; + } + + set { tagsClient = value; } + } + } +} diff --git a/src/ResourceManager/Tags/Commands.Tags/Model/TagsClient.cs b/src/ResourceManager/Tags/Commands.Tags/Model/TagsClient.cs new file mode 100644 index 000000000000..b4c460ab6f15 --- /dev/null +++ b/src/ResourceManager/Tags/Commands.Tags/Model/TagsClient.cs @@ -0,0 +1,146 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.Azure.Commands.Tags.Properties; +using Microsoft.Azure.Management.Resources; +using Microsoft.Azure.Management.Resources.Models; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.Azure.Commands.Tags.Model +{ + public class TagsClient + { + public const string ExecludedTagPrefix = "hidden-related:/"; + + public IResourceManagementClient ResourceManagementClient { get; set; } + + public Action VerboseLogger { get; set; } + + public Action ErrorLogger { get; set; } + + /// + /// Creates new TagsClient + /// + /// Subscription containing resources to manipulate + public TagsClient(AzureSubscription subscription) + : this(AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ResourceManager)) + { + + } + + /// + /// Creates new TagsClient instance + /// + /// The IResourceManagementClient instance + public TagsClient(IResourceManagementClient resourceManagementClient) + { + ResourceManagementClient = resourceManagementClient; + } + + /// + /// Parameterless constructor for mocking + /// + public TagsClient() + { + + } + + public List ListTags() + { + TagsListResult result = ResourceManagementClient.Tags.List(); + List tags = new List(); + + do + { + result.Tags.Where(t => !t.Name.StartsWith(ExecludedTagPrefix)).ForEach(t => tags.Add(t.ToPSTag())); + + if (!string.IsNullOrEmpty(result.NextLink)) + { + result = ResourceManagementClient.Tags.ListNext(result.NextLink); + } + } while (!string.IsNullOrEmpty(result.NextLink)); + + return tags; + } + + public PSTag GetTag(string tag) + { + List tags = ListTags(); + if (!tags.Exists(t => t.Name.Equals(tag, StringComparison.OrdinalIgnoreCase))) + { + throw new Exception(string.Format(Resources.TagNotFoundMessage, tag)); + } + + return tags.First(t => t.Name.Equals(tag, StringComparison.OrdinalIgnoreCase)); + } + + /// + /// Creates a tag and if the tag name exists add the value to the existing tag name. + /// + /// The tag name + /// The tag values + /// The tag object + public PSTag CreateTag(string tag, List values) + { + ResourceManagementClient.Tags.CreateOrUpdate(tag); + + if (values != null) + { + values.ForEach(v => ResourceManagementClient.Tags.CreateOrUpdateValue(tag, v)); + } + + return GetTag(tag); + } + + /// + /// Deletes the entire tag or specific tag value. + /// + /// The tag name + /// Values to remove + /// + public PSTag DeleteTag(string tag, List values) + { + PSTag tagObject = null; + + + if (values == null || values.Count != 1) + { + tagObject = GetTag(tag); + if (int.Parse(tagObject.Count) > 0) + { + throw new Exception(Resources.CanNotDeleteTag); + } + } + + if (values == null || values.Count == 0) + { + tagObject = GetTag(tag); + tagObject.Values.ForEach(v => ResourceManagementClient.Tags.DeleteValue(tag, v.Name)); + ResourceManagementClient.Tags.Delete(tag); + } + else + { + values.ForEach(v => ResourceManagementClient.Tags.DeleteValue(tag, v)); + tagObject = GetTag(tag); + } + + return tagObject; + } + } +} diff --git a/src/ResourceManager/Tags/Commands.Tags/Model/TagsExtensions.cs b/src/ResourceManager/Tags/Commands.Tags/Model/TagsExtensions.cs new file mode 100644 index 000000000000..f79c5354b881 --- /dev/null +++ b/src/ResourceManager/Tags/Commands.Tags/Model/TagsExtensions.cs @@ -0,0 +1,88 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Microsoft.Azure.Management.Resources.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.Azure.Commands.Tags.Model +{ + public static class TagsExtensions + { + public static PSTag ToPSTag(this TagDetails tag) + { + return new PSTag() + { + Count = tag.Count.Value, + Name = tag.Name, + Values = tag.Values.Select(v => v.ToPSTagValue()).ToList(), + ValuesTable = ConstructTagValuesTable(tag.Values.ToList()) + }; + } + + public static PSTagValue ToPSTagValue(this TagValue value) + { + return new PSTagValue() + { + Count = value.Count.Value, + Name = value.Value + }; + } + + private static TagValue EmptyTagValue + { + get + { + return new TagValue() + { + Value = string.Empty, + Id = string.Empty, + Count = new TagCount() + { + Type = string.Empty, + Value = string.Empty + } + }; + } + } + + private static string ConstructTagValuesTable(List tagValues) + { + StringBuilder tagValuesTable = new StringBuilder(); + + if (tagValues.Count > 0) + { + int maxNameLength = Math.Max("Name".Length, tagValues.Where(v => v.Value != null).DefaultIfEmpty(EmptyTagValue).Max(v => v.Value.Length)); + int maxCountLength = Math.Max("Count".Length, tagValues.Where(v => v.Count.Value != null).DefaultIfEmpty(EmptyTagValue).Max(v => v.Count.Value.Length)); + + string rowFormat = "{0, -" + maxNameLength + "} {1, -" + maxCountLength + "}\r\n"; + tagValuesTable.AppendLine(); + tagValuesTable.AppendFormat(rowFormat, "Name", "Count"); + tagValuesTable.AppendFormat(rowFormat, + GeneralUtilities.GenerateSeparator(maxNameLength, "="), + GeneralUtilities.GenerateSeparator(maxCountLength, "=")); + + foreach (TagValue tagValue in tagValues) + { + tagValuesTable.AppendFormat(rowFormat, tagValue.Value, tagValue.Count.Value); + } + } + + return tagValuesTable.ToString(); + } + } +} diff --git a/src/ResourceManager/Tags/Commands.Tags/Properties/AssemblyInfo.cs b/src/ResourceManager/Tags/Commands.Tags/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..0271e56caa08 --- /dev/null +++ b/src/ResourceManager/Tags/Commands.Tags/Properties/AssemblyInfo.cs @@ -0,0 +1,34 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Microsoft Azure Powershell - Resource Manager")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] + +[assembly: ComVisible(false)] +[assembly: CLSCompliant(false)] +[assembly: Guid("e386b843-f3f0-4db3-8664-37d16b860dde")] +[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] +[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] +#if SIGN +[assembly: InternalsVisibleTo("Microsoft.Azure.Commands.Resources.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +#else +[assembly: InternalsVisibleTo("Microsoft.Azure.Commands.Resources.Test")] +#endif \ No newline at end of file diff --git a/src/ResourceManager/Tags/Commands.Tags/Properties/Resources.Designer.cs b/src/ResourceManager/Tags/Commands.Tags/Properties/Resources.Designer.cs new file mode 100644 index 000000000000..d189ae083d63 --- /dev/null +++ b/src/ResourceManager/Tags/Commands.Tags/Properties/Resources.Designer.cs @@ -0,0 +1,99 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.Azure.Commands.Tags.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Azure.Commands.Tags.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Can not remove tag/tag value because it's being referenced by other resources.. + /// + internal static string CanNotDeleteTag { + get { + return ResourceManager.GetString("CanNotDeleteTag", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing tag ..... + /// + internal static string RemoveTagMessage { + get { + return ResourceManager.GetString("RemoveTagMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove tag '{0}'. + /// + internal static string RemovingTag { + get { + return ResourceManager.GetString("RemovingTag", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Tag '{0}' not found. + /// + internal static string TagNotFoundMessage { + get { + return ResourceManager.GetString("TagNotFoundMessage", resourceCulture); + } + } + } +} diff --git a/src/ResourceManager/Tags/Commands.Tags/Properties/Resources.resx b/src/ResourceManager/Tags/Commands.Tags/Properties/Resources.resx new file mode 100644 index 000000000000..ed33775428e8 --- /dev/null +++ b/src/ResourceManager/Tags/Commands.Tags/Properties/Resources.resx @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Can not remove tag/tag value because it's being referenced by other resources. + + + Removing tag .... + + + Are you sure you want to remove tag '{0}' + + + Tag '{0}' not found + + \ No newline at end of file diff --git a/src/ResourceManager/Tags/Commands.Tags/Tag/GetAzureTagCommand.cs b/src/ResourceManager/Tags/Commands.Tags/Tag/GetAzureTagCommand.cs new file mode 100644 index 000000000000..c490a8be3b00 --- /dev/null +++ b/src/ResourceManager/Tags/Commands.Tags/Tag/GetAzureTagCommand.cs @@ -0,0 +1,63 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.Azure.Commands.Tags.Model; + +namespace Microsoft.Azure.Commands.Tags.Tag +{ + /// + /// Creates a new tag with the specified values + /// + [Cmdlet(VerbsCommon.Get, "AzureTag"), OutputType(typeof(List))] + public class GetAzureTagCommand : TagBaseCmdlet + { + [Parameter(Position = 0, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the tag. If not specified, return all the tags of the subscription.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Whether should get the tag values information as well.")] + public SwitchParameter Detailed { get; set; } + + public override void ExecuteCmdlet() + { + List tags = string.IsNullOrEmpty(Name) ? TagsClient.ListTags() : new List() { TagsClient.GetTag(Name) }; + if (tags != null && tags.Count > 0) + { + if (Name != null) + { + WriteObject(tags[0]); + } + else + { + if (Detailed) + { + WriteObject(tags, true); + } + else + { + List output = new List(); + tags.ForEach(t => output.Add(base.ConstructPSObject( + null, + "Name", t.Name, + "Count", t.Count))); + + WriteObject(output, true); + } + } + } + } + } +} diff --git a/src/ResourceManager/Tags/Commands.Tags/Tag/NewAzureTagCommand.cs b/src/ResourceManager/Tags/Commands.Tags/Tag/NewAzureTagCommand.cs new file mode 100644 index 000000000000..5b53f5d04040 --- /dev/null +++ b/src/ResourceManager/Tags/Commands.Tags/Tag/NewAzureTagCommand.cs @@ -0,0 +1,40 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.Azure.Commands.Tags.Model; + +namespace Microsoft.Azure.Commands.Tags.Tag +{ + /// + /// Creates a new tag with the specified values + /// + [Cmdlet(VerbsCommon.New, "AzureTag"), OutputType(typeof(PSTag))] + public class NewAzureTagCommand : TagBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the tag. If the tag name doesn't exist, create the tag name. Otherwise, add the value to the existing tag name.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Value of the tag. If specified, add the tag value to the tag name. Otherwise, keep the tag value unchanged.")] + [ValidateNotNullOrEmpty] + public string Value { get; set; } + + public override void ExecuteCmdlet() + { + WriteObject(TagsClient.CreateTag(Name, Value != null ? new List { Value } : null)); + } + } +} diff --git a/src/ResourceManager/Tags/Commands.Tags/Tag/RemoveAzureTagCommand.cs b/src/ResourceManager/Tags/Commands.Tags/Tag/RemoveAzureTagCommand.cs new file mode 100644 index 000000000000..2657532cf777 --- /dev/null +++ b/src/ResourceManager/Tags/Commands.Tags/Tag/RemoveAzureTagCommand.cs @@ -0,0 +1,59 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; +using Microsoft.Azure.Commands.Tags.Model; +using Microsoft.Azure.Commands.Tags.Properties; + +namespace Microsoft.Azure.Commands.Tags.Tag +{ + /// + /// Creates a new tag with the specified values + /// + [Cmdlet(VerbsCommon.Remove, "AzureTag"), OutputType(typeof(PSTag))] + public class RemoveAzureTagCommand : TagBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the tag to remove.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Value of the tag to remove. If not specified, remove the entire tag. If specified, only remove the tag value.")] + [ValidateNotNullOrEmpty] + public string[] Value { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "If not specified, will prompt for confirmation. If specified, won't prompt.")] + public SwitchParameter Force { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Return object if specified.")] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + PSTag tag = null; + + ConfirmAction( + Force.IsPresent, + string.Format(Resources.RemovingTag, Name), + Resources.RemoveTagMessage, + Name, + () => tag = TagsClient.DeleteTag(Name, Value != null ? Value.ToList() : null)); + + if (PassThru) + { + WriteObject(tag); + } + } + } +} diff --git a/src/ResourceManager/Tags/Commands.Tags/packages.config b/src/ResourceManager/Tags/Commands.Tags/packages.config new file mode 100644 index 000000000000..15dd2cb893b1 --- /dev/null +++ b/src/ResourceManager/Tags/Commands.Tags/packages.config @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement.Compute.sln b/src/ServiceManagement.Compute.sln new file mode 100644 index 000000000000..0faec6a7a3cb --- /dev/null +++ b/src/ServiceManagement.Compute.sln @@ -0,0 +1,87 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.30501.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ServiceManagement", "ServiceManagement\Compute\Commands.ServiceManagement\Commands.ServiceManagement.csproj", "{E1CA72BA-8374-45F6-904D-FD34ECDF5B6F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ServiceManagement.PlatformImageRepository", "ServiceManagement\Compute\Commands.ServiceManagement.PlatformImageRepository\Commands.ServiceManagement.PlatformImageRepository.csproj", "{6478FA8B-3801-4863-8591-87F0855D5C82}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ServiceManagement.Preview", "ServiceManagement\Compute\Commands.ServiceManagement.Preview\Commands.ServiceManagement.Preview.csproj", "{E895BBDA-0B06-46AB-B909-9B97B3ECE47E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ServiceManagement.Test", "ServiceManagement\Compute\Commands.ServiceManagement.Test\Commands.ServiceManagement.Test.csproj", "{58A78F29-8C0C-4A5E-893E-3953C0F29C8A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sync", "ServiceManagement\Compute\Sync\Sync.csproj", "{73820CBC-F4EB-4C5E-B4F0-CC4A93FBF157}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VhdManagement", "ServiceManagement\Compute\VhdManagement\VhdManagement.csproj", "{80496B7B-068A-4A1E-B0BB-4B1FFF3FA616}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Utilities", "ServiceManagement\Services\Commands.Utilities\Commands.Utilities.csproj", "{4900EC4E-8DEB-4412-9108-0BC52F81D457}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands", "ServiceManagement\Services\Commands\Commands.csproj", "{CD5AA507-F5EF-473D-855B-84B91A1ABE54}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common.Storage", "Common\Commands.Common.Storage\Commands.Common.Storage.csproj", "{65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Storage", "ServiceManagement\Storage\Commands.Storage\Commands.Storage.csproj", "{08CF7DA7-0392-4A19-B79B-E1FF67CDB81A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Test.Utilities", "ServiceManagement\Services\Commands.Test.Utilities\Commands.Test.Utilities.csproj", "{BC420543-C04E-4BF3-96E1-CD81B823BDD7}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E1CA72BA-8374-45F6-904D-FD34ECDF5B6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E1CA72BA-8374-45F6-904D-FD34ECDF5B6F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E1CA72BA-8374-45F6-904D-FD34ECDF5B6F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E1CA72BA-8374-45F6-904D-FD34ECDF5B6F}.Release|Any CPU.Build.0 = Release|Any CPU + {6478FA8B-3801-4863-8591-87F0855D5C82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6478FA8B-3801-4863-8591-87F0855D5C82}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6478FA8B-3801-4863-8591-87F0855D5C82}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6478FA8B-3801-4863-8591-87F0855D5C82}.Release|Any CPU.Build.0 = Release|Any CPU + {E895BBDA-0B06-46AB-B909-9B97B3ECE47E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E895BBDA-0B06-46AB-B909-9B97B3ECE47E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E895BBDA-0B06-46AB-B909-9B97B3ECE47E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E895BBDA-0B06-46AB-B909-9B97B3ECE47E}.Release|Any CPU.Build.0 = Release|Any CPU + {58A78F29-8C0C-4A5E-893E-3953C0F29C8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {58A78F29-8C0C-4A5E-893E-3953C0F29C8A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {58A78F29-8C0C-4A5E-893E-3953C0F29C8A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {58A78F29-8C0C-4A5E-893E-3953C0F29C8A}.Release|Any CPU.Build.0 = Release|Any CPU + {73820CBC-F4EB-4C5E-B4F0-CC4A93FBF157}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {73820CBC-F4EB-4C5E-B4F0-CC4A93FBF157}.Debug|Any CPU.Build.0 = Debug|Any CPU + {73820CBC-F4EB-4C5E-B4F0-CC4A93FBF157}.Release|Any CPU.ActiveCfg = Release|Any CPU + {73820CBC-F4EB-4C5E-B4F0-CC4A93FBF157}.Release|Any CPU.Build.0 = Release|Any CPU + {80496B7B-068A-4A1E-B0BB-4B1FFF3FA616}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {80496B7B-068A-4A1E-B0BB-4B1FFF3FA616}.Debug|Any CPU.Build.0 = Debug|Any CPU + {80496B7B-068A-4A1E-B0BB-4B1FFF3FA616}.Release|Any CPU.ActiveCfg = Release|Any CPU + {80496B7B-068A-4A1E-B0BB-4B1FFF3FA616}.Release|Any CPU.Build.0 = Release|Any CPU + {4900EC4E-8DEB-4412-9108-0BC52F81D457}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4900EC4E-8DEB-4412-9108-0BC52F81D457}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4900EC4E-8DEB-4412-9108-0BC52F81D457}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4900EC4E-8DEB-4412-9108-0BC52F81D457}.Release|Any CPU.Build.0 = Release|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Release|Any CPU.Build.0 = Release|Any CPU + {CD5AA507-F5EF-473D-855B-84B91A1ABE54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CD5AA507-F5EF-473D-855B-84B91A1ABE54}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CD5AA507-F5EF-473D-855B-84B91A1ABE54}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CD5AA507-F5EF-473D-855B-84B91A1ABE54}.Release|Any CPU.Build.0 = Release|Any CPU + {65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}.Release|Any CPU.Build.0 = Release|Any CPU + {08CF7DA7-0392-4A19-B79B-E1FF67CDB81A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {08CF7DA7-0392-4A19-B79B-E1FF67CDB81A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {08CF7DA7-0392-4A19-B79B-E1FF67CDB81A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {08CF7DA7-0392-4A19-B79B-E1FF67CDB81A}.Release|Any CPU.Build.0 = Release|Any CPU + {BC420543-C04E-4BF3-96E1-CD81B823BDD7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BC420543-C04E-4BF3-96E1-CD81B823BDD7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BC420543-C04E-4BF3-96E1-CD81B823BDD7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BC420543-C04E-4BF3-96E1-CD81B823BDD7}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/ServiceManagement.ExpressRoute.sln b/src/ServiceManagement.ExpressRoute.sln new file mode 100644 index 000000000000..833452b147e4 --- /dev/null +++ b/src/ServiceManagement.ExpressRoute.sln @@ -0,0 +1,26 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ExpressRoute", "ServiceManagement\ExpressRoute\Commands.ExpressRoute\Commands.ExpressRoute.csproj", "{45C2D687-E0CE-4C97-B731-335834DC2BF2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {45C2D687-E0CE-4C97-B731-335834DC2BF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {45C2D687-E0CE-4C97-B731-335834DC2BF2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {45C2D687-E0CE-4C97-B731-335834DC2BF2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {45C2D687-E0CE-4C97-B731-335834DC2BF2}.Release|Any CPU.Build.0 = Release|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/ServiceManagement.ManagedCache.sln b/src/ServiceManagement.ManagedCache.sln new file mode 100644 index 000000000000..957db60c4403 --- /dev/null +++ b/src/ServiceManagement.ManagedCache.sln @@ -0,0 +1,45 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.30110.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ManagedCache", "ServiceManagement\ManagedCache\Commands.ManagedCache\Commands.ManagedCache.csproj", "{46C06ED8-43D9-41FD-B73B-41547D9C04E1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ManagedCache.Test", "ServiceManagement\ManagedCache\Commands.ManagedCache.Test\Commands.ManagedCache.Test.csproj", "{374D4000-DEDE-4995-9B63-E3B9FE0C4D29}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands", "ServiceManagement\Services\Commands\Commands.csproj", "{CD5AA507-F5EF-473D-855B-84B91A1ABE54}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Utilities", "ServiceManagement\Services\Commands.Utilities\Commands.Utilities.csproj", "{4900EC4E-8DEB-4412-9108-0BC52F81D457}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {46C06ED8-43D9-41FD-B73B-41547D9C04E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {46C06ED8-43D9-41FD-B73B-41547D9C04E1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {46C06ED8-43D9-41FD-B73B-41547D9C04E1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {46C06ED8-43D9-41FD-B73B-41547D9C04E1}.Release|Any CPU.Build.0 = Release|Any CPU + {374D4000-DEDE-4995-9B63-E3B9FE0C4D29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {374D4000-DEDE-4995-9B63-E3B9FE0C4D29}.Debug|Any CPU.Build.0 = Debug|Any CPU + {374D4000-DEDE-4995-9B63-E3B9FE0C4D29}.Release|Any CPU.ActiveCfg = Release|Any CPU + {374D4000-DEDE-4995-9B63-E3B9FE0C4D29}.Release|Any CPU.Build.0 = Release|Any CPU + {CD5AA507-F5EF-473D-855B-84B91A1ABE54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CD5AA507-F5EF-473D-855B-84B91A1ABE54}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CD5AA507-F5EF-473D-855B-84B91A1ABE54}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CD5AA507-F5EF-473D-855B-84B91A1ABE54}.Release|Any CPU.Build.0 = Release|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Release|Any CPU.Build.0 = Release|Any CPU + {4900EC4E-8DEB-4412-9108-0BC52F81D457}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4900EC4E-8DEB-4412-9108-0BC52F81D457}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4900EC4E-8DEB-4412-9108-0BC52F81D457}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4900EC4E-8DEB-4412-9108-0BC52F81D457}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/ServiceManagement.Network.sln b/src/ServiceManagement.Network.sln new file mode 100644 index 000000000000..bed39f27267a --- /dev/null +++ b/src/ServiceManagement.Network.sln @@ -0,0 +1,93 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.30723.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Network", "ServiceManagement\Network\Commands.Network\Commands.Network.csproj", "{40FEE0BB-FD45-4EFC-85BC-0D602A6892C4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Network.Test", "ServiceManagement\Network\Commands.Network.Test\Commands.Network.Test.csproj", "{FDB897BD-FCB4-44A1-8D66-AC99F22EC737}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands", "ServiceManagement\Services\Commands\Commands.csproj", "{CD5AA507-F5EF-473D-855B-84B91A1ABE54}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Utilities", "ServiceManagement\Services\Commands.Utilities\Commands.Utilities.csproj", "{4900EC4E-8DEB-4412-9108-0BC52F81D457}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ScenarioTests.Common", "Common\Commands.ScenarioTests.Common\Commands.ScenarioTests.Common.csproj", "{C1BDA476-A5CC-4394-914D-48B0EC31A710}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common.Storage", "Common\Commands.Common.Storage\Commands.Common.Storage.csproj", "{65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common.Test", "Common\Commands.Common.Test\Commands.Common.Test.csproj", "{3B48A77B-5956-4A62-9081-92BA04B02B27}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Profile", "Common\Commands.Profile\Commands.Profile.csproj", "{C60342B1-47D3-4A0E-8081-9B97CE60B7AF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Test.Utilities", "ServiceManagement\Services\Commands.Test.Utilities\Commands.Test.Utilities.csproj", "{BC420543-C04E-4BF3-96E1-CD81B823BDD7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ServiceManagement", "ServiceManagement\Compute\Commands.ServiceManagement\Commands.ServiceManagement.csproj", "{E1CA72BA-8374-45F6-904D-FD34ECDF5B6F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sync", "ServiceManagement\Compute\Sync\Sync.csproj", "{73820CBC-F4EB-4C5E-B4F0-CC4A93FBF157}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VhdManagement", "ServiceManagement\Compute\VhdManagement\VhdManagement.csproj", "{80496B7B-068A-4A1E-B0BB-4B1FFF3FA616}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {40FEE0BB-FD45-4EFC-85BC-0D602A6892C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {40FEE0BB-FD45-4EFC-85BC-0D602A6892C4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {40FEE0BB-FD45-4EFC-85BC-0D602A6892C4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {40FEE0BB-FD45-4EFC-85BC-0D602A6892C4}.Release|Any CPU.Build.0 = Release|Any CPU + {FDB897BD-FCB4-44A1-8D66-AC99F22EC737}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FDB897BD-FCB4-44A1-8D66-AC99F22EC737}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FDB897BD-FCB4-44A1-8D66-AC99F22EC737}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FDB897BD-FCB4-44A1-8D66-AC99F22EC737}.Release|Any CPU.Build.0 = Release|Any CPU + {CD5AA507-F5EF-473D-855B-84B91A1ABE54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CD5AA507-F5EF-473D-855B-84B91A1ABE54}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CD5AA507-F5EF-473D-855B-84B91A1ABE54}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CD5AA507-F5EF-473D-855B-84B91A1ABE54}.Release|Any CPU.Build.0 = Release|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Release|Any CPU.Build.0 = Release|Any CPU + {4900EC4E-8DEB-4412-9108-0BC52F81D457}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4900EC4E-8DEB-4412-9108-0BC52F81D457}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4900EC4E-8DEB-4412-9108-0BC52F81D457}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4900EC4E-8DEB-4412-9108-0BC52F81D457}.Release|Any CPU.Build.0 = Release|Any CPU + {C1BDA476-A5CC-4394-914D-48B0EC31A710}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C1BDA476-A5CC-4394-914D-48B0EC31A710}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C1BDA476-A5CC-4394-914D-48B0EC31A710}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C1BDA476-A5CC-4394-914D-48B0EC31A710}.Release|Any CPU.Build.0 = Release|Any CPU + {65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}.Release|Any CPU.Build.0 = Release|Any CPU + {3B48A77B-5956-4A62-9081-92BA04B02B27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3B48A77B-5956-4A62-9081-92BA04B02B27}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3B48A77B-5956-4A62-9081-92BA04B02B27}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3B48A77B-5956-4A62-9081-92BA04B02B27}.Release|Any CPU.Build.0 = Release|Any CPU + {C60342B1-47D3-4A0E-8081-9B97CE60B7AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C60342B1-47D3-4A0E-8081-9B97CE60B7AF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C60342B1-47D3-4A0E-8081-9B97CE60B7AF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C60342B1-47D3-4A0E-8081-9B97CE60B7AF}.Release|Any CPU.Build.0 = Release|Any CPU + {BC420543-C04E-4BF3-96E1-CD81B823BDD7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BC420543-C04E-4BF3-96E1-CD81B823BDD7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BC420543-C04E-4BF3-96E1-CD81B823BDD7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BC420543-C04E-4BF3-96E1-CD81B823BDD7}.Release|Any CPU.Build.0 = Release|Any CPU + {E1CA72BA-8374-45F6-904D-FD34ECDF5B6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E1CA72BA-8374-45F6-904D-FD34ECDF5B6F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E1CA72BA-8374-45F6-904D-FD34ECDF5B6F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E1CA72BA-8374-45F6-904D-FD34ECDF5B6F}.Release|Any CPU.Build.0 = Release|Any CPU + {73820CBC-F4EB-4C5E-B4F0-CC4A93FBF157}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {73820CBC-F4EB-4C5E-B4F0-CC4A93FBF157}.Debug|Any CPU.Build.0 = Debug|Any CPU + {73820CBC-F4EB-4C5E-B4F0-CC4A93FBF157}.Release|Any CPU.ActiveCfg = Release|Any CPU + {73820CBC-F4EB-4C5E-B4F0-CC4A93FBF157}.Release|Any CPU.Build.0 = Release|Any CPU + {80496B7B-068A-4A1E-B0BB-4B1FFF3FA616}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {80496B7B-068A-4A1E-B0BB-4B1FFF3FA616}.Debug|Any CPU.Build.0 = Debug|Any CPU + {80496B7B-068A-4A1E-B0BB-4B1FFF3FA616}.Release|Any CPU.ActiveCfg = Release|Any CPU + {80496B7B-068A-4A1E-B0BB-4B1FFF3FA616}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/ServiceManagement.RecoveryServices.sln b/src/ServiceManagement.RecoveryServices.sln new file mode 100644 index 000000000000..23cb2abadaac --- /dev/null +++ b/src/ServiceManagement.RecoveryServices.sln @@ -0,0 +1,32 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.RecoveryServices", "ServiceManagement\RecoveryServices\Commands.RecoveryServices\Commands.RecoveryServices.csproj", "{98B10548-DF97-4FB1-8D82-2A12945D4F21}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.RecoveryServices.Test", "ServiceManagement\RecoveryServices\Commands.RecoveryServices.Test\Commands.RecoveryServices.Test.csproj", "{A415F75B-EB6A-49A6-934E-5BA71B83D6EB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {98B10548-DF97-4FB1-8D82-2A12945D4F21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {98B10548-DF97-4FB1-8D82-2A12945D4F21}.Debug|Any CPU.Build.0 = Debug|Any CPU + {98B10548-DF97-4FB1-8D82-2A12945D4F21}.Release|Any CPU.ActiveCfg = Release|Any CPU + {98B10548-DF97-4FB1-8D82-2A12945D4F21}.Release|Any CPU.Build.0 = Release|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Release|Any CPU.Build.0 = Release|Any CPU + {A415F75B-EB6A-49A6-934E-5BA71B83D6EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A415F75B-EB6A-49A6-934E-5BA71B83D6EB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A415F75B-EB6A-49A6-934E-5BA71B83D6EB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A415F75B-EB6A-49A6-934E-5BA71B83D6EB}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/ServiceManagement.Services.sln b/src/ServiceManagement.Services.sln new file mode 100644 index 000000000000..310c61e6be38 --- /dev/null +++ b/src/ServiceManagement.Services.sln @@ -0,0 +1,39 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.30501.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands", "ServiceManagement\Services\Commands\Commands.csproj", "{CD5AA507-F5EF-473D-855B-84B91A1ABE54}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Test", "ServiceManagement\Services\Commands.Test\Commands.Test.csproj", "{B7FD03F6-98BC-4F54-9A14-0455E579FCD4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Test.Utilities", "ServiceManagement\Services\Commands.Test.Utilities\Commands.Test.Utilities.csproj", "{BC420543-C04E-4BF3-96E1-CD81B823BDD7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Utilities", "ServiceManagement\Services\Commands.Utilities\Commands.Utilities.csproj", "{4900EC4E-8DEB-4412-9108-0BC52F81D457}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CD5AA507-F5EF-473D-855B-84B91A1ABE54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CD5AA507-F5EF-473D-855B-84B91A1ABE54}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CD5AA507-F5EF-473D-855B-84B91A1ABE54}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CD5AA507-F5EF-473D-855B-84B91A1ABE54}.Release|Any CPU.Build.0 = Release|Any CPU + {B7FD03F6-98BC-4F54-9A14-0455E579FCD4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B7FD03F6-98BC-4F54-9A14-0455E579FCD4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B7FD03F6-98BC-4F54-9A14-0455E579FCD4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B7FD03F6-98BC-4F54-9A14-0455E579FCD4}.Release|Any CPU.Build.0 = Release|Any CPU + {BC420543-C04E-4BF3-96E1-CD81B823BDD7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BC420543-C04E-4BF3-96E1-CD81B823BDD7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BC420543-C04E-4BF3-96E1-CD81B823BDD7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BC420543-C04E-4BF3-96E1-CD81B823BDD7}.Release|Any CPU.Build.0 = Release|Any CPU + {4900EC4E-8DEB-4412-9108-0BC52F81D457}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4900EC4E-8DEB-4412-9108-0BC52F81D457}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4900EC4E-8DEB-4412-9108-0BC52F81D457}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4900EC4E-8DEB-4412-9108-0BC52F81D457}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/ServiceManagement.Sql.sln b/src/ServiceManagement.Sql.sln new file mode 100644 index 000000000000..b822ca0fadcf --- /dev/null +++ b/src/ServiceManagement.Sql.sln @@ -0,0 +1,63 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.30110.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.SqlDatabase", "ServiceManagement\Sql\Commands.SqlDatabase\Commands.SqlDatabase.csproj", "{DDF5D225-C9C5-42B7-BDB5-2C3646E479AA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.SqlDatabase.Test", "ServiceManagement\Sql\Commands.SqlDatabase.Test\Commands.SqlDatabase.Test.csproj", "{37455286-D8A7-4E0C-8B4D-C517D20C641A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common.Test", "Common\Commands.Common.Test\Commands.Common.Test.csproj", "{3B48A77B-5956-4A62-9081-92BA04B02B27}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands", "ServiceManagement\Services\Commands\Commands.csproj", "{CD5AA507-F5EF-473D-855B-84B91A1ABE54}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Utilities", "ServiceManagement\Services\Commands.Utilities\Commands.Utilities.csproj", "{4900EC4E-8DEB-4412-9108-0BC52F81D457}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Test.Utilities", "ServiceManagement\Services\Commands.Test.Utilities\Commands.Test.Utilities.csproj", "{BC420543-C04E-4BF3-96E1-CD81B823BDD7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Storage", "ServiceManagement\Storage\Commands.Storage\Commands.Storage.csproj", "{08CF7DA7-0392-4A19-B79B-E1FF67CDB81A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DDF5D225-C9C5-42B7-BDB5-2C3646E479AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DDF5D225-C9C5-42B7-BDB5-2C3646E479AA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DDF5D225-C9C5-42B7-BDB5-2C3646E479AA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DDF5D225-C9C5-42B7-BDB5-2C3646E479AA}.Release|Any CPU.Build.0 = Release|Any CPU + {37455286-D8A7-4E0C-8B4D-C517D20C641A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {37455286-D8A7-4E0C-8B4D-C517D20C641A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {37455286-D8A7-4E0C-8B4D-C517D20C641A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {37455286-D8A7-4E0C-8B4D-C517D20C641A}.Release|Any CPU.Build.0 = Release|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Release|Any CPU.Build.0 = Release|Any CPU + {3B48A77B-5956-4A62-9081-92BA04B02B27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3B48A77B-5956-4A62-9081-92BA04B02B27}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3B48A77B-5956-4A62-9081-92BA04B02B27}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3B48A77B-5956-4A62-9081-92BA04B02B27}.Release|Any CPU.Build.0 = Release|Any CPU + {CD5AA507-F5EF-473D-855B-84B91A1ABE54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CD5AA507-F5EF-473D-855B-84B91A1ABE54}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CD5AA507-F5EF-473D-855B-84B91A1ABE54}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CD5AA507-F5EF-473D-855B-84B91A1ABE54}.Release|Any CPU.Build.0 = Release|Any CPU + {4900EC4E-8DEB-4412-9108-0BC52F81D457}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4900EC4E-8DEB-4412-9108-0BC52F81D457}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4900EC4E-8DEB-4412-9108-0BC52F81D457}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4900EC4E-8DEB-4412-9108-0BC52F81D457}.Release|Any CPU.Build.0 = Release|Any CPU + {BC420543-C04E-4BF3-96E1-CD81B823BDD7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BC420543-C04E-4BF3-96E1-CD81B823BDD7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BC420543-C04E-4BF3-96E1-CD81B823BDD7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BC420543-C04E-4BF3-96E1-CD81B823BDD7}.Release|Any CPU.Build.0 = Release|Any CPU + {08CF7DA7-0392-4A19-B79B-E1FF67CDB81A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {08CF7DA7-0392-4A19-B79B-E1FF67CDB81A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {08CF7DA7-0392-4A19-B79B-E1FF67CDB81A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {08CF7DA7-0392-4A19-B79B-E1FF67CDB81A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/ServiceManagement.Storage.sln b/src/ServiceManagement.Storage.sln new file mode 100644 index 000000000000..e9b9033504b5 --- /dev/null +++ b/src/ServiceManagement.Storage.sln @@ -0,0 +1,69 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.30110.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Storage", "ServiceManagement\Storage\Commands.Storage\Commands.Storage.csproj", "{08CF7DA7-0392-4A19-B79B-E1FF67CDB81A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Storage.MsTest2", "ServiceManagement\Storage\Commands.Storage.MsTest2\Commands.Storage.MsTest2.csproj", "{9D5A40CA-5594-4F5C-8230-7ADF7CC0558E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Storage.MsTestLib", "ServiceManagement\Storage\Commands.Storage.MsTestLib\Commands.Storage.MsTestLib.csproj", "{CE97967B-7479-43B9-9561-776232AC5D47}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Storage.ScenarioTest", "ServiceManagement\Storage\Commands.Storage.ScenarioTest\Commands.Storage.ScenarioTest.csproj", "{4BC0E3D3-6EDD-43AA-8F15-DCFED8ACC93D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Storage.StorageTestLib", "ServiceManagement\Storage\Commands.Storage.StorageTestLib\Commands.Storage.StorageTestLib.csproj", "{0A513849-2690-4D07-8DE7-0ACE39645D12}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Storage.Test", "ServiceManagement\Storage\Commands.Storage.Test\Commands.Storage.Test.csproj", "{D6F470A6-7395-4B8B-9D29-44DF0EC8F624}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common.Storage", "Common\Commands.Common.Storage\Commands.Common.Storage.csproj", "{65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common.Test", "Common\Commands.Common.Test\Commands.Common.Test.csproj", "{3B48A77B-5956-4A62-9081-92BA04B02B27}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {08CF7DA7-0392-4A19-B79B-E1FF67CDB81A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {08CF7DA7-0392-4A19-B79B-E1FF67CDB81A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {08CF7DA7-0392-4A19-B79B-E1FF67CDB81A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {08CF7DA7-0392-4A19-B79B-E1FF67CDB81A}.Release|Any CPU.Build.0 = Release|Any CPU + {9D5A40CA-5594-4F5C-8230-7ADF7CC0558E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9D5A40CA-5594-4F5C-8230-7ADF7CC0558E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9D5A40CA-5594-4F5C-8230-7ADF7CC0558E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9D5A40CA-5594-4F5C-8230-7ADF7CC0558E}.Release|Any CPU.Build.0 = Release|Any CPU + {CE97967B-7479-43B9-9561-776232AC5D47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CE97967B-7479-43B9-9561-776232AC5D47}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CE97967B-7479-43B9-9561-776232AC5D47}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CE97967B-7479-43B9-9561-776232AC5D47}.Release|Any CPU.Build.0 = Release|Any CPU + {4BC0E3D3-6EDD-43AA-8F15-DCFED8ACC93D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4BC0E3D3-6EDD-43AA-8F15-DCFED8ACC93D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4BC0E3D3-6EDD-43AA-8F15-DCFED8ACC93D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4BC0E3D3-6EDD-43AA-8F15-DCFED8ACC93D}.Release|Any CPU.Build.0 = Release|Any CPU + {0A513849-2690-4D07-8DE7-0ACE39645D12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0A513849-2690-4D07-8DE7-0ACE39645D12}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0A513849-2690-4D07-8DE7-0ACE39645D12}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0A513849-2690-4D07-8DE7-0ACE39645D12}.Release|Any CPU.Build.0 = Release|Any CPU + {D6F470A6-7395-4B8B-9D29-44DF0EC8F624}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D6F470A6-7395-4B8B-9D29-44DF0EC8F624}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D6F470A6-7395-4B8B-9D29-44DF0EC8F624}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D6F470A6-7395-4B8B-9D29-44DF0EC8F624}.Release|Any CPU.Build.0 = Release|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Release|Any CPU.Build.0 = Release|Any CPU + {65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}.Release|Any CPU.Build.0 = Release|Any CPU + {3B48A77B-5956-4A62-9081-92BA04B02B27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3B48A77B-5956-4A62-9081-92BA04B02B27}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3B48A77B-5956-4A62-9081-92BA04B02B27}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3B48A77B-5956-4A62-9081-92BA04B02B27}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/ServiceManagement.TrafficManager.sln b/src/ServiceManagement.TrafficManager.sln new file mode 100644 index 000000000000..2f4fb2933357 --- /dev/null +++ b/src/ServiceManagement.TrafficManager.sln @@ -0,0 +1,44 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.TrafficManager", "ServiceManagement\TrafficManager\Commands.TrafficManager\Commands.TrafficManager.csproj", "{94E96A5C-B5AD-4E10-B13A-3BC16D102AED}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.TrafficManager.Test", "ServiceManagement\TrafficManager\Commands.TrafficManager.Test\Commands.TrafficManager.Test.csproj", "{84F99CBD-5B86-4428-B263-135B2F67F512}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "References", "References", "{5EA62ADB-111D-4093-AA55-D266F7C484C6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common.Test", "Common\Commands.Common.Test\Commands.Common.Test.csproj", "{3B48A77B-5956-4A62-9081-92BA04B02B27}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {94E96A5C-B5AD-4E10-B13A-3BC16D102AED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {94E96A5C-B5AD-4E10-B13A-3BC16D102AED}.Debug|Any CPU.Build.0 = Debug|Any CPU + {94E96A5C-B5AD-4E10-B13A-3BC16D102AED}.Release|Any CPU.ActiveCfg = Release|Any CPU + {94E96A5C-B5AD-4E10-B13A-3BC16D102AED}.Release|Any CPU.Build.0 = Release|Any CPU + {84F99CBD-5B86-4428-B263-135B2F67F512}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {84F99CBD-5B86-4428-B263-135B2F67F512}.Debug|Any CPU.Build.0 = Debug|Any CPU + {84F99CBD-5B86-4428-B263-135B2F67F512}.Release|Any CPU.ActiveCfg = Release|Any CPU + {84F99CBD-5B86-4428-B263-135B2F67F512}.Release|Any CPU.Build.0 = Release|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Release|Any CPU.Build.0 = Release|Any CPU + {3B48A77B-5956-4A62-9081-92BA04B02B27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3B48A77B-5956-4A62-9081-92BA04B02B27}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3B48A77B-5956-4A62-9081-92BA04B02B27}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3B48A77B-5956-4A62-9081-92BA04B02B27}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {5EE72C53-1720-4309-B54B-5FB79703195F} = {5EA62ADB-111D-4093-AA55-D266F7C484C6} + {3B48A77B-5956-4A62-9081-92BA04B02B27} = {5EA62ADB-111D-4093-AA55-D266F7C484C6} + EndGlobalSection +EndGlobal diff --git a/src/ServiceManagement.sln b/src/ServiceManagement.sln new file mode 100644 index 000000000000..3e2cf1aafced --- /dev/null +++ b/src/ServiceManagement.sln @@ -0,0 +1,237 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.30723.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8531411A-0137-4E27-9C5E-49E07C245048}" + ProjectSection(SolutionItems) = preProject + local.runsettings = local.runsettings + Local.testsettings = Local.testsettings + UnitTest.testsettings = UnitTest.testsettings + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands", "ServiceManagement\Services\Commands\Commands.csproj", "{CD5AA507-F5EF-473D-855B-84B91A1ABE54}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Test", "ServiceManagement\Services\Commands.Test\Commands.Test.csproj", "{B7FD03F6-98BC-4F54-9A14-0455E579FCD4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.SqlDatabase", "ServiceManagement\Sql\Commands.SqlDatabase\Commands.SqlDatabase.csproj", "{DDF5D225-C9C5-42B7-BDB5-2C3646E479AA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.SqlDatabase.Test", "ServiceManagement\Sql\Commands.SqlDatabase.Test\Commands.SqlDatabase.Test.csproj", "{37455286-D8A7-4E0C-8B4D-C517D20C641A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Storage", "ServiceManagement\Storage\Commands.Storage\Commands.Storage.csproj", "{08CF7DA7-0392-4A19-B79B-E1FF67CDB81A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Storage.Test", "ServiceManagement\Storage\Commands.Storage.Test\Commands.Storage.Test.csproj", "{D6F470A6-7395-4B8B-9D29-44DF0EC8F624}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ScenarioTest", "Common\Commands.ScenarioTest\Commands.ScenarioTest.csproj", "{A3965B66-5A3E-4B8C-9574-28E5958D4828}" + ProjectSection(ProjectDependencies) = postProject + {CD5AA507-F5EF-473D-855B-84B91A1ABE54} = {CD5AA507-F5EF-473D-855B-84B91A1ABE54} + {DDF5D225-C9C5-42B7-BDB5-2C3646E479AA} = {DDF5D225-C9C5-42B7-BDB5-2C3646E479AA} + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ServiceManagement", "ServiceManagement\Compute\Commands.ServiceManagement\Commands.ServiceManagement.csproj", "{E1CA72BA-8374-45F6-904D-FD34ECDF5B6F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ServiceManagement.Test", "ServiceManagement\Compute\Commands.ServiceManagement.Test\Commands.ServiceManagement.Test.csproj", "{58A78F29-8C0C-4A5E-893E-3953C0F29C8A}" + ProjectSection(ProjectDependencies) = postProject + {08CF7DA7-0392-4A19-B79B-E1FF67CDB81A} = {08CF7DA7-0392-4A19-B79B-E1FF67CDB81A} + {E895BBDA-0B06-46AB-B909-9B97B3ECE47E} = {E895BBDA-0B06-46AB-B909-9B97B3ECE47E} + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sync", "ServiceManagement\Compute\Sync\Sync.csproj", "{73820CBC-F4EB-4C5E-B4F0-CC4A93FBF157}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VhdManagement", "ServiceManagement\Compute\VhdManagement\VhdManagement.csproj", "{80496B7B-068A-4A1E-B0BB-4B1FFF3FA616}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Utilities", "ServiceManagement\Services\Commands.Utilities\Commands.Utilities.csproj", "{4900EC4E-8DEB-4412-9108-0BC52F81D457}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Test.Utilities", "ServiceManagement\Services\Commands.Test.Utilities\Commands.Test.Utilities.csproj", "{BC420543-C04E-4BF3-96E1-CD81B823BDD7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Storage.MsTestLib", "ServiceManagement\Storage\Commands.Storage.MsTestLib\Commands.Storage.MsTestLib.csproj", "{CE97967B-7479-43B9-9561-776232AC5D47}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Storage.StorageTestLib", "ServiceManagement\Storage\Commands.Storage.StorageTestLib\Commands.Storage.StorageTestLib.csproj", "{0A513849-2690-4D07-8DE7-0ACE39645D12}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Storage.ScenarioTest", "ServiceManagement\Storage\Commands.Storage.ScenarioTest\Commands.Storage.ScenarioTest.csproj", "{4BC0E3D3-6EDD-43AA-8F15-DCFED8ACC93D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Storage.MsTest2", "ServiceManagement\Storage\Commands.Storage.MsTest2\Commands.Storage.MsTest2.csproj", "{9D5A40CA-5594-4F5C-8230-7ADF7CC0558E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ServiceManagement.PlatformImageRepository", "ServiceManagement\Compute\Commands.ServiceManagement.PlatformImageRepository\Commands.ServiceManagement.PlatformImageRepository.csproj", "{6478FA8B-3801-4863-8591-87F0855D5C82}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ServiceManagement.Preview", "ServiceManagement\Compute\Commands.ServiceManagement.Preview\Commands.ServiceManagement.Preview.csproj", "{E895BBDA-0B06-46AB-B909-9B97B3ECE47E}" + ProjectSection(ProjectDependencies) = postProject + {6478FA8B-3801-4863-8591-87F0855D5C82} = {6478FA8B-3801-4863-8591-87F0855D5C82} + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ExpressRoute", "ServiceManagement\ExpressRoute\Commands.ExpressRoute\Commands.ExpressRoute.csproj", "{45C2D687-E0CE-4C97-B731-335834DC2BF2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common.Storage", "Common\Commands.Common.Storage\Commands.Common.Storage.csproj", "{65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common.Test", "Common\Commands.Common.Test\Commands.Common.Test.csproj", "{3B48A77B-5956-4A62-9081-92BA04B02B27}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{95C16AED-FD57-42A0-86C3-2CF4300A4817}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.TrafficManager", "ServiceManagement\TrafficManager\Commands.TrafficManager\Commands.TrafficManager.csproj", "{94E96A5C-B5AD-4E10-B13A-3BC16D102AED}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ManagedCache", "ServiceManagement\ManagedCache\Commands.ManagedCache\Commands.ManagedCache.csproj", "{46C06ED8-43D9-41FD-B73B-41547D9C04E1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ManagedCache.Test", "ServiceManagement\ManagedCache\Commands.ManagedCache.Test\Commands.ManagedCache.Test.csproj", "{374D4000-DEDE-4995-9B63-E3B9FE0C4D29}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Profile", "Common\Commands.Profile\Commands.Profile.csproj", "{C60342B1-47D3-4A0E-8081-9B97CE60B7AF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.TrafficManager.Test", "ServiceManagement\TrafficManager\Commands.TrafficManager.Test\Commands.TrafficManager.Test.csproj", "{84F99CBD-5B86-4428-B263-135B2F67F512}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.HDInsight", "ServiceManagement\HDInsight\Commands.HDInsight\Commands.HDInsight.csproj", "{137D404A-865A-43DB-930C-6DA67DA048DF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.HDInsight.Test", "ServiceManagement\HDInsight\Commands.HDInsight.Test\Commands.HDInsight.Test.csproj", "{7E8D2555-2DDD-4757-974F-D5FFD0647671}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Network", "ServiceManagement\Network\Commands.Network\Commands.Network.csproj", "{40FEE0BB-FD45-4EFC-85BC-0D602A6892C4}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CD5AA507-F5EF-473D-855B-84B91A1ABE54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CD5AA507-F5EF-473D-855B-84B91A1ABE54}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CD5AA507-F5EF-473D-855B-84B91A1ABE54}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CD5AA507-F5EF-473D-855B-84B91A1ABE54}.Release|Any CPU.Build.0 = Release|Any CPU + {B7FD03F6-98BC-4F54-9A14-0455E579FCD4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B7FD03F6-98BC-4F54-9A14-0455E579FCD4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B7FD03F6-98BC-4F54-9A14-0455E579FCD4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B7FD03F6-98BC-4F54-9A14-0455E579FCD4}.Release|Any CPU.Build.0 = Release|Any CPU + {DDF5D225-C9C5-42B7-BDB5-2C3646E479AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DDF5D225-C9C5-42B7-BDB5-2C3646E479AA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DDF5D225-C9C5-42B7-BDB5-2C3646E479AA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DDF5D225-C9C5-42B7-BDB5-2C3646E479AA}.Release|Any CPU.Build.0 = Release|Any CPU + {37455286-D8A7-4E0C-8B4D-C517D20C641A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {37455286-D8A7-4E0C-8B4D-C517D20C641A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {37455286-D8A7-4E0C-8B4D-C517D20C641A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {37455286-D8A7-4E0C-8B4D-C517D20C641A}.Release|Any CPU.Build.0 = Release|Any CPU + {08CF7DA7-0392-4A19-B79B-E1FF67CDB81A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {08CF7DA7-0392-4A19-B79B-E1FF67CDB81A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {08CF7DA7-0392-4A19-B79B-E1FF67CDB81A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {08CF7DA7-0392-4A19-B79B-E1FF67CDB81A}.Release|Any CPU.Build.0 = Release|Any CPU + {D6F470A6-7395-4B8B-9D29-44DF0EC8F624}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D6F470A6-7395-4B8B-9D29-44DF0EC8F624}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D6F470A6-7395-4B8B-9D29-44DF0EC8F624}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D6F470A6-7395-4B8B-9D29-44DF0EC8F624}.Release|Any CPU.Build.0 = Release|Any CPU + {A3965B66-5A3E-4B8C-9574-28E5958D4828}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A3965B66-5A3E-4B8C-9574-28E5958D4828}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A3965B66-5A3E-4B8C-9574-28E5958D4828}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A3965B66-5A3E-4B8C-9574-28E5958D4828}.Release|Any CPU.Build.0 = Release|Any CPU + {E1CA72BA-8374-45F6-904D-FD34ECDF5B6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E1CA72BA-8374-45F6-904D-FD34ECDF5B6F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E1CA72BA-8374-45F6-904D-FD34ECDF5B6F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E1CA72BA-8374-45F6-904D-FD34ECDF5B6F}.Release|Any CPU.Build.0 = Release|Any CPU + {58A78F29-8C0C-4A5E-893E-3953C0F29C8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {58A78F29-8C0C-4A5E-893E-3953C0F29C8A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {58A78F29-8C0C-4A5E-893E-3953C0F29C8A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {58A78F29-8C0C-4A5E-893E-3953C0F29C8A}.Release|Any CPU.Build.0 = Release|Any CPU + {73820CBC-F4EB-4C5E-B4F0-CC4A93FBF157}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {73820CBC-F4EB-4C5E-B4F0-CC4A93FBF157}.Debug|Any CPU.Build.0 = Debug|Any CPU + {73820CBC-F4EB-4C5E-B4F0-CC4A93FBF157}.Release|Any CPU.ActiveCfg = Release|Any CPU + {73820CBC-F4EB-4C5E-B4F0-CC4A93FBF157}.Release|Any CPU.Build.0 = Release|Any CPU + {80496B7B-068A-4A1E-B0BB-4B1FFF3FA616}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {80496B7B-068A-4A1E-B0BB-4B1FFF3FA616}.Debug|Any CPU.Build.0 = Debug|Any CPU + {80496B7B-068A-4A1E-B0BB-4B1FFF3FA616}.Release|Any CPU.ActiveCfg = Release|Any CPU + {80496B7B-068A-4A1E-B0BB-4B1FFF3FA616}.Release|Any CPU.Build.0 = Release|Any CPU + {4900EC4E-8DEB-4412-9108-0BC52F81D457}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4900EC4E-8DEB-4412-9108-0BC52F81D457}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4900EC4E-8DEB-4412-9108-0BC52F81D457}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4900EC4E-8DEB-4412-9108-0BC52F81D457}.Release|Any CPU.Build.0 = Release|Any CPU + {BC420543-C04E-4BF3-96E1-CD81B823BDD7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BC420543-C04E-4BF3-96E1-CD81B823BDD7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BC420543-C04E-4BF3-96E1-CD81B823BDD7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BC420543-C04E-4BF3-96E1-CD81B823BDD7}.Release|Any CPU.Build.0 = Release|Any CPU + {CE97967B-7479-43B9-9561-776232AC5D47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CE97967B-7479-43B9-9561-776232AC5D47}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CE97967B-7479-43B9-9561-776232AC5D47}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CE97967B-7479-43B9-9561-776232AC5D47}.Release|Any CPU.Build.0 = Release|Any CPU + {0A513849-2690-4D07-8DE7-0ACE39645D12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0A513849-2690-4D07-8DE7-0ACE39645D12}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0A513849-2690-4D07-8DE7-0ACE39645D12}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0A513849-2690-4D07-8DE7-0ACE39645D12}.Release|Any CPU.Build.0 = Release|Any CPU + {4BC0E3D3-6EDD-43AA-8F15-DCFED8ACC93D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4BC0E3D3-6EDD-43AA-8F15-DCFED8ACC93D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4BC0E3D3-6EDD-43AA-8F15-DCFED8ACC93D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4BC0E3D3-6EDD-43AA-8F15-DCFED8ACC93D}.Release|Any CPU.Build.0 = Release|Any CPU + {9D5A40CA-5594-4F5C-8230-7ADF7CC0558E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9D5A40CA-5594-4F5C-8230-7ADF7CC0558E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9D5A40CA-5594-4F5C-8230-7ADF7CC0558E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9D5A40CA-5594-4F5C-8230-7ADF7CC0558E}.Release|Any CPU.Build.0 = Release|Any CPU + {6478FA8B-3801-4863-8591-87F0855D5C82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6478FA8B-3801-4863-8591-87F0855D5C82}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6478FA8B-3801-4863-8591-87F0855D5C82}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6478FA8B-3801-4863-8591-87F0855D5C82}.Release|Any CPU.Build.0 = Release|Any CPU + {E895BBDA-0B06-46AB-B909-9B97B3ECE47E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E895BBDA-0B06-46AB-B909-9B97B3ECE47E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E895BBDA-0B06-46AB-B909-9B97B3ECE47E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E895BBDA-0B06-46AB-B909-9B97B3ECE47E}.Release|Any CPU.Build.0 = Release|Any CPU + {45C2D687-E0CE-4C97-B731-335834DC2BF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {45C2D687-E0CE-4C97-B731-335834DC2BF2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {45C2D687-E0CE-4C97-B731-335834DC2BF2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {45C2D687-E0CE-4C97-B731-335834DC2BF2}.Release|Any CPU.Build.0 = Release|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5EE72C53-1720-4309-B54B-5FB79703195F}.Release|Any CPU.Build.0 = Release|Any CPU + {65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}.Release|Any CPU.Build.0 = Release|Any CPU + {3B48A77B-5956-4A62-9081-92BA04B02B27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3B48A77B-5956-4A62-9081-92BA04B02B27}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3B48A77B-5956-4A62-9081-92BA04B02B27}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3B48A77B-5956-4A62-9081-92BA04B02B27}.Release|Any CPU.Build.0 = Release|Any CPU + {94E96A5C-B5AD-4E10-B13A-3BC16D102AED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {94E96A5C-B5AD-4E10-B13A-3BC16D102AED}.Debug|Any CPU.Build.0 = Debug|Any CPU + {94E96A5C-B5AD-4E10-B13A-3BC16D102AED}.Release|Any CPU.ActiveCfg = Release|Any CPU + {94E96A5C-B5AD-4E10-B13A-3BC16D102AED}.Release|Any CPU.Build.0 = Release|Any CPU + {46C06ED8-43D9-41FD-B73B-41547D9C04E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {46C06ED8-43D9-41FD-B73B-41547D9C04E1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {46C06ED8-43D9-41FD-B73B-41547D9C04E1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {46C06ED8-43D9-41FD-B73B-41547D9C04E1}.Release|Any CPU.Build.0 = Release|Any CPU + {374D4000-DEDE-4995-9B63-E3B9FE0C4D29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {374D4000-DEDE-4995-9B63-E3B9FE0C4D29}.Debug|Any CPU.Build.0 = Debug|Any CPU + {374D4000-DEDE-4995-9B63-E3B9FE0C4D29}.Release|Any CPU.ActiveCfg = Release|Any CPU + {374D4000-DEDE-4995-9B63-E3B9FE0C4D29}.Release|Any CPU.Build.0 = Release|Any CPU + {C60342B1-47D3-4A0E-8081-9B97CE60B7AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C60342B1-47D3-4A0E-8081-9B97CE60B7AF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C60342B1-47D3-4A0E-8081-9B97CE60B7AF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C60342B1-47D3-4A0E-8081-9B97CE60B7AF}.Release|Any CPU.Build.0 = Release|Any CPU + {84F99CBD-5B86-4428-B263-135B2F67F512}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {84F99CBD-5B86-4428-B263-135B2F67F512}.Debug|Any CPU.Build.0 = Debug|Any CPU + {84F99CBD-5B86-4428-B263-135B2F67F512}.Release|Any CPU.ActiveCfg = Release|Any CPU + {84F99CBD-5B86-4428-B263-135B2F67F512}.Release|Any CPU.Build.0 = Release|Any CPU + {137D404A-865A-43DB-930C-6DA67DA048DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {137D404A-865A-43DB-930C-6DA67DA048DF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {137D404A-865A-43DB-930C-6DA67DA048DF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {137D404A-865A-43DB-930C-6DA67DA048DF}.Release|Any CPU.Build.0 = Release|Any CPU + {7E8D2555-2DDD-4757-974F-D5FFD0647671}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7E8D2555-2DDD-4757-974F-D5FFD0647671}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7E8D2555-2DDD-4757-974F-D5FFD0647671}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7E8D2555-2DDD-4757-974F-D5FFD0647671}.Release|Any CPU.Build.0 = Release|Any CPU + {40FEE0BB-FD45-4EFC-85BC-0D602A6892C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {40FEE0BB-FD45-4EFC-85BC-0D602A6892C4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {40FEE0BB-FD45-4EFC-85BC-0D602A6892C4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {40FEE0BB-FD45-4EFC-85BC-0D602A6892C4}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {B7FD03F6-98BC-4F54-9A14-0455E579FCD4} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {37455286-D8A7-4E0C-8B4D-C517D20C641A} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {D6F470A6-7395-4B8B-9D29-44DF0EC8F624} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {A3965B66-5A3E-4B8C-9574-28E5958D4828} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {58A78F29-8C0C-4A5E-893E-3953C0F29C8A} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {BC420543-C04E-4BF3-96E1-CD81B823BDD7} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {CE97967B-7479-43B9-9561-776232AC5D47} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {0A513849-2690-4D07-8DE7-0ACE39645D12} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {4BC0E3D3-6EDD-43AA-8F15-DCFED8ACC93D} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {9D5A40CA-5594-4F5C-8230-7ADF7CC0558E} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {3B48A77B-5956-4A62-9081-92BA04B02B27} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {374D4000-DEDE-4995-9B63-E3B9FE0C4D29} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {84F99CBD-5B86-4428-B263-135B2F67F512} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + {7E8D2555-2DDD-4757-974F-D5FFD0647671} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} + EndGlobalSection +EndGlobal diff --git a/src/ServiceManagement/Automation/Commands.Automation.Test/Commands.Automation.Test.csproj b/src/ServiceManagement/Automation/Commands.Automation.Test/Commands.Automation.Test.csproj new file mode 100644 index 000000000000..49e3198321f4 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation.Test/Commands.Automation.Test.csproj @@ -0,0 +1,147 @@ + + + + Debug + AnyCPU + + + 2.0 + {127D0D51-FDEA-4E1A-8CD8-34DEB5C2F7F6} + Library + Properties + Microsoft.Azure.Commands.Automation.Test + Microsoft.Azure.Commands.Automation.Test + v4.5 + 512 + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + ..\..\..\ + true + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + false + + + OnBuildSuccess + + + bin\Release\ + TRACE;SIGN + true + pdbonly + AnyCPU + prompt + false + true + MSSharedLibKey.snk + true + true + false + + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + False + ..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll + + + False + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + + + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + {3b48a77b-5956-4a62-9081-92ba04b02b27} + Commands.Common.Test + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + {47cd7e95-5330-4384-abce-2c267c57085c} + Commands.Automation + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Automation/Commands.Automation.Test/MSSharedLibKey.snk b/src/ServiceManagement/Automation/Commands.Automation.Test/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ServiceManagement/Automation/Commands.Automation.Test/MSSharedLibKey.snk differ diff --git a/src/ServiceManagement/Automation/Commands.Automation.Test/Properties/AssemblyInfo.cs b/src/ServiceManagement/Automation/Commands.Automation.Test/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..7c659ae72e40 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation.Test/Properties/AssemblyInfo.cs @@ -0,0 +1,47 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft Azure Powershell")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("b68df865-6fc0-4339-8e7a-6bcd4e76fb7f")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] +[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] +[assembly: CLSCompliant(false)] diff --git a/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationAccountTest.cs b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationAccountTest.cs new file mode 100644 index 000000000000..06dfca9ef977 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationAccountTest.cs @@ -0,0 +1,76 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Automation.Cmdlet; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Moq; + +namespace Microsoft.Azure.Commands.Automation.Test.UnitTests +{ + [TestClass] + public class GetAzureAutomationAccountTest : TestBase + { + private Mock mockAutomationClient; + + private MockCommandRuntime mockCommandRuntime; + + private GetAzureAutomationAccount cmdlet; + + [TestInitialize] + public void SetupTest() + { + this.mockAutomationClient = new Mock(); + this.mockCommandRuntime = new MockCommandRuntime(); + this.cmdlet = new GetAzureAutomationAccount + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; + } + + [TestMethod] + public void GetAzureAutomationAllAccountsSuccessfull() + { + // Setup + this.mockAutomationClient.Setup(f => f.ListAutomationAccounts(null, null)); + + // Test + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.ListAutomationAccounts(null, null), Times.Once()); + } + + [TestMethod] + public void GetAzureAutomationAccountSuccessfull() + { + // Setup + string accountName = "account"; + string location = "East US"; + + this.mockAutomationClient.Setup(f => f.ListAutomationAccounts(accountName, location)); + + // Test + this.cmdlet.Name = accountName; + this.cmdlet.Location = location; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.ListAutomationAccounts(accountName, location), Times.Once()); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationJobOutputTest.cs b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationJobOutputTest.cs new file mode 100644 index 000000000000..de8e06091527 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationJobOutputTest.cs @@ -0,0 +1,90 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.Azure.Commands.Automation.Cmdlet; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Moq; + +namespace Microsoft.Azure.Commands.Automation.Test.UnitTests +{ + [TestClass] + public class GetAzureAutomationJobOutputTest : TestBase + { + private Mock mockAutomationClient; + + private MockCommandRuntime mockCommandRuntime; + + private GetAzureAutomationJobOutput cmdlet; + + [TestInitialize] + public void SetupTest() + { + this.mockAutomationClient = new Mock(); + this.mockCommandRuntime = new MockCommandRuntime(); + this.cmdlet = new GetAzureAutomationJobOutput + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; + } + + [TestMethod] + public void GetAzureAutomationJobOutputStreamAnySuccessfull() + { + // Setup + string accountName = "automation"; + string stream = Constants.JobOutputParameter.Any; + DateTime startTime = default(DateTime); + var jobId = new Guid(); + + this.mockAutomationClient.Setup(f => f.ListJobStreamItems(accountName, jobId, startTime, null)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Id = jobId; + this.cmdlet.StartTime = startTime; + this.cmdlet.Stream = stream; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.ListJobStreamItems(accountName, jobId, startTime, null), Times.Once()); + } + + [TestMethod] + public void GetAzureAutomationJobOutputStreamDebugSuccessfull() + { + // Setup + string accountName = "automation"; + DateTime startTime = default(DateTime); + string stream = Constants.JobOutputParameter.Debug; + var jobId = new Guid(); + + this.mockAutomationClient.Setup(f => f.ListJobStreamItems(accountName, jobId, startTime, stream)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Id = jobId; + this.cmdlet.StartTime = startTime; + this.cmdlet.Stream = stream; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.ListJobStreamItems(accountName, jobId, startTime, stream), Times.Once()); + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationJobTest.cs b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationJobTest.cs new file mode 100644 index 000000000000..63c144e2a11d --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationJobTest.cs @@ -0,0 +1,118 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.Azure.Commands.Automation.Cmdlet; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Moq; + +namespace Microsoft.Azure.Commands.Automation.Test.UnitTests +{ + [TestClass] + public class GetAzureAutomationJobTest : TestBase + { + private Mock mockAutomationClient; + + private MockCommandRuntime mockCommandRuntime; + + private GetAzureAutomationJob cmdlet; + + [TestInitialize] + public void SetupTest() + { + this.mockAutomationClient = new Mock(); + this.mockCommandRuntime = new MockCommandRuntime(); + this.cmdlet = new GetAzureAutomationJob + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; + } + + [TestMethod] + public void GetAzureAutomationJobByJobIdSuccessfull() + { + // Setup + string accountName = "automation"; + var jobId = new Guid(); + + this.mockAutomationClient.Setup(f => f.GetJob(accountName, jobId)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Id = jobId; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.GetJob(accountName, jobId), Times.Once()); + } + + [TestMethod] + public void GetAzureAutomationJobByRunbookIdSuccessfull() + { + // Setup + string accountName = "automation"; + var runbookId = new Guid(); + + this.mockAutomationClient.Setup( + f => f.ListJobsByRunbookId(accountName, runbookId, It.IsAny(), It.IsAny())); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.RunbookId = runbookId; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.ListJobsByRunbookId(accountName, runbookId, It.IsAny(), It.IsAny()), Times.Once()); + } + + [TestMethod] + public void GetAzureAutomationJobByRunbookNameSuccessfull() + { + // Setup + string accountName = "automation"; + var runbookName = "runbook"; + + this.mockAutomationClient.Setup( + f => f.ListJobsByRunbookName(accountName, runbookName, It.IsAny(), It.IsAny())); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.RunbookName = runbookName; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.ListJobsByRunbookName(accountName, runbookName, It.IsAny(), It.IsAny()), Times.Once()); + } + + [TestMethod] + public void GetAzureAutomationJobByAllSuccessfull() + { + // Setup + string accountName = "automation"; + + this.mockAutomationClient.Setup(f => f.ListJobs(accountName, It.IsAny(), It.IsAny())); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.ListJobs(accountName, It.IsAny(), It.IsAny()), Times.Once()); + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationRunbookDefinitionTest.cs b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationRunbookDefinitionTest.cs new file mode 100644 index 000000000000..862af2fc70de --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationRunbookDefinitionTest.cs @@ -0,0 +1,139 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.Azure.Commands.Automation.Cmdlet; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Moq; + +namespace Microsoft.Azure.Commands.Automation.Test.UnitTests +{ + [TestClass] + public class GetAzureAutomationRunbookDefinitionTest : TestBase + { + private Mock mockAutomationClient; + + private MockCommandRuntime mockCommandRuntime; + + private GetAzureAutomationRunbookDefinition cmdlet; + + [TestInitialize] + public void SetupTest() + { + this.mockAutomationClient = new Mock(); + this.mockCommandRuntime = new MockCommandRuntime(); + this.cmdlet = new GetAzureAutomationRunbookDefinition + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; + } + + [TestMethod] + public void GetAzureAutomationRunbookDefinitionByRunbookIdWithoutSlotSuccessfull() + { + // Setup + string accountName = "automation"; + var runbookId = new Guid(); + + this.mockAutomationClient.Setup(f => f.ListRunbookDefinitionsByRunbookId(accountName, runbookId, null)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Id = runbookId; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.ListRunbookDefinitionsByRunbookId(accountName, runbookId, null), Times.Once()); + } + + [TestMethod] + public void GetAzureAutomationRunbookDefinitionByRunbookIdSlotDraftSuccessfull() + { + // Setup + string accountName = "automation"; + var runbookId = new Guid(); + + this.mockAutomationClient.Setup(f => f.ListRunbookDefinitionsByRunbookId(accountName, runbookId, true)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Id = runbookId; + this.cmdlet.Slot = "Draft"; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.ListRunbookDefinitionsByRunbookId(accountName, runbookId, true), Times.Once()); + } + + [TestMethod] + public void GetAzureAutomationRunbookDefinitionByRunbookNameWithoutSlotSuccessfull() + { + // Setup + string accountName = "automation"; + string runbookName = "runbook"; + + this.mockAutomationClient.Setup(f => f.ListRunbookDefinitionsByRunbookName(accountName, runbookName, null)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Name = runbookName; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.ListRunbookDefinitionsByRunbookName(accountName, runbookName, null), Times.Once()); + } + + [TestMethod] + public void GetAzureAutomationRunbookDefinitionByRunbookNameSlotPublishedSuccessfull() + { + // Setup + string accountName = "automation"; + string runbookName = "runbook"; + + this.mockAutomationClient.Setup(f => f.ListRunbookDefinitionsByRunbookName(accountName, runbookName, false)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Name = runbookName; + this.cmdlet.Slot = "Published"; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.ListRunbookDefinitionsByRunbookName(accountName, runbookName, false), Times.Once()); + } + + [TestMethod] + public void GetAzureAutomationRunbookDefinitionByRunbookVersionIdWithoutSlotSuccessfull() + { + // Setup + string accountName = "automation"; + var runbookVersionId = new Guid(); + + this.mockAutomationClient.Setup( + f => f.ListRunbookDefinitionsByRunbookVersionId(accountName, runbookVersionId, null)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.VersionId = runbookVersionId; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.ListRunbookDefinitionsByRunbookVersionId(accountName, runbookVersionId, null), Times.Once()); + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationRunbookTest.cs b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationRunbookTest.cs new file mode 100644 index 000000000000..cb51efa30d15 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationRunbookTest.cs @@ -0,0 +1,116 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.Azure.Commands.Automation.Cmdlet; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Moq; + +namespace Microsoft.Azure.Commands.Automation.Test.UnitTests +{ + [TestClass] + public class GetAzureAutomationRunbookTest : TestBase + { + private Mock mockAutomationClient; + + private MockCommandRuntime mockCommandRuntime; + + private GetAzureAutomationRunbook cmdlet; + + [TestInitialize] + public void SetupTest() + { + this.mockAutomationClient = new Mock(); + this.mockCommandRuntime = new MockCommandRuntime(); + this.cmdlet = new GetAzureAutomationRunbook + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; + } + + [TestMethod] + public void GetAzureAutomationRunbookByIdSuccessfull() + { + // Setup + string accountName = "automation"; + var runbookId = new Guid(); + + this.mockAutomationClient.Setup(f => f.GetRunbook(accountName, runbookId)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Id = runbookId; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.GetRunbook(accountName, runbookId), Times.Once()); + } + + [TestMethod] + public void GetAzureAutomationRunbookByNameSuccessfull() + { + // Setup + string accountName = "automation"; + string runbookName = "runbook"; + + this.mockAutomationClient.Setup(f => f.GetRunbook(accountName, runbookName)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Name = runbookName; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.GetRunbook(accountName, runbookName), Times.Once()); + } + + [TestMethod] + public void GetAzureAutomationRunbookByScheduleNameSuccessfull() + { + // Setup + string accountName = "automation"; + string scheduleName = "schedule"; + + this.mockAutomationClient.Setup(f => f.ListRunbookByScheduleName(accountName, scheduleName)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.ScheduleName = scheduleName; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.ListRunbookByScheduleName(accountName, scheduleName), Times.Once()); + } + + [TestMethod] + public void GetAzureAutomationRunbookByAllSuccessfull() + { + // Setup + string accountName = "automation"; + + this.mockAutomationClient.Setup(f => f.ListRunbooks(accountName)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.ListRunbooks(accountName), Times.Once()); + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationScheduleTest.cs b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationScheduleTest.cs new file mode 100644 index 000000000000..3321454d46c7 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/GetAzureAutomationScheduleTest.cs @@ -0,0 +1,100 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Microsoft.Azure.Commands.Automation.Cmdlet; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Moq; + +namespace Microsoft.Azure.Commands.Automation.Test.UnitTests +{ + [TestClass] + public class GetAzureAutomationScheduleTest : TestBase + { + private Mock mockAutomationClient; + + private MockCommandRuntime mockCommandRuntime; + + private GetAzureAutomationSchedule cmdlet; + + [TestInitialize] + public void SetupTest() + { + this.mockAutomationClient = new Mock(); + this.mockCommandRuntime = new MockCommandRuntime(); + this.cmdlet = new GetAzureAutomationSchedule + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; + } + + [TestMethod] + public void GetAzureAutomationScheduleByIdSuccessfull() + { + // Setup + string accountName = "automation"; + var scheduleId = new Guid(); + + this.mockAutomationClient.Setup(f => f.GetSchedule(accountName, scheduleId)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Id = scheduleId; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.GetSchedule(accountName, scheduleId), Times.Once()); + } + + [TestMethod] + public void GetAzureAutomationScheduleByNameSuccessfull() + { + // Setup + string accountName = "automation"; + string scheduleName = "schedule"; + + this.mockAutomationClient.Setup(f => f.GetSchedule(accountName, scheduleName)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Name = scheduleName; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.GetSchedule(accountName, scheduleName), Times.Once()); + } + + [TestMethod] + public void GetAzureAutomationScheduleByAllSuccessfull() + { + // Setup + string accountName = "automation"; + + this.mockAutomationClient.Setup(f => f.ListSchedules(accountName)).Returns((string a) => new List()); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.ListSchedules(accountName), Times.Once()); + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationRunbookTest.cs b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationRunbookTest.cs new file mode 100644 index 000000000000..b81734a10c44 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationRunbookTest.cs @@ -0,0 +1,89 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Automation.Cmdlet; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Moq; + +namespace Microsoft.Azure.Commands.Automation.Test.UnitTests +{ + [TestClass] + public class NewAzureAutomationRunbookTest : TestBase + { + private Mock mockAutomationClient; + + private MockCommandRuntime mockCommandRuntime; + + private NewAzureAutomationRunbook cmdlet; + + [TestInitialize] + public void SetupTest() + { + this.mockAutomationClient = new Mock(); + this.mockCommandRuntime = new MockCommandRuntime(); + this.cmdlet = new NewAzureAutomationRunbook + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; + } + + [TestMethod] + public void NewAzureAutomationRunbookByPathSuccessfull() + { + // Setup + string accountName = "automation"; + string runbookPath = "runbook.ps1"; + string description = "desc"; + var tags = new string[] { "tag1", "tags2" }; + + this.mockAutomationClient.Setup( + f => f.CreateRunbookByPath(accountName, runbookPath, description, tags)); + + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Path = runbookPath; + this.cmdlet.Description = description; + this.cmdlet.Tags = tags; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.CreateRunbookByPath(accountName, runbookPath, description, tags), Times.Once()); + } + + [TestMethod] + public void NewAzureAutomationRunbookByNameSuccessfull() + { + // Setup + string accountName = "automation"; + string runbookName = "runbook"; + string description = "desc"; + var tags = new string[] { "tag1", "tags2" }; + + this.mockAutomationClient.Setup( + f => f.CreateRunbookByName(accountName, runbookName, description, tags)); + + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Name = runbookName; + this.cmdlet.Description = description; + this.cmdlet.Tags = tags; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.CreateRunbookByName(accountName, runbookName, description, tags), Times.Once()); + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationScheduleTest.cs b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationScheduleTest.cs new file mode 100644 index 000000000000..bdc2457c8e7a --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/NewAzureAutomationScheduleTest.cs @@ -0,0 +1,284 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using Microsoft.Azure.Commands.Automation.Cmdlet; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Moq; + +namespace Microsoft.Azure.Commands.Automation.Test.UnitTests +{ + [TestClass] + public class NewAzureAutomationScheduleTest : TestBase + { + private Mock mockAutomationClient; + + private MockCommandRuntime mockCommandRuntime; + + private NewAzureAutomationSchedule cmdlet; + + [TestInitialize] + public void SetupTest() + { + this.mockAutomationClient = new Mock(); + this.mockCommandRuntime = new MockCommandRuntime(); + this.cmdlet = new NewAzureAutomationSchedule + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; + } + + [TestMethod] + public void NewAzureAutomationScheduleByOneTimeSuccessfull() + { + // Setup + string accountName = "automation"; + string scheduleName = "schedule"; + + this.mockAutomationClient.Setup(f => f.CreateSchedule(accountName, It.IsAny())); + + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Name = scheduleName; + this.cmdlet.StartTime = DateTime.Now; + this.cmdlet.OneTime = true; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient + .Verify(f => f.CreateSchedule(accountName, It.IsAny()), Times.Once()); + } + + [TestMethod] + public void NewAzureAutomationScheduleByDailySuccessfull() + { + // Setup + string accountName = "automation"; + string scheduleName = "schedule"; + int dayInterval = 1; + + this.mockAutomationClient.Setup(f => f.CreateSchedule(accountName, It.IsAny())); + + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Name = scheduleName; + this.cmdlet.StartTime = DateTime.Now; + this.cmdlet.DayInterval = dayInterval; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient + .Verify(f => f.CreateSchedule(accountName, It.IsAny()), Times.Once()); + } + + [TestMethod] + public void NewAzureAutomationScheduleByHourlySuccessfull() + { + // Setup + string accountName = "automation"; + string scheduleName = "schedule"; + int hourInterval = 1; + + this.mockAutomationClient.Setup(f => f.CreateSchedule(accountName, It.IsAny())); + + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Name = scheduleName; + this.cmdlet.StartTime = DateTime.Now; + this.cmdlet.HourInterval = hourInterval; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient + .Verify(f => f.CreateSchedule(accountName, It.IsAny()), Times.Once()); + } + + [TestMethod] + public void NewAzureAutomationScheduleByDailyWithDefaultExpiryTimeDayIntervalSuccessfull() + { + // Setup + string accountName = "automation"; + string scheduleName = "schedule"; + int dayInterval = 1; + + this.mockAutomationClient + .Setup(f => f.CreateSchedule(accountName, It.IsAny())) + .Returns((string a, DailySchedule s) => s); + + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Name = scheduleName; + this.cmdlet.StartTime = DateTime.Now; + this.cmdlet.DayInterval = dayInterval; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient + .Verify(f => f.CreateSchedule(accountName, It.IsAny()), Times.Once()); + + Assert.AreEqual(1, ((MockCommandRuntime)this.cmdlet.CommandRuntime).OutputPipeline.Count); + var schedule = (DailySchedule)((MockCommandRuntime)this.cmdlet.CommandRuntime) + .OutputPipeline + .FirstOrDefault(); + Assert.IsNotNull(schedule); + Assert.AreEqual(scheduleName, schedule.Name, "Schedule name is unexpectedly {0}", schedule.Name); + + // Test for default values + Assert.AreEqual( + Constants.DefaultScheduleExpiryTime, + schedule.ExpiryTime, + "Expiry time is unexpectedly {0}", + schedule.ExpiryTime); + Assert.AreEqual( + dayInterval, + schedule.DayInterval, + "Day Interval is unexpectedly {0}", + schedule.DayInterval); + } + + [TestMethod] + public void NewAzureAutomationScheduleByHourlyWithDefaultExpiryTimeDayIntervalSuccessfull() + { + // Setup + string accountName = "automation"; + string scheduleName = "schedule"; + int hourInterval = 1; + + this.mockAutomationClient + .Setup(f => f.CreateSchedule(accountName, It.IsAny())) + .Returns((string a, HourlySchedule s) => s); + + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Name = scheduleName; + this.cmdlet.StartTime = DateTime.Now; + this.cmdlet.HourInterval = hourInterval; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient + .Verify(f => f.CreateSchedule(accountName, It.IsAny()), Times.Once()); + + Assert.AreEqual(1, ((MockCommandRuntime)this.cmdlet.CommandRuntime).OutputPipeline.Count); + var schedule = (HourlySchedule)((MockCommandRuntime)this.cmdlet.CommandRuntime) + .OutputPipeline + .FirstOrDefault(); + Assert.IsNotNull(schedule); + Assert.AreEqual(scheduleName, schedule.Name, "Schedule name is unexpectedly {0}", schedule.Name); + + // Test for default values + Assert.AreEqual( + Constants.DefaultScheduleExpiryTime, + schedule.ExpiryTime, + "Expiry time is unexpectedly {0}", + schedule.ExpiryTime); + Assert.AreEqual( + hourInterval, + schedule.HourInterval, + "Hour Interval is unexpectedly {0}", + schedule.HourInterval); + } + + [TestMethod] + public void NewAzureAutomationScheduleByDailyWithUnspecificedDateTimeKindSuccessfull() + { + // Setup + string accountName = "automation"; + string scheduleName = "schedule"; + int dayInterval = 1; + var startTime = DateTime.Now; + var expiryTime = new DateTime(2048, 4, 2); + + this.mockAutomationClient + .Setup(f => f.CreateSchedule(accountName, It.IsAny())) + .Returns((string a, DailySchedule s) => s); + + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Name = scheduleName; + this.cmdlet.StartTime = startTime; + this.cmdlet.ExpiryTime = expiryTime; + this.cmdlet.DayInterval = dayInterval; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient + .Verify(f => f.CreateSchedule(accountName, It.IsAny()), Times.Once()); + + Assert.AreEqual(1, ((MockCommandRuntime)this.cmdlet.CommandRuntime).OutputPipeline.Count); + var schedule = (DailySchedule)((MockCommandRuntime)this.cmdlet.CommandRuntime) + .OutputPipeline + .FirstOrDefault(); + Assert.IsNotNull(schedule); + Assert.AreEqual(scheduleName, schedule.Name, "Schedule name is unexpectedly {0}", schedule.Name); + + // If startTime or expiryTime is unspecified DateTimeKind, we assume they are local time + Assert.AreEqual( + DateTimeKind.Local, + schedule.StartTime.Kind, + "DateTimeKind of start time is unexpectedly {0}", + schedule.StartTime.Kind); + Assert.AreEqual( + DateTimeKind.Local, + schedule.ExpiryTime.Kind, + "DateTimeKind of expiry time is unexpectedly {0}", + schedule.ExpiryTime.Kind); + } + + [TestMethod] + public void NewAzureAutomationScheduleByHourlyWithUnspecificedDateTimeKindSuccessfull() + { + // Setup + string accountName = "automation"; + string scheduleName = "schedule"; + int hourInterval = 1; + var startTime = DateTime.Now; + var expiryTime = new DateTime(2048, 4, 2); + + this.mockAutomationClient + .Setup(f => f.CreateSchedule(accountName, It.IsAny())) + .Returns((string a, HourlySchedule s) => s); + + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Name = scheduleName; + this.cmdlet.StartTime = startTime; + this.cmdlet.ExpiryTime = expiryTime; + this.cmdlet.HourInterval = hourInterval; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient + .Verify(f => f.CreateSchedule(accountName, It.IsAny()), Times.Once()); + + Assert.AreEqual(1, ((MockCommandRuntime)this.cmdlet.CommandRuntime).OutputPipeline.Count); + var schedule = (HourlySchedule)((MockCommandRuntime)this.cmdlet.CommandRuntime) + .OutputPipeline + .FirstOrDefault(); + Assert.IsNotNull(schedule); + Assert.AreEqual(scheduleName, schedule.Name, "Schedule name is unexpectedly {0}", schedule.Name); + + // If startTime or expiryTime is unspecified DateTimeKind, we assume they are local time + Assert.AreEqual( + DateTimeKind.Local, + schedule.StartTime.Kind, + "DateTimeKind of start time is unexpectedly {0}", + schedule.StartTime.Kind); + Assert.AreEqual( + DateTimeKind.Local, + schedule.ExpiryTime.Kind, + "DateTimeKind of expiry time is unexpectedly {0}", + schedule.ExpiryTime.Kind); + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/PublishAzureAutomationRunbookTest.cs b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/PublishAzureAutomationRunbookTest.cs new file mode 100644 index 000000000000..69c9fd07c6e0 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/PublishAzureAutomationRunbookTest.cs @@ -0,0 +1,82 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.Azure.Commands.Automation.Cmdlet; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Moq; + +namespace Microsoft.Azure.Commands.Automation.Test.UnitTests +{ + [TestClass] + public class PublishAzureAutomationRunbookTest : TestBase + { + private Mock mockAutomationClient; + + private MockCommandRuntime mockCommandRuntime; + + private PublishAzureAutomationRunbook cmdlet; + + [TestInitialize] + public void SetupTest() + { + this.mockAutomationClient = new Mock(); + this.mockCommandRuntime = new MockCommandRuntime(); + this.cmdlet = new PublishAzureAutomationRunbook + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; + } + + [TestMethod] + public void PublishAzureAutomationRunbookByIdSuccessfull() + { + // Setup + string accountName = "automation"; + var runbookId = new Guid(); + + this.mockAutomationClient.Setup(f => f.PublishRunbook(accountName, runbookId)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Id = runbookId; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.PublishRunbook(accountName, runbookId), Times.Once()); + } + + [TestMethod] + public void PublishAzureAutomationRunbookByNameSuccessfull() + { + // Setup + string accountName = "automation"; + string runbookName = "runbook"; + + this.mockAutomationClient.Setup(f => f.PublishRunbook(accountName, runbookName)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Name = runbookName; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.PublishRunbook(accountName, runbookName), Times.Once()); + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/RegisterAzureAutomationScheduledJobTest.cs b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/RegisterAzureAutomationScheduledJobTest.cs new file mode 100644 index 000000000000..2429a48e5a7a --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/RegisterAzureAutomationScheduledJobTest.cs @@ -0,0 +1,87 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.Azure.Commands.Automation.Cmdlet; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Moq; + +namespace Microsoft.Azure.Commands.Automation.Test.UnitTests +{ + [TestClass] + public class RegisterAzureAutomationScheduledJobTest : TestBase + { + private Mock mockAutomationClient; + + private MockCommandRuntime mockCommandRuntime; + + private RegisterAzureAutomationScheduledRunbook cmdlet; + + [TestInitialize] + public void SetupTest() + { + this.mockAutomationClient = new Mock(); + this.mockCommandRuntime = new MockCommandRuntime(); + this.cmdlet = new RegisterAzureAutomationScheduledRunbook + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; + } + + [TestMethod] + public void RegisterAzureAutomationScheduledRunbookByRunbookIdSuccessfull() + { + // Setup + string accountName = "automation"; + string scheduleName = "schedule"; + var runbookId = new Guid(); + + this.mockAutomationClient.Setup(f => f.RegisterScheduledRunbook(accountName, runbookId, null, scheduleName)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Id = runbookId; + this.cmdlet.ScheduleName = scheduleName; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.RegisterScheduledRunbook(accountName, runbookId, null, scheduleName), Times.Once()); + } + + [TestMethod] + public void RegisterAzureAutomationScheduledRunbookByRunbookNameSuccessfull() + { + // Setup + string accountName = "automation"; + string runbookName = "runbook"; + string scheduleName = "schedule"; + + this.mockAutomationClient.Setup( + f => f.RegisterScheduledRunbook(accountName, runbookName, null, scheduleName)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Name = runbookName; + this.cmdlet.ScheduleName = scheduleName; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.RegisterScheduledRunbook(accountName, runbookName, null, scheduleName), Times.Once()); + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationRunbookTest.cs b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationRunbookTest.cs new file mode 100644 index 000000000000..ea87566406a3 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationRunbookTest.cs @@ -0,0 +1,84 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.Azure.Commands.Automation.Cmdlet; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Moq; + +namespace Microsoft.Azure.Commands.Automation.Test.UnitTests +{ + [TestClass] + public class RemoveAzureAutomationRunbookTest : TestBase + { + private Mock mockAutomationClient; + + private MockCommandRuntime mockCommandRuntime; + + private RemoveAzureAutomationRunbook cmdlet; + + [TestInitialize] + public void SetupTest() + { + this.mockAutomationClient = new Mock(); + this.mockCommandRuntime = new MockCommandRuntime(); + this.cmdlet = new RemoveAzureAutomationRunbook + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; + } + + [TestMethod] + public void RemoveAzureAutomationRunbookByIdSuccessfull() + { + // Setup + string accountName = "automation"; + var runbookId = new Guid(); + + this.mockAutomationClient.Setup(f => f.DeleteRunbook(accountName, runbookId)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Id = runbookId; + this.cmdlet.Force = true; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.DeleteRunbook(accountName, runbookId), Times.Once()); + } + + [TestMethod] + public void RemoveAzureAutomationRunbookByNameSuccessfull() + { + // Setup + string accountName = "automation"; + string runbookName = "runbook"; + + this.mockAutomationClient.Setup(f => f.DeleteRunbook(accountName, runbookName)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Name = runbookName; + this.cmdlet.Force = true; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.DeleteRunbook(accountName, runbookName), Times.Once()); + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationScheduleTest.cs b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationScheduleTest.cs new file mode 100644 index 000000000000..c33c4626ca81 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/RemoveAzureAutomationScheduleTest.cs @@ -0,0 +1,84 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.Azure.Commands.Automation.Cmdlet; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Moq; + +namespace Microsoft.Azure.Commands.Automation.Test.UnitTests +{ + [TestClass] + public class RemoveAzureAutomationScheduleTest : TestBase + { + private Mock mockAutomationClient; + + private MockCommandRuntime mockCommandRuntime; + + private RemoveAzureAutomationSchedule cmdlet; + + [TestInitialize] + public void SetupTest() + { + this.mockAutomationClient = new Mock(); + this.mockCommandRuntime = new MockCommandRuntime(); + this.cmdlet = new RemoveAzureAutomationSchedule + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; + } + + [TestMethod] + public void RemoveAzureAutomationScheduleByIdSuccessfull() + { + // Setup + string accountName = "automation"; + var scheduleId = new Guid(); + + this.mockAutomationClient.Setup(f => f.DeleteSchedule(accountName, scheduleId)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Id = scheduleId; + this.cmdlet.Force = true; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.DeleteSchedule(accountName, scheduleId), Times.Once()); + } + + [TestMethod] + public void RemoveAzureAutomationScheduleByNameSuccessfull() + { + // Setup + string accountName = "automation"; + string scheduleName = "schedule"; + + this.mockAutomationClient.Setup(f => f.DeleteSchedule(accountName, scheduleName)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Name = scheduleName; + this.cmdlet.Force = true; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.DeleteSchedule(accountName, scheduleName), Times.Once()); + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/ResumeAzureAutomationJobTest.cs b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/ResumeAzureAutomationJobTest.cs new file mode 100644 index 000000000000..b21bd66c857b --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/ResumeAzureAutomationJobTest.cs @@ -0,0 +1,64 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.Azure.Commands.Automation.Cmdlet; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Moq; + +namespace Microsoft.Azure.Commands.Automation.Test.UnitTests +{ + [TestClass] + public class ResumeAzureAutomationJobTest : TestBase + { + private Mock mockAutomationClient; + + private MockCommandRuntime mockCommandRuntime; + + private ResumeAzureAutomationJob cmdlet; + + [TestInitialize] + public void SetupTest() + { + this.mockAutomationClient = new Mock(); + this.mockCommandRuntime = new MockCommandRuntime(); + this.cmdlet = new ResumeAzureAutomationJob + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; + } + + [TestMethod] + public void ResumeAzureAutomationJobSuccessfull() + { + // Setup + string accountName = "automation"; + var jobId = new Guid(); + + this.mockAutomationClient.Setup(f => f.ResumeJob(accountName, jobId)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Id = jobId; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.ResumeJob(accountName, jobId), Times.Once()); + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/SetAzureAutomationRunbookDefinitionTest.cs b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/SetAzureAutomationRunbookDefinitionTest.cs new file mode 100644 index 000000000000..db89e13875cb --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/SetAzureAutomationRunbookDefinitionTest.cs @@ -0,0 +1,140 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.Azure.Commands.Automation.Cmdlet; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Moq; + +namespace Microsoft.Azure.Commands.Automation.Test.UnitTests +{ + [TestClass] + public class SetAzureAutomationRunbookDefinitionTest : TestBase + { + private Mock mockAutomationClient; + + private MockCommandRuntime mockCommandRuntime; + + private SetAzureAutomationRunbookDefinition cmdlet; + + [TestInitialize] + public void SetupTest() + { + this.mockAutomationClient = new Mock(); + this.mockCommandRuntime = new MockCommandRuntime(); + this.cmdlet = new SetAzureAutomationRunbookDefinition + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; + } + + [TestMethod] + public void SetAzureAutomationRunbookDefinitionByIdSuccessfull() + { + // Setup + string accountName = "automation"; + string runbookPath = "runbook.ps1"; + var runbookId = new Guid(); + + this.mockAutomationClient.Setup( + f => f.UpdateRunbookDefinition(accountName, runbookId, runbookPath, false)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Id = runbookId; + this.cmdlet.Path = runbookPath; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify( + f => f.UpdateRunbookDefinition(accountName, runbookId, runbookPath, false), + Times.Once()); + } + + [TestMethod] + public void SetAzureAutomationRunbookDefinitionByNameSuccessfull() + { + // Setup + string accountName = "automation"; + string runbookName = "runbook"; + string runbookPath = "runbook.ps1"; + + this.mockAutomationClient.Setup( + f => f.UpdateRunbookDefinition(accountName, runbookName, runbookPath, false)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Name = runbookName; + this.cmdlet.Path = runbookPath; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify( + f => f.UpdateRunbookDefinition(accountName, runbookName, runbookPath, false), + Times.Once()); + } + + [TestMethod] + public void SetAzureAutomationRunbookDefinitionByIdWithOverwriteSuccessfull() + { + // Setup + string accountName = "automation"; + string runbookPath = "runbook.ps1"; + var runbookId = new Guid(); + + this.mockAutomationClient.Setup( + f => f.UpdateRunbookDefinition(accountName, runbookId, runbookPath, true)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Id = runbookId; + this.cmdlet.Path = runbookPath; + this.cmdlet.Overwrite = true; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify( + f => f.UpdateRunbookDefinition(accountName, runbookId, runbookPath, true), + Times.Once()); + } + + [TestMethod] + public void SetAzureAutomationRunbookDefinitionByNameWithOverwriteSuccessfull() + { + // Setup + string accountName = "automation"; + string runbookName = "runbook"; + string runbookPath = "runbook.ps1"; + + this.mockAutomationClient.Setup( + f => f.UpdateRunbookDefinition(accountName, runbookName, runbookPath, true)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Name = runbookName; + this.cmdlet.Path = runbookPath; + this.cmdlet.Overwrite = true; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify( + f => f.UpdateRunbookDefinition(accountName, runbookName, runbookPath, true), + Times.Once()); + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/SetAzureAutomationRunbookTest.cs b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/SetAzureAutomationRunbookTest.cs new file mode 100644 index 000000000000..dd590ef060ba --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/SetAzureAutomationRunbookTest.cs @@ -0,0 +1,128 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.Azure.Commands.Automation.Cmdlet; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Moq; + +namespace Microsoft.Azure.Commands.Automation.Test.UnitTests +{ + [TestClass] + public class SetAzureAutomationRunbookTest : TestBase + { + private Mock mockAutomationClient; + + private MockCommandRuntime mockCommandRuntime; + + private SetAzureAutomationRunbook cmdlet; + + [TestInitialize] + public void SetupTest() + { + this.mockAutomationClient = new Mock(); + this.mockCommandRuntime = new MockCommandRuntime(); + this.cmdlet = new SetAzureAutomationRunbook + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; + } + + [TestMethod] + public void SetAzureAutomationRunbookByIdSuccessfull() + { + // Setup + string accountName = "automation"; + var runbookId = new Guid(); + + this.mockAutomationClient.Setup(f => f.UpdateRunbook(accountName, runbookId, null, null, null, null, null)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Id = runbookId; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.UpdateRunbook(accountName, runbookId, null, null, null, null, null), Times.Once()); + } + + [TestMethod] + public void SetAzureAutomationRunbookByNameSuccessfull() + { + // Setup + string accountName = "automation"; + string runbookName = "runbook"; + + this.mockAutomationClient.Setup(f => f.UpdateRunbook(accountName, runbookName, null, null, null, null, null)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Name = runbookName; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.UpdateRunbook(accountName, runbookName, null, null, null, null, null), Times.Once()); + } + + [TestMethod] + public void SetAzureAutomationRunbookByIdWithParametersSuccessfull() + { + // Setup + string accountName = "automation"; + string description = "desc"; + bool? logDebug = true; + bool? logVerbose = false; + var runbookId = new Guid(); + + this.mockAutomationClient.Setup(f => f.UpdateRunbook(accountName, runbookId, description, null, logDebug, null, logVerbose)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Id = runbookId; + this.cmdlet.Description = description; + this.cmdlet.LogDebug = logDebug; + this.cmdlet.LogVerbose = logVerbose; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.UpdateRunbook(accountName, runbookId, description, null, logDebug, null, logVerbose), Times.Once()); + } + + [TestMethod] + public void SetAzureAutomationRunbookByNameWithParametersSuccessfull() + { + // Setup + string accountName = "automation"; + string runbookName = "runbook"; + bool? logProgress = false; + var tags = new string[] { "tag1", "tag2" }; + + this.mockAutomationClient.Setup(f => f.UpdateRunbook(accountName, runbookName, null, tags, null, logProgress, null)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Name = runbookName; + this.cmdlet.Tags = tags; + this.cmdlet.LogProgress = logProgress; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.UpdateRunbook(accountName, runbookName, null, tags, null, logProgress, null), Times.Once()); + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/SetAzureAutomationScheduleTest.cs b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/SetAzureAutomationScheduleTest.cs new file mode 100644 index 000000000000..696073a7323c --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/SetAzureAutomationScheduleTest.cs @@ -0,0 +1,88 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.Azure.Commands.Automation.Cmdlet; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Moq; + +namespace Microsoft.Azure.Commands.Automation.Test.UnitTests +{ + [TestClass] + public class SetAzureAutomationScheduleTest : TestBase + { + private Mock mockAutomationClient; + + private MockCommandRuntime mockCommandRuntime; + + private SetAzureAutomationSchedule cmdlet; + + [TestInitialize] + public void SetupTest() + { + this.mockAutomationClient = new Mock(); + this.mockCommandRuntime = new MockCommandRuntime(); + this.cmdlet = new SetAzureAutomationSchedule + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; + } + + [TestMethod] + public void SetAzureAutomationScheduleByIdSuccessfull() + { + // Setup + string accountName = "automation"; + string description = "desc"; + bool? isEnabled = true; + var scheduleId = new Guid(); + + this.mockAutomationClient.Setup(f => f.UpdateSchedule(accountName, scheduleId, isEnabled, description)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Id = scheduleId; + this.cmdlet.IsEnabled = isEnabled; + this.cmdlet.Description = description; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.UpdateSchedule(accountName, scheduleId, isEnabled, description), Times.Once()); + } + + [TestMethod] + public void SetAzureAutomationScheduleByNameSuccessfull() + { + // Setup + string accountName = "automation"; + string scheduleName = "schedule"; + string description = "desc"; + + this.mockAutomationClient.Setup(f => f.UpdateSchedule(accountName, scheduleName, null, description)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Name = scheduleName; + this.cmdlet.Description = description; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.UpdateSchedule(accountName, scheduleName, null, description), Times.Once()); + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/StartAzureAutomationRunbookTest.cs b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/StartAzureAutomationRunbookTest.cs new file mode 100644 index 000000000000..00c01e7053eb --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/StartAzureAutomationRunbookTest.cs @@ -0,0 +1,82 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.Azure.Commands.Automation.Cmdlet; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Moq; + +namespace Microsoft.Azure.Commands.Automation.Test.UnitTests +{ + [TestClass] + public class StartAzureAutomationRunbookTest : TestBase + { + private Mock mockAutomationClient; + + private MockCommandRuntime mockCommandRuntime; + + private StartAzureAutomationRunbook cmdlet; + + [TestInitialize] + public void SetupTest() + { + this.mockAutomationClient = new Mock(); + this.mockCommandRuntime = new MockCommandRuntime(); + this.cmdlet = new StartAzureAutomationRunbook + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; + } + + [TestMethod] + public void StartAzureAutomationRunbookByIdSuccessfull() + { + // Setup + string accountName = "automation"; + var runbookId = new Guid(); + + this.mockAutomationClient.Setup(f => f.StartRunbook(accountName, runbookId, null)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Id = runbookId; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.StartRunbook(accountName, runbookId, null), Times.Once()); + } + + [TestMethod] + public void StartAzureAutomationRunbookByNameSuccessfull() + { + // Setup + string accountName = "automation"; + string runbookName = "runbook"; + + this.mockAutomationClient.Setup(f => f.StartRunbook(accountName, runbookName, null)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Name = runbookName; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.StartRunbook(accountName, runbookName, null), Times.Once()); + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/StopAzureAutomationJobTest.cs b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/StopAzureAutomationJobTest.cs new file mode 100644 index 000000000000..5492f685f417 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/StopAzureAutomationJobTest.cs @@ -0,0 +1,64 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.Azure.Commands.Automation.Cmdlet; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Moq; + +namespace Microsoft.Azure.Commands.Automation.Test.UnitTests +{ + [TestClass] + public class StopAzureAutomationJobTest : TestBase + { + private Mock mockAutomationClient; + + private MockCommandRuntime mockCommandRuntime; + + private StopAzureAutomationJob cmdlet; + + [TestInitialize] + public void SetupTest() + { + this.mockAutomationClient = new Mock(); + this.mockCommandRuntime = new MockCommandRuntime(); + this.cmdlet = new StopAzureAutomationJob + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; + } + + [TestMethod] + public void StopAzureAutomationJobSuccessfull() + { + // Setup + string accountName = "automation"; + var jobId = new Guid(); + + this.mockAutomationClient.Setup(f => f.StopJob(accountName, jobId)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Id = jobId; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.StopJob(accountName, jobId), Times.Once()); + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/SuspendAzureAutomationJobTest.cs b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/SuspendAzureAutomationJobTest.cs new file mode 100644 index 000000000000..b4da25134da0 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation.Test/UnitTests/SuspendAzureAutomationJobTest.cs @@ -0,0 +1,64 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.Azure.Commands.Automation.Cmdlet; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Moq; + +namespace Microsoft.Azure.Commands.Automation.Test.UnitTests +{ + [TestClass] + public class SuspendAzureAutomationJobTest : TestBase + { + private Mock mockAutomationClient; + + private MockCommandRuntime mockCommandRuntime; + + private SuspendAzureAutomationJob cmdlet; + + [TestInitialize] + public void SetupTest() + { + this.mockAutomationClient = new Mock(); + this.mockCommandRuntime = new MockCommandRuntime(); + this.cmdlet = new SuspendAzureAutomationJob + { + AutomationClient = this.mockAutomationClient.Object, + CommandRuntime = this.mockCommandRuntime + }; + } + + [TestMethod] + public void SuspendAzureAutomationJobSuccessfull() + { + // Setup + string accountName = "automation"; + var jobId = new Guid(); + + this.mockAutomationClient.Setup(f => f.SuspendJob(accountName, jobId)); + + // Test + this.cmdlet.AutomationAccountName = accountName; + this.cmdlet.Id = jobId; + this.cmdlet.ExecuteCmdlet(); + + // Assert + this.mockAutomationClient.Verify(f => f.SuspendJob(accountName, jobId), Times.Once()); + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation.Test/packages.config b/src/ServiceManagement/Automation/Commands.Automation.Test/packages.config new file mode 100644 index 000000000000..61f07aca05c3 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation.Test/packages.config @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/AzureAutomationBaseCmdlet.cs b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/AzureAutomationBaseCmdlet.cs new file mode 100644 index 000000000000..dae2c24f9c99 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/AzureAutomationBaseCmdlet.cs @@ -0,0 +1,123 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.IO; +using System.Management.Automation; +using System.Net; +using System.Runtime.Serialization.Json; +using System.Text; +using System.Xml.Linq; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.DataContract; +using Microsoft.Azure.Commands.Automation.Properties; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.Azure.Commands.Automation.Cmdlet +{ + /// + /// The azure automation base cmdlet. + /// + public abstract class AzureAutomationBaseCmdlet : AzurePSCmdlet + { + /// + /// The automation client. + /// + private IAutomationClient automationClient; + + /// + /// Gets or sets the automation client base. + /// + public IAutomationClient AutomationClient + { + get + { + return this.automationClient = this.automationClient ?? new AutomationClient(CurrentContext.Subscription); + } + + set + { + this.automationClient = value; + } + } + + /// + /// Gets or sets the automation account name. + /// + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The automation account name.")] + public string AutomationAccountName { get; set; } + + protected virtual void AutomationExecuteCmdlet() + { + // Do nothing. + } + + public override void ExecuteCmdlet() + { + try + { + Requires.Argument("AutomationAccountName", this.AutomationAccountName).ValidAutomationAccountName(); + this.AutomationExecuteCmdlet(); + } + catch (CloudException cloudException) + { + if (string.IsNullOrEmpty(cloudException.ErrorCode) && string.IsNullOrEmpty(cloudException.ErrorMessage)) + { + string message = this.ParseErrorMessage(cloudException.Response.Content); + if (!string.IsNullOrEmpty(message)) + { + throw new CloudException(message, cloudException); + } + } + + if (cloudException.Response.StatusCode == HttpStatusCode.NotFound) + { + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Resources.AutomationAccountNotFound), cloudException); + } + + throw; + } + } + + private string ParseErrorMessage(string errorMessage) + { + // The errorMessage is expected to be the error details in JSON format. + // e.g. + // {"odata.error":{"code":"","message":{"lang":"en-US","value":"Runbook definition is invalid. Missing closing '}' in statement block."}}} + // + try + { + using (var memoryStream = new MemoryStream(Encoding.UTF8.GetBytes(XDocument.Load(new StringReader(errorMessage)).Root.Value))) + { + var serializer = new DataContractJsonSerializer(typeof(ErrorResponse)); + var errorResponse = (ErrorResponse)serializer.ReadObject(memoryStream); + + if (!string.IsNullOrWhiteSpace(errorResponse.OdataError.Message.Value)) + { + return errorResponse.OdataError.Message.Value; + } + } + } + catch (Exception) + { + // swallow the exception as we cannot parse the error message + } + + return null; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/GetAzureAutomationAccount.cs b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/GetAzureAutomationAccount.cs new file mode 100644 index 000000000000..7a2685c0b7e5 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/GetAzureAutomationAccount.cs @@ -0,0 +1,76 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.Azure.Commands.Automation.Cmdlet +{ + /// + /// Gets azure automation accounts, filterd by automation account name and location. + /// + [Cmdlet(VerbsCommon.Get, "AzureAutomationAccount")] + [OutputType(typeof(AutomationAccount))] + public class GetAzureAutomationAccount : AzurePSCmdlet + { + /// + /// The automation client. + /// + private IAutomationClient automationClient; + + /// + /// Gets or sets the automation client base. + /// + public IAutomationClient AutomationClient + { + get + { + return this.automationClient = this.automationClient ?? new AutomationClient(CurrentContext.Subscription); + } + + set + { + this.automationClient = value; + } + } + + /// + /// Gets or sets the automation account name. + /// + [Parameter(Position = 0, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The automation account name.")] + public string Name { get; set; } + + /// + /// Gets or sets the location. + /// + [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The geo region of the automation account")] + public string Location { get; set; } + + /// + /// Execute this cmdlet. + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + IEnumerable accounts = this.AutomationClient.ListAutomationAccounts(this.Name, this.Location); + this.WriteObject(accounts, true); + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/GetAzureAutomationJob.cs b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/GetAzureAutomationJob.cs new file mode 100644 index 000000000000..a8c0fdfb8a55 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/GetAzureAutomationJob.cs @@ -0,0 +1,117 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using System.Security.Permissions; +using Job = Microsoft.Azure.Commands.Automation.Model.Job; + +namespace Microsoft.Azure.Commands.Automation.Cmdlet +{ + /// + /// Gets azure automation jobs for a given account, filtered by one of multiple criteria. + /// + [Cmdlet(VerbsCommon.Get, "AzureAutomationJob", DefaultParameterSetName = ByAll)] + [OutputType(typeof(Job))] + public class GetAzureAutomationJob : AzureAutomationBaseCmdlet + { + /// + /// The get job by job id parameter set. + /// + private const string ByJobId = "ByJobId"; + + /// + /// The get job by runbook id parameter set. + /// + private const string ByRunbookId = "ByRunbookId"; + + /// + /// The get job by runbook name parameter set. + /// + private const string ByRunbookName = "ByRunbookName"; + + /// + /// The get all parameter set. + /// + private const string ByAll = "ByAll"; + + /// + /// Gets or sets the job id. + /// + [Parameter(ParameterSetName = ByJobId, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The job id.")] + [Alias("JobId")] + public Guid? Id { get; set; } + + /// + /// Gets or sets the runbook id of the job. + /// + [Parameter(ParameterSetName = ByRunbookId, Mandatory = true, HelpMessage = "The runbook id of the job.")] + public Guid? RunbookId { get; set; } + + /// + /// Gets or sets the runbook name of the job. + /// + [Parameter(ParameterSetName = ByRunbookName, Mandatory = true, HelpMessage = "The runbook name of the job.")] + public string RunbookName { get; set; } + + /// + /// Gets or sets the start time filter. + /// + [Parameter(ParameterSetName = ByRunbookId, Mandatory = false, HelpMessage = "Filter jobs so that job start time >= StartTime.")] + [Parameter(ParameterSetName = ByRunbookName, Mandatory = false, HelpMessage = "Filter jobs so that job start time >= StartTime.")] + [Parameter(ParameterSetName = ByAll, Mandatory = false, HelpMessage = "Filter jobs so that job start time >= StartTime.")] + public DateTime? StartTime { get; set; } + + /// + /// Gets or sets the end time filter. + /// + [Parameter(ParameterSetName = ByRunbookId, Mandatory = false, HelpMessage = "Filter jobs so that job end time <= EndTime.")] + [Parameter(ParameterSetName = ByRunbookName, Mandatory = false, HelpMessage = "Filter jobs so that job end time <= EndTime.")] + [Parameter(ParameterSetName = ByAll, Mandatory = false, HelpMessage = "Filter jobs so that job end time <= EndTime.")] + public DateTime? EndTime { get; set; } + + /// + /// Execute this cmdlet. + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + protected override void AutomationExecuteCmdlet() + { + IEnumerable jobs; + + if (this.Id.HasValue) + { + // ByJobId + jobs = new List { this.AutomationClient.GetJob(this.AutomationAccountName, this.Id.Value) }; + } + else if (this.RunbookId.HasValue) + { + // ByRunbookId + jobs = this.AutomationClient.ListJobsByRunbookId(this.AutomationAccountName, this.RunbookId.Value, this.StartTime, this.EndTime); + } + else if (this.RunbookName != null) + { + // ByRunbookName + jobs = this.AutomationClient.ListJobsByRunbookName(this.AutomationAccountName, this.RunbookName, this.StartTime, this.EndTime); + } + else + { + // ByAll + jobs = this.AutomationClient.ListJobs(this.AutomationAccountName, this.StartTime, this.EndTime); + } + + this.WriteObject(jobs, true); + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/GetAzureAutomationJobOutput.cs b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/GetAzureAutomationJobOutput.cs new file mode 100644 index 000000000000..0d474beefa30 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/GetAzureAutomationJobOutput.cs @@ -0,0 +1,81 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; + +namespace Microsoft.Azure.Commands.Automation.Cmdlet +{ + /// + /// Gets azure automation job output streams for a given account and a given job. + /// + [Cmdlet(VerbsCommon.Get, "AzureAutomationJobOutput")] + [OutputType(typeof(JobStreamItem))] + public class GetAzureAutomationJobOutput : AzureAutomationBaseCmdlet + { + /// + /// Gets or sets the job id. + /// + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The job id.")] + [Alias("JobId")] + public Guid Id { get; set; } + + /// + /// Gets or sets the job start time. + /// + [Parameter(Position = 2, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The time from which job output streams should be retrieved.")] + public DateTime StartTime { get; set; } + + /// + /// Gets or sets the output type. + /// + [Parameter(Mandatory = true)] + [ValidateSet(Constants.JobOutputParameter.Any, Constants.JobOutputParameter.Progress, Constants.JobOutputParameter.Output, Constants.JobOutputParameter.Warning, Constants.JobOutputParameter.Error, Constants.JobOutputParameter.Debug, Constants.JobOutputParameter.Verbose, IgnoreCase = true)] + [Alias("OutputType")] + public string Stream { get; set; } + + /// + /// Execute this cmdlet. + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + protected override void AutomationExecuteCmdlet() + { + // Assume local time if DateTimeKind.Unspecified + if (this.StartTime.Kind == DateTimeKind.Unspecified) + { + this.StartTime = DateTime.SpecifyKind(this.StartTime, DateTimeKind.Local); + } + + var streamTypeNames = new string[] + { + Constants.JobOutputParameter.Progress, Constants.JobOutputParameter.Output, + Constants.JobOutputParameter.Warning, Constants.JobOutputParameter.Error, + Constants.JobOutputParameter.Debug, Constants.JobOutputParameter.Verbose + }; + string streamTypeName = + streamTypeNames.FirstOrDefault( + name => string.Equals(this.Stream, name, StringComparison.OrdinalIgnoreCase)); + IEnumerable streamItems = this.AutomationClient.ListJobStreamItems( + this.AutomationAccountName, this.Id, this.StartTime, streamTypeName); + this.WriteObject(streamItems, true); + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/GetAzureAutomationRunbook.cs b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/GetAzureAutomationRunbook.cs new file mode 100644 index 000000000000..79dd6f9160d7 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/GetAzureAutomationRunbook.cs @@ -0,0 +1,106 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.Azure.Commands.Automation.Model; + +namespace Microsoft.Azure.Commands.Automation.Cmdlet +{ + /// + /// Gets azure automation runbooks for a given account. + /// + [Cmdlet(VerbsCommon.Get, "AzureAutomationRunbook", DefaultParameterSetName = ByAll)] + [OutputType(typeof(Runbook))] + public class GetAzureAutomationRunbook : AzureAutomationBaseCmdlet + { + /// + /// The get runbook by runbook id parameter set. + /// + private const string ByRunbookId = "ByRunbookId"; + + /// + /// The get runbook by runbook name parameter set. + /// + private const string ByRunbookName = "ByRunbookName"; + + /// + /// The get runbook by schedule name parameter set. + /// + private const string ByScheduleName = "ByScheduleName"; + + /// + /// The get all parameter set. + /// + private const string ByAll = "ByAll"; + + /// + /// Gets or sets the runbook Id + /// + [Parameter(ParameterSetName = ByRunbookId, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The runbook id.")] + [Alias("RunbookId")] + public Guid? Id { get; set; } + + /// + /// Gets or sets the runbook name + /// + [Parameter(ParameterSetName = ByRunbookName, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The runbook name.")] + [Alias("RunbookName")] + public string Name { get; set; } + + /// + /// Gets or sets the runbook name + /// + [Parameter(ParameterSetName = ByScheduleName, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The schedule name.")] + public string ScheduleName { get; set; } + + /// + /// Execute this cmdlet. + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + protected override void AutomationExecuteCmdlet() + { + IEnumerable runbooks; + if (this.Id.HasValue) + { + // ByRunbookId + runbooks = new List + { + this.AutomationClient.GetRunbook( + this.AutomationAccountName, this.Id.Value) + }; + } + else if (this.Name != null) + { + // ByRunbookName + runbooks = new List { this.AutomationClient.GetRunbook(this.AutomationAccountName, this.Name) }; + } + else if (this.ScheduleName != null) + { + // ByScheduleName + runbooks = this.AutomationClient.ListRunbookByScheduleName( + this.AutomationAccountName, this.ScheduleName); + } + else + { + // ByAll + runbooks = this.AutomationClient.ListRunbooks(this.AutomationAccountName); + } + + this.WriteObject(runbooks, true); + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/GetAzureAutomationRunbookDefinition.cs b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/GetAzureAutomationRunbookDefinition.cs new file mode 100644 index 000000000000..80022897c454 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/GetAzureAutomationRunbookDefinition.cs @@ -0,0 +1,133 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.Azure.Commands.Automation.Model; + +namespace Microsoft.Azure.Commands.Automation.Cmdlet +{ + /// + /// Gets azure automation runbook definitions for a given account. + /// + [Cmdlet(VerbsCommon.Get, "AzureAutomationRunbookDefinition", DefaultParameterSetName = ByRunbookName)] + [OutputType(typeof(RunbookDefinition))] + public class GetAzureAutomationRunbookDefinition : AzureAutomationBaseCmdlet + { + /// + /// The get runbook defintion by runbook id parameter set. + /// + private const string ByRunbookId = "ByRunbookId"; + + /// + /// The get runbook defintion by runbook name parameter set. + /// + private const string ByRunbookName = "ByRunbookName"; + + /// + /// The get runbook defintion by runbook version id parameter set. + /// + private const string ByVersionId = "ByVersionId"; + + /// + /// The published slot. + /// + private const string Published = "Published"; + + /// + /// The draft slot. + /// + private const string Draft = "Draft"; + + /// + /// Gets or sets the runbook id + /// + [Parameter(ParameterSetName = ByRunbookId, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The runbook id.")] + [Alias("RunbookId")] + public Guid? Id { get; set; } + + /// + /// Gets or sets the runbook name + /// + [Parameter(ParameterSetName = ByRunbookName, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The runbook name.")] + [Alias("RunbookName")] + public string Name { get; set; } + + /// + /// Gets or sets the runbook version id + /// + [Parameter(ParameterSetName = ByVersionId, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The runbook version id.")] + public Guid? VersionId { get; set; } + + /// + /// Gets or sets the runbook version type + /// + [Parameter(Mandatory = false, HelpMessage = "Returns the draft or the published runbook version only. If not set, return both.")] + [ValidateSet(Published, Draft)] + public string Slot { get; set; } + + /// + /// Execute this cmdlet. + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + protected override void AutomationExecuteCmdlet() + { + bool? isDraft = this.IsDraft(); + + IEnumerable runbookDefinitions = null; + if (this.Id.HasValue) + { + // ByRunbookId + runbookDefinitions = this.AutomationClient.ListRunbookDefinitionsByRunbookId( + this.AutomationAccountName, this.Id.Value, isDraft); + } + else if (this.Name != null) + { + // ByRunbookName + runbookDefinitions = + this.AutomationClient.ListRunbookDefinitionsByRunbookName( + this.AutomationAccountName, this.Name, isDraft); + } + else if (this.VersionId.HasValue) + { + // ByVersionId + runbookDefinitions = + this.AutomationClient.ListRunbookDefinitionsByRunbookVersionId( + this.AutomationAccountName, this.VersionId.Value, isDraft); + } + + this.WriteObject(runbookDefinitions, true); + } + + /// + /// Returns null if Slot is not provided; otherwise returns true if Slot is Draft. + /// + /// + /// The . + /// + private bool? IsDraft() + { + bool? isDraft = null; + + if (this.Slot != null) + { + isDraft = this.Slot == Draft; + } + + return isDraft; + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/GetAzureAutomationSchedule.cs b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/GetAzureAutomationSchedule.cs new file mode 100644 index 000000000000..7a554e9f6efe --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/GetAzureAutomationSchedule.cs @@ -0,0 +1,126 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.Azure.Commands.Automation.Model; + +namespace Microsoft.Azure.Commands.Automation.Cmdlet +{ + /// + /// Gets azure automation schedules for a given account. + /// + [Cmdlet(VerbsCommon.Get, "AzureAutomationSchedule", DefaultParameterSetName = ByAll)] + [OutputType(typeof(Schedule))] + public class GetAzureAutomationSchedule : AzureAutomationBaseCmdlet + { + /// + /// The get schedule by schedule id parameter set. + /// + private const string ByScheduleId = "ByScheduleId"; + + /// + /// The get schedule by schedule name parameter set. + /// + private const string ByScheduleName = "ByScheduleName"; + + /// + /// The get all parameter set. + /// + private const string ByAll = "ByAll"; + + /// + /// Gets or sets the schedule id. + /// + [Parameter(ParameterSetName = ByScheduleId, Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The schedule id.")] + public Guid? Id { get; set; } + + /// + /// Gets or sets the schedule name. + /// + [Parameter(ParameterSetName = ByScheduleName, Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The schedule name.")] + public string Name { get; set; } + + /// + /// Execute this cmdlet. + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + protected override void AutomationExecuteCmdlet() + { + IEnumerable schedules; + if (this.Id.HasValue) + { + // ByScheduleId + schedules = new List + { + this.AutomationClient.GetSchedule( + this.AutomationAccountName, this.Id.Value) + }; + + } + else if (this.Name != null) + { + // ByScheduleName + schedules = new List + { + this.AutomationClient.GetSchedule( + this.AutomationAccountName, this.Name) + }; + } + else + { + // ByAll + schedules = this.AutomationClient.ListSchedules(this.AutomationAccountName); + } + + this.WriteSchedule(schedules); + } + + /// + /// Writes a OneTimeSchedule, DailySchedule or HourlySchedule to the pipeline. + /// + /// + /// The schedules. + /// + private void WriteSchedule(IEnumerable schedules) + { + foreach (var schedule in schedules) + { + var dailySchedule = schedule as DailySchedule; + if (dailySchedule != null) + { + this.WriteObject(dailySchedule); + continue; + } + + var hourlySchedule = schedule as HourlySchedule; + if (hourlySchedule != null) + { + this.WriteObject(hourlySchedule); + continue; + } + + var oneTimeSchedule = schedule as OneTimeSchedule; + if (oneTimeSchedule != null) + { + this.WriteObject(oneTimeSchedule); + } + } + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/NewAzureAutomationRunbook.cs b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/NewAzureAutomationRunbook.cs new file mode 100644 index 000000000000..d9956d09e70b --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/NewAzureAutomationRunbook.cs @@ -0,0 +1,91 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.Azure.Commands.Automation.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.Azure.Commands.Automation.Cmdlet +{ + /// + /// Creates an azure automation runbook. + /// + [Cmdlet(VerbsCommon.New, "AzureAutomationRunbook", DefaultParameterSetName = ByRunbookName)] + [OutputType(typeof(Runbook))] + public class NewAzureAutomationRunbook : AzureAutomationBaseCmdlet + { + /// + /// The create runbook by runbook path parameter set. + /// + private const string ByRunbookPath = "ByRunbookPath"; + + /// + /// The create runbook by runbook name parameter set. + /// + private const string ByRunbookName = "ByRunbookName"; + + /// + /// Gets or sets the runbook name + /// + [Parameter(ParameterSetName = ByRunbookName, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The runbook name.")] + [Alias("RunbookName")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + /// + /// Gets or sets the path of the runbook script + /// + [Parameter(ParameterSetName = ByRunbookPath, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The runbook file path.")] + [Alias("RunbookPath")] + [ValidateNotNullOrEmpty] + public string Path { get; set; } + + /// + /// Gets or sets the runbook description + /// + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The runbook description.")] + public string Description { get; set; } + + /// + /// Gets or sets the runbook tags. + /// + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The runbook tags.")] + public string[] Tags { get; set; } + + /// + /// Execute this cmdlet. + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + protected override void AutomationExecuteCmdlet() + { + Runbook runbook; + + if (this.Path != null) + { + // ByRunbookPath + runbook = this.AutomationClient.CreateRunbookByPath( + this.AutomationAccountName, this.ResolvePath(this.Path), this.Description, this.Tags); + } + else + { + // ByRunbookName + runbook = this.AutomationClient.CreateRunbookByName( + this.AutomationAccountName, this.Name, this.Description, this.Tags); + } + + this.WriteObject(runbook); + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/NewAzureAutomationSchedule.cs b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/NewAzureAutomationSchedule.cs new file mode 100644 index 000000000000..8d65beb468ff --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/NewAzureAutomationSchedule.cs @@ -0,0 +1,165 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Model; + +namespace Microsoft.Azure.Commands.Automation.Cmdlet +{ + /// + /// Creates an azure automation Schedule. + /// + [Cmdlet(VerbsCommon.New, "AzureAutomationSchedule", DefaultParameterSetName = ByDaily)] + [OutputType(typeof(Schedule))] + public class NewAzureAutomationSchedule : AzureAutomationBaseCmdlet + { + /// + /// The one time schedule parameter set. + /// + private const string ByOneTime = "ByOneTime"; + + /// + /// The daily schedule parameter set. + /// + private const string ByDaily = "ByDaily"; + + /// + /// The hourly schedule parameter set. + /// + private const string ByHourly = "ByHourly"; + + /// + /// Initializes a new instance of the class. + /// + public NewAzureAutomationSchedule() + { + this.ExpiryTime = Constants.DefaultScheduleExpiryTime; + } + + /// + /// Gets or sets the schedule name. + /// + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The schedule name.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + /// + /// Gets or sets the schedule start time. + /// + [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The schedule start time.")] + [ValidateNotNull] + public DateTime StartTime { get; set; } + + /// + /// Gets or sets the schedule description. + /// + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The schedule description.")] + public string Description { get; set; } + + /// + /// Gets or sets the switch parameter to create a one time schedule. + /// + [Parameter(ParameterSetName = ByOneTime, Mandatory = true, HelpMessage = "To create a one time schedule.")] + public SwitchParameter OneTime { get; set; } + + /// + /// Gets or sets the schedule expiry time. + /// + [Parameter(ParameterSetName = ByDaily, Mandatory = false, HelpMessage = "The schedule expiry time.")] + [Parameter(ParameterSetName = ByHourly, Mandatory = false, HelpMessage = "The schedule expiry time.")] + public DateTime ExpiryTime { get; set; } + + /// + /// Gets or sets the daily schedule day interval. + /// + [Parameter(ParameterSetName = ByDaily, Mandatory = true, HelpMessage = "The daily schedule day interval.")] + [ValidateRange(1, int.MaxValue)] + public int DayInterval { get; set; } + + /// + /// Gets or sets the hourly schedule hour interval. + /// + [Parameter(ParameterSetName = ByHourly, Mandatory = true, HelpMessage = "The hourly schedule hour interval.")] + [ValidateRange(1, int.MaxValue)] + public int HourInterval { get; set; } + + /// + /// Execute this cmdlet. + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + protected override void AutomationExecuteCmdlet() + { + // Assume local time if DateTimeKind.Unspecified + if (this.StartTime.Kind == DateTimeKind.Unspecified) + { + this.StartTime = DateTime.SpecifyKind(this.StartTime, DateTimeKind.Local); + } + + if (this.ExpiryTime.Kind == DateTimeKind.Unspecified) + { + this.ExpiryTime = DateTime.SpecifyKind(this.ExpiryTime, DateTimeKind.Local); + } + + if (this.OneTime.IsPresent) + { + // ByOneTime + var oneTimeSchedule = new OneTimeSchedule + { + Name = this.Name, + StartTime = this.StartTime, + Description = this.Description, + ExpiryTime = this.ExpiryTime + }; + + Schedule schedule = this.AutomationClient.CreateSchedule(this.AutomationAccountName, oneTimeSchedule); + this.WriteObject(schedule); + } + else if (this.DayInterval >= 1) + { + // ByDaily + var dailySchedule = new DailySchedule + { + Name = this.Name, + StartTime = this.StartTime, + DayInterval = this.DayInterval, + Description = this.Description, + ExpiryTime = this.ExpiryTime + }; + + Schedule schedule = this.AutomationClient.CreateSchedule(this.AutomationAccountName, dailySchedule); + this.WriteObject(schedule); + } + else if (this.HourInterval >= 1) + { + // ByHourly + var hourlySchedule = new HourlySchedule + { + Name = this.Name, + StartTime = this.StartTime, + HourInterval = this.HourInterval, + Description = this.Description, + ExpiryTime = this.ExpiryTime + }; + + Schedule schedule = this.AutomationClient.CreateSchedule(this.AutomationAccountName, hourlySchedule); + this.WriteObject(schedule); + } + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/PublishAzureAutomationRunbook.cs b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/PublishAzureAutomationRunbook.cs new file mode 100644 index 000000000000..571f446db445 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/PublishAzureAutomationRunbook.cs @@ -0,0 +1,74 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.Azure.Commands.Automation.Model; + +namespace Microsoft.Azure.Commands.Automation.Cmdlet +{ + /// + /// Publishes an azure automation runbook. + /// + [Cmdlet(VerbsData.Publish, "AzureAutomationRunbook", DefaultParameterSetName = ByRunbookName)] + [OutputType(typeof(Runbook))] + public class PublishAzureAutomationRunbook : AzureAutomationBaseCmdlet + { + /// + /// The publish runbook by runbook id parameter set. + /// + private const string ByRunbookId = "ByRunbookId"; + + /// + /// The publish runbook by runbook name parameter set. + /// + private const string ByRunbookName = "ByRunbookName"; + + /// + /// Gets or sets the runbook id + /// + [Parameter(ParameterSetName = ByRunbookId, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The runbook id.")] + [Alias("RunbookId")] + public Guid? Id { get; set; } + + /// + /// Gets or sets the runbook name + /// + [Parameter(ParameterSetName = ByRunbookName, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The runbook name.")] + [ValidateNotNullOrEmpty] + [Alias("RunbookName")] + public string Name { get; set; } + + /// + /// Execute this cmdlet. + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + protected override void AutomationExecuteCmdlet() + { + Runbook runbook; + + if (this.Id.HasValue) + { + runbook = this.AutomationClient.PublishRunbook(this.AutomationAccountName, this.Id.Value); + } + else + { + runbook = this.AutomationClient.PublishRunbook(this.AutomationAccountName, this.Name); + } + + this.WriteObject(runbook); + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/RegisterAzureAutomationScheduledRunbook.cs b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/RegisterAzureAutomationScheduledRunbook.cs new file mode 100644 index 000000000000..dd8e7e4a30b0 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/RegisterAzureAutomationScheduledRunbook.cs @@ -0,0 +1,58 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.Azure.Commands.Automation.Model; + +namespace Microsoft.Azure.Commands.Automation.Cmdlet +{ + /// + /// Registers an azure automation scheduled runbook. + /// + [Cmdlet(VerbsLifecycle.Register, "AzureAutomationScheduledRunbook", DefaultParameterSetName = ByRunbookName)] + [OutputType(typeof(Runbook))] + public class RegisterAzureAutomationScheduledRunbook : StartAzureAutomationRunbookBase + { + /// + /// Gets or sets the schedule that will be used to start the runbook. + /// + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The name of the schedule on which the runbook will be started.")] + [ValidateNotNullOrEmpty] + public string ScheduleName { get; set; } + + /// + /// Execute this cmdlet. + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + protected override void AutomationExecuteCmdlet() + { + Runbook runbook; + + if (this.Id.HasValue) + { + runbook = this.AutomationClient.RegisterScheduledRunbook( + this.AutomationAccountName, this.Id.Value, this.Parameters, this.ScheduleName); + } + else + { + runbook = this.AutomationClient.RegisterScheduledRunbook( + this.AutomationAccountName, this.Name, this.Parameters, this.ScheduleName); + } + + this.WriteObject(runbook); + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationRunbook.cs b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationRunbook.cs new file mode 100644 index 000000000000..c63f8ef1b0db --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationRunbook.cs @@ -0,0 +1,86 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.Azure.Commands.Automation.Properties; + +namespace Microsoft.Azure.Commands.Automation.Cmdlet +{ + /// + /// Removes an azure automation runbook. + /// + [Cmdlet(VerbsCommon.Remove, "AzureAutomationRunbook", SupportsShouldProcess = true, DefaultParameterSetName = ByRunbookName)] + public class RemoveAzureAutomationRunbook : AzureAutomationBaseCmdlet + { + /// + /// The remove runbook by runbook id parameter set. + /// + private const string ByRunbookId = "ByRunbookId"; + + /// + /// The remove runbook by runbook name parameter set. + /// + private const string ByRunbookName = "ByRunbookName"; + + /// + /// Gets or sets the runbook id + /// + [Parameter(ParameterSetName = ByRunbookId, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The runbook id.")] + [Alias("RunbookId")] + public Guid? Id { get; set; } + + /// + /// Gets or sets the runbook name + /// + [Parameter(ParameterSetName = ByRunbookName, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The runbook name.")] + [Alias("RunbookName")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + /// + /// Gets or sets the switch parameter not to confirm on removing the runbook. + /// + [Parameter(Mandatory = false, HelpMessage = "Do not confirm on removing the runbook.")] + public SwitchParameter Force { get; set; } + + /// + /// Execute this cmdlet. + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + protected override void AutomationExecuteCmdlet() + { + this.ConfirmAction( + this.Force.IsPresent, + string.Format(CultureInfo.CurrentCulture, Resources.RemoveAzureAutomationRunbookWarning), + string.Format(CultureInfo.CurrentCulture, Resources.RemoveAzureAutomationRunbookDescription), + this.Id.HasValue ? this.Id.Value.ToString() : this.Name, + () => + { + if (this.Id.HasValue) + { + // ByRunbookId + this.AutomationClient.DeleteRunbook(this.AutomationAccountName, this.Id.Value); + } + else + { + // ByRunbookName + this.AutomationClient.DeleteRunbook(this.AutomationAccountName, this.Name); + } + }); + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationSchedule.cs b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationSchedule.cs new file mode 100644 index 000000000000..4f7f1d140875 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/RemoveAzureAutomationSchedule.cs @@ -0,0 +1,85 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.Azure.Commands.Automation.Properties; + +namespace Microsoft.Azure.Commands.Automation.Cmdlet +{ + /// + /// Removes an azure automation Schedule. + /// + [Cmdlet(VerbsCommon.Remove, "AzureAutomationSchedule", SupportsShouldProcess = true, DefaultParameterSetName = ByScheduleName)] + public class RemoveAzureAutomationSchedule : AzureAutomationBaseCmdlet + { + /// + /// The get schedule by schedule id parameter set. + /// + private const string ByScheduleId = "ByScheduleId"; + + /// + /// The get schedule by schedule name parameter set. + /// + private const string ByScheduleName = "ByScheduleName"; + + /// + /// Gets or sets the schedule id. + /// + [Parameter(ParameterSetName = ByScheduleId, Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The schedule id.")] + public Guid? Id { get; set; } + + /// + /// Gets or sets the schedule name. + /// + [Parameter(ParameterSetName = ByScheduleName, Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The schedule name.")] + public string Name { get; set; } + + /// + /// Gets or sets the switch parameter not to confirm on removing the schedule. + /// + [Parameter(Mandatory = false, HelpMessage = "Do not confirm on removing the schedule.")] + public SwitchParameter Force { get; set; } + + /// + /// Execute this cmdlet. + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + protected override void AutomationExecuteCmdlet() + { + this.ConfirmAction( + this.Force.IsPresent, + string.Format(CultureInfo.CurrentCulture, Resources.RemoveAzureAutomationScheduleWarning), + string.Format(CultureInfo.CurrentCulture, Resources.RemoveAzureAutomationScheduleDescription), + this.Id.HasValue ? this.Id.Value.ToString() : this.Name, + () => + { + if (this.Id.HasValue) + { + // ByScheduleId + this.AutomationClient.DeleteSchedule(this.AutomationAccountName, this.Id.Value); + } + else + { + // ByScheduleName + this.AutomationClient.DeleteSchedule(this.AutomationAccountName, this.Name); + } + }); + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/ResumeAzureAutomationJob.cs b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/ResumeAzureAutomationJob.cs new file mode 100644 index 000000000000..6394deee3264 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/ResumeAzureAutomationJob.cs @@ -0,0 +1,44 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Security.Permissions; + +namespace Microsoft.Azure.Commands.Automation.Cmdlet +{ + /// + /// Resumes an azure automation job. + /// + [Cmdlet(VerbsLifecycle.Resume, "AzureAutomationJob")] + public class ResumeAzureAutomationJob : AzureAutomationBaseCmdlet + { + /// + /// Gets or sets the job id. + /// + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The job id.")] + [Alias("JobId")] + public Guid Id { get; set; } + + /// + /// Execute this cmdlet. + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + protected override void AutomationExecuteCmdlet() + { + this.AutomationClient.ResumeJob(this.AutomationAccountName, this.Id); + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/SetAzureAutomationRunbook.cs b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/SetAzureAutomationRunbook.cs new file mode 100644 index 000000000000..78291e27ccf5 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/SetAzureAutomationRunbook.cs @@ -0,0 +1,124 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.Azure.Commands.Automation.Model; + +namespace Microsoft.Azure.Commands.Automation.Cmdlet +{ + /// + /// Sets an azure automation runbook's configuration values. + /// + [Cmdlet(VerbsCommon.Set, "AzureAutomationRunbook", DefaultParameterSetName = ByRunbookName)] + [OutputType(typeof(Runbook))] + public class SetAzureAutomationRunbook : AzureAutomationBaseCmdlet + { + /// + /// The set runbook by runbook id parameter set. + /// + private const string ByRunbookId = "ByRunbookId"; + + /// + /// The set runbook by runbook name parameter set. + /// + private const string ByRunbookName = "ByRunbookName"; + + /// + /// Gets or sets the runbook Id + /// + [Parameter(ParameterSetName = ByRunbookId, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The runbook id.")] + [Alias("RunbookId")] + public Guid? Id { get; set; } + + /// + /// Gets or sets the runbook name + /// + [Parameter(ParameterSetName = ByRunbookName, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The runbook name.")] + [Alias("RunbookName")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + /// + /// Gets or sets the runbook description. + /// + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The runbook description.")] + public string Description { get; set; } + + /// + /// Gets or sets the runbook tags. + /// + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The runbook tags.")] + public string[] Tags { get; set; } + + /// + /// Gets or sets a value indicating whether debug logging should be turned on or off. + /// + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "Indicate whether debug logging should be turned on or off.")] + public bool? LogDebug { get; set; } + + /// + /// Gets or sets a value indicating whether progress logging should be turned on or off. + /// + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "Indicate whether progress logging should be turned on or off.")] + public bool? LogProgress { get; set; } + + /// + /// Gets or sets a value indicating whether verbose logging should be turned on or off. + /// + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "Indicate whether verbose logging should be turned on or off.")] + public bool? LogVerbose { get; set; } + + /// + /// Execute this cmdlet. + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + protected override void AutomationExecuteCmdlet() + { + Runbook runbook; + if (this.Id.HasValue) + { + // ByRunbookId + runbook = this.AutomationClient.UpdateRunbook( + this.AutomationAccountName, + this.Id.Value, + this.Description, + this.Tags, + this.LogDebug, + this.LogProgress, + this.LogVerbose); + } + else + { + // ByRunbookName + runbook = this.AutomationClient.UpdateRunbook( + this.AutomationAccountName, + this.Name, + this.Description, + this.Tags, + this.LogDebug, + this.LogProgress, + this.LogVerbose); + } + + this.WriteObject(runbook); + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/SetAzureAutomationRunbookDefinition.cs b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/SetAzureAutomationRunbookDefinition.cs new file mode 100644 index 000000000000..f33069dc7d4a --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/SetAzureAutomationRunbookDefinition.cs @@ -0,0 +1,105 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.Azure.Commands.Automation.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.Azure.Commands.Automation.Cmdlet +{ + /// + /// Sets an azure automation runbook definition. + /// + [Cmdlet(VerbsCommon.Set, "AzureAutomationRunbookDefinition", DefaultParameterSetName = ByRunbookName)] + [OutputType(typeof(RunbookDefinition))] + public class SetAzureAutomationRunbookDefinition : AzureAutomationBaseCmdlet + { + /// + /// The set runbook definition by runbook id parameter set. + /// + private const string ByRunbookId = "ByRunbookId"; + + /// + /// The set runbook definition by runbook name parameter set. + /// + private const string ByRunbookName = "ByRunbookName"; + + /// + /// True to overwrite the existing draft runbook definition; false otherwise. + /// + private bool overwriteExistingRunbookDefinition; + + /// + /// Gets or sets the runbook Id + /// + [Parameter(ParameterSetName = ByRunbookId, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The runbook id.")] + [Alias("RunbookId")] + public Guid? Id { get; set; } + + /// + /// Gets or sets the runbook name + /// + [Parameter(ParameterSetName = ByRunbookName, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The runbook name.")] + [ValidateNotNullOrEmpty] + [Alias("RunbookName")] + public string Name { get; set; } + + /// + /// Gets or sets the path of the updated runbook script + /// + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The path of the updated runbook script.")] + [ValidateNotNullOrEmpty] + [Alias("RunbookPath")] + public string Path { get; set; } + + /// + /// Gets or sets a value indicating whether to overwrite the existing draft runbook definition. + /// + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "To overwrite the exisiting draft runbook definition.")] + public SwitchParameter Overwrite + { + get { return this.overwriteExistingRunbookDefinition; } + set { this.overwriteExistingRunbookDefinition = value; } + } + + /// + /// Execute this cmdlet. + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + protected override void AutomationExecuteCmdlet() + { + RunbookDefinition runbookDefinition; + if (this.Id.HasValue) + { + // ByRunbookId + runbookDefinition = this.AutomationClient.UpdateRunbookDefinition( + this.AutomationAccountName, this.Id.Value, this.ResolvePath(this.Path), this.Overwrite); + } + else + { + // ByRunbookName + runbookDefinition = this.AutomationClient.UpdateRunbookDefinition( + this.AutomationAccountName, this.Name, this.ResolvePath(this.Path), this.Overwrite); + } + + this.WriteObject(runbookDefinition); + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/SetAzureAutomationSchedule.cs b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/SetAzureAutomationSchedule.cs new file mode 100644 index 000000000000..702a18895aeb --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/SetAzureAutomationSchedule.cs @@ -0,0 +1,90 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.Azure.Commands.Automation.Model; + +namespace Microsoft.Azure.Commands.Automation.Cmdlet +{ + /// + /// Sets an azure automation schedule. + /// + [Cmdlet(VerbsCommon.Set, "AzureAutomationSchedule", DefaultParameterSetName = ByScheduleName)] + [OutputType(typeof(Schedule))] + public class SetAzureAutomationSchedule : AzureAutomationBaseCmdlet + { + /// + /// The get schedule by schedule id parameter set. + /// + private const string ByScheduleId = "ByScheduleId"; + + /// + /// The get schedule by schedule name parameter set. + /// + private const string ByScheduleName = "ByScheduleName"; + + /// + /// Gets or sets the schedule id. + /// + [Parameter(ParameterSetName = ByScheduleId, Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The schedule id.")] + public Guid? Id { get; set; } + + /// + /// Gets or sets the schedule name. + /// + [Parameter(ParameterSetName = ByScheduleName, Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The schedule name.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + /// + /// Gets or sets the indicator whether the schedule is enabled. + /// + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The schedule description.")] + public bool? IsEnabled { get; set; } + + /// + /// Gets or sets the schedule description. + /// + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The schedule description.")] + public string Description { get; set; } + + /// + /// Execute this cmdlet. + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + protected override void AutomationExecuteCmdlet() + { + if (this.Id.HasValue) + { + // ByScheduleId + Schedule schedule = this.AutomationClient.UpdateSchedule( + this.AutomationAccountName, this.Id.Value, this.IsEnabled, this.Description); + this.WriteObject(schedule); + } + else + { + // ByScheduleName + Schedule schedule = this.AutomationClient.UpdateSchedule( + this.AutomationAccountName, this.Name, this.IsEnabled, this.Description); + this.WriteObject(schedule); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/StartAzureAutomationRunbook.cs b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/StartAzureAutomationRunbook.cs new file mode 100644 index 000000000000..4140f787ac50 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/StartAzureAutomationRunbook.cs @@ -0,0 +1,52 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using System.Security.Permissions; +using Job = Microsoft.Azure.Commands.Automation.Model.Job; + +namespace Microsoft.Azure.Commands.Automation.Cmdlet +{ + /// + /// Starts an Azure automation runbook. + /// + [Cmdlet(VerbsLifecycle.Start, "AzureAutomationRunbook", DefaultParameterSetName = ByRunbookName)] + [OutputType(typeof(Job))] + public class StartAzureAutomationRunbook : StartAzureAutomationRunbookBase + { + /// + /// Execute this cmdlet. + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + protected override void AutomationExecuteCmdlet() + { + Job job; + + if (this.Id.HasValue) + { + // ByRunbookId + job = this.AutomationClient.StartRunbook( + this.AutomationAccountName, this.Id.Value, this.Parameters); + } + else + { + // ByRunbookName + job = this.AutomationClient.StartRunbook( + this.AutomationAccountName, this.Name, this.Parameters); + } + + this.WriteObject(job); + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/StartAzureAutomationRunbookBase.cs b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/StartAzureAutomationRunbookBase.cs new file mode 100644 index 000000000000..aaef222b2d61 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/StartAzureAutomationRunbookBase.cs @@ -0,0 +1,57 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Management.Automation; + +namespace Microsoft.Azure.Commands.Automation.Cmdlet +{ + public abstract class StartAzureAutomationRunbookBase : AzureAutomationBaseCmdlet + { + /// + /// The start runbook by runbook id parameter set. + /// + protected const string ByRunbookId = "ByRunbookId"; + + /// + /// The start runbook by runbook name parameter set. + /// + protected const string ByRunbookName = "ByRunbookName"; + + /// + /// Gets or sets the runbook Id + /// + [Parameter(ParameterSetName = ByRunbookId, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The runbook id.")] + [Alias("RunbookId")] + public Guid? Id { get; set; } + + /// + /// Gets or sets the runbook name + /// + [Parameter(ParameterSetName = ByRunbookName, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The runbook name.")] + [ValidateNotNullOrEmpty] + [Alias("RunbookName")] + public string Name { get; set; } + + /// + /// Gets or sets the runbook parameters. + /// + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The runbook parameters.")] + public IDictionary Parameters { get; set; } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/StopAzureAutomationJob.cs b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/StopAzureAutomationJob.cs new file mode 100644 index 000000000000..3122cda9f0f7 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/StopAzureAutomationJob.cs @@ -0,0 +1,44 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Security.Permissions; + +namespace Microsoft.Azure.Commands.Automation.Cmdlet +{ + /// + /// Stops an azure automation job. + /// + [Cmdlet(VerbsLifecycle.Stop, "AzureAutomationJob")] + public class StopAzureAutomationJob : AzureAutomationBaseCmdlet + { + /// + /// Gets or sets the job id. + /// + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The job id.")] + [Alias("JobId")] + public Guid Id { get; set; } + + /// + /// Execute this cmdlet. + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + protected override void AutomationExecuteCmdlet() + { + this.AutomationClient.StopJob(this.AutomationAccountName, this.Id); + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/SuspendAzureAutomationJob.cs b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/SuspendAzureAutomationJob.cs new file mode 100644 index 000000000000..f66ba84acbba --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/SuspendAzureAutomationJob.cs @@ -0,0 +1,44 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Security.Permissions; + +namespace Microsoft.Azure.Commands.Automation.Cmdlet +{ + /// + /// Suspends an azure automation job. + /// + [Cmdlet(VerbsLifecycle.Suspend, "AzureAutomationJob")] + public class SuspendAzureAutomationJob : AzureAutomationBaseCmdlet + { + /// + /// Gets or sets the job id. + /// + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The job id.")] + [Alias("JobId")] + public Guid Id { get; set; } + + /// + /// Execute this cmdlet. + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + protected override void AutomationExecuteCmdlet() + { + this.AutomationClient.SuspendJob(this.AutomationAccountName, this.Id); + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/UnregisterAzureAutomationScheduledRunbook.cs b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/UnregisterAzureAutomationScheduledRunbook.cs new file mode 100644 index 000000000000..441e99cb3afc --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Cmdlet/UnregisterAzureAutomationScheduledRunbook.cs @@ -0,0 +1,86 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.Azure.Commands.Automation.Model; + +namespace Microsoft.Azure.Commands.Automation.Cmdlet +{ + /// + /// Unregisters an azure automation scheduled runbook. + /// + [Cmdlet(VerbsLifecycle.Unregister, "AzureAutomationScheduledRunbook", DefaultParameterSetName = ByRunbookName)] + [OutputType(typeof(Runbook))] + public class UnregisterAzureAutomationScheduledRunbook : AzureAutomationBaseCmdlet + { + /// + /// The start runbook by runbook id parameter set. + /// + protected const string ByRunbookId = "ByRunbookId"; + + /// + /// The start runbook by runbook name parameter set. + /// + protected const string ByRunbookName = "ByRunbookName"; + + /// + /// Gets or sets the runbook Id + /// + [Parameter(ParameterSetName = ByRunbookId, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The runbook id.")] + [Alias("RunbookId")] + public Guid? Id { get; set; } + + /// + /// Gets or sets the runbook name + /// + [Parameter(ParameterSetName = ByRunbookName, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The runbook name.")] + [ValidateNotNullOrEmpty] + [Alias("RunbookName")] + public string Name { get; set; } + + /// + /// Gets or sets the schedule that will be used to start the runbook. + /// + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "The name of the schedule on which the runbook will be started.")] + [ValidateNotNullOrEmpty] + public string ScheduleName { get; set; } + + /// + /// Execute this cmdlet. + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + protected override void AutomationExecuteCmdlet() + { + Runbook runbook; + + if (this.Id.HasValue) + { + runbook = this.AutomationClient.UnregisterScheduledRunbook( + this.AutomationAccountName, this.Id.Value, this.ScheduleName); + } + else + { + runbook = this.AutomationClient.UnregisterScheduledRunbook( + this.AutomationAccountName, this.Name, this.ScheduleName); + } + + this.WriteObject(runbook); + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/Commands.Automation.csproj b/src/ServiceManagement/Automation/Commands.Automation/Commands.Automation.csproj new file mode 100644 index 000000000000..45ccfcbd4807 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Commands.Automation.csproj @@ -0,0 +1,187 @@ + + + + + Debug + AnyCPU + {47CD7E95-5330-4384-ABCE-2C267C57085C} + Library + Properties + Microsoft.Azure.Commands.Automation + Microsoft.Azure.Commands.Automation + v4.5 + 512 + ..\..\..\ + true + /assemblyCompareMode:StrongNameIgnoringVersion + + + + true + full + false + ..\..\..\Package\Debug\ServiceManagement\Azure\Automation\ + DEBUG;TRACE + prompt + 4 + true + true + true + false + + + OnBuildSuccess + + + ..\..\..\Package\Release\ServiceManagement\Azure\Automation\ + TRACE;SIGN + true + pdbonly + AnyCPU + bin\Release\Management.Automation.dll.CodeAnalysisLog.xml + true + GlobalSuppressions.cs + prompt + MinimumRecommendedRules.ruleset + ;$(ProgramFiles)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\Rule Sets + ;$(ProgramFiles)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\FxCop\Rules + true + true + MSSharedLibKey.snk + true + false + + + + False + ..\..\..\packages\Microsoft.Azure.Management.Automation.0.12.1-preview\lib\net40\Microsoft.Azure.Management.Automation.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + True + + + + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + True + Resources.resx + + + + + PreserveNewest + + + + + + + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Automation/Commands.Automation/Common/AutomationClient.cs b/src/ServiceManagement/Automation/Commands.Automation/Common/AutomationClient.cs new file mode 100644 index 000000000000..83de8f67ee7e --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Common/AutomationClient.cs @@ -0,0 +1,1082 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Text; +using Microsoft.Azure.Commands.Automation.Model; +using Microsoft.Azure.Commands.Automation.Properties; +using Microsoft.Azure.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Newtonsoft.Json; + +namespace Microsoft.Azure.Commands.Automation.Common +{ + using AutomationManagement = Management.Automation; + + public class AutomationClient : IAutomationClient + { + private readonly AutomationManagement.IAutomationManagementClient automationManagementClient; + + // Injection point for unit tests + public AutomationClient() + { + } + + public AutomationClient(AzureSubscription subscription) + : this(subscription, + AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement)) + { + } + + public AutomationClient( + AzureSubscription subscription, + AutomationManagement.IAutomationManagementClient automationManagementClient) + { + Requires.Argument("automationManagementClient", automationManagementClient).NotNull(); + + this.Subscription = subscription; + this.automationManagementClient = automationManagementClient; + } + + public AzureSubscription Subscription { get; private set; } + + #region Account Operations + + public IEnumerable ListAutomationAccounts(string automationAccountName, string location) + { + if (automationAccountName != null) + { + Requires.Argument("AutomationAccountName", automationAccountName).ValidAutomationAccountName(); + } + + var automationAccounts = new List(); + var cloudServices = new List(this.automationManagementClient.CloudServices.List().CloudServices); + + foreach (var cloudService in cloudServices) + { + automationAccounts.AddRange(cloudService.Resources.Select(resource => new AutomationAccount(cloudService, resource))); + } + + // RDFE does not support server-side filtering, hence we filter on the client-side. + if (automationAccountName != null) + { + automationAccounts = automationAccounts.Where(account => string.Equals(account.AutomationAccountName, automationAccountName, StringComparison.OrdinalIgnoreCase)).ToList(); + + if (!automationAccounts.Any()) + { + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Resources.AutomationAccountNotFound)); + } + } + + if (location != null) + { + automationAccounts = automationAccounts.Where(account => string.Equals(account.Location, location, StringComparison.OrdinalIgnoreCase)).ToList(); + } + + return automationAccounts; + } + + #endregion + + #region Runbook Operations + + public Runbook CreateRunbookByName(string automationAccountName, string runbookName, string description, string[] tags) + { + var runbookScript = string.Format(CultureInfo.InvariantCulture, @"workflow {0}{1}{{{1}}}", runbookName, Environment.NewLine); + using (var streamReader = new StreamReader(new MemoryStream(Encoding.UTF8.GetBytes(runbookScript), false), Encoding.UTF8)) + { + Stream runbookStream = streamReader.BaseStream; + Runbook runbook = this.CreateRunbook(automationAccountName, runbookStream); + this.UpdateRunbook(automationAccountName, runbook.Id, description, tags, null, null, null); + return this.GetRunbook(automationAccountName, runbook.Id); + } + } + + public Runbook CreateRunbookByPath(string automationAccountName, string runbookPath, string description, string[] tags) + { + Runbook runbook = this.CreateRunbook(automationAccountName, File.OpenRead(runbookPath)); + this.UpdateRunbook(automationAccountName, runbook.Id, description, tags, null, null, null); + return this.GetRunbook(automationAccountName, runbook.Id); + } + + public void DeleteRunbook(string automationAccountName, Guid runbookId) + { + this.automationManagementClient.Runbooks.Delete( + automationAccountName, + runbookId.ToString()); + } + + public void DeleteRunbook(string automationAccountName, string runbookName) + { + Runbook runbook = this.GetRunbook(automationAccountName, runbookName); + this.DeleteRunbook(automationAccountName, runbook.Id); + } + + /// + /// Gets the runbook identified by runbookId, with schedule names expanded. + /// + /// + /// The automation account name. + /// + /// + /// The runbook id. + /// + /// + /// The . + /// + public Runbook GetRunbook(string automationAccountName, Guid runbookId) + { + return new Runbook(this.GetRunbookModel(automationAccountName, runbookId, true)); + } + + /// + /// Gets the runbook identified by runbookId, with schedule names expanded. + /// + /// + /// The automation account name. + /// + /// + /// The runbook name. + /// + /// + /// The . + /// + public Runbook GetRunbook(string automationAccountName, string runbookName) + { + return new Runbook(this.GetRunbookModel(automationAccountName, runbookName, true)); + } + + public IEnumerable ListRunbooks(string automationAccountName) + { + IList runbookModels = AutomationManagementClient.ContinuationTokenHandler( + skipToken => + { + var listRunbookResponse = + this.automationManagementClient.Runbooks.ListWithSchedules( + automationAccountName, skipToken); + return new ResponseWithSkipToken( + listRunbookResponse, listRunbookResponse.Runbooks); + }); + + return runbookModels.Select(runbookModel => new Runbook(runbookModel)); + } + + public IEnumerable ListRunbookByScheduleName(string automationAccountName, string scheduleName) + { + AutomationManagement.Models.Schedule scheduleModel = this.GetScheduleModel(automationAccountName, scheduleName); + IList runbookModels = AutomationManagementClient.ContinuationTokenHandler( + skipToken => + { + var listRunbookResponse = + this.automationManagementClient.Runbooks.ListByScheduleNameWithSchedules( + automationAccountName, + new AutomationManagement.Models.RunbookListByScheduleNameParameters + { + ScheduleName = scheduleModel.Name, + SkipToken = skipToken + }); + return new ResponseWithSkipToken( + listRunbookResponse, listRunbookResponse.Runbooks); + }); + + IEnumerable runbooks = runbookModels.Select(runbookModel => new Runbook(runbookModel)); + return runbooks.Where(runbook => runbook.ScheduleNames.Any()); + } + + public Runbook PublishRunbook(string automationAccountName, Guid runbookId) + { + this.automationManagementClient.Runbooks.Publish( + automationAccountName, + new AutomationManagement.Models.RunbookPublishParameters + { + RunbookId = runbookId.ToString(), + PublishedBy = Constants.ClientIdentity + }); + + return this.GetRunbook(automationAccountName, runbookId); + } + + public Runbook PublishRunbook(string automationAccountName, string runbookName) + { + Guid runbookId = this.GetRunbookIdByRunbookName(automationAccountName, runbookName); + return this.PublishRunbook(automationAccountName, runbookId); + } + + public Job StartRunbook(string automationAccountName, Guid runbookId, IDictionary parameters) + { + IEnumerable processedParameters = this.ProcessRunbookParameters(automationAccountName, runbookId, parameters); + var startResponse = this.automationManagementClient.Runbooks.Start( + automationAccountName, + new AutomationManagement.Models.RunbookStartParameters + { + RunbookId = runbookId.ToString(), + Parameters = processedParameters.ToList() + }); + + return this.GetJob(automationAccountName, new Guid(startResponse.JobId)); + } + + public Job StartRunbook(string automationAccountName, string runbookName, IDictionary parameters) + { + Guid runbookId = this.GetRunbookIdByRunbookName(automationAccountName, runbookName); + return this.StartRunbook(automationAccountName, runbookId, parameters); + } + + public Runbook RegisterScheduledRunbook( + string automationAccountName, Guid runbookId, IDictionary parameters, string scheduleName) + { + Schedule schedule = this.GetSchedule(automationAccountName, scheduleName); + IEnumerable processedParameters = this.ProcessRunbookParameters(automationAccountName, runbookId, parameters); + this.automationManagementClient.Runbooks.CreateScheduleLink( + automationAccountName, + new AutomationManagement.Models.RunbookCreateScheduleLinkParameters + { + RunbookId = runbookId.ToString(), + Parameters = processedParameters.ToList(), + ScheduleId = schedule.Id.ToString() + }); + + return this.GetRunbook(automationAccountName, runbookId); + } + + public Runbook RegisterScheduledRunbook( + string automationAccountName, string runbookName, IDictionary parameters, string scheduleName) + { + Guid runbookId = this.GetRunbookIdByRunbookName(automationAccountName, runbookName); + return this.RegisterScheduledRunbook(automationAccountName, runbookId, parameters, scheduleName); + } + + public Runbook UpdateRunbook(string automationAccountName, Guid runbookId, string description, string[] tags, bool? logDebug, bool? logProgress, bool? logVerbose) + { + AutomationManagement.Models.Runbook runbookModel = this.GetRunbookModel(automationAccountName, runbookId, false); + return this.UpdateRunbookHelper(automationAccountName, runbookModel, description, tags, logDebug, logProgress, logVerbose); + } + + public Runbook UpdateRunbook(string automationAccountName, string runbookName, string description, string[] tags, bool? logDebug, bool? logProgress, bool? logVerbose) + { + AutomationManagement.Models.Runbook runbookModel = this.GetRunbookModel(automationAccountName, runbookName, false); + return this.UpdateRunbookHelper(automationAccountName, runbookModel, description, tags, logDebug, logProgress, logVerbose); + } + + public Runbook UnregisterScheduledRunbook(string automationAccountName, Guid runbookId, string scheduleName) + { + Schedule schedule = this.GetSchedule(automationAccountName, scheduleName); + this.automationManagementClient.Runbooks.DeleteScheduleLink( + automationAccountName, + new AutomationManagement.Models.RunbookDeleteScheduleLinkParameters + { + RunbookId = runbookId.ToString(), + ScheduleId = + schedule.Id.ToString() + }); + return this.GetRunbook(automationAccountName, runbookId); + } + + public Runbook UnregisterScheduledRunbook(string automationAccountName, string runbookName, string scheduleName) + { + Guid runbookId = this.GetRunbookIdByRunbookName(automationAccountName, runbookName); + return this.UnregisterScheduledRunbook(automationAccountName, runbookId, scheduleName); + } + + #endregion + + #region Runbook Definition Operations + + public IEnumerable ListRunbookDefinitionsByRunbookName(string automationAccountName, string runbookName, bool? isDraft) + { + Guid runbookId = this.GetRunbookIdByRunbookName(automationAccountName, runbookName); + return this.ListRunbookDefinitionsByValidRunbookId(automationAccountName, runbookId, isDraft); + } + + public IEnumerable ListRunbookDefinitionsByRunbookId(string automationAccountName, Guid runbookId, bool? isDraft) + { + AutomationManagement.Models.Runbook runbookModel = this.GetRunbookModel(automationAccountName, runbookId, false); + return this.ListRunbookDefinitionsByValidRunbookId(automationAccountName, new Guid(runbookModel.Id), isDraft); + } + + public IEnumerable ListRunbookDefinitionsByRunbookVersionId(string automationAccountName, Guid runbookVersionId, bool? isDraft) + { + AutomationManagement.Models.RunbookVersion runbookVersionModel = this.GetRunbookVersionModel(automationAccountName, runbookVersionId); + if (!isDraft.HasValue || isDraft.Value == runbookVersionModel.IsDraft) + { + return this.CreateRunbookDefinitionsFromRunbookVersionModels( + automationAccountName, new List { runbookVersionModel }); + } + else + { + return new List(); + } + } + + public RunbookDefinition UpdateRunbookDefinition(string automationAccountName, Guid runbookId, string runbookPath, bool overwrite) + { + return this.UpdateRunbookDefinition(automationAccountName, runbookId, File.OpenRead(runbookPath), overwrite); + } + + public RunbookDefinition UpdateRunbookDefinition(string automationAccountName, string runbookName, string runbookPath, bool overwrite) + { + Guid runbookId = this.GetRunbookIdByRunbookName(automationAccountName, runbookName); + return this.UpdateRunbookDefinition(automationAccountName, runbookId, runbookPath, overwrite); + } + + #endregion + + #region Job Operations + + public Job GetJob(string automationAccountName, Guid jobId) + { + return new Job(this.GetJobModel(automationAccountName, jobId)); + } + + public IEnumerable ListJobs(string automationAccountName, DateTime? startTime, DateTime? endTime) + { + // Assume local time if DateTimeKind.Unspecified + if (startTime.HasValue && startTime.Value.Kind == DateTimeKind.Unspecified) + { + startTime = DateTime.SpecifyKind(startTime.Value, DateTimeKind.Local); + } + + if (endTime.HasValue && endTime.Value.Kind == DateTimeKind.Unspecified) + { + endTime = DateTime.SpecifyKind(endTime.Value, DateTimeKind.Local); + } + + IEnumerable jobModels; + + if (startTime.HasValue && endTime.HasValue) + { + jobModels = AutomationManagementClient.ContinuationTokenHandler( + skipToken => + { + var response = + this.automationManagementClient.Jobs.ListFilteredByStartTimeEndTime( + automationAccountName, + new AutomationManagement.Models.JobListParameters + { + StartTime = this.FormatDateTime(startTime.Value), + EndTime = this.FormatDateTime(endTime.Value), + SkipToken = skipToken + }); + return new ResponseWithSkipToken(response, response.Jobs); + }); + } + else if (startTime.HasValue) + { + jobModels = AutomationManagementClient.ContinuationTokenHandler( + skipToken => + { + var response = + this.automationManagementClient.Jobs.ListFilteredByStartTime( + automationAccountName, + new AutomationManagement.Models.JobListParameters + { + StartTime = this.FormatDateTime(startTime.Value), + SkipToken = skipToken + }); + return new ResponseWithSkipToken(response, response.Jobs); + }); + } + else if (endTime.HasValue) + { + jobModels = AutomationManagementClient.ContinuationTokenHandler( + skipToken => + { + var response = + this.automationManagementClient.Jobs.ListFilteredByStartTime( + automationAccountName, + new AutomationManagement.Models.JobListParameters + { + EndTime = this.FormatDateTime(endTime.Value), + SkipToken = skipToken + }); + return new ResponseWithSkipToken(response, response.Jobs); + }); + } + else + { + jobModels = AutomationManagementClient.ContinuationTokenHandler( + skipToken => + { + var response = this.automationManagementClient.Jobs.List( + automationAccountName, + new AutomationManagement.Models.JobListParameters { SkipToken = skipToken, }); + return new ResponseWithSkipToken(response, response.Jobs); + }); + } + + return jobModels.Select(jobModel => new Job(jobModel)); + } + + public IEnumerable ListJobsByRunbookId(string automationAccountName, Guid runbookId, DateTime? startTime, DateTime? endTime) + { + AutomationManagement.Models.Runbook runbookModel = this.GetRunbookModel(automationAccountName, runbookId, false); + return this.ListJobsByValidRunbookId(automationAccountName, new Guid(runbookModel.Id), startTime, endTime); + } + + public IEnumerable ListJobsByRunbookName(string automationAccountName, string runbookName, DateTime? startTime, DateTime? endTime) + { + Guid runbookId = this.GetRunbookIdByRunbookName(automationAccountName, runbookName); + return this.ListJobsByValidRunbookId(automationAccountName, runbookId, startTime, endTime); + } + + public void ResumeJob(string automationAccountName, Guid jobId) + { + this.automationManagementClient.Jobs.Resume( + automationAccountName, + jobId.ToString()); + } + + public void StopJob(string automationAccountName, Guid jobId) + { + this.automationManagementClient.Jobs.Stop( + automationAccountName, + jobId.ToString()); + } + + public void SuspendJob(string automationAccountName, Guid jobId) + { + this.automationManagementClient.Jobs.Suspend( + automationAccountName, + jobId.ToString()); + } + + #endregion + + #region Job Stream Item Operations + + public IEnumerable ListJobStreamItems(string automationAccountName, Guid jobId, DateTime createdSince, string streamTypeName) + { + AutomationManagement.Models.Job jobModel = this.GetJobModel(automationAccountName, jobId); + IList jobStreamItemModels = AutomationManagementClient.ContinuationTokenHandler( + skipToken => + { + var response = this.automationManagementClient.JobStreams.ListStreamItems( + automationAccountName, + new AutomationManagement.Models.JobStreamListStreamItemsParameters + { + JobId = jobModel.Id, + StartTime = this.FormatDateTime(createdSince), + StreamType = streamTypeName, + SkipToken = skipToken + }); + return new ResponseWithSkipToken( + response, response.JobStreamItems); + }); + + return jobStreamItemModels.Select(jobStreamItemModel => new JobStreamItem(jobStreamItemModel)); + } + + #endregion + + #region Schedule Operations + + public Schedule CreateSchedule(string automationAccountName, OneTimeSchedule schedule) + { + this.ValidateScheduleName(automationAccountName, schedule.Name); + + var scheduleModel = new AutomationManagement.Models.Schedule + { + Name = schedule.Name, + StartTime = schedule.StartTime.ToUniversalTime(), + ExpiryTime = schedule.ExpiryTime.ToUniversalTime(), + Description = schedule.Description, + ScheduleType = + AutomationManagement.Models.ScheduleType + .OneTimeSchedule + }; + + var scheduleCreateParameters = new AutomationManagement.Models.ScheduleCreateParameters + { + Schedule = scheduleModel + }; + + var scheduleCreateResponse = this.automationManagementClient.Schedules.Create( + automationAccountName, + scheduleCreateParameters); + + return this.GetSchedule(automationAccountName, new Guid(scheduleCreateResponse.Schedule.Id)); + } + + public Schedule CreateSchedule(string automationAccountName, DailySchedule schedule) + { + this.ValidateScheduleName(automationAccountName, schedule.Name); + + var scheduleModel = new AutomationManagement.Models.Schedule + { + Name = schedule.Name, + StartTime = schedule.StartTime.ToUniversalTime(), + ExpiryTime = schedule.ExpiryTime.ToUniversalTime(), + Description = schedule.Description, + DayInterval = schedule.DayInterval, + ScheduleType = + AutomationManagement.Models.ScheduleType + .DailySchedule + }; + + var scheduleCreateParameters = new AutomationManagement.Models.ScheduleCreateParameters + { + Schedule = scheduleModel + }; + + var scheduleCreateResponse = this.automationManagementClient.Schedules.Create( + automationAccountName, + scheduleCreateParameters); + + return this.GetSchedule(automationAccountName, new Guid(scheduleCreateResponse.Schedule.Id)); + } + + public Schedule CreateSchedule(string automationAccountName, HourlySchedule schedule) + { + this.ValidateScheduleName(automationAccountName, schedule.Name); + + var scheduleModel = new AutomationManagement.Models.Schedule + { + Name = schedule.Name, + StartTime = schedule.StartTime.ToUniversalTime(), + ExpiryTime = schedule.ExpiryTime.ToUniversalTime(), + Description = schedule.Description, + HourInterval = schedule.HourInterval, + ScheduleType = + AutomationManagement.Models.ScheduleType + .HourlySchedule + }; + + var scheduleCreateParameters = new AutomationManagement.Models.ScheduleCreateParameters + { + Schedule = scheduleModel + }; + + var scheduleCreateResponse = this.automationManagementClient.Schedules.Create( + automationAccountName, + scheduleCreateParameters); + + return this.GetSchedule(automationAccountName, new Guid(scheduleCreateResponse.Schedule.Id)); + } + + public void DeleteSchedule(string automationAccountName, Guid scheduleId) + { + this.automationManagementClient.Schedules.Delete( + automationAccountName, + scheduleId.ToString()); + } + + public void DeleteSchedule(string automationAccountName, string scheduleName) + { + Schedule schedule = this.GetSchedule(automationAccountName, scheduleName); + this.DeleteSchedule(automationAccountName, schedule.Id); + } + + public Schedule GetSchedule(string automationAccountName, Guid scheduleId) + { + AutomationManagement.Models.Schedule scheduleModel = this.GetScheduleModel(automationAccountName, scheduleId); + return this.CreateScheduleFromScheduleModel(scheduleModel); + } + + public Schedule GetSchedule(string automationAccountName, string scheduleName) + { + AutomationManagement.Models.Schedule scheduleModel = this.GetScheduleModel(automationAccountName, scheduleName); + return this.CreateScheduleFromScheduleModel(scheduleModel); + } + + public IEnumerable ListSchedules(string automationAccountName) + { + IList scheduleModels = AutomationManagementClient.ContinuationTokenHandler( + skipToken => + { + var response = this.automationManagementClient.Schedules.List( + automationAccountName, skipToken); + return new ResponseWithSkipToken( + response, response.Schedules); + }); + + return scheduleModels.Select(this.CreateScheduleFromScheduleModel); + } + + public Schedule UpdateSchedule(string automationAccountName, Guid scheduleId, bool? isEnabled, string description) + { + AutomationManagement.Models.Schedule scheduleModel = this.GetScheduleModel(automationAccountName, scheduleId); + return this.UpdateScheduleHelper(automationAccountName, scheduleModel, isEnabled, description); + } + + public Schedule UpdateSchedule(string automationAccountName, string scheduleName, bool? isEnabled, string description) + { + AutomationManagement.Models.Schedule scheduleModel = this.GetScheduleModel(automationAccountName, scheduleName); + return this.UpdateScheduleHelper(automationAccountName, scheduleModel, isEnabled, description); + } + + #endregion + + #region Private Methods + + private Runbook CreateRunbook(string automationAccountName, Stream runbookStream) + { + var createRunbookVersionResponse = this.automationManagementClient.RunbookVersions.Create( + automationAccountName, + runbookStream); + + var getRunbookVersionResponse = this.automationManagementClient.RunbookVersions.Get( + automationAccountName, + createRunbookVersionResponse.RunbookVersion.Id); + + return this.GetRunbook(automationAccountName, new Guid(getRunbookVersionResponse.RunbookVersion.RunbookId)); + } + + private IEnumerable CreateRunbookDefinitionsFromRunbookVersionModels( + string automationAccountName, IEnumerable runbookVersionModels) + { + foreach (AutomationManagement.Models.RunbookVersion runbookVersionModel in runbookVersionModels) + { + var getRunbookDefinitionResponse = + this.automationManagementClient.RunbookVersions.GetRunbookDefinition( + automationAccountName, + runbookVersionModel.Id); + + yield return new RunbookDefinition(runbookVersionModel, getRunbookDefinitionResponse.RunbookDefinition); + } + } + + private Schedule CreateScheduleFromScheduleModel(AutomationManagement.Models.Schedule schedule) + { + Requires.Argument("schedule", schedule).NotNull(); + + if (schedule.ScheduleType == AutomationManagement.Models.ScheduleType.DailySchedule) + { + return new DailySchedule(schedule); + } + else if (schedule.ScheduleType == AutomationManagement.Models.ScheduleType.HourlySchedule) + { + return new HourlySchedule(schedule); + } + else + { + return new OneTimeSchedule(schedule); + } + } + + private Guid EditRunbook(string automationAccountName, Guid runbookId) + { + return new Guid(this.automationManagementClient.Runbooks.Edit( + automationAccountName, + runbookId.ToString()) + .DraftRunbookVersionId); + } + + private string FormatDateTime(DateTime dateTime) + { + return string.Format(CultureInfo.InvariantCulture, "{0:O}", dateTime.ToUniversalTime()); + } + + private AutomationManagement.Models.Job GetJobModel(string automationAccountName, Guid jobId) + { + AutomationManagement.Models.Job jobModel = this.automationManagementClient.Jobs.Get( + automationAccountName, + jobId.ToString()) + .Job; + + if (jobModel == null) + { + throw new ResourceNotFoundException(typeof(Job), string.Format(CultureInfo.CurrentCulture, Resources.JobNotFoundById, jobId)); + } + + return jobModel; + } + + private IEnumerable ListJobsByValidRunbookId(string automationAccountName, Guid runbookId, DateTime? startTime, DateTime? endTime) + { + // Assume local time if DateTimeKind.Unspecified + if (startTime.HasValue && startTime.Value.Kind == DateTimeKind.Unspecified) + { + startTime = DateTime.SpecifyKind(startTime.Value, DateTimeKind.Local); + } + + if (endTime.HasValue && endTime.Value.Kind == DateTimeKind.Unspecified) + { + endTime = DateTime.SpecifyKind(endTime.Value, DateTimeKind.Local); + } + + IEnumerable jobModels; + + if (startTime.HasValue && endTime.HasValue) + { + jobModels = AutomationManagementClient.ContinuationTokenHandler( + skipToken => + { + var response = + this.automationManagementClient.Jobs.ListByRunbookIdFilteredByStartTimeEndTime( + automationAccountName, + new AutomationManagement.Models.JobListByRunbookIdParameters + { + RunbookId = runbookId.ToString(), + StartTime = this.FormatDateTime(startTime.Value), + EndTime = this.FormatDateTime(endTime.Value), + SkipToken = skipToken + }); + return new ResponseWithSkipToken(response, response.Jobs); + }); + } + else if (startTime.HasValue) + { + jobModels = AutomationManagementClient.ContinuationTokenHandler( + skipToken => + { + var response = + this.automationManagementClient.Jobs.ListByRunbookIdFilteredByStartTime( + automationAccountName, + new AutomationManagement.Models.JobListByRunbookIdParameters + { + RunbookId = runbookId.ToString(), + StartTime = this.FormatDateTime(startTime.Value), + SkipToken = skipToken, + }); + return new ResponseWithSkipToken(response, response.Jobs); + }); + } + else if (endTime.HasValue) + { + jobModels = AutomationManagementClient.ContinuationTokenHandler( + skipToken => + { + var response = + this.automationManagementClient.Jobs.ListByRunbookIdFilteredByStartTime( + automationAccountName, + new AutomationManagement.Models.JobListByRunbookIdParameters + { + RunbookId = runbookId.ToString(), + EndTime = this.FormatDateTime(endTime.Value), + SkipToken = skipToken, + }); + return new ResponseWithSkipToken(response, response.Jobs); + }); + } + else + { + jobModels = AutomationManagementClient.ContinuationTokenHandler( + skipToken => + { + var response = this.automationManagementClient.Jobs.ListByRunbookId( + automationAccountName, + new AutomationManagement.Models.JobListByRunbookIdParameters + { + RunbookId = runbookId.ToString(), + SkipToken = skipToken, + }); + return new ResponseWithSkipToken(response, response.Jobs); + }); + } + + return jobModels.Select(jobModel => new Job(jobModel)); + } + + private Guid GetRunbookIdByRunbookName(string automationAccountName, string runbookName) + { + return new Guid(this.GetRunbookModel(automationAccountName, runbookName, false).Id); + } + + private AutomationManagement.Models.Runbook GetRunbookModel(string automationAccountName, Guid runbookId, bool withSchedules) + { + AutomationManagement.Models.Runbook runbookModel = withSchedules + ? this.automationManagementClient.Runbooks.GetWithSchedules( + automationAccountName, + runbookId.ToString()).Runbook + : this.automationManagementClient.Runbooks.Get( + automationAccountName, + runbookId.ToString()).Runbook; + + if (runbookModel == null) + { + throw new ResourceNotFoundException(typeof(Runbook), string.Format(CultureInfo.CurrentCulture, Resources.RunbookNotFoundById, runbookId)); + } + + return runbookModel; + } + + private AutomationManagement.Models.Runbook GetRunbookModel(string automationAccountName, string runbookName, bool withSchedules) + { + IList runbookModels = withSchedules + ? this.automationManagementClient.Runbooks.ListByNameWithSchedules( + automationAccountName, + runbookName).Runbooks + : this.automationManagementClient.Runbooks.ListByName( + automationAccountName, + runbookName).Runbooks; + + if (!runbookModels.Any()) + { + throw new ResourceNotFoundException(typeof(Runbook), string.Format(CultureInfo.CurrentCulture, Resources.RunbookNotFoundByName, runbookName)); + } + + return runbookModels.First(); + } + + private AutomationManagement.Models.RunbookVersion GetRunbookVersionModel( + string automationAccountName, Guid runbookVersionId) + { + AutomationManagement.Models.RunbookVersion runbookVersionModel = + this.automationManagementClient.RunbookVersions.Get( + automationAccountName, + runbookVersionId.ToString()).RunbookVersion; + + if (runbookVersionModel == null) + { + throw new ResourceNotFoundException( + typeof(RunbookVersion), + string.Format(CultureInfo.CurrentCulture, Resources.RunbookVersionNotFoundById, runbookVersionId)); + } + + return runbookVersionModel; + } + + private IEnumerable ListRunbookDefinitionsByValidRunbookId(string automationAccountName, Guid runbookId, bool? isDraft) + { + IList runbookVersionModels = isDraft.HasValue + ? this.automationManagementClient.RunbookVersions.ListLatestByRunbookIdSlot( + automationAccountName, + new AutomationManagement.Models. + RunbookVersionListLatestByRunbookIdSlotParameters + { + RunbookId = + runbookId.ToString(), + IsDraft = + isDraft.Value + }) + .RunbookVersions + : this.automationManagementClient.RunbookVersions.ListLatestByRunbookId( + automationAccountName, + runbookId.ToString()).RunbookVersions; + + return this.CreateRunbookDefinitionsFromRunbookVersionModels(automationAccountName, runbookVersionModels); + } + + private AutomationManagement.Models.Schedule GetScheduleModel(string automationAccountName, Guid scheduleId) + { + AutomationManagement.Models.Schedule scheduleModel = this.automationManagementClient.Schedules.Get( + automationAccountName, + scheduleId.ToString()) + .Schedule; + + if (scheduleModel == null) + { + throw new ResourceNotFoundException(typeof(Schedule), string.Format(CultureInfo.CurrentCulture, Resources.ScheduleNotFoundById, scheduleId)); + } + + return scheduleModel; + } + + private AutomationManagement.Models.Schedule GetScheduleModel(string automationAccountName, string scheduleName) + { + IList schedules = this.automationManagementClient.Schedules.ListByName( + automationAccountName, + scheduleName) + .Schedules; + + if (!schedules.Any()) + { + throw new ResourceNotFoundException(typeof(RunbookVersion), string.Format(CultureInfo.CurrentCulture, Resources.ScheduleNotFoundByName, scheduleName)); + } + + return schedules.First(); + } + + private IEnumerable ListRunbookParameters(string automationAccountName, Guid runbookId) + { + Runbook runbook = this.GetRunbook(automationAccountName, runbookId); + if (!runbook.PublishedRunbookVersionId.HasValue) + { + throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Resources.RunbookHasNoPublishedVersionById, runbookId)); + } + + return this.automationManagementClient.RunbookParameters.ListByRunbookVersionId( + automationAccountName, + runbook.PublishedRunbookVersionId.Value.ToString()).RunbookParameters.Select(runbookParameter => new RunbookParameter(runbookParameter)); + } + + private IEnumerable ProcessRunbookParameters(string automationAccountName, Guid runbookId, IDictionary parameters) + { + parameters = parameters ?? new Dictionary(); + IEnumerable runbookParameters = this.ListRunbookParameters(automationAccountName, runbookId); + var filteredParameters = new List(); + + foreach (var runbookParameter in runbookParameters) + { + if (parameters.Contains(runbookParameter.Name)) + { + object paramValue = parameters[runbookParameter.Name]; + try + { + filteredParameters.Add( + new AutomationManagement.Models.NameValuePair + { + Name = runbookParameter.Name, + Value = JsonConvert.SerializeObject(paramValue, new JsonSerializerSettings() { DateFormatHandling = DateFormatHandling.MicrosoftDateFormat }) + }); + } + catch (JsonSerializationException) + { + throw new ArgumentException( + string.Format( + CultureInfo.CurrentCulture, Resources.RunbookParameterCannotBeSerializedToJson, runbookParameter.Name)); + } + } + else if (runbookParameter.IsMandatory) + { + throw new ArgumentException( + string.Format( + CultureInfo.CurrentCulture, Resources.RunbookParameterValueRequired, runbookParameter.Name)); + } + } + + if (filteredParameters.Count != parameters.Count) + { + throw new ArgumentException( + string.Format(CultureInfo.CurrentCulture, Resources.InvalidRunbookParameters)); + } + + bool hasJobStartedBy = filteredParameters.Any(filteredParameter => filteredParameter.Name == Constants.JobStartedByParameterName); + + if (!hasJobStartedBy) + { + filteredParameters.Add(new AutomationManagement.Models.NameValuePair() { Name = Constants.JobStartedByParameterName, Value = Constants.ClientIdentity }); + } + + return filteredParameters; + } + + private RunbookDefinition UpdateRunbookDefinition(string automationAccountName, Guid runbookId, Stream runbookStream, bool overwrite) + { + var runbook = new Runbook(this.GetRunbookModel(automationAccountName, runbookId, false)); + + if (runbook.DraftRunbookVersionId.HasValue && overwrite == false) + { + throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Resources.RunbookAlreadyHasDraft)); + } + + Guid draftRunbookVersionId = runbook.DraftRunbookVersionId.HasValue + ? runbook.DraftRunbookVersionId.Value + : this.EditRunbook(automationAccountName, runbook.Id); + + var getRunbookDefinitionResponse = this.automationManagementClient.RunbookVersions.GetRunbookDefinition( + automationAccountName, + draftRunbookVersionId.ToString()); + + this.automationManagementClient.RunbookVersions.UpdateRunbookDefinition( + automationAccountName, + new AutomationManagement.Models.RunbookVersionUpdateRunbookDefinitionParameters + { + ETag = getRunbookDefinitionResponse.ETag, + RunbookVersionId = draftRunbookVersionId.ToString(), + RunbookStream = runbookStream, + }); + + IEnumerable runbookDefinitions = this.ListRunbookDefinitionsByRunbookVersionId(automationAccountName, draftRunbookVersionId, true); + return runbookDefinitions.First(); + } + + private Runbook UpdateRunbookHelper( + string automationAccountName, + AutomationManagement.Models.Runbook runbook, + string description, + string[] tags, + bool? logDebug, + bool? logProgress, + bool? logVerbose) + { + if (description != null) + { + runbook.Description = description; + } + + if (tags != null) + { + runbook.Tags = string.Join(Constants.RunbookTagsSeparatorString, tags); + } + + if (logDebug.HasValue) + { + runbook.LogDebug = logDebug.Value; + } + + if (logProgress.HasValue) + { + runbook.LogProgress = logProgress.Value; + } + + if (logVerbose.HasValue) + { + runbook.LogVerbose = logVerbose.Value; + } + + var runbookUpdateParameters = new AutomationManagement.Models.RunbookUpdateParameters + { + Runbook = runbook + }; + + this.automationManagementClient.Runbooks.Update(automationAccountName, runbookUpdateParameters); + + var runbookId = new Guid(runbook.Id); + return this.GetRunbook(automationAccountName, runbookId); + } + + private Schedule UpdateScheduleHelper(string automationAccountName, AutomationManagement.Models.Schedule schedule, bool? isEnabled, string description) + { + // StartTime and ExpiryTime need to specified as Utc + schedule.StartTime = DateTime.SpecifyKind(schedule.StartTime, DateTimeKind.Utc); + schedule.ExpiryTime = DateTime.SpecifyKind(schedule.ExpiryTime, DateTimeKind.Utc); + + if (isEnabled.HasValue) + { + schedule.IsEnabled = isEnabled.Value; + } + + if (description != null) + { + schedule.Description = description; + } + + var scheduleUpdateParameters = new AutomationManagement.Models.ScheduleUpdateParameters + { + Schedule = + schedule + }; + + this.automationManagementClient.Schedules.Update( + automationAccountName, + scheduleUpdateParameters); + + var scheduleId = new Guid(schedule.Id); + return this.GetSchedule(automationAccountName, scheduleId); + } + + // TODO: remove the helper which provides client-side schedule name validation once CDM TFS bug 662986 is resolved. + private void ValidateScheduleName(string automationAccountName, string scheduleName) + { + IList scheduleModels = + this.automationManagementClient.Schedules.ListByName( + automationAccountName, scheduleName) + .Schedules; + + if (scheduleModels.Any()) + { + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Resources.ScheduleNameExists, scheduleName)); + } + } + + #endregion + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Automation/Commands.Automation/Common/Constants.cs b/src/ServiceManagement/Automation/Commands.Automation/Common/Constants.cs new file mode 100644 index 000000000000..5b9a6c7a8b77 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Common/Constants.cs @@ -0,0 +1,58 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.Azure.Management.Automation.Models; + +namespace Microsoft.Azure.Commands.Automation.Common +{ + public class Constants + { + public class JobOutputParameter + { + public const string Any = "Any"; + + public const string Progress = JobStreamType.Progress; + + public const string Output = JobStreamType.Output; + + public const string Warning = JobStreamType.Warning; + + public const string Error = JobStreamType.Error; + + public const string Debug = JobStreamType.Debug; + + public const string Verbose = JobStreamType.Verbose; + } + + public class AutomationAccountState + { + public const string Ready = "Ready"; + + public const string Suspended = "Suspended"; + } + + // default schedule expiry time for daily schedule, consistent with UX + // 12/31/9999 12:00:00 AM + public static readonly DateTime DefaultScheduleExpiryTime = new DateTime(9999, 12, 31, 0, 0, 0, DateTimeKind.Utc); + + public const string JobStartedByParameterName = "MicrosoftApplicationManagementStartedBy"; + + public const string ClientIdentity = "PowerShell"; + + public const char RunbookTagsSeparatorChar = ','; + + public const string RunbookTagsSeparatorString = ","; + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/Common/IAutomationClient.cs b/src/ServiceManagement/Automation/Commands.Automation/Common/IAutomationClient.cs new file mode 100644 index 000000000000..0ec14ddcb7d3 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Common/IAutomationClient.cs @@ -0,0 +1,119 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Collections.Generic; +using Microsoft.Azure.Commands.Automation.Model; +using Microsoft.WindowsAzure.Commands.Common.Models; + +namespace Microsoft.Azure.Commands.Automation.Common +{ + public interface IAutomationClient + { + AzureSubscription Subscription { get; } + + IEnumerable ListAutomationAccounts(string automationAccountName, string location); + + Job GetJob(string automationAccountName, Guid jobId); + + IEnumerable ListJobs(string automationAccountName, DateTime? startTime, DateTime? endTime); + + IEnumerable ListJobsByRunbookId(string automationAccountName, Guid runbookId, DateTime? startTime, DateTime? endTime); + + IEnumerable ListJobsByRunbookName(string automationAccountName, string runbookName, DateTime? startTime, DateTime? endTime); + + IEnumerable ListJobStreamItems(string automationAccountName, Guid jobId, DateTime createdSince, string streamTypeName); + + Runbook GetRunbook(string automationAccountName, Guid runbookId); + + Runbook GetRunbook(string automationAccountName, string runbookName); + + IEnumerable ListRunbooks(string automationAccountName); + + IEnumerable ListRunbookByScheduleName(string automationAccountName, string scheduleName); + + IEnumerable ListRunbookDefinitionsByRunbookName(string automationAccountName, string runbookName, bool? isDraft); + + IEnumerable ListRunbookDefinitionsByRunbookId(string automationAccountName, Guid runbookId, bool? isDraft); + + IEnumerable ListRunbookDefinitionsByRunbookVersionId(string automationAccountName, Guid runbookVersionId, bool? isDraft); + + Schedule GetSchedule(string automationAccountName, Guid scheduleId); + + Schedule GetSchedule(string automationAccountName, string scheduleName); + + IEnumerable ListSchedules(string automationAccountName); + + Runbook CreateRunbookByName( + string automationAccountName, + string runbookName, + string description, + string[] tags); + + Runbook CreateRunbookByPath( + string automationAccountName, + string runbookPath, + string description, + string[] tags); + + Schedule CreateSchedule(string automationAccountName, OneTimeSchedule schedule); + + Schedule CreateSchedule(string automationAccountName, DailySchedule schedule); + + Schedule CreateSchedule(string automationAccountName, HourlySchedule schedule); + + Runbook PublishRunbook(string automationAccountName, Guid runbookId); + + Runbook PublishRunbook(string automationAccountName, string runbookName); + + Runbook RegisterScheduledRunbook(string automationAccountName, Guid runbookId, IDictionary parameters, string scheduleName); + + Runbook RegisterScheduledRunbook(string automationAccountName, string runbookName, IDictionary parameters, string scheduleName); + + void DeleteRunbook(string automationAccountName, Guid runbookId); + + void DeleteRunbook(string automationAccountName, string runbookName); + + void DeleteSchedule(string automationAccountName, Guid scheduleId); + + void DeleteSchedule(string automationAccountName, string scheduleName); + + void ResumeJob(string automationAccountName, Guid jobId); + + Runbook UpdateRunbook(string automationAccountName, Guid runbookId, string description, string[] tags, bool? logDebug, bool? logProgress, bool? logVerbose); + + Runbook UpdateRunbook(string automationAccountName, string runbookName, string description, string[] tags, bool? logDebug, bool? logProgress, bool? logVerbose); + + RunbookDefinition UpdateRunbookDefinition(string automationAccountName, Guid runbookId, string runbookPath, bool overwrite); + + RunbookDefinition UpdateRunbookDefinition(string automationAccountName, string runbookName, string runbookPath, bool overwrite); + + Schedule UpdateSchedule(string automationAccountName, Guid scheduleId, bool? isEnabled, string description); + + Schedule UpdateSchedule(string automationAccountName, string scheduleName, bool? isEnabled, string description); + + Job StartRunbook(string automationAccountName, Guid runbookId, IDictionary parameters); + + Job StartRunbook(string automationAccountName, string runbookName, IDictionary parameters); + + void StopJob(string automationAccountName, Guid jobId); + + void SuspendJob(string automationAccountName, Guid jobId); + + Runbook UnregisterScheduledRunbook(string automationAccountName, Guid runbookId, string scheduleName); + + Runbook UnregisterScheduledRunbook(string automationAccountName, string runbookName, string scheduleName); + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Automation/Commands.Automation/Common/Requires.cs b/src/ServiceManagement/Automation/Commands.Automation/Common/Requires.cs new file mode 100644 index 000000000000..1d7cdaa703be --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Common/Requires.cs @@ -0,0 +1,78 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.Azure.Commands.Automation.Common +{ + /// + /// Argument checking utility + /// + internal static class Requires + { + /// + /// Checks argument value + /// + /// Type of argument + /// Name of argument + /// Value of argument + /// The for this argument + public static ArgumentRequirements Argument(string name, T value) + { + return new ArgumentRequirements(name, value); + } + + /// + /// Argument requirement struct + /// + /// Type of argument + internal struct ArgumentRequirements + { + /// + /// The name. + /// + public string Name; + + /// + /// The value. + /// + public T Value; + + /// + /// Initializes a new instance of the ArgumentRequirements struct + /// + /// The name + /// The value + public ArgumentRequirements(string name, T value) + { + this.Name = name; + this.Value = value; + } + + /// + /// Checks argument value for not null + /// + /// The not null requirement + public ArgumentRequirements NotNull() + { + if (this.Value == null) + { + throw new ArgumentNullException(this.Name); + } + + return this; + } + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/Common/RequiresExtensions.cs b/src/ServiceManagement/Automation/Commands.Automation/Common/RequiresExtensions.cs new file mode 100644 index 000000000000..e77738bc9538 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Common/RequiresExtensions.cs @@ -0,0 +1,61 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Text.RegularExpressions; +using Microsoft.Azure.Commands.Automation.Properties; + +namespace Microsoft.Azure.Commands.Automation.Common +{ + internal static class RequiresExtensions + { + #region Constants + + private const string AccountNameValidator = "^[A-Za-z][-A-Za-z0-9]{4,48}[A-Za-z0-9]$"; + + #endregion + + #region Public Methods and Operators + + /// + /// Validates that the provided automation account name is valid. + /// + /// + /// The argument. + /// + /// + /// The . + /// + public static Requires.ArgumentRequirements ValidAutomationAccountName(this Requires.ArgumentRequirements argument) + { + Requires.Argument(argument.Name, argument.Value).NotNull(); + + string stringValue = argument.Value; + + if (!new Regex(AccountNameValidator).IsMatch(stringValue)) + { + // CDM TFS 665994 - we decided to display AutomationAccountNotFound even if the account name is invalid. + throw new ArgumentException( + string.Format( + CultureInfo.CurrentCulture, + Resources.AutomationAccountNotFound)); + } + + return argument; + } + + #endregion + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/Common/ResourceNotFoundException.cs b/src/ServiceManagement/Automation/Commands.Automation/Common/ResourceNotFoundException.cs new file mode 100644 index 000000000000..270105ee2a8c --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Common/ResourceNotFoundException.cs @@ -0,0 +1,43 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.Azure.Commands.Automation.Common +{ + [Serializable] + public class ResourceNotFoundException : Exception + { + public ResourceNotFoundException(Type resourceType, string message) : base(message) + { + this.ResourceType = resourceType; + } + + [NonSerialized] + private Type resourceType; + + public Type ResourceType + { + get + { + return this.resourceType; + } + + private set + { + this.resourceType = value; + } + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/DataContract/ErrorResponse.cs b/src/ServiceManagement/Automation/Commands.Automation/DataContract/ErrorResponse.cs new file mode 100644 index 000000000000..aba21a04144b --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/DataContract/ErrorResponse.cs @@ -0,0 +1,31 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Runtime.Serialization; + +namespace Microsoft.Azure.Commands.Automation.DataContract +{ + /// + /// The error response. + /// + [DataContract] + public class ErrorResponse + { + /// + /// Gets or sets the odata error. + /// + [DataMember(Name = "odata.error")] + public OdataError OdataError { get; set; } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/DataContract/OdataError.cs b/src/ServiceManagement/Automation/Commands.Automation/DataContract/OdataError.cs new file mode 100644 index 000000000000..f29983bd3c86 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/DataContract/OdataError.cs @@ -0,0 +1,37 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Runtime.Serialization; + +namespace Microsoft.Azure.Commands.Automation.DataContract +{ + /// + /// The odata error. + /// + [DataContract] + public class OdataError + { + /// + /// Gets or sets the code. + /// + [DataMember(Name = "code")] + public string Code { get; set; } + + /// + /// Gets or sets the message. + /// + [DataMember(Name = "message")] + public OdataErrorMessage Message { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Automation/Commands.Automation/DataContract/OdataErrorMessage.cs b/src/ServiceManagement/Automation/Commands.Automation/DataContract/OdataErrorMessage.cs new file mode 100644 index 000000000000..5b43e9f5df39 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/DataContract/OdataErrorMessage.cs @@ -0,0 +1,37 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Runtime.Serialization; + +namespace Microsoft.Azure.Commands.Automation.DataContract +{ + /// + /// The odata error message. + /// + [DataContract] + public class OdataErrorMessage + { + /// + /// Gets or sets the language. + /// + [DataMember(Name = "lang")] + public string Language { get; set; } + + /// + /// Gets or sets the value. + /// + [DataMember(Name = "value")] + public string Value { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Automation/Commands.Automation/MSSharedLibKey.snk b/src/ServiceManagement/Automation/Commands.Automation/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ServiceManagement/Automation/Commands.Automation/MSSharedLibKey.snk differ diff --git a/src/ServiceManagement/Automation/Commands.Automation/Microsoft.Azure.Commands.Automation.dll-help.psd1 b/src/ServiceManagement/Automation/Commands.Automation/Microsoft.Azure.Commands.Automation.dll-help.psd1 new file mode 100644 index 000000000000..c98c836462f5 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Microsoft.Azure.Commands.Automation.dll-help.psd1 @@ -0,0 +1,86 @@ +# +# Module manifest for module 'Azure' +# +# Generated by: Microsoft Corporation +# +# Generated on: 5/23/2012 +# + +@{ + +# Version number of this module. +ModuleVersion = '0.8.8' + +# ID used to uniquely identify this module +GUID = 'D48CF693-4125-4D2D-8790-1514F44CE325' + +# Author of this module +Author = 'Microsoft Corporation' + +# Company or vendor of this module +CompanyName = 'Microsoft Corporation' + +# Copyright statement for this module +Copyright = '?Microsoft Corporation. All rights reserved.' + +# Description of the functionality provided by this module +Description = '' + +# Minimum version of the Windows PowerShell engine required by this module +PowerShellVersion = '3.0' + +# Name of the Windows PowerShell host required by this module +PowerShellHostName = '' + +# Minimum version of the Windows PowerShell host required by this module +PowerShellHostVersion = '' + +# Minimum version of the .NET Framework required by this module +DotNetFrameworkVersion = '4.0' + +# Minimum version of the common language runtime (CLR) required by this module +CLRVersion='4.0' + +# Processor architecture (None, X86, Amd64, IA64) required by this module +ProcessorArchitecture = 'None' + +# Modules that must be imported into the global environment prior to importing this module +RequiredModules = @() + +# Assemblies that must be loaded prior to importing this module +RequiredAssemblies = @() + +# Script files (.ps1) that are run in the caller's environment prior to importing this module +ScriptsToProcess = @() + +# Type files (.ps1xml) to be loaded when importing this module +TypesToProcess = @() + +# Format files (.ps1xml) to be loaded when importing this module +FormatsToProcess = @() + +# Modules to import as nested modules of the module specified in ModuleToProcess +NestedModules = '..\..\..\Package\Debug\ServiceManagement\Azure\Automation\Microsoft.Azure.Commands.Automation.dll' + +# Functions to export from this module +FunctionsToExport = '*' + +# Cmdlets to export from this module +CmdletsToExport = '*' + +# Variables to export from this module +VariablesToExport = '*' + +# Aliases to export from this module +AliasesToExport = @() + +# List of all modules packaged with this module +ModuleList = @() + +# List of all files packaged with this module +FileList = @() + +# Private data to pass to the module specified in ModuleToProcess +PrivateData = '' + +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/Microsoft.Azure.Commands.Automation.dll-help.xml b/src/ServiceManagement/Automation/Commands.Automation/Microsoft.Azure.Commands.Automation.dll-help.xml new file mode 100644 index 000000000000..a914885a0449 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Microsoft.Azure.Commands.Automation.dll-help.xml @@ -0,0 +1,3996 @@ + + + + + Get-AzureAutomationAccount + + Gets Azure Automation accounts. + + + + + Get + AzureAutomationAccount + + + + + The Get-AzureAutomationAccount cmdlet gets the Microsoft Azure Automation accounts for your subscription. An Automation account is a container for Automation resources that is isolated from the resources of other Automation accounts. Automation resources include runbooks, jobs, and assets. + + + + Get-AzureAutomationAccount + + Name + + Specifies the name of an Azure Automation account. + + String + + + Location + + Specifies an Azure location associated with Automation accounts. + + String + + + + + + Name + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + Location + + Specifies an Azure location associated with Automation accounts. + + String + + String + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Get an Automation account -------------------------- + + + + PS C:\>Get-AzureAutomationAccount -Name "Contoso17" + + This command gets the Automation account named Contoso17. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397902 + + + + + + + Get-AzureAutomationJob + + Gets one or more Azure Automation runbook jobs. + + + + + Get + AzureAutomationJob + + + + + The Get-AzureAutomationJob cmdlet gets one or more runbook jobs in Microsoft Azure Automation. + + + + Get-AzureAutomationJob + + StartTime + + Specifies the start time of a job as a DateTime object. This cmdlet gets jobs that have a start time at or after the value that this parameter specifies. To obtain a DateTime object, use the Get-Date cmdlet. + + Nullable`1[DateTime] + + + EndTime + + Specifies the end time for a job as a DateTime object. This cmdlet gets jobs that have an end time at or before the value that this parameter specifies. To obtain a DateTime object, use the Get-Date cmdlet. For more information, type Get-Help Get-Date. + + Nullable`1[DateTime] + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + Get-AzureAutomationJob + + Id + + Specifies the ID of a job. + + Nullable`1[Guid] + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + Get-AzureAutomationJob + + RunbookId + + Specifies the ID of a runbook. + + Nullable`1[Guid] + + + StartTime + + Specifies the start time of a job as a DateTime object. This cmdlet gets jobs that have a start time at or after the value that this parameter specifies. To obtain a DateTime object, use the Get-Date cmdlet. + + Nullable`1[DateTime] + + + EndTime + + Specifies the end time for a job as a DateTime object. This cmdlet gets jobs that have an end time at or before the value that this parameter specifies. To obtain a DateTime object, use the Get-Date cmdlet. For more information, type Get-Help Get-Date. + + Nullable`1[DateTime] + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + Get-AzureAutomationJob + + RunbookName + + Specifies the name of a runbook. + + String + + + StartTime + + Specifies the start time of a job as a DateTime object. This cmdlet gets jobs that have a start time at or after the value that this parameter specifies. To obtain a DateTime object, use the Get-Date cmdlet. + + Nullable`1[DateTime] + + + EndTime + + Specifies the end time for a job as a DateTime object. This cmdlet gets jobs that have an end time at or before the value that this parameter specifies. To obtain a DateTime object, use the Get-Date cmdlet. For more information, type Get-Help Get-Date. + + Nullable`1[DateTime] + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + + + StartTime + + Specifies the start time of a job as a DateTime object. This cmdlet gets jobs that have a start time at or after the value that this parameter specifies. To obtain a DateTime object, use the Get-Date cmdlet. + + Nullable`1[DateTime] + + Nullable`1[DateTime] + + + none + + + EndTime + + Specifies the end time for a job as a DateTime object. This cmdlet gets jobs that have an end time at or before the value that this parameter specifies. To obtain a DateTime object, use the Get-Date cmdlet. For more information, type Get-Help Get-Date. + + Nullable`1[DateTime] + + Nullable`1[DateTime] + + + none + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + Id + + Specifies the ID of a job. + + Nullable`1[Guid] + + Nullable`1[Guid] + + + none + + + RunbookId + + Specifies the ID of a runbook. + + Nullable`1[Guid] + + Nullable`1[Guid] + + + none + + + RunbookName + + Specifies the name of a runbook. + + String + + String + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Get a runbook job -------------------------- + + + + PS C:\>Get-AzureAutomationJob -AutomationAccountName "Contoso17" -Id 2989b069-24fe-40b9-b3bd-cb7e5eac4b647 + + This command gets the job that has the specified GUID. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397903 + + + Resume-AzureAutomationJob + + + + Stop-AzureAutomationJob + + + + Suspend-AzureAutomationJob + + + + + + + + Get-AzureAutomationJobOutput + + Gets the output of an Azure Automation job. + + + + + Get + AzureAutomationJobOutput + + + + + The Get-AzureAutomationJobOutput cmdlet gets the output of a Microsoft Azure Automation job. + + + + Get-AzureAutomationJobOutput + + Id + + Specifies the ID of a job. + + Guid + + + StartTime + + Specifies a start time as a DateTime object. The cmdlet retrieves output created after this time. To obtain a DateTime object, use the Get-Date cmdlet. For more information, type Get-Help Get-Date. + + DateTime + + + Stream + + Specifies the type of output. Valid values are: + + -- Any + -- Debug + -- Error + -- Output + -- Progress + -- Verbose + -- Warning + + String + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + + + Id + + Specifies the ID of a job. + + Guid + + Guid + + + none + + + StartTime + + Specifies a start time as a DateTime object. The cmdlet retrieves output created after this time. To obtain a DateTime object, use the Get-Date cmdlet. For more information, type Get-Help Get-Date. + + DateTime + + DateTime + + + none + + + Stream + + Specifies the type of output. Valid values are: + + -- Any + -- Debug + -- Error + -- Output + -- Progress + -- Verbose + -- Warning + + String + + String + + + none + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Get the output of an Azure Automation job -------------------------- + + + + PS C:\>Get-AzureAutomationJobOutput -AutomationAccountName "Contoso17" -Id 2989b069-24fe-40b9-b3bd-cb7e5eac4b64 -Stream "Any" + + This command gets all of the output of the job that has the specified ID. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397904 + + + Get-AzureAutomationJob + + + + Resume-AzureAutomationJob + + + + Stop-AzureAutomationJob + + + + Suspend-AzureAutomationJob + + + + + + + + Get-AzureAutomationRunbook + + Gets a runbook. + + + + + Get + AzureAutomationRunbook + + + + + The Get-AzureAutomationRunbook cmdlet gets one or more Microsoft Azure Automation runbooks. By default, all runbooks are returned. To get a specific runbook, specify its name or ID. To get all runbooks linked to a specific schedule, specify the schedule name. + + + + Get-AzureAutomationRunbook + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + Get-AzureAutomationRunbook + + Id + + Specifies the ID of a runbook. + + Nullable`1[Guid] + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + Get-AzureAutomationRunbook + + Name + + Specifies the name of a runbook. + + String + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + Get-AzureAutomationRunbook + + ScheduleName + + Specifies the name of a schedule. + + String + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + Id + + Specifies the ID of a runbook. + + Nullable`1[Guid] + + Nullable`1[Guid] + + + none + + + Name + + Specifies the name of a runbook. + + String + + String + + + none + + + ScheduleName + + Specifies the name of a schedule. + + String + + String + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Get all runbooks -------------------------- + + + + PS C:\>Get-AzureAutomationRunbook -AutomationAccountName "Contoso17" + + This command gets all runbooks in the Azure Automation account named Contoso17. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397905 + + + New-AzureAutomationRunbook + + + + Publish-AzureAutomationRunbook + + + + Remove-AzureAutomationRunbook + + + + Set-AzureAutomationRunbook + + + + Start-AzureAutomationRunbook + + + + + + + + Get-AzureAutomationRunbookDefinition + + Gets a runbook definition. + + + + + Get + AzureAutomationRunbookDefinition + + + + + The Get-AzureAutomationRunbookDefinition cmdlet gets the draft definition, the published definition, or both definitions of an Azure Automation runbook. By default, both runbook definitions are returned. + + + + Get-AzureAutomationRunbookDefinition + + Name + + Specifies the name of a runbook. + + String + + + Slot + + Specifies a runbook definition type. Valid values are: + + -- Published + -- Draft + + String + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + Get-AzureAutomationRunbookDefinition + + Id + + Specifies the ID of a runbook. + + Nullable`1[Guid] + + + Slot + + Specifies a runbook definition type. Valid values are: + + -- Published + -- Draft + + String + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + Get-AzureAutomationRunbookDefinition + + VersionId + + Specifies the ID of a runbook version. + + Nullable`1[Guid] + + + Slot + + Specifies a runbook definition type. Valid values are: + + -- Published + -- Draft + + String + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + + + Name + + Specifies the name of a runbook. + + String + + String + + + none + + + Slot + + Specifies a runbook definition type. Valid values are: + + -- Published + -- Draft + + String + + String + + + none + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + Id + + Specifies the ID of a runbook. + + Nullable`1[Guid] + + Nullable`1[Guid] + + + none + + + VersionId + + Specifies the ID of a runbook version. + + Nullable`1[Guid] + + Nullable`1[Guid] + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Get a runbook definition -------------------------- + + + + PS C:\>Get-AzureAutomationRunbookDefinition -AutomationAccountName "Contoso17" -Name "RunbookDef01" -Slot "Published" + + This command gets the published runbook definition of the runbook named RunbookDef01 in the Azure Automation account named Contoso17. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397906 + + + Set-AzureAutomationRunbookDefinition + + + + + + + + Get-AzureAutomationSchedule + + Gets an Azure Automation schedule. + + + + + Get + AzureAutomationSchedule + + + + + The Get-AzureAutomationSchedule cmdlet gets a Microsoft Azure Automation schedule. + + + + Get-AzureAutomationSchedule + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + Get-AzureAutomationSchedule + + Id + + Specifies the ID of a schedule. + + Nullable`1[Guid] + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + Get-AzureAutomationSchedule + + Name + + Specifies the name of a schedule. + + String + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + Id + + Specifies the ID of a schedule. + + Nullable`1[Guid] + + Nullable`1[Guid] + + + none + + + Name + + Specifies the name of a schedule. + + String + + String + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Get a schedule -------------------------- + + + + PS C:\>Get-AzureAutomationSchedule -AutomationAccountName "Contoso17" -Name "DailySchedule08" + + This command gets the schedule named DailySchedule08. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId= 397907 + + + New-AzureAutomationSchedule + + + + Remove-AzureAutomationSchedule + + + + Set-AzureAutomationSchedule + + + + + + + + New-AzureAutomationRunbook + + Creates a new runbook. + + + + + New + AzureAutomationRunbook + + + + + The New-AzureAutomationRunbook cmdlet creates a new, empty Microsoft Azure Automation runbook. Specify a name to create a new runbook.You can also specify the path to a Windows PowerShell? script (.ps1 ) file to import a runbook. The script to import must contain a single Windows PowerShell? Workflow definition. The name of this Windows PowerShell Workflow becomes the name of the runbook. + + + + New-AzureAutomationRunbook + + Name + + Specifies the name for the runbook. + + String + + + Description + + Specifies a description for the runbook. + + String + + + Tags + + Specifies one or more runbook tags. + + String[] + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + New-AzureAutomationRunbook + + Path + + Specifies the path to a runbook to import. + + String + + + Description + + Specifies a description for the runbook. + + String + + + Tags + + Specifies one or more runbook tags. + + String[] + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + + + Name + + Specifies the name for the runbook. + + String + + String + + + none + + + Description + + Specifies a description for the runbook. + + String + + String + + + none + + + Tags + + Specifies one or more runbook tags. + + String[] + + String[] + + + none + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + Path + + Specifies the path to a runbook to import. + + String + + String + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Create a runbook -------------------------- + + + + PS C:\>New-AzureAutomationRunbook -AutomationAccountName "Contoso17" -Name "Runbook02" + + This command creates a new runbook named Runbook02 in the Azure Automation account named Contoso17. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397908 + + + Get-AzureAutomationRunbook + + + + Publish-AzureAutomationRunbook + + + + Remove-AzureAutomationRunbook + + + + Set-AzureAutomationRunbook + + + + Start-AzureAutomationRunbook + + + + + + + + New-AzureAutomationSchedule + + Creates an Azure Automation schedule. + + + + + New + AzureAutomationSchedule + + + + + The New-AzureAutomationSchedule cmdlet creates a schedule in Microsoft Azure Automation. + + + + New-AzureAutomationSchedule + + Name + + Specifies a name for the schedule. + + String + + + StartTime + + Specifies the start time of a schedule as a DateTime object. To obtain a DateTime object, use the Get-Date cmdlet. + + DateTime + + + Description + + Specifies a description. + + String + + + ExpiryTime + + Specifies the expiry time of a schedule as a DateTime object. To obtain a DateTime object, use the Get-Date cmdlet. For more information, type Get-Help Get-Date. + + DateTime + + + DayInterval + + Specifies an interval for the schedule in days. If you do not specify this parameter, and you do not specify the OneTime parameter, then the day interval of the schedule is 1. + + Int32 + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + New-AzureAutomationSchedule + + Name + + Specifies a name for the schedule. + + String + + + StartTime + + Specifies the start time of a schedule as a DateTime object. To obtain a DateTime object, use the Get-Date cmdlet. + + DateTime + + + Description + + Specifies a description. + + String + + + OneTime + + Specifies that the cmdlet creates a one-time schedule. + + SwitchParameter + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + + + Name + + Specifies a name for the schedule. + + String + + String + + + none + + + StartTime + + Specifies the start time of a schedule as a DateTime object. To obtain a DateTime object, use the Get-Date cmdlet. + + DateTime + + DateTime + + + none + + + Description + + Specifies a description. + + String + + String + + + none + + + ExpiryTime + + Specifies the expiry time of a schedule as a DateTime object. To obtain a DateTime object, use the Get-Date cmdlet. For more information, type Get-Help Get-Date. + + DateTime + + DateTime + + + none + + + DayInterval + + Specifies an interval for the schedule in days. If you do not specify this parameter, and you do not specify the OneTime parameter, then the day interval of the schedule is 1. + + Int32 + + Int32 + + + none + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + OneTime + + Specifies that the cmdlet creates a one-time schedule. + + SwitchParameter + + SwitchParameter + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Create a schedule -------------------------- + + + + PS C:\>$StartDate = Get-Date -Day 12 -Month 6 -Year 2016 + PS C:\> $EndDate = Get-Date -Day 12 -Month 6 -Year 2023 + PS C:\> New-AzureAutomationSchedule -AutomationAccountName "Contoso17" -Name "Schedule01" -StartTime $StartDate -ExpiryTime $EndDate + + The first command creates a date object by using the Get-Date cmdlet, and then stores the object in the $StartDate variable. Specify a time that is at least five minutes in the future. For more information, type Get-Help Get-Date. + + + + The second command creates a date object by using the Get-Date cmdlet, and then stores the object in the $EndDate variable. The command specifies a future time.The final command creates a daily schedule named Schedule01 to begin at the time stored in $StartDate and expire at the time stored in $EndDate. + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397909 + + + Get-AzureAutomationSchedule + + + + Remove-AzureAutomationSchedule + + + + Set-AzureAutomationSchedule + + + + + + + + Publish-AzureAutomationRunbook + + Publishes a runbook. + + + + + Publish + AzureAutomationRunbook + + + + + The Publish-AzureAutomationRunbook cmdlet publishes a runbook for use in the production environment of Microsoft Azure Automation. + + + + Publish-AzureAutomationRunbook + + Name + + Specifies the name of a runbook. + + String + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + Publish-AzureAutomationRunbook + + Id + + Specifies the ID of a runbook. + + Nullable`1[Guid] + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + + + Name + + Specifies the name of a runbook. + + String + + String + + + none + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + Id + + Specifies the ID of a runbook. + + Nullable`1[Guid] + + Nullable`1[Guid] + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Publish a runbook -------------------------- + + + + PS C:\>Publish-AzureAutomationRunbook -AutomationAccountName "Contoso17" -Name "Runbk01" + + This command publishes the runbook named Runbk01 in the Azure Automation account named Contoso17. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397910 + + + Get-AzureAutomationRunbook + + + + New-AzureAutomationRunbook + + + + Remove-AzureAutomationRunbook + + + + Set-AzureAutomationRunbook + + + + Start-AzureAutomationRunbook + + + + + + + + Register-AzureAutomationScheduledRunbook + + Associates a runbook with a schedule. + + + + + Register + AzureAutomationScheduledRunbook + + + + + The Register-AzureAutomationScheduledRunbook cmdlet associates a runbook with a schedule. The runbook starts based on the schedule you specify using the ScheduleName parameter. + + + + Register-AzureAutomationScheduledRunbook + + ScheduleName + + Specifies the name of a schedule. To create a schedule in Azure Automation, use the New-AzureAutomationSchedule cmdlet. + + String + + + Name + + Specifies the name of a runbook. + + String + + + Parameters + + Specifies a hash table of key/value pairs. The keys in the hash table are the runbook parameter names. The values in the hash table are the runbook parameter values. When the runbook starts in response to when the associated schedule fires, these parameters are passed to the runbook. + + IDictionary + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + Register-AzureAutomationScheduledRunbook + + ScheduleName + + Specifies the name of a schedule. To create a schedule in Azure Automation, use the New-AzureAutomationSchedule cmdlet. + + String + + + Id + + Specifies the ID of a runbook. + + Nullable`1[Guid] + + + Parameters + + Specifies a hash table of key/value pairs. The keys in the hash table are the runbook parameter names. The values in the hash table are the runbook parameter values. When the runbook starts in response to when the associated schedule fires, these parameters are passed to the runbook. + + IDictionary + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + + + ScheduleName + + Specifies the name of a schedule. To create a schedule in Azure Automation, use the New-AzureAutomationSchedule cmdlet. + + String + + String + + + none + + + Name + + Specifies the name of a runbook. + + String + + String + + + none + + + Parameters + + Specifies a hash table of key/value pairs. The keys in the hash table are the runbook parameter names. The values in the hash table are the runbook parameter values. When the runbook starts in response to when the associated schedule fires, these parameters are passed to the runbook. + + IDictionary + + IDictionary + + + none + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + Id + + Specifies the ID of a runbook. + + Nullable`1[Guid] + + Nullable`1[Guid] + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Associate a runbook with a schedule -------------------------- + + + + PS C:\>Register-AzureAutomationScheduledRunbook -AutomationAccountName "Contoso17" -Name "Runbk01" -ScheduleName "Sched01" + + This command associates the runbook named Runbk01 with the schedule named Sched01 in the Azure Automation account named Contoso17. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397911 + + + New-AzureAutomationSchedule + + + + Unregister-AzureAutomationScheduledRunbook + + + + + + + + Remove-AzureAutomationRunbook + + Removes a runbook. + + + + + Remove + AzureAutomationRunbook + + + + + The Remove-AzureAutomationRunbook cmdlet removes a runbook from Microsoft Azure Automation. + + + + Remove-AzureAutomationRunbook + + Name + + Specifies the name of a runbook. + + String + + + Force + + Forces the command to run without asking for user confirmation. + + SwitchParameter + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet.Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + Remove-AzureAutomationRunbook + + Id + + Specifies the ID of a runbook. + + Nullable`1[Guid] + + + Force + + Forces the command to run without asking for user confirmation. + + SwitchParameter + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet.Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + + + Name + + Specifies the name of a runbook. + + String + + String + + + none + + + Force + + Forces the command to run without asking for user confirmation. + + SwitchParameter + + SwitchParameter + + + none + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + SwitchParameter + + + false + + + Confirm + + Prompts you for confirmation before running the cmdlet.Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + SwitchParameter + + + false + + + Id + + Specifies the ID of a runbook. + + Nullable`1[Guid] + + Nullable`1[Guid] + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Remove a runbook -------------------------- + + + + PS C:\>Remove-AzureAutomationRunbook -AutomationAccountName "Contoso17" -Name "MyRunbook" + + This command removes the runbook named MyRunbook in the Azure Automation account named Contoso17. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397912 + + + Get-AzureAutomationRunbook + + + + New-AzureAutomationRunbook + + + + Publish-AzureAutomationRunbook + + + + Set-AzureAutomationRunbook + + + + Start-AzureAutomationRunbook + + + + + + + + Remove-AzureAutomationSchedule + + Deletes an Azure Automation schedule. + + + + + Remove + AzureAutomationSchedule + + + + + The Remove-AzureAutomationSchedule cmdlet deletes a schedule from Microsoft Azure Automation. + + + + Remove-AzureAutomationSchedule + + Name + + Specifies the name of a schedule. + + String + + + Force + + Forces the command to run without asking for user confirmation. + + SwitchParameter + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet.Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + Remove-AzureAutomationSchedule + + Id + + Specifies the ID of a schedule. + + Nullable`1[Guid] + + + Force + + Forces the command to run without asking for user confirmation. + + SwitchParameter + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet.Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + + + Name + + Specifies the name of a schedule. + + String + + String + + + none + + + Force + + Forces the command to run without asking for user confirmation. + + SwitchParameter + + SwitchParameter + + + none + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + SwitchParameter + + + false + + + Confirm + + Prompts you for confirmation before running the cmdlet.Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + SwitchParameter + + + false + + + Id + + Specifies the ID of a schedule. + + Nullable`1[Guid] + + Nullable`1[Guid] + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Remove a schedule -------------------------- + + + + PS C:\>Remove-AzureAutomationSchedule -AutomationAccountName "Contoso17" -Name "MySchedule" + + This command removes the schedule named MySchedule. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397913 + + + Get-AzureAutomationSchedule + + + + New-AzureAutomationSchedule + + + + Set-AzureAutomationSchedule + + + + + + + + Resume-AzureAutomationJob + + Resumes a suspended Azure Automation job. + + + + + Resume + AzureAutomationJob + + + + + The Resume-AzureAutomationJob cmdlet resumes a suspended Microsoft Azure Automation job. Specify the suspended job. To suspend a job, use the Suspend-AzureAutomationJob cmdlet. + + + + Resume-AzureAutomationJob + + Id + + Specifies the ID of a job. + + Guid + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + + + Id + + Specifies the ID of a job. + + Guid + + Guid + + + none + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Resume a suspended job -------------------------- + + + + PS C:\>Resume-AzureAutomationJob -AutomationAccountName "Contoso17" -Id 2989b069-24fe-40b9-b3bd-cb7e5eac4b64 + + This command resumes the job that has the specified ID. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397914 + + + Get-AzureAutomationJob + + + + Stop-AzureAutomationJob + + + + Suspend-AzureAutomationJob + + + + + + + + Set-AzureAutomationRunbook + + Modifies the configuration of a runbook. + + + + + Set + AzureAutomationRunbook + + + + + The Set-AzureAutomationRunbook cmdlet modifies the configuration of a Microsoft Azure Automation runbook. + + + + Set-AzureAutomationRunbook + + Name + + Specifies the name of a runbook. + + String + + + Description + + Specifies a description for the runbook. + + String + + + Tags + + Specifies one or more runbook tags. + + String[] + + + LogDebug + + Indicates whether debug output is logged for jobs of this runbook. + + Nullable`1[Boolean] + + + LogProgress + + Indicates whether progress output is logged for jobs of this runbook. + + Nullable`1[Boolean] + + + LogVerbose + + Indicates whether verbose output is logged for jobs of this runbook. + + Nullable`1[Boolean] + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + Set-AzureAutomationRunbook + + Id + + Specifies the ID of a runbook. + + Nullable`1[Guid] + + + Description + + Specifies a description for the runbook. + + String + + + Tags + + Specifies one or more runbook tags. + + String[] + + + LogDebug + + Indicates whether debug output is logged for jobs of this runbook. + + Nullable`1[Boolean] + + + LogProgress + + Indicates whether progress output is logged for jobs of this runbook. + + Nullable`1[Boolean] + + + LogVerbose + + Indicates whether verbose output is logged for jobs of this runbook. + + Nullable`1[Boolean] + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + + + Name + + Specifies the name of a runbook. + + String + + String + + + none + + + Description + + Specifies a description for the runbook. + + String + + String + + + none + + + Tags + + Specifies one or more runbook tags. + + String[] + + String[] + + + none + + + LogDebug + + Indicates whether debug output is logged for jobs of this runbook. + + Nullable`1[Boolean] + + Nullable`1[Boolean] + + + none + + + LogProgress + + Indicates whether progress output is logged for jobs of this runbook. + + Nullable`1[Boolean] + + Nullable`1[Boolean] + + + none + + + LogVerbose + + Indicates whether verbose output is logged for jobs of this runbook. + + Nullable`1[Boolean] + + Nullable`1[Boolean] + + + none + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + Id + + Specifies the ID of a runbook. + + Nullable`1[Guid] + + Nullable`1[Guid] + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Enable verbose logging for a runbook -------------------------- + + + + PS C:\>Set-AzureAutomationRunbook -AutomationAccountName "Contoso17" -Name "MyRunbook" -LogVerbose $True + + This command enables verbose logging for the jobs of the specified runbook in the Azure Automation account named Contoso17. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397915 + + + Get-AzureAutomationRunbook + + + + New-AzureAutomationRunbook + + + + Publish-AzureAutomationRunbook + + + + Remove-AzureAutomationRunbook + + + + Start-AzureAutomationRunbook + + + + + + + + Set-AzureAutomationRunbookDefinition + + Updates the draft definition of a runbook. + + + + + Set + AzureAutomationRunbookDefinition + + + + + The Set-AzureAutomationRunbookDefinition cmdlet updates the draft definition of a Microsoft Azure Automation runbook. Provide a Windows PowerShell? script (.ps1) file that contains a runbook which becomes the draft runbook. If a draft already exists, use the Overwrite parameter to force the cmdlet to overwrite the existing draft. + + + + Set-AzureAutomationRunbookDefinition + + Name + + Specifies the name of a runbook. + + String + + + Path + + Specifies the path to the new draft runbook. + + String + + + Overwrite + + Indicates that the new draft runbook overwrites the existing draft, if one exists. + + SwitchParameter + + + AutomationAccountName + + Specifies the name of an automation account. + + String + + + + Set-AzureAutomationRunbookDefinition + + Id + + Specifies the ID of a runbook. + + Nullable`1[Guid] + + + Path + + Specifies the path to the new draft runbook. + + String + + + Overwrite + + Indicates that the new draft runbook overwrites the existing draft, if one exists. + + SwitchParameter + + + AutomationAccountName + + Specifies the name of an automation account. + + String + + + + + + Name + + Specifies the name of a runbook. + + String + + String + + + none + + + Path + + Specifies the path to the new draft runbook. + + String + + String + + + none + + + Overwrite + + Indicates that the new draft runbook overwrites the existing draft, if one exists. + + SwitchParameter + + SwitchParameter + + + none + + + AutomationAccountName + + Specifies the name of an automation account. + + String + + String + + + none + + + Id + + Specifies the ID of a runbook. + + Nullable`1[Guid] + + Nullable`1[Guid] + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Overwrite an existing draft definition of a runbook -------------------------- + + + + PS C:\>Set-AzureAutomationRunbookDefinition -AutomationAccountName "Contoso17" -Name "Runbk01" -Path App01.ps1 -Overwrite + + This command overwrites the existing draft definition of a runbook. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397916 + + + Get-AzureAutomationRunbookDefinition + + + + + + + + Set-AzureAutomationSchedule + + Modifies an Azure Automation schedule. + + + + + Set + AzureAutomationSchedule + + + + + The Set-AzureAutomationSchedule cmdlet modifies a schedule in Microsoft Azure Automation. + + + + Set-AzureAutomationSchedule + + Name + + Specifies the name of a schedule. + + String + + + IsEnabled + + + + Nullable`1[Boolean] + + + Description + + Specifies a description. + + String + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + Set-AzureAutomationSchedule + + Id + + Specifies the ID of a schedule. + + Nullable`1[Guid] + + + IsEnabled + + + + Nullable`1[Boolean] + + + Description + + Specifies a description. + + String + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + + + Name + + Specifies the name of a schedule. + + String + + String + + + none + + + IsEnabled + + + + Nullable`1[Boolean] + + Nullable`1[Boolean] + + + + + + Description + + Specifies a description. + + String + + String + + + none + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + Id + + Specifies the ID of a schedule. + + Nullable`1[Guid] + + Nullable`1[Guid] + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Modify a schedule -------------------------- + + + + PS C:\>Set-AzureAutomationSchedule -AutomationAccountName "Contoso17" -Name "Schedule01" -Description "Automation Schedule" + + This command modifies the description of the schedule named Schedule01. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397917 + + + Get-AzureAutomationSchedule + + + + New-AzureAutomationSchedule + + + + Remove-AzureAutomationSchedule + + + + + + + + Start-AzureAutomationRunbook + + Starts a runbook job. + + + + + Start + AzureAutomationRunbook + + + + + The Start-AzureAutomationRunbook cmdlet starts a Microsoft Azure Automation runbook job. Specify the ID or name of a runbook. + + + + Start-AzureAutomationRunbook + + Name + + Specifies the name of a runbook. + + String + + + Parameters + + Specifies a hash table of key/value pairs. The keys in the hash table are the runbook parameter names. The values in the hash table are the runbook parameter values. + + IDictionary + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + Start-AzureAutomationRunbook + + Id + + Specifies the ID of a runbook. + + Nullable`1[Guid] + + + Parameters + + Specifies a hash table of key/value pairs. The keys in the hash table are the runbook parameter names. The values in the hash table are the runbook parameter values. + + IDictionary + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + + + Name + + Specifies the name of a runbook. + + String + + String + + + none + + + Parameters + + Specifies a hash table of key/value pairs. The keys in the hash table are the runbook parameter names. The values in the hash table are the runbook parameter values. + + IDictionary + + IDictionary + + + none + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + Id + + Specifies the ID of a runbook. + + Nullable`1[Guid] + + Nullable`1[Guid] + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Start a runbook job -------------------------- + + + + PS C:\>Start-AzureAutomationRunbook -AutomationAccountName "Contoso17" -Name "Runbk01" + + This command starts a runbook job for the runbook named Runbk01 in the Azure Automation account named Contoso17. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397918 + + + Get-AzureAutomationRunbook + + + + New-AzureAutomationRunbook + + + + Publish-AzureAutomationRunbook + + + + Remove-AzureAutomationRunbook + + + + Set-AzureAutomationRunbook + + + + + + + + Stop-AzureAutomationJob + + Stops an Azure Automation job. + + + + + Stop + AzureAutomationJob + + + + + The Stop-AzureAutomationJob cmdlet stops a Microsoft Azure Automation job. Specify a running automation job. + + + + Stop-AzureAutomationJob + + Id + + Specifies the ID of a job. + + Guid + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + + + Id + + Specifies the ID of a job. + + Guid + + Guid + + + none + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Stop a job -------------------------- + + + + PS C:\>Stop-AzureAutomationJob -AutomationAccountName "Contoso17" -Id 2989b069-24fe-40b9-b3bd-cb7e5eac4b64 + + This command stops the job that has the specified ID. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397919 + + + Get-AzureAutomationJob + + + + Resume-AzureAutomationJob + + + + Suspend-AzureAutomationJob + + + + + + + + Suspend-AzureAutomationJob + + Suspends an Azure Automation job. + + + + + Suspend + AzureAutomationJob + + + + + The Suspend-AzureAutomationJob cmdlet suspends a Microsoft Azure Automation job. Specify a running Automation job. To resume a suspended job, use the Resume-AzureAutomationJob cmdlet. + + + + Suspend-AzureAutomationJob + + Id + + Specifies the ID of a job. + + Guid + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + + + Id + + Specifies the ID of a job. + + Guid + + Guid + + + none + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Suspend a job -------------------------- + + + + PS C:\>Suspend-AzureAutomationJob -AutomationAccountName "Contoso17" -Id 2989b069-24fe-40b9-b3bd-cb7e5eac4b64 + + This command suspends the job that has the specified ID. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397920 + + + Get-AzureAutomationJob + + + + Resume-AzureAutomationJob + + + + Stop-AzureAutomationJob + + + + + + + + Unregister-AzureAutomationScheduledRunbook + + Removes an association between a runbook and a schedule. + + + + + Unregister + AzureAutomationScheduledRunbook + + + + + The Unregister-AzureAutomationScheduledRunbook cmdlet removes the association between a Microsoft Azure Automation runbook and a schedule, which stops the runbook from starting when the schedule fires. + + + + Unregister-AzureAutomationScheduledRunbook + + Name + + Specifies the name of a runbook. + + String + + + ScheduleName + + Specifies the name of a schedule. + + String + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + Unregister-AzureAutomationScheduledRunbook + + Id + + Specifies the ID of a runbook. + + Nullable`1[Guid] + + + ScheduleName + + Specifies the name of a schedule. + + String + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + + + Name + + Specifies the name of a runbook. + + String + + String + + + none + + + ScheduleName + + Specifies the name of a schedule. + + String + + String + + + none + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + Id + + Specifies the ID of a runbook. + + Nullable`1[Guid] + + Nullable`1[Guid] + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Remove the association between a runbook and a schedule -------------------------- + + + + PS C:\>Unregister-AzureAutomationScheduledRunbook -AutomationAccountName "Contoso17" -Name "Runbk01" -ScheduleName "Runbk01Sched" + + This command removes the association between the runbook named Runbk01 and the schedule named Runbk01Sched. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397921 + + + Register-AzureAutomationScheduledRunbook + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Automation/Commands.Automation/Model/AutomationAccount.cs b/src/ServiceManagement/Automation/Commands.Automation/Model/AutomationAccount.cs new file mode 100644 index 000000000000..f3259abd7d35 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Model/AutomationAccount.cs @@ -0,0 +1,87 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.Automation.Common; + +namespace Microsoft.Azure.Commands.Automation.Model +{ + using AutomationManagement = Management.Automation; + + /// + /// The automation account. + /// + public class AutomationAccount + { + /// + /// Initializes a new instance of the class. + /// + /// + /// The cloud service. + /// + /// + /// The resource. + /// + public AutomationAccount( + AutomationManagement.Models.CloudService cloudService, + AutomationManagement.Models.AutomationResource resource) + { + Requires.Argument("cloudService", cloudService).NotNull(); + Requires.Argument("resource", resource).NotNull(); + + this.AutomationAccountName = resource.Name; + this.Location = cloudService.GeoRegion; + this.Plan = resource.Plan; + + switch (resource.State) + { + case AutomationManagement.Models.AutomationResourceState.Started: + this.State = Constants.AutomationAccountState.Ready; + break; + case AutomationManagement.Models.AutomationResourceState.Stopped: + this.State = Constants.AutomationAccountState.Suspended; + break; + default: + this.State = resource.State; + break; + } + } + + /// + /// Initializes a new instance of the class. + /// + public AutomationAccount() + { + } + + /// + /// Gets or sets the plan. + /// + public string Plan { get; set; } + + /// + /// Gets or sets the location. + /// + public string Location { get; set; } + + /// + /// Gets or sets the state. + /// + public string State { get; set; } + + /// + /// Gets or sets the automation account name. + /// + public string AutomationAccountName { get; set; } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/Model/DailySchedule.cs b/src/ServiceManagement/Automation/Commands.Automation/Model/DailySchedule.cs new file mode 100644 index 000000000000..1ebb28e058ca --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Model/DailySchedule.cs @@ -0,0 +1,69 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Properties; + +namespace Microsoft.Azure.Commands.Automation.Model +{ + /// + /// The daily schedule. + /// + public class DailySchedule : Schedule + { + /// + /// Initializes a new instance of the class. + /// + /// + /// The schedule. + /// + public DailySchedule(Azure.Management.Automation.Models.Schedule schedule) + { + Requires.Argument("schedule", schedule).NotNull(); + + if (!schedule.DayInterval.HasValue) + { + throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Resources.InvalidDailyScheduleModel, schedule.Name)); + } + + this.Id = new Guid(schedule.Id); + this.AccountId = new Guid(schedule.AccountId); + this.Name = schedule.Name; + this.Description = schedule.Description; + this.StartTime = DateTime.SpecifyKind(schedule.StartTime, DateTimeKind.Utc).ToLocalTime(); + this.ExpiryTime = DateTime.SpecifyKind(schedule.ExpiryTime, DateTimeKind.Utc).ToLocalTime(); + this.CreationTime = DateTime.SpecifyKind(schedule.CreationTime, DateTimeKind.Utc).ToLocalTime(); + this.LastModifiedTime = DateTime.SpecifyKind(schedule.LastModifiedTime, DateTimeKind.Utc).ToLocalTime(); + this.IsEnabled = schedule.IsEnabled; + this.NextRun = schedule.NextRun.HasValue + ? DateTime.SpecifyKind(schedule.NextRun.Value, DateTimeKind.Utc).ToLocalTime() + : this.NextRun; + this.DayInterval = schedule.DayInterval.Value; + } + + /// + /// Initializes a new instance of the class. + /// + public DailySchedule() + { + } + + /// + /// Gets or sets The next run time of the schedule. + /// + public int DayInterval { get; set; } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/Model/HourlySchedule.cs b/src/ServiceManagement/Automation/Commands.Automation/Model/HourlySchedule.cs new file mode 100644 index 000000000000..343e87c66ae2 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Model/HourlySchedule.cs @@ -0,0 +1,69 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Automation.Model +{ + using Microsoft.Azure.Commands.Automation.Common; + using Microsoft.Azure.Commands.Automation.Properties; + using System; + using System.Globalization; + + /// + /// The hourly schedule. + /// + public class HourlySchedule : Schedule + { + /// + /// Initializes a new instance of the class. + /// + /// + /// The schedule. + /// + public HourlySchedule(Azure.Management.Automation.Models.Schedule schedule) + { + Requires.Argument("schedule", schedule).NotNull(); + + if (!schedule.HourInterval.HasValue) + { + throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Resources.InvalidHourlyScheduleModel, schedule.Name)); + } + + this.Id = new Guid(schedule.Id); + this.AccountId = new Guid(schedule.AccountId); + this.Name = schedule.Name; + this.Description = schedule.Description; + this.StartTime = DateTime.SpecifyKind(schedule.StartTime, DateTimeKind.Utc).ToLocalTime(); + this.ExpiryTime = DateTime.SpecifyKind(schedule.ExpiryTime, DateTimeKind.Utc).ToLocalTime(); + this.CreationTime = DateTime.SpecifyKind(schedule.CreationTime, DateTimeKind.Utc).ToLocalTime(); + this.LastModifiedTime = DateTime.SpecifyKind(schedule.LastModifiedTime, DateTimeKind.Utc).ToLocalTime(); + this.IsEnabled = schedule.IsEnabled; + this.NextRun = schedule.NextRun.HasValue + ? DateTime.SpecifyKind(schedule.NextRun.Value, DateTimeKind.Utc).ToLocalTime() + : this.NextRun; + this.HourInterval = schedule.HourInterval.Value; + } + + /// + /// Initializes a new instance of the class. + /// + public HourlySchedule() + { + } + + /// + /// Gets or sets The next run time of the schedule. + /// + public int HourInterval { get; set; } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/Model/Job.cs b/src/ServiceManagement/Automation/Commands.Automation/Model/Job.cs new file mode 100644 index 000000000000..74438b290ca9 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Model/Job.cs @@ -0,0 +1,145 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Properties; + +namespace Microsoft.Azure.Commands.Automation.Model +{ + using AutomationManagement = Management.Automation; + + /// + /// The job. + /// + public class Job + { + /// + /// Initializes a new instance of the class. + /// + /// The job + /// The resource. + /// + /// Initializes a new instance of the class. + /// + public Job(AutomationManagement.Models.Job job) + { + Requires.Argument("job", job).NotNull(); + + if (job.Context == null || job.Context.RunbookVersion == null || job.Context.RunbookVersion.Runbook == null || job.Context.JobParameters == null) + { + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Resources.InvalidJobModel)); + } + + this.Id = new Guid(job.Id); + this.AccountId = new Guid(job.AccountId); + this.Exception = job.Exception; + this.CreationTime = DateTime.SpecifyKind(job.CreationTime, DateTimeKind.Utc).ToLocalTime(); + this.LastModifiedTime = DateTime.SpecifyKind(job.LastModifiedTime, DateTimeKind.Utc).ToLocalTime(); + this.StartTime = job.StartTime.HasValue + ? DateTime.SpecifyKind(job.StartTime.Value, DateTimeKind.Utc).ToLocalTime() + : this.StartTime; + this.EndTime = job.EndTime.HasValue + ? DateTime.SpecifyKind(job.EndTime.Value, DateTimeKind.Utc).ToLocalTime() + : this.EndTime; + this.LastStatusModifiedTime = DateTime.SpecifyKind(job.LastStatusModifiedTime, DateTimeKind.Utc).ToLocalTime(); + this.Status = job.Status; + this.StatusDetails = job.StatusDetails; + this.RunbookId = new Guid(job.Context.RunbookVersion.Runbook.Id); + this.RunbookName = job.Context.RunbookVersion.Runbook.Name; + this.ScheduleName = job.Context.Schedule != null ? job.Context.Schedule.Name : string.Empty; + this.JobParameters = from jobParameter in job.Context.JobParameters where jobParameter.Name != Constants.JobStartedByParameterName select new JobParameter(jobParameter); + } + + /// + /// Initializes a new instance of the class. + /// + public Job() + { + } + + /// + /// Gets or sets the job id. + /// + public Guid Id { get; set; } + + /// + /// Gets or sets the account id. + /// + public Guid AccountId { get; set; } + + /// + /// Gets or sets the job status. + /// + public string Status { get; set; } + + /// + /// Gets or sets the job status details. + /// + public string StatusDetails { get; set; } + + /// + /// Gets or sets the start time. + /// + public DateTime? StartTime { get; set; } + + /// + /// Gets or sets the end time. + /// + public DateTime? EndTime { get; set; } + + /// + /// Gets or sets the creation time. + /// + public DateTime CreationTime { get; set; } + + /// + /// Gets or sets the last modified time. + /// + public DateTime LastModifiedTime { get; set; } + + /// + /// Gets or sets the last time when the job status was modified. + /// + public DateTime LastStatusModifiedTime { get; set; } + + /// + /// Gets or sets the job exception. + /// + public string Exception { get; set; } + + /// + /// Gets or sets the runnook id. + /// + public Guid RunbookId { get; set; } + + /// + /// Gets or sets the runbook name. + /// + public string RunbookName { get; set; } + + /// + /// Gets or sets the schedule name. + /// + public string ScheduleName { get; set; } + + /// + /// Gets or sets the job parameters. + /// + public IEnumerable JobParameters { get; set; } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/Model/JobParameter.cs b/src/ServiceManagement/Automation/Commands.Automation/Model/JobParameter.cs new file mode 100644 index 000000000000..72827e525e0c --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Model/JobParameter.cs @@ -0,0 +1,53 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Automation.Model +{ + using AutomationManagement = Management.Automation; + + /// + /// The job parameter. + /// + public class JobParameter + { + public JobParameter(AutomationManagement.Models.JobParameter jobParameter) + { + this.Name = jobParameter.Name; + this.Value = jobParameter.Value; + this.Type = jobParameter.Type; + } + + /// + /// Initializes a new instance of the class. + /// + public JobParameter() + { + } + + /// + /// Gets or sets the name. + /// + public string Name { get; set; } + + /// + /// Gets or sets the value. + /// + public string Value { get; set; } + + /// + /// Gets or sets the type. + /// + public string Type { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Automation/Commands.Automation/Model/JobStreamItem.cs b/src/ServiceManagement/Automation/Commands.Automation/Model/JobStreamItem.cs new file mode 100644 index 000000000000..764e721d36cc --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Model/JobStreamItem.cs @@ -0,0 +1,82 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.Azure.Commands.Automation.Common; + +namespace Microsoft.Azure.Commands.Automation.Model +{ + using AutomationManagement = Management.Automation; + + /// + /// The JobStreamItem. + /// + public class JobStreamItem + { + /// + /// Initializes a new instance of the class. + /// + /// + /// The job stream item. + /// + public JobStreamItem(AutomationManagement.Models.JobStreamItem jobStreamItem) + { + Requires.Argument("jobStreamItem", jobStreamItem).NotNull(); + + this.AccountId = new Guid(jobStreamItem.AccountId); + this.JobId = new Guid(jobStreamItem.JobId); + this.RunbookVersionId = new Guid(jobStreamItem.RunbookVersionId); + this.Text = jobStreamItem.Text; + this.Time = DateTime.SpecifyKind(jobStreamItem.Time, DateTimeKind.Utc).ToLocalTime(); + this.Type = jobStreamItem.Type; + } + + /// + /// Initializes a new instance of the class. + /// + public JobStreamItem() + { + } + + /// + /// Gets or sets the account id. + /// + public Guid AccountId { get; set; } + + /// + /// Gets or sets the job id. + /// + public Guid JobId { get; set; } + + /// + /// Gets or sets the runbook version id. + /// + public Guid RunbookVersionId { get; set; } + + /// + /// Gets or sets the text. + /// + public string Text { get; set; } + + /// + /// Gets or sets the time. + /// + public DateTime Time { get; set; } + + /// + /// Gets or sets the type. + /// + public string Type { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Automation/Commands.Automation/Model/OneTimeSchedule.cs b/src/ServiceManagement/Automation/Commands.Automation/Model/OneTimeSchedule.cs new file mode 100644 index 000000000000..b1b48b5a3760 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Model/OneTimeSchedule.cs @@ -0,0 +1,56 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.Azure.Commands.Automation.Common; + +namespace Microsoft.Azure.Commands.Automation.Model +{ + /// + /// The one time schedule. + /// + public class OneTimeSchedule : Schedule + { + /// + /// Initializes a new instance of the class. + /// + /// + /// The schedule. + /// + public OneTimeSchedule(Azure.Management.Automation.Models.Schedule schedule) + { + Requires.Argument("schedule", schedule).NotNull(); + + this.Id = new Guid(schedule.Id); + this.AccountId = new Guid(schedule.AccountId); + this.Name = schedule.Name; + this.Description = schedule.Description; + this.StartTime = DateTime.SpecifyKind(schedule.StartTime, DateTimeKind.Utc).ToLocalTime(); + this.ExpiryTime = DateTime.SpecifyKind(schedule.ExpiryTime, DateTimeKind.Utc).ToLocalTime(); + this.CreationTime = DateTime.SpecifyKind(schedule.CreationTime, DateTimeKind.Utc).ToLocalTime(); + this.LastModifiedTime = DateTime.SpecifyKind(schedule.LastModifiedTime, DateTimeKind.Utc).ToLocalTime(); + this.IsEnabled = schedule.IsEnabled; + this.NextRun = schedule.NextRun.HasValue + ? DateTime.SpecifyKind(schedule.NextRun.Value, DateTimeKind.Utc).ToLocalTime() + : this.NextRun; + } + + /// + /// Initializes a new instance of the class. + /// + public OneTimeSchedule() + { + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/Model/Runbook.cs b/src/ServiceManagement/Automation/Commands.Automation/Model/Runbook.cs new file mode 100644 index 000000000000..9cd51f2478fd --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Model/Runbook.cs @@ -0,0 +1,161 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using Microsoft.Azure.Commands.Automation.Common; +using Microsoft.Azure.Commands.Automation.Properties; + +namespace Microsoft.Azure.Commands.Automation.Model +{ + using AutomationManagement = Management.Automation; + + /// + /// The Runbook. + /// + public class Runbook + { + /// + /// Initializes a new instance of the class. + /// + /// + /// The runbook. + /// + /// + /// + public Runbook(AutomationManagement.Models.Runbook runbook) + { + Requires.Argument("runbook", runbook).NotNull(); + if (runbook.Schedules == null) + { + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Resources.InvalidRunbookModel)); + } + + this.AccountId = new Guid(runbook.AccountId); + this.Id = new Guid(runbook.Id); + this.Name = runbook.Name; + this.CreationTime = DateTime.SpecifyKind(runbook.CreationTime, DateTimeKind.Utc).ToLocalTime(); + this.LastModifiedTime = DateTime.SpecifyKind(runbook.LastModifiedTime, DateTimeKind.Utc).ToLocalTime(); + this.LastModifiedBy = runbook.LastModifiedBy; + this.Description = runbook.Description; + this.IsApiOnly = runbook.IsApiOnly; + this.IsGlobal = runbook.IsGlobal; + + if (runbook.PublishedRunbookVersionId != null) + { + this.PublishedRunbookVersionId = new Guid(runbook.PublishedRunbookVersionId); + } + + if (runbook.DraftRunbookVersionId != null) + { + this.DraftRunbookVersionId = new Guid(runbook.DraftRunbookVersionId); + } + + this.Tags = runbook.Tags != null ? runbook.Tags.Split(Constants.RunbookTagsSeparatorChar) : new string[] { }; + this.LogDebug = runbook.LogDebug; + this.LogVerbose = runbook.LogVerbose; + this.LogProgress = runbook.LogProgress; + this.ScheduleNames = from schedule in runbook.Schedules where (schedule.NextRun != null) select schedule.Name; + } + + /// + /// Initializes a new instance of the class. + /// + public Runbook() + { + } + + /// + /// Gets or sets the account id. + /// + public Guid AccountId { get; set; } + + /// + /// Gets or sets the id. + /// + public Guid Id { get; set; } + + /// + /// Gets or sets the name. + /// + public string Name { get; set; } + + /// + /// Gets or sets the creation time. + /// + public DateTime CreationTime { get; set; } + + /// + /// Gets or sets the last modified time. + /// + public DateTime LastModifiedTime { get; set; } + + /// + /// Gets or sets the last modified by. + /// + public string LastModifiedBy { get; set; } + + /// + /// Gets or sets the description. + /// + public string Description { get; set; } + + /// + /// Gets or sets a value indicating whether is api only. + /// + public bool IsApiOnly { get; set; } + + /// + /// Gets or sets a value indicating whether is global. + /// + public bool IsGlobal { get; set; } + + /// + /// Gets or sets the published runbook version id. + /// + public Guid? PublishedRunbookVersionId { get; set; } + + /// + /// Gets or sets the draft runbook version id. + /// + public Guid? DraftRunbookVersionId { get; set; } + + /// + /// Gets or sets the tags. + /// + public string[] Tags { get; set; } + + /// + /// Gets or sets a value indicating whether log debug is enabled. + /// + public bool LogDebug { get; set; } + + /// + /// Gets or sets a value indicating whether log verbose is enabled. + /// + public bool LogVerbose { get; set; } + + /// + /// Gets or sets a value indicating whether log progress is enabled. + /// + public bool LogProgress { get; set; } + + /// + /// Gets or sets the schedule names. + /// + public IEnumerable ScheduleNames { get; set; } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/Model/RunbookDefinition.cs b/src/ServiceManagement/Automation/Commands.Automation/Model/RunbookDefinition.cs new file mode 100644 index 000000000000..0a8fc7698c34 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Model/RunbookDefinition.cs @@ -0,0 +1,56 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Automation.Model +{ + using AutomationManagement = Management.Automation; + + /// + /// The Runbook Definition. + /// + public class RunbookDefinition + { + /// + /// Initializes a new instance of the class. + /// + /// + /// The runbook version. + /// + /// + /// The content. + /// + public RunbookDefinition(AutomationManagement.Models.RunbookVersion runbookVersion, byte[] content) + { + this.RunbookVersion = new RunbookVersion(runbookVersion); + this.Content = System.Text.Encoding.UTF8.GetString(content); + } + + /// + /// Initializes a new instance of the class. + /// + public RunbookDefinition() + { + } + + /// + /// Gets or sets the runbook version. + /// + public RunbookVersion RunbookVersion { get; set; } + + /// + /// Gets or sets the runbook version content. + /// + public string Content { get; set; } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/Model/RunbookParameter.cs b/src/ServiceManagement/Automation/Commands.Automation/Model/RunbookParameter.cs new file mode 100644 index 000000000000..c994b9aabc47 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Model/RunbookParameter.cs @@ -0,0 +1,67 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.Azure.Commands.Automation.Model +{ + using AutomationManagement = Management.Automation; + + /// + /// The runbook parameter. + /// + public class RunbookParameter + { + public RunbookParameter(AutomationManagement.Models.RunbookParameter runbookParameter) + { + this.RunbookVersionId = new Guid(runbookParameter.RunbookVersionId); + this.Name = runbookParameter.Name; + this.Type = runbookParameter.Type; + this.IsMandatory = runbookParameter.IsMandatory; + this.Position = runbookParameter.Position; + } + + /// + /// Initializes a new instance of the class. + /// + public RunbookParameter() + { + } + + /// + /// Gets or sets the runbook version id. + /// + public Guid RunbookVersionId { get; set; } + + /// + /// Gets or sets the name. + /// + public string Name { get; set; } + + /// + /// Gets or sets the type. + /// + public string Type { get; set; } + + /// + /// Gets or sets a value indicating whether is mandatory. + /// + public bool IsMandatory { get; set; } + + /// + /// Gets or sets the position. + /// + public int Position { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Automation/Commands.Automation/Model/RunbookVersion.cs b/src/ServiceManagement/Automation/Commands.Automation/Model/RunbookVersion.cs new file mode 100644 index 000000000000..11d4331ba8ed --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Model/RunbookVersion.cs @@ -0,0 +1,88 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.Azure.Commands.Automation.Common; + +namespace Microsoft.Azure.Commands.Automation.Model +{ + using AutomationManagement = Management.Automation; + + /// + /// The Runbook. + /// + public class RunbookVersion + { + /// + /// Initializes a new instance of the class. + /// + /// + /// The runbook version. + /// + public RunbookVersion(AutomationManagement.Models.RunbookVersion runbookVersion) + { + Requires.Argument("runbookVersion", runbookVersion).NotNull(); + + this.AccountId = new Guid(runbookVersion.AccountId); + this.Id = new Guid(runbookVersion.Id); + this.RunbookId = new Guid(runbookVersion.RunbookId); + this.VersionNumber = runbookVersion.VersionNumber; + this.IsDraft = runbookVersion.IsDraft; + this.CreationTime = DateTime.SpecifyKind(runbookVersion.CreationTime, DateTimeKind.Utc).ToLocalTime(); + this.LastModifiedTime = DateTime.SpecifyKind(runbookVersion.LastModifiedTime, DateTimeKind.Utc).ToLocalTime(); + } + + /// + /// Initializes a new instance of the class. + /// + public RunbookVersion() + { + } + + /// + /// Gets or sets the account id. + /// + public Guid AccountId { get; set; } + + /// + /// Gets or sets the id. + /// + public Guid Id { get; set; } + + /// + /// Gets or sets the runbook id. + /// + public Guid RunbookId { get; set; } + + /// + /// Gets or sets the version number. + /// + public int VersionNumber { get; set; } + + /// + /// Gets or sets a value indicating whether is draft. + /// + public bool IsDraft { get; set; } + + /// + /// Gets or sets the creation time. + /// + public DateTime CreationTime { get; set; } + + /// + /// Gets or sets the last modified time. + /// + public DateTime LastModifiedTime { get; set; } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/Model/Schedule.cs b/src/ServiceManagement/Automation/Commands.Automation/Model/Schedule.cs new file mode 100644 index 000000000000..661c300f92da --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Model/Schedule.cs @@ -0,0 +1,74 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.Azure.Commands.Automation.Model +{ + /// + /// The Schedule. + /// + public abstract class Schedule + { + /// + /// Gets or sets the id. + /// + public Guid Id { get; set; } + + /// + /// Gets or sets the account id. + /// + public Guid AccountId { get; set; } + + /// + /// Gets or sets the name. + /// + public string Name { get; set; } + + /// + /// Gets or sets the description. + /// + public string Description { get; set; } + + /// + /// Gets or sets the start time. + /// + public DateTime StartTime { get; set; } + + /// + /// Gets or sets the expiry time. + /// + public DateTime ExpiryTime { get; set; } + + /// + /// Gets or sets the creation time. + /// + public DateTime CreationTime { get; set; } + + /// + /// Gets or sets the last modified time. + /// + public DateTime LastModifiedTime { get; set; } + + /// + /// Gets or sets a value indicating whether is enabled. + /// + public bool IsEnabled { get; set; } + + /// + /// Gets or sets the next run. + /// + public DateTime? NextRun { get; set; } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/Properties/AssemblyInfo.cs b/src/ServiceManagement/Automation/Commands.Automation/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..c8e13b307c91 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Properties/AssemblyInfo.cs @@ -0,0 +1,53 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft Azure Powershell")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("3eddf191-200c-4bc5-b338-51215ed9d4e3")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] +[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] +#if SIGN +[assembly: InternalsVisibleTo("Microsoft.Azure.Commands.Automation.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +#else +[assembly: InternalsVisibleTo("Microsoft.Azure.Commands.Automation.Test")] +#endif +[assembly: CLSCompliant(false)] diff --git a/src/ServiceManagement/Automation/Commands.Automation/Properties/Resources.Designer.cs b/src/ServiceManagement/Automation/Commands.Automation/Properties/Resources.Designer.cs new file mode 100644 index 000000000000..d69dcb78d390 --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Properties/Resources.Designer.cs @@ -0,0 +1,261 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.Azure.Commands.Automation.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Azure.Commands.Automation.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to The Automation accout was not found.. + /// + internal static string AutomationAccountNotFound { + get { + return ResourceManager.GetString("AutomationAccountNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The file "{0}" was not found. Make sure the file exists and is accessible.. + /// + internal static string FileNotFound { + get { + return ResourceManager.GetString("FileNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The daily schedule model is not valid. Schedule name: {0}.. + /// + internal static string InvalidDailyScheduleModel { + get { + return ResourceManager.GetString("InvalidDailyScheduleModel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The hourly schedule model is not valid. Schedule name: {0}.. + /// + internal static string InvalidHourlyScheduleModel { + get { + return ResourceManager.GetString("InvalidHourlyScheduleModel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The job model is not valid.. + /// + internal static string InvalidJobModel { + get { + return ResourceManager.GetString("InvalidJobModel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The runbook model is not valid.. + /// + internal static string InvalidRunbookModel { + get { + return ResourceManager.GetString("InvalidRunbookModel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to At least one parameter provided is not expected by the runbook.. + /// + internal static string InvalidRunbookParameters { + get { + return ResourceManager.GetString("InvalidRunbookParameters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The job was not found. Job ID: {0}.. + /// + internal static string JobNotFoundById { + get { + return ResourceManager.GetString("JobNotFoundById", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing the Azure Automation runbook.. + /// + internal static string RemoveAzureAutomationRunbookDescription { + get { + return ResourceManager.GetString("RemoveAzureAutomationRunbookDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Azure Automation runbook?. + /// + internal static string RemoveAzureAutomationRunbookWarning { + get { + return ResourceManager.GetString("RemoveAzureAutomationRunbookWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing the Azure Automation schedule.. + /// + internal static string RemoveAzureAutomationScheduleDescription { + get { + return ResourceManager.GetString("RemoveAzureAutomationScheduleDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Azure Automation schedule?. + /// + internal static string RemoveAzureAutomationScheduleWarning { + get { + return ResourceManager.GetString("RemoveAzureAutomationScheduleWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Runbook already has a draft. Specify the parameter to force an overwrite of this draft.. + /// + internal static string RunbookAlreadyHasDraft { + get { + return ResourceManager.GetString("RunbookAlreadyHasDraft", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The runbook has no published version. Runbook ID: {0}.. + /// + internal static string RunbookHasNoPublishedVersionById { + get { + return ResourceManager.GetString("RunbookHasNoPublishedVersionById", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The runbook was not found. Runbook ID: {0}.. + /// + internal static string RunbookNotFoundById { + get { + return ResourceManager.GetString("RunbookNotFoundById", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The runbook was not found. Runbook name: {0}.. + /// + internal static string RunbookNotFoundByName { + get { + return ResourceManager.GetString("RunbookNotFoundByName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The runbook parameter "{0}" cannot be serialized to JSON.. + /// + internal static string RunbookParameterCannotBeSerializedToJson { + get { + return ResourceManager.GetString("RunbookParameterCannotBeSerializedToJson", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The runbook parameter "{0}" is mandatory.. + /// + internal static string RunbookParameterValueRequired { + get { + return ResourceManager.GetString("RunbookParameterValueRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The runbook version was not found. Runbook version ID: {0}.. + /// + internal static string RunbookVersionNotFoundById { + get { + return ResourceManager.GetString("RunbookVersionNotFoundById", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Automation schedule name is in use. Schedule name: {0}.. + /// + internal static string ScheduleNameExists { + get { + return ResourceManager.GetString("ScheduleNameExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The schedule was not found. Schedule ID: {0}.. + /// + internal static string ScheduleNotFoundById { + get { + return ResourceManager.GetString("ScheduleNotFoundById", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The schedule was not found. Schedule name: {0}.. + /// + internal static string ScheduleNotFoundByName { + get { + return ResourceManager.GetString("ScheduleNotFoundByName", resourceCulture); + } + } + } +} diff --git a/src/ServiceManagement/Automation/Commands.Automation/Properties/Resources.resx b/src/ServiceManagement/Automation/Commands.Automation/Properties/Resources.resx new file mode 100644 index 000000000000..cde935f6970b --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/Properties/Resources.resx @@ -0,0 +1,208 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + The Automation account was not found. + Automation + + + The file "{0}" was not found. Make sure the file exists and is accessible. + Automation + + + The daily schedule model is not valid. Schedule name: {0}. + Automation + + + The hourly schedule model is not valid. Schedule name: {0}. + Automation + + + The job model is not valid. + Automation + + + The runbook model is not valid. + Automation + + + At least one parameter provided is not expected by the runbook. + Automation + + + The job was not found. Job ID: {0}. + Automation + + + Removing the Azure Automation runbook. + Automation + + + Are you sure you want to remove the Azure Automation runbook? + Automation + + + Removing the Azure Automation schedule. + Automation + + + Are you sure you want to remove the Azure Automation schedule? + Automation + + + Runbook already has a draft. Specify the parameter to force an overwrite of this draft. + Automation + + + The runbook has no published version. Runbook ID: {0}. + Automation + + + The runbook was not found. Runbook ID: {0}. + Automation + + + The runbook was not found. Runbook name: {0}. + Automation + + + The runbook parameter "{0}" cannot be serialized to JSON. + Automation + + + The runbook parameter "{0}" is mandatory. + Automation + + + The runbook version was not found. Runbook version ID: {0}. + Automation + + + The Automation schedule name is in use. Schedule name: {0}. + Automation + + + The schedule was not found. Schedule ID: {0}. + Automation + + + The schedule was not found. Schedule name: {0}. + Automation + + \ No newline at end of file diff --git a/src/ServiceManagement/Automation/Commands.Automation/packages.config b/src/ServiceManagement/Automation/Commands.Automation/packages.config new file mode 100644 index 000000000000..c1800219d89c --- /dev/null +++ b/src/ServiceManagement/Automation/Commands.Automation/packages.config @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Commands.ServiceManagement.Extensions.Test.csproj b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Commands.ServiceManagement.Extensions.Test.csproj new file mode 100644 index 000000000000..6ddaa7a52ccc --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Commands.ServiceManagement.Extensions.Test.csproj @@ -0,0 +1,154 @@ + + + + Debug + AnyCPU + {7A9D7758-A1AB-4BE8-BD09-3FAF446314F2} + Library + Properties + Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions.Test + Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions.Test + v4.5 + 512 + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages + False + UnitTest + ..\..\..\ + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + + + + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + True + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + + + + + + + + + + + + + + + + + + + {C1BDA476-A5CC-4394-914D-48B0EC31A710} + Commands.ScenarioTests.Common + + + {e1ca72ba-8374-45f6-904d-fd34ecdf5b6f} + Commands.ServiceManagement + + + + + + + + + + + + + + + + + + + + + + + + + + False + + + False + + + False + + + False + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/DSC/DscExtensionConfigurationParsingHelperTests.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/DSC/DscExtensionConfigurationParsingHelperTests.cs new file mode 100644 index 000000000000..1016acc8820c --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/DSC/DscExtensionConfigurationParsingHelperTests.cs @@ -0,0 +1,282 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.IO.Compression; +using System.Linq; + +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.DSC; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions.Test.DSC +{ + /// + /// Tests for DSC class. + /// + /// + /// ConfigurationParsingHelper.ParseConfiguration() API requires tests to be run in x64 host. + /// + [TestClass] + public class DscExtensionConfigurationParsingHelperTests + { + private const string CorporateClientConfigurationPath = @"DSC\Configurations\CorporateClientConfiguration.ps1"; + private const string DomainControllerConfigurationPath = @"DSC\Configurations\DomainControllerConfiguration.ps1"; + private const string SHMulptiConfigurationsPath = @"DSC\Configurations\SHMulptiConfigurations.ps1"; + private const string VisualStudioPath = @"DSC\Configurations\VisualStudio.ps1"; + private const string NameImportListInsideNodeConfigurationPath = @"DSC\Configurations\Dummy\NameImportListInsideNode.ps1"; + private const string NameImportListOutsideNodeConfigurationPath = @"DSC\Configurations\Dummy\NameImportListOutsideNode.ps1"; + private const string NameImportSingleInsideNodeConfigurationPath = @"DSC\Configurations\Dummy\NameImportSingleInsideNode.ps1"; + private const string NameImportSingleOutsideNodeConfigurationPath = @"DSC\Configurations\Dummy\NameImportSingleOutsideNode.ps1"; + private const string NameModuleImportSingleInsideNodeConfigurationPath = @"DSC\Configurations\Dummy\NameModuleImportSingleInsideNode.ps1"; + private const string ModuleImportListInsideNodeConfigurationPath = @"DSC\Configurations\Dummy\ModuleImportListInsideNode.ps1"; + private const string ModuleImportListOutsideNodeConfigurationPath = @"DSC\Configurations\Dummy\ModuleImportListOutsideNode.ps1"; + private const string ModuleImportSingleInsideNodeConfigurationPath = @"DSC\Configurations\Dummy\ModuleImportSingleInsideNode.ps1"; + private const string ModuleImportSingleOutsideNodeConfigurationPath = @"DSC\Configurations\Dummy\ModuleImportSingleOutsideNode.ps1"; + private const string IEEScGoodConfigurationPath = @"DSC\Configurations\IEEScGood.ps1"; + private const string IEEScBadConfigurationPath = @"DSC\Configurations\IEEScBad.ps1"; + + private const string TestDscResourceModulesDirectory = @"azure-sdk-tools-dsc-test"; + + private const string xDscResourcesArchivePath = @"DSC\DSC Resource Kit Wave 6 08282014.zip"; + + private const string PSModulePathEnvVar = "PSModulePath"; + + /// + /// Unpack and populate custom DSC resource modules. + /// + /// + [ClassInitialize] + public static void ClassInit(TestContext a) + { + string testDscResourceModulesPath = Path.Combine(Path.GetTempPath(), TestDscResourceModulesDirectory); + if (Directory.Exists(testDscResourceModulesPath)) + { + // cleanup + Directory.Delete(testDscResourceModulesPath, true); + } + // unpack xPSDSC resources + ZipFile.ExtractToDirectory(xDscResourcesArchivePath, testDscResourceModulesPath); + + // Set $env:PSModulePath to include temp folder, so resources can be explored. + string psModulePath = Environment.GetEnvironmentVariable(PSModulePathEnvVar); + Environment.SetEnvironmentVariable(PSModulePathEnvVar, psModulePath + ";" + testDscResourceModulesPath); + } + + [TestMethod] + [TestCategory("Scenario")] + [TestCategory("x64_only")] + public void TestGetModuleNameForDscResourceXComputer() + { + string moduleName = ConfigurationParsingHelper.GetModuleNameForDscResource("MSFT_xComputer"); + Assert.AreEqual("xComputerManagement", moduleName); + } + + [TestMethod] + [TestCategory("Scenario")] + [TestCategory("x64_only")] + public void TestGetModuleNameForDscResourceXADDomain() + { + string moduleName = ConfigurationParsingHelper.GetModuleNameForDscResource("MSFT_xADDomain"); + Assert.AreEqual("xActiveDirectory", moduleName); + } + + [TestMethod] + [TestCategory("Scenario")] + [TestCategory("x64_only")] + [DeploymentItem(CorporateClientConfigurationPath)] + public void TestExtractConfigurationNames1() + { + ConfigurationParseResult results = ConfigurationParsingHelper.ParseConfiguration(CorporateClientConfigurationPath); + Assert.AreEqual(0, results.Errors.Count(), "Parsing errors"); + Assert.AreEqual(1, results.RequiredModules.Count); + Assert.AreEqual("xComputerManagement", results.RequiredModules[0]); + } + + [TestMethod] + [TestCategory("Scenario")] + [TestCategory("x64_only")] + [DeploymentItem(DomainControllerConfigurationPath)] + public void TestExtractConfigurationNames2() + { + ConfigurationParseResult results = ConfigurationParsingHelper.ParseConfiguration(DomainControllerConfigurationPath); + Assert.AreEqual(0, results.Errors.Count(), "Parsing errors"); + Assert.AreEqual(2, results.RequiredModules.Count); + Assert.AreEqual("xComputerManagement", results.RequiredModules[0]); + Assert.AreEqual("xActiveDirectory", results.RequiredModules[1]); + } + + [TestMethod] + [TestCategory("Scenario")] + [TestCategory("x64_only")] + [DeploymentItem(VisualStudioPath)] + public void TestExtractConfigurationNames3() + { + ConfigurationParseResult results = ConfigurationParsingHelper.ParseConfiguration(VisualStudioPath); + Assert.AreEqual(0, results.Errors.Count(), "Parsing errors"); + Assert.AreEqual(1, results.RequiredModules.Count); + Assert.AreEqual("xPSDesiredStateConfiguration", results.RequiredModules[0]); + } + + [TestMethod] + [TestCategory("Scenario")] + [TestCategory("x64_only")] + [DeploymentItem(SHMulptiConfigurationsPath)] + public void TestExtractConfigurationNamesMulti() + { + ConfigurationParseResult results = ConfigurationParsingHelper.ParseConfiguration(SHMulptiConfigurationsPath); + Assert.AreEqual(0, results.Errors.Count(), "Parsing errors"); + Assert.AreEqual(3, results.RequiredModules.Count); + Assert.AreEqual("xComputerManagement", results.RequiredModules[0]); + Assert.AreEqual("xNetworking", results.RequiredModules[1]); + Assert.AreEqual("xPSDesiredStateConfiguration", results.RequiredModules[2]); + } + + [TestMethod] + [TestCategory("Scenario")] + [TestCategory("x64_only")] + [DeploymentItem(NameImportListInsideNodeConfigurationPath)] + public void TestNameImportListInsideNode() + { + ConfigurationParseResult results = ConfigurationParsingHelper.ParseConfiguration(NameImportListInsideNodeConfigurationPath); + Assert.AreEqual(0, results.Errors.Count(), "Parsing errors"); + Assert.AreEqual(2, results.RequiredModules.Count); + Assert.AreEqual("xComputerManagement", results.RequiredModules[0]); + Assert.AreEqual("xActiveDirectory", results.RequiredModules[1]); + } + + [TestMethod] + [TestCategory("Scenario")] + [TestCategory("x64_only")] + [DeploymentItem(NameImportListOutsideNodeConfigurationPath)] + public void TestNameImportListOutsideNode() + { + ConfigurationParseResult results = ConfigurationParsingHelper.ParseConfiguration(NameImportListOutsideNodeConfigurationPath); + Assert.AreEqual(0, results.Errors.Count(), "Parsing errors"); + Assert.AreEqual(2, results.RequiredModules.Count); + Assert.AreEqual("xComputerManagement", results.RequiredModules[0]); + Assert.AreEqual("xActiveDirectory", results.RequiredModules[1]); + } + + [TestMethod] + [TestCategory("Scenario")] + [TestCategory("x64_only")] + [DeploymentItem(NameImportSingleInsideNodeConfigurationPath)] + public void TestNameImportSingleInsideNode() + { + ConfigurationParseResult results = ConfigurationParsingHelper.ParseConfiguration(NameImportSingleInsideNodeConfigurationPath); + Assert.AreEqual(0, results.Errors.Count(), "Parsing errors"); + Assert.AreEqual(1, results.RequiredModules.Count); + Assert.AreEqual("xComputerManagement", results.RequiredModules[0]); + } + + [TestMethod] + [TestCategory("Scenario")] + [TestCategory("x64_only")] + [DeploymentItem(NameImportSingleOutsideNodeConfigurationPath)] + public void TestNameImportSingleOutsideNode() + { + ConfigurationParseResult results = ConfigurationParsingHelper.ParseConfiguration(NameImportSingleOutsideNodeConfigurationPath); + Assert.AreEqual(0, results.Errors.Count(), "Parsing errors"); + Assert.AreEqual(1, results.RequiredModules.Count); + Assert.AreEqual("xComputerManagement", results.RequiredModules[0]); + } + + [TestMethod] + [TestCategory("Scenario")] + [TestCategory("x64_only")] + [DeploymentItem(NameModuleImportSingleInsideNodeConfigurationPath)] + public void TestNameModuleImportSingleInsideNode() + { + ConfigurationParseResult results = ConfigurationParsingHelper.ParseConfiguration(NameModuleImportSingleInsideNodeConfigurationPath); + Assert.AreEqual(0, results.Errors.Count(), "Parsing errors"); + Assert.AreEqual(1, results.RequiredModules.Count); + Assert.AreEqual("xComputerManagement", results.RequiredModules[0]); + } + + [TestMethod] + [TestCategory("Scenario")] + [TestCategory("x64_only")] + [DeploymentItem(ModuleImportListInsideNodeConfigurationPath)] + public void TestModuleImportListInsideNode() + { + ConfigurationParseResult results = ConfigurationParsingHelper.ParseConfiguration(ModuleImportListInsideNodeConfigurationPath); + Assert.AreEqual(0, results.Errors.Count(), "Parsing errors"); + Assert.AreEqual(2, results.RequiredModules.Count); + Assert.AreEqual("xPSDesiredStateConfiguration", results.RequiredModules[0]); + Assert.AreEqual("xNetworking", results.RequiredModules[1]); + } + + [TestMethod] + [TestCategory("Scenario")] + [TestCategory("x64_only")] + [DeploymentItem(ModuleImportListOutsideNodeConfigurationPath)] + public void TestModuleImportListOutsideNode() + { + ConfigurationParseResult results = ConfigurationParsingHelper.ParseConfiguration(ModuleImportListOutsideNodeConfigurationPath); + Assert.AreEqual(0, results.Errors.Count(), "Parsing errors"); + Assert.AreEqual(2, results.RequiredModules.Count); + Assert.AreEqual("xPSDesiredStateConfiguration", results.RequiredModules[0]); + Assert.AreEqual("xNetworking", results.RequiredModules[1]); + } + + [TestMethod] + [TestCategory("Scenario")] + [TestCategory("x64_only")] + [DeploymentItem(ModuleImportSingleInsideNodeConfigurationPath)] + public void TestModuleImportSingleInsideNode() + { + ConfigurationParseResult results = ConfigurationParsingHelper.ParseConfiguration(ModuleImportSingleInsideNodeConfigurationPath); + Assert.AreEqual(0, results.Errors.Count(), "Parsing errors"); + Assert.AreEqual(1, results.RequiredModules.Count); + Assert.AreEqual("xNetworking", results.RequiredModules[0]); + } + + [TestMethod] + [TestCategory("Scenario")] + [TestCategory("x64_only")] + [DeploymentItem(ModuleImportSingleOutsideNodeConfigurationPath)] + public void TestModuleImportSingleOutsideNode() + { + ConfigurationParseResult results = ConfigurationParsingHelper.ParseConfiguration(ModuleImportSingleOutsideNodeConfigurationPath); + Assert.AreEqual(0, results.Errors.Count(), "Parsing errors"); + Assert.AreEqual(1, results.RequiredModules.Count); + Assert.AreEqual("xNetworking", results.RequiredModules[0]); + } + + [TestMethod] + [TestCategory("Scenario")] + [TestCategory("x64_only")] + [DeploymentItem(IEEScGoodConfigurationPath)] + public void TestIEEScGood() + { + ConfigurationParseResult results = ConfigurationParsingHelper.ParseConfiguration(IEEScGoodConfigurationPath); + Assert.AreEqual(0, results.Errors.Count(), "Parsing errors"); + Assert.AreEqual(1, results.RequiredModules.Count); + Assert.AreEqual("xSystemSecurity", results.RequiredModules[0]); + } + + [TestMethod] + [TestCategory("Scenario")] + [TestCategory("x64_only")] + [DeploymentItem(IEEScBadConfigurationPath)] + public void TestIEEScBad() + { + ConfigurationParseResult results = ConfigurationParsingHelper.ParseConfiguration(IEEScBadConfigurationPath); + Assert.AreEqual(0, results.Errors.Count(), "Parsing errors"); + Assert.AreEqual(1, results.RequiredModules.Count); + Assert.AreEqual("xSystemSecurity", results.RequiredModules[0]); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/DSC/DscExtensionSettingsSerializerTests.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/DSC/DscExtensionSettingsSerializerTests.cs new file mode 100644 index 000000000000..b21485c26a70 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/DSC/DscExtensionSettingsSerializerTests.cs @@ -0,0 +1,200 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Linq; +using System.Management.Automation; +using System.Security; + +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions; +using Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.DSC; + +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions.Test.DSC +{ + /// + /// Tests for class. + /// + [TestClass] + public class DscExtensionSettingsSerializerTests + { + [TestMethod] + [TestCategory(Category.BVT)] + public void TestPSCredential() + { + const string userName = "user"; + const string password = "password"; + const string credentialParameterName = "cred"; + Hashtable configurationArguments = new Hashtable(); + configurationArguments.Add(credentialParameterName, new PSCredential(userName, String2SecureString(password))); + + DscPrivateSettings privateSettings; + var publicSettings = GetPublicPrivateAfterDeseriazlization(configurationArguments, out privateSettings); + + Assert.AreEqual(1, publicSettings.Properties.Count()); + Assert.AreEqual(credentialParameterName, publicSettings.Properties[0].Name); + Assert.AreEqual(typeof(PSCredential).ToString(), publicSettings.Properties[0].TypeName); + var deserializedPSCredential = publicSettings.Properties[0].Value as JObject; + Assert.IsNotNull(deserializedPSCredential); + + Assert.AreEqual(userName, deserializedPSCredential["UserName"]); + string passwordRef = deserializedPSCredential["Password"].ToString(); + Assert.IsNotNull(passwordRef); + + Assert.IsTrue(passwordRef.StartsWith("PrivateSettingsRef:")); + passwordRef = passwordRef.Substring("PrivateSettingsRef:".Length); + + Assert.AreEqual(1, privateSettings.Items.Count); + // There is only one, so it's fine to check it in foreach. + foreach (DictionaryEntry argument in privateSettings.Items) + { + Assert.AreEqual(password, argument.Value); + Assert.AreEqual(passwordRef, argument.Key); + } + } + + [TestMethod] + [TestCategory(Category.BVT)] + public void TestString() + { + const string arg = "argument"; + const string value = "value"; + Hashtable configurationArguments = new Hashtable(); + configurationArguments.Add(arg, value); + + DscPrivateSettings privateSettings; + var publicSettings = GetPublicPrivateAfterDeseriazlization(configurationArguments, out privateSettings); + + Assert.AreEqual(1, publicSettings.Properties.Count()); + Assert.AreEqual(arg, publicSettings.Properties[0].Name); + Assert.AreEqual(typeof(string).ToString(), publicSettings.Properties[0].TypeName); + var deserializedValue = publicSettings.Properties[0].Value; + Assert.AreEqual(value, deserializedValue); + } + + [TestMethod] + [TestCategory(Category.BVT)] + public void TestInt() + { + const string arg = "argument"; + var value = 100500; + Hashtable configurationArguments = new Hashtable(); + configurationArguments.Add(arg, value); + + DscPrivateSettings privateSettings; + var publicSettings = GetPublicPrivateAfterDeseriazlization(configurationArguments, out privateSettings); + + Assert.AreEqual(1, publicSettings.Properties.Count()); + Assert.AreEqual(arg, publicSettings.Properties[0].Name); + Assert.AreEqual(typeof(int).ToString(), publicSettings.Properties[0].TypeName); + var deserializedValue = publicSettings.Properties[0].Value; + Assert.AreEqual(value.ToString(), deserializedValue.ToString()); + } + + [TestMethod] + [TestCategory(Category.BVT)] + public void TestBool() + { + const string arg = "argument"; + var value = true; + Hashtable configurationArguments = new Hashtable(); + configurationArguments.Add(arg, value); + + DscPrivateSettings privateSettings; + var publicSettings = GetPublicPrivateAfterDeseriazlization(configurationArguments, out privateSettings); + + Assert.AreEqual(1, publicSettings.Properties.Count()); + Assert.AreEqual(arg, publicSettings.Properties[0].Name); + Assert.AreEqual(typeof(bool).ToString(), publicSettings.Properties[0].TypeName); + var deserializedValue = publicSettings.Properties[0].Value; + Assert.AreEqual(value, deserializedValue); + } + + [TestMethod] + [TestCategory(Category.BVT)] + public void TestChar() + { + const string arg = "argument"; + var value = 'z'; + Hashtable configurationArguments = new Hashtable(); + configurationArguments.Add(arg, value); + + DscPrivateSettings privateSettings; + var publicSettings = GetPublicPrivateAfterDeseriazlization(configurationArguments, out privateSettings); + + Assert.AreEqual(1, publicSettings.Properties.Count()); + Assert.AreEqual(arg, publicSettings.Properties[0].Name); + Assert.AreEqual(typeof(char).ToString(), publicSettings.Properties[0].TypeName); + var deserializedValue = publicSettings.Properties[0].Value; + Assert.AreEqual(value.ToString(), deserializedValue.ToString()); + } + + /// + /// Helper function for tests. + /// + /// + /// + /// + private static DscPublicSettings GetPublicPrivateAfterDeseriazlization( + Hashtable configurationArguments, + out DscPrivateSettings privateSettings) + { + Tuple separatedSettings = + DscSettingsSerializer.SeparatePrivateItems(configurationArguments); + DscPublicSettings publicSettings = new DscPublicSettings(); + privateSettings = new DscPrivateSettings(); + publicSettings.Properties = separatedSettings.Item1; + privateSettings.Items = separatedSettings.Item2; + + string serializedPublic = DscSettingsSerializer.SerializePublicSettings(publicSettings); + string serializedPrivate = DscSettingsSerializer.SerializePrivateSettings(privateSettings); + + publicSettings = DscSettingsSerializer.DeserializePublicSettings(serializedPublic); + privateSettings = DeserializePrivateSettings(serializedPrivate); + return publicSettings; + } + + /// + /// Convert string to SecureString. + /// + /// + /// This implementation is unsecure and can be used only for tests. + /// + static private SecureString String2SecureString(string s) + { + var secureString = new SecureString(); + foreach (char c in s) + { + secureString.AppendChar(c); + } + return secureString; + } + + + /// + /// We use this method for test purposes only. + /// + /// + /// + static private DscPrivateSettings DeserializePrivateSettings(string s) + { + return JsonConvert.DeserializeObject(s); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Properties/AssemblyInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..547734f0b5a9 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Commands.ServiceManagement.Extensions.Test")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Commands.ServiceManagement.Extensions.Test")] +[assembly: AssemblyCopyright("Copyright © 2014")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("ba31bdf6-c0b3-4d25-84c8-4f7998d8bdff")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/CorporateClientConfiguration.ps1 b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/CorporateClientConfiguration.ps1 new file mode 100644 index 000000000000..5160ac163080 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/CorporateClientConfiguration.ps1 @@ -0,0 +1,52 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +param([string] $VMName, [string] $VMConfigDataPath, [string] $MofDestinationPath) + +Configuration CorpClientVMConfiguration +{ + Node $AllNodes.Where{$_.Role -eq "CorpClient"}.NodeName + { + Import-DscResource -Name MSFT_xComputer + + xComputer NameAndDomain + { + Name = $Node.MachineName + DomainName = $Node.DomainName + Credential = (Import-CliXML $Node.DomainCredFile) + } + + Group RemoteDesktop + { + Ensure = "Present" + GroupName = "Remote Desktop Users" + Members = @("Corporate\User1","Corporate\PAPA","Corporate\DeptHead") + Credential = (Import-CliXML $Node.DomainCredFile) + DependsOn = "[xComputer]NameAndDomain" + } + + Group Administrator + { + Ensure = "Present" + GroupName = "Administrators" + MembersToInclude = @("Corporate\PAPA","Corporate\DeptHead") + Credential = (Import-CliXML $Node.DomainCredFile) + DependsOn = "[xComputer]NameAndDomain" + } + } +} + +# Generate mof +$scriptLocation = $PSScriptRoot +. CorpClientVMConfiguration -OutputPath . diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/DomainControllerConfiguration.ps1 b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/DomainControllerConfiguration.ps1 new file mode 100644 index 000000000000..bc5e6b053411 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/DomainControllerConfiguration.ps1 @@ -0,0 +1,56 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +param([string] $VMName, [string] $VMConfigDataPath, [string] $MofDestinationPath) + +Configuration DomainController +{ + Import-DscResource -Name MSFT_xComputer, MSFT_xADDomain, MSFT_xADUser + + Node $AllNodes.Where({$_.MachineName -eq $VMName}).NodeName + { + xComputer MachineName + { + Name = $Node.MachineName + } + + WindowsFeature ADDS + { + Ensure = "Present" + Name = "AD-Domain-Services" + DependsOn = "[xComputer]MachineName" + } + + xADDomain Forest + { + DomainName = $Node.DomainName + DomainAdministratorCredential = (Import-Clixml $Node.DomainCredFile) + SafemodeAdministratorPassword = (Import-Clixml $Node.DomainCredFile) + DependsOn = "[WindowsFeature]ADDS" + } + + foreach($User in $Node.Users) + { + xADUser $User.UserName + { + Ensure = "Present" + UserName = $User.UserName + Password = (Import-Clixml $User.UserCredFile) + DomainName = $Node.DomainName + DomainAdministratorCredential = (Import-Clixml $Node.DomainCredFile) + DependsOn = "[DNSTransferZone]Setting" + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/Dummy/ModuleImportListInsideNode.ps1 b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/Dummy/ModuleImportListInsideNode.ps1 new file mode 100644 index 000000000000..7318da7a7694 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/Dummy/ModuleImportListInsideNode.ps1 @@ -0,0 +1,21 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +Configuration Foo +{ + Node Bar + { + Import-DscResource -M xPSDesiredStateConfiguration, xNetworking + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/Dummy/ModuleImportListOutsideNode.ps1 b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/Dummy/ModuleImportListOutsideNode.ps1 new file mode 100644 index 000000000000..29acc32db1ed --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/Dummy/ModuleImportListOutsideNode.ps1 @@ -0,0 +1,21 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +Configuration Foo +{ + Import-DscResource -ModuleName xPSDesiredStateConfiguration, xNetworking + Node Bar + { + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/Dummy/ModuleImportSingleInsideNode.ps1 b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/Dummy/ModuleImportSingleInsideNode.ps1 new file mode 100644 index 000000000000..b87e00868417 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/Dummy/ModuleImportSingleInsideNode.ps1 @@ -0,0 +1,21 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +Configuration Foo +{ + Node Bar + { + Import-DscResource -Module xNetworking + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/Dummy/ModuleImportSingleOutsideNode.ps1 b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/Dummy/ModuleImportSingleOutsideNode.ps1 new file mode 100644 index 000000000000..650153f80769 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/Dummy/ModuleImportSingleOutsideNode.ps1 @@ -0,0 +1,21 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +Configuration Foo +{ + Import-DscResource -Module xNetworking + Node Bar + { + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/Dummy/NameImportListInsideNode.ps1 b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/Dummy/NameImportListInsideNode.ps1 new file mode 100644 index 000000000000..cd6873417b4e --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/Dummy/NameImportListInsideNode.ps1 @@ -0,0 +1,21 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +Configuration Foo +{ + Node Bar + { + Import-DscResource -Name MSFT_xComputer, MSFT_xADDomain, MSFT_xADUser + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/Dummy/NameImportListOutsideNode.ps1 b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/Dummy/NameImportListOutsideNode.ps1 new file mode 100644 index 000000000000..d613ec086f23 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/Dummy/NameImportListOutsideNode.ps1 @@ -0,0 +1,21 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +Configuration Foo +{ + Import-DscResource -N MSFT_xComputer, MSFT_xADDomain, MSFT_xADUser + Node Bar + { + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/Dummy/NameImportSingleInsideNode.ps1 b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/Dummy/NameImportSingleInsideNode.ps1 new file mode 100644 index 000000000000..065414f7c907 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/Dummy/NameImportSingleInsideNode.ps1 @@ -0,0 +1,21 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +Configuration Foo +{ + Node Bar + { + Import-DscResource -Name MSFT_xComputer + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/Dummy/NameImportSingleOutsideNode.ps1 b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/Dummy/NameImportSingleOutsideNode.ps1 new file mode 100644 index 000000000000..9394c8f063a8 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/Dummy/NameImportSingleOutsideNode.ps1 @@ -0,0 +1,21 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +Configuration Foo +{ + Import-DscResource -Na MSFT_xComputer + Node Bar + { + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/Dummy/NameModuleImportSingleInsideNode.ps1 b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/Dummy/NameModuleImportSingleInsideNode.ps1 new file mode 100644 index 000000000000..a860c6dd018b --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/Dummy/NameModuleImportSingleInsideNode.ps1 @@ -0,0 +1,21 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +Configuration Foo +{ + Node Bar + { + Import-DscResource -Name MSFT_xComputer -ModuleName xComputerManagement + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/IEEScBad.ps1 b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/IEEScBad.ps1 new file mode 100644 index 000000000000..8bedf9eb0644 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/IEEScBad.ps1 @@ -0,0 +1,26 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +Configuration IEEscBad { + Import-DscResource -ModuleName xSystemSecurity -Name xIEESC + + Node localhost { + xIEESc DscIE { + UserRole = "Users" + IsEnabled = "False" + } + } + +} +AzureDscDemo \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/IEEScGood.ps1 b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/IEEScGood.ps1 new file mode 100644 index 000000000000..4db68f3b6585 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/IEEScGood.ps1 @@ -0,0 +1,26 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +Configuration IEEscGood { + Import-DscResource -ModuleName xSystemSecurity -Name xIEESC + + Node localhost { + xIEESc DscIE { + UserRole = "Users" + IsEnabled = $False + } + } + +} +AzureDscDemo \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/SHMulptiConfigurations.ps1 b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/SHMulptiConfigurations.ps1 new file mode 100644 index 000000000000..f91040528d73 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/SHMulptiConfigurations.ps1 @@ -0,0 +1,179 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +Configuration FileServerConfiguration +{ + Import-DscResource -Name MSFT_xComputer, MSFT_xFirewall + + Node $AllNodes.Where{$_.MachineName -eq "SHFileServer"}.NodeName + { + xComputer NameAndDomain + { + Name = $Node.MachineName + DomainName = $Node.DomainName + Credential = (Import-CliXML $Node.DomainCredFile) + } + + # Remove all built-in firewall rules + foreach ($rule in $Node.AbsentInRules) + { + xFirewall $rule.Name + { + Ensure = "Present"; + Access = "NotConfigured" + Name = $rule.Name; + Direction = "Inbound"; + State = "Disabled"; + Protocol = $rule.Protocol; + DependsOn = "[xComputer]NameAndDomain" + } + } + #comments + xFirewall HttpsForPullServer + { + Ensure = "Present" + Access = "Allow" + Name = "DSC HTTPS" + RemotePort = "8080"; + Protocol = "TCP"; + Direction = "Outbound"; + State = "Enabled"; + DependsOn = "[xComputer]NameAndDomain" + } + + WindowsFeature FileServer + { + Ensure = "Present" + Name = "File-Services" + DependsOn = "[xComputer]NameAndDomain" + } + + WindowsFeature WebServer + { + Ensure = "Absent" + Name = "Web-Server" + DependsOn = "[xComputer]NameAndDomain" + } + + # Remove all built-in File firewall rules + foreach ($rule in $Node.AbsentInFileRules) + { + xFirewall $rule.Name + { + Ensure = "Present"; + Access = "NotConfigured" + Name = $rule.Name; + Direction = "Inbound"; + State = "Disabled"; + Protocol = $rule.Protocol; + DependsOn = "[WindowsFeature]FileServer" + } + } + + # Open selective ports & protocols# more comments a lot of rules are created removing them + foreach ($rule in $Node.AllowedInRules) + { + xFirewall $rule.Name + { + Ensure = "Present"; + Access = "Allow"; + Name = $rule.Name; + LocalPort = $rule.Port; + Protocol = $rule.Protocol; + State = "Enabled"; + Direction = "Inbound"; + DependsOn = "[WindowsFeature]FileServer" + } + } + # hard coded + Group MATA + { + GroupName = "Administrators" + Ensure = "Present" + MembersToInclude = @("safeharbor\MATA") + Credential = (Import-Clixml $Node.DomainCredFile) + DependsOn = "[xComputer]NameAndDomain" + } + + User Administrator + { + Ensure = "Present" + UserName = "Administrator" + Disabled = $true + } + } +} + +$scriptLocation = $PSScriptRoot +Import-Module "$PSScriptRoot\CommonHelpers.psm1" -Force + +Configuration MgmtSrv +{ + Import-DscResource -Name MSFT_xComputer, MSFT_xPSSessionConfiguration + + Node $AllNodes.Where{$_.Role -eq "DelegatedAdmin"}.NodeName + { + xComputer NameAndDomain + { + Name = $Node.MachineName + DomainName = $Node.DomainName + Credential = (Import-CliXML $Node.DomainCredFile) + } + + xPSEndpoint Secure + { + Ensure = "Present" + Name = $Node.EPName + RunAsCredential = (Import-CliXml $Node.RunAsCredFile) + SecurityDescriptorSDDL = $Node.SDDL + StartupScript = $Node.StartupScript + DependsOn = "[xComputer]NameAndDomain" + } + } +} + +Configuration SHPullServerConfiguration +{ + Import-DscResource -Name MSFT_xComputer, MSFT_xDSCWebService + + Node $AllNodes.Where{$_.Role -eq "SHPullServer"}.NodeName + { + + WindowsFeature DSCServiceBin + { + Ensure = "Present" + Name = "DSC-Service" + } + + xDSCWebService ODataEP + { + Ensure = "Present" + EndpointName = "PSDSCPullServer" + CertificateThumbPrint = $Node.PullCert + ModulePath = "$env:PROGRAMFILES\WindowsPowerShell\DscService\Modules" + ConfigurationPath = "$env:PROGRAMFILES\WindowsPowerShell\DscService\Configuration" + State = "Started" + DependsOn = "[WindowsFeature]DSCServiceBin" + } + + xComputer NameAndDomain + { + Name = $Node.MachineName + DomainName = $Node.DomainName + Credential = (Import-CliXML $Node.DomainCredFile) + DependsOn = "[xDSCWebService]ODataEP" + } + } +} + diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/VisualStudio.ps1 b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/VisualStudio.ps1 new file mode 100644 index 000000000000..0d81eeeb8794 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/Configurations/VisualStudio.ps1 @@ -0,0 +1,30 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +Configuration VisualStudio +{ + Import-DscResource -Module xPSDesiredStateConfiguration + Node localhost { + xPackage VS + { + Ensure="Present" + Name = "Microsoft Visual Studio Ultimate 2013" + Path = "\\products\public\PRODUCTS\Developers\Visual Studio 2013\ultimate\vs_ultimate.exe" + Arguments = "/quiet /noweb /Log c:\temp\vc.log" + ProductId = "" + } + } +} + +. VisualStudio \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/DSC Resource Kit Wave 6 08282014.zip b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/DSC Resource Kit Wave 6 08282014.zip new file mode 100644 index 000000000000..79f351ae5956 Binary files /dev/null and b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Resources/DSC/DSC Resource Kit Wave 6 08282014.zip differ diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/packages.config b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/packages.config new file mode 100644 index 000000000000..e8c5131c0544 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/packages.config @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Commands.ServiceManagement.PlatformImageRepository.csproj b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Commands.ServiceManagement.PlatformImageRepository.csproj new file mode 100644 index 000000000000..18afdc586714 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Commands.ServiceManagement.PlatformImageRepository.csproj @@ -0,0 +1,220 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {6478FA8B-3801-4863-8591-87F0855D5C82} + Library + Properties + Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository + Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository + v4.5 + 512 + + ..\..\..\ + true + + + true + full + false + ..\..\..\Package\Debug\ServiceManagement\Azure\Compute + DEBUG;TRACE + prompt + 4 + true + true + false + + + OnBuildSuccess + + + ..\..\..\Package\Release\ServiceManagement\Azure\Compute + TRACE;SIGN + true + pdbonly + AnyCPU + bin\Release\Commands.ServiceManagement.PlatformImageRepository.dll.CodeAnalysisLog.xml + true + GlobalSuppressions.cs + prompt + MinimumRecommendedRules.ruleset + ;$(ProgramFiles)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\Rule Sets + ;$(ProgramFiles)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\FxCop\Rules + true + MSSharedLibKey.snk + true + true + false + + + + False + ..\..\..\packages\AutoMapper.3.1.1\lib\net40\AutoMapper.dll + + + False + ..\..\..\packages\AutoMapper.3.1.1\lib\net40\AutoMapper.Net4.dll + + + ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll + + + ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll + + + ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.2.1.0\lib\net40\Microsoft.WindowsAzure.Management.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.6.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.3.1.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll + + + False + ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll + + + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + True + + + + + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + True + Resources.resx + + + + + + PreserveNewest + + + + + + + PreserveNewest + Designer + + + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + + + {e1ca72ba-8374-45f6-904d-fd34ecdf5b6f} + Commands.ServiceManagement + + + {4900ec4e-8deb-4412-9108-0bc52f81d457} + Commands.Utilities + + + {cd5aa507-f5ef-473d-855b-84b91a1abe54} + Commands + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/NewAzurePlatformExtensionCertificateConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/NewAzurePlatformExtensionCertificateConfig.cs new file mode 100644 index 000000000000..0566621253cf --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/NewAzurePlatformExtensionCertificateConfig.cs @@ -0,0 +1,68 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using AutoMapper; +using Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.ExtensionPublishing +{ + /// + /// Create a New Extension Certificate Config Set. + /// + [Cmdlet( + VerbsCommon.New, + AzurePlatformExtensionCertificateConfigCommandNoun), + OutputType( + typeof(ExtensionCertificateConfig))] + public class NewAzurePlatformExtensionCertificateConfigCommand : PSCmdlet + { + protected const string AzurePlatformExtensionCertificateConfigCommandNoun = "AzurePlatformExtensionCertificateConfig"; + + [Parameter( + Mandatory = true, + Position = 0, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Certificate Store Location.")] + [ValidateNotNullOrEmpty] + public string StoreLocation { get; set; } + + [Parameter( + Mandatory = true, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Certificate Store Name.")] + public string StoreName { get; set; } + + [Parameter( + Mandatory = true, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Certificate Thumbprint Algorithm.")] + public string ThumbprintAlgorithm { get; set; } + + [Parameter( + Mandatory = true, + Position = 3, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Certificate Thumbprint Requirement.")] + public SwitchParameter ThumbprintRequired { get; set; } + + protected override void ProcessRecord() + { + ServiceManagementPlatformImageRepositoryProfile.Initialize(); + WriteObject(Mapper.Map(this)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/NewAzurePlatformExtensionEndpointConfigSet.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/NewAzurePlatformExtensionEndpointConfigSet.cs new file mode 100644 index 000000000000..14088a687ba7 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/NewAzurePlatformExtensionEndpointConfigSet.cs @@ -0,0 +1,37 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.ExtensionPublishing +{ + /// + /// Create a New Extension Endpoint Config Set. + /// + [Cmdlet( + VerbsCommon.New, + AzurePlatformExtensionEndpointConfigSetCommandNoun), + OutputType( + typeof(ExtensionEndpointConfigSet))] + public class NewAzurePlatformExtensionEndpointConfigSetCommand : PSCmdlet + { + protected const string AzurePlatformExtensionEndpointConfigSetCommandNoun = "AzurePlatformExtensionEndpointConfigSet"; + + protected override void ProcessRecord() + { + WriteObject(new ExtensionEndpointConfigSet()); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/NewAzurePlatformExtensionLocalResourceConfigSet.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/NewAzurePlatformExtensionLocalResourceConfigSet.cs new file mode 100644 index 000000000000..eaa1583f463a --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/NewAzurePlatformExtensionLocalResourceConfigSet.cs @@ -0,0 +1,37 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.ExtensionPublishing +{ + /// + /// Create a New Extension Local Resource Config Set. + /// + [Cmdlet( + VerbsCommon.New, + AzurePlatformExtensionLocalResourceConfigSetCommandNoun), + OutputType( + typeof(ExtensionLocalResourceConfigSet))] + public class NewAzurePlatformExtensionLocalResourceConfigSetCommand : PSCmdlet + { + protected const string AzurePlatformExtensionLocalResourceConfigSetCommandNoun = "AzurePlatformExtensionLocalResourceConfigSet"; + + protected override void ProcessRecord() + { + WriteObject(new ExtensionLocalResourceConfigSet()); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/PublishAzurePlatformExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/PublishAzurePlatformExtension.cs new file mode 100644 index 000000000000..0bc44bfc161e --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/PublishAzurePlatformExtension.cs @@ -0,0 +1,276 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using AutoMapper; +using Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.ExtensionPublishing +{ + /// + /// Publish a Platform Extension Image. + /// + [Cmdlet( + VerbsData.Publish, + AzureVMPlatformExtensionCommandNoun), + OutputType( + typeof(ManagementOperationContext))] + public class PublishAzurePlatformExtensionCommand : ServiceManagementBaseCmdlet + { + protected const string AzureVMPlatformExtensionCommandNoun = "AzurePlatformExtension"; + protected const string PublicModeStr = "Public"; + protected const string InternalModeStr = "Internal"; + + public bool? IsInternalExtension { get; set; } + + [Parameter( + Mandatory = true, + Position = 0, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Image Name.")] + [ValidateNotNullOrEmpty] + public string ExtensionName { get; set; } + + [Parameter( + Mandatory = true, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Publisher.")] + [ValidateNotNullOrEmpty] + public string Publisher { get; set; } + + [Parameter( + Mandatory = true, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Version.")] + [ValidateNotNullOrEmpty] + public string Version { get; set; } + + [Parameter( + Mandatory = true, + Position = 3, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Hosting Resources.")] + [ValidateNotNullOrEmpty] + public string HostingResources { get; set; } + + [Parameter( + Mandatory = true, + Position = 4, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Media Link.")] + [ValidateNotNullOrEmpty] + public Uri MediaLink { get; set; } + + [Parameter( + Position = 5, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Label.")] + [ValidateNotNullOrEmpty] + public string Label { get; set; } + + [Parameter( + Position = 6, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Certificate Config.")] + [ValidateNotNullOrEmpty] + public ExtensionCertificateConfig CertificateConfig { get; set; } + + [Parameter( + Position = 7, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Endpoint Config.")] + [ValidateNotNullOrEmpty] + public ExtensionEndpointConfigSet EndpointConfig { get; set; } + + [Parameter( + Position = 8, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Public Configuration Schema.")] + [ValidateNotNullOrEmpty] + public string PublicConfigurationSchema { get; set; } + + [Parameter( + Position = 9, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Private Configuration Schema.")] + [ValidateNotNullOrEmpty] + public string PrivateConfigurationSchema { get; set; } + + [Parameter( + Position = 10, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Description.")] + [ValidateNotNullOrEmpty] + public string Description { get; set; } + + [Parameter( + Position = 11, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Publisher's Company Name.")] + [ValidateNotNullOrEmpty] + public string CompanyName { get; set; } + + [Parameter( + Position = 12, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Published Date.")] + [ValidateNotNullOrEmpty] + public DateTime? PublishedDate { get; set; } + + [Parameter( + Position = 13, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Local Resource Config.")] + [ValidateNotNullOrEmpty] + public ExtensionLocalResourceConfigSet LocalResourceConfig { get; set; } + + [Parameter( + Position = 14, + ValueFromPipelineByPropertyName = true, + HelpMessage = "To block the role upon failure.")] + [ValidateNotNullOrEmpty] + public SwitchParameter BlockRoleUponFailure { get; set; } + + [Parameter( + Position = 15, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Sample Config.")] + [ValidateNotNullOrEmpty] + public string SampleConfig { get; set; } + + [Parameter( + Position = 16, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Eula Link.")] + [ValidateNotNullOrEmpty] + public Uri Eula { get; set; } + + [Parameter( + Position = 17, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Privacy Link.")] + [ValidateNotNullOrEmpty] + public Uri PrivacyUri { get; set; } + + [Parameter( + Position = 18, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Homepage Link.")] + [ValidateNotNullOrEmpty] + public Uri HomepageUri { get; set; } + + [Parameter( + Position = 19, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Type is XML.")] + [ValidateNotNullOrEmpty] + public SwitchParameter XmlExtension { get; set; } + + [Parameter( + Position = 20, + ValueFromPipelineByPropertyName = true, + HelpMessage = "To disallow major version upgrade.")] + [ValidateNotNullOrEmpty] + public SwitchParameter DisallowMajorVersionUpgrade { get; set; } + + [Parameter( + Position = 21, + ValueFromPipelineByPropertyName = true, + HelpMessage = "To disallow major version upgrade.")] + [ValidateNotNullOrEmpty] + public string SupportedOS { get; set; } + + [Parameter( + Mandatory = false, + Position = 22, + HelpMessage = "To force the registration operation.")] + public SwitchParameter Force { get; set; } + + public string ExtensionMode { get; set; } + + protected override void OnProcessRecord() + { + ServiceManagementPlatformImageRepositoryProfile.Initialize(); + + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => + { + OperationStatusResponse op = null; + + bool found = ExtensionExists(); + var publishCnfm = Resources.ExtensionPublishingConfirmation; + var publishCptn = Resources.ExtensionPublishingCaption; + var upgradeCnfm = Resources.ExtensionUpgradingConfirmation; + var upgradeCptn = Resources.ExtensionUpgradingCaption; + + this.IsInternalExtension = string.Equals(this.ExtensionMode, PublicModeStr) ? false + : string.Equals(this.ExtensionMode, InternalModeStr) ? true + : true; + + if (found && (this.Force.IsPresent || this.ShouldContinue(upgradeCnfm, upgradeCptn))) + { + var parameters = Mapper.Map(this); + op = this.ComputeClient.ExtensionImages.Update(parameters); + } + else if (!found && (this.Force.IsPresent || this.ShouldContinue(publishCnfm, publishCptn))) + { + var parameters = Mapper.Map(this); + op = this.ComputeClient.ExtensionImages.Register(parameters); + } + + return op; + }); + } + + private bool ExtensionExists() + { + bool found = false; + + try + { + var ext = this.ComputeClient.HostedServices + .ListExtensionVersions(this.Publisher, this.ExtensionName); + + found |= ext != null && ext.Any(); + } + catch(Exception ex) + { + WriteWarning(ex.ToString()); + } + + try + { + var ext = this.ComputeClient.VirtualMachineExtensions + .ListVersions(this.Publisher, this.ExtensionName); + + found |= ext != null && ext.Any(); + } + catch (Exception ex) + { + WriteWarning(ex.ToString()); + } + + return found; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/RemoveAzurePlatformExtensionEndpoint.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/RemoveAzurePlatformExtensionEndpoint.cs new file mode 100644 index 000000000000..a1f11d91ab02 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/RemoveAzurePlatformExtensionEndpoint.cs @@ -0,0 +1,79 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.ExtensionPublishing +{ + /// + /// Remove an Endpoint from the Config Set. + /// + [Cmdlet( + VerbsCommon.Remove, + AzurePlatformExtensionEndpointCommandNoun, + DefaultParameterSetName = InputEndpointParamSetStr), + OutputType( + typeof(ExtensionLocalResourceConfigSet))] + public class RemoveAzurePlatformExtensionEndpointCommand : PSCmdlet + { + protected const string AzurePlatformExtensionEndpointCommandNoun = "AzurePlatformExtensionEndpoint"; + protected const string InputEndpointParamSetStr = "InputEndpoint"; + protected const string InternalEndpointParamSetStr = "InternalEndpoint"; + + [Parameter( + Mandatory = true, + Position = 0, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Endpoint Config Object.")] + public ExtensionEndpointConfigSet EndpointConfig { get; set; } + + [Parameter( + ParameterSetName = InputEndpointParamSetStr, + Mandatory = true, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Input Endpoint Name.")] + public string InputEndpointName { get; set; } + + [Parameter( + ParameterSetName = InternalEndpointParamSetStr, + Mandatory = true, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Internal Endpoint Name.")] + public string InternalEndpointName { get; set; } + + protected override void ProcessRecord() + { + if (this.EndpointConfig != null) + { + if (!string.IsNullOrEmpty(this.InputEndpointName)) + { + this.EndpointConfig.InputEndpoints.RemoveAll( + p => string.Equals(p.Name, this.InputEndpointName, StringComparison.OrdinalIgnoreCase)); + } + + if (!string.IsNullOrEmpty(this.InternalEndpointName)) + { + this.EndpointConfig.InternalEndpoints.RemoveAll( + p => string.Equals(p.Name, this.InternalEndpointName, StringComparison.OrdinalIgnoreCase)); + } + } + + WriteObject(this.EndpointConfig); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/RemoveAzurePlatformExtensionLocalResource.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/RemoveAzurePlatformExtensionLocalResource.cs new file mode 100644 index 000000000000..b8c950df7bbd --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/RemoveAzurePlatformExtensionLocalResource.cs @@ -0,0 +1,58 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.ExtensionPublishing +{ + /// + /// Remove a Local Resource from the Config Set. + /// + [Cmdlet( + VerbsCommon.Remove, + AzurePlatformExtensionLocalResourceCommandNoun), + OutputType( + typeof(ExtensionLocalResourceConfigSet))] + public class RemoveAzurePlatformExtensionLocalResourceCommand : PSCmdlet + { + protected const string AzurePlatformExtensionLocalResourceCommandNoun = "AzurePlatformExtensionLocalResource"; + + [Parameter( + Mandatory = true, + Position = 0, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Local Resource Config Object.")] + public ExtensionLocalResourceConfigSet LocalResourceConfig { get; set; } + + [Parameter( + Mandatory = true, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Local Resource Name.")] + public string LocalResourceName { get; set; } + + protected override void ProcessRecord() + { + if (this.LocalResourceConfig != null && this.LocalResourceConfig.LocalResources != null) + { + this.LocalResourceConfig.LocalResources.RemoveAll( + c => string.Equals(c.Name, this.LocalResourceName, StringComparison.OrdinalIgnoreCase)); + } + + WriteObject(this.LocalResourceConfig); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/SetAzurePlatformExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/SetAzurePlatformExtension.cs new file mode 100644 index 000000000000..0e84dbb19824 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/SetAzurePlatformExtension.cs @@ -0,0 +1,167 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using AutoMapper; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.ExtensionPublishing +{ + /// + /// Set a Platform Extension Image. + /// + [Cmdlet( + VerbsCommon.Set, + AzureVMPlatformExtensionCommandNoun), + OutputType( + typeof(ManagementOperationContext))] + public class SetAzurePlatformExtensionCommand : ServiceManagementBaseCmdlet + { + protected const string AzureVMPlatformExtensionCommandNoun = "AzurePlatformExtension"; + protected const string PublicModeStr = "Public"; + protected const string InternalModeStr = "Internal"; + + [Parameter( + Mandatory = true, + Position = 0, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Image Name.")] + [ValidateNotNullOrEmpty] + public string ExtensionName { get; set; } + + [Parameter( + Mandatory = true, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Publisher.")] + [ValidateNotNullOrEmpty] + public string Publisher { get; set; } + + [Parameter( + Mandatory = true, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Version.")] + [ValidateNotNullOrEmpty] + public string Version { get; set; } + + [Parameter( + Position = 3, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Label.")] + [ValidateNotNullOrEmpty] + public string Label { get; set; } + + [Parameter( + Position = 4, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Description.")] + [ValidateNotNullOrEmpty] + public string Description { get; set; } + + [Parameter( + Position = 5, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Sample Config.")] + [ValidateNotNullOrEmpty] + public string SampleConfig { get; set; } + + [Parameter( + Position = 6, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Eula Link.")] + [ValidateNotNullOrEmpty] + public Uri Eula { get; set; } + + [Parameter( + Position = 7, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Privacy Link.")] + [ValidateNotNullOrEmpty] + public Uri PrivacyUri { get; set; } + + [Parameter( + Position = 8, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Homepage Link.")] + [ValidateNotNullOrEmpty] + public Uri HomepageUri { get; set; } + + [Parameter( + Position = 9, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Mode.")] + [ValidateNotNullOrEmpty] + [ValidateSet(PublicModeStr, InternalModeStr)] + public string ExtensionMode { get; set; } + + [Parameter( + Position = 10, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Publisher Name.")] + [ValidateNotNullOrEmpty] + public string CompanyName { get; set; } + + public bool? BlockRoleUponFailure { get; set; } + + public bool? DisallowMajorVersionUpgrade { get; set; } + + public bool? IsJsonExtension { get; set; } + + public bool? IsInternalExtension { get; set; } + + protected override void OnProcessRecord() + { + ServiceManagementPlatformImageRepositoryProfile.Initialize(); + + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => + { + var vmExtension = this.ComputeClient.VirtualMachineExtensions + .ListVersions(this.Publisher, this.ExtensionName) + .FirstOrDefault(e => e.Version.Equals(this.Version)); + + var serviceExtn = this.ComputeClient.HostedServices + .ListExtensionVersions(this.Publisher, this.ExtensionName) + .FirstOrDefault(e => e.Version.Equals(this.Version)); + + if (vmExtension != null) + { + IsJsonExtension = vmExtension.IsJsonExtension; + IsInternalExtension = vmExtension.IsJsonExtension; + DisallowMajorVersionUpgrade = vmExtension.DisallowMajorVersionUpgrade; + } + else if (serviceExtn != null) + { + IsJsonExtension = serviceExtn.IsJsonExtension; + IsInternalExtension = serviceExtn.IsJsonExtension; + BlockRoleUponFailure = serviceExtn.BlockRoleUponFailure; + } + + this.IsInternalExtension = string.Equals(this.ExtensionMode, PublicModeStr) ? false + : string.Equals(this.ExtensionMode, InternalModeStr) ? true + : true; + + var parameters = Mapper.Map(this); + + return this.ComputeClient.ExtensionImages.Update(parameters); + }); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/SetAzurePlatformExtensionEndpoint.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/SetAzurePlatformExtensionEndpoint.cs new file mode 100644 index 000000000000..74a8b8703c83 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/SetAzurePlatformExtensionEndpoint.cs @@ -0,0 +1,123 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.ExtensionPublishing +{ + /// + /// Add or Update an Endpoint in Config Set. + /// + [Cmdlet( + VerbsCommon.Set, + AzurePlatformExtensionEndpointCommandNoun, + DefaultParameterSetName = InputEndpointParamSetStr), + OutputType( + typeof(ExtensionLocalResourceConfigSet))] + public class SetAzurePlatformExtensionEndpointCommand : PSCmdlet + { + protected const string AzurePlatformExtensionEndpointCommandNoun = "AzurePlatformExtensionEndpoint"; + protected const string InputEndpointParamSetStr = "InputEndpoint"; + protected const string InternalEndpointParamSetStr = "InternalEndpoint"; + + [Parameter( + Mandatory = true, + Position = 0, + ValueFromPipeline = true, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Endpoint Config Object.")] + public ExtensionEndpointConfigSet EndpointConfig { get; set; } + + [Parameter( + ParameterSetName = InputEndpointParamSetStr, + Mandatory = true, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Input Endpoint Name.")] + public string InputEndpointName { get; set; } + + [Parameter( + ParameterSetName = InternalEndpointParamSetStr, + Mandatory = true, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Internal Endpoint Name.")] + public string InternalEndpointName { get; set; } + + [Parameter( + Mandatory = true, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Internal Endpoint Port.")] + public int Port { get; set; } + + [Parameter( + Mandatory = true, + Position = 3, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Internal Endpoint Name.")] + public string Protocol { get; set; } + + [Parameter( + ParameterSetName = InputEndpointParamSetStr, + Mandatory = true, + Position = 4, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Input Endpoint Port.")] + public int LocalPort { get; set; } + + protected override void ProcessRecord() + { + if (this.EndpointConfig == null) + { + this.EndpointConfig = new ExtensionEndpointConfigSet(); + } + + if (!string.IsNullOrEmpty(this.InternalEndpointName)) + { + if (this.EndpointConfig.InternalEndpoints == null) + { + this.EndpointConfig.InternalEndpoints = new List(); + } + + this.EndpointConfig.InternalEndpoints.Add(new ExtensionInternalEndpoint + { + Name = this.InternalEndpointName, + Port = this.Port, + Protocol = this.Protocol + }); + } + + if (!string.IsNullOrEmpty(this.InputEndpointName)) + { + if (this.EndpointConfig.InputEndpoints == null) + { + this.EndpointConfig.InputEndpoints = new List(); + } + + this.EndpointConfig.InputEndpoints.Add(new ExtensionInputEndpoint + { + Name = this.InputEndpointName, + Port = this.Port, + Protocol = this.Protocol, + LocalPort = this.LocalPort + }); + } + + WriteObject(this.EndpointConfig); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/SetAzurePlatformExtensionLocalResource.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/SetAzurePlatformExtensionLocalResource.cs new file mode 100644 index 000000000000..5d6cd8c38dab --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/SetAzurePlatformExtensionLocalResource.cs @@ -0,0 +1,79 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.ExtensionPublishing +{ + /// + /// Add or Update a Local Resource in the Config Set. + /// + [Cmdlet( + VerbsCommon.Set, + AzurePlatformExtensionLocalResourceCommandNoun), + OutputType( + typeof(ExtensionLocalResourceConfigSet))] + public class SetAzurePlatformExtensionLocalResourceCommand : PSCmdlet + { + protected const string AzurePlatformExtensionLocalResourceCommandNoun = "AzurePlatformExtensionLocalResource"; + + [Parameter( + Mandatory = true, + Position = 0, + ValueFromPipeline = true, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Local Resource Config Object.")] + public ExtensionLocalResourceConfigSet LocalResourceConfig { get; set; } + + [Parameter( + Mandatory = true, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Local Resource Name.")] + [ValidateNotNullOrEmpty] + public string LocalResourceName { get; set; } + + [Parameter( + Mandatory = true, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Local Resource Size.")] + [ValidateNotNullOrEmpty] + public int LocalResourceSizeInMb { get; set; } + + protected override void ProcessRecord() + { + if (this.LocalResourceConfig == null) + { + this.LocalResourceConfig = new ExtensionLocalResourceConfigSet(); + } + + if (this.LocalResourceConfig.LocalResources == null) + { + this.LocalResourceConfig.LocalResources = new List(); + } + + this.LocalResourceConfig.LocalResources.Add( + new ExtensionLocalResourceConfig + { + Name = this.LocalResourceName, + SizeInMB = this.LocalResourceSizeInMb + }); + + WriteObject(this.LocalResourceConfig); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/UnpublishAzurePlatformExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/UnpublishAzurePlatformExtension.cs new file mode 100644 index 000000000000..703e769e0851 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ExtensionPublishing/UnpublishAzurePlatformExtension.cs @@ -0,0 +1,77 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.ExtensionPublishing +{ + /// + /// Unpublish a Platform Extension Image. + /// + [Cmdlet( + VerbsData.Unpublish, + AzureVMPlatformExtensionCommandNoun), + OutputType( + typeof(ManagementOperationContext))] + public class UnpublishAzurePlatformExtensionCommand : ServiceManagementBaseCmdlet + { + protected const string AzureVMPlatformExtensionCommandNoun = "AzurePlatformExtension"; + + [Parameter( + Mandatory = true, + Position = 0, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Image Name.")] + [ValidateNotNullOrEmpty] + public string ExtensionName { get; set; } + + [Parameter( + Mandatory = true, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Publisher.")] + [ValidateNotNullOrEmpty] + public string Publisher { get; set; } + + [Parameter( + Mandatory = true, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Version.")] + [ValidateNotNullOrEmpty] + public string Version { get; set; } + + [Parameter( + Mandatory = false, + Position = 3, + HelpMessage = "To force the unpublish operation.")] + public SwitchParameter Force { get; set; } + + protected override void OnProcessRecord() + { + ServiceManagementPlatformImageRepositoryProfile.Initialize(); + + if (this.Force.IsPresent + || this.ShouldContinue(Resources.ExtensionUnpublishingConfirmation, Resources.ExtensionUnpublishingCaption)) + { + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.ComputeClient.ExtensionImages.Unregister(this.Publisher, this.ExtensionName, this.Version)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ImagePublishing/GetAzurePlatformVMImage.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ImagePublishing/GetAzurePlatformVMImage.cs new file mode 100644 index 000000000000..644c634fef0b --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ImagePublishing/GetAzurePlatformVMImage.cs @@ -0,0 +1,116 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.ImagePublishing +{ + [Cmdlet(VerbsCommon.Get, "AzurePlatformVMImage"), OutputType(typeof(OSImageDetailsContext))] + public class GetAzurePlatformVMImage : ServiceManagementBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the image in the image library.")] + [ValidateNotNullOrEmpty] + public string ImageName { get; set; } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + + var imageType = new VirtualMachineImageHelper(this.ComputeClient).GetImageType(this.ImageName); + bool isOSImage = imageType.HasFlag(VirtualMachineImageType.OSImage); + bool isVMImage = imageType.HasFlag(VirtualMachineImageType.VMImage); + + if (isOSImage || !isVMImage) + { + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.ComputeClient.VirtualMachineOSImages.GetDetails(this.ImageName), + (operation, imageDetails) => imageDetails == null ? null : new OSImageDetailsContext + { + AffinityGroup = imageDetails.AffinityGroup, + Category = imageDetails.Category, + Label = imageDetails.Label, + Location = imageDetails.Location, + MediaLink = imageDetails.MediaLinkUri, + ImageName = imageDetails.Name, + OS = imageDetails.OperatingSystemType, + LogicalSizeInGB = (int)imageDetails.LogicalSizeInGB, + Eula = imageDetails.Eula, + Description = imageDetails.Description, + IconUri = imageDetails.IconUri, + ImageFamily = imageDetails.ImageFamily, + IsPremium = imageDetails.IsPremium, + PrivacyUri = imageDetails.PrivacyUri, + PublishedDate = imageDetails.PublishedDate, + RecommendedVMSize = imageDetails.RecommendedVMSize, + IsCorrupted = imageDetails.IsCorrupted, + SmallIconUri = imageDetails.SmallIconUri, + PublisherName = imageDetails.PublisherName, + ReplicationProgress = imageDetails.ReplicationProgress.Select( + detail => new ReplicationProgressContext + { + Location = detail.Location, + Progress = detail.Progress + }).ToList(), + OperationId = operation.RequestId, + OperationDescription = CommandRuntime.ToString(), + OperationStatus = operation.Status.ToString() + }); + } + + if (isVMImage) + { + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.ComputeClient.VirtualMachineVMImages.GetDetails(this.ImageName), + (operation, imageDetails) => imageDetails == null ? null : new VMImageDetailsContext + { + AffinityGroup = imageDetails.AffinityGroup, + Location = imageDetails.Location, + Category = imageDetails.Category, + Label = imageDetails.Label, + ImageName = imageDetails.Name, + Eula = imageDetails.Eula, + Description = imageDetails.Description, + IconUri = imageDetails.IconUri, + ImageFamily = imageDetails.ImageFamily, + IsPremium = imageDetails.IsPremium, + PrivacyUri = imageDetails.PrivacyUri, + PublishedDate = imageDetails.PublishedDate, + RecommendedVMSize = imageDetails.RecommendedVMSize, + IsCorrupted = imageDetails.IsCorrupted, + SmallIconUri = imageDetails.SmallIconUri, + SharingStatus = imageDetails.SharingStatus, + PublisherName = imageDetails.PublisherName, + ReplicationProgress = imageDetails.ReplicationProgress.Select( + detail => new ReplicationProgressContext + { + Location = detail.Location, + Progress = detail.Progress + }).ToList(), + OperationId = operation.RequestId, + OperationDescription = CommandRuntime.ToString(), + OperationStatus = operation.Status.ToString() + }); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ImagePublishing/RemoveAzurePlatformVMImage.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ImagePublishing/RemoveAzurePlatformVMImage.cs new file mode 100644 index 000000000000..67f7e05d8968 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ImagePublishing/RemoveAzurePlatformVMImage.cs @@ -0,0 +1,71 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.ImagePublishing +{ + [Cmdlet(VerbsCommon.Remove, "AzurePlatformVMImage"), OutputType(typeof(ManagementOperationContext))] + public class RemoveAzurePlatformVMImage : ServiceManagementBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the image in the image library.")] + [ValidateNotNullOrEmpty] + public string ImageName + { + get; + set; + } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + + var imageType = new VirtualMachineImageHelper(this.ComputeClient).GetImageType(this.ImageName); + bool isOSImage = imageType.HasFlag(VirtualMachineImageType.OSImage); + bool isVMImage = imageType.HasFlag(VirtualMachineImageType.VMImage); + + if (isOSImage && isVMImage) + { + WriteErrorWithTimestamp( + string.Format(Resources.DuplicateNamesFoundInBothVMAndOSImages, this.ImageName)); + } + else if (isOSImage || !isVMImage) + { + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => + { + this.ComputeClient.VirtualMachineOSImages.Get(this.ImageName); + return this.ComputeClient.VirtualMachineOSImages.Unreplicate(this.ImageName); + }); + } + else + { + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => + { + this.ComputeClient.VirtualMachineVMImages.GetDetails(this.ImageName); + return this.ComputeClient.VirtualMachineVMImages.Unreplicate(this.ImageName); + }); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ImagePublishing/SetAzurePlatformVMImage.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ImagePublishing/SetAzurePlatformVMImage.cs new file mode 100644 index 000000000000..119c44148cdc --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ImagePublishing/SetAzurePlatformVMImage.cs @@ -0,0 +1,171 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.ImagePublishing +{ + [Cmdlet(VerbsCommon.Set, "AzurePlatformVMImage", DefaultParameterSetName = ReplicateParameterSetName), OutputType(typeof(ManagementOperationContext))] + public class SetAzurePlatformVMImage : ServiceManagementBaseCmdlet + { + private const string ReplicateParameterSetName = "Replicate"; + private const string ShareParameterSetName = "Share"; + + private bool isVMImage; + private bool isOSImage; + + [Parameter(Position = 0, Mandatory = true, ParameterSetName = ReplicateParameterSetName, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the image in the image library.")] + [Parameter(Position = 0, Mandatory = true, ParameterSetName = ShareParameterSetName, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the image in the image library.")] + [ValidateNotNullOrEmpty] + public string ImageName + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = true, ParameterSetName = ReplicateParameterSetName, ValueFromPipelineByPropertyName = true, HelpMessage = "Specifies the locations that image will be replicated.")] + [ValidateNotNullOrEmpty] + public string[] ReplicaLocations + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = true, ParameterSetName = ShareParameterSetName, ValueFromPipelineByPropertyName = true, HelpMessage = "Specifies the sharing permission of replicated image.")] + [ValidateSet("Public", "Private")] + public string Permission + { + get; + set; + } + + public void SetAzurePlatformVMImageProcess() + { + var imageType = new VirtualMachineImageHelper(this.ComputeClient).GetImageType(this.ImageName); + isOSImage = imageType.HasFlag(VirtualMachineImageType.OSImage); + isVMImage = imageType.HasFlag(VirtualMachineImageType.VMImage); + + if (isOSImage && isVMImage) + { + WriteErrorWithTimestamp( + string.Format(ServiceManagement.Properties.Resources.DuplicateNamesFoundInBothVMAndOSImages, this.ImageName)); + } + + if (this.ParameterSpecified("ReplicaLocations")) + { + ProcessReplicateImageParameterSet(); + } + else if (this.ParameterSpecified("Permission")) + { + ProcessShareImageParameterSet(); + } + } + + private bool ParameterSpecified(string parameterName) + { + return this.MyInvocation.BoundParameters.ContainsKey(parameterName); + } + + private void ProcessShareImageParameterSet() + { + if (isVMImage) + { + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => + { + this.ComputeClient.VirtualMachineVMImages.GetDetails(this.ImageName); + return this.ComputeClient.VirtualMachineVMImages.Share(this.ImageName, this.Permission); + }); + } + else + { + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => + { + this.ComputeClient.VirtualMachineOSImages.GetDetails(this.ImageName); + return this.ComputeClient.VirtualMachineOSImages.Share(this.ImageName, this.Permission); + }); + } + } + + private void ProcessReplicateImageParameterSet() + { + if (isVMImage) + { + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => + { + this.ComputeClient.VirtualMachineVMImages.GetDetails(this.ImageName); + ValidateTargetLocations(); + return this.ComputeClient.VirtualMachineVMImages.Replicate( + this.ImageName, + new Management.Compute.Models.VirtualMachineVMImageReplicateParameters + { + TargetLocations = this.ReplicaLocations == null ? null : this.ReplicaLocations.ToList() + }); + }); + } + else + { + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => + { + this.ComputeClient.VirtualMachineOSImages.Get(this.ImageName); + ValidateTargetLocations(); + return this.ComputeClient.VirtualMachineOSImages.Replicate(this.ImageName, new Management.Compute.Models.VirtualMachineOSImageReplicateParameters + { + TargetLocations = this.ReplicaLocations == null ? null : this.ReplicaLocations.ToList() + }); + }); + } + } + + private void ValidateTargetLocations() + { + var locations = this.ManagementClient.Locations.List(); + if (this.ReplicaLocations != null) + { + var invalidValues = ReplicaLocations.Except(locations.Select(l => l.Name), StringComparer.OrdinalIgnoreCase).ToList(); + + if (invalidValues.Any()) + { + var validValuesMessage = string.Format(Resources.SetAzurePlatformVMImage_Valid_Values, String.Join(", ", locations.Select(l => "'" + l.Name + "'"))); + var invalidValuesMessage = string.Format(Resources.SetAzurePlatformVMImage_Invalid_Values, String.Join(", ", invalidValues.Select(l => "'" + l + "'"))); + + throw new ArgumentOutOfRangeException("Location", String.Format(Resources.SetAzurePlatformVMImage_Expected_Found, validValuesMessage, invalidValuesMessage)); + } + } + } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + this.SetAzurePlatformVMImageProcess(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/MSSharedLibKey.snk b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/MSSharedLibKey.snk differ diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.dll-Help.psd1 b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.dll-Help.psd1 new file mode 100644 index 000000000000..9de8179ec015 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.dll-Help.psd1 @@ -0,0 +1,86 @@ +# +# Module manifest for module 'Azure' +# +# Generated by: Microsoft Corporation +# +# Generated on: 5/23/2012 +# + +@{ + +# Version number of this module. +ModuleVersion = '0.8.8' + +# ID used to uniquely identify this module +GUID = 'D48CF693-4125-4D2D-8790-1514F44CE325' + +# Author of this module +Author = 'Microsoft Corporation' + +# Company or vendor of this module +CompanyName = 'Microsoft Corporation' + +# Copyright statement for this module +Copyright = '?Microsoft Corporation. All rights reserved.' + +# Description of the functionality provided by this module +Description = '' + +# Minimum version of the Windows PowerShell engine required by this module +PowerShellVersion = '3.0' + +# Name of the Windows PowerShell host required by this module +PowerShellHostName = '' + +# Minimum version of the Windows PowerShell host required by this module +PowerShellHostVersion = '' + +# Minimum version of the .NET Framework required by this module +DotNetFrameworkVersion = '4.0' + +# Minimum version of the common language runtime (CLR) required by this module +CLRVersion='4.0' + +# Processor architecture (None, X86, Amd64, IA64) required by this module +ProcessorArchitecture = 'None' + +# Modules that must be imported into the global environment prior to importing this module +RequiredModules = @() + +# Assemblies that must be loaded prior to importing this module +RequiredAssemblies = @() + +# Script files (.ps1) that are run in the caller's environment prior to importing this module +ScriptsToProcess = @() + +# Type files (.ps1xml) to be loaded when importing this module +TypesToProcess = @() + +# Format files (.ps1xml) to be loaded when importing this module +FormatsToProcess = @() + +# Modules to import as nested modules of the module specified in ModuleToProcess +NestedModules = '..\..\..\Package\Debug\ServiceManagement\Azure\Compute\Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.dll' + +# Functions to export from this module +FunctionsToExport = '*' + +# Cmdlets to export from this module +CmdletsToExport = '*' + +# Variables to export from this module +VariablesToExport = '*' + +# Aliases to export from this module +AliasesToExport = @() + +# List of all modules packaged with this module +ModuleList = @() + +# List of all files packaged with this module +FileList = @() + +# Private data to pass to the module specified in ModuleToProcess +PrivateData = '' + +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.dll-Help.xml b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.dll-Help.xml new file mode 100644 index 000000000000..a8a8a3246c41 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.dll-Help.xml @@ -0,0 +1,2138 @@ + + + + + Get-AzurePlatformVMImage + + Returns an image's properties along with the replication progress status across the replica locations. + + + + + Get + AzurePlatformVMImage + + + + + Returns an image's properties along with the replication progress status across the replica locations. + + + + Get-AzurePlatformVMImage + + ImageName + + Name of the image in the user image library. + + String + + + + + + ImageName + + Name of the image in the user image library. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Get-AzurePlatformVMImage -ImageName MyWin7Image + + Description + + + + -----------Returns the image from user image repository with the replication progress status across the target locations. + + + + + + + Unknown + + + + + + + + New-AzurePlatformExtensionCertificateConfig + + + + + + + New + AzurePlatformExtensionCertificateConfig + + + + + + + + + New-AzurePlatformExtensionCertificateConfig + + StoreLocation + + + + String + + + StoreName + + + + String + + + ThumbprintAlgorithm + + + + String + + + ThumbprintRequired + + + + SwitchParameter + + + + + + StoreLocation + + + + String + + String + + + + + + StoreName + + + + String + + String + + + + + + ThumbprintAlgorithm + + + + String + + String + + + + + + ThumbprintRequired + + + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + New-AzurePlatformExtensionEndpointConfigSet + + + + + + + New + AzurePlatformExtensionEndpointConfigSet + + + + + + + + + New-AzurePlatformExtensionEndpointConfigSet + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + New-AzurePlatformExtensionLocalResourceConfigSet + + + + + + + New + AzurePlatformExtensionLocalResourceConfigSet + + + + + + + + + New-AzurePlatformExtensionLocalResourceConfigSet + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Publish-AzurePlatformExtension + + Publishes a brand new extension or publish a newer version of an existing version. Extensions can be published as external or internal using this cmdlet but a brand new version is always published as internal by default. + + + + + Publish + AzurePlatformExtension + + + + + + + + + Publish-AzurePlatformExtension + + ExtensionName + + + + String + + + Publisher + + + + String + + + Version + + + + String + + + HostingResources + + + + String + + + MediaLink + + + + Uri + + + Label + + + + String + + + CertificateConfig + + + + ExtensionCertificateConfig + + + EndpointConfig + + + + ExtensionEndpointConfigSet + + + PublicConfigurationSchema + + + + String + + + PrivateConfigurationSchema + + + + String + + + Description + + + + String + + + CompanyName + + + + String + + + PublishedDate + + + + Nullable`1[DateTime] + + + LocalResourceConfig + + + + ExtensionLocalResourceConfigSet + + + BlockRoleUponFailure + + + + SwitchParameter + + + SampleConfig + + + + String + + + Eula + + + + Uri + + + PrivacyUri + + + + Uri + + + HomepageUri + + + + Uri + + + XmlExtension + + + + SwitchParameter + + + DisallowMajorVersionUpgrade + + + + SwitchParameter + + + SupportedOS + + + + String + + + Force + + + + SwitchParameter + + + + + + ExtensionName + + + + String + + String + + + + + + Publisher + + + + String + + String + + + + + + Version + + + + String + + String + + + + + + HostingResources + + + + String + + String + + + + + + MediaLink + + + + Uri + + Uri + + + + + + Label + + + + String + + String + + + + + + CertificateConfig + + + + ExtensionCertificateConfig + + ExtensionCertificateConfig + + + + + + EndpointConfig + + + + ExtensionEndpointConfigSet + + ExtensionEndpointConfigSet + + + + + + PublicConfigurationSchema + + + + String + + String + + + + + + PrivateConfigurationSchema + + + + String + + String + + + + + + Description + + + + String + + String + + + + + + CompanyName + + + + String + + String + + + + + + PublishedDate + + + + Nullable`1[DateTime] + + Nullable`1[DateTime] + + + + + + LocalResourceConfig + + + + ExtensionLocalResourceConfigSet + + ExtensionLocalResourceConfigSet + + + + + + BlockRoleUponFailure + + + + SwitchParameter + + SwitchParameter + + + + + + SampleConfig + + + + String + + String + + + + + + Eula + + + + Uri + + Uri + + + + + + PrivacyUri + + + + Uri + + Uri + + + + + + HomepageUri + + + + Uri + + Uri + + + + + + XmlExtension + + + + SwitchParameter + + SwitchParameter + + + + + + DisallowMajorVersionUpgrade + + + + SwitchParameter + + SwitchParameter + + + + + + SupportedOS + + + + String + + String + + + Windows + + + Force + + + + SwitchParameter + + SwitchParameter + + + + + + PipelineVariable + + Not Specified + + string + + string + + + + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.Common.ManagementOperationContext + + + + + + + + + + + + + + + + + + + + + Unknown + + + + + + + + Remove-AzurePlatformExtensionEndpoint + + + + + + + Remove + AzurePlatformExtensionEndpoint + + + + + + + + + Remove-AzurePlatformExtensionEndpoint + + EndpointConfig + + + + ExtensionEndpointConfigSet + + + InputEndpointName + + + + String + + + + Remove-AzurePlatformExtensionEndpoint + + EndpointConfig + + + + ExtensionEndpointConfigSet + + + InternalEndpointName + + + + String + + + + + + EndpointConfig + + + + ExtensionEndpointConfigSet + + ExtensionEndpointConfigSet + + + + + + InputEndpointName + + + + String + + String + + + + + + InternalEndpointName + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Remove-AzurePlatformExtensionLocalResource + + + + + + + Remove + AzurePlatformExtensionLocalResource + + + + + + + + + Remove-AzurePlatformExtensionLocalResource + + LocalResourceConfig + + + + ExtensionLocalResourceConfigSet + + + LocalResourceName + + + + String + + + + + + LocalResourceConfig + + + + ExtensionLocalResourceConfigSet + + ExtensionLocalResourceConfigSet + + + + + + LocalResourceName + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Remove-AzurePlatformVMImage + + Deletes the replicas of the platform image from all of the replica locations. + + + + + Remove + AzurePlatformVMImage + + + + + Deletes the replicas of the platform image from all of the replica locations. + + + + Remove-AzurePlatformVMImage + + ImageName + + Name of the image in user image repository. + + String + + + + + + ImageName + + Name of the image in user image repository. + + String + + String + + + + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.Common.ManagementOperationContext + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Remove-AzurePlatformVMImage -ImageName Win7UserImage + + Description + + + + -----------Replicas of "Win7UserImage" is deleted from all the locations. + + + + + + + Get-AzurePlatformVMImage + + + + Set-AzurePlatformVMImage + + + + + + + + Set-AzurePlatformExtension + + Once an extension version is registered (as public or internal), this cmdlet allows the publisher to modify the extension properties without changing version number. + + + + + Set + AzurePlatformExtension + + + + + + + + + Set-AzurePlatformExtension + + ExtensionName + + + + String + + + Publisher + + + + String + + + Version + + + + String + + + Label + + + + String + + + Description + + + + String + + + SampleConfig + + + + String + + + Eula + + + + Uri + + + PrivacyUri + + + + Uri + + + HomepageUri + + + + Uri + + + ExtensionMode + + + + String + + + CompanyName + + + + String + + + + + + ExtensionName + + + + String + + String + + + + + + Publisher + + + + String + + String + + + + + + Version + + + + String + + String + + + + + + Label + + + + String + + String + + + + + + Description + + + + String + + String + + + + + + SampleConfig + + + + String + + String + + + + + + Eula + + + + Uri + + Uri + + + + + + PrivacyUri + + + + Uri + + Uri + + + + + + HomepageUri + + + + Uri + + Uri + + + + + + ExtensionMode + + + + String + + String + + + + + + CompanyName + + + + String + + String + + + + + + PipelineVariable + + Not Specified + + string + + string + + + + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.Common.ManagementOperationContext + + + + + + + + + + + + + + + + + + + + + Unknown + + + + + + + + Set-AzurePlatformExtensionEndpoint + + + + + + + Set + AzurePlatformExtensionEndpoint + + + + + + + + + Set-AzurePlatformExtensionEndpoint + + EndpointConfig + + + + ExtensionEndpointConfigSet + + + InputEndpointName + + + + String + + + Port + + + + Int32 + + + Protocol + + + + String + + + LocalPort + + + + Int32 + + + + Set-AzurePlatformExtensionEndpoint + + EndpointConfig + + + + ExtensionEndpointConfigSet + + + InternalEndpointName + + + + String + + + Port + + + + Int32 + + + Protocol + + + + String + + + + + + EndpointConfig + + + + ExtensionEndpointConfigSet + + ExtensionEndpointConfigSet + + + + + + InputEndpointName + + + + String + + String + + + + + + Port + + + + Int32 + + Int32 + + + + + + Protocol + + + + String + + String + + + + + + LocalPort + + + + Int32 + + Int32 + + + + + + InternalEndpointName + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set-AzurePlatformExtensionLocalResource + + + + + + + Set + AzurePlatformExtensionLocalResource + + + + + + + + + Set-AzurePlatformExtensionLocalResource + + LocalResourceConfig + + + + ExtensionLocalResourceConfigSet + + + LocalResourceName + + + + String + + + LocalResourceSizeInMb + + + + Int32 + + + + + + LocalResourceConfig + + + + ExtensionLocalResourceConfigSet + + ExtensionLocalResourceConfigSet + + + + + + LocalResourceName + + + + String + + String + + + + + + LocalResourceSizeInMb + + + + Int32 + + Int32 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set-AzurePlatformVMImage + + Allows to replicate the image to target replica locations or allows to share/stop sharing the replicated images. + + + + + Set + AzurePlatformVMImage + + + + + + + + + Set-AzurePlatformVMImage + + ImageName + + Specifies the name of the image in the user image library. + + String + + + ReplicaLocations + + Specifies the locations that image will be replicated + + String[] + + + + Set-AzurePlatformVMImage + + ImageName + + Specifies the name of the image in the user image library. + + String + + + Permission + + Specifies the sharing permission of replicated image. + + String + + + + + + ImageName + + Specifies the name of the image in the user image library. + + String + + String + + + + + + ReplicaLocations + + Specifies the locations that image will be replicated + + String[] + + String[] + + + + + + Permission + + Specifies the sharing permission of replicated image. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Set-AzurePlatformVMImage -ImageName Win7UserImage -ReplicaLocations @("West US", "East US") + + Description + + + + -----------Starts the replication of the "Win7UserImage" from the user image repository to "West US" and "East US" locations. + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> Set-AzurePlatformVMImage -ImageName Win7UserImage -Permission Public + + Description + + + + -----------Shares the replicas of Win7UserImage with Public if the replication is completed, otherwise the request is recorded and when the replication completes after then they are shared. + + + + + -------------------------- EXAMPLE 3 -------------------------- + + + + PS C:\> Set-AzurePlatformVMImage -ImageName Win7UserImage -Permission Private + + Stops the sharing of the replicas of Win7UserImage with Public. + + Description + + + + ----------- + + + + + + + Get-AzurePlatformVMImage + + + + Remove-AzurePlatformVMImage + + + + + + + + Unpublish-AzurePlatformExtension + + + + + + + Unpublish + AzurePlatformExtension + + + + + + + + + Unpublish-AzurePlatformExtension + + ExtensionName + + + + String + + + Publisher + + + + String + + + Version + + + + String + + + Force + + + + SwitchParameter + + + + + + ExtensionName + + + + String + + String + + + + + + Publisher + + + + String + + String + + + + + + Version + + + + String + + String + + + + + + Force + + + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Model/ExtensionCertificateConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Model/ExtensionCertificateConfig.cs new file mode 100644 index 000000000000..9213742aaa8b --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Model/ExtensionCertificateConfig.cs @@ -0,0 +1,24 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.Model +{ + public class ExtensionCertificateConfig + { + public string StoreLocation { get; set; } + public string StoreName { get; set; } + public string ThumbprintAlgorithm { get; set; } + public bool? ThumbprintRequired { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Model/ExtensionEndpointConfigSet.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Model/ExtensionEndpointConfigSet.cs new file mode 100644 index 000000000000..cff354008c55 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Model/ExtensionEndpointConfigSet.cs @@ -0,0 +1,24 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.Model +{ + public class ExtensionEndpointConfigSet + { + public List InputEndpoints { get; set; } + public List InternalEndpoints { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Model/ExtensionInputEndpoint.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Model/ExtensionInputEndpoint.cs new file mode 100644 index 000000000000..1efd21b05f88 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Model/ExtensionInputEndpoint.cs @@ -0,0 +1,24 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.Model +{ + public class ExtensionInputEndpoint + { + public int LocalPort { get; set; } + public string Name { get; set; } + public int Port { get; set; } + public string Protocol { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Model/ExtensionInternalEndpoint.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Model/ExtensionInternalEndpoint.cs new file mode 100644 index 000000000000..ad1a3943561f --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Model/ExtensionInternalEndpoint.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.Model +{ + public class ExtensionInternalEndpoint + { + public string Name { get; set; } + public int Port { get; set; } + public string Protocol { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Model/ExtensionLocalResourceConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Model/ExtensionLocalResourceConfig.cs new file mode 100644 index 000000000000..842396a9ba6c --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Model/ExtensionLocalResourceConfig.cs @@ -0,0 +1,22 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.Model +{ + public class ExtensionLocalResourceConfig + { + public string Name { get; set; } + public int? SizeInMB { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Model/ExtensionLocalResourceConfigSet.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Model/ExtensionLocalResourceConfigSet.cs new file mode 100644 index 000000000000..4ce087a54eb0 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Model/ExtensionLocalResourceConfigSet.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.Model +{ + public class ExtensionLocalResourceConfigSet + { + public List LocalResources { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Model/OSImageDetailsContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Model/OSImageDetailsContext.cs new file mode 100644 index 000000000000..68f3932acf5c --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Model/OSImageDetailsContext.cs @@ -0,0 +1,25 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.Model +{ + public class OSImageDetailsContext : OSImageContext + { + public bool? IsCorrupted { get; set; } + public List ReplicationProgress { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Model/ReplicationProgressContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Model/ReplicationProgressContext.cs new file mode 100644 index 000000000000..beeb614d792d --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Model/ReplicationProgressContext.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.Model +{ + public class ReplicationProgressContext + { + public string Location { get; set; } + public string Progress { get; set; } + + public override string ToString() + { + return string.Format("Location: {0} => Progress: {1}", this.Location, this.Progress); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Model/VMImageDetailsContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Model/VMImageDetailsContext.cs new file mode 100644 index 000000000000..384e36377cf1 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Model/VMImageDetailsContext.cs @@ -0,0 +1,21 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.Model +{ + public class VMImageDetailsContext : OSImageDetailsContext + { + public string SharingStatus { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/PIR.psd1 b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/PIR.psd1 new file mode 100644 index 000000000000..1c454870be6a --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/PIR.psd1 @@ -0,0 +1,92 @@ +# +# Module manifest for module 'Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository' +# +# Generated by: Microsoft Corporation +# +# Generated on: 7/22/2013 +# + +@{ + +# Script module or binary module file associated with this manifest +ModuleToProcess = '.\Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.dll' + +# Version number of this module. +ModuleVersion = '0.8.11' + +# ID used to uniquely identify this module +GUID = 'a9343cbd-175c-4f72-90c7-2abe9b300644' + +# Author of this module +Author = 'Microsoft Corporation' + +# Company or vendor of this module +CompanyName = 'Microsoft Corporation' + +# Copyright statement for this module +Copyright = ' Microsoft Corporation. All rights reserved.' + +# Description of the functionality provided by this module +Description = '' + +# Minimum version of the Windows PowerShell engine required by this module +PowerShellVersion = '3.0' + +# Name of the Windows PowerShell host required by this module +PowerShellHostName = '' + +# Minimum version of the Windows PowerShell host required by this module +PowerShellHostVersion = '' + +# Minimum version of the .NET Framework required by this module +DotNetFrameworkVersion = '' + +# Minimum version of the common language runtime (CLR) required by this module +CLRVersion='4.0' + +# Processor architecture (None, X86, Amd64, IA64) required by this module +ProcessorArchitecture = '' + +# Modules that must be imported into the global environment prior to importing this module +RequiredModules = @() + +# Assemblies that must be loaded prior to importing this module +RequiredAssemblies = @() + +# Script files (.ps1) that are run in the caller's environment prior to importing this module +ScriptsToProcess = @() + +# Type files (.ps1xml) to be loaded when importing this module +TypesToProcess = @( +) + +# Format files (.ps1xml) to be loaded when importing this module +FormatsToProcess = @( +) + +# Modules to import as nested modules of the module specified in ModuleToProcess +NestedModules = '' + +# Functions to export from this module +FunctionsToExport = '*' + +# Cmdlets to export from this module +CmdletsToExport = '*' + +# Variables to export from this module +VariablesToExport = '*' + +# Aliases to export from this module +AliasesToExport = '*' + +# List of all modules packaged with this module +ModuleList = @() + +# List of all files packaged with this module +FileList = @() + +# Private data to pass to the module specified in ModuleToProcess +PrivateData = '' + +} + diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Properties/AssemblyInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..19b115fbf78b --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Properties/AssemblyInfo.cs @@ -0,0 +1,38 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("0a3d16e8-9b84-4c77-a6e3-bc627587472b")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] +[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] + +#if SIGN +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.ServiceManagement.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +#else +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.ServiceManagement.Test")] +#endif diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Properties/Resources.Designer.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Properties/Resources.Designer.cs new file mode 100644 index 000000000000..32e27fabedd5 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Properties/Resources.Designer.cs @@ -0,0 +1,145 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.Propert" + + "ies.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Extension Publishing. + /// + internal static string ExtensionPublishingCaption { + get { + return ResourceManager.GetString("ExtensionPublishingCaption", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This cmdlet will publish the specified extension. Do you want to continue?. + /// + internal static string ExtensionPublishingConfirmation { + get { + return ResourceManager.GetString("ExtensionPublishingConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Extension Unpublishing. + /// + internal static string ExtensionUnpublishingCaption { + get { + return ResourceManager.GetString("ExtensionUnpublishingCaption", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This cmdlet will unpublish the specified extension. Do you want to continue?. + /// + internal static string ExtensionUnpublishingConfirmation { + get { + return ResourceManager.GetString("ExtensionUnpublishingConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Extension Upgrading. + /// + internal static string ExtensionUpgradingCaption { + get { + return ResourceManager.GetString("ExtensionUpgradingCaption", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This cmdlet will upgrade the specified extension with a new version. Do you want to continue?. + /// + internal static string ExtensionUpgradingConfirmation { + get { + return ResourceManager.GetString("ExtensionUpgradingConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Expected {0}, Found {1}. + /// + internal static string SetAzurePlatformVMImage_Expected_Found { + get { + return ResourceManager.GetString("SetAzurePlatformVMImage_Expected_Found", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to invalid values: {0}. + /// + internal static string SetAzurePlatformVMImage_Invalid_Values { + get { + return ResourceManager.GetString("SetAzurePlatformVMImage_Invalid_Values", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to valid values: {0}. + /// + internal static string SetAzurePlatformVMImage_Valid_Values { + get { + return ResourceManager.GetString("SetAzurePlatformVMImage_Valid_Values", resourceCulture); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Properties/Resources.resx b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Properties/Resources.resx new file mode 100644 index 000000000000..344b6a3f8cf2 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Properties/Resources.resx @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + valid values: {0} + + + invalid values: {0} + + + Expected {0}, Found {1} + + + Extension Unpublishing + + + This cmdlet will unpublish the specified extension. Do you want to continue? + + + Extension Publishing + + + This cmdlet will publish the specified extension. Do you want to continue? + + + Extension Upgrading + + + This cmdlet will upgrade the specified extension with a new version. Do you want to continue? + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ServiceManagementPlatformImageRepositoryProfile.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ServiceManagementPlatformImageRepositoryProfile.cs new file mode 100644 index 000000000000..cb5762c9d990 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/ServiceManagementPlatformImageRepositoryProfile.cs @@ -0,0 +1,87 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using AutoMapper; +using Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.ExtensionPublishing; +using Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.Model; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository +{ + public class ServiceManagementPlatformImageRepositoryProfile : Profile + { + private static readonly Lazy initialize; + + static ServiceManagementPlatformImageRepositoryProfile() + { + initialize = new Lazy(() => + { + Mapper.AddProfile(); + return true; + }); + } + + public static bool Initialize() + { + return ServiceManagementProfile.Initialize() && initialize.Value; + } + + public override string ProfileName + { + get { return "ServiceManagementPlatformImageRepositoryProfile"; } + } + + protected override void Configure() + { + Mapper.CreateMap() + .ForMember(c => c.ThumbprintRequired, o => o.MapFrom(r => r.ThumbprintRequired.IsPresent)); + + Mapper.CreateMap(); + Mapper.CreateMap(); + Mapper.CreateMap(); + Mapper.CreateMap(); + Mapper.CreateMap(); + + Mapper.CreateMap() + .ForMember(c => c.IsJsonExtension, o => o.MapFrom(r => !r.XmlExtension.IsPresent)) + .ForMember(c => c.Type, o => o.MapFrom(r => r.ExtensionName)) + .ForMember(c => c.ProviderNameSpace, o => o.MapFrom(r => r.Publisher)) + .ForMember(c => c.BlockRoleUponFailure, o => o.MapFrom(r => r.BlockRoleUponFailure.IsPresent)) + .ForMember(c => c.DisallowMajorVersionUpgrade, o => o.MapFrom(r => r.DisallowMajorVersionUpgrade.IsPresent)) + .ForMember(c => c.Certificate, o => o.MapFrom(r => r.CertificateConfig)) + .ForMember(c => c.ExtensionEndpoints, o => o.MapFrom(r => r.EndpointConfig)) + .ForMember(c => c.LocalResources, o => o.MapFrom(r => r.LocalResourceConfig == null ? null : r.LocalResourceConfig.LocalResources)) + .ForMember(c => c.PublisherName, o => o.MapFrom(r => r != null ? (string)null : null)) + .ForMember(c => c.SupportedOS, o => o.MapFrom(r => r.SupportedOS ?? ExtensionImageSupportedOperatingSystemType.Windows)); + + Mapper.CreateMap() + .ForMember(c => c.IsJsonExtension, o => o.MapFrom(r => !r.XmlExtension.IsPresent)) + .ForMember(c => c.Type, o => o.MapFrom(r => r.ExtensionName)) + .ForMember(c => c.ProviderNameSpace, o => o.MapFrom(r => r.Publisher)) + .ForMember(c => c.BlockRoleUponFailure, o => o.MapFrom(r => r.BlockRoleUponFailure.IsPresent)) + .ForMember(c => c.DisallowMajorVersionUpgrade, o => o.MapFrom(r => r.DisallowMajorVersionUpgrade.IsPresent)) + .ForMember(c => c.Certificate, o => o.MapFrom(r => r.CertificateConfig)) + .ForMember(c => c.ExtensionEndpoints, o => o.MapFrom(r => r.EndpointConfig)) + .ForMember(c => c.LocalResources, o => o.MapFrom(r => r.LocalResourceConfig == null ? null : r.LocalResourceConfig.LocalResources)) + .ForMember(c => c.PublisherName, o => o.MapFrom(r => r != null ? (string)null : null)) + .ForMember(c => c.SupportedOS, o => o.MapFrom(r => r.SupportedOS ?? ExtensionImageSupportedOperatingSystemType.Windows)); + + Mapper.CreateMap() + .ForMember(c => c.Type, o => o.MapFrom(r => r.ExtensionName)) + .ForMember(c => c.ProviderNameSpace, o => o.MapFrom(r => r.Publisher)) + .ForMember(c => c.PublisherName, o => o.MapFrom(r => r != null ? (string)null : null)); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/packages.config b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/packages.config new file mode 100644 index 000000000000..244087329296 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/packages.config @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/AzurePreview.psd1 b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/AzurePreview.psd1 new file mode 100644 index 000000000000..d01504557f57 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/AzurePreview.psd1 @@ -0,0 +1,92 @@ +# +# Module manifest for module 'Microsoft.WindowsAzure.Commands.ServiceManagement.Preview' +# +# Generated by: Microsoft Corporation +# +# Generated on: 11/22/2013 +# + +@{ + +# Script module or binary module file associated with this manifest +ModuleToProcess = '.\Microsoft.WindowsAzure.Commands.ServiceManagement.Preview.dll' + +# Version number of this module. +ModuleVersion = '0.8.11' + +# ID used to uniquely identify this module +GUID = '1C72E555-E83F-45E4-AED2-AF3278828DCD' + +# Author of this module +Author = 'Microsoft Corporation' + +# Company or vendor of this module +CompanyName = 'Microsoft Corporation' + +# Copyright statement for this module +Copyright = ' Microsoft Corporation. All rights reserved.' + +# Description of the functionality provided by this module +Description = '' + +# Minimum version of the Windows PowerShell engine required by this module +PowerShellVersion = '3.0' + +# Name of the Windows PowerShell host required by this module +PowerShellHostName = '' + +# Minimum version of the Windows PowerShell host required by this module +PowerShellHostVersion = '' + +# Minimum version of the .NET Framework required by this module +DotNetFrameworkVersion = '' + +# Minimum version of the common language runtime (CLR) required by this module +CLRVersion='4.0' + +# Processor architecture (None, X86, Amd64, IA64) required by this module +ProcessorArchitecture = '' + +# Modules that must be imported into the global environment prior to importing this module +RequiredModules = @() + +# Assemblies that must be loaded prior to importing this module +RequiredAssemblies = @() + +# Script files (.ps1) that are run in the caller's environment prior to importing this module +ScriptsToProcess = @() + +# Type files (.ps1xml) to be loaded when importing this module +TypesToProcess = @( +) + +# Format files (.ps1xml) to be loaded when importing this module +FormatsToProcess = @( +) + +# Modules to import as nested modules of the module specified in ModuleToProcess +NestedModules = '' + +# Functions to export from this module +FunctionsToExport = '*' + +# Cmdlets to export from this module +CmdletsToExport = '*' + +# Variables to export from this module +VariablesToExport = '*' + +# Aliases to export from this module +AliasesToExport = '*' + +# List of all modules packaged with this module +ModuleList = @() + +# List of all files packaged with this module +FileList = @() + +# Private data to pass to the module specified in ModuleToProcess +PrivateData = '' + +} + diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Commands.ServiceManagement.Preview.csproj b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Commands.ServiceManagement.Preview.csproj new file mode 100644 index 000000000000..b69b462a090d --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Commands.ServiceManagement.Preview.csproj @@ -0,0 +1,204 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {E895BBDA-0B06-46AB-B909-9B97B3ECE47E} + Library + Properties + Microsoft.WindowsAzure.Commands.ServiceManagement.Preview + Microsoft.WindowsAzure.Commands.ServiceManagement.Preview + v4.5 + 512 + + ..\..\..\ + true + + + true + full + false + ..\..\..\Package\Debug\ServiceManagement\Azure\Compute + DEBUG;TRACE + prompt + 4 + true + true + false + + + OnBuildSuccess + + + ..\..\..\Package\Release\ServiceManagement\Azure\Compute + TRACE;SIGN + true + pdbonly + AnyCPU + bin\Release\Commands.ServiceManagement.PlatformImageRepository.dll.CodeAnalysisLog.xml + true + GlobalSuppressions.cs + prompt + MinimumRecommendedRules.ruleset + ;$(ProgramFiles)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\Rule Sets + ;$(ProgramFiles)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\FxCop\Rules + true + MSSharedLibKey.snk + true + true + false + + + + False + ..\..\..\packages\AutoMapper.3.1.1\lib\net40\AutoMapper.dll + + + False + ..\..\..\packages\AutoMapper.3.1.1\lib\net40\AutoMapper.Net4.dll + + + ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll + + + ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll + + + ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.2.1.0\lib\net40\Microsoft.WindowsAzure.Management.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.6.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Network.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.3.1.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll + + + False + ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll + + + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + True + + + + + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll + + + + + + + + True + True + Resources.resx + + + + + + Always + + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + + + {e1ca72ba-8374-45f6-904d-fd34ecdf5b6f} + Commands.ServiceManagement + + + {4900ec4e-8deb-4412-9108-0bc52f81d457} + Commands.Utilities + + + {cd5aa507-f5ef-473d-855b-84b91a1abe54} + Commands + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + + + AutoMapper.Net4.dll + PreserveNewest + + + Always + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/MSSharedLibKey.snk b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/MSSharedLibKey.snk differ diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Microsoft.WindowsAzure.Commands.ServiceManagement.Preview.dll-Help.psd1 b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Microsoft.WindowsAzure.Commands.ServiceManagement.Preview.dll-Help.psd1 new file mode 100644 index 000000000000..436bc7377b07 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Microsoft.WindowsAzure.Commands.ServiceManagement.Preview.dll-Help.psd1 @@ -0,0 +1,91 @@ +# +# Module manifest for module 'Microsoft.WindowsAzure.Commands.ServiceManagement.Preview' +# +# Generated by: Microsoft Corporation +# +# Generated on: 11/22/2013 +# + +@{ + +# Version number of this module. +ModuleVersion = '0.8.8' + +# ID used to uniquely identify this module +GUID = '1C72E555-E83F-45E4-AED2-AF3278828DCD' + +# Author of this module +Author = 'Microsoft Corporation' + +# Company or vendor of this module +CompanyName = 'Microsoft Corporation' + +# Copyright statement for this module +Copyright = ' Microsoft Corporation. All rights reserved.' + +# Description of the functionality provided by this module +Description = '' + +# Minimum version of the Windows PowerShell engine required by this module +PowerShellVersion = '3.0' + +# Name of the Windows PowerShell host required by this module +PowerShellHostName = '' + +# Minimum version of the Windows PowerShell host required by this module +PowerShellHostVersion = '' + +# Minimum version of the .NET Framework required by this module +DotNetFrameworkVersion = '' + +# Minimum version of the common language runtime (CLR) required by this module +CLRVersion='4.0' + +# Processor architecture (None, X86, Amd64, IA64) required by this module +ProcessorArchitecture = '' + +# Modules that must be imported into the global environment prior to importing this module +RequiredModules = @() + +# Assemblies that must be loaded prior to importing this module +RequiredAssemblies = @() + +# Script files (.ps1) that are run in the caller's environment prior to importing this module +ScriptsToProcess = @() + +# Type files (.ps1xml) to be loaded when importing this module +TypesToProcess = @( +) + +# Format files (.ps1xml) to be loaded when importing this module +FormatsToProcess = @( +) + +# Modules to import as nested modules of the module specified in ModuleToProcess +NestedModules = @( + '..\..\..\Package\Debug\ServiceManagement\Azure\Compute\Microsoft.WindowsAzure.Commands.ServiceManagement.Preview.dll' +) + +# Functions to export from this module +FunctionsToExport = '*' + +# Cmdlets to export from this module +CmdletsToExport = '*' + +# Variables to export from this module +VariablesToExport = '*' + +# Aliases to export from this module +AliasesToExport = '*' + +# List of all modules packaged with this module +ModuleList = @() + +# List of all files packaged with this module +FileList = @() + +# Private data to pass to the module specified in ModuleToProcess +PrivateData = '' + +} + diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Microsoft.WindowsAzure.Commands.ServiceManagement.Preview.dll-Help.xml b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Microsoft.WindowsAzure.Commands.ServiceManagement.Preview.dll-Help.xml new file mode 100644 index 000000000000..72a6d2ef7716 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Microsoft.WindowsAzure.Commands.ServiceManagement.Preview.dll-Help.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Properties/AssemblyInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..1da7476d1610 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Properties/AssemblyInfo.cs @@ -0,0 +1,38 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft.WindowsAzure.Commands.ServiceManagement.Preview")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("0a3d16e8-9b84-4c77-a6e3-bc627587472b")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] +[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] + +#if SIGN +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.ServiceManagement.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +#else +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.ServiceManagement.Test")] +#endif diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Properties/Resources.Designer.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Properties/Resources.Designer.cs new file mode 100644 index 000000000000..7de3dba98114 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.18213 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Preview.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.WindowsAzure.Commands.ServiceManagement.Preview.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Properties/Resources.resx b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Properties/Resources.resx new file mode 100644 index 000000000000..1af7de150c99 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Properties/Resources.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/ServiceManagementPreviewProfile.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/ServiceManagementPreviewProfile.cs new file mode 100644 index 000000000000..d7f35ce79eae --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/ServiceManagementPreviewProfile.cs @@ -0,0 +1,47 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using AutoMapper; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Preview +{ + public class ServiceManagementPreviewProfile : Profile + { + private static readonly Lazy initialize; + + static ServiceManagementPreviewProfile() + { + initialize = new Lazy(() => + { + Mapper.AddProfile(); + return true; + }); + } + + public static bool Initialize() + { + return ServiceManagementProfile.Initialize() && initialize.Value; + } + + public override string ProfileName + { + get { return "ServiceManagementPreviewProfile"; } + } + + protected override void Configure() + { + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/packages.config b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/packages.config new file mode 100644 index 000000000000..60e40c1d9cac --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/packages.config @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/AzureRTBVTs.playlist b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/AzureRTBVTs.playlist new file mode 100644 index 000000000000..6157e1ed5053 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/AzureRTBVTs.playlist @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/AzureRTComplete.playlist b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/AzureRTComplete.playlist new file mode 100644 index 000000000000..2dd4c62a6ee3 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/AzureRTComplete.playlist @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/AzureRTComplete_Full_Diff.playlist b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/AzureRTComplete_Full_Diff.playlist new file mode 100644 index 000000000000..28e28b29620f --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/AzureRTComplete_Full_Diff.playlist @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/AzureRTExtensions.playlist b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/AzureRTExtensions.playlist new file mode 100644 index 000000000000..2cd6a783375b --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/AzureRTExtensions.playlist @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/AzureRTFull.playlist b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/AzureRTFull.playlist new file mode 100644 index 000000000000..ce6aee2178df --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/AzureRTFull.playlist @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Commands.ServiceManagement.Test.csproj b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Commands.ServiceManagement.Test.csproj new file mode 100644 index 000000000000..0dc6d8691976 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Commands.ServiceManagement.Test.csproj @@ -0,0 +1,562 @@ + + + + Debug + AnyCPU + {58A78F29-8C0C-4A5E-893E-3953C0F29C8A} + Library + Properties + Microsoft.WindowsAzure.Commands.ServiceManagement.Test + Microsoft.WindowsAzure.Commands.ServiceManagement.Test + v4.5 + 512 + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages + False + UnitTest + ..\..\..\ + true + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + bin\Release\ + TRACE;SIGN + true + pdbonly + AnyCPU + prompt + false + true + MSSharedLibKey.snk + true + true + false + + + + False + ..\..\..\packages\AutoMapper.3.1.1\lib\net40\AutoMapper.dll + + + False + ..\..\..\packages\AutoMapper.3.1.1\lib\net40\AutoMapper.Net4.dll + + + ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll + + + ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll + + + ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll + + + False + ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll + + + False + ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.2.1.0\lib\net40\Microsoft.WindowsAzure.Management.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.6.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Network.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.3.1.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll + + + False + ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll + + + False + ..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll + + + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + True + + + False + lib\Security.Cryptography.dll + + + + 3.5 + + + + + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + + ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Code + + + + + + + Code + + + + + + + Code + + + + + + + Code + + + + + + + + + + + + + + + Code + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + True + Resource.resx + + + + + + + + + + + + + + + + + Always + + + Always + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ResXFileCodeGenerator + Resource.Designer.cs + Designer + + + + + {65c3a86a-716d-4e7d-ab67-1db00b3bf72d} + Commands.Common.Storage + + + {c60342b1-47d3-4a0e-8081-9b97ce60b7af} + Commands.Profile + + + {40fee0bb-fd45-4efc-85bc-0d602a6892c4} + Commands.Network + + + {6478fa8b-3801-4863-8591-87f0855d5c82} + Commands.ServiceManagement.PlatformImageRepository + + + {e895bbda-0b06-46ab-b909-9b97b3ece47e} + Commands.ServiceManagement.Preview + + + {E1CA72BA-8374-45F6-904D-FD34ECDF5B6F} + Commands.ServiceManagement + + + {08cf7da7-0392-4a19-b79b-e1ff67cdb81a} + Commands.Storage + + + {bc420543-c04e-4bf3-96e1-cd81b823bdd7} + Commands.Test.Utilities + + + {CD5AA507-F5EF-473D-855B-84B91A1ABE54} + Commands + + + {3b48a77b-5956-4a62-9081-92ba04b02b27} + Commands.Common.Test + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + {73820CBC-F4EB-4C5E-B4F0-CC4A93FBF157} + Sync + + + + + + + False + + + False + + + False + + + False + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/AddAzureVhdSASUriTest.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/AddAzureVhdSASUriTest.cs new file mode 100644 index 000000000000..ecd8cc84743f --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/AddAzureVhdSASUriTest.cs @@ -0,0 +1,677 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Reflection; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Storage.Auth; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests +{ + [TestClass] + public class AddAzureVhdSASUriTest : AzureVhdTest + { + + [TestInitialize] + public void Initialize() + { + SetTestSettings(); + + if (defaultAzureSubscription.Equals(null)) + { + Assert.Inconclusive("No Subscription is selected!"); + } + + pass = false; + testStartTime = DateTime.Now; + storageAccountKey = vmPowershellCmdlets.GetAzureStorageAccountKey(defaultAzureSubscription.CurrentStorageAccountName); + + try + { + vmPowershellCmdlets.RunPSScript("Get-AzureStorageContainer -Name " + vhdContainerName); + } + catch + { + // Create a container. + vmPowershellCmdlets.RunPSScript("New-AzureStorageContainer -Name " + vhdContainerName); + } + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\upload_VHD.csv", "upload_VHD#csv", DataAccessMethod.Sequential)] + public void UploadDiskSasUri() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Choose the vhd file from local machine + var vhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var vhdLocalPath = new FileInfo(Directory.GetCurrentDirectory() + "\\" + vhdName); + Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", vhdLocalPath); + + // Get the pre-calculated MD5 hash of the fixed vhd that was converted from the original vhd. + string md5hash = Convert.ToString(TestContext.DataRow["MD5hash"]); + + int i = 0; + while (i < 16) + { + if (!isReadWritePermission(i)) + { + i++; // Skip negative tests due to BUG: https://github.com/Azure/azure-sdk-tools/issues/2956 + } + else + { + string destinationSasUri2 = CreateSasUriWithPermission(vhdName, i); + try + { + Console.WriteLine("uploads {0} to {1}", vhdName, destinationSasUri2); + vmPowershellCmdlets.RemoveAzureSubscriptions(); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(vhdLocalPath, destinationSasUri2); + ReImportSubscription(); + Console.WriteLine("Finished uploading: {0}", destinationSasUri2); + + // Verify the upload. + AssertUploadContextAndContentMD5UsingSaveVhd(destinationSasUri2, vhdLocalPath, vhdUploadContext, md5hash); + Console.WriteLine("Test success with permission: {0}", i); + i++; + } + catch (Exception e) + { + continueIfNotReadWrite(e, ref i); + continue; + } + } + } + + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0} {1},{2}", testName, vhdName, (testEndTime - testStartTime).TotalSeconds) }); + pass = true; + } + + private string CreateSasUriWithPermission(string vhdName, int p) + { + // Set the destination + string vhdBlobName = string.Format("{0}/{1}.vhd", vhdContainerName, Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName))); + string httpsBlobUrlRoot = string.Format("https:{0}", blobUrlRoot.Substring(blobUrlRoot.IndexOf('/'))); + string vhdDestUri = httpsBlobUrlRoot + vhdBlobName; + + var destinationBlob2 = new CloudPageBlob(new Uri(vhdDestUri), new StorageCredentials(storageAccountKey.StorageAccountName, storageAccountKey.Primary)); + var policy2 = new SharedAccessBlobPolicy() + { + Permissions = (SharedAccessBlobPermissions)p, + SharedAccessExpiryTime = DateTime.UtcNow + TimeSpan.FromHours(1) + }; + var destinationBlobToken2 = destinationBlob2.GetSharedAccessSignature(policy2); + vhdDestUri += destinationBlobToken2; + return vhdDestUri; + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\overwrite_VHD.csv", "overwrite_VHD#csv", DataAccessMethod.Sequential)] + public void UploadDiskOverwriteSasUri() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Choose the vhd file from local machine + var vhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var vhdLocalPath = new FileInfo(Directory.GetCurrentDirectory() + "\\" + vhdName); + Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", vhdLocalPath); + + // Get the pre-calculated MD5 hash of the fixed vhd that was converted from the original vhd. + string md5hash = Convert.ToString(TestContext.DataRow["MD5hash"]); + + + int i = 0; + while (i < 16) + { + if (!isReadWriteDeletePermission(i)) + { + i++; // Skip negative tests due to BUG: https://github.com/Azure/azure-sdk-tools/issues/2956 + } + else + { + string destinationSasUri2 = CreateSasUriWithPermission(vhdName, i); + try + { + Console.WriteLine("uploads {0} to {1}", vhdName, destinationSasUri2); + + vmPowershellCmdlets.RemoveAzureSubscriptions(); + vmPowershellCmdlets.AddAzureVhd(vhdLocalPath, destinationSasUri2); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(vhdLocalPath, destinationSasUri2, true); + ReImportSubscription(); + Console.WriteLine("Finished uploading: {0}", destinationSasUri2); + + // Verify the upload. + AssertUploadContextAndContentMD5UsingSaveVhd(destinationSasUri2, vhdLocalPath, vhdUploadContext, md5hash); + Console.WriteLine("Test success with permission: {0}", i); + i++; + } + catch (Exception e) + { + continueIfNotReadWriteDelete(e, ref i); + continue; + } + } + } + + DateTime testEndTime = DateTime.Now; + pass = true; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\overwrite_VHD.csv", "overwrite_VHD#csv", DataAccessMethod.Sequential)] + public void UploadDiskOverwriteNonExistSasUri() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Choose the vhd file from local machine + var vhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var vhdLocalPath = new FileInfo(Directory.GetCurrentDirectory() + "\\" + vhdName); + Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", vhdLocalPath); + + // Get the pre-calculated MD5 hash of the fixed vhd that was converted from the original vhd. + string md5hash = Convert.ToString(TestContext.DataRow["MD5hash"]); + + + int i = 0; + while (i < 16) + { + if (!isReadWriteDeletePermission(i)) + { + i++; // Skip negative tests due to BUG: https://github.com/Azure/azure-sdk-tools/issues/2956 + } + else + { + string destinationSasUri2 = CreateSasUriWithPermission(vhdName, i); + try + { + Console.WriteLine("uploads {0} to {1}", vhdName, destinationSasUri2); + vmPowershellCmdlets.RemoveAzureSubscriptions(); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(vhdLocalPath, destinationSasUri2, true); + ReImportSubscription(); + Console.WriteLine("Finished uploading: {0}", destinationSasUri2); + + // Verify the upload. + AssertUploadContextAndContentMD5UsingSaveVhd(destinationSasUri2, vhdLocalPath, vhdUploadContext, md5hash); + Console.WriteLine("Test success with permission: {0}", i); + i++; + } + catch (Exception e) + { + continueIfNotReadWriteDelete(e, ref i); + continue; + } + } + } + + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + pass = true; + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\overwrite_VHD.csv", "overwrite_VHD#csv", DataAccessMethod.Sequential)] + public void UploadDiskSecondWithoutOverwriteSasUri() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Choose the vhd file from local machine + var vhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var vhdLocalPath = new FileInfo(Directory.GetCurrentDirectory() + "\\" + vhdName); + Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", vhdLocalPath); + + // Get the pre-calculated MD5 hash of the fixed vhd that was converted from the original vhd. + string md5hash = Convert.ToString(TestContext.DataRow["MD5hash"]); + + for (int i = 0; i < 16; i++) + { + if (isReadWritePermission(i)) // Otherwise, skip negative tests due to BUG: https://github.com/Azure/azure-sdk-tools/issues/2956 + { + string destinationSasUri2 = CreateSasUriWithPermission(vhdName, i); + try + { + Console.WriteLine("uploads {0} to {1}", vhdName, destinationSasUri2); + vmPowershellCmdlets.RemoveAzureSubscriptions(); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(vhdLocalPath, destinationSasUri2); + + try + { + Console.WriteLine("uploads {0} to {1} second times", vhdName, destinationSasUri2); + vmPowershellCmdlets.AddAzureVhd(vhdLocalPath, destinationSasUri2); + pass = false; + } + catch (Exception e) + { + Console.WriteLine("Failed as expected while uploading {0} second time without overwrite: {1}", vhdLocalPath.Name, e.InnerException.Message); + + } + + // Verify the upload. + ReImportSubscription(); + AssertUploadContextAndContentMD5UsingSaveVhd(destinationSasUri2, vhdLocalPath, vhdUploadContext, md5hash); + Console.WriteLine("Test success with permission: {0}", i); + } + catch (Exception e) + { + continueIfNotReadWrite(e, ref i); + continue; + } + } + } + + pass = true; + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\thread_VHD.csv", "thread_VHD#csv", DataAccessMethod.Sequential)] + public void UploadDiskThreadNumberSasUri() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Choose the vhd file from local machine + var vhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var vhdLocalPath = new FileInfo(Directory.GetCurrentDirectory() + "\\" + vhdName); + Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", vhdLocalPath); + + // Get the pre-calculated MD5 hash of the fixed vhd that was converted from the original vhd. + string md5hash = Convert.ToString(TestContext.DataRow["MD5hash"]); + + int i = 0; + while (i < 16) + { + if (!isReadWritePermission(i)) + { + i++; // Skip negative tests due to BUG: https://github.com/Azure/azure-sdk-tools/issues/2956 + } + else + { + string destinationSasUri2 = CreateSasUriWithPermission(vhdName, i); + try + { + Console.WriteLine("uploads {0} to {1}", vhdName, destinationSasUri2); + vmPowershellCmdlets.RemoveAzureSubscriptions(); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(vhdLocalPath, destinationSasUri2, 16); + ReImportSubscription(); + Console.WriteLine("uploading completed: {0}", vhdName); + + // Verify the upload. + AssertUploadContextAndContentMD5UsingSaveVhd(destinationSasUri2, vhdLocalPath, vhdUploadContext, md5hash); + Console.WriteLine("Test success with permission: {0}", i); + i++; + } + catch (Exception e) + { + continueIfNotReadWrite(e, ref i); + continue; + } + } + } + + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + pass = true; + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\thread_VHD.csv", "thread_VHD#csv", DataAccessMethod.Sequential)] + public void UploadDiskThreadNumberOverwriteSasUri() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Choose the vhd file from local machine + var vhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var vhdLocalPath = new FileInfo(Directory.GetCurrentDirectory() + "\\" + vhdName); + Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", vhdLocalPath); + + // Get the pre-calculated MD5 hash of the fixed vhd that was converted from the original vhd. + string md5hash = Convert.ToString(TestContext.DataRow["MD5hash"]); + + + for (int i = 0; i < 16; i++) + { + if (!isReadWriteDeletePermission(i)) // Otherwise, skip negative tests due to BUG: https://github.com/Azure/azure-sdk-tools/issues/2956 + { + string destinationSasUri2 = CreateSasUriWithPermission(vhdName, i); + try + { + Console.WriteLine("uploads {0} to {1}", vhdName, destinationSasUri2); + vmPowershellCmdlets.RemoveAzureSubscriptions(); + vmPowershellCmdlets.AddAzureVhd(vhdLocalPath, destinationSasUri2); + Console.WriteLine("uploaded: {0}", vhdName); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(vhdLocalPath, destinationSasUri2, 16, true); + Console.WriteLine("uploading overwrite completed: {0}", vhdName); + + // Verify the upload. + ReImportSubscription(); + AssertUploadContextAndContentMD5UsingSaveVhd(destinationSasUri2, vhdLocalPath, vhdUploadContext, md5hash); + Console.WriteLine("Test success with permission: {0}", i); + } + catch (Exception e) + { + continueIfNotReadWriteDelete(e, ref i); + continue; + } + } + } + + pass = true; + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\patch_VHD.csv", "patch_VHD#csv", DataAccessMethod.Sequential)] + [Ignore] // BUG: https://github.com/Azure/azure-sdk-tools/issues/2956 + public void PatchFirstLevelDifferencingDiskSasUri() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Choose the base vhd file from local machine + var baseVhdName = Convert.ToString(TestContext.DataRow["baseImage"]); + var baseVhdLocalPath = new FileInfo(Directory.GetCurrentDirectory() + "\\" + baseVhdName); + Assert.IsTrue(File.Exists(baseVhdLocalPath.FullName), "VHD file not exist={0}", baseVhdLocalPath); + + // Get the pre-calculated MD5 hash of the fixed vhd that was converted from the original vhd. + string md5hash = Convert.ToString(TestContext.DataRow["MD5hash"]); + string md5hashBase = Convert.ToString(TestContext.DataRow["MD5hashBase"]); + + // Choose the child vhd file from the local machine + + var childVhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var childVhdLocalPath = new FileInfo(Directory.GetCurrentDirectory() + "\\" + childVhdName); + Assert.IsTrue(File.Exists(childVhdLocalPath.FullName), "VHD file not exist={0}", childVhdLocalPath); + + for (int i = 0; i < 16; i++) + { + string destinationSasUri2 = CreateSasUriWithPermission(baseVhdName, i); + string destinationSasUri3 = CreateSasUriWithPermission(childVhdName, i); + try + { + Console.WriteLine("uploads {0} to {1}", baseVhdName, destinationSasUri2); + vmPowershellCmdlets.RemoveAzureSubscriptions(); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(baseVhdLocalPath, destinationSasUri2, true); + Console.WriteLine("uploading completed: {0}", baseVhdName); + + // Verify the upload. + ReImportSubscription(); + AssertUploadContextAndContentMD5UsingSaveVhd(destinationSasUri2, baseVhdLocalPath, vhdUploadContext, md5hashBase, false); + + + Console.WriteLine("uploads {0} to {1}", childVhdName, destinationSasUri3); + vmPowershellCmdlets.RemoveAzureSubscriptions(); + var patchVhdUploadContext = vmPowershellCmdlets.AddAzureVhd(childVhdLocalPath, destinationSasUri3, destinationSasUri2); + Console.WriteLine("uploading completed: {0}", childVhdName); + + // Verify the upload. + ReImportSubscription(); + AssertUploadContextAndContentMD5UsingSaveVhd(destinationSasUri3, childVhdLocalPath, patchVhdUploadContext, md5hash); + Console.WriteLine("Test success with permission: {0}", i); + } + catch (Exception e) + { + Console.WriteLine("Error as expected. Permission: {0}", i); + Console.WriteLine("Error message: {0}", e.InnerException.Message); + continue; + } + } + + pass = true; + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + } + + /// + /// This test is ignored until patching scenario is available for SAS Uri. + /// + [TestMethod(), TestCategory(Category.Functional), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\patch_VHD.csv", "patch_VHD#csv", DataAccessMethod.Sequential)] + [Ignore] + public void PatchSasUriNormalBaseShouldFail() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Choose the base vhd file from local machine + var baseVhdName = Convert.ToString(TestContext.DataRow["baseImage"]); + var baseVhdLocalPath = new FileInfo(Directory.GetCurrentDirectory() + "\\" + baseVhdName); + Assert.IsTrue(File.Exists(baseVhdLocalPath.FullName), "VHD file not exist={0}", baseVhdLocalPath); + + // Set the destination + string vhdBlobName = string.Format("{0}/{1}.vhd", vhdContainerName, Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(baseVhdName))); + string vhdDestUri = blobUrlRoot + vhdBlobName; + + // Get the pre-calculated MD5 hash of the fixed vhd that was converted from the original vhd. + string md5hash = Convert.ToString(TestContext.DataRow["MD5hash"]); + string md5hashBase = Convert.ToString(TestContext.DataRow["MD5hashBase"]); + + + Console.WriteLine("uploads {0} to {1}", baseVhdName, vhdDestUri); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(baseVhdLocalPath, vhdDestUri, true); + Console.WriteLine("uploading the parent vhd completed: {0}", baseVhdName); + + // Choose the child vhd file from the local machine + var childVhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var childVhdLocalPath = new FileInfo(Directory.GetCurrentDirectory() + "\\" + childVhdName); + Assert.IsTrue(File.Exists(childVhdLocalPath.FullName), "VHD file not exist={0}", childVhdLocalPath); + + for (int i = 0; i < 16; i++) + { + string destinationSasUriParent = CreateSasUriWithPermission(baseVhdName, i); + string destinationSasUriChild = CreateSasUriWithPermission(childVhdName, i); + try + { + Console.WriteLine("uploads {0} to {1} with patching from {2}", childVhdName, destinationSasUriChild, vhdDestUri); + var patchVhdUploadContext = vmPowershellCmdlets.AddAzureVhd(childVhdLocalPath, destinationSasUriChild, vhdDestUri); + Console.WriteLine("uploading the child vhd completed: {0}", childVhdName); + + // Verify the upload. + AssertUploadContextAndContentMD5UsingSaveVhd(destinationSasUriChild, childVhdLocalPath, patchVhdUploadContext, md5hash); + Console.WriteLine("Test success with permission: {0}", i); + } + catch (Exception e) + { + Console.WriteLine("Error as expected. Permission: {0}", i); + Console.WriteLine("Error message: {0}", e.InnerException.Message); + continue; + } + } + + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\patch_VHD.csv", "patch_VHD#csv", DataAccessMethod.Sequential)] + public void PatchNormalSasUriBase() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Choose the base vhd file from local machine + var baseVhdName = Convert.ToString(TestContext.DataRow["baseImage"]); + var baseVhdLocalPath = new FileInfo(Directory.GetCurrentDirectory() + "\\" + baseVhdName); + Assert.IsTrue(File.Exists(baseVhdLocalPath.FullName), "VHD file not exist={0}", baseVhdLocalPath); + + // Get the pre-calculated MD5 hash of the fixed vhd that was converted from the original vhd. + string md5hash = Convert.ToString(TestContext.DataRow["MD5hash"]); + string md5hashBase = Convert.ToString(TestContext.DataRow["MD5hashBase"]); + + + // Choose the child vhd file from the local machine + var childVhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var childVhdLocalPath = new FileInfo(Directory.GetCurrentDirectory() + "\\" + childVhdName); + Assert.IsTrue(File.Exists(childVhdLocalPath.FullName), "VHD file not exist={0}", childVhdLocalPath); + + int i = 0; + while (i < 16) + { + if (!isReadWritePermission(i)) + { + i++; // Skip negative tests due to BUG: https://github.com/Azure/azure-sdk-tools/issues/2956 + } + else + { + string destinationSasUriParent = CreateSasUriWithPermission(baseVhdName, i); // the destination of the parent vhd is a Sas Uri + + // Set the destination of child vhd + string vhdBlobName = string.Format("{0}/{1}.vhd", vhdContainerName, Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(childVhdName))); + string vhdDestUri = blobUrlRoot + vhdBlobName; + + try + { + // Upload the parent vhd using Sas Uri + Console.WriteLine("uploads {0} to {1}", baseVhdName, destinationSasUriParent); + vmPowershellCmdlets.RemoveAzureSubscriptions(); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(baseVhdLocalPath, destinationSasUriParent, true); + Console.WriteLine("uploading completed: {0}", baseVhdName); + + // Verify the upload. + ReImportSubscription(); + AssertUploadContextAndContentMD5UsingSaveVhd(destinationSasUriParent, baseVhdLocalPath, vhdUploadContext, md5hashBase, false); + + Console.WriteLine("uploads {0} to {1} with patching from {2}", childVhdName, vhdDestUri, destinationSasUriParent); + var patchVhdUploadContext = vmPowershellCmdlets.AddAzureVhd(childVhdLocalPath, vhdDestUri, destinationSasUriParent); + Console.WriteLine("uploading the child vhd completed: {0}", childVhdName); + + // Verify the upload. + AssertUploadContextAndContentMD5UsingSaveVhd(vhdDestUri, childVhdLocalPath, patchVhdUploadContext, md5hash); + Console.WriteLine("Test success with permission: {0}", i); + i++; + } + catch (Exception e) + { + continueIfNotReadWrite(e, ref i); + continue; + } + } + } + + pass = true; + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + } + + [TestCleanup] + public virtual void CleanUp() + { + Console.WriteLine("Test {0}", pass ? "passed" : "failed"); + ReImportSubscription(); + } + + private bool checkPermission(int i, int j) + { + return (i & j) == j; + } + + private bool isReadWritePermission(int i) + { + return checkPermission(i,(int)(SharedAccessBlobPermissions.Read ^ SharedAccessBlobPermissions.Write)); + } + + private bool isReadWriteDeletePermission(int i) + { + return checkPermission(i, + (int)(SharedAccessBlobPermissions.Read ^ SharedAccessBlobPermissions.Write ^ SharedAccessBlobPermissions.Delete)); + } + private void continueIfNotReadWrite(Exception e, ref int i) + { + if (e.ToString().Contains("already running")) + { + Console.WriteLine(e.ToString()); + } + else if (!isReadWritePermission(i)) + { + Console.WriteLine("Error as expected. Permission: {0}", i); + Console.WriteLine("Error message: {0}", e.InnerException.Message); + i++; + } + else + { + Assert.Fail("Test failed Permission: {0} \n {1}", i, e.ToString()); + } + } + + private void continueIfNotReadWriteDelete(Exception e, ref int i) + { + if (e.ToString().Contains("already running")) + { + Console.WriteLine(e.ToString()); + } + else if (!isReadWriteDeletePermission(i)) + { + Console.WriteLine("Error as expected. Permission: {0}", i); + Console.WriteLine("Error message: {0}", e.InnerException.Message); + i++; + } + else + { + Assert.Fail("Test failed Permission: {0} \n {1}", i, e.ToString()); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/AddAzureVhdTest.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/AddAzureVhdTest.cs new file mode 100644 index 000000000000..e7fdccb07a9f --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/AddAzureVhdTest.cs @@ -0,0 +1,430 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Reflection; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests +{ + [TestClass] + public class AddAzureVhdTest : AzureVhdTest + { + + [TestInitialize] + public void Initialize() + { + if (defaultAzureSubscription.Equals(null)) + { + Assert.Inconclusive("No Subscription is selected!"); + } + + pass = true; + testStartTime = DateTime.Now; + storageAccountKey = vmPowershellCmdlets.GetAzureStorageAccountKey(defaultAzureSubscription.CurrentStorageAccountName); + } + + /// + /// UploadDisk: + /// + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\upload_VHD.csv", "upload_VHD#csv", DataAccessMethod.Sequential)] + public void UploadDisk() + { + + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Choose the vhd file from local machine + string vhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + FileInfo vhdLocalPath = new FileInfo(Directory.GetCurrentDirectory() + "\\" + vhdName); + Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", vhdLocalPath); + + // Get the pre-calculated MD5 hash of the fixed vhd that was converted from the original vhd. + string md5hash = Convert.ToString(TestContext.DataRow["MD5hash"]); + + + // Set the destination + string vhdBlobName = string.Format("{0}/{1}.vhd", vhdContainerName, Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName))); + string vhdDestUri = blobUrlRoot + vhdBlobName; + + // Start uploading... + Console.WriteLine("uploads {0} to {1}", vhdName, vhdBlobName); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(vhdLocalPath, vhdDestUri); + Console.WriteLine("uploading completed: {0}", vhdName); + + // Verify the upload. + AssertUploadContextAndContentMD5UsingSaveVhd(vhdDestUri, vhdLocalPath, vhdUploadContext, md5hash); + + pass = true; + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\overwrite_VHD.csv", "overwrite_VHD#csv", DataAccessMethod.Sequential)] + public void UploadDiskOverwrite() + { + testName = MethodBase.GetCurrentMethod().Name; + StartTest(testName, testStartTime); + + + // Choose the vhd file from local machine + var vhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var vhdLocalPath = new FileInfo(Directory.GetCurrentDirectory() + "\\" + vhdName); + Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", vhdLocalPath); + + // Get the pre-calculated MD5 hash of the fixed vhd that was converted from the original vhd. + string md5hash = Convert.ToString(TestContext.DataRow["MD5hash"]); + + + // Set the destination + string vhdBlobName = string.Format("{0}/{1}.vhd", vhdContainerName, Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName))); + string vhdDestUri = blobUrlRoot + vhdBlobName; + + // Start uploading... + Console.WriteLine("uploads {0} to {1}", vhdName, vhdBlobName); + vmPowershellCmdlets.AddAzureVhd(vhdLocalPath, vhdDestUri); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(vhdLocalPath, vhdDestUri, true); + Console.WriteLine("uploading completed: {0}", vhdName); + + // Verify the upload. + AssertUploadContextAndContentMD5UsingSaveVhd(vhdDestUri, vhdLocalPath, vhdUploadContext, md5hash); + + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime-testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime-testStartTime).TotalSeconds) }); + + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\overwrite_VHD.csv", "overwrite_VHD#csv", DataAccessMethod.Sequential)] + [Ignore] + public void UploadDiskResume() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + + // Choose the vhd file from local machine + var vhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var vhdLocalPath = new FileInfo(Directory.GetCurrentDirectory() + "\\" + vhdName); + Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", vhdLocalPath); + + // Get the pre-calculated MD5 hash of the fixed vhd that was converted from the original vhd. + string md5hash = Convert.ToString(TestContext.DataRow["MD5hash"]); + + + // Set the destination + string vhdBlobName = string.Format("{0}/{1}.vhd", vhdContainerName, Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName))); + string vhdDestUri = blobUrlRoot + vhdBlobName; + + // Start uploading... + Console.WriteLine("uploads {0} to {1}", vhdName, vhdBlobName); + string result = vmPowershellCmdlets.AddAzureVhdStop(vhdLocalPath, vhdDestUri, 500); + + if (result.ToLowerInvariant() == "stopped") + { + Console.WriteLine("successfully stopped"); + + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(vhdLocalPath, vhdDestUri); + Console.WriteLine("uploading completed: {0}", vhdName); + + // Verify the upload. + AssertUploadContextAndContentMD5UsingSaveVhd(vhdDestUri, vhdLocalPath, vhdUploadContext, md5hash); + } + else + { + Console.WriteLine("didn't stop!"); + } + + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\overwrite_VHD.csv", "overwrite_VHD#csv", DataAccessMethod.Sequential)] + public void UploadDiskOverwriteNonExist() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + + // Choose the vhd file from local machine + var vhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var vhdLocalPath = new FileInfo(Directory.GetCurrentDirectory() + "\\" + vhdName); + Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", vhdLocalPath); + + // Get the pre-calculated MD5 hash of the fixed vhd that was converted from the original vhd. + string md5hash = Convert.ToString(TestContext.DataRow["MD5hash"]); + + + // Set the destination + string vhdBlobName = string.Format("{0}/{1}.vhd", vhdContainerName, Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName))); + string vhdDestUri = blobUrlRoot + vhdBlobName; + + // Start uploading... + Console.WriteLine("uploads {0} to {1}", vhdName, vhdBlobName); + //vmPowershellCmdlets.AddAzureVhd(new AddAzureVhdCmdletInfo(vhdDestUri, vhdLocalPath.FullName)); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(vhdLocalPath, vhdDestUri, true); + Console.WriteLine("uploading completed: {0}", vhdName); + + // Verify the upload. + AssertUploadContextAndContentMD5UsingSaveVhd(vhdDestUri, vhdLocalPath, vhdUploadContext, md5hash); + + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\overwrite_VHD.csv", "overwrite_VHD#csv", DataAccessMethod.Sequential)] + public void UploadDiskSecondWithoutOverwrite() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + + // Choose the vhd file from local machine + var vhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var vhdLocalPath = new FileInfo(Directory.GetCurrentDirectory() + "\\" + vhdName); + Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", vhdLocalPath); + + // Get the pre-calculated MD5 hash of the fixed vhd that was converted from the original vhd. + string md5hash = Convert.ToString(TestContext.DataRow["MD5hash"]); + + + // Set the destination + string vhdBlobName = string.Format("{0}/{1}.vhd", vhdContainerName, Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName))); + string vhdDestUri = blobUrlRoot + vhdBlobName; + + // Start uploading... + Console.WriteLine("uploads {0} to {1}", vhdName, vhdBlobName); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(vhdLocalPath, vhdDestUri); + + try + { + Console.WriteLine("uploads {0} to {1} second times", vhdName, vhdBlobName); + vmPowershellCmdlets.AddAzureVhd(vhdLocalPath, vhdDestUri); + pass = false; + } + catch (Exception) + { + Console.WriteLine("Failed as expected while uploading {0} second time without overwrite", vhdLocalPath.Name); + } + + // Verify the upload. + AssertUploadContextAndContentMD5UsingSaveVhd(vhdDestUri, vhdLocalPath, vhdUploadContext, md5hash); + + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\thread_VHD.csv", "thread_VHD#csv", DataAccessMethod.Sequential)] + public void UploadDiskThreadNumber() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Choose the vhd file from local machine + var vhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var vhdLocalPath = new FileInfo(Directory.GetCurrentDirectory() + "\\" + vhdName); + Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", vhdLocalPath); + + // Get the pre-calculated MD5 hash of the fixed vhd that was converted from the original vhd. + string md5hash = Convert.ToString(TestContext.DataRow["MD5hash"]); + + + // Set the destination + string vhdBlobName = string.Format("{0}/{1}.vhd", vhdContainerName, Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName))); + string vhdDestUri = blobUrlRoot + vhdBlobName; + + // Start uploading... + Console.WriteLine("uploads {0} to {1}", vhdName, vhdBlobName); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(vhdLocalPath, vhdDestUri, 16); + Console.WriteLine("uploading completed: {0}", vhdName); + + // Verify the upload. + AssertUploadContextAndContentMD5UsingSaveVhd(vhdDestUri, vhdLocalPath, vhdUploadContext, md5hash); + + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\thread_VHD.csv", "thread_VHD#csv", DataAccessMethod.Sequential)] + public void UploadDiskThreadNumberOverwrite() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Choose the vhd file from local machine + var vhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var vhdLocalPath = new FileInfo(Directory.GetCurrentDirectory() + "\\" + vhdName); + Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", vhdLocalPath); + + // Get the pre-calculated MD5 hash of the fixed vhd that was converted from the original vhd. + string md5hash = Convert.ToString(TestContext.DataRow["MD5hash"]); + + + // Set the destination + string vhdBlobName = string.Format("{0}/{1}.vhd", vhdContainerName, Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName))); + string vhdDestUri = blobUrlRoot + vhdBlobName; + + // Start uploading... + Console.WriteLine("uploads {0} to {1}", vhdName, vhdBlobName); + vmPowershellCmdlets.AddAzureVhd(vhdLocalPath, vhdDestUri); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(vhdLocalPath, vhdDestUri, 16, true); + Console.WriteLine("uploading completed: {0}", vhdName); + + // Verify the upload. + AssertUploadContextAndContentMD5UsingSaveVhd(vhdDestUri, vhdLocalPath, vhdUploadContext, md5hash); + + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\patch_VHD.csv", "patch_VHD#csv", DataAccessMethod.Sequential)] + public void PatchFirstLevelDifferencingDisk() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Choose the vhd file from local machine + var vhdName = Convert.ToString(TestContext.DataRow["baseImage"]); + var vhdLocalPath = new FileInfo(Directory.GetCurrentDirectory() + "\\" + vhdName); + Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", vhdLocalPath); + + // Get the pre-calculated MD5 hash of the fixed vhd that was converted from the original vhd. + string md5hash = Convert.ToString(TestContext.DataRow["MD5hash"]); + string md5hashBase = Convert.ToString(TestContext.DataRow["MD5hashBase"]); + + + // Set the destination + string vhdBlobName = string.Format("{0}/{1}.vhd", vhdContainerName, Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName))); + string vhdDestUri = blobUrlRoot + vhdBlobName; + + // Start uploading... + Console.WriteLine("uploads {0} to {1}", vhdName, vhdBlobName); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(vhdLocalPath, vhdDestUri,true); + Console.WriteLine("uploading completed: {0}", vhdName); + + // Verify the upload. + AssertUploadContextAndContentMD5UsingSaveVhd(vhdDestUri, vhdLocalPath, vhdUploadContext, md5hashBase, false); + + + // Choose the vhd file from local machine + var childVhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var childVhdLocalPath = new FileInfo(Directory.GetCurrentDirectory() + "\\" + childVhdName); + Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", childVhdLocalPath); + + // Set the destination + string childVhdBlobName = string.Format("{0}/{1}.vhd", vhdContainerName, Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(childVhdName))); + string childVhdDestUri = blobUrlRoot + childVhdBlobName; + + // Start uploading the child vhd... + Console.WriteLine("uploads {0} to {1}", childVhdName, childVhdBlobName); + var patchVhdUploadContext = vmPowershellCmdlets.AddAzureVhd(childVhdLocalPath, childVhdDestUri, vhdDestUri); + Console.WriteLine("uploading completed: {0}", childVhdName); + + // Verify the upload + AssertUploadContextAndContentMD5UsingSaveVhd(childVhdDestUri, childVhdLocalPath, patchVhdUploadContext, md5hash); + + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + } + + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\thread_VHD.csv", "thread_VHD#csv", DataAccessMethod.Sequential)] + public void WrongProtocolShouldFail() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Choose the vhd file from local machine + var vhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var vhdLocalPath = new FileInfo(Directory.GetCurrentDirectory() + "\\" + vhdName); + Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", vhdLocalPath); + + // Set the destination + string vhdBlobName = string.Format("{0}/{1}.vhd", vhdContainerName, Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName))); + string badUrlRoot = string.Format(@"badprotocolhttp://{0}.blob.core.windows.net/", defaultAzureSubscription.CurrentStorageAccountName); + string vhdDestUri = badUrlRoot + vhdBlobName; + + DateTime startTime = DateTime.Now; + try + { + // Start uploading... + Console.WriteLine("uploads {0} to {1}", vhdName, vhdBlobName); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(vhdLocalPath, vhdDestUri); + Console.WriteLine("uploading completed: {0}", vhdName); + pass = false; + + } + catch (Exception e) + { + TimeSpan duration = DateTime.Now - startTime; + Console.WriteLine("error message: {0}", e); + Console.WriteLine("{0} test passed after {1} seconds", testName, duration.Seconds); + + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + } + } + + [TestCleanup] + public virtual void CleanUp() + { + Console.WriteLine("Test {0}", pass ? "passed" : "failed"); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/AzureServiceADDomainJoinExtensionTests.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/AzureServiceADDomainJoinExtensionTests.cs new file mode 100644 index 000000000000..854a41bda760 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/AzureServiceADDomainJoinExtensionTests.cs @@ -0,0 +1,1005 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Management.Automation; +using System.Reflection; +using System.Security.Cryptography.X509Certificates; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests +{ + [TestClass] + public class AzureServiceADDomainJoinExtensionTests:ServiceManagementTest + { + private string _serviceName; + private string _deploymentName; + private string _deploymentLabel; + private string _packageName; + private string _configName; + private string _rdpCertName; + private X509Certificate2 _cert; + + private FileInfo _packagePath1; + private FileInfo _configPath1; + private FileInfo _rdpCertPath; + private PSCredential _cred; + + const string DomainName = "djtest.com"; + const string ThumbprintAlgorithm = "sha1"; + + const string DeploymentNamePrefix = "psdeployment"; + const string DeploymentLabelPrefix = "psdeploymentlabel"; + private const string DomainUserName = "pstestuser@djtest.com"; + private const string AffinityGroupName = "WestUsAffinityGroup"; + + private const string WorkgroupName = "WORKGROUP1"; + + // Choose the package and config files from local machine + readonly string[] _role = { "WebRole1" }; + + [TestInitialize] + public void Initialize() + { + _serviceName = Utilities.GetUniqueShortName(serviceNamePrefix); + _deploymentName = Utilities.GetUniqueShortName(DeploymentNamePrefix); + _deploymentLabel = Utilities.GetUniqueShortName(DeploymentLabelPrefix); + + pass = false; + + // Choose the package and config files from local machine + _packageName = Convert.ToString(TestContext.DataRow["packageName"]); + _configName = Convert.ToString(TestContext.DataRow["configName"]); + _rdpCertName = Convert.ToString(TestContext.DataRow["rdpCertName"]); + _packagePath1 = new FileInfo(Directory.GetCurrentDirectory() + "\\" + _packageName); + _configPath1 = new FileInfo(Directory.GetCurrentDirectory() + "\\" + _configName); + _rdpCertPath = new FileInfo(Directory.GetCurrentDirectory() + "\\" + _rdpCertName); + _cert = new X509Certificate2(_rdpCertPath.FullName, password); + _cred = new PSCredential(DomainUserName, Utilities.convertToSecureString(password)); + + CheckIfPackageAndConfigFilesExists(); + testStartTime = DateTime.Now; + } + + #region join domain cmdlet tests + [TestMethod(), TestCategory("ADDomain"), TestProperty("Feature", "PAAS"), Priority(0), Owner("hylee"), Description("Test the cmdlet ((Get,Set,Remove)-AzureServiceADDomainExtension)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\packageADDomain.csv", "packageADDomain#csv", DataAccessMethod.Sequential)] + public void SetAzureServiceDomainJoinExtensionwithDefaultParamterSetTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + Console.WriteLine(_cred.UserName); + try + { + //Create a new Azure Iaas VM and set Domain Join extension, get domain join extension and then remove domain join extension + NewAzureDeployment(); + + //Join Domain with default parameter set. + Console.WriteLine("Joining domain with default parameter set"); + vmPowershellCmdlets.SetAzureServiceDomainJoinExtension( + domainName: DomainName, + credential: _cred, + joinOption: 35, + restart:true, + serviceName:_serviceName, + slot: DeploymentSlotType.Production); + Console.WriteLine("Servie {0} added to domain {1} successfully.", _serviceName, DomainName); + + GetAzureServiceDomainJoinExtension(); + + RemoveAzureServiceDomainJoinExtesnion(); + + vmPowershellCmdlets.RemoveAzureDeployment(_serviceName, DeploymentSlotType.Production, true); + pass = true; + + } + catch (Exception e) + { + Console.WriteLine("Exception occurred: {0}", e); + throw; + } + } + + [TestMethod(), TestCategory("ADDomain"), TestProperty("Feature", "PAAS"), Priority(0), Owner("hylee"), Description("Test the cmdlet ((Get,Set,Remove)-AzureServiceADDomainExtension)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\packageADDomain.csv", "packageADDomain#csv", DataAccessMethod.Sequential)] + public void SetAzureServiceDomainJoinExtensionwithDomainJoinParmaterSetAndJoinOptionsTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + //Create a new Azure Iaas VM and set Domain Join extension, get domain join extension and then remove domain join extension + NewAzureDeployment(); + + //Join Domian with DomainJoinParmaterSet with JoinOptions.JoinDomain + Console.WriteLine("Joining domain with domain join parameter set with JoinOptions.JoinDomain"); + + vmPowershellCmdlets.SetAzureServiceDomainJoinExtension( + domainName: DomainName, + credential: _cred, + options: JoinOptions.JoinDomain, + restart: true, + serviceName: _serviceName, + slot: DeploymentSlotType.Production, + role: _role); + + Console.WriteLine("Servie {0} added to domain {1} successfully using join option.", _serviceName, DomainName); + + GetAzureServiceDomainJoinExtension(); + + RemoveAzureServiceDomainJoinExtesnion(_role); + + vmPowershellCmdlets.RemoveAzureDeployment(_serviceName, DeploymentSlotType.Production, true); + pass = true; + } + catch (Exception e) + { + Console.WriteLine("Exception occurred: {0}", e); + throw; + } + } + + [TestMethod(), TestCategory("ADDomain"), TestProperty("Feature", "PAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Get,Set,Remove)-AzureServiceADDomainExtension)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\packageADDomain.csv", "packageADDomain#csv", DataAccessMethod.Sequential)] + public void SetAzureServiceDomainJoinExtensionwithDomainParmaterSetTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + NewAzureDeployment(); + + //Join Domian with DomainParmaterSet + Console.WriteLine("Joining domain with domian parameter set"); + vmPowershellCmdlets.SetAzureServiceDomainJoinExtension( + domainName: DomainName, + credential: _cred, + options: null, + restart: true, + serviceName: _serviceName, + slot: DeploymentSlotType.Production, + role: _role, + x509Certificate: _cert, + thumbprintAlgorithm: ThumbprintAlgorithm); + Console.WriteLine("Servie {0} added to domain {1} successfully.", _serviceName, DomainName); + GetAzureServiceDomainJoinExtension(); + + RemoveAzureServiceDomainJoinExtesnion(_role); + + vmPowershellCmdlets.RemoveAzureDeployment(_serviceName, DeploymentSlotType.Production, true); + pass = true; + } + catch (Exception e) + { + Console.WriteLine("Exception occurred: {0}", e); + throw; + } + } + + [TestMethod(), TestCategory("ADDomain"), TestProperty("Feature", "PAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Get,Set,Remove)-AzureServiceADDomainExtension)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\packageADDomain.csv", "packageADDomain#csv", DataAccessMethod.Sequential)] + public void SetAzureServiceDomainJoinExtensionwithDomainJoinParmaterSetAndCertificateTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + NewAzureDeployment(); + + //Join Domian with DomainJoinParmaterSet and certificate + vmPowershellCmdlets.SetAzureServiceDomainJoinExtension( + domainName: DomainName, + credential:_cred, + options:JoinOptions.JoinDomain, + restart: true, + serviceName:_serviceName, + slot: DeploymentSlotType.Production, + role:_role, + x509Certificate:_cert, + thumbprintAlgorithm: ThumbprintAlgorithm); + + Console.WriteLine("Servie {0} added to domain {1} successfully.", _serviceName, DomainName); + GetAzureServiceDomainJoinExtension(); + + RemoveAzureServiceDomainJoinExtesnion(_role); + + vmPowershellCmdlets.RemoveAzureDeployment(_serviceName, DeploymentSlotType.Production, true); + pass = true; + } + catch (Exception e) + { + Console.WriteLine("Exception occurred: {0}", e); + throw; + } + } + + [TestMethod(), TestCategory("ADDomain"), TestProperty("Feature", "PAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Get,Set,Remove)-AzureServiceADDomainExtension)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\packageADDomain.csv", "packageADDomain#csv", DataAccessMethod.Sequential)] + public void SetAzureServiceDomainJoinExtensionwithDomainThumbprintParameterSetTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + //Create a new Azure Iaas VM and set Domain Join extension, get domain join extension and then remove domain join extension + NewAzureDeployment(); + + //Join domain with DomainThumbprintParameterSet + vmPowershellCmdlets.SetAzureServiceDomainJoinExtension( + domainName: DomainName, + credential: _cred, + options: null, + restart: true, + serviceName: _serviceName, + slot: DeploymentSlotType.Production, + role: _role, + certificateThumbprint: _cert.Thumbprint, + thumbprintAlgorithm: ThumbprintAlgorithm); + + Console.WriteLine("Servie {0} added to domain {1} successfully.", _serviceName, DomainName); + GetAzureServiceDomainJoinExtension(); + + RemoveAzureServiceDomainJoinExtesnion(_role); + + vmPowershellCmdlets.RemoveAzureDeployment(_serviceName, DeploymentSlotType.Production, true); + pass = true; + } + catch (Exception e) + { + Console.WriteLine("Exception occurred: {0}", e); + throw; + } + } + + [TestMethod(), TestCategory("ADDomain"), TestProperty("Feature", "PAAS"), Priority(0), Owner("hylee"), Description("Test the cmdlet ((Get,Set,Remove)-AzureServiceADDomainExtension)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\packageADDomain.csv", "packageADDomain#csv", DataAccessMethod.Sequential)] + public void SetAzureServiceDomainJoinExtensionwithDefaultParameterSet35Test() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + //Create a new Azure Iaas VM and set Domain Join extension, get domain join extension and then remove domain join extension + NewAzureDeployment(); + + //Join domain with DomainJoinThumbprintParameterSet + vmPowershellCmdlets.SetAzureServiceDomainJoinExtension( + domainName: DomainName, + credential: _cred, + joinOption: 35, + restart: true, + serviceName: _serviceName, + slot: DeploymentSlotType.Production, + role: _role); + Console.WriteLine("Servie {0} added to domain {1} successfully", _serviceName, DomainName); + + GetAzureServiceDomainJoinExtension(); + + RemoveAzureServiceDomainJoinExtesnion(_role); + + vmPowershellCmdlets.RemoveAzureDeployment(_serviceName, DeploymentSlotType.Production, true); + pass = true; + } + catch (Exception e) + { + Console.WriteLine("Exception occurred: {0}", e); + throw; + } + } + + [TestMethod(), TestCategory("ADDomain"), TestProperty("Feature", "PAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Get,Set,Remove)-AzureServiceADDomainExtension)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\packageADDomain.csv", "packageADDomain#csv", DataAccessMethod.Sequential)] + public void SetAzureServiceDomainJoinExtensionwithDomainJoinThumbprintParameterSetAndJoinOption35Test() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + //Create a new Azure Iaas VM and set Domain Join extension, get domain join extension and then remove domain join extension + NewAzureDeployment(); + + //Join domain with DomainJoinThumbprintParameterSet and join oprtion 35 + vmPowershellCmdlets.SetAzureServiceDomainJoinExtension( + domainName: DomainName, + credential: _cred, + joinOption: 35, + restart: true, + serviceName: _serviceName, + slot: DeploymentSlotType.Production, + role: _role, + certificateThumbprint: _cert.Thumbprint, + thumbprintAlgorithm: ThumbprintAlgorithm); + Console.WriteLine("Servie {0} added to domain {1} successfully using join option 35", _serviceName, DomainName); + + GetAzureServiceDomainJoinExtension(); + + RemoveAzureServiceDomainJoinExtesnion(_role); + + vmPowershellCmdlets.RemoveAzureDeployment(_serviceName, DeploymentSlotType.Production, true); + pass = true; + } + catch (Exception e) + { + Console.WriteLine("Exception occurred: {0}", e); + throw; + } + } + + [TestMethod(), TestCategory("ADDomain"), TestProperty("Feature", "PAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((New)-AzureServiceADDomainExtensionConfig)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\packageADDomain.csv", "packageADDomain#csv", DataAccessMethod.Sequential)] + public void NewAzureServiceDomainJoinExtensionConfigWithDefaultParmateSetTests() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + //Prepare a new domain join config with default parameter set + ExtensionConfigurationInput domainJoinExtensionConfig = vmPowershellCmdlets.NewAzureServiceDomainJoinExtensionConfig( + domainName: DomainName, + x509Certificate: null, + options: null, + oUPath: null, + unjoinDomainCredential: null, + role: _role, + thumbprintAlgorithm: null, + restart: true, + credential: _cred); + + //Create a new Azure Iaas VM and set Domain Join extension, get domain join extension and then remove domain join extension + NewAzureDeployment(domainJoinExtensionConfig); + + GetAzureServiceDomainJoinExtension(); + + RemoveAzureServiceDomainJoinExtesnion(_role); + + vmPowershellCmdlets.RemoveAzureDeployment(_serviceName, DeploymentSlotType.Production, true); + //TO DO: add test cases to test cmdlet with UnjoinCrednetial patameter. + pass = true; + } + catch (Exception e) + { + Console.WriteLine("Exception occurred: {0}", e); + throw; + } + } + + [TestMethod(), TestCategory("ADDomain"), TestProperty("Feature", "PAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((New)-AzureServiceADDomainExtensionConfig)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\packageADDomain.csv", "packageADDomain#csv", DataAccessMethod.Sequential)] + public void NewDomainJoinExtConfigWithDefaultParmateSetAndJoinOptionsTests() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + //Prepare a new domain join config with default parameter set and one of the join options + ExtensionConfigurationInput domainJoinExtensionConfig = vmPowershellCmdlets.NewAzureServiceDomainJoinExtensionConfig( + domainName: DomainName, + x509Certificate: null, + options: JoinOptions.JoinDomain, + oUPath: null, + unjoinDomainCredential: null, + role: null, + thumbprintAlgorithm: null, + restart: true, + credential: _cred); + + //Create a new Azure Iaas VM and set Domain Join extension, get domain join extension and then remove domain join extension + NewAzureDeployment(domainJoinExtensionConfig); + GetAzureServiceDomainJoinExtension(); + RemoveAzureServiceDomainJoinExtesnion(); + vmPowershellCmdlets.RemoveAzureDeployment(_serviceName, DeploymentSlotType.Production, true); + + //TO DO: add test cases to test cmdlet with UnjoinCrednetial patameter. + pass = true; + } + catch (Exception e) + { + Console.WriteLine("Exception occurred: {0}", e); + throw; + } + } + + [TestMethod(), TestCategory("ADDomain"), TestProperty("Feature", "PAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((New)-AzureServiceADDomainExtensionConfig)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\packageADDomain.csv", "packageADDomain#csv", DataAccessMethod.Sequential)] + public void NewDomainJoinExtConfigWithDomainParmateSetTests() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + //Prepare a new domain join config with DomainParameterSet (using only X509certicate2) + ExtensionConfigurationInput domainJoinExtensionConfig = vmPowershellCmdlets.NewAzureServiceDomainJoinExtensionConfig( + domainName: DomainName, + x509Certificate: _cert, + //options: null, + //oUPath: null, + unjoinDomainCredential: null, + role: null, + thumbprintAlgorithm: null, + restart: true, + credential:_cred); + + NewAzureDeployment(domainJoinExtensionConfig); + + GetAzureServiceDomainJoinExtension(); + + RemoveAzureServiceDomainJoinExtesnion(); + + vmPowershellCmdlets.RemoveAzureDeployment(_serviceName, DeploymentSlotType.Production, true); + + //TO DO: add test cases to test cmdlet with UnjoinCrednetial patameter. + pass = true; + } + catch (Exception e) + { + Console.WriteLine("Exception occurred: {0}", e); + throw; + } + } + + [TestMethod(), TestCategory("ADDomain"), TestProperty("Feature", "PAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((New)-AzureServiceADDomainExtensionConfig)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\packageADDomain.csv", "packageADDomain#csv", DataAccessMethod.Sequential)] + public void NewDomainJoinExtConfigWithDomainParameterSetAndCertTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + ExtensionConfigurationInput domainJoinExtensionConfig = vmPowershellCmdlets.NewAzureServiceDomainJoinExtensionConfig( + domainName: DomainName, + x509Certificate: _cert, + options: JoinOptions.JoinDomain, + oUPath: null, + unjoinDomainCredential: null, + role: null, + thumbprintAlgorithm: null, + restart: true, + credential: _cred); + + NewAzureDeployment(domainJoinExtensionConfig); + + GetAzureServiceDomainJoinExtension(); + + RemoveAzureServiceDomainJoinExtesnion(); + + vmPowershellCmdlets.RemoveAzureDeployment(_serviceName, DeploymentSlotType.Production, true); + pass = true; + } + catch (Exception e) + { + Console.WriteLine("Exception occurred: {0}", e); + throw; + } + } + + [TestMethod(), TestCategory("ADDomain"), TestProperty("Feature", "PAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((New)-AzureServiceADDomainExtensionConfig)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\packageADDomain.csv", "packageADDomain#csv", DataAccessMethod.Sequential)] + public void NewDomainJoinExtConfigWithDomianThumbprintParameterSetTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + //Prepare a new domain join config with DomianThumbprintParameterSet + ExtensionConfigurationInput domainJoinExtensionConfig = vmPowershellCmdlets.NewAzureServiceDomainJoinExtensionConfig( + domainName: DomainName, + certificateThumbprint: _cert.Thumbprint, + joinOption: null, + oUPath: null, + unjoinDomainCredential: null, + role:_role, + thumbprintAlgorithm: ThumbprintAlgorithm, + restart: true, + credential: _cred); + + NewAzureDeployment(domainJoinExtensionConfig); + + GetAzureServiceDomainJoinExtension(); + + RemoveAzureServiceDomainJoinExtesnion(_role); + + vmPowershellCmdlets.RemoveAzureDeployment(_serviceName, DeploymentSlotType.Production, true); + //TO DO: add test cases to test cmdlet with UnjoinCrednetial patameter. + pass = true; + } + catch (Exception e) + { + Console.WriteLine("Exception occurred: {0}", e); + throw; + } + } + + [TestMethod(), TestCategory("ADDomain"), TestProperty("Feature", "PAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((New)-AzureServiceADDomainExtensionConfig)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\packageADDomain.csv", "packageADDomain#csv", DataAccessMethod.Sequential)] + public void NewDomainJoinExtConfigWithDefaultParmateSetAndJoinOption35Test() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + //Prepare a new domain join config with default parameter set and joinOption 35 + ExtensionConfigurationInput domainJoinExtensionConfig = vmPowershellCmdlets.NewAzureServiceDomainJoinExtensionConfig( + domainName: DomainName, + certificateThumbprint: null, + joinOption: 35, + oUPath: null, + unjoinDomainCredential: null, + role:_role, + thumbprintAlgorithm: null, + restart: true, + credential:_cred); + NewAzureDeployment(domainJoinExtensionConfig); + + GetAzureServiceDomainJoinExtension(); + + RemoveAzureServiceDomainJoinExtesnion(_role); + + vmPowershellCmdlets.RemoveAzureDeployment(_serviceName, DeploymentSlotType.Production, true); + + //TO DO: add test cases to test cmdlet with UnjoinCrednetial patameter. + pass = true; + } + catch (Exception e) + { + Console.WriteLine("Exception occurred: {0}", e); + throw; + } + } + + [TestMethod(), TestCategory("ADDomain"), TestProperty("Feature", "PAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((New)-AzureServiceADDomainExtensionConfig)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\packageADDomain.csv", "packageADDomain#csv", DataAccessMethod.Sequential)] + public void NewDomainJoinExtConfigWithDomianJoinThumbprintParameterSetTests() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + ExtensionConfigurationInput domainJoinExtensionConfig = vmPowershellCmdlets.NewAzureServiceDomainJoinExtensionConfig( + domainName: DomainName, + certificateThumbprint: _cert.Thumbprint, + oUPath: null, + unjoinDomainCredential: null, + role: _role, + thumbprintAlgorithm: ThumbprintAlgorithm, + joinOption: 35, + restart: true, + credential: _cred); + + NewAzureDeployment(domainJoinExtensionConfig); + + GetAzureServiceDomainJoinExtension(); + + RemoveAzureServiceDomainJoinExtesnion(_role); + + vmPowershellCmdlets.RemoveAzureDeployment(_serviceName, DeploymentSlotType.Production, true); + + //TO DO: add test cases to test cmdlet with UnjoinCrednetial patameter. + pass = true; + } + catch (Exception e) + { + Console.WriteLine("Exception occurred: {0}", e); + throw; + } + } + #endregion join domain cmdlet tests + + #region join workgroup cmdlet tests + [TestMethod(), TestCategory("ADDomain"), TestProperty("Feature", "PAAS"), Priority(0), Owner("hylee"), Description("Test the cmdlet ((Get,Set,Remove)-AzureServiceADDomainExtension)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\packageADDomain.csv", "packageADDomain#csv", DataAccessMethod.Sequential)] + public void SetAzureServiceDomainJoinExtensionwithWorkGroupDefaultParamterSetTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + Console.WriteLine(_cred.UserName); + try + { + //Create a new Azure Iaas VM and set Domain Join extension, get domain join extension and then remove domain join extension + NewAzureDeployment(); + + //Join Domain with default parameter set. + Console.WriteLine("Joining domain with Workgroup default parameter set"); + vmPowershellCmdlets.SetAzureServiceDomainJoinExtension( + workGroupName: WorkgroupName, + serviceName: _serviceName); + + Console.WriteLine("Servie {0} added to workgroup {1} successfully.", _serviceName, WorkgroupName); + + GetAzureServiceDomainJoinExtension(); + + RemoveAzureServiceDomainJoinExtesnion(); + + vmPowershellCmdlets.RemoveAzureDeployment(_serviceName, DeploymentSlotType.Production, true); + pass = true; + + } + catch (Exception e) + { + Console.WriteLine("Exception occurred: {0}", e); + throw; + } + } + + [TestMethod(), TestCategory("ADDomain"), TestProperty("Feature", "PAAS"), Priority(0), Owner("hylee"), Description("Test the cmdlet ((Get,Set,Remove)-AzureServiceADDomainExtension)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\packageADDomain.csv", "packageADDomain#csv", DataAccessMethod.Sequential)] + public void UpdateWorkGroupWithSetAzureDomainJoinExtensionTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + Console.WriteLine(_cred.UserName); + try + { + const string workgroup2 = "WORKGROUP2"; + //Create a new Azure Iaas VM and set Domain Join extension, get domain join extension and then remove domain join extension + NewAzureDeployment(); + + //Join Domain with default parameter set. + Console.WriteLine("Joining domain with Workgroup default parameter set"); + vmPowershellCmdlets.SetAzureServiceDomainJoinExtension( + workGroupName: WorkgroupName, + serviceName: _serviceName, + credential: _cred); + Console.WriteLine("Servie {0} added to workgroup {1} successfully.", _serviceName, WorkgroupName); + + GetAzureServiceDomainJoinExtension(); + + Console.WriteLine("Joining domain with Workgroup default parameter set"); + vmPowershellCmdlets.SetAzureServiceDomainJoinExtension( + workGroupName: workgroup2, + serviceName: _serviceName); + Console.WriteLine("Servie {0} added to workgroup {1} successfully.", _serviceName, workgroup2); + + RemoveAzureServiceDomainJoinExtesnion(); + + vmPowershellCmdlets.RemoveAzureDeployment(_serviceName, DeploymentSlotType.Production, true); + pass = true; + + } + catch (Exception e) + { + Console.WriteLine("Exception occurred: {0}", e); + throw; + } + } + + [TestMethod(), TestCategory("ADDomain"), TestProperty("Feature", "PAAS"), Priority(0), Owner("hylee"), Description("Test the cmdlet ((Get,Set,Remove)-AzureServiceADDomainExtension)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\packageADDomain.csv", "packageADDomain#csv", DataAccessMethod.Sequential)] + public void JoinDomainAndUpdateToWorkGroupWithSetAzureDomainJoinExtensionTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + Console.WriteLine(_cred.UserName); + try + { + //Create a new Azure Iaas VM and set Domain Join extension, get domain join extension and then remove domain join extension + NewAzureDeployment(); + + //Join Domain with default parameter set. + Console.WriteLine("Joining domain with default parameter set"); + + vmPowershellCmdlets.SetAzureServiceDomainJoinExtension( + domainName: DomainName, + credential: _cred, + joinOption: 35, + restart: true, + serviceName: _serviceName, + slot: DeploymentSlotType.Production, + role: null, + unjoinDomainCredential: _cred); + Console.WriteLine("Servie {0} added to domain {1} successfully.", _serviceName, DomainName); + + GetAzureServiceDomainJoinExtension(); + + //Join workgroup + Console.WriteLine("Joining domain with Workgroup default parameter set"); + vmPowershellCmdlets.SetAzureServiceDomainJoinExtension( + workGroupName: WorkgroupName, + serviceName: _serviceName); + //vmPowershellCmdlets.SetAzureServiceDomainJoinExtension(workgroup1, _serviceName, DeploymentSlotType.Production, null, restart: true); + Console.WriteLine("Servie {0} added to workgroup {1} successfully.", _serviceName, WorkgroupName); + + GetAzureServiceDomainJoinExtension(); + + RemoveAzureServiceDomainJoinExtesnion(); + + vmPowershellCmdlets.RemoveAzureDeployment(_serviceName, DeploymentSlotType.Production, true); + pass = true; + + } + catch (Exception e) + { + Console.WriteLine("Exception occurred: {0}", e); + throw; + } + } + + [TestMethod(), TestCategory("ADDomain"), TestProperty("Feature", "PAAS"), Priority(0), Owner("hylee"), Description("Test the cmdlet ((Get,Set,Remove)-AzureServiceADDomainExtension)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\packageADDomain.csv", "packageADDomain#csv", DataAccessMethod.Sequential)] + public void JoinWorkgroupAndThenJoinDomainWithSetAzureDomainJoinExtensionTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + Console.WriteLine(_cred.UserName); + try + { + //Create a new Azure Iaas VM and set Domain Join extension, get domain join extension and then remove domain join extension + NewAzureDeployment(); + + //Join workgroup + Console.WriteLine("Joining domain with Workgroup default parameter set"); + vmPowershellCmdlets.SetAzureServiceDomainJoinExtension( + workGroupName: WorkgroupName, + serviceName: _serviceName); + Console.WriteLine("Servie {0} added to workgroup {1} successfully.", _serviceName, WorkgroupName); + + GetAzureServiceDomainJoinExtension(); + + //Join Domain with default parameter set. + Console.WriteLine("Joining domain with default parameter set"); + vmPowershellCmdlets.SetAzureServiceDomainJoinExtension( + domainName: DomainName, + credential: _cred, + joinOption: 35, + restart: true, + serviceName: _serviceName, + slot: DeploymentSlotType.Production, + role: null, + unjoinDomainCredential: _cred); + Console.WriteLine("Servie {0} added to domain {1} successfully.", _serviceName, DomainName); + + GetAzureServiceDomainJoinExtension(); + + RemoveAzureServiceDomainJoinExtesnion(); + + vmPowershellCmdlets.RemoveAzureDeployment(_serviceName, DeploymentSlotType.Production, true); + pass = true; + } + catch (Exception e) + { + Console.WriteLine("Exception occurred: {0}", e); + throw; + } + } + + [TestMethod(), TestCategory("ADDomain"), TestProperty("Feature", "PAAS"), Priority(0), Owner("hylee"), Description("Test the cmdlet ((Get,Set,Remove)-AzureServiceADDomainExtension)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\packageADDomain.csv", "packageADDomain#csv", DataAccessMethod.Sequential)] + public void SetAzureServiceDomainJoinExtensionwithWorkGroupThumbprintParamterSetTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + Console.WriteLine(_cred.UserName); + try + { + //Create a new Azure Iaas VM and set Domain Join extension, get domain join extension and then remove domain join extension + NewAzureDeployment(); + + //Join Domain with default parameter set. + Console.WriteLine("Joining domain with Workgroup thumbprint parameter set"); + + vmPowershellCmdlets.SetAzureServiceDomainJoinExtension( + workGroupName: WorkgroupName, + serviceName:_serviceName, + slot: DeploymentSlotType.Production, + role: _role, + certificateThumbprint: _cert.Thumbprint, + thumbprintAlgorithm: ThumbprintAlgorithm, + restart: true); + Console.WriteLine("Servie {0} added to workgroup {1} successfully.", _serviceName, WorkgroupName); + + GetAzureServiceDomainJoinExtension(); + + RemoveAzureServiceDomainJoinExtesnion(); + + vmPowershellCmdlets.RemoveAzureDeployment(_serviceName, DeploymentSlotType.Production, true); + pass = true; + + } + catch (Exception e) + { + Console.WriteLine("Exception occurred: {0}", e); + throw; + } + } + + [TestMethod(), TestCategory("ADDomain"), TestProperty("Feature", "PAAS"), Priority(0), Owner("hylee"), Description("Test the cmdlet ((Get,Set,Remove)-AzureServiceADDomainExtension)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\packageADDomain.csv", "packageADDomain#csv", DataAccessMethod.Sequential)] + public void SetAzureServiceDomainJoinExtensionwithWorkGroupCertificateParamterSetTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + Console.WriteLine(_cred.UserName); + try + { + //Create a new Azure Iaas VM and set Domain Join extension, get domain join extension and then remove domain join extension + NewAzureDeployment(); + + //Join Domain with default parameter set. + Console.WriteLine("Joining domain with Workgroup certificate parameter set"); + vmPowershellCmdlets.SetAzureServiceDomainJoinExtension( + workGroupName: WorkgroupName, + serviceName: _serviceName, + x509Certificate: _cert); + + Console.WriteLine("Servie {0} added to workgroup {1} successfully.", _serviceName, WorkgroupName); + + GetAzureServiceDomainJoinExtension(); + + RemoveAzureServiceDomainJoinExtesnion(); + + vmPowershellCmdlets.RemoveAzureDeployment(_serviceName, DeploymentSlotType.Production, true); + pass = true; + + } + catch (Exception e) + { + Console.WriteLine("Exception occurred: {0}", e); + throw; + } + } + + [TestMethod(), TestCategory("ADDomain"), TestProperty("Feature", "PAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((New)-AzureServiceADDomainExtensionConfig)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\packageADDomain.csv", "packageADDomain#csv", DataAccessMethod.Sequential)] + public void NewAzureServiceDomainJoinExtensionConfigWithWorkgroupDefaultParmateSetTests() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + //Prepare a new domain join config with workgroup default parameter set + ExtensionConfigurationInput domainJoinExtensionConfig = vmPowershellCmdlets.NewAzureServiceDomainJoinExtensionConfig( + workGroupName: WorkgroupName, + x509Certificate: null, + credential: _cred); + + //Create a new Azure Iaas VM and set Domain Join extension, get domain join extension and then remove domain join extension + NewAzureDeployment(domainJoinExtensionConfig); + + GetAzureServiceDomainJoinExtension(); + + RemoveAzureServiceDomainJoinExtesnion(_role); + + vmPowershellCmdlets.RemoveAzureDeployment(_serviceName, DeploymentSlotType.Production, true); + //TO DO: add test cases to test cmdlet with UnjoinCrednetial patameter. + pass = true; + } + catch (Exception e) + { + Console.WriteLine("Exception occurred: {0}", e); + throw; + } + } + + [TestMethod(), TestCategory("ADDomain"), TestProperty("Feature", "PAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((New)-AzureServiceADDomainExtensionConfig)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\packageADDomain.csv", "packageADDomain#csv", DataAccessMethod.Sequential)] + public void NewAzureServiceDomainJoinExtensionConfigWithWorkgroupThumbprintParmateSetTests() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + //Prepare a new domain join config with workgroup default parameter set + ExtensionConfigurationInput domainJoinExtensionConfig = vmPowershellCmdlets.NewAzureServiceDomainJoinExtensionConfig( + workGroupName: WorkgroupName, + certificateThumbprint: _cert.Thumbprint, + role: null, + restart: true, + thumbprintAlgorithm: ThumbprintAlgorithm); + + //Create a new Azure Iaas VM and set Domain Join extension, get domain join extension and then remove domain join extension + NewAzureDeployment(domainJoinExtensionConfig); + + GetAzureServiceDomainJoinExtension(); + + RemoveAzureServiceDomainJoinExtesnion(_role); + + vmPowershellCmdlets.RemoveAzureDeployment(_serviceName, DeploymentSlotType.Production, true); + //TO DO: add test cases to test cmdlet with UnjoinCrednetial patameter. + pass = true; + } + catch (Exception e) + { + Console.WriteLine("Exception occurred: {0}", e); + throw; + } + } + + [TestMethod(), TestCategory("ADDomain"), TestProperty("Feature", "PAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((New)-AzureServiceADDomainExtensionConfig)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\packageADDomain.csv", "packageADDomain#csv", DataAccessMethod.Sequential)] + public void NewAzureServiceDomainJoinExtensionConfigWithWorkgroupCertificateParmateSetTests() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + //Prepare a new domain join config with workgroup default parameter set + ExtensionConfigurationInput domainJoinExtensionConfig = vmPowershellCmdlets.NewAzureServiceDomainJoinExtensionConfig( + workGroupName: WorkgroupName, + x509Certificate: _cert, + restart: true); + + //Create a new Azure Iaas VM and set Domain Join extension, get domain join extension and then remove domain join extension + NewAzureDeployment(domainJoinExtensionConfig); + + GetAzureServiceDomainJoinExtension(); + + RemoveAzureServiceDomainJoinExtesnion(_role); + + vmPowershellCmdlets.RemoveAzureDeployment(_serviceName, DeploymentSlotType.Production, true); + //TO DO: add test cases to test cmdlet with UnjoinCrednetial patameter. + pass = true; + } + catch (Exception e) + { + Console.WriteLine("Exception occurred: {0}", e); + throw; + } + } + + #endregion join workgroup cmdlet tests + + [TestCleanup] + public virtual void CleanUp() + { + Console.WriteLine("Test {0}", pass ? "passed" : "failed"); + + // Remove the service + if ((cleanupIfPassed && pass) || (cleanupIfFailed && !pass)) + { + CleanupService(_serviceName); + } + } + + #region Helper Methods + private void NewAzureDeployment(ExtensionConfigurationInput domainJoinExtensionConfig = null) + { + //Create a new Azure Iaas VM and set Domain Join extension, get domain join extension and then remove domain join extension + Console.WriteLine("Creating a new Azure Iaas VM"); + + vmPowershellCmdlets.NewAzureService(_serviceName, _serviceName, null, AffinityGroupName); + + Console.WriteLine("Service, {0}, is created.", _serviceName); + + vmPowershellCmdlets.AddAzureCertificate(_serviceName, _rdpCertPath.FullName, password); + + if (domainJoinExtensionConfig == null) + { + vmPowershellCmdlets.NewAzureDeployment(_serviceName, _packagePath1.FullName, _configPath1.FullName, DeploymentSlotType.Production, _deploymentLabel, _deploymentName, false, false); + Console.WriteLine("New deployment created successfully."); + } + else + { + vmPowershellCmdlets.NewAzureDeployment(_serviceName, _packagePath1.FullName, _configPath1.FullName, DeploymentSlotType.Production, _deploymentLabel, _deploymentName, false, false, domainJoinExtensionConfig); + Console.WriteLine("{0}:New deployment {1} with domain join {2} created successfully.", DateTime.Now, _serviceName, domainJoinExtensionConfig.Type); + } + } + + private void GetAzureServiceDomainJoinExtension() + { + var domianContext = vmPowershellCmdlets.GetAzureServiceDomainJoinExtension(_serviceName, DeploymentSlotType.Production); + Utilities.PrintContext(domianContext); + Assert.IsFalse(string.IsNullOrEmpty(domianContext.Extension), "Extension is empty or null."); + Console.WriteLine("Service domain join extension fetched successfully."); + } + + private void RemoveAzureServiceDomainJoinExtesnion(string[] roles = null, bool uninstallConfig = false) + { + Console.WriteLine("Removing the domian join extension."); + vmPowershellCmdlets.RemoveAzureServiceDomainJoinExtension(_serviceName, DeploymentSlotType.Production, roles, uninstallConfig); + Console.WriteLine("Removed domain join extension for the deployment {0} succefully.", _deploymentName); + } + + private void CheckIfPackageAndConfigFilesExists() + { + Assert.IsTrue(File.Exists(_packagePath1.FullName), "VHD file not exist={0}", _packagePath1); + Assert.IsTrue(File.Exists(_configPath1.FullName), "VHD file not exist={0}", _configPath1); + } + #endregion Helper Methods + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/AzureServiceExtensionTests.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/AzureServiceExtensionTests.cs new file mode 100644 index 000000000000..30a33f60ad98 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/AzureServiceExtensionTests.cs @@ -0,0 +1,306 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Collections.ObjectModel; +using System.IO; +using System.Reflection; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests +{ + [TestClass] + public class AzureServiceExtensionTests : ServiceManagementTest + { + private string _serviceName; + private string _packageName; + private string _configName; + private FileInfo _packagePath; + private FileInfo _configPath; + + const string DeploymentName = "deployment1"; + const string DeploymentLabel = "label1"; + + private string _extensionName; + private string _providerNamespace; + private string _version; + private const string PublicConfig = "pstestuser2015-01-30"; + private const string PrivateConfig = "p@ssw0rd"; + + [TestInitialize] + public void Initialize() + { + // Choose the package and config files from local machine + _packageName = Convert.ToString(TestContext.DataRow["upgradePackage"]); + _configName = Convert.ToString(TestContext.DataRow["upgradeConfig"]); + _packagePath = new FileInfo(Directory.GetCurrentDirectory() + "\\" + _packageName); + _configPath = new FileInfo(Directory.GetCurrentDirectory() + "\\" + _configName); + + Assert.IsTrue(File.Exists(_packagePath.FullName), "VHD file not exist={0}", _packagePath); + Assert.IsTrue(File.Exists(_configPath.FullName), "VHD file not exist={0}", _configPath); + + _serviceName = Utilities.GetUniqueShortName(serviceNamePrefix); + + pass = false; + testStartTime = DateTime.Now; + } + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "PAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Get-AzureServiceAvailableExtension)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\package.csv", "package#csv", DataAccessMethod.Sequential)] + public void GetAzureServiceAvailableExtensionTest() + { + + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + Collection resultExtensions = vmPowershellCmdlets.GetAzureServiceAvailableExtension(); + + foreach (var extension in resultExtensions) + { + Utilities.PrintContext(extension); + } + + _extensionName = resultExtensions[0].ExtensionName; + _providerNamespace = resultExtensions[0].ProviderNameSpace; + + resultExtensions = vmPowershellCmdlets.GetAzureServiceAvailableExtension( + extensionName: _extensionName, + providerNamespace: _providerNamespace, + allVersion: true); + + foreach (var extension in resultExtensions) + { + Utilities.PrintContext(extension); + } + + string ver = resultExtensions[0].Version; + + resultExtensions = vmPowershellCmdlets.GetAzureServiceAvailableExtension( + extensionName: _extensionName, + providerNamespace: _providerNamespace, + version: ver); + + Utilities.PrintContext(resultExtensions[0]); + + pass = true; + } + catch (Exception e) + { + Console.WriteLine("Exception occurred: {0}", e); + throw; + } + } + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "PAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (New-AzureServiceExtensionConfig)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\package.csv", "package#csv", DataAccessMethod.Sequential)] + public void AzureServiceExtensionConfigScenarioTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + const string rdpPath = @".\WebRole1.rdp"; + + try + { + Collection resultExtensions = vmPowershellCmdlets.GetAzureServiceAvailableExtension(); + + foreach (var extension in resultExtensions) + { + if (extension.ExtensionName == "RDP") + { + _extensionName = extension.ExtensionName; + _providerNamespace = extension.ProviderNameSpace; + _version = extension.Version; + break; + } + } + + vmPowershellCmdlets.NewAzureService(_serviceName, _serviceName, locationName); + Console.WriteLine("service, {0}, is created.", _serviceName); + + ExtensionConfigurationInput config = vmPowershellCmdlets.NewAzureServiceExtensionConfig( + extensionName: _extensionName, + providerNamespace: _providerNamespace, + publicConfig: PublicConfig, + privateConfig: PrivateConfig, + version: _version + ); + + vmPowershellCmdlets.NewAzureDeployment(_serviceName, _packagePath.FullName, _configPath.FullName, + DeploymentSlotType.Production, DeploymentLabel, DeploymentName, false, false, config); + + DeploymentInfoContext result = vmPowershellCmdlets.GetAzureDeployment(_serviceName, DeploymentSlotType.Production); + pass = Utilities.PrintAndCompareDeployment(result, _serviceName, DeploymentName, DeploymentLabel, DeploymentSlotType.Production, null, 2); + Console.WriteLine("successfully deployed the package"); + + ExtensionContext resultExtensionContext = vmPowershellCmdlets.GetAzureServiceExtension(_serviceName)[0]; + + Utilities.PrintContext(resultExtensionContext); + + VerifyExtensionContext(resultExtensionContext, "AllRoles", _extensionName, _providerNamespace, _version); + + RemoteDesktopExtensionContext resultContext = vmPowershellCmdlets.GetAzureServiceRemoteDesktopExtension(_serviceName)[0]; + + Utilities.PrintContext(resultContext); + + VerifyRDP(_serviceName, rdpPath); + + vmPowershellCmdlets.RemoveAzureServiceExtension( + serviceName: _serviceName, + extensionName: _extensionName, + providerNamespace: _providerNamespace); + + try + { + vmPowershellCmdlets.GetAzureRemoteDesktopFile("WebRole1_IN_0", _serviceName, rdpPath, false); + Assert.Fail("Succeeded, but extected to fail!"); + } + catch (Exception e) + { + if (e is AssertFailedException) + { + throw; + } + Console.WriteLine("Failed to get RDP file as expected"); + } + + + + vmPowershellCmdlets.RemoveAzureDeployment(_serviceName, DeploymentSlotType.Production, true); + + pass &= Utilities.CheckRemove(vmPowershellCmdlets.GetAzureDeployment, _serviceName, DeploymentSlotType.Production); + } + catch (Exception e) + { + Console.WriteLine("Exception occurred: {0}", e); + throw; + } + } + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "PAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Get,Set,Remove)-AzureServiceExtension)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\package.csv", "package#csv", DataAccessMethod.Sequential)] + public void AzureServiceExtensionTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + const string rdpPath = @".\WebRole2.rdp"; + + try + { + Collection resultExtensions = vmPowershellCmdlets.GetAzureServiceAvailableExtension(); + + foreach (var extension in resultExtensions) + { + if (extension.ExtensionName == "RDP") + { + _extensionName = extension.ExtensionName; + _providerNamespace = extension.ProviderNameSpace; + _version = extension.Version; + break; + } + } + + vmPowershellCmdlets.NewAzureService(_serviceName, _serviceName, locationName); + Console.WriteLine("service, {0}, is created.", _serviceName); + + vmPowershellCmdlets.NewAzureDeployment(_serviceName, _packagePath.FullName, _configPath.FullName, + DeploymentSlotType.Production, DeploymentLabel, DeploymentName, false, false); + + DeploymentInfoContext result = vmPowershellCmdlets.GetAzureDeployment(_serviceName, DeploymentSlotType.Production); + pass = Utilities.PrintAndCompareDeployment(result, _serviceName, DeploymentName, DeploymentLabel, DeploymentSlotType.Production, null, 2); + Console.WriteLine("successfully deployed the package"); + + vmPowershellCmdlets.SetAzureServiceExtension( + serviceName: _serviceName, + extensionName: _extensionName, + providerNamespace: _providerNamespace, + publicConfig: PublicConfig, + privateConfig: PrivateConfig, + version: _version + ); + + ExtensionContext resultExtensionContext = vmPowershellCmdlets.GetAzureServiceExtension(_serviceName)[0]; + + Utilities.PrintContext(resultExtensionContext); + + VerifyExtensionContext(resultExtensionContext, "AllRoles", _extensionName, _providerNamespace, _version); + + RemoteDesktopExtensionContext resultContext = vmPowershellCmdlets.GetAzureServiceRemoteDesktopExtension(_serviceName)[0]; + + Utilities.PrintContext(resultContext); + + VerifyRDP(_serviceName, rdpPath); + + vmPowershellCmdlets.RemoveAzureServiceExtension( + serviceName: _serviceName, + extensionName: _extensionName, + providerNamespace: _providerNamespace, + uninstall: true); + + try + { + vmPowershellCmdlets.GetAzureRemoteDesktopFile("WebRole1_IN_0", _serviceName, rdpPath, false); + Assert.Fail("Succeeded, but extected to fail!"); + } + catch (Exception e) + { + if (e is AssertFailedException) + { + throw; + } + Console.WriteLine("Failed to get RDP file as expected"); + } + + vmPowershellCmdlets.RemoveAzureDeployment(_serviceName, DeploymentSlotType.Production, true); + + pass &= Utilities.CheckRemove(vmPowershellCmdlets.GetAzureDeployment, _serviceName, DeploymentSlotType.Production); + } + catch (Exception e) + { + Console.WriteLine("Exception occurred: {0}", e); + throw; + } + } + + [TestCleanup] + public virtual void CleanUp() + { + Console.WriteLine("Test {0}", pass ? "passed" : "failed"); + + // Remove the service + if ((cleanupIfPassed && pass) || (cleanupIfFailed && !pass)) + { + CleanupService(_serviceName); + } + } + + private bool VerifyExtensionContext(ExtensionContext resultContext, string role, string extensionName, string providerNamespace, string version) + { + try + { + Assert.AreEqual(role, resultContext.Role.RoleType.ToString()); + Assert.AreEqual(extensionName, resultContext.Extension); + Assert.AreEqual(providerNamespace, resultContext.ProviderNameSpace); + Assert.AreEqual(version, resultContext.Version); + return true; + } + catch + { + return false; + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/AzureVhdTest.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/AzureVhdTest.cs new file mode 100644 index 000000000000..82ea81f58f4f --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/AzureVhdTest.cs @@ -0,0 +1,140 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Security.Cryptography; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Sync.Download; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests +{ + [TestClass] + public class AzureVhdTest : ServiceManagementTest + { + protected bool deleteLocalFileIfFailed = true; + protected bool deleteLocalFileIfPassed = true; + protected string perfFile = "perf.csv"; + + protected void SaveVhdAndAssertContent(BlobHandle destination, FileInfo localFile, int? numThread, string storageKey, bool overwrite, bool deleteBlob, bool deleteLocal) + { + try + { + Console.WriteLine("Downloading a VHD from {0} to {1}...", destination.Blob.Uri.ToString(), localFile.FullName); + DateTime startTime = DateTime.Now; + VhdDownloadContext result = vmPowershellCmdlets.SaveAzureVhd(destination.Blob.Uri, localFile, numThread, storageKey, overwrite); + Console.WriteLine("Downloading completed in {0} seconds.", (DateTime.Now - startTime).TotalSeconds); + + string calculateMd5Hash = CalculateContentMd5(File.OpenRead(result.LocalFilePath.FullName)); + + Assert.IsTrue(VerifyMD5hash(destination, calculateMd5Hash)); + + if (deleteBlob) + { + destination.Blob.Delete(); + } + + if (deleteLocalFileIfPassed && deleteLocal) + { + File.Delete(localFile.FullName); + } + } + catch (Exception e) + { + if (deleteLocalFileIfFailed && deleteLocal) + { + File.Delete(localFile.FullName); + } + Assert.Fail(e.InnerException.ToString()); + } + } + + protected void SaveVhdAndAssertContent(BlobHandle destination, FileInfo localFile, bool deleteBlob, bool deleteLocal) + { + SaveVhdAndAssertContent(destination, localFile, null, null, false, deleteBlob, deleteLocal); + } + + protected void SaveVhdAndAssertContent(BlobHandle destination, FileInfo localFile, int? numThread, bool deleteBlob, bool deleteLocal) + { + SaveVhdAndAssertContent(destination, localFile, numThread, null, false, deleteBlob, deleteLocal); + } + + protected void SaveVhdAndAssertContent(BlobHandle destination, FileInfo localFile, string storageKey, bool deleteBlob, bool deleteLocal) + { + SaveVhdAndAssertContent(destination, localFile, null, storageKey, false, deleteBlob, deleteLocal); + } + + protected void SaveVhdAndAssertContent(BlobHandle destination, FileInfo localFile, bool overwrite, bool deleteBlob, bool deleteLocal) + { + SaveVhdAndAssertContent(destination, localFile, null, null, overwrite, deleteBlob, deleteLocal); + } + + + private static string CalculateContentMd5(Stream stream) + { + using (var md5 = MD5.Create()) + { + using (var bufferdStream = new BufferedStream(stream)) + { + var md5Hash = md5.ComputeHash(bufferdStream); + return Convert.ToBase64String(md5Hash); + } + } + } + + protected bool VerifyMD5hash(BlobHandle blobHandle, string md5hash) + { + string blobMd5 = blobHandle.Blob.Properties.ContentMD5; + Console.WriteLine("MD5 hash of the local file: {0}", md5hash); + if (string.IsNullOrEmpty(blobMd5)) + { + Console.WriteLine("The blob does not have MD5 value!!!"); + return false; + } + else + { + Console.WriteLine("MD5 hash of blob, {0}, is {1}.", blobHandle.Blob.Uri.ToString(), blobMd5); + return String.Equals(blobMd5, md5hash); + } + } + + protected void AssertUploadContextAndContentMD5UsingSaveVhd + (string destination, FileInfo localFile, VhdUploadContext vhdUploadContext, string md5hash, bool deleteBlob = true, bool deleteLocal = true) + { + AssertUploadContext(destination, localFile, vhdUploadContext); + + FileInfo downloadFile = new FileInfo(localFile.FullName + "_download.vhd"); + + BlobHandle blobHandle = getBlobHandle(destination); + + Assert.IsTrue(VerifyMD5hash(blobHandle, md5hash)); + SaveVhdAndAssertContent(blobHandle, downloadFile, true, deleteBlob, deleteLocal); + } + + protected BlobHandle getBlobHandle(string blob) + { + BlobUri blobPath; + Assert.IsTrue(BlobUri.TryParseUri(new Uri(blob), out blobPath)); + return new BlobHandle(blobPath, storageAccountKey.Primary); + } + + protected void AssertUploadContext(string destination, FileInfo localFile, VhdUploadContext vhdUploadContext) + { + Assert.IsNotNull(vhdUploadContext); + Assert.AreEqual(new Uri(destination), vhdUploadContext.DestinationUri); + Assert.IsTrue(string.Compare(vhdUploadContext.LocalFilePath.FullName, localFile.FullName, StringComparison.InvariantCultureIgnoreCase) == 0); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/BVTTest.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/BVTTest.cs new file mode 100644 index 000000000000..2803e9e6bb10 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/BVTTest.cs @@ -0,0 +1,438 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Reflection; +using System.Security.Cryptography.X509Certificates; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests +{ + [TestClass] + public class BVTTest : ServiceManagementTest + { + private string serviceName; + + [TestInitialize] + public void Initialize() + { + serviceName = Utilities.GetUniqueShortName(serviceNamePrefix); + pass = false; + testStartTime = DateTime.Now; + } + + /// + /// BVT test for IaaS cmdlets. + /// + [TestMethod(), TestCategory(Category.BVT), TestCategory(Category.Scenario), TestProperty("Feature", "IaaS"), Priority(1), Owner("hylee"), Description("BVT Test for IaaS")] + public void AzureIaaSBVT() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + DateTime prevTime = DateTime.Now; + + string diskLabel1 = "disk1"; + int diskSize1 = 30; + int lunSlot1 = 0; + + string diskLabel2 = "disk2"; + int diskSize2 = 50; + int lunSlot2 = 2; + + + string ep1Name = "tcp1"; + int ep1LocalPort = 60010; + int ep1PublicPort = 60011; + string ep1LBSetName = "lbset1"; + int ep1ProbePort = 60012; + string ep1ProbePath = string.Empty; + int? ep1ProbeInterval = 7; + int? ep1ProbeTimeout = null; + NetworkAclObject ep1AclObj = vmPowershellCmdlets.NewAzureAclConfig(); + bool ep1DirectServerReturn = false; + + string ep2Name = "tcp2"; + int ep2LocalPort = 60020; + int ep2PublicPort = 60021; + int ep2LocalPortChanged = 60030; + int ep2PublicPortChanged = 60031; + string ep2LBSetName = "lbset2"; + int ep2ProbePort = 60022; + string ep2ProbePath = @"/"; + int? ep2ProbeInterval = null; + int? ep2ProbeTimeout = 32; + NetworkAclObject ep2AclObj = vmPowershellCmdlets.NewAzureAclConfig(); + bool ep2DirectServerReturn = false; + + string cerFileName = "testcert.cer"; + string thumbprintAlgorithm = "sha1"; + + try + { + // Create a certificate + X509Certificate2 certCreated = Utilities.CreateCertificate(password); + byte[] certData2 = certCreated.Export(X509ContentType.Cert); + File.WriteAllBytes(cerFileName, certData2); + + // Install the .cer file to local machine. + StoreLocation certStoreLocation = StoreLocation.CurrentUser; + StoreName certStoreName = StoreName.My; + X509Certificate2 installedCert = Utilities.InstallCert(cerFileName, certStoreLocation, certStoreName); + + PSObject certToUpload = vmPowershellCmdlets.RunPSScript( + String.Format("Get-Item cert:\\{0}\\{1}\\{2}", certStoreLocation.ToString(), certStoreName.ToString(), installedCert.Thumbprint))[0]; + string certData = Convert.ToBase64String(((X509Certificate2)certToUpload.BaseObject).RawData); + + string newAzureVMName = Utilities.GetUniqueShortName(vmNamePrefix); + if (string.IsNullOrEmpty(imageName)) + { + imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows" }, false); + } + + RecordTimeTaken(ref prevTime); + + // + // New-AzureService and verify with Get-AzureService + // + vmPowershellCmdlets.NewAzureService(serviceName, serviceName, locationName); + Assert.IsTrue(Verify.AzureService(serviceName, serviceName, locationName)); + RecordTimeTaken(ref prevTime); + + // + // Add-AzureCertificate and verify with Get-AzureCertificate + // + vmPowershellCmdlets.AddAzureCertificate(serviceName, certToUpload); + Assert.IsTrue(Verify.AzureCertificate(serviceName, certCreated.Thumbprint, thumbprintAlgorithm, certData)); + RecordTimeTaken(ref prevTime); + + // + // Remove-AzureCertificate + // + vmPowershellCmdlets.RemoveAzureCertificate(serviceName, certCreated.Thumbprint, thumbprintAlgorithm); + Assert.IsTrue(Utilities.CheckRemove(vmPowershellCmdlets.GetAzureCertificate, serviceName, certCreated.Thumbprint, thumbprintAlgorithm)); + RecordTimeTaken(ref prevTime); + + // + // New-AzureVMConfig + // + var azureVMConfigInfo = new AzureVMConfigInfo(newAzureVMName, InstanceSize.Small.ToString(), imageName); + PersistentVM vm = vmPowershellCmdlets.NewAzureVMConfig(azureVMConfigInfo); + + RecordTimeTaken(ref prevTime); + + // + // Add-AzureCertificate + // + vmPowershellCmdlets.AddAzureCertificate(serviceName, certToUpload); + + // + // New-AzureCertificateSetting + // + CertificateSettingList certList = new CertificateSettingList(); + certList.Add(vmPowershellCmdlets.NewAzureCertificateSetting(certStoreName.ToString(), installedCert.Thumbprint)); + RecordTimeTaken(ref prevTime); + + // + // Add-AzureProvisioningConfig + // + AzureProvisioningConfigInfo azureProvisioningConfig = new AzureProvisioningConfigInfo(OS.Windows, certList, username, password); + azureProvisioningConfig.Vm = vm; + vm = vmPowershellCmdlets.AddAzureProvisioningConfig(azureProvisioningConfig); + RecordTimeTaken(ref prevTime); + + // + // Add-AzureDataDisk (two disks) + // + AddAzureDataDiskConfig azureDataDiskConfigInfo1 = new AddAzureDataDiskConfig(DiskCreateOption.CreateNew, diskSize1, diskLabel1, lunSlot1); + azureDataDiskConfigInfo1.Vm = vm; + vm = vmPowershellCmdlets.AddAzureDataDisk(azureDataDiskConfigInfo1); + + AddAzureDataDiskConfig azureDataDiskConfigInfo2 = new AddAzureDataDiskConfig(DiskCreateOption.CreateNew, diskSize2, diskLabel2, lunSlot2); + azureDataDiskConfigInfo2.Vm = vm; + vm = vmPowershellCmdlets.AddAzureDataDisk(azureDataDiskConfigInfo2); + + RecordTimeTaken(ref prevTime); + + // + // Add-AzureEndpoint (two endpoints) + // + AzureEndPointConfigInfo azureEndPointConfigInfo1 = new AzureEndPointConfigInfo( + AzureEndPointConfigInfo.ParameterSet.CustomProbe, + ProtocolInfo.tcp, + ep1LocalPort, + ep1PublicPort, + ep1Name, + ep1LBSetName, + ep1ProbePort, + ProtocolInfo.tcp, + ep1ProbePath, + ep1ProbeInterval, + ep1ProbeTimeout, + ep1AclObj, + ep1DirectServerReturn, + null, + null, + LoadBalancerDistribution.SourceIP); + + azureEndPointConfigInfo1.Vm = vm; + vm = vmPowershellCmdlets.AddAzureEndPoint(azureEndPointConfigInfo1); + + AzureEndPointConfigInfo azureEndPointConfigInfo2 = new AzureEndPointConfigInfo( + AzureEndPointConfigInfo.ParameterSet.CustomProbe, + ProtocolInfo.tcp, + ep2LocalPort, + ep2PublicPort, + ep2Name, + ep2LBSetName, + ep2ProbePort, + ProtocolInfo.http, + ep2ProbePath, + ep2ProbeInterval, + ep2ProbeTimeout, + ep2AclObj, + ep2DirectServerReturn); + + azureEndPointConfigInfo2.Vm = vm; + vm = vmPowershellCmdlets.AddAzureEndPoint(azureEndPointConfigInfo2); + + RecordTimeTaken(ref prevTime); + + // + // Set-AzureAvailabilitySet + // + + string testAVSetName = "testAVSet1"; + vm = vmPowershellCmdlets.SetAzureAvailabilitySet(testAVSetName, vm); + RecordTimeTaken(ref prevTime); + + // + // New-AzureDns + // + + string dnsName = "OpenDns1"; + string ipAddress = "208.67.222.222"; + + DnsServer dns = vmPowershellCmdlets.NewAzureDns(dnsName, ipAddress); + + RecordTimeTaken(ref prevTime); + + // + // New-AzureVM + // + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, null, new[] { dns }, null, null, null, null); + RecordTimeTaken(ref prevTime); + + // + // Get-AzureVM without any parameter (List VMs) + // + var vmlist = vmPowershellCmdlets.GetAzureVM(); + Console.WriteLine("The number of VMs: {0}", vmlist.Count); + Assert.AreNotSame(0, vmlist.Count, "No VM exists!!!"); + PersistentVMRoleListContext returnedVMlist = + vmlist.First(item => item.ServiceName.Equals(serviceName) && item.Name.Equals(newAzureVMName)); + Assert.IsNotNull(returnedVMlist, "Created VM does not exist!!!"); + Utilities.PrintContext((PersistentVMRoleContext) returnedVMlist); + + // + // Get-AzureVM + // + PersistentVMRoleContext returnedVM = vmPowershellCmdlets.GetAzureVM(newAzureVMName, serviceName); + vm = returnedVM.VM; + RecordTimeTaken(ref prevTime); + + // + // Verify AzureDataDisk + // + Assert.IsTrue(Verify.AzureDataDisk(vm, diskLabel1, diskSize1, lunSlot1, HostCaching.None), "Data disk is not properly added"); + Assert.IsTrue(Verify.AzureDataDisk(vm, diskLabel2, diskSize2, lunSlot2, HostCaching.None), "Data disk is not properly added"); + Console.WriteLine("Data disk added correctly."); + + RecordTimeTaken(ref prevTime); + + // + // Verify AzureEndpoint + // + Assert.IsTrue(Verify.AzureEndpoint(vm, new[]{azureEndPointConfigInfo1, azureEndPointConfigInfo2})); + + // + // Verify RDP & PowerShell Endpoints + // + var endpoints = vmPowershellCmdlets.GetAzureEndPoint(vm); + Assert.IsTrue(endpoints.Count(e => e.Name == "PowerShell" && e.LocalPort == 5986 && e.Protocol == "tcp") == 1); + Assert.IsTrue(endpoints.Count(e => e.Name == "RemoteDesktop" && e.LocalPort == 3389 && e.Protocol == "tcp") == 1); + + // + // Verify AzureDns + // + Assert.IsTrue(Verify.AzureDns(vmPowershellCmdlets.GetAzureDeployment(serviceName).DnsSettings, dns)); + + // + // Verify AzureAvailibilitySet + // + Assert.IsTrue(Verify.AzureAvailabilitySet(vm, testAVSetName)); + + // + // Verify AzureOsDisk + // + Assert.IsTrue(Verify.AzureOsDisk(vm, "Windows", HostCaching.ReadWrite)); + + // + // Set-AzureDataDisk + // + SetAzureDataDiskConfig setAzureDataDiskConfigInfo = new SetAzureDataDiskConfig(HostCaching.ReadOnly, lunSlot1); + setAzureDataDiskConfigInfo.Vm = vm; + vm = vmPowershellCmdlets.SetAzureDataDisk(setAzureDataDiskConfigInfo); + RecordTimeTaken(ref prevTime); + + // + // Remove-AzureDataDisk + // + RemoveAzureDataDiskConfig removeAzureDataDiskConfig = new RemoveAzureDataDiskConfig(lunSlot2, vm); + vm = vmPowershellCmdlets.RemoveAzureDataDisk(removeAzureDataDiskConfig); + RecordTimeTaken(ref prevTime); + + // + // Set-AzureEndpoint + // + azureEndPointConfigInfo2 = new AzureEndPointConfigInfo( + AzureEndPointConfigInfo.ParameterSet.CustomProbe, + ProtocolInfo.tcp, + ep2LocalPortChanged, + ep2PublicPortChanged, + ep2Name, + ep2LBSetName, + ep2ProbePort, + ProtocolInfo.http, + ep2ProbePath, + ep2ProbeInterval, + ep2ProbeTimeout, + ep2AclObj, + ep2DirectServerReturn); + + azureEndPointConfigInfo2.Vm = vm; + vm = vmPowershellCmdlets.SetAzureEndPoint(azureEndPointConfigInfo2); + RecordTimeTaken(ref prevTime); + + // + // Remove-AzureEndpoint + // + vm = vmPowershellCmdlets.RemoveAzureEndPoint(azureEndPointConfigInfo1.EndpointName, vm); + RecordTimeTaken(ref prevTime); + + // + // Set-AzureVMSize + // + var vmSizeConfig = new SetAzureVMSizeConfig(InstanceSize.Medium.ToString()); + vmSizeConfig.Vm = vm; + vm = vmPowershellCmdlets.SetAzureVMSize(vmSizeConfig); + RecordTimeTaken(ref prevTime); + + // + // Set-AzureOSDisk + // + vm = vmPowershellCmdlets.SetAzureOSDisk(HostCaching.ReadOnly, vm); + + + // + // Update-AzureVM + // + vmPowershellCmdlets.UpdateAzureVM(newAzureVMName, serviceName, vm); + RecordTimeTaken(ref prevTime); + + // + // Get-AzureVM and Verify the VM + // + vm = vmPowershellCmdlets.GetAzureVM(newAzureVMName, serviceName).VM; + + // Verify setting data disk + Assert.IsTrue(Verify.AzureDataDisk(vm, diskLabel1, diskSize1, lunSlot1, HostCaching.ReadOnly), "Data disk is not properly added"); + + // Verify removing a data disk + Assert.AreEqual(1, vmPowershellCmdlets.GetAzureDataDisk(vm).Count, "DataDisk is not removed."); + + // Verify setting an endpoint + Assert.IsTrue(Verify.AzureEndpoint(vm, new[]{azureEndPointConfigInfo2})); + + // Verify removing an endpoint + Assert.IsFalse(Verify.AzureEndpoint(vm, new[] { azureEndPointConfigInfo1 })); + + // Verify os disk + Assert.IsTrue(Verify.AzureOsDisk(vm, "Windows", HostCaching.ReadOnly)); + + // + // Remove-AzureVM + // + vmPowershellCmdlets.RemoveAzureVM(newAzureVMName, serviceName); + + RecordTimeTaken(ref prevTime); + + Assert.AreEqual(null, vmPowershellCmdlets.GetAzureVM(newAzureVMName, serviceName)); + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + } + + [TestCleanup] + public virtual void CleanUp() + { + Console.WriteLine("Test {0}", pass ? "passed" : "failed"); + + // Remove the service + if ((cleanupIfPassed && pass) || (cleanupIfFailed && !pass)) + { + try + { + vmPowershellCmdlets.RemoveAzureService(serviceName); + } + catch (Exception e) + { + Console.WriteLine("Error occurred while deleting service: {0}", e.ToString()); + + } + try + { + vmPowershellCmdlets.GetAzureService(serviceName); + Console.WriteLine("The service, {0}, is not removed", serviceName); + } + catch (Exception e) + { + if (e.ToString().ToLowerInvariant().Contains("does not exist")) + { + Console.WriteLine("The service, {0}, is successfully removed", serviceName); + } + else + { + Console.WriteLine("Error occurred: {0}", e.ToString()); + } + } + } + } + + private void RecordTimeTaken(ref DateTime prev) + { + var period = DateTime.Now - prev; + Console.WriteLine("{0} seconds and {1} ms passed...", period.Seconds.ToString(), period.Milliseconds.ToString()); + prev = DateTime.Now; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/ACLAction.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/ACLAction.cs new file mode 100644 index 000000000000..07e0a5b8fa09 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/ACLAction.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo +{ + public enum ACLAction + { + Permit, + Deny + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/AddAzureDataDiskConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/AddAzureDataDiskConfig.cs new file mode 100644 index 000000000000..e68d6f2e2cdd --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/AddAzureDataDiskConfig.cs @@ -0,0 +1,38 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo +{ + public class AddAzureDataDiskConfig + { + public readonly DiskCreateOption DiskCreateOption; + public readonly int DiskSizeGB; + public readonly string DiskLabel; + public readonly int LunSlot; + public string HostCaching; + + public AddAzureDataDiskConfig(DiskCreateOption diskCreateOption, int diskSizeGB, string diskLabel, int lunSlot, string hostCaching = null) + { + this.DiskCreateOption = diskCreateOption; + this.DiskSizeGB = diskSizeGB; + this.DiskLabel = diskLabel; + this.LunSlot = lunSlot; + this.HostCaching = hostCaching; + } + + public PersistentVM Vm { get; set; } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/AzureEndPointConfigInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/AzureEndPointConfigInfo.cs new file mode 100644 index 000000000000..dd0906c9b098 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/AzureEndPointConfigInfo.cs @@ -0,0 +1,270 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo +{ + public class AzureEndPointConfigInfo + { + public enum ParameterSet { NoLB, LoadBalancedNoProbe, CustomProbe, DefaultProbe }; + + public ProtocolInfo EndpointProtocol { get; set; } + public int EndpointLocalPort { get; set; } + public int? EndpointPublicPort { get; set; } + public string EndpointName { get; set; } + public string LBSetName { get; set; } + public int ProbePort { get; set; } + public ProtocolInfo ProbeProtocol { get; set; } + public string ProbePath { get; set; } + public int? ProbeInterval { get; set; } + public int? ProbeTimeout { get; set; } + public PersistentVM Vm { get; set; } + public ParameterSet ParamSet { get; set; } + public NetworkAclObject Acl { get; set; } + public bool DirectServerReturn { get; set; } + public string ServiceName { get; set; } + public string InternalLoadBalancerName { get; set; } + + public string LoadBalancerDistribution { get; set; } + + public AzureEndPointConfigInfo() + { + } + + // NoLB parameter set + public AzureEndPointConfigInfo(ParameterSet paramset, + ProtocolInfo endpointProtocol, + int endpointLocalPort, + int endpointPublicPort, + string endpointName, + NetworkAclObject aclObj = null, + bool directServerReturn = false, + string internalLoadBalancer = null, + string serviceName = null, + string loadBalancerDistribution = null) + { + this.Initialize( + endpointProtocol, + endpointLocalPort, + endpointPublicPort, + endpointName, + string.Empty, + 0, + ProtocolInfo.tcp, + string.Empty, + null, + null, + paramset, + aclObj, + directServerReturn, + internalLoadBalancer, + serviceName, + loadBalancerDistribution); + } + + // LoadBalancedNoProbe/DefaultProbe parameter set + public AzureEndPointConfigInfo( + ParameterSet paramset, + ProtocolInfo endpointProtocol, + int endpointLocalPort, + int endpointPublicPort, + string endpointName, + string lBSetName, + NetworkAclObject aclObj = null, + bool directServerReturn = false, + string internalLoadBalancer = null, + string serviceName = null, + string loadBalancerDistribution = null) + { + if ( (paramset == ParameterSet.LoadBalancedNoProbe) || (paramset == ParameterSet.DefaultProbe) ) + { + this.Initialize( + endpointProtocol, + endpointLocalPort, + endpointPublicPort, + endpointName, + lBSetName, + 0, + ProtocolInfo.tcp, + string.Empty, + null, + null, + paramset, + aclObj, + directServerReturn, + internalLoadBalancer, + serviceName, + loadBalancerDistribution); + } + } + + // CustomProbe parameter set + public AzureEndPointConfigInfo( + ParameterSet paramset, + ProtocolInfo endpointProtocol, + int endpointLocalPort, + int endpointPublicPort, + string endpointName, + string lBSetName, + int probePort, + ProtocolInfo probeProtocol, + string probePath, + int? probeInterval, + int? probeTimeout, + NetworkAclObject aclObj = null, + bool directServerReturn = false, + string internalLoadBalancer= null, + string serviceName = null, + string loadBalancerDistribution = null) + { + this.Initialize( + endpointProtocol, + endpointLocalPort, + endpointPublicPort, + endpointName, + lBSetName, + probePort, + probeProtocol, + probePath, + probeInterval, + probeTimeout, + paramset, + aclObj, + directServerReturn, + internalLoadBalancer, + serviceName, + loadBalancerDistribution); + } + + public AzureEndPointConfigInfo(AzureEndPointConfigInfo other) + { + this.Initialize( + other.EndpointProtocol, + other.EndpointLocalPort, + other.EndpointPublicPort, + other.EndpointName, + other.LBSetName, + other.ProbePort, + other.ProbeProtocol, + other.ProbePath, + other.ProbeInterval, + other.ProbeTimeout, + other.ParamSet, + other.Acl, + other.DirectServerReturn, + other.InternalLoadBalancerName, + other.ServiceName, + other.LoadBalancerDistribution); + } + + private void Initialize( + ProtocolInfo protocol, + int internalPort, + int? externalPort, + string endpointName, + string lBSetName, + int probePort, + ProtocolInfo probeProtocol, + string probePath, + int? probeInterval, + int? probeTimeout, + ParameterSet paramSet, + NetworkAclObject aclObj, + bool directServerReturn, + string internalLoadBalancer, + string serviceName, + string loadBalancerDistribution) + { + this.EndpointLocalPort = internalPort; + this.EndpointProtocol = protocol; + this.EndpointPublicPort = externalPort; + this.EndpointName = endpointName; + this.LBSetName = lBSetName; + this.ProbePort = probePort; + this.ProbeProtocol = probeProtocol; + this.ProbeInterval = probeInterval; + this.ProbeTimeout = probeTimeout; + this.ParamSet = paramSet; + this.Acl = aclObj; + this.DirectServerReturn = directServerReturn; + if (this.ProbeProtocol.ToString().Equals("http")) + this.ProbePath = probePath; + this.InternalLoadBalancerName = internalLoadBalancer; + this.ServiceName = serviceName; + this.LoadBalancerDistribution = loadBalancerDistribution; + } + + public bool CheckInputEndpointContext(InputEndpointContext context) + { + bool ret = false; + + if (ParamSet == ParameterSet.NoLB) + { + ret = (context.Name == this.EndpointName); + } + else + { + ret = (context.LBSetName == this.LBSetName); + } + + ret = ret && context.Protocol == this.EndpointProtocol.ToString() + && context.LocalPort == this.EndpointLocalPort + && context.Port == this.EndpointPublicPort + && context.EnableDirectServerReturn == this.DirectServerReturn; + + if(context.Acl == null) + { + if(this.Acl != null + && this.Acl != new NetworkAclObject()) + { + ret = false; + } + } + else if (this.Acl != null) + { + foreach (var rule in this.Acl) + { + if(!context.Acl.Rules.Contains(rule)) + { + ret = false; + } + } + } + else + { + ret = false; + } + + + if (ParamSet == ParameterSet.CustomProbe) + { + ret = ret && context.LBSetName == this.LBSetName + && context.ProbePort == this.ProbePort + && context.ProbeProtocol == this.ProbeProtocol.ToString(); + + ret = ret && ( this.ProbeInterval.HasValue + ? context.ProbeIntervalInSeconds == this.ProbeInterval + : context.ProbeIntervalInSeconds == 15 ); + + ret = ret && ( this.ProbeTimeout.HasValue + ? context.ProbeTimeoutInSeconds == this.ProbeTimeout + : context.ProbeTimeoutInSeconds == 31 ); + } + + return ret; + } + + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/AzureProvisioningConfigInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/AzureProvisioningConfigInfo.cs new file mode 100644 index 000000000000..9d726b82fe95 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/AzureProvisioningConfigInfo.cs @@ -0,0 +1,159 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Security.Cryptography.X509Certificates; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo +{ + public class AzureProvisioningConfigInfo + { + public string WindowsDomain = "WindowsDomain"; + + public OS OS; + public string Option = null; + + public readonly string Password; + public CertificateSettingList Certs = new CertificateSettingList(); + public string LinuxUser = null; + public string AdminUsername = null; + + public string JoinDomain = null; + public string Domain = null; + public string DomainUserName = null; + public string DomainPassword = null; + public string MachineObjectOU = null; + + public bool Reset = false; + public bool DisableAutomaticUpdate = false; + public bool DisableSSH = false; + + public bool DisableGuestAgent = false; + public bool DisableWinRMHttps = false; + public bool EnableWinRMHttp = false; + public bool NoWinRMEndpoint = false; + public X509Certificate2 WinRMCertificate = null; + public X509Certificate2[] X509Certificates = null; + + public bool NoExportPrivateKey = false; + public bool NoRDPEndpoint = false; + public bool NoSSHEndpoint = false; + public bool NoSSHPassword; + + public LinuxProvisioningConfigurationSet.SSHKeyPairList SSHKeyPairs = null; + public LinuxProvisioningConfigurationSet.SSHPublicKeyList SshPublicKeys = null; + public string TimeZone = null; + + public string CustomDataFile = null; + + // WindowsDomain paramenter set + public AzureProvisioningConfigInfo(string option, string user, string password, string joinDomain, string domain, + string domainUserName, string domainPassword, string objectOU = null,bool disableGuestAgent = false) + { + if (string.Compare(option, WindowsDomain, StringComparison.CurrentCultureIgnoreCase) == 0) + { + this.Option = WindowsDomain; + this.AdminUsername = user; + this.Password = password; + this.Domain = domain; + this.JoinDomain = joinDomain; + this.DomainUserName = domainUserName; + this.DomainPassword = domainPassword; + this.MachineObjectOU = objectOU; + this.DisableGuestAgent = disableGuestAgent; + } + } + + public AzureProvisioningConfigInfo(OS os, string user, string password, bool disableGuestAgent = false) + { + this.OS = os; + this.Password = password; + if (os == OS.Windows) + { + this.AdminUsername = user; + if (disableGuestAgent) this.DisableGuestAgent = true; + } + else + { + this.LinuxUser = user; + } + } + + public AzureProvisioningConfigInfo(OS os, CertificateSettingList certs, string user, string password) + { + this.OS = os; + this.Password = password; + foreach (CertificateSetting cert in certs) + { + Certs.Add(cert); + } + if (os == OS.Windows) + { + this.AdminUsername = user; + } + else + { + this.LinuxUser = user; + } + + } + + public AzureProvisioningConfigInfo(string linuxUser, string password = null, bool noSshEndpoint = false, + bool disableSSH = false, LinuxProvisioningConfigurationSet.SSHKeyPairList sSHKeyPairList = null, + LinuxProvisioningConfigurationSet.SSHPublicKeyList sSHPublicKeyList = null, bool noSSHPassword = false, string CustomDataFile = null) + { + this.OS = OS.Linux; + this.LinuxUser = linuxUser; + this.DisableSSH = disableSSH; + this.NoSSHEndpoint = noSshEndpoint; + if (!string.IsNullOrEmpty(password)) + { + this.Password = password; + } + if (sSHKeyPairList != null) + { + this.SSHKeyPairs = sSHKeyPairList; + } + if (sSHPublicKeyList != null) + { + this.SshPublicKeys = sSHPublicKeyList; + } + if (noSSHPassword) + { + this.NoSSHPassword = noSSHPassword; + } + + this.CustomDataFile = CustomDataFile; + } + + public AzureProvisioningConfigInfo(string adminUsername, string password, X509Certificate2 winRMCertificate) + { + this.OS= OS.Windows; + this.AdminUsername = adminUsername; + this.Password = password; + this.WinRMCertificate = winRMCertificate; + } + + public AzureProvisioningConfigInfo(string adminUsername, string password, string customData) + { + this.OS = OS.Windows; + this.AdminUsername = adminUsername; + this.Password = password; + this.CustomDataFile = customData; + } + + public PersistentVM Vm { get; set; } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/AzureVMConfigInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/AzureVMConfigInfo.cs new file mode 100644 index 000000000000..47959bc5b96c --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/AzureVMConfigInfo.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo +{ + public class AzureVMConfigInfo + { + public string vmName; + public string imageName; + public string vmSize; + + public AzureVMConfigInfo(string vmName, string vmSize, string imageName) + { + this.vmName = vmName; + this.vmSize = vmSize; + this.imageName = imageName; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/DiskCreateOption.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/DiskCreateOption.cs new file mode 100644 index 000000000000..9e5f86925ea6 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/DiskCreateOption.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo +{ + public enum DiskCreateOption + { + CreateNew, + Import, + ImportFrom + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/HostCaching.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/HostCaching.cs new file mode 100644 index 000000000000..74418e8d22b1 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/HostCaching.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo +{ + public enum HostCaching + { + None, + ReadOnly, + ReadWrite + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/InstanceSize.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/InstanceSize.cs new file mode 100644 index 000000000000..34a95b77387b --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/InstanceSize.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo +{ + public enum InstanceSize + { + ExtraSmall, + Small, + Medium, + Large, + ExtraLarge, + A5, + A6, + A7, + A8, + A9 + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/OS.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/OS.cs new file mode 100644 index 000000000000..c326f64ef0c9 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/OS.cs @@ -0,0 +1,22 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo +{ + public enum OS + { + Windows, + Linux + }; +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/PersistentVMConfigInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/PersistentVMConfigInfo.cs new file mode 100644 index 000000000000..6efafdcca641 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/PersistentVMConfigInfo.cs @@ -0,0 +1,32 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo +{ + public class PersistentVMConfigInfo + { + public readonly AzureVMConfigInfo VmConfig; + public readonly AzureProvisioningConfigInfo ProvConfig; + public readonly AddAzureDataDiskConfig DiskConfig; + public readonly AzureEndPointConfigInfo EndPointConfig; + + public PersistentVMConfigInfo(AzureVMConfigInfo vmConfig, AzureProvisioningConfigInfo provConfig, AddAzureDataDiskConfig diskConfig, AzureEndPointConfigInfo endPointConfig) + { + this.VmConfig = vmConfig; + this.ProvConfig = provConfig; + this.DiskConfig = diskConfig; + this.EndPointConfig = endPointConfig; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/ProtocolInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/ProtocolInfo.cs new file mode 100644 index 000000000000..f8ab8dcfdae2 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/ProtocolInfo.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo +{ + public enum ProtocolInfo + { + tcp, + udp, + http + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/RemoveAzureDataDiskConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/RemoveAzureDataDiskConfig.cs new file mode 100644 index 000000000000..eb2807089719 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/RemoveAzureDataDiskConfig.cs @@ -0,0 +1,31 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo +{ + public class RemoveAzureDataDiskConfig + { + + public readonly PersistentVM Vm; + public readonly int lun; + + public RemoveAzureDataDiskConfig(int lun, PersistentVM vm) + { + this.Vm = vm; + this.lun = lun; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/SSHKey.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/SSHKey.cs new file mode 100644 index 000000000000..5ab5deabcb7a --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/SSHKey.cs @@ -0,0 +1,22 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo +{ + public enum NewAzureSshKeyType + { + KeyPair, + PublicKey + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/SetACLConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/SetACLConfig.cs new file mode 100644 index 000000000000..2b875cff1c77 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/SetACLConfig.cs @@ -0,0 +1,25 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo +{ + public enum SetACLConfig + { + AddRule, + SetRule, + RemoveRule + } + +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/SetAzureDataDiskConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/SetAzureDataDiskConfig.cs new file mode 100644 index 000000000000..22f2914245d3 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/SetAzureDataDiskConfig.cs @@ -0,0 +1,33 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo +{ + public class SetAzureDataDiskConfig + { + public readonly HostCaching hostCaching; + + public readonly int lun; + + public SetAzureDataDiskConfig(HostCaching hostCaching, int lun) + { + this.hostCaching = hostCaching; + this.lun = lun; + } + + public PersistentVM Vm { get; set; } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/SetAzureVMSizeConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/SetAzureVMSizeConfig.cs new file mode 100644 index 000000000000..b4138a8b1817 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/SetAzureVMSizeConfig.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo +{ + public class SetAzureVMSizeConfig + { + public readonly string instanceSize; + + public SetAzureVMSizeConfig(string instanceSize) + { + this.instanceSize = instanceSize; + } + + public PersistentVM Vm { get; set; } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/VMPowerState.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/VMPowerState.cs new file mode 100644 index 000000000000..056880209db6 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/VMPowerState.cs @@ -0,0 +1,25 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo +{ + public enum VMPowerState + { + Unknown, + Starting, + Started, + Stopping, + Stopped + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/VMSizeInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/VMSizeInfo.cs new file mode 100644 index 000000000000..615868b0a98c --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ConfigDataInfo/VMSizeInfo.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo +{ + public enum VMSizeInfo + { + ExtraSmall, + Small, + Medium, + Large, + ExtraLarge + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/Constants.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/Constants.cs new file mode 100644 index 000000000000..0b817c426469 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/Constants.cs @@ -0,0 +1,32 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test +{ + public class Category + { + public const string Scenario = "AzureRTScenario"; + public const string BVT = "BVT"; + public const string Functional = "Functional"; + public const string Preview = "Preview"; + public const string Sequential = "Sequential"; + } + + public class LoadBalancerDistribution + { + public const string SourceIP = "sourceIP"; + public const string SourceIPProtorol = "sourceIPProtocol"; + public const string None = "none"; + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/CredentialHelper.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/CredentialHelper.cs new file mode 100644 index 000000000000..df9d65c4deb1 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/CredentialHelper.cs @@ -0,0 +1,260 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Collections.Specialized; +using System.Diagnostics; +using System.IO; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.Properties; +using Microsoft.WindowsAzure.Storage.Auth; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests +{ + public static class CredentialHelper + { + private static string EnvironmentPathFormat = "testcredentials-{0}"; + private static string defaultCredentialFile = "default.publishsettings"; + private static string TestEnvironmentVariable = "AZURE_TEST_ENVIRONMENT"; + private static string StorageAccountVariable = "AZURE_STORAGE_ACCOUNT"; + private static string StorageAccountKeyVariable = "AZURE_STORAGE_ACCESS_KEY"; + private static string DefaultStorageAccountVariable = "AZURERT_DEFAULT_STORAGE_ACCOUNT"; + private static string DefaultLocationVariable = "AZURERT_DEFAULT_LOCATION"; + private static string CredentialBlobUriFormat = "https://{0}.blob.core.windows.net"; + //private static string CredentialImportFormat = "Import-AzurePublishSettingsFile '{0}'"; + + private static string publishSettingsFile = null; + private static string defaultSubscriptionName = null; + private static string location = null; + private static string defaultStorageName = null; + private static string currentTestEnvironment = null; + private static CloudBlobContainer blobContainer; + + private static Dictionary environment = new Dictionary(); + public static Dictionary PowerShellVariables { get; private set; } + + public static void GetCredentialInfo(string downloadDirectoryPath) + { + Process currentProcess = Process.GetCurrentProcess(); + StringDictionary environment = currentProcess.StartInfo.EnvironmentVariables; + Assert.IsTrue(environment.ContainsKey(TestEnvironmentVariable), + string.Format("You must define a test environment using environment variable {0}", TestEnvironmentVariable)); + currentTestEnvironment = environment[TestEnvironmentVariable]; + Assert.IsTrue(environment.ContainsKey(StorageAccountVariable), + string.Format("You must define a storage account for credential download using environment variable {0}", StorageAccountVariable)); + string storageAccount = environment[StorageAccountVariable]; + Assert.IsTrue(environment.ContainsKey(StorageAccountKeyVariable), + string.Format("You must define a storage account key for credential download using environment variable {0}", StorageAccountKeyVariable)); + string storageAccountKey = environment[StorageAccountKeyVariable]; + DownloadTestCredentials(currentTestEnvironment, downloadDirectoryPath, + string.Format(CredentialBlobUriFormat, storageAccount), + storageAccount, storageAccountKey); + + if (environment.ContainsKey(DefaultStorageAccountVariable)) + { + string.Format("Default storage account name define is {0}", DefaultStorageAccountVariable); + defaultStorageName = environment[DefaultStorageAccountVariable]; + } + + if(environment.ContainsKey(DefaultLocationVariable)) + { + string.Format("Default location defindde is {0}", DefaultLocationVariable); + location = environment[DefaultLocationVariable]; + } + + publishSettingsFile = Path.Combine(downloadDirectoryPath, defaultCredentialFile); + Assert.IsTrue(File.Exists(publishSettingsFile), string.Format("Did not download file {0}", publishSettingsFile)); + } + + private static void DownloadTestCredentials(string testEnvironment, string downloadDirectoryPath, string blobUri, string storageAccount, string storageKey) + { + string containerPath = string.Format(EnvironmentPathFormat, testEnvironment); + StorageCredentials credentials = new StorageCredentials(storageAccount, storageKey); + CloudBlobClient blobClient = new CloudBlobClient(new Uri(blobUri), credentials); + blobContainer = blobClient.GetContainerReference(containerPath); + foreach (IListBlobItem blobItem in blobContainer.ListBlobs()) + { + ICloudBlob blob = blobClient.GetBlobReferenceFromServer(blobItem.Uri); + Console.WriteLine("Downloading file {0} from blob Uri {1}", blob.Name, blob.Uri); + FileStream blobStream = new FileStream(Path.Combine(downloadDirectoryPath, blob.Name), FileMode.Create); + blob.DownloadToStream(blobStream); + blobStream.Flush(); + blobStream.Close(); + } + } + + public static void GetTestSettings(string testSettings) + { + switch (testSettings) + { + case "UseDefaults": + default: + CredentialHelper.GetCredentialInfo(Environment.CurrentDirectory); + break; + + case "UseCustom": + if (!string.IsNullOrWhiteSpace(Resource.PublishSettingsFile)) + { + publishSettingsFile = Resource.PublishSettingsFile; + } + else + { + Assert.IsNotNull(CredentialHelper.PublishSettingsFile); + } + + if (!string.IsNullOrWhiteSpace(Resource.DefaultSubscriptionName)) + { + defaultSubscriptionName = Resource.DefaultSubscriptionName; + } + if (!string.IsNullOrWhiteSpace(Resource.Location)) + { + location = Resource.Location; + } + if (!string.IsNullOrWhiteSpace(Resource.DefaultStorageAccountName)) + { + defaultStorageName = Resource.DefaultStorageAccountName; + } + break; + + case "UseDefaultsandOverride": + CredentialHelper.GetCredentialInfo(Environment.CurrentDirectory); + + if (!string.IsNullOrWhiteSpace(Resource.PublishSettingsFile)) + { + CredentialHelper.PublishSettingsFile = Resource.PublishSettingsFile; + } + if (!string.IsNullOrWhiteSpace(Resource.DefaultSubscriptionName)) + { + CredentialHelper.DefaultSubscriptionName = Resource.DefaultSubscriptionName; + } + if (!string.IsNullOrWhiteSpace(Resource.Location)) + { + CredentialHelper.Location = Resource.Location; + } + if (!string.IsNullOrWhiteSpace(Resource.DefaultStorageAccountName)) + { + CredentialHelper.defaultStorageName = Resource.DefaultStorageAccountName; + } + + break; + } + + if (!string.IsNullOrWhiteSpace(Resource.Location)) + { + location = Resource.Location; + } + } + + public static string PublishSettingsFile + { + get + { + return publishSettingsFile; + } + set + { + publishSettingsFile = value; + } + } + + public static string TestEnvironment + { + get + { + return currentTestEnvironment; + } + set + { + currentTestEnvironment = value; + } + } + + public static string DefaultSubscriptionName + { + get + { + return defaultSubscriptionName; + } + set + { + defaultSubscriptionName = value; + } + } + + public static string Location + { + get + { + return location; + } + set + { + location = value; + } + } + + public static string DefaultStorageName + { + get + { + return defaultStorageName; + } + set + { + defaultStorageName = value; + } + } + + public static void CopyTestData(string srcContainer, string srcBlob, string destContainer, string destBlob) + { + ServiceManagementCmdletTestHelper vmPowershellCmdlets = new ServiceManagementCmdletTestHelper(); + Process currentProcess = Process.GetCurrentProcess(); + StringDictionary environment = currentProcess.StartInfo.EnvironmentVariables; + + string storageAccount = environment[CredentialHelper.StorageAccountVariable]; + string storageAccountKey = environment[CredentialHelper.StorageAccountKeyVariable]; + + // Create a container + try + { + vmPowershellCmdlets.RunPSScript("Get-AzureStorageContainer -Name " + destContainer); + } + catch + { + // Create a container. + vmPowershellCmdlets.RunPSScript("New-AzureStorageContainer -Name " + destContainer); + } + + // Make SAS Uri for the source blob. + string srcSasUri = Utilities.GenerateSasUri(CredentialHelper.CredentialBlobUriFormat, storageAccount, storageAccountKey, srcContainer, srcBlob); + + vmPowershellCmdlets.RunPSScript(string.Format("Start-AzureStorageBlobCopy -SrcUri \"{0}\" -DestContainer {1} -DestBlob {2} -Force", srcSasUri, destContainer, destBlob)); + + for (int i = 0; i < 60; i++) + { + var result = vmPowershellCmdlets.CheckCopyBlobStatus(destContainer, destBlob); + if (result.Status.ToString().Equals("Success")) + { + break; + } + else + { + System.Threading.Thread.Sleep(10 * 1000); + } + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ExtensionTests/AzureVMAccessExtensionTests.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ExtensionTests/AzureVMAccessExtensionTests.cs new file mode 100644 index 000000000000..ecc912dfada4 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ExtensionTests/AzureVMAccessExtensionTests.cs @@ -0,0 +1,306 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Threading; +using System.Xml; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; +using Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ExtensionTests +{ + [TestClass] + public class AzureVMAccessExtensionTests: ServiceManagementTest + { + private string serviceName; + private string vmName; + private const string referenceNamePrefix = "Reference"; + private string vmAccessUserName; + private string vmAccessPassword; + private string publicConfiguration; + private string privateConfiguration; + private string publicConfigPath; + private string privateConfigPath; + private string version = "1.0"; + string rdpPath = @".\AzureVM.rdp"; + string dns; + int port; + private string referenceName; + + [ClassInitialize] + public static void Intialize(TestContext context) + { + imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows" }, false); + } + + [TestInitialize] + public void TestIntialize() + { + pass = false; + serviceName = Utilities.GetUniqueShortName(serviceNamePrefix); + vmName = Utilities.GetUniqueShortName(vmNamePrefix); + testStartTime = DateTime.Now; + GetVmAccessConfiguration(); + referenceName = Utilities.GetUniqueShortName(referenceNamePrefix); + } + + [TestCleanup] + public void TestCleanUp() + { + CleanupService(serviceName); + } + + [ClassCleanup] + public static void ClassCleanUp() + { + + } + + #region Test cases + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "IAAS"), Priority(0), Owner("hylee"), Description("Test the cmdlet ((Get,Set)-AzureVMAccessExtension)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\package.csv", "package#csv", DataAccessMethod.Sequential)] + public void CreateVMAccessExtensionTest() + { + try + { + //Deploy a new IaaS VM with Extension using Add-AzureVMExtension + Console.WriteLine("Create a new VM with VM access extension."); + var vm = CreateIaaSVMObject(vmName); + vm = vmPowershellCmdlets.SetAzureVMAccessExtension(vm, vmAccessUserName, vmAccessPassword, version, null,false); + + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, locationName, true); + Console.WriteLine("Created a new VM {0} with VM access extension. Service Name : {1}", vmName, serviceName); + + ValidateVMAccessExtension(vmName, serviceName, true); + + Utilities.GetAzureVMAndWaitForReady(serviceName, vmName, 30000, 300000); + //Verify that the extension actually work + VerifyRDPExtension(vmName, serviceName); + + //Disbale extesnion + DisableExtension(vmName, serviceName); + ValidateVMAccessExtension(vmName, serviceName, false); + pass = true; + + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + } + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "IAAS"), Priority(0), Owner("hylee"), Description("Test the cmdlet ((Get,Set,Remove)-AzureVMAccessExtension)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\package.csv", "package#csv", DataAccessMethod.Sequential)] + public void UpdateVMAccessExtensionTest() + { + try + { + //Deploy a new IaaS VM with Extension using Add-AzureVMExtension + var vm = CreateIaaSVMObject(vmName); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, locationName); + + vm = GetAzureVM(vmName, serviceName); + //Set extension without version + vm = vmPowershellCmdlets.SetAzureVMAccessExtension(vm, vmAccessUserName, vmAccessPassword, null, null, false); + vmPowershellCmdlets.UpdateAzureVM(vmName, serviceName, vm); + + ValidateVMAccessExtension(vmName, serviceName, true); + + vmPowershellCmdlets.RemoveAzureVMAccessExtension(GetAzureVM(vmName, serviceName)); + + pass = true; + + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + } + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "IAAS"), Priority(0), Owner("hylee"), Description("Test the cmdlet ((Get,Set)-AzureVMAccessExtension)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\package.csv", "package#csv", DataAccessMethod.Sequential)] + public void AddRoleVMAccessExtensionTest() + { + try + { + //Create an deployment + var vm1 = CreateIaaSVMObject(vmName); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm1 }, locationName); + + //Add a role with extension enabled. + string vmName2 = Utilities.GetUniqueShortName(vmNamePrefix); + var vm2 = CreateIaaSVMObject(vmName2); + vm2 = vmPowershellCmdlets.SetAzureVMAccessExtension(vm2, vmAccessUserName,vmAccessPassword, version, referenceName,false); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm2 }); + + ValidateVMAccessExtension(vmName2, serviceName, true); + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + } + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "IAAS"), Priority(0), Owner("hylee"), Description("Test the cmdlet ((Get,Set)-AzureVMAccessExtension)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\package.csv", "package#csv", DataAccessMethod.Sequential)] + public void UpdateRoleVMAccessExtensionTest() + { + try + { + //Create an deployment and add 2 roles + var vm1 = CreateIaaSVMObject(vmName); + string vmName2 = Utilities.GetUniqueShortName(vmNamePrefix); + var vm2 = CreateIaaSVMObject(vmName2); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm1, vm2 }, locationName); + + //Set VM Access extension to the VM + var vmroleContext = vmPowershellCmdlets.GetAzureVM(vmName2, serviceName); + vmPowershellCmdlets.SetAzureVMAccessExtension(vm2, vmAccessUserName, vmAccessPassword, version, referenceName, false); + vmPowershellCmdlets.UpdateAzureVM(vmName2, serviceName, vm2); + + var result = vmPowershellCmdlets.GetAzureVM(vmName2, serviceName); + Console.WriteLine("Role Instance Status:{0} of VM {1}", result.InstanceStatus, vmName2); + + ValidateVMAccessExtension(vmName2, serviceName, true); + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + + } + #endregion Test cases + + #region Helper Methods + + private void GetVmAccessConfiguration() + { + privateConfigPath = Path.Combine(Directory.GetCurrentDirectory(), "PrivateConfig.xml"); + publicConfigPath = Path.Combine(Directory.GetCurrentDirectory(), "PublicConfig.xml"); + privateConfiguration = FileUtilities.DataStore.ReadFileAsText(privateConfigPath); + publicConfiguration = FileUtilities.DataStore.ReadFileAsText(publicConfigPath); + + XmlDocument doc = new XmlDocument(); + doc.LoadXml(publicConfiguration); + vmAccessUserName = doc.GetElementsByTagName("UserName")[0].InnerText; + doc.LoadXml(privateConfiguration); + vmAccessPassword = doc.GetElementsByTagName("Password")[0].InnerText; + } + + private PersistentVM CreateIaaSVMObject(string vmName) + { + //Create an IaaS VM with a static CA. + var azureVMConfigInfo = new AzureVMConfigInfo(vmName, InstanceSize.Small.ToString(), imageName); + var azureProvisioningConfig = new AzureProvisioningConfigInfo(ConfigDataInfo.OS.Windows, username, password); + var persistentVMConfigInfo = new PersistentVMConfigInfo(azureVMConfigInfo, azureProvisioningConfig, null, null); + return vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo); + } + + private VirtualMachineAccessExtensionContext GetAzureVMAccessExtesnion(string vmName, string serviceName) + { + Console.WriteLine("Get Azure VM's extension"); + var vmExtension = vmPowershellCmdlets.GetAzureVMAccessExtension(GetAzureVM(vmName, serviceName)); + Utilities.PrintContext(vmExtension[0]); + Console.WriteLine("Azure VM's extension info retrieved successfully."); + return vmExtension[0]; + } + + private void ValidateVMAccessExtension(string vmName, string serviceName, bool enabled) + { + var vmAccessExtension = GetAzureVMAccessExtesnion(vmName,serviceName); + Utilities.PrintContext(vmAccessExtension); + Console.WriteLine("Verifying the enabled extension"); + if (enabled) + { + Assert.AreEqual(vmAccessUserName, vmAccessExtension.UserName, "Incorrect User name"); + Assert.AreEqual("Enable", vmAccessExtension.State, "State is not Enable"); + Assert.IsTrue(vmAccessExtension.Enabled, "Enabled is not true"); + XmlDocument doc = new XmlDocument(); + doc.LoadXml(vmAccessExtension.PublicConfiguration); + Assert.AreEqual(vmAccessUserName, doc.GetElementsByTagName("UserName")[0].InnerText,"Incorrect User name in public configuration"); + } + else + { + Assert.IsTrue(string.IsNullOrEmpty(vmAccessExtension.UserName), "Username is not empty"); + Assert.AreEqual("Disable", vmAccessExtension.State, "State is not Disable"); + Assert.IsFalse(vmAccessExtension.Enabled, "Enabled is not False"); + } + if (vmAccessExtension.Password != null) + { + Assert.IsTrue(string.IsNullOrEmpty(vmAccessExtension.Password.ConvertToUnsecureString()), "Password should be null or empty"); + } + if (vmAccessExtension.PrivateConfiguration != null) + { + Assert.IsTrue(string.IsNullOrEmpty(vmAccessExtension.PrivateConfiguration.ConvertToUnsecureString()), "PrivateConfiguration should be null or empty."); + } + Console.WriteLine("Verifed the enabled extension successfully."); + } + + private PersistentVM GetAzureVM(string vmName, string serviceName) + { + Console.WriteLine("Fetch Azure VM details"); + var vmRoleContext = vmPowershellCmdlets.GetAzureVM(vmName, serviceName); + Console.WriteLine("Azure VM details retreived successfully"); + return vmRoleContext.VM; + } + + private void VerifyRDPExtension(string vmName, string serviceName) + { + Console.WriteLine("Fetching Azure VM RDP file"); + vmPowershellCmdlets.GetAzureRemoteDesktopFile(vmName, serviceName, rdpPath, false); + using (StreamReader stream = new StreamReader(rdpPath)) + { + string firstLine = stream.ReadLine(); + var dnsAndport = Utilities.FindSubstring(firstLine, ':', 2).Split(new char[] { ':' }); + dns = dnsAndport[0]; + port = int.Parse(dnsAndport[1]); + } + Console.WriteLine("Azure VM RDP file downloaded."); + + Console.WriteLine("Waiting to sleep for 4 mins before trying to login VM "); + Thread.Sleep(300000); + ValidateLogin(dns, port, vmAccessUserName, vmAccessPassword); + + } + + private void DisableExtension(string vmName, string serviceName) + { + var vm = GetAzureVM(vmName, serviceName); + Console.WriteLine("Disabling the VM Access extesnion for the vm {0}",vmName); + vm = vmPowershellCmdlets.SetAzureVMAccessExtension(vm,disable:true); + vmPowershellCmdlets.UpdateAzureVM(vmName, serviceName, vm); + Console.WriteLine("Disabled VM Access extesnion for the vm {0}", vmName); + } + + + private void ValidateLogin(string dns, int port, string vmAccessUserName, string vmAccessPassword) + { + Assert.IsTrue((Utilities.RDPtestIaaS(dns, port, vmAccessUserName, vmAccessPassword, true)), "Cannot RDP to the instance!!"); + } + + #endregion Helper Methods + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ExtensionTests/AzureVMBGInfoExtensionTests.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ExtensionTests/AzureVMBGInfoExtensionTests.cs new file mode 100644 index 000000000000..af3f1f474402 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ExtensionTests/AzureVMBGInfoExtensionTests.cs @@ -0,0 +1,303 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Reflection; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ExtensionTests +{ + [TestClass] + public class AzureVMBGInfoExtensionTests:ServiceManagementTest + { + private string serviceName; + private string vmName; + private const string referenceNamePrefix = "Reference"; + private string version; + private string referenceName; + private const string extensionName = "BGInfo"; + private const string DisabledState = "Disable"; + private const string EnableState = "Enable"; + + [ClassInitialize] + public static void Intialize(TestContext context) + { + imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows" }, false); + } + + [TestInitialize] + public void TestIntialize() + { + pass = false; + GetExtesnionInfo(); + serviceName = Utilities.GetUniqueShortName(serviceNamePrefix); + vmName = Utilities.GetUniqueShortName(vmNamePrefix); + testStartTime = DateTime.Now; + } + + + + [TestCleanup] + public void TestCleanUp() + { + CleanupService(serviceName); + } + + + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(0), Owner("hylee"), Description("Test the cmdlet ((Get,Set,Remove)-AzureVMBGInfoExtension)")] + public void GetAzureVMBGInfoExtensionTest() + { + try + { + referenceName = Utilities.GetUniqueShortName(referenceNamePrefix); + //Deploy a new IaaS VM with Extension using Set-AzureVMExtension + Console.WriteLine("Deploying a new vm with BGIinfo extension."); + var vm = CreateIaaSVMObject(vmName); + vm = vmPowershellCmdlets.SetAzureVMBGInfoExtension(vm, version, referenceName, false); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, locationName); + Console.WriteLine("Deployed a vm {0}with BGIinfo extension.", vmName); + + + var extesnion = GetBGInfo(vmName, serviceName); + VerifyExtension(extesnion); + + //Disable the extension + Console.WriteLine("Disable BGIinfo extension and update VM."); + vm = vmPowershellCmdlets.SetAzureVMBGInfoExtension(vm, version, referenceName, true); + vmPowershellCmdlets.UpdateAzureVM(vmName, serviceName, vm); + Console.WriteLine("BGIinfo extension disabled"); + + extesnion = GetBGInfo(vmName, serviceName); + VerifyExtension(extesnion,true); + + var vmRoleContext = vmPowershellCmdlets.GetAzureVM(vmName, serviceName); + vmPowershellCmdlets.RemoveAzureVMBGInfoExtension(vmRoleContext.VM); + + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + } + + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(0), Owner("hylee"), Description("Test the cmdlet ((Get,Set)-AzureVMBGInfoExtension)")] + public void UpdateVMWithBgInfoExtensionTest() + { + try + { + /*Iaas VM with GA enabled will have BGInfo extension enabled by default with reference name "BGInfo" + * So for this test case referenceName will be the default reference name */ + referenceName = extensionName; + Console.WriteLine("Deploying a new vm {0}",vmName); + var vm = CreateIaaSVMObject(vmName); + vm = vmPowershellCmdlets.SetAzureAvailabilitySet("test", vm); + vm = vmPowershellCmdlets.RemoveAzureVMExtension(vm, null, null, null, true); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, locationName); + Console.WriteLine("Deployed vm {0}", vmName); + GetBGInfo(vmName, serviceName, true); + + Console.WriteLine("Set BGInfo extension and update vm {0}." , vmName); + var vmRoleContext = vmPowershellCmdlets.GetAzureVM(vmName, serviceName); + + vm = vmPowershellCmdlets.SetAzureVMBGInfoExtension(vmRoleContext.VM, version, referenceName, false); + vmPowershellCmdlets.UpdateAzureVM(vmName, serviceName, vm); + Console.WriteLine("BGInfo extension set and updated vm {0}.", vmName); + + var extesnion = GetBGInfo(vmName, serviceName); + VerifyExtension(extesnion); + + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + } + + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(0), Owner("hylee"), Description("Test the cmdlet ((Get,Set)-AzureVMBGInfoExtension)")] + public void AddRoleWithBgInfoExtensionTest() + { + try + { + //Deploy a new IaaS VM with Extension using Add-AzureVMExtension + Console.WriteLine("Deploying a new vm {0}", vmName); + var vm1 = CreateIaaSVMObject(vmName); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm1 }, locationName); + + //Add a role with extension config + referenceName = Utilities.GetUniqueShortName(referenceNamePrefix); + string vmName2 = Utilities.GetUniqueShortName(vmNamePrefix); + Console.WriteLine("Deploying a new vm {0} with BGIinfo extension", vmName2); + var vm2 = CreateIaaSVMObject(vmName2); + vm2 = vmPowershellCmdlets.SetAzureVMBGInfoExtension(vm2, version, referenceName, false); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm2 }); + + var extesnion = GetBGInfo(vmName2, serviceName); + VerifyExtension(extesnion); + + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + } + + + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(0), Owner("hylee"), Description("Test the cmdlet ((Get,Set)-AzureVMBGInfoExtension)")] + public void UpdateRoleWithBgInfoExtensionTest() + { + try + { + /*Iaas VM with GA enabled will have BGInfo extension enabled by default with reference name "BGInfo" + * So for this test case referenceName will be the default reference name */ + referenceName = extensionName; + + //Deploy a new IaaS VM with Extension using Add-AzureVMExtension + Console.WriteLine("Deploying a new vm {0}", vmName); + var vm1 = CreateIaaSVMObject(vmName); + + //Add a role with extension config + string vmName2 = Utilities.GetUniqueShortName(vmNamePrefix); + Console.WriteLine("Deploying a new vm {0}", vmName2); + var vm2 = CreateIaaSVMObject(vmName2); + + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm1,vm2 }, locationName); + + Console.WriteLine("Set BGInfo extension and update vm {0}.", vmName2); + var vmRoleContext = vmPowershellCmdlets.GetAzureVM(vmName2, serviceName); + vm2 = vmPowershellCmdlets.SetAzureVMBGInfoExtension(vm2, version, extensionName, false); + vmPowershellCmdlets.UpdateAzureVM(vmName2, serviceName, vm2); + Console.WriteLine("BGInfo extension set and updated vm {0}.", vmName2); + + var extesnion = GetBGInfo(vmName2, serviceName); + VerifyExtension(extesnion); + + vmRoleContext = vmPowershellCmdlets.GetAzureVM(vmName2,serviceName); + vmPowershellCmdlets.RemoveAzureVMBGInfoExtension(vmRoleContext.VM); + + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + } + + [TestMethod(), TestCategory(Category.Sequential),TestProperty("Feature","IAAS"),Priority(0),Owner("hylee"),Description("Verifies that BGInfo extension is applied by default to Azure IaaS VM with GA enabled.")] + public void BGInfoEnabledForNewAzureVMWithGATest() + { + try + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + //Create a new Iaas VM with GA enabled + var vm = Utilities.CreateIaaSVMObject(vmName, InstanceSize.Small, imageName, true, username, password); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, locationName); + var customScriptExtenion = vmPowershellCmdlets.GetAzureVMBGInfoExtension(Utilities.GetAzureVM(vmName, serviceName)); + VerifyExtension(customScriptExtenion); + pass = true; + } + catch (Exception ex) + { + Console.WriteLine(ex.ToString()); + } + } + + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IaaS"), Priority(0), Owner("hylee"), Description("Verifies that BGInfo extension is not applied by default to Azure IaaS VM with GA disabled.")] + public void BGInfoDisabledForNewAzureVMWithoutGATest() + { + try + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + var vm = Utilities.CreateIaaSVMObject(vmName, InstanceSize.Small, imageName, true, username, password,false); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, locationName); + Assert.IsNull(vmPowershellCmdlets.GetAzureVMBGInfoExtension(Utilities.GetAzureVM(vmName, serviceName),"BGInfo extension is applied to a VM with GA disabled.")); + pass = true; + } + catch (Exception ex) + { + Console.WriteLine(ex.ToString()); + } + } + + private PersistentVM CreateIaaSVMObject(string vmName) + { + //Create an IaaS VM with a static CA. + var azureVMConfigInfo = new AzureVMConfigInfo(vmName, InstanceSize.Small.ToString(), imageName); + var azureProvisioningConfig = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var persistentVMConfigInfo = new PersistentVMConfigInfo(azureVMConfigInfo, azureProvisioningConfig, null, null); + return vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo); + } + + private VirtualMachineBGInfoExtensionContext GetBGInfo(string vmName, string serviceName, bool shouldNotExist = false) + { + Console.WriteLine("Get BGIinfo extension info."); + var vmRoleContext = vmPowershellCmdlets.GetAzureVM(vmName, serviceName); + try + { + var extension = vmPowershellCmdlets.GetAzureVMBGInfoExtension(vmRoleContext.VM); + Utilities.PrintCompleteContext(extension); + Console.WriteLine("Fetched BGIinfo extension info successfully."); + return extension; + } + catch (NullReferenceException e) + { + Console.WriteLine("BGInfo Extension is not installed in the VM."); + Console.WriteLine(e); + if (!shouldNotExist) + { + throw; + } + Console.WriteLine("This is expected."); + return null; + } + } + + private void VerifyExtension(VirtualMachineBGInfoExtensionContext extension,bool disable=false) + { + Console.WriteLine("Verifying BGIinfo extension info."); + Assert.AreEqual(version, extension.Version); + Assert.AreEqual(string.IsNullOrEmpty(referenceName) ? extensionName : referenceName, extension.ReferenceName); + if (disable) + { + Assert.AreEqual(DisabledState, extension.State); + } + else + { + Assert.AreEqual(EnableState, extension.State); + } + Console.WriteLine("BGIinfo extension verified successfully."); + } + + + private void GetExtesnionInfo() + { + var extensionInfo = Utilities.GetAzureVMExtenionInfo(extensionName); + if (extensionInfo != null) + { + version = extensionInfo.Version; + } + } + + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ExtensionTests/AzureVMSqlServerExtensionTests.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ExtensionTests/AzureVMSqlServerExtensionTests.cs new file mode 100644 index 000000000000..421b795d6718 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ExtensionTests/AzureVMSqlServerExtensionTests.cs @@ -0,0 +1,269 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Reflection; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ExtensionTests +{ + [TestClass] + public class AzureVMSqlServerExtensionTests:ServiceManagementTest + { + private string serviceName; + private string vmName; + private const string referenceNamePrefix = "Reference"; + private string version; + private string referenceName; + private const string extensionName = "SqlIaaSAgent"; + private const string DisabledState = "Disable"; + private const string EnableState = "Enable"; + + [ClassInitialize] + public static void Intialize(TestContext context) + { + imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows" }, false); + } + + [TestInitialize] + public void TestIntialize() + { + pass = false; + GetExtensionInfo(); + serviceName = Utilities.GetUniqueShortName(serviceNamePrefix); + vmName = Utilities.GetUniqueShortName(vmNamePrefix); + testStartTime = DateTime.Now; + } + + + + [TestCleanup] + public void TestCleanUp() + { + CleanupService(serviceName); + } + + + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(0), Owner("seths"), Description("Test the cmdlet ((Get,Set,Remove)-AzureVMSqlServerExtension)")] + public void GetAzureVMSqlServerExtensionTest() + { + try + { + referenceName = Utilities.GetUniqueShortName(referenceNamePrefix); + + //Deploy a new IaaS VM with Extension using Set-AzureVMSqlServerExtension + Console.WriteLine("Deploying a new vm with Sql Server extension."); + var vm = CreateIaaSVMObject(vmName); + vm = vmPowershellCmdlets.SetAzureVMSqlServerExtension(vm, version, referenceName, false); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, locationName); + Console.WriteLine("Deployed a vm {0}with SQL Server extension.", vmName); + + + var extension = GetSqlServerVMExtension(vmName, serviceName); + VerifySqlServerExtension(extension); + + //Disable the extension + Console.WriteLine("Disable SQL Server extension and update VM."); + vm = vmPowershellCmdlets.SetAzureVMSqlServerExtension(vm, version, referenceName, true); + vmPowershellCmdlets.UpdateAzureVM(vmName, serviceName, vm); + Console.WriteLine("Sql Server extension disabled"); + + extension = GetSqlServerVMExtension(vmName, serviceName); + VerifySqlServerExtension(extension,true); + + var vmRoleContext = vmPowershellCmdlets.GetAzureVM(vmName, serviceName); + vmPowershellCmdlets.RemoveAzureVMSqlServerExtension(vmRoleContext.VM); + + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + } + + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(0), Owner("seths"), Description("Test the cmdlet ((Get,Set)-AzureVMSqlServerExtension)")] + public void UpdateVMWithSqlServerExtensionTest() + { + try + { + referenceName = extensionName; + Console.WriteLine("Deploying a new vm {0}",vmName); + var vm = CreateIaaSVMObject(vmName); + vm = vmPowershellCmdlets.SetAzureAvailabilitySet("test", vm); + vm = vmPowershellCmdlets.RemoveAzureVMExtension(vm, null, null, null, true); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, locationName); + Console.WriteLine("Deployed vm {0}", vmName); + GetSqlServerVMExtension(vmName, serviceName, true); + + Console.WriteLine("Set SqlServer extension and update vm {0}." , vmName); + var vmRoleContext = vmPowershellCmdlets.GetAzureVM(vmName, serviceName); + + vm = vmPowershellCmdlets.SetAzureVMSqlServerExtension(vmRoleContext.VM, version, referenceName, false); + vmPowershellCmdlets.UpdateAzureVM(vmName, serviceName, vm); + Console.WriteLine("SqlServer extension set and updated vm {0}.", vmName); + + var extension = GetSqlServerVMExtension(vmName, serviceName); + VerifySqlServerExtension(extension); + + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + } + + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(0), Owner("seths"), Description("Test the cmdlet ((Get,Set)-AzureVMSqlServerExtension)")] + public void AddRoleWithSqlServerExtensionTest() + { + try + { + //Deploy a new IaaS VM with Extension using Add-AzureVMExtension + Console.WriteLine("Deploying a new vm {0}", vmName); + var vm1 = CreateIaaSVMObject(vmName); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm1 }, locationName); + + //Add a role with extension config + referenceName = Utilities.GetUniqueShortName(referenceNamePrefix); + string vmName2 = Utilities.GetUniqueShortName(vmNamePrefix); + Console.WriteLine("Deploying a new vm {0} with SQL Server extension", vmName2); + var vm2 = CreateIaaSVMObject(vmName2); + vm2 = vmPowershellCmdlets.SetAzureVMSqlServerExtension(vm2, version, referenceName, false); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm2 }); + + var extension = GetSqlServerVMExtension(vmName2, serviceName); + VerifySqlServerExtension(extension); + + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + } + + + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(0), Owner("seths"), Description("Test the cmdlet ((Get,Set)-AzureVMSqlServerExtension)")] + public void UpdateRoleWithSqlServerExtensionTest() + { + try + { + referenceName = extensionName; + + //Deploy a new IaaS VM + Console.WriteLine("Deploying a new vm {0}", vmName); + var vm1 = CreateIaaSVMObject(vmName); + + //Add a role with extension config + string vmName2 = Utilities.GetUniqueShortName(vmNamePrefix); + Console.WriteLine("Deploying a new vm {0}", vmName2); + var vm2 = CreateIaaSVMObject(vmName2); + + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm1,vm2 }, locationName); + + Console.WriteLine("Set SqlServer extension and update vm {0}.", vmName2); + var vmRoleContext = vmPowershellCmdlets.GetAzureVM(vmName2, serviceName); + vm2 = vmPowershellCmdlets.SetAzureVMSqlServerExtension(vm2, version, extensionName, false); + vmPowershellCmdlets.UpdateAzureVM(vmName2, serviceName, vm2); + Console.WriteLine("SqlServer extension set and updated vm {0}.", vmName2); + + var extension = GetSqlServerVMExtension(vmName2, serviceName); + VerifySqlServerExtension(extension); + + vmRoleContext = vmPowershellCmdlets.GetAzureVM(vmName2,serviceName); + vmPowershellCmdlets.RemoveAzureVMSqlServerExtension(vmRoleContext.VM); + + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + } + + private PersistentVM CreateIaaSVMObject(string vmName) + { + defaultAzureSubscription = vmPowershellCmdlets.SetAzureSubscription(defaultAzureSubscription.SubscriptionName, defaultAzureSubscription.SubscriptionId, CredentialHelper.DefaultStorageName); + vmPowershellCmdlets.SelectAzureSubscription(defaultAzureSubscription.SubscriptionName, true); + + + //Create an IaaS VM with a static CA. + var azureVMConfigInfo = new AzureVMConfigInfo(vmName, InstanceSize.Small.ToString(), imageName); + var azureProvisioningConfig = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var persistentVMConfigInfo = new PersistentVMConfigInfo(azureVMConfigInfo, azureProvisioningConfig, null, null); + return vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo); + } + + private VirtualMachineSqlServerExtensionContext GetSqlServerVMExtension(string vmName, + string serviceName, + bool shouldNotExist = false) + { + Console.WriteLine("Get Sql Server extension info."); + var vmRoleContext = vmPowershellCmdlets.GetAzureVM(vmName, serviceName); + try + { + var extension = vmPowershellCmdlets.GetAzureVMSqlServerExtension(vmRoleContext.VM); + Utilities.PrintCompleteContext(extension); + Console.WriteLine("Fetched SqlServer extension info successfully."); + return extension; + } + catch (NullReferenceException e) + { + Console.WriteLine("SqlServer Extension is not installed in the VM."); + Console.WriteLine(e); + if (!shouldNotExist) + { + throw; + } + Console.WriteLine("This is expected."); + return null; + } + } + + private void VerifySqlServerExtension(VirtualMachineSqlServerExtensionContext extension,bool disable=false) + { + Console.WriteLine("Verifying Sql Server extension info."); + Assert.AreEqual(version, extension.Version); + Assert.AreEqual(string.IsNullOrEmpty(referenceName) ? extensionName : referenceName, extension.ReferenceName); + if (disable) + { + Assert.AreEqual(DisabledState, extension.State); + } + else + { + Assert.AreEqual(EnableState, extension.State); + } + Console.WriteLine("Sql Server extension verified successfully."); + } + + + private void GetExtensionInfo() + { + var extensionInfo = Utilities.GetAzureVMExtenionInfo(extensionName); + if (extensionInfo != null) + { + version = extensionInfo.Version; + } + } + + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ExtensionTests/CustomScriptExtensionTests.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ExtensionTests/CustomScriptExtensionTests.cs new file mode 100644 index 000000000000..0ea9e6f6e03b --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ExtensionTests/CustomScriptExtensionTests.cs @@ -0,0 +1,322 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text.RegularExpressions; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; +using Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.Extesnions.CustomScript; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ExtensionTests +{ + [TestClass] + public class CustomScriptExtesnionTests: ServiceManagementTest + { + string serviceName; + string vmName; + string containerName = "scripts"; + private string referenceName; + private const string ConstCustomScriptExtensionPublisher = "Microsoft.Compute"; + private const string ConstCustomScriptExtensionName = "CustomScriptExtension"; + private VirtualMachineExtensionImageContext customScriptExtension; + private string[] fileURI; + private string runFileName = "test2.ps2"; + private string[] fileNames = {"test1.ps1","test2.ps1"}; + private string endpointSuffix = ""; + //private VirtualMachineCustomScriptExtensionContext inputParameters; + + [TestInitialize] + public void TestIntialization() + { + Utilities.PrintHeader("Test Initialize"); + testStartTime = DateTime.Now; + pass = false; + serviceName = Utilities.GetUniqueShortName(serviceNamePrefix); + referenceName = Utilities.GetUniqueShortName("ref"); + GetCustomScriptExtensionVersion(); + fileURI = GetSharedAccessSignatures(fileNames); + runFileName = fileNames[new Random(0).Next(fileNames.Length - 1)]; + Utilities.PrintFooter("Test Initialize"); + } + + /// + /// Deploys a new Azure VM with Custom Script extension and verifies that the script is applied and run as expected + /// + #region TestCases + [TestMethod(), Priority(0), TestCategory(Category.Scenario), TestProperty("Feature", "IaaS"), Owner("hylee"), + Description("Test the cmdlets (New-AzureVM,New-AzureVMConfig,Set/Get/Remove-AzureVMCustomScriptExtension)")] + public void NewAzureVMwithCustomScriptExtesnionTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + try + { + vmName = Utilities.GetUniqueShortName(vmNamePrefix); + var vm = CreateIaaSVMWithCustomScriptExtesnion(SetAzureVMCustomScriptExtensionCmdletParmaterSetType.SetCustomScriptExtensionByContainerBlobsParamSetNameWithOutDefaultParameters, + vmName, InstanceSize.Small, imageName, true, username, password); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, locationName); + VerifyCustomScriptExtensionContext(SetAzureVMCustomScriptExtensionCmdletParmaterSetType.SetCustomScriptExtensionByContainerBlobsParamSetNameWithOutDefaultParameters); + vm = SetCustomScripExtesnionToVM(SetAzureVMCustomScriptExtensionCmdletParmaterSetType.DisableCustomScriptExtensionParamSetNameWithOutDefaultParameters, Utilities.GetAzureVM(vmName, serviceName)); + vmPowershellCmdlets.UpdateAzureVM(vmName, serviceName, vm); + VerifyCustomScriptExtensionContext(SetAzureVMCustomScriptExtensionCmdletParmaterSetType.DisableCustomScriptExtensionParamSetNameWithOutDefaultParameters); + pass = true; + } + catch (Exception ex) + { + Console.WriteLine(ex.ToString()); + throw; + } + } + + [TestMethod(), Priority(0), TestCategory(Category.Scenario), TestProperty("Feature", "IaaS"), Owner("hylee"), + Description("Test the cmdlets (New-AzureVM,New-AzureVMConfig,Set/Get/Remove-AzureVMCustomScriptExtension)")] + public void NewAzureVMwithCustomScriptExtesnionUsingFileURiTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + try + { + vmName = Utilities.GetUniqueShortName(vmNamePrefix); + var vm = CreateIaaSVMWithCustomScriptExtesnion(SetAzureVMCustomScriptExtensionCmdletParmaterSetType.SetCustomScriptExtensionByUrisParamSetName, + vmName, InstanceSize.Small, imageName, true, username, password); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, locationName); + VerifyCustomScriptExtensionContext(SetAzureVMCustomScriptExtensionCmdletParmaterSetType.SetCustomScriptExtensionByUrisParamSetName); + pass = true; + } + catch (Exception ex) + { + Console.WriteLine(ex.ToString()); + throw; + } + } + + + [TestMethod(), Priority(0), TestCategory(Category.Scenario), TestProperty("Feature", "IaaS"), Owner("hylee"), + Description("Test the cmdlets (New-AzureVM,New-AzureVMConfig,Set/Get/Remove-AzureVMCustomScriptExtension)")] + public void SetCustomScriptExtesnionToExistingVMTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + try + { + vmName = Utilities.GetUniqueShortName(vmNamePrefix); + var vm = Utilities.CreateIaaSVMObject(vmName, InstanceSize.Small, imageName, true, username, password); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, locationName); + vm = Utilities.GetAzureVM(vmName, serviceName); + vm = SetCustomScripExtesnionToVM(SetAzureVMCustomScriptExtensionCmdletParmaterSetType.SetCustomScriptExtensionByContainerBlobsParamSetName, vm); + vmPowershellCmdlets.UpdateAzureVM(vmName, serviceName, vm); + vm = Utilities.GetAzureVM(vmName, serviceName); + VerifyCustomScriptExtensionContext(SetAzureVMCustomScriptExtensionCmdletParmaterSetType.SetCustomScriptExtensionByContainerBlobsParamSetName); + vm = SetCustomScripExtesnionToVM(SetAzureVMCustomScriptExtensionCmdletParmaterSetType.DisableCustomScriptExtensionParamSetName, vm); + vmPowershellCmdlets.UpdateAzureVM(vmName, serviceName, vm); + VerifyCustomScriptExtensionContext(SetAzureVMCustomScriptExtensionCmdletParmaterSetType.DisableCustomScriptExtensionParamSetName); + pass = true; + } + catch (Exception ex) + { + Console.WriteLine(ex.ToString()); + throw; + } + } + + [TestMethod(), Priority(0), TestCategory(Category.Scenario), TestProperty("Feature", "IaaS"), Owner("hylee"), + Description("Test the cmdlets (New-AzureVM,New-AzureVMConfig,Set/Get/Remove-AzureVMCustomScriptExtension)")] + public void SetCustomScriptExtesnionUsingFileURIToExistingVMTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + try + { + vmName = Utilities.GetUniqueShortName(vmNamePrefix); + var vm = Utilities.CreateIaaSVMObject(vmName, InstanceSize.Small,imageName, true, username, password); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, locationName); + vm = Utilities.GetAzureVM(vmName, serviceName); + vm = SetCustomScripExtesnionToVM(SetAzureVMCustomScriptExtensionCmdletParmaterSetType.SetCustomScriptExtensionByUrisParamSetNameWithOutDefaultParameters, vm); + vmPowershellCmdlets.UpdateAzureVM(vmName, serviceName, vm); + vm = Utilities.GetAzureVM(vmName, serviceName); + VerifyCustomScriptExtensionContext(SetAzureVMCustomScriptExtensionCmdletParmaterSetType.SetCustomScriptExtensionByUrisParamSetNameWithOutDefaultParameters); + vmPowershellCmdlets.RemoveAzureVMCustomScriptExtension(vm); + pass = true; + } + catch (Exception ex) + { + Console.WriteLine(ex.ToString()); + throw; + } + } + + + [TestMethod(), Priority(0), TestCategory(Category.Scenario), TestProperty("Feature", "IaaS"), Owner("hylee"), + Description("Test the cmdlets (New-AzureVM,New-AzureVMConfig,Set/Get/Remove-AzureVMCustomScriptExtension)")] + public void NewAzureVMWithEmptyCustomScriptConfigurationTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + try + { + vmName = Utilities.GetUniqueShortName(vmNamePrefix); + var vm = Utilities.CreateIaaSVMObject(vmName, InstanceSize.Small, imageName, true, username, password); + vm = vmPowershellCmdlets.SetAzureVMExtension(vm, customScriptExtension.ExtensionName, customScriptExtension.Publisher, customScriptExtension.Version); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, locationName); + + var vmExtension = vmPowershellCmdlets.GetAzureVMCustomScriptExtension(Utilities.GetAzureVM(vmName, serviceName)); + Assert.IsTrue(string.IsNullOrEmpty(vmExtension.PublicConfiguration)); + Assert.IsNull(vmExtension.PrivateConfiguration); + Assert.AreEqual(customScriptExtension.ExtensionName, vmExtension.ExtensionName); + Assert.IsTrue(customScriptExtension.Publisher.Equals(vmExtension.Publisher)); + Assert.IsTrue(vmExtension.State.Equals("Enable")); + pass = true; + } + catch (Exception ex) + { + Console.WriteLine(ex.ToString()); + throw; + } + } + + #endregion TestCases + + #region Helper Methods + + private void GetCustomScriptExtensionVersion() + { + Utilities.PrintHeader("Listing the available VM extensions"); + var extensionsInfo = vmPowershellCmdlets.GetAzureVMAvailableExtension(ConstCustomScriptExtensionName, ConstCustomScriptExtensionPublisher, true); + customScriptExtension = extensionsInfo.OrderBy(c => c.Version).LastOrDefault(); + + Match m = Regex.Match(customScriptExtension.Version, @"((\.).*?){2}"); + if (m.Success) + { + customScriptExtension.Version = customScriptExtension.Version.Substring(0, m.Groups[2].Captures[1].Index); + } + + Console.WriteLine("Using CustomScript Extension Version: {0}", customScriptExtension.Version); + Utilities.PrintFooter("Listing the available VM extensions"); + } + + private PersistentVM CreateIaaSVMWithCustomScriptExtesnion(SetAzureVMCustomScriptExtensionCmdletParmaterSetType scriptParameterSet, string vmName, InstanceSize size, string imageName, bool isWindows, string username, string password) + { + Utilities.PrintHeader("Creating a new IaaS VM config with custom script extension."); + PersistentVM vm = Utilities.CreateIaaSVMObject(vmName, InstanceSize.Small, imageName, isWindows, username, password); + vm = SetCustomScripExtesnionToVM(scriptParameterSet, vm); + Utilities.PrintFooter("Creating a new IaaS VM config with custom script extension"); + return vm; + } + + private PersistentVM SetCustomScripExtesnionToVM(SetAzureVMCustomScriptExtensionCmdletParmaterSetType type, PersistentVM vm) + { + switch (type) + { + case SetAzureVMCustomScriptExtensionCmdletParmaterSetType.SetCustomScriptExtensionByUrisParamSetName: + Console.WriteLine("Calling Set-AzureVMCustomScriptExtension cmdlet using SetCustomScriptExtensionByUrisParamSetName parameter set including all parameters."); + return vmPowershellCmdlets.SetAzureVMCustomScriptExtension(vm, fileURI, true, runFileName, referenceName, customScriptExtension.Version); + case SetAzureVMCustomScriptExtensionCmdletParmaterSetType.SetCustomScriptExtensionByUrisParamSetNameWithOutDefaultParameters: + Console.WriteLine("Calling Set-AzureVMCustomScriptExtension cmdlet using SetCustomScriptExtensionByUrisParamSetName parameter set without optional parameters"); + return vmPowershellCmdlets.SetAzureVMCustomScriptExtension(vm, fileURI,true,runFileName); + case SetAzureVMCustomScriptExtensionCmdletParmaterSetType.DisableCustomScriptExtensionParamSetName: + Console.WriteLine("Calling Set-AzureVMCustomScriptExtension cmdlet using DisableCustomScriptExtensionParamSetName parameter set including all parameters."); + return vmPowershellCmdlets.SetAzureVMCustomScriptExtension(vm, true, referenceName, customScriptExtension.Version); + case SetAzureVMCustomScriptExtensionCmdletParmaterSetType.DisableCustomScriptExtensionParamSetNameWithOutDefaultParameters: + Console.WriteLine("Calling Set-AzureVMCustomScriptExtension cmdlet using DisableCustomScriptExtensionParamSetName parameter set without optional parameters"); + return vmPowershellCmdlets.SetAzureVMCustomScriptExtension(vm,true); + case SetAzureVMCustomScriptExtensionCmdletParmaterSetType.SetCustomScriptExtensionByContainerBlobsParamSetName: + Console.WriteLine("Calling Set-AzureVMCustomScriptExtension cmdlet using SetCustomScriptExtensionByContainerBlobsParamSetName parameter set including all parameters."); + return vmPowershellCmdlets.SetAzureVMCustomScriptExtension(vm,fileNames, runFileName, storageAccountKey.StorageAccountName, endpointSuffix, containerName, storageAccountKey.Primary, referenceName, customScriptExtension.Version); + case SetAzureVMCustomScriptExtensionCmdletParmaterSetType.SetCustomScriptExtensionByContainerBlobsParamSetNameWithOutDefaultParameters: + Console.WriteLine("Calling Set-AzureVMCustomScriptExtension cmdlet using SetCustomScriptExtensionByContainerBlobsParamSetName parameter set without optional parameters"); + return vmPowershellCmdlets.SetAzureVMCustomScriptExtension(vm,fileNames, runFileName,containerName: containerName); + default: + break; + } + + return vm; + } + + /// + /// Get shared access for the scrip files in storage + /// + /// + /// + private string[] GetSharedAccessSignatures(string[] fileNames) + { + List sasUriList = new List(); + foreach(var file in fileNames) + { + sasUriList.Add(Utilities.GetSASUri(blobUrlRoot, storageAccountKey.StorageAccountName, + storageAccountKey.Primary, containerName, file, new TimeSpan(2,0,0), SharedAccessBlobPermissions.Read)); + } + return sasUriList.ToArray(); + } + + + + private void VerifyCustomScriptExtensionContext(SetAzureVMCustomScriptExtensionCmdletParmaterSetType type) + { + Utilities.PrintHeader("Verifiying Custom Script extesnion config."); + var customScriptExtensionContext = vmPowershellCmdlets.GetAzureVMCustomScriptExtension(Utilities.GetAzureVM(vmName, serviceName)); + Utilities.PrintContext(customScriptExtensionContext); + Utilities.LogAssert(() => Assert.AreEqual(customScriptExtensionContext.ExtensionName, customScriptExtension.ExtensionName), "Verifiying ExtensionName"); + Utilities.LogAssert(() => Assert.AreEqual(customScriptExtensionContext.RoleName, vmName), "Verifiying RoleName"); ; + Utilities.LogAssert(() => Assert.IsTrue(customScriptExtensionContext.PrivateConfiguration == null || + string.IsNullOrEmpty(customScriptExtensionContext.PrivateConfiguration.ConvertToUnsecureString())), "Verifiying PrivateConfiguration"); ; + Utilities.LogAssert(() => Assert.IsFalse(string.IsNullOrEmpty(customScriptExtensionContext.PublicConfiguration)), "Verifiying ExtensionName"); ; + Utilities.LogAssert(() => Assert.AreEqual(customScriptExtensionContext.Publisher, customScriptExtension.Publisher), "Verifiying PublisherName"); ; + if(type != SetAzureVMCustomScriptExtensionCmdletParmaterSetType.DisableCustomScriptExtensionParamSetName + && type != SetAzureVMCustomScriptExtensionCmdletParmaterSetType.SetCustomScriptExtensionByContainerBlobsParamSetName + && type != SetAzureVMCustomScriptExtensionCmdletParmaterSetType.SetCustomScriptExtensionByUrisParamSetName) + { + Utilities.LogAssert(() => Assert.AreEqual(customScriptExtensionContext.ReferenceName, "CustomScriptExtension"), "Verifiying ReferenceName"); + } + else + { + Utilities.LogAssert(() => Assert.AreEqual(customScriptExtensionContext.ReferenceName, referenceName), "Verifiying ReferenceName"); + } + + if (type == SetAzureVMCustomScriptExtensionCmdletParmaterSetType.DisableCustomScriptExtensionParamSetName + || type == SetAzureVMCustomScriptExtensionCmdletParmaterSetType.DisableCustomScriptExtensionParamSetNameWithOutDefaultParameters) + { + Utilities.LogAssert(() => Assert.AreEqual(customScriptExtensionContext.State, "Disable"), "Verifiying State"); + } + else + { + Utilities.LogAssert(() => Assert.AreEqual(customScriptExtensionContext.State, "Enable"), "Verifiying State"); + } + + if (type != SetAzureVMCustomScriptExtensionCmdletParmaterSetType.DisableCustomScriptExtensionParamSetName + && type != SetAzureVMCustomScriptExtensionCmdletParmaterSetType.DisableCustomScriptExtensionParamSetNameWithOutDefaultParameters) + { + Utilities.LogAssert(() => Assert.IsTrue(customScriptExtensionContext.Uri != null), "Verifiying Uri"); + Utilities.LogAssert(() => Assert.IsTrue(customScriptExtensionContext.CommandToExecute.Contains(runFileName)), "Verifiying CommandToExecute"); + + } + else + { + Utilities.LogAssert(() => Assert.IsTrue(customScriptExtensionContext.Uri == null), "Verifiying Uri"); + //Utilities.LogAssert(() => Assert.IsTrue(string.IsNullOrEmpty(customScriptExtensionContext.CommandToExecute)), "Verifiying CommandToExecute"); + } + Utilities.PrintFooter("Verifiying Custom Script extesnion config."); + } + + #endregion Helper Methods + + [TestCleanup] + public void TestCleanUp() + { + Utilities.ExecuteAndLog(() => CleanupService(serviceName), "Check if service exists and cleanup"); + } + } +} + diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ExtensionTests/DscExtensionTests.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ExtensionTests/DscExtensionTests.cs new file mode 100644 index 000000000000..da9784675a7d --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ExtensionTests/DscExtensionTests.cs @@ -0,0 +1,294 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text.RegularExpressions; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ExtensionTests +{ + [TestClass] + public class DscExtensionTests: ServiceManagementTest + { + private const string DscExtensionPublisher = "Microsoft.Powershell.DSC"; + private const string DscExtensionName = "DSC"; + + private const string DefaultContainerName = "windows-powershell-dsc"; + + private const string testConfigurationArchive = "DscExtensionTestConfiguration.ps1"; + private const string testConfigurationName = "DscExtensionTestConfiguration"; + private Hashtable testConfigurationArgument = new Hashtable() { { "DestinationPath", @"'C:\MyDirectory" } }; + private const string testConfigurationDataPath = @".\DSC\DscExtensionTestConfigurationData.psd1"; + + private string testServiceName; + + private static string dscExtensionVersion; + + [ClassInitialize] + public static void ClassInitialize(TestContext context) + { + Utilities.PrintHeader("ClassInitialize"); + try + { + DscExtensionTests.dscExtensionVersion = GetDscExtensionVersion(); + } + finally + { + Utilities.PrintFooter("ClassInitialize"); + } + } + + [TestInitialize] + public void TestInitialize() + { + Utilities.PrintHeader("TestInitialize"); + try + { + this.testServiceName = Utilities.GetUniqueShortName(serviceNamePrefix); + this.testStartTime = DateTime.Now; + this.pass = false; + } + finally + { + Utilities.PrintFooter("TestInitialize"); + } + } + + [TestCleanup] + public void TestCleanup() + { + Utilities.PrintHeader("TestCleanup"); + try + { + Utilities.ExecuteAndLog(() => CleanupService(this.testServiceName), "Removing VM service used by tests"); + } + finally + { + Utilities.PrintFooter("TestCleanup"); + } + } + + #region TestCases + + [TestMethod(), Priority(0), TestCategory("Scenario"), TestProperty("Feature", "IaaS"), Owner("narrieta"), + Description("Test the cmdlets Set/Get-AzureVMDscExtension using a new VM")] + public void SetDscExtensionOnNewVmTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + var vmName = Utilities.GetUniqueShortName(vmNamePrefix); + + var vm = Utilities.CreateIaaSVMObject(vmName, InstanceSize.Small, imageName, true, username, password); + + var arguments = new ServiceManagementCmdletTestHelper.SetAzureVMDscExtensionArguments() + { + Version = DscExtensionTests.dscExtensionVersion, + VM = vm, + ConfigurationArchive = testConfigurationArchive, + StorageContext = null, + ContainerName = DefaultContainerName, + ConfigurationName = testConfigurationName, + ConfigurationArgument = testConfigurationArgument, + ConfigurationDataPath = testConfigurationDataPath + }; + + vm = vmPowershellCmdlets.SetAzureVMDscExtension(arguments); + + vmPowershellCmdlets.NewAzureVM(this.testServiceName, new[] { vm }, locationName); + + VerifyDscExtensionContext(vmName, arguments); + + pass = true; + } + catch (Exception ex) + { + Console.WriteLine(ex.ToString()); + throw; + } + } + + [TestMethod(), Priority(0), TestCategory("Scenario"), TestProperty("Feature", "IaaS"), Owner("narrieta"), + Description("Test the cmdlets Set/Get-AzureVMDscExtension using an existing")] + public void SetDscExtensionOnExistingVmTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + var vmName = Utilities.GetUniqueShortName(vmNamePrefix); + + var vm = Utilities.CreateIaaSVMObject(vmName, InstanceSize.Small, imageName, true, username, password); + + vmPowershellCmdlets.NewAzureVM(this.testServiceName, new[] { vm }, locationName); + + var arguments = new ServiceManagementCmdletTestHelper.SetAzureVMDscExtensionArguments() + { + Version = DscExtensionTests.dscExtensionVersion, + VM = vmPowershellCmdlets.GetAzureVM(vmName, this.testServiceName).VM, + ConfigurationArchive = testConfigurationArchive, + StorageContext = null, + ContainerName = DefaultContainerName, + ConfigurationName = testConfigurationName, + ConfigurationArgument = testConfigurationArgument, + ConfigurationDataPath = testConfigurationDataPath + }; + + vm = vmPowershellCmdlets.SetAzureVMDscExtension(arguments); + + vmPowershellCmdlets.UpdateAzureVM(vmName, this.testServiceName, vm); + + VerifyDscExtensionContext(vmName, arguments); + + pass = true; + } + catch (Exception ex) + { + Console.WriteLine(ex.ToString()); + throw; + } + } + + [TestMethod(), Priority(0), TestCategory("Scenario"), TestProperty("Feature", "IaaS"), Owner("narrieta"), + Description("Test the cmdlets Set-AzureVMDscExtension using default parameters")] + public void SetDscExtensionWithDefaultParametersTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + var vmName = Utilities.GetUniqueShortName(vmNamePrefix); + + var vm = Utilities.CreateIaaSVMObject(vmName, InstanceSize.Small, imageName, true, username, password); + + var arguments = new ServiceManagementCmdletTestHelper.SetAzureVMDscExtensionArguments() + { + Version = DscExtensionTests.dscExtensionVersion, + VM = vm, + ConfigurationArchive = testConfigurationArchive, + StorageContext = null, + ContainerName = null, + ConfigurationName = null, + ConfigurationArgument = testConfigurationArgument, + ConfigurationDataPath = testConfigurationDataPath + }; + + vm = vmPowershellCmdlets.SetAzureVMDscExtension(arguments); + + vmPowershellCmdlets.NewAzureVM(this.testServiceName, new[] { vm }, locationName); + + VerifyDscExtensionContext(vmName, arguments); + + pass = true; + } + catch (Exception ex) + { + Console.WriteLine(ex.ToString()); + throw; + } + } + + #endregion TestCases + + #region Helper Methods + + private static string GetDscExtensionVersion() + { + Utilities.PrintHeader("Listing the available VM extensions"); + + try + { + var extensionsInfo = vmPowershellCmdlets.GetAzureVMAvailableExtension(DscExtensionName, DscExtensionPublisher, true); + + var dscExtension = extensionsInfo.OrderBy(c => c.Version).LastOrDefault(); + + if (dscExtension == null) + { + throw new Exception(string.Format("Cannot find DSC extension; Name: '{0}' Publisher: '{1}'", DscExtensionName, DscExtensionPublisher)); + } + + var match = Regex.Match(dscExtension.Version, @"((\.).*?){2}"); + + var version = dscExtension.Version.Substring(0, match.Groups[2].Captures[1].Index); + + Console.WriteLine("Using Dsc Extension Version: {0}", version); + + return version; + } + finally + { + Utilities.PrintFooter("Listing the available VM extensions"); + } + } + + private void VerifyDscExtensionContext(string vmName, ServiceManagementCmdletTestHelper.SetAzureVMDscExtensionArguments expected) + { + Utilities.PrintHeader("Verifiying Dsc extension context."); + + try + { + var vm = Utilities.GetAzureVM(vmName, this.testServiceName); + + var context = vmPowershellCmdlets.GetAzureVMDscExtension(vm); + + Utilities.LogAssert(() => Assert.AreEqual(DscExtensionName, context.ExtensionName), "Verifiying ExtensionName"); + Utilities.LogAssert(() => Assert.AreEqual(DscExtensionPublisher, context.Publisher), "Verifiying Publisher"); + Utilities.LogAssert(() => Assert.AreEqual(DscExtensionName, context.ReferenceName), "Verifiying ReferenceName"); + Utilities.LogAssert(() => Assert.AreEqual(dscExtensionVersion, context.Version), "Verifiying Version"); + Utilities.LogAssert(() => Assert.AreEqual("Enable", context.State), "Verifiying State"); + Utilities.LogAssert(() => Assert.AreEqual(vmName, context.RoleName), "Verifiying RoleName"); + + var expectedContainer = (expected.ContainerName ?? DefaultContainerName) + "/"; + Utilities.LogAssert(() => Assert.IsNotNull(context.ModulesUrl), "Verifiying ModulesUrl is not null"); + var modulesUrl = new Uri(context.ModulesUrl); + Utilities.LogAssert(() => Assert.AreEqual(3, modulesUrl.Segments.Length), "Verifiying ModulesUrl is well formed"); + Utilities.LogAssert(() => Assert.AreEqual(expectedContainer, modulesUrl.Segments[1]), "Verifiying the container in ModulesUrl"); + Utilities.LogAssert(() => Assert.AreEqual(expected.ConfigurationArchive, modulesUrl.Segments[2]), "Verifiying the configuration in ModulesUrl"); + + var expectedConfigurationName = expected.ConfigurationName ?? Path.GetFileNameWithoutExtension(expected.ConfigurationArchive); + var expectedConfigurationFunction = Path.GetFileNameWithoutExtension(expected.ConfigurationArchive) + "\\" + expectedConfigurationName; + Utilities.LogAssert(() => Assert.AreEqual(expectedConfigurationFunction, context.ConfigurationFunction), "Verifiying the configuration in ModulesUrl"); + + if (expected.ConfigurationArgument == null) + { + Utilities.LogAssert(() => Assert.IsNull(context.Properties), "Verifiying that Properties is null"); + } + else + { + Utilities.LogAssert(() => Assert.AreEqual(expected.ConfigurationArgument.Count, context.Properties.Count), "Verifiying number of items in Properties"); + + foreach (var key in expected.ConfigurationArgument.Keys) + { + var k = key; + + Utilities.LogAssert(() => Assert.AreEqual(expected.ConfigurationArgument[k], context.Properties[k]), "Verifiying Properties[" + key + "]"); + } + } + } + finally + { + Utilities.PrintHeader("Verifiying Dsc extension context."); + } + } + + #endregion Helper Methods + } +} + diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ExtensionTests/MicrosoftAntimalware/AntimalwareConfig.xml b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ExtensionTests/MicrosoftAntimalware/AntimalwareConfig.xml new file mode 100644 index 000000000000..6356fb62c34e --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ExtensionTests/MicrosoftAntimalware/AntimalwareConfig.xml @@ -0,0 +1,22 @@ + + + + true + true + + + + .tst + + + t: + + + test.exe + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ExtensionTests/MicrosoftAntimalware/AzureVMMicrosoftAntimalwareExtensionFunctionalTests.ps1 b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ExtensionTests/MicrosoftAntimalware/AzureVMMicrosoftAntimalwareExtensionFunctionalTests.ps1 new file mode 100644 index 000000000000..1f3cd2b614ce --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ExtensionTests/MicrosoftAntimalware/AzureVMMicrosoftAntimalwareExtensionFunctionalTests.ps1 @@ -0,0 +1,137 @@ +# preview of scenario tests for (Get/Set)-AzureVMMicrosoftAntimalwareExtension +# next action is to automate as unit tests in the test project + +$service_name = "" +$storage_account_name = "" +$path_to_xml_config = "" + +Import-Module 'C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement\Azure\Azure.psd1' + +#help - should see get/remove/set +help *vm*antimalware* +get-help Get-AzureVMMicrosoftAntimalwareExtension -full +get-help Set-AzureVMMicrosoftAntimalwareExtension -full +get-help Remove-AzureVMMicrosoftAntimalwareExtension -full + +#Enable antimalware using a ConfigFile parameter (do not enable event monitoring) +(Get-AzureVM -ServiceName $service_name -Name $service_name) | Set-AzureVMMicrosoftAntimalwareExtension -AntimalwareConfigFile $path_to_xml_config | Update-AzureVM + +#Get Microsoft Antimalware Extension configuration information and review +(Get-AzureVM -ServiceName $service_name -Name $service_name) | Get-AzureVMMicrosoftAntimalwareExtension + +#Enable antimalware using a ConfigFile parameter and enable monitoring via parameters +$path_to_xml_config = "C:\test\AntimalwareConfig.xml" +$storage_context = New-AzureStorageContext -StorageAccountName $storage_account_name -StorageAccountKey (Get-AzureStorageKey $storage_account_name).Primary +(Get-AzureVM -ServiceName $service_name -Name $service_name) | Set-AzureVMMicrosoftAntimalwareExtension -AntimalwareConfigFile $path_to_xml_config -Monitoring ON -StorageContext $storage_context | Update-AzureVM + +#Get Microsoft Antimalware Extension configuration information and review +(Get-AzureVM -ServiceName $service_name -Name $service_name) | Get-AzureVMMicrosoftAntimalwareExtension + +#Set monitoring OFF via parameter +$path_to_xml_config = "C:\test\AntimalwareConfig.xml" +$storage_context = New-AzureStorageContext -StorageAccountName $storage_account_name -StorageAccountKey (Get-AzureStorageKey $storage_account_name).Primary +(Get-AzureVM -ServiceName $service_name -Name $service_name) | Set-AzureVMMicrosoftAntimalwareExtension -AntimalwareConfigFile $path_to_xml_config -Monitoring OFF -StorageContext $storage_context | Update-AzureVM + +#Get Microsoft Antimalware Extension configuration information and review +(Get-AzureVM -ServiceName $service_name -Name $service_name) | Get-AzureVMMicrosoftAntimalwareExtension + +#Enable antimalware using XmlDocument parameter +$path_to_xml_config = "C:\test\AntimalwareConfig.xml" +[System.Xml.XmlDocument] $xml_config = new-object System.Xml.XmlDocument +$xml_config.load($path_to_xml_config) +(Get-AzureVM -ServiceName $service_name -Name $service_name) | Set-AzureVMMicrosoftAntimalwareExtension -AntimalwareConfiguration $xml_config | Update-AzureVM + +#Get Microsoft Antimalware Extension configuration information and review +(Get-AzureVM -ServiceName $service_name -Name $service_name) | Get-AzureVMMicrosoftAntimalwareExtension + +#Disable the extension +(Get-AzureVM -ServiceName $service_name -Name $service_name) | Set-AzureVMMicrosoftAntimalwareExtension -Disable | Update-AzureVM + +#Get Microsoft Antimalware Extension configuration information and review +(Get-AzureVM -ServiceName $service_name -Name $service_name) | Get-AzureVMMicrosoftAntimalwareExtension + +#remove antimalware monitoring extension +(Get-AzureVM -ServiceName $service_name -Name $service_name) | Remove-AzureVMMicrosoftAntimalwareExtension | Update-AzureVM + +#Get status of all extensions on the service using general purpose cmdlet (confirm absence of extension after remove) +(Get-AzureVM -ServiceName $service_name -Name $service_name) | Get-AzureVMExtension + +#Uninstall the extension +(Get-AzureVM -ServiceName $service_name -Name $service_name) | Set-AzureVMMicrosoftAntimalwareExtension -Uninstall | Update-AzureVM + +#Get Microsoft Antimalware Extension configuration information and review +(Get-AzureVM -ServiceName $service_name -Name $service_name) | Get-AzureVMMicrosoftAntimalwareExtension + +#Explicitly uninstall the diagnostics extension +(Get-AzureVM -ServiceName $service_name -Name $service_name) | Set-AzureVMExtension -ExtensionName "IaaSDiagnostics" -Publisher "Microsoft.Azure.Diagnostics" -Version 1.1 -Uninstall | Update-AzureVM + +#Get Microsoft Antimalware Extension configuration information and review +(Get-AzureVM -ServiceName $service_name -Name $service_name) | Get-AzureVMMicrosoftAntimalwareExtension + +#Get status of all extensions on the service using general purpose cmdlet +(Get-AzureVM -ServiceName $service_name -Name $service_name) | Get-AzureVMExtension + +#Get Microsoft Antimalware Extension configuration information and review +(Get-AzureVM -ServiceName $service_name -Name $service_name) | Get-AzureVMMicrosoftAntimalwareExtension + + +#Check storage account for presence of antimalware events + +# export to csv file +Function GetMonitoringCsv +{ + Param( + [string]$storage_account_name, + [string]$csv_output_file = "c:\test\test.csv" + ) + +$subscription_name = (Get-AzureSubscription -Default).SubscriptionName + +Set-AzureSubscription -SubscriptionName $subscription_name -CurrentStorageAccountName $storage_account_name + +$keys = Get-AzureStorageKey -StorageAccountName $storage_account_name +$storage_account_key = $keys.Primary + +$tableName = (Get-AzureStorageTable -Prefix "WADWindowsEventLogs").Name; +if ($tableName) +{ + $blob_endpoint = "https://" + $storage_account_name + ".blob.core.windows.net/"; + $queue_endpoint = "https://" + $storage_account_name + ".queue.core.windows.net/"; + $table_endpoint = "https://" + $storage_account_name + ".table.core.windows.net/" + + $stg = New-Object Microsoft.WindowsAzure.Storage.CloudStorageAccount( + (New-Object Microsoft.WindowsAzure.Storage.Auth.StorageCredentials($storage_account_name, $storage_account_key)), + $blob_endpoint, $queue_endpoint, $table_endpoint) + + $cloudTableClient = $stg.CreateCloudTableClient() + $cloudTableData = $cloudTableClient.GetTableReference($tableName) + $query = New-Object Microsoft.WindowsAzure.Storage.Table.TableQuery + $response = $cloudTableData.ExecuteQuery($query) + + #extract out the relevant information + $results = New-Object System.Collections.ArrayList + foreach ($row in $response) + { + $obj = new-object psobject + Add-Member -InputObject $obj -MemberType NoteProperty -Name "Timestamp" -Value $row.Properties.TIMESTAMP.PropertyAsObject.ToOADate() + Add-Member -InputObject $obj -MemberType NoteProperty -Name "EventId" -Value $row.Properties.EventId.Int32Value + Add-Member -InputObject $obj -MemberType NoteProperty -Name "Role" -Value $row.Properties.Role.StringValue + Add-Member -InputObject $obj -MemberType NoteProperty -Name "RoleInstance" -Value $row.Properties.RoleInstance.StringValue + Add-Member -InputObject $obj -MemberType NoteProperty -Name "Description" -Value $row.Properties.Description.StringValue.replace("`n","").replace("`r","") + + $total = $results.Add($obj) + } + + Write-Host $total 'rows exported to csv output file (' $csv_output_file ')' + + #export to csv + $results | Export-Csv -path $csv_output_file -NoTypeInformation +} +else +{ + Write-Host 'no data found in storage account' + Write-Host $storage_account_name +} +} + +GetMonitoringCsv $storage_account_name diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/FunctionalTest.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/FunctionalTest.cs new file mode 100644 index 000000000000..d1a018fae11c --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/FunctionalTest.cs @@ -0,0 +1,1416 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Reflection; +using System.Security.Cryptography.X509Certificates; +using System.Text; +using System.Xml; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests +{ + [TestClass] + public class FunctionalTest : ServiceManagementTest + { + private string serviceName; + private string vmName; + + [ClassInitialize] + public static void ClassInit(TestContext context) + { + //SetTestSettings(); + + if (defaultAzureSubscription.Equals(null)) + { + Assert.Inconclusive("No Subscription is selected!"); + } + } + + [TestInitialize] + public void Initialize() + { + serviceName = Utilities.GetUniqueShortName(serviceNamePrefix); + vmName = Utilities.GetUniqueShortName(vmNamePrefix); + pass = false; + testStartTime = DateTime.Now; + } + + [TestMethod(), TestCategory(Category.Functional), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Get-AzureStorageAccount)")] + [Ignore] + public void ScriptTestSample() + { + vmPowershellCmdlets.RunPSScript("Get-Help Save-AzureVhd -full"); + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Functional), TestCategory(Category.BVT), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((New,Get,Set,Remove)-AzureAffinityGroup)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\affinityGroupData.csv", "affinityGroupData#csv", DataAccessMethod.Sequential)] + public void AzureAffinityGroupTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + string affinityName1 = Convert.ToString(TestContext.DataRow["affinityName1"]); + string affinityLabel1 = Convert.ToString(TestContext.DataRow["affinityLabel1"]); + string location1 = CheckLocation(Convert.ToString(TestContext.DataRow["location1"])); + string description1 = Convert.ToString(TestContext.DataRow["description1"]); + + string affinityName2 = Convert.ToString(TestContext.DataRow["affinityName2"]); + string affinityLabel2 = Convert.ToString(TestContext.DataRow["affinityLabel2"]); + string location2 = CheckLocation(Convert.ToString(TestContext.DataRow["location2"])); + string description2 = Convert.ToString(TestContext.DataRow["description2"]); + + try + { + ServiceManagementCmdletTestHelper vmPowershellCmdlets = new ServiceManagementCmdletTestHelper(); + + // Remove previously created affinity groups + foreach (var aff in vmPowershellCmdlets.GetAzureAffinityGroup(null)) + { + if (aff.Name == affinityName1 || aff.Name == affinityName2) + { + vmPowershellCmdlets.RemoveAzureAffinityGroup(aff.Name); + } + } + + // New-AzureAffinityGroup + vmPowershellCmdlets.NewAzureAffinityGroup(affinityName1, location1, affinityLabel1, description1); + vmPowershellCmdlets.NewAzureAffinityGroup(affinityName2, location2, affinityLabel2, description2); + Console.WriteLine("Affinity groups created: {0}, {1}", affinityName1, affinityName2); + + // Get-AzureAffinityGroup + + pass = AffinityGroupVerify(vmPowershellCmdlets.GetAzureAffinityGroup(affinityName1)[0], affinityName1, affinityLabel1, location1, description1); + pass &= AffinityGroupVerify(vmPowershellCmdlets.GetAzureAffinityGroup(affinityName2)[0], affinityName2, affinityLabel2, location2, description2); + + + // Set-AzureAffinityGroup + vmPowershellCmdlets.SetAzureAffinityGroup(affinityName2, affinityLabel1, description1); + Console.WriteLine("update affinity group: {0}", affinityName2); + + pass &= AffinityGroupVerify(vmPowershellCmdlets.GetAzureAffinityGroup(affinityName2)[0], affinityName2, affinityLabel1, location2, description1); + + + // Remove-AzureAffinityGroup + vmPowershellCmdlets.RemoveAzureAffinityGroup(affinityName2); + pass &= Utilities.CheckRemove(vmPowershellCmdlets.GetAzureAffinityGroup, affinityName2); + vmPowershellCmdlets.RemoveAzureAffinityGroup(affinityName1); + pass &= Utilities.CheckRemove(vmPowershellCmdlets.GetAzureAffinityGroup, affinityName1); + + } + catch (Exception e) + { + pass = false; + Assert.Fail(e.ToString()); + } + } + + private bool AffinityGroupVerify(AffinityGroupContext affContext, string name, string label, string location, string description) + { + bool result = true; + + Console.WriteLine("AffinityGroup: Name - {0}, Location - {1}, Label - {2}, Description - {3}", affContext.Name, affContext.Location, affContext.Label, affContext.Description); + try + { + Assert.AreEqual(affContext.Name, name, "Error: Affinity Name is not equal!"); + Assert.AreEqual(affContext.Label, label, "Error: Affinity Label is not equal!"); + Assert.AreEqual(affContext.Location, location, "Error: Affinity Location is not equal!"); + Assert.AreEqual(affContext.Description, description, "Error: Affinity Description is not equal!"); + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + result = false; + } + return result; + } + + private string CheckLocation(string loc) + { + string checkLoc = vmPowershellCmdlets.GetAzureLocationName(new string[] { loc }); + if (string.IsNullOrEmpty(checkLoc)) + { + foreach (LocationsContext l in vmPowershellCmdlets.GetAzureLocation()) + { + if (l.AvailableServices.Contains("Storage")) + { + return l.Name; + } + } + return null; + } + else + { + return checkLoc; + } + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Functional), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (New-AzureCertificateSetting)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\certificateData.csv", "certificateData#csv", DataAccessMethod.Sequential)] + public void AzureCertificateSettingTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Create a certificate + string cerFileName = Convert.ToString(TestContext.DataRow["cerFileName"]); + X509Certificate2 certCreated = Utilities.CreateCertificate(password); + byte[] certData2 = certCreated.Export(X509ContentType.Cert); + File.WriteAllBytes(cerFileName, certData2); + + // Install the .cer file to local machine. + StoreLocation certStoreLocation = StoreLocation.CurrentUser; + StoreName certStoreName = StoreName.My; + X509Certificate2 installedCert = Utilities.InstallCert(cerFileName, certStoreLocation, certStoreName); + + PSObject certToUpload = vmPowershellCmdlets.RunPSScript( + String.Format("Get-Item cert:\\{0}\\{1}\\{2}", certStoreLocation.ToString(), certStoreName.ToString(), installedCert.Thumbprint))[0]; + + try + { + vmPowershellCmdlets.NewAzureService(serviceName, locationName); + var certList = new CertificateSettingList(); + certList.Add(vmPowershellCmdlets.NewAzureCertificateSetting(certStoreName.ToString(), installedCert.Thumbprint)); + + var azureVMConfigInfo = new AzureVMConfigInfo(vmName, InstanceSize.Small.ToString(), imageName); + var azureProvisioningConfig = new AzureProvisioningConfigInfo(OS.Windows, certList, username, password); + var persistentVMConfigInfo = new PersistentVMConfigInfo(azureVMConfigInfo, azureProvisioningConfig, null, null); + PersistentVM vm = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo); + + // Negative Test: + // Try to deploy a VM with a certificate that does not exist in the hosted service. + // This should fail. + try + { + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }); + Assert.Fail( + "Should have failed, but it succeeded !! New-AzureVM should fail if it contains a thumbprint that does not exist in the hosted service."); + } + catch (Exception e) + { + if (e is AssertFailedException) + { + throw; + } + Console.WriteLine("This exception is expected: {0}", e); + } + + // Now we add the certificate to the hosted service. + vmPowershellCmdlets.AddAzureCertificate(serviceName, certToUpload); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }); + + PersistentVMRoleContext result = vmPowershellCmdlets.GetAzureVM(vmName, serviceName); + Console.WriteLine("{0} is created", result.Name); + + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e); + Console.WriteLine(e.InnerException); + throw; + } + finally + { + Utilities.UninstallCert(installedCert, certStoreLocation, certStoreName); + } + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Functional), TestCategory(Category.BVT), TestProperty("Feature", "PAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((New,Get,Set,Remove,Move)-AzureDeployment)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\package.csv", "package#csv", DataAccessMethod.Sequential)] + public void AzureDeploymentTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Choose the package and config files from local machine + string packageName = Convert.ToString(TestContext.DataRow["packageName"]); + string configName = Convert.ToString(TestContext.DataRow["configName"]); + string upgradePackageName = Convert.ToString(TestContext.DataRow["upgradePackage"]); + string upgradeConfigName = Convert.ToString(TestContext.DataRow["upgradeConfig"]); + string upgradeConfigName2 = Convert.ToString(TestContext.DataRow["upgradeConfig2"]); + + var packagePath1 = new FileInfo(Directory.GetCurrentDirectory() + "\\" + packageName); + var configPath1 = new FileInfo(Directory.GetCurrentDirectory() + "\\" + configName); + var packagePath2 = new FileInfo(Directory.GetCurrentDirectory() + "\\" + upgradePackageName); + var configPath2 = new FileInfo(Directory.GetCurrentDirectory() + "\\" + upgradeConfigName); + var configPath3 = new FileInfo(Directory.GetCurrentDirectory() + "\\" + upgradeConfigName2); + + Assert.IsTrue(File.Exists(packagePath1.FullName), "file not exist={0}", packagePath1); + Assert.IsTrue(File.Exists(packagePath2.FullName), "file not exist={0}", packagePath2); + Assert.IsTrue(File.Exists(configPath1.FullName), "file not exist={0}", configPath1); + Assert.IsTrue(File.Exists(configPath2.FullName), "file not exist={0}", configPath2); + Assert.IsTrue(File.Exists(configPath3.FullName), "file not exist={0}", configPath3); + + string deploymentName = "deployment1"; + string deploymentLabel = "label1"; + DeploymentInfoContext result; + + try + { + vmPowershellCmdlets.NewAzureService(serviceName, serviceName, locationName); + Console.WriteLine("service, {0}, is created.", serviceName); + + Utilities.RetryActionUntilSuccess(() => + { + vmPowershellCmdlets.NewAzureDeployment(serviceName, packagePath1.FullName, configPath1.FullName, DeploymentSlotType.Staging, deploymentLabel, deploymentName, false, false); + }, "Windows Azure is currently performing an operation on this hosted service that requires exclusive access.", 10, 30); + + result = vmPowershellCmdlets.GetAzureDeployment(serviceName, DeploymentSlotType.Staging); + pass = Utilities.PrintAndCompareDeployment(result, serviceName, deploymentName, deploymentLabel, DeploymentSlotType.Staging, null, 1); + Console.WriteLine("successfully deployed the package"); + + + // Move the deployment from 'Staging' to 'Production' + vmPowershellCmdlets.MoveAzureDeployment(serviceName); + result = vmPowershellCmdlets.GetAzureDeployment(serviceName, DeploymentSlotType.Production); + pass &= Utilities.PrintAndCompareDeployment(result, serviceName, deploymentName, deploymentLabel, DeploymentSlotType.Production, null, 1); + Console.WriteLine("successfully moved"); + + // Set the deployment status to 'Suspended' + vmPowershellCmdlets.SetAzureDeploymentStatus(serviceName, DeploymentSlotType.Production, DeploymentStatus.Suspended); + result = vmPowershellCmdlets.GetAzureDeployment(serviceName, DeploymentSlotType.Production); + pass &= Utilities.PrintAndCompareDeployment(result, serviceName, deploymentName, deploymentLabel, DeploymentSlotType.Production, DeploymentStatus.Suspended, 1); + Console.WriteLine("successfully changed the status"); + + // Update the deployment + vmPowershellCmdlets.SetAzureDeploymentConfig(serviceName, DeploymentSlotType.Production, configPath2.FullName); + result = vmPowershellCmdlets.GetAzureDeployment(serviceName, DeploymentSlotType.Production); + pass &= Utilities.PrintAndCompareDeployment(result, serviceName, deploymentName, deploymentLabel, DeploymentSlotType.Production, null, 2); + Console.WriteLine("successfully updated the deployment"); + + // Upgrade the deployment + DateTime start = DateTime.Now; + vmPowershellCmdlets.SetAzureDeploymentUpgrade(serviceName, DeploymentSlotType.Production, UpgradeType.Simultaneous, packagePath2.FullName, configPath3.FullName); + TimeSpan duration = DateTime.Now - start; + Console.WriteLine("Auto upgrade took {0}.", duration); + + result = vmPowershellCmdlets.GetAzureDeployment(serviceName, DeploymentSlotType.Production); + pass &= Utilities.PrintAndCompareDeployment(result, serviceName, deploymentName, serviceName, DeploymentSlotType.Production, null, 4); + Console.WriteLine("successfully updated the deployment"); + + var date = new DateTime(2014, 10, 17); + // Get Deployment Events by Name + var events = vmPowershellCmdlets.GetAzureDeploymentEvent(serviceName, deploymentName, date, date.AddHours(1)); + Assert.IsTrue(!events.Any() || events.All(e => e.DeploymentName == deploymentName + && !string.IsNullOrEmpty(e.InstanceName) && !string.IsNullOrEmpty(e.RebootReason) && !string.IsNullOrEmpty(e.RoleName) + && (!e.RebootStartTime.HasValue || (e.RebootStartTime >= date && e.RebootStartTime <= date.AddHours(1))))); + // Get Deployment Events by Slot + events = vmPowershellCmdlets.GetAzureDeploymentEventBySlot(serviceName, DeploymentSlotType.Production, date, date.AddHours(1)); + Assert.IsTrue(!events.Any() || events.All(e => e.DeploymentSlot == DeploymentSlotType.Production + && !string.IsNullOrEmpty(e.InstanceName) && !string.IsNullOrEmpty(e.RebootReason) && !string.IsNullOrEmpty(e.RoleName) + && (!e.RebootStartTime.HasValue || (e.RebootStartTime >= date && e.RebootStartTime <= date.AddHours(1))))); + // Get Deployment Events default by Production Slot + events = vmPowershellCmdlets.GetAzureDeploymentEventBySlot(serviceName, null, date, date.AddHours(1)); + Assert.IsTrue(!events.Any() || events.All(e => e.DeploymentSlot == DeploymentSlotType.Production + && !string.IsNullOrEmpty(e.InstanceName) && !string.IsNullOrEmpty(e.RebootReason) && !string.IsNullOrEmpty(e.RoleName) + && (!e.RebootStartTime.HasValue || (e.RebootStartTime >= date && e.RebootStartTime <= date.AddHours(1))))); + + try + { + // Negative test for invalid date range + events = vmPowershellCmdlets.GetAzureDeploymentEvent(serviceName, deploymentName, date, date.AddHours(-1)); + } + catch (Exception ex) + { + Assert.IsNotNull(ex.InnerException); + CloudException ce = (CloudException)ex.InnerException; + Assert.IsTrue(ce.Response.StatusCode == System.Net.HttpStatusCode.BadRequest); + Assert.IsTrue(ce.Message.Contains("The date specified in parameter EndTime is not within the correct range.")); + } + + vmPowershellCmdlets.RemoveAzureDeployment(serviceName, DeploymentSlotType.Production, true); + + pass &= Utilities.CheckRemove(vmPowershellCmdlets.GetAzureDeployment, serviceName, DeploymentSlotType.Production); + } + catch (Exception e) + { + pass = false; + Console.WriteLine("Exception occurred: {0}", e.ToString()); + throw; + } + finally + { + if (!Utilities.CheckRemove(vmPowershellCmdlets.GetAzureDeployment, serviceName, DeploymentSlotType.Production)) + { + vmPowershellCmdlets.RemoveAzureDeployment(serviceName, DeploymentSlotType.Production, true); + } + } + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Functional), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((New,Get)-AzureDns)")] + public void AzureDnsTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + const string dnsName = "OpenDns1"; + const string ipAddress = "208.67.222.222"; + + try + { + vmPowershellCmdlets.NewAzureService(serviceName, locationName); + + DnsServer dns = vmPowershellCmdlets.NewAzureDns(dnsName, ipAddress); + + var azureVMConfigInfo = new AzureVMConfigInfo(vmName, InstanceSize.ExtraSmall.ToString(), imageName); + var azureProvisioningConfig = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var persistentVMConfigInfo = new PersistentVMConfigInfo(azureVMConfigInfo, azureProvisioningConfig, null, null); + PersistentVM vm = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo); + + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, null, new[] { dns }, null, null, null, null); + + Assert.IsTrue(Verify.AzureDns(vmPowershellCmdlets.GetAzureDeployment(serviceName).DnsSettings, dns)); + pass = true; + + } + catch (Exception e) + { + pass = false; + Console.WriteLine("Exception occurred: {0}", e.ToString()); + throw; + } + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Functional), TestProperty("Feature", "IAAS"), Priority(1), Owner("derajen"), Description("Test the cmdlet ((Add,Set,Remove)-AzureDns)")] + public void AzureDnsTest2() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + const string dnsName = "OpenDns1"; + const string ipAddress = "208.67.222.222"; + const string ipAddress2 = "127.0.0.1"; + + try + { + vmPowershellCmdlets.NewAzureService(serviceName, locationName); + + // Create a VM + var azureVMConfigInfo = new AzureVMConfigInfo(vmName, InstanceSize.ExtraSmall.ToString(), imageName); + var azureProvisioningConfig = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var persistentVMConfigInfo = new PersistentVMConfigInfo(azureVMConfigInfo, azureProvisioningConfig, null, null); + PersistentVM vm = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }); + + // Add a DNS server + vmPowershellCmdlets.AddAzureDns(dnsName, ipAddress, serviceName); + + var dnsServer = vmPowershellCmdlets.GetAzureDeployment(serviceName).DnsSettings.DnsServers[0]; + Assert.AreEqual(dnsName, dnsServer.Name); + Assert.AreEqual(ipAddress, dnsServer.Address); + + // Edit the DNS server + vmPowershellCmdlets.SetAzureDns(dnsName, ipAddress2, serviceName); + + dnsServer = vmPowershellCmdlets.GetAzureDeployment(serviceName).DnsSettings.DnsServers[0]; + Assert.AreEqual(dnsName, dnsServer.Name); + Assert.AreEqual(ipAddress2, dnsServer.Address); + + // Remove the DNS server + vmPowershellCmdlets.RemoveAzureDns(dnsName, serviceName, force:true); + + Assert.IsNull(vmPowershellCmdlets.GetAzureDeployment(serviceName).DnsSettings); + + pass = true; + + } + catch (Exception e) + { + pass = false; + Console.WriteLine("Exception occurred: {0}", e.ToString()); + throw; + } + } + + /// + /// Test to validate creation of multiple network interfaces on a vm + /// + [TestMethod(), TestCategory(Category.Preview), TestProperty("Feature", "IAAS"), Priority(1), Owner("derajen"), Description("Test the cmdlet ((Add,Set,Remove)-AzureNetworkInterfaceConfig)")] + public void AzureMultiNicTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + try + { + var nic1 = "eth1"; + var nic2 = "eth2"; + + var nic1Address = "10.0.1.40"; + var nic2Address = "10.0.1.39"; + + // Create a VNet + var vnetConfig = vmPowershellCmdlets.GetAzureVNetConfig(null); + if (vnetConfig.Count > 0) + { + vmPowershellCmdlets.RunPSScript("Get-AzureService | Remove-AzureService -Force"); + Utilities.RetryActionUntilSuccess(() => vmPowershellCmdlets.RemoveAzureVNetConfig(), "in use", 5, 30); + } + vmPowershellCmdlets.SetAzureVNetConfig(Directory.GetCurrentDirectory() + "\\VnetconfigWithLocation.netcfg"); + var sites = vmPowershellCmdlets.GetAzureVNetSite(null); + var subnet = sites[0].Subnets.First().Name; + var vnetName = sites[0].Name; + + // Create a new service + vmPowershellCmdlets.NewAzureService(serviceName, locationName); + + // Create the VM + var azureVMConfigInfo = new AzureVMConfigInfo(vmName, InstanceSize.Large.ToString(), imageName); + var azureProvisioningConfig = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var persistentVMConfigInfo = new PersistentVMConfigInfo(azureVMConfigInfo, azureProvisioningConfig, null, null); + PersistentVM vm = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo); + vm = (PersistentVM)vmPowershellCmdlets.SetAzureSubnet(vm, new string[] {subnet}); + + // AddNetworkInterfaceConfig + vm = (PersistentVM)vmPowershellCmdlets.AddAzureNetworkInterfaceConfig(nic1, subnet, nic1Address, vm); + vm = (PersistentVM)vmPowershellCmdlets.AddAzureNetworkInterfaceConfig(nic2, subnet, vm); + + Assert.AreEqual(((NetworkConfigurationSet)vm.ConfigurationSets[1]).NetworkInterfaces.Count, 2); + Assert.AreEqual(((NetworkConfigurationSet)vm.ConfigurationSets[1]).NetworkInterfaces[0].Name, nic1); + Assert.AreEqual(((NetworkConfigurationSet)vm.ConfigurationSets[1]).NetworkInterfaces[0].IPConfigurations[0].SubnetName, subnet); + Assert.AreEqual(((NetworkConfigurationSet)vm.ConfigurationSets[1]).NetworkInterfaces[0].IPConfigurations[0].StaticVirtualNetworkIPAddress, nic1Address); + + Assert.AreEqual(((NetworkConfigurationSet)vm.ConfigurationSets[1]).NetworkInterfaces[1].Name, nic2); + Assert.AreEqual(((NetworkConfigurationSet)vm.ConfigurationSets[1]).NetworkInterfaces[1].IPConfigurations[0].SubnetName, subnet); + Assert.IsNull(((NetworkConfigurationSet)vm.ConfigurationSets[1]).NetworkInterfaces[1].IPConfigurations[0].StaticVirtualNetworkIPAddress); + + // Verify SetNetworkInterfaceConfig + vm = (PersistentVM)vmPowershellCmdlets.SetAzureNetworkInterfaceConfig(nic2, subnet, nic2Address, vm); + Assert.AreEqual(((NetworkConfigurationSet)vm.ConfigurationSets[1]).NetworkInterfaces[1].Name, nic2); + Assert.AreEqual(((NetworkConfigurationSet)vm.ConfigurationSets[1]).NetworkInterfaces[1].IPConfigurations[0].SubnetName, subnet); + Assert.AreEqual(((NetworkConfigurationSet)vm.ConfigurationSets[1]).NetworkInterfaces[1].IPConfigurations[0].StaticVirtualNetworkIPAddress, nic2Address); + + // Verify RemoveNetworkInterfaceConfig + vm = (PersistentVM)vmPowershellCmdlets.RemoveAzureNetworkInterfaceConfig(nic2, vm); + Assert.AreEqual(((NetworkConfigurationSet)vm.ConfigurationSets[1]).NetworkInterfaces.Count, 1); + Assert.AreEqual(((NetworkConfigurationSet)vm.ConfigurationSets[1]).NetworkInterfaces[0].Name, nic1); + + // Verify the create vm using NIC + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, vnetName, null, null, null, null, null, null, null, null, null, false ); + + // Verify GetNetworkInterfaceConfig + var getVM = vmPowershellCmdlets.GetAzureVM(vmName, serviceName); + + Assert.AreEqual(getVM.NetworkInterfaces[0].Name, nic1); + Assert.AreEqual(getVM.NetworkInterfaces[0].IpConfigurations[0].SubnetName, subnet); + Assert.IsNotNull(getVM.NetworkInterfaces[0].MacAddress); + + var getNic = vmPowershellCmdlets.GetAzureNetworkInterfaceConfig(nic1, getVM); + Assert.AreEqual(getNic.Name, nic1); + Assert.AreEqual(getNic.IpConfigurations[0].SubnetName, subnet); + Assert.IsNotNull(getNic.MacAddress); + + pass = true; + } + catch (Exception e) + { + pass = false; + Console.WriteLine("Exception occurred: {0}", e.ToString()); + throw; + } + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Functional), TestCategory(Category.BVT), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Get-AzureLocation)")] + public void AzureLocationTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + foreach (LocationsContext loc in vmPowershellCmdlets.GetAzureLocation()) + { + Console.WriteLine("Location: Name - {0}, DisplayName - {1}", loc.Name, loc.DisplayName); + } + + pass = true; + + } + catch (Exception e) + { + pass = false; + Assert.Fail("Exception occurred: {0}", e.ToString()); + } + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Functional), TestCategory(Category.BVT), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Get-AzureOSVersion)")] + public void AzureOSVersionTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + foreach (OSVersionsContext osVersions in vmPowershellCmdlets.GetAzureOSVersion()) + { + Console.WriteLine("OS Version: Family - {0}, FamilyLabel - {1}, Version - {2}", osVersions.Family, osVersions.FamilyLabel, osVersions.Version); + } + + pass = true; + + } + catch (Exception e) + { + pass = false; + Assert.Fail("Exception occurred: {0}", e.ToString()); + } + } + + + /// + /// + /// + [TestMethod(), TestCategory(Category.Functional), TestProperty("Feature", "PAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Get,Set)-AzureRole)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\package.csv", "package#csv", DataAccessMethod.Sequential)] + public void AzureRoleTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Choose the package and config files from local machine + string packageName = Convert.ToString(TestContext.DataRow["packageName"]); + string configName = Convert.ToString(TestContext.DataRow["configName"]); + string upgradePackageName = Convert.ToString(TestContext.DataRow["upgradePackage"]); + string upgradeConfigName = Convert.ToString(TestContext.DataRow["upgradeConfig"]); + + var packagePath1 = new FileInfo(Directory.GetCurrentDirectory() + "\\" + packageName); + var configPath1 = new FileInfo(Directory.GetCurrentDirectory() + "\\" + configName); + + Assert.IsTrue(File.Exists(packagePath1.FullName), "VHD file not exist={0}", packagePath1); + Assert.IsTrue(File.Exists(configPath1.FullName), "VHD file not exist={0}", configPath1); + + string deploymentName = "deployment1"; + string deploymentLabel = "label1"; + string slot = DeploymentSlotType.Production; + + //DeploymentInfoContext result; + string roleName = ""; + + try + { + vmPowershellCmdlets.NewAzureService(serviceName, serviceName, locationName); + + vmPowershellCmdlets.NewAzureDeployment(serviceName, packagePath1.FullName, configPath1.FullName, slot, deploymentLabel, deploymentName, false, false); + + + foreach (RoleContext role in vmPowershellCmdlets.GetAzureRole(serviceName, slot, null, false)) + { + Console.WriteLine("Role: Name - {0}, ServiceName - {1}, DeploymenntID - {2}, InstanceCount - {3}", role.RoleName, role.ServiceName, role.DeploymentID, role.InstanceCount); + Assert.AreEqual(serviceName, role.ServiceName); + roleName = role.RoleName; + } + + vmPowershellCmdlets.SetAzureRole(serviceName, slot, roleName, 2); + + foreach (RoleContext role in vmPowershellCmdlets.GetAzureRole(serviceName, slot, null, false)) + { + Console.WriteLine("Role: Name - {0}, ServiceName - {1}, DeploymenntID - {2}, InstanceCount - {3}", role.RoleName, role.ServiceName, role.DeploymentID, role.InstanceCount); + Assert.AreEqual(serviceName, role.ServiceName); + Assert.AreEqual(2, role.InstanceCount); + } + + pass = true; + + } + catch (Exception e) + { + pass = false; + Console.WriteLine("Exception occurred: {0}", e.ToString()); + throw; + } + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Functional), TestCategory(Category.BVT), TestProperty("Feature", "PAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (New-AzureServiceRemoteDesktopConfig)")] + [Ignore] + public void AzureServiceDiagnosticsExtensionConfigTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + List defaultRoles = new List(new string[] { "AllRoles" }); + string[] roles = new string[] { "WebRole1", "WorkerRole2" }; + string thumb = "abc"; + string alg = "sha1"; + + // Create a certificate + X509Certificate2 cert = Utilities.CreateCertificate(password); + + string storage = defaultAzureSubscription.CurrentStorageAccountName; + XmlDocument daConfig = new XmlDocument(); + daConfig.Load(@".\da.xml"); + + try + { + //// Case 1: No thumbprint, no Certificate + ExtensionConfigurationInput resultConfig = vmPowershellCmdlets.NewAzureServiceDiagnosticsExtensionConfig(storage); + Assert.IsTrue(VerifyExtensionConfigDiag(resultConfig, storage, defaultRoles)); + + resultConfig = vmPowershellCmdlets.NewAzureServiceDiagnosticsExtensionConfig(storage, daConfig); + Assert.IsTrue(VerifyExtensionConfigDiag(resultConfig, storage, defaultRoles, daConfig)); + + resultConfig = vmPowershellCmdlets.NewAzureServiceDiagnosticsExtensionConfig(storage, null, roles); + Assert.IsTrue(VerifyExtensionConfigDiag(resultConfig, storage, new List(roles))); + + resultConfig = vmPowershellCmdlets.NewAzureServiceDiagnosticsExtensionConfig(storage, daConfig, roles); + Assert.IsTrue(VerifyExtensionConfigDiag(resultConfig, storage, new List(roles), daConfig)); + + // Case 2: Thumbprint, no algorithm + resultConfig = vmPowershellCmdlets.NewAzureServiceDiagnosticsExtensionConfig(storage, thumb, null); + Assert.IsTrue(VerifyExtensionConfigDiag(resultConfig, storage, defaultRoles, null, thumb)); + + resultConfig = vmPowershellCmdlets.NewAzureServiceDiagnosticsExtensionConfig(storage, thumb, null, daConfig); + Assert.IsTrue(VerifyExtensionConfigDiag(resultConfig, storage, defaultRoles, daConfig, thumb)); + + resultConfig = vmPowershellCmdlets.NewAzureServiceDiagnosticsExtensionConfig(storage, thumb, null, null, roles); + Assert.IsTrue(VerifyExtensionConfigDiag(resultConfig, storage, new List(roles), null, thumb)); + + resultConfig = vmPowershellCmdlets.NewAzureServiceDiagnosticsExtensionConfig(storage, thumb, null, daConfig, roles); + Assert.IsTrue(VerifyExtensionConfigDiag(resultConfig, storage, new List(roles), daConfig, thumb)); + + // Case 3: Thumbprint and algorithm + resultConfig = vmPowershellCmdlets.NewAzureServiceDiagnosticsExtensionConfig(storage, thumb, alg); + Assert.IsTrue(VerifyExtensionConfigDiag(resultConfig, storage, defaultRoles, null, thumb, alg)); + + resultConfig = vmPowershellCmdlets.NewAzureServiceDiagnosticsExtensionConfig(storage, thumb, alg, daConfig); + Assert.IsTrue(VerifyExtensionConfigDiag(resultConfig, storage, defaultRoles, daConfig, thumb, alg)); + + resultConfig = vmPowershellCmdlets.NewAzureServiceDiagnosticsExtensionConfig(storage, thumb, alg, null, roles); + Assert.IsTrue(VerifyExtensionConfigDiag(resultConfig, storage, new List(roles), null, thumb, alg)); + + resultConfig = vmPowershellCmdlets.NewAzureServiceDiagnosticsExtensionConfig(storage, thumb, alg, daConfig, roles); + Assert.IsTrue(VerifyExtensionConfigDiag(resultConfig, storage, new List(roles), daConfig, thumb, alg)); + + // Case 4: Certificate + resultConfig = vmPowershellCmdlets.NewAzureServiceDiagnosticsExtensionConfig(storage, cert); + Assert.IsTrue(VerifyExtensionConfigDiag(resultConfig, storage, defaultRoles, null, cert.Thumbprint, null, cert)); + + resultConfig = vmPowershellCmdlets.NewAzureServiceDiagnosticsExtensionConfig(storage, cert, daConfig); + Assert.IsTrue(VerifyExtensionConfigDiag(resultConfig, storage, defaultRoles, daConfig, cert.Thumbprint, null, cert)); + + resultConfig = vmPowershellCmdlets.NewAzureServiceDiagnosticsExtensionConfig(storage, cert, null, roles); + Assert.IsTrue(VerifyExtensionConfigDiag(resultConfig, storage, new List(roles), null, cert.Thumbprint, null, cert)); + + resultConfig = vmPowershellCmdlets.NewAzureServiceDiagnosticsExtensionConfig(storage, cert, daConfig, roles); + Assert.IsTrue(VerifyExtensionConfigDiag(resultConfig, storage, new List(roles), daConfig, cert.Thumbprint, null, cert)); + + pass = true; + } + catch (Exception e) + { + pass = false; + Assert.Fail("Exception occurred: {0}", e.ToString()); + } + } + + private bool VerifyExtensionConfigDiag(ExtensionConfigurationInput resultConfig, string storage, List roles, XmlDocument wadconfig = null, string thumbprint = null, string algorithm = null, X509Certificate2 cert = null) + { + try + { + string resultStorageAccount = GetInnerText(resultConfig.PublicConfiguration, "StorageAccount"); + string resultWadCfg = Utilities.GetInnerXml(resultConfig.PublicConfiguration, "WadCfg"); + if (string.IsNullOrWhiteSpace(resultWadCfg)) + { + resultWadCfg = null; + } + string resultStorageKey = GetInnerValue(resultConfig.PrivateConfiguration, "StorageAccount", "key"); + + Console.WriteLine("Type: {0}, StorageAccountName:{1}, StorageKey: {2}, WadCfg: {3}, CertificateThumbprint: {4}, ThumbprintAlgorithm: {5}, X509Certificate: {6}", + resultConfig.Type, resultStorageAccount, resultStorageKey, resultWadCfg, resultConfig.CertificateThumbprint, resultConfig.ThumbprintAlgorithm, resultConfig.X509Certificate); + + Assert.AreEqual("PaaSDiagnostics", resultConfig.Type, "Type is not equal!"); + Assert.AreEqual(storage, resultStorageAccount); + Assert.IsTrue(Utilities.CompareWadCfg(resultWadCfg, wadconfig)); + + if (string.IsNullOrWhiteSpace(thumbprint)) + { + Assert.IsTrue(string.IsNullOrWhiteSpace(resultConfig.CertificateThumbprint)); + } + else + { + Assert.AreEqual(thumbprint, resultConfig.CertificateThumbprint, "Certificate thumbprint is not equal!"); + } + if (string.IsNullOrWhiteSpace(algorithm)) + { + Assert.IsTrue(string.IsNullOrWhiteSpace(resultConfig.ThumbprintAlgorithm)); + } + else + { + Assert.AreEqual(algorithm, resultConfig.ThumbprintAlgorithm, "Thumbprint algorithm is not equal!"); + } + Assert.AreEqual(cert, resultConfig.X509Certificate, "X509Certificate is not equal!"); + if (resultConfig.Roles.Count == 1 && string.IsNullOrEmpty(resultConfig.Roles[0].RoleName)) + { + Assert.IsTrue(roles.Contains(resultConfig.Roles[0].RoleType.ToString())); + } + else + { + foreach (ExtensionRole role in resultConfig.Roles) + { + Assert.IsTrue(roles.Contains(role.RoleName)); + } + } + + return true; + } + catch + { + return false; + } + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Functional), TestCategory(Category.BVT), TestProperty("Feature", "PAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (New-AzureServiceRemoteDesktopConfig)")] + public void AzureServiceRemoteDesktopExtensionConfigTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + PSCredential cred = new PSCredential(username, Utilities.convertToSecureString(password)); + DateTime exp = DateTime.Now.AddMonths(18); + DateTime defaultExp = DateTime.Now.AddMonths(12); + List defaultRoles = new List(new string[] { "AllRoles" }); + string[] roles = new string[] { "WebRole1", "WorkerRole2" }; + string thumb = "abc"; + string alg = "sha1"; + + // Create a certificate + X509Certificate2 cert = Utilities.CreateCertificate(password); + + try + { + // Case 1: No thumbprint, no Certificate + ExtensionConfigurationInput resultConfig = vmPowershellCmdlets.NewAzureServiceRemoteDesktopExtensionConfig(cred); + Assert.IsTrue(VerifyExtensionConfigRDP(resultConfig, username, password, defaultRoles, defaultExp)); + + resultConfig = vmPowershellCmdlets.NewAzureServiceRemoteDesktopExtensionConfig(cred, exp); + Assert.IsTrue(VerifyExtensionConfigRDP(resultConfig, username, password, defaultRoles, exp)); + + resultConfig = vmPowershellCmdlets.NewAzureServiceRemoteDesktopExtensionConfig(cred, null, roles); + Assert.IsTrue(VerifyExtensionConfigRDP(resultConfig, username, password, new List(roles), defaultExp)); + + resultConfig = vmPowershellCmdlets.NewAzureServiceRemoteDesktopExtensionConfig(cred, exp, roles); + Assert.IsTrue(VerifyExtensionConfigRDP(resultConfig, username, password, new List(roles), exp)); + + // Case 2: Thumbprint, no algorithm + resultConfig = vmPowershellCmdlets.NewAzureServiceRemoteDesktopExtensionConfig(cred, thumb, null); + Assert.IsTrue(VerifyExtensionConfigRDP(resultConfig, username, password, defaultRoles, defaultExp, thumb)); + + resultConfig = vmPowershellCmdlets.NewAzureServiceRemoteDesktopExtensionConfig(cred, thumb, null, exp); + Assert.IsTrue(VerifyExtensionConfigRDP(resultConfig, username, password, defaultRoles, exp, thumb)); + + resultConfig = vmPowershellCmdlets.NewAzureServiceRemoteDesktopExtensionConfig(cred, thumb, null, null, roles); + Assert.IsTrue(VerifyExtensionConfigRDP(resultConfig, username, password, new List(roles), defaultExp, thumb)); + + resultConfig = vmPowershellCmdlets.NewAzureServiceRemoteDesktopExtensionConfig(cred, thumb, null, exp, roles); + Assert.IsTrue(VerifyExtensionConfigRDP(resultConfig, username, password, new List(roles), exp, thumb)); + + // Case 3: Thumbprint and algorithm + resultConfig = vmPowershellCmdlets.NewAzureServiceRemoteDesktopExtensionConfig(cred, thumb, alg); + Assert.IsTrue(VerifyExtensionConfigRDP(resultConfig, username, password, defaultRoles, defaultExp, thumb, alg)); + + resultConfig = vmPowershellCmdlets.NewAzureServiceRemoteDesktopExtensionConfig(cred, thumb, alg, exp); + Assert.IsTrue(VerifyExtensionConfigRDP(resultConfig, username, password, defaultRoles, exp, thumb, alg)); + + resultConfig = vmPowershellCmdlets.NewAzureServiceRemoteDesktopExtensionConfig(cred, thumb, alg, null, roles); + Assert.IsTrue(VerifyExtensionConfigRDP(resultConfig, username, password, new List(roles), defaultExp, thumb, alg)); + + resultConfig = vmPowershellCmdlets.NewAzureServiceRemoteDesktopExtensionConfig(cred, thumb, alg, exp, roles); + Assert.IsTrue(VerifyExtensionConfigRDP(resultConfig, username, password, new List(roles), exp, thumb, alg)); + + // Case 4: Certificate + resultConfig = vmPowershellCmdlets.NewAzureServiceRemoteDesktopExtensionConfig(cred, cert); + Assert.IsTrue(VerifyExtensionConfigRDP(resultConfig, username, password, defaultRoles, defaultExp, cert.Thumbprint, null, cert)); + + resultConfig = vmPowershellCmdlets.NewAzureServiceRemoteDesktopExtensionConfig(cred, cert, null, exp); + Assert.IsTrue(VerifyExtensionConfigRDP(resultConfig, username, password, defaultRoles, exp, cert.Thumbprint, null, cert)); + + resultConfig = vmPowershellCmdlets.NewAzureServiceRemoteDesktopExtensionConfig(cred, cert, null, null, roles); + Assert.IsTrue(VerifyExtensionConfigRDP(resultConfig, username, password, new List(roles), defaultExp, cert.Thumbprint, null, cert)); + + resultConfig = vmPowershellCmdlets.NewAzureServiceRemoteDesktopExtensionConfig(cred, cert, null, exp, roles); + Assert.IsTrue(VerifyExtensionConfigRDP(resultConfig, username, password, new List(roles), exp, cert.Thumbprint, null, cert)); + + pass = true; + } + catch (Exception e) + { + pass = false; + Assert.Fail("Exception occurred: {0}", e.ToString()); + } + } + + private bool VerifyExtensionConfigRDP(ExtensionConfigurationInput resultConfig, string user, string pass, List roles, DateTime exp, string thumbprint = null, string algorithm = null, X509Certificate2 cert = null) + { + try + { + string resultUserName = GetInnerText(resultConfig.PublicConfiguration, "UserName"); + string resultPassword = GetInnerText(resultConfig.PrivateConfiguration, "Password"); + string resultExpDate = GetInnerText(resultConfig.PublicConfiguration, "Expiration"); + + Console.WriteLine("Type: {0}, UserName:{1}, Password: {2}, ExpirationDate: {3}, CertificateThumbprint: {4}, ThumbprintAlgorithm: {5}, X509Certificate: {6}", + resultConfig.Type, resultUserName, resultPassword, resultExpDate, resultConfig.CertificateThumbprint, resultConfig.ThumbprintAlgorithm, resultConfig.X509Certificate); + + Assert.AreEqual(resultConfig.Type, "RDP", "Type is not equal!"); + Assert.AreEqual(resultUserName, user); + Assert.AreEqual(resultPassword, pass); + Assert.IsTrue(Utilities.CompareDateTime(exp, resultExpDate)); + + if (string.IsNullOrWhiteSpace(thumbprint)) + { + Assert.IsTrue(string.IsNullOrWhiteSpace(resultConfig.CertificateThumbprint)); + } + else + { + Assert.AreEqual(resultConfig.CertificateThumbprint, thumbprint, "Certificate thumbprint is not equal!"); + } + + if (string.IsNullOrWhiteSpace(algorithm)) + { + Assert.IsTrue(string.IsNullOrWhiteSpace(resultConfig.ThumbprintAlgorithm)); + } + else + { + Assert.AreEqual(resultConfig.ThumbprintAlgorithm, algorithm, "Thumbprint algorithm is not equal!"); + } + Assert.AreEqual(resultConfig.X509Certificate, cert, "X509Certificate is not equal!"); + if (resultConfig.Roles.Count == 1 && string.IsNullOrEmpty(resultConfig.Roles[0].RoleName)) + { + Assert.IsTrue(roles.Contains(resultConfig.Roles[0].RoleType.ToString())); + } + else + { + foreach (ExtensionRole role in resultConfig.Roles) + { + Assert.IsTrue(roles.Contains(role.RoleName)); + } + } + + return true; + } + catch + { + return false; + } + } + + private string GetInnerText(string xmlString, string tag) + { + string removedHeader = xmlString.Substring(xmlString.IndexOf('<', 2)); + + byte[] encodedString = Encoding.UTF8.GetBytes(xmlString); + MemoryStream stream = new MemoryStream(encodedString); + stream.Flush(); + stream.Position = 0; + + XmlDocument xml = new XmlDocument(); + xml.Load(stream); + return xml.GetElementsByTagName(tag)[0].InnerText; + } + + private string GetInnerValue(string xmlString, string tag, string attribute) + { + string removedHeader = xmlString.Substring(xmlString.IndexOf('<', 2)); + + byte[] encodedString = Encoding.UTF8.GetBytes(xmlString); + MemoryStream stream = new MemoryStream(encodedString); + stream.Flush(); + stream.Position = 0; + + XmlDocument xml = new XmlDocument(); + xml.Load(stream); + return xml.GetElementsByTagName(tag)[0].Attributes[attribute].Value; + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Functional), TestCategory(Category.BVT), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Get,Set)-AzureSubnet)")] + public void AzureSubnetTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + //vmPowershellCmdlets.NewAzureService(serviceName, serviceName, locationName); + + var azureVMConfigInfo = new AzureVMConfigInfo(vmName, InstanceSize.Small.ToString(), imageName); + var azureProvisioningConfig = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var persistentVMConfigInfo = new PersistentVMConfigInfo(azureVMConfigInfo, azureProvisioningConfig, null, null); + vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo); + + string[] subs = { "subnet1", "subnet2", "subnet3" }; + PersistentVM vm = vmPowershellCmdlets.SetAzureSubnet(vmPowershellCmdlets.AddAzureProvisioningConfig(azureProvisioningConfig), subs); + + SubnetNamesCollection subnets = vmPowershellCmdlets.GetAzureSubnet(vm); + foreach (string subnet in subnets) + { + Console.WriteLine("Subnet: {0}", subnet); + } + CollectionAssert.AreEqual(subnets, subs); + + pass = true; + } + catch (Exception e) + { + Console.WriteLine("Exception occurred: {0}", e); + throw; + } + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Functional), TestCategory(Category.BVT), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((New,Get)-AzureStorageKey)")] + public void AzureStorageKeyTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + StorageServiceKeyOperationContext key1 = vmPowershellCmdlets.GetAzureStorageAccountKey(defaultAzureSubscription.CurrentStorageAccountName); // Get-AzureStorageAccountKey + Console.WriteLine("Primary - {0}", key1.Primary); + Console.WriteLine("Secondary - {0}", key1.Secondary); + + StorageServiceKeyOperationContext key2 = vmPowershellCmdlets.NewAzureStorageAccountKey(defaultAzureSubscription.CurrentStorageAccountName, KeyType.Secondary); + Console.WriteLine("Primary - {0}", key2.Primary); + Console.WriteLine("Secondary - {0}", key2.Secondary); + + Assert.AreEqual(key1.Primary, key2.Primary); + Assert.AreNotEqual(key1.Secondary, key2.Secondary); + + pass = true; + } + catch (Exception e) + { + pass = false; + Assert.Fail("Exception occurred: {0}", e.ToString()); + } + } + + [TestMethod(), TestCategory(Category.Functional), TestCategory(Category.BVT), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((New,Get,Remove)-AzureStorageAccount)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\storageAccountTestData.csv", "storageAccountTestData#csv", DataAccessMethod.Sequential)] + public void AzureStorageAccountBVTTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + string storageAccountPrefix = Convert.ToString(TestContext.DataRow["NamePrefix"]); + string location = CheckLocation(Convert.ToString(TestContext.DataRow["Location1"])); + var storageName = Utilities.GetUniqueShortName(storageAccountPrefix); + var grsAccountType = "Standard_GRS"; + string[] storageStaticProperties = new string[3] { storageName, location, null }; + + try + { + // New-AzureStorageAccount test for default 'Standard_GRS' + vmPowershellCmdlets.NewAzureStorageAccount(storageName, location, null, null, null); + Assert.IsTrue(StorageAccountVerify(vmPowershellCmdlets.GetAzureStorageAccount(storageName)[0], + storageStaticProperties, storageName, null, true, grsAccountType)); + Console.WriteLine("{0} is created", storageName); + + vmPowershellCmdlets.SetAzureStorageAccount(storageName, "test", "test", (string)null); + Assert.IsTrue(StorageAccountVerify(vmPowershellCmdlets.GetAzureStorageAccount(storageName)[0], + storageStaticProperties, "test", "test", true, grsAccountType)); + Console.WriteLine("{0} is updated", storageName); + + vmPowershellCmdlets.RemoveAzureStorageAccount(storageName); + Assert.IsTrue(Utilities.CheckRemove(vmPowershellCmdlets.GetAzureStorageAccount, storageName), "The storage account was not removed"); + Console.WriteLine("{0} is removed", storageName); + + pass = true; + } + catch (Exception e) + { + pass = false; + Assert.Fail("Exception occurred: {0}", e.ToString()); + } + finally + { + Console.WriteLine("Starts cleaning up..."); + // Clean-up storage if it is not removed. + if (!Utilities.CheckRemove(vmPowershellCmdlets.GetAzureStorageAccount, storageName)) + { + vmPowershellCmdlets.RemoveAzureStorageAccount(storageName); + } + } + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Functional), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((New,Get,Set,Remove)-AzureStorageAccount)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\storageAccountTestData.csv", "storageAccountTestData#csv", DataAccessMethod.Sequential)] + public void AzureStorageAccountTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + string storageAccountPrefix = Convert.ToString(TestContext.DataRow["NamePrefix"]); + string locationName1 = CheckLocation(Convert.ToString(TestContext.DataRow["Location1"])); + string locationName2 = CheckLocation(Convert.ToString(TestContext.DataRow["Location2"])); + string affinityGroupName = Convert.ToString(TestContext.DataRow["AffinityGroupName"]); + + string[] label = new string[3] { + Convert.ToString(TestContext.DataRow["Label1"]), + Convert.ToString(TestContext.DataRow["Label2"]), + Convert.ToString(TestContext.DataRow["Label3"])}; + string[] description = new string[3] { + Convert.ToString(TestContext.DataRow["Description1"]), + Convert.ToString(TestContext.DataRow["Description2"]), + Convert.ToString(TestContext.DataRow["Description3"])}; + bool?[] geoReplicationSettings = new bool?[3] { true, false, null }; + + bool geoReplicationEnabled = true; + string zrsAccountType = "Standard_ZRS"; + string grsAccountType = "Standard_GRS"; + string[] accountTypes = new string[3] { + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS" + }; + + string[] storageName = new string[3] { + Utilities.GetUniqueShortName(storageAccountPrefix), + Utilities.GetUniqueShortName(storageAccountPrefix), + Utilities.GetUniqueShortName(storageAccountPrefix)}; + + string[][] storageStaticProperties = new string[3][] { + new string[3] {storageName[0], locationName1, null}, + new string [3] {storageName[1], null, affinityGroupName}, + new string[3] {storageName[2], locationName1, null},}; + + try + { + // New-AzureStorageAccount test for 'Standard_ZRS' + var zrsStorageName = Utilities.GetUniqueShortName(storageAccountPrefix); + string[] zrsStorageStaticProperties = new string[3] { zrsStorageName, locationName1, null }; + vmPowershellCmdlets.NewAzureStorageAccount(zrsStorageName, locationName1, null, null, null, zrsAccountType); + Assert.IsTrue(StorageAccountVerify(vmPowershellCmdlets.GetAzureStorageAccount(zrsStorageName)[0], + zrsStorageStaticProperties, zrsStorageName, null, null, zrsAccountType)); + Console.WriteLine("{0} is created", zrsStorageName); + + vmPowershellCmdlets.RemoveAzureStorageAccount(zrsStorageName); + Assert.IsTrue(Utilities.CheckRemove(vmPowershellCmdlets.GetAzureStorageAccount, zrsStorageName), "The storage account was not removed"); + + // New-AzureStorageAccount test for default 'Standard_GRS' + vmPowershellCmdlets.NewAzureStorageAccount(storageName[0], locationName1, null, null, null); + Assert.IsTrue(StorageAccountVerify(vmPowershellCmdlets.GetAzureStorageAccount(storageName[0])[0], + storageStaticProperties[0], storageName[0], null, true, grsAccountType)); + Console.WriteLine("{0} is created", storageName[0]); + + if (Utilities.CheckRemove(vmPowershellCmdlets.GetAzureAffinityGroup, affinityGroupName)) + { + vmPowershellCmdlets.NewAzureAffinityGroup(affinityGroupName, locationName2, label[0], description[0]); + } + + vmPowershellCmdlets.NewAzureStorageAccount(storageName[1], null, affinityGroupName, null, null); + Assert.IsTrue(StorageAccountVerify(vmPowershellCmdlets.GetAzureStorageAccount(storageName[1])[0], + storageStaticProperties[1], storageName[1], null, true, grsAccountType)); + Console.WriteLine("{0} is created", storageName[1]); + + // Set-AzureStorageAccount & Remove-AzureStorageAccount test + for (int i = 0; i < 2; i++) + { + + for (int j = 0; j < 3; j++) + { + vmPowershellCmdlets.SetAzureStorageAccount(storageName[i], label[j], null, geoReplicationSettings[j]); + if (geoReplicationSettings[j] != null) + { + geoReplicationEnabled = geoReplicationSettings[j].Value; + } + Assert.IsTrue(StorageAccountVerify(vmPowershellCmdlets.GetAzureStorageAccount(storageName[i])[0], + storageStaticProperties[i], label[j], null, true, grsAccountType)); + } + + for (int j = 0; j < 3; j++) + { + vmPowershellCmdlets.SetAzureStorageAccount(storageName[i], null, description[j], geoReplicationSettings[j]); + if (geoReplicationSettings[j] != null) + { + geoReplicationEnabled = geoReplicationSettings[j].Value; + } + Assert.IsTrue(StorageAccountVerify(vmPowershellCmdlets.GetAzureStorageAccount(storageName[i])[0], + storageStaticProperties[i], label[2], description[j], true, grsAccountType)); + } + + for (int j = 0; j < 3; j++) + { + vmPowershellCmdlets.SetAzureStorageAccount(storageName[i], null, null, geoReplicationSettings[j]); + if (geoReplicationSettings[j] != null) + { + geoReplicationEnabled = geoReplicationSettings[j].Value; + } + Assert.IsTrue(StorageAccountVerify(vmPowershellCmdlets.GetAzureStorageAccount(storageName[i])[0], + storageStaticProperties[i], label[2], description[2], true, grsAccountType)); + } + + for (int j = 0; j < 3; j++) + { + vmPowershellCmdlets.SetAzureStorageAccount(storageName[i], label[j], description[j], geoReplicationSettings[j]); + if (geoReplicationSettings[j] != null) + { + geoReplicationEnabled = geoReplicationSettings[j].Value; + } + Assert.IsTrue(StorageAccountVerify(vmPowershellCmdlets.GetAzureStorageAccount(storageName[i])[0], + storageStaticProperties[i], label[j], description[j], true, grsAccountType)); + } + + vmPowershellCmdlets.RemoveAzureStorageAccount(storageName[i]); + Assert.IsTrue(Utilities.CheckRemove(vmPowershellCmdlets.GetAzureStorageAccount, storageName[i]), "The storage account was not removed"); + } + + vmPowershellCmdlets.RemoveAzureAffinityGroup(affinityGroupName); + + // Test Setting and Updating Account Types + vmPowershellCmdlets.NewAzureStorageAccount(storageName[2], locationName1, null, null, null, accountTypes[0]); + Assert.IsTrue(StorageAccountVerify(vmPowershellCmdlets.GetAzureStorageAccount(storageName[2])[0], + storageStaticProperties[2], storageName[2], null, accountTypes[0] == grsAccountType ? (bool?)true : null, accountTypes[0])); + Console.WriteLine("{0} is created", storageName[2]); + + for (int j = 0; j < accountTypes.Length; j++) + { + vmPowershellCmdlets.SetAzureStorageAccount(storageName[2], label[j], null, accountTypes[j]); + Assert.IsTrue(StorageAccountVerify(vmPowershellCmdlets.GetAzureStorageAccount(storageName[2])[0], + storageStaticProperties[2], label[j], null, accountTypes[j] == grsAccountType ? (bool?)true : null, accountTypes[j])); + } + + vmPowershellCmdlets.RemoveAzureStorageAccount(storageName[2]); + Assert.IsTrue(Utilities.CheckRemove(vmPowershellCmdlets.GetAzureStorageAccount, storageName[2]), "The storage account was not removed"); + + pass = true; + } + catch (Exception e) + { + pass = false; + + Assert.Fail("Exception occurred: {0}", e); + } + finally + { + Console.WriteLine("Starts cleaning up..."); + // Clean-up storage if it is not removed. + foreach (string storage in storageName) + { + + if (!Utilities.CheckRemove(vmPowershellCmdlets.GetAzureStorageAccount, storage)) + { + vmPowershellCmdlets.RemoveAzureStorageAccount(storage); + } + } + + // Clean-up affinity group created. + if (!Utilities.CheckRemove(vmPowershellCmdlets.GetAzureAffinityGroup, affinityGroupName)) + { + vmPowershellCmdlets.RemoveAzureAffinityGroup(affinityGroupName); + } + } + } + + private bool StorageAccountVerify(StorageServicePropertiesOperationContext storageContext, + string[] staticParameters, string label, string description, bool? geoReplicationEnabled, string accountType) + { + string name = staticParameters[0]; + string location = staticParameters[1]; + string affinity = staticParameters[2]; + + Console.WriteLine("Name: {0}, Label: {1}, Description: {2}, AffinityGroup: {3}, Location: {4}, GeoReplicationEnabled: {5}, AccountType: {6}", + storageContext.StorageAccountName, + storageContext.Label, + storageContext.StorageAccountDescription, + storageContext.AffinityGroup, + storageContext.Location, + storageContext.GeoReplicationEnabled, + storageContext.AccountType); + + try + { + Assert.AreEqual(name, storageContext.StorageAccountName, "Error: Storage Account Name is not equal!"); + Assert.AreEqual(label, storageContext.Label, "Error: Storage Account Label is not equal!"); + Assert.AreEqual(description, storageContext.StorageAccountDescription, "Error: Storage Account Description is not equal!"); + Assert.AreEqual(affinity, storageContext.AffinityGroup, "Error: Affinity Group is not equal!"); + Assert.AreEqual(location, storageContext.Location, "Error: Location is not equal!"); + Assert.AreEqual(geoReplicationEnabled, storageContext.GeoReplicationEnabled, "Error: GeoReplicationEnabled is not equal!"); + Assert.AreEqual(accountType, storageContext.AccountType, "Error: AccountType is not equal!"); + Console.WriteLine("All contexts are matched!!\n"); + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + return false; + } + return true; + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Functional), TestCategory(Category.BVT), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Get,Set,Remove)-AzureVNetConfig)")] + public void AzureVNetConfigTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + string affinityGroup = "WestUsAffinityGroup"; + + try + { + // Test Wide VNet + string wideVnetConfigFilePathCopy = Directory.GetCurrentDirectory() + "\\VnetconfigWithLocation.netcfg"; + Console.WriteLine("Test wide VNet using the following config:"); + Console.WriteLine(File.ReadAllText(wideVnetConfigFilePathCopy)); + vmPowershellCmdlets.SetAzureVNetConfig(wideVnetConfigFilePathCopy); + + var locations = vmPowershellCmdlets.GetAzureLocation(); + var wideVnetSites = vmPowershellCmdlets.GetAzureVNetSite(null); + + foreach (var re in wideVnetSites) + { + Assert.IsTrue(string.IsNullOrEmpty(re.AffinityGroup)); + Assert.IsTrue(!string.IsNullOrEmpty(re.Location)); + Assert.IsTrue(locations.Any(t => string.Equals(t.Name, re.Location, StringComparison.OrdinalIgnoreCase))); + } + + vmPowershellCmdlets.RemoveAzureVNetConfig(); + + // Test Narrow VNet + if (Utilities.CheckRemove(vmPowershellCmdlets.GetAzureAffinityGroup, affinityGroup)) + { + vmPowershellCmdlets.NewAzureAffinityGroup(affinityGroup, locationName, null, null); + } + + vmPowershellCmdlets.SetAzureVNetConfig(vnetConfigFilePath); + + string vnetConfigFilePathCopy = Directory.GetCurrentDirectory() + "\\vnetconfigCopy.netcfg"; + + var result = vmPowershellCmdlets.GetAzureVNetConfig(vnetConfigFilePathCopy); + var streamReader = new StreamReader(vnetConfigFilePathCopy); + string text = streamReader.ReadToEnd(); + streamReader.Close(); + Assert.AreEqual(text, result[0].XMLConfiguration, string.Format("netcfg does not match!!!\n Original:{0}\n Returned:{1}\n", text, result[0].XMLConfiguration)); + + + + vmPowershellCmdlets.SetAzureVNetConfig(vnetConfigFilePathCopy); + + Collection vnetSites = vmPowershellCmdlets.GetAzureVNetSite(null); + + foreach (var re in vnetSites) + { + Console.WriteLine("VNet Name: {0}", re.Name); + Console.WriteLine("ID: {0}", re.Id); + Console.WriteLine("Affinity Group: {0}", re.AffinityGroup); + Console.WriteLine("Gateway Profile: {0}", re.GatewayProfile); + Console.WriteLine("InUse: {0}", re.InUse.ToString()); + Console.WriteLine("State: {0}", re.State); + Console.WriteLine("Label: {0}", re.Label); + + foreach (var prefix in re.AddressSpacePrefixes) + { + Console.WriteLine("Address Prefix: {0}", prefix); + } + + foreach (var dns in re.DnsServers) + { + Console.WriteLine("DNS name: {0}", dns.Name); + Console.WriteLine("DNS address: {0}", dns.Address); + Assert.AreEqual("open", dns.Name); + } + Assert.AreEqual(1, re.DnsServers.Count()); + + foreach (var gatewaysite in re.GatewaySites) + { + Console.WriteLine("Gateway Site Name: {0}", gatewaysite.Name); + foreach (var prefix in gatewaysite.AddressSpace.AddressPrefixes) + { + Console.WriteLine("Gateway Site Address Space Prefix: {0}", prefix); + } + Console.WriteLine("VPN Gateway Address: {0}", gatewaysite.VpnGatewayAddress); + Assert.AreEqual("LocalNet1", gatewaysite.Name); + } + Assert.AreEqual(1, re.GatewaySites.Count); + + foreach (var subnet in re.Subnets) + { + Console.WriteLine("Subnet Name: {0}", subnet.Name); + Console.WriteLine("Subnet Address Prefix: {0}", subnet.AddressPrefix); + } + Console.WriteLine(); + } + + // Remove Vnet config + vmPowershellCmdlets.RemoveAzureVNetConfig(); + + Collection vnetSitesAfter = vmPowershellCmdlets.GetAzureVNetSite(null); + + Assert.AreNotEqual(vnetSites.Count, vnetSitesAfter.Count, "No Vnet is removed"); + + foreach (var re in vnetSitesAfter) + { + Console.WriteLine("VNet: {0}", re.Name); + } + + pass = true; + + } + catch (Exception e) + { + if (e.ToString().Contains("while in use")) + { + Console.WriteLine(e.InnerException.ToString()); + } + else + { + pass = false; + Assert.Fail("Exception occurred: {0}", e.ToString()); + } + } + } + + [TestCleanup] + public virtual void CleanUp() + { + Console.WriteLine("Test {0}", pass ? "passed" : "failed"); + + // Cleanup + if ((cleanupIfPassed && pass) || (cleanupIfFailed && !pass)) + { + Console.WriteLine("Starting to clean up created VM and service..."); + CleanupService(serviceName); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/FunctionalTestCommonVM.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/FunctionalTestCommonVM.cs new file mode 100644 index 000000000000..9f71a7de993a --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/FunctionalTestCommonVM.cs @@ -0,0 +1,339 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Reflection; +using System.Security.Cryptography.X509Certificates; +using System.Threading; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests +{ + [TestClass] + public class FunctionalTestCommonVM : ServiceManagementTest + { + private static string defaultService; + private static string defaultVm; + + [ClassInitialize] + public static void ClassInit(TestContext context) + { + if (defaultAzureSubscription.Equals(null)) + { + Assert.Inconclusive("No Subscription is selected!"); + } + + defaultService = Utilities.GetUniqueShortName(serviceNamePrefix); + + defaultVm = Utilities.GetUniqueShortName(vmNamePrefix); + Assert.IsNull(vmPowershellCmdlets.GetAzureVM(defaultVm, defaultService)); + + vmPowershellCmdlets.NewAzureQuickVM(OS.Windows, defaultVm, defaultService, imageName, username, password, locationName); + Console.WriteLine("Service Name: {0} is created.", defaultService); + } + + [TestInitialize] + public void Initialize() + { + pass = false; + testStartTime = DateTime.Now; + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Functional), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Add,Get,Remove)-AzureCertificate)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\certificateData.csv", "certificateData#csv", DataAccessMethod.Sequential)] + public void AzureCertificateTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Certificate files to test + string cerFileName = Convert.ToString(TestContext.DataRow["cerFileName"]); + string pfxFileName = Convert.ToString(TestContext.DataRow["pfxFileName"]); + string password = Convert.ToString(TestContext.DataRow["password"]); + string thumbprintAlgorithm = Convert.ToString(TestContext.DataRow["algorithm"]); + + // Create a certificate + X509Certificate2 certCreated = Utilities.CreateCertificate(password); + byte[] certData = certCreated.Export(X509ContentType.Pfx, password); + File.WriteAllBytes(pfxFileName, certData); + byte[] certData2 = certCreated.Export(X509ContentType.Cert); + File.WriteAllBytes(cerFileName, certData2); + + // Install the .cer file to local machine. + StoreLocation certStoreLocation = StoreLocation.CurrentUser; + StoreName certStoreName = StoreName.My; + X509Certificate2 installedCert = Utilities.InstallCert(cerFileName, certStoreLocation, certStoreName); + + // Certificate1: get it from the installed certificate. + PSObject cert1 = vmPowershellCmdlets.RunPSScript( + String.Format("Get-Item cert:\\{0}\\{1}\\{2}", certStoreLocation.ToString(), certStoreName.ToString(), installedCert.Thumbprint))[0]; + string cert1data = Convert.ToBase64String(((X509Certificate2)cert1.BaseObject).RawData); + + // Certificate2: get it from .pfx file. + X509Certificate2Collection cert2 = new X509Certificate2Collection(); + cert2.Import(pfxFileName, password, X509KeyStorageFlags.PersistKeySet); + string cert2data = Convert.ToBase64String(cert2[0].RawData); + + // Certificate3: get it from .cer file. + X509Certificate2Collection cert3 = new X509Certificate2Collection(); + cert3.Import(cerFileName); + string cert3data = Convert.ToBase64String(cert3[0].RawData); + + try + { + RemoveAllExistingCerts(defaultService); + Assert.Fail("Cert issue is fixed!"); + } + catch (Exception e) + { + if (e.ToString().Contains("InternalError")) + { + Console.WriteLine("This exception is expected: {0}", e); + } + else + { + throw; + } + } + + try + { + // Add a cert item + vmPowershellCmdlets.AddAzureCertificate(defaultService, cert1); + CertificateContext getCert1 = vmPowershellCmdlets.GetAzureCertificate(defaultService).FirstOrDefault(a => a.Thumbprint.Equals(installedCert.Thumbprint)); + Console.WriteLine("Cert is added: {0}", getCert1.Thumbprint); + Assert.AreEqual(getCert1.Data, cert1data, "Cert is different!!"); + + Thread.Sleep(TimeSpan.FromMinutes(2)); + vmPowershellCmdlets.RemoveAzureCertificate(defaultService, getCert1.Thumbprint, thumbprintAlgorithm); + pass = Utilities.CheckRemove(vmPowershellCmdlets.GetAzureCertificate, defaultService, getCert1.Thumbprint, thumbprintAlgorithm); + + // Add .pfx file + vmPowershellCmdlets.AddAzureCertificate(defaultService, pfxFileName, password); + CertificateContext getCert2 = vmPowershellCmdlets.GetAzureCertificate(defaultService, cert2[0].Thumbprint, thumbprintAlgorithm)[0]; + Console.WriteLine("Cert is added: {0}", cert2[0].Thumbprint); + Assert.AreEqual(getCert2.Data, cert2data, "Cert is different!!"); + Thread.Sleep(TimeSpan.FromMinutes(2)); + vmPowershellCmdlets.RemoveAzureCertificate(defaultService, cert2[0].Thumbprint, thumbprintAlgorithm); + pass &= Utilities.CheckRemove(vmPowershellCmdlets.GetAzureCertificate, defaultService, cert2[0].Thumbprint, thumbprintAlgorithm); + + + // Add .cer file + vmPowershellCmdlets.AddAzureCertificate(defaultService, cerFileName); + CertificateContext getCert3 = vmPowershellCmdlets.GetAzureCertificate(defaultService, cert3[0].Thumbprint, thumbprintAlgorithm)[0]; + Console.WriteLine("Cert is added: {0}", cert3[0].Thumbprint); + Assert.AreEqual(getCert3.Data, cert3data, "Cert is different!!"); + Thread.Sleep(TimeSpan.FromMinutes(2)); + vmPowershellCmdlets.RemoveAzureCertificate(defaultService, cert3[0].Thumbprint, thumbprintAlgorithm); + pass &= Utilities.CheckRemove(vmPowershellCmdlets.GetAzureCertificate, defaultService, cert3[0].Thumbprint, thumbprintAlgorithm); + + var certs = vmPowershellCmdlets.GetAzureCertificate(defaultService); + Console.WriteLine("number of certs: {0}", certs.Count); + Utilities.PrintContext(certs); + } + catch (Exception e) + { + pass = false; + Assert.Fail(e.ToString()); + } + } + + private void RemoveAllExistingCerts(string serviceName) + { + vmPowershellCmdlets.RunPSScript(String.Format("{0} -ServiceName {1} | {2}", Utilities.GetAzureCertificateCmdletName, serviceName, Utilities.RemoveAzureCertificateCmdletName)); + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Functional), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Add,Get,Set,Remove)-AzureDataDisk)")] + public void AzureDataDiskTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + string diskLabel1 = "disk1"; + int diskSize1 = 30; + int lunSlot1 = 0; + + string diskLabel2 = "disk2"; + int diskSize2 = 50; + int lunSlot2 = 2; + + + try + { + AddAzureDataDiskConfig dataDiskInfo1 = new AddAzureDataDiskConfig(DiskCreateOption.CreateNew, diskSize1, diskLabel1, lunSlot1); + AddAzureDataDiskConfig dataDiskInfo2 = new AddAzureDataDiskConfig(DiskCreateOption.CreateNew, diskSize2, diskLabel2, lunSlot2); + + vmPowershellCmdlets.AddDataDisk(defaultVm, defaultService, new [] {dataDiskInfo1, dataDiskInfo2}); // Add-AzureDataDisk with Get-AzureVM and Update-AzureVm + + Assert.IsTrue(CheckDataDisk(defaultVm, defaultService, dataDiskInfo1, HostCaching.None), "Data disk is not properly added"); + Console.WriteLine("Data disk added correctly."); + + Assert.IsTrue(CheckDataDisk(defaultVm, defaultService, dataDiskInfo2, HostCaching.None), "Data disk is not properly added"); + Console.WriteLine("Data disk added correctly."); + + vmPowershellCmdlets.SetDataDisk(defaultVm, defaultService, HostCaching.ReadOnly, lunSlot1); + Assert.IsTrue(CheckDataDisk(defaultVm, defaultService, dataDiskInfo1, HostCaching.ReadOnly), "Data disk is not properly changed"); + Console.WriteLine("Data disk is changed correctly."); + + pass = true; + + } + catch (Exception e) + { + pass = false; + Assert.Fail("Exception occurred: {0}", e.ToString()); + } + finally + { + // Remove DataDisks created + foreach (DataVirtualHardDisk disk in vmPowershellCmdlets.GetAzureDataDisk(defaultVm, defaultService)) + { + vmPowershellCmdlets.RemoveDataDisk(defaultVm, defaultService, new[] { disk.Lun }); // Remove-AzureDataDisk + RemoveDisk(disk.DiskName, 10); + } + Assert.AreEqual(0, vmPowershellCmdlets.GetAzureDataDisk(defaultVm, defaultService).Count, "DataDisk is not removed."); + } + } + + private void RemoveDisk(string diskName, int maxTry) + { + for (int i = 0; i <= maxTry ; i++) + { + try + { + vmPowershellCmdlets.RemoveAzureDisk(diskName, false); + break; + } + catch (Exception e) + { + if (i == maxTry) + { + Console.WriteLine("Max try reached. Couldn't delete the Virtual disk"); + } + if (e.ToString().Contains("currently in use")) + { + Thread.Sleep(TimeSpan.FromSeconds(30)); + continue; + } + } + } + } + + private bool CheckDataDisk(string vmName, string serviceName, AddAzureDataDiskConfig dataDiskInfo, HostCaching hc) + { + bool found = false; + foreach (DataVirtualHardDisk disk in vmPowershellCmdlets.GetAzureDataDisk(vmName, serviceName)) + { + Console.WriteLine("DataDisk - Name:{0}, Label:{1}, Size:{2}, LUN:{3}, HostCaching: {4}", disk.DiskName, disk.DiskLabel, disk.LogicalDiskSizeInGB, disk.Lun, disk.HostCaching); + if (disk.DiskLabel == dataDiskInfo.DiskLabel && disk.LogicalDiskSizeInGB == dataDiskInfo.DiskSizeGB && disk.Lun == dataDiskInfo.LunSlot) + { + if (disk.HostCaching == hc.ToString()) + { + found = true; + Console.WriteLine("DataDisk found: {0}", disk.DiskLabel); + } + } + } + return found; + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Functional), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet Set-AzureAvailabilitySet)")] + public void AzureAvailabilitySetTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + string testAVSetName = "testAVSet1"; + + try + { + var vm = vmPowershellCmdlets.SetAzureAvailabilitySet(defaultVm, defaultService, testAVSetName); + vmPowershellCmdlets.UpdateAzureVM(defaultVm, defaultService, vm); + Assert.IsTrue(Verify.AzureAvailabilitySet(vmPowershellCmdlets.GetAzureVM(defaultVm, defaultService).VM, testAVSetName)); + + vm = vmPowershellCmdlets.SetAzureAvailabilitySet(defaultVm, defaultService, string.Empty); + vmPowershellCmdlets.UpdateAzureVM(defaultVm, defaultService, vm); + Assert.IsTrue(Verify.AzureAvailabilitySet(vmPowershellCmdlets.GetAzureVM(defaultVm, defaultService).VM, string.Empty)); + + vm = vmPowershellCmdlets.SetAzureAvailabilitySet(defaultVm, defaultService, testAVSetName); + vmPowershellCmdlets.UpdateAzureVM(defaultVm, defaultService, vm); + Assert.IsTrue(Verify.AzureAvailabilitySet(vmPowershellCmdlets.GetAzureVM(defaultVm, defaultService).VM, testAVSetName)); + + vm = vmPowershellCmdlets.SetAzureAvailabilitySet(defaultVm, defaultService, null); + vmPowershellCmdlets.UpdateAzureVM(defaultVm, defaultService, vm); + Assert.IsTrue(Verify.AzureAvailabilitySet(vmPowershellCmdlets.GetAzureVM(defaultVm, defaultService).VM, testAVSetName)); + + vm = vmPowershellCmdlets.RemoveAzureAvailabilitySet(defaultVm, defaultService); + vmPowershellCmdlets.UpdateAzureVM(defaultVm, defaultService, vm); + Assert.IsTrue(Verify.AzureAvailabilitySet(vmPowershellCmdlets.GetAzureVM(defaultVm, defaultService).VM, testAVSetName)); + + pass = true; + } + catch (Exception e) + { + pass = false; + Assert.Fail("Exception occurred: {0}", e.ToString()); + } + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Functional), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Get,Set)-AzureOSDisk)")] + public void AzureOSDiskTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + PersistentVM vm = vmPowershellCmdlets.GetAzureVM(defaultVm, defaultService).VM; + Assert.IsTrue(Verify.AzureOsDisk(vm, "Windows", HostCaching.ReadWrite)); + + PersistentVM vm2 = vmPowershellCmdlets.SetAzureOSDisk(HostCaching.ReadOnly, vm); + Assert.IsTrue(Verify.AzureOsDisk(vm2, "Windows", HostCaching.ReadOnly)); + + pass = true; + + } + catch (Exception e) + { + pass = false; + Assert.Fail("Exception occurred: {0}", e.ToString()); + } + } + + [TestCleanup] + public virtual void CleanUp() + { + Console.WriteLine("Test {0}", pass ? "passed" : "failed"); + } + + [ClassCleanup] + public static void ClassCleanUp() + { + CleanupService(defaultService); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/FunctionalTestCommonVhd.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/FunctionalTestCommonVhd.cs new file mode 100644 index 000000000000..1ef6e4d15619 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/FunctionalTestCommonVhd.cs @@ -0,0 +1,427 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.IO; +using System.Linq; +using System.Reflection; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests +{ + [TestClass] + public class FunctionalTestCommonVhd : ServiceManagementTest + { + private const string vhdNamePrefix = "os.vhd"; + private string vhdName; + protected static string vhdBlobLocation; + + [ClassInitialize] + public static void ClassInit(TestContext context) + { + //SetTestSettings(); + + if (defaultAzureSubscription.Equals(null)) + { + Assert.Inconclusive("No Subscription is selected!"); + } + + vhdBlobLocation = string.Format("{0}{1}/{2}", blobUrlRoot, vhdContainerName, vhdNamePrefix); + if (string.IsNullOrEmpty(localFile)) + { + try + { + //CredentialHelper.CopyTestData(testDataContainer, osVhdName, vhdContainerName, vhdNamePrefix); + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + Assert.Inconclusive("Upload vhd is not set!"); + } + } + else + { + try + { + vmPowershellCmdlets.AddAzureVhd(new FileInfo(localFile), vhdBlobLocation); + } + catch (Exception e) + { + if (e.ToString().Contains("already exists")) + { + // Use the already uploaded vhd. + Console.WriteLine("Using already uploaded blob.."); + } + else + { + throw; + } + } + } + } + + [TestInitialize] + public void Initialize() + { + //vhdName = Utilities.GetUniqueShortName(vhdNamePrefix); + //CopyCommonVhd(vhdContainerName, vhdNamePrefix, vhdName); + pass = false; + testStartTime = DateTime.Now; + } + + [TestMethod(), TestCategory(Category.Functional), TestCategory(Category.BVT), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Add,Get,Update,Remove)-AzureDisk)")] + public void AzureDiskTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + vhdName = "os0.vhd"; + string mediaLocation = String.Format("{0}{1}/{2}", blobUrlRoot, vhdContainerName, vhdName); + + try + { + vmPowershellCmdlets.AddAzureDisk(vhdName, mediaLocation, vhdName, null); + + bool found = false; + foreach (DiskContext disk in vmPowershellCmdlets.GetAzureDisk(vhdName)) + { + Console.WriteLine("Disk: Name - {0}, Label - {1}, Size - {2},", disk.DiskName, disk.Label, disk.DiskSizeInGB); + if (disk.DiskName == vhdName && disk.Label == vhdName) + { + found = true; + Console.WriteLine("{0} is found", disk.DiskName); + } + + } + Assert.IsTrue(found, "Error: Disk is not added"); + + string newLabel = "NewLabel"; + vmPowershellCmdlets.UpdateAzureDisk(vhdName, newLabel); + + DiskContext disk2 = vmPowershellCmdlets.GetAzureDisk(vhdName)[0]; + + Console.WriteLine("Disk: Name - {0}, Label - {1}, Size - {2},", disk2.DiskName, disk2.Label, disk2.DiskSizeInGB); + Assert.AreEqual(newLabel, disk2.Label); + Console.WriteLine("Disk Label is successfully updated"); + + vmPowershellCmdlets.RemoveAzureDisk(vhdName, false); + Assert.IsTrue(Utilities.CheckRemove(vmPowershellCmdlets.GetAzureDisk, vhdName), "The disk was not removed"); + pass = true; + } + catch (Exception e) + { + pass = false; + + if (e.ToString().Contains("ResourceNotFound")) + { + Console.WriteLine("Please upload {0} file to \\vhdtest\\ blob directory before running this test", vhdName); + } + + Assert.Fail("Exception occurs: {0}", e.ToString()); + } + } + + private void CopyCommonVhd(string vhdContainerName, string vhdName, string myVhdName) + { + vmPowershellCmdlets.RunPSScript(string.Format("Start-AzureStorageBlobCopy -SrcContainer {0} -SrcBlob {1} -DestContainer {2} -DestBlob {3}", vhdContainerName, vhdName, vhdContainerName, myVhdName)); + } + + [TestMethod(), TestCategory(Category.Functional), TestCategory(Category.BVT), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Add,Get,Save,Update,Remove)-AzureVMImage)")] + public void AzureVMImageTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + vhdName = "os1.vhd"; + string newImageName = Utilities.GetUniqueShortName("vmimage"); + string mediaLocation = string.Format("{0}{1}/{2}", blobUrlRoot, vhdContainerName, vhdName); + + string oldLabel = "old label"; + string newLabel = "new label"; + + try + { + OSImageContext result = vmPowershellCmdlets.AddAzureVMImage(newImageName, mediaLocation, OS.Windows, oldLabel); + + OSImageContext resultReturned = vmPowershellCmdlets.GetAzureVMImage(newImageName)[0]; + Assert.IsTrue(!string.IsNullOrEmpty(resultReturned.IOType)); + Assert.IsTrue(CompareContext(result, resultReturned)); + + result = vmPowershellCmdlets.UpdateAzureVMImage(newImageName, newLabel); + resultReturned = vmPowershellCmdlets.GetAzureVMImage(newImageName)[0]; + Assert.IsTrue(!string.IsNullOrEmpty(resultReturned.IOType)); + Assert.IsTrue(CompareContext(result, resultReturned)); + + result = vmPowershellCmdlets.UpdateAzureVMImage(newImageName, newLabel, true); + resultReturned = vmPowershellCmdlets.GetAzureVMImage(newImageName)[0]; + Assert.IsTrue(resultReturned.ShowInGui.HasValue && !resultReturned.ShowInGui.Value); + Assert.IsTrue(CompareContext(result, resultReturned)); + + vmPowershellCmdlets.RemoveAzureVMImage(newImageName, false); + Assert.IsTrue(Utilities.CheckRemove(vmPowershellCmdlets.GetAzureVMImage, newImageName)); + + pass = true; + } + catch (Exception e) + { + pass = false; + Assert.Fail("Exception occurred: {0}", e.ToString()); + } + finally + { + if (!Utilities.CheckRemove(vmPowershellCmdlets.GetAzureVMImage, newImageName)) + { + vmPowershellCmdlets.RemoveAzureVMImage(newImageName, false); + } + } + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Functional), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Set-AzureVMSize)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\overwrite_VHD.csv", "overwrite_VHD#csv", DataAccessMethod.Sequential)] + public void AzureVMImageSizeTest() + { + string mediaLocation = UploadVhdFile(); + string newImageName = Utilities.GetUniqueShortName("vmimage"); + + try + { + var instanceSizes = vmPowershellCmdlets.GetAzureRoleSize().Where(r => r.Cores <= 2 && !r.InstanceSize.StartsWith("Standard_")); + const int numOfMinimumInstSize = 3; + Assert.IsTrue(instanceSizes.Count() >= numOfMinimumInstSize); + var instanceSizesArr = instanceSizes.Take(numOfMinimumInstSize).ToArray(); + int arrayLength = instanceSizesArr.Count(); + + for (int i = 0; i < arrayLength; i++) + { + Utilities.PrintContext(instanceSizesArr[i]); + // Add-AzureVMImage test for VM size + OSImageContext result = vmPowershellCmdlets.AddAzureVMImage(newImageName, mediaLocation, OS.Windows, null, instanceSizesArr[i].InstanceSize); + OSImageContext resultReturned = vmPowershellCmdlets.GetAzureVMImage(newImageName)[0]; + Assert.IsTrue(!string.IsNullOrEmpty(resultReturned.IOType)); + Assert.IsTrue(CompareContext(result, resultReturned)); + + // Update-AzureVMImage test for VM size + System.Threading.Thread.Sleep(TimeSpan.FromSeconds(10)); + result = vmPowershellCmdlets.UpdateAzureVMImage(newImageName, resultReturned.ImageName, instanceSizesArr[Math.Max((i + 1) % arrayLength, 1)].InstanceSize); + resultReturned = vmPowershellCmdlets.GetAzureVMImage(newImageName)[0]; + Assert.IsTrue(!string.IsNullOrEmpty(resultReturned.IOType)); + Assert.IsTrue(CompareContext(result, resultReturned)); + + vmPowershellCmdlets.RemoveAzureVMImage(newImageName); + System.Threading.Thread.Sleep(TimeSpan.FromSeconds(10)); + pass = true; + } + } + catch (Exception e) + { + pass = false; + System.Threading.Thread.Sleep(TimeSpan.FromSeconds(10)); + vmPowershellCmdlets.RemoveAzureVMImage(newImageName, true); + Console.WriteLine("Exception occurred: {0}", e.ToString()); + throw; + } + finally + { + try + { + vmPowershellCmdlets.GetAzureVMImage(newImageName); + vmPowershellCmdlets.RemoveAzureVMImage(newImageName); + } + catch (Exception e) + { + if (e.ToString().Contains("ResourceNotFound")) + { + Console.WriteLine("The vm image, {0}, is already deleted.", newImageName); + } + else + { + throw; + } + } + } + } + + [TestMethod(), TestCategory(Category.Functional), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Set-AzureVMSize, Get-AzureRoleSize)")] + public void HiMemVMSizeTest() + { + string serviceName = Utilities.GetUniqueShortName(serviceNamePrefix); + string vmName = Utilities.GetUniqueShortName(vmNamePrefix); + + try + { + // New-AzureQuickVM test for VM size 'A5' + vmPowershellCmdlets.NewAzureQuickVM(OS.Windows, vmName, serviceName, imageName, username, password, locationName, InstanceSize.A5.ToString()); + PersistentVMRoleContext result = vmPowershellCmdlets.GetAzureVM(vmName, serviceName); + RoleSizeContext returnedSize = vmPowershellCmdlets.GetAzureRoleSize(result.InstanceSize)[0]; + Assert.AreEqual(InstanceSize.A5.ToString(), returnedSize.InstanceSize); + Console.WriteLine("VM size, {0}, is verified for New-AzureQuickVM", InstanceSize.A5); + vmPowershellCmdlets.RemoveAzureService(serviceName); + + // New-AzureQuickVM test for VM size 'A6' + vmPowershellCmdlets.NewAzureQuickVM(OS.Windows, vmName, serviceName, imageName, username, password, locationName, InstanceSize.A6.ToString()); + result = vmPowershellCmdlets.GetAzureVM(vmName, serviceName); + returnedSize = vmPowershellCmdlets.GetAzureRoleSize(result.InstanceSize)[0]; + Assert.AreEqual(InstanceSize.A6.ToString(), returnedSize.InstanceSize); + Console.WriteLine("VM size, {0}, is verified for New-AzureQuickVM", InstanceSize.A6); + vmPowershellCmdlets.RemoveAzureService(serviceName); + + // New-AzureVMConfig test for VM size 'A7' + var azureVMConfigInfo = new AzureVMConfigInfo(vmName, InstanceSize.A7.ToString(), imageName); + var azureProvisioningConfig = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var persistentVMConfigInfo = new PersistentVMConfigInfo(azureVMConfigInfo, azureProvisioningConfig, null, null); + PersistentVM vm = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, locationName); + result = vmPowershellCmdlets.GetAzureVM(vmName, serviceName); + returnedSize = vmPowershellCmdlets.GetAzureRoleSize(result.InstanceSize)[0]; + Assert.AreEqual(InstanceSize.A7.ToString(), returnedSize.InstanceSize); + Console.WriteLine("VM size, {0}, is verified for New-AzureVMConfig", InstanceSize.A7); + + // Set-AzureVMSize test for Hi-MEM VM size (A7 to A6) + vmPowershellCmdlets.SetVMSize(vmName, serviceName, new SetAzureVMSizeConfig(InstanceSize.A6.ToString())); + result = vmPowershellCmdlets.GetAzureVM(vmName, serviceName); + returnedSize = vmPowershellCmdlets.GetAzureRoleSize(result.InstanceSize)[0]; + Assert.AreEqual(InstanceSize.A6.ToString(), returnedSize.InstanceSize); + Console.WriteLine("SetVMSize is verified from A7 to A6"); + + // Set-AzureVMSize test for Hi-MEM VM size (A6 to A5) + vmPowershellCmdlets.SetVMSize(vmName, serviceName, new SetAzureVMSizeConfig(InstanceSize.A5.ToString())); + result = vmPowershellCmdlets.GetAzureVM(vmName, serviceName); + returnedSize = vmPowershellCmdlets.GetAzureRoleSize(result.InstanceSize)[0]; + Assert.AreEqual(InstanceSize.A5.ToString(), returnedSize.InstanceSize); + Console.WriteLine("SetVMSize is verified from A6 to A5"); + + pass = true; + } + catch (Exception e) + { + pass = false; + Console.WriteLine("Exception occurred: {0}", e.ToString()); + throw; + } + finally + { + if (!Utilities.CheckRemove(vmPowershellCmdlets.GetAzureService, serviceName)) + { + if ((cleanupIfFailed && !pass) || (cleanupIfPassed && pass)) + { + vmPowershellCmdlets.RemoveAzureService(serviceName); + } + } + } + } + + [TestMethod(), TestCategory(Category.Functional), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Set-AzureVMSize, Get-AzureRoleSize)")] + public void RegularVMSizeTest() + { + string serviceName = Utilities.GetUniqueShortName(serviceNamePrefix); + string vmName = Utilities.GetUniqueShortName(vmNamePrefix); + + try + { + var instanceSizes = vmPowershellCmdlets.GetAzureRoleSize().ToArray(); + vmPowershellCmdlets.NewAzureQuickVM(OS.Windows, vmName, serviceName, imageName, username, password, locationName, instanceSizes[1].InstanceSize); + + foreach (var instanceSize in instanceSizes) + { + PersistentVMRoleContext result; + RoleSizeContext returnedSize; + + var size = instanceSize.InstanceSize; + if (!size.Equals(InstanceSize.A5.ToString()) && !size.Equals(InstanceSize.A6.ToString()) && !size.Equals(InstanceSize.A7.ToString()) + && !size.Equals(InstanceSize.A8.ToString()) && !size.Equals(InstanceSize.A9.ToString()) && !size.Contains("Standard_D")) + { + // Set-AzureVMSize test for regular VM size + vmPowershellCmdlets.SetVMSize(vmName, serviceName, new SetAzureVMSizeConfig(size)); + result = vmPowershellCmdlets.GetAzureVM(vmName, serviceName); + returnedSize = vmPowershellCmdlets.GetAzureRoleSize(result.InstanceSize)[0]; + Assert.AreEqual(size, returnedSize.InstanceSize); + Console.WriteLine("VM size, {0}, is verified for Set-AzureVMSize", size); + } + + if (size.Equals(InstanceSize.ExtraLarge.ToString())) + { + vmPowershellCmdlets.SetVMSize(vmName, serviceName, new SetAzureVMSizeConfig(InstanceSize.Small.ToString())); + result = vmPowershellCmdlets.GetAzureVM(vmName, serviceName); + returnedSize = vmPowershellCmdlets.GetAzureRoleSize(result.InstanceSize)[0]; + Assert.AreEqual(InstanceSize.Small.ToString(), returnedSize.InstanceSize); + } + } + + pass = true; + } + catch (Exception e) + { + pass = false; + Console.WriteLine("Exception occurred: {0}", e.ToString()); + throw; + } + finally + { + if (!Utilities.CheckRemove(vmPowershellCmdlets.GetAzureService, serviceName)) + { + if ((cleanupIfFailed && !pass) || (cleanupIfPassed && pass)) + { + vmPowershellCmdlets.RemoveAzureService(serviceName); + } + } + } + } + + private bool CompareContext(T obj1, T obj2) + { + bool result = true; + Type type = typeof(T); + + foreach(PropertyInfo property in type.GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly)) + { + string typeName = property.PropertyType.FullName; + if (typeName.Equals("System.String") || typeName.Equals("System.Int32") || typeName.Equals("System.Uri") || typeName.Contains("Nullable")) + { + // To Hyonho: This is my temp fix for the test. + // Please verify and make correct changes. + if (typeName.Contains("System.DateTime")) + { + continue; + } + + var obj1Value = property.GetValue(obj1, null); + var obj2Value = property.GetValue(obj2, null); + + if (obj1Value == null) + { + result &= (obj2Value == null); + } + else + { + result &= (obj1Value.Equals(obj2Value)); + } + } + else + { + Console.WriteLine("This type is not compared: {0}", typeName); + } + } + + return result; + } + + [TestCleanup] + public virtual void CleanUp() + { + Console.WriteLine("Test {0}", pass ? "passed" : "failed"); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/GenericIaaSExtensionTests.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/GenericIaaSExtensionTests.cs new file mode 100644 index 000000000000..d1abbb377cf2 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/GenericIaaSExtensionTests.cs @@ -0,0 +1,429 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Linq; +using System.Threading; +using System.Xml; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests +{ + [TestClass] + public class GenericIaaSExtensionTests:ServiceManagementTest + { + private string serviceName; + private string vmName; + private const string referenceNamePrefix = "Reference"; + private string vmAccessUserName; + private string vmAccessPassword; + private string publicConfiguration; + private string privateConfiguration; + private string publicConfigPath; + private string privateConfigPath; + private VirtualMachineExtensionImageContext vmAccessExtension; + private string version = "1.0"; + string rdpPath = @".\AzureVM.rdp"; + string dns; + int port; + private string referenceName; + string localPath; + private const string publisher = "Microsoft.Compute"; + private const string VmAccessAgentExtensionName = "VMAccessAgent"; + + [ClassInitialize] + public static void Intialize(TestContext context) + { + imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows" }, false); + } + + [TestInitialize] + public void TestIntialize() + { + pass = false; + serviceName = Utilities.GetUniqueShortName(serviceNamePrefix); + vmName = Utilities.GetUniqueShortName(vmNamePrefix); + testStartTime = DateTime.Now; + GetVmAccessConfiguration(); + referenceName = Utilities.GetUniqueShortName(referenceNamePrefix); + localPath = Path.Combine(Environment.CurrentDirectory, serviceName + ".xml").ToString(); + } + + [TestCleanup] + public void TestCleanUp() + { + CleanupService(serviceName); + } + + [ClassCleanup] + public static void ClassCleanUp() + { + + } + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "IAAS"), Priority(0), Owner("hylee"), Description("Test the cmdlet ((Get,Set)-AzureVMExtension)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\package.csv", "package#csv", DataAccessMethod.Sequential)] + public void AzureVMExtensionTest() + { + try + { + + //Get the available VM Extension + + var availableExtensions = vmPowershellCmdlets.GetAzureVMAvailableExtension(); + vmAccessExtension = availableExtensions.First(extension => extension.ExtensionName.Equals(VmAccessAgentExtensionName)); + if (availableExtensions.Count > 0) + { + + //var VMExtensionConfigTemplate = vmPowershellCmdlets.GetAzureVMExtensionConfigTemplate(vmAccessExtension.ExtensionName, vmAccessExtension.Publisher, localPath, version); + + //Deploy a new IaaS VM with Extension using Add-AzureVMExtension + Console.WriteLine("Create a new VM with VM access extension."); + var vm = CreateIaaSVMObject(vmName); + vm = vmPowershellCmdlets.SetAzureVMExtension(vm, vmAccessExtension.ExtensionName, vmAccessExtension.Publisher, version, referenceName, publicConfigPath: publicConfigPath, privateConfigPath:privateConfigPath, disable: false); + + vmPowershellCmdlets.NewAzureVM(serviceName,new[] {vm},locationName,true); + Console.WriteLine("Created a new VM {0} with VM access extension. Service Name : {1}",vmName,serviceName); + + ValidateVMAccessExtension(vmName, serviceName, true); + //Verify that the extension actually work + VerifyRDPExtension(vmName, serviceName); + + //Disbale extesnion + DisableExtension(vmName, serviceName); + + ValidateVMAccessExtension(vmName, serviceName, false); + pass = true; + } + else + { + Console.WriteLine("There are no Azure VM extension available"); + } + + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + } + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "IAAS"), Priority(0), Owner("hylee"), Description("Test the cmdlet ((Get,Set)-AzureVMExtension)")] + public void UpdateVMWithExtensionTest() + { + try + { + var availableExtensions = vmPowershellCmdlets.GetAzureVMAvailableExtension(); + if (availableExtensions.Count > 0) + { + + vmAccessExtension = availableExtensions.First(extension => extension.ExtensionName.Equals(VmAccessAgentExtensionName)); + + //Deploy a new IaaS VM with Extension using Add-AzureVMExtension + var vm = CreateIaaSVMObject(vmName); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, locationName); + + vm = GetAzureVM(vmName, serviceName); + + vm = vmPowershellCmdlets.SetAzureVMExtension(vm, + vmAccessExtension.ExtensionName, + vmAccessExtension.Publisher, + vmAccessExtension.Version, + referenceName, + publicConfiguration, + privateConfiguration, + "pubkey1", + "prikey1"); + vmPowershellCmdlets.UpdateAzureVM(vmName, serviceName, vm); + + var updatedVM = vmPowershellCmdlets.GetAzureVM(vmName, serviceName); + var updatedExt = updatedVM.VM.ResourceExtensionReferences.First( + e => e.Name == vmAccessExtension.ExtensionName && + e.Publisher == vmAccessExtension.Publisher && + e.Version == vmAccessExtension.Version); + Assert.IsTrue(updatedExt.ResourceExtensionParameterValues.Any(r => r.Type == "Public" && r.Key == "pubkey1")); + + ValidateVMAccessExtension(vmName, serviceName, true); + + vmPowershellCmdlets.RemoveAzureVMExtension(GetAzureVM(vmName, serviceName), vmAccessExtension.ExtensionName, vmAccessExtension.Publisher); + pass = true; + } + else + { + Console.WriteLine("There are no Azure VM extension available"); + } + pass = true; + + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + } + + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "IAAS"), Priority(0), Owner("hylee"), Description("Test the cmdlet ((Get,Set)-AzureVMExtension)")] + public void AddRoleWithExtensionTest() + { + try + { + var availableExtensions = vmPowershellCmdlets.GetAzureVMAvailableExtension(); + vmAccessExtension = availableExtensions.First(extension => extension.ExtensionName.Equals(VmAccessAgentExtensionName)); + //Create an deployment + + var vm1 = CreateIaaSVMObject(vmName); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm1 }, locationName); + //Add a role with extension enabled. + + string referenceName = Utilities.GetUniqueShortName(referenceNamePrefix); + string vmName2 = Utilities.GetUniqueShortName(vmNamePrefix); + var vm2 = CreateIaaSVMObject(vmName2); + vm2 = vmPowershellCmdlets.SetAzureVMExtension(vm2, vmAccessExtension.ExtensionName, vmAccessExtension.Publisher, version, referenceName, publicConfiguration, privateConfiguration, disable: false); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm2 }); + + ValidateVMAccessExtension(vmName2, serviceName, true); + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + + + } + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "IAAS"), Priority(0), Owner("hylee"), Description("Test the cmdlet ((Get,Set)-AzureVMExtension)")] + public void UpdateRoleWithExtensionTest() + { + try + { + var availableExtensions = vmPowershellCmdlets.GetAzureVMAvailableExtension(); + var vmAccessExtension = availableExtensions.First(extension => extension.ExtensionName.Equals(VmAccessAgentExtensionName)); + + var vm1 = CreateIaaSVMObject(vmName); + + string vmName2 = Utilities.GetUniqueShortName(vmNamePrefix); + var vm2 = CreateIaaSVMObject(vmName2); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm1, vm2 }, locationName); + + vm2 = GetAzureVM(vmName2, serviceName); + vm2 = vmPowershellCmdlets.SetAzureVMExtension(vm2, vmAccessExtension.ExtensionName, vmAccessExtension.Publisher, vmAccessExtension.Version, referenceName, publicConfiguration, privateConfiguration, disable: false); + vmPowershellCmdlets.UpdateAzureVM(vmName2, serviceName, vm2); + + ValidateVMAccessExtension(vmName2, serviceName, true); + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + + } + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "IAAS"), Priority(0), Owner("hylee"), Description("Test the cmdlet (Get-AzureVMAvailableExtension)")] + public void GetAzureVMAvailableExtensionTest() + { + try + { + var availableExtensions = vmPowershellCmdlets.GetAzureVMAvailableExtension(); + foreach (var extension in availableExtensions) + { + ValidateAvailableExtesnion(extension); + } + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + } + + public void ValidateAvailableExtesnion(VirtualMachineExtensionImageContext extension) + { + Utilities.PrintContext(extension); + Assert.IsFalse(string.IsNullOrEmpty(extension.ExtensionName)); + Assert.IsFalse(string.IsNullOrEmpty(extension.Publisher)); + Assert.IsFalse(string.IsNullOrEmpty(extension.Version)); + + // Intentionally commented as the cmdlet prod cmdlet doesnt have these properties and dogfood returns errors + // now + //Assert.IsTrue(extension.ReplicationCompleted); + //Assert.IsTrue(Utilities.validateHttpUri(extension.PrivacyUri.ToString())); + //Assert.IsTrue(Utilities.validateHttpUri(extension.PrivacyUri.ToString())); + //Assert.IsTrue(Utilities.validateHttpUri(extension.Eula.ToString())); + + switch (extension.ExtensionName) + { + //case "BGInfo": + // { + // Assert.IsTrue(extension.ReplicationCompleted); + // break; + // } + case "DiagnosticsAgent": + { + Assert.IsFalse(string.IsNullOrEmpty(extension.PublicConfigurationSchema)); + break; + } + case "VMAccessAgent": + { + Assert.IsFalse(string.IsNullOrEmpty(extension.PublicConfigurationSchema)); + Assert.IsFalse(string.IsNullOrEmpty(extension.PrivateConfigurationSchema)); + //Assert.IsFalse(string.IsNullOrEmpty(extension.SampleConfig)); + break; + } + } + } + + + private PersistentVM CreateIaaSVMObject(string vmName) + { + //Create an IaaS VM with a static CA. + var azureVMConfigInfo = new AzureVMConfigInfo(vmName, InstanceSize.Small.ToString(), imageName); + var azureProvisioningConfig = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var persistentVMConfigInfo = new PersistentVMConfigInfo(azureVMConfigInfo, azureProvisioningConfig, null, null); + return vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo); + } + + private void CreateNewAzureVM() + { + var azureVMConfigInfo = new AzureVMConfigInfo(vmName, InstanceSize.Small.ToString(), imageName); + var azureProvisioningConfig = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var persistentVMConfigInfo = new PersistentVMConfigInfo(azureVMConfigInfo, azureProvisioningConfig, null, null); + PersistentVM vm = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, locationName); + } + + private void VerifyRDPExtension() + { + vmPowershellCmdlets.GetAzureRemoteDesktopFile(vmName, serviceName, rdpPath, false); + using (StreamReader stream = new StreamReader(rdpPath)) + { + string firstLine = stream.ReadLine(); + dns = Utilities.FindSubstring(firstLine, ':', 2); + } + + Assert.IsTrue((Utilities.RDPtestIaaS(dns, 0, vmAccessUserName, vmAccessPassword, true)), "Cannot RDP to the instance!!"); + } + + private void GetVmAccessConfiguration() + { + privateConfigPath = Path.Combine(Directory.GetCurrentDirectory(), "PrivateConfig.xml"); + publicConfigPath = Path.Combine(Directory.GetCurrentDirectory(), "PublicConfig.xml"); + privateConfiguration = FileUtilities.DataStore.ReadFileAsText(privateConfigPath); + publicConfiguration = FileUtilities.DataStore.ReadFileAsText(publicConfigPath); + + XmlDocument doc = new XmlDocument(); + doc.LoadXml(publicConfiguration); + vmAccessUserName = doc.GetElementsByTagName("UserName")[0].InnerText; + doc.LoadXml(privateConfiguration); + vmAccessPassword = doc.GetElementsByTagName("Password")[0].InnerText; + } + + private VirtualMachineExtensionContext GetAzureVMAccessExtesnion(string vmName, string serviceName) + { + Console.WriteLine("Get Azure VM's extension"); + var vmExtensions = vmPowershellCmdlets.GetAzureVMExtension(GetAzureVM(vmName, serviceName), VmAccessAgentExtensionName, publisher); + var vmExtension = vmExtensions !=null ? vmExtensions[0] : null; + if (vmExtension != null) + { + Utilities.PrintContext(vmExtension); + Console.WriteLine("Azure VM's extension info retrieved successfully."); + } + else + { + Console.WriteLine("VM Access extesnion is not applied to the VM"); + } + return vmExtension; + } + + private PersistentVM GetAzureVM(string vmName, string serviceName) + { + Console.WriteLine("Fetch Azure VM details"); + var vmRoleContext = vmPowershellCmdlets.GetAzureVM(vmName, serviceName); + Console.WriteLine("Azure VM details retreived successfully"); + return vmRoleContext.VM; + } + + private void ValidateLogin(string dns, int port, string vmAccessUserName, string vmAccessPassword) + { + Assert.IsTrue((Utilities.RDPtestIaaS(dns, port, vmAccessUserName, vmAccessPassword, true)), "Cannot RDP to the instance!!"); + } + + private void VerifyRDPExtension(string vmName, string serviceName) + { + Console.WriteLine("Fetching Azure VM RDP file"); + vmPowershellCmdlets.GetAzureRemoteDesktopFile(vmName, serviceName, rdpPath, false); + using (StreamReader stream = new StreamReader(rdpPath)) + { + string firstLine = stream.ReadLine(); + var dnsAndport = Utilities.FindSubstring(firstLine, ':', 2).Split(new char[] { ':' }); + dns = dnsAndport[0]; + port = int.Parse(dnsAndport[1]); + } + Console.WriteLine("Azure VM RDP file downloaded."); + + Console.WriteLine("Waiting for a minute vefore trying to connect to VM"); + Thread.Sleep(TimeSpan.FromMinutes(4)); + Utilities.RetryActionUntilSuccess(() => ValidateLogin(dns, port, vmAccessUserName, vmAccessPassword), "Cannot RDP to the instance!!", 5, 10000); + + } + + private void DisableExtension(string vmName, string serviceName) + { + var vm = GetAzureVM(vmName, serviceName); + Console.WriteLine("Disabling the VM Access extesnion for the vm {0}", vmName); + vm = vmPowershellCmdlets.SetAzureVMExtension(vm, vmAccessExtension.ExtensionName, vmAccessExtension.Publisher, version, referenceName, disable: true); + vmPowershellCmdlets.UpdateAzureVM(vmName, serviceName, vm); + Console.WriteLine("Disabled VM Access extesnion for the vm {0}", vmName); + } + + + + + private void ValidateVMAccessExtension(string vmName, string serviceName, bool enabled) + { + var vmExtension = GetAzureVMAccessExtesnion(vmName, serviceName); + Utilities.PrintContext(vmExtension); + if(enabled) + { + Console.WriteLine("Verifying the enabled extension"); + Assert.AreEqual("Enable", vmExtension.State, "State is not Enable"); + //Assert.IsFalse(string.IsNullOrEmpty(vmExtension.PublicConfiguration), "PublicConfiguration is empty."); + XmlDocument doc = new XmlDocument(); + doc.LoadXml(vmExtension.PublicConfiguration); + XmlDocument inputPublicConfigDoc = new XmlDocument(); + inputPublicConfigDoc.LoadXml(publicConfiguration); + Assert.AreEqual(inputPublicConfigDoc.GetElementsByTagName("PublicConfig")[0].InnerXml, doc.GetElementsByTagName("PublicConfig")[0].InnerXml); + Console.WriteLine("Verifed the enabled extension successfully."); + } + else + { + Console.WriteLine("Verifying the disabled extension"); + Assert.AreEqual("Disable", vmExtension.State, "State is not Disable"); + Console.WriteLine("Verifed the disabled extension successfully."); + } + Assert.IsNull(vmExtension.PrivateConfiguration); + } + + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureCertificateCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureCertificateCmdletInfo.cs new file mode 100644 index 000000000000..fe08a3636f5a --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureCertificateCmdletInfo.cs @@ -0,0 +1,34 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class AddAzureCertificateCmdletInfo : CmdletsInfo + { + public AddAzureCertificateCmdletInfo(string serviceName, PSObject cert, string password) + { + cmdletName = Utilities.AddAzureCertificateCmdletName; + + cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + cmdletParams.Add(new CmdletParam("CertToDeploy", cert)); + if (password != null) + { + cmdletParams.Add(new CmdletParam("Password", password)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureDataDiskCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureDataDiskCmdletInfo.cs new file mode 100644 index 000000000000..bc9125dc2897 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureDataDiskCmdletInfo.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class AddAzureDataDiskCmdletInfo : CmdletsInfo + { + public AddAzureDataDiskCmdletInfo(AddAzureDataDiskConfig diskConfig) + { + this.cmdletName = Utilities.AddAzureDataDiskCmdletName; + + this.cmdletParams.Add(new CmdletParam("CreateNew", null)); + this.cmdletParams.Add(new CmdletParam("DiskSizeInGB", diskConfig.DiskSizeGB)); + this.cmdletParams.Add(new CmdletParam("DiskLabel", diskConfig.DiskLabel)); + this.cmdletParams.Add(new CmdletParam("LUN", diskConfig.LunSlot)); + this.cmdletParams.Add(new CmdletParam("VM", diskConfig.Vm)); + if (!string.IsNullOrEmpty(diskConfig.HostCaching)) + this.cmdletParams.Add(new CmdletParam("HostCaching",diskConfig.HostCaching)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureDiskCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureDiskCmdletInfo.cs new file mode 100644 index 000000000000..0d22a4df3513 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureDiskCmdletInfo.cs @@ -0,0 +1,39 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class AddAzureDiskCmdletInfo : CmdletsInfo + { + public AddAzureDiskCmdletInfo(string diskName, string mediaLocation, string label, string os) + { + cmdletName = Utilities.AddAzureDiskCmdletName; + + this.cmdletParams.Add(new CmdletParam("DiskName", diskName)); + this.cmdletParams.Add(new CmdletParam("MediaLocation", mediaLocation)); + + if (label != null) + { + this.cmdletParams.Add(new CmdletParam("Label", label)); + } + + if (os != null) + { + this.cmdletParams.Add(new CmdletParam("OS", os)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureDnsCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureDnsCmdletInfo.cs new file mode 100644 index 000000000000..869d9c26b7ea --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureDnsCmdletInfo.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class AddAzureDnsCmdletInfo : CmdletsInfo + { + public AddAzureDnsCmdletInfo(string name, string ip, string serviceName) + { + cmdletName = Utilities.AddAzureDnsCmdletName; + this.cmdletParams.Add(new CmdletParam("Name", name)); + this.cmdletParams.Add(new CmdletParam("IPAddress", ip)); + this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureEndpointCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureEndpointCmdletInfo.cs new file mode 100644 index 000000000000..e8bbe30ee4d2 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureEndpointCmdletInfo.cs @@ -0,0 +1,89 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class AddAzureEndpointCmdletInfo : CmdletsInfo + { + public AddAzureEndpointCmdletInfo(AzureEndPointConfigInfo endPointConfig) + { + this.cmdletName = Utilities.AddAzureEndpointCmdletName; + + this.cmdletParams.Add(new CmdletParam("Name", endPointConfig.EndpointName)); + this.cmdletParams.Add(new CmdletParam("LocalPort", endPointConfig.EndpointLocalPort)); + if (endPointConfig.EndpointPublicPort.HasValue) + { + this.cmdletParams.Add(new CmdletParam("PublicPort", endPointConfig.EndpointPublicPort)); + } + if (endPointConfig.Acl != null) + { + this.cmdletParams.Add(new CmdletParam("ACL", endPointConfig.Acl)); + } + this.cmdletParams.Add(new CmdletParam("Protocol", endPointConfig.EndpointProtocol.ToString())); + this.cmdletParams.Add(new CmdletParam("VM", endPointConfig.Vm)); + + if (endPointConfig.ParamSet == AzureEndPointConfigInfo.ParameterSet.DefaultProbe) + { + this.cmdletParams.Add(new CmdletParam("LBSetName", endPointConfig.LBSetName)); + this.cmdletParams.Add(new CmdletParam("DefaultProbe")); + } + if (endPointConfig.ParamSet == AzureEndPointConfigInfo.ParameterSet.LoadBalancedNoProbe) + { + this.cmdletParams.Add(new CmdletParam("LBSetName", endPointConfig.LBSetName)); + this.cmdletParams.Add(new CmdletParam("NoProbe")); + } + else if (endPointConfig.ParamSet == AzureEndPointConfigInfo.ParameterSet.CustomProbe) + { + this.cmdletParams.Add(new CmdletParam("LBSetName", endPointConfig.LBSetName)); + this.cmdletParams.Add(new CmdletParam("ProbePort", endPointConfig.ProbePort)); + this.cmdletParams.Add(new CmdletParam("ProbeProtocol", endPointConfig.ProbeProtocol.ToString())); + if ("http" == endPointConfig.ProbeProtocol.ToString()) + { + this.cmdletParams.Add(new CmdletParam("ProbePath", endPointConfig.ProbePath)); + } + + if (endPointConfig.ProbeInterval.HasValue) + { + this.cmdletParams.Add(new CmdletParam("ProbeIntervalInSeconds", endPointConfig.ProbeInterval)); + } + + if (endPointConfig.ProbeTimeout.HasValue) + { + this.cmdletParams.Add(new CmdletParam("ProbeTimeoutInSeconds", endPointConfig.ProbeTimeout)); + } + } + + if (endPointConfig.DirectServerReturn) + { + this.cmdletParams.Add(new CmdletParam("DirectServerReturn", endPointConfig.DirectServerReturn)); + } + if (!string.IsNullOrEmpty(endPointConfig.InternalLoadBalancerName)) + { + this.cmdletParams.Add(new CmdletParam("InternalLoadBalancerName", endPointConfig.InternalLoadBalancerName)); + } + if (! string.IsNullOrEmpty(endPointConfig.LoadBalancerDistribution)) + { + this.cmdletParams.Add(new CmdletParam("LoadBalancerDistribution", endPointConfig.LoadBalancerDistribution)); + } + } + + public AddAzureEndpointCmdletInfo() + { + this.cmdletName = Utilities.AddAzureEndpointCmdletName; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureEnvironmentCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureEnvironmentCmdletInfo.cs new file mode 100644 index 000000000000..d66a2e24eab4 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureEnvironmentCmdletInfo.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class AddAzureEnvironmentCmdletInfo : CmdletsInfo + { + public AddAzureEnvironmentCmdletInfo(string name, string serviceEndpoint) + { + cmdletName = Utilities.AddAzureEnvironmentCmdletName; + cmdletParams.Add(new CmdletParam("Name", name)); + cmdletParams.Add(new CmdletParam("ServiceEndpoint", serviceEndpoint)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureNetworkInterfaceConfigCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureNetworkInterfaceConfigCmdletInfo.cs new file mode 100644 index 000000000000..b3571bedaec2 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureNetworkInterfaceConfigCmdletInfo.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.ILB +{ + public class AddAzureNetworkInterfaceConfigCmdletInfo: CmdletsInfo + { + public AddAzureNetworkInterfaceConfigCmdletInfo(string name, string subnetName, string staticVnetIpAddress, IPersistentVM vm) + { + this.cmdletName = Utilities.AddAzureNetworkInterfaceConfig; + this.parameters.Add(new CmdletParam("Name", name)); + this.parameters.Add(new CmdletParam("SubnetName", subnetName)); + if (!string.IsNullOrEmpty(staticVnetIpAddress)) + { + this.parameters.Add(new CmdletParam("StaticVnetIpAddress", staticVnetIpAddress)); + } + this.parameters.Add(new CmdletParam("VM", vm)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureProvisioningConfigCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureProvisioningConfigCmdletInfo.cs new file mode 100644 index 000000000000..312c800042f1 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureProvisioningConfigCmdletInfo.cs @@ -0,0 +1,140 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class AddAzureProvisioningConfigCmdletInfo : CmdletsInfo + { + public AddAzureProvisioningConfigCmdletInfo(AzureProvisioningConfigInfo provConfig) + { + this.cmdletName = Utilities.AddAzureProvisioningConfigCmdletName; + + this.cmdletParams.Add(new CmdletParam("VM", provConfig.Vm)); + + var parameterSet = string.IsNullOrEmpty(provConfig.Option) ? provConfig.OS.ToString() : provConfig.Option; + + this.cmdletParams.Add(new CmdletParam(parameterSet)); + + if (!string.IsNullOrEmpty(provConfig.Password)) + { + this.cmdletParams.Add(new CmdletParam("Password", provConfig.Password)); + } + + if (!string.IsNullOrEmpty(provConfig.CustomDataFile)) + { + this.cmdletParams.Add(new CmdletParam("CustomDataFile", provConfig.CustomDataFile)); + } + + // For Linux parameter set + if (parameterSet.Equals(OS.Linux.ToString())) + { + this.cmdletParams.Add(new CmdletParam("LinuxUser", provConfig.LinuxUser)); + + if (provConfig.DisableSSH) + { + this.cmdletParams.Add(new CmdletParam("DisableSSH")); + } + if (provConfig.NoSSHEndpoint) + { + this.cmdletParams.Add(new CmdletParam("NoSSHEndpoint")); + } + if (provConfig.SSHKeyPairs != null && provConfig.SSHKeyPairs.Count != 0) + { + this.cmdletParams.Add(new CmdletParam("SSHKeyPairs", provConfig.SSHKeyPairs)); + } + if (provConfig.SshPublicKeys != null && provConfig.SshPublicKeys.Count != 0) + { + this.cmdletParams.Add(new CmdletParam("SSHPublicKeys", provConfig.SshPublicKeys)); + } + if(provConfig.NoSSHPassword) + { + this.cmdletParams.Add(new CmdletParam("NoSSHPassword")); + } + } + + // For Windows/WindowsDomain parameter set + if (parameterSet.Equals(provConfig.WindowsDomain) || parameterSet.Equals(OS.Windows.ToString())) + { + this.cmdletParams.Add(new CmdletParam("AdminUsername", provConfig.AdminUsername)); + + if (provConfig.DisableAutomaticUpdate) + { + this.cmdletParams.Add(new CmdletParam("DisableAutomaticUpdates")); + } + if (provConfig.DisableGuestAgent) + { + this.cmdletParams.Add(new CmdletParam("DisableGuestAgent")); + } + if (provConfig.DisableWinRMHttps) + { + this.cmdletParams.Add(new CmdletParam("DisableWinRMHttps")); + } + if (provConfig.EnableWinRMHttp) + { + this.cmdletParams.Add(new CmdletParam("EnableWinRMHttp")); + } + if (provConfig.NoWinRMEndpoint) + { + this.cmdletParams.Add(new CmdletParam("NoWinRMEndpoint")); + } + if (provConfig.Reset) + { + this.cmdletParams.Add(new CmdletParam("ResetPasswordOnFirstLogon")); + } + if (provConfig.NoExportPrivateKey) + { + this.cmdletParams.Add(new CmdletParam("NoExportPrivateKey")); + } + if (provConfig.NoRDPEndpoint) + { + this.cmdletParams.Add(new CmdletParam("NoRDPEndpoint")); + } + if (!string.IsNullOrEmpty(provConfig.TimeZone)) + { + this.cmdletParams.Add(new CmdletParam("TimeZone", provConfig.TimeZone)); + } + + if (provConfig.Certs != null && provConfig.Certs.Count != 0) + { + this.cmdletParams.Add(new CmdletParam("Certificates", provConfig.Certs)); + } + if (provConfig.WinRMCertificate != null) + { + this.cmdletParams.Add(new CmdletParam("WinRMCertificate", provConfig.WinRMCertificate)); + } + if (provConfig.X509Certificates != null) + { + this.cmdletParams.Add(new CmdletParam("X509Certificates", provConfig.X509Certificates)); + } + } + + // For WindowsDomain parameter set + if (parameterSet.Equals(provConfig.WindowsDomain)) + { + this.cmdletParams.Add(new CmdletParam("Domain", provConfig.Domain)); + this.cmdletParams.Add(new CmdletParam("JoinDomain", provConfig.JoinDomain)); + this.cmdletParams.Add(new CmdletParam("DomainUserName", provConfig.DomainUserName)); + this.cmdletParams.Add(new CmdletParam("DomainPassword", provConfig.DomainPassword)); + + if (!string.IsNullOrEmpty(provConfig.MachineObjectOU)) + { + this.cmdletParams.Add(new CmdletParam("MachineObjectOU", provConfig.MachineObjectOU)); + } + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureVMImageCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureVMImageCmdletInfo.cs new file mode 100644 index 000000000000..e26da970f9a4 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureVMImageCmdletInfo.cs @@ -0,0 +1,81 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class AddAzureVMImageCmdletInfo : CmdletsInfo + { + public AddAzureVMImageCmdletInfo(string imageName, string mediaLocation, OS os, string label) + { + cmdletName = Utilities.AddAzureVMImageCmdletName; + + cmdletParams.Add(new CmdletParam("ImageName", imageName)); + cmdletParams.Add(new CmdletParam("MediaLocation", mediaLocation)); + cmdletParams.Add(new CmdletParam("OS", os.ToString())); + + if (!string.IsNullOrEmpty(label)) + { + cmdletParams.Add(new CmdletParam("Label", label)); + } + } + + public AddAzureVMImageCmdletInfo(string imageName, string mediaLocation, OS os, string label, string recommendedSize) + : this(imageName, mediaLocation, os, label) + { + if (!string.IsNullOrEmpty(recommendedSize)) + { + cmdletParams.Add(new CmdletParam("RecommendedVMSize", recommendedSize)); + } + } + + public AddAzureVMImageCmdletInfo( + string imageName, + string mediaLocation, + OS os, + string label, + string recommendedSize, + string description, + string eula, + string imageFamily, + Uri privacyUri, + DateTime publishedDate) + : this(imageName, mediaLocation, os, label, recommendedSize) + { + if(!string.IsNullOrEmpty(description)) + { + cmdletParams.Add(new CmdletParam("Description", description)); + } + if(!string.IsNullOrEmpty(eula)) + { + cmdletParams.Add(new CmdletParam("Eula", eula)); + } + if(!string.IsNullOrEmpty(imageFamily)) + { + cmdletParams.Add(new CmdletParam("ImageFamily", imageFamily)); + } + if(privacyUri != null) + { + cmdletParams.Add(new CmdletParam("PrivacyUri", privacyUri.ToString())); + } + if(publishedDate != null) + { + cmdletParams.Add(new CmdletParam("PublishedDate", publishedDate.ToString())); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureVhdCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureVhdCmdletInfo.cs new file mode 100644 index 000000000000..7e3820551008 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/AddAzureVhdCmdletInfo.cs @@ -0,0 +1,40 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class AddAzureVhdCmdletInfo : CmdletsInfo + { + public AddAzureVhdCmdletInfo(string destination, string locaFilePath, int? numberOfUploaderThreads, bool overWrite, string baseImage) + { + cmdletName = Utilities.AddAzureVhdCmdletName; + cmdletParams.Add(new CmdletParam("Destination", destination)); + cmdletParams.Add(new CmdletParam("LocalFilePath", locaFilePath)); + if (numberOfUploaderThreads != null) + { + cmdletParams.Add(new CmdletParam("NumberOfUploaderThreads", numberOfUploaderThreads)); + } + if (overWrite) + { + cmdletParams.Add(new CmdletParam("OverWrite", null)); + } + if (baseImage != null) + { + cmdletParams.Add(new CmdletParam("BaseImageUriToPatch", baseImage)); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/DiskRepository/GetAzureVMImageDiskConfigSetCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/DiskRepository/GetAzureVMImageDiskConfigSetCmdletInfo.cs new file mode 100644 index 000000000000..4887210a18c8 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/DiskRepository/GetAzureVMImageDiskConfigSetCmdletInfo.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.DiskRepository +{ + class GetAzureVMImageDiskConfigSetCmdletInfo : CmdletsInfo + { + public GetAzureVMImageDiskConfigSetCmdletInfo(VMImageContext imageContext) + { + this.cmdletName = Utilities.GetAzureVMImageDiskConfigSetCmdletName; + this.cmdletParams.Add(new CmdletParam("ImageContext",imageContext)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/DiskRepository/NewAzureVMImageDiskConfigSetCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/DiskRepository/NewAzureVMImageDiskConfigSetCmdletInfo.cs new file mode 100644 index 000000000000..025b1c213b51 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/DiskRepository/NewAzureVMImageDiskConfigSetCmdletInfo.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +//TODO: When transition to SM.NET is completed, rename the namespace to "Microsoft.WindowsAzure.ServiceManagement" + + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.DiskRepository +{ + public class NewAzureVMImageDiskConfigSetCmdletInfo : CmdletsInfo + { + public NewAzureVMImageDiskConfigSetCmdletInfo() + { + this.cmdletName = Utilities.NewAzureVMImageDiskConfigSetCmdletName; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/DiskRepository/SetAzureVMImageDataDiskConfigInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/DiskRepository/SetAzureVMImageDataDiskConfigInfo.cs new file mode 100644 index 000000000000..0f45de76ec27 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/DiskRepository/SetAzureVMImageDataDiskConfigInfo.cs @@ -0,0 +1,33 @@ +// --------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.DiskRepository +{ + class SetAzureVMImageDataDiskConfigInfo: CmdletsInfo + { + public SetAzureVMImageDataDiskConfigInfo(VirtualMachineImageDiskConfigSet diskConfig, string dataDiskName, int lun, string hostCaching) + { + this.cmdletName = Utilities.SetAzureVMImageDataDiskConfigCmdletName; + this.cmdletParams.Add(new CmdletParam("DiskConfig",diskConfig)); + this.cmdletParams.Add(new CmdletParam("DataDiskName",dataDiskName)); + this.cmdletParams.Add(new CmdletParam("Lun", lun)); + this.cmdletParams.Add(new CmdletParam("HostCaching", hostCaching)); + } + } +} + diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/DiskRepository/SetAzureVMImageOSDiskConfigInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/DiskRepository/SetAzureVMImageOSDiskConfigInfo.cs new file mode 100644 index 000000000000..938cb860a85d --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/DiskRepository/SetAzureVMImageOSDiskConfigInfo.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.DiskRepository +{ + class SetAzureVMImageOSDiskConfigInfo: CmdletsInfo + { + public SetAzureVMImageOSDiskConfigInfo(VirtualMachineImageDiskConfigSet diskConfig, string hostCaching) + { + this.cmdletName = Utilities.SetAzureVMImageOSDiskConfigCmdletName; + this.cmdletParams.Add(new CmdletParam("DiskConfig",diskConfig)); + this.cmdletParams.Add(new CmdletParam("HostCaching", hostCaching)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/ExportAzureVMCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/ExportAzureVMCmdletInfo.cs new file mode 100644 index 000000000000..dcec2d064880 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/ExportAzureVMCmdletInfo.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class ExportAzureVMCmdletInfo : CmdletsInfo + { + public ExportAzureVMCmdletInfo(string vmName, string serviceName, string path) + { + this.cmdletName = Utilities.ExportAzureVMCmdletName; + this.cmdletParams.Add(new CmdletParam("Name", vmName)); + this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + this.cmdletParams.Add(new CmdletParam("Path", path)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/BGInfo/GetAzureVMBGInfoExtensionCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/BGInfo/GetAzureVMBGInfoExtensionCmdletInfo.cs new file mode 100644 index 000000000000..09b485121d0e --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/BGInfo/GetAzureVMBGInfoExtensionCmdletInfo.cs @@ -0,0 +1,38 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.Extensions.BGInfo +{ + public class GetAzureVMBGInfoExtensionCmdletInfo:CmdletsInfo + { + public GetAzureVMBGInfoExtensionCmdletInfo(IPersistentVM vm, string version = null, string referenceName = null) + { + cmdletName = Utilities.GetAzureVMBGInfoExtensionCmdletName; + cmdletParams.Add(new CmdletParam("VM", vm)); + if (!string.IsNullOrEmpty(version)) + { + cmdletParams.Add(new CmdletParam("Version", version)); + } + if (!string.IsNullOrEmpty(referenceName)) + { + cmdletParams.Add(new CmdletParam("ReferenceName", referenceName)); + } + } + } + +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/BGInfo/RemoveAzureVMBGInfoExtensionCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/BGInfo/RemoveAzureVMBGInfoExtensionCmdletInfo.cs new file mode 100644 index 000000000000..f9d11ad8a6d5 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/BGInfo/RemoveAzureVMBGInfoExtensionCmdletInfo.cs @@ -0,0 +1,37 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.Extensions.BGInfo +{ + public class RemoveAzureVMBGInfoExtensionCmdletInfo : CmdletsInfo + { + public RemoveAzureVMBGInfoExtensionCmdletInfo(IPersistentVM vm, string version = null, string referenceName = null) + { + cmdletName = Utilities.RemoveAzureVMBGInfoExtensionCmdletName; + cmdletParams.Add(new CmdletParam("VM", vm)); + if (!string.IsNullOrEmpty(version)) + { + cmdletParams.Add(new CmdletParam("Version", version)); + } + if (!string.IsNullOrEmpty(referenceName)) + { + cmdletParams.Add(new CmdletParam("ReferenceName", referenceName)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/BGInfo/SetAzureVMBGInfoExtensionCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/BGInfo/SetAzureVMBGInfoExtensionCmdletInfo.cs new file mode 100644 index 000000000000..68f536077bbd --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/BGInfo/SetAzureVMBGInfoExtensionCmdletInfo.cs @@ -0,0 +1,40 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.Extensions.BGInfo +{ + public class SetAzureVMBGInfoExtensionCmdletInfo : CmdletsInfo + { + public SetAzureVMBGInfoExtensionCmdletInfo(IPersistentVM vm, string version = null, string referenceName = null, bool disable = false) + { + cmdletName = Utilities.SetAzureVMBGInfoExtensionCmdletName; + cmdletParams.Add(new CmdletParam("VM", vm)); + if (!string.IsNullOrEmpty(version)) + { + cmdletParams.Add(new CmdletParam("Version", version)); + } + if (!string.IsNullOrEmpty(referenceName)) + { + cmdletParams.Add(new CmdletParam("ReferenceName", referenceName)); + } + if (disable) + { + cmdletParams.Add(new CmdletParam("Disable")); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/CustomScript/GetAzureVMCustomScriptExtensionCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/CustomScript/GetAzureVMCustomScriptExtensionCmdletInfo.cs new file mode 100644 index 000000000000..a710e7fc5331 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/CustomScript/GetAzureVMCustomScriptExtensionCmdletInfo.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.Extesnions.CustomScript +{ + public class GetAzureVMCustomScriptExtensionCmdletInfo:CmdletsInfo + { + public GetAzureVMCustomScriptExtensionCmdletInfo(IPersistentVM vm) + { + this.cmdletName = Utilities.GetAzureVMCustomScriptExtensionCmdletName; + this.cmdletParams.Add(new CmdletParam("VM",vm)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/CustomScript/RemoveAzureVMCustomScriptExtensionCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/CustomScript/RemoveAzureVMCustomScriptExtensionCmdletInfo.cs new file mode 100644 index 000000000000..064ee11c988d --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/CustomScript/RemoveAzureVMCustomScriptExtensionCmdletInfo.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.Extesnions.CustomScript +{ + public class RemoveAzureVMCustomScriptExtensionCmdletInfo : CmdletsInfo + { + public RemoveAzureVMCustomScriptExtensionCmdletInfo(IPersistentVM vm) + { + this.cmdletName = Utilities.RemoveAzureVMCustomScriptExtensionCmdletName; + this.cmdletParams.Add(new CmdletParam("VM", vm)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/CustomScript/SetAzureVMCustomScriptExtensionCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/CustomScript/SetAzureVMCustomScriptExtensionCmdletInfo.cs new file mode 100644 index 000000000000..439209a90182 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/CustomScript/SetAzureVMCustomScriptExtensionCmdletInfo.cs @@ -0,0 +1,97 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.Extesnions.CustomScript +{ + public class SetAzureVMCustomScriptExtensionCmdletInfo:CmdletsInfo + { + + private SetAzureVMCustomScriptExtensionCmdletInfo(PersistentVM vm, string referenceName, string version) + { + cmdletName = Utilities.SetAzureVMCustomScriptExtensionCmdletName; + cmdletParams.Add(new CmdletParam("VM", vm)); + if (!string.IsNullOrEmpty(version)) + { + cmdletParams.Add(new CmdletParam("Version", version)); + } + if (!string.IsNullOrEmpty(referenceName)) + { + cmdletParams.Add(new CmdletParam("ReferenceName", referenceName)); + } + } + + private SetAzureVMCustomScriptExtensionCmdletInfo(PersistentVM vm, string run, string argument, string referenceName, string version) + :this(vm, referenceName, version) + { + if (!string.IsNullOrEmpty(run)) + { + cmdletParams.Add(new CmdletParam("Run", run)); + } + if (!string.IsNullOrEmpty(argument)) + { + cmdletParams.Add(new CmdletParam("Argument", argument)); + } + } + + //SetCustomScriptExtensionByUrisParamSetName + public SetAzureVMCustomScriptExtensionCmdletInfo(PersistentVM vm, string referenceName, string version, string[] fileUri, string run, string argument) + :this(vm,run,argument,referenceName,version) + { + if (fileUri != null) + { + cmdletParams.Add(new CmdletParam("FileUri", Utilities.ConvertToJsonArray(fileUri))); + } + } + + //DisableCustomScriptExtensionParamSetName + public SetAzureVMCustomScriptExtensionCmdletInfo(PersistentVM vm, string referenceName, string version, bool disable) + : this(vm, referenceName, version) + { + if (disable) + { + cmdletParams.Add(new CmdletParam("Disable")); + } + } + + //SetCustomScriptExtensionByContainerBlobsParamSetName + public SetAzureVMCustomScriptExtensionCmdletInfo(PersistentVM vm, string[] fileName, string storageAccountName, string storageEndpointSuffix, string containerName, + string storageAccountKey, string run, string argument, string referenceName, string version) + : this(vm, run, argument, referenceName, version) + { + if (fileName.Length > 0) + { + cmdletParams.Add(new CmdletParam("FileName", fileName)); + } + if (!string.IsNullOrEmpty(containerName)) + { + cmdletParams.Add(new CmdletParam("ContainerName", containerName)); + } + if (!string.IsNullOrEmpty(storageAccountName)) + { + cmdletParams.Add(new CmdletParam("StorageAccountName", storageAccountName)); + } + if (!string.IsNullOrEmpty(storageEndpointSuffix)) + { + cmdletParams.Add(new CmdletParam("StorageEndpointSuffix", storageEndpointSuffix)); + } + if (!string.IsNullOrEmpty(storageAccountKey)) + { + cmdletParams.Add(new CmdletParam("StorageAccountKey", storageAccountKey)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/CustomScript/SetAzureVMCustomScriptExtensionCmdletParmaterSetType.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/CustomScript/SetAzureVMCustomScriptExtensionCmdletParmaterSetType.cs new file mode 100644 index 000000000000..ca1f8309b0d6 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/CustomScript/SetAzureVMCustomScriptExtensionCmdletParmaterSetType.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.Extesnions.CustomScript +{ + + public enum SetAzureVMCustomScriptExtensionCmdletParmaterSetType + { + SetCustomScriptExtensionByUrisParamSetName, + SetCustomScriptExtensionByUrisParamSetNameWithOutDefaultParameters, + DisableCustomScriptExtensionParamSetName, + DisableCustomScriptExtensionParamSetNameWithOutDefaultParameters, + SetCustomScriptExtensionByContainerBlobsParamSetName, + SetCustomScriptExtensionByContainerBlobsParamSetNameWithOutDefaultParameters + } + + +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/Dsc/GetAzureVMDscExtensionCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/Dsc/GetAzureVMDscExtensionCmdletInfo.cs new file mode 100644 index 000000000000..ab8e9997a957 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/Dsc/GetAzureVMDscExtensionCmdletInfo.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.Extesnions.CustomScript +{ + public class GetAzureVMDscExtensionCmdletInfo:CmdletsInfo + { + public GetAzureVMDscExtensionCmdletInfo(IPersistentVM vm) + { + this.cmdletName = Utilities.GetAzureVMDscExtensionCmdletName; + this.cmdletParams.Add(new CmdletParam("VM",vm)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/Dsc/RemoveAzureVMDscExtensionCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/Dsc/RemoveAzureVMDscExtensionCmdletInfo.cs new file mode 100644 index 000000000000..a743dc2279fc --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/Dsc/RemoveAzureVMDscExtensionCmdletInfo.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.Extesnions.CustomScript +{ + public class RemoveAzureVMDscExtensionCmdletInfo : CmdletsInfo + { + public RemoveAzureVMDscExtensionCmdletInfo(IPersistentVM vm) + { + this.cmdletName = Utilities.RemoveAzureVMDscExtensionCmdletName; + this.cmdletParams.Add(new CmdletParam("VM", vm)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/Dsc/SetAzureVMDscExtensionCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/Dsc/SetAzureVMDscExtensionCmdletInfo.cs new file mode 100644 index 000000000000..cd80f09cfbc8 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/Dsc/SetAzureVMDscExtensionCmdletInfo.cs @@ -0,0 +1,66 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections; +using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.Extesnions.Dsc +{ + public class SetAzureVMDscExtensionCmdletInfo: CmdletsInfo + { + public SetAzureVMDscExtensionCmdletInfo( + string version, + IPersistentVM vm, + string configurationArchive, + AzureStorageContext storageContext = null, + string containerName = null, + string configurationName = null, + Hashtable configurationArgument = null, + string configurationDataPath = null + ) + { + cmdletName = Utilities.SetAzureVMDscExtensionCmdletName; + + cmdletParams.AddRange( + new CmdletParam [] { + new CmdletParam("Version", version), + new CmdletParam("VM", vm), + new CmdletParam("ConfigurationArchive", configurationArchive), + }); + + if (storageContext != null) + { + cmdletParams.Add(new CmdletParam("StorageContext", storageContext)); + } + if (containerName != null) + { + cmdletParams.Add(new CmdletParam("ContainerName", containerName)); + } + if (configurationName != null) + { + cmdletParams.Add(new CmdletParam("ConfigurationName", configurationName)); + } + if (configurationArgument != null) + { + cmdletParams.Add(new CmdletParam("ConfigurationArgument", configurationArgument)); + } + if (configurationDataPath != null) + { + cmdletParams.Add(new CmdletParam("ConfigurationDataPath", configurationDataPath)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/SqlServer/GetAzureVMSqlServerExtensionCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/SqlServer/GetAzureVMSqlServerExtensionCmdletInfo.cs new file mode 100644 index 000000000000..2502f2322607 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/SqlServer/GetAzureVMSqlServerExtensionCmdletInfo.cs @@ -0,0 +1,37 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.Extensions.SqlServer +{ + public class GetAzureVMSqlServerExtensionCmdletInfo:CmdletsInfo + { + public GetAzureVMSqlServerExtensionCmdletInfo(IPersistentVM vm, string version,string referenceName) + { + this.cmdletName = Utilities.GetAzureVMSqlServerExtensionCmdletName; + cmdletParams.Add(new CmdletParam("VM", vm)); + + if (!string.IsNullOrEmpty(version)) + { + cmdletParams.Add(new CmdletParam("Version", version)); + } + if (!string.IsNullOrEmpty(referenceName)) + { + cmdletParams.Add(new CmdletParam("ReferenceName", referenceName)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/SqlServer/RemoveAzureVMSqlServerExtensionCmdleteInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/SqlServer/RemoveAzureVMSqlServerExtensionCmdleteInfo.cs new file mode 100644 index 000000000000..ce74cd80dbee --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/SqlServer/RemoveAzureVMSqlServerExtensionCmdleteInfo.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.Extensions.SqlServer +{ + public class RemoveAzureVMSqlServerExtensionCmdletInfo:CmdletsInfo + { + public RemoveAzureVMSqlServerExtensionCmdletInfo(IPersistentVM vm) + { + this.cmdletName = Utilities.RemoveAzureVMSqlServerExtensionCmdletName; + cmdletParams.Add(new CmdletParam("VM", vm)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/SqlServer/SetAzureVMSqlServerExtensionCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/SqlServer/SetAzureVMSqlServerExtensionCmdletInfo.cs new file mode 100644 index 000000000000..145022af0773 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/SqlServer/SetAzureVMSqlServerExtensionCmdletInfo.cs @@ -0,0 +1,40 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.Extensions.SqlServer +{ + public class SetAzureVMSqlServerExtensionCmdletInfo:CmdletsInfo + { + public SetAzureVMSqlServerExtensionCmdletInfo(IPersistentVM vm, string version, string referenceName,bool disable) + { + this.cmdletName = Utilities.SetAzureVMSqlServerExtensionCmdletName; + cmdletParams.Add(new CmdletParam("VM", vm)); + + if (!string.IsNullOrEmpty(version)) + { + cmdletParams.Add(new CmdletParam("Version", version)); + } + + if (!string.IsNullOrEmpty(referenceName)) + { + cmdletParams.Add(new CmdletParam("ReferenceName", referenceName)); + } + + cmdletParams.Add(new CmdletParam("Disable")); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/VMAccess/GetAzureVMAccessExtensionCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/VMAccess/GetAzureVMAccessExtensionCmdletInfo.cs new file mode 100644 index 000000000000..8abb3b21629c --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/VMAccess/GetAzureVMAccessExtensionCmdletInfo.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.Extesnions.VMAccess +{ + public class GetAzureVMAccessExtensionCmdletInfo:CmdletsInfo + { + public GetAzureVMAccessExtensionCmdletInfo(IPersistentVM vm,string userName, string password, string version,string referenceName) + { + this.cmdletName = Utilities.GetAzureVMAccessExtensionCmdletName; + cmdletParams.Add(new CmdletParam("VM", vm)); + if (!string.IsNullOrEmpty(userName)) + { + cmdletParams.Add(new CmdletParam("UserName", userName)); + } + if (!string.IsNullOrEmpty(password)) + { + cmdletParams.Add(new CmdletParam("Password", password)); + } + if (!string.IsNullOrEmpty(version)) + { + cmdletParams.Add(new CmdletParam("Version", version)); + } + if (!string.IsNullOrEmpty(referenceName)) + { + cmdletParams.Add(new CmdletParam("ReferenceName", referenceName)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/VMAccess/RemoveAzureVMAccessExtensionCmdleteInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/VMAccess/RemoveAzureVMAccessExtensionCmdleteInfo.cs new file mode 100644 index 000000000000..304a0e77add7 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/VMAccess/RemoveAzureVMAccessExtensionCmdleteInfo.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.Extesnions.VMAccess +{ + public class RemoveAzureVMAccessExtensionCmdleteInfo:CmdletsInfo + { + public RemoveAzureVMAccessExtensionCmdleteInfo(IPersistentVM vm) + { + this.cmdletName = Utilities.RemoveAzureVMAccessExtensionCmdletName; + cmdletParams.Add(new CmdletParam("VM", vm)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/VMAccess/SetAzureVMAccessExtensionCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/VMAccess/SetAzureVMAccessExtensionCmdletInfo.cs new file mode 100644 index 000000000000..4ebcfc8bd6cc --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Extesnions/VMAccess/SetAzureVMAccessExtensionCmdletInfo.cs @@ -0,0 +1,49 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.Extesnions.VMAccess +{ + public class SetAzureVMAccessExtensionCmdletInfo:CmdletsInfo + { + public SetAzureVMAccessExtensionCmdletInfo(IPersistentVM vm, string userName, string password, string version, string referenceName,bool disable) + { + this.cmdletName = Utilities.SetAzureVMAccessExtensionCmdletName; + cmdletParams.Add(new CmdletParam("VM", vm)); + if (!string.IsNullOrEmpty(userName)) + { + cmdletParams.Add(new CmdletParam("UserName", userName)); + } + if (!string.IsNullOrEmpty(password)) + { + cmdletParams.Add(new CmdletParam("Password", password)); + } + if (!string.IsNullOrEmpty(version)) + { + cmdletParams.Add(new CmdletParam("Version", version)); + } + if (!string.IsNullOrEmpty(referenceName)) + { + cmdletParams.Add(new CmdletParam("ReferenceName", referenceName)); + } + if (disable) + { + cmdletParams.Add(new CmdletParam("Disable", disable)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Generic/GetAzureVMAvailableExtensionCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Generic/GetAzureVMAvailableExtensionCmdletInfo.cs new file mode 100644 index 000000000000..1521e6084a46 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Generic/GetAzureVMAvailableExtensionCmdletInfo.cs @@ -0,0 +1,62 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.Extensions.Common +{ + public class GetAzureVMAvailableExtensionCmdletInfo: CmdletsInfo + { + + private GetAzureVMAvailableExtensionCmdletInfo() + { + cmdletName = Utilities.GetAzureVMAvailableExtensionCmdletName; + } + + //ListLatestExtensionsParamSet -> ExtensionName,Publisher, + public GetAzureVMAvailableExtensionCmdletInfo(string extensionName = null, string publisher = null) + :this() + { + + if (!string.IsNullOrEmpty(extensionName)) + { + cmdletParams.Add(new CmdletParam("ExtensionName", extensionName)); + } + if (!string.IsNullOrEmpty(publisher)) + { + cmdletParams.Add(new CmdletParam("Publisher", publisher)); + } + } + + //ListAllVersionsParamSetName -> ExtensionName,Publisher,AllVersions + public GetAzureVMAvailableExtensionCmdletInfo(string extensionName, string publisher, bool allVersions) + : this(extensionName, publisher) + { + if (allVersions) + { + cmdletParams.Add(new CmdletParam("AllVersions")); + } + } + + //ListSingleVersionParamSetName -> ExtensionName,Publisher,Version + public GetAzureVMAvailableExtensionCmdletInfo(string extensionName, string publisher, string version) + : this(extensionName, publisher) + { + if (!string.IsNullOrEmpty(publisher)) + { + cmdletParams.Add(new CmdletParam("Version", version)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Generic/GetAzureVMExtensionCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Generic/GetAzureVMExtensionCmdletInfo.cs new file mode 100644 index 000000000000..9f61a5e46d39 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Generic/GetAzureVMExtensionCmdletInfo.cs @@ -0,0 +1,57 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.Extensions.Common +{ + public class GetAzureVMExtensionCmdletInfo : CmdletsInfo + { + public GetAzureVMExtensionCmdletInfo(IPersistentVM vm,string extensionName=null, string publisher=null, string version = null, string referenceName = null, + string publicConfiguration = null, string privateConfiguration = null, bool disable= false) + { + cmdletName = Utilities.GetAzureVMExtensionCmdletName; + cmdletParams.Add(new CmdletParam("VM", vm)); + if (!string.IsNullOrEmpty(extensionName)) + { + cmdletParams.Add(new CmdletParam("ExtensionName", extensionName)); + } + if (!string.IsNullOrEmpty(publisher)) + { + cmdletParams.Add(new CmdletParam("Publisher", publisher)); + } + if (!string.IsNullOrEmpty(version)) + { + cmdletParams.Add(new CmdletParam("Version", version)); + } + if (!string.IsNullOrEmpty(referenceName)) + { + cmdletParams.Add(new CmdletParam("ReferenceName", referenceName)); + } + if (!string.IsNullOrEmpty(publicConfiguration)) + { + cmdletParams.Add(new CmdletParam("PublicConfiguration", publicConfiguration)); + } + if (!string.IsNullOrEmpty(privateConfiguration)) + { + cmdletParams.Add(new CmdletParam("PrivateConfiguration", privateConfiguration)); + } + if (disable) + { + cmdletParams.Add(new CmdletParam("Disable")); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Generic/GetAzureVMExtensionConfigTemplateCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Generic/GetAzureVMExtensionConfigTemplateCmdletInfo.cs new file mode 100644 index 000000000000..2346ca0a120a --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Generic/GetAzureVMExtensionConfigTemplateCmdletInfo.cs @@ -0,0 +1,37 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.Extensions.Common +{ + public class GetAzureVMExtensionConfigTemplateCmdletInfo:CmdletsInfo + { + + public GetAzureVMExtensionConfigTemplateCmdletInfo(string extensionName, string publisher,string sampleConfigPath, string version = null) + { + cmdletName = Utilities.GetAzureVMExtensionConfigTemplateCmdletName; + + cmdletParams.Add(new CmdletParam("ExtensionName", extensionName)); + cmdletParams.Add(new CmdletParam("Publisher", publisher)); + cmdletParams.Add(new CmdletParam("SampleConfigPath", sampleConfigPath)); + + if (!string.IsNullOrEmpty(version)) + { + cmdletParams.Add(new CmdletParam("Version", version)); + } + + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Generic/RemoveAzureVMExtensionCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Generic/RemoveAzureVMExtensionCmdletInfo.cs new file mode 100644 index 000000000000..f46a3c5ca4cf --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Generic/RemoveAzureVMExtensionCmdletInfo.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.Extensions.Common +{ + public class RemoveAzureVMExtensionCmdletInfo : CmdletsInfo + { + + public RemoveAzureVMExtensionCmdletInfo(IPersistentVM vm, string extensionName, string publisher, string referenceName, bool removeAll) + { + cmdletName = Utilities.RemoveAzureVMExtensionCmdletName; + cmdletParams.Add(new CmdletParam("VM", vm)); + if (!string.IsNullOrEmpty(extensionName)) + { + cmdletParams.Add(new CmdletParam("ExtensionName", extensionName)); + } + if (!string.IsNullOrEmpty(publisher)) + { + cmdletParams.Add(new CmdletParam("Publisher", publisher)); + } + if (!string.IsNullOrEmpty(referenceName)) + { + cmdletParams.Add(new CmdletParam("ReferenceName", referenceName)); + } + if (removeAll) + { + cmdletParams.Add(new CmdletParam("RemoveAll", removeAll)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Generic/SetAzureVMExtensionCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Generic/SetAzureVMExtensionCmdletInfo.cs new file mode 100644 index 000000000000..611fa38ff6b9 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/Generic/SetAzureVMExtensionCmdletInfo.cs @@ -0,0 +1,66 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.Extensions.Common +{ + public class SetAzureVMExtensionCmdletInfo: CmdletsInfo + { + public SetAzureVMExtensionCmdletInfo(IPersistentVM vm, string extensionName, string publisher, string version, string referenceName = null, + string publicConfiguration = null, string privateConfiguration = null, string publicConfigKey = null, string privateConfigKey = null, + string publicConfigPath = null,string privateConfigPath = null, bool disable = false) + { + cmdletName = Utilities.SetAzureVMExtensionCmdletName; + cmdletParams.Add(new CmdletParam("VM", vm)); + cmdletParams.Add(new CmdletParam("ExtensionName", extensionName)); + cmdletParams.Add(new CmdletParam("Publisher", publisher)); + cmdletParams.Add(new CmdletParam("Version", version)); + + if (!string.IsNullOrEmpty(referenceName)) + { + cmdletParams.Add(new CmdletParam("ReferenceName", referenceName)); + } + if (!string.IsNullOrEmpty(publicConfiguration)) + { + cmdletParams.Add(new CmdletParam("PublicConfiguration", publicConfiguration)); + } + if (!string.IsNullOrEmpty(privateConfiguration)) + { + cmdletParams.Add(new CmdletParam("PrivateConfiguration", privateConfiguration)); + } + if (disable) + { + cmdletParams.Add(new CmdletParam("Disable")); + } + if (!string.IsNullOrEmpty(publicConfigPath)) + { + cmdletParams.Add(new CmdletParam("PublicConfigPath", publicConfigPath)); + } + if (!string.IsNullOrEmpty(privateConfigPath)) + { + cmdletParams.Add(new CmdletParam("PrivateConfigPath", privateConfigPath)); + } + if (!string.IsNullOrEmpty(publicConfigKey)) + { + cmdletParams.Add(new CmdletParam("PublicConfigKey", publicConfigKey)); + } + if (!string.IsNullOrEmpty(publicConfigKey)) + { + cmdletParams.Add(new CmdletParam("PrivateConfigKey", privateConfigKey)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureAclConfigCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureAclConfigCmdletInfo.cs new file mode 100644 index 000000000000..863d13b6908c --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureAclConfigCmdletInfo.cs @@ -0,0 +1,32 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class GetAzureAclConfigCmdletInfo : CmdletsInfo + { + public GetAzureAclConfigCmdletInfo(PersistentVM vm, string ep) + { + cmdletName = Utilities.GetAzureAclConfigCmdletName; + cmdletParams.Add(new CmdletParam("VM", vm)); + if (!string.IsNullOrEmpty(ep)) + { + cmdletParams.Add(new CmdletParam("EndpointName", ep)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureAffinityGroupCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureAffinityGroupCmdletInfo.cs new file mode 100644 index 000000000000..58c1adbbf75b --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureAffinityGroupCmdletInfo.cs @@ -0,0 +1,31 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class GetAzureAffinityGroupCmdletInfo : CmdletsInfo + { + public GetAzureAffinityGroupCmdletInfo(string name) + { + cmdletName = Utilities.GetAzureAffinityGroupCmdletName; + + if (name != null) + { + cmdletParams.Add(new CmdletParam("Name", name)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureCertificateCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureCertificateCmdletInfo.cs new file mode 100644 index 000000000000..c27b52f714b5 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureCertificateCmdletInfo.cs @@ -0,0 +1,38 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class GetAzureCertificateCmdletInfo : CmdletsInfo + { + public GetAzureCertificateCmdletInfo(string serviceName, string thumbprint, string algorithm) + { + cmdletName = Utilities.GetAzureCertificateCmdletName; + + cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + + if (thumbprint != null) + { + cmdletParams.Add(new CmdletParam("Thumbprint", thumbprint)); + } + if (algorithm != null) + { + cmdletParams.Add(new CmdletParam("ThumbprintAlgorithm", algorithm)); + } + + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureDataDiskCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureDataDiskCmdletInfo.cs new file mode 100644 index 000000000000..e4bbe4aa8aaa --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureDataDiskCmdletInfo.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class GetAzureDataDiskCmdletInfo : CmdletsInfo + { + public GetAzureDataDiskCmdletInfo(PersistentVM vM) + { + this.cmdletName = Utilities.GetAzureDataDiskCmdletName; + this.cmdletParams.Add(new CmdletParam("VM", vM)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureDiskCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureDiskCmdletInfo.cs new file mode 100644 index 000000000000..097ac2a68109 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureDiskCmdletInfo.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class GetAzureDiskCmdletInfo : CmdletsInfo + { + public GetAzureDiskCmdletInfo(string diskName) + { + cmdletName = Utilities.GetAzureDiskCmdletName; + if (diskName != null) + { + this.cmdletParams.Add(new CmdletParam("DiskName", diskName)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureDns.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureDns.cs new file mode 100644 index 000000000000..8ba247302ac7 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureDns.cs @@ -0,0 +1,31 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class GetAzureDnsCmdletInfo : CmdletsInfo + { + public GetAzureDnsCmdletInfo(DnsSettings settings) + { + cmdletName = Utilities.GetAzureDnsCmdletName; + if (settings != null) + { + this.cmdletParams.Add(new CmdletParam("DnsSettings", settings)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureEndpointCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureEndpointCmdletInfo.cs new file mode 100644 index 000000000000..ab1b2895b465 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureEndpointCmdletInfo.cs @@ -0,0 +1,34 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class GetAzureEndpointCmdletInfo : CmdletsInfo + { + public GetAzureEndpointCmdletInfo(PersistentVMRoleContext vmRoleCtxt) + { + this.cmdletName = Utilities.GetAzureEndpointCmdletName; + this.cmdletParams.Add(new CmdletParam("VM", vmRoleCtxt)); + } + + public GetAzureEndpointCmdletInfo(PersistentVM vm) + { + this.cmdletName = Utilities.GetAzureEndpointCmdletName; + this.cmdletParams.Add(new CmdletParam("VM", vm)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureLocationCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureLocationCmdletInfo.cs new file mode 100644 index 000000000000..8c712da14fe1 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureLocationCmdletInfo.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class GetAzureLocationCmdletInfo : CmdletsInfo + { + public GetAzureLocationCmdletInfo() + { + cmdletName = Utilities.GetAzureLocationCmdletName; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureNetworkInterfaceConfigCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureNetworkInterfaceConfigCmdletInfo.cs new file mode 100644 index 000000000000..06f0deff83e0 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureNetworkInterfaceConfigCmdletInfo.cs @@ -0,0 +1,36 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.ILB +{ + public class GetAzureNetworkInterfaceConfigCmdletInfo: CmdletsInfo + { + + public GetAzureNetworkInterfaceConfigCmdletInfo(string name, PersistentVMRoleContext vm) + { + this.cmdletName = Utilities.GetAzureNetworkInterfaceConfig; + + if (!string.IsNullOrEmpty(name)) + { + this.parameters.Add(new CmdletParam("Name", name)); + } + + this.parameters.Add(new CmdletParam("VM", vm)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureOSDisk.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureOSDisk.cs new file mode 100644 index 000000000000..6c33166e9c0b --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureOSDisk.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class GetAzureOSDiskCmdletInfo : CmdletsInfo + { + public GetAzureOSDiskCmdletInfo(PersistentVM vm) + { + cmdletName = Utilities.GetAzureOSDiskCmdletName; + this.cmdletParams.Add(new CmdletParam("VM", vm)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureOSVersion.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureOSVersion.cs new file mode 100644 index 000000000000..a8a434c06f42 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureOSVersion.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class GetAzureOSVersionCmdletInfo : CmdletsInfo + { + public GetAzureOSVersionCmdletInfo() + { + cmdletName = Utilities.GetAzureOSVersionCmdletName; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureRemoteDesktopFileCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureRemoteDesktopFileCmdletInfo.cs new file mode 100644 index 000000000000..24d6c3fc82bf --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureRemoteDesktopFileCmdletInfo.cs @@ -0,0 +1,34 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class GetAzureRemoteDesktopFileCmdletInfo : CmdletsInfo + { + public GetAzureRemoteDesktopFileCmdletInfo(string vmName, string serviceName, string localPath, bool launch) + { + this.cmdletName = Utilities.GetAzureRemoteDesktopFileCmdletName; + this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + this.cmdletParams.Add(new CmdletParam("Name", vmName)); + this.cmdletParams.Add(new CmdletParam("LocalPath", localPath)); + if (launch) + { + this.cmdletParams.Add(new CmdletParam("Launch")); + } + + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureRole.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureRole.cs new file mode 100644 index 000000000000..76d1332d286f --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureRole.cs @@ -0,0 +1,36 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class GetAzureRoleCmdletInfo : CmdletsInfo + { + public GetAzureRoleCmdletInfo(string serviceName, string slot, string roleName, bool details) + { + cmdletName = Utilities.GetAzureRoleCmdletName; + this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + this.cmdletParams.Add(new CmdletParam("Slot", slot)); + if (roleName != null) + { + this.cmdletParams.Add(new CmdletParam("RoleName", roleName)); + } + if (details) + { + this.cmdletParams.Add(new CmdletParam("InstanceDetails")); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureRoleSize.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureRoleSize.cs new file mode 100644 index 000000000000..6d73d33f70b0 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureRoleSize.cs @@ -0,0 +1,31 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class GetAzureRoleSizeCmdletInfo : CmdletsInfo + { + public GetAzureRoleSizeCmdletInfo(string instanceSize) + { + cmdletName = Utilities.GetAzureRoleSizeCmdletName; + + if (!string.IsNullOrEmpty(instanceSize)) + { + this.cmdletParams.Add(new CmdletParam("InstanceSize", instanceSize)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureServiceCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureServiceCmdletInfo.cs new file mode 100644 index 000000000000..c738c66c3d5a --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureServiceCmdletInfo.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class GetAzureServiceCmdletInfo : CmdletsInfo + { + public GetAzureServiceCmdletInfo(string serviceName) + { + this.cmdletName = Utilities.GetAzureServiceCmdletName; + this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureStaticVNetIPCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureStaticVNetIPCmdletInfo.cs new file mode 100644 index 000000000000..8daf003154ad --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureStaticVNetIPCmdletInfo.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class GetAzureStaticVNetIPCmdletInfo : CmdletsInfo + { + public GetAzureStaticVNetIPCmdletInfo(IPersistentVM vM) + { + cmdletName = Utilities.GetAzureStaticVNetIPCmdletName; + cmdletParams.Add(new CmdletParam("VM", vM)); + } + + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureStorageAccountCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureStorageAccountCmdletInfo.cs new file mode 100644 index 000000000000..75993e854cf1 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureStorageAccountCmdletInfo.cs @@ -0,0 +1,31 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class GetAzureStorageAccountCmdletInfo : CmdletsInfo + { + public GetAzureStorageAccountCmdletInfo(string accountName) + { + cmdletName = Utilities.GetAzureStorageAccountCmdletName; + + if (accountName != null) + { + this.cmdletParams.Add(new CmdletParam("StorageAccountName", accountName)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureStorageKeyCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureStorageKeyCmdletInfo.cs new file mode 100644 index 000000000000..4cc59d272fd6 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureStorageKeyCmdletInfo.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class GetAzureStorageKeyCmdletInfo : CmdletsInfo + { + public GetAzureStorageKeyCmdletInfo(string storageAccountName) + { + cmdletName = Utilities.GetAzureStorageKeyCmdletName; + cmdletParams.Add(new CmdletParam("StorageAccountName", storageAccountName)); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureSubnet.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureSubnet.cs new file mode 100644 index 000000000000..0e7766b4384a --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureSubnet.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class GetAzureSubnetCmdletInfo : CmdletsInfo + { + public GetAzureSubnetCmdletInfo(PersistentVM vm) + { + this.cmdletName = Utilities.GetAzureSubnetCmdletName; + + this.cmdletParams.Add(new CmdletParam("VM", vm)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureVMCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureVMCmdletInfo.cs new file mode 100644 index 000000000000..29e5f4a4c2b6 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureVMCmdletInfo.cs @@ -0,0 +1,34 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class GetAzureVMCmdletInfo : CmdletsInfo + { + public GetAzureVMCmdletInfo(string vmName, string serviceName) + { + this.cmdletName = Utilities.GetAzureVMCmdletName; + if (!string.IsNullOrEmpty(vmName)) + { + this.cmdletParams.Add(new CmdletParam("Name", vmName)); + } + if (!string.IsNullOrEmpty(serviceName)) + { + this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureVMImageCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureVMImageCmdletInfo.cs new file mode 100644 index 000000000000..5fbc8ed1ed19 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureVMImageCmdletInfo.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class GetAzureVMImageCmdletInfo : CmdletsInfo + { + public GetAzureVMImageCmdletInfo(string imageName) + { + cmdletName = Utilities.GetAzureVMImageCmdletName; + if (!System.String.IsNullOrWhiteSpace(imageName)) + { + this.cmdletParams.Add(new CmdletParam("ImageName", imageName)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureVNetConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureVNetConfig.cs new file mode 100644 index 000000000000..6f1173e431c4 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureVNetConfig.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class GetAzureVNetConfigCmdletInfo : CmdletsInfo + { + public GetAzureVNetConfigCmdletInfo(string filePath) + { + cmdletName = Utilities.GetAzureVNetConfigCmdletName; + if (filePath != null) + { + this.cmdletParams.Add(new CmdletParam("ExportToFile", filePath)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureVNetConnection.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureVNetConnection.cs new file mode 100644 index 000000000000..951203a78a0a --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureVNetConnection.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class GetAzureVNetConnectionCmdletInfo : CmdletsInfo + { + public GetAzureVNetConnectionCmdletInfo(string vnetName) + { + cmdletName = Utilities.GetAzureVNetConnectionCmdletName; + this.cmdletParams.Add(new CmdletParam("VNetName", vnetName)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureVNetGateway.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureVNetGateway.cs new file mode 100644 index 000000000000..9ce1d06c33a7 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureVNetGateway.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class GetAzureVNetGatewayCmdletInfo : CmdletsInfo + { + public GetAzureVNetGatewayCmdletInfo(string vnetName) + { + cmdletName = Utilities.GetAzureVNetGatewayCmdletName; + this.cmdletParams.Add(new CmdletParam("VNetName", vnetName)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureVNetGatewayKey.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureVNetGatewayKey.cs new file mode 100644 index 000000000000..1eca5b26e477 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureVNetGatewayKey.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class GetAzureVNetGatewayKeyCmdletInfo : CmdletsInfo + { + public GetAzureVNetGatewayKeyCmdletInfo(string vnetName, string localNetwork) + { + this.cmdletName = Utilities.GetAzureVNetGatewayKeyCmdletName; + this.cmdletParams.Add(new CmdletParam("VNetName", vnetName)); + this.cmdletParams.Add(new CmdletParam("LocalNetworkSiteName", localNetwork)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureVNetSite.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureVNetSite.cs new file mode 100644 index 000000000000..e33b61988637 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetAzureVNetSite.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class GetAzureVNetSiteCmdletInfo : CmdletsInfo + { + public GetAzureVNetSiteCmdletInfo(string vnetName) + { + cmdletName = Utilities.GetAzureVNetSiteCmdletName; + if (vnetName != null) + { + this.cmdletParams.Add(new CmdletParam("VNetName", vnetName)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetModuleCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetModuleCmdletInfo.cs new file mode 100644 index 000000000000..7d5d439fcbd1 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/GetModuleCmdletInfo.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class GetModuleCmdletInfo : CmdletsInfo + { + public GetModuleCmdletInfo() + { + cmdletName = Utilities.GetModuleCmdletName; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/ILB/AddAzureInternalLoadBalancerCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/ILB/AddAzureInternalLoadBalancerCmdletInfo.cs new file mode 100644 index 000000000000..995eff345a16 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/ILB/AddAzureInternalLoadBalancerCmdletInfo.cs @@ -0,0 +1,37 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Net; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.ILB +{ + public class AddAzureInternalLoadBalancerCmdletInfo: CmdletsInfo + { + + public AddAzureInternalLoadBalancerCmdletInfo(string internalLoadBalancerName, string serviceName, string subnetName, IPAddress staticVNetIPAddress) + { + this.cmdletName = Utilities.AddAzureInternalLoadBalancerCmdletName; + //mandatory parameter + this.cmdletParams.Add(new CmdletParam("InternalLoadBalancerName", internalLoadBalancerName)); + //mandatory parameter + this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + //mandatory parameter + this.cmdletParams.Add(new CmdletParam("SubnetName", subnetName)); + if (staticVNetIPAddress != null) + this.cmdletParams.Add(new CmdletParam("StaticVNetIPAddress",staticVNetIPAddress)); + } + + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/ILB/GetAzureInternalLoadBalancerCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/ILB/GetAzureInternalLoadBalancerCmdletInfo.cs new file mode 100644 index 000000000000..8e8f416b6885 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/ILB/GetAzureInternalLoadBalancerCmdletInfo.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.ILB +{ + public class GetAzureInternalLoadBalancerCmdletInfo: CmdletsInfo + { + public GetAzureInternalLoadBalancerCmdletInfo(string serviceName) + { + this.cmdletName = Utilities.GetAzureInternalLoadBalancerCmdletName; + this.cmdletParams.Add(new CmdletParam("ServiceName",serviceName)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/ILB/GetAzurePublicIPCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/ILB/GetAzurePublicIPCmdletInfo.cs new file mode 100644 index 000000000000..5c53f8bbdb20 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/ILB/GetAzurePublicIPCmdletInfo.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.ILB +{ + public class GetAzurePublicIPCmdletInfo : CmdletsInfo + { + + public GetAzurePublicIPCmdletInfo(string publicIPName, IPersistentVM vm) + { + this.cmdletName = Utilities.GetAzurePublicIPCmdletName; + this.parameters.Add(new CmdletParam("PublicIPName",publicIPName)); + this.parameters.Add(new CmdletParam("VM", vm)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/ILB/NewAzureInternalLoadBalancerConfigCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/ILB/NewAzureInternalLoadBalancerConfigCmdletInfo.cs new file mode 100644 index 000000000000..a88c20c86283 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/ILB/NewAzureInternalLoadBalancerConfigCmdletInfo.cs @@ -0,0 +1,32 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Net; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.ILB +{ + public class NewAzureInternalLoadBalancerConfigCmdletInfo: CmdletsInfo + { + public NewAzureInternalLoadBalancerConfigCmdletInfo(string internalLoadBalancerName, string subnetName, IPAddress staticVNetIPAddress) + { + this.cmdletName = Utilities.NewAzureInternalLoadBalancerConfigCmdletName; + this.cmdletParams.Add(new CmdletParam("InternalLoadBalancerName", internalLoadBalancerName)); + if (!string.IsNullOrEmpty(subnetName)) + this.cmdletParams.Add(new CmdletParam("SubnetName", subnetName)); + if (staticVNetIPAddress !=null) + this.cmdletParams.Add(new CmdletParam("StaticVNetIPAddress", staticVNetIPAddress)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/ILB/RemoveAzureInternalLoadBalancerCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/ILB/RemoveAzureInternalLoadBalancerCmdletInfo.cs new file mode 100644 index 000000000000..053a53a7e134 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/ILB/RemoveAzureInternalLoadBalancerCmdletInfo.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.ILB +{ + public class RemoveAzureInternalLoadBalancerCmdletInfo: CmdletsInfo + { + public RemoveAzureInternalLoadBalancerCmdletInfo(string serviceName) + { + this.cmdletName = Utilities.RemoveAzureInternalLoadBalancerCmdletName; + this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + } + + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/ILB/SetAzureInternalLoadBalancerCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/ILB/SetAzureInternalLoadBalancerCmdletInfo.cs new file mode 100644 index 000000000000..d442d0473ee3 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/ILB/SetAzureInternalLoadBalancerCmdletInfo.cs @@ -0,0 +1,37 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Net; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.ILB +{ + public class SetAzureInternalLoadBalancerCmdletInfo: CmdletsInfo + { + + public SetAzureInternalLoadBalancerCmdletInfo(string internalLoadBalancerName, string serviceName, string subnetName, IPAddress staticVNetIPAddress) + { + this.cmdletName = Utilities.SetAzureInternalLoadBalancerCmdletName; + //mandatory parameter + this.cmdletParams.Add(new CmdletParam("InternalLoadBalancerName", internalLoadBalancerName)); + //mandatory parameter + this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + //mandatory parameter + this.cmdletParams.Add(new CmdletParam("SubnetName", subnetName)); + if (staticVNetIPAddress != null) + this.cmdletParams.Add(new CmdletParam("StaticVNetIPAddress",staticVNetIPAddress)); + } + + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/ILB/SetAzurePublicIPCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/ILB/SetAzurePublicIPCmdletInfo.cs new file mode 100644 index 000000000000..dbbc06a65c38 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/ILB/SetAzurePublicIPCmdletInfo.cs @@ -0,0 +1,31 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.ILB +{ + public class SetAzurePublicIPCmdletInfo: CmdletsInfo + { + + public SetAzurePublicIPCmdletInfo(string publicIPName,IPersistentVM vm) + { + this.cmdletName = Utilities.SetAzurePublicIPCmdletName; + this.parameters.Add(new CmdletParam("PublicIPName", publicIPName)); + this.parameters.Add(new CmdletParam("VM", vm)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/ImportAzureVMCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/ImportAzureVMCmdletInfo.cs new file mode 100644 index 000000000000..743262dbe9a5 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/ImportAzureVMCmdletInfo.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class ImportAzureVMCmdletInfo : CmdletsInfo + { + public ImportAzureVMCmdletInfo(string path) + { + this.cmdletName = Utilities.ImportAzureVMCmdletName; + this.cmdletParams.Add(new CmdletParam("Path", path)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/MoveAzureDeploymentCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/MoveAzureDeploymentCmdletInfo.cs new file mode 100644 index 000000000000..39f290bb2de7 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/MoveAzureDeploymentCmdletInfo.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class MoveAzureDeploymentCmdletInfo : CmdletsInfo + { + public MoveAzureDeploymentCmdletInfo(string serviceName) + { + cmdletName = Utilities.MoveAzureDeploymentCmdletName; + + cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureAclConfigCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureAclConfigCmdletInfo.cs new file mode 100644 index 000000000000..bad7cf66b891 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureAclConfigCmdletInfo.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class NewAzureAclConfigCmdletInfo : CmdletsInfo + { + public NewAzureAclConfigCmdletInfo() + { + this.cmdletName = Utilities.NewAzureAclConfigCmdletName; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureAffinityGroupCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureAffinityGroupCmdletInfo.cs new file mode 100644 index 000000000000..4fea4c62a371 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureAffinityGroupCmdletInfo.cs @@ -0,0 +1,37 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class NewAzureAffinityGroupCmdletInfo : CmdletsInfo + { + public NewAzureAffinityGroupCmdletInfo(string name, string location, string label, string description) + { + cmdletName = Utilities.NewAzureAffinityGroupCmdletName; + + cmdletParams.Add(new CmdletParam("Name", name)); + cmdletParams.Add(new CmdletParam("Location", location)); + if (label != null) + { + cmdletParams.Add(new CmdletParam("Label", label)); + } + if (description != null) + { + cmdletParams.Add(new CmdletParam("Description", description)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureCertificateSettingCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureCertificateSettingCmdletInfo.cs new file mode 100644 index 000000000000..be10c2483c6f --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureCertificateSettingCmdletInfo.cs @@ -0,0 +1,32 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class NewAzureCertificateSettingCmdletInfo : CmdletsInfo + { + public NewAzureCertificateSettingCmdletInfo(string storeName, string thumbprint) + { + cmdletName = Utilities.NewAzureCertificateSettingCmdletName; + + if (storeName != null) + { + cmdletParams.Add(new CmdletParam("StoreName", storeName)); + } + cmdletParams.Add(new CmdletParam("Thumbprint", thumbprint)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureDns.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureDns.cs new file mode 100644 index 000000000000..1d4a8632a9dd --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureDns.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class NewAzureDnsCmdletInfo : CmdletsInfo + { + public NewAzureDnsCmdletInfo(string name, string ip) + { + cmdletName = Utilities.NewAzureDnsCmdletName; + this.cmdletParams.Add(new CmdletParam("Name", name)); + this.cmdletParams.Add(new CmdletParam("IPAddress", ip)); + + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureQuickVMCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureQuickVMCmdletInfo.cs new file mode 100644 index 000000000000..9b112edab08f --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureQuickVMCmdletInfo.cs @@ -0,0 +1,185 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class NewAzureQuickVMCmdletInfo : CmdletsInfo + { + public NewAzureQuickVMCmdletInfo(OS os, string name, string serviceName, string imageName, string userName, string password) + { + cmdletName = Utilities.NewAzureQuickVMCmdletName; + + if (os == OS.Windows) + { + cmdletParams.Add(new CmdletParam("Windows", null)); + if (!string.IsNullOrWhiteSpace(userName)) + { + cmdletParams.Add(new CmdletParam("AdminUsername", userName)); + } + } + else + { + cmdletParams.Add(new CmdletParam("Linux", null)); + if (!string.IsNullOrWhiteSpace(userName)) + { + cmdletParams.Add(new CmdletParam("LinuxUser", userName)); + } + } + cmdletParams.Add(new CmdletParam("ImageName", imageName)); + cmdletParams.Add(new CmdletParam("Name", name)); + cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + if (!string.IsNullOrEmpty(password)) + { + cmdletParams.Add(new CmdletParam("Password", password)); + } + } + + public NewAzureQuickVMCmdletInfo(OS os, string name, string serviceName, string imageName, string userName, + string password, string locationName) + : this(os, name, serviceName, imageName, userName, password) + { + if (!string.IsNullOrEmpty(locationName)) + { + cmdletParams.Add(new CmdletParam("Location", locationName)); + } + } + + public NewAzureQuickVMCmdletInfo(OS os, string name, string serviceName, string imageName, string userName, + string password, string locationName, string instanceSize) + : this(os, name, serviceName, imageName, userName, password, locationName) + { + if (!string.IsNullOrEmpty(instanceSize)) + { + cmdletParams.Add(new CmdletParam("InstanceSize", instanceSize)); + } + } + + public NewAzureQuickVMCmdletInfo(OS os, string name, string serviceName, string imageName, string userName, + string password, string locationName, string instanceSize, string disableWinRMHttps, string reservedIpName, string vnetName) + : this(os, name, serviceName, imageName, userName, password, locationName, instanceSize) + { + if (!string.IsNullOrEmpty(disableWinRMHttps)) + { + cmdletParams.Add(new CmdletParam("DisableWinRMHttps", disableWinRMHttps)); + } + if (!string.IsNullOrEmpty(reservedIpName)) + { + cmdletParams.Add(new CmdletParam("ReservedIPName", reservedIpName)); + } + if (!string.IsNullOrEmpty(vnetName)) + { + cmdletParams.Add(new CmdletParam("VNetName", vnetName)); + } + } + + public NewAzureQuickVMCmdletInfo(OS os, string name, string serviceName, string imageName, string instanceSize, + string userName, string password, string vNetName, string[] subnetNames, string affinityGroup, string reservedIP) + : this(os, name, serviceName, imageName, userName, password) + { + if (!string.IsNullOrEmpty(affinityGroup)) + { + cmdletParams.Add(new CmdletParam("AffinityGroup", affinityGroup)); + } + if (!string.IsNullOrEmpty(instanceSize)) + { + cmdletParams.Add(new CmdletParam("InstanceSize", instanceSize)); + } + if (!string.IsNullOrEmpty(vNetName)) + { + cmdletParams.Add(new CmdletParam("VNetName", vNetName)); + } + if (subnetNames != null) + { + cmdletParams.Add(new CmdletParam("SubnetNames", subnetNames)); + } + if (!string.IsNullOrEmpty(reservedIP)) + { + cmdletParams.Add(new CmdletParam("ReservedIPName", reservedIP)); + } + } + + public NewAzureQuickVMCmdletInfo( + OS os, + string name, + string serviceName, + string imageName, + string userName, + string password, + string location, + string instanceSize, + string vnetName, + string[] subnetNames, + string affinityGroup, + string availabilitySetName, + CertificateSettingList certificates, + DnsServer[] dnsSettings, + string hostCaching, + string mediaLocation, + LinuxProvisioningConfigurationSet.SSHKeyPairList sshKeyPairs, + LinuxProvisioningConfigurationSet.SSHPublicKeyList sshPublicKeys, + string customDataFileName) + : this(os, name, serviceName, imageName, userName, password, location, instanceSize) + { + + if (!string.IsNullOrEmpty(affinityGroup)) + { + cmdletParams.Add(new CmdletParam("AffinityGroup", affinityGroup)); + } + if (!string.IsNullOrEmpty(availabilitySetName)) + { + cmdletParams.Add(new CmdletParam("AvailabilitySetName", availabilitySetName)); + } + if (certificates != null) + { + cmdletParams.Add(new CmdletParam("Certificates", certificates)); + } + if (dnsSettings != null) + { + cmdletParams.Add(new CmdletParam("DnsSettings", dnsSettings)); + } + if (!string.IsNullOrEmpty(hostCaching)) + { + cmdletParams.Add(new CmdletParam("HostCaching", hostCaching)); + } + if (!string.IsNullOrEmpty(mediaLocation)) + { + cmdletParams.Add(new CmdletParam("MediaLocation", mediaLocation)); + } + if (sshKeyPairs != null) + { + cmdletParams.Add(new CmdletParam("SSHKeyPairs", sshKeyPairs)); + } + if (sshPublicKeys != null) + { + cmdletParams.Add(new CmdletParam("SSHPublicKeys", sshPublicKeys)); + } + if (subnetNames != null) + { + cmdletParams.Add(new CmdletParam("SubnetNames", subnetNames)); + } + if (!string.IsNullOrEmpty(vnetName)) + { + cmdletParams.Add(new CmdletParam("VNetName", vnetName)); + } + if (!string.IsNullOrEmpty(customDataFileName)) + { + cmdletParams.Add(new CmdletParam("CustomData", customDataFileName)); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureSSHKeyCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureSSHKeyCmdletInfo.cs new file mode 100644 index 000000000000..d5f9405a9913 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureSSHKeyCmdletInfo.cs @@ -0,0 +1,40 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class NewAzureSSHKeyCmdletInfo : CmdletsInfo + { + public NewAzureSSHKeyCmdletInfo(NewAzureSshKeyType option, string fingerPrint, string path) + { + cmdletName = Utilities.NewAzureSSHKeyCmdletName; + + switch (option) + { + case NewAzureSshKeyType.KeyPair: + cmdletParams.Add(new CmdletParam("KeyPair")); + break; + case NewAzureSshKeyType.PublicKey: + cmdletParams.Add(new CmdletParam("PublicKey")); + break; + } + + cmdletParams.Add(new CmdletParam("Fingerprint", fingerPrint)); + cmdletParams.Add(new CmdletParam("Path", path)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureServiceCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureServiceCmdletInfo.cs new file mode 100644 index 000000000000..79b225035e72 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureServiceCmdletInfo.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class NewAzureServiceCmdletInfo : CmdletsInfo + { + public NewAzureServiceCmdletInfo(string serviceName, string serviceLabel, string serviceLocation, string affinityGroupName) + { + this.cmdletName = Utilities.NewAzureServiceCmdletName; + + this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + this.cmdletParams.Add(new CmdletParam("Label", serviceLabel)); + if (! string.IsNullOrEmpty(serviceLocation)) + { + this.cmdletParams.Add(new CmdletParam("Location", serviceLocation)); + } + if (! string.IsNullOrEmpty(affinityGroupName)) + { + this.cmdletParams.Add(new CmdletParam("AffinityGroup", affinityGroupName)); + } + } + + public NewAzureServiceCmdletInfo(string serviceName, string serviceLocation) + { + this.cmdletName = Utilities.NewAzureServiceCmdletName; + + this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + this.cmdletParams.Add(new CmdletParam("Location", serviceLocation)); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureStorageAccountCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureStorageAccountCmdletInfo.cs new file mode 100644 index 000000000000..0339fb9b373d --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureStorageAccountCmdletInfo.cs @@ -0,0 +1,49 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class NewAzureStorageAccountCmdletInfo : CmdletsInfo + { + public NewAzureStorageAccountCmdletInfo(string storageAccountName, string location, string affinity, string label, string description, string accountType) + { + this.cmdletName = Utilities.NewAzureStorageAccountCmdletName; + + this.cmdletParams.Add(new CmdletParam("StorageAccountName", storageAccountName)); + if (location != null) + { + this.cmdletParams.Add(new CmdletParam("Location", location)); + } + if (affinity != null) + { + this.cmdletParams.Add(new CmdletParam("AffinityGroup", affinity)); + } + if (label != null) + { + this.cmdletParams.Add(new CmdletParam("Label", label)); + } + if (description != null) + { + this.cmdletParams.Add(new CmdletParam("Description", description)); + } + + if (!string.IsNullOrEmpty(accountType)) + { + this.cmdletParams.Add(new CmdletParam("Type", accountType)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureStorageKeyCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureStorageKeyCmdletInfo.cs new file mode 100644 index 000000000000..5113bb4b54a2 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureStorageKeyCmdletInfo.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class NewAzureStorageKeyCmdletInfo : CmdletsInfo + { + public NewAzureStorageKeyCmdletInfo(string storageAccountName, string keyType) + { + cmdletName = Utilities.NewAzureStorageKeyCmdletName; + cmdletParams.Add(new CmdletParam("StorageAccountName", storageAccountName)); + cmdletParams.Add(new CmdletParam("KeyType", keyType)); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureVMCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureVMCmdletInfo.cs new file mode 100644 index 000000000000..3438dc1d490f --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureVMCmdletInfo.cs @@ -0,0 +1,77 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class NewAzureVMCmdletInfo : CmdletsInfo + { + + public NewAzureVMCmdletInfo(string serviceName, PersistentVM[] vMs, string vnetName, DnsServer[] dnsSettings, + string serviceLabel, string serviceDescription, string deploymentLabel, string deploymentName, string location, string affinityGroup, string rsvIPName,InternalLoadBalancerConfig internalLoadBalancerConfig, bool waitForBoot) + { + this.cmdletName = Utilities.NewAzureVMCmdletName; + + this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + this.cmdletParams.Add(new CmdletParam("VMs", vMs)); + + if (!string.IsNullOrEmpty(vnetName)) + { + this.cmdletParams.Add(new CmdletParam("VNetName", vnetName)); + } + if (dnsSettings != null) + { + this.cmdletParams.Add(new CmdletParam("DnsSettings", dnsSettings)); + } + if (!string.IsNullOrEmpty(affinityGroup)) + { + this.cmdletParams.Add(new CmdletParam("AffinityGroup", affinityGroup)); + } + if (!string.IsNullOrEmpty(serviceLabel)) + { + this.cmdletParams.Add(new CmdletParam("ServiceLabel", serviceLabel)); + } + if (!string.IsNullOrEmpty(serviceDescription)) + { + this.cmdletParams.Add(new CmdletParam("ServiceDescription", serviceDescription)); + } + if (!string.IsNullOrEmpty(deploymentLabel)) + { + this.cmdletParams.Add(new CmdletParam("DeploymentLabel", deploymentLabel)); + } + if (!string.IsNullOrEmpty(deploymentName)) + { + this.cmdletParams.Add(new CmdletParam("DeploymentName", deploymentName)); + } + if (!string.IsNullOrEmpty(location)) + { + this.cmdletParams.Add(new CmdletParam("Location", location)); + } + if (!string.IsNullOrEmpty(rsvIPName)) + { + this.cmdletParams.Add(new CmdletParam("ReservedIPName", rsvIPName)); + } + if (waitForBoot) + { + this.cmdletParams.Add(new CmdletParam("WaitForBoot", waitForBoot)); + } + if (internalLoadBalancerConfig != null) + { + this.cmdletParams.Add(new CmdletParam("InternalLoadBalancerConfig", internalLoadBalancerConfig)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureVMConfigCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureVMConfigCmdletInfo.cs new file mode 100644 index 000000000000..bb06c5fcb852 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureVMConfigCmdletInfo.cs @@ -0,0 +1,31 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class NewAzureVMConfigCmdletInfo : CmdletsInfo + { + public NewAzureVMConfigCmdletInfo(AzureVMConfigInfo vmConfig) + { + this.cmdletName = Utilities.NewAzureVMConfigCmdletName; + + this.cmdletParams.Add(new CmdletParam("Name", vmConfig.vmName)); + this.cmdletParams.Add(new CmdletParam("ImageName", vmConfig.imageName)); + this.cmdletParams.Add(new CmdletParam("InstanceSize", vmConfig.vmSize)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureVNetGateway.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureVNetGateway.cs new file mode 100644 index 000000000000..a804e8a19c10 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/NewAzureVNetGateway.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class NewAzureVNetGatewayCmdletInfo : CmdletsInfo + { + public NewAzureVNetGatewayCmdletInfo(string vnetName) + { + cmdletName = Utilities.NewAzureVNetGatewayCmdletName; + this.cmdletParams.Add(new CmdletParam("VNetName", vnetName)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureAffinityGroupCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureAffinityGroupCmdletInfo.cs new file mode 100644 index 000000000000..5f23ede5ffdd --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureAffinityGroupCmdletInfo.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class RemoveAzureAffinityGroupCmdletInfo : CmdletsInfo + { + public RemoveAzureAffinityGroupCmdletInfo(string name) + { + cmdletName = Utilities.RemoveAzureAffinityGroupCmdletName; + + cmdletParams.Add(new CmdletParam("Name", name)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureAvailabilitySetCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureAvailabilitySetCmdletInfo.cs new file mode 100644 index 000000000000..84a1e35aadd2 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureAvailabilitySetCmdletInfo.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + using Model; + using PowershellCore; + + public class RemoveAzureAvailabilitySetCmdletInfo : CmdletsInfo + { + public RemoveAzureAvailabilitySetCmdletInfo(PersistentVM vm) + { + base.cmdletName = Utilities.RemoveAzureAvailabilitySetCmdletName; + this.cmdletParams.Add(new CmdletParam("VM", vm)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureCertificateCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureCertificateCmdletInfo.cs new file mode 100644 index 000000000000..50a56505a8e6 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureCertificateCmdletInfo.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class RemoveAzureCertificateCmdletInfo : CmdletsInfo + { + public RemoveAzureCertificateCmdletInfo(string serviceName, string thumbprint, string algorithm) + { + cmdletName = Utilities.RemoveAzureCertificateCmdletName; + + cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + cmdletParams.Add(new CmdletParam("Thumbprint", thumbprint)); + cmdletParams.Add(new CmdletParam("ThumbprintAlgorithm", algorithm)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureDataDiskCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureDataDiskCmdletInfo.cs new file mode 100644 index 000000000000..f8afd3607c91 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureDataDiskCmdletInfo.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class RemoveAzureDataDiskCmdletInfo : CmdletsInfo + { + public RemoveAzureDataDiskCmdletInfo(RemoveAzureDataDiskConfig discCfg) + { + this.cmdletName = Utilities.RemoveAzureDataDiskCmdletName; + this.cmdletParams.Add(new CmdletParam("LUN", discCfg.lun)); + this.cmdletParams.Add(new CmdletParam("VM", discCfg.Vm)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureDiskCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureDiskCmdletInfo.cs new file mode 100644 index 000000000000..f622bf83d21e --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureDiskCmdletInfo.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class RemoveAzureDiskCmdletInfo : CmdletsInfo + { + public RemoveAzureDiskCmdletInfo(string diskName, bool deleteVHD) + { + this.cmdletName = Utilities.RemoveAzureDiskCmdletName; + this.cmdletParams.Add(new CmdletParam("DiskName", diskName)); + if (deleteVHD) + this.cmdletParams.Add(new CmdletParam("DeleteVHD")); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureDnsCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureDnsCmdletInfo.cs new file mode 100644 index 000000000000..b6b0a517013f --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureDnsCmdletInfo.cs @@ -0,0 +1,34 @@ + +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class RemoveAzureDnsCmdletInfo : CmdletsInfo + { + public RemoveAzureDnsCmdletInfo(string name, string serviceName, bool force = false) + { + cmdletName = Utilities.RemoveAzureDnsCmdletName; + this.cmdletParams.Add(new CmdletParam("Name", name)); + this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + + if (force) + { + this.cmdletParams.Add(new CmdletParam("Force")); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureEndpointCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureEndpointCmdletInfo.cs new file mode 100644 index 000000000000..675e95896a4c --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureEndpointCmdletInfo.cs @@ -0,0 +1,36 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class RemoveAzureEndpointCmdletInfo : CmdletsInfo + { + public RemoveAzureEndpointCmdletInfo(string epName, PersistentVMRoleContext vmRoleCtxt) + { + this.cmdletName = Utilities.RemoveAzureEndpointCmdletName; + this.cmdletParams.Add(new CmdletParam("Name", epName)); + this.cmdletParams.Add(new CmdletParam("VM", vmRoleCtxt)); + } + + public RemoveAzureEndpointCmdletInfo(string epName, PersistentVM vm) + { + this.cmdletName = Utilities.RemoveAzureEndpointCmdletName; + this.cmdletParams.Add(new CmdletParam("Name", epName)); + this.cmdletParams.Add(new CmdletParam("VM", vm)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureNetworkInterfaceConfigCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureNetworkInterfaceConfigCmdletInfo.cs new file mode 100644 index 000000000000..14db28875205 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureNetworkInterfaceConfigCmdletInfo.cs @@ -0,0 +1,31 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.ILB +{ + public class RemoveAzureNetworkInterfaceConfigCmdletInfo: CmdletsInfo + { + + public RemoveAzureNetworkInterfaceConfigCmdletInfo(string name, IPersistentVM vm) + { + this.cmdletName = Utilities.RemoveAzureNetworkInterfaceConfig; + this.parameters.Add(new CmdletParam("Name", name)); + this.parameters.Add(new CmdletParam("VM", vm)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureServiceCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureServiceCmdletInfo.cs new file mode 100644 index 000000000000..013efd785f9b --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureServiceCmdletInfo.cs @@ -0,0 +1,33 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class RemoveAzureServiceCmdletInfo : CmdletsInfo + { + public RemoveAzureServiceCmdletInfo(string serviceName, bool deleteAll) + { + this.cmdletName = Utilities.RemoveAzureServiceCmdletName; + this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + this.cmdletParams.Add(new CmdletParam("Force")); + + if (deleteAll) + { + this.cmdletParams.Add(new CmdletParam("DeleteAll")); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureStaticVNetIPCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureStaticVNetIPCmdletInfo.cs new file mode 100644 index 000000000000..dea3ba84217b --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureStaticVNetIPCmdletInfo.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class RemoveAzureStaticVNetIPCmdletInfo : CmdletsInfo + { + public RemoveAzureStaticVNetIPCmdletInfo(IPersistentVM vM) + { + cmdletName = Utilities.RemoveAzureStaticVNetIPCmdletName; + cmdletParams.Add(new CmdletParam("VM", vM)); + } + + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureStorageAccountCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureStorageAccountCmdletInfo.cs new file mode 100644 index 000000000000..d011843998e7 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureStorageAccountCmdletInfo.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class RemoveAzureStorageAccountCmdletInfo : CmdletsInfo + { + public RemoveAzureStorageAccountCmdletInfo(string storageAccountName) + { + this.cmdletName = Utilities.RemoveAzureStorageAccountCmdletName; + this.cmdletParams.Add(new CmdletParam("StorageAccountName", storageAccountName)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureVMCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureVMCmdletInfo.cs new file mode 100644 index 000000000000..8048c1ad0736 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureVMCmdletInfo.cs @@ -0,0 +1,34 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class RemoveAzureVMCmdletInfo : CmdletsInfo + { + public RemoveAzureVMCmdletInfo(string vmName, string serviceName, bool deleteVhd) + { + this.cmdletName = Utilities.RemoveAzureVMCmdletName; + this.cmdletParams.Add(new CmdletParam("Name", vmName)); + this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + + if (deleteVhd) + { + this.cmdletParams.Add(new CmdletParam("DeleteVhd")); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureVMImageCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureVMImageCmdletInfo.cs new file mode 100644 index 000000000000..80500367ddb1 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureVMImageCmdletInfo.cs @@ -0,0 +1,32 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class RemoveAzureVMImageCmdletInfo : CmdletsInfo + { + public RemoveAzureVMImageCmdletInfo(string imageName, bool deleteVhd) + { + cmdletName = Utilities.RemoveAzureVMImageCmdletName; + + cmdletParams.Add(new CmdletParam("ImageName", imageName)); + if (deleteVhd) + { + cmdletParams.Add(new CmdletParam("DeleteVHD")); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureVNetConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureVNetConfig.cs new file mode 100644 index 000000000000..c82b9d88655e --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureVNetConfig.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class RemoveAzureVNetConfigCmdletInfo : CmdletsInfo + { + public RemoveAzureVNetConfigCmdletInfo() + { + cmdletName = Utilities.RemoveAzureVNetConfigCmdletName; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureVNetGateway.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureVNetGateway.cs new file mode 100644 index 000000000000..7a3bfe1e2aec --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RemoveAzureVNetGateway.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class RemoveAzureVNetGatewayCmdletInfo : CmdletsInfo + { + public RemoveAzureVNetGatewayCmdletInfo(string vnetName) + { + cmdletName = Utilities.RemoveAzureVNetGatewayCmdletName; + this.cmdletParams.Add(new CmdletParam("VNetName", vnetName)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RestartAzureVMCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RestartAzureVMCmdletInfo.cs new file mode 100644 index 000000000000..81a032745d29 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/RestartAzureVMCmdletInfo.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class RestartAzureVMCmdletInfo : CmdletsInfo + { + public RestartAzureVMCmdletInfo(string vmName, string serviceName) + { + this.cmdletName = Utilities.RestartAzureVMCmdletName; + this.cmdletParams.Add(new CmdletParam("Name", vmName)); + this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SaveAzureVMImageCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SaveAzureVMImageCmdletInfo.cs new file mode 100644 index 000000000000..1a5e244f45d4 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SaveAzureVMImageCmdletInfo.cs @@ -0,0 +1,33 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class SaveAzureVMImageCmdletInfo : CmdletsInfo + { + public SaveAzureVMImageCmdletInfo(string serviceName, string vmName, string newName, string newLabel, string osState) + { + cmdletName = Utilities.SaveAzureVMImageCmdletName; + this.cmdletParams.Add(new CmdletParam("Name", vmName)); + this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + this.cmdletParams.Add(new CmdletParam("NewImageName", newName)); + if(!string.IsNullOrEmpty(osState)) + this.cmdletParams.Add(new CmdletParam("OSState", osState.Trim())); + if (!System.String.IsNullOrWhiteSpace(newLabel)) + this.cmdletParams.Add(new CmdletParam("NewImageLabel", newLabel)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SaveAzureVhdCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SaveAzureVhdCmdletInfo.cs new file mode 100644 index 000000000000..ece893203813 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SaveAzureVhdCmdletInfo.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class SaveAzureVhdCmdletInfo : CmdletsInfo + { + public SaveAzureVhdCmdletInfo(Uri source, FileInfo localFilePath, int? numThreads, string storageKey, bool overwrite) + { + cmdletName = Utilities.SaveAzureVhdCmdletName; + cmdletParams.Add(new CmdletParam("Source", source)); + cmdletParams.Add(new CmdletParam("LocalFilePath", localFilePath)); + + if (numThreads != null) + { + cmdletParams.Add(new CmdletParam("NumberOfThreads", numThreads)); + } + + if (!String.IsNullOrWhiteSpace(storageKey)) + { + cmdletParams.Add(new CmdletParam("StorageKey", storageKey)); + } + + if (overwrite) + { + cmdletParams.Add(new CmdletParam("OverWrite")); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SelectAzureSubscriptionCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SelectAzureSubscriptionCmdletInfo.cs new file mode 100644 index 000000000000..2ad1f1026e17 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SelectAzureSubscriptionCmdletInfo.cs @@ -0,0 +1,46 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class SelectAzureSubscriptionCmdletInfo : CmdletsInfo + { + public SelectAzureSubscriptionCmdletInfo(string subscriptionName) + { + cmdletName = "Select-AzureSubscription"; + cmdletParams.Add(new CmdletParam("SubscriptionName", subscriptionName)); + cmdletParams.Add(new CmdletParam("Default")); + } + + public SelectAzureSubscriptionCmdletInfo(string subscriptionName, bool isDefault, bool clear, string subscriptionDataFile) + { + cmdletName = "Select-AzureSubscription"; + cmdletParams.Add(new CmdletParam("SubscriptionName", subscriptionName)); + if (isDefault) + { + cmdletParams.Add(new CmdletParam("Default")); + } + if (clear) + { + cmdletParams.Add(new CmdletParam("Clear")); + } + if (subscriptionDataFile != null) + { + cmdletParams.Add(new CmdletParam("SubscriptionDataFile", subscriptionDataFile)); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAffinityGroupCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAffinityGroupCmdletInfo.cs new file mode 100644 index 000000000000..9776b8400e9a --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAffinityGroupCmdletInfo.cs @@ -0,0 +1,33 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class SetAzureAffinityGroupCmdletInfo : CmdletsInfo + { + public SetAzureAffinityGroupCmdletInfo(string name, string label, string description) + { + cmdletName = Utilities.SetAzureAffinityGroupCmdletName; + + cmdletParams.Add(new CmdletParam("Name", name)); + cmdletParams.Add(new CmdletParam("Label", label)); + if (description != null) + { + cmdletParams.Add(new CmdletParam("Description", description)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureAclConfigCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureAclConfigCmdletInfo.cs new file mode 100644 index 000000000000..591c66199650 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureAclConfigCmdletInfo.cs @@ -0,0 +1,79 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class SetAzureAclConfigCmdletInfo : CmdletsInfo + { + public SetAzureAclConfigCmdletInfo(string aclConfig, NetworkAclObject aclObj, int? order, string aclAction, string remoteSubnet, string desc, int? ruleId) + { + this.cmdletName = Utilities.SetAzureAclConfigCmdletName; + + switch(aclConfig) + { + case "AddRule" : + this.cmdletParams.Add(new CmdletParam(aclConfig)); + this.cmdletParams.Add(new CmdletParam("ACL", aclObj)); + this.cmdletParams.Add(new CmdletParam("Action", aclAction)); + this.cmdletParams.Add(new CmdletParam("RemoteSubnet", remoteSubnet)); + + if (order.HasValue) + { + this.cmdletParams.Add(new CmdletParam("Order", order)); + } + if (desc != null) + { + this.cmdletParams.Add(new CmdletParam("Description", desc)); + } + break; + + case "RemoveRule" : + this.cmdletParams.Add(new CmdletParam(aclConfig)); + this.cmdletParams.Add(new CmdletParam("ACL", aclObj)); + this.cmdletParams.Add(new CmdletParam("RuleID", ruleId)); + break; + + case "SetRule" : + this.cmdletParams.Add(new CmdletParam(aclConfig)); + this.cmdletParams.Add(new CmdletParam("ACL", aclObj)); + this.cmdletParams.Add(new CmdletParam("RuleID", ruleId)); + + if (order.HasValue) + { + this.cmdletParams.Add(new CmdletParam("Order", order)); + } + if (aclAction != null) + { + this.cmdletParams.Add(new CmdletParam("Action", aclAction)); + } + if (remoteSubnet != null) + { + this.cmdletParams.Add(new CmdletParam("RemoteSubnet", remoteSubnet)); + } + if (desc != null) + { + this.cmdletParams.Add(new CmdletParam("Description", desc)); + } + break; + + default: + break; + } + } + + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureAvailabilitySetCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureAvailabilitySetCmdletInfo.cs new file mode 100644 index 000000000000..c32160eff44d --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureAvailabilitySetCmdletInfo.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class SetAzureAvailabilitySetCmdletInfo : CmdletsInfo + { + public SetAzureAvailabilitySetCmdletInfo(string availabilitySetName, PersistentVM vm) + { + cmdletName = Utilities.SetAzureAvailabilitySetCmdletName; + + cmdletParams.Add(new CmdletParam("AvailabilitySetName", availabilitySetName)); + this.cmdletParams.Add(new CmdletParam("VM", vm)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureDataDiskCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureDataDiskCmdletInfo.cs new file mode 100644 index 000000000000..a0b6edb8c98b --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureDataDiskCmdletInfo.cs @@ -0,0 +1,32 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class SetAzureDataDiskCmdletInfo : CmdletsInfo + { + public SetAzureDataDiskCmdletInfo(SetAzureDataDiskConfig discCfg) + { + cmdletName = Utilities.SetAzureDataDiskCmdletName; + + this.cmdletParams.Add(new CmdletParam("HostCaching", discCfg.hostCaching)); + this.cmdletParams.Add(new CmdletParam("LUN", discCfg.lun)); + this.cmdletParams.Add(new CmdletParam("VM", discCfg.Vm)); + + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureDeploymentCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureDeploymentCmdletInfo.cs new file mode 100644 index 000000000000..73e71a6fb535 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureDeploymentCmdletInfo.cs @@ -0,0 +1,128 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class SetAzureDeploymentCmdletInfo : CmdletsInfo + { + + private SetAzureDeploymentCmdletInfo(string serviceName, string slot) + { + this.cmdletName = Utilities.SetAzureDeploymentCmdletName; + + this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + this.cmdletParams.Add(new CmdletParam("Slot", slot)); + } + + public static SetAzureDeploymentCmdletInfo SetAzureDeploymentStatusCmdletInfo(string serviceName, string slot, string newStatus) + { + SetAzureDeploymentCmdletInfo result = new SetAzureDeploymentCmdletInfo(serviceName, slot); + + result.cmdletParams.Add(new CmdletParam("Status")); + result.cmdletParams.Add(new CmdletParam("NewStatus", newStatus)); + + return result; + } + + + public static SetAzureDeploymentCmdletInfo SetAzureDeploymentConfigCmdletInfo(string serviceName, string slot, string configPath) + { + SetAzureDeploymentCmdletInfo result = new SetAzureDeploymentCmdletInfo(serviceName, slot); + + result.cmdletParams.Add(new CmdletParam("Config")); + result.cmdletParams.Add(new CmdletParam("Configuration", configPath)); + + return result; + } + + public static SetAzureDeploymentCmdletInfo SetAzureDeploymentUpgradeCmdletInfo( + string serviceName, string slot, string mode, string packagePath, string configPath) + { + SetAzureDeploymentCmdletInfo result = new SetAzureDeploymentCmdletInfo(serviceName, slot); + + result.cmdletParams.Add(new CmdletParam("Upgrade")); + + result.cmdletParams.Add(new CmdletParam("Mode", mode)); + result.cmdletParams.Add(new CmdletParam("Package", packagePath)); + result.cmdletParams.Add(new CmdletParam("Configuration", configPath)); + + return result; + } + + public SetAzureDeploymentCmdletInfo( + string option, + string serviceName, + string packagePath, + string configPath, + string newStatus, + string slot, + string mode, + string label, + string roleName, + bool force) + { + cmdletName = Utilities.SetAzureDeploymentCmdletName; + + switch (option) + { + case "config": + cmdletParams.Add(new CmdletParam("Config")); + break; + case "status": + cmdletParams.Add(new CmdletParam("Status")); + break; + case "upgrade": + cmdletParams.Add(new CmdletParam("Upgrade")); + break; + } + + cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + + if (!string.IsNullOrEmpty(packagePath)) + { + cmdletParams.Add(new CmdletParam("Package", packagePath)); + } + if (!string.IsNullOrEmpty(configPath)) + { + cmdletParams.Add(new CmdletParam("Configuration", configPath)); + } + if (!string.IsNullOrEmpty(mode)) + { + cmdletParams.Add(new CmdletParam("Mode", mode)); + } + if (!string.IsNullOrEmpty(newStatus)) + { + cmdletParams.Add(new CmdletParam("NewStatus", newStatus)); + } + if (!string.IsNullOrEmpty(slot)) + { + cmdletParams.Add(new CmdletParam("Slot", slot)); + } + if (!string.IsNullOrEmpty(label)) + { + cmdletParams.Add(new CmdletParam("Label", label)); + } + if (!string.IsNullOrEmpty(roleName)) + { + cmdletParams.Add(new CmdletParam("RoleName", roleName)); + } + if (force) + { + cmdletParams.Add(new CmdletParam("Force")); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureDnsCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureDnsCmdletInfo.cs new file mode 100644 index 000000000000..596f164e46f5 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureDnsCmdletInfo.cs @@ -0,0 +1,28 @@ +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class SetAzureDnsCmdletInfo : CmdletsInfo + { + public SetAzureDnsCmdletInfo(string name, string ip, string serviceName) + { + cmdletName = Utilities.SetAzureDnsCmdletName; + this.cmdletParams.Add(new CmdletParam("Name", name)); + this.cmdletParams.Add(new CmdletParam("IPAddress", ip)); + this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureEndpointCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureEndpointCmdletInfo.cs new file mode 100644 index 000000000000..fcfddece7c9c --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureEndpointCmdletInfo.cs @@ -0,0 +1,53 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class SetAzureEndpointCmdletInfo : CmdletsInfo + { + public SetAzureEndpointCmdletInfo() + { + this.cmdletName = Utilities.SetAzureEndpointCmdletName; + } + + public SetAzureEndpointCmdletInfo(AzureEndPointConfigInfo endPointConfig) + { + this.cmdletName = Utilities.SetAzureEndpointCmdletName; + + this.cmdletParams.Add(new CmdletParam("Name", endPointConfig.EndpointName)); + this.cmdletParams.Add(new CmdletParam("LocalPort", endPointConfig.EndpointLocalPort)); + if (endPointConfig.EndpointPublicPort.HasValue) + { + this.cmdletParams.Add(new CmdletParam("PublicPort", endPointConfig.EndpointPublicPort)); + } + this.cmdletParams.Add(new CmdletParam("Protocol", endPointConfig.EndpointProtocol.ToString())); + this.cmdletParams.Add(new CmdletParam("VM", endPointConfig.Vm)); + if (endPointConfig.Acl != null) + { + this.cmdletParams.Add(new CmdletParam("ACL", endPointConfig.Acl)); + } + if (endPointConfig.DirectServerReturn) + { + this.cmdletParams.Add(new CmdletParam("DirectServerReturn", endPointConfig.DirectServerReturn)); + } + if (!string.IsNullOrEmpty(endPointConfig.LoadBalancerDistribution)) + { + this.cmdletParams.Add(new CmdletParam("LoadBalancerDistribution", endPointConfig.LoadBalancerDistribution)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureLoadBalancedEndpointCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureLoadBalancedEndpointCmdletInfo.cs new file mode 100644 index 000000000000..2c0c6c1fd1b3 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureLoadBalancedEndpointCmdletInfo.cs @@ -0,0 +1,74 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class SetAzureLoadBalancedEndpointCmdletInfo : CmdletsInfo + { + public SetAzureLoadBalancedEndpointCmdletInfo() + { + this.cmdletName = Utilities.SetAzureLoadBalancedEndpointCmdletName; + } + + public SetAzureLoadBalancedEndpointCmdletInfo(AzureEndPointConfigInfo endPointConfig, AzureEndPointConfigInfo.ParameterSet paramset) + { + this.cmdletName = Utilities.SetAzureLoadBalancedEndpointCmdletName; + + this.cmdletParams.Add(new CmdletParam("ServiceName", endPointConfig.ServiceName)); + this.cmdletParams.Add(new CmdletParam("LocalPort", endPointConfig.EndpointLocalPort)); + if (endPointConfig.EndpointPublicPort.HasValue) + { + this.cmdletParams.Add(new CmdletParam("PublicPort", endPointConfig.EndpointPublicPort)); + } + this.cmdletParams.Add(new CmdletParam("Protocol", endPointConfig.EndpointProtocol.ToString())); + this.cmdletParams.Add(new CmdletParam("LBSetName", endPointConfig.LBSetName)); + + switch (paramset) + { + case AzureEndPointConfigInfo.ParameterSet.CustomProbe : + switch (endPointConfig.ProbeProtocol.ToString()) + { + case "tcp": + this.cmdletParams.Add(new CmdletParam("ProbeProtocolTCP")); + break; + case "http": + this.cmdletParams.Add(new CmdletParam("ProbeProtocolHTTP")); + this.cmdletParams.Add(new CmdletParam("ProbePath", endPointConfig.ProbePath)); + break; + default: + break; + } + break; + + case AzureEndPointConfigInfo.ParameterSet.DefaultProbe : + case AzureEndPointConfigInfo.ParameterSet.LoadBalancedNoProbe : + default : + break; + } + + if (endPointConfig.Acl != null) + { + this.cmdletParams.Add(new CmdletParam("ACL", endPointConfig.Acl)); + } + if (endPointConfig.DirectServerReturn) + { + this.cmdletParams.Add(new CmdletParam("DirectServerReturn", endPointConfig.DirectServerReturn)); + } + } + } + +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureNetworkInterfaceConfigCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureNetworkInterfaceConfigCmdletInfo.cs new file mode 100644 index 000000000000..2a53670827a8 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureNetworkInterfaceConfigCmdletInfo.cs @@ -0,0 +1,36 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.ILB +{ + public class SetAzureNetworkInterfaceConfigCmdletInfo: CmdletsInfo + { + + public SetAzureNetworkInterfaceConfigCmdletInfo(string name, string subnetName, string staticVnetIpAddress, IPersistentVM vm) + { + this.cmdletName = Utilities.SetAzureNetworkInterfaceConfig; + this.parameters.Add(new CmdletParam("Name", name)); + this.parameters.Add(new CmdletParam("SubnetName", subnetName)); + if (!string.IsNullOrEmpty(staticVnetIpAddress)) + { + this.parameters.Add(new CmdletParam("StaticVnetIpAddress", staticVnetIpAddress)); + } + this.parameters.Add(new CmdletParam("VM", vm)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureOSDisk.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureOSDisk.cs new file mode 100644 index 000000000000..26ebcf46f029 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureOSDisk.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class SetAzureOSDiskCmdletInfo : CmdletsInfo + { + public SetAzureOSDiskCmdletInfo(HostCaching hs, PersistentVM vm) + { + cmdletName = Utilities.SetAzureOSDiskCmdletName; + this.cmdletParams.Add(new CmdletParam("HostCaching", hs.ToString())); + this.cmdletParams.Add(new CmdletParam("VM", vm)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureRole.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureRole.cs new file mode 100644 index 000000000000..099cd2311bf4 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureRole.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class SetAzureRoleCmdletInfo : CmdletsInfo + { + public SetAzureRoleCmdletInfo(string serviceName, string slot, string roleName, int count) + { + cmdletName = Utilities.SetAzureRoleCmdletName; + this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + this.cmdletParams.Add(new CmdletParam("Slot", slot)); + this.cmdletParams.Add(new CmdletParam("RoleName", roleName)); + this.cmdletParams.Add(new CmdletParam("Count", count)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureServiceCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureServiceCmdletInfo.cs new file mode 100644 index 000000000000..ee4018d9de17 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureServiceCmdletInfo.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class SetAzureServiceCmdletInfo : CmdletsInfo + { + public SetAzureServiceCmdletInfo(string serviceName, string label, string description) + { + this.cmdletName = Utilities.SetAzureServiceCmdletName; + this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + if (label != null) + { + this.cmdletParams.Add(new CmdletParam("Label", label)); + } + if (description != null) + { + this.cmdletParams.Add(new CmdletParam("Description", description)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureStaticVNetIPCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureStaticVNetIPCmdletInfo.cs new file mode 100644 index 000000000000..4c341bdb8fe9 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureStaticVNetIPCmdletInfo.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class SetAzureStaticVNetIPCmdletInfo : CmdletsInfo + { + public SetAzureStaticVNetIPCmdletInfo(string iPAddress, IPersistentVM vM) + { + cmdletName = Utilities.SetAzureStaticVNetIPCmdletName; + cmdletParams.Add(new CmdletParam("IPAddress", iPAddress)); + cmdletParams.Add(new CmdletParam("VM", vM)); + } + + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureStorageAccountCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureStorageAccountCmdletInfo.cs new file mode 100644 index 000000000000..aedc1a3f28b8 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureStorageAccountCmdletInfo.cs @@ -0,0 +1,60 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class SetAzureStorageAccountCmdletInfo : CmdletsInfo + { + public SetAzureStorageAccountCmdletInfo(string accountName, string label, string description, bool? geoReplication) + { + cmdletName = Utilities.SetAzureStorageAccountCmdletName; + + this.cmdletParams.Add(new CmdletParam("StorageAccountName", accountName)); + if (label != null) + { + this.cmdletParams.Add(new CmdletParam("Label", label)); + } + if (description != null) + { + this.cmdletParams.Add(new CmdletParam("Description", description)); + } + if (geoReplication != null) + { + this.cmdletParams.Add(new CmdletParam("GeoReplicationEnabled", geoReplication.Value)); + } + } + + public SetAzureStorageAccountCmdletInfo(string accountName, string label, string description, string accountType) + { + cmdletName = Utilities.SetAzureStorageAccountCmdletName; + + this.cmdletParams.Add(new CmdletParam("StorageAccountName", accountName)); + if (label != null) + { + this.cmdletParams.Add(new CmdletParam("Label", label)); + } + if (description != null) + { + this.cmdletParams.Add(new CmdletParam("Description", description)); + } + + if (!string.IsNullOrEmpty(accountType)) + { + this.cmdletParams.Add(new CmdletParam("Type", accountType)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureSubnet.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureSubnet.cs new file mode 100644 index 000000000000..cc2ff9b0cf61 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureSubnet.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class SetAzureSubnetCmdletInfo : CmdletsInfo + { + public SetAzureSubnetCmdletInfo(PersistentVM vm, string[] subnetNames) + { + this.cmdletName = Utilities.SetAzureSubnetCmdletName; + + this.cmdletParams.Add(new CmdletParam("VM", vm)); + this.cmdletParams.Add(new CmdletParam("SubnetNames", subnetNames)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureVMSizeCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureVMSizeCmdletInfo.cs new file mode 100644 index 000000000000..dd5d7c107978 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureVMSizeCmdletInfo.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class SetAzureVMSizeCmdletInfo : CmdletsInfo + { + public SetAzureVMSizeCmdletInfo(SetAzureVMSizeConfig sizeCfg) + { + this.cmdletName = Utilities.SetAzureVMSizeCmdletName; + + this.cmdletParams.Add(new CmdletParam("InstanceSize", sizeCfg.instanceSize)); + this.cmdletParams.Add(new CmdletParam("VM", sizeCfg.Vm)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureVNetConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureVNetConfig.cs new file mode 100644 index 000000000000..3fce3fea9113 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureVNetConfig.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class SetAzureVNetConfigCmdletInfo : CmdletsInfo + { + public SetAzureVNetConfigCmdletInfo(string filePath) + { + cmdletName = Utilities.SetAzureVNetConfigCmdletName; + this.cmdletParams.Add(new CmdletParam("ConfigurationPath", filePath)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureVNetGateway.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureVNetGateway.cs new file mode 100644 index 000000000000..c11e3d82fc8b --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureVNetGateway.cs @@ -0,0 +1,41 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class SetAzureVNetGatewayCmdletInfo : CmdletsInfo + { + public SetAzureVNetGatewayCmdletInfo(string option, string vnetName, string localNetwork) + { + cmdletName = Utilities.SetAzureVNetGatewayCmdletName; + switch (option) + { + case "test": + this.cmdletParams.Add(new CmdletParam("Test")); + break; + case "connect": + this.cmdletParams.Add(new CmdletParam("Connect")); + break; + case "disconnect": + this.cmdletParams.Add(new CmdletParam("Disconnect")); + break; + } + + this.cmdletParams.Add(new CmdletParam("VNetName", vnetName)); + this.cmdletParams.Add(new CmdletParam("LocalNetworkSiteName", localNetwork)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureWalkUpgradeDomainCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureWalkUpgradeDomainCmdletInfo.cs new file mode 100644 index 000000000000..1f007c6bf79d --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/SetAzureWalkUpgradeDomainCmdletInfo.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class SetAzureWalkUpgradeDomainCmdletInfo : CmdletsInfo + { + public SetAzureWalkUpgradeDomainCmdletInfo(string serviceName, string slot, int domainNumber) + { + cmdletName = Utilities.SetAzureWalkUpgradeDomainCmdletName; + + cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + cmdletParams.Add(new CmdletParam("Slot", slot)); + cmdletParams.Add(new CmdletParam("DomainNumber", domainNumber)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/StartAzureVMCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/StartAzureVMCmdletInfo.cs new file mode 100644 index 000000000000..88262b0d8b36 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/StartAzureVMCmdletInfo.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class StartAzureVMCmdletInfo : CmdletsInfo + { + public StartAzureVMCmdletInfo(string vmName, string serviceName) + { + this.cmdletName = Utilities.StartAzureVMCmdletName; + this.cmdletParams.Add(new CmdletParam("Name", vmName)); + this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/StopAzureVMCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/StopAzureVMCmdletInfo.cs new file mode 100644 index 000000000000..5ef4b5fae954 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/StopAzureVMCmdletInfo.cs @@ -0,0 +1,49 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class StopAzureVMCmdletInfo : CmdletsInfo + { + private StopAzureVMCmdletInfo(string serviceName, bool stay, bool force) + { + this.cmdletName = Utilities.StopAzureVMCmdletName; + + this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + if (stay) + { + this.cmdletParams.Add(new CmdletParam("StayProvisioned")); + } + if (force) + { + this.cmdletParams.Add(new CmdletParam("Force")); + } + } + + public StopAzureVMCmdletInfo(string vmName, string serviceName, bool stay, bool force) + : this(serviceName, stay, force) + { + this.cmdletParams.Add(new CmdletParam("Name", vmName)); + } + + public StopAzureVMCmdletInfo(PersistentVM vm, string serviceName, bool stay, bool force) + : this(serviceName, stay, force) + { + this.cmdletParams.Add(new CmdletParam("VM", vm)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/TestAzureNameCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/TestAzureNameCmdletInfo.cs new file mode 100644 index 000000000000..11a165b031d5 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/TestAzureNameCmdletInfo.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class TestAzureNameCmdletInfo : CmdletsInfo + { + public TestAzureNameCmdletInfo(string setName, string name) + { + this.cmdletName = Utilities.TestAzureNameCmdletName; + this.cmdletParams.Add(new CmdletParam(setName, true)); + this.cmdletParams.Add(new CmdletParam("name", name)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/TestAzureStaticVNetIPCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/TestAzureStaticVNetIPCmdletInfo.cs new file mode 100644 index 000000000000..02c1714cca74 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/TestAzureStaticVNetIPCmdletInfo.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class TestAzureStaticVNetIPCmdletInfo: CmdletsInfo + { + public TestAzureStaticVNetIPCmdletInfo(string vNetName, string iPAddress) + { + cmdletName = Utilities.TestAzureStaticVNetIPCmdletName; + cmdletParams.Add(new CmdletParam("VNetName", vNetName)); + cmdletParams.Add(new CmdletParam("IPAddress", iPAddress)); + } + + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/UpdateAzureDiskCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/UpdateAzureDiskCmdletInfo.cs new file mode 100644 index 000000000000..9a508e308f11 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/UpdateAzureDiskCmdletInfo.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class UpdateAzureDiskCmdletInfo : CmdletsInfo + { + public UpdateAzureDiskCmdletInfo(string diskName, string label) + { + cmdletName = Utilities.UpdateAzureDiskCmdletName; + + this.cmdletParams.Add(new CmdletParam("DiskName", diskName)); + this.cmdletParams.Add(new CmdletParam("Label", label)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/UpdateAzureVMCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/UpdateAzureVMCmdletInfo.cs new file mode 100644 index 000000000000..c630b2caf466 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/UpdateAzureVMCmdletInfo.cs @@ -0,0 +1,31 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class UpdateAzureVMCmdletInfo : CmdletsInfo + { + public UpdateAzureVMCmdletInfo(string vmName, string serviceName, PersistentVM persistentVM) + { + cmdletName = Utilities.UpdateAzureVMCmdletName; + + this.cmdletParams.Add(new CmdletParam("Name", vmName)); + this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + this.cmdletParams.Add(new CmdletParam("VM", persistentVM)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/UpdateAzureVMImageCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/UpdateAzureVMImageCmdletInfo.cs new file mode 100644 index 000000000000..9ead2750dcba --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/UpdateAzureVMImageCmdletInfo.cs @@ -0,0 +1,94 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class UpdateAzureVMImageCmdletInfo : CmdletsInfo + { + public UpdateAzureVMImageCmdletInfo(string imageName, string label, string recommendedSize, VirtualMachineImageDiskConfigSet diskConfig, bool? dontShowInGui) + { + cmdletName = Utilities.UpdateAzureVMImageCmdletName; + + cmdletParams.Add(new CmdletParam("ImageName", imageName)); + + cmdletParams.Add(new CmdletParam("Label", label)); + + if (!string.IsNullOrEmpty(recommendedSize)) + { + cmdletParams.Add(new CmdletParam("RecommendedVMSize", recommendedSize)); + } + if (diskConfig != null) + { + cmdletParams.Add(new CmdletParam("DiskConfig", diskConfig)); + } + if (dontShowInGui.HasValue && dontShowInGui.Value) + { + cmdletParams.Add(new CmdletParam("DontShowInGui")); + } + } + + public UpdateAzureVMImageCmdletInfo( + string imageName, + string label, + string recommendedSize, + string description, + string eula, + string imageFamily, + Uri privacyUri, + DateTime publishedDate, + string language, + Uri iconUri, + Uri smallIconUri, + bool showInGui) + : this(imageName, label, recommendedSize, null, !showInGui) + { + if (!string.IsNullOrEmpty(description)) + { + cmdletParams.Add(new CmdletParam("Description", description)); + } + if (!string.IsNullOrEmpty(eula)) + { + cmdletParams.Add(new CmdletParam("Eula", eula)); + } + if (!string.IsNullOrEmpty(imageFamily)) + { + cmdletParams.Add(new CmdletParam("ImageFamily", imageFamily)); + } + if (privacyUri != null) + { + cmdletParams.Add(new CmdletParam("PrivacyUri", privacyUri.ToString())); + } + if (publishedDate != null) + { + cmdletParams.Add(new CmdletParam("PublishedDate", publishedDate.ToString())); + } + if (!string.IsNullOrEmpty(language)) + { + cmdletParams.Add(new CmdletParam("Language", language)); + } + if (iconUri != null) + { + cmdletParams.Add(new CmdletParam("IconUri", iconUri)); + } + if (smallIconUri != null) + { + cmdletParams.Add(new CmdletParam("SmallIconUri", smallIconUri)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/WinRMCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/WinRMCmdletInfo.cs new file mode 100644 index 000000000000..1d12f8ef1e23 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/WinRMCmdletInfo.cs @@ -0,0 +1,32 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + class WinRMCmdletInfo : CmdletsInfo + { + + public WinRMCmdletInfo(string servicename, string name) + { + cmdletName = Utilities.GetAzureWinRMUriCmdletName; + + cmdletParams.Add(new CmdletParam("ServiceName", servicename)); + + cmdletParams.Add(new CmdletParam("Name", name)); + + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/WindowsAzurePowershellCmdlet.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/WindowsAzurePowershellCmdlet.cs new file mode 100644 index 000000000000..86352f2fc5d5 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/WindowsAzurePowershellCmdlet.cs @@ -0,0 +1,47 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class WindowsAzurePowershellCmdlet : PowershellCmdlet + { + private static readonly string[] modules = new[] + { + Path.Combine(Utilities.windowsAzurePowershellPath, Utilities.windowsAzurePowershellServiceModule) + }; + + public WindowsAzurePowershellCmdlet(CmdletsInfo cmdlet) : base(cmdlet, ConstructModules()) + { + } + + public static string[] Modules + { + get + { + return modules; + } + } + + private static PowershellModule[] ConstructModules() + { + return new[] + { + new PowershellModule(Utilities.windowsAzurePowershellServiceModule, Utilities.windowsAzurePowershellPath) + }; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/WindowsAzurePowershellCmdletSequence.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/WindowsAzurePowershellCmdletSequence.cs new file mode 100644 index 000000000000..d157fe37cbd2 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/WindowsAzurePowershellCmdletSequence.cs @@ -0,0 +1,52 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.IO; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + internal class WindowsAzurePowershellCmdletSequence : PowershellCmdletSequence + { + private static readonly string[] modules = new[] + { + Path.Combine(Utilities.windowsAzurePowershellPath, Utilities.windowsAzurePowershellServiceModule) + }; + + public WindowsAzurePowershellCmdletSequence(List cmdlets) : base(cmdlets, ConstructModules()) + { + } + + public WindowsAzurePowershellCmdletSequence() : base(ConstructModules()) + { + } + + public static string[] Modules + { + get + { + return modules; + } + } + + private static PowershellModule[] ConstructModules() + { + return new[] + { + new PowershellModule(Utilities.windowsAzurePowershellServiceModule, Utilities.windowsAzurePowershellPath) + }; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/WindowsAzurePowershellScript.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/WindowsAzurePowershellScript.cs new file mode 100644 index 000000000000..0239623c9146 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/IaasCmdletInfo/WindowsAzurePowershellScript.cs @@ -0,0 +1,51 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.IO; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo +{ + public class WindowsAzurePowershellScript : PowershellCmdletScript + { + private static readonly string[] modules = new[] + { + Path.Combine(Utilities.windowsAzurePowershellPath, Utilities.windowsAzurePowershellServiceModule) + }; + + public WindowsAzurePowershellScript(List cmdlets) : base(cmdlets, ConstructModules()) + { + } + public WindowsAzurePowershellScript() : base(ConstructModules()) + { + } + + public static string[] Modules + { + get + { + return modules; + } + } + + private static PowershellModule[] ConstructModules() + { + return new[] + { + new PowershellModule(Utilities.windowsAzurePowershellServiceModule, Utilities.windowsAzurePowershellPath) + }; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/InternaloadbalancerTests.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/InternaloadbalancerTests.cs new file mode 100644 index 000000000000..39a024f05318 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/InternaloadbalancerTests.cs @@ -0,0 +1,423 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Linq; +using System.Net; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests +{ + [TestClass] + public class InternalLoadBalancerTests : ServiceManagementTest + { + private static string vnetName; + private static string subNet; + private const ProtocolInfo TCP_PROTOCAL = ProtocolInfo.tcp; + private const ProtocolInfo UDP_PROTOCAL = ProtocolInfo.udp; + private const int LOCAL_PORT_NUMBER1 = 60010; + private const int PUBLIC_PORT_NUMBER1 = 60011; + private const int LOCAL_PORT_NUMBER2 = 60012; + private const int PUBLIC_PORT_NUMBER2 = 60013; + private const int LOCAL_PORT_NUMBER3 = 60014; + private const int PUBLIC_PORT_NUMBER3 = 60015; + private string ipAddress; + private string serviceName; + + [ClassInitialize] + public static void ClassInitialize(TestContext context) + { + var vnetConfig = vmPowershellCmdlets.GetAzureVNetConfig(null); + if (vnetConfig.Count > 0) + { + vmPowershellCmdlets.RunPSScript("Get-AzureService | Remove-AzureService -Force"); + Utilities.RetryActionUntilSuccess(() => vmPowershellCmdlets.RemoveAzureVNetConfig(), "in use", 5, 30); + } + vmPowershellCmdlets.SetAzureVNetConfig(Directory.GetCurrentDirectory() + "\\VnetconfigWithLocation.netcfg"); + var sites = vmPowershellCmdlets.GetAzureVNetSite(null); + subNet = sites[0].Subnets.First().Name; + vnetName = sites[0].Name; + } + + [ClassCleanup] + public static void ClassCleanup() + { + Utilities.ExecuteAndLog(() => vmPowershellCmdlets.RemoveAzureVNetConfig(), "Remove Azure Vnet config after tests"); + } + + [TestInitialize] + public void Intialize() + { + pass = false; + cleanupIfPassed = true; + serviceName = Utilities.GetUniqueShortName(serviceNamePrefix); + testStartTime = DateTime.Now; + } + + [TestCleanup] + public void Cleanup() + { + if (cleanupIfPassed) + Utilities.ExecuteAndLog(() => CleanupService(serviceName), "Cleanup service"); + } + + [TestMethod(), Priority(0), TestProperty("Feature", "IaaS"), TestCategory(Category.Sequential), Owner("hylee"), Description("Test the New-AzureInternalLoadBalancerConfig,Add,Get,Remove-AzureInternalLoadBalancer cmdlets")] + public void CreateDeploymentWithILBAndRemoveILB() + { + try + { + string ilbName = Utilities.GetUniqueShortName("ILB"); + string vmName = Utilities.GetUniqueShortName(vmNamePrefix); + var ilbConfig = vmPowershellCmdlets.NewAzureInternalLoadBalancerConfig(ilbName); + + Utilities.ExecuteAndLog(() => + { + var vm = Utilities.CreateIaaSVMObject(vmName, InstanceSize.Small, imageName, true, username, password, false); + vmPowershellCmdlets.NewAzureVMWithInternalLoadBalancer(serviceName, new[] { vm }, ilbConfig, location: locationName); + }, string.Format("Create a Vm with Internal load balancer {0}", ilbName)); + + VerifyInternalLoadBalancer("Verify Internal Load Balancer", ilbConfig); + VerifyDeployment("Verify internal load balancer name of the deployment", ilbName); + Utilities.ExecuteAndLog(() => vmPowershellCmdlets.RemoveAzureInternalLoadBalancer(serviceName), "Remove Azure Internal Load Balancer"); + VerifyDeployment("Get azure deployment and verify that the deployment doesnt have ILB"); + pass = true; + } + catch (Exception ex) + { + pass = false; + Console.WriteLine(ex.InnerException.ToString()); + throw ex; + } + } + + [TestMethod(), Priority(0), TestProperty("Feature", "IaaS"), TestCategory(Category.Sequential), Owner("hylee"), Description("Test the New-AzureInternalLoadBalancerConfig,Add,Get,Remove-AzureInternalLoadBalancer cmdlets")] + public void CreateDeploymentWithILBSubnetAndAddILBEndpoint() + { + try + { + string ilbName = Utilities.GetUniqueShortName("ILB"); + string vmName = Utilities.GetUniqueShortName(vmNamePrefix); + string endpointName = Utilities.GetUniqueShortName("endpoint"); + + var ilbConfig = vmPowershellCmdlets.NewAzureInternalLoadBalancerConfig(ilbName, subNet); + + Utilities.ExecuteAndLog(() => + { + var vm = Utilities.CreateIaaSVMObject(vmName, InstanceSize.Small, imageName, true, username, password, false); + vm = vmPowershellCmdlets.SetAzureSubnet(vm, new string[] { subNet }); + vmPowershellCmdlets.NewAzureVMWithInternalLoadBalancer(serviceName, new[] { vm }, ilbConfig, vnetName, locationName); + }, string.Format("Create a Vm with Internal load balancer {0}", ilbName)); + + ilbConfig.SubnetName = subNet; + + VerifyInternalLoadBalancer("Verify Internal Load Balancer", ilbConfig); + + var endpointConfig = new AzureEndPointConfigInfo(AzureEndPointConfigInfo.ParameterSet.NoLB, TCP_PROTOCAL, LOCAL_PORT_NUMBER1, PUBLIC_PORT_NUMBER1, endpointName, internalLoadBalancer: ilbName); + Utilities.ExecuteAndLog(() => + { + var vmRoleContext = vmPowershellCmdlets.GetAzureVM(vmName, serviceName); + endpointConfig.Vm = vmRoleContext.VM; + var vm = vmPowershellCmdlets.AddAzureEndPoint(endpointConfig); + vmPowershellCmdlets.UpdateAzureVM(vmName, serviceName, vm); + }, "Add Azure endpoint to the vm"); + + VerifyEndpoint("Verify Azure endpoint", vmName, endpointConfig); + VerifyDeployment("Verify internal load balancer name and vnet name of the deployment", ilbName, vnetName); + ilbConfig.IPAddress = ipAddress; + VerifyInternalLoadBalancer("Verify ILB name, subnet, ip address of the ILB", ilbConfig); + pass = true; + + } + catch (Exception ex) + { + pass = false; + Console.WriteLine(ex.InnerException.ToString()); + throw ex; + } + } + + [TestMethod(), Priority(0), TestProperty("Feature", "IaaS"), TestCategory(Category.Sequential), Owner("hylee"), Description("Test the New-AzureInternalLoadBalancerConfig,Add,Get,Remove-AzureInternalLoadBalancer cmdlets")] + public void CreateDeploymentWithILBIPaddressAndSetILBEndpoint() + { + try + { + string ilbName = Utilities.GetUniqueShortName("ILB"); + string vmName = Utilities.GetUniqueShortName(vmNamePrefix); + string endpointName = Utilities.GetUniqueShortName("endpoint"); + IPAddress ipAddress = IPAddress.Parse(GetAvailableIpAddressinVnet()); + string lbsetName = Utilities.GetUniqueShortName("LbSet"); + + var ilbConfig = vmPowershellCmdlets.NewAzureInternalLoadBalancerConfig(ilbName, subNet, ipAddress); + + Utilities.ExecuteAndLog(() => + { + var vm = Utilities.CreateIaaSVMObject(vmName, InstanceSize.Small, imageName, true, username, password, false); + var endpointConfiginput = new AzureEndPointConfigInfo(AzureEndPointConfigInfo.ParameterSet.LoadBalancedNoProbe, TCP_PROTOCAL, LOCAL_PORT_NUMBER1, PUBLIC_PORT_NUMBER1, endpointName, lbsetName, null, false, ilbName); + endpointConfiginput.Vm = vm; + vm = vmPowershellCmdlets.AddAzureEndPoint(endpointConfiginput); + vmPowershellCmdlets.NewAzureVMWithInternalLoadBalancer(serviceName, new[] { vm }, ilbConfig, vnetName, locationName); + }, string.Format("Create a Vm with Internal load balancer {0}", ilbName)); + + ilbConfig.SubnetName = subNet; + ilbConfig.IPAddress = ipAddress.ToString(); + VerifyInternalLoadBalancer("Verify Internal Load Balancer", ilbConfig); + + + var loadBalancerEndpointConfig = new AzureEndPointConfigInfo(AzureEndPointConfigInfo.ParameterSet.LoadBalancedNoProbe, UDP_PROTOCAL, LOCAL_PORT_NUMBER2, PUBLIC_PORT_NUMBER2, endpointName, lbsetName, internalLoadBalancer: ilbName, serviceName: serviceName); + vmPowershellCmdlets.SetAzureLoadBalancedEndPoint(loadBalancerEndpointConfig, AzureEndPointConfigInfo.ParameterSet.LoadBalancedNoProbe); + VerifyInternalLoadBalancer("Verify Internal Load Balancer", ilbConfig); + + VerifyEndpoint("Verify Azure endpoint", vmName, loadBalancerEndpointConfig); + VerifyDeployment("Verify internal load balancer name and vnet name of the deployment", ilbName, vnetName); + ilbConfig.IPAddress = ipAddress.ToString(); + VerifyInternalLoadBalancer("Verify ILB name, subnet, ip address of the ILB", ilbConfig); + pass = true; + + } + catch (Exception ex) + { + pass = false; + Console.WriteLine(ex.InnerException.ToString()); + throw ex; + } + } + + [TestMethod(), Priority(0), TestProperty("Feature", "IaaS"), TestCategory(Category.Sequential), Owner("hylee"), Description("Test the New-AzureInternalLoadBalancerConfig,Add,Get,Remove-AzureInternalLoadBalancer cmdlets")] + public void ILBonExistingDeploymentAndDelete() + { + try + { + string ilbName = Utilities.GetUniqueShortName("ILB"); + string vmName = Utilities.GetUniqueShortName(vmNamePrefix); + string endpointName = Utilities.GetUniqueShortName("endpoint"); + IPAddress ipAddress = IPAddress.Parse(GetAvailableIpAddressinVnet()); + string lbsetName = Utilities.GetUniqueShortName("LbSet"); + + var ilbConfig = vmPowershellCmdlets.NewAzureInternalLoadBalancerConfig(ilbName, subNet, ipAddress); + + Utilities.ExecuteAndLog(() => + { + vmPowershellCmdlets.NewAzureQuickVM(OS.Windows, vmName, serviceName, imageName, username, password, locationName, InstanceSize.Small.ToString(), null, null, vnetName); + }, "Create a Vm using New-AzureQuickVM"); + + vmPowershellCmdlets.AddAzureInternalLoadBalancer(ilbName, serviceName, subNet, ipAddress); + ilbConfig.SubnetName = subNet; + ilbConfig.IPAddress = ipAddress.ToString(); + VerifyInternalLoadBalancer("Verify Internal Load Balancer", ilbConfig); + Utilities.ExecuteAndLog(() => vmPowershellCmdlets.RemoveAzureInternalLoadBalancer(serviceName), "Remove Azure Internal Load Balancer"); + pass = true; + + } + catch (Exception ex) + { + pass = false; + Console.WriteLine(ex.InnerException.ToString()); + throw ex; + } + } + + [TestMethod(), Priority(0), TestProperty("Feature", "IaaS"), TestCategory(Category.Sequential), Owner("hylee"), Description("Test the New-AzureInternalLoadBalancerConfig,Add,Get,Remove-AzureInternalLoadBalancer cmdlets")] + public void ILBonExistingDeploymentWithVnet() + { + try + { + string ilbName = Utilities.GetUniqueShortName("ILB"); + string vmName = Utilities.GetUniqueShortName(vmNamePrefix); + string endpointName = Utilities.GetUniqueShortName("endpoint"); + IPAddress ipAddress = IPAddress.Parse(GetAvailableIpAddressinVnet()); + string lbsetName = Utilities.GetUniqueShortName("LbSet"); + + var ilbConfig = vmPowershellCmdlets.NewAzureInternalLoadBalancerConfig(ilbName, subNet, ipAddress); + + Utilities.ExecuteAndLog(() => + { + vmPowershellCmdlets.NewAzureQuickVM(OS.Windows, vmName, serviceName, imageName, username, password, locationName, InstanceSize.Small.ToString(), null, null, vnetName); + }, "Create a Vm using New-AzureQuickVM"); + + vmPowershellCmdlets.AddAzureInternalLoadBalancer(ilbName, serviceName, subNet, ipAddress); + ilbConfig.SubnetName = subNet; + ilbConfig.IPAddress = ipAddress.ToString(); + VerifyInternalLoadBalancer("Verify Internal Load Balancer", ilbConfig); + + var endpointConfig = new AzureEndPointConfigInfo(AzureEndPointConfigInfo.ParameterSet.NoLB, TCP_PROTOCAL, LOCAL_PORT_NUMBER1, PUBLIC_PORT_NUMBER1, endpointName, internalLoadBalancer: ilbName); + Utilities.ExecuteAndLog(() => + { + var vmRoleContext = vmPowershellCmdlets.GetAzureVM(vmName, serviceName); + endpointConfig.Vm = vmRoleContext.VM; + var vm = vmPowershellCmdlets.AddAzureEndPoint(endpointConfig); + vmPowershellCmdlets.UpdateAzureVM(vmName, serviceName, vm); + }, "Add Azure endpoint to the vm"); + + VerifyEndpoint("Verify Azure endpoint", vmName, endpointConfig); + pass = true; + + } + catch (Exception ex) + { + pass = false; + Console.WriteLine(ex.InnerException.ToString()); + throw ex; + } + } + + [TestMethod(), Priority(0), TestProperty("Feature", "IaaS"), TestCategory(Category.Sequential), Owner("hylee"), Description("Test the Get/Set-AzurePublicIP cmdlets")] + public void PublicIpPerVMTest() + { + try + { + string vmName = Utilities.GetUniqueShortName(vmNamePrefix); + string vmName2 = Utilities.GetUniqueShortName(vmNamePrefix); + + string endpointName = Utilities.GetUniqueShortName("endpoint"); + string endpointName2 = Utilities.GetUniqueShortName("endpoint"); + + string disklabel1 = Utilities.GetUniqueShortName("disk"); + string disklabel2 = Utilities.GetUniqueShortName("disk"); + + string publicIpName = Utilities.GetUniqueShortName("publicIp"); + string publicIpName2 = Utilities.GetUniqueShortName("publicIp"); + + vmPowershellCmdlets.NewAzureService(serviceName, locationName); + var vm1 = CreateVMWithEndpointDataDiskAndPublicIP(vmName, endpointName, disklabel1, publicIpName, serviceName, LOCAL_PORT_NUMBER1, PUBLIC_PORT_NUMBER1); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm1 }); + + VerifyPublicIP(publicIpName, vm1); + + var vm2 = CreateVMWithEndpointDataDiskAndPublicIP(vmName2, endpointName2, disklabel2, publicIpName2, serviceName, LOCAL_PORT_NUMBER2, PUBLIC_PORT_NUMBER2); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm2 }); + VerifyPublicIP(publicIpName2, vm2); + pass = true; + } + catch (Exception ex) + { + pass = false; + Console.WriteLine(ex); + if (ex.InnerException != null) + { + Console.WriteLine(ex.InnerException); + } + throw ex; + } + } + + private static PersistentVM CreateVMWithEndpointDataDiskAndPublicIP(string vmName, string endpointName, string disklabel1, string publicIpName, string serviceName, int localPort, int publicport) + { + var vm1 = Utilities.CreateIaaSVMObject(vmName, InstanceSize.Small, imageName, true, username, password); + var endpointConfiginput = new AzureEndPointConfigInfo(AzureEndPointConfigInfo.ParameterSet.NoLB, TCP_PROTOCAL, localPort, publicport, endpointName, serviceName: serviceName); + endpointConfiginput.Vm = vm1; + vm1 = vmPowershellCmdlets.AddAzureEndPoint(endpointConfiginput); + var dataDiskConfig1 = new AddAzureDataDiskConfig(DiskCreateOption.CreateNew, 128, disklabel1, 0); + dataDiskConfig1.Vm = vm1; + vm1 = vmPowershellCmdlets.AddAzureDataDisk(dataDiskConfig1); + vm1 = (PersistentVM)vmPowershellCmdlets.SetAzurePublicIp(publicIpName, vm1); + return vm1; + } + + private string GetAvailableIpAddressinVnet() + { + string[] ipList = new string[] { "10.0.0.5", "10.0.0.6", "10.0.0.7", "10.0.0.8", "10.0.0.9" }; + var result = vmPowershellCmdlets.TestAzureStaticVNetIP(vnetName, ipList[0]); + if (result.IsAvailable) + return ipList[0]; + else + return result.AvailableAddresses[0]; + + } + + + + private void VerifyEndpoint(string verificationMessage, string vmName, AzureEndPointConfigInfo endpointConfig) + { + Utilities.ExecuteAndLog(() => + { + var vmRole = vmPowershellCmdlets.GetAzureVM(vmName, serviceName); + var endpointCollection = vmPowershellCmdlets.GetAzureEndPoint(vmRole.VM); + + var inputEndpointCollection = from c in endpointCollection where c.Name.Equals(endpointConfig.EndpointName) select c; + var endpointConfigInfo = inputEndpointCollection.First(); + Console.WriteLine("Endpoint Configuraion Properties:"); + Utilities.PrintContext(endpointConfigInfo); + ipAddress = endpointConfigInfo.Vip; + Console.WriteLine("\n Verifing recquired properties"); + Utilities.LogAssert(() => Assert.AreEqual(string.IsNullOrEmpty(endpointConfig.LBSetName) ? null : endpointConfig.LBSetName, endpointConfigInfo.LBSetName), "LBSetName"); + Utilities.LogAssert(() => Assert.AreEqual(endpointConfig.EndpointLocalPort, endpointConfig.EndpointLocalPort), "EndpointLocalPort"); + Utilities.LogAssert(() => Assert.AreEqual(endpointConfig.EndpointName, endpointConfig.EndpointName), "EndpointName"); + Utilities.LogAssert(() => Assert.AreEqual(endpointConfig.EndpointProtocol, endpointConfig.EndpointProtocol), "EndpointProtocol"); + Utilities.LogAssert(() => Assert.AreEqual(endpointConfig.InternalLoadBalancerName, endpointConfig.InternalLoadBalancerName), "InternalLoadBalancerName"); + }, verificationMessage); + } + + /// + /// Verifies that the properties of the result of Get-azureInternalLoadBalancer is same as expected. + /// + /// + private void VerifyInternalLoadBalancer(string verificationMessage, InternalLoadBalancerConfig expectedIlbConfig) + { + Utilities.ExecuteAndLog(() => + { + var ilbConfig = vmPowershellCmdlets.GetAzureInternalLoadBalancer(serviceName); + Console.WriteLine("ILB Context Properties:"); + Utilities.PrintContext(ilbConfig); + Console.WriteLine("\n Verifing recquired properties"); + Utilities.LogAssert(() => Assert.AreEqual(expectedIlbConfig.InternalLoadBalancerName, ilbConfig.InternalLoadBalancerName), "InternalLoadBalancerName"); + Utilities.LogAssert(() => Assert.AreEqual(serviceName, ilbConfig.ServiceName), "ServiceName"); + Utilities.LogAssert(() => Assert.AreEqual(serviceName, ilbConfig.DeploymentName), "DeploymentName"); + Utilities.LogAssert(() => Assert.AreEqual(expectedIlbConfig.IPAddress, ilbConfig.IPAddress), "IPAddress"); + Utilities.LogAssert(() => Assert.AreEqual(expectedIlbConfig.SubnetName, ilbConfig.SubnetName), "SubnetName"); + + }, verificationMessage); + + } + + private static void VerifyPublicIP(string publicIpName, PersistentVM vm1) + { + Utilities.ExecuteAndLog(() => + { + var publicIpContext = vmPowershellCmdlets.GetAzurePublicIpName(publicIpName, vm1); + Console.WriteLine("Public IP Context Properties:"); + Utilities.PrintContext(publicIpContext); + Console.WriteLine("\n Verifing recquired properties"); + Utilities.LogAssert(() => Assert.AreEqual(publicIpName, publicIpContext.Name), "Public IP Name"); + }, "Verify Public ip of the VM"); + } + + private void VerifyDeployment(string verificationMessage, string internalLoadBalancerName = null, string vnet = null) + { + Utilities.ExecuteAndLog(() => + { + var deploymentContext = vmPowershellCmdlets.GetAzureDeployment(serviceName); + Console.WriteLine("Deployment Context Properties:"); + Utilities.PrintContext(deploymentContext); + Console.WriteLine("\n Verifing recquired properties"); + Utilities.LogAssert(() => Assert.AreEqual(internalLoadBalancerName, deploymentContext.InternalLoadBalancerName), "InternalLoadBalancerName"); + Utilities.LogAssert(() => + { + if (internalLoadBalancerName == null) + { + Assert.AreEqual(deploymentContext.LoadBalancers.Count, 0); + } + else + { + Assert.AreEqual(internalLoadBalancerName, deploymentContext.LoadBalancers[0].Name); + } + + }, "LoadBalancers"); + Utilities.LogAssert(() => Assert.AreEqual(vnet, deploymentContext.VNetName), "VNetName"); + }, verificationMessage); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/LBandEndPointACLsTest.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/LBandEndPointACLsTest.cs new file mode 100644 index 000000000000..6454be97a839 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/LBandEndPointACLsTest.cs @@ -0,0 +1,481 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Reflection; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests +{ + [TestClass] + public class LBandEndPointACLsTest : ServiceManagementTest + { + private string serviceName; + + [TestInitialize] + public void Initialize() + { + if (defaultAzureSubscription.Equals(null)) + { + Assert.Inconclusive("No Subscription is selected!"); + } + + serviceName = Utilities.GetUniqueShortName(serviceNamePrefix); + testStartTime = DateTime.Now; + + pass = false; + } + + /// + /// Test NoLB, NoProbe, DefaultProbe, CustomProbe parameter sets of Azure Endpoint cmdlets and Set-AzureLoadBalancedEndpoint cmdlet + /// + [TestMethod(), TestCategory(Category.Functional), TestProperty("Feature", "IAAS"), Priority(1), Owner("priya"), Description("Test the cmdlets ((Add,Get,Set,Remove)-AzureEndpoint), & Set-AzureLoadBalancedEndpoint")] + public void AzureEndpointTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + string ep1Name = "tcp1"; + int ep1LocalPort = 60010; + int ep1PublicPort = 60011; + string ep1LBSetName = "lbset1"; + int ep1ProbePort = 60012; + string ep1ProbePath = string.Empty; + int? ep1ProbeInterval = 7; + int? ep1ProbeTimeout = null; + NetworkAclObject ep1AclObj = null; + bool ep1DirectServerReturn = false; + + string ep2Name = "tcp2"; + int ep2LocalPort = 60020; + int ep2PublicPort = 60021; + int ep2LocalPortChanged = 60030; + int ep2PublicPortChanged = 60031; + string ep2LBSetName = "lbset2"; + int ep2ProbePort = 60022; + string ep2ProbePath = @"/"; + int? ep2ProbeInterval = null; + int? ep2ProbeTimeout = 32; + NetworkAclObject ep2AclObj = null; + bool ep2DirectServerReturn = false; + + + AzureEndPointConfigInfo ep1Info = new AzureEndPointConfigInfo( + AzureEndPointConfigInfo.ParameterSet.CustomProbe, + ProtocolInfo.tcp, + ep1LocalPort, + ep1PublicPort, + ep1Name, + ep1LBSetName, + ep1ProbePort, + ProtocolInfo.tcp, + ep1ProbePath, + ep1ProbeInterval, + ep1ProbeTimeout, + ep1AclObj, + ep1DirectServerReturn); + + AzureEndPointConfigInfo ep2Info = new AzureEndPointConfigInfo( + AzureEndPointConfigInfo.ParameterSet.CustomProbe, + ProtocolInfo.tcp, + ep2LocalPort, + ep2PublicPort, + ep2Name, + ep2LBSetName, + ep2ProbePort, + ProtocolInfo.http, + ep2ProbePath, + ep2ProbeInterval, + ep2ProbeTimeout, + ep2AclObj, + ep2DirectServerReturn); + + string defaultVm = Utilities.GetUniqueShortName(vmNamePrefix); + Assert.IsNull(vmPowershellCmdlets.GetAzureVM(defaultVm, serviceName)); + + vmPowershellCmdlets.NewAzureQuickVM(OS.Windows, defaultVm, serviceName, imageName, username, password, locationName); + Console.WriteLine("Service Name: {0} is created.", serviceName); + + try + { + foreach (AzureEndPointConfigInfo.ParameterSet p in Enum.GetValues(typeof(AzureEndPointConfigInfo.ParameterSet))) + { + string pSetName = Enum.GetName(typeof(AzureEndPointConfigInfo.ParameterSet), p); + Console.WriteLine("--Begin Endpoint Test with '{0}' parameter set.", pSetName); + + ep1Info.ParamSet = p; + ep2Info.ParamSet = p; + ep1Info.Acl = vmPowershellCmdlets.NewAzureAclConfig(); + ep2Info.Acl = vmPowershellCmdlets.NewAzureAclConfig(); + ep2Info.EndpointLocalPort = ep2LocalPort; + ep2Info.EndpointPublicPort = ep2PublicPort; + + // Add two new endpoints + Console.WriteLine("-----Add 2 new endpoints."); + vmPowershellCmdlets.AddEndPoint(defaultVm, serviceName, new[] { ep1Info, ep2Info }); // Add-AzureEndpoint with Get-AzureVM and Update-AzureVm + CheckEndpoint(defaultVm, serviceName, new[] { ep1Info, ep2Info }); + + // Change the endpoint + if (p == AzureEndPointConfigInfo.ParameterSet.NoLB) + { + Console.WriteLine("-----Change the second endpoint."); + ep2Info.EndpointLocalPort = ep2LocalPortChanged; + ep2Info.EndpointPublicPort = ep2PublicPortChanged; + vmPowershellCmdlets.SetEndPoint(defaultVm, serviceName, ep2Info); // Set-AzureEndpoint with Get-AzureVM and Update-AzureVm + CheckEndpoint(defaultVm, serviceName, new[] { ep2Info }); + } + else + { + Console.WriteLine("-----Change the second endpoint."); + ep2Info.ServiceName = serviceName; + ep2Info.EndpointLocalPort = ep2LocalPortChanged; + ep2Info.EndpointPublicPort = ep2PublicPortChanged; + vmPowershellCmdlets.SetLBEndPoint(defaultVm, serviceName, ep2Info, p); + + CheckEndpoint(defaultVm, serviceName, new[] { ep2Info }); + } + + // Remove Endpoint + Console.WriteLine("-----Remove endpoints."); + vmPowershellCmdlets.RemoveEndPoint(defaultVm, serviceName, new[] { ep1Name, ep2Name }); // Remove-AzureEndpoint + CheckEndpointRemoved(defaultVm, serviceName, new[] { ep1Info, ep2Info }); + + Console.WriteLine("Endpoint Test passed with '{0}' parameter set.", pSetName); + } + + pass = true; + + } + catch (Exception e) + { + pass = false; + Assert.Fail("Exception occurred: {0}", e.ToString()); + } + } + + /// + /// Test NoLB, NoProbe, DefaultProbe, CustomProbe parameter sets of Azure Endpoint cmdlets and Set-AzureLoadBalancedEndpoint cmdlet + /// + [TestMethod(), TestCategory(Category.Functional), TestProperty("Feature", "IAAS"), Priority(1), Owner("priya"), Description("Test the cmdlets ((Add,Get,Set,Remove)-AzureEndpoint), & Set-AzureLoadBalancedEndpoint")] + public void AzureEndpointLBDTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + string ep1Name = "tcp1"; + int ep1LocalPort = 60010; + int ep1PublicPort = 60011; + string ep1LBSetName = "lbset1"; + int ep1ProbePort = 60012; + string ep1ProbePath = string.Empty; + int? ep1ProbeInterval = 7; + int? ep1ProbeTimeout = null; + NetworkAclObject ep1AclObj = null; + bool ep1DirectServerReturn = false; + + string ep2Name = "tcp2"; + int ep2LocalPort = 60020; + int ep2PublicPort = 60021; + int ep2LocalPortChanged = 60030; + int ep2PublicPortChanged = 60031; + string ep2LBSetName = "lbset2"; + int ep2ProbePort = 60022; + string ep2ProbePath = @"/"; + int? ep2ProbeInterval = null; + int? ep2ProbeTimeout = 32; + NetworkAclObject ep2AclObj = null; + bool ep2DirectServerReturn = false; + + AzureEndPointConfigInfo ep1Info = new AzureEndPointConfigInfo( + AzureEndPointConfigInfo.ParameterSet.CustomProbe, + ProtocolInfo.tcp, + ep1LocalPort, + ep1PublicPort, + ep1Name, + ep1LBSetName, + ep1ProbePort, + ProtocolInfo.tcp, + ep1ProbePath, + ep1ProbeInterval, + ep1ProbeTimeout, + ep1AclObj, + ep1DirectServerReturn, + null, + null, + LoadBalancerDistribution.SourceIP); + + AzureEndPointConfigInfo ep2Info = new AzureEndPointConfigInfo( + AzureEndPointConfigInfo.ParameterSet.CustomProbe, + ProtocolInfo.tcp, + ep2LocalPort, + ep2PublicPort, + ep2Name, + ep2LBSetName, + ep2ProbePort, + ProtocolInfo.http, + ep2ProbePath, + ep2ProbeInterval, + ep2ProbeTimeout, + ep2AclObj, + ep2DirectServerReturn, + null, + null, + LoadBalancerDistribution.SourceIPProtorol); + + string defaultVm = Utilities.GetUniqueShortName(vmNamePrefix); + Assert.IsNull(vmPowershellCmdlets.GetAzureVM(defaultVm, serviceName)); + + vmPowershellCmdlets.NewAzureQuickVM(OS.Windows, defaultVm, serviceName, imageName, username, password, locationName); + Console.WriteLine("Service Name: {0} is created.", serviceName); + + try + { + foreach (AzureEndPointConfigInfo.ParameterSet p in Enum.GetValues(typeof(AzureEndPointConfigInfo.ParameterSet))) + { + string pSetName = Enum.GetName(typeof(AzureEndPointConfigInfo.ParameterSet), p); + Console.WriteLine("--Begin Endpoint Test with '{0}' parameter set.", pSetName); + + ep1Info.ParamSet = p; + ep2Info.ParamSet = p; + //ep3Info.ParamSet = p; + ep1Info.Acl = vmPowershellCmdlets.NewAzureAclConfig(); + ep2Info.Acl = vmPowershellCmdlets.NewAzureAclConfig(); + ep2Info.EndpointLocalPort = ep2LocalPort; + ep2Info.EndpointPublicPort = ep2PublicPort; + + // Add two new endpoints + Console.WriteLine("-----Add 2 new endpoints."); + vmPowershellCmdlets.AddEndPoint(defaultVm, serviceName, new[] { ep1Info, ep2Info }); // Add-AzureEndpoint with Get-AzureVM and Update-AzureVm + CheckEndpoint(defaultVm, serviceName, new[] { ep1Info, ep2Info }); + + // Change the endpoint + if (p == AzureEndPointConfigInfo.ParameterSet.NoLB) + { + Console.WriteLine("-----Change the second endpoint."); + ep2Info.EndpointLocalPort = ep2LocalPortChanged; + ep2Info.EndpointPublicPort = ep2PublicPortChanged; + ep2Info.LoadBalancerDistribution = LoadBalancerDistribution.None; + vmPowershellCmdlets.SetEndPoint(defaultVm, serviceName, ep2Info); // Set-AzureEndpoint with Get-AzureVM and Update-AzureVm + CheckEndpoint(defaultVm, serviceName, new[] { ep2Info }); + } + else + { + Console.WriteLine("-----Change the second endpoint."); + ep2Info.ServiceName = serviceName; + ep2Info.EndpointLocalPort = ep2LocalPortChanged; + ep2Info.EndpointPublicPort = ep2PublicPortChanged; + ep2Info.LoadBalancerDistribution = LoadBalancerDistribution.SourceIP; + vmPowershellCmdlets.SetLBEndPoint(defaultVm, serviceName, ep2Info, p); + + CheckEndpoint(defaultVm, serviceName, new[] { ep2Info }); + } + + // Remove Endpoint + Console.WriteLine("-----Remove endpoints."); + vmPowershellCmdlets.RemoveEndPoint(defaultVm, serviceName, new[] { ep1Name, ep2Name }); // Remove-AzureEndpoint + CheckEndpointRemoved(defaultVm, serviceName, new[] { ep1Info, ep2Info }); + + Console.WriteLine("Endpoint Test passed with '{0}' parameter set.", pSetName); + } + + pass = true; + + } + catch (Exception e) + { + pass = false; + Assert.Fail("Exception occurred: {0}", e.ToString()); + } + } + + private bool CheckEndpoint(string vmName, string serviceName, AzureEndPointConfigInfo[] epInfos) + { + var serverEndpoints = vmPowershellCmdlets.GetAzureEndPoint(vmPowershellCmdlets.GetAzureVM(vmName, serviceName)); + + // List the endpoints found for debugging. + Console.WriteLine("***** Checking for Endpoints **************************************************"); + Console.WriteLine("***** Listing Returned Endpoints"); + foreach (InputEndpointContext ep in serverEndpoints) + { + Console.WriteLine("Endpoint - Name:{0} Protocol:{1} Port:{2} LocalPort:{3} Vip:{4}", ep.Name, ep.Protocol, ep.Port, ep.LocalPort, ep.Vip); + + if (!string.IsNullOrEmpty(ep.LBSetName)) + { + Console.WriteLine("\t- LBSetName:{0}", ep.LBSetName); + Console.WriteLine("\t- Probe - Port:{0} Protocol:{1} Interval:{2} Timeout:{3}", ep.ProbePort, ep.ProbeProtocol, ep.ProbeIntervalInSeconds, ep.ProbeTimeoutInSeconds); + } + } + + Console.WriteLine("*******************************************************************************"); + + // Check if the specified endpoints were found. + foreach (AzureEndPointConfigInfo epInfo in epInfos) + { + bool found = false; + + foreach (InputEndpointContext ep in serverEndpoints) + { + if (epInfo.CheckInputEndpointContext(ep)) + { + found = true; + Console.WriteLine("Endpoint found: {0}", epInfo.EndpointName); + break; + } + } + + Assert.IsTrue(found, string.Format("Error: Endpoint '{0}' was not found!", epInfo.EndpointName)); + } + + return true; + } + + private bool CheckEndpointRemoved(string vmName, string serviceName, AzureEndPointConfigInfo[] epInfos) + { + var serverEndpoints = vmPowershellCmdlets.GetAzureEndPoint(vmPowershellCmdlets.GetAzureVM(vmName, serviceName)); + + // List the endpoints found for debugging. + Console.WriteLine("***** Checking for Removed Endpoints ******************************************"); + Console.WriteLine("***** Listing Returned Endpoints"); + foreach (InputEndpointContext ep in serverEndpoints) + { + Console.WriteLine("Endpoint - Name:{0} Protocol:{1} Port:{2} LocalPort:{3} Vip:{4}", ep.Name, ep.Protocol, ep.Port, ep.LocalPort, ep.Vip); + + if (!string.IsNullOrEmpty(ep.LBSetName)) + { + Console.WriteLine("\t- LBSetName:{0}", ep.LBSetName); + Console.WriteLine("\t- Probe - Port:{0} Protocol:{1} Interval:{2} Timeout:{3}", ep.ProbePort, ep.ProbeProtocol, ep.ProbeIntervalInSeconds, ep.ProbeTimeoutInSeconds); + } + } + + Console.WriteLine("*******************************************************************************"); + + // Check if the specified endpoints were found. + foreach (AzureEndPointConfigInfo epInfo in epInfos) + { + bool found = false; + + foreach (InputEndpointContext ep in serverEndpoints) + { + if (epInfo.CheckInputEndpointContext(ep)) + { + found = true; + Console.WriteLine("Endpoint found: {0}", epInfo.EndpointName); + break; + } + } + + Assert.IsFalse(found, string.Format("Error: Endpoint '{0}' was found!", epInfo.EndpointName)); + } + + return true; + } + + /// + /// Add an Endpoint with ACLs during deployment + /// + [TestMethod(), TestCategory(Category.Functional), TestProperty("Feature", "IAAS"), Priority(1), Owner("priya"), Description("Test ACLs cmdlets New-AzureAclConfig, Set-AzureAclConfig")] + public void AddEndPointACLsWithNewDeployment() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + string newAzureVM1Name = Utilities.GetUniqueShortName(vmNamePrefix); + string newAzureVM2Name = Utilities.GetUniqueShortName(vmNamePrefix); + if (string.IsNullOrEmpty(imageName)) + imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows" }, false); + + vmPowershellCmdlets.NewAzureService(serviceName, serviceName, locationName); + + NetworkAclObject aclObj = vmPowershellCmdlets.NewAzureAclConfig(); + vmPowershellCmdlets.SetAzureAclConfig(SetACLConfig.AddRule, aclObj, 100, ACLAction.Permit, "172.0.0.0/8", "notes1"); + vmPowershellCmdlets.SetAzureAclConfig(SetACLConfig.AddRule, aclObj, 200, ACLAction.Deny, "10.0.0.0/8", "notes2"); + + var azureVMConfigInfo1 = new AzureVMConfigInfo(newAzureVM1Name, InstanceSize.ExtraSmall.ToString(), imageName); + var azureVMConfigInfo2 = new AzureVMConfigInfo(newAzureVM2Name, InstanceSize.ExtraSmall.ToString(), imageName); + var azureProvisioningConfig = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var azureDataDiskConfigInfo = new AddAzureDataDiskConfig(DiskCreateOption.CreateNew, 50, "datadisk1", 0); + var azureEndPointConfigInfo = new AzureEndPointConfigInfo(AzureEndPointConfigInfo.ParameterSet.DefaultProbe, ProtocolInfo.tcp, 80, 80, "web", "lbweb", aclObj, true); + + var persistentVMConfigInfo1 = new PersistentVMConfigInfo(azureVMConfigInfo1, azureProvisioningConfig, azureDataDiskConfigInfo, azureEndPointConfigInfo); + var persistentVMConfigInfo2 = new PersistentVMConfigInfo(azureVMConfigInfo2, azureProvisioningConfig, azureDataDiskConfigInfo, azureEndPointConfigInfo); + + PersistentVM persistentVM1 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo1); + PersistentVM persistentVM2 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo2); + + PersistentVM[] VMs = { persistentVM1, persistentVM2 }; + vmPowershellCmdlets.NewAzureVM(serviceName, VMs); + + // Cleanup + vmPowershellCmdlets.RemoveAzureVM(newAzureVM1Name, serviceName); + vmPowershellCmdlets.RemoveAzureVM(newAzureVM2Name, serviceName); + + Assert.AreEqual(null, vmPowershellCmdlets.GetAzureVM(newAzureVM1Name, serviceName)); + Assert.AreEqual(null, vmPowershellCmdlets.GetAzureVM(newAzureVM2Name, serviceName)); + pass = true; + } + + /// + /// Add an Endpoint with ACLs to an existing deployment + /// + [TestMethod(), TestCategory(Category.Functional), TestProperty("Feature", "IAAS"), Priority(1), Owner("priya"), Description("Test ACLs cmdlets New-AzureAclConfig, Set-AzureAclConfig")] + public void AddEndPointACLsonExistingDeployment() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + string newAzureQuickVMName = Utilities.GetUniqueShortName(vmNamePrefix); + const string endpointName = "web"; + imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows" }, false); + vmPowershellCmdlets.NewAzureQuickVM(OS.Windows, newAzureQuickVMName, serviceName, imageName, username, + password, locationName); + + PersistentVMRoleContext vmRoleCtxt = vmPowershellCmdlets.GetAzureVM(newAzureQuickVMName, serviceName); + Assert.AreEqual(newAzureQuickVMName, vmRoleCtxt.Name, true); + + NetworkAclObject aclObj = vmPowershellCmdlets.NewAzureAclConfig(); + vmPowershellCmdlets.SetAzureAclConfig(SetACLConfig.AddRule, aclObj, 100, ACLAction.Deny, "172.0.0.0/8", "notes3"); + + var epConfigInfo = new AzureEndPointConfigInfo(AzureEndPointConfigInfo.ParameterSet.NoLB, ProtocolInfo.tcp, + 80, 80, endpointName, aclObj); + + vmPowershellCmdlets.AddEndPoint(newAzureQuickVMName, serviceName, new[] { epConfigInfo }); + + var returnedVm = vmPowershellCmdlets.GetAzureVM(newAzureQuickVMName, serviceName); + var returnedAclContext = vmPowershellCmdlets.GetAzureAclConfig(returnedVm.VM, endpointName); + + Assert.IsTrue(Verify.AzureAclConfig(aclObj, returnedAclContext)); + + pass = true; + } + + [TestCleanup] + public virtual void CleanUp() + { + Console.WriteLine("Test {0}", pass ? "passed" : "failed"); + + // Cleanup + if ((cleanupIfPassed && pass) || (cleanupIfFailed && !pass)) + { + Console.WriteLine("Starting to clean up created VM and service."); + + try + { + vmPowershellCmdlets.RemoveAzureService(serviceName); + Console.WriteLine("Service, {0}, is deleted", serviceName); + } + catch (Exception e) + { + Console.WriteLine("Error during removing VM: {0}", e.ToString()); + } + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/LocationBasedReservedIPTests.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/LocationBasedReservedIPTests.cs new file mode 100644 index 000000000000..bb9acf32021e --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/LocationBasedReservedIPTests.cs @@ -0,0 +1,343 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests +{ + [TestClass] + public class LocationBasedReservedIPTests: ServiceManagementTest + { + private static string vnetName; + private static string subNet; + private const string DNS_IP = "208.67.222.222"; + private const string subnet = "Subnet1"; + private const string vnet = "NewVNet4"; + private string serviceName; + + [ClassInitialize] + public static void ClassInitialize(TestContext context) + { + var vnetConfig = vmPowershellCmdlets.GetAzureVNetConfig(null); + if (vnetConfig.Count > 0) + { + vmPowershellCmdlets.RunPSScript("Get-AzureService | Remove-AzureService -Force"); + Utilities.RetryActionUntilSuccess(() => vmPowershellCmdlets.RemoveAzureVNetConfig(), "in use", 5, 30); + } + vmPowershellCmdlets.SetAzureVNetConfig(Directory.GetCurrentDirectory() + "\\VnetconfigWithLocation.netcfg"); + var sites = vmPowershellCmdlets.GetAzureVNetSite(null); + subNet = sites[0].Subnets.First().Name; + vnetName = sites[0].Name; + } + + [ClassCleanup] + public static void ClassCleanup() + { + Utilities.ExecuteAndLog(() => vmPowershellCmdlets.RemoveAzureVNetConfig(), "Remove Azure Vnet config after tests"); + } + + [TestInitialize] + public void Intialize() + { + serviceName = Utilities.GetUniqueShortName(serviceNamePrefix); + cleanupIfPassed = true; + } + + [TestCleanup] + public void Cleanup() + { + if (cleanupIfPassed) + Utilities.ExecuteAndLog(() => CleanupService(serviceName), "Delete service"); + } + + [TestMethod(), Priority(0), TestProperty("Feature", "IaaS"), TestCategory(Category.Sequential), Owner("hylee"), Description("Test the cmdlets (New-AzureReservedIP,Get-AzureReservedIP,Remove-AzureReservedIP)")] + public void CreateReservedIPThenWindowsVM() + { + try + { + string reservedIpName = Utilities.GetUniqueShortName("ResrvdIP"); + string reservedIpLabel = Utilities.GetUniqueShortName(" ResrvdIPLbl",5); + string dnsName = Utilities.GetUniqueShortName("Dns"); + string vmName = Utilities.GetUniqueShortName(vmNamePrefix); + string deploymentName = Utilities.GetUniqueShortName("Depl"); + var input = new ReservedIPContext() + { + //Address = string.Empty, + DeploymentName = string.Empty, + Label = reservedIpLabel, + InUse = false, + Location = locationName, + ReservedIPName = reservedIpName, + State = "Created" + }; + + // Reserve a new IP + Utilities.ExecuteAndLog(() => vmPowershellCmdlets.NewAzureReservedIP(reservedIpName, locationName, reservedIpLabel), "Reserve a new IP"); + //Get the reserved ip and verify the reserved Ip properties. + VerifyReservedIpNotInUse(input); + // Create a new VM with the reserved ip. + DnsServer dns = null; + Utilities.ExecuteAndLog(() => { dns = vmPowershellCmdlets.NewAzureDns(dnsName, DNS_IP); }, "Create a new Azure DNS"); + Utilities.ExecuteAndLog(() => + { + PersistentVM vm = CreateVMObjectWithDataDiskSubnetAndAvailibilitySet(vmName, OS.Windows); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, vnet, new[] { dns }, location: locationName, reservedIPName: reservedIpName); + },"Create a new windows azure vm with reserved ip."); + VerifyReservedIpInUse(serviceName,input); + Utilities.ExecuteAndLog(() => vmPowershellCmdlets.RemoveAzureVM(vmName, serviceName, true), "Remove Azure VM and verify that a warning is given."); + VerifyReservedIpNotInUse(input); + Utilities.ExecuteAndLog(() => vmPowershellCmdlets.RemoveAzureReservedIP(reservedIpName, true), "Release the reserved ip"); + VerifyReservedIpRemoved(reservedIpName); + pass = true; + } + catch (Exception ex) + { + pass = false; + Console.WriteLine(ex.ToString()); + throw; + } + } + + [TestMethod(), Priority(0), TestProperty("Feature", "IaaS"), TestCategory(Category.Sequential), Owner("hylee"), Description("Test the cmdlets (New-AzureReservedIP,Get-AzureReservedIP,Remove-AzureReservedIP)")] + public void CreateReservedIPThenLinuxVM() + { + try + { + string reservedIpName = Utilities.GetUniqueShortName("ResrvdIP"); + string reservedIpLabel = Utilities.GetUniqueShortName(" ResrvdIPLbl", 5); + string dnsName = Utilities.GetUniqueShortName("Dns"); + string vmName = Utilities.GetUniqueShortName(vmNamePrefix); + string deploymentName = Utilities.GetUniqueShortName("Depl"); + string affinityGroup = Utilities.GetUniqueShortName("AffGrp"); + var input = new ReservedIPContext() + { + //Address = string.Empty, + DeploymentName = string.Empty, + Label = reservedIpLabel, + InUse = false, + Location = locationName, + ReservedIPName = reservedIpName, + State = "Created" + }; + + // Reserve a new IP + Utilities.ExecuteAndLog(() => vmPowershellCmdlets.NewAzureReservedIP(reservedIpName, locationName, reservedIpLabel), "Reserve a new IP"); + + //Get the reserved ip and verify the reserved Ip properties. + VerifyReservedIpNotInUse(input); + // Create a new VM with the reserved ip. + DnsServer dns = null; + Utilities.ExecuteAndLog(() => { dns = vmPowershellCmdlets.NewAzureDns(dnsName, DNS_IP); }, "Create a new Azure DNS"); + Utilities.ExecuteAndLog(() => vmPowershellCmdlets.NewAzureAffinityGroup(affinityGroup, locationName, affinityGroup, affinityGroup), "Create a new affinity group"); + + Utilities.ExecuteAndLog(() => + { + PersistentVM vm = CreateVMObjectWithDataDiskSubnetAndAvailibilitySet(vmName, OS.Linux); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, vnet, new[] { dns }, affinityGroup: affinityGroup, reservedIPName: reservedIpName); + }, ""); + VerifyReservedIpInUse(serviceName, input); + vmPowershellCmdlets.RemoveAzureDeployment(serviceName,DeploymentSlotType.Production, true); + VerifyReservedIpNotInUse(input); + Utilities.ExecuteAndLog(() => vmPowershellCmdlets.RemoveAzureReservedIP(reservedIpName, true), "Release the reserved ip"); + VerifyReservedIpRemoved(reservedIpName); + Utilities.ExecuteAndLog(() => vmPowershellCmdlets.RemoveAzureService(serviceName, true), "Delete the hosted service"); + cleanupIfPassed = false; + Utilities.ExecuteAndLog(() => vmPowershellCmdlets.RemoveAzureAffinityGroup(affinityGroup), "Delete the affintiy group"); + pass = true; + } + catch (Exception ex) + { + pass = false; + Console.WriteLine(ex.ToString()); + throw; + } + } + + [TestMethod(), Priority(0), TestProperty("Feature", "IaaS"), TestCategory(Category.Sequential), Owner("hylee"), Description("Test the cmdlets (New-AzureReservedIP,Get-AzureReservedIP,Remove-AzureReservedIP)")] + public void CreateReservedIPThenWindowsQuickVM() + { + try + { + string reservedIpName = Utilities.GetUniqueShortName("ResrvdIP"); + string reservedIpLabel = Utilities.GetUniqueShortName(" ResrvdIPLbl", 5); + string dnsName = Utilities.GetUniqueShortName("Dns"); + string vmName = Utilities.GetUniqueShortName(vmNamePrefix); + string deploymentName = Utilities.GetUniqueShortName("Depl"); + string affinityGroup = Utilities.GetUniqueShortName("AffGrp"); + var input = new ReservedIPContext() + { + //Address = string.Empty, + DeploymentName = string.Empty, + Label = reservedIpLabel, + InUse = false, + Location = locationName, + ReservedIPName = reservedIpName, + State = "Created" + }; + imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows" }, false); + + // Reserve a new IP + Utilities.ExecuteAndLog(() => vmPowershellCmdlets.NewAzureReservedIP(reservedIpName, locationName, reservedIpLabel), "Reserve a new IP"); + VerifyReservedIpNotInUse(input); + Utilities.ExecuteAndLog(() => vmPowershellCmdlets.NewAzureAffinityGroup(affinityGroup, locationName, affinityGroup, affinityGroup), "Create a new affinity group"); + Utilities.ExecuteAndLog(() => vmPowershellCmdlets.NewAzureQuickVM(OS.Windows, vmName, serviceName, imageName, null, InstanceSize.Small, username, password, null,affinityGroup, reservedIpName), "Create a new Azure windows Quick VM with reserved ip."); + VerifyReservedIpInUse(serviceName, input); + Utilities.ExecuteAndLog(() => vmPowershellCmdlets.StopAzureVM(vmName, serviceName,force:true),"Stop Azure VM"); + VerifyReservedIpInUse(serviceName, input); + Utilities.ExecuteAndLog(() => vmPowershellCmdlets.RemoveAzureService(serviceName, true), "Delete the hosted service"); + cleanupIfPassed = false; + Utilities.ExecuteAndLog(() => vmPowershellCmdlets.RemoveAzureReservedIP(reservedIpName, true), "Release the reserved ip"); + VerifyReservedIpRemoved(reservedIpName); + Utilities.ExecuteAndLog(() => vmPowershellCmdlets.RemoveAzureAffinityGroup(affinityGroup), "Delete the affintiy group"); + pass = true; + + } + catch (Exception ex) + { + pass = false; + Console.WriteLine(ex.ToString()); + throw; + } + } + + [TestMethod(), Priority(0), TestProperty("Feature", "IaaS"), TestCategory(Category.Sequential), Owner("hylee"), Description("Test the cmdlets (New-AzureReservedIP,Get-AzureReservedIP,Remove-AzureReservedIP)")] + public void CreateReservedIPThenLinuxQuickVM() + { + try + { + string reservedIpName = Utilities.GetUniqueShortName("ResrvdIP"); + string reservedIpLabel = Utilities.GetUniqueShortName(" ResrvdIPLbl", 5); + string dnsName = Utilities.GetUniqueShortName("Dns"); + string vmName = Utilities.GetUniqueShortName(vmNamePrefix); + string deploymentName = Utilities.GetUniqueShortName("Depl"); + string affinityGroup = Utilities.GetUniqueShortName("AffGrp"); + var input = new ReservedIPContext() + { + //Address = string.Empty, + DeploymentName = string.Empty, + Label = reservedIpLabel, + InUse = false, + Location = locationName, + ReservedIPName = reservedIpName, + State = "Created" + }; + imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Linux" }, false); + + // Reserve a new IP + Utilities.ExecuteAndLog(() => vmPowershellCmdlets.NewAzureReservedIP(reservedIpName, locationName, reservedIpLabel), "Reserve a new IP"); + VerifyReservedIpNotInUse(input); + Utilities.ExecuteAndLog(() => vmPowershellCmdlets.NewAzureAffinityGroup(affinityGroup, locationName, affinityGroup, affinityGroup), "Create a new affinity group"); + Utilities.ExecuteAndLog(() => vmPowershellCmdlets.NewAzureQuickVM(OS.Linux, vmName, serviceName, imageName, username, password, locationName, InstanceSize.Small.ToString(), null, reservedIpName), "Create a new Azure windows Quick VM with reserved ip."); + VerifyReservedIpInUse(serviceName, input); + Utilities.ExecuteAndLog(() => vmPowershellCmdlets.StopAzureVM(vmName, serviceName,true), "Stop Azure VM and stay provisioned."); + VerifyReservedIpInUse(serviceName, input); + Utilities.ExecuteAndLog(() => vmPowershellCmdlets.RemoveAzureService(serviceName, true), "Delete the hosted service"); + cleanupIfPassed = false; + Utilities.ExecuteAndLog(() => vmPowershellCmdlets.RemoveAzureReservedIP(reservedIpName, true), "Release the reserved ip"); ; + VerifyReservedIpRemoved(reservedIpName); + pass = true; + + } + catch (Exception ex) + { + pass = false; + Console.WriteLine(ex.ToString()); + throw; + } + } + + #region Helper Methods + + /// + /// Verify the properties of the reserved ip + /// + /// ReservedIpContext object containing expected values + private void VerifyReservedIp(ReservedIPContext input) + { + var reservedIps = vmPowershellCmdlets.GetAzureReservedIP(input.ReservedIPName); + if (reservedIps.Count > 0) + { + var reservedIpContext = reservedIps[0]; + Utilities.PrintContext(reservedIpContext); + Utilities.LogAssert(() => Assert.IsFalse(string.IsNullOrEmpty(reservedIpContext.Address)), "Address"); + Utilities.LogAssert(() => Assert.AreEqual(input.Location, reservedIpContext.Location), "Location"); + Utilities.LogAssert(() => Assert.AreEqual(input.ReservedIPName, reservedIpContext.ReservedIPName), "ReservedIPName"); + Utilities.LogAssert(() => Assert.AreEqual(input.State, reservedIpContext.State), "State"); + Utilities.LogAssert(() => Assert.AreEqual(input.DeploymentName, reservedIpContext.DeploymentName), "DeploymentName"); + Utilities.LogAssert(() => Assert.AreEqual(input.InUse, reservedIpContext.InUse), "InUse"); + Utilities.LogAssert(() => Assert.AreEqual(input.ServiceName, reservedIpContext.ServiceName), "ServiceName"); + } + else + { + Assert.Fail("Didnt find reserved ip with name {0}", input.ReservedIPName); + } + } + + private void VerifyReservedIpNotInUse(ReservedIPContext input) + { + input.ServiceName = null; + input.InUse = false; + input.DeploymentName = null; + Utilities.ExecuteAndLog(() => VerifyReservedIp(input), string.Format("Verify that the reserved ip {0} is not in use", input.ReservedIPName)); + } + + private void VerifyReservedIpInUse(string serviceName,ReservedIPContext input) + { + input.ServiceName = serviceName; + input.InUse = true; + input.DeploymentName = serviceName; + Utilities.ExecuteAndLog(() => VerifyReservedIp(input), string.Format("Verify that the reserved ip {0} is in use", input.ReservedIPName)); + } + + private void VerifyReservedIpRemoved(string reservedIpName) + { + Utilities.VerifyFailure(() => vmPowershellCmdlets.GetAzureReservedIP(reservedIpName), ResourceNotFoundException); + } + + private PersistentVM CreateVMObjectWithDataDiskSubnetAndAvailibilitySet(string vmName, OS os) + { + string disk1 = "Disk1"; + int diskSize = 30; + string availabilitySetName = Utilities.GetUniqueShortName("AvailSet"); + string img = string.Empty; + + bool isWindowsOs = false; + if (os == OS.Windows) + { + img = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows" }, false); + isWindowsOs = true; + } + else + { + img = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Linux" }, false); + isWindowsOs = false; + } + + PersistentVM vm = Utilities.CreateIaaSVMObject(vmName, InstanceSize.Small, img, isWindowsOs,username, password); + AddAzureDataDiskConfig azureDataDiskConfigInfo1 = new AddAzureDataDiskConfig(DiskCreateOption.CreateNew, diskSize, disk1, 0, HostCaching.ReadWrite.ToString()); + azureDataDiskConfigInfo1.Vm = vm; + + vm = vmPowershellCmdlets.SetAzureSubnet(vm, new string[] {subnet}); + vm = vmPowershellCmdlets.SetAzureAvailabilitySet(availabilitySetName, vm); + return vm; + } + + #endregion Helper Methods + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/NewAzureVmTests.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/NewAzureVmTests.cs new file mode 100644 index 000000000000..59dacea68f0a --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/NewAzureVmTests.cs @@ -0,0 +1,520 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Security.Cryptography.X509Certificates; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests +{ + [TestClass] + public class NewAzureVmTests:ServiceManagementTest + { + private string _serviceName; + private string _linuxImageName; + const string CerFileName = "testcert.cer"; + X509Certificate2 _installedCert; + private StoreLocation certStoreLocation; + private StoreName certStoreName; + private string keyPath; + + [TestInitialize] + public void Intialize() + { + pass = false; + imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows" }, false); + _linuxImageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Linux" }, false); + InstallCertificate(); + keyPath = Directory.GetCurrentDirectory() + Utilities.GetUniqueShortName() + ".txt"; + } + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "Iaas"), Priority(1), Owner("hylee"), Description("Test the cmdlets (New-AzureVMConfig,Add-AzureProvisioningConfig,New-AzureVM)")] + public void NewAzureVMWithLinuxAndNoSSHEnpoint() + { + try + { + _serviceName = Utilities.GetUniqueShortName(serviceNamePrefix); + string newAzureLinuxVMName = Utilities.GetUniqueShortName("PSLinuxVM"); + + // Add-AzureProvisioningConfig with NoSSHEndpoint + var azureVMConfigInfo = new AzureVMConfigInfo(newAzureLinuxVMName, InstanceSize.Small.ToString(), _linuxImageName); + var azureProvisioningConfig = new AzureProvisioningConfigInfo(username, password, true); + var persistentVMConfigInfo = new PersistentVMConfigInfo(azureVMConfigInfo, azureProvisioningConfig, null, null); + PersistentVM vm = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo); + + // New-AzureVM + vmPowershellCmdlets.NewAzureVM(_serviceName, new[] { vm }, locationName); + Console.WriteLine("New Azure service with name:{0} created successfully.", _serviceName); + Collection endpoints = vmPowershellCmdlets.GetAzureEndPoint(vmPowershellCmdlets.GetAzureVM(newAzureLinuxVMName, _serviceName)); + + Console.WriteLine("The number of endpoints: {0}", endpoints.Count); + foreach (var ep in endpoints) + { + Utilities.PrintContext(ep); + } + Assert.AreEqual(0, endpoints.Count); + pass = true; + } + catch (Exception ex) + { + Console.WriteLine(ex.Message); + throw; + } + } + + + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "Iaas"), Priority(1), Owner("hylee"), + Description("Test the cmdlets (New-AzureVMConfig,Add-AzureProvisioningConfig,New-AzureVM) and verifies a that a linux vm can be created with out password")] + public void NewAzureLinuxVMWithoutPasswordAndNoSSHEnpoint() + { + + try + { + _serviceName = Utilities.GetUniqueShortName(serviceNamePrefix); + + //Create service + vmPowershellCmdlets.NewAzureService(_serviceName, locationName); + + //Add installed certificate to the service + PSObject certToUpload = vmPowershellCmdlets.RunPSScript( + String.Format("Get-Item cert:\\{0}\\{1}\\{2}", certStoreLocation.ToString(), certStoreName.ToString(), _installedCert.Thumbprint))[0]; + vmPowershellCmdlets.AddAzureCertificate(_serviceName, certToUpload); + + string newAzureLinuxVMName = Utilities.GetUniqueShortName("PSLinuxVM"); + + var key = vmPowershellCmdlets.NewAzureSSHKey(NewAzureSshKeyType.PublicKey, _installedCert.Thumbprint, keyPath); + var sshKeysList = new Model.LinuxProvisioningConfigurationSet.SSHPublicKeyList(); + sshKeysList.Add(key); + + // Add-AzureProvisioningConfig without password and NoSSHEndpoint + var azureVMConfigInfo = new AzureVMConfigInfo(newAzureLinuxVMName, InstanceSize.Small.ToString(), _linuxImageName); + var azureProvisioningConfig = new AzureProvisioningConfigInfo(username, noSshEndpoint: true, sSHPublicKeyList: sshKeysList); + var persistentVMConfigInfo = new PersistentVMConfigInfo(azureVMConfigInfo, azureProvisioningConfig, null, null); + PersistentVM vm = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo); + + // New-AzureVM + vmPowershellCmdlets.NewAzureVM(_serviceName, new[] { vm }); + Console.WriteLine("New Azure service with name:{0} created successfully.", _serviceName); + Collection endpoints = vmPowershellCmdlets.GetAzureEndPoint(vmPowershellCmdlets.GetAzureVM(newAzureLinuxVMName, _serviceName)); + + Console.WriteLine("The number of endpoints: {0}", endpoints.Count); + foreach (var ep in endpoints) + { + Utilities.PrintContext(ep); + } + Assert.AreEqual(0, endpoints.Count); + pass = true; + } + catch (Exception ex) + { + Console.WriteLine(ex.Message); + throw; + } + } + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "Iaas"), Priority(1), Owner("hylee"), Description("Test the cmdlets (New-AzureVMConfig,Add-AzureProvisioningConfig,New-AzureVM)")] + public void NewAzureVMWithLinuxAndDisableSSH() + { + try + { + _serviceName = Utilities.GetUniqueShortName(serviceNamePrefix); + string newAzureLinuxVMName = Utilities.GetUniqueShortName("PSLinuxVM"); + string linuxImageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Linux" }, false); + + // Add-AzureProvisioningConfig with DisableSSH option + var azureVMConfigInfo = new AzureVMConfigInfo(newAzureLinuxVMName, InstanceSize.Small.ToString(), linuxImageName); + var azureProvisioningConfig = new AzureProvisioningConfigInfo(username, password, false, true); + var persistentVMConfigInfo = new PersistentVMConfigInfo(azureVMConfigInfo, azureProvisioningConfig, null, null); + PersistentVM vm = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo); + + // New-AzureVM + vmPowershellCmdlets.NewAzureVM(_serviceName, new[] { vm }, locationName); + Console.WriteLine("New Azure service with name:{0} created successfully.", _serviceName); + Collection endpoints = vmPowershellCmdlets.GetAzureEndPoint(vmPowershellCmdlets.GetAzureVM(newAzureLinuxVMName, _serviceName)); + + Console.WriteLine("The number of endpoints: {0}", endpoints.Count); + foreach (var ep in endpoints) + { + Utilities.PrintContext(ep); + } + Assert.AreEqual(0, endpoints.Count); + pass = true; + } + catch (Exception ex) + { + Console.WriteLine(ex.Message); + throw; + } + } + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "Iaas"), Priority(1), Owner("hylee"), Description("Test the cmdlets(New-AzureVMConfig,Add-AzureProvisioningConfig,New-AzureVM) with a WinRMCert")] + public void NewAzureVMWithWindowsAndCustomData() + { + try + { + _serviceName = Utilities.GetUniqueShortName(serviceNamePrefix); + string newAzureVMName = Utilities.GetUniqueShortName("PSWinVM"); + + var customDataFile = @".\CustomData.bin"; + var customDataContent = File.ReadAllText(customDataFile); + + // Add-AzureProvisioningConfig with X509Certificate + var azureVMConfigInfo = new AzureVMConfigInfo(newAzureVMName, InstanceSize.Small.ToString(), imageName); + var azureProvisioningConfig = new AzureProvisioningConfigInfo(username, password, customDataFile); + var persistentVMConfigInfo = new PersistentVMConfigInfo(azureVMConfigInfo, azureProvisioningConfig, null, null); + PersistentVM vm = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo); + + // New-AzureVM + vmPowershellCmdlets.NewAzureVM(_serviceName, new[] { vm }, locationName); + Console.WriteLine("New Azure service with name:{0} created successfully.", _serviceName); + + StopAzureVMTest.WaitForReadyState(_serviceName, newAzureVMName, 60, 30); + + // Get-AzureVM + var vmContext = vmPowershellCmdlets.GetAzureVM(newAzureVMName, _serviceName); + + // Get-AzureCertificate + var winRmCert = vmPowershellCmdlets.GetAzureCertificate(_serviceName, vmContext.VM.DefaultWinRmCertificateThumbprint, "sha1").First(); + + // Install the WinRM cert to the local machine's root location. + InstallCertificate(winRmCert, StoreLocation.LocalMachine, StoreName.Root); + + var connUri = vmPowershellCmdlets.GetAzureWinRMUri(_serviceName, newAzureVMName); + var cred = new PSCredential(username, Utilities.convertToSecureString(password)); + + Utilities.RetryActionUntilSuccess(() => + { + // Invoke Command + var scriptBlock = ScriptBlock.Create(@"Get-Content -Path 'C:\AzureData\CustomData.bin'"); + var invokeInfo = new InvokeCommandCmdletInfo(connUri, cred, scriptBlock); + var invokeCmd = new PowershellCmdlet(invokeInfo); + var results = invokeCmd.Run(false); + Assert.IsTrue(customDataContent == results.First().BaseObject as string); + }, "Access is denied", 10, 30); + + pass = true; + } + catch (Exception ex) + { + Console.WriteLine(ex.Message); + throw; + } + } + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "Iaas"), Priority(1), Owner("hylee"), Description("Test the cmdlets (New-AzureVMConfig,Add-AzureProvisioningConfig,New-AzureVM)")] + public void NewAzureVMWithLinuxAndCustomData() + { + try + { + _serviceName = Utilities.GetUniqueShortName(serviceNamePrefix); + + string newAzureLinuxVMName = Utilities.GetUniqueShortName("PSLinuxVM"); + string linuxImageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Linux" }, false); + + // Add-AzureProvisioningConfig without NoSSHEndpoint or DisableSSH option + var azureVMConfigInfo = new AzureVMConfigInfo(newAzureLinuxVMName, InstanceSize.Small.ToString(), linuxImageName); + var azureProvisioningConfig = new AzureProvisioningConfigInfo(username, password, false, false, null, null, false, @".\cloudinittest.sh"); + var persistentVMConfigInfo = new PersistentVMConfigInfo(azureVMConfigInfo, azureProvisioningConfig, null, null); + PersistentVM vm = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo); + + // New-AzureVM + vmPowershellCmdlets.NewAzureVM(_serviceName, new[] { vm }, locationName); + Console.WriteLine("New Azure service with name:{0} created successfully.", _serviceName); + Collection endpoints = vmPowershellCmdlets.GetAzureEndPoint(vmPowershellCmdlets.GetAzureVM(newAzureLinuxVMName, _serviceName)); + + Console.WriteLine("The number of endpoints: {0}", endpoints.Count); + foreach (var ep in endpoints) + { + Utilities.PrintContext(ep); + } + Assert.AreEqual(1, endpoints.Count); + pass = true; + } + catch (Exception ex) + { + Console.WriteLine(ex.Message); + throw; + } + } + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "Iaas"), Priority(1), Owner("hylee"), Description("Test the cmdlets (New-AzureVMConfig,Add-AzureProvisioningConfig,New-AzureVM)")] + public void NewAzureVMWithLinux() + { + try + { + _serviceName = Utilities.GetUniqueShortName(serviceNamePrefix); + + string newAzureLinuxVMName = Utilities.GetUniqueShortName("PSLinuxVM"); + string linuxImageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Linux" }, false); + + // Add-AzureProvisioningConfig without NoSSHEndpoint or DisableSSH option + var azureVMConfigInfo = new AzureVMConfigInfo(newAzureLinuxVMName, InstanceSize.Small.ToString(), linuxImageName); + var azureProvisioningConfig = new AzureProvisioningConfigInfo(username, password); + var persistentVMConfigInfo = new PersistentVMConfigInfo(azureVMConfigInfo, azureProvisioningConfig, null, null); + PersistentVM vm = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo); + + // New-AzureVM + vmPowershellCmdlets.NewAzureVM(_serviceName, new[] { vm }, locationName); + Console.WriteLine("New Azure service with name:{0} created successfully.", _serviceName); + Collection endpoints = vmPowershellCmdlets.GetAzureEndPoint(vmPowershellCmdlets.GetAzureVM(newAzureLinuxVMName, _serviceName)); + + Console.WriteLine("The number of endpoints: {0}", endpoints.Count); + foreach (var ep in endpoints) + { + Utilities.PrintContext(ep); + } + Assert.AreEqual(1, endpoints.Count); + pass = true; + } + catch(Exception ex) + { + Console.WriteLine(ex.Message); + throw; + } + } + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "Iaas"), Priority(1), Owner("hylee"), Description("Test the cmdlets (New-AzureVMConfig,Add-AzureProvisioningConfig,New-AzureVM)")] + public void NewAzureVMWithLinuxAndNoSSHEnpointAndDisableSSH() + { + try + { + _serviceName = Utilities.GetUniqueShortName(serviceNamePrefix); + + // New-AzureVMConfig + string newAzureLinuxVMName = Utilities.GetUniqueShortName("PSLinuxVM"); + string linuxImageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Linux" }, false); + + // Add-AzureProvisioningConfig + var azureVMConfigInfo = new AzureVMConfigInfo(newAzureLinuxVMName, InstanceSize.Small.ToString(), linuxImageName); + var azureProvisioningConfig = new AzureProvisioningConfigInfo(username, password, true, true); + var persistentVMConfigInfo = new PersistentVMConfigInfo(azureVMConfigInfo, azureProvisioningConfig, null, null); + PersistentVM vm = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo); + + // New-AzureVM + vmPowershellCmdlets.NewAzureVM(_serviceName, new[] { vm }, locationName); + Console.WriteLine("New Azure service with name:{0} created successfully.", _serviceName); + Collection endpoints = vmPowershellCmdlets.GetAzureEndPoint(vmPowershellCmdlets.GetAzureVM(newAzureLinuxVMName, _serviceName)); + + Console.WriteLine("The number of endpoints: {0}", endpoints.Count); + foreach (var ep in endpoints) + { + Utilities.PrintContext(ep); + } + Assert.AreEqual(0, endpoints.Count); + pass = true; + } + catch (Exception ex) + { + Console.WriteLine(ex.Message); + throw; + } + } + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "Iaas"), Priority(1), Owner("hylee"), Description("Test the cmdlets (New-AzureVMConfig,Add-AzureProvisioningConfig,New-AzureVM)")] + public void NewAzureVMWithLocation() + { + _serviceName = Utilities.GetUniqueShortName(serviceNamePrefix); + string _altLocation = GetAlternateLocation(locationName); + + try + { + // New-AzureService + vmPowershellCmdlets.NewAzureService(_serviceName, locationName); + + // New-AzureVMConfig + string newAzureVMName = Utilities.GetUniqueShortName("PSVM"); + string imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows" }, false); + + // Add-AzureProvisioningConfig + var azureVMConfigInfo = new AzureVMConfigInfo(newAzureVMName, InstanceSize.Small.ToString(), imageName); + var azureProvisioningConfig = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var persistentVMConfigInfo = new PersistentVMConfigInfo(azureVMConfigInfo, azureProvisioningConfig, null, null); + PersistentVM vm = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo); + + // New-AzureVM + try + { + vmPowershellCmdlets.NewAzureVM(_serviceName, new[] { vm }, _altLocation); + Assert.Fail("Should fail, but succeeded!"); + } + catch (Exception ex) + { + if (ex is AssertFailedException) + { + throw; + } + else + { + Console.WriteLine("Failure is expected. Continue the tests..."); + } + } + + vmPowershellCmdlets.NewAzureVM(_serviceName, new[] { vm }, locationName); + Console.WriteLine("New Azure service with name:{0} created successfully.", _serviceName); + var vmReturned = vmPowershellCmdlets.GetAzureVM(newAzureVMName, _serviceName); + + Utilities.PrintContext(vmReturned); + Assert.AreEqual(_serviceName, vmReturned.ServiceName); + pass = true; + } + catch (Exception ex) + { + Console.WriteLine(ex.Message); + throw; + } + } + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "Iaas"), Priority(1), Owner("hylee"), Description("Test the cmdlets (New-AzureVMConfig,Add-AzureProvisioningConfig,New-AzureVM)")] + public void NewAzureVMWithAffinityGroup() + { + _serviceName = Utilities.GetUniqueShortName(serviceNamePrefix); + string _affiniyGroupName1 = Utilities.GetUniqueShortName("aff"); + string _affiniyGroupName2 = Utilities.GetUniqueShortName("aff"); + + try + { + // New-AzureService + vmPowershellCmdlets.NewAzureAffinityGroup(_affiniyGroupName1, locationName, "location1", "location1"); + vmPowershellCmdlets.NewAzureAffinityGroup(_affiniyGroupName2, locationName, "location2", "location2"); + vmPowershellCmdlets.NewAzureService(_serviceName, "service1", null, _affiniyGroupName1); + + // New-AzureVMConfig + string newAzureVMName = Utilities.GetUniqueShortName("PSVM"); + string imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows" }, false); + + // Add-AzureProvisioningConfig + var azureVMConfigInfo = new AzureVMConfigInfo(newAzureVMName, InstanceSize.Small.ToString(), imageName); + var azureProvisioningConfig = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var persistentVMConfigInfo = new PersistentVMConfigInfo(azureVMConfigInfo, azureProvisioningConfig, null, null); + PersistentVM vm = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo); + + // New-AzureVM + try + { + vmPowershellCmdlets.NewAzureVMWithAG(_serviceName, new[] { vm }, _affiniyGroupName2); + Assert.Fail("Should fail, but succeeded!"); + } + catch (Exception ex) + { + if (ex is AssertFailedException) + { + throw; + } + else + { + Console.WriteLine("Failure is expected. Continue the tests..."); + } + } + + vmPowershellCmdlets.NewAzureVMWithAG(_serviceName, new[] { vm }, _affiniyGroupName1); + Console.WriteLine("New Azure service with name:{0} created successfully.", _serviceName); + var vmReturned = vmPowershellCmdlets.GetAzureVM(newAzureVMName, _serviceName); + + Utilities.PrintContext(vmReturned); + Assert.AreEqual(_serviceName, vmReturned.ServiceName); + pass = true; + } + catch (Exception ex) + { + Console.WriteLine(ex.Message); + throw; + } + } + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "Iaas"), Priority(1), Owner("hylee"), Description("Test the cmdlets(New-AzureVMConfig,Add-AzureProvisioningConfig,New-AzureVM) with a WinRMCert")] + [Ignore] + public void NewAzureVMWithWinRMCertificateTest() + { + try + { + _serviceName = Utilities.GetUniqueShortName(serviceNamePrefix); + string newAzureVMName = Utilities.GetUniqueShortName("PSWinVM"); + + // Add-AzureProvisioningConfig with X509Certificate + var azureVMConfigInfo = new AzureVMConfigInfo(newAzureVMName, InstanceSize.Small.ToString(), imageName); + var azureProvisioningConfig = new AzureProvisioningConfigInfo(username, password, _installedCert); + var persistentVMConfigInfo = new PersistentVMConfigInfo(azureVMConfigInfo, azureProvisioningConfig, null, null); + PersistentVM vm = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo); + + // New-AzureVM + vmPowershellCmdlets.NewAzureVM(_serviceName, new[] { vm }, null); + Console.WriteLine("New Azure service with name:{0} created successfully.", _serviceName); + var result = vmPowershellCmdlets.GetAzureVM(newAzureVMName, _serviceName); + Assert.AreEqual(_installedCert.Thumbprint, result.VM.WinRMCertificate.Thumbprint); + pass = true; + } + catch (Exception ex) + { + Console.WriteLine(ex.Message); + throw; + } + } + + private void InstallCertificate(CertificateContext certContext, StoreLocation loc, StoreName name) + { + File.WriteAllBytes(CerFileName, Convert.FromBase64String(certContext.Data)); + Utilities.InstallCert(CerFileName, loc, name); + } + + private void InstallCertificate() + { + // Create a certificate + X509Certificate2 certCreated = Utilities.CreateCertificate(password); + byte[] certData2 = certCreated.Export(X509ContentType.Cert); + File.WriteAllBytes(CerFileName, certData2); + + // Install the .cer file to local machine. + certStoreLocation = StoreLocation.CurrentUser; + certStoreName = StoreName.My; + _installedCert = Utilities.InstallCert(CerFileName, certStoreLocation, certStoreName); + } + + [TestCleanup] + public virtual void CleanUp() + { + Console.WriteLine("Test {0}", pass ? "passed" : "failed"); + + // Remove the service + if ((cleanupIfPassed && pass) || (cleanupIfFailed && !pass)) + { + CleanupService(_serviceName); + } + + if(File.Exists(keyPath)) + { + File.Delete(keyPath); + } + } + + public string GetAlternateLocation(string location) + { + foreach (var loc in vmPowershellCmdlets.GetAzureLocation()) + { + if (! loc.Name.Equals(location) && ! loc.DisplayName.Equals(location)) + { + return loc.Name; + } + } + return null; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PIRCmdletInfo/GetAzurePlatformVMImage.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PIRCmdletInfo/GetAzurePlatformVMImage.cs new file mode 100644 index 000000000000..af8787d52569 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PIRCmdletInfo/GetAzurePlatformVMImage.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PIRCmdletInfo +{ + public class GetAzurePlatformVMImageCmdletInfo : CmdletsInfo + { + public GetAzurePlatformVMImageCmdletInfo(string imageName) + { + this.cmdletName = Utilities.GetAzurePlatformVMImageCmdletName; + this.cmdletParams.Add(new CmdletParam("ImageName", imageName)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PIRCmdletInfo/RemoveAzurePlatformVMImage.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PIRCmdletInfo/RemoveAzurePlatformVMImage.cs new file mode 100644 index 000000000000..73dbd40a7187 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PIRCmdletInfo/RemoveAzurePlatformVMImage.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PIRCmdletInfo +{ + public class RemoveAzurePlatformVMImageCmdletInfo : CmdletsInfo + { + public RemoveAzurePlatformVMImageCmdletInfo(string imageName) + { + this.cmdletName = Utilities.RemoveAzurePlatformVMImageCmdletName; + this.cmdletParams.Add(new CmdletParam("ImageName", imageName)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PIRCmdletInfo/SetAzurePlatformVMImage.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PIRCmdletInfo/SetAzurePlatformVMImage.cs new file mode 100644 index 000000000000..249bfe74ab61 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PIRCmdletInfo/SetAzurePlatformVMImage.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PIRCmdletInfo +{ + public class SetAzurePlatformVMImageCmdletInfo : CmdletsInfo + { + public SetAzurePlatformVMImageCmdletInfo(string imageName, string permission, string [] locations) + { + this.cmdletName = Utilities.SetAzurePlatformVMImageCmdletName; + this.cmdletParams.Add(new CmdletParam("ImageName", imageName)); + if (permission != null) + { + this.cmdletParams.Add(new CmdletParam("Permission", permission)); + } + if (locations != null) + { + this.cmdletParams.Add(new CmdletParam("ReplicaLocations", locations)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PIRTest.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PIRTest.cs new file mode 100644 index 000000000000..03a2cc2f7d42 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PIRTest.cs @@ -0,0 +1,440 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Collections.ObjectModel; +using System.IO; +using System.Reflection; +using System.Threading; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests +{ + [TestClass] + public class PIRTest : ServiceManagementTest + { + private const string vhdNamePrefix = "pirtestosvhd"; + private const string imageNamePrefix = "pirtestosimage"; + + private string vhdName; + private string vhdBlobLocation; + private string image; + + private const string location1 = "West US"; + private const string location2 = "North Central US"; + private const string location3 = "East US"; + + private const string publisher = "publisher1"; + private const string normaluser = "normaluser2"; + private const string normaluserSubId = "602258C5-52EC-46B3-A49A-7587A764AC84"; + + private const string storageNormalUser = "normalstorage"; + + [ClassInitialize] + public static void ClassInit(TestContext context) + { + if (defaultAzureSubscription.Equals(null)) + { + Assert.Inconclusive("No Subscription is selected!"); + } + } + + [TestInitialize] + public void Initialize() + { + vhdName = Utilities.GetUniqueShortName(vhdNamePrefix); + image = Utilities.GetUniqueShortName(imageNamePrefix); + + vhdBlobLocation = string.Format("{0}{1}/{2}", blobUrlRoot, vhdContainerName, vhdName); + + try + { + if (string.IsNullOrEmpty(localFile)) + { + CredentialHelper.CopyTestData(testDataContainer, osVhdName, vhdContainerName, vhdName); + } + else + { + vmPowershellCmdlets.AddAzureVhd(new FileInfo(localFile), vhdBlobLocation); + } + } + catch (Exception e) + { + if (e.ToString().Contains("already exists") || e.ToString().Contains("currently a lease")) + { + // Use the already uploaded vhd. + Console.WriteLine("Using already uploaded blob.."); + } + else + { + Console.WriteLine(e.ToString()); + Assert.Inconclusive("Upload vhd is not set!"); + } + } + + try + { + vmPowershellCmdlets.AddAzureVMImage(image, vhdBlobLocation, OS.Windows); + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + + pass = false; + testStartTime = DateTime.Now; + } + + /// + /// This test covers Get-AzurePlatformVMImage, Set-AzurePlatformVMImage and Remove-AzurePlatformVMImage cmdlets + /// + [TestMethod(), TestCategory("PIRTest"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Get,Set,Remove)-AzurePlatformVMImage)")] + public void AzurePlatformVMImageSingleLocationTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + // starting the test. + PrintOSImageDetailsContext(vmPowershellCmdlets.GetAzurePlatformVMImage(image)); + + // Replicate the user image to "West US" and wait until the replication process is completed. + vmPowershellCmdlets.SetAzurePlatformVMImageReplicate(image, new string[] { location1 }); + PrintOSImageDetailsContext(vmPowershellCmdlets.GetAzurePlatformVMImage(image)); + WaitForReplicationComplete(image); + + // Make the replicated image public and wait until the PIR image shows up. + vmPowershellCmdlets.SetAzurePlatformVMImagePublic(image); + OSImageContext pirImage = WaitForPIRAppear(image, publisher); + PrintOSImageDetailsContext(vmPowershellCmdlets.GetAzurePlatformVMImage(image)); + + // Check the locations of the PIR image. + string pirlocations = vmPowershellCmdlets.GetAzureVMImage(pirImage.ImageName)[0].Location; + Assert.IsTrue(pirlocations.Contains(location1)); + Assert.IsFalse(pirlocations.Contains(location2)); + Assert.IsFalse(pirlocations.Contains(location3)); + + // Switch to the normal User and check the PIR image. + SwitchToNormalUser(); + Assert.IsTrue(Utilities.CheckRemove(vmPowershellCmdlets.GetAzureVMImage, image)); + WaitForPIRAppear(image, publisher); + + // Switch to the publisher and make the PIR image private + SwitchToPublisher(); + vmPowershellCmdlets.SetAzurePlatformVMImagePrivate(image); + + // Switch to the normal User and wait until the PIR image disapper + SwitchToNormalUser(); + WaitForPIRDisappear(pirImage.ImageName); + + // Switch to the publisher and remove the PIR image. + SwitchToPublisher(); + vmPowershellCmdlets.RemoveAzurePlatformVMImage(image); + Assert.AreEqual(0, vmPowershellCmdlets.GetAzurePlatformVMImage(image).ReplicationProgress.Count); + PrintOSImageDetailsContext(vmPowershellCmdlets.GetAzurePlatformVMImage(image)); + + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + } + + /// + /// This test covers Get-AzurePlatformVMImage, Set-AzurePlatformVMImage and Remove-AzurePlatformVMImage cmdlets + /// + [TestMethod(), TestCategory("PIRTest"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Get,Set,Remove)-AzurePlatformVMImage)")] + public void AzurePlatformVMImageMultipleLocationsTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + // starting the test. + PrintOSImageDetailsContext(vmPowershellCmdlets.GetAzurePlatformVMImage(image)); + + // Replicate the user image to "West US" and wait until the replication process is completed. + vmPowershellCmdlets.SetAzurePlatformVMImageReplicate(image, new string[] { location1, location2 }); + PrintOSImageDetailsContext(vmPowershellCmdlets.GetAzurePlatformVMImage(image)); + WaitForReplicationComplete(image); + + // Make the replicated image public and wait until the PIR image shows up. + vmPowershellCmdlets.SetAzurePlatformVMImagePublic(image); + OSImageContext pirImage = WaitForPIRAppear(image, publisher); + PrintOSImageDetailsContext(vmPowershellCmdlets.GetAzurePlatformVMImage(image)); + + // Check the locations of the PIR image. + string pirlocations = vmPowershellCmdlets.GetAzureVMImage(pirImage.ImageName)[0].Location; + Assert.IsTrue(pirlocations.Contains(location1)); + Assert.IsTrue(pirlocations.Contains(location2)); + Assert.IsFalse(pirlocations.Contains(location3)); + + // Switch to the normal User and check the PIR image. + SwitchToNormalUser(); + Assert.IsTrue(Utilities.CheckRemove(vmPowershellCmdlets.GetAzureVMImage, image)); + WaitForPIRAppear(image, publisher); + + // Switch to the publisher and make the PIR image private + SwitchToPublisher(); + vmPowershellCmdlets.SetAzurePlatformVMImagePrivate(image); + + // Switch to the normal User and wait until the PIR image disapper + SwitchToNormalUser(); + WaitForPIRDisappear(pirImage.ImageName); + + // Switch to the publisher and remove the PIR image. + SwitchToPublisher(); + vmPowershellCmdlets.RemoveAzurePlatformVMImage(image); + Assert.AreEqual(0, vmPowershellCmdlets.GetAzurePlatformVMImage(image).ReplicationProgress.Count); + PrintOSImageDetailsContext(vmPowershellCmdlets.GetAzurePlatformVMImage(image)); + + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + } + + /// + /// This test covers Get-AzurePlatformVMImage, Set-AzurePlatformVMImage and Remove-AzurePlatformVMImage cmdlets + /// + [TestMethod(), TestCategory("PIRTest"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Get,Set,Remove)-AzurePlatformVMImage)")] + public void AzurePlatformVMImageScenarioTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + string vmName = Utilities.GetUniqueShortName("pirtestvm"); + string svcName = Utilities.GetUniqueShortName("pirtestservice"); + + try + { + SwitchToNormalUser(); + + try + { + vmPowershellCmdlets.GetAzureStorageAccount(storageNormalUser); + } + catch (Exception e) + { + if (e.ToString().Contains("ResourceNotFound")) + { + vmPowershellCmdlets.NewAzureStorageAccount(storageNormalUser, location1); + } + else + { + Console.WriteLine(e.ToString()); + throw; + } + } + vmPowershellCmdlets.SetAzureSubscription(normaluser, normaluserSubId, storageNormalUser); + + // Replicate the user image to "West US" and wait until the replication process is completed. + SwitchToPublisher(); + vmPowershellCmdlets.SetAzurePlatformVMImageReplicate(image, new string[] { location1 }); + + // Make the replicated image public and wait until the PIR image shows up. + vmPowershellCmdlets.SetAzurePlatformVMImagePublic(image); + OSImageContext pirImage = WaitForPIRAppear(image, publisher); + + // Switch to the normal User and check the PIR image. + SwitchToNormalUser(); + WaitForPIRAppear(image, publisher); + + // Create a VM using the PIR image + vmPowershellCmdlets.NewAzureQuickVM(OS.Windows, vmName, svcName, pirImage.ImageName, username, password, location1); + Console.WriteLine("VM, {0}, is successfully created using the uploaded PIR image", vmPowershellCmdlets.GetAzureVM(vmName, svcName).Name); + + // Remove the service and VM + vmPowershellCmdlets.RemoveAzureService(svcName); + + // Switch to the publisher and remove the PIR image + SwitchToPublisher(); + vmPowershellCmdlets.RemoveAzurePlatformVMImage(image); + + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + } + + [TestCleanup] + public virtual void CleanUp() + { + SwitchToPublisher(); + Console.WriteLine("Test {0}", pass ? "passed" : "failed"); + + if ((cleanupIfPassed && pass) || (cleanupIfFailed && !pass)) + { + Console.WriteLine("Starting to clean up created VM and service."); + + try + { + vmPowershellCmdlets.RemoveAzureVMImage(image, false); + } + catch (Exception e) + { + Console.WriteLine("Exception occurs during cleanup: {0}", e.ToString()); + } + + try + { + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + } + } + } + + private void SwitchToPublisher() + { + vmPowershellCmdlets.SetDefaultAzureSubscription(publisher); + } + + private void SwitchToNormalUser() + { + vmPowershellCmdlets.SetDefaultAzureSubscription(normaluser); + } + + private void WaitForReplicationComplete(string imageName) + { + DateTime startTime = DateTime.Now; + OSImageDetailsContext state; + try + { + do + { + state = vmPowershellCmdlets.GetAzurePlatformVMImage(imageName); + foreach(var repro in state.ReplicationProgress) + { + Console.WriteLine(repro.ToString()); + } + } + while (!state.ReplicationProgress.TrueForAll((s) => (s.Progress.Equals("100")))); + + Console.WriteLine("Replication completed after {0} minutes.", (DateTime.Now - startTime).TotalMinutes); + PrintOSImageDetailsContext(state); + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + } + + private OSImageContext WaitForPIRAppear(string imageName, string publisherName, int waitTimeInMin = 1, int maxWaitTimeInMin = 30) + { + + DateTime startTime = DateTime.Now; + while (true) + { + Collection vmImages = vmPowershellCmdlets.GetAzureVMImage(); + foreach (OSImageContext image in vmImages) + { + if (Utilities.MatchKeywords(image.ImageName, new[]{imageName}, false) >= 0 && image.PublisherName.Equals(publisherName)) + { + Console.WriteLine("MATCHED PIR image found after {0} minutes:", (DateTime.Now - startTime).TotalMinutes); + PrintContext(image); + return image; + } + } + + if ((DateTime.Now - startTime).TotalMinutes < maxWaitTimeInMin) + { + Thread.Sleep(waitTimeInMin * 1000 * 60); + } + else + { + Assert.Fail("Cannot get PIR image, {0}, within {1} minutes!", imageName, maxWaitTimeInMin); + } + } + } + + private bool WaitForPIRDisappear(string imageName, int waitTimeInMin = 1, int maxWaitTimeInMin = 30) + { + + DateTime startTime = DateTime.Now; + while (true) + { + try + { + OSImageContext imageContext = vmPowershellCmdlets.GetAzureVMImage(imageName)[0]; + + if ((DateTime.Now - startTime).TotalMinutes < maxWaitTimeInMin) + { + Thread.Sleep(waitTimeInMin * 1000 * 60); + } + else + { + Assert.Fail("Still has image, {0}, after {1} minutes!", imageName, maxWaitTimeInMin); + } + } + catch (Exception e) + { + if (e.ToString().Contains("ResourceNotFound")) + { + Console.WriteLine("Image {0} disappered after {1} minutes.", imageName, (DateTime.Now - startTime).TotalMinutes); + return true; + } + else + { + Console.WriteLine(e.ToString()); + throw; + } + } + } + } + + private void PrintContext(T obj) + { + Type type = typeof(T); + + foreach (PropertyInfo property in type.GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly)) + { + string typeName = property.PropertyType.FullName; + if (typeName.Equals("System.String") || typeName.Equals("System.Int32") || typeName.Equals("System.Uri") || typeName.Contains("Nullable")) + { + Console.WriteLine("{0}: {1}", property.Name, property.GetValue(obj, null)); + } + } + } + + private void PrintOSImageDetailsContext(OSImageDetailsContext context) + { + PrintContext(context); + foreach (var repro in context.ReplicationProgress) + { + Console.WriteLine("ReplicationProgress: {0}", repro.ToString()); + } + if (context.ReplicationProgress.Count == 0) + { + Console.WriteLine("There is no replication!"); + } + + Console.WriteLine("IsCorrupted {0}", context.IsCorrupted); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/GetAzureDeploymentCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/GetAzureDeploymentCmdletInfo.cs new file mode 100644 index 000000000000..87ff821cbe19 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/GetAzureDeploymentCmdletInfo.cs @@ -0,0 +1,33 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PaasCmdletInfo +{ + public class GetAzureDeploymentCmdletInfo : CmdletsInfo + { + public GetAzureDeploymentCmdletInfo(string serviceName, string slot) + { + cmdletName = Utilities.GetAzureDeploymentCmdletName; + + cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + + if (slot != null) + { + cmdletParams.Add(new CmdletParam("Slot", slot)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/GetAzureDeploymentEventBySlotCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/GetAzureDeploymentEventBySlotCmdletInfo.cs new file mode 100644 index 000000000000..a60510354f2c --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/GetAzureDeploymentEventBySlotCmdletInfo.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; +using System; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PaasCmdletInfo +{ + public class GetAzureDeploymentEventBySlotCmdletInfo : CmdletsInfo + { + public GetAzureDeploymentEventBySlotCmdletInfo(string serviceName, string deploymentSlot, DateTime startTime, DateTime endTime) + { + cmdletName = Utilities.GetAzureDeploymentEventCmdletName; + + cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + if (!string.IsNullOrEmpty(deploymentSlot)) + { + cmdletParams.Add(new CmdletParam("Slot", deploymentSlot)); + } + cmdletParams.Add(new CmdletParam("StartTime", startTime)); + cmdletParams.Add(new CmdletParam("EndTime", endTime)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/GetAzureDeploymentEventCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/GetAzureDeploymentEventCmdletInfo.cs new file mode 100644 index 000000000000..8b7392939622 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/GetAzureDeploymentEventCmdletInfo.cs @@ -0,0 +1,32 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; +using System; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PaasCmdletInfo +{ + public class GetAzureDeploymentEventCmdletInfo : CmdletsInfo + { + public GetAzureDeploymentEventCmdletInfo(string serviceName, string deploymentName, DateTime startTime, DateTime endTime) + { + cmdletName = Utilities.GetAzureDeploymentEventCmdletName; + + cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + cmdletParams.Add(new CmdletParam("DeploymentName", deploymentName)); + cmdletParams.Add(new CmdletParam("StartTime", startTime)); + cmdletParams.Add(new CmdletParam("EndTime", endTime)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/GetAzureServiceAvailableExtensionCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/GetAzureServiceAvailableExtensionCmdletInfo.cs new file mode 100644 index 000000000000..9a6f509f3283 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/GetAzureServiceAvailableExtensionCmdletInfo.cs @@ -0,0 +1,44 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PaasCmdletInfo +{ + public class GetAzureServiceAvailableExtensionCmdletInfo : CmdletsInfo + { + public GetAzureServiceAvailableExtensionCmdletInfo(string extensionName, string providerNamespace, string version, bool allVersion) + { + + this.cmdletName = Utilities.GetAzureServiceAvailableExtensionCmdletName; + + if (!string.IsNullOrEmpty(extensionName)) + { + this.cmdletParams.Add(new CmdletParam("ExtensionName", extensionName)); + } + if (!string.IsNullOrEmpty(providerNamespace)) + { + this.cmdletParams.Add(new CmdletParam("ProviderNamespace", providerNamespace)); + } + if (!string.IsNullOrEmpty(version)) + { + this.cmdletParams.Add(new CmdletParam("Version", version)); + } + if (allVersion) + { + this.cmdletParams.Add(new CmdletParam("AllVersions")); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/GetAzureServiceDiagnosticsExtensionCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/GetAzureServiceDiagnosticsExtensionCmdletInfo.cs new file mode 100644 index 000000000000..03d6209cb21e --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/GetAzureServiceDiagnosticsExtensionCmdletInfo.cs @@ -0,0 +1,32 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PaasCmdletInfo +{ + public class GetAzureServiceDiagnosticsExtensionCmdletInfo : CmdletsInfo + { + public GetAzureServiceDiagnosticsExtensionCmdletInfo(string serviceName, string slot) + { + + this.cmdletName = Utilities.GetAzureServiceDiagnosticsExtensionCmdletName; + this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + if (!string.IsNullOrEmpty(slot)) + { + this.cmdletParams.Add(new CmdletParam("Slot", slot)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/GetAzureServiceDomainJoinExtensionCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/GetAzureServiceDomainJoinExtensionCmdletInfo.cs new file mode 100644 index 000000000000..c4a81b2c114b --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/GetAzureServiceDomainJoinExtensionCmdletInfo.cs @@ -0,0 +1,34 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PaasCmdletInfo +{ + public class GetAzureServiceDomainJoinExtensionCmdletInfo: CmdletsInfo + { + public GetAzureServiceDomainJoinExtensionCmdletInfo(string serviceName = null, string slot = null) + { + this.cmdletName = Utilities.GetAzureServiceDomainJoinExtension; + if (!string.IsNullOrEmpty(serviceName)) + { + this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + } + if (!string.IsNullOrEmpty(slot)) + { + this.cmdletParams.Add(new CmdletParam("Slot", slot)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/GetAzureServiceExtensionCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/GetAzureServiceExtensionCmdletInfo.cs new file mode 100644 index 000000000000..39f5f1d36efd --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/GetAzureServiceExtensionCmdletInfo.cs @@ -0,0 +1,39 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PaasCmdletInfo +{ + public class GetAzureServiceExtensionCmdletInfo : CmdletsInfo + { + public GetAzureServiceExtensionCmdletInfo(string serviceName, string slot, string extensionName, string providerNamespace) + { + this.cmdletName = Utilities.GetAzureServiceExtensionCmdletName; + this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + if (!string.IsNullOrEmpty(slot)) + { + this.cmdletParams.Add(new CmdletParam("Slot", slot)); + } + if (!string.IsNullOrEmpty(extensionName)) + { + this.cmdletParams.Add(new CmdletParam("ExtensionName", extensionName)); + } + if (!string.IsNullOrEmpty(providerNamespace)) + { + this.cmdletParams.Add(new CmdletParam("ProviderNamespace", providerNamespace)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/GetAzureServiceRemoteDesktopExtensionCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/GetAzureServiceRemoteDesktopExtensionCmdletInfo.cs new file mode 100644 index 000000000000..3c2eb9dfd7c5 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/GetAzureServiceRemoteDesktopExtensionCmdletInfo.cs @@ -0,0 +1,32 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PaasCmdletInfo +{ + public class GetAzureServiceRemoteDesktopExtensionCmdletInfo : CmdletsInfo + { + public GetAzureServiceRemoteDesktopExtensionCmdletInfo(string serviceName, string slot) + { + + this.cmdletName = Utilities.GetAzureServiceRemoteDesktopExtensionCmdletName; + this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + if (!string.IsNullOrEmpty(slot)) + { + this.cmdletParams.Add(new CmdletParam("Slot", slot)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/NewAzureDeploymentCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/NewAzureDeploymentCmdletInfo.cs new file mode 100644 index 000000000000..c6b15348e94d --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/NewAzureDeploymentCmdletInfo.cs @@ -0,0 +1,54 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PaasCmdletInfo +{ + public class NewAzureDeploymentCmdletInfo : CmdletsInfo + { + public NewAzureDeploymentCmdletInfo(string serviceName, string packagePath, string configName, string slot, + string label, string name, bool doNotStart, bool warning, ExtensionConfigurationInput config) + { + cmdletName = Utilities.NewAzureDeploymentCmdletName; + + cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + cmdletParams.Add(new CmdletParam("Package", packagePath)); + cmdletParams.Add(new CmdletParam("Configuration", configName)); + cmdletParams.Add(new CmdletParam("Slot", slot)); + + if (label != null) + { + cmdletParams.Add(new CmdletParam("Label", label)); + } + if (name != null) + { + cmdletParams.Add(new CmdletParam("Name", name)); + } + if (doNotStart) + { + cmdletParams.Add(new CmdletParam("DoNotStart")); + } + if (warning) + { + cmdletParams.Add(new CmdletParam("TreatWarningsAsError")); + } + if (config != null) + { + cmdletParams.Add(new CmdletParam("ExtensionConfiguration", config)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/NewAzureServiceDiagnosticsExtensionConfigCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/NewAzureServiceDiagnosticsExtensionConfigCmdletInfo.cs new file mode 100644 index 000000000000..62b228d71b6e --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/NewAzureServiceDiagnosticsExtensionConfigCmdletInfo.cs @@ -0,0 +1,55 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Security.Cryptography.X509Certificates; +using System.Xml; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PaasCmdletInfo +{ + public class NewAzureServiceDiagnosticsExtensionConfigCmdletInfo : CmdletsInfo + { + + public NewAzureServiceDiagnosticsExtensionConfigCmdletInfo(string storage, XmlDocument config, string[] roles) + { + this.cmdletName = Utilities.NewAzureServiceDiagnosticsExtensionConfigCmdletName; + + this.cmdletParams.Add(new CmdletParam("StorageAccountName", storage)); + if (roles != null) + { + this.cmdletParams.Add(new CmdletParam("Role", roles)); + } + if (config != null) + { + this.cmdletParams.Add(new CmdletParam("DiagnosticsConfiguration", config)); + } + } + + public NewAzureServiceDiagnosticsExtensionConfigCmdletInfo(string storage, X509Certificate2 cert, XmlDocument config, string[] roles) + : this(storage, config, roles) + { + this.cmdletParams.Add(new CmdletParam("X509Certificate", cert)); + } + + public NewAzureServiceDiagnosticsExtensionConfigCmdletInfo(string storage, string thumbprint, string algorithm, XmlDocument config, string[] roles) + : this(storage, config, roles) + { + this.cmdletParams.Add(new CmdletParam("CertificateThumbprint", thumbprint)); + if (!string.IsNullOrEmpty(algorithm)) + { + this.cmdletParams.Add(new CmdletParam("ThumbprintAlgorithm", algorithm)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/NewAzureServiceDomainJoinExtensionConfigCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/NewAzureServiceDomainJoinExtensionConfigCmdletInfo.cs new file mode 100644 index 000000000000..c4288f6432ae --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/NewAzureServiceDomainJoinExtensionConfigCmdletInfo.cs @@ -0,0 +1,150 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using System.Security.Cryptography.X509Certificates; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PaasCmdletInfo +{ + public class NewAzureServiceDomainJoinExtensionConfigCmdletInfo: CmdletsInfo + { + private NewAzureServiceDomainJoinExtensionConfigCmdletInfo(string[] role, string thumbprintAlgorithm, bool restart, PSCredential credential, string version) + { + this.cmdletName = Utilities.NewAzureServiceDomainJoinExtensionConfig; + + if(role != null) + { + this.cmdletParams.Add(new CmdletParam("Role", role)); + } + if(!string.IsNullOrEmpty(thumbprintAlgorithm)) + { + this.cmdletParams.Add(new CmdletParam("ThumbprintAlgorithm", thumbprintAlgorithm)); + } + if (restart) + { + this.cmdletParams.Add(new CmdletParam("Restart")); + } + if (credential != null) + { + this.cmdletParams.Add(new CmdletParam("Credential", credential)); + } + } + + // WorkgroupParameterSet + public NewAzureServiceDomainJoinExtensionConfigCmdletInfo + (string workGroupName, X509Certificate2 certificate,string[] role, string thumbprintAlgorithm, bool restart, PSCredential credential, string version) + : this(role, thumbprintAlgorithm, restart, credential, version) + { + this.cmdletParams.Add(new CmdletParam("WorkGroupName", workGroupName)); + if (certificate != null) + { + this.cmdletParams.Add(new CmdletParam("X509Certificate", certificate)); + } + } + + // WorkgroupThumbprintParameterSet + public NewAzureServiceDomainJoinExtensionConfigCmdletInfo + (string workGroupName, string certificateThumbprint, string[] role, string thumbprintAlgorithm, bool restart, PSCredential credential, string version) + : this(role, thumbprintAlgorithm, restart, credential, version) + { + this.cmdletParams.Add(new CmdletParam("WorkGroupName", workGroupName)); + if (!string.IsNullOrEmpty(certificateThumbprint)) + { + this.cmdletParams.Add(new CmdletParam("CertificateThumbprint", certificateThumbprint)); + } + } + + private NewAzureServiceDomainJoinExtensionConfigCmdletInfo + (string domainName, string oUPath, PSCredential unjoinDomainCredential, + string[] role, string thumbprintAlgorithm, bool restart, PSCredential credential, string version) + : this(role, thumbprintAlgorithm, restart, credential, version) + { + this.cmdletParams.Add(new CmdletParam("DomainName", domainName)); + if (!string.IsNullOrEmpty(oUPath)) + { + this.cmdletParams.Add(new CmdletParam("OUPath", oUPath)); + } + if (unjoinDomainCredential != null) + { + this.cmdletParams.Add(new CmdletParam("UnjoinDomainCredential", unjoinDomainCredential)); + } + } + + private NewAzureServiceDomainJoinExtensionConfigCmdletInfo(string domainName, JoinOptions? options, string oUPath, PSCredential unjoinDomainCredential, + string[] role, string thumbprintAlgorithm, bool restart, PSCredential credential, string version) + : this(domainName, oUPath, unjoinDomainCredential, role, thumbprintAlgorithm, restart, credential, version) + { + if (options.HasValue) + { + this.cmdletParams.Add(new CmdletParam("Options", options.Value)); + } + } + + private NewAzureServiceDomainJoinExtensionConfigCmdletInfo(string domainName, uint? joinOption, string oUPath, PSCredential unjoinDomainCredential, + string[] role, string thumbprintAlgorithm, bool restart, PSCredential credential, string version) + : this(domainName, oUPath, unjoinDomainCredential, role, thumbprintAlgorithm, restart, credential, version) + { + if (joinOption.HasValue) + { + this.cmdletParams.Add(new CmdletParam("JoinOption", joinOption.Value)); + } + } + + // DomainParameterSet + public NewAzureServiceDomainJoinExtensionConfigCmdletInfo(string domainName,X509Certificate2 x509Certificate,JoinOptions? options, string oUPath, PSCredential unjoinDomainCredential, + string[] role, string thumbprintAlgorithm, bool restart, PSCredential credential, string version) + : this(domainName, options, oUPath, unjoinDomainCredential, role, thumbprintAlgorithm, restart, credential, version) + { + if (x509Certificate != null) + { + this.cmdletParams.Add(new CmdletParam("X509Certificate", x509Certificate)); + } + } + + // DomainJoinOptionParameterSet + public NewAzureServiceDomainJoinExtensionConfigCmdletInfo(string domainName, X509Certificate2 x509Certificate, uint? joinOption, string oUPath, PSCredential unjoinDomainCredential, + string[] role, string thumbprintAlgorithm, bool restart, PSCredential credential, string version) + : this(domainName, joinOption, oUPath, unjoinDomainCredential, role, thumbprintAlgorithm, restart, credential, version) + { + if (x509Certificate != null) + { + this.cmdletParams.Add(new CmdletParam("X509Certificate", x509Certificate)); + } + } + + // DomainThumbprintParameterSet + public NewAzureServiceDomainJoinExtensionConfigCmdletInfo(string domainName, string certificateThumbprint, JoinOptions? options, string oUPath, PSCredential unjoinDomainCredential, + string[] role, string thumbprintAlgorithm, bool restart, PSCredential credential, string version) + : this(domainName, options, oUPath, unjoinDomainCredential, role, thumbprintAlgorithm, restart, credential, version) + { + if (!string.IsNullOrEmpty(certificateThumbprint)) + { + this.cmdletParams.Add(new CmdletParam("CertificateThumbprint", certificateThumbprint)); + } + } + + // DomainJoinOptionThumbprintParameterSet + public NewAzureServiceDomainJoinExtensionConfigCmdletInfo(string domainName, string certificateThumbprint, uint? joinOption, string oUPath, PSCredential unjoinDomainCredential, + string[] role, string thumbprintAlgorithm, bool restart, PSCredential credential, string version) + : this(domainName, joinOption, oUPath, unjoinDomainCredential, role, thumbprintAlgorithm, restart, credential, version) + { + if (!string.IsNullOrEmpty(certificateThumbprint)) + { + this.cmdletParams.Add(new CmdletParam("CertificateThumbprint", certificateThumbprint)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/NewAzureServiceExtensionConfigCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/NewAzureServiceExtensionConfigCmdletInfo.cs new file mode 100644 index 000000000000..a677b63574a3 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/NewAzureServiceExtensionConfigCmdletInfo.cs @@ -0,0 +1,59 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Security.Cryptography.X509Certificates; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PaasCmdletInfo +{ + public class NewAzureServiceExtensionConfigCmdletInfo : CmdletsInfo + { + public NewAzureServiceExtensionConfigCmdletInfo(string[] roles, string extensionName, string providerNamespace, + string publicConfig, string privateConfig, string version) + { + this.cmdletName = Utilities.NewAzureServiceExtensionConfigCmdletName; + if (roles != null) + { + this.cmdletParams.Add(new CmdletParam("Role", roles)); + } + this.cmdletParams.Add(new CmdletParam("ExtensionName", extensionName)); + this.cmdletParams.Add(new CmdletParam("ProviderNamespace", providerNamespace)); + this.cmdletParams.Add(new CmdletParam("PublicConfiguration", publicConfig)); + this.cmdletParams.Add(new CmdletParam("PrivateConfiguration", privateConfig)); + this.cmdletParams.Add(new CmdletParam("Version", version)); + } + + public NewAzureServiceExtensionConfigCmdletInfo(X509Certificate2 cert, string algorithm, string[] roles, + string extensionName, string providerNamespace, string publicConfig, string privateConfig, string version) + : this(roles, extensionName, providerNamespace, publicConfig, privateConfig, version) + { + this.cmdletParams.Add(new CmdletParam("X509Certificate", cert)); + if (!string.IsNullOrEmpty(algorithm)) + { + this.cmdletParams.Add(new CmdletParam("ThumbprintAlgorithm", algorithm)); + } + } + + public NewAzureServiceExtensionConfigCmdletInfo(string thumbprint, string algorithm, string[] roles, + string extensionName, string providerNamespace, string publicConfig, string privateConfig, string version) + : this(roles, extensionName, providerNamespace, publicConfig, privateConfig, version) + { + this.cmdletParams.Add(new CmdletParam("CertificateThumbprint", thumbprint)); + if (!string.IsNullOrEmpty(algorithm)) + { + this.cmdletParams.Add(new CmdletParam("ThumbprintAlgorithm", algorithm)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/NewAzureServiceRemoteDesktopExtensionConfigCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/NewAzureServiceRemoteDesktopExtensionConfigCmdletInfo.cs new file mode 100644 index 000000000000..e04ccc183dec --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/NewAzureServiceRemoteDesktopExtensionConfigCmdletInfo.cs @@ -0,0 +1,65 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Security.Cryptography.X509Certificates; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PaasCmdletInfo +{ + public class NewAzureServiceRemoteDesktopExtensionConfigCmdletInfo : CmdletsInfo + { + + public NewAzureServiceRemoteDesktopExtensionConfigCmdletInfo(PSCredential credential, DateTime? expiration, string[] roles, string version) + { + this.cmdletName = Utilities.NewAzureServiceRemoteDesktopExtensionConfigCmdletName; + this.cmdletParams.Add(new CmdletParam("Credential", credential)); + if (roles != null) + { + this.cmdletParams.Add(new CmdletParam("Role", roles)); + } + if (expiration != null) + { + this.cmdletParams.Add(new CmdletParam("Expiration", expiration)); + } + if (! string.IsNullOrEmpty(version)) + { + this.cmdletParams.Add(new CmdletParam("Version", version)); + } + } + + public NewAzureServiceRemoteDesktopExtensionConfigCmdletInfo + (PSCredential credential, X509Certificate2 cert, string algorithm, DateTime? expiration, string[] roles, string version) + : this(credential, expiration, roles, version) + { + this.cmdletParams.Add(new CmdletParam("X509Certificate", cert)); + if (!string.IsNullOrEmpty(algorithm)) + { + this.cmdletParams.Add(new CmdletParam("ThumbprintAlgorithm", algorithm)); + } + } + + public NewAzureServiceRemoteDesktopExtensionConfigCmdletInfo + (PSCredential credential, string thumbprint, string algorithm, DateTime? expiration, string[] roles, string version) + : this(credential, expiration, roles, version) + { + this.cmdletParams.Add(new CmdletParam("CertificateThumbprint", thumbprint)); + if (!string.IsNullOrEmpty(algorithm)) + { + this.cmdletParams.Add(new CmdletParam("ThumbprintAlgorithm", algorithm)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/ReSetAzureRoleInstanceCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/ReSetAzureRoleInstanceCmdletInfo.cs new file mode 100644 index 000000000000..8f0eaf3be939 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/ReSetAzureRoleInstanceCmdletInfo.cs @@ -0,0 +1,33 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PaasCmdletInfo +{ + public class ResetAzureRoleInstanceCmdletInfo : CmdletsInfo + { + public ResetAzureRoleInstanceCmdletInfo(string serviceName, string instanceName, string slot, bool reboot = false, bool reimage = false) + { + cmdletName = Utilities.ResetAzureRoleInstanceCmdletName; + cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + cmdletParams.Add(new CmdletParam("InstanceName", instanceName)); + cmdletParams.Add(new CmdletParam("Slot", slot)); + if (reboot) + cmdletParams.Add(new CmdletParam("Reboot")); + if (reimage) + cmdletParams.Add(new CmdletParam("Reimage")); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/RemoveAzureDeploymentCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/RemoveAzureDeploymentCmdletInfo.cs new file mode 100644 index 000000000000..e9e76336eb6b --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/RemoveAzureDeploymentCmdletInfo.cs @@ -0,0 +1,36 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PaasCmdletInfo +{ + public class RemoveAzureDeploymentCmdletInfo : CmdletsInfo + { + public RemoveAzureDeploymentCmdletInfo(string serviceName, string slot, bool force) + { + cmdletName = Utilities.RemoveAzureDeploymentCmdletName; + + cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + if (slot != null) + { + cmdletParams.Add(new CmdletParam("Slot", slot)); + } + if (force) + { + cmdletParams.Add(new CmdletParam("Force")); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/RemoveAzureServiceDiagnosticsExtensionCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/RemoveAzureServiceDiagnosticsExtensionCmdletInfo.cs new file mode 100644 index 000000000000..fcc6a27eb763 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/RemoveAzureServiceDiagnosticsExtensionCmdletInfo.cs @@ -0,0 +1,41 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PaasCmdletInfo +{ + public class RemoveAzureServiceDiagnosticsExtensionCmdletInfo : CmdletsInfo + { + + public RemoveAzureServiceDiagnosticsExtensionCmdletInfo(string serviceName, bool uninstall, string[] roles, string slot) + { + + this.cmdletName = Utilities.RemoveAzureServiceDiagnosticsExtensionCmdletName; + this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + if (!string.IsNullOrEmpty(slot)) + { + this.cmdletParams.Add(new CmdletParam("Slot", slot)); + } + if (roles != null) + { + this.cmdletParams.Add(new CmdletParam("Role", roles)); + } + if (uninstall) + { + this.cmdletParams.Add(new CmdletParam("UninstallConfiguration")); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/RemoveAzureServiceDomainJoinExtensionCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/RemoveAzureServiceDomainJoinExtensionCmdletInfo.cs new file mode 100644 index 000000000000..6cc839cb9864 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/RemoveAzureServiceDomainJoinExtensionCmdletInfo.cs @@ -0,0 +1,42 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PaasCmdletInfo +{ + public class RemoveAzureServiceDomainJoinExtensionCmdletInfo:CmdletsInfo + { + public RemoveAzureServiceDomainJoinExtensionCmdletInfo(string serviceName, string slot, string[] role, bool uninstallConfiguration) + { + this.cmdletName = Utilities.RemoveAzureServiceDomainJoinExtension; + if(!string.IsNullOrEmpty(serviceName)) + { + this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + } + if(!string.IsNullOrEmpty(slot)) + { + this.cmdletParams.Add(new CmdletParam("Slot", slot)); + } + if(role != null) + { + this.cmdletParams.Add(new CmdletParam("Role", role)); + } + if(uninstallConfiguration) + { + this.cmdletParams.Add(new CmdletParam("UninstallConfiguration")); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/RemoveAzureServiceExtensionCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/RemoveAzureServiceExtensionCmdletInfo.cs new file mode 100644 index 000000000000..6fcc79396316 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/RemoveAzureServiceExtensionCmdletInfo.cs @@ -0,0 +1,42 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PaasCmdletInfo +{ + public class RemoveAzureServiceExtensionCmdletInfo : CmdletsInfo + { + public RemoveAzureServiceExtensionCmdletInfo(string serviceName, bool uninstall, string[] roles, string slot, + string extensionName, string providerNamespace) + { + this.cmdletName = Utilities.RemoveAzureServiceExtensionCmdletName; + this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + if (!string.IsNullOrEmpty(slot)) + { + this.cmdletParams.Add(new CmdletParam("Slot", slot)); + } + if (roles != null) + { + this.cmdletParams.Add(new CmdletParam("Role", roles)); + } + if (uninstall) + { + this.cmdletParams.Add(new CmdletParam("UninstallConfiguration")); + } + this.cmdletParams.Add(new CmdletParam("ExtensionName", extensionName)); + this.cmdletParams.Add(new CmdletParam("ProviderNamespace", providerNamespace)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/RemoveAzureServiceRemoteDesktopExtensionCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/RemoveAzureServiceRemoteDesktopExtensionCmdletInfo.cs new file mode 100644 index 000000000000..b784e2f07c46 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/RemoveAzureServiceRemoteDesktopExtensionCmdletInfo.cs @@ -0,0 +1,40 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PaasCmdletInfo +{ + public class RemoveAzureServiceRemoteDesktopExtensionCmdletInfo : CmdletsInfo + { + public RemoveAzureServiceRemoteDesktopExtensionCmdletInfo(string serviceName, bool uninstall, string[] roles, string slot) + { + + this.cmdletName = Utilities.RemoveAzureServiceRemoteDesktopExtensionCmdletName; + this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + if (!string.IsNullOrEmpty(slot)) + { + this.cmdletParams.Add(new CmdletParam("Slot", slot)); + } + if (roles != null) + { + this.cmdletParams.Add(new CmdletParam("Role", roles)); + } + if (uninstall) + { + this.cmdletParams.Add(new CmdletParam("UninstallConfiguration")); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/SetAzureServiceDiagnosticsExtensionCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/SetAzureServiceDiagnosticsExtensionCmdletInfo.cs new file mode 100644 index 000000000000..0a478fab976e --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/SetAzureServiceDiagnosticsExtensionCmdletInfo.cs @@ -0,0 +1,54 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Security.Cryptography.X509Certificates; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PaasCmdletInfo +{ + public class SetAzureServiceDiagnosticsExtensionCmdletInfo : CmdletsInfo + { + + public SetAzureServiceDiagnosticsExtensionCmdletInfo(string service, string storage, string config, string[] roles, string slot) + { + this.cmdletName = Utilities.SetAzureServiceDiagnosticsExtensionCmdletName; + this.cmdletParams.Add(new CmdletParam("ServiceName", service)); + this.cmdletParams.Add(new CmdletParam("StorageAccountName", storage)); + if (roles != null) + { + this.cmdletParams.Add(new CmdletParam("Role", roles)); + } + if (config != null) + { + this.cmdletParams.Add(new CmdletParam("DiagnosticsConfigurationPath", config)); + } + } + + public SetAzureServiceDiagnosticsExtensionCmdletInfo(string service, string storage, X509Certificate2 cert, string config, string[] roles, string slot) + : this(service, storage, config, roles, slot) + { + this.cmdletParams.Add(new CmdletParam("X509Certificate", cert)); + } + + public SetAzureServiceDiagnosticsExtensionCmdletInfo(string service, string storage, string thumbprint, string algorithm, string config, string[] roles, string slot) + : this(service, storage, config, roles, slot) + { + this.cmdletParams.Add(new CmdletParam("CertificateThumbprint", thumbprint)); + if (!string.IsNullOrEmpty(algorithm)) + { + this.cmdletParams.Add(new CmdletParam("ThumbprintAlgorithm", algorithm)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/SetAzureServiceDomainJoinExtensionCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/SetAzureServiceDomainJoinExtensionCmdletInfo.cs new file mode 100644 index 000000000000..b77b8916b5ce --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/SetAzureServiceDomainJoinExtensionCmdletInfo.cs @@ -0,0 +1,240 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using System.Security.Cryptography.X509Certificates; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PaasCmdletInfo +{ + public class SetAzureServiceDomainJoinExtensionCmdletInfo : CmdletsInfo + { + private enum DomainJoinExtensionParameterSetType + { + DomainName, + WorkgroupName + } + + //Constructor with parameters applicable to all ParameterSets + private SetAzureServiceDomainJoinExtensionCmdletInfo( + DomainJoinExtensionParameterSetType type, + string value, + string[] role, + string slot, + string serviceName, + string thumbprintAlgorithm, + bool restart, + PSCredential credential, + string version) + { + this.cmdletName = Utilities.SetAzureServiceDomainJoinExtension; + + this.cmdletParams.Add(new CmdletParam(type.ToString(), value)); + if (role != null) + { + this.cmdletParams.Add(new CmdletParam("Role", role)); + } + if (!string.IsNullOrEmpty(slot)) + { + this.cmdletParams.Add(new CmdletParam("Slot", slot)); + } + if (!string.IsNullOrEmpty(serviceName)) + { + this.cmdletParams.Add(new CmdletParam("ServiceName",serviceName)); + } + if (!string.IsNullOrEmpty(thumbprintAlgorithm)) + { + this.cmdletParams.Add(new CmdletParam("ThumbprintAlgorithm", thumbprintAlgorithm)); + } + if (restart) + { + this.cmdletParams.Add(new CmdletParam("Restart")); + } + if (credential != null) + { + this.cmdletParams.Add(new CmdletParam("Credential", credential)); + } + this.cmdletParams.Add(new CmdletParam("Version", version)); + } + + //constructors for each parameter set + + //BasicDomainParameterSet + private SetAzureServiceDomainJoinExtensionCmdletInfo( + string domainName, + PSCredential unjoinDomainCredential, + string[] role, + string slot, + string serviceName, + string thumbprintAlgorithm, + bool restart, + PSCredential credential, + string oUPath, + string version) + : this(DomainJoinExtensionParameterSetType.DomainName, domainName, role, slot, serviceName, thumbprintAlgorithm, restart, credential, version) + { + if (unjoinDomainCredential != null) + { + this.cmdletParams.Add(new CmdletParam("UnjoinDomainCredential", unjoinDomainCredential)); + } + if (!string.IsNullOrEmpty(oUPath)) + { + this.cmdletParams.Add(new CmdletParam("OUPath",oUPath)); + } + } + + //DomainJoinParameterSet with X509Certificate2 Certificate + public SetAzureServiceDomainJoinExtensionCmdletInfo( + string domainName, + X509Certificate2 x509Certificate, + JoinOptions? options, + PSCredential unjoinDomainCredential, + string[] role, + string slot, + string serviceName, + string thumbprintAlgorithm, + bool restart, + PSCredential credential, + string oUPath, + string version) + : this(domainName, unjoinDomainCredential, role, slot, serviceName, thumbprintAlgorithm, restart, credential, oUPath, version) + { + if (x509Certificate != null) + { + this.cmdletParams.Add(new CmdletParam("X509Certificate", x509Certificate)); + } + if (options.HasValue) + { + this.cmdletParams.Add(new CmdletParam("Options", options.Value)); + } + } + + //DomainJoinParameterSet with X509Certificate2 Certificate and Join Option number + public SetAzureServiceDomainJoinExtensionCmdletInfo( + string domainName, + X509Certificate2 x509Certificate, + uint? joinOption, + PSCredential unjoinDomainCredential, + string[] role, + string slot, + string serviceName, + string thumbprintAlgorithm, + bool restart, + PSCredential credential, + string oUPath, + string version) + : this(domainName, unjoinDomainCredential, role, slot, serviceName, thumbprintAlgorithm, restart, credential, oUPath, version) + { + if (x509Certificate != null) + { + this.cmdletParams.Add(new CmdletParam("X509Certificate", x509Certificate)); + } + if (joinOption.HasValue) + { + this.cmdletParams.Add(new CmdletParam("JoinOption", joinOption.Value)); + } + } + + //DomainJoinParameterSet with certificate thumbprint + public SetAzureServiceDomainJoinExtensionCmdletInfo( + string domainName, + string certificateThumbprint, + JoinOptions? options, + PSCredential unjoinDomainCredential, + string[] role, + string slot, + string serviceName, + string thumbprintAlgorithm, + bool restart, + PSCredential credential, + string oUPath, + string version) + : this(domainName, unjoinDomainCredential, role, slot, serviceName, thumbprintAlgorithm, restart, credential, oUPath, version) + { + if (!string.IsNullOrEmpty(certificateThumbprint)) + { + this.cmdletParams.Add(new CmdletParam("CertificateThumbprint", certificateThumbprint)); + } + if (options.HasValue) + { + this.cmdletParams.Add(new CmdletParam("Options", options.Value)); + } + } + + //DomainJoinParameterSet with certificate thumbprint and Join Option number + public SetAzureServiceDomainJoinExtensionCmdletInfo( + string domainName, + string certificateThumbprint, + uint? joinOption, + PSCredential unjoinDomainCredential, + string[] role, + string slot, + string serviceName, + string thumbprintAlgorithm, + bool restart, + PSCredential credential, + string oUPath, + string version) + : this(domainName, unjoinDomainCredential, role, slot, serviceName, thumbprintAlgorithm, restart, credential, oUPath, version) + { + if (!string.IsNullOrEmpty(certificateThumbprint)) + { + this.cmdletParams.Add(new CmdletParam("CertificateThumbprint", certificateThumbprint)); + } + if (joinOption.HasValue) + { + this.cmdletParams.Add(new CmdletParam("JoinOption", joinOption.Value)); + } + } + + // WorkgroupParameterSet + public SetAzureServiceDomainJoinExtensionCmdletInfo( + string workGroupName, + X509Certificate2 x509Certificate, + string[] role, + string slot, + string serviceName, + bool restart, + string thumbprintAlgorithm, + PSCredential credential, + string version) + : this(DomainJoinExtensionParameterSetType.WorkgroupName, workGroupName, role, slot, serviceName, thumbprintAlgorithm, restart, credential, version) + { + if (x509Certificate != null) + { + this.cmdletParams.Add(new CmdletParam("X509Certificate", x509Certificate)); + } + } + + // WorkgroupThumbprintParameterSet + public SetAzureServiceDomainJoinExtensionCmdletInfo( + string workGroupName, + string certificateThumbprint, + string[] role, + string slot, + string serviceName, + string thumbprintAlgorithm, + bool restart, + PSCredential credential, + string version) + : this(DomainJoinExtensionParameterSetType.WorkgroupName, workGroupName, role, slot, serviceName, thumbprintAlgorithm, restart, credential, version) + { + if (!string.IsNullOrEmpty(certificateThumbprint)) + { + this.cmdletParams.Add(new CmdletParam("CertificateThumbprint", certificateThumbprint)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/SetAzureServiceExtensionCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/SetAzureServiceExtensionCmdletInfo.cs new file mode 100644 index 000000000000..68f59cef063e --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/SetAzureServiceExtensionCmdletInfo.cs @@ -0,0 +1,64 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Security.Cryptography.X509Certificates; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PaasCmdletInfo +{ + public class SetAzureServiceExtensionCmdletInfo : CmdletsInfo + { + public SetAzureServiceExtensionCmdletInfo(string serviceName, string[] roles, string slot, string extensionName, + string providerNamespace, string publicConfig, string privateConfig, string version) + { + this.cmdletName = Utilities.SetAzureServiceExtensionCmdletName; + this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + if (!string.IsNullOrEmpty(slot)) + { + this.cmdletParams.Add(new CmdletParam("Slot", slot)); + } + if (roles != null) + { + this.cmdletParams.Add(new CmdletParam("Role", roles)); + } + this.cmdletParams.Add(new CmdletParam("ExtensionName", extensionName)); + this.cmdletParams.Add(new CmdletParam("ProviderNamespace", providerNamespace)); + this.cmdletParams.Add(new CmdletParam("PublicConfiguration", publicConfig)); + this.cmdletParams.Add(new CmdletParam("PrivateConfiguration", privateConfig)); + if (!string.IsNullOrEmpty(version)) + { + this.cmdletParams.Add(new CmdletParam("Version", version)); + } + } + + public SetAzureServiceExtensionCmdletInfo(string serviceName, X509Certificate2 cert, string[] roles, string slot, + string extensionName, string providerNamespace, string publicConfig, string privateConfig, string version) + : this(serviceName, roles, slot, extensionName, providerNamespace, publicConfig, privateConfig, version) + { + this.cmdletParams.Add(new CmdletParam("X509Certificate", cert)); + } + + public SetAzureServiceExtensionCmdletInfo(string serviceName, string thumbprint, string algorithm, + string[] roles, string slot, string extensionName, string providerNamespace, string publicConfig, + string privateConfig, string version) + : this(serviceName, roles, slot, extensionName, providerNamespace, publicConfig, privateConfig, version) + { + this.cmdletParams.Add(new CmdletParam("CertificateThumbprint", thumbprint)); + if (!string.IsNullOrEmpty(algorithm)) + { + this.cmdletParams.Add(new CmdletParam("ThumbprintAlgorithm", algorithm)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/SetAzureServiceRemoteDesktopExtensionCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/SetAzureServiceRemoteDesktopExtensionCmdletInfo.cs new file mode 100644 index 000000000000..d46aef0694af --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PaasCmdletInfo/SetAzureServiceRemoteDesktopExtensionCmdletInfo.cs @@ -0,0 +1,68 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Security.Cryptography.X509Certificates; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PaasCmdletInfo +{ + public class SetAzureServiceRemoteDesktopExtensionCmdletInfo : CmdletsInfo + { + + public SetAzureServiceRemoteDesktopExtensionCmdletInfo + (string serviceName, PSCredential credential, DateTime? expiration, string[] roles, string slot, string version) + { + + this.cmdletName = Utilities.SetAzureServiceRemoteDesktopExtensionCmdletName; + this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); + this.cmdletParams.Add(new CmdletParam("Credential", credential)); + if (expiration != null) + { + this.cmdletParams.Add(new CmdletParam("Expiration", expiration)); + } + if (!string.IsNullOrEmpty(slot)) + { + this.cmdletParams.Add(new CmdletParam("Slot", slot)); + } + if (roles != null) + { + this.cmdletParams.Add(new CmdletParam("Role", roles)); + } + if (!string.IsNullOrEmpty(version)) + { + this.cmdletParams.Add(new CmdletParam("Version", version)); + } + } + + public SetAzureServiceRemoteDesktopExtensionCmdletInfo + (string serviceName, PSCredential credential, X509Certificate2 cert, DateTime? expiration, string[] roles, string slot, string version) + : this(serviceName, credential, expiration, roles, slot, version) + { + this.cmdletParams.Add(new CmdletParam("X509Certificate", cert)); + } + + public SetAzureServiceRemoteDesktopExtensionCmdletInfo + (string serviceName, PSCredential credential, string thumbprint, string algorithm, DateTime? expiration, string[] roles, string slot, string version) + : this(serviceName, credential, expiration, roles, slot, version) + { + this.cmdletParams.Add(new CmdletParam("CertificateThumbprint", thumbprint)); + if (!string.IsNullOrEmpty(algorithm)) + { + this.cmdletParams.Add(new CmdletParam("ThumbprintAlgorithm", algorithm)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PowershellCore/AddAzureVhdTest.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PowershellCore/AddAzureVhdTest.cs new file mode 100644 index 000000000000..86ae9d7930ac --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PowershellCore/AddAzureVhdTest.cs @@ -0,0 +1,1115 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Management.ServiceManagement.Test.FunctionalTests +{ + using System; + using System.IO; + using System.Security.Cryptography; + using Microsoft.VisualStudio.TestTools.UnitTesting; + using Microsoft.WindowsAzure.Management.Model; + using Microsoft.WindowsAzure.Management.ServiceManagement.Model; + using Microsoft.WindowsAzure.Management.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo; + using Microsoft.WindowsAzure.Management.ServiceManagement.Test.Properties; + using Microsoft.WindowsAzure.Storage.Auth; + using Microsoft.WindowsAzure.Storage.Blob; + using Sync.Download; + + [TestClass] + public class AddAzureVhdTest + { + private ServiceManagementCmdletTestHelper vmPowershellCmdlets; + private WindowsAzureSubscription defaultAzureSubscription; + private StorageServiceKeyOperationContext storageAccountKey; + //private string destination; + //private string patchDestination; + //private string destinationSasUri; + //private string patchDestinationSasUri; + + private string perfFile; + + + private string blobUrlRoot; + private TestContext testContextInstance; + /// + ///Gets or sets the test context which provides + ///information about and functionality for the current test run. + /// + public TestContext TestContext + { + get + { + return testContextInstance; + } + set + { + testContextInstance = value; + } + } + + [TestInitialize] + public void Initialize() + { + vmPowershellCmdlets = new ServiceManagementCmdletTestHelper(); + vmPowershellCmdlets.ImportAzurePublishSettingsFile(); + defaultAzureSubscription = vmPowershellCmdlets.SetDefaultAzureSubscription(Resource.DefaultSubscriptionName); + Assert.AreEqual(Resource.DefaultSubscriptionName, defaultAzureSubscription.SubscriptionName); + storageAccountKey = vmPowershellCmdlets.GetAzureStorageAccountKey(defaultAzureSubscription.CurrentStorageAccountName); + Assert.AreEqual(defaultAzureSubscription.CurrentStorageAccountName, storageAccountKey.StorageAccountName); + + //destination = string.Format(@"http://{0}.blob.core.windows.net/vhdstore/{1}", defaultAzureSubscription.CurrentStorageAccountName, Utilities.GetUniqueShortName("PSTestAzureVhd")); + //patchDestination = string.Format(@"http://{0}.blob.core.windows.net/vhdstore/{1}", defaultAzureSubscription.CurrentStorageAccountName, Utilities.GetUniqueShortName("PSTestAzureVhd")); + + //destinationSasUri = string.Format(@"http://{0}.blob.core.windows.net/vhdstore/{1}", defaultAzureSubscription.CurrentStorageAccountName, Utilities.GetUniqueShortName("PSTestAzureVhd")); + //patchDestinationSasUri = string.Format(@"http://{0}.blob.core.windows.net/vhdstore/{1}", defaultAzureSubscription.CurrentStorageAccountName, Utilities.GetUniqueShortName("PSTestAzureVhd")); + //var destinationBlob = new CloudPageBlob(new Uri(destinationSasUri), new StorageCredentials(storageAccountKey.StorageAccountName, storageAccountKey.Primary)); + //var patchDestinationBlob = new CloudPageBlob(new Uri(patchDestinationSasUri), new StorageCredentials(storageAccountKey.StorageAccountName, storageAccountKey.Primary)); + //var policy = new SharedAccessBlobPolicy() + //{ + // Permissions = + // SharedAccessBlobPermissions.Delete | + // SharedAccessBlobPermissions.Read | + // SharedAccessBlobPermissions.Write | + // SharedAccessBlobPermissions.List, + // SharedAccessExpiryTime = DateTime.UtcNow + TimeSpan.FromHours(1) + //}; + //var destinationBlobToken = destinationBlob.GetSharedAccessSignature(policy); + //var patchDestinationBlobToken = patchDestinationBlob.GetSharedAccessSignature(policy); + //destinationSasUri += destinationBlobToken; + //patchDestinationSasUri += patchDestinationBlobToken; + + + blobUrlRoot = string.Format(@"http://{0}.blob.core.windows.net/", defaultAzureSubscription.CurrentStorageAccountName); + + perfFile = "perf.csv"; + } + + + /// + /// + /// + [TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", ".\\upload_VHD.csv", "upload_VHD#csv", DataAccessMethod.Sequential)] + public void UploadDisk() + { + string testName = "UploadDisk"; + DateTime testStartTime = DateTime.Now; + Console.WriteLine("{0} test starts at {1}.", testName, testStartTime); + + + + // Choose the vhd file from local machine + var vhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var vhdLocalPath = new FileInfo(@".\" + vhdName); + Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", vhdLocalPath); + + // Set the destination + string vhdBlobName = string.Format("vhdstore/{0}.vhd", Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName))); + string vhdDestUri = blobUrlRoot + vhdBlobName; + + // Start uploading... + Console.WriteLine("uploads {0} to {1}", vhdName, vhdBlobName); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(new AddAzureVhdCmdletInfo(vhdDestUri, vhdLocalPath.FullName)); + Console.WriteLine("uploading completed: {0}", vhdName); + + // Verify the upload. + AssertUploadContextAndContentMD5(vhdDestUri, vhdLocalPath, vhdUploadContext); + + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0} {1},{2}", testName, vhdName, (testEndTime - testStartTime).TotalSeconds) }); + } + + /// + /// + /// + [TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", ".\\upload_VHD.csv", "upload_VHD#csv", DataAccessMethod.Sequential)] + public void UploadDiskSasUri() + { + string testName = "UploadDiskSasUri"; + DateTime testStartTime = DateTime.Now; + Console.WriteLine("{0} test starts at {1}", testName, testStartTime); + + + // Choose the vhd file from local machine + var vhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var vhdLocalPath = new FileInfo(@".\" + vhdName); + Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", vhdLocalPath); + + int i = 0; + //while ( i = 0; i < 16; i++) + while (i < 16) + { + string destinationSasUri2 = CreateSasUriWithPermission(vhdName, i); + try + { + Console.WriteLine("uploads {0} to {1}", vhdName, destinationSasUri2); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(new AddAzureVhdCmdletInfo(destinationSasUri2, vhdLocalPath.FullName)); + Console.WriteLine("Finished uploading: {0}", destinationSasUri2); + + // Verify the upload. + AssertUploadContextAndContentMD5(destinationSasUri2, vhdLocalPath, vhdUploadContext); + Console.WriteLine("Test success with permission: {0}", i); + i++; + } + catch (Exception e) + { + if (e.ToString().Contains("already running")) + { + Console.WriteLine(e.InnerException.Message); + continue; + } + if (i != 3 && i != 7 && i != 11 && i != 15) + { + Console.WriteLine("Error as expected. Permission: {0}", i); + Console.WriteLine("Error message: {0}", e.InnerException.Message); + i++; + continue; + } + else + { + Assert.Fail("Test failed Permission: {0} \n {1}", i, e.ToString()); + } + } + } + + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0} {1},{2}", testName, vhdName, (testEndTime - testStartTime).TotalSeconds) }); + + } + + private string CreateSasUriWithPermission(string vhdName, int p) + { + // Set the destination + string vhdBlobName = string.Format("vhdstore/{0}.vhd", Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName))); + string vhdDestUri = blobUrlRoot + vhdBlobName; + + + var destinationBlob2 = new CloudPageBlob(new Uri(vhdDestUri), new StorageCredentials(storageAccountKey.StorageAccountName, storageAccountKey.Primary)); + var policy2 = new SharedAccessBlobPolicy() + { + Permissions = (SharedAccessBlobPermissions)p, + SharedAccessExpiryTime = DateTime.UtcNow + TimeSpan.FromHours(1) + }; + var destinationBlobToken2 = destinationBlob2.GetSharedAccessSignature(policy2); + vhdDestUri += destinationBlobToken2; + return vhdDestUri; + } + + + /// + /// + /// + [TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", ".\\overwrite_VHD.csv", "overwrite_VHD#csv", DataAccessMethod.Sequential)] + public void UploadDiskOverwrite() + { + string testName = "UploadDiskOverwrite"; + DateTime testStartTime = DateTime.Now; + Console.WriteLine("{0} test starts at {1}", testName, testStartTime); + + + // Choose the vhd file from local machine + var vhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var vhdLocalPath = new FileInfo(@".\" + vhdName); + Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", vhdLocalPath); + + // Set the destination + string vhdBlobName = string.Format("vhdstore/{0}.vhd", Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName))); + string vhdDestUri = blobUrlRoot + vhdBlobName; + + // Start uploading... + Console.WriteLine("uploads {0} to {1}", vhdName, vhdBlobName); + vmPowershellCmdlets.AddAzureVhd(new AddAzureVhdCmdletInfo(vhdDestUri, vhdLocalPath.FullName)); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(new AddAzureVhdCmdletInfo(vhdDestUri, vhdLocalPath.FullName, true)); + Console.WriteLine("uploading completed: {0}", vhdName); + + // Verify the upload. + AssertUploadContextAndContentMD5(vhdDestUri, vhdLocalPath, vhdUploadContext); + + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime-testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime-testStartTime).TotalSeconds) }); + + } + + + /// + /// + /// + [TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", ".\\overwrite_VHD.csv", "overwrite_VHD#csv", DataAccessMethod.Sequential)] + public void UploadDiskResume() + { + string testName = "UploadDiskResume"; + DateTime testStartTime = DateTime.Now; + Console.WriteLine("{0} test starts at {1}", testName, testStartTime); + + + // Choose the vhd file from local machine + var vhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var vhdLocalPath = new FileInfo(@".\" + vhdName); + Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", vhdLocalPath); + + // Set the destination + string vhdBlobName = string.Format("vhdstore/{0}.vhd", Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName))); + string vhdDestUri = blobUrlRoot + vhdBlobName; + + // Start uploading... + Console.WriteLine("uploads {0} to {1}", vhdName, vhdBlobName); + string result = vmPowershellCmdlets.AddAzureVhdStop(new AddAzureVhdCmdletInfo(vhdDestUri, vhdLocalPath.FullName), 500); + + if (result.ToLowerInvariant() == "stopped") + { + Console.WriteLine("successfully stopped"); + + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(new AddAzureVhdCmdletInfo(vhdDestUri, vhdLocalPath.FullName)); + Console.WriteLine("uploading completed: {0}", vhdName); + + // Verify the upload. + AssertUploadContextAndContentMD5(vhdDestUri, vhdLocalPath, vhdUploadContext); + } + else + { + Console.WriteLine("didn't stop!"); + } + + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + } + + + /// + /// + /// + [TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", ".\\overwrite_VHD.csv", "overwrite_VHD#csv", DataAccessMethod.Sequential)] + public void UploadDiskOverwriteSasUri() + { + string testName = "UploadDiskOverwriteSasUri"; + DateTime testStartTime = DateTime.Now; + Console.WriteLine("{0} test starts at {1}", testName, testStartTime); + + + // Choose the vhd file from local machine + var vhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var vhdLocalPath = new FileInfo(@".\" + vhdName); + Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", vhdLocalPath); + + int i = 0; + while (i < 16) + { + string destinationSasUri2 = CreateSasUriWithPermission(vhdName, i); + try + { + Console.WriteLine("uploads {0} to {1}", vhdName, destinationSasUri2); + vmPowershellCmdlets.AddAzureVhd(new AddAzureVhdCmdletInfo(destinationSasUri2, vhdLocalPath.FullName)); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(new AddAzureVhdCmdletInfo(destinationSasUri2, vhdLocalPath.FullName, true)); + Console.WriteLine("Finished uploading: {0}", destinationSasUri2); + + // Verify the upload. + AssertUploadContextAndContentMD5(destinationSasUri2, vhdLocalPath, vhdUploadContext); + Console.WriteLine("Test success with permission: {0}", i); + i++; + } + catch (Exception e) + { + if (e.ToString().Contains("already running")) + { + Console.WriteLine(e.InnerException.Message); + continue; + } + if (i != 7 && i != 15) + { + Console.WriteLine("Error as expected. Permission: {0}", i); + Console.WriteLine("Error message: {0}", e.InnerException.Message); + i++; + continue; + } + else + { + Assert.Fail("Test failed Permission: {0} \n {1}", i, e.ToString()); + } + } + } + + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + } + + /// + /// + /// + [TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", ".\\overwrite_VHD.csv", "overwrite_VHD#csv", DataAccessMethod.Sequential)] + public void UploadDiskOverwriteNonExist() + { + string testName = "UploadDiskOverwriteNonExist"; + DateTime testStartTime = DateTime.Now; + Console.WriteLine("{0} test starts at {1}", testName, testStartTime); + + + // Choose the vhd file from local machine + var vhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var vhdLocalPath = new FileInfo(@".\" + vhdName); + Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", vhdLocalPath); + + // Set the destination + string vhdBlobName = string.Format("vhdstore/{0}.vhd", Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName))); + string vhdDestUri = blobUrlRoot + vhdBlobName; + + // Start uploading... + Console.WriteLine("uploads {0} to {1}", vhdName, vhdBlobName); + //vmPowershellCmdlets.AddAzureVhd(new AddAzureVhdCmdletInfo(vhdDestUri, vhdLocalPath.FullName)); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(new AddAzureVhdCmdletInfo(vhdDestUri, vhdLocalPath.FullName, true)); + Console.WriteLine("uploading completed: {0}", vhdName); + + // Verify the upload. + AssertUploadContextAndContentMD5(vhdDestUri, vhdLocalPath, vhdUploadContext); + + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + + } + + + /// + /// + /// + [TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", ".\\overwrite_VHD.csv", "overwrite_VHD#csv", DataAccessMethod.Sequential)] + public void UploadDiskOverwriteNonExistSasUri() + { + string testName = "UploadDiskOverwriteNonExistSasUri"; + DateTime testStartTime = DateTime.Now; + Console.WriteLine("{0} test starts at {1}", testName, testStartTime); + + + // Choose the vhd file from local machine + var vhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var vhdLocalPath = new FileInfo(@".\" + vhdName); + Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", vhdLocalPath); + + int i = 0; + while (i < 16) + { + string destinationSasUri2 = CreateSasUriWithPermission(vhdName, i); + try + { + Console.WriteLine("uploads {0} to {1}", vhdName, destinationSasUri2); + //vmPowershellCmdlets.AddAzureVhd(new AddAzureVhdCmdletInfo(destinationSasUri2, vhdLocalPath.FullName)); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(new AddAzureVhdCmdletInfo(destinationSasUri2, vhdLocalPath.FullName, true)); + Console.WriteLine("Finished uploading: {0}", destinationSasUri2); + + // Verify the upload. + AssertUploadContextAndContentMD5(destinationSasUri2, vhdLocalPath, vhdUploadContext); + Console.WriteLine("Test success with permission: {0}", i); + i++; + } + catch (Exception e) + { + if (e.ToString().Contains("already running")) + { + Console.WriteLine(e.InnerException.Message); + continue; + } + if (i != 7 && i != 15) + { + Console.WriteLine("Error as expected. Permission: {0}", i); + Console.WriteLine("Error message: {0}", e.InnerException.Message); + i++; + continue; + } + else + { + Assert.Fail("Test failed Permission: {0} \n {1}", i, e.ToString()); + } + } + } + + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + } + + + /// + /// + /// + [TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", ".\\overwrite_VHD.csv", "overwrite_VHD#csv", DataAccessMethod.Sequential)] + public void UploadDiskSecondWithoutOverwrite() + { + string testName = "UploadDiskSecondWithoutOverwrite"; + DateTime testStartTime = DateTime.Now; + Console.WriteLine("{0} test starts at {1}", testName, testStartTime); + + + // Choose the vhd file from local machine + var vhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var vhdLocalPath = new FileInfo(@".\" + vhdName); + Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", vhdLocalPath); + + // Set the destination + string vhdBlobName = string.Format("vhdstore/{0}.vhd", Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName))); + string vhdDestUri = blobUrlRoot + vhdBlobName; + + // Start uploading... + Console.WriteLine("uploads {0} to {1}", vhdName, vhdBlobName); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(new AddAzureVhdCmdletInfo(vhdDestUri, vhdLocalPath.FullName)); + + try + { + Console.WriteLine("uploads {0} to {1} second times", vhdName, vhdBlobName); + vmPowershellCmdlets.AddAzureVhd(new AddAzureVhdCmdletInfo(vhdDestUri, vhdLocalPath.FullName)); + Assert.Fail("Must have failed! Test failed for: {0}", vhdLocalPath.FullName); + } + catch (Exception) + { + Console.WriteLine("Failed as expected while uploading {0} second time without overwrite", vhdLocalPath.Name); + } + + // Verify the upload. + AssertUploadContextAndContentMD5(vhdDestUri, vhdLocalPath, vhdUploadContext); + + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + } + + /// + /// + /// + [TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", ".\\overwrite_VHD.csv", "overwrite_VHD#csv", DataAccessMethod.Sequential)] + public void UploadDiskSecondWithoutOverwriteSasUri() + { + string testName = "UploadDiskSecondWithoutOverwriteSasUri"; + DateTime testStartTime = DateTime.Now; + Console.WriteLine("{0} test starts at {1}", testName, testStartTime); + + + // Choose the vhd file from local machine + var vhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var vhdLocalPath = new FileInfo(@".\" + vhdName); + Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", vhdLocalPath); + + //int i = 0; + for (int i = 0; i < 16; i++) + //while (i < 16) + { + string destinationSasUri2 = CreateSasUriWithPermission(vhdName, i); + try + { + Console.WriteLine("uploads {0} to {1}", vhdName, destinationSasUri2); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(new AddAzureVhdCmdletInfo(destinationSasUri2, vhdLocalPath.FullName)); + + try + { + Console.WriteLine("uploads {0} to {1} second times", vhdName, destinationSasUri2); + vmPowershellCmdlets.AddAzureVhd(new AddAzureVhdCmdletInfo(destinationSasUri2, vhdLocalPath.FullName)); + Assert.Fail("Must have failed! Test failed for: {0}", vhdLocalPath.FullName); + } + catch (Exception e) + { + Console.WriteLine("Failed as expected while uploading {0} second time without overwrite: {1}", vhdLocalPath.Name, e.InnerException.Message); + + } + + // Verify the upload. + AssertUploadContextAndContentMD5(destinationSasUri2, vhdLocalPath, vhdUploadContext); + Console.WriteLine("Test success with permission: {0}", i); + } + catch (Exception e) + { + if (i != 3 && i != 7 && i != 11 && i != 15) + { + Console.WriteLine("Error as expected. Permission: {0}", i); + Console.WriteLine("Error message: {0}", e.InnerException.Message); + continue; + } + else + { + Assert.Fail("Test failed. Permission: {0}", i); + } + } + } + + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + } + + + + /// + /// + /// + [TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", ".\\thread_VHD.csv", "thread_VHD#csv", DataAccessMethod.Sequential)] + public void UploadDiskThreadNumber() + { + string testName = "UploadDiskThreadNumber"; + DateTime testStartTime = DateTime.Now; + Console.WriteLine("{0} test starts at {1}", testName, testStartTime); + + + // Choose the vhd file from local machine + var vhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var vhdLocalPath = new FileInfo(@".\" + vhdName); + Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", vhdLocalPath); + + // Set the destination + string vhdBlobName = string.Format("vhdstore/{0}.vhd", Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName))); + string vhdDestUri = blobUrlRoot + vhdBlobName; + + // Start uploading... + Console.WriteLine("uploads {0} to {1}", vhdName, vhdBlobName); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(new AddAzureVhdCmdletInfo(vhdDestUri, vhdLocalPath.FullName, 16, false)); + Console.WriteLine("uploading completed: {0}", vhdName); + + // Verify the upload. + AssertUploadContextAndContentMD5(vhdDestUri, vhdLocalPath, vhdUploadContext); + + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + } + + /// + /// + /// + [TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", ".\\thread_VHD.csv", "thread_VHD#csv", DataAccessMethod.Sequential)] + public void UploadDiskThreadNumberSasUri() + { + string testName = "UploadDiskThreadNumberSasUri"; + DateTime testStartTime = DateTime.Now; + Console.WriteLine("{0} test starts at {1}", testName, testStartTime); + + + // Choose the vhd file from local machine + var vhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var vhdLocalPath = new FileInfo(@".\" + vhdName); + Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", vhdLocalPath); + + int i = 0; + //for (int i = 0; i < 16; i++) + while (i < 16) + { + string destinationSasUri2 = CreateSasUriWithPermission(vhdName, i); + try + { + Console.WriteLine("uploads {0} to {1}", vhdName, destinationSasUri2); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(new AddAzureVhdCmdletInfo(destinationSasUri2, vhdLocalPath.FullName, 16, false)); + Console.WriteLine("uploading completed: {0}", vhdName); + + // Verify the upload. + AssertUploadContextAndContentMD5(destinationSasUri2, vhdLocalPath, vhdUploadContext); + Console.WriteLine("Test success with permission: {0}", i); + i++; + } + catch (Exception e) + { + if (e.ToString().Contains("already running")) + { + Console.WriteLine(e.InnerException.Message); + continue; + } + if (i != 3 && i != 7 && i != 11 && i != 15) + { + Console.WriteLine("Error as expected. Permission: {0}", i); + Console.WriteLine("Error message: {0}", e.InnerException.Message); + i++; + continue; + } + else + { + Assert.Fail("Test failed Permission: {0} \n {1}", i, e.ToString()); + } + } + } + + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + } + + + /// + /// + /// + [TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", ".\\thread_VHD.csv", "thread_VHD#csv", DataAccessMethod.Sequential)] + public void UploadDiskThreadNumberOverwrite() + { + string testName = "UploadDiskThreadNumber"; + DateTime testStartTime = DateTime.Now; + Console.WriteLine("{0} test starts at {1}", testName, testStartTime); + + + // Choose the vhd file from local machine + var vhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var vhdLocalPath = new FileInfo(@".\" + vhdName); + Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", vhdLocalPath); + + // Set the destination + string vhdBlobName = string.Format("vhdstore/{0}.vhd", Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName))); + string vhdDestUri = blobUrlRoot + vhdBlobName; + + // Start uploading... + Console.WriteLine("uploads {0} to {1}", vhdName, vhdBlobName); + vmPowershellCmdlets.AddAzureVhd(new AddAzureVhdCmdletInfo(vhdDestUri, vhdLocalPath.FullName)); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(new AddAzureVhdCmdletInfo(vhdDestUri, vhdLocalPath.FullName, 16, true)); + Console.WriteLine("uploading completed: {0}", vhdName); + + // Verify the upload. + AssertUploadContextAndContentMD5(vhdDestUri, vhdLocalPath, vhdUploadContext); + + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + } + + /// + /// + /// + [TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", ".\\thread_VHD.csv", "thread_VHD#csv", DataAccessMethod.Sequential)] + public void UploadDiskThreadNumberOverwriteSasUri() + { + string testName = "UploadDiskThreadNumberSasUri"; + DateTime testStartTime = DateTime.Now; + Console.WriteLine("{0} test starts at {1}", testName, testStartTime); + + + // Choose the vhd file from local machine + var vhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var vhdLocalPath = new FileInfo(@".\" + vhdName); + Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", vhdLocalPath); + + for (int i = 0; i < 16; i++) + { + string destinationSasUri2 = CreateSasUriWithPermission(vhdName, i); + try + { + Console.WriteLine("uploads {0} to {1}", vhdName, destinationSasUri2); + vmPowershellCmdlets.AddAzureVhd(new AddAzureVhdCmdletInfo(destinationSasUri2, vhdLocalPath.FullName)); + Console.WriteLine("uploaded: {0}", vhdName); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(new AddAzureVhdCmdletInfo(destinationSasUri2, vhdLocalPath.FullName, 16, true)); + Console.WriteLine("uploading overwrite completed: {0}", vhdName); + + // Verify the upload. + AssertUploadContextAndContentMD5(destinationSasUri2, vhdLocalPath, vhdUploadContext); + Console.WriteLine("Test success with permission: {0}", i); + } + catch (Exception e) + { + if (i != 7 && i != 15) + { + Console.WriteLine("Error as expected. Permission: {0}", i); + Console.WriteLine("Error message: {0}", e.InnerException.Message); + continue; + } + else + { + Assert.Fail("Test failed Permission: {0} \n {1}", i, e.ToString()); + } + } + } + + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + } + + + /// + /// + /// + [TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", ".\\patch_VHD.csv", "patch_VHD#csv", DataAccessMethod.Sequential)] + public void PatchFirstLevelDifferencingDisk() + { + string testName = "PatchFirstLevelDifferencingDisk"; + DateTime testStartTime = DateTime.Now; + Console.WriteLine("{0} test starts at {1}", testName, testStartTime); + + + // Choose the vhd file from local machine + var vhdName = Convert.ToString(TestContext.DataRow["baseImage"]); + var vhdLocalPath = new FileInfo(@".\" + vhdName); + Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", vhdLocalPath); + + // Set the destination + string vhdBlobName = string.Format("vhdstore/{0}.vhd", Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName))); + string vhdDestUri = blobUrlRoot + vhdBlobName; + + // Start uploading... + Console.WriteLine("uploads {0} to {1}", vhdName, vhdBlobName); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(new AddAzureVhdCmdletInfo(vhdDestUri, vhdLocalPath.FullName, true)); + Console.WriteLine("uploading completed: {0}", vhdName); + + // Verify the upload. + AssertUploadContextAndContentMD5(vhdDestUri, vhdLocalPath, vhdUploadContext, false); + + + // Choose the vhd file from local machine + var childVhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var childVhdLocalPath = new FileInfo(@".\" + childVhdName); + Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", childVhdLocalPath); + + // Set the destination + string childVhdBlobName = string.Format("vhdstore/{0}.vhd", Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(childVhdName))); + string childVhdDestUri = blobUrlRoot + childVhdBlobName; + + // Start uploading the child vhd... + Console.WriteLine("uploads {0} to {1}", childVhdName, childVhdBlobName); + var patchVhdUploadContext = vmPowershellCmdlets.AddAzureVhd(new AddAzureVhdCmdletInfo(childVhdDestUri, childVhdLocalPath.FullName, vhdDestUri)); + Console.WriteLine("uploading completed: {0}", childVhdName); + + // Verify the upload + AssertUploadContextAndContentMD5(childVhdDestUri, childVhdLocalPath, patchVhdUploadContext); + + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + } + + /// + /// + /// + [TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", ".\\patch_VHD.csv", "patch_VHD#csv", DataAccessMethod.Sequential)] + public void PatchFirstLevelDifferencingDiskSasUri() + { + string testName = "PatchFirstLevelDifferencingDiskSasUri"; + DateTime testStartTime = DateTime.Now; + Console.WriteLine("{0} test starts at {1}", testName, testStartTime); + + + // Choose the base vhd file from local machine + var baseVhdName = Convert.ToString(TestContext.DataRow["baseImage"]); + var baseVhdLocalPath = new FileInfo(@".\" + baseVhdName); + Assert.IsTrue(File.Exists(baseVhdLocalPath.FullName), "VHD file not exist={0}", baseVhdLocalPath); + + // Choose the child vhd file from the local machine + + var childVhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var childVhdLocalPath = new FileInfo(@".\" + childVhdName); + Assert.IsTrue(File.Exists(childVhdLocalPath.FullName), "VHD file not exist={0}", childVhdLocalPath); + + for (int i = 0; i < 16; i++) + { + string destinationSasUri2 = CreateSasUriWithPermission(baseVhdName, i); + string destinationSasUri3 = CreateSasUriWithPermission(childVhdName, i); + try + { + Console.WriteLine("uploads {0} to {1}", baseVhdName, destinationSasUri2); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(new AddAzureVhdCmdletInfo(destinationSasUri2, baseVhdLocalPath.FullName, true)); + Console.WriteLine("uploading completed: {0}", baseVhdName); + + // Verify the upload. + AssertUploadContextAndContentMD5(destinationSasUri2, baseVhdLocalPath, vhdUploadContext, false); + + + Console.WriteLine("uploads {0} to {1}", childVhdName, destinationSasUri3); + var patchVhdUploadContext = vmPowershellCmdlets.AddAzureVhd(new AddAzureVhdCmdletInfo(destinationSasUri3, childVhdLocalPath.FullName, destinationSasUri2)); + Console.WriteLine("uploading completed: {0}", childVhdName); + + // Verify the upload. + AssertUploadContextAndContentMD5(destinationSasUri3, childVhdLocalPath, patchVhdUploadContext); + Console.WriteLine("Test success with permission: {0}", i); + } + catch (Exception e) + { + Console.WriteLine("Error as expected. Permission: {0}", i); + Console.WriteLine("Error message: {0}", e.InnerException.Message); + continue; + } + } + + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + } + + /// + /// + /// + [TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", ".\\patch_VHD.csv", "patch_VHD#csv", DataAccessMethod.Sequential)] + public void PatchSasUriNormalBaseShouldFail() + { + string testName = "PatchSasUriNormalBase"; + DateTime testStartTime = DateTime.Now; + Console.WriteLine("{0} test starts at {1}", testName, testStartTime); + + + // Choose the base vhd file from local machine + var baseVhdName = Convert.ToString(TestContext.DataRow["baseImage"]); + var baseVhdLocalPath = new FileInfo(@".\" + baseVhdName); + Assert.IsTrue(File.Exists(baseVhdLocalPath.FullName), "VHD file not exist={0}", baseVhdLocalPath); + + // Set the destination + string vhdBlobName = string.Format("vhdstore/{0}.vhd", Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(baseVhdName))); + string vhdDestUri = blobUrlRoot + vhdBlobName; + + Console.WriteLine("uploads {0} to {1}", baseVhdName, vhdDestUri); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(new AddAzureVhdCmdletInfo(vhdDestUri, baseVhdLocalPath.FullName, true)); + Console.WriteLine("uploading the parent vhd completed: {0}", baseVhdName); + + // Choose the child vhd file from the local machine + var childVhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var childVhdLocalPath = new FileInfo(@".\" + childVhdName); + Assert.IsTrue(File.Exists(childVhdLocalPath.FullName), "VHD file not exist={0}", childVhdLocalPath); + + for (int i = 0; i < 16; i++) + { + string destinationSasUriParent = CreateSasUriWithPermission(baseVhdName, i); + string destinationSasUriChild = CreateSasUriWithPermission(childVhdName, i); + try + { + Console.WriteLine("uploads {0} to {1} with patching from {2}", childVhdName, destinationSasUriChild, vhdDestUri); + var patchVhdUploadContext = vmPowershellCmdlets.AddAzureVhd(new AddAzureVhdCmdletInfo(destinationSasUriChild, childVhdLocalPath.FullName, vhdDestUri)); + Console.WriteLine("uploading the child vhd completed: {0}", childVhdName); + + // Verify the upload. + AssertUploadContextAndContentMD5(destinationSasUriChild, childVhdLocalPath, patchVhdUploadContext); + Console.WriteLine("Test success with permission: {0}", i); + } + catch (Exception e) + { + Console.WriteLine("Error as expected. Permission: {0}", i); + Console.WriteLine("Error message: {0}", e.InnerException.Message); + continue; + } + } + + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + } + + /// + /// + /// + [TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", ".\\patch_VHD.csv", "patch_VHD#csv", DataAccessMethod.Sequential)] + public void PatchNormalSasUriBase() + { + string testName = "PatchSasUriNormalBase"; + DateTime testStartTime = DateTime.Now; + Console.WriteLine("{0} test starts at {1}", testName, testStartTime); + + // Choose the base vhd file from local machine + var baseVhdName = Convert.ToString(TestContext.DataRow["baseImage"]); + var baseVhdLocalPath = new FileInfo(@".\" + baseVhdName); + Assert.IsTrue(File.Exists(baseVhdLocalPath.FullName), "VHD file not exist={0}", baseVhdLocalPath); + + // Choose the child vhd file from the local machine + var childVhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var childVhdLocalPath = new FileInfo(@".\" + childVhdName); + Assert.IsTrue(File.Exists(childVhdLocalPath.FullName), "VHD file not exist={0}", childVhdLocalPath); + + int i = 0; + while (i < 16) + { + string destinationSasUriParent = CreateSasUriWithPermission(baseVhdName, i); // the destination of the parent vhd is a Sas Uri + + // Set the destination of child vhd + string vhdBlobName = string.Format("vhdstore/{0}.vhd", Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(childVhdName))); + string vhdDestUri = blobUrlRoot + vhdBlobName; + + try + { + // Upload the parent vhd using Sas Uri + Console.WriteLine("uploads {0} to {1}", baseVhdName, destinationSasUriParent); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(new AddAzureVhdCmdletInfo(destinationSasUriParent, baseVhdLocalPath.FullName, true)); + Console.WriteLine("uploading completed: {0}", baseVhdName); + + // Verify the upload. + AssertUploadContextAndContentMD5(destinationSasUriParent, baseVhdLocalPath, vhdUploadContext, false); + + Console.WriteLine("uploads {0} to {1} with patching from {2}", childVhdName, vhdDestUri, destinationSasUriParent); + var patchVhdUploadContext = vmPowershellCmdlets.AddAzureVhd(new AddAzureVhdCmdletInfo(vhdDestUri, childVhdLocalPath.FullName, destinationSasUriParent)); + Console.WriteLine("uploading the child vhd completed: {0}", childVhdName); + + // Verify the upload. + AssertUploadContextAndContentMD5(vhdDestUri, childVhdLocalPath, patchVhdUploadContext); + Console.WriteLine("Test success with permission: {0}", i); + i++; + } + catch (Exception e) + { + if (i != 3 && i != 7 && i != 11 && i != 15) + { + Console.WriteLine("Error as expected. Permission: {0}", i); + Console.WriteLine("Error message: {0}", e.InnerException.Message); + i++; + continue; + } + else + { + Assert.Fail("Test failed Permission: {0} \n {1}", i, e.ToString()); + } + } + } + + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + } + + + [TestMethod(), TestCategory("Functional"), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Add-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", ".\\thread_VHD.csv", "thread_VHD#csv", DataAccessMethod.Sequential)] + public void WrongProtocolShouldFail() + { + string testName = "WrongProtocolShouldFail"; + DateTime testStartTime = DateTime.Now; + Console.WriteLine("{0} test starts at {1}", testName, testStartTime); + + + // Choose the vhd file from local machine + var vhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var vhdLocalPath = new FileInfo(@".\" + vhdName); + Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", vhdLocalPath); + + // Set the destination + string vhdBlobName = string.Format("vhdstore/{0}.vhd", Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName))); + string badUrlRoot = string.Format(@"badprotocolhttp://{0}.blob.core.windows.net/", defaultAzureSubscription.CurrentStorageAccountName); + string vhdDestUri = badUrlRoot + vhdBlobName; + + DateTime startTime = DateTime.Now; + try + { + // Start uploading... + Console.WriteLine("uploads {0} to {1}", vhdName, vhdBlobName); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(new AddAzureVhdCmdletInfo(vhdDestUri, vhdLocalPath.FullName)); + Console.WriteLine("uploading completed: {0}", vhdName); + Assert.Fail("Should have failed. {0} test failed.", testName); + + } + catch (Exception e) + { + TimeSpan duration = DateTime.Now - startTime; + Console.WriteLine("error message: {0}", e); + Console.WriteLine("{0} test passed after {1} seconds", testName, duration.Seconds); + + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + } + } + + + private void AssertUploadContextAndContentMD5(string destination, FileInfo localFile, VhdUploadContext vhdUploadContext, bool deleteBlob = true) + { + AssertUploadContext(destination, localFile, vhdUploadContext); + BlobUri blobPath; + Assert.IsTrue(BlobUri.TryParseUri(new Uri(destination), out blobPath)); + AssertContentMD5(blobPath.BlobPath, deleteBlob); + } + + private void AssertContentMD5(string destination, bool deleteBlob) + { + string downloadedFile = DownloadToFile(destination); + + var calculateMd5Hash = CalculateContentMd5(File.OpenRead(downloadedFile)); + + BlobUri blobUri2; + Assert.IsTrue(BlobUri.TryParseUri(new Uri(destination), out blobUri2)); + var blobHandle = new BlobHandle(blobUri2, storageAccountKey.Primary); + + Assert.AreEqual(calculateMd5Hash, blobHandle.Blob.Properties.ContentMD5); + + if (deleteBlob) + { + blobHandle.Blob.Delete(); + } + } + + private void AssertUploadContext(string destination, FileInfo localFile, VhdUploadContext vhdUploadContext) + { + Assert.IsNotNull(vhdUploadContext); + Assert.AreEqual(new Uri(destination), vhdUploadContext.DestinationUri); + Assert.AreEqual(vhdUploadContext.LocalFilePath.FullName, localFile.FullName); + } + + private string DownloadToFile(string destination) + { + BlobUri blobUri; + BlobUri.TryParseUri(new Uri(destination), out blobUri); + + var localFilePath = Path.Combine(Path.GetTempPath(), Path.GetTempFileName()); + var downloader = new Downloader(blobUri, storageAccountKey.Primary, localFilePath); + downloader.Download(); + return localFilePath; + } + + private static string CalculateContentMd5(Stream stream) + { + using (var md5 = MD5.Create()) + { + using (var bs = new BufferedStream(stream)) + { + var md5Hash = md5.ComputeHash(bs); + return Convert.ToBase64String(md5Hash); + } + } + } + + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PowershellCore/CmdletParam.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PowershellCore/CmdletParam.cs new file mode 100644 index 000000000000..707c624e93bb --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PowershellCore/CmdletParam.cs @@ -0,0 +1,60 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore +{ + public class CmdletParam + { + private readonly string cmdletParamName; + private readonly object cmdletParamValue; + private readonly bool cmdletIsSwitch; + + public string name + { + get + { + return cmdletParamName; + } + } + + public object value + { + get + { + return cmdletParamValue; + } + } + + public bool isSwitch + { + get + { + return cmdletIsSwitch; + } + } + + public CmdletParam(string name, object value) + { + cmdletParamName = name; + cmdletParamValue = value; + cmdletIsSwitch = false; + } + + public CmdletParam(string name) + { + cmdletParamName = name; + cmdletIsSwitch = true; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PowershellCore/CmdletsInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PowershellCore/CmdletsInfo.cs new file mode 100644 index 000000000000..2b0e759ea089 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PowershellCore/CmdletsInfo.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore +{ + public abstract class CmdletsInfo + { + protected string cmdletName; + protected List cmdletParams; + + public string name + { + get + { + return cmdletName; + } + } + + public List parameters + { + get + { + return cmdletParams; + } + } + + protected CmdletsInfo() + { + cmdletParams = new List(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PowershellCore/InvokeCommandCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PowershellCore/InvokeCommandCmdletInfo.cs new file mode 100644 index 000000000000..a07ec0c8afb3 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PowershellCore/InvokeCommandCmdletInfo.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore +{ + public class InvokeCommandCmdletInfo : CmdletsInfo + { + public InvokeCommandCmdletInfo(Uri connUri, PSCredential cred, ScriptBlock script) + { + cmdletName = "Invoke-Command"; + + cmdletParams = new List(); + + if (connUri != null) + { + cmdletParams.Add(new CmdletParam("ConnectionUri", connUri)); + } + + if (cred != null) + { + cmdletParams.Add(new CmdletParam("Credential", cred)); + } + + if (script != null) + { + cmdletParams.Add(new CmdletParam("ScriptBlock", script)); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PowershellCore/PowershellCmdlet.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PowershellCore/PowershellCmdlet.cs new file mode 100644 index 000000000000..e6e490e6b3d9 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PowershellCore/PowershellCmdlet.cs @@ -0,0 +1,140 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Management.Automation; +using System.Threading; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore +{ + public class PowershellCmdlet : PowershellEnvironment + { + private readonly CmdletsInfo cmdlet; + + public string Name + { + get + { + return cmdlet.name; + } + } + + public List Params + { + get + { + return cmdlet.parameters; + } + } + + public PowershellCmdlet(CmdletsInfo cmdlet, params PowershellModule[] modules) : base(modules) + { + this.cmdlet = cmdlet; + } + + public PowershellCmdlet(CmdletsInfo cmdlet) : base() + { + this.cmdlet = cmdlet; + } + + public override Collection Run(bool debug) + { + Collection result; + runspace.Open(); + using (var powershell = System.Management.Automation.PowerShell.Create()) + { + powershell.Runspace = runspace; + powershell.AddCommand(cmdlet.name); + if (cmdlet.parameters.Count > 0) + { + foreach (var cmdletparam in cmdlet.parameters) + { + if(cmdletparam.isSwitch) + { + powershell.AddParameter(cmdletparam.name); + } + else + { + powershell.AddParameter(cmdletparam.name, cmdletparam.value); + } + } + } + + if (debug) + { + powershell.AddParameter("Debug"); + } + + PrintPSCommand(powershell); + + result = powershell.Invoke(); + + if (debug) + { + Console.WriteLine(string.Join("", powershell.Streams.Debug)); + } + + if (powershell.Streams.Error.Count > 0) + { + runspace.Close(); + + var exceptions = powershell.Streams.Error.Select(error => error.Exception).ToList(); + throw new AggregateException(exceptions); + } + } + runspace.Close(); + + return result; + } + + public PSInvocationState RunAndStop(int ms) + { + PSInvocationState result = 0; + runspace.Open(); + using (var powershell = System.Management.Automation.PowerShell.Create()) + { + powershell.Runspace = runspace; + powershell.AddCommand(cmdlet.name); + if (cmdlet.parameters.Count > 0) + { + foreach (var cmdletparam in cmdlet.parameters) + { + if (cmdletparam.value == null) + { + powershell.AddParameter(cmdletparam.name); + } + else + { + powershell.AddParameter(cmdletparam.name, cmdletparam.value); + } + } + } + + PrintPSCommand(powershell); + + powershell.BeginInvoke(); + Thread.Sleep(ms); + powershell.Stop(); + + result = powershell.InvocationStateInfo.State; + } + runspace.Close(); + + return result; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PowershellCore/PowershellCmdletScript.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PowershellCore/PowershellCmdletScript.cs new file mode 100644 index 000000000000..2972134f308d --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PowershellCore/PowershellCmdletScript.cs @@ -0,0 +1,100 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Management.Automation; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore +{ + public class PowershellCmdletScript : PowershellEnvironment + { + private readonly List cmdlets; + + public PowershellCmdletScript(List cmdlet, params PowershellModule[] modules) : base(modules) + { + this.cmdlets = cmdlet; + } + + public PowershellCmdletScript(List cmdlet) : base() + { + this.cmdlets = cmdlet; + } + + public PowershellCmdletScript(PowershellModule[] modules) : base(modules) + { + this.cmdlets = new List(); + } + + public PowershellCmdletScript() : base() + { + this.cmdlets = new List(); + } + + + public void Add(string cmdlet) + { + this.cmdlets.Add(cmdlet); + } + public override Collection Run(bool debug) + { + Collection result = null; + runspace.Open(); + for (int i = 0; i < cmdlets.Count; i++) + { + + using (System.Management.Automation.PowerShell powershell = System.Management.Automation.PowerShell.Create()) + { + powershell.Runspace = runspace; + + if (!String.IsNullOrWhiteSpace(cmdlets[i])) + { + powershell.AddScript(cmdlets[i]); + } + + if (debug) + { + powershell.AddParameter("Debug"); + } + + PrintPSCommand(powershell); + + result = powershell.Invoke(); + + if (debug) + { + Console.WriteLine(string.Join("", powershell.Streams.Debug)); + } + + if (powershell.Streams.Error.Count > 0) + { + runspace.Close(); + + var exceptions = new List(); + foreach (ErrorRecord error in powershell.Streams.Error) + { + exceptions.Add(new Exception(error.Exception.Message)); + } + + throw new AggregateException(exceptions); + } + } + } + runspace.Close(); + + return result; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PowershellCore/PowershellCmdletSequence.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PowershellCore/PowershellCmdletSequence.cs new file mode 100644 index 000000000000..1a0739faac35 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PowershellCore/PowershellCmdletSequence.cs @@ -0,0 +1,144 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Management.Automation; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore +{ + internal class PowershellCmdletSequence : PowershellEnvironment + { + private List cmdlets; + + public PowershellCmdletSequence(List cmdlets, PowershellModule[] modules) : base(modules) + { + this.cmdlets = cmdlets; + } + + public PowershellCmdletSequence(List cmdlets) : base() + { + this.cmdlets = cmdlets; + } + + public PowershellCmdletSequence(PowershellModule[] modules) : base(modules) + { + this.cmdlets = new List(); + } + + public PowershellCmdletSequence() : base() + { + this.cmdlets = new List(); + } + + public void Add(CmdletsInfo cmdlet) + { + this.cmdlets.Add(cmdlet); + } + + public Collection RunPipeline() + { + Collection result = null; + runspace.Open(); + using (System.Management.Automation.PowerShell powershell = System.Management.Automation.PowerShell.Create()) + { + powershell.Runspace = runspace; + for (int i = 0; i < cmdlets.Count; i++) + { + powershell.AddCommand(cmdlets[i].name); + if (cmdlets[i].parameters.Count > 0) + { + Dictionary paramDictionary = new Dictionary(); + foreach (CmdletParam cmdletparam in cmdlets[i].parameters) + { + paramDictionary.Add(cmdletparam.name, cmdletparam.value); + } + powershell.AddParameters(paramDictionary); + } + } + result = powershell.Invoke(); + + if (powershell.Streams.Error.Count > 0) + { + runspace.Close(); + List exceptions = new List(); + foreach (ErrorRecord error in powershell.Streams.Error) + { + exceptions.Add(new Exception(error.Exception.Message)); + } + + throw new AggregateException(exceptions); + } + } + runspace.Close(); + + return result; + } + + public override Collection Run(bool debug) + { + Collection result = null; + + runspace.Open(); + for (int i = 0; i < cmdlets.Count; i++) + { + using (System.Management.Automation.PowerShell powershell = System.Management.Automation.PowerShell.Create()) + { + powershell.Runspace = runspace; + + powershell.AddCommand(cmdlets[i].name); + if (cmdlets[i].parameters.Count > 0) + { + var paramDictionary = new Dictionary(); + foreach (CmdletParam cmdletparam in cmdlets[i].parameters) + { + paramDictionary.Add(cmdletparam.name, cmdletparam.value); + } + powershell.AddParameters(paramDictionary); + } + + if (debug) + { + powershell.AddParameter("Debug"); + } + + PrintPSCommand(powershell); + + result = powershell.Invoke(); + + if (debug) + { + Console.WriteLine(string.Join("", powershell.Streams.Debug)); + } + + if (powershell.Streams.Error.Count > 0) + { + runspace.Close(); + var exceptions = new List(); + foreach (ErrorRecord error in powershell.Streams.Error) + { + exceptions.Add(new Exception(error.Exception.Message)); + } + + throw new AggregateException(exceptions); + } + } + } + runspace.Close(); + + return result; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PowershellCore/PowershellEnvironment.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PowershellCore/PowershellEnvironment.cs new file mode 100644 index 000000000000..ffa1baf59c15 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PowershellCore/PowershellEnvironment.cs @@ -0,0 +1,78 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.ObjectModel; +using System.Management.Automation; +using System.Management.Automation.Runspaces; +using System.Text; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore +{ + public abstract class PowershellEnvironment + { + protected InitialSessionState initialSessionState; + protected Runspace runspace; + + public PowershellEnvironment(params PowershellModule[] modules) + { + initialSessionState = InitialSessionState.CreateDefault(); + string[] moduleFullPath=new string[modules.Length]; + for(int i=0;i Run(bool debug); + + protected void PrintPSCommand(System.Management.Automation.PowerShell powershell) + { + + StringBuilder command = new StringBuilder(); + DateTime currentTime = DateTime.UtcNow; + command.Append("[" + currentTime.ToShortDateString() + " " + currentTime.ToLongTimeString() + "] "); + + for (int i = 0; i < powershell.Commands.Commands.Count; i++) + { + + command.Append(powershell.Commands.Commands[i].CommandText + " "); + + for (int j = 0; j < powershell.Commands.Commands[i].Parameters.Count; j++) + { + command.Append("-" + powershell.Commands.Commands[i].Parameters[j].Name + " "); + var value = powershell.Commands.Commands[i].Parameters[j].Value; + if (value != null) + { + command.Append("\"" + value.ToString() + "\" "); + } + command.Append("\n"); + } + } + + Console.WriteLine(command); + + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PowershellCore/PowershellModule.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PowershellCore/PowershellModule.cs new file mode 100644 index 000000000000..1df776f7040d --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PowershellCore/PowershellModule.cs @@ -0,0 +1,38 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore +{ + public class PowershellModule + { + readonly string moduleName; + readonly string modulePath; + + public PowershellModule(string name, string path) + { + moduleName = name; + modulePath = path; + } + + public string FullPath + { + get + { + return Path.Combine(modulePath, moduleName); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PreviewCmdletInfo/GetAzureReservedIPCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PreviewCmdletInfo/GetAzureReservedIPCmdletInfo.cs new file mode 100644 index 000000000000..63cc54159905 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PreviewCmdletInfo/GetAzureReservedIPCmdletInfo.cs @@ -0,0 +1,31 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PreviewCmdletInfo +{ + public class GetAzureReservedIPCmdletInfo : CmdletsInfo + { + public GetAzureReservedIPCmdletInfo(string name) + { + this.cmdletName = Utilities.GetAzureReservedIPCmdletName; + + if (!string.IsNullOrEmpty(name)) + { + this.cmdletParams.Add(new CmdletParam("ReservedIPName", name)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PreviewCmdletInfo/NewAzureReservedIPCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PreviewCmdletInfo/NewAzureReservedIPCmdletInfo.cs new file mode 100644 index 000000000000..fb773be58a91 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PreviewCmdletInfo/NewAzureReservedIPCmdletInfo.cs @@ -0,0 +1,55 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PreviewCmdletInfo +{ + public class NewAzureReservedIPCmdletInfo : CmdletsInfo + { + public NewAzureReservedIPCmdletInfo(string name, string aff, string label, string svc, string dep) + { + this.cmdletName = Utilities.NewAzureReservedIPCmdletName; + + this.cmdletParams.Add(new CmdletParam("ReservedIPName", name)); + this.cmdletParams.Add(new CmdletParam("AffinityGroup", aff)); + + if (!string.IsNullOrEmpty(label)) + { + this.cmdletParams.Add(new CmdletParam("Label", label)); + } + if (!string.IsNullOrEmpty(svc)) + { + this.cmdletParams.Add(new CmdletParam("ServiceName", svc)); + } + if (!string.IsNullOrEmpty(dep)) + { + this.cmdletParams.Add(new CmdletParam("DeploymentName", dep)); + } + } + + public NewAzureReservedIPCmdletInfo(string name, string location, string label) + { + this.cmdletName = Utilities.NewAzureReservedIPCmdletName; + + this.cmdletParams.Add(new CmdletParam("ReservedIPName", name)); + this.cmdletParams.Add(new CmdletParam("Location", location)); + + if (!string.IsNullOrEmpty(label)) + { + this.cmdletParams.Add(new CmdletParam("Label", label)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PreviewCmdletInfo/RemoveAzureReservedIPCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PreviewCmdletInfo/RemoveAzureReservedIPCmdletInfo.cs new file mode 100644 index 000000000000..7dce42f162fa --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/PreviewCmdletInfo/RemoveAzureReservedIPCmdletInfo.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PreviewCmdletInfo +{ + public class RemoveAzureReservedIPCmdletInfo : CmdletsInfo + { + public RemoveAzureReservedIPCmdletInfo(string name, bool force) + { + this.cmdletName = Utilities.RemoveAzureReservedIPCmdletName; + + this.cmdletParams.Add(new CmdletParam("ReservedIPName", name)); + if(force) + this.cmdletParams.Add(new CmdletParam("Force")); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/Readme.txt b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/Readme.txt new file mode 100644 index 000000000000..3d546145b1e8 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/Readme.txt @@ -0,0 +1,23 @@ + +The functional tests in this folder covers 'Service Management IaaS' cmdlets. +These tests exercise the cmdlets from End to End with no mocking in +any of the layers. + +Dependencies +------------ +These tests require an active subscription in which VMs will be created. +It also needs to know the location/region where the VM should +be created. + +Functional test reads the following information +1. Subscription information from the resource file PublishSettingsFile property +In order to make it work with your subscriptions, place your publishsettings file in the Artifacts folder and rename it to 'AzurePSTest.publishsettings' +It uses the first subscription id from this file. + +2. Location information from the resource Location +To change the location, update the Location property with your desired location. + + +Running functional tests +------------------------ +These tests have to be executed from Visual Studio with MSTest. diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ReservedIPTest.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ReservedIPTest.cs new file mode 100644 index 000000000000..ad33442a53aa --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ReservedIPTest.cs @@ -0,0 +1,803 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Reflection; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests +{ + [TestClass] + public class ReservedIPTest : ServiceManagementTest + { + private string rsvIpName1; + private string rsvIpName2; + private string affName1; + private string affName2; + private string rsvIPLabel; + private string svcNameLoc; // a service using location + private string svcNameAG; // a service using AG + private string vmName; + + private const string rsvIpNamePrefix = "PSReservedIP"; + private const string affNamePrefix = "PSAffinity"; + private const string rsvIPLabelPrefix = "PSReservedIPLabel"; + + [ClassInitialize] + public static void ClassInit(TestContext context) + { + if (defaultAzureSubscription.Equals(null)) + { + Assert.Inconclusive("No Subscription is selected!"); + } + RemoveAllReservedIP(); + } + + [TestInitialize] + public void Initialize() + { + rsvIpName1 = Utilities.GetUniqueShortName(rsvIpNamePrefix); + rsvIpName2 = Utilities.GetUniqueShortName(rsvIpNamePrefix); + affName1 = Utilities.GetUniqueShortName(affNamePrefix); + affName2 = Utilities.GetUniqueShortName(affNamePrefix); + rsvIPLabel = Utilities.GetUniqueShortName(rsvIPLabelPrefix); + svcNameLoc = Utilities.GetUniqueShortName(serviceNamePrefix); + svcNameAG = Utilities.GetUniqueShortName(serviceNamePrefix); + vmName = Utilities.GetUniqueShortName(vmNamePrefix); + testStartTime = DateTime.Now; + } + + /// + /// This tests New-AzureReservedIP, Get-AzureReservedIP and Remove-AzureReservedIP + /// + [TestMethod(), TestCategory(Category.Preview), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (New,Get,Remove)-AzureReservedIP)")] + public void AzureReservedIPTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + // IP1 and IP2 on AG1 + vmPowershellCmdlets.NewAzureAffinityGroup(affName1, locationName, null, null); + vmPowershellCmdlets.NewAzureReservedIP(rsvIpName1, affName1, rsvIPLabel); + vmPowershellCmdlets.NewAzureReservedIP(rsvIpName2, affName1, rsvIPLabel); + + var reservedIPReturned = vmPowershellCmdlets.GetAzureReservedIP(rsvIpName1)[0]; + Verify.AzureReservedIPNotInUse(reservedIPReturned, rsvIpName1, rsvIPLabel, affName1); + + // Create an affinity group in another location + var anotherLocation = GetLocation("PersistentVMRole", locationName); + vmPowershellCmdlets.NewAzureAffinityGroup(affName2, anotherLocation.Name, null, null); + + string rsvIpName3 = rsvIpNamePrefix + Utilities.GetUniqueShortName(); + string rsvIpName4 = rsvIpNamePrefix + Utilities.GetUniqueShortName(); + var rsvIPNames = new[] {rsvIpName1, rsvIpName2, rsvIpName3, rsvIpName4}; + vmPowershellCmdlets.NewAzureReservedIP(rsvIpName3, affName2, rsvIPLabel); // IP3 on AG2 + vmPowershellCmdlets.NewAzureReservedIP(rsvIpName4, affName2, rsvIPLabel); // IP4 on AG2 + + var rsvIPs = vmPowershellCmdlets.GetAzureReservedIP(); + foreach (var ip in rsvIPs) + { + if (rsvIPNames.Contains(ip.ReservedIPName)) + { + reservedIPReturned = vmPowershellCmdlets.GetAzureReservedIP(ip.ReservedIPName)[0]; + Verify.AzureReservedIPNotInUse(reservedIPReturned, ip.ReservedIPName, ip.Label, ip.Location, + ip.Id); + } + } + + // Remove IP1 + vmPowershellCmdlets.RemoveAzureReservedIP(rsvIpName1); + Utilities.CheckRemove(vmPowershellCmdlets.GetAzureReservedIP, rsvIpName1); + + rsvIPs = vmPowershellCmdlets.GetAzureReservedIP(); + foreach (var ip in rsvIPs) + { + if (rsvIPNames.Contains(ip.ReservedIPName)) + { + reservedIPReturned = vmPowershellCmdlets.GetAzureReservedIP(ip.ReservedIPName)[0]; + Verify.AzureReservedIPNotInUse(reservedIPReturned, ip.ReservedIPName, ip.Label, ip.Location, + ip.Id); + } + } + + // Remove IP3 + vmPowershellCmdlets.RemoveAzureReservedIP(rsvIpName3); + Utilities.CheckRemove(vmPowershellCmdlets.GetAzureReservedIP, rsvIpName3); + + rsvIPs = vmPowershellCmdlets.GetAzureReservedIP(); + foreach (var ip in rsvIPs) + { + if (rsvIPNames.Contains(ip.ReservedIPName)) + { + reservedIPReturned = vmPowershellCmdlets.GetAzureReservedIP(ip.ReservedIPName)[0]; + Verify.AzureReservedIPNotInUse(reservedIPReturned, ip.ReservedIPName, ip.Label, ip.Location, + ip.Id); + } + } + + vmPowershellCmdlets.RemoveAzureReservedIP(rsvIpName4); + Utilities.CheckRemove(vmPowershellCmdlets.GetAzureReservedIP, rsvIpName4); + vmPowershellCmdlets.RemoveAzureReservedIP(rsvIpName2); + Utilities.CheckRemove(vmPowershellCmdlets.GetAzureReservedIP, rsvIpName2); + + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + } + + /// + /// This is negative tests for ReservedIP + /// + [TestMethod(), TestCategory(Category.Preview), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (New,Get,Remove)-AzureReservedIP)")] + public void AzureReservedIPNegativeTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + string wrongAffName = "AffinityNotExist"; + string wrongDeploymentName = "DeploymentNotExist"; + string wrongServiceName = "ServiceNotExist"; + string wrongReservedIPName = "ReservedIPNotExist"; + + vmPowershellCmdlets.NewAzureAffinityGroup(affName1, locationName, null, null); + + // Try to create a reserved IP with a wrong affinity group name + Utilities.VerifyFailure( + () => vmPowershellCmdlets.NewAzureReservedIP(rsvIpName1, wrongAffName, rsvIPLabel), + BadRequestException); + + vmPowershellCmdlets.NewAzureReservedIP(rsvIpName1, affName1, rsvIPLabel); + var reservedIPReturned = vmPowershellCmdlets.GetAzureReservedIP(rsvIpName1)[0]; + Verify.AzureReservedIPNotInUse(reservedIPReturned, rsvIpName1, rsvIPLabel, affName1); + + // Try to remove an affinity group that holds a reserved IP. + Utilities.VerifyFailure( + () => vmPowershellCmdlets.RemoveAzureAffinityGroup(affName1), + BadRequestException); + + // Try to create a reserved IP with an existing reserved ip name + Utilities.VerifyFailure( + () => vmPowershellCmdlets.NewAzureReservedIP(rsvIpName1, affName1, rsvIPLabel), + ConflictErrorException); + + // Try to create a reserved IP with a deployment name that does not exist + Utilities.VerifyFailure( + () => + vmPowershellCmdlets.NewAzureReservedIP(rsvIpName2, affName1, wrongServiceName, + wrongDeploymentName, + rsvIPLabel), + BadRequestException); + + // Try to get a reserved IP that does not exist + Utilities.VerifyFailure( + () => vmPowershellCmdlets.GetAzureReservedIP(wrongReservedIPName), ResourceNotFoundException); + + // Try to remove a reserved IP that does not exist + Utilities.VerifyFailure( + () => vmPowershellCmdlets.RemoveAzureReservedIP(wrongReservedIPName), ResourceNotFoundException); + + vmPowershellCmdlets.RemoveAzureReservedIP(rsvIpName1); + vmPowershellCmdlets.RemoveAzureAffinityGroup(affName1); + + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e); + throw; + } + } + + /// + /// First reserve an IP and then create a deployment with the reserved ip. + /// + [TestMethod(), TestCategory(Category.Preview), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), + Description("First reserve an IP and then create a deployment with the reserved ip.")] + public void CreateDeploymentWithReservedIPTest() + { + try + { + vmPowershellCmdlets.NewAzureAffinityGroup(affName1, locationName, null, null); + vmPowershellCmdlets.NewAzureReservedIP(rsvIpName1, affName1, rsvIPLabel); + + // Verify the reserved ip + var reservedIPReturned = vmPowershellCmdlets.GetAzureReservedIP(rsvIpName1)[0]; + Verify.AzureReservedIPNotInUse(reservedIPReturned, rsvIpName1, rsvIPLabel, affName1); + + + // Create a new deployment with the reserved ip + string newAzureVM1Name = Utilities.GetUniqueShortName(vmNamePrefix); + string newAzureVM2Name = Utilities.GetUniqueShortName(vmNamePrefix); + if (string.IsNullOrEmpty(imageName)) + { + imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows" }, false); + } + + var azureVMConfigInfo1 = new AzureVMConfigInfo(newAzureVM1Name, InstanceSize.ExtraSmall.ToString(), imageName); + var azureVMConfigInfo2 = new AzureVMConfigInfo(newAzureVM2Name, InstanceSize.Small.ToString(), imageName); + var azureProvisioningConfig = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var azureDataDiskConfigInfo = new AddAzureDataDiskConfig(DiskCreateOption.CreateNew, 50, "datadisk1", 0); + var azureEndPointConfigInfo = new AzureEndPointConfigInfo(AzureEndPointConfigInfo.ParameterSet.CustomProbe, ProtocolInfo.tcp, 80, 80, "web", "lbweb", 80, ProtocolInfo.http, @"/", null, null); + var azureEndPointConfigInfo2 = new AzureEndPointConfigInfo(AzureEndPointConfigInfo.ParameterSet.CustomProbe, ProtocolInfo.tcp, 80, 81, "web2", "lbweb2", 80, ProtocolInfo.http, @"/", null, null); + + var persistentVMConfigInfo1 = new PersistentVMConfigInfo(azureVMConfigInfo1, azureProvisioningConfig, azureDataDiskConfigInfo, azureEndPointConfigInfo); + var persistentVMConfigInfo2 = new PersistentVMConfigInfo(azureVMConfigInfo2, azureProvisioningConfig, azureDataDiskConfigInfo, azureEndPointConfigInfo2); + + PersistentVM persistentVM1 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo1); + PersistentVM persistentVM2 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo2); + + PersistentVM[] VMs = { persistentVM1, persistentVM2 }; + vmPowershellCmdlets.NewAzureVMWithReservedIP(svcNameAG, VMs, rsvIpName1, affName1); + + // Get the deployment and verify + var deploymentReturned = vmPowershellCmdlets.GetAzureDeployment(svcNameAG); + Utilities.PrintContext(deploymentReturned); + + + // Verify the reserved ip + reservedIPReturned = vmPowershellCmdlets.GetAzureReservedIP(rsvIpName1)[0]; + Verify.AzureReservedIPInUse(reservedIPReturned, rsvIpName1, rsvIPLabel, affName1, + deploymentReturned.VirtualIPs[0].Address, deploymentReturned.DeploymentName, + deploymentReturned.ServiceName); + + // Remove the VM1 and verify + + Console.WriteLine("Removing the first VM...\n"); + vmPowershellCmdlets.RemoveAzureVM(newAzureVM1Name, svcNameAG); + + // Verify the reserved ip + reservedIPReturned = vmPowershellCmdlets.GetAzureReservedIP(rsvIpName1)[0]; + Verify.AzureReservedIPInUse(reservedIPReturned, rsvIpName1, rsvIPLabel, affName1, + deploymentReturned.VirtualIPs[0].Address, deploymentReturned.DeploymentName, + deploymentReturned.ServiceName); + + // Remove the VM2 and verify + Console.WriteLine("Removing the second VM...\n"); + vmPowershellCmdlets.RemoveAzureVM(newAzureVM2Name, svcNameAG); + + // Verify the reserved ip + reservedIPReturned = vmPowershellCmdlets.GetAzureReservedIP(rsvIpName1)[0]; + Verify.AzureReservedIPNotInUse(reservedIPReturned, rsvIpName1, rsvIPLabel, affName1); + + + // Remove the reserved IP and verify + vmPowershellCmdlets.RemoveAzureReservedIP(rsvIpName1); + Utilities.VerifyFailure( + () => vmPowershellCmdlets.GetAzureReservedIP(rsvIpName1), ResourceNotFoundException); + } + + + catch (Exception e) + { + Console.WriteLine(e); + throw; + } + } + + /// + /// First create a deployment and then reserve the ip of the deployment. + /// + [TestMethod(), TestCategory(Category.Preview), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), + Description("First create a deployment and then reserve the ip of the deployment")] + public void CreateDeploymentAndReserveIPTest() + { + try + { + + string newAzureVM1Name = Utilities.GetUniqueShortName(vmNamePrefix); + string newAzureVM2Name = Utilities.GetUniqueShortName(vmNamePrefix); + if (string.IsNullOrEmpty(imageName)) + { + imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows" }, false); + } + + var azureVMConfigInfo1 = new AzureVMConfigInfo(newAzureVM1Name, InstanceSize.ExtraSmall.ToString(), imageName); + var azureVMConfigInfo2 = new AzureVMConfigInfo(newAzureVM2Name, InstanceSize.Small.ToString(), imageName); + var azureProvisioningConfig = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var azureDataDiskConfigInfo = new AddAzureDataDiskConfig(DiskCreateOption.CreateNew, 50, "datadisk1", 0); + var azureEndPointConfigInfo = new AzureEndPointConfigInfo(AzureEndPointConfigInfo.ParameterSet.CustomProbe, ProtocolInfo.tcp, 80, 80, "web", "lbweb", 80, ProtocolInfo.http, @"/", null, null); + + var persistentVMConfigInfo1 = new PersistentVMConfigInfo(azureVMConfigInfo1, azureProvisioningConfig, azureDataDiskConfigInfo, azureEndPointConfigInfo); + var persistentVMConfigInfo2 = new PersistentVMConfigInfo(azureVMConfigInfo2, azureProvisioningConfig, azureDataDiskConfigInfo, azureEndPointConfigInfo); + + PersistentVM persistentVM1 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo1); + PersistentVM persistentVM2 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo2); + + PersistentVM[] VMs = { persistentVM1, persistentVM2 }; + + // Create a new deployment + vmPowershellCmdlets.NewAzureVM(svcNameLoc, VMs, locationName); + + // Get the deployment and verify + var deploymentReturned = vmPowershellCmdlets.GetAzureDeployment(svcNameLoc); + Utilities.PrintContext(deploymentReturned); + + // Reserve the ip of the deployment + vmPowershellCmdlets.NewAzureAffinityGroup(affName1, locationName, null, null); + vmPowershellCmdlets.NewAzureReservedIP(rsvIpName1, affName1, svcNameLoc, deploymentReturned.DeploymentName, rsvIPLabel); + + // Get the deployment and verify + deploymentReturned = vmPowershellCmdlets.GetAzureDeployment(svcNameLoc); + Utilities.PrintContext(deploymentReturned); + Assert.AreEqual(rsvIpName1, deploymentReturned.ReservedIPName, "Reserved IP names are different!"); + + // Verify the reserved ip + var reservedIPReturned = vmPowershellCmdlets.GetAzureReservedIP(rsvIpName1)[0]; + Verify.AzureReservedIPInUse(reservedIPReturned, rsvIpName1, rsvIPLabel, affName1, + deploymentReturned.VirtualIPs[0].Address, deploymentReturned.DeploymentName, + deploymentReturned.ServiceName); + + // Remove the first VM and verify the reserved ip + Console.WriteLine("Removing the first VM..."); + vmPowershellCmdlets.RemoveAzureVM(newAzureVM1Name, svcNameLoc); + + deploymentReturned = vmPowershellCmdlets.GetAzureDeployment(svcNameLoc); + Utilities.PrintContext(deploymentReturned); + Assert.AreEqual(rsvIpName1, deploymentReturned.ReservedIPName, "Reserved IP names are different!"); + + // Verify the reserved ip + reservedIPReturned = vmPowershellCmdlets.GetAzureReservedIP(rsvIpName1)[0]; + Verify.AzureReservedIPInUse(reservedIPReturned, rsvIpName1, rsvIPLabel, affName1, + deploymentReturned.VirtualIPs[0].Address, deploymentReturned.DeploymentName, + deploymentReturned.ServiceName); + + // Remove the second VM and verify the reserved ip + Console.WriteLine("Removing the second VM..."); + vmPowershellCmdlets.RemoveAzureVM(newAzureVM2Name, svcNameLoc); + + // Verify the reserved ip + reservedIPReturned = vmPowershellCmdlets.GetAzureReservedIP(rsvIpName1)[0]; + Verify.AzureReservedIPNotInUse(reservedIPReturned, rsvIpName1, rsvIPLabel, affName1); + + // Remove the reserved IP and verify + vmPowershellCmdlets.RemoveAzureReservedIP(rsvIpName1); + Utilities.VerifyFailure( + () => vmPowershellCmdlets.GetAzureReservedIP(rsvIpName1), ResourceNotFoundException); + + pass = true; + + } + catch (Exception e) + { + Console.WriteLine(e); + throw; + } + + + } + + /// + /// Try to reserve an ip of a deployment when the reserved ip and deployment are in different AG/location + /// + [TestMethod(), TestCategory(Category.Preview), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), + Description("Try to reserve an ip of a deployment when the reserved ip and deployment are in different AG/location")] + public void CreateDeploymentWithReservedIPNegativeTest() + { + try + { + + string newAzureVM1Name = Utilities.GetUniqueShortName(vmNamePrefix); + string newAzureVM2Name = Utilities.GetUniqueShortName(vmNamePrefix); + if (string.IsNullOrEmpty(imageName)) + { + imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows" }, false); + } + + var azureVMConfigInfo1 = new AzureVMConfigInfo(newAzureVM1Name, InstanceSize.ExtraSmall.ToString(), imageName); + var azureVMConfigInfo2 = new AzureVMConfigInfo(newAzureVM2Name, InstanceSize.Small.ToString(), imageName); + var azureProvisioningConfig = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var azureDataDiskConfigInfo = new AddAzureDataDiskConfig(DiskCreateOption.CreateNew, 50, "datadisk1", 0); + var azureEndPointConfigInfo = new AzureEndPointConfigInfo(AzureEndPointConfigInfo.ParameterSet.CustomProbe, ProtocolInfo.tcp, 80, 80, "web", "lbweb", 80, ProtocolInfo.http, @"/", null, null); + + var persistentVMConfigInfo1 = new PersistentVMConfigInfo(azureVMConfigInfo1, azureProvisioningConfig, azureDataDiskConfigInfo, azureEndPointConfigInfo); + var persistentVMConfigInfo2 = new PersistentVMConfigInfo(azureVMConfigInfo2, azureProvisioningConfig, azureDataDiskConfigInfo, null); + + PersistentVM persistentVM1 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo1); + PersistentVM persistentVM2 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo2); + + PersistentVM[] VMs = { persistentVM1, persistentVM2 }; + + + // AG1 on location 1 + vmPowershellCmdlets.NewAzureAffinityGroup(affName1, locationName, null, null); + + // AG2 on location 2 + var anotherLocation = GetLocation("PersistentVMRole", locationName); + vmPowershellCmdlets.NewAzureAffinityGroup(affName2, anotherLocation.Name, null, null); + + // Reserve an ip on AG1 + vmPowershellCmdlets.NewAzureReservedIP(rsvIpName1, affName2); + var rsvIPreturned = vmPowershellCmdlets.GetAzureReservedIP(rsvIpName1)[0]; + Verify.AzureReservedIPNotInUse(rsvIPreturned, rsvIpName1, null, affName2); + + // Try to create a new deployment with AG2 and the reserved IP + Utilities.VerifyFailure( + () => vmPowershellCmdlets.NewAzureVMWithReservedIP(svcNameAG, VMs, rsvIpName1, affName1), + BadRequestException); + + // Create a new deployment with location 2, and then reserved the IP of it + vmPowershellCmdlets.NewAzureVM(svcNameLoc, VMs, locationName); + + Utilities.VerifyFailure( + () => vmPowershellCmdlets.NewAzureReservedIP(rsvIpName2, affName2, svcNameLoc, svcNameLoc), + BadRequestException); + + // Remove the reserved IP and verify + vmPowershellCmdlets.RemoveAzureReservedIP(rsvIpName1); + Utilities.VerifyFailure( + () => vmPowershellCmdlets.GetAzureReservedIP(rsvIpName1), ResourceNotFoundException); + + pass = true; + + } + catch (Exception e) + { + Console.WriteLine(e); + throw; + } + } + + /// + /// Reserve an IP of a deployment and stop-deallocate the VMs of the deployment + /// + [TestMethod(), TestCategory(Category.Preview), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), + Description("Reserve an IP of a deployment and stop-deallocate the VMs of the deployment")] + public void StopDeallocationReservedIPTest() + { + try + { + string newAzureVM1Name = Utilities.GetUniqueShortName(vmNamePrefix); + string newAzureVM2Name = Utilities.GetUniqueShortName(vmNamePrefix); + if (string.IsNullOrEmpty(imageName)) + { + imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows" }, false); + } + + var azureVMConfigInfo1 = new AzureVMConfigInfo(newAzureVM1Name, InstanceSize.ExtraSmall.ToString(), imageName); + var azureVMConfigInfo2 = new AzureVMConfigInfo(newAzureVM2Name, InstanceSize.Small.ToString(), imageName); + var azureProvisioningConfig = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var azureDataDiskConfigInfo = new AddAzureDataDiskConfig(DiskCreateOption.CreateNew, 50, "datadisk1", 0); + var azureEndPointConfigInfo = new AzureEndPointConfigInfo(AzureEndPointConfigInfo.ParameterSet.CustomProbe, ProtocolInfo.tcp, 80, 80, "web", "lbweb", 80, ProtocolInfo.http, @"/", null, null); + + var persistentVMConfigInfo1 = new PersistentVMConfigInfo(azureVMConfigInfo1, azureProvisioningConfig, azureDataDiskConfigInfo, azureEndPointConfigInfo); + var persistentVMConfigInfo2 = new PersistentVMConfigInfo(azureVMConfigInfo2, azureProvisioningConfig, azureDataDiskConfigInfo, null); + + PersistentVM persistentVM1 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo1); + PersistentVM persistentVM2 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo2); + + PersistentVM[] VMs = { persistentVM1, persistentVM2 }; + + // Create a new deployment + vmPowershellCmdlets.NewAzureVM(svcNameLoc, VMs, locationName); + + // Reserve the ip of the deployment + vmPowershellCmdlets.NewAzureAffinityGroup(affName1, locationName, null, null); + vmPowershellCmdlets.NewAzureReservedIP(rsvIpName1, affName1, svcNameLoc, svcNameLoc, rsvIPLabel); + + // Get the deployment and verify + var deploymentReturned = vmPowershellCmdlets.GetAzureDeployment(svcNameLoc); + Utilities.PrintContext(deploymentReturned); + + // Verify the reserved ip + var reservedIPReturned = vmPowershellCmdlets.GetAzureReservedIP(rsvIpName1)[0]; + Verify.AzureReservedIPInUse(reservedIPReturned, rsvIpName1, rsvIPLabel, affName1, + deploymentReturned.VirtualIPs[0].Address, deploymentReturned.DeploymentName, + deploymentReturned.ServiceName); + + // Stop the first VM and verify the reserved ip + Console.WriteLine("Stopping the first VM..."); + vmPowershellCmdlets.StopAzureVM(newAzureVM1Name, svcNameLoc); + + // Verify the reserved ip + reservedIPReturned = vmPowershellCmdlets.GetAzureReservedIP(rsvIpName1)[0]; + Verify.AzureReservedIPInUse(reservedIPReturned, rsvIpName1, rsvIPLabel, affName1, + deploymentReturned.VirtualIPs[0].Address, deploymentReturned.DeploymentName, + deploymentReturned.ServiceName); + + // Stop the second VM and verify the reserved ip + Console.WriteLine("Stopping the second VM..."); + vmPowershellCmdlets.StopAzureVM(newAzureVM2Name, svcNameLoc, false, true); + + // Verify the reserved ip + reservedIPReturned = vmPowershellCmdlets.GetAzureReservedIP(rsvIpName1)[0]; + Verify.AzureReservedIPInUse(reservedIPReturned, rsvIpName1, rsvIPLabel, affName1, + deploymentReturned.VirtualIPs[0].Address, deploymentReturned.DeploymentName, + deploymentReturned.ServiceName); + + deploymentReturned = vmPowershellCmdlets.GetAzureDeployment(svcNameLoc); + Utilities.PrintContext(deploymentReturned); + Assert.AreEqual(0, deploymentReturned.VirtualIPs.Count, "The deployment still holds a VIP!"); + + // Restart the VM and verify + vmPowershellCmdlets.StartAzureVM(newAzureVM1Name, svcNameLoc); + + deploymentReturned = vmPowershellCmdlets.GetAzureDeployment(svcNameLoc); + Utilities.PrintContext(deploymentReturned); + + // Verify the reserved ip + reservedIPReturned = vmPowershellCmdlets.GetAzureReservedIP(rsvIpName1)[0]; + Verify.AzureReservedIPInUse(reservedIPReturned, rsvIpName1, rsvIPLabel, affName1, + deploymentReturned.VirtualIPs[0].Address, deploymentReturned.DeploymentName, + deploymentReturned.ServiceName); + + deploymentReturned = vmPowershellCmdlets.GetAzureDeployment(svcNameLoc); + Utilities.PrintContext(deploymentReturned); + + // Remove all VMs and service + vmPowershellCmdlets.RemoveAzureService(svcNameLoc); + reservedIPReturned = vmPowershellCmdlets.GetAzureReservedIP(rsvIpName1)[0]; + Verify.AzureReservedIPNotInUse(reservedIPReturned, rsvIpName1, rsvIPLabel, affName1); + + // Remove the reserved IP and verify + vmPowershellCmdlets.RemoveAzureReservedIP(rsvIpName1); + Utilities.VerifyFailure( + () => vmPowershellCmdlets.GetAzureReservedIP(rsvIpName1), ResourceNotFoundException); + + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e); + throw; + } + } + + /// + /// Remove a deployment that has a reserve ip, and then create another deployment using the reserved ip + /// + [TestMethod(), TestCategory(Category.Preview), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), + Description("Remove a deployment that has a reserve ip, and then create another deployment using the reserved ip")] + public void RemoveAndCreateDeploymentWithReservedIP() + { + try + { + + vmPowershellCmdlets.NewAzureAffinityGroup(affName1, locationName, null, null); + + string newAzureVM1Name = Utilities.GetUniqueShortName(vmNamePrefix); + string newAzureVM2Name = Utilities.GetUniqueShortName(vmNamePrefix); + if (string.IsNullOrEmpty(imageName)) + { + imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows" }, false); + } + + var azureVMConfigInfo1 = new AzureVMConfigInfo(newAzureVM1Name, InstanceSize.ExtraSmall.ToString(), imageName); + var azureVMConfigInfo2 = new AzureVMConfigInfo(newAzureVM2Name, InstanceSize.Small.ToString(), imageName); + var azureProvisioningConfig = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var azureDataDiskConfigInfo = new AddAzureDataDiskConfig(DiskCreateOption.CreateNew, 50, "datadisk1", 0); + var azureEndPointConfigInfo = + new AzureEndPointConfigInfo(AzureEndPointConfigInfo.ParameterSet.CustomProbe, ProtocolInfo.tcp, 80, + 80, "web", "lbweb", 80, ProtocolInfo.http, @"/", null, null); + + var persistentVMConfigInfo1 = new PersistentVMConfigInfo(azureVMConfigInfo1, azureProvisioningConfig, azureDataDiskConfigInfo, azureEndPointConfigInfo); + var persistentVMConfigInfo2 = new PersistentVMConfigInfo(azureVMConfigInfo2, azureProvisioningConfig, azureDataDiskConfigInfo, azureEndPointConfigInfo); + + + PersistentVM persistentVM1 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo1); + PersistentVM persistentVM2 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo2); + + // Create a new deployment + vmPowershellCmdlets.NewAzureVM(svcNameLoc, new [] {persistentVM1}, locationName); + + // Reserve the ip of the deployment + vmPowershellCmdlets.NewAzureReservedIP(rsvIpName1, affName1, svcNameLoc, svcNameLoc, rsvIPLabel); + + // Get the deployment and verify + var deploymentReturned = vmPowershellCmdlets.GetAzureDeployment(svcNameLoc); + Utilities.PrintContext(deploymentReturned); + + // Verify the reserved ip + var reservedIPReturned = vmPowershellCmdlets.GetAzureReservedIP(rsvIpName1)[0]; + Verify.AzureReservedIPInUse(reservedIPReturned, rsvIpName1, rsvIPLabel, affName1, + deploymentReturned.VirtualIPs[0].Address, deploymentReturned.DeploymentName, + deploymentReturned.ServiceName); + + // Remove the VMs and verify + Console.WriteLine("\nRemoving VMs...\n"); + vmPowershellCmdlets.RemoveAzureVM(newAzureVM1Name, svcNameLoc); + + // Verify the reserved ip + reservedIPReturned = vmPowershellCmdlets.GetAzureReservedIP(rsvIpName1)[0]; + Verify.AzureReservedIPNotInUse(reservedIPReturned, rsvIpName1, rsvIPLabel, affName1); + + // Remove the service + Console.WriteLine("\nRemoving the service...\n"); + vmPowershellCmdlets.RemoveAzureService(svcNameLoc); + + // Verify the reserved ip + reservedIPReturned = vmPowershellCmdlets.GetAzureReservedIP(rsvIpName1)[0]; + Verify.AzureReservedIPNotInUse(reservedIPReturned, rsvIpName1, rsvIPLabel, affName1); + + // Re-deploy the VM and verify + vmPowershellCmdlets.NewAzureVMWithReservedIP(svcNameAG, new[] { persistentVM2 },rsvIpName1, affName1); + + // Get the deployment and verify + deploymentReturned = vmPowershellCmdlets.GetAzureDeployment(svcNameAG); + Utilities.PrintContext(deploymentReturned); + + // Verify the reserved ip + reservedIPReturned = vmPowershellCmdlets.GetAzureReservedIP(rsvIpName1)[0]; + Verify.AzureReservedIPInUse(reservedIPReturned, rsvIpName1, rsvIPLabel, affName1, + deploymentReturned.VirtualIPs[0].Address, deploymentReturned.DeploymentName, + deploymentReturned.ServiceName); + + // Remove the VM + vmPowershellCmdlets.RemoveAzureService(svcNameAG); + + // Remove the reserved IP and verify + vmPowershellCmdlets.RemoveAzureReservedIP(rsvIpName1); + Utilities.VerifyFailure( + () => vmPowershellCmdlets.GetAzureReservedIP(rsvIpName1), ResourceNotFoundException); + + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e); + throw; + } + } + + /// + /// /// Try to delete reserved ip while the ip is used by a deployment + /// + [TestMethod(), TestCategory(Category.Preview), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), + Description("Try to delete reserved ip while the ip is used by a deployment")] + public void RemoveAzureReservedIPWithDeploymentTest() + { + try + { + vmPowershellCmdlets.NewAzureAffinityGroup(affName1, locationName, null, null); + + string newAzureVM1Name = Utilities.GetUniqueShortName(vmNamePrefix); + + if (string.IsNullOrEmpty(imageName)) + { + imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows" }, false); + } + + var azureVMConfigInfo1 = new AzureVMConfigInfo(newAzureVM1Name, InstanceSize.ExtraSmall.ToString(), imageName); + var azureProvisioningConfig = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var azureDataDiskConfigInfo = new AddAzureDataDiskConfig(DiskCreateOption.CreateNew, 50, "datadisk1", 0); + var azureEndPointConfigInfo = new AzureEndPointConfigInfo(AzureEndPointConfigInfo.ParameterSet.CustomProbe, ProtocolInfo.tcp, 80, 80, "web", "lbweb", 80, ProtocolInfo.http, @"/", null, null); + + var persistentVMConfigInfo1 = new PersistentVMConfigInfo(azureVMConfigInfo1, azureProvisioningConfig, azureDataDiskConfigInfo, azureEndPointConfigInfo); + + PersistentVM persistentVM1 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo1); + + + //PersistentVM[] VMs = { persistentVM1, persistentVM2 }; + PersistentVM[] VMs = { persistentVM1 }; + + // Create a new deployment + vmPowershellCmdlets.NewAzureVMWithAG(svcNameAG, VMs, affName1); + + // Reserve the ip of the deployment + vmPowershellCmdlets.NewAzureReservedIP(rsvIpName1, affName1, svcNameAG, svcNameAG, rsvIPLabel); + + // Get the deployment and verify + var deploymentReturned = vmPowershellCmdlets.GetAzureDeployment(svcNameAG); + + // Verify the reserved ip + var reservedIPReturned = vmPowershellCmdlets.GetAzureReservedIP(rsvIpName1)[0]; + Verify.AzureReservedIPInUse(reservedIPReturned, rsvIpName1, rsvIPLabel, affName1, + deploymentReturned.VirtualIPs[0].Address, deploymentReturned.DeploymentName, + deploymentReturned.ServiceName); + + // Stop-deallocate the first VM and verify reserved ip + Utilities.VerifyFailure(() => vmPowershellCmdlets.RemoveAzureReservedIP(rsvIpName1), BadRequestException); + + vmPowershellCmdlets.StopAzureVM(newAzureVM1Name, svcNameAG, false, true); + + // Verify the reserved ip + reservedIPReturned = vmPowershellCmdlets.GetAzureReservedIP(rsvIpName1)[0]; + Verify.AzureReservedIPInUse(reservedIPReturned, rsvIpName1, rsvIPLabel, affName1, + deploymentReturned.VirtualIPs[0].Address, deploymentReturned.DeploymentName, + deploymentReturned.ServiceName); + + // Stop-deallocate the second VM and verify reserved ip + Utilities.VerifyFailure(() => vmPowershellCmdlets.RemoveAzureReservedIP(rsvIpName1), BadRequestException); + + // Remove all VMs and service and verify reserved ip + vmPowershellCmdlets.RemoveAzureVM(newAzureVM1Name, svcNameAG, true); + + // Verify the reserved ip + reservedIPReturned = vmPowershellCmdlets.GetAzureReservedIP(rsvIpName1)[0]; + Verify.AzureReservedIPNotInUse(reservedIPReturned, rsvIpName1, rsvIPLabel, affName1); + + // Remove the reserved IP and verify + vmPowershellCmdlets.RemoveAzureReservedIP(rsvIpName1); + Utilities.VerifyFailure( + () => vmPowershellCmdlets.GetAzureReservedIP(rsvIpName1), ResourceNotFoundException); + + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e); + throw; + } + } + + [TestCleanup] + public virtual void CleanUp() + { + Console.WriteLine("Test {0}", pass ? "passed" : "failed"); + + if ((cleanupIfPassed && pass) || (cleanupIfFailed && !pass)) + { + Console.WriteLine("Starting to clean up created VM and service..."); + + CleanupService(svcNameLoc); + CleanupService(svcNameAG); + } + } + + [ClassCleanup] + public static void ClassCleanup() + { + RemoveAllReservedIP(); + } + + /// + /// Remove all reserved ips under this subscription + /// + private static void RemoveAllReservedIP() + { + var reservedIPs = vmPowershellCmdlets.GetAzureReservedIP(); + + if (reservedIPs.Count > 0) + { + foreach (var ip in reservedIPs) + { + vmPowershellCmdlets.RemoveAzureReservedIP(ip.ReservedIPName); + } + } + + reservedIPs = vmPowershellCmdlets.GetAzureReservedIP(); + Assert.AreEqual(0, reservedIPs.Count, "There are still {0} reserved IPs.", reservedIPs.Count); + } + + /// + /// Returns a location with a given feature that is different with a given location. + /// + /// Required feature + /// Excluding location + /// + private LocationsContext GetLocation(string reqSvc, string excludeLoc) + { + var locations = vmPowershellCmdlets.GetAzureLocation(); + foreach (var loc in locations) + { + if (! loc.Name.ToLowerInvariant().Equals(excludeLoc.ToLowerInvariant())) + { + if (loc.AvailableServices.Contains(reqSvc)) + { + return loc; + } + } + } + return null; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/SaveAzureVhdTest.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/SaveAzureVhdTest.cs new file mode 100644 index 000000000000..1120a465e35d --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/SaveAzureVhdTest.cs @@ -0,0 +1,293 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Reflection; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Sync.Download; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests +{ + [TestClass] + public class SaveAzureVhdTest : AzureVhdTest + { + + private BlobHandle blobHandle; + static bool deleteUploadedBlob = false; + private const string vhdName = "temp.vhd"; + private static string vhdBlobLocation; + + [ClassInitialize] + public static void ClassInit(TestContext context) + { + //SetTestSettings(); + + if (defaultAzureSubscription.Equals(null)) + { + Assert.Inconclusive("No Subscription is selected!"); + } + + vhdBlobLocation = string.Format("{0}{1}/{2}", blobUrlRoot, vhdContainerName, vhdName); + + if (string.IsNullOrEmpty(localFile)) + { + try + { + //CredentialHelper.CopyTestData(testDataContainer, osVhdName, vhdContainerName, vhdName); + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + Assert.Inconclusive("No vhd exists for Save-AzureVhd tests!"); + } + } + else + { + try + { + vmPowershellCmdlets.AddAzureVhd(new FileInfo(localFile), vhdBlobLocation); + } + catch (Exception e) + { + if (e.ToString().Contains("already exists")) + { + // Use the already uploaded vhd. + Console.WriteLine("Using already uploaded blob.."); + } + else + { + Assert.Inconclusive("No vhd exists for Save-AzureVhd tests!"); + } + } + } + } + + [TestInitialize] + public void Initialize() + { + pass = true; + testStartTime = DateTime.Now; + storageAccountKey = vmPowershellCmdlets.GetAzureStorageAccountKey(defaultAzureSubscription.CurrentStorageAccountName); + + // Set the source blob + blobHandle = Utilities.GetBlobHandle(vhdBlobLocation, storageAccountKey.Primary); + } + + + /// + /// + /// + [TestMethod(), TestCategory(Category.Functional), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Save-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\download_VHD.csv", "download_VHD#csv", DataAccessMethod.Sequential)] + public void SaveAzureVhdThreadNumberTest() + { + testName = MethodBase.GetCurrentMethod().Name; + StartTest(testName, testStartTime); + + // Choose the vhd path in your local machine + string vhdName = Convert.ToString(TestContext.DataRow["vhdLocalPath"]) + Utilities.GetUniqueShortName(); + FileInfo vhdLocalPath = new FileInfo(vhdName); + + DateTime start = DateTime.Now; + // Download with 2 threads and verify it. + SaveVhdAndAssertContent(blobHandle, vhdLocalPath, 2, false, true); + TimeSpan duration = DateTime.Now - start; + + // Choose the vhd path in your local machine + string vhdName2 = Convert.ToString(TestContext.DataRow["vhdLocalPath"]) + Utilities.GetUniqueShortName(); + FileInfo vhdLocalPath2 = new FileInfo(vhdName2); + + // Download with 16 threads and verify it. + start = DateTime.Now; + SaveVhdAndAssertContent(blobHandle, vhdLocalPath2, 16, false, true); + //Assert.IsTrue(DateTime.Now - start < duration, "16 threads took longer!"); + if (DateTime.Now - start > duration) + { + Console.WriteLine("16 threads took longer than 2 threads!"); + } + + + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + } + + + + [TestMethod(), TestCategory(Category.Functional), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Save-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\download_VHD.csv", "download_VHD#csv", DataAccessMethod.Sequential)] + public void SaveAzureVhdStorageKeyTest() + { + + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Choose the vhd path in your local machine + string vhdName = Convert.ToString(TestContext.DataRow["vhdLocalPath"]) + Utilities.GetUniqueShortName(); + FileInfo vhdLocalPath = new FileInfo(vhdName); + + // Download with a secondary storage key and verify it. + SaveVhdAndAssertContent(blobHandle, vhdLocalPath, storageAccountKey.Secondary, false, true); + + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + } + + [TestMethod(), TestCategory(Category.Functional), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Save-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\download_VHD.csv", "download_VHD#csv", DataAccessMethod.Sequential)] + public void SaveAzureVhdOverwriteTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Choose the vhd path in your local machine + string vhdName = Convert.ToString(TestContext.DataRow["vhdLocalPath"]);// +Utilities.GetUniqueShortName(); + FileInfo vhdLocalPath = new FileInfo(Utilities.GetUniqueShortName(vhdName)); + + // Download and verify it. + SaveVhdAndAssertContent(blobHandle, vhdLocalPath, false, false); + + // Download with overwrite and verify it. + SaveVhdAndAssertContent(blobHandle, vhdLocalPath, true, false, false); + + // Try to download without overwrite. + try + { + SaveVhdAndAssertContent(blobHandle, vhdLocalPath, false, true); + Console.WriteLine("This is negative test. Should have failed!"); + pass = false; + } + catch (Exception e) + { + Console.WriteLine("Exception as expected: {0}", e.ToString()); + + } + + //DateTime testEndTime = DateTime.Now; + //Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + //Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + //System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + } + + [TestMethod(), TestCategory(Category.Functional), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Save-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\download_VHD.csv", "download_VHD#csv", DataAccessMethod.Sequential)] + public void SaveAzureVhdAllTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Choose the vhd path in your local machine + string vhdName = Convert.ToString(TestContext.DataRow["vhdLocalPath"]) +Utilities.GetUniqueShortName(); + FileInfo vhdLocalPath = new FileInfo(vhdName); + + // Download and verify it. + SaveVhdAndAssertContent(blobHandle, vhdLocalPath, 16, storageAccountKey.Secondary, true, false, true); + + // Download with overwrite and verify it. + SaveVhdAndAssertContent(blobHandle, vhdLocalPath, 32, storageAccountKey.Primary, true, false, true); + + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + + //System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + } + + + /// + /// + /// + [TestMethod(), TestCategory(Category.Functional), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Save-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\download_VHD.csv", "download_VHD#csv", DataAccessMethod.Sequential)] + [Ignore] + public void SaveAzureVhdResumeTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Choose the vhd path in your local machine + string vhdName = Convert.ToString(TestContext.DataRow["vhdLocalPath"]) + Utilities.GetUniqueShortName(); + FileInfo vhdLocalPath = new FileInfo(vhdName); + Assert.IsFalse(File.Exists(vhdLocalPath.FullName), "VHD file already exist={0}", vhdLocalPath); + + // Start uploading and stop after 5 seconds... + Console.WriteLine("downloading {0} to {1}", vhdBlobLocation, vhdLocalPath); + string result = vmPowershellCmdlets.SaveAzureVhdStop(blobHandle.Blob.Uri, vhdLocalPath, null, null, false, 5000); + + if (result.ToLowerInvariant() == "stopped") + { + Console.WriteLine("successfully stopped"); + + + SaveVhdAndAssertContent(blobHandle, vhdLocalPath, false, true); + } + else + { + Console.WriteLine("didn't stop!"); + } + + DateTime testEndTime = DateTime.Now; + Console.WriteLine("{0} test passed at {1}.", testName, testEndTime); + Console.WriteLine("Duration of the test pass: {0} seconds", (testEndTime - testStartTime).TotalSeconds); + + System.IO.File.AppendAllLines(perfFile, new string[] { String.Format("{0},{1}", testName, (testEndTime - testStartTime).TotalSeconds) }); + } + + + [TestMethod(), TestCategory(Category.Functional), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Save-AzureVhd)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\wrongPara_VHD.csv", "wrongPara_VHD#csv", DataAccessMethod.Sequential)] + public void SaveAzureVhdWrongParameterTest() + { + + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Set the source blob + string vhdBlobLocation = blobUrlRoot + Convert.ToString(TestContext.DataRow["vhdBlobLocation"]); + string vhdName = Convert.ToString(TestContext.DataRow["vhdLocalPath"]); + string numThreadstr = Convert.ToString(TestContext.DataRow["numThread"]); + int? numThread = String.IsNullOrWhiteSpace(numThreadstr) ? (int?) null : Int32.Parse(numThreadstr); + string storageKeystr = Convert.ToString(TestContext.DataRow["storageKey"]); + string storageKey = String.IsNullOrWhiteSpace(storageKeystr) ? (string)null : storageKeystr; + + // Download and verify it. + try + { + vmPowershellCmdlets.SaveAzureVhd(new Uri(vhdBlobLocation), new FileInfo(vhdName), numThread, storageKey, false); + Console.WriteLine("This is negative test. Should have failed!"); + pass = false; + } + catch (Exception e) + { + Console.WriteLine("Exception occurred as expected. Exception: {0}", e.ToString()); + } + } + + [TestCleanup] + public virtual void CleanUp() + { + Console.WriteLine("Test {0}", pass ? "passed" : "failed"); + } + [ClassCleanup] + public static void ClassClean() + { + if (deleteUploadedBlob) + { + Utilities.GetBlobHandle(vhdBlobLocation, storageAccountKey.Primary).Blob.Delete(); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ScenarioTest.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ScenarioTest.cs new file mode 100644 index 000000000000..a3f0998cc7c5 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ScenarioTest.cs @@ -0,0 +1,1629 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Net; +using System.Net.Cache; +using System.Reflection; +using System.Text; +using System.Threading; +using System.Xml; +using System.Xml.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests +{ + [TestClass] + public class ScenarioTest : ServiceManagementTest + { + private const string ReadyState = "ReadyRole"; + private string serviceName; + + //string perfFile; + + [TestInitialize] + public void Initialize() + { + serviceName = Utilities.GetUniqueShortName(serviceNamePrefix); + + pass = false; + testStartTime = DateTime.Now; + } + + /// + /// + [TestMethod(), TestCategory(Category.Scenario), TestCategory(Category.BVT), TestProperty("Feature", "IaaS"), Priority(1), Owner("priya"), Description("Test the cmdlets (New-AzureQuickVM,Get-AzureVMImage,Get-AzureVM,Get-AzureLocation,Import-AzurePublishSettingsFile,Get-AzureSubscription,Set-AzureSubscription)")] + public void NewWindowsAzureQuickVM() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + string newAzureQuickVMName1 = Utilities.GetUniqueShortName(vmNamePrefix); + string newAzureQuickVMName2 = Utilities.GetUniqueShortName(vmNamePrefix); + + try + { + if (string.IsNullOrEmpty(imageName)) + imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows" }, false); + + vmPowershellCmdlets.NewAzureQuickVM(OS.Windows, newAzureQuickVMName1, serviceName, imageName, username, password, locationName); + // Verify + Assert.AreEqual(newAzureQuickVMName1, vmPowershellCmdlets.GetAzureVM(newAzureQuickVMName1, serviceName).Name, true); + + vmPowershellCmdlets.NewAzureQuickVM(OS.Windows, newAzureQuickVMName2, serviceName, imageName, username, password); + // Verify + Assert.AreEqual(newAzureQuickVMName2, vmPowershellCmdlets.GetAzureVM(newAzureQuickVMName2, serviceName).Name, true); + + try + { + vmPowershellCmdlets.RemoveAzureVM(newAzureQuickVMName1 + "wrongVMName", serviceName); + Assert.Fail("Should Fail!!"); + } + catch (Exception e) + { + Console.WriteLine("Fail as expected: {0}", e.ToString()); + } + + + + // Cleanup + vmPowershellCmdlets.RemoveAzureVM(newAzureQuickVMName1, serviceName); + Assert.AreEqual(null, vmPowershellCmdlets.GetAzureVM(newAzureQuickVMName1, serviceName)); + Assert.AreEqual(newAzureQuickVMName2, vmPowershellCmdlets.GetAzureVM(newAzureQuickVMName2, serviceName).Name, true); + vmPowershellCmdlets.RemoveAzureVM(newAzureQuickVMName2, serviceName); + Assert.AreEqual(null, vmPowershellCmdlets.GetAzureVM(newAzureQuickVMName2, serviceName)); + + //Remove the service after removing the VM above + vmPowershellCmdlets.RemoveAzureService(serviceName); + + //DisableWinRMHttps Test Case + + try + { + vmPowershellCmdlets.NewAzureQuickVM(OS.Windows, newAzureQuickVMName2, serviceName, imageName, username, password, locationName, null, ""); + pass = true; + + } + catch (Exception e) + { + pass = false; + if (e is AssertFailedException) + { + throw; + } + + } + finally + { + if (pass == true) pass = true; + vmPowershellCmdlets.RemoveAzureVM(newAzureQuickVMName2, serviceName); + Assert.AreEqual(null, vmPowershellCmdlets.GetAzureVM(newAzureQuickVMName2, serviceName)); + } + + //End DisableWinRMHttps Test Case + + // Negative Test Case--It should Fail + + try + { + vmPowershellCmdlets.NewAzureQuickVM(OS.Windows, newAzureQuickVMName1, serviceName, imageName, username, password, locationName); + Assert.Fail("Should have failed, but succeeded!!"); + pass = true; + } + catch (Exception e) + { + if (e is AssertFailedException) + { + throw; + } + Console.WriteLine("This exception is expected."); + pass = true; + } + // End of Negative Test Case -- It should Fail] + + + } + catch (Exception e) + { + Console.WriteLine(e); + throw; + } + } + + /// + /// Get-AzureWinRMUri + /// + [TestMethod(), TestCategory(Category.Scenario), TestCategory(Category.BVT), TestProperty("Feature", "IaaS"), Priority(1), Owner("v-rakonj"), Description("Test the cmdlets (Get-AzureWinRMUri)")] + public void GetAzureWinRMUri() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + try + { + string newAzureQuickVMName = Utilities.GetUniqueShortName(vmNamePrefix); + if (string.IsNullOrEmpty(imageName)) + imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows" }, false); + + Utilities.RetryActionUntilSuccess(() => + { + if (vmPowershellCmdlets.TestAzureServiceName(serviceName)) + { + var op = vmPowershellCmdlets.RemoveAzureService(serviceName); + } + vmPowershellCmdlets.NewAzureQuickVM(OS.Windows, newAzureQuickVMName, serviceName, imageName, username, password, locationName); + }, "Windows Azure is currently performing an operation on this hosted service that requires exclusive access.", 10, 30); + + // Verify the VM + var vmRoleCtxt = vmPowershellCmdlets.GetAzureVM(newAzureQuickVMName, serviceName); + Assert.AreEqual(newAzureQuickVMName, vmRoleCtxt.Name, true, "VM names are not matched!"); + + // Get the WinRM Uri + var resultUri = vmPowershellCmdlets.GetAzureWinRMUri(serviceName, vmRoleCtxt.Name); + + // starting the test. + InputEndpointContext winRMEndpoint = null; + + foreach (InputEndpointContext inputEndpointCtxt in vmPowershellCmdlets.GetAzureEndPoint(vmRoleCtxt)) + { + if (inputEndpointCtxt.Name.Equals(WinRmEndpointName)) + { + winRMEndpoint = inputEndpointCtxt; + } + } + + Assert.IsNotNull(winRMEndpoint, "There is no WinRM endpoint!"); + Assert.IsNotNull(resultUri, "No WinRM Uri!"); + + Console.WriteLine("InputEndpointContext Name: {0}", winRMEndpoint.Name); + Console.WriteLine("InputEndpointContext port: {0}", winRMEndpoint.Port); + Console.WriteLine("InputEndpointContext protocol: {0}", winRMEndpoint.Protocol); + + Console.WriteLine("WinRM Uri: {0}", resultUri.AbsoluteUri); + Console.WriteLine("WinRM Port: {0}", resultUri.Port); + Console.WriteLine("WinRM Scheme: {0}", resultUri.Scheme); + + Assert.AreEqual(winRMEndpoint.Port, resultUri.Port, "Port numbers are not matched!"); + + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e); + throw; + } + } + + + /// + /// Basic Provisioning a Virtual Machine + /// + [TestMethod(), TestCategory(Category.Scenario), TestCategory(Category.BVT), TestProperty("Feature", "IaaS"), Priority(1), Owner("priya"), Description("Test the cmdlets (Get-AzureLocation,Test-AzureName ,Get-AzureVMImage,New-AzureQuickVM,Get-AzureVM ,Restart-AzureVM,Stop-AzureVM , Start-AzureVM)")] + public void ProvisionLinuxVM() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + string newAzureLinuxVMName = Utilities.GetUniqueShortName("PSLinuxVM"); + string linuxImageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Linux" }, false); + + try + { + vmPowershellCmdlets.NewAzureQuickVM(OS.Linux, newAzureLinuxVMName, serviceName, linuxImageName, "user", + password, locationName); + + // Verify + PersistentVMRoleContext vmRoleCtxt = vmPowershellCmdlets.GetAzureVM(newAzureLinuxVMName, serviceName); + Assert.AreEqual(newAzureLinuxVMName, vmRoleCtxt.Name, true); + try + { + vmPowershellCmdlets.RemoveAzureVM(newAzureLinuxVMName + "wrongVMName", serviceName); + Assert.Fail("Should Fail!!"); + } + catch (Exception e) + { + if (e is AssertFailedException) + { + throw; + } + Console.WriteLine("Fail as expected: {0}", e); + } + + // Cleanup + vmPowershellCmdlets.RemoveAzureVM(newAzureLinuxVMName, serviceName); + Assert.AreEqual(null, vmPowershellCmdlets.GetAzureVM(newAzureLinuxVMName, serviceName)); + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + } + + /// + /// Verify Advanced Provisioning for the Dev/Test Scenario + /// Make an Service + /// Make a VM + /// Add 4 additonal endpoints + /// Makes a storage account + /// + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "IaaS"), Priority(1), Owner("msampson"), Description("Test the cmdlets (Get-AzureDeployment, New-AzureVMConfig, Add-AzureProvisioningConfig, Add-AzureEndpoint, New-AzureVM, New-AzureStorageAccount)")] + public void DevTestProvisioning() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + string newAzureVM1Name = Utilities.GetUniqueShortName(vmNamePrefix); + //Find a Windows VM Image + imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows" }, false); + + //Specify a small Windows image, with username and pw + AzureVMConfigInfo azureVMConfigInfo1 = new AzureVMConfigInfo(newAzureVM1Name, InstanceSize.ExtraSmall.ToString(), imageName); + AzureProvisioningConfigInfo azureProvisioningConfig = new AzureProvisioningConfigInfo(OS.Windows, username, password); + AzureEndPointConfigInfo azureEndPointConfigInfo = new AzureEndPointConfigInfo(AzureEndPointConfigInfo.ParameterSet.NoLB, ProtocolInfo.tcp, 80, 80, "Http"); + + PersistentVMConfigInfo persistentVMConfigInfo1 = new PersistentVMConfigInfo(azureVMConfigInfo1, azureProvisioningConfig, null, azureEndPointConfigInfo); + PersistentVM persistentVM1 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo1); + + //Add all the endpoints that are added by the Dev Test feature in Azure Tools + azureEndPointConfigInfo = new AzureEndPointConfigInfo(AzureEndPointConfigInfo.ParameterSet.NoLB, ProtocolInfo.tcp, 443, 443, "Https"); + azureEndPointConfigInfo.Vm = persistentVM1; + persistentVM1 = vmPowershellCmdlets.AddAzureEndPoint(azureEndPointConfigInfo); + azureEndPointConfigInfo = new AzureEndPointConfigInfo(AzureEndPointConfigInfo.ParameterSet.NoLB, ProtocolInfo.tcp, 1433, 1433, "MSSQL"); + azureEndPointConfigInfo.Vm = persistentVM1; + persistentVM1 = vmPowershellCmdlets.AddAzureEndPoint(azureEndPointConfigInfo); + azureEndPointConfigInfo = new AzureEndPointConfigInfo(AzureEndPointConfigInfo.ParameterSet.NoLB, ProtocolInfo.tcp, 8172, 8172, "WebDeploy"); + azureEndPointConfigInfo.Vm = persistentVM1; + persistentVM1 = vmPowershellCmdlets.AddAzureEndPoint(azureEndPointConfigInfo); + + // Make a storage account named "devtestNNNNN" + string storageAcctName = "devtest" + new Random().Next(10000, 99999); + vmPowershellCmdlets.NewAzureStorageAccount(storageAcctName, locationName); + + // When making a new azure VM, you can't specify a location if you want to use the existing service + PersistentVM[] VMs = { persistentVM1 }; + vmPowershellCmdlets.NewAzureVM(serviceName, VMs, locationName); + + var svcDeployment = vmPowershellCmdlets.GetAzureDeployment(serviceName); + Assert.AreEqual(svcDeployment.ServiceName, serviceName); + var vmDeployment = vmPowershellCmdlets.GetAzureVM(newAzureVM1Name, serviceName); + Assert.AreEqual(vmDeployment.InstanceName, newAzureVM1Name); + + // Cleanup + vmPowershellCmdlets.RemoveAzureVM(newAzureVM1Name, serviceName); + Assert.AreEqual(null, vmPowershellCmdlets.GetAzureVM(newAzureVM1Name, serviceName)); + Utilities.RetryActionUntilSuccess(() => vmPowershellCmdlets.RemoveAzureStorageAccount(storageAcctName), "in use", 10, 30); + pass = true; + } + + /// + /// Verify Advanced Provisioning + /// + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "IaaS"), Priority(1), Owner("priya"), Description("Test the cmdlets (New-AzureService,New-AzureVMConfig,Add-AzureProvisioningConfig ,Add-AzureDataDisk ,Add-AzureEndpoint,New-AzureVM)")] + public void AdvancedProvisioning() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + string newAzureVM1Name = Utilities.GetUniqueShortName(vmNamePrefix); + string newAzureVM2Name = Utilities.GetUniqueShortName(vmNamePrefix); + if (string.IsNullOrEmpty(imageName)) + { + imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows" }, false); + } + + vmPowershellCmdlets.NewAzureService(serviceName, serviceName, locationName); + + var azureVMConfigInfo1 = new AzureVMConfigInfo(newAzureVM1Name, InstanceSize.ExtraSmall.ToString(), imageName); + var azureVMConfigInfo2 = new AzureVMConfigInfo(newAzureVM2Name, InstanceSize.ExtraSmall.ToString(), imageName); + var azureProvisioningConfig = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var azureDataDiskConfigInfo = new AddAzureDataDiskConfig(DiskCreateOption.CreateNew, 50, "datadisk1", 0); + var azureEndPointConfigInfo = new AzureEndPointConfigInfo(AzureEndPointConfigInfo.ParameterSet.CustomProbe, ProtocolInfo.tcp, 80, 80, "web", "lbweb", 80, ProtocolInfo.http, @"/", null, null); + + var persistentVMConfigInfo1 = new PersistentVMConfigInfo(azureVMConfigInfo1, azureProvisioningConfig, azureDataDiskConfigInfo, azureEndPointConfigInfo); + var persistentVMConfigInfo2 = new PersistentVMConfigInfo(azureVMConfigInfo2, azureProvisioningConfig, azureDataDiskConfigInfo, azureEndPointConfigInfo); + + PersistentVM persistentVM1 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo1); + PersistentVM persistentVM2 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo2); + + PersistentVM[] VMs = { persistentVM1, persistentVM2 }; + vmPowershellCmdlets.NewAzureVM(serviceName, VMs); + + // Cleanup + vmPowershellCmdlets.RemoveAzureVM(newAzureVM1Name, serviceName); + vmPowershellCmdlets.RemoveAzureVM(newAzureVM2Name, serviceName); + + Assert.AreEqual(null, vmPowershellCmdlets.GetAzureVM(newAzureVM1Name, serviceName)); + Assert.AreEqual(null, vmPowershellCmdlets.GetAzureVM(newAzureVM2Name, serviceName)); + pass = true; + } + + /// + /// Modifying Existing Virtual Machines + /// + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "IaaS"), Priority(1), Owner("priya"), Description("Test the cmdlets (New-AzureVMConfig,Add-AzureProvisioningConfig ,Add-AzureDataDisk ,Add-AzureEndpoint,New-AzureVM)")] + public void ModifyingVM() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + string newAzureQuickVMName = Utilities.GetUniqueShortName(vmNamePrefix); + if (string.IsNullOrEmpty(imageName)) + imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows" }, false); + + vmPowershellCmdlets.NewAzureQuickVM(OS.Windows, newAzureQuickVMName, serviceName, imageName, username, password, locationName); + + AddAzureDataDiskConfig azureDataDiskConfigInfo1 = new AddAzureDataDiskConfig(DiskCreateOption.CreateNew, 50, "datadisk1", 0); + AddAzureDataDiskConfig azureDataDiskConfigInfo2 = new AddAzureDataDiskConfig(DiskCreateOption.CreateNew, 50, "datadisk2", 1); + AzureEndPointConfigInfo azureEndPointConfigInfo = new AzureEndPointConfigInfo(AzureEndPointConfigInfo.ParameterSet.NoLB, ProtocolInfo.tcp, 1433, 2000, "sql"); + AddAzureDataDiskConfig[] dataDiskConfig = { azureDataDiskConfigInfo1, azureDataDiskConfigInfo2 }; + vmPowershellCmdlets.AddVMDataDisksAndEndPoint(newAzureQuickVMName, serviceName, dataDiskConfig, azureEndPointConfigInfo); + + SetAzureDataDiskConfig setAzureDataDiskConfig1 = new SetAzureDataDiskConfig(HostCaching.ReadWrite, 0); + SetAzureDataDiskConfig setAzureDataDiskConfig2 = new SetAzureDataDiskConfig(HostCaching.ReadWrite, 0); + SetAzureDataDiskConfig[] diskConfig = { setAzureDataDiskConfig1, setAzureDataDiskConfig2 }; + vmPowershellCmdlets.SetVMDataDisks(newAzureQuickVMName, serviceName, diskConfig); + + vmPowershellCmdlets.GetAzureDataDisk(newAzureQuickVMName, serviceName); + + // Cleanup + vmPowershellCmdlets.RemoveAzureVM(newAzureQuickVMName, serviceName); + + Assert.AreEqual(null, vmPowershellCmdlets.GetAzureVM(newAzureQuickVMName, serviceName)); + pass = true; + } + + /// + /// Changes that Require a Reboot + /// + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "IaaS"), Priority(1), Owner("priya"), Description("Test the cmdlets (Get-AzureVM,Set-AzureDataDisk ,Update-AzureVM,Set-AzureVMSize)")] + public void UpdateAndReboot() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + string newAzureQuickVMName = Utilities.GetUniqueShortName("PSTestVM"); + if (string.IsNullOrEmpty(imageName)) + imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows" }, false); + + vmPowershellCmdlets.NewAzureQuickVM(OS.Windows, newAzureQuickVMName, serviceName, imageName, username, password, locationName); + + var azureDataDiskConfigInfo1 = new AddAzureDataDiskConfig(DiskCreateOption.CreateNew, 50, "datadisk1", 0); + var azureDataDiskConfigInfo2 = new AddAzureDataDiskConfig(DiskCreateOption.CreateNew, 50, "datadisk2", 1); + AddAzureDataDiskConfig[] dataDiskConfig = { azureDataDiskConfigInfo1, azureDataDiskConfigInfo2 }; + vmPowershellCmdlets.AddVMDataDisks(newAzureQuickVMName, serviceName, dataDiskConfig); + + var setAzureDataDiskConfig1 = new SetAzureDataDiskConfig(HostCaching.ReadOnly, 0); + var setAzureDataDiskConfig2 = new SetAzureDataDiskConfig(HostCaching.ReadOnly, 0); + SetAzureDataDiskConfig[] diskConfig = { setAzureDataDiskConfig1, setAzureDataDiskConfig2 }; + vmPowershellCmdlets.SetVMDataDisks(newAzureQuickVMName, serviceName, diskConfig); + + var vmSizeConfig = new SetAzureVMSizeConfig(InstanceSize.Medium.ToString()); + vmPowershellCmdlets.SetVMSize(newAzureQuickVMName, serviceName, vmSizeConfig); + + // Cleanup + vmPowershellCmdlets.RemoveAzureVM(newAzureQuickVMName, serviceName); + Assert.AreEqual(null, vmPowershellCmdlets.GetAzureVM(newAzureQuickVMName, serviceName)); + pass = true; + } + + /// + /// + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "IaaS"), Priority(1), Owner("hylee"), Description("Test the cmdlets (Get-AzureDisk,Remove-AzureVM,Remove-AzureDisk,Get-AzureVMImage)")] + public void ManagingDiskImages() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Create a unique VM name and Service Name + string newAzureQuickVMName = Utilities.GetUniqueShortName(vmNamePrefix); + if (string.IsNullOrEmpty(imageName)) + { + imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows" }, false); + } + + vmPowershellCmdlets.NewAzureQuickVM(OS.Windows, newAzureQuickVMName, serviceName, imageName, username, password, locationName); // New-AzureQuickVM + Console.WriteLine("VM is created successfully: -Name {0} -ServiceName {1}", newAzureQuickVMName, serviceName); + + // starting the test. + Collection vmDisks = vmPowershellCmdlets.GetAzureDiskAttachedToRoleName(new[] { newAzureQuickVMName }); // Get-AzureDisk | Where {$_.AttachedTo.RoleName -eq $vmname } + + foreach (var disk in vmDisks) + Console.WriteLine("The disk, {0}, is created", disk.DiskName); + + vmPowershellCmdlets.RemoveAzureVM(newAzureQuickVMName, serviceName); // Remove-AzureVM + Assert.AreEqual(null, vmPowershellCmdlets.GetAzureVM(newAzureQuickVMName, serviceName)); + Console.WriteLine("The VM, {0}, is successfully removed.", newAzureQuickVMName); + + foreach (var disk in vmDisks) + { + for (int i = 0; i < 3; i++) + { + try + { + vmPowershellCmdlets.RemoveAzureDisk(disk.DiskName, false); // Remove-AzureDisk + break; + } + catch (Exception e) + { + if (e.ToString().ToLowerInvariant().Contains("currently in use") && i != 2) + { + Console.WriteLine("The vhd, {0}, is still in the state of being used by the deleted VM", disk.DiskName); + Thread.Sleep(120000); + continue; + } + else + { + Assert.Fail("error during Remove-AzureDisk: {0}", e.ToString()); + } + } + } + + try + { + vmPowershellCmdlets.GetAzureDisk(disk.DiskName); // Get-AzureDisk -DiskName (try to get the removed disk.) + Console.WriteLine("Disk is not removed: {0}", disk.DiskName); + pass = false; + } + catch (Exception e) + { + if (e.ToString().ToLowerInvariant().Contains("does not exist")) + { + Console.WriteLine("The disk, {0}, is successfully removed.", disk.DiskName); + continue; + } + else + { + Assert.Fail("Exception: {0}", e.ToString()); + } + } + } + pass = true; + } + + /// + /// + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "IaaS"), Priority(1), Owner("hylee"), Description("Test the cmdlets (New-AzureVMConfig,Add-AzureProvisioningConfig,New-AzureVM,Save-AzureVMImage)")] + public void CaptureImagingExportingImportingVMConfig() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Create a unique VM name + string newAzureVMName = Utilities.GetUniqueShortName("PSTestVM"); + Console.WriteLine("VM Name: {0}", newAzureVMName); + + // Create a unique Service Name + vmPowershellCmdlets.NewAzureService(serviceName, serviceName, locationName); + Console.WriteLine("Service Name: {0}", serviceName); + if (string.IsNullOrEmpty(imageName)) + imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows" }, false); + + // starting the test. + var azureVMConfigInfo = new AzureVMConfigInfo(newAzureVMName, InstanceSize.Small.ToString(), imageName); // parameters for New-AzureVMConfig (-Name -InstanceSize -ImageName) + var azureProvisioningConfig = new AzureProvisioningConfigInfo(OS.Windows, username, password); // parameters for Add-AzureProvisioningConfig (-Windows -Password) + var persistentVMConfigInfo = new PersistentVMConfigInfo(azureVMConfigInfo, azureProvisioningConfig, null, null); + PersistentVM persistentVM = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo); // New-AzureVMConfig & Add-AzureProvisioningConfig + + PersistentVM[] VMs = { persistentVM }; + vmPowershellCmdlets.NewAzureVM(serviceName, VMs); // New-AzureVM + Console.WriteLine("The VM is successfully created: {0}", persistentVM.RoleName); + PersistentVMRoleContext vmRoleCtxt = vmPowershellCmdlets.GetAzureVM(persistentVM.RoleName, serviceName); + Assert.AreEqual(vmRoleCtxt.Name, persistentVM.RoleName, true); + + + vmPowershellCmdlets.StopAzureVM(newAzureVMName, serviceName, true); // Stop-AzureVM + for (int i = 0; i < 3; i++) + { + vmRoleCtxt = vmPowershellCmdlets.GetAzureVM(persistentVM.RoleName, serviceName); + if (vmRoleCtxt.InstanceStatus == "StoppedVM") + { + break; + } + Console.WriteLine("The status of the VM {0} : {1}", persistentVM.RoleName, vmRoleCtxt.InstanceStatus); + Thread.Sleep(120000); + } + Assert.AreEqual(vmRoleCtxt.InstanceStatus, "StoppedVM", true); + + // Save-AzureVMImage + vmPowershellCmdlets.SaveAzureVMImage(serviceName, newAzureVMName, newAzureVMName); + + // Verify VM image. + var image = vmPowershellCmdlets.GetAzureVMImage(newAzureVMName)[0]; + + Assert.AreEqual("Windows", image.OS, "OS is not matching!"); + Assert.AreEqual(newAzureVMName, image.ImageName, "Names are not matching!"); + + // Verify that the VM is removed + Assert.AreEqual(null, vmPowershellCmdlets.GetAzureVM(persistentVM.RoleName, serviceName)); + + // Cleanup the registered image + vmPowershellCmdlets.RemoveAzureVMImage(newAzureVMName, true); + + pass = true; + } + + /// + /// + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "IaaS"), Priority(1), Owner("hylee"), Description("Test the cmdlets (Export-AzureVM,Remove-AzureVM,Import-AzureVM,New-AzureVM)")] + public void ExportingImportingVMConfigAsTemplateforRepeatableUsage() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Create a new Azure quick VM + string newAzureQuickVMName = Utilities.GetUniqueShortName("PSTestVM"); + if (string.IsNullOrEmpty(imageName)) + imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows" }, false); + vmPowershellCmdlets.NewAzureQuickVM(OS.Windows, newAzureQuickVMName, serviceName, imageName, username, password, locationName); // New-AzureQuickVM + Console.WriteLine("VM is created successfully: -Name {0} -ServiceName {1}", newAzureQuickVMName, serviceName); + + // starting the test. + string path = ".\\mytestvmconfig1.xml"; + PersistentVMRoleContext vmRole = vmPowershellCmdlets.ExportAzureVM(newAzureQuickVMName, serviceName, path); // Export-AzureVM + Console.WriteLine("Exporting VM is successfully done: path - {0} Name - {1}", path, vmRole.Name); + + vmPowershellCmdlets.RemoveAzureVM(newAzureQuickVMName, serviceName); // Remove-AzureVM + Assert.AreEqual(null, vmPowershellCmdlets.GetAzureVM(newAzureQuickVMName, serviceName)); + Console.WriteLine("The VM is successfully removed: {0}", newAzureQuickVMName); + + List VMs = new List(); + foreach (var pervm in vmPowershellCmdlets.ImportAzureVM(path)) // Import-AzureVM + { + VMs.Add(pervm); + Console.WriteLine("The VM, {0}, is imported.", pervm.RoleName); + } + + + for (int i = 0; i < 3; i++) + { + try + { + vmPowershellCmdlets.NewAzureVM(serviceName, VMs.ToArray()); // New-AzureVM + Console.WriteLine("All VMs are successfully created."); + foreach (var vm in VMs) + { + Console.WriteLine("created VM: {0}", vm.RoleName); + } + break; + } + catch (Exception e) + { + if (e.ToString().ToLowerInvariant().Contains("currently in use") && i != 2) + { + Console.WriteLine("The removed VM is still using the vhd"); + Thread.Sleep(120000); + continue; + } + else + { + Assert.Fail("error during New-AzureVM: {0}", e.ToString()); + } + } + } + + // Verify + PersistentVMRoleContext vmRoleCtxt = vmPowershellCmdlets.GetAzureVM(newAzureQuickVMName, serviceName); + Assert.AreEqual(newAzureQuickVMName, vmRoleCtxt.Name, true); + + // Cleanup + vmPowershellCmdlets.RemoveAzureVM(newAzureQuickVMName, serviceName); + Assert.AreEqual(null, vmPowershellCmdlets.GetAzureVM(newAzureQuickVMName, serviceName)); + + pass = true; + } + + /// + /// + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "IaaS"), Priority(1), Owner("hylee"), Description("Test the cmdlets (Get-AzureVM,Get-AzureEndpoint,Get-AzureRemoteDesktopFile)")] + public void ManagingRDPSSHConnectivity() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Create a new Azure quick VM + string newAzureQuickVMName = Utilities.GetUniqueShortName("PSTestVM"); + if (string.IsNullOrEmpty(imageName)) + imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows" }, false); + vmPowershellCmdlets.NewAzureQuickVM(OS.Windows, newAzureQuickVMName, serviceName, imageName, username, password, locationName); // New-AzureQuickVM + Console.WriteLine("VM is created successfully: -Name {0} -ServiceName {1}", newAzureQuickVMName, serviceName); + + // starting the test. + PersistentVMRoleContext vmRoleCtxt = vmPowershellCmdlets.GetAzureVM(newAzureQuickVMName, serviceName); // Get-AzureVM + InputEndpointContext inputEndpointCtxt = vmPowershellCmdlets.GetAzureEndPoint(vmRoleCtxt)[0]; // Get-AzureEndpoint + Console.WriteLine("InputEndpointContext Name: {0}", inputEndpointCtxt.Name); + Console.WriteLine("InputEndpointContext port: {0}", inputEndpointCtxt.Port); + Console.WriteLine("InputEndpointContext protocol: {0}", inputEndpointCtxt.Protocol); + Assert.AreEqual(WinRmEndpointName, inputEndpointCtxt.Name, true); + + string path = ".\\myvmconnection.rdp"; + vmPowershellCmdlets.GetAzureRemoteDesktopFile(newAzureQuickVMName, serviceName, path, false); // Get-AzureRemoteDesktopFile + Console.WriteLine("RDP file is successfully created at: {0}", path); + + // ToDo: Automate RDP. + //vmPowershellCmdlets.GetAzureRemoteDesktopFile(newAzureQuickVMName, newAzureQuickVMSvcName, path, true); // Get-AzureRemoteDesktopFile -Launch + + Console.WriteLine("Test passed"); + + // Cleanup + vmPowershellCmdlets.RemoveAzureVM(newAzureQuickVMName, serviceName); + Assert.AreEqual(null, vmPowershellCmdlets.GetAzureVM(newAzureQuickVMName, serviceName)); + + pass = true; + } + + /// + /// Basic Provisioning a Virtual Machine + /// + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "PAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((New,Get,Set,Remove,Move)-AzureDeployment)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\packageScenario.csv", "packageScenario#csv", DataAccessMethod.Sequential)] + public void DeploymentUpgrade() + { + + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Choose the package and config files from local machine + string path = Convert.ToString(TestContext.DataRow["path"]); + string packageName = Convert.ToString(TestContext.DataRow["packageName"]); + string configName = Convert.ToString(TestContext.DataRow["configName"]); + + var packagePath1 = new FileInfo(@path + packageName); // package with two roles + var configPath1 = new FileInfo(@path + configName); // config with 2 roles, 4 instances each + + Assert.IsTrue(File.Exists(packagePath1.FullName), "VHD file not exist={0}", packagePath1); + Assert.IsTrue(File.Exists(configPath1.FullName), "VHD file not exist={0}", configPath1); + + string deploymentName = "deployment1"; + string deploymentLabel = "label1"; + DeploymentInfoContext result; + + try + { + vmPowershellCmdlets.NewAzureService(serviceName, serviceName, locationName); + Console.WriteLine("service, {0}, is created.", serviceName); + + // New deployment to Production + DateTime start = DateTime.Now; + vmPowershellCmdlets.NewAzureDeployment(serviceName, packagePath1.FullName, configPath1.FullName, DeploymentSlotType.Production, deploymentLabel, deploymentName, false, false); + + TimeSpan duration = DateTime.Now - start; + Console.WriteLine("Time for all instances to become in ready state: {0}", DateTime.Now - start); + + // Auto-Upgrade the deployment + start = DateTime.Now; + vmPowershellCmdlets.SetAzureDeploymentUpgrade(serviceName, DeploymentSlotType.Production, UpgradeType.Auto, packagePath1.FullName, configPath1.FullName); + duration = DateTime.Now - start; + Console.WriteLine("Auto upgrade took {0}.", duration); + + result = vmPowershellCmdlets.GetAzureDeployment(serviceName, DeploymentSlotType.Production); + Utilities.PrintAndCompareDeployment(result, serviceName, deploymentName, serviceName, DeploymentSlotType.Production, null, 4); + Console.WriteLine("successfully updated the deployment"); + + // Manual-Upgrade the deployment + start = DateTime.Now; + vmPowershellCmdlets.SetAzureDeploymentUpgrade(serviceName, DeploymentSlotType.Production, UpgradeType.Manual, packagePath1.FullName, configPath1.FullName); + vmPowershellCmdlets.SetAzureWalkUpgradeDomain(serviceName, DeploymentSlotType.Production, 0); + vmPowershellCmdlets.SetAzureWalkUpgradeDomain(serviceName, DeploymentSlotType.Production, 1); + vmPowershellCmdlets.SetAzureWalkUpgradeDomain(serviceName, DeploymentSlotType.Production, 2); + duration = DateTime.Now - start; + Console.WriteLine("Manual upgrade took {0}.", duration); + + result = vmPowershellCmdlets.GetAzureDeployment(serviceName, DeploymentSlotType.Production); + Utilities.PrintAndCompareDeployment(result, serviceName, deploymentName, serviceName, DeploymentSlotType.Production, null, 4); + Console.WriteLine("successfully updated the deployment"); + + // Simulatenous-Upgrade the deployment + start = DateTime.Now; + vmPowershellCmdlets.SetAzureDeploymentUpgrade(serviceName, DeploymentSlotType.Production, UpgradeType.Simultaneous, packagePath1.FullName, configPath1.FullName); + duration = DateTime.Now - start; + Console.WriteLine("Simulatenous upgrade took {0}.", duration); + + result = vmPowershellCmdlets.GetAzureDeployment(serviceName, DeploymentSlotType.Production); + Utilities.PrintAndCompareDeployment(result, serviceName, deploymentName, serviceName, DeploymentSlotType.Production, null, 4); + Console.WriteLine("successfully updated the deployment"); + + vmPowershellCmdlets.RemoveAzureDeployment(serviceName, DeploymentSlotType.Production, true); + pass = Utilities.CheckRemove(vmPowershellCmdlets.GetAzureDeployment, serviceName); + } + catch (Exception e) + { + pass = false; + Assert.Fail("Exception occurred: {0}", e.ToString()); + } + } + + + /// + /// AzureVNetGatewayTest() + /// + /// Note: Create a VNet, a LocalNet from the portal without creating a gateway. + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), + Description("Test the cmdlet ((Set,Remove)-AzureVNetConfig, Get-AzureVNetSite, (New,Get,Set,Remove)-AzureVNetGateway, Get-AzureVNetConnection)")] + public void VNetTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + string newAzureQuickVMName = Utilities.GetUniqueShortName(vmNamePrefix); + if (string.IsNullOrEmpty(imageName)) + imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows" }, false); + + // Read the vnetconfig file and get the names of local networks, virtual networks and affinity groups. + XDocument vnetconfigxml = XDocument.Load(vnetConfigFilePath); + List localNets = new List(); + List virtualNets = new List(); + HashSet affinityGroups = new HashSet(); + Dictionary dns = new Dictionary(); + List localNetworkSites = new List(); + AddressPrefixList prefixlist = null; + + foreach (XElement el in vnetconfigxml.Descendants()) + { + switch (el.Name.LocalName) + { + case "LocalNetworkSite": + { + localNets.Add(el.FirstAttribute.Value); + List elements = el.Elements().ToList(); + prefixlist = new AddressPrefixList(); + prefixlist.Add(elements[0].Elements().First().Value); + localNetworkSites.Add(new LocalNetworkSite() + { + VpnGatewayAddress = elements[1].Value, + AddressSpace = new AddressSpace() { AddressPrefixes = prefixlist } + } + ); + } + break; + case "VirtualNetworkSite": + virtualNets.Add(el.Attribute("name").Value); + affinityGroups.Add(el.Attribute("AffinityGroup").Value); + break; + case "DnsServer": + { + dns.Add(el.Attribute("name").Value, el.Attribute("IPAddress").Value); + break; + } + default: + break; + } + } + + foreach (string aff in affinityGroups) + { + if (Utilities.CheckRemove(vmPowershellCmdlets.GetAzureAffinityGroup, aff)) + { + + vmPowershellCmdlets.NewAzureAffinityGroup(aff, locationName, null, null); + } + } + + string vnet1 = virtualNets[0]; + string lnet1 = localNets[0]; + + try + { + vmPowershellCmdlets.NewAzureQuickVM(OS.Windows, newAzureQuickVMName, serviceName, imageName, username, password, locationName); // New-AzureQuickVM + Console.WriteLine("VM is created successfully: -Name {0} -ServiceName {1}", newAzureQuickVMName, serviceName); + + vmPowershellCmdlets.SetAzureVNetConfig(vnetConfigFilePath); + + foreach (VirtualNetworkSiteContext site in vmPowershellCmdlets.GetAzureVNetSite(null)) + { + Console.WriteLine("Name: {0}, AffinityGroup: {1}", site.Name, site.AffinityGroup); + Console.WriteLine("Name: {0}, Location: {1}", site.Name, site.Location); + } + + foreach (string vnet in virtualNets) + { + VirtualNetworkSiteContext vnetsite = vmPowershellCmdlets.GetAzureVNetSite(vnet)[0]; + Assert.AreEqual(vnet, vnetsite.Name); + + //Verify DNS and IPAddress + Assert.AreEqual(1, vnetsite.DnsServers.Count()); + Assert.IsTrue(dns.ContainsKey(vnetsite.DnsServers.First().Name)); + Assert.AreEqual(dns[vnetsite.DnsServers.First().Name], vnetsite.DnsServers.First().Address); + + //Verify the Gateway sites + Assert.AreEqual(1, vnetsite.GatewaySites.Count); + Assert.AreEqual(localNetworkSites[0].VpnGatewayAddress, vnetsite.GatewaySites[0].VpnGatewayAddress); + Assert.IsTrue(localNetworkSites[0].AddressSpace.AddressPrefixes.All(c => vnetsite.GatewaySites[0].AddressSpace.AddressPrefixes.Contains(c))); + + Assert.AreEqual(Microsoft.Azure.Commands.Network.ProvisioningState.NotProvisioned, vmPowershellCmdlets.GetAzureVNetGateway(vnet)[0].State); + } + + vmPowershellCmdlets.NewAzureVNetGateway(vnet1); + + Assert.IsTrue(GetVNetState(vnet1, Microsoft.Azure.Commands.Network.ProvisioningState.Provisioned, 12, 60)); + + // Set-AzureVNetGateway -Connect Test + vmPowershellCmdlets.SetAzureVNetGateway("connect", vnet1, lnet1); + + foreach (Microsoft.Azure.Commands.Network.Gateway.Model.GatewayConnectionContext connection in vmPowershellCmdlets.GetAzureVNetConnection(vnet1)) + { + Console.WriteLine("Connectivity: {0}, LocalNetwork: {1}", connection.ConnectivityState, connection.LocalNetworkSiteName); + Assert.IsFalse(connection.ConnectivityState.ToLowerInvariant().Contains("notconnected")); + } + + // Get-AzureVNetGatewayKey + Microsoft.Azure.Commands.Network.Gateway.Model.SharedKeyContext result = vmPowershellCmdlets.GetAzureVNetGatewayKey(vnet1, + vmPowershellCmdlets.GetAzureVNetConnection(vnet1).First().LocalNetworkSiteName); + Console.WriteLine("Gateway Key: {0}", result.Value); + + + // Set-AzureVNetGateway -Disconnect + vmPowershellCmdlets.SetAzureVNetGateway("disconnect", vnet1, lnet1); + + foreach (Microsoft.Azure.Commands.Network.Gateway.Model.GatewayConnectionContext connection in vmPowershellCmdlets.GetAzureVNetConnection(vnet1)) + { + Console.WriteLine("Connectivity: {0}, LocalNetwork: {1}", connection.ConnectivityState, connection.LocalNetworkSiteName); + } + + // Remove-AzureVnetGateway + vmPowershellCmdlets.RemoveAzureVNetGateway(vnet1); + + foreach (string vnet in virtualNets) + { + Microsoft.Azure.Commands.Network.VirtualNetworkGatewayContext gateway = vmPowershellCmdlets.GetAzureVNetGateway(vnet)[0]; + + Console.WriteLine("State: {0}, VIP: {1}", gateway.State.ToString(), gateway.VIPAddress); + if (vnet.Equals(vnet1)) + { + if (gateway.State != Microsoft.Azure.Commands.Network.ProvisioningState.Deprovisioning && + gateway.State != Microsoft.Azure.Commands.Network.ProvisioningState.NotProvisioned) + { + Assert.Fail("The state of the gateway is neither Deprovisioning nor NotProvisioned!"); + } + } + else + { + Assert.AreEqual(Microsoft.Azure.Commands.Network.ProvisioningState.NotProvisioned, gateway.State); + } + + } + + Utilities.RetryActionUntilSuccess(() => vmPowershellCmdlets.RemoveAzureVNetConfig(), "in use", 10, 30); + + pass = true; + + } + catch (Exception e) + { + pass = false; + if (cleanupIfFailed) + { + try + { + vmPowershellCmdlets.RemoveAzureVNetGateway(vnet1); + } + catch { } + Utilities.RetryActionUntilSuccess(() => vmPowershellCmdlets.RemoveAzureVNetConfig(), "in use", 10, 30); + } + Assert.Fail("Exception occurred: {0}", e.ToString()); + } + finally + { + foreach (string aff in affinityGroups) + { + try + { + vmPowershellCmdlets.RemoveAzureAffinityGroup(aff); + } + catch + { + // Some service uses the affinity group, so it cannot be deleted. Just leave it. + } + } + } + } + + #region AzureServiceDiagnosticsExtension Tests + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "PAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (New-AzureServiceRemoteDesktopConfig)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\nodiagpackage.csv", "nodiagpackage#csv", DataAccessMethod.Sequential)] + [Ignore] + public void AzureServiceDiagnosticsExtensionConfigScenarioTest() + { + + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Choose the package and config files from local machine + string packageName = Convert.ToString(TestContext.DataRow["packageName"]); + string configName = Convert.ToString(TestContext.DataRow["configName"]); + var packagePath1 = new FileInfo(Directory.GetCurrentDirectory() + "\\" + packageName); + var configPath1 = new FileInfo(Directory.GetCurrentDirectory() + "\\" + configName); + + Assert.IsTrue(File.Exists(packagePath1.FullName), "VHD file not exist={0}", packagePath1); + Assert.IsTrue(File.Exists(configPath1.FullName), "VHD file not exist={0}", configPath1); + + string deploymentName = "deployment1"; + string deploymentLabel = "label1"; + DeploymentInfoContext result; + string storage = defaultAzureSubscription.CurrentStorageAccountName; + string daConfig = @".\da.xml"; + + try + { + serviceName = Utilities.GetUniqueShortName(serviceNamePrefix); + vmPowershellCmdlets.NewAzureService(serviceName, serviceName, locationName); + Console.WriteLine("service, {0}, is created.", serviceName); + + ExtensionConfigurationInput config = vmPowershellCmdlets.NewAzureServiceDiagnosticsExtensionConfig(storage, daConfig); + + vmPowershellCmdlets.NewAzureDeployment(serviceName, packagePath1.FullName, configPath1.FullName, DeploymentSlotType.Production, deploymentLabel, deploymentName, false, false, config); + + result = vmPowershellCmdlets.GetAzureDeployment(serviceName, DeploymentSlotType.Production); + pass = Utilities.PrintAndCompareDeployment(result, serviceName, deploymentName, deploymentLabel, DeploymentSlotType.Production, null, 2); + Console.WriteLine("successfully deployed the package"); + + DiagnosticExtensionContext resultContext = vmPowershellCmdlets.GetAzureServiceDiagnosticsExtension(serviceName)[0]; + + VerifyDiagExtContext(resultContext, "AllRoles", "Default-Diagnostics-Production-Ext-0", storage, daConfig); + + vmPowershellCmdlets.RemoveAzureServiceDiagnosticsExtension(serviceName); + + Assert.AreEqual(vmPowershellCmdlets.GetAzureServiceDiagnosticsExtension(serviceName).Count, 0); + + vmPowershellCmdlets.RemoveAzureDeployment(serviceName, DeploymentSlotType.Production, true); + + pass &= Utilities.CheckRemove(vmPowershellCmdlets.GetAzureDeployment, serviceName, DeploymentSlotType.Production); + } + catch (Exception e) + { + pass = false; + Assert.Fail("Exception occurred: {0}", e.ToString()); + } + } + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "PAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Get,Set,Remove)-AzureServiceRemoteDesktopExtension)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\nodiagpackage.csv", "nodiagpackage#csv", DataAccessMethod.Sequential)] + [Ignore] + public void AzureServiceDiagnosticsExtensionTest() + { + + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Choose the package and config files from local machine + string packageName = Convert.ToString(TestContext.DataRow["packageName"]); + string configName = Convert.ToString(TestContext.DataRow["configName"]); + var packagePath1 = new FileInfo(Directory.GetCurrentDirectory() + "\\" + packageName); + var configPath1 = new FileInfo(Directory.GetCurrentDirectory() + "\\" + configName); + + Assert.IsTrue(File.Exists(packagePath1.FullName), "VHD file not exist={0}", packagePath1); + Assert.IsTrue(File.Exists(configPath1.FullName), "VHD file not exist={0}", configPath1); + + string deploymentName = "deployment1"; + string deploymentLabel = "label1"; + DeploymentInfoContext result; + + string storage = defaultAzureSubscription.CurrentStorageAccountName; + string daConfig = @".\da.xml"; + + string defaultExtensionId = string.Format("Default-{0}-Production-Ext-0", Utilities.PaaSDiagnosticsExtensionName); + + try + { + serviceName = Utilities.GetUniqueShortName(serviceNamePrefix); + vmPowershellCmdlets.NewAzureService(serviceName, serviceName, locationName); + Console.WriteLine("service, {0}, is created.", serviceName); + + vmPowershellCmdlets.NewAzureDeployment(serviceName, packagePath1.FullName, configPath1.FullName, DeploymentSlotType.Production, deploymentLabel, deploymentName, false, false); + + result = vmPowershellCmdlets.GetAzureDeployment(serviceName, DeploymentSlotType.Production); + pass = Utilities.PrintAndCompareDeployment(result, serviceName, deploymentName, deploymentLabel, DeploymentSlotType.Production, null, 2); + Console.WriteLine("successfully deployed the package"); + + vmPowershellCmdlets.SetAzureServiceDiagnosticsExtension(serviceName, storage, daConfig, null, null); + + DiagnosticExtensionContext resultContext = vmPowershellCmdlets.GetAzureServiceDiagnosticsExtension(serviceName)[0]; + + Assert.IsTrue(VerifyDiagExtContext(resultContext, "AllRoles", defaultExtensionId, storage, daConfig)); + + vmPowershellCmdlets.RemoveAzureServiceDiagnosticsExtension(serviceName, true); + + Assert.AreEqual(vmPowershellCmdlets.GetAzureServiceDiagnosticsExtension(serviceName).Count, 0); + + vmPowershellCmdlets.RemoveAzureDeployment(serviceName, DeploymentSlotType.Production, true); + + pass &= Utilities.CheckRemove(vmPowershellCmdlets.GetAzureDeployment, serviceName, DeploymentSlotType.Production); + } + catch (Exception e) + { + pass = false; + Assert.Fail("Exception occurred: {0}", e.ToString()); + } + } + + #endregion + + + #region AzureServiceRemoteDesktopExtension Tests + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "PAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (New-AzureServiceRemoteDesktopConfig)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\package.csv", "package#csv", DataAccessMethod.Sequential)] + public void AzureServiceRemoteDesktopExtensionConfigScenarioTest() + { + + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Choose the package and config files from local machine + string packageName = Convert.ToString(TestContext.DataRow["upgradePackage"]); + string configName = Convert.ToString(TestContext.DataRow["upgradeConfig"]); + var packagePath1 = new FileInfo(Directory.GetCurrentDirectory() + "\\" + packageName); + var configPath1 = new FileInfo(Directory.GetCurrentDirectory() + "\\" + configName); + + Assert.IsTrue(File.Exists(packagePath1.FullName), "VHD file not exist={0}", packagePath1); + Assert.IsTrue(File.Exists(configPath1.FullName), "VHD file not exist={0}", configPath1); + + string deploymentName = "deployment1"; + string deploymentLabel = "label1"; + DeploymentInfoContext result; + + PSCredential cred = new PSCredential(username, Utilities.convertToSecureString(password)); + string rdpPath = @".\WebRole1.rdp"; + + try + { + + serviceName = Utilities.GetUniqueShortName(serviceNamePrefix); + vmPowershellCmdlets.NewAzureService(serviceName, serviceName, locationName); + Console.WriteLine("service, {0}, is created.", serviceName); + + ExtensionConfigurationInput config = vmPowershellCmdlets.NewAzureServiceRemoteDesktopExtensionConfig(cred); + + vmPowershellCmdlets.NewAzureDeployment(serviceName, packagePath1.FullName, configPath1.FullName, DeploymentSlotType.Production, deploymentLabel, deploymentName, false, false, config); + + result = vmPowershellCmdlets.GetAzureDeployment(serviceName, DeploymentSlotType.Production); + pass = Utilities.PrintAndCompareDeployment(result, serviceName, deploymentName, deploymentLabel, DeploymentSlotType.Production, null, 2); + Console.WriteLine("successfully deployed the package"); + + RemoteDesktopExtensionContext resultContext = vmPowershellCmdlets.GetAzureServiceRemoteDesktopExtension(serviceName)[0]; + + VerifyRDPExtContext(resultContext, "AllRoles", "Default-RDP-Production-Ext-0", username, DateTime.Now.AddYears(1)); + + VerifyRDP(serviceName, rdpPath); + + vmPowershellCmdlets.RemoveAzureServiceRemoteDesktopExtension(serviceName); + + try + { + vmPowershellCmdlets.GetAzureRemoteDesktopFile("WebRole1_IN_0", serviceName, rdpPath, false); + Assert.Fail("Succeeded, but extected to fail!"); + } + catch (Exception e) + { + if (e is AssertFailedException) + { + throw; + } + else + { + Console.WriteLine("Failed to get RDP file as expected"); + } + } + + vmPowershellCmdlets.RemoveAzureDeployment(serviceName, DeploymentSlotType.Production, true); + + pass &= Utilities.CheckRemove(vmPowershellCmdlets.GetAzureDeployment, serviceName, DeploymentSlotType.Production); + } + catch (Exception e) + { + pass = false; + Assert.Fail("Exception occurred: {0}", e.ToString()); + } + } + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "PAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (New-AzureServiceRemoteDesktopConfig)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\package.csv", "package#csv", DataAccessMethod.Sequential)] + public void AzureServiceRemoteDesktopExtensionConfigWithVersionScenarioTest() + { + + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Choose the package and config files from local machine + string packageName = Convert.ToString(TestContext.DataRow["upgradePackage"]); + string configName = Convert.ToString(TestContext.DataRow["upgradeConfig"]); + var packagePath1 = new FileInfo(Directory.GetCurrentDirectory() + "\\" + packageName); + var configPath1 = new FileInfo(Directory.GetCurrentDirectory() + "\\" + configName); + + Assert.IsTrue(File.Exists(packagePath1.FullName), "VHD file not exist={0}", packagePath1); + Assert.IsTrue(File.Exists(configPath1.FullName), "VHD file not exist={0}", configPath1); + + string deploymentName = "deployment1"; + string deploymentLabel = "label1"; + DeploymentInfoContext result; + + PSCredential cred = new PSCredential(username, Utilities.convertToSecureString(password)); + string rdpPath = @".\WebRole1.rdp"; + string version10 = "1.0"; + + try + { + + serviceName = Utilities.GetUniqueShortName(serviceNamePrefix); + vmPowershellCmdlets.NewAzureService(serviceName, serviceName, locationName); + Console.WriteLine("service, {0}, is created.", serviceName); + + ExtensionConfigurationInput config = vmPowershellCmdlets.NewAzureServiceRemoteDesktopExtensionConfig(cred, null, null, version10); + + vmPowershellCmdlets.NewAzureDeployment(serviceName, packagePath1.FullName, configPath1.FullName, DeploymentSlotType.Production, deploymentLabel, deploymentName, false, false, config); + + result = vmPowershellCmdlets.GetAzureDeployment(serviceName, DeploymentSlotType.Production); + pass = Utilities.PrintAndCompareDeployment(result, serviceName, deploymentName, deploymentLabel, DeploymentSlotType.Production, null, 2); + Console.WriteLine("successfully deployed the package"); + + RemoteDesktopExtensionContext resultContext = vmPowershellCmdlets.GetAzureServiceRemoteDesktopExtension(serviceName)[0]; + + VerifyRDPExtContext(resultContext, "AllRoles", "Default-RDP-Production-Ext-0", username, DateTime.Now.AddYears(1), version10); + + VerifyRDP(serviceName, rdpPath); + + vmPowershellCmdlets.RemoveAzureServiceRemoteDesktopExtension(serviceName); + + try + { + vmPowershellCmdlets.GetAzureRemoteDesktopFile("WebRole1_IN_0", serviceName, rdpPath, false); + Assert.Fail("Succeeded, but extected to fail!"); + } + catch (Exception e) + { + if (e is AssertFailedException) + { + throw; + } + else + { + Console.WriteLine("Failed to get RDP file as expected"); + } + } + + vmPowershellCmdlets.RemoveAzureDeployment(serviceName, DeploymentSlotType.Production, true); + + pass &= Utilities.CheckRemove(vmPowershellCmdlets.GetAzureDeployment, serviceName, DeploymentSlotType.Production); + } + catch (Exception e) + { + pass = false; + Assert.Fail("Exception occurred: {0}", e.ToString()); + } + } + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "PAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Get,Set,Remove)-AzureServiceRemoteDesktopExtension)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\package.csv", "package#csv", DataAccessMethod.Sequential)] + public void AzureServiceRemoteDesktopExtensionTest() + { + + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Choose the package and config files from local machine + string packageName = Convert.ToString(TestContext.DataRow["upgradePackage"]); + string configName = Convert.ToString(TestContext.DataRow["upgradeConfig"]); + var packagePath1 = new FileInfo(Directory.GetCurrentDirectory() + "\\" + packageName); + var configPath1 = new FileInfo(Directory.GetCurrentDirectory() + "\\" + configName); + + Assert.IsTrue(File.Exists(packagePath1.FullName), "VHD file not exist={0}", packagePath1); + Assert.IsTrue(File.Exists(configPath1.FullName), "VHD file not exist={0}", configPath1); + + string deploymentName = "deployment1"; + string deploymentLabel = "label1"; + DeploymentInfoContext result; + + PSCredential cred = new PSCredential(username, Utilities.convertToSecureString(password)); + string rdpPath = @".\WebRole1.rdp"; + + try + { + serviceName = Utilities.GetUniqueShortName(serviceNamePrefix); + vmPowershellCmdlets.NewAzureService(serviceName, serviceName, locationName); + Console.WriteLine("service, {0}, is created.", serviceName); + + vmPowershellCmdlets.NewAzureDeployment(serviceName, packagePath1.FullName, configPath1.FullName, DeploymentSlotType.Production, deploymentLabel, deploymentName, false, false); + + result = vmPowershellCmdlets.GetAzureDeployment(serviceName, DeploymentSlotType.Production); + pass = Utilities.PrintAndCompareDeployment(result, serviceName, deploymentName, deploymentLabel, DeploymentSlotType.Production, null, 2); + Console.WriteLine("successfully deployed the package"); + + vmPowershellCmdlets.SetAzureServiceRemoteDesktopExtension(serviceName, cred); + + RemoteDesktopExtensionContext resultContext = vmPowershellCmdlets.GetAzureServiceRemoteDesktopExtension(serviceName)[0]; + + VerifyRDPExtContext(resultContext, "AllRoles", "Default-RDP-Production-Ext-0", username, DateTime.Now.AddYears(1)); + + VerifyRDP(serviceName, rdpPath); + + vmPowershellCmdlets.RemoveAzureServiceRemoteDesktopExtension(serviceName, true); + try + { + vmPowershellCmdlets.GetAzureRemoteDesktopFile("WebRole1_IN_0", serviceName, rdpPath, false); + Assert.Fail("Succeeded, but extected to fail!"); + } + catch (Exception e) + { + if (e is AssertFailedException) + { + throw; + } + else + { + Console.WriteLine("Failed to get RDP file as expected"); + } + } + + vmPowershellCmdlets.RemoveAzureDeployment(serviceName, DeploymentSlotType.Production, true); + + pass &= Utilities.CheckRemove(vmPowershellCmdlets.GetAzureDeployment, serviceName, DeploymentSlotType.Production); + } + catch (Exception e) + { + pass = false; + Assert.Fail("Exception occurred: {0}", e.ToString()); + } + } + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "PAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Get,Set,Remove)-AzureServiceRemoteDesktopExtension)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\package.csv", "package#csv", DataAccessMethod.Sequential)] + public void AzureServiceRemoteDesktopExtensionWithVersionTest() + { + + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Choose the package and config files from local machine + string packageName = Convert.ToString(TestContext.DataRow["upgradePackage"]); + string configName = Convert.ToString(TestContext.DataRow["upgradeConfig"]); + var packagePath1 = new FileInfo(Directory.GetCurrentDirectory() + "\\" + packageName); + var configPath1 = new FileInfo(Directory.GetCurrentDirectory() + "\\" + configName); + + Assert.IsTrue(File.Exists(packagePath1.FullName), "VHD file not exist={0}", packagePath1); + Assert.IsTrue(File.Exists(configPath1.FullName), "VHD file not exist={0}", configPath1); + + string deploymentName = "deployment1"; + string deploymentLabel = "label1"; + DeploymentInfoContext result; + + PSCredential cred = new PSCredential(username, Utilities.convertToSecureString(password)); + string rdpPath = @".\WebRole1.rdp"; + string version10 = "1.0"; + + try + { + serviceName = Utilities.GetUniqueShortName(serviceNamePrefix); + vmPowershellCmdlets.NewAzureService(serviceName, serviceName, locationName); + Console.WriteLine("service, {0}, is created.", serviceName); + + vmPowershellCmdlets.NewAzureDeployment(serviceName, packagePath1.FullName, configPath1.FullName, DeploymentSlotType.Production, deploymentLabel, deploymentName, false, false); + + result = vmPowershellCmdlets.GetAzureDeployment(serviceName, DeploymentSlotType.Production); + pass = Utilities.PrintAndCompareDeployment(result, serviceName, deploymentName, deploymentLabel, DeploymentSlotType.Production, null, 2); + Console.WriteLine("successfully deployed the package"); + + vmPowershellCmdlets.SetAzureServiceRemoteDesktopExtension(serviceName, cred, null, null, null, version10); + + RemoteDesktopExtensionContext resultContext = vmPowershellCmdlets.GetAzureServiceRemoteDesktopExtension(serviceName)[0]; + + VerifyRDPExtContext(resultContext, "AllRoles", "Default-RDP-Production-Ext-0", username, DateTime.Now.AddYears(1), version10); + + VerifyRDP(serviceName, rdpPath); + + vmPowershellCmdlets.RemoveAzureServiceRemoteDesktopExtension(serviceName, true); + + try + { + vmPowershellCmdlets.GetAzureRemoteDesktopFile("WebRole1_IN_0", serviceName, rdpPath, false); + Assert.Fail("Succeeded, but extected to fail!"); + } + catch (Exception e) + { + if (e is AssertFailedException) + { + throw; + } + else + { + Console.WriteLine("Failed to get RDP file as expected"); + } + } + + vmPowershellCmdlets.RemoveAzureDeployment(serviceName, DeploymentSlotType.Production, true); + + pass &= Utilities.CheckRemove(vmPowershellCmdlets.GetAzureDeployment, serviceName, DeploymentSlotType.Production); + } + catch (Exception e) + { + pass = false; + Assert.Fail("Exception occurred: {0}", e.ToString()); + } + } + + #endregion + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "PAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Reset-AzureRoleInstanceTest with Reboot and Reimage paramaeters)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\package.csv", "package#csv", DataAccessMethod.Sequential)] + public void ReSetAzureRoleInstanceTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + // Choose the package and config files from local machine + string packageName = Convert.ToString(TestContext.DataRow[2]); + string configName = Convert.ToString(TestContext.DataRow[3]); + + var packagePath1 = new FileInfo(Directory.GetCurrentDirectory() + "\\" + packageName); + var configPath1 = new FileInfo(Directory.GetCurrentDirectory() + "\\" + configName); + + Assert.IsTrue(File.Exists(packagePath1.FullName), "file not exist={0}", packagePath1); + Assert.IsTrue(File.Exists(configPath1.FullName), "file not exist={0}", configPath1); + + string deploymentName = Utilities.GetUniqueShortName("ResetRoleInst", 20); + string deploymentLabel = Utilities.GetUniqueShortName("ResetRoleInstDepLabel", 20); + DeploymentInfoContext result; + + try + { + vmPowershellCmdlets.NewAzureService(serviceName, serviceName, locationName); + Console.WriteLine("service, {0}, is created.", serviceName); + + vmPowershellCmdlets.NewAzureDeployment(serviceName, packagePath1.FullName, configPath1.FullName, DeploymentSlotType.Staging, deploymentLabel, deploymentName, false, false); + result = vmPowershellCmdlets.GetAzureDeployment(serviceName, DeploymentSlotType.Staging); + pass = Utilities.PrintAndCompareDeployment(result, serviceName, deploymentName, deploymentLabel, DeploymentSlotType.Staging, null, 2); + Console.WriteLine("successfully deployed the package"); + + //Reboot the role instance + vmPowershellCmdlets.ResetAzureRoleInstance(serviceName, "WebRole1_IN_0", DeploymentSlotType.Staging, reboot: true); + var deploymentContextInfo = vmPowershellCmdlets.GetAzureDeployment(serviceName, DeploymentSlotType.Staging); + //verify that other instances are in ready state + string roleStatus = string.Empty; + foreach (var instance in deploymentContextInfo.RoleInstanceList) + { + if (instance.InstanceName.Equals("WebRole1_IN_1")) + { + roleStatus = instance.InstanceStatus; + break; + } + } + pass = roleStatus == ReadyState; + + //Reimage the role instance + vmPowershellCmdlets.ResetAzureRoleInstance(serviceName, "WebRole1_IN_1", DeploymentSlotType.Staging, reimage: true); + //verify that other instances are in ready state + deploymentContextInfo = vmPowershellCmdlets.GetAzureDeployment(serviceName, DeploymentSlotType.Staging); + roleStatus = string.Empty; + foreach (var instance in deploymentContextInfo.RoleInstanceList) + { + if (instance.InstanceName.Equals("WebRole1_IN_0")) + { + roleStatus = instance.InstanceStatus; + break; + } + } + pass = roleStatus == ReadyState; + } + catch (Exception e) + { + pass = false; + Assert.Fail("Exception occurred: {0}", e.ToString()); + } + finally + { + //Ceanup service + vmPowershellCmdlets.RemoveAzureDeployment(serviceName, DeploymentSlotType.Staging, true); + pass &= Utilities.CheckRemove(vmPowershellCmdlets.GetAzureDeployment, serviceName, DeploymentSlotType.Staging); + } + } + + /// + /// Deploy an IaaS VM with Domain Join + /// + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "IaaS"), Priority(1), Owner("hylee"), Description("Test the cmdlets (New-AzureVMConfig,Add-AzureProvisioningConfig,New-AzureVM)")] + public void NewAzureVMDomainJoinTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + var newAzureVMName = Utilities.GetUniqueShortName(vmNamePrefix); + + const string joinDomainStr = "www.microsoft.com"; + const string domainStr = "microsoft.com"; + const string domainUser = "pstestdomainuser"; + const string domainPassword = "p@ssw0rd"; + + try + { + if (string.IsNullOrEmpty(imageName)) + { + imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows" }, false); + } + + vmPowershellCmdlets.NewAzureService(serviceName, serviceName, locationName); + + var azureVMConfigInfo = new AzureVMConfigInfo(newAzureVMName, InstanceSize.Small.ToString(), imageName); + var azureProvisioningConfig = new AzureProvisioningConfigInfo("WindowsDomain", username, password, + joinDomainStr, domainStr, domainUser, + domainPassword); + var persistentVMConfigInfo = new PersistentVMConfigInfo(azureVMConfigInfo, azureProvisioningConfig, null, + null); + PersistentVM persistentVM = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo); + + PersistentVM[] VMs = { persistentVM }; + vmPowershellCmdlets.NewAzureVM(serviceName, VMs); + + // Todo: Check the domain of the VM + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + } + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "IaaS"), Priority(1), Owner("hylee"), Description("Test the cmdlets (New-AzureVMConfig,Add-AzureProvisioningConfig,New-AzureVM)")] + public void SetProvisionGuestAgentTest() + { + try + { + string vmName = Utilities.GetUniqueShortName(vmNamePrefix); + Console.WriteLine("VM Name:{0}", vmName); + PersistentVM vm = Utilities.CreateIaaSVMObject(vmName, InstanceSize.Small, imageName, true, username, password, true); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, locationName, false); + var vmRoleContext = vmPowershellCmdlets.GetAzureVM(vmName, serviceName); + Utilities.PrintContext(vmRoleContext); + Assert.IsNotNull(vmRoleContext.VM.ProvisionGuestAgent, "ProvisionGuestAgent value cannot be null"); + Assert.IsFalse(vmRoleContext.VM.ProvisionGuestAgent.Value); + Console.WriteLine("Guest Agent Status: {0}", vmRoleContext.VM.ProvisionGuestAgent.Value); + vmRoleContext.VM.ProvisionGuestAgent = true; + vmPowershellCmdlets.UpdateAzureVM(vmName, serviceName, vmRoleContext.VM); + vmRoleContext = vmPowershellCmdlets.GetAzureVM(vmName, serviceName); + Utilities.PrintContext(vmRoleContext); + Assert.IsNotNull(vmRoleContext.VM.ProvisionGuestAgent, "ProvisionGuestAgent value cannot be null"); + Assert.IsTrue(vmRoleContext.VM.ProvisionGuestAgent.Value); + Console.WriteLine("Guest Agent Status: {0}", vmRoleContext.VM.ProvisionGuestAgent.Value); + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + + } + + [TestCleanup] + public virtual void CleanUp() + { + Console.WriteLine("Test {0}", pass ? "passed" : "failed"); + + // Remove the service + if ((cleanupIfPassed && pass) || (cleanupIfFailed && !pass)) + { + CleanupService(serviceName); + } + } + + private string GetSiteContent(Uri uri, int maxRetryTimes, bool holdConnection) + { + Console.WriteLine("GetSiteContent. uri={0} maxRetryTimes={1}", uri.AbsoluteUri, maxRetryTimes); + + HttpWebRequest request; + HttpWebResponse response = null; + + var noCachePolicy = new HttpRequestCachePolicy(HttpRequestCacheLevel.NoCacheNoStore); + HttpWebRequest.DefaultCachePolicy = noCachePolicy; + + int i; + for (i = 1; i <= maxRetryTimes; i++) + { + try + { + request = (HttpWebRequest)WebRequest.Create(uri); + request.Timeout = 10 * 60 * 1000; //set to 10 minutes, default 100 sec. default IE7/8 is 60 minutes + response = (HttpWebResponse)request.GetResponse(); + break; + } + catch (WebException e) + { + Console.WriteLine("Exception Message: " + e.Message); + if (e.Status == WebExceptionStatus.ProtocolError) + { + Console.WriteLine("Status Code: {0}", ((HttpWebResponse)e.Response).StatusCode); + Console.WriteLine("Status Description: {0}", ((HttpWebResponse)e.Response).StatusDescription); + } + } + + Thread.Sleep(30 * 1000); + } + + if (i > maxRetryTimes) + { + throw new Exception("Web Site has error and reached maxRetryTimes"); + } + + Stream responseStream = response.GetResponseStream(); + StringBuilder sb = new StringBuilder(); + byte[] buf = new byte[100]; + int length; + while ((length = responseStream.Read(buf, 0, 100)) != 0) + { + if (holdConnection) + { + Thread.Sleep(TimeSpan.FromSeconds(10)); + } + sb.Append(Encoding.UTF8.GetString(buf, 0, length)); + } + + string responseString = sb.ToString(); + Console.WriteLine("Site content: (IsFromCache={0})", response.IsFromCache); + Console.WriteLine(responseString); + + return responseString; + } + + private bool GetVNetState(string vnet, Microsoft.Azure.Commands.Network.ProvisioningState expectedState, int maxTime, int intervalTime) + { + Microsoft.Azure.Commands.Network.ProvisioningState vnetState; + int i = 0; + do + { + vnetState = vmPowershellCmdlets.GetAzureVNetGateway(vnet)[0].State; + Thread.Sleep(intervalTime * 1000); + i++; + } + while (!vnetState.Equals(expectedState) || i < maxTime); + + return vnetState.Equals(expectedState); + } + + private bool VerifyDiagExtContext(DiagnosticExtensionContext resultContext, string role, string extID, string storage, string config) + { + Utilities.PrintContext(resultContext); + + try + { + Assert.AreEqual(role, resultContext.Role.RoleType.ToString(), "role is not same"); + Assert.AreEqual(Utilities.PaaSDiagnosticsExtensionName, resultContext.Extension, "extension is not Diagnostics"); + Assert.AreEqual(extID, resultContext.Id, "extension id is not same"); + //Assert.AreEqual(storage, resultContext.StorageAccountName, "storage account name is not same"); + + XmlDocument doc = new XmlDocument(); + doc.Load("@./da.xml"); + string inner = Utilities.GetInnerXml(resultContext.WadCfg, "WadCfg"); + Assert.IsTrue(Utilities.CompareWadCfg(inner, doc), "xml is not same"); + + return true; + } + catch (Exception e) + { + Console.WriteLine("Error happens: {0}", e.ToString()); + return false; + } + } + + private void VerifyRDPExtContext(RemoteDesktopExtensionContext resultContext, string role, string extID, string userName, DateTime exp, string version = null) + { + Utilities.PrintContextAndItsBase(resultContext); + + try + { + Assert.AreEqual(role, resultContext.Role.RoleType.ToString(), "role is not same"); + Assert.AreEqual("RDP", resultContext.Extension, "extension is not RDP"); + Assert.AreEqual(extID, resultContext.Id, "extension id is not same"); + Assert.AreEqual(userName, resultContext.UserName, "storage account name is not same"); + Assert.IsTrue(Utilities.CompareDateTime(exp, resultContext.Expiration), "expiration is not same"); + if (!string.IsNullOrEmpty(version)) + { + Assert.AreEqual(version, resultContext.Version, "version numbers are not same"); + } + } + catch (Exception e) + { + Console.WriteLine("Error happens: {0}", e.ToString()); + throw; + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ServiceManagementCmdletTestHelper.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ServiceManagementCmdletTestHelper.cs new file mode 100644 index 000000000000..8dfbbc242567 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ServiceManagementCmdletTestHelper.cs @@ -0,0 +1,2114 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Management.Automation; +using System.Net; +using System.Security.Cryptography.X509Certificates; +using System.Xml; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Commands.Profile.Models; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions; +using Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions; +using Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.DiskRepository; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.Extensions.BGInfo; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.Extensions.Common; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.Extesnions.CustomScript; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.Extesnions.Dsc; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.Extesnions.VMAccess; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.Extensions.SqlServer; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.IaasCmdletInfo.ILB; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PaasCmdletInfo; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PIRCmdletInfo; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PreviewCmdletInfo; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.SubscriptionCmdletInfo; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Network; +using Microsoft.Azure.Commands.Network.Gateway.Model; +using Microsoft.WindowsAzure.Management.Network.Models; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests +{ + using SM = Model; + + public class ServiceManagementCmdletTestHelper + { + /// + /// Run a powershell cmdlet that returns the first PSObject as a return value. + /// + /// + /// + /// + /// + private T RunPSCmdletAndReturnFirst(PowershellCore.CmdletsInfo cmdlet, bool debug = false) + { + var azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(cmdlet); + Collection result = azurePowershellCmdlet.Run(debug); + if (result.Count == 1) + { + try + { + var operation = (ManagementOperationContext)result[0].BaseObject; + Console.WriteLine("Operation ID: {0} \nOperation Status: {1}\n", operation.OperationId, operation.OperationStatus); + } + catch (Exception e) + { + if (e is InvalidCastException) + { + // continue + } + else + { + Console.WriteLine(e); + throw; + } + } + + return (T) result[0].BaseObject; + } + return default(T); + } + + /// + /// Run a powershell cmdlet that returns a collection of PSObjects as a return value. + /// + /// + /// + /// + /// + private Collection RunPSCmdletAndReturnAll(PowershellCore.CmdletsInfo cmdlet, bool debug = false) + { + var azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(cmdlet); + Collection result = azurePowershellCmdlet.Run(debug); + var resultCollection = new Collection(); + foreach (PSObject re in result) + { + resultCollection.Add((T)re.BaseObject); + } + + try + { + if (result.Count > 0) + { + var operation = (ManagementOperationContext) result[0].BaseObject; + Console.WriteLine("Operation ID: {0} \nOperation Status: {1}\n", operation.OperationId, + operation.OperationStatus); + } + } + catch (Exception e) + { + if (e is InvalidCastException) + { + // continue + } + else + { + Console.WriteLine(e); + throw; + } + } + + return resultCollection; + } + + public Collection RunPSScript(string script, bool debug = false) + { + List st = new List(); + st.Add(script); + + WindowsAzurePowershellScript azurePowershellCmdlet = new WindowsAzurePowershellScript(st); + return azurePowershellCmdlet.Run(debug); + } + + + public CopyState CheckCopyBlobStatus(string destContainer, string destBlob, bool debug = false) + { + List st = new List(); + st.Add(string.Format("Get-AzureStorageBlobCopyState -Container {0} -Blob {1}", destContainer, destBlob)); + + WindowsAzurePowershellScript azurePowershellCmdlet = new WindowsAzurePowershellScript(st); + return (CopyState)azurePowershellCmdlet.Run(debug)[0].BaseObject; + } + public bool TestAzureServiceName(string serviceName) + { + return RunPSCmdletAndReturnFirst(new TestAzureNameCmdletInfo("Service", serviceName)); + } + + public Collection GetAzureLocation() + { + return RunPSCmdletAndReturnAll(new GetAzureLocationCmdletInfo()); + } + + public string GetAzureLocationName(string[] keywords) + { + Collection locations; + + try + { + locations = GetAzureLocation(); + } + catch + { + Console.WriteLine("Error occurred during Get-AzureLocation... Default location is not set."); + return null; + } + + if (keywords != null) + { + foreach (SM.LocationsContext location in locations) + { + if (MatchExactWords(location.Name, keywords) >= 0) + { + return location.Name; + } + } + } + else + { + if (locations.Count == 1) + { + return locations[0].Name; + } + } + return null; + } + + private static int MatchExactWords(string input, string[] keywords) + { //returns -1 for no match, 0 for exact match, and a positive number for how many keywords are matched. + int result = 0; + if (string.IsNullOrEmpty(input) || keywords.Length == 0) + return -1; + foreach (string keyword in keywords) + { + //For whole word match, modify pattern to be "\b{0}\b" + if (!string.IsNullOrEmpty(keyword) && keyword.ToLowerInvariant().Equals(input.ToLowerInvariant())) + { + result++; + } + } + if (result == keywords.Length) + { + return 0; + } + else if (result == 0) + { + return -1; + } + else + { + return result; + } + } + + public Collection GetAzureOSVersion() + { + return RunPSCmdletAndReturnAll(new GetAzureOSVersionCmdletInfo()); + } + + #region CertificateSetting, VMConifig, ProvisioningConfig + + public SM.CertificateSetting NewAzureCertificateSetting(string store, string thumbprint) + { + return RunPSCmdletAndReturnFirst(new NewAzureCertificateSettingCmdletInfo(store, thumbprint)); + } + + public SM.PersistentVM NewAzureVMConfig(AzureVMConfigInfo vmConfig) + { + return RunPSCmdletAndReturnFirst(new NewAzureVMConfigCmdletInfo(vmConfig)); + } + + public SM.PersistentVM AddAzureProvisioningConfig(AzureProvisioningConfigInfo provConfig) + { + return RunPSCmdletAndReturnFirst(new AddAzureProvisioningConfigCmdletInfo(provConfig)); + } + + #endregion + + #region AzureAffinityGroup + + public ManagementOperationContext NewAzureAffinityGroup(string name, string location, string label, string description) + { + return RunPSCmdletAndReturnFirst (new NewAzureAffinityGroupCmdletInfo(name, location, label, description)); + } + + public Collection GetAzureAffinityGroup(string name = null) + { + return RunPSCmdletAndReturnAll(new GetAzureAffinityGroupCmdletInfo(name)); + } + + public ManagementOperationContext SetAzureAffinityGroup(string name, string label, string description) + { + return RunPSCmdletAndReturnFirst (new SetAzureAffinityGroupCmdletInfo(name, label, description)); + } + + public ManagementOperationContext RemoveAzureAffinityGroup(string name) + { + return RunPSCmdletAndReturnFirst(new RemoveAzureAffinityGroupCmdletInfo(name)); + } + + #endregion + + #region AzureAvailabilitySet + + public SM.PersistentVM SetAzureAvailabilitySet(string availabilitySetName, SM.PersistentVM vm) + { + return RunPSCmdletAndReturnFirst(new SetAzureAvailabilitySetCmdletInfo(availabilitySetName, vm)); + } + + public SM.PersistentVM SetAzureAvailabilitySet(string vmName, string serviceName, string availabilitySetName) + { + SM.PersistentVM vm = GetAzureVM(vmName, serviceName).VM; + return RunPSCmdletAndReturnFirst(new SetAzureAvailabilitySetCmdletInfo(availabilitySetName, vm)); + } + + public SM.PersistentVM RemoveAzureAvailabilitySet(SM.PersistentVM vm) + { + return RunPSCmdletAndReturnFirst(new RemoveAzureAvailabilitySetCmdletInfo(vm)); + } + + public SM.PersistentVM RemoveAzureAvailabilitySet(string vmName, string serviceName) + { + SM.PersistentVM vm = GetAzureVM(vmName, serviceName).VM; + return RunPSCmdletAndReturnFirst(new RemoveAzureAvailabilitySetCmdletInfo(vm)); + } + + #endregion AzureAvailabilitySet + + #region AzureCertificate + + public ManagementOperationContext AddAzureCertificate(string serviceName, PSObject cert, string password = null) + { + return RunPSCmdletAndReturnFirst(new AddAzureCertificateCmdletInfo(serviceName, cert, password)); + } + + public Collection GetAzureCertificate(string serviceName, string thumbprint = null, string algorithm = null) + { + return RunPSCmdletAndReturnAll (new GetAzureCertificateCmdletInfo(serviceName, thumbprint, algorithm)); + } + + public ManagementOperationContext RemoveAzureCertificate(string serviceName, string thumbprint, string algorithm) + { + return RunPSCmdletAndReturnFirst(new RemoveAzureCertificateCmdletInfo(serviceName, thumbprint, algorithm)); + } + + #endregion + + #region AzureDataDisk + + public SM.PersistentVM AddAzureDataDisk(AddAzureDataDiskConfig diskConfig) + { + return RunPSCmdletAndReturnFirst(new AddAzureDataDiskCmdletInfo(diskConfig)); + } + + public void AddDataDisk(string vmName, string serviceName, AddAzureDataDiskConfig [] diskConfigs) + { + SM.PersistentVM vm = GetAzureVM(vmName, serviceName).VM; + + foreach (AddAzureDataDiskConfig config in diskConfigs) + { + config.Vm = vm; + vm = AddAzureDataDisk(config); + } + UpdateAzureVM(vmName, serviceName, vm); + } + + public SM.PersistentVM SetAzureDataDisk(SetAzureDataDiskConfig discCfg) + { + return RunPSCmdletAndReturnFirst(new SetAzureDataDiskCmdletInfo(discCfg)); + } + + public void SetDataDisk(string vmName, string serviceName, HostCaching hc, int lun) + { + SetAzureDataDiskConfig config = new SetAzureDataDiskConfig(hc, lun); + config.Vm = GetAzureVM(vmName, serviceName).VM; + UpdateAzureVM(vmName, serviceName, SetAzureDataDisk(config)); + } + + public Collection GetAzureDataDisk(string vmName, string serviceName) + { + SM.PersistentVMRoleContext vmRolectx = GetAzureVM(vmName, serviceName); + + return RunPSCmdletAndReturnAll(new GetAzureDataDiskCmdletInfo(vmRolectx.VM)); + } + + public Collection GetAzureDataDisk(SM.PersistentVM vm) + { + return RunPSCmdletAndReturnAll(new GetAzureDataDiskCmdletInfo(vm)); + } + public SM.PersistentVM RemoveAzureDataDisk(RemoveAzureDataDiskConfig discCfg) + { + return RunPSCmdletAndReturnFirst(new RemoveAzureDataDiskCmdletInfo(discCfg)); + } + + public void RemoveDataDisk(string vmName, string serviceName, int [] lunSlots) + { + SM.PersistentVM vm = GetAzureVM(vmName, serviceName).VM; + + foreach (int lun in lunSlots) + { + RemoveAzureDataDiskConfig config = new RemoveAzureDataDiskConfig(lun, vm); + RemoveAzureDataDisk(config); + } + UpdateAzureVM(vmName, serviceName, vm); + } + + #endregion + + #region AzureDeployment + + public ManagementOperationContext NewAzureDeployment(string serviceName, string packagePath, string configPath, + string slot, string label, string name, bool doNotStart, bool warning, + ExtensionConfigurationInput config = null) + { + return + RunPSCmdletAndReturnFirst(new NewAzureDeploymentCmdletInfo(serviceName, + packagePath, configPath, slot, label, name, doNotStart, warning, config)); + } + + public SM.DeploymentInfoContext GetAzureDeployment(string serviceName, string slot) + { + return RunPSCmdletAndReturnFirst(new GetAzureDeploymentCmdletInfo(serviceName, slot)); + } + + public SM.DeploymentInfoContext GetAzureDeployment(string serviceName) + { + return GetAzureDeployment(serviceName, SM.DeploymentSlotType.Production); + } + + public Collection GetAzureDeploymentEvent(string serviceName, string deploymentName, DateTime startTime, DateTime endTime) + { + return RunPSCmdletAndReturnAll(new GetAzureDeploymentEventCmdletInfo(serviceName, deploymentName, startTime, endTime)); + } + + public Collection GetAzureDeploymentEventBySlot(string serviceName, string deploymentSlot, DateTime startTime, DateTime endTime) + { + return RunPSCmdletAndReturnAll(new GetAzureDeploymentEventBySlotCmdletInfo(serviceName, deploymentSlot, startTime, endTime)); + } + + private ManagementOperationContext SetAzureDeployment(SetAzureDeploymentCmdletInfo cmdletInfo) + { + return RunPSCmdletAndReturnFirst(cmdletInfo); + } + + public ManagementOperationContext SetAzureDeploymentStatus(string serviceName, string slot, string newStatus) + { + return SetAzureDeployment(SetAzureDeploymentCmdletInfo.SetAzureDeploymentStatusCmdletInfo(serviceName, slot, newStatus)); + } + + public ManagementOperationContext SetAzureDeploymentConfig(string serviceName, string slot, string configPath) + { + return SetAzureDeployment(SetAzureDeploymentCmdletInfo.SetAzureDeploymentConfigCmdletInfo(serviceName, slot, configPath)); + } + + public ManagementOperationContext SetAzureDeploymentUpgrade(string serviceName, string slot, string mode, string packagePath, string configPath) + { + return SetAzureDeployment(SetAzureDeploymentCmdletInfo.SetAzureDeploymentUpgradeCmdletInfo(serviceName, slot, mode, packagePath, configPath)); + } + + public ManagementOperationContext SetAzureDeployment(string option, string serviceName, string packagePath, string newStatus, string configName, string slot, string mode, string label, string roleName, bool force) + { + return SetAzureDeployment(new SetAzureDeploymentCmdletInfo(option, serviceName, packagePath, newStatus, configName, slot, mode, label, roleName, force)); + } + + public ManagementOperationContext RemoveAzureDeployment(string serviceName, string slot, bool force) + { + return RunPSCmdletAndReturnFirst(new RemoveAzureDeploymentCmdletInfo(serviceName, slot, force)); + } + + public ManagementOperationContext MoveAzureDeployment(string serviceName) + { + return RunPSCmdletAndReturnFirst(new MoveAzureDeploymentCmdletInfo(serviceName)); + } + + public ManagementOperationContext SetAzureWalkUpgradeDomain(string serviceName, string slot, int domainNumber) + { + return RunPSCmdletAndReturnFirst(new SetAzureWalkUpgradeDomainCmdletInfo(serviceName, slot, domainNumber)); + } + + #endregion + + #region AzureDisk + + // Add-AzureDisk + public SM.DiskContext AddAzureDisk(string diskName, string mediaPath, string label, string os) + { + SM.DiskContext result = new SM.DiskContext(); + Utilities.RetryActionUntilSuccess( + () => result = RunPSCmdletAndReturnFirst(new AddAzureDiskCmdletInfo(diskName, mediaPath, label, os)), + "409", 3, 60); + return result; + } + + // Get-AzureDisk + public Collection GetAzureDisk(string diskName) + { + return GetAzureDisk(new GetAzureDiskCmdletInfo(diskName)); + } + + public Collection GetAzureDisk() + { + return GetAzureDisk(new GetAzureDiskCmdletInfo((string)null)); + } + + private Collection GetAzureDisk(GetAzureDiskCmdletInfo getAzureDiskCmdletInfo) + { + return RunPSCmdletAndReturnAll(getAzureDiskCmdletInfo); + } + + public Collection GetAzureDiskAttachedToRoleName(string[] roleName, bool exactMatch = true) + { + Collection retDisks = new Collection(); + Collection disks = GetAzureDisk(); + foreach (SM.DiskContext disk in disks) + { + if (disk.AttachedTo != null && disk.AttachedTo.RoleName != null) + { + if (Utilities.MatchKeywords(disk.AttachedTo.RoleName, roleName, exactMatch) >= 0) + retDisks.Add(disk); + } + } + return retDisks; + } + + // Remove-AzureDisk + public ManagementOperationContext RemoveAzureDisk(string diskName, bool deleteVhd) + { + return RunPSCmdletAndReturnFirst(new RemoveAzureDiskCmdletInfo(diskName, deleteVhd)); + } + + // Update-AzureDisk + public SM.DiskContext UpdateAzureDisk(string diskName, string label) + { + return RunPSCmdletAndReturnFirst(new UpdateAzureDiskCmdletInfo(diskName, label)); + } + + #endregion + + #region AzureDns + + public SM.DnsServer NewAzureDns(string name, string ipAddress) + { + return RunPSCmdletAndReturnFirst(new NewAzureDnsCmdletInfo(name, ipAddress)); + } + + public SM.DnsServerList GetAzureDns(SM.DnsSettings settings, bool debug = true) + { + var getAzureDnsCmdletInfo = new GetAzureDnsCmdletInfo(settings); + var azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(getAzureDnsCmdletInfo); + Collection result = azurePowershellCmdlet.Run(debug); + var dnsList = new SM.DnsServerList(); + + foreach (PSObject re in result) + { + dnsList.Add((SM.DnsServer)re.BaseObject); + } + return dnsList; + } + + public ManagementOperationContext AddAzureDns(string name, string ipAddress, string serviceName) + { + return RunPSCmdletAndReturnFirst(new AddAzureDnsCmdletInfo(name, ipAddress, serviceName)); + } + + public ManagementOperationContext SetAzureDns(string name, string ipAddress, string serviceName) + { + return RunPSCmdletAndReturnFirst(new SetAzureDnsCmdletInfo(name, ipAddress, serviceName)); + } + + public ManagementOperationContext RemoveAzureDns(string name, string ipAddress, bool force = false) + { + return RunPSCmdletAndReturnFirst(new RemoveAzureDnsCmdletInfo(name, ipAddress, force)); + } + + + #endregion + + #region AzureEndpoint + + public SM.PersistentVM AddAzureEndPoint(AzureEndPointConfigInfo endPointConfig) + { + return RunPSCmdletAndReturnFirst(new AddAzureEndpointCmdletInfo(endPointConfig)); + } + + public void AddEndPoint(string vmName, string serviceName, AzureEndPointConfigInfo [] endPointConfigs) + { + SM.PersistentVM vm = GetAzureVM(vmName, serviceName).VM; + + foreach (AzureEndPointConfigInfo config in endPointConfigs) + { + config.Vm = vm; + vm = AddAzureEndPoint(config); + } + UpdateAzureVM(vmName, serviceName, vm); + } + + public Collection GetAzureEndPoint(SM.PersistentVMRoleContext vmRoleCtxt) + { + return RunPSCmdletAndReturnAll(new GetAzureEndpointCmdletInfo(vmRoleCtxt)); + } + + public Collection GetAzureEndPoint(SM.PersistentVM vm) + { + return RunPSCmdletAndReturnAll(new GetAzureEndpointCmdletInfo(vm)); + } + + public void SetEndPoint(string vmName, string serviceName, AzureEndPointConfigInfo endPointConfig) + { + endPointConfig.Vm = GetAzureVM(vmName, serviceName).VM; + UpdateAzureVM(vmName, serviceName, SetAzureEndPoint(endPointConfig)); + } + + public SM.PersistentVM SetAzureEndPoint(AzureEndPointConfigInfo endPointConfig) + { + if (null != endPointConfig) + { + return RunPSCmdletAndReturnFirst(new SetAzureEndpointCmdletInfo(endPointConfig)); + } + return null; + } + + public void SetLBEndPoint(string vmName, string serviceName, AzureEndPointConfigInfo endPointConfig, AzureEndPointConfigInfo.ParameterSet paramset) + { + endPointConfig.Vm = GetAzureVM(vmName, serviceName).VM; + SetAzureLoadBalancedEndPoint(endPointConfig, paramset); + + //UpdateAzureVM(vmName, serviceName, SetAzureLoadBalancedEndPoint(endPointConfig, paramset)); + } + + public ManagementOperationContext SetAzureLoadBalancedEndPoint(AzureEndPointConfigInfo endPointConfig, AzureEndPointConfigInfo.ParameterSet paramset) + { + if (null != endPointConfig) + { + return RunPSCmdletAndReturnFirst(new SetAzureLoadBalancedEndpointCmdletInfo(endPointConfig, paramset)); + } + return null; + } + + public SM.PersistentVMRoleContext RemoveAzureEndPoint(string epName, SM.PersistentVMRoleContext vmRoleCtxt) + { + return RunPSCmdletAndReturnFirst(new RemoveAzureEndpointCmdletInfo(epName, vmRoleCtxt)); + } + + public SM.PersistentVM RemoveAzureEndPoint(string epName, SM.PersistentVM vm) + { + return RunPSCmdletAndReturnFirst(new RemoveAzureEndpointCmdletInfo(epName, vm)); + } + + public void RemoveEndPoint(string vmName, string serviceName, string [] epNames) + { + SM.PersistentVMRoleContext vmRoleCtxt = GetAzureVM(vmName, serviceName); + + foreach (string ep in epNames) + { + vmRoleCtxt.VM = RemoveAzureEndPoint(ep, vmRoleCtxt).VM; + } + UpdateAzureVM(vmName, serviceName, vmRoleCtxt.VM); + } + + #endregion + + #region AzureOSDisk + + public SM.PersistentVM SetAzureOSDisk(HostCaching hc, SM.PersistentVM vm) + { + return RunPSCmdletAndReturnFirst(new SetAzureOSDiskCmdletInfo(hc, vm)); + } + + public SM.OSVirtualHardDisk GetAzureOSDisk(SM.PersistentVM vm) + { + return RunPSCmdletAndReturnFirst(new GetAzureOSDiskCmdletInfo(vm)); + } + + #endregion + + #region AzureRole + + public ManagementOperationContext SetAzureRole(string serviceName, string slot, string roleName, int count) + { + return RunPSCmdletAndReturnFirst(new SetAzureRoleCmdletInfo(serviceName, slot, roleName, count)); + } + + public Collection GetAzureRole(string serviceName, string slot, string roleName, bool details) + { + return RunPSCmdletAndReturnAll(new GetAzureRoleCmdletInfo(serviceName, slot, roleName, details)); + } + + #endregion + + #region AzureQuickVM + + public ManagementOperationContext NewAzureQuickVM(OS os, string name, string serviceName, string imageName, + string userName, string password, string locationName, string instanceSize) + { + ManagementOperationContext result = new ManagementOperationContext(); + try + { + result = RunPSCmdletAndReturnFirst(new NewAzureQuickVMCmdletInfo(os, name, serviceName, imageName, userName, password, locationName, instanceSize)); + } + catch (Exception e) + { + if (e.ToString().Contains("409")) + { + Utilities.RetryActionUntilSuccess( + () => result = RunPSCmdletAndReturnFirst(new NewAzureQuickVMCmdletInfo(os, name, serviceName, imageName, userName, password, null, instanceSize)), + "409", 4, 60); + } + else + { + Console.WriteLine(e.InnerException.ToString()); + throw; + } + } + return result; + } + + public ManagementOperationContext NewAzureQuickVM(OS os, string name, string serviceName, string imageName, + string userName, string password, string locationName, string instanceSize, string disableWinRMHttps, string reservedIpName = null, string vnetName = null) + { + var result = new ManagementOperationContext(); + try + { + result = + RunPSCmdletAndReturnFirst(new NewAzureQuickVMCmdletInfo(os, name, + serviceName, imageName, userName, password, locationName, instanceSize, disableWinRMHttps, reservedIpName, vnetName)); + } + catch (Exception e) + { + if (e.ToString().Contains("409")) + { + Utilities.RetryActionUntilSuccess( + () => + result = + RunPSCmdletAndReturnFirst(new NewAzureQuickVMCmdletInfo(os, + name, serviceName, imageName, userName, password, null, instanceSize, + disableWinRMHttps, reservedIpName, vnetName)), + "409", 4, 60); + } + else + { + Console.WriteLine(e.InnerException.ToString()); + throw; + } + } + return result; + } + + public ManagementOperationContext NewAzureQuickVM(OS os, string name, string serviceName, string imageName, + string userName = null, string password = null, string locationName = null) + { + return NewAzureQuickVM(os, name, serviceName, imageName, userName, password, locationName, null); + } + + public ManagementOperationContext NewAzureQuickVM(OS os, string name, string serviceName, string imageName, + string[] subnetNames, InstanceSize instanceSize, string userName, string password, string vNetName, string affinityGroup, string reservedIP = null) + { + var result = new ManagementOperationContext(); + try + { + result = RunPSCmdletAndReturnFirst(new NewAzureQuickVMCmdletInfo(os, name, serviceName, imageName, instanceSize.ToString(), userName, password, vNetName, subnetNames, affinityGroup, reservedIP)); + } + catch (Exception e) + { + if (e.ToString().Contains("409")) + { + Utilities.RetryActionUntilSuccess( + () => result = RunPSCmdletAndReturnFirst(new NewAzureQuickVMCmdletInfo(os, name, serviceName, imageName, userName, password, null, instanceSize.ToString())), + "409", 4, 60); + } + else + { + Console.WriteLine(e.InnerException.ToString()); + throw; + } + } + return result; + } + #endregion + + #region WinRM + + public Uri GetAzureWinRMUri(string servicename, string name) + { + Uri result = null; + try + { + result = RunPSCmdletAndReturnFirst(new WinRMCmdletInfo(servicename, name)); + } + catch (Exception e) + { + if (e.ToString().Contains("409")) + { + Utilities.RetryActionUntilSuccess( + () => result = RunPSCmdletAndReturnFirst(new WinRMCmdletInfo(servicename, name)), + "409", 4, 60); + } + else + { + Console.WriteLine(e.InnerException.ToString()); + throw; + } + } + return result; + } + + + #endregion WinRM + + #region AzurePlatformVMImage + + + internal ManagementOperationContext SetAzurePlatformVMImageReplicate(string imageName, string[] locations) + { + return RunPSCmdletAndReturnFirst(new SetAzurePlatformVMImageCmdletInfo(imageName, null, locations)); + } + + internal ManagementOperationContext SetAzurePlatformVMImagePublic(string imageName) + { + return RunPSCmdletAndReturnFirst(new SetAzurePlatformVMImageCmdletInfo(imageName, "Public", null)); + } + + internal ManagementOperationContext SetAzurePlatformVMImagePrivate(string imageName) + { + return RunPSCmdletAndReturnFirst(new SetAzurePlatformVMImageCmdletInfo(imageName, "Private", null)); + } + + internal OSImageDetailsContext GetAzurePlatformVMImage(string imageName) + { + return RunPSCmdletAndReturnFirst(new GetAzurePlatformVMImageCmdletInfo(imageName)); + } + + internal ManagementOperationContext RemoveAzurePlatformVMImage(string imageName) + { + return RunPSCmdletAndReturnFirst(new RemoveAzurePlatformVMImageCmdletInfo(imageName)); + } + + #endregion + + #region AzureReservedIP + internal ManagementOperationContext NewAzureReservedIP(string name, string aff, string svc, string dep, string label = null) + { + return RunPSCmdletAndReturnFirst(new NewAzureReservedIPCmdletInfo(name, aff, label, svc, dep)); + } + + internal ManagementOperationContext NewAzureReservedIP(string name, string location, string label = null) + { + return RunPSCmdletAndReturnFirst(new NewAzureReservedIPCmdletInfo(name, location, label)); + } + + internal Collection GetAzureReservedIP(string name = null) + { + return RunPSCmdletAndReturnAll(new GetAzureReservedIPCmdletInfo(name)); + } + + internal ManagementOperationContext RemoveAzureReservedIP(string name, bool force = false) + { + return RunPSCmdletAndReturnFirst(new RemoveAzureReservedIPCmdletInfo(name, force)); + } + + #endregion + + #region AzurePublishSettingsFile + + internal void ImportAzurePublishSettingsFile() + { + this.ImportAzurePublishSettingsFile(CredentialHelper.PublishSettingsFile); + } + + internal void ImportAzurePublishSettingsFile(string publishSettingsFile, bool debug = false) + { + (new WindowsAzurePowershellCmdlet(new ImportAzurePublishSettingsFileCmdletInfo(publishSettingsFile))).Run(debug); + } + + internal void ImportAzurePublishSettingsFile(string publishSettingsFile, string env, bool debug = false) + { + (new WindowsAzurePowershellCmdlet(new ImportAzurePublishSettingsFileCmdletInfo(publishSettingsFile, env))).Run(debug); + } + + #endregion + + #region AzureSubscription + + public Collection GetAzureSubscription() + { + return RunPSCmdletAndReturnAll(new GetAzureSubscriptionCmdletInfo(null, null, true, false, false)); + } + + public PSAzureSubscriptionExtended GetAzureSubscription(string subscriptionName) + { + return RunPSCmdletAndReturnFirst(new GetAzureSubscriptionCmdletInfo(subscriptionName, null, true, false, false)); + } + + public PSAzureSubscriptionExtended GetCurrentAzureSubscription() + { + return RunPSCmdletAndReturnFirst(new GetAzureSubscriptionCmdletInfo(null, null, true, true, false)); + } + + public PSAzureSubscriptionExtended GetDefaultAzureSubscription() + { + return RunPSCmdletAndReturnFirst(new GetAzureSubscriptionCmdletInfo(null, null, true, false, true)); + } + + public PSAzureSubscriptionExtended SetAzureSubscription(string subscriptionName, string subscriptionId, string currentStorageAccountName, bool debug = false) + { + var setAzureSubscriptionCmdlet = new SetAzureSubscriptionCmdletInfo(subscriptionId, currentStorageAccountName); + SelectAzureSubscription(subscriptionName); + var azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(setAzureSubscriptionCmdlet); + azurePowershellCmdlet.Run(debug); + + Collection subscriptions = GetAzureSubscription(); + foreach (PSAzureSubscriptionExtended subscription in subscriptions) + { + if (subscription.SubscriptionName == subscriptionName) + { + return subscription; + } + } + return null; + } + + public PSAzureSubscriptionExtended SetDefaultAzureSubscription(string subscriptionName, bool debug = false) + { + SelectAzureSubscription(subscriptionName); + + Collection subscriptions = GetAzureSubscription(); + foreach (PSAzureSubscriptionExtended subscription in subscriptions) + { + if (subscription.SubscriptionName == subscriptionName) + { + return subscription; + } + } + return null; + } + + public AzureSubscription SelectAzureSubscription(string subscriptionName, bool isDefault = true, bool clear = false, string subscriptionDataFile = null) + { + return RunPSCmdletAndReturnFirst(new SelectAzureSubscriptionCmdletInfo(subscriptionName, isDefault, clear, subscriptionDataFile)); + } + + #endregion + + #region AzureSubnet + + public SM.SubnetNamesCollection GetAzureSubnet(SM.PersistentVM vm, bool debug = true) + { + var getAzureSubnetCmdlet = new GetAzureSubnetCmdletInfo(vm); + var azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(getAzureSubnetCmdlet); + Collection result = azurePowershellCmdlet.Run(debug); + + var subnets = new SM.SubnetNamesCollection(); + foreach (PSObject re in result) + { + subnets.Add((string)re.BaseObject); + } + return subnets; + } + + public SM.PersistentVM SetAzureSubnet(SM.PersistentVM vm, string[] subnetNames) + { + return RunPSCmdletAndReturnFirst(new SetAzureSubnetCmdletInfo(vm, subnetNames)); + } + + #endregion + + #region AzureStorageAccount + + public ManagementOperationContext NewAzureStorageAccount(string storageName, string locationName, string affinity, string label, string description) + { + return RunPSCmdletAndReturnFirst(new NewAzureStorageAccountCmdletInfo(storageName, locationName, affinity, label, description, null)); + } + + public ManagementOperationContext NewAzureStorageAccount(string storageName, string locationName, string affinity, string label, string description, string accountType) + { + return RunPSCmdletAndReturnFirst(new NewAzureStorageAccountCmdletInfo(storageName, locationName, affinity, label, description, accountType)); + } + + public SM.StorageServicePropertiesOperationContext NewAzureStorageAccount(string storageName, string locationName) + { + NewAzureStorageAccount(storageName, locationName, null, null, null); + + Collection storageAccounts = GetAzureStorageAccount(null); + foreach (SM.StorageServicePropertiesOperationContext storageAccount in storageAccounts) + { + if (storageAccount.StorageAccountName == storageName) + return storageAccount; + } + return null; + } + + public Collection GetAzureStorageAccount(string accountName) + { + return RunPSCmdletAndReturnAll(new GetAzureStorageAccountCmdletInfo(accountName)); + } + + public ManagementOperationContext SetAzureStorageAccount(string accountName, string label, string description, bool? geoReplication) + { + return RunPSCmdletAndReturnFirst(new SetAzureStorageAccountCmdletInfo(accountName, label, description, geoReplication)); + } + + public ManagementOperationContext SetAzureStorageAccount(string accountName, string label, string description, string accountType) + { + return RunPSCmdletAndReturnFirst(new SetAzureStorageAccountCmdletInfo(accountName, label, description, accountType)); + } + + public void RemoveAzureStorageAccount(string storageAccountName) + { + Utilities.RetryActionUntilSuccess( + () => RunPSCmdletAndReturnFirst(new RemoveAzureStorageAccountCmdletInfo(storageAccountName)), + "409", 3, 60); + } + + #endregion + + #region AzureStorageKey + + public SM.StorageServiceKeyOperationContext GetAzureStorageAccountKey(string stroageAccountName) + { + return RunPSCmdletAndReturnFirst(new GetAzureStorageKeyCmdletInfo(stroageAccountName)); + } + + public SM.StorageServiceKeyOperationContext NewAzureStorageAccountKey(string stroageAccountName, string keyType) + { + return RunPSCmdletAndReturnFirst(new NewAzureStorageKeyCmdletInfo(stroageAccountName, keyType)); + } + + #endregion + + #region AzureService + + public ManagementOperationContext NewAzureService(string serviceName, string location) + { + return RunPSCmdletAndReturnFirst(new NewAzureServiceCmdletInfo(serviceName, location)); + } + + public ManagementOperationContext NewAzureService(string serviceName, string serviceLabel, string locationName, string affinityGroup = null) + { + return RunPSCmdletAndReturnFirst(new NewAzureServiceCmdletInfo(serviceName, serviceLabel, locationName, affinityGroup)); + } + + public bool RemoveAzureService(string serviceName, bool deleteAll = false) + { + bool result = false; + Utilities.RetryActionUntilSuccess( + () => result = RunPSCmdletAndReturnFirst(new RemoveAzureServiceCmdletInfo(serviceName, deleteAll), false), + "ConflictError", 3, 60); + return result; + } + + public SM.HostedServiceDetailedContext GetAzureService(string serviceName) + { + return RunPSCmdletAndReturnFirst(new GetAzureServiceCmdletInfo(serviceName)); + } + + #endregion + + #region AzureServiceDiagnosticsExtension + + // New-AzureServiceDiagnosticsExtensionConfig + public ExtensionConfigurationInput NewAzureServiceDiagnosticsExtensionConfig(string storage, XmlDocument config = null, string[] roles = null) + { + return RunPSCmdletAndReturnFirst(new NewAzureServiceDiagnosticsExtensionConfigCmdletInfo(storage, config, roles)); + } + + public ExtensionConfigurationInput NewAzureServiceDiagnosticsExtensionConfig + (string storage, X509Certificate2 cert, XmlDocument config = null, string[] roles = null) + { + return RunPSCmdletAndReturnFirst + (new NewAzureServiceDiagnosticsExtensionConfigCmdletInfo(storage, cert, config, roles)); + } + + public ExtensionConfigurationInput NewAzureServiceDiagnosticsExtensionConfig + (string storage, string thumbprint, string algorithm = null, XmlDocument config = null, string[] roles = null) + { + return RunPSCmdletAndReturnFirst + (new NewAzureServiceDiagnosticsExtensionConfigCmdletInfo(storage, thumbprint, algorithm, config, roles)); + } + + // Set-AzureServiceDiagnosticsExtension + public ManagementOperationContext SetAzureServiceDiagnosticsExtension + (string service, string storage, string config = null, string[] roles = null, string slot = null) + { + return RunPSCmdletAndReturnFirst(new SetAzureServiceDiagnosticsExtensionCmdletInfo(service, storage, config, roles, slot)); + } + + public ManagementOperationContext SetAzureServiceDiagnosticsExtension(string service, string storage, X509Certificate2 cert, string config = null, string[] roles = null, string slot = null) + { + return RunPSCmdletAndReturnFirst(new SetAzureServiceDiagnosticsExtensionCmdletInfo(service, storage, cert, config, roles, slot)); + } + + public ManagementOperationContext SetAzureServiceDiagnosticsExtension(string service, string storage, string thumbprint, string algorithm = null, string config = null, string[] roles = null, string slot = null) + { + return RunPSCmdletAndReturnFirst(new SetAzureServiceDiagnosticsExtensionCmdletInfo(service, storage, thumbprint, algorithm, config, roles, slot)); + } + + // Get-AzureServiceDiagnosticsExtension + public Collection GetAzureServiceDiagnosticsExtension(string serviceName, string slot = null) + { + return RunPSCmdletAndReturnAll(new GetAzureServiceDiagnosticsExtensionCmdletInfo(serviceName, slot)); + } + + // Remove-AzureServiceDiagnosticsExtension + public ManagementOperationContext RemoveAzureServiceDiagnosticsExtension(string serviceName, bool uninstall = false, string[] roles = null, string slot = null) + { + return RunPSCmdletAndReturnFirst(new RemoveAzureServiceDiagnosticsExtensionCmdletInfo(serviceName, uninstall, roles, slot)); + } + + #endregion + + #region AzureServiceRemoteDesktopExtension + + // New-AzureServiceRemoteDesktopExtensionConfig + public ExtensionConfigurationInput NewAzureServiceRemoteDesktopExtensionConfig + (PSCredential cred, DateTime? exp = null, string[] roles = null, string version = null) + { + return RunPSCmdletAndReturnFirst + (new NewAzureServiceRemoteDesktopExtensionConfigCmdletInfo(cred, exp, roles, version)); + } + + public ExtensionConfigurationInput NewAzureServiceRemoteDesktopExtensionConfig + (PSCredential cred, X509Certificate2 cert, string alg = null, DateTime? exp = null, string[] roles = null, string version = null) + { + return RunPSCmdletAndReturnFirst + (new NewAzureServiceRemoteDesktopExtensionConfigCmdletInfo(cred, cert, alg, exp, roles, version)); + } + + public ExtensionConfigurationInput NewAzureServiceRemoteDesktopExtensionConfig + (PSCredential cred, string thumbprint, string algorithm = null, DateTime? exp = null, string[] roles = null, string version = null) + { + return RunPSCmdletAndReturnFirst + (new NewAzureServiceRemoteDesktopExtensionConfigCmdletInfo(cred, thumbprint, algorithm, exp, roles, version)); + } + + // Set-AzureServiceRemoteDesktopExtension + public ManagementOperationContext SetAzureServiceRemoteDesktopExtension + (string serviceName, PSCredential cred, DateTime? exp = null, string[] roles = null, string slot = null, string version = null) + { + return RunPSCmdletAndReturnFirst + (new SetAzureServiceRemoteDesktopExtensionCmdletInfo(serviceName, cred, exp, roles, slot, version)); + } + + public ManagementOperationContext SetAzureServiceRemoteDesktopExtension + (string serviceName, PSCredential credential, X509Certificate2 cert, DateTime? expiration = null, string[] roles = null, string slot = null, string version = null) + { + return RunPSCmdletAndReturnFirst + (new SetAzureServiceRemoteDesktopExtensionCmdletInfo(serviceName, credential, cert, expiration, roles, slot, version)); + } + + public ManagementOperationContext SetAzureServiceRemoteDesktopExtension + (string serviceName, PSCredential credential, string thumbprint, string algorithm = null, DateTime? expiration = null, string[] roles = null, string slot = null, string version = null) + { + return RunPSCmdletAndReturnFirst + (new SetAzureServiceRemoteDesktopExtensionCmdletInfo(serviceName, credential, thumbprint, algorithm, expiration, roles, slot, version)); + } + + // Get-AzureServiceRemoteDesktopExtension + public Collection GetAzureServiceRemoteDesktopExtension(string serviceName, string slot = null) + //public RemoteDesktopExtensionContext GetAzureServiceRemoteDesktopExtension(string serviceName, string slot = null) + { + return RunPSCmdletAndReturnAll(new GetAzureServiceRemoteDesktopExtensionCmdletInfo(serviceName, slot)); + //return RunPSCmdletAndReturnFirst(new GetAzureServiceRemoteDesktopExtensionCmdletInfo(serviceName, slot)); + } + + // Remove-AzureServiceRemoteDesktopExtension + public ManagementOperationContext RemoveAzureServiceRemoteDesktopExtension(string serviceName, bool uninstall = false, string[] roles = null, string slot = null) + { + return RunPSCmdletAndReturnFirst(new RemoveAzureServiceRemoteDesktopExtensionCmdletInfo(serviceName, uninstall, roles, slot)); + } + + #endregion + + #region AzureServiceExtension + + // New-AzureServiceExtensionConfig + public ExtensionConfigurationInput NewAzureServiceExtensionConfig(string extensionName, string providerNamespace, + string publicConfig, string privateConfig, string[] roles = null, string version = null) + { + return + RunPSCmdletAndReturnFirst( + new NewAzureServiceExtensionConfigCmdletInfo(roles, extensionName, providerNamespace, + publicConfig, privateConfig, version)); + } + + public ExtensionConfigurationInput NewAzureServiceExtensionConfig(string extensionName, string providerNamespace, + string publicConfig, string privateConfig, X509Certificate2 cert, string alg = null, string[] roles = null, string version = null) + { + return + RunPSCmdletAndReturnFirst(new NewAzureServiceExtensionConfigCmdletInfo( + cert, alg, roles, extensionName, providerNamespace, publicConfig, privateConfig, version)); + } + + public ExtensionConfigurationInput NewAzureServiceExtensionConfig(string extensionName, string providerNamespace, + string publicConfig, string privateConfig, string thumbprint, string algorithm = null, string[] roles = null, string version = null) + { + return + RunPSCmdletAndReturnFirst( + new NewAzureServiceExtensionConfigCmdletInfo(thumbprint, algorithm, roles, extensionName, + providerNamespace, publicConfig, privateConfig, version)); + } + + // Set-AzureServiceExtension + public ManagementOperationContext SetAzureServiceExtension(string serviceName, string extensionName, + string providerNamespace, string publicConfig, string privateConfig, string[] roles = null, string slot = null, string version = null) + { + return + RunPSCmdletAndReturnFirst( + new SetAzureServiceExtensionCmdletInfo(serviceName, roles, slot, extensionName, providerNamespace, + publicConfig, privateConfig, version)); + } + + public ManagementOperationContext SetAzureServiceExtension(string serviceName, string extensionName, + string providerNamespace, string publicConfig, string privateConfig, X509Certificate2 cert, string[] roles = null, string slot = null, string version = null) + { + return + RunPSCmdletAndReturnFirst( + new SetAzureServiceExtensionCmdletInfo(serviceName, cert, roles, slot, extensionName, + providerNamespace, publicConfig, privateConfig, version)); + } + + public ManagementOperationContext SetAzureServiceExtension(string serviceName, string extensionName, + string providerNamespace, string publicConfig, string privateConfig, string thumbprint, string algorithm = null, string[] roles = null, string slot = null, string version = null) + { + return + RunPSCmdletAndReturnFirst( + new SetAzureServiceExtensionCmdletInfo(serviceName, thumbprint, algorithm, roles, slot, + extensionName, providerNamespace, publicConfig, privateConfig, version)); + } + + // Get-AzureServiceExtension + public Collection GetAzureServiceExtension(string serviceName, string slot = null, string extensionName = null, string providerNamespace = null) + { + return + RunPSCmdletAndReturnAll(new GetAzureServiceExtensionCmdletInfo(serviceName, slot, + extensionName, providerNamespace)); + } + + // Remove-AzureServiceExtension + public ManagementOperationContext RemoveAzureServiceExtension(string serviceName, string extensionName, + string providerNamespace, bool uninstall = false, string[] roles = null, string slot = null) + { + return + RunPSCmdletAndReturnFirst( + new RemoveAzureServiceExtensionCmdletInfo(serviceName, uninstall, roles, slot, extensionName, + providerNamespace)); + } + + // Get-AzureServiceAvailableExtension + public Collection GetAzureServiceAvailableExtension(string extensionName = null, + string providerNamespace = null, string version = null, bool allVersion = false) + { + return + RunPSCmdletAndReturnAll( + new GetAzureServiceAvailableExtensionCmdletInfo(extensionName, providerNamespace, version, + allVersion)); + } + + #endregion + + + #region AzureVM + + internal Collection NewAzureVM(string serviceName, SM.PersistentVM[] VMs, string location = null, bool waitForBoot = false) + { + return NewAzureVM(serviceName, VMs, null, null, null, null, null, null, location,waitForBoot: waitForBoot); + } + + internal Collection NewAzureVMWithAG(string serviceName, SM.PersistentVM[] VMs, string affGroupName) + { + return NewAzureVM(serviceName, VMs, null, null, null, null, null, null, null, affGroupName); + } + + internal Collection NewAzureVMWithReservedIP(string serviceName, SM.PersistentVM[] VMs, + string reservedIPName, string affGroupName = null) + { + return NewAzureVM(serviceName, VMs, null, null, null, null, null, null, null, affGroupName, reservedIPName); + } + + internal Collection NewAzureVMWithInternalLoadBalancer(string serviceName, SM.PersistentVM[] VMs, SM.InternalLoadBalancerConfig ilbConfig, string vnet = null, string location = null) + { + return NewAzureVM(serviceName, VMs, vnet, null, null, null, null, null, location, null, null, ilbConfig); + } + + internal Collection NewAzureVM(string serviceName, SM.PersistentVM[] vms, + string vnetName, SM.DnsServer[] dnsSettings, + string serviceLabel = null, string serviceDescription = null, string deploymentLabel = null, string deploymentDescription = null, + string location = null, string affinityGroup = null, string reservedIPName = null, SM.InternalLoadBalancerConfig internalLoadBalancerConfig = null, bool waitForBoot = false) + { + Collection result = new Collection(); + Utilities.RetryActionUntilSuccess( + () => + result = + RunPSCmdletAndReturnAll(new NewAzureVMCmdletInfo(serviceName, vms, + vnetName, dnsSettings, serviceLabel, serviceDescription, deploymentLabel, + deploymentDescription, location, affinityGroup, reservedIPName, internalLoadBalancerConfig, waitForBoot)), + "409", 5, 60); + return result; + } + + public Collection GetAzureVM(string vmName = null) + { + return RunPSCmdletAndReturnAll(new GetAzureVMCmdletInfo(vmName, null)); + } + + public SM.PersistentVMRoleContext GetAzureVM(string vmName, string serviceName) + { + return RunPSCmdletAndReturnFirst(new GetAzureVMCmdletInfo(vmName, serviceName)); + } + + public ManagementOperationContext RemoveAzureVM(string vmName, string serviceName, bool deleteVhd = false) + { + return RunPSCmdletAndReturnFirst(new RemoveAzureVMCmdletInfo(vmName, serviceName, deleteVhd)); + } + + public ManagementOperationContext StartAzureVM(string vmName, string serviceName) + { + return RunPSCmdletAndReturnFirst(new StartAzureVMCmdletInfo(vmName, serviceName)); + } + + public ManagementOperationContext StopAzureVM(SM.PersistentVM vm, string serviceName, bool stay = false, bool force = false) + { + return RunPSCmdletAndReturnFirst(new StopAzureVMCmdletInfo(vm, serviceName, stay, force)); + } + + public ManagementOperationContext StopAzureVM(string vmName, string serviceName, bool stay = false, bool force = false) + { + return RunPSCmdletAndReturnFirst(new StopAzureVMCmdletInfo(vmName, serviceName, stay, force)); + } + + public void RestartAzureVM(string vmName, string serviceName) + { + RunPSCmdletAndReturnAll(new RestartAzureVMCmdletInfo(vmName, serviceName)); + } + + public SM.PersistentVMRoleContext ExportAzureVM(string vmName, string serviceName, string path) + { + return RunPSCmdletAndReturnFirst(new ExportAzureVMCmdletInfo(vmName, serviceName, path)); + } + + public Collection ImportAzureVM(string path) + { + return RunPSCmdletAndReturnAll(new ImportAzureVMCmdletInfo(path)); + } + + public ManagementOperationContext UpdateAzureVM(string vmName, string serviceName, SM.PersistentVM persistentVM) + { + ManagementOperationContext result = new ManagementOperationContext(); + Utilities.RetryActionUntilSuccess( + () => result = RunPSCmdletAndReturnFirst(new UpdateAzureVMCmdletInfo(vmName, serviceName, persistentVM)), + "409", 3, 60); + return result; + } + + #endregion + + #region AzureVMImage + + public SM.OSImageContext AddAzureVMImage(string imageName, string mediaLocation, OS os, string label = null, string recommendedSize = null) + { + SM.OSImageContext result = new SM.OSImageContext(); + Utilities.RetryActionUntilSuccess( + () => result = RunPSCmdletAndReturnFirst(new AddAzureVMImageCmdletInfo(imageName, mediaLocation, os, label, recommendedSize)), + "409", 3, 60); + return result; + } + + public SM.OSImageContext UpdateAzureVMImage(string imageName, string label, string recommendedSize = null) + { + return RunPSCmdletAndReturnFirst(new UpdateAzureVMImageCmdletInfo(imageName, label, recommendedSize, null, null)); + } + + public SM.OSImageContext UpdateAzureVMImage(string imageName, string label, bool dontShowInGui) + { + return RunPSCmdletAndReturnFirst(new UpdateAzureVMImageCmdletInfo(imageName, label, null, null, dontShowInGui)); + } + + public void UpdateAzureVMImage(string imageName, string label, SM.VirtualMachineImageDiskConfigSet diskConfig, string recommendedSize = null) + { + RunPSCmdletAndReturnFirst(new UpdateAzureVMImageCmdletInfo(imageName, label, recommendedSize, diskConfig, null)); + } + + public void UpdateAzureVMImage(string imageName, string label, string imageFamily, bool showInGui = false, string recommendedSize = null, + string description = null, string eula = null, Uri privacyUri = null, DateTime? publishedDate = null, string language = null, Uri iconUri = null, + Uri smallIconUri = null) + { + RunPSCmdletAndReturnFirst(new UpdateAzureVMImageCmdletInfo(imageName, label, recommendedSize, description, eula, imageFamily, + privacyUri, publishedDate.Value, language, iconUri, smallIconUri, showInGui)); + } + + public ManagementOperationContext RemoveAzureVMImage(string imageName, bool deleteVhd = false) + { + ManagementOperationContext result = new ManagementOperationContext(); + Utilities.RetryActionUntilSuccess( + () => result = RunPSCmdletAndReturnFirst(new RemoveAzureVMImageCmdletInfo(imageName, deleteVhd)), + "409", 3, 60); + return result; + } + + public void SaveAzureVMImage(string serviceName, string vmName, string newImageName, string osState = null,string newImageLabel = null) + { + RunPSCmdletAndReturnFirst(new SaveAzureVMImageCmdletInfo(serviceName, vmName, newImageName, newImageLabel, osState)); + } + + public Collection GetAzureVMImage(string imageName = null) + { + return RunPSCmdletAndReturnAll(new GetAzureVMImageCmdletInfo(imageName)); + } + + public Collection GetAzureVMImageReturningVMImages(string imageName = null) + { + return RunPSCmdletAndReturnAll(new GetAzureVMImageCmdletInfo(imageName)); + } + + public string GetAzureVMImageName(string[] keywords, bool exactMatch = true) + { + Collection vmImages = GetAzureVMImage(); + foreach (SM.OSImageContext image in vmImages) + { + if (Utilities.MatchKeywords(image.ImageName, keywords, exactMatch) >= 0) + return image.ImageName; + } + foreach (SM.OSImageContext image in vmImages) + { + if (Utilities.MatchKeywords(image.OS, keywords, exactMatch) >= 0) + return image.ImageName; + } + return null; + } + + #endregion + + #region AzureVhd + + public string AddAzureVhdStop(FileInfo localFile, string destination, int ms) + { + WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(new AddAzureVhdCmdletInfo(destination, localFile.FullName, null, false, null)); + return azurePowershellCmdlet.RunAndStop(ms).ToString(); + } + + public SM.VhdUploadContext AddAzureVhd(FileInfo localFile, string destination) + { + return AddAzureVhd(localFile, destination, null); + } + + public SM.VhdUploadContext AddAzureVhd(FileInfo localFile, string destination, string baseImage) + { + return AddAzureVhd(localFile, destination, null, false, baseImage); + } + + public SM.VhdUploadContext AddAzureVhd(FileInfo localFile, string destination, bool overwrite) + { + return AddAzureVhd(localFile, destination, null, overwrite); + } + + public SM.VhdUploadContext AddAzureVhd(FileInfo localFile, string destination, int? numberOfUploaderThreads, bool overWrite = false, string baseImage = null) + { + SM.VhdUploadContext result = new SM.VhdUploadContext(); + Utilities.RetryActionUntilSuccess( + () => result = RunPSCmdletAndReturnFirst(new AddAzureVhdCmdletInfo(destination, localFile.FullName, numberOfUploaderThreads, overWrite, baseImage)), + "pipeline is already running", 3, 30); + return result; + } + + public SM.VhdDownloadContext SaveAzureVhd(Uri source, FileInfo localFilePath, int? numThreads, string storageKey, bool overwrite) + { + SM.VhdDownloadContext result = new SM.VhdDownloadContext(); + Utilities.RetryActionUntilSuccess( + () => result = RunPSCmdletAndReturnFirst(new SaveAzureVhdCmdletInfo(source, localFilePath, numThreads, storageKey, overwrite)), + "pipeline is already running", 3, 30); + return result; + } + + public string SaveAzureVhdStop(Uri source, FileInfo localFilePath, int? numThreads, string storageKey, bool overwrite, int ms) + { + SaveAzureVhdCmdletInfo saveAzureVhdCmdletInfo = new SaveAzureVhdCmdletInfo(source, localFilePath, numThreads, storageKey, overwrite); + WindowsAzurePowershellCmdlet azurePowershellCmdlet = new WindowsAzurePowershellCmdlet(saveAzureVhdCmdletInfo); + return azurePowershellCmdlet.RunAndStop(ms).ToString(); + } + + #endregion + + #region AzureVnetConfig + + public Collection GetAzureVNetConfig(string filePath) + { + return RunPSCmdletAndReturnAll(new GetAzureVNetConfigCmdletInfo(filePath)); + } + + public ManagementOperationContext SetAzureVNetConfig(string filePath) + { + return RunPSCmdletAndReturnFirst(new SetAzureVNetConfigCmdletInfo(filePath)); + } + + public ManagementOperationContext RemoveAzureVNetConfig() + { + return RunPSCmdletAndReturnFirst(new RemoveAzureVNetConfigCmdletInfo()); + } + + #endregion + + #region AzureVNetGateway + + public GatewayGetOperationStatusResponse NewAzureVNetGateway(string vnetName) + { + return RunPSCmdletAndReturnFirst(new NewAzureVNetGatewayCmdletInfo(vnetName)); + } + + public Collection GetAzureVNetGateway(string vnetName) + { + return RunPSCmdletAndReturnAll(new GetAzureVNetGatewayCmdletInfo(vnetName)); + } + + public GatewayGetOperationStatusResponse SetAzureVNetGateway(string option, string vnetName, string localNetwork) + { + return RunPSCmdletAndReturnFirst(new SetAzureVNetGatewayCmdletInfo(option, vnetName, localNetwork)); + } + + public GatewayGetOperationStatusResponse RemoveAzureVNetGateway(string vnetName) + { + return RunPSCmdletAndReturnFirst(new RemoveAzureVNetGatewayCmdletInfo(vnetName)); + } + + public SharedKeyContext GetAzureVNetGatewayKey(string vnetName, string localnet) + { + return RunPSCmdletAndReturnFirst(new GetAzureVNetGatewayKeyCmdletInfo(vnetName, localnet)); + } + + #endregion + + #region AzureVNet + + public IEnumerable GetAzureVNetConnection(string vnetName) + { + return RunPSCmdletAndReturnFirst>(new GetAzureVNetConnectionCmdletInfo(vnetName)); + } + + public Collection GetAzureVNetSite(string vnetName) + { + return RunPSCmdletAndReturnAll(new GetAzureVNetSiteCmdletInfo(vnetName)); + } + + #endregion + + #region AzureRoleSize + + public Collection GetAzureRoleSize(string instanceSize = null) + { + return RunPSCmdletAndReturnAll(new GetAzureRoleSizeCmdletInfo(instanceSize)); + } + + #endregion + + + public ManagementOperationContext GetAzureRemoteDesktopFile(string vmName, string serviceName, string localPath, bool launch) + { + return RunPSCmdletAndReturnFirst(new GetAzureRemoteDesktopFileCmdletInfo(vmName, serviceName, localPath, launch)); + } + + public ManagementOperationContext ResetAzureRoleInstance(string serviceName,string instanceName,string slotType,bool reboot=false,bool reimage=false) + { + return RunPSCmdletAndReturnFirst(new ResetAzureRoleInstanceCmdletInfo(serviceName,instanceName,slotType,reboot,reimage)); + } + + internal SM.PersistentVM GetPersistentVM(PersistentVMConfigInfo configInfo) + { + SM.PersistentVM vm = null; + + if (null != configInfo) + { + if (configInfo.VmConfig != null) + { + vm = NewAzureVMConfig(configInfo.VmConfig); + } + + if (configInfo.ProvConfig != null) + { + configInfo.ProvConfig.Vm = vm; + vm = AddAzureProvisioningConfig(configInfo.ProvConfig); + } + + if (configInfo.DiskConfig != null) + { + configInfo.DiskConfig.Vm = vm; + vm = AddAzureDataDisk(configInfo.DiskConfig); + } + + if (configInfo.EndPointConfig != null) + { + configInfo.EndPointConfig.Vm = vm; + vm = AddAzureEndPoint(configInfo.EndPointConfig); + } + } + + return vm; + } + + internal void AddVMDataDisks(string vmName, string serviceName, AddAzureDataDiskConfig[] diskConfig) + { + SM.PersistentVMRoleContext vmRolectx = GetAzureVM(vmName, serviceName); + + foreach (AddAzureDataDiskConfig discCfg in diskConfig) + { + discCfg.Vm = vmRolectx.VM; + vmRolectx.VM = AddAzureDataDisk(discCfg); + } + + UpdateAzureVM(vmName, serviceName, vmRolectx.VM); + } + + internal void SetVMDataDisks(string vmName, string serviceName, SetAzureDataDiskConfig[] diskConfig) + { + SM.PersistentVMRoleContext vmRolectx = GetAzureVM(vmName, serviceName); + + foreach (SetAzureDataDiskConfig discCfg in diskConfig) + { + discCfg.Vm = vmRolectx.VM; + vmRolectx.VM = SetAzureDataDisk(discCfg); + } + + UpdateAzureVM(vmName, serviceName, vmRolectx.VM); + } + + internal void SetVMSize(string vmName, string serviceName, SetAzureVMSizeConfig vmSizeConfig) + { + SM.PersistentVMRoleContext vmRolectx = GetAzureVM(vmName, serviceName); + + vmSizeConfig.Vm = vmRolectx.VM; + vmRolectx.VM = SetAzureVMSize(vmSizeConfig); + + UpdateAzureVM(vmName, serviceName, vmRolectx.VM); + } + + public SM.PersistentVM SetAzureVMSize(SetAzureVMSizeConfig sizeCfg) + { + return RunPSCmdletAndReturnFirst(new SetAzureVMSizeCmdletInfo(sizeCfg)); + } + + internal void AddVMDataDisksAndEndPoint(string vmName, string serviceName, AddAzureDataDiskConfig[] dataDiskConfig, AzureEndPointConfigInfo endPointConfig) + { + AddVMDataDisks(vmName, serviceName, dataDiskConfig); + + AddEndPoint(vmName, serviceName, new [] {endPointConfig}); + } + + public void RemoveAzureSubscriptions() + { + // Remove all subscriptions. SAS Uri should work without a subscription. + try + { + RunPSScript("Get-AzureSubscription | Remove-AzureSubscription -Force"); + } + catch + { + Console.WriteLine("Subscriptions cannot be removed"); + } + + // Check if all subscriptions are removed. + try + { + Assert.AreEqual(0, GetAzureSubscription().Count, "Subscription was not removed"); + } + catch (Exception e) + { + if (e is AssertFailedException) + { + throw; + } + } + } + + public void RemoveAzureSubscription(string Name, bool force, bool debug = false) + { + var removeAzureSubscriptionCmdletInfo = new RemoveAzureSubscriptionCmdletInfo(Name, null, force); + var removeAzureSubscriptionCmdlet = new WindowsAzurePowershellCmdlet(removeAzureSubscriptionCmdletInfo); + removeAzureSubscriptionCmdlet.Run(debug); + } + + public List GetAzureEnvironment(string name = null, string subscriptionDataFile = null, bool debug = false) + { + Collection result = (new WindowsAzurePowershellCmdlet(new GetAzureEnvironmentCmdletInfo(name, subscriptionDataFile))).Run(debug); + List envList = new List(); + + foreach (var element in result) + { + var newEnv = new AzureEnvironment(); + newEnv.Name = element.Properties.Match("Name")[0].Value.ToString(); + var endpoints = new Dictionary(); + var endpointKeys = Enum.GetValues(typeof(AzureEnvironment.Endpoint)); + foreach(var key in endpointKeys) + { + endpoints.Add((AzureEnvironment.Endpoint) key, (string) element.Properties.Match(key.ToString())[0].Value); + } + + newEnv.Endpoints = endpoints; + envList.Add(newEnv); + } + + return envList; + } + + internal SM.NetworkAclObject NewAzureAclConfig() + { + return RunPSCmdletAndReturnFirst(new NewAzureAclConfigCmdletInfo()); + } + + // Set-AzureAclConfig -AddRule -ACL $acl2 -Order 100 -Action Deny -RemoteSubnet "172.0.0.0/8" -Description "notes3" + // vmPowershellCmdlets.SetAzureAclConfig(SetACLConfig.AddRule, aclObj, 100, ACLAction.Permit, "172.0.0.0//8", "Desc"); + internal void SetAzureAclConfig(SetACLConfig aclConfig, SM.NetworkAclObject aclObj, int order, ACLAction aclAction, string remoteSubnet, string desc) + { + RunPSCmdletAndReturnAll(new SetAzureAclConfigCmdletInfo(aclConfig.ToString(), aclObj, order, + aclAction.ToString(), remoteSubnet, desc, + null)); + } + + internal SM.NetworkAclObject GetAzureAclConfig(SM.PersistentVM vm, string ep = null) + { + return RunPSCmdletAndReturnFirst(new GetAzureAclConfigCmdletInfo(vm, ep)); + } + + #region AzureServiceDomainJoinExtension + + #region NewAzureServiceDomainJoinExtensionConfig + + // WorkgroupThumbprintParameterSet + public ExtensionConfigurationInput NewAzureServiceDomainJoinExtensionConfig(string workGroupName, + string certificateThumbprint, string[] role, bool restart, string thumbprintAlgorithm, + PSCredential credential = null, string version = null) + { + return + RunPSCmdletAndReturnFirst( + new NewAzureServiceDomainJoinExtensionConfigCmdletInfo(workGroupName, certificateThumbprint, role, + thumbprintAlgorithm, restart, credential, version)); + } + + // WorkgroupParameterSet + public ExtensionConfigurationInput NewAzureServiceDomainJoinExtensionConfig(string workGroupName, + X509Certificate2 x509Certificate, bool restart = true, string thumbprintAlgorithm = null, + string[] role = null, PSCredential credential = null, string version = null) + { + return + RunPSCmdletAndReturnFirst( + new NewAzureServiceDomainJoinExtensionConfigCmdletInfo(workGroupName, x509Certificate, role, + thumbprintAlgorithm, restart, credential, version)); + } + + // DomainParameterSet + public ExtensionConfigurationInput NewAzureServiceDomainJoinExtensionConfig(string domainName, + X509Certificate2 x509Certificate, JoinOptions? options = null, string oUPath = null, + PSCredential unjoinDomainCredential = null, string[] role = null, string thumbprintAlgorithm = null, + bool restart = true, PSCredential credential = null, string version = null) + { + return + RunPSCmdletAndReturnFirst( + new NewAzureServiceDomainJoinExtensionConfigCmdletInfo(domainName, x509Certificate, options, oUPath, + unjoinDomainCredential, role, thumbprintAlgorithm, restart, credential, version)); + } + + // DomainJoinOptionThumbprintParameterSet + public ExtensionConfigurationInput NewAzureServiceDomainJoinExtensionConfig(string domainName, + string certificateThumbprint, string oUPath = null, PSCredential unjoinDomainCredential = null, + string[] role = null, string thumbprintAlgorithm = null, uint? joinOption = null, bool restart = true, + PSCredential credential = null, string version = null) + { + return + RunPSCmdletAndReturnFirst( + new NewAzureServiceDomainJoinExtensionConfigCmdletInfo(domainName, certificateThumbprint, joinOption, + oUPath, unjoinDomainCredential, role, thumbprintAlgorithm, restart, credential, version)); + } + + #endregion NewAzureServiceDiagnosticsExtensionConfig + + #region SetAzureServiceDomainJoinExtensionCmdletInfo + + // WorkgroupParameterSet + public ManagementOperationContext SetAzureServiceDomainJoinExtension + (string workGroupName, + string serviceName, string slot = SM.DeploymentSlotType.Production, string[] role = null, + X509Certificate2 x509Certificate = null, bool restart = true, string thumbprintAlgorithm = null, + PSCredential credential = null, string version = null) + { + return RunPSCmdletAndReturnFirst(new SetAzureServiceDomainJoinExtensionCmdletInfo( + workGroupName, x509Certificate, role, slot, serviceName,restart, thumbprintAlgorithm, credential, version)); + } + + // WorkgroupThumbprintParameterSet + public ManagementOperationContext SetAzureServiceDomainJoinExtension + (string workGroupName, + string serviceName, string slot, string[] role, + string certificateThumbprint, string thumbprintAlgorithm = null, + bool restart = true, PSCredential credential = null, string version = null) + { + return + RunPSCmdletAndReturnFirst( + new SetAzureServiceDomainJoinExtensionCmdletInfo(workGroupName, certificateThumbprint, role, slot, + serviceName, thumbprintAlgorithm, restart, credential, version)); + } + + // DomainJoinOptionThumprintParameterSet + public ManagementOperationContext SetAzureServiceDomainJoinExtension + (string domainName, PSCredential credential, uint joinOption, bool restart, + string serviceName, string slot, string[] role, + string certificateThumbprint, string thumbprintAlgorithm = null, + PSCredential unjoinDomainCredential = null, string oUPath = null, string version = null) + { + return + RunPSCmdletAndReturnFirst( + new SetAzureServiceDomainJoinExtensionCmdletInfo(domainName, certificateThumbprint, joinOption, + unjoinDomainCredential, + role, slot, serviceName, thumbprintAlgorithm, restart, credential, oUPath, version)); + } + + // DomainThumprintParameterSet + public ManagementOperationContext SetAzureServiceDomainJoinExtension + (string domainName, PSCredential credential, JoinOptions? options, bool restart, + string serviceName, string slot, string[] role, + string certificateThumbprint, string thumbprintAlgorithm = null, + PSCredential unjoinDomainCredential = null, string oUPath = null, string version = null) + { + return + RunPSCmdletAndReturnFirst( + new SetAzureServiceDomainJoinExtensionCmdletInfo(domainName, certificateThumbprint, options, + unjoinDomainCredential, + role, slot, serviceName, thumbprintAlgorithm, restart, credential, oUPath, version)); + } + + // DomainParameterSet + public ManagementOperationContext SetAzureServiceDomainJoinExtension + (string domainName, PSCredential credential, JoinOptions? options, bool restart, + string serviceName, string slot, string[] role, + X509Certificate2 x509Certificate = null, string thumbprintAlgorithm = null, + PSCredential unjoinDomainCredential = null, string oUPath = null, string version = null) + { + return + RunPSCmdletAndReturnFirst( + new SetAzureServiceDomainJoinExtensionCmdletInfo(domainName, x509Certificate, options, + unjoinDomainCredential, + role, slot, serviceName, thumbprintAlgorithm, restart, credential, oUPath, version)); + } + + // DomainJoinOptionParameterSet + public ManagementOperationContext SetAzureServiceDomainJoinExtension + (string domainName, PSCredential credential, uint joinOption, bool restart, + string serviceName, string slot, string[] role = null, + X509Certificate2 x509Certificate = null, string thumbprintAlgorithm = null, + PSCredential unjoinDomainCredential = null, string oUPath = null, string version = null) + { + return + RunPSCmdletAndReturnFirst( + new SetAzureServiceDomainJoinExtensionCmdletInfo(domainName, x509Certificate, joinOption, + unjoinDomainCredential, + role, slot, serviceName, thumbprintAlgorithm, restart, credential, oUPath, version)); + } + + #endregion SetAzureServiceDomainJoinExtensionCmdletInfo + + #region GetAzureServiceDomainJoinExtension + public ADDomainExtensionContext GetAzureServiceDomainJoinExtension(string serviceName = null, string slot = null) + { + return RunPSCmdletAndReturnFirst(new GetAzureServiceDomainJoinExtensionCmdletInfo(serviceName, slot)); + } + #endregion GetAzureServiceDomainJoinExtension + + #region RemoveAzureServiceDomainJoinExtension + public ManagementOperationContext RemoveAzureServiceDomainJoinExtension(string serviceName, string slot, string[] role = null, bool uninstallConfiguration = false) + { + return RunPSCmdletAndReturnFirst(new RemoveAzureServiceDomainJoinExtensionCmdletInfo(serviceName, slot, role, uninstallConfiguration)); + } + #endregion RemoveAzureServiceDomainJoinExtension + + #endregion AzureServiceDomainJoinExtension + + #region StaticCA + public SM.VirtualNetworkStaticIPAvailabilityContext TestAzureStaticVNetIP(string vNetName, string iPAddress) + { + return RunPSCmdletAndReturnFirst(new TestAzureStaticVNetIPCmdletInfo(vNetName, iPAddress)); + } + + public SM.PersistentVM SetAzureStaticVNetIP(string iPAddress, SM.IPersistentVM vM) + { + return RunPSCmdletAndReturnFirst(new SetAzureStaticVNetIPCmdletInfo(iPAddress, vM)); + } + + public SM.VirtualNetworkStaticIPContext GetAzureStaticVNetIP(SM.IPersistentVM vM) + { + return RunPSCmdletAndReturnFirst(new GetAzureStaticVNetIPCmdletInfo(vM)); + } + + public SM.PersistentVM RemoveAzureStaticVNetIP(SM.IPersistentVM vM) + { + return RunPSCmdletAndReturnFirst(new RemoveAzureStaticVNetIPCmdletInfo(vM)); + } + #endregion StaticCA + + #region AzureVM BGInfo Extension + public VirtualMachineBGInfoExtensionContext GetAzureVMBGInfoExtension(SM.IPersistentVM vm, string version = null, string referenceName = null) + { + return RunPSCmdletAndReturnFirst(new GetAzureVMBGInfoExtensionCmdletInfo(vm, version, referenceName)); + } + + public SM.PersistentVM SetAzureVMBGInfoExtension(SM.IPersistentVM vm, string version = null, string referenceName = null, bool disable = false) + { + return RunPSCmdletAndReturnFirst(new SetAzureVMBGInfoExtensionCmdletInfo(vm, version, referenceName, disable)); + } + + public SM.PersistentVM RemoveAzureVMBGInfoExtension(SM.IPersistentVM vm, string version = null, string referenceName = null) + { + return RunPSCmdletAndReturnFirst(new RemoveAzureVMBGInfoExtensionCmdletInfo(vm, version, referenceName)); + } + #endregion AzureVM BGInfo Extension + + #region Generic VM Extension cmdlets + public SM.PersistentVM SetAzureVMExtension(SM.IPersistentVM vm, string extensionName, string publisher, string version, string referenceName = null, + string publicConfiguration = null, string privateConfiguration = null, string publicConfigKey = null, string privateConfigKey = null, string publicConfigPath = null, string privateConfigPath = null, bool disable = false) + { + return RunPSCmdletAndReturnFirst(new SetAzureVMExtensionCmdletInfo(vm, extensionName, publisher, version, referenceName, + publicConfiguration, privateConfiguration, publicConfigKey, privateConfigKey, publicConfigPath, privateConfigPath, disable)); + } + + public SM.PersistentVM RemoveAzureVMExtension(SM.PersistentVM vm, string extensionName, string publisher, string referenceName=null, bool removeAll=false) + { + return RunPSCmdletAndReturnFirst(new RemoveAzureVMExtensionCmdletInfo(vm, extensionName, publisher, referenceName, removeAll)); + } + + public Collection GetAzureVMExtension(SM.PersistentVM vm, string extensionName = null, string publisher = null, string version = null, string referenceName = null) + { + return RunPSCmdletAndReturnAll(new GetAzureVMExtensionCmdletInfo(vm, extensionName, publisher, version, referenceName)); + } + + //ListAllVersionsParamSetName -> ExtensionName,Publisher,AllVersions + public Collection GetAzureVMAvailableExtension(string extensionName, string publisher, bool allVersions) + { + return RunPSCmdletAndReturnAll(new GetAzureVMAvailableExtensionCmdletInfo(extensionName, publisher, allVersions)); + } + + //ListLatestExtensionsParamSet -> ExtensionName,Publisher + public Collection GetAzureVMAvailableExtension(string extensionName = null, string publisher = null) + { + return RunPSCmdletAndReturnAll(new GetAzureVMAvailableExtensionCmdletInfo(extensionName, publisher)); + } + + //ListSingleVersionParamSetName -> ExtensionName,Publisher,Version + public Collection GetAzureVMAvailableExtension(string extensionName, string publisher, string version) + { + return RunPSCmdletAndReturnAll(new GetAzureVMAvailableExtensionCmdletInfo(extensionName, publisher, version)); + } + #endregion Generic VM Extension cmdlets + + #region AzureVMAccessExtension cmdlets + + public Collection GetAzureVMAccessExtension(SM.IPersistentVM vm,string userName= null, string password = null, string version= null,string referenceName= null) + { + return RunPSCmdletAndReturnAll(new GetAzureVMAccessExtensionCmdletInfo(vm, userName, password, version, referenceName)); + } + + public SM.PersistentVM SetAzureVMAccessExtension(SM.IPersistentVM vm, string userName= null, string password=null, string version = null, string referenceName =null,bool disable = false) + { + return RunPSCmdletAndReturnFirst(new SetAzureVMAccessExtensionCmdletInfo( vm, userName, password, version, referenceName, disable)); + } + + public SM.PersistentVM RemoveAzureVMAccessExtension(SM.IPersistentVM vm) + { + return RunPSCmdletAndReturnFirst(new RemoveAzureVMAccessExtensionCmdleteInfo(vm)); + } + + #endregion AzureVMAccessExtension cmdlets + + #region AzureVMCustomScriptExtensionCmdlets + //SetCustomScriptExtensionByUrisParamSetName + internal SM.PersistentVM SetAzureVMCustomScriptExtension(SM.PersistentVM vm, string[] fileUri, bool sseSaSKeys, string run = null, string referenceName = null, string version = null, string argument = null) + { + return RunPSCmdletAndReturnFirst(new SetAzureVMCustomScriptExtensionCmdletInfo(vm, referenceName, version,fileUri,run, argument )); + } + + //DisableCustomScriptExtensionParamSetName + internal SM.PersistentVM SetAzureVMCustomScriptExtension(SM.PersistentVM vm, bool disable, string referenceName = null, string version = null) + { + return RunPSCmdletAndReturnFirst(new SetAzureVMCustomScriptExtensionCmdletInfo(vm,referenceName,version,disable)); + } + + //SetCustomScriptExtensionByContainerBlobsParamSetName + internal SM.PersistentVM SetAzureVMCustomScriptExtension(SM.PersistentVM vm, string[] fileName, string run = null, string storageAccountName = null, string StorageEndpointSuffix = null, string containerName = null, + string StorageAccountKey = null, string referenceName = null, string version = null,string argument = null) + { + return RunPSCmdletAndReturnFirst(new SetAzureVMCustomScriptExtensionCmdletInfo(vm, fileName, storageAccountName, StorageEndpointSuffix, containerName, + StorageAccountKey, run, argument,referenceName, version)); + } + + internal VirtualMachineCustomScriptExtensionContext GetAzureVMCustomScriptExtension(SM.IPersistentVM vm) + { + return RunPSCmdletAndReturnFirst(new GetAzureVMCustomScriptExtensionCmdletInfo(vm)); + } + + internal SM.PersistentVM RemoveAzureVMCustomScriptExtension(SM.PersistentVM vm) + { + return RunPSCmdletAndReturnFirst(new RemoveAzureVMCustomScriptExtensionCmdletInfo(vm)); + } + #endregion AzureVMCustomScriptExtensionCmdlets + + #region AzureVMDscExtensionCmdlets + + internal struct SetAzureVMDscExtensionArguments + { + public string Version; + public SM.IPersistentVM VM; + public string ConfigurationArchive; + public AzureStorageContext StorageContext; + public string ContainerName; + public string ConfigurationName; + public Hashtable ConfigurationArgument; + public string ConfigurationDataPath; + } + + + internal SM.PersistentVM SetAzureVMDscExtension(SetAzureVMDscExtensionArguments args) + { + return RunPSCmdletAndReturnFirst( + new SetAzureVMDscExtensionCmdletInfo( + args.Version, + args.VM, + args.ConfigurationArchive, + args.StorageContext, + args.ContainerName, + args.ConfigurationName, + args.ConfigurationArgument, + args.ConfigurationDataPath)); + } + + internal VirtualMachineDscExtensionContext GetAzureVMDscExtension(SM.IPersistentVM vm) + { + return RunPSCmdletAndReturnFirst(new GetAzureVMDscExtensionCmdletInfo(vm)); + } + + internal SM.PersistentVM RemoveAzureVMDscExtension(SM.PersistentVM vm) + { + return RunPSCmdletAndReturnFirst(new RemoveAzureVMDscExtensionCmdletInfo(vm)); + } + + #endregion AzureVMDscExtensionCmdlets + + #region AzureVMSqlServerExtensionCmdlets + + public VirtualMachineSqlServerExtensionContext GetAzureVMSqlServerExtension(SM.IPersistentVM vm, string version = null, string referenceName = null) + { + return RunPSCmdletAndReturnFirst(new GetAzureVMSqlServerExtensionCmdletInfo(vm, version, referenceName)); + } + + public SM.PersistentVM SetAzureVMSqlServerExtension(SM.IPersistentVM vm, string version = null, string referenceName = null, bool disable = false) + { + return RunPSCmdletAndReturnFirst(new SetAzureVMSqlServerExtensionCmdletInfo(vm, version, referenceName, disable)); + } + + public SM.PersistentVM RemoveAzureVMSqlServerExtension(SM.IPersistentVM vm) + { + return RunPSCmdletAndReturnFirst(new RemoveAzureVMSqlServerExtensionCmdletInfo(vm)); + } + + #endregion AzureVMAccessExtension cmdlets + + internal SM.LinuxProvisioningConfigurationSet.SSHPublicKey NewAzureSSHKey(NewAzureSshKeyType option, string fingerprint, string path) + { + return RunPSCmdletAndReturnFirst(new NewAzureSSHKeyCmdletInfo(option, fingerprint, path)); + } + + internal SM.VirtualMachineImageDiskConfigSet GetAzureVMImageDiskConfigSet(SM.VMImageContext imageContext) + { + return RunPSCmdletAndReturnFirst(new GetAzureVMImageDiskConfigSetCmdletInfo(imageContext)); + } + + internal SM.VirtualMachineImageDiskConfigSet SetAzureVMImageDataDiskConfig(SM.VirtualMachineImageDiskConfigSet diskConfig, string dataDiskName, int lun, string hostCaching) + { + return RunPSCmdletAndReturnFirst(new SetAzureVMImageDataDiskConfigInfo(diskConfig, dataDiskName, lun, hostCaching)); + } + + internal SM.VirtualMachineImageDiskConfigSet SetAzureVMImageOSDiskConfig(SM.VirtualMachineImageDiskConfigSet diskConfigSet, string osHostCaching) + { + return RunPSCmdletAndReturnFirst(new SetAzureVMImageOSDiskConfigInfo(diskConfigSet, osHostCaching)); + } + + internal SM.VirtualMachineImageDiskConfigSet NewAzureVMImageDiskConfigSet() + { + return RunPSCmdletAndReturnFirst(new NewAzureVMImageDiskConfigSetCmdletInfo()); + } + + //Internal Load Balancer + internal SM.InternalLoadBalancerConfig NewAzureInternalLoadBalancerConfig(string ilbName, string subnet = null, IPAddress staticVnetIpAddress = null) + { + return RunPSCmdletAndReturnFirst(new NewAzureInternalLoadBalancerConfigCmdletInfo(ilbName, subnet, staticVnetIpAddress)); + } + + internal void AddAzureInternalLoadBalancer(string internalLoadBalancerName, string serviceName, string subnetName, IPAddress staticVNetIPAddress) + { + RunPSCmdletAndReturnFirst(new AddAzureInternalLoadBalancerCmdletInfo(internalLoadBalancerName, serviceName, subnetName, staticVNetIPAddress)); + } + + internal void RemoveAzureInternalLoadBalancer(string serviceName) + { + RunPSCmdletAndReturnFirst(new RemoveAzureInternalLoadBalancerCmdletInfo(serviceName)); + } + + internal SM.InternalLoadBalancerContext GetAzureInternalLoadBalancer(string serviceName) + { + return RunPSCmdletAndReturnFirst(new GetAzureInternalLoadBalancerCmdletInfo(serviceName)); + } + + internal SM.IPersistentVM SetAzurePublicIp(string publicIpName, SM.IPersistentVM vm) + { + return RunPSCmdletAndReturnFirst(new SetAzurePublicIPCmdletInfo(publicIpName, vm)); + } + + internal SM.AssignPublicIP GetAzurePublicIpName(string publicIpName, SM.IPersistentVM vm) + { + return RunPSCmdletAndReturnFirst(new GetAzurePublicIPCmdletInfo(publicIpName, vm)); + } + + internal SM.IPersistentVM AddAzureNetworkInterfaceConfig(string name, string subnetName, string staticVnetIpAddress, SM.IPersistentVM vm) + { + return RunPSCmdletAndReturnFirst(new AddAzureNetworkInterfaceConfigCmdletInfo(name, subnetName, staticVnetIpAddress, vm)); + } + + internal SM.IPersistentVM AddAzureNetworkInterfaceConfig(string name, string subnetName, SM.IPersistentVM vm) + { + return RunPSCmdletAndReturnFirst(new AddAzureNetworkInterfaceConfigCmdletInfo(name, subnetName, null, vm)); + } + + internal SM.IPersistentVM SetAzureNetworkInterfaceConfig(string name, string subnetName, string staticVnetIpAddress, SM.IPersistentVM vm) + { + return RunPSCmdletAndReturnFirst(new SetAzureNetworkInterfaceConfigCmdletInfo(name, subnetName, staticVnetIpAddress, vm)); + } + + internal SM.IPersistentVM SetAzureNetworkInterfaceConfig(string name, string subnetName, SM.IPersistentVM vm) + { + return RunPSCmdletAndReturnFirst(new SetAzureNetworkInterfaceConfigCmdletInfo(name, subnetName, null, vm)); + } + + internal SM.NetworkInterface GetAzureNetworkInterfaceConfig(string name, SM.PersistentVMRoleContext vm) + { + return RunPSCmdletAndReturnFirst(new GetAzureNetworkInterfaceConfigCmdletInfo(name, vm)); + } + + internal SM.IPersistentVM RemoveAzureNetworkInterfaceConfig(string name, SM.IPersistentVM vm) + { + return RunPSCmdletAndReturnFirst(new RemoveAzureNetworkInterfaceConfigCmdletInfo(name, vm)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ServiceManagementTest.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ServiceManagementTest.cs new file mode 100644 index 000000000000..a932994c8c42 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ServiceManagementTest.cs @@ -0,0 +1,493 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Threading; +using System.Xml.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Profile.Models; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.Properties; +using Microsoft.WindowsAzure.Commands.Sync.Download; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests +{ + [TestClass] + public class ServiceManagementTest + { + protected const string BadRequestException = "BadRequest"; + protected const string ConflictErrorException = "ConflictError"; + protected const string ResourceNotFoundException = "ResourceNotFound"; + + protected const string serviceNamePrefix = "PSTestService"; + protected const string vmNamePrefix = "PSTestVM"; + protected const string password = "p@ssw0rd"; + protected const string username = "pstestuser"; + protected static string localFile = Resource.Vhd; + protected static string vnetConfigFilePath = Directory.GetCurrentDirectory() + "\\vnetconfig.netcfg"; + protected const string testDataContainer = "testdata"; + protected const string osVhdName = "oneGBFixedWS2008R2.vhd"; + + protected const string WinRmEndpointName = "PowerShell"; + protected const string RdpEndpointName = "RemoteDesktop"; + protected const string TempEnvName = "tempEnv"; + + // Test cleanup settings + protected const bool deleteDefaultStorageAccount = false; // Temporarily set to false + protected bool cleanupIfPassed = true; + protected bool cleanupIfFailed = true; + protected const string vhdContainerName = "vhdstore"; + + protected static ServiceManagementCmdletTestHelper vmPowershellCmdlets; + protected static PSAzureSubscriptionExtended defaultAzureSubscription; + protected static StorageServiceKeyOperationContext storageAccountKey; + protected static string blobUrlRoot; + + protected static string locationName; + protected static string imageName; + protected static string currentEnvName = null; + + protected bool pass; + protected string testName; + protected DateTime testStartTime; + + private TestContext testContextInstance; + + private const string VhdFilesContainerName = "vhdfiles"; + private static readonly string[] VhdFiles = new[] + { + "dynamic_50.vhd", "dynamic_50_child01.vhd", "dynamic_50_child02.vhd", + "fixed_50.vhd", "fixed_50_child01.vhd", "fixed_50_child02.vhd" + }; + + /// + ///Gets or sets the test context which provides + ///information about and functionality for the current test run. + /// + public TestContext TestContext + { + get + { + return testContextInstance; + } + set + { + testContextInstance = value; + } + } + + [AssemblyInitialize] + public static void AssemblyInit(TestContext context) + { + SetTestSettings(); + } + + [AssemblyCleanup] + public static void CleanUpAssembly() + { + vmPowershellCmdlets = new ServiceManagementCmdletTestHelper(); + + // Cleaning up affinity groups + var affGroup = vmPowershellCmdlets.GetAzureAffinityGroup(); + if (affGroup.Count > 0) + { + foreach (var aff in affGroup) + { + try + { + vmPowershellCmdlets.RemoveAzureAffinityGroup(aff.Name); + } + catch (Exception e) + { + if (e.ToString().Contains(BadRequestException)) + { + Console.WriteLine("Affinity Group, {0}, is not deleted.", aff.Name); + } + } + } + } + + if (defaultAzureSubscription != null) + { + // Cleaning up virtual disks + try + { + Retry(String.Format("Get-AzureDisk | Where {{$_.DiskName.Contains(\"{0}\")}} | Remove-AzureDisk", serviceNamePrefix), "in use"); + if (deleteDefaultStorageAccount) + { + //vmPowershellCmdlets.RemoveAzureStorageAccount(defaultAzureSubscription.CurrentStorageAccountName); + } + } + catch + { + Console.WriteLine("Error occurred during cleaning up disks.."); + } + + // Cleaning up vm images + try + { + vmPowershellCmdlets.RunPSScript("Get-AzureVMImage | Where {$_.Categori -eq \"User\"} | Remove-AzureVMImage"); + } + catch + { + Console.WriteLine("Error occurred during cleaning up vm images.."); + } + + // Cleaning up reserved ips + try + { + vmPowershellCmdlets.RunPSScript("Get-AzureReservedIp | Remove-AzureReservedIp -Force"); + } + catch + { + Console.WriteLine("Error occurred during cleaning up reserved ips.."); + } + } + + if (string.IsNullOrEmpty(currentEnvName)) + { + vmPowershellCmdlets.RunPSScript(string.Format("Remove-AzureEnvironment -Name {0} -Force", TempEnvName)); + } + } + + public static void SetDefaultStorage() + { + if (!string.IsNullOrEmpty(GetDefaultStorage(CredentialHelper.DefaultStorageName, CredentialHelper.Location))) + { + defaultAzureSubscription = vmPowershellCmdlets.SetAzureSubscription(defaultAzureSubscription.SubscriptionName, defaultAzureSubscription.SubscriptionId, CredentialHelper.DefaultStorageName); + vmPowershellCmdlets.SelectAzureSubscription(defaultAzureSubscription.SubscriptionName, true); + storageAccountKey = vmPowershellCmdlets.GetAzureStorageAccountKey(defaultAzureSubscription.CurrentStorageAccountName); + Assert.AreEqual(defaultAzureSubscription.CurrentStorageAccountName, storageAccountKey.StorageAccountName); + blobUrlRoot = (vmPowershellCmdlets.GetAzureStorageAccount(defaultAzureSubscription.CurrentStorageAccountName)[0].Endpoints.ToArray())[0]; + } + else + { + Console.WriteLine("Unable to get the default storege account"); + } + } + + private static string GetDefaultStorage(string storageName, string locName) + { + Collection storageAccounts = vmPowershellCmdlets.GetAzureStorageAccount(null); + foreach (var storageAccount in storageAccounts) + { + if (storageAccount.StorageAccountName == storageName) + { + return storageAccount.StorageAccountName; + } + } + + var account = vmPowershellCmdlets.NewAzureStorageAccount(storageName, locName); + if (account.StorageAccountName == storageName) + { + return account.StorageAccountName; + } + + return null; + } + + private static string GetSubscriptionName(string publishSettingsFile) + { + try + { + XDocument psf = XDocument.Load(publishSettingsFile); + XElement pubData = psf.Descendants().FirstOrDefault(); + XElement pubProfile = pubData.Elements().ToList()[0]; + XElement sub = pubProfile.Elements().ToList()[0]; + string subName = sub.Attribute("Name").Value; + Console.WriteLine("Getting subscription: {0}", subName); + + return subName; + } + catch + { + Console.WriteLine("Error occurred during loading publish settings file..."); + return null; + } + } + + private static string GetServiceManagementUrl(string publishSettingsFile) + { + try + { + XDocument psf = XDocument.Load(publishSettingsFile); + XElement pubData = psf.Descendants().FirstOrDefault(); + XElement pubProfile = pubData.Elements().ToList()[0]; + return pubProfile.Attribute("Url").Value; + } + catch + { + Console.WriteLine("Error occurred during loading publish settings file..."); + return null; + } + } + + public static void SetTestSettings() + { + vmPowershellCmdlets = new ServiceManagementCmdletTestHelper(); + CredentialHelper.GetTestSettings(Resource.TestSettings); + + vmPowershellCmdlets.RemoveAzureSubscriptions(); + if (vmPowershellCmdlets.GetAzureEnvironment("ussouth").Count > 0) + { + Console.WriteLine("Removing ussouth environment..."); + vmPowershellCmdlets.RunPSScript("Remove-AzureEnvironment -Name ussouth -Force"); + } + + List environments = vmPowershellCmdlets.GetAzureEnvironment(); + var serviceManagementUrl = GetServiceManagementUrl(CredentialHelper.PublishSettingsFile); + + foreach (var env in environments) + { + var envServiceManagementUrl = (string) env.Endpoints[AzureEnvironment.Endpoint.ServiceManagement]; + if (!string.IsNullOrEmpty(envServiceManagementUrl)) + { + if (envServiceManagementUrl.Equals(serviceManagementUrl)) + { + currentEnvName = env.Name; + var curEnv = vmPowershellCmdlets.GetAzureEnvironment(currentEnvName)[0]; + Console.WriteLine("Using the existing environment: {0}", currentEnvName); + Console.WriteLine("PublichSettingsFileUrl: {0}", curEnv.GetEndpoint(AzureEnvironment.Endpoint.PublishSettingsFileUrl)); + Console.WriteLine("ServiceManagement: {0}", curEnv.GetEndpoint(AzureEnvironment.Endpoint.ServiceManagement)); + Console.WriteLine("ManagementPortalUrl: {0}", curEnv.GetEndpoint(AzureEnvironment.Endpoint.ManagementPortalUrl)); + Console.WriteLine("ActiveDirectory: {0}", curEnv.GetEndpoint(AzureEnvironment.Endpoint.ActiveDirectory)); + Console.WriteLine("ActiveDirectoryServiceEndpointResourceId: {0}", curEnv.GetEndpoint(AzureEnvironment.Endpoint.ActiveDirectoryServiceEndpointResourceId)); + Console.WriteLine("ResourceManager: {0}", curEnv.GetEndpoint(AzureEnvironment.Endpoint.ResourceManager)); + Console.WriteLine("Gallery: {0}", curEnv.GetEndpoint(AzureEnvironment.Endpoint.Gallery)); + Console.WriteLine("Graph: {0}", curEnv.GetEndpoint(AzureEnvironment.Endpoint.Graph)); + break; + } + } + } + + if (string.IsNullOrEmpty(currentEnvName)) + { + Console.WriteLine("Creating new environment... : {0}", TempEnvName); + var prodEnv = vmPowershellCmdlets.GetAzureEnvironment("AzureCloud")[0]; + vmPowershellCmdlets.RunPSScript(string.Format( + @"Add-AzureEnvironment -Name {0} ` + -PublishSettingsFileUrl {1} ` + -ServiceEndpoint {2} ` + -ManagementPortalUrl {3} ` + -ActiveDirectoryEndpoint {4} ` + -ActiveDirectoryServiceEndpointResourceId {5} ` + -ResourceManagerEndpoint {6} ` + -GalleryEndpoint {7} ` + -GraphEndpoint {8}", + TempEnvName, + prodEnv.GetEndpoint(AzureEnvironment.Endpoint.PublishSettingsFileUrl), + serviceManagementUrl, + prodEnv.GetEndpoint(AzureEnvironment.Endpoint.ManagementPortalUrl), + prodEnv.GetEndpoint(AzureEnvironment.Endpoint.ActiveDirectory), + prodEnv.GetEndpoint(AzureEnvironment.Endpoint.ActiveDirectoryServiceEndpointResourceId), + prodEnv.GetEndpoint(AzureEnvironment.Endpoint.ResourceManager), + prodEnv.GetEndpoint(AzureEnvironment.Endpoint.Gallery), + prodEnv.GetEndpoint(AzureEnvironment.Endpoint.Graph))); + + vmPowershellCmdlets.ImportAzurePublishSettingsFile(CredentialHelper.PublishSettingsFile, TempEnvName); + } + else + { + Console.WriteLine("Using existing environment... : {0}", currentEnvName); + vmPowershellCmdlets.ImportAzurePublishSettingsFile(CredentialHelper.PublishSettingsFile, currentEnvName); + } + + var firstSub = vmPowershellCmdlets.GetAzureSubscription().First(); + vmPowershellCmdlets.SelectAzureSubscription(firstSub.SubscriptionName); + + if (string.IsNullOrEmpty(CredentialHelper.DefaultSubscriptionName)) + { + defaultAzureSubscription = vmPowershellCmdlets.GetCurrentAzureSubscription(); + if (string.IsNullOrEmpty(Resource.DefaultSubscriptionName)) + { + CredentialHelper.DefaultSubscriptionName = defaultAzureSubscription.SubscriptionName; + } + } + else + { + defaultAzureSubscription = vmPowershellCmdlets.SetDefaultAzureSubscription(CredentialHelper.DefaultSubscriptionName); + } + + locationName = vmPowershellCmdlets.GetAzureLocationName(new[] { CredentialHelper.Location }); // Get-AzureLocation + + if (String.IsNullOrEmpty(locationName)) + { + Console.WriteLine("No location is selected!"); + } + Console.WriteLine("Location Name: {0}", locationName); + + if (defaultAzureSubscription.CurrentStorageAccountName == null && !string.IsNullOrEmpty(CredentialHelper.DefaultStorageName)) + { + SetDefaultStorage(); + } + + try + { + imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows" }, false); // Get-AzureVMImage + } + catch + { + Console.WriteLine("Error occurred during Get-AzureVMImageName... imageName is not set."); + } + + try + { + DownloadVhds(); + } + catch + { + Console.WriteLine("Error occurred during downloading vhds..."); + } + + if (String.IsNullOrEmpty(imageName)) + { + Console.WriteLine("No image is selected!"); + } + else + { + Console.WriteLine("Image Name: {0}", imageName); + } + } + + protected void StartTest(string testname, DateTime testStartTime) + { + Console.WriteLine("{0} test starts at {1}", testname, testStartTime); + } + + private static void Retry(string cmdlet, string message, int maxTry = 1, int intervalSecond = 10) + { + + ServiceManagementCmdletTestHelper pscmdlet = new ServiceManagementCmdletTestHelper(); + + for (int i = 0; i < maxTry; i++) + { + try + { + pscmdlet.RunPSScript(cmdlet); + break; + } + catch (Exception e) + { + if (i == maxTry) + { + Console.WriteLine("Max try reached. Couldn't perform within the given time."); + } + if (e.ToString().Contains(message)) + { + Thread.Sleep(TimeSpan.FromSeconds(intervalSecond)); + continue; + } + else + { + throw; + } + } + } + } + + protected static void ReImportSubscription() + { + // Re-import the subscription. + vmPowershellCmdlets.ImportAzurePublishSettingsFile(); + vmPowershellCmdlets.SetDefaultAzureSubscription(CredentialHelper.DefaultSubscriptionName); + vmPowershellCmdlets.SetAzureSubscription(defaultAzureSubscription.SubscriptionName, defaultAzureSubscription.SubscriptionId, defaultAzureSubscription.CurrentStorageAccountName); + } + + protected static void CleanupService(string svcName) + { + Utilities.TryAndIgnore(() => vmPowershellCmdlets.RemoveAzureService(svcName, true), "does not exist"); + } + + protected static void DownloadVhds() + { + storageAccountKey = vmPowershellCmdlets.GetAzureStorageAccountKey(defaultAzureSubscription.CurrentStorageAccountName); + + foreach (var vhdFile in VhdFiles) + { + string vhdBlobLocation = string.Format("{0}{1}/{2}", blobUrlRoot, VhdFilesContainerName, vhdFile); + + var vhdLocalPath = new FileInfo(Directory.GetCurrentDirectory() + "\\" + vhdFile); + + if (!File.Exists(vhdLocalPath.FullName)) + { + // Set the source blob + BlobHandle blobHandle = Utilities.GetBlobHandle(vhdBlobLocation, storageAccountKey.Primary); + + SaveVhd(blobHandle, vhdLocalPath, storageAccountKey.Primary); + } + } + } + + protected static void SaveVhd(BlobHandle destination, FileInfo locFile, string storageKey, int? numThread = null, bool overwrite = false) + { + try + { + Console.WriteLine("Downloading a VHD from {0} to {1}...", destination.Blob.Uri.ToString(), locFile.FullName); + DateTime startTime = DateTime.Now; + vmPowershellCmdlets.SaveAzureVhd(destination.Blob.Uri, locFile, numThread, storageKey, overwrite); + Console.WriteLine("Downloading completed in {0} seconds.", (DateTime.Now - startTime).TotalSeconds); + } + catch (Exception e) + { + Assert.Fail(e.InnerException.ToString()); + } + } + + protected void VerifyRDP(string serviceName, string rdpPath) + { + Utilities.GetDeploymentAndWaitForReady(serviceName, DeploymentSlotType.Production, 10, 600); + + vmPowershellCmdlets.GetAzureRemoteDesktopFile("WebRole1_IN_0", serviceName, rdpPath, false); + + string dns; + + using (var stream = new StreamReader(rdpPath)) + { + string firstLine = stream.ReadLine(); + dns = Utilities.FindSubstring(firstLine, ':', 2); + } + + Assert.IsTrue((Utilities.RDPtestPaaS(dns, "WebRole1", 0, username, password, true)), "Cannot RDP to the instance!!"); + } + + protected string UploadVhdFile() + { + // Choose the vhd file from local machine + var vhdName = Convert.ToString(TestContext.DataRow["vhdName"]); + var vhdLocalPath = new FileInfo(Directory.GetCurrentDirectory() + "\\" + vhdName); + Assert.IsTrue(File.Exists(vhdLocalPath.FullName), "VHD file not exist={0}", vhdLocalPath); + + // Get the pre-calculated MD5 hash of the fixed vhd that was converted from the original vhd. + string md5hash = Convert.ToString(TestContext.DataRow["MD5hash"]); + + + // Set the destination + string vhdBlobName = string.Format("{0}/{1}.vhd", vhdContainerName, Utilities.GetUniqueShortName(Path.GetFileNameWithoutExtension(vhdName))); + string vhdDestUri = blobUrlRoot + vhdBlobName; + + // Start uploading... + Console.WriteLine("uploads {0} to {1}", vhdName, vhdBlobName); + vmPowershellCmdlets.AddAzureVhd(vhdLocalPath, vhdDestUri); + var vhdUploadContext = vmPowershellCmdlets.AddAzureVhd(vhdLocalPath, vhdDestUri, true); + Console.WriteLine("uploading completed: {0}", vhdName); + + return vhdDestUri; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/StaticCATests.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/StaticCATests.cs new file mode 100644 index 000000000000..610a26c1ebe6 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/StaticCATests.cs @@ -0,0 +1,674 @@ + +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Threading; +using System.Xml.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests +{ + [TestClass] + public class StaticCATests:ServiceManagementTest + { + //Give affintiy group name + private const string AffinityGroup = "WestUsAffinityGroup"; + private const string VNetName = "NewVNet1"; + private static readonly List LocalNets = new List(); + private static readonly List VirtualNets = new List(); + private static readonly HashSet AffinityGroups = new HashSet(); + static readonly List DnsServers = new List(); + private static readonly List LocalNetworkSites = new List(); + static string serviceName; + const string StaticCASubnet0 = "Subnet1"; + const string StaticCASubnet1 = "GatewaySubnet"; + const string IPUnavaialbleExceptionMessage = "Networking.DeploymentVNetAddressAllocationFailure"; + + [ClassInitialize] + public static void Intialize(TestContext context) + { + imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows" }, false); + var vnetConfig = vmPowershellCmdlets.GetAzureVNetConfig(null); + if (vnetConfig.Count > 0) + { + vmPowershellCmdlets.RunPSScript("Get-AzureService | Remove-AzureService -Force"); + Utilities.RetryActionUntilSuccess(() => vmPowershellCmdlets.RemoveAzureVNetConfig(), "in use", 5, 30); + } + ReadVnetConfig(); + SetVNetForStaticCAtest(); + } + + [TestInitialize] + public void TestIntialize() + { + pass = false; + serviceName = Utilities.GetUniqueShortName(serviceNamePrefix); + testStartTime = DateTime.Now; + } + + #region Test cases + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(0), Owner("hylee"), Description("Test the cmdlet ((Get,Set,Remove,Test)-AzureStaticVnetIP)")] + public void DeployVMWithStaticCATest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + string vnet1 = VirtualNets[0]; + string vmName = Utilities.GetUniqueShortName(vmNamePrefix); + + try + { + //Test a static CA + const string ipaddress = "10.0.0.5"; + CheckAvailabilityofIpAddress(vnet1, ipaddress); + + //Create an IaaS VM with a static CA. + var vm = CreatIaasVMObject(vmName, ipaddress, StaticCASubnet0); + + vmPowershellCmdlets.NewAzureVM(serviceName, new[] {vm}, vnet1, new DnsServer[1] {DnsServers[0]}, + serviceName, "service for DeployVMWithStaticCATest", string.Empty, string.Empty, null, AffinityGroup, + null); + Console.WriteLine("New Azure service with name:{0} created successfully.", serviceName); + + //Verfications + VerifyVmWithStaticCAIsReserved(vmName, serviceName, ipaddress); + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + finally + { + var vmContext = vmPowershellCmdlets.GetAzureVM(vmName, serviceName); + vmPowershellCmdlets.RemoveAzureStaticVNetIP(vmContext.VM); + } + } + + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(0), Owner("hylee"), Description("Test the cmdlet ((Get,Set,Remove,Test)-AzureStaticVnetIP)")] + public void AddVMWithStaticCATest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + string vnet1 = VirtualNets[0]; + string vmName1 = Utilities.GetUniqueShortName(vmNamePrefix); + string vmName2 = Utilities.GetUniqueShortName(vmNamePrefix); + + try + { + const string ipaddress = "10.0.0.6"; + CheckAvailabilityofIpAddress(vnet1, ipaddress); + + //Create an IaaS VM + vmPowershellCmdlets.NewAzureQuickVM(OS.Windows, vmName1, serviceName, imageName, new string[1] { StaticCASubnet0 }, InstanceSize.Small, username, password, VNetName, AffinityGroup); + + //Add an IaaS VM with a static CA + var vm = CreatIaasVMObject(vmName2, ipaddress, StaticCASubnet0); + + // New-AzureVM + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, null); + + //Verify that the DIP of the VM2 is reserved. + VerifyVmWithStaticCAIsReserved(vmName2, serviceName, ipaddress); + + //Verify that the DIP of the VM1 is NOT reserved. + VerfiyVmWithoutStaticCAIsNotReserved(vmName1, serviceName); + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + finally + { + var vmContext = vmPowershellCmdlets.GetAzureVM(vmName2, serviceName); + vmPowershellCmdlets.RemoveAzureStaticVNetIP(vmContext.VM); + } + } + + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(0), Owner("hylee"), Description("Test the cmdlet ((Get,Set,Remove,Test)-AzureStaticVnetIP)")] + public void UpdateVMWithNewStaticCATest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + string vnet1 = VirtualNets[0]; + string vmName1 = Utilities.GetUniqueShortName(vmNamePrefix); + + try + { + const string ipaddress = "10.0.0.7"; + //Test a static CA + Console.WriteLine("Checking if ipaddress {0} is available", ipaddress); + CheckAvailabilityofIpAddress(vnet1, ipaddress); + Console.WriteLine("ipaddress {0} is available", ipaddress); + + //Create an IaaS VM + vmPowershellCmdlets.NewAzureQuickVM(OS.Windows, vmName1, serviceName, imageName, new string[1] { StaticCASubnet0 }, InstanceSize.Small, username, password, VNetName, AffinityGroup); + + //Update the IaaS VM with a static CA + var vmRoleContext = vmPowershellCmdlets.GetAzureVM(vmName1, serviceName); + string nonStaticIpAddress = vmRoleContext.IpAddress; + Console.WriteLine("Non static IpAddress of the vm {0} is {1}", vmName1, nonStaticIpAddress); + var vm = vmPowershellCmdlets.SetAzureStaticVNetIP(ipaddress, vmRoleContext.VM); + vmPowershellCmdlets.UpdateAzureVM(vmName1, serviceName, vm); + + //Verify that the DIP of the VM is matched with an input. + VerifyVmWithStaticCAIsReserved(vmName1, serviceName, ipaddress); + + //Verify that the first DIP is released. + Console.WriteLine("Checking for the availability of non static IpAdress after giving a static CA to the VM"); + + Thread.Sleep(TimeSpan.FromMinutes(2)); + + var availabilityContext = vmPowershellCmdlets.TestAzureStaticVNetIP(vnet1, nonStaticIpAddress); + + Assert.IsTrue(availabilityContext.IsAvailable,"Non static IpAddress {0} is not realesed.",nonStaticIpAddress); + Utilities.PrintContext(availabilityContext); + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + } + + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(0), Owner("hylee"), Description("Test the cmdlet ((Get,Set,Remove,Test)-AzureStaticVnetIP)")] + public void UpdateToStaticCATest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + //string vnet1 = virtualNets[0]; + string vmName1 = Utilities.GetUniqueShortName(vmNamePrefix); + + try + { + //Create an IaaS VM + vmPowershellCmdlets.NewAzureQuickVM(OS.Windows, vmName1, serviceName, imageName, new string[1] { StaticCASubnet0 }, InstanceSize.Small, username, password, VNetName, AffinityGroup); + + //Update the IaaS VM with a static CA + var vmRoleContext = vmPowershellCmdlets.GetAzureVM(vmName1, serviceName); + string ipaddress = vmRoleContext.IpAddress; + Console.WriteLine("Non static IpAddress of the vm {0} is {1}", vmName1, ipaddress); + PersistentVM vm = vmPowershellCmdlets.SetAzureStaticVNetIP(ipaddress, vmRoleContext.VM); + vmPowershellCmdlets.UpdateAzureVM(vmName1, serviceName, vm); + + //Verify that the DIP of the VM is matched with an input. + VerifyVmWithStaticCAIsReserved(vmName1, serviceName, ipaddress); + + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + } + + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(0), Owner("hylee"), Description("Test the cmdlet ((Get,Set,Remove,Test)-AzureStaticVnetIP)")] + public void UnreserveStaticCATest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + string vnet1 = VirtualNets[0]; + string vmName = Utilities.GetUniqueShortName(vmNamePrefix); + + try + { + //Test a static CA + const string ipaddress = "10.0.0.9"; + CheckAvailabilityofIpAddress(vnet1, ipaddress); + + //Create an IaaS VM with a static CA. + var vm = CreatIaasVMObject(vmName, ipaddress, StaticCASubnet0); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, vnet1, new DnsServer[1] { DnsServers[0] }, + serviceName, "service for DeployVMWithStaticCATest", string.Empty, string.Empty, null, AffinityGroup, null); + Console.WriteLine("New Azure service with name:{0} created successfully.", serviceName); + + //Verfications + VerifyVmWithStaticCAIsReserved(vmName, serviceName, ipaddress); + + //Remove-AzureStaticIP + Console.WriteLine("Removing Static CA for the VM {0}", vmName); + var vmRoleContext = vmPowershellCmdlets.GetAzureVM(vmName,serviceName); + vm = vmPowershellCmdlets.RemoveAzureStaticVNetIP(vmRoleContext.VM); + vmPowershellCmdlets.UpdateAzureVM(vmName, serviceName, vm); + Console.WriteLine("Static CA for the VM {0} removed", vmName); + + //Verify that VM doesnt have a static VNet IP address anymore. + Console.WriteLine("Verifying that the DIP of the VM is not Static CA"); + vmRoleContext = vmPowershellCmdlets.GetAzureVM(vmName, serviceName); + Assert.IsNull(vmPowershellCmdlets.GetAzureStaticVNetIP(vmRoleContext.VM), "VM has Static Vnet IP Address after executing Remove-AzureStaticVNetIP command also."); + Console.WriteLine("No static IP is assigned to the VM."); + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + } + + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Get,Set,Remove,Test)-AzureStaticVnetIP)")] + public void TryToReserveExistingCATest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + string vnet1 = VirtualNets[0]; + string serviceName2 = Utilities.GetUniqueShortName(serviceNamePrefix); + string serviceName3 = Utilities.GetUniqueShortName(serviceNamePrefix); + string vmName1 = Utilities.GetUniqueShortName(vmNamePrefix); + string vmName2 = Utilities.GetUniqueShortName(vmNamePrefix); + string vmName3 = Utilities.GetUniqueShortName(vmNamePrefix); + + try + { + string nonStaticIpAddress = string.Empty; + + //Create an IaaS VM + vmPowershellCmdlets.NewAzureQuickVM(OS.Windows, vmName1, serviceName, imageName, new string[1] { StaticCASubnet0 }, InstanceSize.Small, username, password, VNetName, AffinityGroup); + //Get the DIP of the VM (Get-AzureVM) + var vmRoleContext = vmPowershellCmdlets.GetAzureVM(vmName1, serviceName); + nonStaticIpAddress = vmRoleContext.IpAddress; + + //Assert that the DIP is not available (Test-AzureStaticVNetIP) + CheckAvailabilityOfIpAddressAndAssertFalse(vnet1, nonStaticIpAddress); + + //Try to deploy an IaaS VM with the same static CA (CreateDeployment) and Verify that the deployment failed + //Add an IaaS VM with a static CA + Console.WriteLine("Deploying an IaaS VM with the same static CA {0} (CreateDeployment)", nonStaticIpAddress); + var vm = CreatIaasVMObject(vmName2, nonStaticIpAddress, StaticCASubnet0); + //Verify that the deployment failed. + Utilities.VerifyFailure( + () => vmPowershellCmdlets.NewAzureVM(serviceName2, new[] { vm }, vnet1, new DnsServer[1] { DnsServers[0] }, + serviceName, "service for AddVMWithStaticCATest", string.Empty, string.Empty, null, AffinityGroup), + IPUnavaialbleExceptionMessage); + Console.WriteLine("Deployment with Static CA {0} failed as expectd", nonStaticIpAddress); + + //Try to deploy an IaaS VM with the same static CA (AddRole) and verify that the deployment fails + //Add an IaaS VM with a static CA + Console.WriteLine("Deploying an IaaS VM with the same static CA {0} (AddRole)", nonStaticIpAddress); + vm = CreatIaasVMObject(vmName3, nonStaticIpAddress, StaticCASubnet0); + //Verify that the deployment failed. + Utilities.VerifyFailure(() => vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }),IPUnavaialbleExceptionMessage); + Console.WriteLine("Deployment with Static CA {0} failed as expectd", nonStaticIpAddress); + + Console.WriteLine("Waiting for 2 minutes..."); + Thread.Sleep(TimeSpan.FromMinutes(2)); + //Reserve the DIP of the VM1 + vmRoleContext = vmPowershellCmdlets.GetAzureVM(vmName1,serviceName); + vm = vmPowershellCmdlets.SetAzureStaticVNetIP(nonStaticIpAddress, vmRoleContext.VM); + vmPowershellCmdlets.UpdateAzureVM(vmName1, serviceName, vm); + + //Verify that the DIP is reserved + VerifyVmWithStaticCAIsReserved(vmName1, serviceName, nonStaticIpAddress); + + //Try to deploy an IaaS VM with the same static CA (CreateDeployment) + Console.WriteLine("Deploying an IaaS VM with the same static CA {0} (CreateDeployment)", nonStaticIpAddress); + vm = CreatIaasVMObject(vmName2, nonStaticIpAddress, StaticCASubnet0); + Utilities.VerifyFailure(() => vmPowershellCmdlets.NewAzureVM(serviceName3, new[] { vm }, vnet1, new DnsServer[1] { DnsServers[0] }, + serviceName, "service for AddVMWithStaticCATest", string.Empty, string.Empty, null, AffinityGroup), IPUnavaialbleExceptionMessage); + Console.WriteLine("Deployment with Static CA {0} failed as expectd", nonStaticIpAddress); + + //Add an IaaS VM with a static CA + Console.WriteLine("Deploying an IaaS VM with the same static CA {0} (AddRole)", nonStaticIpAddress); + vm = CreatIaasVMObject(vmName3, nonStaticIpAddress, StaticCASubnet0); + Utilities.VerifyFailure(() => vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }),IPUnavaialbleExceptionMessage); + Console.WriteLine("Deployment with Static CA {0} failed as expectd", nonStaticIpAddress); + pass = true; + + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + finally + { + CleanupService(serviceName); + CleanupService(serviceName2); + CleanupService(serviceName3); + } + } + + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Get,Set,Remove,Test)-AzureStaticVnetIP)")] + public void StopStayProvisionedVMWithStaticCATest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + string vnet1 = VirtualNets[0]; + string vmName = Utilities.GetUniqueShortName(vmNamePrefix); + + try + { + //Test a static CA + //Test-AzureStaticVNetIP-VNetName $vnet -IPAddress “10.0.0.5” + const string ipaddress = "10.0.0.10"; + CheckAvailabilityofIpAddress(vnet1, ipaddress); + + //Create an IaaS VM with a static CA. + PersistentVM vm = CreatIaasVMObject(vmName, ipaddress, StaticCASubnet0); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, vnet1, new DnsServer[1] { DnsServers[0] }, + serviceName, "service for DeployVMWithStaticCATest", string.Empty, string.Empty, null, AffinityGroup, null); + Console.WriteLine("New Azure service with name:{0} created successfully.", serviceName); + + //Verfications + VerifyVmWithStaticCAIsReserved(vmName, serviceName, ipaddress); + + //StopStayProvisioned the VM (Stop-AzureVM –StayProvisioned) + var vmRoleContext = vmPowershellCmdlets.GetAzureVM(vmName, serviceName); + vmPowershellCmdlets.StopAzureVM(vmRoleContext.VM, serviceName, true, false); + + CheckAvailabilityOfIpAddressAndAssertFalse(vnet1, ipaddress); + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + } + + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Get,Set,Remove,Test)-AzureStaticVnetIP)")] + public void StopDeallocateVMWithStaticCATest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + string vnet1 = VirtualNets[0]; + string vmName = Utilities.GetUniqueShortName(vmNamePrefix); + + try + { + //Test a static CA + //Test-AzureStaticVNetIP-VNetName $vnet -IPAddress “10.0.0.5” + const string ipaddress = "10.0.0.5"; + CheckAvailabilityofIpAddress(vnet1, ipaddress); + + //Create an IaaS VM with a static CA. + PersistentVM vm = CreatIaasVMObject(vmName, ipaddress, StaticCASubnet0); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, vnet1, new DnsServer[1] { DnsServers[0] }, + serviceName, "service for DeployVMWithStaticCATest", string.Empty, string.Empty, null, AffinityGroup, null); + Console.WriteLine("New Azure service with name:{0} created successfully.", serviceName); + + //Verfications + VerifyVmWithStaticCAIsReserved(vmName, serviceName, ipaddress); + + //StopDeallocate the VM + var vmRoleContext = vmPowershellCmdlets.GetAzureVM(vmName, serviceName); + vmPowershellCmdlets.StopAzureVM(vmRoleContext.VM, serviceName, false, true); + + CheckAvailabilityOfIpAddressAndAssertFalse(vnet1, ipaddress); + pass = true; + } + catch (Exception) + { + pass = false; + throw; + } + } + + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Get,Set,Remove,Test)-AzureStaticVnetIP)")] + public void UpdateVMWithStaticCA() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + string vnet1 = VirtualNets[0]; + string vmName = Utilities.GetUniqueShortName(vmNamePrefix); + + try + { + //Test a static CA + //Test-AzureStaticVNetIP-VNetName $vnet -IPAddress “10.0.0.5” + string ipaddress = "10.0.0.10"; + CheckAvailabilityofIpAddress(vnet1, ipaddress); + + //Create an IaaS VM with a static CA. + var vm = CreatIaasVMObject(vmName, ipaddress, StaticCASubnet0); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, vnet1, new DnsServer[1] { DnsServers[0] }, + serviceName, "service for DeployVMWithStaticCATest", string.Empty, string.Empty, null, AffinityGroup, null); + Console.WriteLine("New Azure service with name:{0} created successfully.", serviceName); + + //Verfications + VerifyVmWithStaticCAIsReserved(vmName, serviceName, ipaddress); + + //Update the instance size of the VM (Get-AzureVM | Set-AzureVMSize | Update-AzureVM + vmPowershellCmdlets.SetVMSize(vmName, serviceName, + new SetAzureVMSizeConfig(InstanceSize.Medium.ToString())); + + //Verify that the DIP of the VM is still reserved. + VerifyVmWithStaticCAIsReserved(vmName, serviceName, ipaddress); + pass = true; + } + catch (Exception) + { + pass = false; + throw; + } + } + + [TestMethod(), TestCategory(Category.Sequential), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet ((Get,Set,Remove,Test)-AzureStaticVnetIP)")] + public void StaticCAExhautionTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + string vnet1 = VirtualNets[0]; + string vmName1 = Utilities.GetUniqueShortName(vmNamePrefix); + try + { + //Test a static CA + //Test-AzureStaticVNetIP-VNetName $vnet -IPAddress “10.0.0.5” + const string ipaddress = "10.64.0.5"; + var availibiltyContext = vmPowershellCmdlets.TestAzureStaticVNetIP(vnet1, ipaddress); + //Assert that it is available. + Assert.IsTrue(availibiltyContext.IsAvailable); + + var vm = CreatIaasVMObject(vmName1, ipaddress, StaticCASubnet1); + + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, vnet1, new DnsServer[1] { DnsServers[0] }, + serviceName, "service for DeployVMWithStaticCATest", string.Empty, string.Empty, null, AffinityGroup); + Console.WriteLine("New Azure service with name:{0} created successfully.", serviceName); + + + availibiltyContext = vmPowershellCmdlets.TestAzureStaticVNetIP(vnet1, ipaddress); + int availableVIPsCount = availibiltyContext.AvailableAddresses.Count(); + Console.WriteLine(string.Format("AvailableAddresses:{0}{1}", Environment.NewLine, availibiltyContext.AvailableAddresses.Aggregate((current, next) => current + Environment.NewLine + next))); + Console.WriteLine("VIPs avilable now:{0}", availableVIPsCount); + int i = 0; + foreach (string ip in availibiltyContext.AvailableAddresses) + { + Console.WriteLine("Creating VM-{0} with IP: {1}", ++i,ip); + vm = CreatIaasVMObject(Utilities.GetUniqueShortName(vmNamePrefix), ip, StaticCASubnet1); + vmPowershellCmdlets.NewAzureVM(serviceName,new[] {vm},null); + Console.WriteLine("Created VM-{0} with IP: {1}", i,ip); + } + + //try to create an vm and verify that it fails + Console.WriteLine("Creating VM-{0}", ++i); + vm = vmPowershellCmdlets.NewAzureVMConfig(new AzureVMConfigInfo(Utilities.GetUniqueShortName(vmNamePrefix), InstanceSize.Small.ToString(), imageName)); + var azureProvisioningConfig = new AzureProvisioningConfigInfo(OS.Windows, username, password); + azureProvisioningConfig.Vm = vm; + vm = vmPowershellCmdlets.AddAzureProvisioningConfig(azureProvisioningConfig); + vm = vmPowershellCmdlets.SetAzureSubnet(vm, new [] { StaticCASubnet1 }); + Utilities.VerifyFailure(() => vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }),BadRequestException); + Console.WriteLine("Creating VM-{0} failed as expected.",i); + pass = true; + } + catch (Exception) + { + pass = false; + throw; + } + } + #endregion Test cases + + #region Verifications Methods + static private void VerifyVmWithStaticCAIsReserved(string vmName,string svcName,string inputDip) + { + //Get the DIP of the VM (Get-AzureVM) VirtualNetworkStaticIPContext ipContext + PersistentVMRoleContext vm = vmPowershellCmdlets.GetAzureVM(vmName, svcName); + string confirguredVip = vm.IpAddress; + + if (!string.IsNullOrEmpty(confirguredVip)) + { + //Verify that the DIP of the VM is matched with an input DIP. + Console.WriteLine("Verifying that the DIP of the VM {0} is matched with input DIP {1}.", inputDip, confirguredVip); + Assert.AreEqual(inputDip,confirguredVip, string.Format("Static CA IpAddress {0} is not the same as the Input DIP {1}", confirguredVip, inputDip)); + Console.WriteLine("Verifyied that the DIP of the VM {0} is matched with input DIP {1}.", inputDip, confirguredVip); + + //Verify that the DIP is actually reserved. + Console.WriteLine("Verifying that the DIP of the VM is actually reserved"); + var ipContext = vmPowershellCmdlets.GetAzureStaticVNetIP(vm.VM); + Utilities.PrintContext(ipContext); + Assert.AreEqual(inputDip,ipContext.IPAddress, string.Format("Reserved IPAddress {0} is not equal to the input DIP {1}", ipContext.IPAddress, inputDip)); + Console.WriteLine("Verifyied that the DIP of the VM is actually reserved"); + + //Verify that the IP is not available (Test-AzureStaticVNetIP –VnetName $vnet –IPAddress “10.0.0.5”) + Console.WriteLine("Verifing that the IP {0} is not available", inputDip); + VirtualNetworkStaticIPAvailabilityContext availibiltyContext = vmPowershellCmdlets.TestAzureStaticVNetIP(VNetName, inputDip); + Console.WriteLine("IsAvailable:{0}", availibiltyContext.IsAvailable); + Console.WriteLine("AvailableAddresses:{0}{1}", Environment.NewLine, availibiltyContext.AvailableAddresses.Aggregate((current, next) => current + Environment.NewLine + next)); + Assert.IsFalse(availibiltyContext.IsAvailable, string.Format("Test-AzureStaticVNetIP should return true as {0} is reserved", inputDip,vm.Name)); + Assert.IsFalse(availibiltyContext.AvailableAddresses.Contains(inputDip),string.Format("{0} is reserved for vm {1} and should not be in available addresses.",inputDip,vmName)); + Console.WriteLine("Verified that the IP {0} is not available", inputDip); + } + else + { + throw new Exception("Configured IPAddres value is null or empty"); + } + } + + static private void VerfiyVmWithoutStaticCAIsNotReserved(string vmName, string serviceName) + { + + //Get the DIP of the VM (Get-AzureVM) + Console.WriteLine("Getting the DIP of the VM"); + var vm = vmPowershellCmdlets.GetAzureVM(vmName, serviceName); + Console.WriteLine("IpAddress of the VM : {0}", vm.IpAddress); + + //Verify that the DIP is NOT reserved + Console.WriteLine("Verifying that the DIP is NOT reserved"); + Assert.IsNull(vmPowershellCmdlets.GetAzureStaticVNetIP(vm.VM),"Reserved IPAddress should be null or empty for a VM without static CA"); + Console.WriteLine("Verified that the DIP {0} is NOT reserved", vm.IpAddress); + + //Verify that the IP is not available (Test-AzureStaticVNetIP –VnetName $vnet –IPAddress “10.0.0.6”) + Console.WriteLine("Verifying that the IP is not available"); + var availibiltyContext = vmPowershellCmdlets.TestAzureStaticVNetIP(VNetName, vm.IpAddress); + Console.WriteLine("IsAvailable:{0}", availibiltyContext.IsAvailable); + Console.WriteLine("AvailableAddresses:{0}{1}", Environment.NewLine, availibiltyContext.AvailableAddresses.Aggregate((current, next) => current + Environment.NewLine + next)); + Assert.IsFalse(availibiltyContext.IsAvailable, string.Format("Test-AzureStaticVNetIP should return true as {0} is reserved", vm.IpAddress, vm.Name)); + Assert.IsFalse(availibiltyContext.AvailableAddresses.Contains(vm.IpAddress), string.Format("{0} is reserved for vm {1} and should not be in available addresses.", vm.IpAddress, vmName)); + Console.WriteLine("Verified that IP {0} is not available", vm.IpAddress); + } + + #endregion Verifications Methods + + [TestCleanup] + public void TestCleanUp() + { + CleanupService(serviceName); + } + + + [ClassCleanup] + public static void ClassCleanUp() + { + CleanUpVnetConfigForStaticCA(); + } + + private static void ReadVnetConfig() + { + // Read the vnetconfig file and get the names of local networks, virtual networks and affinity groups. + XDocument vnetconfigxml = XDocument.Load(vnetConfigFilePath); + + foreach (XElement el in vnetconfigxml.Descendants()) + { + switch (el.Name.LocalName) + { + case "LocalNetworkSite": + LocalNets.Add(el.FirstAttribute.Value); + List elements = el.Elements().ToList(); + var prefixlist = new AddressPrefixList(); + prefixlist.Add(elements[0].Elements().First().Value); + LocalNetworkSites.Add(new LocalNetworkSite() + { + Name = el.FirstAttribute.Value, + VpnGatewayAddress = elements[1].Value, + AddressSpace = new AddressSpace() {AddressPrefixes = prefixlist} + }); + break; + case "VirtualNetworkSite": + VirtualNets.Add(el.Attribute("name").Value); + AffinityGroups.Add(el.Attribute("AffinityGroup").Value); + break; + case "DnsServer": + DnsServers.Add(new DnsServer() { Name = el.Attribute("name").Value, Address = el.Attribute("IPAddress").Value }); + break; + } + } + + foreach (string aff in AffinityGroups) + { + if (Utilities.CheckRemove(vmPowershellCmdlets.GetAzureAffinityGroup, aff)) + { + vmPowershellCmdlets.NewAzureAffinityGroup(aff, locationName, null, null); + } + } + } + + private static void SetVNetForStaticCAtest() + { + vmPowershellCmdlets.SetAzureVNetConfig(Directory.GetCurrentDirectory() + "\\StaticCAvnetconfig.netcfg"); + } + + private static void CleanUpVnetConfigForStaticCA() + { + Utilities.RetryActionUntilSuccess(() => vmPowershellCmdlets.RemoveAzureVNetConfig(), "in use", 10, 30); + } + + + private void CheckAvailabilityofIpAddress(string vnetName, string ipaddress) + { + Console.WriteLine("Checking if VIP {0} is available and unreserved", ipaddress); + VirtualNetworkStaticIPAvailabilityContext availibiltyContext = vmPowershellCmdlets.TestAzureStaticVNetIP(vnetName, ipaddress); + Utilities.PrintContext(availibiltyContext); + + //Assert that it is available. + Assert.IsTrue(availibiltyContext.IsAvailable,"ipaddress {0} is expected to be available",ipaddress); + Console.WriteLine("Ip address {0} is available", ipaddress); + } + + private void CheckAvailabilityOfIpAddressAndAssertFalse(string vnetName, string ipaddress) + { + var availibiltyContext = vmPowershellCmdlets.TestAzureStaticVNetIP(vnetName, ipaddress); + Utilities.PrintContext(availibiltyContext); + Console.WriteLine("AvailableAddresses:{0}{1}", Environment.NewLine, + availibiltyContext.AvailableAddresses.Aggregate((current, next) => current + Environment.NewLine + next)); + Assert.IsFalse(availibiltyContext.IsAvailable, "Ipaddress {0} is avialable.", ipaddress); + } + private PersistentVM CreatIaasVMObject(string vmName, string ipaddress, string subnet) + { + //Create an IaaS VM with a static CA. + var azureVMConfigInfo = new AzureVMConfigInfo(vmName, InstanceSize.Small.ToString(), imageName); + var azureProvisioningConfig = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var persistentVMConfigInfo = new PersistentVMConfigInfo(azureVMConfigInfo, azureProvisioningConfig, null, null); + PersistentVM vm = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo); + + //Set-AzureSubnet + vm = vmPowershellCmdlets.SetAzureSubnet(vm, new [] { subnet }); + + //Set-AzureStaticVNetIP + vm = vmPowershellCmdlets.SetAzureStaticVNetIP(ipaddress, vm); + return vm; + } + + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/StopAzureVMTest.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/StopAzureVMTest.cs new file mode 100644 index 000000000000..ffde04adbba2 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/StopAzureVMTest.cs @@ -0,0 +1,1166 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Collections.Generic; +using System.Reflection; +using System.Threading; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests +{ + [TestClass] + public class StopAzureVMTest : ServiceManagementTest + { + string svcName; + string vmName1; + string vmName2; + + const string prefixVMName = "PSTestVM"; + + const string unknownState = "RoleStateUnknown"; + const string creatingState = "CreatingVM"; + const string provisioningState = "Provisioning"; + const string readyState = "ReadyRole"; + const string startingState = "StartingVM"; + const string stoppedProvisionedState = "StoppedVM"; + const string stoppedDeallocatedState = "StoppedDeallocated"; + + [ClassInitialize] + public static void ClassInit(TestContext context) + { + if (string.IsNullOrEmpty(imageName)) + { + imageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Windows" }, false); + } + } + + [TestInitialize] + public void Initialize() + { + pass = false; + testStartTime = DateTime.Now; + + // Create a unique service name + svcName = Utilities.GetUniqueShortName("PSTestService"); + Console.WriteLine("Service Name: {0}", svcName); + + // Create a unique VM name + vmName1 = Utilities.GetUniqueShortName(prefixVMName); + Console.WriteLine("VM Name: {0}", vmName1); + + // Create a unique VM name + vmName2 = Utilities.GetUniqueShortName(prefixVMName); + Console.WriteLine("VM Name: {0}", vmName2); + + // Create a service + try + { + vmPowershellCmdlets.NewAzureService(svcName, svcName, locationName); + Console.WriteLine("Service Name: {0}", svcName); + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + Console.WriteLine("Could not create a service!!"); + Assert.Inconclusive(); + } + } + + /// + /// This test covers Stop-AzureVM -StayProvisioned with both parameter sets. + /// + [TestMethod(), TestCategory(Category.Functional), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Stop-AzureVM)")] + public void StopAzureVMStayProvisionedTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + // starting the test. + var azureVMConfigInfo1 = new AzureVMConfigInfo(vmName1, InstanceSize.ExtraSmall.ToString(), imageName); + var azureProvisioningConfig1 = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var persistentVMConfigInfo1 = new PersistentVMConfigInfo(azureVMConfigInfo1, azureProvisioningConfig1, null, null); + PersistentVM persistentVM1 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo1); + + var azureVMConfigInfo2 = new AzureVMConfigInfo(vmName2, InstanceSize.Small.ToString(), imageName); + var azureProvisioningConfig2 = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var persistentVMConfigInfo2 = new PersistentVMConfigInfo(azureVMConfigInfo2, azureProvisioningConfig2, null, null); + PersistentVM persistentVM2 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo2); + + PersistentVM[] VMs = { persistentVM1, persistentVM2 }; + vmPowershellCmdlets.NewAzureVM(svcName, VMs); + Console.WriteLine("The VM is successfully created: {0}", vmName1); + Console.WriteLine("The VM is successfully created: {0}", vmName2); + + WaitForStartingState(svcName, vmName1); + vmPowershellCmdlets.StopAzureVM(vmName1, svcName, true); // Stop-AzureVM -StayProvisioned against VM1 + + for (int i = 0; i < 10 ; i++) + { + if (CheckRoleInstanceState(svcName, vmName1, new string[] {stoppedProvisionedState})) + { + break; + } + Thread.Sleep(1000); + } + + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { stoppedProvisionedState })); + + // Stop-AzureVM -StayProvisioned against VM2 + vmPowershellCmdlets.RunPSScript(string.Format("{0} -ServiceName {1} -Name {2} | {3} -StayProvisioned", + Utilities.GetAzureVMCmdletName, svcName, vmName2, Utilities.StopAzureVMCmdletName)); + + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string [] {stoppedProvisionedState})); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName2, new string [] {stoppedProvisionedState})); + + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + finally + { + if ((cleanupIfPassed && pass) || (cleanupIfFailed && !pass)) + { + vmPowershellCmdlets.RemoveAzureService(svcName); + } + } + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Functional), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Stop-AzureVM) using wildcard syntax")] + public void StopAzureVMsStayProvisionedTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + // starting the test. + var azureVMConfigInfo1 = new AzureVMConfigInfo(vmName1, InstanceSize.ExtraSmall.ToString(), imageName); + var azureProvisioningConfig1 = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var persistentVMConfigInfo1 = new PersistentVMConfigInfo(azureVMConfigInfo1, azureProvisioningConfig1, null, null); + PersistentVM persistentVM1 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo1); + + var azureVMConfigInfo2 = new AzureVMConfigInfo(vmName2, InstanceSize.Small.ToString(), imageName); + var azureProvisioningConfig2 = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var persistentVMConfigInfo2 = new PersistentVMConfigInfo(azureVMConfigInfo2, azureProvisioningConfig2, null, null); + PersistentVM persistentVM2 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo2); + + PersistentVM[] VMs = { persistentVM1, persistentVM2 }; + vmPowershellCmdlets.NewAzureVM(svcName, VMs); + Console.WriteLine("The VM is successfully created: {0}", vmName1); + Console.WriteLine("The VM is successfully created: {0}", vmName2); + + WaitForStartingState(svcName, vmName1); + WaitForStartingState(svcName, vmName2); + + vmPowershellCmdlets.StopAzureVM("*", svcName, true, true); + + WaitForStoppedState(svcName, vmName1); + WaitForStoppedState(svcName, vmName2); + + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { stoppedProvisionedState })); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName2, new string[] { stoppedProvisionedState })); + + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + finally + { + if ((cleanupIfPassed && pass) || (cleanupIfFailed && !pass)) + { + vmPowershellCmdlets.RemoveAzureService(svcName); + } + } + } + + /// + /// This test covers Stop-AzureVM with both parameter sets. + /// + [TestMethod(), TestCategory(Category.Functional), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Stop-AzureVM)")] + public void StopAzureVMDeprovisionedTest() + { + + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + // starting the test. + var azureVMConfigInfo1 = new AzureVMConfigInfo(vmName1, InstanceSize.ExtraSmall.ToString(), imageName); + var azureProvisioningConfig1 = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var persistentVMConfigInfo1 = new PersistentVMConfigInfo(azureVMConfigInfo1, azureProvisioningConfig1, null, null); + PersistentVM persistentVM1 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo1); + + var azureVMConfigInfo2 = new AzureVMConfigInfo(vmName2, InstanceSize.Small.ToString(), imageName); + var azureProvisioningConfig2 = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var persistentVMConfigInfo2 = new PersistentVMConfigInfo(azureVMConfigInfo2, azureProvisioningConfig2, null, null); + PersistentVM persistentVM2 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo2); + + PersistentVM[] VMs = { persistentVM1, persistentVM2 }; + vmPowershellCmdlets.NewAzureVM(svcName, VMs); + Console.WriteLine("The VM is successfully created: {0}", vmName1); + Console.WriteLine("The VM is successfully created: {0}", vmName2); + + // Stop and deallocate VM1 + vmPowershellCmdlets.StopAzureVM(vmName1, svcName); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { stoppedDeallocatedState })); + + WaitForStartedState(svcName, vmName2); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName2, new string[] { readyState, provisioningState })); + + try + { + // Try to Stop and deallocate VM2 without Force. Should fail and give a warning message. + vmPowershellCmdlets.RunPSScript(string.Format("{0} -ServiceName {1} -Name {2} | {3}", + Utilities.GetAzureVMCmdletName, svcName, vmName2, Utilities.StopAzureVMCmdletName)); + Assert.Fail(); + } + catch (Exception e) + { + if (e is AssertFailedException) + { + throw; + } + else + { + Console.WriteLine(e.ToString()); + } + } + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName2, new string[] { readyState, provisioningState })); + + // Stop and deallocate VM2 + vmPowershellCmdlets.StopAzureVM(vmName2, svcName, false, true); + + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { stoppedDeallocatedState })); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName2, new string[] { stoppedDeallocatedState })); + + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + finally + { + if ((cleanupIfPassed && pass) || (cleanupIfFailed && !pass)) + { + vmPowershellCmdlets.RemoveAzureService(svcName); + } + } + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Functional), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Stop-AzureVM) using wildcard syntax")] + public void StopAzureVMsDeprovisionedTest() + { + + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + // starting the test. + var azureVMConfigInfo1 = new AzureVMConfigInfo(vmName1, InstanceSize.ExtraSmall.ToString(), imageName); + var azureProvisioningConfig1 = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var persistentVMConfigInfo1 = new PersistentVMConfigInfo(azureVMConfigInfo1, azureProvisioningConfig1, null, null); + PersistentVM persistentVM1 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo1); + + var azureVMConfigInfo2 = new AzureVMConfigInfo(vmName2, InstanceSize.Small.ToString(), imageName); + var azureProvisioningConfig2 = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var persistentVMConfigInfo2 = new PersistentVMConfigInfo(azureVMConfigInfo2, azureProvisioningConfig2, null, null); + PersistentVM persistentVM2 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo2); + + PersistentVM[] VMs = { persistentVM1, persistentVM2 }; + vmPowershellCmdlets.NewAzureVM(svcName, VMs); + Console.WriteLine("The VM is successfully created: {0}", vmName1); + Console.WriteLine("The VM is successfully created: {0}", vmName2); + + WaitForReadyState(svcName, vmName1); + WaitForReadyState(svcName, vmName2); + + var vm1 = vmPowershellCmdlets.GetAzureVM(vmName1, svcName); + var vm2 = vmPowershellCmdlets.GetAzureVM(vmName2, svcName); + + Assert.AreEqual(vm1.HostName, vmName1); + Assert.AreEqual(vm2.HostName, vmName2); + + // Stop and deallocate the VMs + vmPowershellCmdlets.StopAzureVM("*", svcName, false, true); + + WaitForStoppedState(svcName, vmName1); + WaitForStoppedState(svcName, vmName2); + + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { stoppedDeallocatedState })); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName2, new string[] { stoppedDeallocatedState })); + + // Start the VMs + Utilities.RetryActionUntilSuccess(() => vmPowershellCmdlets.StartAzureVM("*", svcName), "HTTP Status Code: 409", 10, 60); + //StartAzureVMs("*", svcName); + + WaitForStartedState(svcName, vmName1); + WaitForStartedState(svcName, vmName2); + + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { readyState, provisioningState })); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName2, new string[] { readyState, provisioningState })); + + try + { + // Try to Stop and deallocate VM2 without Force. Should fail and give a warning message. + vmPowershellCmdlets.StopAzureVM("*", svcName); + Assert.Fail(); + } + catch (Exception e) + { + if (e is AssertFailedException) + { + throw; + } + else + { + Console.WriteLine(e.ToString()); + } + } + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { readyState, provisioningState })); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName2, new string[] { readyState, provisioningState })); + + // Stop and deallocate VMs + vmPowershellCmdlets.StopAzureVM("*", svcName, false, true); + + WaitForStoppedState(svcName, vmName1); + WaitForStoppedState(svcName, vmName2); + + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { stoppedDeallocatedState })); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName2, new string[] { stoppedDeallocatedState })); + + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + finally + { + if ((cleanupIfPassed && pass) || (cleanupIfFailed && !pass)) + { + vmPowershellCmdlets.RemoveAzureService(svcName); + } + } + } + + /// + /// This test covers Stop-AzureVM -Force with both parameter sets + /// + [TestMethod(), TestCategory(Category.Functional), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Stop-AzureVM)")] + public void StopAzureVMOnStoppedVMTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + // starting the test. + var azureVMConfigInfo1 = new AzureVMConfigInfo(vmName1, InstanceSize.Small.ToString(), imageName); + var azureProvisioningConfig1 = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var persistentVMConfigInfo1 = new PersistentVMConfigInfo(azureVMConfigInfo1, azureProvisioningConfig1, null, null); + PersistentVM persistentVM1 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo1); + + PersistentVM[] VMs = { persistentVM1 }; + vmPowershellCmdlets.NewAzureVM(svcName, VMs); + Console.WriteLine("The VM is successfully created: {0}", vmName1); + + WaitForStartingState(svcName, vmName1); + + // Stop the VM with StayProvisioned + vmPowershellCmdlets.StopAzureVM(vmName1, svcName, true); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { stoppedProvisionedState })); + + // Try to stop it again. Should not change the state. + vmPowershellCmdlets.StopAzureVM(vmName1, svcName, true); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { stoppedProvisionedState })); + + try + { + // Try to stop without any option. Should fail with a warning message. + vmPowershellCmdlets.StopAzureVM(vmName1, svcName); + Assert.Fail(); + } + catch (Exception e) + { + if (e is AssertFailedException) + { + throw; + } + else + { + Console.WriteLine(e.ToString()); + } + } + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { stoppedProvisionedState })); + + // Stop the VM with Force option. Should deallocate the VM. + vmPowershellCmdlets.StopAzureVM(vmName1, svcName, false, true); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { stoppedDeallocatedState })); + + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + finally + { + if ((cleanupIfPassed && pass) || (cleanupIfFailed && !pass)) + { + vmPowershellCmdlets.RemoveAzureService(svcName); + } + } + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Functional), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Stop-AzureVM) using wildcard syntax")] + public void StopAzureVMsOnStoppedVMTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + // Configure VM1 + var azureVMConfigInfo1 = new AzureVMConfigInfo(vmName1, InstanceSize.ExtraSmall.ToString(), imageName); + var azureProvisioningConfig1 = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var persistentVMConfigInfo1 = new PersistentVMConfigInfo(azureVMConfigInfo1, azureProvisioningConfig1, null, null); + PersistentVM persistentVM1 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo1); + + // Configure VM2 + var azureVMConfigInfo2 = new AzureVMConfigInfo(vmName2, InstanceSize.Small.ToString(), imageName); + var azureProvisioningConfig2 = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var persistentVMConfigInfo2 = new PersistentVMConfigInfo(azureVMConfigInfo2, azureProvisioningConfig2, null, null); + PersistentVM persistentVM2 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo2); + + PersistentVM[] VMs = { persistentVM1, persistentVM2 }; + vmPowershellCmdlets.NewAzureVM(svcName, VMs); + Console.WriteLine("The VM is successfully created: {0}", vmName1); + Console.WriteLine("The VM is successfully created: {0}", vmName2); + + WaitForStartingState(svcName, vmName1); + WaitForStartingState(svcName, vmName2); + + // Stop the VMs with StayProvisioned + vmPowershellCmdlets.StopAzureVM("*", svcName, true, true); + + WaitForStoppedState(svcName, vmName1); + WaitForStoppedState(svcName, vmName2); + + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { stoppedProvisionedState })); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName2, new string[] { stoppedProvisionedState })); + + // Try to stop again. Should not change the state. + vmPowershellCmdlets.StopAzureVM("*", svcName, true, true); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { stoppedProvisionedState })); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName2, new string[] { stoppedProvisionedState })); + + try + { + // Try to stop without any option. Should fail with a warning message. + vmPowershellCmdlets.StopAzureVM("*", svcName); + Assert.Fail(); + } + catch (Exception e) + { + if (e is AssertFailedException) + { + throw; + } + else + { + Console.WriteLine(e.ToString()); + } + } + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { stoppedProvisionedState })); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName2, new string[] { stoppedProvisionedState })); + + // Stop the VM with Force option. Should deallocate the VM. + vmPowershellCmdlets.StopAzureVM("*", svcName, false, true); + + WaitForStoppedState(svcName, vmName1); + WaitForStoppedState(svcName, vmName2); + + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { stoppedDeallocatedState })); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName2, new string[] { stoppedDeallocatedState })); + + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + finally + { + if ((cleanupIfPassed && pass) || (cleanupIfFailed && !pass)) + { + vmPowershellCmdlets.RemoveAzureService(svcName); + } + } + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Functional), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Stop-AzureVM)")] + public void StopAzureVMOnDeallocatedVMTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + // starting the test. + var azureVMConfigInfo1 = new AzureVMConfigInfo(vmName1, InstanceSize.Small.ToString(), imageName); + var azureProvisioningConfig1 = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var persistentVMConfigInfo1 = new PersistentVMConfigInfo(azureVMConfigInfo1, azureProvisioningConfig1, null, null); + PersistentVM persistentVM1 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo1); + + PersistentVM[] VMs = { persistentVM1 }; + vmPowershellCmdlets.NewAzureVM(svcName, VMs); + Console.WriteLine("The VM is successfully created: {0}", vmName1); + + //WaitForStartingState(svcName, vmName1); + + // Stop and deallocate the VM + vmPowershellCmdlets.StopAzureVM(vmName1, svcName, false, true); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { stoppedDeallocatedState })); + + try + { + // Try to stop the VM with StayProvisioned. Should fail. + vmPowershellCmdlets.StopAzureVM(vmName1, svcName, true); + Assert.Fail(); + } + catch (Exception e) + { + if (e is AssertFailedException) + { + throw; + } + else + { + Console.WriteLine(e.ToString()); + } + } + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { stoppedDeallocatedState })); + + try + { + // Try to stop the VM without any option. Should fail and give a warning message. + vmPowershellCmdlets.StopAzureVM(vmName1, svcName); + Assert.Fail(); + } + catch (Exception e) + { + if (e is AssertFailedException) + { + throw; + } + else + { + Console.WriteLine(e.ToString()); + } + } + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { stoppedDeallocatedState })); + + // Try to stop and deallocate the VM again. + vmPowershellCmdlets.StopAzureVM(vmName1, svcName, false, true); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { stoppedDeallocatedState })); + + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + finally + { + if ((cleanupIfPassed && pass) || (cleanupIfFailed && !pass)) + { + vmPowershellCmdlets.RemoveAzureService(svcName); + } + } + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Functional), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Stop-AzureVM) using wildcard syntax")] + public void StopAzureVMsOnDeallocatedVMTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + // Configure VM1 + var azureVMConfigInfo1 = new AzureVMConfigInfo(vmName1, InstanceSize.ExtraSmall.ToString(), imageName); + var azureProvisioningConfig1 = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var persistentVMConfigInfo1 = new PersistentVMConfigInfo(azureVMConfigInfo1, azureProvisioningConfig1, null, null); + PersistentVM persistentVM1 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo1); + + // Configure VM2 + var azureVMConfigInfo2 = new AzureVMConfigInfo(vmName2, InstanceSize.Small.ToString(), imageName); + var azureProvisioningConfig2 = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var persistentVMConfigInfo2 = new PersistentVMConfigInfo(azureVMConfigInfo2, azureProvisioningConfig2, null, null); + PersistentVM persistentVM2 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo2); + + PersistentVM[] VMs = { persistentVM1, persistentVM2 }; + vmPowershellCmdlets.NewAzureVM(svcName, VMs); + Console.WriteLine("The VM is successfully created: {0}", vmName1); + Console.WriteLine("The VM is successfully created: {0}", vmName2); + + WaitForReadyState(svcName, vmName1); + WaitForReadyState(svcName, vmName2); + + // Stop and deallocate the VMs + vmPowershellCmdlets.StopAzureVM("*", svcName, false, true); + + WaitForStoppedState(svcName, vmName1); + WaitForStoppedState(svcName, vmName2); + + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { stoppedDeallocatedState })); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName2, new string[] { stoppedDeallocatedState })); + + try + { + // Try to stop the VMs with StayProvisioned. Should fail. + vmPowershellCmdlets.StopAzureVM("*", svcName, true, true); + Assert.Fail(); + } + catch (Exception e) + { + if (e is AssertFailedException) + { + throw; + } + else + { + Console.WriteLine(e.ToString()); + } + } + + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { stoppedDeallocatedState })); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName2, new string[] { stoppedDeallocatedState })); + + try + { + // Try to stop the VMs without any option. Should fail and give a warning message. + vmPowershellCmdlets.StopAzureVM("*", svcName); + Assert.Fail(); + } + catch (Exception e) + { + if (e is AssertFailedException) + { + throw; + } + else + { + Console.WriteLine(e.ToString()); + } + } + + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { stoppedDeallocatedState })); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName2, new string[] { stoppedDeallocatedState })); + + // Try to stop and deallocate the VM again. + vmPowershellCmdlets.StopAzureVM("*", svcName, false, true); + WaitForStoppedState(svcName, vmName1); + WaitForStoppedState(svcName, vmName2); + + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { stoppedDeallocatedState })); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName2, new string[] { stoppedDeallocatedState })); + + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + finally + { + if ((cleanupIfPassed && pass) || (cleanupIfFailed && !pass)) + { + vmPowershellCmdlets.RemoveAzureService(svcName); + } + } + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Stop-AzureVM)")] + public void RestartAzureVMTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + DateTime prevTime = DateTime.Now; + + // starting the test. + var azureVMConfigInfo1 = new AzureVMConfigInfo(vmName1, InstanceSize.Small.ToString(), imageName); + var azureProvisioningConfig1 = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var persistentVMConfigInfo1 = new PersistentVMConfigInfo(azureVMConfigInfo1, azureProvisioningConfig1, null, null); + PersistentVM persistentVM1 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo1); + + PersistentVM[] VMs = { persistentVM1 }; + + Utilities.RecordTimeTaken(ref prevTime); + vmPowershellCmdlets.NewAzureVM(svcName, VMs); + Utilities.RecordTimeTaken(ref prevTime); + + Console.WriteLine("The VM is successfully created: {0}", vmName1); + + WaitForReadyState(svcName, vmName1); + + Console.WriteLine(vmPowershellCmdlets.GetAzureVM(vmName1, svcName).InstanceStatus); + + Utilities.RecordTimeTaken(ref prevTime); + vmPowershellCmdlets.StopAzureVM(vmName1, svcName, true); + Utilities.RecordTimeTaken(ref prevTime); + + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { stoppedProvisionedState })); + + Utilities.RecordTimeTaken(ref prevTime); + vmPowershellCmdlets.StartAzureVM(vmName1, svcName); + Utilities.RecordTimeTaken(ref prevTime); + + WaitForReadyState(svcName, vmName1); + Utilities.RecordTimeTaken(ref prevTime); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { readyState })); + + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + finally + { + if ((cleanupIfPassed && pass) || (cleanupIfFailed && !pass)) + { + vmPowershellCmdlets.RemoveAzureService(svcName); + } + } + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Stop-AzureVM) using wildcard syntax")] + public void RestartAzureVMsTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + DateTime prevTime = DateTime.Now; + + // Configure VM1 + var azureVMConfigInfo1 = new AzureVMConfigInfo(vmName1, InstanceSize.ExtraSmall.ToString(), imageName); + var azureProvisioningConfig1 = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var persistentVMConfigInfo1 = new PersistentVMConfigInfo(azureVMConfigInfo1, azureProvisioningConfig1, null, null); + PersistentVM persistentVM1 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo1); + + // Configure VM2 + var azureVMConfigInfo2 = new AzureVMConfigInfo(vmName2, InstanceSize.Small.ToString(), imageName); + var azureProvisioningConfig2 = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var persistentVMConfigInfo2 = new PersistentVMConfigInfo(azureVMConfigInfo2, azureProvisioningConfig2, null, null); + PersistentVM persistentVM2 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo2); + + PersistentVM[] VMs = { persistentVM1, persistentVM2 }; + + Utilities.RecordTimeTaken(ref prevTime); + vmPowershellCmdlets.NewAzureVM(svcName, VMs); + Utilities.RecordTimeTaken(ref prevTime); + + Console.WriteLine("The VM is successfully created: {0}", vmName1); + Console.WriteLine("The VM is successfully created: {0}", vmName2); + + WaitForReadyState(svcName, vmName1); + WaitForReadyState(svcName, vmName2); + + Console.WriteLine(vmPowershellCmdlets.GetAzureVM(vmName1, svcName).InstanceStatus); + Console.WriteLine(vmPowershellCmdlets.GetAzureVM(vmName2, svcName).InstanceStatus); + + // Stop VM1 one only using wildcard name + string vm1WildcardName = vmName1.Replace(prefixVMName, "*"); + Utilities.RecordTimeTaken(ref prevTime); + Utilities.RetryActionUntilSuccess(() => vmPowershellCmdlets.StopAzureVM(vm1WildcardName, svcName, true, true), "HTTP Status Code: 409", 10, 60); + //StopAzureVMs(vm1WildcardName, svcName, true, true); + Utilities.RecordTimeTaken(ref prevTime); + + WaitForStoppedState(svcName, vmName1); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { stoppedProvisionedState })); + + // Start VM1 one only using wildcard name + Utilities.RecordTimeTaken(ref prevTime); + Utilities.RetryActionUntilSuccess(() => vmPowershellCmdlets.StartAzureVM(vm1WildcardName, svcName), "HTTP Status Code: 409", 10, 60); + //StartAzureVMs(vm1WildcardName, svcName); + Utilities.RecordTimeTaken(ref prevTime); + + WaitForReadyState(svcName, vmName1); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { readyState })); + + // Stop all VM's + Utilities.RecordTimeTaken(ref prevTime); + Utilities.RetryActionUntilSuccess(() => vmPowershellCmdlets.StopAzureVM("*", svcName, true, true), "HTTP Status Code: 409", 10, 60); + //StopAzureVMs("*", svcName, true, true); + Utilities.RecordTimeTaken(ref prevTime); + + WaitForStoppedState(svcName, vmName1); + WaitForStoppedState(svcName, vmName2); + + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { stoppedProvisionedState })); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName2, new string[] { stoppedProvisionedState })); + + //Start all VM's + Utilities.RecordTimeTaken(ref prevTime); + Utilities.RetryActionUntilSuccess(() => vmPowershellCmdlets.StartAzureVM("*", svcName), "HTTP Status Code: 409", 10, 60); + //StartAzureVMs("*", svcName); + Utilities.RecordTimeTaken(ref prevTime); + + WaitForReadyState(svcName, vmName1); + WaitForReadyState(svcName, vmName2); + + Utilities.RecordTimeTaken(ref prevTime); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { readyState })); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName2, new string[] { readyState })); + + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + finally + { + if ((cleanupIfPassed && pass) || (cleanupIfFailed && !pass)) + { + vmPowershellCmdlets.RemoveAzureService(svcName); + } + } + } + + /// + /// + /// + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Stop-AzureVM)")] + public void RestartAzureVMAfterDeallocateTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + DateTime prevTime = DateTime.Now; + + // starting the test. + var azureVMConfigInfo1 = new AzureVMConfigInfo(vmName1, InstanceSize.Small.ToString(), imageName); + var azureProvisioningConfig1 = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var persistentVMConfigInfo1 = new PersistentVMConfigInfo(azureVMConfigInfo1, azureProvisioningConfig1, null, null); + PersistentVM persistentVM1 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo1); + + PersistentVM[] VMs = { persistentVM1 }; + + Utilities.RecordTimeTaken(ref prevTime); + vmPowershellCmdlets.NewAzureVM(svcName, VMs); + Utilities.RecordTimeTaken(ref prevTime); + + Console.WriteLine("The VM is successfully created: {0}", vmName1); + + WaitForReadyState(svcName, vmName1); + + Console.WriteLine(vmPowershellCmdlets.GetAzureVM(vmName1, svcName).InstanceStatus); + + Utilities.RecordTimeTaken(ref prevTime); + vmPowershellCmdlets.StopAzureVM(vmName1, svcName, false, true); + Utilities.RecordTimeTaken(ref prevTime); + + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { stoppedDeallocatedState })); + + for (int i = 0 ; i < 10 ; i++) + { + try + { + Utilities.RecordTimeTaken(ref prevTime); + vmPowershellCmdlets.StartAzureVM(vmName1, svcName); + Utilities.RecordTimeTaken(ref prevTime); + break; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + Thread.Sleep(60 * 1000); + } + } + + WaitForReadyState(svcName, vmName1); + Utilities.RecordTimeTaken(ref prevTime); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new [] { readyState })); + + var vm = vmPowershellCmdlets.GetAzureVM(vmName1, svcName).VM; + var vmSizeConfig = new SetAzureVMSizeConfig(InstanceSize.Medium.ToString()); + vmSizeConfig.Vm = vm; + vm = vmPowershellCmdlets.SetAzureVMSize(vmSizeConfig); + vmPowershellCmdlets.UpdateAzureVM(vmName1, svcName, vm); + + vm = vmPowershellCmdlets.GetAzureVM(vmName1, svcName).VM; + Console.WriteLine("RoleSize: {0}", vm.RoleSize); + Assert.AreEqual(InstanceSize.Medium.ToString(), vm.RoleSize); + + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + finally + { + if ((cleanupIfPassed && pass) || (cleanupIfFailed && !pass)) + { + vmPowershellCmdlets.RemoveAzureService(svcName); + } + } + } + + + /// + /// + /// + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "IAAS"), Priority(1), Owner("hylee"), Description("Test the cmdlet (Stop-AzureVM) using wildcard syntax")] + public void RestartAzureVMsAfterDeallocateTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + + try + { + // starting the test. + DateTime prevTime = DateTime.Now; + + // Configure VM1 + var azureVMConfigInfo1 = new AzureVMConfigInfo(vmName1, InstanceSize.ExtraSmall.ToString(), imageName); + var azureProvisioningConfig1 = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var persistentVMConfigInfo1 = new PersistentVMConfigInfo(azureVMConfigInfo1, azureProvisioningConfig1, null, null); + PersistentVM persistentVM1 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo1); + + // Configure VM2 + var azureVMConfigInfo2 = new AzureVMConfigInfo(vmName2, InstanceSize.Small.ToString(), imageName); + var azureProvisioningConfig2 = new AzureProvisioningConfigInfo(OS.Windows, username, password); + var persistentVMConfigInfo2 = new PersistentVMConfigInfo(azureVMConfigInfo2, azureProvisioningConfig2, null, null); + PersistentVM persistentVM2 = vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo2); + + PersistentVM[] VMs = { persistentVM1, persistentVM2 }; + + Utilities.RecordTimeTaken(ref prevTime); + vmPowershellCmdlets.NewAzureVM(svcName, VMs); + Utilities.RecordTimeTaken(ref prevTime); + + Console.WriteLine("The VM is successfully created: {0}", vmName1); + Console.WriteLine("The VM is successfully created: {0}", vmName2); + + WaitForReadyState(svcName, vmName1); + WaitForReadyState(svcName, vmName2); + + Console.WriteLine(vmPowershellCmdlets.GetAzureVM(vmName1, svcName).InstanceStatus); + Console.WriteLine(vmPowershellCmdlets.GetAzureVM(vmName2, svcName).InstanceStatus); + + // Stop VM1 one only using wildcard name + string vm1WildcardName = vmName1.Replace(prefixVMName, "*"); + Utilities.RecordTimeTaken(ref prevTime); + Utilities.RetryActionUntilSuccess(() => vmPowershellCmdlets.StopAzureVM(vm1WildcardName, svcName, false, true), "HTTP Status Code: 409", 10, 60); + //StopAzureVMs(vm1WildcardName, svcName, false, true); + Utilities.RecordTimeTaken(ref prevTime); + + WaitForStoppedState(svcName, vmName1); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { stoppedDeallocatedState })); + + // Start VM1 one only using wildcard name + Utilities.RecordTimeTaken(ref prevTime); + Utilities.RetryActionUntilSuccess(() => vmPowershellCmdlets.StartAzureVM(vm1WildcardName, svcName), "HTTP Status Code: 409", 10, 60); + //StartAzureVMs(vm1WildcardName, svcName); + Utilities.RecordTimeTaken(ref prevTime); + + WaitForReadyState(svcName, vmName1); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { readyState })); + + Utilities.RecordTimeTaken(ref prevTime); + vmPowershellCmdlets.StopAzureVM("*", svcName, false, true); + Utilities.RecordTimeTaken(ref prevTime); + + WaitForStoppedState(svcName, vmName1); + WaitForStoppedState(svcName, vmName2); + + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { stoppedDeallocatedState })); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName2, new string[] { stoppedDeallocatedState })); + + Utilities.RecordTimeTaken(ref prevTime); + Utilities.RetryActionUntilSuccess(() => vmPowershellCmdlets.StartAzureVM("*", svcName), "HTTP Status Code: 409", 10, 60); + //StartAzureVMs("*", svcName); + Utilities.RecordTimeTaken(ref prevTime); + + WaitForReadyState(svcName, vmName1); + WaitForReadyState(svcName, vmName2); + Utilities.RecordTimeTaken(ref prevTime); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName1, new string[] { readyState })); + Assert.IsTrue(CheckRoleInstanceState(svcName, vmName2, new string[] { readyState })); + + pass = true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + finally + { + if ((cleanupIfPassed && pass) || (cleanupIfFailed && !pass)) + { + vmPowershellCmdlets.RemoveAzureService(svcName); + } + } + } + + /// + /// + /// + /// Service Name + /// VM Name + /// An array of expected states. This should not be null + /// + private bool CheckRoleInstanceState(string svc, string vm, string[] expStates) + { + List exps = new List(expStates); + string instanceState = vmPowershellCmdlets.GetAzureVM(vm, svc).InstanceStatus; + var vmRoleCOntext = vmPowershellCmdlets.GetAzureVM(vm, svc); + Console.WriteLine("Role instaces: {0}", vmRoleCOntext.InstanceStatus); + return exps.Contains(vmRoleCOntext.InstanceStatus); + } + + [TestCleanup] + public virtual void CleanUp() + { + Console.WriteLine("Test {0}", pass ? "passed" : "failed"); + + if ((cleanupIfPassed && pass) || (cleanupIfFailed && !pass)) + { + try + { + Console.WriteLine("Starting to clean up created VM and service."); + vmPowershellCmdlets.RemoveAzureService(svcName); + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + } + } + } + + [ClassCleanup] + public static void ClassCleanUp() + { + } + + internal static void WaitForStatus(string svcName, string vmName, string[] expStatus, string[] skipStatus, int interval, int maxTry) + { + string vmStatus = string.Empty; + + List exps = new List(expStatus); + List skips = null; + if (skipStatus != null) + { + skips = new List(skipStatus); + } + + int totalWaitTimeInSeconds = 0; + for (int i = 0; i < maxTry; i++) + { + vmStatus = vmPowershellCmdlets.GetAzureVM(vmName, svcName).InstanceStatus; + + if (exps.Contains(vmStatus)) + { + Console.WriteLine("The VM is in {0} state after {1} seconds", vmStatus, totalWaitTimeInSeconds); + return; + } + else if (skips == null || skips.Contains(vmStatus)) + { + // waitTimeInSeconds = interval * (2 ^ (i / 10)) + int waitTimeInSeconds = interval * (1 << (i / 10)); + totalWaitTimeInSeconds += waitTimeInSeconds; + Console.WriteLine("Total wait time = {0} second(s), by {1} {2}.", totalWaitTimeInSeconds, (i + 1), i == 0 ? "retry" : "retries"); + Console.WriteLine("Current VM state is {0}. Keep waiting for {1} second(s)...", vmStatus, waitTimeInSeconds); + Thread.Sleep(TimeSpan.FromSeconds(waitTimeInSeconds)); + } + else + { + Console.WriteLine("Role status is {0}", vmStatus); + Assert.Fail("The VM does not become ready."); + } + } + + Console.WriteLine("Role status is still {0} after {1} seconds", vmStatus, totalWaitTimeInSeconds); + Assert.Fail("The VM does not become ready within a given time."); + } + + internal static void WaitForReadyState(string svc, string vm, int interval = 20, int maxTry = 30) + { + //WaitForStatus(svc, vm, new string[] { readyState }, new string[] { unknownState, creatingState, provisioningState, startingState }, interval, maxTry); + WaitForStatus(svc, vm, new string[] { readyState }, null, interval, maxTry); + } + + internal static void WaitForStartedState(string svc, string vm, int interval = 20, int maxTry = 30) + { + //WaitForStatus(svc, vm, new string[] { readyState, provisioningState }, new string[] { unknownState, creatingState, startingState }, interval, maxTry); + WaitForStatus(svc, vm, new string[] { readyState, provisioningState }, null, interval, maxTry); + } + + internal static void WaitForStartingState(string svc, string vm, int interval = 20, int maxTry = 30) + { + //WaitForStatus(svc, vm, new string[] { creatingState, provisioningState, readyState, startingState }, new string[] { unknownState }, interval, maxTry); + WaitForStatus(svc, vm, new string[] { creatingState, provisioningState, readyState, startingState }, null, interval, maxTry); + } + + internal static void WaitForStoppedState(string svc, string vm, int interval = 20, int maxTry = 30) + { + //WaitForStatus(svc, vm, new string[] { stoppedDeallocatedState, stoppedProvisionedState }, new string[] { unknownState, provisioningState, readyState }, interval, maxTry); + WaitForStatus(svc, vm, new string[] { stoppedDeallocatedState, stoppedProvisionedState }, null, interval, maxTry); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/SubscriptionCmdletInfo/GetAzureEnvironment.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/SubscriptionCmdletInfo/GetAzureEnvironment.cs new file mode 100644 index 000000000000..6ea9b9426b5f --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/SubscriptionCmdletInfo/GetAzureEnvironment.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.SubscriptionCmdletInfo +{ + public class GetAzureEnvironmentCmdletInfo : CmdletsInfo + { + public GetAzureEnvironmentCmdletInfo(string name, string subscriptionDataFile) + { + cmdletName = Utilities.GetAzureEnvironmentCmdletName; + + if (!string.IsNullOrEmpty(name)) + { + this.cmdletParams.Add(new CmdletParam("Name", name)); + } + if (!string.IsNullOrEmpty(subscriptionDataFile)) + { + this.cmdletParams.Add(new CmdletParam("SubscriptionDataFile", subscriptionDataFile)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/SubscriptionCmdletInfo/GetAzureSubscriptionCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/SubscriptionCmdletInfo/GetAzureSubscriptionCmdletInfo.cs new file mode 100644 index 000000000000..328a1960afe6 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/SubscriptionCmdletInfo/GetAzureSubscriptionCmdletInfo.cs @@ -0,0 +1,47 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.SubscriptionCmdletInfo +{ + public class GetAzureSubscriptionCmdletInfo : CmdletsInfo + { + public GetAzureSubscriptionCmdletInfo(string subscriptionName, string subscriptionDataFile, bool extendedDetails, bool currentSubscription, bool defaultSubscription) + { + cmdletName = Utilities.GetAzureSubscriptionCmdletName; + + if (!string.IsNullOrEmpty(subscriptionName)) + { + this.cmdletParams.Add(new CmdletParam("SubscriptionName", subscriptionName)); + } + if (!string.IsNullOrEmpty(subscriptionDataFile)) + { + this.cmdletParams.Add(new CmdletParam("SubscriptionDataFile", subscriptionDataFile)); + } + if (extendedDetails) + { + this.cmdletParams.Add(new CmdletParam("ExtendedDetails")); + } + if (currentSubscription) + { + this.cmdletParams.Add(new CmdletParam("Current")); + } + if (defaultSubscription) + { + this.cmdletParams.Add(new CmdletParam("Default")); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/SubscriptionCmdletInfo/ImportAzurePublishSettingsFileCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/SubscriptionCmdletInfo/ImportAzurePublishSettingsFileCmdletInfo.cs new file mode 100644 index 000000000000..9461d9df0e8c --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/SubscriptionCmdletInfo/ImportAzurePublishSettingsFileCmdletInfo.cs @@ -0,0 +1,31 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.SubscriptionCmdletInfo +{ + public class ImportAzurePublishSettingsFileCmdletInfo : CmdletsInfo + { + public ImportAzurePublishSettingsFileCmdletInfo(string publishSettingsFile, string env = null) + { + cmdletName = Utilities.ImportAzurePublishSettingsFileCmdletName; + cmdletParams.Add(new CmdletParam("PublishSettingsFile", publishSettingsFile)); + if (! string.IsNullOrEmpty(env)) + { + cmdletParams.Add(new CmdletParam("Environment", env)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/SubscriptionCmdletInfo/RemoveAzureSubscriptionCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/SubscriptionCmdletInfo/RemoveAzureSubscriptionCmdletInfo.cs new file mode 100644 index 000000000000..a9bd827dafca --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/SubscriptionCmdletInfo/RemoveAzureSubscriptionCmdletInfo.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.SubscriptionCmdletInfo +{ + public class RemoveAzureSubscriptionCmdletInfo : CmdletsInfo + { + public RemoveAzureSubscriptionCmdletInfo(string subscriptionName, string dataFile, bool force = false) + { + cmdletName = Utilities.RemoveAzureSubscriptionCmdletName; + cmdletParams.Add(new CmdletParam("SubscriptionName", subscriptionName)); + if (dataFile != null) + { + cmdletParams.Add(new CmdletParam("SubscriptionDataFile", dataFile)); + } + if (force) + { + cmdletParams.Add(new CmdletParam("Force", force)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/SubscriptionCmdletInfo/SetAzureSubscriptionCmdletInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/SubscriptionCmdletInfo/SetAzureSubscriptionCmdletInfo.cs new file mode 100644 index 000000000000..0f750f2ac030 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/SubscriptionCmdletInfo/SetAzureSubscriptionCmdletInfo.cs @@ -0,0 +1,42 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.PowershellCore; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.SubscriptionCmdletInfo +{ + public class SetAzureSubscriptionCmdletInfo : CmdletsInfo + { + public SetAzureSubscriptionCmdletInfo(string defaultSubscriptionName) + { + cmdletName = Utilities.SetAzureSubscriptionCmdletName; + cmdletParams.Add(new CmdletParam("DefaultSubscription", defaultSubscriptionName)); + } + + public SetAzureSubscriptionCmdletInfo(string subscriptionName, string subscriptionId, string currentStorageAccount) + { + cmdletName = Utilities.SetAzureSubscriptionCmdletName; + cmdletParams.Add(new CmdletParam("SubscriptionName", subscriptionName)); + cmdletParams.Add(new CmdletParam("SubscriptionId", subscriptionId)); + cmdletParams.Add(new CmdletParam("CurrentStorageAccount", currentStorageAccount)); + } + + public SetAzureSubscriptionCmdletInfo(string subscriptionId, string currentStorageAccount) + { + cmdletName = Utilities.SetAzureSubscriptionCmdletName; + cmdletParams.Add(new CmdletParam("SubscriptionId", subscriptionId)); + cmdletParams.Add(new CmdletParam("CurrentStorageAccount", currentStorageAccount)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/Utilities.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/Utilities.cs new file mode 100644 index 000000000000..ed6de93117d4 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/Utilities.cs @@ -0,0 +1,1046 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Reflection; +using System.Security; +using System.Security.Cryptography; +using System.Security.Cryptography.X509Certificates; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading; +using System.Xml; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; +using Microsoft.WindowsAzure.Commands.Sync.Download; +using Microsoft.WindowsAzure.Storage.Auth; +using Microsoft.WindowsAzure.Storage.Blob; +using Security.Cryptography; +using Security.Cryptography.X509Certificates; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests +{ + internal class Utilities + { + + #region Constants + + public static string windowsAzurePowershellPath = Path.Combine(Environment.CurrentDirectory, "ServiceManagement\\Azure"); + + public const string windowsAzurePowershellServiceModule = "Azure.psd1"; + public const string windowsAzurePowershellModuleServiceManagementPlatformImageRepository = "PIR.psd1"; + public const string windowsAzurePowershellModuleServiceManagementPreview = "AzurePreview.psd1"; + + public const string AzurePowershellCommandsModule = "Microsoft.WindowsAzure.Commands.dll"; + public const string AzurePowershellServiceManagementModule = "Microsoft.WindowsAzure.Commands.ServiceManagement.dll"; + public const string AzurePowershellStorageModule = "Microsoft.WindowsAzure.Commands.Storage.dll"; + public const string AzurePowershellModuleServiceManagementPirModule = "Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository.dll"; + public const string AzurePowershellModuleServiceManagementPreviewModule = "Microsoft.WindowsAzure.Commands.ServiceManagement.Preview.dll"; + + private const string tclientPath = "tclient.dll"; + private const string clxtsharPath = "clxtshar.dll"; + private const string RDPTestPath = "RDPTest.exe"; + + // AzureAffinityGroup + public const string NewAzureAffinityGroupCmdletName = "New-AzureAffinityGroup"; + public const string GetAzureAffinityGroupCmdletName = "Get-AzureAffinityGroup"; + public const string SetAzureAffinityGroupCmdletName = "Set-AzureAffinityGroup"; + public const string RemoveAzureAffinityGroupCmdletName = "Remove-AzureAffinityGroup"; + + // AzureAvailablitySet + public const string SetAzureAvailabilitySetCmdletName = "Set-AzureAvailabilitySet"; + public const string RemoveAzureAvailabilitySetCmdletName = "Remove-AzureAvailabilitySet"; + + // AzureCertificate & AzureCertificateSetting + public const string AddAzureCertificateCmdletName = "Add-AzureCertificate"; + public const string GetAzureCertificateCmdletName = "Get-AzureCertificate"; + public const string RemoveAzureCertificateCmdletName = "Remove-AzureCertificate"; + public const string NewAzureCertificateSettingCmdletName = "New-AzureCertificateSetting"; + + // AzureDataDisk + public const string AddAzureDataDiskCmdletName = "Add-AzureDataDisk"; + public const string GetAzureDataDiskCmdletName = "Get-AzureDataDisk"; + public const string SetAzureDataDiskCmdletName = "Set-AzureDataDisk"; + public const string RemoveAzureDataDiskCmdletName = "Remove-AzureDataDisk"; + + // AzureDeployment + public const string NewAzureDeploymentCmdletName = "New-AzureDeployment"; + public const string GetAzureDeploymentCmdletName = "Get-AzureDeployment"; + public const string SetAzureDeploymentCmdletName = "Set-AzureDeployment"; + public const string RemoveAzureDeploymentCmdletName = "Remove-AzureDeployment"; + public const string MoveAzureDeploymentCmdletName = "Move-AzureDeployment"; + public const string GetAzureDeploymentEventCmdletName = "Get-AzureDeploymentEvent"; + + // AzureDisk + public const string AddAzureDiskCmdletName = "Add-AzureDisk"; + public const string GetAzureDiskCmdletName = "Get-AzureDisk"; + public const string UpdateAzureDiskCmdletName = "Update-AzureDisk"; + public const string RemoveAzureDiskCmdletName = "Remove-AzureDisk"; + + // AzureDns + public const string NewAzureDnsCmdletName = "New-AzureDns"; + public const string GetAzureDnsCmdletName = "Get-AzureDns"; + public const string SetAzureDnsCmdletName = "Set-AzureDns"; + public const string AddAzureDnsCmdletName = "Add-AzureDns"; + public const string RemoveAzureDnsCmdletName = "Remove-AzureDns"; + + // AzureEndpoint + public const string AddAzureEndpointCmdletName = "Add-AzureEndpoint"; + public const string GetAzureEndpointCmdletName = "Get-AzureEndpoint"; + public const string SetAzureEndpointCmdletName = "Set-AzureEndpoint"; + public const string RemoveAzureEndpointCmdletName = "Remove-AzureEndpoint"; + + // AzureLocation + public const string GetAzureLocationCmdletName = "Get-AzureLocation"; + + // AzureOSDisk & AzureOSVersion + public const string GetAzureOSDiskCmdletName = "Get-AzureOSDisk"; + public const string SetAzureOSDiskCmdletName = "Set-AzureOSDisk"; + + public const string GetAzureOSVersionCmdletName = "Get-AzureOSVersion"; + + // AzureProvisioningConfig + public const string AddAzureProvisioningConfigCmdletName = "Add-AzureProvisioningConfig"; + + // AzurePublishSettingsFile + public const string ImportAzurePublishSettingsFileCmdletName = "Import-AzurePublishSettingsFile"; + public const string GetAzurePublishSettingsFileCmdletName = "Get-AzurePublishSettingsFile"; + public const string AddAzureEnvironmentCmdletName = "Add-AzureEnvironment"; + + // AzureQuickVM + public const string NewAzureQuickVMCmdletName = "New-AzureQuickVM"; + + //Get-AzureWinRMUri + + public const string GetAzureWinRMUriCmdletName = "Get-AzureWinRMUri"; + + // AzurePlatformVMImage + public const string SetAzurePlatformVMImageCmdletName = "Set-AzurePlatformVMImage"; + public const string GetAzurePlatformVMImageCmdletName = "Get-AzurePlatformVMImage"; + public const string RemoveAzurePlatformVMImageCmdletName = "Remove-AzurePlatformVMImage"; + + // AzureRemoteDesktopFile + public const string GetAzureRemoteDesktopFileCmdletName = "Get-AzureRemoteDesktopFile"; + + // AzureReservedIP + public const string NewAzureReservedIPCmdletName = "New-AzureReservedIP"; + public const string GetAzureReservedIPCmdletName = "Get-AzureReservedIP"; + public const string RemoveAzureReservedIPCmdletName = "Remove-AzureReservedIP"; + + // AzureRole & AzureRoleInstnace + public const string GetAzureRoleCmdletName = "Get-AzureRole"; + public const string SetAzureRoleCmdletName = "Set-AzureRole"; + + public const string GetAzureRoleInstanceCmdletName = "Get-AzureRoleInstance"; + + // AzureRoleSize + public const string GetAzureRoleSizeCmdletName = "Get-AzureRoleSize"; + + // AzureService + public const string NewAzureServiceCmdletName = "New-AzureService"; + public const string GetAzureServiceCmdletName = "Get-AzureService"; + public const string SetAzureServiceCmdletName = "Set-AzureService"; + public const string RemoveAzureServiceCmdletName = "Remove-AzureService"; + + // AzureServiceAvailableExtension + public const string GetAzureServiceAvailableExtensionCmdletName = "Get-AzureServiceAvailableExtension"; + + // AzureServiceExtension + public const string NewAzureServiceExtensionConfigCmdletName = "New-AzureServiceExtensionConfig"; + public const string SetAzureServiceExtensionCmdletName = "Set-AzureServiceExtension"; + public const string GetAzureServiceExtensionCmdletName = "Get-AzureServiceExtension"; + public const string RemoveAzureServiceExtensionCmdletName = "Remove-AzureServiceExtension"; + + // AzureServiceRemoteDesktopExtension + public const string NewAzureServiceRemoteDesktopExtensionConfigCmdletName = "New-AzureServiceRemoteDesktopExtensionConfig"; + public const string SetAzureServiceRemoteDesktopExtensionCmdletName = "Set-AzureServiceRemoteDesktopExtension"; + public const string GetAzureServiceRemoteDesktopExtensionCmdletName = "Get-AzureServiceRemoteDesktopExtension"; + public const string RemoveAzureServiceRemoteDesktopExtensionCmdletName = "Remove-AzureServiceRemoteDesktopExtension"; + + // AzureServiceDiagnosticExtension + public const string NewAzureServiceDiagnosticsExtensionConfigCmdletName = "New-AzureServiceDiagnosticsExtensionConfig"; + public const string SetAzureServiceDiagnosticsExtensionCmdletName = "Set-AzureServiceDiagnosticsExtension"; + public const string GetAzureServiceDiagnosticsExtensionCmdletName = "Get-AzureServiceDiagnosticsExtension"; + public const string RemoveAzureServiceDiagnosticsExtensionCmdletName = "Remove-AzureServiceDiagnosticsExtension"; + + // AzureSSHKey + public const string NewAzureSSHKeyCmdletName = "New-AzureSSHKey"; + + // AzureStorageAccount + public const string NewAzureStorageAccountCmdletName = "New-AzureStorageAccount"; + public const string GetAzureStorageAccountCmdletName = "Get-AzureStorageAccount"; + public const string SetAzureStorageAccountCmdletName = "Set-AzureStorageAccount"; + public static string RemoveAzureStorageAccountCmdletName = "Remove-AzureStorageAccount"; + + //AzureDomainJoinExtension + public const string NewAzureServiceDomainJoinExtensionConfig = "New-AzureServiceADDomainExtensionConfig"; + public const string SetAzureServiceDomainJoinExtension = "Set-AzureServiceADDomainExtension"; + public const string RemoveAzureServiceDomainJoinExtension = "Remove-AzureServiceADDomainExtension"; + public const string GetAzureServiceDomainJoinExtension = "Get-AzureServiceADDomainExtension"; + + // AzureStorageKey + public static string NewAzureStorageKeyCmdletName = "New-AzureStorageKey"; + public static string GetAzureStorageKeyCmdletName = "Get-AzureStorageKey"; + + // AzureSubnet + public static string GetAzureSubnetCmdletName = "Get-AzureSubnet"; + public static string SetAzureSubnetCmdletName = "Set-AzureSubnet"; + + // AzureSubscription + public const string GetAzureSubscriptionCmdletName = "Get-AzureSubscription"; + public const string SetAzureSubscriptionCmdletName = "Set-AzureSubscription"; + public const string SelectAzureSubscriptionCmdletName = "Select-AzureSubscription"; + public const string RemoveAzureSubscriptionCmdletName = "Remove-AzureSubscription"; + + // AzureEnvironment + public const string GetAzureEnvironmentCmdletName = "Get-AzureEnvironment"; + public const string SetAzureEnvironmentCmdletName = "Set-AzureEnvironment"; + + // AzureVhd + public static string AddAzureVhdCmdletName = "Add-AzureVhd"; + public static string SaveAzureVhdCmdletName = "Save-AzureVhd"; + + // AzureVM + public const string NewAzureVMCmdletName = "New-AzureVM"; + public const string GetAzureVMCmdletName = "Get-AzureVM"; + public const string UpdateAzureVMCmdletName = "Update-AzureVM"; + public const string RemoveAzureVMCmdletName = "Remove-AzureVM"; + + public const string ExportAzureVMCmdletName = "Export-AzureVM"; + public const string ImportAzureVMCmdletName = "Import-AzureVM"; + + public const string StartAzureVMCmdletName = "Start-AzureVM"; + public const string StopAzureVMCmdletName = "Stop-AzureVM"; + public const string RestartAzureVMCmdletName = "Restart-AzureVM"; + + // AzureVMConfig + public const string NewAzureVMConfigCmdletName = "New-AzureVMConfig"; + + // AzureVMImage + + public const string AddAzureVMImageCmdletName = "Add-AzureVMImage"; + public const string GetAzureVMImageCmdletName = "Get-AzureVMImage"; + public const string RemoveAzureVMImageCmdletName = "Remove-AzureVMImage"; + public const string SaveAzureVMImageCmdletName = "Save-AzureVMImage"; + public const string UpdateAzureVMImageCmdletName = "Update-AzureVMImage"; + + // AzureVMSize + public const string SetAzureVMSizeCmdletName = "Set-AzureVMSize"; + + // AzureVNetConfig & AzureVNetConnection + public const string GetAzureVNetConfigCmdletName = "Get-AzureVNetConfig"; + public const string SetAzureVNetConfigCmdletName = "Set-AzureVNetConfig"; + public const string RemoveAzureVNetConfigCmdletName = "Remove-AzureVNetConfig"; + + public const string GetAzureVNetConnectionCmdletName = "Get-AzureVNetConnection"; + + // AzureVnetGateway & AzureVnetGatewayKey + public const string NewAzureVNetGatewayCmdletName = "New-AzureVNetGateway"; + public const string GetAzureVNetGatewayCmdletName = "Get-AzureVNetGateway"; + public const string SetAzureVNetGatewayCmdletName = "Set-AzureVNetGateway"; + public const string RemoveAzureVNetGatewayCmdletName = "Remove-AzureVNetGateway"; + + public const string GetAzureVNetGatewayKeyCmdletName = "Get-AzureVNetGatewayKey"; + + // AzureVNetSite + public const string GetAzureVNetSiteCmdletName = "Get-AzureVNetSite"; + + // AzureWalkUpgradeDomain + public const string SetAzureWalkUpgradeDomainCmdletName = "Set-AzureWalkUpgradeDomain"; + + + public const string GetModuleCmdletName = "Get-Module"; + public const string TestAzureNameCmdletName = "Test-AzureName"; + + public const string CopyAzureStorageBlobCmdletName = "Copy-AzureStorageBlob"; + + + public static string SetAzureAclConfigCmdletName = "Set-AzureAclConfig"; + + public static string NewAzureAclConfigCmdletName = "New-AzureAclConfig"; + + public static string GetAzureAclConfigCmdletName = "Get-AzureAclConfig"; + + public static string SetAzureLoadBalancedEndpointCmdletName = "Set-AzureLoadBalancedEndpoint"; + + public const string ResetAzureRoleInstanceCmdletName = "ReSet-AzureRoleInstance"; + + //Static CA cmdlets + public const string TestAzureStaticVNetIPCmdletName = "Test-AzureStaticVNetIP"; + public const string SetAzureStaticVNetIPCmdletName = "Set-AzureStaticVNetIP"; + public const string GetAzureStaticVNetIPCmdletName = "Get-AzureStaticVNetIP"; + public const string RemoveAzureStaticVNetIPCmdletName = "Remove-AzureStaticVNetIP"; + + public const string GetAzureVMBGInfoExtensionCmdletName = "Get-AzureVMBGInfoExtension"; + public const string SetAzureVMBGInfoExtensionCmdletName = "Set-AzureVMBGInfoExtension"; + public const string RemoveAzureVMBGInfoExtensionCmdletName = "Remove-AzureVMBGInfoExtension"; + + // Generic Azure VM Extension cmdlets + public const string GetAzureVMExtensionCmdletName = "Get-AzureVMExtension"; + public const string SetAzureVMExtensionCmdletName = "Set-AzureVMExtension"; + public const string RemoveAzureVMExtensionCmdletName = "Remove-AzureVMExtension"; + public const string GetAzureVMAvailableExtensionCmdletName = "Get-AzureVMAvailableExtension"; + public const string GetAzureVMExtensionConfigTemplateCmdletName = "Get-AzureVMExtensionConfigTemplate"; + + // VM Access Extesnion + public const string GetAzureVMAccessExtensionCmdletName = "Get-AzureVMAccessExtension"; + public const string SetAzureVMAccessExtensionCmdletName = "Set-AzureVMAccessExtension"; + public const string RemoveAzureVMAccessExtensionCmdletName = "Remove-AzureVMAccessExtension"; + + // Custom script extension + public const string SetAzureVMCustomScriptExtensionCmdletName = "Set-AzureVMCustomScriptExtension"; + public const string GetAzureVMCustomScriptExtensionCmdletName = "Get-AzureVMCustomScriptExtension"; + public const string RemoveAzureVMCustomScriptExtensionCmdletName = "Remove-AzureVMCustomScriptExtension"; + + public const string PaaSDiagnosticsExtensionName = "PaaSDiagnostics"; + + // VM Image Disk + public const string GetAzureVMImageDiskConfigSetCmdletName = "Get-AzureVMImageDiskConfigSet"; + public const string SetAzureVMImageDataDiskConfigCmdletName = "Set-AzureVMImageDataDiskConfig"; + public const string SetAzureVMImageOSDiskConfigCmdletName = "Set-AzureVMImageOSDiskConfig"; + public const string NewAzureVMImageDiskConfigSetCmdletName = "New-AzureVMImageDiskConfigSet"; + + //ILB + public const string NewAzureInternalLoadBalancerConfigCmdletName = "New-AzureInternalLoadBalancerConfig"; + public const string AddAzureInternalLoadBalancerCmdletName = "Add-AzureInternalLoadBalancer"; + public const string GetAzureInternalLoadBalancerCmdletName = "Get-AzureInternalLoadBalancer"; + public const string SetAzureInternalLoadBalancerCmdletName = "Set-AzureInternalLoadBalancer"; + public const string RemoveAzureInternalLoadBalancerCmdletName = "Remove-AzureInternalLoadBalancer"; + public const string SetAzurePublicIPCmdletName = "Set-AzurePublicIP"; + public const string GetAzurePublicIPCmdletName = "Get-AzurePublicIP"; + + // NetworkInterface config + public const string AddAzureNetworkInterfaceConfig = "Add-AzureNetworkInterfaceConfig"; + public const string SetAzureNetworkInterfaceConfig = "Set-AzureNetworkInterfaceConfig"; + public const string RemoveAzureNetworkInterfaceConfig = "Remove-AzureNetworkInterfaceConfig"; + public const string GetAzureNetworkInterfaceConfig = "Get-AzureNetworkInterfaceConfig"; + + // Custom script extension + public const string SetAzureVMDscExtensionCmdletName = "Set-AzureVMDscExtension"; + public const string GetAzureVMDscExtensionCmdletName = "Get-AzureVMDscExtension"; + public const string RemoveAzureVMDscExtensionCmdletName = "Remove-AzureVMDscExtension"; + + // SqlServer extension + public const string SetAzureVMSqlServerExtensionCmdletName = "Set-AzureVMSqlServerExtension"; + public const string GetAzureVMSqlServerExtensionCmdletName = "Get-AzureVMSqlServerExtension"; + public const string RemoveAzureVMSqlServerExtensionCmdletName = "Remove-AzureVMSqlServerExtension"; + #endregion + + private static ServiceManagementCmdletTestHelper vmPowershellCmdlets = new ServiceManagementCmdletTestHelper(); + + + public static string GetUniqueShortName(string prefix = "", int length = 6, string suffix = "", bool includeDate = false) + { + string dateSuffix = ""; + if (includeDate) + { + dateSuffix = string.Format("-{0}{1}", DateTime.Now.Year, DateTime.Now.DayOfYear); + } + return string.Format("{0}{1}{2}{3}", prefix, Guid.NewGuid().ToString("N").Substring(0, length), suffix, dateSuffix); + } + + public static int MatchKeywords(string input, string[] keywords, bool exactMatch = true) + { //returns -1 for no match, 0 for exact match, and a positive number for how many keywords are matched. + int result = 0; + if (string.IsNullOrEmpty(input) || keywords.Length == 0) + return -1; + foreach (string keyword in keywords) + { + //For whole word match, modify pattern to be "\b{0}\b" + if (!string.IsNullOrEmpty(keyword) && Regex.IsMatch(input, string.Format(@"{0}", Regex.Escape(keyword)), RegexOptions.IgnoreCase)) + { + result++; + } + } + if (result == keywords.Length) + { + return 0; + } + else if (result == 0) + { + return -1; + } + else + { + if (exactMatch) + { + return -1; + } + else + { + return result; + } + } + } + + public static Uri GetDeploymentAndWaitForReady(string serviceName, string slot, int waitTime, int maxWaitTime) + { + + + + DateTime startTime = DateTime.Now; + while (true) + { + bool allReady = true; + DeploymentInfoContext result = vmPowershellCmdlets.GetAzureDeployment(serviceName, slot); + int instanceNum = result.RoleInstanceList.Count; + bool[] isReady = new bool[instanceNum]; + + for (int j = 0; j < instanceNum; j++) + { + var instance = result.RoleInstanceList[j]; + Console.WriteLine("Instance: {0}, Status: {1}", instance.InstanceName, instance.InstanceStatus); + isReady[j] = (instance.InstanceStatus == "ReadyRole"); + allReady &= isReady[j]; + } + + if (!allReady && (DateTime.Now - startTime).TotalSeconds < maxWaitTime) + { + Console.WriteLine("Some roles are not ready, waiting for {0} seconds.", waitTime); + Thread.Sleep(waitTime*1000); + } + else if (!allReady) // some roles are not ready, and time-out. + { + Assert.Fail("Deployment is not ready within {0} seconds!", maxWaitTime); + } + else // all roles are ready + { + Console.WriteLine("Result of the deployment: {0}", result.Status); + return result.Url; + } + } + + } + + public static bool GetAzureVMAndWaitForReady(string serviceName, string vmName,int waitTime, int maxWaitTime ) + { + Console.WriteLine("Waiting for the vm {0} to reach \"ReadyRole\" "); + DateTime startTime = DateTime.Now; + DateTime MaxEndTime = startTime.AddMilliseconds(maxWaitTime); + while (true) + { + Console.WriteLine("Getting vm '{0}' details:",vmName); + var vmRoleContext = vmPowershellCmdlets.GetAzureVM(vmName, serviceName); + Console.WriteLine("Current status of the VM is {0} ", vmRoleContext.InstanceStatus); + if (vmRoleContext.InstanceStatus == "ReadyRole") + { + Console.WriteLine("Instance status reached expected ReadyRole state. Exiting wait."); + return true; + } + else + { + if (DateTime.Compare(DateTime.Now, MaxEndTime) > 0) + { + Console.WriteLine("Maximum wait time reached and instance status didnt reach \"ReadyRole\" state. Exiting wait. "); + return false; + } + else + { + Console.WriteLine("Waiting for {0} seconds for the {1} status to be ReadyRole", waitTime / 1000, vmName); + Thread.Sleep(waitTime); + } + } + } + } + + public static bool PrintAndCompareDeployment + (DeploymentInfoContext deployment, string serviceName, string deploymentName, string deploymentLabel, string slot, string status, int instanceCount) + { + Console.WriteLine("ServiceName:{0}, DeploymentID: {1}, Uri: {2}", deployment.ServiceName, deployment.DeploymentId, deployment.Url.AbsoluteUri); + Console.WriteLine("Name - {0}, Label - {1}, Slot - {2}, Status - {3}", + deployment.DeploymentName, deployment.Label, deployment.Slot, deployment.Status); + Console.WriteLine("RoleInstance: {0}", deployment.RoleInstanceList.Count); + foreach (var instance in deployment.RoleInstanceList) + { + Console.WriteLine("InstanceName - {0}, InstanceStatus - {1}", instance.InstanceName, instance.InstanceStatus); + } + + Assert.AreEqual(deployment.ServiceName, serviceName); + Assert.AreEqual(deployment.DeploymentName, deploymentName); + Assert.AreEqual(deployment.Label, deploymentLabel); + Assert.AreEqual(deployment.Slot, slot); + if (status != null) + { + Assert.AreEqual(deployment.Status, status); + } + + Assert.AreEqual(deployment.RoleInstanceList.Count, instanceCount); + + Assert.IsNotNull(deployment.LastModifiedTime); + Assert.IsNotNull(deployment.CreatedTime); + + return true; + } + + // CheckRemove checks if 'fn(name)' exists. 'fn(name)' is usually 'Get-AzureXXXXX name' + public static bool CheckRemove(Func fn, Arg name) + { + try + { + fn(name); + Console.WriteLine("{0} still exists!", name); + return false; + } + catch (Exception e) + { + if (e.ToString().Contains("ResourceNotFound")) + { + Console.WriteLine("{0} does not exist.", name); + return true; + } + else + { + Console.WriteLine("Error: {0}", e.ToString()); + return false; + } + } + } + + // CheckRemove checks if 'fn(name)' exists. 'fn(name)' is usually 'Get-AzureXXXXX name' + public static bool CheckRemove(Func fn, Arg1 name1, Arg2 name2) + { + try + { + fn(name1, name2); + Console.WriteLine("{0}, {1} still exist!", name1, name2); + return false; + } + catch (Exception e) + { + if (e.ToString().Contains("ResourceNotFound")) + { + Console.WriteLine("{0}, {1} is successfully removed", name1, name2); + return true; + } + else + { + Console.WriteLine("Error: {0}", e.ToString()); + return false; + } + } + } + + // CheckRemove checks if 'fn(name)' exists. 'fn(name)' is usually 'Get-AzureXXXXX name' + public static bool CheckRemove(Func fn, Arg1 name1, Arg2 name2, Arg3 name3) + { + try + { + fn(name1, name2, name3); + Console.WriteLine("{0}, {1}, {2} still exist!", name1, name2, name3); + return false; + } + catch (Exception e) + { + if (e.ToString().Contains("ResourceNotFound")) + { + Console.WriteLine("{0}, {1}, {2} is successfully removed", name1, name2, name3); + return true; + } + else + { + Console.WriteLine("Error: {0}", e.ToString()); + return false; + } + } + } + + public static BlobHandle GetBlobHandle(string blob, string key) + { + BlobUri blobPath; + Assert.IsTrue(BlobUri.TryParseUri(new Uri(blob), out blobPath)); + return new BlobHandle(blobPath, key); + } + + /// + /// Retry the given action until success or timed out. + /// + /// the action + /// retry for this error message + /// the max number of retries + /// the interval between retries + public static void RetryActionUntilSuccess(Action act, string errorMessage, int maxTry, int intervalSeconds) + { + int i = 0; + while (i < maxTry) + { + try + { + act(); + return; + } + catch (Exception e) + { + if (e.ToString().Contains(errorMessage)) + { + Console.WriteLine("{0} error occurs! retrying ...", errorMessage); + if (e.InnerException != null) + { + Console.WriteLine(e.InnerException); + } + Thread.Sleep(TimeSpan.FromSeconds(intervalSeconds)); + i++; + continue; + } + else + { + Console.WriteLine(e); + if (e.InnerException != null) + { + Console.WriteLine(e.InnerException); + } + throw; + } + } + } + } + + /// + /// This method verifies if a given error occurs during the action. Otherwise, it throws. + /// + /// Action item + /// Required error message + public static void VerifyFailure(Action act, string errorMessage) + { + try + { + act(); + Assert.Fail("Should have failed, but it succeeded!!"); + } + catch (Exception e) + { + if (e is AssertFailedException) + { + throw; + } + if (e.ToString().Contains(errorMessage)) + { + Console.WriteLine("This failure is expected: {0}", e.InnerException); + } + else + { + Console.WriteLine(e); + throw; + } + } + } + + /// + /// + /// + /// + /// + public static void TryAndIgnore(Action act, string errorMessage) + { + try + { + act(); + } + catch (Exception e) + { + if (e.ToString().Contains(errorMessage)) + { + Console.WriteLine("Ignoring exception: {0}", e.InnerException); + } + else + { + Console.WriteLine(e); + throw; + } + } + } + + public static X509Certificate2 InstallCert(string certFile, StoreLocation location = StoreLocation.CurrentUser, StoreName name = StoreName.My) + { + var cert = new X509Certificate2(certFile); + var certStore = new X509Store(name, location); + certStore.Open(OpenFlags.ReadWrite); + certStore.Add(cert); + certStore.Close(); + Console.WriteLine("Cert, {0}, is installed.", cert.Thumbprint); + return cert; + } + + public static void UninstallCert(X509Certificate2 cert, StoreLocation location, StoreName name) + { + try + { + X509Store certStore = new X509Store(name, location); + certStore.Open(OpenFlags.ReadWrite); + certStore.Remove(cert); + certStore.Close(); + Console.WriteLine("Cert, {0}, is uninstalled.", cert.Thumbprint); + } + catch (Exception e) + { + Console.WriteLine("Error during uninstalling the cert: {0}", e.ToString()); + throw; + } + } + public static X509Certificate2 CreateCertificate(string password, string issuer = "CN=Microsoft Azure Powershell Test", string friendlyName = "PSTest") + { + + var keyCreationParameters = new CngKeyCreationParameters + { + ExportPolicy = CngExportPolicies.AllowExport, + KeyCreationOptions = CngKeyCreationOptions.None, + KeyUsage = CngKeyUsages.AllUsages, + Provider = CngProvider.MicrosoftSoftwareKeyStorageProvider + }; + + keyCreationParameters.Parameters.Add(new CngProperty("Length", BitConverter.GetBytes(2048), CngPropertyOptions.None)); + + CngKey key = CngKey.Create(CngAlgorithm2.Rsa, null, keyCreationParameters); + + var creationParams = new X509CertificateCreationParameters(new X500DistinguishedName(issuer)) + { + TakeOwnershipOfKey = true + }; + + X509Certificate2 cert = key.CreateSelfSignedCertificate(creationParams); + key = null; + cert.FriendlyName = friendlyName; + + byte[] bytes = cert.Export(X509ContentType.Pfx, password); + X509Certificate2 returnCert = new X509Certificate2(); + returnCert.Import(bytes, password, X509KeyStorageFlags.PersistKeySet | X509KeyStorageFlags.Exportable); + return returnCert; + } + + public static SecureString convertToSecureString(string str) + { + SecureString secureStr = new SecureString(); + foreach (char c in str) + { + secureStr.AppendChar(c); + } + return secureStr; + } + + private static void RegisterDllsForRDP() + { + Assert.IsTrue(File.Exists(tclientPath), "{0} does not exist!", tclientPath); + Assert.IsTrue(File.Exists(clxtsharPath), "{0} does not exist!", clxtsharPath); + Assert.IsTrue(File.Exists(RDPTestPath), "{0}, does not exist!", RDPTestPath); + + ExecuteSimpleProcess("regsvr32", "/s " + tclientPath); + ExecuteSimpleProcess("regsvr32", "/s " + clxtsharPath); + } + + public static bool RDPtestPaaS(string dns, string roleName, int instance, string user, string psswrd, bool shouldSucceed) + { + RegisterDllsForRDP(); + + int returnCode = ExecuteSimpleProcess(RDPTestPath, + String.Format("PaaS {0} {1} {2} {3} {4} {5}", dns, roleName, instance.ToString(), user, psswrd, shouldSucceed.ToString())); + if (returnCode == 0) + { + Console.WriteLine("RDP access succeeded."); + return true; + } + else + { + Console.WriteLine("RDP Failed!!"); + return false; + } + } + + public static bool RDPtestIaaS(string dns, int? port, string user, string psswrd, bool shouldSucceed) + { + RegisterDllsForRDP(); + + Console.WriteLine(String.Format("IaaS {0} {1} {2} {3} {4}", dns, port.ToString(), user, psswrd, shouldSucceed.ToString())); + int returnCode = ExecuteSimpleProcess(RDPTestPath, + String.Format("IaaS {0} {1} {2} {3} {4}", dns, port.ToString(), user, psswrd, shouldSucceed.ToString())); + if (returnCode == 0) + { + Console.WriteLine("RDP access succeeded."); + return true; + } + else + { + Console.WriteLine("RDP Failed!!"); + return false; + } + } + + public static int ExecuteSimpleProcess(string fileName, string arguments) + { + Process p = new Process(); + p.StartInfo.FileName = fileName; + p.StartInfo.Arguments = arguments; + p.Start(); + p.WaitForExit(); + return p.ExitCode; + } + + public static string FindSubstring(string givenStr, char givenChar, int i) + { + if (i > 0) + { + return FindSubstring(givenStr.Substring(givenStr.IndexOf(givenChar) + 1), givenChar, i - 1); + } + else + { + return givenStr; + } + } + + public static bool CompareDateTime(DateTime expectedDate, string givenDate) + { + DateTime resultExpDate = DateTime.Parse(givenDate); + bool result = (resultExpDate.Day == expectedDate.Day); + result &= (resultExpDate.Month == expectedDate.Month); + result &= (resultExpDate.Year == expectedDate.Year); + return result; + } + + public static string GetInnerXml(string xmlString, string tag) + { + string removedHeader = "<" + Utilities.FindSubstring(xmlString, '<', 2); + + byte[] encodedString = Encoding.UTF8.GetBytes(xmlString); + MemoryStream stream = new MemoryStream(encodedString); + stream.Flush(); + stream.Position = 0; + + XmlDocument xml = new XmlDocument(); + xml.Load(stream); + return xml.GetElementsByTagName(tag)[0].InnerXml; + } + + public static bool CompareWadCfg(string wadcfg, XmlDocument daconfig) + { + try + { + if (string.IsNullOrWhiteSpace(wadcfg)) + { + Assert.IsNull(wadcfg); + } + else + { + string innerXml = daconfig.InnerXml; + Assert.AreEqual(Utilities.FindSubstring(wadcfg, '<', 2), Utilities.FindSubstring(innerXml, '<', 2)); + } + return true; + } + catch + { + return false; + } + } + + static public string GenerateSasUri(string blobStorageEndpointFormat, string storageAccount, string storageAccountKey, + string blobContainer, string vhdName, int hours = 10, bool read = true, bool write = true, bool delete = true, bool list = true) + { + string destinationSasUri = string.Format(@blobStorageEndpointFormat, storageAccount) + string.Format("/{0}/{1}", blobContainer, vhdName); + var destinationBlob = new CloudPageBlob(new Uri(destinationSasUri), new StorageCredentials(storageAccount, storageAccountKey)); + SharedAccessBlobPermissions permission = 0; + permission |= (read) ? SharedAccessBlobPermissions.Read : 0; + permission |= (write) ? SharedAccessBlobPermissions.Write : 0; + permission |= (delete) ? SharedAccessBlobPermissions.Delete : 0; + permission |= (list) ? SharedAccessBlobPermissions.List : 0; + + var policy = new SharedAccessBlobPolicy() + { + Permissions = permission, + SharedAccessExpiryTime = DateTime.UtcNow + TimeSpan.FromHours(hours) + }; + + string destinationBlobToken = destinationBlob.GetSharedAccessSignature(policy); + return (destinationSasUri + destinationBlobToken); + } + + static public void RecordTimeTaken(ref DateTime prev) + { + var period = DateTime.Now - prev; + Console.WriteLine("{0} minutes {1} seconds and {2} ms passed...", period.Minutes.ToString(), period.Seconds.ToString(), period.Milliseconds.ToString()); + prev = DateTime.Now; + } + + public static void PrintContext(T obj) + { + PrintTypeContents(typeof(T), obj); + } + + public static void PrintContextAndItsBase(T obj) + { + Type type = typeof(T); + PrintTypeContents(type, obj); + PrintTypeContents(type.BaseType, obj); + } + + private static void PrintTypeContents(Type type, T obj) + { + foreach (PropertyInfo property in type.GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly)) + { + string typeName = property.PropertyType.FullName; + if (typeName.Equals("System.String") || typeName.Equals("System.Int32") || typeName.Equals("System.Uri") || + typeName.Contains("Nullable")) + { + Console.WriteLine("{0}: {1}", property.Name, property.GetValue(obj, null)); + } + else if (typeName.Contains("Boolean")) + { + Console.WriteLine("{0}: {1}", property.Name, property.GetValue(obj, null).ToString()); + } + else + { + Console.WriteLine("This type is not printed: {0}", typeName); + } + } + } + + public static void PrintCompleteContext(T obj) + { + Type type = typeof(T); + + foreach (PropertyInfo property in type.GetProperties()) + { + string typeName = property.PropertyType.FullName; + if (typeName.Equals("System.String") || typeName.Equals("System.Int32") || typeName.Equals("System.Uri") || + typeName.Contains("Nullable")) + { + Console.WriteLine("{0}: {1}", property.Name, property.GetValue(obj, null)); + } + else if (typeName.Contains("Boolean")) + { + Console.WriteLine("{0}: {1}", property.Name, property.GetValue(obj, null).ToString()); + } + else + { + Console.WriteLine("This type is not printed: {0}", typeName); + } + } + } + + public static bool validateHttpUri(string uri) + { + Uri uriResult; + return Uri.TryCreate(uri, UriKind.Absolute, out uriResult) && uriResult.Scheme == Uri.UriSchemeHttp; + } + + public static PersistentVM CreateIaaSVMObject(string vmName,InstanceSize size,string imageName,bool isWindows = true,string username = null,string password = null,bool disableGuestAgent = false) + { + //Create an IaaS VM + var azureVMConfigInfo = new AzureVMConfigInfo(vmName, size.ToString(), imageName); + AzureProvisioningConfigInfo azureProvisioningConfig = null; + if (!string.IsNullOrEmpty(username) && !string.IsNullOrEmpty(username)) + { + azureProvisioningConfig = new AzureProvisioningConfigInfo(isWindows ? OS.Windows:OS.Linux, username, password,disableGuestAgent); + } + var persistentVMConfigInfo = new PersistentVMConfigInfo(azureVMConfigInfo, azureProvisioningConfig, null, null); + return vmPowershellCmdlets.GetPersistentVM(persistentVMConfigInfo); + } + + public static void PrintHeader(string title) + { + if (title.Length > 100) + { + Console.WriteLine(string.Format("{0}{1}{0}", "> > >", title)); + } + else + { + int headerLineLength = 100; + Console.WriteLine(); + Console.WriteLine(string.Format("{0}{1}{0}", new String('>', (headerLineLength - title.Length) / 2), title)); + } + } + + public static void PrintFooter(string title) + { + if (title.Length > 100) + { + Console.WriteLine(string.Format("{0}{1}{0}", "< < <", title)); + } + else + { + int headerLineLength = 100; + string completed = ": Completed"; + Console.WriteLine(string.Format("{0}{1}{0}", new String('<', (headerLineLength - (title.Length + completed.Length)) / 2), title + completed)); + } + } + + public static void PrintSeperationLineStart(string title,char seperator) + { + int headerLineLength = 100; + string completed = ": Completed"; + Console.WriteLine(string.Format("{0}{1}{0}", new String(seperator, (headerLineLength - (title.Length + completed.Length)) / 2), title + completed)); + } + public static void PrintSeperationLineEnd(string title,string successMessage, char seperator) + { + int headerLineLength = 100; + Console.WriteLine(string.Format("{0}{1}{0}", new String(seperator, (headerLineLength - (title.Length + successMessage.Length)) / 2), title + successMessage)); + } + + public static string ConvertToJsonArray(string[] values) + { + List files = new List(); + foreach (string s in values) + { + files.Add(string.Format("'{0}'", s)); + } + return string.Join(",", files); + } + + public static string GetSASUri(string blobUrlRoot,string storageAccoutnName,string primaryKey, string container, string filename, TimeSpan persmissionDuration,SharedAccessBlobPermissions permissionType) + { + // Set the destination + string httpsBlobUrlRoot = string.Format("https:{0}", blobUrlRoot.Substring(blobUrlRoot.IndexOf('/'))); + string vhdDestUri = httpsBlobUrlRoot + string.Format("{0}/{1}", container, filename); + + var destinationBlob = new CloudPageBlob(new Uri(vhdDestUri), new StorageCredentials(storageAccoutnName, primaryKey)); + var policy2 = new SharedAccessBlobPolicy() + { + Permissions = permissionType, + SharedAccessExpiryTime = DateTime.UtcNow.Add(persmissionDuration) + }; + var destinationBlobToken2 = destinationBlob.GetSharedAccessSignature(policy2); + vhdDestUri += destinationBlobToken2; + return vhdDestUri; + } + + public static PersistentVM GetAzureVM(string vmName, string serviceName) + { + var vmroleContext = vmPowershellCmdlets.GetAzureVM(vmName, serviceName); + return vmroleContext.VM; + } + + public static void LogAssert(Action method,string actionTitle) + { + Console.Write(actionTitle); + method(); + Console.WriteLine(": verified"); + } + + public static void ExecuteAndLog(Action method,string actionTitle) + { + PrintHeader(actionTitle); + method(); + PrintFooter(actionTitle); + } + + public static VirtualMachineExtensionImageContext GetAzureVMExtenionInfo(string extensionName) + { + List extensionInfo = new List(); + extensionInfo.AddRange(vmPowershellCmdlets.GetAzureVMAvailableExtension()); + return extensionInfo.Find(c => c.ExtensionName.Equals(extensionName)); + } + + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/VMTemplateTests.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/VMTemplateTests.cs new file mode 100644 index 000000000000..d51ceb2ff266 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/VMTemplateTests.cs @@ -0,0 +1,836 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Linq; +using System.Reflection; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests +{ + [TestClass] + public class VMTemplateTests : ServiceManagementTest + { + string serviceName; + string diskLabel1 = "disk1"; + int diskSize1 = 30; + int lunSlot1 = 0; + const string CONSTANT_SPECIALIZED = "Specialized"; + const string CONSTANT_GENERALIZED = "Generalized"; + const string CONSTANT_CATEGORY = "User"; + const string MachineNotReadyState = "VM did not reach one of the Started/Stopped/StoppedDeallocated/Running states."; + HostCaching cahcing = HostCaching.ReadWrite; + string vmImageName; + + [TestInitialize] + public void TestIntialize() + { + testStartTime = DateTime.Now; + pass = false; + cleanupIfPassed = true; + serviceName = Utilities.GetUniqueShortName(serviceNamePrefix); + } + + #region TestCases + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "IaaS"), Priority(0), Owner("hylee"), Description("Test the cmdlets (New-AzureQuickVM,Get-AzureVMImage,New-AzureVM,New-AzureVMConfig,Add-AzureDataDisk,Stop-AzureVM,Save-AzureVMImage,Get-AzureVM,Get-AzureVMImage,i. Remove-AzureVMImage)")] + public void CaptureSpecializedVMAndDeploy() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + string serviceName1 = Utilities.GetUniqueShortName(serviceNamePrefix); + try + { + // a. Deploy a new IaaS VM + string vmName = Utilities.GetUniqueShortName(vmNamePrefix); + Console.WriteLine("--------------------------------Deploying a new IaaS VM :{0}--------------------------------", vmName); + var vm = CreateIaaSVMObjectWithDisk(vmName, InstanceSize.Small, imageName, true, username, password); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, locationName); + Console.WriteLine("--------------------------------Deploying a new IaaS VM :{0} completed.---------------------", vmName); + //b. Stop the VM + Console.WriteLine("--------------------------------Stopping vm :{0}--------------------------------", vmName); + vmPowershellCmdlets.StopAzureVM(vmName, serviceName, force: true); + Console.WriteLine("--------------------------------Stopped vm :{0}--------------------------------", vmName); + //c. Save the VM image + Console.WriteLine("--------------------------------Save the VM image--------------------------------"); + vmImageName = vmName + "Image"; + vmPowershellCmdlets.SaveAzureVMImage(serviceName, vmName, vmImageName, CONSTANT_SPECIALIZED, vmImageName); + Console.WriteLine("--------------------------------Saved VM image with name {0}----------------------"); + //d. Verify the VM image by Get-AzureVMImage + Console.WriteLine("--------------------------------Verify the VM image--------------------------------"); + DataDiskConfigurationList diskConfig = new DataDiskConfigurationList(); + diskConfig.Add(new DataDiskConfiguration() { Lun = lunSlot1, LogicalDiskSizeInGB = diskSize1, HostCaching = cahcing.ToString() }); + VerifyVMImage(vmImageName, OS.Windows, vmImageName, CONSTANT_SPECIALIZED, cahcing, diskConfig); + Console.WriteLine("--------------------------------Verified that the VM image is saved successfully--------------------------------"); + //e. Deploy a new IaaS VM with the save VM image + Console.WriteLine("--------------------------------Deploy a new IaaS VM with the saved VM image {0}--------------------------------", vmImageName); + string vmName1 = Utilities.GetUniqueShortName(vmNamePrefix); + vm = Utilities.CreateIaaSVMObject(vmName1, InstanceSize.Small, vmImageName); + vmPowershellCmdlets.NewAzureVM(serviceName1, new[] { vm }, locationName); + Console.WriteLine("--------------------------------Deployed a IaaS VM {0} with the saved VM image {1}--------------------------------", vmName1, vmImageName); + //f. Verify the VM by Get-AzureVM + Console.WriteLine("--------------------------------Verify the VM by Get-AzureVM--------------------------------", vmName1, vmImageName); + var vmRoleContext = vmPowershellCmdlets.GetAzureVM(vmName1, serviceName1); + Utilities.PrintContext(vmRoleContext); + VerifyVM(vmRoleContext.VM, OS.Windows, HostCaching.ReadWrite, diskSize1, 1); + Console.WriteLine("--------------------------------Verified the VM {0} successfully--------------------------------", vmName1); + //g. Add another IaaS VM with the save VM image to the existing service + string vmName2 = Utilities.GetUniqueShortName(vmNamePrefix); + Console.WriteLine("--------------------------------Deploy a new IaaS VM with the saved VM image {0}--------------------------------", vmImageName); + vmPowershellCmdlets.NewAzureQuickVM(OS.Windows, vmName2, serviceName1, vmImageName); + Console.WriteLine("--------------------------------Deployed a IaaS VM {0} with the saved VM image {1}--------------------------------", vmName2, vmImageName); + //h. Verify the VM by Get-AzureVM + Console.WriteLine("--------------------------------Verify the VM by Get-AzureVM--------------------------------", vmName2, vmImageName); + vmRoleContext = vmPowershellCmdlets.GetAzureVM(vmName2, serviceName1); + VerifyVM(vmRoleContext.VM, OS.Windows, HostCaching.ReadWrite, diskSize1, 1); + Utilities.PrintContext(vmRoleContext); + Console.WriteLine("--------------------------------Verified the VM {0} successfully--------------------------------", vmName2); + + pass = true; + } + catch (Exception ex) + { + Console.WriteLine(ex.ToString()); + throw; + } + finally + { + CleanupService(serviceName1); + // Delete the VM image + Console.WriteLine("------------------------------Delete the VM image---------------------------------"); + DeleteVMImageIfExists(vmImageName); + Console.WriteLine("------------------------------Deleted the VM image---------------------------------"); + } + } + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "IaaS"), Priority(0), Owner("hylee"), Description("Test the cmdlets (New-AzureQuickVM,Get-AzureVMImage,New-AzureVM,New-AzureVMConfig,Add-AzureDataDisk,Stop-AzureVM,Save-AzureVMImage,Get-AzureVM,Get-AzureVMImage,i. Remove-AzureVMImage)")] + public void CaptureGeneralizedVMAndDeploy() + { + string serviceName1 = Utilities.GetUniqueShortName(serviceNamePrefix); + try + { + // a. Deploy a new IaaS VM + string vmName = Utilities.GetUniqueShortName(vmNamePrefix); + Console.WriteLine("--------------------------------Deploying a new IaaS VM :{0}--------------------------------", vmName); + var vm = CreateIaaSVMObjectWithDisk(vmName, InstanceSize.Small, imageName, true, username, password); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, locationName); + Console.WriteLine("--------------------------------Deploying a new IaaS VM :{0} completed.---------------------", vmName); + //b. RDP to the VM and sysprep + + //c. Stop the VM + Console.WriteLine("--------------------------------Stopping vm :{0}--------------------------------", vmName); + vmPowershellCmdlets.StopAzureVM(vmName, serviceName, force: true); + Console.WriteLine("--------------------------------Stopped vm :{0}--------------------------------", vmName); + //d. Save the VM image + Console.WriteLine("--------------------------------Save the VM image as Generalized image --------------------------------"); + vmImageName = vmName + "Image"; + vmPowershellCmdlets.SaveAzureVMImage(serviceName, vmName, vmImageName, CONSTANT_GENERALIZED, vmImageName); + Console.WriteLine("--------------------------------Saved VM image with name {0}----------------------"); + //e. Verify the VM image by Get-AzureVMImage + Console.WriteLine("--------------------------------Verify the VM image--------------------------------"); + DataDiskConfigurationList diskConfig = new DataDiskConfigurationList(); + diskConfig.Add(new DataDiskConfiguration() { Lun = lunSlot1, LogicalDiskSizeInGB = diskSize1, HostCaching = cahcing.ToString() }); + VerifyVMImage(vmImageName, OS.Windows, vmImageName, CONSTANT_GENERALIZED, cahcing, diskConfig); + Console.WriteLine("--------------------------------Verified that the VM image is saved successfully--------------------------------"); + //f. Deploy a new IaaS VM with the save VM image + Console.WriteLine("--------------------------------Deploy a new IaaS VM with the saved VM image {0}--------------------------------", vmImageName); + string vmName1 = Utilities.GetUniqueShortName(vmNamePrefix); + vmPowershellCmdlets.NewAzureQuickVM(OS.Windows, vmName1, serviceName1, vmImageName, username, password, locationName); + Console.WriteLine("--------------------------------Deployed a IaaS VM {0} with the saved VM image {1}--------------------------------", vmName1, vmImageName); + //g. Verify the VM by Get-AzureVM + Console.WriteLine("--------------------------------Verify the VM by Get-AzureVM--------------------------------", vmName1, vmImageName); + var vmRoleContext = vmPowershellCmdlets.GetAzureVM(vmName1, serviceName1); + Utilities.PrintContext(vmRoleContext); + VerifyVM(vmRoleContext.VM, OS.Windows, HostCaching.ReadWrite, diskSize1, 1); + Console.WriteLine("--------------------------------Verified the VM {0} successfully--------------------------------", vmName1); + //h. Add another IaaS VM with the save VM image to the existing service + string vmName2 = Utilities.GetUniqueShortName(vmNamePrefix); + vm = Utilities.CreateIaaSVMObject(vmName2, InstanceSize.Small, vmImageName, true, username, password); + vmPowershellCmdlets.NewAzureVM(serviceName1, new[] { vm }); + //i. Verify the VM by Get-AzureVM + Console.WriteLine("--------------------------------Verify the VM by Get-AzureVM--------------------------------", vmName2, vmImageName); + vmRoleContext = vmPowershellCmdlets.GetAzureVM(vmName2, serviceName1); + Utilities.PrintContext(vmRoleContext); + VerifyVM(vmRoleContext.VM, OS.Windows, HostCaching.ReadWrite, diskSize1, 1); + Console.WriteLine("--------------------------------Verified the VM {0} successfully--------------------------------", vmName2); + pass = true; + } + catch (Exception ex) + { + Console.WriteLine(ex.ToString()); + throw; + } + finally + { + CleanupService(serviceName1); + //Delete the VM image + Console.WriteLine("------------------------------Delete the VM image---------------------------------"); + vmPowershellCmdlets.RemoveAzureVMImage(vmImageName, true); + Console.WriteLine("------------------------------Deleted the VM image---------------------------------"); + } + } + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "IaaS"), Priority(0), Owner("hylee"), Description("Test the cmdlets (New-AzureQuickVM,Get-AzureVMImage,New-AzureVM,New-AzureVMConfig,Add-AzureDataDisk,Stop-AzureVM,Save-AzureVMImage,Get-AzureVM,Get-AzureVMImage,i. Remove-AzureVMImage)")] + public void CaptureSpecializedLinuxVMAndDeploy() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + string serviceName1 = Utilities.GetUniqueShortName(serviceNamePrefix); + string linuxImageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Linux" }, false); + try + { + // a. Deploy a new IaaS VM + string vmName = Utilities.GetUniqueShortName(vmNamePrefix); + Console.WriteLine("--------------------------------Deploying a new IaaS VM :{0}--------------------------------", vmName); + var vm = CreateIaaSVMObjectWithDisk(vmName, InstanceSize.Small, linuxImageName, false, username, password); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, locationName); + Console.WriteLine("--------------------------------Deploying a new IaaS VM :{0} completed.---------------------", vmName); + //b. Stop the VM + Console.WriteLine("--------------------------------Stopping vm :{0}--------------------------------", vmName); + vmPowershellCmdlets.StopAzureVM(vmName, serviceName, force: true); + Console.WriteLine("--------------------------------Stopped vm :{0}--------------------------------", vmName); + //c. Save the VM image + Console.WriteLine("--------------------------------Save the VM image--------------------------------"); + vmImageName = vmName + "Image"; + vmPowershellCmdlets.SaveAzureVMImage(serviceName, vmName, vmImageName, CONSTANT_SPECIALIZED, vmImageName); + Console.WriteLine("--------------------------------Saved VM image with name {0}----------------------"); + //d. Verify the VM image by Get-AzureVMImage + Console.WriteLine("--------------------------------Verify the VM image--------------------------------"); + DataDiskConfigurationList diskConfig = new DataDiskConfigurationList(); + diskConfig.Add(new DataDiskConfiguration() { Lun = lunSlot1, LogicalDiskSizeInGB = diskSize1, HostCaching = cahcing.ToString() }); + VerifyVMImage(vmImageName, OS.Linux, vmImageName, CONSTANT_SPECIALIZED, cahcing, diskConfig); + Console.WriteLine("--------------------------------Verified that the VM image is saved successfully--------------------------------"); + //e. Deploy a new IaaS VM with the save VM image + Console.WriteLine("--------------------------------Deploy a new IaaS VM with the saved VM image {0}--------------------------------", vmImageName); + string vmName1 = Utilities.GetUniqueShortName(vmNamePrefix); + vmPowershellCmdlets.NewAzureQuickVM(OS.Linux, vmName1, serviceName1, vmImageName, null, null, locationName); + Console.WriteLine("--------------------------------Deployed a IaaS VM {0} with the saved VM image {1}--------------------------------", vmName1, vmImageName); + //f. Verify the VM by Get-AzureVM + Console.WriteLine("--------------------------------Verify the VM by Get-AzureVM--------------------------------", vmName1, vmImageName); + var vmRoleContext = vmPowershellCmdlets.GetAzureVM(vmName1, serviceName1); + Utilities.PrintContext(vmRoleContext); + VerifyVM(vmRoleContext.VM, OS.Linux, HostCaching.ReadWrite, diskSize1, 1); + Console.WriteLine("--------------------------------Verified the VM {0} successfully--------------------------------", vmName1); + //g. Add another IaaS VM with the save VM image to the existing service + Console.WriteLine("--------------------------------Deploy a new IaaS VM with the saved VM image {0}--------------------------------", vmImageName); + string vmName2 = Utilities.GetUniqueShortName(vmNamePrefix); + vm = Utilities.CreateIaaSVMObject(vmName2, InstanceSize.Small, vmImageName); + vmPowershellCmdlets.NewAzureVM(serviceName1, new[] { vm }); + Console.WriteLine("--------------------------------Deployed a IaaS VM {0} with the saved VM image {1}--------------------------------", vmName2, vmImageName); + //h. Verify the VM by Get-AzureVM + Console.WriteLine("--------------------------------Verify the VM by Get-AzureVM--------------------------------", vmName2, vmImageName); + vmRoleContext = vmPowershellCmdlets.GetAzureVM(vmName2, serviceName1); + VerifyVM(vmRoleContext.VM, OS.Linux, HostCaching.ReadWrite, diskSize1, 1); + Utilities.PrintContext(vmRoleContext); + Console.WriteLine("--------------------------------Verified the VM {0} successfully--------------------------------", vmName2); + + pass = true; + } + catch (Exception ex) + { + Console.WriteLine(ex.ToString()); + throw; + } + finally + { + CleanupService(serviceName1); + //Delete the VM image + Console.WriteLine("------------------------------Delete the VM image---------------------------------"); + vmPowershellCmdlets.RemoveAzureVMImage(vmImageName, true); + Console.WriteLine("------------------------------Deleted the VM image---------------------------------"); + } + } + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "IaaS"), Priority(0), Owner("hylee"), Description("Test the cmdlets (New-AzureQuickVM,Get-AzureVMImage,New-AzureVM,New-AzureVMConfig,Add-AzureDataDisk,Stop-AzureVM,Save-AzureVMImage,Get-AzureVM,Get-AzureVMImage,i. Remove-AzureVMImage)")] + public void CaptureGeneralizedLinuxVMAndDeploy() + { + string serviceName1 = Utilities.GetUniqueShortName(serviceNamePrefix); + string linuxImageName = vmPowershellCmdlets.GetAzureVMImageName(new[] { "Linux" }, false); + try + { + // a. Deploy a new IaaS VM + string vmName = Utilities.GetUniqueShortName(vmNamePrefix); + Console.WriteLine("--------------------------------Deploying a new IaaS VM :{0} completed.---------------------", vmName); + PersistentVM vm = CreateIaaSVMObjectWithDisk(vmName, InstanceSize.Small, linuxImageName, false, username, password); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, locationName); + Console.WriteLine("--------------------------------Deploying a new IaaS VM :{0} completed.---------------------", vmName); + //b. Stop the VM + Console.WriteLine("--------------------------------Stopping vm :{0}--------------------------------", vmName); + vmPowershellCmdlets.StopAzureVM(vmName, serviceName, force: true); + Console.WriteLine("--------------------------------Stopped vm :{0}--------------------------------", vmName); + //c. Save the VM image + Console.WriteLine("--------------------------------Save the VM image--------------------------------"); + vmImageName = vmName + "Image"; + vmPowershellCmdlets.SaveAzureVMImage(serviceName, vmName, vmImageName, CONSTANT_GENERALIZED, vmImageName); + Console.WriteLine("--------------------------------Saved VM image with name {0}----------------------"); + //d. Verify the VM image by Get-AzureVMImage + Console.WriteLine("--------------------------------Verify the VM image--------------------------------"); + DataDiskConfigurationList diskConfig = new DataDiskConfigurationList(); + diskConfig.Add(new DataDiskConfiguration() { Lun = lunSlot1, LogicalDiskSizeInGB = diskSize1, HostCaching = cahcing.ToString() }); + VerifyVMImage(vmImageName, OS.Linux, vmImageName, CONSTANT_GENERALIZED, cahcing, diskConfig); + Console.WriteLine("--------------------------------Verified that the VM image is saved successfully--------------------------------"); + //e. Deploy a new IaaS VM with the save VM image + Console.WriteLine("--------------------------------Deploy a new IaaS VM with the saved VM image {0}--------------------------------", vmImageName); + string vmName1 = Utilities.GetUniqueShortName(vmNamePrefix); + vm = Utilities.CreateIaaSVMObject(vmName1, InstanceSize.Small, vmImageName, false, username, password); + vmPowershellCmdlets.NewAzureVM(serviceName1, new[] { vm }, locationName); + Console.WriteLine("--------------------------------Deployed a IaaS VM {0} with the saved VM image {1}--------------------------------", vmName1, vmImageName); + //f. Verify the VM by Get-AzureVM + Console.WriteLine("--------------------------------Verify the VM by Get-AzureVM--------------------------------", vmName1, vmImageName); + var vmRoleContext = vmPowershellCmdlets.GetAzureVM(vmName1, serviceName1); + Utilities.PrintContext(vmRoleContext); + Console.WriteLine("--------------------------------Verified the VM {0} successfully--------------------------------", vmName1); + //g. Add another IaaS VM with the save VM image to the existing service + string vmName2 = Utilities.GetUniqueShortName(vmNamePrefix); + Console.WriteLine("--------------------------------Deploy a new IaaS VM with the saved VM image {0}--------------------------------", vmImageName); + vmPowershellCmdlets.NewAzureQuickVM(OS.Linux, vmName2, serviceName1, vmImageName, username, password); + Console.WriteLine("--------------------------------Deployed a IaaS VM {0} with the saved VM image {1}--------------------------------", vmName2, vmImageName); + //h. Verify the VM by Get-AzureVM + Console.WriteLine("--------------------------------Verify the VM by Get-AzureVM--------------------------------", vmName2, vmImageName); + vmRoleContext = vmPowershellCmdlets.GetAzureVM(vmName2, serviceName1); + Utilities.PrintContext(vmRoleContext); + Console.WriteLine("--------------------------------Verified the VM {0} successfully--------------------------------", vmName2); + + pass = true; + } + catch (Exception ex) + { + Console.WriteLine(ex.ToString()); + throw; + } + finally + { + CleanupService(serviceName1); + //Delete the VM image + Console.WriteLine("------------------------------Delete the VM image---------------------------------"); + vmPowershellCmdlets.RemoveAzureVMImage(vmImageName, true); + Console.WriteLine("------------------------------Deleted the VM image---------------------------------"); + } + } + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "IaaS"), Priority(0), Owner("hylee"), Description("Test the cmdlets (New-AzureQuickVM,Get-AzureVMImage,New-AzureVM,New-AzureVMConfig,Add-AzureDataDisk,Stop-AzureVM,Save-AzureVMImage,Get-AzureVM,Get-AzureVMImage,i. Remove-AzureVMImage)")] + [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Resources\\overwrite_VHD.csv", "overwrite_VHD#csv", DataAccessMethod.Sequential)] + public void AzureVMImageListRemoveTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, testStartTime); + string newImageName = Utilities.GetUniqueShortName("vmimage"); + string oldLabel = "old label"; + string newLabel = Utilities.GetUniqueShortName("vmimage"); + string vmName = Utilities.GetUniqueShortName(vmNamePrefix); + string serviceName1 = Utilities.GetUniqueShortName("Pstestsvc"); + + try + { + string mediaLocation = UploadVhdFile(); + Console.WriteLine("------------------------------Add an OS image---------------------------------"); + // a. Add an OS image + var result = vmPowershellCmdlets.AddAzureVMImage(newImageName, mediaLocation, OS.Windows, newImageName); + Console.WriteLine("------------------------------Add an OS image: Completed---------------------------------"); + //b. Deploy a new IaaS VM + Console.WriteLine("------------------------------Deploy a new IaaS VM---------------------------------"); + var vm = CreateIaaSVMObjectWithDisk(vmName, InstanceSize.Small, newImageName, true, username, password); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, locationName); + Console.WriteLine("------------------------------Deploy a new IaaS VM: Completed---------------------------------"); + //c. Stop the VM + Console.WriteLine("------------------------------Stop the VM---------------------------------"); + vmPowershellCmdlets.StopAzureVM(vm, serviceName, true); + Console.WriteLine("------------------------------Stop the VM: Completed---------------------------------"); + //d. Try to save the OS image with an existing os image name. (should fail) + Console.WriteLine("------------------------------Try to save the OS image with an existing os image name---------------------------------"); + Utilities.VerifyFailure(() => vmPowershellCmdlets.SaveAzureVMImage(serviceName, vmName, oldLabel, CONSTANT_SPECIALIZED, oldLabel), BadRequestException); + Console.WriteLine("------------------------------Try to save the OS image with an existing os image name: Completed---------------------------------"); + //e. Save the OS image with a new image name. + Console.WriteLine("------------------------------Save the OS image with a new image name.---------------------------------"); + vmPowershellCmdlets.SaveAzureVMImage(serviceName, vmName, newLabel); + Console.WriteLine("------------------------------Save the OS image with a new image name: Completed---------------------------------"); + //f. Deploy a new IaaS VM + Console.WriteLine("------------------------------Deploy a new IaaS VM---------------------------------"); + string vmName1 = Utilities.GetUniqueShortName(vmNamePrefix); + vm = CreateIaaSVMObjectWithDisk(vmName1, InstanceSize.Small, newLabel, true, username, password); + vmPowershellCmdlets.NewAzureVM(serviceName1, new[] { vm }, locationName); + var vmRoleContext = vmPowershellCmdlets.GetAzureVM(vmName1, serviceName1); + Console.WriteLine("------------------------------Deploy a new IaaS VM: Completed---------------------------------"); + + //g. Stop the VM + Console.WriteLine("------------------------------Stop the VM---------------------------------"); + vmPowershellCmdlets.StopAzureVM(vm, serviceName1, true); + Console.WriteLine("------------------------------Stop the VM: Completed---------------------------------"); + //h. Save the VM image with the existing os image name (should fail) + Console.WriteLine("------------------------------Save the VM image with the existing os image name---------------------------------"); + vmImageName = vmName1 + "Image"; + Utilities.VerifyFailure(() => vmPowershellCmdlets.SaveAzureVMImage(serviceName1, vmName1, newLabel, CONSTANT_SPECIALIZED, vmImageName), "OSImage"); + Console.WriteLine("------------------------------Save the VM image with the existing os image name: Completed---------------------------------"); + //i. List VM Images + //i. Get-AzureVMImage + //VerifyVMImage(vmImageName, OS.Windows, vmImageName, CONSTANT_SPECIALIZED, cahcing, lunSlot1, diskSize1, 1); + Console.WriteLine("------------------------------Get-AzureVMImage---------------------------------"); + VerifyOsImage(newLabel, new OSImageContext() + { + ImageName = newLabel, + Category = CONSTANT_CATEGORY, + Location = locationName, + Label = newLabel, + OS = OS.Windows.ToString() + }); + Console.WriteLine("------------------------------Get-AzureVMImage: Completed---------------------------------"); + //j. Try to remove a wrong vm + Console.WriteLine("------------------------------Try to remove a wrong vm---------------------------------"); + Utilities.VerifyFailure(() => vmPowershellCmdlets.RemoveAzureVMImage(Utilities.GetUniqueShortName()),ResourceNotFoundException); + Console.WriteLine("------------------------------Try to remove a wrong vm: Completed---------------------------------"); + pass = true; + + } + catch (Exception ex) + { + Console.WriteLine(ex.ToString()); + throw; + } + finally + { + //k. Remove the VM Images + DeleteVMImageIfExists(newLabel); + vmPowershellCmdlets.RemoveAzureService(serviceName1); + } + } + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "IaaS"), Priority(1), Owner("hylee"), Description("Test the cmdlets (New-AzureQuickVM,Get-AzureVMImage,New-AzureVM,New-AzureVMConfig,Add-AzureDataDisk,Stop-AzureVM,Save-AzureVMImage,Get-AzureVM,Get-AzureVMImage,i. Remove-AzureVMImage)")] + public void GetAzureVMImageNegativeTest() + { + try + { + cleanupIfPassed = false; + // Try to get a wrong vm image. + Utilities.VerifyFailure(() => vmPowershellCmdlets.GetAzureVMImage(Utilities.GetUniqueShortName(vmNamePrefix)), ResourceNotFoundException); + pass = true; + } + catch (Exception ex) + { + Console.WriteLine(ex.ToString()); + throw; + } + } + + [TestMethod(), Ignore(), TestCategory(Category.Scenario), TestProperty("Feature", "IaaS"), Priority(1), Owner("hylee"), Description("Test the cmdlets (New-AzureQuickVM,Get-AzureVMImage,New-AzureVM,New-AzureVMConfig,Add-AzureDataDisk,Stop-AzureVM,Save-AzureVMImage,Get-AzureVM,Get-AzureVMImage,i. Remove-AzureVMImage)")] + public void RemoveAzureVMImageNegativeTest() + { + try + { + // a. Try to remove a wrong vm image + //i. Remove-AzureVMImage –VMImageName $wrongimgname + //ii. Remove-AzureVMImage –OSImageName $wrongimgname + + //Not Applicable yet as VMImageName,OSImageName parameters are not yet provided. + } + catch (Exception ex) + { + Console.WriteLine(ex.ToString()); + throw; + } + } + + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "IaaS"), Priority(1), Owner("hylee"), Description("Test the cmdlets (New-AzureQuickVM,Get-AzureVMImage,New-AzureVM,New-AzureVMConfig,Add-AzureDataDisk,Stop-AzureVM,Save-AzureVMImage,Get-AzureVM,Get-AzureVMImage,i. Remove-AzureVMImage)")] + public void SaveAzureVMImageNegativeTest() + { + try + { + string vmName = Utilities.GetUniqueShortName(vmNamePrefix); + // Deploy a new IaaS VM + Console.WriteLine("------------------------------Deploy a new IaaS VM---------------------------------"); + var vm = CreateIaaSVMObjectWithDisk(vmName, InstanceSize.Small, imageName, true, username, password); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, locationName); + Console.WriteLine("------------------------------Deploy a new IaaS VM: completed---------------------------------"); + //b. Stop the VM + Console.WriteLine("------------------------------Stop the VM---------------------------------"); + vmPowershellCmdlets.StopAzureVM(vm, serviceName,force:true); + Console.WriteLine("------------------------------Stop the VM: completed---------------------------------"); + //c. Save the VM image + Console.WriteLine("------------------------------Save the VM image---------------------------------"); + vmImageName = vmName + "Image"; + vmPowershellCmdlets.SaveAzureVMImage(serviceName, vmName, vmImageName, CONSTANT_SPECIALIZED,vmImageName); + Console.WriteLine("------------------------------Save the VM image: completed---------------------------------"); + //d. Deploy another new IaaS VM + Console.WriteLine("------------------------------Deploy another new IaaS VM---------------------------------"); + string vmName1 = Utilities.GetUniqueShortName(vmNamePrefix); + vm = CreateIaaSVMObjectWithDisk(vmName1, InstanceSize.Small, imageName, true, username, password); + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }); + Console.WriteLine("------------------------------Deploy another new IaaS VM: completed---------------------------------"); + //e. Stop the VM + Console.WriteLine("------------------------------Deleted the VM image---------------------------------"); + vmPowershellCmdlets.StopAzureVM(vm, serviceName,force:true); + string testImageName = Utilities.GetUniqueShortName(vmNamePrefix); + Console.WriteLine("------------------------------Deleted the VM image---------------------------------"); + //f. Try to save the VM image with the existing name (must fail) + Console.WriteLine("------------------------------Deleted the VM image---------------------------------"); + Utilities.VerifyFailure(() => vmPowershellCmdlets.SaveAzureVMImage(serviceName, vmName1, vmImageName, CONSTANT_SPECIALIZED, vmImageName),ConflictErrorException); + Console.WriteLine("------------------------------Deleted the VM image---------------------------------"); + //g. Try to save the VM image with the wrong vm name (must fail) + Console.WriteLine("------------------------------Deleted the VM image---------------------------------"); + Utilities.VerifyFailure(() => vmPowershellCmdlets.SaveAzureVMImage(serviceName, Utilities.GetUniqueShortName(vmNamePrefix), testImageName, CONSTANT_SPECIALIZED, testImageName), ResourceNotFoundException); + Console.WriteLine("------------------------------Deleted the VM image---------------------------------"); + //h. Try to save the VM image with the wrong service name (must fail) + Console.WriteLine("------------------------------Deleted the VM image---------------------------------"); + string testVMIMage = Utilities.GetUniqueShortName("VMImage"); + vmPowershellCmdlets.SaveAzureVMImage(Utilities.GetUniqueShortName(vmNamePrefix), vmName1, testVMIMage, CONSTANT_SPECIALIZED, testVMIMage); + Utilities.VerifyFailure(() => vmPowershellCmdlets.GetAzureVMImage(testVMIMage),ResourceNotFoundException); + Console.WriteLine("------------------------------Deleted the VM image---------------------------------"); + //i. Try to save the VM image with the label longer than maximum length of string (must fail) + Console.WriteLine("------------------------------Deleted the VM image---------------------------------"); + string LongImageName = Utilities.GetUniqueShortName(length:30) + Utilities.GetUniqueShortName(length:30)+ Guid.NewGuid().ToString() + Guid.NewGuid().ToString() ; + Console.WriteLine("Attempting to save a VMImage with name {0} of {1} characters and expecting it to fail.", LongImageName,LongImageName.Length); + Utilities.VerifyFailure(() => vmPowershellCmdlets.SaveAzureVMImage(serviceName, vmName1, testImageName, CONSTANT_SPECIALIZED, LongImageName), BadRequestException); + Console.WriteLine("------------------------------Deleted the VM image---------------------------------"); + pass = true; + } + catch (Exception ex) + { + Console.WriteLine(ex.ToString()); + throw; + } + finally + { + Console.WriteLine("------------------------------Delete the VM image---------------------------------"); + DeleteVMImageIfExists(vmImageName); + Console.WriteLine("------------------------------Deleted the VM image---------------------------------"); + } + } + + [TestMethod(), TestCategory(Category.Scenario), TestProperty("Feature", "IaaS"), Priority(0), Owner("hylee"), Description("Test the cmdlets (New-AzureQuickVM,Get-AzureVMImage,New-AzureVM,New-AzureVMConfig,Add-AzureDataDisk,Stop-AzureVM,Save-AzureVMImage,Get-AzureVM,Get-AzureVMImage,Remove-AzureVMImage,Update-AzureVMImage)")] + public void UpdateVMImageDataDiskAndOsDiskTest() + { + StartTest(MethodBase.GetCurrentMethod().Name, DateTime.Now); + try + { + //Create a new vmImage with 2 data disks + string vmName = Utilities.GetUniqueShortName(vmNamePrefix); + string disk1 = "Disk1"; + string disk2 = "Disk2"; + HostCaching disk1HostCaching = HostCaching.ReadOnly; + HostCaching disk2HostCaching = HostCaching.None; + + //Creating VM with 2 data disks.; + Utilities.ExecuteAndLog(() => + { + PersistentVM vm = Utilities.CreateIaaSVMObject(vmName, InstanceSize.Small, imageName, true, username, password); + //Attach disk 1 with hostcaching 'Readonly' + AddAzureDataDiskConfig azureDataDiskConfigInfo1 = new AddAzureDataDiskConfig(DiskCreateOption.CreateNew, diskSize1, disk1, 0, disk1HostCaching.ToString()); + azureDataDiskConfigInfo1.Vm = vm; + vm = vmPowershellCmdlets.AddAzureDataDisk(azureDataDiskConfigInfo1); + //Attach disk 2 with hostcaching 'None' + AddAzureDataDiskConfig azureDataDiskConfigInfo2 = new AddAzureDataDiskConfig(DiskCreateOption.CreateNew, diskSize1, disk2, 1, disk2HostCaching.ToString()); + azureDataDiskConfigInfo2.Vm = vm; + vm = vmPowershellCmdlets.AddAzureDataDisk(azureDataDiskConfigInfo2); + //deploy the VM + vmPowershellCmdlets.NewAzureVM(serviceName, new[] { vm }, locationName); + },"Creating VM with 2 data disks."); + + //Save image of the VM as a Specialized vm image. + vmImageName = vmName + "Image"; + Utilities.ExecuteAndLog(() => + { + Utilities.PrintHeader("Save specialized vm image of the deployed vm."); + vmPowershellCmdlets.StopAzureVM(vmPowershellCmdlets.GetAzureVM(vmName, serviceName).VM, serviceName,force:true); + vmPowershellCmdlets.SaveAzureVMImage(serviceName, vmName, vmImageName, "Specialized", vmImageName); + },"Save specialized vm image of the deployed vm."); + + //Verify the saved vm Image + DataDiskConfigurationList diskConfig = new DataDiskConfigurationList(); + Utilities.ExecuteAndLog(() => + { + diskConfig.Add(new DataDiskConfiguration() { Lun = 0, LogicalDiskSizeInGB = diskSize1, HostCaching = disk1HostCaching.ToString() }); + diskConfig.Add(new DataDiskConfiguration() { Lun = 1, LogicalDiskSizeInGB = diskSize1, HostCaching = disk2HostCaching.ToString() }); + VerifyVMImage(vmImageName, OS.Windows, vmImageName, "Specialized", cahcing, diskConfig); + },"Fetch the saved vm image info and verify the vm image info."); + + + UpdateAzureVMImageDetails(vmImageName); + + string disk1Name,disk2Name; + UpdateVMImageOsAndDataDiskAnderifyChanges( diskConfig,out disk1Name,out disk2Name); + + //Update VMImage using DiskConfig set prepared manually. + UpdateVmImageUsingDiskConfigSetAndVerifyChanges(diskConfig, disk1Name, disk2Name); + pass = true; + } + catch (Exception ex) + { + Console.WriteLine(ex.ToString()); + throw ex; + } + + } + + private void UpdateVmImageUsingDiskConfigSetAndVerifyChanges(DataDiskConfigurationList diskConfig, string disk1Name, string disk2Name) + { + cahcing = GetAlternateHostCachingForOsDisk(cahcing.ToString()); + Utilities.PrintHeader("Update Azure VM image data disk 1 hostcaching to ReadOnly, data disk 2 hostcaching to None and OS disk host cahching to" + cahcing.ToString()); + var diskConfigSet = vmPowershellCmdlets.NewAzureVMImageDiskConfigSet(); + diskConfigSet.OSDiskConfiguration = new OSDiskConfiguration() { HostCaching = cahcing.ToString() }; + diskConfigSet.DataDiskConfigurations = new DataDiskConfigurationList(); + diskConfigSet.DataDiskConfigurations.Add(new DataDiskConfiguration() + { + Name = disk1Name, + HostCaching = HostCaching.ReadOnly.ToString(), + Lun = 0 + }); + diskConfigSet.DataDiskConfigurations.Add(new DataDiskConfiguration() + { + Name = disk2Name, + HostCaching = HostCaching.None.ToString(), + Lun = 1 + }); + //update Azure VM image. + vmPowershellCmdlets.UpdateAzureVMImage(vmImageName, vmImageName, diskConfigSet); + Utilities.PrintFooter(string.Format("Update Azure VM image data disk 1 hostcaching to ReadWrite, data disk 2 hostcaching to ReadOnly and OS disk host cahching to {0}. ", cahcing.ToString())); + + // Verify that the vm image disk 1 host caching is "ReadWrite". + Utilities.PrintHeader("Verify that the vm image."); + diskConfig[0].HostCaching = diskConfigSet.DataDiskConfigurations[0].HostCaching.ToString(); + diskConfig[1].HostCaching = diskConfigSet.DataDiskConfigurations[1].HostCaching.ToString(); + VerifyVMImage(vmImageName, OS.Windows, vmImageName, "Specialized", cahcing, diskConfig); + Utilities.PrintFooter("Verify that the vm image."); + } + + private void UpdateVMImageOsAndDataDiskAnderifyChanges( DataDiskConfigurationList diskConfig, out string disk1Name,out string disk2Name) + { + //Update Azure VM image disk 1 hostcaching to read write + cahcing = GetAlternateHostCachingForOsDisk(cahcing.ToString()); + Utilities.PrintHeader(string.Format("Update Azure VM image data disk 1 hostcaching to ReadWrite, data disk 2 hostcaching to ReadOnly and OS disk host cahching to {0}. ", cahcing.ToString())); + var vmImageContext = vmPowershellCmdlets.GetAzureVMImageReturningVMImages(vmImageName); + Utilities.PrintCompleteContext(vmImageContext); + var vmImageInfo = vmImageContext[0]; + disk1Name = vmImageInfo.DataDiskConfigurations[0].Name; + disk2Name = vmImageInfo.DataDiskConfigurations[1].Name; + var disk1HostCaching = HostCaching.ReadWrite; + var disk2HostCaching = HostCaching.ReadOnly; + // get disk 1 configuration from vm image + var diskConfigSet = vmPowershellCmdlets.GetAzureVMImageDiskConfigSet(vmImageInfo); + // set disk1 host caching to read write + diskConfigSet = vmPowershellCmdlets.SetAzureVMImageDataDiskConfig(diskConfigSet, disk1Name, 0, disk1HostCaching.ToString()); + //set disk 2 host caching to None + diskConfigSet = vmPowershellCmdlets.SetAzureVMImageDataDiskConfig(diskConfigSet, disk2Name, 1, disk2HostCaching.ToString()); + // set os disk host caching to a differnt value. + diskConfigSet = vmPowershellCmdlets.SetAzureVMImageOSDiskConfig(diskConfigSet, cahcing.ToString()); + //update Azure VM image. + vmPowershellCmdlets.UpdateAzureVMImage(vmImageName, vmImageName, diskConfigSet); + Utilities.PrintFooter(string.Format("Update Azure VM image data disk 1 hostcaching to ReadWrite, data disk 2 hostcaching to ReadOnly and OS disk host cahching to {0}. ", cahcing.ToString())); + + // Verify that the vm image disk 1 host caching is "ReadWrite". + Utilities.PrintHeader("Verify the vm image."); + diskConfig[0].HostCaching = disk1HostCaching.ToString(); + diskConfig[1].HostCaching = disk2HostCaching.ToString(); + VerifyVMImage(vmImageName, OS.Windows, vmImageName, "Specialized", cahcing, diskConfig); + Utilities.PrintFooter("Verify the vm image."); + } + + private void UpdateAzureVMImageDetails(string imageName) + { + VMImageContext imageContext = new VMImageContext() + { + Eula = "End user licensce agreement value", + ImageFamily = OS.Windows.ToString(), + Description = "Description", + IconUri = new Uri(@"http://www.bing.com"), + ImageName = imageName, + Label = imageName, + Language = "English", + PrivacyUri = new Uri(@"http://www.bing.com"), + PublishedDate = DateTime.Now, + RecommendedVMSize = InstanceSize.Medium.ToString(), + ShowInGui = false, + SmallIconUri = new Uri(@"http://www.bing.com"), + }; + + Utilities.ExecuteAndLog(() => + { + vmPowershellCmdlets.UpdateAzureVMImage(imageName, imageName, imageContext.ImageFamily, imageContext.ShowInGui.Value, imageContext.RecommendedVMSize, imageContext.Description, imageContext.Eula, + imageContext.PrivacyUri, imageContext.PublishedDate, imageContext.Language, imageContext.IconUri, imageContext.SmallIconUri); + }, "Update Azure VM Image details"); + + VerifyVMImageProperties(imageContext); + } + + private void VerifyVMImageProperties(VMImageContext imageContext) + { + Utilities.ExecuteAndLog(() => + { + var vmImages = vmPowershellCmdlets.GetAzureVMImageReturningVMImages(imageContext.ImageName); + var vmImageContext = vmImages[0]; + + Utilities.PrintContext(vmImageContext); + + Console.WriteLine("\n Verification:"); + Utilities.LogAssert(() => Assert.AreEqual(imageContext.Eula, vmImageContext.Eula), "Eula"); + Utilities.LogAssert(() => Assert.AreEqual(imageContext.Description, vmImageContext.Description), "Description"); + Utilities.LogAssert(() => Assert.AreEqual(imageContext.IconUri, vmImageContext.IconUri), "IconUri"); + Utilities.LogAssert(() => Assert.AreEqual(imageContext.ImageFamily, vmImageContext.ImageFamily), "ImageFamily"); + Utilities.LogAssert(() => Assert.AreEqual(imageContext.ImageName, vmImageContext.ImageName), "ImageName"); + Utilities.LogAssert(() => Assert.AreEqual(imageContext.Label, vmImageContext.Label), "Label"); + Utilities.LogAssert(() => Assert.AreEqual(imageContext.Language, vmImageContext.Language), "Language"); + Utilities.LogAssert(() => Assert.AreEqual(imageContext.PrivacyUri, vmImageContext.PrivacyUri), "PrivacyUri"); + Utilities.LogAssert(() => Assert.IsTrue(imageContext.PublishedDate.Value.Date.Equals(vmImageContext.PublishedDate.Value.Date)), "PublishedDate"); + Utilities.LogAssert(() => Assert.AreEqual(imageContext.RecommendedVMSize, vmImageContext.RecommendedVMSize), "RecommendedVMSize"); + Utilities.LogAssert(() => Assert.AreEqual(imageContext.ShowInGui, vmImageContext.ShowInGui), "ShowInGui"); + Utilities.LogAssert(() => Assert.AreEqual(imageContext.SmallIconUri, vmImageContext.SmallIconUri), "SmallIconUri"); + }, "Verify VM image details"); + } + + + #endregion TestCases + + [TestCleanup] + public void TestCleanUp() + { + if (cleanupIfPassed) + CleanupService(serviceName); + } + + [ClassCleanup] + public static void ClassCleanup() + { + } + #region Helper Methods + public void VerifyVMImage(string vmImageName, OS ImageFamily, string imageLabel, string osState, HostCaching hostCaching, DataDiskConfigurationList diskConfigs) + { + var vmImages = vmPowershellCmdlets.GetAzureVMImageReturningVMImages(vmImageName); + Assert.IsTrue(vmImages.Count >= 1); + var vmImageInfo = vmImages[0]; + Utilities.PrintContext(vmImageInfo); + Utilities.PrintContext(vmImageInfo.OSDiskConfiguration); + foreach (var disk in vmImageInfo.DataDiskConfigurations) + { + Utilities.PrintContext(disk); + } + //Verify ImageName + Assert.IsTrue(vmImageName.Equals(vmImageInfo.ImageName)); + Assert.IsTrue(vmImageInfo.Label.Equals(imageLabel)); + //Verify Category + Assert.IsTrue("User".Equals(vmImageInfo.Category, StringComparison.CurrentCultureIgnoreCase)); + //Verify LogicalDiskSizeInGB, HostCaching + Assert.AreEqual(hostCaching.ToString(), vmImageInfo.OSDiskConfiguration.HostCaching, "Property HostCaching is not matching."); + //Verify the no of the data disks + Assert.AreEqual(diskConfigs.Count, vmImageInfo.DataDiskConfigurations.Count); + //Verify Data disks. + VerifyDataDiskConfiguration(diskConfigs, vmImageInfo); + //Verify OSstate + Assert.AreEqual(osState, vmImageInfo.OSDiskConfiguration.OSState, "OsState is not matching."); + //Verify OS + Assert.AreEqual(ImageFamily.ToString(), vmImageInfo.OSDiskConfiguration.OS, "Os Family is not matching."); + } + + private void VerifyDataDiskConfiguration(DataDiskConfigurationList dataDiskConfigs, VMImageContext vmImageInfo) + { + try + { + for (int i = 0; i < dataDiskConfigs.Count; i++) + { + Assert.AreEqual(dataDiskConfigs[i].HostCaching.ToString(), vmImageInfo.DataDiskConfigurations[i].HostCaching, "Data disk HostCaching iproperty is not matching."); + //Verify LogicalDiskSizeInGB, + Assert.AreEqual(dataDiskConfigs[i].LogicalDiskSizeInGB, vmImageInfo.DataDiskConfigurations[i].LogicalDiskSizeInGB); + //Verify LUN + Assert.AreEqual(dataDiskConfigs[i].Lun, vmImageInfo.DataDiskConfigurations[i].Lun); + } + } + catch (Exception ex) + { + Console.WriteLine(ex.ToString()); + throw ex; + } + } + + public void VerifyOsImage(string ImageName, OSImageContext imageContext) + { + var vmImage = vmPowershellCmdlets.GetAzureVMImage(ImageName); + Utilities.PrintContext(vmImage[0]); + Assert.AreEqual(imageContext.ImageName, vmImage[0].ImageName, "ImageName property of the saved os image is not matching."); + Assert.AreEqual(imageContext.Category, vmImage[0].Category, "Category property of the saved os image is not matching."); + Assert.AreEqual(imageContext.Location, vmImage[0].Location, "Location property of the saved os image is not matching."); + Assert.AreEqual(imageContext.Label, vmImage[0].Label, "Label property of the saved os image is not matching."); + Assert.AreEqual(imageContext.OS, vmImage[0].OS, "OS property of the saved os image is not matching."); + } + + + public PersistentVM CreateIaaSVMObjectWithDisk(string vmName, InstanceSize size, string imageName, bool isWindows, string username, string password) + { + PersistentVM vm = Utilities.CreateIaaSVMObject(vmName, InstanceSize.Small, imageName, isWindows, username, password); + AddAzureDataDiskConfig azureDataDiskConfigInfo1 = new AddAzureDataDiskConfig(DiskCreateOption.CreateNew, diskSize1, diskLabel1, lunSlot1,cahcing.ToString()); + azureDataDiskConfigInfo1.Vm = vm; + return vmPowershellCmdlets.AddAzureDataDisk(azureDataDiskConfigInfo1); + } + + public void DeleteVMImageIfExists(string vmImageName) + { + try + { + var vmImages = vmPowershellCmdlets.GetAzureVMImage(vmImageName); + if (vmImages.Count > 0) + { + vmPowershellCmdlets.RemoveAzureVMImage(vmImageName, true); + } + } + catch (Exception) + { + /*GetAzureVMImage throws image if it doesnt not find any vm images with the given name. + Since it is an expected behaviour we cathc the exception here.*/ + } + + + } + + public void VerifyVM(PersistentVM vm, OS ImageFamily, HostCaching hostCaching, int LogicalDiskSizeInGB, int noOfDataDisks) + { + //Verify OS Disk + Console.WriteLine("VM OS Virtual Hard Disk properties:"); + Utilities.PrintContext(vm.OSVirtualHardDisk); + Assert.AreEqual(HostCaching.ReadWrite.ToString(), vm.OSVirtualHardDisk.HostCaching, "Os disk Property HostCaching is not matching."); + Assert.AreEqual(ImageFamily.ToString(), vm.OSVirtualHardDisk.OS,"ImageFamily property is not matching."); + //Verify Data Disk + Console.WriteLine("VM Data Hard Disk properties:"); + Utilities.PrintContext(vm.DataVirtualHardDisks[0]); + Assert.AreEqual(hostCaching.ToString(), vm.DataVirtualHardDisks[0].HostCaching, "Data disk Property HostCaching is not matching."); + Assert.AreEqual(LogicalDiskSizeInGB, vm.DataVirtualHardDisks[0].LogicalDiskSizeInGB,"Data disk size is not matching."); + Assert.AreEqual(noOfDataDisks, vm.DataVirtualHardDisks.Count, "Data disks count is not matching."); + } + + + private HostCaching GetAlternateHostCachingForOsDisk(string currentValue) + { + return currentValue.Equals(HostCaching.ReadOnly.ToString()) ? HostCaching.ReadWrite : HostCaching.ReadOnly; + } + + /// + /// Waits for the VM to reach Started / Stopped / StoppedDeallocated state. + /// + /// + /// + private void WaitForVmStartedState(string vmName, string serviceName) + { + PersistentVMRoleContext vm = null; + //vmPowershellCmdlets.GetAzureVM(vmName,serviceName); + Utilities.RetryActionUntilSuccess(() => + { + Console.WriteLine("Fetching VM status"); + vm = vmPowershellCmdlets.GetAzureVM(vmName, serviceName); + if (!new[] { "Started", "Stopped", "StoppedDealocated", "Running" }.Contains(vm.Status)) + { + Console.WriteLine("VM status :{0}, ", vm.Status); + throw new Exception(MachineNotReadyState); + } + Console.WriteLine(" Exiting wait as VM reached {0}, ", vm.Status); + }, MachineNotReadyState, 20, 5); + } + #endregion Helper Methods + + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/Verifiers.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/Verifiers.cs new file mode 100644 index 000000000000..a1cb49cbda0a --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/Verifiers.cs @@ -0,0 +1,407 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Reflection; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests.ConfigDataInfo; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests +{ + public class Verify : ServiceManagementTest + { + /// + /// + /// + /// + /// + /// + internal static bool AzureAvailabilitySet(PersistentVM vm, string availabilitySetName) + { + try + { + if (string.IsNullOrEmpty(vm.AvailabilitySetName)) + { + Assert.IsTrue(string.IsNullOrEmpty(availabilitySetName)); + } + else + { + Assert.IsTrue(vm.AvailabilitySetName.Equals(availabilitySetName, StringComparison.InvariantCultureIgnoreCase)); + } + return true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + if (e is AssertFailedException) + { + return false; + } + else + { + throw; + } + } + } + + /// + /// + /// + /// + /// + /// + /// + /// + internal static bool AzureCertificate(string svc, string expThumbprint, string expAlgorithm, string expData) + { + try + { + CertificateContext result = vmPowershellCmdlets.GetAzureCertificate(svc)[0]; + + Assert.AreEqual(expThumbprint, result.Thumbprint); + Assert.AreEqual(expAlgorithm, result.ThumbprintAlgorithm); + Assert.AreEqual(expData, result.Data); + Assert.AreEqual(svc, result.ServiceName); + //Assert.AreEqual(expUrl, result.Url); + return true; + } + + catch (Exception e) + { + Console.WriteLine(e.ToString()); + return false; + } + } + + /// + /// + /// + /// + /// + /// + /// + /// + /// + internal static bool AzureDataDisk(PersistentVM vm, string expLabel, int expSize, int expLun, HostCaching hc) + { + bool found = false; + foreach (DataVirtualHardDisk disk in vmPowershellCmdlets.GetAzureDataDisk(vm)) + { + if (CheckDataDisk(disk, expLabel, expSize, expLun, hc)) + { + found = true; + break; + } + } + return found; + } + + private static bool CheckDataDisk(DataVirtualHardDisk disk, string expLabel, int expSize, int expLun, HostCaching hc) + { + Console.WriteLine("DataDisk - Name:{0}, Label:{1}, Size:{2}, LUN:{3}, HostCaching: {4}", + disk.DiskName, disk.DiskLabel, disk.LogicalDiskSizeInGB, disk.Lun, disk.HostCaching); + + try + { + Assert.AreEqual(expLabel, disk.DiskLabel); + Assert.AreEqual(expSize, disk.LogicalDiskSizeInGB); + Assert.AreEqual(expLun, disk.Lun); + if (disk.HostCaching == null && hc == HostCaching.None || disk.HostCaching == hc.ToString()) + { + Console.WriteLine("DataDisk found: {0}", disk.DiskLabel); + } + else + { + Assert.Fail("HostCaching is not matched!"); + } + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + if (e is AssertFailedException) + { + return false; + } + else + { + throw; + } + } + return true; + } + + /// + /// + /// + /// + /// + /// + internal static bool AzureDns(DnsSettings resultSettings, DnsServer expDns) + { + try + { + DnsServerList dnsList = vmPowershellCmdlets.GetAzureDns(resultSettings); + foreach (DnsServer dnsServer in dnsList) + { + Console.WriteLine("DNS Server Name: {0}, DNS Server Address: {1}", dnsServer.Name, dnsServer.Address); + if (MatchDns(expDns, dnsServer)) + { + Console.WriteLine("Matched Dns found!"); + return true; + } + } + return false; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + throw; + } + } + + private static bool MatchDns(DnsServer expDns, DnsServer actualDns) + { + try + { + Assert.AreEqual(expDns.Name, actualDns.Name); + Assert.AreEqual(expDns.Address, actualDns.Address); + return true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + if (e is AssertFailedException) + { + return false; + } + else + { + throw; + } + } + } + + /// + /// + /// + /// + /// + /// + internal static bool AzureEndpoint(PersistentVM vm, AzureEndPointConfigInfo[] epInfos) + { + try + { + var serverEndpoints = vmPowershellCmdlets.GetAzureEndPoint(vm); + + // List the endpoints found for debugging. + Console.WriteLine("***** Checking for Endpoints **************************************************"); + Console.WriteLine("***** Listing Returned Endpoints"); + foreach (InputEndpointContext ep in serverEndpoints) + { + Console.WriteLine("Endpoint - Name:{0} Protocol:{1} Port:{2} LocalPort:{3} Vip:{4}", ep.Name, ep.Protocol, ep.Port, ep.LocalPort, ep.Vip); + + if (!string.IsNullOrEmpty(ep.LBSetName)) + { + Console.WriteLine("\t- LBSetName:{0}", ep.LBSetName); + Console.WriteLine("\t- Probe - Port:{0} Protocol:{1} Interval:{2} Timeout:{3}", ep.ProbePort, ep.ProbeProtocol, ep.ProbeIntervalInSeconds, ep.ProbeTimeoutInSeconds); + } + } + + Console.WriteLine("*******************************************************************************"); + + // Check if the specified endpoints were found. + foreach (AzureEndPointConfigInfo epInfo in epInfos) + { + bool found = false; + + foreach (InputEndpointContext ep in serverEndpoints) + { + if (epInfo.CheckInputEndpointContext(ep)) + { + found = true; + Console.WriteLine("Endpoint found: {0}", epInfo.EndpointName); + break; + } + } + Assert.IsTrue(found, string.Format("Error: Endpoint '{0}' was not found!", epInfo.EndpointName)); + } + return true; + } + + catch (Exception e) + { + Console.WriteLine(e.ToString()); + return false; + } + } + + /// + /// + /// + /// + /// + /// + /// + internal static bool AzureOsDisk(PersistentVM vm, string expOS, HostCaching expHC) + { + try + { + OSVirtualHardDisk osdisk = vmPowershellCmdlets.GetAzureOSDisk(vm); + Console.WriteLine("OS Disk: Name - {0}, Label - {1}, HostCaching - {2}, OS - {3}", osdisk.DiskName, osdisk.DiskLabel, osdisk.HostCaching, osdisk.OS); + Assert.IsTrue(osdisk.Equals(vm.OSVirtualHardDisk), "OS disk returned is not the same!"); + Assert.AreEqual(expOS, osdisk.OS); + Assert.AreEqual(expHC.ToString(), osdisk.HostCaching); + return true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + if (e is AssertFailedException) + { + return false; + } + else + { + throw; + } + } + } + + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + internal static bool AzureService(string svc, string expLabel, string expLocation = "West US", string expAff = null, string expDescription = null, string expStatus = "Created") + { + try + { + HostedServiceDetailedContext result = vmPowershellCmdlets.GetAzureService(svc); + + Assert.AreEqual(expLabel, result.Label); + Assert.AreEqual(expDescription, result.Description); + Assert.AreEqual(expAff, result.AffinityGroup); + Assert.AreEqual(expLocation, result.Location); + Assert.AreEqual(expStatus, result.Status); + Assert.AreEqual(svc, result.ServiceName); + //Assert.AreEqual(expDateCreated, result.DateCreated); + //Assert.AreEqual(expDateModified, result.DateModified); + //Assert.AreEqual(expUrl, result.Url); + return true; + } + + catch (Exception e) + { + Console.WriteLine(e.ToString()); + return false; + } + } + + internal static bool AzureAclConfig(NetworkAclObject expectedAcl, NetworkAclObject actualAcl) + { + for (int i = 0; i < expectedAcl.Rules.Count; i++) + { + Assert.IsTrue(CompareContext(expectedAcl.Rules[i], actualAcl.Rules[i])); + } + return true; + } + + internal static bool AzureReservedIP(ReservedIPContext rsvIP, string name, string label, string affname, + string ip, string dep, string svcName, string id) + { + Utilities.PrintContext(rsvIP); + Assert.AreEqual(name, rsvIP.ReservedIPName, "Reserved IP names are not equal!"); + Assert.AreEqual(label, rsvIP.Label, "Reserved IP labels are not equal!"); + Assert.AreEqual(affname, rsvIP.Location, "Reserved IP affinity groups are not equal!"); + if (!string.IsNullOrEmpty(ip)) + { + Assert.AreEqual(ip, rsvIP.Address, "Reserved IP addresses are not equal!"); + } + Assert.AreEqual(dep, rsvIP.DeploymentName, "Reserved IP deployment names are not equal!"); + Assert.AreEqual(svcName, rsvIP.ServiceName, "Reserved IP service names are not equal!"); + if (!string.IsNullOrEmpty(id)) + { + Assert.AreEqual(id, rsvIP.Id, "Reserved IP IDs are not equal!"); + } + return true; + } + + internal static bool AzureReservedIPNotInUse(ReservedIPContext rsvIP, string name, string label, string affname, + string id = null) + { + AzureReservedIP(rsvIP, name, label, affname, null, null, null, id); + Assert.AreEqual(false, rsvIP.InUse); + return true; + } + + internal static bool AzureReservedIPInUse(ReservedIPContext rsvIP, string name, string label, string affname, + string ip = null, string deploymentName =null, string svcName = null) + { + AzureReservedIP(rsvIP, name, label, affname, ip, deploymentName, svcName, null); + Assert.AreEqual(true, rsvIP.InUse); + return true; + } + + + + private static bool CompareContext(T obj1, T obj2) + { + bool result = true; + Type type = typeof(T); + + foreach (PropertyInfo property in type.GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly)) + { + string typeName = property.PropertyType.FullName; + if (typeName.Equals("System.String") || typeName.Equals("System.Int32") || typeName.Equals("System.Uri") || typeName.Contains("Nullable")) + { + if (typeName.Contains("System.DateTime")) + { + continue; + } + + var obj1Value = property.GetValue(obj1, null); + var obj2Value = property.GetValue(obj2, null); + Console.WriteLine("Expected: {0}", obj1Value); + Console.WriteLine("Acutal: {0}", obj2Value); + + if (obj1Value == null) + { + result &= (obj2Value == null); + } + else if (typeName.Contains("System.String")) + { + result &= (string.Compare(obj1Value.ToString(), obj2Value.ToString(), StringComparison.CurrentCultureIgnoreCase) == 0); + } + else + { + result &= (obj1Value.Equals(obj2Value)); + } + } + else + { + Console.WriteLine("This type is not compared: {0}", typeName); + } + } + return result; + } + + + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/MSSharedLibKey.snk b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/MSSharedLibKey.snk differ diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Microsoft.WindowsAzure.Management.ServiceManagement.dll b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Microsoft.WindowsAzure.Management.ServiceManagement.dll new file mode 100644 index 000000000000..69eff997dd0c Binary files /dev/null and b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Microsoft.WindowsAzure.Management.ServiceManagement.dll differ diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Properties/AssemblyInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..898818530d79 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Properties/AssemblyInfo.cs @@ -0,0 +1,42 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Management.ServiceManagement.Test")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct("Management.ServiceManagement.Test")] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("66799e11-440a-48ff-b158-c351e2efa845")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] +[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] +#if SIGN +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.ScenarioTest, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +#else +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.ScenarioTest")] +#endif + diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Properties/Resource.Designer.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Properties/Resource.Designer.cs new file mode 100644 index 000000000000..e1f483fb1a20 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Properties/Resource.Designer.cs @@ -0,0 +1,135 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34011 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resource { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resource() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.WindowsAzure.Commands.ServiceManagement.Test.Properties.Resource", typeof(Resource).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string BlobKey { + get { + return ResourceManager.GetString("BlobKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string BlobUrl { + get { + return ResourceManager.GetString("BlobUrl", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string DefaultStorageAccountName { + get { + return ResourceManager.GetString("DefaultStorageAccountName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string DefaultSubscriptionName { + get { + return ResourceManager.GetString("DefaultSubscriptionName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string Location { + get { + return ResourceManager.GetString("Location", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string PublishSettingsFile { + get { + return ResourceManager.GetString("PublishSettingsFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to UseDefaults. + /// + internal static string TestSettings { + get { + return ResourceManager.GetString("TestSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string Vhd { + get { + return ResourceManager.GetString("Vhd", resourceCulture); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Properties/Resource.resx b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Properties/Resource.resx new file mode 100644 index 000000000000..738b26681853 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Properties/Resource.resx @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + + + Path to your publishsettings file + + + + Subscription name to use in testing + + + + Key for the blob + + + + A blob Url for a publish settings file and a local vhd + + + + + + UseDefaults + UseDefaults for using the default settings, UseDefaultsandOverride for overriding few variables and UseCustom for your own personal test settings + + + + Default StorageAccount Name for the subscription + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/CustomData.bin b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/CustomData.bin new file mode 100644 index 000000000000..35fb3d00135b --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/CustomData.bin @@ -0,0 +1 @@ +Test Custom Data \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/DSC/DscExtensionTestConfiguration.ps1 b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/DSC/DscExtensionTestConfiguration.ps1 new file mode 100644 index 000000000000..2a8895155b99 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/DSC/DscExtensionTestConfiguration.ps1 @@ -0,0 +1,33 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +configuration DscExtensionTestConfiguration +{ + [CmdletBinding()] + param( + [Parameter(Mandatory=$true, Position=0, ValueFromPipeline=$true)] + [string] + $destinationPath + ) + + Node $AllNodes.Where{$_.Role -eq "TestNode"}.NodeName + { + File MyDirectory + { + Type = 'Directory' + DestinationPath = $destinationPath + Ensure = "Present" + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/DSC/DscExtensionTestConfigurationData.psd1 b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/DSC/DscExtensionTestConfigurationData.psd1 new file mode 100644 index 000000000000..f394d6e55a02 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/DSC/DscExtensionTestConfigurationData.psd1 @@ -0,0 +1,22 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +@{ + AllNodes = @( + @{ + NodeName = "localhost"; + Role = "TestNode" + } + ); +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/HelloNoDiag.cscfg b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/HelloNoDiag.cscfg new file mode 100644 index 000000000000..d20303b264fb --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/HelloNoDiag.cscfg @@ -0,0 +1,15 @@ + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/OneWebOneWorker.cscfg b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/OneWebOneWorker.cscfg new file mode 100644 index 000000000000..61dfe6b046dc --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/OneWebOneWorker.cscfg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/OneWebOneWorkerRDP.cscfg b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/OneWebOneWorkerRDP.cscfg new file mode 100644 index 000000000000..ed39944e8020 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/OneWebOneWorkerRDP.cscfg @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/PrivateConfig.xml b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/PrivateConfig.xml new file mode 100644 index 000000000000..631cb02842dd --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/PrivateConfig.xml @@ -0,0 +1 @@ + p@ssw0rd \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/PublicConfig.xml b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/PublicConfig.xml new file mode 100644 index 000000000000..3838a8779531 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/PublicConfig.xml @@ -0,0 +1 @@ +dileep \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/RDPTest.exe b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/RDPTest.exe new file mode 100644 index 000000000000..b172b0ba3c98 Binary files /dev/null and b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/RDPTest.exe differ diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/SampleAppV1.cscfg b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/SampleAppV1.cscfg new file mode 100644 index 000000000000..853a685f0c29 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/SampleAppV1.cscfg @@ -0,0 +1,18 @@ + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/SampleAppV2.cscfg b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/SampleAppV2.cscfg new file mode 100644 index 000000000000..b4a6fba6aff6 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/SampleAppV2.cscfg @@ -0,0 +1,18 @@ + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/SampleAppV3.cscfg b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/SampleAppV3.cscfg new file mode 100644 index 000000000000..f00d1bd8add3 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/SampleAppV3.cscfg @@ -0,0 +1,18 @@ + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/StaticCAvnetconfig.netcfg b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/StaticCAvnetconfig.netcfg new file mode 100644 index 000000000000..e945ac593021 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/StaticCAvnetconfig.netcfg @@ -0,0 +1,86 @@ + + + + + + + + + + + + 157.59.34.0/28 + + 157.59.34.62 + + + + + + 10.0.0.0/9 + + + + 10.0.0.0/11 + + + 10.32.0.0/11 + + + 10.64.0.0/29 + + + + + + + + + + + + + + 172.16.0.0/20 + + + + 172.16.0.0/23 + + + 172.16.2.0/29 + + + + + + + + + + + + + + 192.168.0.0/20 + + + + 192.168.0.0/23 + + + 192.168.2.0/29 + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/VmAccessExtensionConfiguration.xml b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/VmAccessExtensionConfiguration.xml new file mode 100644 index 000000000000..97b2eef8048e --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/VmAccessExtensionConfiguration.xml @@ -0,0 +1,12 @@ + + true + + + + dileep + p@ss0wrd + + + + + diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/VnetconfigWithLocation.netcfg b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/VnetconfigWithLocation.netcfg new file mode 100644 index 000000000000..2ef28bdc49c3 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/VnetconfigWithLocation.netcfg @@ -0,0 +1,86 @@ + + + + + + + + + + + + 157.59.34.0/28 + + 157.59.34.62 + + + + + + 10.0.0.0/8 + + + + 10.0.0.0/11 + + + 10.32.0.0/11 + + + 10.64.0.0/29 + + + + + + + + + + + + + + 172.16.0.0/20 + + + + 172.16.0.0/23 + + + 172.16.2.0/29 + + + + + + + + + + + + + + 192.168.0.0/20 + + + + 192.168.0.0/23 + + + 192.168.2.0/29 + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/affinityGroupData.csv b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/affinityGroupData.csv new file mode 100644 index 000000000000..3ea59965f633 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/affinityGroupData.csv @@ -0,0 +1,2 @@ +affinityName1,affinityLabel1,location1,description1,affinityName2,affinityLabel2,location2,description2 +affinityName1,affinityName1,West US,Affinity group for West US,affinityName2,label2,East US,Affinity group for East US \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/certificateData.csv b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/certificateData.csv new file mode 100644 index 000000000000..53e4bfd231ef --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/certificateData.csv @@ -0,0 +1,2 @@ +cerFileName,pfxFileName,password,algorithm +pstestcert.cer,pstestcert.pfx,p@ssw0rd,sha1 \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/cloudinittest.sh b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/cloudinittest.sh new file mode 100644 index 000000000000..577d59209bd8 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/cloudinittest.sh @@ -0,0 +1,2 @@ +#!/bin/bash +echo Testing123... > /tmp/testing.txt diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/clxtshar.dll b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/clxtshar.dll new file mode 100644 index 000000000000..84647d9b5525 Binary files /dev/null and b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/clxtshar.dll differ diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/da.xml b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/da.xml new file mode 100644 index 000000000000..6a7ac70b669b --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/da.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/download_VHD.csv b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/download_VHD.csv new file mode 100644 index 000000000000..37891e3ec126 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/download_VHD.csv @@ -0,0 +1,2 @@ +vhdBlobLocation,vhdLocalPath +vhdstore/temp.vhd,.\temp.vhd \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/nodiagpackage.csv b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/nodiagpackage.csv new file mode 100644 index 000000000000..720fe8c0aa36 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/nodiagpackage.csv @@ -0,0 +1,2 @@ +packageName,configName +HelloNoDiag.cspkg,HelloNoDiag.cscfg diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/overwrite_VHD.csv b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/overwrite_VHD.csv new file mode 100644 index 000000000000..502476d75b96 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/overwrite_VHD.csv @@ -0,0 +1,2 @@ +Size,vhdName,vhdBlobName,md5hash +50MB,dynamic_50.vhd,vhdstore/$guid$.vhd,Cc4UKKQx+ggpvIqx4Y2WxQ== \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/package.csv b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/package.csv new file mode 100644 index 000000000000..ce890d6bfbbb --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/package.csv @@ -0,0 +1,2 @@ +packageName,configName,upgradePackage,upgradeConfig,upgradeConfig2 +SampleAppV1.cspkg,SampleAppV1.cscfg,SampleAppV2.cspkg,SampleAppV2.cscfg,SampleAppV3.cscfg diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/packageADDomain.csv b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/packageADDomain.csv new file mode 100644 index 000000000000..ddc5e1e5df43 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/packageADDomain.csv @@ -0,0 +1,2 @@ +packageName,configName,rdpCertName +OneWebOneWorkerRDP.cspkg,OneWebOneWorkerRDP.cscfg,rdpcert.pfx diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/packageScenario.csv b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/packageScenario.csv new file mode 100644 index 000000000000..a4b0e5ce02c4 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/packageScenario.csv @@ -0,0 +1,2 @@ +path, packageName,configName,upgradePackage,upgradeConfig,upgradeConfig2 +.\, OneWebOneWorker.cspkg,OneWebOneWorker.cscfg,SampleAppV2.cspkg,SampleAppV2.cscfg,SampleAppV3.cscfg \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/patch_VHD.csv b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/patch_VHD.csv new file mode 100644 index 000000000000..78ca79a0603c --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/patch_VHD.csv @@ -0,0 +1,2 @@ +vhdName,baseImage,childvhdBlobName,basevhdBlobName,NoOfTimes,MD5hash,MD5hashBase +fixed_50_child01.vhd,fixed_50.vhd,vhdstore/$guid$.vhd,vhdstore/$guid$.vhd,1,7VPoBzInrqpZFdaNr9DEtA==,lX67MyV6qURNTCWHDyg8Uw== diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/rdpcert.pfx b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/rdpcert.pfx new file mode 100644 index 000000000000..a3790990dd5d Binary files /dev/null and b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/rdpcert.pfx differ diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/resume_VHD.csv b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/resume_VHD.csv new file mode 100644 index 000000000000..3df33dd54eca --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/resume_VHD.csv @@ -0,0 +1,2 @@ +vhdName,vhdBlobName,NoOfTimes,md5hash +fixed_50.vhd,vhdstore/$guid$.vhd,1,lX67MyV6qURNTCWHDyg8Uw== \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/storageAccountTestData.csv b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/storageAccountTestData.csv new file mode 100644 index 000000000000..7e090198d1a8 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/storageAccountTestData.csv @@ -0,0 +1,2 @@ +NamePrefix,Location1,Location2,AffinityGroupName,Label1,Label2,Label3,Description1,Description2,Description3 +psteststorage,West US,East US,AffGroup,label1,1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890,%,description1,1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234, \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/tclient.dll b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/tclient.dll new file mode 100644 index 000000000000..c864e148aede Binary files /dev/null and b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/tclient.dll differ diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/tclientmanagedex.dll b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/tclientmanagedex.dll new file mode 100644 index 000000000000..71973ae54a1f Binary files /dev/null and b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/tclientmanagedex.dll differ diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/test1.ps1 b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/test1.ps1 new file mode 100644 index 000000000000..a731c933ec6d --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/test1.ps1 @@ -0,0 +1 @@ +Set-Content -Path 'C:\test1.txt' -Value 'test1' \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/test2.ps1 b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/test2.ps1 new file mode 100644 index 000000000000..412ac2732902 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/test2.ps1 @@ -0,0 +1 @@ +Set-Content -Path 'C:\test2.txt' -Value 'test2' \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/thread_VHD.csv b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/thread_VHD.csv new file mode 100644 index 000000000000..b7eed8c12347 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/thread_VHD.csv @@ -0,0 +1,2 @@ +Size,vhdName,vhdBlobName,type,md5hash +50MB,dynamic_50.vhd,vhdstore/$guid$.vhd,dynamic,Cc4UKKQx+ggpvIqx4Y2WxQ== \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/upload_VHD.csv b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/upload_VHD.csv new file mode 100644 index 000000000000..63a850f3d4ea --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/upload_VHD.csv @@ -0,0 +1,7 @@ +Size,vhdName,vhdBlobName,type,md5hash +50MB,dynamic_50.vhd,vhdstore/$guid$.vhd,dynamic,Cc4UKKQx+ggpvIqx4Y2WxQ== +50MB,dynamic_50_child01.vhd,vhdstore/$guid$.vhd,diff,b9+NUodTwPLQSVzBr6e4kA== +50MB,dynamic_50_child02.vhd,vhdstore/$guid$.vhd,diff,UCW28a3cwPYrauvHsiGutA== +50MB,fixed_50.vhd,vhdstore/$guid$.vhd,fixed,lX67MyV6qURNTCWHDyg8Uw== +50MB,fixed_50_child01.vhd,vhdstore/$guid$.vhd,diff,7VPoBzInrqpZFdaNr9DEtA== +50MB,fixed_50_child02.vhd,vhdstore/$guid$.vhd,diff,VjlKD6vJXUsbQTVy8Bydjg== \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/vnetconfig.netcfg b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/vnetconfig.netcfg new file mode 100644 index 000000000000..60c90129a644 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/vnetconfig.netcfg @@ -0,0 +1,86 @@ + + + + + + + + + + + + 157.59.34.0/28 + + 157.59.34.62 + + + + + + 10.0.0.0/8 + + + + 10.0.0.0/11 + + + 10.32.0.0/11 + + + 10.64.0.0/29 + + + + + + + + + + + + + + 172.16.0.0/20 + + + + 172.16.0.0/23 + + + 172.16.2.0/29 + + + + + + + + + + + + + + 192.168.0.0/20 + + + + 192.168.0.0/23 + + + 192.168.2.0/29 + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/wrongPara_VHD.csv b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/wrongPara_VHD.csv new file mode 100644 index 000000000000..8181309688c6 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Resources/wrongPara_VHD.csv @@ -0,0 +1,8 @@ +vhdBlobLocation,vhdLocalPath,numThread,storageKey +vhdstore/doesnotexist.vhd,.\temp.vhd,, +doesnotexiststore/temp.vhd,.\temp.vhd,, +vhdstore/temp.vhd,.\wronglocaldirectoryname\temp.vhd,, +vhdstore/temp.vhd,.\temp.vhd,1000, +vhdstore/temp.vhd,.\temp.vhd,0, +vhdstore/temp.vhd,.\temp.vhd,,wrongstoragekeystring +vhdstore/temp.vhd,.\temp.vhd,,Uvm+nmYRXkgyGP7+egQHeoOsyAKUd+tU27E9PE2+1Haq2pcxFW0oYr/EATIotarM7Q22lKtiQgYGyEC7dHdutP== \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/UnitTests/Cmdlets/IaaS/Extensions/GetAzureVMChefExtensionCommandTests.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/UnitTests/Cmdlets/IaaS/Extensions/GetAzureVMChefExtensionCommandTests.cs new file mode 100644 index 000000000000..8b7ea0b84a0b --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/UnitTests/Cmdlets/IaaS/Extensions/GetAzureVMChefExtensionCommandTests.cs @@ -0,0 +1,84 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Utilities; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.UnitTests.Cmdlets.IaaS.Extensions +{ + public class MockIPersistentVMForChefExtension : IPersistentVM + { + public PersistentVM GetInstance() + { + ResourceExtensionReference extensionRef = null; + extensionRef = new ResourceExtensionReference() + { + Name = "ChefClient", + Publisher = "Chef.Bootstrap.WindowsAzure,", + Version = "11.0" + }; + + var resourceList = new ResourceExtensionReferenceList(); + resourceList.Add(extensionRef); + + return new PersistentVM() + { + ResourceExtensionReferences = resourceList, + OSVirtualHardDisk = new OSVirtualHardDisk() { OS = "Windows" } + }; + } + } + + [TestClass] + public class GetAzureVMChefExtensionCommandTests : TestBase + { + private MockCommandRuntime mockCommandRuntime; + private MockIPersistentVMForChefExtension mockIPersistentVM; + [TestInitialize] + public void SetupTest() + { + mockCommandRuntime = new MockCommandRuntime(); + mockIPersistentVM = new MockIPersistentVMForChefExtension(); + } + + [TestCleanup] + public void CleanupTest() + { + } + public class GetAzureVMChefExtensionCommandStub : GetAzureVMChefExtensionCommand + { + public GetAzureVMChefExtensionCommandStub() { } + } + + [TestMethod] + public void GetAzureVMChefExtensionExecuteChefCommand() + { + var getChefExtension = new GetAzureVMChefExtensionCommandStub() + { + CommandRuntime = mockCommandRuntime, + VM = mockIPersistentVM + }; + + getChefExtension.ExecuteCommand(); + + Assert.AreEqual(1, mockCommandRuntime.OutputPipeline.Count, "One item should be in the output pipeline"); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/UnitTests/Cmdlets/IaaS/Extensions/RemoveAzureVMChefExtensionCommandTests.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/UnitTests/Cmdlets/IaaS/Extensions/RemoveAzureVMChefExtensionCommandTests.cs new file mode 100644 index 000000000000..9b938f1d1831 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/UnitTests/Cmdlets/IaaS/Extensions/RemoveAzureVMChefExtensionCommandTests.cs @@ -0,0 +1,61 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Utilities; +using System.Management.Automation; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.UnitTests.Cmdlets.IaaS.Extensions +{ + + [TestClass] + public class RemoveAzureVMChefExtensionCommandTests : TestBase + { + private MockCommandRuntime mockCommandRuntime; + private MockIPersistentVMForChefExtension mockIPersistentVM; + [TestInitialize] + public void SetupTest() + { + mockCommandRuntime = new MockCommandRuntime(); + mockIPersistentVM = new MockIPersistentVMForChefExtension(); + } + + [TestCleanup] + public void CleanupTest() + { + } + public class RemoveAzureVMChefExtensionCommandStub : RemoveAzureVMChefExtensionCommand + { + public RemoveAzureVMChefExtensionCommandStub() { } + } + + [TestMethod] + public void RemoveAzureVMChefExtensionExecuteChefCommand() + { + + var getChefExtension = new RemoveAzureVMChefExtensionCommandStub() + { + CommandRuntime = mockCommandRuntime, + VM = mockIPersistentVM, + }; + + getChefExtension.ExecuteCommand(); + Assert.AreEqual(1, mockCommandRuntime.OutputPipeline.Count, "One item should be in the output pipeline"); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/UnitTests/Cmdlets/IaaS/Extensions/SetAzureVMChefExtensionCommandTests.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/UnitTests/Cmdlets/IaaS/Extensions/SetAzureVMChefExtensionCommandTests.cs new file mode 100644 index 000000000000..5e842d0eafd5 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/UnitTests/Cmdlets/IaaS/Extensions/SetAzureVMChefExtensionCommandTests.cs @@ -0,0 +1,120 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using System.IO; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Utilities; +using System.Management.Automation; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.UnitTests.Cmdlets.IaaS.Extensions +{ + + [TestClass] + public class SetAzureVMChefExtensionCommandTests : TestBase + { + private MockCommandRuntime mockCommandRuntime; + private MockIPersistentVMForChefExtension mockIPersistentVM; + private string tmpfile = Path.GetTempFileName(); + + [TestInitialize] + public void SetupTest() + { + mockCommandRuntime = new MockCommandRuntime(); + mockIPersistentVM = new MockIPersistentVMForChefExtension(); + } + + [TestCleanup] + public void CleanupTest() + { + File.Delete(tmpfile); + } + + public class SetAzureVMChefExtensionCommandStub : SetAzureVMChefExtensionCommand + { + public SetAzureVMChefExtensionCommandStub() { } + } + + [TestMethod] + public void SetAzureVMChefExtensionExecuteChefCommand() + { + var setChefExtension = new SetAzureVMChefExtensionCommandStub() + { + CommandRuntime = mockCommandRuntime, + VM = mockIPersistentVM, + Version = "11.10", + ValidationPem = tmpfile, + ClientRb = tmpfile + }; + + setChefExtension.ExecuteCommand(); + Assert.AreEqual(1, mockCommandRuntime.OutputPipeline.Count, "One item should be in the output pipeline"); + } + + [TestMethod] + [ExpectedException(typeof(ArgumentException), + "Required -ClientRb or -ChefServerUrl and -ValidationClientName options.")] + public void SetAzureVMChefExtensionValidateMissingClientRBAndChefServerUrlOrValidationClientName() + { + var setChefExtension = new SetAzureVMChefExtensionCommandStub() + { + CommandRuntime = mockCommandRuntime, + VM = mockIPersistentVM, + Version = "11.10", + ValidationPem = tmpfile + }; + + setChefExtension.ExecuteCommand(); + } + + [TestMethod] + [ExpectedException(typeof(ArgumentException), + "Required -ClientRb or -ChefServerUrl and -ValidationClientName options.")] + public void SetAzureVMChefExtensionValidateGivenValidationClientNameAndMissingChefServerUrl() + { + var setChefExtension = new SetAzureVMChefExtensionCommandStub() + { + CommandRuntime = mockCommandRuntime, + VM = mockIPersistentVM, + Version = "11.10", + ValidationPem = tmpfile, + ValidationClientName = "testClient" + + }; + + setChefExtension.ExecuteCommand(); + } + + [TestMethod] + [ExpectedException(typeof(ArgumentException), + "Required -ClientRb or -ChefServerUrl and -ValidationClientName options.")] + public void SetAzureVMChefExtensionValidateGivenChefServerUrlAndMissingChefValidationClientName() + { + var setChefExtension = new SetAzureVMChefExtensionCommandStub() + { + CommandRuntime = mockCommandRuntime, + VM = mockIPersistentVM, + Version = "11.10", + ValidationPem = tmpfile, + ChefServerUrl = "https://testchefserverurl/testorg/" + + }; + + setChefExtension.ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/UnitTests/Cmdlets/IaaS/Extensions/VirtualMachineExtensionImageFactoryTests.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/UnitTests/Cmdlets/IaaS/Extensions/VirtualMachineExtensionImageFactoryTests.cs new file mode 100644 index 000000000000..cead68e0b852 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/UnitTests/Cmdlets/IaaS/Extensions/VirtualMachineExtensionImageFactoryTests.cs @@ -0,0 +1,144 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute; +using Microsoft.WindowsAzure.Management.Compute.Models; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.UnitTests.Cmdlets.IaaS.Extensions +{ + [TestClass] + public class VirtualMachineExtensionImageFactoryTests : TestBase + { + private const string nonExistingPublisherName = "nonExistingPublisherName"; + private const string nonExistingExtensionName = "nonExistingExtensionName"; + private const string testPublisherName = "testPublisherName"; + private const string testExtensionName = "testExtensionName"; + + private Mock client; + + [TestInitialize] + public void SetupTest() + { + var source = new TaskCompletionSource(); + source.SetResult( + new VirtualMachineExtensionListResponse + { + ResourceExtensions = new List( + Enumerable.Repeat(new VirtualMachineExtensionListResponse.ResourceExtension + { + Publisher = testPublisherName, + Name = testExtensionName + }, 1)) + }); + + var emptySource = new TaskCompletionSource(); + emptySource.SetResult( + new VirtualMachineExtensionListResponse + { + ResourceExtensions = new List() + }); + + var operations = new Mock(); + operations.Setup(f => f.ListVersionsAsync(It.IsAny(), It.IsAny(), CancellationToken.None)) + .Returns( + (s, t, k) => string.Equals(s, testPublisherName, StringComparison.OrdinalIgnoreCase) + && string.Equals(t, testExtensionName, StringComparison.OrdinalIgnoreCase) + ? source.Task + : emptySource.Task); + + client = new Mock(); + client.Setup(f => f.VirtualMachineExtensions) + .Returns(operations.Object); + } + + [TestCleanup] + public void CleanupTest() + { + } + + [TestMethod] + [TestCategory(Category.Functional)] + public void TestNonExistingExtensionImageList() + { + var factory = new VirtualMachineExtensionImageFactory(client.Object); + + var list = factory.MakeList( + nonExistingPublisherName, + nonExistingExtensionName, + "1.*"); + + Assert.IsTrue(!list.Any()); + } + + [TestMethod] + [TestCategory(Category.Functional)] + public void TestMakeListWithoutClient() + { + var factory = new VirtualMachineExtensionImageFactory(null); + + var list = factory.MakeList( + testPublisherName, + testExtensionName, + "1.*"); + + Assert.IsTrue(!list.Any()); + } + + [TestMethod] + [TestCategory(Category.Functional)] + public void TestMakeListWithClient() + { + var factory = new VirtualMachineExtensionImageFactory(client.Object); + + var list = factory.MakeList( + testPublisherName, + testExtensionName, + "1.*"); + + Assert.IsTrue(list.Count() == 1); + + var item = list[0]; + + Assert.AreEqual( + item.Publisher, + testPublisherName, + true, + string.Empty); + + Assert.AreEqual( + item.Name, + testExtensionName, + true, + string.Empty); + + Assert.IsTrue(!string.IsNullOrEmpty(item.ReferenceName)); + + Assert.IsTrue(item.ResourceExtensionParameterValues == null + || !item.ResourceExtensionParameterValues.Any()); + + Assert.IsTrue(string.IsNullOrEmpty(item.State)); + + Assert.IsTrue(item.Version.Equals("1.*")); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/lib/Security.Cryptography.dll b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/lib/Security.Cryptography.dll new file mode 100644 index 000000000000..d19198541fe0 Binary files /dev/null and b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/lib/Security.Cryptography.dll differ diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/packages.config b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/packages.config new file mode 100644 index 000000000000..d23e9867f5d8 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement.Test/packages.config @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/AffinityGroups/GetAzureAffinityGroup.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/AffinityGroups/GetAzureAffinityGroup.cs new file mode 100644 index 000000000000..6a29b89d92d7 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/AffinityGroups/GetAzureAffinityGroup.cs @@ -0,0 +1,64 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.AffinityGroups +{ + /// + /// List the properties for the specified affinity group. + /// + [Cmdlet(VerbsCommon.Get, "AzureAffinityGroup"), OutputType(typeof(AffinityGroupContext))] + public class GetAzureAffinityGroup : ServiceManagementBaseCmdlet + { + [Parameter(Position = 0, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Affinity Group name")] + [ValidateNotNullOrEmpty] + public string Name + { + get; + set; + } + + internal void ExecuteCommand() + { + OnProcessRecord(); + } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + + if (this.Name != null) + { + ExecuteClientActionNewSM(null, + CommandRuntime.ToString(), + () => this.ManagementClient.AffinityGroups.Get(this.Name), + (s, affinityGroup) => (new int[1]).Select(i => ContextFactory(affinityGroup, s)) + ); + } + else + { + ExecuteClientActionNewSM(null, + CommandRuntime.ToString(), + () => this.ManagementClient.AffinityGroups.List(), + (s, affinityGroups) => affinityGroups.AffinityGroups.Select(ag => ContextFactory(ag, s)) + ); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/AffinityGroups/NewAzureAffinityGroup.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/AffinityGroups/NewAzureAffinityGroup.cs new file mode 100644 index 000000000000..dad4f06d3115 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/AffinityGroups/NewAzureAffinityGroup.cs @@ -0,0 +1,100 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.AffinityGroups +{ + /// + /// Creates and returns a new affinity group in the specified data center location. + /// + [Cmdlet(VerbsCommon.New, "AzureAffinityGroup"), OutputType(typeof(ManagementOperationContext))] + public class NewAzureAffinityGroup : ServiceManagementBaseCmdlet + { + /// + /// A name for the affinity group that is unique to the subscription. (Required) + /// + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the affinity group.")] + [ValidateNotNullOrEmpty] + public string Name + { + get; + set; + } + + /// + /// A label for the affinity group. The label may be up to 100 characters in length. (Required) + /// + [Parameter(HelpMessage = "Label of the affinity group.")] + [ValidateNotNullOrEmpty] + [ValidateLength(1, 100)] + public string Label + { + get; + set; + } + + /// + /// A description for the affinity group. The description may be up to 1024 characters in length. (Optional) + /// + [Parameter(HelpMessage = "Description of the affinity group.")] + [ValidateLength(0, 1024)] + public string Description + { + get; + set; + } + + /// + /// Required. The location where the affinity group will be created. To list available locations, use the List Locations operation. + /// + [Parameter(Mandatory = true, HelpMessage = "Location of the affinity group.")] + [ValidateNotNullOrEmpty] + public string Location + { + get; + set; + } + + public void ExecuteCommand() + { + ServiceManagementProfile.Initialize(); + + if (string.IsNullOrEmpty(Label)) + { + Label = Name; + } + + var input = new AffinityGroupCreateParameters + { + Description = this.Description, + Label = this.Label, + Location = this.Location, + Name = this.Name + }; + + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.ManagementClient.AffinityGroups.Create(input)); + } + + protected override void OnProcessRecord() + { + this.ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/AffinityGroups/RemoveAzureAffinityGroup.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/AffinityGroups/RemoveAzureAffinityGroup.cs new file mode 100644 index 000000000000..c0b81b546976 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/AffinityGroups/RemoveAzureAffinityGroup.cs @@ -0,0 +1,49 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.AffinityGroups +{ + /// + /// Deletes an affinity group. + /// + [Cmdlet(VerbsCommon.Remove, "AzureAffinityGroup"), OutputType(typeof(ManagementOperationContext))] + public class RemoveAzureAffinityGroup : ServiceManagementBaseCmdlet + { + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Affinity Group name.")] + [ValidateNotNullOrEmpty] + public string Name + { + get; + set; + } + + internal void ExecuteCommand() + { + ServiceManagementProfile.Initialize(); + + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.ManagementClient.AffinityGroups.Delete(this.Name)); + } + + protected override void OnProcessRecord() + { + ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/AffinityGroups/SetAzureAffinityGroup.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/AffinityGroups/SetAzureAffinityGroup.cs new file mode 100644 index 000000000000..867e6e9ab66c --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/AffinityGroups/SetAzureAffinityGroup.cs @@ -0,0 +1,78 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.AffinityGroups +{ + /// + /// Updates the label and/or the description for an affinity group for the specified subscription. + /// + [Cmdlet(VerbsCommon.Set, "AzureAffinityGroup"), OutputType(typeof(ManagementOperationContext))] + public class SetAzureAffinityGroup : ServiceManagementBaseCmdlet + { + /// + /// The name for the affinity group. (Required) + /// + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the affinity group.")] + [ValidateNotNullOrEmpty] + public string Name + { + get; + set; + } + + /// + /// A label for the affinity group. The label may be up to 100 characters in length. (Required) + /// + [Parameter(Mandatory = true, HelpMessage = "Label of the affinity group.")] + [ValidateNotNullOrEmpty] + [ValidateLength(1, 100)] + public string Label + { + get; + set; + } + + /// + /// A description for the affinity group. The description may be up to 1024 characters in length. (Optional) + /// + [Parameter(HelpMessage = "Description of the affinity group.")] + [ValidateLength(0, 1024)] + public string Description + { + get; + set; + } + + internal void ExecuteCommand() + { + ServiceManagementProfile.Initialize(); + + var parameters = new AffinityGroupUpdateParameters + { + Label = this.Label, + Description = this.Description ?? null + }; + ExecuteClientActionNewSM(null, CommandRuntime.ToString(), () => this.ManagementClient.AffinityGroups.Update(this.Name, parameters)); + } + + protected override void OnProcessRecord() + { + this.ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Certificates/AddAzureCertificate.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Certificates/AddAzureCertificate.cs new file mode 100644 index 000000000000..3ce2f72ec8ef --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Certificates/AddAzureCertificate.cs @@ -0,0 +1,96 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using System.Security.Cryptography.X509Certificates; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Certificates +{ + /// + /// Upload a service certificate for the specified hosted service. + /// + [Cmdlet(VerbsCommon.Add, "AzureCertificate"), OutputType(typeof(ManagementOperationContext))] + public class AddAzureCertificate : ServiceManagementBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Hosted Service Name.")] + [ValidateNotNullOrEmpty] + public string ServiceName + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = true, HelpMessage = "Certificate to deploy.")] + [ValidateNotNullOrEmpty] + public object CertToDeploy + { + get; + set; + } + + [Parameter(HelpMessage = "Certificate password.")] + public string Password + { + get; + set; + } + + internal void ExecuteCommand() + { + Password = Password ?? string.Empty; + + var certData = GetCertificateData(); + + var parameters = new ServiceCertificateCreateParameters + { + Data = certData, + Password = Password, + CertificateFormat = CertificateFormat.Pfx + }; + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.ComputeClient.ServiceCertificates.Create(this.ServiceName, parameters)); + } + + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + this.ExecuteCommand(); + } + + private byte[] GetCertificateData() + { + if ((CertToDeploy is PSObject) && ((PSObject)CertToDeploy).ImmediateBaseObject is X509Certificate2) + { + var cert = ((PSObject)CertToDeploy).ImmediateBaseObject as X509Certificate2; + return CertUtilsNewSM.GetCertificateData(cert); + } + else if (CertToDeploy is X509Certificate2) + { + return CertUtilsNewSM.GetCertificateData(CertToDeploy as X509Certificate2); + } + else + { + var certPath = this.ResolvePath(CertToDeploy.ToString()); + return CertUtilsNewSM.GetCertificateData(certPath, Password); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Certificates/GetAzureCertificate.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Certificates/GetAzureCertificate.cs new file mode 100644 index 000000000000..c4ecb0c24c3a --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Certificates/GetAzureCertificate.cs @@ -0,0 +1,98 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Certificates +{ + /// + /// Retrieve a specified service certificate. + /// + [Cmdlet(VerbsCommon.Get, "AzureCertificate"), OutputType(typeof(CertificateContext))] + public class GetAzureCertificate : ServiceManagementBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Hosted Service Name.")] + [ValidateNotNullOrEmpty] + public string ServiceName + { + get; + set; + } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Certificate thumbprint algorithm.")] + [ValidateNotNullOrEmpty] + public string ThumbprintAlgorithm + { + get; + set; + } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Certificate thumbprint.")] + [ValidateNotNullOrEmpty] + public string Thumbprint + { + get; + set; + } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + + if (this.Thumbprint != null) + { + if (this.ThumbprintAlgorithm == null) + { + throw new ArgumentNullException("ThumbprintAlgorithm", Resources.MissingThumbprintAlgorithm); + } + + var parameters = new ServiceCertificateGetParameters + { + ServiceName = ServiceName, + Thumbprint = Thumbprint, + ThumbprintAlgorithm = ThumbprintAlgorithm + }; + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.ComputeClient.ServiceCertificates.Get(parameters), + (s, response) => new int[1].Select(i => ContextFactory(response, s))); + } + else + { + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.ComputeClient.ServiceCertificates.List(this.ServiceName), + (s, response) => response.Certificates.Select(c => + { + var context = ContextFactory(c, s); + context.ServiceName = this.ServiceName; + return context; + })); + } + } + + public void ExecuteCommand() + { + OnProcessRecord(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Certificates/RemoveAzureCertificate.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Certificates/RemoveAzureCertificate.cs new file mode 100644 index 000000000000..0005061093db --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Certificates/RemoveAzureCertificate.cs @@ -0,0 +1,71 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Certificates +{ + /// + /// Deletes the specified certificate. + /// + [Cmdlet(VerbsCommon.Remove, "AzureCertificate"), OutputType(typeof(ManagementOperationContext))] + public class RemoveAzureCertificate : ServiceManagementBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Hosted Service Name.")] + [ValidateNotNullOrEmpty] + public string ServiceName + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Certificate thumbprint algorithm.")] + [ValidateNotNullOrEmpty] + public string ThumbprintAlgorithm + { + get; + set; + } + + [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Certificate thumbprint.")] + [ValidateNotNullOrEmpty] + public string Thumbprint + { + get; + set; + } + + internal void ExecuteCommand() + { + var parameters = new ServiceCertificateDeleteParameters + { + ServiceName = ServiceName, + Thumbprint = Thumbprint, + ThumbprintAlgorithm = ThumbprintAlgorithm + }; + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.ComputeClient.ServiceCertificates.Delete(parameters)); + } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + this.ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Commands.ServiceManagement.csproj b/src/ServiceManagement/Compute/Commands.ServiceManagement/Commands.ServiceManagement.csproj new file mode 100644 index 000000000000..377c84f3517b --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Commands.ServiceManagement.csproj @@ -0,0 +1,542 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {E1CA72BA-8374-45F6-904D-FD34ECDF5B6F} + Library + Properties + Microsoft.WindowsAzure.Commands.ServiceManagement + Microsoft.WindowsAzure.Commands.ServiceManagement + v4.5 + 512 + + ..\..\..\ + true + /assemblyCompareMode:StrongNameIgnoringVersion + + + true + full + false + ..\..\..\Package\Debug\ServiceManagement\Azure\Compute + DEBUG;TRACE + prompt + 4 + true + true + true + false + + + OnBuildSuccess + + + ..\..\..\Package\Release\ServiceManagement\Azure\Compute + TRACE;SIGN + true + pdbonly + AnyCPU + bin\Release\Management.ServiceManagement.dll.CodeAnalysisLog.xml + true + GlobalSuppressions.cs + prompt + MinimumRecommendedRules.ruleset + ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets + ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules + true + MSSharedLibKey.snk + true + true + false + + + + False + ..\..\..\packages\AutoMapper.3.1.1\lib\net40\AutoMapper.dll + + + False + ..\..\..\packages\AutoMapper.3.1.1\lib\net40\AutoMapper.Net4.dll + + + ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll + + + ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll + + + ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.2.1.0\lib\net40\Microsoft.WindowsAzure.Management.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.6.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Network.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.3.1.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll + + + False + ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll + + + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + True + + + + + + + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + + + ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + True + Resources.resx + + + + + + + + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Designer + + + Designer + + + PreserveNewest + Designer + + + + Designer + + + + + PreserveNewest + Designer + + + + + PublicResXFileCodeGenerator + Designer + Resources.Designer.cs + + + + + {65c3a86a-716d-4e7d-ab67-1db00b3bf72d} + Commands.Common.Storage + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + {40fee0bb-fd45-4efc-85bc-0d602a6892c4} + Commands.Network + + + {4900ec4e-8deb-4412-9108-0bc52f81d457} + Commands.Utilities + + + {73820CBC-F4EB-4C5E-B4F0-CC4A93FBF157} + Sync + + + {80496B7B-068A-4A1E-B0BB-4B1FFF3FA616} + VhdManagement + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Common/ValidationHelpers.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Common/ValidationHelpers.cs new file mode 100644 index 000000000000..af1808f93bd9 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Common/ValidationHelpers.cs @@ -0,0 +1,108 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Text.RegularExpressions; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Common +{ + public class ValidationHelpers + { + private static readonly char[] WindowsComputerNameInvalidChars = @"`~!@#$%^&*()=+_[]{}\|;:.'"",<>/?".ToCharArray(); + private static readonly Regex NumericRegex = new Regex(@"^\d+$", RegexOptions.Singleline | RegexOptions.Compiled); + + private static readonly Regex PasswordHasLowerChar = new Regex(@"[a-z]", RegexOptions.Singleline | RegexOptions.CultureInvariant); + private static readonly Regex PasswordHasUpperChar = new Regex(@"[A-Z]", RegexOptions.Singleline | RegexOptions.CultureInvariant); + private static readonly Regex PasswordHasDigitChar = new Regex(@"\d", RegexOptions.Singleline | RegexOptions.CultureInvariant); + private static readonly Regex PasswordHasSpecialChar = new Regex(@"\W", RegexOptions.Singleline | RegexOptions.CultureInvariant); + + private static readonly Regex[] PasswordCriteria = new Regex[] { PasswordHasLowerChar, PasswordHasUpperChar, PasswordHasDigitChar, PasswordHasSpecialChar }; + private const int PasswordMinComplexity = 3; + private const int PasswordMinLength = 8; + private const int PasswordMaxLength = 123; + private const int LinuxUserNameMinLength = 1; + private const int LinuxUserNameMaxLength = 64; + private const int LinuxPasswordMinLength = 6; + private const int LinuxPasswordMaxLength = 72; + + private const int WindowsComputerNameMaxLength = 15; + + public static bool IsLinuxPasswordValid(string password) + { + if (password.Length < LinuxPasswordMinLength || password.Length > LinuxPasswordMaxLength) + { + return false; + } + + // Check complexity + int complexity = PasswordCriteria.Count(criteria => criteria.IsMatch(password)); + if (complexity < PasswordMinComplexity) + { + return false; + } + + return true; + } + + public static bool IsWindowsPasswordValid(string password) + { + // Check length + if (password.Length < PasswordMinLength || password.Length > PasswordMaxLength) + { + return false; + } + + // Check complexity + int complexity = PasswordCriteria.Count(criteria => criteria.IsMatch(password)); + if (complexity < PasswordMinComplexity) + { + return false; + } + + return true; + } + + public static bool IsLinuxHostNameValid(string hostName) + { + if (string.IsNullOrEmpty(hostName)) + { + return false; + } + + if (hostName.Length > 64) + { + return false; + } + + return true; + } + + public static bool IsWindowsComputerNameValid(string computerName) + { + if (string.IsNullOrEmpty(computerName)) + { + return false; + } + + if (computerName.Length > WindowsComputerNameMaxLength || + computerName.IndexOfAny(WindowsComputerNameInvalidChars) != -1 || + NumericRegex.IsMatch(computerName)) + { + return false; + } + + return true; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/ADBuildSchema.cmd b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/ADBuildSchema.cmd new file mode 100644 index 000000000000..c1fc879dbc53 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/ADBuildSchema.cmd @@ -0,0 +1,3 @@ +xsd.exe /c /n:Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions.ADDomain ADPublicSchema.xsd + +xsd.exe /c /n:Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions.ADDomain ADPrivateSchema.xsd diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/ADDomainExtensionContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/ADDomainExtensionContext.cs new file mode 100644 index 000000000000..5306148ccd79 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/ADDomainExtensionContext.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + public class ADDomainExtensionContext : ExtensionContext + { + public string Name { get; set; } + public uint JoinOption { get; set; } + public string OUPath { get; set; } + public string User { get; set; } + public string UnjoinDomainUser { get; set; } + public bool Restart { get; set; } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/ADPrivateSchema.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/ADPrivateSchema.cs new file mode 100644 index 000000000000..9dbb882deb1b --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/ADPrivateSchema.cs @@ -0,0 +1,51 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.18408 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// +// This source code was auto-generated by xsd, Version=4.0.30319.1. +// +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions.ADDomain +{ + + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=false)] + public partial class PrivateConfig { + + private string passwordField; + + private string unjoinDomainPasswordField; + + /// + public string Password { + get { + return this.passwordField; + } + set { + this.passwordField = value; + } + } + + /// + public string UnjoinDomainPassword { + get { + return this.unjoinDomainPasswordField; + } + set { + this.unjoinDomainPasswordField = value; + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/ADPrivateSchema.xsd b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/ADPrivateSchema.xsd new file mode 100644 index 000000000000..e1179f7f92df --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/ADPrivateSchema.xsd @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/ADPublicSchema.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/ADPublicSchema.cs new file mode 100644 index 000000000000..b14389492fa1 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/ADPublicSchema.cs @@ -0,0 +1,106 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.18408 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// +// This source code was auto-generated by xsd, Version=4.0.30319.1. +// +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions.ADDomain +{ + + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319.1")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=false)] + public partial class PublicConfig { + + private string nameField; + + private string userField; + + private uint optionsField; + + private string oUPathField; + + private string unjoinDomainUserField; + + private bool restartField; + + public PublicConfig() { + this.optionsField = ((uint)(0)); + this.restartField = false; + } + + /// + public string Name { + get { + return this.nameField; + } + set { + this.nameField = value; + } + } + + /// + public string User { + get { + return this.userField; + } + set { + this.userField = value; + } + } + + /// + [System.ComponentModel.DefaultValueAttribute(typeof(uint), "0")] + public uint Options { + get { + return this.optionsField; + } + set { + this.optionsField = value; + } + } + + /// + public string OUPath { + get { + return this.oUPathField; + } + set { + this.oUPathField = value; + } + } + + /// + public string UnjoinDomainUser { + get { + return this.unjoinDomainUserField; + } + set { + this.unjoinDomainUserField = value; + } + } + + /// + [System.ComponentModel.DefaultValueAttribute(false)] + public bool Restart { + get { + return this.restartField; + } + set { + this.restartField = value; + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/ADPublicSchema.xsd b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/ADPublicSchema.xsd new file mode 100644 index 000000000000..a3f3ec7b9147 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/ADPublicSchema.xsd @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/BaseAzureServiceADDomainExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/BaseAzureServiceADDomainExtension.cs new file mode 100644 index 000000000000..c7ec65afff17 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/BaseAzureServiceADDomainExtension.cs @@ -0,0 +1,188 @@ +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions.ADDomain; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + public abstract class BaseAzureServiceADDomainExtensionCmdlet : BaseAzureServiceExtensionCmdlet + { + protected const string DomainExtensionNamespace = "Microsoft.Windows.Azure.Extensions"; + protected const string DomainExtensionType = "ADDomain"; + + protected const string ADDomainExtensionNoun = "AzureServiceADDomainExtension"; + protected const string ADDomainExtensionConfigNoun = "AzureServiceADDomainExtensionConfig"; + + protected const string DomainParameterSet = "JoinDomainUsingEnumOptions"; + protected const string DomainThumbprintParameterSet = "JoinDomainUsingEnumOptionsAndThumbprint"; + protected const string DomainJoinOptionParameterSet = "JoinDomainUsingJoinOption"; + protected const string DomainJoinOptionThumbprintParameterSet = "JoinDomainUsingJoinOptionAndThumbprint"; + protected const string WorkgroupParameterSet = "WorkGroupName"; + protected const string WorkgroupThumbprintParameterSet = "WorkGroupNameThumbprint"; + + protected PublicConfig PublicConfig { get; private set; } + protected PrivateConfig PrivateConfig { get; private set; } + + public virtual string DomainName + { + get + { + return (Options & JoinOptions.JoinDomain) == JoinOptions.JoinDomain ? PublicConfig.Name : null; + } + set + { + /// To make the lowest bit of 'Options' always '1'. + Options |= JoinOptions.JoinDomain; + PublicConfig.Name = value; + } + } + + public virtual string WorkgroupName + { + get + { + return (Options & JoinOptions.JoinDomain) != JoinOptions.JoinDomain ? PublicConfig.Name : null; + } + set + { + /// It is to set the lowest bit to 0 without using shift operation. + /// Since 'JoinOptions.JoinDomain' is equal to '1', the operation + /// 'Options ^ JoinOptions.JoinDomain' will flip the last bit of + /// 'Options' ('0' -> '1', '1' -> '0'). + /// And then doing an '&' operation with the original value will + /// make the last bit always '0'. + Options &= (Options ^ JoinOptions.JoinDomain); + PublicConfig.Name = value; + } + } + + public virtual JoinOptions Options + { + get + { + return (JoinOptions)PublicConfig.Options; + } + set + { + PublicConfig.Options = (uint)value; + } + } + + public virtual uint JoinOption + { + get + { + return PublicConfig.Options; + } + set + { + PublicConfig.Options = value; + } + } + + public virtual string OUPath + { + get + { + return PublicConfig.OUPath; + } + set + { + PublicConfig.OUPath = value; + } + } + + public virtual SwitchParameter Restart + { + get + { + return PublicConfig.Restart; + } + set + { + PublicConfig.Restart = value; + } + } + + public virtual PSCredential Credential + { + get + { + return new PSCredential(PublicConfig.User, GetSecurePassword(PrivateConfig.Password)); + } + set + { + PublicConfig.User = value.UserName; + PrivateConfig.Password = value.Password == null ? string.Empty : value.Password.ConvertToUnsecureString(); + } + } + + public virtual PSCredential UnjoinDomainCredential + { + get + { + return new PSCredential(PublicConfig.User, GetSecurePassword(PrivateConfig.UnjoinDomainPassword)); + } + set + { + PublicConfig.UnjoinDomainUser = value.UserName; + PrivateConfig.UnjoinDomainPassword = value.Password == null ? string.Empty : value.Password.ConvertToUnsecureString(); + } + } + + public BaseAzureServiceADDomainExtensionCmdlet() + : base() + { + } + + protected override void ValidateParameters() + { + base.ValidateParameters(); + ProviderNamespace = DomainExtensionNamespace; + ExtensionName = DomainExtensionType; + PublicConfig = new PublicConfig(); + PrivateConfig = new PrivateConfig(); + PrivateConfig.Password = string.Empty; + PrivateConfig.UnjoinDomainPassword = string.Empty; + } + + protected override void ValidateConfiguration() + { + PublicConfiguration = Serialize(PublicConfig); + PrivateConfiguration = Serialize(PrivateConfig); + } + + protected override ExtensionContext GetContext(OperationStatusResponse op, ExtensionRole role, HostedServiceListExtensionsResponse.Extension ext) + { + var config = Deserialize(ext.PublicConfiguration, typeof(PublicConfig)) as PublicConfig; + return new ADDomainExtensionContext + { + OperationId = op.Id, + OperationDescription = CommandRuntime.ToString(), + OperationStatus = op.Status.ToString(), + Extension = ext.Type, + ProviderNameSpace = ext.ProviderNamespace, + Id = ext.Id, + Role = role, + Name = config.Name, + OUPath = config.OUPath, + JoinOption = config.Options, + User = config.User, + UnjoinDomainUser = config.UnjoinDomainUser, + Restart = config.Restart, + Version = ext.Version + }; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/GetAzureServiceADDomainExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/GetAzureServiceADDomainExtension.cs new file mode 100644 index 000000000000..b8ce0481d04d --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/GetAzureServiceADDomainExtension.cs @@ -0,0 +1,74 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + /// + /// Get Microsoft Azure Service ADDomain Extension. + /// + [Cmdlet(VerbsCommon.Get, ADDomainExtensionNoun), OutputType(typeof(ADDomainExtensionContext))] + public class GetAzureServiceADDomainExtensionCommand : BaseAzureServiceADDomainExtensionCmdlet + { + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, HelpMessage = ExtensionParameterPropertyHelper.ServiceNameHelpMessage)] + public override string ServiceName + { + get; + set; + } + + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, HelpMessage = ExtensionParameterPropertyHelper.SlotHelpMessage)] + [ValidateSet(DeploymentSlotType.Production, DeploymentSlotType.Staging, IgnoreCase = true)] + public override string Slot + { + get; + set; + } + + protected override void ValidateParameters() + { + base.ValidateParameters(); + ValidateService(); + ValidateDeployment(); + } + + public void ExecuteCommand() + { + ValidateParameters(); + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.ComputeClient.HostedServices.ListExtensions(this.ServiceName), + (s, r) => + { + var extensionRoleList = (from dr in Deployment.Roles + select new ExtensionRole(dr.RoleName)).ToList().Union(new ExtensionRole[] { new ExtensionRole() }); + + return from role in extensionRoleList + from extension in r.Extensions + where ExtensionManager.CheckNameSpaceType(extension, ProviderNamespace, ExtensionName) + && ExtensionManager.GetBuilder(Deployment.ExtensionConfiguration).Exist(role, extension.Id) + select GetContext(s, role, extension) as ADDomainExtensionContext; + }); + } + + protected override void OnProcessRecord() + { + ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/JoinOptions.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/JoinOptions.cs new file mode 100644 index 000000000000..d840c4f99462 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/JoinOptions.cs @@ -0,0 +1,73 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + /// + /// Options for joining a computer to a domain + /// + [Flags] + public enum JoinOptions : uint + { + /// + /// Joins the computer to a domain. If this value is not specified, joins the computer to a workgroup. + /// + JoinDomain = 0x1, + + /// + /// Create account on the domain + /// + AccountCreate = 0x2, + + /// + /// Join operation is part of an upgrade + /// + Win9XUpgrade = 0x10, + + /// + /// Perform an unsecure join + /// + UnsecuredJoin = 0x40, + + /// + /// Indicate that the password passed to the join operation is the local machine account password, not a user password. + /// It's valid only for unsecure join + /// + PasswordPass = 0x80, + + /// + /// Writing SPN and DNSHostName attributes on the computer object should be deferred until the rename operation that + /// follows the join operation + /// + DeferSPNSet = 0x100, + + /// + /// Join the target machine with a new name queried from the registry. This options is used if the rename has been called prior + /// to rebooting the machine + /// + JoinWithNewName = 0x400, + + /// + /// Use a readonly domain controller + /// + JoinReadOnly = 0x800, + + /// + /// Invoke during insatll + /// + InstallInvoke = 0x40000 + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/NewAzureServiceADDomainExtensionConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/NewAzureServiceADDomainExtensionConfig.cs new file mode 100644 index 000000000000..7fa8112302d8 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/NewAzureServiceADDomainExtensionConfig.cs @@ -0,0 +1,226 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; +using System.Security.Cryptography.X509Certificates; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + /// + /// New Microsoft Azure Service Domain Membership Extension. + /// + [Cmdlet(VerbsCommon.New, ADDomainExtensionConfigNoun, DefaultParameterSetName = DomainParameterSet), OutputType(typeof(ExtensionConfigurationInput))] + public class NewAzureServiceADDomainExtensionConfigCommand : BaseAzureServiceADDomainExtensionCmdlet + { + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, HelpMessage = ExtensionParameterPropertyHelper.RoleHelpMessage)] + [ValidateNotNullOrEmpty] + public override string[] Role + { + get; + set; + } + + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainParameterSet, HelpMessage = ExtensionParameterPropertyHelper.X509CertificateHelpMessage)] + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainJoinOptionParameterSet, HelpMessage = ExtensionParameterPropertyHelper.X509CertificateHelpMessage)] + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, ParameterSetName = WorkgroupParameterSet, HelpMessage = ExtensionParameterPropertyHelper.X509CertificateHelpMessage)] + [ValidateNotNullOrEmpty] + public override X509Certificate2 X509Certificate + { + get; + set; + } + + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = DomainThumbprintParameterSet, HelpMessage = ExtensionParameterPropertyHelper.CertificateThumbprintHelpMessage)] + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = DomainJoinOptionThumbprintParameterSet, HelpMessage = ExtensionParameterPropertyHelper.CertificateThumbprintHelpMessage)] + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = WorkgroupThumbprintParameterSet, HelpMessage = ExtensionParameterPropertyHelper.CertificateThumbprintHelpMessage)] + [ValidateNotNullOrEmpty] + public override string CertificateThumbprint + { + get; + set; + } + + [Parameter(Position = 2, ValueFromPipelineByPropertyName = true, HelpMessage = ExtensionParameterPropertyHelper.ThumbprintAlgorithmHelpMessage)] + [ValidateNotNullOrEmpty] + public override string ThumbprintAlgorithm + { + get; + set; + } + + [Parameter(Position = 3, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = DomainParameterSet)] + [Parameter(Position = 3, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = DomainThumbprintParameterSet)] + [Parameter(Position = 3, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = DomainJoinOptionParameterSet)] + [Parameter(Position = 3, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = DomainJoinOptionThumbprintParameterSet)] + [ValidateNotNullOrEmpty] + public override string DomainName + { + get + { + return base.DomainName; + } + set + { + base.DomainName = value; + } + } + + [Parameter(Position = 3, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = WorkgroupParameterSet)] + [Parameter(Position = 3, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = WorkgroupThumbprintParameterSet)] + [ValidateNotNullOrEmpty] + public override string WorkgroupName + { + get + { + return base.WorkgroupName; + } + set + { + base.WorkgroupName = value; + } + } + + [Parameter(Position = 4, ValueFromPipelineByPropertyName = true)] + public override SwitchParameter Restart + { + get + { + return base.Restart; + } + set + { + base.Restart = value; + } + } + + [Parameter(Position = 5, ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public override PSCredential Credential + { + get + { + return base.Credential; + } + set + { + base.Credential = value; + } + } + + [Parameter(Position = 6, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainParameterSet)] + [Parameter(Position = 6, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainThumbprintParameterSet)] + [Parameter(Position = 6, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainJoinOptionParameterSet)] + [Parameter(Position = 6, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainJoinOptionThumbprintParameterSet)] + [ValidateNotNullOrEmpty] + public override PSCredential UnjoinDomainCredential + { + get + { + return base.UnjoinDomainCredential; + } + set + { + base.UnjoinDomainCredential = value; + } + } + + [Parameter(Position = 7, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainParameterSet)] + [Parameter(Position = 7, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainThumbprintParameterSet)] + [ValidateNotNullOrEmpty] + public override JoinOptions Options + { + get + { + return base.Options; + } + set + { + base.Options = value; + } + } + + [Parameter(Position = 7, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainJoinOptionParameterSet)] + [Parameter(Position = 7, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainJoinOptionThumbprintParameterSet)] + [ValidateNotNullOrEmpty] + public override uint JoinOption + { + get + { + return base.JoinOption; + } + set + { + base.JoinOption = value; + } + } + + [Parameter(Position = 8, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainParameterSet)] + [Parameter(Position = 8, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainThumbprintParameterSet)] + [Parameter(Position = 8, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainJoinOptionParameterSet)] + [Parameter(Position = 8, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainJoinOptionThumbprintParameterSet)] + [ValidateNotNullOrEmpty] + public override string OUPath + { + get + { + return base.OUPath; + } + set + { + base.OUPath = value; + } + } + + [Parameter(Position = 9, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainParameterSet)] + [Parameter(Position = 9, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainThumbprintParameterSet)] + [Parameter(Position = 9, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainJoinOptionParameterSet)] + [Parameter(Position = 9, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainJoinOptionThumbprintParameterSet)] + [ValidateNotNullOrEmpty] + public override string Version + { + get; + set; + } + + protected override void ValidateParameters() + { + base.ValidateParameters(); + ValidateThumbprint(false); + ValidateConfiguration(); + } + + public void ExecuteCommand() + { + ValidateParameters(); + WriteObject(new ExtensionConfigurationInput + { + CertificateThumbprint = CertificateThumbprint, + ThumbprintAlgorithm = ThumbprintAlgorithm, + ProviderNameSpace = ProviderNamespace, + Type = ExtensionName, + PublicConfiguration = PublicConfiguration, + PrivateConfiguration = PrivateConfiguration, + X509Certificate = X509Certificate, + Version = Version, + Roles = new ExtensionRoleList(Role != null && Role.Any() ? Role.Select(r => new ExtensionRole(r)) : Enumerable.Repeat(new ExtensionRole(), 1)) + }); + } + + protected override void OnProcessRecord() + { + ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/RemoveAzureServiceADDomainExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/RemoveAzureServiceADDomainExtension.cs new file mode 100644 index 000000000000..9c43ef645597 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/RemoveAzureServiceADDomainExtension.cs @@ -0,0 +1,77 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + /// + /// Remove Microsoft Azure Service AD Domain Extension. + /// + [Cmdlet(VerbsCommon.Remove, ADDomainExtensionNoun, DefaultParameterSetName = RemoveByRolesParameterSet), OutputType(typeof(ManagementOperationContext))] + public class RemoveAzureServiceADDomainExtensionCommand : BaseAzureServiceADDomainExtensionCmdlet + { + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = RemoveByRolesParameterSet, HelpMessage = ExtensionParameterPropertyHelper.ServiceNameHelpMessage)] + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = RemoveAllRolesParameterSet, HelpMessage = ExtensionParameterPropertyHelper.ServiceNameHelpMessage)] + public override string ServiceName + { + get; + set; + } + + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, ParameterSetName = RemoveByRolesParameterSet, HelpMessage = ExtensionParameterPropertyHelper.SlotHelpMessage)] + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, ParameterSetName = RemoveAllRolesParameterSet, HelpMessage = ExtensionParameterPropertyHelper.SlotHelpMessage)] + [ValidateSet(DeploymentSlotType.Production, DeploymentSlotType.Staging, IgnoreCase = true)] + public override string Slot + { + get; + set; + } + + [Parameter(Position = 2, ValueFromPipelineByPropertyName = true, ParameterSetName = RemoveByRolesParameterSet, HelpMessage = ExtensionParameterPropertyHelper.RoleHelpMessage)] + public override string[] Role + { + get; + set; + } + + [Parameter(Position = 2, Mandatory = true, ParameterSetName = RemoveAllRolesParameterSet, HelpMessage = ExtensionParameterPropertyHelper.UninstallConfigurationHelpMessage)] + public override SwitchParameter UninstallConfiguration + { + get; + set; + } + + protected override void ValidateParameters() + { + base.ValidateParameters(); + ValidateService(); + ValidateDeployment(); + ValidateRoles(); + } + + public void ExecuteCommand() + { + ValidateParameters(); + RemoveExtension(); + } + + protected override void OnProcessRecord() + { + ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/SetAzureServiceADDomainExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/SetAzureServiceADDomainExtension.cs new file mode 100644 index 000000000000..9308b75c07fb --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/ADDomain/SetAzureServiceADDomainExtension.cs @@ -0,0 +1,248 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; +using System.Security.Cryptography.X509Certificates; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + /// + /// Set Microsoft Azure Service AD Domain Extension. + /// + [Cmdlet(VerbsCommon.Set, ADDomainExtensionNoun, DefaultParameterSetName = DomainParameterSet), OutputType(typeof(ManagementOperationContext))] + public class SetAzureServiceADDomainExtensionCommand : BaseAzureServiceADDomainExtensionCmdlet + { + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, HelpMessage = ExtensionParameterPropertyHelper.ServiceNameHelpMessage)] + public override string ServiceName + { + get; + set; + } + + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, HelpMessage = ExtensionParameterPropertyHelper.SlotHelpMessage)] + [ValidateSet(DeploymentSlotType.Production, DeploymentSlotType.Staging, IgnoreCase = true)] + public override string Slot + { + get; + set; + } + + [Parameter(Position = 2, ValueFromPipelineByPropertyName = true, HelpMessage = ExtensionParameterPropertyHelper.RoleHelpMessage)] + [ValidateNotNullOrEmpty] + public override string[] Role + { + get; + set; + } + + [Parameter(Position = 3, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainParameterSet, HelpMessage = ExtensionParameterPropertyHelper.X509CertificateHelpMessage)] + [Parameter(Position = 3, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainJoinOptionParameterSet, HelpMessage = ExtensionParameterPropertyHelper.X509CertificateHelpMessage)] + [Parameter(Position = 3, ValueFromPipelineByPropertyName = true, ParameterSetName = WorkgroupParameterSet, HelpMessage = ExtensionParameterPropertyHelper.X509CertificateHelpMessage)] + [ValidateNotNullOrEmpty] + public override X509Certificate2 X509Certificate + { + get; + set; + } + + [Parameter(Position = 3, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = DomainThumbprintParameterSet, HelpMessage = ExtensionParameterPropertyHelper.CertificateThumbprintHelpMessage)] + [Parameter(Position = 3, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = DomainJoinOptionThumbprintParameterSet, HelpMessage = ExtensionParameterPropertyHelper.CertificateThumbprintHelpMessage)] + [Parameter(Position = 3, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = WorkgroupThumbprintParameterSet, HelpMessage = ExtensionParameterPropertyHelper.CertificateThumbprintHelpMessage)] + [ValidateNotNullOrEmpty] + public override string CertificateThumbprint + { + get; + set; + } + + [Parameter(Position = 4, ValueFromPipelineByPropertyName = true, HelpMessage = ExtensionParameterPropertyHelper.ThumbprintAlgorithmHelpMessage)] + [ValidateNotNullOrEmpty] + public override string ThumbprintAlgorithm + { + get; + set; + } + + [Parameter(Position = 5, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = DomainParameterSet)] + [Parameter(Position = 5, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = DomainThumbprintParameterSet)] + [Parameter(Position = 5, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = DomainJoinOptionParameterSet)] + [Parameter(Position = 5, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = DomainJoinOptionThumbprintParameterSet)] + [ValidateNotNullOrEmpty] + public override string DomainName + { + get + { + return base.DomainName; + } + set + { + base.DomainName = value; + } + } + + [Parameter(Position = 5, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = WorkgroupParameterSet)] + [Parameter(Position = 5, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = WorkgroupThumbprintParameterSet)] + [ValidateNotNullOrEmpty] + public override string WorkgroupName + { + get + { + return base.WorkgroupName; + } + set + { + base.WorkgroupName = value; + } + } + + [Parameter(Position = 6, ValueFromPipelineByPropertyName = true)] + public override SwitchParameter Restart + { + get + { + return base.Restart; + } + set + { + base.Restart = value; + } + } + + [Parameter(Position = 7, ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public override PSCredential Credential + { + get + { + return base.Credential; + } + set + { + base.Credential = value; + } + } + + [Parameter(Position = 8, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainParameterSet)] + [Parameter(Position = 8, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainThumbprintParameterSet)] + [Parameter(Position = 8, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainJoinOptionParameterSet)] + [Parameter(Position = 8, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainJoinOptionThumbprintParameterSet)] + [ValidateNotNullOrEmpty] + public override PSCredential UnjoinDomainCredential + { + get + { + return base.UnjoinDomainCredential; + } + set + { + base.UnjoinDomainCredential = value; + } + } + + [Parameter(Position = 9, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainParameterSet)] + [Parameter(Position = 9, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainThumbprintParameterSet)] + [ValidateNotNullOrEmpty] + public override JoinOptions Options + { + get + { + return base.Options; + } + set + { + base.Options = value; + } + } + + [Parameter(Position = 10, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainJoinOptionParameterSet)] + [Parameter(Position = 10, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainJoinOptionThumbprintParameterSet)] + [ValidateNotNullOrEmpty] + public override uint JoinOption + { + get + { + return base.JoinOption; + } + set + { + base.JoinOption = value; + } + } + + [Parameter(Position = 11, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainParameterSet)] + [Parameter(Position = 11, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainThumbprintParameterSet)] + [Parameter(Position = 11, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainJoinOptionParameterSet)] + [Parameter(Position = 11, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainJoinOptionThumbprintParameterSet)] + [ValidateNotNullOrEmpty] + public override string OUPath + { + get + { + return base.OUPath; + } + set + { + base.OUPath = value; + } + } + + [Parameter(Position = 12, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainParameterSet)] + [Parameter(Position = 12, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainThumbprintParameterSet)] + [Parameter(Position = 12, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainJoinOptionParameterSet)] + [Parameter(Position = 12, ValueFromPipelineByPropertyName = true, ParameterSetName = DomainJoinOptionThumbprintParameterSet)] + [ValidateNotNullOrEmpty] + public override string Version + { + get; + set; + } + + protected override void ValidateParameters() + { + base.ValidateParameters(); + ValidateService(); + ValidateDeployment(); + ValidateRoles(); + ValidateThumbprint(true); + ValidateConfiguration(); + } + + public void ExecuteCommand() + { + this.ValidateParameters(); + ExtensionConfigurationInput context = new ExtensionConfigurationInput + { + ProviderNameSpace = ProviderNamespace, + Type = ExtensionName, + CertificateThumbprint = CertificateThumbprint, + ThumbprintAlgorithm = ThumbprintAlgorithm, + X509Certificate = X509Certificate, + PublicConfiguration = PublicConfiguration, + PrivateConfiguration = PrivateConfiguration, + Roles = new ExtensionRoleList(Role != null && Role.Any() ? Role.Select(r => new ExtensionRole(r)) : Enumerable.Repeat(new ExtensionRole(), 1)) + }; + + var extConfig = ExtensionManager.InstallExtension(context, Slot, Deployment.ExtensionConfiguration); + ChangeDeployment(extConfig); + } + + protected override void OnProcessRecord() + { + ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/BaseAzureServiceExtensionCmdlet.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/BaseAzureServiceExtensionCmdlet.cs new file mode 100644 index 000000000000..6ade3a1399b2 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/BaseAzureServiceExtensionCmdlet.cs @@ -0,0 +1,384 @@ +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Net; +using System.Security; +using System.Security.Cryptography.X509Certificates; +using System.Xml; +using System.Xml.Linq; +using System.Xml.Serialization; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + public abstract class BaseAzureServiceExtensionCmdlet : ServiceManagementBaseCmdlet + { + protected const string PublicConfigStr = "PublicConfig"; + protected const string PrivateConfigStr = "PrivateConfig"; + protected const string ChangeConfigurationModeStr = "Auto"; + protected const string XmlNameSpaceAttributeStr = "xmlns"; + + protected const string NewExtensionParameterSetName = "NewExtension"; + protected const string NewExtensionUsingThumbprintParameterSetName = "NewExtensionUsingThumbprint"; + protected const string SetExtensionParameterSetName = "SetExtension"; + protected const string SetExtensionUsingThumbprintParameterSetName = "SetExtensionUsingThumbprint"; + protected const string RemoveByRolesParameterSet = "RemoveByRoles"; + protected const string RemoveAllRolesParameterSet = "RemoveAllRoles"; + + protected ExtensionManager ExtensionManager { get; set; } + protected XDocument PublicConfigurationXmlTemplate { get; set; } + protected XDocument PrivateConfigurationXmlTemplate { get; set; } + protected XDocument PublicConfigurationXml { get; set; } + protected XDocument PrivateConfigurationXml { get; set; } + protected DeploymentGetResponse Deployment { get; set; } + + public virtual string ServiceName { get; set; } + public virtual string Slot { get; set; } + public virtual string[] Role { get; set; } + public virtual X509Certificate2 X509Certificate { get; set; } + public virtual string CertificateThumbprint { get; set; } + public virtual string ThumbprintAlgorithm { get; set; } + public virtual SwitchParameter UninstallConfiguration { get; set; } + public virtual string PublicConfiguration { get; set; } + public virtual string PrivateConfiguration { get; set; } + public virtual string ProviderNamespace { get; set; } + public virtual string ExtensionName { get; set; } + public virtual string Version { get; set; } + + public BaseAzureServiceExtensionCmdlet() + : base() + { + ServiceManagementProfile.Initialize(); + } + + protected virtual void ValidateParameters() + { + } + + protected void ValidateService() + { + string serviceName; + ServiceSettings settings = CommonUtilities.GetDefaultSettings(CommonUtilities.TryGetServiceRootPath(CurrentPath()), + ServiceName, null, null, null, null, CurrentContext.Subscription.Id.ToString(), out serviceName); + + if (string.IsNullOrEmpty(serviceName)) + { + throw new Exception(string.Format(Resources.ServiceExtensionCannotFindServiceName, ServiceName)); + } + else + { + ServiceName = serviceName; + if (ComputeClient.HostedServices.CheckNameAvailability(ServiceName).IsAvailable) + { + throw new Exception(string.Format(Resources.ServiceExtensionCannotFindServiceName, ServiceName)); + } + } + + ExtensionManager = new ExtensionManager(this, ServiceName); + } + + protected void ValidateDeployment() + { + Slot = string.IsNullOrEmpty(Slot) ? DeploymentSlot.Production.ToString() : Slot; + + Deployment = GetDeployment(Slot); + if (!UninstallConfiguration) + { + if (Deployment == null) + { + throw new Exception(string.Format(Resources.ServiceExtensionCannotFindDeployment, ServiceName, Slot)); + } + Deployment.ExtensionConfiguration = Deployment.ExtensionConfiguration ?? new Microsoft.WindowsAzure.Management.Compute.Models.ExtensionConfiguration(); + } + } + + protected void ValidateRoles() + { + Role = Role == null ? new string[0] : Role.Select(r => r == null ? string.Empty : r.Trim()).Distinct().ToArray(); + foreach (string roleName in Role) + { + if (Deployment.Roles == null || !Deployment.Roles.Any(r => r.RoleName == roleName)) + { + throw new Exception(string.Format(Resources.ServiceExtensionCannotFindRole, roleName, Slot, ServiceName)); + } + + if (string.IsNullOrWhiteSpace(roleName)) + { + throw new Exception(Resources.ServiceExtensionCannotFindRoleName); + } + } + } + + protected void ValidateThumbprint(bool uploadCert) + { + if (X509Certificate != null) + { + var operationDescription = string.Format(Resources.ServiceExtensionUploadingCertificate, CommandRuntime, X509Certificate.Thumbprint); + if (uploadCert) + { + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.ComputeClient.ServiceCertificates.Create(this.ServiceName, CertUtilsNewSM.Create(X509Certificate))); + } + + CertificateThumbprint = X509Certificate.Thumbprint; + } + else + { + CertificateThumbprint = CertificateThumbprint ?? string.Empty; + } + + ThumbprintAlgorithm = ThumbprintAlgorithm ?? string.Empty; + } + + protected virtual void ValidateConfiguration() + { + } + + private static string GetConfigValue(string xmlText, string element) + { + XDocument config = XDocument.Parse(xmlText); + var result = from d in config.Descendants() + where d.Name.LocalName == element + select d.Descendants().Any() ? d.ToString() : d.Value; + return result.FirstOrDefault(); + } + + protected string GetPublicConfigValue(HostedServiceListExtensionsResponse.Extension extension, string element) + { + return extension == null ? string.Empty : GetConfigValue(extension.PublicConfiguration, element); + } + + private void SetConfigValue(XDocument config, string element, Object value) + { + if (config != null && value != null) + { + config.Descendants().ForEach(e => + { + if (e.Name.LocalName == element) + { + if (value.GetType().Equals(typeof(XmlDocument))) + { + e.ReplaceAll(XElement.Load(new XmlNodeReader(value as XmlDocument))); + e.Descendants().ForEach(d => + { + if (string.IsNullOrEmpty(d.Name.NamespaceName)) + { + d.Name = config.Root.Name.Namespace + d.Name.LocalName; + } + }); + } + else + { + e.SetValue(value.ToString()); + } + } + }); + } + } + + private void SetConfigAttribute(XDocument config, string element, string attribute, Object value) + { + if (config == null || value == null) + { + return; + } + + config.Descendants().ForEach(e => + { + if (e.Name.LocalName == element) + { + if (!e.HasAttributes) + { + return; + } + e.Attributes().ForEach(a => + { + if (a.Name.LocalName == attribute) + { + a.SetValue(value.ToString()); + } + }); + } + }); + } + + protected void SetPublicConfigValue(string element, Object value) + { + SetConfigValue(PublicConfigurationXml, element, value); + } + + protected void SetPrivateConfigValue(string element, Object value) + { + SetConfigValue(PrivateConfigurationXml, element, value); + } + + protected void SetPublicConfigAttribute(string element, string attribute, Object value) + { + SetConfigAttribute(PublicConfigurationXml, element, attribute, value); + } + + protected void SetPrivateConfigAttribute(string element, string attribute, Object value) + { + SetConfigAttribute(PrivateConfigurationXml, element, attribute, value); + } + + protected void ChangeDeployment(ExtensionConfiguration extConfig) + { + DeploymentChangeConfigurationParameters changeConfigInput = new DeploymentChangeConfigurationParameters + { + Configuration = Deployment.Configuration, + ExtensionConfiguration = Deployment.ExtensionConfiguration = extConfig, + Mode = DeploymentChangeConfigurationMode.Auto, + TreatWarningsAsError = false + }; + + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.ComputeClient.Deployments.ChangeConfigurationBySlot( + ServiceName, + (DeploymentSlot)Enum.Parse(typeof(DeploymentSlot), Slot, true), + changeConfigInput)); + } + + protected DeploymentGetResponse GetDeployment(string slot) + { + var slotType = (DeploymentSlot)Enum.Parse(typeof(DeploymentSlot), slot, true); + + DeploymentGetResponse d = null; + InvokeInOperationContext(() => + { + try + { + d = this.ComputeClient.Deployments.GetBySlot(this.ServiceName, slotType); + } + catch (CloudException ex) + { + if (ex.Response.StatusCode != HttpStatusCode.NotFound && IsVerbose() == false) + { + this.WriteExceptionDetails(ex); + } + } + }); + + return d; + } + + protected SecureString GetSecurePassword(string password) + { + SecureString securePassword = new SecureString(); + if (!string.IsNullOrEmpty(password)) + { + foreach (char c in password) + { + securePassword.AppendChar(c); + } + } + return securePassword; + } + + protected string Serialize(object config) + { + string result = null; + using (StringWriter sw = new StringWriter()) + { + XmlSerializer serializer = new XmlSerializer(config.GetType()); + serializer.Serialize(sw, config); + result = sw.ToString(); + } + + return result; + } + + protected object Deserialize(string config, Type type) + { + object result = null; + using (StringReader sr = new StringReader(config)) + { + XmlSerializer serializer = new XmlSerializer(type); + result = serializer.Deserialize(sr); + } + + return result; + } + + protected virtual ExtensionContext GetContext(OperationStatusResponse op, ExtensionRole role, HostedServiceListExtensionsResponse.Extension ext) + { + return new ExtensionContext + { + OperationId = op.Id, + OperationDescription = CommandRuntime.ToString(), + OperationStatus = op.Status.ToString(), + Extension = ext.Type, + ProviderNameSpace = ext.ProviderNamespace, + Id = ext.Id + }; + } + + protected void RemoveExtension() + { + ExtensionConfigurationBuilder configBuilder = ExtensionManager.GetBuilder(Deployment != null ? Deployment.ExtensionConfiguration : null); + if (UninstallConfiguration && configBuilder.ExistAny(ProviderNamespace, ExtensionName)) + { + configBuilder.RemoveAny(ProviderNamespace, ExtensionName); + WriteWarning(string.Format(Resources.ServiceExtensionRemovingFromAllRoles, ExtensionName, ServiceName)); + ChangeDeployment(configBuilder.ToConfiguration()); + } + else if (configBuilder.Exist(Role, ProviderNamespace, ExtensionName)) + { + configBuilder.Remove(Role, ProviderNamespace, ExtensionName); + if (Role == null || !Role.Any()) + { + WriteWarning(string.Format(Resources.ServiceExtensionRemovingFromAllRoles, ExtensionName, ServiceName)); + } + else + { + bool defaultExists = configBuilder.ExistDefault(ProviderNamespace, ExtensionName); + foreach (var r in Role) + { + WriteWarning(string.Format(Resources.ServiceExtensionRemovingFromSpecificRoles, ExtensionName, r, ServiceName)); + if (defaultExists) + { + WriteWarning(string.Format(Resources.ServiceExtensionRemovingSpecificAndApplyingDefault, ExtensionName, r)); + } + } + } + + ChangeDeployment(configBuilder.ToConfiguration()); + } + else + { + WriteWarning(string.Format(Resources.ServiceExtensionNoExistingExtensionsEnabledOnRoles, ProviderNamespace, ExtensionName)); + } + + if (UninstallConfiguration) + { + var allConfig = ExtensionManager.GetBuilder(); + var deploymentList = (from slot in (new string[] { DeploymentSlot.Production.ToString(), DeploymentSlot.Staging.ToString() }) + let d = GetDeployment(slot) + where d != null + select d).ToList(); + deploymentList.ForEach(d => allConfig.Add(d.ExtensionConfiguration)); + ExtensionManager.Uninstall(ProviderNamespace, ExtensionName, allConfig.ToConfiguration()); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionConfigurationBuilder.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionConfigurationBuilder.cs new file mode 100644 index 000000000000..cdd26fb348a4 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionConfigurationBuilder.cs @@ -0,0 +1,298 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + public class ExtensionConfigurationBuilder + { + private ExtensionManager extensionManager; + private HashSet allRoles; + private Dictionary> namedRoles; + + public ExtensionConfigurationBuilder(ExtensionManager extensionManager) + { + if (extensionManager == null) + { + throw new ArgumentNullException("extensionManager"); + } + + this.extensionManager = extensionManager; + allRoles = new HashSet(); + namedRoles = new Dictionary>(); + } + + public ExtensionConfigurationBuilder(ExtensionManager extensionManager, ExtensionConfiguration config) + : this(extensionManager) + { + Add(config); + } + + public bool ExistDefault(string nameSpace, string type) + { + return allRoles.Any(id => + { + var e = extensionManager.GetExtension(id); + return e != null && e.ProviderNamespace == nameSpace && e.Type == type; + }); + } + + public bool ExistAny(string nameSpace, string type) + { + return ExistDefault(nameSpace, type) + || namedRoles.Any(r => Exist(new string[] { r.Key }, nameSpace, type)); + } + + public bool Exist(string[] roles, string nameSpace, string type) + { + if (roles != null && roles.Any()) + { + return (from r in namedRoles + where roles.Contains(r.Key) + from id in r.Value + select extensionManager.GetExtension(id)).Any(e => e != null && e.ProviderNamespace == nameSpace && e.Type == type); + } + else + { + return ExistDefault(nameSpace, type); + } + } + + public bool ExistDefault(string extensionId) + { + return allRoles.Any(id => id == extensionId); + } + + public bool ExistAny(string extensionId) + { + return allRoles.Any(id => id == extensionId) + || namedRoles.Any(r => Exist(r.Key, extensionId)); + } + + public bool Exist(string roleName, string extensionId) + { + return string.IsNullOrWhiteSpace(roleName) ? ExistDefault(extensionId) + : namedRoles.Any(r => r.Key == roleName + && r.Value.Any(id => id == extensionId)); + } + + public bool Exist(ExtensionRole role, string extensionId) + { + return role.Default ? ExistDefault(extensionId) + : Exist(role.RoleName, extensionId); + } + + public ExtensionConfigurationBuilder RemoveDefault(string extensionId) + { + allRoles.Remove(extensionId); + return this; + } + + public ExtensionConfigurationBuilder Remove(string roleName, string extensionId) + { + return Remove(new string[] { roleName }, extensionId); + } + + public ExtensionConfigurationBuilder Remove(string[] roleNames, string extensionId) + { + if (roleNames != null && roleNames.Any()) + { + foreach (var r in roleNames.Intersect(namedRoles.Keys)) + { + namedRoles[r].Remove(extensionId); + } + return this; + } + else + { + return RemoveDefault(extensionId); + } + } + + public ExtensionConfigurationBuilder RemoveDefault(string nameSpace, string type) + { + allRoles.RemoveWhere(e => ExistDefault(nameSpace, type)); + return this; + } + + public ExtensionConfigurationBuilder RemoveAny(string nameSpace, string type) + { + RemoveDefault(nameSpace, type); + foreach (var r in namedRoles) + { + r.Value.RemoveWhere(id => Exist(r.Key, id)); + } + return this; + } + + public ExtensionConfigurationBuilder Remove(string roleName, string nameSpace, string type) + { + return Remove(new string[] { roleName }, nameSpace, type); + } + + public ExtensionConfigurationBuilder Remove(string[] roles, string nameSpace, string type) + { + if (roles != null && roles.Any()) + { + foreach (var r in roles.Intersect(namedRoles.Keys)) + { + namedRoles[r].RemoveWhere(id => + { + var e = extensionManager.GetExtension(id); + return e != null && e.ProviderNamespace == nameSpace && e.Type == type; + }); + } + return this; + } + else + { + return RemoveDefault(nameSpace, type); + } + } + + public ExtensionConfigurationBuilder AddDefault(string extensionId) + { + if (!ExistDefault(extensionId)) + { + allRoles.Add(extensionId); + } + return this; + } + + public ExtensionConfigurationBuilder Add(string roleName, string extensionId) + { + return Add(new string[] { roleName }, extensionId); + } + + public ExtensionConfigurationBuilder Add(string[] roleNames, string extensionId) + { + if (roleNames != null && roleNames.Any()) + { + foreach (var r in roleNames) + { + if (namedRoles.ContainsKey(r)) + { + namedRoles[r].Add(extensionId); + } + else + { + namedRoles.Add(r, new HashSet(new string[] { extensionId })); + } + } + return this; + } + else + { + return AddDefault(extensionId); + } + } + + public ExtensionConfigurationBuilder Add(ExtensionRole role, string extensionId) + { + if (role != null) + { + if (!role.Default) + { + Add(role.RoleName, extensionId); + } + else + { + AddDefault(extensionId); + } + } + return this; + } + + public ExtensionConfigurationBuilder Add(ExtensionConfigurationInput context, string extensionId) + { + if (context != null && context.Roles != null) + { + context.Roles.ForEach(r => Add(r, extensionId)); + } + return this; + } + + public ExtensionConfigurationBuilder Add(ExtensionConfiguration config) + { + if (config != null) + { + if (config.AllRoles != null) + { + foreach (var e in config.AllRoles) + { + AddDefault(e.Id); + } + } + + if (config.NamedRoles != null) + { + foreach (var r in config.NamedRoles) + { + foreach (var e in r.Extensions) + { + if (namedRoles.ContainsKey(r.RoleName)) + { + namedRoles[r.RoleName].Add(e.Id); + } + else + { + namedRoles.Add(r.RoleName, new HashSet(new string[] { e.Id })); + } + } + } + } + } + return this; + } + + public ExtensionConfiguration ToConfiguration() + { + ExtensionConfiguration config = new ExtensionConfiguration(); + foreach (var id in allRoles) + { + config.AllRoles.Add(new ExtensionConfiguration.Extension + { + Id = id + }); + } + + foreach (var r in namedRoles) + { + if (r.Value.Any()) + { + var nr = new ExtensionConfiguration.NamedRole + { + RoleName = r.Key + }; + + foreach (var v in r.Value) + { + nr.Extensions.Add(new ExtensionConfiguration.Extension + { + Id = v + }); + } + + config.NamedRoles.Add(nr); + } + } + + return config; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionConfigurationInput.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionConfigurationInput.cs new file mode 100644 index 000000000000..dfc09a1b89e6 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionConfigurationInput.cs @@ -0,0 +1,31 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Security.Cryptography.X509Certificates; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + public class ExtensionConfigurationInput + { + public string ProviderNameSpace { get; set; } + public string Type { get; set; } + public string Version { get; set; } + public string CertificateThumbprint { get; set; } + public string ThumbprintAlgorithm { get; set; } + public string PublicConfiguration { get; set; } + public string PrivateConfiguration { get; set; } + public ExtensionRoleList Roles { get; set; } + public X509Certificate2 X509Certificate { get; set; } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionContext.cs new file mode 100644 index 000000000000..f20b4db09df3 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionContext.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + public class ExtensionContext : ManagementOperationContext + { + public ExtensionRole Role { get; set; } + public string Extension { get; set; } + public string ProviderNameSpace { get; set; } + public string Version { get; set; } + public string Id { get; set; } + public string PublicConfiguration { get; set; } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionImageContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionImageContext.cs new file mode 100644 index 000000000000..a86bac1b0de9 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionImageContext.cs @@ -0,0 +1,47 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + public class ExtensionImageContext : ManagementOperationContext + { + public string ProviderNameSpace { get; set; } + public string ExtensionName { get; set; } + public string Version { get; set; } + public string Label { get; set; } + public string HostingResources { get; set; } + public Uri MediaLink { get; set; } + public string ThumbprintAlgorithm { get; set; } + public string PublicConfigurationSchema { get; set; } + public string PrivateConfigurationSchema { get; set; } + public string Description { get; set; } + public string PublisherName { get; set; } + public DateTime? PublishedDate { get; set; } + public bool? BlockRoleUponFailure { get; set; } + public bool IsInternalExtension { get; set; } + public string SampleConfig { get; set; } + public bool? ReplicationCompleted { get; set; } + public Uri Eula { get; set; } + public Uri PrivacyUri { get; set; } + public Uri HomepageUri { get; set; } + public bool IsJsonExtension { get; set; } + public bool DisallowMajorVersionUpgrade { get; set; } + public string SupportedOS { get; set; } + public string CompanyName { get; set; } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionManager.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionManager.cs new file mode 100644 index 000000000000..e0434bd4c65d --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionManager.cs @@ -0,0 +1,352 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Security.Cryptography; +using System.Security.Cryptography.X509Certificates; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + public class ExtensionManager + { + public const int ExtensionIdLiveCycleCount = 2; + private const string ExtensionIdTemplate = "{0}-{1}-{2}-Ext-{3}"; + private const string DefaultAllRolesNameStr = "Default"; + private const string ExtensionCertificateSubject = "DC=Microsoft Azure Service Management for Extensions"; + private const string ThumbprintAlgorithmStr = "sha1"; + private const string ExtensionDefaultVersion = "1.*"; + + protected ServiceManagementBaseCmdlet Cmdlet { get; private set; } + protected string SubscriptionId { get; private set; } + protected string ServiceName { get; private set; } + protected IList ExtendedExtensionList { get; private set; } + + public ExtensionManager(ServiceManagementBaseCmdlet cmdlet, string serviceName) + { + if (cmdlet == null || cmdlet.CurrentContext.Subscription == null) + { + throw new ArgumentNullException("cmdlet"); + } + + if (string.IsNullOrEmpty(serviceName)) + { + throw new ArgumentNullException("serviceName"); + } + + Cmdlet = cmdlet; + SubscriptionId = cmdlet.CurrentContext.Subscription.Id.ToString(); + ServiceName = serviceName; + } + + public HostedServiceListExtensionsResponse.Extension GetExtension(string extensionId) + { + if (ExtendedExtensionList == null) + { + ExtendedExtensionList = Cmdlet.ComputeClient.HostedServices.ListExtensions(ServiceName).Extensions; + } + + return ExtendedExtensionList == null || !ExtendedExtensionList.Any(e => e.Id == extensionId) ? null : ExtendedExtensionList.First(e => e.Id == extensionId); + } + + public void DeleteExtension(string extensionId) + { + var operationResponse = Cmdlet.ComputeClient.HostedServices.DeleteExtension(ServiceName, extensionId); + } + + public void AddExtension(HostedServiceAddExtensionParameters extensionInput) + { + var operationResponse = Cmdlet.ComputeClient.HostedServices.AddExtension(ServiceName, extensionInput); + } + + public bool CheckNameSpaceType(HostedServiceListExtensionsResponse.Extension extension, string nameSpace, string type) + { + return extension != null + && (!string.IsNullOrEmpty(nameSpace) && string.Equals(extension.ProviderNamespace, nameSpace, StringComparison.OrdinalIgnoreCase)) + && (!string.IsNullOrEmpty(type) && string.Equals(extension.Type, type, StringComparison.OrdinalIgnoreCase)); + } + + public ExtensionConfigurationBuilder GetBuilder() + { + return new ExtensionConfigurationBuilder(this); + } + + public ExtensionConfigurationBuilder GetBuilder(Microsoft.WindowsAzure.Management.Compute.Models.ExtensionConfiguration config) + { + return new ExtensionConfigurationBuilder(this, config); + } + + private void GetThumbprintAndAlgorithm(IList extensionList, string extensionId, ref string thumbprint, ref string thumbprintAlgorithm) + { + var existingExtension = extensionList == null || !extensionList.Any(e => e.Id == extensionId) ? null : extensionList.First(e => e.Id == extensionId); + if (existingExtension != null) + { + thumbprint = existingExtension.Thumbprint; + thumbprintAlgorithm = existingExtension.ThumbprintAlgorithm; + } + else if (extensionList.Any()) + { + thumbprint = extensionList.First().Thumbprint; + thumbprintAlgorithm = extensionList.First().ThumbprintAlgorithm; + } + else if (ExtendedExtensionList != null && ExtendedExtensionList.Any()) + { + thumbprint = ExtendedExtensionList.First().Thumbprint; + thumbprintAlgorithm = ExtendedExtensionList.First().ThumbprintAlgorithm; + } + + var certList = Cmdlet.ComputeClient.ServiceCertificates.List(ServiceName).Certificates; + string extThumbprint = thumbprint; + string extThumbprintAlgorithm = thumbprintAlgorithm; + var cert = certList == null || !certList.Any(c => c.Thumbprint == extThumbprint && c.ThumbprintAlgorithm == extThumbprintAlgorithm) + ? null : certList.First(c => c.Thumbprint == extThumbprint && c.ThumbprintAlgorithm == extThumbprintAlgorithm); + cert = cert != null ? cert : certList.FirstOrDefault(c => + { + byte[] bytes = c.Data; + X509Certificate2 x509cert = null; + try + { + x509cert = new X509Certificate2(bytes); + } + catch (CryptographicException) + { + // Do nothing + } + return x509cert != null && ExtensionCertificateSubject.Equals(x509cert.Subject); + }); + + if (cert != null) + { + thumbprint = cert.Thumbprint; + thumbprintAlgorithm = cert.ThumbprintAlgorithm; + } + else + { + thumbprint = string.Empty; + thumbprintAlgorithm = string.Empty; + } + } + + public ExtensionConfiguration InstallExtension(ExtensionConfigurationInput context, string slot, Microsoft.WindowsAzure.Management.Compute.Models.ExtensionConfiguration extConfig) + { + ExtensionConfigurationBuilder builder = GetBuilder(extConfig); + foreach (ExtensionRole r in context.Roles) + { + var extensionIds = (from index in Enumerable.Range(0, ExtensionIdLiveCycleCount) + select r.GetExtensionId(context.Type, slot, index)).ToList(); + + string availableId = (from extensionId in extensionIds + where !builder.ExistAny(extensionId) + select extensionId).FirstOrDefault(); + + var extensionList = (from id in extensionIds + let e = GetExtension(id) + where e != null + select e).ToList(); + + string thumbprint = context.CertificateThumbprint; + string thumbprintAlgorithm = context.ThumbprintAlgorithm; + + if (context.X509Certificate != null) + { + thumbprint = context.X509Certificate.Thumbprint; + } + else + { + GetThumbprintAndAlgorithm(extensionList, availableId, ref thumbprint, ref thumbprintAlgorithm); + } + + context.CertificateThumbprint = string.IsNullOrWhiteSpace(context.CertificateThumbprint) ? thumbprint : context.CertificateThumbprint; + context.ThumbprintAlgorithm = string.IsNullOrWhiteSpace(context.ThumbprintAlgorithm) ? thumbprintAlgorithm : context.ThumbprintAlgorithm; + + if (!string.IsNullOrWhiteSpace(context.CertificateThumbprint) && string.IsNullOrWhiteSpace(context.ThumbprintAlgorithm)) + { + context.ThumbprintAlgorithm = ThumbprintAlgorithmStr; + } + else if (string.IsNullOrWhiteSpace(context.CertificateThumbprint) && !string.IsNullOrWhiteSpace(context.ThumbprintAlgorithm)) + { + context.ThumbprintAlgorithm = string.Empty; + } + + var existingExtension = extensionList.Find(e => e.Id == availableId); + if (existingExtension != null) + { + DeleteExtension(availableId); + } + + if (r.Default) + { + Cmdlet.WriteVerbose(string.Format(Resources.ServiceExtensionSettingForDefaultRole, context.Type)); + } + else + { + Cmdlet.WriteVerbose(string.Format(Resources.ServiceExtensionSettingForSpecificRole, context.Type, r.RoleName)); + } + + AddExtension(new HostedServiceAddExtensionParameters + { + Id = availableId, + Thumbprint = context.CertificateThumbprint, + ThumbprintAlgorithm = context.ThumbprintAlgorithm, + ProviderNamespace = context.ProviderNameSpace, + Type = context.Type, + PublicConfiguration = context.PublicConfiguration, + PrivateConfiguration = context.PrivateConfiguration, + Version = string.IsNullOrEmpty(context.Version) ? ExtensionDefaultVersion : context.Version + }); + + if (r.Default) + { + builder.RemoveDefault(context.ProviderNameSpace, context.Type); + builder.AddDefault(availableId); + } + else + { + builder.Remove(r.RoleName, context.ProviderNameSpace, context.Type); + builder.Add(r.RoleName, availableId); + } + } + + return builder.ToConfiguration(); + } + + public void Uninstall(string nameSpace, string type, Microsoft.WindowsAzure.Management.Compute.Models.ExtensionConfiguration extConfig) + { + var extBuilder = GetBuilder(extConfig); + var extensions = Cmdlet.ComputeClient.HostedServices.ListExtensions(ServiceName).Extensions; + if (extensions != null) + { + extensions.ForEach( + e => + { + if (CheckNameSpaceType(e, nameSpace, type) && !extBuilder.ExistAny(e.Id)) + { + DeleteExtension(e.Id); + } + }); + } + } + + public Microsoft.WindowsAzure.Management.Compute.Models.ExtensionConfiguration Set(DeploymentGetResponse currentDeployment, ExtensionConfigurationInput[] inputs, string slot) + { + string errorConfigInput = null; + if (!Validate(inputs, out errorConfigInput)) + { + throw new Exception(string.Format(Resources.ServiceExtensionCannotApplyExtensionsInSameType, errorConfigInput)); + } + + var oldExtConfig = currentDeployment != null ? currentDeployment.ExtensionConfiguration : new ExtensionConfiguration(); + + ExtensionConfigurationBuilder configBuilder = this.GetBuilder(); + foreach (ExtensionConfigurationInput context in inputs) + { + if (context != null) + { + Microsoft.WindowsAzure.Management.Compute.Models.ExtensionConfiguration currentConfig = this.InstallExtension(context, slot, oldExtConfig); + foreach (var r in currentConfig.AllRoles) + { + if (currentDeployment == null || !this.GetBuilder(currentDeployment.ExtensionConfiguration).ExistAny(r.Id)) + { + configBuilder.AddDefault(r.Id); + } + } + foreach (var r in currentConfig.NamedRoles) + { + foreach (var e in r.Extensions) + { + if (currentDeployment == null || !this.GetBuilder(currentDeployment.ExtensionConfiguration).ExistAny(e.Id)) + { + configBuilder.Add(r.RoleName, e.Id); + } + } + } + } + } + + var extConfig = configBuilder.ToConfiguration(); + + return extConfig; + } + + public Microsoft.WindowsAzure.Management.Compute.Models.ExtensionConfiguration Add(DeploymentGetResponse deployment, ExtensionConfigurationInput[] inputs, string slot) + { + string errorConfigInput = null; + if (!Validate(inputs, out errorConfigInput)) + { + throw new Exception(string.Format(Resources.ServiceExtensionCannotApplyExtensionsInSameType, errorConfigInput)); + } + + var oldExtConfig = deployment.ExtensionConfiguration; + + ExtensionConfigurationBuilder configBuilder = this.GetBuilder(); + foreach (ExtensionConfigurationInput context in inputs) + { + if (context != null) + { + Microsoft.WindowsAzure.Management.Compute.Models.ExtensionConfiguration currentConfig = this.InstallExtension(context, slot, oldExtConfig); + foreach (var r in currentConfig.AllRoles) + { + if (!this.GetBuilder(oldExtConfig).ExistAny(r.Id)) + { + configBuilder.AddDefault(r.Id); + } + } + foreach (var r in currentConfig.NamedRoles) + { + foreach (var e in r.Extensions) + { + if (!this.GetBuilder(oldExtConfig).ExistAny(e.Id)) + { + configBuilder.Add(r.RoleName, e.Id); + } + } + } + } + } + var extConfig = configBuilder.ToConfiguration(); + + return extConfig; + } + + public static bool Validate(ExtensionConfigurationInput[] inputs, out string errorConfigInput) + { + var roleList = (from c in inputs + where c != null + from r in c.Roles + select r).GroupBy(r => r.ToString()).Select(g => g.First()); + + foreach (var role in roleList) + { + var result = from c in inputs + where c != null && c.Roles.Any(r => r.ToString() == role.ToString()) + select string.Format("{0}.{1}", c.ProviderNameSpace, c.Type); + foreach (var s in result) + { + if (result.Count(t => t == s) > 1) + { + errorConfigInput = s; + return false; + } + } + } + + errorConfigInput = null; + return true; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionParameterPropertyHelper.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionParameterPropertyHelper.cs new file mode 100644 index 000000000000..117a28931cff --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionParameterPropertyHelper.cs @@ -0,0 +1,32 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + public static class ExtensionParameterPropertyHelper + { + public const string ServiceNameHelpMessage = "Cloud service name."; + public const string SlotHelpMessage = "Production (default) or Staging"; + public const string RoleHelpMessage = "Default All Roles, or specify ones for Named Roles."; + public const string X509CertificateHelpMessage = "X509Certificate used to encrypt the content in private configuration."; + public const string CertificateThumbprintHelpMessage = "Thumbprint of a certificate used for encryption."; + public const string ThumbprintAlgorithmHelpMessage = "Algorithm associated with the Thumbprint."; + public const string UninstallConfigurationHelpMessage = "If specified, uninstall all extension configurations in this type from the cloud service."; + public const string PublicConfigurationHelpMessage = "Extension Public Configuration."; + public const string PrivateConfigurationHelpMessage = "Extension Private Configuration."; + public const string ProviderNamespaceHelpMessage = "Extension Provider Namespace"; + public const string ExtensionNameHelpMessage = "Extension Name"; + public const string VersionHelpMessage = "Extension Version"; + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionRole.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionRole.cs new file mode 100644 index 000000000000..9cb2b7447d32 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionRole.cs @@ -0,0 +1,62 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + public class ExtensionRole + { + protected const string DefaultExtensionIdPrefixStr = "Default"; + protected const string ExtensionIdTemplate = "{0}-{1}-{2}-Ext-{3}"; + + public string RoleName { get; private set; } + public string PrefixName { get; private set; } + public ExtensionRoleType RoleType { get; private set; } + public bool Default { get; private set; } + + public ExtensionRole() + { + RoleName = string.Empty; + RoleType = ExtensionRoleType.AllRoles; + PrefixName = DefaultExtensionIdPrefixStr; + Default = true; + } + + public ExtensionRole(string roleName) + { + if (string.IsNullOrWhiteSpace(roleName)) + { + RoleName = string.Empty; + RoleType = ExtensionRoleType.AllRoles; + PrefixName = DefaultExtensionIdPrefixStr; + Default = true; + } + else + { + PrefixName = RoleName = roleName.Trim(); + RoleType = ExtensionRoleType.NamedRoles; + Default = false; + } + } + + public override string ToString() + { + return PrefixName; + } + + public string GetExtensionId(string extensionName, string slot, int index) + { + return string.Format(ExtensionIdTemplate, PrefixName, extensionName, slot, index); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionRoleList.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionRoleList.cs new file mode 100644 index 000000000000..b4b51b98c6ce --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionRoleList.cs @@ -0,0 +1,31 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + public class ExtensionRoleList : List + { + public ExtensionRoleList() + : base() + { + } + + public ExtensionRoleList(IEnumerable roles) + : base(roles) + { + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionRoleType.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionRoleType.cs new file mode 100644 index 000000000000..85d5d5b7557f --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/ExtensionRoleType.cs @@ -0,0 +1,22 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + public enum ExtensionRoleType + { + AllRoles = 0, + NamedRoles = 1 + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/GetAzureServiceAvailableExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/GetAzureServiceAvailableExtension.cs new file mode 100644 index 000000000000..3caa7d119023 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/GetAzureServiceAvailableExtension.cs @@ -0,0 +1,156 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + /// + /// Get Microsoft Azure Service Extension. + /// + [Cmdlet( + VerbsCommon.Get, + AzureServiceAvailableExtensionCommandNoun, + DefaultParameterSetName = ListLatestExtensionsParamSetName), + OutputType( + typeof(ExtensionImageContext))] + public class GetAzureServiceAvailableExtensionCommand : ServiceManagementBaseCmdlet + { + protected const string AzureServiceAvailableExtensionCommandNoun = "AzureServiceAvailableExtension"; + protected const string ListLatestExtensionsParamSetName = "ListLatestExtensions"; + protected const string ListAllVersionsParamSetName = "ListAllVersions"; + protected const string ListSingleVersionParamSetName = "ListSingleVersion"; + + [Parameter( + ParameterSetName = ListLatestExtensionsParamSetName, + Position = 0, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Image Name.")] + [Parameter( + ParameterSetName = ListAllVersionsParamSetName, + Mandatory = true, + Position = 0, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Image Name.")] + [Parameter( + ParameterSetName = ListSingleVersionParamSetName, + Mandatory = true, + Position = 0, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Image Name.")] + [ValidateNotNullOrEmpty] + public string ExtensionName + { + get; + set; + } + + [Parameter( + ParameterSetName = ListLatestExtensionsParamSetName, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Provider Namespace.")] + [Parameter( + ParameterSetName = ListAllVersionsParamSetName, + Mandatory = true, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Provider Namespace.")] + [Parameter( + ParameterSetName = ListSingleVersionParamSetName, + Mandatory = true, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Provider Namespace.")] + [ValidateNotNullOrEmpty] + public string ProviderNamespace + { + get; + set; + } + + [Parameter( + ParameterSetName = ListSingleVersionParamSetName, + Mandatory = true, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Version.")] + [ValidateNotNullOrEmpty] + public string Version + { + get; + set; + } + + [Parameter( + ParameterSetName = ListAllVersionsParamSetName, + Mandatory = true, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Specify to list all versions of an extension.")] + [ValidateNotNullOrEmpty] + public SwitchParameter AllVersions + { + get; + set; + } + + public void ExecuteCommand() + { + ServiceManagementProfile.Initialize(); + + var truePred = (Func)(s => true); + + Func, + Func> predFunc = + (x, f) => string.IsNullOrEmpty(x) ? truePred : s => string.Equals(x, f(s), StringComparison.OrdinalIgnoreCase); + + var typePred = predFunc(this.ExtensionName, s => s.Type); + var nameSpacePred = predFunc(this.ProviderNamespace, s => s.ProviderNameSpace); + var versionPred = predFunc(this.Version, s => s.Version); + + ExecuteClientActionNewSM(null, + CommandRuntime.ToString(), + () => + { + if (AllVersions.IsPresent || !string.IsNullOrEmpty(this.Version)) + { + return this.ComputeClient.HostedServices.ListExtensionVersions(this.ProviderNamespace, this.ExtensionName); + } + else + { + return this.ComputeClient.HostedServices.ListAvailableExtensions(); + } + }, + (op, response) => response.Where(typePred).Where(nameSpacePred).Where(versionPred).Select( + extension => ContextFactory(extension, op))); + } + + protected override void OnProcessRecord() + { + try + { + this.ExecuteCommand(); + } + catch (Exception ex) + { + WriteError(new ErrorRecord(ex, string.Empty, ErrorCategory.CloseError, null)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/GetAzureServiceExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/GetAzureServiceExtension.cs new file mode 100644 index 000000000000..429e8908a7cf --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/GetAzureServiceExtension.cs @@ -0,0 +1,100 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + /// + /// Get Microsoft Azure Service Extension. + /// + [Cmdlet(VerbsCommon.Get, "AzureServiceExtension"), OutputType(typeof(ExtensionContext))] + public class GetAzureServiceExtensionCommand : BaseAzureServiceExtensionCmdlet + { + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, HelpMessage = ExtensionParameterPropertyHelper.ServiceNameHelpMessage)] + public override string ServiceName + { + get; + set; + } + + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, HelpMessage = ExtensionParameterPropertyHelper.SlotHelpMessage)] + [ValidateSet(DeploymentSlotType.Production, DeploymentSlotType.Staging, IgnoreCase = true)] + public override string Slot + { + get; + set; + } + + [Parameter(Position = 2, ValueFromPipelineByPropertyName = true, HelpMessage = ExtensionParameterPropertyHelper.ExtensionNameHelpMessage)] + [ValidateNotNullOrEmpty] + public override string ExtensionName + { + get; + set; + } + + [Parameter(Position = 3, ValueFromPipelineByPropertyName = true, HelpMessage = ExtensionParameterPropertyHelper.ProviderNamespaceHelpMessage)] + [ValidateNotNullOrEmpty] + public override string ProviderNamespace + { + get; + set; + } + + protected override void ValidateParameters() + { + base.ValidateParameters(); + ValidateService(); + ValidateDeployment(); + } + + public void ExecuteCommand() + { + ValidateParameters(); + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.ComputeClient.HostedServices.ListExtensions(this.ServiceName), + (s, r) => + { + var extensionRoleList = (from dr in Deployment.Roles + select new ExtensionRole(dr.RoleName)).ToList().Union(new ExtensionRole[] { new ExtensionRole() }); + + return from role in extensionRoleList + from extension in r.Extensions + where ExtensionManager.GetBuilder(Deployment.ExtensionConfiguration).Exist(role, extension.Id) + select new ExtensionContext + { + OperationId = s.Id, + OperationDescription = CommandRuntime.ToString(), + OperationStatus = s.Status.ToString(), + Extension = extension.Type, + ProviderNameSpace = extension.ProviderNamespace, + Id = extension.Id, + Role = role, + PublicConfiguration = extension.PublicConfiguration, + Version = extension.Version + }; + }); + } + + protected override void OnProcessRecord() + { + ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/NewAzureServiceExtensionConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/NewAzureServiceExtensionConfig.cs new file mode 100644 index 000000000000..da67f0e795be --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/NewAzureServiceExtensionConfig.cs @@ -0,0 +1,139 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; +using System.Security.Cryptography.X509Certificates; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + /// + /// New Microsoft Azure Service Extension. + /// + [Cmdlet(VerbsCommon.New, "AzureServiceExtensionConfig", DefaultParameterSetName = NewExtensionParameterSetName), OutputType(typeof(ExtensionConfigurationInput))] + public class NewAzureServiceExtensionConfigCommand : BaseAzureServiceExtensionCmdlet + { + private const string NetExtensionParameterSetName = NewExtensionParameterSetName; + private const string NetExtensionUsingThumbprintParameterSetName = NewExtensionUsingThumbprintParameterSetName; + + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = NetExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.RoleHelpMessage)] + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = NetExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.RoleHelpMessage)] + [ValidateNotNullOrEmpty] + public override string[] Role + { + get; + set; + } + + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, ParameterSetName = NetExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.X509CertificateHelpMessage)] + [ValidateNotNullOrEmpty] + public override X509Certificate2 X509Certificate + { + get; + set; + } + + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = NetExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.CertificateThumbprintHelpMessage)] + [ValidateNotNullOrEmpty] + public override string CertificateThumbprint + { + get; + set; + } + + [Parameter(Position = 2, ValueFromPipelineByPropertyName = true, ParameterSetName = NetExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.ThumbprintAlgorithmHelpMessage)] + [Parameter(Position = 2, ValueFromPipelineByPropertyName = true, ParameterSetName = NetExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.ThumbprintAlgorithmHelpMessage)] + [ValidateNotNullOrEmpty] + public override string ThumbprintAlgorithm + { + get; + set; + } + + [Parameter(Position = 3, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = NetExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.ExtensionNameHelpMessage)] + [Parameter(Position = 3, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = NetExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.ExtensionNameHelpMessage)] + [ValidateNotNullOrEmpty] + public override string ExtensionName + { + get; + set; + } + + [Parameter(Position = 4, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = NetExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.ProviderNamespaceHelpMessage)] + [Parameter(Position = 4, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = NetExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.ProviderNamespaceHelpMessage)] + [ValidateNotNullOrEmpty] + public override string ProviderNamespace + { + get; + set; + } + + [Parameter(Position = 5, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = NetExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.PublicConfigurationHelpMessage)] + [Parameter(Position = 5, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = NetExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.PublicConfigurationHelpMessage)] + [ValidateNotNullOrEmpty] + public override string PublicConfiguration + { + get; + set; + } + + + [Parameter(Position = 6, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = NetExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.PrivateConfigurationHelpMessage)] + [Parameter(Position = 6, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = NetExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.PrivateConfigurationHelpMessage)] + [ValidateNotNullOrEmpty] + public override string PrivateConfiguration + { + get; + set; + } + + [Parameter(Position = 7, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = NetExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.VersionHelpMessage)] + [Parameter(Position = 7, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = NetExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.VersionHelpMessage)] + [ValidateNotNullOrEmpty] + public override string Version + { + get; + set; + } + + protected override void ValidateParameters() + { + base.ValidateParameters(); + ValidateThumbprint(false); + ValidateConfiguration(); + } + + public void ExecuteCommand() + { + ValidateParameters(); + WriteObject(new ExtensionConfigurationInput + { + CertificateThumbprint = CertificateThumbprint, + ThumbprintAlgorithm = ThumbprintAlgorithm, + ProviderNameSpace = ProviderNamespace, + Type = ExtensionName, + PublicConfiguration = PublicConfiguration, + PrivateConfiguration = PrivateConfiguration, + X509Certificate = X509Certificate, + Version = Version, + Roles = new ExtensionRoleList(Role != null && Role.Any() ? Role.Select(r => new ExtensionRole(r)) : Enumerable.Repeat(new ExtensionRole(), 1)) + }); + } + + protected override void OnProcessRecord() + { + ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/RemoveAzureServiceExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/RemoveAzureServiceExtension.cs new file mode 100644 index 000000000000..f817edc84b47 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/RemoveAzureServiceExtension.cs @@ -0,0 +1,95 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + /// + /// Remove Microsoft Azure Service Extension. + /// + [Cmdlet(VerbsCommon.Remove, "AzureServiceExtension", DefaultParameterSetName = RemoveByRolesParameterSet), OutputType(typeof(ManagementOperationContext))] + public class RemoveAzureServiceExtensionCommand : BaseAzureServiceExtensionCmdlet + { + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = RemoveByRolesParameterSet, HelpMessage = ExtensionParameterPropertyHelper.ServiceNameHelpMessage)] + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = RemoveAllRolesParameterSet, HelpMessage = ExtensionParameterPropertyHelper.ServiceNameHelpMessage)] + public override string ServiceName + { + get; + set; + } + + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, ParameterSetName = RemoveByRolesParameterSet, HelpMessage = ExtensionParameterPropertyHelper.SlotHelpMessage)] + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, ParameterSetName = RemoveAllRolesParameterSet, HelpMessage = ExtensionParameterPropertyHelper.SlotHelpMessage)] + [ValidateSet(DeploymentSlotType.Production, DeploymentSlotType.Staging, IgnoreCase = true)] + public override string Slot + { + get; + set; + } + + [Parameter(Position = 2, ValueFromPipelineByPropertyName = true, ParameterSetName = RemoveByRolesParameterSet, HelpMessage = ExtensionParameterPropertyHelper.RoleHelpMessage)] + public override string[] Role + { + get; + set; + } + + [Parameter(Position = 3, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = RemoveByRolesParameterSet, HelpMessage = ExtensionParameterPropertyHelper.ExtensionNameHelpMessage)] + [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = RemoveAllRolesParameterSet, HelpMessage = ExtensionParameterPropertyHelper.ExtensionNameHelpMessage)] + [ValidateNotNullOrEmpty] + public override string ExtensionName + { + get; + set; + } + + [Parameter(Position = 4, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = RemoveByRolesParameterSet, HelpMessage = ExtensionParameterPropertyHelper.ProviderNamespaceHelpMessage)] + [Parameter(Position = 3, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = RemoveAllRolesParameterSet, HelpMessage = ExtensionParameterPropertyHelper.ProviderNamespaceHelpMessage)] + [ValidateNotNullOrEmpty] + public override string ProviderNamespace + { + get; + set; + } + + [Parameter(Position = 4, Mandatory = true, ParameterSetName = RemoveAllRolesParameterSet, HelpMessage = ExtensionParameterPropertyHelper.UninstallConfigurationHelpMessage)] + public override SwitchParameter UninstallConfiguration + { + get; + set; + } + + protected override void ValidateParameters() + { + base.ValidateParameters(); + ValidateService(); + ValidateDeployment(); + ValidateRoles(); + } + + public void ExecuteCommand() + { + ValidateParameters(); + RemoveExtension(); + } + + protected override void OnProcessRecord() + { + ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/SetAzureServiceExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/SetAzureServiceExtension.cs new file mode 100644 index 000000000000..7cfab6dd2736 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Common/SetAzureServiceExtension.cs @@ -0,0 +1,161 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; +using System.Security.Cryptography.X509Certificates; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + /// + /// Set Microsoft Azure Service Extension. + /// + [Cmdlet(VerbsCommon.Set, "AzureServiceExtension", DefaultParameterSetName = SetExtensionParameterSetName), OutputType(typeof(ManagementOperationContext))] + public class SetAzureServiceExtensionCommand : BaseAzureServiceExtensionCmdlet + { + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.ServiceNameHelpMessage)] + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.ServiceNameHelpMessage)] + [ValidateNotNullOrEmpty] + public override string ServiceName + { + get; + set; + } + + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.SlotHelpMessage)] + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.SlotHelpMessage)] + [ValidateSet(DeploymentSlotType.Production, DeploymentSlotType.Staging, IgnoreCase = true)] + public override string Slot + { + get; + set; + } + + [Parameter(Position = 2, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.RoleHelpMessage)] + [Parameter(Position = 2, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.RoleHelpMessage)] + [ValidateNotNullOrEmpty] + public override string[] Role + { + get; + set; + } + + [Parameter(Position = 3, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.X509CertificateHelpMessage)] + [ValidateNotNullOrEmpty] + public override X509Certificate2 X509Certificate + { + get; + set; + } + + [Parameter(Position = 3, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = SetExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.CertificateThumbprintHelpMessage)] + [ValidateNotNullOrEmpty] + public override string CertificateThumbprint + { + get; + set; + } + + [Parameter(Position = 4, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.ThumbprintAlgorithmHelpMessage)] + [Parameter(Position = 4, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.ThumbprintAlgorithmHelpMessage)] + [ValidateNotNullOrEmpty] + public override string ThumbprintAlgorithm + { + get; + set; + } + + [Parameter(Position = 5, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.ExtensionNameHelpMessage)] + [Parameter(Position = 5, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.ExtensionNameHelpMessage)] + [ValidateNotNullOrEmpty] + public override string ExtensionName + { + get; + set; + } + + [Parameter(Position = 6, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.ProviderNamespaceHelpMessage)] + [Parameter(Position = 6, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.ProviderNamespaceHelpMessage)] + [ValidateNotNullOrEmpty] + public override string ProviderNamespace + { + get; + set; + } + + [Parameter(Position = 7, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.PublicConfigurationHelpMessage)] + [Parameter(Position = 7, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.PublicConfigurationHelpMessage)] + [ValidateNotNullOrEmpty] + public override string PublicConfiguration + { + get; + set; + } + + + [Parameter(Position = 8, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.PrivateConfigurationHelpMessage)] + [Parameter(Position = 8, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.PrivateConfigurationHelpMessage)] + [ValidateNotNullOrEmpty] + public override string PrivateConfiguration + { + get; + set; + } + + [Parameter(Position = 9, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.VersionHelpMessage)] + [Parameter(Position = 9, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.VersionHelpMessage)] + [ValidateNotNullOrEmpty] + public override string Version + { + get; + set; + } + + protected override void ValidateParameters() + { + base.ValidateParameters(); + ValidateService(); + ValidateDeployment(); + ValidateRoles(); + ValidateThumbprint(true); + ValidateConfiguration(); + } + + public void ExecuteCommand() + { + ValidateParameters(); + ExtensionConfigurationInput context = new ExtensionConfigurationInput + { + ProviderNameSpace = ProviderNamespace, + Type = ExtensionName, + CertificateThumbprint = CertificateThumbprint, + ThumbprintAlgorithm = ThumbprintAlgorithm, + X509Certificate = X509Certificate, + PublicConfiguration = PublicConfiguration, + PrivateConfiguration = PrivateConfiguration, + Version = Version, + Roles = new ExtensionRoleList(Role != null && Role.Any() ? Role.Select(r => new ExtensionRole(r)) : Enumerable.Repeat(new ExtensionRole(), 1)) + }; + var extConfig = ExtensionManager.InstallExtension(context, Slot, Deployment.ExtensionConfiguration); + ChangeDeployment(extConfig); + } + + protected override void OnProcessRecord() + { + ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Diagnostics/BaseAzureServiceDiagnosticsExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Diagnostics/BaseAzureServiceDiagnosticsExtension.cs new file mode 100644 index 000000000000..58c457e77528 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Diagnostics/BaseAzureServiceDiagnosticsExtension.cs @@ -0,0 +1,146 @@ +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Xml; +using System.Xml.Linq; +using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + public abstract class BaseAzureServiceDiagnosticsExtensionCmdlet : BaseAzureServiceExtensionCmdlet + { + protected const string StorageAccountElemStr = "StorageAccount"; + protected const string LocalResourceDirElemStr = "LocalResourceDirectory"; + protected const string StorageNameElemStr = "Name"; + protected const string StorageNameAttrStr = "name"; + protected const string PrivConfNameAttr = "name"; + protected const string PrivConfKeyAttr = "key"; + protected const string PrivConfEndpointAttr = "endpoint"; + protected const string StorageKeyElemStr = "StorageKey"; + protected const string WadCfgElemStr = "WadCfg"; + protected const string PathAttr = "path"; + protected const string ExpandEnvAttr = "expandEnvironment"; + protected const string DiagnosticsExtensionNamespace = "Microsoft.Azure.Diagnostics"; + protected const string DiagnosticsExtensionType = "PaaSDiagnostics"; + protected readonly string XmlNamespace = "http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration"; + + protected string StorageKey { get; set; } + protected string ConnectionQualifiers { get; set; } + protected string DefaultEndpointsProtocol { get; set; } + protected string Endpoint { get; set; } + + public virtual AzureStorageContext StorageContext { get; set; } + public virtual string DiagnosticsConfigurationPath { get; set; } + + + public BaseAzureServiceDiagnosticsExtensionCmdlet() + : base() + { + } + + protected override void ValidateParameters() + { + base.ValidateParameters(); + + XNamespace configNameSpace = "http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration"; + ProviderNamespace = DiagnosticsExtensionNamespace; + ExtensionName = DiagnosticsExtensionType; + + PrivateConfigurationXmlTemplate = new XDocument( + new XDeclaration("1.0", "utf-8", null), + new XElement(configNameSpace + PrivateConfigStr, + new XElement(configNameSpace + StorageAccountElemStr, + new XAttribute(PrivConfNameAttr, string.Empty), + new XAttribute(PrivConfKeyAttr, string.Empty), + new XAttribute(PrivConfEndpointAttr, string.Empty) + )) + ); + } + + protected void ValidateStorageAccount() + { + StorageKey = GetStorageKey(); + Endpoint = "https://" + StorageContext.EndPointSuffix; + } + + protected string GetStorageKey() + { + string storageKey = string.Empty; + + if (!string.IsNullOrEmpty(StorageContext.StorageAccountName)) + { + var storageAccount = this.StorageClient.StorageAccounts.Get(StorageContext.StorageAccountName); + if (storageAccount != null) + { + var keys = this.StorageClient.StorageAccounts.GetKeys(StorageContext.StorageAccountName); + if (keys != null) + { + storageKey = !string.IsNullOrEmpty(keys.PrimaryKey) ? keys.PrimaryKey : keys.SecondaryKey; + } + } + } + + return storageKey; + } + + protected override void ValidateConfiguration() + { + using (StreamReader sr = new StreamReader(DiagnosticsConfigurationPath)) + { + string header = sr.ReadLine(); + // make sure it is the header + if (!header.Trim().StartsWith(" is not meant to be set by teh user in the public config. + // Make sure it matches the storage account in the private config. + XmlDocument doc = new XmlDocument(); + XmlNamespaceManager ns = new XmlNamespaceManager(doc.NameTable); + ns.AddNamespace("ns", XmlNamespace); + doc.Load(DiagnosticsConfigurationPath); + var node = doc.SelectSingleNode("//ns:StorageAccount", ns); + if(node != null) + { + if(node.InnerText == null) + { + throw new ArgumentException(Resources.PaaSDiagnosticsNullStorageAccount); + } + if (string.Compare(node.InnerText, StorageContext.StorageAccountName, true) != 0) + { + throw new ArgumentException(Resources.PassDiagnosticsNoMatchStorageAccount); + } + } + else + { + // the StorageAccount is not there. we must set it + string storageAccountElem = "\n" + StorageContext.StorageAccountName + "\n"; + // insert it after + int wadCfgEndIndex = PublicConfiguration.IndexOf(""); + PublicConfiguration = PublicConfiguration.Insert(wadCfgEndIndex + "".Length, storageAccountElem); + } + + PrivateConfigurationXml = new XDocument(PrivateConfigurationXmlTemplate); + SetPrivateConfigAttribute(StorageAccountElemStr, PrivConfNameAttr, StorageContext.StorageAccountName); + SetPrivateConfigAttribute(StorageAccountElemStr, PrivConfKeyAttr, StorageKey); + SetPrivateConfigAttribute(StorageAccountElemStr, PrivConfEndpointAttr, Endpoint); + PrivateConfiguration = PrivateConfigurationXml.ToString(); + + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Diagnostics/DiagnosticsExtensionContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Diagnostics/DiagnosticsExtensionContext.cs new file mode 100644 index 000000000000..5d33208f518f --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Diagnostics/DiagnosticsExtensionContext.cs @@ -0,0 +1,22 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + public class DiagnosticExtensionContext : ExtensionContext + { + public string StorageAccountName { get; set; } + public string WadCfg { get; set; } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Diagnostics/GetAzureServiceDiagnosticsExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Diagnostics/GetAzureServiceDiagnosticsExtension.cs new file mode 100644 index 000000000000..ac6b6e50f62a --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Diagnostics/GetAzureServiceDiagnosticsExtension.cs @@ -0,0 +1,85 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + /// + /// Get Microsoft Azure Service Diagnostics Extension. + /// + [Cmdlet(VerbsCommon.Get, "AzureServiceDiagnosticsExtension"), OutputType(typeof(DiagnosticExtensionContext))] + public class GetAzureServiceDiagnosticsExtensionCommand : BaseAzureServiceDiagnosticsExtensionCmdlet + { + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, HelpMessage = "Service Name")] + public override string ServiceName + { + get; + set; + } + + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, HelpMessage = "Deployment Slot: Production (default) or Staging")] + [ValidateSet(DeploymentSlotType.Production, DeploymentSlotType.Staging, IgnoreCase = true)] + public override string Slot + { + get; + set; + } + + protected override void ValidateParameters() + { + base.ValidateParameters(); + ValidateService(); + ValidateDeployment(); + } + + public void ExecuteCommand() + { + ValidateParameters(); + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.ComputeClient.HostedServices.ListExtensions(this.ServiceName), + (s, r) => + { + var extensionRoleList = (from dr in Deployment.Roles + select new ExtensionRole(dr.RoleName)).ToList().Union(new ExtensionRole[] { new ExtensionRole() }); + + return from role in extensionRoleList + from extension in r.Extensions + where ExtensionManager.CheckNameSpaceType(extension, ProviderNamespace, ExtensionName) + && ExtensionManager.GetBuilder(Deployment.ExtensionConfiguration).Exist(role, extension.Id) + select new DiagnosticExtensionContext + { + OperationId = s.Id, + OperationDescription = CommandRuntime.ToString(), + OperationStatus = s.Status.ToString(), + Extension = extension.Type, + ProviderNameSpace = extension.ProviderNamespace, + Id = extension.Id, + Role = role, + StorageAccountName = GetPublicConfigValue(extension, StorageNameElemStr), + WadCfg = GetPublicConfigValue(extension, WadCfgElemStr) + }; + }); + } + + protected override void OnProcessRecord() + { + ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Diagnostics/NewAzureServiceDiagnosticsExtensionConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Diagnostics/NewAzureServiceDiagnosticsExtensionConfig.cs new file mode 100644 index 000000000000..2b42fc2e657c --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Diagnostics/NewAzureServiceDiagnosticsExtensionConfig.cs @@ -0,0 +1,109 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; +using System.Security.Cryptography.X509Certificates; +using Microsoft.WindowsAzure.Commands.Common.Storage; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + /// + /// New Microsoft Azure Service Diagnostics Extension. + /// + [Cmdlet(VerbsCommon.New, "AzureServiceDiagnosticsExtensionConfig", DefaultParameterSetName = NewExtensionParameterSetName), OutputType(typeof(ExtensionConfigurationInput))] + public class NewAzureServiceDiagnosticsExtensionConfigCommand : BaseAzureServiceDiagnosticsExtensionCmdlet + { + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = NewExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.RoleHelpMessage)] + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = NewExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.RoleHelpMessage)] + [ValidateNotNullOrEmpty] + public override string[] Role + { + get; + set; + } + + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, ParameterSetName = NewExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.X509CertificateHelpMessage)] + [ValidateNotNullOrEmpty] + public override X509Certificate2 X509Certificate + { + get; + set; + } + + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = NewExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.CertificateThumbprintHelpMessage)] + [ValidateNotNullOrEmpty] + public override string CertificateThumbprint + { + get; + set; + } + + [Parameter(Position = 2, ValueFromPipelineByPropertyName = true, ParameterSetName = NewExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.ThumbprintAlgorithmHelpMessage)] + [Parameter(Position = 2, ValueFromPipelineByPropertyName = true, ParameterSetName = NewExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.ThumbprintAlgorithmHelpMessage)] + [ValidateNotNullOrEmpty] + public override string ThumbprintAlgorithm + { + get; + set; + } + + [Parameter(Position = 3, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = NewExtensionParameterSetName, HelpMessage = "Diagnostics Storage Name")] + [Parameter(Position = 3, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = NewExtensionUsingThumbprintParameterSetName, HelpMessage = "Diagnostics Storage Name")] + [ValidateNotNullOrEmpty] + public override AzureStorageContext StorageContext + { + get; + set; + } + + [Parameter(Position = 4, ValueFromPipelineByPropertyName = true, ParameterSetName = NewExtensionParameterSetName, HelpMessage = "Diagnostics Configuration")] + [Parameter(Position = 4, ValueFromPipelineByPropertyName = true, ParameterSetName = NewExtensionUsingThumbprintParameterSetName, HelpMessage = "Diagnostics Configuration")] + [ValidateNotNullOrEmpty] + public override string DiagnosticsConfigurationPath + { + get; + set; + } + + protected override void ValidateParameters() + { + base.ValidateParameters(); + ValidateThumbprint(false); + ValidateStorageAccount(); + ValidateConfiguration(); + } + + public void ExecuteCommand() + { + ValidateParameters(); + WriteObject(new ExtensionConfigurationInput + { + CertificateThumbprint = CertificateThumbprint, + ThumbprintAlgorithm = ThumbprintAlgorithm, + ProviderNameSpace = ProviderNamespace, + Type = ExtensionName, + PublicConfiguration = PublicConfiguration, + PrivateConfiguration = PrivateConfiguration, + X509Certificate = X509Certificate, + Roles = new ExtensionRoleList(Role != null && Role.Any() ? Role.Select(r => new ExtensionRole(r)) : Enumerable.Repeat(new ExtensionRole(), 1)) + }); + } + + protected override void OnProcessRecord() + { + ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Diagnostics/RemoveAzureServiceDiagnosticsExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Diagnostics/RemoveAzureServiceDiagnosticsExtension.cs new file mode 100644 index 000000000000..1db2dadb6bd2 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Diagnostics/RemoveAzureServiceDiagnosticsExtension.cs @@ -0,0 +1,77 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + /// + /// Remove Microsoft Azure Service Diagnostics Extension. + /// + [Cmdlet(VerbsCommon.Remove, "AzureServiceDiagnosticsExtension", DefaultParameterSetName = RemoveByRolesParameterSet), OutputType(typeof(ManagementOperationContext))] + public class RemoveAzureServiceDiagnosticsExtensionCommand : BaseAzureServiceDiagnosticsExtensionCmdlet + { + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = RemoveByRolesParameterSet, HelpMessage = ExtensionParameterPropertyHelper.ServiceNameHelpMessage)] + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = RemoveAllRolesParameterSet, HelpMessage = ExtensionParameterPropertyHelper.ServiceNameHelpMessage)] + public override string ServiceName + { + get; + set; + } + + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, ParameterSetName = RemoveByRolesParameterSet, HelpMessage = ExtensionParameterPropertyHelper.SlotHelpMessage)] + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, ParameterSetName = RemoveAllRolesParameterSet, HelpMessage = ExtensionParameterPropertyHelper.SlotHelpMessage)] + [ValidateSet(DeploymentSlotType.Production, DeploymentSlotType.Staging, IgnoreCase = true)] + public override string Slot + { + get; + set; + } + + [Parameter(Position = 2, ValueFromPipelineByPropertyName = true, ParameterSetName = RemoveByRolesParameterSet, HelpMessage = ExtensionParameterPropertyHelper.RoleHelpMessage)] + public override string[] Role + { + get; + set; + } + + [Parameter(Position = 2, Mandatory = true, ParameterSetName = RemoveAllRolesParameterSet, HelpMessage = ExtensionParameterPropertyHelper.UninstallConfigurationHelpMessage)] + public override SwitchParameter UninstallConfiguration + { + get; + set; + } + + protected override void ValidateParameters() + { + base.ValidateParameters(); + ValidateService(); + ValidateDeployment(); + ValidateRoles(); + } + + public void ExecuteCommand() + { + ValidateParameters(); + RemoveExtension(); + } + + protected override void OnProcessRecord() + { + ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Diagnostics/SetAzureServiceDiagnosticsExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Diagnostics/SetAzureServiceDiagnosticsExtension.cs new file mode 100644 index 000000000000..4e446daf0dfa --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/Diagnostics/SetAzureServiceDiagnosticsExtension.cs @@ -0,0 +1,133 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; +using System.Security.Cryptography.X509Certificates; +using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + /// + /// Set Microsoft Azure Service Diagnostics Extension. + /// + [Cmdlet(VerbsCommon.Set, "AzureServiceDiagnosticsExtension", DefaultParameterSetName = SetExtensionParameterSetName), OutputType(typeof(ManagementOperationContext))] + public class SetAzureServiceDiagnosticsExtensionCommand : BaseAzureServiceDiagnosticsExtensionCmdlet + { + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.ServiceNameHelpMessage)] + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.ServiceNameHelpMessage)] + public override string ServiceName + { + get; + set; + } + + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.SlotHelpMessage)] + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.SlotHelpMessage)] + [ValidateSet(DeploymentSlotType.Production, DeploymentSlotType.Staging, IgnoreCase = true)] + public override string Slot + { + get; + set; + } + + [Parameter(Position = 2, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.RoleHelpMessage)] + [Parameter(Position = 2, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.RoleHelpMessage)] + [ValidateNotNullOrEmpty] + public override string[] Role + { + get; + set; + } + + [Parameter(Position = 3, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.X509CertificateHelpMessage)] + [ValidateNotNullOrEmpty] + public override X509Certificate2 X509Certificate + { + get; + set; + } + + [Parameter(Position = 3, ValueFromPipelineByPropertyName = true, ParameterSetName = "SetExtensionUsingThumbprint", HelpMessage = "Thumbprint of a certificate used for encryption.")] + [ValidateNotNullOrEmpty] + public override string CertificateThumbprint + { + get; + set; + } + + [Parameter(Position = 4, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.ThumbprintAlgorithmHelpMessage)] + [Parameter(Position = 4, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.ThumbprintAlgorithmHelpMessage)] + [ValidateNotNullOrEmpty] + public override string ThumbprintAlgorithm + { + get; + set; + } + + [Parameter(Position = 5, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = "SetExtension", HelpMessage = "Diagnostics Storage Account Context")] + [Parameter(Position = 5, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = "SetExtensionUsingThumbprint", HelpMessage = "Diagnostics Storage Account Context")] + [ValidateNotNullOrEmpty] + public override AzureStorageContext StorageContext + { + get; + set; + } + + [Parameter(Position = 6, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionParameterSetName, HelpMessage = "Diagnostics Configuration")] + [Parameter(Position = 6, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionUsingThumbprintParameterSetName, HelpMessage = "Diagnostics Configuration")] + [ValidateNotNullOrEmpty] + public override string DiagnosticsConfigurationPath + { + get; + set; + } + + protected override void ValidateParameters() + { + base.ValidateParameters(); + ValidateService(); + ValidateDeployment(); + ValidateRoles(); + ValidateThumbprint(true); + ValidateStorageAccount(); + ValidateConfiguration(); + } + + public void ExecuteCommand() + { + ValidateParameters(); + ExtensionConfigurationInput context = new ExtensionConfigurationInput + { + ProviderNameSpace = ProviderNamespace, + Type = ExtensionName, + CertificateThumbprint = CertificateThumbprint, + ThumbprintAlgorithm = ThumbprintAlgorithm, + X509Certificate = X509Certificate, + PublicConfiguration = PublicConfiguration, + PrivateConfiguration = PrivateConfiguration, + Roles = new ExtensionRoleList(Role != null && Role.Any() ? Role.Select(r => new ExtensionRole(r)) : Enumerable.Repeat(new ExtensionRole(), 1)) + }; + var extConfig = ExtensionManager.InstallExtension(context, Slot, Deployment.ExtensionConfiguration); + ChangeDeployment(extConfig); + } + + protected override void OnProcessRecord() + { + ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/MicrosoftAntimalware/AntimalwareExtensionContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/MicrosoftAntimalware/AntimalwareExtensionContext.cs new file mode 100644 index 000000000000..559f311433bf --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/MicrosoftAntimalware/AntimalwareExtensionContext.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + public class AntimalwareExtensionContext : ManagementOperationContext + { + public ExtensionRole Role { get; set; } + public string Extension { get; set; } + public string ProviderNameSpace { get; set; } + public string Id { get; set; } + public string StorageAccountName { get; set; } + public string AntimalwareExtensionConfig { get; set; } + public string AntimalwareDiagnosticsConfig { get; set; } + } + +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/MicrosoftAntimalware/BaseAzureServiceAntimalwareExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/MicrosoftAntimalware/BaseAzureServiceAntimalwareExtension.cs new file mode 100644 index 000000000000..87a78212edfe --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/MicrosoftAntimalware/BaseAzureServiceAntimalwareExtension.cs @@ -0,0 +1,393 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using System.Xml; +using System.Xml.Linq; +using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Management.Compute.Models; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Auth; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + public abstract class BaseAzureServiceAntimalwareExtensionCmdlet : BaseAzureServiceExtensionCmdlet + { + // this cmdlet sets the antimalware extension that the user requests to enable and use via config setting + // if monitoring is set to "on", the diagnostics extension will also configure monitoring of antimalware event data + + // shared + protected ExtensionConfigurationInput AntimalwareExtensionConfigurationInput { get; set; } + protected ExtensionConfigurationInput AntimalwareMonitoringExtensionConfigurationInput { get; set; } + + // antimalware + protected const string AntimalwareConfigElementName = "AntimalwareConfig"; + protected const string AntimalwareExtensionProviderNamespace = "Microsoft.Azure.Security"; + protected const string AntimalwareExtensionName = "PaaSAntimalware"; + public virtual XmlDocument AntimalwareConfiguration { get; set; } + + protected const string AntimalwareConfigurationXsd = +@" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +"; + + // diagnostics + protected const string StorageAccountElemStr = "StorageAccount"; + protected const string AntimalwareDiagnosticsExtensionNamespace = "Microsoft.Azure.Diagnostics"; + protected const string AntimalwareDiagnosticsExtensionName = "PaaSDiagnostics"; + protected const string DiagnosticsConfigXmlNamespace = @"http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration"; + protected const string DiagnosticsConfigElementName = "WadCfg"; + protected const string DiagnosticsConfigNodeName = "DiagnosticMonitorConfiguration"; + protected const string DiagnosticsConfigAntimalwareProviderToken = @"Microsoft Antimalware"; + protected const string DiagnosticsConfigWindowsEventLogNodeName = @"WindowsEventLog"; + protected const string StorageNameAttrStr = "name"; + + protected const string DiagnosticsDefaultConfigNewXmlStr = @""; + protected const string DiagnosticsDefaultConfigMergeXmlWithoutExistingEventLogNode = @""; + protected const string DiagnosticsDefaultConfigMergeXmlWithExistingEventLogNode = @""; + public virtual XmlDocument AntimalwareMonitoringConfig { get; set; } + + public virtual AzureStorageContext StorageContext { get; set; } + + public BaseAzureServiceAntimalwareExtensionCmdlet() + : base() + { + } + + protected void InitializeAntimalwareSettings() + { + ProviderNamespace = AntimalwareExtensionProviderNamespace; + ExtensionName = AntimalwareExtensionName; + + // public configuration + if (AntimalwareConfiguration != null) + { + PublicConfiguration = AntimalwareConfiguration.OuterXml; + } + else + { + PublicConfiguration = null; + } + } + + protected void InitializeStorageContext(string storageAccountName) + { + // lookup storage account by name and retrieve key + var storageService = this.StorageClient.StorageAccounts.Get(storageAccountName); + if (storageService == null) + { + ThrowTerminatingError(new ErrorRecord( + new Exception("ServiceExtensionCannotFindStorageAccountName"), + string.Empty, + ErrorCategory.InvalidData, + null)); + } + var storageKeys = this.StorageClient.StorageAccounts.GetKeys(storageService.StorageAccount.Name); + if (storageKeys == null || storageKeys.PrimaryKey == null || storageKeys.SecondaryKey == null) + { + ThrowTerminatingError(new ErrorRecord( + new Exception("ServiceExtensionCannotFindStorageAccountKey"), + string.Empty, + ErrorCategory.InvalidData, + null)); + } + string storageAccountKey = storageKeys.PrimaryKey != null ? storageKeys.PrimaryKey : storageKeys.SecondaryKey; + + // now that key has been retrieved, initialize context and return + StorageCredentials creds = new StorageCredentials(storageAccountName, storageAccountKey); + CloudStorageAccount csa = new WindowsAzure.Storage.CloudStorageAccount(creds, true); + StorageContext = new AzureStorageContext(csa); + } + + protected void InitializeDiagnosticsSettings() + { + ProviderNamespace = AntimalwareDiagnosticsExtensionNamespace; + ExtensionName = AntimalwareDiagnosticsExtensionName; + + // public configuration + XNamespace configNameSpace = DiagnosticsConfigXmlNamespace; + PublicConfigurationXml = new XDocument( + new XDeclaration("1.0", "utf-8", null), + new XElement(configNameSpace + PublicConfigStr, + new XElement(configNameSpace + DiagnosticsConfigElementName, string.Empty), + new XElement(configNameSpace + StorageAccountElemStr, StorageContext.StorageAccountName) + ) + ); + + if (AntimalwareMonitoringConfig == null) + { + XmlDocument amCfgXmlDoc = new XmlDocument(); + amCfgXmlDoc.LoadXml(DiagnosticsDefaultConfigNewXmlStr); + AntimalwareMonitoringConfig = amCfgXmlDoc; + } + + SetPublicConfigValue(DiagnosticsConfigElementName, AntimalwareMonitoringConfig); + PublicConfiguration = PublicConfigurationXml.ToString(); + + // add storage account name to private configuration if applicable + if (IsValidStorageContext()) + { + PrivateConfigurationXml = new XDocument( + new XDeclaration("1.0", "utf-8", null), + new XElement(configNameSpace + PrivateConfigStr, + new XElement(configNameSpace + StorageAccountElemStr, + new XAttribute("name", StorageContext.StorageAccountName), + new XAttribute("key", StorageContext.StorageAccount.Credentials.ExportBase64EncodedKey()) + )) + ); + } + else + { + // provide custom endpoint suffix to diagnostics extension + PrivateConfigurationXml = new XDocument( + new XDeclaration("1.0", "utf-8", null), + new XElement(configNameSpace + PrivateConfigStr, + new XElement(configNameSpace + StorageAccountElemStr, + new XAttribute("name", StorageContext.StorageAccountName), + new XAttribute("key", StorageContext.StorageAccount.Credentials.ExportBase64EncodedKey()), + new XAttribute("endpoint", "https://" + StorageContext.EndPointSuffix) + )) + ); + } + PrivateConfiguration = PrivateConfigurationXml.ToString(); + } + + protected bool IsValidStorageContext() + { + return ((StorageContext != null) && + (!string.IsNullOrWhiteSpace(StorageContext.StorageAccountName)) && + (!string.IsNullOrWhiteSpace(StorageContext.TableEndPoint)) && + (!string.IsNullOrWhiteSpace(StorageContext.StorageAccount.Credentials.ExportBase64EncodedKey()))); + } + + protected void RemoveAntimalwareExtension() + { + ProviderNamespace = AntimalwareExtensionProviderNamespace; + ExtensionName = AntimalwareExtensionName; + + ExtensionConfigurationBuilder configBuilder = ExtensionManager.GetBuilder(Deployment != null ? Deployment.ExtensionConfiguration : null); + if (UninstallConfiguration && configBuilder.ExistAny(ProviderNamespace, ExtensionName)) + { + configBuilder.RemoveAny(ProviderNamespace, ExtensionName); + WriteWarning(string.Format(Resources.ServiceExtensionRemovingFromAllRoles, ExtensionName, ServiceName)); + ChangeDeployment(configBuilder.ToConfiguration()); + } + else if (configBuilder.Exist(Role, ProviderNamespace, ExtensionName)) + { + configBuilder.Remove(Role, ProviderNamespace, ExtensionName); + if (Role == null || !Role.Any()) + { + WriteWarning(string.Format(Resources.ServiceExtensionRemovingFromAllRoles, ExtensionName, ServiceName)); + } + else + { + bool defaultExists = configBuilder.ExistDefault(ProviderNamespace, ExtensionName); + foreach (var r in Role) + { + WriteWarning(string.Format(Resources.ServiceExtensionRemovingFromSpecificRoles, ExtensionName, r, ServiceName)); + if (defaultExists) + { + WriteWarning(string.Format(Resources.ServiceExtensionRemovingSpecificAndApplyingDefault, ExtensionName, r)); + } + } + } + + ChangeDeployment(configBuilder.ToConfiguration()); + } + else + { + WriteWarning(string.Format(Resources.ServiceExtensionNoExistingExtensionsEnabledOnRoles, ProviderNamespace, ExtensionName)); + } + } + + protected HostedServiceListExtensionsResponse.Extension GetDiagnosticsExtension() + { + return (from e in this.ComputeClient.HostedServices.ListExtensions(ServiceName).Extensions + where + e.ProviderNamespace == AntimalwareDiagnosticsExtensionNamespace + && e.Type == AntimalwareDiagnosticsExtensionName + select e).LastOrDefault(); + } + + protected HostedServiceListExtensionsResponse.Extension GetAntimalwareExtension() + { + return (from e in this.ComputeClient.HostedServices.ListExtensions(ServiceName).Extensions + where + e.ProviderNamespace == AntimalwareExtensionProviderNamespace + && e.Type == AntimalwareExtensionName + select e).LastOrDefault(); + } + + protected void RemoveExistingAntimalwareMonitoringConfig() + { + // this does not remove the diagnostics extension entirely, it only removes the portion of the + // diagnostics configuration that monitors antimalware events- everything else will remain + // in order to avoid doing harm to any other users who may be sharing the diagnostics extension + + var ext = GetDiagnosticsExtension(); + if (ext != null) + { + string tmpXmlString = ext.PublicConfiguration; + string AntimalwareDataSourceName = "System!*[System[Provider[@Name='Microsoft Antimalware']]]"; + string DiagnosticsConfigXmlNamespace = @"http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration"; + string monitoringStorageAccountName = null; // for temporarily retrieving storage account name when specified in config file + + // remove the data source element with the antimalware event provider + XmlDocument tmpXmlDoc = new XmlDocument(); + tmpXmlDoc.LoadXml(tmpXmlString); + + // retrieve storage account name from public configuration + string stgAcctNameXPath = string.Format(@"//*[local-name()='{0}' and namespace-uri()='{1}']", StorageAccountElemStr, DiagnosticsConfigXmlNamespace); + XmlNode stgAcctNameNode = tmpXmlDoc.DocumentElement.SelectSingleNode(stgAcctNameXPath); + if (stgAcctNameNode != null) + { + monitoringStorageAccountName = stgAcctNameNode.InnerText; + } + if (string.IsNullOrWhiteSpace(monitoringStorageAccountName)) + { + // do not modify diagnostics config without including the storage account + // throw terminating exception since it is not possible to preserve the + // existing storage account with the configuration if it doesn't have a + // hint to what the last storage account was in the public configuration + ThrowTerminatingError(new ErrorRecord( + new Exception(Resources.ServiceExtensionCannotFindStorageAccountName), + string.Empty, + ErrorCategory.InvalidData, + null)); + + return; + } + else + { + // check the storage account and initialize for use + InitializeStorageContext(monitoringStorageAccountName); + } + + // locate the antimalware data source node in the document + string antimalwareDataSourceXPath = string.Format(@"//*[local-name()='{0}' and @name=""{1}"" and namespace-uri()='{2}']", "DataSource", AntimalwareDataSourceName, DiagnosticsConfigXmlNamespace); + XmlNode antimalwareDataSourceNode = tmpXmlDoc.DocumentElement.SelectSingleNode(antimalwareDataSourceXPath); + if (antimalwareDataSourceNode != null) + { + XmlNode windowsEventLogNode = antimalwareDataSourceNode.ParentNode; + if (windowsEventLogNode.RemoveChild(antimalwareDataSourceNode) != null) + { + // remove the windows event log if there are no other child data sources present + // as will be required for schema validation to succeed when sending the new config + // any other data sources outside of the windows event log are left untouched + if (!windowsEventLogNode.HasChildNodes) + { + windowsEventLogNode.ParentNode.RemoveChild(windowsEventLogNode); + } + } + + // now reinstall the diagnostics extension with the updated configuration + InitializeDiagnosticsSettings(); + ExtensionConfigurationInput diagExtConfigInput = new ExtensionConfigurationInput + { + ProviderNameSpace = ProviderNamespace, + Type = ExtensionName, + CertificateThumbprint = CertificateThumbprint, + ThumbprintAlgorithm = ThumbprintAlgorithm, + X509Certificate = X509Certificate, + PublicConfiguration = tmpXmlDoc.OuterXml, + PrivateConfiguration = PrivateConfiguration, + Roles = new ExtensionRoleList(Role != null && Role.Any() ? Role.Select(r => new ExtensionRole(r)) : Enumerable.Repeat(new ExtensionRole(), 1)) + }; + AntimalwareMonitoringExtensionConfigurationInput = diagExtConfigInput; + } + else + { + // no existing antimalware data source was found needing removal + return; + } + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/MicrosoftAntimalware/GetAzureServiceAntimalwareExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/MicrosoftAntimalware/GetAzureServiceAntimalwareExtension.cs new file mode 100644 index 000000000000..640334859975 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/MicrosoftAntimalware/GetAzureServiceAntimalwareExtension.cs @@ -0,0 +1,80 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + /// + /// Get Microsoft Azure Service Antimalware Extension Configuration + /// + [Cmdlet(VerbsCommon.Get, "AzureServiceAntimalwareConfig"), OutputType(typeof(IEnumerable))] + public class GetAzureServiceAntimalwareExtensionCommand : BaseAzureServiceAntimalwareExtensionCmdlet + { + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Service Name")] + [ValidateNotNullOrEmpty] + public override string ServiceName { get; set; } + + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "Deployment Slot: Production (default) or Staging")] + [ValidateSet(DeploymentSlotType.Production, DeploymentSlotType.Staging, IgnoreCase = true)] + public override string Slot { get; set; } + + protected override void ValidateParameters() + { + base.ValidateParameters(); + ValidateService(); + ValidateDeployment(); + } + + public void ExecuteCommand() + { + ValidateParameters(); + + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.ComputeClient.HostedServices.ListExtensions(this.ServiceName), + (s, r) => + { + var extensionRoleList = (from dr in Deployment.Roles + select new ExtensionRole(dr.RoleName)).ToList().Union(new ExtensionRole[] { new ExtensionRole() }); + + return from role in extensionRoleList + from extension in r.Extensions + where (ExtensionManager.CheckNameSpaceType(extension, AntimalwareExtensionProviderNamespace, AntimalwareExtensionName) || + ExtensionManager.CheckNameSpaceType(extension, AntimalwareDiagnosticsExtensionNamespace, AntimalwareDiagnosticsExtensionName)) + && ExtensionManager.GetBuilder(Deployment.ExtensionConfiguration).Exist(role, extension.Id) + select new ExtensionContext + { + OperationId = s.Id, + OperationDescription = CommandRuntime.ToString(), + OperationStatus = s.Status.ToString(), + Extension = extension.Type, + Id = extension.Id, + Role = role, + ProviderNameSpace = extension.ProviderNamespace, + PublicConfiguration = extension.PublicConfiguration + }; + }); + } + + protected override void OnProcessRecord() + { + ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/MicrosoftAntimalware/RemoveAzureServiceAntimalwareExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/MicrosoftAntimalware/RemoveAzureServiceAntimalwareExtension.cs new file mode 100644 index 000000000000..bfbf480dfdf7 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/MicrosoftAntimalware/RemoveAzureServiceAntimalwareExtension.cs @@ -0,0 +1,94 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + using PVM = Model; + + /// + /// Remove Microsoft Azure Service Antimalware Extension + /// + [Cmdlet(VerbsCommon.Remove, "AzureServiceAntimalwareExtension", DefaultParameterSetName = RemoveByRolesParameterSet), OutputType(typeof(ManagementOperationContext))] + public class RemoveAzureServiceAntimalwareExtensionCommand : BaseAzureServiceAntimalwareExtensionCmdlet + { + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = RemoveByRolesParameterSet, HelpMessage = ExtensionParameterPropertyHelper.ServiceNameHelpMessage)] + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = RemoveAllRolesParameterSet, HelpMessage = ExtensionParameterPropertyHelper.ServiceNameHelpMessage)] + public override string ServiceName { get; set; } + + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, ParameterSetName = RemoveByRolesParameterSet, HelpMessage = ExtensionParameterPropertyHelper.SlotHelpMessage)] + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, ParameterSetName = RemoveAllRolesParameterSet, HelpMessage = ExtensionParameterPropertyHelper.SlotHelpMessage)] + [ValidateSet(PVM.DeploymentSlotType.Production, PVM.DeploymentSlotType.Staging, IgnoreCase = true)] + public override string Slot { get; set; } + + [Parameter(Position = 2, ValueFromPipelineByPropertyName = true, ParameterSetName = RemoveByRolesParameterSet, HelpMessage = ExtensionParameterPropertyHelper.RoleHelpMessage)] + public override string[] Role { get; set; } + + [Parameter(Position = 3, Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = RemoveByRolesParameterSet, HelpMessage = "Storage endpoint suffix")] + [Parameter(Position = 3, Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = RemoveAllRolesParameterSet, HelpMessage = "Storage endpoint suffix")] + [ValidateNotNullOrEmpty] + public string EndpointSuffix { get; set; } + + protected override void ValidateParameters() + { + base.ValidateParameters(); + ValidateService(); + ValidateDeployment(); + ValidateRoles(); + ValidateThumbprint(true); + } + + public void ExecuteCommand() + { + InitializeAntimalwareSettings(); + ValidateParameters(); + + RemoveAntimalwareExtension(); + RemoveExistingAntimalwareMonitoringConfig(); + + ExtensionConfigurationInput[] extConfigInputs = null; + if (AntimalwareExtensionConfigurationInput != null && AntimalwareMonitoringExtensionConfigurationInput != null) + { + extConfigInputs = new ExtensionConfigurationInput[2]; + extConfigInputs[0] = AntimalwareMonitoringExtensionConfigurationInput; + extConfigInputs[1] = AntimalwareExtensionConfigurationInput; + } + else if (AntimalwareExtensionConfigurationInput != null) + { + extConfigInputs = new ExtensionConfigurationInput[1]; + extConfigInputs[0] = AntimalwareExtensionConfigurationInput; + } + else if (AntimalwareMonitoringExtensionConfigurationInput != null) + { + extConfigInputs = new ExtensionConfigurationInput[1]; + extConfigInputs[0] = AntimalwareMonitoringExtensionConfigurationInput; + } + + // process any pending deployment changes + if (extConfigInputs != null) + { + ExtensionConfiguration newExtConfig = ExtensionManager.Add(Deployment, extConfigInputs, Slot); + ChangeDeployment(newExtConfig); + } + } + + protected override void OnProcessRecord() + { + ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/MicrosoftAntimalware/SetAzureServiceAntimalwareExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/MicrosoftAntimalware/SetAzureServiceAntimalwareExtension.cs new file mode 100644 index 000000000000..15c4c996695a --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/MicrosoftAntimalware/SetAzureServiceAntimalwareExtension.cs @@ -0,0 +1,457 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Xml; +using System.Xml.Schema; +using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + // to invoke script from within cmdlet + using PVM = Model; + + /// + /// Set Microsoft Azure Service Antimalware Extension. + /// + [Cmdlet(VerbsCommon.Set, "AzureServiceAntimalwareExtension", DefaultParameterSetName = SetExtensionParameterSetName), OutputType(typeof(ManagementOperationContext))] + public class SetAzureServiceAntimalwareExtensionCommand : BaseAzureServiceAntimalwareExtensionCmdlet + { + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = SetExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.ServiceNameHelpMessage)] + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = SetExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.ServiceNameHelpMessage)] + [ValidateNotNullOrEmpty] + public override string ServiceName { get; set; } + + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, Mandatory = false, ParameterSetName = SetExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.SlotHelpMessage)] + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, Mandatory = false, ParameterSetName = SetExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.SlotHelpMessage)] + [ValidateSet(PVM.DeploymentSlotType.Production, PVM.DeploymentSlotType.Staging, IgnoreCase = true)] + public override string Slot { get; set; } + + [Parameter(Position = 2, ValueFromPipelineByPropertyName = true, Mandatory = false, ParameterSetName = SetExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.RoleHelpMessage)] + [Parameter(Position = 2, ValueFromPipelineByPropertyName = true, Mandatory = false, ParameterSetName = SetExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.RoleHelpMessage)] + [ValidateNotNullOrEmpty] + public override string[] Role { get; set; } + + [Parameter(Position = 3, ValueFromPipelineByPropertyName = true, Mandatory = false, ParameterSetName = SetExtensionParameterSetName, HelpMessage = "The Antimalware Configuration cannot be null or empty and must include at a minimum true to enable Microsoft Antimalware.")] + [Parameter(Position = 3, ValueFromPipelineByPropertyName = true, Mandatory = false, ParameterSetName = SetExtensionUsingThumbprintParameterSetName, HelpMessage = "The Antimalware Configuration cannot be null or empty and must include at a minimum true to enable Microsoft Antimalware.")] + [ValidateNotNullOrEmpty] + public override XmlDocument AntimalwareConfiguration { get; set; } + + [Parameter(Position = 4, ValueFromPipelineByPropertyName = true, Mandatory = false, ParameterSetName = SetExtensionParameterSetName, HelpMessage = "Monitoring (ON = antimalware events logged to storage, OFF = no event logging)")] + [Parameter(Position = 4, ValueFromPipelineByPropertyName = true, Mandatory = false, ParameterSetName = SetExtensionUsingThumbprintParameterSetName, HelpMessage = "Monitoring (ON = antimalware events logged to storage, OFF = no event logging)")] + [ValidateSet("ON", "OFF", IgnoreCase = true)] + public string Monitoring { get; set; } + + [Parameter(Position = 5, ValueFromPipelineByPropertyName = true, Mandatory = false, ParameterSetName = SetExtensionParameterSetName, HelpMessage = "Microsoft Antimalware Monitoring Storage Context")] + [Parameter(Position = 5, ValueFromPipelineByPropertyName = true, Mandatory = false, ParameterSetName = SetExtensionUsingThumbprintParameterSetName, HelpMessage = "Microsoft Antimalware Monitoring Storage Context")] + [ValidateNotNullOrEmpty] + public override AzureStorageContext StorageContext { get; set; } + + private bool isAntimalwareEnabled = false; // do not enable antimalware unless specified in configuration or parameters + private enum MonitoringActionType { Enable, Disable, NoActionRequested } ; + private MonitoringActionType monitoringAction = MonitoringActionType.NoActionRequested; // default to no action requested until identified in config or parameter + + private string monitoringStorageAccountName; // for retrieving storage account name when specified in config file + + protected override void ValidateParameters() + { + base.ValidateParameters(); + ValidateService(); + ValidateDeployment(); + ValidateRoles(); + ValidateThumbprint(true); + ValidateConfiguration(); + } + + private void AddNewAntimalwareMonitoringConfig() + { + // install diagnostics provider with a new antimalware event monitoring config + InitializeDiagnosticsSettings(); + ExtensionConfigurationInput diagExtConfigInput = new ExtensionConfigurationInput + { + ProviderNameSpace = ProviderNamespace, + Type = ExtensionName, + CertificateThumbprint = CertificateThumbprint, + ThumbprintAlgorithm = ThumbprintAlgorithm, + X509Certificate = X509Certificate, + PublicConfiguration = PublicConfiguration, + PrivateConfiguration = PrivateConfiguration, + Roles = new ExtensionRoleList(Role != null && Role.Any() ? Role.Select(r => new ExtensionRole(r)) : Enumerable.Repeat(new ExtensionRole(), 1)) + }; + AntimalwareMonitoringExtensionConfigurationInput = diagExtConfigInput; + } + + private void MergeAntimalwareMonitoringIntoExistingConfig(string existingConfigXmlStr) + { + // prepare a new xml document to hold the merged config + XmlDocument mergedConfig = new XmlDocument(); + mergedConfig.LoadXml(existingConfigXmlStr); + + // check if old config already contains a WindowsEventLog section + string targetNode; + string mergeXmlStr; + if (existingConfigXmlStr.Contains(DiagnosticsConfigWindowsEventLogNodeName)) + { + // inject into the existing windows event log section + targetNode = DiagnosticsConfigWindowsEventLogNodeName; + mergeXmlStr = DiagnosticsDefaultConfigMergeXmlWithExistingEventLogNode; + } + else + { + // inject a windows event log section with antimalware monitoring into the diagnostics config + targetNode = DiagnosticsConfigNodeName; + mergeXmlStr = DiagnosticsDefaultConfigMergeXmlWithoutExistingEventLogNode; + } + + // locate the desired target using xpath + string diagXPathStr = String.Format("//*[local-name()='{0}' and namespace-uri()='{1}']", targetNode, DiagnosticsConfigXmlNamespace); + XmlNode diagNode = mergedConfig.DocumentElement.SelectSingleNode(diagXPathStr); + + // create an import node and then append to the correct location + XmlDocument diagnosticsConfigXml = new XmlDocument(); + diagnosticsConfigXml.LoadXml(mergeXmlStr); + + XmlNode importNode = mergedConfig.ImportNode(diagnosticsConfigXml.DocumentElement, true); + diagNode.AppendChild(importNode); + + // Note : Currently any pre-existing user of the diagnostics configuration will be expected + // to follow convention of specifying storage account name in the xml configuration so that + // it can be persisted across configuration changes being made by multiple users. + + // remove any stray xmlns="" attribute from xml string prior to use + string mergedConfiguration = mergedConfig.OuterXml.Replace(@"xmlns=""""", ""); + + // set up for reinstall of the extension with the new configuration + InitializeDiagnosticsSettings(); + AntimalwareMonitoringExtensionConfigurationInput = new ExtensionConfigurationInput + { + ProviderNameSpace = ProviderNamespace, + Type = ExtensionName, + CertificateThumbprint = CertificateThumbprint, + ThumbprintAlgorithm = ThumbprintAlgorithm, + X509Certificate = X509Certificate, + PublicConfiguration = mergedConfiguration, + PrivateConfiguration = PrivateConfiguration, + Roles = new ExtensionRoleList(Role != null && Role.Any() ? Role.Select(r => new ExtensionRole(r)) : Enumerable.Repeat(new ExtensionRole(), 1)) + }; + + } + + protected void SaveMonitoringConfiguration(string publicConfiguration) + { + // load the public configuration xml string for parsing + StringReader stringReader = new StringReader(publicConfiguration); + XmlReaderSettings settings = new XmlReaderSettings(); + settings.DtdProcessing = DtdProcessing.Prohibit; + settings.XmlResolver = null; + XmlReader xmlReader = XmlReader.Create(stringReader, settings); + XmlDocument currCfg = new XmlDocument(); + currCfg.Load(xmlReader); + + // extract the monitoring config portion, convert to string, strip namespace + string xpath = String.Format("//*[local-name()='{0}' and namespace-uri()='{1}']", DiagnosticsConfigElementName, DiagnosticsConfigXmlNamespace); + string monCfgStr = currCfg.DocumentElement.SelectSingleNode(xpath).InnerXml; + monCfgStr = monCfgStr.Replace(" xmlns=\"" + DiagnosticsConfigXmlNamespace + "\"", ""); + + // load the extracted configuration into AntimalwareMonitoringConfig + stringReader = new StringReader(monCfgStr); + xmlReader = XmlReader.Create(stringReader, settings); + AntimalwareMonitoringConfig = new XmlDocument(); + AntimalwareMonitoringConfig.Load(xmlReader); + } + + protected void EnableMonitoring() + { + // retrieve any pre-existing diagnostics extension + var ext = GetDiagnosticsExtension(); + + if ( (ext == null) && + ((monitoringAction==MonitoringActionType.Disable) || (monitoringAction == MonitoringActionType.NoActionRequested)) ) + { + // if there was no pre-existing diagnostics extension there is + // nothing to do in either of these two cases so exit early + + // note the user may not have provided a storage account either + // so this check is performed prior to storage account validation + return; + } + + // establish the storage account name to be associated with monitoring + if (!IsValidStorageContext() && (!string.IsNullOrWhiteSpace(monitoringStorageAccountName))) + { + // no valid storage context exists, try to initialize storage context using provided account name + InitializeStorageContext(monitoringStorageAccountName); + } + + if (!IsValidStorageContext()) + { + // still unable to associate the storage account name with a valid storage context + ThrowTerminatingError(new ErrorRecord( + new Exception("Required storage context is missing or invalid"), + string.Empty, + ErrorCategory.InvalidData, + null)); + } + + if (ext != null) + { + // save the current configuration of the diagnostics extension + // in the event we do not end up needing to modify it but need + // to persist the config in the final call to change deployment + InitializeDiagnosticsSettings(); + AntimalwareMonitoringExtensionConfigurationInput = new ExtensionConfigurationInput + { + ProviderNameSpace = ProviderNamespace, + Type = ExtensionName, + CertificateThumbprint = CertificateThumbprint, + ThumbprintAlgorithm = ThumbprintAlgorithm, + X509Certificate = X509Certificate, + PublicConfiguration = ext.PublicConfiguration, + PrivateConfiguration = PrivateConfiguration, + Roles = new ExtensionRoleList(Role != null && Role.Any() ? Role.Select(r => new ExtensionRole(r)) : Enumerable.Repeat(new ExtensionRole(), 1)) + }; + } + + switch (monitoringAction) + { + case (MonitoringActionType.Enable) : + if (ext == null) + { + AddNewAntimalwareMonitoringConfig(); + } + else + { + // extension already exists, check to see if it already contains antimalware data source + if (!ext.PublicConfiguration.Contains(DiagnosticsConfigAntimalwareProviderToken)) + { + // antimalware data source is not already in the configuration, merge it + // with existing config (tracking perf counters, other event logs, etc.) + MergeAntimalwareMonitoringIntoExistingConfig(ext.PublicConfiguration); + } + else + { + // in this case we preserve monitoring configuration but + // apply any changes to storage context that may be needed + + SaveMonitoringConfiguration(ext.PublicConfiguration); + InitializeDiagnosticsSettings(); + AntimalwareMonitoringExtensionConfigurationInput = new ExtensionConfigurationInput + { + ProviderNameSpace = ProviderNamespace, + Type = ExtensionName, + CertificateThumbprint = CertificateThumbprint, + ThumbprintAlgorithm = ThumbprintAlgorithm, + X509Certificate = X509Certificate, + PublicConfiguration = PublicConfiguration, + PrivateConfiguration = PrivateConfiguration, + Roles = new ExtensionRoleList(Role != null && Role.Any() ? Role.Select(r => new ExtensionRole(r)) : Enumerable.Repeat(new ExtensionRole(), 1)) + }; + } + } + break; + + case (MonitoringActionType.Disable) : + if (ext != null) + { + RemoveExistingAntimalwareMonitoringConfig(); + } + break; + + case (MonitoringActionType.NoActionRequested) : + break; + + default: + break; + } + } + + private void ValidateAntimalwareConfigToXsd() + { + if ((AntimalwareConfiguration != null) && (!string.IsNullOrWhiteSpace(AntimalwareConfiguration.OuterXml))) + { + // load the xsd + StringReader xsdStringReader = new StringReader(AntimalwareConfigurationXsd); + XmlSchema antimalwareXsd = XmlSchema.Read(xsdStringReader, ValidationHandler); + string testXml = AntimalwareConfiguration.OuterXml; + + XmlReaderSettings settings = new XmlReaderSettings(); + settings.DtdProcessing = DtdProcessing.Prohibit; + settings.XmlResolver = null; + settings.CloseInput = true; + settings.ValidationEventHandler += ValidationHandler; + settings.ValidationType = ValidationType.Schema; + settings.Schemas.Add(antimalwareXsd); + settings.ValidationFlags = + XmlSchemaValidationFlags.ReportValidationWarnings | + XmlSchemaValidationFlags.ProcessIdentityConstraints | + XmlSchemaValidationFlags.ProcessInlineSchema | + XmlSchemaValidationFlags.ProcessSchemaLocation; + + StringReader r = new StringReader(testXml); + using (XmlReader validatingReader = XmlReader.Create(r, settings)) + { + while (validatingReader.Read()) { /* just loop through document */ } + } + } + } + + private void ValidationHandler(object sender, ValidationEventArgs e) + { + if (e.Severity == XmlSeverityType.Error || e.Severity == XmlSeverityType.Warning) + { + string validationErrorText = String.Format("XML Schema Validation Failed - Line: {0}, Position: {1} \"{2}\"",e.Exception.LineNumber, e.Exception.LinePosition, e.Exception.Message); + ThrowTerminatingError(new ErrorRecord( + new Exception(validationErrorText), + string.Empty, + ErrorCategory.InvalidData, + null)); + } + } + + protected override void ValidateConfiguration() + { + // read values from xml file if provided + if (AntimalwareConfiguration != null) + { + // validate conformance to schema + ValidateAntimalwareConfigToXsd(); + + // check for antimalware enabled + XmlNode antimalwareEnabledNode = AntimalwareConfiguration.SelectSingleNode("//AntimalwareConfig/AntimalwareEnabled"); + if ((antimalwareEnabledNode != null) && (antimalwareEnabledNode.InnerText != null)) + { + isAntimalwareEnabled = antimalwareEnabledNode.InnerText.ToUpperInvariant().Equals("TRUE"); + } + + // check for monitoring enabled + XmlNode monitoringNode = AntimalwareConfiguration.SelectSingleNode("//AntimalwareConfig/Monitoring"); + if (monitoringNode != null) + { + if (monitoringNode.InnerText != null) + { + switch (monitoringNode.InnerText.ToUpperInvariant()) + { + case "ON": monitoringAction = MonitoringActionType.Enable; break; + case "OFF": monitoringAction = MonitoringActionType.Disable; break; + default: break; + } + } + + // now remove the monitoring node from the xml document since it + // is not recognized by the schema used by the antimalware extension + monitoringNode.ParentNode.RemoveChild(monitoringNode); + } + + // check for storage account name if present in the config file + XmlNode storageAccountNameNode = AntimalwareConfiguration.SelectSingleNode("//AntimalwareConfig/StorageAccountName"); + if (storageAccountNameNode != null) + { + if (storageAccountNameNode.InnerText != null) + { + monitoringStorageAccountName = storageAccountNameNode.InnerText; + } + // strip this node from the xml prior to passing to antimalware extension + storageAccountNameNode.ParentNode.RemoveChild(storageAccountNameNode); + } + + // error if configuration does not opt in to enable antimalware + if (!isAntimalwareEnabled) + { + ThrowTerminatingError(new ErrorRecord( + new Exception(Resources.ServiceExtensionCannotFindAntimalwareEnableSetting), + string.Empty, + ErrorCategory.InvalidData, + null)); + } + } + + // process Monitoring parameter if specified (will override any setting in xml config) + if (Monitoring != null) + { + switch (Monitoring.ToUpperInvariant()) + { + case "ON": monitoringAction = MonitoringActionType.Enable; break; + case "OFF": monitoringAction = MonitoringActionType.Disable; break; + default: break; + } + } + + } + + public void ExecuteCommand() + { + ValidateParameters(); + + // prepare diagnostics extension + switch (monitoringAction) + { + case MonitoringActionType.Enable : EnableMonitoring(); break; + case MonitoringActionType.Disable : RemoveExistingAntimalwareMonitoringConfig(); break; + default: break; + } + + // prepare antimalware extension + if (isAntimalwareEnabled) + { + InitializeAntimalwareSettings(); + ExtensionConfigurationInput amExtConfigInput = new ExtensionConfigurationInput + { + ProviderNameSpace = ProviderNamespace, + Type = ExtensionName, + PublicConfiguration = PublicConfiguration, + PrivateConfiguration = PrivateConfiguration, + Roles = new ExtensionRoleList(Role != null && Role.Any() ? Role.Select(r => new ExtensionRole(r)) : Enumerable.Repeat(new ExtensionRole(), 1)) + }; + AntimalwareExtensionConfigurationInput = amExtConfigInput; + } + + // update extensions as appropriate + ExtensionConfigurationInput[] extConfigInputs = null; + if (AntimalwareExtensionConfigurationInput != null && AntimalwareMonitoringExtensionConfigurationInput != null) + { + extConfigInputs = new ExtensionConfigurationInput[2]; + extConfigInputs[0] = AntimalwareMonitoringExtensionConfigurationInput; + extConfigInputs[1] = AntimalwareExtensionConfigurationInput; + } + else if (AntimalwareExtensionConfigurationInput != null) + { + extConfigInputs = new ExtensionConfigurationInput[1]; + extConfigInputs[0] = AntimalwareExtensionConfigurationInput; + } + else if (AntimalwareMonitoringExtensionConfigurationInput!=null) + { + extConfigInputs = new ExtensionConfigurationInput[1]; + extConfigInputs[0] = AntimalwareMonitoringExtensionConfigurationInput; + } + + // process any pending deployment changes + if (extConfigInputs != null) + { + ExtensionConfiguration newExtConfig = ExtensionManager.Add(Deployment, extConfigInputs, Slot); + ChangeDeployment(newExtConfig); + } + } + + protected override void OnProcessRecord() + { + ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/RDP/BaseAzureServiceRemoteDesktopExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/RDP/BaseAzureServiceRemoteDesktopExtension.cs new file mode 100644 index 000000000000..d9694e813687 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/RDP/BaseAzureServiceRemoteDesktopExtension.cs @@ -0,0 +1,71 @@ +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Xml.Linq; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + public abstract class BaseAzureServiceRemoteDesktopExtensionCmdlet : BaseAzureServiceExtensionCmdlet + { + protected const string UserNameElemStr = "UserName"; + protected const string ExpirationElemStr = "Expiration"; + protected const string PasswordElemStr = "Password"; + protected const string RDPExtensionNamespace = "Microsoft.Windows.Azure.Extensions"; + protected const string RDPExtensionType = "RDP"; + + public virtual PSCredential Credential { get; set; } + public virtual DateTime Expiration { get; set; } + + public BaseAzureServiceRemoteDesktopExtensionCmdlet() + : base() + { + } + + protected override void ValidateParameters() + { + base.ValidateParameters(); + ProviderNamespace = RDPExtensionNamespace; + ExtensionName = RDPExtensionType; + + PublicConfigurationXmlTemplate = new XDocument( + new XDeclaration("1.0", "utf-8", null), + new XProcessingInstruction("xml-stylesheet", @"type=""text/xsl"" href=""style.xsl"""), + new XElement(PublicConfigStr, + new XElement(UserNameElemStr, string.Empty), + new XElement(ExpirationElemStr, string.Empty) + ) + ); + + PrivateConfigurationXmlTemplate = new XDocument( + new XDeclaration("1.0", "utf-8", null), + new XProcessingInstruction("xml-stylesheet", @"type=""text/xsl"" href=""style.xsl"""), + new XElement(PrivateConfigStr, + new XElement(PasswordElemStr, string.Empty) + ) + ); + } + + protected override void ValidateConfiguration() + { + PublicConfigurationXml = new XDocument(PublicConfigurationXmlTemplate); + SetPublicConfigValue(UserNameElemStr, Credential.UserName); + SetPublicConfigValue(ExpirationElemStr, Expiration.ToString("yyyy-MM-dd")); + PublicConfiguration = PublicConfigurationXml.ToString(); + + PrivateConfigurationXml = new XDocument(PrivateConfigurationXmlTemplate); + SetPrivateConfigValue(PasswordElemStr, Credential.Password.ConvertToUnsecureString()); + PrivateConfiguration = PrivateConfigurationXml.ToString(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/RDP/GetAzureServiceRemoteDesktopExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/RDP/GetAzureServiceRemoteDesktopExtension.cs new file mode 100644 index 000000000000..4c1cd0aef63f --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/RDP/GetAzureServiceRemoteDesktopExtension.cs @@ -0,0 +1,86 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + /// + /// Get Microsoft Azure Service Remote Desktop Extension. + /// + [Cmdlet(VerbsCommon.Get, "AzureServiceRemoteDesktopExtension"), OutputType(typeof(RemoteDesktopExtensionContext))] + public class GetAzureServiceRemoteDesktopExtensionCommand : BaseAzureServiceRemoteDesktopExtensionCmdlet + { + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, HelpMessage = "Service Name")] + public override string ServiceName + { + get; + set; + } + + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, HelpMessage = "Deployment Slot: Production (default) or Staging")] + [ValidateSet(DeploymentSlotType.Production, DeploymentSlotType.Staging, IgnoreCase = true)] + public override string Slot + { + get; + set; + } + + protected override void ValidateParameters() + { + base.ValidateParameters(); + ValidateService(); + ValidateDeployment(); + } + + public void ExecuteCommand() + { + ValidateParameters(); + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.ComputeClient.HostedServices.ListExtensions(this.ServiceName), + (s, r) => + { + var extensionRoleList = (from dr in Deployment.Roles + select new ExtensionRole(dr.RoleName)).ToList().Union(new ExtensionRole[] { new ExtensionRole() }); + + return from role in extensionRoleList + from extension in r.Extensions + where ExtensionManager.CheckNameSpaceType(extension, ProviderNamespace, ExtensionName) + && ExtensionManager.GetBuilder(Deployment.ExtensionConfiguration).Exist(role, extension.Id) + select new RemoteDesktopExtensionContext + { + OperationId = s.Id, + OperationDescription = CommandRuntime.ToString(), + OperationStatus = s.Status.ToString(), + Extension = extension.Type, + ProviderNameSpace = extension.ProviderNamespace, + Id = extension.Id, + Role = role, + UserName = GetPublicConfigValue(extension, UserNameElemStr), + Expiration = GetPublicConfigValue(extension, ExpirationElemStr), + Version = extension.Version + }; + }); + } + + protected override void OnProcessRecord() + { + ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/RDP/NewAzureServiceRemoteDesktopExtensionConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/RDP/NewAzureServiceRemoteDesktopExtensionConfig.cs new file mode 100644 index 000000000000..c6f9977b1e98 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/RDP/NewAzureServiceRemoteDesktopExtensionConfig.cs @@ -0,0 +1,118 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using System.Security.Cryptography.X509Certificates; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + /// + /// New Microsoft Azure Service Remote Desktop Extension. + /// + [Cmdlet(VerbsCommon.New, "AzureServiceRemoteDesktopExtensionConfig", DefaultParameterSetName = NewExtensionParameterSetName), OutputType(typeof(ExtensionConfigurationInput))] + public class NewAzureServiceRemoteDesktopExtensionConfigCommand : BaseAzureServiceRemoteDesktopExtensionCmdlet + { + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = NewExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.RoleHelpMessage)] + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = NewExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.RoleHelpMessage)] + [ValidateNotNullOrEmpty] + public override string[] Role + { + get; + set; + } + + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, ParameterSetName = NewExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.X509CertificateHelpMessage)] + [ValidateNotNullOrEmpty] + public override X509Certificate2 X509Certificate + { + get; + set; + } + + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = NewExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.CertificateThumbprintHelpMessage)] + [ValidateNotNullOrEmpty] + public override string CertificateThumbprint + { + get; + set; + } + + [Parameter(Position = 2, ValueFromPipelineByPropertyName = true, ParameterSetName = NewExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.ThumbprintAlgorithmHelpMessage)] + [Parameter(Position = 2, ValueFromPipelineByPropertyName = true, ParameterSetName = NewExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.ThumbprintAlgorithmHelpMessage)] + [ValidateNotNullOrEmpty] + public override string ThumbprintAlgorithm + { + get; + set; + } + + [Parameter(Position = 3, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = NewExtensionParameterSetName, HelpMessage = "Remote Desktop Credential")] + [Parameter(Position = 3, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = NewExtensionUsingThumbprintParameterSetName, HelpMessage = "Remote Desktop Credential")] + public override PSCredential Credential + { + get; + set; + } + + [Parameter(Position = 4, ValueFromPipelineByPropertyName = true, ParameterSetName = NewExtensionParameterSetName, HelpMessage = "Remote Desktop User Expiration Date")] + [Parameter(Position = 4, ValueFromPipelineByPropertyName = true, ParameterSetName = NewExtensionUsingThumbprintParameterSetName, HelpMessage = "Remote Desktop User Expiration Date")] + [ValidateNotNullOrEmpty] + public override DateTime Expiration + { + get; + set; + } + + [Parameter(Position = 5, ValueFromPipelineByPropertyName = true, ParameterSetName = NewExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.VersionHelpMessage)] + [Parameter(Position = 5, ValueFromPipelineByPropertyName = true, ParameterSetName = NewExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.VersionHelpMessage)] + [ValidateNotNullOrEmpty] + public override string Version + { + get; + set; + } + + protected override void ValidateParameters() + { + base.ValidateParameters(); + ValidateThumbprint(false); + Expiration = Expiration.Equals(default(DateTime)) ? DateTime.Now.AddMonths(12) : Expiration; + ValidateConfiguration(); + } + + public void ExecuteCommand() + { + ValidateParameters(); + WriteObject(new ExtensionConfigurationInput + { + CertificateThumbprint = CertificateThumbprint, + ThumbprintAlgorithm = ThumbprintAlgorithm, + ProviderNameSpace = ProviderNamespace, + Type = ExtensionName, + PublicConfiguration = PublicConfiguration, + PrivateConfiguration = PrivateConfiguration, + X509Certificate = X509Certificate, + Version = Version, + Roles = new ExtensionRoleList(Role != null && Role.Any() ? Role.Select(r => new ExtensionRole(r)) : Enumerable.Repeat(new ExtensionRole(), 1)) + }); + } + + protected override void OnProcessRecord() + { + ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/RDP/RemoteDesktopExtensionContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/RDP/RemoteDesktopExtensionContext.cs new file mode 100644 index 000000000000..a95bac6edfd7 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/RDP/RemoteDesktopExtensionContext.cs @@ -0,0 +1,22 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + public class RemoteDesktopExtensionContext : ExtensionContext + { + public string UserName { get; set; } + public string Expiration { get; set; } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/RDP/RemoveAzureServiceRemoteDesktopExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/RDP/RemoveAzureServiceRemoteDesktopExtension.cs new file mode 100644 index 000000000000..954518347101 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/RDP/RemoveAzureServiceRemoteDesktopExtension.cs @@ -0,0 +1,121 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + /// + /// Remove Microsoft Azure Service Remote Desktop Extension. + /// + [Cmdlet(VerbsCommon.Remove, "AzureServiceRemoteDesktopExtension", DefaultParameterSetName = RemoveByRolesParameterSet), OutputType(typeof(ManagementOperationContext))] + public class RemoveAzureServiceRemoteDesktopExtensionCommand : BaseAzureServiceRemoteDesktopExtensionCmdlet + { + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = RemoveByRolesParameterSet, HelpMessage = ExtensionParameterPropertyHelper.ServiceNameHelpMessage)] + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = RemoveAllRolesParameterSet, HelpMessage = ExtensionParameterPropertyHelper.ServiceNameHelpMessage)] + public override string ServiceName + { + get; + set; + } + + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, ParameterSetName = RemoveByRolesParameterSet, HelpMessage = ExtensionParameterPropertyHelper.SlotHelpMessage)] + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, ParameterSetName = RemoveAllRolesParameterSet, HelpMessage = ExtensionParameterPropertyHelper.SlotHelpMessage)] + [ValidateSet(DeploymentSlotType.Production, DeploymentSlotType.Staging, IgnoreCase = true)] + public override string Slot + { + get; + set; + } + + [Parameter(Position = 2, ValueFromPipelineByPropertyName = true, ParameterSetName = RemoveByRolesParameterSet, HelpMessage = ExtensionParameterPropertyHelper.RoleHelpMessage)] + public override string[] Role + { + get; + set; + } + + [Parameter(Position = 2, Mandatory = true, ParameterSetName = RemoveAllRolesParameterSet, HelpMessage = ExtensionParameterPropertyHelper.UninstallConfigurationHelpMessage)] + public override SwitchParameter UninstallConfiguration + { + get; + set; + } + + protected override void ValidateParameters() + { + base.ValidateParameters(); + ValidateService(); + ValidateDeployment(); + ValidateRoles(); + } + + public void ExecuteCommand() + { + ValidateParameters(); + ExtensionConfigurationBuilder configBuilder = ExtensionManager.GetBuilder(Deployment != null ? Deployment.ExtensionConfiguration : null); + if (UninstallConfiguration && configBuilder.ExistAny(ProviderNamespace, ExtensionName)) + { + configBuilder.RemoveAny(ProviderNamespace, ExtensionName); + WriteVerbose(string.Format(Resources.ServiceExtensionRemovingFromAllRoles, ExtensionName, ServiceName)); + ChangeDeployment(configBuilder.ToConfiguration()); + } + else if (configBuilder.Exist(Role, ProviderNamespace, ExtensionName)) + { + configBuilder.Remove(Role, ProviderNamespace, ExtensionName); + if (Role == null || !Role.Any()) + { + WriteVerbose(string.Format(Resources.ServiceExtensionRemovingFromAllRoles, ExtensionName, ServiceName)); + } + else + { + bool defaultExists = configBuilder.ExistDefault(ProviderNamespace, ExtensionName); + foreach (var r in Role) + { + WriteVerbose(string.Format(Resources.ServiceExtensionRemovingFromSpecificRoles, ExtensionName, r, ServiceName)); + if (defaultExists) + { + WriteVerbose(string.Format(Resources.ServiceExtensionRemovingSpecificAndApplyingDefault, ExtensionName, r)); + } + } + } + ChangeDeployment(configBuilder.ToConfiguration()); + } + else + { + WriteVerbose(string.Format(Resources.ServiceExtensionNoExistingExtensionsEnabledOnRoles, ProviderNamespace, ExtensionName)); + } + + if (UninstallConfiguration) + { + var allConfig = ExtensionManager.GetBuilder(); + var deploymentList = (from slot in (new string[] { DeploymentSlotType.Production, DeploymentSlotType.Staging }) + let d = GetDeployment(slot) + where d != null + select d).ToList(); + deploymentList.ForEach(d => allConfig.Add(d.ExtensionConfiguration)); + ExtensionManager.Uninstall(ProviderNamespace, ExtensionName, allConfig.ToConfiguration()); + } + } + + protected override void OnProcessRecord() + { + ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/RDP/SetAzureServiceRemoteDesktopExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/RDP/SetAzureServiceRemoteDesktopExtension.cs new file mode 100644 index 000000000000..36ac0f8a9e85 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Extensions/RDP/SetAzureServiceRemoteDesktopExtension.cs @@ -0,0 +1,144 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using System.Security.Cryptography.X509Certificates; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions +{ + /// + /// Set Microsoft Azure Service Remote Desktop Extension. + /// + [Cmdlet(VerbsCommon.Set, "AzureServiceRemoteDesktopExtension", DefaultParameterSetName = SetExtensionParameterSetName), OutputType(typeof(ManagementOperationContext))] + public class SetAzureServiceRemoteDesktopExtensionCommand : BaseAzureServiceRemoteDesktopExtensionCmdlet + { + + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.ServiceNameHelpMessage)] + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.ServiceNameHelpMessage)] + public override string ServiceName + { + get; + set; + } + + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.SlotHelpMessage)] + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.SlotHelpMessage)] + [ValidateSet(DeploymentSlotType.Production, DeploymentSlotType.Staging, IgnoreCase = true)] + public override string Slot + { + get; + set; + } + + [Parameter(Position = 2, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.RoleHelpMessage)] + [Parameter(Position = 2, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.RoleHelpMessage)] + [ValidateNotNullOrEmpty] + public override string[] Role + { + get; + set; + } + + [Parameter(Position = 3, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.X509CertificateHelpMessage)] + [ValidateNotNullOrEmpty] + public override X509Certificate2 X509Certificate + { + get; + set; + } + + [Parameter(Position = 3, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = SetExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.CertificateThumbprintHelpMessage)] + [ValidateNotNullOrEmpty] + public override string CertificateThumbprint + { + get; + set; + } + + [Parameter(Position = 4, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.ThumbprintAlgorithmHelpMessage)] + [Parameter(Position = 4, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.ThumbprintAlgorithmHelpMessage)] + [ValidateNotNullOrEmpty] + public override string ThumbprintAlgorithm + { + get; + set; + } + + [Parameter(Position = 5, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = SetExtensionParameterSetName, HelpMessage = "Remote Desktop Credential")] + [Parameter(Position = 5, ValueFromPipelineByPropertyName = true, Mandatory = true, ParameterSetName = SetExtensionUsingThumbprintParameterSetName, HelpMessage = "Remote Desktop Credential ")] + [ValidateNotNullOrEmpty] + public override PSCredential Credential + { + get; + set; + } + + [Parameter(Position = 6, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionParameterSetName, HelpMessage = "Remote Desktop User Expiration Date")] + [Parameter(Position = 6, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionUsingThumbprintParameterSetName, HelpMessage = "Remote Desktop User Expiration Date")] + [ValidateNotNullOrEmpty] + public override DateTime Expiration + { + get; + set; + } + + [Parameter(Position = 7, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.VersionHelpMessage)] + [Parameter(Position = 7, ValueFromPipelineByPropertyName = true, ParameterSetName = SetExtensionUsingThumbprintParameterSetName, HelpMessage = ExtensionParameterPropertyHelper.VersionHelpMessage)] + [ValidateNotNullOrEmpty] + public override string Version + { + get; + set; + } + + protected override void ValidateParameters() + { + base.ValidateParameters(); + ValidateService(); + ValidateDeployment(); + ValidateRoles(); + ValidateThumbprint(true); + Expiration = Expiration.Equals(default(DateTime)) ? DateTime.Now.AddMonths(12) : Expiration; + ValidateConfiguration(); + } + + public void ExecuteCommand() + { + ValidateParameters(); + ExtensionConfigurationInput context = new ExtensionConfigurationInput + { + ProviderNameSpace = ProviderNamespace, + Type = ExtensionName, + CertificateThumbprint = CertificateThumbprint, + ThumbprintAlgorithm = ThumbprintAlgorithm, + X509Certificate = X509Certificate, + PublicConfiguration = PublicConfiguration, + PrivateConfiguration = PrivateConfiguration, + Version = Version, + Roles = new ExtensionRoleList(Role != null && Role.Any() ? Role.Select(r => new ExtensionRole(r)) : Enumerable.Repeat(new ExtensionRole(), 1)) + }; + var extConfig = ExtensionManager.InstallExtension(context, Slot, Deployment.ExtensionConfiguration); + ChangeDeployment(extConfig); + } + + protected override void OnProcessRecord() + { + ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Helpers/CertUtils.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Helpers/CertUtils.cs new file mode 100644 index 000000000000..b0269c208601 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Helpers/CertUtils.cs @@ -0,0 +1,170 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Security.Cryptography; +using System.Security.Cryptography.X509Certificates; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers +{ + public static class CertUtilsNewSM + { + private const string LocalMachine = "LocalMachine"; + private const string MyStoreName = "My"; + + public static bool HasExportablePrivateKey(X509Certificate2 cert) + { + if (!cert.HasPrivateKey) + { + return false; + } + + try + { + cert.Export(X509ContentType.Pfx); + } + catch (CryptographicException) + { + return false; + } + + return true; + } + + public static ServiceCertificateCreateParameters Create(X509Certificate2 certificate) + { + return Create(certificate, false); + } + + public static ServiceCertificateCreateParameters Create(X509Certificate2 certificate, bool dropPrivateKey) + { + if (dropPrivateKey) + { + certificate = DropPrivateKey(certificate); + } + + var password = RandomBase64PasswordString(); + var certificateData = GetCertificateData(certificate, password); + var certificateFile = new ServiceCertificateCreateParameters + { + Data = certificateData, + Password = password, + CertificateFormat = CertificateFormat.Pfx + }; + + return certificateFile; + } + + public static byte[] GetCertificateData(X509Certificate2 cert) + { + try + { + return cert.HasPrivateKey ? cert.Export(X509ContentType.Pfx) : cert.Export(X509ContentType.Pkcs12); + } + catch (CryptographicException) + { + return cert.HasPrivateKey ? cert.RawData : cert.Export(X509ContentType.Pkcs12); + } + } + + public static byte[] GetCertificateData(X509Certificate2 cert, string password) + { + try + { + return cert.HasPrivateKey ? cert.Export(X509ContentType.Pfx, password) : cert.Export(X509ContentType.Pkcs12, password); + } + catch (CryptographicException) + { + return cert.HasPrivateKey ? cert.RawData : cert.Export(X509ContentType.Pkcs12, password); + } + } + + public static byte[] GetCertificateData(string certPath, string password) + { + var cert = new X509Certificate2(); + cert.Import(certPath, password, X509KeyStorageFlags.Exportable); + return cert.HasPrivateKey ? cert.Export(X509ContentType.Pfx, password) : cert.Export(X509ContentType.Pkcs12); + } + + public static X509Certificate2 DropPrivateKey(X509Certificate2 cert) + { + // export and reimport without private key. + var noPrivateKey = cert.Export(X509ContentType.Cert); + return new X509Certificate2(noPrivateKey); + } + + public static CertificateSettingList GetCertificateSettings(CertificateSettingList Certificates, X509Certificate2[] X509Certificates) + { + CertificateSettingList result = null; + if (Certificates != null && X509Certificates != null) + { + var certSettings = from x in X509Certificates + where !Certificates.Any(s => s.Thumbprint.Equals(x.Thumbprint, StringComparison.InvariantCultureIgnoreCase)) + select new CertificateSetting + { + StoreLocation = LocalMachine, + StoreName = MyStoreName, + Thumbprint = x.Thumbprint + }; + result = new CertificateSettingList(); + result.AddRange(certSettings); + } + else if (Certificates == null && X509Certificates != null) + { + var certSettings = from x in X509Certificates + select new CertificateSetting + { + StoreLocation = LocalMachine, + StoreName = MyStoreName, + Thumbprint = x.Thumbprint + }; + result = new CertificateSettingList(); + result.AddRange(certSettings); + } + else if (Certificates != null && X509Certificates == null) + { + result = new CertificateSettingList(); + result.AddRange(Certificates); + } + + return result; + } + + public static string RandomBase64PasswordString() + { + return RandomBase64String(32); + } + + public static string RandomBase64String(int length) + { + using (var rng = new RNGCryptoServiceProvider()) + { + var data = new byte[length]; + rng.GetBytes(data); + return Convert.ToBase64String(data); + } + } + + public static X509Certificate2 FindCertificate(X509Certificate2[] certificates, string thumbprint) + { + X509Certificate2 result = null; + result = certificates.FirstOrDefault(cert => String.Compare(cert.Thumbprint, thumbprint, StringComparison.InvariantCultureIgnoreCase) == 0); + return result; + } + } + +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Helpers/ConfigurationSetsBuilder.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Helpers/ConfigurationSetsBuilder.cs new file mode 100644 index 000000000000..30027d69f182 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Helpers/ConfigurationSetsBuilder.cs @@ -0,0 +1,204 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Collections.ObjectModel; +using System.Linq; +using Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers +{ + public class ConfigurationSetsBuilder + { + private ConfigurationSetBuilder windowsBuilder; + private ConfigurationSetBuilder linuxBuilder; + private NetworkConfigurationSetBuilder networkConfigurationBuilder; + + public Collection ConfigurationSets { get; set; } + + public ConfigurationSetBuilder WindowsConfigurationBuilder + { + get { return windowsBuilder ?? (windowsBuilder = new ConfigurationSetBuilder(ConfigurationSets)); } + } + + public ConfigurationSetBuilder LinuxConfigurationBuilder + { + get { return linuxBuilder ?? (linuxBuilder = new ConfigurationSetBuilder(ConfigurationSets)); } + } + + public NetworkConfigurationSetBuilder NetworkConfigurationBuilder + { + get { return networkConfigurationBuilder ?? (networkConfigurationBuilder = new NetworkConfigurationSetBuilder(ConfigurationSets)); } + } + + public ConfigurationSetsBuilder(Collection configurationSets) + { + if (configurationSets == null) + { + throw new ArgumentNullException("configurationSets"); + } + ConfigurationSets = configurationSets; + } + } + + public class ConfigurationSetBuilder where T: ProvisioningConfigurationSet, new() + { + protected Collection ConfigurationSets { get; set; } + + public T Provisioning { get; private set; } + + public ConfigurationSetBuilder(Collection configurationSets) + { + if (configurationSets == null) + { + throw new ArgumentNullException("configurationSets"); + } + this.ConfigurationSets = configurationSets; + Initialize(); + } + + private void Initialize() + { + var provisioningConfigurationSet = ConfigurationSets.OfType().SingleOrDefault(); + if (provisioningConfigurationSet == null) + { + Provisioning = new T(); + ConfigurationSets.Add(Provisioning); + } + else + { + Provisioning = provisioningConfigurationSet; + } + } + + public static bool ConfigurationExists(Collection configurationSets) + { + return configurationSets.OfType().SingleOrDefault() != null; + } + } + + public class NetworkConfigurationSetBuilder + { + private const int RDPPortNumber = 3389; + private const int WinRMPortNumber = 5986; + private const int SSHPortNumber = 22; + private const string TcpProtocol = "tcp"; + private const string RdpEndpointName = "RemoteDesktop"; + private const string SSHEndpointName = "SSH"; + + protected Collection ConfigurationSets { get; set; } + + public static bool HasNetworkConfigurationSet(Collection configurationSets) + { + return configurationSets.OfType().SingleOrDefault() != null; + } + + public NetworkConfigurationSet NetworkConfigurationSet + { + get; + private set; + } + + public NetworkConfigurationSetBuilder(Collection configurationSets) + { + this.ConfigurationSets = configurationSets; + Initialize(); + } + + private void Initialize() + { + var networkConfigurationSet = ConfigurationSets.OfType().SingleOrDefault(); + if (networkConfigurationSet == null) + { + NetworkConfigurationSet = new NetworkConfigurationSet(); + ConfigurationSets.Add(NetworkConfigurationSet); + } + else + { + NetworkConfigurationSet = networkConfigurationSet; + } + + if (NetworkConfigurationSet.InputEndpoints == null) + { + NetworkConfigurationSet.InputEndpoints = new Collection(); + } + } + + public void AddWinRmEndpoint() + { + var winRmEndpoint = GetWinRmEndpoint(NetworkConfigurationSet); + if (winRmEndpoint != null) + { + winRmEndpoint.Port = null; // null out to avoid conflicts + } + else + { + NetworkConfigurationSet.InputEndpoints.Add( + new InputEndpoint + { + LocalPort = WinRMPortNumber, + Protocol = TcpProtocol, + Name = WinRMConstants.EndpointName + }); + } + } + + private static InputEndpoint GetWinRmEndpoint(NetworkConfigurationSet networkConfigurationSet) + { + return networkConfigurationSet.InputEndpoints.FirstOrDefault( + ep => string.Equals(WinRMConstants.EndpointName, ep.Name, StringComparison.OrdinalIgnoreCase) + || ep.LocalPort == WinRMPortNumber); + } + + public void AddRdpEndpoint() + { + var endPoint = GetRdpEndpoint(NetworkConfigurationSet); + if (endPoint != null) + { + endPoint.Port = null; // null out to avoid conflicts + } + else + { + var rdpEndpoint = new InputEndpoint { LocalPort = RDPPortNumber, Protocol = TcpProtocol, Name = RdpEndpointName }; + NetworkConfigurationSet.InputEndpoints.Add(rdpEndpoint); + } + } + + private static InputEndpoint GetRdpEndpoint(NetworkConfigurationSet networkConfigurationSet) + { + return networkConfigurationSet.InputEndpoints.FirstOrDefault(ep => RdpEndpointName.Equals(ep.Name, StringComparison.OrdinalIgnoreCase) || ep.LocalPort == RDPPortNumber); + } + + public void AddSshEndpoint() + { + var endpoint = GetSSHEndpoint(NetworkConfigurationSet); + if (endpoint != null) + { + endpoint.Port = null; // null out to avoid conflicts + } + else + { + var sshEndpoint = new InputEndpoint { LocalPort = SSHPortNumber, Protocol = TcpProtocol, Name = SSHEndpointName }; + NetworkConfigurationSet.InputEndpoints.Add(sshEndpoint); + } + } + + private static InputEndpoint GetSSHEndpoint(NetworkConfigurationSet networkConfigurationSet) + { + return networkConfigurationSet.InputEndpoints.FirstOrDefault(ep => SSHEndpointName.Equals(ep.Name, StringComparison.OrdinalIgnoreCase) || ep.LocalPort == SSHPortNumber); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Helpers/OS.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Helpers/OS.cs new file mode 100644 index 000000000000..cdddd617bcce --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Helpers/OS.cs @@ -0,0 +1,22 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers +{ + public class OS + { + public const string Windows = "Windows"; + public const string Linux = "Linux"; + }; +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Helpers/PersistentVMHelper.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Helpers/PersistentVMHelper.cs new file mode 100644 index 000000000000..b868a0bc47bc --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Helpers/PersistentVMHelper.cs @@ -0,0 +1,217 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Xml.Serialization; +using AutoMapper; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Management.Compute.Models; +using ConfigurationSet = Microsoft.WindowsAzure.Commands.ServiceManagement.Model.ConfigurationSet; +using DataVirtualHardDisk = Microsoft.WindowsAzure.Commands.ServiceManagement.Model.DataVirtualHardDisk; +using OSVirtualHardDisk = Microsoft.WindowsAzure.Commands.ServiceManagement.Model.OSVirtualHardDisk; +using RoleInstance = Microsoft.WindowsAzure.Management.Compute.Models.RoleInstance; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers +{ + public static class PersistentVMHelper + { + public static void SaveStateToFile(PersistentVM role, string filePath) + { + if (role == null) + { + throw new ArgumentNullException("role", Resources.MissingPersistentVMRole); + } + + XmlAttributeOverrides overrides = new XmlAttributeOverrides(); + XmlAttributes ignoreAttrib = new XmlAttributes(); + ignoreAttrib.XmlIgnore = true; + overrides.Add(typeof(DataVirtualHardDisk), "MediaLink", ignoreAttrib); + overrides.Add(typeof(DataVirtualHardDisk), "SourceMediaLink", ignoreAttrib); + overrides.Add(typeof(OSVirtualHardDisk), "MediaLink", ignoreAttrib); + + var serializer = new System.Xml.Serialization.XmlSerializer(typeof(PersistentVM), overrides, new Type[] { typeof(NetworkConfigurationSet) }, null, null); + using (TextWriter writer = new StreamWriter(filePath)) + { + serializer.Serialize(writer, role); + } + } + + public static PersistentVM LoadStateFromFile(string filePath) + { + if (!File.Exists(filePath)) + { + throw new ArgumentException(Resources.MissingPersistentVMFile, "filePath"); + } + + XmlAttributeOverrides overrides = new XmlAttributeOverrides(); + XmlAttributes ignoreAttrib = new XmlAttributes(); + ignoreAttrib.XmlIgnore = true; + overrides.Add(typeof(DataVirtualHardDisk), "MediaLink", ignoreAttrib); + overrides.Add(typeof(DataVirtualHardDisk), "SourceMediaLink", ignoreAttrib); + overrides.Add(typeof(OSVirtualHardDisk), "MediaLink", ignoreAttrib); + overrides.Add(typeof(OSVirtualHardDisk), "SourceImageName", ignoreAttrib); + + var serializer = new System.Xml.Serialization.XmlSerializer(typeof(PersistentVM), overrides, new Type[] { typeof(NetworkConfigurationSet) }, null, null); + + PersistentVM role = null; + + using (var stream = new FileStream(filePath, FileMode.Open)) + { + role = serializer.Deserialize(stream) as PersistentVM; + } + + return role; + } + + // Returns a RoleNamesCollection based on instances in the roleInstanceList + // whose RoleInstance.RoleName matches the roleName passed in. Wildcards + // are handled for the roleName passed in. + // This function also verifies that the RoleInstance exists before adding the + // RoleName to the RoleNamesCollection. + public static RoleNamesCollection GetRoleNames(IList roleInstanceList, string roleName) + { + var roleNamesCollection = new RoleNamesCollection(); + if (!string.IsNullOrEmpty(roleName)) + { + if (WildcardPattern.ContainsWildcardCharacters(roleName)) + { + WildcardOptions wildcardOptions = WildcardOptions.IgnoreCase | WildcardOptions.Compiled; + WildcardPattern wildcardPattern = new WildcardPattern(roleName, wildcardOptions); + + foreach (var role in roleInstanceList) + if (!string.IsNullOrEmpty(role.RoleName) && wildcardPattern.IsMatch(role.RoleName)) + { + roleNamesCollection.Add(role.RoleName); + } + } + else + { + var roleInstance = roleInstanceList.Where(r => r.RoleName != null). + FirstOrDefault(r => r.RoleName.Equals(roleName, StringComparison.InvariantCultureIgnoreCase)); + if (roleInstance != null) + { + roleNamesCollection.Add(roleName); + } + } + } + return roleNamesCollection; + } + + public static Collection MapConfigurationSets(IList configurationSets) + { + var result = new Collection(); + var n = configurationSets.Where(c => c.ConfigurationSetType == "NetworkConfiguration").Select(Mapper.Map).ToList(); + var w = configurationSets.Where(c => c.ConfigurationSetType == ConfigurationSetTypes.WindowsProvisioningConfiguration).Select(Mapper.Map).ToList(); + var l = configurationSets.Where(c => c.ConfigurationSetType == ConfigurationSetTypes.LinuxProvisioningConfiguration).Select(Mapper.Map).ToList(); + n.ForEach(result.Add); + w.ForEach(result.Add); + l.ForEach(result.Add); + return result; + } + + public static IList MapConfigurationSets(Collection configurationSets) + { + var result = new Collection(); + foreach (var networkConfig in configurationSets.OfType()) + { + result.Add(Mapper.Map(networkConfig)); + } + + foreach (var windowsConfig in configurationSets.OfType()) + { + var newWinCfg = Mapper.Map(windowsConfig); + if (windowsConfig.WinRM != null) + { + newWinCfg.WindowsRemoteManagement = new WindowsRemoteManagementSettings(); + + // AutoMapper doesn't work for WinRM.Listeners -> WindowsRemoteManagement.Listeners + if (windowsConfig.WinRM.Listeners != null) + { + foreach (var s in windowsConfig.WinRM.Listeners) + { + newWinCfg.WindowsRemoteManagement.Listeners.Add(new WindowsRemoteManagementListener + { + ListenerType = (VirtualMachineWindowsRemoteManagementListenerType)Enum.Parse(typeof(VirtualMachineWindowsRemoteManagementListenerType), s.Protocol, true), + CertificateThumbprint = s.CertificateThumbprint + }); + } + } + } + + result.Add(newWinCfg); + } + + foreach (var linuxConfig in configurationSets.OfType()) + { + result.Add(Mapper.Map(linuxConfig)); + } + + return result; + } + + public static string GetPublicIPName(Microsoft.WindowsAzure.Management.Compute.Models.Role vmRole) + { + string name = null; + + if (vmRole != null && vmRole.ConfigurationSets != null && vmRole.ConfigurationSets.Any()) + { + var networkCfg = vmRole.ConfigurationSets + .Where(c => string.Equals(c.ConfigurationSetType, ConfigurationSetTypes.NetworkConfiguration, StringComparison.OrdinalIgnoreCase)) + .SingleOrDefault(); + + if (networkCfg != null) + { + var publicIp = networkCfg.PublicIPs.FirstOrDefault(); + name = publicIp == null ? null : publicIp.Name; + } + } + + return name; + } + + public static string ConvertCustomDataFileToBase64(string fileName) + { + byte[] bytes = new byte[3 * 4096]; // Make buffer be a factor of 3 for encoding correctly + System.Text.StringBuilder sb = new System.Text.StringBuilder(); + System.IO.FileStream fileStream = null; + + try + { + fileStream = new System.IO.FileStream(fileName, System.IO.FileMode.Open); + + while (fileStream.Position < fileStream.Length) + { + int cb = fileStream.Read(bytes, 0, bytes.Length); + sb.Append(System.Convert.ToBase64String(bytes, 0, cb)); + } + } + finally + { + if (fileStream != null) + { + fileStream.Close(); + } + } + + return (sb.ToString()); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Helpers/SecureStringHelper.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Helpers/SecureStringHelper.cs new file mode 100644 index 000000000000..8acf6345c036 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Helpers/SecureStringHelper.cs @@ -0,0 +1,117 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Runtime.InteropServices; +using System.Security; +using System.Security.Permissions; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers +{ + using NSM = Management.Compute.Models; + using PVM = Model; + + public static class SecureStringHelper + { + const string PublicTypeStr = "Public"; + const string PrivateTypeStr = "Private"; + + [SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)] + public static string ConvertToUnsecureString(this SecureString securePassword) + { + if (securePassword == null) + throw new ArgumentNullException("securePassword"); + + IntPtr unmanagedString = IntPtr.Zero; + try + { + unmanagedString = Marshal.SecureStringToGlobalAllocUnicode(securePassword); + return Marshal.PtrToStringUni(unmanagedString); + } + finally + { + Marshal.ZeroFreeGlobalAllocUnicode(unmanagedString); + } + } + + public static SecureString GetSecureString(NSM.ResourceExtensionParameterValue item) + { + SecureString secureStr = null; + + bool isPrivate = string.Equals( + item.Type, + PrivateTypeStr, + StringComparison.OrdinalIgnoreCase); + + if (item != null && isPrivate) + { + secureStr = GetSecureString(item.Value); + } + + return secureStr; + } + + public static string GetPlainString(NSM.ResourceExtensionParameterValue item) + { + string str = null; + + bool isPublic = string.Equals( + item.Type, + PublicTypeStr, + StringComparison.OrdinalIgnoreCase); + + if (item != null && isPublic) + { + str = item.Value; + } + + return str; + } + + public static string GetPlainString(PVM.ResourceExtensionParameterValue item) + { + string str = null; + + if (item != null) + { + if (string.Equals( item.Type, PublicTypeStr, StringComparison.OrdinalIgnoreCase)) + { + str = item.Value; + } + else if (string.Equals(item.Type, PrivateTypeStr, StringComparison.OrdinalIgnoreCase)) + { + str = item.SecureValue.ConvertToUnsecureString(); + } + } + + return str; + } + + public static SecureString GetSecureString(string str) + { + SecureString secureStr = null; + + if (!string.IsNullOrEmpty(str)) + { + secureStr = new SecureString(); + foreach (char c in str) + { + secureStr.AppendChar(c); + } + } + + return secureStr; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Helpers/VirtualMachineImageHelper.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Helpers/VirtualMachineImageHelper.cs new file mode 100644 index 000000000000..89eb27f3fa99 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Helpers/VirtualMachineImageHelper.cs @@ -0,0 +1,74 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Net; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Management.Compute; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers +{ + public class VirtualMachineImageHelper + { + private ComputeManagementClient computeClient; + + public VirtualMachineImageHelper(ComputeManagementClient computeClient) + { + this.computeClient = computeClient; + } + + public VirtualMachineImageType GetImageType(string imageName) + { + var imageType = VirtualMachineImageType.None; + + try + { + var isOSImage = string.Equals( + computeClient.VirtualMachineOSImages.Get(imageName).Name, + imageName, + StringComparison.OrdinalIgnoreCase); + + imageType |= isOSImage ? VirtualMachineImageType.OSImage : VirtualMachineImageType.None; + } + catch (CloudException e) + { + if (e.Response.StatusCode != HttpStatusCode.NotFound) + { + throw; + } + } + + try + { + var isVMImage = computeClient.VirtualMachineVMImages.List() + .VMImages.Any(e => string.Equals( + e.Name, + imageName, + StringComparison.OrdinalIgnoreCase)); + + imageType |= isVMImage ? VirtualMachineImageType.VMImage : VirtualMachineImageType.None; + } + catch (CloudException e) + { + if (e.Response.StatusCode != HttpStatusCode.NotFound) + { + throw; + } + } + + return imageType; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Helpers/WinRmConfigurationBuilder.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Helpers/WinRmConfigurationBuilder.cs new file mode 100644 index 000000000000..1f381dbc6269 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Helpers/WinRmConfigurationBuilder.cs @@ -0,0 +1,121 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Security.Cryptography.X509Certificates; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers +{ + public class WinRmConfigurationBuilder + { + private const string Http = "Http"; + private const string Https = "Https"; + + public WindowsProvisioningConfigurationSet.WinRmConfiguration Configuration { get; private set; } + + public WinRmConfigurationBuilder() + { + Configuration = new WindowsProvisioningConfigurationSet.WinRmConfiguration + { + Listeners = new WindowsProvisioningConfigurationSet.WinRmListenerCollection() + }; + } + + public WinRmConfigurationBuilder(WindowsProvisioningConfigurationSet.WinRmConfiguration configuration) + { + Configuration = configuration; + } + + public string GetHttpsCertificateThumbprint() + { + var httpsListener = Configuration.Listeners.FirstOrDefault(l => l.Protocol == Https); + if (httpsListener == null) + { + throw new ArgumentOutOfRangeException(Resources.MissingWinRMHttpsListener); + } + + return httpsListener.CertificateThumbprint; + } + + public void AddHttpListener() + { + if (Configuration.Listeners.FirstOrDefault(l=> l.Protocol == Http) != null) + { + throw new ArgumentOutOfRangeException(Resources.AlreadyExistingWinRMHttpListener); + } + var listener = new WindowsProvisioningConfigurationSet.WinRmListenerProperties + { + Protocol = Http + }; + Configuration.Listeners.Add(listener); + } + + + public void AddHttpsListener(X509Certificate2 certificate) + { + if (certificate != null) + { + if(!certificate.HasPrivateKey) + { + throw new ArgumentOutOfRangeException(Resources.MissingPrivateKeyInWinRMCertificate); + } + AddHttpsListener(certificate.Thumbprint); + } + else + { + AddHttpsListener(); + } + } + + public void UpdateHttpsListener(X509Certificate2 certificate) + { + var httpsListener = Configuration.Listeners.FirstOrDefault(l => l.Protocol == Https); + if (httpsListener == null) + { + throw new ArgumentOutOfRangeException(Resources.MissingWinRMHttpsListener); + } + httpsListener.CertificateThumbprint = certificate.Thumbprint; + } + + public void AddHttpsListener() + { + if (Configuration.Listeners.FirstOrDefault(l => l.Protocol == Https) != null) + { + throw new ArgumentOutOfRangeException(Resources.AlreadyExistingWinRMHttpsListener); + } + var listener = new WindowsProvisioningConfigurationSet.WinRmListenerProperties + { + Protocol = WindowsProvisioningConfigurationSet.WinRmProtocol.Https.ToString() + }; + Configuration.Listeners.Add(listener); + } + + public void AddHttpsListener(string thumbprint) + { + if (Configuration.Listeners.FirstOrDefault(l => l.Protocol == Https) != null) + { + throw new ArgumentOutOfRangeException(Resources.AlreadyExistingWinRMHttpsListener); + } + var listener = new WindowsProvisioningConfigurationSet.WinRmListenerProperties + { + Protocol = WindowsProvisioningConfigurationSet.WinRmProtocol.Https.ToString(), + CertificateThumbprint = thumbprint + }; + Configuration.Listeners.Add(listener); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureDeployment.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureDeployment.cs new file mode 100644 index 000000000000..6ab5a6734609 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureDeployment.cs @@ -0,0 +1,69 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices +{ + /// + /// View details of a specified deployment. + /// + [Cmdlet(VerbsCommon.Get, "AzureDeployment"), OutputType(typeof(DeploymentInfoContext))] + public class GetAzureDeploymentCommand : ServiceManagementBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Service name.")] + public string ServiceName + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = false, HelpMessage = "Deployment slot. Staging | Production (default Production)")] + [ValidateSet(DeploymentSlotType.Staging, DeploymentSlotType.Production, IgnoreCase = true)] + public string Slot + { + get; + set; + } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + + if (string.IsNullOrEmpty(this.Slot)) + { + this.Slot = DeploymentSlotType.Production; + } + + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.ComputeClient.Deployments.GetBySlot(this.ServiceName, (DeploymentSlot)Enum.Parse(typeof(DeploymentSlot), Slot, true)), + (s, d) => + { + return new DeploymentInfoContext(d) + { + OperationId = s.Id, + OperationStatus = s.Status.ToString(), + OperationDescription = CommandRuntime.ToString(), + ServiceName = this.ServiceName + }; + }); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureDeploymentEvent.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureDeploymentEvent.cs new file mode 100644 index 000000000000..647bb12acf0f --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureDeploymentEvent.cs @@ -0,0 +1,89 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices +{ + /// + /// View details of deployment events. + /// + [Cmdlet(VerbsCommon.Get, "AzureDeploymentEvent", DefaultParameterSetName = GetDeploymentEventBySlotParamSet)] + [OutputType(typeof(DeploymentRebootEventContext))] + public class GetAzureDeploymentEventCommand : ServiceManagementBaseCmdlet + { + protected const string GetDeploymentEventByNameParamSet = "GetDeploymentEventByName"; + protected const string GetDeploymentEventBySlotParamSet = "GetDeploymentEventBySlot"; + + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Service name.")] + public string ServiceName { get; set; } + + [Parameter(Position = 1, Mandatory = true, HelpMessage = "Start time.")] + public DateTime StartTime { get; set; } + + [Parameter(Position = 2, Mandatory = true, HelpMessage = "End time.")] + public DateTime EndTime { get; set; } + + [Parameter(ParameterSetName = GetDeploymentEventByNameParamSet, Position = 1, Mandatory = true, HelpMessage = "Deployment name.")] + [ValidateNotNullOrEmpty] + public string DeploymentName { get; set; } + + [Parameter(ParameterSetName = GetDeploymentEventBySlotParamSet, Position = 3, HelpMessage = "Deployment slot.")] + [ValidateSet(DeploymentSlotType.Staging, DeploymentSlotType.Production, IgnoreCase = true)] + public string Slot { get; set; } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => + { + if (!string.IsNullOrEmpty(this.DeploymentName)) + { + return this.ComputeClient.Deployments.ListEvents(this.ServiceName, this.DeploymentName, this.StartTime, this.EndTime); + } + else + { + this.Slot = string.IsNullOrEmpty(this.Slot) ? DeploymentSlotType.Production : this.Slot; + var slot = (DeploymentSlot)Enum.Parse(typeof(DeploymentSlot), this.Slot, true); + return this.ComputeClient.Deployments.ListEventsBySlot(this.ServiceName, slot, this.StartTime, this.EndTime); + } + }, + (s, d) => + { + return d.DeploymentEvents.Select(e => new DeploymentRebootEventContext + { + OperationId = s.Id, + OperationStatus = s.Status.ToString(), + OperationDescription = CommandRuntime.ToString(), + ServiceName = this.ServiceName, + DeploymentName = this.DeploymentName, + DeploymentSlot = this.Slot, + InstanceName = e.InstanceName, + RebootReason = e.RebootReason, + RebootStartTime = e.RebootStartTime, + RoleName = e.RoleName + }); + }); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureLocation.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureLocation.cs new file mode 100644 index 000000000000..2a48d1952df0 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureLocation.cs @@ -0,0 +1,43 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices +{ + /// + /// Retrieve Microsoft Azure Locations. + /// + [Cmdlet(VerbsCommon.Get, "AzureLocation"), OutputType(typeof(LocationsContext))] + public class GetAzureLocationCommand : ServiceManagementBaseCmdlet + { + public void GetLocationsProcess() + { + ExecuteClientActionNewSM(null, + CommandRuntime.ToString(), + () => this.ManagementClient.Locations.List(), + (op, locations) => locations.Locations.Select(location => ContextFactory(location, op))); + } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + this.GetLocationsProcess(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureOSVersion.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureOSVersion.cs new file mode 100644 index 000000000000..9df4b4a037c7 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureOSVersion.cs @@ -0,0 +1,41 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices +{ + /// + /// Lists the versions of the guest operating system that are currently available in Microsoft Azure. + /// + [Cmdlet(VerbsCommon.Get, "AzureOSVersion"), OutputType(typeof(OSVersionsContext))] + public class GetAzureOSVersionCommand : ServiceManagementBaseCmdlet + { + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.ComputeClient.OperatingSystems.List(), + (op, oSes) => oSes.OperatingSystems.Select(os => ContextFactory(os, op))); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureRole.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureRole.cs new file mode 100644 index 000000000000..5f85385cd553 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureRole.cs @@ -0,0 +1,169 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Management.Automation; +using AutoMapper; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices +{ + using PVM = Model; + + [Cmdlet(VerbsCommon.Get, "AzureRole"), OutputType(typeof(PVM.RoleContext), typeof(PVM.RoleInstanceContext))] + public class GetAzureRoleCommand : ServiceManagementBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the hosted service.")] + public string ServiceName + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Deployment slot")] + [ValidateSet(PVM.DeploymentSlotType.Staging, PVM.DeploymentSlotType.Production, IgnoreCase = true)] + public string Slot + { + get; + set; + } + + [Parameter(Position = 2, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the role.")] + public string RoleName + { + get; + set; + } + + [Parameter(Position = 3, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Get Instance Details")] + public SwitchParameter InstanceDetails + { + get; + set; + } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + this.GetRoleProcess(); + } + + public void GetRoleProcess() + { + OperationStatusResponse getDeploymentOperation; + var currentDeployment = this.GetCurrentDeployment(out getDeploymentOperation); + if (currentDeployment != null) + { + if (this.InstanceDetails.IsPresent) + { + Collection instanceContexts = new Collection(); + IList roleInstances = null; + + if (string.IsNullOrEmpty(this.RoleName)) + { + roleInstances = currentDeployment.RoleInstances; + } + else + { + roleInstances = new List(currentDeployment.RoleInstances.Where(r => r.RoleName.Equals(this.RoleName, StringComparison.OrdinalIgnoreCase))); + } + + foreach (var role in roleInstances) + { + var vmRole = currentDeployment.Roles == null || !currentDeployment.Roles.Any() ? null + : currentDeployment.Roles.FirstOrDefault(r => string.Equals(r.RoleName, role.RoleName, StringComparison.OrdinalIgnoreCase)); + + instanceContexts.Add(new PVM.RoleInstanceContext + { + ServiceName = this.ServiceName, + OperationId = getDeploymentOperation.Id, + OperationDescription = this.CommandRuntime.ToString(), + OperationStatus = getDeploymentOperation.Status.ToString(), + InstanceErrorCode = role.InstanceErrorCode, + InstanceFaultDomain = role.InstanceFaultDomain, + InstanceName = role.InstanceName, + InstanceSize = role.InstanceSize, + InstanceStateDetails = role.InstanceStateDetails, + InstanceStatus = role.InstanceStatus, + InstanceUpgradeDomain = role.InstanceUpgradeDomain, + RoleName = role.RoleName, + IPAddress = role.IPAddress, + PublicIPAddress = role.PublicIPs == null || !role.PublicIPs.Any() ? null : role.PublicIPs.First().Address, + PublicIPName = role.PublicIPs == null || !role.PublicIPs.Any() ? null + : !string.IsNullOrEmpty(role.PublicIPs.First().Name) ? role.PublicIPs.First().Name + : PersistentVMHelper.GetPublicIPName(vmRole), + PublicIPIdleTimeoutInMinutes = role.PublicIPs == null || !role.PublicIPs.Any() ? null + : role.PublicIPs.First().IdleTimeoutInMinutes, + DeploymentID = currentDeployment.PrivateId, + InstanceEndpoints = Mapper.Map(role.InstanceEndpoints) + }); + } + + WriteObject(instanceContexts, true); + } + else + { + var roleContexts = new Collection(); + IList roles = null; + if (string.IsNullOrEmpty(this.RoleName)) + { + roles = currentDeployment.Roles; + } + else + { + roles = new List(currentDeployment.Roles.Where(r => r.RoleName.Equals(this.RoleName, StringComparison.OrdinalIgnoreCase))); + } + + foreach (var r in roles.Select(role => new PVM.RoleContext + { + InstanceCount = currentDeployment.RoleInstances.Count(ri => ri.RoleName.Equals(role.RoleName, StringComparison.OrdinalIgnoreCase)), + RoleName = role.RoleName, + OperationDescription = this.CommandRuntime.ToString(), + OperationStatus = getDeploymentOperation.Status.ToString(), + OperationId = getDeploymentOperation.Id, + ServiceName = this.ServiceName, + DeploymentID = currentDeployment.PrivateId + })) + { + roleContexts.Add(r); + } + + WriteObject(roleContexts, true); + } + } + } + + private DeploymentGetResponse GetCurrentDeployment(out OperationStatusResponse operation) + { + DeploymentSlot slot = string.IsNullOrEmpty(this.Slot) ? DeploymentSlot.Production : + (DeploymentSlot)Enum.Parse(typeof(DeploymentSlot), this.Slot, true); + + WriteVerboseWithTimestamp(Resources.GetDeploymentBeginOperation); + + DeploymentGetResponse deploymentGetResponse = null; + InvokeInOperationContext(() => deploymentGetResponse = this.ComputeClient.Deployments.GetBySlot(this.ServiceName, slot)); + operation = GetOperationNewSM(deploymentGetResponse.RequestId); + + WriteVerboseWithTimestamp(Resources.GetDeploymentCompletedOperation); + + return deploymentGetResponse; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureService.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureService.cs new file mode 100644 index 000000000000..f43d6de3f0e2 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/GetAzureService.cs @@ -0,0 +1,69 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; +using AutoMapper; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices +{ + /// + /// Retrieve a specified hosted account. + /// + [Cmdlet(VerbsCommon.Get, "AzureService"), OutputType(typeof(HostedServiceDetailedContext))] + public class GetAzureServiceCommand : ServiceManagementBaseCmdlet + { + [Parameter(Position = 0, Mandatory = false, ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public string ServiceName + { + get; + set; + } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + + if (this.ServiceName != null) + { + ExecuteClientActionNewSM(null, + CommandRuntime.ToString(), + () => this.ComputeClient.HostedServices.Get(this.ServiceName), + (operation, service) => + { + var context = ContextFactory(service, operation); + Mapper.Map(service.Properties, context); + return context; + }); + } + else + { + ExecuteClientActionNewSM(null, + CommandRuntime.ToString(), + () => this.ComputeClient.HostedServices.List(), + (operation, services) => services.HostedServices.Select( + service => + { + var context = ContextFactory(service, operation); + Mapper.Map(service.Properties, context); + return context; + })); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/MoveAzureDeployment.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/MoveAzureDeployment.cs new file mode 100644 index 000000000000..82be87f60022 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/MoveAzureDeployment.cs @@ -0,0 +1,103 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices +{ + /// + /// Swaps the deployments in production and stage. + /// + [Cmdlet(VerbsCommon.Move, "AzureDeployment"), OutputType(typeof(ManagementOperationContext))] + public class MoveAzureDeploymentCommand : ServiceManagementBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Service name.")] + [ValidateNotNullOrEmpty] + public string ServiceName + { + get; + set; + } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + this.ExecuteCommand(); + } + + public void ExecuteCommand() + { + var prodDeployment = GetDeploymentBySlot(DeploymentSlotType.Production); + var stagingDeployment = GetDeploymentBySlot(DeploymentSlotType.Staging); + + if(stagingDeployment == null && prodDeployment == null) + { + throw new ArgumentOutOfRangeException(String.Format(Resources.NoDeploymentInStagingOrProduction, ServiceName)); + } + + if(stagingDeployment == null && prodDeployment != null) + { + throw new ArgumentOutOfRangeException(String.Format(Resources.NoDeploymentInStaging, ServiceName)); + } + + if(prodDeployment == null) + { + this.WriteVerbose(string.Format(Resources.MovingDeploymentFromStagingToProduction, ServiceName)); + } + else + { + this.WriteVerbose(string.Format(Resources.VIPSwapBetweenStagingAndProduction, ServiceName)); + } + + var swapDeploymentParams = new DeploymentSwapParameters + { + SourceDeployment = stagingDeployment.Name, + ProductionDeployment = prodDeployment == null ? null : prodDeployment.Name + }; + + ExecuteClientActionNewSM( + swapDeploymentParams, + CommandRuntime.ToString(), + () => this.ComputeClient.Deployments.Swap(ServiceName, swapDeploymentParams)); + } + + private DeploymentGetResponse GetDeploymentBySlot(string slot) + { + var slotType = (DeploymentSlot)Enum.Parse(typeof(DeploymentSlot), slot, true); + DeploymentGetResponse prodDeployment = null; + try + { + InvokeInOperationContext(() => prodDeployment = this.ComputeClient.Deployments.GetBySlot(ServiceName, slotType)); + if (prodDeployment != null && prodDeployment.Roles != null) + { + if (string.Compare(prodDeployment.Roles[0].RoleType, "PersistentVMRole", StringComparison.OrdinalIgnoreCase) == 0) + { + throw new ArgumentException(String.Format(Resources.CanNotMoveDeploymentsWhileVMsArePresent, slot)); + } + } + } + catch (CloudException) + { + this.WriteDebug(String.Format(Resources.NoDeploymentFoundToMove, slot)); + } + + return prodDeployment; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/NewAzureDeployment.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/NewAzureDeployment.cs new file mode 100644 index 000000000000..a8dc507d4915 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/NewAzureDeployment.cs @@ -0,0 +1,273 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Management.Automation; +using System.Net; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices +{ + using PVM = Model; + + /// + /// Create a new deployment. Note that there shouldn't be a deployment + /// of the same name or in the same slot when executing this command. + /// + [Cmdlet(VerbsCommon.New, "AzureDeployment", DefaultParameterSetName = "PaaS"), OutputType(typeof(ManagementOperationContext))] + public class NewAzureDeploymentCommand : ServiceManagementBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Cloud service name.")] + [ValidateNotNullOrEmpty] + public string ServiceName + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = true, HelpMessage = "Package location. This parameter specifies the path or URI to a .cspkg in blob storage. The storage account must belong to the same subscription as the deployment.")] + [ValidateNotNullOrEmpty] + public string Package + { + get; + set; + } + + [Parameter(Position = 2, Mandatory = true, HelpMessage = "Configuration file path. This parameter should specifiy a .cscfg file on disk.")] + [ValidateNotNullOrEmpty] + public string Configuration + { + get; + set; + } + + [Parameter(Position = 3, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Deployment slot [Staging | Production].")] + [ValidateSet(Microsoft.WindowsAzure.Commands.ServiceManagement.Model.DeploymentSlotType.Staging, Microsoft.WindowsAzure.Commands.ServiceManagement.Model.DeploymentSlotType.Production, IgnoreCase = true)] + public string Slot + { + get; + set; + } + + [Parameter(Position = 4, Mandatory = false, HelpMessage = "Label for the new deployment.")] + [ValidateNotNullOrEmpty] + public string Label + { + get; + set; + } + + [Parameter(Position = 5, HelpMessage = "Deployment name.")] + [Alias("DeploymentName")] + [ValidateNotNullOrEmpty] + public string Name + { + get; + set; + } + + [Parameter(Mandatory = false, HelpMessage = "Do not start deployment upon creation.")] + public SwitchParameter DoNotStart + { + get; + set; + } + + [Parameter(Mandatory = false, HelpMessage = "Indicates whether to treat package validation warnings as errors.")] + public SwitchParameter TreatWarningsAsError + { + get; + set; + } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Extension configurations.")] + public ExtensionConfigurationInput[] ExtensionConfiguration + { + get; + set; + } + + public virtual void NewPaaSDeploymentProcess() + { + bool removePackage = false; + + AssertNoPersistenVmRoleExistsInDeployment(PVM.DeploymentSlotType.Production); + AssertNoPersistenVmRoleExistsInDeployment(PVM.DeploymentSlotType.Staging); + + var storageName = CurrentContext.Subscription.GetProperty(Commands.Common.Models.AzureSubscription.Property.StorageAccount); + + Uri packageUrl; + if (this.Package.StartsWith(Uri.UriSchemeHttp, StringComparison.OrdinalIgnoreCase) || + this.Package.StartsWith(Uri.UriSchemeHttps, StringComparison.OrdinalIgnoreCase)) + { + packageUrl = new Uri(this.Package); + } + else + { + var progress = new ProgressRecord(0, Resources.WaitForUploadingPackage, Resources.UploadingPackage); + WriteProgress(progress); + removePackage = true; + packageUrl = this.RetryCall(s => + AzureBlob.UploadPackageToBlob( + this.StorageClient, + storageName, + this.Package, + null)); + } + + ExtensionConfiguration extConfig = null; + if (ExtensionConfiguration != null) + { + string errorConfigInput = null; + if (!ExtensionManager.Validate(ExtensionConfiguration, out errorConfigInput)) + { + throw new Exception(string.Format(Resources.ServiceExtensionCannotApplyExtensionsInSameType, errorConfigInput)); + } + + foreach (ExtensionConfigurationInput context in ExtensionConfiguration) + { + if (context != null && context.X509Certificate != null) + { + ExecuteClientActionNewSM( + null, + string.Format(Resources.ServiceExtensionUploadingCertificate, CommandRuntime, context.X509Certificate.Thumbprint), + () => this.ComputeClient.ServiceCertificates.Create(this.ServiceName, CertUtilsNewSM.Create(context.X509Certificate))); + } + } + + + var slotType = (DeploymentSlot)Enum.Parse(typeof(DeploymentSlot), this.Slot, true); + DeploymentGetResponse d = null; + InvokeInOperationContext(() => + { + try + { + d = this.ComputeClient.Deployments.GetBySlot(this.ServiceName, slotType); + } + catch (CloudException ex) + { + if (ex.Response.StatusCode != HttpStatusCode.NotFound && IsVerbose() == false) + { + this.WriteExceptionDetails(ex); + } + } + }); + + ExtensionManager extensionMgr = new ExtensionManager(this, ServiceName); + extConfig = extensionMgr.Set(d, ExtensionConfiguration, this.Slot); + } + + var deploymentInput = new DeploymentCreateParameters + { + PackageUri = packageUrl, + Configuration = GeneralUtilities.GetConfiguration(this.Configuration), + ExtensionConfiguration = extConfig, + Label = this.Label, + Name = this.Name, + StartDeployment = !this.DoNotStart.IsPresent, + TreatWarningsAsError = this.TreatWarningsAsError.IsPresent, + }; + + InvokeInOperationContext(() => + { + try + { + var progress = new ProgressRecord(0, Resources.WaitForUploadingPackage, Resources.CreatingNewDeployment); + WriteProgress(progress); + + ExecuteClientActionNewSM( + deploymentInput, + CommandRuntime.ToString(), + () => this.ComputeClient.Deployments.Create( + this.ServiceName, + (DeploymentSlot)Enum.Parse(typeof(DeploymentSlot), this.Slot, true), + deploymentInput)); + + if (removePackage == true) + { + this.RetryCall(s => AzureBlob.DeletePackageFromBlob( + this.StorageClient, + storageName, + packageUrl)); + } + } + catch (CloudException ex) + { + this.WriteExceptionDetails(ex); + } + }); + } + + private void AssertNoPersistenVmRoleExistsInDeployment(string slot) + { + InvokeInOperationContext(() => + { + try + { + var currentDeployment = this.ComputeClient.Deployments.GetBySlot(this.ServiceName, (DeploymentSlot)Enum.Parse(typeof(DeploymentSlot), slot, true)); + if (currentDeployment.Roles != null) + { + if (string.Compare(currentDeployment.Roles[0].RoleType, "PersistentVMRole", StringComparison.OrdinalIgnoreCase) == 0) + { + throw new ArgumentException(String.Format(Resources.CanNotCreateNewDeploymentWhileVMsArePresent, slot)); + } + } + } + catch (CloudException ex) + { + if (ex.Response.StatusCode != HttpStatusCode.NotFound && IsVerbose() == false) + { + this.WriteExceptionDetails(ex); + } + } + }); + } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + this.ValidateParameters(); + this.NewPaaSDeploymentProcess(); + } + + protected virtual void ValidateParameters() + { + if (string.IsNullOrEmpty(this.Slot)) + { + this.Slot = PVM.DeploymentSlotType.Production; + } + + if (string.IsNullOrEmpty(this.Name)) + { + this.Name = Guid.NewGuid().ToString(); + } + + if (string.IsNullOrEmpty(this.Label)) + { + this.Label = this.Name; + } + + if (string.IsNullOrEmpty(this.CurrentContext.Subscription.GetProperty(AzureSubscription.Property.StorageAccount))) + { + throw new ArgumentException(Resources.CurrentStorageAccountIsNotSet); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/NewAzureService.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/NewAzureService.cs new file mode 100644 index 000000000000..a7c12cf9c5f1 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/NewAzureService.cs @@ -0,0 +1,102 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices +{ + /// + /// Creates a new hosted service in Microsoft Azure. + /// + [Cmdlet(VerbsCommon.New, "AzureService", DefaultParameterSetName = "ParameterSetAffinityGroup"), OutputType(typeof(ManagementOperationContext))] + public class NewAzureServiceCommand : ServiceManagementBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = "ParameterSetAffinityGroup", HelpMessage = "A name for the hosted service that is unique to the subscription.")] + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = "ParameterSetLocation", HelpMessage = "A name for the hosted service that is unique to the subscription.")] + [ValidateNotNullOrEmpty] + public string ServiceName + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = "ParameterSetLocation", HelpMessage = "Required if AffinityGroup is not specified. The data center region where the clou service will be created.")] + [ValidateNotNullOrEmpty] + public string Location + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = "ParameterSetAffinityGroup", HelpMessage = "Required if Location is not specified. The name of an existing affinity group associated with this subscription.")] + [ValidateNotNullOrEmpty] + public string AffinityGroup + { + get; + set; + } + + [Parameter(Position = 2, Mandatory = false, ParameterSetName = "ParameterSetAffinityGroup", HelpMessage = "A label for the cloud service that is Base64-encoded. The label may be up to 100 characters in length. Default: ServiceName.")] + [Parameter(Position = 2, Mandatory = false, ParameterSetName = "ParameterSetLocation", HelpMessage = "A label for the cloud service that is Base64-encoded. The label may be up to 100 characters in length. Default: ServiceName.")] + [ValidateNotNullOrEmpty] + public string Label + { + get; + set; + } + + [Parameter(Position = 3, Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = "ParameterSetAffinityGroup", HelpMessage = "A description for the cloud service. The description may be up to 1024 characters in length.")] + [Parameter(Position = 3, Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = "ParameterSetLocation", HelpMessage = "A description for the cloud service. The description may be up to 1024 characters in length.")] + [ValidateNotNullOrEmpty] + public string Description + { + get; + set; + } + + [Parameter(Position = 4, Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = "ParameterSetAffinityGroup", HelpMessage = "Dns address to which the cloud service’s IP address resolves when queried using a reverse Dns query.")] + [Parameter(Position = 4, Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = "ParameterSetLocation", HelpMessage = "Dns address to which the cloud service’s IP address resolves when queried using a reverse Dns query.")] + [ValidateNotNullOrEmpty] + public string ReverseDnsFqdn + { + get; + set; + } + + public void ExecuteCommand() + { + var parameter = new HostedServiceCreateParameters() + { + ServiceName = this.ServiceName, + Label = string.IsNullOrEmpty(this.Label) ? this.ServiceName : this.Label, + ReverseDnsFqdn = this.ReverseDnsFqdn, + Description = this.Description, + AffinityGroup = this.AffinityGroup, + Location = this.Location + }; + + ExecuteClientActionNewSM(null, + CommandRuntime.ToString(), + () => this.ComputeClient.HostedServices.Create(parameter)); + } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + this.ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/RemoveAzureDeployment.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/RemoveAzureDeployment.cs new file mode 100644 index 000000000000..5d56ce3a484b --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/RemoveAzureDeployment.cs @@ -0,0 +1,96 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices +{ + /// + /// Deletes the specified deployment. + /// + [Cmdlet(VerbsCommon.Remove, "AzureDeployment"), OutputType(typeof(ManagementOperationContext))] + public class RemoveAzureDeploymentCommand : ServiceManagementBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Service name.")] + [ValidateNotNullOrEmpty] + public string ServiceName + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Deployment slot. Staging | Production")] + [ValidateSet(DeploymentSlotType.Staging, DeploymentSlotType.Production, IgnoreCase = true)] + public string Slot + { + get; + set; + } + + [Parameter(Position = 2, Mandatory = false, HelpMessage = "Specify to remove the deployment and the underlying disk blob(s).")] + public SwitchParameter DeleteVHD + { + get; + set; + } + + [Parameter(Position = 3, Mandatory = false, HelpMessage = "Do not confirm deletion of deployment")] + public SwitchParameter Force + { + get; + set; + } + + public void RemoveDeploymentProcess() + { + ServiceManagementProfile.Initialize(); + + var slotType = (DeploymentSlot)Enum.Parse(typeof(DeploymentSlot), this.Slot, true); + + DeploymentGetResponse deploymentGetResponse = this.ComputeClient.Deployments.GetBySlot(this.ServiceName, slotType); + + if (deploymentGetResponse != null && !string.IsNullOrEmpty(deploymentGetResponse.ReservedIPName)) + { + WriteVerboseWithTimestamp(string.Format(Resources.ReservedIPNameNoLongerInUseByDeploymentButStillBeingReserved, deploymentGetResponse.ReservedIPName)); + } + if (DeleteVHD.IsPresent) + { + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.ComputeClient.Deployments.DeleteByName(this.ServiceName, deploymentGetResponse.Name, DeleteVHD.IsPresent)); + } + else + { + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.ComputeClient.Deployments.DeleteBySlot(this.ServiceName, slotType)); + } + } + + protected override void OnProcessRecord() + { + if (this.Force.IsPresent || this.ShouldContinue(Resources.DeployedArtifactsWillBeRemoved, Resources.DeploymentDeletion)) + { + this.RemoveDeploymentProcess(); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/ResetAzureRoleInstance.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/ResetAzureRoleInstance.cs new file mode 100644 index 000000000000..3396b8d7be74 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/ResetAzureRoleInstance.cs @@ -0,0 +1,130 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices +{ + /// + /// Requests a reboot/reimage of a single role instance or for all role instances of a role. + /// + [Cmdlet(VerbsCommon.Reset, "AzureRoleInstance", DefaultParameterSetName = "ParameterSetGetDeployment"), OutputType(typeof(ManagementOperationContext))] + public class ResetAzureRoleInstanceCommand : ServiceManagementBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the hosted service.")] + [ValidateNotNullOrEmpty] + public string ServiceName + { + get; + set; + } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Slot of the deployment.")] + [ValidateNotNullOrEmpty] + [ValidateSet(DeploymentSlotType.Staging, DeploymentSlotType.Production, IgnoreCase = true)] + public string Slot + { + get; + set; + } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the role instance.")] + [ValidateNotNullOrEmpty] + public string InstanceName + { + get; + set; + } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Reboot the role instance.")] + public SwitchParameter Reboot + { + get; + set; + } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Reimage the role instance.")] + public SwitchParameter Reimage + { + get; + set; + } + + public void ExecuteCommand() + { + if (InstanceName != null) + { + ServiceManagementProfile.Initialize(); + if (Reboot) + { + RebootSingleInstance(InstanceName); + } + else if (Reimage) + { + ReimageSingleInstance(InstanceName); + } + } + } + + protected override void OnProcessRecord() + { + this.ValidateParameters(); + this.ExecuteCommand(); + } + + private void RebootSingleInstance(string instanceName) + { + var slotType = (DeploymentSlot)Enum.Parse(typeof(DeploymentSlot), this.Slot, true); + InvokeInOperationContext(() => ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.ComputeClient.Deployments.RebootRoleInstanceByDeploymentSlot(this.ServiceName, slotType, instanceName))); + } + + private void ReimageSingleInstance(string instanceName) + { + var slotType = (DeploymentSlot)Enum.Parse(typeof(DeploymentSlot), this.Slot, true); + InvokeInOperationContext(() => ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.ComputeClient.Deployments.ReimageRoleInstanceByDeploymentSlot(this.ServiceName, slotType, instanceName))); + } + + private void ValidateParameters() + { + if (Reboot && Reimage) + { + ThrowTerminatingError(new ErrorRecord( + new ArgumentException(Resources.RebootAndReImageAreMutuallyExclusive), + string.Empty, + ErrorCategory.InvalidData, + null)); + } + else if (!Reboot && !Reimage) + { + ThrowTerminatingError(new ErrorRecord( + new ArgumentException(Resources.RebootOrReImageAreMissing), + string.Empty, + ErrorCategory.InvalidData, + null)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/SetAzureDeployment.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/SetAzureDeployment.cs new file mode 100644 index 000000000000..7c2db3e46472 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/SetAzureDeployment.cs @@ -0,0 +1,300 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Net; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices +{ + /// + /// Update deployment configuration, upgrade or status + /// + [Cmdlet(VerbsCommon.Set, "AzureDeployment"), OutputType(typeof(ManagementOperationContext))] + public class SetAzureDeploymentCommand : ServiceManagementBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ParameterSetName = "Upgrade", HelpMessage = "Upgrade Deployment")] + public SwitchParameter Upgrade + { + get; + set; + } + + [Parameter(Position = 0, Mandatory = true, ParameterSetName = "Config", HelpMessage = "Change Configuration of Deployment")] + public SwitchParameter Config + { + get; + set; + } + + [Parameter(Position = 0, Mandatory = true, ParameterSetName = "Status", HelpMessage = "Change Status of Deployment")] + public SwitchParameter Status + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = true, ParameterSetName = "Upgrade", ValueFromPipelineByPropertyName = true, HelpMessage = "Service name")] + [Parameter(Position = 1, Mandatory = true, ParameterSetName = "Config", ValueFromPipelineByPropertyName = true, HelpMessage = "Service name")] + [Parameter(Position = 1, Mandatory = true, ParameterSetName = "Status", ValueFromPipelineByPropertyName = true, HelpMessage = "Service name")] + [ValidateNotNullOrEmpty] + public string ServiceName + { + get; + set; + } + + [Parameter(Position = 2, Mandatory = true, ParameterSetName = "Upgrade", HelpMessage = "Package location. This parameter should have the local file path or URI to a .cspkg in blob storage whose storage account is part of the same subscription/project.")] + [ValidateNotNullOrEmpty] + public string Package + { + get; + set; + } + + [Parameter(Position = 2, Mandatory = true, ParameterSetName = "Config", HelpMessage = "Configuration file path. This parameter should specifiy a .cscfg file on disk.")] + [Parameter(Position = 3, Mandatory = true, ParameterSetName = "Upgrade", HelpMessage = "Configuration file path. This parameter should specifiy a .cscfg file on disk.")] + [ValidateNotNullOrEmpty] + public string Configuration + { + get; + set; + } + + [Parameter(Position = 4, Mandatory = true, ParameterSetName = "Upgrade", ValueFromPipelineByPropertyName = true, HelpMessage = "Deployment slot. Staging | Production")] + [Parameter(Position = 3, Mandatory = true, ParameterSetName = "Config", ValueFromPipelineByPropertyName = true, HelpMessage = "Deployment slot. Staging | Production")] + [Parameter(Position = 2, Mandatory = true, ParameterSetName = "Status", ValueFromPipelineByPropertyName = true, HelpMessage = "Deployment slot. Staging | Production")] + [ValidateSet(Model.DeploymentSlotType.Staging, Model.DeploymentSlotType.Production, IgnoreCase = true)] + public string Slot + { + get; + set; + } + + [Parameter(Position = 5, ParameterSetName = "Upgrade", HelpMessage = "Upgrade mode. Auto | Manual | Simultaneous")] + [ValidateSet(Model.UpgradeType.Auto, Model.UpgradeType.Manual, Model.UpgradeType.Simultaneous, IgnoreCase = true)] + public string Mode + { + get; + set; + } + + [Parameter(Position = 6, Mandatory = false, ParameterSetName = "Upgrade", HelpMessage = "Label name for the new deployment. Default: + ")] + [ValidateNotNullOrEmpty] + public string Label + { + get; + set; + } + + [Parameter(Position = 7, Mandatory = false, ParameterSetName = "Upgrade", HelpMessage = "Name of role to upgrade.")] + public string RoleName + { + get; + set; + } + + [Parameter(Position = 8, Mandatory = false, ParameterSetName = "Upgrade", HelpMessage = "Force upgrade.")] + public SwitchParameter Force + { + get; + set; + } + + [Parameter(Position = 3, Mandatory = true, ParameterSetName = "Status", HelpMessage = "New deployment status. Running | Suspended")] + [ValidateSet(Model.DeploymentStatus.Running, Model.DeploymentStatus.Suspended, IgnoreCase = true)] + public string NewStatus + { + get; + set; + } + + [Parameter(Position = 9, ValueFromPipelineByPropertyName = true, Mandatory = false, ParameterSetName = "Upgrade", HelpMessage = "Extension configurations.")] + [Parameter(Position = 4, ValueFromPipelineByPropertyName = true, Mandatory = false, ParameterSetName = "Config", HelpMessage = "HelpMessage")] + public ExtensionConfigurationInput[] ExtensionConfiguration + { + get; + set; + } + + public void ExecuteCommand() + { + string configString = string.Empty; + if (!string.IsNullOrEmpty(Configuration)) + { + configString = GeneralUtilities.GetConfiguration(Configuration); + } + + ExtensionConfiguration extConfig = null; + if (ExtensionConfiguration != null) + { + string errorConfigInput = null; + if (!ExtensionManager.Validate(ExtensionConfiguration, out errorConfigInput)) + { + throw new Exception(string.Format(Resources.ServiceExtensionCannotApplyExtensionsInSameType, errorConfigInput)); + } + + foreach (ExtensionConfigurationInput context in ExtensionConfiguration) + { + if (context != null && context.X509Certificate != null) + { + ExecuteClientActionNewSM( + null, + string.Format(Resources.ServiceExtensionUploadingCertificate, CommandRuntime, context.X509Certificate.Thumbprint), + () => this.ComputeClient.ServiceCertificates.Create(this.ServiceName, CertUtilsNewSM.Create(context.X509Certificate))); + } + } + + var slotType = (DeploymentSlot)Enum.Parse(typeof(DeploymentSlot), this.Slot, true); + DeploymentGetResponse d = null; + InvokeInOperationContext(() => + { + try + { + d = this.ComputeClient.Deployments.GetBySlot(this.ServiceName, slotType); + } + catch (CloudException ex) + { + if (ex.Response.StatusCode != HttpStatusCode.NotFound && IsVerbose() == false) + { + this.WriteExceptionDetails(ex); + } + } + }); + + ExtensionManager extensionMgr = new ExtensionManager(this, ServiceName); + extConfig = extensionMgr.Add(d, ExtensionConfiguration, this.Slot); + } + + // Upgrade Parameter Set + if (string.Compare(ParameterSetName, "Upgrade", StringComparison.OrdinalIgnoreCase) == 0) + { + bool removePackage = false; + var storageName = CurrentContext.Subscription.GetProperty(AzureSubscription.Property.StorageAccount); + + Uri packageUrl = null; + if (Package.StartsWith(Uri.UriSchemeHttp, StringComparison.OrdinalIgnoreCase) || + Package.StartsWith(Uri.UriSchemeHttps, StringComparison.OrdinalIgnoreCase)) + { + packageUrl = new Uri(Package); + } + else + { + if (string.IsNullOrEmpty(storageName)) + { + throw new ArgumentException(Resources.CurrentStorageAccountIsNotSet); + } + + var progress = new ProgressRecord(0, Resources.WaitForUploadingPackage, Resources.UploadingPackage); + WriteProgress(progress); + removePackage = true; + InvokeInOperationContext(() => packageUrl = RetryCall(s => AzureBlob.UploadPackageToBlob(this.StorageClient, storageName, Package, null))); + } + + DeploymentUpgradeMode upgradeMode; + if (!Enum.TryParse(Mode, out upgradeMode)) + { + upgradeMode = DeploymentUpgradeMode.Auto; + } + + var upgradeDeploymentInput = new DeploymentUpgradeParameters + { + Mode = upgradeMode, + Configuration = configString, + ExtensionConfiguration = extConfig, + PackageUri = packageUrl, + Label = Label ?? ServiceName, + Force = Force.IsPresent + }; + + if (!string.IsNullOrEmpty(RoleName)) + { + upgradeDeploymentInput.RoleToUpgrade = RoleName; + } + + InvokeInOperationContext(() => + { + try + { + ExecuteClientActionNewSM( + upgradeDeploymentInput, + CommandRuntime.ToString(), + () => this.ComputeClient.Deployments.UpgradeBySlot( + this.ServiceName, + (DeploymentSlot)Enum.Parse(typeof(DeploymentSlot), this.Slot, true), + upgradeDeploymentInput)); + + if (removePackage == true) + { + this.RetryCall(s => + AzureBlob.DeletePackageFromBlob( + this.StorageClient, + storageName, + packageUrl)); + } + } + catch (CloudException ex) + { + this.WriteExceptionDetails(ex); + } + }); + } + else if (string.Compare(this.ParameterSetName, "Config", StringComparison.OrdinalIgnoreCase) == 0) + { + // Config parameter set + var changeDeploymentStatusParams = new DeploymentChangeConfigurationParameters + { + Configuration = configString, + ExtensionConfiguration = extConfig + }; + + ExecuteClientActionNewSM( + changeDeploymentStatusParams, + CommandRuntime.ToString(), + () => this.ComputeClient.Deployments.ChangeConfigurationBySlot( + this.ServiceName, + (DeploymentSlot)Enum.Parse(typeof(DeploymentSlot), this.Slot, true), + changeDeploymentStatusParams)); + } + else + { + // Status parameter set + var updateDeploymentStatusParams = new DeploymentUpdateStatusParameters + { + Status = (UpdatedDeploymentStatus)Enum.Parse(typeof(UpdatedDeploymentStatus), this.NewStatus, true) + }; + + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.ComputeClient.Deployments.UpdateStatusByDeploymentSlot( + this.ServiceName, + (DeploymentSlot)Enum.Parse(typeof(DeploymentSlot), this.Slot, true), + updateDeploymentStatusParams)); + } + } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + this.ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/SetAzureRole.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/SetAzureRole.cs new file mode 100644 index 000000000000..a21137275f0a --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/SetAzureRole.cs @@ -0,0 +1,117 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using System.Xml.Linq; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices +{ + /// + /// Sets the instance count for the selected role. + /// + [Cmdlet(VerbsCommon.Set, "AzureRole", DefaultParameterSetName = "ParameterSetDeploymentSlot"), OutputType(typeof(ManagementOperationContext))] + public class SetAzureRoleCommand : ServiceManagementBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true)] + public string ServiceName + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Slot of the deployment.")] + [ValidateSet(DeploymentSlotType.Staging, DeploymentSlotType.Production, IgnoreCase = true)] + public string Slot + { + get; + set; + } + + [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public string RoleName + { + get; + set; + } + + [Parameter(Position = 3, Mandatory = true, HelpMessage = "Instance count.")] + [ValidateNotNullOrEmpty] + public int Count + { + get; + set; + } + + public void SetRoleInstanceCountProcess() + { + OperationStatusResponse operation; + var currentDeployment = this.GetCurrentDeployment(out operation); + if (currentDeployment == null) + { + return; + } + + XNamespace ns = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration"; + var configuration = XDocument.Parse(currentDeployment.Configuration); + var role = configuration.Root.Elements(ns + "Role").SingleOrDefault(p => string.Compare(p.Attribute("name").Value, this.RoleName, true) == 0); + + if (role != null) + { + role.Element(ns + "Instances").SetAttributeValue("count", this.Count); + } + + var updatedConfigurationParameter = new DeploymentChangeConfigurationParameters + { + Configuration = configuration.ToString() + }; + DeploymentSlot slot; + if (!Enum.TryParse(this.Slot, out slot)) + { + throw new ArgumentOutOfRangeException("Slot"); + } + ExecuteClientActionNewSM(configuration, + CommandRuntime.ToString(), + () => this.ComputeClient.Deployments.ChangeConfigurationBySlot(this.ServiceName, slot, updatedConfigurationParameter)); + } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + this.SetRoleInstanceCountProcess(); + } + + private DeploymentGetResponse GetCurrentDeployment(out OperationStatusResponse operation) + { + DeploymentSlot slot; + if (!Enum.TryParse(this.Slot, out slot)) + { + throw new ArgumentOutOfRangeException("Slot"); + } + + WriteVerboseWithTimestamp(Resources.GetDeploymentBeginOperation); + DeploymentGetResponse deploymentGetResponse = this.ComputeClient.Deployments.GetBySlot(this.ServiceName, slot); + operation = GetOperationNewSM(deploymentGetResponse.RequestId); + WriteVerboseWithTimestamp(Resources.GetDeploymentCompletedOperation); + + return deploymentGetResponse; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/SetAzureService.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/SetAzureService.cs new file mode 100644 index 000000000000..c9f35ba29c15 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/SetAzureService.cs @@ -0,0 +1,87 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices +{ + /// + /// Sets the label and description of the specified hosted service + /// + [Cmdlet(VerbsCommon.Set, "AzureService"), OutputType(typeof(ManagementOperationContext))] + public class SetAzureServiceCommand : ServiceManagementBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Service name.")] + [ValidateNotNullOrEmpty] + public string ServiceName + { + get; + set; + } + + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, HelpMessage = "A label for the hosted service. The label may be up to 100 characters in length.")] + [ValidateLength(0, 100)] + public string Label + { + get; + set; + } + + [Parameter(Position = 2, ValueFromPipelineByPropertyName = true, HelpMessage = "A description for the hosted service. The description may be up to 1024 characters in length.")] + [ValidateLength(0, 1024)] + public string Description + { + get; + set; + } + + [Parameter(Position = 3, ValueFromPipelineByPropertyName = true, HelpMessage = "Dns address to which the cloud service’s IP address resolves when queried using a reverse Dns query.")] + public string ReverseDnsFqdn + { + get; + set; + } + + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + + if (this.Label == null && this.Description == null && this.ReverseDnsFqdn == null) + { + ThrowTerminatingError(new ErrorRecord( + new Exception( + Resources.LabelOrDescriptionOrReverseDnsFqdnMustBeSpecified), + string.Empty, + ErrorCategory.InvalidData, + null)); + } + + var parameters = new HostedServiceUpdateParameters + { + Label = this.Label ?? null, + Description = this.Description, + ReverseDnsFqdn = this.ReverseDnsFqdn + }; + ExecuteClientActionNewSM(parameters, + CommandRuntime.ToString(), + () => this.ComputeClient.HostedServices.Update(this.ServiceName, parameters)); + + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/SetAzureWalkUpgradeDomain.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/SetAzureWalkUpgradeDomain.cs new file mode 100644 index 000000000000..a31b17c84130 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/SetAzureWalkUpgradeDomain.cs @@ -0,0 +1,79 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices +{ + /// + /// Walks the specified upgrade domain. + /// + [Cmdlet(VerbsCommon.Set, "AzureWalkUpgradeDomain"), OutputType(typeof(ManagementOperationContext))] + public class SetAzureWalkUpgradeDomainCommand : ServiceManagementBaseCmdlet + { + public SetAzureWalkUpgradeDomainCommand() + { + } + + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Service name")] + [ValidateNotNullOrEmpty] + public string ServiceName + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Deployment slot. Staging | Production")] + [ValidateSet(DeploymentSlotType.Staging, DeploymentSlotType.Production, IgnoreCase = true)] + public string Slot + { + get; + set; + } + + [Parameter(Position = 2, Mandatory = true, HelpMessage = "Domain number.")] + [ValidateNotNullOrEmpty] + public int DomainNumber + { + get; + set; + } + + internal void ExecuteCommand() + { + ServiceManagementProfile.Initialize(); + + var walkUpgradeDomainParams = new DeploymentWalkUpgradeDomainParameters + { + UpgradeDomain = this.DomainNumber + }; + + DeploymentSlot slotType = (DeploymentSlot)Enum.Parse(typeof(DeploymentSlot), Slot, true); + + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.ComputeClient.Deployments.WalkUpgradeDomainByDeploymentSlot(ServiceName, slotType, walkUpgradeDomainParams)); + } + + protected override void OnProcessRecord() + { + this.ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/AvailabilitySets/RemoveAzureAvailabilitySet.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/AvailabilitySets/RemoveAzureAvailabilitySet.cs new file mode 100644 index 000000000000..4f4d37385247 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/AvailabilitySets/RemoveAzureAvailabilitySet.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.AvailabilitySets +{ + using System.Management.Automation; + using Model; + + [Cmdlet(VerbsCommon.Remove, "AzureAvailabilitySet"), OutputType(typeof(IPersistentVM))] + public class RemoveAzureAvailabilitySet : VirtualMachineConfigurationCmdletBase + { + protected override void ProcessRecord() + { + base.ProcessRecord(); + this.VM.GetInstance().AvailabilitySetName = null; + this.WriteObject(this.VM, true); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/AvailabilitySets/SetAzureAvailabilitySet.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/AvailabilitySets/SetAzureAvailabilitySet.cs new file mode 100644 index 000000000000..34541c484af3 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/AvailabilitySets/SetAzureAvailabilitySet.cs @@ -0,0 +1,49 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.AvailabilitySets +{ + [Cmdlet(VerbsCommon.Set, "AzureAvailabilitySet"), OutputType(typeof(IPersistentVM))] + public class SetAzureAvailabilitySet : VirtualMachineConfigurationCmdletBase + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Availability set name.")] + [AllowNull] + [AllowEmptyString] + public string AvailabilitySetName { get; set; } + + internal void ExecuteCommand() + { + this.VM.GetInstance().AvailabilitySetName = this.AvailabilitySetName; + this.WriteObject(this.VM, true); + } + + protected override void ProcessRecord() + { + try + { + base.ProcessRecord(); + this.ExecuteCommand(); + } + catch (Exception ex) + { + this.WriteError(new ErrorRecord(ex, string.Empty, ErrorCategory.CloseError, null)); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/CertProvisioning/NewAzureCertificateSetting.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/CertProvisioning/NewAzureCertificateSetting.cs new file mode 100644 index 000000000000..ede3b88a3d59 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/CertProvisioning/NewAzureCertificateSetting.cs @@ -0,0 +1,70 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsCommon.New, "AzureCertificateSetting"), OutputType(typeof(CertificateSetting))] + public class NewAzureCertificateSettingCommand : Cmdlet + { + public string StoreLocation + { + get { return "LocalMachine"; } + } + + [Parameter(Position = 0, Mandatory = false, HelpMessage = "Store Name of the Certificate. Default is My.")] + [ValidateSet("AddressBook", "AuthRoot", "CertificateAuthority", "Disallowed", "My", "Root", "TrustedPeople", "TrustedPublisher")] + public string StoreName + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = true, HelpMessage = "Certificate Thumbprint.")] + [ValidateNotNullOrEmpty] + public string Thumbprint + { + get; + set; + } + + internal void ExecuteCommand() + { + CertificateSetting certSettings = new CertificateSetting + { + StoreLocation = StoreLocation, + StoreName = string.IsNullOrEmpty(StoreName) ? "My" : StoreName, + Thumbprint = Thumbprint + }; + + WriteObject(certSettings, true); + } + + protected override void ProcessRecord() + { + try + { + base.ProcessRecord(); + ExecuteCommand(); + } + catch (Exception ex) + { + WriteError(new ErrorRecord(ex, string.Empty, ErrorCategory.CloseError, null)); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/CertProvisioning/NewAzureSSHKey.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/CertProvisioning/NewAzureSSHKey.cs new file mode 100644 index 000000000000..555b177f8302 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/CertProvisioning/NewAzureSSHKey.cs @@ -0,0 +1,83 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsCommon.New, "AzureSSHKey"), OutputType(typeof(LinuxProvisioningConfigurationSet.SSHKeyPair), typeof(LinuxProvisioningConfigurationSet.SSHPublicKey))] + public class NewAzureSSHKeyCommand : Cmdlet + { + [Parameter(Position = 0, Mandatory = true, ParameterSetName = "keypair", HelpMessage = "Add a key pair")] + [ValidateNotNullOrEmpty] + public SwitchParameter KeyPair + { + get; + set; + } + + [Parameter(Position = 0, Mandatory = true, ParameterSetName = "publickey", HelpMessage = "Add a public")] + [ValidateNotNullOrEmpty] + public SwitchParameter PublicKey + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = true, HelpMessage = "Fingerprint of the SSH Key Pair")] + [ValidateNotNullOrEmpty] + public string Fingerprint + { + get; + set; + } + + [Parameter(Position = 2, Mandatory = true, HelpMessage = "Path of the SSH Key Pair")] + [ValidateNotNullOrEmpty] + public string Path + { + get; + set; + } + + internal void ExecuteCommand() + { + if (KeyPair.IsPresent) + { + var keypair = new LinuxProvisioningConfigurationSet.SSHKeyPair {Fingerprint = Fingerprint, Path = Path}; + WriteObject(keypair, true); + } + else + { + var keypair = new LinuxProvisioningConfigurationSet.SSHPublicKey {Fingerprint = Fingerprint, Path = Path}; + WriteObject(keypair, true); + } + } + + protected override void ProcessRecord() + { + try + { + base.ProcessRecord(); + ExecuteCommand(); + } + catch (Exception ex) + { + WriteError(new ErrorRecord(ex, string.Empty, ErrorCategory.CloseError, null)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/AddAzureDisk.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/AddAzureDisk.cs new file mode 100644 index 000000000000..ba81494c4bd7 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/AddAzureDisk.cs @@ -0,0 +1,65 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsCommon.Add, "AzureDisk"), OutputType(typeof(DiskContext))] + public class AddAzureDiskCommand : ServiceManagementBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the disk in the disk library.")] + [ValidateNotNullOrEmpty] + public string DiskName { get; set; } + + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Location of the physical blob backing the disk. This link refers to a blob in a storage account.")] + [ValidateNotNullOrEmpty] + public string MediaLocation { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = true, HelpMessage = "Label of the disk.")] + [ValidateNotNullOrEmpty] + public string Label { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = true, HelpMessage = "OS on Disk.")] + [ValidateNotNullOrEmpty] + public string OS { get; set; } + + public void ExecuteCommand() + { + var parameters = new VirtualMachineDiskCreateParameters + { + Name = this.DiskName, + MediaLinkUri = new Uri(this.MediaLocation), + OperatingSystemType = this.OS, + Label = string.IsNullOrEmpty(this.Label) ? this.DiskName : this.Label + }; + + this.ExecuteClientActionNewSM( + null, + this.CommandRuntime.ToString(), + () => this.ComputeClient.VirtualMachineDisks.CreateDisk(parameters), + (s, response) => this.ContextFactory(response, s)); + } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + this.ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/AddAzureVMImage.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/AddAzureVMImage.cs new file mode 100644 index 000000000000..83c9acfcfd99 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/AddAzureVMImage.cs @@ -0,0 +1,114 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.DiskRepository +{ + [Cmdlet(VerbsCommon.Add, "AzureVMImage"), OutputType(typeof(OSImageContext))] + public class AddAzureVMImage : ServiceManagementBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the image in the image library.")] + [ValidateNotNullOrEmpty] + public string ImageName { get; set; } + + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Location of the physical blob backing the image. This link refers to a blob in a storage account.")] + [ValidateNotNullOrEmpty] + public string MediaLocation { get; set; } + + [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The OS Type of the Image (Windows or Linux)")] + [ValidateSet("Windows", "Linux", IgnoreCase = true)] + public string OS { get; set; } + + [Parameter(Position = 3, ValueFromPipelineByPropertyName = true, HelpMessage = "Label of the image.")] + [ValidateNotNullOrEmpty] + public string Label { get; set; } + + [Parameter(Position = 4, ValueFromPipelineByPropertyName = true, HelpMessage = "Specifies the End User License Aggreement, recommended value is a URL.")] + [ValidateNotNullOrEmpty] + public string Eula { get; set; } + + [Parameter(Position = 5, ValueFromPipelineByPropertyName = true, HelpMessage = "Specifies the description of the OS image.")] + [ValidateNotNullOrEmpty] + public string Description { get; set; } + + [Parameter(Position = 6, ValueFromPipelineByPropertyName = true, HelpMessage = "Specifies a value that can be used to group OS images.")] + [ValidateNotNullOrEmpty] + public string ImageFamily { get; set; } + + [Parameter(Position = 7, ValueFromPipelineByPropertyName = true, HelpMessage = "Specifies the date when the OS image was added to the image repository.")] + [ValidateNotNullOrEmpty] + public DateTime? PublishedDate { get; set; } + + [Parameter(Position = 8, ValueFromPipelineByPropertyName = true, HelpMessage = "Specifies the URI that points to a document that contains the privacy policy related to the OS image.")] + [ValidateNotNullOrEmpty] + public Uri PrivacyUri { get; set; } + + [Parameter(Position = 9, ValueFromPipelineByPropertyName = true, HelpMessage = " Specifies the size to use for the virtual machine that is created from the OS image.")] + public string RecommendedVMSize { get; set; } + + public void ExecuteCommand() + { + var imageType = new VirtualMachineImageHelper(this.ComputeClient).GetImageType(this.ImageName); + bool isOSImage = imageType.HasFlag(VirtualMachineImageType.OSImage); + bool isVMImage = imageType.HasFlag(VirtualMachineImageType.VMImage); + + if (isVMImage) + { + // If there is another type of image with the same name, + // WAPS will stop here to avoid duplicates and potential conflicts + WriteErrorWithTimestamp( + string.Format( + Resources.ErrorAnotherImageTypeFoundWithTheSameName, + VirtualMachineImageType.VMImage, + this.ImageName)); + } + else + { + var parameters = new VirtualMachineOSImageCreateParameters + { + Name = this.ImageName, + MediaLinkUri = new Uri(this.MediaLocation), + Label = string.IsNullOrEmpty(this.Label) ? this.ImageName : this.Label, + OperatingSystemType = this.OS, + Eula = this.Eula, + Description = this.Description, + ImageFamily = this.ImageFamily, + PublishedDate = this.PublishedDate, + PrivacyUri = this.PrivacyUri, + RecommendedVMSize = this.RecommendedVMSize + }; + + this.ExecuteClientActionNewSM( + null, + this.CommandRuntime.ToString(), + () => this.ComputeClient.VirtualMachineOSImages.Create(parameters), + (s, response) => this.ContextFactory(response, s)); + } + } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + this.ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/GetAzureDisk.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/GetAzureDisk.cs new file mode 100644 index 000000000000..7587f0bcb043 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/GetAzureDisk.cs @@ -0,0 +1,52 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsCommon.Get, "AzureDisk"), OutputType(typeof(DiskContext))] + public class GetAzureDiskCommand : ServiceManagementBaseCmdlet + { + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, Mandatory = false, HelpMessage = "Name of the disk in the disk library.")] + [ValidateNotNullOrEmpty] + public string DiskName { get; set; } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + + if (!string.IsNullOrEmpty(this.DiskName)) + { + this.ExecuteClientActionNewSM( + null, + this.CommandRuntime.ToString(), + () => this.ComputeClient.VirtualMachineDisks.GetDisk(this.DiskName), + (s, response) => this.ContextFactory(response, s)); + } + else + { + this.ExecuteClientActionNewSM( + null, + this.CommandRuntime.ToString(), + () => this.ComputeClient.VirtualMachineDisks.ListDisks(), + (s, response) => response.Disks.Select(disk => this.ContextFactory(disk, s))); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/GetAzureVMImage.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/GetAzureVMImage.cs new file mode 100644 index 000000000000..4df01afc0a97 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/GetAzureVMImage.cs @@ -0,0 +1,96 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.DiskRepository +{ + [Cmdlet( + VerbsCommon.Get, + AzureVMImageNoun), + OutputType( + typeof(OSImageContext), + typeof(VMImageContext))] + public class GetAzureVMImage : ServiceManagementBaseCmdlet + { + protected const string AzureVMImageNoun = "AzureVMImage"; + + [Parameter( + Position = 0, + ValueFromPipelineByPropertyName = true, + Mandatory = false, + HelpMessage = "Name of the image in the image library.")] + [ValidateNotNullOrEmpty] + public string ImageName { get; set; } + + protected void GetAzureVMImageProcess() + { + ServiceManagementProfile.Initialize(); + + if (string.IsNullOrEmpty(this.ImageName)) + { + this.ExecuteClientActionNewSM( + null, + this.CommandRuntime.ToString(), + () => this.ComputeClient.VirtualMachineOSImages.List(), + (s, response) => response.Images.Select( + t => this.ContextFactory(t, s))); + + this.ExecuteClientActionNewSM( + null, + this.CommandRuntime.ToString(), + () => this.ComputeClient.VirtualMachineVMImages.List(), + (s, response) => response.VMImages.Select( + t => this.ContextFactory(t, s))); + } + else + { + var imageType = new VirtualMachineImageHelper(this.ComputeClient).GetImageType(this.ImageName); + bool isOSImage = imageType.HasFlag(VirtualMachineImageType.OSImage); + bool isVMImage = imageType.HasFlag(VirtualMachineImageType.VMImage); + + if (isOSImage || !isVMImage) + { + this.ExecuteClientActionNewSM( + null, + this.CommandRuntime.ToString(), + () => this.ComputeClient.VirtualMachineOSImages.Get(this.ImageName), + (s, t) => this.ContextFactory(t, s)); + } + + if (isVMImage) + { + this.ExecuteClientActionNewSM( + null, + this.CommandRuntime.ToString(), + () => this.ComputeClient.VirtualMachineVMImages.List(), + (s, imgs) => imgs + .Where(t => string.Equals(t.Name, this.ImageName, StringComparison.OrdinalIgnoreCase)) + .Select(t => this.ContextFactory(t, s))); + } + } + } + + protected override void OnProcessRecord() + { + GetAzureVMImageProcess(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/GetAzureVMImageDiskConfigSet.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/GetAzureVMImageDiskConfigSet.cs new file mode 100644 index 000000000000..9056413fad9d --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/GetAzureVMImageDiskConfigSet.cs @@ -0,0 +1,50 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet( + VerbsCommon.Get, + AzureDiskConfigSetNoun), + OutputType(typeof(VirtualMachineImageDiskConfigSet))] + public class GetAzureVMImageDiskConfigSet : PSCmdlet + { + protected const string AzureDiskConfigSetNoun = "AzureVMImageDiskConfigSet"; + + [Parameter( + Position = 1, + ValueFromPipeline = true, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The OS/VM Image Context")] + public OSImageContext ImageContext { get; set; } + + protected override void ProcessRecord() + { + ServiceManagementProfile.Initialize(); + + var image = ImageContext as VMImageContext; + + var diskConfig = image == null ? null : new VirtualMachineImageDiskConfigSet + { + OSDiskConfiguration = image.OSDiskConfiguration, + DataDiskConfigurations = image.DataDiskConfigurations + }; + + WriteObject(diskConfig); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/NewAzureVMImageDiskConfigSet.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/NewAzureVMImageDiskConfigSet.cs new file mode 100644 index 000000000000..562311bf57bf --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/NewAzureVMImageDiskConfigSet.cs @@ -0,0 +1,34 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet( + VerbsCommon.New, + AzureDiskConfigSetNoun), + OutputType(typeof(VirtualMachineImageDiskConfigSet))] + public class NewAzureVMImageDiskConfigSet : PSCmdlet + { + protected const string AzureDiskConfigSetNoun = "AzureVMImageDiskConfigSet"; + + protected override void ProcessRecord() + { + ServiceManagementProfile.Initialize(); + WriteObject(new VirtualMachineImageDiskConfigSet()); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/RemoveAzureDisk.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/RemoveAzureDisk.cs new file mode 100644 index 000000000000..ae72aacb89bc --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/RemoveAzureDisk.cs @@ -0,0 +1,46 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsCommon.Remove, "AzureDisk"), OutputType(typeof(ManagementOperationContext))] + public class RemoveAzureDiskCommand : ServiceManagementBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the data disk in the disk library to remove.")] + [ValidateNotNullOrEmpty] + public string DiskName { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Specify to remove the underlying VHD from the blob storage.")] + public SwitchParameter DeleteVHD { get; set; } + + public void RemoveDiskProcess() + { + ServiceManagementProfile.Initialize(); + + // Remove the disk from the disk repository + this.ExecuteClientActionNewSM( + null, + this.CommandRuntime.ToString(), + () => this.ComputeClient.VirtualMachineDisks.DeleteDisk(this.DiskName, this.DeleteVHD.IsPresent)); + } + + protected override void OnProcessRecord() + { + this.RemoveDiskProcess(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/RemoveAzureVMImage.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/RemoveAzureVMImage.cs new file mode 100644 index 000000000000..43a90b9838bf --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/RemoveAzureVMImage.cs @@ -0,0 +1,79 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.DiskRepository +{ + [Cmdlet( + VerbsCommon.Remove, + AzureVMImageNoun), + OutputType( + typeof(ManagementOperationContext))] + public class RemoveAzureVMImage : ServiceManagementBaseCmdlet + { + protected const string AzureVMImageNoun = "AzureVMImage"; + + [Parameter( + Position = 0, + Mandatory = true, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Name of the image in the image library to remove.")] + [ValidateNotNullOrEmpty] + public string ImageName { get; set; } + + [Parameter( + Position = 1, + HelpMessage = "Specify to remove the underlying VHD from the blob storage.")] + public SwitchParameter DeleteVHD { get; set; } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + + this.ExecuteClientActionNewSM( + null, + this.CommandRuntime.ToString(), + () => + { + OperationResponse op = null; + + var imageType = new VirtualMachineImageHelper(this.ComputeClient).GetImageType(this.ImageName); + bool isOSImage = imageType.HasFlag(VirtualMachineImageType.OSImage); + bool isVMImage = imageType.HasFlag(VirtualMachineImageType.VMImage); + + if (isOSImage && isVMImage) + { + WriteErrorWithTimestamp( + string.Format(Resources.DuplicateNamesFoundInBothVMAndOSImages, this.ImageName)); + } + else if (isVMImage) + { + op = this.ComputeClient.VirtualMachineVMImages.Delete(this.ImageName, this.DeleteVHD.IsPresent); + } + else + { + // Remove the image from the image repository + op = this.ComputeClient.VirtualMachineOSImages.Delete(this.ImageName, this.DeleteVHD.IsPresent); + } + + return op; + }); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/RemoveAzureVMImageDataDiskConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/RemoveAzureVMImageDataDiskConfig.cs new file mode 100644 index 000000000000..d92fd5bdd7b5 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/RemoveAzureVMImageDataDiskConfig.cs @@ -0,0 +1,95 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet( + VerbsCommon.Remove, + AzureDataDiskConfigurationNoun, + DefaultParameterSetName = RemoveByDiskNameParamSet), + OutputType( + typeof(VirtualMachineImageDiskConfigSet))] + public class RemoveAzureVMImageDataDiskConfig : PSCmdlet + { + protected const string AzureDataDiskConfigurationNoun = "AzureVMImageDataDiskConfig"; + protected const string RemoveByDiskNameParamSet = "RemoveByDiskName"; + protected const string RemoveByDiskLunParamSet = "RemoveByDiskLun"; + + [Parameter( + Position = 0, + Mandatory = true, + ValueFromPipeline = true, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Disk Configuration Set")] + [ValidateNotNullOrEmpty] + public VirtualMachineImageDiskConfigSet DiskConfig { get; set; } + + [Parameter( + ParameterSetName = RemoveByDiskNameParamSet, + Position = 1, + Mandatory = true, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Data Disk Name")] + [ValidateNotNullOrEmpty] + public string DataDiskName { get; set; } + + [Parameter( + ParameterSetName = RemoveByDiskLunParamSet, + Position = 1, + Mandatory = true, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Data Disk Lun")] + [ValidateNotNullOrEmpty] + public int Lun { get; set; } + + protected override void ProcessRecord() + { + ServiceManagementProfile.Initialize(); + + if (DiskConfig.DataDiskConfigurations != null) + { + IEnumerable dataDisks = null; + + if (string.Equals(this.ParameterSetName, RemoveByDiskNameParamSet)) + { + dataDisks = DiskConfig.DataDiskConfigurations.Where( + d => !string.Equals(d.Name, this.DataDiskName, StringComparison.OrdinalIgnoreCase)); + } + else + { + dataDisks = DiskConfig.DataDiskConfigurations.Where( + d => d.Lun != this.Lun + ); + } + + if (dataDisks != null) + { + DiskConfig.DataDiskConfigurations = new DataDiskConfigurationList(); + foreach (var dataDisk in dataDisks) + { + DiskConfig.DataDiskConfigurations.Add(dataDisk); + } + } + } + + WriteObject(DiskConfig); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/RemoveAzureVMImageOSDiskConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/RemoveAzureVMImageOSDiskConfig.cs new file mode 100644 index 000000000000..1e92c14ee3f4 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/RemoveAzureVMImageOSDiskConfig.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet( + VerbsCommon.Remove, + AzureOSDiskConfigurationNoun), + OutputType( + typeof(VirtualMachineImageDiskConfigSet))] + public class RemoveAzureVMImageOSDiskConfig : PSCmdlet + { + protected const string AzureOSDiskConfigurationNoun = "AzureVMImageOSDiskConfig"; + + [Parameter( + Position = 0, + Mandatory = true, + ValueFromPipeline = true, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Disk Configuration Set")] + [ValidateNotNullOrEmpty] + public VirtualMachineImageDiskConfigSet DiskConfig { get; set; } + + protected override void ProcessRecord() + { + ServiceManagementProfile.Initialize(); + DiskConfig.OSDiskConfiguration = null; + WriteObject(DiskConfig); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/SetAzureVMImageDataDiskConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/SetAzureVMImageDataDiskConfig.cs new file mode 100644 index 000000000000..0b1d94936b26 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/SetAzureVMImageDataDiskConfig.cs @@ -0,0 +1,90 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet( + VerbsCommon.Set, + AzureDataDiskConfigurationNoun), + OutputType( + typeof(VirtualMachineImageDiskConfigSet))] + public class SetAzureVMImageDataDiskConfig : PSCmdlet + { + protected const string AzureDataDiskConfigurationNoun = "AzureVMImageDataDiskConfig"; + + [Parameter( + Position = 0, + Mandatory = true, + ValueFromPipeline = true, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Disk Configuration Set")] + [ValidateNotNullOrEmpty] + public VirtualMachineImageDiskConfigSet DiskConfig { get; set; } + + [Parameter( + Position = 1, + Mandatory = true, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Data Disk Name")] + [ValidateNotNullOrEmpty] + public string DataDiskName { get; set; } + + [Parameter( + Position = 2, + Mandatory = true, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Lun")] + [ValidateNotNullOrEmpty] + public int Lun { get; set; } + + [Parameter( + Position = 3, + Mandatory = true, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Controls the platform caching behavior of the data disk blob for read efficiency.")] + [ValidateNotNullOrEmpty] + [ValidateSet("ReadOnly", "ReadWrite", "None", IgnoreCase = true)] + public string HostCaching { get; set; } + + protected override void ProcessRecord() + { + ServiceManagementProfile.Initialize(); + + if (DiskConfig.DataDiskConfigurations == null) + { + DiskConfig.DataDiskConfigurations = new DataDiskConfigurationList(); + } + + var diskConfig = DiskConfig.DataDiskConfigurations.FirstOrDefault( + d => string.Equals(d.Name, this.DataDiskName, StringComparison.OrdinalIgnoreCase)); + + if (diskConfig == null) + { + diskConfig = new DataDiskConfiguration(); + DiskConfig.DataDiskConfigurations.Add(diskConfig); + } + + diskConfig.Name = this.DataDiskName; + diskConfig.HostCaching = this.HostCaching; + diskConfig.Lun = this.Lun; + + WriteObject(DiskConfig); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/SetAzureVMImageOSDiskConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/SetAzureVMImageOSDiskConfig.cs new file mode 100644 index 000000000000..377c9f567da2 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/SetAzureVMImageOSDiskConfig.cs @@ -0,0 +1,60 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet( + VerbsCommon.Set, + AzureOSDiskConfigurationNoun), + OutputType( + typeof(VirtualMachineImageDiskConfigSet))] + public class SetAzureVMImageOSDiskConfig : PSCmdlet + { + protected const string AzureOSDiskConfigurationNoun = "AzureVMImageOSDiskConfig"; + + [Parameter( + Position = 0, + Mandatory = true, + ValueFromPipeline = true, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Disk Configuration Set")] + [ValidateNotNullOrEmpty] + public VirtualMachineImageDiskConfigSet DiskConfig { get; set; } + + [Parameter( + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Controls the platform caching behavior of the OS disk blob for read efficiency.")] + [ValidateNotNullOrEmpty] + [ValidateSet("ReadOnly", "ReadWrite", IgnoreCase = true)] + public string HostCaching { get; set; } + + protected override void ProcessRecord() + { + ServiceManagementProfile.Initialize(); + + if (DiskConfig.OSDiskConfiguration == null) + { + DiskConfig.OSDiskConfiguration = new OSDiskConfiguration(); + } + + DiskConfig.OSDiskConfiguration.HostCaching = this.HostCaching; + + WriteObject(DiskConfig); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/UpdateAzureDisk.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/UpdateAzureDisk.cs new file mode 100644 index 000000000000..a4df2ab42c07 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/UpdateAzureDisk.cs @@ -0,0 +1,54 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsData.Update, "AzureDisk"), OutputType(typeof(DiskContext))] + public class UpdateAzureDiskCommand : ServiceManagementBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the disk in the disk library.")] + [ValidateNotNullOrEmpty] + public string DiskName { get; set; } + + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Label of the disk.")] + [ValidateNotNullOrEmpty] + public string Label { get; set; } + + internal void ExecuteCommand() + { + ServiceManagementProfile.Initialize(); + var parameters = new VirtualMachineDiskUpdateParameters + { + Name = this.DiskName, + Label = this.Label + }; + + this.ExecuteClientActionNewSM( + null, + this.CommandRuntime.ToString(), + () => this.ComputeClient.VirtualMachineDisks.UpdateDisk(this.DiskName, parameters), + (s, response) => this.ContextFactory(response, s)); + } + + protected override void OnProcessRecord() + { + this.ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/UpdateAzureVMImage.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/UpdateAzureVMImage.cs new file mode 100644 index 000000000000..070848441ba9 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/DiskRepository/UpdateAzureVMImage.cs @@ -0,0 +1,153 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using AutoMapper; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.DiskRepository +{ + [Cmdlet(VerbsData.Update, VirtualMachineImageNoun), OutputType(typeof(OSImageContext))] + public class UpdateAzureVMImage : ServiceManagementBaseCmdlet + { + protected const string VirtualMachineImageNoun = "AzureVMImage"; + + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the image in the image library.")] + [ValidateNotNullOrEmpty] + public string ImageName { get; set; } + + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Label of the image.")] + [ValidateNotNullOrEmpty] + public string Label { get; set; } + + [Parameter(Position = 2, ValueFromPipelineByPropertyName = true, HelpMessage = "Specifies the End User License Aggreement, recommended value is a URL.")] + [ValidateNotNullOrEmpty] + public string Eula { get; set; } + + [Parameter(Position = 3, ValueFromPipelineByPropertyName = true, HelpMessage = "Specifies the description of the OS image.")] + [ValidateNotNullOrEmpty] + public string Description { get; set; } + + [Parameter(Position = 4, ValueFromPipelineByPropertyName = true, HelpMessage = "Specifies a value that can be used to group OS images.")] + [ValidateNotNullOrEmpty] + public string ImageFamily { get; set; } + + [Parameter(Position = 5, ValueFromPipelineByPropertyName = true, HelpMessage = "Specifies the date when the OS image was added to the image repository.")] + [ValidateNotNullOrEmpty] + public DateTime? PublishedDate { get; set; } + + [Parameter(Position = 6, ValueFromPipelineByPropertyName = true, HelpMessage = "Specifies the URI that points to a document that contains the privacy policy related to the OS image.")] + [ValidateNotNullOrEmpty] + public Uri PrivacyUri { get; set; } + + [Parameter(Position = 7, ValueFromPipelineByPropertyName = true, HelpMessage = " Specifies the size to use for the virtual machine that is created from the OS image.")] + [ValidateNotNullOrEmpty] + public string RecommendedVMSize { get; set; } + + [Parameter(Position = 8, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Disk Configuration Set")] + [ValidateNotNullOrEmpty] + public VirtualMachineImageDiskConfigSet DiskConfig { get; set; } + + [Parameter(Position = 9, ValueFromPipelineByPropertyName = true, HelpMessage = "Language.")] + [ValidateNotNullOrEmpty] + public string Language { get; set; } + + [Parameter(Position = 10, ValueFromPipelineByPropertyName = true, HelpMessage = "IconUri.")] + [ValidateNotNullOrEmpty] + public Uri IconUri { get; set; } + + [Parameter(Position = 11, ValueFromPipelineByPropertyName = true, HelpMessage = "SmallIconUri.")] + [ValidateNotNullOrEmpty] + public Uri SmallIconUri { get; set; } + + [Parameter(Position = 12, ValueFromPipelineByPropertyName = true, HelpMessage = "DontShowInGui.")] + public SwitchParameter DontShowInGui { get; set; } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + + var imageType = new VirtualMachineImageHelper(this.ComputeClient).GetImageType(this.ImageName); + bool isOSImage = imageType.HasFlag(VirtualMachineImageType.OSImage); + bool isVMImage = imageType.HasFlag(VirtualMachineImageType.VMImage); + + if (isOSImage && isVMImage) + { + WriteErrorWithTimestamp( + string.Format(Resources.DuplicateNamesFoundInBothVMAndOSImages, this.ImageName)); + } + else if (isOSImage) + { + var parameters = new VirtualMachineOSImageUpdateParameters + { + Label = this.Label, + Eula = this.Eula, + Description = this.Description, + ImageFamily = this.ImageFamily, + PublishedDate = this.PublishedDate, + PrivacyUri = this.PrivacyUri, + RecommendedVMSize = this.RecommendedVMSize, + Language = this.Language, + IconUri = this.IconUri, + SmallIconUri = this.SmallIconUri, + ShowInGui = this.DontShowInGui.IsPresent ? (bool?)false : null + }; + + this.ExecuteClientActionNewSM( + null, + this.CommandRuntime.ToString(), + () => this.ComputeClient.VirtualMachineOSImages.Update(this.ImageName, parameters), + (s, response) => this.ContextFactory(response, s)); + } + else + { + var osDiskConfig = DiskConfig == null ? null : DiskConfig.OSDiskConfiguration; + var dataDiskConfigs = DiskConfig == null ? null : DiskConfig.DataDiskConfigurations.ToList(); + + var parameters = new VirtualMachineVMImageUpdateParameters + { + Label = this.Label, + Eula = this.Eula, + Description = this.Description, + ImageFamily = this.ImageFamily, + PublishedDate = this.PublishedDate, + PrivacyUri = this.PrivacyUri, + RecommendedVMSize = this.RecommendedVMSize, + OSDiskConfiguration = Mapper.Map(osDiskConfig), + DataDiskConfigurations = dataDiskConfigs == null ? null : dataDiskConfigs.Select(d => new DataDiskConfigurationUpdateParameters + { + HostCaching = d.HostCaching, + LogicalUnitNumber = d.Lun, + Name = d.Name + }).ToList(), + Language = this.Language, + IconUri = this.IconUri, + SmallIconUri = this.SmallIconUri, + ShowInGui = this.DontShowInGui.IsPresent ? (bool?)false : null + }; + + this.ExecuteClientActionNewSM( + null, + this.CommandRuntime.ToString(), + () => this.ComputeClient.VirtualMachineVMImages.Update(this.ImageName, parameters)); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Disks/AddAzureDataDisk.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Disks/AddAzureDataDisk.cs new file mode 100644 index 000000000000..123d19bb833f --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Disks/AddAzureDataDisk.cs @@ -0,0 +1,175 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Collections.ObjectModel; +using System.Globalization; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsCommon.Add, "AzureDataDisk", DefaultParameterSetName = "CreateNew"), OutputType(typeof(IPersistentVM))] + public class AddAzureDataDiskCommand : VirtualMachineConfigurationCmdletBase + { + [Parameter(Position = 0, Mandatory = true, ParameterSetName = "CreateNew", HelpMessage = "Specify to create a new data disk.")] + public SwitchParameter CreateNew + { + get; + set; + } + + [Parameter(Position = 0, Mandatory = true, ParameterSetName = "Import", HelpMessage = "Specify to import an existing data disk from the disk library.")] + public SwitchParameter Import + { + get; + set; + } + + [Parameter(Position = 0, Mandatory = true, ParameterSetName = "ImportFrom", HelpMessage = "Specify to import an existing data disk from a storage location.")] + public SwitchParameter ImportFrom + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = true, ParameterSetName = "Import", ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the data disk in the disk library.")] + [ValidateNotNullOrEmpty] + public string DiskName + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = true, ParameterSetName = "CreateNew", HelpMessage = "Logical disk size in gigabytes.")] + [ValidateNotNullOrEmpty] + public int DiskSizeInGB + { + get; + set; + } + + [Parameter(Position = 2, Mandatory = true, ParameterSetName = "CreateNew", HelpMessage = "Label of the disk.")] + [Parameter(Position = 2, Mandatory = true, ParameterSetName = "ImportFrom", HelpMessage = "Label of the disk.")] + [ValidateNotNullOrEmpty] + public string DiskLabel + { + get; + set; + } + + [Parameter(Position = 3, Mandatory = true, HelpMessage = "Numerical value that defines the slot where the data drive will be mounted in the virtual machine.")] + [ValidateNotNullOrEmpty] + public int LUN + { + get; + set; + } + + [Parameter(Mandatory = false, ParameterSetName = "CreateNew", ValueFromPipelineByPropertyName = true, HelpMessage = "Location of the physical blob backing the data disk to be created.")] + [Parameter(Mandatory = true, ParameterSetName = "ImportFrom", ValueFromPipelineByPropertyName = true, HelpMessage = "Location of the physical blob backing the data disk. This link refers to a blob in a storage account.")] + [ValidateNotNullOrEmpty] + public string MediaLocation + { + get; + set; + } + + [Parameter(HelpMessage = "Controls the platform caching behavior of data disk blob for read efficiency.")] + [ValidateSet("ReadOnly", "ReadWrite", "None", IgnoreCase = true)] + public string HostCaching + { + get; + set; + } + + internal void ExecuteCommand() + { + var dataDisks = GetDataDisks(); + var dataDisk = dataDisks.SingleOrDefault(disk => disk.Lun == LUN); + + if (dataDisk != null) + { + ThrowTerminatingError( + new ErrorRecord( + new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, Resources.DataDiskAlreadySpecifiedForVM, this.LUN)), + string.Empty, + ErrorCategory.InvalidData, + null)); + } + + dataDisk = new DataVirtualHardDisk { HostCaching = HostCaching, Lun = LUN }; + + switch (ParameterSetName) + { + case "CreateNew": + dataDisk.DiskLabel = DiskLabel; + dataDisk.LogicalDiskSizeInGB = DiskSizeInGB; + dataDisk.MediaLink = string.IsNullOrEmpty(MediaLocation) ? null : new Uri(MediaLocation); + break; + case "Import": + dataDisk.DiskName = DiskName; + break; + case "ImportFrom": + dataDisk.DiskName = DiskName; + dataDisk.SourceMediaLink = string.IsNullOrEmpty(MediaLocation) ? null : new Uri(MediaLocation); + break; + } + + dataDisks.Add(dataDisk); + + WriteObject(VM, true); + } + + protected override void ProcessRecord() + { + try + { + ValidateParameters(); + base.ProcessRecord(); + ExecuteCommand(); + } + catch (Exception ex) + { + WriteError(new ErrorRecord(ex, string.Empty, ErrorCategory.CloseError, null)); + } + } + + protected Collection GetDataDisks() + { + var role = VM.GetInstance(); + + if (role.DataVirtualHardDisks == null) + { + role.DataVirtualHardDisks = new Collection(); + } + + return role.DataVirtualHardDisks; + } + + protected void ValidateParameters() + { + var currentSubscription = AzureSession.CurrentContext.Subscription; + if ((currentSubscription == null || currentSubscription.GetProperty(AzureSubscription.Property.StorageAccount) == null) && this.MediaLocation == null && string.Compare(this.ParameterSetName, "CreateNew", StringComparison.OrdinalIgnoreCase) == 0) + { + throw new ArgumentException(Resources.MediaLocationOrDefaultStorageAccountMustBeSpecified); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Disks/GetAzureDataDisk.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Disks/GetAzureDataDisk.cs new file mode 100644 index 000000000000..6c6eed3bdc6c --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Disks/GetAzureDataDisk.cs @@ -0,0 +1,52 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Disks +{ + [Cmdlet(VerbsCommon.Get, "AzureDataDisk"), OutputType(typeof(DataVirtualHardDisk))] + public class GetAzureDataDisk : VirtualMachineConfigurationCmdletBase + { + [Parameter(Position = 0, Mandatory = false, HelpMessage = "Data Disk LUN")] + [ValidateNotNullOrEmpty] + public int? Lun + { + get; + set; + } + + internal void ExecuteCommand() + { + var role = VM.GetInstance(); + + if (Lun == null) + { + WriteObject(role.DataVirtualHardDisks, true); + } + else + { + var disk = role.DataVirtualHardDisks.SingleOrDefault(dd => dd.Lun == Lun); + WriteObject(disk, true); + } + } + + protected override void ProcessRecord() + { + ExecuteCommand(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Disks/RemoveAzureDataDisk.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Disks/RemoveAzureDataDisk.cs new file mode 100644 index 000000000000..122767479d17 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Disks/RemoveAzureDataDisk.cs @@ -0,0 +1,97 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.ObjectModel; +using System.Globalization; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsCommon.Remove, "AzureDataDisk"), OutputType(typeof(IPersistentVM))] + public class RemoveAzureDataDiskCommand : VirtualMachineConfigurationCmdletBase + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Numerical value that defines the slot where the data drive is mounted in the virtual machine.")] + [ValidateNotNullOrEmpty] + public int LUN + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = false, HelpMessage = "Specify to remove the data disk and the underlying disk blob.")] + public SwitchParameter DeleteVHD + { + get; + set; + } + + internal void ExecuteCommand() + { + var dataDisks = GetDataDisks(); + var dataDisk = dataDisks.SingleOrDefault(disk => disk.Lun == LUN); + if (dataDisk == null) + { + ThrowTerminatingError( + new ErrorRecord( + new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, Resources.DataDiskAlreadyAssignedInVMConfiguration, LUN)), + string.Empty, + ErrorCategory.InvalidData, + null)); + } + + dataDisks.Remove(dataDisk); + + if (DeleteVHD.IsPresent) + { + if (VM.GetInstance().DataVirtualHardDisksToBeDeleted == null) + { + VM.GetInstance().DataVirtualHardDisksToBeDeleted = new Collection(); + } + + VM.GetInstance().DataVirtualHardDisksToBeDeleted.Add(dataDisk); + } + + WriteObject(VM, true); + } + + protected override void ProcessRecord() + { + try + { + base.ProcessRecord(); + ExecuteCommand(); + } + catch (Exception ex) + { + WriteError(new ErrorRecord(ex, string.Empty, ErrorCategory.CloseError, null)); + } + } + + protected Collection GetDataDisks() + { + var role = VM.GetInstance(); + + if (role.DataVirtualHardDisks == null) + { + role.DataVirtualHardDisks = new Collection(); + } + + return role.DataVirtualHardDisks; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Disks/SetAzureDataDisk.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Disks/SetAzureDataDisk.cs new file mode 100644 index 000000000000..a98f4190d91d --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Disks/SetAzureDataDisk.cs @@ -0,0 +1,90 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Collections.ObjectModel; +using System.Globalization; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsCommon.Set, "AzureDataDisk"), OutputType(typeof(IPersistentVM))] + public class SetAzureDataDiskCommand : VirtualMachineConfigurationCmdletBase + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Controls the platform caching behavior of data disk blob for read efficiency.")] + [ValidateSet("None", "ReadOnly", "ReadWrite", IgnoreCase = true)] + public string HostCaching + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = true, HelpMessage = "Numerical value that defines the slot where the data drive will be mounted in the virtual machine.")] + [ValidateNotNullOrEmpty] + public int LUN + { + get; + set; + } + + internal void ExecuteCommand() + { + var dataDisks = GetDataDisks(); + var dataDisk = dataDisks.SingleOrDefault(disk => disk.Lun == LUN); + + if (dataDisk == null) + { + ThrowTerminatingError( + new ErrorRecord( + new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, Resources.DataDiskNotAssignedForVM, this.LUN)), + string.Empty, + ErrorCategory.InvalidData, + null)); + } + + dataDisk.HostCaching = HostCaching; + + WriteObject(VM, true); + } + + protected override void ProcessRecord() + { + try + { + base.ProcessRecord(); + ExecuteCommand(); + } + catch (Exception ex) + { + WriteError(new ErrorRecord(ex, string.Empty, ErrorCategory.CloseError, null)); + } + } + + protected Collection GetDataDisks() + { + var role = VM.GetInstance(); + + if (role.DataVirtualHardDisks == null) + { + role.DataVirtualHardDisks = new Collection(); + } + + return role.DataVirtualHardDisks; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Disks/SetAzureOSDisk.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Disks/SetAzureOSDisk.cs new file mode 100644 index 000000000000..69e3aca99e26 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Disks/SetAzureOSDisk.cs @@ -0,0 +1,66 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsCommon.Set, "AzureOSDisk"), OutputType(typeof(IPersistentVM))] + public class SetAzureOSDiskCommand : VirtualMachineConfigurationCmdletBase + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Controls the platform caching behavior of data disk blob for read / write efficiency.")] + [ValidateSet("ReadOnly", "ReadWrite", IgnoreCase = true)] + public string HostCaching + { + get; + set; + } + + internal void ExecuteCommand() + { + var role = VM.GetInstance(); + + if (role.OSVirtualHardDisk == null) + { + ThrowTerminatingError( + new ErrorRecord( + new InvalidOperationException(Resources.OSDiskNotDefinedForVM), + string.Empty, + ErrorCategory.InvalidData, + null)); + } + + OSVirtualHardDisk disk = role.OSVirtualHardDisk; + disk.HostCaching = HostCaching; + WriteObject(VM, true); + } + + protected override void ProcessRecord() + { + try + { + base.ProcessRecord(); + ExecuteCommand(); + } + catch (Exception ex) + { + WriteError(new ErrorRecord(ex, string.Empty, ErrorCategory.CloseError, null)); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Endpoints/AddAzureEndpoint.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Endpoints/AddAzureEndpoint.cs new file mode 100644 index 000000000000..ef330462c84a --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Endpoints/AddAzureEndpoint.cs @@ -0,0 +1,258 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.ObjectModel; +using System.Globalization; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Endpoints +{ + [Cmdlet(VerbsCommon.Add, "AzureEndpoint", DefaultParameterSetName = AddAzureEndpoint.NoLBParameterSet), OutputType(typeof(IPersistentVM))] + public class AddAzureEndpoint : VirtualMachineConfigurationCmdletBase + { + private const string NoLBParameterSet = "NoLB"; + private const string LBNoProbeParameterSet = "LBNoProbe"; + private const string LBDefaultProbeParameterSet = "LBDefaultProbe"; + private const string LBCustomProbeParameterSet = "LBCustomProbe"; + + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Endpoint name")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Position = 1, Mandatory = true, HelpMessage = "Endpoint protocol.")] + [ValidateSet("tcp", "udp", IgnoreCase = true)] + [ValidateNotNullOrEmpty] + public string Protocol { get; set; } + + [Parameter(Position = 2, Mandatory = true, HelpMessage = "Local port.")] + [ValidateNotNullOrEmpty] + public int LocalPort { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Public port.")] + [ValidateNotNullOrEmpty] + public int? PublicPort { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Enable Direct Server Return")] + public bool? DirectServerReturn { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "ACL Config for the endpoint.")] + public NetworkAclObject ACL { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = AddAzureEndpoint.LBNoProbeParameterSet, HelpMessage = "Load Balanced Endpoint Set Name")] + [Parameter(Mandatory = true, ParameterSetName = AddAzureEndpoint.LBDefaultProbeParameterSet, HelpMessage = "Load Balanced Endpoint Set Name")] + [Parameter(Mandatory = true, ParameterSetName = AddAzureEndpoint.LBCustomProbeParameterSet, HelpMessage = "Load Balanced Endpoint Set Name")] + [Alias("LoadBalancedEndpointSetName")] + [ValidateNotNullOrEmpty] + public string LBSetName { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = AddAzureEndpoint.LBNoProbeParameterSet, HelpMessage = "Specifies that no load balancer probe is to be used.")] + public SwitchParameter NoProbe { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = AddAzureEndpoint.LBDefaultProbeParameterSet, HelpMessage = "Specifies that the default load balancer probe is to be used.")] + public SwitchParameter DefaultProbe { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = AddAzureEndpoint.LBCustomProbeParameterSet, HelpMessage = "Probe Port")] + public int ProbePort { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = AddAzureEndpoint.LBCustomProbeParameterSet, HelpMessage = "Probe Protocol (http/tcp)")] + [ValidateSet("tcp", "http", IgnoreCase = true)] + public string ProbeProtocol { get; set; } + + [Parameter(Mandatory = false, ParameterSetName = AddAzureEndpoint.LBCustomProbeParameterSet, HelpMessage = "Probe Relative Path")] + [ValidateNotNullOrEmpty] + public string ProbePath { get; set; } + + [Parameter(Mandatory = false, ParameterSetName = AddAzureEndpoint.LBCustomProbeParameterSet, HelpMessage = "Probe Interval in Seconds.")] + [ValidateNotNull] + public int? ProbeIntervalInSeconds { get; set; } + + [Parameter(Mandatory = false, ParameterSetName = AddAzureEndpoint.LBCustomProbeParameterSet, HelpMessage = "Probe Timeout in Seconds.")] + [ValidateNotNull] + public int? ProbeTimeoutInSeconds { get; set; } + + [Parameter(HelpMessage = "Internal Load Balancer Name.")] + [ValidateNotNullOrEmpty] + public string InternalLoadBalancerName { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Idle Timeout.")] + [ValidateNotNullOrEmpty] + public int? IdleTimeoutInMinutes { get; set; } + + [Parameter(HelpMessage = "LoadBalancerDistribution.")] + [ValidateSet("sourceIP", "sourceIPProtocol", "none", IgnoreCase = true)] + [ValidateNotNullOrEmpty] + public string LoadBalancerDistribution { get; set; } + + internal void ExecuteCommand() + { + this.ValidateParameters(); + + var endpoints = GetInputEndpoints(); + var endpoint = endpoints.SingleOrDefault(p => p.Name.Equals(this.Name, StringComparison.InvariantCultureIgnoreCase)); + + if (endpoint != null) + { + ThrowTerminatingError( + new ErrorRecord( + new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, Resources.EndpointAlreadyDefinedForVM, this.Name)), + string.Empty, + ErrorCategory.InvalidData, + null)); + } + + endpoint = new InputEndpoint + { + Name = this.Name, + Port = this.ParameterSpecified("PublicPort") ? this.PublicPort : null, + LocalPort = this.LocalPort, + Protocol = this.Protocol, + EndpointAccessControlList = this.ACL, + EnableDirectServerReturn = this.DirectServerReturn, + LoadBalancerName = this.InternalLoadBalancerName, + IdleTimeoutInMinutes = this.ParameterSpecified("IdleTimeoutInMinutes") ? this.IdleTimeoutInMinutes : null, + LoadBalancerDistribution = this.ParameterSpecified("LoadBalancerDistribution") ? this.LoadBalancerDistribution : null, + }; + + if (this.ParameterSetName == AddAzureEndpoint.LBNoProbeParameterSet + || this.ParameterSetName == AddAzureEndpoint.LBDefaultProbeParameterSet + || this.ParameterSetName == AddAzureEndpoint.LBCustomProbeParameterSet) + { + endpoint.LoadBalancedEndpointSetName = this.LBSetName; + + if (this.ParameterSetName == AddAzureEndpoint.LBDefaultProbeParameterSet) + { + endpoint.LoadBalancerProbe = new LoadBalancerProbe() + { + Protocol = "TCP", + Port = endpoint.LocalPort + }; + } + else if (this.ParameterSetName == AddAzureEndpoint.LBCustomProbeParameterSet) + { + endpoint.LoadBalancerProbe = new LoadBalancerProbe + { + Protocol = this.ProbeProtocol, + Port = this.ProbePort + }; + + if (endpoint.LoadBalancerProbe.Protocol.Equals("http", StringComparison.OrdinalIgnoreCase)) + { + endpoint.LoadBalancerProbe.Path = this.ParameterSpecified("ProbePath") ? this.ProbePath : "/"; + } + + if (this.ParameterSpecified("ProbeIntervalInSeconds")) + { + endpoint.LoadBalancerProbe.IntervalInSeconds = this.ProbeIntervalInSeconds; + } + + if (this.ParameterSpecified("ProbeTimeoutInSeconds")) + { + endpoint.LoadBalancerProbe.TimeoutInSeconds = this.ProbeTimeoutInSeconds; + } + } + } + + endpoints.Add(endpoint); + + this.WriteObject(VM, true); + } + + protected override void ProcessRecord() + { + try + { + base.ProcessRecord(); + this.ExecuteCommand(); + } + catch (Exception ex) + { + this.WriteError(new ErrorRecord(ex, string.Empty, ErrorCategory.CloseError, null)); + } + } + + protected Collection GetInputEndpoints() + { + var role = this.VM.GetInstance(); + + var networkConfiguration = role.ConfigurationSets + .OfType() + .SingleOrDefault(); + + if (networkConfiguration == null) + { + networkConfiguration = new NetworkConfigurationSet(); + role.ConfigurationSets.Add(networkConfiguration); + } + + if (networkConfiguration.InputEndpoints == null) + { + networkConfiguration.InputEndpoints = new Collection(); + } + + return networkConfiguration.InputEndpoints; + } + + private void ValidateParameters() + { + if (this.ParameterSetName == AddAzureEndpoint.LBCustomProbeParameterSet) + { + if (this.ProbeProtocol.Equals("tcp", StringComparison.OrdinalIgnoreCase)) + { + if (this.ParameterSpecified("ProbePath")) + { + throw new ArgumentException(Resources.ProbePathIsNotValidWithTcp); + } + } + + if (this.ProbeProtocol.Equals("http", StringComparison.OrdinalIgnoreCase)) + { + if (!this.ParameterSpecified("ProbePath")) + { + throw new ArgumentException(Resources.ProbePathIsRequiredForHttp); + } + } + } + + if (this.LocalPort < 1 || this.LocalPort > 65535) + { + throw new ArgumentException(Resources.PortSpecifiedIsNotInRange); + } + + if (this.ParameterSpecified("PublicPort") + && (this.PublicPort < 1 || this.PublicPort > 65535)) + { + throw new ArgumentException(Resources.PortSpecifiedIsNotInRange); + } + + if (this.ParameterSetName == AddAzureEndpoint.LBCustomProbeParameterSet) + { + if (ProbePort < 1 || ProbePort > 65535) + { + throw new ArgumentException(Resources.PortSpecifiedIsNotInRange); + } + } + } + + private bool ParameterSpecified(string parameterName) + { + // Check for parameters by name so we can tell the difference between + // the user not specifying them, and the user specifying null/empty. + return this.MyInvocation.BoundParameters.ContainsKey(parameterName); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Endpoints/GetAzureAclConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Endpoints/GetAzureAclConfig.cs new file mode 100644 index 000000000000..b1fea7429d3b --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Endpoints/GetAzureAclConfig.cs @@ -0,0 +1,89 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Endpoints +{ + [Cmdlet(VerbsCommon.Get, "AzureAclConfig"), OutputType(typeof(NetworkAclObject))] + public class GetAzureAclConfig : VirtualMachineConfigurationCmdletBase + { + [Parameter(Position = 0, Mandatory = false, HelpMessage = "Endpoint name")] + public string EndpointName { get; set; } + + internal void ExecuteCommand() + { + var role = this.VM.GetInstance(); + + var networkConfiguration = role.ConfigurationSets.OfType().SingleOrDefault(); + + if (networkConfiguration != null + && networkConfiguration.InputEndpoints != null) + { + if (string.IsNullOrEmpty(this.EndpointName)) + { + var ret = new List(); + foreach (var endpoint in networkConfiguration.InputEndpoints) + { + ret.Add(endpoint.EndpointAccessControlList); + } + + this.WriteObject(ret, true); + } + else + { + var endpoint = (from e in networkConfiguration.InputEndpoints + where e.Name.Equals(this.EndpointName, StringComparison.InvariantCultureIgnoreCase) + select e).SingleOrDefault(); + + if (endpoint == null) + { + this.ThrowTerminatingError( + new ErrorRecord( + new InvalidOperationException( + string.Format( + CultureInfo.InvariantCulture, + Resources.EndpointCanNotBeFoundInVMConfiguration, + this.EndpointName)), + string.Empty, + ErrorCategory.InvalidData, + null)); + } + + NetworkAclObject acl = endpoint.EndpointAccessControlList ?? new NetworkAclObject(); + this.WriteObject(acl); + } + } + } + + protected override void ProcessRecord() + { + try + { + base.ProcessRecord(); + ExecuteCommand(); + } + catch (Exception ex) + { + WriteError(new ErrorRecord(ex, string.Empty, ErrorCategory.CloseError, null)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Endpoints/GetAzureEndpoint.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Endpoints/GetAzureEndpoint.cs new file mode 100644 index 000000000000..8a9d3d9ed808 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Endpoints/GetAzureEndpoint.cs @@ -0,0 +1,98 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.ObjectModel; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Endpoints +{ + [Cmdlet(VerbsCommon.Get, "AzureEndpoint"), OutputType(typeof(InputEndpointContext))] + public class GetAzureEndpoint : VirtualMachineConfigurationCmdletBase + { + [Parameter(Position = 0, Mandatory = false, HelpMessage = "Endpoint name")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + protected override void ProcessRecord() + { + var endpoints = GetInputEndpoints(); + + if (string.IsNullOrEmpty(Name)) + { + WriteObject(endpoints, true); + } + else + { + var endpoint = endpoints.SingleOrDefault(ep => System.String.Compare(ep.Name, Name, System.StringComparison.OrdinalIgnoreCase) == 0); + WriteObject(endpoint, true); + } + } + + protected Collection GetInputEndpoints() + { + var role = VM.GetInstance(); + + var networkConfiguration = role.ConfigurationSets + .OfType() + .SingleOrDefault(); + + if (networkConfiguration == null) + { + networkConfiguration = new NetworkConfigurationSet(); + role.ConfigurationSets.Add(networkConfiguration); + } + + if (networkConfiguration.InputEndpoints == null) + { + networkConfiguration.InputEndpoints = new Collection(); + } + + var inputEndpoints = networkConfiguration.InputEndpoints; + + Collection endpoints = new Collection(); + foreach (InputEndpoint ep in inputEndpoints) + { + InputEndpointContext endpointCtx = new InputEndpointContext + { + LBSetName = ep.LoadBalancedEndpointSetName, + LocalPort = ep.LocalPort, + Name = ep.Name, + Port = ep.Port, + Protocol = ep.Protocol, + Vip = ep.Vip, + Acl = ep.EndpointAccessControlList, + EnableDirectServerReturn = ep.EnableDirectServerReturn, + InternalLoadBalancerName = ep.LoadBalancerName, + IdleTimeoutInMinutes = ep.IdleTimeoutInMinutes, + LoadBalancerDistribution = ep.LoadBalancerDistribution + }; + + if (ep.LoadBalancerProbe != null && string.IsNullOrEmpty(endpointCtx.LBSetName) == false) + { + endpointCtx.ProbePath = ep.LoadBalancerProbe.Path; + endpointCtx.ProbePort = ep.LoadBalancerProbe.Port; + endpointCtx.ProbeProtocol = ep.LoadBalancerProbe.Protocol; + endpointCtx.ProbeIntervalInSeconds = ep.LoadBalancerProbe.IntervalInSeconds; + endpointCtx.ProbeTimeoutInSeconds = ep.LoadBalancerProbe.TimeoutInSeconds; + } + + endpoints.Add(endpointCtx); + } + + return endpoints; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Endpoints/NewAzureAclConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Endpoints/NewAzureAclConfig.cs new file mode 100644 index 000000000000..a332cf8e69ec --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Endpoints/NewAzureAclConfig.cs @@ -0,0 +1,42 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Endpoints +{ + [Cmdlet(VerbsCommon.New, "AzureAclConfig"), OutputType(typeof(NetworkAclObject))] + public class NewAzureAclConfig : PSCmdlet + { + internal void ExecuteCommand() + { + this.WriteObject(new NetworkAclObject()); + } + + protected override void ProcessRecord() + { + try + { + base.ProcessRecord(); + this.ExecuteCommand(); + } + catch (Exception ex) + { + this.WriteError(new ErrorRecord(ex, string.Empty, ErrorCategory.CloseError, null)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Endpoints/RemoveAzureAclConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Endpoints/RemoveAzureAclConfig.cs new file mode 100644 index 000000000000..2fedf5da68e4 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Endpoints/RemoveAzureAclConfig.cs @@ -0,0 +1,76 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Endpoints +{ + [Cmdlet(VerbsCommon.Remove, "AzureAclConfig"), OutputType(typeof(IPersistentVM))] + public class RemoveAzureAclConfig : VirtualMachineConfigurationCmdletBase + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Endpoint name")] + public string EndpointName { get; set; } + + internal void ExecuteCommand() + { + var role = this.VM.GetInstance(); + + var networkConfiguration = role.ConfigurationSets.OfType().SingleOrDefault(); + + if (networkConfiguration != null + && networkConfiguration.InputEndpoints != null) + { + var endpoint = (from e in networkConfiguration.InputEndpoints + where e.Name.Equals(this.EndpointName, StringComparison.InvariantCultureIgnoreCase) + select e).SingleOrDefault(); + + if (endpoint == null) + { + this.ThrowTerminatingError( + new ErrorRecord( + new InvalidOperationException( + string.Format( + CultureInfo.InvariantCulture, + Resources.EndpointCanNotBeFoundInVMConfiguration, + this.EndpointName)), + string.Empty, + ErrorCategory.InvalidData, + null)); + } + + endpoint.EndpointAccessControlList = null; + } + + this.WriteObject(this.VM); + } + + protected override void ProcessRecord() + { + try + { + base.ProcessRecord(); + this.ExecuteCommand(); + } + catch (Exception ex) + { + this.WriteError(new ErrorRecord(ex, string.Empty, ErrorCategory.CloseError, null)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Endpoints/RemoveAzureEndpoint.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Endpoints/RemoveAzureEndpoint.cs new file mode 100644 index 000000000000..99cb71cfb905 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Endpoints/RemoveAzureEndpoint.cs @@ -0,0 +1,93 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Collections.ObjectModel; +using System.Globalization; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Endpoints +{ + [Cmdlet(VerbsCommon.Remove, "AzureEndpoint"), OutputType(typeof(IPersistentVM))] + public class RemoveAzureInputEndpointCommand : VirtualMachineConfigurationCmdletBase + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Endpoint Name")] + [ValidateNotNullOrEmpty] + public string Name + { + get; + set; + } + + internal void ExecuteCommand() + { + var endpoints = GetInputEndpoints(); + var endpoint = endpoints.SingleOrDefault(ep => String.Compare(ep.Name, Name, StringComparison.OrdinalIgnoreCase) == 0); + if (endpoint == null) + { + ThrowTerminatingError( + new ErrorRecord( + new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, Resources.EndpointCanNotBeFoundInVMConfiguration, Name)), + string.Empty, + ErrorCategory.InvalidData, + null)); + } + + endpoints.Remove(endpoint); + + WriteObject(VM, true); + } + + protected override void ProcessRecord() + { + try + { + base.ProcessRecord(); + ExecuteCommand(); + } + catch (Exception ex) + { + WriteError(new ErrorRecord(ex, string.Empty, ErrorCategory.CloseError, null)); + } + } + + protected Collection GetInputEndpoints() + { + var role = VM.GetInstance(); + + var networkConfiguration = role.ConfigurationSets + .OfType() + .SingleOrDefault(); + + if (networkConfiguration == null) + { + networkConfiguration = new NetworkConfigurationSet(); + role.ConfigurationSets.Add(networkConfiguration); + } + + if (networkConfiguration.InputEndpoints == null) + { + networkConfiguration.InputEndpoints = new Collection(); + } + + var inputEndpoints = networkConfiguration.InputEndpoints; + + return inputEndpoints; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Endpoints/SetAzureAclConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Endpoints/SetAzureAclConfig.cs new file mode 100644 index 000000000000..1fe082d7f163 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Endpoints/SetAzureAclConfig.cs @@ -0,0 +1,137 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Endpoints +{ + [Cmdlet(VerbsCommon.Set, "AzureAclConfig"), OutputType(typeof(NetworkAclObject))] + public class SetAzureAclConfig : PSCmdlet + { + public const string AddRuleParameterSet = "AddRule"; + public const string RemoveRuleParameterSet = "RemoveRule"; + public const string SetRuleParameterSet = "SetRule"; + + [Parameter(Mandatory = true, ParameterSetName = SetAzureAclConfig.AddRuleParameterSet, HelpMessage = "Indicates that a rule should be added.")] + public SwitchParameter AddRule { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = SetAzureAclConfig.RemoveRuleParameterSet, HelpMessage = "Indicates that a rule should be removed.")] + public SwitchParameter RemoveRule { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = SetAzureAclConfig.SetRuleParameterSet, HelpMessage = "Indicates that a rule should be set.")] + public SwitchParameter SetRule { get; set; } + + [Parameter(Position = 0, Mandatory = true, ParameterSetName = SetAzureAclConfig.SetRuleParameterSet, HelpMessage = "Rule ID to modify.")] + [Parameter(Position = 0, Mandatory = true, ParameterSetName = SetAzureAclConfig.RemoveRuleParameterSet, HelpMessage = "Rule ID to modify.")] + public int RuleId { get; set; } + + [Parameter(Position = 0, Mandatory = true, ParameterSetName = SetAzureAclConfig.AddRuleParameterSet, HelpMessage = "Allow or Deny rule.")] + [Parameter(Mandatory = false, ParameterSetName = SetAzureAclConfig.SetRuleParameterSet, HelpMessage = "Permit or Deny rule.")] + [ValidateSet("Permit", "Deny", IgnoreCase=true)] + public string Action { get; set; } + + [Parameter(Position = 1, Mandatory = true, ParameterSetName = SetAzureAclConfig.AddRuleParameterSet, HelpMessage = "Rule remote subnet.")] + [Parameter(Mandatory = false, ParameterSetName = SetAzureAclConfig.SetRuleParameterSet, HelpMessage = "Rule remote subnet.")] + public string RemoteSubnet { get; set; } + + [Parameter(Position = 2, Mandatory = false, ParameterSetName = SetAzureAclConfig.AddRuleParameterSet, HelpMessage = "Order of processing for rule.")] + [Parameter(Mandatory = false, ParameterSetName = SetAzureAclConfig.SetRuleParameterSet, HelpMessage = "Order of processing for rule.")] + public int Order { get; set; } + + [Parameter(Position = 3, Mandatory = false, ParameterSetName = SetAzureAclConfig.AddRuleParameterSet, HelpMessage = "Rule description.")] + [Parameter(Mandatory = false, ParameterSetName = SetAzureAclConfig.SetRuleParameterSet, HelpMessage = "Rule description.")] + public string Description { get; set; } + + [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = "ACL config.")] + [ValidateNotNull] + public NetworkAclObject ACL { get; set; } + + internal void ExecuteCommand() + { + switch(this.ParameterSetName) + { + case SetAzureAclConfig.AddRuleParameterSet: + this.ACL.AddRule( + new NetworkAclRule() { + Order = this.Order, + Action = this.Action, + RemoteSubnet = this.RemoteSubnet, + Description = this.Description + }); + + break; + case SetAzureAclConfig.SetRuleParameterSet: + var rule = this.ACL.GetRule(this.RuleId); + if (rule != null) + { + if (this.ParameterSpecified("Order")) + { + rule.Order = this.Order; + } + + if (this.ParameterSpecified("Action")) + { + rule.Action = this.Action; + } + + if (this.ParameterSpecified("RemoteSubnet")) + { + rule.RemoteSubnet = this.RemoteSubnet; + } + + if (this.ParameterSpecified("Description")) + { + rule.Description = this.Description; + } + } + else + { + throw new ArgumentException(string.Format("A rule with id '{0}' does not exist.", this.RuleId)); + } + + break; + case SetAzureAclConfig.RemoveRuleParameterSet: + if (!this.ACL.RemoveRule(this.RuleId)) + { + throw new ArgumentException(string.Format("A rule with id '{0}' does not exist.", this.RuleId)); + } + break; + } + + this.WriteObject(this.ACL); + } + + protected override void ProcessRecord() + { + try + { + base.ProcessRecord(); + this.ExecuteCommand(); + } + catch (Exception ex) + { + this.WriteError(new ErrorRecord(ex, string.Empty, ErrorCategory.CloseError, null)); + } + } + + private bool ParameterSpecified(string parameterName) + { + // Check for parameters by name so we can tell the difference between + // the user not specifying them, and the user specifying null/empty. + return this.MyInvocation.BoundParameters.ContainsKey(parameterName); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Endpoints/SetAzureEndpoint.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Endpoints/SetAzureEndpoint.cs new file mode 100644 index 000000000000..5ad921c17c2c --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Endpoints/SetAzureEndpoint.cs @@ -0,0 +1,216 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.ObjectModel; +using System.Globalization; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Endpoints +{ + [Cmdlet(VerbsCommon.Set, "AzureEndpoint"), OutputType(typeof(IPersistentVM))] + public class SetAzureEndpoint : VirtualMachineConfigurationCmdletBase + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Endpoint name.")] + [ValidateNotNullOrEmpty] + public string Name + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = false, HelpMessage = "Endpoint protocol.")] + [ValidateSet("tcp", "udp", IgnoreCase = true)] + [ValidateNotNullOrEmpty] + public string Protocol + { + get; + set; + } + + [Parameter(Position = 2, Mandatory = false, HelpMessage = "Local port.")] + [ValidateNotNullOrEmpty] + public int LocalPort + { + get; + set; + } + + [Parameter(Mandatory = false, HelpMessage = "Public port.")] + [ValidateNotNullOrEmpty] + public int? PublicPort + { + get; + set; + } + + + [Parameter(Mandatory = false, HelpMessage = "Enable Direct Server Return")] + [ValidateNotNull] + public bool? DirectServerReturn + { + get; + set; + } + + [Parameter(Mandatory = false, HelpMessage = "ACL Config for the endpoint.")] + [ValidateNotNull] + public NetworkAclObject ACL + { + get; + set; + } + + [Parameter(HelpMessage = "Internal Load Balancer Name.")] + [ValidateNotNullOrEmpty] + public string InternalLoadBalancerName + { + get; + set; + } + + [Parameter(Mandatory = false, HelpMessage = "Idle Timeout.")] + public int IdleTimeoutInMinutes + { + get; + set; + } + + [Parameter(HelpMessage = "LoadBalancerDistribution.")] + [ValidateSet("sourceIP", "sourceIPProtocol", "none", IgnoreCase = true)] + [ValidateNotNullOrEmpty] + public string LoadBalancerDistribution + { + get; + set; + } + + internal void ExecuteCommand() + { + ValidateParameters(); + + var endpoints = GetInputEndpoints(); + var endpoint = endpoints.SingleOrDefault(p => p.Name.Equals(Name, StringComparison.InvariantCultureIgnoreCase)); + + if (endpoint == null) + { + ThrowTerminatingError( + new ErrorRecord( + new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, Resources.EndpointCanNotBeFoundInVMConfigurationInSetAzureEndpoint, this.Name)), + string.Empty, + ErrorCategory.InvalidData, + null)); + } + + if (this.ParameterSpecified("Protocol")) + { + endpoint.Protocol = this.Protocol; + } + + if (this.ParameterSpecified("LocalPort")) + { + endpoint.LocalPort = this.LocalPort; + } + + if (this.ParameterSpecified("PublicPort")) + { + endpoint.Port = this.PublicPort; + } + + if (this.ParameterSpecified("DirectServerReturn")) + { + endpoint.EnableDirectServerReturn = this.DirectServerReturn; + } + + if (this.ParameterSpecified("ACL")) + { + endpoint.EndpointAccessControlList = this.ACL; + } + + if (!string.IsNullOrEmpty(this.InternalLoadBalancerName)) + { + endpoint.LoadBalancerName = this.InternalLoadBalancerName; + } + + if (this.ParameterSpecified("IdleTimeoutInMinutes")) + { + endpoint.IdleTimeoutInMinutes = this.IdleTimeoutInMinutes; + } + + if (this.ParameterSpecified("LoadBalancerDistribution")) + { + endpoint.LoadBalancerDistribution = this.LoadBalancerDistribution; + } + + WriteObject(VM, true); + } + + protected override void ProcessRecord() + { + try + { + base.ProcessRecord(); + ExecuteCommand(); + } + catch (Exception ex) + { + WriteError(new ErrorRecord(ex, string.Empty, ErrorCategory.CloseError, null)); + } + } + + protected Collection GetInputEndpoints() + { + var role = VM.GetInstance(); + + var networkConfiguration = role.ConfigurationSets + .OfType() + .SingleOrDefault(); + + if (networkConfiguration == null) + { + networkConfiguration = new NetworkConfigurationSet(); + role.ConfigurationSets.Add(networkConfiguration); + } + + if (networkConfiguration.InputEndpoints == null) + { + networkConfiguration.InputEndpoints = new Collection(); + } + + var inputEndpoints = networkConfiguration.InputEndpoints; + return inputEndpoints; + } + + private void ValidateParameters() + { + if (LocalPort < 0 || LocalPort > 65535) + { + throw new ArgumentException(Resources.PortsNotInRangeInSetAzureEndpoint); + } + + if (PublicPort != null && (PublicPort < 0 || PublicPort > 65535)) + { + throw new ArgumentException(Resources.PortsNotInRangeInSetAzureEndpoint); + } + } + + private bool ParameterSpecified(string parameterName) + { + return this.MyInvocation.BoundParameters.ContainsKey(parameterName); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Endpoints/SetAzureLoadBalancedEndpoint.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Endpoints/SetAzureLoadBalancedEndpoint.cs new file mode 100644 index 000000000000..5a91e86b088e --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Endpoints/SetAzureLoadBalancedEndpoint.cs @@ -0,0 +1,266 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Linq; +using System.Management.Automation; +using AutoMapper; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Endpoints +{ + using NSM = Management.Compute.Models; + using PVM = Model; + + [Cmdlet(VerbsCommon.Set, "AzureLoadBalancedEndpoint", DefaultParameterSetName = SetAzureLoadBalancedEndpoint.DefaultProbeParameterSet), OutputType(typeof(ManagementOperationContext))] + public class SetAzureLoadBalancedEndpoint : IaaSDeploymentManagementCmdletBase + { + public const string DefaultProbeParameterSet = "DefaultProbe"; + public const string TCPProbeParameterSet = "TCPProbe"; + public const string HTTPProbeParameterSet = "HTTPProbe"; + + [Parameter(Mandatory = true, HelpMessage = "Load balancer set name.")] + [ValidateNotNullOrEmpty] + public string LBSetName { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Endpoint protocol.")] + [ValidateSet("TCP", "UDP", IgnoreCase = true)] + public string Protocol { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Private port.")] + public int LocalPort { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Public port.")] + public int PublicPort { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Enable Direct Server Return")] + public bool DirectServerReturn { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "ACLs to specify with the endpoint.")] + [ValidateNotNull] + public PVM.NetworkAclObject ACL { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = SetAzureLoadBalancedEndpoint.TCPProbeParameterSet, HelpMessage = "Should a TCP probe should be used.")] + public SwitchParameter ProbeProtocolTCP { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = SetAzureLoadBalancedEndpoint.HTTPProbeParameterSet, HelpMessage = "Should a HTTP probe should be used.")] + public SwitchParameter ProbeProtocolHTTP { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = SetAzureLoadBalancedEndpoint.HTTPProbeParameterSet, HelpMessage = "Relative path to the HTTP probe.")] + [ValidateNotNullOrEmpty] + public string ProbePath { get; set; } + + [Parameter(Mandatory = false, ParameterSetName = SetAzureLoadBalancedEndpoint.TCPProbeParameterSet, HelpMessage = "Probe port.")] + [Parameter(Mandatory = false, ParameterSetName = SetAzureLoadBalancedEndpoint.HTTPProbeParameterSet, HelpMessage = "Probe port.")] + public int ProbePort { get; set; } + + [Parameter(Mandatory = false, ParameterSetName = SetAzureLoadBalancedEndpoint.TCPProbeParameterSet, HelpMessage = "Probe interval in seconds.")] + [Parameter(Mandatory = false, ParameterSetName = SetAzureLoadBalancedEndpoint.HTTPProbeParameterSet, HelpMessage = "Probe interval in seconds.")] + public int ProbeIntervalInSeconds { get; set; } + + [Parameter(Mandatory = false, ParameterSetName = SetAzureLoadBalancedEndpoint.TCPProbeParameterSet, HelpMessage = "Probe timeout in seconds.")] + [Parameter(Mandatory = false, ParameterSetName = SetAzureLoadBalancedEndpoint.HTTPProbeParameterSet, HelpMessage = "Probe timeout in seconds.")] + public int ProbeTimeoutInSeconds { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Internal Load Balancer Name.")] + public string InternalLoadBalancerName { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Idle Timeout.")] + [ValidateNotNullOrEmpty] + public int IdleTimeoutInMinutes { get; set; } + + [Parameter(HelpMessage = "LoadBalancerDistribution.")] + [ValidateSet("sourceIP", "sourceIPProtocol", "none", IgnoreCase = true)] + [ValidateNotNullOrEmpty] + public string LoadBalancerDistribution { get; set; } + + protected override void ExecuteCommand() + { + ServiceManagementProfile.Initialize(); + + base.ExecuteCommand(); + if (string.IsNullOrEmpty(this.ServiceName) || this.CurrentDeploymentNewSM == null) + { + return; + } + + var endpoint = this.GetEndpoint(); + if(endpoint == null) + { + this.ThrowTerminatingError( + new ErrorRecord( + new InvalidOperationException( + string.Format( + CultureInfo.InvariantCulture, + Resources.EndpointsCannotBeFoundWithGivenLBSetName, + this.LBSetName)), + string.Empty, + ErrorCategory.InvalidData, + null)); + } + + this.UpdateEndpointProperties(endpoint); + + var endpointList = new PVM.LoadBalancedEndpointList(); + endpointList.Add(endpoint); + + var endPointParams = new NSM.VirtualMachineUpdateLoadBalancedSetParameters + { + //TODO: AutoMapper doesn't seem to work for this conversion. + //LoadBalancedEndpoints = Mapper.Map>(endpointList) + LoadBalancedEndpoints = new int[1].Select(e => new NSM.VirtualMachineUpdateLoadBalancedSetParameters.InputEndpoint + { + EnableDirectServerReturn = endpoint.EnableDirectServerReturn, + LoadBalancedEndpointSetName = endpoint.LoadBalancedEndpointSetName, + LoadBalancerProbe = endpoint.LoadBalancerProbe == null ? null : new NSM.LoadBalancerProbe + { + IntervalInSeconds = endpoint.LoadBalancerProbe.IntervalInSeconds, + Path = endpoint.LoadBalancerProbe.Path, + Port = endpoint.LoadBalancerProbe.Port, + Protocol = (NSM.LoadBalancerProbeTransportProtocol)Enum.Parse(typeof(NSM.LoadBalancerProbeTransportProtocol), endpoint.LoadBalancerProbe.Protocol, true), + TimeoutInSeconds = endpoint.LoadBalancerProbe.TimeoutInSeconds + }, + LocalPort = endpoint.LocalPort, + Name = endpoint.Name, + Port = endpoint.Port, + Protocol = endpoint.Protocol, + Rules = endpoint.EndpointAccessControlList == null ? null : endpoint.EndpointAccessControlList.Rules == null ? null : endpoint.EndpointAccessControlList.Rules.Select(r => new NSM.AccessControlListRule + { + Action = r.Action, + Description = r.Description, + Order = r.Order, + RemoteSubnet = r.RemoteSubnet + }).ToList(), + VirtualIPAddress = endpoint.Vip, + LoadBalancerName = this.InternalLoadBalancerName, + IdleTimeoutInMinutes = endpoint.IdleTimeoutInMinutes, + LoadBalancerDistribution = endpoint.LoadBalancerDistribution, + }).ToList() + }; + + this.ExecuteClientActionNewSM( + null, + this.CommandRuntime.ToString(), + () => this.ComputeClient.VirtualMachines.UpdateLoadBalancedEndpointSet(this.ServiceName, this.CurrentDeploymentNewSM.Name, endPointParams)); + } + + private PVM.InputEndpoint GetEndpoint() + { + var r = from role in this.CurrentDeploymentNewSM.Roles + // TODO: NetworkConfigurationSet's string value should be 'NetworkConfiguration' instead of 'NetworkConfigurationSet' + // https://github.com/WindowsAzure/azure-sdk-for-net-pr/issues/293 + //from networkConfig in role.ConfigurationSets.Where(c => c.ConfigurationSetType == ConfigurationSetTypes.NetworkConfigurationSet) + from networkConfig in role.ConfigurationSets.Where(c => c.ConfigurationSetType == "NetworkConfiguration") + where networkConfig.InputEndpoints != null + from endpoint in networkConfig.InputEndpoints + where !string.IsNullOrEmpty(endpoint.LoadBalancedEndpointSetName) + && endpoint.LoadBalancedEndpointSetName.Equals(this.LBSetName, StringComparison.InvariantCultureIgnoreCase) + select endpoint; + + return Mapper.Map(r.FirstOrDefault()); + } + + private void UpdateEndpointProperties(PVM.InputEndpoint endpoint) + { + if (this.ParameterSpecified("Protocol")) + { + endpoint.Protocol = this.Protocol; + } + + if (this.ParameterSpecified("LocalPort")) + { + if (!this.ParameterSpecified("ProbePort") + && endpoint.LoadBalancerProbe != null + && endpoint.LocalPort == endpoint.LoadBalancerProbe.Port) + { + endpoint.LoadBalancerProbe.Port = this.LocalPort; + } + + endpoint.LocalPort = this.LocalPort; + } + + if (this.ParameterSpecified("PublicPort")) + { + endpoint.Port = this.PublicPort; + } + + if (this.ParameterSpecified("IdleTimeoutInMinutes")) + { + endpoint.IdleTimeoutInMinutes = this.IdleTimeoutInMinutes; + } + + if (this.ParameterSpecified("LoadBalancerDistribution")) + { + endpoint.LoadBalancerDistribution = this.LoadBalancerDistribution; + } + + if (this.ParameterSpecified("DirectServerReturn")) + { + endpoint.EnableDirectServerReturn = this.DirectServerReturn; + } + + if (this.ParameterSpecified("ACL")) + { + endpoint.EndpointAccessControlList = this.ACL; + } + + if (this.ParameterSetName == SetAzureLoadBalancedEndpoint.HTTPProbeParameterSet + || this.ParameterSetName == SetAzureLoadBalancedEndpoint.TCPProbeParameterSet) + { + if (endpoint.LoadBalancerProbe == null) + { + endpoint.LoadBalancerProbe = new PVM.LoadBalancerProbe(); + if (!this.ParameterSpecified("ProbePort")) + { + endpoint.LoadBalancerProbe.Port = endpoint.LocalPort; + } + } + + if (this.ParameterSpecified("ProbePort")) + { + endpoint.LoadBalancerProbe.Port = this.ProbePort; + } + + if (this.ParameterSpecified("ProbeIntervalInSeconds")) + { + endpoint.LoadBalancerProbe.IntervalInSeconds = this.ProbeIntervalInSeconds; + } + + if (this.ParameterSpecified("ProbeTimeoutInSeconds")) + { + endpoint.LoadBalancerProbe.TimeoutInSeconds = this.ProbeTimeoutInSeconds; + } + + if (this.ParameterSetName == SetAzureLoadBalancedEndpoint.HTTPProbeParameterSet) + { + endpoint.LoadBalancerProbe.Protocol = "http"; + endpoint.LoadBalancerProbe.Path = this.ProbePath; + } + + if (this.ParameterSetName == SetAzureLoadBalancedEndpoint.TCPProbeParameterSet) + { + endpoint.LoadBalancerProbe.Protocol = "tcp"; + endpoint.LoadBalancerProbe.Path = null; + } + } + } + + private bool ParameterSpecified(string parameterName) + { + return this.MyInvocation.BoundParameters.ContainsKey(parameterName); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/BGInfo/GetAzureVMBGInfoExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/BGInfo/GetAzureVMBGInfoExtension.cs new file mode 100644 index 000000000000..321e49491993 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/BGInfo/GetAzureVMBGInfoExtension.cs @@ -0,0 +1,52 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + [Cmdlet( + VerbsCommon.Get, + VirtualMachineBGInfoExtensionNoun, + DefaultParameterSetName = GetBGInfoExtensionParamSetName), + OutputType( + typeof(VirtualMachineBGInfoExtensionContext))] + public class GetAzureVMBGInfoExtensionCommand : VirtualMachineBGInfoExtensionCmdletBase + { + protected const string GetBGInfoExtensionParamSetName = "GetBGInfoExtension"; + + internal void ExecuteCommand() + { + var extensionRefs = GetPredicateExtensionList(); + WriteObject( + extensionRefs == null ? null : extensionRefs.Select( + r => new VirtualMachineBGInfoExtensionContext + { + ExtensionName = r.Name, + Publisher = r.Publisher, + ReferenceName = r.ReferenceName, + Version = r.Version, + State = r.State, + RoleName = VM.GetInstance().RoleName + }), true); + } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/BGInfo/RemoveAzureVMBGInfoExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/BGInfo/RemoveAzureVMBGInfoExtension.cs new file mode 100644 index 000000000000..f85694d8aa8b --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/BGInfo/RemoveAzureVMBGInfoExtension.cs @@ -0,0 +1,42 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + [Cmdlet( + VerbsCommon.Remove, + VirtualMachineBGInfoExtensionNoun, + DefaultParameterSetName = RemoveBGInfoExtensionParamSetName), + OutputType( + typeof(IPersistentVM))] + public class RemoveAzureVMBGInfoExtensionCommand : VirtualMachineBGInfoExtensionCmdletBase + { + protected const string RemoveBGInfoExtensionParamSetName = "RemoveBGInfoExtension"; + + internal void ExecuteCommand() + { + RemovePredicateExtensions(); + WriteObject(VM); + } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/BGInfo/SetAzureVMBGInfoExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/BGInfo/SetAzureVMBGInfoExtension.cs new file mode 100644 index 000000000000..b5cef01d6ea0 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/BGInfo/SetAzureVMBGInfoExtension.cs @@ -0,0 +1,79 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + [Cmdlet( + VerbsCommon.Set, + VirtualMachineBGInfoExtensionNoun, + DefaultParameterSetName = SetBGInfoExtensionParamSetName), + OutputType( + typeof(IPersistentVM))] + public class SetAzureVMBGInfoExtensionCommand : VirtualMachineBGInfoExtensionCmdletBase + { + protected const string SetBGInfoExtensionParamSetName = "SetBGInfoExtension"; + protected const string UninstallBGInfoExtensionParamSetName = "UninstallBGInfoExtension"; + + [Parameter( + ParameterSetName = SetBGInfoExtensionParamSetName, + Mandatory = false, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Disable VM BGInfo Extension")] + public override SwitchParameter Disable { get; set; } + + [Parameter( + ParameterSetName = UninstallBGInfoExtensionParamSetName, + Mandatory = false, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Uninstall VM BGInfo Extension")] + public override SwitchParameter Uninstall { get; set; } + + [Parameter( + Mandatory = false, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Reference Name.")] + [ValidateNotNullOrEmpty] + public override string ReferenceName { get; set; } + + [Parameter( + Mandatory = false, + Position = 3, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Version.")] + [ValidateNotNullOrEmpty] + public override string Version { get; set; } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + ValidateParameters(); + RemovePredicateExtensions(); + AddResourceExtension(); + WriteObject(VM); + } + + protected override void ValidateParameters() + { + base.ValidateParameters(); + this.ReferenceName = string.IsNullOrEmpty(this.ReferenceName) ? ExtensionDefaultName : this.ReferenceName; + this.Version = this.Version ?? ExtensionDefaultVersion; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/BGInfo/VirtualMachineBGInfoExtensionCmdletBase.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/BGInfo/VirtualMachineBGInfoExtensionCmdletBase.cs new file mode 100644 index 000000000000..c81972720ef8 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/BGInfo/VirtualMachineBGInfoExtensionCmdletBase.cs @@ -0,0 +1,31 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + public class VirtualMachineBGInfoExtensionCmdletBase : VirtualMachineExtensionCmdletBase + { + protected const string VirtualMachineBGInfoExtensionNoun = "AzureVMBGInfoExtension"; + + public const string ExtensionDefaultPublisher = "Microsoft.Compute"; + public const string ExtensionDefaultName = "BGInfo"; + public const string ExtensionDefaultVersion = "1.*"; + + public VirtualMachineBGInfoExtensionCmdletBase() + { + base.publisherName = ExtensionDefaultPublisher; + base.extensionName = ExtensionDefaultName; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/BGInfo/VirtualMachineBGInfoExtensionContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/BGInfo/VirtualMachineBGInfoExtensionContext.cs new file mode 100644 index 000000000000..3377b8c83b53 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/BGInfo/VirtualMachineBGInfoExtensionContext.cs @@ -0,0 +1,20 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + public class VirtualMachineBGInfoExtensionContext : VirtualMachineExtensionContext + { + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Chef/GetAzureVMChefExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Chef/GetAzureVMChefExtension.cs new file mode 100644 index 000000000000..ef94bec920c1 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Chef/GetAzureVMChefExtension.cs @@ -0,0 +1,50 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +using System.Management.Automation; +using System.Collections.Generic; +using System.Linq; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + [Cmdlet( + VerbsCommon.Get, + VirtualMachineChefExtensionNoun), + OutputType( + typeof(VirtualMachineExtensionContext))] + public class GetAzureVMChefExtensionCommand : VirtualMachineChefExtensionCmdletBase + { + + internal void ExecuteCommand() + { + base.extensionName = GetPlatformSpecificExtensionName(); + var extensionRefs = GetPredicateExtensionList(); + WriteObject( + extensionRefs == null ? null : extensionRefs.Select( + r => new VirtualMachineExtensionContext + { + ExtensionName = r.Name, + Publisher = r.Publisher, + ReferenceName = r.ReferenceName, + Version = r.Version, + State = r.State + }).FirstOrDefault()); + } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + ExecuteCommand(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Chef/RemoveAzureVMChefExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Chef/RemoveAzureVMChefExtension.cs new file mode 100644 index 000000000000..13e960e4cfef --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Chef/RemoveAzureVMChefExtension.cs @@ -0,0 +1,39 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + [Cmdlet( + VerbsCommon.Remove, + VirtualMachineChefExtensionNoun), + OutputType(typeof(IPersistentVM))] + public class RemoveAzureVMChefExtensionCommand : VirtualMachineChefExtensionCmdletBase + { + + internal void ExecuteCommand() + { + base.extensionName = GetPlatformSpecificExtensionName(); + RemovePredicateExtensions(); + WriteObject(VM); + } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + ExecuteCommand(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Chef/SetAzureVMChefExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Chef/SetAzureVMChefExtension.cs new file mode 100644 index 000000000000..8208a8b9a1a6 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Chef/SetAzureVMChefExtension.cs @@ -0,0 +1,226 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +using System.Management.Automation; +using System.Linq; +using System; +using System.IO; +using System.Text.RegularExpressions; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + [Cmdlet( + VerbsCommon.Set, + VirtualMachineChefExtensionNoun, + DefaultParameterSetName = WindowsParameterSetName), + OutputType( + typeof(IPersistentVM))] + public class SetAzureVMChefExtensionCommand : VirtualMachineChefExtensionCmdletBase + { + protected const string LinuxParameterSetName = OS.Linux; + protected const string WindowsParameterSetName = OS.Windows; + + [Parameter( + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Version. Default is the latest available version")] + [ValidateNotNullOrEmpty] + public override string Version { get; set; } + + [Parameter( + Mandatory = true, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Chef Server Validation Key File Path.")] + [ValidateNotNullOrEmpty] + public string ValidationPem { get; set; } + + [Parameter( + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Chef Server Client Config (ClientRb)File Path.")] + [ValidateNotNullOrEmpty] + public string ClientRb { get; set; } + + [Parameter( + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Chef Server Node Runlist.")] + [ValidateNotNullOrEmpty] + public string RunList { get; set; } + + [Parameter( + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Chef Server Url.")] + [ValidateNotNullOrEmpty] + public string ChefServerUrl { get; set; } + + [Parameter( + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Chef ValidationClientName," + + " used to determine whether a chef-client may register with a Chef server.")] + [ValidateNotNullOrEmpty] + public string ValidationClientName { get; set; } + + [Parameter( + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Chef Organization name, used to form Validation Client Name.")] + [ValidateNotNullOrEmpty] + public string OrganizationName { get; set; } + + [Parameter( + Mandatory = true, + ParameterSetName = LinuxParameterSetName, + HelpMessage = "Set extension for Linux.")] + public SwitchParameter Linux { get; set; } + + [Parameter( + Mandatory = true, + ParameterSetName = WindowsParameterSetName, + HelpMessage = "Set extension for Windows.")] + public SwitchParameter Windows { get; set; } + + internal void ExecuteCommand() + { + SetDefault(); + ValidateParameters(); + SetPrivateConfig(); + SetPublicConfig(); + RemovePredicateExtensions(); + AddResourceExtension(); + WriteObject(VM); + } + + private string GetLatestChefExtensionVersion() + { + var extensionList = this.ComputeClient.VirtualMachineExtensions.List(); + return extensionList.ResourceExtensions.Where( + extension => extension.Publisher == ExtensionDefaultPublisher + && extension.Name == base.extensionName).Max(extension => extension.Version); + } + + private void SetDefault() + { + bool IsOrganizationNameEmpty = string.IsNullOrEmpty(this.OrganizationName); + + // form validation client name using organization name. + if (!IsOrganizationNameEmpty) + { + this.ValidationClientName = this.OrganizationName + "-validator"; + } + + if (this.Linux.IsPresent) + { + base.extensionName = LinuxExtensionName; + } + else if (this.Windows.IsPresent) + { + base.extensionName = ExtensionDefaultName; + } + this.Version = this.Version ?? GetLatestChefExtensionVersion(); + } + + private void SetPrivateConfig() + { + this.PrivateConfiguration = string.Format(PrivateConfigurationTemplate, + File.ReadAllText(this.ValidationPem).TrimEnd('\r', '\n')); + } + + private void SetPublicConfig() + { + string ClientConfig = string.Empty; + bool IsClientRbEmpty = string.IsNullOrEmpty(this.ClientRb); + bool IsChefServerUrlEmpty = string.IsNullOrEmpty(this.ChefServerUrl); + bool IsValidationClientNameEmpty = string.IsNullOrEmpty(this.ValidationClientName); + bool IsRunListEmpty = string.IsNullOrEmpty(this.RunList); + + //Cases handled: + // 1. When clientRb given by user and: + // 1.1 if ChefServerUrl and ValidationClientName given then append it to end of ClientRb + // 1.2 if ChefServerUrl given then append it to end of ClientRb + // 1.3 if ValidationClientName given then append it to end of ClientRb + // 2. When ClientRb not given but ChefServerUrl and ValidationClientName given by user then + // create ClientRb config using these values. + + if (!IsClientRbEmpty) + { + ClientConfig = Regex.Replace(File.ReadAllText(this.ClientRb), + "\"|'", "\\\"").TrimEnd('\r', '\n'); + // Append ChefServerUrl and ValidationClientName to end of ClientRb + if (!IsChefServerUrlEmpty && !IsValidationClientNameEmpty) + { + string UserConfig = @" +chef_server_url \""{0}\"" +validation_client_name \""{1}\"" +"; + ClientConfig += string.Format(UserConfig, this.ChefServerUrl, this.ValidationClientName); + } + // Append ChefServerUrl to end of ClientRb + else if (!IsChefServerUrlEmpty) + { + string UserConfig = @" +chef_server_url \""{0}\"" +"; + ClientConfig += string.Format(UserConfig, this.ChefServerUrl); + } + // Append ValidationClientName to end of ClientRb + else if (!IsValidationClientNameEmpty) + { + string UserConfig = @" +validation_client_name \""{0}\"" +"; + ClientConfig += string.Format(UserConfig, this.ValidationClientName); + } + } + // Create ClientRb config using ChefServerUrl and ValidationClientName + else if (!IsChefServerUrlEmpty && !IsValidationClientNameEmpty) + { + string UserConfig = @" +chef_server_url \""{0}\"" +validation_client_name \""{1}\"" +"; + ClientConfig = string.Format(UserConfig, this.ChefServerUrl, this.ValidationClientName); + } + + if (IsRunListEmpty) + { + this.PublicConfiguration = string.Format("{{{0}}}", + string.Format(ClientRbTemplate, ClientConfig)); + } + else + { + this.PublicConfiguration = string.Format("{{{0},{1}}}", + string.Format(ClientRbTemplate, ClientConfig), + string.Format(RunListTemplate, this.RunList)); + } + } + + protected override void ValidateParameters() + { + base.ValidateParameters(); + bool IsClientRbEmpty = string.IsNullOrEmpty(this.ClientRb); + bool IsChefServerUrlEmpty = string.IsNullOrEmpty(this.ChefServerUrl); + bool IsValidationClientNameEmpty = string.IsNullOrEmpty(this.ValidationClientName); + // Validate ClientRb or ChefServerUrl and ValidationClientName should exist. + if (IsClientRbEmpty && (IsChefServerUrlEmpty || IsValidationClientNameEmpty)) + { + throw new ArgumentException( + "Required -ClientRb or -ChefServerUrl and -ValidationClientName options."); + } + } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + ExecuteCommand(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Chef/VirtualMachineChefExtensionCmdletBase.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Chef/VirtualMachineChefExtensionCmdletBase.cs new file mode 100644 index 000000000000..edef71c6b0e9 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Chef/VirtualMachineChefExtensionCmdletBase.cs @@ -0,0 +1,47 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + public class VirtualMachineChefExtensionCmdletBase : VirtualMachineExtensionCmdletBase + { + protected const string VirtualMachineChefExtensionNoun = "AzureVMChefExtension"; + + protected const string ExtensionDefaultPublisher = "Chef.Bootstrap.WindowsAzure"; + protected const string ExtensionDefaultName = "ChefClient"; + protected const string LinuxExtensionName = "LinuxChefClient"; + protected const string PrivateConfigurationTemplate = "{{\"validation_key\":\"{0}\"}}"; + protected const string ClientRbTemplate = "\"client_rb\":\"{0}\""; + protected const string RunListTemplate = "\"runlist\": \"\\\"{0}\\\"\""; + + public VirtualMachineChefExtensionCmdletBase() + { + base.publisherName = ExtensionDefaultPublisher; + } + + // Currently we have platform-wise extension names, + // So it uses VM object's platform details to find out platform specific extension name. + // This helper method is used for Get/Remove AzureVMChefExtension. + protected string GetPlatformSpecificExtensionName() + { + var vm = VM.GetInstance(); + if (vm.OSVirtualHardDisk != null) + { + return vm.OSVirtualHardDisk.OS.Equals("Windows", + System.StringComparison.OrdinalIgnoreCase) ? ExtensionDefaultName : LinuxExtensionName; + } + else { return null; } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Common/GetAzureVMAvailableExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Common/GetAzureVMAvailableExtension.cs new file mode 100644 index 000000000000..4a296001a587 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Common/GetAzureVMAvailableExtension.cs @@ -0,0 +1,140 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + /// + /// Get Microsoft Azure VM Extension Image. + /// + [Cmdlet( + VerbsCommon.Get, + AzureVMAvailableExtensionCommandNoun, + DefaultParameterSetName = ListLatestExtensionsParamSetName), + OutputType( + typeof(VirtualMachineExtensionImageContext))] + public class GetAzureVMAvailableExtensionCommand : ServiceManagementBaseCmdlet + { + protected const string AzureVMAvailableExtensionCommandNoun = "AzureVMAvailableExtension"; + protected const string ListLatestExtensionsParamSetName = "ListLatestExtensions"; + protected const string ListAllVersionsParamSetName = "ListAllVersions"; + protected const string ListSingleVersionParamSetName = "ListSingleVersion"; + + [Parameter( + ParameterSetName = ListLatestExtensionsParamSetName, + Position = 0, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Image Name.")] + [Parameter( + ParameterSetName = ListAllVersionsParamSetName, + Mandatory = true, + Position = 0, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Image Name.")] + [Parameter( + ParameterSetName = ListSingleVersionParamSetName, + Mandatory = true, + Position = 0, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Image Name.")] + [ValidateNotNullOrEmpty] + public string ExtensionName { get; set; } + + [Parameter( + ParameterSetName = ListLatestExtensionsParamSetName, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Publisher.")] + [Parameter( + ParameterSetName = ListAllVersionsParamSetName, + Mandatory = true, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Publisher.")] + [Parameter( + ParameterSetName = ListSingleVersionParamSetName, + Mandatory = true, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Publisher.")] + [ValidateNotNullOrEmpty] + public string Publisher { get; set; } + + [Parameter( + ParameterSetName = ListSingleVersionParamSetName, + Mandatory = true, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Version.")] + [ValidateNotNullOrEmpty] + public string Version { get; set; } + + [Parameter( + ParameterSetName = ListAllVersionsParamSetName, + Mandatory = true, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Specify to list all versions of an extension.")] + [ValidateNotNullOrEmpty] + public SwitchParameter AllVersions { get; set; } + + public virtual void ExecuteCommand() + { + ServiceManagementProfile.Initialize(); + + Func truePred = s => true; + + Func, + Func> predFunc = + (x, f) => string.IsNullOrEmpty(x) ? truePred : s => string.Equals(x, f(s), StringComparison.OrdinalIgnoreCase); + + var typePred = predFunc(this.ExtensionName, s => s.Name); + var publisherPred = predFunc(this.Publisher, s => s.Publisher); + var versionPred = predFunc(this.Version, s => s.Version); + + ExecuteClientActionNewSM(null, + CommandRuntime.ToString(), + () => + { + if (this.AllVersions.IsPresent || !string.IsNullOrEmpty(this.Version)) + { + return this.ComputeClient.VirtualMachineExtensions.ListVersions(this.Publisher, this.ExtensionName); + } + else + { + return this.ComputeClient.VirtualMachineExtensions.List(); + } + }, + (op, response) => response.Where(typePred).Where(publisherPred).Where(versionPred).Select( + extension => ContextFactory(extension, op))); + } + + protected override void OnProcessRecord() + { + try + { + this.ExecuteCommand(); + } + catch (Exception ex) + { + WriteError(new ErrorRecord(ex, string.Empty, ErrorCategory.CloseError, null)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Common/GetAzureVMExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Common/GetAzureVMExtension.cs new file mode 100644 index 000000000000..47833f11356e --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Common/GetAzureVMExtension.cs @@ -0,0 +1,95 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + [Cmdlet( + VerbsCommon.Get, + VirtualMachineExtensionNoun, + DefaultParameterSetName = ListByReferenceParamSetName), + OutputType( + typeof(VirtualMachineExtensionContext))] + public class GetAzureVMExtensionCommand : VirtualMachineExtensionCmdletBase + { + protected const string ListByExtensionParamSetName = "ListByExtensionName"; + protected const string ListByReferenceParamSetName = "ListByReferenceName"; + + [Parameter( + ParameterSetName = ListByExtensionParamSetName, + Mandatory = true, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Name.")] + [ValidateNotNullOrEmpty] + public override string ExtensionName { get; set; } + + [Parameter( + ParameterSetName = ListByExtensionParamSetName, + Mandatory = true, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Publisher.")] + [ValidateNotNullOrEmpty] + public override string Publisher { get; set; } + + [Parameter( + ParameterSetName = ListByExtensionParamSetName, + Position = 3, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Version.")] + [ValidateNotNullOrEmpty] + public override string Version { get; set; } + + [Parameter( + ParameterSetName = ListByReferenceParamSetName, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Reference Name.")] + [ValidateNotNullOrEmpty] + public override string ReferenceName { get; set; } + + internal void ExecuteCommand() + { + var extensionRefs = + string.IsNullOrEmpty(ReferenceName) && string.IsNullOrEmpty(ExtensionName) ? + ResourceExtensionReferences : GetPredicateExtensionList(); + + var extensions = extensionRefs == null ? null : extensionRefs.Select( + r => new VirtualMachineExtensionContext + { + ExtensionName = r.Name, + ReferenceName = r.ReferenceName, + Publisher = r.Publisher, + Version = r.Version, + State = r.State, + PublicConfiguration = IsLegacyExtension(r.Name, r.Publisher, r.Version) + ? GetConfiguration(r) : GetConfiguration(r, PublicTypeStr), + PrivateConfiguration = SecureStringHelper.GetSecureString(GetConfiguration(r, PrivateTypeStr)), + RoleName = VM.GetInstance().RoleName + }); + + WriteObject(extensions, true); + } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Common/RemoveAzureVMExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Common/RemoveAzureVMExtension.cs new file mode 100644 index 000000000000..df790fd881fa --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Common/RemoveAzureVMExtension.cs @@ -0,0 +1,87 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + [Cmdlet( + VerbsCommon.Remove, + VirtualMachineExtensionNoun, + DefaultParameterSetName = RemoveByExtensionParamSetName), + OutputType( + typeof(IPersistentVM))] + public class RemoveAzureVMExtensionCommand : VirtualMachineExtensionCmdletBase + { + protected const string RemoveByExtensionParamSetName = "RemoveByExtensionName"; + protected const string RemoveByReferenceParamSetName = "RemoveByReferenceName"; + protected const string RemoveAllParamSetName = "RemoveAll"; + + [Parameter( + ParameterSetName = RemoveByExtensionParamSetName, + Mandatory = true, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Name.")] + [ValidateNotNullOrEmpty] + public override string ExtensionName { get; set; } + + [Parameter( + ParameterSetName = RemoveByExtensionParamSetName, + Mandatory = true, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Publisher.")] + [ValidateNotNullOrEmpty] + public override string Publisher { get; set; } + + [Parameter( + ParameterSetName = RemoveByReferenceParamSetName, + Mandatory = true, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Reference Name.")] + [ValidateNotNullOrEmpty] + public override string ReferenceName { get; set; } + + [Parameter( + ParameterSetName = RemoveAllParamSetName, + Mandatory = true, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Specify to remove all extensions.")] + public SwitchParameter RemoveAll { get; set; } + + internal void ExecuteCommand() + { + if (RemoveAll.IsPresent) + { + ResourceExtensionReferences.Clear(); + } + else + { + RemovePredicateExtensions(); + } + + WriteObject(VM); + } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Common/SetAzureVMExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Common/SetAzureVMExtension.cs new file mode 100644 index 000000000000..bed707a519b4 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Common/SetAzureVMExtension.cs @@ -0,0 +1,257 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + [Cmdlet( + VerbsCommon.Set, + VirtualMachineExtensionNoun, + DefaultParameterSetName = SetByExtensionParamSetName), + OutputType( + typeof(IPersistentVM))] + public class SetAzureVMExtensionCommand : VirtualMachineExtensionCmdletBase + { + protected const string SetByExtensionParamSetName = "SetByExtensionName"; + protected const string SetByReferenceParamSetName = "SetByReferenceName"; + protected const string SetByExtensionAndConfigFileParamSetName = "SetByExtensionNameAndConfigFile"; + protected const string SetByReferenceAndConfigFileParamSetName = "SetByReferenceNameAndConfigFile"; + + [Parameter( + ParameterSetName = SetByExtensionParamSetName, + Mandatory = true, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Name.")] + [Parameter( + ParameterSetName = SetByExtensionAndConfigFileParamSetName, + Mandatory = true, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Name.")] + [ValidateNotNullOrEmpty] + public override string ExtensionName { get; set; } + + [Parameter( + ParameterSetName = SetByExtensionParamSetName, + Mandatory = true, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Publisher.")] + [Parameter( + ParameterSetName = SetByExtensionAndConfigFileParamSetName, + Mandatory = true, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Publisher.")] + [ValidateNotNullOrEmpty] + public override string Publisher { get; set; } + + [Parameter( + ParameterSetName = SetByExtensionParamSetName, + Mandatory = true, + Position = 3, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Version.")] + [Parameter( + ParameterSetName = SetByExtensionAndConfigFileParamSetName, + Mandatory = true, + Position = 3, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Version.")] + [ValidateNotNullOrEmpty] + public override string Version { get; set; } + + [Parameter( + ParameterSetName = SetByExtensionParamSetName, + Position = 4, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Reference Name.")] + [Parameter( + ParameterSetName = SetByReferenceParamSetName, + Mandatory = true, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Reference Name.")] + [Parameter( + ParameterSetName = SetByExtensionAndConfigFileParamSetName, + Position = 4, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Reference Name.")] + [Parameter( + ParameterSetName = SetByReferenceAndConfigFileParamSetName, + Mandatory = true, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Reference Name.")] + [ValidateNotNullOrEmpty] + public override string ReferenceName { get; set; } + + [Parameter( + ParameterSetName = SetByExtensionParamSetName, + Position = 5, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Public Configuration.")] + [Parameter( + ParameterSetName = SetByReferenceParamSetName, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Public Configuration.")] + [ValidateNotNullOrEmpty] + public override string PublicConfiguration { get; set; } + + [Parameter( + ParameterSetName = SetByExtensionAndConfigFileParamSetName, + Position = 5, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Public Configuration.")] + [Parameter( + ParameterSetName = SetByReferenceAndConfigFileParamSetName, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Public Configuration.")] + [ValidateNotNullOrEmpty] + public override string PublicConfigPath { get; set; } + + [Parameter( + ParameterSetName = SetByExtensionParamSetName, + Position = 6, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Private Configuration.")] + [Parameter( + ParameterSetName = SetByReferenceParamSetName, + Position = 3, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Private Configuration.")] + [ValidateNotNullOrEmpty] + public override string PrivateConfiguration { get; set; } + + [Parameter( + ParameterSetName = SetByExtensionAndConfigFileParamSetName, + Position = 6, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Private Configuration.")] + [Parameter( + ParameterSetName = SetByReferenceAndConfigFileParamSetName, + Position = 3, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Private Configuration.")] + [ValidateNotNullOrEmpty] + public override string PrivateConfigPath { get; set; } + + [Parameter( + ParameterSetName = SetByExtensionParamSetName, + Position = 7, + ValueFromPipelineByPropertyName = true, + HelpMessage = "To Set the Extension State to 'Disable'.")] + [Parameter( + ParameterSetName = SetByReferenceParamSetName, + Position = 4, + ValueFromPipelineByPropertyName = true, + HelpMessage = "To Set the Extension State to 'Disable'.")] + [Parameter( + ParameterSetName = SetByExtensionAndConfigFileParamSetName, + Position = 7, + ValueFromPipelineByPropertyName = true, + HelpMessage = "To Set the Extension State to 'Disable'.")] + [Parameter( + ParameterSetName = SetByReferenceAndConfigFileParamSetName, + Position = 4, + ValueFromPipelineByPropertyName = true, + HelpMessage = "To Set the Extension State to 'Disable'.")] + public override SwitchParameter Disable { get; set; } + + [Parameter( + ParameterSetName = SetByExtensionParamSetName, + Position = 8, + ValueFromPipelineByPropertyName = true, + HelpMessage = "To Set the Extension State to 'Uninstall'.")] + [Parameter( + ParameterSetName = SetByReferenceParamSetName, + Position = 5, + ValueFromPipelineByPropertyName = true, + HelpMessage = "To Set the Extension State to 'Uninstall'.")] + [Parameter( + ParameterSetName = SetByExtensionAndConfigFileParamSetName, + Position = 8, + ValueFromPipelineByPropertyName = true, + HelpMessage = "To Set the Extension State to 'Uninstall'.")] + [Parameter( + ParameterSetName = SetByReferenceAndConfigFileParamSetName, + Position = 5, + ValueFromPipelineByPropertyName = true, + HelpMessage = "To Set the Extension State to 'Uninstall'.")] + public override SwitchParameter Uninstall { get; set; } + + [Parameter( + ParameterSetName = SetByExtensionParamSetName, + Position = 9, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Public Configuration's Reference Key.")] + [Parameter( + ParameterSetName = SetByReferenceParamSetName, + Position = 6, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Public Configuration's Reference Key.")] + [Parameter( + ParameterSetName = SetByExtensionAndConfigFileParamSetName, + Position = 9, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Public Configuration's Reference Key.")] + [Parameter( + ParameterSetName = SetByReferenceAndConfigFileParamSetName, + Position = 6, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Public Configuration's Reference Key.")] + public override string PublicConfigKey { get; set; } + + [Parameter( + ParameterSetName = SetByExtensionParamSetName, + Position = 10, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Private Configuration's Reference Key.")] + [Parameter( + ParameterSetName = SetByReferenceParamSetName, + Position = 7, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Private Configuration's Reference Key.")] + [Parameter( + ParameterSetName = SetByExtensionAndConfigFileParamSetName, + Position = 10, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Private Configuration's Reference Key.")] + [Parameter( + ParameterSetName = SetByReferenceAndConfigFileParamSetName, + Position = 7, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Private Configuration's Reference Key.")] + public override string PrivateConfigKey { get; set; } + + internal void ExecuteCommand() + { + ValidateParameters(); + RemovePredicateExtensions(); + AddResourceExtension(); + WriteObject(VM); + } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Common/VirtualMachineExtensionCmdletBase.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Common/VirtualMachineExtensionCmdletBase.cs new file mode 100644 index 000000000000..9d4a84bd1257 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Common/VirtualMachineExtensionCmdletBase.cs @@ -0,0 +1,342 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Xml.Linq; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + public class VirtualMachineExtensionCmdletBase : VirtualMachineConfigurationCmdletBase + { + protected const string VirtualMachineExtensionNoun = "AzureVMExtension"; + + protected const string ExtensionReferenceNameFormat = "{0}-{1}-{2}"; + protected const string PublicConfigurationKeyStr = "PublicConfiguration"; + protected const string PrivateConfigurationKeyStr = "PrivateConfiguration"; + protected const string PublicTypeStr = "Public"; + protected const string PrivateTypeStr = "Private"; + public const string ReferenceDisableStateStr = "Disable"; + public const string ReferenceEnableStateStr = "Enable"; + public const string ReferenceUninstallStateStr = "Uninstall"; + + protected static VirtualMachineExtensionImageContext[] LegacyExtensionImages; + + protected string extensionName; + protected string publisherName; + + public virtual string ExtensionName + { + get + { + return extensionName; + } + + set + { + extensionName = value; + } + } + + public virtual string Publisher + { + get + { + return publisherName; + } + + set + { + publisherName = value; + } + } + + public virtual string Version { get; set; } + public virtual string ReferenceName { get; set; } + public virtual string PublicConfigKey { get; set; } + public virtual string PrivateConfigKey { get; set; } + public virtual string PublicConfiguration { get; set; } + public virtual string PrivateConfiguration { get; set; } + public virtual string PublicConfigPath { get; set; } + public virtual string PrivateConfigPath { get; set; } + public virtual SwitchParameter Disable { get; set; } + public virtual SwitchParameter Uninstall { get; set; } + + static VirtualMachineExtensionCmdletBase() + { + LegacyExtensionImages = new VirtualMachineExtensionImageContext[2] + { + new VirtualMachineExtensionImageContext + { + ExtensionName = "VMAccessAgent", + Publisher = "Microsoft.Compute", + Version = "0.1" + }, + + new VirtualMachineExtensionImageContext + { + ExtensionName = "DiagnosticsAgent", + Publisher = "Microsoft.Compute", + Version = "0.1" + } + }; + } + + protected bool IsLegacyExtension() + { + return IsLegacyExtension(this.ExtensionName, this.Publisher, this.Version); + } + + protected bool IsLegacyExtension(string name, string publisher, string version) + { + Func eq = + (x, y) => string.Equals(x, y, StringComparison.OrdinalIgnoreCase); + + return LegacyExtensionImages == null ? false + : LegacyExtensionImages.Any(r => eq(r.ExtensionName, name) + && eq(r.Publisher, publisher) + && eq(r.Version, version)); + } + + protected ResourceExtensionReferenceList ResourceExtensionReferences + { + get + { + if (VM.GetInstance().ResourceExtensionReferences == null) + { + VM.GetInstance().ResourceExtensionReferences = new ResourceExtensionReferenceList(); + } + + return VM.GetInstance().ResourceExtensionReferences; + } + } + + protected Func ExtensionPredicate + { + get + { + Func eq = + (x, y) => string.Equals(x, y, StringComparison.OrdinalIgnoreCase); + + return string.IsNullOrEmpty(this.ExtensionName) ? + (Func) + (r => eq(r.ReferenceName, this.ReferenceName)) + : (r => eq(r.Name, this.ExtensionName) + && eq(r.Publisher, this.Publisher)); + } + } + + protected List GetPredicateExtensionList() + { + List extensionRefs = null; + if (!ResourceExtensionReferences.Any()) + { + WriteWarning(Resources.ResourceExtensionReferencesIsNullOrEmpty); + return extensionRefs; + } + + extensionRefs = ResourceExtensionReferences.FindAll( + r => ExtensionPredicate(r)); + if (!extensionRefs.Any()) + { + WriteWarning(Resources.ResourceExtensionReferenceCannotBeFound); + } + + return extensionRefs; + } + + protected ResourceExtensionReference GetPredicateExtension() + { + ResourceExtensionReference extensionRef = null; + if (!ResourceExtensionReferences.Any()) + { + WriteWarning(Resources.ResourceExtensionReferencesIsNullOrEmpty); + } + else + { + extensionRef = ResourceExtensionReferences.FirstOrDefault(ExtensionPredicate); + } + + return extensionRef; + } + + protected void AddResourceExtension() + { + ResourceExtensionReferences.Add(NewResourceExtension()); + } + + protected void RemovePredicateExtensions() + { + ResourceExtensionReferences.RemoveAll(r => ExtensionPredicate(r)); + } + + protected ResourceExtensionReference NewResourceExtension() + { + var extensionRef = new ResourceExtensionReference(); + + extensionRef.Name = this.ExtensionName; + extensionRef.Publisher = this.Publisher; + extensionRef.Version = this.Version; + extensionRef.State = IsLegacyExtension() ? null : + this.Uninstall.IsPresent ? ReferenceUninstallStateStr : + this.Disable.IsPresent ? ReferenceDisableStateStr : ReferenceEnableStateStr; + extensionRef.ResourceExtensionParameterValues = new ResourceExtensionParameterValueList(); + + if (!string.IsNullOrEmpty(this.ReferenceName)) + { + extensionRef.ReferenceName = this.ReferenceName; + } + else + { + extensionRef.ReferenceName = extensionRef.Name; + } + + if (!string.IsNullOrEmpty(this.PublicConfigPath)) + { + this.PublicConfiguration = FileUtilities.DataStore.ReadFileAsText(this.PublicConfigPath); + } + + if (!string.IsNullOrEmpty(this.PublicConfiguration)) + { + extensionRef.ResourceExtensionParameterValues.Add( + new ResourceExtensionParameterValue + { + Key = !string.IsNullOrEmpty(this.PublicConfigKey) ? this.PublicConfigKey + : ExtensionName + (IsLegacyExtension() ? string.Empty : PublicTypeStr) + "ConfigParameter", + Type = IsLegacyExtension() ? null : PublicTypeStr, + Value = PublicConfiguration + }); + } + + if (!string.IsNullOrEmpty(this.PrivateConfigPath)) + { + this.PrivateConfiguration = FileUtilities.DataStore.ReadFileAsText(this.PrivateConfigPath); + } + + if (!string.IsNullOrEmpty(this.PrivateConfiguration)) + { + extensionRef.ResourceExtensionParameterValues.Add( + new ResourceExtensionParameterValue + { + Key = !string.IsNullOrEmpty(this.PrivateConfigKey) ? this.PrivateConfigKey + : ExtensionName + (IsLegacyExtension() ? string.Empty : PrivateTypeStr) + "ConfigParameter", + Type = IsLegacyExtension() ? null : PrivateTypeStr, + SecureValue = SecureStringHelper.GetSecureString(PrivateConfiguration) + }); + } + + return extensionRef; + } + + protected string GetConfiguration( + ResourceExtensionParameterValueList paramValList, + string typeStr) + { + string config = string.Empty; + if (paramValList != null && paramValList.Any()) + { + var paramVal = paramValList.FirstOrDefault( + p => string.IsNullOrEmpty(typeStr) ? true : + string.Equals(p.Type, typeStr, StringComparison.OrdinalIgnoreCase)); + config = SecureStringHelper.GetPlainString(paramVal); + } + + return config; + } + + protected string GetConfiguration( + ResourceExtensionReference extensionRef) + { + return extensionRef == null ? string.Empty : GetConfiguration( + extensionRef.ResourceExtensionParameterValues, null); + } + + protected string GetConfiguration( + ResourceExtensionReference extensionRef, + string typeStr) + { + return extensionRef == null ? string.Empty : GetConfiguration( + extensionRef.ResourceExtensionParameterValues, + typeStr); + } + + protected virtual void ValidateParameters() + { + // GA must be enabled before setting extensions + if (VM.GetInstance().ProvisionGuestAgent != null && !VM.GetInstance().ProvisionGuestAgent.Value) + { + throw new ArgumentException(Resources.ProvisionGuestAgentMustBeEnabledBeforeSettingIaaSVMAccessExtension); + } + + if (string.IsNullOrEmpty(this.ReferenceName)) + { + var extensionRef = GetPredicateExtension(); + if (extensionRef != null) + { + this.ReferenceName = extensionRef.ReferenceName; + } + } + } + + protected virtual void GetExtensionValues(ResourceExtensionReference extensionRef) + { + if (extensionRef != null && extensionRef.ResourceExtensionParameterValues != null) + { + Disable = string.Equals(extensionRef.State, ReferenceDisableStateStr); + GetExtensionValues(extensionRef.ResourceExtensionParameterValues); + } + else + { + Disable = extensionRef == null ? true : string.Equals(extensionRef.State, ReferenceDisableStateStr); + } + } + + protected virtual void GetExtensionValues(ResourceExtensionParameterValueList paramVals) + { + if (paramVals != null && paramVals.Any()) + { + var publicParamVal = paramVals.FirstOrDefault( + r => !string.IsNullOrEmpty(r.Value) && string.Equals(r.Type, PublicTypeStr)); + if (publicParamVal != null && !string.IsNullOrEmpty(publicParamVal.Value)) + { + this.PublicConfiguration = publicParamVal.Value; + } + + var privateParamVal = paramVals.FirstOrDefault( + r => !string.IsNullOrEmpty(r.Value) && string.Equals(r.Type, PrivateTypeStr)); + if (privateParamVal != null && !string.IsNullOrEmpty(privateParamVal.Value)) + { + this.PrivateConfiguration = privateParamVal.Value; + } + } + } + + protected static string GetConfigValue(string xmlText, string element) + { + XDocument config = XDocument.Parse(xmlText); + + var result = from d in config.Descendants() + where d.Name.LocalName == element + select d.Descendants().Any() ? d.ToString() : d.Value; + + return result.FirstOrDefault(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Common/VirtualMachineExtensionContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Common/VirtualMachineExtensionContext.cs new file mode 100644 index 000000000000..6e1e731eea4d --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Common/VirtualMachineExtensionContext.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Security; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + public class VirtualMachineExtensionContext + { + public string ExtensionName { get; set; } + public string Publisher { get; set; } + public string Version { get; set; } + public SecureString PrivateConfiguration { get; set; } + public string PublicConfiguration { get; set; } + public string ReferenceName { get; set; } + public string State { get; set; } + public string RoleName { get; set; } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Common/VirtualMachineExtensionImageContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Common/VirtualMachineExtensionImageContext.cs new file mode 100644 index 000000000000..1e24cf3c20c5 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Common/VirtualMachineExtensionImageContext.cs @@ -0,0 +1,41 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + public class VirtualMachineExtensionImageContext : ManagementOperationContext + { + public string Publisher { get; set; } + public string ExtensionName { get; set; } + public string Version { get; set; } + public string Label { get; set; } + public string PublicConfigurationSchema { get; set; } + public string PrivateConfigurationSchema { get; set; } + public string Description { get; set; } + public bool IsInternalExtension { get; set; } + public string SampleConfig { get; set; } + public bool ReplicationCompleted { get; private set; } + public Uri Eula { get; private set; } + public Uri PrivacyUri { get; private set; } + public Uri HomepageUri { get; private set; } + public bool IsJsonExtension { get; private set; } + public bool DisallowMajorVersionUpgrade { get; set; } + public string SupportedOS { get; set; } + public DateTime? PublishedDate { get; set; } + public string CompanyName { get; set; } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Common/VirtualMachineExtensionImageFactory.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Common/VirtualMachineExtensionImageFactory.cs new file mode 100644 index 000000000000..1e66140b4489 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Common/VirtualMachineExtensionImageFactory.cs @@ -0,0 +1,86 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Management.Compute; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + public class VirtualMachineExtensionImageFactory + { + private IComputeManagementClient computeClient; + + public VirtualMachineExtensionImageFactory(IComputeManagementClient computeClient) + { + this.computeClient = computeClient; + } + + private static ResourceExtensionReference MakeItem( + string publisherName, + string extensionName, + string referenceName, + string version) + { + return new ResourceExtensionReference + { + Publisher = publisherName, + Name = extensionName, + ReferenceName = referenceName, + Version = version + }; + } + + private ResourceExtensionReference MakeItem( + string publisherName, + string extensionName, + string version) + { + ResourceExtensionReference extension = null; + + if (this.computeClient != null) + { + var reference = this.computeClient.VirtualMachineExtensions.ListVersions( + publisherName, + extensionName).FirstOrDefault(); + + if (reference != null) + { + extension = MakeItem( + reference.Publisher, + reference.Name, + reference.Name, + version); + } + } + + return extension; + } + + public ResourceExtensionReferenceList MakeList( + string publisherName, + string extensionName, + string version) + { + var item = MakeItem( + publisherName, + extensionName, + version); + + var list = Enumerable.Repeat(item, item == null ? 0 : 1); + + return new ResourceExtensionReferenceList(list); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/CustomScript/GetAzureVMCustomScriptExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/CustomScript/GetAzureVMCustomScriptExtension.cs new file mode 100644 index 000000000000..6b90a1032a8c --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/CustomScript/GetAzureVMCustomScriptExtension.cs @@ -0,0 +1,65 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; +using Newtonsoft.Json; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + [Cmdlet( + VerbsCommon.Get, + VirtualMachineCustomScriptExtensionNoun, + DefaultParameterSetName = GetCustomScriptExtensionParamSetName), + OutputType( + typeof(VirtualMachineCustomScriptExtensionContext))] + public class GetAzureVMCustomScriptExtensionCommand : VirtualMachineCustomScriptExtensionCmdletBase + { + protected const string GetCustomScriptExtensionParamSetName = "GetCustomScriptExtension"; + + internal void ExecuteCommand() + { + var extensionRefs = GetPredicateExtensionList(); + WriteObject( + extensionRefs == null ? null : extensionRefs.Select( + r => + { + GetExtensionValues(r); + var pubSettings = string.IsNullOrEmpty(PublicConfiguration) ? null + : JsonConvert.DeserializeObject(PublicConfiguration); + + return new VirtualMachineCustomScriptExtensionContext + { + ExtensionName = r.Name, + Publisher = r.Publisher, + ReferenceName = r.ReferenceName, + Version = r.Version, + State = r.State, + PublicConfiguration = PublicConfiguration, + PrivateConfiguration = SecureStringHelper.GetSecureString(PrivateConfiguration), + CommandToExecute = pubSettings == null ? string.Empty : pubSettings.commandToExecute, + Uri = pubSettings == null ? null : pubSettings.fileUris, + RoleName = VM.GetInstance().RoleName + }; + }), true); + } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/CustomScript/PrivateSettings.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/CustomScript/PrivateSettings.cs new file mode 100644 index 000000000000..0eedd97811c5 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/CustomScript/PrivateSettings.cs @@ -0,0 +1,22 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + public class PrivateSettings + { + public string storageAccountName; + public string storageAccountKey; + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/CustomScript/PublicSettings.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/CustomScript/PublicSettings.cs new file mode 100644 index 000000000000..f9414c08364f --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/CustomScript/PublicSettings.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + + public class PublicSettings + { + public string[] fileUris; + public string commandToExecute; + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/CustomScript/RemoveAzureVMCustomScriptExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/CustomScript/RemoveAzureVMCustomScriptExtension.cs new file mode 100644 index 000000000000..5a8af26d6ddb --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/CustomScript/RemoveAzureVMCustomScriptExtension.cs @@ -0,0 +1,42 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + [Cmdlet( + VerbsCommon.Remove, + VirtualMachineCustomScriptExtensionNoun, + DefaultParameterSetName = RemoveCustomScriptExtensionParamSetName), + OutputType( + typeof(IPersistentVM))] + public class RemoveAzureVMCustomScriptExtensionCommand : VirtualMachineCustomScriptExtensionCmdletBase + { + protected const string RemoveCustomScriptExtensionParamSetName = "RemoveCustomScriptExtension"; + + internal void ExecuteCommand() + { + RemovePredicateExtensions(); + WriteObject(VM); + } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/CustomScript/SetAzureVMCustomScriptExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/CustomScript/SetAzureVMCustomScriptExtension.cs new file mode 100644 index 000000000000..232aa49bb7bf --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/CustomScript/SetAzureVMCustomScriptExtension.cs @@ -0,0 +1,252 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Auth; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + [Cmdlet( + VerbsCommon.Set, + VirtualMachineCustomScriptExtensionNoun, + DefaultParameterSetName = SetCustomScriptExtensionByContainerBlobsParamSetName), + OutputType( + typeof(IPersistentVM))] + public class SetAzureVMCustomScriptExtensionCommand : VirtualMachineCustomScriptExtensionCmdletBase + { + protected const string SetCustomScriptExtensionByContainerBlobsParamSetName = "SetCustomScriptExtensionByContainerAndFileNames"; + protected const string SetCustomScriptExtensionByUrisParamSetName = "SetCustomScriptExtensionByUriLinks"; + protected const string DisableCustomScriptExtensionParamSetName = "DisableCustomScriptExtension"; + protected const string UninstallCustomScriptExtensionParamSetName = "UninstalleCustomScriptExtension"; + + [Parameter( + Mandatory = false, + Position = 0, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Reference Name.")] + [ValidateNotNullOrEmpty] + public override string ReferenceName { get; set; } + + [Parameter( + Mandatory = false, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Version.")] + [ValidateNotNullOrEmpty] + public override string Version { get; set; } + + [Parameter( + ParameterSetName = DisableCustomScriptExtensionParamSetName, + Mandatory = false, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Disable VM Custom Script Extension")] + public override SwitchParameter Disable { get; set; } + + [Parameter( + ParameterSetName = UninstallCustomScriptExtensionParamSetName, + Mandatory = false, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Uninstall VM Custom Script Extension")] + public override SwitchParameter Uninstall { get; set; } + + [Parameter( + ParameterSetName = SetCustomScriptExtensionByContainerBlobsParamSetName, + Mandatory = true, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Name of the Container.")] + [ValidateNotNullOrEmpty] + public override string ContainerName { get; set; } + + [Parameter( + ParameterSetName = SetCustomScriptExtensionByContainerBlobsParamSetName, + Mandatory = true, + Position = 3, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Blob Files in the Container.")] + [ValidateNotNullOrEmpty] + public override string[] FileName { get; set; } + + [Parameter( + ParameterSetName = SetCustomScriptExtensionByContainerBlobsParamSetName, + Mandatory = false, + Position = 4, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Storage Account Name.")] + [ValidateNotNullOrEmpty] + public override string StorageAccountName { get; set; } + + [Parameter( + ParameterSetName = SetCustomScriptExtensionByContainerBlobsParamSetName, + Mandatory = false, + Position = 5, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Storage Endpoint Suffix.")] + [ValidateNotNullOrEmpty] + public override string StorageEndpointSuffix { get; set; } + + [Parameter( + ParameterSetName = SetCustomScriptExtensionByContainerBlobsParamSetName, + Mandatory = false, + Position = 6, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Storage Account Key.")] + [ValidateNotNullOrEmpty] + public override string StorageAccountKey { get; set; } + + [Parameter( + ParameterSetName = SetCustomScriptExtensionByUrisParamSetName, + Mandatory = false, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The File URIs.")] + [ValidateNotNullOrEmpty] + public override string[] FileUri { get; set; } + + [Parameter( + ParameterSetName = SetCustomScriptExtensionByContainerBlobsParamSetName, + Mandatory = false, + Position = 7, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Run File to Execute in PowerShell on the VM.")] + [Parameter( + ParameterSetName = SetCustomScriptExtensionByUrisParamSetName, + Mandatory = true, + Position = 3, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Run File to Execute in PowerShell on the VM.")] + [ValidateNotNullOrEmpty] + [Alias("RunFile", "Command")] + public override string Run { get; set; } + + [Parameter( + ParameterSetName = SetCustomScriptExtensionByContainerBlobsParamSetName, + Mandatory = false, + Position = 8, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Argument String for the Run File.")] + [Parameter( + ParameterSetName = SetCustomScriptExtensionByUrisParamSetName, + Mandatory = false, + Position = 4, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Argument String for the Run File.")] + [ValidateNotNullOrEmpty] + public override string Argument { get; set; } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + ExecuteCommand(); + } + + internal void ExecuteCommand() + { + ValidateParameters(); + RemovePredicateExtensions(); + AddResourceExtension(); + WriteObject(VM); + } + + protected override void ValidateParameters() + { + base.ValidateParameters(); + + if (string.Equals(this.ParameterSetName, SetCustomScriptExtensionByContainerBlobsParamSetName)) + { + this.StorageEndpointSuffix = string.IsNullOrEmpty(this.StorageEndpointSuffix) ? + AzureSession.CurrentContext.Environment.GetEndpoint(AzureEnvironment.Endpoint.StorageEndpointSuffix) : this.StorageEndpointSuffix; + var sName = string.IsNullOrEmpty(this.StorageAccountName) ? GetStorageName() : this.StorageAccountName; + var sKey = string.IsNullOrEmpty(this.StorageAccountKey) ? GetStorageKey(sName) : this.StorageAccountKey; + + if (this.FileName != null && this.FileName.Any()) + { + this.FileUri = (from blobName in this.FileName + select GetSasUrlStr(sName, sKey, this.ContainerName, blobName)).ToArray(); + + if (string.IsNullOrEmpty(this.Run)) + { + WriteWarning(Resources.CustomScriptExtensionTryToUseTheFirstSpecifiedFileAsRunScript); + this.Run = this.FileName[0]; + } + } + } + + this.ReferenceName = string.IsNullOrEmpty(this.ReferenceName) ? ExtensionDefaultName : this.ReferenceName; + this.PublicConfiguration = GetPublicConfiguration(); + this.PrivateConfiguration = GetPrivateConfiguration(); + this.Version = this.Version ?? ExtensionDefaultVersion; + } + + protected string GetStorageName() + { + return CurrentContext.Subscription.GetProperty(AzureSubscription.Property.StorageAccount); + } + + protected string GetStorageKey(string storageName) + { + string storageKey = string.Empty; + + if (!string.IsNullOrEmpty(storageName)) + { + var storageAccount = this.StorageClient.StorageAccounts.Get(storageName); + if (storageAccount != null) + { + var keys = this.StorageClient.StorageAccounts.GetKeys(storageName); + if (keys != null) + { + storageKey = !string.IsNullOrEmpty(keys.PrimaryKey) ? keys.PrimaryKey : keys.SecondaryKey; + } + } + } + + return storageKey; + } + + protected string GetSasUrlStr(string storageName, string storageKey, string containerName, string blobName) + { + var cred = new StorageCredentials(storageName, storageKey); + var storageAccount = string.IsNullOrEmpty(this.StorageEndpointSuffix) + ? new CloudStorageAccount(cred, true) + : new CloudStorageAccount(cred, this.StorageEndpointSuffix, true); + + var blobClient = storageAccount.CreateCloudBlobClient(); + var container = blobClient.GetContainerReference(containerName); + var cloudBlob = container.GetBlockBlobReference(blobName); + var sasToken = cloudBlob.GetSharedAccessSignature( + new SharedAccessBlobPolicy() + { + SharedAccessExpiryTime = DateTime.UtcNow.AddHours(24.0), + Permissions = SharedAccessBlobPermissions.Read + }); + + // Try not to use a Uri object in order to keep the following + // special characters in the SAS signature section: + // '+' -> '%2B' + // '/' -> '%2F' + // '=' -> '%3D' + return cloudBlob.Uri + sasToken; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/CustomScript/VirtualMachineCustomScriptExtensionCmdletBase.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/CustomScript/VirtualMachineCustomScriptExtensionCmdletBase.cs new file mode 100644 index 000000000000..eb1769245b3e --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/CustomScript/VirtualMachineCustomScriptExtensionCmdletBase.cs @@ -0,0 +1,70 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Newtonsoft.Json; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + public class VirtualMachineCustomScriptExtensionCmdletBase : VirtualMachineExtensionCmdletBase + { + protected const string VirtualMachineCustomScriptExtensionNoun = "AzureVMCustomScriptExtension"; + protected const string ExtensionDefaultPublisher = "Microsoft.Compute"; + protected const string ExtensionDefaultName = "CustomScriptExtension"; + protected const string ExtensionDefaultVersion = "1.*"; + + public virtual string ContainerName { get; set; } + public virtual string[] FileName { get; set; } + public virtual string[] FileUri{ get; set; } + public virtual string StorageAccountName { get; set; } + public virtual string StorageAccountKey { get; set; } + public virtual string StorageEndpointSuffix { get; set; } + public virtual string Run { get; set; } + public virtual string Argument { get; set; } + + public VirtualMachineCustomScriptExtensionCmdletBase() + { + base.publisherName = ExtensionDefaultPublisher; + base.extensionName = ExtensionDefaultName; + } + + protected string GetPublicConfiguration() + { + const string poshCmdFormatStr = "powershell {0} -file {1} {2}"; + const string defaultPolicyStr = "Unrestricted"; + const string policyFormatStr = "-ExecutionPolicy {0}"; + + string policyStr = string.Format(policyFormatStr, defaultPolicyStr); + + return JsonUtilities.TryFormatJson(JsonConvert.SerializeObject( + new PublicSettings + { + fileUris = this.FileUri, + commandToExecute = string.Format(poshCmdFormatStr, policyStr, this.Run, this.Argument) + })); + } + + protected string GetPrivateConfiguration() + { + return string.IsNullOrEmpty(this.StorageAccountName)|| string.IsNullOrEmpty(this.StorageAccountKey) + ? string.Empty + : JsonUtilities.TryFormatJson(JsonConvert.SerializeObject( + new PrivateSettings + { + storageAccountName = this.StorageAccountName, + storageAccountKey = this.StorageAccountKey ?? string.Empty + })); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/CustomScript/VirtualMachineCustomScriptExtensionContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/CustomScript/VirtualMachineCustomScriptExtensionContext.cs new file mode 100644 index 000000000000..0e6a95a83e84 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/CustomScript/VirtualMachineCustomScriptExtensionContext.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + + public class VirtualMachineCustomScriptExtensionContext : VirtualMachineExtensionContext + { + public string CommandToExecute { get; set; } + public string[] Uri { get; set; } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/ConfigurationParseResult.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/ConfigurationParseResult.cs new file mode 100644 index 000000000000..5fd3ca25ea5e --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/ConfigurationParseResult.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation.Language; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.DSC +{ + public class ConfigurationParseResult + { + public string Path { get; set; } + public ParseError[] Errors { get; set; } + public List RequiredModules { get; set; } + + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/ConfigurationParsingHelper.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/ConfigurationParsingHelper.cs new file mode 100644 index 000000000000..9040556fbdde --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/ConfigurationParsingHelper.cs @@ -0,0 +1,245 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Management.Automation.Language; +using System.Management.Automation.Runspaces; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.DSC +{ + + public static class ConfigurationParsingHelper + { + private static readonly ConcurrentDictionary _resourceName2ModuleNameCache = + new ConcurrentDictionary(); + + private static bool IsParameterName(CommandElementAst ast, string name) + { + CommandParameterAst constantAst = ast as CommandParameterAst; + if (constantAst == null) + { + return false; + } + return String.Equals(constantAst.ParameterName, name, StringComparison.OrdinalIgnoreCase); + } + + private static List GetLegacyTopLevelParametersFromAst(CommandAst ast, string parameterName) + { + List parameters = new List(); + IEnumerable commandElement = + ast.CommandElements.Where(x => IsParameterName(x, parameterName)).OfType(); + foreach (var commandElementAst in commandElement) + { + ArrayLiteralAst arrayLiteralAst = commandElementAst.Argument as ArrayLiteralAst; + if (arrayLiteralAst != null) + { + parameters.AddRange(arrayLiteralAst.Elements.OfType().Select(x => x.Value)); + } + } + return parameters; + } + + + private static bool IsCandidateForImportDscResourceAst(Ast ast, int startOffset) + { + return ast.Extent.StartOffset == startOffset && !(ast is StatementBlockAst) && !(ast is NamedBlockAst); + } + private static List GetSingleAstRequiredModules(Ast ast, Token[] tokens) + { + List modules = new List(); + List resources = new List(); + var imports = tokens.Where(token => + String.Compare(token.Text, "Import-DscResource", StringComparison.OrdinalIgnoreCase) == 0); + + // + // Create a function with the same name as Import-DscResource keyword and use powershell + // argument function binding to emulate Import-DscResource argument binding. + // + InitialSessionState initialSessionState = InitialSessionState.Create(); + SessionStateFunctionEntry importDscResourcefunctionEntry = new SessionStateFunctionEntry( + "Import-DscResource", @"param($Name, $ModuleName) + if ($ModuleName) + { + foreach ($m in $ModuleName) { $global:modules.Add($m) } + } else { + foreach ($n in $Name) { $global:resources.Add($n) } + } + "); + initialSessionState.Commands.Add(importDscResourcefunctionEntry); + initialSessionState.LanguageMode = PSLanguageMode.RestrictedLanguage; + var moduleVarEntry = new SessionStateVariableEntry("modules", modules, ""); + var resourcesVarEntry = new SessionStateVariableEntry("resources", resources, ""); + initialSessionState.Variables.Add(moduleVarEntry); + initialSessionState.Variables.Add(resourcesVarEntry); + + using (System.Management.Automation.PowerShell powerShell = System.Management.Automation.PowerShell.Create(initialSessionState)) + { + foreach (var import in imports) + { + int startOffset = import.Extent.StartOffset; + var asts = ast.FindAll(a => IsCandidateForImportDscResourceAst(a, startOffset), true); + int longestLen = -1; + Ast longestCandidate = null; + foreach (var candidatAst in asts) + { + int curLen = candidatAst.Extent.EndOffset - candidatAst.Extent.StartOffset; + if (curLen > longestLen) + { + longestCandidate = candidatAst; + longestLen = curLen; + } + } + // longestCandidate should contain AST for import-dscresource, like "Import-DSCResource -Module x -Name y". + if (longestCandidate != null) + { + string importText = longestCandidate.Extent.Text; + // We invoke-command "importText" here. Script injection is prevented: + // We checked that file represents a valid AST without errors. + powerShell.AddScript(importText); + powerShell.Invoke(); + powerShell.Commands.Clear(); + } + } + } + modules.AddRange(resources.Select(GetModuleNameForDscResource)); + return modules; + } + + public static string GetModuleNameForDscResource(string resourceName) + { + string moduleName; + if (!_resourceName2ModuleNameCache.TryGetValue(resourceName, out moduleName)) + { + try + { + using (System.Management.Automation.PowerShell powershell = System.Management.Automation.PowerShell.Create()) + { + powershell.AddCommand("Get-DscResource"). + AddCommand("Where-Object").AddParameter("Property", "ResourceType").AddParameter("Value", resourceName).AddParameter("EQ", true). + AddCommand("Foreach-Object").AddParameter("MemberName", "Module"). + AddCommand("Foreach-Object").AddParameter("MemberName", "Name"); + moduleName = powershell.Invoke().First(); + } + } + catch (InvalidOperationException e) + { + throw new GetDscResourceException(resourceName, e); + } + _resourceName2ModuleNameCache.TryAdd(resourceName, moduleName); + } + return moduleName; + } + + private static List GetRequiredModulesFromAst(Ast ast, Token[] tokens) + { + List modules = new List(); + + // We use System.Management.Automation.Language.Parser to extract required modules from ast, + // but format of ast is a bit tricky and have changed in time. + // + // There are two place where 'Import-DscResource' keyword can appear: + // 1) + // Configuration Foo { + // Import-DscResource .... # outside node + // Node Bar {...} + // } + // 2) + // Configuration Foo { + // Node Bar { + // Import-DscResource .... # inside node + // ... + // } + // } + // + // The old version of System.Management.Automation.Language.Parser produces slightly different AST for the first case. + // In new version, Configuration corresponds to ConfigurationDefinitionAst. + // In old version is's a generic CommandAst with specific commandElements which capture top-level Imports (case 1). + // In new version all imports correspond to their own CommandAsts, same for case 2 in old version. + + // Old version, case 1: + IEnumerable legacyConfigurationAsts = ast.FindAll(IsLegacyAstConfiguration, true).Select(x => (CommandAst)x); + foreach (var legacyConfigurationAst in legacyConfigurationAsts) + { + // Note: these two sequences are translated to same AST: + // + // Import-DscResource -Module xComputerManagement; Import-DscResource -Name xComputer + // Import-DscResource -Module xComputerManagement -Name xComputer + // + // We cannot distinguish different imports => cannot ignore resource names for imports with specified modules. + // So we process everything: ModuleDefinition and ResourceDefinition. + + // Example: Import-DscResource -Module xPSDesiredStateConfiguration + modules.AddRange(GetLegacyTopLevelParametersFromAst(legacyConfigurationAst, "ModuleDefinition")); + // Example: Import-DscResource -Name MSFT_xComputer + modules.AddRange(GetLegacyTopLevelParametersFromAst(legacyConfigurationAst, "ResourceDefinition").Select(GetModuleNameForDscResource)); + } + + // Both cases in new version and 2nd case in old version: + modules.AddRange(GetSingleAstRequiredModules(ast, tokens)); + + return modules.Distinct().ToList(); + } + + private static bool IsLegacyAstConfiguration(Ast node) + { + CommandAst commandNode = node as CommandAst; + if (commandNode == null) + { + return false; + } + // TODO: Add case when configuration name is not a StringConstant, but a variable. + StringConstantExpressionAst commandParameter = (commandNode.CommandElements[0] as StringConstantExpressionAst); + if (commandParameter == null) + { + return false; + } + // Find the AST nodes defining configurations. These nodes will be CommandAst nodes + // with 7 or 8 command elements (8 if the configuration requires any custom modules.) + return + commandNode.CommandElements.Count >= 7 && + String.Equals(commandParameter.Extent.Text, "configuration", StringComparison.OrdinalIgnoreCase) && + String.Equals(commandParameter.Value, @"PSDesiredStateConfiguration\Configuration", + StringComparison.OrdinalIgnoreCase); + } + + public static ConfigurationParseResult ParseConfiguration(string path) + { + // Get the resolved script path. This will throw an exception if the file is not found. + string fullPath = Path.GetFullPath(path); + Token[] tokens; + ParseError[] errors; + // Parse the script into an AST, capturing parse errors. Note - even with errors, the + // file may still successfully define one or more configurations. We don't process + // required modules in case of parsing errors to avoid script injection. + ScriptBlockAst ast = Parser.ParseFile(fullPath, out tokens, out errors); + List requiredModules = new List(); + if (!errors.Any()) + { + requiredModules = GetRequiredModulesFromAst(ast, tokens).Distinct().ToList(); + } + return new ConfigurationParseResult() + { + Path = fullPath, + Errors = errors, + RequiredModules = requiredModules, + }; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/DSCPublicSettings.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/DSCPublicSettings.cs new file mode 100644 index 000000000000..f18875f8d365 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/DSCPublicSettings.cs @@ -0,0 +1,100 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + /// + /// Represents public settings. Serialized representation of this object stored as a plain text string on the VM. + /// Part of the protocol between Set-AzureVMDscExtension cmdlet and DSC Extension handler. + /// + public class DscPublicSettings + { + /// + /// Version 1.0.0.0 of DscPublicSettings. We keep it for backward compatability. + /// + internal class Version1 + { + public string SasToken { get; set; } + public string ModulesUrl { get; set; } + public string ConfigurationFunction { get; set; } + public Hashtable Properties { get; set; } + + /// + /// Converting to the current version of DscPublicSettings. + /// + /// + public DscPublicSettings ToCurrentVersion() + { + List properties = new List(); + foreach (DictionaryEntry p in this.Properties) + { + properties.Add(new Property() + { + Name = p.Key.ToString(), + TypeName = p.Value.GetType().ToString(), + Value = p.Value + }); + } + return new DscPublicSettings() + { + SasToken = this.SasToken, + ModulesUrl = this.ModulesUrl, + ConfigurationFunction = this.ConfigurationFunction, + Properties = properties.ToArray(), + ProtocolVersion = new Version(1, 0, 0, 0) + }; + } + } + + /// + /// Defines an entry of DscPublicSettings.Properties array. + /// + public class Property + { + public string TypeName { get; set; } + public string Name { get; set; } + public object Value { get; set; } + } + + /// + /// SharedAccessSignature token that allows access of azure blob storage files. + /// + public string SasToken { get; set; } + + /// + /// Url for archive with modules and configuration in azure blob storage. + /// + public string ModulesUrl { get; set; } + + /// + /// String to define configuration in the format: "Module\NameOfConfiguration", where + /// Module can be a path to the root of the module or .ps1 file or .psm1 file. + /// + public string ConfigurationFunction { get; set; } + + /// + /// Configuration parameters + /// + public Property[] Properties { get; set; } + + /// + /// Version of the protocol (DscPublicSettings and DscPrivateSettings mostly). + /// + public Version ProtocolVersion { get; set; } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/DscPrivateSettings.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/DscPrivateSettings.cs new file mode 100644 index 000000000000..6964b255d2e4 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/DscPrivateSettings.cs @@ -0,0 +1,36 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + using System.Collections; + + /// + /// Represents private/protected settings. Serialized representation of this object stored as an encrypted string on the VM. + /// Part of the protocol between Set-AzureVMDscExtension cmdlet and DSC Extension handler. + /// + public class DscPrivateSettings + { + /// + /// Url to the blob storage with ConfigurationData .psd1 file. + /// + public string DataBlobUri { get; set; } + + /// + /// This hashtable contains parameters that needs to be encrypted on target VM, like PSCredential. + /// are not encrypted on target VM. + /// + public Hashtable Items { get; set; } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/DscSettingsSerializer.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/DscSettingsSerializer.cs new file mode 100644 index 000000000000..5f9293030da6 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/DscSettingsSerializer.cs @@ -0,0 +1,182 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Management.Automation; +using System.Runtime.InteropServices; +using System.Security; +using System.Text; +using System.Threading.Tasks; + +using Newtonsoft.Json; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.DSC +{ + public class DscSettingsSerializer + { + /// + /// Serialize DscPublicSettings to string. + /// + /// + /// + public static string SerializePublicSettings(DscPublicSettings publicSettings) + { + return JsonConvert.SerializeObject(publicSettings); + } + + /// + /// Serialize DscPrivateSettings to string. + /// + /// + /// + public static string SerializePrivateSettings(DscPrivateSettings privateSettings) + { + return JsonConvert.SerializeObject(privateSettings); + } + + public static DscPublicSettings DeserializePublicSettings(string publicSettingsString) + { + DscPublicSettings publicSettings = null; + try + { + publicSettings = string.IsNullOrEmpty(publicSettingsString) + ? null + : JsonConvert.DeserializeObject(publicSettingsString); + } + catch (JsonException) + { + // Try deserialize as version 1.0 + try + { + DscPublicSettings.Version1 publicSettingsV1 = + JsonConvert.DeserializeObject(publicSettingsString); + publicSettings = publicSettingsV1.ToCurrentVersion(); + } + catch (JsonException e) + { + throw e; + } + } + return publicSettings; + } + + /// + /// Convert hashtable of public settings into two parts: + /// 1) Array of public settings in format: + /// [ + /// { + /// "Name": "String Parameter", + /// "Value": "String Value", + /// "TypeName": "System.String" + /// } + /// ] + /// 2) Private settings hashtable. We extract all sensitive information (like password from PSCredential) + /// and store it in private settings. Public settings will reference them in form: + /// { + /// "Name": "AdminCredential", + /// "Value": + /// { + /// "Password" : "PrivateSettings:28AC4D36-A99B-41DE-8421-2BCC1C7C1A3B" + /// "UserName" : "DOMAIN\LOGIN" + /// }, + /// "TypeName": "System.Management.Automation.PSCredential" + /// } + /// and private hashtable will look like that: + /// { + /// "28AC4D36-A99B-41DE-8421-2BCC1C7C1A3B" : "password" + /// } + /// + /// + /// tuple of array (public settings) and hashtable (private settings) + public static Tuple SeparatePrivateItems(Hashtable arguments) + { + var publicSettings = new List(); + var privateSettings = new Hashtable(); + if (arguments != null) + { + foreach (DictionaryEntry argument in arguments) + { + object entryValue = argument.Value; + string entryType = argument.Value == null ? "null" : argument.Value.GetType().ToString(); + string entryName = argument.Key.ToString(); + // Special case for PSCredential + PSCredential credential = argument.Value as PSCredential; + if (credential == null) + { + PSObject psObject = argument.Value as PSObject; + if (psObject != null) + { + credential = psObject.BaseObject as PSCredential; + } + } + if (credential != null) + { + // plainTextPassword is a string object with sensitive information in plain text. + // We pass it to 3rd party serializer which may create copies of the string. + string plainTextPassword = ConvertToUnsecureString(credential.Password); + string userName = credential.UserName; + string passwordRef = Guid.NewGuid().ToString(); + privateSettings.Add(passwordRef, plainTextPassword); + var newValue = new Hashtable(); + newValue["UserName"] = String.Format(CultureInfo.InvariantCulture, userName); + newValue["Password"] = String.Format(CultureInfo.InvariantCulture, "PrivateSettingsRef:{0}", + passwordRef); + entryValue = newValue; + entryType = typeof (PSCredential).ToString(); + } + + var entry = new DscPublicSettings.Property() + { + Name = entryName, + TypeName = entryType, + Value = entryValue, + }; + publicSettings.Add(entry); + } + } + return new Tuple(publicSettings.ToArray(), privateSettings); + } + + /// + /// Converte SecureString to String. + /// + /// + /// This method creates a managed object with sensitive information and undetermined lifecycle. + /// + /// + /// + private static string ConvertToUnsecureString(SecureString source) + { + if (source == null) + throw new ArgumentNullException("source"); + + IntPtr unmanagedString = IntPtr.Zero; + try + { + unmanagedString = Marshal.SecureStringToGlobalAllocUnicode(source); + return Marshal.PtrToStringUni(unmanagedString); + } + finally + { + Marshal.ZeroFreeGlobalAllocUnicode(unmanagedString); + } + } + + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/GetAzureVMDscExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/GetAzureVMDscExtension.cs new file mode 100644 index 000000000000..abc52a38db9b --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/GetAzureVMDscExtension.cs @@ -0,0 +1,104 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; +using Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.DSC; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Newtonsoft.Json; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + /// + /// Gets the settings of the DSC extension on a particular VM. + /// + [Cmdlet(VerbsCommon.Get, VirtualMachineDscExtensionCmdletNoun), + OutputType(typeof(VirtualMachineDscExtensionContext))] + public class GetAzureVMDscExtensionCommand : VirtualMachineDscExtensionCmdletBase + { + + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true)] + public override string Version { get; set; } + + internal void ExecuteCommand() + { + List extensionRefs = GetPredicateExtensionList(); + WriteObject( + extensionRefs == null ? null : extensionRefs.Select( + r => + { + GetExtensionValues(r); + DscPublicSettings publicSettings = null; + try + { + publicSettings = DscSettingsSerializer.DeserializePublicSettings(PublicConfiguration); + } + catch (JsonException e) + { + this.ThrowTerminatingError( + new ErrorRecord( + new JsonException( + String.Format( + CultureInfo.CurrentUICulture, + Properties.Resources.AzureVMDscWrongSettingsFormat, + PublicConfiguration), + e), + string.Empty, + ErrorCategory.ParserError, + null)); + } + var context = new VirtualMachineDscExtensionContext + { + ExtensionName = r.Name, + Publisher = r.Publisher, + ReferenceName = r.ReferenceName, + Version = r.Version, + State = r.State, + RoleName = VM.GetInstance().RoleName, + PublicConfiguration = PublicConfiguration, + PrivateConfiguration = SecureStringHelper.GetSecureString(PrivateConfiguration), + }; + + if (publicSettings == null) + { + context.ModulesUrl = string.Empty; + context.ConfigurationFunction = string.Empty; + context.Properties = null; + } + else + { + context.ModulesUrl = publicSettings.ModulesUrl; + context.ConfigurationFunction = publicSettings.ConfigurationFunction; + context.Properties = new Hashtable(publicSettings.Properties.ToDictionary( x => x.Name, x => x.Value )); + } + + return context; + } + + ).FirstOrDefault()); + } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + ExecuteCommand(); + } + } +} + diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/GetDscResourceException.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/GetDscResourceException.cs new file mode 100644 index 000000000000..fd8623d4db58 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/GetDscResourceException.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.DSC +{ + [Serializable] + public class GetDscResourceException : UnauthorizedAccessException + { + public GetDscResourceException(string resourceName, Exception e) : + base(String.Format(CultureInfo.CurrentUICulture, Resources.PublishVMDscExtensionGetDscResourceFailed, resourceName), e) { } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/PublishAzureVMDscConfiguration.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/PublishAzureVMDscConfiguration.cs new file mode 100644 index 000000000000..5ac9fb54e776 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/PublishAzureVMDscConfiguration.cs @@ -0,0 +1,446 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.DSC; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Auth; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + /// + /// Uploads a Desired State Configuration script to Azure blob storage, which + /// later can be applied to Azure Virtual Machines using the + /// Set-AzureVMDscExtension cmdlet. + /// + [Cmdlet(VerbsData.Publish, "AzureVMDscConfiguration", SupportsShouldProcess = true, DefaultParameterSetName = UploadArchiveParameterSetName)] + public class PublishAzureVMDscConfigurationCommand : ServiceManagementBaseCmdlet + { + private const string CreateArchiveParameterSetName = "CreateArchive"; + private const string UploadArchiveParameterSetName = "UploadArchive"; + + /// + /// Path to a file containing one or more configurations; the file can be a + /// PowerShell script (*.ps1) or MOF interface (*.mof). + /// + [Parameter(Mandatory = true, + Position = 0, + ValueFromPipeline = true, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Path to a file containing one or more configurations")] + [ValidateNotNullOrEmpty] + public string ConfigurationPath { get; set; } + + /// + /// Name of the Azure Storage Container the configuration is uploaded to. + /// + [Parameter( + ValueFromPipelineByPropertyName = true, + ParameterSetName = UploadArchiveParameterSetName, + HelpMessage = "Name of the Azure Storage Container the configuration is uploaded to")] + [ValidateNotNullOrEmpty] + public string ContainerName { get; set; } + + /// + /// By default Publish-AzureVMDscConfiguration will not overwrite any existing blobs. + /// Use -Force to overwrite them. + /// + [Parameter(HelpMessage = "By default Publish-AzureVMDscConfiguration will not overwrite any existing blobs")] + public SwitchParameter Force { get; set; } + + /// + /// The Azure Storage Context that provides the security settings used to upload + /// the configuration script to the container specified by ContainerName. This + /// context should provide write access to the container. + /// + [Parameter( + ValueFromPipelineByPropertyName = true, + ParameterSetName = UploadArchiveParameterSetName, + HelpMessage = "The Azure Storage Context that provides the security settings used to upload " + + "the configuration script to the container specified by ContainerName")] + [ValidateNotNullOrEmpty] + public AzureStorageContext StorageContext { get; set; } + + /// + /// Path to a local ZIP file to write the configuration archive to. + /// When using this parameter, Publish-AzureVMDscConfiguration creates a + /// local ZIP archive instead of uploading it to blob storage.. + /// + [Parameter( + ValueFromPipelineByPropertyName = true, + ParameterSetName = CreateArchiveParameterSetName, + HelpMessage = "Path to a local ZIP file to write the configuration archive to.")] + [ValidateNotNullOrEmpty] + public string ConfigurationArchivePath { get; set; } + + /// + /// Credentials used to access Azure Storage + /// + private StorageCredentials _storageCredentials; + + private const string Ps1FileExtension = ".ps1"; + private const string Psm1FileExtension = ".psm1"; + private const string ZipFileExtension = ".zip"; + private static readonly HashSet UploadArchiveAllowedFileExtensions = new HashSet(StringComparer.OrdinalIgnoreCase) { Ps1FileExtension, Psm1FileExtension, ZipFileExtension }; + private static readonly HashSet CreateArchiveAllowedFileExtensions = new HashSet(StringComparer.OrdinalIgnoreCase) { Ps1FileExtension, Psm1FileExtension}; + + private const int MinMajorPowerShellVersion = 4; + + private List _temporaryFilesToDelete = new List(); + private List _temporaryDirectoriesToDelete = new List(); + + protected override void ProcessRecord() + { + try + { + // Create a cloud context, only in case of upload. + if (this.ParameterSetName == UploadArchiveParameterSetName) + { + base.ProcessRecord(); + } + ExecuteCommand(); + } + finally + { + foreach (var file in this._temporaryFilesToDelete) + { + try + { + DeleteFile(file); + WriteVerbose(string.Format(CultureInfo.CurrentUICulture, Resources.PublishVMDscExtensionDeletedFileMessage, file)); + } + catch (Exception e) + { + WriteVerbose(string.Format(CultureInfo.CurrentUICulture, Resources.PublishVMDscExtensionDeleteErrorMessage, file, e.Message)); + } + } + foreach (var directory in this._temporaryDirectoriesToDelete) + { + try + { + DeleteDirectory(directory); + WriteVerbose(string.Format(CultureInfo.CurrentUICulture, Resources.PublishVMDscExtensionDeletedFileMessage, directory)); + } + catch (Exception e) + { + WriteVerbose(string.Format(CultureInfo.CurrentUICulture, Resources.PublishVMDscExtensionDeleteErrorMessage, directory, e.Message)); + } + } + } + } + + internal void ExecuteCommand() + { + ValidatePsVersion(); + ValidateParameters(); + PublishConfiguration(); + } + + protected void ValidatePsVersion() + { + using (System.Management.Automation.PowerShell powershell = System.Management.Automation.PowerShell.Create()) + { + powershell.AddScript("$PSVersionTable.PSVersion.Major"); + int major = powershell.Invoke().FirstOrDefault(); + if (major < MinMajorPowerShellVersion) + { + this.ThrowTerminatingError( + new ErrorRecord( + new InvalidOperationException( + string.Format(CultureInfo.CurrentUICulture, Resources.PublishVMDscExtensionRequiredPsVersion, MinMajorPowerShellVersion, major)), + "InvalidPowerShellVersion", + ErrorCategory.InvalidOperation, + null)); + } + } + } + + protected void ValidateParameters() + { + this.ConfigurationPath = this.GetUnresolvedProviderPathFromPSPath(this.ConfigurationPath); + if (!File.Exists(this.ConfigurationPath)) + { + this.ThrowInvalidArgumentError(Resources.PublishVMDscExtensionUploadArchiveConfigFileNotExist, this.ConfigurationPath); + } + + var configurationFileExtension = Path.GetExtension(this.ConfigurationPath); + + if (this.ParameterSetName == UploadArchiveParameterSetName) + { + // Check that ConfigurationPath points to a valid file + if (!File.Exists(this.ConfigurationPath)) + { + this.ThrowInvalidArgumentError(Resources.PublishVMDscExtensionConfigFileNotFound, this.ConfigurationPath); + } + if (!UploadArchiveAllowedFileExtensions.Contains(Path.GetExtension(configurationFileExtension))) + { + this.ThrowInvalidArgumentError(Resources.PublishVMDscExtensionUploadArchiveConfigFileInvalidExtension, this.ConfigurationPath); + } + + this._storageCredentials = this.GetStorageCredentials(this.StorageContext); + + if (this.ContainerName == null) + { + this.ContainerName = VirtualMachineDscExtensionCmdletBase.DefaultContainerName; + } + } + else if (this.ParameterSetName == CreateArchiveParameterSetName) + { + if (!CreateArchiveAllowedFileExtensions.Contains(Path.GetExtension(configurationFileExtension))) + { + this.ThrowInvalidArgumentError(Resources.PublishVMDscExtensionCreateArchiveConfigFileInvalidExtension, this.ConfigurationPath); + } + + this.ConfigurationArchivePath = this.GetUnresolvedProviderPathFromPSPath(this.ConfigurationArchivePath); + } + } + + /// + /// Publish the configuration and its modules + /// + protected void PublishConfiguration() + { + if (this.ParameterSetName == CreateArchiveParameterSetName) + { + this.ConfirmAction(true, string.Empty, Resources.AzureVMDscCreateArchiveAction, this.ConfigurationArchivePath, ()=> CreateConfigurationArchive()); + } + else + { + var archivePath = string.Compare(Path.GetExtension(this.ConfigurationPath), ZipFileExtension, StringComparison.OrdinalIgnoreCase) == 0 ? + this.ConfigurationPath + : + CreateConfigurationArchive(); + + UploadConfigurationArchive(archivePath); + } + } + + private string CreateConfigurationArchive() + { + WriteVerbose(String.Format(CultureInfo.CurrentUICulture, Resources.AzureVMDscParsingConfiguration, this.ConfigurationPath)); + ConfigurationParseResult parseResult = null; + try + { + parseResult = ConfigurationParsingHelper.ParseConfiguration(this.ConfigurationPath); + } + catch (GetDscResourceException e) + { + ThrowTerminatingError(new ErrorRecord(e, "CannotAccessDscResource", ErrorCategory.PermissionDenied, null)); + } + if (parseResult.Errors.Any()) + { + ThrowTerminatingError( + new ErrorRecord( + new ParseException( + String.Format( + CultureInfo.CurrentUICulture, + Resources.PublishVMDscExtensionStorageParserErrors, + this.ConfigurationPath, + String.Join("\n", parseResult.Errors.Select(error => error.ToString())))), + "DscConfigurationParseError", + ErrorCategory.ParserError, + null)); + } + List requiredModules = parseResult.RequiredModules; + WriteVerbose(String.Format(CultureInfo.CurrentUICulture, Resources.PublishVMDscExtensionRequiredModulesVerbose, String.Join(", ", requiredModules))); + + // Create a temporary directory for uploaded zip file + string tempZipFolder = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString()); + WriteVerbose(String.Format(CultureInfo.CurrentUICulture, Resources.PublishVMDscExtensionTempFolderVerbose, tempZipFolder)); + Directory.CreateDirectory(tempZipFolder); + this._temporaryDirectoriesToDelete.Add(tempZipFolder); + + // CopyConfiguration + string configurationName = Path.GetFileName(this.ConfigurationPath); + string configurationDestination = Path.Combine(tempZipFolder, configurationName); + WriteVerbose(String.Format( + CultureInfo.CurrentUICulture, + Resources.PublishVMDscExtensionCopyFileVerbose, + this.ConfigurationPath, + configurationDestination)); + File.Copy(this.ConfigurationPath, configurationDestination); + + // CopyRequiredModules + foreach (var module in requiredModules) + { + using (System.Management.Automation.PowerShell powershell = System.Management.Automation.PowerShell.Create()) + { + // Wrapping script in a function to prevent script injection via $module variable. + powershell.AddScript( + @"function Copy-Module([string]$module, [string]$tempZipFolder) + { + $mi = Get-Module -List -Name $module; + $moduleFolder = Split-Path -Parent $mi.Path; + Copy-Item -Recurse -Path $moduleFolder -Destination $tempZipFolder; + }" + ); + powershell.Invoke(); + powershell.Commands.Clear(); + powershell.AddCommand("Copy-Module") + .AddParameter("module", module) + .AddParameter("tempZipFolder", tempZipFolder); + WriteVerbose(String.Format( + CultureInfo.CurrentUICulture, + Resources.PublishVMDscExtensionCopyModuleVerbose, + module, + tempZipFolder)); + powershell.Invoke(); + } + } + + // + // Zip the directory + // + string archive; + + if (this.ParameterSetName == CreateArchiveParameterSetName) + { + archive = this.ConfigurationArchivePath; + + if (!this.Force && System.IO.File.Exists(archive)) + { + this.ThrowTerminatingError( + new ErrorRecord( + new UnauthorizedAccessException(string.Format(CultureInfo.CurrentUICulture, Resources.AzureVMDscArchiveAlreadyExists, archive)), + "FileAlreadyExists", + ErrorCategory.PermissionDenied, + null)); + } + } + else + { + archive = Path.Combine(Path.GetTempPath(), configurationName + ZipFileExtension); + this._temporaryFilesToDelete.Add(archive); + } + + if (File.Exists(archive)) + { + File.Delete(archive); + } + + System.IO.Compression.ZipFile.CreateFromDirectory(tempZipFolder, archive); + return archive; + } + + private void UploadConfigurationArchive(string archivePath) + { + CloudBlobContainer cloudBlobContainer = GetStorageContainer(); + + var blobName = Path.GetFileName(archivePath); + + CloudBlockBlob modulesBlob = cloudBlobContainer.GetBlockBlobReference(blobName); + + this.ConfirmAction(true, string.Empty, string.Format(CultureInfo.CurrentUICulture, Resources.AzureVMDscUploadToBlobStorageAction, archivePath), modulesBlob.Uri.AbsoluteUri, () => + { + if (!this.Force && modulesBlob.Exists()) + { + this.ThrowTerminatingError( + new ErrorRecord( + new UnauthorizedAccessException(string.Format(CultureInfo.CurrentUICulture, Resources.AzureVMDscStorageBlobAlreadyExists, modulesBlob.Uri.AbsoluteUri)), + "StorageBlobAlreadyExists", + ErrorCategory.PermissionDenied, + null)); + } + + modulesBlob.UploadFromFile(archivePath, FileMode.Open); + + WriteVerbose(string.Format(CultureInfo.CurrentUICulture, Resources.PublishVMDscExtensionArchiveUploadedMessage, modulesBlob.Uri.AbsoluteUri)); + }); + } + + private CloudBlobContainer GetStorageContainer() + { + var storageAccount = new CloudStorageAccount(this._storageCredentials, true); + var blobClient = storageAccount.CreateCloudBlobClient(); + CloudBlobContainer containerReference = blobClient.GetContainerReference(this.ContainerName); + containerReference.CreateIfNotExists(); + return containerReference; + } + + private static void DeleteFile(string path) + { + try + { + File.Delete(path); + } + catch (System.UnauthorizedAccessException) + { + // the exception may have occurred due to a read-only file + DeleteReadOnlyFile(path); + } + } + + /// + /// Turns off the ReadOnly attribute from the given file and then attemps to delete it + /// + private static void DeleteReadOnlyFile(string path) + { + var attributes = System.IO.File.GetAttributes(path); + + if ((attributes & FileAttributes.ReadOnly) != 0) + { + File.SetAttributes(path, attributes & ~FileAttributes.ReadOnly); + } + + File.Delete(path); + } + + private static void DeleteDirectory(string path) + { + try + { + Directory.Delete(path, true); + } + catch (System.UnauthorizedAccessException) + { + // the exception may have occurred due to a read-only file or directory + DeleteReadOnlyDirectory(path); + } + } + + /// + /// Recusively turns off the ReadOnly attribute from the given directory and then attemps to delete it + /// + private static void DeleteReadOnlyDirectory(string path) + { + var directory = new DirectoryInfo(path); + + foreach (var child in directory.GetDirectories()) + { + DeleteReadOnlyDirectory(child.FullName); + } + + foreach (var child in directory.GetFiles()) + { + DeleteReadOnlyFile(child.FullName); + } + + if ((directory.Attributes & FileAttributes.ReadOnly) != 0) + { + directory.Attributes &= ~FileAttributes.ReadOnly; + } + + directory.Delete(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/RemoveAzureVMDscExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/RemoveAzureVMDscExtension.cs new file mode 100644 index 000000000000..8eb06c29ca18 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/RemoveAzureVMDscExtension.cs @@ -0,0 +1,38 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + [Cmdlet(VerbsCommon.Remove, VirtualMachineDscExtensionCmdletNoun), + OutputType(typeof(IPersistentVM))] + public class RemoveAzureVMDscExtensionCommand : VirtualMachineDscExtensionCmdletBase + { + + internal void ExecuteCommand() + { + RemovePredicateExtensions(); + WriteObject(VM); + } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + ExecuteCommand(); + } + } +} + diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/ServiceManagementBaseCmdletExtentions.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/ServiceManagementBaseCmdletExtentions.cs new file mode 100644 index 000000000000..2b930f601209 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/ServiceManagementBaseCmdletExtentions.cs @@ -0,0 +1,85 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Storage.Auth; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.DSC +{ + static class ServiceManagementBaseCmdletExtentions + { + /// + /// Attempts to get the user's credentials from the given Storage Context or the current subscription, if the former is null. + /// Throws a terminating error if the credentials cannot be determined. + /// + public static StorageCredentials GetStorageCredentials(this ServiceManagementBaseCmdlet cmdlet, AzureStorageContext storageContext) + { + StorageCredentials credentials = null; + + if (storageContext != null) + { + credentials = storageContext.StorageAccount.Credentials; + } + else + { + var storageAccountName = cmdlet.CurrentContext.Subscription.GetProperty(AzureSubscription.Property.StorageAccount); + + if (!string.IsNullOrEmpty(storageAccountName)) + { + var keys = cmdlet.StorageClient.StorageAccounts.GetKeys(storageAccountName); + + if (keys != null) + { + var storageAccountKey = string.IsNullOrEmpty(keys.PrimaryKey) ? keys.SecondaryKey : keys.PrimaryKey; + + credentials = new StorageCredentials(storageAccountName, storageAccountKey); + } + } + } + + if (credentials == null) + { + cmdlet.ThrowTerminatingError( + new ErrorRecord( + new UnauthorizedAccessException(Resources.AzureVMDscDefaultStorageCredentialsNotFound), + "CredentialsNotFound", + ErrorCategory.PermissionDenied, + null)); + } + + if (string.IsNullOrEmpty(credentials.AccountName)) + { + cmdlet.ThrowInvalidArgumentError(Resources.AzureVMDscStorageContextMustIncludeAccountName); + } + + return credentials; + } + + public static void ThrowInvalidArgumentError(this ServiceManagementBaseCmdlet cmdlet, string format, params object[] args) + { + cmdlet.ThrowTerminatingError( + new ErrorRecord( + new ArgumentException(string.Format(CultureInfo.CurrentUICulture, format, args)), + "InvalidArgument", + ErrorCategory.InvalidArgument, + null)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/SetAzureVMDscExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/SetAzureVMDscExtension.cs new file mode 100644 index 000000000000..a460b4379118 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/SetAzureVMDscExtension.cs @@ -0,0 +1,377 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.DSC; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Auth; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + + [Cmdlet(VerbsCommon.Set, VirtualMachineDscExtensionCmdletNoun, SupportsShouldProcess = true)] + [OutputType(typeof(IPersistentVM))] + public class SetAzureVMDscExtensionCommand : VirtualMachineDscExtensionCmdletBase + { + /// + /// The Extension Reference Name + /// + [Parameter(ValueFromPipelineByPropertyName = true, HelpMessage = "The Extension Reference Name")] + [ValidateNotNullOrEmpty] + public override string ReferenceName { get; set; } + + /// + /// A hashtable specifying the arguments to the ConfigurationFunction. The keys + /// correspond to the parameter names and the values to the parameter values. + /// + [Parameter(ValueFromPipelineByPropertyName = true, + HelpMessage = "A hashtable specifying the arguments to the ConfigurationFunction")] + [ValidateNotNullOrEmpty] + public Hashtable ConfigurationArgument { get; set; } + + /// + /// Path to a .psd1 file that specifies the data for the Configuration. This + /// file must contain a hashtable with the items described in + /// http://technet.microsoft.com/en-us/library/dn249925.aspx. + /// + [Parameter(ValueFromPipelineByPropertyName = true, + HelpMessage = "Path to a .psd1 file that specifies the data for the Configuration")] + [ValidateNotNullOrEmpty] + public string ConfigurationDataPath { get; set; } + + /// + /// The name of the configuration archive that was previously uploaded by + /// Publish-AzureVMDSCConfiguration. This parameter must specify only the name + /// of the file, without any path. + /// A null value or empty string indicate that the VM extension should install DSC, + /// but not start any configuration + /// + [Parameter(Mandatory = true, Position = 1, ValueFromPipelineByPropertyName = true, + HelpMessage = + "The name of the configuration file that was previously uploaded by Publish-AzureVMDSCConfiguration")] + [AllowEmptyString] + [AllowNull] + public string ConfigurationArchive { get; set; } + + /// + /// Name of the configuration that will be invoked by the DSC Extension. The value of this parameter should be the name of one of the configurations + /// contained within the file specified by ConfigurationArchive. + /// + /// If omitted, this parameter will default to the name of the file given by the ConfigurationArchive parameter, excluding any extension, for example if + /// ConfigurationArchive is "SalesWebSite.ps1", the default value for ConfigurationName will be "SalesWebSite". + /// + [Parameter(ValueFromPipelineByPropertyName = true, + HelpMessage = "Name of the configuration that will be invoked by the DSC Extension")] + [ValidateNotNullOrEmpty] + public string ConfigurationName { get; set; } + + /// + /// Name of the Azure Storage Container where the configuration script is located. + /// + [Parameter(ValueFromPipelineByPropertyName = true, + HelpMessage = " Name of the Azure Storage Container where the configuration script is located")] + [ValidateNotNullOrEmpty] + public string ContainerName { get; set; } + + /// + /// By default Set-AzureVMDscExtension will not overwrite any existing blobs. Use -Force to overwrite them. + /// + [Parameter(HelpMessage = "Use this parameter to overwrite any existing blobs")] + public SwitchParameter Force { get; set; } + + /// + /// The Azure Storage Context that provides the security settings used to access the configuration script. This context should provide read access to the + /// container specified by ContainerName. + /// + [Parameter(ValueFromPipelineByPropertyName = true, + HelpMessage = + "The Azure Storage Context that provides the security settings used to access the configuration script") + ] + [ValidateNotNullOrEmpty] + public AzureStorageContext StorageContext { get; set; } + + /// + /// The specific version of the DSC extension that Set-AzureVMDSCExtension will + /// apply the settings to. If not given, it will default to "1.*" + /// + [Parameter(ValueFromPipelineByPropertyName = true, + HelpMessage = "The version of the DSC extension that Set-AzureVMDSCExtension will apply the settings to")] + [ValidateNotNullOrEmpty] + public override string Version { get; set; } + + /// + /// The DNS endpoint suffix for all storage services, e.g. "core.windows.net". + /// + [Parameter(ValueFromPipelineByPropertyName = true, HelpMessage = "The Storage Endpoint Suffix.")] + [ValidateNotNullOrEmpty] + public string StorageEndpointSuffix { get; set; } + + /// + /// Credentials used to access Azure Storage + /// + private StorageCredentials _storageCredentials; + + /// + /// Class represent info about uploaded Configuration. + /// + private class ConfigurationUris + { + public string SasToken { get; set; } + public string DataBlobUri { get; set; } + + public string ModulesUrl { get; set; } + } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + ExecuteCommand(); + } + + internal void ExecuteCommand() + { + ValidateParameters(); + + CreateConfiguration(); + + this.ConfirmAction( + true, + string.Empty, + string.Format( + CultureInfo.CurrentUICulture, + Resources.AzureVMDscApplyConfigurationAction, + this.ConfigurationName), + "VM", + () => + { + RemovePredicateExtensions(); + AddResourceExtension(); + }); + + WriteObject(VM); + } + + protected override void ValidateParameters() + { + base.ValidateParameters(); + + // + // Validate parameters + // + if (string.IsNullOrEmpty(this.ConfigurationArchive)) + { + if (this.ConfigurationName != null || this.ConfigurationArgument != null + || this.ConfigurationDataPath != null) + { + this.ThrowInvalidArgumentError(Resources.AzureVMDscNullArchiveNoConfiguragionParameters); + } + if (this.StorageContext != null || this.ContainerName != null || this.StorageEndpointSuffix != null) + { + this.ThrowInvalidArgumentError(Resources.AzureVMDscNullArchiveNoStorageParameters); + } + } + else + { + if (string.Compare( + Path.GetFileName(this.ConfigurationArchive), + this.ConfigurationArchive, + StringComparison.InvariantCultureIgnoreCase) != 0) + { + this.ThrowInvalidArgumentError(Resources.AzureVMDscConfigurationDataFileShouldNotIncludePath); + } + + if (this.ConfigurationDataPath != null) + { + this.ConfigurationDataPath = this.GetUnresolvedProviderPathFromPSPath(this.ConfigurationDataPath); + + if (!File.Exists(this.ConfigurationDataPath)) + { + this.ThrowInvalidArgumentError( + Resources.AzureVMDscCannotFindConfigurationDataFile, + this.ConfigurationDataPath); + } + if (string.Compare( + Path.GetExtension(this.ConfigurationDataPath), + ".psd1", + StringComparison.InvariantCultureIgnoreCase) != 0) + { + this.ThrowInvalidArgumentError(Resources.AzureVMDscInvalidConfigurationDataFile); + } + } + + this._storageCredentials = this.GetStorageCredentials(this.StorageContext); + + if (this.ConfigurationName == null) + { + this.ConfigurationName = Path.GetFileNameWithoutExtension(this.ConfigurationArchive); + } + + if (this.ContainerName == null) + { + this.ContainerName = DefaultContainerName; + } + } + + if (this.Version == null) + { + this.Version = DefaultExtensionVersion; + } + + if (this.ReferenceName == null) + { + this.ReferenceName = ExtensionPublishedName; + } + } + + /// + /// Uploading configuration data to blob storage. + /// + /// ConfigurationUris collection that represent artifacts of uploading + private ConfigurationUris UploadConfigurationDataToBlob() + { + // + // Get a reference to the container in blob storage + // + var storageAccount = string.IsNullOrEmpty(this.StorageEndpointSuffix) + ? new CloudStorageAccount(this._storageCredentials, true) + : new CloudStorageAccount( + this._storageCredentials, + this.StorageEndpointSuffix, + true); + + var blobClient = storageAccount.CreateCloudBlobClient(); + + var containerReference = blobClient.GetContainerReference(this.ContainerName); + + // + // Get a reference to the configuration blob and create a SAS token to access it + // + var blobAccessPolicy = new SharedAccessBlobPolicy() + { + SharedAccessExpiryTime = + DateTime.UtcNow.AddHours(1), + Permissions = SharedAccessBlobPermissions.Read + }; + + var configurationBlobName = this.ConfigurationArchive; + var configurationBlobReference = containerReference.GetBlockBlobReference(configurationBlobName); + var configurationBlobSasToken = configurationBlobReference.GetSharedAccessSignature(blobAccessPolicy); + + // + // Upload the configuration data to blob storage and get a SAS token + // + string configurationDataBlobUri = null; + + if (this.ConfigurationDataPath != null) + { + this.ConfirmAction( + true, + string.Empty, + string.Format( + CultureInfo.CurrentUICulture, + Resources.AzureVMDscUploadToBlobStorageAction, + this.ConfigurationDataPath), + configurationBlobReference.Uri.AbsoluteUri, + () => + { + var guid = Guid.NewGuid(); + // there may be multiple VMs using the same configuration + + var configurationDataBlobName = string.Format( + CultureInfo.InvariantCulture, + "{0}-{1}.psd1", + this.ConfigurationName, + guid); + + var configurationDataBlobReference = + containerReference.GetBlockBlobReference(configurationDataBlobName); + + if (!this.Force && configurationDataBlobReference.Exists()) + { + this.ThrowTerminatingError( + new ErrorRecord( + new UnauthorizedAccessException( + string.Format( + CultureInfo.CurrentUICulture, + Resources.AzureVMDscStorageBlobAlreadyExists, + configurationDataBlobName)), + "StorageBlobAlreadyExists", + ErrorCategory.PermissionDenied, + null)); + } + + configurationDataBlobReference.UploadFromFile(this.ConfigurationDataPath, FileMode.Open); + + var configurationDataBlobSasToken = + configurationDataBlobReference.GetSharedAccessSignature(blobAccessPolicy); + + configurationDataBlobUri = + configurationDataBlobReference.StorageUri.PrimaryUri.AbsoluteUri + + configurationDataBlobSasToken; + }); + } + return new ConfigurationUris() + { + ModulesUrl = configurationBlobReference.StorageUri.PrimaryUri.AbsoluteUri, + SasToken = configurationBlobSasToken, + DataBlobUri = configurationDataBlobUri + }; + } + + private void CreateConfiguration() + { + var publicSettings = new DscPublicSettings(); + var privateSettings = new DscPrivateSettings(); + publicSettings.ProtocolVersion = CurrentProtocolVersion; + + if (!string.IsNullOrEmpty(this.ConfigurationArchive)) + { + ConfigurationUris configurationUris = UploadConfigurationDataToBlob(); + + publicSettings.SasToken = configurationUris.SasToken; + publicSettings.ModulesUrl = configurationUris.ModulesUrl; + publicSettings.ConfigurationFunction = string.Format( + CultureInfo.InvariantCulture, + "{0}\\{1}", + Path.GetFileNameWithoutExtension(this.ConfigurationArchive), + this.ConfigurationName); + Tuple settings = + DscSettingsSerializer.SeparatePrivateItems(this.ConfigurationArgument); + publicSettings.Properties = settings.Item1; + privateSettings.Items = settings.Item2; + + privateSettings.DataBlobUri = configurationUris.DataBlobUri; + } + + // + // Define the public and private property bags that will be passed to the extension. + // + this.PublicConfiguration = DscSettingsSerializer.SerializePublicSettings(publicSettings); + // + // PrivateConfuguration contains sensitive data in a plain text. + // + this.PrivateConfiguration = DscSettingsSerializer.SerializePrivateSettings(privateSettings); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/VirtualMachineDscExtensionCmdletBase.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/VirtualMachineDscExtensionCmdletBase.cs new file mode 100644 index 000000000000..b1e1ffdb3789 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/VirtualMachineDscExtensionCmdletBase.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + public class VirtualMachineDscExtensionCmdletBase : VirtualMachineExtensionCmdletBase + { + internal static readonly string ExtensionPublishedNamespace = "Microsoft.Powershell"; + internal static readonly string ExtensionPublishedName = "DSC"; + internal static readonly string DefaultContainerName = "windows-powershell-dsc"; + internal static readonly string DefaultExtensionVersion = "1.*"; + internal static readonly Version CurrentProtocolVersion = new Version(2, 0, 0, 0); + + protected const string VirtualMachineDscExtensionCmdletNoun = "AzureVMDscExtension"; + + public VirtualMachineDscExtensionCmdletBase() + { + this.extensionName = ExtensionPublishedName; + this.publisherName = ExtensionPublishedNamespace; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/VirtualMachineDscExtensionContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/VirtualMachineDscExtensionContext.cs new file mode 100644 index 000000000000..7011b4153ee3 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/VirtualMachineDscExtensionContext.cs @@ -0,0 +1,25 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + public class VirtualMachineDscExtensionContext : VirtualMachineExtensionContext + { + public string ModulesUrl { get; set; } + public string ConfigurationFunction { get; set; } + public Hashtable Properties { get; set; } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Diagnostics/GetAzureVMDiagnosticsExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Diagnostics/GetAzureVMDiagnosticsExtension.cs new file mode 100644 index 000000000000..62be9deafc40 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Diagnostics/GetAzureVMDiagnosticsExtension.cs @@ -0,0 +1,63 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + [Cmdlet( + VerbsCommon.Get, + VirtualMachineDiagnosticsExtensionNoun, + DefaultParameterSetName = GetExtensionParamSetName), + OutputType( + typeof(VirtualMachineExtensionContext))] + public class GetAzureVMDiagnosticsExtensionCommand : VirtualMachineDiagnosticsExtensionCmdletBase + { + protected const string GetExtensionParamSetName = "GetDiagnosticsExtension"; + + internal void ExecuteCommand() + { + var extensionRefs = + string.IsNullOrEmpty(ReferenceName) && string.IsNullOrEmpty(ExtensionName) ? + ResourceExtensionReferences : GetPredicateExtensionList(); + + // show only those with namespace DiagnosticsExtensionNamespace + var extensions = extensionRefs == null ? null : extensionRefs + .Where( r => r.Publisher == DiagnosticsExtensionNamespace) + .Select( r => new VirtualMachineExtensionContext + { + ExtensionName = r.Name, + ReferenceName = r.ReferenceName, + Publisher = r.Publisher, + Version = r.Version, + State = r.State, + PublicConfiguration = IsLegacyExtension(r.Name, r.Publisher, r.Version) + ? GetConfiguration(r) : GetConfiguration(r, PublicTypeStr), + PrivateConfiguration = SecureStringHelper.GetSecureString(GetConfiguration(r, PrivateTypeStr)), + RoleName = VM.GetInstance().RoleName + }); + + WriteObject(extensions, true); + } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + ExecuteCommand(); + } + + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Diagnostics/RemoveAzureVMDiagnosticsExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Diagnostics/RemoveAzureVMDiagnosticsExtension.cs new file mode 100644 index 000000000000..d56a065df9f9 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Diagnostics/RemoveAzureVMDiagnosticsExtension.cs @@ -0,0 +1,46 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + [Cmdlet( + VerbsCommon.Remove, + VirtualMachineDiagnosticsExtensionNoun, + DefaultParameterSetName = RemoveDiagnosticExtensionParamSetName), + OutputType( + typeof(IPersistentVM))] + public class RemoveAzureVMDiagnosticsExtensionCommand : VirtualMachineDiagnosticsExtensionCmdletBase + { + protected const string RemoveDiagnosticExtensionParamSetName = "RemoveDiagnosticsExtension"; + + internal void ExecuteCommand() + { + // We do not support this cmdlet for now... + throw new NotSupportedException(); + + // RemovePredicateExtensions(); + // WriteObject(VM); + } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Diagnostics/SetAzureVMDiagnosticsExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Diagnostics/SetAzureVMDiagnosticsExtension.cs new file mode 100644 index 000000000000..8886bb05ada9 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Diagnostics/SetAzureVMDiagnosticsExtension.cs @@ -0,0 +1,235 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Management.Automation; +using System.Text; +using System.Xml; +using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + [Cmdlet( + VerbsCommon.Set, + VirtualMachineDiagnosticsExtensionNoun, + DefaultParameterSetName = SetExtParamSetName), + OutputType( + typeof(IPersistentVM))] + public class SetAzureVMDiagnosticsExtensionCommand : VirtualMachineDiagnosticsExtensionCmdletBase + { + protected const string SetExtParamSetName = "SetDiagnosticsExtension"; + protected const string SetExtRefParamSetName = "SetDiagnosticsWithReferenceExtension"; + private const string PublicConfigurationTemplate = "\"xmlCfg\":\"{0}\", \"StorageAccount\":\"{1}\" "; + private readonly string PrivateConfigurationTemplate = "\"storageAccountName\":\"{0}\", \"storageAccountKey\":\"{1}\", \"storageAccountEndPoint\":\"{2}\""; + private readonly string XmlNamespace = "http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration"; + [Parameter( + ParameterSetName = SetExtParamSetName, + Mandatory = true, + Position = 0, + ValueFromPipelineByPropertyName = false, + HelpMessage = "XML Diagnostics Configuration")] + [Parameter( + ParameterSetName = SetExtRefParamSetName, + Mandatory = true, + Position = 0, + ValueFromPipelineByPropertyName = false, + HelpMessage = "XML Diagnostics Configuration")] + [ValidateNotNullOrEmpty] + public string DiagnosticsConfigurationPath + { + get; + set; + } + + [Parameter(ParameterSetName = SetExtParamSetName, + Position = 1, + ValueFromPipelineByPropertyName = true, + Mandatory = true, + HelpMessage = "The storage connection context")] + [Parameter(ParameterSetName = SetExtRefParamSetName, + Position = 1, + ValueFromPipelineByPropertyName = true, + Mandatory = true, + HelpMessage = "The storage connection context")] + [ValidateNotNullOrEmpty] + public AzureStorageContext StorageContext + { + get; + set; + } + + + [Parameter( + ParameterSetName = SetExtParamSetName, + Position = 2, + ValueFromPipelineByPropertyName = false, + HelpMessage = "WAD Version")] + [Parameter( + ParameterSetName = SetExtRefParamSetName, + Position = 2, + ValueFromPipelineByPropertyName = false, + HelpMessage = "WAD Version")] + public override string Version { get; set; } + + [Parameter( + ParameterSetName = SetExtParamSetName, + Position = 3, + ValueFromPipelineByPropertyName = true, + HelpMessage = "To Set the Extension State to 'Disable'.")] + [Parameter( + ParameterSetName = SetExtRefParamSetName, + Position = 3, + ValueFromPipelineByPropertyName = true, + HelpMessage = "To Set the Extension State to 'Disable'.")] + public override SwitchParameter Disable { get; set; } + + [Parameter( + ParameterSetName = SetExtRefParamSetName, + Position = 4, + ValueFromPipelineByPropertyName = true, + HelpMessage = "To specify the reference name.")] + public override string ReferenceName { get; set; } + + internal void ExecuteCommand() + { + ValidateParameters(); + RemovePredicateExtensions(); + AddResourceExtension(); + WriteObject(VM); + UpdateAzureVMCommand cmd = new UpdateAzureVMCommand(); + } + + protected override void ValidateParameters() + { + base.ValidateParameters(); + ValidateStorageAccount(); + ValidateConfiguration(); + ExtensionName = DiagnosticsExtensionType; + Publisher = DiagnosticsExtensionNamespace; + } + + private void ValidateStorageAccount() + { + StorageAccountName = StorageContext.StorageAccountName; + StorageKey = GetStorageKey(); + // We need the suffix, NOT the full account endpoint. + Endpoint = "https://" + StorageContext.EndPointSuffix; + } + + private void ValidateConfiguration() + { + // Public configuration must look like: + // { "xmlCfg":"base-64 encoded string", "StorageAccount":"account_name", "localResourceDirectory":{ "path":"some_path", "expandResourceDirectory": }} + // + // localResourceDirectory is optional + // + // What we have in is something like: + // + // + // + // + // ... + // + // element and extract it + string fullConfig = sr.ReadToEnd(); + int wadCfgBeginIndex = fullConfig.IndexOf(""); + if (wadCfgBeginIndex == -1) + { + throw new ArgumentException(Resources.IaasDiagnosticsBadConfigNoWadCfg); + } + + int wadCfgEndIndex = fullConfig.IndexOf(""); + if(wadCfgEndIndex == -1) + { + throw new ArgumentException(Resources.IaasDiagnosticsBadConfigNoEndWadCfg); + } + + if(wadCfgEndIndex <= wadCfgBeginIndex) + { + throw new ArgumentException(Resources.IaasDiagnosticsBadConfigNoMatchingWadCfg); + } + + config = fullConfig.Substring(wadCfgBeginIndex, wadCfgEndIndex + "".Length - wadCfgBeginIndex); + config = Convert.ToBase64String(Encoding.UTF8.GetBytes(config.ToCharArray())); + } + + // Now extract the local resource directory element + XmlDocument doc = new XmlDocument(); + XmlNamespaceManager ns = new XmlNamespaceManager(doc.NameTable); + ns.AddNamespace("ns", XmlNamespace); + doc.Load(DiagnosticsConfigurationPath); + var node = doc.SelectSingleNode("//ns:LocalResourceDirectory", ns); + string localDirectory = (node != null && node.Attributes != null) ? node.Attributes["path"].Value : null; + string localDirectoryExpand = (node != null && node.Attributes != null) ? node.Attributes["expandEnvironment"].Value : null; + if (localDirectoryExpand == "0") + { + localDirectoryExpand = "false"; + } + if (localDirectoryExpand == "1") + { + localDirectoryExpand = "true"; + } + + PublicConfiguration = "{ "; + PublicConfiguration += string.Format(PublicConfigurationTemplate, config, StorageAccountName); + + if (!string.IsNullOrEmpty(localDirectory)) + { + PublicConfiguration += ", \"localResourceDirectory\":{ \"path\":\"" + localDirectory + "\", \"expandResourceDirectory\":" + localDirectoryExpand + "}"; + } + + PublicConfiguration += "}"; + + // Private configuration must look like: + // { "storageAccountName":"your_account_name", "storageAccountKey":"your_key", "storageAccountEndPoint":"end_point" } + PrivateConfiguration = "{ "; + PrivateConfiguration += string.Format(PrivateConfigurationTemplate, StorageAccountName, StorageKey, Endpoint); + PrivateConfiguration += "}"; + } + + protected string GetStorageKey() + { + string storageKey = string.Empty; + + if (!string.IsNullOrEmpty(StorageAccountName)) + { + var storageAccount = this.StorageClient.StorageAccounts.Get(StorageAccountName); + if (storageAccount != null) + { + var keys = this.StorageClient.StorageAccounts.GetKeys(StorageAccountName); + if (keys != null) + { + storageKey = !string.IsNullOrEmpty(keys.PrimaryKey) ? keys.PrimaryKey : keys.SecondaryKey; + } + } + } + + return storageKey; + } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + ExecuteCommand(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Diagnostics/VirtualMachineDiagnosticsExtensionCmdletBase.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Diagnostics/VirtualMachineDiagnosticsExtensionCmdletBase.cs new file mode 100644 index 000000000000..d8e0b599439d --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Diagnostics/VirtualMachineDiagnosticsExtensionCmdletBase.cs @@ -0,0 +1,33 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + public class VirtualMachineDiagnosticsExtensionCmdletBase : VirtualMachineExtensionCmdletBase + { + protected const string DiagnosticsExtensionNamespace = "Microsoft.Azure.Diagnostics"; + protected const string DiagnosticsExtensionType = "IaaSDiagnostics"; + protected const string VirtualMachineDiagnosticsExtensionNoun = "AzureVMDiagnosticsExtension"; + + protected string StorageAccountName { get; set; } + protected string StorageKey { get; set; } + protected string Endpoint { get; set; } + + public VirtualMachineDiagnosticsExtensionCmdletBase() + : base() + { + + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/MicrosoftAntimalware/GetAzureVMMicrosoftAntimalwareExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/MicrosoftAntimalware/GetAzureVMMicrosoftAntimalwareExtension.cs new file mode 100644 index 000000000000..0fa08898803e --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/MicrosoftAntimalware/GetAzureVMMicrosoftAntimalwareExtension.cs @@ -0,0 +1,74 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.MicrosoftAntimalware +{ + using System.Collections.Generic; + using System.Linq; + using System.Management.Automation; + + [Cmdlet( + VerbsCommon.Get, + VirtualMachineMicrosoftAntimalwareExtensionNoun, + DefaultParameterSetName = GetMicrosoftAntimalwareExtensionParamSetName), + OutputType( + typeof(IEnumerable))] + public class GetAzureVMMicrosoftAntimalwareExtension : VirtualMachineMicrosoftAntimalwareExtensionCmdletBase + { + protected const string GetMicrosoftAntimalwareExtensionParamSetName = "GetMicrosoftAntimalwareExtension"; + + internal void ExecuteCommand() + { + // extract plain text version of diagnostics configuration if it exists + Publisher = DiagnosticsExtensionNamespace; + ExtensionName = DiagnosticsExtensionName; + ReferenceName = DiagnosticsExtensionReferenceName; + string tmpDiagnosticsConfig = null; + var ext = GetDiagnosticsExtensionContext(); + if (ext != null) + { + tmpDiagnosticsConfig = ext.AntimalwareMonitoringConfiguration; + } + + // extract antimalware extension and add plain xml configs prior to write + Publisher = MicrosoftAntimalwareExtensionNamespace; + ExtensionName = MicrosoftAntimalwareExtensionName; + ReferenceName = MicrosoftAntimalwareExtensionReferenceName; + var extensionRefs = + string.IsNullOrEmpty(ReferenceName) && string.IsNullOrEmpty(ExtensionName) ? + ResourceExtensionReferences : GetPredicateExtensionList(); + + WriteObject( + extensionRefs == null ? null : extensionRefs.Select( + r => new VirtualMachineMicrosoftAntimalwareExtensionContext + { + ExtensionName = r.Name, + Publisher = r.Publisher, + ReferenceName = r.ReferenceName, + Version = r.Version, + PublicConfiguration = IsLegacyExtension(r.Name, r.Publisher, r.Version) ? GetConfiguration(r) : GetConfiguration(r, PublicTypeStr), + State = r.State, + AntimalwareMonitoringConfiguration = tmpDiagnosticsConfig, + }).Where( + r => r.ExtensionName == VirtualMachineMicrosoftAntimalwareExtensionCmdletBase.MicrosoftAntimalwareExtensionName + ).FirstOrDefault()); + } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/MicrosoftAntimalware/RemoveAzureVMMicrosoftAntimalwareExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/MicrosoftAntimalware/RemoveAzureVMMicrosoftAntimalwareExtension.cs new file mode 100644 index 000000000000..7bd00c7a89a4 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/MicrosoftAntimalware/RemoveAzureVMMicrosoftAntimalwareExtension.cs @@ -0,0 +1,51 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.MicrosoftAntimalware +{ + using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + using System.Management.Automation; + + [Cmdlet( + VerbsCommon.Remove, + VirtualMachineMicrosoftAntimalwareExtensionNoun, + DefaultParameterSetName = RemoveMicrosoftAntimalwareExtensionParamSetName), + OutputType(typeof(IPersistentVM))] + public class RemoveAzureVMMicrosoftAntimalwareExtensionCommand : VirtualMachineMicrosoftAntimalwareExtensionCmdletBase + { + protected const string RemoveMicrosoftAntimalwareExtensionParamSetName = "RemoveMicrosoftAntimalwareExtension"; + + internal void ExecuteCommand() + { + // if diagnostics extension exists, remove any existing antimalware monitoring section from the configuration + InitializeMonitoringSettings(); + RemoveExistingAntimalwareMonitoringConfig(); + + // mark antimalware extension for uninstall + InitializeAntimalwareSettings(); + Uninstall = true; + RemovePredicateExtensions(); + AddResourceExtension(); + + WriteObject(VM); + } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + ExecuteCommand(); + } + } +} + diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/MicrosoftAntimalware/SetAzureVMMicrosoftAntimalwareExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/MicrosoftAntimalware/SetAzureVMMicrosoftAntimalwareExtension.cs new file mode 100644 index 000000000000..b7d42dcd3cd0 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/MicrosoftAntimalware/SetAzureVMMicrosoftAntimalwareExtension.cs @@ -0,0 +1,383 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.MicrosoftAntimalware +{ + using Microsoft.WindowsAzure.Commands.Common.Storage; + using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + using System; + using System.IO; + using System.Management.Automation; + using System.Xml; + using Newtonsoft.Json.Schema; + using Newtonsoft.Json.Linq; + + [Cmdlet( + VerbsCommon.Set, + VirtualMachineMicrosoftAntimalwareExtensionNoun, + DefaultParameterSetName = EnableMicrosoftAntimalwareExtensionJsonConfigFilePathParamSetName), + OutputType(typeof(IPersistentVM))] + public class SetAzureVMMicrosoftAntimalwareExtensionCommand : VirtualMachineMicrosoftAntimalwareExtensionCmdletBase + { + public const string EnableMicrosoftAntimalwareExtensionJsonConfigParamSetName = "EnableMicrosoftAntimalwareExtensionJsonConfig"; + public const string EnableMicrosoftAntimalwareExtensionJsonConfigFilePathParamSetName = "EnableMicrosoftAntimalwareExtensionJsonConfigFilePath"; + public const string DisableMicrosoftAntimalwareExtensionParamSetName = "DisableMicrosoftAntimalwareExtension"; + public const string UninstallMicrosoftAntimalwareExtensionParamSetName = "UninstallMicrosoftAntimalwareExtension"; + public const string AdjustMonitoringWithNoConfigParamSetName = "ConfigureMicrosoftAntimalwareMonitoring"; + + [Parameter( + ParameterSetName = EnableMicrosoftAntimalwareExtensionJsonConfigParamSetName, + Mandatory = true, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Microsoft Antimalware JSON Configuration")] + [ValidateNotNullOrEmpty] + public override string AntimalwareConfiguration { get; set; } + + [Parameter( + ParameterSetName = EnableMicrosoftAntimalwareExtensionJsonConfigFilePathParamSetName, + Mandatory = true, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Microsoft Antimalware JSON Configuration File Path")] + [ValidateNotNullOrEmpty] + public override string AntimalwareConfigFile { get; set; } + + [Parameter( + ParameterSetName = EnableMicrosoftAntimalwareExtensionJsonConfigParamSetName, + Mandatory = false, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Version")] + [Parameter( + ParameterSetName = EnableMicrosoftAntimalwareExtensionJsonConfigFilePathParamSetName, + Mandatory = false, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Version")] + [Parameter( + ParameterSetName = DisableMicrosoftAntimalwareExtensionParamSetName, + Mandatory = false, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Version")] + [ValidateNotNullOrEmpty] + public override string Version { get; set; } + + [Parameter( + ParameterSetName = DisableMicrosoftAntimalwareExtensionParamSetName, + Mandatory = false, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Disable VM Microsoft Antimalware Extension")] + public override SwitchParameter Disable { get; set; } + + [Parameter( + ParameterSetName = UninstallMicrosoftAntimalwareExtensionParamSetName, + Mandatory = true, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Uninstall VM Microsoft Antimalware Extension")] + public override SwitchParameter Uninstall { get; set; } + + [Parameter( + ParameterSetName = AdjustMonitoringWithNoConfigParamSetName, + Mandatory = true, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Microsoft Antimalware Event Monitoring (ON/OFF)")] + [Parameter( + ParameterSetName = EnableMicrosoftAntimalwareExtensionJsonConfigParamSetName, + Mandatory = false, + Position = 3, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Microsoft Antimalware Event Monitoring (ON/OFF)")] + [Parameter( + ParameterSetName = EnableMicrosoftAntimalwareExtensionJsonConfigFilePathParamSetName, + Mandatory = false, + Position = 3, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Microsoft Antimalware Event Monitoring (ON/OFF)")] + [ValidateSet("ON", "OFF", IgnoreCase = true)] + public string Monitoring { get; set; } + + [Parameter( + ParameterSetName = AdjustMonitoringWithNoConfigParamSetName, + Mandatory = false, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Microsoft Antimalware Monitoring Storage Context")] + [Parameter( + ParameterSetName = EnableMicrosoftAntimalwareExtensionJsonConfigParamSetName, + Mandatory = false, + Position = 4, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Microsoft Antimalware Monitoring Storage Context")] + [Parameter( + ParameterSetName = EnableMicrosoftAntimalwareExtensionJsonConfigFilePathParamSetName, + Mandatory = false, + Position = 4, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Microsoft Antimalware Monitoring Storage Context")] + [ValidateNotNullOrEmpty] + public override AzureStorageContext StorageContext { get; set; } + + [Parameter( + ParameterSetName = AdjustMonitoringWithNoConfigParamSetName, + Mandatory = true, + Position = 3, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Specify -NoConfig to change monitoring status (on/off) without having to provide a new antimalware configuration")] + public override SwitchParameter NoConfig { get; set; } + + private bool isAntimalwareEnabled = false; // do not enable antimalware unless specified in configuration or parameters + private enum MonitoringActionType { Enable, Disable, NoActionRequested } ; + private MonitoringActionType monitoringAction = MonitoringActionType.NoActionRequested; // default to no action requested until identified in config or parameter + + internal void ExecuteCommand() + { + ValidateParameters(); + + // configure diagnostics extension + InitializeMonitoringSettings(); + switch (monitoringAction) + { + // enable and disable are expected to update the diagnostics extension if needed + // resource extension will be added by EnableMonitoring or RemoveExistingAntimalwareMonitoringConfig as needed + case MonitoringActionType.Enable: EnableMonitoring(); break; + case MonitoringActionType.Disable: RemoveExistingAntimalwareMonitoringConfig(); break; + default: break; + } + + // configure antimalware extension (unless -NoConfig was specified) + if (!base.ParameterSetName.Equals(AdjustMonitoringWithNoConfigParamSetName)) + { + InitializeAntimalwareSettings(); + RemovePredicateExtensions(); + AddResourceExtension(); + } + + WriteObject(VM); + } + + + protected override void ValidateParameters() + { + base.ValidateParameters(); + ValidateConfiguration(); + this.ReferenceName = string.IsNullOrEmpty(this.ReferenceName) ? MicrosoftAntimalwareExtensionName : this.ReferenceName; + this.Version = this.Version ?? MicrosoftAntimalwareExtensionDefaultVersion; + this.PublicConfiguration = AntimalwareConfiguration; + } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + ExecuteCommand(); + } + + protected void ValidateConfiguration() + { + // if no AntimalwareConfiguration XmlDocument was provided, use the AntimalwareConfigFile parameter + if ((AntimalwareConfiguration == null) && (AntimalwareConfigFile != null)) + { + if ((!string.IsNullOrWhiteSpace(AntimalwareConfigFile)) && File.Exists(AntimalwareConfigFile)) + { + AntimalwareConfiguration = File.ReadAllText(AntimalwareConfigFile); + } + else + { + ThrowTerminatingError(new ErrorRecord( + new Exception("ServiceExtensionCannotFindAntimalwareConfigFile"), + string.Empty, + ErrorCategory.InvalidData, + null)); + } + } + + // validate json schema and check for antimalwareenabled value + if (AntimalwareConfiguration != null) + { + JsonSchema v2Schema = JsonSchema.Parse(MicrosoftAntimalwareConfigJsonSchema); + JObject json = JObject.Parse(AntimalwareConfiguration); + + if (json.IsValid(v2Schema)) + { + JToken tok; + if (json != null) + { + if (json.TryGetValue("AntimalwareEnabled", out tok)) + { + isAntimalwareEnabled = (bool)tok; + } + } + } + else + { + ThrowTerminatingError(new ErrorRecord( + new Exception("ServiceExtensionAntimalwareJsonConfigFailedSchemaValidation"), + string.Empty, + ErrorCategory.InvalidData, + null)); + } + } + + // error no configuration was provided - error if this is not a case of disable, uninstall, or noconfig + if ( !isAntimalwareEnabled && + ((!( (Disable.IsPresent && Disable.ToBool()) || + (Uninstall.IsPresent && Uninstall.ToBool()) || + (NoConfig.IsPresent && NoConfig.ToBool()))))) + { + ThrowTerminatingError(new ErrorRecord( + new Exception("JSON configuration is required and must specify \"AntimalwareEnabled\"=true"), + string.Empty, + ErrorCategory.InvalidData, + null)); + } + + // process Monitoring parameter if specified + if (Monitoring != null) + { + switch (Monitoring.ToUpperInvariant()) + { + case "ON": monitoringAction = MonitoringActionType.Enable; break; + case "OFF": monitoringAction = MonitoringActionType.Disable; break; + default: break; + } + } + } + + private void AddNewAntimalwareMonitoringConfig() + { + InitializeMonitoringSettings(); + RemovePredicateExtensions(); + AddResourceExtension(); + } + + private void MergeAntimalwareMonitoringIntoExistingConfig(string existingConfigXmlStr, string existingReferenceName) + { + // prepare a new xml document to hold the merged config + XmlDocument mergedConfig = new XmlDocument(); + // add root element back to xml string (not preserved by diagnostics extension) + string tmpXmlString = string.Format("{1}", DiagnosticsConfigXmlNamespace, existingConfigXmlStr); + mergedConfig.LoadXml(tmpXmlString); + + // check if old config already contains a WindowsEventLog section + string targetNode; + string mergeXmlStr; + if (existingConfigXmlStr.Contains(DiagnosticsConfigWindowsEventLogNodeName)) + { + // inject into the existing windows event log section + targetNode = DiagnosticsConfigWindowsEventLogNodeName; + mergeXmlStr = DiagnosticsDefaultConfigMergeXmlWithExistingEventLogNode; + } + else + { + // inject a windows event log section with antimalware monitoring into the diagnostics config + targetNode = DiagnosticsConfigNodeName; + mergeXmlStr = DiagnosticsDefaultConfigMergeXmlWithoutExistingEventLogNode; + } + + // locate the desired target using xpath + string diagXPathStr = String.Format("//*[local-name()='{0}' and namespace-uri()='{1}']", targetNode, DiagnosticsConfigXmlNamespace); + XmlNode diagNode = mergedConfig.DocumentElement.SelectSingleNode(diagXPathStr); + + // create an import node and then append to the correct location + XmlDocument diagnosticsConfigXml = new XmlDocument(); + diagnosticsConfigXml.LoadXml(mergeXmlStr); + + XmlNode importNode = mergedConfig.ImportNode(diagnosticsConfigXml.DocumentElement, true); + diagNode.AppendChild(importNode); + + // remove any stray xmlns="" attribute from xml string prior to use + string mergedConfiguration = mergedConfig.DocumentElement.InnerXml; + mergedConfiguration = mergedConfiguration.Replace(string.Format(" xmlns=\"{0}\"", DiagnosticsConfigXmlNamespace), ""); + mergedConfiguration = mergedConfiguration.Replace(" xmlns=\"\"", ""); + + // now add extension using the new configuration + PublicConfiguration = GetJsonEncodedDiagnosticsPublicConfig(mergedConfiguration); + PrivateConfiguration = GetJsonEncodedDiagnosticsPrivateConfig(); + RemovePredicateExtensions(); + AddResourceExtension(); + } + + protected void EnableMonitoring() + { + // retrieve any pre-existing diagnostics extension + var ext = GetDiagnosticsExtensionContext(); + + if ((ext == null) && + ((monitoringAction == MonitoringActionType.Disable) || (monitoringAction == MonitoringActionType.NoActionRequested))) + { + // if there was no pre-existing diagnostics extension there is + // nothing to do in either of these two cases so exit early + + // note the user may not have provided a storage account either + // so this check is performed prior to storage account validation + return; + } + + // establish the storage account name to be associated with monitoring + if (!IsValidStorageContext()) + { + // no valid storage context exists, initialize storage context using config value + InitializeStorageContext(monitoringStorageAccountName); + } + + switch (monitoringAction) + { + case (MonitoringActionType.Enable): + if (ext == null) + { + AddNewAntimalwareMonitoringConfig(); + } + else + { + // extension already exists, check to see if it already contains antimalware data source + if (!ext.AntimalwareMonitoringConfiguration.Contains(DiagnosticsConfigAntimalwareProviderToken)) + { + // antimalware data source is not already in the configuration, merge it + // with existing config (tracking perf counters, other event logs, etc.) + MergeAntimalwareMonitoringIntoExistingConfig(ext.AntimalwareMonitoringConfiguration, ext.ReferenceName); + } + else + { + // no modification required in this case so persist the last xml + // configuration and set to the currently specified storage account + // (this may be a transition to a new storage account from previous) + string persistedXmlCfg = GetXmlCfgFromJson(ext.PublicConfiguration); + PublicConfiguration = GetJsonEncodedDiagnosticsPublicConfig(persistedXmlCfg); + PrivateConfiguration = GetJsonEncodedDiagnosticsPrivateConfig(); + RemovePredicateExtensions(); + AddResourceExtension(); + } + } + break; + + case (MonitoringActionType.Disable): + if (ext != null) + { + RemoveExistingAntimalwareMonitoringConfig(); + } + break; + + case (MonitoringActionType.NoActionRequested): + break; + + default: + break; + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/MicrosoftAntimalware/VirtualMachineMicrosoftAntimalwareExtensionCmdletBase.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/MicrosoftAntimalware/VirtualMachineMicrosoftAntimalwareExtensionCmdletBase.cs new file mode 100644 index 000000000000..31f813f229c6 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/MicrosoftAntimalware/VirtualMachineMicrosoftAntimalwareExtensionCmdletBase.cs @@ -0,0 +1,347 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.MicrosoftAntimalware +{ + using Microsoft.WindowsAzure.Commands.Common.Storage; + using System; + using System.IO; + using System.Linq; + using System.Management.Automation; + using System.Text; + using System.Xml; + using WindowsAzure.Storage; + using WindowsAzure.Storage.Auth; + using Newtonsoft.Json.Schema; + using Newtonsoft.Json.Linq; + + public class VirtualMachineMicrosoftAntimalwareExtensionCmdletBase : VirtualMachineExtensionCmdletBase + { + // Microsoft Antimalware + protected const string VirtualMachineMicrosoftAntimalwareExtensionNoun = "AzureVMMicrosoftAntimalwareExtension"; + protected const string MicrosoftAntimalwareExtensionNamespace = "Microsoft.Azure.Security"; + protected const string MicrosoftAntimalwareExtensionName = "IaaSAntimalware"; + protected const string MicrosoftAntimalwareExtensionReferenceName = "IaaSAntimalware"; + protected const string MicrosoftAntimalwareExtensionDefaultVersion = "1.*"; + protected const string MicrosoftAntimalwareExtensionPublicConfigurationTemplate = "{{ \"xmlCfg\": \"{0}\" }}"; + public virtual string AntimalwareConfigFile { get; set; } + public virtual string AntimalwareConfiguration { get; set; } + protected const string MicrosoftAntimalwareConfigJsonSchema = @" +{ + ""runtimeSettings"": [{ + ""handlerSettings"": { + ""publicSettings"": { + ""title"": ""MicrosoftAntimalwareConfig"", + ""description"": ""Microsoft Antimalware Configuration"", + ""type"": ""object"", + ""properties"": { + ""AntimalwareEnabled"": { ""type"": ""boolean"", ""required"" : true }, + ""RealtimeProtectionEnabled"": { ""type"": ""boolean"" }, + ""ScheduledScanSettings"": { + ""type"": ""object"", + ""properties"": { + ""isEnabled"": { ""type"": ""boolean""}, + ""day"": {""type"": ""integer""}, + ""time"": {""type"": ""integer""}, + ""scanType"": {""type"": ""string""} + }, + ""additionalProperties"": false + }, + ""Exclusions"": { + ""type"": ""object"", + ""properties"": { + ""Extensions"": {""type"": ""string""}, + ""Paths"": {""type"": ""string""}, + ""Processes"": {""type"": ""string""} + }, + ""additionalProperties"": false + }, + }, + ""additionalProperties"": false + } + } + }] +}"; + + // Microsoft Diagnostics + protected const string DiagnosticsExtensionNamespace = "Microsoft.Azure.Diagnostics"; + protected const string DiagnosticsExtensionName = "IaaSDiagnostics"; + protected const string DiagnosticsExtensionReferenceName = "IaaSDiagnostics"; + protected const string DiagnosticsExtensionDefaultVersion = "1.*"; + protected const string DiagnosticsConfigXmlNamespace = @"http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration"; + protected const string DiagnosticsConfigNodeName = "DiagnosticMonitorConfiguration"; + protected const string DiagnosticsConfigAntimalwareProviderToken = @"Microsoft Antimalware"; + protected const string DiagnosticsConfigWindowsEventLogNodeName = @"WindowsEventLog"; + protected const string StorageNameAttrStr = "name"; + + protected const string DiagnosticsDefaultConfigNewXmlStr = @""; + protected const string DiagnosticsDefaultConfigMergeXmlWithoutExistingEventLogNode = @""; + protected const string DiagnosticsDefaultConfigMergeXmlWithExistingEventLogNode = @""; + + protected const string DiagnosticsPublicConfigFormatStr = @"{{ ""xmlCfg"":""{0}"", ""StorageAccount"":""{1}"" }}"; + protected const string DiagnosticsPrivateConfigFormatStr = @"{{ ""storageAccountName"":""{0}"",""storageAccountKey"":""{1}"",""storageAccountEndPoint"":""{2}""}}"; + public virtual XmlDocument AntimalwareMonitoringConfig { get; set; } + public virtual AzureStorageContext StorageContext { get; set; } + protected string monitoringStorageAccountName; // temporarily stores account name if provided in config file + + // NoConfig parameter allows the caller to turn monitoring on or off without specifying a config + public virtual SwitchParameter NoConfig { get; set; } + + protected void InitializeAntimalwareSettings() + { + Publisher = MicrosoftAntimalwareExtensionNamespace; + ExtensionName = MicrosoftAntimalwareExtensionName; + ReferenceName = MicrosoftAntimalwareExtensionReferenceName; + Version = this.Version ?? MicrosoftAntimalwareExtensionDefaultVersion; + + PublicConfiguration = AntimalwareConfiguration; + PrivateConfiguration = null; + } + + protected void InitializeMonitoringSettings() + { + Publisher = DiagnosticsExtensionNamespace; + ExtensionName = DiagnosticsExtensionName; + ReferenceName = DiagnosticsExtensionReferenceName; + Version = this.Version ?? DiagnosticsExtensionDefaultVersion; + PublicConfiguration = GetJsonEncodedDiagnosticsPublicConfig(); + PrivateConfiguration = GetJsonEncodedDiagnosticsPrivateConfig(); + } + + protected string GetJsonEncodedDiagnosticsPublicConfig() + { + return GetJsonEncodedDiagnosticsPublicConfig(DiagnosticsDefaultConfigNewXmlStr); + } + + protected string GetJsonEncodedDiagnosticsPublicConfig(string wadCfgXml) + { + if (!string.IsNullOrWhiteSpace(wadCfgXml)) + { + // initialize storage context + if (!IsValidStorageContext() && !string.IsNullOrWhiteSpace(monitoringStorageAccountName)) + { + // try to initialize using monitoringStorageAccountName + InitializeStorageContext(monitoringStorageAccountName); + } + + if (IsValidStorageContext()) + { + string wadCfgB64 = Convert.ToBase64String(Encoding.UTF8.GetBytes(wadCfgXml)); + return string.Format(DiagnosticsPublicConfigFormatStr, wadCfgB64, StorageContext.StorageAccountName); + } + else + { + // unable to obtain valid storage account name + return null; + } + } + else + { + return null; + } + } + + protected string GetJsonEncodedDiagnosticsPrivateConfig() + { + if (IsValidStorageContext()) + { + return string.Format(DiagnosticsPrivateConfigFormatStr, + StorageContext.StorageAccountName, + StorageContext.StorageAccount.Credentials.ExportBase64EncodedKey(), + "https://" + StorageContext.EndPointSuffix); + } + else + { + return null; + } + } + + public VirtualMachineMicrosoftAntimalwareExtensionCmdletBase() + { + base.publisherName = MicrosoftAntimalwareExtensionNamespace; + base.extensionName = MicrosoftAntimalwareExtensionName; + base.ReferenceName = MicrosoftAntimalwareExtensionReferenceName; + } + + protected string GetXmlCfgFromJson(string jsonConfig) + { + string xmlString = null; + if (!string.IsNullOrWhiteSpace(jsonConfig)) + { + try + { + Newtonsoft.Json.Linq.JObject jObject = Newtonsoft.Json.Linq.JObject.Parse(jsonConfig); + string base64EncodedXml = (string)jObject["xmlCfg"]; + if (!string.IsNullOrWhiteSpace(base64EncodedXml)) + { + byte[] data = Convert.FromBase64String(base64EncodedXml); + xmlString = Encoding.UTF8.GetString(data); + } + } + catch (Exception) + { + } + } + return xmlString; + } + + protected string GetStorageAccountNameFromJson(string jsonConfig) + { + string storageAccountName = null; + if (!string.IsNullOrWhiteSpace(jsonConfig)) + { + try + { + Newtonsoft.Json.Linq.JObject jObject = Newtonsoft.Json.Linq.JObject.Parse(jsonConfig); + storageAccountName = (string)jObject["StorageAccount"]; + } + catch (Exception) + { + } + } + return storageAccountName; + } + + protected VirtualMachineMicrosoftAntimalwareExtensionContext GetDiagnosticsExtensionContext() + { + var extensionRefs = + string.IsNullOrEmpty(ReferenceName) && string.IsNullOrEmpty(ExtensionName) ? + ResourceExtensionReferences : GetPredicateExtensionList(); + + return extensionRefs == null ? null : extensionRefs.Select( + r => new VirtualMachineMicrosoftAntimalwareExtensionContext + { + ExtensionName = r.Name, + Publisher = r.Publisher, + ReferenceName = r.ReferenceName, + Version = r.Version, + PublicConfiguration = IsLegacyExtension(r.Name, r.Publisher, r.Version) ? GetConfiguration(r) : GetConfiguration(r, PublicTypeStr), + State = r.State, + AntimalwareMonitoringConfiguration = GetXmlCfgFromJson(IsLegacyExtension(r.Name, r.Publisher, r.Version) ? GetConfiguration(r) : GetConfiguration(r, PublicTypeStr)) + }).Where( + r => r.ExtensionName == VirtualMachineMicrosoftAntimalwareExtensionCmdletBase.DiagnosticsExtensionName + ).FirstOrDefault(); + } + + protected void RemoveExistingAntimalwareMonitoringConfig() + { + // this does not remove the diagnostics extension entirely, it only removes the portion of the + // diagnostics configuration that monitors antimalware events- everything else will remain + // in order to avoid doing harm to any other users who may be sharing the diagnostics extension + + var ext = GetDiagnosticsExtensionContext(); + + if (ext != null) + { + // add root element back to xml string (not preserved by diagnostics extension) + string tmpXmlString = string.Format("{1}", DiagnosticsConfigXmlNamespace, ext.AntimalwareMonitoringConfiguration); + string AntimalwareDataSourceName = "System!*[System[Provider[@Name='Microsoft Antimalware']]]"; + + XmlDocument tmpXmlDoc = new XmlDocument(); + tmpXmlDoc.LoadXml(tmpXmlString); + + // retrieve storage account name from public configuration + monitoringStorageAccountName = GetStorageAccountNameFromJson(ext.PublicConfiguration); + if (string.IsNullOrWhiteSpace(monitoringStorageAccountName)) + { + // do not modify diagnostics config without including the storage account + // throw terminating exception since it is not possible to preserve the + // existing storage account with the configuration if it doesn't have a + // hint to what the last storage account was in the public configuration + ThrowTerminatingError(new ErrorRecord( + new Exception("ServiceExtensionExistingMonitoringConfigurationIsMissingStorageAccountNameElement"), + string.Empty, + ErrorCategory.InvalidData, + null)); + + return; + } + else + { + InitializeStorageContext(monitoringStorageAccountName); + } + + // locate the antimalware data source node in the document + string antimalwareDataSourceXPath = string.Format(@"//*[local-name()='{0}' and @name=""{1}"" and namespace-uri()='{2}']", "DataSource", AntimalwareDataSourceName, DiagnosticsConfigXmlNamespace); + XmlNode antimalwareDataSourceNode = tmpXmlDoc.DocumentElement.SelectSingleNode(antimalwareDataSourceXPath); + if (antimalwareDataSourceNode != null) + { + XmlNode windowsEventLogNode = antimalwareDataSourceNode.ParentNode; + if (windowsEventLogNode.RemoveChild(antimalwareDataSourceNode) != null) + { + // remove the windows event log if there are no other child data sources present + // as will be required for schema validation to succeed when sending the new config + // any other data sources outside of the windows event log are left untouched + if (!windowsEventLogNode.HasChildNodes) + { + windowsEventLogNode.ParentNode.RemoveChild(windowsEventLogNode); + } + } + + // convert back to xml fragment, set configuration fields accordingly, add the extension + string configFrag = tmpXmlDoc.DocumentElement.InnerXml; + configFrag = configFrag.Replace(" xmlns=\"http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration\"", ""); + PublicConfiguration = GetJsonEncodedDiagnosticsPublicConfig(configFrag); + PrivateConfiguration = GetJsonEncodedDiagnosticsPrivateConfig(); + RemovePredicateExtensions(); + AddResourceExtension(); + } + else + { + // no existing antimalware data source was found needing removal + return; + } + } + } + + protected void InitializeStorageContext(string storageAccountName) + { + // lookup storage account by name and retrieve key + var storageService = this.StorageClient.StorageAccounts.Get(storageAccountName); + if (storageService == null) + { + ThrowTerminatingError(new ErrorRecord( + new Exception("ServiceExtensionCannotFindStorageAccountName"), + string.Empty, + ErrorCategory.InvalidData, + null)); + } + var storageKeys = this.StorageClient.StorageAccounts.GetKeys(storageService.StorageAccount.Name); + if (storageKeys == null || storageKeys.PrimaryKey == null || storageKeys.SecondaryKey == null) + { + ThrowTerminatingError(new ErrorRecord( + new Exception("ServiceExtensionCannotFindStorageAccountKey"), + string.Empty, + ErrorCategory.InvalidData, + null)); + } + string storageAccountKey = storageKeys.PrimaryKey != null ? storageKeys.PrimaryKey : storageKeys.SecondaryKey; + + // now that key has been retrieved, initialize context and return + StorageCredentials creds = new StorageCredentials(storageAccountName, storageAccountKey); + CloudStorageAccount csa = new WindowsAzure.Storage.CloudStorageAccount(creds, true); + StorageContext = new AzureStorageContext(csa); + } + + + protected bool IsValidStorageContext() + { + return ((StorageContext != null) && + (!string.IsNullOrWhiteSpace(StorageContext.StorageAccountName)) && + (!string.IsNullOrWhiteSpace(StorageContext.TableEndPoint)) && + (!string.IsNullOrWhiteSpace(StorageContext.StorageAccount.Credentials.ExportBase64EncodedKey()))); + } + + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/MicrosoftAntimalware/VirtualMachineMicrosoftAntimalwareExtensionContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/MicrosoftAntimalware/VirtualMachineMicrosoftAntimalwareExtensionContext.cs new file mode 100644 index 000000000000..7559b59bc4ad --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/MicrosoftAntimalware/VirtualMachineMicrosoftAntimalwareExtensionContext.cs @@ -0,0 +1,21 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.MicrosoftAntimalware +{ + public class VirtualMachineMicrosoftAntimalwareExtensionContext : VirtualMachineExtensionContext + { + public string AntimalwareMonitoringConfiguration { get; set; } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Puppet/GetAzureVMPuppetExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Puppet/GetAzureVMPuppetExtension.cs new file mode 100644 index 000000000000..87fb91dd0340 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Puppet/GetAzureVMPuppetExtension.cs @@ -0,0 +1,52 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + [Cmdlet( + VerbsCommon.Get, + VirtualMachinePuppetExtensionNoun, + DefaultParameterSetName = GetPuppetExtensionParamSetName), + OutputType( + typeof(IEnumerable))] + public class GetAzureVMPuppetExtensionCommand : VirtualMachinePuppetExtensionCmdletBase + { + protected const string GetPuppetExtensionParamSetName = "GetPuppetExtension"; + + internal void ExecuteCommand() + { + var extensionRefs = GetPredicateExtensionList(); + WriteObject( + extensionRefs == null ? null : extensionRefs.Select( + r => new VirtualMachinePuppetExtensionContext + { + ExtensionName = r.Name, + Publisher = r.Publisher, + ReferenceName = r.ReferenceName, + Version = r.Version, + State = r.State + }).FirstOrDefault()); + } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + ExecuteCommand(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Puppet/RemoveAzureVMPuppetExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Puppet/RemoveAzureVMPuppetExtension.cs new file mode 100644 index 000000000000..305a4efd3dd7 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Puppet/RemoveAzureVMPuppetExtension.cs @@ -0,0 +1,41 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + [Cmdlet( + VerbsCommon.Remove, + VirtualMachinePuppetExtensionNoun, + DefaultParameterSetName = RemovePuppetExtensionParamSetName), + OutputType(typeof(IPersistentVM))] + public class RemoveAzureVMPuppetExtensionCommand : VirtualMachinePuppetExtensionCmdletBase + { + protected const string RemovePuppetExtensionParamSetName = "RemovePuppetExtension"; + + internal void ExecuteCommand() + { + RemovePredicateExtensions(); + WriteObject(VM); + } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + ExecuteCommand(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Puppet/SetAzureVMPuppetExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Puppet/SetAzureVMPuppetExtension.cs new file mode 100644 index 000000000000..e2fae704d084 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Puppet/SetAzureVMPuppetExtension.cs @@ -0,0 +1,91 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + [Cmdlet( + VerbsCommon.Set, + VirtualMachinePuppetExtensionNoun, + DefaultParameterSetName = SetPuppetExtensionParamSetName), + OutputType( + typeof(IPersistentVM))] + public class SetAzureVMPuppetExtensionCommand : VirtualMachinePuppetExtensionCmdletBase + { + protected const string SetPuppetExtensionParamSetName = "SetPuppetExtension"; + + [Parameter( + Mandatory = true, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Puppet Master server FQDN to which the Puppet Agent should connect.")] + [ValidateNotNullOrEmpty] + public string PuppetMasterServer { get; set; } + + [Parameter( + Mandatory = false, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Version.")] + [ValidateNotNullOrEmpty] + public override string Version { get; set; } + + [Parameter( + Mandatory = false, + Position = 3, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Disable VM Puppet Extension.")] + public override SwitchParameter Disable { get; set; } + + [Parameter( + Mandatory = false, + Position = 6, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Reference Name.")] + [ValidateNotNullOrEmpty] + public override string ReferenceName { get; set; } + + internal void ExecuteCommand() + { + ValidateParameters(); + RemovePredicateExtensions(); + AddResourceExtension(); + WriteObject(VM); + } + + protected override void ValidateParameters() + { + base.ValidateParameters(); + this.Version = this.Version ?? ExtensionDefaultVersion; + this.ReferenceName = this.ReferenceName ?? LegacyReferenceName; + this.PrivateConfiguration = string.Format(PrivateConfigurationTemplate, this.EscapeJsonCharacters(this.PuppetMasterServer)); + } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + ExecuteCommand(); + } + + private string EscapeJsonCharacters(string value) + { + string serializedValue = Newtonsoft.Json.JsonConvert.SerializeObject(value); + + // Since SerializeObject method automatically surrounds result with double quotes, we need to remove them. + return serializedValue.Trim('"'); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Puppet/VirtualMachinePuppetExtensionCmdletBase.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Puppet/VirtualMachinePuppetExtensionCmdletBase.cs new file mode 100644 index 000000000000..cf18a9273574 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Puppet/VirtualMachinePuppetExtensionCmdletBase.cs @@ -0,0 +1,33 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + public class VirtualMachinePuppetExtensionCmdletBase : VirtualMachineExtensionCmdletBase + { + protected const string VirtualMachinePuppetExtensionNoun = "AzureVMPuppetExtension"; + + protected const string ExtensionDefaultPublisher = "PuppetLabs"; + protected const string ExtensionDefaultName = "PuppetEnterpriseAgent"; + protected const string ExtensionDefaultVersion = "3.*"; + protected const string LegacyReferenceName = "PuppetAgent"; + protected const string PrivateConfigurationTemplate = "{{ \"PUPPET_MASTER_SERVER\": \"{0}\" }}"; + + public VirtualMachinePuppetExtensionCmdletBase() + { + base.publisherName = ExtensionDefaultPublisher; + base.extensionName = ExtensionDefaultName; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Puppet/VirtualMachinePuppetExtensionContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Puppet/VirtualMachinePuppetExtensionContext.cs new file mode 100644 index 000000000000..b2b9c70d1899 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/Puppet/VirtualMachinePuppetExtensionContext.cs @@ -0,0 +1,20 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + public class VirtualMachinePuppetExtensionContext : VirtualMachineExtensionContext + { + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/AzureVMSqlServerAutoBackupSettings.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/AzureVMSqlServerAutoBackupSettings.cs new file mode 100644 index 000000000000..3854d9d4008f --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/AzureVMSqlServerAutoBackupSettings.cs @@ -0,0 +1,54 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Security; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + /// + /// Autobackup settings to configure managed backup on SQL VM + /// + public class AutoBackupSettings + { + /// + /// Defines if the Auto-backup feature is enabled or disabled + /// + public bool Enable { get; set; } + + /// + /// Defines if backups will be encrypted or not + /// + public bool EnableEncryption { get; set; } + + /// + /// Defines the number of days to keep the backups + /// + public int RetentionPeriod { get; set; } + + /// + /// storage url where databases will be backed up + /// + public string StorageUrl { get; set; } + + /// + /// Key of storage account used by managed backup + /// + public string StorageAccessKey { get; set; } + + /// + /// Password required for certification when encryption is enabled + /// + public string Password { get; set; } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/AzureVMSqlServerAutoPatchingPatchCategoryEnum.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/AzureVMSqlServerAutoPatchingPatchCategoryEnum.cs new file mode 100644 index 000000000000..428dd8addf52 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/AzureVMSqlServerAutoPatchingPatchCategoryEnum.cs @@ -0,0 +1,37 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + /// + /// Enum for Patching categories + /// + public enum AzureVMSqlServerAutoPatchingPatchCategoryEnum + { + /// + /// Unknown - not defined + /// + Unknown = 0, + + /// + /// Important patches + /// + Important = 0, + + /// + /// Optional patches + /// + Optional = 1 + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/AzureVMSqlServerAutoPatchingSettings.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/AzureVMSqlServerAutoPatchingSettings.cs new file mode 100644 index 000000000000..3e2c4e031c68 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/AzureVMSqlServerAutoPatchingSettings.cs @@ -0,0 +1,88 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + /// + /// AutoPatching settings to configure auto-patching on SQL VM + /// + public class AutoPatchingSettings + { + private const string Important = "important"; + private const string Optional = "optional"; + + /// + /// Enable / Disable auto patching + /// + public bool Enable { get; set; } + + /// + /// Day of the week + /// + public string DayOfWeek { get; set; } + + /// + /// Maintainance Windows Start hour ( 0 to 23 ) + /// + public int MaintenanceWindowStartingHour { get; set; } + + /// + /// Maintainance window duration in minutes + /// + public int MaintenanceWindowDuration { get; set; } + + /// + /// pathc category returned as string + /// + public string PatchCategory + { + get + { + return this.patchCategory.ToString("G"); + } + } + + private AzureVMSqlServerAutoPatchingPatchCategoryEnum patchCategory = AzureVMSqlServerAutoPatchingPatchCategoryEnum.Unknown; + + public void UpdatePatchingCategory(AzureVMSqlServerAutoPatchingPatchCategoryEnum category) + { + this.patchCategory = category; + } + + /// + /// Update patching category enum + /// + /// + public void UpdatePatchingCategory(string category) + { + if (!string.IsNullOrEmpty(category)) + { + switch (category.ToLower()) + { + case Important: + this.patchCategory = AzureVMSqlServerAutoPatchingPatchCategoryEnum.Important; + break; + + case Optional: + this.patchCategory = AzureVMSqlServerAutoPatchingPatchCategoryEnum.Optional; + break; + + default: + this.patchCategory = AzureVMSqlServerAutoPatchingPatchCategoryEnum.Unknown; + break; + } + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/AzureVMSqlServerPrivateSettings.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/AzureVMSqlServerPrivateSettings.cs new file mode 100644 index 000000000000..8d56d8669d59 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/AzureVMSqlServerPrivateSettings.cs @@ -0,0 +1,38 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +using System.Security; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + /// + /// SQL Server extension's private settings - Guest agent infrastructure owns securing these private settings + /// + public class SqlServerPrivateSettings + { + /// + /// Azure blob store URL + /// + public string StorageUrl; + + /// + /// Storage account access key + /// + public string StorageAccessKey; + + /// + /// Password required for certification when encryption is enabled + /// + public string Password; + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/AzureVMSqlServerPublicSettings.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/AzureVMSqlServerPublicSettings.cs new file mode 100644 index 000000000000..91e551788795 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/AzureVMSqlServerPublicSettings.cs @@ -0,0 +1,32 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + /// + /// SQL Server Extension's public settings + /// + public class SqlServerPublicSettings + { + /// + /// Auto patching settings + /// + public AutoPatchingSettings AutoPatchingSettings { get; set; } + + /// + /// Auto-backup settings + /// + public AutoBackupSettings AutoBackupSettings { get; set; } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/GetAzureVMSqlServerExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/GetAzureVMSqlServerExtension.cs new file mode 100644 index 000000000000..b44a978410ed --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/GetAzureVMSqlServerExtension.cs @@ -0,0 +1,263 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; +using Newtonsoft.Json; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using System.Collections.Generic; +using System.Net; +using System.Globalization; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + using NSM = Management.Compute.Models; + + /// + /// Get-AzureVMSqlServerExtension implementation + /// + [Cmdlet( + VerbsCommon.Get, + VirtualMachineSqlServerExtensionNoun, + DefaultParameterSetName = GetSqlServerExtensionParamSetName), + OutputType( + typeof(VirtualMachineSqlServerExtensionContext))] + public class GetAzureVMSqlServerExtensionCommand : VirtualMachineSqlServerExtensionCmdletBase + { + protected const string GetSqlServerExtensionParamSetName = "GetSqlServerExtension"; + protected const string AutoPatchingStatusMessageName = "Automatic Patching"; + protected const string AutoBackupStatusMessageName = "Automatic Backup"; + + internal void ExecuteCommand() + { + var extensionRefs = GetPredicateExtensionList(); + WriteObject( + extensionRefs == null ? null : extensionRefs.Select( + r => + { + GetExtensionValues(r); + + return this.GetExtensionContext(r); + }), true); + } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + ExecuteCommand(); + } + + /// + /// Get the SQL Extension's context + /// + /// + private VirtualMachineSqlServerExtensionContext GetExtensionContext(ResourceExtensionReference r) + { + VirtualMachineSqlServerExtensionContext context = new VirtualMachineSqlServerExtensionContext + { + ExtensionName = r.Name, + Publisher = r.Publisher, + ReferenceName = r.ReferenceName, + Version = r.Version, + State = r.State, + PublicConfiguration = PublicConfiguration, + PrivateConfiguration = SecureStringHelper.GetSecureString(PrivateConfiguration), + RoleName = VM.GetInstance().RoleName, + }; + + // gather extension status messages + List statusMessageList = new List(); + + List extensionStatusList = this.GetResourceExtensionStatusList(context); + + // enumerate over extension status list and gather status for autopatching and autobackup + // Note: valid reference to an extension status list is returned by GetResourceExtensionStatusList() + foreach (NSM.ResourceExtensionStatus res in extensionStatusList) + { + // Extension handler name in format publisher.ReferenceName + string extensionHandlerName = string.Format(CultureInfo.InvariantCulture, + "{0}.{1}", + r.Publisher, + r.ReferenceName); + + // skip all non-sql extensions + if (!res.HandlerName.Equals(extensionHandlerName, System.StringComparison.InvariantCulture)) + { + continue; + } + + if (null != res.ExtensionSettingStatus) + { + context.SubStatusList = res.ExtensionSettingStatus.SubStatusList; + + foreach (NSM.ResourceExtensionSubStatus status in res.ExtensionSettingStatus.SubStatusList) + { + if (null != status.FormattedMessage) + { + string formattedMessage = status.FormattedMessage.Message; + + // get current auto patching and auto backup config from extension status message + if (status.Name.Equals(AutoPatchingStatusMessageName, System.StringComparison.InvariantCulture)) + { + context.AutoPatchingSettings = DeSerializeAutoPatchingSettings(status.Name, formattedMessage); + } + + if (status.Name.Equals(AutoBackupStatusMessageName, System.StringComparison.InvariantCulture)) + { + context.AutoBackupSettings = DeSerializeAutoBackupSettings(status.Name, formattedMessage); + } + + statusMessageList.Add(formattedMessage); + } + } + } + } + + context.StatusMessages = statusMessageList; + return context; + } + + + /// + /// Walks through hosted services and returns back the ResourceExtensionStatus reported by Azure guest agent + /// + /// + /// + private List GetResourceExtensionStatusList(VirtualMachineSqlServerExtensionContext context) + { + List extensionStatusList = new List(); + + // List all hosted services + WriteVerboseWithTimestamp("Listing hosted services..."); + NSM.HostedServiceListResponse response = this.ComputeClient.HostedServices.List(); + WriteVerboseWithTimestamp("Listing hosted services completed."); + + foreach (var service in response) + { + NSM.DeploymentGetResponse deployment = null; + + try + { + deployment = this.ComputeClient.Deployments.GetBySlot( + service.ServiceName, + NSM.DeploymentSlot.Production); + } + catch (CloudException e) + { + if (e.Response.StatusCode != HttpStatusCode.NotFound) + { + throw; + } + } + + if (deployment != null) + { + // Enumerate Role instances , check if role name exists + foreach (NSM.RoleInstance ri in deployment.RoleInstances) + { + if (ri.RoleName.Equals(context.RoleName, System.StringComparison.InvariantCulture)) + { + WriteVerboseWithTimestamp("Found Role Instance:" + context.RoleName); + extensionStatusList = new List(ri.ResourceExtensionStatusList); + return extensionStatusList; + } + } + } + } + + if (extensionStatusList.Count == 0) + { + WriteVerboseWithTimestamp("Could not locate role instance for role name:" + context.RoleName); + } + + return extensionStatusList; + } + + private AutoPatchingSettings DeSerializeAutoPatchingSettings(string category, string input) + { + AutoPatchingSettings aps = new AutoPatchingSettings(); + + if (!string.IsNullOrEmpty(input)) + { + try + { + aps = JsonConvert.DeserializeObject(input); + aps.UpdatePatchingCategory(this.ResolvePatchCategoryStringforPowerShell(aps.PatchCategory)); + } + catch (JsonReaderException jre) + { + WriteVerboseWithTimestamp("Category:" + category); + WriteVerboseWithTimestamp("Message:" + input); + WriteVerboseWithTimestamp(jre.ToString()); + } + } + + return aps; + } + + private AutoBackupSettings DeSerializeAutoBackupSettings(string category, string input) + { + AutoBackupSettings abs = new AutoBackupSettings(); + + if (!string.IsNullOrEmpty(input)) + { + try + { + abs = JsonConvert.DeserializeObject(input); + } + catch (JsonReaderException jre) + { + WriteVerboseWithTimestamp("Category:" + category); + WriteVerboseWithTimestamp("Message:" + input); + WriteVerboseWithTimestamp(jre.ToString()); + } + } + + return abs; + } + + /// + /// Map strings Auto-patching public settings -> Powershell API + /// "WindowsMandatoryUpdates" -> "Important" + /// "MicrosoftOptionalUpdates" -> "Optional" + /// + /// + /// + private AzureVMSqlServerAutoPatchingPatchCategoryEnum ResolvePatchCategoryStringforPowerShell(string category) + { + AzureVMSqlServerAutoPatchingPatchCategoryEnum patchCategory = AzureVMSqlServerAutoPatchingPatchCategoryEnum.Important; + + if (!string.IsNullOrEmpty(category)) + { + switch (category.ToLower()) + { + case "windowsmandatoryupdates": + patchCategory = AzureVMSqlServerAutoPatchingPatchCategoryEnum.Important; + break; + + case "microsoftoptionalupdates": + patchCategory = AzureVMSqlServerAutoPatchingPatchCategoryEnum.Optional; + break; + + default: + patchCategory = AzureVMSqlServerAutoPatchingPatchCategoryEnum.Unknown; + break; + } + } + + return patchCategory; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/NewAzureVMSqlServerAutoBackupConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/NewAzureVMSqlServerAutoBackupConfig.cs new file mode 100644 index 000000000000..dd361d54199f --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/NewAzureVMSqlServerAutoBackupConfig.cs @@ -0,0 +1,172 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Management.Automation; +using System.Security; +using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + /// + /// Helper cmdlet to construct instance of AutoBackup settings class + /// + [Cmdlet( + VerbsCommon.New, + AzureVMSqlServerAutoBackupConfigNoun, + DefaultParameterSetName = StorageUriParamSetName), + OutputType( + typeof(AutoBackupSettings))] + public class NewAzureVMSqlServerAutoBackupConfigCommand : ServiceManagementBaseCmdlet + { + protected const string AzureVMSqlServerAutoBackupConfigNoun = "AzureVMSqlServerAutoBackupConfig"; + + protected const string StorageContextParamSetName = "StorageContextSqlServerAutoBackup"; + protected const string StorageUriParamSetName = "StorageUriSqlServerAutoBackup"; + + [Parameter( + Mandatory = false, + Position = 0, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Enable Automatic Backup.")] + [ValidateNotNullOrEmpty] + public SwitchParameter Enable { get; set; } + + [Parameter( + Mandatory = false, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Backup Retention period in days.")] + [ValidateNotNullOrEmpty] + public int RetentionPeriodInDays { get; set; } + + [Parameter( + Mandatory = false, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Enable Backup Encryption.")] + [ValidateNotNullOrEmpty] + public SwitchParameter EnableEncryption { get; set; } + + [Parameter( + Mandatory = false, + Position = 3, + ValueFromPipelineByPropertyName = false, + HelpMessage = "Certificate password.")] + public SecureString CertificatePassword { get; set; } + + [Parameter( + ParameterSetName = StorageContextParamSetName, + Mandatory = false, + Position = 4, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The storage connection context")] + [ValidateNotNullOrEmpty] + public AzureStorageContext StorageContext + { + get; + set; + } + + [Parameter( + Mandatory = false, + Position = 4, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The storage uri")] + [ValidateNotNullOrEmpty] + public Uri StorageUri + { + get; + set; + } + + [Parameter( + Mandatory = false, + Position = 5, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The storage access key")] + [ValidateNotNullOrEmpty] + public SecureString StorageKey + { + get; + set; + } + + /// + /// Initialzies a new instance of the class. + /// + public NewAzureVMSqlServerAutoBackupConfigCommand() + { + } + + /// + /// Creates and returns object. + /// + protected override void ProcessRecord() + { + AutoBackupSettings autoBackupSettings = new AutoBackupSettings(); + + autoBackupSettings.Enable = (Enable.IsPresent) ? Enable.ToBool() : false; + autoBackupSettings.EnableEncryption = (EnableEncryption.IsPresent) ? EnableEncryption.ToBool() : false; + autoBackupSettings.RetentionPeriod = RetentionPeriodInDays; + + switch(ParameterSetName) + { + case StorageContextParamSetName: + autoBackupSettings.StorageUrl = StorageContext.BlobEndPoint; + autoBackupSettings.StorageAccessKey = this.GetStorageKey(); + break; + + case StorageUriParamSetName: + autoBackupSettings.StorageUrl = (StorageUri == null)? null: StorageUri.ToString(); + autoBackupSettings.StorageAccessKey = (StorageKey == null)? null: SecureStringHelper.ConvertToUnsecureString(StorageKey); + break; + } + + // Check if certificate password was set + autoBackupSettings.Password = (CertificatePassword == null) ? null : SecureStringHelper.ConvertToUnsecureString(CertificatePassword); + + WriteObject(autoBackupSettings); + } + + protected string GetStorageKey() + { + string storageKey = string.Empty; + string storageAccountName = (this.StorageContext == null)? null: this.StorageContext.StorageAccountName; + + if (!string.IsNullOrEmpty(storageAccountName)) + { + var storageAccount = this.StorageClient.StorageAccounts.Get(storageAccountName); + if (storageAccount != null) + { + var keys = this.StorageClient.StorageAccounts.GetKeys(storageAccountName); + if (keys != null) + { + storageKey = !string.IsNullOrEmpty(keys.PrimaryKey) ? keys.PrimaryKey : keys.SecondaryKey; + } + } + } + + return storageKey; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/NewAzureVMSqlServerAutoPatchingConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/NewAzureVMSqlServerAutoPatchingConfig.cs new file mode 100644 index 000000000000..2747fdf5646b --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/NewAzureVMSqlServerAutoPatchingConfig.cs @@ -0,0 +1,76 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Management.Automation; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + /// + /// Helper cmdlet to construct instance of AutoPatching settings class + /// + [Cmdlet( + VerbsCommon.New, + AzureVMSqlServerAutoPatchingConfigNoun), + OutputType( + typeof(AutoPatchingSettings))] + public class NewAzureVMSqlServerAutoPatchingConfigCommand : PSCmdlet + { + protected const string AzureVMSqlServerAutoPatchingConfigNoun = "AzureVMSqlServerAutoPatchingConfig"; + + [Parameter] + public SwitchParameter Enable { get; set; } + + [Parameter] + [ValidateSetAttribute(new string[] { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Everyday" })] + public string DayOfWeek { get; set; } + + [Parameter] + public int MaintenanceWindowStartingHour { get; set; } + + [Parameter] + public int MaintenanceWindowDuration { get; set; } + + [Parameter] + [ValidateSetAttribute(new string[] { "Important", "Optional" })] + public string PatchCategory { get; set; } + + /// + /// Initialzies a new instance of the class. + /// + public NewAzureVMSqlServerAutoPatchingConfigCommand() + { + } + + /// + /// Creates and returns object. + /// + protected override void ProcessRecord() + { + AutoPatchingSettings autoPatchingSettings = new AutoPatchingSettings(); + + autoPatchingSettings.Enable = (Enable.IsPresent) ? Enable.ToBool() : false; + autoPatchingSettings.DayOfWeek = DayOfWeek; + autoPatchingSettings.MaintenanceWindowStartingHour = MaintenanceWindowStartingHour; + autoPatchingSettings.MaintenanceWindowDuration = MaintenanceWindowDuration; + autoPatchingSettings.UpdatePatchingCategory(PatchCategory); + + WriteObject(autoPatchingSettings); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/RemoveAzureVMSqlServerExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/RemoveAzureVMSqlServerExtension.cs new file mode 100644 index 000000000000..b1464c105acb --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/RemoveAzureVMSqlServerExtension.cs @@ -0,0 +1,47 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + /// + /// Remove-AzureVMSqlServerExtension cmdlet implementation + /// this cmdlet removes SQL Server extension info VM object + /// Explicit call to Update-AzureVM is required to commit changes to Azure + /// + [Cmdlet( + VerbsCommon.Remove, + VirtualMachineSqlServerExtensionNoun, + DefaultParameterSetName = RemoveSqlServerExtensionParamSetName), + OutputType( + typeof(IPersistentVM))] + public class RemoveAzureVMSqlServerExtensionCommand : VirtualMachineSqlServerExtensionCmdletBase + { + protected const string RemoveSqlServerExtensionParamSetName = "RemoveSqlServerExtension"; + + internal void ExecuteCommand() + { + RemovePredicateExtensions(); + WriteObject(VM); + } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/SetAzureVMSqlServerExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/SetAzureVMSqlServerExtension.cs new file mode 100644 index 000000000000..d45c3c1d2a86 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/SetAzureVMSqlServerExtension.cs @@ -0,0 +1,114 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + /// + /// Set-AzureVMSqlServerExtension implementation. + /// This cmdlet can be used to set AutoPatching / AutoBackup settings, disable, uninstalls Sql Extension + /// + [Cmdlet( + VerbsCommon.Set, + VirtualMachineSqlServerExtensionNoun, + DefaultParameterSetName = EnableExtensionParamSetName), + OutputType( + typeof(IPersistentVM))] + public class SetAzureVMSqlServerExtensionCommand : VirtualMachineSqlServerExtensionCmdletBase + { + protected const string EnableExtensionParamSetName = "EnableSqlServerExtension"; + protected const string DisableSqlServerExtensionParamSetName = "DisableSqlServerExtension"; + protected const string UninstallSqlServerExtensionParamSetName = "UninstallSqlServerExtension"; + + [Parameter( + Mandatory = false, + Position = 0, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Reference Name.")] + [ValidateNotNullOrEmpty] + public override string ReferenceName { get; set; } + + [Parameter( + Mandatory = false, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Version.")] + [ValidateNotNullOrEmpty] + public override string Version { get; set; } + + [Parameter( + ParameterSetName = DisableSqlServerExtensionParamSetName, + Mandatory = false, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Disable Sql Server Extension")] + public override SwitchParameter Disable { get; set; } + + [Parameter( + ParameterSetName = UninstallSqlServerExtensionParamSetName, + Mandatory = false, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Uninstall Sql Server Extension")] + public override SwitchParameter Uninstall { get; set; } + + [Parameter( + ParameterSetName = EnableExtensionParamSetName, + Mandatory = false, + Position = 3, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Automatic Patching configuration.")] + [ValidateNotNullOrEmpty] + public override AutoPatchingSettings AutoPatchingSettings { get; set; } + + [Parameter( + ParameterSetName = EnableExtensionParamSetName, + Mandatory = false, + Position = 4, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Automatic Backup configuration.")] + [ValidateNotNullOrEmpty] + public override AutoBackupSettings AutoBackupSettings { get; set; } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + ExecuteCommand(); + } + + internal void ExecuteCommand() + { + ValidateParameters(); + RemovePredicateExtensions(); + AddResourceExtension(); + WriteObject(VM); + } + + protected override void ValidateParameters() + { + base.ValidateParameters(); + this.ReferenceName = string.IsNullOrEmpty(this.ReferenceName) ? ExtensionDefaultName : this.ReferenceName; + + this.PublicConfiguration = GetPublicConfiguration(); + this.PrivateConfiguration = GetPrivateConfiguration(); + this.Version = this.Version ?? ExtensionDefaultVersion; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/VirtualMachineSqlServerExtensionCmdletBase.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/VirtualMachineSqlServerExtensionCmdletBase.cs new file mode 100644 index 000000000000..654a6bfd9f29 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/VirtualMachineSqlServerExtensionCmdletBase.cs @@ -0,0 +1,91 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Newtonsoft.Json; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + /// + /// Base class for SQL extension specific cmdlets + /// + public class VirtualMachineSqlServerExtensionCmdletBase : VirtualMachineExtensionCmdletBase + { + protected const string VirtualMachineSqlServerExtensionNoun = "AzureVMSqlServerExtension"; + + /// + /// Extension's publisher name + /// + protected const string ExtensionDefaultPublisher = "Microsoft.SqlServer.Management"; + + /// + /// Extension's name - + /// + protected const string ExtensionDefaultName = "SqlIaaSAgent"; + + /// + /// Extension's default version + /// + protected const string ExtensionDefaultVersion = "1.0"; + + /// + /// value of Auto-patching settings object that can be set by derived classes + /// + public virtual AutoPatchingSettings AutoPatchingSettings { get; set; } + + /// + /// value of Auto-backup settings object that can be set by derived classes + /// + public virtual AutoBackupSettings AutoBackupSettings { get; set; } + + /// + /// Sets extension's publisher and name + /// + public VirtualMachineSqlServerExtensionCmdletBase() + { + base.publisherName = ExtensionDefaultPublisher; + base.extensionName = ExtensionDefaultName; + } + + /// + /// Returns the public configuration as string + /// + /// + protected string GetPublicConfiguration() + { + return JsonUtilities.TryFormatJson(JsonConvert.SerializeObject( + new SqlServerPublicSettings + { + AutoPatchingSettings = this.AutoPatchingSettings, + AutoBackupSettings = this.AutoBackupSettings + })); + } + + /// + /// Returns private configuration as string + /// + /// + protected string GetPrivateConfiguration() + { + return JsonUtilities.TryFormatJson(JsonConvert.SerializeObject( + new SqlServerPrivateSettings + { + StorageUrl = (this.AutoBackupSettings == null)? string.Empty: this.AutoBackupSettings.StorageUrl, + StorageAccessKey = (this.AutoBackupSettings == null) ? string.Empty : this.AutoBackupSettings.StorageAccessKey, + Password = (this.AutoBackupSettings == null) ? string.Empty : this.AutoBackupSettings.Password + })); + + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/VirtualMachineSqlServerExtensionContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/VirtualMachineSqlServerExtensionContext.cs new file mode 100644 index 000000000000..15e60bb4a39e --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/SqlServer/VirtualMachineSqlServerExtensionContext.cs @@ -0,0 +1,46 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +using System.Collections.Generic; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + using NSM = Management.Compute.Models; + + /// + /// SQL Extension's context object used by Get-AzureVMSqlServerExtension + /// + public class VirtualMachineSqlServerExtensionContext : VirtualMachineExtensionContext + { + /// + /// Auto-patching settings + /// + public AutoPatchingSettings AutoPatchingSettings; + + /// + /// Auto-backup settings + /// + public AutoBackupSettings AutoBackupSettings; + + /// + /// Status messages reported by extension + /// + public List StatusMessages; + + /// + /// Resource extension substatus list + /// + public IList SubStatusList { get; set; } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/VMAccess/GetAzureVMAccessExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/VMAccess/GetAzureVMAccessExtension.cs new file mode 100644 index 000000000000..906edf8bfee0 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/VMAccess/GetAzureVMAccessExtension.cs @@ -0,0 +1,61 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + [Cmdlet( + VerbsCommon.Get, + VirtualMachineAccessExtensionNoun, + DefaultParameterSetName = GetAccessExtensionParamSetName), + OutputType(typeof(VirtualMachineAccessExtensionContext))] + public class GetAzureVMAccessExtensionCommand : VirtualMachineAccessExtensionCmdletBase + { + protected const string GetAccessExtensionParamSetName = "GetAccessExtension"; + + internal void ExecuteCommand() + { + var extensionRefs = GetPredicateExtensionList(); + WriteObject( + extensionRefs == null ? null : extensionRefs.Select( + r => + { + GetVMAccessExtensionValues(r); + return new VirtualMachineAccessExtensionContext + { + ExtensionName = r.Name, + Publisher = r.Publisher, + ReferenceName = r.ReferenceName, + Version = r.Version, + State = r.State, + Enabled = !Disable, + UserName = UserName, + Password = SecureStringHelper.GetSecureString(Password), + PublicConfiguration = PublicConfiguration, + PrivateConfiguration = SecureStringHelper.GetSecureString(PrivateConfiguration), + RoleName = VM.GetInstance().RoleName + }; + }), true); + } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/VMAccess/RemoveAzureVMAccessExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/VMAccess/RemoveAzureVMAccessExtension.cs new file mode 100644 index 000000000000..24ff574f3212 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/VMAccess/RemoveAzureVMAccessExtension.cs @@ -0,0 +1,42 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + [Cmdlet( + VerbsCommon.Remove, + VirtualMachineAccessExtensionNoun, + DefaultParameterSetName = RemoveAccessExtensionParamSetName), + OutputType( + typeof(IPersistentVM))] + public class RemoveAzureVMAccessExtensionCommand : VirtualMachineAccessExtensionCmdletBase + { + protected const string RemoveAccessExtensionParamSetName = "RemoveAccessExtension"; + + internal void ExecuteCommand() + { + RemovePredicateExtensions(); + WriteObject(VM); + } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/VMAccess/SetAzureVMAccessExtension.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/VMAccess/SetAzureVMAccessExtension.cs new file mode 100644 index 000000000000..c34fa787d355 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/VMAccess/SetAzureVMAccessExtension.cs @@ -0,0 +1,131 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + [Cmdlet( + VerbsCommon.Set, + VirtualMachineAccessExtensionNoun, + DefaultParameterSetName = EnableExtensionParamSetName), + OutputType( + typeof(IPersistentVM))] + public class SetAzureVMAccessExtensionCommand : VirtualMachineAccessExtensionCmdletBase + { + public const string EnableExtensionParamSetName = "EnableAccessExtension"; + public const string DisableExtensionParamSetName = "DisableAccessExtension"; + public const string UninstallExtensionParamSetName = "UninstallAccessExtension"; + + [Parameter( + ParameterSetName = EnableExtensionParamSetName, + Mandatory = false, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "New or Existing User Name")] + public override string UserName { get; set; } + + [Parameter( + ParameterSetName = EnableExtensionParamSetName, + Mandatory = false, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "New or Existing User Password")] + public override string Password { get; set; } + + [Parameter( + ParameterSetName = DisableExtensionParamSetName, + Mandatory = true, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Disable VM Access Extension")] + public override SwitchParameter Disable { get; set; } + + [Parameter( + ParameterSetName = UninstallExtensionParamSetName, + Mandatory = true, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Uninstall VM Access Extension")] + public override SwitchParameter Uninstall { get; set; } + + [Parameter( + ParameterSetName = EnableExtensionParamSetName, + Position = 3, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Reference Name.")] + [Parameter( + ParameterSetName = DisableExtensionParamSetName, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Reference Name.")] + [Parameter( + ParameterSetName = UninstallExtensionParamSetName, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Reference Name.")] + [ValidateNotNullOrEmpty] + public override string ReferenceName { get; set; } + + [Parameter( + ParameterSetName = EnableExtensionParamSetName, + Position = 4, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Version.")] + [Parameter( + ParameterSetName = DisableExtensionParamSetName, + Position = 3, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Version.")] + [Parameter( + ParameterSetName = UninstallExtensionParamSetName, + Position = 3, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The Extension Version.")] + [ValidateNotNullOrEmpty] + public override string Version { get; set; } + + internal void ExecuteCommand() + { + ValidateParameters(); + RemovePredicateExtensions(); + AddResourceExtension(); + WriteObject(VM); + } + + protected override void ValidateParameters() + { + base.ValidateParameters(); + if (IsLegacyExtension()) + { + this.PublicConfiguration = GetLegacyConfiguration(); + this.Version = VMAccessAgentLegacyVersion; + } + else + { + this.ReferenceName = string.IsNullOrEmpty(this.ReferenceName) ? ExtensionDefaultName : this.ReferenceName; + this.PublicConfiguration = GetPublicConfiguration(); + this.PrivateConfiguration = GetPrivateConfiguration(); + this.Version = ExtensionDefaultVersion; + } + } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/VMAccess/VirtualMachineAccessExtensionCmdletBase.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/VMAccess/VirtualMachineAccessExtensionCmdletBase.cs new file mode 100644 index 000000000000..6fc1b30db0b8 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/VMAccess/VirtualMachineAccessExtensionCmdletBase.cs @@ -0,0 +1,180 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Xml.Linq; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + public class VirtualMachineAccessExtensionCmdletBase : VirtualMachineExtensionCmdletBase + { + protected const string VirtualMachineAccessExtensionNoun = "AzureVMAccessExtension"; + + protected const string ExtensionDefaultPublisher = "Microsoft.Compute"; + protected const string ExtensionDefaultName = "VMAccessAgent"; + protected const string LegacyReferenceName = "MyPasswordResetExtension"; + protected const string ExtensionDefaultVersion = "1.*"; + + protected const string VMAccessAgentLegacyVersion = "0.1"; + + private const string ConfigurationElem = "Configuration"; + private const string PublicElem = "Public"; + private const string PublicConfigElem = "PublicConfig"; + private const string PrivateConfigElem = "PrivateConfig"; + private const string AccountElem = "Account"; + private const string EnabledElem = "Enabled"; + private const string UserNameElem = "UserName"; + private const string PasswordElem = "Password"; + + public virtual string UserName { get; set; } + + public virtual string Password { get; set; } + + public VirtualMachineAccessExtensionCmdletBase() + { + base.publisherName = ExtensionDefaultPublisher; + base.extensionName = ExtensionDefaultName; + } + + protected string GetLegacyConfiguration() + { + XDocument config = null; + if (Disable.IsPresent) + { + config = new XDocument( + new XDeclaration("1.0", "utf-8", null), + new XElement(ConfigurationElem, + new XElement(EnabledElem, (!Disable.IsPresent).ToString().ToLower()) + ) + ); + } + else + { + config = new XDocument( + new XDeclaration("1.0", "utf-8", null), + new XElement(ConfigurationElem, + new XElement(EnabledElem, (!Disable.IsPresent).ToString().ToLower()), + new XElement(PublicElem, + new XElement(PublicConfigElem, + new XElement(AccountElem, + new XElement(UserNameElem, UserName), + new XElement(PasswordElem, Password) + ) + ) + ) + ) + ); + } + + return config.ToString(); + } + + protected string GetPublicConfiguration() + { + XDocument config = new XDocument( + new XDeclaration("1.0", "utf-8", null), + new XElement(PublicConfigElem, + new XElement(UserNameElem, UserName) + ) + ); + + return config.ToString(); + } + + protected string GetPrivateConfiguration() + { + XDocument config = new XDocument( + new XDeclaration("1.0", "utf-8", null), + new XElement(PrivateConfigElem, + new XElement(PasswordElem, Password) + ) + ); + + return config.ToString(); + } + + protected void GetVMAccessExtensionValues(ResourceExtensionReference extensionRef) + { + if (extensionRef != null && extensionRef.ResourceExtensionParameterValues != null) + { + if (IsLegacyExtension(extensionRef.Name, extensionRef.Publisher, extensionRef.Version)) + { + GetVMAccessExtensionLegacyValues(extensionRef.ResourceExtensionParameterValues); + } + else + { + Disable = string.Equals(extensionRef.State, ReferenceDisableStateStr); + GetVMAccessExtensionValues(extensionRef.ResourceExtensionParameterValues); + } + } + else + { + Disable = extensionRef == null ? true : string.Equals(extensionRef.State, ReferenceDisableStateStr); + } + } + + private void GetVMAccessExtensionValues(ResourceExtensionParameterValueList paramVals) + { + if (paramVals != null && paramVals.Any()) + { + var publicParamVal = paramVals.FirstOrDefault( + r => !string.IsNullOrEmpty(r.Value) && string.Equals(r.Type, PublicTypeStr)); + if (publicParamVal != null && !string.IsNullOrEmpty(publicParamVal.Value)) + { + this.PublicConfiguration = publicParamVal.Value; + this.UserName = GetConfigValue(this.PublicConfiguration, UserNameElem); + } + + var privateParamVal = paramVals.FirstOrDefault( + r => r.SecureValue != null && !string.IsNullOrEmpty( + r.SecureValue.ConvertToUnsecureString()) + && string.Equals(r.Type, PrivateTypeStr)); + + if (privateParamVal != null) + { + this.PrivateConfiguration = privateParamVal.SecureValue.ConvertToUnsecureString(); + this.Password = GetConfigValue(this.PrivateConfiguration, PasswordElem); + } + } + } + + private bool ParseStrToBool(string value) + { + bool result = false; + if (!string.IsNullOrEmpty(value)) + { + bool.TryParse(value, out result); + } + + return result; + } + + private void GetVMAccessExtensionLegacyValues(ResourceExtensionParameterValueList paramVals) + { + if (paramVals != null && paramVals.Any()) + { + var paramVal = paramVals.FirstOrDefault(r => !string.IsNullOrEmpty(r.Value)); + if (paramVal != null && !string.IsNullOrEmpty(paramVal.Value)) + { + this.PublicConfiguration = paramVal.Value; + this.Disable = ParseStrToBool(GetConfigValue(this.PublicConfiguration, EnabledElem)); + this.UserName = GetConfigValue(this.PublicConfiguration, UserNameElem); + this.Password = GetConfigValue(this.PublicConfiguration, PasswordElem); + } + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/VMAccess/VirtualMachineAccessExtensionContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/VMAccess/VirtualMachineAccessExtensionContext.cs new file mode 100644 index 000000000000..5a31753f7e3c --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/VMAccess/VirtualMachineAccessExtensionContext.cs @@ -0,0 +1,25 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Security; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions +{ + public class VirtualMachineAccessExtensionContext : VirtualMachineExtensionContext + { + public string UserName { get; set; } + public SecureString Password { get; set; } + public bool Enabled { get; set; } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/IaaSDeploymentManagementCmdletBase.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/IaaSDeploymentManagementCmdletBase.cs new file mode 100644 index 000000000000..0bd748cb9a7b --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/IaaSDeploymentManagementCmdletBase.cs @@ -0,0 +1,153 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Management.Automation; +using System.Net; +using System.Threading; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + public class IaaSDeploymentManagementCmdletBase : ServiceManagementBaseCmdlet + { + private static IList TerminalStates = new List + { + "FailedStartingVM", + "ProvisioningFailed", + "ProvisioningTimeout" + }; + + public IaaSDeploymentManagementCmdletBase() + { + CreatingNewDeployment = false; + } + + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Service name.")] + [ValidateNotNullOrEmpty] + public virtual string ServiceName + { + get; + set; + } + + protected DeploymentGetResponse CurrentDeploymentNewSM { get; set; } + + protected OperationStatusResponse GetDeploymentOperationNewSM { get; set; } + + protected bool CreatingNewDeployment { get; set; } + + protected string GetDeploymentServiceName { get; set; } + + protected virtual void ExecuteCommand() + { + if (!string.IsNullOrEmpty(ServiceName)) + { + InvokeInOperationContext(() => + { + try + { + CurrentDeploymentNewSM = this.ComputeClient.Deployments.GetBySlot(this.ServiceName, DeploymentSlot.Production); + GetDeploymentOperationNewSM = GetOperationNewSM(CurrentDeploymentNewSM.RequestId); + WriteVerboseWithTimestamp(Resources.GetDeploymentCompletedOperation); + } + catch (CloudException ex) + { + if (ex.Response.StatusCode != HttpStatusCode.NotFound) + { + throw; + } + } + }); + } + } + + protected override void ProcessRecord() + { + try + { + HttpRestCallLogger.CurrentCmdlet = this; + base.ProcessRecord(); + ExecuteCommand(); + } + catch (Exception ex) + { + WriteError(new ErrorRecord(ex, string.Empty, ErrorCategory.CloseError, null)); + } + } + + protected void WaitForRoleToBoot(string roleName) + { + string currentInstanceStatus = null; + Management.Compute.Models.RoleInstance durableRoleInstance; + do + { + DeploymentGetResponse d = null; + InvokeInOperationContext(() => + { + try + { + d = this.ComputeClient.Deployments.GetBySlot(ServiceName, DeploymentSlot.Production); + } + catch (CloudException ex) + { + if (ex.Response.StatusCode != HttpStatusCode.NotFound) + { + throw; + } + } + }); + + if (d == null) + { + throw new ApplicationException(String.Format(Resources.CouldNotFindDeployment, ServiceName, Model.DeploymentSlotType.Production)); + } + + durableRoleInstance = d.RoleInstances == null || !d.RoleInstances.Any() ? null : d.RoleInstances.First(ri => ri.RoleName == roleName); + + if (currentInstanceStatus == null) + { + this.WriteVerboseWithTimestamp(Resources.RoleInstanceStatus, durableRoleInstance.InstanceStatus); + currentInstanceStatus = durableRoleInstance.InstanceStatus; + } + + if (currentInstanceStatus != durableRoleInstance.InstanceStatus) + { + this.WriteVerboseWithTimestamp(Resources.RoleInstanceStatus, durableRoleInstance.InstanceStatus); + currentInstanceStatus = durableRoleInstance.InstanceStatus; + } + + if(TerminalStates.FirstOrDefault(r => String.Compare(durableRoleInstance.InstanceStatus, r, true, CultureInfo.InvariantCulture) == 0) != null) + { + var message = string.Format(Resources.VMCreationFailedWithVMStatus, durableRoleInstance.InstanceStatus); + throw new ApplicationException(message); + } + + if(String.Compare(durableRoleInstance.InstanceStatus, Microsoft.WindowsAzure.Management.Compute.Models.RoleInstanceStatus.ReadyRole, true, CultureInfo.InvariantCulture) == 0) + { + break; + } + + //Once we move Tasks, we should remove Thread.Sleep + Thread.Sleep(TimeSpan.FromSeconds(30)); + + } while (true); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/AddAzureDns.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/AddAzureDns.cs new file mode 100644 index 000000000000..868c139f6620 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/AddAzureDns.cs @@ -0,0 +1,60 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Network +{ + [Cmdlet(VerbsCommon.Add, "AzureDns"), OutputType(typeof(ManagementOperationContext))] + public class AddAzureDnsCommand : ServiceManagementBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Name of the DNS Server")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Position = 1, Mandatory = true, HelpMessage = "IP Address of the DNS Server")] + [ValidateNotNullOrEmpty] + public string IPAddress { get; set; } + + [Parameter(Position = 2, Mandatory = true, HelpMessage = "Service Name")] + [ValidateNotNullOrEmpty] + public string ServiceName { get; set; } + + protected override void ProcessRecord() + { + ServiceManagementProfile.Initialize(); + + var dnsAddParameters = new DNSAddParameters + { + Address = this.IPAddress, + Name = this.Name + }; + ExecuteClientActionNewSM(null, + CommandRuntime.ToString(), + () => + { + var deploymentName = this.ComputeClient.Deployments.GetBySlot( + this.ServiceName, + DeploymentSlot.Production).Name; + + return this.ComputeClient.DnsServer.AddDNSServer( + this.ServiceName, + deploymentName, + dnsAddParameters); + }); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/AddAzureInternalLoadBalancer.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/AddAzureInternalLoadBalancer.cs new file mode 100644 index 000000000000..ab56fd33c076 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/AddAzureInternalLoadBalancer.cs @@ -0,0 +1,105 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using System.Net; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet( + VerbsCommon.Add, + AzureInternalLoadBalancerNoun, + DefaultParameterSetName = ServiceAndSlotParamSet), + OutputType( + typeof(ManagementOperationContext))] + public class AddAzureInternalLoadBalancer : ServiceManagementBaseCmdlet + { + protected const string AzureInternalLoadBalancerNoun = "AzureInternalLoadBalancer"; + protected const string ServiceAndSlotParamSet = "ServiceAndSlot"; + protected const string SubnetNameOnlyParamSet = "SubnetNameOnly"; + protected const string SubnetNameAndIPParamSet = "SubnetNameAndIP"; + + [Parameter( + Mandatory = true, + Position = 0, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Internal Load Balancer Name.")] + [ValidateNotNullOrEmpty] + public string InternalLoadBalancerName { get; set; } + + [Parameter( + Mandatory = true, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Service Name.")] + [ValidateNotNullOrEmpty] + public string ServiceName { get; set; } + + [Parameter( + ParameterSetName = SubnetNameOnlyParamSet, + Mandatory = true, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Subnet Name.")] + [Parameter(ParameterSetName = SubnetNameAndIPParamSet, + Mandatory = true, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Subnet Name.")] + [ValidateNotNullOrEmpty] + public string SubnetName { get; set; } + + [Parameter( + ParameterSetName = SubnetNameAndIPParamSet, + Mandatory = true, + Position = 3, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Subnet IP Address.")] + [ValidateNotNullOrEmpty] + public IPAddress StaticVNetIPAddress { get; set; } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + + var parameters = new LoadBalancerCreateParameters + { + Name = this.InternalLoadBalancerName, + FrontendIPConfiguration = new FrontendIPConfiguration + { + Type = FrontendIPConfigurationType.Private, + SubnetName = this.SubnetName, + StaticVirtualNetworkIPAddress = this.StaticVNetIPAddress == null ? null + : this.StaticVNetIPAddress.ToString() + } + }; + + ExecuteClientActionNewSM(null, + CommandRuntime.ToString(), + () => + { + var deploymentName = this.ComputeClient.Deployments.GetBySlot( + this.ServiceName, + DeploymentSlot.Production).Name; + + return this.ComputeClient.LoadBalancers.Create( + this.ServiceName, + deploymentName, + parameters); + }); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/AddAzureNetworkInterfaceConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/AddAzureNetworkInterfaceConfig.cs new file mode 100644 index 000000000000..ac501bccd889 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/AddAzureNetworkInterfaceConfig.cs @@ -0,0 +1,82 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Network +{ + [Cmdlet(VerbsCommon.Add, NetworkInterfaceConfig), OutputType(typeof(IPersistentVM))] + public class AddAzureNetworkInterfaceConfig : VirtualMachineConfigurationCmdletBase + { + [Parameter(Position = 1, Mandatory = true, HelpMessage = "The NetworkInterface Name.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Position = 2, Mandatory = true, HelpMessage = "The Subnet Name.")] + [ValidateNotNullOrEmpty] + public string SubnetName { get; set; } + + [Parameter(Position = 3, Mandatory = false, HelpMessage = "The static ip address.")] + public string StaticVNetIPAddress { get; set; } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + + var networkConfiguration = GetNetworkConfiguration(); + if (networkConfiguration == null) + { + throw new ArgumentOutOfRangeException(Resources.NetworkConfigurationNotFoundOnPersistentVM); + } + + if (networkConfiguration.NetworkInterfaces == null) + { + networkConfiguration.NetworkInterfaces = new AssignNetworkInterfaceCollection(); + } + + // Verify if the network interface already exists + var existingNics = + networkConfiguration.NetworkInterfaces.Where( + interfaces => string.Equals(interfaces.Name, this.Name, StringComparison.OrdinalIgnoreCase)).ToList(); + + if (existingNics.Any()) + { + throw new ArgumentOutOfRangeException(Resources.DuplicateNetworkInterfaceFound); + } + + var ipConfig = new AssignIPConfiguration(); + ipConfig.SubnetName = this.SubnetName; + if (!string.IsNullOrEmpty(this.StaticVNetIPAddress)) + { + ipConfig.StaticVirtualNetworkIPAddress = this.StaticVNetIPAddress; + } + + networkConfiguration.NetworkInterfaces.Add( + new AssignNetworkInterface() + { + Name = this.Name, + IPConfigurations = new AssignIPConfigurationCollection() + { + ipConfig + } + }); + WriteObject(VM); + } + } +} + + diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureDns.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureDns.cs new file mode 100644 index 000000000000..1e25633618f0 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureDns.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.PersistentVMs +{ + [Cmdlet(VerbsCommon.Get, "AzureDns"), OutputType(typeof(DnsServerList))] + public class GetAzureDnsCommand : PSCmdlet + { + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "DnsSettings Returned from Get-AzureDeployment")] + [ValidateNotNullOrEmpty] + [Alias("InputObject")] + public DnsSettings DnsSettings + { + get; + set; + } + + internal void ExecuteCommand() + { + if (DnsSettings != null && DnsSettings.DnsServers != null) + { + WriteObject(DnsSettings.DnsServers, true); + } + } + + protected override void ProcessRecord() + { + ExecuteCommand(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureInternalLoadBalancer.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureInternalLoadBalancer.cs new file mode 100644 index 000000000000..c00e6b47cc1b --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureInternalLoadBalancer.cs @@ -0,0 +1,71 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet( + VerbsCommon.Get, + "AzureInternalLoadBalancer"), + OutputType( + typeof(InternalLoadBalancerContext))] + public class GetAzureInternalLoadBalancer : ServiceManagementBaseCmdlet + { + [Parameter( + Mandatory = true, + Position = 0, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Service Name.")] + [ValidateNotNullOrEmpty] + public string ServiceName { get; set; } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.ComputeClient.Deployments.GetBySlot(this.ServiceName, DeploymentSlot.Production), + (s, d) => d.LoadBalancers == null ? null : d.LoadBalancers.Select( + b => new InternalLoadBalancerContext + { + InternalLoadBalancerName = b.Name, + ServiceName = this.ServiceName, + DeploymentName = d.Name, + IPAddress = b.FrontendIPConfiguration != null && b.FrontendIPConfiguration.StaticVirtualNetworkIPAddress != null ? + b.FrontendIPConfiguration.StaticVirtualNetworkIPAddress : GetInternalLoadBalancerIPAddress(d.VirtualIPAddresses, b.Name), + SubnetName = b.FrontendIPConfiguration != null ? b.FrontendIPConfiguration.SubnetName : null, + OperationDescription = CommandRuntime.ToString(), + OperationId = s.Id, + OperationStatus = s.Status.ToString() + })); + } + + private string GetInternalLoadBalancerIPAddress(IList virtualIPs, string ilbName) + { + var ilbIP = virtualIPs == null || !virtualIPs.Any() ? null + : virtualIPs.FirstOrDefault(ip => string.Equals(ip.Name, ilbName, StringComparison.OrdinalIgnoreCase)); + + return ilbIP == null ? null : ilbIP.Address; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureNetworkInterfaceConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureNetworkInterfaceConfig.cs new file mode 100644 index 000000000000..c12a7fa9267c --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureNetworkInterfaceConfig.cs @@ -0,0 +1,67 @@ + +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Network +{ + [Cmdlet(VerbsCommon.Get, NetworkInterfaceConfig), OutputType(typeof(NetworkInterface))] + public class GetAzureNetworkInterfaceConfig : PSCmdlet + { + protected const string NetworkInterfaceConfig = "AzureNetworkInterfaceConfig"; + + [Parameter(Position = 1, Mandatory = false, HelpMessage = "The NetworkInterface Name.")] + public string Name { get; set; } + + [Parameter( + Mandatory = true, + ValueFromPipeline = true, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Virtual Machine to update.")] + [ValidateNotNullOrEmpty] + [Alias("InputObject")] + public PersistentVMRoleContext VM + { + get; + set; + } + + protected override void ProcessRecord() + { + var networkInterfaces = VM.NetworkInterfaces; + + if (networkInterfaces != null) + { + if (string.IsNullOrEmpty(Name)) + { + WriteObject(networkInterfaces, true); + } + else + { + var nics = networkInterfaces.Where( + n => string.Equals(n.Name, this.Name, StringComparison.OrdinalIgnoreCase)).ToList(); + + if (nics.Count != 0) + { + WriteObject(nics.First()); + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureNetworkSecurityGroupConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureNetworkSecurityGroupConfig.cs new file mode 100644 index 000000000000..9bee4f32e509 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureNetworkSecurityGroupConfig.cs @@ -0,0 +1,57 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.Azure.Commands.Network; +using Microsoft.Azure.Commands.Network.NetworkSecurityGroup.Model; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsCommon.Get, NetworkSecurityGroupConfig), OutputType(typeof(IEnumerable))] + public class GetAzureNetworkSecurityGroupConfigCommand : VirtualMachineConfigurationCmdletBase + { + [Parameter(Mandatory = false)] + [ValidateNotNullOrEmpty] + public SwitchParameter Detailed { get; set; } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + + var networkConfiguration = GetNetworkConfiguration(); + if (networkConfiguration == null) + { + throw new ArgumentOutOfRangeException(Resources.NetworkConfigurationNotFoundOnPersistentVM); + } + + string networkSecurityGroupName = networkConfiguration.NetworkSecurityGroup; + if (string.IsNullOrEmpty(networkSecurityGroupName)) + { + WriteWarningWithTimestamp(string.Format(Resources.WarningVmIsNotDirectlyAssociatedWithNetworkSecurityGroup, this.VM.GetInstance().RoleName)); + } + + else + { + var networkClient = new NetworkClient(AzureSession.CurrentContext.Subscription, CommandRuntime); + INetworkSecurityGroup networkSecurityGroup = networkClient.GetNetworkSecurityGroup(networkSecurityGroupName, Detailed); + + WriteObject(networkSecurityGroup, true); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzurePublicIP.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzurePublicIP.cs new file mode 100644 index 000000000000..b730fe3aa82c --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzurePublicIP.cs @@ -0,0 +1,42 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsCommon.Get, PublicIPNoun), OutputType(typeof(AssignPublicIP))] + public class GetAzurePublicIPCommand : VirtualMachineConfigurationCmdletBase + { + [Parameter(Position = 1, HelpMessage = "The Public IP Name.")] + [ValidateNotNullOrEmpty] + public string PublicIPName { get; set; } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + + var networkConfiguration = GetNetworkConfiguration(); + if (networkConfiguration == null) + { + throw new ArgumentOutOfRangeException(Resources.NetworkConfigurationNotFoundOnPersistentVM); + } + + WriteObject(networkConfiguration.PublicIPs, true); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureReservedIP.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureReservedIP.cs new file mode 100644 index 000000000000..f268878ddddb --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureReservedIP.cs @@ -0,0 +1,59 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Network.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsCommon.Get, ReservedIPConstants.CmdletNoun), OutputType(typeof(ReservedIPContext))] + public class GetAzureReservedIPCmdlet : ServiceManagementBaseCmdlet + { + [Parameter(Mandatory = false, Position = 0, ValueFromPipelineByPropertyName = true, HelpMessage = "Reserved IP Name.")] + [ValidateNotNullOrEmpty] + public string ReservedIPName + { + get; + set; + } + + public void ExecuteCommand() + { + if (ReservedIPName != null) + { + ExecuteClientActionNewSM(null, + CommandRuntime.ToString(), + () => NetworkClient.ReservedIPs.Get(ReservedIPName), + (s, r) => new int[1].Select(i => ContextFactory(r, s))); + } + else + { + ExecuteClientActionNewSM(null, + CommandRuntime.ToString(), + () => NetworkClient.ReservedIPs.List(), + (s, r) => r.ReservedIPs.Select(p => ContextFactory(p, s))); + } + } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + this.ExecuteCommand(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureStaticVNetIP.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureStaticVNetIP.cs new file mode 100644 index 000000000000..9b1d0b295fab --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureStaticVNetIP.cs @@ -0,0 +1,55 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.PersistentVMs +{ + [Cmdlet(VerbsCommon.Get, StaticVNetIPNoun), OutputType(typeof(VirtualNetworkStaticIPContext))] + public class GetAzureStaticVNetIPCommand : VirtualMachineConfigurationCmdletBase + { + internal void ExecuteCommand() + { + var networkConfiguration = GetNetworkConfiguration(); + if (networkConfiguration == null) + { + throw new ArgumentOutOfRangeException(Resources.NetworkConfigurationNotFoundOnPersistentVM); + } + + if (!string.IsNullOrEmpty(networkConfiguration.StaticVirtualNetworkIPAddress)) + { + WriteObject(new VirtualNetworkStaticIPContext + { + IPAddress = networkConfiguration.StaticVirtualNetworkIPAddress + }); + } + } + + protected override void ProcessRecord() + { + try + { + base.ProcessRecord(); + ExecuteCommand(); + } + catch (Exception ex) + { + WriteError(new ErrorRecord(ex, string.Empty, ErrorCategory.CloseError, null)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureSubnet.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureSubnet.cs new file mode 100644 index 000000000000..e7c0c2d23d13 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureSubnet.cs @@ -0,0 +1,47 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.PersistentVMs +{ + [Cmdlet(VerbsCommon.Get, "AzureSubnet"), OutputType(typeof(SubnetNamesCollection))] + public class GetAzureSubnetCommand : VirtualMachineConfigurationCmdletBase + { + internal void ExecuteCommand() + { + var role = VM.GetInstance(); + + var networkConfiguration = role.ConfigurationSets + .OfType() + .SingleOrDefault(); + + if (networkConfiguration == null) + { + WriteObject(null); + } + else + { + WriteObject(networkConfiguration.SubnetNames, true); + } + } + + protected override void ProcessRecord() + { + ExecuteCommand(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureVNetConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureVNetConfig.cs new file mode 100644 index 000000000000..b7b19458176c --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureVNetConfig.cs @@ -0,0 +1,108 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Management.Automation; +using System.Net; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsCommon.Get, "AzureVNetConfig"), OutputType(typeof(VirtualNetworkConfigContext))] + public class GetAzureVNetConfigCommand : ServiceManagementBaseCmdlet + { + [Parameter(HelpMessage = "The file path to save the network configuration to.")] + [ValidateNotNullOrEmpty] + public string ExportToFile + { + get; + set; + } + + public VirtualNetworkConfigContext GetVirtualNetworkConfigProcess() + { + this.ValidateParameters(); + + VirtualNetworkConfigContext result = null; + + InvokeInOperationContext(() => + { + try + { + WriteVerboseWithTimestamp(string.Format(Resources.AzureVNetConfigBeginOperation, CommandRuntime.ToString())); + + var netcfg = this.NetworkClient.Networks.GetConfiguration(); + var operation = GetOperationNewSM(netcfg.RequestId); + + WriteVerboseWithTimestamp(string.Format(Resources.AzureVNetConfigCompletedOperation, CommandRuntime.ToString())); + + if (netcfg != null) + { + // TODO: might want to change this to an XML object of some kind... + var xml = netcfg.Configuration; + + var networkConfig = new VirtualNetworkConfigContext + { + XMLConfiguration = xml, + OperationId = operation.Id, + OperationDescription = CommandRuntime.ToString(), + OperationStatus = operation.Status.ToString() + }; + + if (!string.IsNullOrEmpty(this.ExportToFile)) + { + networkConfig.ExportToFile(this.ExportToFile); + } + + result = networkConfig; + } + } + catch (CloudException ex) + { + if (ex.Response.StatusCode == HttpStatusCode.NotFound && !IsVerbose()) + { + result = null; + } + else + { + this.WriteExceptionDetails(ex); + } + } + }); + + return result; + } + + protected override void OnProcessRecord() + { + var networkConfig = this.GetVirtualNetworkConfigProcess(); + + if (networkConfig != null) + { + WriteObject(networkConfig, true); + } + } + + private void ValidateParameters() + { + if (!string.IsNullOrEmpty(this.ExportToFile) && !Directory.Exists(Path.GetDirectoryName(this.ExportToFile))) + { + throw new ArgumentException(Resources.NetworkConfigurationDirectoryDoesNotExist); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureVNetSite.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureVNetSite.cs new file mode 100644 index 000000000000..4afc53af5276 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/GetAzureVNetSite.cs @@ -0,0 +1,91 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Management.Automation; +using System.Net; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Network.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsCommon.Get, "AzureVNetSite"), OutputType(typeof(IEnumerable))] + public class GetAzureVNetSiteCommand : ServiceManagementBaseCmdlet + { + [Parameter(Position = 0, Mandatory = false, HelpMessage = "The virtual network name.")] + [ValidateNotNullOrEmpty] + public string VNetName + { + get; + set; + } + + public IEnumerable GetVirtualNetworkSiteProcess() + { + IEnumerable result = null; + + InvokeInOperationContext(() => + { + try + { + WriteVerboseWithTimestamp(string.Format(Resources.AzureVNetSiteBeginOperation, CommandRuntime.ToString())); + var response = this.NetworkClient.Networks.List(); + var sites = response.VirtualNetworkSites; + + if (!string.IsNullOrEmpty(this.VNetName)) + { + sites = sites.Where(s => string.Equals(s.Name, this.VNetName, StringComparison.InvariantCultureIgnoreCase)).ToList(); + + if (sites.Count() == 0) + { + throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Resources.VirtualNetworkNameNotFound, this.VNetName), "VNetName"); + } + } + + var operation = GetOperationNewSM(response.RequestId); + WriteVerboseWithTimestamp(string.Format(Resources.AzureVNetSiteCompletedOperation, CommandRuntime.ToString())); + result = sites.Select(site => ContextFactory(site, operation)); + } + catch (CloudException ex) + { + if (ex.Response.StatusCode == HttpStatusCode.NotFound && !IsVerbose()) + { + result = null; + } + else + { + this.WriteExceptionDetails(ex); + } + } + }); + + return result; + } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + var virtualNetworkSites = this.GetVirtualNetworkSiteProcess(); + if (virtualNetworkSites != null) + { + WriteObject(virtualNetworkSites, true); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/NewAzureDns.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/NewAzureDns.cs new file mode 100644 index 000000000000..d50e2d28d64c --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/NewAzureDns.cs @@ -0,0 +1,58 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Network +{ + [Cmdlet(VerbsCommon.New, "AzureDns"), OutputType(typeof(DnsServer))] + public class NewAzureDnsCommand : Cmdlet + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Name of the DNS Server")] + [ValidateNotNullOrEmpty] + public string Name + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = true, HelpMessage = "IP Address of the DNS Server")] + [ValidateNotNullOrEmpty] + public string IPAddress + { + get; + set; + } + + internal void ExecuteCommand() + { + WriteObject(new DnsServer {Address = IPAddress, Name = Name}, true); + } + + protected override void ProcessRecord() + { + try + { + base.ProcessRecord(); + ExecuteCommand(); + } + catch (Exception ex) + { + WriteError(new ErrorRecord(ex, string.Empty, ErrorCategory.CloseError, null)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/NewAzureInternalLoadBalancerConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/NewAzureInternalLoadBalancerConfig.cs new file mode 100644 index 000000000000..0144777b204b --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/NewAzureInternalLoadBalancerConfig.cs @@ -0,0 +1,78 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using System.Net; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet( + VerbsCommon.New, + AzureInternalLoadBalancerSettingNoun, + DefaultParameterSetName = ServiceAndSlotParamSet), + OutputType( + typeof(InternalLoadBalancerConfig))] + public class NewAzureInternalLoadBalancerConfig : ServiceManagementBaseCmdlet + { + protected const string AzureInternalLoadBalancerSettingNoun = "AzureInternalLoadBalancerConfig"; + protected const string ServiceAndSlotParamSet = "ServiceAndSlot"; + protected const string SubnetNameOnlyParamSet = "SubnetNameOnly"; + protected const string SubnetNameAndIPParamSet = "SubnetNameAndIP"; + + [Parameter( + Mandatory = true, + Position = 0, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Internal Load Balancer Name.")] + [ValidateNotNullOrEmpty] + public string InternalLoadBalancerName { get; set; } + + [Parameter( + ParameterSetName = SubnetNameOnlyParamSet, + Position = 1, + Mandatory = true, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Subnet Name.")] + [Parameter( + ParameterSetName = SubnetNameAndIPParamSet, + Position = 1, + Mandatory = true, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Subnet Name.")] + [ValidateNotNullOrEmpty] + public string SubnetName { get; set; } + + [Parameter( + ParameterSetName = SubnetNameAndIPParamSet, + Position = 2, + Mandatory = true, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Subnet IP Address.")] + [ValidateNotNullOrEmpty] + public IPAddress StaticVNetIPAddress { get; set; } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + WriteObject(new InternalLoadBalancerConfig + { + InternalLoadBalancerName = this.InternalLoadBalancerName, + SubnetName = this.SubnetName, + IPAddress = this.StaticVNetIPAddress == null ? null : this.StaticVNetIPAddress.ToString() + }); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/NewAzureReservedIP.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/NewAzureReservedIP.cs new file mode 100644 index 000000000000..9806a32e84db --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/NewAzureReservedIP.cs @@ -0,0 +1,79 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Network.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsCommon.New, ReservedIPConstants.CmdletNoun, DefaultParameterSetName = ReserveNewIPParamSet), OutputType(typeof(ManagementOperationContext))] + public class NewAzureReservedIPCmdlet : ServiceManagementBaseCmdlet + { + protected const string ReserveNewIPParamSet = "CreateNewReservedIP"; + protected const string ReserveInUseIPUsingSlotParamSet = "CreateInUseReservedIPUsingSlot"; + protected const string ReserveInUseIPParamSet = "CreateInUseReservedIP"; + + [Parameter(Mandatory = true, Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = ReserveNewIPParamSet, HelpMessage = "Reserved IP Name.")] + [Parameter(Mandatory = true, Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = ReserveInUseIPUsingSlotParamSet, HelpMessage = "Reserved IP Name.")] + [Parameter(Mandatory = true, Position = 0, ValueFromPipelineByPropertyName = true, ParameterSetName = ReserveInUseIPParamSet, HelpMessage = "Reserved IP Name.")] + [ValidateNotNullOrEmpty] + public string ReservedIPName + { + get; + set; + } + + [Parameter(Mandatory = false, Position = 1, ValueFromPipelineByPropertyName = true, ParameterSetName = ReserveNewIPParamSet, HelpMessage = "Reserved IP Label.")] + [Parameter(Mandatory = false, Position = 3, ValueFromPipelineByPropertyName = true, ParameterSetName = ReserveInUseIPUsingSlotParamSet, HelpMessage = "Reserved IP Label.")] + [Parameter(Mandatory = false, Position = 2, ValueFromPipelineByPropertyName = true, ParameterSetName = ReserveInUseIPParamSet, HelpMessage = "Reserved IP Label.")] + [ValidateNotNullOrEmpty] + public string Label + { + get; + set; + } + + [Parameter(Mandatory = true, Position = 2, ValueFromPipelineByPropertyName = true, ParameterSetName = ReserveNewIPParamSet, HelpMessage = "Location Name.")] + [Parameter(Mandatory = true, Position = 4, ValueFromPipelineByPropertyName = true, ParameterSetName = ReserveInUseIPUsingSlotParamSet, HelpMessage = "Location Name.")] + [Parameter(Mandatory = true, Position = 3, ValueFromPipelineByPropertyName = true, ParameterSetName = ReserveInUseIPParamSet, HelpMessage = "Location Name.")] + [ValidateNotNullOrEmpty] + public string Location + { + get; + set; + } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => + { + var parameters = new NetworkReservedIPCreateParameters + { + Name = this.ReservedIPName, + Label = this.Label, + Location = this.Location + }; + + return this.NetworkClient.ReservedIPs.Create(parameters); + }); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureDns.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureDns.cs new file mode 100644 index 000000000000..80c961cce520 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureDns.cs @@ -0,0 +1,80 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Store; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Network +{ + [Cmdlet(VerbsCommon.Remove, "AzureDns"), OutputType(typeof(ManagementOperationContext))] + public class RemoveAzureDnsCommand : ServiceManagementBaseCmdlet + { + public PowerShellCustomConfirmation CustomConfirmation; + + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Name of the DNS Server")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Position = 1, Mandatory = true, HelpMessage = "Service Name")] + [ValidateNotNullOrEmpty] + public string ServiceName { get; set; } + + [Parameter(Position = 2, Mandatory = false, HelpMessage = "Do not confirm deletion of deployment")] + public SwitchParameter Force { get; set; } + + private void RemoveDnsServer() + { + ServiceManagementProfile.Initialize(); + + ExecuteClientActionNewSM(null, + CommandRuntime.ToString(), + () => + { + var deploymentName = this.ComputeClient.Deployments.GetBySlot( + this.ServiceName, + DeploymentSlot.Production).Name; + + return this.ComputeClient.DnsServer.DeleteDNSServer( + this.ServiceName, + deploymentName, + this.Name); + }); + } + + private string GetWarningMessage() + { + return string.Format(Resources.RemoveAzureDnsServerWarning, this.Name, this.ServiceName); + } + + protected override void ProcessRecord() + { + if (this.Force.IsPresent) + { + this.RemoveDnsServer(); + } + else + { + CustomConfirmation = CustomConfirmation ?? new PowerShellCustomConfirmation(Host); + bool remove = CustomConfirmation.ShouldProcess(Resources.RemoveAzureDnsServerCaption, this.GetWarningMessage()); + if (remove) + { + this.RemoveDnsServer(); + } + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureInternalLoadBalancer.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureInternalLoadBalancer.cs new file mode 100644 index 000000000000..a7fc9b7a0db6 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureInternalLoadBalancer.cs @@ -0,0 +1,69 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsCommon.Remove, "AzureInternalLoadBalancer"), OutputType(typeof(ManagementOperationContext))] + public class RemoveAzureInternalLoadBalancer : ServiceManagementBaseCmdlet + { + [Parameter( + Mandatory = true, + Position = 0, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Service Name.")] + [ValidateNotNullOrEmpty] + public string ServiceName { get; set; } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + + ExecuteClientActionNewSM(null, + CommandRuntime.ToString(), + () => + { + OperationResponse op = null; + var deployment = this.ComputeClient.Deployments.GetBySlot(this.ServiceName, DeploymentSlot.Production); + if (deployment.LoadBalancers != null && deployment.LoadBalancers.Any()) + { + foreach (var b in deployment.LoadBalancers) + { + if (string.Equals(GetLoadBalancerType(b), FrontendIPConfigurationType.Private, StringComparison.OrdinalIgnoreCase)) + { + op = this.ComputeClient.LoadBalancers.Delete(this.ServiceName, deployment.Name, b.Name); + } + } + } + + return op; + }); + } + + protected string GetLoadBalancerType(LoadBalancer b) + { + if (b != null && b.FrontendIPConfiguration != null) + { + return b.FrontendIPConfiguration.Type; + } + + return null; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureNetworkInterfaceConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureNetworkInterfaceConfig.cs new file mode 100644 index 000000000000..1ef5dbdc521c --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureNetworkInterfaceConfig.cs @@ -0,0 +1,47 @@ + +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Network +{ + [Cmdlet(VerbsCommon.Remove, NetworkInterfaceConfig), OutputType(typeof(IPersistentVM))] + public class RemoveAzureNetworkInterfaceConfig : VirtualMachineConfigurationCmdletBase + { + [Parameter(Position = 1, Mandatory = true, HelpMessage = "The NetworkInterface Name.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + + var networkConfiguration = GetNetworkConfiguration(); + if (networkConfiguration == null) + { + throw new ArgumentOutOfRangeException(Resources.NetworkConfigurationNotFoundOnPersistentVM); + } + + if (networkConfiguration.NetworkInterfaces != null) + { + networkConfiguration.NetworkInterfaces.RemoveAll(e => string.Equals(e.Name, this.Name, StringComparison.OrdinalIgnoreCase)); + } + + WriteObject(VM, true); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureNetworkSecurityGroupConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureNetworkSecurityGroupConfig.cs new file mode 100644 index 000000000000..eae5eeeec2e6 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureNetworkSecurityGroupConfig.cs @@ -0,0 +1,60 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsCommon.Remove, NetworkSecurityGroupConfig), OutputType(typeof(IPersistentVM))] + public class RemoveAzureNetworkSecurityGroupConfigCommand : VirtualMachineConfigurationCmdletBase + { + [Parameter(Position = 1, Mandatory = false, HelpMessage = "The Network Security Group Name.")] + [ValidateNotNullOrEmpty] + public string NetworkSecurityGroupName { get; set; } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + + var networkConfiguration = GetNetworkConfiguration(); + if (networkConfiguration == null) + { + throw new ArgumentOutOfRangeException(Resources.NetworkConfigurationNotFoundOnPersistentVM); + } + + if (string.IsNullOrEmpty(this.NetworkSecurityGroupName)) + { + networkConfiguration.NetworkSecurityGroup = null; + } + else if (this.NetworkSecurityGroupName.Equals(networkConfiguration.NetworkSecurityGroup)) + { + networkConfiguration.NetworkSecurityGroup = null; + } + else + { + // the specified Network Security Group is not directly associated with this VM + WriteErrorWithTimestamp( + string.Format( + Resources.CannotRemoveNetworkSecurityGroupBecauseNotDirectlyAssociatedwithVm, + NetworkSecurityGroupName, + VM.GetInstance().RoleName)); + } + + WriteObject(VM, true); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzurePublicIP.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzurePublicIP.cs new file mode 100644 index 000000000000..49f550a41302 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzurePublicIP.cs @@ -0,0 +1,52 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsCommon.Remove, PublicIPNoun), OutputType(typeof(IPersistentVM))] + public class RemoveAzurePublicIPCommand : VirtualMachineConfigurationCmdletBase + { + [Parameter(Position = 1, HelpMessage = "The Public IP Name.")] + [ValidateNotNullOrEmpty] + public string PublicIPName { get; set; } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + + var networkConfiguration = GetNetworkConfiguration(); + if (networkConfiguration == null) + { + throw new ArgumentOutOfRangeException(Resources.NetworkConfigurationNotFoundOnPersistentVM); + } + + if (string.IsNullOrEmpty(this.PublicIPName)) + { + networkConfiguration.PublicIPs = null; + } + else if (networkConfiguration.PublicIPs != null) + { + networkConfiguration.PublicIPs.RemoveAll( + e => string.Equals(e.Name, this.PublicIPName, StringComparison.OrdinalIgnoreCase)); + } + + WriteObject(VM, true); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureReservedIP.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureReservedIP.cs new file mode 100644 index 000000000000..a15d45301c56 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureReservedIP.cs @@ -0,0 +1,51 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsCommon.Remove, ReservedIPConstants.CmdletNoun, DefaultParameterSetName = RemoveReservedIPParamSet), OutputType(typeof(ManagementOperationContext))] + public class RemoveAzureReservedIPCmdlet : ServiceManagementBaseCmdlet + { + protected const string RemoveReservedIPParamSet = "RemoveReservedIP"; + + [Parameter(Mandatory = true, Position = 0, ValueFromPipelineByPropertyName = true, HelpMessage = "Reserved IP Name.")] + [ValidateNotNullOrEmpty] + public string ReservedIPName { get; set;} + + [Parameter(Position = 1, HelpMessage = "Do not confirm deletion of deployment")] + public SwitchParameter Force { get; set; } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + + ConfirmAction( + Force.IsPresent, + string.Format(Resources.RemoveReservedIPWarning), + Resources.RemoveReservedIPWhatIfMessage, + string.Empty, + () => + { + ExecuteClientActionNewSM(null, + CommandRuntime.ToString(), + () => NetworkClient.ReservedIPs.Delete(ReservedIPName)); + }); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureStaticVNetIP.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureStaticVNetIP.cs new file mode 100644 index 000000000000..b3868d315552 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureStaticVNetIP.cs @@ -0,0 +1,50 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsCommon.Remove, StaticVNetIPNoun), OutputType(typeof(IPersistentVM))] + public class RemoveAzureStaticVNetIPCommand : VirtualMachineConfigurationCmdletBase + { + internal void ExecuteCommand() + { + var networkConfiguration = GetNetworkConfiguration(); + if (networkConfiguration == null) + { + throw new ArgumentOutOfRangeException(Resources.NetworkConfigurationNotFoundOnPersistentVM); + } + + networkConfiguration.StaticVirtualNetworkIPAddress = null; + WriteObject(VM, true); + } + + protected override void ProcessRecord() + { + try + { + base.ProcessRecord(); + ExecuteCommand(); + } + catch (Exception ex) + { + WriteError(new ErrorRecord(ex, string.Empty, ErrorCategory.CloseError, null)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureVNetConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureVNetConfig.cs new file mode 100644 index 000000000000..1b49e9f10e17 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/RemoveAzureVNetConfig.cs @@ -0,0 +1,50 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System.Management.Automation; +using System.Xml.Linq; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Network.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsCommon.Remove, "AzureVNetConfig"), OutputType(typeof(ManagementOperationContext))] + public class RemoveAzureVNetConfigCommand : ServiceManagementBaseCmdlet + { + private static readonly XNamespace NetconfigNamespace = "http://schemas.microsoft.com/ServiceHosting/2011/07/NetworkConfiguration"; + private static readonly XNamespace InstanceNamespace = "http://www.w3.org/2001/XMLSchema-instance"; + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + + var netConfig = new XElement( + NetconfigNamespace + "NetworkConfiguration", + new XAttribute("xmlns", NetconfigNamespace.NamespaceName), + new XAttribute(XNamespace.Xmlns + "xsi", InstanceNamespace.NamespaceName), + new XElement(NetconfigNamespace + "VirtualNetworkConfiguration")); + + NetworkSetConfigurationParameters networkConfigParams = new NetworkSetConfigurationParameters + { + Configuration = netConfig.ToString() + }; + + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.NetworkClient.Networks.SetConfiguration(networkConfigParams)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzureDns.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzureDns.cs new file mode 100644 index 000000000000..0a7188e9475d --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzureDns.cs @@ -0,0 +1,61 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Network +{ + [Cmdlet(VerbsCommon.Set, "AzureDns"), OutputType(typeof(ManagementOperationContext))] + public class SetAzureDnsCommand : ServiceManagementBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Name of the DNS Server")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Position = 1, Mandatory = true, HelpMessage = "IP Address of the DNS Server")] + [ValidateNotNullOrEmpty] + public string IPAddress { get; set; } + + [Parameter(Position = 2, Mandatory = true, HelpMessage = "Service Name")] + [ValidateNotNullOrEmpty] + public string ServiceName { get; set; } + + protected override void ProcessRecord() + { + ServiceManagementProfile.Initialize(); + + var dnsUpdateParameters = new DNSUpdateParameters() + { + Address = this.IPAddress, + Name = this.Name + }; + ExecuteClientActionNewSM(null, + CommandRuntime.ToString(), + () => + { + var deploymentName = this.ComputeClient.Deployments.GetBySlot( + this.ServiceName, + DeploymentSlot.Production).Name; + + return this.ComputeClient.DnsServer.UpdateDNSServer( + this.ServiceName, + deploymentName, + dnsUpdateParameters.Name, + dnsUpdateParameters); + }); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzureInternalLoadBalancer.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzureInternalLoadBalancer.cs new file mode 100644 index 000000000000..5f5c40265bcc --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzureInternalLoadBalancer.cs @@ -0,0 +1,106 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using System.Net; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet( + VerbsCommon.Set, + AzureInternalLoadBalancerNoun, + DefaultParameterSetName = ServiceAndSlotParamSet), + OutputType( + typeof(ManagementOperationContext))] + public class SetAzureInternalLoadBalancer : ServiceManagementBaseCmdlet + { + protected const string AzureInternalLoadBalancerNoun = "AzureInternalLoadBalancer"; + protected const string ServiceAndSlotParamSet = "ServiceAndSlot"; + protected const string SubnetNameOnlyParamSet = "SubnetNameOnly"; + protected const string SubnetNameAndIPParamSet = "SubnetNameAndIP"; + + [Parameter( + Mandatory = true, + Position = 0, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Internal Load Balancer Name.")] + [ValidateNotNullOrEmpty] + public string InternalLoadBalancerName { get; set; } + + [Parameter( + Mandatory = true, + Position = 1, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Service Name.")] + [ValidateNotNullOrEmpty] + public string ServiceName { get; set; } + + [Parameter( + ParameterSetName = SubnetNameOnlyParamSet, + Mandatory = true, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Subnet Name.")] + [Parameter(ParameterSetName = SubnetNameAndIPParamSet, + Mandatory = true, + Position = 2, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Subnet Name.")] + [ValidateNotNullOrEmpty] + public string SubnetName { get; set; } + + [Parameter( + ParameterSetName = SubnetNameAndIPParamSet, + Mandatory = true, + Position = 3, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Subnet IP Address.")] + [ValidateNotNullOrEmpty] + public IPAddress StaticVNetIPAddress { get; set; } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + + var parameters = new LoadBalancerUpdateParameters() + { + Name = this.InternalLoadBalancerName, + FrontendIPConfiguration = new FrontendIPConfiguration + { + Type = FrontendIPConfigurationType.Private, + SubnetName = this.SubnetName, + StaticVirtualNetworkIPAddress = this.StaticVNetIPAddress == null ? null + : this.StaticVNetIPAddress.ToString() + } + }; + + ExecuteClientActionNewSM(null, + CommandRuntime.ToString(), + () => + { + var deploymentName = this.ComputeClient.Deployments.GetBySlot( + this.ServiceName, + DeploymentSlot.Production).Name; + + return this.ComputeClient.LoadBalancers.Update( + this.ServiceName, + deploymentName, + this.InternalLoadBalancerName, + parameters); + }); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzureNetworkInterfaceConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzureNetworkInterfaceConfig.cs new file mode 100644 index 000000000000..f3d282fe47a9 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzureNetworkInterfaceConfig.cs @@ -0,0 +1,69 @@ + +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Network +{ + [Cmdlet(VerbsCommon.Set, NetworkInterfaceConfig), OutputType(typeof(IPersistentVM))] + public class SetAzureNetworkInterfaceConfig : VirtualMachineConfigurationCmdletBase + { + [Parameter(Position = 1, Mandatory = true, HelpMessage = "The NetworkInterface Name.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Position = 2, Mandatory = true, HelpMessage = "The Subnet Name.")] + [ValidateNotNullOrEmpty] + public string SubnetName { get; set; } + + [Parameter(Position = 3, Mandatory = false, HelpMessage = "The Subnet Name.")] + public string StaticVNetIPAddress { get; set; } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + + var networkConfiguration = GetNetworkConfiguration(); + if (networkConfiguration == null) + { + throw new ArgumentOutOfRangeException(Resources.NetworkConfigurationNotFoundOnPersistentVM); + } + + if (networkConfiguration.NetworkInterfaces != null) + { + // Check if the networkInterface exists + var existingNics = + networkConfiguration.NetworkInterfaces.Where( + interfaces => string.Equals(interfaces.Name, this.Name, StringComparison.OrdinalIgnoreCase)).ToList(); + + if (!existingNics.Any()) + { + throw new ArgumentOutOfRangeException(Resources.NetworkInterfaceNotFound); + } + + foreach (var interfaces in existingNics) + { + interfaces.IPConfigurations.First().SubnetName = this.SubnetName; + interfaces.IPConfigurations.First().StaticVirtualNetworkIPAddress = this.StaticVNetIPAddress; + } + } + + WriteObject(VM, true); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzureNetworkSecurityGroupConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzureNetworkSecurityGroupConfig.cs new file mode 100644 index 000000000000..eee94c40ff3d --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzureNetworkSecurityGroupConfig.cs @@ -0,0 +1,44 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsCommon.Set, NetworkSecurityGroupConfig), OutputType(typeof(IPersistentVM)), Alias] + public class SetAzureNetworkSecurityGroupConfigCommand : VirtualMachineConfigurationCmdletBase + { + [Parameter(Position = 1, Mandatory = true, HelpMessage = "The Network Security Group Name.")] + public string NetworkSecurityGroupName { get; set; } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + + var networkConfiguration = GetNetworkConfiguration(); + if (networkConfiguration == null) + { + throw new ArgumentOutOfRangeException(Resources.NetworkConfigurationNotFoundOnPersistentVM); + } + + networkConfiguration.NetworkSecurityGroup = NetworkSecurityGroupName; + + WriteObject(VM); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzurePublicIP.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzurePublicIP.cs new file mode 100644 index 000000000000..2129a3ff874e --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzurePublicIP.cs @@ -0,0 +1,77 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsCommon.Set, PublicIPNoun), OutputType(typeof(IPersistentVM))] + public class SetAzurePublicIPCommand : VirtualMachineConfigurationCmdletBase + { + [Parameter(Position = 1, Mandatory = true, HelpMessage = "The Public IP Name.")] + [ValidateNotNullOrEmpty] + public string PublicIPName { get; set; } + + [Parameter(Position = 2, Mandatory = false, HelpMessage = "Idle Timeout.")] + [ValidateNotNullOrEmpty] + public int? IdleTimeoutInMinutes { get; set; } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + + var networkConfiguration = GetNetworkConfiguration(); + if (networkConfiguration == null) + { + throw new ArgumentOutOfRangeException(Resources.NetworkConfigurationNotFoundOnPersistentVM); + } + + if (networkConfiguration.PublicIPs == null) + { + networkConfiguration.PublicIPs = new AssignPublicIPCollection(); + } + + if (networkConfiguration.PublicIPs.Any()) + { + networkConfiguration.PublicIPs.First().Name = this.PublicIPName; + if (this.ParameterSpecified("IdleTimeoutInMinutes")) + { + networkConfiguration.PublicIPs.First().IdleTimeoutInMinutes = this.IdleTimeoutInMinutes; + } + } + else + { + networkConfiguration.PublicIPs.Add( + new AssignPublicIP + { + Name = this.PublicIPName, + IdleTimeoutInMinutes = this.ParameterSpecified("IdleTimeoutInMinutes") ? this.IdleTimeoutInMinutes : null, + }); + } + + WriteObject(VM); + } + + private bool ParameterSpecified(string parameterName) + { + // Check for parameters by name so we can tell the difference between + // the user not specifying them, and the user specifying null/empty. + return this.MyInvocation.BoundParameters.ContainsKey(parameterName); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzureStaticVNetIP.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzureStaticVNetIP.cs new file mode 100644 index 000000000000..833a881ad542 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzureStaticVNetIP.cs @@ -0,0 +1,58 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsCommon.Set, StaticVNetIPNoun), OutputType(typeof(IPersistentVM))] + public class SetAzureStaticVNetIPCommand : VirtualMachineConfigurationCmdletBase + { + [Parameter(Position = 1, Mandatory = true, HelpMessage = "The Static Customer IP Address.")] + [ValidateNotNullOrEmpty] + public string IPAddress + { + get; + set; + } + + internal void ExecuteCommand() + { + var networkConfiguration = GetNetworkConfiguration(); + if (networkConfiguration == null) + { + throw new ArgumentOutOfRangeException(Resources.NetworkConfigurationNotFoundOnPersistentVM); + } + + networkConfiguration.StaticVirtualNetworkIPAddress = IPAddress; + WriteObject(VM, true); + } + + protected override void ProcessRecord() + { + try + { + base.ProcessRecord(); + ExecuteCommand(); + } + catch (Exception ex) + { + WriteError(new ErrorRecord(ex, string.Empty, ErrorCategory.CloseError, null)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzureSubnet.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzureSubnet.cs new file mode 100644 index 000000000000..20c92bc75c50 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzureSubnet.cs @@ -0,0 +1,68 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsCommon.Set, "AzureSubnet"), OutputType(typeof(IPersistentVM))] + public class SetAzureSubnetCommand : VirtualMachineConfigurationCmdletBase + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "The list of subnet names.")] + public string[] SubnetNames + { + get; + set; + } + + internal void ExecuteCommand() + { + var role = VM.GetInstance(); + + var networkConfiguration = role.ConfigurationSets + .OfType() + .SingleOrDefault(); + + if (networkConfiguration == null) + { + networkConfiguration = new NetworkConfigurationSet(); + role.ConfigurationSets.Add(networkConfiguration); + } + + networkConfiguration.SubnetNames = new SubnetNamesCollection(); + foreach (string subnet in SubnetNames) + { + networkConfiguration.SubnetNames.Add(subnet); + } + + WriteObject(VM, true); + } + + protected override void ProcessRecord() + { + try + { + base.ProcessRecord(); + ExecuteCommand(); + } + catch (Exception ex) + { + WriteError(new ErrorRecord(ex, string.Empty, ErrorCategory.CloseError, null)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzureVNetConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzureVNetConfig.cs new file mode 100644 index 000000000000..83b8f5640b84 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/SetAzureVNetConfig.cs @@ -0,0 +1,76 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Network.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsCommon.Set, "AzureVNetConfig"), OutputType(typeof(ManagementOperationContext))] + public class SetAzureVNetConfigCommand : ServiceManagementBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Path to the Network Configuration file (.xml).")] + [ValidateNotNullOrEmpty] + public string ConfigurationPath + { + get; + set; + } + + internal void ExecuteCommand() + { + ValidateParameters(); + StreamReader sr = null; + try + { + sr = new StreamReader(this.ConfigurationPath); + + var netParams = new NetworkSetConfigurationParameters + { + Configuration = sr.ReadToEnd() + }; + + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.NetworkClient.Networks.SetConfiguration(netParams)); + } + finally + { + if (sr != null) + { + sr.Close(); + } + } + } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + this.ExecuteCommand(); + } + + private void ValidateParameters() + { + if (!File.Exists(ConfigurationPath)) + { + throw new ArgumentException(Resources.NetworkConfigurationFilePathDoesNotExist); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/TestAzureStaticVNetIP.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/TestAzureStaticVNetIP.cs new file mode 100644 index 000000000000..9d6f02ab8d35 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Network/TestAzureStaticVNetIP.cs @@ -0,0 +1,51 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Network.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsDiagnostic.Test, "AzureStaticVNetIP"), OutputType(typeof(VirtualNetworkStaticIPAvailabilityContext))] + public class TestAzureStaticVNetIPCommand : ServiceManagementBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "The virtual network name.")] + [ValidateNotNullOrEmpty] + public string VNetName + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = true, HelpMessage = "The static IP address.")] + [ValidateNotNullOrEmpty] + public string IPAddress + { + get; + set; + } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + ExecuteClientActionNewSM( + null, + this.CommandRuntime.ToString(), + () => this.NetworkClient.StaticIPs.Check(VNetName, IPAddress), + (operation, response) => ContextFactory(response, operation)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/AddAzureProvisioningConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/AddAzureProvisioningConfig.cs new file mode 100644 index 000000000000..439e2841a975 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/AddAzureProvisioningConfig.cs @@ -0,0 +1,178 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using System.Security.Cryptography.X509Certificates; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Common; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; +using Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + /// + /// Updates a persistent VM object with a provisioning configuration. + /// + [Cmdlet(VerbsCommon.Add, "AzureProvisioningConfig", DefaultParameterSetName = WindowsParameterSetName), OutputType(typeof(IPersistentVM))] + public class AddAzureProvisioningConfigCommand : ProvisioningConfigurationCmdletBase + { + [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = "Virtual Machine to update.")] + [ValidateNotNullOrEmpty] + [Alias("InputObject")] + public IPersistentVM VM + { + get; + set; + } + + [Parameter(HelpMessage = "To disable IaaS provision guest agent.")] + public SwitchParameter DisableGuestAgent + { + get; + set; + } + + internal void ExecuteCommand() + { + ServiceManagementProfile.Initialize(); + var role = VM.GetInstance(); + var configSetbuilder = new ConfigurationSetsBuilder(role.ConfigurationSets); + if (Linux.IsPresent) + { + role.NoSSHEndpoint = NoSSHEndpoint.IsPresent; + + if (!string.IsNullOrEmpty(this.LinuxUser)) + { + SetProvisioningConfiguration(configSetbuilder.LinuxConfigurationBuilder.Provisioning); + configSetbuilder.LinuxConfigurationBuilder.Provisioning.HostName = role.RoleName; + } + + if (!(DisableSSH.IsPresent || NoSSHEndpoint.IsPresent)) + { + configSetbuilder.NetworkConfigurationBuilder.AddSshEndpoint(); + } + } + else + { + role.NoRDPEndpoint = NoRDPEndpoint.IsPresent; + + if (!string.IsNullOrEmpty(this.AdminUsername)) + { + SetProvisioningConfiguration(configSetbuilder.WindowsConfigurationBuilder.Provisioning); + configSetbuilder.WindowsConfigurationBuilder.Provisioning.ComputerName = role.RoleName; + } + + if (!NoRDPEndpoint.IsPresent) + { + configSetbuilder.NetworkConfigurationBuilder.AddRdpEndpoint(); + } + + if (!this.DisableWinRMHttps.IsPresent) + { + var builder = new WinRmConfigurationBuilder(); + if (this.EnableWinRMHttp.IsPresent) + { + builder.AddHttpListener(); + } + builder.AddHttpsListener(this.WinRMCertificate); + + if (!string.IsNullOrEmpty(AdminUsername)) + { + configSetbuilder.WindowsConfigurationBuilder.Provisioning.WinRM = builder.Configuration; + } + + if(!this.NoWinRMEndpoint.IsPresent) + { + configSetbuilder.NetworkConfigurationBuilder.AddWinRmEndpoint(); + } + role.WinRMCertificate = WinRMCertificate; + } + + role.X509Certificates = new List(); + if (this.X509Certificates != null) + { + role.X509Certificates.AddRange(this.X509Certificates); + } + + role.NoExportPrivateKey = this.NoExportPrivateKey.IsPresent; + role.ProvisionGuestAgent = !DisableGuestAgent.IsPresent; + + role.ResourceExtensionReferences = this.DisableGuestAgent.IsPresent ? null : + new VirtualMachineExtensionImageFactory(this.ComputeClient).MakeList( + VirtualMachineBGInfoExtensionCmdletBase.ExtensionDefaultPublisher, + VirtualMachineBGInfoExtensionCmdletBase.ExtensionDefaultName, + VirtualMachineBGInfoExtensionCmdletBase.ExtensionDefaultVersion); + } + + WriteObject(VM, true); + } + + protected override void ProcessRecord() + { + try + { + base.ProcessRecord(); + ExecuteCommand(); + } + catch (Exception ex) + { + WriteError(new ErrorRecord(ex, string.Empty, ErrorCategory.CloseError, null)); + } + } + + protected void ValidateParameters() + { + var vm = (PersistentVM)this.VM; + + ValidateLinuxParameterSetParameters(vm); + ValidateWindowsParameterSetParameters(vm); + } + + private void ValidateLinuxParameterSetParameters(PersistentVM vm) + { + if (LinuxParameterSetName.Equals(ParameterSetName, StringComparison.OrdinalIgnoreCase)) + { + if (!this.NoSSHPassword && ValidationHelpers.IsLinuxPasswordValid(Password) == false) + { + throw new ArgumentException(Resources.PasswordNotComplexEnough); + } + + if (ValidationHelpers.IsLinuxHostNameValid(vm.RoleName) == false) + { + throw new ArgumentException(Resources.InvalidHostName); + } + } + } + + private void ValidateWindowsParameterSetParameters(PersistentVM vm) + { + if (WindowsParameterSetName.Equals(ParameterSetName, StringComparison.OrdinalIgnoreCase) || + WindowsDomainParameterSetName.Equals(ParameterSetName, StringComparison.OrdinalIgnoreCase)) + { + if (ValidationHelpers.IsWindowsPasswordValid(Password) == false) + { + throw new ArgumentException(Resources.PasswordNotComplexEnough); + } + + if (ValidationHelpers.IsWindowsComputerNameValid(vm.RoleName) == false) + { + throw new ArgumentException(Resources.InvalidComputerName); + } + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/ExportAzureVM.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/ExportAzureVM.cs new file mode 100644 index 000000000000..7dce64f9c893 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/ExportAzureVM.cs @@ -0,0 +1,128 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.ObjectModel; +using System.Globalization; +using System.Linq; +using System.Management.Automation; +using AutoMapper; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + using PVM = Model; + + [Cmdlet(VerbsData.Export, "AzureVM")] + public class ExportAzureVMCommand : IaaSDeploymentManagementCmdletBase + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Service name.")] + [ValidateNotNullOrEmpty] + public override string ServiceName + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the virtual machine to get.")] + public virtual string Name + { + get; + set; + } + + [Parameter(Position = 2, Mandatory = true, HelpMessage = "The file path in which serialize the persistent VM role state.")] + [ValidateNotNullOrEmpty] + public string Path + { + get; + set; + } + + protected override void ExecuteCommand() + { + ServiceManagementProfile.Initialize(); + + base.ExecuteCommand(); + if (CurrentDeploymentNewSM == null) + { + return; + } + + var role = CurrentDeploymentNewSM.Roles.FirstOrDefault(r => r.RoleName.Equals(Name, StringComparison.InvariantCultureIgnoreCase)); + if(role == null) + { + throw new ApplicationException(string.Format(Resources.NoCorrespondingRoleCanBeFoundInDeployment, Name)); + } + try + { + var vm = role; + var roleInstance = CurrentDeploymentNewSM.RoleInstances.First(r => r.RoleName == vm.RoleName); + var vmContext = new PVM.PersistentVMRoleContext + { + ServiceName = ServiceName, + Name = vm.RoleName, + DeploymentName = CurrentDeploymentNewSM.Name, + AvailabilitySetName = vm.AvailabilitySetName, + Label = vm.Label, + InstanceSize = vm.RoleSize.ToString(), + InstanceStatus = roleInstance.InstanceStatus, + IpAddress = roleInstance.IPAddress, + InstanceStateDetails = roleInstance.InstanceStateDetails, + PowerState = roleInstance.PowerState.ToString(), + InstanceErrorCode = roleInstance.InstanceErrorCode, + InstanceName = roleInstance.InstanceName, + InstanceFaultDomain = roleInstance.InstanceFaultDomain.HasValue ? roleInstance.InstanceFaultDomain.Value.ToString(CultureInfo.InvariantCulture) : null, + InstanceUpgradeDomain = roleInstance.InstanceUpgradeDomain.HasValue ? roleInstance.InstanceUpgradeDomain.Value.ToString(CultureInfo.InvariantCulture) : null, + OperationDescription = CommandRuntime.ToString(), + OperationId = GetDeploymentOperationNewSM.Id, + OperationStatus = GetDeploymentOperationNewSM.Status.ToString(), + VM = new PVM.PersistentVM + { + AvailabilitySetName = vm.AvailabilitySetName, + ConfigurationSets = PersistentVMHelper.MapConfigurationSets(vm.ConfigurationSets), + DataVirtualHardDisks = new Collection(), + Label = vm.Label, + OSVirtualHardDisk = Mapper.Map(vm.OSVirtualHardDisk, new PVM.OSVirtualHardDisk()), + RoleName = vm.RoleName, + RoleSize = vm.RoleSize.ToString(), + RoleType = vm.RoleType, + DefaultWinRmCertificateThumbprint = vm.DefaultWinRmCertificateThumbprint, + ProvisionGuestAgent = vm.ProvisionGuestAgent, + ResourceExtensionReferences = Mapper.Map(vm.ResourceExtensionReferences) + } + }; + + if (vm.DataVirtualHardDisks != null) + { + vm.DataVirtualHardDisks.ForEach( + d => vmContext.VM.DataVirtualHardDisks.Add(Mapper.Map(d))); + } + else + { + vmContext.VM.DataVirtualHardDisks = null; + } + + PersistentVMHelper.SaveStateToFile(vmContext.VM, Path); + WriteObject(vmContext, true); + } + catch (Exception e) + { + throw new ApplicationException(string.Format(Resources.VMPropertiesCanNotBeRead, role.RoleName), e); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/GetAzureOSDisk.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/GetAzureOSDisk.cs new file mode 100644 index 000000000000..a887034442e5 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/GetAzureOSDisk.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.PersistentVMs +{ + [Cmdlet(VerbsCommon.Get, "AzureOSDisk"), OutputType(typeof(OSVirtualHardDisk))] + public class GetAzureOSDiskCommand : VirtualMachineConfigurationCmdletBase + { + protected override void ProcessRecord() + { + var r = VM.GetInstance(); + WriteObject(r.OSVirtualHardDisk, true); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/GetAzureRemoteDesktopFile.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/GetAzureRemoteDesktopFile.cs new file mode 100644 index 000000000000..09cbd3754521 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/GetAzureRemoteDesktopFile.cs @@ -0,0 +1,129 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Diagnostics; +using System.IO; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.PersistentVMs +{ + [Cmdlet(VerbsCommon.Get, "AzureRemoteDesktopFile", DefaultParameterSetName = "Download"), OutputType(typeof(ManagementOperationContext))] + public class GetAzureRemoteDesktopFileCommand : IaaSDeploymentManagementCmdletBase + { + + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the Role Instance or Virtual Machine Name to create/connect via RDP")] + [ValidateNotNullOrEmpty] + [Alias("InstanceName")] + public string Name + { + get; + set; + } + + [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Path and name of the output RDP file.", ParameterSetName = "Download")] + [Parameter(Position = 2, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Path and name of the output RDP file.", ParameterSetName = "Launch")] + [ValidateNotNullOrEmpty] + public string LocalPath + { + get; + set; + } + + [Parameter(Position = 3, Mandatory = true, HelpMessage = "Start a remote desktop session to the specified role instance.", ParameterSetName = "Launch")] + public SwitchParameter Launch + { + get; + set; + } + + [SecurityPermission(SecurityAction.LinkDemand)] + protected override void ExecuteCommand() + { + base.ExecuteCommand(); + if (CurrentDeploymentNewSM == null) + { + throw new ArgumentException(Resources.NoCloudServicePresent); + } + + ManagementOperationContext context; + string rdpFilePath = LocalPath ?? Path.GetTempFileName(); + WriteVerboseWithTimestamp(string.Format(Resources.AzureRemoteDesktopBeginOperation, CommandRuntime)); + var desktopFileResponse = this.ComputeClient.VirtualMachines.GetRemoteDesktopFile(this.ServiceName, CurrentDeploymentNewSM.Name, Name + "_IN_0"); + using (var stream = new MemoryStream(desktopFileResponse.RemoteDesktopFile)) + { + using (var file = File.Create(rdpFilePath)) + { + int count; + byte[] buffer = new byte[1000]; + + while ((count = stream.Read(buffer, 0, buffer.Length)) > 0) + { + file.Write(buffer, 0, count); + } + } + + var operation = GetOperationNewSM(desktopFileResponse.RequestId); + + WriteVerboseWithTimestamp(string.Format(Resources.AzureRemoteDesktopCompletedOperation, CommandRuntime)); + + context = new ManagementOperationContext + { + OperationDescription = CommandRuntime.ToString(), + OperationStatus = operation.Status.ToString(), + OperationId = operation.Id + }; + } + + if (Launch.IsPresent) + { + var startInfo = new ProcessStartInfo + { + CreateNoWindow = true, + WindowStyle = ProcessWindowStyle.Hidden + }; + + if (LocalPath == null) + { + string scriptGuid = Guid.NewGuid().ToString(); + + string launchRDPScript = Path.GetTempPath() + scriptGuid + ".bat"; + using (var scriptStream = File.OpenWrite(launchRDPScript)) + { + var writer = new StreamWriter(scriptStream); + writer.WriteLine("start /wait mstsc.exe " + rdpFilePath); + writer.WriteLine("del " + rdpFilePath); + writer.WriteLine("del " + launchRDPScript); + writer.Flush(); + } + + startInfo.FileName = launchRDPScript; + } + else + { + startInfo.FileName = "mstsc.exe"; + startInfo.Arguments = rdpFilePath; + } + + Process.Start(startInfo); + } + + WriteObject(context, true); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/GetAzureVM.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/GetAzureVM.cs new file mode 100644 index 000000000000..4ee86ed627b7 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/GetAzureVM.cs @@ -0,0 +1,192 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Globalization; +using System.Linq; +using System.Management.Automation; +using System.Net; +using AutoMapper; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + using PVM = Model; + using NSM = Management.Compute.Models; + + [Cmdlet(VerbsCommon.Get, AzureVMNoun, DefaultParameterSetName = ListVMParamSet), OutputType(typeof(PVM.PersistentVMRoleContext))] + public class GetAzureVMCommand : IaaSDeploymentManagementCmdletBase + { + protected const string AzureVMNoun = "AzureVM"; + protected const string PersistentVMRoleStr = "PersistentVMRole"; + protected const string ListVMParamSet = "ListAllVMs"; + protected const string GetVMParamSet = "GetVMByServiceAndVMName"; + + [Parameter(ParameterSetName = GetVMParamSet, Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Service name.")] + [ValidateNotNullOrEmpty] + public override string ServiceName { get; set; } + + [Parameter(ParameterSetName = GetVMParamSet, Position = 1, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the virtual machine to get.")] + public virtual string Name { get; set; } + + protected override void ExecuteCommand() + { + ServiceManagementProfile.Initialize(); + base.ExecuteCommand(); + + if (string.IsNullOrEmpty(ServiceName)) + { + var roleContexts = new List(); + + foreach (var service in this.ComputeClient.HostedServices.List()) + { + NSM.DeploymentGetResponse deployment = null; + + try + { + deployment = this.ComputeClient.Deployments.GetBySlot( + service.ServiceName, + NSM.DeploymentSlot.Production); + } + catch (CloudException e) + { + if (e.Response.StatusCode != HttpStatusCode.NotFound) + { + throw; + } + } + + if (deployment != null) + { + roleContexts.AddRange( + GetVMContextList( + service.ServiceName, + deployment).AsEnumerable()); + } + } + + WriteObject(roleContexts, true); + } + else if (CurrentDeploymentNewSM != null) + { + var roleContexts = GetVMContextList( + ServiceName, + CurrentDeploymentNewSM); + + WriteObject(roleContexts, true); + } + else + { + WriteWarning( + string.Format(Resources.NoDeploymentFoundInService, ServiceName)); + } + } + + private List GetVMContextList(string serviceName, NSM.DeploymentGetResponse deployment) + where T : PVM.PersistentVMRoleContext, new() + { + var vmRoles = new List(deployment.Roles.Where( + r => string.IsNullOrEmpty(Name) + || r.RoleName.Equals(Name, StringComparison.InvariantCultureIgnoreCase))); + + return GetVMContextList(serviceName, deployment, vmRoles); + } + + private List GetVMContextList(string serviceName, NSM.DeploymentGetResponse deployment, List vmRoles) + where T : PVM.PersistentVMRoleContext, new() + { + var roleContexts = new List(); + + foreach (var vm in vmRoles) + { + var roleInstance = deployment.RoleInstances.FirstOrDefault( + r => r.RoleName == vm.RoleName); + + if (roleInstance == null) + { + WriteWarning( + string.Format(Resources.RoleInstanceCanNotBeFoundWithName, vm.RoleName)); + } + + roleContexts.Add( + CreateVMContext( + serviceName, + vm, + roleInstance, + deployment)); + } + + return roleContexts; + } + + private T CreateVMContext(string serviceName, NSM.Role vmRole, NSM.RoleInstance roleInstance, NSM.DeploymentGetResponse deployment) + where T : PVM.PersistentVMRoleContext, new() + { + var vmContext = new T + { + ServiceName = serviceName, + DeploymentName = deployment == null ? string.Empty : deployment.Name, + DNSName = deployment == null || deployment.Uri == null ? string.Empty : deployment.Uri.AbsoluteUri, + Name = vmRole == null ? string.Empty : vmRole.RoleName, + AvailabilitySetName = vmRole == null ? string.Empty : vmRole.AvailabilitySetName, + Label = vmRole == null ? string.Empty : vmRole.Label, + InstanceSize = vmRole == null ? string.Empty : vmRole.RoleSize, + InstanceStatus = roleInstance == null ? string.Empty : roleInstance.InstanceStatus, + IpAddress = roleInstance == null ? string.Empty : roleInstance.IPAddress, + PublicIPAddress = roleInstance == null ? string.Empty + : roleInstance.PublicIPs == null || !roleInstance.PublicIPs.Any() ? string.Empty + : roleInstance.PublicIPs.First().Address, + PublicIPName = roleInstance == null ? string.Empty + : roleInstance.PublicIPs == null || !roleInstance.PublicIPs.Any() ? string.Empty + : !string.IsNullOrEmpty(roleInstance.PublicIPs.First().Name) ? roleInstance.PublicIPs.First().Name + : PersistentVMHelper.GetPublicIPName(vmRole), + InstanceStateDetails = roleInstance == null ? string.Empty : roleInstance.InstanceStateDetails, + PowerState = roleInstance == null ? string.Empty : roleInstance.PowerState.ToString(), + HostName = roleInstance == null ? string.Empty : roleInstance.HostName, + InstanceErrorCode = roleInstance == null ? string.Empty : roleInstance.InstanceErrorCode, + InstanceName = roleInstance == null ? string.Empty : roleInstance.InstanceName, + InstanceFaultDomain = roleInstance == null ? string.Empty : roleInstance.InstanceFaultDomain.HasValue + ? roleInstance.InstanceFaultDomain.Value.ToString(CultureInfo.InvariantCulture) : null, + InstanceUpgradeDomain = roleInstance == null ? string.Empty : roleInstance.InstanceUpgradeDomain.HasValue + ? roleInstance.InstanceUpgradeDomain.Value.ToString(CultureInfo.InvariantCulture) : null, + Status = roleInstance == null ? string.Empty : roleInstance.InstanceStatus, + GuestAgentStatus = roleInstance == null ? null : Mapper.Map(roleInstance.GuestAgentStatus), + ResourceExtensionStatusList = roleInstance == null ? null : Mapper.Map>(roleInstance.ResourceExtensionStatusList), + OperationId = deployment == null ? string.Empty : deployment.RequestId, + OperationStatus = deployment == null ? string.Empty : deployment.StatusCode.ToString(), + OperationDescription = CommandRuntime.ToString(), + NetworkInterfaces = roleInstance == null ? null : Mapper.Map(roleInstance.NetworkInterfaces), + VM = new PVM.PersistentVM + { + AvailabilitySetName = vmRole == null ? string.Empty : vmRole.AvailabilitySetName, + Label = vmRole == null ? string.Empty : vmRole.Label, + RoleName = vmRole == null ? string.Empty : vmRole.RoleName, + RoleSize = vmRole == null ? string.Empty : vmRole.RoleSize, + RoleType = vmRole == null ? string.Empty : vmRole.RoleType, + DefaultWinRmCertificateThumbprint = vmRole == null ? string.Empty : vmRole.DefaultWinRmCertificateThumbprint, + ProvisionGuestAgent = vmRole == null ? null : vmRole.ProvisionGuestAgent, + ResourceExtensionReferences = vmRole == null ? null : Mapper.Map(vmRole.ResourceExtensionReferences), + DataVirtualHardDisks = vmRole == null ? null : Mapper.Map>(vmRole.DataVirtualHardDisks), + OSVirtualHardDisk = vmRole == null ? null : Mapper.Map(vmRole.OSVirtualHardDisk), + ConfigurationSets = vmRole == null ? null : PersistentVMHelper.MapConfigurationSets(vmRole.ConfigurationSets) + } + }; + + return vmContext; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/GetAzureWinRMUri.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/GetAzureWinRMUri.cs new file mode 100644 index 000000000000..e7f4e2d80523 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/GetAzureWinRMUri.cs @@ -0,0 +1,115 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsCommon.Get, "AzureWinRMUri"), OutputType(typeof(Uri), typeof(List))] + public class GetAzureWinRMUri : IaaSDeploymentManagementCmdletBase + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Service name.")] + [ValidateNotNullOrEmpty] + public override string ServiceName + { + get; + set; + } + + [Parameter(Position = 1, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the virtual machine to get.")] + public string Name + { + get; + set; + } + + protected override void ExecuteCommand() + { + base.ExecuteCommand(); + ExecuteCommandBody(); + } + + public void ExecuteCommandBody() + { + if (CurrentDeploymentNewSM == null) + { + return; + } + + if (CurrentDeploymentNewSM.Uri == null) + { + throw new ArgumentOutOfRangeException(Resources.CurrentDeploymentDoesNotHaveUrl); + } + if (CurrentDeploymentNewSM.RoleInstances == null) + { + throw new ArgumentOutOfRangeException(Resources.CurrentDeploymentDoesNotHaveVMs); + } + + if (String.IsNullOrEmpty(Name)) + { + var result = CurrentDeploymentNewSM.RoleInstances.Select(GetUri).Where(uri => uri != null).ToList(); + if(!result.Any()) + { + return; + } + WriteObject(result, true); + } + else + { + var roleInstance = + CurrentDeploymentNewSM.RoleInstances.Where(r => r.RoleName != null).FirstOrDefault( + r => r.RoleName.Equals(Name, StringComparison.InvariantCultureIgnoreCase)); + + if (roleInstance == null) + { + throw new ArgumentOutOfRangeException(String.Format(Resources.RoleInstanceCanNotBeFoundWithName, Name)); + } + + var uri = GetUri(roleInstance); + WriteObject(uri, true); + } + } + + private Uri GetUri(RoleInstance roleInstance) + { + if (roleInstance == null) + { + throw new ArgumentOutOfRangeException(Resources.RoleInstanceCanNotBeFound); + } + + if (roleInstance.InstanceEndpoints == null) + { + throw new ArgumentOutOfRangeException(string.Format(Resources.NoEndpointFoundForVM, roleInstance.RoleName)); + } + var winRmEndPoint = roleInstance.InstanceEndpoints.FirstOrDefault(i => i.LocalPort == WinRMConstants.HttpsListenerPort); + if (winRmEndPoint == null) + { + return null; + } + + var builder = new UriBuilder(CurrentDeploymentNewSM.Uri) + { + Port = winRmEndPoint.Port, + Scheme = "https" + }; + var uri = builder.Uri; + return uri; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/ImportAzureVM.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/ImportAzureVM.cs new file mode 100644 index 000000000000..0bbc001a96db --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/ImportAzureVM.cs @@ -0,0 +1,52 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsData.Import, "AzureVM"), OutputType(typeof(PersistentVM))] + public class ImportAzureVMCommand : Cmdlet + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Path to the file with the persistent VM role state previously serialized.")] + [ValidateNotNullOrEmpty] + public string Path + { + get; + set; + } + + internal void ExecuteCommand() + { + PersistentVM role = PersistentVMHelper.LoadStateFromFile(Path); + WriteObject(role, true); + } + + protected override void ProcessRecord() + { + try + { + base.ProcessRecord(); + ExecuteCommand(); + } + catch (Exception ex) + { + WriteError(new ErrorRecord(ex, string.Empty, ErrorCategory.CloseError, null)); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/MediaLinkFactory.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/MediaLinkFactory.cs new file mode 100644 index 000000000000..281cac74b14e --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/MediaLinkFactory.cs @@ -0,0 +1,57 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Storage; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.PersistentVMs +{ + public class MediaLinkFactory + { + private CloudStorageAccount currentStorage; + private readonly string serviceName; + private string roleName; + private DateTime dateTimeCreated; + private string containerName; + private long counter; + + public MediaLinkFactory(CloudStorageAccount currentStorage, string serviceName, string roleName) : + this(currentStorage, serviceName, roleName, "vhds") + { + } + + public MediaLinkFactory(CloudStorageAccount currentStorage, string serviceName, string roleName, string containerName) + { + this.currentStorage = currentStorage; + this.serviceName = serviceName; + this.roleName = roleName; + this.containerName = containerName; + dateTimeCreated = DateTime.Now; + } + + public Uri Create() + { + string vhdname = String.Format("{0}-{1}-{2}-{3}.vhd", serviceName, roleName, DateTimeToString(), counter++); + string blobEndpoint = currentStorage.BlobEndpoint.AbsoluteUri; + return new Uri(GeneralUtilities.EnsureTrailingSlash(GeneralUtilities.EnsureTrailingSlash(blobEndpoint) + containerName) + vhdname); + } + + private string DateTimeToString() + { + return String.Format("{0}-{1}-{2}-{3}-{4}-{5}-{6}",dateTimeCreated.Year, dateTimeCreated.Month, dateTimeCreated.Day, + dateTimeCreated.Hour, dateTimeCreated.Minute, dateTimeCreated.Second, dateTimeCreated.Millisecond); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/NewAzureQuickVM.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/NewAzureQuickVM.cs new file mode 100644 index 000000000000..6a3627f7560b --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/NewAzureQuickVM.cs @@ -0,0 +1,615 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Management.Automation; +using System.Net; +using System.Security.Cryptography.X509Certificates; +using AutoMapper; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Common; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; +using Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; +using Microsoft.WindowsAzure.Storage; +using ConfigurationSet = Microsoft.WindowsAzure.Commands.ServiceManagement.Model.ConfigurationSet; +using InputEndpoint = Microsoft.WindowsAzure.Commands.ServiceManagement.Model.InputEndpoint; +using OSVirtualHardDisk = Microsoft.WindowsAzure.Commands.ServiceManagement.Model.OSVirtualHardDisk; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.PersistentVMs +{ + /// + /// Creates a VM without advanced provisioning configuration options + /// + [Cmdlet(VerbsCommon.New, "AzureQuickVM", DefaultParameterSetName = WindowsParamSet), OutputType(typeof(ManagementOperationContext))] + public class NewQuickVM : IaaSDeploymentManagementCmdletBase + { + protected const string WindowsParamSet = "Windows"; + protected const string LinuxParamSet = "Linux"; + + private bool _isVMImage; + private bool _isOSImage; + + [Parameter(Mandatory = true, ParameterSetName = WindowsParamSet, HelpMessage = "Create a Windows VM")] + public SwitchParameter Windows { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = LinuxParamSet, HelpMessage = "Create a Linux VM")] + public SwitchParameter Linux { get; set; } + + [Parameter(Mandatory = true, HelpMessage = "Service Name")] + [ValidateNotNullOrEmpty] + override public string ServiceName { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Virtual Machine Name")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Mandatory = true, HelpMessage = "Reference to a platform stock image or a user image from the image repository.")] + [ValidateNotNullOrEmpty] + public string ImageName { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Administrator password to use for the role.")] + [ValidateNotNullOrEmpty] + public string Password { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Dns address to which the cloud service’s IP address resolves when queried using a reverse Dns query.")] + [ValidateNotNullOrEmpty] + public string ReverseDnsFqdn{ get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Use when creating the first virtual machine in a cloud service (or specify affinity group). The data center region where the cloud service will be created.")] + [ValidateNotNullOrEmpty] + public string Location { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Use when creating the first virtual machine in a cloud service (or specify location). The name of an existing affinity group associated with this subscription.")] + [ValidateNotNullOrEmpty] + public string AffinityGroup { get; set; } + + [Parameter(Mandatory = false, ParameterSetName = LinuxParamSet, HelpMessage = "User to Create")] + [ValidateNotNullOrEmpty] + public string LinuxUser { get; set; } + + [Parameter(Mandatory = false, ParameterSetName = WindowsParamSet, HelpMessage = "Specifies the Administrator to create.")] + [ValidateNotNullOrEmpty] + public string AdminUsername { get; set; } + + [Parameter(Mandatory = false, ParameterSetName = WindowsParamSet, HelpMessage = "Set of certificates to install in the VM.")] + [ValidateNotNullOrEmpty] + public Model.CertificateSettingList Certificates { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Waits for VM to boot")] + [ValidateNotNullOrEmpty] + public SwitchParameter WaitForBoot { get; set; } + + [Parameter(Mandatory = false, ParameterSetName = WindowsParamSet, HelpMessage = "Disables WinRM on https")] + [ValidateNotNullOrEmpty] + public SwitchParameter DisableWinRMHttps { get; set; } + + [Parameter(Mandatory = false, ParameterSetName = WindowsParamSet, HelpMessage = "Enables WinRM over http")] + [ValidateNotNullOrEmpty] + public SwitchParameter EnableWinRMHttp { get; set; } + + [Parameter(Mandatory = false, ParameterSetName = WindowsParamSet, HelpMessage = "Certificate that will be associated with WinRM endpoint")] + [ValidateNotNullOrEmpty] + public X509Certificate2 WinRMCertificate { get; set; } + + [Parameter(Mandatory = false, ParameterSetName = WindowsParamSet, HelpMessage = "X509Certificates that will be deployed")] + [ValidateNotNullOrEmpty] + public X509Certificate2[] X509Certificates { get; set; } + + [Parameter(Mandatory = false, ParameterSetName = WindowsParamSet, HelpMessage = "Prevents the private key from being uploaded")] + [ValidateNotNullOrEmpty] + public SwitchParameter NoExportPrivateKey { get; set; } + + [Parameter(Mandatory = false, ParameterSetName = WindowsParamSet, HelpMessage = "Prevents the WinRM endpoint from being added")] + [ValidateNotNullOrEmpty] + public SwitchParameter NoWinRMEndpoint { get; set; } + + [Parameter(Mandatory = false, ParameterSetName = LinuxParamSet, HelpMessage = "SSH Public Key List")] + public Model.LinuxProvisioningConfigurationSet.SSHPublicKeyList SSHPublicKeys { get; set; } + + [Parameter(Mandatory = false, ParameterSetName = LinuxParamSet, HelpMessage = "SSH Key Pairs")] + public Model.LinuxProvisioningConfigurationSet.SSHKeyPairList SSHKeyPairs { get; set; } + + [Parameter(HelpMessage = "Virtual network name.")] + public string VNetName { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "The list of subnet names.")] + [AllowEmptyCollection] + [AllowNull] + public string[] SubnetNames { get; set; } + + [Parameter(HelpMessage = "DNS Settings for Deployment.")] + [ValidateNotNullOrEmpty] + public Model.DnsServer[] DnsSettings { get; set; } + + [Parameter(HelpMessage = "Controls the platform caching behavior of the OS disk.")] + [ValidateSet("ReadWrite", "ReadOnly", IgnoreCase = true)] + public String HostCaching { get; set; } + + [Parameter(HelpMessage = "The name of the availability set.")] + [ValidateNotNullOrEmpty] + public string AvailabilitySetName { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = true, HelpMessage = "Represents the size of the machine.")] + [ValidateNotNullOrEmpty] + public string InstanceSize { get; set; } + + [Parameter(HelpMessage = "Location where the VHD should be created. This link refers to a blob in a storage account. If not specified the VHD will be created in the current storage account in the vhds container.")] + [ValidateNotNullOrEmpty] + public string MediaLocation { get; set; } + + [Parameter(HelpMessage = "To disable IaaS provision guest agent.")] + public SwitchParameter DisableGuestAgent { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Path to filename that contains custom data that will execute inside the VM after boot")] + public string CustomDataFile { get; set; } + + [Parameter(ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the reserved IP.")] + [ValidateNotNullOrEmpty] + public string ReservedIPName { get; set; } + + public void NewAzureVMProcess() + { + AzureSubscription currentSubscription = CurrentContext.Subscription; + CloudStorageAccount currentStorage = null; + try + { + currentStorage = currentSubscription.GetCloudStorageAccount(); + } + catch (Exception ex) // couldn't access + { + throw new ArgumentException(Resources.CurrentStorageAccountIsNotAccessible, ex); + } + if (currentStorage == null) // not set + { + throw new ArgumentException(Resources.CurrentStorageAccountIsNotSet); + } + + bool serviceExists = DoesCloudServiceExist(this.ServiceName); + + if(!string.IsNullOrEmpty(this.Location)) + { + if(serviceExists) + { + throw new ApplicationException(Resources.ServiceExistsLocationCanNotBeSpecified); + } + } + + if (!string.IsNullOrEmpty(this.AffinityGroup)) + { + if (serviceExists) + { + throw new ApplicationException(Resources.ServiceExistsAffinityGroupCanNotBeSpecified); + } + } + + if (!string.IsNullOrEmpty(this.ReverseDnsFqdn)) + { + if (serviceExists) + { + throw new ApplicationException(Resources.ServiceExistsReverseDnsFqdnCanNotBeSpecified); + } + } + + if (!serviceExists) + { + try + { + //Implicitly created hosted service2012-05-07 23:12 + + // Create the Cloud Service when + // Location or Affinity Group is Specified + // or VNET is specified and the service doesn't exist + var parameter = new HostedServiceCreateParameters + { + AffinityGroup = this.AffinityGroup, + Location = this.Location, + ServiceName = this.ServiceName, + Description = String.Format("Implicitly created hosted service{0}", DateTime.Now.ToUniversalTime().ToString("yyyy-MM-dd HH:mm")), + Label = this.ServiceName, + ReverseDnsFqdn = this.ReverseDnsFqdn + }; + + ExecuteClientActionNewSM( + parameter, + CommandRuntime + Resources.QuickVMCreateCloudService, + () => this.ComputeClient.HostedServices.Create(parameter)); + } + catch (CloudException ex) + { + this.WriteExceptionDetails(ex); + return; + } + } + + if (ParameterSetName.Equals(WindowsParamSet, StringComparison.OrdinalIgnoreCase)) + { + if (WinRMCertificate != null) + { + if (!CertUtilsNewSM.HasExportablePrivateKey(WinRMCertificate)) + { + throw new ArgumentException(Resources.WinRMCertificateDoesNotHaveExportablePrivateKey); + } + + var operationDescription = string.Format(Resources.QuickVMUploadingWinRMCertificate, CommandRuntime, WinRMCertificate.Thumbprint); + var parameters = CertUtilsNewSM.Create(WinRMCertificate); + + ExecuteClientActionNewSM( + null, + operationDescription, + () => this.ComputeClient.ServiceCertificates.Create(this.ServiceName, parameters), + (s, r) => ContextFactory(r, s)); + } + + if (X509Certificates != null) + { + var certificateFilesWithThumbprint = from c in X509Certificates + select new + { + c.Thumbprint, + CertificateFile = CertUtilsNewSM.Create(c, this.NoExportPrivateKey.IsPresent) + }; + foreach (var current in certificateFilesWithThumbprint.ToList()) + { + var operationDescription = string.Format(Resources.QuickVMUploadingCertificate, CommandRuntime, current.Thumbprint); + ExecuteClientActionNewSM( + null, + operationDescription, + () => this.ComputeClient.ServiceCertificates.Create(this.ServiceName, current.CertificateFile), + (s, r) => ContextFactory(r, s)); + } + } + } + + var vm = CreatePersistenVMRole(currentStorage); + + try + { + if (CurrentDeploymentNewSM == null) + { + // If the current deployment doesn't exist set it create it + var parameters = new VirtualMachineCreateDeploymentParameters + { + DeploymentSlot = DeploymentSlot.Production, + Name = this.ServiceName, + Label = this.ServiceName, + VirtualNetworkName = this.VNetName, + Roles = { vm }, + ReservedIPName = this.ReservedIPName, + DnsSettings = this.DnsSettings == null ? null : new Microsoft.WindowsAzure.Management.Compute.Models.DnsSettings + { + DnsServers = (from dns in this.DnsSettings + select new Management.Compute.Models.DnsServer + { + Name = dns.Name, + Address = dns.Address + }).ToList() + } + }; + + ExecuteClientActionNewSM( + parameters, + string.Format(Resources.QuickVMCreateDeploymentWithVM, CommandRuntime, vm.RoleName), + () => this.ComputeClient.VirtualMachines.CreateDeployment(this.ServiceName, parameters)); + } + else + { + if (!string.IsNullOrEmpty(VNetName) || DnsSettings != null) + { + WriteWarning(Resources.VNetNameOrDnsSettingsCanOnlyBeSpecifiedOnNewDeployments); + } + + // Only create the VM when a new VM was added and it was not created during the deployment phase. + ExecuteClientActionNewSM( + vm, + string.Format(Resources.QuickVMCreateVM, CommandRuntime, vm.RoleName), + () => this.ComputeClient.VirtualMachines.Create( + this.ServiceName, + this.ServiceName, + new VirtualMachineCreateParameters + { + AvailabilitySetName = vm.AvailabilitySetName, + OSVirtualHardDisk = vm.OSVirtualHardDisk, + DataVirtualHardDisks = vm.DataVirtualHardDisks, + RoleName = vm.RoleName, + RoleSize = vm.RoleSize, + VMImageName = vm.VMImageName, + MediaLocation = vm.MediaLocation, + ProvisionGuestAgent = vm.ProvisionGuestAgent, + ResourceExtensionReferences = vm.ResourceExtensionReferences, + ConfigurationSets = vm.ConfigurationSets + })); + } + + if (WaitForBoot.IsPresent) + { + WaitForRoleToBoot(vm.RoleName); + } + } + catch (CloudException ex) + { + if (ex.Response.StatusCode == HttpStatusCode.NotFound) + { + throw new Exception(Resources.ServiceDoesNotExistSpecifyLocationOrAffinityGroup); + } + + this.WriteExceptionDetails(ex); + } + } + + private Management.Compute.Models.Role CreatePersistenVMRole(CloudStorageAccount currentStorage) + { + var vm = new Management.Compute.Models.Role + { + AvailabilitySetName = AvailabilitySetName, + RoleName = String.IsNullOrEmpty(Name) ? ServiceName : Name, // default like the portal + RoleSize = InstanceSize, + RoleType = "PersistentVMRole", + Label = ServiceName, + OSVirtualHardDisk = _isVMImage ? null : Mapper.Map( + new OSVirtualHardDisk + { + DiskName = null, + SourceImageName = ImageName, + MediaLink = string.IsNullOrEmpty(MediaLocation) ? null : new Uri(MediaLocation), + HostCaching = HostCaching + }), + VMImageName = _isVMImage ? this.ImageName : null, + MediaLocation = _isVMImage && !string.IsNullOrEmpty(this.MediaLocation) ? new Uri(this.MediaLocation) : null, + ProvisionGuestAgent = !this.DisableGuestAgent, + ResourceExtensionReferences = this.DisableGuestAgent ? null : Mapper.Map>( + new VirtualMachineExtensionImageFactory(this.ComputeClient).MakeList( + VirtualMachineBGInfoExtensionCmdletBase.ExtensionDefaultPublisher, + VirtualMachineBGInfoExtensionCmdletBase.ExtensionDefaultName, + VirtualMachineBGInfoExtensionCmdletBase.ExtensionDefaultVersion)) + }; + + if (!_isVMImage && vm.OSVirtualHardDisk.MediaLink == null && String.IsNullOrEmpty(vm.OSVirtualHardDisk.Name)) + { + var mediaLinkFactory = new MediaLinkFactory(currentStorage, this.ServiceName, vm.RoleName); + vm.OSVirtualHardDisk.MediaLink = mediaLinkFactory.Create(); + } + + string customDataBase64Str = null; + if (!string.IsNullOrEmpty(this.CustomDataFile)) + { + string fileName = this.TryResolvePath(this.CustomDataFile); + customDataBase64Str = PersistentVMHelper.ConvertCustomDataFileToBase64(fileName); + } + + var configurationSets = new Collection(); + var netConfig = CreateNetworkConfigurationSet(); + + if (ParameterSetName.Equals(WindowsParamSet, StringComparison.OrdinalIgnoreCase)) + { + if (this.AdminUsername != null && this.Password != null) + { + var windowsConfig = new Microsoft.WindowsAzure.Commands.ServiceManagement.Model.WindowsProvisioningConfigurationSet + { + AdminUsername = this.AdminUsername, + AdminPassword = SecureStringHelper.GetSecureString(Password), + ComputerName = string.IsNullOrEmpty(Name) ? ServiceName : Name, + EnableAutomaticUpdates = true, + ResetPasswordOnFirstLogon = false, + StoredCertificateSettings = CertUtilsNewSM.GetCertificateSettings(this.Certificates, this.X509Certificates), + WinRM = GetWinRmConfiguration(), + CustomData = customDataBase64Str + }; + + if (windowsConfig.StoredCertificateSettings == null) + { + windowsConfig.StoredCertificateSettings = new Model.CertificateSettingList(); + } + + configurationSets.Add(windowsConfig); + } + + netConfig.InputEndpoints.Add(new InputEndpoint {LocalPort = 3389, Protocol = "tcp", Name = "RemoteDesktop"}); + if (!this.NoWinRMEndpoint.IsPresent && !this.DisableWinRMHttps.IsPresent) + { + netConfig.InputEndpoints.Add(new InputEndpoint {LocalPort = WinRMConstants.HttpsListenerPort, Protocol = "tcp", Name = WinRMConstants.EndpointName}); + } + + configurationSets.Add(netConfig); + } + else if (ParameterSetName.Equals(LinuxParamSet, StringComparison.OrdinalIgnoreCase)) + { + if (this.LinuxUser != null && this.Password != null) + { + var linuxConfig = new Microsoft.WindowsAzure.Commands.ServiceManagement.Model.LinuxProvisioningConfigurationSet + { + HostName = string.IsNullOrEmpty(this.Name) ? this.ServiceName : this.Name, + UserName = this.LinuxUser, + UserPassword = SecureStringHelper.GetSecureString(this.Password), + DisableSshPasswordAuthentication = false, + CustomData = customDataBase64Str + }; + + if (this.SSHKeyPairs != null && this.SSHKeyPairs.Count > 0 || + this.SSHPublicKeys != null && this.SSHPublicKeys.Count > 0) + { + linuxConfig.SSH = new Microsoft.WindowsAzure.Commands.ServiceManagement.Model.LinuxProvisioningConfigurationSet.SSHSettings + { + PublicKeys = this.SSHPublicKeys, + KeyPairs = this.SSHKeyPairs + }; + } + + configurationSets.Add(linuxConfig); + } + + var rdpEndpoint = new InputEndpoint {LocalPort = 22, Protocol = "tcp", Name = "SSH"}; + netConfig.InputEndpoints.Add(rdpEndpoint); + configurationSets.Add(netConfig); + } + + PersistentVMHelper.MapConfigurationSets(configurationSets).ForEach(c => vm.ConfigurationSets.Add(c)); + + return vm; + } + + private Model.NetworkConfigurationSet CreateNetworkConfigurationSet() + { + var netConfig = new Model.NetworkConfigurationSet + { + InputEndpoints = new Collection() + }; + + if (SubnetNames != null) + { + netConfig.SubnetNames = new Model.SubnetNamesCollection(); + foreach (var subnet in SubnetNames) + { + netConfig.SubnetNames.Add(subnet); + } + } + + return netConfig; + } + + private Model.WindowsProvisioningConfigurationSet.WinRmConfiguration GetWinRmConfiguration() + { + if(this.DisableWinRMHttps.IsPresent) + { + return null; + } + + var builder = new WinRmConfigurationBuilder(); + if(this.EnableWinRMHttp.IsPresent) + { + builder.AddHttpListener(); + } + + builder.AddHttpsListener(WinRMCertificate); + return builder.Configuration; + } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + + if (!string.IsNullOrEmpty(this.ImageName)) + { + var imageType = new VirtualMachineImageHelper(this.ComputeClient).GetImageType(this.ImageName); + _isOSImage = imageType.HasFlag(VirtualMachineImageType.OSImage); + _isVMImage = imageType.HasFlag(VirtualMachineImageType.VMImage); + + if (_isOSImage && _isVMImage) + { + var errorMsg = string.Format(Resources.DuplicateNamesFoundInBothVMAndOSImages, this.ImageName); + WriteError(new ErrorRecord(new Exception(errorMsg), string.Empty, ErrorCategory.CloseError, null)); + } + } + + try + { + ServiceManagementProfile.Initialize(); + this.ValidateParameters(); + this.NewAzureVMProcess(); + } + catch (Exception ex) + { + WriteError(new ErrorRecord(ex, string.Empty, ErrorCategory.CloseError, null)); + } + } + + protected bool DoesCloudServiceExist(string serviceName) + { + try + { + WriteVerboseWithTimestamp(string.Format(Resources.QuickVMBeginOperation, CommandRuntime)); + var response = this.ComputeClient.HostedServices.CheckNameAvailability(serviceName); + WriteVerboseWithTimestamp(string.Format(Resources.QuickVMCompletedOperation, CommandRuntime)); + return !response.IsAvailable; + } + catch (CloudException ex) + { + if (ex.Response.StatusCode == HttpStatusCode.NotFound) + { + return false; + } + this.WriteExceptionDetails(ex); + } + + return false; + } + + protected void ValidateParameters() + { + if (this.DnsSettings != null && string.IsNullOrEmpty(this.VNetName)) + { + throw new ArgumentException(Resources.VNetNameRequiredWhenSpecifyingDNSSettings); + } + + if (!string.IsNullOrEmpty(this.VNetName) && (this.SubnetNames == null || this.SubnetNames.Length == 0)) + { + WriteWarning(Resources.SubnetShouldBeSpecifiedIfVnetPresent); + } + + if (this.ParameterSetName.Contains(LinuxParamSet) && this.Password != null && !ValidationHelpers.IsLinuxPasswordValid(this.Password)) + { + throw new ArgumentException(Resources.PasswordNotComplexEnough); + } + + if (this.ParameterSetName.Contains(WindowsParamSet) && this.Password != null && !ValidationHelpers.IsWindowsPasswordValid(this.Password)) + { + throw new ArgumentException(Resources.PasswordNotComplexEnough); + } + + if (this.ParameterSetName.Contains(LinuxParamSet)) + { + bool valid = false; + if (string.IsNullOrEmpty(this.Name)) + { + valid = ValidationHelpers.IsLinuxHostNameValid(this.ServiceName); // uses servicename if name not specified + } + else + { + valid = ValidationHelpers.IsLinuxHostNameValid(this.Name); + } + if (valid == false) + { + throw new ArgumentException(Resources.InvalidHostName); + } + } + + if (string.IsNullOrEmpty(this.Name) == false) + { + if (this.ParameterSetName.Contains(WindowsParamSet) && !ValidationHelpers.IsWindowsComputerNameValid(this.Name)) + { + throw new ArgumentException(Resources.InvalidComputerName); + } + } + else + { + if (this.ParameterSetName.Contains(WindowsParamSet) && !ValidationHelpers.IsWindowsComputerNameValid(this.ServiceName)) + { + throw new ArgumentException(Resources.InvalidComputerName); + } + } + + if (!string.IsNullOrEmpty(this.Location) && !string.IsNullOrEmpty(this.AffinityGroup)) + { + throw new ArgumentException(Resources.EitherLocationOrAffinityGroupBeSpecified); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/NewAzureVM.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/NewAzureVM.cs new file mode 100644 index 000000000000..1120de3088aa --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/NewAzureVM.cs @@ -0,0 +1,560 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Net; +using AutoMapper; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; +using Microsoft.WindowsAzure.Storage; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.PersistentVMs +{ + [Cmdlet(VerbsCommon.New, "AzureVM", DefaultParameterSetName = "ExistingService"), OutputType(typeof(ManagementOperationContext))] + public class NewAzureVMCommand : IaaSDeploymentManagementCmdletBase + { + private bool createdDeployment; + + [Parameter(Mandatory = true, ParameterSetName = "CreateService", ValueFromPipelineByPropertyName = true, HelpMessage = "Service Name")] + [Parameter(Mandatory = true, ParameterSetName = "ExistingService", ValueFromPipelineByPropertyName = true, HelpMessage = "Service Name")] + [ValidateNotNullOrEmpty] + public override string ServiceName + { + get; + set; + } + + [Parameter(ValueFromPipelineByPropertyName = true, ParameterSetName = "CreateService", HelpMessage = "Required if AffinityGroup is not specified. The data center region where the cloud service will be created.")] + [ValidateNotNullOrEmpty] + public string Location + { + get; + set; + } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = "CreateService", HelpMessage = "Required if Location is not specified. The name of an existing affinity group associated with this subscription.")] + [ValidateNotNullOrEmpty] + public string AffinityGroup + { + get; + set; + } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = "CreateService", HelpMessage = "The label may be up to 100 characters in length. Defaults to Service Name.")] + [ValidateNotNullOrEmpty] + public string ServiceLabel + { + get; + set; + } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = "CreateService", HelpMessage = "Dns address to which the cloud service’s IP address resolves when queried using a reverse Dns query.")] + [ValidateNotNullOrEmpty] + public string ReverseDnsFqdn + { + get; + set; + } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = "CreateService", HelpMessage = "A description for the cloud service. The description may be up to 1024 characters in length.")] + [ValidateNotNullOrEmpty] + public string ServiceDescription + { + get; + set; + } + + [Parameter(Mandatory = false, ParameterSetName = "CreateService", ValueFromPipelineByPropertyName = true, HelpMessage = "Deployment Label. Will default to service name if not specified.")] + [Parameter(Mandatory = false, ParameterSetName = "ExistingService", ValueFromPipelineByPropertyName = true, HelpMessage = "Deployment Label. Will default to service name if not specified.")] + [ValidateNotNullOrEmpty] + public string DeploymentLabel + { + get; + set; + } + + [Parameter(Mandatory = false, ParameterSetName = "CreateService", ValueFromPipelineByPropertyName = true, HelpMessage = "Deployment Name. Will default to service name if not specified.")] + [Parameter(Mandatory = false, ParameterSetName = "ExistingService", ValueFromPipelineByPropertyName = true, HelpMessage = "Deployment Name. Will default to service name if not specified.")] + [ValidateNotNullOrEmpty] + public string DeploymentName + { + get; + set; + } + + [Parameter(Mandatory = false, ParameterSetName = "CreateService", HelpMessage = "Virtual network name.")] + [Parameter(Mandatory = false, ParameterSetName = "ExistingService", HelpMessage = "Virtual network name.")] + public string VNetName + { + get; + set; + } + + [Parameter(Mandatory = false, ParameterSetName = "CreateService", ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, HelpMessage = "DNS Settings for Deployment.")] + [Parameter(Mandatory = false, ParameterSetName = "ExistingService", ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, HelpMessage = "DNS Settings for Deployment.")] + [ValidateNotNullOrEmpty] + public Microsoft.WindowsAzure.Commands.ServiceManagement.Model.DnsServer[] DnsSettings + { + get; + set; + } + + [Parameter(Mandatory = false, ParameterSetName = "CreateService", ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, HelpMessage = "ILB Settings for Deployment.")] + [Parameter(Mandatory = false, ParameterSetName = "ExistingService", ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, HelpMessage = "ILB Settings for Deployment.")] + [ValidateNotNullOrEmpty] + public Model.InternalLoadBalancerConfig InternalLoadBalancerConfig + { + get; + set; + } + + [Parameter(Mandatory = true, ParameterSetName = "CreateService", ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, HelpMessage = "List of VMs to Deploy.")] + [Parameter(Mandatory = true, ParameterSetName = "ExistingService", ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, HelpMessage = "List of VMs to Deploy.")] + [ValidateNotNullOrEmpty] + public Model.PersistentVM[] VMs + { + get; + set; + } + + [Parameter(Mandatory = false, HelpMessage = "Waits for VM to boot")] + [ValidateNotNullOrEmpty] + public SwitchParameter WaitForBoot + { + get; + set; + } + + [Parameter(ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the reserved IP.")] + [ValidateNotNullOrEmpty] + public string ReservedIPName + { + get; + set; + } + + protected Tuple[] VMTuples; + + public void NewAzureVMProcess() + { + AzureSubscription currentSubscription = CurrentContext.Subscription; + CloudStorageAccount currentStorage = null; + try + { + currentStorage = currentSubscription.GetCloudStorageAccount(); + } + catch (Exception ex) // couldn't access + { + throw new ArgumentException(Resources.CurrentStorageAccountIsNotAccessible, ex); + } + + if (currentStorage == null) // not set + { + throw new ArgumentException(Resources.CurrentStorageAccountIsNotSet); + } + + if (this.ParameterSetName.Equals("CreateService", StringComparison.OrdinalIgnoreCase)) + { + var parameter = new HostedServiceCreateParameters + { + AffinityGroup = this.AffinityGroup, + Location = this.Location, + ServiceName = this.ServiceName, + Description = this.ServiceDescription ?? String.Format( + "Implicitly created hosted service{0}", + DateTime.Now.ToUniversalTime().ToString("yyyy-MM-dd HH:mm")), + Label = this.ServiceLabel ?? this.ServiceName, + ReverseDnsFqdn = this.ReverseDnsFqdn + }; + + try + { + this.ComputeClient.HostedServices.Create(parameter); + } + catch (CloudException ex) + { + if (string.Equals(ex.ErrorCode, "ConflictError")) + { + HostedServiceGetResponse existingService = this.ComputeClient.HostedServices.Get(this.ServiceName); + + if (existingService == null || existingService.Properties == null) + { + // The same service name is already used by another subscription. + this.WriteExceptionDetails(ex); + return; + } + else if ((string.IsNullOrEmpty(existingService.Properties.Location) && + string.Compare(existingService.Properties.AffinityGroup, this.AffinityGroup, StringComparison.InvariantCultureIgnoreCase) == 0) + || (string.IsNullOrEmpty(existingService.Properties.AffinityGroup) && + string.Compare(existingService.Properties.Location, this.Location, StringComparison.InvariantCultureIgnoreCase) == 0)) + { + // The same service name is already created under the same subscription, + // and its affinity group or location is matched with the given parameter. + this.WriteWarning(ex.ErrorMessage); + } + else + { + // The same service name is already created under the same subscription, + // but its affinity group or location is not matched with the given parameter. + this.WriteWarning("Location or AffinityGroup name is not matched with the existing service"); + this.WriteExceptionDetails(ex); + return; + } + } + else + { + this.WriteExceptionDetails(ex); + return; + } + } + } + + foreach (var vm in from v in VMs let configuration = v.ConfigurationSets.OfType().FirstOrDefault() where configuration != null select v) + { + if (vm.WinRMCertificate != null) + { + if(!CertUtilsNewSM.HasExportablePrivateKey(vm.WinRMCertificate)) + { + throw new ArgumentException(Resources.WinRMCertificateDoesNotHaveExportablePrivateKey); + } + + var operationDescription = string.Format(Resources.AzureVMUploadingWinRMCertificate, CommandRuntime, vm.WinRMCertificate.Thumbprint); + var parameters = CertUtilsNewSM.Create(vm.WinRMCertificate); + + ExecuteClientActionNewSM( + null, + operationDescription, + () => this.ComputeClient.ServiceCertificates.Create(this.ServiceName, parameters), + (s, r) => ContextFactory(r, s)); + + } + + var certificateFilesWithThumbprint = from c in vm.X509Certificates + select new + { + c.Thumbprint, + CertificateFile = CertUtilsNewSM.Create(c, vm.NoExportPrivateKey) + }; + + foreach (var current in certificateFilesWithThumbprint.ToList()) + { + var operationDescription = string.Format(Resources.AzureVMCommandUploadingCertificate, CommandRuntime, current.Thumbprint); + ExecuteClientActionNewSM( + null, + operationDescription, + () => this.ComputeClient.ServiceCertificates.Create(this.ServiceName, current.CertificateFile), + (s, r) => ContextFactory(r, s)); + } + } + + var persistentVMs = this.VMs.Select((vm, index) => CreatePersistentVMRole(VMTuples[index], currentStorage)).ToList(); + + // If the current deployment doesn't exist set it create it + if (CurrentDeploymentNewSM == null) + { + try + { + var parameters = new VirtualMachineCreateDeploymentParameters + { + DeploymentSlot = DeploymentSlot.Production, + Name = this.DeploymentName ?? this.ServiceName, + Label = this.DeploymentLabel ?? this.ServiceName, + VirtualNetworkName = this.VNetName, + Roles = { persistentVMs[0] }, + ReservedIPName = ReservedIPName, + }; + + if (this.DnsSettings != null) + { + parameters.DnsSettings = new Management.Compute.Models.DnsSettings(); + + foreach (var dns in this.DnsSettings) + { + parameters.DnsSettings.DnsServers.Add( + new Microsoft.WindowsAzure.Management.Compute.Models.DnsServer + { + Name = dns.Name, + Address = dns.Address + }); + } + } + + if (this.InternalLoadBalancerConfig != null) + { + parameters.LoadBalancers = new LoadBalancer[1] + { + new LoadBalancer + { + Name = this.InternalLoadBalancerConfig.InternalLoadBalancerName, + FrontendIPConfiguration = new FrontendIPConfiguration + { + Type = FrontendIPConfigurationType.Private, + SubnetName = this.InternalLoadBalancerConfig.SubnetName, + StaticVirtualNetworkIPAddress = this.InternalLoadBalancerConfig.IPAddress + } + } + }; + } + + var operationDescription = string.Format(Resources.AzureVMCommandCreateDeploymentWithVM, CommandRuntime, persistentVMs[0].RoleName); + ExecuteClientActionNewSM( + parameters, + operationDescription, + () => this.ComputeClient.VirtualMachines.CreateDeployment(this.ServiceName, parameters)); + + if(this.WaitForBoot.IsPresent) + { + WaitForRoleToBoot(persistentVMs[0].RoleName); + } + } + catch (CloudException ex) + { + if (ex.Response.StatusCode == HttpStatusCode.NotFound) + { + throw new Exception(Resources.ServiceDoesNotExistSpecifyLocationOrAffinityGroup); + } + else + { + this.WriteExceptionDetails(ex); + } + + return; + } + + this.createdDeployment = true; + } + else + { + if (this.VNetName != null || this.DnsSettings != null || !string.IsNullOrEmpty(this.DeploymentLabel) || !string.IsNullOrEmpty(this.DeploymentName)) + { + WriteWarning(Resources.VNetNameDnsSettingsDeploymentLabelDeploymentNameCanBeSpecifiedOnNewDeployments); + } + } + + if (this.createdDeployment == false && CurrentDeploymentNewSM != null) + { + this.DeploymentName = CurrentDeploymentNewSM.Name; + } + + int startingVM = this.createdDeployment ? 1 : 0; + + for (int i = startingVM; i < persistentVMs.Count; i++) + { + var operationDescription = string.Format(Resources.AzureVMCommandCreateVM, CommandRuntime, persistentVMs[i].RoleName); + + var parameter = new VirtualMachineCreateParameters + { + AvailabilitySetName = persistentVMs[i].AvailabilitySetName, + OSVirtualHardDisk = VMTuples[i].Item3 ? null : persistentVMs[i].OSVirtualHardDisk, + RoleName = persistentVMs[i].RoleName, + RoleSize = persistentVMs[i].RoleSize, + ProvisionGuestAgent = persistentVMs[i].ProvisionGuestAgent, + ResourceExtensionReferences = persistentVMs[i].ProvisionGuestAgent != null && persistentVMs[i].ProvisionGuestAgent.Value ? persistentVMs[i].ResourceExtensionReferences : null, + VMImageName = VMTuples[i].Item3 ? persistentVMs[i].VMImageName : null + }; + + if (parameter.OSVirtualHardDisk != null) + { + parameter.OSVirtualHardDisk.IOType = null; + } + + if (persistentVMs[i].DataVirtualHardDisks != null && persistentVMs[i].DataVirtualHardDisks.Any()) + { + persistentVMs[i].DataVirtualHardDisks.ForEach(c => parameter.DataVirtualHardDisks.Add(c)); + parameter.DataVirtualHardDisks.ForEach(d => d.IOType = null); + } + + persistentVMs[i].ConfigurationSets.ForEach(c => parameter.ConfigurationSets.Add(c)); + + ExecuteClientActionNewSM( + persistentVMs[i], + operationDescription, + () => this.ComputeClient.VirtualMachines.Create(this.ServiceName, this.DeploymentName ?? this.ServiceName, parameter)); + } + + if(this.WaitForBoot.IsPresent) + { + for (int i = startingVM; i < persistentVMs.Count; i++) + { + WaitForRoleToBoot(persistentVMs[i].RoleName); + } + } + } + + private Management.Compute.Models.Role CreatePersistentVMRole(Tuple tuple, CloudStorageAccount currentStorage) + { + Model.PersistentVM persistentVM = tuple.Item1; + bool isVMImage = tuple.Item3; + + var mediaLinkFactory = new MediaLinkFactory(currentStorage, this.ServiceName, persistentVM.RoleName); + + if (!isVMImage) + { + if (persistentVM.OSVirtualHardDisk.MediaLink == null && string.IsNullOrEmpty(persistentVM.OSVirtualHardDisk.DiskName)) + { + persistentVM.OSVirtualHardDisk.MediaLink = mediaLinkFactory.Create(); + } + } + + foreach (var datadisk in persistentVM.DataVirtualHardDisks.Where(d => d.MediaLink == null && string.IsNullOrEmpty(d.DiskName))) + { + datadisk.MediaLink = mediaLinkFactory.Create(); + } + + var result = new Management.Compute.Models.Role + { + AvailabilitySetName = persistentVM.AvailabilitySetName, + OSVirtualHardDisk = isVMImage ? null : Mapper.Map(persistentVM.OSVirtualHardDisk, new Management.Compute.Models.OSVirtualHardDisk()), + RoleName = persistentVM.RoleName, + RoleSize = persistentVM.RoleSize, + RoleType = persistentVM.RoleType, + Label = persistentVM.Label, + ProvisionGuestAgent = persistentVM.ProvisionGuestAgent, + ResourceExtensionReferences = persistentVM.ProvisionGuestAgent != null && persistentVM.ProvisionGuestAgent.Value ? Mapper.Map>(persistentVM.ResourceExtensionReferences) : null, + VMImageName = isVMImage ? persistentVM.OSVirtualHardDisk.SourceImageName : null + }; + + if (result.OSVirtualHardDisk != null) + { + result.OSVirtualHardDisk.IOType = null; + } + + if (persistentVM.DataVirtualHardDisks != null && persistentVM.DataVirtualHardDisks.Any()) + { + persistentVM.DataVirtualHardDisks.ForEach(c => + { + var dataDisk = Mapper.Map(c, new Microsoft.WindowsAzure.Management.Compute.Models.DataVirtualHardDisk()); + dataDisk.LogicalUnitNumber = dataDisk.LogicalUnitNumber; + result.DataVirtualHardDisks.Add(dataDisk); + }); + result.DataVirtualHardDisks.ForEach(d => d.IOType = null); + } + else + { + result.DataVirtualHardDisks = null; + } + + if (persistentVM.ConfigurationSets != null) + { + PersistentVMHelper.MapConfigurationSets(persistentVM.ConfigurationSets).ForEach(c => result.ConfigurationSets.Add(c)); + } + + return result; + } + + protected override void ProcessRecord() + { + try + { + ServiceManagementProfile.Initialize(); + this.ValidateParameters(); + base.ProcessRecord(); + this.NewAzureVMProcess(); + } + catch (Exception ex) + { + WriteError(new ErrorRecord(ex, string.Empty, ErrorCategory.CloseError, null)); + } + } + + protected void ValidateParameters() + { + if (ParameterSetName.Equals("CreateService", StringComparison.OrdinalIgnoreCase)) + { + if (string.IsNullOrEmpty(Location) && string.IsNullOrEmpty(AffinityGroup)) + { + throw new ArgumentException(Resources.LocationOrAffinityGroupRequiredWhenCreatingNewCloudService); + } + } + else + { + if (!string.IsNullOrEmpty(Location) && !string.IsNullOrEmpty(AffinityGroup)) + { + throw new ArgumentException(Resources.LocationOrAffinityGroupCanOnlyBeSpecifiedWhenNewCloudService); + } + if (!string.IsNullOrEmpty(ReverseDnsFqdn)) + { + throw new ArgumentException(Resources.ReverseDnsFqdnCanOnlyBeSpecifiedWhenNewCloudService); + } + } + + if (this.ParameterSetName.Equals("CreateService", StringComparison.OrdinalIgnoreCase) == true + || this.ParameterSetName.Equals("CreateDeployment", StringComparison.OrdinalIgnoreCase) == true) + { + if (this.DnsSettings != null && string.IsNullOrEmpty(this.VNetName)) + { + throw new ArgumentException(Resources.VNetNameRequiredWhenSpecifyingDNSSettings); + } + } + + if (!string.IsNullOrEmpty(this.VNetName)) + { + List vmNames = new List(); + foreach (Model.PersistentVM VM in this.VMs) + { + Model.NetworkConfigurationSet networkConfig = VM.ConfigurationSets.OfType().SingleOrDefault(); + if (networkConfig == null || networkConfig.SubnetNames == null || + networkConfig.SubnetNames.Count == 0) + { + vmNames.Add(VM.RoleName); + } + } + + if (vmNames.Count != 0) + { + WriteWarning(string.Format(Resources.SubnetShouldBeSpecifiedIfVnetPresent, string.Join(", ", vmNames))); + } + } + + this.VMTuples = new Tuple[this.VMs.Count()]; + int index = 0; + foreach (var pVM in this.VMs) + { + bool isOSImage = false; + bool isVMImage = false; + + if (pVM.OSVirtualHardDisk != null && !string.IsNullOrEmpty(pVM.OSVirtualHardDisk.SourceImageName)) + { + var imageType = new VirtualMachineImageHelper(this.ComputeClient).GetImageType( + pVM.OSVirtualHardDisk.SourceImageName); + isOSImage = imageType.HasFlag(Model.VirtualMachineImageType.OSImage); + isVMImage = imageType.HasFlag(Model.VirtualMachineImageType.VMImage); + } + + if (isOSImage && isVMImage) + { + throw new ArgumentException( + string.Format(Resources.DuplicateNamesFoundInBothVMAndOSImages, pVM.OSVirtualHardDisk.SourceImageName)); + } + + this.VMTuples[index++] = new Tuple(pVM, isOSImage, isVMImage); + + var provisioningConfiguration = pVM.ConfigurationSets + .OfType() + .SingleOrDefault(); + + if (isOSImage && provisioningConfiguration == null && pVM.OSVirtualHardDisk.SourceImageName != null) + { + throw new ArgumentException(string.Format(Resources.VMMissingProvisioningConfiguration, pVM.RoleName)); + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/NewAzureVMConfig.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/NewAzureVMConfig.cs new file mode 100644 index 000000000000..5a99d880d1b4 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/NewAzureVMConfig.cs @@ -0,0 +1,147 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Collections.ObjectModel; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsCommon.New, "AzureVMConfig", DefaultParameterSetName = "ImageName"), OutputType(typeof(PersistentVM))] + public class NewAzureVMConfigCommand : ServiceManagementBaseCmdlet + { + private const string RoleType = "PersistentVMRole"; + + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The virtual machine name.")] + [ValidateNotNullOrEmpty] + public string Name + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Represents the size of the machine.")] + [ValidateNotNullOrEmpty] + public string InstanceSize + { + get; + set; + } + + [Parameter(Position = 2, HelpMessage = "Controls the platform caching behavior of the OS disk.")] + [ValidateSet("ReadWrite", "ReadOnly", IgnoreCase = true)] + public string HostCaching + { + get; + set; + } + + [Parameter(Position = 3, HelpMessage = "The name of the availability set.")] + [ValidateNotNullOrEmpty] + public string AvailabilitySetName + { + get; + set; + } + + [Parameter(Position = 4, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The VM label.")] + [ValidateNotNullOrEmpty] + public string Label + { + get; + set; + } + + [Parameter(Position = 5, Mandatory = true, ParameterSetName = "DiskName", HelpMessage = "Friendly name of the OS disk in the disk repository.")] + [ValidateNotNullOrEmpty] + public string DiskName + { + get; + set; + } + + [Parameter(Position = 5, Mandatory = true, ParameterSetName = "ImageName", HelpMessage = "Reference to a platform stock image or a user image from the image repository.")] + [ValidateNotNullOrEmpty] + public string ImageName + { + get; + set; + } + + [Parameter(Position = 6, Mandatory = false, ParameterSetName = "ImageName", HelpMessage = "Location of the where the VHD should be created. This link refers to a blob in a storage account. If not specified the VHD will be created in the default storage account with the following format :vhds/servicename-vmname-year-month-day-ms")] + [ValidateNotNullOrEmpty] + public string MediaLocation + { + get; + set; + } + + [Parameter(Position = 7, Mandatory = false, ParameterSetName = "ImageName", HelpMessage = "Label of the new disk to be created.")] + [ValidateNotNullOrEmpty] + public string DiskLabel + { + get; + set; + } + + protected override void ProcessRecord() + { + base.ProcessRecord(); + + ValidateParameters(); + + var role = new PersistentVM + { + AvailabilitySetName = AvailabilitySetName, + ConfigurationSets = new Collection(), + DataVirtualHardDisks = new Collection(), + RoleName = Name, + RoleSize = InstanceSize, + RoleType = RoleType, + Label = Label, + ProvisionGuestAgent = true + }; + + role.OSVirtualHardDisk = new OSVirtualHardDisk() + { + DiskName = DiskName, + SourceImageName = ImageName, + MediaLink = string.IsNullOrEmpty(MediaLocation) ? null : new Uri(MediaLocation), + HostCaching = HostCaching, + DiskLabel = string.IsNullOrEmpty(DiskLabel) ? null : DiskLabel + }; + + WriteObject(role, true); + } + + protected void ValidateParameters() + { + AzureSubscription currentSubscription = CurrentContext.Subscription; + if ((currentSubscription == null || string.IsNullOrEmpty(currentSubscription.GetProperty(AzureSubscription.Property.StorageAccount))) && string.IsNullOrEmpty(MediaLocation)) + { + throw new ArgumentException(Resources.MustSpecifyMediaLocationOrHaveCurrentStorageAccount); + } + + if (string.IsNullOrEmpty(Label)) + { + Label = Name; + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/RemoveAzureVM.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/RemoveAzureVM.cs new file mode 100644 index 000000000000..a89edb11d806 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/RemoveAzureVM.cs @@ -0,0 +1,79 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsCommon.Remove, "AzureVM"), OutputType(typeof(ManagementOperationContext))] + public class RemoveAzureVMCommand : IaaSDeploymentManagementCmdletBase + { + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the role to remove.")] + [ValidateNotNullOrEmpty] + public string Name + { + get; + set; + } + + [Parameter(Position = 2, Mandatory = false, HelpMessage = "Specify to remove the VM and the underlying disk blob(s).")] + public SwitchParameter DeleteVHD + { + get; + set; + } + + protected override void ExecuteCommand() + { + ServiceManagementProfile.Initialize(); + + base.ExecuteCommand(); + if (CurrentDeploymentNewSM == null) + { + return; + } + + DeploymentGetResponse deploymentGetResponse = this.ComputeClient.Deployments.GetBySlot(this.ServiceName, DeploymentSlot.Production); + if (deploymentGetResponse.Roles.FirstOrDefault(r => r.RoleName.Equals(Name, StringComparison.InvariantCultureIgnoreCase)) == null) + { + throw new ArgumentOutOfRangeException(String.Format(Resources.RoleInstanceCanNotBeFoundWithName, Name)); + } + + if (deploymentGetResponse.RoleInstances.Count > 1) + { + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.ComputeClient.VirtualMachines.Delete(this.ServiceName, CurrentDeploymentNewSM.Name, Name, DeleteVHD.IsPresent)); + } + else + { + if (deploymentGetResponse != null && !string.IsNullOrEmpty(deploymentGetResponse.ReservedIPName)) + { + WriteVerboseWithTimestamp(string.Format(Resources.ReservedIPNameNoLongerInUseByDeletingLastVMButStillBeingReserved, deploymentGetResponse.ReservedIPName)); + } + + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.ComputeClient.Deployments.DeleteByName(this.ServiceName, CurrentDeploymentNewSM.Name, DeleteVHD.IsPresent)); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/RestartAzureVM.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/RestartAzureVM.cs new file mode 100644 index 000000000000..7c4a506b3569 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/RestartAzureVM.cs @@ -0,0 +1,59 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsLifecycle.Restart, "AzureVM", DefaultParameterSetName = "ByName"), OutputType(typeof(ManagementOperationContext))] + public class RestartAzureVMCommand : IaaSDeploymentManagementCmdletBase + { + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the Virtual Machine to restart.", ParameterSetName = "ByName")] + [ValidateNotNullOrEmpty] + public string Name + { + get; + set; + } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The Virtual Machine to restart.", ParameterSetName = "Input")] + [ValidateNotNullOrEmpty] + [Alias("InputObject")] + public PersistentVM VM + { + get; + set; + } + + protected override void ExecuteCommand() + { + ServiceManagementProfile.Initialize(); + base.ExecuteCommand(); + if (CurrentDeploymentNewSM == null) + { + return; + } + + string roleName = (this.ParameterSetName == "ByName") ? this.Name : this.VM.RoleName; + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.ComputeClient.VirtualMachines.Restart(this.ServiceName, CurrentDeploymentNewSM.Name, roleName), + (s, response) => ContextFactory(response, s)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/SaveAzureVMImage.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/SaveAzureVMImage.cs new file mode 100644 index 000000000000..1b9ffbd070fe --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/SaveAzureVMImage.cs @@ -0,0 +1,186 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet( + VerbsData.Save, + AzureVMImageNoun), + OutputType( + typeof(ManagementOperationContext))] + public class SaveAzureVMImageCommand : IaaSDeploymentManagementCmdletBase + { + protected const string AzureVMImageNoun = "AzureVMImage"; + protected const string GeneralizedStr = "Generalized"; + protected const string SpecializedStr = "Specialized"; + + [Parameter( + Position = 0, + Mandatory = true, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The service name.")] + [ValidateNotNullOrEmpty] + public override string ServiceName + { + get; + set; + } + + [Parameter( + Position = 1, + Mandatory = true, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The name of the virtual machine to export.")] + [ValidateNotNullOrEmpty] + public string Name + { + get; + set; + } + + [Alias("NewImageName")] + [Parameter( + Position = 2, + Mandatory = true, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The name for the new image.")] + [ValidateNotNullOrEmpty] + public string ImageName + { + get; + set; + } + + [Alias("NewImageLabel")] + [Parameter( + Position = 3, + Mandatory = false, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The label for the new image.")] + [ValidateNotNullOrEmpty] + public string ImageLabel + { + get; + set; + } + + [Parameter( + Position = 4, + Mandatory = false, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The OS state.")] + [ValidateNotNullOrEmpty] + [ValidateSet(GeneralizedStr, SpecializedStr, IgnoreCase = true)] + public string OSState + { + get; + set; + } + + protected override void ExecuteCommand() + { + ServiceManagementProfile.Initialize(); + + base.ExecuteCommand(); + + if (CurrentDeploymentNewSM == null) + { + WriteWarning(string.Format(Resources.NoDeploymentFoundByServiceAndVMName, this.ServiceName, this.Name)); + return; + } + + Model.VirtualMachineImageType otherImagetype = Model.VirtualMachineImageType.None; + if (!ValidateNoImageInOtherType(out otherImagetype)) + { + // If there is another type of image with the same name, + // WAPS will stop here to avoid duplicates and potential conflicts + WriteErrorWithTimestamp( + string.Format( + Resources.ErrorAnotherImageTypeFoundWithTheSameName, + otherImagetype, + this.ImageName)); + + return; + } + + Func action = null; + + if (string.IsNullOrEmpty(this.OSState)) + { + action = () => this.ComputeClient.VirtualMachines.CaptureOSImage( + this.ServiceName, + CurrentDeploymentNewSM.Name, + this.Name, + new VirtualMachineCaptureOSImageParameters + { + PostCaptureAction = PostCaptureAction.Delete, + TargetImageLabel = string.IsNullOrEmpty(this.ImageLabel) ? this.ImageName : this.ImageLabel, + TargetImageName = this.ImageName + }); + } + else + { + if (string.Equals(GetRoleInstanceStatus(), RoleInstanceStatus.ReadyRole)) + { + WriteWarning(Resources.CaptureVMImageOperationWhileVMIsStillRunning); + } + + action = () => this.ComputeClient.VirtualMachines.CaptureVMImage( + this.ServiceName, + CurrentDeploymentNewSM.Name, + this.Name, new VirtualMachineCaptureVMImageParameters + { + VMImageName = this.ImageName, + VMImageLabel = string.IsNullOrEmpty(this.ImageLabel) ? this.ImageName : this.ImageLabel, + OSState = this.OSState + }); + } + + if (action != null) + { + ExecuteClientActionNewSM(null, CommandRuntime.ToString(), action); + } + } + + protected bool ValidateNoImageInOtherType(out Model.VirtualMachineImageType otherType) + { + var allTypes = new VirtualMachineImageHelper(this.ComputeClient).GetImageType(this.ImageName); + + otherType = string.IsNullOrEmpty(this.OSState) ? Model.VirtualMachineImageType.VMImage + : Model.VirtualMachineImageType.OSImage; + + return allTypes == Model.VirtualMachineImageType.None || !allTypes.HasFlag(otherType); + } + + protected string GetRoleInstanceStatus() + { + var role = CurrentDeploymentNewSM.RoleInstances + .FirstOrDefault( + r => string.Equals( + r.RoleName, + this.Name, + StringComparison.InvariantCultureIgnoreCase)); + + return role == null ? string.Empty : role.InstanceStatus; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/SetAzureVMSize.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/SetAzureVMSize.cs new file mode 100644 index 000000000000..df83c964b254 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/SetAzureVMSize.cs @@ -0,0 +1,52 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsCommon.Set, "AzureVMSize"), OutputType(typeof(IPersistentVM))] + public class SetAzureVMSizeCommand : VirtualMachineConfigurationCmdletBase + { + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Represents the size of the machine.")] + [ValidateNotNullOrEmpty] + public string InstanceSize + { + get; + set; + } + + internal void ExecuteCommand() + { + var role = VM.GetInstance(); + role.RoleSize = InstanceSize; + WriteObject(VM, true); + } + + protected override void ProcessRecord() + { + try + { + base.ProcessRecord(); + ExecuteCommand(); + } + catch (Exception ex) + { + WriteError(new ErrorRecord(ex, string.Empty, ErrorCategory.CloseError, null)); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/StartAzureVM.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/StartAzureVM.cs new file mode 100644 index 000000000000..2ee5e199f439 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/StartAzureVM.cs @@ -0,0 +1,73 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsLifecycle.Start, "AzureVM", DefaultParameterSetName = "ByName"), OutputType(typeof(ManagementOperationContext))] + public class StartAzureVMCommand : IaaSDeploymentManagementCmdletBase + { + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the Virtual Machine to start.", ParameterSetName = "ByName")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The Virtual Machine to restart.", ParameterSetName = "Input")] + [ValidateNotNullOrEmpty] + [Alias("InputObject")] + public PersistentVM VM { get; set; } + + protected override void ExecuteCommand() + { + ServiceManagementProfile.Initialize(); + + base.ExecuteCommand(); + + if (this.CurrentDeploymentNewSM == null) + { + return; + } + + string roleName = (this.ParameterSetName == "ByName") ? this.Name : this.VM.RoleName; + + // Generate a list of role names matching wildcard patterns or + // the exact name specified in the -Name parameter. + var roleNames = PersistentVMHelper.GetRoleNames(this.CurrentDeploymentNewSM.RoleInstances, roleName); + + // Insure at least one of the role name instances can be found. + if ((roleNames == null) || (!roleNames.Any())) + { + throw new ArgumentOutOfRangeException(String.Format(Resources.RoleInstanceCanNotBeFoundWithName, Name)); + } + + var parameters = new VirtualMachineStartRolesParameters(); + foreach(var r in roleNames) + { + parameters.Roles.Add(r); + } + + this.ExecuteClientActionNewSM( + null, + this.CommandRuntime.ToString(), + () => this.ComputeClient.VirtualMachines.StartRoles(this.ServiceName, this.CurrentDeploymentNewSM.Name, parameters)); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/StopAzureVM.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/StopAzureVM.cs new file mode 100644 index 000000000000..d8f41605c07a --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/StopAzureVM.cs @@ -0,0 +1,205 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsLifecycle.Stop, "AzureVM", DefaultParameterSetName = "ByName"), OutputType(typeof(ManagementOperationContext))] + public class StopAzureVMCommand : IaaSDeploymentManagementCmdletBase + { + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the Virtual Machine to stop.", ParameterSetName = "ByName")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The Virtual Machine to restart.", ParameterSetName = "Input")] + [ValidateNotNullOrEmpty] + [Alias("InputObject")] + public Model.PersistentVM VM { get; set; } + + [Parameter(Position = 2, HelpMessage = "Keeps the VM provisioned")] + public SwitchParameter StayProvisioned { get; set; } + + [Parameter(Position = 3, HelpMessage = "Allows the deallocation of last VM in a deployment")] + public SwitchParameter Force { get; set; } + + protected override void ExecuteCommand() + { + base.ExecuteCommand(); + ServiceManagementProfile.Initialize(); + + if (this.CurrentDeploymentNewSM == null) + { + return; + } + + string roleName = (this.ParameterSetName == "ByName") ? this.Name : this.VM.RoleName; + + // Generate a list of role names matching regular expressions or + // the exact name specified in the -Name parameter. + var roleNames = PersistentVMHelper.GetRoleNames(this.CurrentDeploymentNewSM.RoleInstances, roleName); + + // Insure at least one of the role name instances can be found. + if ((roleNames == null) || (!roleNames.Any())) + { + throw new ArgumentOutOfRangeException(String.Format(Resources.RoleInstanceCanNotBeFoundWithName, this.Name)); + } + + // Insure the Force switch is specified for wildcard operations when StayProvisioned is not specified. + if (WildcardPattern.ContainsWildcardCharacters(roleName) && (!this.StayProvisioned.IsPresent) && (!this.Force.IsPresent)) + { + throw new ArgumentException(Resources.MustSpecifyForceParameterWhenUsingWildcards); + } + + if (roleNames.Count == 1) + { + if (this.StayProvisioned.IsPresent) + { + ProcessStaticIPAddressWarningInfo(roleNames[0]); + + this.ExecuteClientActionNewSM( + null, + this.CommandRuntime.ToString(), + () => this.ComputeClient.VirtualMachines.Shutdown( + this.ServiceName, + this.CurrentDeploymentNewSM.Name, + roleNames[0], + new VirtualMachineShutdownParameters { PostShutdownAction = PostShutdownAction.Stopped }), + (s, response) => this.ContextFactory(response, s)); + } + else + { + if (!this.Force.IsPresent && this.IsLastVmInDeployment(roleNames.Count)) + { + this.ConfirmAction(false, + Resources.DeploymentVIPLossWarning, + string.Format(Resources.DeprovisioningVM, roleName), + String.Empty, + () => this.ExecuteClientActionNewSM( + null, + this.CommandRuntime.ToString(), + () => this.ComputeClient.VirtualMachines.Shutdown( + this.ServiceName, + this.CurrentDeploymentNewSM.Name, + roleNames[0], + new VirtualMachineShutdownParameters { PostShutdownAction = PostShutdownAction.StoppedDeallocated }), + (s, response) => ContextFactory(response, s))); + } + else + { + this.ExecuteClientActionNewSM( + null, + this.CommandRuntime.ToString(), + () => this.ComputeClient.VirtualMachines.Shutdown( + this.ServiceName, + this.CurrentDeploymentNewSM.Name, + roleNames[0], + new VirtualMachineShutdownParameters { PostShutdownAction = PostShutdownAction.StoppedDeallocated }), + (s, response) => this.ContextFactory(response, s)); + } + } + } + else + { + if (this.StayProvisioned.IsPresent) + { + var parameter = new VirtualMachineShutdownRolesParameters(); + foreach (var role in roleNames) + { + ProcessStaticIPAddressWarningInfo(role); + parameter.Roles.Add(role); + } + parameter.PostShutdownAction = PostShutdownAction.Stopped; + + this.ExecuteClientActionNewSM( + null, + this.CommandRuntime.ToString(), + () => this.ComputeClient.VirtualMachines.ShutdownRoles(this.ServiceName, this.CurrentDeploymentNewSM.Name, parameter)); + } + else + { + var parameter = new VirtualMachineShutdownRolesParameters(); + foreach (var role in roleNames) + { + parameter.Roles.Add(role); + } + parameter.PostShutdownAction = PostShutdownAction.StoppedDeallocated; + + if (!this.Force.IsPresent && this.IsLastVmInDeployment(roleNames.Count)) + { + this.ConfirmAction(false, + Resources.DeploymentVIPLossWarning, + string.Format(Resources.DeprovisioningVM, roleName), + String.Empty, + () => this.ExecuteClientActionNewSM( + null, + this.CommandRuntime.ToString(), + () => this.ComputeClient.VirtualMachines.ShutdownRoles(this.ServiceName, this.CurrentDeploymentNewSM.Name, parameter))); + } + else + { + this.ExecuteClientActionNewSM( + null, + this.CommandRuntime.ToString(), + () => this.ComputeClient.VirtualMachines.ShutdownRoles(this.ServiceName, this.CurrentDeploymentNewSM.Name, parameter)); + } + } + } + } + + private bool IsLastVmInDeployment(int vmCount) + { + Func roleNotStoppedDeallocated = + r => String.Compare( + r.InstanceStatus, + PostShutdownAction.StoppedDeallocated.ToString(), + true, + CultureInfo.InvariantCulture) != 0; + bool result = this.CurrentDeploymentNewSM.RoleInstances.Count(roleNotStoppedDeallocated) <= vmCount; + + if (result && !this.StayProvisioned.IsPresent) + { + if (this.CurrentDeploymentNewSM != null && !string.IsNullOrEmpty(this.CurrentDeploymentNewSM.ReservedIPName)) + { + WriteWarning(string.Format(Resources.ReservedIPNameNoLongerInUseByStoppingLastVMButStillBeingReserved, this.CurrentDeploymentNewSM.ReservedIPName)); + } + } + + return result; + } + + private void ProcessStaticIPAddressWarningInfo(string vmRoleName) + { + var vmRole = this.CurrentDeploymentNewSM.Roles.FirstOrDefault(r => r.RoleName == vmRoleName); + if (vmRole.ConfigurationSets != null) + { + var configSet = vmRole.ConfigurationSets.FirstOrDefault(c => !string.IsNullOrEmpty(c.StaticVirtualNetworkIPAddress)); + if (configSet != null) + { + WriteWarning(string.Format( + Resources.StaticIPAddressNoLongerInUseButStillBeingReserved, + vmRoleName, + configSet.StaticVirtualNetworkIPAddress)); + } + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/UpdateAzureVM.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/UpdateAzureVM.cs new file mode 100644 index 000000000000..7617aa7753ee --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/UpdateAzureVM.cs @@ -0,0 +1,172 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using AutoMapper; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; +using Microsoft.WindowsAzure.Storage; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + [Cmdlet(VerbsData.Update, "AzureVM"), OutputType(typeof(ManagementOperationContext))] + public class UpdateAzureVMCommand : IaaSDeploymentManagementCmdletBase + { + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the Virtual Machine to update.")] + [ValidateNotNullOrEmpty] + public string Name + { + get; + set; + } + + [Parameter(Mandatory = true, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Virtual Machine to update.")] + [ValidateNotNullOrEmpty] + [Alias("InputObject")] + public Model.PersistentVM VM + { + get; + set; + } + + internal void ExecuteCommandNewSM() + { + ServiceManagementProfile.Initialize(); + + base.ExecuteCommand(); + + AzureSubscription currentSubscription = CurrentContext.Subscription; + if (CurrentDeploymentNewSM == null) + { + throw new ApplicationException(String.Format(Resources.CouldNotFindDeployment, ServiceName, Model.DeploymentSlotType.Production)); + } + + // Auto generate disk names based off of default storage account + foreach (var datadisk in this.VM.DataVirtualHardDisks) + { + if (datadisk.MediaLink == null && string.IsNullOrEmpty(datadisk.DiskName)) + { + CloudStorageAccount currentStorage = currentSubscription.GetCloudStorageAccount(); + if (currentStorage == null) + { + throw new ArgumentException(Resources.CurrentStorageAccountIsNotAccessible); + } + + DateTime dateTimeCreated = DateTime.Now; + string diskPartName = VM.RoleName; + + if (datadisk.DiskLabel != null) + { + diskPartName += "-" + datadisk.DiskLabel; + } + + string vhdname = string.Format("{0}-{1}-{2}-{3}-{4}-{5}.vhd", ServiceName, diskPartName, dateTimeCreated.Year, dateTimeCreated.Month, dateTimeCreated.Day, dateTimeCreated.Millisecond); + string blobEndpoint = currentStorage.BlobEndpoint.AbsoluteUri; + + if (blobEndpoint.EndsWith("/") == false) + { + blobEndpoint += "/"; + } + + datadisk.MediaLink = new Uri(blobEndpoint + "vhds/" + vhdname); + } + + if (VM.DataVirtualHardDisks.Count > 1) + { + // To avoid duplicate disk names + System.Threading.Thread.Sleep(1); + } + } + + var parameters = new VirtualMachineUpdateParameters + { + AvailabilitySetName = VM.AvailabilitySetName, + Label = VM.Label, + OSVirtualHardDisk = Mapper.Map(VM.OSVirtualHardDisk), + RoleName = VM.RoleName, + RoleSize = VM.RoleSize, + ProvisionGuestAgent = VM.ProvisionGuestAgent, + ResourceExtensionReferences = VM.ProvisionGuestAgent != null && VM.ProvisionGuestAgent.Value ? Mapper.Map>(VM.ResourceExtensionReferences) : null + }; + + if (parameters.OSVirtualHardDisk != null) + { + parameters.OSVirtualHardDisk.IOType = null; + } + + if (VM.DataVirtualHardDisks != null) + { + parameters.DataVirtualHardDisks = new List(); + VM.DataVirtualHardDisks.ForEach(c => + { + var dataDisk = Mapper.Map(c); + dataDisk.LogicalUnitNumber = dataDisk.LogicalUnitNumber; + parameters.DataVirtualHardDisks.Add(dataDisk); + }); + parameters.DataVirtualHardDisks.ForEach(d => d.IOType = null); + } + + if (VM.ConfigurationSets != null) + { + PersistentVMHelper.MapConfigurationSets(VM.ConfigurationSets).ForEach(c => parameters.ConfigurationSets.Add(c)); + } + + if (VM.DataVirtualHardDisksToBeDeleted != null && VM.DataVirtualHardDisksToBeDeleted.Any()) + { + var vmRole = CurrentDeploymentNewSM.Roles.First(r => r.RoleName == this.Name); + if (vmRole != null) + { + foreach (var dataDiskToBeDeleted in VM.DataVirtualHardDisksToBeDeleted) + { + int lun = dataDiskToBeDeleted.Lun; + try + { + this.ComputeClient.VirtualMachineDisks.DeleteDataDisk( + this.ServiceName, + CurrentDeploymentNewSM.Name, + vmRole.RoleName, + lun, + true); + } + catch (CloudException ex) + { + WriteWarning(string.Format(Resources.CannotDeleteVirtualMachineDataDiskForLUN, lun)); + + if (ex.Response.StatusCode != System.Net.HttpStatusCode.NotFound) + { + throw; + } + } + } + } + } + + ExecuteClientActionNewSM( + parameters, + CommandRuntime.ToString(), + () => this.ComputeClient.VirtualMachines.Update(this.ServiceName, CurrentDeploymentNewSM.Name, this.Name, parameters)); + } + + protected override void ExecuteCommand() + { + this.ExecuteCommandNewSM(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/WinRMConstants.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/WinRMConstants.cs new file mode 100644 index 000000000000..f5327ff0c719 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/PersistentVMs/WinRMConstants.cs @@ -0,0 +1,22 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + public static class WinRMConstants + { + public const int HttpsListenerPort = 5986; + public const string EndpointName = "PowerShell"; + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/ProvisioningConfigurationCmdletBase.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/ProvisioningConfigurationCmdletBase.cs new file mode 100644 index 000000000000..b249aca313de --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/ProvisioningConfigurationCmdletBase.cs @@ -0,0 +1,330 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Management.Automation; +using System.Security.Cryptography.X509Certificates; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + public class ProvisioningConfigurationCmdletBase : ServiceManagementBaseCmdlet + { + public const string LinuxParameterSetName = OS.Linux; + public const string WindowsParameterSetName = OS.Windows; + public const string WindowsDomainParameterSetName = "WindowsDomain"; + + [Parameter(Mandatory = true, ParameterSetName = LinuxParameterSetName, HelpMessage = "Set configuration to Linux.")] + public SwitchParameter Linux + { + get; + set; + } + + [Parameter(Mandatory = false, ParameterSetName = LinuxParameterSetName, HelpMessage = "User to Create")] + [ValidateNotNullOrEmpty] + public string LinuxUser + { + get; + set; + } + + [Parameter(Mandatory = false, ParameterSetName = LinuxParameterSetName, HelpMessage = "Disable SSH Password Authentication.")] + public SwitchParameter DisableSSH + { + get; + set; + } + + [Parameter(Mandatory = false, ParameterSetName = LinuxParameterSetName, HelpMessage = "Do not create an SSH Endpoint.")] + public SwitchParameter NoSSHEndpoint + { + get; + set; + } + + [Parameter(Mandatory = false, ParameterSetName = LinuxParameterSetName, HelpMessage = "Allow to create passwordless VM")] + public SwitchParameter NoSSHPassword + { + get; + set; + } + + [Parameter(Mandatory = false, ParameterSetName = LinuxParameterSetName, HelpMessage = "SSH Public Key List")] + public LinuxProvisioningConfigurationSet.SSHPublicKeyList SSHPublicKeys + { + get; + set; + } + + [Parameter(Mandatory = false, ParameterSetName = LinuxParameterSetName, HelpMessage = "SSH Key Pairs")] + public LinuxProvisioningConfigurationSet.SSHKeyPairList SSHKeyPairs + { + get; + set; + } + + [Parameter(Mandatory = false, HelpMessage = "Custom Data file")] + public string CustomDataFile + { + get; + set; + } + + [Parameter(Mandatory = true, ParameterSetName = WindowsParameterSetName, HelpMessage = "Set configuration to Windows.")] + public SwitchParameter Windows + { + get; + set; + } + + [Parameter(Mandatory = false, ParameterSetName = WindowsParameterSetName, HelpMessage = "Specifies the Administrator to create.")] + [Parameter(Mandatory = true, ParameterSetName = WindowsDomainParameterSetName, HelpMessage = "Specifies the Administrator to create.")] + [ValidateNotNullOrEmpty] + public string AdminUsername + { + get; + set; + } + + [Parameter(Mandatory = true, ParameterSetName = WindowsDomainParameterSetName, HelpMessage = "Set configuration to Windows with Domain Join.")] + public SwitchParameter WindowsDomain + { + get; + set; + } + + [Parameter(Mandatory = false, ParameterSetName = WindowsParameterSetName, HelpMessage = "Administrator password to use for the role.")] + [Parameter(Mandatory = false, ParameterSetName = WindowsDomainParameterSetName, HelpMessage = "Administrator password to use for the role.")] + [Parameter(Mandatory = false, ParameterSetName = LinuxParameterSetName, HelpMessage = "Default password for linux user created.")] + [ValidateNotNullOrEmpty] + public string Password + { + get; + set; + } + + [Parameter(Mandatory = false, ParameterSetName = WindowsParameterSetName, HelpMessage = "Specify to force the user to change the password on first logon.")] + [Parameter(Mandatory = false, ParameterSetName = WindowsDomainParameterSetName, HelpMessage = "Specify to force the user to change the password on first logon.")] + [ValidateNotNullOrEmpty] + public SwitchParameter ResetPasswordOnFirstLogon + { + get; + set; + } + + [Parameter(Mandatory = false, ParameterSetName = WindowsParameterSetName, HelpMessage = "Disable Automatic Updates.")] + [Parameter(Mandatory = false, ParameterSetName = WindowsDomainParameterSetName, HelpMessage = "Disable Automatic Updates.")] + [ValidateNotNullOrEmpty] + public SwitchParameter DisableAutomaticUpdates + { + get; + set; + } + + [Parameter(Mandatory = false, ParameterSetName = WindowsParameterSetName, HelpMessage = "Do No Create an RDP Endpoint.")] + [Parameter(Mandatory = false, ParameterSetName = WindowsDomainParameterSetName, HelpMessage = "Do Not Create an RDP Endpoint.")] + [ValidateNotNullOrEmpty] + public SwitchParameter NoRDPEndpoint + { + get; + set; + } + + [Parameter(Mandatory = false, ParameterSetName = WindowsParameterSetName, HelpMessage = "Specify the time zone for the virtual machine.")] + [Parameter(Mandatory = false, ParameterSetName = WindowsDomainParameterSetName, HelpMessage = "Specify the time zone for the virtual machine.")] + [ValidateNotNullOrEmpty] + public string TimeZone + { + get; + set; + } + + [Parameter(Mandatory = false, ParameterSetName = WindowsParameterSetName, HelpMessage = "Set of certificates to install in the VM.")] + [Parameter(Mandatory = false, ParameterSetName = WindowsDomainParameterSetName, HelpMessage = "Set of certificates to install in the VM.")] + [ValidateNotNullOrEmpty] + public CertificateSettingList Certificates + { + get; + set; + } + + [Parameter(Mandatory = true, ParameterSetName = WindowsDomainParameterSetName, HelpMessage = "Domain to join (FQDN).")] + [ValidateNotNullOrEmpty] + public string JoinDomain + { + get; + set; + } + + [Parameter(Mandatory = true, ParameterSetName = WindowsDomainParameterSetName, HelpMessage = "Domain name.")] + [ValidateNotNullOrEmpty] + public string Domain + { + get; + set; + } + + [Parameter(Mandatory = true, ParameterSetName = WindowsDomainParameterSetName, HelpMessage = "Domain user name.")] + [ValidateNotNullOrEmpty] + public string DomainUserName + { + get; + set; + } + + [Parameter(Mandatory = true, ParameterSetName = WindowsDomainParameterSetName, HelpMessage = "Domain password.")] + [ValidateNotNullOrEmpty] + public string DomainPassword + { + get; + set; + } + + [Parameter(Mandatory = false, ParameterSetName = WindowsDomainParameterSetName, HelpMessage = "Machine object organization unit.")] + [ValidateNotNullOrEmpty] + public string MachineObjectOU + { + get; + set; + } + + [Parameter(Mandatory = false, ParameterSetName = WindowsParameterSetName, HelpMessage = "Enables WinRM over http")] + [Parameter(Mandatory = false, ParameterSetName = WindowsDomainParameterSetName, HelpMessage = "Enables WinRM over http")] + [ValidateNotNullOrEmpty] + public SwitchParameter EnableWinRMHttp + { + get; + set; + } + + [Parameter(Mandatory = false, ParameterSetName = WindowsParameterSetName, HelpMessage = "Disables WinRM on http/https")] + [Parameter(Mandatory = false, ParameterSetName = WindowsDomainParameterSetName, HelpMessage = "Disables WinRM on http/https")] + [ValidateNotNullOrEmpty] + public SwitchParameter DisableWinRMHttps + { + get; + set; + } + + [Parameter(Mandatory = false, ParameterSetName = WindowsParameterSetName, HelpMessage = "Certificate that will be associated with WinRM endpoint.")] + [Parameter(Mandatory = false, ParameterSetName = WindowsDomainParameterSetName, HelpMessage = "Certificate that will be associated with WinRM endpoint.")] + [ValidateNotNullOrEmpty] + public X509Certificate2 WinRMCertificate + { + get; + set; + } + + [Parameter(Mandatory = false, ParameterSetName = WindowsParameterSetName, HelpMessage = "X509Certificates that will be deployed to hosted service.")] + [Parameter(Mandatory = false, ParameterSetName = WindowsDomainParameterSetName, HelpMessage = "X509Certificates that will be deployed to hosted service.")] + [ValidateNotNullOrEmpty] + public X509Certificate2[] X509Certificates + { + get; + set; + } + + [Parameter(Mandatory = false, ParameterSetName = WindowsParameterSetName, HelpMessage = "Prevents the private key from being uploaded")] + [Parameter(Mandatory = false, ParameterSetName = WindowsDomainParameterSetName, HelpMessage = "Prevents the private key from being uploaded")] + [ValidateNotNullOrEmpty] + public SwitchParameter NoExportPrivateKey + { + get; + set; + } + + [Parameter(Mandatory = false, ParameterSetName = WindowsParameterSetName, HelpMessage = "Prevents the WinRM endpoint from being added")] + [Parameter(Mandatory = false, ParameterSetName = WindowsDomainParameterSetName, HelpMessage = "Prevents the WinRM endpoint from being added")] + [ValidateNotNullOrEmpty] + public SwitchParameter NoWinRMEndpoint + { + get; + set; + } + + protected void SetProvisioningConfiguration(LinuxProvisioningConfigurationSet provisioningConfiguration) + { + provisioningConfiguration.UserName = LinuxUser; + provisioningConfiguration.UserPassword = SecureStringHelper.GetSecureString(Password); + if (NoSSHPassword.IsPresent) + { + provisioningConfiguration.UserPassword = SecureStringHelper.GetSecureString(String.Empty); + } + + if (DisableSSH.IsPresent || NoSSHPassword.IsPresent) + { + provisioningConfiguration.DisableSshPasswordAuthentication = true; + } + else + { + provisioningConfiguration.DisableSshPasswordAuthentication = false; + } + + if (SSHKeyPairs != null && SSHKeyPairs.Count > 0 || SSHPublicKeys != null && SSHPublicKeys.Count > 0) + { + provisioningConfiguration.SSH = new LinuxProvisioningConfigurationSet.SSHSettings { PublicKeys = SSHPublicKeys, KeyPairs = SSHKeyPairs }; + } + + if (!string.IsNullOrEmpty(CustomDataFile)) + { + string fileName = this.TryResolvePath(this.CustomDataFile); + provisioningConfiguration.CustomData = PersistentVMHelper.ConvertCustomDataFileToBase64(fileName); + } + } + + protected void SetProvisioningConfiguration(WindowsProvisioningConfigurationSet provisioningConfiguration) + { + provisioningConfiguration.AdminUsername = AdminUsername; + provisioningConfiguration.AdminPassword = SecureStringHelper.GetSecureString(Password); + provisioningConfiguration.ResetPasswordOnFirstLogon = ResetPasswordOnFirstLogon.IsPresent; + provisioningConfiguration.StoredCertificateSettings = CertUtilsNewSM.GetCertificateSettings(Certificates, X509Certificates); + provisioningConfiguration.EnableAutomaticUpdates = !DisableAutomaticUpdates.IsPresent; + + if (provisioningConfiguration.StoredCertificateSettings == null) + { + provisioningConfiguration.StoredCertificateSettings = new CertificateSettingList(); + } + + if (!string.IsNullOrEmpty(TimeZone)) + { + provisioningConfiguration.TimeZone = TimeZone; + } + + if (WindowsDomainParameterSetName.Equals(ParameterSetName, StringComparison.OrdinalIgnoreCase)) + { + provisioningConfiguration.DomainJoin = new WindowsProvisioningConfigurationSet.DomainJoinSettings + { + Credentials = new WindowsProvisioningConfigurationSet.DomainJoinCredentials + { + Username = DomainUserName, + Password = SecureStringHelper.GetSecureString(DomainPassword), + Domain = Domain + }, + MachineObjectOU = MachineObjectOU, + JoinDomain = JoinDomain + }; + } + + if (!string.IsNullOrEmpty(CustomDataFile)) + { + string fileName = this.TryResolvePath(this.CustomDataFile); + provisioningConfiguration.CustomData = PersistentVMHelper.ConvertCustomDataFileToBase64(fileName); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/VirtualMachineConfigurationCmdletBase.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/VirtualMachineConfigurationCmdletBase.cs new file mode 100644 index 000000000000..e94ac7ab90e8 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/VirtualMachineConfigurationCmdletBase.cs @@ -0,0 +1,52 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS +{ + public class VirtualMachineConfigurationCmdletBase : ServiceManagementBaseCmdlet + { + protected const string StaticVNetIPNoun = "AzureStaticVNetIP"; + protected const string PublicIPNoun = "AzurePublicIP"; + protected const string NetworkInterfaceConfig = "AzureNetworkInterfaceConfig"; + protected const string NetworkSecurityGroupConfig = "AzureNetworkSecurityGroupConfig"; + [Parameter( + Mandatory = true, + ValueFromPipeline = true, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Virtual Machine to update.")] + [ValidateNotNullOrEmpty] + [Alias("InputObject")] + public IPersistentVM VM + { + get; + set; + } + + protected NetworkConfigurationSet GetNetworkConfiguration() + { + var vm = VM.GetInstance(); + if (vm != null & vm.ConfigurationSets != null) + { + return vm.ConfigurationSets.OfType().SingleOrDefault(); + } + + return null; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/MSSharedLibKey.snk b/src/ServiceManagement/Compute/Commands.ServiceManagement/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ServiceManagement/Compute/Commands.ServiceManagement/MSSharedLibKey.snk differ diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Microsoft.WindowsAzure.Commands.ServiceManagement.dll-Help.psd1 b/src/ServiceManagement/Compute/Commands.ServiceManagement/Microsoft.WindowsAzure.Commands.ServiceManagement.dll-Help.psd1 new file mode 100644 index 000000000000..032ac4ea263a --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Microsoft.WindowsAzure.Commands.ServiceManagement.dll-Help.psd1 @@ -0,0 +1,86 @@ +# +# Module manifest for module 'Azure' +# +# Generated by: Microsoft Corporation +# +# Generated on: 5/23/2012 +# + +@{ + +# Version number of this module. +ModuleVersion = '0.8.8' + +# ID used to uniquely identify this module +GUID = 'D48CF693-4125-4D2D-8790-1514F44CE325' + +# Author of this module +Author = 'Microsoft Corporation' + +# Company or vendor of this module +CompanyName = 'Microsoft Corporation' + +# Copyright statement for this module +Copyright = '?Microsoft Corporation. All rights reserved.' + +# Description of the functionality provided by this module +Description = '' + +# Minimum version of the Windows PowerShell engine required by this module +PowerShellVersion = '3.0' + +# Name of the Windows PowerShell host required by this module +PowerShellHostName = '' + +# Minimum version of the Windows PowerShell host required by this module +PowerShellHostVersion = '' + +# Minimum version of the .NET Framework required by this module +DotNetFrameworkVersion = '4.0' + +# Minimum version of the common language runtime (CLR) required by this module +CLRVersion='4.0' + +# Processor architecture (None, X86, Amd64, IA64) required by this module +ProcessorArchitecture = 'None' + +# Modules that must be imported into the global environment prior to importing this module +RequiredModules = @() + +# Assemblies that must be loaded prior to importing this module +RequiredAssemblies = @() + +# Script files (.ps1) that are run in the caller's environment prior to importing this module +ScriptsToProcess = @() + +# Type files (.ps1xml) to be loaded when importing this module +TypesToProcess = @() + +# Format files (.ps1xml) to be loaded when importing this module +FormatsToProcess = @() + +# Modules to import as nested modules of the module specified in ModuleToProcess +NestedModules = '..\..\..\Package\Debug\ServiceManagement\Azure\Compute\Microsoft.WindowsAzure.Commands.ServiceManagement.dll' + +# Functions to export from this module +FunctionsToExport = '*' + +# Cmdlets to export from this module +CmdletsToExport = '*' + +# Variables to export from this module +VariablesToExport = '*' + +# Aliases to export from this module +AliasesToExport = @() + +# List of all modules packaged with this module +ModuleList = @() + +# List of all files packaged with this module +FileList = @() + +# Private data to pass to the module specified in ModuleToProcess +PrivateData = '' + +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Microsoft.WindowsAzure.Commands.ServiceManagement.dll-Help.xml b/src/ServiceManagement/Compute/Commands.ServiceManagement/Microsoft.WindowsAzure.Commands.ServiceManagement.dll-Help.xml new file mode 100644 index 000000000000..06622dba8132 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Microsoft.WindowsAzure.Commands.ServiceManagement.dll-Help.xml @@ -0,0 +1,34584 @@ + + + + + Add-AzureCertificate + + Uploads a service certificate for the specified cloud service. + + + + + Add + AzureCertificate + + + + + + + + + Add-AzureCertificate + + ServiceName + + Specifies the name of the Microsoft Azure service to which you are adding a certificate. + + String + + + CertToDeploy + + Specifies the certificate to deploy. You can specify the path file name of a certificate file (*.cer, *. pfx, etc) or an X.509 Certificate object. + + Object + + + Password + + Specifies the certificate password. + + String + + + + + + ServiceName + + Specifies the name of the Microsoft Azure service to which you are adding a certificate. + + String + + String + + + + + + CertToDeploy + + Specifies the certificate to deploy. You can specify the path file name of a certificate file (*.cer, *. pfx, etc) or an X.509 Certificate object. + + Object + + Object + + + + + + Password + + Specifies the certificate password. + + String + + String + + + + + + + + + + + + + + + + + + + + + ManagementOperationContext + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Add-AzureCertificate -serviceName "MyService" -certToDeploy myCertificate.pfx –password 123 + + This command uploads myCertificate.pfx certificate to the specified cloud service. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> C:\PS>Add-AzureCertificate -serviceName "MyService" -certToDeploy myCertificate.cer + + This command uploads myCertificate.cer certificate to the specified cloud service. + + + + + + + + + -------------------------- Example 3 -------------------------- + + + + PS C:\> C:\PS>Add-AzureCertificate -serviceName "MyService" -certToDeploy (Get-Item cert:\CurrentUser\MY\1D6E34B526723E06C235BE8E5547784BF12C9F39) + + This command uploads the specified certificate to the specified cloud service, using the Get-Item Windows PowerShell cmdlet to get the certificate object. + + + + + + + + + + + Get-AzureCertificate + + + + Remove-AzureCertificate + + + + + + + + Add-AzureDataDisk + + Adds a new data disk to a virtual machine object. + + + + + Add + AzureDataDisk + + + + + The Add-AzureDataDisk cmdlet adds a new data disk to a virtual machine object. Use the –CreateNew parameter to create a new data disk with a specified size and label, and then attach it. Use the –Import parameter to attach an existing disk from the image repository. Use the –ImportFrom parameter to attach an existing disk from a blob in a storage account.The cmdlet allows you to specify the host-cache mode of attached data disks. + + + + Add-AzureDataDisk + + CreateNew + + Specify to create a new data disk. + + SwitchParameter + + + DiskSizeInGB + + Specifies the logical disk size in gigabytes. + + Int32 + + + DiskLabel + + Specifies the disk label when creating a new data disk. + + String + + + LUN + + Specifies the Logical Unit Number (LUN) location for the data drive in the virtual machine. Valid LUN values are 0-15 and each data disk must have a unique LUN. + + Int32 + + + MediaLocation + + Optional. Specifies the Location of the blob in a Microsoft Azure storage account where the data disk will be stored. If no location is specified, the data disk will be stored in the vhds container within the default storage account for the current subscription. If a vhds container doesn’t exist, the container is created + + String + + + HostCaching + + Specifies the host level caching settings of the disk. Possible values are: None, ReadOnly and ReadWrite. + + String + + + VM + + Specifies the virtual machine object where the data disk will attach. + + IPersistentVM + + + + Add-AzureDataDisk + + Import + + Imports an existing data disk from the disk library. + + SwitchParameter + + + DiskName + + Specifies the name of the data disk in the disk repository. + + String + + + LUN + + Specifies the Logical Unit Number (LUN) location for the data drive in the virtual machine. Valid LUN values are 0-15 and each data disk must have a unique LUN. + + Int32 + + + HostCaching + + Specifies the host level caching settings of the disk. Possible values are: None, ReadOnly and ReadWrite. + + String + + + VM + + Specifies the virtual machine object where the data disk will attach. + + IPersistentVM + + + + Add-AzureDataDisk + + ImportFrom + + Imports an existing data disk from a blob in a storage acount. + + SwitchParameter + + + DiskLabel + + Specifies the disk label when creating a new data disk. + + String + + + LUN + + Specifies the Logical Unit Number (LUN) location for the data drive in the virtual machine. Valid LUN values are 0-15 and each data disk must have a unique LUN. + + Int32 + + + MediaLocation + + Optional. Specifies the Location of the blob in a Microsoft Azure storage account where the data disk will be stored. If no location is specified, the data disk will be stored in the vhds container within the default storage account for the current subscription. If a vhds container doesn’t exist, the container is created + + String + + + HostCaching + + Specifies the host level caching settings of the disk. Possible values are: None, ReadOnly and ReadWrite. + + String + + + VM + + Specifies the virtual machine object where the data disk will attach. + + IPersistentVM + + + + + + CreateNew + + Specify to create a new data disk. + + SwitchParameter + + SwitchParameter + + + + + + DiskSizeInGB + + Specifies the logical disk size in gigabytes. + + Int32 + + Int32 + + + + + + DiskLabel + + Specifies the disk label when creating a new data disk. + + String + + String + + + + + + LUN + + Specifies the Logical Unit Number (LUN) location for the data drive in the virtual machine. Valid LUN values are 0-15 and each data disk must have a unique LUN. + + Int32 + + Int32 + + + + + + MediaLocation + + Optional. Specifies the Location of the blob in a Microsoft Azure storage account where the data disk will be stored. If no location is specified, the data disk will be stored in the vhds container within the default storage account for the current subscription. If a vhds container doesn’t exist, the container is created + + String + + String + + + + + + HostCaching + + Specifies the host level caching settings of the disk. Possible values are: None, ReadOnly and ReadWrite. + + String + + String + + + + + + VM + + Specifies the virtual machine object where the data disk will attach. + + IPersistentVM + + IPersistentVM + + + + + + Import + + Imports an existing data disk from the disk library. + + SwitchParameter + + SwitchParameter + + + + + + DiskName + + Specifies the name of the data disk in the disk repository. + + String + + String + + + + + + ImportFrom + + Imports an existing data disk from a blob in a storage acount. + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Get-AzureVM "myservice" -Name "MyVM" ` + | Add-AzureDataDisk -Import -DiskName "MyExistingDisk" -LUN 0 ` + | Update-AzureVM + + This example gets a virtual machine object for the virtual machine named “MyVM” in the “myservice” cloud service, updates the virtual machine object by attaching an existing data disk from the repository using the disk name, and then updates the Microsoft Azure virtual machine. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> C:\PS>Get-AzureVM "myservice" -Name "MyVM" ` + | Add-AzureDataDisk -CreateNew -DiskSizeInGB 128 -DiskLabel "main" -LUN 0 ` + | Update-AzureVM + + This example updates the virtual machine by creating the new blank data disk “MyNewDisk.vhd” in the vhds container within the default storage account of the currently active subscription. + + + + + + + + + -------------------------- Example 3 -------------------------- + + + + PS C:\> C:\PS>Get-AzureVM "myservice" -Name "Database" ` + | Add-AzureDataDisk -ImportFrom -MediaLocation ` + "https://mystorage.blob.core.windows.net/mycontainer/MyExistingDisk.vhd" ` + -DiskLabel "main" -LUN 0 ` + | Update-AzureVM + + This example updates a virtual machine by attaching an existing data disk from a storage location. + + + + + + + + + + + New-AzureVMConfig + + + + Set-AzureDataDisk + + + + Update-AzureVM + + + + + + + + Add-AzureDisk + + Adds a new disk to the Microsoft Azure disk repository. + + + + + Add + AzureDisk + + + + + The Add-AzureDisk cmdlet adds a new disk to the Microsoft Azure disk repository in the current subscription. This disk is bootable if the optional –OS parameter is specified. If not specified, the disk is a data disk. + The required parameters are DiskName and MediaLocation. + + + + Add-AzureDisk + + DiskName + + Specifies the name of the disk. + + String + + + MediaLocation + + Specifies the physical location of the disk in Microsoft Azure storage. This link refers to a blob page in the current subscription and storage account. + + String + + + Label + + Specifies a disk label. + + String + + + OS + + If specified, the disk is bootable. The OS parameter accepts either "Windows" or "Linux" values. + + String + + + + + + DiskName + + Specifies the name of the disk. + + String + + String + + + + + + MediaLocation + + Specifies the physical location of the disk in Microsoft Azure storage. This link refers to a blob page in the current subscription and storage account. + + String + + String + + + + + + Label + + Specifies a disk label. + + String + + String + + + Disk name + + + OS + + If specified, the disk is bootable. The OS parameter accepts either "Windows" or "Linux" values. + + String + + String + + + + + + + + + + + + + + + + + + + + + DiskContext + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Add-AzureDisk -DiskName "MyWinDisk" -MediaLocation "http://yourstorageaccount.blob.core.azure.com/vhds/winserver-system.vhd" -Label "BootDisk" -OS "Windows" + + This example adds a new, bootable Windows disk. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> C:\PS>Add-AzureDisk -DiskName "MyDataDisk" -MediaLocation "http://yourstorageaccount.blob.core.azure.com/vhds/winserver-data.vhd" -Label "DataDisk" + + This example adds a new data disk. + + + + + + + + + -------------------------- Example 3 -------------------------- + + + + PS C:\> C:\PS>Add-AzureDisk -DiskName "MyLinuxDisk" -MediaLocation "http://yourstorageaccount.blob.core.azure.com/vhds/linuxsys.vhd" -OS "Linux" + + This example adds a new Linux boot disk. The disk name and label are the same. + + + + + + + + + + + Get-AzureDisk + + + + Remove-AzureDisk + + + + Update-AzureDisk + + + + + + + + Add-AzureDns + + Adds a DNS server to an existing cloud service. + + + + + Add + AzureDns + + + + + The Add-AzureDns cmdlet adds a DNS server to an existing cloud service. It accepts three parameters: Name, IPAddress and ServiceName. The Name parameter is a friendly name, not necessarily a DNS resolvable name, the IPAddress is the IP address of the DNS server, and the ServiceName is the name of the cloud service + + + + Add-AzureDns + + Name + + Specifies a friendly name to identify the DNS server. This name is not necessarily a fully qualified domain name + + String + + + IPAddress + + Specifies the IP address of the DNS server + + String + + + ServiceName + + Specifies the name of the cloud service + + String + + + + + + Name + + Specifies a friendly name to identify the DNS server. This name is not necessarily a fully qualified domain name + + String + + String + + + + + + IPAddress + + Specifies the IP address of the DNS server + + String + + String + + + + + + ServiceName + + Specifies the name of the cloud service + + String + + String + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.Common.ManagementOperationContext + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Add-AzureDns -ServiceName "myservice" -IPAddress 10.1.2.4 -Name "mydns" + + Description + + + + -----------This command adds a DNS server "mydns" to the specified cloud service + + + + + + + Unknown + + + + + + + + + + Add-AzureEndpoint + + + Add endpoint to the persistent VM object. + + + + + Add + AzureEndpoint + + + + + + + + + Add-AzureEndpoint + + Name + + + + string + + + Protocol + + + + string + + + LocalPort + + + + int + + + DefaultProbe + + Not Specified + + + + LBSetName + + + + string + + + ProbePort + + + + int + + + ProbeProtocol + + + + string + + + VM + + + + IPersistentVM + + + ACL + + Not Specified + + NetworkAclObject + + + DirectServerReturn + + + + System.Nullable`1[[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + + + IdleTimeoutInMinutes + + + + System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + + + InternalLoadBalancerName + + The Internal LoadBalancer Name. + + string + + + LoadBalancerDistribution + + + Load Balancer distribution algorithm + + The value can be + sourceIP: 2 tuple affinity (Source IP, Destination IP) + sourceIPProtocol: 3 tuple affinity (Source IP, Destination IP, Protocol) + none: 5 tuple affinity (Source IP, Source Port, Destination IP, Destination Port, Protocol). This is the default value + + + string + + + PipelineVariable + + Not Specified + + string + + + ProbeIntervalInSeconds + + + + System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + + + ProbePath + + + + string + + + ProbeTimeoutInSeconds + + + + System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + + + PublicPort + + + + System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + + + + Add-AzureEndpoint + + Name + + + + string + + + Protocol + + + + string + + + LocalPort + + + + int + + + NoProbe + + Not Specified + + + + VM + + + + IPersistentVM + + + ACL + + Not Specified + + NetworkAclObject + + + DirectServerReturn + + + + System.Nullable`1[[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + + + IdleTimeoutInMinutes + + + + System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + + + InternalLoadBalancerName + + The Internal LoadBalancer Name. + + string + + + LoadBalancerDistribution + + + Load Balancer distribution algorithm + + The value can be + sourceIP: 2 tuple affinity (Source IP, Destination IP) + sourceIPProtocol: 3 tuple affinity (Source IP, Destination IP, Protocol) + none: 5 tuple affinity (Source IP, Source Port, Destination IP, Destination Port, Protocol). This is the default value + + + string + + + PipelineVariable + + Not Specified + + string + + + PublicPort + + + + System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + + + + + + + ACL + + Not Specified + + + NetworkAclObject + + NetworkAclObject + + + + + + DefaultProbe + + Not Specified + + + SwitchParameter + + SwitchParameter + + + + + + DirectServerReturn + + + + + System.Nullable`1[[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + + System.Nullable`1[[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + + + + + + IdleTimeoutInMinutes + + + + + System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + + System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + + + + + + InternalLoadBalancerName + + The Internal LoadBalancer Name. + + + string + + string + + + + + + LBSetName + + + + + string + + string + + + + + + LoadBalancerDistribution + + + Load Balancer distribution algorithm + + The value can be + sourceIP: 2 tuple affinity (Source IP, Destination IP) + sourceIPProtocol: 3 tuple affinity (Source IP, Destination IP, Protocol) + none: 5 tuple affinity (Source IP, Source Port, Destination IP, Destination Port, Protocol). This is the default value + + + + string + + string + + + + + + LocalPort + + + + + int + + int + + + + + + Name + + + + + string + + string + + + + + + NoProbe + + Not Specified + + + SwitchParameter + + SwitchParameter + + + + + + PipelineVariable + + Not Specified + + + string + + string + + + + + + ProbeIntervalInSeconds + + + + + System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + + System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + + + + + + ProbePath + + + + + string + + string + + + + + + ProbePort + + + + + int + + int + + + + + + ProbeProtocol + + + + + string + + string + + + + + + ProbeTimeoutInSeconds + + + + + System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + + System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + + + + + + Protocol + + + + + string + + string + + + + + + PublicPort + + + + + System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + + System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + + + + + + VM + + + + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + + + + + System.Object + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Add-AzureInternalLoadBalancer + + Add-AzureInternalLoadBalancer [-InternalLoadBalancerName] <string> [-ServiceName] <string> [<CommonParameters>] + + Add-AzureInternalLoadBalancer [-InternalLoadBalancerName] <string> [-ServiceName] <string> [-SubnetName] <string> [<CommonParameters>] + + Add-AzureInternalLoadBalancer [-InternalLoadBalancerName] <string> [-ServiceName] <string> [-SubnetName] <string> [-StaticVNetIPAddress] <ipaddress> [<CommonParameters>] + + + + + Add + AzureInternalLoadBalancer + + + + + The Add-InternalLoadbalancer cmdlet provides users the ability to add an Internal Loadbalancer configuration to a cloud service. For the users using Virtual network, they are allowed to specify a subnet or even the IP address directly of the internal load balancer. + + + + Add-AzureInternalLoadBalancer + + InternalLoadBalancerName + + + + String + + + ServiceName + + + + String + + + + Add-AzureInternalLoadBalancer + + InternalLoadBalancerName + + + + String + + + ServiceName + + + + String + + + SubnetName + + + + String + + + StaticVNetIPAddress + + + + IPAddress + + + + Add-AzureInternalLoadBalancer + + InternalLoadBalancerName + + + + String + + + ServiceName + + + + String + + + SubnetName + + + + String + + + + + + InternalLoadBalancerName + + + + String + + String + + + + + + ServiceName + + + + String + + String + + + + + + SubnetName + + + + String + + String + + + + + + StaticVNetIPAddress + + + + IPAddress + + IPAddress + + + + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.Common.ManagementOperationContext + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Add-AzureInternalLoadBalancer -ServiceName MyWebsite1 -InternalLoadBalancerName MyILB + + Description + + + + -----------Adds an internal load balancer object to a deployment + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> Add-AzureInternalLoadBalancer -ServiceName MyWebsite1 -InternalLoadBalancerName MyILB -SubnetName FrontEndSubnet + + Description + + + + -----------Adds an internal load balancer object to a deployment in a Virtual Network. Specifies the Subnet in the VNet from which the load balancer IP should be allocated. + + + + + -------------------------- EXAMPLE 3 -------------------------- + + + + PS C:\> Add-AzureInternalLoadBalancer -ServiceName MyWebsite1 -InternalLoadBalancerName MyILB -ServiceName svc1 -SubnetName FrontEndSubnet -StaticVNetIPAddress 192.168.4.7 + + Description + + + + -----------Adds an internal load balancer object to a deployment in a Virtual Network. Specifies the Subnet in the VNet and the exact IP address from that subnet that should be allocated to the internal load balancer. + + + + + + + Unknown + + + + + + + + Add-AzureProvisioningConfig + + Adds the provisioning configuration to a Microsoft Azure virtual machine. + + + + + Add + AzureProvisioningConfig + + + + + The Add-AzureProvisioningConfig cmdlet adds configuration information to a virtual machine configuration used to create a new Virtual Machine. +Different provisioning configurations are supported including standalone Windows servers, Windows servers joined to an Active Directory domain, and Linux-based servers. +When creating an Active Directory domain joined server, the provisioning configuration must specify the fully qualified domain name of the Active Directory domain, as well as the domain credentials of a user with permission to join the machine to the domain. + + + + Add-AzureProvisioningConfig + + VM + + Specifies the virtual machine object. + + IPersistentVM + + + DisableGuestAgent + + To disable IaaS provision guest agent. + + SwitchParameter + + + CustomDataFile + + This parameter takes a file name as an argument. PowerShell will then base64 encode the contents of the file and send it along with the provisioning configuration information. The file must be less than 64KB or the Azure API will not accept the request. + +On Windows this data ends up in %SYSTEMDRIVE%\AzureData\CustomData.bin as a binary file. +On Linux, this data is passed to the VM via the ovf-env.xml file, which is copied to the /var/lib/waagent directory during provisioning. The agent will also place the base-64 encoded data in /var/lib/waagent/CustomData during provisioning. + + String + + + Windows + + Specify to create a standalone Windows provisioning configuration. + + SwitchParameter + + + AdminUsername + + Specifies the Administrator account to create. + + String + + + Password + + Specifies the password of the administrator account for the role. + + String + + + ResetPasswordOnFirstLogon + + If specified, forces the user to change their password on first logon. + + SwitchParameter + + + DisableAutomaticUpdates + + If specified, the configuration will have automatic updates disabled. + + SwitchParameter + + + NoRDPEndpoint + + If specified, create the virtual machine without a remote desktop endpoint. + + SwitchParameter + + + TimeZone + + Specifies the Microsoft Time Zone value to use to set the time zone for the virtual machine. Examples are: "Pacific Standard Time" and "Canada Central Standard Time". + + String + + + Certificates + + Specifies a set of certificates to install in the virtual machine. + + CertificateSettingList + + + EnableWinRMHttp + + Enables WinRM over http. + + SwitchParameter + + + DisableWinRMHttps + + Disables WinRM on https which is added by default. + + SwitchParameter + + + WinRMCertificate + + Certificate that will be associated with WinRM endpoint. + + X509Certificate2 + + + X509Certificates + + X509 certificates that will be deployed to hosted service. + + X509Certificate2[] + + + NoExportPrivateKey + + Prevents the private key from being uploaded + + SwitchParameter + + + NoWinRMEndpoint + + Prevents the WinRM endpoint from being added + + SwitchParameter + + + + Add-AzureProvisioningConfig + + VM + + Specifies the virtual machine object. + + IPersistentVM + + + DisableGuestAgent + + To disable IaaS provision guest agent. + + SwitchParameter + + + Linux + + Specify to create a Linux provisioning configuration. + + SwitchParameter + + + LinuxUser + + Specifies the Linux administrative account name to create. + + String + + + DisableSSH + + If specified, the virtual machine is created with SSH disabled. + + SwitchParameter + + + NoSSHEndpoint + + If specified, create the virtual machine without an SSH endpoint. + + SwitchParameter + + + NoSSHPassword + + Not Specified + + SwitchParameter + + + SSHPublicKeys + + + + LinuxProvisioningConfigurationSet+SSHPublicKeyList + + + SSHKeyPairs + + + + LinuxProvisioningConfigurationSet+SSHKeyPairList + + + CustomDataFile + + This parameter takes a file name as an argument. PowerShell will then base64 encode the contents of the file and send it along with the provisioning configuration information. The file must be less than 64KB or the Azure API will not accept the request. + +On Windows this data ends up in %SYSTEMDRIVE%\AzureData\CustomData.bin as a binary file. +On Linux, this data is passed to the VM via the ovf-env.xml file, which is copied to the /var/lib/waagent directory during provisioning. The agent will also place the base-64 encoded data in /var/lib/waagent/CustomData during provisioning. + + String + + + Password + + Specifies the password of the administrator account for the role. + + String + + + + Add-AzureProvisioningConfig + + VM + + Specifies the virtual machine object. + + IPersistentVM + + + DisableGuestAgent + + To disable IaaS provision guest agent. + + SwitchParameter + + + CustomDataFile + + This parameter takes a file name as an argument. PowerShell will then base64 encode the contents of the file and send it along with the provisioning configuration information. The file must be less than 64KB or the Azure API will not accept the request. + +On Windows this data ends up in %SYSTEMDRIVE%\AzureData\CustomData.bin as a binary file. +On Linux, this data is passed to the VM via the ovf-env.xml file, which is copied to the /var/lib/waagent directory during provisioning. The agent will also place the base-64 encoded data in /var/lib/waagent/CustomData during provisioning. + + String + + + AdminUsername + + Specifies the Administrator account to create. + + String + + + WindowsDomain + + Specify to create a provisioning configuration for a Windows server joined to an Active Directory domain. + + SwitchParameter + + + Password + + Specifies the password of the administrator account for the role. + + String + + + ResetPasswordOnFirstLogon + + If specified, forces the user to change their password on first logon. + + SwitchParameter + + + DisableAutomaticUpdates + + If specified, the configuration will have automatic updates disabled. + + SwitchParameter + + + NoRDPEndpoint + + If specified, create the virtual machine without a remote desktop endpoint. + + SwitchParameter + + + TimeZone + + Specifies the Microsoft Time Zone value to use to set the time zone for the virtual machine. Examples are: "Pacific Standard Time" and "Canada Central Standard Time". + + String + + + Certificates + + Specifies a set of certificates to install in the virtual machine. + + CertificateSettingList + + + JoinDomain + + Specifies the fully qualified domain name (FQDN) of the Windows domain to join. + + String + + + Domain + + Specifies the name of the domain of the account with permission to add the computer to a domain. + + String + + + DomainUserName + + Specifies the name of the user account with permission to add the computer to a domain. + + String + + + DomainPassword + + Specifies the password of the user account with permission to add the computer to a domain. + + String + + + MachineObjectOU + + Specifies the fully qualified name of the organizational unit (OU) in which the computer account is created. + + String + + + EnableWinRMHttp + + Enables WinRM over http. + + SwitchParameter + + + DisableWinRMHttps + + Disables WinRM on https which is added by default. + + SwitchParameter + + + WinRMCertificate + + Certificate that will be associated with WinRM endpoint. + + X509Certificate2 + + + X509Certificates + + X509 certificates that will be deployed to hosted service. + + X509Certificate2[] + + + NoExportPrivateKey + + Prevents the private key from being uploaded + + SwitchParameter + + + NoWinRMEndpoint + + Prevents the WinRM endpoint from being added + + SwitchParameter + + + + + + VM + + Specifies the virtual machine object. + + IPersistentVM + + IPersistentVM + + + + + + DisableGuestAgent + + To disable IaaS provision guest agent. + + SwitchParameter + + SwitchParameter + + + + + + CustomDataFile + + This parameter takes a file name as an argument. PowerShell will then base64 encode the contents of the file and send it along with the provisioning configuration information. The file must be less than 64KB or the Azure API will not accept the request. + +On Windows this data ends up in %SYSTEMDRIVE%\AzureData\CustomData.bin as a binary file. +On Linux, this data is passed to the VM via the ovf-env.xml file, which is copied to the /var/lib/waagent directory during provisioning. The agent will also place the base-64 encoded data in /var/lib/waagent/CustomData during provisioning. + + String + + String + + + + + + Windows + + Specify to create a standalone Windows provisioning configuration. + + SwitchParameter + + SwitchParameter + + + + + + AdminUsername + + Specifies the Administrator account to create. + + String + + String + + + + + + Password + + Specifies the password of the administrator account for the role. + + String + + String + + + + + + ResetPasswordOnFirstLogon + + If specified, forces the user to change their password on first logon. + + SwitchParameter + + SwitchParameter + + + + + + DisableAutomaticUpdates + + If specified, the configuration will have automatic updates disabled. + + SwitchParameter + + SwitchParameter + + + + + + NoRDPEndpoint + + If specified, create the virtual machine without a remote desktop endpoint. + + SwitchParameter + + SwitchParameter + + + + + + TimeZone + + Specifies the Microsoft Time Zone value to use to set the time zone for the virtual machine. Examples are: "Pacific Standard Time" and "Canada Central Standard Time". + + String + + String + + + + + + Certificates + + Specifies a set of certificates to install in the virtual machine. + + CertificateSettingList + + CertificateSettingList + + + + + + EnableWinRMHttp + + Enables WinRM over http. + + SwitchParameter + + SwitchParameter + + + + + + DisableWinRMHttps + + Disables WinRM on https which is added by default. + + SwitchParameter + + SwitchParameter + + + + + + WinRMCertificate + + Certificate that will be associated with WinRM endpoint. + + X509Certificate2 + + X509Certificate2 + + + + + + X509Certificates + + X509 certificates that will be deployed to hosted service. + + X509Certificate2[] + + X509Certificate2[] + + + + + + NoExportPrivateKey + + Prevents the private key from being uploaded + + SwitchParameter + + SwitchParameter + + + + + + NoWinRMEndpoint + + Prevents the WinRM endpoint from being added + + SwitchParameter + + SwitchParameter + + + + + + Linux + + Specify to create a Linux provisioning configuration. + + SwitchParameter + + SwitchParameter + + + + + + LinuxUser + + Specifies the Linux administrative account name to create. + + String + + String + + + + + + DisableSSH + + If specified, the virtual machine is created with SSH disabled. + + SwitchParameter + + SwitchParameter + + + + + + NoSSHEndpoint + + If specified, create the virtual machine without an SSH endpoint. + + SwitchParameter + + SwitchParameter + + + + + + NoSSHPassword + + Not Specified + + SwitchParameter + + SwitchParameter + + + + + + SSHPublicKeys + + + + LinuxProvisioningConfigurationSet+SSHPublicKeyList + + LinuxProvisioningConfigurationSet+SSHPublicKeyList + + + + + + SSHKeyPairs + + + + LinuxProvisioningConfigurationSet+SSHKeyPairList + + LinuxProvisioningConfigurationSet+SSHKeyPairList + + + + + + WindowsDomain + + Specify to create a provisioning configuration for a Windows server joined to an Active Directory domain. + + SwitchParameter + + SwitchParameter + + + + + + JoinDomain + + Specifies the fully qualified domain name (FQDN) of the Windows domain to join. + + String + + String + + + + + + Domain + + Specifies the name of the domain of the account with permission to add the computer to a domain. + + String + + String + + + + + + DomainUserName + + Specifies the name of the user account with permission to add the computer to a domain. + + String + + String + + + + + + DomainPassword + + Specifies the password of the user account with permission to add the computer to a domain. + + String + + String + + + + + + MachineObjectOU + + Specifies the fully qualified name of the organizational unit (OU) in which the computer account is created. + + String + + String + + + + + + PipelineVariable + + Not Specified + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> New-AzureVMConfig -Name "MyNonDomainVM" -InstanceSize Small -ImageName $img ` +| Add-AzureProvisioningConfig -Windows -Pass word $Password -AdminUsername PsTestAdmin ` +| New-AzureVM -ServiceName $svcName + + Description + + + + -----------This example creates a new Windows standalone virtual machine and adds it to the specified service. WinRM Https listener is enabled by default on the VM. + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> New-AzureVMConfig -Name "MyDomainVM" -InstanceSize Small -ImageName $img ` +| Add-AzureProvisioningConfig -WindowsDomain -Password $Password -AdminUsername PsTestAdmin -ResetPasswordOnFirstLogon -JoinDomain "contoso.com" -Domain "contoso" -DomainUserName "domainadminuser" -DomainPassword "domainPassword" -MachineObjectOU 'OU=AzureVMs,DC=contoso,DC=com' +| New-AzureVM -ServiceName $svcName + + Description + + + + -----------This example creates a new, domain-joined Windows virtual machine and adds it to the specified service. + + + + + -------------------------- EXAMPLE 3 -------------------------- + + + + PS C:\> New-AzureVMConfig -Name "MyLinuxVM" -InstanceSize Small -ImageName $LnxImg ` +| Add-AzureProvisioningConfig -Linux -LinuxUser $linuxUser -Password $Password ` +| New-AzureVM -ServiceName $svcName + + Description + + + + -----------This example creates a new Linux virtual machine and adds it to the specified service. + + + + + -------------------------- EXAMPLE 4 -------------------------- + + + + PS C:\> $certs = Get-ChildItem Cert:\CurrentUser\My +New-AzureVMConfig -Name "MyNonDomainVM" -InstanceSize Small -ImageName $img ` +| Add-AzureProvisioningConfig -Windows -Password $Password -AdminUsername PsTestAdmin -WinRMCertificate $certs[0] -X509Certificates $certs[1], $certs[2] ` +| New-AzureVM -ServiceName $svcName -WaitForBoot + + Description + + + + -----------This example creates a new Windows standalone virtual machine and adds it to the specified service. WinRM Https listener is enabled by default on the VM. WaitForBoot option enables to wait for VM to boot. WinRMCertificate and X509Certificates are uploaded to hosted service by New-AzureVM. + + + + + -------------------------- EXAMPLE 5 -------------------------- + + + + PS C:\> New-AzureVMConfig -Name "MyNonDomainVM" -InstanceSize Small -ImageName $img ` +| Add-AzureProvisioningConfig -Windows -Password $Password -AdminUsername PsTestAdmin -EnableWinRMHttp ` +| New-AzureVM -ServiceName $svcName -WaitForBoot + + Description + + + + -----------This example creates a new Windows standalone virtual machine and adds it to the specified service. Both WinRM Https and Http listener is enabled on the VM. WaitForBoot option enables to wait for VM to boot. + + + + + -------------------------- EXAMPLE 6 -------------------------- + + + + PS C:\> New-AzureVMConfig -Name "MyNonDomainVM" -InstanceSize Small -ImageName $img ` +| Add-AzureProvisioningConfig -Windows -Password $Password -AdminUsername PsTestAdmin -DisableWinRMHttps ` +| New-AzureVM -ServiceName $svcName -WaitForBoot + + Description + + + + -----------This example creates a new Windows standalone virtual machine and adds it to the specified service. WinRM Https listener is not enabled on the VM. WaitForBoot option enables to wait for VM to boot. + + + + + -------------------------- EXAMPLE 7 -------------------------- + + + + PS C:\> $certs = Get-ChildItem Cert:\CurrentUser\My +New-AzureVMConfig -Name "MyNonDomainVM" -InstanceSize Small -ImageName $img ` +| Add-AzureProvisioningConfig -Windows -Password $Password -AdminUsername PsTestAdmin -X509Certificates $certs[0], $certs[1] -NoExportPrivateKey ` +| New-AzureVM -ServiceName $svcName -WaitForBoot + + Description + + + + -----------This example creates a new Windows standalone virtual machine and adds it to the specified service. WinRM Https listener is enabled by default on the VM. WaitForBoot option enables to wait for VM to boot. WinRMCertificate and X509Certificates are uploaded to hosted service by New-AzureVM. PrivateKeys are removed from X509Certificates before uploading them. + + + + + -------------------------- EXAMPLE 8 -------------------------- + + + + PS C:\> New-AzureVMConfig -Name "MyNonDomainVM" -InstanceSize Small -ImageName $img ` +| Add-AzureProvisioningConfig -Windows -Pass word $Password -AdminUsername PsTestAdmin ` +| New-AzureVM -ServiceName $svcName -DisableGuestAgent + + Description + + + + -----------This example creates a new Windows standalone virtual machine without enabling the provision guest agent and adds it to the specified service. WinRM Https listener is enabled by default on the VM. + + + + + + + Unknown + + + + + + + + Add-AzureVhd + + Uploads a VHD file from an on premise machine to a blob in a cloud storage account in Microsoft Azure + + + + + Add + AzureVhd + + + + + The Add-AzureVhd cmdlet allows to upload on premise VHD images to a blob storage account as fixed VHD images. It has parameters to configure the upload process such as specifying the number of uploader threads that will be used or overwriting a blob which already exists in the specified destination uri. For on premise VHD images, patching scenario is also supported so that diff disk images can be uploaded without having to upload the already uploaded base images. SAS Uri is supported as well. + + + + Add-AzureVhd + + Destination + + A Uri to a blob in Microsoft Azure Blob Storage. Shared Access Signature (SAS) in Uri input is supported as well, however in patching scenarios destination cannot be a SAS Uri. + + Uri + + + LocalFilePath + + File path of the local Vhd file. + + FileInfo + + + NumberOfUploaderThreads + + + + Int32 + + + BaseImageUriToPatch + + A Uri to a base image blob in Microsoft Azure Blob Storage. Shared Access Signature (SAS) in Uri input is supported as well. + + Uri + + + OverWrite + + Determines to delete the existing blob in the specified destination uri if it exists. + + SwitchParameter + + + + + + Destination + + A Uri to a blob in Microsoft Azure Blob Storage. Shared Access Signature (SAS) in Uri input is supported as well, however in patching scenarios destination cannot be a SAS Uri. + + Uri + + Uri + + + + + + LocalFilePath + + File path of the local Vhd file. + + FileInfo + + FileInfo + + + + + + NumberOfUploaderThreads + + + + Int32 + + Int32 + + + + + + BaseImageUriToPatch + + A Uri to a base image blob in Microsoft Azure Blob Storage. Shared Access Signature (SAS) in Uri input is supported as well. + + Uri + + Uri + + + + + + OverWrite + + Determines to delete the existing blob in the specified destination uri if it exists. + + SwitchParameter + + SwitchParameter + + + + + + NumberOfThreads + + Determines the number of uploader threads that will be used during upload. + + int + + int + + + 8 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Add-AzureVhd -Destination http://mytestaccount.blob.core.windows.net/vhdstore/win7baseimage.vhd -LocalFilePath C:\vhd\MyWin7Image.vhd + + Description + + + + -----------This command uploads the vhd file on premise as a fixed disk to the specified blob by destination uri. + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> Add-AzureVhd -Destination http://mytestaccount.blob.core.windows.net/vhdstore/win7baseimage.vhd -LocalFilePath C:\vhd\MyWin7Image.vhd -Overwrite + + Description + + + + -----------Overwrite option tells the cmdlet to delete if there is a blob already in the specified destination uri. + + + + + -------------------------- EXAMPLE 3 -------------------------- + + + + PS C:\> Add-AzureVhd -Destination http://mytestaccount.blob.core.windows.net/vhdstore/win7baseimage.vhd -LocalFilePath C:\vhd\MyWin7Image.vhd -NumberOfThreads 32 + + Description + + + + -----------NumberOfThreads allows to change the default number of uploader threads, which is 8. + + + + + -------------------------- EXAMPLE 4 -------------------------- + + + + PS C:\> Add-AzureVhd -Destination "http://mytestaccount.blob.core.windows.net/vhdstore/win7baseimage.vhd?st=2013-01-09T22%3A15%3A49Z&amp;se=2013-01-09T23%3A10%3A49Z&amp;sr=b&amp;sp=w&amp;sig=13T9Ow%2FRJAMmhfO%2FaP3HhKKJ6AY093SmveOSIV4%2FR7w%3D" -LocalFilePath C:\vhd\win7baseimage.vhd + + Description + + + + -----------Destination is provided with a SAS signature in the querystring of the Uri. SAS signature should have Read,Write, and Delete permissions. + + + + + + + Unknown + + + + + + + + Add-AzureVMImage + + The Add-AzureVMImage cmdlet adds a new operating system (OS) image to the image repository. The image should be a sysprep'd or generalized OS image. + + + + + Add + AzureVMImage + + + + + + + + + Add-AzureVMImage + + ImageName + + Specifies the name of the image being added to the image repository. + + String + + + MediaLocation + + Specifies the location of the physical blob page where the image resides. This is a link to a blob page in the current subscription's storage. + + String + + + OS + + Specifies the operating system version of the image. + + String + + + Label + + Specifies a label to give the image. + + String + + + Eula + + Specifies the End User License Aggreement, recommended value is a URL. + + String + + + Description + + Specifies the description of the OS image. + + String + + + ImageFamily + + Specifies a value that can be used to group OS images. + + String + + + PublishedDate + + Specifies the date when the OS image was added to the image repository. + + Nullable`1[DateTime] + + + PrivacyUri + + Specifies the URI that points to a document that contains the privacy policy related to the OS image. + + Uri + + + RecommendedVMSize + + Specifies the size to use for the virtual machine that is created from the OS image. Values are: "Medium", "Large", and "ExtraLarge", "A5", "A6",, "A7". + + String + + + + + + ImageName + + Specifies the name of the image being added to the image repository. + + String + + String + + + + + + MediaLocation + + Specifies the location of the physical blob page where the image resides. This is a link to a blob page in the current subscription's storage. + + String + + String + + + + + + OS + + Specifies the operating system version of the image. + + String + + String + + + + + + Label + + Specifies a label to give the image. + + String + + String + + + + + + Eula + + Specifies the End User License Aggreement, recommended value is a URL. + + String + + String + + + + + + Description + + Specifies the description of the OS image. + + String + + String + + + + + + ImageFamily + + Specifies a value that can be used to group OS images. + + String + + String + + + + + + PublishedDate + + Specifies the date when the OS image was added to the image repository. + + Nullable`1[DateTime] + + Nullable`1[DateTime] + + + + + + PrivacyUri + + Specifies the URI that points to a document that contains the privacy policy related to the OS image. + + Uri + + Uri + + + + + + RecommendedVMSize + + Specifies the size to use for the virtual machine that is created from the OS image. Values are: "Medium", "Large", and "ExtraLarge", "A5", "A6",, "A7". + + String + + String + + + + + + + + + + + + + + + + + + + + + OSImageContext + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Add-AzureVMImage -ImageName imageName -MediaLocation http://yourstorageaccount.blob.core.azure.com/container/sampleImage.vhd -Label imageLabel + + Description + + + + -----------This example adds a new operating system image in the repository + + + + + + + Get-AzureVMImage + + + + Remove-AzureVMImage + + + + Update-AzureVMImage + + + + + + + + Export-AzureVM + + Exports a Microsoft Azure virtual machine state to a file. + + + + + Export + AzureVM + + + + + The Export-AzureVM cmdlet exports the state of a virtual machine to an xml file. + + Note: Using Export-AzureVM, followed by Remove-AzureVM and then Import-AzureVM to recreate a virtual machine can cause the resultant virtual machine to have a different IP address than the original. + + + + Export-AzureVM + + ServiceName + + Specifies the name of the Microsoft Azure service that hosts the virtual machine. + + String + + + Name + + Specifies the name of the virtual machine whose state you are exporting. + + String + + + Path + + Specifies the path and file name to which the virtual machine state will be saved. + + String + + + + + + ServiceName + + Specifies the name of the Microsoft Azure service that hosts the virtual machine. + + String + + String + + + + + + Name + + Specifies the name of the virtual machine whose state you are exporting. + + String + + String + + + + + + Path + + Specifies the path and file name to which the virtual machine state will be saved. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Export-AzureVM -ServiceName $MyService -Name $MyRole -Path "C:\vms\VMstate.xml" + + This command exports the state of the $MyRole virtual machine to the “VMstate.xml” file. + + + + + + + + + + + Import-AzureVM + + + + New-AzureVM + + + + + + + + Get-AzureAclConfig + + Gets the ACL configuration object from an existing Azure VM. + + + + + Get + AzureAclConfig + + + + + The Get-AzureAclConfig cmdlet gets the ACL configuration object from an existing Azure VM. + + + + Get-AzureAclConfig + + EndpointName + + Specifies the name of the endpoint. + + String + + + VM + + Specifies the virtual machine object for which the endpoint will be created. + + IPersistentVM + + + + + + EndpointName + + Specifies the name of the endpoint. + + String + + String + + + + + + VM + + Specifies the virtual machine object for which the endpoint will be created. + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS> $acl = Get-AzureVM -ServiceName "myservice" -Name "MyVM" | Get-AzureAclConfig -EndpointName "Web" + + This command will get the ACL configuration from the VM with name "MyVM". + + + + + + + + + + + New-AzureAclConfig + + + + Remove-AzureAclConfig + + + + Set-AzureAclConfig + + + + + + + + Get-AzureAffinityGroup + + Returns an object that represents a Microsoft Azure affinity group. + + + + + Get + AzureAffinityGroup + + + + + The Get-AzureAffinityGroup cmdlet returns an affinity group object that includes the affinity group name, location, label, description and the storage and hosted services that are part of the affinity group. + + + + Get-AzureAffinityGroup + + Name + + Affinity Group name. A name is assigned to the affinity group at the time of creation. Note that names for affinity groups created through the Management Portal are typically GUIDs and that the UI shows its label. + + String + + + + + + Name + + Affinity Group name. A name is assigned to the affinity group at the time of creation. Note that names for affinity groups created through the Management Portal are typically GUIDs and that the UI shows its label. + + String + + String + + + + + + + + + + + + + + + + + + + + + AffinityGroup + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Get-AzureAffinityGroup -Name "MyGroup1" + + This example list the properties of the "MyGroup1" affinity group. + + + + + + + + + + + + + + + Get-AzureCertificate + + Gets a certificate object from the specified Microsoft Azure service. + + + + + Get + AzureCertificate + + + + + + + + + Get-AzureCertificate + + ServiceName + + Specifies the name of the Microsoft Azure service that has the certificate. + + String + + + ThumbprintAlgorithm + + Specifies the algorithm used to create the certificate thumbprint. + + String + + + Thumbprint + + Specifies the thumbprint that identifies the certificate. + + String + + + + + + ServiceName + + Specifies the name of the Microsoft Azure service that has the certificate. + + String + + String + + + + + + ThumbprintAlgorithm + + Specifies the algorithm used to create the certificate thumbprint. + + String + + String + + + + + + Thumbprint + + Specifies the thumbprint that identifies the certificate. + + String + + String + + + + + + + + + + + + + + + + + + + + + CertificateContext + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>$MyAzureCert = Get-AzureCertificate -ServiceName "MyService" + + This command gets the certificate object from the specified cloud service, and stores it in the $MyAzureCert variable. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> C:\PS>$MyAzureCert = Get-AzureCertificate -ServiceName "MyService" `-Thumbprint <CertThumbprint> + + This command gets the certificate object identified by the specified thumbprint from the specified hosted service, and stores it in the $MyAzureCert variable. + + + + + + + + + + + Add-AzureCertificate + + + + Remove-AzureCertificate + + + + + + + + Get-AzureDataDisk + + Gets a Microsoft Azure data disk object. + + + + + Get + AzureDataDisk + + + + + The Get-AzureDataDisk cmdlet gets an object that represents the Microsoft Azure data disks on the specified virtual machine. To get a specific data disk object, specify the disk's LUN. + + + + Get-AzureDataDisk + + Lun + + Specifies the LUN where the data disk resides. + + Nullable`1[Int32] + + + VM + + Specifies the virtual machine object from which to get data disk objects. + + IPersistentVM + + + + + + Lun + + Specifies the LUN where the data disk resides. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + VM + + Specifies the virtual machine object from which to get data disk objects. + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Get-AzureVM "myservice" –Name "MyVM" | Get-AzureDataDisk + + This command gets the "MyVM" virtual machine running on the "myservice" cloud service, and then gets a list of the data disks mounted on the virtual machine. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> C:\PS>$dDisk = ( Get-AzureVM "myservice" -Name "MyVM" ` + | Get-AzureDataDisk -LUN 2 ) + + This command gets a data disk object, $dDisk, that represents the data disk mounted at LUN 2 on the Database virtual machine running on the Microsoft Azure service "myservice". + + + + + + + + + -------------------------- Example 3 -------------------------- + + + + PS C:\> C:\PS>Get-AzureVM "MyService" –Name "MyVM" | Get-AzureDataDisk –LUN 1 + + This command removes the data disk at LUN 1 on the "MyVM" virtual machine running on the Microsoft Azure service "MyService". + + + + + + + + + + + Get-AzureVM + + + + Add-AzureDataDisk + + + + Set-AzureDataDisk + + + + Remove-AzureDataDisk + + + + + + + + Get-AzureDeployment + + + + + + + Get + AzureDeployment + + + + + + + + + Get-AzureDeployment + + ServiceName + + + + String + + + Slot + + + + String + + + + + + ServiceName + + + + String + + String + + + + + + Slot + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Get-AzureDeployment -ServiceName "MyService" + + This command will return the details of the production deployment of "MyService". + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> C:\PS>Get-AzureDeployment -ServiceName "MyService" -Slot Staging + + This command returns the details of the staging deployment of "MyService". + + + + + + + + + + + Move-AzureDeployment + + + + New-AzureDeployment + + + + Remove-AzureDeployment + + + + Set-AzureDeployment + + + + Unknown + + + + + + + + Get-AzureDisk + + Gets an object with information on disks in the Microsoft Azure disk repository. + + + + + Get + AzureDisk + + + + + The Get-AzureDisk cmdlet retrieves an object with information about the disks stored in the Microsoft Azure disk repository for the current subscription. It returns a list object with information for all disks in the repository, or with information on a specific disk if its disk name is specified. + + + + Get-AzureDisk + + DiskName + + Specifies the name of the disk in the disk repository to return information about. + + String + + + + + + DiskName + + Specifies the name of the disk in the disk repository to return information about. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Get-AzureDisk -DiskName MyDataDisk + + This command retrieves data about the "MyDataDisk" disk from the disk repository. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> C:\PS>Get-AzureDisk + + This command retrieves data for all the disks in the disk repository. + + + + + + + + + -------------------------- Example 3 -------------------------- + + + + PS C:\> C:\PS>Get-AzureDisk | Where-Object {$_.AttachedTo –eq $null } ` + | Format-Table –auto "DiskName","DiskSizeInGB","MediaLink" + + This command gets data for all of the disks in the disk repository that are not currently attached to a virtual machine and then formats the list as a table. + + + + + + + + + + + Add-AzureDisk + + + + Remove-AzureDisk + + + + Update-AzureDisk + + + + + + + + Get-AzureDns + + Gets an object with the DNS settings for the Microsoft Azure deployment. + + + + + Get + AzureDns + + + + + The Get-AzureDNS cmdlet gets the DNS settings for a Microsoft Azure deployment. The returned settings are "name" (a friendly name) and "Address" which is the IP address of the DNS server. + + + + Get-AzureDns + + DnsSettings + + Specifies a DnsSettings object. + + DnsSettings + + + + + + DnsSettings + + Specifies a DnsSettings object. + + DnsSettings + + DnsSettings + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Get-AzureDeployment -ServiceName "MySvc1" -Slot "Production" | Get-AzureDNS + + This command gets the production DNS settings for the specified deployment. + + + + + + + + + + + + + + + Get-AzureEndpoint + + Gets an object with information about the endpoints assigned to a Microsoft Azure virtual machine. + + + + + Get + AzureEndpoint + + + + + The Get-AzureEndpoint cmdlet returns an object with information about the endpoints that are assigned to a Microsoft Azure virtual machine. + + + + Get-AzureEndpoint + + Name + + Specifies the name of the input endpoint from which information will be retrieved. If the Name parameter is omitted, information about all endpoints assigned to the specified virtual machine is retrieved. + + String + + + VM + + Specifies the virtual machine object from which endpoint information will be retrieved. + + IPersistentVM + + + + + + Name + + Specifies the name of the input endpoint from which information will be retrieved. If the Name parameter is omitted, information about all endpoints assigned to the specified virtual machine is retrieved. + + String + + String + + + + + + VM + + Specifies the virtual machine object from which endpoint information will be retrieved. + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> Get-AzureVM –ServiceName “MyService” –Name “MyVM” | Get-AzureEndpoint + + This command gets endpoint information for the virtual machine “MyVM”. + + + + + + + + + + + Add-AzureEndpoint + + + + Remove-AzureEndpoint + + + + Set-AzureEndpoint + + + + Get-AzureVM + + + + + + + + Get-AzureInternalLoadBalancer + + Get-AzureInternalLoadBalancer [-ServiceName] <string> [<CommonParameters>] + + + + + Get + AzureInternalLoadBalancer + + + + + Returns the details of the Internal Load balancer configuration on the deployment. + + + + Get-AzureInternalLoadBalancer + + ServiceName + + + + String + + + + + + ServiceName + + + + String + + String + + + + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.ServiceManagement.Model.InternalLoadBalancerContext + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Get-AzureService -ServiceName ILBINVNet | Get-AzureInternalLoadBalancer + + Description + + + + -----------Returns information on the internal load balancer configuration on the deployment + + + + + + + Unknown + + + + + + + + Get-AzureLocation + + Gets the available data center locations for the current Microsoft Azure subscription. + + + + + Get + AzureLocation + + + + + The Get-AzureLocation cmdlet returns a list object with the available Microsoft Azure data centers and their properties for the current Microsoft Azure subscription. Before running this cmdlet, you need to set your current subscription with Select-AzureSubscription and Set-AzureSubscription. + + + + Get-AzureLocation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Get-AzureLocation + + This command gets a list of available data centers, and their properties, for the current subscription. + + + + + + + + + + + Select-AzureSubscription + + + + Set-AzureSubscription + + + + Import-AzurePublishSettingsFile + + + + + + + + Get-AzureOSDisk + + Gets the operating system disk object for the specified Microsoft Azure virtual machine. + + + + + Get + AzureOSDisk + + + + + The Get-AzureOSDisk cmdlet gets an object representing the operating system disk of the specified virtual machine object. + + + + Get-AzureOSDisk + + VM + + Specifies the virtual machine object whose operating system disk object you want to get. + + IPersistentVM + + + + + + VM + + Specifies the virtual machine object whose operating system disk object you want to get. + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> Get-AzureVM –ServiceName “MyService” –Name “MyVM” | Get-AzureOSDisk + + This command gets the operating system disk object for the "MyVM" virtual machine. + + + + + + + + + + + + + + + Get-AzureOSVersion + + Returns an object with all the available Microsoft Azure guest operating systems. + + + + + Get + AzureOSVersion + + + + + The Get-AzureOSVersion cmdlet returns a list object with all the available Microsoft Azure guest operating systems. + + + + Get-AzureOSVersion + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Get-AzureOSVersion + + This command retrieves an object containing a list of all versions of the guest operating system that are available in the current subscription. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> C:\PS>Get-AzureOSVersion | Format-Table –auto "Family", "FamilyLabel", "Version" + + This command retrieves an object containing a list of all versions of the guest operating system that are available in the current subscription, and formats them in a table showing the OS Family, OS Family Label, and Version. + + + + + + + + + + + + + + + Get-AzurePublicIP + + Get-AzurePublicIP [[-PublicIPName] <string>] -VM <IPersistentVM> [<CommonParameters>] + + + + + Get + AzurePublicIP + + + + + Returns the Instance Level Public IP information on the virtual machine. To obtain the IP Address of the Public IP use Get-AzureVM cmd let. + + + + Get-AzurePublicIP + + PublicIPName + + + + String + + + VM + + + + IPersistentVM + + + + + + PublicIPName + + + + String + + String + + + + + + VM + + + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.ServiceManagement.AssignPublicIPCollection + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Get-AzureVM -ServiceName FTPInAzure -Name FTPInstance | Get-AzurePublicIP + + Description + + + + -----------Returns the Public IP information on the virtual machine. To get the IP address of the public ip, use Get-AzureVM + + + + + + + Unknown + + + + + + + + Get-AzureRemoteDesktopFile + + Gets a remote desktop connection file (.RDP) for the specified Microsoft Azure virtual machine. + + + + + Get + AzureRemoteDesktopFile + + + + + The Get-AzureRemoteDesktopFile cmdlet downloads and saves a remote desktop connection (RDP) file to a local disk file. The cmdlet can optionally launch a remote desktop connection to the specified virtual machine. + + + + Get-AzureRemoteDesktopFile + + Name + + Specifies the virtual machine to download an RDP file for. + + String + + + LocalPath + + Specifies the path and name of the downloaded RDP file on the local disk. + + String + + + ServiceName + + Specifies the Microsoft Azure service name. + + String + + + + Get-AzureRemoteDesktopFile + + Name + + Specifies the virtual machine to download an RDP file for. + + String + + + LocalPath + + Specifies the path and name of the downloaded RDP file on the local disk. + + String + + + Launch + + When specified, launches a remote desktop session to the specified virtual machine. + + SwitchParameter + + + ServiceName + + Specifies the Microsoft Azure service name. + + String + + + + + + Name + + Specifies the virtual machine to download an RDP file for. + + String + + String + + + + + + LocalPath + + Specifies the path and name of the downloaded RDP file on the local disk. + + String + + String + + + + + + ServiceName + + Specifies the Microsoft Azure service name. + + String + + String + + + + + + Launch + + When specified, launches a remote desktop session to the specified virtual machine. + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Get-AzureRemoteDesktopFile -ServiceName "myservice" -Name "MyVM-01_IN_0" -LocalPath "c:\temp\MyVM01.rdp" + + This command gets an RDP file for the "MyVM-01_IN_0" virtual machine running on the "myservice" service and stores it as "c:\temp\MyVM01.rdp". + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> C:\PS>Get-AzureRemoteDesktopFile -ServiceName "myservice" -Name "MyVM-01_IN_0" –Launch + + This command gets an RDP connection file for the "MyVM-01_IN_0" virtual machine running on the "myservice" service and launches a remote desktop connection to the specified virtual machine. The RDP file is deleted when the connection is closed. + + + + + + + + + + + Online Version: + + + + + + + + Get-AzureReservedIP + + Get the Reserved IP by its name or lists all the Reserved IPs in the subscription. + + + + + Get + AzureReservedIP + + + + + Get the reserved IP by its name or list all of them in the subscription. + + + + Get-AzureReservedIP + + ReservedIPName + + Reserved IP Name + + String + + + + + + ReservedIPName + + Reserved IP Name + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Get-AzureReservedIP + + Description + + + + -----------List all the reserved IP(s) in this subscription. + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> Get-AzureReservedIP -ReservedIPName $ipName + + Description + + + + -----------Get the reserved IP by the name in this subscription. + + + + + + + Unknown + + + + + + + + Get-AzureRole + + Returns a list of roles in your Microsoft Azure service. + + + + + Get + AzureRole + + + + + The Get-AzureRole cmdlet returns a list object with details on the roles in your Microsoft Azure service. If the RoleName parameter is specified, Get-AzureRole returns details on that role only. If the InstanceDetails parameter is specified, additional, instance specific details are returned. + + + + Get-AzureRole + + ServiceName + + Specifies the name of the Microsoft Azure service. + + String + + + Slot + + Specifies the Microsoft Azure deployment environment. Choices are "Production" or "Staging". + + String + + + RoleName + + When specified, returns details only on the specified role. + + String + + + InstanceDetails + + When specified, returns details about the instances on each role. + + SwitchParameter + + + + + + ServiceName + + Specifies the name of the Microsoft Azure service. + + String + + String + + + + + + Slot + + Specifies the Microsoft Azure deployment environment. Choices are "Production" or "Staging". + + String + + String + + + + + + RoleName + + When specified, returns details only on the specified role. + + String + + String + + + + + + InstanceDetails + + When specified, returns details about the instances on each role. + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Get-AzureRole –ServiceName "MySvc1" –Slot Production + + This command returns an object with details on all the production roles running on the "MySvc1" service. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> C:\PS>Get-AzureRole –ServiceName "MySvc1" –Slot Staging –RoleName "MyTestVM3" + + This command returns an object with details on the "MyTestVM3" role, running on the staging environment of the "MySvc1" service. + + + + + + + + + -------------------------- Example 3 -------------------------- + + + + PS C:\> C:\PS>Get-AzureRole –ServiceName "MySvc1" –Slot Production –RoleName "MyTestVM2" -InstanceDetails + + This command returns an object with details on the instances of the "MyTestVM2" role running in the production environment on the "MySvc1" service. + + + + + + + + + -------------------------- Example 4 -------------------------- + + + + PS C:\> C:\PS>Get-AzureRole –ServiceName "MySvc1" –Slot Production -InstanceDetails ` + | Format-Table –Auto "InstanceName", "InstanceSize", "InstanceStatus" + + This command returns a table of the instance name, size, and status of all role instances running in the production environment on the "MySvc1" service. + + + + + + + + + + + Set-AzureRole + + + + + + + + Get-AzureRoleSize + + Get the role size information for the current subscription. + + + + + Get + AzureRoleSize + + + + + Get the role size information for the current subscription. + + + + Get-AzureRoleSize + + InstanceSize + + The role size name, e.g. ExtraSmall, Small, Large, ExtraLarge, A5, A6, A7, etc. + + String + + + + + + InstanceSize + + The role size name, e.g. ExtraSmall, Small, Large, ExtraLarge, A5, A6, A7, etc. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Get-AzureRoleSize + + InstanceSize : A6 + RoleSizeLabel : + Cores : 4 + MemoryInMb : 28672 + SupportedByWebWorkerRoles : True + SupportedByVirtualMachines : True + OperationDescription : Get-AzureRoleSize + OperationId : c5ed7b3a-03b3-548d-876b-6688c5b29cce + OperationStatus : Succeeded + + InstanceSize : A7 + RoleSizeLabel : + Cores : 8 + MemoryInMb : 57344 + SupportedByWebWorkerRoles : True + SupportedByVirtualMachines : True + OperationDescription : Get-AzureRoleSize + OperationId : c5ed7b3a-03b3-548d-876b-6688c5b29cce + OperationStatus : Succeeded + + Description + + + + ----------- + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> Get-AzureRoleSize -InstanceSize A7 + + InstanceSize : A7 + RoleSizeLabel : + Cores : 8 + MemoryInMb : 57344 + SupportedByWebWorkerRoles : True + SupportedByVirtualMachines : True + OperationDescription : Get-AzureRoleSize + OperationId : c5ed7b3a-03b3-548d-876b-6688c5b29cce + OperationStatus : Succeeded + + Description + + + + ----------- + + + + + -------------------------- EXAMPLE 3 -------------------------- + + + + PS C:\> Get-AzureService | Get-AzureVM | Get-AzureRoleSize + + # Output of the role size information for all VMs in all the cloud services + + Description + + + + ----------- + + + + + + + Unknown + + + + + + + + Get-AzureService + + Returns an object with information about the cloud services for the current subscription. + + + + + Get + AzureService + + + + + The Get-AzureService cmdlet returns a list object with all of the Microsoft Azure cloud services associated with the current subscription. If the ServiceName parameter is specified, Get-AzureService will return information on only the matching service. + + + + Get-AzureService + + ServiceName + + If specified, returns information on the specified service. + + String + + + + + + ServiceName + + If specified, returns information on the specified service. + + String + + String + + + + + + + + + + + + + + + + + + + + + HostedServiceContext + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Get-AzureService + + This command returns a list object that contains information about all of the Microsoft Azure services associated with the current subscription. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> C:\PS>Get-AzureService –ServiceName $MySvc + + This command returns information about the $MySvc service. + + + + + + + + + -------------------------- Example 3 -------------------------- + + + + PS C:\> C:\PS>Get-AzureService | Get-Member + + This command displays the properties and methods that are available from the Get-AzureService cmdlet. + + + + + + + + + + + Set-AzureService + + + + New-AzureService + + + + + + + + Get-AzureServiceADDomainExtension + + This cmdlet gets the cloud service AD domain extension applied on all roles or named roles at a certain deployment slot. + + + + + Get + AzureServiceADDomainExtension + + + + + This cmdlet gets the cloud service AD domain extension applied on all roles or named roles at a certain deployment slot. + + + + Get-AzureServiceADDomainExtension + + ServiceName + + Specifies the Microsoft Azure service name of the deployment. + + String + + + Slot + + + + String + + + + + + ServiceName + + Specifies the Microsoft Azure service name of the deployment. + + String + + String + + + + + + Slot + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Get-AzureServiceADDomainExtension -ServiceName $svc + + Description + + + + -----------This command returns the information of the cloud service AD domain extensions enabled on the roles of a certain deployment. + + + + + + + Unknown + + + + + + + + Get-AzureServiceAntimalwareConfig + + Gets configuration details for the Microsoft Antimalware extension for a service. + + + + + Get + AzureServiceAntimalwareConfig + + + + + The Get-AzureServiceAntimalwareConfig cmdlet gets the antimalware configuration and monitoring configuration details associated with the Microsoft Antimalware extension for a cloud service. + + + + Get-AzureServiceAntimalwareConfig + + ServiceName + + Specifies the name of the cloud service. + + String + + + Slot + + Specifies a deployment slot. Valid values are: + +-- Production +-- Staging + +The default value is Production. + + String + + + + + + ServiceName + + Specifies the name of the cloud service. + + String + + String + + + none + + + Slot + + Specifies a deployment slot. Valid values are: + +-- Production +-- Staging + +The default value is Production. + + String + + String + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Get configuration for a service -------------------------- + + + + PS C:\>Get-AzureServiceAntimalwareConfig -ServiceName "ContosoService03" + + This command returns the antimalware configuration object for the specified service name. Because this command does not specify the Slot parameter, the command gets the configuration for the default slot, Production. For services that have monitoring enabled, the command also returns a monitoring configuration object. + + + + + + + + + -------------------------- Example 2: Get configuration for a service for the Staging slot -------------------------- + + + + PS C:\>Get-AzureServiceAntimalwareConfig -ServiceName "ContosoService03" -Slot Staging + + This command returns the antimalware configuration object for the specified service name. Because this command specifies a value of Staging for the Slot parameter, the command gets the configuration for the Staging slot. For services that have monitoring enabled, the command also returns a monitoring configuration object. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=402839 + + + Remove-AzureServiceAntimalwareExtension + + + + Set-AzureServiceAntimalwareExtension + + + + + + + + Get-AzureServiceAvailableExtension + + Get information for the latest available extensions for hosted services. + + + + + Get + AzureServiceAvailableExtension + + + + + Get information for the latest available extensions for hosted services. + + + + Get-AzureServiceAvailableExtension + + ExtensionName + + The Extension Name. + + String + + + ProviderNamespace + + The Extension Provider Namespace. + + String + + + + Get-AzureServiceAvailableExtension + + ExtensionName + + The Extension Name. + + String + + + ProviderNamespace + + The Extension Provider Namespace. + + String + + + AllVersions + + Specify to list all versions of an extension. + + SwitchParameter + + + + Get-AzureServiceAvailableExtension + + ExtensionName + + The Extension Name. + + String + + + ProviderNamespace + + The Extension Provider Namespace. + + String + + + Version + + The Extension Version. + + String + + + + + + ExtensionName + + The Extension Name. + + String + + String + + + + + + ProviderNamespace + + The Extension Provider Namespace. + + String + + String + + + + + + AllVersions + + Specify to list all versions of an extension. + + SwitchParameter + + SwitchParameter + + + + + + Version + + The Extension Version. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Get-AzureServiceAvailableExtension + + ProviderNameSpace : Microsoft.Windows.Azure.Extensions + ExtensionName : RDP + Version : 1.0 + Label : Microsoft Azure Remote Desktop Extension + Description : Microsoft Azure Remote Desktop Extension + HostingResources : WebOrWorkerRole + ThumbprintAlgorithm : sha1 + PublicConfigurationSchema : <?xml version="1.0" encoding="utf-8"?><xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" + xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:element name="PublicConfig"><xs:complexType><xs:sequence><xs:element + name="UserName" type="xs:string" minOccurs="1" /><xs:element name="Expiration" type="xs:string" minOccurs="1" + /></xs:sequence></xs:complexType></xs:element></xs:schema> + PrivateConfigurationSchema : <?xml version="1.0" encoding="utf-8"?><xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" + xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:element name="PrivateConfig"><xs:complexType><xs:sequence><xs:element + name="Password" type="xs:string" /></xs:sequence></xs:complexType></xs:element></xs:schema> + OperationDescription : Get-AzureServiceAvailableExtension + OperationId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + OperationStatus : Succeeded + + Description + + + + ----------- + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> Get-AzureServiceAvailableExtension -ProviderNamespace Microsoft.Windows.Azure.Extensions -ExtensionName RDP -AllVersions + + ProviderNameSpace : Microsoft.Windows.Azure.Extensions + ExtensionName : RDP + Version : 1.0.0.1 + Label : Microsoft Azure Remote Desktop Extension + Description : Microsoft Azure Remote Desktop Extension + HostingResources : WebOrWorkerRole + ThumbprintAlgorithm : sha1 + PublicConfigurationSchema : <?xml version="1.0" encoding="utf-8"?><xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" + xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:element name="PublicConfig"><xs:complexType><xs:sequence><xs:element + name="UserName" type="xs:string" minOccurs="1" /><xs:element name="Expiration" type="xs:string" minOccurs="1" + /></xs:sequence></xs:complexType></xs:element></xs:schema> + PrivateConfigurationSchema : <?xml version="1.0" encoding="utf-8"?><xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" + xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:element name="PrivateConfig"><xs:complexType><xs:sequence><xs:element + name="Password" type="xs:string" /></xs:sequence></xs:complexType></xs:element></xs:schema> + OperationDescription : Get-AzureServiceAvailableExtension + OperationId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + OperationStatus : Succeeded + + Description + + + + ----------- + + + + + -------------------------- EXAMPLE 3 -------------------------- + + + + PS C:\> Get-AzureServiceAvailableExtension -ProviderNamespace Microsoft.Windows.Azure.Extensions -ExtensionName RDP -Version 1.0.0.1 + + ProviderNameSpace : Microsoft.Windows.Azure.Extensions + ExtensionName : RDP + Version : 1.0.0.1 + Label : Microsoft Azure Remote Desktop Extension + Description : Microsoft Azure Remote Desktop Extension + HostingResources : WebOrWorkerRole + ThumbprintAlgorithm : sha1 + PublicConfigurationSchema : <?xml version="1.0" encoding="utf-8"?><xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" + xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:element name="PublicConfig"><xs:complexType><xs:sequence><xs:element + name="UserName" type="xs:string" minOccurs="1" /><xs:element name="Expiration" type="xs:string" minOccurs="1" + /></xs:sequence></xs:complexType></xs:element></xs:schema> + PrivateConfigurationSchema : <?xml version="1.0" encoding="utf-8"?><xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" + xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:element name="PrivateConfig"><xs:complexType><xs:sequence><xs:element + name="Password" type="xs:string" /></xs:sequence></xs:complexType></xs:element></xs:schema> + OperationDescription : Get-AzureServiceAvailableExtension + OperationId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + OperationStatus : Succeeded + + Description + + + + ----------- + + + + + + + Unknown + + + + + + + + Get-AzureServiceDiagnosticsExtension + + This cmdlet gets the cloud service diagnostics extension applied on all roles or named roles at a certain deployment slot. + + + + + Get + AzureServiceDiagnosticsExtension + + + + + This cmdlet gets the cloud service diagnostics extension applied on all roles or named roles at a certain deployment slot. + + + + Get-AzureServiceDiagnosticsExtension + + ServiceName + + Specifies the Microsoft Azure service name of the deployment. + + String + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + + + + + ServiceName + + Specifies the Microsoft Azure service name of the deployment. + + String + + String + + + + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Get-AzureServiceDiagnosticsExtension -ServiceName $svc + + Description + + + + -----------This command returns the information of the cloud service diagnostics extensions enabled on the roles of the Production deployment in the service $svc. + + + + + + + Unknown + + + + + + + + Get-AzureServiceExtension + + This cmdlet gets existing cloud service extensions that are applied on a deployment. + + + + + Get + AzureServiceExtension + + + + + This cmdlet gets existing cloud service extensions that are applied on a deployment. + + + + Get-AzureServiceExtension + + ServiceName + + Specifies the Microsoft Azure service name of the deployment. + + String + + + Slot + + + + String + + + ExtensionName + + The Extension Name. + + String + + + ProviderNamespace + + The Extension Provider Namespace. + + String + + + + + + ServiceName + + Specifies the Microsoft Azure service name of the deployment. + + String + + String + + + + + + Slot + + + + String + + String + + + + + + ExtensionName + + The Extension Name. + + String + + String + + + + + + ProviderNamespace + + The Extension Provider Namespace. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Get-AzureServiceExtension -ServiceName $svc -Slot Production -ExtensionName RDP -ProviderNamespace Microsoft.Windows.Azure.Extensions + + Description + + + + -----------Get existing RDP extensions applied on all roles in the production deployment slot. + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> Get-AzureServiceExtension -ServiceName $svc -Slot Production -Role WebRole1 -ExtensionName RDP -ProviderNamespace Microsoft.Windows.Azure.Extensions + + Description + + + + -----------Get existing RDP extensions applied on the 'WebRole1' role in the production deployment slot. + + + + + + + Unknown + + + + + + + + Get-AzureServiceRemoteDesktopExtension + + This cmdlet gets the cloud service remote desktop extension applied on all roles or named roles at a certain deployment slot. + + + + + Get + AzureServiceRemoteDesktopExtension + + + + + This cmdlet gets the cloud service remote desktop extension applied on all roles or named roles at a certain deployment slot. + + + + Get-AzureServiceRemoteDesktopExtension + + ServiceName + + Specifies the Microsoft Azure service name of the deployment. + + String + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + + + + + ServiceName + + Specifies the Microsoft Azure service name of the deployment. + + String + + String + + + + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Get-AzureServiceRemoteDesktopExtension -ServiceName $svc + + Description + + + + -----------This command returns the information of the cloud service remote desktop extensions enabled on the roles of a certain deployment. + + + + + + + Unknown + + + + + + + + Get-AzureStaticVNetIP + + Get the static VNet IP address information from a VM object, if any. + + + + + Get + AzureStaticVNetIP + + + + + Get the static VNet IP address information from a VM object, if any. + + + + Get-AzureStaticVNetIP + + VM + + Persistent VM object. + + IPersistentVM + + + + + + VM + + Persistent VM object. + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Unknown + + + + + + + + Get-AzureStorageAccount + + Gets the storage accounts for the current Microsoft Azure subscription. + + + + + Get + AzureStorageAccount + + + + + The Get-AzureStorageAccount cmdlet returns an object with the details about the storage accounts for the current subscription. If the StorageAccountName parameter is specified, then only that storage account is returned. + + + + Get-AzureStorageAccount + + StorageAccountName + + If specified, the cmdlet returns only the specified storage account object. + + String + + + + + + StorageAccountName + + If specified, the cmdlet returns only the specified storage account object. + + String + + String + + + + + + + + + + + + + + + + + + + + + ManagementOperationContext + + + + + + + + + + + + + + node-dev, php-dev + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Get-AzureStorageAccount + + This command returns an object with all the storage accounts associated with the current subscription. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> C:\PS>Get-AzureStorageAccount –StorageAccountName "mystore1" + + This command returns an object with only the "mystore1" account information. + + + + + + + + + -------------------------- Example 3 -------------------------- + + + + PS C:\> C:\PS>Get-AzureStorageAccount | Format-Table -auto @{Label="Name";Expression={$_.StorageAccountName}},"Label","Location" + + This command returns an object with all the storage accounts associated with the current subscription, and outputs them as a table showing the account name, the account label, and the storage location. + + + + + + + + + + + New-AzureStorageAccount + + + + Set-AzureStorageAccount + + + + Get-AzureStorageAccount + + + + + + + + Get-AzureStorageKey + + Returns the primary and secondary storage account keys for a Microsoft Azure storage account. + + + + + Get + AzureStorageKey + + + + + The Get-AzureStorageKey cmdlet returns an object with the storage account name, the primary account key, and the secondary account key of the specified Microsoft Azure storage account as properties. + + + + Get-AzureStorageKey + + StorageAccountName + + Specifies the storage account name. + + String + + + + + + StorageAccountName + + Specifies the storage account name. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-dev, php-dev + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> Get-AzureStorageKey –StorageAccountName "mystore1" + + This command gets an object with the primary and secondary storage keys for the "mystore1" storage account. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> $myStoreKey = (Get-AzureStorageKey –StorageAccountName "mystore1").Primary + + This command puts the primary storage account key for the "mystore1" storage account in the $myStoreKey variable. + + + + + + + + + + + Get-AzureStorageAccount + + + + New-AzureStorageAccount + + + + New-AzureStorageKey + + + + Remove-AzureStorageAccount + + + + Set-AzureStorageAccount + + + + + + + + Get-AzureSubnet + + Gets a list of subnets associated with the specified Microsoft Azure virtual machine. + + + + + Get + AzureSubnet + + + + + The Get-AzureSubnet cmdlet returns a list the subnets associated with the specified virtual machine. Use Get-AzureVM to specify the virtual machine. + + + + Get-AzureSubnet + + VM + + Specifies the virtual machine object from which to get the subnet list. + + IPersistentVM + + + + + + VM + + Specifies the virtual machine object from which to get the subnet list. + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>$myVM = Get-AzureVM –ServiceName "MySvc" –Name "MyVM" + C:\PS>Get-AzureSubnet –VM $myVM + + This example gets the Microsoft Azure subnets for the virtual machine "MyVM" running in "MySvc" + + + + + + + + + + + Get-AzureVM + + + + + + + + Get-AzureVM + + Retrieves information from one or more Microsoft Azure virtual machines. + + + + + Get + AzureVM + + + + + The Get-AzureVM cmdlet retrieves information about virtual machines running in Microsoft Azure. It returns an object with information on a specific virtual machine, or if no virtual machine is specified, for all the virtual machines in the specified service of the current subscription. + + + + Get-AzureVM + + + Get-AzureVM + + ServiceName + + The name of the cloud service for which to return virtual machine information. + + String + + + Name + + Specifies the name of the virtual machine for which to retrieve information. If this parameter is not provided, the cmdlet returns a list object with information about all the virtual machines in the specified service. + + String + + + + + + ServiceName + + The name of the cloud service for which to return virtual machine information. + + String + + String + + + + + + Name + + Specifies the name of the virtual machine for which to retrieve information. If this parameter is not provided, the cmdlet returns a list object with information about all the virtual machines in the specified service. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Get-AzureVM -ServiceName "MySvc1" -Name "MyVM1" + + This command returns an object with information on the "MyVM1" virtual machine running in the "MySvc1" cloud service. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> C:\PS>Get-AzureVM -ServiceName "MySvc1" + + This command retrieves a list object with information on all of the virtual machines running in the "MySvc1" cloud service. + + + + + + + + + -------------------------- Example 3 -------------------------- + + + + PS C:\> C:\PS>Get-AzureVM -ServiceName "MySvc1" ` + | Format-Table –auto "Name",@{Expression={$_.InstanceUpgradeDomain};Label="UpgDom";Align="Right"},"InstanceStatus" + + This command displays a table showing the virtual machines running on the "MySvc1" service, their Upgrade Domain, and the current status of each machine. + + + + + + + + + + + New-AzureVMConfig + + + + Remove-AzureVM + + + + Restart-AzureVM + + + + Start-AzureVM + + + + Stop-AzureVM + + + + Update-AzureVM + + + + New-AzureVM + + + + + + + + Get-AzureVMAccessExtension + + This cmdlet gets the VMAccess extension (if any) applied on the VM. + + + + + Get + AzureVMAccessExtension + + + + + This cmdlet gets the VMAccess extension (if any) applied on the VM. + + + + Get-AzureVMAccessExtension + + VM + + The persistent VM object. + + IPersistentVM + + + + + + VM + + The persistent VM object. + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Get-AzureVMAccessExtension -VM $vm; + + Description + + + + -----------This cmdlet gets the VMAccess extension (if any) applied on the VM. + + + + + + + Unknown + + + + + + + + Get-AzureVMAvailableExtension + + Get information for the latest available extensions for VMs. + + + + + Get + AzureVMAvailableExtension + + + + + Get information for the latest available extensions for VMs. + + + + Get-AzureVMAvailableExtension + + ExtensionName + + The Extension Name. + + String + + + Publisher + + The Extension Publisher. + + String + + + + Get-AzureVMAvailableExtension + + ExtensionName + + The Extension Name. + + String + + + Publisher + + The Extension Publisher. + + String + + + AllVersions + + Specify to list all versions of an extension. + + SwitchParameter + + + + Get-AzureVMAvailableExtension + + ExtensionName + + The Extension Name. + + String + + + Publisher + + The Extension Publisher. + + String + + + Version + + The Extension Version. + + String + + + + + + ExtensionName + + The Extension Name. + + String + + String + + + + + + Publisher + + The Extension Publisher. + + String + + String + + + + + + AllVersions + + Specify to list all versions of an extension. + + SwitchParameter + + SwitchParameter + + + + + + Version + + The Extension Version. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Get-AzureVMAvailableExtension + + Publisher : Microsoft.Compute + ExtensionName : VMAccessAgent + Version : 1.0 + PublicConfigurationSchema : <?xml version="1.0" encoding="utf-8"?> + <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <xs:element name="PublicConfig"> + <xs:complexType> + <xs:sequence> + <xs:element name="UserName" type="xs:string" minOccurs="0" /> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:schema> + PrivateConfigurationSchema : <?xml version="1.0" encoding="utf-8"?> + <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <xs:element name="PrivateConfig"> + <xs:complexType> + <xs:sequence> + <xs:element name="Password" type="xs:string" minOccurs="0" /> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:schema> + SampleConfig : + OperationDescription : Get-AzureVMAvailableExtension + OperationId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + OperationStatus : Succeeded + + Description + + + + ----------- + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> Get-AzureVMAvailableExtension -Publisher Microsoft.Compute -ExtensionName VMAccessAgent -AllVersions + + Publisher : Microsoft.Compute + ExtensionName : VMAccessAgent + Version : 1.0.2 + PublicConfigurationSchema : + <?xml version="1.0" encoding="utf-8"?> + <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <xs:element name="PublicConfig"> + <xs:complexType> + <xs:sequence> + <xs:element name="UserName" type="xs:string" minOccurs="0" /> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:schema> + + PrivateConfigurationSchema : + <?xml version="1.0" encoding="utf-8"?> + <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <xs:element name="PrivateConfig"> + <xs:complexType> + <xs:sequence> + <xs:element name="Password" type="xs:string" minOccurs="0" /> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:schema> + + SampleConfig : + OperationDescription : Get-AzureVMAvailableExtension + OperationId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + OperationStatus : Succeeded + + Publisher : Microsoft.Compute + ExtensionName : VMAccessAgent + Version : 1.0.3 + PublicConfigurationSchema : <?xml version="1.0" encoding="utf-8"?> + <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <xs:element name="PublicConfig"> + <xs:complexType> + <xs:sequence> + <xs:element name="UserName" type="xs:string" minOccurs="0" /> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:schema> + PrivateConfigurationSchema : <?xml version="1.0" encoding="utf-8"?> + <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <xs:element name="PrivateConfig"> + <xs:complexType> + <xs:sequence> + <xs:element name="Password" type="xs:string" minOccurs="0" /> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:schema> + SampleConfig : + OperationDescription : Get-AzureVMAvailableExtension + OperationId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + OperationStatus : Succeeded + + Description + + + + ----------- + + + + + -------------------------- EXAMPLE 3 -------------------------- + + + + PS C:\> Get-AzureVMAvailableExtension -Publisher Microsoft.Compute -ExtensionName VMAccessAgent -Version 1.0.3 + + Publisher : Microsoft.Compute + ExtensionName : VMAccessAgent + Version : 1.0.3 + PublicConfigurationSchema : <?xml version="1.0" encoding="utf-8"?> + <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <xs:element name="PublicConfig"> + <xs:complexType> + <xs:sequence> + <xs:element name="UserName" type="xs:string" minOccurs="0" /> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:schema> + PrivateConfigurationSchema : <?xml version="1.0" encoding="utf-8"?> + <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <xs:element name="PrivateConfig"> + <xs:complexType> + <xs:sequence> + <xs:element name="Password" type="xs:string" minOccurs="0" /> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:schema> + SampleConfig : + OperationDescription : Get-AzureVMAvailableExtension + OperationId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + OperationStatus : Succeeded + + Description + + + + ----------- + + + + + + + Unknown + + + + + + + + Get-AzureVMBGInfoExtension + + This cmdlet gets the BGInfo extension (if any) applied on the VM. + + + + + Get + AzureVMBGInfoExtension + + + + + This cmdlet gets the BGInfo extension (if any) applied on the VM. + + + + Get-AzureVMBGInfoExtension + + VM + + The persistent VM object. + + IPersistentVM + + + + + + VM + + The persistent VM object. + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Get-AzureVMBGInfoExtension -VM $vm; + + Description + + + + -----------This cmdlet gets the BGInfo extension (if any) applied on the VM. + + + + + + + Unknown + + + + + + + + Get-AzureVMCustomScriptExtension + + Get Azure VM Custom Script Extension Information. + + + + + Get + AzureVMCustomScriptExtension + + + + + Get Azure VM Custom Script Extension Information. + + + + Get-AzureVMCustomScriptExtension + + VM + + The persistent VM object. + + IPersistentVM + + + + + + VM + + The persistent VM object. + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Get-AzureVMCustomScriptExtension -VM $vm; + + Description + + + + ----------- + + + + + + + Unknown + + + + + + + + Get-AzureVMDiagnosticsExtension + + + + + + + Get + AzureVMDiagnosticsExtension + + + + + + + + + Get-AzureVMDiagnosticsExtension + + VM + + + + IPersistentVM + + + + + + VM + + + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureVMDscExtension + + Gets the settings of the DSC extension on a particular VM. + + + + + Get + AzureVMDscExtension + + + + + Gets the settings of the DSC extension on a particular VM. + + + + Get-AzureVMDscExtension + + Version + + The specific version of the DSC extension that Get-AzureVMDSCExtension will get the settings from. + + String + + + VM + + The Virtual Machine to get the settings from. + + IPersistentVM + + + + + + Version + + The specific version of the DSC extension that Get-AzureVMDSCExtension will get the settings from. + + String + + String + + + + + + VM + + The Virtual Machine to get the settings from. + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.VirtualMachineDscExtensionContext + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Get-AzureVMDscExtension -VM $vm + + ModulesUrl : https://myaccount.blob.core.windows.net/windows-powershell-dsc/MyConfiguration.ps1.zip + ConfigurationFunction : MyConfiguration.ps1\MyConfiguration + Properties : {ServerName} + ExtensionName : DSC + Publisher : Microsoft.Powershell + Version : 1.* + PrivateConfiguration : + PublicConfiguration : { + "ModulesUrl": "https://myaccount.blob.core.windows.net/windows-powershell-dsc/MyConfiguration.ps1.zip", + "ConfigurationFunction": "MyConfiguration.ps1\\MyConfiguration", + "Properties": { + "ServerName": "C:\\MyDirectory" + } + } + ReferenceName : DSC + State : Enable + RoleName : my-vm + + Description + + + + -----------This command gets the settings of the DSC Extension on a VM. + + + + + + + Unknown + + + + + + + + Get-AzureVMExtension + + This cmdlet gets resource extensions applied on VMs. + + + + + Get + AzureVMExtension + + + + + This cmdlet gets resource extensions applied on VMs. + + + + Get-AzureVMExtension + + ReferenceName + + The extension's reference name. + + String + + + VM + + + + IPersistentVM + + + + Get-AzureVMExtension + + ExtensionName + + The Extension Name. + + String + + + Publisher + + The Extension Publisher. + + String + + + Version + + The Extension Version. + + String + + + VM + + + + IPersistentVM + + + + + + ReferenceName + + The extension's reference name. + + String + + String + + + + + + VM + + + + IPersistentVM + + IPersistentVM + + + + + + ExtensionName + + The Extension Name. + + String + + String + + + + + + Publisher + + The Extension Publisher. + + String + + String + + + + + + Version + + The Extension Version. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Get-AzureVM -ServiceName $svc -Name $vm | Get-AzureVMExtension; + + Description + + + + -----------Get the resource extensions applied on the VM '$vm'. + + + + + + + Unknown + + + + + + + + Get-AzureVMImage + + The Get-AzureVMImage cmdlet gets the properties on one or a list of OS or VM image in the image repository. + + + + + Get + AzureVMImage + + + + + The Get-AzureVMImage cmdlet returns one or a list of OS or VM object(s) with information on one or more operating system images stored in the image repository. The cmdlet returns information for all images in the repository, or about a specific image if its image name is provided. + + + + Get-AzureVMImage + + ImageName + + Specifies the name of the OS or VM image in the image repository. If not specified, all the images will be returned. + + String + + + + + + ImageName + + Specifies the name of the OS or VM image in the image repository. If not specified, all the images will be returned. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Get-AzureVMImage -ImageName MyImage + + Description + + + + -----------This command retrieves the "MyImage" OS or VM image object from the current image repository. + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> Get-AzureVMImage + + Description + + + + -----------This command retrieves all the OS and VM images from the current image repository. + + + + + -------------------------- EXAMPLE 3 -------------------------- + + + + PS C:\> $subsId = <MySubscriptionID> + C:\PS>$cert = Get-AzureCertificate cert:\LocalMachine\MY\<CertificateThumbprint> + C:\PS>$MyOSImages = Get-AzureVMImage + + Description + + + + -----------This command sets the subscription context and then retrieves all the images from the image repository. + + + + + + + Unknown + + + + + + + + Get-AzureVMImageDiskConfigSet + + This cmdlet returns an object for disk configuration set, which is from the input image context. + + + + + Get + AzureVMImageDiskConfigSet + + + + + This cmdlet returns an object for disk configuration set, which is from the input image context. + + + + Get-AzureVMImageDiskConfigSet + + ImageContext + + The VM image context. + + OSImageContext + + + + + + ImageContext + + The VM image context. + + OSImageContext + + OSImageContext + + + + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.ServiceManagement.Model.VirtualMachineImageDiskConfigSet + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Get-AzureVMImage -ImageName $img | Get-AzureVMImageDiskConfigSet + + Description + + + + ----------- + + + + + + + Unknown + + + + + + + + Get-AzureVMMicrosoftAntimalwareExtension + + Gets the Microsoft Antimalware extension details for a virtual machine. + + + + + Get + AzureVMMicrosoftAntimalwareExtension + + + + + The Get-AzureVMMicrosoftAntimalwareExtension cmdlet gets the Microsoft Antimalware extension details for a virtual machine. This cmdlet gets details for virtual machines that have the extension turned on programmatically by using the Set-AzureVMMicrosoftAntimalwareExtension cmdlet. The cmdlet gets the JavaScript Object Notation (JSON) equivalent for the configuration. If monitoring is turned on, the cmdlet also gets an XML representation of the antimalware monitoring configuration. + + + + Get-AzureVMMicrosoftAntimalwareExtension + + VM + + Specifies the virtual machine as an IPersistentVM object. + + IPersistentVM + + + + + + VM + + Specifies the virtual machine as an IPersistentVM object. + + IPersistentVM + + IPersistentVM + + + none + + + + + + IPersistentVM + + + + + + + + + + + + VirtualMachineMicrosoftAntimalwareExtensionContext + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Get information for the extension for a virtual machine -------------------------- + + + + PS C:\>Get-AzureVM -ServiceName "ContosoService03" -Name "ContosoVM22" | Get-AzureVMMicrosoftAntimalwareExtension + + This command gets details for the Microsoft Antimalware extension for a virtual machine. The command uses the Get-AzureVM cmdlet to get the specified virtual machine object, and then passes the object to the current cmdlet by using the pipeline operator. Get-AzureVMMicrosoftAntimalwareExtension gets configuration information for the extension. + + + + The configuration information for monitoring appears in the output field labeled AntimalwareMonitoringConfiguration. + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=402840 + + + Get-AzureVM + + + + Remove-AzureVMMicrosoftAntimalwareExtension + + + + Set-AzureVMMicrosoftAntimalwareExtension + + + + + + + + Get-AzureVMPuppetExtension + + This cmdlet gets the Puppet extension (if any) applied on the VM. + + + + + Get + AzureVMPuppetExtension + + + + + This cmdlet gets the Puppet extension (if any) applied on the VM. + + + + Get-AzureVMPuppetExtension + + VM + + The persistent VM object. + + IPersistentVM + + + + + + VM + + The persistent VM object. + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Get-AzureVMPuppetExtension -VM $vm; + + Description + + + + -----------This cmdlet gets the Puppet extension (if any) applied on the VM. + + + + + + + Unknown + + + + + + + + Get-AzureVNetConfig + + Gets the Microsoft Azure virtual network configuration from the current subscription. + + + + + Get + AzureVNetConfig + + + + + The Get-AzureVNetConfig retrieves the virtual network configuration of the current Microsoft Azure subscription. If the ExportToFile parameter is specified, a network configuration file is created. + + + + Get-AzureVNetConfig + + ExportToFile + + Specifies the path and file name of a network configuration file to be created from the settings. + + String + + + + + + ExportToFile + + Specifies the path and file name of a network configuration file to be created from the settings. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Get-AzureVNetConfig + + This command gets the virtual network configuration of the current Microsoft Azure subscription and displays it. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> C:\PS>Get-AzureVNetConfig -ExportToFile "c:\temp\MyAzNets.netcfg" + + This command retrieves the virtual network configuration of the current Microsoft Azure subscription and then saves it to a local file. + + + + + + + + + + + Get-AzureVNetSite + + + + Remove-AzureVNetConfig + + + + Set-AzureVNetConfig + + + + + + + + Get-AzureVNetConnection + + Returns an object with all of the virtual network connections to the specified Microsoft Azure virtual network. + + + + + Get + AzureVNetConnection + + + + + The Get-AzureVNetConnections cmdlet returns an object with all of the current active connections to the specified Microsoft Azure virtual network. + + + + Get-AzureVNetConnection + + VNetName + + Specifies the name of the virtual network from which to return connections. + + String + + + + + + VNetName + + Specifies the name of the virtual network from which to return connections. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Get-AzureVNetConnection –VNetName "VNet1" + + Gets a list of all of the current connections to the "VNet1" virtual network. + + + + + + + + + + + Start-VirtualNetworkGateway + + + + End-VirtualNetworkGateway + + + + + + + + Get-AzureVNetGateway + + Retrieves an object with information about a Microsoft Azure virtual network gateway. + + + + + Get + AzureVNetGateway + + + + + The Get-AzureVNetGateway cmdlet retrieves an object with information about a Microsoft Azure virtual network gateway from the current Microsoft Azure subscription. A virtual network gateway is a connection between a local network site with a VPN device and a Microsoft Azure virtual network. + + + + Get-AzureVNetGateway + + VNetName + + Specifies the virtual network name whose virtual network gateway object will be retrieved. + + String + + + + + + VNetName + + Specifies the virtual network name whose virtual network gateway object will be retrieved. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Get-VNetGateway –VnetName "MyVNet01" + + This command gets a Microsoft Azure virtual network gateway object from the "MyVNet01" virtual network. + + + + + + + + + + + + + + + Get-AzureVNetGatewayKey + + Returns a shared key that can be used to configure a VPN device. + + + + + Get + AzureVNetGatewayKey + + + + + The Get-AzureVNetGatewayKey cmdlet returns the shared key used by the VPN device on the specified LocalNetworkSiteName to authenticate to the Microsoft Azure Virtual Network Gateway for the specified Microsoft Azure virtual network. + + + + Get-AzureVNetGatewayKey + + VNetName + + Specifies the name of the Microsoft Azure virtual network that the VPN device connects to. + + String + + + LocalNetworkSiteName + + Specifies the local network site name for which to retrieve a shared key. + + String + + + + + + VNetName + + Specifies the name of the Microsoft Azure virtual network that the VPN device connects to. + + String + + String + + + + + + LocalNetworkSiteName + + Specifies the local network site name for which to retrieve a shared key. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> Get-AzureVNetGatewayKey –VNetName "MyVirtualNetwork" –LocalNetworkSiteName "MyBranchOffice" + + This command retrieves a shared-key to allow the VPN device at the specified local network site to authenticate to the specified virtual network. + + + + + + + + + + + + + + + Get-AzureVNetSite + + Returns an object describing Microsoft Azure virtual networks. + + + + + Get + AzureVNetSite + + + + + The Get-AzureVNetSite cmdlet returns a list object with information about Microsoft Azure virtual networks for the current subscription.. If you specify a virtual network name, only information for that virtual network is returned. + + + + Get-AzureVNetSite + + VNetName + + Specifies a virtual network name to return information about. + + String + + + + + + VNetName + + Specifies a virtual network name to return information about. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Get-AzureVNetSite + + This example retrieves information about all the virtual networks in the current subscription. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> C:\PS>Get-AzureVNetSite –VNetName "MyProductionNetwork" + + This example retrieves information on the "MyProductionNetwork" virtual network only. + + + + + + + + + + + Get-AzureVNetConfig + + + + Remove-AzureVNetConfig + + + + Set-AzureVNetConfig + + + + + + + + Get-AzureWinRMUri + + Retrieves the uri to WinRM https listener to a VM or a list of VMs in a hosted service. + + + + + Get + AzureWinRMUri + + + + + Retrieves the uri to WinRM https listener to a VM or a list of VMs in a hosted service. + + + + Get-AzureWinRMUri + + ServiceName + + Specifies the name of the Microsoft Azure service that hosts the virtual machine. + + String + + + Name + + Specifies the name of the virtual machine to which the WinRM Uri is generated. + + String + + + + + + ServiceName + + Specifies the name of the Microsoft Azure service that hosts the virtual machine. + + String + + String + + + + + + Name + + Specifies the name of the virtual machine to which the WinRM Uri is generated. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Get-AzureWinRMUri -ServiceName MyService -Name MyVM + + Description + + + + -----------Returns a URI to WinRM https listener to the specified VM in the specified service. + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> Get-AzureWinRMUri -ServiceName MyService + + Description + + + + -----------Returns a list of URIs to WinRM https listeners to the VMs in the specified service. + + + + + + + New-AzureVM + + + + New-AzureQuickVM + + + + + + + + Import-AzureVM + + Imports a Microsoft Azure virtual machine state from a file. + + + + + Import + AzureVM + + + + + The Import-AzureVM cmdlet imports the previously saved state of a virtual machine from an xml file. This cmdlet is useful when you want to subsequently create a new virtual machine from the imported data. + + Note: Using Export-AzureVM, followed by Remove-AzureVM and then Import-AzureVM to recreate a virtual machine can cause the resultant virtual machine to have a different IP address than the original. + + + + Import-AzureVM + + Path + + Specifies the path to the file with the previously saved virtual machine state. + + String + + + + + + Path + + Specifies the path to the file with the previously saved virtual machine state. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Import-AzureVM -Path "C:\VMstate.xml" | New-AzureVM –ServiceName "mynewsvc" + + This command imports the state of a virtual machine from the "myvm.xml" file, and then creates a new virtual machine in the specified cloud service. + + + + + + + + + + + Export-AzureVM + + + + New-AzureVM + + + + + + + + Move-AzureDeployment + + Swaps the deployments in production and staging. + + + + + Move + AzureDeployment + + + + + The Move-AzureDeployment swaps the virtual IP addresses (VIPs) of deployments in production and staging environments. A deployment currently running in the staging environment will be swapped to the production environment, and a deployment running in the production environment will be swapped to the staging environment. If there is a deployment in the staging environment and no deployment in the production environment, the deployment will move to production. If there is no deployment in the staging environment, the cmdlet will fail. + + + + Move-AzureDeployment + + ServiceName + + Specifies the name of the service whose production and staging deployments will be swapped. + + String + + + + + + ServiceName + + Specifies the name of the service whose production and staging deployments will be swapped. + + String + + String + + + + + + + + + + + + + + + + + + + + + ManagementOperationContext + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Move-AzureDeployment -ServiceName "myservice" + + This command swaps the deployments of the "myservice" service between the production and stanging environments. + + + + + + + + + + + Get-AzureDeployment + + + + New-AzureDeployment + + + + Remove-AzureDeployment + + + + Set-AzureDeployment + + + + + + + + New-AzureAclConfig + + Creates a new empty ACL configuration object. + + + + + New + AzureAclConfig + + + + + The New-AzureAclConfig cmdlet creates a new empty ACL configuration object. + + + + New-AzureAclConfig + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS> $acl = New-AzureAclConfig + + This command will create a new empty ACL configuration object. + + + + + + + + + + + Get-AzureAclConfig + + + + Remove-AzureAclConfig + + + + Set-AzureAclConfig + + + + + + + + New-AzureAffinityGroup + + Creates a new affinity group for the current Microsoft Azure subscription. + + + + + New + AzureAffinityGroup + + + + + The New-AzureAffinityGroup cmdlet creates a new affinity group in the current subscription. An affinity group places your services and their resources together in a Microsoft Azure data center. The affinity group members are grouped together for optimal performance. Affinity groups are defined at the subscription level and are available to any subsequent cloud services or storage accounts that you create. Services can be added to an affinity group only at the time of creation. + + + + New-AzureAffinityGroup + + Name + + Specifies a name for the new affinity group that is unique to the subscription. + + String + + + Label + + Specifies a label for the affinity group. The label may be up to 100 characters in length. + + String + + + Description + + Specifies a description for the affinity group. The description may be up to 1024 characters in length. + + String + + + Location + + Required if AffinityGroup is not specified. The Location parameter specifies the geographical location of the data center where the affinity group will be created. + + String + + + + + + Name + + Specifies a name for the new affinity group that is unique to the subscription. + + String + + String + + + + + + Label + + Specifies a label for the affinity group. The label may be up to 100 characters in length. + + String + + String + + + The same one as the Name + + + Description + + Specifies a description for the affinity group. The description may be up to 1024 characters in length. + + String + + String + + + + + + Location + + Required if AffinityGroup is not specified. The Location parameter specifies the geographical location of the data center where the affinity group will be created. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>New-AzureAffinityGroup -Name South1 -Location "South Central US" -Label "South Region" -Description "Affinity group for production applications in southern region." + + This command creates a new affinity group named "South1" in the "South Central US" region and specifies both a label and a description. + + + + + + + + + + + Get-AzureAffinityGroup + + + + Remove-AzureAffinityGroup + + + + Set-AzureAffinityGroup + + + + + + + + New-AzureCertificateSetting + + Creates a setting object to insert an existing certificate into new Microsoft Azure virtual machines. + + + + + New + AzureCertificateSetting + + + + + The New-AzureCertificateSetting cmdlet creates a certificate setting object for a certificate that has already been added to Microsoft Azure. This certificate setting object can be used by New-AzureProvisioningConfig when creating the configuration object for a new virtual machine using New-AzureVM, or when creating a new virtual machine with New-AzureQuickVM. When included as part of a virtual machine creation script, this adds the specified certificate to the new virtual machine. + + + + New-AzureCertificateSetting + + StoreName + + Specifies the Certificate Store to place the certificate in. + + String + + + Thumbprint + + Specifies the thumbprint of the certificate. + + String + + + + + + StoreName + + Specifies the Certificate Store to place the certificate in. + + String + + String + + + + + + Thumbprint + + Specifies the thumbprint of the certificate. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>$myWinCert = New-AzureCertificateSetting –Thumbprint "D7BECD4D63EBAF86023BB4F1A5FBF5C2C924902A" –StoreName "My" + + This command creates a certificate setting object for an existing certificate and then stores the object in a variable for later use. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> C:\PS>Add-AzureCertificate –ServiceName "MySvc" –CertToDeploy "C:\temp\MyWinCert.cer" + C:\PS>$myWinCert = New-AzureCertificateSetting –Thumbprint "D7BECD4D63EBAF86023BB4F1A5FBF5C2C924902A" –StoreName "My" + C:\PC>New-AzureVMConfig -Name "MyVM2" -InstanceSize Small -ImageName $winImage ` + | Add-AzureProvisioningConfig -Windows -Certificates $myWinCert -Password 'pass@word1' ` + | New-AzureVM -ServiceName "MySvc" + + This command adds a certificate to the Microsoft Azure service, and then creates a new Windows virtual machine that uses the certificate. + + + + + + + + + + + + + + + New-AzureDeployment + + Creates a new deployment from a service comprising web roles and worker roles. + + + + + New + AzureDeployment + + + + + The New-AzureDeployment cmdlet creates a new deployment based on package files (.cspkg) and a service configuration files (.cscfg). Use the New-AzureVM cmdlet to create a new deployment based on Microsoft Azure virtual machines. + + There should not be an existing deployment with the same name nor in the same deployment environment when executing this command. If there is, the command will fail. + + + + New-AzureDeployment + + ServiceName + + Specifies Microsoft Azure service name for the deployment. + + String + + + Package + + Specifies the path or URI to a .cspkg blob in a storage within the same subscription/project. + + String + + + Configuration + + Specifies the path and file name of a service configuration file (.cscfg). + + String + + + Slot + + Specifies the environment where the deployment is created. Acceptable values are Staging or Production. If not specified, Production is used. + + String + + + Label + + Specifies the label name for the new deployment. If not specified, a Globally Unique Identifier (GUID) is used. + + String + + + Name + + Specifies the deployment name. If not specified, a Global Unique Identifier is used. + + String + + + DoNotStart + + Specifies that the new deployment will not be started when it is created. + + SwitchParameter + + + TreatWarningsAsError + + Causes warning messages to be treated as errors, resulting in the deployment failing on warnings. + + SwitchParameter + + + ExtensionConfiguration + + Optional array of extension configuration objects. + + ExtensionConfigurationInput[] + + + + + + ServiceName + + Specifies Microsoft Azure service name for the deployment. + + String + + String + + + + + + Package + + Specifies the path or URI to a .cspkg blob in a storage within the same subscription/project. + + String + + String + + + + + + Configuration + + Specifies the path and file name of a service configuration file (.cscfg). + + String + + String + + + + + + Slot + + Specifies the environment where the deployment is created. Acceptable values are Staging or Production. If not specified, Production is used. + + String + + String + + + Production + + + Label + + Specifies the label name for the new deployment. If not specified, a Globally Unique Identifier (GUID) is used. + + String + + String + + + The same as Name + + + Name + + Specifies the deployment name. If not specified, a Global Unique Identifier is used. + + String + + String + + + Guid + + + DoNotStart + + Specifies that the new deployment will not be started when it is created. + + SwitchParameter + + SwitchParameter + + + + + + TreatWarningsAsError + + Causes warning messages to be treated as errors, resulting in the deployment failing on warnings. + + SwitchParameter + + SwitchParameter + + + + + + ExtensionConfiguration + + Optional array of extension configuration objects. + + ExtensionConfigurationInput[] + + ExtensionConfigurationInput[] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> New-AzureDeployment -ServiceName "myservice" -Slot "Production" -Package "https://mystorage.blob.core.windows.net/mycontainer/MyPackage.cspkg" -Configuration "c:\packages\mypackage.cscfg" -Label "MyDeployment" + + This example creates a new deployment based on a package location and a configuration path. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> New-AzureDeployment -ServiceName $svc -Package $pkg -Configuration $cnfg -Slot Production -ExtensionConfiguration $rdpConfig + + + + + + This example installs the extension configuration in the specified Cloud Service and applies them on roles. + + + + + + + Get-AzureDeployment + + + + Remove-AzureDeployment + + + + New-AzureVMConfig + + + + Set-AzureDeployment + + + + + + + + New-AzureDns + + Creates a DNS settings object to be used when creating a Microsoft Azure deployment. + + + + + New + AzureDns + + + + + The New-AzureDNS cmdlet creates a DNS settings object for use by the New-AzureVM cmdlet. It accepts two parameters: Name and Address. The Name parameter is a friendly name, not necessarily a DNS resolvable name, and the Address parameter is the IP address of the DNS server. + + + + New-AzureDns + + Name + + Specifies a friendly name to identify the DNS server. This name is not necessarily a fully qualified domain name. + + String + + + IPAddress + + Specifies the IP address of the DNS server. + + String + + + + + + Name + + Specifies a friendly name to identify the DNS server. This name is not necessarily a fully qualified domain name. + + String + + String + + + + + + IPAddress + + Specifies the IP address of the DNS server. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>$dns1 = New-AzureDns –Name "dns1" –address "10.1.2.4" + + This command creates a new Microsoft Azure DNS settings object. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> C:\PS>$dns1 = New-AzureDns –Name "dns1" –address "10.1.2.4" + C:\PS>New-AzureVM –ServiceName $MyService –AffinityGroup $MyAG –VnetName $VNet1 –DnsSettings $dns1 –VMs $MyVMconfig + + This command creates a new Microsoft Azure DNS settings object that is then used during the creation of a virtual machine with the New-AzureVM cmdlet. + + + + + + + + + + + + + + + New-AzureInternalLoadBalancerConfig + + New-AzureInternalLoadBalancerConfig [-InternalLoadBalancerName] <string> [<CommonParameters>] + + New-AzureInternalLoadBalancerConfig [-InternalLoadBalancerName] <string> [-SubnetName] <string> [-StaticVNetIPAddress] <ipaddress> [<CommonParameters>] + + New-AzureInternalLoadBalancerConfig [-InternalLoadBalancerName] <string> [-SubnetName] <string> [<CommonParameters>] + + + + + New + AzureInternalLoadBalancerConfig + + + + + The New-InternalLoadbalancerConfig creates a local object that can be used later during creation of a new azure virtual machine deployment. + + + + New-AzureInternalLoadBalancerConfig + + InternalLoadBalancerName + + + + String + + + + New-AzureInternalLoadBalancerConfig + + InternalLoadBalancerName + + + + String + + + SubnetName + + + + String + + + + New-AzureInternalLoadBalancerConfig + + InternalLoadBalancerName + + + + String + + + SubnetName + + + + String + + + StaticVNetIPAddress + + + + IPAddress + + + + + + InternalLoadBalancerName + + + + String + + String + + + + + + SubnetName + + + + String + + String + + + + + + StaticVNetIPAddress + + + + IPAddress + + IPAddress + + + + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.ServiceManagement.Model.InternalLoadBalancerConfig + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> $myilbconfig = New-AzureInternalLoadBalancerConfig -InternalLoadBalancerName "MyILB" -SubnetName "FrontEndSubnet" + + Description + + + + -----------Creates a local Internal load balancer object that can be referenced later in the New-AzureVM operation + + + + + + + Unknown + + + + + + + + + + New-AzureQuickVM + + + + + + + + New + AzureQuickVM + + + + The New-AzureQuickVM sets the configuration for a new virtual machine and creates the virtual machine. It can create a new Microsoft Azure service, or deploy the new virtual machine into an existing service if neither -Location or -AffinityGroup is specified. + + + + + New-AzureQuickVM + + ImageName + + Specifies the name of the operating system image to use to create the operating system disk. + + string + + + Linux + + Specify to create a Linux virtual machine. + + + + ServiceName + + + Specifies the new or existing service name. + + If the service does not exist, this parameter will create it for you. Use the -Location or -AffinityGroup parameter to specify where to create the service. + If the service exists, the -Location or -AffinityGroup parameter is not needed. + + + string + + + AffinityGroup + + Specifies the Microsoft Azure affinity group the virtual machine will reside in. Only valid for a new cloud service. + + string + + + AvailabilitySetName + + Specify the availability set to use. + + string + + + CustomDataFile + + + This parameter takes a file name as an argument. PowerShell will then base64 encode the contents of the file and send it along with the provisioning configuration information. The file must be less than 64KB or the Azure API will not accept the request. + + On Windows this data ends up in %SYSTEMDRIVE%\AzureData\CustomData.bin as a binary file. + On Linux, this data is passed to the VM via the ovf-env.xml file, which is copied to the /var/lib/waagent directory during provisioning. The agent will also place the base-64 encoded data in /var/lib/waagent/CustomData during provisioning. + + + string + + + DisableGuestAgent + + Not Specified + + + + DnsSettings + + Specifies a DNS Server object that defines the DNS settings for the new deployment. Use New-AzureDNS to create the DNS server object. + + DnsServer[] + + + HostCaching + + Specifies the host caching mode to use. Supported options are: "ReadOnly" and "ReadWrite". + + string + + + InstanceSize + + Specifies the size of the instance. Allowed values are ExtraSmall, Small, Medium, Large, ExtraLarge, A5, A6, A7, A8, A9, Basic_A0, Basic_A1, Basic_A2, Basic_A3, Basic_A4, Standard_D1, Standard_D2, Standard_D3, Standard_D4, Standard_D11, Standard_D12, Standard_D13, Standard_D14. + + string + + + LinuxUser + + Specifies the Linux administrative account name to create. + + string + + + Location + + Specifies the Microsoft Azure data center location that will host the virtual machine. When specified, New-AzureQuickVM will create a new Microsoft Azure service in the specified location. Only valid for a new cloud service. + + string + + + MediaLocation + + Specifies the Microsoft Azure storage location to use for the virtual machines disks. + + string + + + Name + + Specifies the name of the virtual machine. + + string + + + Password + + Specifies the password for the administrative account. + + string + + + ReservedIPName + + Not Specified + + string + + + SSHKeyPairs + + + + LinuxProvisioningConfigurationSet+SSHKeyPairList + + + SSHPublicKeys + + + + LinuxProvisioningConfigurationSet+SSHPublicKeyList + + + SubnetNames + + Specifies a list of subnet names the virtual machine will use. + + string[] + + + VNetName + + Specifies the name of a virtual network the virtual machine will use. + + string + + + WaitForBoot + + Waits for VM to reach ReadyRole state. Cmdlet fails if VM falls in one of the following states while waiting: "FailedStartingVM", "ProvisioningFailed", "ProvisioningTimeout". + + + + + New-AzureQuickVM + + ImageName + + Specifies the name of the operating system image to use to create the operating system disk. + + string + + + ServiceName + + + Specifies the new or existing service name. + + If the service does not exist, this parameter will create it for you. Use the -Location or -AffinityGroup parameter to specify where to create the service. + If the service exists, the -Location or -AffinityGroup parameter is not needed. + + + string + + + Windows + + Include to create a Windows virtual machine. + + + + AdminUsername + + Specifies the Administrator account to create. + + string + + + AffinityGroup + + Specifies the Microsoft Azure affinity group the virtual machine will reside in. Only valid for a new cloud service. + + string + + + AvailabilitySetName + + Specify the availability set to use. + + string + + + Certificates + + Specifies a certificate list to use for creating the service. + + CertificateSettingList + + + CustomDataFile + + + This parameter takes a file name as an argument. PowerShell will then base64 encode the contents of the file and send it along with the provisioning configuration information. The file must be less than 64KB or the Azure API will not accept the request. + + On Windows this data ends up in %SYSTEMDRIVE%\AzureData\CustomData.bin as a binary file. + On Linux, this data is passed to the VM via the ovf-env.xml file, which is copied to the /var/lib/waagent directory during provisioning. The agent will also place the base-64 encoded data in /var/lib/waagent/CustomData during provisioning. + + + string + + + DisableGuestAgent + + Not Specified + + + + DisableWinRMHttps + + Disables WinRM on https which is added by default. + + + + DnsSettings + + Specifies a DNS Server object that defines the DNS settings for the new deployment. Use New-AzureDNS to create the DNS server object. + + DnsServer[] + + + EnableWinRMHttp + + Enables WinRM over http. + + + + HostCaching + + Specifies the host caching mode to use. Supported options are: "ReadOnly" and "ReadWrite". + + string + + + InstanceSize + + Specifies the size of the instance. Allowed values are ExtraSmall, Small, Medium, Large, ExtraLarge, A5, A6, A7, A8, A9, Basic_A0, Basic_A1, Basic_A2, Basic_A3, Basic_A4, Standard_D1, Standard_D2, Standard_D3, Standard_D4, Standard_D11, Standard_D12, Standard_D13, Standard_D14. + + string + + + Location + + Specifies the Microsoft Azure data center location that will host the virtual machine. When specified, New-AzureQuickVM will create a new Microsoft Azure service in the specified location. Only valid for a new cloud service. + + string + + + MediaLocation + + Specifies the Microsoft Azure storage location to use for the virtual machines disks. + + string + + + Name + + Specifies the name of the virtual machine. + + string + + + NoExportPrivateKey + + Prevents the private key from being uploaded + + + + NoWinRMEndpoint + + Prevents the WinRM endpoint from being added + + + + Password + + Specifies the password for the administrative account. + + string + + + ReservedIPName + + Not Specified + + string + + + SubnetNames + + Specifies a list of subnet names the virtual machine will use. + + string[] + + + VNetName + + Specifies the name of a virtual network the virtual machine will use. + + string + + + WaitForBoot + + Waits for VM to reach ReadyRole state. Cmdlet fails if VM falls in one of the following states while waiting: "FailedStartingVM", "ProvisioningFailed", "ProvisioningTimeout". + + + + WinRMCertificate + + Certificate that will be associated with WinRM endpoint. + + X509Certificate2 + + + X509Certificates + + X509 certificates that will be deployed to hosted service. + + X509Certificate2[] + + + + + + + AdminUsername + + Specifies the Administrator account to create. + + + string + + string + + + + + + AffinityGroup + + Specifies the Microsoft Azure affinity group the virtual machine will reside in. Only valid for a new cloud service. + + + string + + string + + + + + + AvailabilitySetName + + Specify the availability set to use. + + + string + + string + + + + + + Certificates + + Specifies a certificate list to use for creating the service. + + + CertificateSettingList + + CertificateSettingList + + + + + + CustomDataFile + + + This parameter takes a file name as an argument. PowerShell will then base64 encode the contents of the file and send it along with the provisioning configuration information. The file must be less than 64KB or the Azure API will not accept the request. + + On Windows this data ends up in %SYSTEMDRIVE%\AzureData\CustomData.bin as a binary file. + On Linux, this data is passed to the VM via the ovf-env.xml file, which is copied to the /var/lib/waagent directory during provisioning. The agent will also place the base-64 encoded data in /var/lib/waagent/CustomData during provisioning. + + + + string + + string + + + + + + DisableGuestAgent + + Not Specified + + + SwitchParameter + + SwitchParameter + + + + + + DisableWinRMHttps + + Disables WinRM on https which is added by default. + + + SwitchParameter + + SwitchParameter + + + + + + DnsSettings + + Specifies a DNS Server object that defines the DNS settings for the new deployment. Use New-AzureDNS to create the DNS server object. + + + DnsServer[] + + DnsServer[] + + + + + + EnableWinRMHttp + + Enables WinRM over http. + + + SwitchParameter + + SwitchParameter + + + + + + HostCaching + + Specifies the host caching mode to use. Supported options are: "ReadOnly" and "ReadWrite". + + + string + + string + + + + + + ImageName + + Specifies the name of the operating system image to use to create the operating system disk. + + + string + + string + + + + + + InstanceSize + + Specifies the size of the instance. Allowed values are ExtraSmall, Small, Medium, Large, ExtraLarge, A5, A6, A7, A8, A9, Basic_A0, Basic_A1, Basic_A2, Basic_A3, Basic_A4, Standard_D1, Standard_D2, Standard_D3, Standard_D4, Standard_D11, Standard_D12, Standard_D13, Standard_D14. + + + string + + string + + + + + + Linux + + Specify to create a Linux virtual machine. + + + SwitchParameter + + SwitchParameter + + + + + + LinuxUser + + Specifies the Linux administrative account name to create. + + + string + + string + + + + + + Location + + Specifies the Microsoft Azure data center location that will host the virtual machine. When specified, New-AzureQuickVM will create a new Microsoft Azure service in the specified location. Only valid for a new cloud service. + + + string + + string + + + + + + MediaLocation + + Specifies the Microsoft Azure storage location to use for the virtual machines disks. + + + string + + string + + + + + + Name + + Specifies the name of the virtual machine. + + + string + + string + + + + + + NoExportPrivateKey + + Prevents the private key from being uploaded + + + SwitchParameter + + SwitchParameter + + + + + + NoWinRMEndpoint + + Prevents the WinRM endpoint from being added + + + SwitchParameter + + SwitchParameter + + + + + + Password + + Specifies the password for the administrative account. + + + string + + string + + + + + + ReservedIPName + + Not Specified + + + string + + string + + + + + + ServiceName + + + Specifies the new or existing service name. + + If the service does not exist, this parameter will create it for you. Use the -Location or -AffinityGroup parameter to specify where to create the service. + If the service exists, the -Location or -AffinityGroup parameter is not needed. + + + + string + + string + + + + + + SSHKeyPairs + + + + + LinuxProvisioningConfigurationSet+SSHKeyPairList + + LinuxProvisioningConfigurationSet+SSHKeyPairList + + + + + + SSHPublicKeys + + + + + LinuxProvisioningConfigurationSet+SSHPublicKeyList + + LinuxProvisioningConfigurationSet+SSHPublicKeyList + + + + + + SubnetNames + + Specifies a list of subnet names the virtual machine will use. + + + string[] + + string[] + + + + + + VNetName + + Specifies the name of a virtual network the virtual machine will use. + + + string + + string + + + + + + WaitForBoot + + Waits for VM to reach ReadyRole state. Cmdlet fails if VM falls in one of the following states while waiting: "FailedStartingVM", "ProvisioningFailed", "ProvisioningTimeout". + + + SwitchParameter + + SwitchParameter + + + + + + Windows + + Include to create a Windows virtual machine. + + + SwitchParameter + + SwitchParameter + + + + + + WinRMCertificate + + Certificate that will be associated with WinRM endpoint. + + + X509Certificate2 + + X509Certificate2 + + + + + + X509Certificates + + X509 certificates that will be deployed to hosted service. + + + X509Certificate2[] + + X509Certificate2[] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + C:\PS> + + + New-AzureQuickVM -Windows -ServiceName "MySvc1" -name "MyWinVM1" -ImageName $image -Password $adminPasswd -AdminUsername PsTestAdmin -WaitForBoot + + + Description + ----------- + This example creates a new Windows virtual machine in an existing service from an image. (Use Get-AzureVMImage to get a list of images.) Optional WaitForBoot flag blocks New-AzureVM till the VM boots. + + + + + + + + + + + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + C:\PS> + + + $certs = Get-ChildItem Cert:\CurrentUser\My + New-AzureQuickVM -Windows -ServiceName "MySvc1" -name "MyWinVM1" -ImageName $image -Password $adminPasswd -AdminUserName PsTestAdmin -WinRMCertificate $certs[0] -X509Certificates $certs[1], $certs[2] -WaitForBoot + + + Description + ----------- + + This example creates a new Windows virtual machine in an existing service from an image. WinRM Https listener is enabled by default on the VM. WaitForBoot option enables to wait for VM to boot. WinRMCertificate and X509Certificates are uploaded to hosted service by New-AzureQuickVM. + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 3 -------------------------- + + + C:\PS> + + + New-AzureQuickVM -Linux -ServiceName "MySvc2" -name "MyLxVM1" -ImageName $image -LinuxUser $user -Password $adminPasswd -Location $dclocation + + + Description + ----------- + This example creates a new Linux virtual machine from an image, and creates a new service to host it. + + + + + + + + + + + + + + + -------------------------- EXAMPLE 4 -------------------------- + + + C:\PS> + + + $dclocations = Get-AzureLocation + $images = Get-AzureVMImage + New-AzureQuickVM -Windows -InstanceSize "Large" -ServiceName "MySvc3" -name "MyWinVM1" -ImageName $images[4].imagename -Password $adminPasswd -AdminUsername PSTestAdmin -location $dclocations[0].name + + + Description + ----------- + + This example gets a list of data center locations, and a list of virtual machine images, and then creates a new large Windows virtual machine and a new service. + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 5 -------------------------- + + + C:\PS> + + + $dclocations = Get-AzureLocation + $images = Get-AzureVMImage + New-AzureQuickVM -Windows -InstanceSize "Large" -ServiceName "MySvc3" -name "MyWinVM1" -ImageName $images[4].imagename -Password $adminPasswd -AdminUsername PSTestAdmin -location $dclocations[0].name -ReservedIPName $ipName + + + Description + ----------- + + This example creates a new Windows virtual machine with a Reserved IP + + + + + + + + + + + + + + + + + + + + + + + + + + + + New-AzureReservedIP + + Create a Reserved IP. + + + + + New + AzureReservedIP + + + + + Create a reserved IP. + + + + New-AzureReservedIP + + ReservedIPName + + Reserved IP Name + + String + + + Label + + Reserved IP Label + + String + + + Location + + Location where the Reserved IP should be created + + String + + + + New-AzureReservedIP + + ReservedIPName + + Reserved IP Name + + String + + + Label + + Reserved IP Label + + String + + + Location + + Location where the Reserved IP should be created + + String + + + + New-AzureReservedIP + + ReservedIPName + + Reserved IP Name + + String + + + Label + + Reserved IP Label + + String + + + Location + + Location where the Reserved IP should be created + + String + + + + + + ReservedIPName + + Reserved IP Name + + String + + String + + + + + + Label + + Reserved IP Label + + String + + String + + + + + + Location + + Location where the Reserved IP should be created + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> New-AzureReservedIP -ReservedIPName $name -Label $label -Location $location + + Description + + + + -----------Create a new Reserved IP in the Subscription which can be used for Creating Cloud Services (Web/Worker/Virtual Machines) + + + + + + + Unknown + + + + + + + + New-AzureService + + Creates a new Microsoft Azure service. + + + + + New + AzureService + + + + + The New-AzureService cmdlet creates a new Microsoft Azure service in the current subscription. + + + + New-AzureService + + ServiceName + + Specifies the name of the new service. The name must be unique to the subscription. + + String + + + AffinityGroup + + Specifies the affinity group associated with the subscription. An affinity group is required if the Location isn't specified. + + String + + + Label + + Specifies a label for the service. The label may be up to 100 characters in length. + + String + + + Description + + Specifies a description for the service. The description may be up to 1024 characters in length. + + String + + + ReverseDnsFqdn + + + + String + + + + New-AzureService + + ServiceName + + Specifies the name of the new service. The name must be unique to the subscription. + + String + + + Location + + Specifies the location for the service. A location is required if there isn't a specified Affinity Group. + + String + + + Label + + Specifies a label for the service. The label may be up to 100 characters in length. + + String + + + Description + + Specifies a description for the service. The description may be up to 1024 characters in length. + + String + + + ReverseDnsFqdn + + + + String + + + + + + ServiceName + + Specifies the name of the new service. The name must be unique to the subscription. + + String + + String + + + + + + AffinityGroup + + Specifies the affinity group associated with the subscription. An affinity group is required if the Location isn't specified. + + String + + String + + + + + + Label + + Specifies a label for the service. The label may be up to 100 characters in length. + + String + + String + + + Service name + + + Description + + Specifies a description for the service. The description may be up to 1024 characters in length. + + String + + String + + + + + + ReverseDnsFqdn + + + + String + + String + + + + + + Location + + Specifies the location for the service. A location is required if there isn't a specified Affinity Group. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>New-AzureService -ServiceName "MySvc1" -Label "MyTestService" -Location "South Central US" + + This command creates a new service named "MySvc1" in the South Central US location. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> C:\PS>New-AzureService -ServiceName "MySvc1" -AffinityGroup NorthRegion + + This command creates a new service named "MySvc1" using the NorthRegion affinity group. + + + + + + + + + + + Get-AzureService + + + + Remove-AzureService + + + + Set-AzureService + + + + + + + + New-AzureServiceADDomainExtensionConfig + + This cmdlet generates the configuration for AD Domain extension for cloud services. + + + + + New + AzureServiceADDomainExtensionConfig + + + + + This cmdlet generates the configuration for AD Domain extension for cloud services. + + + + New-AzureServiceADDomainExtensionConfig + + Role + + An optional array of roles to specify the remote desktop configuration for. If not specified the AD domain configuration is applied as the default configuration for all roles. + + String[] + + + X509Certificate + + An x509 certificate that when specified will be automatically uploaded to the cloud service and used for encrypting the extension private configuration. + + X509Certificate2 + + + ThumbprintAlgorithm + + Thumbprint hashing algorithm which is used with the thumbprint to identify the certificate. This parameter is optional and the default is sha1. + + String + + + DomainName + + The AD domain name. + + String + + + Restart + + Whether to restart the computer if the join operation succeeded. + + SwitchParameter + + + Credential + + The credentials (user name/password) to join the AD domain. + + PSCredential + + + UnjoinDomainCredential + + The credentials (user name/password) to unjoin the AD domain. + + PSCredential + + + Options + + The unsigned integer join option. + + JoinOptions + + + OUPath + + The OU path for AD domain join operation. + + String + + + Version + + + + String + + + + New-AzureServiceADDomainExtensionConfig + + Role + + An optional array of roles to specify the remote desktop configuration for. If not specified the AD domain configuration is applied as the default configuration for all roles. + + String[] + + + X509Certificate + + An x509 certificate that when specified will be automatically uploaded to the cloud service and used for encrypting the extension private configuration. + + X509Certificate2 + + + ThumbprintAlgorithm + + Thumbprint hashing algorithm which is used with the thumbprint to identify the certificate. This parameter is optional and the default is sha1. + + String + + + DomainName + + The AD domain name. + + String + + + Restart + + Whether to restart the computer if the join operation succeeded. + + SwitchParameter + + + Credential + + The credentials (user name/password) to join the AD domain. + + PSCredential + + + UnjoinDomainCredential + + The credentials (user name/password) to unjoin the AD domain. + + PSCredential + + + JoinOption + + The join option enumeration. + + UInt32 + + + OUPath + + The OU path for AD domain join operation. + + String + + + Version + + + + String + + + + New-AzureServiceADDomainExtensionConfig + + Role + + An optional array of roles to specify the remote desktop configuration for. If not specified the AD domain configuration is applied as the default configuration for all roles. + + String[] + + + X509Certificate + + An x509 certificate that when specified will be automatically uploaded to the cloud service and used for encrypting the extension private configuration. + + X509Certificate2 + + + ThumbprintAlgorithm + + Thumbprint hashing algorithm which is used with the thumbprint to identify the certificate. This parameter is optional and the default is sha1. + + String + + + WorkgroupName + + The workgroup name. + + String + + + Restart + + Whether to restart the computer if the join operation succeeded. + + SwitchParameter + + + Credential + + The credentials (user name/password) to join the AD domain. + + PSCredential + + + + New-AzureServiceADDomainExtensionConfig + + Role + + An optional array of roles to specify the remote desktop configuration for. If not specified the AD domain configuration is applied as the default configuration for all roles. + + String[] + + + CertificateThumbprint + + A certificate thumbprint to use for encrypting the private configuration. If not specified a certificate will be created for you. This certificate has to already exist in the certificate store. + + String + + + ThumbprintAlgorithm + + Thumbprint hashing algorithm which is used with the thumbprint to identify the certificate. This parameter is optional and the default is sha1. + + String + + + WorkgroupName + + The workgroup name. + + String + + + Restart + + Whether to restart the computer if the join operation succeeded. + + SwitchParameter + + + Credential + + The credentials (user name/password) to join the AD domain. + + PSCredential + + + + New-AzureServiceADDomainExtensionConfig + + Role + + An optional array of roles to specify the remote desktop configuration for. If not specified the AD domain configuration is applied as the default configuration for all roles. + + String[] + + + CertificateThumbprint + + A certificate thumbprint to use for encrypting the private configuration. If not specified a certificate will be created for you. This certificate has to already exist in the certificate store. + + String + + + ThumbprintAlgorithm + + Thumbprint hashing algorithm which is used with the thumbprint to identify the certificate. This parameter is optional and the default is sha1. + + String + + + DomainName + + The AD domain name. + + String + + + Restart + + Whether to restart the computer if the join operation succeeded. + + SwitchParameter + + + Credential + + The credentials (user name/password) to join the AD domain. + + PSCredential + + + UnjoinDomainCredential + + The credentials (user name/password) to unjoin the AD domain. + + PSCredential + + + JoinOption + + The join option enumeration. + + UInt32 + + + OUPath + + The OU path for AD domain join operation. + + String + + + Version + + + + String + + + + New-AzureServiceADDomainExtensionConfig + + Role + + An optional array of roles to specify the remote desktop configuration for. If not specified the AD domain configuration is applied as the default configuration for all roles. + + String[] + + + CertificateThumbprint + + A certificate thumbprint to use for encrypting the private configuration. If not specified a certificate will be created for you. This certificate has to already exist in the certificate store. + + String + + + ThumbprintAlgorithm + + Thumbprint hashing algorithm which is used with the thumbprint to identify the certificate. This parameter is optional and the default is sha1. + + String + + + DomainName + + The AD domain name. + + String + + + Restart + + Whether to restart the computer if the join operation succeeded. + + SwitchParameter + + + Credential + + The credentials (user name/password) to join the AD domain. + + PSCredential + + + UnjoinDomainCredential + + The credentials (user name/password) to unjoin the AD domain. + + PSCredential + + + Options + + The unsigned integer join option. + + JoinOptions + + + OUPath + + The OU path for AD domain join operation. + + String + + + Version + + + + String + + + + + + Role + + An optional array of roles to specify the remote desktop configuration for. If not specified the AD domain configuration is applied as the default configuration for all roles. + + String[] + + String[] + + + + + + X509Certificate + + An x509 certificate that when specified will be automatically uploaded to the cloud service and used for encrypting the extension private configuration. + + X509Certificate2 + + X509Certificate2 + + + + + + ThumbprintAlgorithm + + Thumbprint hashing algorithm which is used with the thumbprint to identify the certificate. This parameter is optional and the default is sha1. + + String + + String + + + + + + DomainName + + The AD domain name. + + String + + String + + + + + + Restart + + Whether to restart the computer if the join operation succeeded. + + SwitchParameter + + SwitchParameter + + + + + + Credential + + The credentials (user name/password) to join the AD domain. + + PSCredential + + PSCredential + + + + + + UnjoinDomainCredential + + The credentials (user name/password) to unjoin the AD domain. + + PSCredential + + PSCredential + + + + + + Options + + The unsigned integer join option. + + JoinOptions + + JoinOptions + + + + + + OUPath + + The OU path for AD domain join operation. + + String + + String + + + + + + Version + + + + String + + String + + + + + + JoinOption + + The join option enumeration. + + UInt32 + + UInt32 + + + + + + WorkgroupName + + The workgroup name. + + String + + String + + + + + + CertificateThumbprint + + A certificate thumbprint to use for encrypting the private configuration. If not specified a certificate will be created for you. This certificate has to already exist in the certificate store. + + String + + String + + + + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> $extensionCfg = New-AzureServiceADDomainExtensionConfig -Role WorkerRole1 -DomainName $domain -Credential $cred -JoinOption 35; + +New-AzureDeployment -ServiceName $cloudSvc -Slot Production -Package $pkg -Configuration $config -ExtensionConfiguration $extensionCfg; + + Description + + + + ----------- + + + + + + + Unknown + + + + + + + + New-AzureServiceDiagnosticsExtensionConfig + + This cmdlet generates configuration of diagnostics extension for specified role(s) or all roles. + + + + + New + AzureServiceDiagnosticsExtensionConfig + + + + + This cmdlet generates configuration of diagnostics extension for specified role(s) or all roles. + + + + New-AzureServiceDiagnosticsExtensionConfig + + Role + + An optional array of roles to specify the diagnostics configuration for. If not specified the diagnostics configuration is applied as the default configuration for all roles. + + String[] + + + X509Certificate + + An x509 certificate that when specified will be automatically uploaded to the cloud service and used for encrypting the extension private configuration. + + X509Certificate2 + + + ThumbprintAlgorithm + + Thumbprint hashing algorithm which is used with the thumbprint to identify the certificate. This parameter is optional and the default is sha1. + + String + + + StorageContext + + + + AzureStorageContext + + + DiagnosticsConfigurationPath + + + + String + + + + New-AzureServiceDiagnosticsExtensionConfig + + Role + + An optional array of roles to specify the diagnostics configuration for. If not specified the diagnostics configuration is applied as the default configuration for all roles. + + String[] + + + CertificateThumbprint + + A certificate thumbprint to use for encrypting the private configuration. If not specified a certificate will be created for you. This certificate has to already exist in the certificate store. + + String + + + ThumbprintAlgorithm + + Thumbprint hashing algorithm which is used with the thumbprint to identify the certificate. This parameter is optional and the default is sha1. + + String + + + StorageContext + + + + AzureStorageContext + + + DiagnosticsConfigurationPath + + + + String + + + + + + Role + + An optional array of roles to specify the diagnostics configuration for. If not specified the diagnostics configuration is applied as the default configuration for all roles. + + String[] + + String[] + + + + + + X509Certificate + + An x509 certificate that when specified will be automatically uploaded to the cloud service and used for encrypting the extension private configuration. + + X509Certificate2 + + X509Certificate2 + + + + + + ThumbprintAlgorithm + + Thumbprint hashing algorithm which is used with the thumbprint to identify the certificate. This parameter is optional and the default is sha1. + + String + + String + + + + + + StorageContext + + + + AzureStorageContext + + AzureStorageContext + + + + + + DiagnosticsConfigurationPath + + + + String + + String + + + + + + CertificateThumbprint + + A certificate thumbprint to use for encrypting the private configuration. If not specified a certificate will be created for you. This certificate has to already exist in the certificate store. + + String + + String + + + + + + DiagnosticsConfiguration + + Configuration for Microsoft Azure diagnostics. The schema is: +<?xml version="1.0" encoding="utf-8"?> +<xs:schema id="DiagnosticsConfigSchema" + targetNamespace="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration" + elementFormDefault="qualified" + xmlns="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration" + xmlns:wad="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration" + xmlns:mstns="http://tempuri.org/XMLSchema.xsd" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <xs:simpleType name="PositiveDuration"> + <xs:restriction base="xs:duration"> + <xs:minInclusive value="PT0S" /> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="LogLevel"> + <xs:restriction base="xs:string"> + <xs:enumeration value="Undefined" /> + <xs:enumeration value="Verbose" /> + <xs:enumeration value="Information" /> + <xs:enumeration value="Warning" /> + <xs:enumeration value="Error" /> + <xs:enumeration value="Critical" /> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="ContainerName"> + <xs:restriction base="xs:string"> + <xs:pattern value="[a-z0-9][a-z0-9\-]{1,61}[a-z0-9]" /> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="locale"> + <xs:restriction base="xs:string"> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="displayName"> + <xs:restriction base="xs:string"> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="AbsolutePathWithEnvironmentExpansion"> + <xs:restriction base="xs:string"> + <xs:pattern value="([a-zA-Z]:\)?([^&lt;&gt;:&quot;/|?*]+)*(\)?" /> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="RelativePathWithEnvironmentExpansion"> + <xs:restriction base="xs:string"> + <xs:pattern value="([^&lt;&gt;:&quot;/\|?*]+)(\([^&lt;&gt;:&quot;/\|?*]+))*(\)?" /> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="PerformanceCounterPath"> + <xs:restriction base="xs:string"> + <xs:pattern value="\.*" /> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="EventNameType"> + <xs:restriction base="xs:string"> + <xs:pattern value="[a-zA-Z][_a-zA-Z0-9]{0,59}" /> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="CrashDumpType" > + <xs:restriction base="xs:string"> + <xs:enumeration value="Mini"/> + <xs:enumeration value="Full"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="NamedElementNameString"> + <xs:restriction base="xs:string"> + <xs:pattern value="^[a-zA-Z_][^\\/\:\*\?\&quot;\&lt;\&gt;\|]*(?&lt;![\.\s])$" /> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="format"> + <xs:restriction base="xs:string"> + <xs:enumeration value="Manifest" /> + <xs:enumeration value="EventSource" /> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="directoryQuotaPercentage"> + <xs:restriction base="xs:integer"> + <xs:minInclusive value="0"/> + <xs:maxInclusive value="100"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="guidType"> + <xs:annotation> + <xs:documentation> + A GUID. Brackets (and only brakets) before and/or after are ignored. e.g. {12345678-1234-1234-1234-123456789abc}, {12345678-1234-1234-1234-123456789abc, 12345678-1234-1234-1234-123456789abc} and 12345678-1234-1234-1234-123456789abc are valid. + </xs:documentation> + </xs:annotation> + <xs:restriction base="xs:string"> + <xs:pattern value="^(\{){0,1}[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}(\}){0,1}$"/> + </xs:restriction> + </xs:simpleType> + + <xs:attributeGroup name="BasicConfiguration"> + <xs:attribute name="scheduledTransferPeriod" type="PositiveDuration" use="optional" default="PT0S"> + <xs:annotation> + <xs:documentation> + The interval between scheduled transfers for this data, rounded up to the nearest minute. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:attributeGroup> + + <xs:attributeGroup name="ETWConfiguration"> + <xs:attribute name="scheduledTransferPeriod" type="PositiveDuration" use="optional" default="PT0S"> + <xs:annotation> + <xs:documentation> + The interval between scheduled transfers for this data, rounded up to the nearest minute. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="scheduledTransferLogLevelFilter" type="LogLevel" use="optional" default="Undefined"> + <xs:annotation> + <xs:documentation> + The minimum log severity to transfer. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="provider" type="xs:string" use="required"> + <xs:annotation> + <xs:documentation> + The provider guid or class name for event source + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="scheduledTransferKeywordFilter" type="xs:unsignedLong" use="optional" default="0" > + <xs:annotation> + <xs:documentation> + The keyword to filter by + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:attributeGroup> + + <xs:attributeGroup name="LogLevel"> + <xs:attribute name="scheduledTransferLogLevelFilter" type="LogLevel" use="optional" default="Undefined"> + <xs:annotation> + <xs:documentation> + The minimum log severity to transfer. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:attributeGroup> + + <xs:attributeGroup name="DirectoryAttributes"> + <xs:attribute name="containerName" type="wad:ContainerName" use="required"> + <xs:annotation> + <xs:documentation> + The name of the container where the content of the directory is to be transferred. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:attributeGroup> + + <xs:attributeGroup name="CrashDumpConfiguration"> + <xs:attribute name="directoryQuotaPercentage" type="directoryQuotaPercentage" use="optional" default="10"> + <xs:annotation> + <xs:documentation> + The percentage of directory quota used by crashdumps + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="dumpType" type="CrashDumpType" use="optional" default="Mini"> + <xs:annotation> + <xs:documentation> + The type of crashdump + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="containerName" type="wad:ContainerName" use="optional" default="wad-crashdumps"> + <xs:annotation> + <xs:documentation> + The blob container to store the crashdumps + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:attributeGroup> + + <xs:complexType name="LogsBase"> + <xs:attributeGroup ref="BasicConfiguration" /> + </xs:complexType> + + <xs:complexType name="EtwEventsBase"> + <xs:attributeGroup ref="ETWConfiguration" /> + </xs:complexType> + + <xs:complexType name ="CrashDumpsBase"> + <xs:attributeGroup ref="CrashDumpConfiguration"/> + </xs:complexType> + + <xs:complexType name="EtwManifestProviderConfiguration"> + <xs:complexContent> + <xs:extension base="EtwEventsBase"> + <xs:sequence> + <xs:element maxOccurs="unbounded" name="Event" minOccurs="0"> + <xs:complexType> + <xs:attribute name="id" type="xs:int" use="required"> + <xs:annotation> + <xs:documentation> + The id of the ETW event that is to be collected + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="eventDestination" type="EventNameType" use="optional"> + <xs:annotation> + <xs:documentation> + The name of the table in which the event data will be stored. If this attribute is not defined the table's name is 'Event'+'MD5 of the provider'+EventId#. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + </xs:element> + <xs:element name="DefaultEvents" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:attribute name="eventDestination" type="EventNameType" use="optional"> + <xs:annotation> + <xs:documentation> + The name of the table in which the event data will be stored. If this attribute is not defined the table's name is 'Default'+'MD5 of the provider'+EventId#. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="EtwEventSourceProviderConfiguration"> + <xs:complexContent> + <xs:extension base="EtwEventsBase"> + <xs:sequence> + <xs:element maxOccurs="unbounded" name="Event" minOccurs="0"> + <xs:complexType> + <xs:attribute name="id" type="xs:int" use="required"> + <xs:annotation> + <xs:documentation> + The id of the ETW event that is to be collected + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="eventDestination" type="EventNameType" use="optional"> + <xs:annotation> + <xs:documentation> + The name of the table in which the event data will be stored. If this attribute is not defined the table's name is 'Event'+'MD5 of the provider'+EventId#. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + </xs:element> + <xs:element name="DefaultEvents" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:attribute name="eventDestination" type="EventNameType" use="optional"> + <xs:annotation> + <xs:documentation> + The name of the table in which the event data will be stored. If this attribute is not defined the table's name is 'Default'+'MD5 of the provider'+EventId#. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="EtwProviders"> + <xs:sequence maxOccurs="unbounded"> + <xs:element name="EtwEventSourceProviderConfiguration" type="EtwEventSourceProviderConfiguration" minOccurs="0" > + <xs:annotation> + <xs:documentation> + ETW collection by event source + </xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="EtwManifestProviderConfiguration" type="EtwManifestProviderConfiguration" minOccurs="0"> + <xs:annotation> + <xs:documentation> + ETW collection by manifest + </xs:documentation> + </xs:annotation> + </xs:element> + </xs:sequence> + </xs:complexType> + + <xs:complexType name="CrashDumpConfiguration"> + <xs:attribute name="processName" type="xs:string" use="required"> + <xs:annotation> + <xs:documentation> + The name of the process to to monitor for crashes. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + + <xs:complexType name="CrashDumps"> + <xs:complexContent> + <xs:extension base="CrashDumpsBase"> + <xs:sequence maxOccurs="unbounded"> + <xs:element name="CrashDumpConfiguration" type="CrashDumpConfiguration"> + <xs:annotation> + <xs:documentation> + The crashdump to collect + </xs:documentation> + </xs:annotation> + </xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="DiagnosticInfrastructureLogs"> + <xs:complexContent> + <xs:extension base="LogsBase"> + <xs:attributeGroup ref="LogLevel" /> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + + <xs:complexType name="DirectoryBase" /> + + <xs:complexType name="DirectoryAbsolute"> + <xs:complexContent> + <xs:extension base="DirectoryBase"> + <xs:attribute name="path" type="AbsolutePathWithEnvironmentExpansion" use="required"> + <xs:annotation> + <xs:documentation> + The absolute path to the directory to monitor. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="expandEnvironment" type="xs:boolean" use="required"> + <xs:annotation> + <xs:documentation> + If true, then environment variables in the path will be expanded. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="DirectoryLocalResource"> + <xs:complexContent> + <xs:extension base="DirectoryBase"> + <xs:attribute name="relativePath" type="RelativePathWithEnvironmentExpansion" use="required"> + <xs:annotation> + <xs:documentation> + The path relative to the local resource to monitor. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="name" type="NamedElementNameString" use="required"> + <xs:annotation> + <xs:documentation> + The local resource that contains the directory to monitor. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="DirectoryConfiguration"> + <xs:choice> + <xs:element name="Absolute" type="DirectoryAbsolute"> + <xs:annotation> + <xs:documentation> + The absolute path to the directory to monitor. + </xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="LocalResource" type="DirectoryLocalResource"> + <xs:annotation> + <xs:documentation> + The path relative to a local resource to monitor. + </xs:documentation> + </xs:annotation> + </xs:element> + </xs:choice> + <xs:attributeGroup ref="DirectoryAttributes" /> + </xs:complexType> + + <xs:complexType name="SpecialLogDirectory"> + <xs:attributeGroup ref="DirectoryAttributes" /> + </xs:complexType> + + <xs:complexType name="DataSources"> + <xs:sequence> + <xs:element name="DirectoryConfiguration" type="DirectoryConfiguration" maxOccurs="unbounded"> + <xs:annotation> + <xs:documentation> + The directory of log files to monitor. + </xs:documentation> + </xs:annotation> + </xs:element> + </xs:sequence> + </xs:complexType> + + <xs:complexType name="Directories"> + <xs:complexContent> + <xs:extension base="LogsBase"> + <xs:all> + <xs:element name="IISLogs" type="SpecialLogDirectory" minOccurs="0"> + <xs:annotation> + <xs:documentation> + The IIS log directory. + </xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="FailedRequestLogs" type="SpecialLogDirectory" minOccurs="0"> + <xs:annotation> + <xs:documentation> + The failed request log directory. + </xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="DataSources" type="DataSources" minOccurs="0"> + <xs:annotation> + <xs:documentation> + Additional log directories. + </xs:documentation> + </xs:annotation> + </xs:element> + </xs:all> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="annotation"> + <xs:attribute name="displayName" type="displayName" use="required"> + <xs:annotation> + <xs:documentation> + The display name for the performance counter. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="locale" type="locale" use="optional" default="en-US"> + <xs:annotation> + <xs:documentation> + The locale for the performance counter diplay name. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + + <xs:complexType name="PerformanceCounterConfiguration"> + <xs:sequence minOccurs="0"> + <xs:element maxOccurs="unbounded" name="annotation" type="annotation"> + <xs:annotation> + <xs:documentation> + The display name and locale for the performance counter + </xs:documentation> + </xs:annotation> + </xs:element> + </xs:sequence> + <xs:attribute name="counterSpecifier" type="PerformanceCounterPath" use="required"> + <xs:annotation> + <xs:documentation> + The path to the performance counter to collect. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="sampleRate" type="PositiveDuration" use="required"> + <xs:annotation> + <xs:documentation> + The rate at which the performance counter should be sampled. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="unit" type="xs:string" use="optional"> + <xs:annotation> + <xs:documentation> + The unit for the performance counter for display purposes. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + + <xs:complexType name="PerformanceCounters"> + <xs:complexContent> + <xs:extension base="LogsBase"> + <xs:sequence maxOccurs="unbounded"> + <xs:element name="PerformanceCounterConfiguration" type="PerformanceCounterConfiguration"> + <xs:annotation> + <xs:documentation> + The performance counter to collect. + </xs:documentation> + </xs:annotation> + </xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + + + <xs:complexType name="DataSource"> + <xs:attribute name="name" type="xs:string" use="required"> + <xs:annotation> + <xs:documentation> + An XPath expression specifying the logs to collect. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + + <xs:complexType name="WindowsEventLog"> + <xs:complexContent> + <xs:extension base="LogsBase"> + <xs:sequence maxOccurs="unbounded"> + <xs:element name="DataSource" type="DataSource"> + <xs:annotation> + <xs:documentation> + The event log to monitor. + </xs:documentation> + </xs:annotation> + </xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="DiagnosticMonitorConfiguration"> + <xs:all> + <xs:element name="DiagnosticInfrastructureLogs" type="DiagnosticInfrastructureLogs" minOccurs="0"> + <xs:annotation> + <xs:documentation> + Configures the logs generated by the underlying diagnostics infrastructure. The diagnostic infrastructure logs are useful for troubleshooting the diagnostics system itself. + </xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="Directories" type="Directories" minOccurs="0"> + <xs:annotation> + <xs:documentation> + Describes the configuration of a directory to which file-based logs are written. + </xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="PerformanceCounters" type="PerformanceCounters" minOccurs="0"> + <xs:annotation> + <xs:documentation> + Configures performance counter collection. + </xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="WindowsEventLog" type="WindowsEventLog" minOccurs="0"> + <xs:annotation> + <xs:documentation> + Configures Windows event log collection. + </xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="EtwProviders" type="EtwProviders" minOccurs="0"> + <xs:annotation> + <xs:documentation> + Configures ETW event collection. + </xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="CrashDumps" type="CrashDumps" minOccurs="0"> + <xs:annotation> + <xs:documentation> + Configures crashdump collection. + </xs:documentation> + </xs:annotation> + </xs:element> + </xs:all> + + <xs:attribute name="overallQuotaInMB" type="xs:unsignedInt" use="optional" default="5120"> + <xs:annotation> + <xs:documentation> + The total amount of file system storage allocated for all logging buffers. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="useProxyServer" type="xs:boolean" use="optional" default="true"> + <xs:annotation> + <xs:documentation> + Force the Monitoring Agent to use the specified IE proxy server if specified. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + + <xs:element name="PublicConfig"> + <xs:complexType> + <xs:all> + <xs:element name="WadCfg"> + <xs:complexType> + <xs:sequence> + <xs:element name="DiagnosticMonitorConfiguration" type="DiagnosticMonitorConfiguration" minOccurs="1" maxOccurs="1" /> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="LocalResourceDirectory" minOccurs="0" maxOccurs="1" type="DirectoryAbsolute" /> + <xs:element name="StorageAccount" minOccurs="0" maxOccurs="1" type="xs:string" /> + </xs:all> + </xs:complexType> + </xs:element> +</xs:schema> + + xmldocument + + xmldocument + + + + + + StorageAccountName + + The name of the storage account diagnostics will use to store diagnostics data such as performance counter data and file logs. + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> $wadConfig = New-AzureServiceDiagnosticExtensionConfig -StorageAccountName $name -DiagnosticConfiguration $wadConfigXML + + Description + + + + -----------Creates an object that has the service extension object default for all roles that will be installed with the deployment and the role configuration. + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> $wadConfig = New-AzureServiceDiagnosticExtensionConfig -StorageAccountName $name -DiagnosticConfiguration $wadConfigXML -Role "WebRole1" + + Description + + + + -----------Creates an object that has the service extension object for a specific role that will be installed with the deployment and the role configuration. + + + + + + + Unknown + + + + + + + + New-AzureServiceExtensionConfig + + This cmdlet creates a cloud service extension configuration for a deployment. + + + + + New + AzureServiceExtensionConfig + + + + + This cmdlet creates a cloud service extension configuration for a deployment. + + + + New-AzureServiceExtensionConfig + + Role + + An optional array of roles to specify the remote desktop configuration for. If not specified the remote desktop configuration is applied as the default configuration for all roles. + + String[] + + + X509Certificate + + An x509 certificate that when specified will be automatically uploaded to the cloud service and used for encrypting the extension private configuration. + + X509Certificate2 + + + ThumbprintAlgorithm + + Thumbprint hashing algorithm which is used with the thumbprint to identify the certificate. This parameter is optional and the default is sha1. + + String + + + ExtensionName + + + + String + + + ProviderNamespace + + The Extension's Provider Namespace. + + String + + + PublicConfiguration + + The public configuration text. + + String + + + PrivateConfiguration + + The private configuration text. + + String + + + Version + + The Extension Version. + + String + + + + New-AzureServiceExtensionConfig + + Role + + An optional array of roles to specify the remote desktop configuration for. If not specified the remote desktop configuration is applied as the default configuration for all roles. + + String[] + + + CertificateThumbprint + + A certificate thumbprint to use for encrypting the private configuration. If not specified a certificate will be created for you. This certificate has to already exist in the certificate store. + + String + + + ThumbprintAlgorithm + + Thumbprint hashing algorithm which is used with the thumbprint to identify the certificate. This parameter is optional and the default is sha1. + + String + + + ExtensionName + + + + String + + + ProviderNamespace + + The Extension's Provider Namespace. + + String + + + PublicConfiguration + + The public configuration text. + + String + + + PrivateConfiguration + + The private configuration text. + + String + + + Version + + The Extension Version. + + String + + + + + + Role + + An optional array of roles to specify the remote desktop configuration for. If not specified the remote desktop configuration is applied as the default configuration for all roles. + + String[] + + String[] + + + + + + X509Certificate + + An x509 certificate that when specified will be automatically uploaded to the cloud service and used for encrypting the extension private configuration. + + X509Certificate2 + + X509Certificate2 + + + + + + ThumbprintAlgorithm + + Thumbprint hashing algorithm which is used with the thumbprint to identify the certificate. This parameter is optional and the default is sha1. + + String + + String + + + + + + ExtensionName + + + + String + + String + + + + + + ProviderNamespace + + The Extension's Provider Namespace. + + String + + String + + + + + + PublicConfiguration + + The public configuration text. + + String + + String + + + + + + PrivateConfiguration + + The private configuration text. + + String + + String + + + + + + Version + + The Extension Version. + + String + + String + + + + + + CertificateThumbprint + + A certificate thumbprint to use for encrypting the private configuration. If not specified a certificate will be created for you. This certificate has to already exist in the certificate store. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> New-AzureServiceExtensionConfig -ExtensionName 'RDP' -Version '1.0' -ProviderNamespace Microsoft.Windows.Azure.Extensions -PublicConfiguration $p1 -PrivateConfiguration $p2; + + Description + + + + -----------Create the Remote Desktop Extension configuration in version 1.0 for all roles in the cloud service. + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> New-AzureServiceExtensionConfig -Role WebRole1 -ExtensionName 'RDP' -ProviderNamespace Microsoft.Windows.Azure.Extensions -PublicConfiguration $p1 -PrivateConfiguration $p2; + + Description + + + + -----------Create the Remote Desktop Extension configuration for the 'WebRole1' role in the cloud service. + + + + + + + Unknown + + + + + + + + New-AzureServiceRemoteDesktopExtensionConfig + + This cmdlets generates configuration of remote desktop extension for any deployment. + + + + + New + AzureServiceRemoteDesktopExtensionConfig + + + + + This cmdlets generates configuration of remote desktop extension for any deployment. + + + + New-AzureServiceRemoteDesktopExtensionConfig + + Role + + An optional array of roles to specify the remote desktop configuration for. If not specified the remote desktop configuration is applied as the default configuration for all roles. + + String[] + + + X509Certificate + + An x509 certificate that when specified will be automatically uploaded to the cloud service and used for encrypting the extension private configuration. + + X509Certificate2 + + + ThumbprintAlgorithm + + Thumbprint hashing algorithm which is used with the thumbprint to identify the certificate. This parameter is optional and the default is sha1. + + String + + + Credential + + The credentials (user name/password) to enable for remote desktop. + + PSCredential + + + Expiration + + A date time object that allows the user to specify when the user account will expire. + + DateTime + + + Version + + + + String + + + + New-AzureServiceRemoteDesktopExtensionConfig + + Role + + An optional array of roles to specify the remote desktop configuration for. If not specified the remote desktop configuration is applied as the default configuration for all roles. + + String[] + + + CertificateThumbprint + + A certificate thumbprint to use for encrypting the private configuration. If not specified a certificate will be created for you. This certificate has to already exist in the certificate store. + + String + + + ThumbprintAlgorithm + + Thumbprint hashing algorithm which is used with the thumbprint to identify the certificate. This parameter is optional and the default is sha1. + + String + + + Credential + + The credentials (user name/password) to enable for remote desktop. + + PSCredential + + + Expiration + + A date time object that allows the user to specify when the user account will expire. + + DateTime + + + Version + + + + String + + + + + + Role + + An optional array of roles to specify the remote desktop configuration for. If not specified the remote desktop configuration is applied as the default configuration for all roles. + + String[] + + String[] + + + + + + X509Certificate + + An x509 certificate that when specified will be automatically uploaded to the cloud service and used for encrypting the extension private configuration. + + X509Certificate2 + + X509Certificate2 + + + + + + ThumbprintAlgorithm + + Thumbprint hashing algorithm which is used with the thumbprint to identify the certificate. This parameter is optional and the default is sha1. + + String + + String + + + + + + Credential + + The credentials (user name/password) to enable for remote desktop. + + PSCredential + + PSCredential + + + + + + Expiration + + A date time object that allows the user to specify when the user account will expire. + + DateTime + + DateTime + + + + + + Version + + + + String + + String + + + + + + CertificateThumbprint + + A certificate thumbprint to use for encrypting the private configuration. If not specified a certificate will be created for you. This certificate has to already exist in the certificate store. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> $rdpConfig = New-AzureServiceRemoteDesktopExtensionConfig -Credential $cred + + Description + + + + -----------Creates an object that has the service extension object default for all roles that will be installed with the deployment and the role configuration. + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> $rdpConfig = New-AzureServiceRemoteDesktopExtensionConfig -Credential $cred -Role "WebRole1" + + Description + + + + -----------Creates an object that has the service extension object for a specific role that will be installed with the deployment and the role configuration. + + + + + + + Unknown + + + + + + + + New-AzureSSHKey + + Creates a SSH Key object to insert an existing certificate into new Linux-based Microsoft Azure virtual machines. + + + + + New + AzureSSHKey + + + + + The New-AzureSSHKey cmdlet creates an SSH Key object for a certificate that has already been added to Microsoft Azure. This SSH Key object can then be used by New-AzureProvisioningConfig when creating the configuration object for a new virtual machine using New-AzureVM, or when creating a new virtual machine with New-AzureQuickVM. When included as part of a virtual machine creation script, this adds the specified SSH Public Key or Key Pair to the new virtual machine. + + + + New-AzureSSHKey + + KeyPair + + When specified, creates an object for inserting an SSH Key Pair into the new virtual machine configuration. + + SwitchParameter + + + Fingerprint + + Specifies the fingerprint of the certificate. + + String + + + Path + + Specifies the path to store the SSH Public Key or Key Pair. + + String + + + + New-AzureSSHKey + + PublicKey + + When specified, creates an object for inserting an SSH Public Key into the new virtual machine configuration. + + SwitchParameter + + + Fingerprint + + Specifies the fingerprint of the certificate. + + String + + + Path + + Specifies the path to store the SSH Public Key or Key Pair. + + String + + + + + + KeyPair + + When specified, creates an object for inserting an SSH Key Pair into the new virtual machine configuration. + + SwitchParameter + + SwitchParameter + + + + + + Fingerprint + + Specifies the fingerprint of the certificate. + + String + + String + + + + + + Path + + Specifies the path to store the SSH Public Key or Key Pair. + + String + + String + + + + + + PublicKey + + When specified, creates an object for inserting an SSH Public Key into the new virtual machine configuration. + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>$myLxCert = New-AzureSSHKey –Fingerprint "D7BECD4D63EBAF86023BB4F1A5FBF5C2C924902A" –Path "/home/username/.ssh/authorized_keys" + + This command creates a certificate setting object for an existing certificate and then stores the object in a variable for later use. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> C:\PS>Add-AzureCertificate –ServiceName "MySvc" –CertToDeploy "C:\temp\MyLxCert.cer" + C:\PS>$myLxCert = New-AzureSSHKey –Fingerprint "D7BECD4D63EBAF86023BB4F1A5FBF5C2C924902A" –Path "/home/username/.ssh/authorized_keys" + C:\PC>New-AzureVMConfig -Name "MyVM2" -InstanceSize Small -ImageName $LxImage ` + | Add-AzureProvisioningConfig -Linux -LinuxUser $lxUser -SSHPublicKeys $myLxCert -Password 'pass@word1' ` + | New-AzureVM -ServiceName "MySvc" + + This command adds a certificate to the Microsoft Azure service, and then creates a new Linux virtual machine that uses the certificate. + + + + + + + + + + + Add-AzureProvisioningConfig + + + + New-AzureVMConfig + + + + New-AzureVM + + + + New-AzureQuickVM + + + + + + + + New-AzureStorageAccount + + Creates a new storage account in a Microsoft Azure subscription. + + + + + New + AzureStorageAccount + + + + + The New-AzureStorageAccount cmdlet creates an account that provides access to Microsoft Azure storage services. A storage account is a globally unique resource within the storage system. The account is the parent namespace for the Blob, Queue, and Table services. + + + + New-AzureStorageAccount + + StorageAccountName + + Specifies a name for the storage account. The storage account name must be unique to Microsoft Azure and must be between 3 and 24 characters in length and use lowercase letters and numbers only. + + String + + + Label + + Specifies a label for the storage account. The label may be up to 100 characters in length. + + String + + + Description + + Specifies a description for the storage account. The description may be up to 1024 characters in length. + + String + + + AffinityGroup + + Specifies the name of an existing affinity group in the current subscription. You can specify either a Location or an AffinityGroup parameter, but not both. + + String + + + Type + + Specifies the type of the storage account. Valid values are + Standard_LRS + Standard_ZRS + Standard_GRS + Standard_RAGRS + + If this parameter is not specified, a default value of Standard_GRS is used + + Note: + Standard_ZRS accounts cannot be changed to other account types, and vice versa. + + String + + + + New-AzureStorageAccount + + StorageAccountName + + Specifies a name for the storage account. The storage account name must be unique to Microsoft Azure and must be between 3 and 24 characters in length and use lowercase letters and numbers only. + + String + + + Label + + Specifies a label for the storage account. The label may be up to 100 characters in length. + + String + + + Description + + Specifies a description for the storage account. The description may be up to 1024 characters in length. + + String + + + Location + + Specifies the Microsoft Azure data center location where the storage account is created. You can include either a Location or an AffinityGroup parameter, but not both. + + String + + + Type + + Specifies the type of the storage account. Valid values are + Standard_LRS + Standard_ZRS + Standard_GRS + Standard_RAGRS + + If this parameter is not specified, a default value of Standard_GRS is used + + Note: + Standard_ZRS accounts cannot be changed to other account types, and vice versa. + + String + + + + + + StorageAccountName + + Specifies a name for the storage account. The storage account name must be unique to Microsoft Azure and must be between 3 and 24 characters in length and use lowercase letters and numbers only. + + String + + String + + + + + + Label + + Specifies a label for the storage account. The label may be up to 100 characters in length. + + String + + String + + + + + + Description + + Specifies a description for the storage account. The description may be up to 1024 characters in length. + + String + + String + + + + + + AffinityGroup + + Specifies the name of an existing affinity group in the current subscription. You can specify either a Location or an AffinityGroup parameter, but not both. + + String + + String + + + + + + Type + + Specifies the type of the storage account. Valid values are + Standard_LRS + Standard_ZRS + Standard_GRS + Standard_RAGRS + + If this parameter is not specified, a default value of Standard_GRS is used + + Note: + Standard_ZRS accounts cannot be changed to other account types, and vice versa. + + String + + String + + + + + + Location + + Specifies the Microsoft Azure data center location where the storage account is created. You can include either a Location or an AffinityGroup parameter, but not both. + + String + + String + + + + + + PipelineVariable + + Not Specified + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> New-AzureStorageAccount -StorageAccountName "azure1" -Label "AzureOne" -AffinityGroup "prodapps" + + Description + + + + -----------Creates a new storage account named "azure1" and assigns it to the "prodapps" affinity group. + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> New-AzureStorageAccount -StorageAccountName "azuretwo" -Label "AzureTwo" -Location "North Central US" + + Description + + + + -----------Creates a new storage account named "azuretwo" in the "North Central US" data center location. + + + + + + + Unknown + + + + + + + + New-AzureStorageKey + + Regenerates storage keys for a Microsoft Azure storage account. + + + + + New + AzureStorageKey + + + + + The New-AzureStorageKey cmdlet regenerates the primary or secondary key for a Microsoft Azure storage account. It returns an object with the storage account name, primary key, and secondary key as properties. + + + + New-AzureStorageKey + + KeyType + + Specifies which key to regenerate. Supported values are "Primary" and "Secondary". + + String + + + StorageAccountName + + Specifies the name of the Microsoft Azure storage account to regenerate a key for. + + String + + + + + + KeyType + + Specifies which key to regenerate. Supported values are "Primary" and "Secondary". + + String + + String + + + + + + StorageAccountName + + Specifies the name of the Microsoft Azure storage account to regenerate a key for. + + String + + String + + + + + + + + + + + + + + + + + + + + + StorageServiceKeys + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> New-AzureStorageKey –KeyType "Primary" –StorageAccountName "mystore1" + + This command regenerate the primary storage key for the "mystore1" storage account. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> $myStoreKey = New-AzureStorageKey –KeyType "Secondary" –StorageAccountName "mystore1" + + This command regenerate the secondary storage key for the "mystore1" storage account and stores the updated storage account key information in $myStoreKey. + + + + + + + + + + + + + + + New-AzureVM + + Creates a new Microsoft Azure virtual machine. + + + + + New + AzureVM + + + + + The New-AzureVM cmdlet adds a new virtual machine to an existing Microsoft Azure service, or creates a new virtual machine and service in the current subscription if either the -Location or -AffinityGroup is specified. + + + + New-AzureVM + + ServiceName + + Specifies the new or existing service name. + + If the service does not exist, this parameter will create it for you. Use the -Location or -AffinityGroup parameter to specify where to create the service. + If the service exists, the -Location or -AffinityGroup parameter is not needed. + + String + + + DeploymentLabel + + Specifies a label for the deployment + + String + + + DeploymentName + + Specifies a deployment name. If not specified, the service name will be used as the deployment name. + + String + + + VNetName + + Specifies the virtual network name where the new virtual machine will be deployed. + + String + + + DnsSettings + + Specifies a DNS Server object that defines the DNS settings for the new deployment. + + DnsServer[] + + + InternalLoadBalancerConfig + + Not Specified + + InternalLoadBalancerConfig + + + VMs + + A list of virtual machine objects to create. + + PersistentVM[] + + + WaitForBoot + + Waits for VM to reach "ReadyRole" state. Cmdlet fails if VM falls in one of the following states while waiting: "FailedStartingVM", "ProvisioningFailed", "ProvisioningTimeout". + + SwitchParameter + + + ReservedIPName + + Reserved IP Name. + + String + + + + New-AzureVM + + ServiceName + + Specifies the new or existing service name. + + If the service does not exist, this parameter will create it for you. Use the -Location or -AffinityGroup parameter to specify where to create the service. + If the service exists, the -Location or -AffinityGroup parameter is not needed. + + String + + + Location + + Specifies the location where the new service will be hosted. This parameter should not be used if you are using a service that already exists. + + String + + + AffinityGroup + + Specifies the Microsoft Azure affinity group the cloud service will reside in. Only valid when creating a new cloud service. + + String + + + ServiceLabel + + Specifies a label for the new service. + + String + + + ReverseDnsFqdn + + + + String + + + ServiceDescription + + Specifies a description for the new service. + + String + + + DeploymentLabel + + Specifies a label for the deployment + + String + + + DeploymentName + + Specifies a deployment name. If not specified, the service name will be used as the deployment name. + + String + + + VNetName + + Specifies the virtual network name where the new virtual machine will be deployed. + + String + + + DnsSettings + + Specifies a DNS Server object that defines the DNS settings for the new deployment. + + DnsServer[] + + + InternalLoadBalancerConfig + + Not Specified + + InternalLoadBalancerConfig + + + VMs + + A list of virtual machine objects to create. + + PersistentVM[] + + + WaitForBoot + + Waits for VM to reach "ReadyRole" state. Cmdlet fails if VM falls in one of the following states while waiting: "FailedStartingVM", "ProvisioningFailed", "ProvisioningTimeout". + + SwitchParameter + + + ReservedIPName + + Reserved IP Name. + + String + + + + + + ServiceName + + Specifies the new or existing service name. + + If the service does not exist, this parameter will create it for you. Use the -Location or -AffinityGroup parameter to specify where to create the service. + If the service exists, the -Location or -AffinityGroup parameter is not needed. + + String + + String + + + + + + DeploymentLabel + + Specifies a label for the deployment + + String + + String + + + + + + DeploymentName + + Specifies a deployment name. If not specified, the service name will be used as the deployment name. + + String + + String + + + + + + VNetName + + Specifies the virtual network name where the new virtual machine will be deployed. + + String + + String + + + + + + DnsSettings + + Specifies a DNS Server object that defines the DNS settings for the new deployment. + + DnsServer[] + + DnsServer[] + + + + + + InternalLoadBalancerConfig + + Not Specified + + InternalLoadBalancerConfig + + InternalLoadBalancerConfig + + + + + + VMs + + A list of virtual machine objects to create. + + PersistentVM[] + + PersistentVM[] + + + + + + WaitForBoot + + Waits for VM to reach "ReadyRole" state. Cmdlet fails if VM falls in one of the following states while waiting: "FailedStartingVM", "ProvisioningFailed", "ProvisioningTimeout". + + SwitchParameter + + SwitchParameter + + + + + + ReservedIPName + + Reserved IP Name. + + String + + String + + + + + + Location + + Specifies the location where the new service will be hosted. This parameter should not be used if you are using a service that already exists. + + String + + String + + + + + + AffinityGroup + + Specifies the Microsoft Azure affinity group the cloud service will reside in. Only valid when creating a new cloud service. + + String + + String + + + + + + ServiceLabel + + Specifies a label for the new service. + + String + + String + + + + + + ReverseDnsFqdn + + + + String + + String + + + + + + ServiceDescription + + Specifies a description for the new service. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> New-AzureVMConfig -Name "MyNewVM" -InstanceSize ExtraSmall -ImageName (Get-AzureVMImage)[4].ImageName ` + | Add-AzureProvisioningConfig -Windows -Password $adminPassword -AdminUsername PsTestAdmin` + | New-AzureVM -ServiceName "MySvc2" -AffinityGroup "Contoso" -WaitForBoot + + Description + + + + -----------This example creates a new Microsoft Azure virtual machine, "MyNewVM", and a new Microsoft Azure service, "MySvc2". Optional WaitForBoot flag blocks New-AzureVM till the VM boots. + Description + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> New-AzureVMConfig -Name "MySUSEVM2" -InstanceSize ExtraSmall -ImageName (Get-AzureVMImage)[7].ImageName ` + | Add-AzureProvisioningConfig -Linux -LinuxUser $lxUser -Password $adminPassword -AdminUsername PsTestAdmin` + | New-AzureVM + + Description + + + + -----------This example adds a new Linux virtual machine to an existing service. + + + + + -------------------------- EXAMPLE 3 -------------------------- + + + + PS C:\> $Images = Get-AzureVMImage + $myImage = $Images[4] + $myVM = New-AzureVMConfig -Name "MyVM2" -InstanceSize ExtraSmall -ImageName $myImage.ImageName ` + | Add-AzureProvisioningConfig -Windows -Password $adminPassword ` + | Add-AzureDataDisk -CreateNew -DiskSizeInGB 50 -DiskLabel "DataDisk50" -LUN 0 + + Description + + + + -----------This example builds a new virtual machine configuration and then creates the virtual machine with New-AzureVM. + + + + + -------------------------- EXAMPLE 4 -------------------------- + + + + PS C:\> New-AzureVMConfig -Name "MyNewVM" -InstanceSize ExtraSmall -ImageName (Get-AzureVMImage)[4].ImageName ` + | Add-AzureProvisioningConfig -Windows -Password $adminPassword -AdminUsername PsTestAdmin` + | New-AzureVM -ServiceName "MySvc2" -AffinityGroup "Contoso" -ReservedIPName $ipName + + Description + + + + -----------This example creates a new Microsoft Azure virtual machine, "MyNewVM", and a new Microsoft Azure service, "MySvc2", using a reserved IP on the VM deployment + + + + + + + Unknown + + + + + + + + + + New-AzureVMConfig + + + Creates a new Windows Azure virtual machine configuration object. + + + + + New + AzureVMConfig + + + + The New-AzureVMConfig cmdlet creates a new virtual machine configuration object. This object can then be used to perform a new deployment, as well as to add a new virtual machine to an existing deployment. + + + + + New-AzureVMConfig + + Name + + Specifies the name of the virtual machine. + + string + + + InstanceSize + + Specifies the size of the instance. Allowed values are ExtraSmall, Small, Medium, Large, ExtraLarge, A5, A6, A7, A8, A9, Basic_A0, Basic_A1, Basic_A2, Basic_A3, Basic_A4, Standard_D1, Standard_D2, Standard_D3, Standard_D4, Standard_D11, Standard_D12, Standard_D13, Standard_D14. + + string + + + HostCaching + + Specifies the host caching mode for the operating system disk. Supported values are: "ReadOnly" and "ReadWrite". + + string + + + AvailabilitySetName + + Specifies the name of the availability set. + + string + + + Label + + Specifies a label to assign to the virtual machine. + + string + + + DiskName + + Specifies a name for the operating system disk. + + string + + + MediaLocation + + Specifies the Windows Azure storage location for the new virtual machine disk. + + string + + + PipelineVariable + + Not Specified + + string + + + + New-AzureVMConfig + + Name + + Specifies the name of the virtual machine. + + string + + + InstanceSize + + Specifies the size of the instance. Allowed values are ExtraSmall, Small, Medium, Large, ExtraLarge, A5, A6, A7, A8, A9, Basic_A0, Basic_A1, Basic_A2, Basic_A3, Basic_A4, Standard_D1, Standard_D2, Standard_D3, Standard_D4, Standard_D11, Standard_D12, Standard_D13, Standard_D14. + + string + + + HostCaching + + Specifies the host caching mode for the operating system disk. Supported values are: "ReadOnly" and "ReadWrite". + + string + + + AvailabilitySetName + + Specifies the name of the availability set. + + string + + + Label + + Specifies a label to assign to the virtual machine. + + string + + + ImageName + + Specifies the name of the virtual machine image to use for the operating system disk. + + string + + + DiskLabel + + Specifies a label for the operating system disk. + + string + + + MediaLocation + + Specifies the Windows Azure storage location for the new virtual machine disk. + + string + + + PipelineVariable + + Not Specified + + string + + + + + + + AvailabilitySetName + + Specifies the name of the availability set. + + + string + + string + + + + + + DiskLabel + + Specifies a label for the operating system disk. + + + string + + string + + + + + + DiskName + + Specifies a name for the operating system disk. + + + string + + string + + + + + + HostCaching + + Specifies the host caching mode for the operating system disk. Supported values are: "ReadOnly" and "ReadWrite". + + + string + + string + + + + + + ImageName + + Specifies the name of the virtual machine image to use for the operating system disk. + + + string + + string + + + + + + InstanceSize + + Specifies the size of the instance. Allowed values are ExtraSmall, Small, Medium, Large, ExtraLarge, A5, A6, A7, A8, A9, Basic_A0, Basic_A1, Basic_A2, Basic_A3, Basic_A4, Standard_D1, Standard_D2, Standard_D3, Standard_D4, Standard_D11, Standard_D12, Standard_D13, Standard_D14. + + + string + + string + + + + + + Label + + Specifies a label to assign to the virtual machine. + + + string + + string + + + + + + MediaLocation + + Specifies the Windows Azure storage location for the new virtual machine disk. + + + string + + string + + + + + + Name + + Specifies the name of the virtual machine. + + + string + + string + + + + + + PipelineVariable + + Not Specified + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + C:\PS> + + + + + Description + ----------- + + Description + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + C:\PS> + + + + + Description + ----------- + + Description + + + + + + + + + + + + + + + + + + + + + + + + + + + + New-AzureVMImageDiskConfigSet + + This cmdlet returns a new object for disk configuration set, which would be passed to the image update cmdlet. It encapsulates the OSDiskConfig and the DataDiskConfig object. Use the Set-AzureVMImageOSDiskConfig and Set-AzureVMImageDataDiskConfig cmdlets to set the OS Disk and Data Disk properties for the VM Image. + + + + + New + AzureVMImageDiskConfigSet + + + + + This cmdlet returns a new object for disk configuration set, which would be passed to the image update cmdlet. It encapsulates the OSDiskConfig and the DataDiskConfig object. Use the Set-AzureVMImageOSDiskConfig and Set-AzureVMImageDataDiskConfig cmdlets to set the OS Disk and Data Disk properties for the VM Image. + + + + New-AzureVMImageDiskConfigSet + + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.ServiceManagement.Model.VirtualMachineImageDiskConfigSet + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> $s = New-AzureDiskConfigSet + # returns DiskConfigSet object; + + $s = Set-AzureOSDiskConfig -DiskConfig $s -HostCaching ReadWrite + # returns DiskConfigSet object; + + $s = Set-AzureDataDiskConfig -DiskConfig $s -Name 'test' -HostCaching 'ReadWrite' -LUN 0 + # returns DiskConfigSet object + + # Final step - Update the VM Image + + Update-AzureVMImage -ImageName testvmimage2 -Label test1 -Description test1 -DiskConfigSet $s; + + # OR + + $s | Update-AzureVMImage -ImageName testvmimage2 -Label test1 -Description test1; + + Description + + + + ----------- + + + + + + + Unknown + + + + + + + + New-AzureVNetGateway + + Creates a new Microsoft Azure Virtual Network Gateway to the specified Microsoft Azure virtual network. + + + + + New + AzureVNetGateway + + + + + The New-AzureVNetGateway cmdlet creates a new virtual network gateway for the specified Microsoft Azure virtual network. A virtual network gateway is a VPN endpoint for connecting to a Microsoft Azure virtual network.After the virtual network gateway has been created, you can get the shared key to allow you to configure the VPN device at the local network site to authenticate to the gateway with the Get-AzureVNetGatewayKey cmdlet. + + + + New-AzureVNetGateway + + VNetName + + Specifies the name of the virtual network for which the gateway is created. + + String + + + GatewayType + + + + GatewayType + + + + + + VNetName + + Specifies the name of the virtual network for which the gateway is created. + + String + + String + + + + + + GatewayType + + + + GatewayType + + GatewayType + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>New-AzureVNetGateway –VNetName "MyProdNet" + + This command creates a new VPN endpoint for the "MyProdNet" network. + + + + + + + + + + + + + + + Publish-AzureVMDscConfiguration + + Uploads a Desired State Configuration script to Azure blob storage, which later can be applied to Azure Virtual Machines using the Set-AzureVMDscExtension cmdlet. + + + + + Publish + AzureVMDscConfiguration + + + + + Uploads a Desired State Configuration script to Azure blob storage, which later can be applied to Azure Virtual Machines using the Set-AzureVMDscExtension cmdlet. + + + + Publish-AzureVMDscConfiguration + + ConfigurationPath + + Path to a file containing one or more configurations. The file can be a PowerShell script (.ps1 file), module (.psm1 file), or an archive (.zip file) containing a set of PowerShell modules, each module in a separate directory. + + String + + + ContainerName + + Name of the Azure Storage Container the configuration is uploaded to. + + String + + + Force + + By default Publish-AzureVMDscConfiguration will not overwrite any existing blobs or files. Use -Force to overwrite them. + + SwitchParameter + + + StorageContext + + The Azure Storage Context that provides the security settings used to upload the configuration script to the container specified by ContainerName. This context should provide write access to the container. + + AzureStorageContext + + + WhatIf + + Describes what would happen if you executed the command without actually executing the command. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before executing the command. + + SwitchParameter + + + + Publish-AzureVMDscConfiguration + + ConfigurationPath + + Path to a file containing one or more configurations. The file can be a PowerShell script (.ps1 file), module (.psm1 file), or an archive (.zip file) containing a set of PowerShell modules, each module in a separate directory. + + String + + + Force + + By default Publish-AzureVMDscConfiguration will not overwrite any existing blobs or files. Use -Force to overwrite them. + + SwitchParameter + + + ConfigurationArchivePath + + Path to a local ZIP file to write the configuration archive to. +When this parameter is used, the configuration script is not uploaded to Azure blob storage. + + String + + + WhatIf + + Describes what would happen if you executed the command without actually executing the command. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before executing the command. + + SwitchParameter + + + + + + ConfigurationPath + + Path to a file containing one or more configurations. The file can be a PowerShell script (.ps1 file), module (.psm1 file), or an archive (.zip file) containing a set of PowerShell modules, each module in a separate directory. + + String + + String + + + + + + ContainerName + + Name of the Azure Storage Container the configuration is uploaded to. + + String + + String + + + windows-powershell-dsc + + + Force + + By default Publish-AzureVMDscConfiguration will not overwrite any existing blobs or files. Use -Force to overwrite them. + + SwitchParameter + + SwitchParameter + + + + + + StorageContext + + The Azure Storage Context that provides the security settings used to upload the configuration script to the container specified by ContainerName. This context should provide write access to the container. + + AzureStorageContext + + AzureStorageContext + + + + + + WhatIf + + Describes what would happen if you executed the command without actually executing the command. + + SwitchParameter + + SwitchParameter + + + + + + Confirm + + Prompts you for confirmation before executing the command. + + SwitchParameter + + SwitchParameter + + + + + + ConfigurationArchivePath + + Path to a local ZIP file to write the configuration archive to. +When this parameter is used, the configuration script is not uploaded to Azure blob storage. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Publish-AzureVMDscConfiguration .\MyConfiguration.ps1 + + Description + + + + -----------This command creates a ZIP package for the given script and any dependent resource modules and uploads it to Azure Storage. +By default the command does no produce any output; use the -Verbose option to display an indication of the operations performed by the command + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> Publish-AzureVMDscConfiguration .\MyConfiguration.ps1 -ConfigurationArchivePath .\MyConfiguration.ps1.zip + + Description + + + + -----------This command creates a ZIP package for the given script and any dependent resource modules and stores it in the local file .\MyConfiguration.ps1.zip. + + + + + + + Unknown + + + + + + + + Remove-AzureAclConfig + + Remove the ACL configuration object from an existing Azure VM configuration. + + + + + Remove + AzureAclConfig + + + + + The Remove-AzureAclConfig cmdlet removes the ACL configuration object from an existing Azure VM configuration. + + + + Remove-AzureAclConfig + + EndpointName + + Specifies the name of the endpoint. + + String + + + VM + + Specifies the virtual machine object for which the endpoint will be created. + + IPersistentVM + + + + + + EndpointName + + Specifies the name of the endpoint. + + String + + String + + + + + + VM + + Specifies the virtual machine object for which the endpoint will be created. + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS> $acl = Get-AzureVM -ServiceName "myservice" -Name "MyVM" | Remove-AzureAclConfig -EndpointName "Web" | Update-AzureVM + + This command will remove the ACL configuration from "MyVM". + + + + + + + + + + + New-AzureAclConfig + + + + Get-AzureAclConfig + + + + Set-AzureAclConfig + + + + + + + + Remove-AzureAffinityGroup + + Deletes an affinity group in the specified subscription. + + + + + Remove + AzureAffinityGroup + + + + + The Remove-AzureAffinityGroup cmdlet deletes an affinity group in the subscription. You can't delete an affinity group that has any members. You must first delete all the members of an affinity group and then use Remove-AzureAffinityGroup to delete the affinity group. + + + + Remove-AzureAffinityGroup + + Name + + Specifies the name of the affinity group to delete. + + String + + + + + + Name + + Specifies the name of the affinity group to delete. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Remove-AzureAffinityGroup -name "South1" + + This command deletes the 'South1' affinity group in the current subscription. + + + + + + + + + + + Get-AzureAffinityGroup + + + + New-AzureAffinityGroup + + + + Set-AzureAffinityGroup + + + + + + + + Remove-AzureAvailabilitySet + + + + + + + Remove + AzureAvailabilitySet + + + + + + + + + Remove-AzureAvailabilitySet + + VM + + + + IPersistentVM + + + + + + VM + + + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Remove-AzureCertificate + + Deletes the specified certificate from the Microsoft Azure service. + + + + + Remove + AzureCertificate + + + + + + + + + Remove-AzureCertificate + + ServiceName + + Specifies the Microsoft Azure service with which the certificate is associated. + + String + + + ThumbprintAlgorithm + + Specifies the algorithm used to create the certificate thumbprint. + + String + + + Thumbprint + + Specifies the thumbprint that identifies the certificate. + + String + + + + + + ServiceName + + Specifies the Microsoft Azure service with which the certificate is associated. + + String + + String + + + + + + ThumbprintAlgorithm + + Specifies the algorithm used to create the certificate thumbprint. + + String + + String + + + + + + Thumbprint + + Specifies the thumbprint that identifies the certificate. + + String + + String + + + + + + + + + + + + + + + + + + + + + ManagementOperationContext + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Remove-AzureCertificate -ServiceName "MyService" -Thumbprint '5383CE0343CB6563281CA97C1B5D712209CFFA97' + + This command removes the certificate object identified by the specified thumbprint from the specified cloud service. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> C:\PS>Get-Certificate -ServiceName "MyService" | Remove-AzureCertificate + + This command removes all certificates from the specified cloud service. + + + + + + + + + -------------------------- Example 3 -------------------------- + + + + PS C:\> C:\PS>Get-Certificate –ServiceName "MyService" -ThumbprintAlgorithm "sha1" ` + | Remove-AzureCertificate + + This command removes all certificates that use the "sha1" thumbprint algorithm from the specified cloud service. + + + + + + + + + + + Add-AzureCertificate + + + + Get-AzureCertificate + + + + + + + + Remove-AzureDataDisk + + Removes a data disk from a virtual machine object. + + + + + Remove + AzureDataDisk + + + + + The Remove-AzureDataDisk cmdlet detaches a data disk from a virtual machine. The data disk blob is not removed from the storage account. + + + + Remove-AzureDataDisk + + LUN + + Specifies the slot where the data disk to be detached is currently mounted. + + Int32 + + + DeleteVHD + + Specify to remove the data disk and the underlying disk blob. + + SwitchParameter + + + VM + + Specifies the slot where the data disk to be detached is currently mounted. + + IPersistentVM + + + + + + LUN + + Specifies the slot where the data disk to be detached is currently mounted. + + Int32 + + Int32 + + + + + + DeleteVHD + + Specify to remove the data disk and the underlying disk blob. + + SwitchParameter + + SwitchParameter + + + + + + VM + + Specifies the slot where the data disk to be detached is currently mounted. + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Get-AzureVM -ServiceName MyDemoService01 -Name MyDemoVM01 | Remove-AzureDataDisk -LUN 0 + + Description + + + + -----------This command gets the virtual machine object with the name "MyDemoVM01" running on the "MyDemoService01" cloud service, and then detaches the data disk at LUN 0 from virtual machine object. + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> Get-AzureVM -ServiceName MyDemoService01 -Name MyDemoVM01 | Remove-AzureDataDisk -LUN 0 -DeleteVHD | Update-AzureVM + +This command gets the virtual machine object with the name "MyDemoVM01" running on the "MyDemoService01" cloud service, then detaches the data disk at LUN 0 from virtual machine object. It also updates the VM in the cloud and then delete the underlying VHD(s). + + Description + + + + ----------- + + + + + + + Add-AzureDataDisk + + + + Set-AzureDataDisk + + + + + + + + Remove-AzureDeployment + + Deletes the specified deployment of a Microsoft Azure service. + + + + + Remove + AzureDeployment + + + + + The Remove-AzureDeployment cmdlet deletes the specified deployment of a Microsoft Azure cloud service. The deployment should be in the suspended state. + + + + Remove-AzureDeployment + + ServiceName + + Specifies the name of the service whose deployment will be deleted. + + String + + + Slot + + Specifies the deployment environment from which the deployment of the specified Microsoft Azure service will be deleted. Choices are Staging or Production. If no slot is specified, the production environment is assumed. + + String + + + DeleteVHD + + Specify to remove the deployment and the underlying disk blob(s). + + SwitchParameter + + + Force + + + + SwitchParameter + + + + + + ServiceName + + Specifies the name of the service whose deployment will be deleted. + + String + + String + + + + + + Slot + + Specifies the deployment environment from which the deployment of the specified Microsoft Azure service will be deleted. Choices are Staging or Production. If no slot is specified, the production environment is assumed. + + String + + String + + + + + + DeleteVHD + + Specify to remove the deployment and the underlying disk blob(s). + + SwitchParameter + + SwitchParameter + + + + + + Force + + + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + ManagementOperationContext + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Remove-AzureDeployment -ServiceName "myservice" + + This command removes the deployment of the Microsoft Azure service "myservice" from the production environment. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> C:\PS>Remove-AzureDeployment -ServiceName "myservice" -DeleteVHD + + This command removes the deployment of the Microsoft Azure service "myservice" from the production environment, and the underlying VHD(s). + + + + + + + + + + + Get-AzureDeployment + + + + Move-AzureDeployment + + + + New-AzureDeployment + + + + Set-AzureDeployment + + + + + + + + Remove-AzureDisk + + Removes a disk from the Microsoft Azure disk repository. + + + + + Remove + AzureDisk + + + + + The Remove-AzureDisk cmdlet removes a disk from the Microsoft Azure disk repository in the current subscription. + By default, this does not delete the associated physical VHD file from the blob storage location. To delete the associated physical VHD, specify the DeleteVHD parameter. + + + + Remove-AzureDisk + + DiskName + + Name of the data disk in the disk repository to remove. + + String + + + DeleteVHD + + Removes the underlying VHD from blob storage. + + SwitchParameter + + + + + + DiskName + + Name of the data disk in the disk repository to remove. + + String + + String + + + + + + DeleteVHD + + Removes the underlying VHD from blob storage. + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Remove-AzureDisk -DiskName "MyDataDisk" + + This example removes the "MyDataDisk" disk from the disk repository but does not remove the VHD from Microsoft Azure storage. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> C:\PS>Remove-AzureDisk -DiskName "MyDataDisk" –DeleteVHD + + This example removes the "MyDataDisk" disk from the disk repository and also removes the VHD from Microsoft Azure storage. + + + + + + + + + + + Add-AzureDisk + + + + Get-AzureDisk + + + + Update-AzureDisk + + + + + + + + Remove-AzureDns + + Removes a DNS server to an existing cloud service. + + + + + Remove + AzureDns + + + + + The Remove-AzureDns cmdlet removes the specified DNS server from a cloud service. + + + + Remove-AzureDns + + Name + + Specifies the name of the DNS server to be removed + + String + + + ServiceName + + Specifies the name of the cloud service + + String + + + Force + + + + SwitchParameter + + + + + + Name + + Specifies the name of the DNS server to be removed + + String + + String + + + + + + ServiceName + + Specifies the name of the cloud service + + String + + String + + + + + + Force + + + + SwitchParameter + + SwitchParameter + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.Common.ManagementOperationContext + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Remove-AzureDns -ServiceName "myservice" -Name "mydns" + + Description + + + + -----------This command removes the DNS server "mydns" from the specified cloud service + + + + + + + Unknown + + + + + + + + Remove-AzureEndpoint + + Deletes an endpoint from a Microsoft Azure virtual machine object. + + + + + Remove + AzureEndpoint + + + + + The Remove-AzureEndpoint cmdlet deletes an endpoint from a specified virtual machine object. + + + + Remove-AzureEndpoint + + Name + + Specifies the name of the endpoint to be deleted from the virtual machine. + + String + + + VM + + Specifies the virtual machine object from which the endpoint will be deleted. + + IPersistentVM + + + + + + Name + + Specifies the name of the endpoint to be deleted from the virtual machine. + + String + + String + + + + + + VM + + Specifies the virtual machine object from which the endpoint will be deleted. + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> Get-AzureVM –ServiceName "MyService" –Name “MyVM” | Remove-AzureEndpoint –Name "HttpIn" | Update-AzureVM + + This command deletes the endpoint "HttpIn" from the "MyVM" virtual machine. + + + + + + + + + + + Online Version: + + + + + + + + Remove-AzureInternalLoadBalancer + + Remove-AzureInternalLoadBalancer [-ServiceName] <string> [<CommonParameters>] + + + + + Remove + AzureInternalLoadBalancer + + + + + The Remove-AzureInternalLoadbalancer cmdlet removes the internal load balancer configuration from a deployment, if there are endpoints still referring to the internal load balancer the remove operation will fail + + + + Remove-AzureInternalLoadBalancer + + ServiceName + + + + String + + + + + + ServiceName + + + + String + + String + + + + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.Common.ManagementOperationContext + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Remove-AzureInternalLoadBalancer -ServiceName "ILBInVNet" + + Description + + + + -----------Removes the Internal load balancer configuration from the deployment. + + + + + + + Unknown + + + + + + + + Remove-AzurePublicIP + + Remove-AzurePublicIP [[-PublicIPName] <string>] -VM <IPersistentVM> [<CommonParameters>] + + + + + Remove + AzurePublicIP + + + + + Removed Public IP configuration from the virtual machine. + + + + Remove-AzurePublicIP + + PublicIPName + + + + String + + + VM + + + + IPersistentVM + + + + + + PublicIPName + + + + String + + String + + + + + + VM + + + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.ServiceManagement.Model.IPersistentVM + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Get-AzureVM -ServiceName FTPInAzure -Name FTPInstance | Remove-AzurePublicIP | Update-AzureVM + + Description + + + + -----------Removes the public ip configuration from the virtual machine. + + + + + + + Unknown + + + + + + + + Remove-AzureReservedIP + + Remove the Reserved IP by its name. + + + + + Remove + AzureReservedIP + + + + + Remove the reserved IP by its name. + + + + Remove-AzureReservedIP + + ReservedIPName + + Reserved IP Name + + String + + + Force + + Not Specified + + SwitchParameter + + + + + + ReservedIPName + + Reserved IP Name + + String + + String + + + + + + Force + + Not Specified + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Remove-AzureReservedIP -ReservedIPName $name + + Description + + + + -----------Deletes the Reserved IP from the Subscription by name + + + + + + + Unknown + + + + + + + + Remove-AzureServiceADDomainExtension + + This cmdlet removes the cloud service AD domain extension applied on all roles or named roles at a certain deployment slot. + + + + + Remove + AzureServiceADDomainExtension + + + + + This cmdlet removes the cloud service AD domain extension applied on all roles or named roles at a certain deployment slot. + + + + Remove-AzureServiceADDomainExtension + + ServiceName + + + + String + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + + Role + + An optional array of roles to specify the remote desktop configuration for. If not specified the AD domain configuration is applied as the default configuration for all roles. + + String[] + + + + Remove-AzureServiceADDomainExtension + + ServiceName + + + + String + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + + UninstallConfiguration + + If specified uninstall all AD Domain configurations from the cloud service. + + SwitchParameter + + + + + + ServiceName + + + + String + + String + + + + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + String + + + + + + Role + + An optional array of roles to specify the remote desktop configuration for. If not specified the AD domain configuration is applied as the default configuration for all roles. + + String[] + + String[] + + + + + + UninstallConfiguration + + If specified uninstall all AD Domain configurations from the cloud service. + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Remove-AzureServiceADDomainExtension -ServiceName $svc + + Description + + + + -----------Removing the configured AD domain extension from all roles of a cloud service. + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> Remove-AzureServiceADDomainExtension -ServiceName $svc -Role "WebRole1" + + Description + + + + -----------Removing the configured AD domain extension from the role 'WebRole1' of a cloud service. + + + + + + + Unknown + + + + + + + + Remove-AzureServiceAntimalwareExtension + + Removes the antimalware configuration from a cloud service. + + + + + Remove + AzureServiceAntimalwareExtension + + + + + The Remove-AzureServiceAntimalwareExtension cmdlet removes the antimalware configuration and any associated antimalware monitoring from the Microsoft Antimalware extension associated with a cloud service. + + + + Remove-AzureServiceAntimalwareExtension + + ServiceName + + Specifies the name of the cloud service. + + String + + + Slot + + Specifies a deployment slot. Valid values are: + +-- Production +-- Staging + +The default value is Production. + + String + + + Role + + Specifies an array of roles. The default value is all roles. + + String[] + + + EndpointSuffix + + Specifies the storage endpoint suffix. + + String + + + + Remove-AzureServiceAntimalwareExtension + + ServiceName + + Specifies the name of the cloud service. + + String + + + Slot + + Specifies a deployment slot. Valid values are: + +-- Production +-- Staging + +The default value is Production. + + String + + + EndpointSuffix + + Specifies the storage endpoint suffix. + + String + + + + + + ServiceName + + Specifies the name of the cloud service. + + String + + String + + + none + + + Slot + + Specifies a deployment slot. Valid values are: + +-- Production +-- Staging + +The default value is Production. + + String + + String + + + none + + + Role + + Specifies an array of roles. The default value is all roles. + + String[] + + String[] + + + none + + + EndpointSuffix + + Specifies the storage endpoint suffix. + + String + + String + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This cmdlet removes only the configuration associated with the specified role. It does not uninstall or remove any already running instances of the Microsoft Antimalware extension from roles. To return these roles to a start state that does not have Microsoft Antimalware running, first remove the configuration by using this cmdlet, and then reimage or redeploy the service. + + + + + -------------------------- Example 1: Remove the extension -------------------------- + + + + PS C:\>Remove-AzureServiceAntimalwareExtension -ServiceName "ContosoService03" + + This command removes the antimalware extension and monitoring of associated antimalware events from the service named ContosoService03. + + + + + + + + + -------------------------- Example 2: Remove the extension for the Staging slot -------------------------- + + + + PS C:\>Remove-AzureServiceAntimalwareExtension -ServiceName "ContosoService03" -Slot "Staging" + + This command removes the antimalware extension and monitoring of associated antimalware events from all roles in the staging slot of the service named ContosoService03. + + + + + + + + + -------------------------- Example 3: Remove the extension for a specified slot and role -------------------------- + + + + PS C:\>Remove-AzureServiceAntimalwareExtension -ServiceName "ContosoService03" -Slot "Production" -Role "web role" + + This command removes the antimalware extension and monitoring of associated antimalware events from the service named ContosoService03 in the specified slot and role. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=402841 + + + Set-AzureServiceAntimalwareExtension + + + + + + + + Remove-AzureServiceDiagnosticsExtension + + This cmdlet removes the cloud service diagnostics extension applied on all roles or named roles at a certain deployment slot. + + + + + Remove + AzureServiceDiagnosticsExtension + + + + + This cmdlet removes the cloud service diagnostics extension applied on all roles or named roles at a certain deployment slot. + + + + Remove-AzureServiceDiagnosticsExtension + + ServiceName + + Specifies the Microsoft Azure service name of the deployment. + + String + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + + Role + + An optional array of roles to specify the remote desktop configuration for. If not specified the remote desktop configuration is applied as the default configuration for all roles. + + String[] + + + + Remove-AzureServiceDiagnosticsExtension + + ServiceName + + Specifies the Microsoft Azure service name of the deployment. + + String + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + + UninstallConfiguration + + If specified uninstall all RDP configurations from the cloud service. + + SwitchParameter + + + + + + ServiceName + + Specifies the Microsoft Azure service name of the deployment. + + String + + String + + + + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + String + + + + + + Role + + An optional array of roles to specify the remote desktop configuration for. If not specified the remote desktop configuration is applied as the default configuration for all roles. + + String[] + + String[] + + + + + + UninstallConfiguration + + If specified uninstall all RDP configurations from the cloud service. + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Remove-AzureServiceDiagnosticsExtension -ServiceName $svc + + Description + + + + -----------Removing the configured diagnostics extension from all roles of a cloud service. + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> Remove-AzureServiceDiagnosticsExtension -ServiceName $svc -Role "WebRole1" + + Description + + + + -----------Removing the configured diagnostics extension from the role 'WebRole1' of a cloud service. + + + + + + + Unknown + + + + + + + + Remove-AzureServiceExtension + + This cmdlet removes given cloud service extensions that are applied on a deployment. + + + + + Remove + AzureServiceExtension + + + + + This cmdlet removes given cloud service extensions that are applied on a deployment. + + + + Remove-AzureServiceExtension + + ServiceName + + The cloud service name. + + String + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + + Role + + An optional array of roles to specify the extension for. If not specified the extension is applied as the default configuration for all roles. + + String[] + + + ExtensionName + + The Extension Name. + + String + + + ProviderNamespace + + The Extension Provider Namespace. + + String + + + + Remove-AzureServiceExtension + + ServiceName + + The cloud service name. + + String + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + + ExtensionName + + The Extension Name. + + String + + + ProviderNamespace + + The Extension Provider Namespace. + + String + + + UninstallConfiguration + + If specified uninstall all configurations from the cloud service. + + SwitchParameter + + + + + + ServiceName + + The cloud service name. + + String + + String + + + + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + String + + + + + + Role + + An optional array of roles to specify the extension for. If not specified the extension is applied as the default configuration for all roles. + + String[] + + String[] + + + + + + ExtensionName + + The Extension Name. + + String + + String + + + + + + ProviderNamespace + + The Extension Provider Namespace. + + String + + String + + + + + + UninstallConfiguration + + If specified uninstall all configurations from the cloud service. + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Remove-AzureServiceExtension -ServiceName $svc -Slot Production -ExtensionName RDP -ProviderNamespace Microsoft.Windows.Azure.Extensions + + Description + + + + -----------Remove the existing RDP extension applied on all roles. + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> Remove-AzureServiceExtension -ServiceName $svc -Slot Production -ExtensionName RDP -ProviderNamespace Microsoft.Windows.Azure.Extensions -UninstallConfiguration + + Description + + + + -----------Remove the existing RDP extension applied on all roles, and uninstall it from the cloud service. + + + + + + + Unknown + + + + + + + + Remove-AzureServiceRemoteDesktopExtension + + This cmdlet removes the cloud service remote desktop extension applied on all roles or named roles at a certain deployment slot. + + + + + Remove + AzureServiceRemoteDesktopExtension + + + + + This cmdlet removes the cloud service remote desktop extension applied on all roles or named roles at a certain deployment slot. + + + + Remove-AzureServiceRemoteDesktopExtension + + ServiceName + + Specifies the Microsoft Azure service name of the deployment. + + String + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + + Role + + An optional array of roles to specify the remote desktop configuration for. If not specified the remote desktop configuration is applied as the default configuration for all roles. + + String[] + + + + Remove-AzureServiceRemoteDesktopExtension + + ServiceName + + Specifies the Microsoft Azure service name of the deployment. + + String + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + + UninstallConfiguration + + If specified uninstall all RDP configurations from the cloud service. + + SwitchParameter + + + + + + ServiceName + + Specifies the Microsoft Azure service name of the deployment. + + String + + String + + + + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + String + + + + + + Role + + An optional array of roles to specify the remote desktop configuration for. If not specified the remote desktop configuration is applied as the default configuration for all roles. + + String[] + + String[] + + + + + + UninstallConfiguration + + If specified uninstall all RDP configurations from the cloud service. + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Remove-AzureServiceRemoteDesktopExtension -ServiceName $svc + + Description + + + + -----------Removing the configured remote desktop extension from all roles of a cloud service. + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> Remove-AzureServiceRemoteDesktopExtension -ServiceName $svc -Role "WebRole1" + + Description + + + + -----------Removing the configured remote desktop extension from the role 'WebRole1' of a cloud service. + + + + + + + Unknown + + + + + + + + Remove-AzureStaticVNetIP + + Remove the static VNet IP address information from a VM object, if any. + + + + + Remove + AzureStaticVNetIP + + + + + Remove the static VNet IP address information from a VM object, if any. + + + + Remove-AzureStaticVNetIP + + VM + + Persistent VM object. + + IPersistentVM + + + + + + VM + + Persistent VM object. + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Unknown + + + + + + + + Remove-AzureStorageAccount + + Deletes the specified storage account from a subscription. + + + + + Remove + AzureStorageAccount + + + + + The Remove-AzureStorageAccount cmdlet removes an account from a Microsoft Azure subscription. + + + + Remove-AzureStorageAccount + + StorageAccountName + + The name of the storage account to be removed. + + String + + + + + + StorageAccountName + + The name of the storage account to be removed. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Remove-AzureStorageAccount -StorageAccountName "mystore1" + + This command removes the "mystore1" storage account from the specified subscription. + + + + + + + + + + + New-AzureStorageAccount + + + + Set-AzureStorageAccount + + + + Get-AzureStorageAccount + + + + + + + + Remove-AzureVM + + Removes a Microsoft Azure virtual machine. + + + + + Remove + AzureVM + + + + + The Remove-AzureVM cmdlet deletes a Microsoft Azure virtual machine. This process doesn’t delete the underlying .vhd files of the disks mounted on that virtual machine. + + + + Remove-AzureVM + + Name + + Specifies the name of the virtual machine being removed. + + String + + + DeleteVHD + + Specify to remove the VM and the underlying disk blob(s). + + SwitchParameter + + + ServiceName + + Specifies the Microsoft Azure service name from which the virtual machine is being removed. + + String + + + + + + Name + + Specifies the name of the virtual machine being removed. + + String + + String + + + + + + DeleteVHD + + Specify to remove the VM and the underlying disk blob(s). + + SwitchParameter + + SwitchParameter + + + + + + ServiceName + + Specifies the Microsoft Azure service name from which the virtual machine is being removed. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Remove-AzureVM -ServiceName "MySvc1" -Name "MyVM" + + This command removes the "MyVM" virtual machine running in the "MySvc1" service. + + + + + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> Remove-AzureVM -ServiceName "MySvc1" -Name "MyVM" -DeleteVHD + + Description + + + + -----------This command removes the "MyVM" virtual machine running in the "MySvc1" service, and the underlying VHD(s). + + + + + + + New-AzureVMConfig + + + + Restart-AzureVM + + + + Start-AzureVM + + + + Stop-AzureVM + + + + Update-AzureVM + + + + New-AzureVM + + + + + + + + Remove-AzureVMAccessExtension + + This cmdlet removes the VMAcess extension (if any) applied on the VM. + + + + + Remove + AzureVMAccessExtension + + + + + This cmdlet removes the VMAcess extension (if any) applied on the VM. + + + + Remove-AzureVMAccessExtension + + VM + + The persistent VM object. + + IPersistentVM + + + + + + VM + + The persistent VM object. + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Remove-AzureVMAccessExtension -VM $vm; + + Description + + + + -----------This cmdlet removes the VMAcess extension (if any) applied on the VM. + + + + + + + Unknown + + + + + + + + Remove-AzureVMBGInfoExtension + + This cmdlet removes the BGInfo extension (if any) applied on the VM. + + + + + Remove + AzureVMBGInfoExtension + + + + + This cmdlet removes the BGInfo extension (if any) applied on the VM. + + + + Remove-AzureVMBGInfoExtension + + VM + + The persistent VM object. + + IPersistentVM + + + + + + VM + + The persistent VM object. + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Remove-AzureVMBGInfoExtension -VM $vm; + + Description + + + + -----------This cmdlet removes the BGInfo extension (if any) applied on the VM. + + + + + + + Unknown + + + + + + + + Remove-AzureVMCustomScriptExtension + + Remove Azure VM Custom Script Extension from a VM. + + + + + Remove + AzureVMCustomScriptExtension + + + + + Remove Azure VM Custom Script Extension from a VM. + + + + Remove-AzureVMCustomScriptExtension + + VM + + The persistent VM object. + + IPersistentVM + + + + + + VM + + The persistent VM object. + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Remove-AzureVMCustomScriptExtension -VM $vm; + + Description + + + + -----------Remove Azure VM Custom Script Extension from a VM. + + + + + + + Unknown + + + + + + + + Remove-AzureVMDiagnosticsExtension + + + + + + + Remove + AzureVMDiagnosticsExtension + + + + + + + + + Remove-AzureVMDiagnosticsExtension + + VM + + + + IPersistentVM + + + + + + VM + + + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Remove-AzureVMDscExtension + + Remove Azure VM DSC Extension from a VM. + + + + + Remove + AzureVMDscExtension + + + + + Remove Azure VM DSC Extension from a VM. + + + + Remove-AzureVMDscExtension + + VM + + The persistent VM object. + + IPersistentVM + + + + + + VM + + The persistent VM object. + + IPersistentVM + + IPersistentVM + + + + + + Confirm + + Prompts you for confirmation before executing the command. + + switchparameter + + switchparameter + + + + + + WhatIf + + Describes what would happen if you executed the command without actually executing the command. + + switchparameter + + switchparameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Remove-AzureVMDscExtension -VM $vm + + Description + + + + -----------Remove Azure VM DSC Extension from a VM. + + + + + + + Unknown + + + + + + + + Remove-AzureVMExtension + + This cmdlet removes resource extensions from VMs. + + + + + Remove + AzureVMExtension + + + + + This cmdlet removes resource extensions from VMs. + + + + Remove-AzureVMExtension + + ExtensionName + + The Extension Name. + + String + + + Publisher + + The Extension Publisher. + + String + + + VM + + + + IPersistentVM + + + + Remove-AzureVMExtension + + ReferenceName + + The extension's reference name. + + String + + + VM + + + + IPersistentVM + + + + Remove-AzureVMExtension + + RemoveAll + + Specify to remove all extensions. + + SwitchParameter + + + VM + + + + IPersistentVM + + + + + + ExtensionName + + The Extension Name. + + String + + String + + + + + + Publisher + + The Extension Publisher. + + String + + String + + + + + + VM + + + + IPersistentVM + + IPersistentVM + + + + + + ReferenceName + + The extension's reference name. + + String + + String + + + + + + RemoveAll + + Specify to remove all extensions. + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> $vm = Remove-AzureVMExtension -VM $vm -ExtensionName $ext -Publisher $pub; + + Description + + + + -----------Remove a given extension with the name and publisher + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> $vm = Remove-AzureVMExtension -VM $vm -RemoveAll; + + Description + + + + -----------Remove all extensions. + + + + + + + Unknown + + + + + + + + Remove-AzureVMImage + + Removes an OS or VM image from the Image Repository. + + + + + Remove + AzureVMImage + + + + + Removes an OS or VM image from the Image Repository. + + + + Remove-AzureVMImage + + ImageName + + Specifies the OS or VM image to remove from the image repository. + + String + + + DeleteVHD + + When specified, the physical VHD image blob is deleted from the storage account. + + SwitchParameter + + + + + + ImageName + + Specifies the OS or VM image to remove from the image repository. + + String + + String + + + + + + DeleteVHD + + When specified, the physical VHD image blob is deleted from the storage account. + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Remove-AzureVMImage -ImageName MyOSImage + + Description + + + + -----------This command removes the "MyOSImage" image from the image repository. + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> Remove-AzureVMImage -ImageName MyOSImage -DeleteVHD + + Description + + + + -----------This command removes the "MyOSImage" image from the image repository and also deletes the physical VHD image from the storage account. + + + + + -------------------------- EXAMPLE 3 -------------------------- + + + + PS C:\> $subsId = &amp;lt;MySubscriptionID&amp;gt; +$cert = Get-AzureCertificate cert:\LocalMachine\MY\&amp;lt;CertificateThumbprint&amp;gt; +Get-AzureVMImage ` + | Where-Object {$_.Label -match "Beta" }` + | Foreach-Object {Remove-AzureVMImage -ImageName $_.name } + + Description + + + + -----------This command sets the subscription context and then removes all the images from the image repository whose Label includes "Beta". + + + + + + + Add-AzureVMImage + + + + Get-AzureVMImage + + + + Update-AzureVMImage + + + + + + + + Remove-AzureVMImageDataDiskConfig + + This cmdlet removes the Data Disk Config from the DiskConfigSet object + + + + + Remove + AzureVMImageDataDiskConfig + + + + + + + + + Remove-AzureVMImageDataDiskConfig + + DiskConfig + + + + VirtualMachineImageDiskConfigSet + + + DataDiskName + + + + String + + + + Remove-AzureVMImageDataDiskConfig + + DiskConfig + + + + VirtualMachineImageDiskConfigSet + + + Lun + + + + Int32 + + + + + + DiskConfig + + + + VirtualMachineImageDiskConfigSet + + VirtualMachineImageDiskConfigSet + + + + + + DataDiskName + + + + String + + String + + + + + + Lun + + + + Int32 + + Int32 + + + + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.ServiceManagement.Model.VirtualMachineImageDiskConfigSet + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> $s = New-AzureDiskConfigSet + # returns DiskConfigSet object; + + $s = Set-AzureDataDiskConfig -DiskConfig $s -HostCaching ReadWrite + # returns DiskConfigSet object; + + Remove-AzureVMImageDataDiskConfig -DiskConfig $s + # removes the Data DiskConfig object from the DiskConfigSet object + + Description + + + + ----------- + + + + + + + Unknown + + + + + + + + Remove-AzureVMImageOSDiskConfig + + This cmdlet removes the OS Disk Config from the DiskConfigSet object + + + + + Remove + AzureVMImageOSDiskConfig + + + + + + + + + Remove-AzureVMImageOSDiskConfig + + DiskConfig + + The disk config object that encapsulates the OS Disk and Data Disk objects. + + VirtualMachineImageDiskConfigSet + + + + + + DiskConfig + + The disk config object that encapsulates the OS Disk and Data Disk objects. + + VirtualMachineImageDiskConfigSet + + VirtualMachineImageDiskConfigSet + + + + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.ServiceManagement.Model.VirtualMachineImageDiskConfigSet + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> $s = New-AzureDiskConfigSet + # returns DiskConfigSet object; + + $s = Set-AzureOSDiskConfig -DiskConfig $s -HostCaching ReadWrite + # returns DiskConfigSet object; + + Remove-AzureVMImageOSDiskConfig -DiskConfig $s + # removes the OS DiskConfig object from the DiskConfigSet object + + Description + + + + ----------- + + + + + + + Unknown + + + + + + + + Remove-AzureVMMicrosoftAntimalwareExtension + + Removes the Microsoft Antimalware extension from a virtual machine. + + + + + Remove + AzureVMMicrosoftAntimalwareExtension + + + + + The Remove-AzureVMMicrosoftAntimalwareExtension cmdlet removes the Microsoft Antimalware extension from a virtual machine. If monitoring was turned on, this cmdlet also removes the collection of Microsoft Antimalware events. + + + + Remove-AzureVMMicrosoftAntimalwareExtension + + VM + + Specifies the virtual machine as an IPersistentVM object. + + IPersistentVM + + + + + + VM + + Specifies the virtual machine as an IPersistentVM object. + + IPersistentVM + + IPersistentVM + + + none + + + + + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + + + + + + To avoid interfering with monitoring for other applications or services, this cmdlet removes only the collection of Microsoft Antimalware events. It does not change other application configurations or the default monitoring configuration. + + + + + -------------------------- Example 1: Remove the extension -------------------------- + + + + PS C:\>Get-AzureVM -ServiceName "ContosoService03" -Name "ContosoVM22" | Remove-AzureVMMicrosoftAntimalwareExtension | Update-AzureVM + + This command removes the Microsoft Antimalware extension. The command uses the Get-AzureVM cmdlet to get the specified virtual machine object, and then passes the object to the current cmdlet by using the pipeline operator. Remove-AzureVMMicrosoftAntimalwareExtension removes the extension. The command passes the result to the Update-AzureVM cmdlet to update the virtual machine. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=402842 + + + Get-AzureVM + + + + Update-AzureVM + + + + Get-AzureVMMicrosoftAntimalwareExtension + + + + Set-AzureVMMicrosoftAntimalwareExtension + + + + + + + + Remove-AzureVMPuppetExtension + + This cmdlet removes the Puppet extension (if any) applied on the VM. + + + + + Remove + AzureVMPuppetExtension + + + + + This cmdlet removes the Puppet extension (if any) applied on the VM. + + + + Remove-AzureVMPuppetExtension + + VM + + The persistent VM object. + + IPersistentVM + + + + + + VM + + The persistent VM object. + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Remove-AzureVMPuppetExtension -VM $vm; + + Description + + + + -----------This cmdlet removes the Puppet extension (if any) applied on the VM. + + + + + + + Unknown + + + + + + + + Remove-AzureVNetConfig + + Deletes the network configuration from the current Microsoft Azure subscription. + + + + + Remove + AzureVNetConfig + + + + + The Remove-AzureVNetConfig cmdlet removes all virtual network settings from the current Microsoft Azure subscription. + + + + Remove-AzureVNetConfig + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Remove-AzureVNetConfig + + This command removes the virtual network configuration from the current subscription. + + + + + + + + + + + Get-AzureVNetConfig + + + + Get-AzureVNetSite + + + + Set-AzureVNetConfig + + + + + + + + Remove-AzureVNetGateway + + Removes the Microsoft Azure virtual network gateway to the specified virtual network. + + + + + Remove + AzureVNetGateway + + + + + The Remove-AzureVNetGateway cmdlet removes the virtual network gateway to the specified Microsoft Azure virtual network. A virtual network gateway is a VPN endpoint for connecting to a virtual network. If you remove the virtual network gateway, the underlying virtual network is unaffected and still in place, allowing you to create a new gateway with New-VNetGateway. However, the shared key for the gateway will be different, requiring reconfiguration of the VPN device at the local network site. + + + + Remove-AzureVNetGateway + + VNetName + + Specifies the name of the virtual network to remove the gateway from. + + String + + + + + + VNetName + + Specifies the name of the virtual network to remove the gateway from. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Remove-AzureVNetGateway –VNetName "MyProdNet" + + This command removes the virtual network gateway (VPN endpoint) from the "MyProdNet" virtual network. + + + + + + + + + + + + + + + Reset-AzureRoleInstance + + Requests a reboot or reimage of a single role instance or all role instances of a specific role. + + + + + Reset + AzureRoleInstance + + + + + The ReSet-AzureRoleInstance cmdlet requests a reboot or a reimage of a role instance that is running in a deployment. This operation executes synchronously. When you reboot a role instance, Microsoft Azure takes the instance offline, restarts the underlying operating system for that instance, and brings the instance back online. Any data that is written to the local disk persists across reboots. Any data that is in-memory is lost. Reimaging a role instance results in different behavior depending on the type of role. For a web or worker role, when the role is reimaged, Microsoft Azure takes the role offline and writes a fresh installation of the Microsoft Azure guest operating system to the virtual machine. The role is then brought back online. For a VM role, when the role is reimaged, Microsoft Azure takes the role offline, reapplies the custom image that you provided for it, and brings the role back online. + Microsoft Azure attempts to maintain data in any local storage resources when the role is reimaged; however, in case of a transient hardware failure, the local storage resource may be lost. If your application requires that data persist, writing to a durable data source, such as a Microsoft Azure drive, is recommended. Any data that is written to a local directory other than that defined by the local storage resource will be lost when the role is reimaged. + + + + Reset-AzureRoleInstance + + ServiceName + + Specifies the name of the service. + + String + + + Slot + + The deployment environment where the role instances are running. Supported values are "Production" and "Staging". You can include either a DeploymentName or Slot parameter, but not both. + + String + + + InstanceName + + Specifies the name of the role instance to reimage or reboot. + + String + + + Reboot + + If this parameter is specified, reboots the specified role instance or, if none is specified, all role instances. You must include either a Reboot or Reimage parameter, but not both. + + SwitchParameter + + + Reimage + + If this parameter is specified, reimages the specified role instance or, if none is specified, all role instances. You must include either a Reboot or Reimage parameter, but not both. + + SwitchParameter + + + + + + ServiceName + + Specifies the name of the service. + + String + + String + + + + + + Slot + + The deployment environment where the role instances are running. Supported values are "Production" and "Staging". You can include either a DeploymentName or Slot parameter, but not both. + + String + + String + + + + + + InstanceName + + Specifies the name of the role instance to reimage or reboot. + + String + + String + + + + + + Reboot + + If this parameter is specified, reboots the specified role instance or, if none is specified, all role instances. You must include either a Reboot or Reimage parameter, but not both. + + SwitchParameter + + SwitchParameter + + + + + + Reimage + + If this parameter is specified, reimages the specified role instance or, if none is specified, all role instances. You must include either a Reboot or Reimage parameter, but not both. + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>ReSet-AzureRoleInstance -ServiceName "MySvc1" -Slot Staging -InstanceName "MyWebRole_IN_0" –reboot + + This command reboots the "MyWebRole_IN_0" role instance in the staging deployment of the "MySvc1" service. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> C:\PS>ReSet-AzureRoleInstance -ServiceName "MySvc1" -Slot Staging –Reimage + + This command reimages the role instances in the staging deployment of the MyTodo cloud service. + + + + + + + + + -------------------------- Example 3 -------------------------- + + + + PS C:\> C:\PS>ReSet-AzureRoleInstance -ServiceName "MySvc1" -Slot "Production –Reimage + + This command reimages all role instances in the production deployment of the "MySvc1" service. + + + + + + + + + + + + + + + Restart-AzureVM + + Restarts a Microsoft Azure virtual machine. + + + + + Restart + AzureVM + + + + + The Restart-AzureVM cmdlet requests a reboot of a virtual machine. + + + + Restart-AzureVM + + Name + + Specifies the name of the virtual machine to restart. + + String + + + ServiceName + + Specifies the name of the Microsoft Azure service that contains the virtual machine to restart. + + String + + + + Restart-AzureVM + + VM + + A virtual machine object that identifies the virtual machine to restart. + + PersistentVM + + + ServiceName + + Specifies the name of the Microsoft Azure service that contains the virtual machine to restart. + + String + + + + + + Name + + Specifies the name of the virtual machine to restart. + + String + + String + + + + + + ServiceName + + Specifies the name of the Microsoft Azure service that contains the virtual machine to restart. + + String + + String + + + + + + VM + + A virtual machine object that identifies the virtual machine to restart. + + PersistentVM + + PersistentVM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Restart-AzureVM -ServiceName "myservice1" –Name "MyVM" + + This command restarts the "MyVM" virtual machine running in the "myservice1" Microsoft Azure service. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> C:\PS>Get-AzureVM -ServiceName "myservice1" -Name "MyVM" | Restart-AzureVM + + This command retrieves the virtual machine object for the virtual machine whose name is "MyVM" and then restarts it. + + + + + + + + + + + Get-AzureVM + + + + Remove-AzureVM + + + + Start-AzureVM + + + + Stop-AzureVM + + + + Update-AzureVM + + + + + + + + Save-AzureVhd + + + + + + + Save + AzureVhd + + + + + The Save-AzureVhd cmdlet allows to download VHD images stored in a blob in to a file. It has parameters to configure the download process such as specifying the number of downloader threads that will be used or overwriting the file which already exists in the specified file path. Save-AzureVhd doesn't do any VHD format conversion and the blob is downloaded as it is. + + + + Save-AzureVhd + + Source + + Uri to the blob in Microsoft Azure. + + Uri + + + LocalFilePath + + + + FileInfo + + + NumberOfThreads + + Determines the number of download threads that will be used during download. + + Int32 + + + StorageKey + + Storage key of the blob storage account. If it is not provided, Save-AzureVhd tries to determine the storage key of the account in Source Uri from Microsoft Azure Cloud. + + String + + + OverWrite + + Determines to delete the file specified by LocalFilePath file if it exists. + + SwitchParameter + + + + + + Source + + Uri to the blob in Microsoft Azure. + + Uri + + Uri + + + + + + LocalFilePath + + + + FileInfo + + FileInfo + + + 2 + + + NumberOfThreads + + Determines the number of download threads that will be used during download. + + Int32 + + Int32 + + + 8 + + + StorageKey + + Storage key of the blob storage account. If it is not provided, Save-AzureVhd tries to determine the storage key of the account in Source Uri from Microsoft Azure Cloud. + + String + + String + + + + + + OverWrite + + Determines to delete the file specified by LocalFilePath file if it exists. + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Save-AzureVhd -Source http://mytestaccount.blob.core.windows.net/vhdstore/win7baseimage.vhd -LocalFilePath C:\vhd\MyWin7Image.vhd + + Description + + + + -----------Downloads the specified blob to the specified local file path. + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> Save-AzureVhd -Source http://mytestaccount.blob.core.windows.net/vhdstore/win7baseimage.vhd -LocalFilePath C:\vhd\MyWin7Image.vhd -Overwrite + + Description + + + + -----------Overwrite options tells to delete if local file exists. + + + + + -------------------------- EXAMPLE 3 -------------------------- + + + + PS C:\> Save-AzureVhd -Source http://mytestaccount.blob.core.windows.net/vhdstore/win7baseimage.vhd -LocalFilePath C:\vhd\MyWin7Image.vhd -NumberOfThreads 32 + + Description + + + + -----------NumberOfThreads allows to override the default number of threads, which is 8, used to download. + + + + + -------------------------- EXAMPLE 4 -------------------------- + + + + PS C:\> Save-AzureVhd -Source http://mytestaccount.blob.core.windows.net/vhdstore/win7baseimage.vhd -LocalFilePath C:\vhd\MyWin7Image.vhd -StorageKey zNvcH0r5vAGmC5AbwEtpcyWCMyBd3eMDbdaa4ua6kwxq6vTZH3Y+sw== + + Description + + + + -----------If storage key is specified, Save-AzureVhd doesn't attempt to get the storage key from Microsoft Azure Cloud and uses the provided the key in download. + + + + + + + Unknown + + + + + + + + Save-AzureVMImage + + Save OS or VM images from existing VMs. For capturing a VM Image, use the -OSState parameter. + + + + + Save + AzureVMImage + + + + + Save OS or VM images from existing VMs + + + + Save-AzureVMImage + + ServiceName + + The Service Name. + + String + + + Name + + The VM Name. + + String + + + ImageName + + Not Specified + + String + + + ImageLabel + + Not Specified + + String + + + OSState + + The OS State for VM Image only: 'Generalized' or 'Specialized'. The use of this parameter indicates your intent to capture VM Image to Azure. + + String + + + + + + ServiceName + + The Service Name. + + String + + String + + + + + + Name + + The VM Name. + + String + + String + + + + + + ImageName + + Not Specified + + String + + String + + + + + + ImageLabel + + Not Specified + + String + + String + + + + + + OSState + + The OS State for VM Image only: 'Generalized' or 'Specialized'. The use of this parameter indicates your intent to capture VM Image to Azure. + + String + + String + + + + + + PipelineVariable + + Not Specified + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> + + Description + + + + -----------Description + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> + + Description + + + + -----------Description + + + + + -------------------------- EXAMPLE 3 -------------------------- + + + + PS C:\> + + Description + + + + -----------Description + + + + + + + Unknown + + + + + + + + Set-AzureAclConfig + + Sets the ACL configuration object on an existing Azure VM configuration. + + + + + Set + AzureAclConfig + + + + + The Set-AzureAclConfig cmdlet sets the ACL configuration object from an existing Azure VM configuration. + + + + Set-AzureAclConfig + + AddRule + + Indicates that a rule should be added. + + SwitchParameter + + + Action + + Specifies this rules action. Must be either Permit or Deny. + + String + + + RemoteSubnet + + Specifies the remote subnet for this rule. Must be a valid CIDR Address. + + String + + + Order + + Specifies the processing order for this rule. + + Int32 + + + Description + + A description for this rule. + + String + + + ACL + + The ACL configuration object to add this rule to. + + NetworkAclObject + + + + Set-AzureAclConfig + + RemoveRule + + Indicates that a rule should be removed. + + SwitchParameter + + + RuleId + + Specifies the rule ID to remove from the given ACL configuration. + + Int32 + + + ACL + + The ACL configuration object to add this rule to. + + NetworkAclObject + + + + Set-AzureAclConfig + + SetRule + + Indicates that a rule should be changed. + + SwitchParameter + + + RuleId + + Specifies the rule ID to remove from the given ACL configuration. + + Int32 + + + Action + + Specifies this rules action. Must be either Permit or Deny. + + String + + + RemoteSubnet + + Specifies the remote subnet for this rule. Must be a valid CIDR Address. + + String + + + Order + + Specifies the processing order for this rule. + + Int32 + + + Description + + A description for this rule. + + String + + + ACL + + The ACL configuration object to add this rule to. + + NetworkAclObject + + + + + + AddRule + + Indicates that a rule should be added. + + SwitchParameter + + SwitchParameter + + + + + + Action + + Specifies this rules action. Must be either Permit or Deny. + + String + + String + + + + + + RemoteSubnet + + Specifies the remote subnet for this rule. Must be a valid CIDR Address. + + String + + String + + + + + + Order + + Specifies the processing order for this rule. + + Int32 + + Int32 + + + + + + Description + + A description for this rule. + + String + + String + + + + + + ACL + + The ACL configuration object to add this rule to. + + NetworkAclObject + + NetworkAclObject + + + + + + RemoveRule + + Indicates that a rule should be removed. + + SwitchParameter + + SwitchParameter + + + + + + RuleId + + Specifies the rule ID to remove from the given ACL configuration. + + Int32 + + Int32 + + + + + + SetRule + + Indicates that a rule should be changed. + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS> $acl = New-AzureAclConfig +C:\PS> Set-AzureAclConfig -AddRule -ACL $acl Permit 172.0.0.0/8 100 "Rule Description" + + This command will create a new ACL configuration and add a new rule to the configuration. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> C:\PS> $acl = Get-AzureVM -ServiceName "MyService" -Name "MyVM" | Get-AzureAclConfig -EndpointName "Web" +C:\PS> Set-AzureAclConfig –SetRule -ID 0 -ACL $acl -Order 102 -Description "New Description" +C:\PS> Get-AzureVM -ServiceName "MyService" -Name "MyVM" | Set-AzureEndpoint -ACL $acl -Name "Web" | Update-AzureVM + + This command will get the ACL Configuration of the endpoint "Web" on "MyVM" and set the Order of the first ACL rule to 102, and change it's description, then update the VM. + + + + + + + + + -------------------------- Example 3 -------------------------- + + + + PS C:\> C:\PS> $acl = Get-AzureVM -ServiceName "MyService" -Name "MyVM" | Get-AzureAclConfig -EndpointName "Web" +C:\PS> Set-AzureAclConfig –RemoveRule -ID 0 -ACL $acl +C:\PS> Get-AzureVM -ServiceName "MyService" -Name "MyVM" | Set-AzureEndpoint -ACL $acl -Name "Web" | Update-AzureVM + + This command will get the ACL Configuration of the endpoint "Web" on "MyVM" and remove the first ACL rule, then update the VM. + + + + + + + + + + + New-AzureAclConfig + + + + Remove-AzureAclConfig + + + + Get-AzureAclConfig + + + + + + + + Set-AzureAffinityGroup + + Updates the properties of a Microsoft Azure affinity group. + + + + + Set + AzureAffinityGroup + + + + + The Set-AzureAffinityGroup cmdlet updates properties of the specified affinity group. The properties that can be changed are the Label and the Description. + + + + Set-AzureAffinityGroup + + Name + + Specifies the name of the affinity group to change the properties of. + + String + + + Label + + Specifies a label for the affinity group. The label can be up to 100 characters in length. + + String + + + Description + + Specifies the description of the affinity group. The description can be up to 1024 characters in length. + + String + + + + + + Name + + Specifies the name of the affinity group to change the properties of. + + String + + String + + + + + + Label + + Specifies a label for the affinity group. The label can be up to 100 characters in length. + + String + + String + + + + + + Description + + Specifies the description of the affinity group. The description can be up to 1024 characters in length. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Set-AzureAffinityGroup -Name "MyGroup1" -Label "SouthUSProduction" -Description "Production applications for Southern US locations" + + This command sets the label of the affinity group MyGroup1 to "SouthUSProduction" and sets the description to "Production applications for Southern US locations" + + + + + + + + + + + Get-AzureAffinityGroup + + + + New-AzureAffinityGroup + + + + Remove-AzureAffinityGroup + + + + + + + + Set-AzureAvailabilitySet + + Sets the availability set name of an Azure VM after deployment. + + + + + Set + AzureAvailabilitySet + + + + + The Set-AzureAvailabilitySet cmdlet sets the availability set name of an Azure VM after deployment. + + + + Set-AzureAvailabilitySet + + AvailabilitySetName + + Name of the availability set on the virtual machine + + String + + + VM + + An Azure VM configuration to modify. + + IPersistentVM + + + + + + AvailabilitySetName + + Name of the availability set on the virtual machine + + String + + String + + + + + + VM + + An Azure VM configuration to modify. + + IPersistentVM + + IPersistentVM + + + + + + PipelineVariable + + Not Specified + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Get-AzureVM -ServiceName "MyAzureCS" -Name "MyVM" | Set-AzureAvailabilitySetName "MyASet" | Update-AzureVM + + Description + + + + -----------Adds the VM to an availability set "MyAset" + + + + + + + Unknown + + + + + + + + Set-AzureDataDisk + + Sets the host-cache mode on an existing data disk object. + + + + + Set + AzureDataDisk + + + + + The Set-AzureDataDisk cmdlet updates the cache attributes of an existing data disk object on a Microsoft Azure virtual machine. The possible host caching values are: None, ReadOnly, and ReadWrite. You can specify which data disk to update by specifying its logical unit number (LUN). + + + + Set-AzureDataDisk + + HostCaching + + Sets the host level caching settings of the disk. Possible values are: None, ReadOnly and ReadWrite. + + String + + + LUN + + Numerical value that defines the slot where the data drive is mounted in the virtual machine. + + Int32 + + + VM + + The virtual machine where the data disk is mounted. + + IPersistentVM + + + + + + HostCaching + + Sets the host level caching settings of the disk. Possible values are: None, ReadOnly and ReadWrite. + + String + + String + + + + + + LUN + + Numerical value that defines the slot where the data drive is mounted in the virtual machine. + + Int32 + + Int32 + + + + + + VM + + The virtual machine where the data disk is mounted. + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Get-AzureVM "myservice" ` + | Set-AzureDataDisk -VM "MyVM" -LUN 2 -HostCaching ReadOnly | Update-AzureVM + + This command gets the virtual machines running on the "myservice" cloud service, and then sets the data disk at LUN 2 of the "MyVM" virtual machine to use ReadOnly host caching. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> C:\PS>Get-AzureVM "myservice" -Name "MyVM" ` + | Get-AzureDataDisk ` + | Set-AzureDataDisk -HostCaching ReadWrite ' + | Update-AzureVM + + This command gets an object representing the "MyVM" virtual machine running on the "myservice" cloud service, gets an object or objects representing all the data disks on the virtual machine, and then sets the host caching mode of those data disks to ReadWrite. + + + + + + + + + + + Add-AzureDataDisk + + + + Get-AzureVM + + + + Update-AzureVM + + + + + + + + Set-AzureDeployment + + Sets status, upgrade mode, and configuration settings of a Microsoft Azure deployment. + + + + + Set + AzureDeployment + + + + + The Set-AzureDeployment cmdlet sets the status, configuration settings, or upgrade mode of a Microsoft Azure deployment. + With the -Status parameter, you can change the status of the deployment to either "Running" or "Suspended". With the -Config parameter, you can update the .cscfg file, and with the -Upgrade parameter, you set the upgrade mode and update configuration files. Use the Set-AzureWalkUpgradeDomain cmdlet to actually initiate the upgrade. + + + + Set-AzureDeployment + + Upgrade + + When specified, requests an upgrade to the Microsoft Azure deployment. + + SwitchParameter + + + ServiceName + + Specifies the Microsoft Azure service name of the deployment. + + String + + + Package + + Specifies the full path to the upgrade package (.cspkg) file. + + String + + + Configuration + + Specifies the path to the new configuration (.cscfg) file when performing an upgrade or configuration change. + + String + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + + Mode + + Specifies the mode of upgrade. Supported values are: "Auto", "Manual", and "Simultaneous". + + String + + + Label + + Specifies a new label for the upgraded deployment. + + String + + + RoleName + + Specifies the name of the role to upgrade. + + String + + + Force + + When specified, sets the upgrade to a forced upgrade. + + SwitchParameter + + + ExtensionConfiguration + + When specified, requests an upgrade to the Microsoft Azure deployment. + + ExtensionConfigurationInput[] + + + + Set-AzureDeployment + + Config + + When specified, modifies the .cscfg file for the deployment. + + SwitchParameter + + + ServiceName + + Specifies the Microsoft Azure service name of the deployment. + + String + + + Configuration + + Specifies the path to the new configuration (.cscfg) file when performing an upgrade or configuration change. + + String + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + + ExtensionConfiguration + + When specified, requests an upgrade to the Microsoft Azure deployment. + + ExtensionConfigurationInput[] + + + + Set-AzureDeployment + + Status + + When specified, requests a status change for the Microsoft Azure deployment. + + SwitchParameter + + + ServiceName + + Specifies the Microsoft Azure service name of the deployment. + + String + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + + NewStatus + + Specifies the target status for the deployment. Supported values are "Running" or "Suspended". + + String + + + + + + Upgrade + + When specified, requests an upgrade to the Microsoft Azure deployment. + + SwitchParameter + + SwitchParameter + + + + + + ServiceName + + Specifies the Microsoft Azure service name of the deployment. + + String + + String + + + + + + Package + + Specifies the full path to the upgrade package (.cspkg) file. + + String + + String + + + + + + Configuration + + Specifies the path to the new configuration (.cscfg) file when performing an upgrade or configuration change. + + String + + String + + + + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + String + + + + + + Mode + + Specifies the mode of upgrade. Supported values are: "Auto", "Manual", and "Simultaneous". + + String + + String + + + + + + Label + + Specifies a new label for the upgraded deployment. + + String + + String + + + + + + RoleName + + Specifies the name of the role to upgrade. + + String + + String + + + + + + Force + + When specified, sets the upgrade to a forced upgrade. + + SwitchParameter + + SwitchParameter + + + + + + ExtensionConfiguration + + When specified, requests an upgrade to the Microsoft Azure deployment. + + ExtensionConfigurationInput[] + + ExtensionConfigurationInput[] + + + + + + Config + + When specified, modifies the .cscfg file for the deployment. + + SwitchParameter + + SwitchParameter + + + + + + Status + + When specified, requests a status change for the Microsoft Azure deployment. + + SwitchParameter + + SwitchParameter + + + + + + NewStatus + + Specifies the target status for the deployment. Supported values are "Running" or "Suspended". + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Set-AzureDeployment -Status -ServiceName "MySvc1" -Slot "Production" -NewStatus "Running" + + Description + + + + -----------This command sets the status of the deployment in the production environment to Running. + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> Set-AzureDeployment -Config -ServiceName "MySvc1" -Slot "Staging" -Configuration "C:\Temp\MyServiceConfig.Cloud.csfg" + + Description + + + + -----------This command updates the deployment in the staging environment with a new configuration file. + + + + + -------------------------- EXAMPLE 3 -------------------------- + + + + PS C:\> Set-AzureDeployment -Upgrade -ServiceName "MySvc1" -Mode Auto -Package "C:\Temp\MyApp.cspkg" -Configuration "C:\Temp\MyServiceConfig.Cloud.csfg" + + Description + + + + -----------This command sets the upgrade mode to Auto and specifies an upgrade package and a new configuration file. + + + + + -------------------------- EXAMPLE 4 -------------------------- + + + + PS C:\> Set-AzureDeployment –ServiceName –Mode Automatic $svc -Package $pkg -Configuration $cnfg -Slot Production -ExtensionConfiguration $wadConfig + + Description + + + + -----------This example installs the extension configuration in the specified Cloud Service and applies them on roles. + + + + + + + Get-AzureDeployment + + + + Move-AzureDeployment + + + + New-AzureDeployment + + + + Remove-AzureDeployment + + + + + + + + Set-AzureDns + + Updates the IP Address of the specified DNS server. + + + + + Set + AzureDns + + + + + The Set-AzureDns cmdlets updates the IP Address of the specified DNS server. + + + + Set-AzureDns + + Name + + Specifies the name of the DNS server to be updated + + String + + + IPAddress + + Specifies the IP address of the DNS server + + String + + + ServiceName + + Specifies the name of the cloud service + + String + + + + + + Name + + Specifies the name of the DNS server to be updated + + String + + String + + + + + + IPAddress + + Specifies the IP address of the DNS server + + String + + String + + + + + + ServiceName + + Specifies the name of the cloud service + + String + + String + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.Common.ManagementOperationContext + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Set-AzureDns -ServiceName "myservice" -IPAddress 10.1.2.5 -Name "mydns" + + Description + + + + -----------This command updates the IP Address of the DNS server "mydns" + + + + + + + Unknown + + + + + + + + + + Set-AzureEndpoint + + + The Set-AzureInputEndpoint cmdlet updates an existing endpoint assigned to a virtual machine. You can specify updates to an endpoint that is not load balanced, which only a single virtual machine uses. + + + + + Set + AzureEndpoint + + + + + + + + + Set-AzureEndpoint + + Name + + Specifies the name of the endpoint. + + string + + + Protocol + + Specifies the protocol of the endpoint. Acceptable values are "tcp" or "udp". + + string + + + LocalPort + + Specifies the local (private) port that will be used for the endpoint. Applications within the virtual machine listen to this port to service input requests over the endpoint. + + int + + + VM + + Specifies the virtual machine object for which the endpoint will be created. + + IPersistentVM + + + ACL + + An ACL to apply to the endpoint on update. + + NetworkAclObject + + + DirectServerReturn + + + + System.Nullable`1[[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + + + IdleTimeoutInMinutes + + TCP Idle timeout in minutes + + int + + + InternalLoadBalancerName + + Not Specified + + string + + + LoadBalancerDistribution + + + Load Balancer distribution algorithm + + The value can be + sourceIP: 2 tuple affinity (Source IP, Destination IP) + sourceIPProtocol: 3 tuple affinity (Source IP, Destination IP, Protocol) + none: 5 tuple affinity (Source IP, Source Port, Destination IP, Destination Port, Protocol). This is the default value + + + string + + + PipelineVariable + + Not Specified + + string + + + PublicPort + + + + System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + + + + + + + ACL + + An ACL to apply to the endpoint on update. + + + NetworkAclObject + + NetworkAclObject + + + + + + DirectServerReturn + + + + + System.Nullable`1[[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + + System.Nullable`1[[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + + + + + + IdleTimeoutInMinutes + + TCP Idle timeout in minutes + + + int + + int + + + + + + InternalLoadBalancerName + + Not Specified + + + string + + string + + + + + + LoadBalancerDistribution + + + Load Balancer distribution algorithm + + The value can be + sourceIP: 2 tuple affinity (Source IP, Destination IP) + sourceIPProtocol: 3 tuple affinity (Source IP, Destination IP, Protocol) + none: 5 tuple affinity (Source IP, Source Port, Destination IP, Destination Port, Protocol). This is the default value + + + + string + + string + + + + + + LocalPort + + Specifies the local (private) port that will be used for the endpoint. Applications within the virtual machine listen to this port to service input requests over the endpoint. + + + int + + int + + + + + + Name + + Specifies the name of the endpoint. + + + string + + string + + + + + + PipelineVariable + + Not Specified + + + string + + string + + + + + + Protocol + + Specifies the protocol of the endpoint. Acceptable values are "tcp" or "udp". + + + string + + string + + + + + + PublicPort + + + + + System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + + System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + + + + + + VM + + Specifies the virtual machine object for which the endpoint will be created. + + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + + + + + System.Object + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + C:\PS> + + + + + Description + ----------- + + Description + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set-AzureInternalLoadBalancer + + + + + + + Set + AzureInternalLoadBalancer + + + + + + + + + Set-AzureInternalLoadBalancer + + InternalLoadBalancerName + + + + String + + + ServiceName + + + + String + + + + Set-AzureInternalLoadBalancer + + InternalLoadBalancerName + + + + String + + + ServiceName + + + + String + + + SubnetName + + + + String + + + StaticVNetIPAddress + + + + IPAddress + + + + Set-AzureInternalLoadBalancer + + InternalLoadBalancerName + + + + String + + + ServiceName + + + + String + + + SubnetName + + + + String + + + + + + InternalLoadBalancerName + + + + String + + String + + + + + + ServiceName + + + + String + + String + + + + + + SubnetName + + + + String + + String + + + + + + StaticVNetIPAddress + + + + IPAddress + + IPAddress + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set-AzureLoadBalancedEndpoint + + + Updates all of the endpoints in a given load balancer set within a Windows Azure Service. + + + + + Set + AzureLoadBalancedEndpoint + + + + The Set-AzureLoadBalancedEndpoint cmdlet updates all of the endpoints in a given load balancer set within a Windows Azure Service. + + + + + Set-AzureLoadBalancedEndpoint + + ServiceName + + Specifies the name of the Windows Azure service containing the endpoint that will be modified. + + string + + + LBSetName + + Specifies the name of the load balancer set to update. + + string + + + ProbePath + + Specifies relative path to the HTTP Probe. + + string + + + ProbeProtocolHTTP + + Specifies that a HTTP Probe should be used. + + + + ProbeProtocolTCP + + Specifies that a TCP Probe should be used. + + + + ACL + + An ACL to apply to the endpoint on update. + + NetworkAclObject + + + DirectServerReturn + + Enable/Disable Direct Server Return. + + Boolean + + + IdleTimeoutInMinutes + + TCP Idle timeout in minutes + + int + + + InternalLoadBalancerName + + The Internal Load Balancer Name. + + string + + + LoadBalancerDistribution + + + Load Balancer distribution algorithm + + The value can be + sourceIP: 2 tuple affinity (Source IP, Destination IP) + sourceIPProtocol: 3 tuple affinity (Source IP, Destination IP, Protocol) + none: 5 tuple affinity (Source IP, Source Port, Destination IP, Destination Port, Protocol). This is the default value + + + string + + + LocalPort + + Specifies the local (private) port that will be used for the endpoint. Applications within the virtual machine listen to this port to service input requests over the endpoint. + + int + + + PipelineVariable + + Not Specified + + string + + + ProbeIntervalInSeconds + + Specifies the probe polling interval in seconds. + + int + + + ProbePort + + Specifies the port that the load balancer probe will use. If not specified, Windows Azure will assign the endpoints local port. + + int + + + ProbeTimeoutInSeconds + + Specifies the probe polling timeout in seconds. + + int + + + Protocol + + Specifies the protocol of the endpoint. Acceptable values are "TCP" or "UDP". + + string + + + PublicPort + + Specifies the public port that the endpoint will use. If not specified, Windows Azure will assign an available free port. + + int + + + + + + + ACL + + An ACL to apply to the endpoint on update. + + + NetworkAclObject + + NetworkAclObject + + + + + + DirectServerReturn + + Enable/Disable Direct Server Return. + + + Boolean + + Boolean + + + + + + IdleTimeoutInMinutes + + TCP Idle timeout in minutes + + + int + + int + + + + + + InternalLoadBalancerName + + The Internal Load Balancer Name. + + + string + + string + + + + + + LBSetName + + Specifies the name of the load balancer set to update. + + + string + + string + + + + + + LoadBalancerDistribution + + + Load Balancer distribution algorithm + + The value can be + sourceIP: 2 tuple affinity (Source IP, Destination IP) + sourceIPProtocol: 3 tuple affinity (Source IP, Destination IP, Protocol) + none: 5 tuple affinity (Source IP, Source Port, Destination IP, Destination Port, Protocol). This is the default value + + + + string + + string + + + + + + LocalPort + + Specifies the local (private) port that will be used for the endpoint. Applications within the virtual machine listen to this port to service input requests over the endpoint. + + + int + + int + + + + + + PipelineVariable + + Not Specified + + + string + + string + + + + + + ProbeIntervalInSeconds + + Specifies the probe polling interval in seconds. + + + int + + int + + + + + + ProbePath + + Specifies relative path to the HTTP Probe. + + + string + + string + + + + + + ProbePort + + Specifies the port that the load balancer probe will use. If not specified, Windows Azure will assign the endpoints local port. + + + int + + int + + + + + + ProbeProtocolHTTP + + Specifies that a HTTP Probe should be used. + + + SwitchParameter + + SwitchParameter + + + + + + ProbeProtocolTCP + + Specifies that a TCP Probe should be used. + + + SwitchParameter + + SwitchParameter + + + + + + ProbeTimeoutInSeconds + + Specifies the probe polling timeout in seconds. + + + int + + int + + + + + + Protocol + + Specifies the protocol of the endpoint. Acceptable values are "TCP" or "UDP". + + + string + + string + + + + + + PublicPort + + Specifies the public port that the endpoint will use. If not specified, Windows Azure will assign an available free port. + + + int + + int + + + + + + ServiceName + + Specifies the name of the Windows Azure service containing the endpoint that will be modified. + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + C:\PS> + + + + + Description + ----------- + This command will update all endpoints in the load balancer set "LBSet1" to use the TCP protocol and private port 80, and will set the load balancer probe to use the TCP protocol on port 8080. + + + + + + + + + + + + + + + + + + + + + + + + + + + Set-AzureOSDisk + + Updates the host-cache mode of a Microsoft Azure virtual machine operating system disk. + + + + + Set + AzureOSDisk + + + + + The Set-AzureOSDisk cmdlet updates the host-cache mode of a virtual machine's operating system disk. The supported host cache modes are "ReadOnly" and "ReadWrite".Caution: Running Set-AzureOSDisk on a running virtual machine will cause the virtual machine to reboot. + + + + Set-AzureOSDisk + + HostCaching + + Specifies the host cache attribute for the operating system disk. Acceptable values are: "ReadOnly" and "ReadWrite". + + String + + + VM + + Specifies the virtual machine for which to update the operating system disk. + + IPersistentVM + + + + + + HostCaching + + Specifies the host cache attribute for the operating system disk. Acceptable values are: "ReadOnly" and "ReadWrite". + + String + + String + + + + + + VM + + Specifies the virtual machine for which to update the operating system disk. + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Get-AzureVM -ServiceName $mySvc1 -name "MyTestVM2" | Set-AzureOSDisk –HostCaching "ReadOnly" + + This command sets the host cache mode of the operating system disk of the VM named "MyTestVM2" to ReadOnly. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> C:\PS>$myVM2 = Get-AzureVM -ServiceName $mySvc1 -name "MyTestVM2" + C:\PS>Set-AzureOSDisk "ReadWrite" –VM $myVM2 + + This command updates the host-cache mode of the operating system disk attached to the VM named "MyTestVM2" to ReadWrite. + + + + + + + + + + + Get-AzureOSDisk + + + + Add-AzureVMImage + + + + Get-AzureVMImage + + + + Get-AzureVM + + + + Update-AzureVM + + + + + + + + Set-AzurePublicIP + + Set-AzurePublicIP [-PublicIPName] <string> [[-IdleTimeoutInMinutes] <int>] -VM <IPersistentVM> [<CommonParameters>] + + + + + Set + AzurePublicIP + + + + + Adds a new Public IP to the virtual machine. The public ip is really assigned when the virtual machine is updated. + + + + Set-AzurePublicIP + + PublicIPName + + + + String + + + IdleTimeoutInMinutes + + TCP Idle timeout in minutes + + Nullable`1[Int32] + + + VM + + + + IPersistentVM + + + + + + PublicIPName + + + + String + + String + + + + + + IdleTimeoutInMinutes + + TCP Idle timeout in minutes + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + VM + + + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.ServiceManagement.Model.IPersistentVM + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Get-AzureVM -ServiceName FTPInAzure -Name FTPInstance | Set-AzurePublicIP -PublicIPName ftpip | Update-AzureVM + + Description + + + + -----------Requests for a public IP to be assigned to the virtual machine. The public ip allocation happens during update VM. + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> New-AzureVMConfig -Name "FTPInstance" -InstanceSize Small -ImageName $images[50].ImageName | Add-AzureProvisioningConfig -Windows -AdminUsername xyz -Password abcd123! | Set-AzurePublicIP -PublicIPName "ftpip" | New-AzureVM -ServiceName "FTPinAzure" -Location "North Central US" + + Description + + + + -----------Requests for a public IP to be assigned during VM creation. + + + + + + + Unknown + + + + + + + + Set-AzureRole + + Sets the number of instances of a Microsoft Azure role to run. + + + + + Set + AzureRole + + + + + The Set-AzureRole cmdlet sets the number of instances of a specified role to run in a Microsoft Azure deployment. + + + + Set-AzureRole + + ServiceName + + Specifies the name of the Microsoft Azure service. + + String + + + Slot + + Specifies the deployment environment of the deployment to be modified. Choices are "Production" or "Staging". + + String + + + RoleName + + Specifies the name of the role to set the number of instances for. + + String + + + Count + + Specifies the number of role instances to run. + + Int32 + + + + + + ServiceName + + Specifies the name of the Microsoft Azure service. + + String + + String + + + + + + Slot + + Specifies the deployment environment of the deployment to be modified. Choices are "Production" or "Staging". + + String + + String + + + + + + RoleName + + Specifies the name of the role to set the number of instances for. + + String + + String + + + + + + Count + + Specifies the number of role instances to run. + + Int32 + + Int32 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Set-AzureRole –ServiceName "MySvc1" –Slot "Production" –RoleName "MyTestRole3" –Count 3 + + This command sets the "MyTestRole3" role running in production on the "MySvc1" service to three instances. + + + + + + + + + + + + + + + Set-AzureService + + Sets or updates the label and description of the specified Microsoft Azure service. + + + + + Set + AzureService + + + + + The Set-AzureService cmdlet assigns a label and description to a service in the current subscription. + + + + Set-AzureService + + ServiceName + + Specifies the name of the Microsoft Azure service to be updated. + + String + + + Label + + Sets a label for the Microsoft Azure service. The label may be up to 100 characters in length. + + String + + + Description + + Sets a description for the Microsoft Azure service. The description may be up to 1024 characters in length. + + String + + + ReverseDnsFqdn + + + + String + + + + + + ServiceName + + Specifies the name of the Microsoft Azure service to be updated. + + String + + String + + + + + + Label + + Sets a label for the Microsoft Azure service. The label may be up to 100 characters in length. + + String + + String + + + + + + Description + + Sets a description for the Microsoft Azure service. The description may be up to 1024 characters in length. + + String + + String + + + + + + ReverseDnsFqdn + + + + String + + String + + + + + + + + + + + + + + + + + + + + + ManagementOperationContext + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Set-AzureService -ServiceName "MySvc1" -Label "MyTestSvc1" -Description "My service for testing out new configurations" + + This command sets the label to "MyTestSvc1" and the description to "My service for testing out new configurations" for the "MyTestSvc1" service. + + + + + + + + + + + Get-AzureService + + + + New-AzureService + + + + Remove-AzureService + + + + + + + + Set-AzureServiceADDomainExtension + + Set AD Domain Extension for Cloud Service + + + + + Set + AzureServiceADDomainExtension + + + + + Set AD Domain Extension for Cloud Service + + + + Set-AzureServiceADDomainExtension + + ServiceName + + The cloud service name. + + String + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + + Role + + An optional array of roles to specify the remote desktop configuration for. If not specified the AD domain configuration is applied as the default configuration for all roles. + + String[] + + + X509Certificate + + An x509 certificate that when specified will be automatically uploaded to the cloud service and used for encrypting the extension private configuration. + + X509Certificate2 + + + ThumbprintAlgorithm + + Thumbprint hashing algorithm which is used with the thumbprint to identify the certificate. This parameter is optional and the default is sha1. + + String + + + DomainName + + The AD domain name. + + String + + + Restart + + Whether to restart the computer if the join operation succeeded. + + SwitchParameter + + + Credential + + The credentials (user name/password) to join the AD domain. + + PSCredential + + + UnjoinDomainCredential + + The credentials (user name/password) to unjoin the AD domain. + + PSCredential + + + Options + + The unsigned integer join option. + + JoinOptions + + + OUPath + + The OU path for AD domain join operation. + + String + + + Version + + + + String + + + + Set-AzureServiceADDomainExtension + + ServiceName + + The cloud service name. + + String + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + + Role + + An optional array of roles to specify the remote desktop configuration for. If not specified the AD domain configuration is applied as the default configuration for all roles. + + String[] + + + X509Certificate + + An x509 certificate that when specified will be automatically uploaded to the cloud service and used for encrypting the extension private configuration. + + X509Certificate2 + + + ThumbprintAlgorithm + + Thumbprint hashing algorithm which is used with the thumbprint to identify the certificate. This parameter is optional and the default is sha1. + + String + + + DomainName + + The AD domain name. + + String + + + Restart + + Whether to restart the computer if the join operation succeeded. + + SwitchParameter + + + Credential + + The credentials (user name/password) to join the AD domain. + + PSCredential + + + UnjoinDomainCredential + + The credentials (user name/password) to unjoin the AD domain. + + PSCredential + + + JoinOption + + The join option enumeration. + + UInt32 + + + OUPath + + The OU path for AD domain join operation. + + String + + + Version + + + + String + + + + Set-AzureServiceADDomainExtension + + ServiceName + + The cloud service name. + + String + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + + Role + + An optional array of roles to specify the remote desktop configuration for. If not specified the AD domain configuration is applied as the default configuration for all roles. + + String[] + + + X509Certificate + + An x509 certificate that when specified will be automatically uploaded to the cloud service and used for encrypting the extension private configuration. + + X509Certificate2 + + + ThumbprintAlgorithm + + Thumbprint hashing algorithm which is used with the thumbprint to identify the certificate. This parameter is optional and the default is sha1. + + String + + + WorkgroupName + + The workgroup name. + + String + + + Restart + + Whether to restart the computer if the join operation succeeded. + + SwitchParameter + + + Credential + + The credentials (user name/password) to join the AD domain. + + PSCredential + + + + Set-AzureServiceADDomainExtension + + ServiceName + + The cloud service name. + + String + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + + Role + + An optional array of roles to specify the remote desktop configuration for. If not specified the AD domain configuration is applied as the default configuration for all roles. + + String[] + + + CertificateThumbprint + + A certificate thumbprint to use for encrypting the private configuration. If not specified a certificate will be created for you. This certificate has to already exist in the certificate store. + + String + + + ThumbprintAlgorithm + + Thumbprint hashing algorithm which is used with the thumbprint to identify the certificate. This parameter is optional and the default is sha1. + + String + + + WorkgroupName + + The workgroup name. + + String + + + Restart + + Whether to restart the computer if the join operation succeeded. + + SwitchParameter + + + Credential + + The credentials (user name/password) to join the AD domain. + + PSCredential + + + + Set-AzureServiceADDomainExtension + + ServiceName + + The cloud service name. + + String + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + + Role + + An optional array of roles to specify the remote desktop configuration for. If not specified the AD domain configuration is applied as the default configuration for all roles. + + String[] + + + CertificateThumbprint + + A certificate thumbprint to use for encrypting the private configuration. If not specified a certificate will be created for you. This certificate has to already exist in the certificate store. + + String + + + ThumbprintAlgorithm + + Thumbprint hashing algorithm which is used with the thumbprint to identify the certificate. This parameter is optional and the default is sha1. + + String + + + DomainName + + The AD domain name. + + String + + + Restart + + Whether to restart the computer if the join operation succeeded. + + SwitchParameter + + + Credential + + The credentials (user name/password) to join the AD domain. + + PSCredential + + + UnjoinDomainCredential + + The credentials (user name/password) to unjoin the AD domain. + + PSCredential + + + JoinOption + + The join option enumeration. + + UInt32 + + + OUPath + + The OU path for AD domain join operation. + + String + + + Version + + + + String + + + + Set-AzureServiceADDomainExtension + + ServiceName + + The cloud service name. + + String + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + + Role + + An optional array of roles to specify the remote desktop configuration for. If not specified the AD domain configuration is applied as the default configuration for all roles. + + String[] + + + CertificateThumbprint + + A certificate thumbprint to use for encrypting the private configuration. If not specified a certificate will be created for you. This certificate has to already exist in the certificate store. + + String + + + ThumbprintAlgorithm + + Thumbprint hashing algorithm which is used with the thumbprint to identify the certificate. This parameter is optional and the default is sha1. + + String + + + DomainName + + The AD domain name. + + String + + + Restart + + Whether to restart the computer if the join operation succeeded. + + SwitchParameter + + + Credential + + The credentials (user name/password) to join the AD domain. + + PSCredential + + + UnjoinDomainCredential + + The credentials (user name/password) to unjoin the AD domain. + + PSCredential + + + Options + + The unsigned integer join option. + + JoinOptions + + + OUPath + + The OU path for AD domain join operation. + + String + + + Version + + + + String + + + + + + ServiceName + + The cloud service name. + + String + + String + + + + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + String + + + + + + Role + + An optional array of roles to specify the remote desktop configuration for. If not specified the AD domain configuration is applied as the default configuration for all roles. + + String[] + + String[] + + + + + + X509Certificate + + An x509 certificate that when specified will be automatically uploaded to the cloud service and used for encrypting the extension private configuration. + + X509Certificate2 + + X509Certificate2 + + + + + + ThumbprintAlgorithm + + Thumbprint hashing algorithm which is used with the thumbprint to identify the certificate. This parameter is optional and the default is sha1. + + String + + String + + + + + + DomainName + + The AD domain name. + + String + + String + + + + + + Restart + + Whether to restart the computer if the join operation succeeded. + + SwitchParameter + + SwitchParameter + + + + + + Credential + + The credentials (user name/password) to join the AD domain. + + PSCredential + + PSCredential + + + + + + UnjoinDomainCredential + + The credentials (user name/password) to unjoin the AD domain. + + PSCredential + + PSCredential + + + + + + Options + + The unsigned integer join option. + + JoinOptions + + JoinOptions + + + + + + OUPath + + The OU path for AD domain join operation. + + String + + String + + + + + + Version + + + + String + + String + + + + + + JoinOption + + The join option enumeration. + + UInt32 + + UInt32 + + + + + + WorkgroupName + + The workgroup name. + + String + + String + + + + + + CertificateThumbprint + + A certificate thumbprint to use for encrypting the private configuration. If not specified a certificate will be created for you. This certificate has to already exist in the certificate store. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Unknown + + + + + + + + Set-AzureServiceAntimalwareExtension + + Configures the Microsoft Antimalware extension for cloud services. + + + + + Set + AzureServiceAntimalwareExtension + + + + + The Set-AzureServiceAntimalwareExtension cmdlet configures the Microsoft Antimalware extension for a cloud service. You can specify values that override and supplement values in the XML configuration, such as storage account context. + + + + Set-AzureServiceAntimalwareExtension + + ServiceName + + Specifies the name of the cloud service. + + String + + + Slot + + Specifies a deployment slot. Valid values are: + +-- Production +-- Staging + +The default value is Production. + + String + + + Role + + Specifies an array of roles. The default value is all roles. + + String[] + + + AntimalwareConfiguration + + Specifies an XmlDocument object that contains the Microsoft Antimalware configuration. This object must not be $Null or empty. The configuration object must include, at a minimum, the following content to enable the Microsoft Antimalware extension: + +<AntimalwareConfig><AntimalwareEnabled>true</AntimalwareEnabled></AntimalwareConfig> + + XmlDocument + + + Monitoring + + Specifies whether to collect Microsoft Antimalware events. Valid values are: + +-- ON. Collect Microsoft Antimalware events to storage context. +-- OFF. Do not collect Microsoft Antimalware events. + + String + + + StorageContext + + Specifies an Azure storage context for Microsoft Antimalware monitoring. + + AzureStorageContext + + + + Set-AzureServiceAntimalwareExtension + + ServiceName + + Specifies the name of the cloud service. + + String + + + Slot + + Specifies a deployment slot. Valid values are: + +-- Production +-- Staging + +The default value is Production. + + String + + + Role + + Specifies an array of roles. The default value is all roles. + + String[] + + + AntimalwareConfiguration + + Specifies an XmlDocument object that contains the Microsoft Antimalware configuration. This object must not be $Null or empty. The configuration object must include, at a minimum, the following content to enable the Microsoft Antimalware extension: + +<AntimalwareConfig><AntimalwareEnabled>true</AntimalwareEnabled></AntimalwareConfig> + + XmlDocument + + + Monitoring + + Specifies whether to collect Microsoft Antimalware events. Valid values are: + +-- ON. Collect Microsoft Antimalware events to storage context. +-- OFF. Do not collect Microsoft Antimalware events. + + String + + + StorageContext + + Specifies an Azure storage context for Microsoft Antimalware monitoring. + + AzureStorageContext + + + + + + ServiceName + + Specifies the name of the cloud service. + + String + + String + + + none + + + Slot + + Specifies a deployment slot. Valid values are: + +-- Production +-- Staging + +The default value is Production. + + String + + String + + + none + + + Role + + Specifies an array of roles. The default value is all roles. + + String[] + + String[] + + + none + + + AntimalwareConfiguration + + Specifies an XmlDocument object that contains the Microsoft Antimalware configuration. This object must not be $Null or empty. The configuration object must include, at a minimum, the following content to enable the Microsoft Antimalware extension: + +<AntimalwareConfig><AntimalwareEnabled>true</AntimalwareEnabled></AntimalwareConfig> + + XmlDocument + + XmlDocument + + + none + + + Monitoring + + Specifies whether to collect Microsoft Antimalware events. Valid values are: + +-- ON. Collect Microsoft Antimalware events to storage context. +-- OFF. Do not collect Microsoft Antimalware events. + + String + + String + + + none + + + StorageContext + + Specifies an Azure storage context for Microsoft Antimalware monitoring. + + AzureStorageContext + + AzureStorageContext + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Enable the extension -------------------------- + + + + PS C:\>[System.Xml.XmlDocument] $XmlConfig = New-Object System.Xml.XmlDocument +PS C:\> $XmlConfig.load('C:\configuration\contosoVM.xml') +PS C:\> Set-AzureServiceAntimalwareExtension -ServiceName "ContosoService03" -AntimalwareConfiguration $XmlConfig +Operation succeeded + + The first two commands create an XmlDocument object that contains a configuration for the Microsoft Antimalware extension, and then stores it in the $XmlConfig variable. + + + + The third command enables the Microsoft Antimalware extension for the service named ContosoService03, by using the configuration stored in $XmlConfig. Because the command does not specify the Slot parameter, the cmdlet uses the default value, Production. + + + + + -------------------------- Example 2: Enable the extension for the Staging slot -------------------------- + + + + PS C:\>[System.Xml.XmlDocument] $XmlConfig = New-Object System.Xml.XmlDocument +PS C:\> $XmlConfig.load('C:\configuration\contosoVM.xml') +PS C:\> Set-AzureServiceAntimalwareExtension -ServiceName "ContosoService03" -Slot "Staging" -AntimalwareConfiguration $XmlConfig +Operation succeeded + + The first two commands create an XmlDocument object that contains a configuration for the Microsoft Antimalware extension, and then stores it in the $XmlConfig variable. + + + + The third command enables the Microsoft Antimalware extension for the service named ContosoService03, by using the configuration stored in $XmlConfig. This command specifies a value of Staging for the Slot parameter. + + + + + -------------------------- Example 3: Enable the extension with monitoring -------------------------- + + + + PS C:\>[System.Xml.XmlDocument] $XmlConfig = New-Object System.Xml.XmlDocument +PS C:\> $XmlConfig.load('C:\configuration\contosoVM.xml') +PS C:\> $StorageContext = New-AzureStorageContext -StorageAccountName "contosostoragemain" -StorageAccountKey (Get-AzureStorageKey -StorageAccountName "Contosostoragemain").Primary +PS C:\> Set-AzureServiceAntimalwareExtension -ServiceName "ContosoService03" -AntimalwareConfiguration $XmlConfig -Monitoring ON -StorageContext $StorageContext + + The first two commands create an XmlDocument object that contains a configuration for the Microsoft Antimalware extension, and then stores it in the $XmlConfig variable. + + + + The third command creates an AzureStorageContext object by using the New-AzureStorageContext cmdlet, and then stores it in the $StorageContext variable.The final command enables the Microsoft Antimalware extension for the service named ContosoService03, by using the configuration stored in $XmlConfig. This command also specifies a value of ON for the Monitoring parameter and specifies the Azure storage context stored in $StorageContext. The values specified by these parameters override any corresponding values for these parameters that were specified within the XML configuration. + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=402843 + + + New-AzureStorageContext + + + + Get-AzureServiceAntimalwareConfig + + + + Remove-AzureServiceAntimalwareExtension + + + + + + + + Set-AzureServiceDiagnosticsExtension + + This cmdlet enables diagnostics extension on specified role(s) or all roles on a deployed service or at deployment. + + + + + Set + AzureServiceDiagnosticsExtension + + + + + This cmdlet enables diagnostics extension on specified role(s) or all roles on a deployed service or at deployment. + + + + Set-AzureServiceDiagnosticsExtension + + ServiceName + + Specifies the Microsoft Azure service name of the deployment. + + String + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + + Role + + An optional array of roles to specify the diagnostics configuration for. If not specified the diagnostics configuration is applied as the default configuration for all roles. + + String[] + + + X509Certificate + + An x509 certificate that when specified will be automatically uploaded to the cloud service and used for encrypting the extension private configuration. + + X509Certificate2 + + + ThumbprintAlgorithm + + Thumbprint hashing algorithm which is used with the thumbprint to identify the certificate. This parameter is optional and the default is sha1. + + String + + + StorageContext + + + + AzureStorageContext + + + DiagnosticsConfigurationPath + + + + String + + + + Set-AzureServiceDiagnosticsExtension + + ServiceName + + Specifies the Microsoft Azure service name of the deployment. + + String + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + + Role + + An optional array of roles to specify the diagnostics configuration for. If not specified the diagnostics configuration is applied as the default configuration for all roles. + + String[] + + + CertificateThumbprint + + A certificate thumbprint to use for encrypting the private configuration. If not specified a certificate will be created for you. This certificate has to already exist in the certificate store. + + String + + + ThumbprintAlgorithm + + Thumbprint hashing algorithm which is used with the thumbprint to identify the certificate. This parameter is optional and the default is sha1. + + String + + + StorageContext + + + + AzureStorageContext + + + DiagnosticsConfigurationPath + + + + String + + + + + + ServiceName + + Specifies the Microsoft Azure service name of the deployment. + + String + + String + + + + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + String + + + + + + Role + + An optional array of roles to specify the diagnostics configuration for. If not specified the diagnostics configuration is applied as the default configuration for all roles. + + String[] + + String[] + + + + + + X509Certificate + + An x509 certificate that when specified will be automatically uploaded to the cloud service and used for encrypting the extension private configuration. + + X509Certificate2 + + X509Certificate2 + + + + + + ThumbprintAlgorithm + + Thumbprint hashing algorithm which is used with the thumbprint to identify the certificate. This parameter is optional and the default is sha1. + + String + + String + + + + + + StorageContext + + + + AzureStorageContext + + AzureStorageContext + + + + + + DiagnosticsConfigurationPath + + + + String + + String + + + + + + CertificateThumbprint + + A certificate thumbprint to use for encrypting the private configuration. If not specified a certificate will be created for you. This certificate has to already exist in the certificate store. + + String + + String + + + + + + DiagnosticsConfiguration + + Configuration for Microsoft Azure diagnostics. The schema is: +<?xml version="1.0" encoding="utf-8"?> +<xs:schema id="DiagnosticsConfigSchema" + targetNamespace="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration" + elementFormDefault="qualified" + xmlns="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration" + xmlns:wad="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration" + xmlns:mstns="http://tempuri.org/XMLSchema.xsd" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <xs:simpleType name="PositiveDuration"> + <xs:restriction base="xs:duration"> + <xs:minInclusive value="PT0S" /> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="LogLevel"> + <xs:restriction base="xs:string"> + <xs:enumeration value="Undefined" /> + <xs:enumeration value="Verbose" /> + <xs:enumeration value="Information" /> + <xs:enumeration value="Warning" /> + <xs:enumeration value="Error" /> + <xs:enumeration value="Critical" /> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="ContainerName"> + <xs:restriction base="xs:string"> + <xs:pattern value="[a-z0-9][a-z0-9\-]{1,61}[a-z0-9]" /> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="locale"> + <xs:restriction base="xs:string"> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="displayName"> + <xs:restriction base="xs:string"> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="AbsolutePathWithEnvironmentExpansion"> + <xs:restriction base="xs:string"> + <xs:pattern value="([a-zA-Z]:\)?([^&lt;&gt;:&quot;/|?*]+)*(\)?" /> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="RelativePathWithEnvironmentExpansion"> + <xs:restriction base="xs:string"> + <xs:pattern value="([^&lt;&gt;:&quot;/\|?*]+)(\([^&lt;&gt;:&quot;/\|?*]+))*(\)?" /> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="PerformanceCounterPath"> + <xs:restriction base="xs:string"> + <xs:pattern value="\.*" /> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="EventNameType"> + <xs:restriction base="xs:string"> + <xs:pattern value="[a-zA-Z][_a-zA-Z0-9]{0,59}" /> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="CrashDumpType" > + <xs:restriction base="xs:string"> + <xs:enumeration value="Mini"/> + <xs:enumeration value="Full"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="NamedElementNameString"> + <xs:restriction base="xs:string"> + <xs:pattern value="^[a-zA-Z_][^\\/\:\*\?\&quot;\&lt;\&gt;\|]*(?&lt;![\.\s])$" /> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="format"> + <xs:restriction base="xs:string"> + <xs:enumeration value="Manifest" /> + <xs:enumeration value="EventSource" /> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="directoryQuotaPercentage"> + <xs:restriction base="xs:integer"> + <xs:minInclusive value="0"/> + <xs:maxInclusive value="100"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="guidType"> + <xs:annotation> + <xs:documentation> + A GUID. Brackets (and only brakets) before and/or after are ignored. e.g. {12345678-1234-1234-1234-123456789abc}, {12345678-1234-1234-1234-123456789abc, 12345678-1234-1234-1234-123456789abc} and 12345678-1234-1234-1234-123456789abc are valid. + </xs:documentation> + </xs:annotation> + <xs:restriction base="xs:string"> + <xs:pattern value="^(\{){0,1}[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}(\}){0,1}$"/> + </xs:restriction> + </xs:simpleType> + + <xs:attributeGroup name="BasicConfiguration"> + <xs:attribute name="scheduledTransferPeriod" type="PositiveDuration" use="optional" default="PT0S"> + <xs:annotation> + <xs:documentation> + The interval between scheduled transfers for this data, rounded up to the nearest minute. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:attributeGroup> + + <xs:attributeGroup name="ETWConfiguration"> + <xs:attribute name="scheduledTransferPeriod" type="PositiveDuration" use="optional" default="PT0S"> + <xs:annotation> + <xs:documentation> + The interval between scheduled transfers for this data, rounded up to the nearest minute. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="scheduledTransferLogLevelFilter" type="LogLevel" use="optional" default="Undefined"> + <xs:annotation> + <xs:documentation> + The minimum log severity to transfer. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="provider" type="xs:string" use="required"> + <xs:annotation> + <xs:documentation> + The provider guid or class name for event source + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="scheduledTransferKeywordFilter" type="xs:unsignedLong" use="optional" default="0" > + <xs:annotation> + <xs:documentation> + The keyword to filter by + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:attributeGroup> + + <xs:attributeGroup name="LogLevel"> + <xs:attribute name="scheduledTransferLogLevelFilter" type="LogLevel" use="optional" default="Undefined"> + <xs:annotation> + <xs:documentation> + The minimum log severity to transfer. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:attributeGroup> + + <xs:attributeGroup name="DirectoryAttributes"> + <xs:attribute name="containerName" type="wad:ContainerName" use="required"> + <xs:annotation> + <xs:documentation> + The name of the container where the content of the directory is to be transferred. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:attributeGroup> + + <xs:attributeGroup name="CrashDumpConfiguration"> + <xs:attribute name="directoryQuotaPercentage" type="directoryQuotaPercentage" use="optional" default="10"> + <xs:annotation> + <xs:documentation> + The percentage of directory quota used by crashdumps + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="dumpType" type="CrashDumpType" use="optional" default="Mini"> + <xs:annotation> + <xs:documentation> + The type of crashdump + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="containerName" type="wad:ContainerName" use="optional" default="wad-crashdumps"> + <xs:annotation> + <xs:documentation> + The blob container to store the crashdumps + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:attributeGroup> + + <xs:complexType name="LogsBase"> + <xs:attributeGroup ref="BasicConfiguration" /> + </xs:complexType> + + <xs:complexType name="EtwEventsBase"> + <xs:attributeGroup ref="ETWConfiguration" /> + </xs:complexType> + + <xs:complexType name ="CrashDumpsBase"> + <xs:attributeGroup ref="CrashDumpConfiguration"/> + </xs:complexType> + + <xs:complexType name="EtwManifestProviderConfiguration"> + <xs:complexContent> + <xs:extension base="EtwEventsBase"> + <xs:sequence> + <xs:element maxOccurs="unbounded" name="Event" minOccurs="0"> + <xs:complexType> + <xs:attribute name="id" type="xs:int" use="required"> + <xs:annotation> + <xs:documentation> + The id of the ETW event that is to be collected + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="eventDestination" type="EventNameType" use="optional"> + <xs:annotation> + <xs:documentation> + The name of the table in which the event data will be stored. If this attribute is not defined the table's name is 'Event'+'MD5 of the provider'+EventId#. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + </xs:element> + <xs:element name="DefaultEvents" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:attribute name="eventDestination" type="EventNameType" use="optional"> + <xs:annotation> + <xs:documentation> + The name of the table in which the event data will be stored. If this attribute is not defined the table's name is 'Default'+'MD5 of the provider'+EventId#. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="EtwEventSourceProviderConfiguration"> + <xs:complexContent> + <xs:extension base="EtwEventsBase"> + <xs:sequence> + <xs:element maxOccurs="unbounded" name="Event" minOccurs="0"> + <xs:complexType> + <xs:attribute name="id" type="xs:int" use="required"> + <xs:annotation> + <xs:documentation> + The id of the ETW event that is to be collected + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="eventDestination" type="EventNameType" use="optional"> + <xs:annotation> + <xs:documentation> + The name of the table in which the event data will be stored. If this attribute is not defined the table's name is 'Event'+'MD5 of the provider'+EventId#. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + </xs:element> + <xs:element name="DefaultEvents" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:attribute name="eventDestination" type="EventNameType" use="optional"> + <xs:annotation> + <xs:documentation> + The name of the table in which the event data will be stored. If this attribute is not defined the table's name is 'Default'+'MD5 of the provider'+EventId#. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="EtwProviders"> + <xs:sequence maxOccurs="unbounded"> + <xs:element name="EtwEventSourceProviderConfiguration" type="EtwEventSourceProviderConfiguration" minOccurs="0" > + <xs:annotation> + <xs:documentation> + ETW collection by event source + </xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="EtwManifestProviderConfiguration" type="EtwManifestProviderConfiguration" minOccurs="0"> + <xs:annotation> + <xs:documentation> + ETW collection by manifest + </xs:documentation> + </xs:annotation> + </xs:element> + </xs:sequence> + </xs:complexType> + + <xs:complexType name="CrashDumpConfiguration"> + <xs:attribute name="processName" type="xs:string" use="required"> + <xs:annotation> + <xs:documentation> + The name of the process to to monitor for crashes. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + + <xs:complexType name="CrashDumps"> + <xs:complexContent> + <xs:extension base="CrashDumpsBase"> + <xs:sequence maxOccurs="unbounded"> + <xs:element name="CrashDumpConfiguration" type="CrashDumpConfiguration"> + <xs:annotation> + <xs:documentation> + The crashdump to collect + </xs:documentation> + </xs:annotation> + </xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="DiagnosticInfrastructureLogs"> + <xs:complexContent> + <xs:extension base="LogsBase"> + <xs:attributeGroup ref="LogLevel" /> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + + <xs:complexType name="DirectoryBase" /> + + <xs:complexType name="DirectoryAbsolute"> + <xs:complexContent> + <xs:extension base="DirectoryBase"> + <xs:attribute name="path" type="AbsolutePathWithEnvironmentExpansion" use="required"> + <xs:annotation> + <xs:documentation> + The absolute path to the directory to monitor. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="expandEnvironment" type="xs:boolean" use="required"> + <xs:annotation> + <xs:documentation> + If true, then environment variables in the path will be expanded. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="DirectoryLocalResource"> + <xs:complexContent> + <xs:extension base="DirectoryBase"> + <xs:attribute name="relativePath" type="RelativePathWithEnvironmentExpansion" use="required"> + <xs:annotation> + <xs:documentation> + The path relative to the local resource to monitor. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="name" type="NamedElementNameString" use="required"> + <xs:annotation> + <xs:documentation> + The local resource that contains the directory to monitor. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="DirectoryConfiguration"> + <xs:choice> + <xs:element name="Absolute" type="DirectoryAbsolute"> + <xs:annotation> + <xs:documentation> + The absolute path to the directory to monitor. + </xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="LocalResource" type="DirectoryLocalResource"> + <xs:annotation> + <xs:documentation> + The path relative to a local resource to monitor. + </xs:documentation> + </xs:annotation> + </xs:element> + </xs:choice> + <xs:attributeGroup ref="DirectoryAttributes" /> + </xs:complexType> + + <xs:complexType name="SpecialLogDirectory"> + <xs:attributeGroup ref="DirectoryAttributes" /> + </xs:complexType> + + <xs:complexType name="DataSources"> + <xs:sequence> + <xs:element name="DirectoryConfiguration" type="DirectoryConfiguration" maxOccurs="unbounded"> + <xs:annotation> + <xs:documentation> + The directory of log files to monitor. + </xs:documentation> + </xs:annotation> + </xs:element> + </xs:sequence> + </xs:complexType> + + <xs:complexType name="Directories"> + <xs:complexContent> + <xs:extension base="LogsBase"> + <xs:all> + <xs:element name="IISLogs" type="SpecialLogDirectory" minOccurs="0"> + <xs:annotation> + <xs:documentation> + The IIS log directory. + </xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="FailedRequestLogs" type="SpecialLogDirectory" minOccurs="0"> + <xs:annotation> + <xs:documentation> + The failed request log directory. + </xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="DataSources" type="DataSources" minOccurs="0"> + <xs:annotation> + <xs:documentation> + Additional log directories. + </xs:documentation> + </xs:annotation> + </xs:element> + </xs:all> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="annotation"> + <xs:attribute name="displayName" type="displayName" use="required"> + <xs:annotation> + <xs:documentation> + The display name for the performance counter. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="locale" type="locale" use="optional" default="en-US"> + <xs:annotation> + <xs:documentation> + The locale for the performance counter diplay name. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + + <xs:complexType name="PerformanceCounterConfiguration"> + <xs:sequence minOccurs="0"> + <xs:element maxOccurs="unbounded" name="annotation" type="annotation"> + <xs:annotation> + <xs:documentation> + The display name and locale for the performance counter + </xs:documentation> + </xs:annotation> + </xs:element> + </xs:sequence> + <xs:attribute name="counterSpecifier" type="PerformanceCounterPath" use="required"> + <xs:annotation> + <xs:documentation> + The path to the performance counter to collect. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="sampleRate" type="PositiveDuration" use="required"> + <xs:annotation> + <xs:documentation> + The rate at which the performance counter should be sampled. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="unit" type="xs:string" use="optional"> + <xs:annotation> + <xs:documentation> + The unit for the performance counter for display purposes. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + + <xs:complexType name="PerformanceCounters"> + <xs:complexContent> + <xs:extension base="LogsBase"> + <xs:sequence maxOccurs="unbounded"> + <xs:element name="PerformanceCounterConfiguration" type="PerformanceCounterConfiguration"> + <xs:annotation> + <xs:documentation> + The performance counter to collect. + </xs:documentation> + </xs:annotation> + </xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + + + <xs:complexType name="DataSource"> + <xs:attribute name="name" type="xs:string" use="required"> + <xs:annotation> + <xs:documentation> + An XPath expression specifying the logs to collect. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + + <xs:complexType name="WindowsEventLog"> + <xs:complexContent> + <xs:extension base="LogsBase"> + <xs:sequence maxOccurs="unbounded"> + <xs:element name="DataSource" type="DataSource"> + <xs:annotation> + <xs:documentation> + The event log to monitor. + </xs:documentation> + </xs:annotation> + </xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="DiagnosticMonitorConfiguration"> + <xs:all> + <xs:element name="DiagnosticInfrastructureLogs" type="DiagnosticInfrastructureLogs" minOccurs="0"> + <xs:annotation> + <xs:documentation> + Configures the logs generated by the underlying diagnostics infrastructure. The diagnostic infrastructure logs are useful for troubleshooting the diagnostics system itself. + </xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="Directories" type="Directories" minOccurs="0"> + <xs:annotation> + <xs:documentation> + Describes the configuration of a directory to which file-based logs are written. + </xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="PerformanceCounters" type="PerformanceCounters" minOccurs="0"> + <xs:annotation> + <xs:documentation> + Configures performance counter collection. + </xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="WindowsEventLog" type="WindowsEventLog" minOccurs="0"> + <xs:annotation> + <xs:documentation> + Configures Windows event log collection. + </xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="EtwProviders" type="EtwProviders" minOccurs="0"> + <xs:annotation> + <xs:documentation> + Configures ETW event collection. + </xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="CrashDumps" type="CrashDumps" minOccurs="0"> + <xs:annotation> + <xs:documentation> + Configures crashdump collection. + </xs:documentation> + </xs:annotation> + </xs:element> + </xs:all> + + <xs:attribute name="overallQuotaInMB" type="xs:unsignedInt" use="optional" default="5120"> + <xs:annotation> + <xs:documentation> + The total amount of file system storage allocated for all logging buffers. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="useProxyServer" type="xs:boolean" use="optional" default="true"> + <xs:annotation> + <xs:documentation> + Force the Monitoring Agent to use the specified IE proxy server if specified. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + + <xs:element name="PublicConfig"> + <xs:complexType> + <xs:all> + <xs:element name="WadCfg"> + <xs:complexType> + <xs:sequence> + <xs:element name="DiagnosticMonitorConfiguration" type="DiagnosticMonitorConfiguration" minOccurs="1" maxOccurs="1" /> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="LocalResourceDirectory" minOccurs="0" maxOccurs="1" type="DirectoryAbsolute" /> + <xs:element name="StorageAccount" minOccurs="0" maxOccurs="1" type="xs:string" /> + </xs:all> + </xs:complexType> + </xs:element> +</xs:schema> + + xmldocument + + xmldocument + + + + + + StorageAccountName + + The name of the storage account diagnostics will use to store diagnostics data such as performance counter data and file logs. + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Set-AzureServiceDiagnosticExtension -ServiceName $svc -StorageAccountName $name -DiagnosticConfiguration $wadConfigXML + + Description + + + + -----------Setting default diagnostic configuration for all roles. + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> Set-AzureServiceDiagnosticExtension -ServiceName $svc -StorageAccountName $name -DiagnosticConfiguration $wadConfigXML -Role "WebRole1" + + Description + + + + -----------Setting diagnostic configuration for WebRole1. + + + + + + + Unknown + + + + + + + + Set-AzureServiceExtension + + This cmdlet adds a cloud service extension to a deployment. + + + + + Set + AzureServiceExtension + + + + + This cmdlet adds a cloud service extension to a deployment. + + + + Set-AzureServiceExtension + + ServiceName + + Specifies the Microsoft Azure service name of the deployment. + + String + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + + Role + + An optional array of roles to specify the remote desktop configuration for. If not specified the remote desktop configuration is applied as the default configuration for all roles. + + String[] + + + X509Certificate + + An x509 certificate that when specified will be automatically uploaded to the cloud service and used for encrypting the extension private configuration. + + X509Certificate2 + + + ThumbprintAlgorithm + + Thumbprint hashing algorithm which is used with the thumbprint to identify the certificate. This parameter is optional and the default is sha1. + + String + + + ExtensionName + + + + String + + + ProviderNamespace + + The Extension's Provider Namespace. + + String + + + PublicConfiguration + + The public configuration text. + + String + + + PrivateConfiguration + + The private configuration text. + + String + + + Version + + The Extension Version. + + String + + + + Set-AzureServiceExtension + + ServiceName + + Specifies the Microsoft Azure service name of the deployment. + + String + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + + Role + + An optional array of roles to specify the remote desktop configuration for. If not specified the remote desktop configuration is applied as the default configuration for all roles. + + String[] + + + CertificateThumbprint + + A certificate thumbprint to use for encrypting the private configuration. If not specified a certificate will be created for you. This certificate has to already exist in the certificate store. + + String + + + ThumbprintAlgorithm + + Thumbprint hashing algorithm which is used with the thumbprint to identify the certificate. This parameter is optional and the default is sha1. + + String + + + ExtensionName + + + + String + + + ProviderNamespace + + The Extension's Provider Namespace. + + String + + + PublicConfiguration + + The public configuration text. + + String + + + PrivateConfiguration + + The private configuration text. + + String + + + Version + + The Extension Version. + + String + + + + + + ServiceName + + Specifies the Microsoft Azure service name of the deployment. + + String + + String + + + + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + String + + + + + + Role + + An optional array of roles to specify the remote desktop configuration for. If not specified the remote desktop configuration is applied as the default configuration for all roles. + + String[] + + String[] + + + + + + X509Certificate + + An x509 certificate that when specified will be automatically uploaded to the cloud service and used for encrypting the extension private configuration. + + X509Certificate2 + + X509Certificate2 + + + + + + ThumbprintAlgorithm + + Thumbprint hashing algorithm which is used with the thumbprint to identify the certificate. This parameter is optional and the default is sha1. + + String + + String + + + + + + ExtensionName + + + + String + + String + + + + + + ProviderNamespace + + The Extension's Provider Namespace. + + String + + String + + + + + + PublicConfiguration + + The public configuration text. + + String + + String + + + + + + PrivateConfiguration + + The private configuration text. + + String + + String + + + + + + Version + + The Extension Version. + + String + + String + + + + + + CertificateThumbprint + + A certificate thumbprint to use for encrypting the private configuration. If not specified a certificate will be created for you. This certificate has to already exist in the certificate store. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Set-AzureServiceExtension -Service $svc -Slot Production -ExtensionName 'RDP' -Version '1.0' -ProviderNamespace Microsoft.Windows.Azure.Extensions -PublicConfiguration $p1 -PrivateConfiguration $p2; + + Description + + + + -----------Set the Remote Desktop Extension in version 1.0 for all roles in the cloud service. + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> Set-AzureServiceExtension -Service $svc -Slot Production -Role WebRole1 -ExtensionName 'RDP' -ProviderNamespace Microsoft.Windows.Azure.Extensions -PublicConfiguration $p1 -PrivateConfiguration $p2; + + Description + + + + -----------Set the Remote Desktop Extension for the 'WebRole1' role in the cloud service. + + + + + + + Unknown + + + + + + + + Set-AzureServiceRemoteDesktopExtension + + This cmdlet enables remote desktop extension on specified role(s) or all roles on a deployed service or at deployment. + + + + + Set + AzureServiceRemoteDesktopExtension + + + + + This cmdlet enables remote desktop extension on specified role(s) or all roles on a deployed service or at deployment. + + + + Set-AzureServiceRemoteDesktopExtension + + ServiceName + + Specifies the Microsoft Azure service name of the deployment. + + String + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + + Role + + An optional array of roles to specify the remote desktop configuration for. If not specified the remote desktop configuration is applied as the default configuration for all roles. + + String[] + + + X509Certificate + + An x509 certificate that when specified will be automatically uploaded to the cloud service and used for encrypting the extension private configuration. + + X509Certificate2 + + + ThumbprintAlgorithm + + Thumbprint hashing algorithm which is used with the thumbprint to identify the certificate. This parameter is optional and the default is sha1. + + String + + + Credential + + The credentials (user name/password) to enable for remote desktop. + + PSCredential + + + Expiration + + A date time object that allows the user to specify when the user account will expire. + + DateTime + + + Version + + + + String + + + + Set-AzureServiceRemoteDesktopExtension + + ServiceName + + Specifies the Microsoft Azure service name of the deployment. + + String + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + + Role + + An optional array of roles to specify the remote desktop configuration for. If not specified the remote desktop configuration is applied as the default configuration for all roles. + + String[] + + + CertificateThumbprint + + A certificate thumbprint to use for encrypting the private configuration. If not specified a certificate will be created for you. This certificate has to already exist in the certificate store. + + String + + + ThumbprintAlgorithm + + Thumbprint hashing algorithm which is used with the thumbprint to identify the certificate. This parameter is optional and the default is sha1. + + String + + + Credential + + The credentials (user name/password) to enable for remote desktop. + + PSCredential + + + Expiration + + A date time object that allows the user to specify when the user account will expire. + + DateTime + + + Version + + + + String + + + + + + ServiceName + + Specifies the Microsoft Azure service name of the deployment. + + String + + String + + + + + + Slot + + Specifies the environment of the deployment to modify. Supported values are "Production" or "Staging". + + String + + String + + + + + + Role + + An optional array of roles to specify the remote desktop configuration for. If not specified the remote desktop configuration is applied as the default configuration for all roles. + + String[] + + String[] + + + + + + X509Certificate + + An x509 certificate that when specified will be automatically uploaded to the cloud service and used for encrypting the extension private configuration. + + X509Certificate2 + + X509Certificate2 + + + + + + ThumbprintAlgorithm + + Thumbprint hashing algorithm which is used with the thumbprint to identify the certificate. This parameter is optional and the default is sha1. + + String + + String + + + + + + Credential + + The credentials (user name/password) to enable for remote desktop. + + PSCredential + + PSCredential + + + + + + Expiration + + A date time object that allows the user to specify when the user account will expire. + + DateTime + + DateTime + + + + + + Version + + + + String + + String + + + + + + CertificateThumbprint + + A certificate thumbprint to use for encrypting the private configuration. If not specified a certificate will be created for you. This certificate has to already exist in the certificate store. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Set-AzureServiceRemoteDesktopExtension -ServiceName $svc -Credentials $creds + + Description + + + + -----------Setting default remote desktop configuration for all roles. + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> Set-AzureServiceRemoteDesktopExtension -ServiceName $svc -Credentials $creds -Role "WebRole1" + + Description + + + + -----------Setting remote desktop configuration for WebRole1. + + + + + + + Unknown + + + + + + + + Set-AzureStaticVNetIP + + Set the static VNet IP address information to a VM object. + + + + + Set + AzureStaticVNetIP + + + + + Set the static VNet IP address information to a VM object. + + + + Set-AzureStaticVNetIP + + IPAddress + + Static VNet IP Address + + String + + + VM + + Persistent VM object. + + IPersistentVM + + + + + + IPAddress + + Static VNet IP Address + + String + + String + + + + + + VM + + Persistent VM object. + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> # Prerequisite: VNet has been set up with SubNet + # Set-AzureVNetConfig -ConfigurationPath $vnetConfigPath; + + $vm = New-AzureVMConfig -Name $vmname -ImageName $img -InstanceSize $sz | Add-AzureProvisioningConfig -Windows -Password $pwd -AdminUsername $usr; + $vm = Set-AzureSubNet -VM $vm -SubNetNames $sn; + Set-AzureStaticVNETIP -IPAddress $ip -VM $vm; + New-AzureVM -ServiceName $svc -VMs $vm -VNETName $vnetName -Location $loc; + + Description + + + + ----------- + + + + + + + Unknown + + + + + + + + Set-AzureStorageAccount + + Updates the properties of a storage account in a Microsoft Azure subscription. + + + + + Set + AzureStorageAccount + + + + + The Set-AzureStorageAccount cmdlet updates the properties of a Microsoft Azure storage account in the current subscription. Properties that can be set are: "Label", "Description", "Type" and "GeoReplicationEnabled". + + + + Set-AzureStorageAccount + + StorageAccountName + + Specifies the name of the storage account to be updated. + + String + + + Label + + Specifies a label for the storage account. The label may be up to 100 characters in length. + + String + + + Description + + Specifies a description for the storage account. The description may be up to 1024 characters in length. + + String + + + GeoReplicationEnabled + + Specifies whether the storage account is created with the geo-replication enabled. + + Nullable`1[Boolean] + + + + Set-AzureStorageAccount + + StorageAccountName + + Specifies the name of the storage account to be updated. + + String + + + Label + + Specifies a label for the storage account. The label may be up to 100 characters in length. + + String + + + Description + + Specifies a description for the storage account. The description may be up to 1024 characters in length. + + String + + + Type + + Specifies the type of the storage account. Valid values are + + Standard_LRS + Standard_ZRS + Standard_GRS + Standard_RAGRS + + If this parameter is not specified, a default value of Standard_GRS is used + + Note: + The GeoReplicationEnabled parameter functionality is the same as specifying Standard_GRS in Type parameter + Standard_ZRS accounts cannot be changed to other account types, and vice versa. + + String + + + + + + StorageAccountName + + Specifies the name of the storage account to be updated. + + String + + String + + + + + + Label + + Specifies a label for the storage account. The label may be up to 100 characters in length. + + String + + String + + + + + + Description + + Specifies a description for the storage account. The description may be up to 1024 characters in length. + + String + + String + + + + + + GeoReplicationEnabled + + Specifies whether the storage account is created with the geo-replication enabled. + + Nullable`1[Boolean] + + Nullable`1[Boolean] + + + + + + Type + + Specifies the type of the storage account. Valid values are + + Standard_LRS + Standard_ZRS + Standard_GRS + Standard_RAGRS + + If this parameter is not specified, a default value of Standard_GRS is used + + Note: + The GeoReplicationEnabled parameter functionality is the same as specifying Standard_GRS in Type parameter + Standard_ZRS accounts cannot be changed to other account types, and vice versa. + + String + + String + + + + + + PipelineVariable + + Not Specified + + string + + string + + + + + + + + + + + + + + + + + + + + + New-AzureStorageAccount, Get-AzureStorageAccount, Remove-AzureStorageAccount + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Set-AzureStorageAccount -StorageAccountName qatest1 -Label "QATestAccnt" -Description "QA test storage account" + + Description + + + + -----------This command updates the label and description of the 'qatest1' storage account in the specified subscription. + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> Set-AzureStorageAccount -StorageAccountName qatest1 -GeoReplicationEnabled $false + + Description + + + + -----------This command disables the geo-replication of the 'qatest1' storage account in the specified subscription. + + + + + -------------------------- EXAMPLE 3 -------------------------- + + + + PS C:\> Set-AzureStorageAccount -StorageAccountName qatest1 -GeoReplicationEnabled $true + + Description + + + + -----------This command enables the geo-replication of the 'qatest1' storage account in the specified subscription. + + + + + + + Unknown + + + + + + + + Set-AzureSubnet + + Defines the subnet list for a Microsoft Azure virtual machine. + + + + + Set + AzureSubnet + + + + + The Set-AzureSubnet cmdlet sets the subnet list for a virtual machine configuration. Use with New-AzureVM to set the subnets for a virtual machine. + + + + Set-AzureSubnet + + SubnetNames + + Specifies the list of subnet names. + + String[] + + + VM + + Specifies the virtual machine object. + + IPersistentVM + + + + + + SubnetNames + + Specifies the list of subnet names. + + String[] + + String[] + + + + + + VM + + Specifies the virtual machine object. + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>New-AzureVMConfig –Name "MyVM" –ImageName $image –InstanceSize "Small" ` + | Add-AzureProvisioningConfig –Windows –Password $passwd ` + | Set-AzureSubnet "PubSubnet","PrivSubnet" ` + | New-AzureVM –ServiceName "MySvc" + + This example adds a subnet to the virtual machine configuration and then creates the virtual machine "MyVM". + + + + + + + + + + + Get-AzureVM + + + + Update-AzureVM + + + + + + + + Set-AzureVMAccessExtension + + This cmdlet sets the VMAccess extension for the VM. + + + + + Set + AzureVMAccessExtension + + + + + This cmdlet sets the VMAccess extension for the VM. + + + + Set-AzureVMAccessExtension + + UserName + + The user name for resetting the VM's credential. + + String + + + Password + + The password for resetting the VM's credential. + + String + + + ReferenceName + + The extension's reference name. + + This is a user-defined string that can be used to refer to an extension. It is specified when the extension is added to the VM for the first time. For subsequent updates, user should specify the previously used reference name while updating the extension. The ReferenceName assigned to an extension will be returned using the Get-AzureVM cmdlet. + + String + + + Version + + The Extension Version. + + String + + + VM + + The persistent VM object. + + IPersistentVM + + + + Set-AzureVMAccessExtension + + Disable + + To Set the Extension State to 'Disable'. + + SwitchParameter + + + ReferenceName + + The extension's reference name. + + This is a user-defined string that can be used to refer to an extension. It is specified when the extension is added to the VM for the first time. For subsequent updates, user should specify the previously used reference name while updating the extension. The ReferenceName assigned to an extension will be returned using the Get-AzureVM cmdlet. + + String + + + Version + + The Extension Version. + + String + + + VM + + The persistent VM object. + + IPersistentVM + + + + Set-AzureVMAccessExtension + + Uninstall + + Not Specified + + SwitchParameter + + + ReferenceName + + The extension's reference name. + + This is a user-defined string that can be used to refer to an extension. It is specified when the extension is added to the VM for the first time. For subsequent updates, user should specify the previously used reference name while updating the extension. The ReferenceName assigned to an extension will be returned using the Get-AzureVM cmdlet. + + String + + + Version + + The Extension Version. + + String + + + VM + + The persistent VM object. + + IPersistentVM + + + + + + UserName + + The user name for resetting the VM's credential. + + String + + String + + + + + + Password + + The password for resetting the VM's credential. + + String + + String + + + + + + ReferenceName + + The extension's reference name. + + This is a user-defined string that can be used to refer to an extension. It is specified when the extension is added to the VM for the first time. For subsequent updates, user should specify the previously used reference name while updating the extension. The ReferenceName assigned to an extension will be returned using the Get-AzureVM cmdlet. + + String + + String + + + + + + Version + + The Extension Version. + + String + + String + + + + + + VM + + The persistent VM object. + + IPersistentVM + + IPersistentVM + + + + + + Disable + + To Set the Extension State to 'Disable'. + + SwitchParameter + + SwitchParameter + + + + + + Uninstall + + Not Specified + + SwitchParameter + + SwitchParameter + + + + + + PipelineVariable + + Not Specified + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> + + Description + + + + -----------Description + + + + + + + Unknown + + + + + + + + Set-AzureVMBGInfoExtension + + This cmdlet sets the BGInfo extension for the VM. + + This is a user-defined string that can be used to refer to an extension. It is specified when the extension is added to the VM for the first time. For subsequent updates, user should specify the previously used reference name while updating the extension. The ReferenceName assigned to an extension will be returned using the Get-AzureVM cmdlet. + + + + + Set + AzureVMBGInfoExtension + + + + + This cmdlet sets the BGInfo extension for the VM. + + + + Set-AzureVMBGInfoExtension + + Disable + + To Set the Extension State to 'Disable'. + + SwitchParameter + + + ReferenceName + + The extension's reference name. + + This is a user-defined string that can be used to refer to an extension. It is specified when the extension is added to the VM for the first time. For subsequent updates, user should specify the previously used reference name while updating the extension. The ReferenceName assigned to an extension will be returned using the Get-AzureVM cmdlet. + + String + + + Version + + The Extension Version. + + String + + + VM + + The persistent VM object. + + IPersistentVM + + + + Set-AzureVMBGInfoExtension + + Uninstall + + Not Specified + + SwitchParameter + + + ReferenceName + + The extension's reference name. + + This is a user-defined string that can be used to refer to an extension. It is specified when the extension is added to the VM for the first time. For subsequent updates, user should specify the previously used reference name while updating the extension. The ReferenceName assigned to an extension will be returned using the Get-AzureVM cmdlet. + + String + + + Version + + The Extension Version. + + String + + + VM + + The persistent VM object. + + IPersistentVM + + + + + + Disable + + To Set the Extension State to 'Disable'. + + SwitchParameter + + SwitchParameter + + + + + + ReferenceName + + The extension's reference name. + + This is a user-defined string that can be used to refer to an extension. It is specified when the extension is added to the VM for the first time. For subsequent updates, user should specify the previously used reference name while updating the extension. The ReferenceName assigned to an extension will be returned using the Get-AzureVM cmdlet. + + String + + String + + + + + + Version + + The Extension Version. + + String + + String + + + + + + VM + + The persistent VM object. + + IPersistentVM + + IPersistentVM + + + + + + Uninstall + + Not Specified + + SwitchParameter + + SwitchParameter + + + + + + PipelineVariable + + Not Specified + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> + + Description + + + + -----------Description + + + + + + + Unknown + + + + + + + + Set-AzureVMCustomScriptExtension + + Set Azure VM Custom Script Extension Information. + + + + + Set + AzureVMCustomScriptExtension + + + + + Set Azure VM Custom Script Extension Information. + + + + Set-AzureVMCustomScriptExtension + + ReferenceName + + The extension's reference name. + + This is a user-defined string that can be used to refer to an extension. It is specified when the extension is added to the VM for the first time. For subsequent updates, user should specify the previously used reference name while updating the extension. The ReferenceName assigned to an extension will be returned using the Get-AzureVM cmdlet. + + String + + + Version + + The Extension Version. + + String + + + ContainerName + + The container name within the storage account. + + String + + + FileName + + The names of the blob files in the specified container. + + String[] + + + StorageAccountName + + The storage account name in the current subscription. + + String + + + StorageEndpointSuffix + + The storage service endpoint. + + String + + + StorageAccountKey + + The storage account key + + String + + + Run + + The command to run by the extension on the VM, currently only "powershell.exe" is supported. + + String + + + Argument + + Argument for the command to run on the VM. + + String + + + VM + + The persistent VM object. + + IPersistentVM + + + + Set-AzureVMCustomScriptExtension + + ReferenceName + + The extension's reference name. + + This is a user-defined string that can be used to refer to an extension. It is specified when the extension is added to the VM for the first time. For subsequent updates, user should specify the previously used reference name while updating the extension. The ReferenceName assigned to an extension will be returned using the Get-AzureVM cmdlet. + + String + + + Version + + The Extension Version. + + String + + + Disable + + To Set the Extension State to 'Disable'. + + SwitchParameter + + + VM + + The persistent VM object. + + IPersistentVM + + + + Set-AzureVMCustomScriptExtension + + ReferenceName + + The extension's reference name. + + This is a user-defined string that can be used to refer to an extension. It is specified when the extension is added to the VM for the first time. For subsequent updates, user should specify the previously used reference name while updating the extension. The ReferenceName assigned to an extension will be returned using the Get-AzureVM cmdlet. + + String + + + Version + + The Extension Version. + + String + + + Uninstall + + Not Specified + + SwitchParameter + + + VM + + The persistent VM object. + + IPersistentVM + + + + Set-AzureVMCustomScriptExtension + + ReferenceName + + The extension's reference name. + + This is a user-defined string that can be used to refer to an extension. It is specified when the extension is added to the VM for the first time. For subsequent updates, user should specify the previously used reference name while updating the extension. The ReferenceName assigned to an extension will be returned using the Get-AzureVM cmdlet. + + String + + + Version + + The Extension Version. + + String + + + FileUri + + The URLs of the blob files. + + String[] + + + Run + + The command to run by the extension on the VM, currently only "powershell.exe" is supported. + + String + + + Argument + + Argument for the command to run on the VM. + + String + + + VM + + The persistent VM object. + + IPersistentVM + + + + + + ReferenceName + + The extension's reference name. + + This is a user-defined string that can be used to refer to an extension. It is specified when the extension is added to the VM for the first time. For subsequent updates, user should specify the previously used reference name while updating the extension. The ReferenceName assigned to an extension will be returned using the Get-AzureVM cmdlet. + + String + + String + + + + + + Version + + The Extension Version. + + String + + String + + + + + + ContainerName + + The container name within the storage account. + + String + + String + + + + + + FileName + + The names of the blob files in the specified container. + + String[] + + String[] + + + + + + StorageAccountName + + The storage account name in the current subscription. + + String + + String + + + + + + StorageEndpointSuffix + + The storage service endpoint. + + String + + String + + + + + + StorageAccountKey + + The storage account key + + String + + String + + + + + + Run + + The command to run by the extension on the VM, currently only "powershell.exe" is supported. + + String + + String + + + + + + Argument + + Argument for the command to run on the VM. + + String + + String + + + + + + VM + + The persistent VM object. + + IPersistentVM + + IPersistentVM + + + + + + Disable + + To Set the Extension State to 'Disable'. + + SwitchParameter + + SwitchParameter + + + + + + Uninstall + + Not Specified + + SwitchParameter + + SwitchParameter + + + + + + FileUri + + The URLs of the blob files. + + String[] + + String[] + + + + + + PipelineVariable + + Not Specified + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> $x = Set-AzureVMCustomScriptExtension -VM $x -ContainerName 'test' -FileName 'script1.ps1','script2.ps1' -Run 'script1.ps1' -Argument 'arg1 arg2'; + + New-AzureVM -Location 'West US' -ServiceName $svc -VM $x; + + Description + + + + ----------- + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> Set-AzureVMCustomScriptExtension -VM $vm -FileUri 'http://foo1.blob.core.windows.net/bar/script1.ps1','http://foo2.blob.core.windows.net/baz/script2.ps1' -Run 'script1.ps1' -Argument 'arg1 arg2'; + + Update-AzureVM -ServiceName $svc -Name $name -VM vm; + + Description + + + + ----------- + + + + + + + Unknown + + + + + + + + Set-AzureVMDiagnosticsExtension + + + + + + + Set + AzureVMDiagnosticsExtension + + + + + + + + + Set-AzureVMDiagnosticsExtension + + DiagnosticsConfigurationPath + + + + String + + + StorageContext + + + + AzureStorageContext + + + Version + + + + String + + + Disable + + + + SwitchParameter + + + VM + + + + IPersistentVM + + + + Set-AzureVMDiagnosticsExtension + + DiagnosticsConfigurationPath + + + + String + + + StorageContext + + + + AzureStorageContext + + + Version + + + + String + + + Disable + + + + SwitchParameter + + + ReferenceName + + + + String + + + VM + + + + IPersistentVM + + + + + + DiagnosticsConfigurationPath + + + + String + + String + + + + + + StorageContext + + + + AzureStorageContext + + AzureStorageContext + + + + + + Version + + + + String + + String + + + + + + Disable + + + + SwitchParameter + + SwitchParameter + + + + + + VM + + + + IPersistentVM + + IPersistentVM + + + + + + ReferenceName + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set-AzureVMDscExtension + + Configure the Windows PowerShell Desired State Configuration extension on a VM. + + + + + Set + AzureVMDscExtension + + + + + Configure the Windows PowerShell Desired State Configuration extension on a VM. + + + + Set-AzureVMDscExtension + + ReferenceName + + This is a user-defined string that can be used to refer to an extension. It is specified when the extension is added to the VM for the first time. For subsequent updates, user should specify the previously used reference name while updating the extension. The ReferenceName assigned to an extension will be returned using the Get-AzureVM cmdlet. + + String + + + ConfigurationArgument + + A hashtable specifying the arguments to the configuration function. The keys correspond to the parameter names and the values to the parameter values. +Supported types for values include: primitive types, string, array and PSCredential. + + Hashtable + + + ConfigurationDataPath + + The path to a .psd1 file that specifies the data for the configuration function. This file must contain a hashtable as described in http://technet.microsoft.com/en-us/library/dn249925.aspx. + + String + + + ConfigurationArchive + + The name of the configuration package (.zip file) that was previously uploaded by Publish-AzureVMDscConfiguration. This parameter must specify only the name of the file, without any path. + + String + + + ConfigurationName + + Name of the configuration script or module that will be invoked by the DSC Extension. + +The value of this parameter must be the name of one of the configurations functions contained in the scripts or modules packaged in the ConfigurationArchive. + +If omitted, this parameter will default to the name of the file given by the ConfigurationArchive parameter, excluding any extension, for example if ConfigurationArchive is "SalesWebSite.ps1.zip", the default value for ConfigurationName will be "SalesWebSite". + + String + + + ContainerName + + Name of the Azure Storage Container where the ConfigurationArchive is located. + + String + + + Force + + By default Set-AzureVMDscExtension will not overwrite any existing blobs. Use -Force to overwrite them. + + SwitchParameter + + + StorageContext + + The Azure Storage Context that provides the security settings used to access the configuration script. This context should provide read access to the container specified by ContainerName. + + AzureStorageContext + + + Version + + The specific version of the DSC Extension to use. If not given, it will default to "1.*" + + String + + + StorageEndpointSuffix + + The DNS endpoint suffix for all storage services, e.g. "core.windows.net". + + String + + + VM + + The persistent VM object. + + IPersistentVM + + + WhatIf + + Describes what would happen if you executed the command without actually executing the command. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before executing the command. + + SwitchParameter + + + + + + ReferenceName + + This is a user-defined string that can be used to refer to an extension. It is specified when the extension is added to the VM for the first time. For subsequent updates, user should specify the previously used reference name while updating the extension. The ReferenceName assigned to an extension will be returned using the Get-AzureVM cmdlet. + + String + + String + + + + + + ConfigurationArgument + + A hashtable specifying the arguments to the configuration function. The keys correspond to the parameter names and the values to the parameter values. +Supported types for values include: primitive types, string, array and PSCredential. + + Hashtable + + Hashtable + + + + + + ConfigurationDataPath + + The path to a .psd1 file that specifies the data for the configuration function. This file must contain a hashtable as described in http://technet.microsoft.com/en-us/library/dn249925.aspx. + + String + + String + + + + + + ConfigurationArchive + + The name of the configuration package (.zip file) that was previously uploaded by Publish-AzureVMDscConfiguration. This parameter must specify only the name of the file, without any path. + + String + + String + + + + + + ConfigurationName + + Name of the configuration script or module that will be invoked by the DSC Extension. + +The value of this parameter must be the name of one of the configurations functions contained in the scripts or modules packaged in the ConfigurationArchive. + +If omitted, this parameter will default to the name of the file given by the ConfigurationArchive parameter, excluding any extension, for example if ConfigurationArchive is "SalesWebSite.ps1.zip", the default value for ConfigurationName will be "SalesWebSite". + + String + + String + + + + + + ContainerName + + Name of the Azure Storage Container where the ConfigurationArchive is located. + + String + + String + + + WindowsPowerShellDSC + + + Force + + By default Set-AzureVMDscExtension will not overwrite any existing blobs. Use -Force to overwrite them. + + SwitchParameter + + SwitchParameter + + + + + + StorageContext + + The Azure Storage Context that provides the security settings used to access the configuration script. This context should provide read access to the container specified by ContainerName. + + AzureStorageContext + + AzureStorageContext + + + + + + Version + + The specific version of the DSC Extension to use. If not given, it will default to "1.*" + + String + + String + + + 1.* + + + StorageEndpointSuffix + + The DNS endpoint suffix for all storage services, e.g. "core.windows.net". + + String + + String + + + + + + VM + + The persistent VM object. + + IPersistentVM + + IPersistentVM + + + + + + WhatIf + + Describes what would happen if you executed the command without actually executing the command. + + SwitchParameter + + SwitchParameter + + + + + + Confirm + + Prompts you for confirmation before executing the command. + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Set-AzureVMDscExtension -VM $vm -ConfigurationArchive MyConfiguration.ps1.zip -ConfigurationName MyConfiguration -ConfigurationArgument @{ Path = 'C:\MyDirectory' } + +DeploymentName : my-vm-svc +Name : my-vm +Label : +VM : Microsoft.WindowsAzure.Commands.ServiceManagement.Model.PersistentVM +InstanceStatus : ReadyRole +IpAddress : 10.10.10.10 +InstanceStateDetails : +PowerState : Started +InstanceErrorCode : +InstanceFaultDomain : 0 +InstanceName : my-vm +InstanceUpgradeDomain : 0 +InstanceSize : Small +AvailabilitySetName : +DNSName : http://my-vm-svc.cloudapp.net/ +Status : ReadyRole +GuestAgentStatus : Microsoft.WindowsAzure.Commands.ServiceManagement.Model.PersistentVMModel.GuestAgentStatus +ResourceExtensionStatusList : {Microsoft.Compute.BGInfo} +PublicIPAddress : +PublicIPName : +ServiceName : my-vm-svc +OperationDescription : Get-AzureVM +OperationId : a0217a7af900c1f8a212299a3333cdbd6 +OperationStatus : OK + + Description + + + + -----------This command configures the DSC extension on a VM. + +The "MyConfiguration.ps1.zip" package must have been previously uploaded to Azure storage using the Publish-AzureVMDscConfiguration command and includes the "MyConfiguration.ps1" script and the modules it depends on. + +The "MyConfiguration" argument indicates the specific DSC configuration within the script to execute. The -ConfigurationArgument parameter specifies a hashtable with the arguments that will be passed to the configuration function. + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> $vm | Set-AzureVMDscExtension -ConfigurationArchive MyConfiguration.ps1.zip -ConfigurationName MyConfiguration -ConfigurationArgument @{ Credential = Get-Credential } -ConfigurationDataPath MyConfigurationData.psd1 + + +DeploymentName : my-vm-svc +Name : my-vm +Label : +VM : Microsoft.WindowsAzure.Commands.ServiceManagement.Model.PersistentVM +InstanceStatus : ReadyRole +IpAddress : 10.10.10.10 +InstanceStateDetails : +PowerState : Started +InstanceErrorCode : +InstanceFaultDomain : 0 +InstanceName : my-vm +InstanceUpgradeDomain : 0 +InstanceSize : Small +AvailabilitySetName : +DNSName : http://my-vm-svc.cloudapp.net/ +Status : ReadyRole +GuestAgentStatus : Microsoft.WindowsAzure.Commands.ServiceManagement.Model.PersistentVMModel.GuestAgentStatus +ResourceExtensionStatusList : {Microsoft.Compute.BGInfo, Microsoft.Powershell.DSC} +PublicIPAddress : +PublicIPName : +ServiceName : my-vm-svc +OperationDescription : Get-AzureVM +OperationId : a0217a7af900c1f8a212299a3333cdbd7 +OperationStatus : OK + + Description + + + + -----------You can pass -VM parameter from the pipeline. + +-ConfigurationArgument parameter supports PSCredential as a value. + +-ConfigurationDataPath parameter takes path to .psd1 file with ConfigurationData hashtable. + + + + + + + Unknown + + + + + + + + Set-AzureVMExtension + + This cmdlet sets resource extensions for VMs. + + + + + Set + AzureVMExtension + + + + + This cmdlet sets resource extensions for VMs. + + + + Set-AzureVMExtension + + ExtensionName + + The Extension Name. + + String + + + Publisher + + The Extension's Publisher. + + String + + + Version + + The Extension Version. + + String + + + ReferenceName + + The extension's reference name. + + This is a user-defined string that can be used to refer to an extension. It is specified when the extension is added to the VM for the first time. For subsequent updates, user should specify the previously used reference name while updating the extension. The ReferenceName assigned to an extension will be returned using the Get-AzureVM cmdlet. + + String + + + PublicConfiguration + + The public configuration text. + + String + + + PrivateConfiguration + + The private configuration text. + + String + + + Disable + + To Set the Extension State to 'Disable'. + + SwitchParameter + + + Uninstall + + Not Specified + + SwitchParameter + + + VM + + + + IPersistentVM + + + + Set-AzureVMExtension + + ExtensionName + + The Extension Name. + + String + + + Publisher + + The Extension's Publisher. + + String + + + Version + + The Extension Version. + + String + + + ReferenceName + + The extension's reference name. + + This is a user-defined string that can be used to refer to an extension. It is specified when the extension is added to the VM for the first time. For subsequent updates, user should specify the previously used reference name while updating the extension. The ReferenceName assigned to an extension will be returned using the Get-AzureVM cmdlet. + + String + + + PublicConfigPath + + Not Specified + + String + + + PrivateConfigPath + + Not Specified + + String + + + Disable + + To Set the Extension State to 'Disable'. + + SwitchParameter + + + Uninstall + + Not Specified + + SwitchParameter + + + VM + + + + IPersistentVM + + + + Set-AzureVMExtension + + ReferenceName + + The extension's reference name. + + This is a user-defined string that can be used to refer to an extension. It is specified when the extension is added to the VM for the first time. For subsequent updates, user should specify the previously used reference name while updating the extension. The ReferenceName assigned to an extension will be returned using the Get-AzureVM cmdlet. + + String + + + PublicConfigPath + + Not Specified + + String + + + PrivateConfigPath + + Not Specified + + String + + + Disable + + To Set the Extension State to 'Disable'. + + SwitchParameter + + + Uninstall + + Not Specified + + SwitchParameter + + + VM + + + + IPersistentVM + + + + Set-AzureVMExtension + + ReferenceName + + The extension's reference name. + + This is a user-defined string that can be used to refer to an extension. It is specified when the extension is added to the VM for the first time. For subsequent updates, user should specify the previously used reference name while updating the extension. The ReferenceName assigned to an extension will be returned using the Get-AzureVM cmdlet. + + String + + + PublicConfiguration + + The public configuration text. + + String + + + PrivateConfiguration + + The private configuration text. + + String + + + Disable + + To Set the Extension State to 'Disable'. + + SwitchParameter + + + Uninstall + + Not Specified + + SwitchParameter + + + VM + + + + IPersistentVM + + + + + + ExtensionName + + The Extension Name. + + String + + String + + + + + + Publisher + + The Extension's Publisher. + + String + + String + + + + + + Version + + The Extension Version. + + String + + String + + + + + + ReferenceName + + The extension's reference name. + + This is a user-defined string that can be used to refer to an extension. It is specified when the extension is added to the VM for the first time. For subsequent updates, user should specify the previously used reference name while updating the extension. The ReferenceName assigned to an extension will be returned using the Get-AzureVM cmdlet. + + String + + String + + + + + + PublicConfiguration + + The public configuration text. + + String + + String + + + + + + PrivateConfiguration + + The private configuration text. + + String + + String + + + + + + Disable + + To Set the Extension State to 'Disable'. + + SwitchParameter + + SwitchParameter + + + + + + Uninstall + + Not Specified + + SwitchParameter + + SwitchParameter + + + + + + VM + + + + IPersistentVM + + IPersistentVM + + + + + + PublicConfigPath + + Not Specified + + String + + String + + + + + + PrivateConfigPath + + Not Specified + + String + + String + + + + + + PipelineVariable + + Not Specified + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> + + Description + + + + -----------Description + + + + + + + Unknown + + + + + + + + Set-AzureVMImageDataDiskConfig + + Allows you to update the Data Disk properties on the VM Image + + + + + Set + AzureVMImageDataDiskConfig + + + + + + + + + Set-AzureVMImageDataDiskConfig + + DiskConfig + + The disk config object that encapsulates the OS Disk and Data Disk objects. + + VirtualMachineImageDiskConfigSet + + + DataDiskName + + + + String + + + Lun + + + + Int32 + + + HostCaching + + + + String + + + + + + DiskConfig + + The disk config object that encapsulates the OS Disk and Data Disk objects. + + VirtualMachineImageDiskConfigSet + + VirtualMachineImageDiskConfigSet + + + + + + DataDiskName + + + + String + + String + + + + + + Lun + + + + Int32 + + Int32 + + + + + + HostCaching + + + + String + + String + + + + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.ServiceManagement.Model.VirtualMachineImageDiskConfigSet + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> $s = New-AzureDiskConfigSet + # returns DiskConfigSet object; + + $s = Set-AzureOSDiskConfig -DiskConfig $s -HostCaching ReadWrite + # returns DiskConfigSet object; + + $s = Set-AzureDataDiskConfig -DiskConfig $s -Name 'test' -HostCaching 'ReadWrite' -LUN 0 + # returns DiskConfigSet object + + # Final step - Update the VM Image + Update-AzureVMImage -ImageName testvmimage2 -Label test1 -Description test1 -DiskConfigSet $s; + + # OR + + $s | Update-AzureVMImage -ImageName testvmimage2 -Label test1 -Description test1; + + Description + + + + ----------- + + + + + + + Unknown + + + + + + + + Set-AzureVMImageOSDiskConfig + + Allows you to update the OS Disk properties on the VM Image + + + + + Set + AzureVMImageOSDiskConfig + + + + + + + + + Set-AzureVMImageOSDiskConfig + + DiskConfig + + + + VirtualMachineImageDiskConfigSet + + + HostCaching + + + + String + + + + + + DiskConfig + + + + VirtualMachineImageDiskConfigSet + + VirtualMachineImageDiskConfigSet + + + + + + HostCaching + + + + String + + String + + + + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.ServiceManagement.Model.VirtualMachineImageDiskConfigSet + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> $s = New-AzureDiskConfigSet + # returns DiskConfigSet object; + + $s = Set-AzureOSDiskConfig -DiskConfig $s -HostCaching ReadWrite + # returns DiskConfigSet object; + + $s = Set-AzureDataDiskConfig -DiskConfig $s -Name 'test' -HostCaching 'ReadWrite' -LUN 0 + # returns DiskConfigSet object + + # Final step - Update the VM Image + Update-AzureVMImage -ImageName testvmimage2 -Label test1 -Description test1 -DiskConfigSet $s; + + # OR + + $s | Update-AzureVMImage -ImageName testvmimage2 -Label test1 -Description test1; + + Description + + + + ----------- + + + + + + + Unknown + + + + + + + + Set-AzureVMMicrosoftAntimalwareExtension + + Configures the Microsoft Antimalware extension for a virtual machine. + + + + + Set + AzureVMMicrosoftAntimalwareExtension + + + + + The Set-AzureVMMicrosoftAntimalwareExtension cmdlet configures the Microsoft Antimalware extension for a virtual machine. You can enable, disable, or uninstall the extension. + + + + Set-AzureVMMicrosoftAntimalwareExtension + + AntimalwareConfigFile + + Specifies the absolute path to the Microsoft Antimalware configuration file. Do not specify this parameter if you specify the AntimalwareConfiguration parameter. The configuration file must include, at a minimum, the following content to enable the Microsoft Antimalware extension: + +{ "AntimalwareEnabled": true } + + String + + + Version + + Specifies the extension version as a string. + + String + + + Monitoring + + Specifies whether to collect Microsoft Antimalware events. Valid values are: + +-- ON. Collect Microsoft Antimalware events to storage context. +-- OFF. Do not collect Microsoft Antimalware events. + + String + + + StorageContext + + Specifies an Azure storage context for Microsoft Antimalware monitoring. + + AzureStorageContext + + + VM + + Specifies the virtual machine as an IPersistentVM object. + + IPersistentVM + + + + Set-AzureVMMicrosoftAntimalwareExtension + + AntimalwareConfiguration + + Specifies a string object that contains the Microsoft Antimalware configuration. This object must not be $Null or empty. Do not specify this parameter if you specify the AntimalwareConfigFile parameter. The configuration object must include, at a minimum, the following content to enable the Microsoft Antimalware extension: + + { "AntimalwareEnabled": true }Microsoft Antimalware JSON configuration sample: + + { + "AntimalwareEnabled": true, + "RealtimeProtectionEnabled": true, + "ScheduledScanSettings": { + "isEnabled": true, + "day": 1, + "time": 120, + "scanType": "Full" + }, + "Exclusions": { + "Extensions": ".ext1;.ext2", + "Paths": "c:\excluded-path-1;c:\excluded-path-2", + "Processes": "excludedproc1.exe;excludedproc2.exe" + } + } + + Notes: + AntimalwareEnabled is a required parameter. Values: true= Enable. false= Error out as false is not a supported value + + RealtimeProtectionEnabled: true/false. true = Enable. false = Disable. Default is true + + ScheduledScanSettings: + isEnabled=true/false + day=0-8 (0-daily, 1-Sunday, 2-Monday, ...., 7-Saturday, 8-Disabled) + time=0-1440 (measured in minutes after midnight - 60->1AM, 120 -> 2AM, ... ) + scanType="Quick" or "Full" (Default is Quick) + Note: If isEnabled=true is the only setting provided, the following defaults are set: day=7 (Saturday), time=120 (2 AM), scanType="Quick" + + Exclusions: + Multiple exclusions in the same list are specified by using semicolon delimiters. + If no exclusions are specified, then the existing exclusions, if any, are overwritten by blank on the system. + + String + + + Version + + Specifies the extension version as a string. + + String + + + Monitoring + + Specifies whether to collect Microsoft Antimalware events. Valid values are: + +-- ON. Collect Microsoft Antimalware events to storage context. +-- OFF. Do not collect Microsoft Antimalware events. + + String + + + StorageContext + + Specifies an Azure storage context for Microsoft Antimalware monitoring. + + AzureStorageContext + + + VM + + Specifies the virtual machine as an IPersistentVM object. + + IPersistentVM + + + + Set-AzureVMMicrosoftAntimalwareExtension + + Version + + Specifies the extension version as a string. + + String + + + Disable + + Indicates that the cmdlet disables the Microsoft Antimalware extension. To re-enable the extension on the same virtual machine, run Set-AzureVMMicrosoftAntimalwareExtension without the Disable parameter. + + SwitchParameter + + + VM + + Specifies the virtual machine as an IPersistentVM object. + + IPersistentVM + + + + Set-AzureVMMicrosoftAntimalwareExtension + + Uninstall + + Indicates that this cmdlet uninstalls the Microsoft Antimalware extension from the virtual machine. If monitoring was turned on, the cmdlet also removes the collection of Microsoft Antimalware events. + + SwitchParameter + + + VM + + Specifies the virtual machine as an IPersistentVM object. + + IPersistentVM + + + + Set-AzureVMMicrosoftAntimalwareExtension + + Monitoring + + Specifies whether to collect Microsoft Antimalware events. Valid values are: + +-- ON. Collect Microsoft Antimalware events to storage context. +-- OFF. Do not collect Microsoft Antimalware events. + + String + + + StorageContext + + Specifies an Azure storage context for Microsoft Antimalware monitoring. + + AzureStorageContext + + + NoConfig + + + + SwitchParameter + + + VM + + Specifies the virtual machine as an IPersistentVM object. + + IPersistentVM + + + + + + AntimalwareConfigFile + + Specifies the absolute path to the Microsoft Antimalware configuration file. Do not specify this parameter if you specify the AntimalwareConfiguration parameter. The configuration file must include, at a minimum, the following content to enable the Microsoft Antimalware extension: + +{ "AntimalwareEnabled": true } + + String + + String + + + none + + + Version + + Specifies the extension version as a string. + + String + + String + + + none + + + Monitoring + + Specifies whether to collect Microsoft Antimalware events. Valid values are: + +-- ON. Collect Microsoft Antimalware events to storage context. +-- OFF. Do not collect Microsoft Antimalware events. + + String + + String + + + none + + + StorageContext + + Specifies an Azure storage context for Microsoft Antimalware monitoring. + + AzureStorageContext + + AzureStorageContext + + + none + + + VM + + Specifies the virtual machine as an IPersistentVM object. + + IPersistentVM + + IPersistentVM + + + none + + + AntimalwareConfiguration + + Specifies a string object that contains the Microsoft Antimalware configuration. This object must not be $Null or empty. Do not specify this parameter if you specify the AntimalwareConfigFile parameter. The configuration object must include, at a minimum, the following content to enable the Microsoft Antimalware extension: + + { "AntimalwareEnabled": true }Microsoft Antimalware JSON configuration sample: + + { + "AntimalwareEnabled": true, + "RealtimeProtectionEnabled": true, + "ScheduledScanSettings": { + "isEnabled": true, + "day": 1, + "time": 120, + "scanType": "Full" + }, + "Exclusions": { + "Extensions": ".ext1;.ext2", + "Paths": "c:\excluded-path-1;c:\excluded-path-2", + "Processes": "excludedproc1.exe;excludedproc2.exe" + } + } + + Notes: + AntimalwareEnabled is a required parameter. Values: true= Enable. false= Error out as false is not a supported value + + RealtimeProtectionEnabled: true/false. true = Enable. false = Disable. Default is true + + ScheduledScanSettings: + isEnabled=true/false + day=0-8 (0-daily, 1-Sunday, 2-Monday, ...., 7-Saturday, 8-Disabled) + time=0-1440 (measured in minutes after midnight - 60->1AM, 120 -> 2AM, ... ) + scanType="Quick" or "Full" (Default is Quick) + Note: If isEnabled=true is the only setting provided, the following defaults are set: day=7 (Saturday), time=120 (2 AM), scanType="Quick" + + Exclusions: + Multiple exclusions in the same list are specified by using semicolon delimiters. + If no exclusions are specified, then the existing exclusions, if any, are overwritten by blank on the system. + + String + + String + + + none + + + Disable + + Indicates that the cmdlet disables the Microsoft Antimalware extension. To re-enable the extension on the same virtual machine, run Set-AzureVMMicrosoftAntimalwareExtension without the Disable parameter. + + SwitchParameter + + SwitchParameter + + + none + + + Uninstall + + Indicates that this cmdlet uninstalls the Microsoft Antimalware extension from the virtual machine. If monitoring was turned on, the cmdlet also removes the collection of Microsoft Antimalware events. + + SwitchParameter + + SwitchParameter + + + none + + + NoConfig + + + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Enable the extension by using a configuration file -------------------------- + + + + PS C:\>Get-AzureVM -ServiceName "ContosoService03" -Name "ContosoVM22" | Set-AzureVMMicrosoftAntimalwareExtension -AntimalwareConfigFile 'C:\configuration\contosoVM.json' | Update-AzureVM + + This command enables the Microsoft Antimalware extension by using a configuration file. The command uses the Get-AzureVM cmdlet to get the specified virtual machine object, and then passes the object to the current cmdlet by using the pipeline operator. + + + + The AntimalwareConfigFile parameter specifies a configuration file for the Microsoft Antimalware extension. Set-AzureVMMicrosoftAntimalwareExtension applies the configuration that the file specifies to the virtual machine, and then passes the result to the Update-AzureVM cmdlet to update the virtual machine. + + + + + -------------------------- Example 2: Enable the extension and enable monitoring -------------------------- + + + + PS C:\>$StorageContext = New-AzureStorageContext -StorageAccountName "contosostoragemain" -StorageAccountKey (Get-AzureStorageKey -StorageAccountName "Contosostoragemain").Primary +PS C:\> Get-AzureVM -ServiceName "ContosoService03" -Name"ContosoVM22" | Set-AzureVMMicrosoftAntimalwareExtension -AntimalwareConfigFile 'C:\configuration\contosoVM.json" -Monitoring ON -StorageContext $StorageContext | Update-AzureVM + + The first command creates an AzureStorageContext object by using the New-AzureStorageContext cmdlet, and then stores it in the $StorageContext variable. + + + + The second command enables the Microsoft Antimalware extension, and enables monitoring. The command uses Get-AzureVM to get the specified virtual machine object, and then passes the object to the current cmdlet.The command specifies a value of ON for the Monitoring parameter and specifies the Azure storage context stored in $StorageContext, and then passes the result to the Update-AzureVM cmdlet. + + + + + -------------------------- Example 3: Enable the extension by specifying a configuration object -------------------------- + + + + PS C:\>$config_string = [IO.File]::ReadAllText('C:\configuration\contosoVM.json') +PS C:\> Get-AzureVM -ServiceName "ContosoService03" -Name "ContosoVM22" | Set-AzureVMMicrosoftAntimalwareExtension -AntimalwareConfiguration $config_string | Update-AzureVM + + The first command creates a string object by reading a JSON configuration for the Microsoft Antimalware extension, and then storing it in the $config_string variable. + + + + The AntimalwareConfiguration parameter specifies the configuration information stored in $config_string. Set-AzureVMMicrosoftAntimalwareExtension applies that configuration to the virtual machine, and then passes the result to the Update-AzureVM cmdlet. + + + + + -------------------------- Example 4: Disable the extension -------------------------- + + + + PS C:\>Get-AzureVM -ServiceName "ContosoService03" -Name "ContosoVM22" | Set-AzureVMMicrosoftAntimalwareExtension -Disable | Update-AzureVM + + This command disables the extension without removing it. The command uses Get-AzureVM to get the specified virtual machine object, and then passes the object to the current cmdlet. + + + + Set-AzureVMMicrosoftAntimalwareExtension disables the Microsoft Antimalware extension for the virtual machine, and then passes the result to Update-AzureVM.To re-enabled the extension on the same virtual machine, run Set-AzureVMMicrosoftAntimalwareExtension cmdlet without specifying the Disable parameter. + + + + + -------------------------- Example 5: Remove the extension -------------------------- + + + + PS C:\>Get-AzureVM -ServiceName "ContosoService03" -Name"ContosoVM22" | Set-AzureVMMicrosoftAntimalwareExtension -Uninstall | Update-AzureVM + + This command removes the Microsoft Antimalware extension from the virtual machine. The command uses Get-AzureVM to get the specified virtual machine object, and then passes the object to the current cmdlet. + + + + Set-AzureVMMicrosoftAntimalwareExtension uninstalls the extension. If monitoring was turned on, the cmdlet also removes the collection of Microsoft Antimalware events. The command passes the result to Update-AzureVM. + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=402844 + + + Get-AzureVM + + + + Update-AzureVM + + + + New-AzureStorageContext + + + + Get-AzureVMMicrosoftAntimalwareExtension + + + + Remove-AzureVMMicrosoftAntimalwareExtension + + + + + + + + Set-AzureVMPuppetExtension + + This cmdlet sets the Puppet extension for the VM. + + + + + Set + AzureVMPuppetExtension + + + + + This cmdlet sets the Puppet extension for the VM. + + + + Set-AzureVMPuppetExtension + + PuppetMasterServer + + The FQDN of puppet master server.. + + String + + + Version + + The Extension Version. + + String + + + Disable + + To Set the Extension State to 'Disable'. + + SwitchParameter + + + ReferenceName + + The extension's reference name. + + This is a user-defined string that can be used to refer to an extension. It is specified when the extension is added to the VM for the first time. For subsequent updates, user should specify the previously used reference name while updating the extension. The ReferenceName assigned to an extension will be returned using the Get-AzureVM cmdlet. + + String + + + VM + + The persistent VM object. + + IPersistentVM + + + + + + PuppetMasterServer + + The FQDN of puppet master server.. + + String + + String + + + + + + Version + + The Extension Version. + + String + + String + + + + + + Disable + + To Set the Extension State to 'Disable'. + + SwitchParameter + + SwitchParameter + + + + + + ReferenceName + + The extension's reference name. + + This is a user-defined string that can be used to refer to an extension. It is specified when the extension is added to the VM for the first time. For subsequent updates, user should specify the previously used reference name while updating the extension. The ReferenceName assigned to an extension will be returned using the Get-AzureVM cmdlet. + + String + + String + + + + + + VM + + The persistent VM object. + + IPersistentVM + + IPersistentVM + + + + + + PipelineVariable + + Not Specified + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> + + Description + + + + -----------Description + + + + + + + Unknown + + + + + + + + Set-AzureVMSize + + Sets the size of a Microsoft Azure virtual machine. + + + + + Set + AzureVMSize + + + + + The Set-AzureVMSize cmdlet updates the size of a Virtual Machine. It has two parameters: "InstanceSize", which is the new size of the virtual machine, and "VM", which is a virtual machine object retrieved by using the Get-AzureVM cmdlet. The result of Set-AzureVMSize can be piped to the Update-AzureVM cmdlet or stored in a variable for later use. No actual change is made until Update-AzureVM is executed. + Note: This cmdlet will require the virtual machine to be re-provisioned and it might get a new IP address. + + + + Set-AzureVMSize + + InstanceSize + + Specifies the size of the machine. Supported values are "ExtraSmall", "Small", "Medium", "Large", "ExtraLarge", "A5", "A6",, "A7". + + String + + + VM + + Specifies the virtual machine to set the size of. + + IPersistentVM + + + + + + InstanceSize + + Specifies the size of the machine. Supported values are "ExtraSmall", "Small", "Medium", "Large", "ExtraLarge", "A5", "A6",, "A7". + + String + + String + + + + + + VM + + Specifies the virtual machine to set the size of. + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Get-AzureVM -ServiceName "MySvc1" -Name "MyVM3" | Set-AzureVMSize "Small" | Update-AzureVM + + Description + + + + -----------This example updates a virtual machine to "Small". size. + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> $MyVM = Get-AzureVM -ServiceName "MySvc1" -Name "MyVM3" | Set-AzureVMSize "Small" + Update-AzureVM -ServiceName "MySvc1" -Name "MyVM3 -VM $MyVM + + Description + + + + -----------This example uses an intermediate variable to perform the same function as Example 1. + + + + + + + Get-AzureVM + + + + Update-AzureVM + + + + + + + + Set-AzureVNetConfig + + Updates the virtual network settings for a Microsoft Azure cloud service. + + + + + Set + AzureVNetConfig + + + + + The Set-AzureVNetConfig cmdlet updates the network configuration for the current Microsoft Azure subscription by specifying a path to anetwork configuration file (.netcfg). The network configuration file defines DNS servers and subnets for cloud services within a subscription. + + + + Set-AzureVNetConfig + + ConfigurationPath + + Specifies the path and file name of a network configuration file (.netcfg). + + String + + + + + + ConfigurationPath + + Specifies the path and file name of a network configuration file (.netcfg). + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Set-AzureVNetConfig -ConfigurationPath "c:\temp\MyAzNets.netcfg" + + This command updates the network configuration of the current Microsoft Azure subscription to that in the local file "c:\temp\MyAzNets.netcfg". + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> C:\PS>$subsId = "5bea2bc2-88a5-44b8-abe1-3e76733b6783" + C:\PS>$cert = Get-Item cert:\LocalMachine\MY\82F105B2DA81149204A6257A9A91EC452B8C52C3 + C:\PS>Set-AzureVNetConfig -ConfigurationPath "c:\temp\MyAzNets.netcfg" + + This example sets the Microsoft Azure subscription, and then updates the network configuration of that subscription using the configuration defined in the local file "c:\temp\MyAzNets.netcfg". + + + + + + + + + + + Get-AzureVNetConfig + + + + Get-AzureVNetSite + + + + Remove-AzureVNetConfig + + + + + + + + Set-AzureVNetGateway + + Enables or disables a Microsoft Azure Virtual Network Gateway. + + + + + Set + AzureVNetGateway + + + + + The Set-AzureVNetGateway cmdlet enables or disables a virtual network gateway for the specified Microsoft Azure virtual network. A virtual network gateway is a virtual private network (VPN) endpoint for connecting to a virtual network.The Set-AzureVNetGateway cmdlet supports two functional parameters: Connect and Disconnect. These parameters allow you to enable or disable the VPN connection between the specified LocalNetworkSiteName and the specified virtual network. + + + + Set-AzureVNetGateway + + Connect + + Enables the VPN connection between the specified virtual network and the local network site. + + SwitchParameter + + + VNetName + + Specifies the name of the Microsoft Azure virtual network to connect or disconnect. + + String + + + LocalNetworkSiteName + + Specifies the name of the local network site for which the VPN connection will be enabled or disabled. + + String + + + + Set-AzureVNetGateway + + Disconnect + + Disables the VPN connection between the specified virtual network and the local network site. + + SwitchParameter + + + VNetName + + Specifies the name of the Microsoft Azure virtual network to connect or disconnect. + + String + + + LocalNetworkSiteName + + Specifies the name of the local network site for which the VPN connection will be enabled or disabled. + + String + + + + + + Connect + + Enables the VPN connection between the specified virtual network and the local network site. + + SwitchParameter + + SwitchParameter + + + + + + VNetName + + Specifies the name of the Microsoft Azure virtual network to connect or disconnect. + + String + + String + + + + + + LocalNetworkSiteName + + Specifies the name of the local network site for which the VPN connection will be enabled or disabled. + + String + + String + + + + + + Disconnect + + Disables the VPN connection between the specified virtual network and the local network site. + + SwitchParameter + + SwitchParameter + + + + + + Test + + + + switchparameter + + switchparameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> Set-AzureVNetGateway -Connect –VnetName "MyProdNet" –LocalNetworkSiteName "MyBranchOffice" + + This command enables the virtual network gateway between the Microsoft Azure virtual network, "MyProdNet" and the VPN device for the local network site, "MyBranchOffice". + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> Set-AzureVNetGateway -Disconnect –VnetName "MyProdNet" –LocalNetworkSiteName "MyBranchOffice" + + This command disables the virtual network gateway between the Microsoft Azure virtual network, "MyProdNet" and the VPN device for the local network site "MyBranchOffice". + + + + + + + + + + + + + + + Set-AzureVNetGatewayKey + + Sets the IPsec/IKE pre-shared key for the cross premises site-to-site VPN tunnel between the Azure virtual network and your on-premises local site. + + + + + Set + AzureVNetGatewayKey + + + + + Th Set-AzureVNetGatewayKey cmdlet sets the IPsec/IKE pre-shared key for the cross premises site-to-site VPN tunnel between the Azure virtual network and your on-premises local site. + + + + Set-AzureVNetGatewayKey + + VNetName + + Specifies the name of the Azure virtual network. + + String + + + LocalNetworkSiteName + + Specifies the name of the local network site to which the VPN tunnel connects. + + String + + + SharedKey + + Specifies the value of the new IPsec/IKE pre-shared key. The SharedKey is an alphanumeric string of 1-128 letters. + + String + + + + + + VNetName + + Specifies the name of the Azure virtual network. + + String + + String + + + + + + LocalNetworkSiteName + + Specifies the name of the local network site to which the VPN tunnel connects. + + String + + String + + + + + + SharedKey + + Specifies the value of the new IPsec/IKE pre-shared key. The SharedKey is an alphanumeric string of 1-128 letters. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Set-AzureVNetGatewayKey -VNetName "MyAzureVirtualNetwork" -LocalNetworkSiteName "MyOnPremSite" -SharedKey "a1b2c3d4" + + Description + + + + -----------This command sets the IPsec/IKE pre-shared key between your virtual network "MyAzureVirtualNetwork" and the on-premise site "MyOnPremSite" to "a1b2c3d4". + + + + + + + Unknown + + + + + + + + Set-AzureWalkUpgradeDomain + + Walks the specified upgrade domain. + + + + + Set + AzureWalkUpgradeDomain + + + + + The Set-AzureWalkUpgradeDomain cmdlet initiates the actual upgrade of a Microsoft Azure deployment. The upgrade package and configuration are set by using the Set-AzureDeployment cmdlet with the -Upgrade switch. + + + + Set-AzureWalkUpgradeDomain + + ServiceName + + Specifies the Microsoft Azure service name to upgrade. + + String + + + Slot + + Specified the environment of the deployment to upgrade. Supported values are "Staging" and "Production". + + String + + + DomainNumber + + Specifies the upgrade domain to upgrade. + + Int32 + + + + + + ServiceName + + Specifies the Microsoft Azure service name to upgrade. + + String + + String + + + + + + Slot + + Specified the environment of the deployment to upgrade. Supported values are "Staging" and "Production". + + String + + String + + + + + + DomainNumber + + Specifies the upgrade domain to upgrade. + + Int32 + + Int32 + + + + + + + + + + + + + + + + + + + + + ManagementOperationContext + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> Set-AzureWalkUpgradeDomain –ServiceName "MySvc1" –slot "Production" –UpgradeDomain 2 + + This example initiates the upgrade of Upgrade Domain 2 of the production deployment of the "MySvc1" service + + + + + + + + + + + + + + + Start-AzureVM + + Starts a Microsoft Azure virtual machine. + + + + + Start + AzureVM + + + + + The Start-AzureVM cmdlet requests the start of a Microsoft Azure virtual machine. + + + + Start-AzureVM + + Name + + Specifies the name of the virtual machine to start. + + String + + + ServiceName + + Specifies the name of the Microsoft Azure service that contains the virtual machine to start. + + String + + + + Start-AzureVM + + VM + + Specifies a virtual machine object that identifies the virtual machine to start. + + PersistentVM + + + ServiceName + + Specifies the name of the Microsoft Azure service that contains the virtual machine to start. + + String + + + + + + Name + + Specifies the name of the virtual machine to start. + + String + + String + + + + + + ServiceName + + Specifies the name of the Microsoft Azure service that contains the virtual machine to start. + + String + + String + + + + + + VM + + Specifies a virtual machine object that identifies the virtual machine to start. + + PersistentVM + + PersistentVM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Start-AzureVM -ServiceName "myservice1" -Name "MyVM" + + This command starts the "MyVM" virtual machine running in the "myservice1" Microsoft Azure service. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> C:\PS>Get-AzureVM -ServiceName "myservice1" -Name "DatabaseServer" | Start-AzureVM + + This command retrieves the virtual machine object for the VM whose name is "DatabaseServer" and then requests a start for it. + + + + + + + + + + + Get-AzureVM + + + + Remove-AzureVM + + + + Restart-AzureVM + + + + Stop-AzureVM + + + + Update-AzureVM + + + + + + + + Stop-AzureVM + + Shuts down a Microsoft Azure virtual machine. + + + + + Stop + AzureVM + + + + + The Stop-AzureVM cmdlet requests a shutdown of a virtual machine. + + + + Stop-AzureVM + + Name + + Specifies the name of the virtual machine to shut down. + + Use a wildcard "*" to stop multiple VMs asynchronously. With a wild card, Stop-AzureVM cmdlet calls ShutdownRoles operation (http://msdn.microsoft.com/en-us/library/azure/dn469421.aspx), instead of ShutdownRole operation (http://msdn.microsoft.com/en-us/library/azure/jj157195.aspx ). + + String + + + StayProvisioned + + Keeps the VM provisioned. + + SwitchParameter + + + Force + + Allows the deallocation of last VM in a deployment. + + SwitchParameter + + + ServiceName + + Specifies the name of the Microsoft Azure service that contains the virtual machine to shut down. + + String + + + + Stop-AzureVM + + VM + + Specifies a virtual machine object that identifies the virtual machine to shut down. + + PersistentVM + + + StayProvisioned + + Keeps the VM provisioned. + + SwitchParameter + + + Force + + Allows the deallocation of last VM in a deployment. + + SwitchParameter + + + ServiceName + + Specifies the name of the Microsoft Azure service that contains the virtual machine to shut down. + + String + + + + + + Name + + Specifies the name of the virtual machine to shut down. + + Use a wildcard "*" to stop multiple VMs asynchronously. With a wild card, Stop-AzureVM cmdlet calls ShutdownRoles operation (http://msdn.microsoft.com/en-us/library/azure/dn469421.aspx), instead of ShutdownRole operation (http://msdn.microsoft.com/en-us/library/azure/jj157195.aspx ). + + String + + String + + + + + + StayProvisioned + + Keeps the VM provisioned. + + SwitchParameter + + SwitchParameter + + + + + + Force + + Allows the deallocation of last VM in a deployment. + + SwitchParameter + + SwitchParameter + + + + + + ServiceName + + Specifies the name of the Microsoft Azure service that contains the virtual machine to shut down. + + String + + String + + + + + + VM + + Specifies a virtual machine object that identifies the virtual machine to shut down. + + PersistentVM + + PersistentVM + + + + + + PipelineVariable + + Not Specified + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Stop-AzureVM -ServiceName "myservice1" -Name "MyVM" + + Description + + + + -----------This command shuts down the "MyVM" virtual machine running in the "myservice1" Microsoft Azure service and deprovisions it. If it is the last VM in deployment, then confirmation pop-up window is displayed with a warning that deprovisioning will cause loss deployment VIP. + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> Get-AzureVM -ServiceName "myservice1" -Name "MyVM" | Stop-AzureVM + + Description + + + + -----------This command retrieves the virtual machine object for the VM whose name is "MyVM" and then shuts it down and deprovisions it. If it is the last VM in deployment, then confirmation pop-up window is displayed with a warning that deprovisioning will cause loss deployment VIP. + + + + + -------------------------- EXAMPLE 3 -------------------------- + + + + PS C:\> Stop-AzureVM -ServiceName "myservice1" -Name "MyVM" -StayProvisioned + + Description + + + + -----------This command shuts down the "MyVM" virtual machine running in the "myservice1" Microsoft Azure service and keeps the VM provisioned. + + + + + -------------------------- EXAMPLE 4 -------------------------- + + + + PS C:\> Stop-AzureVM -ServiceName "myservice1" -Name "MyVM" -Force + + Description + + + + -----------This command shuts down the "MyVM" virtual machine running in the "myservice1" Microsoft Azure service even if it is the last VM in the deployment. + + + + + -------------------------- EXAMPLE 5 -------------------------- + + + + PS C:\> Stop-AzureVM -ServiceName "PSTestService" -Name "*" -Force + + Description + + + + -----------This command shuts down multiple VMs asynchronously in the "PSTestService" + + + + + + + Unknown + + + + + + + + Test-AzureStaticVNetIP + + Test the availability of a static virtual network IP address, and get a list of suggestion if the queried one not available. + + + + + Test + AzureStaticVNetIP + + + + + Test the availability of a static virtual network IP address, and get a list of suggestion if the queried one not available. + + + + Test-AzureStaticVNetIP + + VNetName + + The Name of a Virtual Network. + + String + + + IPAddress + + The query of static VNet IPAddress. + + String + + + + + + VNetName + + The Name of a Virtual Network. + + String + + String + + + + + + IPAddress + + The query of static VNet IPAddress. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Unknown + + + + + + + + Update-AzureDisk + + Updates the label of a disk in the Microsoft Azure disk repository. + + + + + Update + AzureDisk + + + + + The Update-AzureDisk cmdlet changes the label associated with a disk in the disk repository of the current Microsoft Azure subscription. + + + + Update-AzureDisk + + DiskName + + Specifies the name of the disk in the disk repository. + + String + + + Label + + Specifies the new label of the disk. + + String + + + + + + DiskName + + Specifies the name of the disk in the disk repository. + + String + + String + + + + + + Label + + Specifies the new label of the disk. + + String + + String + + + + + + + + + + + + + + + + + + + + + DiskContext + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Update-AzureDisk –DiskName "MyOSDisk" -Label "DoNotUse" + + This command updates the label of the disk named "MyOSDisk" to "DoNotUse". + + + + + + + + + + + Add-AzureDisk + + + + Get-AzureDisk + + + + Remove-AzureDisk + + + + + + + + Update-AzureVM + + Modifies the configuration of a Microsoft Azure virtual machine. + + + + + Update + AzureVM + + + + + The Update-AzureVM cmdlet accepts update information for the specified virtual machine and initiates the update. You can add or remove data disks, modify the cache mode of data or operating system disks, change the network endpoints, or change the size of the virtual machine. + + + + Update-AzureVM + + Name + + Specifies the name of the virtual machine to be updated. + + String + + + VM + + The virtual machine object that includes updated settings. + + PersistentVM + + + ServiceName + + Specifies the name of the Microsoft Azure service. + + String + + + + + + Name + + Specifies the name of the virtual machine to be updated. + + String + + String + + + + + + VM + + The virtual machine object that includes updated settings. + + PersistentVM + + PersistentVM + + + + + + ServiceName + + Specifies the name of the Microsoft Azure service. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Get-AzureVM -ServiceName "MySvc1" -Name "MyVM3" ` + | Set-AzureVMSize –InstanceSize "Medium" ` + | Update-AzureVM + + This example changes the size of the virtual machine "MyVM3", running in "MySvc1", to "Medium". + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> C:\PS>Get-AzureVM -ServiceName "MySvc1" -Name "MyVM3" ` + | Add-AzureDataDisk -CreateNew -MediaLocation "https://MyaccountStore1.blob.core.azure.com/vhds/MyNewDisk.vhd" -DiskSizeInGB 128 -DiskLabel "Data-128" -LUN 0 ` + | Update-AzureVM + + This example adds a new data disk to the virtual machine "MyVM3", running in "MySvc1". + + + + + + + + + + + Get-AzureVM + + + + New-AzureVMConfig + + + + Remove-AzureVM + + + + Restart-AzureVM + + + + Start-AzureVM + + + + Stop-AzureVM + + + + New-AzureVM + + + + Set-AzureVMSize + + + + + + + + Update-AzureVMImage + + The Update-AzureVMImage cmdlet updates the properties on an OS or VM image in the image repository. It returns an image object with information about the updated image. + + + + + Update + AzureVMImage + + + + + + + + + Update-AzureVMImage + + ImageName + + Name of the image to update in the image repository. + + String + + + Label + + The new label of the image. + + String + + + Eula + + Specifies the End User License Aggreement, recommended value is a URL. + + String + + + Description + + Specifies the description of the OS image. + + String + + + ImageFamily + + Specifies a value that can be used to group OS or VM images. + + String + + + PublishedDate + + + + Nullable`1[DateTime] + + + PrivacyUri + + Specifies the URI that points to a document that contains the privacy policy related to the OS or VM image. + + Uri + + + RecommendedVMSize + + Specifies the size to use for the virtual machine that is created from the OS or VM image. Values are: "Medium", "Large", and "ExtraLarge", "A5", "A6",, "A7". + + String + + + DiskConfig + + This is the OS Disk and the Data Disk configuration for the VM Image created using the New-AzureVMImageDiskConfigSet, Set-AzureVMImageOSDiskConfig and Set-AzureVMImageDataDiskConfig cmdlets. + + VirtualMachineImageDiskConfigSet + + + Language + + Language for the OS in the VM or OS Image + + String + + + IconUri + + Uri to an icon for the OS or VM Image + + Uri + + + SmallIconUri + + Uri to a small icon for the OS or VM Image + + Uri + + + DontShowInGui + + + + SwitchParameter + + + + + + ImageName + + Name of the image to update in the image repository. + + String + + String + + + + + + Label + + The new label of the image. + + String + + String + + + + + + Eula + + Specifies the End User License Aggreement, recommended value is a URL. + + String + + String + + + + + + Description + + Specifies the description of the OS image. + + String + + String + + + + + + ImageFamily + + Specifies a value that can be used to group OS or VM images. + + String + + String + + + + + + PublishedDate + + + + Nullable`1[DateTime] + + Nullable`1[DateTime] + + + + + + PrivacyUri + + Specifies the URI that points to a document that contains the privacy policy related to the OS or VM image. + + Uri + + Uri + + + + + + RecommendedVMSize + + Specifies the size to use for the virtual machine that is created from the OS or VM image. Values are: "Medium", "Large", and "ExtraLarge", "A5", "A6",, "A7". + + String + + String + + + + + + DiskConfig + + This is the OS Disk and the Data Disk configuration for the VM Image created using the New-AzureVMImageDiskConfigSet, Set-AzureVMImageOSDiskConfig and Set-AzureVMImageDataDiskConfig cmdlets. + + VirtualMachineImageDiskConfigSet + + VirtualMachineImageDiskConfigSet + + + + + + Language + + Language for the OS in the VM or OS Image + + String + + String + + + + + + IconUri + + Uri to an icon for the OS or VM Image + + Uri + + Uri + + + + + + SmallIconUri + + Uri to a small icon for the OS or VM Image + + Uri + + Uri + + + + + + DontShowInGui + + + + SwitchParameter + + SwitchParameter + + + + + + ShowInGui + + Not Specified + + switchparameter + + switchparameter + + + + + + + + + + + + + + + + + + + + + OSImageContext + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Update-AzureVMImage -ImageName "Windows-Server-2008-SP2" -Label "DoNotUse" + + Description + + + + -----------This example updates the image named "Windows-Server-2008-SP2" by changing the image label to "DoNotUse" + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> Get-AzureVMImage | Where-Object {$_.Label -eq "DoNotUse" } | Update-AzureVMImage -Label "Updated" + + Description + + + + -----------This example gets all the operating system images labeled "DoNotUse" and changes the label to "Updated". + + + + + + + Unknown + + + + + + + + Get-AzureRegion + + + + + + + + + + + + + + + + + Get-AzureRegion + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Unknown -------------------------- + + + + PS C:\> + + + + + + + + + + + -------------------------- Unknown -------------------------- + + + + PS C:\> + + + + + + + + + + + + + Online Version: + + + + + + + + Get-AzureServiceExtensionImage + + Get information for the latest available hosted service extension images. + + + + + + + + + + + Get information for the latest available hosted service extension images. + + + + Get-AzureServiceExtensionImage + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> Get-AzureServiceExtensionImage + + ProviderNameSpace : Microsoft.Windows.Azure.Extensions + Type : RDP + Version : 1.0 + Label : Microsoft Azure Remote Desktop Extension + Description : Microsoft Azure Remote Desktop Extension + HostingResources : WebOrWorkerRole + ThumbprintAlgorithm : sha1 + PublicConfigurationSchema : <?xml version="1.0" encoding="utf-8"?><xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" + xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:element name="PublicConfig"><xs:complexType><xs:sequence><xs:element + name="UserName" type="xs:string" minOccurs="1" /><xs:element name="Expiration" type="xs:string" minOccurs="1" + /></xs:sequence></xs:complexType></xs:element></xs:schema> + PrivateConfigurationSchema : <?xml version="1.0" encoding="utf-8"?><xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" + xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:element name="PrivateConfig"><xs:complexType><xs:sequence><xs:element + name="Password" type="xs:string" /></xs:sequence></xs:complexType></xs:element></xs:schema> + OperationDescription : Get-AzureServiceExtensionImage + OperationId : ee7f7237-78a6-3819-8529-ede859c51411 + OperationStatus : Succeeded + + Description + + + + ----------- + + + + + + + Unknown + + + + + + + + + Remove-AzureVMChefExtension + + + This cmdlet deletes the Chef extension applied on the VM. + + + + + Remove + AzureVMChefExtension + + + + This cmdlet deletes the Chef extension applied on the VM. + + + + + Remove-AzureVMChefExtension + + VM + + The persistent VM object. + + IPersistentVM + + + + + + + VM + + The persistent VM object. + + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + C:\PS> + + + Remove-AzureVMChefExtension -VM $vm; + + + Description + ----------- + This cmdlet deletes the Chef extension applied on the VM. + + + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureDeploymentEvent + + + The Get-AzureDeploymentEvent cmdlet retrieves information regarding Azure-initiated events that impact virtual machines and cloud services, including planned maintenance events, in the provided time window. It returns a list of events that identify the Role Instance or Virtual Machine impacted, the reason for the impact, and the start time of the event. + + + + + Get + AzureDeploymentEvent + + + + The Get-AzureDeploymentEvent cmdlet retrieves information regarding Azure-initiated events that impact virtual machines and cloud services, including planned maintenance events, in the provided time window. It returns a list of events that identify the Role Instance or Virtual Machine impacted, the reason for the impact, and the start time of the event. + + + + + Get-AzureDeploymentEvent + + EndTime + + Ending time to query deployment events + + DateTime + + + ServiceName + + Name of the hosted service + + string + + + StartTime + + + + DateTime + + + + + + + EndTime + + Ending time to query deployment events + + + DateTime + + DateTime + + + + + + ServiceName + + Name of the hosted service + + + string + + string + + + + + + StartTime + + + + + DateTime + + DateTime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureVMChefExtension + + + This cmdlet gets the Chef extension (if any) applied on the VM. + + + + + Get + AzureVMChefExtension + + + + This cmdlet gets the Chef extension (if any) applied on the VM. + + + + + Get-AzureVMChefExtension + + VM + + The persistent VM object. + + IPersistentVM + + + + + + + VM + + The persistent VM object. + + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + The cmdlet displays the Chef Extension information on the VM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + C:\PS> + + + Get-AzureVMChefExtension -VM $vm; + + + Description + ----------- + This cmdlet gets the Chef extension (if any) applied on the VM. + + + + + + + + + + + + + + + + + + + + + + + + + Set-AzureVMChefExtension + + + This cmdlet adds the Chef extension to the VM. + + + + + Set + AzureVMChefExtension + + + + This cmdlet adds the Chef extension to the VM. + + + + + Set-AzureVMChefExtension + + VM + + The persistent VM object. + + IPersistentVM + + + ValidationPem + + The Chef validator pem file path + + Validator.pem + + + ClientRb + + The path to the Chef client.rb. + + Client.rb + + + RunList + + The chef node run list. + + RunList + + + + + + + VM + + The persistent VM object. + + IPersistentVM + + IPersistentVM + + + + + + Version + + Chef Extension version. + + Version + + String + + + Latest available Chef Extension version + + + ValidationPem + + The Chef Server Validation Key File Path. + + Validator.pem + + String + + + + + + ClientRb + + The Chef Server Client Config (Client.rb) File Path + + Client.rb + + String + + + + + + RunList + + Chef node runlist + + RunList + + String + + + + + + ChefServerUrl + + The Chef Server Url + + ChefServerUrl + + String + + + + + + ValidationClientName + + The Chef ValidationClientName, used to determine whether a chef-client may register with a Chef server. + + ValidationClientName + + String + + + + + + OrganizationName + + The Chef Organization name, used to form Validation Client Name + + OrganizationName + + String + + + + + + Linux + + Set this parameter for Linux extension + + + Boolean + + + + + + Windows + + Set this parameter for Windows extension + + + Boolean + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + C:\PS> + + + Set-AzureVMChefExtension -VM $vm -ValidationPem "C:\\myorg-validator.pem" -ClientRb "C:\\client.rb" -RunList "apache" -Windows; + + + Description + ----------- + This cmdlet adds the Chef extension to a windows VM. + When the VM comes up, it will be bootstrapped with Chef and have apache running on it. + + + + + + + + + + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + C:\PS> + + + Set-AzureVMChefExtension -VM $vm -ValidationPem "C:\\myorg-validator.pem" -ChefServerUrl "http://ipaddress:port" -ValidationClientName "myorg-validator" -RunList "apache, git" -Windows; + + + Description + ----------- + This cmdlet adds the Chef extension to a windows VM. + When the VM comes up, it will be bootstrapped with Chef and have apache and git installed on it. + Note that if you dont provide the client.rb, then you will need to provide the chef server url and validation client name + + + + + + + + + + + + + -------------------------- EXAMPLE 3 -------------------------- + + + C:\PS> + + + Set-AzureVMChefExtension -VM $vm -ValidationPem "C:\\myorg-validator.pem" -ChefServerUrl "http://ipaddress:port" -OrganizationName "myorg" -Linux; + + + Description + ----------- + This cmdlet adds the Chef extension to a Linux VM. + When the VM comes up, it will be bootstrapped with Chef. + Note that if you dont provide the client.rb, then you will need to provide the chef server url and organization name name + + + + + + + + + + + + + + + + + + + + + + + Get-AzureVMSqlServerExtension + + + Gets the settings of the SQL Server IaaS Agent on a particular VM. + + + + + Get + AzureVMSqlServerExtension + + + + Gets the settings of the SQL Server IaaS Agent on a particular virtual machine. + + + + + Get-AzureVMSqlServerExtension + + VM + + The virtual machine to get the settings from. + + IPersistentVM + + + Version + + The specific version of the SQL Server IaaS Agent. + + string + + + + + + + Version + + The specific version of the SQL Server IaaS Agent. + + string + + string + + + + + + VM + + The virtual machine to get the settings from. + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + + + C:\PS> Get-AzureVMSqlServerExtension-VM $vm + + ExtensionName : SqlIaaSAgent + Publisher : Microsoft.SqlServer.Management + Version : 1.0 + State : Enable + RoleName : vmname + AutoPatchingSettings : Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.AutoPatchingSettings + AutoBackupSettings : Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.AutoBackupSettings + + + Gets the settings of the Sql Server extension on a particular virtual machine. + + + + + + + + + + + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + + + C:\PS> Get-AzureVM -ServiceName "service" -Name "vmname" | Get-AzureVMSqlServerExtension + + ExtensionName : SqlIaaSAgent + Publisher : Microsoft.SqlServer.Management + Version : 1.0 + State : Enable + RoleName : vmname + AutoPatchingSettings : Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.AutoPatchingSettings + AutoBackupSettings : Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.AutoBackupSettings + + + Gets the settings of the SQL Server IaaS Agent on a particular virtual machine using piped input. + + + + + + + + + + + + + + + -------------------------- EXAMPLE 3 -------------------------- + + + + + + C:\PS> Get-AzureVMSqlServerExtension -VM $vm -Version "1.0" + + ExtensionName : SqlIaaSAgent + Publisher : Microsoft.SqlServer.Management + Version : 1.0 + State : Enable + RoleName : vmname + AutoPatchingSettings : Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.AutoPatchingSettings + AutoBackupSettings : Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.AutoBackupSettings + + + Gets the settings of the particular version of SQL Server IaaS Agent on a virtual machine. + + + + + + + + + + + + + + + + Set-AzureVMSqlServerExtension + + + + Remove-AzureVMSqlServerExtension + + + + + + + + + New-AzureVMSqlServerAutoPatchingConfig + + + Creates configuration object for virtual machine automatic patching + + + + + New + AzureVMSqlServerAutoPatchingConfig + + + + Creates configuration object for virtual machine automatic patching + + + + + New-AzureVMSqlServerAutoPatchingConfig + + Enable + + Enables or disables automated patching for the virtual machine. Enabling automated patching will put Windows Update into interactive mode. Disabling automated patching does not changes Windows Update settings. + + bool + + + DayOfWeek + + Specifies the day of the week when updates should be installed. Can be specified any single day of the week or every day. + + string + + + MaintenanceWindowStartingHour + + Specifies the hour of the day when maintenance window starts. This time defines when updates start installing. Rounded to the hour. + + int + + + MaintenanceWindowDuration + + Specifies the duration of the maintenance window. Automated patching will avoid performing an action that can impact a machine availability outside of that window. Only 30 minutes increments are allowed. + + int + + + PatchCategory + + Defines if recommended updates should be included. + + string + + + + + + + DayOfWeek + + Specifies the day of the week when updates should be installed. Can be specified any single day of the week or every day. + + string + + string + + + + + + Enable + + Enables or disables automated patching for the virtual machine. Enabling automated patching will put Windows Update into interactive mode. Disabling automated patching does not changes Windows Update settings. + + bool + + bool + + + True + + + MaintenanceWindowStartingHour + + Specifies the hour of the day when maintenance window starts. This time defines when updates start installing. + + int + + int + + + 3 + + + MaintenanceWindowDuration + + Specifies the duration of the maintenance window. Automated patching will avoid performing an action that can impact a machine availability outside of that window. Only 30 minutes increments are allowed. + + int + + int + + + 120 + + + PatchCategory + + Defines if recommended updates should be included. + + string + + string + + + Optional + + + + + + + + + + + + + + + + + + + + + + AutoPatchingSettings + + + + + + Returns object contains settings for automated patching. + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + + + C:\PS> $aps = New-AzureVMSqlServerAutoPatchingConfig -Enable -DayOfWeek "Thursday" -MaintenanceWindowStartingHour 11 -MaintenanceWindowDuration 120 -PatchCategory "Optional" + + PS C:\> $aps + Enable : True + DayOfWeek : Thursday + MaintenanceWindowStartingHour : 11 + MaintenanceWindowDuration : 120 + PatchCategory : Optional + + + This command creates configuration object that can be used to configure automatic patching using Set-AzureVMSqlServerExtension + + + + + + + + + + + + + + + + Set-AzureVMSqlServerExtension + + + + Remove-AzureVMSqlServerExtension + + + + + + + + + New-AzureVMSqlServerAutoBackupConfig + + + Creates configuration object for SQL Server Automatic Backup + + + + + New + AzureVMSqlServerAutoBackupConfig + + + + Creates configuration object for SQL Server automatic backup + + + + + New-AzureVMSqlServerAutoBackupConfig + + Enable + + Enables or disables automated backup for the SQL Server Virtual Machine. Enabling automated backup will set a backup schedule for all of your existing and new databases. This will update your Managed Backup settings to follow this schedule. + + bool + + + StorageContext + + Specifies the storage account to be used to store backups. Default will be storage account associated with the SQL Server VM. + + AzureStorageContext + + + RetentionPeriod + + Backup Retention period in days. 1 day minimum, 30 day maximum. Default is 30 days. + + int + + + EncryptionEnabled + + Enable backup encryption. If enabled, the certificate will be automatically generated and stored in the same storage account as the backups, and password protected. + + bool + + + CertificatePassword + + Password to encrypt the certificate that is used to perform SQL Server encrypted backups + + SecureString + + + + + + + Enable + + Enables or disables automated backup for the SQL Server Virtual Machine. Enabling automated backup will set a backup schedule for all of your existing and new databases. This will update your Managed Backup settings to follow this schedule. + + bool + + bool + + + True + + + EncryptionEnabled + + Enable backup encryption. If enabled, the certificate will be automatically generated and stored in the same storage account as the backups, and password protected. + + bool + + bool + + + + + + CertificatePassword + + Password to encrypt the certificate that is used to perform SQL Server encrypted backups + + SecureString + + SecureString + + + + + + RetentionPeriod + + Backup Retention period in days. 1 day minimum, 30 day maximum. Default is 30 days. + + int + + int + + + + + + StorageContext + + Specifies the storage account to be used to store backups. Default will be storage account associated with the SQL Server VM. + + AzureStorageContext + + AzureStorageContext + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + C:\PS> + + +$abs = New-AzureVMSqlServerAutoBackupConfig -Enable -RetentionPeriod 10 -StorageUri $storageUrl -StorageKey $storageAccountKeySecure + +Enable : True +EnableEncryption : False +RetentionPeriodInDays : 10 + + Description + ----------- + Creates a auto-backup config object by specifying storage uri and account key. + + + + + + + + + + + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + C:\PS> + + +$abs = New-AzureVMSqlServerAutoBackupConfig -StorageContext $storageContext -Enable -RetentionPeriod 10 + +Enable : True +EnableEncryption : False +RetentionPeriodInDays : 10 + + Description + ----------- + Creates an auto-backup config object by specifying Storage context. + + + + + + + + + + + + + + + -------------------------- EXAMPLE 3 -------------------------- + + + C:\PS> + + +$abs = New-AzureVMSqlServerAutoBackupConfig -StorageContext $storageContext -Enable -RetentionPeriod 10 -EnableEncryption -CertificatePassword $certPasswd + +Enable : True +EnableEncryption : True +RetentionPeriodInDays : 10 + + Description + ----------- + Creates an auto-backup config object by specifying Storage context and enabling encryption option with password. + + + + + + + + + + + + + + + + + + + + + + + + + Remove-AzureVMSqlServerExtension + + + Remove Azure VM Sql Server extension from a VM object. + + + + + Remove + AzureVMSqlServerExtension + + + + Remove Azure VM Sql Server extension from a VM object. + + + + + Remove-AzureVMSqlServerExtension + + VM + + The Virtual Machine to get the settings from. + + IPersistentVM + + + + + + + VM + + The Virtual Machine to get the settings from. + + IPersistentVM + + IPersistentVM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Set-AzureVMSqlServerExtension + + + Configure the Sql Server extension on a VM. + + + + + Set + AzureVMSqlServerExtension + + + + Configure the Sql Server extension on a VM. + + + + + Set-AzureVMSqlServerExtension + + VM + + The Virtual Machine to get the settings from. + + IPersistentVM + + + Version + + The specific version of the SQL Server extension that Get-AzureVMSqlServerExtension will get the settings from. + + string + + + AutoBackupSettings + + Automatic SQL Server backup settings + + AutoBackupSettings + + + AutoPatchingSetttings + + Automatic patching settings + + AutoPatchingSetttings + + + Confirm + + Prompts you for confirmation before executing the command. + + + + WhatIf + + Describes what would happen if you executed the command without actually executing the command. + + + + + + + + AutoBackupSettings + + Automatic SQL Server backup settings + + AutoBackupSettings + + AutoBackupSettings + + + + + + AutoPatchingSetttings + + Automatic patching settings + + AutoPatchingSetttings + + AutoPatchingSetttings + + + + + + Version + + The specific version of the SQL Server extension that Get-AzureVMSqlServerExtension will get the settings from. + + + string + + string + + + + + + VM + + The Virtual Machine to get the settings from. + + IPersistentVM + + IPersistentVM + + + + + + Confirm + + Prompts you for confirmation before executing the command. + + SwitchParameter + + SwitchParameter + + + + + + WhatIf + + Describes what would happen if you executed the command without actually executing the command. + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + C:\PS> + + +Get-AzureVM -ServiceName serviceName -Name vmName | Set-AzureVMSqlServerExtension -AutoPatchingSettings $aps | Update-AzureVM + + Description + ----------- + Sets auto-patching settings on Azure VM. + + + + + + + + + + + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + C:\PS> + + +Get-AzureVM -ServiceName serviceName -Name vmName | Set-AzureVMSqlServerExtension -AutoBackupSettings $abs | Update-AzureVM + + Description + ----------- + Sets auto-backup settings on Azure VM. + + + + + + + + + + + + + + + -------------------------- EXAMPLE 3 -------------------------- + + + C:\PS> + + +Get-AzureVM -ServiceName service -Name vmName| Set-AzureVMSqlServerExtension -Disable + + Description + ----------- + Disables SQL Server VM extension on a given VM + + + + + + + + + + + + + + + -------------------------- EXAMPLE 4 -------------------------- + + + C:\PS> + + + Get-AzureVM -ServiceName service -Name vmName| Set-AzureVMSqlServerExtension -Uninstall + + + Description + ----------- + Uninstalls SQL Server VM extension on a given VM + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Microsoft.WindowsAzure.Commands.ServiceManagement.format.ps1xml b/src/ServiceManagement/Compute/Commands.ServiceManagement/Microsoft.WindowsAzure.Commands.ServiceManagement.format.ps1xml new file mode 100644 index 000000000000..937c3db9c5c2 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Microsoft.WindowsAzure.Commands.ServiceManagement.format.ps1xml @@ -0,0 +1,594 @@ + + + + + Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.VirtualMachineExtensionImageContext + + Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.VirtualMachineExtensionImageContext + + + + + + + + Publisher + + + + ExtensionName + + + + Version + + + + Label + + + + Description + + + + + $len = 100; + if ($_.PublicConfigurationSchema -ne $null) + { + if ($_.PublicConfigurationSchema.Length -gt $len) + { + $_.PublicConfigurationSchema.Substring(0, $len) + '...'; + } + else + { + $_.PublicConfigurationSchema; + } + } + else + { + $_.PublicConfigurationSchema; + } + + + + + + $len = 100; + if ($_.PrivateConfigurationSchema -ne $null) + { + if ($_.PrivateConfigurationSchema.Length -gt $len) + { + $_.PrivateConfigurationSchema.Substring(0, $len) + '...'; + } + else + { + $_.PrivateConfigurationSchema; + } + } + else + { + $_.PrivateConfigurationSchema; + } + + + + + IsInternalExtension + + + + + $len = 100; + if ($_.SampleConfig -ne $null) + { + if ($_.SampleConfig.Length -gt $len) + { + $_.SampleConfig.Substring(0, $len) + '...'; + } + else + { + $_.SampleConfig; + } + } + else + { + $_.SampleConfig; + } + + + + + ReplicationCompleted + + + + Eula + + + + PrivacyUri + + + + HomepageUri + + + + IsJsonExtension + + + + DisallowMajorVersionUpgrade + + + + SupportedOS + + + + PublishedDate + + + + CompanyName + + + + + + + + Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions.ExtensionImageContext + + Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions.ExtensionImageContext + + + + + + + + ProviderNameSpace + + + + ExtensionName + + + + Version + + + + Label + + + + Description + + + + HostingResources + + + + MediaLink + + + + ThumbprintAlgorithm + + + + + $len = 100; + if ($_.PublicConfigurationSchema -ne $null) + { + if ($_.PublicConfigurationSchema.Length -gt $len) + { + $_.PublicConfigurationSchema.Substring(0, $len) + '...'; + } + else + { + $_.PublicConfigurationSchema; + } + } + else + { + $_.PublicConfigurationSchema; + } + + + + + + $len = 100; + if ($_.PrivateConfigurationSchema -ne $null) + { + if ($_.PrivateConfigurationSchema.Length -gt $len) + { + $_.PrivateConfigurationSchema.Substring(0, $len) + '...'; + } + else + { + $_.PrivateConfigurationSchema; + } + } + else + { + $_.PrivateConfigurationSchema; + } + + + + + BlockRoleUponFailure + + + + IsInternalExtension + + + + + $len = 100; + if ($_.SampleConfig -ne $null) + { + if ($_.SampleConfig.Length -gt $len) + { + $_.SampleConfig.Substring(0, $len) + '...'; + } + else + { + $_.SampleConfig; + } + } + else + { + $_.SampleConfig; + } + + + + + ReplicationCompleted + + + + Eula + + + + PrivacyUri + + + + HomepageUri + + + + IsJsonExtension + + + + DisallowMajorVersionUpgrade + + + + SupportedOS + + + + PublishedDate + + + + CompanyName + + + + + + + + Microsoft.WindowsAzure.Commands.ServiceManagement.Model.PersistentVMRoleListContext + + Microsoft.WindowsAzure.Commands.ServiceManagement.Model.PersistentVMRoleListContext + + + + + + + ServiceName + + + Name + + + Status + + + + + + + + Microsoft.WindowsAzure.Commands.ServiceManagement.Model.LocationsContext + + Microsoft.WindowsAzure.Commands.ServiceManagement.Model.LocationsContext + + + + + + + + DisplayName + + + + Name + + + + AvailableServices + + + + + "{" + (-Split $_.WebWorkerRoleSizes -Join ", ") + "}" + + + + + + "{" + (-Split $_.VirtualMachineRoleSizes -Join ", ") + "}" + + + + + + "{" + (-Split $_.StorageAccountTypes -Join ", ") + "}" + + + + + OperationDescription + + + + OperationId + + + + OperationStatus + + + + + + + + Microsoft.WindowsAzure.Commands.ServiceManagement.Model.AffinityGroupContext + + Microsoft.WindowsAzure.Commands.ServiceManagement.Model.AffinityGroupContext + + + + + + + + Name + + + + Label + + + + Description + + + + Location + + + + HostedServices + + + + StorageServices + + + + Capabilities + + + + CreatedTime + + + + + "{" + (-Split $_.WebWorkerRoleSizes -Join ", ") + "}" + + + + + + "{" + (-Split $_.VirtualMachineRoleSizes -Join ", ") + "}" + + + + + OperationDescription + + + + OperationId + + + + OperationStatus + + + + + + + + Microsoft.WindowsAzure.Commands.ServiceManagement.Model.HostedServiceDetailedContext + + Microsoft.WindowsAzure.Commands.ServiceManagement.Model.HostedServiceDetailedContext + + + + + + + + ServiceName + + + + Url + + + + Label + + + + Description + + + + Location + + + + AffinityGroup + + + + Status + + + + ExtendedProperties + + + + DateModified + + + + DateCreated + + + + ReverseDnsFqdn + + + + + "{" + (-Split $_.WebWorkerRoleSizes -Join ", ") + "}" + + + + + + "{" + (-Split $_.VirtualMachineRoleSizes -Join ", ") + "}" + + + + + OperationDescription + + + + OperationId + + + + OperationStatus + + + + + + + + Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.AutoBackupSettings + + Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.AutoBackupSettings + + + + + + + + Enable + + + + EnableEncryption + + + + RetentionPeriod + + + + + + + + Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.VirtualMachineSqlServerExtensionContext + + Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.VirtualMachineSqlServerExtensionContext + + + + + + + + ExtensionName + + + + Publisher + + + + Version + + + + State + + + + RoleName + + + + AutoPatchingSettings + + + + AutoBackupSettings + + + + + + + + diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/AffinityGroupContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/AffinityGroupContext.cs new file mode 100644 index 000000000000..ecfe14eb3bb9 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/AffinityGroupContext.cs @@ -0,0 +1,59 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class AffinityGroupContext : ManagementOperationContext + { + public AffinityGroupContext() + { + this.HostedServices = new List(); + this.StorageServices = new List(); + this.Capabilities = new List(); + this.VirtualMachineRoleSizes = new List(); + this.WebWorkerRoleSizes = new List(); + } + + public string Name { get; set; } + + public string Label { get; set; } + + public string Description { get; set; } + + public string Location { get; set; } + + public IEnumerable HostedServices { get; set; } + + public IEnumerable StorageServices { get; set; } + + public IEnumerable Capabilities { get; set; } + + public IEnumerable WebWorkerRoleSizes { get; set; } + + public IEnumerable VirtualMachineRoleSizes { get; set; } + + public DateTime? CreatedTime { get; set; } + + public class Service + { + public Uri Url { get; set; } + + public string ServiceName { get; set; } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/AvailabilityResponseContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/AvailabilityResponseContext.cs new file mode 100644 index 000000000000..e9b144e3a357 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/AvailabilityResponseContext.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class AvailabilityResponseContext : ManagementOperationContext + { + public bool Result { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/CertificateConfiguration.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/CertificateConfiguration.cs new file mode 100644 index 000000000000..7e9b6f373781 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/CertificateConfiguration.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class CertificateConfiguration + { + public string Thumbprint { get; set; } + + public string ThumbprintAlgorithm { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/CertificateContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/CertificateContext.cs new file mode 100644 index 000000000000..630bb8640ad8 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/CertificateContext.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class CertificateContext : ServiceOperationContext + { + public Uri Url + { + get; + set; + } + + public string Data + { + get; + set; + } + + public string Thumbprint + { + get; + set; + } + + public string ThumbprintAlgorithm + { + get; + set; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/DeploymentInfoContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/DeploymentInfoContext.cs new file mode 100644 index 000000000000..c60093f3ac7d --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/DeploymentInfoContext.cs @@ -0,0 +1,310 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Xml; +using System.Xml.Linq; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + using PVM = Model; + + public class DeploymentInfoContext : ServiceOperationContext + { + private readonly XNamespace ns = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration"; + + + public string SdkVersion + { + get; + protected set; + } + + public bool? RollbackAllowed + { + get; + protected set; + } + + public string Slot + { + get; + protected set; + } + + public string Name + { + get; + protected set; + } + + public string DeploymentName + { + get; + protected set; + } + + public Uri Url + { + get; + protected set; + } + + public string Status + { + get; + protected set; + } + + public int CurrentUpgradeDomain + { + get; + set; + } + + public string CurrentUpgradeDomainState + { + get; + set; + } + + public string UpgradeType + { + get; + set; + } + + public IList RoleInstanceList + { + get; + protected set; + } + + public string Configuration + { + get; + protected set; + } + + public string DeploymentId + { + get; + protected set; + } + + public string Label + { + get; + protected set; + } + + public string VNetName + { + get; + protected set; + } + + public Microsoft.WindowsAzure.Commands.ServiceManagement.Model.DnsSettings DnsSettings + { + get; + protected set; + } + + public string OSVersion + { + get; + set; + } + + public IDictionary RolesConfiguration + { + get; + protected set; + } + + public PVM.VirtualIPList VirtualIPs + { + get; + protected set; + } + + public string ReservedIPName + { + get; + protected set; + } + + public DateTime? CreatedTime + { + get; + protected set; + } + + public DateTime? LastModifiedTime + { + get; + protected set; + } + + public bool? Locked + { + get; + protected set; + } + + public string InternalLoadBalancerName + { + get; + protected set; + } + + public PVM.LoadBalancerList LoadBalancers + { + get; + protected set; + } + + public DeploymentInfoContext(DeploymentGetResponse deployment) + { + this.Slot = deployment.DeploymentSlot.ToString(); + this.Name = deployment.Name; + this.DeploymentName = deployment.Name; + this.Url = deployment.Uri; + this.Status = deployment.Status.ToString(); + this.DeploymentId = deployment.PrivateId; + this.VNetName = deployment.VirtualNetworkName; + this.SdkVersion = deployment.SdkVersion; + this.CreatedTime = deployment.CreatedTime; + this.LastModifiedTime = deployment.LastModifiedTime; + this.Locked = deployment.Locked; + + // IP Related + this.ReservedIPName = deployment.ReservedIPName; + this.VirtualIPs = deployment.VirtualIPAddresses == null ? null : new PVM.VirtualIPList( + deployment.VirtualIPAddresses.Select(a => + new PVM.VirtualIP + { + Address = a.Address, + IsDnsProgrammed = a.IsDnsProgrammed, + Name = a.Name + })); + + // DNS + if (deployment.DnsSettings != null) + { + this.DnsSettings = new Microsoft.WindowsAzure.Commands.ServiceManagement.Model.DnsSettings + { + DnsServers = new Microsoft.WindowsAzure.Commands.ServiceManagement.Model.DnsServerList() + }; + + foreach (var dns in deployment.DnsSettings.DnsServers) + { + var newDns = new Microsoft.WindowsAzure.Commands.ServiceManagement.Model.DnsServer + { + Name = dns.Name, + Address = dns.Address.ToString() + }; + this.DnsSettings.DnsServers.Add(newDns); + } + } + + this.RollbackAllowed = deployment.RollbackAllowed; + if (deployment.UpgradeStatus != null) + { + this.CurrentUpgradeDomain = deployment.UpgradeStatus.CurrentUpgradeDomain; + this.CurrentUpgradeDomainState = deployment.UpgradeStatus.CurrentUpgradeDomainState.ToString(); + this.UpgradeType = deployment.UpgradeStatus.UpgradeType.ToString(); + } + + this.Configuration = string.IsNullOrEmpty(deployment.Configuration) ? string.Empty : deployment.Configuration; + + this.Label = string.IsNullOrEmpty(deployment.Label) ? string.Empty : deployment.Label; + + this.RoleInstanceList = deployment.RoleInstances; + + if (!string.IsNullOrEmpty(deployment.Configuration)) + { + string xmlString = this.Configuration; + + XDocument doc; + using (var stringReader = new StringReader(xmlString)) + { + XmlReader reader = XmlReader.Create(stringReader); + doc = XDocument.Load(reader); + } + + this.OSVersion = doc.Root.Attribute("osVersion") != null ? + doc.Root.Attribute("osVersion").Value : + string.Empty; + + this.RolesConfiguration = new Dictionary(); + + var roles = doc.Root.Descendants(this.ns + "Role"); + + foreach (var role in roles) + { + this.RolesConfiguration.Add(role.Attribute("name").Value, new RoleConfiguration(role)); + } + } + + // ILB + if (deployment.LoadBalancers != null) + { + this.LoadBalancers = new PVM.LoadBalancerList( + from b in deployment.LoadBalancers + select new PVM.LoadBalancer + { + Name = b.Name, + FrontEndIpConfiguration = b.FrontendIPConfiguration == null ? null : new PVM.IpConfiguration + { + StaticVirtualNetworkIPAddress = b.FrontendIPConfiguration.StaticVirtualNetworkIPAddress, + SubnetName = b.FrontendIPConfiguration.SubnetName, + Type = string.Equals( + b.FrontendIPConfiguration.Type, + PVM.LoadBalancerType.Private.ToString(), + StringComparison.OrdinalIgnoreCase) + ? PVM.LoadBalancerType.Private : PVM.LoadBalancerType.Unknown + } + }); + + this.InternalLoadBalancerName = this.LoadBalancers == null || !this.LoadBalancers.Any() ? null + : this.LoadBalancers.First().Name; + } + } + + public XDocument SerializeRolesConfiguration() + { + XDocument document = new XDocument(); + + XElement rootElement = new XElement(this.ns + "ServiceConfiguration"); + document.Add(rootElement); + + rootElement.SetAttributeValue("serviceName", this.ServiceName); + rootElement.SetAttributeValue("osVersion", this.OSVersion); + rootElement.SetAttributeValue("xmlns", this.ns.ToString()); + + foreach (var roleConfig in this.RolesConfiguration) + { + rootElement.Add(roleConfig.Value.Serialize()); + } + + return document; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/DeploymentRebootEventContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/DeploymentRebootEventContext.cs new file mode 100644 index 000000000000..eaa4453202f4 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/DeploymentRebootEventContext.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class DeploymentRebootEventContext : ServiceOperationContext + { + public string DeploymentName { get; set; } + public string DeploymentSlot { get; set; } + public string InstanceName { get; set; } + public string RebootReason { get; set; } + public DateTime? RebootStartTime { get; set; } + public string RoleName { get; set; } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/DiskContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/DiskContext.cs new file mode 100644 index 000000000000..69153ab6148c --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/DiskContext.cs @@ -0,0 +1,64 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public sealed class DiskContext : ManagementOperationContext + { + public string AffinityGroup { get; set; } + + public RoleReference AttachedTo { get; set; } + + public bool IsCorrupted { get; set; } + + public string Label { get; set; } + + public string Location { get; set; } + + public int DiskSizeInGB { get; set; } + + public Uri MediaLink { get; set; } + + public string DiskName { get; set; } + + public string SourceImageName { get; set; } + + public string OS { get; set; } + + public string IOType { get; set; } + + public class RoleReference + { + public string DeploymentName { get; set; } + + public string HostedServiceName { get; set; } + + public string RoleName { get; set; } + + public override string ToString() + { + return string.Format( + CultureInfo.InvariantCulture, + "RoleName: {0} \n\rDeploymentName: {1} \n\rHostedServiceName: {2}", + this.RoleName, + this.DeploymentName, + this.HostedServiceName); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/HostedServiceContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/HostedServiceContext.cs new file mode 100644 index 000000000000..d91cd5b3f441 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/HostedServiceContext.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class HostedServiceContext : ServiceOperationContext + { + public Uri Url { get; set; } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/HostedServiceDetailedContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/HostedServiceDetailedContext.cs new file mode 100644 index 000000000000..ba8d8e32b377 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/HostedServiceDetailedContext.cs @@ -0,0 +1,44 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class HostedServiceDetailedContext : HostedServiceContext + { + public string Label { get; set; } + + public string Description { get; set; } + + public string AffinityGroup { get; set; } + + public string Location { get; set; } + + public string Status { get; set; } + + public IDictionary ExtendedProperties { get; set; } + + public IEnumerable WebWorkerRoleSizes { get; set; } + + public IEnumerable VirtualMachineRoleSizes { get; set; } + + public DateTime DateModified { get; set; } + + public DateTime DateCreated { get; set; } + + public string ReverseDnsFqdn { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/IPersistentVM.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/IPersistentVM.cs new file mode 100644 index 000000000000..ec05637e7684 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/IPersistentVM.cs @@ -0,0 +1,21 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public interface IPersistentVM + { + PersistentVM GetInstance(); + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/InputEndpointContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/InputEndpointContext.cs new file mode 100644 index 000000000000..32b5f751dd1b --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/InputEndpointContext.cs @@ -0,0 +1,51 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class InputEndpointContext + { + public string LBSetName { get; set; } + + public int LocalPort { get; set; } + + public string Name { get; set; } + + public int? Port { get; set; } + + public string Protocol { get; set; } + + public string Vip { get; set; } + + public string ProbePath { get; set; } + + public int ProbePort { get; set; } + + public string ProbeProtocol { get; set; } + + public int? ProbeIntervalInSeconds { get; set; } + + public int? ProbeTimeoutInSeconds { get; set; } + + public bool? EnableDirectServerReturn { get; set; } + + public NetworkAclObject Acl { get; set; } + + public string InternalLoadBalancerName { get; set; } + + public int? IdleTimeoutInMinutes { get; set; } + + public string LoadBalancerDistribution { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/InternalLoadBalancerContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/InternalLoadBalancerContext.cs new file mode 100644 index 000000000000..5b78fdf906df --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/InternalLoadBalancerContext.cs @@ -0,0 +1,31 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class InternalLoadBalancerContext : ManagementOperationContext + { + public string InternalLoadBalancerName { get; set; } + + public string ServiceName { get; set; } + + public string DeploymentName { get; set; } + + public string SubnetName { get; set; } + + public string IPAddress { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/InternalLoadBalancerSetting.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/InternalLoadBalancerSetting.cs new file mode 100644 index 000000000000..ca4cbb24a05a --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/InternalLoadBalancerSetting.cs @@ -0,0 +1,25 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class InternalLoadBalancerConfig + { + public string InternalLoadBalancerName { get; set; } + + public string SubnetName { get; set; } + + public string IPAddress { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/LocationsContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/LocationsContext.cs new file mode 100644 index 000000000000..e6bfdba7128c --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/LocationsContext.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System.Collections.Generic; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class LocationsContext : ManagementOperationContext + { + public string DisplayName { get; set; } + + public string Name { get; set; } + + public AvailableServicesList AvailableServices { get; set; } + + public IEnumerable WebWorkerRoleSizes { get; set; } + + public IEnumerable VirtualMachineRoleSizes { get; set; } + + public IEnumerable StorageAccountTypes { get; set; } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/NetworkAclObject.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/NetworkAclObject.cs new file mode 100644 index 000000000000..ea93d7a654ba --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/NetworkAclObject.cs @@ -0,0 +1,104 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class NetworkAclObject : IEnumerable + { + private int nextId = 0; + + private List rules; + public ReadOnlyCollection Rules + { + get + { + return this.rules.AsReadOnly(); + } + } + + public NetworkAclObject() + { + this.rules = new List(); + } + + public void AddRule(NetworkAclRule rule) + { + rule.RuleId = this.nextId; + this.nextId++; + + this.rules.Add(rule); + } + + public NetworkAclRule GetRule(int ruleId) + { + return this.rules.Find((r) => { return r.RuleId == ruleId; }); + } + + public bool RemoveRule(int ruleId) + { + return this.rules.RemoveAll((r) => { return r.RuleId == ruleId; }) > 0; + } + + public IEnumerator GetEnumerator() + { + return this.rules.GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return this.rules.GetEnumerator(); + } + + public static implicit operator NetworkAclObject(EndpointAccessControlList other) + { + var acl = new NetworkAclObject(); + + if (other != null) + { + foreach (var rule in other.Rules) + { + acl.AddRule(rule); + } + } + + return acl; + } + + public static implicit operator EndpointAccessControlList(NetworkAclObject other) + { + if (other == null + || other.Rules.Count == 0) + { + return null; + } + + var acl = new EndpointAccessControlList(); + acl.Rules = new Collection(); + + if (other != null) + { + foreach (var rule in other.Rules) + { + acl.Rules.Add(rule); + } + } + + return acl; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/NetworkAclRule.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/NetworkAclRule.cs new file mode 100644 index 000000000000..fe1f21b51c1d --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/NetworkAclRule.cs @@ -0,0 +1,57 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class NetworkAclRule + { + public int RuleId { get; set; } + public int Order { get; set; } + public string Action { get; set; } + public string RemoteSubnet { get; set; } + public string Description { get; set; } + + public NetworkAclRule() + { + this.RuleId = -1; + this.Order = 0; + this.Action = string.Empty; + this.RemoteSubnet = string.Empty; + this.Description = string.Empty; + } + + public override string ToString() + { + return this.Description ?? string.Format("{0} {1}", this.Action, this.RemoteSubnet); + } + + public static implicit operator NetworkAclRule(AccessControlListRule o) + { + return new NetworkAclRule() { + Order = o.Order ?? 0, + Action = o.Action, + RemoteSubnet = o.RemoteSubnet, + Description = o.Description }; + } + + public static implicit operator AccessControlListRule(NetworkAclRule o) + { + return new AccessControlListRule() { + Order = o.Order, + Action = o.Action, + RemoteSubnet = o.RemoteSubnet, + Description = o.Description }; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/OSImageContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/OSImageContext.cs new file mode 100644 index 000000000000..8032b5ab3813 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/OSImageContext.cs @@ -0,0 +1,43 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class OSImageContext : ManagementOperationContext + { + public virtual string ImageName { get; set; } + public virtual string OS { get; set; } + public virtual Uri MediaLink { get; set; } + public virtual int? LogicalSizeInGB { get; set; } + public virtual string AffinityGroup { get; set; } + public virtual string Category { get; set; } + public virtual string Location { get; set; } + public virtual string Label { get; set; } + public virtual string Description { get; set; } + public virtual string Eula { get; set; } + public virtual string ImageFamily { get; set; } + public virtual DateTime? PublishedDate { get; set; } + public virtual bool? IsPremium { get; set; } + public virtual Uri IconUri { get; set; } + public virtual Uri SmallIconUri { get; set; } + public virtual Uri PrivacyUri { get; set; } + public virtual string RecommendedVMSize { get; set; } + public virtual string PublisherName { get; set; } + public virtual string IOType { get; set; } + public virtual bool? ShowInGui { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/OSVersionsContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/OSVersionsContext.cs new file mode 100644 index 000000000000..72317cf52bd1 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/OSVersionsContext.cs @@ -0,0 +1,33 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class OSVersionsContext : ManagementOperationContext + { + public string Family { get; set; } + + public string FamilyLabel { get; set; } + + public bool IsActive { get; set; } + + public bool IsDefault { get; set; } + + public string Label { get; set; } + + public string Version { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/PSSyncOutputEvents.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/PSSyncOutputEvents.cs new file mode 100644 index 000000000000..4ecbc8011103 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/PSSyncOutputEvents.cs @@ -0,0 +1,295 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Management.Automation; +using System.Management.Automation.Runspaces; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Sync; +using Microsoft.WindowsAzure.Commands.Sync.Upload; +using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model; +using Microsoft.WindowsAzure.Storage; +using ProgressRecord = Microsoft.WindowsAzure.Commands.Sync.ProgressRecord; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class PSSyncOutputEvents : ISyncOutputEvents, IDisposable + { + private readonly PSCmdlet cmdlet; + private Runspace runspace; + private bool disposed; + + public PSSyncOutputEvents(PSCmdlet cmdlet) + { + this.cmdlet = cmdlet; + this.runspace = RunspaceFactory.CreateRunspace(this.cmdlet.Host); + this.runspace.Open(); + } + + private static string FormatDuration(TimeSpan ts) + { + if (ts.Days == 0) + { + return String.Format("{0:00}:{1:00}:{2:00}", ts.Hours, ts.Minutes, ts.Seconds); + } + return String.Format(Resources.PSSyncOutputEventsFormatDuration, ts.Days, ts.Hours, ts.Minutes, ts.Seconds); + } + + public void ProgressCopyStatus(ProgressRecord record) + { + ProgressCopyStatus(record.PercentComplete, record.AvgThroughputMbPerSecond, record.RemainingTime); + } + + public void ProgressCopyStatus(double precentComplete, double avgThroughputMbps, TimeSpan remainingTime) + { + LogProgress(0, Resources.PSSyncOutputEventsCopying, precentComplete, remainingTime, avgThroughputMbps); + } + + public void ProgressCopyComplete(TimeSpan elapsed) + { + LogProgressComplete(0, Resources.PSSyncOutputEventsCopying); + LogMessage(Resources.PSSyncOutputEventsElapsedTimeForCopy, FormatDuration(elapsed)); + } + + public void ProgressUploadStatus(ProgressRecord record) + { + ProgressUploadStatus(record.PercentComplete, record.AvgThroughputMbPerSecond, record.RemainingTime); + } + + public void ProgressUploadStatus(double precentComplete, double avgThroughputMbps, TimeSpan remainingTime) + { + LogProgress(0, Resources.PSSyncOutputEventsUploading, precentComplete, remainingTime, avgThroughputMbps); + } + + private void LogProgress(int activityId, string activity, double precentComplete, TimeSpan remainingTime, double avgThroughputMbps) + { + var message = String.Format(Resources.PSSyncOutputEventsLogProgress, + precentComplete, + FormatDuration(remainingTime), + avgThroughputMbps); + var progressCommand = String.Format(@"Write-Progress -Id {0} -Activity '{1}' -Status '{2}' -SecondsRemaining {3} -PercentComplete {4}", activityId, activity, message, (int) remainingTime.TotalSeconds, (int) precentComplete); + using(var ps = System.Management.Automation.PowerShell.Create()) + { + ps.Runspace = runspace; + ps.AddScript(progressCommand); + ps.Invoke(); + } + } + + private void LogProgressComplete(int activityId, string activity) + { + var progressCommand = String.Format(@"Write-Progress -Id {0} -Activity '{1}' -Status '{2}' -Completed", activityId, activity, Resources.PSSyncOutputEventsLogProgressCompleteCompleted); + using(var ps = System.Management.Automation.PowerShell.Create()) + { + ps.Runspace = runspace; + ps.AddScript(progressCommand); + ps.Invoke(); + } + } + + public void MessageCreatingNewPageBlob(long pageBlobSize) + { + LogMessage(Resources.PSSyncOutputEventsCreatingNewPageBlob, pageBlobSize); + } + + private void LogMessage(string format, params object[] parameters) + { + var message = String.Format(format, parameters); + var verboseMessage = String.Format("Write-Host '{0}'", message); + using (var ps = System.Management.Automation.PowerShell.Create()) + { + ps.Runspace = runspace; + ps.AddScript(verboseMessage); + ps.Invoke(); + } + } + + private void LogError(Exception e) + { + using (var ps = System.Management.Automation.PowerShell.Create()) + { + ps.Runspace = runspace; + ps.AddCommand("Write-Error"); + ps.AddParameter("ErrorRecord", new ErrorRecord(e, String.Empty, ErrorCategory.NotSpecified, null)); + ps.Invoke(); + } + } + + public void MessageResumingUpload() + { + LogMessage(Resources.PSSyncOutputEventsResumingUpload); + } + + public void ProgressUploadComplete(TimeSpan elapsed) + { + LogProgressComplete(0, Resources.PSSyncOutputEventsUploading); + LogMessage(Resources.PSSyncOutputEventsElapsedTimeForUpload, FormatDuration(elapsed)); + } + + public void ProgressDownloadStatus(ProgressRecord record) + { + ProgressDownloadStatus(record.PercentComplete, record.AvgThroughputMbPerSecond, record.RemainingTime); + } + + public void ProgressDownloadStatus(double precentComplete, double avgThroughputMbps, TimeSpan remainingTime) + { + LogProgress(0, Resources.PSSyncOutputEventsDownloading, precentComplete, remainingTime, avgThroughputMbps); + } + + public void ProgressDownloadComplete(TimeSpan elapsed) + { + LogProgressComplete(0, Resources.PSSyncOutputEventsDownloading); + LogMessage(Resources.PSSyncOutputEventsElapsedTimeForDownload, FormatDuration(elapsed)); + } + + public void ProgressOperationStatus(ProgressRecord record) + { + ProgressOperationStatus(record.PercentComplete, record.AvgThroughputMbPerSecond, record.RemainingTime); + } + + public void ProgressOperationStatus(double percentComplete, double avgThroughputMbps, TimeSpan remainingTime) + { + LogProgress(1, Resources.PSSyncOutputEventsCalculatingMD5Hash, percentComplete, remainingTime, avgThroughputMbps); + } + + public void ProgressOperationComplete(TimeSpan elapsed) + { + LogProgressComplete(1, Resources.PSSyncOutputEventsCalculatingMD5Hash); + LogMessage(Resources.PSSyncOutputEventsElapsedTimeForOperation, FormatDuration(elapsed)); + } + + + public void ErrorUploadFailedWithExceptions(IList exceptions) + { + LogMessage(Resources.PSSyncOutputEventsUploadFailedWithException); + foreach (var exception in exceptions) + { + LogError(exception); + } + } + + public void MessageCalculatingMD5Hash(string filePath) + { + LogMessage(Resources.PSSyncOutputEventsCalculatingMD5HashForFile, filePath); + } + + public void MessageMD5HashCalculationFinished() + { + LogMessage(Resources.PSSyncOutputEventsMD5HashCalculationFinished); + } + + public void MessageRetryingAfterANetworkDisruption() + { + LogMessage(Resources.PSSyncOutputEventsRetryingAfterANetworkDisruption); + } + + public void DebugRetryingAfterException(Exception lastException) + { + LogDebug(lastException.ToString()); + + var storageException = lastException as StorageException; + var message = ExceptionUtil.DumpStorageExceptionErrorDetails(storageException); + if (message != String.Empty) + { + LogDebug(message); + } + } + + public void MessageDetectingActualDataBlocks() + { + LogMessage(Resources.PSSyncOutputEventsDetectingActualDataBlocks); + } + + public void MessageDetectingActualDataBlocksCompleted() + { + LogMessage(Resources.PSSyncOutputEventsDetectingActualDataBlocksCompleted); + } + + public void MessagePrintBlockRange(IndexRange range) + { + LogMessage(Resources.PSSyncOutputEventsPrintBlockRange, range, range.Length); + } + + public void DebugEmptyBlockDetected(IndexRange range) + { + LogDebug(Resources.PSSyncOutputEventsEmptyBlockDetected, range.ToString()); + } + + private void LogDebug(string format, params object[] parameters) + { + var message = String.Format(format, parameters); + var debugMessage = String.Format("Write-Debug -Message '{0}'", message); + using (var ps = System.Management.Automation.PowerShell.Create()) + { + ps.Runspace = runspace; + ps.AddScript(debugMessage); + ps.Invoke(); + } + } + + public void ProgressEmptyBlockDetection(int processedRangeCount, int totalRangeCount) + { + using(var ps = System.Management.Automation.PowerShell.Create()) + { + if (processedRangeCount >= totalRangeCount) + { + + var progressCommand1 = String.Format(@"Write-Progress -Id {0} -Activity '{1}' -Status '{2}' -Completed", 2, Resources.PSSyncOutputEventsProgressEmptyBlockDetection, Resources.PSSyncOutputEventsEmptyBlockDetectionCompleted); + ps.Runspace = runspace; + ps.AddScript(progressCommand1); + ps.Invoke(); + return; + } + + var progressCommand = String.Format(@"Write-Progress -Id {0} -Activity '{1}' -Status '{2}' -SecondsRemaining {3} -PercentComplete {4}", 2, Resources.PSSyncOutputEventsProgressEmptyBlockDetection, Resources.PSSyncOutputEventsEmptyBlockDetectionDetecting, -1, ((double)processedRangeCount / totalRangeCount) * 100); + ps.Runspace = runspace; + ps.AddScript(progressCommand); + ps.Invoke(); + } + } + + public void WriteVerboseWithTimestamp(string message, params object[] args) + { + var messageWithTimeStamp = string.Format(CultureInfo.CurrentCulture, "{0:T} - {1}", DateTime.Now, string.Format(message, args)); + var progressCommand = String.Format(@"Write-Verbose -Message {0}", messageWithTimeStamp); + using (var ps = System.Management.Automation.PowerShell.Create()) + { + ps.Runspace = runspace; + ps.AddScript(progressCommand); + ps.Invoke(); + } + } + + + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) + { + if(!disposed) + { + if (disposing) + { + runspace.Dispose(); + } + this.disposed = true; + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/PersistentVM.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/PersistentVM.cs new file mode 100644 index 000000000000..7f1ba15db88e --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/PersistentVM.cs @@ -0,0 +1,136 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Security.Cryptography.X509Certificates; +using System.Xml.Serialization; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class PersistentVM : IPersistentVM + { + public string AvailabilitySetName + { + get; + set; + } + + public Collection ConfigurationSets + { + get; + set; + } + + public Collection DataVirtualHardDisks + { + get; + set; + } + + public string Label + { + get; + set; + } + + public OSVirtualHardDisk OSVirtualHardDisk + { + get; + set; + } + + public string RoleName + { + get; + set; + } + + public string RoleSize + { + get; + set; + } + + public string RoleType + { + get; + set; + } + + [XmlIgnore] + public X509Certificate2 WinRMCertificate + { + get; + set; + } + + [XmlIgnore] + public List X509Certificates + { + get; + set; + } + + public bool NoExportPrivateKey + { + get; + set; + } + + public bool NoRDPEndpoint + { + get; + set; + } + + public bool NoSSHEndpoint + { + get; + set; + } + + public string DefaultWinRmCertificateThumbprint + { + get; + set; + } + + + public bool? ProvisionGuestAgent + { + get; + set; + } + + public ResourceExtensionReferenceList ResourceExtensionReferences + { + get; + set; + } + + [XmlIgnore] + public Collection DataVirtualHardDisksToBeDeleted + { + get; + set; + } + + public PersistentVM GetInstance() + { + return this; + } + } +} + diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/PersistentVMRoleContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/PersistentVMRoleContext.cs new file mode 100644 index 000000000000..d0739f90c1a2 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/PersistentVMRoleContext.cs @@ -0,0 +1,49 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class PersistentVMRoleContext : ServiceOperationContext, IPersistentVM + { + public string DeploymentName { get; set; } + public string Name { get; set; } + public string Label { get; set; } + public PersistentVM VM { get; set; } + public string InstanceStatus { get; set; } + public string IpAddress { get; set; } + public string InstanceStateDetails { get; set; } + public string PowerState { get; set; } + public string InstanceErrorCode { get; set; } + public string InstanceFaultDomain { get; set; } + public string InstanceName { get; set; } + public string InstanceUpgradeDomain { get; set; } + public string InstanceSize { get; set; } + public string HostName { get; set; } + public string AvailabilitySetName { get; set; } + public string DNSName { get; set; } + public string Status { get; set; } + public GuestAgentStatus GuestAgentStatus { get; set; } + public List ResourceExtensionStatusList { get; set; } + public string PublicIPAddress { get; set; } + public string PublicIPName { get; set; } + public NetworkInterfaceList NetworkInterfaces { get; set; } + + public PersistentVM GetInstance() + { + return this.VM; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/PersistentVMRoleListContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/PersistentVMRoleListContext.cs new file mode 100644 index 000000000000..b0bd015cab76 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/PersistentVMRoleListContext.cs @@ -0,0 +1,20 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class PersistentVMRoleListContext : PersistentVMRoleContext + { + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/ReservedIPConstants.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/ReservedIPConstants.cs new file mode 100644 index 000000000000..636226b86b4d --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/ReservedIPConstants.cs @@ -0,0 +1,22 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public static class ReservedIPConstants + { + public const string CmdletNoun = "AzureReservedIP"; + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/ReservedIPContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/ReservedIPContext.cs new file mode 100644 index 000000000000..487e7396bad5 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/ReservedIPContext.cs @@ -0,0 +1,40 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class ReservedIPContext : ManagementOperationContext + { + public string ReservedIPName { get; set; } + + public string Address { get; set; } + + public string Id { get; set; } + + public string Label { get; set; } + + public string Location { get; set; } + + public string State { get; set; } + + public bool InUse { get; set; } + + public string ServiceName { get; set; } + + public string DeploymentName { get; set; } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/RoleConfiguration.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/RoleConfiguration.cs new file mode 100644 index 000000000000..3311816b759a --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/RoleConfiguration.cs @@ -0,0 +1,115 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Globalization; +using System.Xml.Linq; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class RoleConfiguration + { + private readonly XNamespace ns = "http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration"; + + public RoleConfiguration(XElement data) + { + this.Name = data.Attribute("name").Value; + this.InstanceCount = int.Parse(data.Element(this.ns + "Instances").Attribute("count").Value, CultureInfo.InvariantCulture); + + this.Settings = new Dictionary(); + + if (data.Element(this.ns + "ConfigurationSettings") != null) + { + foreach (var setting in data.Element(this.ns + "ConfigurationSettings").Descendants()) + { + this.Settings.Add(setting.Attribute("name").Value, setting.Attribute("value").Value); + } + } + + this.Certificates = new Dictionary(); + + if (data.Element(this.ns + "Certificates") != null) + { + foreach (var setting in data.Element(this.ns + "Certificates").Descendants()) + { + var certificate = new CertificateConfiguration + { + Thumbprint = setting.Attribute("thumbprint").Value, + ThumbprintAlgorithm = setting.Attribute("thumbprintAlgorithm").Value + }; + + this.Certificates.Add(setting.Attribute("name").Value, certificate); + } + } + } + + public string Name + { + get; + set; + } + + public int InstanceCount + { + get; + set; + } + + public Dictionary Settings + { + get; + protected set; + } + + public Dictionary Certificates + { + get; + protected set; + } + + internal XElement Serialize() + { + XElement roleElement = new XElement(this.ns + "Role"); + roleElement.SetAttributeValue("name", this.Name); + XElement instancesElement = new XElement(this.ns + "Instances"); + instancesElement.SetAttributeValue("count", this.InstanceCount); + roleElement.Add(instancesElement); + + XElement configurationSettingsElement = new XElement(this.ns + "ConfigurationSettings"); + roleElement.Add(configurationSettingsElement); + + foreach (var setting in this.Settings) + { + XElement settingElement = new XElement(this.ns + "Setting"); + settingElement.SetAttributeValue("name", setting.Key); + settingElement.SetAttributeValue("value", setting.Value); + configurationSettingsElement.Add(settingElement); + } + + XElement certificatesElement = new XElement(this.ns + "Certificates"); + roleElement.Add(certificatesElement); + + foreach (var certificate in this.Certificates) + { + XElement certificateElement = new XElement(this.ns + "Certificate"); + certificateElement.SetAttributeValue("name", certificate.Key); + certificateElement.SetAttributeValue("thumbprint", certificate.Value.Thumbprint); + certificateElement.SetAttributeValue("thumbprintAlgorithm", certificate.Value.ThumbprintAlgorithm); + certificatesElement.Add(certificateElement); + } + + return roleElement; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/RoleContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/RoleContext.cs new file mode 100644 index 000000000000..0936126c58e0 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/RoleContext.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + + public class RoleContext : ServiceOperationContext + { + public string RoleName { get; set; } + + public int InstanceCount { get; set; } + + public string DeploymentID { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/RoleInstanceContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/RoleInstanceContext.cs new file mode 100644 index 000000000000..6dfb287a7c5f --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/RoleInstanceContext.cs @@ -0,0 +1,47 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class RoleInstanceContext : ServiceOperationContext + { + public InstanceEndpointList InstanceEndpoints { get; set; } + + public string InstanceErrorCode { get; set; } + + public int? InstanceFaultDomain { get; set; } + + public string InstanceName { get; set; } + + public string InstanceSize { get; set; } + + public string InstanceStateDetails { get; set; } + + public string InstanceStatus { get; set; } + + public int? InstanceUpgradeDomain { get; set; } + + public string RoleName { get; set; } + + public string DeploymentID { get; set; } + + public string IPAddress { get; set; } + + public string PublicIPAddress { get; set; } + + public string PublicIPName { get; set; } + + public int? PublicIPIdleTimeoutInMinutes { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/RoleInstanceStatusInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/RoleInstanceStatusInfo.cs new file mode 100644 index 000000000000..5c54e45a509d --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/RoleInstanceStatusInfo.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Globalization; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class RoleInstanceStatusInfo + { + public string InstanceStatus { get; set; } + + public string InstanceName { get; set; } + + public override string ToString() + { + return string.Format(CultureInfo.InvariantCulture, "Instance Name: {0} - Instance Status: {1}", this.InstanceName, this.InstanceStatus); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/RoleInstanceStatusInfoContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/RoleInstanceStatusInfoContext.cs new file mode 100644 index 000000000000..f1c94afd7cd8 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/RoleInstanceStatusInfoContext.cs @@ -0,0 +1,32 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class RoleInstanceStatusInfoContext : ServiceOperationContext + { + public RoleInstanceStatusInfoContext() + { + this.RoleInstances = new List(); + } + + public IList RoleInstances + { + get; + private set; + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/RoleSizeContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/RoleSizeContext.cs new file mode 100644 index 000000000000..0616ad6cb0c3 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/RoleSizeContext.cs @@ -0,0 +1,40 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class RoleSizeContext : ManagementOperationContext + { + public string InstanceSize { get; set; } + + public string RoleSizeLabel { get; set; } + + public int Cores { get; set; } + + public int MemoryInMb { get; set; } + + public bool SupportedByWebWorkerRoles { get; set; } + + public bool SupportedByVirtualMachines { get; set; } + + public int? MaxDataDiskCount { get; set; } + + public int? WebWorkerResourceDiskSizeInMb { get; set; } + + public int? VirtualMachineResourceDiskSizeInMb { get; set; } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/ServiceOperationContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/ServiceOperationContext.cs new file mode 100644 index 000000000000..e23a9bf51e54 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/ServiceOperationContext.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class ServiceOperationContext : ManagementOperationContext + { + public string ServiceName + { + get; + set; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/StorageServiceKeyOperationContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/StorageServiceKeyOperationContext.cs new file mode 100644 index 000000000000..4a30b33ee1cd --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/StorageServiceKeyOperationContext.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class StorageServiceKeyOperationContext : StorageServiceOperationContext + { + public string Primary { get; set; } + + public string Secondary { get; set; } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/StorageServiceOperationContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/StorageServiceOperationContext.cs new file mode 100644 index 000000000000..e7904ed90630 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/StorageServiceOperationContext.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class StorageServiceOperationContext : ManagementOperationContext + { + public string StorageAccountName + { + get; + set; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/StorageServicePropertiesOperationContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/StorageServicePropertiesOperationContext.cs new file mode 100644 index 000000000000..d4388625df80 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/StorageServicePropertiesOperationContext.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class StorageServicePropertiesOperationContext : StorageServiceOperationContext + { + public string StorageAccountDescription { get; set; } + + public string AffinityGroup { get; set; } + + public string Location { get; set; } + + public bool? GeoReplicationEnabled { get; set; } + + public string GeoPrimaryLocation { get; set; } + + public string GeoSecondaryLocation { get; set; } + + public string Label { get; set; } + + public string StorageAccountStatus { get; set; } + + public string StatusOfPrimary { get; set; } + + public string StatusOfSecondary { get; set; } + + public IEnumerable Endpoints { get; set; } + + public string AccountType { get; set; } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/UploadParameters.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/UploadParameters.cs new file mode 100644 index 000000000000..d53e1432694a --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/UploadParameters.cs @@ -0,0 +1,47 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System.IO; +using Microsoft.WindowsAzure.Commands.ServiceManagement.StorageServices; +using Microsoft.WindowsAzure.Commands.Sync.Download; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class UploadParameters + { + public UploadParameters(BlobUri destinationUri, BlobUri baseImageUri, FileInfo localFilePath, bool overWrite, int numberOfUploaderThreads) + { + DestinationUri = destinationUri; + BaseImageUri = baseImageUri; + LocalFilePath = localFilePath; + OverWrite = overWrite; + NumberOfUploaderThreads = numberOfUploaderThreads; + } + + public BlobUri DestinationUri { get; private set; } + + public BlobUri BaseImageUri { get; private set; } + + public FileInfo LocalFilePath { get; private set; } + + public bool OverWrite { get; private set; } + + public int NumberOfUploaderThreads { get; private set; } + + public AddAzureVhdCommand Cmdlet { get; set; } + + public CloudPageBlobObjectFactory BlobObjectFactory { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VMImageContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VMImageContext.cs new file mode 100644 index 000000000000..33e13f27c9a0 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VMImageContext.cs @@ -0,0 +1,67 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class VMImageContext : OSImageContext + { + public override string ImageName { get; set; } + public override string Label { get; set; } + public override string Category { get; set; } + public override string Description { get; set; } + + public override string OS + { + get + { + return this.OSDiskConfiguration == null ? null : this.OSDiskConfiguration.OS; + } + + set + { + if (this.OSDiskConfiguration == null) + { + this.OSDiskConfiguration = new OSDiskConfiguration(); + } + + this.OSDiskConfiguration.OS = value; + } + } + + public OSDiskConfiguration OSDiskConfiguration { get; set; } + public DataDiskConfigurationList DataDiskConfigurations { get; set; } + + public string ServiceName { get; set; } + public string DeploymentName { get; set; } + public string RoleName { get; set; } + public override string AffinityGroup { get; set; } + public DateTime? CreatedTime { get; set; } + public DateTime? ModifiedTime { get; set; } + + public string Language { get; set; } + public override string ImageFamily { get; set; } + public override string RecommendedVMSize { get; set; } + public override bool? IsPremium { get; set; } + public override string Eula { get; set; } + public override Uri IconUri { get; set; } + public override Uri SmallIconUri { get; set; } + public override Uri PrivacyUri { get; set; } + public override string PublisherName { get; set; } + public override DateTime? PublishedDate { get; set; } + public override bool? ShowInGui { get; set; } + public Uri PricingDetailLink { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VhdDownloadContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VhdDownloadContext.cs new file mode 100644 index 000000000000..eb2c47462a73 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VhdDownloadContext.cs @@ -0,0 +1,25 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class VhdDownloadContext + { + public FileInfo LocalFilePath { get; set; } + public Uri Source { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VhdDownloaderModel.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VhdDownloaderModel.cs new file mode 100644 index 000000000000..7f204b239c5f --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VhdDownloaderModel.cs @@ -0,0 +1,41 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using Microsoft.WindowsAzure.Commands.Sync; +using Microsoft.WindowsAzure.Commands.Sync.Download; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class VhdDownloaderModel + { + public static VhdDownloadContext Download(DownloaderParameters downloadParameters, ServiceManagementBaseCmdlet cmdlet) + { + Program.SyncOutput = new PSSyncOutputEvents(cmdlet); + + downloadParameters.ProgressDownloadComplete = Program.SyncOutput.ProgressDownloadComplete; + downloadParameters.ProgressDownloadStatus = Program.SyncOutput.ProgressDownloadStatus; + + var downloader = new Downloader(downloadParameters); + downloader.Download(); + + return new VhdDownloadContext + { + LocalFilePath = new FileInfo(downloadParameters.LocalFilePath), + Source = downloadParameters.BlobUri.Uri + }; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VhdUploadContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VhdUploadContext.cs new file mode 100644 index 000000000000..7f15b3e7bda9 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VhdUploadContext.cs @@ -0,0 +1,25 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class VhdUploadContext + { + public FileInfo LocalFilePath { get; set; } + public Uri DestinationUri { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VhdUploaderModel.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VhdUploaderModel.cs new file mode 100644 index 000000000000..49ec79d4265e --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VhdUploaderModel.cs @@ -0,0 +1,47 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Sync; +using Microsoft.WindowsAzure.Commands.Sync.Upload; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class VhdUploaderModel + { + public static VhdUploadContext Upload(UploadParameters uploadParameters) + { + Program.SyncOutput = new PSSyncOutputEvents(uploadParameters.Cmdlet); + + BlobCreatorBase blobCreator; + if (uploadParameters.BaseImageUri != null) + { + blobCreator = new PatchingBlobCreator(uploadParameters.LocalFilePath, uploadParameters.DestinationUri, uploadParameters.BaseImageUri, uploadParameters.BlobObjectFactory, uploadParameters.OverWrite); + } + else + { + blobCreator = new BlobCreator(uploadParameters.LocalFilePath, uploadParameters.DestinationUri, uploadParameters.BlobObjectFactory, uploadParameters.OverWrite); + } + + using (var uploadContext = blobCreator.Create()) + { + var synchronizer = new BlobSynchronizer(uploadContext, uploadParameters.NumberOfUploaderThreads); + if (synchronizer.Synchronize()) + { + return new VhdUploadContext {LocalFilePath = uploadParameters.LocalFilePath, DestinationUri = uploadParameters.DestinationUri.Uri}; + } + return null; + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VirtualMachineImageDiskConfigSet.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VirtualMachineImageDiskConfigSet.cs new file mode 100644 index 000000000000..a955b271bb8e --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VirtualMachineImageDiskConfigSet.cs @@ -0,0 +1,22 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class VirtualMachineImageDiskConfigSet + { + public OSDiskConfiguration OSDiskConfiguration { get; set; } + public DataDiskConfigurationList DataDiskConfigurations { get; set; } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VirtualMachineImageType.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VirtualMachineImageType.cs new file mode 100644 index 000000000000..14c4d6636c51 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VirtualMachineImageType.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + [Flags] + public enum VirtualMachineImageType + { + None = 0x0, + OSImage = 0x1, + VMImage = 0x2 + }; +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VirtualNetworkConfigContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VirtualNetworkConfigContext.cs new file mode 100644 index 000000000000..5e0a7b446980 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VirtualNetworkConfigContext.cs @@ -0,0 +1,44 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class VirtualNetworkConfigContext : ManagementOperationContext + { + public string XMLConfiguration { get; set; } + + public void ExportToFile(string filePath) + { + if (string.IsNullOrEmpty(filePath)) + { + throw new ArgumentNullException("filePath", Resources.VirtualNetworkConfigContextMissingFilePath); + } + + if (!Directory.Exists(Path.GetDirectoryName(filePath))) + { + throw new ArgumentException(Resources.VirtualNetworkConfigContextDirectoryDoesNotExist, "filePath"); + } + + using (StreamWriter outfile = new StreamWriter(filePath)) + { + outfile.Write(this.XMLConfiguration); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VirtualNetworkSiteContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VirtualNetworkSiteContext.cs new file mode 100644 index 000000000000..0cd730fdd1ce --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VirtualNetworkSiteContext.cs @@ -0,0 +1,46 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class VirtualNetworkSiteContext : ManagementOperationContext + { + public IEnumerable AddressSpacePrefixes { get; set; } + + public string Location { get; set; } + + public string AffinityGroup { get; set; } + + public IEnumerable DnsServers { get; set; } + + public string GatewayProfile { get; set; } + + public LocalNetworkSiteList GatewaySites { get; set; } + + public string Id { get; set; } + + public bool InUse { get; set; } + + public string Label { get; set; } + + public string Name { get; set; } + + public string State { get; set; } + + public IEnumerable Subnets { get; set; } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VirtualNetworkStaticIPAvailabilityContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VirtualNetworkStaticIPAvailabilityContext.cs new file mode 100644 index 000000000000..89399a3a92d5 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VirtualNetworkStaticIPAvailabilityContext.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class VirtualNetworkStaticIPAvailabilityContext : ManagementOperationContext + { + public bool IsAvailable { get; set; } + + public List AvailableAddresses { get; set; } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VirtualNetworkStaticIPContext.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VirtualNetworkStaticIPContext.cs new file mode 100644 index 000000000000..31658e41e683 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Model/VirtualNetworkStaticIPContext.cs @@ -0,0 +1,21 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Model +{ + public class VirtualNetworkStaticIPContext + { + public string IPAddress { get; set; } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Properties/AssemblyInfo.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..bf87e482d3c5 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Properties/AssemblyInfo.cs @@ -0,0 +1,38 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft.WindowsAzure.Commands.ServiceManagement")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("0a3d16e8-9b84-4c77-a6e3-bc627587472b")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] +[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] + +#if SIGN +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.ServiceManagement.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +#else +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.ServiceManagement.Test")] +#endif diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Properties/Resources.Designer.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/Properties/Resources.Designer.cs new file mode 100644 index 000000000000..ca25e048e674 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Properties/Resources.Designer.cs @@ -0,0 +1,2033 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.WindowsAzure.Commands.ServiceManagement.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to SAS Uri for the destination blob is not supported in patch mode:{0}. + /// + public static string AddAzureVhdCommandSASUriNotSupportedInPatchMode { + get { + return ResourceManager.GetString("AddAzureVhdCommandSASUriNotSupportedInPatchMode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is already an WinRM Http Listener in ProvisioningConfiguration. + /// + public static string AlreadyExistingWinRMHttpListener { + get { + return ResourceManager.GetString("AlreadyExistingWinRMHttpListener", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is already an WinRM Https Listener in ProvisioningConfiguration. + /// + public static string AlreadyExistingWinRMHttpsListener { + get { + return ResourceManager.GetString("AlreadyExistingWinRMHttpsListener", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Begin Operation: {0}. + /// + public static string AzureRemoteDesktopBeginOperation { + get { + return ResourceManager.GetString("AzureRemoteDesktopBeginOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Completed Operation: {0}. + /// + public static string AzureRemoteDesktopCompletedOperation { + get { + return ResourceManager.GetString("AzureRemoteDesktopCompletedOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Begin Operation: {0}. + /// + public static string AzureVMBeginOperation { + get { + return ResourceManager.GetString("AzureVMBeginOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} - Create Deployment with VM {1}. + /// + public static string AzureVMCommandCreateDeploymentWithVM { + get { + return ResourceManager.GetString("AzureVMCommandCreateDeploymentWithVM", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} - Create VM {1}. + /// + public static string AzureVMCommandCreateVM { + get { + return ResourceManager.GetString("AzureVMCommandCreateVM", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} - Uploading Certificate: {1}. + /// + public static string AzureVMCommandUploadingCertificate { + get { + return ResourceManager.GetString("AzureVMCommandUploadingCertificate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Completed Operation: {0}. + /// + public static string AzureVMCompletedOperation { + get { + return ResourceManager.GetString("AzureVMCompletedOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Apply configuration '{0}'. + /// + public static string AzureVMDscApplyConfigurationAction { + get { + return ResourceManager.GetString("AzureVMDscApplyConfigurationAction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File '{0}' already exists. Use the -Force parameter to overwrite it.. + /// + public static string AzureVMDscArchiveAlreadyExists { + get { + return ResourceManager.GetString("AzureVMDscArchiveAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find configuration data file: {0}. + /// + public static string AzureVMDscCannotFindConfigurationDataFile { + get { + return ResourceManager.GetString("AzureVMDscCannotFindConfigurationDataFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The -ConfigurationArchive parameter must no include a path. + /// + public static string AzureVMDscConfigurationDataFileShouldNotIncludePath { + get { + return ResourceManager.GetString("AzureVMDscConfigurationDataFileShouldNotIncludePath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Create Archive. + /// + public static string AzureVMDscCreateArchiveAction { + get { + return ResourceManager.GetString("AzureVMDscCreateArchiveAction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Can not find your azure storage credential. Please specify an storage context using the -StorageContext parameter, or set the current storage account using "Set-AzureSubscription", or set the "AZURE_STORAGE_CONNECTION_STRING" environment variable.. + /// + public static string AzureVMDscDefaultStorageCredentialsNotFound { + get { + return ResourceManager.GetString("AzureVMDscDefaultStorageCredentialsNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The configuration data must be a .psd1 file. + /// + public static string AzureVMDscInvalidConfigurationDataFile { + get { + return ResourceManager.GetString("AzureVMDscInvalidConfigurationDataFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to If the ConfigurationArchive argument is null, then the ConfigurationName, ConfigurationArgument, and ConfigurationDataPath parameters must not be specified . + /// + public static string AzureVMDscNullArchiveNoConfiguragionParameters { + get { + return ResourceManager.GetString("AzureVMDscNullArchiveNoConfiguragionParameters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to If the ConfigurationArchive argument is null, then the StorageContext, ContainerName, and StorageEndpointSuffix parameters must not be specified. + /// + public static string AzureVMDscNullArchiveNoStorageParameters { + get { + return ResourceManager.GetString("AzureVMDscNullArchiveNoStorageParameters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Parsing configuration script: {0}. + /// + public static string AzureVMDscParsingConfiguration { + get { + return ResourceManager.GetString("AzureVMDscParsingConfiguration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Storage Blob '{0}' already exists. Use the -Force parameter to overwrite it.. + /// + public static string AzureVMDscStorageBlobAlreadyExists { + get { + return ResourceManager.GetString("AzureVMDscStorageBlobAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The storage context must include an storage account.. + /// + public static string AzureVMDscStorageContextMustIncludeAccountName { + get { + return ResourceManager.GetString("AzureVMDscStorageContextMustIncludeAccountName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Upload '{0}'. + /// + public static string AzureVMDscUploadToBlobStorageAction { + get { + return ResourceManager.GetString("AzureVMDscUploadToBlobStorageAction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot deserialize settings string from DSC extension. Updating your Azure PowerShell SDK to the latest version may solve this problem. Settings string: + ///{0}. + /// + public static string AzureVMDscWrongSettingsFormat { + get { + return ResourceManager.GetString("AzureVMDscWrongSettingsFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} - Uploading WinRMCertificate: {1}. + /// + public static string AzureVMUploadingWinRMCertificate { + get { + return ResourceManager.GetString("AzureVMUploadingWinRMCertificate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Begin Operation: {0}. + /// + public static string AzureVNetConfigBeginOperation { + get { + return ResourceManager.GetString("AzureVNetConfigBeginOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Completed Operation: {0}. + /// + public static string AzureVNetConfigCompletedOperation { + get { + return ResourceManager.GetString("AzureVNetConfigCompletedOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Begin Operation: {0}. + /// + public static string AzureVNetSiteBeginOperation { + get { + return ResourceManager.GetString("AzureVNetSiteBeginOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Completed Operation: {0}. + /// + public static string AzureVNetSiteCompletedOperation { + get { + return ResourceManager.GetString("AzureVNetSiteCompletedOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot Create New Deployment with Virtual Machines Present in {0} Slot. + /// + public static string CanNotCreateNewDeploymentWhileVMsArePresent { + get { + return ResourceManager.GetString("CanNotCreateNewDeploymentWhileVMsArePresent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot delete VM Data Disk for LUN '{0}', . + /// + public static string CannotDeleteVirtualMachineDataDiskForLUN { + get { + return ResourceManager.GetString("CannotDeleteVirtualMachineDataDiskForLUN", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot Move Deployments with Virtual Machines Present in {0}. + /// + public static string CanNotMoveDeploymentsWhileVMsArePresent { + get { + return ResourceManager.GetString("CanNotMoveDeploymentsWhileVMsArePresent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot remove Network Security Group "{0}" from Virtual Machine "{1}" because it is not directly.. + /// + public static string CannotRemoveNetworkSecurityGroupBecauseNotDirectlyAssociatedwithVm { + get { + return ResourceManager.GetString("CannotRemoveNetworkSecurityGroupBecauseNotDirectlyAssociatedwithVm", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to VM image capture operation is trigged while VM is still running. As this may cause data corruption while creating VMs from this image, we recommend using Stop-AzureVM to stop the VM before capturing.. + /// + public static string CaptureVMImageOperationWhileVMIsStillRunning { + get { + return ResourceManager.GetString("CaptureVMImageOperationWhileVMIsStillRunning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not find a deployment for '{0}' in '{1}' slot.. + /// + public static string CouldNotFindDeployment { + get { + return ResourceManager.GetString("CouldNotFindDeployment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creating the new deployment. + /// + public static string CreatingNewDeployment { + get { + return ResourceManager.GetString("CreatingNewDeployment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Current deployment doesn't have any Url. + /// + public static string CurrentDeploymentDoesNotHaveUrl { + get { + return ResourceManager.GetString("CurrentDeploymentDoesNotHaveUrl", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Current deployment doesn't have any VMs. + /// + public static string CurrentDeploymentDoesNotHaveVMs { + get { + return ResourceManager.GetString("CurrentDeploymentDoesNotHaveVMs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to CurrentStorageAccountName is not accessible. Ensure the current storage account is accessible and in the same location or affinity group as your cloud service.. + /// + public static string CurrentStorageAccountIsNotAccessible { + get { + return ResourceManager.GetString("CurrentStorageAccountIsNotAccessible", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to CurrentStorageAccountName is not set. Use Set-AzureSubscription subname -CurrentStorageAccountName storageaccount to set it.. + /// + public static string CurrentStorageAccountIsNotSet { + get { + return ResourceManager.GetString("CurrentStorageAccountIsNotSet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No Run File has been assigned, and the Custom Script extension will try to use the first specified File Name as the Run File.. + /// + public static string CustomScriptExtensionTryToUseTheFirstSpecifiedFileAsRunScript { + get { + return ResourceManager.GetString("CustomScriptExtensionTryToUseTheFirstSpecifiedFileAsRunScript", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A data disk is not currently assigned to LUN #{0} in the configuration of this VM.. + /// + public static string DataDiskAlreadyAssignedInVMConfiguration { + get { + return ResourceManager.GetString("DataDiskAlreadyAssignedInVMConfiguration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A data disk has already been assigned to LUN #{0} for this VM. Specify a different LUN or use Set-DataDisk to change the configuration settings of the existing disk.. + /// + public static string DataDiskAlreadySpecifiedForVM { + get { + return ResourceManager.GetString("DataDiskAlreadySpecifiedForVM", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A data disk is not currently assigned to LUN #{0} for this VM. Use New-DataDisk to define it.. + /// + public static string DataDiskNotAssignedForVM { + get { + return ResourceManager.GetString("DataDiskNotAssignedForVM", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This cmdlet will remove deployed applications including VMs from the specified deployment slot. Do you want to continue?. + /// + public static string DeployedArtifactsWillBeRemoved { + get { + return ResourceManager.GetString("DeployedArtifactsWillBeRemoved", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deployment Deletion. + /// + public static string DeploymentDeletion { + get { + return ResourceManager.GetString("DeploymentDeletion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified virtual machine is the last virtual machine in this deployment. Continuing will result in a new IP address for your deployment. To shut down without losing the deployment IP use -StayProvisioned.. + /// + public static string DeploymentVIPLossWarning { + get { + return ResourceManager.GetString("DeploymentVIPLossWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to GeoReplicationEnabled property will be deprecated in a future release of Azure PowerShell. The value will be merged into the AccountType property.. + /// + public static string DeprecationOfTheGeoReplicationEnabledParamInTheGetCmdlet { + get { + return ResourceManager.GetString("DeprecationOfTheGeoReplicationEnabledParamInTheGetCmdlet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to GeoReplicationEnabled parameter will be deprecated in a future release of Azure PowerShell. The functionality will be merged into the Type parameter.. + /// + public static string DeprecationOfTheGeoReplicationEnabledParamInTheSetCmdlet { + get { + return ResourceManager.GetString("DeprecationOfTheGeoReplicationEnabledParamInTheSetCmdlet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deprovisioning the VM: {0} . + /// + public static string DeprovisioningVM { + get { + return ResourceManager.GetString("DeprovisioningVM", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find the // in the endpoint {0}. + /// + public static string DiagnosticsSlashNotFound { + get { + return ResourceManager.GetString("DiagnosticsSlashNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find the storage account name {0} in the endpoint {1}. + /// + public static string DiagnosticsStorageAccountNotFound { + get { + return ResourceManager.GetString("DiagnosticsStorageAccountNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Duplicate names '{0}' found in both VM and OS images. Please delete one of them, using other method such as Portal or Invoke-RestMethod call, and try again.. + /// + public static string DuplicateNamesFoundInBothVMAndOSImages { + get { + return ResourceManager.GetString("DuplicateNamesFoundInBothVMAndOSImages", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Duplicate NetworkInterface found on the VM. + /// + public static string DuplicateNetworkInterfaceFound { + get { + return ResourceManager.GetString("DuplicateNetworkInterfaceFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Diagnostics Configuration Xml or File Path, only one of them needs to be specified.. + /// + public static string EitherDiagnosticsConfigurationXmlOrFilePathBeSpecified { + get { + return ResourceManager.GetString("EitherDiagnosticsConfigurationXmlOrFilePathBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Either Diagnostics Configuration Xml or File Path must be specified.. + /// + public static string EitherDiagnosticsConfigurationXmlOrFilePathMustBeSpecified { + get { + return ResourceManager.GetString("EitherDiagnosticsConfigurationXmlOrFilePathMustBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Location or AffinityGroup, only one of them needs to be specified.. + /// + public static string EitherLocationOrAffinityGroupBeSpecified { + get { + return ResourceManager.GetString("EitherLocationOrAffinityGroupBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An endpoint named '{0}' has already been defined for this VM. Specify a different endpoint name or use Set-Endpoint to change the configuration settings of the existing endpoint.. + /// + public static string EndpointAlreadyDefinedForVM { + get { + return ResourceManager.GetString("EndpointAlreadyDefinedForVM", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An endpoint named '{0}' cannot be found in the configuration of this VM.. + /// + public static string EndpointCanNotBeFoundInVMConfiguration { + get { + return ResourceManager.GetString("EndpointCanNotBeFoundInVMConfiguration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An endpoint named '{0}' cannot be found in the configuration of this VM. Use New-ExternalEndpoint to define it.. + /// + public static string EndpointCanNotBeFoundInVMConfigurationInSetAzureEndpoint { + get { + return ResourceManager.GetString("EndpointCanNotBeFoundInVMConfigurationInSetAzureEndpoint", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An endpoint cannot be found with the given load balancer set name '{0}'.. + /// + public static string EndpointsCannotBeFoundWithGivenLBSetName { + get { + return ResourceManager.GetString("EndpointsCannotBeFoundWithGivenLBSetName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is another image in '{0}' type found with the same name '{1}' exists; WAPS will stop here to avoid duplicates and potential conflicts. Please use another name for the image.. + /// + public static string ErrorAnotherImageTypeFoundWithTheSameName { + get { + return ResourceManager.GetString("ErrorAnotherImageTypeFoundWithTheSameName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation Status: . + /// + public static string GatewayOperationStatus { + get { + return ResourceManager.GetString("GatewayOperationStatus", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Begin Operation: Get Deployment. + /// + public static string GetDeploymentBeginOperation { + get { + return ResourceManager.GetString("GetDeploymentBeginOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Completed Operation: Get Deployment. + /// + public static string GetDeploymentCompletedOperation { + get { + return ResourceManager.GetString("GetDeploymentCompletedOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to HTTP Status Code: {0} - HTTP Error Message: {1}. + /// + public static string HttpStatusCodeAndErrorMessage { + get { + return ResourceManager.GetString("HttpStatusCodeAndErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find the WadCfg end element in the config.. + /// + public static string IaasDiagnosticsBadConfigNoEndWadCfg { + get { + return ResourceManager.GetString("IaasDiagnosticsBadConfigNoEndWadCfg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WadCfg start element in the config is not matching the end element.. + /// + public static string IaasDiagnosticsBadConfigNoMatchingWadCfg { + get { + return ResourceManager.GetString("IaasDiagnosticsBadConfigNoMatchingWadCfg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find the WadCfg element in the config.. + /// + public static string IaasDiagnosticsBadConfigNoWadCfg { + get { + return ResourceManager.GetString("IaasDiagnosticsBadConfigNoWadCfg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Computer Name is invalid.. + /// + public static string InvalidComputerName { + get { + return ResourceManager.GetString("InvalidComputerName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ValidateSetFailure - Invalid UpgradeType is specified: '{0}', valid values are: '{1}'. + /// + public static string InvalidDeploymentUpgradeType { + get { + return ResourceManager.GetString("InvalidDeploymentUpgradeType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Hostname is invalid.. + /// + public static string InvalidHostName { + get { + return ResourceManager.GetString("InvalidHostName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You must specify the thumbprint algorithm.. + /// + public static string InvalidThumbprint { + get { + return ResourceManager.GetString("InvalidThumbprint", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ValidateSetFailure - Invalid VM Size specified: '{0}', valid values are: '{1}'. + /// + public static string InvalidVMSize { + get { + return ResourceManager.GetString("InvalidVMSize", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You must specify a value for Label, Description or ReverseDnsFqdn.. + /// + public static string LabelOrDescriptionOrReverseDnsFqdnMustBeSpecified { + get { + return ResourceManager.GetString("LabelOrDescriptionOrReverseDnsFqdnMustBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Location or AffinityGroup can only be specified when creating a new cloud service.. + /// + public static string LocationOrAffinityGroupCanOnlyBeSpecifiedWhenNewCloudService { + get { + return ResourceManager.GetString("LocationOrAffinityGroupCanOnlyBeSpecifiedWhenNewCloudService", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Location or AffinityGroup is required when creating a new Cloud Service.. + /// + public static string LocationOrAffinityGroupRequiredWhenCreatingNewCloudService { + get { + return ResourceManager.GetString("LocationOrAffinityGroupRequiredWhenCreatingNewCloudService", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Must specify MediaLocation or set a default storage account using Set-AzureSubscription.. + /// + public static string MediaLocationOrDefaultStorageAccountMustBeSpecified { + get { + return ResourceManager.GetString("MediaLocationOrDefaultStorageAccountMustBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The file to load the role does not exist. + /// + public static string MissingPersistentVMFile { + get { + return ResourceManager.GetString("MissingPersistentVMFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role cannot be null. + /// + public static string MissingPersistentVMRole { + get { + return ResourceManager.GetString("MissingPersistentVMRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WinRMCertificate must have private key. + /// + public static string MissingPrivateKeyInWinRMCertificate { + get { + return ResourceManager.GetString("MissingPrivateKeyInWinRMCertificate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You must specify the thumbprint algorithm.. + /// + public static string MissingThumbprintAlgorithm { + get { + return ResourceManager.GetString("MissingThumbprintAlgorithm", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no WinRM Https Listener in ProvisioningConfiguration. + /// + public static string MissingWinRMHttpsListener { + get { + return ResourceManager.GetString("MissingWinRMHttpsListener", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Moving deployment from Staging to Production:{0}. + /// + public static string MovingDeploymentFromStagingToProduction { + get { + return ResourceManager.GetString("MovingDeploymentFromStagingToProduction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Must provide the Force switch when using wildcard syntax.. + /// + public static string MustSpecifyForceParameterWhenUsingWildcards { + get { + return ResourceManager.GetString("MustSpecifyForceParameterWhenUsingWildcards", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Must specify MediaLocation or set a current storage account using Set-AzureSubscription.. + /// + public static string MustSpecifyMediaLocationOrHaveCurrentStorageAccount { + get { + return ResourceManager.GetString("MustSpecifyMediaLocationOrHaveCurrentStorageAccount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Must specify the same affinity group as the virtual network is deployed to.. + /// + public static string MustSpecifySameAffinityGroupAsVirtualNetwork { + get { + return ResourceManager.GetString("MustSpecifySameAffinityGroupAsVirtualNetwork", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Network configuration cannot be deserialized.. + /// + public static string NetworkConfigurationCannotBeDeserialized { + get { + return ResourceManager.GetString("NetworkConfigurationCannotBeDeserialized", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The directory specified to export the network configuration does not exist.. + /// + public static string NetworkConfigurationDirectoryDoesNotExist { + get { + return ResourceManager.GetString("NetworkConfigurationDirectoryDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified network configuration file path does not exist.. + /// + public static string NetworkConfigurationFilePathDoesNotExist { + get { + return ResourceManager.GetString("NetworkConfigurationFilePathDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Network configuration not found on the persistent VM.. + /// + public static string NetworkConfigurationNotFoundOnPersistentVM { + get { + return ResourceManager.GetString("NetworkConfigurationNotFoundOnPersistentVM", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified NetworkInterface is not found. + /// + public static string NetworkInterfaceNotFound { + get { + return ResourceManager.GetString("NetworkInterfaceNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cloud Service is not present or there is no virtual machine deployment.. + /// + public static string NoCloudServicePresent { + get { + return ResourceManager.GetString("NoCloudServicePresent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No role can be found in the deployment with '{0}' name. + /// + public static string NoCorrespondingRoleCanBeFoundInDeployment { + get { + return ResourceManager.GetString("NoCorrespondingRoleCanBeFoundInDeployment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No VM deployment found by service name '{0}' and VM name '{1}'.. + /// + public static string NoDeploymentFoundByServiceAndVMName { + get { + return ResourceManager.GetString("NoDeploymentFoundByServiceAndVMName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No deployment found in service: '{0}'.. + /// + public static string NoDeploymentFoundInService { + get { + return ResourceManager.GetString("NoDeploymentFoundInService", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No deployment found in {0}. + /// + public static string NoDeploymentFoundToMove { + get { + return ResourceManager.GetString("NoDeploymentFoundToMove", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No deployment found in Staging: {0}. + /// + public static string NoDeploymentInStaging { + get { + return ResourceManager.GetString("NoDeploymentInStaging", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No deployment found in Staging or Production: {0}. + /// + public static string NoDeploymentInStagingOrProduction { + get { + return ResourceManager.GetString("NoDeploymentInStagingOrProduction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No endpoint found for the VM: {0}. + /// + public static string NoEndpointFoundForVM { + get { + return ResourceManager.GetString("NoEndpointFoundForVM", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <NONE>. + /// + public static string None { + get { + return ResourceManager.GetString("None", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An OSDisk has not been defined for this VM. Use New-OSDisk to assign a new OS disk.. + /// + public static string OSDiskNotDefinedForVM { + get { + return ResourceManager.GetString("OSDiskNotDefinedForVM", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The element StorageAccount cannot be empty. It is recommended to not use this element in the config. It will be set automatically by the cmdlet.. + /// + public static string PaaSDiagnosticsNullStorageAccount { + get { + return ResourceManager.GetString("PaaSDiagnosticsNullStorageAccount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Your xml configuration file doesn't start with the required header <?xml version="1.0" encoding="utf-8"?>. + /// + public static string PaaSDiagnosticsWrongHeader { + get { + return ResourceManager.GetString("PaaSDiagnosticsWrongHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The element StorageAccount doesn't match the storage account name provided in the cmdlet arguments. It is recommended to not use the element StorageAccount as it is automatically set by the cmdlet.. + /// + public static string PassDiagnosticsNoMatchStorageAccount { + get { + return ResourceManager.GetString("PassDiagnosticsNoMatchStorageAccount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Password does not meet complexity requirements.. + /// + public static string PasswordNotComplexEnough { + get { + return ResourceManager.GetString("PasswordNotComplexEnough", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to pfx. + /// + public static string Pfx_CertificateFormat { + get { + return ResourceManager.GetString("Pfx_CertificateFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Ports must be in the range of 0 - 65535. + /// + public static string PortsNotInRangeInSetAzureEndpoint { + get { + return ResourceManager.GetString("PortsNotInRangeInSetAzureEndpoint", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Ports must be in the range of 1 - 65535. + /// + public static string PortSpecifiedIsNotInRange { + get { + return ResourceManager.GetString("PortSpecifiedIsNotInRange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ProbePath not valid with tcp. + /// + public static string ProbePathIsNotValidWithTcp { + get { + return ResourceManager.GetString("ProbePathIsNotValidWithTcp", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ProbePath is required for http. + /// + public static string ProbePathIsRequiredForHttp { + get { + return ResourceManager.GetString("ProbePathIsRequiredForHttp", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Provision Guest Agent must be enabled on the VM object before setting IaaS Diagnostics Extension.. + /// + public static string ProvisionGuestAgentMustBeEnabledBeforeSettingIaaSDiagnosticsExtension { + get { + return ResourceManager.GetString("ProvisionGuestAgentMustBeEnabledBeforeSettingIaaSDiagnosticsExtension", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Provision Guest Agent must be enabled on the VM object before setting IaaS VM Access Extension.. + /// + public static string ProvisionGuestAgentMustBeEnabledBeforeSettingIaaSVMAccessExtension { + get { + return ResourceManager.GetString("ProvisionGuestAgentMustBeEnabledBeforeSettingIaaSVMAccessExtension", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Calculating MD5 Hash. + /// + public static string PSSyncOutputEventsCalculatingMD5Hash { + get { + return ResourceManager.GetString("PSSyncOutputEventsCalculatingMD5Hash", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MD5 hash is being calculated for the file '{0}'.. + /// + public static string PSSyncOutputEventsCalculatingMD5HashForFile { + get { + return ResourceManager.GetString("PSSyncOutputEventsCalculatingMD5HashForFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Copying. + /// + public static string PSSyncOutputEventsCopying { + get { + return ResourceManager.GetString("PSSyncOutputEventsCopying", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creating new page blob of size {0}.... + /// + public static string PSSyncOutputEventsCreatingNewPageBlob { + get { + return ResourceManager.GetString("PSSyncOutputEventsCreatingNewPageBlob", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Detecting the empty data blocks in the local file.. + /// + public static string PSSyncOutputEventsDetectingActualDataBlocks { + get { + return ResourceManager.GetString("PSSyncOutputEventsDetectingActualDataBlocks", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Detecting the empty data blocks completed.. + /// + public static string PSSyncOutputEventsDetectingActualDataBlocksCompleted { + get { + return ResourceManager.GetString("PSSyncOutputEventsDetectingActualDataBlocksCompleted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Downloading. + /// + public static string PSSyncOutputEventsDownloading { + get { + return ResourceManager.GetString("PSSyncOutputEventsDownloading", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Elapsed time for copy: {0}. + /// + public static string PSSyncOutputEventsElapsedTimeForCopy { + get { + return ResourceManager.GetString("PSSyncOutputEventsElapsedTimeForCopy", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Elapsed time for download: {0}. + /// + public static string PSSyncOutputEventsElapsedTimeForDownload { + get { + return ResourceManager.GetString("PSSyncOutputEventsElapsedTimeForDownload", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Elapsed time for the operation: {0}. + /// + public static string PSSyncOutputEventsElapsedTimeForOperation { + get { + return ResourceManager.GetString("PSSyncOutputEventsElapsedTimeForOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Elapsed time for upload: {0}. + /// + public static string PSSyncOutputEventsElapsedTimeForUpload { + get { + return ResourceManager.GetString("PSSyncOutputEventsElapsedTimeForUpload", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Empty block detected: {0}. + /// + public static string PSSyncOutputEventsEmptyBlockDetected { + get { + return ResourceManager.GetString("PSSyncOutputEventsEmptyBlockDetected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Completed. + /// + public static string PSSyncOutputEventsEmptyBlockDetectionCompleted { + get { + return ResourceManager.GetString("PSSyncOutputEventsEmptyBlockDetectionCompleted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Detecting empty blocks. + /// + public static string PSSyncOutputEventsEmptyBlockDetectionDetecting { + get { + return ResourceManager.GetString("PSSyncOutputEventsEmptyBlockDetectionDetecting", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} days {1:00}:{2:00}:{3:00}. + /// + public static string PSSyncOutputEventsFormatDuration { + get { + return ResourceManager.GetString("PSSyncOutputEventsFormatDuration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0:0.0}% complete; Remaining Time: {1}; Throughput: {2:0.0}Mbps. + /// + public static string PSSyncOutputEventsLogProgress { + get { + return ResourceManager.GetString("PSSyncOutputEventsLogProgress", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Completed. + /// + public static string PSSyncOutputEventsLogProgressCompleteCompleted { + get { + return ResourceManager.GetString("PSSyncOutputEventsLogProgressCompleteCompleted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MD5 hash calculation is completed.. + /// + public static string PSSyncOutputEventsMD5HashCalculationFinished { + get { + return ResourceManager.GetString("PSSyncOutputEventsMD5HashCalculationFinished", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Range of the block is {0}, Length: {1}. + /// + public static string PSSyncOutputEventsPrintBlockRange { + get { + return ResourceManager.GetString("PSSyncOutputEventsPrintBlockRange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Empty Block Detection. + /// + public static string PSSyncOutputEventsProgressEmptyBlockDetection { + get { + return ResourceManager.GetString("PSSyncOutputEventsProgressEmptyBlockDetection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Found existing page blob. Resuming upload.... + /// + public static string PSSyncOutputEventsResumingUpload { + get { + return ResourceManager.GetString("PSSyncOutputEventsResumingUpload", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Network disruption occured, retrying.. + /// + public static string PSSyncOutputEventsRetryingAfterANetworkDisruption { + get { + return ResourceManager.GetString("PSSyncOutputEventsRetryingAfterANetworkDisruption", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Upload failed with exceptions:. + /// + public static string PSSyncOutputEventsUploadFailedWithException { + get { + return ResourceManager.GetString("PSSyncOutputEventsUploadFailedWithException", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Uploading. + /// + public static string PSSyncOutputEventsUploading { + get { + return ResourceManager.GetString("PSSyncOutputEventsUploading", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Configuration published to {0}. + /// + public static string PublishVMDscExtensionArchiveUploadedMessage { + get { + return ResourceManager.GetString("PublishVMDscExtensionArchiveUploadedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find configuration file: {0}.. + /// + public static string PublishVMDscExtensionConfigFileNotFound { + get { + return ResourceManager.GetString("PublishVMDscExtensionConfigFileNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Copy '{0}' to '{1}'.. + /// + public static string PublishVMDscExtensionCopyFileVerbose { + get { + return ResourceManager.GetString("PublishVMDscExtensionCopyFileVerbose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Copy the module '{0}' to '{1}'.. + /// + public static string PublishVMDscExtensionCopyModuleVerbose { + get { + return ResourceManager.GetString("PublishVMDscExtensionCopyModuleVerbose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid configuration file: {0}. + ///The file needs to be a PowerShell script (.ps1 or .psm1).. + /// + public static string PublishVMDscExtensionCreateArchiveConfigFileInvalidExtension { + get { + return ResourceManager.GetString("PublishVMDscExtensionCreateArchiveConfigFileInvalidExtension", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Create a zip file '{0}' from directory '{1}'.. + /// + public static string PublishVMDscExtensionCreateZipVerbose { + get { + return ResourceManager.GetString("PublishVMDscExtensionCreateZipVerbose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deleted '{0}'. + /// + public static string PublishVMDscExtensionDeletedFileMessage { + get { + return ResourceManager.GetString("PublishVMDscExtensionDeletedFileMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot delete '{0}': {1}. + /// + public static string PublishVMDscExtensionDeleteErrorMessage { + get { + return ResourceManager.GetString("PublishVMDscExtensionDeleteErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot get module for DscResource '{0}'. Possible solutions: + ///1) Specify -ModuleName for Import-DscResource in your configuration. + ///2) Unblock module that contains resource. + ///3) Move Import-DscResource inside Node block. + ///. + /// + public static string PublishVMDscExtensionGetDscResourceFailed { + get { + return ResourceManager.GetString("PublishVMDscExtensionGetDscResourceFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to List of required modules: [{0}].. + /// + public static string PublishVMDscExtensionRequiredModulesVerbose { + get { + return ResourceManager.GetString("PublishVMDscExtensionRequiredModulesVerbose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Your current PowerShell version {1} is less then required by this cmdlet {0}. Consider download and install latest PowerShell version.. + /// + public static string PublishVMDscExtensionRequiredPsVersion { + get { + return ResourceManager.GetString("PublishVMDscExtensionRequiredPsVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Configuration script '{0}' contained parse errors: + ///{1}. + /// + public static string PublishVMDscExtensionStorageParserErrors { + get { + return ResourceManager.GetString("PublishVMDscExtensionStorageParserErrors", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Temp folder '{0}' created.. + /// + public static string PublishVMDscExtensionTempFolderVerbose { + get { + return ResourceManager.GetString("PublishVMDscExtensionTempFolderVerbose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid configuration file: {0}. + ///The file needs to be a PowerShell script (.ps1 or .psm1) or a ZIP archive (.zip).. + /// + public static string PublishVMDscExtensionUploadArchiveConfigFileInvalidExtension { + get { + return ResourceManager.GetString("PublishVMDscExtensionUploadArchiveConfigFileInvalidExtension", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Configuration file '{0}' not found.. + /// + public static string PublishVMDscExtensionUploadArchiveConfigFileNotExist { + get { + return ResourceManager.GetString("PublishVMDscExtensionUploadArchiveConfigFileNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Begin Operation: {0}. + /// + public static string QuickVMBeginOperation { + get { + return ResourceManager.GetString("QuickVMBeginOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Completed Operation: {0}. + /// + public static string QuickVMCompletedOperation { + get { + return ResourceManager.GetString("QuickVMCompletedOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to - Create Cloud Service. + /// + public static string QuickVMCreateCloudService { + get { + return ResourceManager.GetString("QuickVMCreateCloudService", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} - Create Deployment with VM {1}. + /// + public static string QuickVMCreateDeploymentWithVM { + get { + return ResourceManager.GetString("QuickVMCreateDeploymentWithVM", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} - Create VM {1}. + /// + public static string QuickVMCreateVM { + get { + return ResourceManager.GetString("QuickVMCreateVM", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} - Uploading Certificate: {1}. + /// + public static string QuickVMUploadingCertificate { + get { + return ResourceManager.GetString("QuickVMUploadingCertificate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} - Uploading WinRMCertificate: {1}. + /// + public static string QuickVMUploadingWinRMCertificate { + get { + return ResourceManager.GetString("QuickVMUploadingWinRMCertificate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reboot and Reimage parameters are mutually exclusive.. + /// + public static string RebootAndReImageAreMutuallyExclusive { + get { + return ResourceManager.GetString("RebootAndReImageAreMutuallyExclusive", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reboot and Reimage parameters are mutually exclusive.. + /// + public static string RebootAndReImageExclusive { + get { + return ResourceManager.GetString("RebootAndReImageExclusive", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reboot or Reimage parameters should be specified.. + /// + public static string RebootOrReImageAreMissing { + get { + return ResourceManager.GetString("RebootOrReImageAreMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reboot or Reimage parameters should be specified.. + /// + public static string RebootOrReImageMustBeSpecified { + get { + return ResourceManager.GetString("RebootOrReImageMustBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove Azure DNS Server. + /// + public static string RemoveAzureDnsServerCaption { + get { + return ResourceManager.GetString("RemoveAzureDnsServerCaption", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove this DNS server: {0} from your service: {1}. + /// + public static string RemoveAzureDnsServerWarning { + get { + return ResourceManager.GetString("RemoveAzureDnsServerWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Reserved IP from your subscription?. + /// + public static string RemoveReservedIPWarning { + get { + return ResourceManager.GetString("RemoveReservedIPWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove the Reserved IP from your subscription.. + /// + public static string RemoveReservedIPWhatIfMessage { + get { + return ResourceManager.GetString("RemoveReservedIPWhatIfMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reserved IP with the Name:'{0}' will no longer be in use after the last VM in the Cloud Service is deleted, it is still reserved in your subscription for later use. Please note that the Reserved IPs that are not associated with a deployment will incur billing charges.. + /// + public static string ReservedIPNameNoLongerInUseByDeletingLastVMButStillBeingReserved { + get { + return ResourceManager.GetString("ReservedIPNameNoLongerInUseByDeletingLastVMButStillBeingReserved", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reserved IP with the Name:'{0}' will no longer be in use after the deployment is deleted, it is still reserved in your subscription for later use. Please note that the Reserved IPs that are not associated with a cloud service will incur billing charges.. + /// + public static string ReservedIPNameNoLongerInUseByDeploymentButStillBeingReserved { + get { + return ResourceManager.GetString("ReservedIPNameNoLongerInUseByDeploymentButStillBeingReserved", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reserved IP with the Name:'{0}' will no longer be in use after all the VMs in the Cloud Service are in the Stopped Deallocated state, it is still reserved in your subscription for later use. Please note that the Reserved IPs that are not associated with a deployment will incur billing charges.. + /// + public static string ReservedIPNameNoLongerInUseByStoppingLastVMButStillBeingReserved { + get { + return ResourceManager.GetString("ReservedIPNameNoLongerInUseByStoppingLastVMButStillBeingReserved", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Writing Config Template to the following file path: '{0}'.. + /// + public static string ResourceExtensionConfigTemplateWritingPath { + get { + return ResourceManager.GetString("ResourceExtensionConfigTemplateWritingPath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified resource extension reference cannot be found.. + /// + public static string ResourceExtensionReferenceCannotBeFound { + get { + return ResourceManager.GetString("ResourceExtensionReferenceCannotBeFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The resource extension reference list is null or empty.. + /// + public static string ResourceExtensionReferencesIsNullOrEmpty { + get { + return ResourceManager.GetString("ResourceExtensionReferencesIsNullOrEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ReverseDnsFqdn can only be specified when creating a new cloud service.. + /// + public static string ReverseDnsFqdnCanOnlyBeSpecifiedWhenNewCloudService { + get { + return ResourceManager.GetString("ReverseDnsFqdnCanOnlyBeSpecifiedWhenNewCloudService", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Roleinstance cannot be found. + /// + public static string RoleInstanceCanNotBeFound { + get { + return ResourceManager.GetString("RoleInstanceCanNotBeFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Roleinstance cannot be found: {0}. + /// + public static string RoleInstanceCanNotBeFoundWithName { + get { + return ResourceManager.GetString("RoleInstanceCanNotBeFoundWithName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to InstanceStatus is {0}. + /// + public static string RoleInstanceStatus { + get { + return ResourceManager.GetString("RoleInstanceStatus", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cloud Service does not exist. Specify -Location or -Affinity group to create one.. + /// + public static string ServiceDoesNotExistSpecifyLocationOrAffinityGroup { + get { + return ResourceManager.GetString("ServiceDoesNotExistSpecifyLocationOrAffinityGroup", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service already exists, AffinityGroup cannot be specified.. + /// + public static string ServiceExistsAffinityGroupCanNotBeSpecified { + get { + return ResourceManager.GetString("ServiceExistsAffinityGroupCanNotBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service already exists, Location cannot be specified.. + /// + public static string ServiceExistsLocationCanNotBeSpecified { + get { + return ResourceManager.GetString("ServiceExistsLocationCanNotBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service already exists, ReverseDnsFqdn cannot be specified.. + /// + public static string ServiceExistsReverseDnsFqdnCanNotBeSpecified { + get { + return ResourceManager.GetString("ServiceExistsReverseDnsFqdnCanNotBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot apply more than one extension in the same namespace and type: {0}.. + /// + public static string ServiceExtensionCannotApplyExtensionsInSameType { + get { + return ResourceManager.GetString("ServiceExtensionCannotApplyExtensionsInSameType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unsupported configuration. To enable antimalware, specify a value of true for the AntimalwareEnabled element.. + /// + public static string ServiceExtensionCannotFindAntimalwareEnableSetting { + get { + return ResourceManager.GetString("ServiceExtensionCannotFindAntimalwareEnableSetting", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deployment not found in service: {0} and slot: {1}.. + /// + public static string ServiceExtensionCannotFindDeployment { + get { + return ResourceManager.GetString("ServiceExtensionCannotFindDeployment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role: {0} not found in deployment {1} of service {2}.. + /// + public static string ServiceExtensionCannotFindRole { + get { + return ResourceManager.GetString("ServiceExtensionCannotFindRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Specified role name cannot be empty or null.. + /// + public static string ServiceExtensionCannotFindRoleName { + get { + return ResourceManager.GetString("ServiceExtensionCannotFindRoleName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find cloud service: {0}.. + /// + public static string ServiceExtensionCannotFindServiceName { + get { + return ResourceManager.GetString("ServiceExtensionCannotFindServiceName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find storage account for the account name: {0}.. + /// + public static string ServiceExtensionCannotFindStorageAccount { + get { + return ResourceManager.GetString("ServiceExtensionCannotFindStorageAccount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find storage keys for the account name: {0}.. + /// + public static string ServiceExtensionCannotFindStorageAccountKey { + get { + return ResourceManager.GetString("ServiceExtensionCannotFindStorageAccountKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find storage service for the account name: {0}.. + /// + public static string ServiceExtensionCannotFindStorageAccountName { + get { + return ResourceManager.GetString("ServiceExtensionCannotFindStorageAccountName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No existing {0}.{1} extensions enabled on given roles.. + /// + public static string ServiceExtensionNoExistingExtensionsEnabledOnRoles { + get { + return ResourceManager.GetString("ServiceExtensionNoExistingExtensionsEnabledOnRoles", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing default {0} configuration for all roles from Cloud Service {1}.. + /// + public static string ServiceExtensionRemovingFromAllRoles { + get { + return ResourceManager.GetString("ServiceExtensionRemovingFromAllRoles", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing {0} configuration for {1} from Cloud Service {2}.. + /// + public static string ServiceExtensionRemovingFromSpecificRoles { + get { + return ResourceManager.GetString("ServiceExtensionRemovingFromSpecificRoles", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Default {0} configuration exists applying default configuration to {1}.. + /// + public static string ServiceExtensionRemovingSpecificAndApplyingDefault { + get { + return ResourceManager.GetString("ServiceExtensionRemovingSpecificAndApplyingDefault", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Setting default {0} configuration for all roles.. + /// + public static string ServiceExtensionSettingForDefaultRole { + get { + return ResourceManager.GetString("ServiceExtensionSettingForDefaultRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Setting {0} configuration for {1}.. + /// + public static string ServiceExtensionSettingForSpecificRole { + get { + return ResourceManager.GetString("ServiceExtensionSettingForSpecificRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} - Uploading Certificate: {1}. + /// + public static string ServiceExtensionUploadingCertificate { + get { + return ResourceManager.GetString("ServiceExtensionUploadingCertificate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to "An exception occurred when calling the ServiceManagement API. HTTP Status Code: {0}. Service Management Error Code: {1}. Message: {2}. Operation Tracking ID: {3}.". + /// + public static string ServiceManagementClientExceptionStringFormat { + get { + return ResourceManager.GetString("ServiceManagementClientExceptionStringFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Specify -LinuxUser when creating Linux Virtual Machines. + /// + public static string SpecifyLinuxUserWhenCreatingLinuxVMs { + get { + return ResourceManager.GetString("SpecifyLinuxUserWhenCreatingLinuxVMs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Stopping VM role: '{0}'. Its static IP address: '{1}' will no longer be in use after the it is stopped and stayed in provision, but it is still being reserved.. + /// + public static string StaticIPAddressNoLongerInUseButStillBeingReserved { + get { + return ResourceManager.GetString("StaticIPAddressNoLongerInUseButStillBeingReserved", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No current subscription has been designated. Use Select-AzureSubscription -Current <subscriptionName> to set the current subscription.. + /// + public static string StorageCredentialsFactoryCurrentSubscriptionNotSet { + get { + return ResourceManager.GetString("StorageCredentialsFactoryCurrentSubscriptionNotSet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Subnet should be specified when deploying VMs in a VNET: {0}. + /// + public static string SubnetShouldBeSpecifiedIfVnetPresent { + get { + return ResourceManager.GetString("SubnetShouldBeSpecifiedIfVnetPresent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to decode string from base 64. Please make sure the string is correctly encoded: {0}.. + /// + public static string UnableToDecodeBase64String { + get { + return ResourceManager.GetString("UnableToDecodeBase64String", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Uploading package to blob storage. + /// + public static string UploadingPackage { + get { + return ResourceManager.GetString("UploadingPackage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to VIP Swap is taking place between Staging and Production deployments.:{0}. + /// + public static string VIPSwapBetweenStagingAndProduction { + get { + return ResourceManager.GetString("VIPSwapBetweenStagingAndProduction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The directory specified by the file path does not exist.. + /// + public static string VirtualNetworkConfigContextDirectoryDoesNotExist { + get { + return ResourceManager.GetString("VirtualNetworkConfigContextDirectoryDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A file path should be specified.. + /// + public static string VirtualNetworkConfigContextMissingFilePath { + get { + return ResourceManager.GetString("VirtualNetworkConfigContextMissingFilePath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified virtual network name was not found: {0}. + /// + public static string VirtualNetworkNameNotFound { + get { + return ResourceManager.GetString("VirtualNetworkNameNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to VM creation failed, VM status is '{0}'. + /// + public static string VMCreationFailedWithVMStatus { + get { + return ResourceManager.GetString("VMCreationFailedWithVMStatus", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Virtual Machine {0} is missing provisioning configuration. + /// + public static string VMMissingProvisioningConfiguration { + get { + return ResourceManager.GetString("VMMissingProvisioningConfiguration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not read properties for virtual machine: {0}. It may still be provisioning.. + /// + public static string VMPropertiesCanNotBeRead { + get { + return ResourceManager.GetString("VMPropertiesCanNotBeRead", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Virtual Network Name may only be specified on the initial deployment. Specify Location or Affinity Group to create a new cloud service and deployment.. + /// + public static string VNetNameCanBeSpecifiedOnlyOnInitialDeployment { + get { + return ResourceManager.GetString("VNetNameCanBeSpecifiedOnlyOnInitialDeployment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to VNetName, DnsSettings, DeploymentLabel or DeploymentName Name can only be specified on new deployments.. + /// + public static string VNetNameDnsSettingsDeploymentLabelDeploymentNameCanBeSpecifiedOnNewDeployments { + get { + return ResourceManager.GetString("VNetNameDnsSettingsDeploymentLabelDeploymentNameCanBeSpecifiedOnNewDeployments", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to VNetName or DnsSettings can only be specified on new deployments.. + /// + public static string VNetNameOrDnsSettingsCanOnlyBeSpecifiedOnNewDeployments { + get { + return ResourceManager.GetString("VNetNameOrDnsSettingsCanOnlyBeSpecifiedOnNewDeployments", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to VNetName is required when specifying DNS Settings.. + /// + public static string VNetNameRequiredWhenSpecifyingDNSSettings { + get { + return ResourceManager.GetString("VNetNameRequiredWhenSpecifyingDNSSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please wait.... + /// + public static string WaitForUploadingPackage { + get { + return ResourceManager.GetString("WaitForUploadingPackage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to VM "{0}" is not currently associated with a Network Security Group.. + /// + public static string WarningVmIsNotDirectlyAssociatedWithNetworkSecurityGroup { + get { + return ResourceManager.GetString("WarningVmIsNotDirectlyAssociatedWithNetworkSecurityGroup", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WinRMCertificate needs to have an exportable private key.. + /// + public static string WinRMCertificateDoesNotHaveExportablePrivateKey { + get { + return ResourceManager.GetString("WinRMCertificateDoesNotHaveExportablePrivateKey", resourceCulture); + } + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/Properties/Resources.resx b/src/ServiceManagement/Compute/Commands.ServiceManagement/Properties/Resources.resx new file mode 100644 index 000000000000..c7ba05805789 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/Properties/Resources.resx @@ -0,0 +1,805 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + You must specify the thumbprint algorithm. + + + pfx + + + You must specify the thumbprint algorithm. + + + ValidateSetFailure - Invalid UpgradeType is specified: '{0}', valid values are: '{1}' + + + ValidateSetFailure - Invalid VM Size specified: '{0}', valid values are: '{1}' + + + Role cannot be null + + + The file to load the role does not exist + + + There is no WinRM Https Listener in ProvisioningConfiguration + + + There is already an WinRM Http Listener in ProvisioningConfiguration + + + WinRMCertificate must have private key + + + There is already an WinRM Https Listener in ProvisioningConfiguration + + + Begin Operation: Get Deployment + + + Completed Operation: Get Deployment + + + No deployment found in Staging or Production: {0} + + + No deployment found in Staging: {0} + + + Moving deployment from Staging to Production:{0} + + + VIP Swap is taking place between Staging and Production deployments.:{0} + + + Cannot Move Deployments with Virtual Machines Present in {0} + + + No deployment found in {0} + + + Uploading package to blob storage + + + Please wait... + + + Creating the new deployment + + + Cannot Create New Deployment with Virtual Machines Present in {0} Slot + + + CurrentStorageAccountName is not set. Use Set-AzureSubscription subname -CurrentStorageAccountName storageaccount to set it. + + + This cmdlet will remove deployed applications including VMs from the specified deployment slot. Do you want to continue? + + + Deployment Deletion + + + Reboot and Reimage parameters are mutually exclusive. + + + Reboot or Reimage parameters should be specified. + + + Reboot and Reimage parameters are mutually exclusive. + + + Reboot or Reimage parameters should be specified. + + + You must specify a value for Label, Description or ReverseDnsFqdn. + + + A data disk has already been assigned to LUN #{0} for this VM. Specify a different LUN or use Set-DataDisk to change the configuration settings of the existing disk. + + + Must specify MediaLocation or set a default storage account using Set-AzureSubscription. + + + A data disk is not currently assigned to LUN #{0} in the configuration of this VM. + + + A data disk is not currently assigned to LUN #{0} for this VM. Use New-DataDisk to define it. + + + An OSDisk has not been defined for this VM. Use New-OSDisk to assign a new OS disk. + + + An endpoint named '{0}' has already been defined for this VM. Specify a different endpoint name or use Set-Endpoint to change the configuration settings of the existing endpoint. + + + ProbePath not valid with tcp + + + ProbePath is required for http + + + Ports must be in the range of 1 - 65535 + + + An endpoint named '{0}' cannot be found in the configuration of this VM. + + + An endpoint named '{0}' cannot be found in the configuration of this VM. Use New-ExternalEndpoint to define it. + + + Ports must be in the range of 0 - 65535 + + + HTTP Status Code: {0} - HTTP Error Message: {1} + + + Operation Status: + + + Begin Operation: {0} + + + Completed Operation: {0} + + + The directory specified to export the network configuration does not exist. + + + Begin Operation: {0} + + + Completed Operation: {0} + + + The specified virtual network name was not found: {0} + + + The specified network configuration file path does not exist. + + + Password does not meet complexity requirements. + + + Hostname is invalid. + + + Computer Name is invalid. + + + Cloud Service is not present or there is no virtual machine deployment. + + + Begin Operation: {0} + + + Completed Operation: {0} + + + Could not read properties for virtual machine: {0}. It may still be provisioning. + + + Current deployment doesn't have any Url + + + Current deployment doesn't have any VMs + + + Roleinstance cannot be found: {0} + + + Roleinstance cannot be found + + + No endpoint found for the VM: {0} + + + CurrentStorageAccountName is not accessible. Ensure the current storage account is accessible and in the same location or affinity group as your cloud service. + + + Service already exists, Location cannot be specified. + + + Service already exists, AffinityGroup cannot be specified. + + + WinRMCertificate needs to have an exportable private key. + + + Cloud Service does not exist. Specify -Location or -Affinity group to create one. + + + VNetName or DnsSettings can only be specified on new deployments. + + + Begin Operation: {0} + + + Completed Operation: {0} + + + VNetName is required when specifying DNS Settings. + + + Specify -LinuxUser when creating Linux Virtual Machines + + + Location or AffinityGroup, only one of them needs to be specified. + + + Virtual Network Name may only be specified on the initial deployment. Specify Location or Affinity Group to create a new cloud service and deployment. + + + VNetName, DnsSettings, DeploymentLabel or DeploymentName Name can only be specified on new deployments. + + + Location or AffinityGroup is required when creating a new Cloud Service. + + + Location or AffinityGroup can only be specified when creating a new cloud service. + + + Must specify the same affinity group as the virtual network is deployed to. + + + Virtual Machine {0} is missing provisioning configuration + + + Begin Operation: {0} + + + Completed Operation: {0} + + + Must specify MediaLocation or set a current storage account using Set-AzureSubscription. + + + Could not find a deployment for '{0}' in '{1}' slot. + + + InstanceStatus is {0} + + + VM creation failed, VM status is '{0}' + + + Copying + + + Elapsed time for copy: {0} + + + Uploading + + + Creating new page blob of size {0}... + + + Found existing page blob. Resuming upload... + + + Elapsed time for upload: {0} + + + Downloading + + + Elapsed time for download: {0} + + + Calculating MD5 Hash + + + Elapsed time for the operation: {0} + + + Upload failed with exceptions: + + + MD5 hash is being calculated for the file '{0}'. + + + MD5 hash calculation is completed. + + + Network disruption occured, retrying. + + + Detecting the empty data blocks in the local file. + + + Detecting the empty data blocks completed. + + + Range of the block is {0}, Length: {1} + + + Empty block detected: {0} + + + A file path should be specified. + + + The directory specified by the file path does not exist. + + + SAS Uri for the destination blob is not supported in patch mode:{0} + + + No current subscription has been designated. Use Select-AzureSubscription -Current <subscriptionName> to set the current subscription. + + + {0} days {1:00}:{2:00}:{3:00} + + + {0:0.0}% complete; Remaining Time: {1}; Throughput: {2:0.0}Mbps + + + Empty Block Detection + + + Completed + + + Detecting empty blocks + + + Completed + + + {0} - Uploading WinRMCertificate: {1} + + + {0} - Uploading Certificate: {1} + + + {0} - Create Deployment with VM {1} + + + {0} - Create VM {1} + + + - Create Cloud Service + + + {0} - Uploading WinRMCertificate: {1} + + + {0} - Uploading Certificate: {1} + + + {0} - Create Deployment with VM {1} + + + {0} - Create VM {1} + + + Unsupported configuration. To enable antimalware, specify a value of true for the AntimalwareEnabled element. + + + Cannot find cloud service: {0}. + + + Cannot find storage keys for the account name: {0}. + + + Cannot find storage service for the account name: {0}. + + + Cannot apply more than one extension in the same namespace and type: {0}. + + + Deployment not found in service: {0} and slot: {1}. + + + Role: {0} not found in deployment {1} of service {2}. + + + Specified role name cannot be empty or null. + + + No existing {0}.{1} extensions enabled on given roles. + + + {0} - Uploading Certificate: {1} + + + The specified virtual machine is the last virtual machine in this deployment. Continuing will result in a new IP address for your deployment. To shut down without losing the deployment IP use -StayProvisioned. + + + Deprovisioning the VM: {0} + + + An endpoint cannot be found with the given load balancer set name '{0}'. + + + No role can be found in the deployment with '{0}' name + + + Cannot find storage account for the account name: {0}. + + + Setting {0} configuration for {1}. + + + Setting default {0} configuration for all roles. + + + Removing default {0} configuration for all roles from Cloud Service {1}. + + + Default {0} configuration exists applying default configuration to {1}. + + + Removing {0} configuration for {1} from Cloud Service {2}. + + + Must provide the Force switch when using wildcard syntax. + + + Network configuration cannot be deserialized. + + + Reserved IP with the Name:'{0}' will no longer be in use after the deployment is deleted, it is still reserved in your subscription for later use. Please note that the Reserved IPs that are not associated with a cloud service will incur billing charges. + + + Cannot delete VM Data Disk for LUN '{0}', + + + Network configuration not found on the persistent VM. + + + Stopping VM role: '{0}'. Its static IP address: '{1}' will no longer be in use after the it is stopped and stayed in provision, but it is still being reserved. + + + Diagnostics Configuration Xml or File Path, only one of them needs to be specified. + + + Either Diagnostics Configuration Xml or File Path must be specified. + + + Provision Guest Agent must be enabled on the VM object before setting IaaS Diagnostics Extension. + + + Provision Guest Agent must be enabled on the VM object before setting IaaS VM Access Extension. + + + The specified resource extension reference cannot be found. + + + The resource extension reference list is null or empty. + + + Writing Config Template to the following file path: '{0}'. + + + Duplicate names '{0}' found in both VM and OS images. Please delete one of them, using other method such as Portal or Invoke-RestMethod call, and try again. + + + No VM deployment found by service name '{0}' and VM name '{1}'. + + + There is another image in '{0}' type found with the same name '{1}' exists; WAPS will stop here to avoid duplicates and potential conflicts. Please use another name for the image. + + + No Run File has been assigned, and the Custom Script extension will try to use the first specified File Name as the Run File. + + + No deployment found in service: '{0}'. + + + VM image capture operation is trigged while VM is still running. As this may cause data corruption while creating VMs from this image, we recommend using Stop-AzureVM to stop the VM before capturing. + + + Are you sure you want to remove the Reserved IP from your subscription? + + + Remove the Reserved IP from your subscription. + + + Reserved IP with the Name:'{0}' will no longer be in use after the last VM in the Cloud Service is deleted, it is still reserved in your subscription for later use. Please note that the Reserved IPs that are not associated with a deployment will incur billing charges. + + + Reserved IP with the Name:'{0}' will no longer be in use after all the VMs in the Cloud Service are in the Stopped Deallocated state, it is still reserved in your subscription for later use. Please note that the Reserved IPs that are not associated with a deployment will incur billing charges. + + + Cannot find the // in the endpoint {0} + + + Cannot find the storage account name {0} in the endpoint {1} + + + Service already exists, ReverseDnsFqdn cannot be specified. + + + ReverseDnsFqdn can only be specified when creating a new cloud service. + + + Remove Azure DNS Server + + + Are you sure you want to remove this DNS server: {0} from your service: {1} + + + Cannot find configuration data file: {0} + + + The -ConfigurationArchive parameter must no include a path + + + The configuration data must be a .psd1 file + + + Cannot find configuration file: {0}. + 0 = path to the configuration file + + + Invalid configuration file: {0}. +The file needs to be a PowerShell script (.ps1 or .psm1) or a ZIP archive (.zip). + 0 = path to the configuration file + + + Configuration file '{0}' not found. + 0 = path to the configuration file + + + Cannot get module for DscResource '{0}'. Possible solutions: +1) Specify -ModuleName for Import-DscResource in your configuration. +2) Unblock module that contains resource. +3) Move Import-DscResource inside Node block. + + 0 = name of DscResource + + + Configuration script '{0}' contained parse errors: +{1} + 0 = path to the configuration script, 1 = parser errors + + + The storage context must include an storage account. + + + Cannot find the WadCfg end element in the config. + + + Cannot find the WadCfg element in the config. + + + WadCfg start element in the config is not matching the end element. + + + Your xml configuration file doesn't start with the required header <?xml version="1.0" encoding="utf-8"?> + + + The element StorageAccount cannot be empty. It is recommended to not use this element in the config. It will be set automatically by the cmdlet. + + + The element StorageAccount doesn't match the storage account name provided in the cmdlet arguments. It is recommended to not use the element StorageAccount as it is automatically set by the cmdlet. + + + Apply configuration '{0}' + {0} is the name of a PowerShell DSC Configuration function + + + Parsing configuration script: {0} + {0} is the path to a script file + + + Storage Blob '{0}' already exists. Use the -Force parameter to overwrite it. + {0} is the name of an storage blob + + + Upload '{0}' + {0} is the name of an storage blob + + + Invalid configuration file: {0}. +The file needs to be a PowerShell script (.ps1 or .psm1). + 0 = path to the configuration file + + + If the ConfigurationArchive argument is null, then the ConfigurationName, ConfigurationArgument, and ConfigurationDataPath parameters must not be specified + + + If the ConfigurationArchive argument is null, then the StorageContext, ContainerName, and StorageEndpointSuffix parameters must not be specified + + + Create Archive + + + File '{0}' already exists. Use the -Force parameter to overwrite it. + {0} is the path to a file + + + Your current PowerShell version {1} is less then required by this cmdlet {0}. Consider download and install latest PowerShell version. + {0} = minimal required PS version, {1} = current PS version + + + Can not find your azure storage credential. Please specify an storage context using the -StorageContext parameter, or set the current storage account using "Set-AzureSubscription", or set the "AZURE_STORAGE_CONNECTION_STRING" environment variable. + + + List of required modules: [{0}]. + {0} = list of modules + + + Temp folder '{0}' created. + {0} = temp folder path + + + Copy '{0}' to '{1}'. + {0} = source, {1} = destination + + + Copy the module '{0}' to '{1}'. + {0} = source, {1} = destination + + + Create a zip file '{0}' from directory '{1}'. + {0} = target zip, {1} = source + + + Deleted '{0}' + {0} is the path of a file + + + Cannot delete '{0}': {1} + {0} is the path of a file, {1} is an error message + + + Cannot deserialize settings string from DSC extension. Updating your Azure PowerShell SDK to the latest version may solve this problem. Settings string: +{0} + {0} settings json string + + + Unable to decode string from base 64. Please make sure the string is correctly encoded: {0}. + {0} is the string that is not in a valid base 64 format. + + + <NONE> + + + "An exception occurred when calling the ServiceManagement API. HTTP Status Code: {0}. Service Management Error Code: {1}. Message: {2}. Operation Tracking ID: {3}." + {0} is the HTTP status code. {1} is the Service Management Error Code. {2} is the Service Management Error message. {3} is the operation tracking ID. + + + Configuration published to {0} + {0} is an URI + + + Subnet should be specified when deploying VMs in a VNET: {0} + + + GeoReplicationEnabled parameter will be deprecated in a future release of Azure PowerShell. The functionality will be merged into the Type parameter. + + + GeoReplicationEnabled property will be deprecated in a future release of Azure PowerShell. The value will be merged into the AccountType property. + + + Duplicate NetworkInterface found on the VM + + + The specified NetworkInterface is not found + + + Cannot remove Network Security Group "{0}" from Virtual Machine "{1}" because it is not directly. + + + VM "{0}" is not currently associated with a Network Security Group. + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/RoleSizes/GetAzureRoleSize.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/RoleSizes/GetAzureRoleSize.cs new file mode 100644 index 000000000000..ccc4ece9de8a --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/RoleSizes/GetAzureRoleSize.cs @@ -0,0 +1,51 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices +{ + /// + /// Retrieve a Microsoft Azure Role Size. + /// + [Cmdlet(VerbsCommon.Get, "AzureRoleSize"), OutputType(typeof(RoleSizeContext))] + public class AzureRoleSizeCommand : ServiceManagementBaseCmdlet + { + [Parameter(ValueFromPipelineByPropertyName = true, Position = 0, HelpMessage = "The Role Instance Size Name.")] + [ValidateNotNullOrEmpty] + public string InstanceSize + { + get; + set; + } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.ManagementClient.RoleSizes.List(), + (op, response) => response.RoleSizes.Where(roleSize => string.IsNullOrEmpty(this.InstanceSize) || + string.Equals(this.InstanceSize, roleSize.Name, StringComparison.OrdinalIgnoreCase)) + .Select(roleSize => ContextFactory(roleSize, op))); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/ServiceManagementProfile.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/ServiceManagementProfile.cs new file mode 100644 index 000000000000..6a50fcb1408c --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/ServiceManagementProfile.cs @@ -0,0 +1,585 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using AutoMapper; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers; +using Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Models; +using Microsoft.WindowsAzure.Management.Storage.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement +{ + using NSM = Management.Compute.Models; + using NVM = Management.Network.Models; + using PVM = Model; + + public static class ServiceManagementMapperExtension + { + public static IMappingExpression ForItems( + this IMappingExpression mapper) + where TSource : IEnumerable + where TDestination : ICollection + { + mapper.AfterMap((c, s) => + { + if (c != null && s != null) + { + foreach (var t in c) + { + s.Add(Mapper.Map(t)); + } + } + }); + + return mapper; + } + } + + public class ServiceManagementProfile : Profile + { + private static readonly Lazy initialize; + + static ServiceManagementProfile() + { + initialize = new Lazy(() => + { + Mapper.AddProfile(); + return true; + }); + } + + public override string ProfileName + { + get { return "ServiceManagementProfile"; } + } + + public static bool Initialize() + { + return initialize.Value; + } + + protected override void Configure() + { + // Service Extension Image + Mapper.CreateMap() + .ForMember(c => c.OperationId, o => o.MapFrom(r => r.Id)) + .ForMember(c => c.OperationStatus, o => o.MapFrom(r => r.Status.ToString())); + + Mapper.CreateMap() + .ForMember(c => c.ThumbprintAlgorithm, o => o.MapFrom(r => r.Certificate.ThumbprintAlgorithm)) + .ForMember(c => c.ExtensionName, o => o.MapFrom(r => r.Type)); + + // VM Extension Image + Mapper.CreateMap() + .ForMember(c => c.OperationId, o => o.MapFrom(r => r.Id)) + .ForMember(c => c.OperationStatus, o => o.MapFrom(r => r.Status.ToString())); + + Mapper.CreateMap() + .ForMember(c => c.ExtensionName, o => o.MapFrom(r => r.Name)); + + //Image mapping + Mapper.CreateMap() + .ForMember(c => c.MediaLink, o => o.MapFrom(r => r.MediaLinkUri)) + .ForMember(c => c.ImageName, o => o.MapFrom(r => r.Name)) + .ForMember(c => c.OS, o => o.MapFrom(r => r.OperatingSystemType)) + .ForMember(c => c.PublishedDate, o => o.MapFrom(r => new DateTime?(r.PublishedDate))) + .ForMember(c => c.IconUri, o => o.MapFrom(r => r.SmallIconUri)) + .ForMember(c => c.LogicalSizeInGB, o => o.MapFrom(r => (int)r.LogicalSizeInGB)); + + Mapper.CreateMap() + .ForMember(c => c.ImageName, o => o.MapFrom(r => r.Name)) + .ForMember(c => c.MediaLink, o => o.MapFrom(r => r.MediaLinkUri)) + .ForMember(c => c.OS, o => o.MapFrom(r => r.OperatingSystemType)) + .ForMember(c => c.PublishedDate, o => o.MapFrom(r => new DateTime?(r.PublishedDate))) + .ForMember(c => c.LogicalSizeInGB, o => o.MapFrom(r => (int)r.LogicalSizeInGB)); + + Mapper.CreateMap() + .ForMember(c => c.ImageName, o => o.MapFrom(r => r.Name)) + .ForMember(c => c.MediaLink, o => o.MapFrom(r => r.MediaLinkUri)) + .ForMember(c => c.IconUri, o => o.MapFrom(r => r.SmallIconUri)) + .ForMember(c => c.OS, o => o.MapFrom(r => r.OperatingSystemType)) + .ForMember(c => c.PublishedDate, o => o.MapFrom(r => r.PublishedDate)) + .ForMember(c => c.LogicalSizeInGB, o => o.MapFrom(r => (int)r.LogicalSizeInGB)); + + Mapper.CreateMap() + .ForMember(c => c.ImageName, o => o.MapFrom(r => r.Name)) + .ForMember(c => c.MediaLink, o => o.MapFrom(r => r.MediaLinkUri)) + .ForMember(c => c.IconUri, o => o.MapFrom(r => r.SmallIconUri)) + .ForMember(c => c.OS, o => o.MapFrom(r => r.OperatingSystemType)) + .ForMember(c => c.PublishedDate, o => o.MapFrom(r => r.PublishedDate)) + .ForMember(c => c.LogicalSizeInGB, o => o.MapFrom(r => (int)r.LogicalSizeInGB)); + + Mapper.CreateMap() + .ForMember(c => c.OperationId, o => o.MapFrom(r => r.Id)) + .ForMember(c => c.OperationStatus, o => o.MapFrom(r => r.Status.ToString())); + + Mapper.CreateMap() + .ForMember(c => c.MediaLink, o => o.MapFrom(r => r.MediaLinkUri)) + .ForMember(c => c.ImageName, o => o.MapFrom(r => r.Name)) + .ForMember(c => c.OS, o => o.MapFrom(r => r.OperatingSystem)); + + // VM Image mapping + Mapper.CreateMap() + .ForMember(c => c.MediaLink, o => o.MapFrom(r => r.MediaLinkUri)) + .ForMember(c => c.ImageName, o => o.MapFrom(r => r.Name)) + .ForMember(c => c.OS, o => o.MapFrom(r => r.OperatingSystemType)) + .ForMember(c => c.PublishedDate, o => o.MapFrom(r => new DateTime?(r.PublishedDate))) + .ForMember(c => c.IconUri, o => o.MapFrom(r => r.SmallIconUri)) + .ForMember(c => c.LogicalSizeInGB, o => o.MapFrom(r => (int)r.LogicalSizeInGB)); + + Mapper.CreateMap() + .ForMember(c => c.ImageName, o => o.MapFrom(r => r.Name)) + .ForMember(c => c.MediaLink, o => o.MapFrom(r => r.MediaLinkUri)) + .ForMember(c => c.OS, o => o.MapFrom(r => r.OperatingSystemType)) + .ForMember(c => c.PublishedDate, o => o.MapFrom(r => new DateTime?(r.PublishedDate))) + .ForMember(c => c.LogicalSizeInGB, o => o.MapFrom(r => (int)r.LogicalSizeInGB)); + + Mapper.CreateMap() + .ForMember(c => c.ImageName, o => o.MapFrom(r => r.Name)) + .ForMember(c => c.MediaLink, o => o.MapFrom(r => r.MediaLinkUri)) + .ForMember(c => c.IconUri, o => o.MapFrom(r => r.SmallIconUri)) + .ForMember(c => c.OS, o => o.MapFrom(r => r.OperatingSystemType)) + .ForMember(c => c.PublishedDate, o => o.MapFrom(r => r.PublishedDate)) + .ForMember(c => c.LogicalSizeInGB, o => o.MapFrom(r => (int)r.LogicalSizeInGB)); + + Mapper.CreateMap() + .ForMember(c => c.ImageName, o => o.MapFrom(r => r.Name)) + .ForMember(c => c.MediaLink, o => o.MapFrom(r => r.MediaLinkUri)) + .ForMember(c => c.IconUri, o => o.MapFrom(r => r.SmallIconUri)) + .ForMember(c => c.OS, o => o.MapFrom(r => r.OperatingSystemType)) + .ForMember(c => c.PublishedDate, o => o.MapFrom(r => r.PublishedDate)) + .ForMember(c => c.LogicalSizeInGB, o => o.MapFrom(r => (int)r.LogicalSizeInGB)); + + Mapper.CreateMap() + .ForMember(c => c.OperationId, o => o.MapFrom(r => r.Id)) + .ForMember(c => c.OperationStatus, o => o.MapFrom(r => r.Status.ToString())); + + Mapper.CreateMap() + .ForMember(c => c.MediaLink, o => o.MapFrom(r => r.MediaLinkUri)) + .ForMember(c => c.ImageName, o => o.MapFrom(r => r.Name)) + .ForMember(c => c.OS, o => o.MapFrom(r => r.OperatingSystem)); + + // VM Image Disk Mapping + Mapper.CreateMap() + .ForMember(c => c.OS, o => o.MapFrom(r => r.OperatingSystem)); + Mapper.CreateMap() + .ForMember(c => c.Lun, o => o.MapFrom(r => r.LogicalUnitNumber)); + + Mapper.CreateMap, List>(); + Mapper.CreateMap, List>(); + Mapper.CreateMap, PVM.DataDiskConfigurationList>(); + + Mapper.CreateMap(); + Mapper.CreateMap() + .ForMember(c => c.LogicalUnitNumber, o => o.MapFrom(r => r.Lun)); + + Mapper.CreateMap, IList>(); + Mapper.CreateMap, List>(); + Mapper.CreateMap>(); + Mapper.CreateMap, IList>(); + Mapper.CreateMap, List>(); + Mapper.CreateMap>(); + Mapper.CreateMap>(); + + Mapper.CreateMap() + .ForMember(c => c.ImageName, o => o.MapFrom(r => r.Name)); + + Mapper.CreateMap() + .ForMember(c => c.OS, o => o.Ignore()) + .ForMember(c => c.LogicalSizeInGB, o => o.Ignore()) + .ForMember(c => c.OperationId, o => o.MapFrom(r => r.Id)) + .ForMember(c => c.OperationStatus, o => o.MapFrom(r => r.Status.ToString())); + + // VM Resource Extensions + Mapper.CreateMap(); + Mapper.CreateMap(); + Mapper.CreateMap() + .ForMember(c => c.TimestampUtc, o => o.MapFrom(r => r.Timestamp)); + + Mapper.CreateMap() + .ForMember(c => c.TimestampUtc, o => o.MapFrom(r => r.Timestamp)) + .ForMember(c => c.ConfigurationAppliedTimeUtc, o => o.MapFrom(r => r.ConfigurationAppliedTime)); + + Mapper.CreateMap(); + Mapper.CreateMap, PVM.ResourceExtensionStatusList>(); + Mapper.CreateMap, PVM.ResourceExtensionStatusList>(); + Mapper.CreateMap, PVM.ResourceExtensionStatusList>(); + + Mapper.CreateMap(); + Mapper.CreateMap, PVM.ResourceExtensionStatusList>(); + Mapper.CreateMap, PVM.ResourceExtensionStatusList>(); + Mapper.CreateMap, PVM.ResourceExtensionStatusList>(); + + //SM to NewSM mapping + Mapper.CreateMap() + .ForMember(c => c.Protocol, o => o.MapFrom(r => r.Protocol)); + Mapper.CreateMap(); + Mapper.CreateMap() + .ForMember(c => c.Rules, o => o.MapFrom(r => r.Rules.ToList())); + Mapper.CreateMap() + .ForMember(c => c.VirtualIPAddress, o => o.MapFrom(r => r.Vip != null ? IPAddress.Parse(r.Vip) : null)) + .ForMember(c => c.EndpointAcl, o => o.MapFrom(r => r.EndpointAccessControlList)) + .ForMember(c => c.LoadBalancerName, o => o.MapFrom(r => r.LoadBalancerName)); + Mapper.CreateMap() + .ForMember(c => c.Name, o => o.MapFrom(r => r.DiskName)) + .ForMember(c => c.Label, o => o.MapFrom(r => r.DiskLabel)) + .ForMember(c => c.LogicalUnitNumber, o => o.MapFrom(r => r.Lun)); + Mapper.CreateMap() + .ForMember(c => c.Name, o => o.MapFrom(r => r.DiskName)) + .ForMember(c => c.Label, o => o.MapFrom(r => r.DiskLabel)) + .ForMember(c => c.OperatingSystem, o => o.MapFrom(r => r.OS)); + Mapper.CreateMap() + .ForMember(c => c.InputEndpoints, o => o.MapFrom(r => r.InputEndpoints != null ? r.InputEndpoints.ToList() : null)) + .ForMember(c => c.SubnetNames, o => o.MapFrom(r => r.SubnetNames != null ? r.SubnetNames.ToList() : null)) + .ForMember(c => c.PublicIPs, o => o.MapFrom(r => r.PublicIPs != null ? r.PublicIPs.ToList() : null)); + + Mapper.CreateMap(); + Mapper.CreateMap(); + Mapper.CreateMap(); + Mapper.CreateMap() + .ForMember(c => c.PublicIPs, o => o.Ignore()) + .ForMember(c => c.UserPassword, o => o.MapFrom(r => r.UserPassword == null ? null : r.UserPassword.ConvertToUnsecureString())) + .ForMember(c => c.SshSettings, o => o.MapFrom(r => r.SSH)); + Mapper.CreateMap() + .ForMember(c => c.PublicIPs, o => o.Ignore()) + .ForMember(c => c.AdminPassword, o => o.MapFrom(r => r.AdminPassword == null ? null : r.AdminPassword.ConvertToUnsecureString())); + Mapper.CreateMap() + .ForMember(c => c.PublicIPs, o => o.Ignore()); + Mapper.CreateMap() + .ForMember(c => c.PublicIPs, o => o.Ignore()); + Mapper.CreateMap() + .ForMember(c => c.VirtualIPAddress, o => o.MapFrom(r => r.Vip != null ? IPAddress.Parse(r.Vip) : null)) + .ForMember(c => c.Port, o => o.MapFrom(r => r.PublicPort)); + + Mapper.CreateMap(); + Mapper.CreateMap() + .ForMember(c => c.ListenerType, o => o.MapFrom(r => r.Protocol)); + Mapper.CreateMap>(); + + //NewSM to SM mapping + Mapper.CreateMap() + .ForMember(c => c.Protocol, o => o.MapFrom(r => r.Protocol.ToString().ToLower())); + Mapper.CreateMap(); + Mapper.CreateMap() + .ForMember(c => c.Rules, o => o.MapFrom(r => r.Rules)); + Mapper.CreateMap() + .ForMember(c => c.LoadBalancerName, o => o.MapFrom(r => r.LoadBalancerName)) + .ForMember(c => c.Vip, o => o.MapFrom(r => r.VirtualIPAddress != null ? r.VirtualIPAddress.ToString() : null)) + .ForMember(c => c.EndpointAccessControlList, o => o.MapFrom(r => r.EndpointAcl)); + Mapper.CreateMap() + .ForMember(c => c.DiskName, o => o.MapFrom(r => r.Name)) + .ForMember(c => c.DiskLabel, o => o.MapFrom(r => r.Label)) + .ForMember(c => c.Lun, o => o.MapFrom(r => r.LogicalUnitNumber)); + Mapper.CreateMap() + .ForMember(c => c.DiskName, o => o.MapFrom(r => r.Name)) + .ForMember(c => c.DiskLabel, o => o.MapFrom(r => r.Label)) + .ForMember(c => c.OS, o => o.MapFrom(r => r.OperatingSystem)); + Mapper.CreateMap(); + Mapper.CreateMap(); + + Mapper.CreateMap(); + Mapper.CreateMap(); + Mapper.CreateMap(); + Mapper.CreateMap() + .ForMember(c => c.UserPassword, o => o.MapFrom(r => SecureStringHelper.GetSecureString(r.UserPassword))) + .ForMember(c => c.SSH, o => o.MapFrom(r => r.SshSettings)); + Mapper.CreateMap() + .ForMember(c => c.AdminPassword, o => o.MapFrom(r => SecureStringHelper.GetSecureString(r.AdminPassword))); + Mapper.CreateMap() + .ForMember(c => c.Vip, o => o.MapFrom(r => r.VirtualIPAddress != null ? r.VirtualIPAddress.ToString() : null)) + .ForMember(c => c.PublicPort, o => o.MapFrom(r => r.Port)); + + Mapper.CreateMap(); + Mapper.CreateMap() + .ForMember(c => c.Protocol, o => o.MapFrom(r => r.ListenerType.ToString())); + Mapper.CreateMap, PVM.WindowsProvisioningConfigurationSet.WinRmListenerCollection>(); + + // LoadBalancedEndpointList mapping + Mapper.CreateMap(); + Mapper.CreateMap(); + Mapper.CreateMap() + .ForMember(c => c.Rules, o => o.MapFrom(r => r.EndpointAccessControlList == null ? null : r.EndpointAccessControlList.Rules)) + .ForMember(c => c.VirtualIPAddress, o => o.MapFrom(r => r.Vip)); + + Mapper.CreateMap(); + Mapper.CreateMap(); + Mapper.CreateMap() + .ForMember(c => c.EndpointAccessControlList, o => o.MapFrom(r => r.Rules == null ? null : r.Rules)) + .ForMember(c => c.Vip, o => o.MapFrom(r => r.VirtualIPAddress)); + + //Common mapping + Mapper.CreateMap() + .ForMember(c => c.OperationId, o => o.MapFrom(r => r.RequestId)) + .ForMember(c => c.OperationStatus, o => o.MapFrom(r => r.StatusCode.ToString())); + + Mapper.CreateMap() + .ForMember(c => c.OperationId, o => o.MapFrom(r => r.Id)) + .ForMember(c => c.OperationStatus, o => o.MapFrom(r => r.Status.ToString())); + + //AffinityGroup mapping + Mapper.CreateMap() + .ForMember(c => c.VirtualMachineRoleSizes, o => o.MapFrom(r => r.ComputeCapabilities == null ? null : r.ComputeCapabilities.VirtualMachinesRoleSizes)) + .ForMember(c => c.WebWorkerRoleSizes, o => o.MapFrom(r => r.ComputeCapabilities == null ? null : r.ComputeCapabilities.WebWorkerRoleSizes)); + Mapper.CreateMap() + .ForMember(c => c.VirtualMachineRoleSizes, o => o.MapFrom(r => r.ComputeCapabilities == null ? null : r.ComputeCapabilities.VirtualMachinesRoleSizes)) + .ForMember(c => c.WebWorkerRoleSizes, o => o.MapFrom(r => r.ComputeCapabilities == null ? null : r.ComputeCapabilities.WebWorkerRoleSizes)); + Mapper.CreateMap() + .ForMember(c => c.Url, o => o.MapFrom(r => r.Uri)); + Mapper.CreateMap() + .ForMember(c => c.Url, o => o.MapFrom(r => r.Uri)); + Mapper.CreateMap() + .ForMember(c => c.OperationId, o => o.MapFrom(r => r.Id)) + .ForMember(c => c.OperationStatus, o => o.MapFrom(r => r.Status.ToString())); + + //Location mapping + Mapper.CreateMap() + .ForMember(c => c.VirtualMachineRoleSizes, o => o.MapFrom(r => r.ComputeCapabilities == null ? null : r.ComputeCapabilities.VirtualMachinesRoleSizes)) + .ForMember(c => c.WebWorkerRoleSizes, o => o.MapFrom(r => r.ComputeCapabilities == null ? null : r.ComputeCapabilities.WebWorkerRoleSizes)) + .ForMember(c => c.StorageAccountTypes, o => o.MapFrom(r => r.StorageCapabilities == null ? null : r.StorageCapabilities.StorageAccountTypes)); + Mapper.CreateMap() + .ForMember(c => c.OperationId, o => o.MapFrom(r => r.Id)) + .ForMember(c => c.OperationStatus, o => o.MapFrom(r => r.Status.ToString())); + + //Role sizes mapping + Mapper.CreateMap() + .ForMember(c => c.InstanceSize, o => o.MapFrom(r => r.Name)) + .ForMember(c => c.RoleSizeLabel, o => o.MapFrom(r => r.Label)); + Mapper.CreateMap() + .ForMember(c => c.OperationId, o => o.MapFrom(r => r.Id)) + .ForMember(c => c.OperationStatus, o => o.MapFrom(r => r.Status.ToString())); + + //ServiceCertificate mapping + Mapper.CreateMap() + .ForMember(c => c.Data, o => o.MapFrom(r => r.Data != null ? Convert.ToBase64String(r.Data) : null)); + Mapper.CreateMap() + .ForMember(c => c.Url, o => o.MapFrom(r => r.CertificateUri)) + .ForMember(c => c.Data, o => o.MapFrom(r => r.Data != null ? Convert.ToBase64String(r.Data) : null)); + Mapper.CreateMap() + .ForMember(c => c.OperationId, o => o.MapFrom(r => r.Id)) + .ForMember(c => c.OperationStatus, o => o.MapFrom(r => r.Status.ToString())); + Mapper.CreateMap() + .ForMember(c => c.OperationId, o => o.MapFrom(r => r.Id)) + .ForMember(c => c.OperationStatus, o => o.MapFrom(r => r.Status.ToString())); + + //OperatingSystems mapping + Mapper.CreateMap(); + Mapper.CreateMap() + .ForMember(c => c.OperationId, o => o.MapFrom(r => r.Id)) + .ForMember(c => c.OperationStatus, o => o.MapFrom(r => r.Status.ToString())); + + //Service mapping + Mapper.CreateMap() + .ForMember(c => c.Description, o => o.MapFrom(r => string.IsNullOrEmpty(r.Description) ? null : r.Description)) + .ForMember(c => c.DateModified, o => o.MapFrom(r => r.DateLastModified)); + Mapper.CreateMap() + .ForMember(c => c.ExtendedProperties, o => o.MapFrom(r => r.Properties == null ? null : r.Properties.ExtendedProperties)) + .ForMember(c => c.VirtualMachineRoleSizes, o => o.MapFrom(r => r.ComputeCapabilities == null ? null : r.ComputeCapabilities.VirtualMachinesRoleSizes)) + .ForMember(c => c.WebWorkerRoleSizes, o => o.MapFrom(r => r.ComputeCapabilities == null ? null : r.ComputeCapabilities.WebWorkerRoleSizes)) + .ForMember(c => c.Url, o => o.MapFrom(r => r.Uri)); + Mapper.CreateMap() + .ForMember(c => c.ExtendedProperties, o => o.MapFrom(r => r.Properties == null ? null : r.Properties.ExtendedProperties)) + .ForMember(c => c.VirtualMachineRoleSizes, o => o.MapFrom(r => r.ComputeCapabilities == null ? null : r.ComputeCapabilities.VirtualMachinesRoleSizes)) + .ForMember(c => c.WebWorkerRoleSizes, o => o.MapFrom(r => r.ComputeCapabilities == null ? null : r.ComputeCapabilities.WebWorkerRoleSizes)) + .ForMember(c => c.Url, o => o.MapFrom(r => r.Uri)); + Mapper.CreateMap() + .ForMember(c => c.OperationId, o => o.MapFrom(r => r.Id)) + .ForMember(c => c.OperationStatus, o => o.MapFrom(r => r.Status.ToString())); + + //Disk mapping + Mapper.CreateMap() + .ForMember(c => c.MediaLink, o => o.MapFrom(r => r.MediaLinkUri)) + .ForMember(c => c.DiskSizeInGB, o => o.MapFrom(r => r.LogicalSizeInGB)) + .ForMember(c => c.OS, o => o.MapFrom(r => r.OperatingSystemType)) + .ForMember(c => c.DiskName, o => o.MapFrom(r => r.Name)) + .ForMember(c => c.AttachedTo, o => o.MapFrom(r => r.UsageDetails)); + Mapper.CreateMap(); + + Mapper.CreateMap() + .ForMember(c => c.AttachedTo, o => o.MapFrom(r => r.UsageDetails)) + .ForMember(c => c.DiskName, o => o.MapFrom(r => r.Name)) + .ForMember(c => c.DiskSizeInGB, o => o.MapFrom(r => r.LogicalSizeInGB)) + .ForMember(c => c.IsCorrupted, o => o.MapFrom(r => r.IsCorrupted)) + .ForMember(c => c.MediaLink, o => o.MapFrom(r => r.MediaLinkUri)) + .ForMember(c => c.OS, o => o.MapFrom(r => r.OperatingSystemType)); + Mapper.CreateMap(); + + Mapper.CreateMap() + .ForMember(c => c.DiskName, o => o.MapFrom(r => r.Name)) + .ForMember(c => c.OS, o => o.MapFrom(r => r.OperatingSystem)) + .ForMember(c => c.MediaLink, o => o.MapFrom(r => r.MediaLinkUri)) + .ForMember(c => c.DiskSizeInGB, o => o.MapFrom(r => r.LogicalSizeInGB)) + .ForMember(c => c.AttachedTo, o => o.MapFrom(r => r.UsageDetails)); + Mapper.CreateMap(); + + Mapper.CreateMap() + .ForMember(c => c.DiskName, o => o.MapFrom(r => r.Name)) + .ForMember(c => c.MediaLink, o => o.MapFrom(r => r.MediaLinkUri)) + .ForMember(c => c.DiskSizeInGB, o => o.MapFrom(r => r.LogicalSizeInGB)); + + Mapper.CreateMap() + .ForMember(c => c.OperationId, o => o.MapFrom(r => r.Id)) + .ForMember(c => c.OperationStatus, o => o.MapFrom(r => r.Status.ToString())); + + //Storage mapping + Mapper.CreateMap() + .ForMember(c => c.StorageAccountDescription, o => o.MapFrom(r => r.StorageAccount.Properties == null ? null : r.StorageAccount.Properties.Description)) + .ForMember(c => c.StorageAccountName, o => o.MapFrom(r => r.StorageAccount.Name)) + .ForMember(c => c.GeoReplicationEnabled, o => o.MapFrom(r => string.Equals(r.StorageAccount.Properties.AccountType, StorageAccountTypes.StandardGRS) ? (bool?)true : null)); + Mapper.CreateMap() + .ForMember(c => c.StorageAccountDescription, o => o.MapFrom(r => r.Description)) + .ForMember(c => c.GeoPrimaryLocation, o => o.MapFrom(r => r.GeoPrimaryRegion)) + .ForMember(c => c.GeoSecondaryLocation, o => o.MapFrom(r => r.GeoSecondaryRegion)) + .ForMember(c => c.StorageAccountStatus, o => o.MapFrom(r => r.Status)) + .ForMember(c => c.StatusOfPrimary, o => o.MapFrom(r => r.StatusOfGeoPrimaryRegion)) + .ForMember(c => c.StatusOfSecondary, o => o.MapFrom(r => r.StatusOfGeoSecondaryRegion)) + .ForMember(c => c.GeoReplicationEnabled, o => o.MapFrom(r => string.Equals(r.AccountType, StorageAccountTypes.StandardGRS) ? (bool?)true : null)); + Mapper.CreateMap() + .ForMember(c => c.StorageAccountDescription, o => o.MapFrom(r => r.Properties == null ? null : r.Properties.Description)) + .ForMember(c => c.StorageAccountName, o => o.MapFrom(r => r.Name)) + .ForMember(c => c.GeoReplicationEnabled, o => o.MapFrom(r => string.Equals(r.Properties.AccountType, StorageAccountTypes.StandardGRS) ? (bool?)true : null)); + Mapper.CreateMap() + .ForMember(c => c.OperationId, o => o.MapFrom(r => r.Id)) + .ForMember(c => c.OperationStatus, o => o.MapFrom(r => r.Status.ToString())); + + Mapper.CreateMap() + .ForMember(c => c.Primary, o => o.MapFrom(r => r.PrimaryKey)) + .ForMember(c => c.Secondary, o => o.MapFrom(r => r.SecondaryKey)); + Mapper.CreateMap() + .ForMember(c => c.OperationId, o => o.MapFrom(r => r.Id)) + .ForMember(c => c.OperationStatus, o => o.MapFrom(r => r.Status.ToString())); + + Mapper.CreateMap() + .ForMember(c => c.OperationId, o => o.MapFrom(r => r.Id)) + .ForMember(c => c.OperationStatus, o => o.MapFrom(r => r.Status.ToString())); + + // DomainJoinSettings mapping for IaaS + Mapper.CreateMap() + .ForMember(c => c.Domain, o => o.MapFrom(r => r.Domain)) + .ForMember(c => c.Username, o => o.MapFrom(r => r.UserName)) + .ForMember(c => c.Password, o => o.MapFrom(r => SecureStringHelper.GetSecureString(r.Password))); + Mapper.CreateMap() + .ForMember(c => c.AccountData, o => o.MapFrom(r => r.AccountData)); + Mapper.CreateMap() + .ForMember(c => c.Credentials, o => o.MapFrom(r => r.Credentials)) + .ForMember(c => c.JoinDomain, o => o.MapFrom(r => r.DomainToJoin)) + .ForMember(c => c.MachineObjectOU, o => o.MapFrom(r => r.LdapMachineObjectOU)) + .ForMember(c => c.Provisioning, o => o.MapFrom(r => r.Provisioning)); + + Mapper.CreateMap() + .ForMember(c => c.Domain, o => o.MapFrom(r => r.Domain)) + .ForMember(c => c.UserName, o => o.MapFrom(r => r.Username)) + .ForMember(c => c.Password, o => o.MapFrom(r => r.Password.ConvertToUnsecureString())); + Mapper.CreateMap() + .ForMember(c => c.AccountData, o => o.MapFrom(r => r.AccountData)); + Mapper.CreateMap() + .ForMember(c => c.Credentials, o => o.MapFrom(r => r.Credentials)) + .ForMember(c => c.DomainToJoin, o => o.MapFrom(r => r.JoinDomain)) + .ForMember(c => c.LdapMachineObjectOU, o => o.MapFrom(r => r.MachineObjectOU)) + .ForMember(c => c.Provisioning, o => o.MapFrom(r => r.Provisioning)); + + // Networks mapping + Mapper.CreateMap, PVM.AddressPrefixList>() + .ForItems, PVM.AddressPrefixList, string>(); + Mapper.CreateMap(); + Mapper.CreateMap(); + Mapper.CreateMap(); + Mapper.CreateMap, PVM.LocalNetworkSiteList>() + .ForItems, PVM.LocalNetworkSiteList, PVM.LocalNetworkSite>(); + Mapper.CreateMap(); + Mapper.CreateMap, PVM.DnsServerList>() + .ForItems, PVM.DnsServerList, PVM.DnsServer>(); + Mapper.CreateMap(); + Mapper.CreateMap, PVM.SubnetList>() + .ForItems, PVM.SubnetList, PVM.Subnet>(); + Mapper.CreateMap, PVM.DnsSettings>() + .ForMember(c => c.DnsServers, o => o.MapFrom(r => r)); + Mapper.CreateMap, PVM.Gateway>(); + Mapper.CreateMap(); + Mapper.CreateMap, PVM.VirtualNetworkSiteList>() + .ForItems, PVM.VirtualNetworkSiteList, PVM.VirtualNetworkSite>(); + Mapper.CreateMap() + .ForMember(c => c.AddressSpacePrefixes, o => o.MapFrom(r => r.AddressSpace == null ? null : r.AddressSpace.AddressPrefixes == null ? null : + r.AddressSpace.AddressPrefixes.Select(p => p))) + .ForMember(c => c.DnsServers, o => o.MapFrom(r => r.DnsServers.AsEnumerable())) + .ForMember(c => c.GatewayProfile, o => o.MapFrom(r => r.Gateway.Profile)) + .ForMember(c => c.GatewaySites, o => o.MapFrom(r => r.Gateway.Sites)); + Mapper.CreateMap() + .ForMember(c => c.OperationId, o => o.MapFrom(r => r.Id)) + .ForMember(c => c.OperationStatus, o => o.MapFrom(r => r.Status.ToString())) + .ForMember(c => c.Id, o => o.Ignore()); + + // Check Static IP Availability Response Mapping + Mapper.CreateMap(); + Mapper.CreateMap() + .ForMember(c => c.OperationId, o => o.MapFrom(r => r.Id)) + .ForMember(c => c.OperationStatus, o => o.MapFrom(r => r.Status.ToString())); + + // New SM to Model + Mapper.CreateMap(); + Mapper.CreateMap, PVM.CertificateSettingList>() + .ForItems, PVM.CertificateSettingList, PVM.CertificateSetting>(); + + // Model to New SM + Mapper.CreateMap(); + Mapper.CreateMap>() + .ForItems, NSM.StoredCertificateSettings>(); + + // Resource Extensions + Mapper.CreateMap() + .ForMember(c => c.SecureValue, o => o.MapFrom(r => SecureStringHelper.GetSecureString(r))) + .ForMember(c => c.Value, o => o.MapFrom(r => SecureStringHelper.GetPlainString(r))); + Mapper.CreateMap(); + + Mapper.CreateMap() + .ForMember(c => c.Value, o => o.MapFrom(r => SecureStringHelper.GetPlainString(r))); + Mapper.CreateMap(); + + // Reserved IP + Mapper.CreateMap() + .ForMember(c => c.OperationId, o => o.MapFrom(r => r.Id)) + .ForMember(c => c.OperationStatus, o => o.MapFrom(r => r.Status.ToString())) + .ForMember(c => c.Id, o => o.Ignore()); + Mapper.CreateMap() + .ForMember(c => c.ReservedIPName, o => o.MapFrom(r => r.Name)); + Mapper.CreateMap() + .ForMember(c => c.ReservedIPName, o => o.MapFrom(r => r.Name)); + + // Public IP + Mapper.CreateMap(); + Mapper.CreateMap(); + + Mapper.CreateMap(); + Mapper.CreateMap(); + + // NetworkInterface + Mapper.CreateMap(); + Mapper.CreateMap(); + Mapper.CreateMap(); + Mapper.CreateMap(); + + Mapper.CreateMap(); + Mapper.CreateMap(); + Mapper.CreateMap(); + Mapper.CreateMap(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/AddAzureVhdCommand.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/AddAzureVhdCommand.cs new file mode 100644 index 000000000000..959d92f44c4b --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/AddAzureVhdCommand.cs @@ -0,0 +1,140 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Sync.Download; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.StorageServices +{ + /// + /// Uploads a vhd as fixed disk format vhd to a blob in Microsoft Azure Storage + /// + [Cmdlet(VerbsCommon.Add, "AzureVhd"), OutputType(typeof(VhdUploadContext))] + public class AddAzureVhdCommand : ServiceManagementBaseCmdlet + { + private const int DefaultNumberOfUploaderThreads = 8; + + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName="Vhd", HelpMessage = "Uri to blob")] + [ValidateNotNullOrEmpty] + [Alias("dst")] + public Uri Destination + { + get; + set; + } + + [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName="Vhd", HelpMessage = "Local path of the vhd file")] + [ValidateNotNullOrEmpty] + [Alias("lf")] + public FileInfo LocalFilePath + { + get; + set; + } + + private int numberOfUploaderThreads = DefaultNumberOfUploaderThreads; + + [Parameter(Position = 3, Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = "Vhd", HelpMessage = "Number of uploader threads")] + [ValidateNotNullOrEmpty] + [ValidateRange(1, 64)] + [Alias("th")] + public int NumberOfUploaderThreads + { + get { return this.numberOfUploaderThreads; } + set { this.numberOfUploaderThreads = value; } + } + + [Parameter(Position = 4, Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName="Vhd", HelpMessage = "Uri to a base image in a blob storage account to apply the difference")] + [ValidateNotNullOrEmpty] + [Alias("bs")] + public Uri BaseImageUriToPatch + { + get; + set; + } + + [Parameter(Position = 5, Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName="Vhd", HelpMessage = "Delete the blob if already exists")] + [ValidateNotNullOrEmpty] + [Alias("o")] + public SwitchParameter OverWrite + { + get; + set; + } + + public UploadParameters ValidateParameters() + { + BlobUri destinationUri; + if (!BlobUri.TryParseUri(Destination, out destinationUri)) + { + throw new ArgumentOutOfRangeException("Destination", this.Destination.ToString()); + } + + BlobUri baseImageUri = null; + if (this.BaseImageUriToPatch != null) + { + if (!BlobUri.TryParseUri(BaseImageUriToPatch, out baseImageUri)) + { + throw new ArgumentOutOfRangeException("BaseImageUriToPatch", this.BaseImageUriToPatch.ToString()); + } + + if (!String.IsNullOrEmpty(destinationUri.Uri.Query)) + { + var message = String.Format(Resources.AddAzureVhdCommandSASUriNotSupportedInPatchMode, destinationUri.Uri); + throw new ArgumentOutOfRangeException("Destination", message); + } + } + + var storageCredentialsFactory = CreateStorageCredentialsFactory(); + + PathIntrinsics currentPath = SessionState.Path; + var filePath = new FileInfo(currentPath.GetUnresolvedProviderPathFromPSPath(LocalFilePath.ToString())); + + var parameters = new UploadParameters(destinationUri, baseImageUri, filePath, OverWrite.IsPresent, NumberOfUploaderThreads) + { + Cmdlet = this, + BlobObjectFactory = new CloudPageBlobObjectFactory(storageCredentialsFactory, TimeSpan.FromMinutes(1)) + }; + + return parameters; + } + + private StorageCredentialsFactory CreateStorageCredentialsFactory() + { + StorageCredentialsFactory storageCredentialsFactory; + if (StorageCredentialsFactory.IsChannelRequired(Destination)) + { + storageCredentialsFactory = new StorageCredentialsFactory(this.StorageClient, this.CurrentContext.Subscription); + } + else + { + storageCredentialsFactory = new StorageCredentialsFactory(); + } + + return storageCredentialsFactory; + } + + protected override void OnProcessRecord() + { + var parameters = ValidateParameters(); + var vhdUploadContext = VhdUploaderModel.Upload(parameters); + WriteObject(vhdUploadContext); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/CloudPageBlobObjectFactory.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/CloudPageBlobObjectFactory.cs new file mode 100644 index 000000000000..a6dcbe2d79ef --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/CloudPageBlobObjectFactory.cs @@ -0,0 +1,61 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using Microsoft.WindowsAzure.Commands.Sync.Download; +using Microsoft.WindowsAzure.Commands.Sync.Upload; +using Microsoft.WindowsAzure.Storage.Blob; +using Microsoft.WindowsAzure.Storage.RetryPolicies; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.StorageServices +{ + public class CloudPageBlobObjectFactory : ICloudPageBlobObjectFactory + { + private readonly TimeSpan delayBetweenRetries = TimeSpan.FromSeconds(10); + private readonly StorageCredentialsFactory credentialsFactory; + private TimeSpan operationTimeout; + + + public CloudPageBlobObjectFactory(StorageCredentialsFactory credentialsFactory, TimeSpan operationTimeout) + { + this.credentialsFactory = credentialsFactory; + this.operationTimeout = operationTimeout; + } + + public CloudPageBlob Create(BlobUri destination) + { + return new CloudPageBlob(new Uri(destination.BlobPath), credentialsFactory.Create(destination)); + } + + public bool CreateContainer(BlobUri destination) + { + if (String.IsNullOrEmpty(destination.Uri.Query)) + { + var destinationBlob = Create(destination); + return destinationBlob.Container.CreateIfNotExists(this.CreateRequestOptions()); + } + return true; + } + + public BlobRequestOptions CreateRequestOptions() + { + return new BlobRequestOptions + { + ServerTimeout = this.operationTimeout, + RetryPolicy = new LinearRetry(delayBetweenRetries, 5) + }; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/GetAzureStorageAccount.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/GetAzureStorageAccount.cs new file mode 100644 index 000000000000..a8c448153127 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/GetAzureStorageAccount.cs @@ -0,0 +1,74 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; +using AutoMapper; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Storage.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.StorageServices +{ + /// + /// Lists all storage services underneath the subscription. + /// + [Cmdlet(VerbsCommon.Get, "AzureStorageAccount"), OutputType(typeof(StorageServicePropertiesOperationContext))] + public class GetAzureStorageAccountCommand : ServiceManagementBaseCmdlet + { + [Parameter(Position = 0, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Storage Account Name.")] + [ValidateNotNullOrEmpty] + public string StorageAccountName + { + get; + set; + } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + + if (!string.IsNullOrEmpty(this.StorageAccountName)) + { + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.StorageClient.StorageAccounts.Get(this.StorageAccountName), + (s, response) => + { + var context = ContextFactory(response, s); + Mapper.Map(response.StorageAccount.Properties, context); + return context; + }); + } + else + { + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.StorageClient.StorageAccounts.List(), + (s, storageServices) => + storageServices.StorageAccounts.Select(r => + { + var context = ContextFactory(r, s); + Mapper.Map(r.Properties, context); + return context; + })); + } + + WriteWarning(Resources.DeprecationOfTheGeoReplicationEnabledParamInTheGetCmdlet); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/GetAzureStorageKey.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/GetAzureStorageKey.cs new file mode 100644 index 000000000000..966b1a6fb493 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/GetAzureStorageKey.cs @@ -0,0 +1,54 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Storage.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.StorageServices +{ + /// + /// Displays the primary and secondary keys for the account. Should have + /// the storage account resource specified. + /// + [Cmdlet(VerbsCommon.Get, "AzureStorageKey"), OutputType(typeof(StorageServiceKeyOperationContext))] + public class GetAzureStorageKeyCommand : ServiceManagementBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Service name.")] + [ValidateNotNullOrEmpty] + [Alias("ServiceName")] + public string StorageAccountName + { + get; + set; + } + + protected override void OnProcessRecord() + { + ServiceManagementProfile.Initialize(); + + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.StorageClient.StorageAccounts.GetKeys(this.StorageAccountName), + (s, response) => + { + var context = ContextFactory(response, s); + ((StorageServiceKeyOperationContext) context).StorageAccountName = this.StorageAccountName; + return context; + }); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/NewAzureStorageAccount.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/NewAzureStorageAccount.cs new file mode 100644 index 000000000000..a86c86a75744 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/NewAzureStorageAccount.cs @@ -0,0 +1,104 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Storage.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.StorageServices +{ + /// + /// Creates a new storage account in Microsoft Azure. + /// + [Cmdlet(VerbsCommon.New, "AzureStorageAccount", DefaultParameterSetName = "ParameterSetAffinityGroup"), OutputType(typeof(ManagementOperationContext))] + public class NewAzureStorageAccountCommand : ServiceManagementBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "A name for the storage account that is unique to the subscription. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.")] + [ValidateNotNullOrEmpty] + [Alias("ServiceName")] + public string StorageAccountName + { + get; + set; + } + + [Parameter(ValueFromPipelineByPropertyName = true, HelpMessage = "Label for the storage account.")] + [ValidateNotNullOrEmpty] + public string Label + { + get; + set; + } + + [Parameter(ValueFromPipelineByPropertyName = true, HelpMessage = "A description for the storage account.")] + [ValidateNotNullOrEmpty] + public string Description + { + get; + set; + } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = "ParameterSetAffinityGroup", + HelpMessage = "Required if Location is not specified. The name of an existing affinity group in the specified subscription.")] + [ValidateNotNullOrEmpty] + public string AffinityGroup + { + get; + set; + } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = "ParameterSetLocation", + HelpMessage = "Required if AffinityGroup is not specified. The location where the storage account is created.")] + [ValidateNotNullOrEmpty] + public string Location + { + get; + set; + } + + [Parameter(HelpMessage = "Type of the storage account.")] + [ValidateNotNullOrEmpty] + public string Type + { + get; + set; + } + + internal void ExecuteCommand() + { + ServiceManagementProfile.Initialize(); + + var parameters = new StorageAccountCreateParameters + { + Name = this.StorageAccountName, + Label = this.Label, + Description = this.Description, + AffinityGroup = this.AffinityGroup, + Location = this.Location, + AccountType = string.IsNullOrEmpty(this.Type) ? StorageAccountTypes.StandardGRS : this.Type + }; + + ExecuteClientActionNewSM( + parameters, + CommandRuntime.ToString(), + () => this.StorageClient.StorageAccounts.Create(parameters)); + } + + protected override void OnProcessRecord() + { + this.ExecuteCommand(); + } + + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/NewAzureStorageKey.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/NewAzureStorageKey.cs new file mode 100644 index 000000000000..4788a85c3893 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/NewAzureStorageKey.cs @@ -0,0 +1,73 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Storage.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.StorageServices +{ + /// + /// Regenerates storage keys with the key-type parameter specifying + /// which key to regenerate. Should have the storage account resource specified. + /// + [Cmdlet(VerbsCommon.New, "AzureStorageKey"), OutputType(typeof(StorageServiceKeyOperationContext))] + public class NewAzureStorageKeyCommand : ServiceManagementBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Key to regenerate. Primary | Secondary")] + [ValidateSet("Primary", "Secondary", IgnoreCase = true)] + public string KeyType + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Service name.")] + [ValidateNotNullOrEmpty] + [Alias("ServiceName")] + public string StorageAccountName + { + get; + set; + } + + protected override void OnProcessRecord() + { + var regenerateKeys = new StorageAccountRegenerateKeysParameters + { + Name = this.StorageAccountName, + KeyType = string.IsNullOrEmpty(this.KeyType) ? StorageKeyType.Primary : (StorageKeyType)Enum.Parse(typeof(StorageKeyType), this.KeyType, true) + }; + + ExecuteClientActionNewSM( + regenerateKeys, + this.CommandRuntime.ToString(), + () => this.StorageClient.StorageAccounts.RegenerateKeys(regenerateKeys), + (s, r) => + { + return new StorageServiceKeyOperationContext + { + StorageAccountName = this.StorageAccountName, + Primary = r.PrimaryKey, + Secondary = r.SecondaryKey, + OperationDescription = this.CommandRuntime.ToString(), + OperationId = s.Id, + OperationStatus = s.Status.ToString() + }; + }); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/RemoveAzureStorageAccount.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/RemoveAzureStorageAccount.cs new file mode 100644 index 000000000000..19b105be0b65 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/RemoveAzureStorageAccount.cs @@ -0,0 +1,75 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.StorageServices +{ + /// + /// Deletes the specified storage account from Microsoft Azure. + /// + [Cmdlet(VerbsCommon.Remove, "AzureStorageAccount"), OutputType(typeof(StorageServiceOperationContext))] + public class RemoveAzureStorageAccountCommand : ServiceManagementBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the storage account to be removed.")] + [ValidateNotNullOrEmpty] + [Alias("ServiceName")] + public string StorageAccountName + { + get; + set; + } + + public string RemoveStorageAccountProcess() + { + var operationId = string.Empty; + + ExecuteClientActionNewSM( + null, + CommandRuntime.ToString(), + () => this.StorageClient.StorageAccounts.Delete(this.StorageAccountName), + (s, r) => + { + return new StorageServiceOperationContext + { + OperationId = s.Id, + OperationStatus = s.Status.ToString(), + OperationDescription = CommandRuntime.ToString(), + StorageAccountName = this.StorageAccountName + }; + }); + + return operationId; + } + + protected override void OnProcessRecord() + { + var operationId = this.RemoveStorageAccountProcess(); + + if (!string.IsNullOrEmpty(operationId)) + { + var ctx = new StorageServiceOperationContext() + { + StorageAccountName = this.StorageAccountName, + OperationId = operationId + }; + + WriteObject(ctx, true); + } + } + + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/SaveAzureVhdCommand.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/SaveAzureVhdCommand.cs new file mode 100644 index 000000000000..0e5cf34605c5 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/SaveAzureVhdCommand.cs @@ -0,0 +1,110 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Sync.Download; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.StorageServices +{ + [Cmdlet(VerbsData.Save, "AzureVhd"), OutputType(typeof (VhdDownloadContext))] + public class SaveAzureVhdCommand : ServiceManagementBaseCmdlet + { + private const int DefaultNumberOfUploaderThreads = 8; + + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = "Vhd", HelpMessage = "Uri to blob")] + [ValidateNotNullOrEmpty] + [Alias("src")] + public Uri Source + { + get; + set; + } + + [Parameter(Position = 2, Mandatory = true, ParameterSetName = "Vhd", HelpMessage = "Local path of the vhd file")] + [ValidateNotNullOrEmpty] + [Alias("lf")] + public FileInfo LocalFilePath + { + get; + set; + } + + private int numberOfThreads = DefaultNumberOfUploaderThreads; + + [Parameter(Position = 3, Mandatory = false, ParameterSetName = "Vhd", HelpMessage = "Number of downloader threads")] + [ValidateNotNullOrEmpty] + [ValidateRange(1, 64)] + [Alias("th")] + public int NumberOfThreads + { + get { return this.numberOfThreads; } + set { this.numberOfThreads = value; } + } + + [Parameter(Position = 4, Mandatory = false, ParameterSetName = "Vhd", HelpMessage = "Key of the storage account")] + [ValidateNotNullOrEmpty] + [Alias("sk")] + public string StorageKey + { + get; + set; + } + + [Parameter(Position = 5, Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = "Vhd", HelpMessage = "Delete the local file if already exists")] + [ValidateNotNullOrEmpty] + [Alias("o")] + public SwitchParameter OverWrite + { + get; + set; + } + + protected override void OnProcessRecord() + { + BlobUri blobUri; + if(!BlobUri.TryParseUri(Source, out blobUri)) + { + throw new ArgumentOutOfRangeException("Source", Source.ToString()); + } + + var storageKey = this.StorageKey; + if(this.StorageKey == null) + { + var storageService = this.StorageClient.StorageAccounts.Get(blobUri.StorageAccountName); + if (storageService != null) + { + var storageKeys = this.StorageClient.StorageAccounts.GetKeys(storageService.StorageAccount.Name); + storageKey = storageKeys.PrimaryKey; + } + } + + var downloaderParameters = new DownloaderParameters + { + BlobUri = blobUri, + LocalFilePath = LocalFilePath.FullName, + ConnectionLimit = NumberOfThreads, + StorageAccountKey = storageKey, + ValidateFreeDiskSpace = true, + OverWrite = OverWrite + }; + + var vhdDownloadContext = VhdDownloaderModel.Download(downloaderParameters, this); + WriteObject(vhdDownloadContext); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/SetAzureStorageAccount.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/SetAzureStorageAccount.cs new file mode 100644 index 000000000000..24a8ef4e0e6e --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/SetAzureStorageAccount.cs @@ -0,0 +1,105 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Storage.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.StorageServices +{ + /// + /// Updates the label and/or the description for a storage account in Microsoft Azure. + /// + [Cmdlet(VerbsCommon.Set, "AzureStorageAccount", DefaultParameterSetName = GeoReplicationEnabledParamSet), OutputType(typeof(ManagementOperationContext))] + public class SetAzureStorageAccountCommand : ServiceManagementBaseCmdlet + { + protected const string AccountTypeParamSet = "AccountType"; + protected const string GeoReplicationEnabledParamSet = "GeoReplicationEnabled"; + + /// + /// The name for the storage account. (Required) + /// + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Name of the storage account.")] + [ValidateNotNullOrEmpty] + [Alias("ServiceName")] + public string StorageAccountName + { + get; + set; + } + + /// + /// A label for the storage account. The label may be up to 100 characters in length. + /// + [Parameter(HelpMessage = "Label of the storage account.")] + [ValidateLength(0, 100)] + public string Label + { + get; + set; + } + + /// + /// A description for the storage account. The description may be up to 1024 characters in length. + /// + [Parameter(HelpMessage = "Description of the storage account.")] + [ValidateLength(0, 1024)] + public string Description + { + get; + set; + } + + [Parameter(ParameterSetName = GeoReplicationEnabledParamSet, HelpMessage = "Enable or Disable Geo Replication")] + public bool? GeoReplicationEnabled + { + get; + set; + } + + [Parameter(ParameterSetName = AccountTypeParamSet, HelpMessage = "Type of the storage account.")] + [ValidateNotNullOrEmpty] + public string Type + { + get; + set; + } + + public void SetStorageAccountProcess() + { + if (string.Equals(this.ParameterSetName, GeoReplicationEnabledParamSet)) + { + WriteWarning(Resources.DeprecationOfTheGeoReplicationEnabledParamInTheSetCmdlet); + } + + var upstorageinput = new StorageAccountUpdateParameters + { + AccountType = GeoReplicationEnabled.HasValue && GeoReplicationEnabled.Value ? StorageAccountTypes.StandardGRS : this.Type, + Description = this.Description, + Label = this.Label + }; + + ExecuteClientActionNewSM( + upstorageinput, + CommandRuntime.ToString(), + () => this.StorageClient.StorageAccounts.Update(this.StorageAccountName, upstorageinput)); + } + + protected override void OnProcessRecord() + { + this.SetStorageAccountProcess(); + } + } +} diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/StorageCredentialsFactory.cs b/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/StorageCredentialsFactory.cs new file mode 100644 index 000000000000..8b989e796b39 --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/StorageServices/StorageCredentialsFactory.cs @@ -0,0 +1,60 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Properties; +using Microsoft.WindowsAzure.Commands.Sync.Download; +using Microsoft.WindowsAzure.Management.Storage; +using Microsoft.WindowsAzure.Storage.Auth; + +namespace Microsoft.WindowsAzure.Commands.ServiceManagement.StorageServices +{ + public class StorageCredentialsFactory + { + private StorageManagementClient client; + private AzureSubscription currentSubscription; + + public static bool IsChannelRequired(Uri destination) + { + return String.IsNullOrEmpty(destination.Query); + } + + public StorageCredentialsFactory() + { + } + + public StorageCredentialsFactory(StorageManagementClient client, AzureSubscription currentSubscription) + { + this.client = client; + this.currentSubscription = currentSubscription; + } + + public StorageCredentials Create(BlobUri destination) + { + if (IsChannelRequired(destination.Uri)) + { + if(currentSubscription == null) + { + throw new ArgumentException(Resources.StorageCredentialsFactoryCurrentSubscriptionNotSet, "SubscriptionId"); + } + + var storageKeys = this.client.StorageAccounts.GetKeys(destination.StorageAccountName); + return new StorageCredentials(destination.StorageAccountName, storageKeys.PrimaryKey); + } + + return new StorageCredentials(destination.Uri.Query); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Commands.ServiceManagement/packages.config b/src/ServiceManagement/Compute/Commands.ServiceManagement/packages.config new file mode 100644 index 000000000000..60e40c1d9cac --- /dev/null +++ b/src/ServiceManagement/Compute/Commands.ServiceManagement/packages.config @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Sync/ComputeStats.cs b/src/ServiceManagement/Compute/Sync/ComputeStats.cs new file mode 100644 index 000000000000..f11712505458 --- /dev/null +++ b/src/ServiceManagement/Compute/Sync/ComputeStats.cs @@ -0,0 +1,51 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; + +namespace Microsoft.WindowsAzure.Commands.Sync +{ + public class ComputeStats + { + IList history; + int historySize; + + public ComputeStats() : this(60) + { + } + + public ComputeStats(int historySize) + { + history = new List(historySize); + this.historySize = historySize; + } + + public double ComputeAvg(double current) + { + if (history.Count > historySize) + { + history.RemoveAt(0); + } + history.Add(current); + double sum = 0.0; + foreach (var x in history) + { + sum += x; + } + return sum / history.Count; + } + } +} + + diff --git a/src/ServiceManagement/Compute/Sync/Download/BlobHandle.cs b/src/ServiceManagement/Compute/Sync/Download/BlobHandle.cs new file mode 100644 index 000000000000..0d7a83b6639d --- /dev/null +++ b/src/ServiceManagement/Compute/Sync/Download/BlobHandle.cs @@ -0,0 +1,87 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Microsoft.WindowsAzure.Commands.Sync.Upload; +using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Auth; +using Microsoft.WindowsAzure.Storage.Blob; +using Microsoft.WindowsAzure.Storage.RetryPolicies; + +namespace Microsoft.WindowsAzure.Commands.Sync.Download +{ + public class BlobHandle + { + const int MegaByte = 1024 * 1024; + + private readonly BlobUri blobUri; + private readonly string storageAccountKey; + private readonly CloudBlobContainer container; + private readonly BlobRequestOptions blobRequestOptions; + private readonly CloudPageBlob pageBlob; + + public BlobHandle(BlobUri blobUri, string storageAccountKey) + { + this.blobUri = blobUri; + this.storageAccountKey = storageAccountKey; + var blobClient = new CloudBlobClient(new Uri(this.blobUri.BaseUri), new StorageCredentials(this.blobUri.StorageAccountName, this.storageAccountKey)); + this.container = blobClient.GetContainerReference(this.blobUri.BlobContainerName); + this.container.FetchAttributes(); + this.pageBlob = this.container.GetPageBlobReference(blobUri.BlobName); + this.blobRequestOptions = new BlobRequestOptions + { + ServerTimeout = TimeSpan.FromMinutes(5), + RetryPolicy = new LinearRetry(TimeSpan.FromMinutes(1), 3) + }; + this.pageBlob.FetchAttributes(new AccessCondition(), blobRequestOptions); + } + + public CloudPageBlob Blob { get { return this.pageBlob; } } + + public IEnumerable GetEmptyRanges() + { + var blobRange = new List {IndexRange.FromLength(0, this.Length)}; + return IndexRange.SubstractRanges(blobRange, GetPageRanges()); + } + + public IEnumerable GetUploadableRanges() + { + IEnumerable ranges = GetPageRanges(); + ranges = Enumerable.ToList(IndexRangeHelper.ChunkRangesBySize(ranges, 2 * MegaByte)); + return ranges; + } + + private IEnumerable GetPageRanges() + { + pageBlob.FetchAttributes(new AccessCondition(), blobRequestOptions); + IEnumerable pageRanges = pageBlob.GetPageRanges(null, null, new AccessCondition(), blobRequestOptions); + pageRanges.OrderBy(range => range.StartOffset); + return pageRanges.Select(pr => new IndexRange(pr.StartOffset, pr.EndOffset)); + } + + public Stream OpenStream() + { + return this.container.GetPageBlobReference(blobUri.BlobName).OpenRead(new AccessCondition(), blobRequestOptions); + } + + public long Length + { + get { return pageBlob.Properties.Length; } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Sync/Download/BlobUri.cs b/src/ServiceManagement/Compute/Sync/Download/BlobUri.cs new file mode 100644 index 000000000000..2d15dc89de91 --- /dev/null +++ b/src/ServiceManagement/Compute/Sync/Download/BlobUri.cs @@ -0,0 +1,570 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Collections.Specialized; +using System.Runtime.Serialization; +using System.Text; + +namespace Microsoft.WindowsAzure.Commands.Sync.Download +{ + public class BlobUri + { + public static bool TryParseUri(Uri uri, out BlobUri blobUri) + { + blobUri = null; + string storageAccountName; + string storageDomainName; + string blobContainerName; + string blobName; + string queryString; + string secret; + + var result = TryParseUri(uri, + out storageAccountName, + out storageDomainName, + out blobContainerName, + out blobName, + out queryString, + out secret); + + if (!result) + { + return false; + } + blobUri = new BlobUri(uri, storageAccountName, storageDomainName, blobContainerName, blobName, queryString); + return true; + } + + internal static bool TryParseUri(Uri blobUri, + out string storageAccountName, + out string storageDomainName, + out string blobContainerName, + out string blobName, + out string queryString, + out string secret) + { + storageAccountName = null; + storageDomainName = null; + blobContainerName = null; + blobName = null; + secret = null; + queryString = null; + + string[] hostSegments = blobUri.DnsSafeHost.ToLower().Split('.'); + + if (hostSegments.Length < 2) + { + return false; + } + + storageAccountName = hostSegments[0]; + storageDomainName = string.Join(".", hostSegments, 1, hostSegments.Length - 1); + + blobContainerName = null; + blobName = null; + + string[] segments = blobUri.AbsolutePath.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries); + + if (segments.Length < 2) + { + return false; //Must have atleast a containerName and BlobName + } + + blobName = HttpUtility.UrlDecode( + string.Join( + "/", segments, 1, segments.Length - 1)); + blobContainerName = HttpUtility.UrlDecode(segments[0]); + + NameValueCollection queryValues = HttpUtility.ParseQueryString(blobUri.Query); + + StringBuilder queryBuilder = new StringBuilder(); + bool firstQuery = true; + + foreach (string key in queryValues.AllKeys) + { + if (string.Equals(key, "dsas_secret", StringComparison.OrdinalIgnoreCase)) + { + secret = queryValues["dsas_secret"]; + } + else + { + if (firstQuery) + { + queryBuilder.AppendFormat("?{0}={1}", key.Replace("?", ""), queryValues[key]); + firstQuery = false; + } + else + { + queryBuilder.AppendFormat("&{0}={1}", key, queryValues[key]); + } + } + } + + if (!string.IsNullOrEmpty(secret)) + { + //TODO[JWA], Find out the complete set of decoding; + secret = secret.Replace(' ', '+'); + } + + queryString = queryBuilder.ToString(); + return true; + } + + public Uri Uri { get; private set; } + public string BaseUri { get; private set; } + public string StorageAccountName { get; private set; } + public string StorageDomainName { get; private set; } + public string BlobContainerName { get; private set; } + public string BlobName { get; private set; } + public string QueryString { get; set; } + public string BlobPath { get; private set; } + + public BlobUri(Uri uri, string storageAccountName, string storageDomainName, string blobContainerName, string blobName, string queryString) + { + Uri = uri; + StorageAccountName = storageAccountName; + StorageDomainName = storageDomainName; + BlobContainerName = blobContainerName; + BlobName = blobName; + QueryString = queryString; + BaseUri = uri.Scheme + Uri.SchemeDelimiter + uri.DnsSafeHost; + BlobPath = this.BaseUri + uri.LocalPath; + } + + } + +#region HttpUtility port from .Net 4.0 + + class HttpUtility + { + public static string UrlDecode(string str) + { + if (str == null) + { + return null; + } + return UrlDecode(str, Encoding.UTF8); + } + + public static string UrlDecode(string str, Encoding e) + { + if (str == null) + { + return null; + } + return UrlDecodeStringFromStringInternal(str, e); + } + + private static string UrlDecodeStringFromStringInternal(string s, Encoding e) + { + int length = s.Length; + UrlDecoder decoder = new UrlDecoder(length, e); + for (int i = 0; i < length; i++) + { + char ch = s[i]; + if (ch == '+') + { + ch = ' '; + } + else if ((ch == '%') && (i < (length - 2))) + { + if ((s[i + 1] == 'u') && (i < (length - 5))) + { + int num3 = HexToInt(s[i + 2]); + int num4 = HexToInt(s[i + 3]); + int num5 = HexToInt(s[i + 4]); + int num6 = HexToInt(s[i + 5]); + if (((num3 < 0) || (num4 < 0)) || ((num5 < 0) || (num6 < 0))) + { + goto Label_0106; + } + ch = (char)((((num3 << 12) | (num4 << 8)) | (num5 << 4)) | num6); + i += 5; + decoder.AddChar(ch); + continue; + } + int num7 = HexToInt(s[i + 1]); + int num8 = HexToInt(s[i + 2]); + if ((num7 >= 0) && (num8 >= 0)) + { + byte b = (byte)((num7 << 4) | num8); + i += 2; + decoder.AddByte(b); + continue; + } + } + Label_0106: + if ((ch & 0xff80) == 0) + { + decoder.AddByte((byte)ch); + } + else + { + decoder.AddChar(ch); + } + } + return decoder.GetString(); + } + + private static int HexToInt(char h) + { + if ((h >= '0') && (h <= '9')) + { + return (h - '0'); + } + if ((h >= 'a') && (h <= 'f')) + { + return ((h - 'a') + 10); + } + if ((h >= 'A') && (h <= 'F')) + { + return ((h - 'A') + 10); + } + return -1; + } + + public static string UrlEncodeUnicode(string str) + { + if (str == null) + { + return null; + } + return UrlEncodeUnicodeStringToStringInternal(str, false); + } + + private static string UrlEncodeUnicodeStringToStringInternal(string s, bool ignoreAscii) + { + int length = s.Length; + StringBuilder builder = new StringBuilder(length); + for (int i = 0; i < length; i++) + { + char ch = s[i]; + if ((ch & 0xff80) == 0) + { + if (ignoreAscii || IsSafe(ch)) + { + builder.Append(ch); + } + else if (ch == ' ') + { + builder.Append('+'); + } + else + { + builder.Append('%'); + builder.Append(IntToHex((ch >> 4) & '\x000f')); + builder.Append(IntToHex(ch & '\x000f')); + } + } + else + { + builder.Append("%u"); + builder.Append(IntToHex((ch >> 12) & '\x000f')); + builder.Append(IntToHex((ch >> 8) & '\x000f')); + builder.Append(IntToHex((ch >> 4) & '\x000f')); + builder.Append(IntToHex(ch & '\x000f')); + } + } + return builder.ToString(); + } + + internal static bool IsSafe(char ch) + { + if ((((ch >= 'a') && (ch <= 'z')) || ((ch >= 'A') && (ch <= 'Z'))) || ((ch >= '0') && (ch <= '9'))) + { + return true; + } + switch (ch) + { + case '\'': + case '(': + case ')': + case '*': + case '-': + case '.': + case '_': + case '!': + return true; + } + return false; + } + + internal static char IntToHex(int n) + { + if (n <= 9) + { + return (char)(n + 0x30); + } + return (char)((n - 10) + 0x61); + } + + public static NameValueCollection ParseQueryString(string query) + { + return ParseQueryString(query, Encoding.UTF8); + } + + public static NameValueCollection ParseQueryString(string query, Encoding encoding) + { + if (query == null) + { + throw new ArgumentNullException("query"); + } + if (encoding == null) + { + throw new ArgumentNullException("encoding"); + } + if ((query.Length > 0) && (query[0] == '?')) + { + query = query.Substring(1); + } + return new HttpValueCollection(query, false, true, encoding); + } + + private class UrlDecoder + { + // Fields + private int _bufferSize; + private byte[] _byteBuffer; + private char[] _charBuffer; + private Encoding _encoding; + private int _numBytes; + private int _numChars; + + // Methods + internal UrlDecoder(int bufferSize, Encoding encoding) + { + this._bufferSize = bufferSize; + this._encoding = encoding; + this._charBuffer = new char[bufferSize]; + } + + internal void AddByte(byte b) + { + if (this._byteBuffer == null) + { + this._byteBuffer = new byte[this._bufferSize]; + } + this._byteBuffer[this._numBytes++] = b; + } + + internal void AddChar(char ch) + { + if (this._numBytes > 0) + { + this.FlushBytes(); + } + this._charBuffer[this._numChars++] = ch; + } + + private void FlushBytes() + { + if (this._numBytes > 0) + { + this._numChars += this._encoding.GetChars(this._byteBuffer, 0, this._numBytes, this._charBuffer, this._numChars); + this._numBytes = 0; + } + } + + internal string GetString() + { + if (this._numBytes > 0) + { + this.FlushBytes(); + } + if (this._numChars > 0) + { + return new string(this._charBuffer, 0, this._numChars); + } + return string.Empty; + } + } + + } + + [Serializable] + internal class HttpValueCollection : NameValueCollection + { + // Methods + internal HttpValueCollection() + : base(StringComparer.OrdinalIgnoreCase) + { + } + + internal HttpValueCollection(int capacity) + : base(capacity, (IEqualityComparer)StringComparer.OrdinalIgnoreCase) + { + } + + protected HttpValueCollection(SerializationInfo info, StreamingContext context) + : base(info, context) + { + } + + internal HttpValueCollection(string str, bool readOnly, bool urlencoded, Encoding encoding) + : base(StringComparer.OrdinalIgnoreCase) + { + if (!string.IsNullOrEmpty(str)) + { + this.FillFromString(str, urlencoded, encoding); + } + base.IsReadOnly = readOnly; + } + + + internal void FillFromString(string s) + { + this.FillFromString(s, false, null); + } + + internal void FillFromString(string s, bool urlencoded, Encoding encoding) + { + int num = (s != null) ? s.Length : 0; + for (int i = 0; i < num; i++) + { + int startIndex = i; + int num4 = -1; + while (i < num) + { + char ch = s[i]; + if (ch == '=') + { + if (num4 < 0) + { + num4 = i; + } + } + else if (ch == '&') + { + break; + } + i++; + } + string str = null; + string str2 = null; + if (num4 >= 0) + { + str = s.Substring(startIndex, num4 - startIndex); + str2 = s.Substring(num4 + 1, (i - num4) - 1); + } + else + { + str2 = s.Substring(startIndex, i - startIndex); + } + if (urlencoded) + { + base.Add(HttpUtility.UrlDecode(str, encoding), HttpUtility.UrlDecode(str2, encoding)); + } + else + { + base.Add(str, str2); + } + if ((i == (num - 1)) && (s[i] == '&')) + { + base.Add(null, string.Empty); + } + } + } + + internal void MakeReadOnly() + { + base.IsReadOnly = true; + } + + internal void MakeReadWrite() + { + base.IsReadOnly = false; + } + + internal void Reset() + { + base.Clear(); + } + + public override string ToString() + { + return this.ToString(true); + } + + internal virtual string ToString(bool urlencoded) + { + return this.ToString(urlencoded, null); + } + + internal virtual string ToString(bool urlencoded, IDictionary excludeKeys) + { + int count = this.Count; + if (count == 0) + { + return string.Empty; + } + StringBuilder builder = new StringBuilder(); + bool flag = (excludeKeys != null) && (excludeKeys["__VIEWSTATE"] != null); + for (int i = 0; i < count; i++) + { + string key = this.GetKey(i); + if (((!flag || (key == null)) || !key.StartsWith("__VIEWSTATE", StringComparison.Ordinal)) && (((excludeKeys == null) || (key == null)) || (excludeKeys[key] == null))) + { + string str3; + if (urlencoded) + { + key = HttpUtility.UrlEncodeUnicode(key); + } + string str2 = !string.IsNullOrEmpty(key) ? (key + "=") : string.Empty; + ArrayList list = (ArrayList)base.BaseGet(i); + int num3 = (list != null) ? list.Count : 0; + if (builder.Length > 0) + { + builder.Append('&'); + } + if (num3 == 1) + { + builder.Append(str2); + str3 = (string)list[0]; + if (urlencoded) + { + str3 = HttpUtility.UrlEncodeUnicode(str3); + } + builder.Append(str3); + } + else if (num3 == 0) + { + builder.Append(str2); + } + else + { + for (int j = 0; j < num3; j++) + { + if (j > 0) + { + builder.Append('&'); + } + builder.Append(str2); + str3 = (string)list[j]; + if (urlencoded) + { + str3 = HttpUtility.UrlEncodeUnicode(str3); + } + builder.Append(str3); + } + } + } + } + return builder.ToString(); + } + } +#endregion + +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Sync/Download/Downloader.cs b/src/ServiceManagement/Compute/Sync/Download/Downloader.cs new file mode 100644 index 000000000000..e44027dbbae5 --- /dev/null +++ b/src/ServiceManagement/Compute/Sync/Download/Downloader.cs @@ -0,0 +1,168 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.ServiceModel.Channels; +using Microsoft.WindowsAzure.Commands.Sync.Threading; +using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model; + +namespace Microsoft.WindowsAzure.Commands.Sync.Download +{ + public class Downloader + { + private const int DefaultConnectionLimit = 24; + private DownloaderParameters parameters; + + public Downloader(BlobUri blobUri, string storageAccountKey, string locaFilePath) + { + this.parameters = new DownloaderParameters + { + BlobUri = blobUri, + LocalFilePath = locaFilePath, + ConnectionLimit = DefaultConnectionLimit, + StorageAccountKey = storageAccountKey, + ValidateFreeDiskSpace = false, + ProgressDownloadStatus = Program.SyncOutput.ProgressDownloadStatus, + ProgressDownloadComplete = Program.SyncOutput.ProgressDownloadComplete + }; + } + + public Downloader(DownloaderParameters parameters) + { + this.parameters = parameters; + } + + public void Download() + { + if(parameters.OverWrite) + { + DeleteTempVhdIfExist(parameters.LocalFilePath); + } + else + { + if (File.Exists(parameters.LocalFilePath)) + { + var message = String.Format("File already exists, you can use Overwrite option to delete it:'{0}'", parameters.LocalFilePath); + throw new ArgumentException(message); + } + } + + var blobHandle = new BlobHandle(parameters.BlobUri, this.parameters.StorageAccountKey); + + if (parameters.ValidateFreeDiskSpace) + { + TryValidateFreeDiskSpace(parameters.LocalFilePath, blobHandle.Length); + } + + const int megaByte = 1024 * 1024; + + var ranges = blobHandle.GetUploadableRanges(); + var bufferManager = BufferManager.CreateBufferManager(Int32.MaxValue, 20 * megaByte); + var downloadStatus = new ProgressStatus(0, ranges.Sum(r => r.Length), new ComputeStats()); + + Trace.WriteLine(String.Format("Total Data:{0}", ranges.Sum(r => r.Length))); + + Program.SyncOutput.WriteVerboseWithTimestamp("Downloading the blob: {0}", parameters.BlobUri.BlobName); + + var fileStreamLock = new object(); + using (new ServicePointHandler(parameters.BlobUri.Uri, parameters.ConnectionLimit)) + { + using (new ProgressTracker(downloadStatus, parameters.ProgressDownloadStatus, parameters.ProgressDownloadComplete, TimeSpan.FromSeconds(1))) + { + using (var fileStream = new FileStream(parameters.LocalFilePath, FileMode.OpenOrCreate, FileAccess.Write, FileShare.Write, 8 * megaByte, FileOptions.WriteThrough)) + { + fileStream.SetLength(0); + fileStream.SetLength(blobHandle.Length); + + LoopResult lr = Parallel.ForEach(ranges, + blobHandle.OpenStream, + (r, b) => + { + b.Seek(r.StartIndex, SeekOrigin.Begin); + + byte[] buffer = this.EnsureReadAsSize(b, (int)r.Length, bufferManager); + + lock (fileStreamLock) + { + Trace.WriteLine(String.Format("Range:{0}", r)); + fileStream.Seek(r.StartIndex, SeekOrigin.Begin); + fileStream.Write(buffer, 0, (int)r.Length); + fileStream.Flush(); + } + + downloadStatus.AddToProcessedBytes((int)r.Length); + }, + pbwlf => + { + pbwlf.Dispose(); + }, + parameters.ConnectionLimit); + + if (lr.IsExceptional) + { + throw new AggregateException(lr.Exceptions); + } + } + } + } + Program.SyncOutput.WriteVerboseWithTimestamp("Blob downloaded successfullty: {0}", parameters.BlobUri.BlobName); + } + + private void TryValidateFreeDiskSpace(string destination, long blobLength) + { + try + { + DriveInfo info = new DriveInfo(destination); + if(info.AvailableFreeSpace < blobLength) + { + string message = String.Format("Insufficient disk space: Blob's size is {0}, however available space is {1}.", blobLength, info.AvailableFreeSpace); + throw new ArgumentOutOfRangeException(message); + } + } + catch (Exception) + { + } + } + + private void DeleteTempVhdIfExist(string fileName) + { + if (File.Exists(fileName)) + File.Delete(fileName); + } + + private byte[] EnsureReadAsSize(Stream stream, int size, BufferManager manager) + { + byte[] buffer = manager.TakeBuffer(size); + int byteRead = 0; + int totalRead = 0; + int sizeLeft = size; + do + { + byteRead = stream.Read(buffer, totalRead, sizeLeft); + totalRead += byteRead; + if (totalRead == size) + { + break; + } + + sizeLeft = sizeLeft - byteRead; + } while (true); + + return buffer; + } + } +} diff --git a/src/ServiceManagement/Compute/Sync/Download/DownloaderParameters.cs b/src/ServiceManagement/Compute/Sync/Download/DownloaderParameters.cs new file mode 100644 index 000000000000..cb835753c7f7 --- /dev/null +++ b/src/ServiceManagement/Compute/Sync/Download/DownloaderParameters.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.Sync.Download +{ + public class DownloaderParameters + { + public BlobUri BlobUri { get; set; } + public string LocalFilePath { get; set; } + public int ConnectionLimit { get; set; } + public string StorageAccountKey { get; set; } + public bool ValidateFreeDiskSpace { get; set; } + public bool OverWrite { get; set; } + public Action ProgressDownloadStatus { get; set; } + public Action ProgressDownloadComplete { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Sync/IO/StreamWithReadProgress.cs b/src/ServiceManagement/Compute/Sync/IO/StreamWithReadProgress.cs new file mode 100644 index 000000000000..2b8de18bbbc5 --- /dev/null +++ b/src/ServiceManagement/Compute/Sync/IO/StreamWithReadProgress.cs @@ -0,0 +1,104 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; + +namespace Microsoft.WindowsAzure.Commands.Sync.IO +{ + internal class StreamWithReadProgress : Stream + { + private readonly Stream innerStream; + private readonly TimeSpan progressInterval; + private ProgressStatus readStatus; + private ProgressTracker progressTracker; + + public StreamWithReadProgress(Stream innerStream, TimeSpan progressInterval) + { + this.innerStream = innerStream; + this.progressInterval = progressInterval; + this.readStatus = new ProgressStatus(0, this.innerStream.Length, new ComputeStats()); + + this.progressTracker = new ProgressTracker(this.readStatus, + Program.SyncOutput.ProgressOperationStatus, + Program.SyncOutput.ProgressOperationComplete, + this.progressInterval); + } + + public override void Flush() + { + this.innerStream.Flush(); + } + + public override long Seek(long offset, SeekOrigin origin) + { + return this.innerStream.Seek(offset, origin); + } + + public override void SetLength(long value) + { + this.innerStream.SetLength(value); + } + + public override int Read(byte[] buffer, int offset, int count) + { + var readCount = this.innerStream.Read(buffer, offset, count); + readStatus.AddToProcessedBytes(readCount); + return readCount; + } + + public override void Write(byte[] buffer, int offset, int count) + { + this.innerStream.Write(buffer, offset, count); + } + + public override bool CanRead + { + get { return this.innerStream.CanRead; } + } + + public override bool CanSeek + { + get { return this.innerStream.CanSeek; } + } + + public override bool CanWrite + { + get { return this.innerStream.CanWrite; } + } + + public override long Length + { + get { return this.innerStream.Length; } + } + + public override long Position + { + get { return this.innerStream.Position; } + set { this.innerStream.Position = value; } + } + + public override void Close() + { + this.progressTracker.Dispose(); + this.innerStream.Close(); + } + + protected override void Dispose(bool disposing) + { + this.progressTracker.Dispose(); + this.innerStream.Dispose(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Sync/MSSharedLibKey.snk b/src/ServiceManagement/Compute/Sync/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ServiceManagement/Compute/Sync/MSSharedLibKey.snk differ diff --git a/src/ServiceManagement/Compute/Sync/Program.cs b/src/ServiceManagement/Compute/Sync/Program.cs new file mode 100644 index 000000000000..b8a3ecb0f5da --- /dev/null +++ b/src/ServiceManagement/Compute/Sync/Program.cs @@ -0,0 +1,80 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model; + +namespace Microsoft.WindowsAzure.Commands.Sync +{ + public class Program + { + static public ISyncOutputEvents SyncOutput + { + get + { + return RawEvents; + } + set + { + if (value == null) + { + throw new ArgumentNullException("value"); + } + RawEvents = value; + } + } +// static public IProgramConfiguration Configuration { get; private set; } + //private static ISyncOutputEvents RawEvents = new SyncOutputEvents(); + private static ISyncOutputEvents RawEvents = null; + } + + public interface ISyncOutputEvents + { + void MessageCreatingNewPageBlob(long pageBlobSize); + void MessageResumingUpload(); + void ErrorUploadFailedWithExceptions(IList exjceptions); + + + void ProgressCopyComplete(TimeSpan elapsed); + void ProgressCopyStatus(double precentComplete, double avgThroughputMbps, TimeSpan remainingTime); + void ProgressCopyStatus(ProgressRecord record); + + void ProgressUploadStatus(ProgressRecord record); + void ProgressUploadStatus(double precentComplete, double avgThroughputMbps, TimeSpan remainingTime); + void ProgressUploadComplete(TimeSpan elapsed); + + void ProgressDownloadStatus(ProgressRecord record); + void ProgressDownloadStatus(double precentComplete, double avgThroughputMbps, TimeSpan remainingTime); + void ProgressDownloadComplete(TimeSpan elapsed); + + void ProgressOperationStatus(ProgressRecord record); + void ProgressOperationStatus(double percentComplete, double avgThroughputMbps, TimeSpan remainingTime); + void ProgressOperationComplete(TimeSpan elapsed); + + void MessageCalculatingMD5Hash(string filePath); + void MessageMD5HashCalculationFinished(); + + void MessageRetryingAfterANetworkDisruption(); + void DebugRetryingAfterException(Exception lastException); + + void MessageDetectingActualDataBlocks(); + void MessageDetectingActualDataBlocksCompleted(); + void MessagePrintBlockRange(IndexRange range); + void DebugEmptyBlockDetected(IndexRange range); + void ProgressEmptyBlockDetection(int processedRangeCount, int totalRangeCount); + + void WriteVerboseWithTimestamp(string message, params object[] args); + } +} diff --git a/src/ServiceManagement/Compute/Sync/ProgressRecord.cs b/src/ServiceManagement/Compute/Sync/ProgressRecord.cs new file mode 100644 index 000000000000..92940867a2d4 --- /dev/null +++ b/src/ServiceManagement/Compute/Sync/ProgressRecord.cs @@ -0,0 +1,25 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.Sync +{ + public class ProgressRecord + { + public double PercentComplete { get; set; } + public double AvgThroughputMbPerSecond { get; set; } + public TimeSpan RemainingTime { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Sync/ProgressStatus.cs b/src/ServiceManagement/Compute/Sync/ProgressStatus.cs new file mode 100644 index 000000000000..94efc80cf81b --- /dev/null +++ b/src/ServiceManagement/Compute/Sync/ProgressStatus.cs @@ -0,0 +1,104 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.Sync +{ + public class ProgressStatus + { + const double MB = 1024.0 * 1024.0; + readonly object thisLock = new object(); + + public ProgressStatus(long alreadyProcessedBytes, long totalLength) : this(alreadyProcessedBytes, totalLength, new ComputeStats()) + { + } + + public ProgressStatus(long alreadyProcessedBytes, long totalLength, ComputeStats computeStats) + { + this.PreExistingBytes = alreadyProcessedBytes; + this.BytesProcessed = alreadyProcessedBytes; + this.TotalLength = totalLength; + this.ThrougputStats = computeStats; + this.StartTime = DateTime.UtcNow; + } + + long PreExistingBytes { get; set; } + internal long BytesProcessed { get; private set; } + long TotalLength { get; set; } + DateTime StartTime { get; set; } + ComputeStats ThrougputStats { get; set; } + + public bool TryGetProgressRecord(out ProgressRecord record) + { + record = null; + lock (thisLock) + { + if (HasProgess()) + { + record = Progress(); + return true; + } + } + return false; + } + + public void AddToProcessedBytes(long size) + { + lock (thisLock) + { + this.BytesProcessed += size; + } + } + + bool HasProgess() + { + return this.BytesProcessed > this.PreExistingBytes; + } + + ProgressRecord Progress() + { + double computeAvg = ThrougputStats.ComputeAvg(ThroughputMBs()); + double avtThroughputMbps = 8.0 * computeAvg; + double remainingSeconds = (RemainingMB() / computeAvg); + var pr = new ProgressRecord + { + PercentComplete = PercentComplete(), + AvgThroughputMbPerSecond = avtThroughputMbps, + RemainingTime = TimeSpan.FromSeconds(remainingSeconds) + }; + return pr; + } + + double RemainingMB() + { + return (this.TotalLength - this.BytesProcessed) / MB; + } + + double ThroughputMBs() + { + return (this.BytesProcessed - this.PreExistingBytes) / MB / ProcessTime().TotalSeconds; + } + + TimeSpan ProcessTime() + { + return DateTime.UtcNow - this.StartTime; + } + + double PercentComplete() + { + return 100.0 * this.BytesProcessed / ((double)this.TotalLength); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Sync/ProgressTracker.cs b/src/ServiceManagement/Compute/Sync/ProgressTracker.cs new file mode 100644 index 000000000000..37d3ae23ded9 --- /dev/null +++ b/src/ServiceManagement/Compute/Sync/ProgressTracker.cs @@ -0,0 +1,117 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Diagnostics; +using System.Timers; + +namespace Microsoft.WindowsAzure.Commands.Sync +{ + public class ProgressTracker : IDisposable + { + private readonly ProgressStatus progressStatus; + private readonly Action progress; + private readonly Action complete; + private readonly TimeSpan progressInterval; + private Timer progressTimer; + private object thisLock = new object(); + private ElapsedEventHandler progressTimerOnElapsed; + private Stopwatch stopWatch; + private bool isDisposed; + + public ProgressTracker(ProgressStatus progressStatus) : + this(progressStatus, Program.SyncOutput.ProgressUploadStatus, Program.SyncOutput.ProgressUploadComplete, TimeSpan.FromSeconds(1)) + { + } + + public ProgressTracker(ProgressStatus progressStatus, Action progress, Action complete, TimeSpan progressInterval) + { + this.progressStatus = progressStatus; + this.progress = progress; + this.complete = complete; + this.progressInterval = progressInterval; + this.stopWatch = new Stopwatch(); + InitilizeProgressTimer(); + } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "Lifetime of timer is bound to ProgressTracker")] + private void InitilizeProgressTimer() + { + stopWatch.Start(); + bool throwing = false; + try + { + progressTimer = new Timer + { + AutoReset = false, + Interval = progressInterval.TotalMilliseconds + }; + progressTimerOnElapsed = (sender, args) => + { + ProgressRecord pr; + if (progressStatus.TryGetProgressRecord(out pr)) + { + this.progress(pr); + } + progressTimer.Enabled = true; + }; + progressTimer.Elapsed += progressTimerOnElapsed; + progressTimer.Enabled = true; + } + catch (Exception) + { + throwing = true; + throw; + } + finally + { + if(throwing && progressTimer != null) + { + progressTimer.Elapsed -= progressTimerOnElapsed; + progressTimer.Enabled = false; + progressTimer.Dispose(); + progressTimer = null; + } + } + } + + + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) + { + if (isDisposed) + { + return; + } + if(disposing) + { + progressTimer.Elapsed -= progressTimerOnElapsed; + progressTimer.Enabled = false; + stopWatch.Stop(); + if (stopWatch.Elapsed != TimeSpan.Zero) + { + this.complete(stopWatch.Elapsed); + } + progressTimer.Dispose(); + this.isDisposed = true; + } + } + + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Sync/Properties/AssemblyInfo.cs b/src/ServiceManagement/Compute/Sync/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..1afa18298987 --- /dev/null +++ b/src/ServiceManagement/Compute/Sync/Properties/AssemblyInfo.cs @@ -0,0 +1,37 @@ +using System; +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Sync")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Sync")] +[assembly: AssemblyCopyright("Copyright © Microsoft")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("fc29ef65-ccc2-4d41-b1c7-6e0437e479da")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: CLSCompliant(false)] \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Sync/ServicePointHandler.cs b/src/ServiceManagement/Compute/Sync/ServicePointHandler.cs new file mode 100644 index 000000000000..50b2a281fbd4 --- /dev/null +++ b/src/ServiceManagement/Compute/Sync/ServicePointHandler.cs @@ -0,0 +1,59 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Net; +using System.Reflection; + +namespace Microsoft.WindowsAzure.Commands.Sync +{ + internal class ServicePointHandler : IDisposable + { + private bool disposed; + private ServicePoint servicePoint; + private int originalConnectionLimit; + + public ServicePointHandler(Uri uri, int connectionLimit) + { + this.servicePoint = ServicePointManager.FindServicePoint(uri, GetWebProxy()); + this.originalConnectionLimit = servicePoint.ConnectionLimit; + servicePoint.ConnectionLimit = connectionLimit; + } + + private static IWebProxy GetWebProxy() + { + Type webRequestType = typeof(WebRequest); + PropertyInfo propertyInfo = webRequestType.GetProperty("InternalDefaultWebProxy", BindingFlags.Static | BindingFlags.NonPublic); + return (IWebProxy) propertyInfo.GetValue(null, null); + } + + public void Dispose() + { + this.Dispose(true); + GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) + { + if(!disposed) + { + if(disposing) + { + this.servicePoint.ConnectionLimit = originalConnectionLimit; + } + disposed = true; + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Sync/Sync.csproj b/src/ServiceManagement/Compute/Sync/Sync.csproj new file mode 100644 index 000000000000..2e833c2bc682 --- /dev/null +++ b/src/ServiceManagement/Compute/Sync/Sync.csproj @@ -0,0 +1,132 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {73820CBC-F4EB-4C5E-B4F0-CC4A93FBF157} + Library + Properties + Microsoft.WindowsAzure.Commands.Sync + Microsoft.WindowsAzure.Commands.Sync + v4.5 + 512 + + ..\..\..\ + true + + + true + full + false + ..\..\..\Package\Debug\ServiceManagement\Azure\Compute + DEBUG;TRACE + prompt + 4 + true + true + false + + + OnBuildSuccess + + + ..\..\..\Package\Release\ServiceManagement\Azure\Compute + TRACE;SIGN + true + pdbonly + AnyCPU + bin\Release\Microsoft.WindowsAzure.Sync.dll.CodeAnalysisLog.xml + true + GlobalSuppressions.cs + prompt + MinimumRecommendedRules.ruleset + ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets + ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules + true + MSSharedLibKey.snk + true + true + false + + + + ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll + + + ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll + + + ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll + + + False + ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll + + + False + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + + + + + + + + ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {80496B7B-068A-4A1E-B0BB-4B1FFF3FA616} + VhdManagement + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Sync/Threading/Parallel.cs b/src/ServiceManagement/Compute/Sync/Threading/Parallel.cs new file mode 100644 index 000000000000..7f5f9691f8f3 --- /dev/null +++ b/src/ServiceManagement/Compute/Sync/Threading/Parallel.cs @@ -0,0 +1,240 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Threading; + +namespace Microsoft.WindowsAzure.Commands.Sync.Threading +{ + internal class Parallel + { + public readonly static int MaxParallellism = Environment.ProcessorCount; + + public static LoopResult ForEach(IEnumerable source, Func argumentConstructor, Action body) + { + return ForEach(source, argumentConstructor, body, MaxParallellism); + } + + public static LoopResult ForEach(IEnumerable source, Func argumentConstructor, Action body, int parallelism) + { + var loopResult = new InternalLoopResult(); + int numProcs = parallelism; + int remainingWorkItems = numProcs; + using (var enumerator = source.GetEnumerator()) + { + using (var mre = new ManualResetEvent(false)) + { + // Create each of the work items. + for (int p = 0; p < numProcs; p++) + { + ThreadPool.QueueUserWorkItem(delegate + { + try + { + + TA argument = argumentConstructor(); + // Iterate until there's no more work. + while (true) + { + // Get the next item under a lock, + // then process that item. + T nextItem; + lock (enumerator) + { + if (!enumerator.MoveNext()) break; + nextItem = enumerator.Current; + } + body(nextItem, argument); + } + } + catch (Exception e) + { + loopResult.AddException(e); + } + if (Interlocked.Decrement(ref remainingWorkItems) == 0) + mre.Set(); + }); + } + // Wait for all threads to complete. + mre.WaitOne(); + loopResult.SetCompleted(); + } + } + return loopResult; + } + + public static LoopResult ForEach(IEnumerable source, Action body) + { + return ForEach(source, body, MaxParallellism); + } + + public static LoopResult ForEach(IEnumerable source, Action body, int parallelism) + { + var loopResult = new InternalLoopResult(); + int numProcs = parallelism; + int remainingWorkItems = numProcs; + using (var enumerator = source.GetEnumerator()) + { + using (var mre = new ManualResetEvent(false)) + { + // Create each of the work items. + for (int p = 0; p < numProcs; p++) + { + ThreadPool.QueueUserWorkItem(delegate + { + // Iterate until there's no more work. + try + { + while (true) + { + // Get the next item under a lock, + // then process that item. + T nextItem; + lock (enumerator) + { + if (!enumerator.MoveNext()) break; + nextItem = enumerator.Current; + } + body(nextItem); + } + } + catch (Exception e) + { + loopResult.AddException(e); + } + if (Interlocked.Decrement(ref remainingWorkItems) == 0) + mre.Set(); + }); + } + // Wait for all threads to complete. + mre.WaitOne(); + loopResult.SetCompleted(); + } + } + return loopResult; + } + + public static LoopResult ForEach(IEnumerable source, Func argumentConstructor, Action body, Action finalize, int parallelism) + { + var loopResult = new InternalLoopResult(); + int numProcs = parallelism; + int remainingWorkItems = numProcs; + + IList arguments = new List(); + using (var enumerator = source.GetEnumerator()) + { + using (var mre = new ManualResetEvent(false)) + { + // Create each of the work items. + for (int p = 0; p < numProcs; p++) + { + ThreadPool.QueueUserWorkItem(delegate + { + try + { + TA argument = argumentConstructor(); + lock (arguments) + { + arguments.Add(argument); + } + // Iterate until there's no more work. + while (true && !loopResult.IsExceptional) + { + // Get the next item under a lock, + // then process that item. + T nextItem; + lock (enumerator) + { + if (!enumerator.MoveNext()) break; + nextItem = enumerator.Current; + } + body(nextItem, argument); + } + } + catch (Exception e) + { + loopResult.AddException(e); + } + if (Interlocked.Decrement(ref remainingWorkItems) == 0) + mre.Set(); + }); + } + // Wait for all threads to complete. + mre.WaitOne(); + + foreach (var argument in arguments) + { + finalize(argument); + } + + loopResult.SetCompleted(); + } + } + return loopResult; + } + + private class InternalLoopResult : LoopResult + { + private IList exceptions; + private object lockObject = new object(); + + public InternalLoopResult() + { + this.exceptions = new List(); + } + + public override bool IsCompleted + { + get; protected set; + } + + public override IList Exceptions + { + get { return new List(exceptions); } + } + + public override bool IsExceptional + { + get + { + lock (lockObject) + { + return this.exceptions.Count > 0; + } + } + } + + public void SetCompleted() + { + this.IsCompleted = true; + } + + public void AddException(Exception exception) + { + lock (lockObject) + { + this.exceptions.Add(exception); + } + } + } + } + + public abstract class LoopResult + { + public abstract bool IsCompleted { get; protected set; } + public abstract IList Exceptions { get; } + public abstract bool IsExceptional { get; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Sync/Upload/BlobCreator.cs b/src/ServiceManagement/Compute/Sync/Upload/BlobCreator.cs new file mode 100644 index 000000000000..bd562d84cb56 --- /dev/null +++ b/src/ServiceManagement/Compute/Sync/Upload/BlobCreator.cs @@ -0,0 +1,47 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using Microsoft.WindowsAzure.Commands.Sync.Download; + +namespace Microsoft.WindowsAzure.Commands.Sync.Upload +{ + public class BlobCreator : BlobCreatorBase + { + public BlobCreator(FileInfo localVhd, BlobUri destination, ICloudPageBlobObjectFactory blobObjectFactory, bool overWrite) : + base(localVhd, destination, blobObjectFactory, overWrite) + { + } + + protected override void CreateRemoteBlobAndPopulateContext(UploadContext context) + { + CreateRemoteBlob(); + PopulateContextWithUploadableRanges(localVhd, context, false); + PopulateContextWithDataToUpload(localVhd, context); + } + + private void CreateRemoteBlob() + { + Program.SyncOutput.MessageCreatingNewPageBlob(OperationMetaData.FileMetaData.VhdSize); + + destinationBlob.Create(OperationMetaData.FileMetaData.VhdSize); + + using (var bdms = new BlobMetaDataScope(destinationBlob)) + { + bdms.Current.SetUploadMetaData(OperationMetaData); + bdms.Complete(); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Sync/Upload/BlobCreatorBase.cs b/src/ServiceManagement/Compute/Sync/Upload/BlobCreatorBase.cs new file mode 100644 index 000000000000..f6de6e4dd8f1 --- /dev/null +++ b/src/ServiceManagement/Compute/Sync/Upload/BlobCreatorBase.cs @@ -0,0 +1,399 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Security.Cryptography; +using System.Security.Permissions; +using System.ServiceModel.Channels; +using System.Text; +using System.Threading; +using Microsoft.WindowsAzure.Commands.Sync.Download; +using Microsoft.WindowsAzure.Commands.Tools.Vhd; +using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model; +using Microsoft.WindowsAzure.Storage.Auth; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.Sync.Upload +{ + public interface ICloudPageBlobObjectFactory + { + CloudPageBlob Create(BlobUri destination); + bool CreateContainer(BlobUri destination); + BlobRequestOptions CreateRequestOptions(); + } + + public abstract class BlobCreatorBase + { + private const long OneTeraByte = 1024L * 1024L * 1024L * 1024L; + + protected FileInfo localVhd; + protected readonly ICloudPageBlobObjectFactory blobObjectFactory; + protected Uri destination; + protected BlobUri blobDestination; + protected string queryString; + protected StorageCredentials credentials; + protected CloudPageBlob destinationBlob; + protected BlobRequestOptions requestOptions; + protected bool overWrite; + private readonly TimeSpan delayBetweenRetries = TimeSpan.FromSeconds(10); + + private const int MegaByte = 1024 * 1024; + private const int PageSizeInBytes = 2 * MegaByte; + private const int MaxBufferSize = 20 * MegaByte; + + protected BlobCreatorBase(FileInfo localVhd, BlobUri blobDestination, ICloudPageBlobObjectFactory blobObjectFactory, bool overWrite) + { + this.localVhd = localVhd; + this.blobObjectFactory = blobObjectFactory; + this.destination = new Uri(blobDestination.BlobPath); + this.blobDestination = blobDestination; + this.overWrite = overWrite; + + this.destinationBlob = blobObjectFactory.Create(blobDestination); + this.requestOptions = this.blobObjectFactory.CreateRequestOptions(); + } + + private LocalMetaData operationMetaData; + + public LocalMetaData OperationMetaData + { + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + get + { + if (this.operationMetaData == null) + { + this.operationMetaData = new LocalMetaData + { + FileMetaData = FileMetaData.Create(localVhd.FullName), + SystemInformation = SystemInformation.Create() + }; + } + return operationMetaData; + } + } + + public byte[] MD5HashOfLocalVhd + { + get { return OperationMetaData.FileMetaData.MD5Hash; } + } + + private static void AssertIfValidVhdSize(FileInfo fileInfo) + { + using(var stream = new VirtualDiskStream(fileInfo.FullName)) + { + if(stream.Length > OneTeraByte) + { + var lengthString = stream.Length.ToString("N0", CultureInfo.CurrentCulture); + var expectedLengthString = OneTeraByte.ToString("N0", CultureInfo.CurrentCulture); + string message = String.Format("VHD size is too large ('{0}'), maximum allowed size is '{1}'.", lengthString, expectedLengthString); + throw new InvalidOperationException(message); + } + } + } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "Need to keep UploadContext till the end of upload")] + public UploadContext Create() + { + AssertIfValidhVhd(localVhd); + AssertIfValidVhdSize(localVhd); + + this.blobObjectFactory.CreateContainer(blobDestination); + + UploadContext context = null; + bool completed = false; + try + { + context = new UploadContext + { + DestinationBlob = destinationBlob, + SingleInstanceMutex = AcquireSingleInstanceMutex(destinationBlob.Uri) + }; + + if (overWrite) + { + destinationBlob.DeleteIfExists(DeleteSnapshotsOption.IncludeSnapshots, null, requestOptions); + } + + if (destinationBlob.Exists(requestOptions)) + { + Program.SyncOutput.MessageResumingUpload(); + + if(destinationBlob.GetBlobMd5Hash(requestOptions) != null) + { + throw new InvalidOperationException( + "An image already exists in blob storage with this name. If you want to upload again, use the Overwrite option."); + } + var metaData = destinationBlob.GetUploadMetaData(); + + AssertMetaDataExists(metaData); + AssertMetaDataMatch(metaData, OperationMetaData); + + PopulateContextWithUploadableRanges(localVhd, context, true); + PopulateContextWithDataToUpload(localVhd, context); + } + else + { + CreateRemoteBlobAndPopulateContext(context); + } + context.Md5HashOfLocalVhd = MD5HashOfLocalVhd; + completed = true; + } + finally + { + if(!completed && context != null) + { + context.Dispose(); + } + } + return context; + } + + public static void AssertIfValidhVhd(FileInfo vhdFile) + { + var vhdValidationResults = VhdValidator.Validate(VhdValidationType.IsVhd, vhdFile.FullName); + if (vhdValidationResults.Count(r => r.ErrorCode != 0) != 0) + { + string message = String.Format("'{0}' is not a valid VHD file.", vhdFile.FullName); + throw new InvalidOperationException(message, vhdValidationResults[0].Error); + } + } + + protected abstract void CreateRemoteBlobAndPopulateContext(UploadContext context); + + protected static void PopulateContextWithUploadableRanges(FileInfo vhdFile, UploadContext context, bool resume) + { + using (var vds = new VirtualDiskStream(vhdFile.FullName)) + { + IEnumerable ranges = vds.Extents.Select(e => e.Range).ToArray(); + + var bs = new BufferedStream(vds); + if (resume) + { + var alreadyUploadedRanges = context.DestinationBlob.GetPageRanges().Select(pr => new IndexRange(pr.StartOffset, pr.EndOffset)); + ranges = IndexRange.SubstractRanges(ranges, alreadyUploadedRanges); + context.AlreadyUploadedDataSize = alreadyUploadedRanges.Sum(ir => ir.Length); + } + var uploadableRanges = IndexRangeHelper.ChunkRangesBySize(ranges, PageSizeInBytes).ToArray(); + if(vds.DiskType == DiskType.Fixed) + { + var nonEmptyUploadableRanges = GetNonEmptyRanges(bs, uploadableRanges).ToArray(); + context.UploadableDataSize = nonEmptyUploadableRanges.Sum(r => r.Length); + context.UploadableRanges = nonEmptyUploadableRanges; + } + else + { + context.UploadableDataSize = uploadableRanges.Sum(r => r.Length); + context.UploadableRanges = uploadableRanges; + } + } + } + + protected static void PopulateContextWithDataToUpload(FileInfo vhdFile, UploadContext context) + { + context.UploadableDataWithRanges = GetDataWithRangesToUpload(vhdFile, context); + } + + protected static IEnumerable GetNonEmptyRanges(Stream stream, IEnumerable uploadableRanges) + { + Program.SyncOutput.MessageDetectingActualDataBlocks(); + var manager = BufferManager.CreateBufferManager(Int32.MaxValue, MaxBufferSize); + int totalRangeCount = uploadableRanges.Count(); + int processedRangeCount = 0; + foreach (var range in uploadableRanges) + { + var dataWithRange = new DataWithRange(manager) + { + Data = ReadBytes(stream, range, manager), + Range = range + }; + using(dataWithRange) + { + if(dataWithRange.IsAllZero()) + { + Program.SyncOutput.DebugEmptyBlockDetected(dataWithRange.Range); + } + else + { + yield return dataWithRange.Range; + } + } + Program.SyncOutput.ProgressEmptyBlockDetection(++processedRangeCount, totalRangeCount); + } + + Program.SyncOutput.MessageDetectingActualDataBlocksCompleted(); + yield break; + } + + protected static IEnumerable GetDataWithRangesToUpload(FileInfo vhdFile, UploadContext context) + { + var uploadableRanges = context.UploadableRanges; + var manager = BufferManager.CreateBufferManager(Int32.MaxValue, MaxBufferSize); + using (var vds = new VirtualDiskStream(vhdFile.FullName)) + { + foreach (var range in uploadableRanges) + { + var localRange = range; + yield return new DataWithRange(manager) + { + Data = ReadBytes(vds, localRange, manager), + Range = localRange + }; + } + } + yield break; + } + + private static byte[] ReadBytes(Stream stream, IndexRange rangeToRead, BufferManager manager) + { + stream.Seek(rangeToRead.StartIndex, SeekOrigin.Begin); + + var bufferSize = (int)rangeToRead.Length; + var buffer = manager.TakeBuffer(bufferSize); + + for (int bytesRead = stream.Read(buffer, 0, bufferSize); + bytesRead < bufferSize; + bytesRead += stream.Read(buffer, bytesRead, bufferSize - bytesRead)) + { + } + return buffer; + } + + + private static void AssertMetaDataExists(LocalMetaData blobMetaData) + { + if(blobMetaData == null) + { + throw new InvalidOperationException("There is no CsUpload metadata on the blob, so CsUpload cannot resume. Use the overwrite option."); + } + } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "Need to keep Mutex open till the end of upload")] + private static Mutex AcquireSingleInstanceMutex(Uri destinationBlobUri) + { + string mutexName = GetMutexName(destinationBlobUri); + + bool throwing = true; + Mutex singleInstanceMutex = null; + try + { + singleInstanceMutex = new Mutex(false, @"Global\" + mutexName); + if (!singleInstanceMutex.WaitOne(TimeSpan.FromSeconds(5), false)) + { + var message = String.Format("An upload is already in progress on this machine"); + throw new InvalidOperationException(message); + } + throwing = false; + return singleInstanceMutex; + } + finally + { + if(throwing && singleInstanceMutex != null) + { + singleInstanceMutex.ReleaseMutex(); + singleInstanceMutex.Close(); + } + } + } + + private static string GetMutexName(Uri destinationBlobUri) + { + var invariant = destinationBlobUri.ToString().ToLowerInvariant(); + var bytes = Encoding.Unicode.GetBytes(invariant); + using(var md5 = MD5.Create()) + { + byte[] hash = md5.ComputeHash(bytes); + return Convert.ToBase64String(hash); + } + } + + private static void AssertMetaDataMatch(LocalMetaData blobMetaData, LocalMetaData localMetaData) + { + var systemInformation = blobMetaData.SystemInformation; + + if (String.Compare(systemInformation.MachineName, Environment.MachineName, CultureInfo.InvariantCulture, CompareOptions.IgnoreCase) != 0) + { + var message = String.Format("An upload is already in progress on machine {0} with process id {1}", + systemInformation.MachineName, + systemInformation.CsUploadProcessId); + + throw new InvalidOperationException(message); + } + + var fileMetaDataMessages = CompareFileMetaData(blobMetaData.FileMetaData, localMetaData.FileMetaData); + + if (fileMetaDataMessages.Count > 0) + { + throw new InvalidOperationException(fileMetaDataMessages.Aggregate((r,n)=>r + Environment.NewLine + n)); + } + } + + private static List CompareFileMetaData(FileMetaData blobFileMetaData, FileMetaData localFileMetaData) + { + var fileMetaDataMessages = new List(); + if (blobFileMetaData.VhdSize != localFileMetaData.VhdSize) + { + var message = String.Format("Logical size of VHD file in blob storage ({0}) and local VHD file ({1}) does not match ", + blobFileMetaData.VhdSize, + localFileMetaData.VhdSize); + fileMetaDataMessages.Add(message); + } + + if (blobFileMetaData.Size != localFileMetaData.Size) + { + var message = String.Format("Size of VHD file in blob storage ({0}) and local VHD file ({1}) does not match ", + blobFileMetaData.Size, + localFileMetaData.Size); + fileMetaDataMessages.Add(message); + } + + if (!blobFileMetaData.MD5Hash.SequenceEqual(localFileMetaData.MD5Hash)) + { + var message = String.Format("MD5 hash of VHD file in blob storage ({0}) and local VHD file ({1}) does not match ", + blobFileMetaData.MD5Hash.ToString(","), + localFileMetaData.MD5Hash.ToString(",")); + fileMetaDataMessages.Add(message); + } + + + if (DateTime.Compare(blobFileMetaData.LastModifiedDateUtc, localFileMetaData.LastModifiedDateUtc) != 0) + { + var message = String.Format("Last modified date of VHD file in blob storage ({0}) and local VHD file ({1}) does not match ", + blobFileMetaData.LastModifiedDateUtc, + localFileMetaData.LastModifiedDateUtc); + fileMetaDataMessages.Add(message); + } + + if (blobFileMetaData.FileFullName != localFileMetaData.FileFullName) + { + var message = String.Format("Full name of VHD file in blob storage ({0}) and local VHD file ({1}) does not match ", + blobFileMetaData.FileFullName, + localFileMetaData.FileFullName); + fileMetaDataMessages.Add(message); + } + + if (blobFileMetaData.CreatedDateUtc != localFileMetaData.CreatedDateUtc) + { + var message = String.Format("Full name of VHD file in blob storage ({0}) and local VHD file ({1}) does not match ", + blobFileMetaData.CreatedDateUtc, + localFileMetaData.CreatedDateUtc); + fileMetaDataMessages.Add(message); + } + return fileMetaDataMessages; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Sync/Upload/BlobSynchronizer.cs b/src/ServiceManagement/Compute/Sync/Upload/BlobSynchronizer.cs new file mode 100644 index 000000000000..a33d5f95144c --- /dev/null +++ b/src/ServiceManagement/Compute/Sync/Upload/BlobSynchronizer.cs @@ -0,0 +1,101 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Security.Cryptography; +using Microsoft.WindowsAzure.Commands.Sync.Threading; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.Sync.Upload +{ + public class BlobSynchronizer + { + private readonly UploadContext context; + private byte[] md5Hash; + private readonly IEnumerable dataWithRanges; + private readonly int maxParallelism; + private readonly long dataToUpload; + private readonly long alreadyUploadedData; + private CloudPageBlob blob; + + public BlobSynchronizer(UploadContext context, int maxParallelism) + { + this.context = context; + this.md5Hash = context.Md5HashOfLocalVhd; + this.dataWithRanges = context.UploadableDataWithRanges; + this.dataToUpload = context.UploadableDataSize; + this.alreadyUploadedData = context.AlreadyUploadedDataSize; + this.blob = context.DestinationBlob; + this.maxParallelism = maxParallelism; + } + + public bool Synchronize() + { + var uploadStatus = new ProgressStatus(alreadyUploadedData, alreadyUploadedData + dataToUpload, new ComputeStats()); + + using(new ServicePointHandler(blob.Uri, this.maxParallelism)) + using(new ProgressTracker(uploadStatus)) + { + var loopResult = Parallel.ForEach(dataWithRanges, + () => new CloudPageBlob(blob.Uri, blob.ServiceClient.Credentials), + (dwr, b) => + { + using (dwr) + { + var md5HashOfDataChunk = GetBase64EncodedMd5Hash(dwr.Data, (int) dwr.Range.Length); + using (var stream = new MemoryStream(dwr.Data, 0, (int)dwr.Range.Length)) + { + b.Properties.ContentMD5 = md5HashOfDataChunk; + b.WritePages(stream, dwr.Range.StartIndex); + } + } + uploadStatus.AddToProcessedBytes((int) dwr.Range.Length); + }, this.maxParallelism); + if(loopResult.IsExceptional) + { + if (loopResult.Exceptions.Any()) + { + Program.SyncOutput.ErrorUploadFailedWithExceptions(loopResult.Exceptions); + //TODO: throw an AggregateException + return false; + } + } + else + { + using(var bdms = new BlobMetaDataScope(new CloudPageBlob(blob.Uri, blob.ServiceClient.Credentials))) + { + bdms.Current.SetBlobMd5Hash(md5Hash); + bdms.Current.CleanUpUploadMetaData(); + bdms.Complete(); + } + } + } + return true; + } + + private static string GetBase64EncodedMd5Hash(byte[] data, int length) + { + using (var hash = MD5.Create()) + { + hash.TransformBlock(data, 0, length, null, 0); + hash.TransformFinalBlock(new byte[0], 0, 0); + var bytes = hash.Hash; + return Convert.ToBase64String(bytes); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Sync/Upload/ComputeStats.cs b/src/ServiceManagement/Compute/Sync/Upload/ComputeStats.cs new file mode 100644 index 000000000000..f4369f876fc0 --- /dev/null +++ b/src/ServiceManagement/Compute/Sync/Upload/ComputeStats.cs @@ -0,0 +1,51 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; + +namespace Microsoft.WindowsAzure.Commands.Tools.CsUpload +{ + internal class ComputeStats + { + IList history; + int historySize; + + public ComputeStats() : this(60) + { + } + + public ComputeStats(int historySize) + { + history = new List(historySize); + this.historySize = historySize; + } + + public double ComputeAvg(double current) + { + if (history.Count > historySize) + { + history.RemoveAt(0); + } + history.Add(current); + double sum = 0.0; + foreach (var x in history) + { + sum += x; + } + return sum / history.Count; + } + } +} + + diff --git a/src/ServiceManagement/Compute/Sync/Upload/DataWithRange.cs b/src/ServiceManagement/Compute/Sync/Upload/DataWithRange.cs new file mode 100644 index 000000000000..448b13e9bd37 --- /dev/null +++ b/src/ServiceManagement/Compute/Sync/Upload/DataWithRange.cs @@ -0,0 +1,62 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.ServiceModel.Channels; +using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model; + +namespace Microsoft.WindowsAzure.Commands.Sync.Upload +{ + public class DataWithRange : IDisposable + { + private readonly BufferManager manager; + private bool disposed; + + public DataWithRange(BufferManager manager) + { + this.manager = manager; + } + + public bool IsAllZero() + { + var startIndex = Array.FindIndex(this.Data, 0, (int)this.Range.Length, b => b != 0); + + return startIndex == -1; + } + + public byte[] Data { get; set; } + public IndexRange Range { get; set; } + + public void Dispose() + { + this.Dispose(true); + GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) + { + if (this.disposed) + { + return; + } + + if (disposing) + { + this.manager.ReturnBuffer(this.Data); + this.Data = null; + } + this.disposed = true; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Sync/Upload/ExtensionMethods.cs b/src/ServiceManagement/Compute/Sync/Upload/ExtensionMethods.cs new file mode 100644 index 000000000000..64e6253a7553 --- /dev/null +++ b/src/ServiceManagement/Compute/Sync/Upload/ExtensionMethods.cs @@ -0,0 +1,224 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model; +using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.Sync.Upload +{ + internal static class CloudPageBlobExtensions + { + public static void SetUploadMetaData(this CloudPageBlob blob, LocalMetaData metaData) + { + if (metaData == null) + { + throw new ArgumentNullException("metaData"); + } + blob.Metadata[LocalMetaData.MetaDataKey] = SerializationUtil.GetSerializedString(metaData); + } + + public static void CleanUpUploadMetaData(this CloudPageBlob blob) + { + blob.Metadata.Remove(LocalMetaData.MetaDataKey); + } + + public static LocalMetaData GetUploadMetaData(this CloudPageBlob blob) + { + if (blob.Metadata.Keys.Contains(LocalMetaData.MetaDataKey)) + { + return SerializationUtil.GetObjectFromSerializedString(blob.Metadata[LocalMetaData.MetaDataKey]); + } + return null; + } + + public static byte[] GetBlobMd5Hash(this CloudPageBlob blob) + { + blob.FetchAttributes(); + if (String.IsNullOrEmpty(blob.Properties.ContentMD5)) + { + return null; + } + + return Convert.FromBase64String(blob.Properties.ContentMD5); + } + + public static byte[] GetBlobMd5Hash(this CloudPageBlob blob, BlobRequestOptions requestOptions) + { + blob.FetchAttributes(new AccessCondition(), requestOptions); + if (String.IsNullOrEmpty(blob.Properties.ContentMD5)) + { + return null; + } + + return Convert.FromBase64String(blob.Properties.ContentMD5); + } + + public static void SetBlobMd5Hash(this CloudPageBlob blob, byte[] md5Hash) + { + var base64String = Convert.ToBase64String(md5Hash); + blob.Properties.ContentMD5 = base64String; + } + + public static void RemoveBlobMd5Hash(this CloudPageBlob blob) + { + blob.Properties.ContentMD5 = null; + } + + public static VhdFooter GetVhdFooter(this CloudPageBlob basePageBlob) + { + var vhdFileFactory = new VhdFileFactory(); + using (var file = vhdFileFactory.Create(basePageBlob.OpenRead())) + { + return file.Footer; + } + } + + public static bool Exists(this CloudPageBlob blob) + { + var listBlobItems = blob.Container.ListBlobs(); + var blobToUpload = listBlobItems.FirstOrDefault(b => b.Uri == blob.Uri); + if(blobToUpload is CloudBlockBlob) + { + var message = String.Format(" CsUpload is expecting a page blob, however a block blob was found: '{0}'.", blob.Uri); + throw new InvalidOperationException(message); + } + return blobToUpload != null; + } + + public static bool Exists(this CloudPageBlob blob, BlobRequestOptions options) + { + var listBlobItems = blob.Container.ListBlobs(null,false, BlobListingDetails.UncommittedBlobs, options); + var blobToUpload = listBlobItems.FirstOrDefault(b => b.Uri == blob.Uri); + if (blobToUpload is CloudBlockBlob) + { + var message = String.Format(" CsUpload is expecting a page blob, however a block blob was found: '{0}'.", blob.Uri); + throw new InvalidOperationException(message); + } + return blobToUpload != null; + } + } + + internal static class StringExtensions + { + public static string ToString(this IEnumerable source, string separator) + { + return "[" + string.Join(",", source.Select(s=>s.ToString()).ToArray()) + "]"; + } + } + + public class VhdFilePath + { + public VhdFilePath(string absolutePath, string relativePath) + { + AbsolutePath = absolutePath; + RelativePath = relativePath; + } + + public string AbsolutePath { get; private set; } + public string RelativePath { get; private set; } + } + + internal static class VhdFileExtensions + { + public static IEnumerable GetChildrenIds(this VhdFile vhdFile, Guid uniqueId) + { + var identityChain = vhdFile.GetIdentityChain(); + + if (!identityChain.Contains(uniqueId)) + { + yield break; + } + + foreach (var id in identityChain.TakeWhile(id => id != uniqueId)) + { + yield return id; + } + } + + public static VhdFilePath GetFilePathBy(this VhdFile vhdFile, Guid uniqueId) + { + VhdFilePath result = null; + string baseVhdPath = String.Empty; + var newBlocksOwners = new List { Guid.Empty }; + + var current = vhdFile; + while (current != null && current.Footer.UniqueId != uniqueId) + { + newBlocksOwners.Add(current.Footer.UniqueId); + if (current.Parent != null) + { + result = new VhdFilePath(current.Header.GetAbsoluteParentPath(), + current.Header.GetRelativeParentPath()); + } + current = current.Parent; + } + + if (result == null) + { + string message = String.Format("There is no parent VHD file with with the id '{0}'", uniqueId); + throw new InvalidOperationException(message); + } + + return result; + } + } + + public static class UriExtensions + { + /// + /// Normalizes a URI for use as a blob URI. + /// + /// + /// Ensures that the container name is lower-case. + /// + public static Uri NormalizeBlobUri(this Uri uri) + { + var ub = new UriBuilder(uri); + var parts = ub.Path + .Split(new char[] { '/' }, StringSplitOptions.None) + .Select((p, i) => i == 1 ? p.ToLowerInvariant() : p) + .ToArray(); + ub.Path = string.Join("/", parts); + return ub.Uri; + } + + } + + public static class ExceptionUtil + { + public static string DumpStorageExceptionErrorDetails(StorageException storageException) + { + if(storageException == null) + { + return string.Empty; + } + + var message = new StringBuilder(); + message.AppendLine("StorageException details"); + message.Append("ErrorCode:").AppendLine(storageException.RequestInformation.ExtendedErrorInformation.ErrorCode); + message.Append("ErrorMessage:").AppendLine(storageException.RequestInformation.ExtendedErrorInformation.ErrorMessage); + foreach (var key in storageException.RequestInformation.ExtendedErrorInformation.AdditionalDetails.Keys) + { + message.Append(key).Append(":").Append(storageException.RequestInformation.ExtendedErrorInformation.AdditionalDetails[key]); + } + return message.ToString(); + } + } +} diff --git a/src/ServiceManagement/Compute/Sync/Upload/IndexRangeHelper.cs b/src/ServiceManagement/Compute/Sync/Upload/IndexRangeHelper.cs new file mode 100644 index 000000000000..af02b700947a --- /dev/null +++ b/src/ServiceManagement/Compute/Sync/Upload/IndexRangeHelper.cs @@ -0,0 +1,60 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model; + +namespace Microsoft.WindowsAzure.Commands.Sync.Upload +{ + internal static class IndexRangeHelper + { + public static IEnumerable ChunkRangesBySize(IEnumerable extents, int pageSizeInBytes) + { + var extentRanges = extents.SelectMany(e => e.PartitionBy(pageSizeInBytes)); + var extentQueue = new Queue(extentRanges); + + if (extentQueue.Count == 0) + { + yield break; + } + + // move to next start position + do + { + var result = extentQueue.Dequeue(); + while (result.Length < pageSizeInBytes && extentQueue.Count > 0) + { + var nextRange = extentQueue.Peek(); + if (!nextRange.Abuts(result)) + { + break; + } + var mergedRange = nextRange.Merge(result); + if (mergedRange.Length <= pageSizeInBytes) + { + result = mergedRange; + extentQueue.Dequeue(); + } + else + { + break; + } + } + yield return result; + } while (extentQueue.Count > 0); + } + + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Sync/Upload/PatchingBlobCreator.cs b/src/ServiceManagement/Compute/Sync/Upload/PatchingBlobCreator.cs new file mode 100644 index 000000000000..922219415381 --- /dev/null +++ b/src/ServiceManagement/Compute/Sync/Upload/PatchingBlobCreator.cs @@ -0,0 +1,206 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using Microsoft.WindowsAzure.Commands.Sync.Download; +using Microsoft.WindowsAzure.Commands.Tools.Vhd; +using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.Sync.Upload +{ + public class PatchingBlobCreator : BlobCreatorBase + { + protected Uri baseVhdBlob; + protected BlobUri baseVhdBlobUri; + + public PatchingBlobCreator(FileInfo localVhd, BlobUri destination, BlobUri baseVhdBlob, ICloudPageBlobObjectFactory blobObjectFactory, bool overWrite) : + base(localVhd, destination, blobObjectFactory, overWrite) + { + this.baseVhdBlob = baseVhdBlob.Uri; + this.baseVhdBlobUri = baseVhdBlob; + } + + + protected override void CreateRemoteBlobAndPopulateContext(UploadContext context) + { + CreateRemoteBlob(); + PopulateContextWithUploadableRanges(localVhd, context, true); + PopulateContextWithDataToUpload(localVhd, context); + } + + private void CreateRemoteBlob() + { + var baseBlob = this.blobObjectFactory.Create(baseVhdBlobUri); + + if(!baseBlob.Exists()) + { + throw new InvalidOperationException(String.Format("Base image to patch doesn't exist in blob storage: {0}", baseVhdBlobUri.Uri)); + } + var blobVhdFooter = baseBlob.GetVhdFooter(); + + long blobSize; + VhdFilePath localBaseVhdPath; + IEnumerable childrenVhdIds; + using (var vhdFile = new VhdFileFactory().Create(localVhd.FullName)) + { + localBaseVhdPath = vhdFile.GetFilePathBy(blobVhdFooter.UniqueId); + childrenVhdIds = vhdFile.GetChildrenIds(blobVhdFooter.UniqueId).ToArray(); + blobSize = vhdFile.Footer.VirtualSize; + } + + FileMetaData fileMetaData = GetFileMetaData(baseBlob, localBaseVhdPath); + + var md5Hash = baseBlob.GetBlobMd5Hash(); + if (!md5Hash.SequenceEqual(fileMetaData.MD5Hash)) + { + var message = String.Format("Patching cannot proceed, MD5 hash of base image in blob storage ({0}) and base VHD file ({1}) does not match ", + baseBlob.Uri, + localBaseVhdPath); + throw new InvalidOperationException(message); + } + + Program.SyncOutput.MessageCreatingNewPageBlob(blobSize); + + CopyBaseImageToDestination(); + + using (var vds = new VirtualDiskStream(localVhd.FullName)) + { + var streamExtents = vds.Extents.ToArray(); + var enumerable = streamExtents.Where(e => childrenVhdIds.Contains(e.Owner)).ToArray(); + foreach (var streamExtent in enumerable) + { + var indexRange = streamExtent.Range; + destinationBlob.ClearPages(indexRange.StartIndex, indexRange.Length); + } + } + + using(var bmds = new BlobMetaDataScope(destinationBlob)) + { + bmds.Current.RemoveBlobMd5Hash(); + bmds.Current.SetUploadMetaData(OperationMetaData); + bmds.Complete(); + } + } + + private void CopyBaseImageToDestination() + { + var source = this.blobObjectFactory.Create(baseVhdBlobUri); + source.FetchAttributes(); + + var copyStatus = new ProgressStatus(0, source.Properties.Length); + using (new ProgressTracker(copyStatus, Program.SyncOutput.ProgressCopyStatus, Program.SyncOutput.ProgressCopyComplete,TimeSpan.FromSeconds(1))) + { + destinationBlob.StartCopyFromBlob(source); + destinationBlob.FetchAttributes(); + + while (true) + { + if (destinationBlob.CopyState.BytesCopied != null) + { + copyStatus.AddToProcessedBytes(destinationBlob.CopyState.BytesCopied.Value - copyStatus.BytesProcessed); + } + if (destinationBlob.CopyState.Status == CopyStatus.Success) + { + break; + } + if (destinationBlob.CopyState.Status == CopyStatus.Pending) + { + Thread.Sleep(TimeSpan.FromSeconds(1)); + } + else + { + throw new ApplicationException( + string.Format("Cannot copy source '{0}' to destination '{1}', copy state is '{2}'", source.Uri, + destinationBlob.Uri, destinationBlob.CopyState)); + } + destinationBlob.FetchAttributes(); + } + } + } + + private FileMetaData GetFileMetaData(CloudPageBlob baseBlob, VhdFilePath localBaseVhdPath) + { + FileMetaData fileMetaData; + if(File.Exists(localBaseVhdPath.AbsolutePath)) + { + fileMetaData = FileMetaData.Create(localBaseVhdPath.AbsolutePath); + } + else + { + var filePath = Path.Combine(localVhd.Directory.FullName, localBaseVhdPath.RelativePath); + if (File.Exists(filePath)) + { + fileMetaData = FileMetaData.Create(filePath); + } + else + { + var message = String.Format("Cannot find the local base image for '{0}' in neither of the locations '{1}', '{2}'.", + baseBlob.Uri, + localBaseVhdPath.AbsolutePath, + localBaseVhdPath.RelativePath); + throw new InvalidOperationException(message); + } + } + return fileMetaData; + } + } + + class BlobMetaDataScope : IDisposable + { + private readonly CloudPageBlob blob; + private bool disposed; + private bool completed; + + public BlobMetaDataScope(CloudPageBlob blob) + { + this.blob = blob; + this.blob.FetchAttributes(); + this.Current = blob; + } + + public CloudPageBlob Current { get; private set; } + + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + protected void Dispose(bool disposing) + { + if(disposing) + { + if(!this.disposed) + { + if(completed) + { + this.blob.SetMetadata(); + this.blob.SetProperties(); + } + this.disposed = true; + } + } + } + + public void Complete() + { + this.completed = true; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Sync/Upload/SerializationUtil.cs b/src/ServiceManagement/Compute/Sync/Upload/SerializationUtil.cs new file mode 100644 index 000000000000..0964fdcc02ae --- /dev/null +++ b/src/ServiceManagement/Compute/Sync/Upload/SerializationUtil.cs @@ -0,0 +1,46 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using System.Runtime.Serialization; +using System.Text; + +namespace Microsoft.WindowsAzure.Commands.Sync.Upload +{ + internal class SerializationUtil + { + public static T GetObjectFromSerializedString(string data) + { + var serializer = new DataContractSerializer(typeof(T)); + using (var memoryStream = new MemoryStream(Encoding.UTF8.GetBytes(data))) + { + return (T)serializer.ReadObject(memoryStream); + } + } + + public static string GetSerializedString(T localMetaData) + { + var serializer = new DataContractSerializer(typeof(T)); + string serializedString; + using (var memoryStream = new MemoryStream()) + { + serializer.WriteObject(memoryStream, localMetaData); + memoryStream.Flush(); + byte[] bytes = memoryStream.ToArray(); + serializedString = Encoding.UTF8.GetString(bytes, 0, bytes.Length); + } + return serializedString; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Sync/Upload/UploadContext.cs b/src/ServiceManagement/Compute/Sync/Upload/UploadContext.cs new file mode 100644 index 000000000000..1f3a00b662ce --- /dev/null +++ b/src/ServiceManagement/Compute/Sync/Upload/UploadContext.cs @@ -0,0 +1,66 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Threading; +using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.Sync.Upload +{ + public class UploadContext : IDisposable + { + private bool disposed; + + public CloudPageBlob DestinationBlob { get; set; } + + public IEnumerable UploadableDataWithRanges { get; set; } + + public IEnumerable UploadableRanges { get; set; } + + public long UploadableDataSize { get; set; } + + public long AlreadyUploadedDataSize { get; set; } + + public byte[] Md5HashOfLocalVhd { get; set; } + + public Mutex SingleInstanceMutex { get; set; } + + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) + { + if (disposed) + { + return; + } + + if(disposing) + { + if (SingleInstanceMutex != null) + { + SingleInstanceMutex.ReleaseMutex(); + SingleInstanceMutex.Close(); + } + + disposed = true; + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Sync/Upload/UploadOperationMetaData.cs b/src/ServiceManagement/Compute/Sync/Upload/UploadOperationMetaData.cs new file mode 100644 index 000000000000..758435d7f71b --- /dev/null +++ b/src/ServiceManagement/Compute/Sync/Upload/UploadOperationMetaData.cs @@ -0,0 +1,158 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Diagnostics; +using System.Globalization; +using System.IO; +using System.Runtime.Serialization; +using System.Security.Cryptography; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Sync.IO; +using Microsoft.WindowsAzure.Commands.Tools.Vhd; + +namespace Microsoft.WindowsAzure.Commands.Sync.Upload +{ + [DataContract] + public class FileMetaData + { + [DataMember(EmitDefaultValue = false, Order = 10)] + public string FileFullName { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 20)] + private string InternalCreatedDateUtc { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 30)] + private string InternalLastModifiedDateUtc { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 40)] + public long Size { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 50)] + public long VhdSize { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 60)] + public byte[] MD5Hash { get; set; } + + public DateTime CreatedDateUtc + { + get { return DateTime.Parse(this.InternalCreatedDateUtc, DateTimeFormatInfo.InvariantInfo); } + set { this.InternalCreatedDateUtc = value.ToString(DateTimeFormatInfo.InvariantInfo); } + } + + public DateTime LastModifiedDateUtc + { + get { return DateTime.Parse(this.InternalLastModifiedDateUtc, DateTimeFormatInfo.InvariantInfo); } + set { this.InternalLastModifiedDateUtc = value.ToString(DateTimeFormatInfo.InvariantInfo); } + } + + public static FileMetaData Create(string filePath) + { + var fileInfo = new FileInfo(filePath); + if(!fileInfo.Exists) + { + throw new FileNotFoundException(filePath); + } + + using(var stream = new VirtualDiskStream(filePath)) + { + return new FileMetaData + { + FileFullName = fileInfo.FullName, + CreatedDateUtc = DateTime.SpecifyKind(fileInfo.CreationTimeUtc, DateTimeKind.Utc), + LastModifiedDateUtc = DateTime.SpecifyKind(fileInfo.LastWriteTimeUtc, DateTimeKind.Utc), + Size = fileInfo.Length, + VhdSize = stream.Length, + MD5Hash = CalculateMd5Hash(stream, filePath) + }; + } + } + + private static byte[] CalculateMd5Hash(Stream stream, string filePath) + { + using(var md5 = MD5.Create()) + { + using (var swrp = new StreamWithReadProgress(stream, TimeSpan.FromSeconds(1))) + { + var bs = new BufferedStream(swrp); + Program.SyncOutput.MessageCalculatingMD5Hash(filePath); + var md5Hash = md5.ComputeHash(bs); + Program.SyncOutput.MessageMD5HashCalculationFinished(); + return md5Hash; + } + } + } + } + + [DataContract] + public class SystemInformation + { + [DataMember(EmitDefaultValue = false, Order = 10)] + public string MachineName { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 20)] + public int CsUploadProcessId { get; set; } + + [PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")] + public static SystemInformation Create() + { + return new SystemInformation + { + MachineName = Environment.MachineName, + CsUploadProcessId = Process.GetCurrentProcess().Id + }; + } + } + + + [DataContract] + public class LocalMetaData + { + public static string MetaDataKey = "localmetadata"; + + [DataMember(EmitDefaultValue = false, Order = 10)] + public FileMetaData FileMetaData { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 20)] + public SystemInformation SystemInformation { get; set; } + } + + [DataContract] + public class LeaseMetaData + { + public static string MetaDataKey = "leasemetadata"; + + [DataMember(EmitDefaultValue = false, Order = 10)] + public Guid LeaseId { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 20)] + public DateTime LeaseExpirationDateUtc { get; set; } + } + + [DataContract] + public class BlobMetaData + { + public static string MetaDataKey = "blobmetadata"; + + [DataMember(EmitDefaultValue = false, Order = 10)] + public string ETag { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 20)] + public DateTime LastModifiedUtc { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 30)] + public byte[] MD5Hash { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/Sync/packages.config b/src/ServiceManagement/Compute/Sync/packages.config new file mode 100644 index 000000000000..af1815e71397 --- /dev/null +++ b/src/ServiceManagement/Compute/Sync/packages.config @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Async/AsyncMachine.cs b/src/ServiceManagement/Compute/VhdManagement/Async/AsyncMachine.cs new file mode 100644 index 000000000000..3c656bcd7a53 --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Async/AsyncMachine.cs @@ -0,0 +1,1148 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Threading; + +namespace Microsoft.WindowsAzure.Commands.Tools.Common.General +{ + // + // The asynchronous machine below supports two modes, either all operations are required to complete or + // only a subset of them (quorum) is required to proceed. There is also a completion port optimization + // for a single asynchronous operation (CompletionPort.SingleOperation) to avoid unnecessary memory allocations. + // + // Examples: + // + // Scenario 1: Single asynchronous operation without an explicit timeout + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // + // ... + // AsyncMachine machine = new AsyncMachine(); + // machine.Start(this.ProcessMessage(asyncMachine, message)); + // ... + // + // IEnumerable ProcessMessage(AsyncMachine machine, Message message) + // { + // ... + // WebRequest request = WebRequest.Create(); + // + // request.BeginGetResponse(machine.CompletionCallback, null); + // + // yield return CompletionPort.SingleOperation; + // + // ProcessWebResponse(request, machine.CompletionResult); + // ... + // + // + // Scenario 2: Multiple asynchronous operations with time out + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // + // IEnumerable ProcessMessage(AsyncMachine machine, Message message) + // { + // ... + // CompletionPort port = machine.CreateCompletionPort(TimeSpan.FromSeconds(10)); + // + // foreach (WebRequest request in pendingRequests) + // { + // request.BeginGetResponse(port[request].CompletionCallback, null); + // } + // + // yield return port; + // + // foreach (WebRequest request in pendingRequests) + // { + // // The operation is not completed if it's timed out + // if (port[request].IsCompleted) + // { + // ProcessWebResponse(request, port[request].CompletionResult); + // } + // else + // { + // port[request].Cancel(request.EndGetResponse); + // } + // } + // ... + // + // + // Scenario 3: Multiple asynchronous operations with quorum and time out + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // + // IEnumerable ProcessMessage(AsyncMachine machine, Message message) + // { + // ... + // + // // The async machine will resume if 3 operations out of 5 will complete + // CompletionPort port = machine.CreateCompletionPort(5, 3, TimeSpan.FromSeconds(10)); + // + // for (int c = 0; c < 5; ++c) + // { + // WebRequest request = pendingRequests[c]; + // + // request.BeginGetResponse(port[request].CompletionCallback, null); + // } + // + // yield return port; + // + // for (int c = 0; c < 5; ++c) + // { + // WebRequest request = pendingRequests[c]; + // + // // The operation is not completed if it's timed out + // if (port[request].IsCompleted) + // { + // ProcessWebResponse(request, port[request].CompletionResult); + // } + // else + // { + // port[request].Cancel(request.EndGetResponse); + // } + // } + // ... + // + + // Represents an asynchronous operation + public class AsyncOperation + { + #region Constructors + + internal AsyncOperation(Action checkOperationCompletion) + { + Debug.Assert(checkOperationCompletion != null); + + this.CheckOperationCompletion = checkOperationCompletion; + this.CompletionCallback = this.AsyncCallback; + } + + #endregion + + public AsyncCallback CompletionCallback { get; private set; } + + public IAsyncResult CompletionResult + { + get + { + if (this.completionResult == null) + { + throw new InvalidOperationException("Completion result is not available yet."); + } + + return this.completionResult; + } + } + + // Indicates whether a particular asynchronous operation is completed + public bool IsCompleted { get; internal set; } + + // Cancels pending async operation meaning that we'll call the corresponding end operation whenever it completes + // (since there is no currently real cancelation mechanism for .NET async operations) + public void Cancel(AsyncCallback endAsyncOperation) + { + if (endAsyncOperation == null) + { + throw new ArgumentNullException("endAsyncOperation"); + } + + this.EndAsynchronousOperation = endAsyncOperation; + + if (this.CompletionResult != null && Interlocked.CompareExchange(ref this.isEndOperationCalled, True, False) == False) + { + // The operation is completed but end async operation is not called yet, need to call it + this.EndAsynchronousOperation(this.CompletionResult); + } + } + + #region Private Members + + // Gets invoked when an asynchronous operation has completed + private void AsyncCallback(IAsyncResult result) + { + if (result == null) + { + throw new ArgumentNullException("result"); + } + + this.completionResult = result; + + // this.CheckOperationCompletion will set AsyncOperation.IsCompleted to false if quorum is reached or timeout is expired, + // and async machine has resumed its execution. In this case we'll consider the operation not completed in time and + // require user to schedule cancelation on completion port + this.CheckOperationCompletion(this); + + if (!this.IsCompleted && this.EndAsynchronousOperation != null && Interlocked.CompareExchange(ref this.isEndOperationCalled, True, False) == False) + { + // Call an end of asynchronous operation method if callback above returned false, this means + // it's us who is responsible for calling the end of asynchronous operation + this.EndAsynchronousOperation(this.CompletionResult); + } + } + + private Action CheckOperationCompletion { get; set; } + private AsyncCallback EndAsynchronousOperation { get; set; } + private IAsyncResult completionResult; + private int isEndOperationCalled; + + const int True = -1; + const int False = 0; + + #endregion + } + + // Defines a completion port which keeps track of asynchronous operations which can be run concurrently + // and results of their execution + public class CompletionPort + { + #region Constructors + + internal CompletionPort( + Action callback, + int totalOperationsCount, + int quorumOperationsCount, + TimeSpan timeout + ) + { + if (callback == null) + { + throw new ArgumentNullException("callback"); + } + + if (quorumOperationsCount > totalOperationsCount) + { + throw new ArgumentException("Invalid quorum operations count."); + } + + this.AsyncMachineResume = callback; + this.TotalOperationsCount = totalOperationsCount; + this.QuorumOperationsCount = quorumOperationsCount; + this.Timeout = timeout; + + this.OperationsLock = new object(); + this.Operations = new Dictionary(totalOperationsCount); + } + + internal CompletionPort(bool isSingleOperation) + { + Debug.Assert(isSingleOperation); + + this.IsSingleOperation = isSingleOperation; + } + + #endregion + + // Gets an asynchronous operation instance to be used for a given actor + public AsyncOperation this[object actor] + { + get + { + if (this.Operations == null) + { + throw new InvalidOperationException("CompletionPort.SingleOperation is not mutable."); + } + + AsyncOperation operation; + + lock (this.OperationsLock) + { + if (!this.Operations.TryGetValue(actor, out operation)) + { + // Check if async machine resume callback is already called, this means that + // this completion port is being reused which we don't allow + if (this.asyncMachineResumed == True) + { + throw new InvalidOperationException("Attempt to reuse a completion port."); + } + + operation = new AsyncOperation(this.CheckOperationCompletion); + this.Operations.Add(actor, operation); + } + } + + return operation; + } + } + + // Total number of operations in this completion token + public int TotalOperationsCount { get; private set; } + + // Number of operations to treat as a success to advance + public int QuorumOperationsCount { get; private set; } + + // Timeout indicating when wait on this completion port expires + public TimeSpan Timeout { get; private set; } + + // Provides a completion port to be used for single asynchronous operations + public static CompletionPort SingleOperation { get; private set; } + + #region Internal Members + + // Called by the async machine when this port is timed out and all operations have to marked as such + internal void TimeOutPort() + { + if (Interlocked.CompareExchange(ref this.asyncMachineResumed, True, False) == False) + { + // + // Async machine is not resumed at this point despite that some operations may be completed by this time. + // We'll mark all operations as incomplete and resume async machine execution so that user would schedule + // cancelation on all port operations. + // + + lock (this.OperationsLock) + { + foreach (var pair in this.Operations) + { + pair.Value.IsCompleted = false; + } + } + + Debug.Assert(this.AsyncMachineResume != null); + + this.AsyncMachineResume(); + } + } + + internal bool IsSingleOperation { get; private set; } + internal static readonly TimeSpan InfiniteWait = new TimeSpan(0, 0, 0, 0, -1); + + #endregion + + #region Private Members + + // Creates a singleton instance of completion port which can be used when async machine runs single + // asynchronous operations + static CompletionPort() + { + CompletionPort.SingleOperation = new CompletionPort(true); + } + + // Invoked by a completed asynchronous operation + private void CheckOperationCompletion(AsyncOperation operation) + { + // Mark async operation as completed if async machine is not resumed yet + operation.IsCompleted = this.asyncMachineResumed == False; + + if (operation.IsCompleted) + { + // + // Check if all or quorum (in case we're in quorum mode) number of operations have completed, + // in this case we need to notify the state machine that it can resume + // + + Debug.Assert(this.QuorumOperationsCount > 0); + + if (Interlocked.Increment(ref this.completedOperations) >= this.QuorumOperationsCount && + Interlocked.CompareExchange(ref this.asyncMachineResumed, True, False) == False) + { + Debug.Assert(this.AsyncMachineResume != null); + + this.AsyncMachineResume(); + } + } + } + + private Action AsyncMachineResume { get; set; } + private Dictionary Operations { get; set; } + private object OperationsLock { get; set; } + private int asyncMachineResumed; + private int completedOperations; + + const int True = -1; + const int False = 0; + + #endregion + } + + public delegate IEnumerable MachineEngine(AsyncMachine machine); + public delegate IEnumerable MachineEngine

(AsyncMachine machine, P param); + public delegate IEnumerable MachineEngine(AsyncMachine machine, P1 param1, P2 param2); + public delegate IEnumerable MachineEngine(AsyncMachine machine, P1 param1, P2 param2, P3 param3); + public delegate IEnumerable MachineEngine(AsyncMachine machine, P1 param1, P2 param2, P3 param3, P4 param4); + public delegate IEnumerable MachineEngine(AsyncMachine machine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5); + public delegate IEnumerable MachineEngine(AsyncMachine machine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6); + public delegate IEnumerable MachineEngine(AsyncMachine machine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6, P7 param7); + public delegate IEnumerable MachineEngine(AsyncMachine machine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6, P7 param7, P8 param8); + public delegate IEnumerable MachineEngine(AsyncMachine machine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6, P7 param7, P8 param8, P9 param9); + public delegate IEnumerable MachineEngine(AsyncMachine machine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6, P7 param7, P8 param8, P9 param9, P10 param10); + public delegate IEnumerable MachineEngine(AsyncMachine machine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6, P7 param7, P8 param8, P9 param9, P10 param10, P11 param11); + + // General purpose async machine which supports single (optimized) and multiple + // asynchronous operations + public class AsyncMachine : IAsyncResult, IDisposable + { + #region Helper static methods + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine(MachineEngine engine, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine)); + return machine; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine

(MachineEngine

engine, P param, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine, param)); + return machine; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine(MachineEngine engine, P1 param1, P2 param2, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine, param1, param2)); + return machine; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine(MachineEngine engine, P1 param1, P2 param2, P3 param3, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine, param1, param2, param3)); + return machine; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine(MachineEngine engine, P1 param1, P2 param2, P3 param3, P4 param4, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine, param1, param2, param3, param4)); + return machine; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine(MachineEngine engine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine, param1, param2, param3, param4, param5)); + return machine; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine(MachineEngine engine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine, param1, param2, param3, param4, param5, param6)); + return machine; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine(MachineEngine engine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6, P7 param7, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine, param1, param2, param3, param4, param5, param6, param7)); + return machine; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine(MachineEngine engine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6, P7 param7, P8 param8, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine, param1, param2, param3, param4, param5, param6, param7, param8)); + return machine; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine(MachineEngine engine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6, P7 param7, P8 param8, P9 param9, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine, param1, param2, param3, param4, param5, param6, param7, param8, param9)); + return machine; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine(MachineEngine engine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6, P7 param7, P8 param8, P9 param9, P10 param10, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10)); + return machine; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine(MachineEngine engine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6, P7 param7, P8 param8, P9 param9, P10 param10, P11 param11, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11)); + return machine; + } + + + public static void EndAsyncMachine(IAsyncResult result) + { + using (AsyncMachine machine = (AsyncMachine)result) + { + machine.End(); + } + } + + #endregion + + #region Constructors + + public AsyncMachine(AsyncCallback callback, object state) + { + this.asyncMachineCompletionCallback = callback; + this.AsyncState = state; + + this.CompletionCallback = this.SingleOperationCompletionCallback; + this.moveNextLock = new object(); + } + + #endregion + + + // Create completion port with infinite timeout + public CompletionPort CreateCompletionPort(int totalOperationsCount) + { + return CreateCompletionPort(totalOperationsCount, CompletionPort.InfiniteWait); + } + + // Create completion port with specified timeout + public CompletionPort CreateCompletionPort(int totalOperationsCount, TimeSpan timeout) + { + return CreateCompletionPort(totalOperationsCount, totalOperationsCount, timeout); + } + + // Creates completion port in the quorum mode with a specified timeout (you can use CompletionPort.InfiniteWait + // for infinite timeout) + public CompletionPort CreateCompletionPort(int totalOperationsCount, int quorumOperationsCount) + { + return CreateCompletionPort( + totalOperationsCount, + quorumOperationsCount, + CompletionPort.InfiniteWait); + } + + // Creates completion port in the quorum mode with a specified timeout (you can use CompletionPort.InfiniteWait + // for infinite timeout) + public CompletionPort CreateCompletionPort(int totalOperationsCount, int quorumOperationsCount, TimeSpan timeout) + { + if (this.Enumerator == null) + { + throw new InvalidOperationException("Async machine either hasn't started yet or has already completed."); + } + + return new CompletionPort( + this.AsyncMachineResumeCallback, + totalOperationsCount, + quorumOperationsCount, + timeout); + } + + public delegate void ExceptionCleanupDelegate(object sender, EventArgs e); + + // Event which is fired when exception cleanup is required + public event ExceptionCleanupDelegate ExceptionCleanup; + + // Starts executing of the async machine + public void Start(IEnumerable machine) + { + Debug.Assert(null == this.Enumerator || this.IsCompleted); + + if (null == machine) + { + throw new ArgumentNullException("machine"); + } + + this.Enumerator = machine.GetEnumerator(); + this.IsCompleted = false; + this.Error = null; + + if (this.waitHandle != null) + { + this.waitHandle.Reset(); + } + + lock (this.moveNextLock) + { + this.CompletedSynchronously = true; + + this.MoveNext(); + + if (!this.IsCompleted) + { + this.CompletedSynchronously = false; + } + } + } + + // Ends the async machine and waits for its completion if necessary + public void End() + { + if (!this.IsCompleted) + { + this.AsyncWaitHandle.WaitOne(); + } + + Debug.Assert(this.IsCompleted); + + if (this.Error != null) + { + throw this.Error.PrepareServerStackForRethrow(); + } + } + + // A callback supplied to a single asynchronous operation to get notified when it's completed + public AsyncCallback CompletionCallback { get; private set; } + + // A result of completed single asynchronous operation when AsyncMachine.CompletionCallback is used + public IAsyncResult CompletionResult + { + get + { + if (this.completionResult == null) + { + throw new InvalidOperationException("Completion result is not available yet."); + } + + return this.completionResult; + } + } + + #region IAsyncResult Members + + public object AsyncState { get; private set; } + + public WaitHandle AsyncWaitHandle + { + get + { + if (null == this.waitHandle) + { + lock (this.moveNextLock) + { + if (null == this.waitHandle) + { + this.waitHandle = new EventWaitHandle(this.IsCompleted, EventResetMode.ManualReset); + } + } + } + + return this.waitHandle; + } + } + + public bool CompletedSynchronously { get; private set; } + + public bool IsCompleted { get; private set; } + + #endregion + + #region IDisposable Members + + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool isDisposing) + { + if(isDisposing) + { + if (this.waitHandle != null) + { + this.waitHandle.Close(); + this.waitHandle = null; + } + + if (this.WakeUpTimer != null) + { + this.WakeUpTimer.Dispose(); + this.WakeUpTimer = null; + } + } + } + + #endregion + + #region Private Members + + private void MoveNext() + { + lock (this.moveNextLock) + { + using (this.EnterThreadContext()) + { + this.MoveNextInternal(); + } + } + } + + private void MoveNextInternal() + { + Debug.Assert(this.Enumerator != null); + Debug.Assert(!this.IsCompleted); + Debug.Assert(null == this.Error); + + if (!this.InsideMoveNext) + { + try + { + try + { + this.InsideMoveNext = true; + this.IsCompleted = !this.Enumerator.MoveNext(); + + if (!this.IsCompleted) + { + if (this.Enumerator.Current == null) + { + throw new InvalidOperationException("Completion port for current iteration is null."); + } + + if (!this.Enumerator.Current.IsSingleOperation) + { + if (this.Enumerator.Current.TotalOperationsCount == 0) + { + // No operations are specified on the port, do another machine iteration + this.InsideMoveNext = false; + this.MoveNext(); + return; + } + else + { + // Check if we should schedule a wake up for the current completion port. That needs to happen + // when we use non-optimized completion port with a timeout + if (!this.Enumerator.Current.Timeout.Equals(CompletionPort.InfiniteWait)) + { + if (this.WakeUpTimer != null) + { + this.WakeUpTimer.Dispose(); + } + + // + // BUGBUG: Too expensive. Use single active task to implement timers + // + this.WakeUpTimer = new Timer( + this.CompletionPortTimeoutCallback, + this.Enumerator.Current, + this.Enumerator.Current.Timeout, + CompletionPort.InfiniteWait); + } + } + } + } + } + finally + { + this.InsideMoveNext = false; + } + } + catch (Exception e) + { + if (e.IsCritical()) + { + Trace.TraceError("Failed to forward message: {0}", e); + throw; + } + + Trace.TraceWarning("Failed to forward message: {0}", e); + + this.Error = e; + this.IsCompleted = true; + + if (this.ExceptionCleanup != null) + { + this.ExceptionCleanup(this, EventArgs.Empty); + } + } + + this.CompletedMoveNext(); + + if (this.AsyncMethodCompletedSynchronously && !this.IsCompleted) + { + this.AsyncMethodCompletedSynchronously = false; + + this.MoveNext(); + } + } + else + { + // + // Call to asynchronous I/O was completed synchronously (i.e. this thread is currently executing MoveNext down the stack) + // + + Debug.Assert(!this.AsyncMethodCompletedSynchronously); + + this.AsyncMethodCompletedSynchronously = true; + } + } + + private void CompletedMoveNext() + { + if (this.IsCompleted) + { + this.Enumerator = null; + + if (null != this.waitHandle) + { + this.waitHandle.Set(); + } + + if (this.asyncMachineCompletionCallback != null) + { + this.asyncMachineCompletionCallback((IAsyncResult)this); + } + } + } + + // Called by the WakeUpTimer when a scheduled timeout wait for the given completion + // port is expired + private void CompletionPortTimeoutCallback(object state) + { + Debug.Assert(state != null); + + CompletionPort port = (CompletionPort)state; + + port.TimeOutPort(); + } + + // Called by the completion port when quorum of asynchronous operations are completed + private void AsyncMachineResumeCallback() + { + // Check if quorum was reached with all operations finishing synchronously + if (!this.InsideMoveNext) + { + IEnumerator enumerator = this.Enumerator; + + // It should never happen that this callback is called for CompletionPort with single operation + if (enumerator != null && enumerator.Current != null && enumerator.Current.IsSingleOperation) + { + throw new InvalidOperationException("CompletionPort.SingleOperation was used."); + } + } + + this.MoveNext(); + } + + // Called by the completed single asynchronous operation + private void SingleOperationCompletionCallback(IAsyncResult asyncResult) + { + if (asyncResult == null) + { + throw new ArgumentNullException("asyncResult"); + } + + Debug.Assert(this.InsideMoveNext || this.Enumerator != null); + Debug.Assert(this.InsideMoveNext || this.Enumerator.Current != null); + + this.completionResult = asyncResult; + + this.MoveNext(); + } + + #region Thread Context helpers + + private IDisposable EnterThreadContext() + { + return null; + } + #endregion + + private IEnumerator Enumerator { get; set; } + private Exception Error { get; set; } + private bool InsideMoveNext { get; set; } + private bool AsyncMethodCompletedSynchronously { get; set; } + private Timer WakeUpTimer { get; set; } + private EventWaitHandle waitHandle; + private IAsyncResult completionResult; + private readonly AsyncCallback asyncMachineCompletionCallback; + private readonly object moveNextLock; + #endregion + } + + #region Parameterized async machines + + public delegate IEnumerable MachineEngineT(AsyncMachine machine); + public delegate IEnumerable MachineEngineT(AsyncMachine machine, P param); + public delegate IEnumerable MachineEngineT(AsyncMachine machine, P1 param1, P2 param2); + public delegate IEnumerable MachineEngineT(AsyncMachine machine, P1 param1, P2 param2, P3 param3); + public delegate IEnumerable MachineEngineT(AsyncMachine machine, P1 param1, P2 param2, P3 param3, P4 param4); + public delegate IEnumerable MachineEngineT(AsyncMachine machine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5); + public delegate IEnumerable MachineEngineT(AsyncMachine machine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6); + public delegate IEnumerable MachineEngineT(AsyncMachine machine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6, P7 param7); + public delegate IEnumerable MachineEngineT(AsyncMachine machine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6, P7 param7, P8 param8); + public delegate IEnumerable MachineEngineT(AsyncMachine machine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6, P7 param7, P8 param8, P9 param9); + public delegate IEnumerable MachineEngineT(AsyncMachine machine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6, P7 param7, P8 param8, P9 param9, P10 param10); + public delegate IEnumerable MachineEngineT(AsyncMachine machine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6, P7 param7, P8 param8, P9 param9, P10 param10, P11 param11); + + public sealed class AsyncMachine : AsyncMachine + { + #region Helper static methods + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine(MachineEngineT engine, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine)); + return machine; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine

(MachineEngineT engine, P param, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine, param)); + return machine; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine(MachineEngineT engine, P1 param1, P2 param2, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine, param1, param2)); + return machine; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine(MachineEngineT engine, P1 param1, P2 param2, P3 param3, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine, param1, param2, param3)); + return machine; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine(MachineEngineT engine, P1 param1, P2 param2, P3 param3, P4 param4, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine, param1, param2, param3, param4)); + return machine; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine(MachineEngineT engine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine, param1, param2, param3, param4, param5)); + return machine; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine(MachineEngineT engine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine, param1, param2, param3, param4, param5, param6)); + return machine; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine(MachineEngineT engine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6, P7 param7, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine, param1, param2, param3, param4, param5, param6, param7)); + return machine; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine(MachineEngineT engine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6, P7 param7, P8 param8, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine, param1, param2, param3, param4, param5, param6, param7, param8)); + return machine; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine(MachineEngineT engine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6, P7 param7, P8 param8, P9 param9, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine, param1, param2, param3, param4, param5, param6, param7, param8, param9)); + return machine; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine(MachineEngineT engine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6, P7 param7, P8 param8, P9 param9, P10 param10, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10)); + return machine; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine(MachineEngineT engine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6, P7 param7, P8 param8, P9 param9, P10 param10, P11 param11, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11)); + return machine; + } + + public new static T EndAsyncMachine(IAsyncResult result) + { + using (AsyncMachine machine = (AsyncMachine)result) + { + machine.End(); + return machine.ParameterValue; + } + } + + #endregion + + public AsyncMachine() + : this(null, null) + { + } + + public AsyncMachine(AsyncCallback callback, object state) + : base(callback, state) + { + } + + public T ParameterValue { get; set; } + } + + public delegate IEnumerable MachineEngineRT(AsyncMachine machine); + public delegate IEnumerable MachineEngineRT(AsyncMachine machine, P param); + public delegate IEnumerable MachineEngineRT(AsyncMachine machine, P1 param1, P2 param2); + public delegate IEnumerable MachineEngineRT(AsyncMachine machine, P1 param1, P2 param2, P3 param3); + public delegate IEnumerable MachineEngineRT(AsyncMachine machine, P1 param1, P2 param2, P3 param3, P4 param4); + public delegate IEnumerable MachineEngineRT(AsyncMachine machine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5); + public delegate IEnumerable MachineEngineRT(AsyncMachine machine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6); + public delegate IEnumerable MachineEngineRT(AsyncMachine machine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6, P7 param7); + public delegate IEnumerable MachineEngineRT(AsyncMachine machine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6, P7 param7, P8 param8); + public delegate IEnumerable MachineEngineRT(AsyncMachine machine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6, P7 param7, P8 param8, P9 param9); + public delegate IEnumerable MachineEngineRT(AsyncMachine machine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6, P7 param7, P8 param8, P9 param9, P10 param10); + public delegate IEnumerable MachineEngineRT(AsyncMachine machine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6, P7 param7, P8 param8, P9 param9, P10 param10, P11 param11); + + public sealed class AsyncMachine : AsyncMachine + { + #region Helper static methods + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine(MachineEngineRT engine, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine)); + return machine; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine

(MachineEngineRT engine, P param, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine, param)); + return machine; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine(MachineEngineRT engine, P1 param1, P2 param2, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine, param1, param2)); + return machine; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine(MachineEngineRT engine, P1 param1, P2 param2, P3 param3, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine, param1, param2, param3)); + return machine; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine(MachineEngineRT engine, P1 param1, P2 param2, P3 param3, P4 param4, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine, param1, param2, param3, param4)); + return machine; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine(MachineEngineRT engine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine, param1, param2, param3, param4, param5)); + return machine; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine(MachineEngineRT engine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine, param1, param2, param3, param4, param5, param6)); + return machine; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine(MachineEngineRT engine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6, P7 param7, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine, param1, param2, param3, param4, param5, param6, param7)); + return machine; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine(MachineEngineRT engine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6, P7 param7, P8 param8, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine, param1, param2, param3, param4, param5, param6, param7, param8)); + return machine; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine(MachineEngineRT engine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6, P7 param7, P8 param8, P9 param9, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine, param1, param2, param3, param4, param5, param6, param7, param8, param9)); + return machine; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine(MachineEngineRT engine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6, P7 param7, P8 param8, P9 param9, P10 param10, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10)); + return machine; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "EndAsyncMachine does the disposing")] + public static IAsyncResult BeginAsyncMachine(MachineEngineRT engine, P1 param1, P2 param2, P3 param3, P4 param4, P5 param5, P6 param6, P7 param7, P8 param8, P9 param9, P10 param10, P11 param11, AsyncCallback callback, object asyncState) + { + AsyncMachine machine = new AsyncMachine(callback, asyncState); + machine.Start(engine(machine, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11)); + return machine; + } + + public static TReturn EndAsyncMachine(IAsyncResult result, out T parameterValue) + { + using (AsyncMachine machine = (AsyncMachine)result) + { + machine.End(); + parameterValue = machine.ParameterValue; + return machine.ReturnValue; + } + } + + #endregion + + public AsyncMachine() + : this(null, null) + { + } + + public AsyncMachine(AsyncCallback callback, object state) + : base(callback, state) + { + } + + public TReturn ReturnValue { get; set; } + public T ParameterValue { get; set; } + } + + #endregion +} diff --git a/src/ServiceManagement/Compute/VhdManagement/Async/ExceptionExtension.cs b/src/ServiceManagement/Compute/VhdManagement/Async/ExceptionExtension.cs new file mode 100644 index 000000000000..9d9905e3eac1 --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Async/ExceptionExtension.cs @@ -0,0 +1,59 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Diagnostics; +using System.Reflection; +using System.Runtime.InteropServices; +using System.Threading; + +namespace Microsoft.WindowsAzure.Commands.Tools.Common.General +{ + public static class ExceptionExtensions + { + private static readonly MethodInfo methodPrepForRemoting = typeof(Exception).GetMethod("PrepForRemoting", BindingFlags.NonPublic | BindingFlags.Instance); + + public static bool IsCritical( + this Exception exception + ) + { + Debug.Assert(null != exception); + + if (null == exception) + { + throw new ArgumentNullException("exception"); + } + + return ( + (exception is AccessViolationException) || + (exception is InsufficientMemoryException) || + (exception is OutOfMemoryException) || + (exception is SEHException) || + (exception is StackOverflowException) || + (exception is ThreadAbortException) + ); + } + + public static Exception PrepareServerStackForRethrow( + this Exception exception + ) + { + Debug.Assert(null != exception); + + methodPrepForRemoting.Invoke(exception, new object[0]); + + return exception; + } + } +} diff --git a/src/ServiceManagement/Compute/VhdManagement/MSSharedLibKey.snk b/src/ServiceManagement/Compute/VhdManagement/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ServiceManagement/Compute/VhdManagement/MSSharedLibKey.snk differ diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/AttributeHelper.cs b/src/ServiceManagement/Compute/VhdManagement/Model/AttributeHelper.cs new file mode 100644 index 000000000000..f552e3426f49 --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/AttributeHelper.cs @@ -0,0 +1,94 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Linq.Expressions; +using System.Reflection; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model +{ + public class AttributeHelper + { + private readonly Type type; + public AttributeHelper() + { + type = typeof (T); + } + + public VhdEntityAttribute GetEntityAttribute() + { + var attributes = type.GetCustomAttributes(typeof(VhdEntityAttribute), false); + if (attributes.Length == 0) + { + throw new InvalidOperationException(String.Format("Entity must have the attribute:{0}", typeof(VhdEntityAttribute).Name)); + } + return (VhdEntityAttribute)attributes[0]; + } + + public VhdPropertyAttribute GetAttribute(Expression> propertyNameProvider) + { + MemberExpression me; + if (propertyNameProvider.Body is UnaryExpression) + { + me = ((UnaryExpression)propertyNameProvider.Body).Operand as MemberExpression; + } + else + { + me = propertyNameProvider.Body as MemberExpression; + } + + if (me == null || me.Expression.Type != type) + { + throw new InvalidOperationException("Not a valid expression, must be a VhdFooter property access"); + } + + var propertyName = me.Member.Name; + + var attributes = from p in type.GetProperties(BindingFlags.Instance | BindingFlags.Public) + let vhdPropertyAttributes = p.GetCustomAttributes(typeof(VhdPropertyAttribute), false) + let exists = vhdPropertyAttributes.Length > 0 + where p.Name == propertyName + select (VhdPropertyAttribute)(vhdPropertyAttributes[0]); + return attributes.FirstOrDefault(); + } + + public VhdPropertyAttribute GetAttribute(Expression> propertyNameProvider) + { + MemberExpression me; + if (propertyNameProvider.Body is UnaryExpression) + { + me = ((UnaryExpression)propertyNameProvider.Body).Operand as MemberExpression; + } + else + { + me = propertyNameProvider.Body as MemberExpression; + } + + if (me == null || me.Expression.Type != type) + { + throw new InvalidOperationException("Not a valid expression, must be a VhdFooter property access"); + } + + var propertyName = me.Member.Name; + + var attributes = from p in type.GetProperties(BindingFlags.Instance | BindingFlags.Public) + let vhdPropertyAttributes = p.GetCustomAttributes(typeof(VhdPropertyAttribute), false) + let exists = vhdPropertyAttributes.Length > 0 + where p.Name == propertyName + select (VhdPropertyAttribute)(vhdPropertyAttributes[0]); + return attributes.FirstOrDefault(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/BitMap.cs b/src/ServiceManagement/Compute/VhdManagement/Model/BitMap.cs new file mode 100644 index 000000000000..109f5cf0077e --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/BitMap.cs @@ -0,0 +1,38 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model +{ + public class BitMap + { + public BitMap(BitArray data) + { + this.Data = data; + Covered = CheckIfCovered(); + } + + public BitArray Data { get; private set; } + + public bool Covered { get; private set; } + + bool CheckIfCovered() + { + for (int i = 0; i < Data.Length; i++) + if (!Data[i]) return false; + return true; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/Block.cs b/src/ServiceManagement/Compute/VhdManagement/Model/Block.cs new file mode 100644 index 000000000000..f46c24cd9f06 --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Block.cs @@ -0,0 +1,65 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model +{ + public class Block + { + private readonly IBlockFactory blockFactory; + private byte[] data; + + public Block(IBlockFactory blockFactory) + { + this.blockFactory = blockFactory; + } + + public Guid VhdUniqueId { get; set; } + public uint BlockIndex { get; set; } + public BitMap BitMap { get; set; } + + public byte[] Data + { + get + { + if (data == null) + { + data = this.blockFactory.ReadBlockData(this); + } + return data; + } + } + + public long SectorCount + { + get { return this.LogicalRange.Length / VhdConstants.VHD_SECTOR_LENGTH; } + } + + public Sector GetSector(uint sector) + { + return this.blockFactory.GetSector(this, sector); + } + + public bool Empty { get; set; } + + public IndexRange LogicalRange { get; set; } + + public override string ToString() + { + return BlockIndex.ToString(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/BlockAllocationTable.cs b/src/ServiceManagement/Compute/VhdManagement/Model/BlockAllocationTable.cs new file mode 100644 index 000000000000..6a004f821c2e --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/BlockAllocationTable.cs @@ -0,0 +1,61 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model +{ + public class BlockAllocationTable + { + private readonly uint blockSize; + + public BlockAllocationTable(uint size, uint blockSize, uint[] bat) + { + this.blockSize = blockSize; + this.Size = size; + this.Data = bat; + } + + public uint Size { get; internal set; } + + private uint[] Data { get; set; } + + public long GetBlockAddress(uint block) + { + return GetBitMapAddress(block) + GetSectorPaddedBitmapSizeInBytes(); + } + + public long GetBitMapAddress(uint block) + { + return ((long)this.Data[block]) * VhdConstants.VHD_SECTOR_LENGTH; + } + + public int GetSectorPaddedBitmapSizeInBytes() + { + var sectorSpanOfBitMap = (double)GetBitmapSizeInBytes() / VhdConstants.VHD_SECTOR_LENGTH; + return (int)(Math.Ceiling(sectorSpanOfBitMap) * VhdConstants.VHD_SECTOR_LENGTH); + } + + public int GetBitmapSizeInBytes() + { + return (int)(blockSize / VhdConstants.VHD_SECTOR_LENGTH / 8); + } + + public bool HasData(uint block) + { + return block != VhdConstants.VHD_NO_DATA_INT && Data[block] != VhdConstants.VHD_NO_DATA_INT; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/DiskGeometry.cs b/src/ServiceManagement/Compute/VhdManagement/Model/DiskGeometry.cs new file mode 100644 index 000000000000..1736edbdbd6d --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/DiskGeometry.cs @@ -0,0 +1,122 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model +{ + [VhdEntity(Size = 4)] + public class DiskGeometry + { + public static DiskGeometry CreateFromVirtualSize(long size) + { + long totalSectors = size / VhdConstants.VHD_SECTOR_LENGTH; + if (totalSectors > 65535 * 16 * 255) + { + totalSectors = 65535 * 16 * 255; + } + + int sectorsPerTrack; + int heads; + long cylinderTimesHeads; + if (totalSectors >= 65535 * 16 * 63) + { + sectorsPerTrack = 255; + heads = 16; + cylinderTimesHeads = totalSectors / sectorsPerTrack; + } + else + { + sectorsPerTrack = 17; + cylinderTimesHeads = totalSectors / sectorsPerTrack; + + heads = (int) ((cylinderTimesHeads + 1023) / 1024); + + if (heads < 4) + { + heads = 4; + } + if (cylinderTimesHeads >= (heads * 1024) || heads > 16) + { + sectorsPerTrack = 31; + heads = 16; + cylinderTimesHeads = totalSectors / sectorsPerTrack; + } + if (cylinderTimesHeads >= (heads * 1024)) + { + sectorsPerTrack = 63; + heads = 16; + cylinderTimesHeads = totalSectors / sectorsPerTrack; + } + } + long cylinders = cylinderTimesHeads/heads; + + return new DiskGeometry + { + Cylinder = (short) cylinders, + Heads = (byte) heads, + Sectors = (byte) sectorsPerTrack + }; + } + + [VhdProperty(Offset = 0, Size = 2)] + public short Cylinder { get; set; } + + [VhdProperty(Offset = 2, Size = 1)] + public byte Heads { get; set; } + + [VhdProperty(Offset = 3, Size = 1)] + public byte Sectors { get; set; } + + public DiskGeometry CreateCopy() + { + return new DiskGeometry + { + Cylinder = this.Cylinder, + Heads = this.Heads, + Sectors = this.Sectors + }; + } + + public override string ToString() + { + return String.Format("Cylinder:{0}, Heads:{1}, Sector:{2}", Cylinder, Heads, Sectors); + } + + public override bool Equals(object obj) + { + if (ReferenceEquals(null, obj)) return false; + if (ReferenceEquals(this, obj)) return true; + if (obj.GetType() != typeof (DiskGeometry)) return false; + return Equals((DiskGeometry) obj); + } + + private bool Equals(DiskGeometry other) + { + return other.Cylinder == Cylinder && other.Heads == Heads && other.Sectors == Sectors; + } + + public override int GetHashCode() + { + unchecked + { + int result = Cylinder.GetHashCode(); + result = (result*397) ^ Heads.GetHashCode(); + result = (result*397) ^ Sectors.GetHashCode(); + return result; + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/DiskType.cs b/src/ServiceManagement/Compute/VhdManagement/Model/DiskType.cs new file mode 100644 index 000000000000..26ba48bc5835 --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/DiskType.cs @@ -0,0 +1,24 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model +{ + public enum DiskType + { + None = 0, + Fixed = 2, + Dynamic = 3, + Differencing = 4 + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/HostOsType.cs b/src/ServiceManagement/Compute/VhdManagement/Model/HostOsType.cs new file mode 100644 index 000000000000..b65b44b61104 --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/HostOsType.cs @@ -0,0 +1,22 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model +{ + public enum HostOsType + { + Windows = 0x5769326B, + Macintosh = 0x4D616320 + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/IndexRange.cs b/src/ServiceManagement/Compute/VhdManagement/Model/IndexRange.cs new file mode 100644 index 000000000000..fedd6d199337 --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/IndexRange.cs @@ -0,0 +1,214 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model +{ + public class IndexRange : IEquatable + { + static IndexRangeComparer comparer = new IndexRangeComparer(); + + public static IEnumerable SubstractRanges(IEnumerable source, IEnumerable ranges) + { + var onlyInSource = source.Where(e => !ranges.Any(r => r.Intersects(e))); + + var irs = + from ur in ranges + from r in source + where r.Intersects(ur) + from ir in r.Subtract(ur) + select ir; + + var result = irs.Distinct(new IndexRangeComparer()).ToList(); + result.AddRange(onlyInSource); + result.Sort((r1, r2) => r1.CompareTo(r2)); + return result; + } + + public static IndexRange FromLength(long startIndex, long length) + { + return new IndexRange(startIndex, startIndex + length - 1); + } + + public IndexRange(long startIndex, long endIndex) + { + this.StartIndex = startIndex; + this.EndIndex = endIndex; + } + + public bool After(IndexRange range) + { + if(Intersects(range)) + { + return false; + } + + return (this.StartIndex > range.EndIndex); + } + + public IEnumerable Subtract(IndexRange range) + { + if(this.Equals(range)) + { + return new List(); + } + if(!this.Intersects(range)) + { + return new List {this}; + } + var intersection = this.Intersection(range); + if(this.Equals(intersection)) + { + return new List(); + } + if(intersection.StartIndex == this.StartIndex) + { + return new List {new IndexRange(intersection.EndIndex + 1, this.EndIndex)}; + } + if (intersection.EndIndex == this.EndIndex) + { + return new List { new IndexRange(this.StartIndex, intersection.StartIndex - 1)}; + } + return new List + { + new IndexRange(this.StartIndex, intersection.StartIndex - 1), + new IndexRange(intersection.EndIndex + 1, this.EndIndex) + }; + } + + public bool Abuts(IndexRange range) + { + return !this.Intersects(range) && this.Gap(range) == null; + } + + public IndexRange Gap(IndexRange range) + { + if(this.Intersects(range)) + return null; + if(this.CompareTo(range) > 0) + { + var r = new IndexRange(range.EndIndex + 1, this.StartIndex - 1); + if(r.Length <= 0) + return null; + return r; + } + var result = new IndexRange(this.EndIndex + 1, range.StartIndex - 1); + if(result.Length <= 0) + return null; + return result; + } + + public int CompareTo(IndexRange range) + { + return this.StartIndex != range.StartIndex ? + this.StartIndex.CompareTo(range.StartIndex) : + this.EndIndex.CompareTo(range.EndIndex); + } + + public IndexRange Merge(IndexRange range) + { + if(!this.Abuts(range)) + { + throw new ArgumentOutOfRangeException("range", "Ranges must be adjacent."); + } + if(this.CompareTo(range) > 0) + { + return new IndexRange(range.StartIndex, this.EndIndex); + } + return new IndexRange(this.StartIndex, range.EndIndex); + } + + public IEnumerable PartitionBy(int size) + { + if(this.Length <= size) + { + return new List {this}; + } + var result = new List(); + long count = this.Length/size; + long remainder = this.Length%size; + for (long i = 0; i < count; i++) + { + result.Add(IndexRange.FromLength(this.StartIndex + i*size, size)); + } + if(remainder != 0) + { + result.Add(IndexRange.FromLength(this.StartIndex + count*size, remainder)); + } + return result; + } + + public IndexRange Intersection(IndexRange range) + { + if(!this.Intersects(range)) + { + return null; + } + var start = Math.Max(range.StartIndex, this.StartIndex); + var end = Math.Min(range.EndIndex, this.EndIndex); + + return new IndexRange(start, end); + } + + public bool Intersects(IndexRange range) + { + var start = Math.Max(range.StartIndex, this.StartIndex); + var end = Math.Min(range.EndIndex, this.EndIndex); + return start <= end; + } + + public bool Includes(IndexRange range) + { + return this.Includes(range.StartIndex) && this.Includes(range.EndIndex); + } + + public long EndIndex { get; private set; } + + public long StartIndex { get; private set; } + + public bool Includes(long value) + { + return value >= StartIndex && value <= EndIndex; + } + + public long Length + { + get { return EndIndex - StartIndex + 1; } + } + + public bool Equals(IndexRange other) + { + return other != null && this.StartIndex == other.StartIndex && this.EndIndex == other.EndIndex; + } + + public override string ToString() + { + return String.Format("[{0},{1}]", StartIndex, EndIndex); + } + + public override bool Equals(object obj) + { + var range = obj as IndexRange; + return range != null && comparer.Equals(this, range); + } + + public override int GetHashCode() + { + return comparer.GetHashCode(this); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/IndexRangeComparer.cs b/src/ServiceManagement/Compute/VhdManagement/Model/IndexRangeComparer.cs new file mode 100644 index 000000000000..342014e82d87 --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/IndexRangeComparer.cs @@ -0,0 +1,33 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model +{ + public class IndexRangeComparer : IEqualityComparer + { + public bool Equals(IndexRange first, IndexRange second) + { + return first.Equals(second); + } + + public int GetHashCode(IndexRange range) + { + var hash = 17 + range.StartIndex.GetHashCode(); + hash = hash * 17 + range.EndIndex.GetHashCode(); + return hash; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/Model.cs b/src/ServiceManagement/Compute/VhdManagement/Model/Model.cs new file mode 100644 index 000000000000..c4121cdf3c0a --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Model.cs @@ -0,0 +1,162 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Runtime.Serialization; +using Microsoft.WindowsAzure.Commands.Tools.Common.General; +using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model +{ + [Flags] + public enum VhdValidationType + { + None, + IsVhd, + FixedDisk, + } + + public class VhdValidator + { + public static IList Validate(VhdValidationType validation, string path) + { + var fileFactory = new VhdFileFactory(); + VhdFile vhdFile = null; + Exception exception = null; + try + { + vhdFile = fileFactory.Create(path); + } + catch (VhdParsingException e) + { + exception = e; + } + + return DoValidate(validation, vhdFile, exception); + } + + public static IList Validate(VhdValidationType validation, Stream vhdStream) + { + + var fileFactory = new VhdFileFactory(); + VhdFile vhdFile = null; + Exception exception = null; + try + { + vhdFile = fileFactory.Create(vhdStream); + } + catch (VhdParsingException e) + { + exception = e; + } + + return DoValidate(validation, vhdFile, exception); + } + + private static IList DoValidate(VhdValidationType validation, VhdFile vhdFile, Exception exception) + { + var result = new List(); + + if ((validation & VhdValidationType.IsVhd) == VhdValidationType.IsVhd) + { + var validationResult = new VhdValidationResult + { + ValidationType = VhdValidationType.IsVhd + }; + if (vhdFile == null) + { + validationResult.ErrorCode = 1000; + validationResult.Error = exception; + } + result.Add(validationResult); + } + + if ((validation & VhdValidationType.FixedDisk) == VhdValidationType.FixedDisk) + { + var validationResult = new VhdValidationResult + { + ValidationType = VhdValidationType.FixedDisk + }; + if (vhdFile == null || vhdFile.Footer.DiskType != DiskType.Fixed) + { + validationResult.ErrorCode = 1001; + } + result.Add(validationResult); + } + return result; + } + + public static IAsyncResult BeginValidate(VhdValidationType validation, Stream vhdStream, AsyncCallback callback, object state) + { + return AsyncMachine>.BeginAsyncMachine(ValidateAsync, validation, vhdStream, callback, state); + } + + public static IList EndValidate(IAsyncResult result) + { + return AsyncMachine>.EndAsyncMachine(result); + } + + private static IEnumerable ValidateAsync(AsyncMachine> machine, VhdValidationType validation, Stream vhdStream) + { + var result = new List(); + + var fileFactory = new VhdFileFactory(); + + fileFactory.BeginCreate(vhdStream, machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + + VhdFile vhdFile = null; + Exception exception = null; + try + { + vhdFile = fileFactory.EndCreate(machine.CompletionResult); + } + catch (VhdParsingException e) + { + exception = e; + } + + machine.ParameterValue = DoValidate(validation, vhdFile, exception); + } + } + + public class VhdValidationResult + { + public int ErrorCode { get; set; } + public VhdValidationType ValidationType{ get; set; } + public Exception Error { get; set; } + } + + [Serializable] + public class VhdParsingException : Exception + { + public VhdParsingException() + { + } + + public VhdParsingException(string message) : base(message) + { + } + + public VhdParsingException(string message, Exception innerException) : base(message, innerException) + { + } + + protected VhdParsingException(SerializationInfo info, StreamingContext context) : base(info, context) + { + } + } +} diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/ParentLocator.cs b/src/ServiceManagement/Compute/VhdManagement/Model/ParentLocator.cs new file mode 100644 index 000000000000..3a0b0983d8c1 --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/ParentLocator.cs @@ -0,0 +1,39 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model +{ + + + [VhdEntity(Size = 24)] + public class ParentLocator + { + [VhdProperty(Offset = 0, Size = 4)] + public PlatformCode PlatformCode { get; set; } + + [VhdProperty(Offset = 4, Size = 4)] + public int PlatformDataSpace { get; set; } + + [VhdProperty(Offset = 8, Size = 4)] + public int PlatformDataLength { get; set; } + + [VhdProperty(Offset = 12, Size = 4)] + public int Reserved { get; set; } + + [VhdProperty(Offset = 16, Size = 8)] + public long PlatformDataOffset { get; set; } + + public string PlatformSpecificFileLocator { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/AbstractDiskBlockFactory.cs b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/AbstractDiskBlockFactory.cs new file mode 100644 index 000000000000..0d15d38f45e7 --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/AbstractDiskBlockFactory.cs @@ -0,0 +1,73 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence +{ + public abstract class AbstractDiskBlockFactory : IBlockFactory + { + protected readonly VhdFile vhdFile; + private byte[] emptyBlockData; + + protected AbstractDiskBlockFactory(VhdFile vhdFile) + { + this.vhdFile = vhdFile; + } + + public abstract Block Create(uint block); + public abstract Sector GetSector(Block block, uint sector); + + public IndexRange GetFooterRange() + { + return IndexRange.FromLength(this.GetBlockSize() * this.BlockCount, VhdConstants.VHD_FOOTER_SIZE); + } + + public byte[] ReadBlockData(Block block) + { + if (!this.HasData(block.BlockIndex)) + { + if (emptyBlockData == null) + { + emptyBlockData = new byte[(int)GetBlockSize()]; + Array.Clear(emptyBlockData, 0, emptyBlockData.Length); + } + return emptyBlockData; + } + return DoReadBlockData(block); + } + + protected abstract byte[] DoReadBlockData(Block block); + + public long BlockCount + { + get { return vhdFile.BlockAllocationTable.Size; } + } + + public bool HasData(uint blockIndex) + { + return vhdFile.BlockAllocationTable.HasData(blockIndex); + } + + public long GetBlockAddress(uint blockIndex) + { + return vhdFile.BlockAllocationTable.GetBlockAddress(blockIndex); + } + + public long GetBlockSize() + { + return vhdFile.Header.BlockSize; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/BitMapFactory.cs b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/BitMapFactory.cs new file mode 100644 index 000000000000..d25ff13a0d44 --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/BitMapFactory.cs @@ -0,0 +1,50 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence +{ + public class BitMapFactory + { + private readonly VhdFile vhdFile; + + public BitMapFactory(VhdFile vhdFile) + { + this.vhdFile = vhdFile; + } + + public BitMap Create(uint block) + { + var bitMapAddress = vhdFile.BlockAllocationTable.GetBitMapAddress(block); + var bitmapSizeInBytes = vhdFile.BlockAllocationTable.GetBitmapSizeInBytes(); + var bytes = vhdFile.DataReader.ReadBytes(bitMapAddress, bitmapSizeInBytes); + ReverseBitsIfLittleEndian(bytes); + return new BitMap(new BitArray(bytes)); + } + + private static void ReverseBitsIfLittleEndian(byte[] bytes) + { + if (BitConverter.IsLittleEndian) + { + for (int bit = 0; bit < bytes.Length; bit++) + { + // reverse the bits due to quirky BitArray + bytes[bit] = (byte)(((bytes[bit] * 0x80200802UL) & 0x0884422110UL) * 0x0101010101UL >> 32); + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/BlockAllocationTableFactory.cs b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/BlockAllocationTableFactory.cs new file mode 100644 index 000000000000..170c19c3a1ba --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/BlockAllocationTableFactory.cs @@ -0,0 +1,68 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Microsoft.WindowsAzure.Commands.Tools.Common.General; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence +{ + public class BlockAllocationTableFactory + { + private readonly VhdDataReader dataReader; + private readonly VhdHeader header; + + public BlockAllocationTableFactory(VhdDataReader dataReader, VhdHeader header) + { + this.dataReader = dataReader; + this.header = header; + } + + public BlockAllocationTable Create() + { + dataReader.SetPosition(header.TableOffset); + + var bat = new uint[header.MaxTableEntries]; + for (int block = 0; block < header.MaxTableEntries; block++) + { + bat[block] = dataReader.ReadUInt32(); + } + return new BlockAllocationTable(header.MaxTableEntries, header.BlockSize, bat); + } + + public IAsyncResult BeginCreate( AsyncCallback callback, object state) + { + return AsyncMachine.BeginAsyncMachine(CreateAsync, callback, state); + } + + public BlockAllocationTable EndCreate(IAsyncResult result) + { + return AsyncMachine.EndAsyncMachine(result); + } + + private IEnumerable CreateAsync(AsyncMachine machine) + { + dataReader.SetPosition(header.TableOffset); + + var bat = new uint[header.MaxTableEntries]; + for (int block = 0; block < header.MaxTableEntries; block++) + { + dataReader.BeginReadUInt32(machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + bat[block] = dataReader.EndReadUInt32(machine.CompletionResult); + } + machine.ParameterValue = new BlockAllocationTable(header.MaxTableEntries, header.BlockSize, bat); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/CloudVhdFileCreator.cs b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/CloudVhdFileCreator.cs new file mode 100644 index 000000000000..f02e0d8b01e8 --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/CloudVhdFileCreator.cs @@ -0,0 +1,60 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using Microsoft.WindowsAzure.Commands.Tools.Common.General; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence +{ + public class VhdFileCreator + { + public static void CreateFixedVhdFile(Stream destination, long virtualSize) + { + var footer = VhdFooterFactory.CreateFixedDiskFooter(virtualSize); + var serializer = new VhdFooterSerializer(footer); + var buffer = serializer.ToByteArray(); + destination.SetLength(virtualSize + VhdConstants.VHD_FOOTER_SIZE); + destination.Seek(-VhdConstants.VHD_FOOTER_SIZE, SeekOrigin.End); + + destination.Write(buffer, 0, buffer.Length); + destination.Flush(); + } + + public static IAsyncResult BeginCreateFixedVhdFile(Stream destination, long size, AsyncCallback callback, object state) + { + return AsyncMachine.BeginAsyncMachine(CreateFixedVhdFileAtAsync, destination, size, callback, state); + } + + public static void EndCreateFixedVhdFile(IAsyncResult result) + { + AsyncMachine.EndAsyncMachine(result); + } + + private static IEnumerable CreateFixedVhdFileAtAsync(AsyncMachine machine, Stream destination, long virtualSize) + { + var footer = VhdFooterFactory.CreateFixedDiskFooter(virtualSize); + var serializer = new VhdFooterSerializer(footer); + var buffer = serializer.ToByteArray(); + destination.SetLength(virtualSize + VhdConstants.VHD_FOOTER_SIZE); + destination.Seek(-VhdConstants.VHD_FOOTER_SIZE, SeekOrigin.End); + + destination.BeginWrite(buffer, 0, buffer.Length, machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + destination.EndWrite(machine.CompletionResult); + destination.Flush(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/DifferencingDiskBlockFactory.cs b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/DifferencingDiskBlockFactory.cs new file mode 100644 index 000000000000..54e92b537b6c --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/DifferencingDiskBlockFactory.cs @@ -0,0 +1,87 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence +{ + public class DifferencingDiskBlockFactory : AbstractDiskBlockFactory + { + private BitMapFactory bitMapFactory; + private SectorFactory sectorFactory; + private IBlockFactory parentBlockFactory; + private Block cachedBlock; + + public DifferencingDiskBlockFactory(VhdFile vhdFile) : base(vhdFile) + { + this.bitMapFactory = new BitMapFactory(vhdFile); + this.sectorFactory = new SectorFactory(vhdFile, this); + this.parentBlockFactory = vhdFile.Parent.DiskType != DiskType.Fixed ? vhdFile.Parent.GetBlockFactory() : new FixedDiskBlockFactory(vhdFile.Parent, this.GetBlockSize()); + } + + public override Block Create(uint block) + { + if(!vhdFile.BlockAllocationTable.HasData(block)) + { + if(cachedBlock == null || cachedBlock.BlockIndex != block) + { + cachedBlock = parentBlockFactory.Create(block); + } + return cachedBlock; + } + + if (cachedBlock == null || cachedBlock.BlockIndex != block) + { + cachedBlock = new Block(this) + { + BlockIndex = block, + VhdUniqueId = this.vhdFile.Footer.UniqueId, + LogicalRange = IndexRange.FromLength(block * GetBlockSize(), vhdFile.Header.BlockSize), + BitMap = bitMapFactory.Create(block), + Empty = false + }; + } + return cachedBlock; + } + + public override Sector GetSector(Block block, uint sector) + { + if(block.Empty) + { + return this.sectorFactory.CreateEmptySector(block.BlockIndex, sector); + } + + if(block.BitMap != null && block.BitMap.Data[(int) sector]) + { + return this.sectorFactory.Create(block, sector); + } + + var parentBlock = parentBlockFactory.Create(block.BlockIndex); + return parentBlockFactory.GetSector(parentBlock, sector); + } + + protected override byte[] DoReadBlockData(Block block) + { + var result = new byte[GetBlockSize()]; + int index = 0; + for (int i = 0; i < block.SectorCount; i++) + { + var sector = block.GetSector((uint)i); + Buffer.BlockCopy(sector.Data, 0, result, index, sector.Data.Length); + index += sector.Data.Length; + } + return result; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/DiskTypeFactory.cs b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/DiskTypeFactory.cs new file mode 100644 index 000000000000..55b52edc1f12 --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/DiskTypeFactory.cs @@ -0,0 +1,34 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence +{ + public class DiskTypeFactory + { + public DiskType Create(uint diskType) + { + switch (diskType) + { + case 0: return DiskType.None; + case 2: return DiskType.Fixed; + case 3: return DiskType.Dynamic; + case 4: return DiskType.Differencing; + default: + throw new VhdParsingException(String.Format("Unsupported format: DiskType is {0}", diskType)); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/DynamicDiskBlockFactory.cs b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/DynamicDiskBlockFactory.cs new file mode 100644 index 000000000000..760266a596fd --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/DynamicDiskBlockFactory.cs @@ -0,0 +1,77 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence +{ + + + public class DynamicDiskBlockFactory : AbstractDiskBlockFactory + { + private BitMapFactory bitMapFactory; + private SectorFactory sectorFactory; + private Block cachedBlock; + + public DynamicDiskBlockFactory(VhdFile vhdFile) : base(vhdFile) + { + this.bitMapFactory = new BitMapFactory(vhdFile); + this.sectorFactory = new SectorFactory(vhdFile, this); + } + + public override Block Create(uint block) + { + if (!vhdFile.BlockAllocationTable.HasData(block)) + { + if (cachedBlock == null || cachedBlock.BlockIndex != block) + { + cachedBlock = new Block(this) + { + BlockIndex = block, + VhdUniqueId = this.vhdFile.Footer.UniqueId, + LogicalRange = IndexRange.FromLength(block * GetBlockSize(), vhdFile.Header.BlockSize), + BitMap = null, + Empty = true + }; + } + return cachedBlock; + } + + if(cachedBlock == null || cachedBlock.BlockIndex != block) + { + cachedBlock = new Block(this) + { + BlockIndex = block, + VhdUniqueId = this.vhdFile.Footer.UniqueId, + LogicalRange = IndexRange.FromLength(block * GetBlockSize(), vhdFile.Header.BlockSize), + BitMap = bitMapFactory.Create(block), + Empty = false + }; + } + return cachedBlock; + } + + public override Sector GetSector(Block block, uint sector) + { + if(block.Empty) + { + return this.sectorFactory.CreateEmptySector(block.BlockIndex, sector); + } + return this.sectorFactory.Create(block, sector); + } + + protected override byte[] DoReadBlockData(Block block) + { + return vhdFile.DataReader.ReadBytes(GetBlockAddress(block.BlockIndex), (int)GetBlockSize()); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/FixedDiskBlockFactory.cs b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/FixedDiskBlockFactory.cs new file mode 100644 index 000000000000..36dace9bc6ae --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/FixedDiskBlockFactory.cs @@ -0,0 +1,132 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence +{ + public class FixedDiskBlockFactory : IBlockFactory + { + private readonly VhdFile vhdFile; + private SectorFactory sectorFactory; + private Block cachedBlock; + private long blockSize; + private long? extraBlockIndex; + + public FixedDiskBlockFactory(VhdFile vhdFile) : this(vhdFile, VhdConstants.VHD_DEFAULT_BLOCK_SIZE) + { + } + + public FixedDiskBlockFactory(VhdFile vhdFile, long blockSize) + { + this.vhdFile = vhdFile; + this.blockSize = blockSize; + this.BlockCount = CalculateBlockCount(); + this.sectorFactory = new SectorFactory(vhdFile, this); + } + + private int CalculateBlockCount() + { + var count = this.vhdFile.Footer.VirtualSize * 1.0m / this.GetBlockSize(); + if(Math.Floor(count) < Math.Ceiling(count)) + { + extraBlockIndex = (long) Math.Floor(count); + } + return (int)Math.Ceiling(count); + } + + public long BlockCount { get; private set; } + + public Block Create(uint block) + { + if (!this.HasData(block)) + { + if (cachedBlock == null || cachedBlock.BlockIndex != block) + { + IndexRange logicalRange = IndexRange.FromLength(block * GetBlockSize(), this.GetBlockSize()); + if (extraBlockIndex.HasValue && block == extraBlockIndex) + { + long startIndex = block * GetBlockSize(); + long size = this.vhdFile.DataReader.Size - startIndex - VhdConstants.VHD_FOOTER_SIZE; + logicalRange = IndexRange.FromLength(startIndex, size); + } + cachedBlock = new Block(this) + { + BlockIndex = block, + VhdUniqueId = this.vhdFile.Footer.UniqueId, + LogicalRange = logicalRange, + BitMap = null, + Empty = true + }; + } + return cachedBlock; + } + if(cachedBlock == null || cachedBlock.BlockIndex != block) + { + IndexRange logicalRange = IndexRange.FromLength(block * GetBlockSize(), this.GetBlockSize()); + if (extraBlockIndex.HasValue && block == extraBlockIndex) + { + long startIndex = block * GetBlockSize(); + long size = this.vhdFile.DataReader.Size - startIndex - VhdConstants.VHD_FOOTER_SIZE; + logicalRange = IndexRange.FromLength(startIndex, size); + } + cachedBlock = new Block(this) + { + BlockIndex = block, + VhdUniqueId = this.vhdFile.Footer.UniqueId, + LogicalRange = logicalRange, + Empty = false + }; + } + return cachedBlock; + } + + public byte[] ReadBlockData(Block block) + { + long blockAddress = GetBlockAddress(block.BlockIndex); + return vhdFile.DataReader.ReadBytes(blockAddress, (int) block.LogicalRange.Length); + } + + public Sector GetSector(Block block, uint sector) + { + if (block.Empty) + { + return this.sectorFactory.CreateEmptySector(block.BlockIndex, sector); + } + return this.sectorFactory.Create(block, sector); + } + + public IndexRange GetFooterRange() + { + long startIndex = this.vhdFile.DataReader.Size - VhdConstants.VHD_FOOTER_SIZE; + var logicalRange = IndexRange.FromLength(startIndex, VhdConstants.VHD_FOOTER_SIZE); + return logicalRange; + } + + public bool HasData(uint blockIndex) + { + return blockIndex != VhdConstants.VHD_NO_DATA_INT; + } + + public long GetBlockAddress(uint blockIndex) + { + return blockIndex * this.blockSize; + } + + public long GetBlockSize() + { + return this.blockSize; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/IBlockFactory.cs b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/IBlockFactory.cs new file mode 100644 index 000000000000..e780a6daf794 --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/IBlockFactory.cs @@ -0,0 +1,32 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence +{ + public interface IBlockFactory + { + long BlockCount { get; } + + long GetBlockSize(); + long GetBlockAddress(uint blockIndex); + bool HasData(uint blockIndex); + + Block Create(uint block); + byte[] ReadBlockData(Block block); + + Sector GetSector(Block block, uint sector); + + IndexRange GetFooterRange(); + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/SectorFactory.cs b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/SectorFactory.cs new file mode 100644 index 000000000000..54b3c7d221a7 --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/SectorFactory.cs @@ -0,0 +1,71 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence +{ + public class SectorFactory + { + private readonly VhdFile vhdFile; + private readonly IBlockFactory blockFactory; + + public SectorFactory(VhdFile vhdFile, IBlockFactory blockFactory) + { + this.vhdFile = vhdFile; + this.blockFactory = blockFactory; + } + + public Sector Create(Block blockArg, uint sector) + { + uint block = blockArg.BlockIndex; + long totalSectors = blockArg.SectorCount; + if (sector > totalSectors) + { + string message = String.Format("TotalSectors: {0}, Requested Sector:{1}", totalSectors, sector); + throw new ArgumentOutOfRangeException("sector", message); + } + if (!blockFactory.HasData(block)) + { + return CreateEmptySector(block, sector); + } + + long currentAddress = blockFactory.GetBlockAddress(block); + vhdFile.DataReader.SetPosition(currentAddress + (int)VhdConstants.VHD_SECTOR_LENGTH * sector); + + var result = new Sector + { + BlockIndex = block, + SectorIndex = sector, + GlobalSectorIndex = this.blockFactory.GetBlockSize() * block + sector, + Data = vhdFile.DataReader.ReadBytes((int)VhdConstants.VHD_SECTOR_LENGTH) + }; + return result; + } + + public Sector CreateEmptySector(uint block, uint sector) + { + var buffer = new byte[((int)VhdConstants.VHD_SECTOR_LENGTH)]; + Array.Clear(buffer, 0, buffer.Length); + var emptySector = new Sector + { + BlockIndex = block, + SectorIndex = sector, + GlobalSectorIndex = this.blockFactory.GetBlockSize() * block + sector, + Data = buffer + }; + return emptySector; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/StreamHelper.cs b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/StreamHelper.cs new file mode 100644 index 000000000000..926062a1af31 --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/StreamHelper.cs @@ -0,0 +1,95 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using Microsoft.WindowsAzure.Commands.Tools.Common.General; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence +{ + public class StreamHelper + { + public static IAsyncResult BeginReadBytes(Stream stream, long offset, int length, AsyncCallback callback, object state) + { + stream.Seek(offset, SeekOrigin.Begin); + return AsyncMachine.BeginAsyncMachine(ReadBytesAsync, stream, length, callback, state); + } + + public static IAsyncResult BeginReadBytes(Stream stream, long offset, int length, SeekOrigin origin, AsyncCallback callback, object state) + { + stream.Seek(-offset, SeekOrigin.End); + return AsyncMachine.BeginAsyncMachine(ReadBytesAsync, stream, length, callback, state); + } + + public static byte[] EndReadBytes(IAsyncResult result) + { + return AsyncMachine.EndAsyncMachine(result); + } + + public static IEnumerable ReadBytesAsync(AsyncMachine machine, Stream stream, int length) + { + var attributeHelper = new AttributeHelper(); + var buffer = new byte[length]; + + int readCount = 0; + int remaining = length; + while (remaining > 0) + { + stream.BeginRead(buffer, readCount, remaining, machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + var currentRead = stream.EndRead(machine.CompletionResult); + if (currentRead == 0) + { + break; + } + readCount += currentRead; + remaining -= currentRead; + } + machine.ParameterValue = buffer; + yield break; + } + + public static byte[] ReadBytes(Stream stream, long offset, int length) + { + stream.Seek(offset, SeekOrigin.Begin); + return ReadBytes(stream, length); + } + + public static byte[] ReadBytes(Stream stream, long offset, int length, SeekOrigin origin) + { + stream.Seek(-offset, origin); + return ReadBytes(stream, length); + } + + private static byte[] ReadBytes(Stream stream, int length) + { + var buffer = new byte[length]; + int readCount = 0; + int remaining = length; + while (remaining > 0) + { + var currentRead = stream.Read(buffer, readCount, remaining); + if (currentRead == 0) + { + break; + } + readCount += currentRead; + remaining -= currentRead; + } + + return buffer; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdConstants.cs b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdConstants.cs new file mode 100644 index 000000000000..a2f6c18eddcc --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdConstants.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence +{ + public class VhdConstants + { + public const long VHD_DEFAULT_BLOCK_SIZE = 512 * 1024; + public const long VHD_NO_DATA_LONG = ~0L; + public const uint VHD_NO_DATA_INT = 0xFFFFFFFF; + + public const long VHD_PAGE_SIZE = 512; + public const long VHD_FOOTER_SIZE = 512; + public const long VHD_SECTOR_LENGTH = 512; + public const long VHD_FOOTER_OFFSET_CHECKSUM = 64; + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdDataReader.cs b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdDataReader.cs new file mode 100644 index 000000000000..e42b545da1d9 --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdDataReader.cs @@ -0,0 +1,292 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Net; +using System.Text; +using Microsoft.WindowsAzure.Commands.Tools.Common.General; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence +{ + public class VhdDataReader + { + private readonly BinaryReader reader; + private byte[] m_buffer; + + public VhdDataReader(BinaryReader reader) + { + this.reader = reader; + this.m_buffer = new byte[16]; + } + + public long Size + { + get { return this.reader.BaseStream.Length; } + } + + public bool ReadBoolean(long offset) + { + this.SetPosition(offset); + return this.reader.ReadBoolean(); + } + + public IAsyncResult BeginReadBoolean(long offset, AsyncCallback callback, object state) + { + this.SetPosition(offset); + return AsyncMachine.BeginAsyncMachine(FillBuffer, 1, callback, state); + } + + public bool EndReadBoolean(IAsyncResult result) + { + AsyncMachine.EndAsyncMachine(result); + return (m_buffer[0] != 0); + } + + IEnumerable FillBuffer(AsyncMachine machine, int numBytes) + { + if (m_buffer != null && (numBytes < 0 || numBytes > m_buffer.Length)) + { + throw new ArgumentOutOfRangeException("numBytes", String.Format("Expected (0-16) however found: {0}", numBytes)); + } + int bytesRead = 0; + int n = 0; + + // Need to find a good threshold for calling ReadByte() repeatedly + // vs. calling Read(byte[], int, int) for both buffered & unbuffered + // streams. + if (numBytes == 1) + { + this.reader.BaseStream.BeginRead(m_buffer, 0, numBytes, machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + n = this.reader.BaseStream.EndRead(machine.CompletionResult); + if (n == -1) + { + throw new EndOfStreamException(); + } + m_buffer[0] = (byte)n; + } + + do + { + this.reader.BaseStream.BeginRead(m_buffer, bytesRead, numBytes - bytesRead, machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + n = this.reader.BaseStream.EndRead(machine.CompletionResult); + + if (n == 0) + { + throw new EndOfStreamException(); + } + bytesRead += n; + } while (bytesRead < numBytes); + } + + public short ReadInt16(long offset) + { + this.SetPosition(offset); + return IPAddress.NetworkToHostOrder((short)this.reader.ReadUInt16()); + } + + public IAsyncResult BeginReadInt16(long offset, AsyncCallback callback, object state) + { + this.SetPosition(offset); + return AsyncMachine.BeginAsyncMachine(FillBuffer, 2, callback, state); + } + + public short EndReadInt16(IAsyncResult result) + { + AsyncMachine.EndAsyncMachine(result); + short value = (short) (m_buffer[0] | m_buffer[1] << 8); + return IPAddress.NetworkToHostOrder(value); + } + + public uint ReadUInt32(long offset) + { + this.SetPosition(offset); + return (uint)IPAddress.NetworkToHostOrder((int)this.reader.ReadUInt32()); + } + + public IAsyncResult BeginReadUInt32(long offset, AsyncCallback callback, object state) + { + this.SetPosition(offset); + return AsyncMachine.BeginAsyncMachine(FillBuffer, 4, callback, state); + } + + public uint EndReadUInt32(IAsyncResult result) + { + AsyncMachine.EndAsyncMachine(result); + var value = (m_buffer[0] | m_buffer[1] << 8 | m_buffer[2] << 16 | m_buffer[3] << 24); + return (uint)IPAddress.NetworkToHostOrder(value); + } + + public uint ReadUInt32() + { + return (uint)IPAddress.NetworkToHostOrder((int)this.reader.ReadUInt32()); + } + + public IAsyncResult BeginReadUInt32(AsyncCallback callback, object state) + { + return AsyncMachine.BeginAsyncMachine(FillBuffer, 4, callback, state); + } + + public ulong ReadUInt64(long offset) + { + this.SetPosition(offset); + var value = (long)this.reader.ReadUInt64(); + return (ulong)IPAddress.NetworkToHostOrder(value); + } + + public IAsyncResult BeginReadUInt64(long offset, AsyncCallback callback, object state) + { + this.SetPosition(offset); + return AsyncMachine.BeginAsyncMachine(FillBuffer, 8, callback, state); + } + + public ulong EndReadUInt64(IAsyncResult result) + { + AsyncMachine.EndAsyncMachine(result); + uint lo = (uint)(m_buffer[0] | m_buffer[1] << 8 | + m_buffer[2] << 16 | m_buffer[3] << 24); + uint hi = (uint)(m_buffer[4] | m_buffer[5] << 8 | + m_buffer[6] << 16 | m_buffer[7] << 24); + ulong value = ((ulong) hi) << 32 | lo; + return (ulong)IPAddress.NetworkToHostOrder((long)value); + } + + public byte[] ReadBytes(long offset, int count) + { + this.SetPosition(offset); + return this.reader.ReadBytes(count); + } + + public IAsyncResult BeginReadBytes(long offset, int count, AsyncCallback callback, object state) + { + this.SetPosition(offset); + return AsyncMachine.BeginAsyncMachine(ReadBytesAsync, offset, count, callback, state); + } + + public byte[] EndReadBytes(IAsyncResult result) + { + return AsyncMachine.EndAsyncMachine(result); + } + + private IEnumerable ReadBytesAsync(AsyncMachine machine, long offset, int count) + { + StreamHelper.BeginReadBytes(this.reader.BaseStream, offset, count, machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + byte[] values = StreamHelper.EndReadBytes(machine.CompletionResult); + machine.ParameterValue = values; + } + + public byte[] ReadBytes(int count) + { + return this.reader.ReadBytes(count); + } + + public IAsyncResult BeginReadBytes(int count, AsyncCallback callback, object state) + { + return AsyncMachine.BeginAsyncMachine(ReadBytesAsync, this.reader.BaseStream.Position, count, callback, state); + } + + public string ReadString(int count) + { + return Encoding.ASCII.GetString(this.reader.ReadBytes(count)); + } + + public IAsyncResult BeginReadString(int count, AsyncCallback callback, object state) + { + return AsyncMachine.BeginAsyncMachine(ReadStringAsync, this.reader.BaseStream.Position, count, callback, state); + } + + public string EndReadString(IAsyncResult result) + { + return AsyncMachine.EndAsyncMachine(result); + } + + private IEnumerable ReadStringAsync(AsyncMachine machine, long offset, int count) + { + BeginReadBytes(offset, count, machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + byte[] values = EndReadBytes(machine.CompletionResult); + machine.ParameterValue = Encoding.ASCII.GetString(values); + } + + public byte ReadByte(long offset) + { + this.SetPosition(offset); + return this.reader.ReadByte(); + } + + public IAsyncResult BeginReadByte(long offset, AsyncCallback callback, object state) + { + return BeginReadBytes(offset, 1, callback, state); + } + + public byte EndReadByte(IAsyncResult result) + { + return EndReadBytes(result)[0]; + } + + public Guid ReadGuid(long offset) + { + return new Guid(this.ReadBytes(offset, 16)); + } + + public IAsyncResult BeginReadGuid(long offset, AsyncCallback callback, object state) + { + return BeginReadBytes(offset, 16, callback, state); + } + + public Guid EndReadGuid(IAsyncResult result) + { + byte[] guidValue = EndReadBytes(result); + return new Guid(guidValue); + } + + public DateTime ReadDateTime(long offset) + { + var timeStamp = new VhdTimeStamp(this.ReadUInt32(offset)); + return timeStamp.ToDateTime(); + } + + public IAsyncResult BeginReadDateTime(long offset, AsyncCallback callback, object state) + { + return BeginReadUInt32(offset, callback, state); + } + + public DateTime EndReadDateTime(IAsyncResult result) + { + uint value = EndReadUInt32(result); + var timeStamp = new VhdTimeStamp(value); + return timeStamp.ToDateTime(); + } + + public DateTime ReadDateTime() + { + var timeStamp = new VhdTimeStamp(this.ReadUInt32()); + return timeStamp.ToDateTime(); + } + + public IAsyncResult BeginReadDateTime(AsyncCallback callback, object state) + { + return BeginReadUInt32(callback, state); + } + + public void SetPosition(long batOffset) + { + this.reader.BaseStream.Seek(batOffset, SeekOrigin.Begin); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdDataWriter.cs b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdDataWriter.cs new file mode 100644 index 000000000000..97f1b87da086 --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdDataWriter.cs @@ -0,0 +1,112 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Net; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence +{ + public class VhdDataWriter + { + private readonly BinaryWriter writer; + + public VhdDataWriter(BinaryWriter writer) + { + this.writer = writer; + } + + public long Size + { + get { return this.writer.BaseStream.Length; } + } + + public void WriteBoolean(long offset, bool value) + { + this.SetPosition(offset); + this.writer.Write(value); + } + + public void WriteInt(long offset, int value) + { + this.SetPosition(offset); + this.writer.Write((uint)IPAddress.HostToNetworkOrder(value)); + } + + public void WriteInt16(long offset, Int16 value) + { + this.SetPosition(offset); + this.writer.Write(IPAddress.HostToNetworkOrder((short)value)); + } + + public void WriteInt16(Int16 value) + { + this.writer.Write(IPAddress.HostToNetworkOrder((short)value)); + } + + public void WriteUInt(long offset, uint value) + { + this.SetPosition(offset); + this.writer.Write((uint)IPAddress.HostToNetworkOrder((int)value)); + } + + public void WriteUInt(uint value) + { + this.writer.Write((uint)IPAddress.HostToNetworkOrder((int)value)); + } + + public void WriteLong(long offset, long value) + { + this.SetPosition(offset); + var result = (ulong)IPAddress.HostToNetworkOrder(value); + this.writer.Write(result); + } + + public void WriteBytes(long offset, byte[] value) + { + this.SetPosition(offset); + this.writer.Write(value); + } + + public void WriteByte(long offset, byte value) + { + this.SetPosition(offset); + this.writer.Write(value); + } + + public void WriteByte(byte value) + { + this.writer.Write(value); + } + + public void WriteGuid(long offset, Guid value) + { + this.SetPosition(offset); + this.writer.Write(value.ToByteArray()); + } + + public void WriteTimeStamp(long offset, DateTime value) + { + this.SetPosition(offset); + var timeStamp = new VhdTimeStamp(value); + uint result = (uint)IPAddress.HostToNetworkOrder((int)timeStamp.TotalSeconds); + this.writer.Write(result); + } + + public void SetPosition(long batOffset) + { + this.writer.BaseStream.Seek(batOffset, SeekOrigin.Begin); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdFileFactory.cs b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdFileFactory.cs new file mode 100644 index 000000000000..43fb630b1b9d --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdFileFactory.cs @@ -0,0 +1,212 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using Microsoft.WindowsAzure.Commands.Tools.Common.General; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence +{ + public class VhdFileFactory + { + public VhdFile Create(string path) + { + var streamSource = new StreamSource + { + Stream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read, 1024), + VhdDirectory = Path.GetDirectoryName(path), + DisposeOnException = true + }; + return Create(streamSource); + } + + public VhdFile Create(Stream stream) + { + return Create(new StreamSource { Stream = stream }); + } + + private VhdFile Create(StreamSource streamSource) + { + var disposer = new Action(() => { if (streamSource.DisposeOnException) streamSource.Stream.Dispose(); }); + bool throwing = false; + try + { + var reader = new BinaryReader(streamSource.Stream, Encoding.Unicode); + var dataReader = new VhdDataReader(reader); + var footer = new VhdFooterFactory(dataReader).CreateFooter(); + + VhdHeader header = null; + BlockAllocationTable blockAllocationTable = null; + VhdFile parent = null; + if (footer.DiskType != DiskType.Fixed) + { + header = new VhdHeaderFactory(dataReader, footer).CreateHeader(); + blockAllocationTable = new BlockAllocationTableFactory(dataReader, header).Create(); + if (footer.DiskType == DiskType.Differencing) + { + var parentPath = streamSource.VhdDirectory == null ? header.ParentPath : Path.Combine(streamSource.VhdDirectory, header.GetRelativeParentPath()); + parent = Create(parentPath); + } + } + return new VhdFile(footer, header, blockAllocationTable, parent, streamSource.Stream); + } + catch (Exception e) + { + throwing = true; + throw new VhdParsingException("unsupported format", e); + } + finally + { + if(throwing) + { + disposer(); + } + } + } + + private T TryCatch(Func method, IAsyncResult result) + { + try + { + return method(result); + } + catch (EndOfStreamException e) + { + throw new VhdParsingException("unsupported format", e); + } + } + + private T TryCatch(Func method, Action disposer, IAsyncResult result) + { + bool throwing = true; + T methodResult = default(T); + try + { + methodResult = method(result); + throwing = false; + } + catch (EndOfStreamException e) + { + throw new VhdParsingException("unsupported format", e); + } + finally + { + if(throwing) + { + disposer(); + } + } + return methodResult; + } + + private T TryCatch(Func method, Action disposer) + { + bool throwing = true; + T methodResult = default(T); + try + { + methodResult = method(); + throwing = false; + } + catch (EndOfStreamException e) + { + throw new VhdParsingException("unsupported format", e); + } + finally + { + if(throwing) + { + disposer(); + } + } + return methodResult; + } + + public IAsyncResult BeginCreate(string path, AsyncCallback callback, object state) + { + var streamSource = new StreamSource + { + Stream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read, 1024), + VhdDirectory = Path.GetDirectoryName(path), + DisposeOnException = true + }; + return AsyncMachine.BeginAsyncMachine(this.CreateAsync, streamSource, callback, state); + } + + public IAsyncResult BeginCreate(Stream stream, AsyncCallback callback, object state) + { + var streamSource = new StreamSource { Stream = stream}; + return AsyncMachine.BeginAsyncMachine(this.CreateAsync, streamSource, callback, state); + } + + public VhdFile EndCreate(IAsyncResult result) + { + return AsyncMachine.EndAsyncMachine(result); + } + + class StreamSource + { + public Stream Stream { get; set; } + public string VhdDirectory { get; set; } + public bool DisposeOnException { get; set; } + + public StreamSource() + { + this.DisposeOnException = false; + } + } + + private IEnumerable CreateAsync(AsyncMachine machine, StreamSource streamSource) + { + var disposer = new Action(() => { if (streamSource.DisposeOnException) streamSource.Stream.Dispose(); }); + + var reader = TryCatch(() => new BinaryReader(streamSource.Stream, Encoding.Unicode), disposer); + var dataReader = TryCatch(() => new VhdDataReader(reader), disposer); + var footerFactory = TryCatch(() => new VhdFooterFactory(dataReader), disposer); + + footerFactory.BeginCreateFooter(machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + var footer = TryCatch(footerFactory.EndCreateFooter, disposer, machine.CompletionResult); + + VhdHeader header = null; + BlockAllocationTable blockAllocationTable = null; + VhdFile parent = null; + if (footer.DiskType != DiskType.Fixed) + { + var headerFactory = new VhdHeaderFactory(dataReader, footer); + + headerFactory.BeginCreateHeader(machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + header = TryCatch(headerFactory.EndCreateHeader, disposer, machine.CompletionResult); + + var tableFactory = new BlockAllocationTableFactory(dataReader, header); + tableFactory.BeginCreate(machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + blockAllocationTable = TryCatch(tableFactory.EndCreate, disposer, machine.CompletionResult); + + if (footer.DiskType == DiskType.Differencing) + { + var parentPath = streamSource.VhdDirectory == null ? header.ParentPath : Path.Combine(streamSource.VhdDirectory, header.GetRelativeParentPath()); + + BeginCreate(parentPath, machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + parent = TryCatch(EndCreate, disposer, machine.CompletionResult); + } + } + machine.ParameterValue = new VhdFile(footer, header, blockAllocationTable, parent, streamSource.Stream); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdFooterFactory.cs b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdFooterFactory.cs new file mode 100644 index 000000000000..64d51eb3a53e --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdFooterFactory.cs @@ -0,0 +1,532 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using Microsoft.WindowsAzure.Commands.Tools.Common.General; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence +{ + public class VhdFooterFactory + { + public const string WindowsAzureCreatorApplicationName = "wa"; + + public static VhdFooter CreateFixedDiskFooter(long virtualSize) + { + var helper = new AttributeHelper(); + var footer = new VhdFooter(); + var reservedAttribute = helper.GetAttribute(() => footer.Reserved); + + footer.Cookie = VhdCookie.CreateFooterCookie(); + footer.Features = VhdFeature.Reserved; + footer.FileFormatVersion = VhdFileFormatVersion.DefaultFileFormatVersion; + footer.HeaderOffset = VhdConstants.VHD_NO_DATA_LONG; + footer.TimeStamp = DateTime.UtcNow; + footer.CreatorApplication = WindowsAzureCreatorApplicationName; + footer.CreatorVersion = VhdCreatorVersion.CSUP2011; + footer.CreatorHostOsType = HostOsType.Windows; + footer.PhsyicalSize = virtualSize; + footer.VirtualSize = virtualSize; + footer.DiskGeometry = DiskGeometry.CreateFromVirtualSize(virtualSize); + footer.DiskType = DiskType.Fixed; + footer.UniqueId = Guid.NewGuid(); + footer.SavedState = false; + footer.Reserved = new byte[reservedAttribute.Size]; + + var footerSerializer = new VhdFooterSerializer(footer); + var byteArray = footerSerializer.ToByteArray(); + + using(var memoryStream = new MemoryStream(byteArray)) + { + var binaryReader = new BinaryReader(memoryStream); + var vhdDataReader = new VhdDataReader(binaryReader); + var footerFactory = new VhdFooterFactory(vhdDataReader); + var vhdFooter = footerFactory.CreateFooter(); + return vhdFooter; + } + } + + private readonly VhdDataReader dataReader; + private readonly DiskTypeFactory diskTypeFactory; + + public VhdFooterFactory(VhdDataReader dataReader) + { + this.dataReader = dataReader; + this.diskTypeFactory = new DiskTypeFactory(); + } + + public VhdFooter CreateFooter() + { + try + { + ValidateVhdSize(); + var attributeHelper = new AttributeHelper(); + var footer = new VhdFooter(); + footer.Cookie = ReadVhdCookie(attributeHelper.GetAttribute(() => footer.Cookie)); + footer.Features = ReadFeatures(attributeHelper.GetAttribute(() => footer.Features)); + footer.FileFormatVersion = ReadVhdFileFormatVersion(attributeHelper.GetAttribute(() => footer.FileFormatVersion)); + footer.HeaderOffset = ReadHeaderOffset(attributeHelper.GetAttribute(() => footer.HeaderOffset)); + footer.TimeStamp = ReadTimeStamp(attributeHelper.GetAttribute(() => footer.TimeStamp)); + footer.CreatorApplication = ReadCreatorApplication(attributeHelper.GetAttribute(() => footer.CreatorApplication)); + footer.CreatorVersion = ReadCreatorVersion(attributeHelper.GetAttribute(() => footer.CreatorVersion)); + footer.CreatorHostOsType = ReadCreatorHostOsType(attributeHelper.GetAttribute(() => footer.CreatorHostOsType)); + footer.PhsyicalSize = ReadPhysicalSize(attributeHelper.GetAttribute(() => footer.PhsyicalSize)); + footer.VirtualSize = ReadVirtualSize(attributeHelper.GetAttribute(() => footer.VirtualSize)); + footer.DiskGeometry = ReadDiskGeometry(attributeHelper.GetAttribute(() => footer.DiskGeometry)); + footer.DiskType = ReadDiskType(attributeHelper.GetAttribute(() => footer.DiskType)); + footer.CheckSum = ReadCheckSum(attributeHelper.GetAttribute(() => footer.CheckSum)); + footer.UniqueId = ReadUniqueId(attributeHelper.GetAttribute(() => footer.UniqueId)); + footer.SavedState = ReadSavedState(attributeHelper.GetAttribute(() => footer.SavedState)); + footer.Reserved = ReadReserved(attributeHelper.GetAttribute(() => footer.Reserved)); + footer.RawData = ReadWholeFooter(attributeHelper.GetAttribute(() => footer.RawData)); + return footer; + } + catch (EndOfStreamException e) + { + throw new VhdParsingException("unsupported format", e); + } + } + + private T TryCatch(Func method, IAsyncResult result) + { + try + { + return method(result); + } + catch (EndOfStreamException e) + { + throw new VhdParsingException("unsupported format", e); + } + } + + public IAsyncResult BeginCreateFooter(AsyncCallback callback, object state) + { + return AsyncMachine.BeginAsyncMachine(CreateFooterAsync, callback, state); + } + + public VhdFooter EndCreateFooter(IAsyncResult result) + { + return AsyncMachine.EndAsyncMachine(result); + } + + private IEnumerable CreateFooterAsync(AsyncMachine machine) + { + ValidateVhdSize(); + var attributeHelper = new AttributeHelper(); + var footer = new VhdFooter(); + + BeginReadVhdCookie(attributeHelper.GetAttribute(() => footer.Cookie), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + footer.Cookie = TryCatch(EndReadVhdCookie, machine.CompletionResult); + + BeginReadFeatures(attributeHelper.GetAttribute(() => footer.Features), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + footer.Features = TryCatch(EndReadFeatures, machine.CompletionResult); + + BeginReadVhdFileFormatVersion(attributeHelper.GetAttribute(() => footer.FileFormatVersion), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + footer.FileFormatVersion = TryCatch(EndReadVhdFileFormatVersion, machine.CompletionResult); + + BeginReadHeaderOffset(attributeHelper.GetAttribute(() => footer.HeaderOffset), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + footer.HeaderOffset = TryCatch(EndReadHeaderOffset, machine.CompletionResult); + + BeginReadTimeStamp(attributeHelper.GetAttribute(() => footer.TimeStamp), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + footer.TimeStamp = TryCatch(EndReadTimeStamp, machine.CompletionResult); + + BeginReadCreatorApplication(attributeHelper.GetAttribute(() => footer.CreatorApplication), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + footer.CreatorApplication = TryCatch(EndReadCreatorApplication, machine.CompletionResult); + + BeginReadCreatorVersion(attributeHelper.GetAttribute(() => footer.CreatorVersion), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + footer.CreatorVersion = TryCatch(EndReadCreatorVersion, machine.CompletionResult); + + BeginReadCreatorHostOsType(attributeHelper.GetAttribute(() => footer.CreatorHostOsType), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + footer.CreatorHostOsType = TryCatch(EndReadCreatorHostOsType, machine.CompletionResult); + + BeginReadPhysicalSize(attributeHelper.GetAttribute(() => footer.PhsyicalSize), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + footer.PhsyicalSize = TryCatch(EndReadPhysicalSize, machine.CompletionResult); + + BeginReadVirtualSize(attributeHelper.GetAttribute(() => footer.VirtualSize), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + footer.VirtualSize = TryCatch(EndReadVirtualSize, machine.CompletionResult); + + BeginReadDiskGeometry(attributeHelper.GetAttribute(() => footer.DiskGeometry), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + footer.DiskGeometry = TryCatch(EndReadDiskGeometry, machine.CompletionResult); + + BeginReadDiskType(attributeHelper.GetAttribute(() => footer.DiskType), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + footer.DiskType = TryCatch(EndReadDiskType, machine.CompletionResult); + + BeginReadCheckSum(attributeHelper.GetAttribute(() => footer.CheckSum), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + footer.CheckSum = TryCatch(EndReadCheckSum, machine.CompletionResult); + + BeginReadUniqueId(attributeHelper.GetAttribute(() => footer.UniqueId), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + footer.UniqueId = TryCatch(EndReadUniqueId, machine.CompletionResult); + + BeginReadSavedState(attributeHelper.GetAttribute(() => footer.SavedState), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + footer.SavedState = TryCatch(EndReadSavedState, machine.CompletionResult); + + BeginReadReserved(attributeHelper.GetAttribute(() => footer.Reserved), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + footer.Reserved = TryCatch(EndReadReserved, machine.CompletionResult); + + BeginReadWholeFooter(attributeHelper.GetAttribute(() => footer.RawData), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + footer.RawData = TryCatch(EndReadWholeFooter, machine.CompletionResult); + + machine.ParameterValue = footer; + } + + private long ReadPhysicalSize(VhdPropertyAttribute attribute) + { + return (long) dataReader.ReadUInt64(this.GetFooterOffset() + attribute.Offset); + } + + private IAsyncResult BeginReadPhysicalSize(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return dataReader.BeginReadUInt64(this.GetFooterOffset() + attribute.Offset, callback, state); + } + + private long EndReadPhysicalSize(IAsyncResult result) + { + var value = dataReader.EndReadUInt64(result); + return (long) value; + } + + private byte[] ReadWholeFooter(VhdPropertyAttribute attribute) + { + return dataReader.ReadBytes(GetFooterOffset() + attribute.Offset, attribute.Size); + } + + private IAsyncResult BeginReadWholeFooter(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return dataReader.BeginReadBytes(this.GetFooterOffset() + attribute.Offset, attribute.Size, callback, state); + } + + private byte[] EndReadWholeFooter(IAsyncResult result) + { + var value = dataReader.EndReadBytes(result); + return (byte[]) value; + } + + private byte[] ReadReserved(VhdPropertyAttribute attribute) + { + return dataReader.ReadBytes(GetFooterOffset() + attribute.Offset, attribute.Size); + } + + private IAsyncResult BeginReadReserved(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return dataReader.BeginReadBytes(this.GetFooterOffset() + attribute.Offset, attribute.Size, callback, state); + } + + private byte[] EndReadReserved(IAsyncResult result) + { + var value = dataReader.EndReadBytes(result); + return (byte[]) value; + } + + private bool ReadSavedState(VhdPropertyAttribute attribute) + { + return dataReader.ReadBoolean(GetFooterOffset() + attribute.Offset); + } + + private IAsyncResult BeginReadSavedState(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return dataReader.BeginReadBoolean(this.GetFooterOffset() + attribute.Offset, callback, state); + } + + private bool EndReadSavedState(IAsyncResult result) + { + var value = dataReader.EndReadBoolean(result); + return (bool) value; + } + + private uint ReadCheckSum(VhdPropertyAttribute attribute) + { + return dataReader.ReadUInt32(GetFooterOffset() + attribute.Offset); + } + + private IAsyncResult BeginReadCheckSum(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return dataReader.BeginReadUInt32(this.GetFooterOffset() + attribute.Offset, callback, state); + } + + private uint EndReadCheckSum(IAsyncResult result) + { + var value = dataReader.EndReadUInt32(result); + return (uint) value; + } + + private DiskGeometry ReadDiskGeometry(VhdPropertyAttribute attribute) + { + long offset = GetFooterOffset() + attribute.Offset; + + var attributeHelper = new AttributeHelper(); + var diskGeometry = new DiskGeometry(); + diskGeometry.Cylinder = dataReader.ReadInt16(offset + attributeHelper.GetAttribute(()=>diskGeometry.Cylinder).Offset); + diskGeometry.Heads = dataReader.ReadByte(offset + attributeHelper.GetAttribute(() => diskGeometry.Heads).Offset); + diskGeometry.Sectors = dataReader.ReadByte(offset + attributeHelper.GetAttribute(() => diskGeometry.Sectors).Offset); + return diskGeometry; + } + + private IAsyncResult BeginReadDiskGeometry(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return AsyncMachine.BeginAsyncMachine(ReadDiskGeometryAsync, attribute, callback, state); + } + + private DiskGeometry EndReadDiskGeometry(IAsyncResult result) + { + return AsyncMachine.EndAsyncMachine(result); + } + + private IEnumerable ReadDiskGeometryAsync(AsyncMachine machine, VhdPropertyAttribute attribute) + { + long offset = GetFooterOffset() + attribute.Offset; + + var attributeHelper = new AttributeHelper(); + var diskGeometry = new DiskGeometry(); + dataReader.BeginReadInt16(offset + attributeHelper.GetAttribute(() => diskGeometry.Cylinder).Offset, machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + diskGeometry.Cylinder = dataReader.EndReadInt16(machine.CompletionResult); + + dataReader.BeginReadByte(offset + attributeHelper.GetAttribute(() => diskGeometry.Heads).Offset, machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + diskGeometry.Heads = dataReader.EndReadByte(machine.CompletionResult); + + dataReader.BeginReadByte(offset + attributeHelper.GetAttribute(() => diskGeometry.Sectors).Offset, machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + diskGeometry.Sectors = dataReader.EndReadByte(machine.CompletionResult); + + machine.ParameterValue = diskGeometry; + } + + private HostOsType ReadCreatorHostOsType(VhdPropertyAttribute attribute) + { + var hostOs = dataReader.ReadUInt32(GetFooterOffset() + attribute.Offset); + return (HostOsType)hostOs; + } + + private IAsyncResult BeginReadCreatorHostOsType(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return dataReader.BeginReadUInt32(this.GetFooterOffset() + attribute.Offset, callback, state); + } + + private HostOsType EndReadCreatorHostOsType(IAsyncResult result) + { + var version = dataReader.EndReadUInt32(result); + return (HostOsType)version; + } + + private VhdCreatorVersion ReadCreatorVersion(VhdPropertyAttribute attribute) + { + var version = dataReader.ReadUInt32(GetFooterOffset() + attribute.Offset); + return new VhdCreatorVersion(version); + } + + private IAsyncResult BeginReadCreatorVersion(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return dataReader.BeginReadUInt32(this.GetFooterOffset() + attribute.Offset, callback, state); + } + + private VhdCreatorVersion EndReadCreatorVersion(IAsyncResult result) + { + var version = dataReader.EndReadUInt32(result); + return new VhdCreatorVersion(version); + } + + private string ReadCreatorApplication(VhdPropertyAttribute attribute) + { + var creatorApplication = dataReader.ReadBytes(GetFooterOffset() + attribute.Offset, attribute.Size); + return Encoding.ASCII.GetString(creatorApplication); + } + + private IAsyncResult BeginReadCreatorApplication(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return dataReader.BeginReadBytes(this.GetFooterOffset() + attribute.Offset, attribute.Size, callback, state); + } + + private string EndReadCreatorApplication(IAsyncResult result) + { + var creatorApplication = dataReader.EndReadBytes(result); + return Encoding.ASCII.GetString(creatorApplication); + } + + private VhdFeature ReadFeatures(VhdPropertyAttribute attribute) + { + return (VhdFeature)dataReader.ReadUInt32(GetFooterOffset() + attribute.Offset); + } + + private IAsyncResult BeginReadFeatures(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return dataReader.BeginReadUInt32(this.GetFooterOffset() + attribute.Offset, callback, state); + } + + private VhdFeature EndReadFeatures(IAsyncResult result) + { + return (VhdFeature) dataReader.EndReadUInt32(result); + } + + private Guid ReadUniqueId(VhdPropertyAttribute attribute) + { + return dataReader.ReadGuid(GetFooterOffset() + attribute.Offset); + } + + private IAsyncResult BeginReadUniqueId(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return dataReader.BeginReadGuid(this.GetFooterOffset() + attribute.Offset, callback, state); + } + + private Guid EndReadUniqueId(IAsyncResult result) + { + return dataReader.EndReadGuid(result); + } + + private DateTime ReadTimeStamp(VhdPropertyAttribute attribute) + { + return dataReader.ReadDateTime(GetFooterOffset() + attribute.Offset); + } + + private IAsyncResult BeginReadTimeStamp(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return dataReader.BeginReadDateTime(this.GetFooterOffset() + attribute.Offset, callback, state); + } + + private DateTime EndReadTimeStamp(IAsyncResult result) + { + return dataReader.EndReadDateTime(result); + } + + private long ReadHeaderOffset(VhdPropertyAttribute attribute) + { + return (long) dataReader.ReadUInt64(GetFooterOffset() + attribute.Offset); + } + + private IAsyncResult BeginReadHeaderOffset(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return dataReader.BeginReadUInt64(this.GetFooterOffset() + attribute.Offset, callback, state); + } + + private long EndReadHeaderOffset(IAsyncResult result) + { + return (long)dataReader.EndReadUInt64(result); + } + + private DiskType ReadDiskType(VhdPropertyAttribute attribute) + { + var readDiskType = dataReader.ReadUInt32(GetFooterOffset() + attribute.Offset); + return diskTypeFactory.Create(readDiskType); + } + + private IAsyncResult BeginReadDiskType(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return dataReader.BeginReadUInt32(this.GetFooterOffset() + attribute.Offset, callback, state); + } + + private DiskType EndReadDiskType(IAsyncResult result) + { + var readDiskType = dataReader.EndReadUInt32(result); + return diskTypeFactory.Create(readDiskType); + } + + private long ReadVirtualSize(VhdPropertyAttribute attribute) + { + return (long) dataReader.ReadUInt64(this.GetFooterOffset() + attribute.Offset); + } + + private IAsyncResult BeginReadVirtualSize(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return dataReader.BeginReadUInt64(this.GetFooterOffset() + attribute.Offset, callback, state); + } + + private long EndReadVirtualSize(IAsyncResult result) + { + return (long) dataReader.EndReadUInt64(result); + } + + private void ValidateVhdSize() + { + // all VHDs are a multiple of 512 bytes. Note that Azure page blobs must + // be a multiple of 512 bytes also. + var streamLength = dataReader.Size; + if (streamLength == 0 || streamLength < VhdConstants.VHD_FOOTER_SIZE || streamLength % VhdConstants.VHD_PAGE_SIZE != 0) + throw new VhdParsingException(String.Format("Invalid file Size: {0}", streamLength)); + } + + private VhdFileFormatVersion ReadVhdFileFormatVersion(VhdPropertyAttribute attribute) + { + var version = dataReader.ReadUInt32(this.GetFooterOffset() + attribute.Offset); + return CreateVhdFileFormatVersion(version); + } + + private VhdFileFormatVersion CreateVhdFileFormatVersion(uint version) + { + var formatVersion = new VhdFileFormatVersion(version); + if (!formatVersion.IsSupported()) + throw new VhdParsingException(String.Format("Invalid file format version: {0}", formatVersion.Data)); + return formatVersion; + } + + private IAsyncResult BeginReadVhdFileFormatVersion(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return dataReader.BeginReadUInt32(this.GetFooterOffset() + attribute.Offset, callback, state); + } + + private VhdFileFormatVersion EndReadVhdFileFormatVersion(IAsyncResult result) + { + uint value = dataReader.EndReadUInt32(result); + return CreateVhdFileFormatVersion(value); + } + + private VhdCookie ReadVhdCookie(VhdPropertyAttribute attribute) + { + byte[] value = dataReader.ReadBytes(this.GetFooterOffset() + attribute.Offset, attribute.Size); + return CreateVhdCookie(value); + } + + private VhdCookie CreateVhdCookie(byte[] cookie) + { + var vhdCookie = new VhdCookie(VhdCookieType.Footer, cookie); + if (!vhdCookie.IsValid()) + throw new VhdParsingException(String.Format("Invalid Vhd footer cookie:{0}",vhdCookie.StringData)); + return vhdCookie; + } + + private IAsyncResult BeginReadVhdCookie(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return dataReader.BeginReadBytes(this.GetFooterOffset() + attribute.Offset, attribute.Size, callback, state); + } + + private VhdCookie EndReadVhdCookie(IAsyncResult result) + { + byte[] cookie = dataReader.EndReadBytes(result); + return CreateVhdCookie(cookie); + } + + long GetFooterOffset() + { + return dataReader.Size - VhdConstants.VHD_FOOTER_SIZE; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdFooterSerializer.cs b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdFooterSerializer.cs new file mode 100644 index 000000000000..21fbe5cf4e56 --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdFooterSerializer.cs @@ -0,0 +1,87 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using System.Text; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence +{ + public class VhdFooterSerializer + { + private readonly VhdFooter vhdFooter; + private AttributeHelper attributeHelper; + + public VhdFooterSerializer(VhdFooter vhdFooter) + { + this.vhdFooter = vhdFooter; + this.attributeHelper = new AttributeHelper(); + } + + public byte[] ToByteArray() + { + var buffer = new byte[attributeHelper.GetEntityAttribute().Size]; + using (var stream = new MemoryStream(buffer)) + { + var writer = new BinaryWriter(stream); + var dataWriter = new VhdDataWriter(writer); + dataWriter.WriteBytes(attributeHelper.GetAttribute(() => vhdFooter.Cookie).Offset, vhdFooter.Cookie.Data); + + dataWriter.WriteUInt(attributeHelper.GetAttribute(() => vhdFooter.Features).Offset, (uint)vhdFooter.Features); + dataWriter.WriteInt(attributeHelper.GetAttribute(() => vhdFooter.FileFormatVersion).Offset, + (int)vhdFooter.FileFormatVersion.Data); + dataWriter.WriteLong(attributeHelper.GetAttribute(() => vhdFooter.HeaderOffset).Offset, vhdFooter.HeaderOffset); + dataWriter.WriteTimeStamp(attributeHelper.GetAttribute(() => vhdFooter.TimeStamp).Offset, vhdFooter.TimeStamp); + dataWriter.WriteBytes(attributeHelper.GetAttribute(() => vhdFooter.CreatorApplication).Offset, + Encoding.ASCII.GetBytes(vhdFooter.CreatorApplication)); + dataWriter.WriteUInt(attributeHelper.GetAttribute(() => vhdFooter.CreatorVersion).Offset, + vhdFooter.CreatorVersion.Data); + dataWriter.WriteUInt(attributeHelper.GetAttribute(() => vhdFooter.CreatorHostOsType).Offset, + (uint)vhdFooter.CreatorHostOsType); + dataWriter.WriteLong(attributeHelper.GetAttribute(() => vhdFooter.PhsyicalSize).Offset, vhdFooter.PhsyicalSize); + dataWriter.WriteLong(attributeHelper.GetAttribute(() => vhdFooter.VirtualSize).Offset, vhdFooter.VirtualSize); + + dataWriter.SetPosition(attributeHelper.GetAttribute(() => vhdFooter.DiskGeometry).Offset); + WriteDiskGeometry(dataWriter, vhdFooter.DiskGeometry); + + dataWriter.WriteInt(attributeHelper.GetAttribute(() => vhdFooter.DiskType).Offset, (int)vhdFooter.DiskType); + dataWriter.WriteGuid(attributeHelper.GetAttribute(() => vhdFooter.UniqueId).Offset, vhdFooter.UniqueId); + dataWriter.WriteBoolean(attributeHelper.GetAttribute(() => vhdFooter.SavedState).Offset, vhdFooter.SavedState); + dataWriter.WriteBytes(attributeHelper.GetAttribute(() => vhdFooter.Reserved).Offset, vhdFooter.Reserved); + + dataWriter.WriteUInt(attributeHelper.GetAttribute(() => vhdFooter.CheckSum).Offset, ComputeCheckSum(buffer)); + } + return buffer; + } + + public uint ComputeCheckSum(byte[] buffer) + { + uint checksum = 0; + for (var i = 0; i < attributeHelper.GetEntityAttribute().Size; i++) + { + if (i < VhdConstants.VHD_FOOTER_OFFSET_CHECKSUM || i >= (VhdConstants.VHD_FOOTER_OFFSET_CHECKSUM + 4)) + { + checksum += buffer[i]; + } + } + return ~checksum; + } + + private static void WriteDiskGeometry(VhdDataWriter dataWriter, DiskGeometry diskGeometry) + { + dataWriter.WriteInt16(diskGeometry.Cylinder); + dataWriter.WriteByte(diskGeometry.Heads); + dataWriter.WriteByte(diskGeometry.Sectors); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdHeaderFactory.cs b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdHeaderFactory.cs new file mode 100644 index 000000000000..fa441c053845 --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdHeaderFactory.cs @@ -0,0 +1,413 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using Microsoft.WindowsAzure.Commands.Tools.Common.General; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence +{ + public class VhdHeaderFactory + { + private readonly VhdDataReader dataReader; + private readonly VhdFooter footer; + private long headerOffset; + + public VhdHeaderFactory(VhdDataReader dataReader, VhdFooter footer) + { + this.dataReader = dataReader; + this.footer = footer; + headerOffset = this.footer.HeaderOffset; + } + + public VhdHeader CreateHeader() + { + if (footer.DiskType != DiskType.Dynamic && footer.DiskType != DiskType.Differencing) + return null; + + try + { + var attributeHelper = new AttributeHelper(); + var header = new VhdHeader(); + header.Cookie = ReadHeaderCookie(attributeHelper.GetAttribute(() => header.Cookie)); + header.DataOffset = ReadDataOffset(attributeHelper.GetAttribute(() => header.DataOffset)); + header.TableOffset = ReadBATOffset(attributeHelper.GetAttribute(() => header.TableOffset)); + header.HeaderVersion = ReaderHeaderVersion(attributeHelper.GetAttribute(() => header.HeaderVersion)); + header.MaxTableEntries = ReadMaxTableEntries(attributeHelper.GetAttribute(() => header.MaxTableEntries)); + header.BlockSize = ReadBlockSize(attributeHelper.GetAttribute(() => header.BlockSize)); + header.CheckSum = ReadCheckSum(attributeHelper.GetAttribute(() => header.CheckSum)); + header.ParentUniqueId = ReadParentUniqueId(attributeHelper.GetAttribute(() => header.ParentUniqueId)); + header.ParentTimeStamp = ReadParentTimeStamp(attributeHelper.GetAttribute(() => header.ParentTimeStamp)); + header.Reserverd1 = ReadReserved1(attributeHelper.GetAttribute(() => header.Reserverd1)); + header.ParentPath = ReadParentPath(attributeHelper.GetAttribute(() => header.ParentPath)); + header.ParentLocators = ReadParentLocators(attributeHelper.GetAttribute(() => header.ParentLocators)); + header.RawData = ReadRawData(attributeHelper.GetAttribute(() => header.RawData)); + return header; + } + catch (EndOfStreamException e) + { + throw new VhdParsingException("unsupported format", e); + } + } + + private T TryCatch(Func method, IAsyncResult result) + { + try + { + return method(result); + } + catch (EndOfStreamException e) + { + throw new VhdParsingException("unsupported format", e); + } + } + + public IAsyncResult BeginCreateHeader(AsyncCallback callback, object state) + { + return AsyncMachine.BeginAsyncMachine(CreateVhdHeader, callback, state); + } + + public VhdHeader EndCreateHeader(IAsyncResult result) + { + return AsyncMachine.EndAsyncMachine(result); + } + + private IEnumerable CreateVhdHeader(AsyncMachine machine) + { + if (footer.DiskType != DiskType.Dynamic && footer.DiskType != DiskType.Differencing) + { + machine.ParameterValue = null; + yield break; + } + + var attributeHelper = new AttributeHelper(); + var header = new VhdHeader(); + + BeginReadHeaderCookie(attributeHelper.GetAttribute(() => header.Cookie), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + header.Cookie = TryCatch(EndReadHeaderCookie, machine.CompletionResult); + + BeginReadDataOffset(attributeHelper.GetAttribute(() => header.DataOffset), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + header.DataOffset = TryCatch(EndReadDataOffset, machine.CompletionResult); + + BeginReadBATOffset(attributeHelper.GetAttribute(() => header.TableOffset), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + header.TableOffset = TryCatch(EndReadBATOffset, machine.CompletionResult); + + BeginReadHeaderVersion(attributeHelper.GetAttribute(() => header.HeaderVersion), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + header.HeaderVersion = TryCatch(EndReadHeaderVersion, machine.CompletionResult); + + BeginReadMaxTableEntries(attributeHelper.GetAttribute(() => header.MaxTableEntries), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + header.MaxTableEntries = TryCatch(EndReadMaxTableEntries, machine.CompletionResult); + + BeginReadBlockSize(attributeHelper.GetAttribute(() => header.BlockSize), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + header.BlockSize = TryCatch(EndReadBlockSize, machine.CompletionResult); + + BeginReadCheckSum(attributeHelper.GetAttribute(() => header.CheckSum), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + header.CheckSum = TryCatch(EndReadCheckSum, machine.CompletionResult); + + BeginReadParentUniqueId(attributeHelper.GetAttribute(() => header.ParentUniqueId), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + header.ParentUniqueId = TryCatch(EndReadParentUniqueId, machine.CompletionResult); + + BeginReadParentTimeStamp(attributeHelper.GetAttribute(() => header.ParentTimeStamp), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + header.ParentTimeStamp = TryCatch(EndReadParentTimeStamp, machine.CompletionResult); + + BeginReadReserved1(attributeHelper.GetAttribute(() => header.Reserverd1), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + header.Reserverd1 = TryCatch(EndReadReserved1, machine.CompletionResult); + + BeginReadParentPath(attributeHelper.GetAttribute(() => header.ParentPath), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + header.ParentPath = TryCatch(EndReadParentPath, machine.CompletionResult); + + BeginReadParentLocators(attributeHelper.GetAttribute(() => header.ParentLocators), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + header.ParentLocators = TryCatch>(EndReadParentLocators, machine.CompletionResult); + + BeginReadRawData(attributeHelper.GetAttribute(() => header.RawData), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + header.RawData = TryCatch(EndReadRawData, machine.CompletionResult); + + machine.ParameterValue = header; + } + + private byte[] ReadRawData(VhdPropertyAttribute attribute) + { + return dataReader.ReadBytes(headerOffset + attribute.Offset, attribute.Size); + } + + private IAsyncResult BeginReadRawData(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return dataReader.BeginReadBytes(headerOffset + attribute.Offset, attribute.Size, callback, state); + } + + private byte[] EndReadRawData(IAsyncResult result) + { + var value = dataReader.EndReadBytes(result); + return (byte[]) value; + } + + private IList ReadParentLocators(VhdPropertyAttribute attribute) + { + var parentLocators = new List(); + var attributeHelper = new AttributeHelper(); + var entityAttribute = attributeHelper.GetEntityAttribute(); + + long baseOffset = headerOffset + attribute.Offset; + + for (int i = 0; i < attribute.Count; i++) + { + var parentLocatorFactory = new VhdParentLocatorFactory(dataReader, baseOffset); + parentLocators.Add(parentLocatorFactory.Create()); + baseOffset += entityAttribute.Size; + } + return parentLocators; + } + + private IAsyncResult BeginReadParentLocators(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return AsyncMachine>.BeginAsyncMachine(CreateParentLocators, attribute, callback, state); + } + + private IEnumerable CreateParentLocators(AsyncMachine> machine, VhdPropertyAttribute attribute) + { + var parentLocators = new List(); + var attributeHelper = new AttributeHelper(); + var entityAttribute = attributeHelper.GetEntityAttribute(); + + long baseOffset = headerOffset + attribute.Offset; + + for (int i = 0; i < attribute.Count; i++) + { + var parentLocatorFactory = new VhdParentLocatorFactory(dataReader, baseOffset); + + parentLocatorFactory.BeginReadCreate(machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + ParentLocator parentLocator = parentLocatorFactory.EndReadCreate(machine.CompletionResult); + + parentLocators.Add(parentLocator); + baseOffset += entityAttribute.Size; + } + machine.ParameterValue = parentLocators; + } + + private IList EndReadParentLocators(IAsyncResult result) + { + return AsyncMachine>.EndAsyncMachine(result); + } + + private uint ReadReserved1(VhdPropertyAttribute attribute) + { + return dataReader.ReadUInt32(headerOffset + attribute.Offset); + } + + private IAsyncResult BeginReadReserved1(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return dataReader.BeginReadUInt32(headerOffset + attribute.Offset, callback, state); + } + + private uint EndReadReserved1(IAsyncResult result) + { + var value = dataReader.EndReadUInt32(result); + return (uint) value; + } + + private uint ReadCheckSum(VhdPropertyAttribute attribute) + { + return dataReader.ReadUInt32(headerOffset + attribute.Offset); + } + + private IAsyncResult BeginReadCheckSum(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return dataReader.BeginReadUInt32(headerOffset + attribute.Offset, callback, state); + } + + private uint EndReadCheckSum(IAsyncResult result) + { + var value = dataReader.EndReadUInt32(result); + return (uint) value; + } + + private long ReadDataOffset(VhdPropertyAttribute attribute) + { + return (long) dataReader.ReadUInt64(headerOffset + attribute.Offset); + } + + private IAsyncResult BeginReadDataOffset(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return dataReader.BeginReadUInt64(headerOffset + attribute.Offset, callback, state); + } + + private long EndReadDataOffset(IAsyncResult result) + { + var value = dataReader.EndReadUInt64(result); + return (long) value; + } + + + private string ReadParentPath(VhdPropertyAttribute attribute) + { + var parentNameBytes = dataReader.ReadBytes(headerOffset + attribute.Offset, attribute.Size); + return Encoding.BigEndianUnicode.GetString(parentNameBytes).TrimEnd('\0'); + } + + private IAsyncResult BeginReadParentPath(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return dataReader.BeginReadBytes(headerOffset + attribute.Offset, attribute.Size, callback, state); + } + + private string EndReadParentPath(IAsyncResult result) + { + var value = dataReader.EndReadBytes(result); + return Encoding.BigEndianUnicode.GetString(value).TrimEnd('\0'); + } + + private DateTime ReadParentTimeStamp(VhdPropertyAttribute attribute) + { + return dataReader.ReadDateTime(headerOffset + attribute.Offset); + } + + private IAsyncResult BeginReadParentTimeStamp(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return dataReader.BeginReadDateTime(headerOffset + attribute.Offset, callback, state); + } + + private DateTime EndReadParentTimeStamp(IAsyncResult result) + { + var value = dataReader.EndReadDateTime(result); + return (DateTime) value; + } + + private Guid ReadParentUniqueId(VhdPropertyAttribute attribute) + { + return dataReader.ReadGuid(headerOffset + attribute.Offset); + } + + private IAsyncResult BeginReadParentUniqueId(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return dataReader.BeginReadGuid(headerOffset + attribute.Offset, callback, state); + } + + private Guid EndReadParentUniqueId(IAsyncResult result) + { + var value = dataReader.EndReadGuid(result); + return (Guid) value; + } + + private uint ReadBlockSize(VhdPropertyAttribute attribute) + { + return dataReader.ReadUInt32(headerOffset + attribute.Offset); + } + + private IAsyncResult BeginReadBlockSize(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return dataReader.BeginReadUInt32(headerOffset + attribute.Offset, callback, state); + } + + private uint EndReadBlockSize(IAsyncResult result) + { + var value = dataReader.EndReadUInt32(result); + return (uint) value; + } + + private uint ReadMaxTableEntries(VhdPropertyAttribute attribute) + { + return dataReader.ReadUInt32(headerOffset + attribute.Offset); + } + + private IAsyncResult BeginReadMaxTableEntries(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return dataReader.BeginReadUInt32(headerOffset + attribute.Offset, callback, state); + } + + private uint EndReadMaxTableEntries(IAsyncResult result) + { + var value = dataReader.EndReadUInt32(result); + return (uint) value; + } + + private long ReadBATOffset(VhdPropertyAttribute attribute) + { + return (long) dataReader.ReadUInt64(headerOffset + attribute.Offset); + } + + private IAsyncResult BeginReadBATOffset(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return dataReader.BeginReadUInt64(headerOffset + attribute.Offset, callback, state); + } + + private long EndReadBATOffset(IAsyncResult result) + { + var value = dataReader.EndReadUInt64(result); + return (long) value; + } + + private VhdHeaderVersion ReaderHeaderVersion(VhdPropertyAttribute attribute) + { + var version = dataReader.ReadUInt32(headerOffset + attribute.Offset); + var headerVersion = new VhdHeaderVersion(version); + if (!headerVersion.IsSupported()) + throw new VhdParsingException("unsupported format"); + return headerVersion; + } + + private IAsyncResult BeginReadHeaderVersion(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return dataReader.BeginReadUInt32(headerOffset + attribute.Offset, callback, state); + } + + private VhdHeaderVersion EndReadHeaderVersion(IAsyncResult result) + { + var value = dataReader.EndReadUInt32(result); + var headerVersion = new VhdHeaderVersion(value); + if (!headerVersion.IsSupported()) + throw new VhdParsingException("unsupported format"); + return headerVersion; + } + + private VhdCookie ReadHeaderCookie(VhdPropertyAttribute attribute) + { + var cookie = dataReader.ReadBytes(headerOffset + attribute.Offset, attribute.Size); + var vhdCookie = new VhdCookie(VhdCookieType.Header, cookie); + if (!vhdCookie.IsValid()) + throw new VhdParsingException(String.Format("unsupported format, Cookie:{0}", vhdCookie)); + return vhdCookie; + } + + private IAsyncResult BeginReadHeaderCookie(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return dataReader.BeginReadBytes(headerOffset + attribute.Offset, attribute.Size, callback, state); + } + + private VhdCookie EndReadHeaderCookie(IAsyncResult result) + { + var value = dataReader.EndReadBytes(result); + var vhdCookie = new VhdCookie(VhdCookieType.Header, value); + if (!vhdCookie.IsValid()) + throw new VhdParsingException(String.Format("unsupported format, Cookie:{0}", vhdCookie)); + return vhdCookie; + } + + + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdParentLocatorFactory.cs b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdParentLocatorFactory.cs new file mode 100644 index 000000000000..15ef804be9f7 --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Persistence/VhdParentLocatorFactory.cs @@ -0,0 +1,210 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text; +using Microsoft.WindowsAzure.Commands.Tools.Common.General; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence +{ + public class VhdParentLocatorFactory + { + private readonly VhdDataReader dataReader; + private readonly long offset; + private AttributeHelper attributeHelper; + + public VhdParentLocatorFactory(VhdDataReader dataReader, long offset) + { + this.dataReader = dataReader; + this.offset = offset; + attributeHelper = new AttributeHelper(); + } + + public ParentLocator Create() + { + var locator = new ParentLocator(); + locator.PlatformCode = ReadPlaformCode(attributeHelper.GetAttribute(() => locator.PlatformCode)); + locator.PlatformDataSpace = ReadPlatformDataSpace(attributeHelper.GetAttribute(() => locator.PlatformDataSpace)); + locator.PlatformDataLength = ReadPlatformDataLength(attributeHelper.GetAttribute(() => locator.PlatformDataLength)); + locator.Reserved = ReadReserved(attributeHelper.GetAttribute(() => locator.Reserved)); + locator.PlatformDataOffset = ReadPlatformDataOffset(attributeHelper.GetAttribute(() => locator.PlatformDataOffset)); + locator.PlatformSpecificFileLocator = ReadFileLocator(locator); + return locator; + } + + public IAsyncResult BeginReadCreate(AsyncCallback callback, object state) + { + return AsyncMachine.BeginAsyncMachine(CreateParentLocator, callback, state); + } + + public ParentLocator EndReadCreate(IAsyncResult result) + { + return AsyncMachine.EndAsyncMachine(result); + } + + private IEnumerable CreateParentLocator(AsyncMachine machine) + { + var locator = new ParentLocator(); + + BeginReadPlatformCode(attributeHelper.GetAttribute(() => locator.PlatformCode), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + locator.PlatformCode = EndReadPlatformCode(machine.CompletionResult); + + BeginReadPlatformDataSpace(attributeHelper.GetAttribute(() => locator.PlatformDataSpace), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + locator.PlatformDataSpace = EndReadPlatformDataSpace(machine.CompletionResult); + + BeginReadPlatformDataLength(attributeHelper.GetAttribute(() => locator.PlatformDataLength), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + locator.PlatformDataLength = EndReadPlatformDataLength(machine.CompletionResult); + + BeginReadReserved(attributeHelper.GetAttribute(() => locator.Reserved), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + locator.Reserved = EndReadReserved(machine.CompletionResult); + + BeginReadPlatformDataOffset(attributeHelper.GetAttribute(() => locator.PlatformDataOffset), machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + locator.PlatformDataOffset = EndReadPlatformDataOffset(machine.CompletionResult); + + BeginReadFileLocator(locator, machine.CompletionCallback, null); + yield return CompletionPort.SingleOperation; + locator.PlatformSpecificFileLocator = EndReadFileLocator(machine.CompletionResult); + + machine.ParameterValue = locator; + } + + private string ReadFileLocator(ParentLocator locator) + { + var fileLocator = dataReader.ReadBytes(locator.PlatformDataOffset, locator.PlatformDataLength); + return CreateFileLocator(locator, fileLocator); + } + + private string CreateFileLocator(ParentLocator locator, byte[] fileLocator) + { + switch(locator.PlatformCode) + { + case PlatformCode.None: + return String.Empty; + case PlatformCode.Wi2R: + case PlatformCode.Wi2K: + throw new VhdParsingException(String.Format("Deprecated PlatformCode:{0}",locator.PlatformCode)); + case PlatformCode.W2Ru: + //TODO: Add differencing disks path name, this is relative path + return Encoding.Unicode.GetString(fileLocator); + case PlatformCode.W2Ku: + return Encoding.Unicode.GetString(fileLocator); + case PlatformCode.Mac: + //TODO: Mac OS alias stored as a blob? + throw new NotImplementedException(String.Format("PlatformCode: {0}", locator.PlatformCode)); + case PlatformCode.MacX: + return Encoding.UTF8.GetString(fileLocator); + } + return Encoding.BigEndianUnicode.GetString(fileLocator).TrimEnd('\0'); + } + + private IAsyncResult BeginReadFileLocator(ParentLocator locator, AsyncCallback callback, object state) + { + return dataReader.BeginReadBytes(locator.PlatformDataOffset, locator.PlatformDataLength, callback, locator); + } + + private string EndReadFileLocator(IAsyncResult result) + { + var fileLocator = dataReader.EndReadBytes(result); + var locator = (ParentLocator) result.AsyncState; + return CreateFileLocator(locator, fileLocator); + } + + private PlatformCode ReadPlaformCode(VhdPropertyAttribute attribute) + { + return (PlatformCode) dataReader.ReadUInt32(offset + attribute.Offset); + } + + private IAsyncResult BeginReadPlatformCode(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return dataReader.BeginReadUInt32(offset + attribute.Offset, callback, state); + } + + private PlatformCode EndReadPlatformCode(IAsyncResult result) + { + var value = dataReader.EndReadUInt32(result); + return (PlatformCode) value; + } + + private int ReadPlatformDataSpace(VhdPropertyAttribute attribute) + { + return (int)dataReader.ReadUInt32(offset + attribute.Offset); + } + + private IAsyncResult BeginReadPlatformDataSpace(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return dataReader.BeginReadUInt32(offset + attribute.Offset, callback, state); + } + + private int EndReadPlatformDataSpace(IAsyncResult result) + { + var value = dataReader.EndReadUInt32(result); + return (int) value; + } + + private int ReadPlatformDataLength(VhdPropertyAttribute attribute) + { + return (int)dataReader.ReadUInt32(offset + attribute.Offset); + } + + private IAsyncResult BeginReadPlatformDataLength(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return dataReader.BeginReadUInt32(offset + attribute.Offset, callback, state); + } + + private int EndReadPlatformDataLength(IAsyncResult result) + { + var value = dataReader.EndReadUInt32(result); + return (int) value; + } + + private int ReadReserved(VhdPropertyAttribute attribute) + { + return (int)dataReader.ReadUInt32(offset + attribute.Offset); + } + + private IAsyncResult BeginReadReserved(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return dataReader.BeginReadUInt32(offset + attribute.Offset, callback, state); + } + + private int EndReadReserved(IAsyncResult result) + { + var value = dataReader.EndReadUInt32(result); + return (int) value; + } + + private long ReadPlatformDataOffset(VhdPropertyAttribute attribute) + { + return (long) dataReader.ReadUInt64(offset + attribute.Offset); + } + + private IAsyncResult BeginReadPlatformDataOffset(VhdPropertyAttribute attribute, AsyncCallback callback, object state) + { + return dataReader.BeginReadUInt64(offset + attribute.Offset, callback, state); + } + + private long EndReadPlatformDataOffset(IAsyncResult result) + { + var value = dataReader.EndReadUInt64(result); + return (long) value; + } + + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/PlatformCode.cs b/src/ServiceManagement/Compute/VhdManagement/Model/PlatformCode.cs new file mode 100644 index 000000000000..b28d3191d2d2 --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/PlatformCode.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model +{ + public enum PlatformCode + { + None = 0x0, + Wi2R = 0x57693272, + Wi2K = 0x5769326B, + W2Ru = 0x57327275, + W2Ku = 0x57326B75, + Mac = 0x4D616320, + MacX = 0x4D616358 + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/Sector.cs b/src/ServiceManagement/Compute/VhdManagement/Model/Sector.cs new file mode 100644 index 000000000000..6ef4f41d8f90 --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/Sector.cs @@ -0,0 +1,25 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model +{ + public class Sector + { + public uint BlockIndex { get; set; } + public long SectorIndex { get; set; } + public byte[] Data { get; set; } + public IndexRange LogicalRange { get; set; } + public long GlobalSectorIndex { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/VhdCookie.cs b/src/ServiceManagement/Compute/VhdManagement/Model/VhdCookie.cs new file mode 100644 index 000000000000..7deeb2025dff --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/VhdCookie.cs @@ -0,0 +1,79 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Text; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model +{ + public class VhdCookie + { + static readonly byte[] FooterCookie = Encoding.ASCII.GetBytes("conectix"); + static readonly byte[] HeaderCookie = Encoding.ASCII.GetBytes("cxsparse"); + + private readonly VhdCookieType cookieType; + private readonly byte[] expectedData; + + public static VhdCookie CreateFooterCookie() + { + return new VhdCookie(VhdCookieType.Footer, FooterCookie); + } + + public static VhdCookie CreateHeaderCookie() + { + return new VhdCookie(VhdCookieType.Header, HeaderCookie); + } + + public VhdCookie(VhdCookieType cookieType, byte[] data) + { + this.cookieType = cookieType; + this.Data = data; + this.expectedData = GetExpectedCookie(); + } + + public byte[] Data { get; private set; } + + public string StringData + { + get { return Encoding.ASCII.GetString(this.Data); } + } + + public bool IsValid() + { + if (Data.Length != expectedData.Length) + { + return false; + } + return !expectedData.Where((t, i) => Data[i] != t).Any(); + } + + private byte[] GetExpectedCookie() + { + return cookieType == VhdCookieType.Header ? HeaderCookie : FooterCookie; + } + + public VhdCookie CreateCopy() + { + var copy = new byte[Data.Length]; + Array.Copy(Data, copy, Data.Length); + return new VhdCookie(this.cookieType, copy); + } + + public override string ToString() + { + return StringData; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/VhdCookieType.cs b/src/ServiceManagement/Compute/VhdManagement/Model/VhdCookieType.cs new file mode 100644 index 000000000000..ca54a12b924d --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/VhdCookieType.cs @@ -0,0 +1,22 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model +{ + public enum VhdCookieType + { + Header, + Footer + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/VhdCreatorVersion.cs b/src/ServiceManagement/Compute/VhdManagement/Model/VhdCreatorVersion.cs new file mode 100644 index 000000000000..2327344fdee7 --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/VhdCreatorVersion.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model +{ + public class VhdCreatorVersion + { + public static VhdCreatorVersion VS2004 = new VhdCreatorVersion(0x00010000); + public static VhdCreatorVersion VPC2004 = new VhdCreatorVersion(0x00050000); + public static VhdCreatorVersion CSUP2011 = new VhdCreatorVersion(0x00070000); + + public VhdCreatorVersion(uint data) + { + this.Data = data; + } + + public uint Data { get; private set; } + + public override string ToString() + { + return this.Data.ToString(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/VhdEntityAttribute.cs b/src/ServiceManagement/Compute/VhdManagement/Model/VhdEntityAttribute.cs new file mode 100644 index 000000000000..ab428746b70c --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/VhdEntityAttribute.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model +{ + public class VhdEntityAttribute : Attribute + { + public int Size { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/VhdEntityDescriptor.cs b/src/ServiceManagement/Compute/VhdManagement/Model/VhdEntityDescriptor.cs new file mode 100644 index 000000000000..1e8f299ccce7 --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/VhdEntityDescriptor.cs @@ -0,0 +1,46 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using System.Reflection; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model +{ + public class VhdEntityDescriptor + { + public VhdEntityDescriptor() + { + this.PropertyDescriptors = GetPropertyDescriptors(); + } + + public IList PropertyDescriptors { get; private set; } + + static IList GetPropertyDescriptors() + { + return (from p in typeof(T).GetProperties(BindingFlags.Instance | BindingFlags.Public) + let vhdPropertyAttributes = p.GetCustomAttributes(typeof(VhdPropertyAttribute), false) + let exists = vhdPropertyAttributes.Length > 0 + let getter = p.GetGetMethod(true) + let setter = p.GetSetMethod(true) + where exists + select new VhdPropertyDescriptor + { + Attribute = (VhdPropertyAttribute)(vhdPropertyAttributes[0]), + Getter = getter, + Setter = setter + }).ToList(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/VhdFeature.cs b/src/ServiceManagement/Compute/VhdManagement/Model/VhdFeature.cs new file mode 100644 index 000000000000..be79f7dce86b --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/VhdFeature.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model +{ + [Flags] + public enum VhdFeature : uint + { + NoFeaturesEnabled = 0x00000000, + Temporary = 0x00000001, + Reserved = 0x00000002 + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/VhdFile.cs b/src/ServiceManagement/Compute/VhdManagement/Model/VhdFile.cs new file mode 100644 index 000000000000..2b7d51b2d801 --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/VhdFile.cs @@ -0,0 +1,106 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model +{ + public class VhdFile : IDisposable + { + private BinaryReader reader; + private bool disposed; + + public VhdFile(VhdFooter footer, VhdHeader header, BlockAllocationTable bat, VhdFile parent, Stream stream) + { + this.Footer = footer; + this.Header = header; + this.BlockAllocationTable = bat; + this.Parent = parent; + this.reader = new BinaryReader(stream, Encoding.Unicode); + DataReader = new VhdDataReader(this.reader); + } + + // These properties, and all others on this object, must remain immutable for certain FxCop suppressions to be allowed. + // If at any time this class is changed, please revisit all suppressions of the DoNotDeclareReadOnlyMutableReferenceTypes + // rule where VhdFile is declared as a readonly object. Otherwise it is always safe to suppress the rule DoNotDeclareReadOnlyMutableReferenceTypes + public VhdDataReader DataReader { get; private set; } + public VhdFooter Footer { get; private set; } + public VhdHeader Header { get; private set; } + public BlockAllocationTable BlockAllocationTable { get; private set; } + public DiskType DiskType { get { return Footer.DiskType; } } + public VhdFile Parent { get; private set; } + + public IEnumerable GetBlocks() + { + var blockFactory = this.GetBlockFactory(); + for (long index = 0; index < blockFactory.BlockCount; index++) + { + yield return blockFactory.Create((uint)index); + } + } + + public IBlockFactory GetBlockFactory() + { + switch (this.DiskType) + { + case DiskType.Fixed: + return new FixedDiskBlockFactory(this); + case DiskType.Dynamic: + return new DynamicDiskBlockFactory(this); + case DiskType.Differencing: + return new DifferencingDiskBlockFactory(this); + default: + throw new InvalidOperationException(String.Format("Unsupported DiskType:{0}", this.DiskType)); + } + } + + public IEnumerable GetIdentityChain() + { + var identities = new List { this.Footer.UniqueId }; + var currentFile = this.Parent; + while (currentFile != null) + { + identities.Add(currentFile.Footer.UniqueId); + currentFile = currentFile.Parent; + } + return identities; + } + + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) + { + if (!disposed) + { + if (disposing) + { + this.reader.Close(); + } + if(Parent != null) + { + Parent.Dispose(); + } + disposed = true; + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/VhdFileFormatVersion.cs b/src/ServiceManagement/Compute/VhdManagement/Model/VhdFileFormatVersion.cs new file mode 100644 index 000000000000..1850a98e2a69 --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/VhdFileFormatVersion.cs @@ -0,0 +1,55 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model +{ + + public class VhdFileFormatVersion + { + public static VhdFileFormatVersion DefaultFileFormatVersion = + new VhdFileFormatVersion((int)VHD_FOOTER_SUPPORTED_VERSION); + + const uint VHD_FOOTER_SUPPORTED_VERSION = 0x00010000; + + public VhdFileFormatVersion(uint data) + { + this.Data = data; + } + + public uint Data { get; private set; } + + public bool IsSupported() + { + return Data == VHD_FOOTER_SUPPORTED_VERSION; + } + + public override string ToString() + { + return this.Data.ToString(); + } + + public override bool Equals(object obj) + { + if (ReferenceEquals(null, obj)) return false; + if (ReferenceEquals(this, obj)) return true; + if (obj.GetType() != typeof(VhdFileFormatVersion)) return false; + return ((VhdFileFormatVersion)obj).Data == Data; + } + + public override int GetHashCode() + { + return Data.GetHashCode(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/VhdFooter.cs b/src/ServiceManagement/Compute/VhdManagement/Model/VhdFooter.cs new file mode 100644 index 000000000000..07effe50c7e2 --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/VhdFooter.cs @@ -0,0 +1,141 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model +{ + [VhdEntity(Size = 512)] + public class VhdFooter + { + [VhdProperty(Offset = 0, Size = 8)] + public VhdCookie Cookie { get; set; } + + [VhdProperty(Offset = 8, Size = 4)] + public VhdFeature Features { get; set; } + + [VhdProperty(Offset = 12, Size = 4)] + public VhdFileFormatVersion FileFormatVersion { get; set; } + + [VhdProperty(Offset = 16, Size = 8)] + public long HeaderOffset { get; set; } + + [VhdProperty(Offset = 24, Size = 4)] + public DateTime TimeStamp { get; set; } + + [VhdProperty(Offset = 28, Size = 4)] + public string CreatorApplication { get; set; } + + [VhdProperty(Offset = 32, Size = 4)] + public VhdCreatorVersion CreatorVersion { get; set; } + + [VhdProperty(Offset = 36, Size = 4)] + public HostOsType CreatorHostOsType { get; set; } + + [VhdProperty(Offset = 40, Size = 8)] + public long PhsyicalSize { get; set; } + + [VhdProperty(Offset = 48, Size = 8)] + public long VirtualSize { get; set; } + + [VhdProperty(Offset = 56, Size = 4)] + public DiskGeometry DiskGeometry { get; set; } + + [VhdProperty(Offset = 60, Size = 4)] + public DiskType DiskType { get; set; } + + [VhdProperty(Offset = 64, Size = 4)] + public uint CheckSum { get; set; } + + [VhdProperty(Offset = 68, Size = 16)] + public Guid UniqueId { get; set; } + + [VhdProperty(Offset = 84, Size = 1)] + public bool SavedState { get; set; } + + [VhdProperty(Offset = 85, Size = 427)] + public byte[] Reserved { get; set; } + + [VhdProperty(Offset = 0, Size = 512)] + public byte[] RawData { get; set; } + + public VhdFooter CreateCopy() + { + return new VhdFooter + { + Cookie = this.Cookie.CreateCopy(), + Features = this.Features, + FileFormatVersion = this.FileFormatVersion, + HeaderOffset = this.HeaderOffset, + TimeStamp = this.TimeStamp, + CreatorApplication = this.CreatorApplication, + CreatorVersion = this.CreatorVersion, + CreatorHostOsType = this.CreatorHostOsType, + PhsyicalSize = this.PhsyicalSize, + VirtualSize = this.VirtualSize, + DiskGeometry = this.DiskGeometry.CreateCopy(), + DiskType = this.DiskType, + CheckSum = this.CheckSum, + UniqueId = this.UniqueId, + SavedState = this.SavedState, + Reserved = CreateCopy(this.Reserved), + RawData = CreateCopy(this.RawData), + }; + } + + static byte[] CreateCopy(byte[] data) + { + var result = new byte[data.Length]; + Array.Copy(data, result, data.Length); + return result; + } + + public override bool Equals(object obj) + { + return Equals(obj as VhdFooter); + } + + private bool Equals(VhdFooter other) + { + if (ReferenceEquals(null, other)) return false; + if (ReferenceEquals(this, other)) return true; + return Equals(other.Cookie, Cookie) && Equals(other.Features, Features) && Equals(other.FileFormatVersion, FileFormatVersion) && other.HeaderOffset == HeaderOffset && other.TimeStamp.Equals(TimeStamp) && Equals(other.CreatorApplication, CreatorApplication) && Equals(other.CreatorVersion, CreatorVersion) && Equals(other.CreatorHostOsType, CreatorHostOsType) && other.PhsyicalSize == PhsyicalSize && other.VirtualSize == VirtualSize && Equals(other.DiskGeometry, DiskGeometry) && Equals(other.DiskType, DiskType) && other.CheckSum == CheckSum && other.UniqueId.Equals(UniqueId) && other.SavedState.Equals(SavedState) && Equals(other.Reserved, Reserved) && Equals(other.RawData, RawData); + } + + public override int GetHashCode() + { + unchecked + { + int result = (Cookie != null ? Cookie.GetHashCode() : 0); + result = (result*397) ^ Features.GetHashCode(); + result = (result*397) ^ (FileFormatVersion != null ? FileFormatVersion.GetHashCode() : 0); + result = (result*397) ^ HeaderOffset.GetHashCode(); + result = (result*397) ^ TimeStamp.GetHashCode(); + result = (result*397) ^ (CreatorApplication != null ? CreatorApplication.GetHashCode() : 0); + result = (result*397) ^ (CreatorVersion != null ? CreatorVersion.GetHashCode() : 0); + result = (result*397) ^ CreatorHostOsType.GetHashCode(); + result = (result*397) ^ PhsyicalSize.GetHashCode(); + result = (result*397) ^ VirtualSize.GetHashCode(); + result = (result*397) ^ (DiskGeometry != null ? DiskGeometry.GetHashCode() : 0); + result = (result*397) ^ DiskType.GetHashCode(); + result = (result*397) ^ CheckSum.GetHashCode(); + result = (result*397) ^ UniqueId.GetHashCode(); + result = (result*397) ^ SavedState.GetHashCode(); + result = (result*397) ^ (Reserved != null ? Reserved.GetHashCode() : 0); + result = (result*397) ^ (RawData != null ? RawData.GetHashCode() : 0); + return result; + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/VhdHeader.cs b/src/ServiceManagement/Compute/VhdManagement/Model/VhdHeader.cs new file mode 100644 index 000000000000..0feafa35d951 --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/VhdHeader.cs @@ -0,0 +1,77 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model +{ + [VhdEntity(Size = 1024)] + public class VhdHeader + { + [VhdProperty(Offset = 0, Size = 8)] + public VhdCookie Cookie { get; set; } + + [VhdProperty(Offset = 8, Size = 8)] + public long DataOffset { get; set; } + + [VhdProperty(Offset = 16, Size = 8)] + public long TableOffset { get; set; } + + [VhdProperty(Offset = 24, Size = 4)] + public VhdHeaderVersion HeaderVersion { get; set; } + + [VhdProperty(Offset = 28, Size = 4)] + public uint MaxTableEntries { get; set; } + + [VhdProperty(Offset = 32, Size = 4)] + public uint BlockSize { get; set; } + + [VhdProperty(Offset = 36, Size = 4)] + public uint CheckSum { get; set; } + + [VhdProperty(Offset = 40, Size = 16)] + public Guid ParentUniqueId { get; set; } + + [VhdProperty(Offset = 56, Size = 4)] + public DateTime ParentTimeStamp { get; set; } + + [VhdProperty(Offset = 60, Size = 4)] + public uint Reserverd1 { get; set; } + + [VhdProperty(Offset = 64, Size = 512)] + public string ParentPath { get; set; } + + [VhdProperty(Offset = 576, Count = 8)] + public IList ParentLocators { get; set; } + + [VhdProperty(Offset = 0, Size = 1024)] + public byte[] RawData { get; set; } + + public string GetAbsoluteParentPath() + { + return (from p in ParentLocators + where p.PlatformCode == PlatformCode.W2Ku + select p.PlatformSpecificFileLocator).FirstOrDefault(); + } + + public string GetRelativeParentPath() + { + return (from p in ParentLocators + where p.PlatformCode == PlatformCode.W2Ru + select p.PlatformSpecificFileLocator).FirstOrDefault(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/VhdHeaderVersion.cs b/src/ServiceManagement/Compute/VhdManagement/Model/VhdHeaderVersion.cs new file mode 100644 index 000000000000..5b3731986fd9 --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/VhdHeaderVersion.cs @@ -0,0 +1,38 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model +{ + public class VhdHeaderVersion + { + private const uint VHD_HEADER_SUPPORTED_VERSION = 0x00010000; + + public VhdHeaderVersion(uint data) + { + this.Data = data; + } + + public uint Data { get; private set; } + + public bool IsSupported() + { + return Data == VHD_HEADER_SUPPORTED_VERSION; + } + + public override string ToString() + { + return this.Data.ToString(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/VhdPropertyAttribute.cs b/src/ServiceManagement/Compute/VhdManagement/Model/VhdPropertyAttribute.cs new file mode 100644 index 000000000000..c57d15cc6446 --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/VhdPropertyAttribute.cs @@ -0,0 +1,25 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model +{ + public class VhdPropertyAttribute : Attribute + { + public int Offset { get; set; } + public int Size { get; set; } + public int Count { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/VhdPropertyDescriptor.cs b/src/ServiceManagement/Compute/VhdManagement/Model/VhdPropertyDescriptor.cs new file mode 100644 index 000000000000..13a758e8f08b --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/VhdPropertyDescriptor.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Reflection; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model +{ + public class VhdPropertyDescriptor + { + public VhdPropertyAttribute Attribute { get; set; } + + public MethodInfo Getter { get; set; } + + public MethodInfo Setter { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Model/VhdTimeStamp.cs b/src/ServiceManagement/Compute/VhdManagement/Model/VhdTimeStamp.cs new file mode 100644 index 000000000000..b3f7d1702a9f --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Model/VhdTimeStamp.cs @@ -0,0 +1,47 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd.Model +{ + public class VhdTimeStamp + { + private static readonly DateTime VhdBaseTime = new DateTime(2000, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc); + private readonly uint value; + + public VhdTimeStamp(DateTime dateTime) + { + if (dateTime < VhdBaseTime) + { + var message = String.Format("DateTime must be after Base Vhd Time: {0}", VhdBaseTime); + throw new ArgumentOutOfRangeException("dateTime", message); + } + + this.TotalSeconds = (uint)dateTime.Subtract(VhdBaseTime).TotalSeconds; + } + + public VhdTimeStamp(uint value) + { + this.value = value; + } + + public uint TotalSeconds { get; private set; } + + public DateTime ToDateTime() + { + return VhdBaseTime.AddSeconds(value).ToUniversalTime(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/Properties/AssemblyInfo.cs b/src/ServiceManagement/Compute/VhdManagement/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..0f4ede43c0a7 --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/Properties/AssemblyInfo.cs @@ -0,0 +1,37 @@ +using System; +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("VhdManagement")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("VhdManagement")] +[assembly: AssemblyCopyright("Copyright © Microsoft")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("f533c72c-c034-4e74-a961-8b2da198e104")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: CLSCompliant(false)] \ No newline at end of file diff --git a/src/ServiceManagement/Compute/VhdManagement/SparseStream.cs b/src/ServiceManagement/Compute/VhdManagement/SparseStream.cs new file mode 100644 index 000000000000..bb63a7898e0b --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/SparseStream.cs @@ -0,0 +1,54 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd +{ + ///

+ /// A stream with additional extent information. + /// + /// + /// Extent information reveals the ranges of the stream that contain non-zero data. Clients may use + /// the extent information to optimize reads to the stream. The stream supports reads over any range, + /// regardless of the extents. + /// + public abstract class SparseStream : Stream + { + public abstract IEnumerable Extents { get; } + } + + /// + /// An extent. + /// + public struct StreamExtent + { + public Guid Owner; + public long StartOffset; + public long EndOffset; + + public long Length + { + get + { + return (this.EndOffset - this.StartOffset) + 1; + } + } + + public IndexRange Range { get; set; } + } +} diff --git a/src/ServiceManagement/Compute/VhdManagement/VhdManagement.csproj b/src/ServiceManagement/Compute/VhdManagement/VhdManagement.csproj new file mode 100644 index 000000000000..e8200b196df3 --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/VhdManagement.csproj @@ -0,0 +1,132 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {80496B7B-068A-4A1E-B0BB-4B1FFF3FA616} + Library + Properties + Microsoft.WindowsAzure.Commands.Tools.Vhd + Microsoft.WindowsAzure.Commands.Tools.Vhd + v4.5 + 512 + + ..\..\..\ + true + + + true + full + false + ..\..\..\Package\Debug\ServiceManagement\Azure\Compute + DEBUG;TRACE + prompt + 4 + true + true + false + + + OnBuildSuccess + + + ..\..\..\Package\Release\ServiceManagement\Azure\Compute + TRACE;SIGN + true + pdbonly + AnyCPU + bin\Release\Microsoft.WindowsAzure.Tools.Vhd.CodeAnalysisLog.xml + true + GlobalSuppressions.cs + prompt + MinimumRecommendedRules.ruleset + ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets + ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules + true + MSSharedLibKey.snk + true + true + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + diff --git a/src/ServiceManagement/Compute/VhdManagement/VirtualDiskStream.cs b/src/ServiceManagement/Compute/VhdManagement/VirtualDiskStream.cs new file mode 100644 index 000000000000..765f3233e1ff --- /dev/null +++ b/src/ServiceManagement/Compute/VhdManagement/VirtualDiskStream.cs @@ -0,0 +1,257 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model; +using Microsoft.WindowsAzure.Commands.Tools.Vhd.Model.Persistence; + +namespace Microsoft.WindowsAzure.Commands.Tools.Vhd +{ + /// + /// Provides a logical stream over a virtual hard disk (VHD). + /// + /// + /// This stream implementation provides a "view" over a VHD, such that the + /// VHD appears to be an ordinary fixed VHD file, regardless of the true physical layout. + /// This stream supports any combination of differencing, dynamic disks, and fixed disks. + /// + public class VirtualDiskStream : SparseStream + { + private long position; + private VhdFile vhdFile; + private IBlockFactory blockFactory; + private IndexRange footerRange; + private IndexRange fileDataRange; + private bool isDisposed; + + public VirtualDiskStream(string vhdPath) + { + this.vhdFile = new VhdFileFactory().Create(vhdPath); + this.blockFactory = vhdFile.GetBlockFactory(); + footerRange = this.blockFactory.GetFooterRange(); + fileDataRange = IndexRange.FromLength(0, this.Length - footerRange.Length); + } + + public override bool CanRead + { + get { return true; } + } + + public override bool CanSeek + { + get { return true; } + } + + public override bool CanWrite + { + get { return false; } + } + + public override void Flush() + { + } + + public override sealed long Length + { + get { return this.footerRange.EndIndex + 1; } + } + + public override long Position + { + get { return this.position; } + set + { + if (value < 0) throw new ArgumentException(); + if (value >= this.Length) throw new EndOfStreamException(); + this.position = value; + } + } + + /// + /// Gets the extents of the stream that contain data. + /// + public override IEnumerable Extents + { + get + { + for (uint index = 0; index < blockFactory.BlockCount; index++ ) + { + var block = blockFactory.Create(index); + if(!block.Empty) + { + yield return new StreamExtent + { + Owner = block.VhdUniqueId, + StartOffset = block.LogicalRange.StartIndex, + EndOffset = block.LogicalRange.EndIndex, + Range = block.LogicalRange + }; + } + } + yield return new StreamExtent + { + Owner = vhdFile.Footer.UniqueId, + StartOffset = this.footerRange.StartIndex, + EndOffset = this.footerRange.EndIndex, + Range = this.footerRange + }; + } + } + + public DiskType DiskType + { + get { return this.vhdFile.DiskType; } + } + + public DiskType RootDiskType + { + get + { + var diskType = this.vhdFile.DiskType; + for(var parent = this.vhdFile.Parent; parent != null; parent = parent.Parent) + { + diskType = parent.DiskType; + } + return diskType; + } + } + /// + /// Reads the specified number of bytes from the current position. + /// + public override int Read(byte[] buffer, int offset, int count) + { + if (count <= 0) + { + return 0; + } + + try + { + var rangeToRead = IndexRange.FromLength(this.position, count); + + int writtenCount = 0; + if (fileDataRange.Intersection(rangeToRead) == null) + { + int readCountFromFooter; + if (TryReadFromFooter(rangeToRead, buffer, offset, out readCountFromFooter)) + { + writtenCount += readCountFromFooter; + } + return writtenCount; + } + + rangeToRead = fileDataRange.Intersection(rangeToRead); + + var startingBlock = ByteToBlock(rangeToRead.StartIndex); + var endingBlock = ByteToBlock(rangeToRead.EndIndex); + + for(var blockIndex = startingBlock; blockIndex <= endingBlock; blockIndex++) + { + var currentBlock = blockFactory.Create(blockIndex); + var rangeToReadInBlock = currentBlock.LogicalRange.Intersection(rangeToRead); + + var copyStartIndex = rangeToReadInBlock.StartIndex % blockFactory.GetBlockSize(); + Buffer.BlockCopy(currentBlock.Data, (int) copyStartIndex, buffer, offset + writtenCount, (int) rangeToReadInBlock.Length); + + writtenCount += (int)rangeToReadInBlock.Length; + } + this.position += writtenCount; + + return writtenCount; + } + catch (Exception e) + { + throw new VhdParsingException("Invalid or Corrupted VHD file", e); + } + } + + public bool TryReadFromFooter(IndexRange rangeToRead, byte[] buffer, int offset, out int readCount) + { + readCount = 0; + var rangeToReadFromFooter = this.footerRange.Intersection(rangeToRead); + if (rangeToReadFromFooter != null) + { + var footerData = GenerateFooter(); + var copyStartIndex = rangeToReadFromFooter.StartIndex - footerRange.StartIndex; + Buffer.BlockCopy(footerData, (int)copyStartIndex, buffer, offset, (int)rangeToReadFromFooter.Length); + this.position += (int)rangeToReadFromFooter.Length; + readCount = (int)rangeToReadFromFooter.Length; + return true; + } + return false; + } + + private uint ByteToBlock(long position) + { + uint sectorsPerBlock = (uint) (this.blockFactory.GetBlockSize() / VhdConstants.VHD_SECTOR_LENGTH); + return (uint)Math.Floor((position / VhdConstants.VHD_SECTOR_LENGTH) * 1.0m / sectorsPerBlock); + } + + private byte[] GenerateFooter() + { + var footer = vhdFile.Footer.CreateCopy(); + if(vhdFile.Footer.DiskType != DiskType.Fixed) + { + footer.HeaderOffset = VhdConstants.VHD_NO_DATA_LONG; + footer.DiskType = DiskType.Fixed; + footer.CreatorApplication = VhdFooterFactory.WindowsAzureCreatorApplicationName; + } + var serializer = new VhdFooterSerializer(footer); + return serializer.ToByteArray(); + } + + public override long Seek(long offset, SeekOrigin origin) + { + switch (origin) + { + case SeekOrigin.Begin: + this.Position = offset; + break; + case SeekOrigin.Current: + this.Position += offset; + break; + case SeekOrigin.End: + this.Position -= offset; + break; + default: + throw new NotSupportedException(); + } + return this.Position; + } + + public override void SetLength(long value) + { + throw new NotSupportedException(); + } + + public override void Write(byte[] buffer, int offset, int count) + { + throw new NotSupportedException(); + } + + protected override void Dispose(bool disposing) + { + if(!isDisposed) + { + if(disposing) + { + this.vhdFile.Dispose(); + isDisposed = true; + } + } + } + } +} diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/AuthorizedDedicatedCircuits/GetAzureAuthorizedDedicatedCircuit.cs b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/AuthorizedDedicatedCircuits/GetAzureAuthorizedDedicatedCircuit.cs new file mode 100644 index 000000000000..7b70895acd0b --- /dev/null +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/AuthorizedDedicatedCircuits/GetAzureAuthorizedDedicatedCircuit.cs @@ -0,0 +1,55 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +namespace Microsoft.WindowsAzure.Commands.ExpressRoute +{ + using Microsoft.WindowsAzure.Management.ExpressRoute.Models; + using System.Collections.Generic; + using System.Management.Automation; + + [Cmdlet(VerbsCommon.Get, "AzureAuthorizedDedicatedCircuit"), OutputType(typeof(AzureAuthorizedDedicatedCircuit), typeof(IEnumerable))] + public class GetAzureAuthorizedDedicatedCircuitCommand : ExpressRouteBaseCmdlet + { + [Parameter(Position = 0, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "Service Key representing the Dedicated Circuit")] + [ValidateGuid] + [ValidateNotNullOrEmpty] + public string ServiceKey { get; set; } + + public override void ExecuteCmdlet() + { + if (!string.IsNullOrEmpty(ServiceKey)) + { + GetByServiceKey(); + } + else + { + GetNoServiceKey(); + } + } + + private void GetByServiceKey() + { + var circuit = ExpressRouteClient.GetAuthorizedAzureDedicatedCircuit(ServiceKey); + WriteObject(circuit); + } + + private void GetNoServiceKey() + { + var circuits = ExpressRouteClient.ListAzureAuthorizedDedicatedCircuits(); + WriteObject(circuits, true); + } + } +} diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/BgpPeerings/GetAzureBGPPeering.cs b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/BgpPeerings/GetAzureBGPPeering.cs new file mode 100644 index 000000000000..48d26f623267 --- /dev/null +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/BgpPeerings/GetAzureBGPPeering.cs @@ -0,0 +1,40 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.ComponentModel; +using System.Management.Automation; +using Microsoft.WindowsAzure.Management.ExpressRoute.Models; + +namespace Microsoft.WindowsAzure.Commands.ExpressRoute +{ + [Cmdlet(VerbsCommon.Get, "AzureBGPPeering"), OutputType(typeof(AzureBgpPeering))] + public class GetAzureBGPPeeringCommand : ExpressRouteBaseCmdlet + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "Service Key representing the Azure Circuit")] + [ValidateGuid] + [ValidateNotNullOrEmpty] + public string ServiceKey { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Bgp Peering Access Type: Public or Private")] + [DefaultValue("Private")] + public BgpPeeringAccessType AccessType { get; set; } + + public override void ExecuteCmdlet() + { + var route = ExpressRouteClient.GetAzureBGPPeering(ServiceKey, AccessType); + WriteObject(route); + } + } +} diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/BgpPeerings/NewAzureBGPPeering.cs b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/BgpPeerings/NewAzureBGPPeering.cs new file mode 100644 index 000000000000..0735add9bb3a --- /dev/null +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/BgpPeerings/NewAzureBGPPeering.cs @@ -0,0 +1,60 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.ComponentModel; +using System.Management.Automation; +using Microsoft.WindowsAzure.Management.ExpressRoute.Models; + +namespace Microsoft.WindowsAzure.Commands.ExpressRoute +{ + [Cmdlet(VerbsCommon.New, "AzureBGPPeering"), OutputType(typeof(AzureBgpPeering))] + public class NewAzureBGPPeeringCommand : ExpressRouteBaseCmdlet + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Service Key representing Azure Circuit for which BGP peering needs to be created/modified")] + [ValidateGuid] + [ValidateNotNullOrEmpty] + public string ServiceKey { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "Peer Asn")] + public UInt32 PeerAsn { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Primary Peer Subnet")] + [ValidateNotNullOrEmpty] + public string PrimaryPeerSubnet { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Secondary Peer Subnet")] + [ValidateNotNullOrEmpty] + public string SecondaryPeerSubnet { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Shared Key")] + [ValidateNotNullOrEmpty] + public string SharedKey { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Vlan Id")] + public UInt32 VlanId { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Bgp Peering Access Type: Public or Private")] + [DefaultValue("Private")] + public BgpPeeringAccessType AccessType { get; set; } + + public override void ExecuteCmdlet() + { + var route = ExpressRouteClient.NewAzureBGPPeering(ServiceKey, PeerAsn, PrimaryPeerSubnet, + SecondaryPeerSubnet, VlanId, AccessType, SharedKey); + WriteObject(route); + } + } +} diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/BgpPeerings/RemoveAzureBGPPeering.cs b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/BgpPeerings/RemoveAzureBGPPeering.cs new file mode 100644 index 000000000000..4b5ecc57aaf0 --- /dev/null +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/BgpPeerings/RemoveAzureBGPPeering.cs @@ -0,0 +1,67 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.ComponentModel; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ExpressRoute.Properties; +using Microsoft.WindowsAzure.Management.ExpressRoute.Models; + +namespace Microsoft.WindowsAzure.Commands.ExpressRoute +{ + [Cmdlet(VerbsCommon.Remove, "AzureBGPPeering"),OutputType(typeof(bool))] + public class RemoveAzureBGPPeeringCommand : ExpressRouteBaseCmdlet + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "Service Key associated with the Azure BGP Peering to be removed")] + [ValidateGuid] + [ValidateNotNullOrEmpty] + public string ServiceKey { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Bgp Peering Access Type: Public or Private")] + [DefaultValue("Private")] + public BgpPeeringAccessType AccessType { get; set; } + + [Parameter(HelpMessage = "Do not confirm Azure BGP Peering deletion")] + public SwitchParameter Force { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + ConfirmAction( + Force.IsPresent, + string.Format(Resources.RemoveAzureBGPPeeringWarning, ServiceKey), + Resources.RemoveAzureBGPPeeringMessage, + ServiceKey, + () => + { + + if(!ExpressRouteClient.RemoveAzureBGPPeering(ServiceKey, AccessType)) + { + throw new Exception(Resources.RemoveAzureBGPPeeringFailed); + } + else + { + WriteVerboseWithTimestamp(Resources.RemoveAzureBGPPeeringSucceeded, ServiceKey); + if (PassThru.IsPresent) + { + WriteObject(true); + } + } + }); + } + } +} diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/BgpPeerings/SetAzureBGPPeering.cs b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/BgpPeerings/SetAzureBGPPeering.cs new file mode 100644 index 000000000000..085123494a51 --- /dev/null +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/BgpPeerings/SetAzureBGPPeering.cs @@ -0,0 +1,93 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.ComponentModel; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ExpressRoute.Properties; +using Microsoft.WindowsAzure.Management.ExpressRoute.Models; + +namespace Microsoft.WindowsAzure.Commands.ExpressRoute +{ + [Cmdlet(VerbsCommon.Set, "AzureBGPPeering"), OutputType(typeof(AzureBgpPeering))] + public class SetAzureBGPPeeringCommand : ExpressRouteBaseCmdlet + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Service Key representing Azure Circuit for which BGP peering needs to be created/modified")] + [ValidateGuid] + [ValidateNotNullOrEmpty] + public string ServiceKey { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "Peer Asn")] + public UInt32? PeerAsn { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Primary Peer Subnet")] + [ValidateNotNullOrEmpty] + public string PrimaryPeerSubnet { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Secondary Peer Subnet")] + [ValidateNotNullOrEmpty] + public string SecondaryPeerSubnet { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Shared Key")] + [ValidateNotNullOrEmpty] + public string SharedKey { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Vlan Id")] + public UInt32? VlanId { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Bgp Peering Access Type: Public or Private")] + [DefaultValue("Private")] + public BgpPeeringAccessType AccessType { get; set; } + + public override void ExecuteCmdlet() + { + try + { + var route = ExpressRouteClient.GetAzureBGPPeering(ServiceKey, AccessType); + var updatedRoute = ExpressRouteClient.UpdateAzureBGPPeering(ServiceKey, AccessType, + PeerAsn.HasValue ? PeerAsn.Value : route.PeerAsn, PrimaryPeerSubnet ?? route.PrimaryPeerSubnet, + SecondaryPeerSubnet ?? route.SecondaryPeerSubnet, VlanId.HasValue ? VlanId.Value : route.VlanId, + SharedKey); + WriteObject(updatedRoute, false); + } + catch + { + if (!PeerAsn.HasValue) + { + throw new ArgumentException(Resources.PeerAsnRequired); + } + + if (!VlanId.HasValue) + { + throw new ArgumentException(Resources.VlanIdRequired); + } + + if (PrimaryPeerSubnet == null) + { + throw new ArgumentException(Resources.PrimaryPeerSubnetRequired); + } + + if (SecondaryPeerSubnet == null) + { + throw new ArgumentException(Resources.SecondaryPeerSubnetRequired); + } + + var newRoute = ExpressRouteClient.NewAzureBGPPeering(ServiceKey, PeerAsn.Value, PrimaryPeerSubnet, + SecondaryPeerSubnet, VlanId.Value, AccessType, SharedKey); + WriteObject(newRoute); + } + } + } +} diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Commands.ExpressRoute.csproj b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Commands.ExpressRoute.csproj new file mode 100644 index 000000000000..c5450f7d7711 --- /dev/null +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Commands.ExpressRoute.csproj @@ -0,0 +1,164 @@ + + + + Debug + AnyCPU + {45C2D687-E0CE-4C97-B731-335834DC2BF2} + Library + Properties + Microsoft.WindowsAzure.Commands.ExpressRoute + Microsoft.WindowsAzure.Commands.ExpressRoute + v4.5 + 512 + ..\..\..\ + true + + + + true + full + false + ..\..\..\Package\Debug\ServiceManagement\Azure\ExpressRoute\ + DEBUG;TRACE + prompt + 4 + true + true + false + + + OnBuildSuccess + + + ..\..\..\Package\Release\ServiceManagement\Azure\ExpressRoute\ + TRACE;SIGN + true + pdbonly + AnyCPU + true + MSSharedLibKey.snk + true + false + + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.ExpressRoute.0.15.0-preview\lib\net40\Microsoft.WindowsAzure.Management.ExpressRoute.dll + + + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + True + + + + + + + False + C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Management.Automation\v4.0_3.0.0.0__31bf3856ad364e35\System.Management.Automation.dll + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Resources.resx + True + True + + + + + + PreserveNewest + + + PreserveNewest + Designer + + + + + + + PreserveNewest + + + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitLinkAuthorizationMicrosoftIds/NewAzureDedicatedCircuitLinkAuthorizationMicrosoftIds.cs b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitLinkAuthorizationMicrosoftIds/NewAzureDedicatedCircuitLinkAuthorizationMicrosoftIds.cs new file mode 100644 index 000000000000..02d621b27106 --- /dev/null +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitLinkAuthorizationMicrosoftIds/NewAzureDedicatedCircuitLinkAuthorizationMicrosoftIds.cs @@ -0,0 +1,44 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ExpressRoute +{ + using Microsoft.WindowsAzure.Management.ExpressRoute.Models; + using System.Management.Automation; + + [Cmdlet(VerbsCommon.New, "AzureDedicatedCircuitLinkAuthorizationMicrosoftIds")] + public class NewAzureDedicatedCircuitLinkAuthorizationMicrosoftIdsCommand : ExpressRouteBaseCmdlet + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "Service Key representing Azure Circuit")] + [ValidateGuid] + [ValidateNotNullOrEmpty] + public string ServiceKey { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Authorization Id")] + [ValidateGuid] + [ValidateNotNullOrEmpty] + public string AuthorizationId { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Microsoft Ids to be removed")] + public string MicrosoftIds { get; set; } + + public override void ExecuteCmdlet() + { + var mapping = ExpressRouteClient.NewAzureDedicatedCircuitLinkAuthorizationMicrosoftIds(ServiceKey, AuthorizationId, MicrosoftIds); + WriteObject(mapping); + } + } +} + diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitLinkAuthorizationMicrosoftIds/RemoveAzureDedicatedCircuitLinkAuthorizationMicrosoftIds.cs b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitLinkAuthorizationMicrosoftIds/RemoveAzureDedicatedCircuitLinkAuthorizationMicrosoftIds.cs new file mode 100644 index 000000000000..bb3a59de7f01 --- /dev/null +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitLinkAuthorizationMicrosoftIds/RemoveAzureDedicatedCircuitLinkAuthorizationMicrosoftIds.cs @@ -0,0 +1,44 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ExpressRoute +{ + using Microsoft.WindowsAzure.Management.ExpressRoute.Models; + using System.Management.Automation; + + [Cmdlet(VerbsCommon.Remove, "AzureDedicatedCircuitLinkAuthorizationMicrosoftIds")] + public class RemoveAzureDedicatedCircuitLinkAuthorizationMicrosoftIdsCommand : ExpressRouteBaseCmdlet + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "Service Key representing Azure Circuit")] + [ValidateGuid] + [ValidateNotNullOrEmpty] + public string ServiceKey { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Authorization Id")] + [ValidateGuid] + [ValidateNotNullOrEmpty] + public string AuthorizationId { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Microsoft Ids to be removed")] + public string MicrosoftIds { get; set; } + + public override void ExecuteCmdlet() + { + var mapping = ExpressRouteClient.RemoveAzureDedicatedCircuitLinkAuthorizationMicrosoftIds(ServiceKey, AuthorizationId, MicrosoftIds); + WriteObject(mapping); + } + } +} + diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitLinkAuthorizations/GetAzureDedicatedCircuitLinkAuthorization.cs b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitLinkAuthorizations/GetAzureDedicatedCircuitLinkAuthorization.cs new file mode 100644 index 000000000000..85312f21bc55 --- /dev/null +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitLinkAuthorizations/GetAzureDedicatedCircuitLinkAuthorization.cs @@ -0,0 +1,61 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ExpressRoute +{ + using Microsoft.WindowsAzure.Management.ExpressRoute.Models; + using System.Management.Automation; + + [Cmdlet(VerbsCommon.Get, "AzureDedicatedCircuitLinkAuthorization"), OutputType(typeof(AzureDedicatedCircuitLinkAuthorization))] + public class GetAzureDedicatedCircuitLinkAuthorizationCommand : ExpressRouteBaseCmdlet + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "Service Key representing the Azure Dedicated Circuit")] + [ValidateGuid] + [ValidateNotNullOrEmpty] + public string ServiceKey { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "Authorization Id")] + [ValidateGuid] + [ValidateNotNullOrEmpty] + public string AuthorizationId { get; set; } + + public override void ExecuteCmdlet() + { + if (!string.IsNullOrEmpty(AuthorizationId)) + { + GetByAuthorizationId(); + } + else + { + GetNoAuthorizationId(); + } + } + + private void GetByAuthorizationId() + { + var linkAuth = ExpressRouteClient.GetAzureDedicatedCircuitLinkAuthorization(ServiceKey, AuthorizationId); + WriteObject(linkAuth); + } + + private void GetNoAuthorizationId() + { + var linkAuths = ExpressRouteClient.ListAzureDedicatedCircuitLinkAuthorizations(ServiceKey); + WriteObject(linkAuths, true); + } + + + } +} diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitLinkAuthorizations/NewAzureDedicatedCircuitLinkAuthorization.cs b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitLinkAuthorizations/NewAzureDedicatedCircuitLinkAuthorization.cs new file mode 100644 index 000000000000..9b38f1f2a4e2 --- /dev/null +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitLinkAuthorizations/NewAzureDedicatedCircuitLinkAuthorization.cs @@ -0,0 +1,50 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ExpressRoute +{ + using Microsoft.WindowsAzure.Management.ExpressRoute.Models; + using System.Management.Automation; + + [Cmdlet(VerbsCommon.New, "AzureDedicatedCircuitLinkAuthorization"), OutputType(typeof(AzureDedicatedCircuitLinkAuthorization))] + public class NewAzureDedicatedCircuitLinkAuthorizationCommand : ExpressRouteBaseCmdlet + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "Service Key representing Azure Circuit")] + [ValidateGuid] + [ValidateNotNullOrEmpty] + public string ServiceKey { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "Description")] + [ValidateNotNullOrEmpty] + public string Description { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "Maximum number of links that can be created")] + [ValidateNotNullOrEmpty] + public int Limit { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Microsoft Ids to be added")] + public string MicrosoftIds { get; set; } + + public override void ExecuteCmdlet() + { + var mapping = ExpressRouteClient.NewAzureDedicatedCircuitLinkAuthorization(ServiceKey, Description, Limit, + MicrosoftIds); + WriteObject(mapping); + } + } +} + diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitLinkAuthorizations/RemoveAzureDedicatedCircuitLinkAuthorization.cs b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitLinkAuthorizations/RemoveAzureDedicatedCircuitLinkAuthorization.cs new file mode 100644 index 000000000000..57a89ac34939 --- /dev/null +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitLinkAuthorizations/RemoveAzureDedicatedCircuitLinkAuthorization.cs @@ -0,0 +1,64 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ExpressRoute +{ + using Properties; + using System; + using System.Management.Automation; + + [Cmdlet(VerbsCommon.Remove, "AzureDedicatedCircuitLinkAuthorization"), OutputType(typeof(bool))] + public class RemoveAzureDedicatedCircuitLinkAuthorizationCommand : ExpressRouteBaseCmdlet + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "Service Key for the Azure Circuit")] + [ValidateGuid] + [ValidateNotNullOrEmpty] + public string ServiceKey { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "Authorization Id")] + [ValidateGuid] + [ValidateNotNullOrEmpty] + public string AuthorizationId { get; set; } + + [Parameter(HelpMessage = "Do not confirm")] + public SwitchParameter Force { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + ConfirmAction( + Force.IsPresent, + string.Format(Resources.RemoveAzureDedicatedCircuitLinkAuthorizationWarning, ServiceKey, AuthorizationId), + Resources.RemoveAzureDedicatedCircuitLinkAuthorizationMessage, + ServiceKey + " " + AuthorizationId, + () => + { + if (!ExpressRouteClient.RemoveAzureDedicatedCircuitLinkAuthorization(ServiceKey, AuthorizationId)) + { + throw new Exception(Resources.RemoveAzureDedicatedCircuitLinkAuthorizationFailed); + } + + WriteVerboseWithTimestamp(Resources.RemoveAzureDedicatedCircuitLinkAuthorizationSucceeded, ServiceKey, AuthorizationId); + if (PassThru.IsPresent) + { + WriteObject(true); + } + }); + } + } +} diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitLinkAuthorizations/SetAzureDedicatedCircuitLinkAuthorization.cs b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitLinkAuthorizations/SetAzureDedicatedCircuitLinkAuthorization.cs new file mode 100644 index 000000000000..5f328865ef74 --- /dev/null +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitLinkAuthorizations/SetAzureDedicatedCircuitLinkAuthorization.cs @@ -0,0 +1,61 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.ExpressRoute +{ + using System.Management.Automation; + + [Cmdlet(VerbsCommon.Set, "AzureDedicatedCircuitLinkAuthorization"), OutputType(typeof(bool))] + public class SetAzureDedicatedCircuitLinkAuthorizationAuthorizationCommand : ExpressRouteBaseCmdlet + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "Service Key for the Azure Circuit")] + [ValidateGuid] + [ValidateNotNullOrEmpty] + public string ServiceKey { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "Authorization Id")] + [ValidateGuid] + [ValidateNotNullOrEmpty] + public string AuthorizationId { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "Description")] + public string Description { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "Maximum number of links")] + public int Limit { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "Microsoft Ids")] + public string MicrosoftIds { get; set; } + + public override void ExecuteCmdlet() + { + try + { + ExpressRouteClient.GetAzureDedicatedCircuitLinkAuthorization(ServiceKey, AuthorizationId); + var updatedAuthorization = ExpressRouteClient.SetAzureDedicatedCircuitLinkAuthorization(ServiceKey, AuthorizationId, Description, Limit); + WriteObject(updatedAuthorization, false); + } + catch + { + var newAuthorization = ExpressRouteClient.NewAzureDedicatedCircuitLinkAuthorization(ServiceKey, Description, Limit, MicrosoftIds); + WriteObject(newAuthorization); + } + } + } +} diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitLinks/GetAzureDedicatedCircuitLink.cs b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitLinks/GetAzureDedicatedCircuitLink.cs new file mode 100644 index 000000000000..03e0fd0a9073 --- /dev/null +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitLinks/GetAzureDedicatedCircuitLink.cs @@ -0,0 +1,60 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Management.ExpressRoute.Models; + +namespace Microsoft.WindowsAzure.Commands.ExpressRoute +{ + [Cmdlet(VerbsCommon.Get, "AzureDedicatedCircuitLink"), OutputType(typeof(AzureDedicatedCircuitLink))] + public class GetAzureDedicatedCircuitLinkCommand : ExpressRouteBaseCmdlet + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "Service Key representing the Azure Dedicated Circuit")] + [ValidateGuid] + [ValidateNotNullOrEmpty] + public string ServiceKey { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "Vnet Name")] + [ValidateNotNullOrEmpty] + public string VNetName { get; set; } + + public override void ExecuteCmdlet() + { + if (!string.IsNullOrEmpty(VNetName)) + { + GetByVNetName(); + } + else + { + GetNoVNetName(); + } + } + + private void GetByVNetName() + { + var link = ExpressRouteClient.GetAzureDedicatedCircuitLink(ServiceKey, VNetName); + WriteObject(link); + } + + private void GetNoVNetName() + { + var links = ExpressRouteClient.ListAzureDedicatedCircuitLink(ServiceKey); + WriteObject(links, true); + } + + + } +} diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitLinks/NewAzureDedicatedCircuitLink.cs b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitLinks/NewAzureDedicatedCircuitLink.cs new file mode 100644 index 000000000000..dcc00c943938 --- /dev/null +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitLinks/NewAzureDedicatedCircuitLink.cs @@ -0,0 +1,40 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Management.ExpressRoute.Models; + +namespace Microsoft.WindowsAzure.Commands.ExpressRoute +{ + [Cmdlet(VerbsCommon.New, "AzureDedicatedCircuitLink"), OutputType(typeof(AzureDedicatedCircuitLink))] + public class NewAzureDedicatedCircuitLinkCommand : ExpressRouteBaseCmdlet + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "Service Key representing Azure Circuit")] + [ValidateGuid] + [ValidateNotNullOrEmpty] + public string ServiceKey { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Virtual Network Name")] + [ValidateNotNullOrEmpty] + public string VNetName { get; set; } + + public override void ExecuteCmdlet() + { + var mapping = ExpressRouteClient.NewAzureDedicatedCircuitLink(ServiceKey, VNetName); + WriteObject(mapping); + } + } +} + diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitLinks/RemoveAzureDedicatedCircuitLink.cs b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitLinks/RemoveAzureDedicatedCircuitLink.cs new file mode 100644 index 000000000000..2dc790d26043 --- /dev/null +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitLinks/RemoveAzureDedicatedCircuitLink.cs @@ -0,0 +1,65 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ExpressRoute.Properties; + +namespace Microsoft.WindowsAzure.Commands.ExpressRoute +{ + [Cmdlet(VerbsCommon.Remove, "AzureDedicatedCircuitLink"), OutputType(typeof(bool))] + public class RemoveAzureDedicatedCircuitLinkCommand : ExpressRouteBaseCmdlet + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "Service Key for the Azure Circuit Vnet Mapping to be removed")] + [ValidateGuid] + [ValidateNotNullOrEmpty] + public string ServiceKey { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "Virtual Network Name for the Azure Circuit Vnet Mapping to be removed")] + [ValidateNotNullOrEmpty] + public string VNetName { get; set; } + + [Parameter(HelpMessage = "Do not confirm Azure Circuit Route deletion")] + public SwitchParameter Force { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + ConfirmAction( + Force.IsPresent, + string.Format(Resources.RemoveAzureDedicatedCircuitLinkWarning, ServiceKey, VNetName), + Resources.RemoveAzureDedicatedCircuitLinkMessage, + ServiceKey+" "+VNetName, + () => + { + if (!ExpressRouteClient.RemoveAzureDedicatedCircuitLink(ServiceKey, VNetName)) + { + throw new Exception(Resources.RemoveAzureDedicatedCircuitLinkFailed); + } + else + { + WriteVerboseWithTimestamp(Resources.RemoveAzureDedicatedCircuitLinkSucceeded, ServiceKey, VNetName); + if (PassThru.IsPresent) + { + WriteObject(true); + } + } + }); + } + } +} diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitServiceProviders/GetAzureDedicatedCircuitServiceProvider.cs b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitServiceProviders/GetAzureDedicatedCircuitServiceProvider.cs new file mode 100644 index 000000000000..4815b47f3e68 --- /dev/null +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuitServiceProviders/GetAzureDedicatedCircuitServiceProvider.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Management.ExpressRoute.Models; + +namespace Microsoft.WindowsAzure.Commands.ExpressRoute +{ + [Cmdlet(VerbsCommon.Get, "AzureDedicatedCircuitServiceProvider"), OutputType(typeof(IEnumerable))] + public class GetAzureDedicatedCircuitServiceProviderCommand : ExpressRouteBaseCmdlet + { + public override void ExecuteCmdlet() + { + var providers = ExpressRouteClient.ListAzureDedicatedCircuitServiceProviders(); + WriteObject(providers, true); + } + } +} diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuits/GetAzureDedicatedCircuit.cs b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuits/GetAzureDedicatedCircuit.cs new file mode 100644 index 000000000000..10f439148792 --- /dev/null +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuits/GetAzureDedicatedCircuit.cs @@ -0,0 +1,55 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Management.ExpressRoute.Models; + +namespace Microsoft.WindowsAzure.Commands.ExpressRoute +{ + [Cmdlet(VerbsCommon.Get, "AzureDedicatedCircuit"), OutputType(typeof(AzureDedicatedCircuit), typeof (IEnumerable))] + public class GetAzureDedicatedCircuitCommand : ExpressRouteBaseCmdlet + { + [Parameter(Position = 0, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "Service Key representing the Dedicated Circuit")] + [ValidateGuid] + [ValidateNotNullOrEmpty] + public string ServiceKey { get; set; } + + public override void ExecuteCmdlet() + { + if (!string.IsNullOrEmpty(ServiceKey)) + { + GetByServiceKey(); + } + else + { + GetNoServiceKey(); + } + } + + private void GetByServiceKey() + { + var circuit = ExpressRouteClient.GetAzureDedicatedCircuit(ServiceKey); + WriteObject(circuit); + } + + private void GetNoServiceKey() + { + var circuits = ExpressRouteClient.ListAzureDedicatedCircuit(); + WriteObject(circuits, true); + } + } +} diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuits/NewAzureDedicatedCircuit.cs b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuits/NewAzureDedicatedCircuit.cs new file mode 100644 index 000000000000..5a0637383917 --- /dev/null +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuits/NewAzureDedicatedCircuit.cs @@ -0,0 +1,60 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ExpressRoute.Properties; +using Microsoft.WindowsAzure.Management.ExpressRoute.Models; + +namespace Microsoft.WindowsAzure.Commands.ExpressRoute +{ + [Cmdlet(VerbsCommon.New, "AzureDedicatedCircuit"), OutputType(typeof(AzureDedicatedCircuit))] + public class NewAzureDedicatedCircuitCommand : ExpressRouteBaseCmdlet + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "New Azure Dedicated Circuit Name")] + [ValidateNotNullOrEmpty] + public string CircuitName { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Circuit Bandwidth")] + [ValidateNotNullOrEmpty] + public UInt32 Bandwidth { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Circuit Location")] + public string Location { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Circuit Service Provider Name")] + public string ServiceProviderName { get; set; } + + [Parameter(HelpMessage = "Do not confirm Azure Dedicated Circuit creation")] + public SwitchParameter Force { get; set; } + + public override void ExecuteCmdlet() + { + ConfirmAction( + Force.IsPresent, + string.Format(Resources.NewAzureDedicatedCircuitWarning, CircuitName, ServiceProviderName), + string.Format(Resources.NewAzureDedicatedCircuitMessage, CircuitName, ServiceProviderName), + CircuitName + " " + ServiceProviderName, + () => + { + var circuit = ExpressRouteClient.NewAzureDedicatedCircuit(CircuitName, Bandwidth, Location, + ServiceProviderName); + WriteVerboseWithTimestamp(Resources.NewAzureDedicatedCircuitSucceeded); + WriteObject(circuit); + }); + + } + } +} diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuits/RemoveAzureDedicatedCircuit.cs b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuits/RemoveAzureDedicatedCircuit.cs new file mode 100644 index 000000000000..5f82d967a6f3 --- /dev/null +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/DedicatedCircuits/RemoveAzureDedicatedCircuit.cs @@ -0,0 +1,60 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ExpressRoute.Properties; + +namespace Microsoft.WindowsAzure.Commands.ExpressRoute +{ + [Cmdlet(VerbsCommon.Remove, "AzureDedicatedCircuit"),OutputType(typeof(bool))] + public class RemoveAzureDedicatedCircuitCommand : ExpressRouteBaseCmdlet + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "Service Key of Azure Dedicated Circuit to be removed")] + [ValidateGuid] + [ValidateNotNullOrEmpty] + public string ServiceKey { get; set; } + + [Parameter(HelpMessage = "Do not confirm Azure Dedicated Circuit deletion")] + public SwitchParameter Force { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + ConfirmAction( + Force.IsPresent, + string.Format(Resources.RemoveAzureDedicatdCircuitWarning, ServiceKey), + Resources.RemoveAzureDedicatedCircuitMessage, + ServiceKey, + () => + { + if (!ExpressRouteClient.RemoveAzureDedicatedCircuit(ServiceKey)) + { + throw new Exception(Resources.RemoveAzureDedicatedCircuitFailed); + } + else + { + WriteVerboseWithTimestamp(Resources.RemoveAzureDedicatedCircuitSucceeded,ServiceKey); + if (PassThru.IsPresent) + { + WriteObject(true); + } + } + }); + } + } +} diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/ExpressRoute.psd1 b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/ExpressRoute.psd1 new file mode 100644 index 000000000000..3cb527a38bb4 --- /dev/null +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/ExpressRoute.psd1 @@ -0,0 +1,93 @@ +# +# Module manifest for module 'Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository' +# +# Generated by: Microsoft Corporation +# +# Generated on: 7/22/2013 +# + +@{ + +# Script module or binary module file associated with this manifest +ModuleToProcess = '.\Microsoft.WindowsAzure.Commands.ExpressRoute.dll' + +# Version number of this module. +ModuleVersion = '0.8.11' + +# ID used to uniquely identify this module +GUID = 'e5b10573-30da-456a-9319-4c0a5f8bed4a' + +# Author of this module +Author = 'Microsoft Corporation' + +# Company or vendor of this module +CompanyName = 'Microsoft Corporation' + +# Copyright statement for this module +Copyright = ' Microsoft Corporation. All rights reserved.' + +# Description of the functionality provided by this module +Description = '' + +# Minimum version of the Windows PowerShell engine required by this module +PowerShellVersion = '3.0' + +# Name of the Windows PowerShell host required by this module +PowerShellHostName = '' + +# Minimum version of the Windows PowerShell host required by this module +PowerShellHostVersion = '' + +# Minimum version of the .NET Framework required by this module +DotNetFrameworkVersion = '' + +# Minimum version of the common language runtime (CLR) required by this module +CLRVersion='4.0' + +# Processor architecture (None, X86, Amd64, IA64) required by this module +ProcessorArchitecture = '' + +# Modules that must be imported into the global environment prior to importing this module +RequiredModules = @() + +# Assemblies that must be loaded prior to importing this module +RequiredAssemblies = @() + +# Script files (.ps1) that are run in the caller's environment prior to importing this module +ScriptsToProcess = @() + +# Type files (.ps1xml) to be loaded when importing this module +TypesToProcess = @( +) + +# Format files (.ps1xml) to be loaded when importing this module +FormatsToProcess = @( + '.\Microsoft.WindowsAzure.Commands.ExpressRoute.format.ps1xml' +) + +# Modules to import as nested modules of the module specified in ModuleToProcess +NestedModules = '' + +# Functions to export from this module +FunctionsToExport = '*' + +# Cmdlets to export from this module +CmdletsToExport = '*' + +# Variables to export from this module +VariablesToExport = '*' + +# Aliases to export from this module +AliasesToExport = '*' + +# List of all modules packaged with this module +ModuleList = @() + +# List of all files packaged with this module +FileList = @() + +# Private data to pass to the module specified in ModuleToProcess +PrivateData = '' + +} + diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/ExpressRouteBaseCmdlet.cs b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/ExpressRouteBaseCmdlet.cs new file mode 100644 index 000000000000..362ffdf80bd5 --- /dev/null +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/ExpressRouteBaseCmdlet.cs @@ -0,0 +1,37 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.ExpressRoute +{ + public abstract class ExpressRouteBaseCmdlet : AzurePSCmdlet + { + private ExpressRouteClient expressRouteClient; + + public ExpressRouteClient ExpressRouteClient + { + get + { + if (expressRouteClient == null) + { + expressRouteClient = new ExpressRouteClient(CurrentContext.Subscription); + } + return expressRouteClient; + } + + set { expressRouteClient = value; } + } + } +} diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/ExpressRouteClient.cs b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/ExpressRouteClient.cs new file mode 100644 index 000000000000..cb14378a0e79 --- /dev/null +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/ExpressRouteClient.cs @@ -0,0 +1,230 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Common; + +namespace Microsoft.WindowsAzure.Commands.ExpressRoute +{ + using Microsoft.WindowsAzure.Management.ExpressRoute; + using Microsoft.WindowsAzure.Management.ExpressRoute.Models; + using System; + using System.Collections.Generic; + using System.Net; + using Utilities.Common; + + + public class ExpressRouteClient + { + public ExpressRouteManagementClient Client { get; internal set; } + + private static ClientType CreateClient(AzureSubscription subscription) where ClientType : ServiceClient + { + return AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement); + } + + /// + /// Creates new ExpressRouteClient + /// + /// Subscription containing websites to manipulate + public ExpressRouteClient(AzureSubscription subscription) + : this(CreateClient(subscription)) + { + } + + public ExpressRouteClient(ExpressRouteManagementClient client) + { + Client = client; + } + + public AzureBgpPeering GetAzureBGPPeering(string serviceKey, BgpPeeringAccessType accessType) + { + return Client.BorderGatewayProtocolPeerings.Get(serviceKey, accessType).BgpPeering; + } + + public AzureBgpPeering NewAzureBGPPeering(string serviceKey, UInt32 peerAsn, string primaryPeerSubnet, + string secondaryPeerSubnet, UInt32 vlanId, BgpPeeringAccessType accessType, string sharedKey = null) + { + return Client.BorderGatewayProtocolPeerings.New(serviceKey, accessType, new BorderGatewayProtocolPeeringNewParameters() + { + PeerAutonomousSystemNumber = peerAsn, + PrimaryPeerSubnet = primaryPeerSubnet, + SecondaryPeerSubnet = secondaryPeerSubnet, + SharedKey = sharedKey, + VirtualLanId = vlanId + }).BgpPeering; + } + + public bool RemoveAzureBGPPeering(string serviceKey, BgpPeeringAccessType accessType) + { + var result = Client.BorderGatewayProtocolPeerings.Remove(serviceKey, accessType); + return result.HttpStatusCode.Equals(HttpStatusCode.OK); + } + + public AzureBgpPeering UpdateAzureBGPPeering(string serviceKey, + BgpPeeringAccessType accessType, UInt32 peerAsn, string primaryPeerSubnet, + string secondaryPeerSubnet, UInt32 vlanId, string sharedKey) + { + return + (Client.BorderGatewayProtocolPeerings.Update(serviceKey, accessType, new BorderGatewayProtocolPeeringUpdateParameters() + { + PeerAutonomousSystemNumber = peerAsn, + PrimaryPeerSubnet = primaryPeerSubnet, + SecondaryPeerSubnet = secondaryPeerSubnet, + SharedKey = sharedKey, + VirtualLanId = vlanId, + })).BgpPeering; + } + + public AzureDedicatedCircuit GetAzureDedicatedCircuit(string serviceKey) + { + return (Client.DedicatedCircuits.Get(serviceKey)).DedicatedCircuit; + } + + public AzureDedicatedCircuit NewAzureDedicatedCircuit(string circuitName, + UInt32 bandwidth, string location, string serviceProviderName) + { + return (Client.DedicatedCircuits.New(new DedicatedCircuitNewParameters() + { + Bandwidth = bandwidth, + CircuitName = circuitName, + Location = location, + ServiceProviderName = serviceProviderName + })).DedicatedCircuit; + } + + public IEnumerable ListAzureDedicatedCircuit() + { + return (Client.DedicatedCircuits.List().DedicatedCircuits); + } + + public bool RemoveAzureDedicatedCircuit(string serviceKey) + { + var result = Client.DedicatedCircuits.Remove(serviceKey); + return result.HttpStatusCode.Equals(HttpStatusCode.OK); + } + + public AzureDedicatedCircuitLink GetAzureDedicatedCircuitLink(string serviceKey, string vNetName) + { + return (Client.DedicatedCircuitLinks.Get(serviceKey, vNetName)).DedicatedCircuitLink; + } + + public AzureDedicatedCircuitLink NewAzureDedicatedCircuitLink(string serviceKey, string vNetName) + { + return (Client.DedicatedCircuitLinks.New(serviceKey, vNetName)).DedicatedCircuitLink; + } + + public IEnumerable ListAzureDedicatedCircuitLink(string serviceKey) + { + return (Client.DedicatedCircuitLinks.List(serviceKey).DedicatedCircuitLinks); + } + + public bool RemoveAzureDedicatedCircuitLink(string serviceKey, string vNetName) + { + var result = Client.DedicatedCircuitLinks.Remove(serviceKey, vNetName); + return result.HttpStatusCode.Equals(HttpStatusCode.OK); + } + + public IEnumerable ListAzureDedicatedCircuitServiceProviders() + { + return (Client.DedicatedCircuitServiceProviders.List().DedicatedCircuitServiceProviders); + } + + public AzureCrossConnection GetAzureCrossConnection(string serviceKey) + { + return (Client.CrossConnections.Get(serviceKey)).CrossConnection; + } + + public AzureCrossConnection NewAzureCrossConnection(string serviceKey) + { + return (Client.CrossConnections.New(serviceKey)).CrossConnection; + } + + public AzureCrossConnection SetAzureCrossConnection(string serviceKey, + CrossConnectionUpdateParameters parameters) + { + return (Client.CrossConnections.Update(serviceKey, parameters)).CrossConnection; + } + + public IEnumerable ListAzureCrossConnections() + { + return (Client.CrossConnections.List()).CrossConnections; + } + + public AzureDedicatedCircuitLinkAuthorization GetAzureDedicatedCircuitLinkAuthorization(string serviceKey, string authorizationId) + { + return (Client.DedicatedCircuitLinkAuthorizations.Get(serviceKey, authorizationId)).DedicatedCircuitLinkAuthorization; + } + + public AzureDedicatedCircuitLinkAuthorization NewAzureDedicatedCircuitLinkAuthorization(string serviceKey, string description, int limit, string microsoftIds) + { + return (Client.DedicatedCircuitLinkAuthorizations.New(serviceKey, new DedicatedCircuitLinkAuthorizationNewParameters() + { + Description = description, + Limit = limit, + MicrosoftIds = microsoftIds + })).DedicatedCircuitLinkAuthorization; + } + + public AzureDedicatedCircuitLinkAuthorization SetAzureDedicatedCircuitLinkAuthorization(string serviceKey, string authorizationId, string description, int limit) + { + return (Client.DedicatedCircuitLinkAuthorizations.Update(serviceKey, authorizationId, new DedicatedCircuitLinkAuthorizationUpdateParameters() + { + Description = description, + Limit = limit + })).DedicatedCircuitLinkAuthorization; + } + + public IEnumerable ListAzureDedicatedCircuitLinkAuthorizations(string serviceKey) + { + return (Client.DedicatedCircuitLinkAuthorizations.List(serviceKey).DedicatedCircuitLinkAuthorizations); + } + + public bool RemoveAzureDedicatedCircuitLinkAuthorization(string serviceKey, string authorizationId) + { + var result = Client.DedicatedCircuitLinkAuthorizations.Remove(serviceKey, authorizationId); + return result.HttpStatusCode.Equals(HttpStatusCode.OK); + } + + public AzureAuthorizedDedicatedCircuit GetAuthorizedAzureDedicatedCircuit(string serviceKey) + { + return (Client.AuthorizedDedicatedCircuits.Get(serviceKey)).AuthorizedDedicatedCircuit; + } + + public IEnumerable ListAzureAuthorizedDedicatedCircuits() + { + return (Client.AuthorizedDedicatedCircuits.List().AuthorizedDedicatedCircuits); + } + + public bool NewAzureDedicatedCircuitLinkAuthorizationMicrosoftIds(string serviceKey, string authorizationId, string microsoftIds) + { + var result = Client.DedicatedCircuitLinkAuthorizationMicrosoftIds.New(serviceKey, authorizationId, new DedicatedCircuitLinkAuthorizationMicrosoftIdNewParameters() + { + MicrosoftIds = microsoftIds + }); + return result.StatusCode.Equals(HttpStatusCode.OK); + } + + public bool RemoveAzureDedicatedCircuitLinkAuthorizationMicrosoftIds(string serviceKey, string authorizationId, string microsoftIds) + { + var result = Client.DedicatedCircuitLinkAuthorizationMicrosoftIds.Remove(serviceKey, authorizationId, new DedicatedCircuitLinkAuthorizationMicrosoftIdRemoveParameters() + { + MicrosoftIds = microsoftIds + }); + return result.StatusCode.Equals(HttpStatusCode.OK); + } + } +} diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/MSSharedLibKey.snk b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/MSSharedLibKey.snk differ diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Microsoft.WindowsAzure.Commands.ExpressRoute.dll-help.psd1 b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Microsoft.WindowsAzure.Commands.ExpressRoute.dll-help.psd1 new file mode 100644 index 000000000000..8becdea8c4e2 --- /dev/null +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Microsoft.WindowsAzure.Commands.ExpressRoute.dll-help.psd1 @@ -0,0 +1,93 @@ +# +# Module manifest for module 'Microsoft.WindowsAzure.Commands.ServiceManagement.PlatformImageRepository' +# +# Generated by: Microsoft Corporation +# +# Generated on: 7/22/2013 +# + +@{ + +# Script module or binary module file associated with this manifest +ModuleToProcess = '..\..\..\Package\Debug\ServiceManagement\Azure\ExpressRoute\Microsoft.WindowsAzure.Commands.ExpressRoute.dll' + +# Version number of this module. +ModuleVersion = '0.8.8' + +# ID used to uniquely identify this module +GUID = 'e5b10573-30da-456a-9319-4c0a5f8bed4a' + +# Author of this module +Author = 'Microsoft Corporation' + +# Company or vendor of this module +CompanyName = 'Microsoft Corporation' + +# Copyright statement for this module +Copyright = ' Microsoft Corporation. All rights reserved.' + +# Description of the functionality provided by this module +Description = '' + +# Minimum version of the Windows PowerShell engine required by this module +PowerShellVersion = '3.0' + +# Name of the Windows PowerShell host required by this module +PowerShellHostName = '' + +# Minimum version of the Windows PowerShell host required by this module +PowerShellHostVersion = '' + +# Minimum version of the .NET Framework required by this module +DotNetFrameworkVersion = '' + +# Minimum version of the common language runtime (CLR) required by this module +CLRVersion='4.0' + +# Processor architecture (None, X86, Amd64, IA64) required by this module +ProcessorArchitecture = '' + +# Modules that must be imported into the global environment prior to importing this module +RequiredModules = @() + +# Assemblies that must be loaded prior to importing this module +RequiredAssemblies = @() + +# Script files (.ps1) that are run in the caller's environment prior to importing this module +ScriptsToProcess = @() + +# Type files (.ps1xml) to be loaded when importing this module +TypesToProcess = @( +) + +# Format files (.ps1xml) to be loaded when importing this module +FormatsToProcess = @( + '.\Microsoft.WindowsAzure.Commands.ExpressRoute.format.ps1xml' +) + +# Modules to import as nested modules of the module specified in ModuleToProcess +NestedModules = '' + +# Functions to export from this module +FunctionsToExport = '*' + +# Cmdlets to export from this module +CmdletsToExport = '*' + +# Variables to export from this module +VariablesToExport = '*' + +# Aliases to export from this module +AliasesToExport = '*' + +# List of all modules packaged with this module +ModuleList = @() + +# List of all files packaged with this module +FileList = @() + +# Private data to pass to the module specified in ModuleToProcess +PrivateData = '' + +} + diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Microsoft.WindowsAzure.Commands.ExpressRoute.dll-help.xml b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Microsoft.WindowsAzure.Commands.ExpressRoute.dll-help.xml new file mode 100644 index 000000000000..200adb8c92d5 --- /dev/null +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Microsoft.WindowsAzure.Commands.ExpressRoute.dll-help.xml @@ -0,0 +1,3017 @@ + + + + + Get-AzureAuthorizedDedicatedCircuit + + Returns an object with authorized circuit information for a subscriptionId + + + + + Get + AzureAuthorizedDedicatedCircuit + + + + + The customer can use their subscription Id to link against the authorized circuit using the New-AzureDedicatedCircuitLink Cmdlet. + + + + Get-AzureAuthorizedDedicatedCircuit + + ServiceKey + + Identifier of the Authorized Dedicated Circuit + + String + + + + + + ServiceKey + + Identifier of the Authorized Dedicated Circuit + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Get-AzureAuthorizedDedicatedCircuit -ServiceKey "12345678-1234-1234-abcd-1234567890ab" + + This command returns an object with information on the authorized ExpressRoute circuit with service key "12345678-1234-1234-abcd-1234567890ab". + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> C:\PS>Get-AzureAuthorizedDedicatedCircuit + + This command returns a list object with information on all the authorized ExpressRoute circuits in the current Microsoft Azure subscription. + + + + + + + + + + + + + + + Get-AzureBGPPeering + + Returns an object with bgp configuration information of an ExpressRouteCircuit + + + + + Get + AzureBGPPeering + + + + + The Get-AzureBGPPeering cmdlet gets the routing configuration for an ExpressRoute circuit. It returns an object with information on a specific ExpressRoute circuit for which a service key is provided. This cmdlet works only for circuits established with an internet exchange point service provider. This cmdlet does not work for circuits established through carriers. + + + + Get-AzureBGPPeering + + ServiceKey + + Specifies the service key of the ExpressRoute circuit for which to retrieve circuit routing information. + + String + + + AccessType + + Access type can be either Public or Private. Private (the default value) sets up a BGP session to be used with virtual networks. Public sets up a BGP session to be used to access public IP addresses in the service, including VIPs. + + BgpPeeringAccessType + + + + + + ServiceKey + + Specifies the service key of the ExpressRoute circuit for which to retrieve circuit routing information. + + String + + String + + + + + + AccessType + + Access type can be either Public or Private. Private (the default value) sets up a BGP session to be used with virtual networks. Public sets up a BGP session to be used to access public IP addresses in the service, including VIPs. + + BgpPeeringAccessType + + BgpPeeringAccessType + + + + + + + + + + + + + + + + + + + + + ManagementOperationContext + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Get-AzureBGPPeering -ServiceKey "12345678-1234-1234-abcd-1234567890ab" + + This command returns an object with information on the routing configuration for the ExpressRoute circuit with service key "12345678-1234-1234-abcd-1234567890ab". + + + + + + + + + + + Get-AzureDedicatedCircuit + + + + Get-AzureDedicatedCircuitLink + + + + Get-AzureDedicatedCircuitServiceProvider + + + + New-AzureBGPPeering + + + + New-AzureDedicatedCircuit + + + + New-AzureDedicatedCircuitLink + + + + Remove-AzureBGPPeering + + + + Remove-AzureDedicatedCircuit + + + + Remove-AzureDedicatedCircuitLink + + + + Set-AzureBGPPeering + + + + + + + + Get-AzureDedicatedCircuit + + Lists all ExpressRoute circuits and details of each circuit. + + + + + Get + AzureDedicatedCircuit + + + + + The Get-AzureDedicatedCircuit cmdlet retrieves information about all ExpressRoute circuits created in the current subscription in Microsoft Azure. It returns an object with information on a specific ExpressRoute circuit if a service key is provided, or if no service key is specified, for all the ExpressRoute circuits in the current subscription. + + + + Get-AzureDedicatedCircuit + + ServiceKey + + Specifies the service key of the ExpressRoute circuit for which to retrieve information. If this parameter is not provided, the cmdlet returns a list object with information about all the ExpressRoute circuits in the current Microsoft Azure subscription. + + String + + + + + + ServiceKey + + Specifies the service key of the ExpressRoute circuit for which to retrieve information. If this parameter is not provided, the cmdlet returns a list object with information about all the ExpressRoute circuits in the current Microsoft Azure subscription. + + String + + String + + + + + + + + + + + + + + + + + + + + + ManagementOperationContext + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Get-AzureDedicatedCircuit -ServiceKey "12345678-1234-1234-abcd-1234567890ab" + + This command returns an object with information on the ExpressRoute circuit with service key "12345678-1234-1234-abcd-1234567890ab". + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> C:\PS>Get-AzureDedicatedCircuit + + This command returns a list object with information on all the ExpressRoute circuits in the current Microsoft Azure subscription. + + + + + + + + + + + Get-AzureBGPPeering + + + + Get-AzureDedicatedCircuitLink + + + + Get-AzureDedicatedCircuitServiceProvider + + + + New-AzureBGPPeering + + + + New-AzureDedicatedCircuit + + + + New-AzureDedicatedCircuitLink + + + + Remove-AzureBGPPeering + + + + Remove-AzureDedicatedCircuit + + + + Remove-AzureDedicatedCircuitLink + + + + Set-AzureBGPPeering + + + + + + + + Get-AzureDedicatedCircuitLink + + Lists the link state of a particular virtual network and an ExpressRoute circuit. If a virtual network name is not specified, it lists all virtual networks linked to a particular ExpressRoute circuit. + + + + + Get + AzureDedicatedCircuitLink + + + + + The Get-AzureDedicatedCircuitLink cmdlet retrieves information about all Virtual networks linked to a particular ExpressRoute circuit. It returns an object with the link state of a specific virtual network and an ExpressRoute circuit if a virtual network name is provided, or if a virtual network name is not specified, it lists all virtual networks linked to the particular ExpressRoute circuit identified by the specified Service key. + + + + Get-AzureDedicatedCircuitLink + + ServiceKey + + Specifies the service key of the ExpressRoute circuit for which to retrieve link information. This is a required parameter. + + String + + + VNetName + + Specifies the virtual network name for which link state needs to be verified. + + String + + + + + + ServiceKey + + Specifies the service key of the ExpressRoute circuit for which to retrieve link information. This is a required parameter. + + String + + String + + + + + + VNetName + + Specifies the virtual network name for which link state needs to be verified. + + String + + String + + + + + + + + + + + + + + + + + + + + + ManagementOperationContext + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Get-AzureDedicatedCircuitLink -ServiceKey "12345678-1234-1234-abcd-1234567890ab" -VNetName "MyVNet" + + This command returns the link state of the ExpressRoute circuit with service key "12345678-1234-1234-abcd-1234567890ab" and the virtual network "MyVNet". + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> C:\PS>Get-AzureDedicatedCircuit -ServiceKey "12345678-1234-1234-abcd-1234567890ab" + + This command returns a list of all virtual networks linked to the circuit with service key "12345678-1234-1234-abcd-1234567890ab". + + + + + + + + + + + Get-AzureBGPPeering + + + + Get-AzureDedicatedCircuit + + + + Get-AzureDedicatedCircuitServiceProvider + + + + New-AzureBGPPeering + + + + New-AzureDedicatedCircuit + + + + New-AzureDedicatedCircuitLink + + + + Remove-AzureBGPPeering + + + + Remove-AzureDedicatedCircuit + + + + Remove-AzureDedicatedCircuitLink + + + + Set-AzureBGPPeering + + + + + + + + Get-AzureDedicatedCircuitLinkAuthorization + + Gets details of an existing authorization + + + + + Get + AzureDedicatedCircuitLinkAuthorization + + + + + Returns an object containing the link authorization details. + + + + Get-AzureDedicatedCircuitLinkAuthorization + + ServiceKey + + Identifier of the dedicated circuit + + String + + + AuthorizationId + + A value that uniquely identifies the link authorization + + String + + + + + + ServiceKey + + Identifier of the dedicated circuit + + String + + String + + + + + + AuthorizationId + + A value that uniquely identifies the link authorization + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> Get-AzureDedicatedCircuitLinkAuthorization -ServiceKey "12345678-1234-1234-abcd-1234567890ab" -AuthorizationId "12345678-1234-1234-abcd-1234567890ab" + + Returns the details of the service key and the authorization Id provided to the Cmdlet. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> Get-AzureDedicatedCircuitLinkAuthorization -ServiceKey "12345678-1234-1234-abcd-1234567890ab" + + Lists all authorizations associated with the service key. + + + + + + + + + + + + + + + Get-AzureDedicatedCircuitServiceProvider + + Lists all ExpressRoute service providers including carriers and internet exchange points offering connectivity across all regions in Microsoft Azure. + + + + + Get + AzureDedicatedCircuitServiceProvider + + + + + The Get-AzureDedicatedCircuitServiceProvider cmdlet retrieves information about all ExpressRoute connectivity providers across all regions in Microsoft Azure. It returns a list with information on each service provider including the service provider name, type, supported locations, and supported bandwidth options for creating ExpressRoute circuits. + + + + Get-AzureDedicatedCircuitServiceProvider + + + + + + + + + + + + + + + + + + + ManagementOperationContext + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Get-AzureDedicatedCircuitServiceProvider + + This command returns a list with information on all the ExpressRoute service providers. + + + + + + + + + + + Get-AzureBGPPeering + + + + Get-AzureDedicatedCircuit + + + + Get-AzureDedicatedCircuitLink + + + + New-AzureBGPPeering + + + + New-AzureDedicatedCircuit + + + + New-AzureDedicatedCircuitLink + + + + Remove-AzureBGPPeering + + + + Remove-AzureDedicatedCircuit + + + + Remove-AzureDedicatedCircuitLink + + + + Set-AzureBGPPeering + + + + + + + + New-AzureBGPPeering + + Creates a new BGP peering configuration for an ExpressRoute circuit. + + + + + New + AzureBGPPeering + + + + + The New-AzureBGPPeering cmdlet creates a new routing configuration for an ExpressRoute circuit. This cmdlet works only for circuits established with an internet exchange point service provider. This cmdlet does not work for circuits established through carriers. + + + + New-AzureBGPPeering + + ServiceKey + + Specifies the service key of the ExpressRoute circuit for which to create a BGP session. + + String + + + PeerAsn + + Specifies the customer's AS number for the BGP session. Customers can use either a public AS number they own or choose a private AS number. Customers must not use AS number 65515 if they are using private AS numbers. + + UInt32 + + + PrimaryPeerSubnet + + Specifies one of the peering subnets in CIDR notation from which I addresses will be selected for establishing a BGP session. If the subnet 10.0.0.0/30 is specified, the customer uses 10.0.0.1 for their VRF and Azure will select 10.0.0.2 for it's VRF to establish a BGP session. This subnet must not overlap with any of the virtual networks' address ranges used in Microsoft Azure. + + String + + + SecondaryPeerSubnet + + Specifies the second peering subnets in CIDR notation from which I addresses will be selected for establishing a BGP session. If the subnet 10.0.0.4/30 is specified, the customer uses 10.0.0.5 for their VRF and Azure will select 10.0.0.6 for it's VRF to establish a BGP session. This subnet must not overlap with any of the virtual networks' address ranges used in Microsoft Azure. + + String + + + SharedKey + + Specifies the MD5 hash to be used for the BGP session. The hash bust be a 16-byte hash value represented as a 32 digit hexadecimal number. + + String + + + VlanId + + Specifies the VLAN ID over which a BGP session will be established for the ExpressRoute circuit. + + UInt32 + + + AccessType + + Access type can be either Public or Private. Private (the default value) sets up a BGP session to be used with virtual networks. Public sets up a BGP session to be used to access public IP addresses in the service, including VIPs. + + BgpPeeringAccessType + + + + + + ServiceKey + + Specifies the service key of the ExpressRoute circuit for which to create a BGP session. + + String + + String + + + + + + PeerAsn + + Specifies the customer's AS number for the BGP session. Customers can use either a public AS number they own or choose a private AS number. Customers must not use AS number 65515 if they are using private AS numbers. + + UInt32 + + UInt32 + + + + + + PrimaryPeerSubnet + + Specifies one of the peering subnets in CIDR notation from which I addresses will be selected for establishing a BGP session. If the subnet 10.0.0.0/30 is specified, the customer uses 10.0.0.1 for their VRF and Azure will select 10.0.0.2 for it's VRF to establish a BGP session. This subnet must not overlap with any of the virtual networks' address ranges used in Microsoft Azure. + + String + + String + + + + + + SecondaryPeerSubnet + + Specifies the second peering subnets in CIDR notation from which I addresses will be selected for establishing a BGP session. If the subnet 10.0.0.4/30 is specified, the customer uses 10.0.0.5 for their VRF and Azure will select 10.0.0.6 for it's VRF to establish a BGP session. This subnet must not overlap with any of the virtual networks' address ranges used in Microsoft Azure. + + String + + String + + + + + + SharedKey + + Specifies the MD5 hash to be used for the BGP session. The hash bust be a 16-byte hash value represented as a 32 digit hexadecimal number. + + String + + String + + + + + + VlanId + + Specifies the VLAN ID over which a BGP session will be established for the ExpressRoute circuit. + + UInt32 + + UInt32 + + + + + + AccessType + + Access type can be either Public or Private. Private (the default value) sets up a BGP session to be used with virtual networks. Public sets up a BGP session to be used to access public IP addresses in the service, including VIPs. + + BgpPeeringAccessType + + BgpPeeringAccessType + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>New-AzureBGPPeering -ServiceKey "12345678-1234-1234-abcd-1234567890ab" -VlanId 100 -PeerAsn 65014 -PrimaryPeerSubnet "10.0.0.0/30" -SecondaryPeerSubnet "10.0.0.4/30" + + Creates a new BGP session for an ExpressRoute circuit with service key "12345678-1234-1234-abcd-1234567890ab". The BGP session with AS number 65014 is established on VLAN ID 100. + + + + + + + + + + + Get-AzureBGPPeering + + + + Get-AzureDedicatedCircuit + + + + Get-AzureDedicatedCircuitLink + + + + Get-AzureDedicatedCircuitServiceProvider + + + + New-AzureBGPPeering + + + + New-AzureDedicatedCircuit + + + + New-AzureDedicatedCircuitLink + + + + Remove-AzureBGPPeering + + + + Remove-AzureDedicatedCircuit + + + + Remove-AzureDedicatedCircuitLink + + + + Set-AzureBGPPeering + + + + + + + + New-AzureDedicatedCircuit + + Creates a new ExpressRoute circuit in a Microsoft Azure subscription. + + + + + New + AzureDedicatedCircuit + + + + + The New-AzureDedicatedCircuit cmdlet creates a new ExpressRoute circuit in the current Microsoft Azure subscription. + + + + New-AzureDedicatedCircuit + + CircuitName + + Specifies a name for the ExpressRoute circuit to be created. The storage account name must be unique within the current Microsoft Azure subscription and must be between 3 and 24 characters in length. + + String + + + Bandwidth + + Specifies the required aggregate bandwidth for the ExpressRouteCircuit between the customer's premises and Microsoft Azure through the selected service provider at the specified peering location. Bandwidth is specified in Mbps. + + UInt32 + + + Location + + Specifies the peering location for the particular service provider through which connectiovity will be enabled. The name of the location must match with one of the locations for the selected service provider as returned by the Get-AzureDedicatedCircuitServiceProvider cmdlet. + + String + + + ServiceProviderName + + Specifies the ExpressRoute connectivity service provider through which the circuit will be enabled. The name of the service provider must match with the name of one of the service providers listed by the Get-AzureDedicatedCircuitServiceProvider cmdlet. + + String + + + Force + + + + SwitchParameter + + + + + + CircuitName + + Specifies a name for the ExpressRoute circuit to be created. The storage account name must be unique within the current Microsoft Azure subscription and must be between 3 and 24 characters in length. + + String + + String + + + + + + Bandwidth + + Specifies the required aggregate bandwidth for the ExpressRouteCircuit between the customer's premises and Microsoft Azure through the selected service provider at the specified peering location. Bandwidth is specified in Mbps. + + UInt32 + + UInt32 + + + + + + Location + + Specifies the peering location for the particular service provider through which connectiovity will be enabled. The name of the location must match with one of the locations for the selected service provider as returned by the Get-AzureDedicatedCircuitServiceProvider cmdlet. + + String + + String + + + + + + ServiceProviderName + + Specifies the ExpressRoute connectivity service provider through which the circuit will be enabled. The name of the service provider must match with the name of one of the service providers listed by the Get-AzureDedicatedCircuitServiceProvider cmdlet. + + String + + String + + + + + + Force + + + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>New-AzureDedicatedCircuit -CircuitName "MyCircuit" -ServiceProviderName "Equinix" -Location "West US" -Bandwidth 1024 + + Creates a new ExpressRoute circuit named "MyCircuit" with Equinix as the service provider, peering in West US with an aggregate bandwidth of 1024 Mbps. + + + + + + + + + + + Get-AzureBGPPeering + + + + Get-AzureDedicatedCircuit + + + + Get-AzureDedicatedCircuitLink + + + + Get-AzureDedicatedCircuitServiceProvider + + + + New-AzureBGPPeering + + + + New-AzureDedicatedCircuitLink + + + + Remove-AzureBGPPeering + + + + Remove-AzureDedicatedCircuit + + + + Remove-AzureDedicatedCircuitLink + + + + Set-AzureBGPPeering + + + + + + + + New-AzureDedicatedCircuitLink + + Creates a link between an ExpressRoute circuit and a virtual network in the current Microsoft Azure subscription. + + + + + New + AzureDedicatedCircuitLink + + + + + The New-AzureDedicatedCircuitLink cmdlet creates a link between an ExpressRoute circuit and a virtual network in the current Microsoft Azure subscription. + + + + New-AzureDedicatedCircuitLink + + ServiceKey + + Specifies the service key of the ExpressRoute circuit to which a virtual network must be linked to. + + String + + + VNetName + + Specifies the service key of the ExpressRoute circuit to which a virtual network must be linked to. + + String + + + + + + ServiceKey + + Specifies the service key of the ExpressRoute circuit to which a virtual network must be linked to. + + String + + String + + + + + + VNetName + + Specifies the service key of the ExpressRoute circuit to which a virtual network must be linked to. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>New-AzureDedicatedCircuitLink -ServiceKey "12345678-1234-1234-abcd-1234567890ab" -VNetName "MyvNet" + + Links the virtual network "MyvNet" with the ExpressRoute circuit with service key "12345678-1234-1234-abcd-1234567890ab" + + + + + + + + + + + Get-AzureBGPPeering + + + + Get-AzureDedicatedCircuit + + + + Get-AzureDedicatedCircuitLink + + + + Get-AzureDedicatedCircuitServiceProvider + + + + New-AzureBGPPeering + + + + New-AzureDedicatedCircuit + + + + Remove-AzureBGPPeering + + + + Remove-AzureDedicatedCircuit + + + + Remove-AzureDedicatedCircuitLink + + + + Set-AzureBGPPeering + + + + + + + + New-AzureDedicatedCircuitLinkAuthorization + + Creates an authorization to allow links to be created on a dedicated circuit not owned by the caller. + + + + + New + AzureDedicatedCircuitLinkAuthorization + + + + + The owner of a dedicated circuit can call this Cmdlet to authorize the use of their circuit to other users. + + + + New-AzureDedicatedCircuitLinkAuthorization + + ServiceKey + + Identifier of the dedicated circuit + + String + + + Description + + Description of the link authorization + + String + + + Limit + + Maximum number of links authorized from this link authorization + + Int32 + + + MicrosoftIds + + Comma separated list of Microsoft ids to be authorized + + String + + + + + + ServiceKey + + Identifier of the dedicated circuit + + String + + String + + + + + + Description + + Description of the link authorization + + String + + String + + + + + + Limit + + Maximum number of links authorized from this link authorization + + Int32 + + Int32 + + + + + + MicrosoftIds + + Comma separated list of Microsoft ids to be authorized + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> New-AzureDedicatedCircuitLinkAuthorization -ServiceKey "12345678-1234-1234-abcd-1234567890ab" -Description "Customer1" -MicrosoftIds "id@company.com" + + Authorizes a user with Microsoft Id 'id@company.com' to create a Dedicated Circuit Link using the service key specified. + + + + + + + + + + + + + + + New-AzureDedicatedCircuitLinkAuthorizationMicrosoftIds + + Adds Microsoft Ids to an existing link authorization. + + + + + New + AzureDedicatedCircuitLinkAuthorizationMicrosoftIds + + + + + This Cmdlet is used to add more authorized users to an existing authorization. + + + + New-AzureDedicatedCircuitLinkAuthorizationMicrosoftIds + + ServiceKey + + Identifier of the dedicated circuit + + String + + + AuthorizationId + + A value that uniquely identifies the link authorization + + String + + + MicrosoftIds + + A comma separated list of Microsoft Ids to be authorized + + String + + + + + + ServiceKey + + Identifier of the dedicated circuit + + String + + String + + + + + + AuthorizationId + + A value that uniquely identifies the link authorization + + String + + String + + + + + + MicrosoftIds + + A comma separated list of Microsoft Ids to be authorized + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> New-AzureDedicatedCircuitLinkAuthorizationMicrosoftIds -ServiceKey "12345678-1234-1234-abcd-1234567890ab" -AuthorizationId "12345678-1234-1234-abcd-1234567890ab" -MicrosoftIds "id@company.com" + + Allows the user with MicrosoftId 'id@company.com' to create a link with the specified dedicated circuit. + + + + + + + + + + + + + + + Remove-AzureBGPPeering + + Removes the routing configuration for an ExpressRoute circuit. + + + + + Remove + AzureBGPPeering + + + + + The Remove-AzureBGPPeering cmdlet deletes the routing configuration of an ExpressRoute circuit. This cmdlet works only for circuits provisioned through an Internet Exchange Point service provider. This cmdlet does not work for ExpressRoute circuits established through a carrier. + + + + Remove-AzureBGPPeering + + ServiceKey + + Specifies the service key of the ExpressRoute circuit for which the routing configuration needs to be deleted. + + String + + + AccessType + + Access type can be either Public or Private. Private (the default value) sets up a BGP session to be used with virtual networks. Public sets up a BGP session to be used to access public IP addresses in the service, including VIPs. + + BgpPeeringAccessType + + + Force + + Forces the action without prompting the user for input. + + SwitchParameter + + + PassThru + + If -PassThru is specified, then a result is returned as True or False, depending on whether the command succeeded or not. + + SwitchParameter + + + + + + ServiceKey + + Specifies the service key of the ExpressRoute circuit for which the routing configuration needs to be deleted. + + String + + String + + + + + + AccessType + + Access type can be either Public or Private. Private (the default value) sets up a BGP session to be used with virtual networks. Public sets up a BGP session to be used to access public IP addresses in the service, including VIPs. + + BgpPeeringAccessType + + BgpPeeringAccessType + + + + + + Force + + Forces the action without prompting the user for input. + + SwitchParameter + + SwitchParameter + + + + + + PassThru + + If -PassThru is specified, then a result is returned as True or False, depending on whether the command succeeded or not. + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Remove-AzureBGPPeering -ServiceKey "12345678-1234-1234-abcd-1234567890ab" + + This command removes the routing configuration for the ExpressRoute circuit with service key "12345678-1234-1234-abcd-1234567890ab". + + + + + + + + + + + Get-AzureBGPPeering + + + + Get-AzureDedicatedCircuit + + + + Get-AzureDedicatedCircuitLink + + + + Get-AzureDedicatedCircuitServiceProvider + + + + New-AzureBGPPeering + + + + New-AzureDedicatedCircuit + + + + New-AzureDedicatedCircuitLink + + + + Remove-AzureBGPPeering + + + + Remove-AzureDedicatedCircuitLink + + + + Set-AzureBGPPeering + + + + + + + + Remove-AzureDedicatedCircuit + + Removes an ExpressRoute circuit. + + + + + Remove + AzureDedicatedCircuit + + + + + The Remove-AzureDedicatedCircuit cmdlet deletes an ExpressRoute circuit. This process does not guarantee that the circuit has been completely removed. The customer must make sure that the service provider has de-provisioned the circuit on their end in order to cleanly remove the circuit. The customer will be billed for the circuit till all resources are cleared on both the Microsoft Azure side and the service provider side. + + + + Remove-AzureDedicatedCircuit + + ServiceKey + + Specifies the service key of the ExpressRoute circuit to be deleted. + + String + + + Force + + Forces the action without prompting the user for input. + + SwitchParameter + + + PassThru + + If -PassThru is specified, then a result is returned as True or False, depending on whether the command succeeded or not. + + SwitchParameter + + + + + + ServiceKey + + Specifies the service key of the ExpressRoute circuit to be deleted. + + String + + String + + + + + + Force + + Forces the action without prompting the user for input. + + SwitchParameter + + SwitchParameter + + + + + + PassThru + + If -PassThru is specified, then a result is returned as True or False, depending on whether the command succeeded or not. + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Remove-AzureDedicatedCircuit -ServiceKey "12345678-1234-1234-abcd-1234567890ab" + + This command removes the ExpressRoute circuit with service key "12345678-1234-1234-abcd-1234567890ab". + + + + + + + + + + + Get-AzureBGPPeering + + + + Get-AzureDedicatedCircuit + + + + Get-AzureDedicatedCircuitLink + + + + Get-AzureDedicatedCircuitServiceProvider + + + + New-AzureBGPPeering + + + + New-AzureDedicatedCircuit + + + + New-AzureDedicatedCircuitLink + + + + Remove-AzureBGPPeering + + + + Remove-AzureDedicatedCircuitLink + + + + Set-AzureBGPPeering + + + + + + + + Remove-AzureDedicatedCircuitLink + + Removes the link between a Virtual Network and an ExpressRoute circuit. + + + + + Remove + AzureDedicatedCircuitLink + + + + + The Remove-AzureDedicatedCircuit cmdlet deletes the link between an ExpressRoute circuit and a virtual network. + + + + Remove-AzureDedicatedCircuitLink + + ServiceKey + + Specifies the service key of the ExpressRoute circuit. + + String + + + VNetName + + Specifies the virtual network name to be unlinked from the ExpressRoute circuit. + + String + + + Force + + Forces the action without prompting the user for input. + + SwitchParameter + + + PassThru + + If -PassThru is specified, then a result is returned as True or False, depending on whether the command succeeded or not. + + SwitchParameter + + + + + + ServiceKey + + Specifies the service key of the ExpressRoute circuit. + + String + + String + + + + + + VNetName + + Specifies the virtual network name to be unlinked from the ExpressRoute circuit. + + String + + String + + + + + + Force + + Forces the action without prompting the user for input. + + SwitchParameter + + SwitchParameter + + + + + + PassThru + + If -PassThru is specified, then a result is returned as True or False, depending on whether the command succeeded or not. + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Remove-AzureDedicatedCircuitLink -ServiceKey "12345678-1234-1234-abcd-1234567890ab" -VNetName "MyVNet" + + This command removes the link between the virtual network "MyVNet" and the ExpressRoute circuit with service key "12345678-1234-1234-abcd-1234567890ab". + + + + + + + + + + + Get-AzureBGPPeering + + + + Get-AzureDedicatedCircuit + + + + Get-AzureDedicatedCircuitLink + + + + Get-AzureDedicatedCircuitServiceProvider + + + + New-AzureBGPPeering + + + + New-AzureDedicatedCircuit + + + + New-AzureDedicatedCircuitLink + + + + Remove-AzureBGPPeering + + + + Remove-AzureDedicatedCircuit + + + + Set-AzureBGPPeering + + + + + + + + Remove-AzureDedicatedCircuitLinkAuthorization + + Removes an existing dedicated circuit link authorization + + + + + Remove + AzureDedicatedCircuitLinkAuthorization + + + + + This Cmdlet removes a previously created dedicated circuit link authorization. The affected users' existing links will be removed and they will no longer be able to create new links with the specified dedicated circuit. + + + + Remove-AzureDedicatedCircuitLinkAuthorization + + ServiceKey + + Identifier of the dedicated circuit + + String + + + AuthorizationId + + A value that uniquely identifies the link authorization + + String + + + Force + + + + SwitchParameter + + + PassThru + + + + SwitchParameter + + + + + + ServiceKey + + Identifier of the dedicated circuit + + String + + String + + + + + + AuthorizationId + + A value that uniquely identifies the link authorization + + String + + String + + + + + + Force + + + + SwitchParameter + + SwitchParameter + + + + + + PassThru + + + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> Remove-AzureDedicatedCircuitLinkAuthorization -ServiceKey "12345678-1234-1234-abcd-1234567890ab" -AuthorizationId "12345678-1234-1234-abcd-1234567890ab" + + + + + + + + + + + + + + + + + Remove-AzureDedicatedCircuitLinkAuthorizationMicrosoftIds + + Removes the authorization for the specified Microsoft Ids + + + + + Remove + AzureDedicatedCircuitLinkAuthorizationMicrosoftIds + + + + + This Cmdlet removes the authorization for the specified Microsoft Ids to create dedicated circuit links on the specified circuit. Any existing links for the specified user will also be removed. + + + + Remove-AzureDedicatedCircuitLinkAuthorizationMicrosoftIds + + ServiceKey + + Identifier of the dedicated circuit + + String + + + AuthorizationId + + A value that uniquely identifies the link authorization + + String + + + MicrosoftIds + + Comma separated list of Microsoft ids + + String + + + + + + ServiceKey + + Identifier of the dedicated circuit + + String + + String + + + + + + AuthorizationId + + A value that uniquely identifies the link authorization + + String + + String + + + + + + MicrosoftIds + + Comma separated list of Microsoft ids + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> Remove-AzureDedicatedCircuitLinkAuthorizationMicrosoftIds -ServiceKey "12345678-1234-1234-abcd-1234567890ab" -AuthorizationId "12345678-1234-1234-abcd-1234567890ab" -MicrosoftIds "id@company.com" + + Removes the authorization for the specified Microsoft Id to create a link with the specified circuit. + + + + + + + + + + + + + + + Set-AzureBGPPeering + + Updates a BGP peering configuration for an ExpressRoute circuit. + + + + + Set + AzureBGPPeering + + + + + The Set-AzureBGPPeering cmdlet updates the routing configuration for an ExpressRoute circuit. This cmdlet works only for circuits established with an internet exchange point service provider. This cmdlet does not work for circuits established through carriers. + + + + Set-AzureBGPPeering + + ServiceKey + + Specifies the service key of the ExpressRoute circuit for which to create a BGP session. + + String + + + PeerAsn + + Specifies the customer's AS number for the BGP session. Customers can use either a public AS number they own or choose a private AS number. Customers must not use AS number 65515 if they are using private AS numbers. + + Nullable`1[UInt32] + + + PrimaryPeerSubnet + + Specifies one of the peering subnets in CIDR notation from which I addresses will be selected for establishing a BGP session. If the subnet 10.0.0.0/30 is specified, the customer uses 10.0.0.1 for their VRF and Azure will select 10.0.0.2 for it's VRF to establish a BGP session. This subnet must not overlap with any of the virtual networks' address ranges used in Microsoft Azure. + + String + + + SecondaryPeerSubnet + + Specifies the second peering subnets in CIDR notation from which I addresses will be selected for establishing a BGP session. If the subnet 10.0.0.4/30 is specified, the customer uses 10.0.0.5 for their VRF and Azure will select 10.0.0.6 for it's VRF to establish a BGP session. This subnet must not overlap with any of the virtual networks' address ranges used in Microsoft Azure. + + String + + + SharedKey + + Specifies the MD5 hash to be used for the BGP session. The hash bust be a 16-byte hash value represented as a 32 digit hexadecimal number. + + String + + + VlanId + + Specifies the VLAN ID over which a BGP session will be established for the ExpressRoute circuit. + + Nullable`1[UInt32] + + + AccessType + + Access type can be either Public or Private. Private (the default value) sets up a BGP session to be used with virtual networks. Public sets up a BGP session to be used to access public IP addresses in the service, including VIPs. + + BgpPeeringAccessType + + + + + + ServiceKey + + Specifies the service key of the ExpressRoute circuit for which to create a BGP session. + + String + + String + + + + + + PeerAsn + + Specifies the customer's AS number for the BGP session. Customers can use either a public AS number they own or choose a private AS number. Customers must not use AS number 65515 if they are using private AS numbers. + + Nullable`1[UInt32] + + Nullable`1[UInt32] + + + + + + PrimaryPeerSubnet + + Specifies one of the peering subnets in CIDR notation from which I addresses will be selected for establishing a BGP session. If the subnet 10.0.0.0/30 is specified, the customer uses 10.0.0.1 for their VRF and Azure will select 10.0.0.2 for it's VRF to establish a BGP session. This subnet must not overlap with any of the virtual networks' address ranges used in Microsoft Azure. + + String + + String + + + + + + SecondaryPeerSubnet + + Specifies the second peering subnets in CIDR notation from which I addresses will be selected for establishing a BGP session. If the subnet 10.0.0.4/30 is specified, the customer uses 10.0.0.5 for their VRF and Azure will select 10.0.0.6 for it's VRF to establish a BGP session. This subnet must not overlap with any of the virtual networks' address ranges used in Microsoft Azure. + + String + + String + + + + + + SharedKey + + Specifies the MD5 hash to be used for the BGP session. The hash bust be a 16-byte hash value represented as a 32 digit hexadecimal number. + + String + + String + + + + + + VlanId + + Specifies the VLAN ID over which a BGP session will be established for the ExpressRoute circuit. + + Nullable`1[UInt32] + + Nullable`1[UInt32] + + + + + + AccessType + + Access type can be either Public or Private. Private (the default value) sets up a BGP session to be used with virtual networks. Public sets up a BGP session to be used to access public IP addresses in the service, including VIPs. + + BgpPeeringAccessType + + BgpPeeringAccessType + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> C:\PS>Set-AzureBGPPeering -ServiceKey "12345678-1234-1234-abcd-1234567890ab" -VlanId 100 -PeerAsn 65014 -PrimaryPeerSubnet "10.0.0.0/30" -SecondaryPeerSubnet "10.0.0.4/30" + + Updates the BGP session for an ExpressRoute circuit with service key "12345678-1234-1234-abcd-1234567890ab". The BGP session with AS number 65014 is established on VLAN ID 100. + + + + + + + + + + + Get-AzureBGPPeering + + + + Get-AzureDedicatedCircuit + + + + Get-AzureDedicatedCircuitLink + + + + Get-AzureDedicatedCircuitServiceProvider + + + + New-AzureBGPPeering + + + + New-AzureDedicatedCircuit + + + + New-AzureDedicatedCircuitLink + + + + Remove-AzureBGPPeering + + + + Remove-AzureDedicatedCircuit + + + + Remove-AzureDedicatedCircuitLink + + + + Set-AzureBGPPeering + + + + + + + + Set-AzureDedicatedCircuitLinkAuthorization + + Updates or creates a dedicated circuit link authorization + + + + + Set + AzureDedicatedCircuitLinkAuthorization + + + + + This Cmdlet updates or creates a dedicated circuit link authorization. The authorized users will be allowed to create links using the New-AzureDedicatedCircuitLink Cmdlet on the specified dedicated circuit. + + + + Set-AzureDedicatedCircuitLinkAuthorization + + ServiceKey + + Identifier of the dedicated circuit + + String + + + AuthorizationId + + A value that uniquely identifies the link authorization + + String + + + Description + + Description of the link authorization + + String + + + Limit + + Maximum number of links authorized from this link authorization + + Int32 + + + MicrosoftIds + + Comma separated list of Microsoft ids that need to be authorized + + String + + + + + + ServiceKey + + Identifier of the dedicated circuit + + String + + String + + + + + + AuthorizationId + + A value that uniquely identifies the link authorization + + String + + String + + + + + + Description + + Description of the link authorization + + String + + String + + + + + + Limit + + Maximum number of links authorized from this link authorization + + Int32 + + Int32 + + + + + + MicrosoftIds + + Comma separated list of Microsoft ids that need to be authorized + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> Set-AzureDedicatedCircuitLinkAuthorization -ServiceKey "12345678-1234-1234-abcd-1234567890ab" -AuthorizationId "12345678-1234-1234-abcd-1234567890ab" -Limit 10 + + + Sets the maximum number of authorized links to 10. + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Microsoft.WindowsAzure.Commands.ExpressRoute.format.ps1xml b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Microsoft.WindowsAzure.Commands.ExpressRoute.format.ps1xml new file mode 100644 index 000000000000..5f46611a98a7 --- /dev/null +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Microsoft.WindowsAzure.Commands.ExpressRoute.format.ps1xml @@ -0,0 +1,50 @@ + + + + + Microsoft.WindowsAzure.Management.ExpressRoute.Models.AzureDedicatedCircuitServiceProvider + + Microsoft.WindowsAzure.Management.ExpressRoute.Models.AzureDedicatedCircuitServiceProvider + + + + + + 20 + + + + 30 + + + + + + + + + + + $_.Name + + + $_.DedicatedCircuitLocations + + + + $bandwidths = @() + foreach ($bandwidth in $_.DedicatedCircuitBandwidths) + { + $bandwidths += $bandwidth.Label.Trim() + ":"+ $bandwidth.Bandwidth + } + $string = $bandwidths -join ', ' + $string + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Model/ValidateGuid.cs b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Model/ValidateGuid.cs new file mode 100644 index 000000000000..2fbd8c2cfb70 --- /dev/null +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Model/ValidateGuid.cs @@ -0,0 +1,38 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.ExpressRoute.Properties; + +namespace Microsoft.WindowsAzure.Commands.ExpressRoute +{ + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] + public sealed class ValidateGuid : ValidateEnumeratedArgumentsAttribute + { + protected override void ValidateElement(object element) + { + string guid = (string)element; + + try + { + Guid validGuid = Guid.Parse(guid); + } + catch + { + throw new ArgumentException(String.Format(Resources.InvalidGuid, guid)); + } + } + } +} diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Properties/AssemblyInfo.cs b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..ded0ace71bfe --- /dev/null +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Properties/AssemblyInfo.cs @@ -0,0 +1,41 @@ +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft.WindowsAzure.Commands.ExpressRoute")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("e7271fa8-b104-44a9-9254-67ae26f7adb5")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] +[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] +#if SIGN +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +#else +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.Test")] +#endif +[assembly: CLSCompliant(false)] diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Properties/Resources.Designer.cs b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Properties/Resources.Designer.cs new file mode 100644 index 000000000000..e7cb0481a95b --- /dev/null +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Properties/Resources.Designer.cs @@ -0,0 +1,279 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.WindowsAzure.Commands.ExpressRoute.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.WindowsAzure.Commands.ExpressRoute.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to The value {0} is an invalid GUID.. + /// + internal static string InvalidGuid { + get { + return ResourceManager.GetString("InvalidGuid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creating Azure Dedicated Circuit with name {0} with service provider {1}. + /// + internal static string NewAzureDedicatedCircuitMessage { + get { + return ResourceManager.GetString("NewAzureDedicatedCircuitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Successfully creatied Azure Dedicated Circuit. This circuit is now being billed. + /// + internal static string NewAzureDedicatedCircuitSucceeded { + get { + return ResourceManager.GetString("NewAzureDedicatedCircuitSucceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to create a new dedicated circuit with name {0} and service provider {1}. You will be billed for this circuit once this command succeeds.. + /// + internal static string NewAzureDedicatedCircuitWarning { + get { + return ResourceManager.GetString("NewAzureDedicatedCircuitWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A value for the Peer Asn has to be provided.. + /// + internal static string PeerAsnRequired { + get { + return ResourceManager.GetString("PeerAsnRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A value for the Primary Peer Subnet has to be provided.. + /// + internal static string PrimaryPeerSubnetRequired { + get { + return ResourceManager.GetString("PrimaryPeerSubnetRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove-AzureBGPPeering Operation failed.. + /// + internal static string RemoveAzureBGPPeeringFailed { + get { + return ResourceManager.GetString("RemoveAzureBGPPeeringFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing Bgp Peering. + /// + internal static string RemoveAzureBGPPeeringMessage { + get { + return ResourceManager.GetString("RemoveAzureBGPPeeringMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Successfully removed Azure Bgp Peering with Service Key {0}.. + /// + internal static string RemoveAzureBGPPeeringSucceeded { + get { + return ResourceManager.GetString("RemoveAzureBGPPeeringSucceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Bgp Peering with service key '{0}'?. + /// + internal static string RemoveAzureBGPPeeringWarning { + get { + return ResourceManager.GetString("RemoveAzureBGPPeeringWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Dedicated Circuit with service key '{0}'?. + /// + internal static string RemoveAzureDedicatdCircuitWarning { + get { + return ResourceManager.GetString("RemoveAzureDedicatdCircuitWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove-AzureDedicatedCircuit Operation failed.. + /// + internal static string RemoveAzureDedicatedCircuitFailed { + get { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove-AzureDedicatedCircuitLinkAuthorization Operation failed.. + /// + internal static string RemoveAzureDedicatedCircuitLinkAuthorizationFailed { + get { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkAuthorizationFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing Dedicated Circuit Link Authorization. + /// + internal static string RemoveAzureDedicatedCircuitLinkAuthorizationMessage { + get { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkAuthorizationMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Successfully removed Dedicated Circuit Link Authorization with service key '{0}' and authorization Id '{1}'.. + /// + internal static string RemoveAzureDedicatedCircuitLinkAuthorizationSucceeded { + get { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkAuthorizationSucceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Dedicated Circuit Link Authorization with service key '{0}' and authorization Id '{1}'?. + /// + internal static string RemoveAzureDedicatedCircuitLinkAuthorizationWarning { + get { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkAuthorizationWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove-AzureDedicatedCircuitLink Operation failed.. + /// + internal static string RemoveAzureDedicatedCircuitLinkFailed { + get { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing Dedicated Circui Link. + /// + internal static string RemoveAzureDedicatedCircuitLinkMessage { + get { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Successfully removed Azure Dedicated Circuit Link with Service Key {0} and Vnet Name {1}. + /// + internal static string RemoveAzureDedicatedCircuitLinkSucceeded { + get { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkSucceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Dedicated Circuit Link with service key '{0}' and virtual network name '{1}'?. + /// + internal static string RemoveAzureDedicatedCircuitLinkWarning { + get { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing Dedicated Circuit. + /// + internal static string RemoveAzureDedicatedCircuitMessage { + get { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Successfully removed Azure Dedicated Circuit with Service Key {0}.. + /// + internal static string RemoveAzureDedicatedCircuitSucceeded { + get { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitSucceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A value for the Secondary Peer Subnet has to be provided.. + /// + internal static string SecondaryPeerSubnetRequired { + get { + return ResourceManager.GetString("SecondaryPeerSubnetRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A value for the VLan Id has to be provided.. + /// + internal static string VlanIdRequired { + get { + return ResourceManager.GetString("VlanIdRequired", resourceCulture); + } + } + } +} diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Properties/Resources.resx b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Properties/Resources.resx new file mode 100644 index 000000000000..6d5dce5258fa --- /dev/null +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/Properties/Resources.resx @@ -0,0 +1,192 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + The value {0} is an invalid GUID. + + + Creating Azure Dedicated Circuit with name {0} with service provider {1} + + + Successfully creatied Azure Dedicated Circuit. This circuit is now being billed + + + Are you sure you want to create a new dedicated circuit with name {0} and service provider {1}. You will be billed for this circuit once this command succeeds. + + + A value for the Peer Asn has to be provided. + + + A value for the Primary Peer Subnet has to be provided. + + + Remove-AzureBGPPeering Operation failed. + + + Removing Bgp Peering + + + Successfully removed Azure Bgp Peering with Service Key {0}. + + + Are you sure you want to remove the Bgp Peering with service key '{0}'? + + + Are you sure you want to remove the Dedicated Circuit with service key '{0}'? + + + Remove-AzureDedicatedCircuit Operation failed. + + + Remove-AzureDedicatedCircuitLinkAuthorization Operation failed. + + + Removing Dedicated Circuit Link Authorization + + + Successfully removed Dedicated Circuit Link Authorization with service key '{0}' and authorization Id '{1}'. + + + Are you sure you want to remove the Dedicated Circuit Link Authorization with service key '{0}' and authorization Id '{1}'? + + + Remove-AzureDedicatedCircuitLink Operation failed. + + + Removing Dedicated Circui Link + + + Successfully removed Azure Dedicated Circuit Link with Service Key {0} and Vnet Name {1} + + + Are you sure you want to remove the Dedicated Circuit Link with service key '{0}' and virtual network name '{1}'? + + + Removing Dedicated Circuit + + + Successfully removed Azure Dedicated Circuit with Service Key {0}. + + + A value for the Secondary Peer Subnet has to be provided. + + + A value for the VLan Id has to be provided. + + \ No newline at end of file diff --git a/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/packages.config b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/packages.config new file mode 100644 index 000000000000..48442ff69322 --- /dev/null +++ b/src/ServiceManagement/ExpressRoute/Commands.ExpressRoute/packages.config @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Commands.HDInsight.Test.csproj b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Commands.HDInsight.Test.csproj new file mode 100644 index 000000000000..1bdcdb779650 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Commands.HDInsight.Test.csproj @@ -0,0 +1,243 @@ + + + + + Debug + AnyCPU + {7E8D2555-2DDD-4757-974F-D5FFD0647671} + Library + Properties + Microsoft.WindowsAzure.Commands.HDInsight.Test + Microsoft.WindowsAzure.Commands.HDInsight.Test + v4.5 + 512 + + ..\..\..\ + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + false + + + bin\Release\ + TRACE;SIGN + true + pdbonly + AnyCPU + prompt + false + true + MSSharedLibKey.snk + true + true + false + + + + ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll + + + ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll + + + ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll + + + ..\..\..\packages\Microsoft.Hadoop.Client.1.3.3.2\lib\net40\Microsoft.Hadoop.Client.dll + + + ..\..\..\packages\Microsoft.Hadoop.Client.1.3.3.2\lib\net40\Microsoft.HDInsight.Net.Http.Formatting.dll + + + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.1.8.0.0\lib\net35-full\Microsoft.WindowsAzure.Configuration.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.Management.HDInsight.1.3.3.2\lib\net40\Microsoft.WindowsAzure.Management.HDInsight.dll + + + ..\..\..\packages\Microsoft.Hadoop.Client.1.3.3.2\lib\net40\Microsoft.WindowsAzure.Management.HDInsight.Framework.dll + + + ..\..\..\packages\Microsoft.Hadoop.Client.1.3.3.2\lib\net40\Microsoft.WindowsAzure.Management.HDInsight.Framework.Core.dll + + + ..\..\..\packages\WindowsAzure.Storage.3.0.3.0\lib\net40\Microsoft.WindowsAzure.Storage.dll + + + ..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll + + + False + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + + + + + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + + ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {3b48a77b-5956-4a62-9081-92ba04b02b27} + Commands.Common.Test + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + {137d404a-865a-43db-930c-6da67da048df} + Commands.HDInsight + + + {bc420543-c04e-4bf3-96e1-cd81b823bdd7} + Commands.Test.Utilities + + + {4900ec4e-8deb-4412-9108-0bc52f81d457} + Commands.Utilities + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/AddConfigValuesCmdletTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/AddConfigValuesCmdletTests.cs new file mode 100644 index 000000000000..736463482963 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/AddConfigValuesCmdletTests.cs @@ -0,0 +1,531 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Interfaces; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities; +using Microsoft.WindowsAzure.Management.HDInsight; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests +{ + [TestClass] + public class AddConfigValuesCmdletTests : HDInsightTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("CheckIn")] + public void CanCallTheAddConfigValuesCmdletTestsCmdlet_CoreConfig() + { + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + var coreConfig = new Hashtable(); + coreConfig.Add("hadoop.logfiles.size", "12345"); + RunConfigOptionstest(runspace, CmdletConstants.CoreConfig, coreConfig, c => c.CoreConfiguration); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + public void CanCallTheAddConfigValuesCmdletTestsCmdlet_YarnConfig() + { + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + var yarnConfig = new Hashtable(); + yarnConfig.Add("yarn.fakeconfig.value", "12345"); + RunConfigOptionstest(runspace, CmdletConstants.YarnConfig, yarnConfig, c => c.YarnConfiguration); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + public void CanCallTheAddConfigValuesCmdletTestsCmdlet_HdfsConfig() + { + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + var coreConfig = new Hashtable(); + coreConfig.Add("hadoop.logfiles.size", "12345"); + RunConfigOptionstest(runspace, CmdletConstants.HdfsConfig, coreConfig, c => c.HdfsConfiguration); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + public void CanCallTheAddConfigValuesCmdletTestsCmdlet_StormConfig() + { + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + var stormConfig = new Hashtable(); + stormConfig.Add("storm.fakeconfig.value", "12345"); + RunConfigOptionstest(runspace, CmdletConstants.StormConfig, stormConfig, c => c.StormConfiguration); + } + + } + + [TestMethod] + [TestCategory("CheckIn")] + public void CanCallTheAddConfigValuesCmdletTestsCmdlet_HiveConfig() + { + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + var hiveConfig = new Hashtable(); + hiveConfig.Add("hadoop.logfiles.size", "12345"); + + var hiveServiceConfig = new AzureHDInsightHiveConfiguration + { + Configuration = hiveConfig, + AdditionalLibraries = + new AzureHDInsightDefaultStorageAccount + { + StorageAccountKey = Guid.NewGuid().ToString(), + StorageAccountName = Guid.NewGuid().ToString(), + StorageContainerName = Guid.NewGuid().ToString() + } + }; + + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.AddAzureHDInsightConfigValues) + .WithParameter(CmdletConstants.ClusterConfig, new AzureHDInsightConfig()) + .WithParameter(CmdletConstants.HiveConfig, hiveServiceConfig) + .Invoke(); + AzureHDInsightConfig config = results.Results.ToEnumerable().First(); + ValidateConfigurationOptions(hiveConfig, config.HiveConfiguration.ConfigurationCollection); + Assert.IsNotNull(config.HiveConfiguration.AdditionalLibraries); + + Assert.AreEqual(config.HiveConfiguration.AdditionalLibraries.Container, hiveServiceConfig.AdditionalLibraries.StorageContainerName); + Assert.AreEqual(config.HiveConfiguration.AdditionalLibraries.Key, hiveServiceConfig.AdditionalLibraries.StorageAccountKey); + Assert.AreEqual(config.HiveConfiguration.AdditionalLibraries.Name, hiveServiceConfig.AdditionalLibraries.StorageAccountName); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + public void CanCallTheAddConfigValuesCmdletTestsCmdlet_HBaseConfig() + { + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + var hbaseConfig = new Hashtable(); + hbaseConfig.Add("hbase.blob.size", "12345"); + + var hbaseServiceConfig = new AzureHDInsightHBaseConfiguration + { + Configuration = hbaseConfig, + AdditionalLibraries = + new AzureHDInsightDefaultStorageAccount + { + StorageAccountKey = Guid.NewGuid().ToString(), + StorageAccountName = Guid.NewGuid().ToString(), + StorageContainerName = Guid.NewGuid().ToString() + } + }; + + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.AddAzureHDInsightConfigValues) + .WithParameter(CmdletConstants.ClusterConfig, new AzureHDInsightConfig()) + .WithParameter(CmdletConstants.HBaseConfig, hbaseServiceConfig) + .Invoke(); + AzureHDInsightConfig config = results.Results.ToEnumerable().First(); + ValidateConfigurationOptions(hbaseConfig, config.HBaseConfiguration.ConfigurationCollection); + Assert.IsNotNull(config.HBaseConfiguration.AdditionalLibraries); + + Assert.AreEqual(config.HBaseConfiguration.AdditionalLibraries.Container, hbaseServiceConfig.AdditionalLibraries.StorageContainerName); + Assert.AreEqual(config.HBaseConfiguration.AdditionalLibraries.Key, hbaseServiceConfig.AdditionalLibraries.StorageAccountKey); + Assert.AreEqual(config.HBaseConfiguration.AdditionalLibraries.Name, hbaseServiceConfig.AdditionalLibraries.StorageAccountName); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + public void CanCallTheAddConfigValuesCmdletTestsCmdlet_HiveConfig_Multiple_Invokes() + { + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + var hiveConfig = new Hashtable(); + hiveConfig.Add("hadoop.logfiles.size", "12345"); + + + var hiveServiceConfig = new AzureHDInsightHiveConfiguration + { + Configuration = hiveConfig, + AdditionalLibraries = + new AzureHDInsightDefaultStorageAccount + { + StorageAccountKey = Guid.NewGuid().ToString(), + StorageAccountName = Guid.NewGuid().ToString(), + StorageContainerName = Guid.NewGuid().ToString() + } + }; + + + var hiveConfig2 = new Hashtable(); + hiveConfig.Add("hadoop.logfiles.size2", "12345"); + + + var hiveServiceConfig2 = new AzureHDInsightHiveConfiguration + { + Configuration = hiveConfig, + AdditionalLibraries = + new AzureHDInsightDefaultStorageAccount + { + StorageAccountKey = Guid.NewGuid().ToString(), + StorageAccountName = Guid.NewGuid().ToString(), + StorageContainerName = Guid.NewGuid().ToString() + } + }; + + + var results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.AddAzureHDInsightConfigValues) + .WithParameter(CmdletConstants.ClusterConfig, new AzureHDInsightConfig()) + .WithParameter(CmdletConstants.HiveConfig, hiveServiceConfig) + .AddCommand(CmdletConstants.AddAzureHDInsightConfigValues) + .WithParameter(CmdletConstants.HiveConfig, hiveServiceConfig2) + .Invoke(); + AzureHDInsightConfig config = results.Results.ToEnumerable().First(); + + + Assert.IsNotNull(config.HiveConfiguration.AdditionalLibraries); + + + Assert.AreEqual(config.HiveConfiguration.AdditionalLibraries.Container, hiveServiceConfig2.AdditionalLibraries.StorageContainerName); + Assert.AreEqual(config.HiveConfiguration.AdditionalLibraries.Key, hiveServiceConfig2.AdditionalLibraries.StorageAccountKey); + Assert.AreEqual(config.HiveConfiguration.AdditionalLibraries.Name, hiveServiceConfig2.AdditionalLibraries.StorageAccountName); + + + ValidateConfigurationOptions(hiveConfig, config.HiveConfiguration.ConfigurationCollection); + ValidateConfigurationOptions(hiveConfig2, config.HiveConfiguration.ConfigurationCollection); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + public void CanCallTheAddConfigValuesCmdletTestsCmdlet_HBaseConfig_Multiple_Invokes() + { + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + var hbaseConfig = new Hashtable(); + hbaseConfig.Add("hbase.logfiles.size", "12345"); + + + var hbaseServiceConfig = new AzureHDInsightHBaseConfiguration + { + Configuration = hbaseConfig, + AdditionalLibraries = + new AzureHDInsightDefaultStorageAccount + { + StorageAccountKey = Guid.NewGuid().ToString(), + StorageAccountName = Guid.NewGuid().ToString(), + StorageContainerName = Guid.NewGuid().ToString() + } + }; + + + var hbaseConfig2 = new Hashtable(); + hbaseConfig2.Add("hadoop.logfiles.size2", "12345"); + + + var hbaseServiceConfig2 = new AzureHDInsightHBaseConfiguration + { + Configuration = hbaseConfig2, + AdditionalLibraries = + new AzureHDInsightDefaultStorageAccount + { + StorageAccountKey = Guid.NewGuid().ToString(), + StorageAccountName = Guid.NewGuid().ToString(), + StorageContainerName = Guid.NewGuid().ToString() + } + }; + + + var results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.AddAzureHDInsightConfigValues) + .WithParameter(CmdletConstants.ClusterConfig, new AzureHDInsightConfig()) + .WithParameter(CmdletConstants.HBaseConfig, hbaseServiceConfig) + .AddCommand(CmdletConstants.AddAzureHDInsightConfigValues) + .WithParameter(CmdletConstants.HBaseConfig, hbaseServiceConfig2) + .Invoke(); + AzureHDInsightConfig config = results.Results.ToEnumerable().First(); + + + Assert.IsNotNull(config.HBaseConfiguration.AdditionalLibraries); + + + Assert.AreEqual(config.HBaseConfiguration.AdditionalLibraries.Container, hbaseServiceConfig2.AdditionalLibraries.StorageContainerName); + Assert.AreEqual(config.HBaseConfiguration.AdditionalLibraries.Key, hbaseServiceConfig2.AdditionalLibraries.StorageAccountKey); + Assert.AreEqual(config.HBaseConfiguration.AdditionalLibraries.Name, hbaseServiceConfig2.AdditionalLibraries.StorageAccountName); + + + ValidateConfigurationOptions(hbaseConfig, config.HBaseConfiguration.ConfigurationCollection); + ValidateConfigurationOptions(hbaseConfig2, config.HBaseConfiguration.ConfigurationCollection); + } + } + + + [TestMethod] + [TestCategory("CheckIn")] + public void CanCallTheAddConfigValuesCmdletTestsCmdlet_MapReduceConfig() + { + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + var coreConfig = new Hashtable(); + coreConfig.Add("hadoop.logfiles.size", "12345"); + var mapRedConfig = new AzureHDInsightMapReduceConfiguration { Configuration = coreConfig }; + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.AddAzureHDInsightConfigValues) + .WithParameter(CmdletConstants.ClusterConfig, new AzureHDInsightConfig()) + .WithParameter(CmdletConstants.MapReduceConfig, mapRedConfig) + .Invoke(); + AzureHDInsightConfig config = results.Results.ToEnumerable().First(); + ValidateConfigurationOptions(coreConfig, config.MapReduceConfiguration.ConfigurationCollection); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + public void CanCallTheAddConfigValuesCmdletTestsCmdlet_OozieConfig() + { + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + var oozieConfig = new Hashtable(); + oozieConfig.Add("hadoop.logfiles.size", "12345"); + + var oozieServiceConfig = new AzureHDInsightOozieConfiguration + { + Configuration = oozieConfig, + AdditionalSharedLibraries = + new AzureHDInsightDefaultStorageAccount + { + StorageAccountKey = Guid.NewGuid().ToString(), + StorageAccountName = Guid.NewGuid().ToString(), + StorageContainerName = Guid.NewGuid().ToString() + }, + AdditionalActionExecutorLibraries = + new AzureHDInsightDefaultStorageAccount + { + StorageAccountKey = Guid.NewGuid().ToString(), + StorageAccountName = Guid.NewGuid().ToString(), + StorageContainerName = Guid.NewGuid().ToString() + } + }; + + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.AddAzureHDInsightConfigValues) + .WithParameter(CmdletConstants.ClusterConfig, new AzureHDInsightConfig()) + .WithParameter(CmdletConstants.OozieConfig, oozieServiceConfig) + .Invoke(); + AzureHDInsightConfig config = results.Results.ToEnumerable().First(); + ValidateConfigurationOptions(oozieConfig, config.OozieConfiguration.ConfigurationCollection); + + Assert.IsNotNull(config.OozieConfiguration.AdditionalSharedLibraries); + Assert.AreEqual( + config.OozieConfiguration.AdditionalSharedLibraries.Container, oozieServiceConfig.AdditionalSharedLibraries.StorageContainerName); + Assert.AreEqual( + config.OozieConfiguration.AdditionalSharedLibraries.Key, oozieServiceConfig.AdditionalSharedLibraries.StorageAccountKey); + Assert.AreEqual( + config.OozieConfiguration.AdditionalSharedLibraries.Name, oozieServiceConfig.AdditionalSharedLibraries.StorageAccountName); + + Assert.IsNotNull(config.OozieConfiguration.AdditionalActionExecutorLibraries); + Assert.AreEqual( + config.OozieConfiguration.AdditionalActionExecutorLibraries.Container, + oozieServiceConfig.AdditionalActionExecutorLibraries.StorageContainerName); + Assert.AreEqual( + config.OozieConfiguration.AdditionalActionExecutorLibraries.Key, + oozieServiceConfig.AdditionalActionExecutorLibraries.StorageAccountKey); + Assert.AreEqual( + config.OozieConfiguration.AdditionalActionExecutorLibraries.Name, + oozieServiceConfig.AdditionalActionExecutorLibraries.StorageAccountName); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + public void CanCallTheAddConfigValuesCmdletTestsCmdlet_PreserveConfig() + { + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + var coreConfig = new Hashtable(); + var yarnConfig = new Hashtable(); + var stormConfig = new Hashtable(); + stormConfig.Add("storm.fakekey", "123"); + var clusterConfig = new AzureHDInsightConfig + { + HiveMetastore = + new AzureHDInsightMetastore + { + MetastoreType = AzureHDInsightMetastoreType.HiveMetastore, + Credential = GetPSCredential("hadoop", Guid.NewGuid().ToString()), + DatabaseName = Guid.NewGuid().ToString(), + SqlAzureServerName = Guid.NewGuid().ToString() + }, + OozieMetastore = + new AzureHDInsightMetastore + { + MetastoreType = AzureHDInsightMetastoreType.OozieMetastore, + Credential = GetPSCredential("hadoop", Guid.NewGuid().ToString()), + DatabaseName = Guid.NewGuid().ToString(), + SqlAzureServerName = Guid.NewGuid().ToString() + } + }; + + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.AddAzureHDInsightConfigValues) + .WithParameter(CmdletConstants.ClusterConfig, clusterConfig) + .WithParameter(CmdletConstants.CoreConfig, coreConfig) + .WithParameter(CmdletConstants.YarnConfig, yarnConfig) + .WithParameter(CmdletConstants.StormConfig, stormConfig) + .Invoke(); + AzureHDInsightConfig config = results.Results.ToEnumerable().First(); + + Assert.AreEqual(config.CoreConfiguration.Count, coreConfig.Count); + Assert.AreEqual(config.YarnConfiguration.Count, yarnConfig.Count); + Assert.AreEqual(config.StormConfiguration.Count, stormConfig.Count); + + foreach (object entry in coreConfig.Keys) + { + KeyValuePair configUnderTest = + config.CoreConfiguration.FirstOrDefault(c => string.Equals(c.Key, entry.ToString(), StringComparison.Ordinal)); + Assert.IsNotNull(configUnderTest, "Unable to find core config option with name '{0}'", entry); + Assert.AreEqual(coreConfig[entry], configUnderTest.Value, "value doesn't match for core config option with name '{0}'", entry); + } + + foreach (object entry in yarnConfig.Keys) + { + KeyValuePair configUnderTest = + config.YarnConfiguration.FirstOrDefault(c => string.Equals(c.Key, entry.ToString(), StringComparison.Ordinal)); + Assert.IsNotNull(configUnderTest, "Unable to find yarn config option with name '{0}'", entry); + Assert.AreEqual(yarnConfig[entry], configUnderTest.Value, "value doesn't match for yarn config option with name '{0}'", entry); + } + + foreach (object entry in stormConfig.Keys) + { + KeyValuePair configUnderTest = + config.StormConfiguration.FirstOrDefault(c => string.Equals(c.Key, entry.ToString(), StringComparison.Ordinal)); + Assert.IsNotNull(configUnderTest, "Unable to find storm config option with name '{0}'", entry); + Assert.AreEqual(stormConfig[entry], configUnderTest.Value, "value doesn't match for storm config option with name '{0}'", entry); + } + + Assert.AreEqual(clusterConfig.HiveMetastore.DatabaseName, config.HiveMetastore.DatabaseName); + Assert.AreEqual(clusterConfig.HiveMetastore.SqlAzureServerName, config.HiveMetastore.SqlAzureServerName); + Assert.AreEqual(clusterConfig.HiveMetastore.Credential.UserName, config.HiveMetastore.Credential.UserName); + Assert.AreEqual(clusterConfig.HiveMetastore.Credential.GetCleartextPassword(), config.HiveMetastore.Credential.GetCleartextPassword()); + + Assert.AreEqual(clusterConfig.OozieMetastore.DatabaseName, config.OozieMetastore.DatabaseName); + Assert.AreEqual(clusterConfig.OozieMetastore.SqlAzureServerName, config.OozieMetastore.SqlAzureServerName); + Assert.AreEqual(clusterConfig.OozieMetastore.Credential.UserName, config.OozieMetastore.Credential.UserName); + Assert.AreEqual( + clusterConfig.OozieMetastore.Credential.GetCleartextPassword(), config.OozieMetastore.Credential.GetCleartextPassword()); + } + } + [TestMethod] + [TestCategory("CheckIn")] + public void CanCallTheAddConfigValuesCmdletTestsCmdlet_PreserveHiveConfig() + { + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + var hiveConfig = new Hashtable(); + hiveConfig.Add("hadoop.logfiles.size", "12345"); + + var hiveServiceConfig = new AzureHDInsightHiveConfiguration + { + Configuration = hiveConfig, + AdditionalLibraries = + new AzureHDInsightDefaultStorageAccount + { + StorageAccountKey = Guid.NewGuid().ToString(), + StorageAccountName = Guid.NewGuid().ToString(), + StorageContainerName = Guid.NewGuid().ToString() + } + }; + + var hiveConfig2 = new Hashtable(); + hiveConfig2.Add("hadoop.logfiles.size2", "12345"); + + var hiveServiceConfig2 = new AzureHDInsightHiveConfiguration + { + Configuration = hiveConfig2, + AdditionalLibraries = + new AzureHDInsightDefaultStorageAccount + { + StorageAccountKey = Guid.NewGuid().ToString(), + StorageAccountName = Guid.NewGuid().ToString(), + StorageContainerName = Guid.NewGuid().ToString() + } + }; + + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.AddAzureHDInsightConfigValues) + .WithParameter(CmdletConstants.ClusterConfig, new AzureHDInsightConfig()) + .WithParameter(CmdletConstants.HiveConfig, hiveServiceConfig) + .AddCommand(CmdletConstants.AddAzureHDInsightConfigValues) + .WithParameter(CmdletConstants.HiveConfig, hiveServiceConfig2) + .Invoke(); + AzureHDInsightConfig config = results.Results.ToEnumerable().First(); + ValidateConfigurationOptions(hiveConfig, config.HiveConfiguration.ConfigurationCollection); + Assert.IsNotNull(config.HiveConfiguration.AdditionalLibraries); + + Assert.AreEqual(config.HiveConfiguration.AdditionalLibraries.Container, hiveServiceConfig2.AdditionalLibraries.StorageContainerName); + Assert.AreEqual(config.HiveConfiguration.AdditionalLibraries.Key, hiveServiceConfig2.AdditionalLibraries.StorageAccountKey); + Assert.AreEqual(config.HiveConfiguration.AdditionalLibraries.Name, hiveServiceConfig2.AdditionalLibraries.StorageAccountName); + } + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + + private static void RunConfigOptionstest( + IRunspace runspace, string configOptionName, Hashtable expected, Func configPropertyAccessor) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.AddAzureHDInsightConfigValues) + .WithParameter(CmdletConstants.ClusterConfig, new AzureHDInsightConfig()) + .WithParameter(configOptionName, expected) + .Invoke(); + AzureHDInsightConfig config = results.Results.ToEnumerable().First(); + ValidateConfigurationOptions(expected, configPropertyAccessor(config)); + } + + private static void ValidateConfigurationOptions(Hashtable expected, ConfigValuesCollection actual) + { + foreach (object entry in expected.Keys) + { + KeyValuePair configUnderTest = + actual.FirstOrDefault(c => string.Equals(c.Key, entry.ToString(), StringComparison.Ordinal)); + Assert.IsNotNull(configUnderTest, "Unable to find config option with name '{0}'", entry); + Assert.AreEqual(expected[entry], configUnderTest.Value, "value doesn't match for config option with name '{0}'", entry); + } + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/CmdLetHelpContent.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/CmdLetHelpContent.cs new file mode 100644 index 000000000000..7cdf11c38169 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/CmdLetHelpContent.cs @@ -0,0 +1,66 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests +{ + public enum PipelineValue + { + False, + TrueByValue, + TrueByName + } + + public class CmdletParameterValue + { + public bool Required { get; set; } + public bool VariableLength { get; set; } + public string DataType { get; set; } + } + + public class CmdletParameter : CmdletParameterValue + { + public string Name { get; set; } + public int Location { get; set; } + public bool ValueFromPipeline { get; set; } + public string Description { get; set; } + public CmdletParameterValue Value { get; set; } + } + + public class CmdletSyntax + { + public CmdletSyntax() + { + this.Parameters = new List(); + } + public string Name { get; set; } + public IEnumerable Parameters { get; private set; } + } + + public class CmdletHelpContent + { + public CmdletHelpContent() + { + this.Syntax = new List(); + this.Parameters = new List(); + } + public string Name { get; set; } + public string Verb { get; set; } + public string Nown { get; set; } + public string Description { get; set; } + public IEnumerable Syntax { get; private set; } + public IEnumerable Parameters { get; private set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/CmdLetHelpFileTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/CmdLetHelpFileTests.cs new file mode 100644 index 000000000000..5c0ca38cdc82 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/CmdLetHelpFileTests.cs @@ -0,0 +1,47 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests +{ + [TestClass] + public class CmdLetHelpFileTests : HDInsightTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("CheckIn")] + public void TestHelpFilesAreAccurate() + { + string[] names = + (from n in typeof(AzureHDInsightCmdlet).Assembly.GetManifestResourceNames() + where n.EndsWith(".maml", StringComparison.OrdinalIgnoreCase) + select n).ToArray(); + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/CmdLetIntegrationScenarioTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/CmdLetIntegrationScenarioTests.cs new file mode 100644 index 000000000000..998f4c7caff4 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/CmdLetIntegrationScenarioTests.cs @@ -0,0 +1,52 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests +{ + [TestClass] + public class CmdLetIntegrationScenarioTestCaseTests : CmdletScenariosTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("Integration")] + + [TestCategory("JobsIntegration")] + public override void NewHiveJob_StartJob_GetJob() + { + base.NewHiveJob_StartJob_GetJob(); + } + + [TestMethod] + [TestCategory("Integration")] + + [TestCategory("JobsIntegration")] + public override void NewMapReduceJob_StartJob_GetJob() + { + base.NewMapReduceJob_StartJob_GetJob(); + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/CmdLetScenarioTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/CmdLetScenarioTests.cs new file mode 100644 index 000000000000..0d9a9e0591ee --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/CmdLetScenarioTests.cs @@ -0,0 +1,79 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests +{ + [TestClass] + public class CmdLetScenarioTestCaseTests : CmdletScenariosTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("Scenario")] + [TestCategory("Jobs")] + public void NewHiveJob_StartJob_GetJob_AgainstAzure() + { + this.ApplyIndividualTestMockingOnly(); + base.NewHiveJob_StartJob_GetJob(); + } + + [TestMethod] + [TestCategory("Scenario")] + [TestCategory("Jobs")] + public void NewMapReduceJob_StartJob_GetJob_AgainstAzure() + { + this.ApplyIndividualTestMockingOnly(); + base.NewMapReduceJob_StartJob_GetJob(); + } + + [TestMethod] + [TestCategory("Scenario")] + [TestCategory("Jobs")] + public void NewPigJob_StartJob_GetJob_AgainstAzure() + { + this.ApplyIndividualTestMockingOnly(); + base.NewPigJob_StartJob_GetJob(); + } + + [TestMethod] + [TestCategory("Scenario")] + [TestCategory("Jobs")] + public void NewStreamingJob_StartJob_GetJob_AgainstAzure() + { + this.ApplyIndividualTestMockingOnly(); + base.NewStreamingJob_StartJob_GetJob(); + } + + [TestMethod] + [TestCategory("Scenario")] + [TestCategory("Jobs")] + public void NewStreamingMapReduceJob_StartJob_GetJob_AgainstAzure() + { + this.ApplyIndividualTestMockingOnly(); + base.NewStreamingMapReduceJob_StartJob_GetJob(); + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/CmdletHardCodes.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/CmdletHardCodes.cs new file mode 100644 index 000000000000..6c854263e7b3 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/CmdletHardCodes.cs @@ -0,0 +1,125 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests +{ + public static class CmdletConstants + { + public const string AddAzureHDInsightConfigValues = "Add-AzureHDInsightConfigValues"; + public const string AddAzureHDInsightMetastore = "Add-AzureHDInsightMetastore"; + public const string AddAzureHDInsightStorage = "Add-AzureHDInsightStorage"; + public const string AddAzureHDInsightScriptAction = "Add-AzureHDInsightScriptAction"; + public const string Arguments = "Args"; + public const string Certificate = "Certificate"; + public const string ClassName = "Class"; + public const string Cluster = "Cluster"; + public const string ClusterConfig = "Config"; + public const string ClusterSizeInNodes = "ClusterSizeInNodes"; + public const string Combiner = "Combiner"; + public const string CoreConfig = "Core"; + public const string Credential = "Credential"; + public const string DatabaseName = "DatabaseName"; + public const string Debug = "Debug"; + public const string DefaultStorageContainerName = "DefaultStorageContainerName"; + public const string ExecHiveAlias = "hive"; + public const string ExecHiveQueryAlias = "e"; + public const string Force = "Force"; + public const string GetAzureHDInsightCluster = "Get-AzureHDInsightCluster"; + public const string GetAzureHDInsightJob = "Get-AzureHDInsightJob"; + public const string GetAzureHDInsightJobOutput = "Get-AzureHDInsightJobOutput"; + public const string GetAzureHDInsightProperties = "Get-AzureHDInsightProperties"; + public const string GrantAzureHDInsightHttpAccess = "Grant-AzureHDInsightHttpServicesAccess"; + public const string HdfsConfig = "Hdfs"; + public const string HiveArgs = "Arguments"; + public const string HiveConfig = "Hive"; + public const string Input = "Input"; + public const string InputFormat = "InputFormat"; + public const string InputReader = "InputReader"; + public const string InvokeHive = "Invoke-Hive"; + public const string JarFile = "Jar"; + public const string Job = "Job"; + public const string Command = "Command"; + public const string File = "File"; + public const string Files = "Files"; + public const string JobDefinition = "Job"; + public const string JobName = "Name"; + public const string LibJars = "LibJars"; + public const string Locations = "Locations"; + public const string MapReduceConfig = "MapReduce"; + public const string DownloadTaskLogs = "DownloadTaskLogs"; + public const string Mapper = "Mapper"; + public const string MetastoreType = "MetastoreType"; + public const string Name = "Name"; + public const string NewAzureHDInsightCluster = "New-AzureHDInsightCluster"; + public const string NewAzureHDInsightClusterConfig = "New-AzureHDInsightClusterConfig"; + public const string NewAzureHDInsightHiveJobDefinition = "New-AzureHDInsightHiveJobDefinition"; + public const string NewAzureHDInsightMapReduceJobDefinition = "New-AzureHDInsightMapReduceJobDefinition"; + public const string NewAzureHDInsightPigJobDefinition = "New-AzureHDInsightPigJobDefinition"; + public const string NewAzureHDInsightSqoopJobDefinition = "New-AzureHDInsightSqoopJobDefinition"; + public const string NewAzureHDInsightStreamingMapReduceJobDefinition = "New-AzureHDInsightStreamingMapReduceJobDefinition"; + public const string OozieConfig = "Oozie"; + public const string Output = "Output"; + public const string OutputFormat = "OutputFormat"; + public const string Parameters = "Params"; + public const string Partitioner = "Partitioner"; + public const string Password = "Password"; + public const string Query = "QueryText"; + public const string QueryFile = "QueryFile"; + public const string Reducer = "Reducer"; + public const string RemoveAzureHDInsightCluster = "Remove-AzureHDInsightCluster"; + public const string RevokeAzureHDInsightHttpAccess = "Revoke-AzureHDInsightHttpServicesAccess"; + public const string SetAzureHDInsightClusterSize = "Set-AzureHDInsightClusterSize"; + public const string SetAzureHDInsightDefaultStorage = "Set-AzureHDInsightDefaultStorage"; + public const string Show = "Show"; + public const string Skip = "Skip"; + public const string SqlAzureServerName = "SqlAzureServerName"; + public const string StartAzureHDInsightJob = "Start-AzureHDInsightJob"; + public const string ConfigActionName = "Name"; + public const string ConfigActionClusterRoleCollection = "ClusterRoleCollection"; + public const string ScriptActionUri = "Uri"; + public const string ScriptActionParameters = "Parameters"; + public const string StatusFolder = "StatusFolder"; + public const string YarnConfig = "Yarn"; + public const string StormConfig = "Storm"; + public const string HBaseConfig = "HBase"; + + public const string StdErr = "StandardError"; + public const string Id = "Id"; + public const string JobId = "JobId"; + public const string FromDateTime = "From"; + public const string Location = "Location"; + public const string EnableHeadNodeHighAvailability = "EnableHeadNodeHighAvailability"; + public const string EastUs = "East US"; + public const string DefaultStorageAccountName = "DefaultStorageAccountName"; + public const string DefaultStorageAccountKey = "DefaultStorageAccountKey"; + public const string StopAzureHDInsightJob = "Stop-AzureHDInsightJob"; + public const string StorageAccountKey = "StorageAccountKey"; + public const string StorageAccountName = "StorageAccountName"; + public const string StorageContainerName = "StorageContainerName"; + public const string Subscription = "Subscription"; + public const string TaskLogsDirectory = "TaskLogsDirectory"; + public const string TaskSummary = "TaskSummary"; + public const string ToDateTime = "To"; + public const string UseAzureHDInsightCluster = "Use-AzureHDInsightCluster"; + public const string UserName = "UserName"; + public const string Version = "Version"; + public const string Versions = "Versions"; + public const string WaitAzureHDInsightJob = "Wait-AzureHDInsightJob"; + public const string WaitTimeoutInSeconds = "WaitTimeoutInSeconds"; + public const string HeadNodeVMSize = "HeadNodeVMSize"; + public const string ClusterType = "ClusterType"; + public const string VirtualNetworkId = "VirtualNetworkId"; + public const string SubnetName = "SubnetName"; + } +} + diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/CmdletScenariosTestCaseBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/CmdletScenariosTestCaseBase.cs new file mode 100644 index 000000000000..9e6bf405f70d --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/CmdletScenariosTestCaseBase.cs @@ -0,0 +1,378 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using Microsoft.Hadoop.Client; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Interfaces; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Simulators; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities; +using Microsoft.WindowsAzure.Management.HDInsight; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests +{ + [TestClass] + public class CmdletScenariosTestCaseBase : HDInsightTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Jobs")] + public virtual void NewHiveJob_StartJob_GetJob() + { + var hiveJobDefinition = new HiveJobCreateParameters { JobName = "show tables", Query = "show tables" }; + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + ClusterDetails testCluster = GetHttpAccessEnabledCluster(); + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightHiveJobDefinition) + .WithParameter(CmdletConstants.JobName, hiveJobDefinition.JobName) + .WithParameter(CmdletConstants.Query, hiveJobDefinition.Query) + .AddCommand(CmdletConstants.StartAzureHDInsightJob) + .WithParameter(CmdletConstants.Cluster, testCluster.Name) + .AddCommand(CmdletConstants.WaitAzureHDInsightJob) + .WithParameter(CmdletConstants.WaitTimeoutInSeconds, 10) + .AddCommand(CmdletConstants.GetAzureHDInsightJobOutput) + .WithParameter(CmdletConstants.Cluster, testCluster.Name) + .Invoke(); + + Assert.IsNotNull(results.Results.ToEnumerable()); + Assert.IsTrue(results.Results.ToEnumerable().Any(str => str == "hivesampletable")); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Jobs")] + public virtual void NewMapReduceJob_StartJob_GetJob() + { + var mapReduceJobDefinition = new MapReduceJobCreateParameters + { + JobName = "pi estimation jobDetails", + ClassName = "pi", + JarFile = "/example/hadoop-examples.jar" + }; + + mapReduceJobDefinition.Arguments.Add("16"); + mapReduceJobDefinition.Arguments.Add("10000"); + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightMapReduceJobDefinition) + .WithParameter(CmdletConstants.JobName, mapReduceJobDefinition.JobName) + .WithParameter(CmdletConstants.JarFile, mapReduceJobDefinition.JarFile) + .WithParameter(CmdletConstants.ClassName, mapReduceJobDefinition.ClassName) + .WithParameter(CmdletConstants.Arguments, mapReduceJobDefinition.Arguments) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightMapReduceJobDefinition mapReduceJobFromPowershell = + results.Results.ToEnumerable().First(); + RunJobAndGetWithId(runspace, mapReduceJobFromPowershell); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Jobs")] + public virtual void NewPigJob_StartJob_GetJob() + { + var pigJobDefinition = new PigJobCreateParameters { Query = "load 'passwd' using PigStorage(':'); B = foreach A generate $0 as id;" }; + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightPigJobDefinition) + .WithParameter(CmdletConstants.Query, pigJobDefinition.Query) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightPigJobDefinition pigJobFromPowershell = results.Results.ToEnumerable().First(); + AzureHDInsightJob pigJobfromHistory = RunJobAndGetWithId(runspace, pigJobFromPowershell); + Assert.AreEqual(pigJobfromHistory.Query, pigJobDefinition.Query, "Failed to retrieve query for executed pig jobDetails"); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Jobs")] + public virtual void NewStreamingJob_StartJob_GetJob() + { + var streamingMapReduceJobDefinition = new StreamingMapReduceJobCreateParameters + { + JobName = "pi estimation jobDetails", + Input = TestConstants.WabsProtocolSchemeName + "input", + Output = TestConstants.WabsProtocolSchemeName + "input", + Mapper = TestConstants.WabsProtocolSchemeName + "combiner", + Reducer = TestConstants.WabsProtocolSchemeName + "combiner", + StatusFolder = TestConstants.WabsProtocolSchemeName + "someotherlocation" + }; + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightStreamingMapReduceJobDefinition) + .WithParameter(CmdletConstants.JobName, streamingMapReduceJobDefinition.JobName) + .WithParameter(CmdletConstants.Input, streamingMapReduceJobDefinition.Input) + .WithParameter(CmdletConstants.Output, streamingMapReduceJobDefinition.Output) + .WithParameter(CmdletConstants.Mapper, streamingMapReduceJobDefinition.Mapper) + .WithParameter(CmdletConstants.Reducer, streamingMapReduceJobDefinition.Reducer) + .WithParameter(CmdletConstants.StatusFolder, streamingMapReduceJobDefinition.StatusFolder) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightStreamingMapReduceJobDefinition streamingMapReduceJobFromPowershell = + results.Results.ToEnumerable().First(); + + RunJobAndGetWithId(runspace, streamingMapReduceJobFromPowershell); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Jobs")] + public virtual void NewStreamingMapReduceJob_StartJob_GetJob() + { + var streamingMapReduceJobDefinition = new StreamingMapReduceJobCreateParameters + { + JobName = "environment variable jobDetails", + Mapper = "environmentvariables.exe", + Input = "/example/apps/environmentvariables.exe", + Output = Guid.NewGuid().ToString() + }; + + var files = new List { streamingMapReduceJobDefinition.Mapper }; + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightStreamingMapReduceJobDefinition) + .WithParameter(CmdletConstants.JobName, streamingMapReduceJobDefinition.JobName) + .WithParameter(CmdletConstants.Mapper, streamingMapReduceJobDefinition.Mapper) + .WithParameter(CmdletConstants.Input, streamingMapReduceJobDefinition.Input) + .WithParameter(CmdletConstants.Output, streamingMapReduceJobDefinition.Output) + .WithParameter(CmdletConstants.Files, files) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightStreamingMapReduceJobDefinition streamingMapReduceJobFromPowershell = + results.Results.ToEnumerable().First(); + RunJobAndGetWithId(runspace, streamingMapReduceJobFromPowershell); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Jobs")] + public virtual void PipeliningHiveJobExecution() + { + var hiveJobDefinition = new HiveJobCreateParameters { JobName = "show tables", Query = "show tables" }; + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + ClusterDetails testCluster = GetHttpAccessEnabledCluster(); + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightHiveJobDefinition) + .WithParameter(CmdletConstants.JobName, hiveJobDefinition.JobName) + .WithParameter(CmdletConstants.Query, hiveJobDefinition.Query) + .AddCommand(CmdletConstants.StartAzureHDInsightJob) + .WithParameter(CmdletConstants.Cluster, testCluster.Name) + .AddCommand(CmdletConstants.WaitAzureHDInsightJob) + .WithParameter(CmdletConstants.WaitTimeoutInSeconds, 10) + .AddCommand(CmdletConstants.GetAzureHDInsightJobOutput) + .Invoke(); + + Assert.IsNotNull(results.Results.ToEnumerable()); + Assert.IsTrue(results.Results.ToEnumerable().Any(str => str == "hivesampletable")); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Jobs")] + public virtual void PipeliningHiveJobExecution_FlowCluster() + { + var hiveJobDefinition = new HiveJobCreateParameters { JobName = "show tables", Query = "show tables" }; + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + ClusterDetails testCluster = GetHttpAccessEnabledCluster(); + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightHiveJobDefinition) + .WithParameter(CmdletConstants.JobName, hiveJobDefinition.JobName) + .WithParameter(CmdletConstants.Query, hiveJobDefinition.Query) + .AddCommand(CmdletConstants.StartAzureHDInsightJob) + .WithParameter(CmdletConstants.Cluster, testCluster.Name) + .AddCommand(CmdletConstants.WaitAzureHDInsightJob) + .WithParameter(CmdletConstants.WaitTimeoutInSeconds, 10) + .AddCommand(CmdletConstants.GetAzureHDInsightJobOutput) + .Invoke(); + + Assert.IsNotNull(results.Results.ToEnumerable()); + Assert.IsTrue(results.Results.ToEnumerable().Any(str => str == "hivesampletable")); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Jobs")] + public virtual void PipeliningHiveJobExecution_Start_GetJob() + { + var hiveJobDefinition = new HiveJobCreateParameters { JobName = "show tables", Query = "show tables" }; + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + ClusterDetails testCluster = GetHttpAccessEnabledCluster(); + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightHiveJobDefinition) + .WithParameter(CmdletConstants.JobName, hiveJobDefinition.JobName) + .WithParameter(CmdletConstants.Query, hiveJobDefinition.Query) + .AddCommand(CmdletConstants.StartAzureHDInsightJob) + .WithParameter(CmdletConstants.Cluster, testCluster.Name) + .AddCommand(CmdletConstants.GetAzureHDInsightJob) + .Invoke(); + + Assert.IsNotNull(results.Results.ToEnumerable()); + Assert.IsTrue(results.Results.ToEnumerable().Any(job => job.Name == "show tables")); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Jobs")] + public virtual void PipeliningMapReduceJobExecution() + { + var mapReduceJobDefinition = new MapReduceJobCreateParameters + { + JobName = "pi estimation job", + ClassName = "pi", + JarFile = "/example/hadoop-examples.jar" + }; + + mapReduceJobDefinition.Arguments.Add("16"); + mapReduceJobDefinition.Arguments.Add("10000"); + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + ClusterDetails testCluster = GetHttpAccessEnabledCluster(); + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightMapReduceJobDefinition) + .WithParameter(CmdletConstants.JobName, mapReduceJobDefinition.JobName) + .WithParameter(CmdletConstants.JarFile, mapReduceJobDefinition.JarFile) + .WithParameter(CmdletConstants.ClassName, mapReduceJobDefinition.ClassName) + .WithParameter(CmdletConstants.Arguments, mapReduceJobDefinition.Arguments) + .AddCommand(CmdletConstants.StartAzureHDInsightJob) + .WithParameter(CmdletConstants.Cluster, testCluster.Name) + .AddCommand(CmdletConstants.WaitAzureHDInsightJob) + .WithParameter(CmdletConstants.WaitTimeoutInSeconds, 10) + .AddCommand(CmdletConstants.GetAzureHDInsightJobOutput) + .WithParameter(CmdletConstants.Cluster, testCluster.Name) + .Invoke(); + + Assert.IsNotNull(results.Results.ToEnumerable()); + Assert.IsTrue(results.Results.ToEnumerable().Any(str => str == "3.142")); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Jobs")] + public virtual void PipeliningStreamingMapReduceJobExecution() + { + var streamingMapReduceJobDefinition = new StreamingMapReduceJobCreateParameters + { + JobName = "pi estimation job", + Mapper = "environmentvariables.exe", + Input = "/example/apps/environmentvariables.exe", + Output = Guid.NewGuid().ToString() + }; + + var files = new List { streamingMapReduceJobDefinition.Mapper }; + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + ClusterDetails testCluster = GetHttpAccessEnabledCluster(); + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightStreamingMapReduceJobDefinition) + .WithParameter(CmdletConstants.JobName, streamingMapReduceJobDefinition.JobName) + .WithParameter(CmdletConstants.Mapper, streamingMapReduceJobDefinition.Mapper) + .WithParameter(CmdletConstants.Input, streamingMapReduceJobDefinition.Input) + .WithParameter(CmdletConstants.Output, streamingMapReduceJobDefinition.Output) + .WithParameter(CmdletConstants.Files, files) + .AddCommand(CmdletConstants.StartAzureHDInsightJob) + .WithParameter(CmdletConstants.Cluster, testCluster.Name) + .AddCommand(CmdletConstants.WaitAzureHDInsightJob) + .WithParameter(CmdletConstants.WaitTimeoutInSeconds, 10) + .AddCommand(CmdletConstants.GetAzureHDInsightJobOutput) + .WithParameter(CmdletConstants.Cluster, testCluster.Name) + .Invoke(); + + Assert.IsNotNull(results.Results.ToEnumerable()); + Assert.IsTrue(results.Results.ToEnumerable().Any(str => str == "3.142")); + } + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + + private static AzureHDInsightJob RunJobAndGetWithId(IRunspace runspace, TJobType jobDefinition) + where TJobType : AzureHDInsightJobDefinition + { + ClusterDetails testCluster = GetHttpAccessEnabledCluster(); + PSCredential testClusterCredentials = GetPSCredential(testCluster.HttpUserName, testCluster.HttpPassword); + IPipelineResult jobWithIdResults = + runspace.NewPipeline() + .AddCommand(CmdletConstants.StartAzureHDInsightJob) + .WithParameter(CmdletConstants.Cluster, testCluster.ConnectionUrl) + .WithParameter(CmdletConstants.Credential, testClusterCredentials) + .WithParameter(CmdletConstants.JobDefinition, jobDefinition) + .AddCommand(CmdletConstants.WaitAzureHDInsightJob) + .WithParameter(CmdletConstants.Credential, testClusterCredentials) + .Invoke(); + + AzureHDInsightJob jobWithId = jobWithIdResults.Results.ToEnumerable().First(); + Assert.AreEqual(jobWithId.State, JobStatusCode.Completed.ToString(), "jobDetails failed."); + return jobWithId; + } + + internal static ClusterDetails GetHttpAccessEnabledCluster() + { + return AzureHDInsightClusterManagementClientSimulator.GetClusterInternal("HttpAccessCluster").Cluster; + } + + internal static ClusterDetails GetHttpAccessDisabledCluster() + { + return AzureHDInsightClusterManagementClientSimulator.GetClusterInternal("NoHttpAccessCluster").Cluster; + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/ConnectClusterCommandCmdletTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/ConnectClusterCommandCmdletTests.cs new file mode 100644 index 000000000000..cabc1428631d --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/ConnectClusterCommandCmdletTests.cs @@ -0,0 +1,190 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Interfaces; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Simulators; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities; +using Microsoft.WindowsAzure.Management.HDInsight; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Logging; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests +{ + [TestClass] + public class ConnectClusterCommandCmdletTests : HDInsightTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + [TestCategory("PowerShell")] + public void ICanCallThe_Connect_ClusterHDInsightClusterCmdlet() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.UseAzureHDInsightCluster) + .WithParameter(CmdletConstants.Name, TestCredentials.WellKnownCluster.DnsName) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + IAzureHDInsightConnectionSessionManager sessionManager = + ServiceLocator.Instance.Locate().Create(null); + AzureHDInsightClusterConnection currentCluster = sessionManager.GetCurrentCluster(); + Assert.IsNotNull(currentCluster); + ValidateGetCluster(currentCluster.Cluster); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + [TestCategory("PowerShell")] + + public void ICanCallThe_Connect_ClusterHDInsightClusterCmdlet_MoreThanOnce() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IHDInsightCertificateCredential credentials = GetValidCredentials(); + IPipelineResult clusterResults = + runspace.NewPipeline() + .AddCommand(CmdletConstants.GetAzureHDInsightCluster) + .WithParameter(CmdletConstants.Name, TestCredentials.WellKnownCluster.DnsName) + .Invoke(); + IEnumerable clusters = clusterResults.Results.ToEnumerable(); + foreach (AzureHDInsightCluster cluster in clusters) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.UseAzureHDInsightCluster) + .WithParameter(CmdletConstants.Name, TestCredentials.WellKnownCluster.DnsName) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + IAzureHDInsightConnectionSessionManager sessionManager = + ServiceLocator.Instance.Locate().Create(null); + AzureHDInsightClusterConnection currentCluster = sessionManager.GetCurrentCluster(); + Assert.IsNotNull(currentCluster); + ValidateGetCluster(cluster, currentCluster.Cluster); + } + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + [TestCategory("PowerShell")] + + public void ICanCallThe_Connect_ClusterHDInsightClusterCmdlet_WithDebug() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + var logWriter = new PowershellLogWriter(); + BufferingLogWriterFactory.Instance = logWriter; + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.UseAzureHDInsightCluster) + .WithParameter(CmdletConstants.Name, TestCredentials.WellKnownCluster.DnsName) + .WithParameter(CmdletConstants.Debug, null) + .Invoke(); + + Assert.AreEqual(1, results.Results.Count); + IAzureHDInsightConnectionSessionManager sessionManager = + ServiceLocator.Instance.Locate().Create(null); + AzureHDInsightClusterConnection currentCluster = sessionManager.GetCurrentCluster(); + Assert.IsNotNull(currentCluster); + string expectedLogMessage = "Getting hdinsight clusters for subscriptionid : "; + ValidateGetCluster(currentCluster.Cluster); + Assert.IsTrue(logWriter.Buffer.Any(message => message.Contains(expectedLogMessage))); + BufferingLogWriterFactory.Reset(); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + [TestCategory("PowerShell")] + + public void ICannotCallThe_Connect_ClusterHDInsightClusterCmdlet_WithNonExistantCluster() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + string invalidCluster = Guid.NewGuid().ToString(); + string errorMessage = string.Empty; + try + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.UseAzureHDInsightCluster) + .WithParameter(CmdletConstants.Name, invalidCluster) + .Invoke(); + Assert.Fail("The expected exception was not thrown."); + } + catch (CmdletInvocationException cmdException) + { + errorMessage = cmdException.GetBaseException().Message; + } + + Assert.AreEqual("Failed to connect to cluster :" + invalidCluster, errorMessage); + } + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + + private static void ValidateGetCluster(AzureHDInsightCluster expected, AzureHDInsightCluster actual) + { + Assert.AreEqual(expected.Name, actual.Name); + Assert.AreEqual(expected.Version, actual.Version); + Assert.AreEqual(expected.HttpUserName, actual.HttpUserName); + Assert.AreEqual(expected.HttpPassword, actual.HttpPassword); + } + + private static void ValidateGetCluster(AzureHDInsightCluster cluster) + { + Assert.AreEqual(TestCredentials.WellKnownCluster.DnsName, cluster.Name); + Assert.AreEqual(TestCredentials.WellKnownCluster.Version, cluster.Version); + WabStorageAccountConfiguration defaultStorageAccount = GetWellKnownStorageAccounts().First(); + Assert.AreEqual(defaultStorageAccount.Key, cluster.DefaultStorageAccount.StorageAccountKey); + Assert.AreEqual(defaultStorageAccount.Name, cluster.DefaultStorageAccount.StorageAccountName); + Assert.AreEqual(defaultStorageAccount.Container, cluster.DefaultStorageAccount.StorageContainerName); + foreach (WabStorageAccountConfiguration account in GetWellKnownStorageAccounts().Skip(1)) + { + AzureHDInsightStorageAccount deserializedAccount = + cluster.StorageAccounts.FirstOrDefault(acc => acc.StorageAccountName == account.Name); + Assert.IsNotNull(deserializedAccount, account.Name); + Assert.AreEqual(account.Key, deserializedAccount.StorageAccountKey); + } + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/GetCommandCmdletTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/GetCommandCmdletTests.cs new file mode 100644 index 000000000000..28aa920fc37c --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/GetCommandCmdletTests.cs @@ -0,0 +1,218 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Net.Http; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Interfaces; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Simulators; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities; +using Microsoft.WindowsAzure.Management.HDInsight; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Logging; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests +{ + [TestClass] + public class GetCommandCmdletTests : HDInsightTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("CheckIn")] + public void ICanCallThe_Get_ClusterHDInsightClusterCmdlet() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.GetAzureHDInsightCluster) + .Invoke(); + + IEnumerable clusters = results.Results.ToEnumerable(); + AzureHDInsightCluster wellKnownCluster = clusters.FirstOrDefault(cluster => cluster.Name == TestCredentials.WellKnownCluster.DnsName); + Assert.IsNotNull(wellKnownCluster); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + public void ICanCallThe_Get_ClusterHDInsightClusterCmdlet_WithADnsName() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.GetAzureHDInsightCluster) + .WithParameter(CmdletConstants.Name, TestCredentials.WellKnownCluster.DnsName) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightCluster cluster = results.Results.ToEnumerable().Last(); + ValidateGetCluster(cluster); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + public void ICanCallThe_Get_ClusterHDInsightClusterCmdlet_WithDebug() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + var logWriter = new PowershellLogWriter(); + BufferingLogWriterFactory.Instance = logWriter; + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.GetAzureHDInsightCluster) + .WithParameter(CmdletConstants.Debug, null) + .Invoke(); + IEnumerable clusters = results.Results.ToEnumerable(); + AzureHDInsightCluster wellKnownCluster = clusters.FirstOrDefault(cluster => cluster.Name == TestCredentials.WellKnownCluster.DnsName); + Assert.IsNotNull(wellKnownCluster); + ValidateGetCluster(wellKnownCluster); + + string expectedLogMessage = "Getting hdinsight clusters for subscriptionid : "; + Assert.IsTrue(logWriter.Buffer.Any(message => message.Contains(expectedLogMessage))); + BufferingLogWriterFactory.Reset(); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + public void ICanCallThe_Get_ClusterHDInsightClusterCmdlet_WithoutCertificate() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.GetAzureHDInsightCluster) + .Invoke(); + IEnumerable clusters = results.Results.ToEnumerable(); + AzureHDInsightCluster wellKnownCluster = clusters.FirstOrDefault(cluster => cluster.Name == TestCredentials.WellKnownCluster.DnsName); + Assert.IsNotNull(wellKnownCluster); + ValidateGetCluster(wellKnownCluster); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + public void ICanCallThe_Get_ClusterHDInsightClusterCmdlet_WithSubscriptionId() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.GetAzureHDInsightCluster) + .WithParameter(CmdletConstants.Subscription, IntegrationTestBase.TestCredentials.SubscriptionId) + .Invoke(); + IEnumerable clusters = results.Results.ToEnumerable(); + AzureHDInsightCluster wellKnownCluster = clusters.FirstOrDefault(cluster => cluster.Name == TestCredentials.WellKnownCluster.DnsName); + Assert.IsNotNull(wellKnownCluster); + ValidateGetCluster(wellKnownCluster); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + public void ICanCallThe_Get_ClusterHDInsightClusterCmdlet_WithInvalidSubscriptionId() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + var invalidSubscriptionId = Guid.NewGuid().ToString(); + var expectedErrorMessage = + string.Format( + "Failed to retrieve Certificate for the subscription '{0}'.Please use Select-AzureSubscription -Current to select a subscription.", + invalidSubscriptionId); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + try + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.GetAzureHDInsightCluster) + .WithParameter(CmdletConstants.Subscription, invalidSubscriptionId) + .Invoke(); + Assert.Fail("Test should have failed."); + } + catch (CmdletInvocationException cmdException) + { + var innerException = cmdException.GetBaseException(); + Assert.IsInstanceOfType(innerException, typeof(ArgumentException)); + Assert.AreEqual(expectedErrorMessage, innerException.Message); + } + } + } + + [TestMethod] + [TestCategory("CheckIn")] + public void ICannotCallThe_Get_ClusterHDInsightClusterCmdlet_WithNonExistantCluster() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + try + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.GetAzureHDInsightCluster) + .WithParameter(CmdletConstants.Name, Guid.NewGuid().ToString()) + .Invoke(); + } + catch (CmdletInvocationException cmdException) + { + var baseHttpException = cmdException.GetBaseException() as HttpRequestException; + Assert.IsNotNull(baseHttpException, "expected httpException for invalid cluster name"); + } + } + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + + private static void ValidateGetCluster(AzureHDInsightCluster cluster) + { + Assert.AreEqual(TestCredentials.WellKnownCluster.DnsName, cluster.Name); + Assert.AreEqual(TestCredentials.HadoopUserName, cluster.HttpUserName); + Assert.AreEqual(TestCredentials.AzurePassword, cluster.HttpPassword); + Assert.AreEqual(ClusterState.Running, cluster.State); + Assert.IsFalse(string.IsNullOrEmpty(cluster.ConnectionUrl)); + Assert.AreEqual(VersionStatus.Compatible.ToString(), cluster.VersionStatus); + Assert.AreEqual(TestCredentials.WellKnownCluster.Version, cluster.Version); + WabStorageAccountConfiguration defaultStorageAccount = GetWellKnownStorageAccounts().First(); + Assert.AreEqual(defaultStorageAccount.Key, cluster.DefaultStorageAccount.StorageAccountKey); + Assert.AreEqual(defaultStorageAccount.Name, cluster.DefaultStorageAccount.StorageAccountName); + Assert.AreEqual(defaultStorageAccount.Container, cluster.DefaultStorageAccount.StorageContainerName); + foreach (WabStorageAccountConfiguration account in GetWellKnownStorageAccounts().Skip(1)) + { + AzureHDInsightStorageAccount deserializedAccount = + cluster.StorageAccounts.FirstOrDefault(acc => acc.StorageAccountName == account.Name); + Assert.IsNotNull(deserializedAccount, account.Name); + Assert.AreEqual(account.Key, deserializedAccount.StorageAccountKey); + } + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/GetJobOutputCmdletTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/GetJobOutputCmdletTests.cs new file mode 100644 index 000000000000..c64814f3a946 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/GetJobOutputCmdletTests.cs @@ -0,0 +1,229 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Interfaces; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities; +using Microsoft.WindowsAzure.Management.HDInsight; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests +{ + [TestClass] + public class GetJobOutputCmdletTests : HDInsightTestCaseBase + { + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Get-AzureHDInsightJobOutput")] + public void ICanCallThe_Get_HDInsightJobOutputCmdlet() + { + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + ClusterDetails testCluster = CmdletScenariosTestCaseBase.GetHttpAccessEnabledCluster(); + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.GetAzureHDInsightJob) + .WithParameter(CmdletConstants.Cluster, testCluster.Name) + .WithParameter(CmdletConstants.Credential, GetPSCredential(testCluster.HttpUserName, testCluster.HttpPassword)) + .Invoke(); + IEnumerable jobHistory = results.Results.ToEnumerable(); + + IPipelineResult outputContent = + runspace.NewPipeline() + .AddCommand(CmdletConstants.GetAzureHDInsightJobOutput) + .WithParameter(CmdletConstants.Cluster, testCluster.Name) + .WithParameter(CmdletConstants.Id, jobHistory.First().JobId) + .Invoke(); + string result = outputContent.Results.ToEnumerable().First(); + Assert.IsTrue(result.Length > 0); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Get-AzureHDInsightJobOutput")] + public void ICanCallThe_Get_HDInsightJobOutputCmdlet_WithStdErrSwitch() + { + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + ClusterDetails testCluster = CmdletScenariosTestCaseBase.GetHttpAccessEnabledCluster(); + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.GetAzureHDInsightJob) + .WithParameter(CmdletConstants.Cluster, testCluster.Name) + .WithParameter(CmdletConstants.Credential, GetPSCredential(testCluster.HttpUserName, testCluster.HttpPassword)) + .Invoke(); + IEnumerable jobHistory = results.Results.ToEnumerable(); + + IPipelineResult outputContent = + runspace.NewPipeline() + .AddCommand(CmdletConstants.GetAzureHDInsightJobOutput) + .WithParameter(CmdletConstants.Cluster, testCluster.Name) + .WithParameter(CmdletConstants.Id, jobHistory.First().JobId) + .WithParameter(CmdletConstants.StdErr, null) + .Invoke(); + string result = outputContent.Results.ToEnumerable().First(); + Assert.IsTrue(result.Length > 0); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Get-AzureHDInsightJobOutput")] + public void ICanCallThe_Get_HDInsightJobOutputCmdlet_WithTaskLogsSwitch() + { + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + ClusterDetails testCluster = CmdletScenariosTestCaseBase.GetHttpAccessEnabledCluster(); + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.GetAzureHDInsightJob) + .WithParameter(CmdletConstants.Cluster, testCluster.Name) + .WithParameter(CmdletConstants.Credential, GetPSCredential(testCluster.HttpUserName, testCluster.HttpPassword)) + .Invoke(); + IEnumerable jobHistory = results.Results.ToEnumerable(); + DirectoryInfo taskLogsDirectory = Directory.CreateDirectory(Guid.NewGuid().ToString()); + IPipelineResult outputContent = + runspace.NewPipeline() + .AddCommand(CmdletConstants.GetAzureHDInsightJobOutput) + .WithParameter(CmdletConstants.Cluster, testCluster.Name) + .WithParameter(CmdletConstants.JobId, jobHistory.First().JobId) + .WithParameter(CmdletConstants.DownloadTaskLogs, null) + .WithParameter(CmdletConstants.TaskLogsDirectory, taskLogsDirectory.Name) + .Invoke(); + IEnumerable result = taskLogsDirectory.EnumerateFiles(); + Assert.IsTrue(result.Any()); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Get-AzureHDInsightJobOutput")] + public void ICanCallThe_Get_HDInsightJobOutputCmdlet_WithTaskSummarySwitch() + { + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + ClusterDetails testCluster = CmdletScenariosTestCaseBase.GetHttpAccessEnabledCluster(); + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.GetAzureHDInsightJob) + .WithParameter(CmdletConstants.Cluster, testCluster.Name) + .WithParameter(CmdletConstants.Credential, GetPSCredential(testCluster.HttpUserName, testCluster.HttpPassword)) + .Invoke(); + IEnumerable jobHistory = results.Results.ToEnumerable(); + + IPipelineResult outputContent = + runspace.NewPipeline() + .AddCommand(CmdletConstants.GetAzureHDInsightJobOutput) + .WithParameter(CmdletConstants.Cluster, testCluster.Name) + .WithParameter(CmdletConstants.Id, jobHistory.First().JobId) + .WithParameter(CmdletConstants.TaskSummary, null) + .Invoke(); + string result = outputContent.Results.ToEnumerable().First(); + Assert.IsTrue(result.Length > 0); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Get-AzureHDInsightJobOutput")] + public void ICanCallThe_Get_HDInsightJobsCmdlet_WithNonExistantJobId() + { + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + ClusterDetails testCluster = CmdletScenariosTestCaseBase.GetHttpAccessEnabledCluster(); + string jobId = Guid.NewGuid().ToString(); + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.GetAzureHDInsightJobOutput) + .WithParameter(CmdletConstants.Cluster, testCluster.Name) + .WithParameter(CmdletConstants.Id, jobId) + .WithParameter(CmdletConstants.StdErr, null) + .Invoke(); + + Assert.IsTrue(results.Results.ToEnumerable().All(string.IsNullOrEmpty)); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Get-AzureHDInsightJobOutput")] + public void ICannotCallThe_Get_HDInsightJobOutputCmdlet_WithTaskLogsSwitch_NoDirectory() + { + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + ClusterDetails testCluster = CmdletScenariosTestCaseBase.GetHttpAccessEnabledCluster(); + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.GetAzureHDInsightJob) + .WithParameter(CmdletConstants.Cluster, testCluster.Name) + .WithParameter(CmdletConstants.Credential, GetPSCredential(testCluster.HttpUserName, testCluster.HttpPassword)) + .Invoke(); + IEnumerable jobHistory = results.Results.ToEnumerable(); + try + { + runspace.NewPipeline() + .AddCommand(CmdletConstants.GetAzureHDInsightJobOutput) + .WithParameter(CmdletConstants.Cluster, testCluster.Name) + .WithParameter(CmdletConstants.Id, jobHistory.First().JobId) + .WithParameter(CmdletConstants.DownloadTaskLogs, null) + .Invoke(); + Assert.Fail("test failed"); + } + catch (CmdletInvocationException invokeException) + { + var argException = invokeException.GetBaseException() as PSArgumentException; + Assert.IsNotNull(argException); + Assert.AreEqual(argException.ParamName, "taskLogsDirectory"); + Assert.AreEqual(argException.Message, "Please specify the directory to download logs to."); + } + } + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/GetJobsCmdletTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/GetJobsCmdletTests.cs new file mode 100644 index 000000000000..c0fc983e3e5f --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/GetJobsCmdletTests.cs @@ -0,0 +1,161 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.Hadoop.Client; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.HDInsight.CommandTests; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Interfaces; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Simulators; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities; +using Microsoft.WindowsAzure.Management.HDInsight; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Logging; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests +{ + [TestClass] + public class GetJobsCmdletTests : HDInsightTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Get-AzureHDInsightJobs")] + public void ICanCallThe_Get_HDInsightJobsCmdlet() + { + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + ClusterDetails testCluster = CmdletScenariosTestCaseBase.GetHttpAccessEnabledCluster(); + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.GetAzureHDInsightJob) + .WithParameter(CmdletConstants.Cluster, testCluster.ConnectionUrl) + .WithParameter(CmdletConstants.Credential, GetPSCredential(testCluster.HttpUserName, testCluster.HttpPassword)) + .Invoke(); + IEnumerable jobHistory = results.Results.ToEnumerable(); + + JobList expectedJobHistory = HDInsightGetJobsCommandTests.GetJobHistory(testCluster.ConnectionUrl); + Assert.AreEqual(expectedJobHistory.Jobs.Count, jobHistory.Count(), "Should have {0} jobs.", expectedJobHistory.Jobs.Count); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Get-AzureHDInsightJobs")] + public void ICanCallThe_Get_HDInsightJobsCmdletWithJobId() + { + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + ClusterDetails testCluster = CmdletScenariosTestCaseBase.GetHttpAccessEnabledCluster(); + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.GetAzureHDInsightJob) + .WithParameter(CmdletConstants.Cluster, testCluster.ConnectionUrl) + .WithParameter(CmdletConstants.Credential, GetPSCredential(testCluster.HttpUserName, testCluster.HttpPassword)) + .Invoke(); + var jobDetail = results.Results.ElementAt(0).ImmediateBaseObject as AzureHDInsightJobBase; + Assert.IsNotNull(jobDetail); + + AzureHDInsightJob getJobDetailObj = GetJobWithID(runspace, jobDetail.JobId, testCluster); + Assert.IsNotNull(getJobDetailObj); + Assert.AreEqual(jobDetail.JobId, getJobDetailObj.JobId); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Get-AzureHDInsightJobs")] + public void ICanCallThe_Get_HDInsightJobsCmdlet_WithDebug() + { + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + ClusterDetails testCluster = CmdletScenariosTestCaseBase.GetHttpAccessEnabledCluster(); + var logWriter = new PowershellLogWriter(); + BufferingLogWriterFactory.Instance = logWriter; + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.GetAzureHDInsightJob) + .WithParameter(CmdletConstants.Cluster, testCluster.ConnectionUrl) + .WithParameter(CmdletConstants.Credential, GetPSCredential(testCluster.HttpUserName, testCluster.HttpPassword)) + .WithParameter(CmdletConstants.Debug, null) + .Invoke(); + IEnumerable jobHistory = results.Results.ToEnumerable(); + + JobList expectedJobHistory = HDInsightGetJobsCommandTests.GetJobHistory(testCluster.ConnectionUrl); + Assert.AreEqual(expectedJobHistory.Jobs.Count, jobHistory.Count(), "Should have {0} jobs.", expectedJobHistory.Jobs.Count); + string expectedLogMessage = "Listing jobs"; + Assert.IsTrue(logWriter.Buffer.Any(message => message.Contains(expectedLogMessage))); + BufferingLogWriterFactory.Reset(); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Get-AzureHDInsightJobs")] + public void ICanCallThe_Get_HDInsightJobsCmdlet_WithNonExistantJobId() + { + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + ClusterDetails testCluster = CmdletScenariosTestCaseBase.GetHttpAccessEnabledCluster(); + string jobId = Guid.NewGuid().ToString(); + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.GetAzureHDInsightJob) + .WithParameter(CmdletConstants.Cluster, testCluster.ConnectionUrl) + .WithParameter(CmdletConstants.Credential, GetPSCredential(testCluster.HttpUserName, testCluster.HttpPassword)) + .WithParameter(CmdletConstants.Id, jobId) + .Invoke(); + Assert.AreEqual(results.Results.Count, 0); + } + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + + internal static AzureHDInsightJob GetJobWithID(IRunspace runspace, string jobId, ClusterDetails cluster) + { + IPipelineResult getJobDetailResults = + runspace.NewPipeline() + .AddCommand(CmdletConstants.GetAzureHDInsightJob) + .WithParameter(CmdletConstants.Cluster, cluster.ConnectionUrl) + .WithParameter(CmdletConstants.Credential, GetPSCredential(cluster.HttpUserName, cluster.HttpPassword)) + .WithParameter(CmdletConstants.Id, jobId) + .Invoke(); + + return getJobDetailResults.Results.ToEnumerable().FirstOrDefault(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/GetPropertiesCmdletTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/GetPropertiesCmdletTests.cs new file mode 100644 index 000000000000..412672a67a43 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/GetPropertiesCmdletTests.cs @@ -0,0 +1,152 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.HDInsight.CommandTests; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Interfaces; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities; +using Microsoft.WindowsAzure.Management.HDInsight; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests +{ + [TestClass] + public class GetPropertiesCmdletTests : HDInsightTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("CheckIn")] + public void CanCallTheGetHDInsightPropertiesCmdlet() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.GetAzureHDInsightProperties) + .WithParameter(CmdletConstants.Certificate, creds.Certificate) + .Invoke(); + + HDInsightGetPropertiesCommandTests.ValidateCapabilities(results.Results.ToEnumerable()); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + public void CanCallTheGetHDInsightPropertiesCmdletWithDebugSwitch() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.GetAzureHDInsightProperties) + .WithParameter(CmdletConstants.Debug, null) + .Invoke(); + + List> capabilities = + results.Results.ToEnumerable>>().SelectMany(ver => ver.ToList()).ToList(); + Assert.IsNotNull(capabilities); + Assert.IsTrue(capabilities.Count > 0); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + public void CanCallTheGetHDInsightPropertiesCmdletWithLocationsSwitch() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.GetAzureHDInsightProperties) + .WithParameter(CmdletConstants.Locations, null) + .Invoke(); + + List locationsFromPowerShell = results.Results.ToEnumerable>().SelectMany(ver => ver.ToList()).ToList(); + + var locations = new Collection { "East US", "East US 2", "West US", "North Europe" }; + foreach (string Location in locations) + { + Assert.IsTrue( + locationsFromPowerShell.Any(capLocation => string.Equals(Location, capLocation, StringComparison.Ordinal)), + "unable to find Location '{0}' in capabilities", + Location); + } + } + } + + [TestMethod] + [TestCategory("CheckIn")] + public void CanCallTheGetHDInsightPropertiesCmdletWithVersionsSwitch() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.GetAzureHDInsightProperties) + .WithParameter(CmdletConstants.Versions, null) + .Invoke(); + + List versionsFromPowerShell = + results.Results.ToEnumerable>().SelectMany(ver => ver.ToList()).ToList(); + var versions = new Collection(); + versions.Add(new HDInsightVersion { Version = "1.2", VersionStatus = VersionStatus.Obsolete }); + versions.Add(new HDInsightVersion { Version = "1.5", VersionStatus = VersionStatus.Obsolete }); + versions.Add(new HDInsightVersion { Version = "1.6", VersionStatus = VersionStatus.Compatible }); + versions.Add(new HDInsightVersion { Version = "2.1", VersionStatus = VersionStatus.Compatible }); + foreach (HDInsightVersion version in versions) + { + Assert.IsTrue( + versionsFromPowerShell.Any(capVersion => string.Equals(version.Version, capVersion.Version, StringComparison.Ordinal)), + "unable to find version '{0}' in capabilities", + version.Version); + } + } + } + + [TestMethod] + [TestCategory("CheckIn")] + public void CanCallTheGetHDInsightPropertiesCmdletWithoutCertificate() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.GetAzureHDInsightProperties) + .Invoke(); + + HDInsightGetPropertiesCommandTests.ValidateCapabilities(results.Results.ToEnumerable()); + } + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/GrantHttpAccessCmdletTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/GrantHttpAccessCmdletTests.cs new file mode 100644 index 000000000000..8ede8b90fc53 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/GrantHttpAccessCmdletTests.cs @@ -0,0 +1,115 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Interfaces; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities; +using Microsoft.WindowsAzure.Management.HDInsight; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests +{ + [TestClass] + public class GrantHttpAccessCmdletTests : HDInsightTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + [TestCategory("PowerShell")] + + public void CanGrantHttpAccessToHDInsightCluster() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + AzureHDInsightCluster cluster = GetClusterWithHttpAccessDisabled(runspace); + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.GrantAzureHDInsightHttpAccess) + .WithParameter(CmdletConstants.Location, cluster.Location) + .WithParameter(CmdletConstants.Name, cluster.Name) + .WithParameter(CmdletConstants.Credential, GetAzurePsCredentials()) + .Invoke(); + + AzureHDInsightCluster accessgrantedCluster = GetCluster(creds, cluster.Name, runspace); + Assert.IsNotNull(accessgrantedCluster); + Assert.AreEqual(accessgrantedCluster.HttpUserName, TestCredentials.AzureUserName); + Assert.AreEqual(accessgrantedCluster.HttpPassword, TestCredentials.AzurePassword); + } + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + + internal static AzureHDInsightCluster GetClusterWithHttpAccessDisabled(IRunspace runspace) + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.GetAzureHDInsightCluster) + .Invoke(); + + List testClusters = results.Results.ToEnumerable().ToList(); + AzureHDInsightCluster testCluster = testClusters.FirstOrDefault(cluster => cluster.HttpUserName.IsNullOrEmpty()); + if (testCluster == null) + { + testCluster = testClusters.Last(); + RevokeHttpAccessToCluster(creds, testCluster, runspace); + } + + return testCluster; + } + + internal static void RevokeHttpAccessToCluster( + IHDInsightCertificateCredential connectionCredentials, AzureHDInsightCluster cluster, IRunspace runspace) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.RevokeAzureHDInsightHttpAccess) + .WithParameter(CmdletConstants.Location, cluster.Location) + .WithParameter(CmdletConstants.Name, cluster.Name) + .Invoke(); + + AzureHDInsightCluster accessRevokedCluster = GetCluster(connectionCredentials, cluster.Name, runspace); + Assert.IsNotNull(accessRevokedCluster); + Assert.IsTrue(string.IsNullOrEmpty(accessRevokedCluster.HttpUserName)); + Assert.IsTrue(string.IsNullOrEmpty(accessRevokedCluster.HttpPassword)); + } + + internal static AzureHDInsightCluster GetCluster( + IHDInsightCertificateCredential connectionCredentials, string clusterName, IRunspace runspace) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.GetAzureHDInsightCluster) + .WithParameter(CmdletConstants.Name, clusterName) + .Invoke(); + + List clusters = results.Results.ToEnumerable().ToList(); + return clusters.FirstOrDefault(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/HDInsightTestCaseBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/HDInsightTestCaseBase.cs new file mode 100644 index 000000000000..4b08e06ddbfa --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/HDInsightTestCaseBase.cs @@ -0,0 +1,51 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Interfaces; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests +{ + public class HDInsightTestCaseBase : IntegrationTestBase + { + public override void Initialize() + { + base.Initialize(); + this.SetCurrentSubscription(); + } + + public override void TestCleanup() + { + base.TestCleanup(); + ResetCurrentSubscription(); + } + + protected IRunspace GetPowerShellRunspace() + { + string location = typeof(GetAzureHDInsightClusterCmdlet).Assembly.Location; + return base.GetPowerShellRunspace(location); + } + + private void SetCurrentSubscription() + { + AzureHDInsightCmdlet.testSubscription = GetCurrentSubscription(); + } + + private void ResetCurrentSubscription() + { + AzureHDInsightCmdlet.testSubscription = null; + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/InvokeHiveCmdletTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/InvokeHiveCmdletTests.cs new file mode 100644 index 000000000000..a819dbeca35a --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/InvokeHiveCmdletTests.cs @@ -0,0 +1,151 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Interfaces; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Simulators; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities; +using Microsoft.WindowsAzure.Management.HDInsight; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests +{ + [TestClass] + [Ignore] + public class InvokeHiveCmdletTests : HDInsightTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + [TestCategory("PowerShell")] + public void CanCallTheExecHiveCmdlet() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + ConnectToCluster(runspace, creds); + + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.InvokeHive) + .WithParameter(CmdletConstants.Query, "show tables") + .WithParameter(CmdletConstants.JobName, "show tables") + .Invoke(); + + string outputContent = results.Results.ToEnumerable().Last(); + Assert.AreEqual(5, results.Results.Count); + Assert.AreEqual("hivesampletable", outputContent); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + [TestCategory("PowerShell")] + + public void CanCallTheExecHiveCmdletWithInvalidQuery() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + ConnectToCluster(runspace, creds); + + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.InvokeHive) + .WithParameter(CmdletConstants.Query, "Fail this jobDetails.") + .WithParameter(CmdletConstants.JobName, "Fail this jobDetails.") + .Invoke(); + + string outputContent = results.Results.ToEnumerable().Last(); + Assert.AreEqual(5, results.Results.Count); + Assert.AreEqual(AzureHDInsightJobSubmissionClientSimulator.JobFailed, outputContent); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + [TestCategory("PowerShell")] + + public void CannotCallTheExecHiveCmdlet_WithoutConnecting() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + try + { + IAzureHDInsightConnectionSessionManager sessionManager = + ServiceLocator.Instance.Locate().Create(null); + sessionManager.SetCurrentCluster(null); + + runspace.NewPipeline().AddCommand(CmdletConstants.InvokeHive).WithParameter(CmdletConstants.Query, "show tables").Invoke(); + Assert.Fail("test failed."); + } + catch (CmdletInvocationException cmdException) + { + Assert.AreEqual(cmdException.ErrorRecord.CategoryInfo.Category, ErrorCategory.ConnectionError); + } + } + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + + private static void ConnectToCluster(IRunspace runspace, IHDInsightCertificateCredential creds) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.UseAzureHDInsightCluster) + .WithParameter(CmdletConstants.Name, TestCredentials.WellKnownCluster.DnsName) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + IAzureHDInsightConnectionSessionManager sessionManager = + ServiceLocator.Instance.Locate().Create(null); + AzureHDInsightClusterConnection currentCluster = sessionManager.GetCurrentCluster(); + ValidateGetCluster(currentCluster.Cluster); + } + + private static void ValidateGetCluster(AzureHDInsightCluster cluster) + { + Assert.AreEqual(TestCredentials.WellKnownCluster.DnsName, cluster.Name); + Assert.AreEqual(TestCredentials.WellKnownCluster.Version, cluster.Version); + WabStorageAccountConfiguration defaultStorageAccount = GetWellKnownStorageAccounts().First(); + Assert.AreEqual(defaultStorageAccount.Key, cluster.DefaultStorageAccount.StorageAccountKey); + Assert.AreEqual(defaultStorageAccount.Name, cluster.DefaultStorageAccount.StorageAccountName); + Assert.AreEqual(defaultStorageAccount.Container, cluster.DefaultStorageAccount.StorageContainerName); + foreach (WabStorageAccountConfiguration account in GetWellKnownStorageAccounts().Skip(1)) + { + AzureHDInsightStorageAccount deserializedAccount = + cluster.StorageAccounts.FirstOrDefault(acc => acc.StorageAccountName == account.Name); + Assert.IsNotNull(deserializedAccount, account.Name); + Assert.AreEqual(account.Key, deserializedAccount.StorageAccountKey); + } + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/NewClusterCmdletTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/NewClusterCmdletTests.cs new file mode 100644 index 000000000000..4f7a09a448ae --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/NewClusterCmdletTests.cs @@ -0,0 +1,767 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Interfaces; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Simulators; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities; +using Microsoft.WindowsAzure.Management.HDInsight; +using Microsoft.WindowsAzure.Management.HDInsight.ClusterProvisioning.Data; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Logging; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests +{ + [TestClass] + public class NewClusterCmdletTests : HDInsightTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + [TestCategory("PowerShell")] + + public void ICanAddMultipleStorageAccountsUsingPowerShell() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + string dnsName = this.GetRandomClusterName(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + var additionalStorageAccount = new WabStorageAccountConfiguration( + TestCredentials.Environments[0].AdditionalStorageAccounts[0].Name, + TestCredentials.Environments[0].AdditionalStorageAccounts[0].Key); + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightClusterConfig) + .WithParameter(CmdletConstants.ClusterSizeInNodes, 3) + .AddCommand(CmdletConstants.SetAzureHDInsightDefaultStorage) + .WithParameter(CmdletConstants.StorageAccountName, TestCredentials.Environments[0].DefaultStorageAccount.Name) + .WithParameter(CmdletConstants.StorageAccountKey, TestCredentials.Environments[0].DefaultStorageAccount.Key) + .WithParameter(CmdletConstants.StorageContainerName, TestCredentials.Environments[0].DefaultStorageAccount.Container) + .AddCommand(CmdletConstants.AddAzureHDInsightStorage) + .WithParameter(CmdletConstants.StorageAccountName, additionalStorageAccount.Name) + .WithParameter(CmdletConstants.StorageAccountKey, additionalStorageAccount.Key) + .AddCommand(CmdletConstants.NewAzureHDInsightCluster) + .WithParameter(CmdletConstants.Name, dnsName) + .WithParameter(CmdletConstants.Location, CmdletConstants.EastUs) + .WithParameter(CmdletConstants.Credential, GetPSCredential("hadoop", this.GetRandomValidPassword())) + .Invoke(); + + Assert.AreEqual(1, results.Results.Count); + Assert.AreEqual(dnsName, results.Results.ToEnumerable().First().Name); + + IGetAzureHDInsightClusterCommand getCommand = ServiceLocator.Instance.Locate().CreateGet(); + getCommand.CurrentSubscription = GetCurrentSubscription(); + getCommand.Name = dnsName; + + getCommand.EndProcessing(); + Assert.AreEqual(1, getCommand.Output.Count); + Assert.AreEqual(dnsName, getCommand.Output.ElementAt(0).Name); + + List storageAccounts = getCommand.Output.Last().StorageAccounts.ToList(); + Assert.AreEqual(storageAccounts.Count, 1); + + AzureHDInsightStorageAccount additionalStorageAccountFromOutput = + storageAccounts.FirstOrDefault(acc => acc.StorageAccountName == additionalStorageAccount.Name); + Assert.IsNotNull(additionalStorageAccountFromOutput); + Assert.AreEqual(additionalStorageAccount.Key, additionalStorageAccountFromOutput.StorageAccountKey); + + results = runspace.NewPipeline().AddCommand(CmdletConstants.RemoveAzureHDInsightCluster) + // Ensure that subscription id can be accepted as a sting as well as a guid. + .WithParameter(CmdletConstants.Name, dnsName) + .Invoke(); + + Assert.AreEqual(0, results.Results.Count); + + + getCommand = ServiceLocator.Instance.Locate().CreateGet(); + getCommand.CurrentSubscription = GetCurrentSubscription(); + getCommand.Name = dnsName; + getCommand.EndProcessing(); + Assert.AreEqual(0, getCommand.Output.Count); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + [TestCategory("PowerShell")] + + public void ICanCreateAClusterUsingPowerShell() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + string dnsName = this.GetRandomClusterName(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightCluster) + // Ensure that the subscription Id can be accepted as a string as well as a guid. + .WithParameter(CmdletConstants.Name, dnsName) + .WithParameter(CmdletConstants.Location, CmdletConstants.EastUs) + .WithParameter( + CmdletConstants.DefaultStorageAccountName, + TestCredentials.Environments[0].DefaultStorageAccount.Name) + .WithParameter( + CmdletConstants.DefaultStorageAccountKey, + TestCredentials.Environments[0].DefaultStorageAccount.Key) + .WithParameter( + CmdletConstants.DefaultStorageContainerName, + TestCredentials.Environments[0].DefaultStorageAccount.Container) + .WithParameter(CmdletConstants.Credential, GetPSCredential("hadoop", this.GetRandomValidPassword())) + .WithParameter(CmdletConstants.ClusterSizeInNodes, 3) + .WithParameter(CmdletConstants.HeadNodeVMSize, NodeVMSize.ExtraLarge) + .WithParameter(CmdletConstants.ClusterType, ClusterType.Hadoop) + .WithParameter(CmdletConstants.VirtualNetworkId, Guid.NewGuid().ToString()) + .WithParameter(CmdletConstants.SubnetName, "fakeSubnet") + .Invoke(); + + Assert.AreEqual(1, results.Results.Count); + Assert.AreEqual(dnsName, results.Results.ToEnumerable().First().Name); + + IGetAzureHDInsightClusterCommand getCommand = ServiceLocator.Instance.Locate().CreateGet(); + getCommand.CurrentSubscription = GetCurrentSubscription(); + getCommand.Name = dnsName; + + getCommand.EndProcessing(); + Assert.AreEqual(1, getCommand.Output.Count); + Assert.AreEqual(dnsName, getCommand.Output.ElementAt(0).Name); + + results = runspace.NewPipeline().AddCommand(CmdletConstants.RemoveAzureHDInsightCluster) + .WithParameter(CmdletConstants.Name, dnsName) + .Invoke(); + + Assert.AreEqual(0, results.Results.Count); + + getCommand = ServiceLocator.Instance.Locate().CreateGet(); + getCommand.CurrentSubscription = GetCurrentSubscription(); + getCommand.Name = dnsName; + + getCommand.EndProcessing(); + Assert.AreEqual(0, getCommand.Output.Count); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + [TestCategory("PowerShell")] + public void ICanCreateAClusterUsingPowerShellAndConfig() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + var coreConfig = new Hashtable(); + coreConfig.Add("hadoop.logfile.size", "10000"); + + var yarnConfig = new Hashtable(); + yarnConfig.Add("yarn.fakevalue", "12345"); + + var hbaseConfig = new Hashtable(); + hbaseConfig.Add("hbase.blob.size", "12345"); + + var hbaseServiceConfig = new AzureHDInsightHBaseConfiguration + { + Configuration = hbaseConfig, + AdditionalLibraries = + new AzureHDInsightDefaultStorageAccount + { + StorageAccountKey = Guid.NewGuid().ToString(), + StorageAccountName = Guid.NewGuid().ToString(), + StorageContainerName = Guid.NewGuid().ToString() + } + }; + + string dnsName = this.GetRandomClusterName(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IGetAzureHDInsightClusterCommand getCommand = ServiceLocator.Instance.Locate().CreateGet(); + getCommand = ServiceLocator.Instance.Locate().CreateGet(); + getCommand.CurrentSubscription = GetCurrentSubscription(); + getCommand.EndProcessing(); + int expected = getCommand.Output.Count(); + + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightClusterConfig) + .WithParameter(CmdletConstants.ClusterSizeInNodes, 3) + .WithParameter(CmdletConstants.HeadNodeVMSize, NodeVMSize.Large) + .WithParameter(CmdletConstants.ClusterType, ClusterType.HBase) + .WithParameter(CmdletConstants.VirtualNetworkId, Guid.NewGuid().ToString()) + .WithParameter(CmdletConstants.SubnetName, "fakeSubnet") + .AddCommand(CmdletConstants.SetAzureHDInsightDefaultStorage) + .WithParameter(CmdletConstants.StorageAccountName, TestCredentials.Environments[0].DefaultStorageAccount.Name) + .WithParameter(CmdletConstants.StorageAccountKey, TestCredentials.Environments[0].DefaultStorageAccount.Key) + .WithParameter(CmdletConstants.StorageContainerName, TestCredentials.Environments[0].DefaultStorageAccount.Container) + .AddCommand(CmdletConstants.AddAzureHDInsightConfigValues) + .WithParameter(CmdletConstants.CoreConfig, coreConfig) + .WithParameter(CmdletConstants.YarnConfig, yarnConfig) + .WithParameter(CmdletConstants.HBaseConfig, hbaseServiceConfig) + .AddCommand(CmdletConstants.NewAzureHDInsightCluster) + // Ensure that the subscription Id can be accepted as a guid as well as a string. + .WithParameter(CmdletConstants.Name, dnsName) + .WithParameter(CmdletConstants.Version, TestCredentials.WellKnownCluster.Version) + .WithParameter(CmdletConstants.Location, CmdletConstants.EastUs) + .WithParameter(CmdletConstants.Credential, GetPSCredential("hadoop", this.GetRandomValidPassword())) + .Invoke(); + + Assert.AreEqual(1, results.Results.Count); + Assert.AreEqual(dnsName, results.Results.ToEnumerable().First().Name); + + getCommand = ServiceLocator.Instance.Locate().CreateGet(); + getCommand.CurrentSubscription = GetCurrentSubscription(); + getCommand.Name = dnsName; + + getCommand.EndProcessing(); + Assert.AreEqual(1, getCommand.Output.Count); + Assert.AreEqual(dnsName, getCommand.Output.ElementAt(0).Name); + + results = runspace.NewPipeline().AddCommand(CmdletConstants.RemoveAzureHDInsightCluster) + // Ensure that subscription id can be accepted as a sting as well as a guid. + .WithParameter(CmdletConstants.Name, dnsName) + .Invoke(); + + Assert.AreEqual(0, results.Results.Count); + + getCommand = ServiceLocator.Instance.Locate().CreateGet(); + getCommand.CurrentSubscription = GetCurrentSubscription(); + + getCommand.EndProcessing(); + Assert.AreEqual(expected, getCommand.Output.Count); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + [TestCategory("PowerShell")] + public void ICanCreateAClusterUsingPowerShellAndConfigWithAnStorageAccountAfterTheSet() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + string dnsName = this.GetRandomClusterName(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IGetAzureHDInsightClusterCommand getCommand = ServiceLocator.Instance.Locate().CreateGet(); + getCommand = ServiceLocator.Instance.Locate().CreateGet(); + getCommand.CurrentSubscription = GetCurrentSubscription(); + + getCommand.EndProcessing(); + int expected = getCommand.Output.Count(); + + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightClusterConfig) + .WithParameter(CmdletConstants.ClusterSizeInNodes, 3) + .AddCommand(CmdletConstants.SetAzureHDInsightDefaultStorage) + .WithParameter(CmdletConstants.StorageAccountName, TestCredentials.Environments[0].DefaultStorageAccount.Name) + .WithParameter(CmdletConstants.StorageAccountKey, TestCredentials.Environments[0].DefaultStorageAccount.Key) + .WithParameter(CmdletConstants.StorageContainerName, TestCredentials.Environments[0].DefaultStorageAccount.Container) + .AddCommand(CmdletConstants.AddAzureHDInsightStorage) + .WithParameter(CmdletConstants.StorageAccountName, TestCredentials.Environments[0].AdditionalStorageAccounts[0].Name) + .WithParameter(CmdletConstants.StorageAccountKey, TestCredentials.Environments[0].AdditionalStorageAccounts[0].Key) + .AddCommand(CmdletConstants.NewAzureHDInsightCluster) + // Ensure that the subscription Id can be accepted as a guid as well as a string. + .WithParameter(CmdletConstants.Name, dnsName) + .WithParameter(CmdletConstants.Location, CmdletConstants.EastUs) + .WithParameter(CmdletConstants.Credential, GetPSCredential("hadoop", this.GetRandomValidPassword())) + .Invoke(); + + Assert.AreEqual(1, results.Results.Count); + Assert.AreEqual(dnsName, results.Results.ToEnumerable().First().Name); + + getCommand = ServiceLocator.Instance.Locate().CreateGet(); + getCommand.CurrentSubscription = GetCurrentSubscription(); + getCommand.Name = dnsName; + + getCommand.EndProcessing(); + Assert.AreEqual(1, getCommand.Output.Count); + Assert.AreEqual(dnsName, getCommand.Output.ElementAt(0).Name); + + results = runspace.NewPipeline().AddCommand(CmdletConstants.RemoveAzureHDInsightCluster) + // Ensure that subscription id can be accepted as a sting as well as a guid. + .WithParameter(CmdletConstants.Name, dnsName) + .Invoke(); + + Assert.AreEqual(0, results.Results.Count); + getCommand = ServiceLocator.Instance.Locate().CreateGet(); + getCommand.CurrentSubscription = GetCurrentSubscription(); + + getCommand.EndProcessing(); + Assert.AreEqual(expected, getCommand.Output.Count); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + [TestCategory("PowerShell")] + + public void ICanCreateAClusterUsingPowerShellAndConfigWithAnStorageAccountBeforeTheSet() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + string dnsName = this.GetRandomClusterName(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IGetAzureHDInsightClusterCommand getCommand = ServiceLocator.Instance.Locate().CreateGet(); + getCommand = ServiceLocator.Instance.Locate().CreateGet(); + getCommand.CurrentSubscription = GetCurrentSubscription(); + + getCommand.EndProcessing(); + int expected = getCommand.Output.Count(); + + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightClusterConfig) + .WithParameter(CmdletConstants.ClusterSizeInNodes, 3) + .AddCommand(CmdletConstants.AddAzureHDInsightStorage) + .WithParameter(CmdletConstants.StorageAccountName, TestCredentials.Environments[0].AdditionalStorageAccounts[0].Name) + .WithParameter(CmdletConstants.StorageAccountKey, TestCredentials.Environments[0].AdditionalStorageAccounts[0].Key) + .AddCommand(CmdletConstants.SetAzureHDInsightDefaultStorage) + .WithParameter(CmdletConstants.StorageAccountName, TestCredentials.Environments[0].DefaultStorageAccount.Name) + .WithParameter(CmdletConstants.StorageAccountKey, TestCredentials.Environments[0].DefaultStorageAccount.Key) + .WithParameter(CmdletConstants.StorageContainerName, TestCredentials.Environments[0].DefaultStorageAccount.Container) + .AddCommand(CmdletConstants.NewAzureHDInsightCluster) + // Ensure that the subscription Id can be accepted as a guid as well as a string. + .WithParameter(CmdletConstants.Name, dnsName) + .WithParameter(CmdletConstants.Location, CmdletConstants.EastUs) + .WithParameter(CmdletConstants.Credential, GetPSCredential("hadoop", this.GetRandomValidPassword())) + .Invoke(); + + Assert.AreEqual(1, results.Results.Count); + Assert.AreEqual(dnsName, results.Results.ToEnumerable().First().Name); + + getCommand = ServiceLocator.Instance.Locate().CreateGet(); + getCommand.CurrentSubscription = GetCurrentSubscription(); + getCommand.Name = dnsName; + + getCommand.EndProcessing(); + Assert.AreEqual(1, getCommand.Output.Count); + Assert.AreEqual(dnsName, getCommand.Output.ElementAt(0).Name); + + results = runspace.NewPipeline().AddCommand(CmdletConstants.RemoveAzureHDInsightCluster) + // Ensure that subscription id can be accepted as a sting as well as a guid. + .WithParameter(CmdletConstants.Name, dnsName) + .Invoke(); + + Assert.AreEqual(0, results.Results.Count); + getCommand = ServiceLocator.Instance.Locate().CreateGet(); + getCommand.CurrentSubscription = GetCurrentSubscription(); + + getCommand.EndProcessing(); + Assert.AreEqual(expected, getCommand.Output.Count); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + [TestCategory("PowerShell")] + + public void ICanCreateAClusterUsingPowerShellAndConfig_New_Set_Add_Hive_Oozie() + { + AzureTestCredentials creds = GetCredentials(TestCredentialsNames.Default); + string dnsName = this.GetRandomClusterName(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IGetAzureHDInsightClusterCommand getCommand = ServiceLocator.Instance.Locate().CreateGet(); + getCommand = ServiceLocator.Instance.Locate().CreateGet(); + getCommand.CurrentSubscription = GetCurrentSubscription(); + + getCommand.EndProcessing(); + int expected = getCommand.Output.Count(); + + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightClusterConfig) + .WithParameter(CmdletConstants.ClusterSizeInNodes, 3) + .AddCommand(CmdletConstants.SetAzureHDInsightDefaultStorage) + .WithParameter(CmdletConstants.StorageAccountName, creds.Environments[0].DefaultStorageAccount.Name) + .WithParameter(CmdletConstants.StorageAccountKey, creds.Environments[0].DefaultStorageAccount.Key) + .WithParameter(CmdletConstants.StorageContainerName, creds.Environments[0].DefaultStorageAccount.Container) + .AddCommand(CmdletConstants.AddAzureHDInsightStorage) + .WithParameter(CmdletConstants.StorageAccountName, creds.Environments[0].AdditionalStorageAccounts[0].Name) + .WithParameter(CmdletConstants.StorageAccountKey, creds.Environments[0].AdditionalStorageAccounts[0].Key) + .AddCommand(CmdletConstants.AddAzureHDInsightMetastore) + .WithParameter(CmdletConstants.SqlAzureServerName, creds.Environments[0].HiveStores[0].SqlServer) + .WithParameter(CmdletConstants.DatabaseName, creds.Environments[0].HiveStores[0].Database) + .WithParameter(CmdletConstants.Credential, GetPSCredential(creds.AzureUserName, creds.AzurePassword)) + .WithParameter(CmdletConstants.MetastoreType, AzureHDInsightMetastoreType.HiveMetastore) + .AddCommand(CmdletConstants.AddAzureHDInsightMetastore) + .WithParameter(CmdletConstants.SqlAzureServerName, creds.Environments[0].OozieStores[0].SqlServer) + .WithParameter(CmdletConstants.DatabaseName, creds.Environments[0].OozieStores[0].Database) + .WithParameter(CmdletConstants.Credential, GetPSCredential(creds.AzureUserName, creds.AzurePassword)) + .WithParameter(CmdletConstants.MetastoreType, AzureHDInsightMetastoreType.OozieMetastore) + .AddCommand(CmdletConstants.NewAzureHDInsightCluster) + // Ensure that the subscription Id can be accepted as a guid as well as a string. + .WithParameter(CmdletConstants.Name, dnsName) + .WithParameter(CmdletConstants.Location, CmdletConstants.EastUs) + .WithParameter(CmdletConstants.Credential, GetPSCredential("hadoop", this.GetRandomValidPassword())) + .Invoke(); + + ClusterCreateParameters request = AzureHDInsightClusterManagementClientSimulator.LastCreateRequest; + Assert.IsNotNull(request.HiveMetastore); + Assert.IsNotNull(request.OozieMetastore); + + Assert.AreEqual(1, results.Results.Count); + Assert.AreEqual(dnsName, results.Results.ToEnumerable().First().Name); + + getCommand = ServiceLocator.Instance.Locate().CreateGet(); + getCommand.CurrentSubscription = GetCurrentSubscription(); + getCommand.Name = dnsName; + + getCommand.EndProcessing(); + Assert.AreEqual(1, getCommand.Output.Count); + Assert.AreEqual(dnsName, getCommand.Output.ElementAt(0).Name); + + results = runspace.NewPipeline().AddCommand(CmdletConstants.RemoveAzureHDInsightCluster) + // Ensure that subscription id can be accepted as a sting as well as a guid. + .WithParameter(CmdletConstants.Name, dnsName) + .Invoke(); + + Assert.AreEqual(0, results.Results.Count); + getCommand = ServiceLocator.Instance.Locate().CreateGet(); + getCommand.CurrentSubscription = GetCurrentSubscription(); + getCommand.EndProcessing(); + Assert.AreEqual(expected, getCommand.Output.Count); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + [TestCategory("PowerShell")] + public void ICanCreateAClusterUsingPowerShellAndConfig_New_Set_Add_Hive_Oozie_And_CoreConfig() + { + AzureTestCredentials creds = GetCredentials(TestCredentialsNames.Default); + + string dnsName = this.GetRandomClusterName(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IGetAzureHDInsightClusterCommand getCommand = ServiceLocator.Instance.Locate().CreateGet(); + getCommand = ServiceLocator.Instance.Locate().CreateGet(); + getCommand.CurrentSubscription = GetCurrentSubscription(); + + getCommand.EndProcessing(); + int expected = getCommand.Output.Count(); + + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightClusterConfig) + .WithParameter(CmdletConstants.ClusterSizeInNodes, 3) + .AddCommand(CmdletConstants.SetAzureHDInsightDefaultStorage) + .WithParameter(CmdletConstants.StorageAccountName, creds.Environments[0].DefaultStorageAccount.Name) + .WithParameter(CmdletConstants.StorageAccountKey, creds.Environments[0].DefaultStorageAccount.Key) + .WithParameter(CmdletConstants.StorageContainerName, creds.Environments[0].DefaultStorageAccount.Container) + .AddCommand(CmdletConstants.AddAzureHDInsightStorage) + .WithParameter(CmdletConstants.StorageAccountName, creds.Environments[0].AdditionalStorageAccounts[0].Name) + .WithParameter(CmdletConstants.StorageAccountKey, creds.Environments[0].AdditionalStorageAccounts[0].Key) + .AddCommand(CmdletConstants.AddAzureHDInsightMetastore) + .WithParameter(CmdletConstants.SqlAzureServerName, creds.Environments[0].HiveStores[0].SqlServer) + .WithParameter(CmdletConstants.DatabaseName, creds.Environments[0].HiveStores[0].Database) + .WithParameter(CmdletConstants.Credential, GetPSCredential(creds.AzureUserName, creds.AzurePassword)) + .WithParameter(CmdletConstants.MetastoreType, AzureHDInsightMetastoreType.HiveMetastore) + .AddCommand(CmdletConstants.AddAzureHDInsightMetastore) + .WithParameter(CmdletConstants.SqlAzureServerName, creds.Environments[0].OozieStores[0].SqlServer) + .WithParameter(CmdletConstants.DatabaseName, creds.Environments[0].OozieStores[0].Database) + .WithParameter(CmdletConstants.Credential, GetPSCredential(creds.AzureUserName, creds.AzurePassword)) + .WithParameter(CmdletConstants.MetastoreType, AzureHDInsightMetastoreType.OozieMetastore) + .AddCommand(CmdletConstants.NewAzureHDInsightCluster) + .WithParameter(CmdletConstants.Name, dnsName) + .WithParameter(CmdletConstants.Location, CmdletConstants.EastUs) + .WithParameter(CmdletConstants.Credential, GetPSCredential("hadoop", this.GetRandomValidPassword())) + .Invoke(); + + ClusterCreateParameters request = AzureHDInsightClusterManagementClientSimulator.LastCreateRequest; + Assert.IsNotNull(request.HiveMetastore); + Assert.IsNotNull(request.OozieMetastore); + + Assert.AreEqual(1, results.Results.Count); + Assert.AreEqual(dnsName, results.Results.ToEnumerable().First().Name); + getCommand = ServiceLocator.Instance.Locate().CreateGet(); + getCommand.CurrentSubscription = GetCurrentSubscription(); + getCommand.Name = dnsName; + + getCommand.EndProcessing(); + Assert.AreEqual(1, getCommand.Output.Count); + Assert.AreEqual(dnsName, getCommand.Output.ElementAt(0).Name); + + results = runspace.NewPipeline().AddCommand(CmdletConstants.RemoveAzureHDInsightCluster) + .WithParameter(CmdletConstants.Name, dnsName) + .Invoke(); + + Assert.AreEqual(0, results.Results.Count); + getCommand = ServiceLocator.Instance.Locate().CreateGet(); + getCommand.CurrentSubscription = GetCurrentSubscription(); + + getCommand.EndProcessing(); + Assert.AreEqual(expected, getCommand.Output.Count); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + [TestCategory("PowerShell")] + public void ICanCreateAClusterUsingPowerShellAndConfig_New_Set_Add_ScriptAction() + { + AzureTestCredentials creds = GetCredentials(TestCredentialsNames.Default); + + string dnsName = this.GetRandomClusterName(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IGetAzureHDInsightClusterCommand getCommand = ServiceLocator.Instance.Locate().CreateGet(); + getCommand = ServiceLocator.Instance.Locate().CreateGet(); + getCommand.CurrentSubscription = GetCurrentSubscription(); + + getCommand.EndProcessing(); + int expected = getCommand.Output.Count(); + + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightClusterConfig) + .WithParameter(CmdletConstants.ClusterSizeInNodes, 3) + .AddCommand(CmdletConstants.SetAzureHDInsightDefaultStorage) + .WithParameter(CmdletConstants.StorageAccountName, creds.Environments[0].DefaultStorageAccount.Name) + .WithParameter(CmdletConstants.StorageAccountKey, creds.Environments[0].DefaultStorageAccount.Key) + .WithParameter(CmdletConstants.StorageContainerName, creds.Environments[0].DefaultStorageAccount.Container) + .AddCommand(CmdletConstants.AddAzureHDInsightStorage) + .WithParameter(CmdletConstants.StorageAccountName, creds.Environments[0].AdditionalStorageAccounts[0].Name) + .WithParameter(CmdletConstants.StorageAccountKey, creds.Environments[0].AdditionalStorageAccounts[0].Key) + .AddCommand(CmdletConstants.AddAzureHDInsightScriptAction) + .WithParameter(CmdletConstants.ConfigActionName, "test1") + .WithParameter(CmdletConstants.ConfigActionClusterRoleCollection, "HeadNode") + .WithParameter(CmdletConstants.ScriptActionUri, "http://test1.com") + .WithParameter(CmdletConstants.ScriptActionParameters, "test1parameters") + .AddCommand(CmdletConstants.AddAzureHDInsightScriptAction) + .WithParameter(CmdletConstants.ConfigActionName, "test2") + .WithParameter(CmdletConstants.ConfigActionClusterRoleCollection, "HeadNode") + .WithParameter(CmdletConstants.ScriptActionUri, "http://test2.com") + .WithParameter(CmdletConstants.ScriptActionParameters, "test2parameters") + .AddCommand(CmdletConstants.NewAzureHDInsightCluster) + .WithParameter(CmdletConstants.Name, dnsName) + .WithParameter(CmdletConstants.Location, CmdletConstants.EastUs) + .WithParameter(CmdletConstants.Credential, GetPSCredential("hadoop", this.GetRandomValidPassword())) + .Invoke(); + + ClusterCreateParameters request = AzureHDInsightClusterManagementClientSimulator.LastCreateRequest; + Assert.IsTrue(request.ConfigActions != null && request.ConfigActions.Count == 2); + Assert.IsTrue( + request.ConfigActions.ElementAt(0).Name == "test1" && + request.ConfigActions.ElementAt(1).Name == "test2"); + Assert.IsTrue( + request.ConfigActions.ElementAt(0).ClusterRoleCollection.Count == 1 && + request.ConfigActions.ElementAt(1).ClusterRoleCollection.Count == 1); + + Assert.AreEqual(1, results.Results.Count); + Assert.AreEqual(dnsName, results.Results.ToEnumerable().First().Name); + getCommand = ServiceLocator.Instance.Locate().CreateGet(); + getCommand.CurrentSubscription = GetCurrentSubscription(); + getCommand.Name = dnsName; + + getCommand.EndProcessing(); + Assert.AreEqual(1, getCommand.Output.Count); + Assert.AreEqual(dnsName, getCommand.Output.ElementAt(0).Name); + + results = runspace.NewPipeline().AddCommand(CmdletConstants.RemoveAzureHDInsightCluster) + .WithParameter(CmdletConstants.Name, dnsName) + .Invoke(); + + Assert.AreEqual(0, results.Results.Count); + getCommand = ServiceLocator.Instance.Locate().CreateGet(); + getCommand.CurrentSubscription = GetCurrentSubscription(); + + getCommand.EndProcessing(); + Assert.AreEqual(expected, getCommand.Output.Count); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + [TestCategory("PowerShell")] + public void ICanCreateAClusterUsingPowerShellAndConfig_WithDebug() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + var coreConfig = new Hashtable(); + coreConfig.Add("hadoop.logfile.size", "10000"); + + string dnsName = this.GetRandomClusterName(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + var getCommandLogWriter = new PowershellLogWriter(); + BufferingLogWriterFactory.Instance = getCommandLogWriter; + IGetAzureHDInsightClusterCommand getCommand = ServiceLocator.Instance.Locate().CreateGet(); + getCommand = ServiceLocator.Instance.Locate().CreateGet(); + getCommand.CurrentSubscription = GetCurrentSubscription(); + getCommand.Logger = getCommandLogWriter; + getCommand.EndProcessing(); + int expected = getCommand.Output.Count(); + + string expectedLogMessage = "Getting hdinsight clusters for subscriptionid : " + creds.SubscriptionId.ToString(); + Assert.IsTrue(getCommandLogWriter.Buffer.Any(message => message.Contains(expectedLogMessage))); + BufferingLogWriterFactory.Reset(); + + var newClusterCommandLogWriter = new PowershellLogWriter(); + BufferingLogWriterFactory.Instance = newClusterCommandLogWriter; + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightClusterConfig) + .WithParameter(CmdletConstants.ClusterSizeInNodes, 3) + .AddCommand(CmdletConstants.SetAzureHDInsightDefaultStorage) + .WithParameter(CmdletConstants.StorageAccountName, TestCredentials.Environments[0].DefaultStorageAccount.Name) + .WithParameter(CmdletConstants.StorageAccountKey, TestCredentials.Environments[0].DefaultStorageAccount.Key) + .WithParameter(CmdletConstants.StorageContainerName, TestCredentials.Environments[0].DefaultStorageAccount.Container) + .AddCommand(CmdletConstants.AddAzureHDInsightConfigValues) + .WithParameter(CmdletConstants.CoreConfig, coreConfig) + .AddCommand(CmdletConstants.NewAzureHDInsightCluster) + .WithParameter(CmdletConstants.Name, dnsName) + .WithParameter(CmdletConstants.Debug, null) + .WithParameter(CmdletConstants.Version, TestCredentials.WellKnownCluster.Version) + .WithParameter(CmdletConstants.Location, CmdletConstants.EastUs) + .WithParameter(CmdletConstants.Credential, GetPSCredential("hadoop", this.GetRandomValidPassword())) + .Invoke(); + + Assert.AreEqual(1, results.Results.Count); + Assert.AreEqual(dnsName, results.Results.ToEnumerable().First().Name); + + expectedLogMessage = string.Format( + CultureInfo.InvariantCulture, "Creating cluster '{0}' in location {1}", dnsName, CmdletConstants.EastUs); + Assert.IsTrue(newClusterCommandLogWriter.Buffer.Any(message => message.Contains(expectedLogMessage))); + BufferingLogWriterFactory.Reset(); + + getCommand = ServiceLocator.Instance.Locate().CreateGet(); + getCommand.CurrentSubscription = GetCurrentSubscription(); + getCommand.Name = dnsName; + + getCommand.EndProcessing(); + Assert.AreEqual(1, getCommand.Output.Count); + Assert.AreEqual(dnsName, getCommand.Output.ElementAt(0).Name); + var deleteClusterCommandLogWriter = new PowershellLogWriter(); + BufferingLogWriterFactory.Instance = deleteClusterCommandLogWriter; + results = runspace.NewPipeline().AddCommand(CmdletConstants.RemoveAzureHDInsightCluster) + .WithParameter(CmdletConstants.Name, dnsName) + .WithParameter(CmdletConstants.Debug, null) + .Invoke(); + + Assert.AreEqual(0, results.Results.Count); + expectedLogMessage = string.Format( + CultureInfo.InvariantCulture, "Deleting cluster '{0}' in location {1}", dnsName, CmdletConstants.EastUs); + Assert.IsTrue(deleteClusterCommandLogWriter.Buffer.Any(message => message.Contains(expectedLogMessage))); + getCommand = ServiceLocator.Instance.Locate().CreateGet(); + getCommand.CurrentSubscription = GetCurrentSubscription(); + + getCommand.EndProcessing(); + Assert.AreEqual(expected, getCommand.Output.Count); + BufferingLogWriterFactory.Reset(); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + [TestCategory("PowerShell")] + + public void ICanCreateAClusterWithThreeOrMoreAsvAccountsUsingPowerShell() + { + string dnsName = this.GetRandomClusterName(); + var storageAccounts = GetWellKnownStorageAccounts().ToList(); + Assert.IsTrue(storageAccounts.Count >= 3); + + IHDInsightCertificateCredential creds = GetValidCredentials(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightClusterConfig) + .WithParameter(CmdletConstants.ClusterSizeInNodes, 3) + .AddCommand(CmdletConstants.SetAzureHDInsightDefaultStorage) + .WithParameter(CmdletConstants.StorageAccountName, TestCredentials.Environments[0].DefaultStorageAccount.Name) + .WithParameter(CmdletConstants.StorageAccountKey, TestCredentials.Environments[0].DefaultStorageAccount.Key) + .WithParameter(CmdletConstants.StorageContainerName, TestCredentials.Environments[0].DefaultStorageAccount.Container) + .AddCommand(CmdletConstants.AddAzureHDInsightStorage) + .WithParameter(CmdletConstants.StorageAccountName, storageAccounts[0].Name) + .WithParameter(CmdletConstants.StorageAccountKey, storageAccounts[0].Key) + .AddCommand(CmdletConstants.AddAzureHDInsightStorage) + .WithParameter(CmdletConstants.StorageAccountName, storageAccounts[1].Name) + .WithParameter(CmdletConstants.StorageAccountKey, storageAccounts[1].Key) + .AddCommand(CmdletConstants.AddAzureHDInsightStorage) + .WithParameter(CmdletConstants.StorageAccountName, storageAccounts[2].Name) + .WithParameter(CmdletConstants.StorageAccountKey, storageAccounts[2].Key) + .AddCommand(CmdletConstants.NewAzureHDInsightCluster) + .WithParameter(CmdletConstants.Name, dnsName) + .WithParameter(CmdletConstants.Location, CmdletConstants.EastUs) + .WithParameter(CmdletConstants.Credential, GetPSCredential("hadoop", this.GetRandomValidPassword())) + .Invoke(); + + AzureHDInsightCluster clusterFromPowershell = results.Results.ToEnumerable().First(); + List storageAccountsFromPowershell = clusterFromPowershell.StorageAccounts.ToList(); + Assert.AreEqual(3, storageAccountsFromPowershell.Count); + + foreach (WabStorageAccountConfiguration storageAccount in storageAccounts) + { + AzureHDInsightStorageAccount additionalStorageAccountFromOutput = + storageAccountsFromPowershell.FirstOrDefault(acc => acc.StorageAccountName == storageAccount.Name); + Assert.IsNotNull(additionalStorageAccountFromOutput, "Storage account " + storageAccount.Name + " was not found"); + Assert.AreEqual(storageAccount.Key, additionalStorageAccountFromOutput.StorageAccountKey); + } + } + } + + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + [TestCategory("PowerShell")] + + public void ICannotDeleteANonExistantClusterUsingPowerShell() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + string invalidClusterName = Guid.NewGuid().ToString(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + try + { + runspace.NewPipeline() + .AddCommand(CmdletConstants.RemoveAzureHDInsightCluster) + .WithParameter(CmdletConstants.Name, invalidClusterName) + .Invoke(); + Assert.Fail("test failed"); + } + catch (CmdletInvocationException invokeException) + { + var invalidOperationException = invokeException.GetBaseException() as InvalidOperationException; + Assert.IsNotNull(invalidOperationException); + Assert.AreEqual("The cluster '" + invalidClusterName + "' doesn't exist.", invalidOperationException.Message); + } + } + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/NewHiveJobCmdLetTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/NewHiveJobCmdLetTests.cs new file mode 100644 index 000000000000..2e2d4f9142d1 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/NewHiveJobCmdLetTests.cs @@ -0,0 +1,311 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; +using Microsoft.Hadoop.Client; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Interfaces; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests +{ + [TestClass] + public class NewHiveJobCmdLetTests : HDInsightTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightHiveJobDefinition")] + public void ICanCallThe_New_HDInsightHiveJobDefinitionCmdlet() + { + var HiveJobDefinition = new HiveJobCreateParameters { JobName = "show tables jobDetails", Query = "show tables" }; + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightHiveJobDefinition) + .WithParameter(CmdletConstants.JobName, HiveJobDefinition.JobName) + .WithParameter(CmdletConstants.Query, HiveJobDefinition.Query) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightHiveJobDefinition HiveJobFromPowershell = results.Results.ToEnumerable().First(); + + Assert.AreEqual(HiveJobDefinition.JobName, HiveJobFromPowershell.JobName); + Assert.AreEqual(HiveJobDefinition.Query, HiveJobFromPowershell.Query); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightHiveJobDefinition")] + public void ICanCallThe_New_HDInsightHiveJobDefinitionCmdlet_WithArguments() + { + var HiveJobDefinition = new HiveJobCreateParameters { JobName = "show tables jobDetails", Query = "show tables" }; + HiveJobDefinition.Arguments.Add("arg 1"); + HiveJobDefinition.Arguments.Add("arg 2"); + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightHiveJobDefinition) + .WithParameter(CmdletConstants.JobName, HiveJobDefinition.JobName) + .WithParameter(CmdletConstants.Query, HiveJobDefinition.Query) + .WithParameter(CmdletConstants.HiveArgs, HiveJobDefinition.Arguments) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightHiveJobDefinition HiveJobFromPowershell = results.Results.ToEnumerable().First(); + + Assert.AreEqual(HiveJobDefinition.JobName, HiveJobFromPowershell.JobName); + Assert.AreEqual(HiveJobDefinition.Query, HiveJobFromPowershell.Query); + + foreach (string args in HiveJobDefinition.Arguments) + { + Assert.IsTrue( + HiveJobFromPowershell.Arguments.Any(arg => string.Equals(args, arg)), + "Unable to find argument '{0}' in value returned from powershell", + args); + } + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightHiveJobDefinition")] + public void ICanCallThe_New_HDInsightHiveJobDefinitionCmdlet_WithFileParameter() + { + var HiveJobDefinition = new HiveJobCreateParameters + { + JobName = "show tables jobDetails", + File = TestConstants.WabsProtocolSchemeName + "filepath.hql" + }; + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightHiveJobDefinition) + .WithParameter(CmdletConstants.JobName, HiveJobDefinition.JobName) + .WithParameter(CmdletConstants.File, HiveJobDefinition.File) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightHiveJobDefinition HiveJobFromPowershell = results.Results.ToEnumerable().First(); + + Assert.AreEqual(HiveJobDefinition.JobName, HiveJobFromPowershell.JobName); + Assert.AreEqual(HiveJobDefinition.File, HiveJobFromPowershell.File); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightHiveJobDefinition")] + [TestCategory("Defect")] + public void ICanCallThe_New_HDInsightHiveJobDefinitionCmdlet_WithOutputStorageLocation() + { + var HiveJobDefinition = new HiveJobCreateParameters + { + JobName = "show tables jobDetails", + Query = "show tables", + StatusFolder = "/tablesList" + }; + + HiveJobDefinition.Defines.Add("map.input.tasks", "1000"); + HiveJobDefinition.Defines.Add("map.input.reducers", "1000"); + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightHiveJobDefinition) + .WithParameter(CmdletConstants.JobName, HiveJobDefinition.JobName) + .WithParameter(CmdletConstants.Query, HiveJobDefinition.Query) + .WithParameter(CmdletConstants.Parameters, HiveJobDefinition.Defines) + .WithParameter(CmdletConstants.StatusFolder, HiveJobDefinition.StatusFolder) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightHiveJobDefinition HiveJobFromPowershell = results.Results.ToEnumerable().First(); + + Assert.AreEqual(HiveJobDefinition.JobName, HiveJobFromPowershell.JobName); + Assert.AreEqual(HiveJobDefinition.Query, HiveJobFromPowershell.Query); + Assert.AreEqual(HiveJobDefinition.StatusFolder, HiveJobFromPowershell.StatusFolder); + + foreach (var parameter in HiveJobDefinition.Defines) + { + Assert.IsTrue( + HiveJobFromPowershell.Defines.Any(arg => string.Equals(parameter.Key, arg.Key) && string.Equals(parameter.Value, arg.Value)), + "Unable to find parameter '{0}' in value returned from powershell", + parameter.Key); + } + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightHiveJobDefinition")] + public void ICanCallThe_New_HDInsightHiveJobDefinitionCmdlet_WithParameters() + { + var HiveJobDefinition = new HiveJobCreateParameters { JobName = "show tables jobDetails", Query = "show tables" }; + + HiveJobDefinition.Defines.Add("map.input.tasks", "1000"); + HiveJobDefinition.Defines.Add("map.input.reducers", "1000"); + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightHiveJobDefinition) + .WithParameter(CmdletConstants.JobName, HiveJobDefinition.JobName) + .WithParameter(CmdletConstants.Query, HiveJobDefinition.Query) + .WithParameter(CmdletConstants.Parameters, HiveJobDefinition.Defines) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightHiveJobDefinition HiveJobFromPowershell = results.Results.ToEnumerable().First(); + + Assert.AreEqual(HiveJobDefinition.JobName, HiveJobFromPowershell.JobName); + Assert.AreEqual(HiveJobDefinition.Query, HiveJobFromPowershell.Query); + + foreach (var parameter in HiveJobDefinition.Defines) + { + Assert.IsTrue( + HiveJobFromPowershell.Defines.Any(arg => string.Equals(parameter.Key, arg.Key) && string.Equals(parameter.Value, arg.Value)), + "Unable to find parameter '{0}' in value returned from powershell", + parameter.Key); + } + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightHiveJobDefinition")] + public void ICanCallThe_New_HDInsightHiveJobDefinitionCmdlet_WithResources() + { + var HiveJobDefinition = new HiveJobCreateParameters { JobName = "show tables jobDetails", Query = "show tables" }; + HiveJobDefinition.Files.Add("pidata.txt"); + HiveJobDefinition.Files.Add("pidate2.txt"); + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightHiveJobDefinition) + .WithParameter(CmdletConstants.JobName, HiveJobDefinition.JobName) + .WithParameter(CmdletConstants.Query, HiveJobDefinition.Query) + .WithParameter(CmdletConstants.Files, HiveJobDefinition.Files) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightHiveJobDefinition HiveJobFromPowershell = results.Results.ToEnumerable().First(); + + Assert.AreEqual(HiveJobDefinition.JobName, HiveJobFromPowershell.JobName); + Assert.AreEqual(HiveJobDefinition.Query, HiveJobFromPowershell.Query); + + foreach (string file in HiveJobDefinition.Files) + { + Assert.IsTrue( + HiveJobFromPowershell.Files.Any(arg => string.Equals(file, arg)), + "Unable to find File '{0}' in value returned from powershell", + file); + } + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightHiveJobDefinition")] + public void ICanCallThe_New_HDInsightHiveJobDefinitionCmdlet_WithoutJobName() + { + var HiveJobDefinition = new HiveJobCreateParameters { Query = "show tables" }; + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightHiveJobDefinition) + .WithParameter(CmdletConstants.Query, HiveJobDefinition.Query) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightHiveJobDefinition HiveJobFromPowershell = results.Results.ToEnumerable().First(); + + Assert.AreEqual(HiveJobDefinition.Query, HiveJobFromPowershell.Query); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightHiveJobDefinition")] + public void ICannotCallThe_New_HDInsightHiveJobDefinitionCmdlet_WithoutFileOrQueryParameter() + { + var HiveJobDefinition = new HiveJobCreateParameters + { + JobName = "show tables jobDetails", + File = TestConstants.WabsProtocolSchemeName + "filepath.hql" + }; + + try + { + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightHiveJobDefinition) + .WithParameter(CmdletConstants.JobName, HiveJobDefinition.JobName) + .Invoke(); + Assert.Fail("test failed."); + } + } + catch (CmdletInvocationException invokeException) + { + var psArgumentException = invokeException.GetBaseException() as PSArgumentException; + Assert.IsNotNull(psArgumentException); + Assert.AreEqual("Either File or Query should be specified for Hive jobs.", psArgumentException.Message); + } + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/NewMapReduceJobCmdLetTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/NewMapReduceJobCmdLetTests.cs new file mode 100644 index 000000000000..30be62d75410 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/NewMapReduceJobCmdLetTests.cs @@ -0,0 +1,328 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using Microsoft.Hadoop.Client; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Interfaces; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests +{ + [TestClass] + public class NewMapReduceJobCmdLetTests : HDInsightTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightMapReduceJobDefinition")] + public void ICanCallThe_New_HDInsightMapReduceJobDefinitionCmdlet() + { + var mapReduceJobDefinition = new MapReduceJobCreateParameters + { + JobName = "pi estimation jobDetails", + ClassName = "pi", + JarFile = TestConstants.WabsProtocolSchemeName + "container@hostname/examples.jar", + }; + + mapReduceJobDefinition.LibJars.Add("some.jarfile.jar"); + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightMapReduceJobDefinition) + .WithParameter(CmdletConstants.JobName, mapReduceJobDefinition.JobName) + .WithParameter(CmdletConstants.JarFile, mapReduceJobDefinition.JarFile) + .WithParameter(CmdletConstants.ClassName, mapReduceJobDefinition.ClassName) + .WithParameter(CmdletConstants.LibJars, mapReduceJobDefinition.LibJars) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightMapReduceJobDefinition mapReduceJobFromPowershell = + results.Results.ToEnumerable().First(); + + Assert.AreEqual(mapReduceJobDefinition.JobName, mapReduceJobFromPowershell.JobName); + Assert.AreEqual(mapReduceJobDefinition.ClassName, mapReduceJobFromPowershell.ClassName); + Assert.AreEqual(mapReduceJobDefinition.JarFile, mapReduceJobFromPowershell.JarFile); + Assert.AreEqual(mapReduceJobDefinition.LibJars.Count, mapReduceJobFromPowershell.LibJars.Count); + Assert.AreEqual(mapReduceJobDefinition.LibJars.First(), mapReduceJobFromPowershell.LibJars.First()); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightMapReduceJobDefinition")] + public void ICanCallThe_New_HDInsightMapReduceJobDefinitionCmdlet_WithArguments() + { + var mapReduceJobDefinition = new MapReduceJobCreateParameters + { + JobName = "pi estimation jobDetails", + ClassName = "pi", + JarFile = TestConstants.WabsProtocolSchemeName + "container@hostname/examples.jar" + }; + mapReduceJobDefinition.Arguments.Add("16"); + mapReduceJobDefinition.Arguments.Add("10000"); + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightMapReduceJobDefinition) + .WithParameter(CmdletConstants.JobName, mapReduceJobDefinition.JobName) + .WithParameter(CmdletConstants.JarFile, mapReduceJobDefinition.JarFile) + .WithParameter(CmdletConstants.ClassName, mapReduceJobDefinition.ClassName) + .WithParameter(CmdletConstants.Arguments, mapReduceJobDefinition.Arguments) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightMapReduceJobDefinition mapReduceJobFromPowershell = + results.Results.ToEnumerable().First(); + + Assert.AreEqual(mapReduceJobDefinition.JobName, mapReduceJobFromPowershell.JobName); + Assert.AreEqual(mapReduceJobDefinition.ClassName, mapReduceJobFromPowershell.ClassName); + Assert.AreEqual(mapReduceJobDefinition.JarFile, mapReduceJobFromPowershell.JarFile); + + foreach (string argument in mapReduceJobDefinition.Arguments) + { + Assert.IsTrue( + mapReduceJobFromPowershell.Arguments.Any(arg => string.Equals(argument, arg)), + "Unable to find argument '{0}' in value returned from powershell", + argument); + } + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightMapReduceJobDefinition")] + public void ICanCallThe_New_HDInsightMapReduceJobDefinitionCmdlet_WithLibJars() + { + var mapReduceJobDefinition = new MapReduceJobCreateParameters + { + JobName = "pi estimation jobDetails", + ClassName = "pi", + JarFile = TestConstants.WabsProtocolSchemeName + "container@hostname/examples.jar" + }; + mapReduceJobDefinition.LibJars.Add("pidata.jar"); + mapReduceJobDefinition.LibJars.Add("pidate2.jar"); + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightMapReduceJobDefinition) + .WithParameter(CmdletConstants.JobName, mapReduceJobDefinition.JobName) + .WithParameter(CmdletConstants.JarFile, mapReduceJobDefinition.JarFile) + .WithParameter(CmdletConstants.ClassName, mapReduceJobDefinition.ClassName) + .WithParameter(CmdletConstants.LibJars, mapReduceJobDefinition.LibJars) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightMapReduceJobDefinition mapReduceJobFromPowershell = + results.Results.ToEnumerable().First(); + + Assert.AreEqual(mapReduceJobDefinition.JobName, mapReduceJobFromPowershell.JobName); + Assert.AreEqual(mapReduceJobDefinition.ClassName, mapReduceJobFromPowershell.ClassName); + Assert.AreEqual(mapReduceJobDefinition.JarFile, mapReduceJobFromPowershell.JarFile); + + foreach (string libjar in mapReduceJobDefinition.LibJars) + { + Assert.IsTrue( + mapReduceJobFromPowershell.LibJars.Any(arg => string.Equals(libjar, arg)), + "Unable to find LibJar '{0}' in value returned from powershell", + libjar); + } + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightMapReduceJobDefinition")] + public void ICanCallThe_New_HDInsightMapReduceJobDefinitionCmdlet_WithOutputStorageLocation() + { + var mapReduceJobDefinition = new MapReduceJobCreateParameters + { + JobName = "pi estimation jobDetails", + ClassName = "pi", + JarFile = TestConstants.WabsProtocolSchemeName + "container@hostname/examples.jar", + StatusFolder = "/pilogs" + }; + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightMapReduceJobDefinition) + .WithParameter(CmdletConstants.JobName, mapReduceJobDefinition.JobName) + .WithParameter(CmdletConstants.JarFile, mapReduceJobDefinition.JarFile) + .WithParameter(CmdletConstants.ClassName, mapReduceJobDefinition.ClassName) + .WithParameter(CmdletConstants.StatusFolder, mapReduceJobDefinition.StatusFolder) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightMapReduceJobDefinition mapReduceJobFromPowershell = + results.Results.ToEnumerable().First(); + + Assert.AreEqual(mapReduceJobDefinition.JobName, mapReduceJobFromPowershell.JobName); + Assert.AreEqual(mapReduceJobDefinition.ClassName, mapReduceJobFromPowershell.ClassName); + Assert.AreEqual(mapReduceJobDefinition.JarFile, mapReduceJobFromPowershell.JarFile); + Assert.AreEqual(mapReduceJobDefinition.StatusFolder, mapReduceJobFromPowershell.StatusFolder); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightMapReduceJobDefinition")] + public void ICanCallThe_New_HDInsightMapReduceJobDefinitionCmdlet_WithParameters() + { + var mapReduceJobDefinition = new MapReduceJobCreateParameters + { + JobName = "pi estimation jobDetails", + ClassName = "pi", + JarFile = TestConstants.WabsProtocolSchemeName + "container@hostname/examples.jar" + }; + + mapReduceJobDefinition.Defines.Add("map.input.tasks", "1000"); + mapReduceJobDefinition.Defines.Add("map.input.reducers", "1000"); + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightMapReduceJobDefinition) + .WithParameter(CmdletConstants.JobName, mapReduceJobDefinition.JobName) + .WithParameter(CmdletConstants.JarFile, mapReduceJobDefinition.JarFile) + .WithParameter(CmdletConstants.ClassName, mapReduceJobDefinition.ClassName) + .WithParameter(CmdletConstants.Parameters, mapReduceJobDefinition.Defines) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightMapReduceJobDefinition mapReduceJobFromPowershell = + results.Results.ToEnumerable().First(); + + Assert.AreEqual(mapReduceJobDefinition.JobName, mapReduceJobFromPowershell.JobName); + Assert.AreEqual(mapReduceJobDefinition.ClassName, mapReduceJobFromPowershell.ClassName); + Assert.AreEqual(mapReduceJobDefinition.JarFile, mapReduceJobFromPowershell.JarFile); + + foreach (var parameter in mapReduceJobDefinition.Defines) + { + Assert.IsTrue( + mapReduceJobFromPowershell.Defines.Any( + arg => string.Equals(parameter.Key, arg.Key) && string.Equals(parameter.Value, arg.Value)), + "Unable to find parameter '{0}' in value returned from powershell", + parameter.Key); + } + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightMapReduceJobDefinition")] + public void ICanCallThe_New_HDInsightMapReduceJobDefinitionCmdlet_WithResources() + { + var mapReduceJobDefinition = new MapReduceJobCreateParameters + { + JobName = "pi estimation jobDetails", + ClassName = "pi", + JarFile = TestConstants.WabsProtocolSchemeName + "container@hostname/examples.jar" + }; + mapReduceJobDefinition.Files.Add("pidata.txt"); + mapReduceJobDefinition.Files.Add("pidate2.txt"); + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightMapReduceJobDefinition) + .WithParameter(CmdletConstants.JobName, mapReduceJobDefinition.JobName) + .WithParameter(CmdletConstants.JarFile, mapReduceJobDefinition.JarFile) + .WithParameter(CmdletConstants.ClassName, mapReduceJobDefinition.ClassName) + .WithParameter(CmdletConstants.Files, mapReduceJobDefinition.Files) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightMapReduceJobDefinition mapReduceJobFromPowershell = + results.Results.ToEnumerable().First(); + + Assert.AreEqual(mapReduceJobDefinition.JobName, mapReduceJobFromPowershell.JobName); + Assert.AreEqual(mapReduceJobDefinition.ClassName, mapReduceJobFromPowershell.ClassName); + Assert.AreEqual(mapReduceJobDefinition.JarFile, mapReduceJobFromPowershell.JarFile); + + foreach (string file in mapReduceJobDefinition.Files) + { + Assert.IsTrue( + mapReduceJobFromPowershell.Files.Any(arg => string.Equals(file, arg)), + "Unable to find File '{0}' in value returned from powershell", + file); + } + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightMapReduceJobDefinition")] + public void ICanCallThe_New_HDInsightMapReduceJobDefinitionCmdlet_WithoutJobName() + { + var mapReduceJobDefinition = new MapReduceJobCreateParameters + { + ClassName = "pi", + JarFile = TestConstants.WabsProtocolSchemeName + "container@hostname/examples.jar" + }; + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightMapReduceJobDefinition) + .WithParameter(CmdletConstants.JarFile, mapReduceJobDefinition.JarFile) + .WithParameter(CmdletConstants.ClassName, mapReduceJobDefinition.ClassName) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightMapReduceJobDefinition mapReduceJobFromPowershell = + results.Results.ToEnumerable().First(); + + Assert.AreEqual(mapReduceJobDefinition.ClassName, mapReduceJobFromPowershell.ClassName); + Assert.AreEqual(mapReduceJobDefinition.JarFile, mapReduceJobFromPowershell.JarFile); + } + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/NewPigJobCmdLetTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/NewPigJobCmdLetTests.cs new file mode 100644 index 000000000000..10e67d90ea42 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/NewPigJobCmdLetTests.cs @@ -0,0 +1,239 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; +using Microsoft.Hadoop.Client; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Interfaces; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests +{ + [TestClass] + public class NewPigJobCmdLetTests : HDInsightTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightPigJobDefinition")] + public void ICanCallThe_New_HDInsightPigJobDefinitionCmdlet() + { + var pigJobDefinition = new PigJobCreateParameters { Query = "load 'passwd' using PigStorage(':'); B = foreach A generate $0 as id;" }; + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightPigJobDefinition) + .WithParameter(CmdletConstants.Query, pigJobDefinition.Query) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightPigJobDefinition pigJobFromPowershell = results.Results.ToEnumerable().First(); + + Assert.AreEqual(pigJobDefinition.Query, pigJobFromPowershell.Query); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightPigJobDefinition")] + public void ICanCallThe_New_HDInsightPigJobDefinitionCmdlet_WithArguments() + { + var pigJobDefinition = new PigJobCreateParameters { File = TestConstants.WabsProtocolSchemeName + "container@accountname/pigquery.q" }; + + pigJobDefinition.Arguments.Add("map.input.tasks=1000"); + pigJobDefinition.Arguments.Add("map.input.reducers=1000"); + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightPigJobDefinition) + .WithParameter(CmdletConstants.File, pigJobDefinition.File) + .WithParameter(CmdletConstants.Arguments, pigJobDefinition.Arguments) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightPigJobDefinition pigJobFromPowershell = results.Results.ToEnumerable().First(); + + Assert.AreEqual(pigJobDefinition.File, pigJobFromPowershell.File); + + foreach (string argument in pigJobDefinition.Arguments) + { + Assert.IsTrue( + pigJobFromPowershell.Arguments.Any(arg => string.Equals(argument, arg)), + string.Format("Unable to find parameter '{0}' in value returned from powershell", argument)); + } + } + } + + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightPigJobDefinition")] + public void ICanCallThe_New_HDInsightPigJobDefinitionCmdlet_WithOutputStorageLocation() + { + var pigJobDefinition = new PigJobCreateParameters + { + Query = "load 'passwd' using PigStorage(':'); B = foreach A generate $0 as id;", + StatusFolder = "/passwordlogs" + }; + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightPigJobDefinition) + .WithParameter(CmdletConstants.Query, pigJobDefinition.Query) + .WithParameter(CmdletConstants.StatusFolder, pigJobDefinition.StatusFolder) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightPigJobDefinition pigJobFromPowershell = results.Results.ToEnumerable().First(); + + Assert.AreEqual(pigJobDefinition.Query, pigJobFromPowershell.Query); + Assert.AreEqual(pigJobDefinition.StatusFolder, pigJobFromPowershell.StatusFolder); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightPigJobDefinition")] + public void ICanCallThe_New_HDInsightPigJobDefinitionCmdlet_WithQueryFile() + { + var pigJobDefinition = new PigJobCreateParameters { File = TestConstants.WabsProtocolSchemeName + "container@accountname/pigquery.q" }; + + pigJobDefinition.Arguments.Add("map.input.tasks=1000"); + pigJobDefinition.Arguments.Add("map.input.reducers=1000"); + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightPigJobDefinition) + .WithParameter(CmdletConstants.File, pigJobDefinition.File) + .WithParameter(CmdletConstants.Arguments, pigJobDefinition.Arguments) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightPigJobDefinition pigJobFromPowershell = results.Results.ToEnumerable().First(); + + Assert.AreEqual(pigJobDefinition.File, pigJobFromPowershell.File); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightPigJobDefinition")] + public void ICanCallThe_New_HDInsightPigJobDefinitionCmdlet_WithResources() + { + var pigJobDefinition = new PigJobCreateParameters { Query = "load 'passwd' using PigStorage(':'); B = foreach A generate $0 as id;" }; + pigJobDefinition.Files.Add("pidata.txt"); + pigJobDefinition.Files.Add("pidate2.txt"); + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightPigJobDefinition) + .WithParameter(CmdletConstants.Query, pigJobDefinition.Query) + .WithParameter(CmdletConstants.Files, pigJobDefinition.Files) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightPigJobDefinition pigJobFromPowershell = results.Results.ToEnumerable().First(); + + Assert.AreEqual(pigJobDefinition.Query, pigJobFromPowershell.Query); + + foreach (string file in pigJobDefinition.Files) + { + Assert.IsTrue( + pigJobFromPowershell.Files.Any(arg => string.Equals(file, arg)), + "Unable to find File '{0}' in value returned from powershell", + file); + } + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightPigJobDefinition")] + public void ICanCallThe_New_HDInsightPigJobDefinitionCmdlet_WithoutJobName() + { + var pigJobDefinition = new PigJobCreateParameters { Query = "load 'passwd' using PigStorage(':'); B = foreach A generate $0 as id;" }; + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightPigJobDefinition) + .WithParameter(CmdletConstants.Query, pigJobDefinition.Query) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightPigJobDefinition pigJobFromPowershell = results.Results.ToEnumerable().First(); + + Assert.AreEqual(pigJobDefinition.Query, pigJobFromPowershell.Query); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightHiveJobDefinition")] + public void ICannotCallThe_New_HDInsightPigJobDefinitionCmdlet_WithoutFileOrQueryParameter() + { + try + { + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + runspace.NewPipeline().AddCommand(CmdletConstants.NewAzureHDInsightPigJobDefinition).Invoke(); + Assert.Fail("test failed."); + } + } + catch (CmdletInvocationException invokeException) + { + var psArgumentException = invokeException.GetBaseException() as PSArgumentException; + Assert.IsNotNull(psArgumentException); + Assert.AreEqual("Either File or Query should be specified for Pig jobs.", psArgumentException.Message); + } + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/NewSqoopJobCmdLetTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/NewSqoopJobCmdLetTests.cs new file mode 100644 index 000000000000..9f1a1951a459 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/NewSqoopJobCmdLetTests.cs @@ -0,0 +1,200 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; +using Microsoft.Hadoop.Client; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Interfaces; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests +{ + [TestClass] + public class NewSqoopJobCmdLetTests : HDInsightTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightSqoopJobDefinition")] + public void ICanCallThe_New_HDInsightSqoopJobDefinitionCmdlet() + { + var sqoopJobDefinition = new SqoopJobCreateParameters { Command = "show tables" }; + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightSqoopJobDefinition) + .WithParameter(CmdletConstants.Command, sqoopJobDefinition.Command) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightSqoopJobDefinition SqoopJobFromPowershell = results.Results.ToEnumerable().First(); + + Assert.AreEqual(sqoopJobDefinition.Command, SqoopJobFromPowershell.Command); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightSqoopJobDefinition")] + public void ICanCallThe_New_HDInsightSqoopJobDefinitionCmdlet_WithFileParameter() + { + var sqoopJobDefinition = new SqoopJobCreateParameters { File = TestConstants.WabsProtocolSchemeName + "filepath.hql" }; + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightSqoopJobDefinition) + .WithParameter(CmdletConstants.File, sqoopJobDefinition.File) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightSqoopJobDefinition SqoopJobFromPowershell = results.Results.ToEnumerable().First(); + + Assert.AreEqual(sqoopJobDefinition.File, SqoopJobFromPowershell.File); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightSqoopJobDefinition")] + [TestCategory("Defect")] + public void ICanCallThe_New_HDInsightSqoopJobDefinitionCmdlet_WithOutputStorageLocation() + { + var sqoopJobDefinition = new SqoopJobCreateParameters { Command = "show tables", StatusFolder = "/tablesList" }; + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightSqoopJobDefinition) + .WithParameter(CmdletConstants.Command, sqoopJobDefinition.Command) + .WithParameter(CmdletConstants.StatusFolder, sqoopJobDefinition.StatusFolder) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightSqoopJobDefinition SqoopJobFromPowershell = results.Results.ToEnumerable().First(); + + Assert.AreEqual(sqoopJobDefinition.Command, SqoopJobFromPowershell.Command); + Assert.AreEqual(sqoopJobDefinition.StatusFolder, SqoopJobFromPowershell.StatusFolder); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightSqoopJobDefinition")] + public void ICanCallThe_New_HDInsightSqoopJobDefinitionCmdlet_WithResources() + { + var sqoopJobDefinition = new SqoopJobCreateParameters { Command = "show tables" }; + sqoopJobDefinition.Files.Add("pidata.txt"); + sqoopJobDefinition.Files.Add("pidate2.txt"); + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightSqoopJobDefinition) + .WithParameter(CmdletConstants.Command, sqoopJobDefinition.Command) + .WithParameter(CmdletConstants.Files, sqoopJobDefinition.Files) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightSqoopJobDefinition SqoopJobFromPowershell = results.Results.ToEnumerable().First(); + + Assert.AreEqual(sqoopJobDefinition.Command, SqoopJobFromPowershell.Command); + + foreach (string file in sqoopJobDefinition.Files) + { + Assert.IsTrue( + SqoopJobFromPowershell.Files.Any(arg => string.Equals(file, arg)), + "Unable to find File '{0}' in value returned from powershell", + file); + } + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightSqoopJobDefinition")] + public void ICanCallThe_New_HDInsightSqoopJobDefinitionCmdlet_WithoutJobName() + { + var sqoopJobDefinition = new SqoopJobCreateParameters { Command = "show tables" }; + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightSqoopJobDefinition) + .WithParameter(CmdletConstants.Command, sqoopJobDefinition.Command) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightSqoopJobDefinition SqoopJobFromPowershell = results.Results.ToEnumerable().First(); + + Assert.AreEqual(sqoopJobDefinition.Command, SqoopJobFromPowershell.Command); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightSqoopJobDefinition")] + public void ICannotCallThe_New_HDInsightSqoopJobDefinitionCmdlet_WithoutFileOrCommandParameter() + { + var sqoopJobDefinition = new SqoopJobCreateParameters { File = TestConstants.WabsProtocolSchemeName + "filepath.hql" }; + + try + { + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + runspace.NewPipeline().AddCommand(CmdletConstants.NewAzureHDInsightSqoopJobDefinition).Invoke(); + Assert.Fail("test failed."); + } + } + catch (CmdletInvocationException invokeException) + { + var psArgumentException = invokeException.GetBaseException() as PSArgumentException; + Assert.IsNotNull(psArgumentException); + Assert.AreEqual("Either File or Command should be specified for Sqoop jobs.", psArgumentException.Message); + } + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/NewStreamingMapReduceJobCmdLetTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/NewStreamingMapReduceJobCmdLetTests.cs new file mode 100644 index 000000000000..ce2a94c3a186 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/NewStreamingMapReduceJobCmdLetTests.cs @@ -0,0 +1,271 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using Microsoft.Hadoop.Client; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Interfaces; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests +{ + [TestClass] + public class NewStreamingMapReduceJobCmdLetTests : HDInsightTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightStreamingJobDefinition")] + public void ICanCallThe_New_HDInsightStreamingMapReduceJobDefinitionCmdlet() + { + var streamingMapReduceJobDefinition = new StreamingMapReduceJobCreateParameters + { + JobName = "pi estimation jobDetails", + Input = TestConstants.WabsProtocolSchemeName + "input", + Output = TestConstants.WabsProtocolSchemeName + "input", + Mapper = TestConstants.WabsProtocolSchemeName + "combiner", + Reducer = TestConstants.WabsProtocolSchemeName + "combiner", + StatusFolder = TestConstants.WabsProtocolSchemeName + "someotherlocation" + }; + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightStreamingMapReduceJobDefinition) + .WithParameter(CmdletConstants.JobName, streamingMapReduceJobDefinition.JobName) + .WithParameter(CmdletConstants.Input, streamingMapReduceJobDefinition.Input) + .WithParameter(CmdletConstants.Output, streamingMapReduceJobDefinition.Output) + .WithParameter(CmdletConstants.Mapper, streamingMapReduceJobDefinition.Mapper) + .WithParameter(CmdletConstants.Reducer, streamingMapReduceJobDefinition.Reducer) + .WithParameter(CmdletConstants.StatusFolder, streamingMapReduceJobDefinition.StatusFolder) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightStreamingMapReduceJobDefinition streamingMapReduceJobFromPowershell = + results.Results.ToEnumerable().First(); + + AssertJobDefinitionsEqual(streamingMapReduceJobDefinition, streamingMapReduceJobFromPowershell); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightStreamingJobDefinition")] + public void ICanCallThe_New_HDInsightStreamingMapReduceJobDefinitionCmdlet_WithArguments() + { + var streamingMapReduceJobDefinition = new StreamingMapReduceJobCreateParameters + { + JobName = "pi estimation jobDetails", + Input = TestConstants.WabsProtocolSchemeName + "input", + Output = TestConstants.WabsProtocolSchemeName + "input", + Mapper = TestConstants.WabsProtocolSchemeName + "combiner", + Reducer = TestConstants.WabsProtocolSchemeName + "combiner", + StatusFolder = TestConstants.WabsProtocolSchemeName + "someotherlocation" + }; + streamingMapReduceJobDefinition.Arguments.Add("16"); + streamingMapReduceJobDefinition.Arguments.Add("10000"); + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightStreamingMapReduceJobDefinition) + .WithParameter(CmdletConstants.JobName, streamingMapReduceJobDefinition.JobName) + .WithParameter(CmdletConstants.Input, streamingMapReduceJobDefinition.Input) + .WithParameter(CmdletConstants.Output, streamingMapReduceJobDefinition.Output) + .WithParameter(CmdletConstants.Mapper, streamingMapReduceJobDefinition.Mapper) + .WithParameter(CmdletConstants.Reducer, streamingMapReduceJobDefinition.Reducer) + .WithParameter(CmdletConstants.StatusFolder, streamingMapReduceJobDefinition.StatusFolder) + .WithParameter(CmdletConstants.Arguments, streamingMapReduceJobDefinition.Arguments) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightStreamingMapReduceJobDefinition streamingMapReduceJobFromPowershell = + results.Results.ToEnumerable().First(); + + AssertJobDefinitionsEqual(streamingMapReduceJobDefinition, streamingMapReduceJobFromPowershell); + foreach (string argument in streamingMapReduceJobDefinition.Arguments) + { + Assert.IsTrue( + streamingMapReduceJobFromPowershell.Arguments.Any(arg => string.Equals(argument, arg)), + "Unable to find argument '{0}' in value returned from powershell", + argument); + } + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightStreamingJobDefinition")] + public void ICanCallThe_New_HDInsightStreamingMapReduceJobDefinitionCmdlet_WithParameters() + { + var streamingMapReduceJobDefinition = new StreamingMapReduceJobCreateParameters + { + JobName = "pi estimation jobDetails", + Input = TestConstants.WabsProtocolSchemeName + "input", + Output = TestConstants.WabsProtocolSchemeName + "input", + Mapper = TestConstants.WabsProtocolSchemeName + "combiner", + Reducer = TestConstants.WabsProtocolSchemeName + "combiner", + StatusFolder = TestConstants.WabsProtocolSchemeName + "someotherlocation" + }; + + streamingMapReduceJobDefinition.Defines.Add("map.input.tasks", "1000"); + streamingMapReduceJobDefinition.Defines.Add("map.input.reducers", "1000"); + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightStreamingMapReduceJobDefinition) + .WithParameter(CmdletConstants.JobName, streamingMapReduceJobDefinition.JobName) + .WithParameter(CmdletConstants.Input, streamingMapReduceJobDefinition.Input) + .WithParameter(CmdletConstants.Output, streamingMapReduceJobDefinition.Output) + .WithParameter(CmdletConstants.Mapper, streamingMapReduceJobDefinition.Mapper) + .WithParameter(CmdletConstants.Reducer, streamingMapReduceJobDefinition.Reducer) + .WithParameter(CmdletConstants.StatusFolder, streamingMapReduceJobDefinition.StatusFolder) + .WithParameter(CmdletConstants.Parameters, streamingMapReduceJobDefinition.Defines) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightStreamingMapReduceJobDefinition streamingMapReduceJobFromPowershell = + results.Results.ToEnumerable().First(); + + AssertJobDefinitionsEqual(streamingMapReduceJobDefinition, streamingMapReduceJobFromPowershell); + foreach (var parameter in streamingMapReduceJobDefinition.Defines) + { + Assert.IsTrue( + streamingMapReduceJobFromPowershell.Defines.Any( + arg => string.Equals(parameter.Key, arg.Key) && string.Equals(parameter.Value, arg.Value)), + "Unable to find parameter '{0}' in value returned from powershell", + parameter.Key); + } + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightStreamingJobDefinition")] + public void ICanCallThe_New_HDInsightStreamingMapReduceJobDefinitionCmdlet_WithResources() + { + var streamingMapReduceJobDefinition = new StreamingMapReduceJobCreateParameters + { + JobName = "pi estimation jobDetails", + Input = TestConstants.WabsProtocolSchemeName + "input", + Output = TestConstants.WabsProtocolSchemeName + "input", + Mapper = TestConstants.WabsProtocolSchemeName + "combiner", + Reducer = TestConstants.WabsProtocolSchemeName + "combiner", + StatusFolder = TestConstants.WabsProtocolSchemeName + "someotherlocation" + }; + streamingMapReduceJobDefinition.Files.Add("pidata.txt"); + streamingMapReduceJobDefinition.Files.Add("pidate2.txt"); + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightStreamingMapReduceJobDefinition) + .WithParameter(CmdletConstants.JobName, streamingMapReduceJobDefinition.JobName) + .WithParameter(CmdletConstants.Input, streamingMapReduceJobDefinition.Input) + .WithParameter(CmdletConstants.Output, streamingMapReduceJobDefinition.Output) + .WithParameter(CmdletConstants.Mapper, streamingMapReduceJobDefinition.Mapper) + .WithParameter(CmdletConstants.Reducer, streamingMapReduceJobDefinition.Reducer) + .WithParameter(CmdletConstants.StatusFolder, streamingMapReduceJobDefinition.StatusFolder) + .WithParameter(CmdletConstants.Files, streamingMapReduceJobDefinition.Files) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightStreamingMapReduceJobDefinition streamingMapReduceJobFromPowershell = + results.Results.ToEnumerable().First(); + + AssertJobDefinitionsEqual(streamingMapReduceJobDefinition, streamingMapReduceJobFromPowershell); + foreach (string file in streamingMapReduceJobDefinition.Files) + { + Assert.IsTrue( + streamingMapReduceJobFromPowershell.Files.Any(arg => string.Equals(file, arg)), + "Unable to find File '{0}' in value returned from powershell", + file); + } + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightStreamingJobDefinition")] + public void ICanCallThe_New_HDInsightStreamingMapReduceJobDefinitionCmdlet_WithoutJobName() + { + var streamingMapReduceJobDefinition = new StreamingMapReduceJobCreateParameters + { + Input = TestConstants.WabsProtocolSchemeName + "input", + Output = TestConstants.WabsProtocolSchemeName + "input", + Mapper = TestConstants.WabsProtocolSchemeName + "combiner", + Reducer = TestConstants.WabsProtocolSchemeName + "combiner", + StatusFolder = TestConstants.WabsProtocolSchemeName + "someotherlocation" + }; + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightStreamingMapReduceJobDefinition) + .WithParameter(CmdletConstants.Input, streamingMapReduceJobDefinition.Input) + .WithParameter(CmdletConstants.Output, streamingMapReduceJobDefinition.Output) + .WithParameter(CmdletConstants.Mapper, streamingMapReduceJobDefinition.Mapper) + .WithParameter(CmdletConstants.Reducer, streamingMapReduceJobDefinition.Reducer) + .WithParameter(CmdletConstants.StatusFolder, streamingMapReduceJobDefinition.StatusFolder) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightStreamingMapReduceJobDefinition streamingMapReduceJobFromPowershell = + results.Results.ToEnumerable().First(); + + AssertJobDefinitionsEqual(streamingMapReduceJobDefinition, streamingMapReduceJobFromPowershell); + } + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + + internal static void AssertJobDefinitionsEqual( + StreamingMapReduceJobCreateParameters streamingMapReduceJobDefinition, + AzureHDInsightStreamingMapReduceJobDefinition streamingMapReduceJobFromPowershell) + { + Assert.AreEqual(streamingMapReduceJobDefinition.JobName, streamingMapReduceJobFromPowershell.JobName); + Assert.AreEqual(streamingMapReduceJobDefinition.Input, streamingMapReduceJobFromPowershell.Input); + Assert.AreEqual(streamingMapReduceJobDefinition.Output, streamingMapReduceJobFromPowershell.Output); + Assert.AreEqual(streamingMapReduceJobDefinition.Mapper, streamingMapReduceJobFromPowershell.Mapper); + Assert.AreEqual(streamingMapReduceJobDefinition.Reducer, streamingMapReduceJobFromPowershell.Reducer); + Assert.AreEqual(streamingMapReduceJobDefinition.StatusFolder, streamingMapReduceJobFromPowershell.StatusFolder); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/SqoopJobDefinitionCmdletTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/SqoopJobDefinitionCmdletTests.cs new file mode 100644 index 000000000000..110ba5d5fcf0 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/SqoopJobDefinitionCmdletTests.cs @@ -0,0 +1,64 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.Hadoop.Client; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests +{ + [TestClass] + public class SqoopJobDefinitionCmdletTests : HDInsightTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + public void CanCreateSDKObjectFromPowershellObject() + { + var sqoopJobDefinition = new AzureHDInsightSqoopJobDefinition + { + Command = "Import into sqlserver", + File = "http://myfileshare.txt", + StatusFolder = Guid.NewGuid().ToString(), + }; + + sqoopJobDefinition.Arguments.Add("arg1"); + sqoopJobDefinition.Files.Add("file1.sqoop"); + SqoopJobCreateParameters sdkObject = sqoopJobDefinition.ToSqoopJobCreateParameters(); + + Assert.AreEqual(sqoopJobDefinition.StatusFolder, sdkObject.StatusFolder); + Assert.AreEqual(sqoopJobDefinition.File, sdkObject.File); + Assert.AreEqual(sqoopJobDefinition.Command, sdkObject.Command); + + foreach (string file in sqoopJobDefinition.Files) + { + Assert.IsTrue(sdkObject.Files.Contains(file), file); + } + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/StartJobsCmdletIntegrationTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/StartJobsCmdletIntegrationTests.cs new file mode 100644 index 000000000000..b8b1fc5239d6 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/StartJobsCmdletIntegrationTests.cs @@ -0,0 +1,54 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests +{ + [TestClass] + public class StartJobsCmdletIntegrationTests : StartJobsCmdletTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("Integration")] + + [TestCategory("JobsIntegration")] + [TestCategory("Start-AzureHDInsightJob")] + public override void ICanCallThe_NewHiveJob_Then_Start_HDInsightJobsCmdlet() + { + base.ICanCallThe_NewHiveJob_Then_Start_HDInsightJobsCmdlet(); + } + + [TestMethod] + [TestCategory("Integration")] + + [TestCategory("JobsIntegration")] + [TestCategory("Start-AzureHDInsightJob")] + public override void ICanCallThe_NewMapReduceJob_Then_Start_HDInsightJobsCmdlet() + { + base.ICanCallThe_NewMapReduceJob_Then_Start_HDInsightJobsCmdlet(); + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/StartJobsCmdletTestCaseBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/StartJobsCmdletTestCaseBase.cs new file mode 100644 index 000000000000..e5618c18d73b --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/StartJobsCmdletTestCaseBase.cs @@ -0,0 +1,249 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using Microsoft.Hadoop.Client; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Interfaces; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Simulators; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities; +using Microsoft.WindowsAzure.Management.HDInsight; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Logging; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests +{ + public class StartJobsCmdletTestCaseBase : HDInsightTestCaseBase + { + public virtual void ICanCallThe_NewHiveJob_Then_Start_HDInsightJobsCmdlet() + { + var hiveJobDefinition = new HiveJobCreateParameters { JobName = "show tables jobDetails", Query = "show tables" }; + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightHiveJobDefinition) + .WithParameter(CmdletConstants.JobName, hiveJobDefinition.JobName) + .WithParameter(CmdletConstants.Query, hiveJobDefinition.Query) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightHiveJobDefinition hiveJobFromPowershell = results.Results.ToEnumerable().First(); + ClusterDetails testCluster = CmdletScenariosTestCaseBase.GetHttpAccessEnabledCluster(); + AzureHDInsightJob jobCreationDetails = RunJobInPowershell(runspace, hiveJobFromPowershell, testCluster); + AzureHDInsightJob jobHistoryResult = GetJobsCmdletTests.GetJobWithID(runspace, jobCreationDetails.JobId, testCluster); + } + } + + public virtual void ICanCallThe_NewMapReduceJob_Then_Start_HDInsightJobsCmdlet() + { + var mapReduceJobDefinition = new MapReduceJobCreateParameters + { + JobName = "pi estimation jobDetails", + ClassName = "pi", + JarFile = "/example/hadoop-examples.jar" + }; + + mapReduceJobDefinition.Arguments.Add("16"); + mapReduceJobDefinition.Arguments.Add("10000"); + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightMapReduceJobDefinition) + .WithParameter(CmdletConstants.JobName, mapReduceJobDefinition.JobName) + .WithParameter(CmdletConstants.JarFile, mapReduceJobDefinition.JarFile) + .WithParameter(CmdletConstants.ClassName, mapReduceJobDefinition.ClassName) + .WithParameter(CmdletConstants.Arguments, mapReduceJobDefinition.Arguments) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightMapReduceJobDefinition mapReduceJobFromPowershell = + results.Results.ToEnumerable().First(); + + RunJobInPowershell(runspace, mapReduceJobFromPowershell); + } + } + + public virtual void ICanCallThe_NewPigJob_Then_Start_HDInsightJobsCmdlet() + { + var pigJobDefinition = new PigJobCreateParameters { Query = "load table from 'A'" }; + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightPigJobDefinition) + .WithParameter(CmdletConstants.Query, pigJobDefinition.Query) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightPigJobDefinition pigJobFromPowershell = results.Results.ToEnumerable().First(); + + RunJobInPowershell(runspace, pigJobFromPowershell); + } + } + + public virtual void ICanCallThe_NewSqoopJob_Then_Start_HDInsightJobsCmdlet() + { + var sqoopJobDefinition = new SqoopJobCreateParameters { Command = "load table from 'A'" }; + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightSqoopJobDefinition) + .WithParameter(CmdletConstants.Command, sqoopJobDefinition.Command) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightSqoopJobDefinition sqoopJobFromPowershell = results.Results.ToEnumerable().First(); + + RunJobInPowershell(runspace, sqoopJobFromPowershell); + } + } + + public virtual void ICanCallThe_NewStreamingJob_Then_Start_HDInsightJobsCmdlet() + { + var streamingMapReduceJobDefinition = new StreamingMapReduceJobCreateParameters + { + JobName = "pi estimation jobDetails", + Input = TestConstants.WabsProtocolSchemeName + "input", + Output = TestConstants.WabsProtocolSchemeName + "input", + Mapper = TestConstants.WabsProtocolSchemeName + "combiner", + Reducer = TestConstants.WabsProtocolSchemeName + "combiner", + StatusFolder = TestConstants.WabsProtocolSchemeName + "someotherlocation" + }; + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightStreamingMapReduceJobDefinition) + .WithParameter(CmdletConstants.JobName, streamingMapReduceJobDefinition.JobName) + .WithParameter(CmdletConstants.Input, streamingMapReduceJobDefinition.Input) + .WithParameter(CmdletConstants.Output, streamingMapReduceJobDefinition.Output) + .WithParameter(CmdletConstants.Mapper, streamingMapReduceJobDefinition.Mapper) + .WithParameter(CmdletConstants.Reducer, streamingMapReduceJobDefinition.Reducer) + .WithParameter(CmdletConstants.StatusFolder, streamingMapReduceJobDefinition.StatusFolder) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + AzureHDInsightStreamingMapReduceJobDefinition streamingJobFromPowershell = + results.Results.ToEnumerable().First(); + + RunJobInPowershell(runspace, streamingJobFromPowershell); + } + } + + public virtual void ICanCallThe_Start_HDInsightJobsCmdlet() + { + var mapReduceJobDefinition = new AzureHDInsightMapReduceJobDefinition + { + JobName = "pi estimation jobDetails", + ClassName = "pi", + JarFile = TestConstants.WabsProtocolSchemeName + "container@hostname/examples.jar" + }; + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + RunJobInPowershell(runspace, mapReduceJobDefinition); + } + } + + public virtual void ICanCallThe_Start_HDInsightJobsCmdlet_WithoutName() + { + var mapReduceJobDefinition = new AzureHDInsightMapReduceJobDefinition + { + ClassName = "pi", + JarFile = TestConstants.WabsProtocolSchemeName + "container@hostname/examples.jar" + }; + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + RunJobInPowershell(runspace, mapReduceJobDefinition); + } + } + + public override void Initialize() + { + base.Initialize(); + } + + public override void TestCleanup() + { + base.TestCleanup(); + } + + internal static AzureHDInsightJob RunJobInPowershell(IRunspace runspace, AzureHDInsightJobDefinition mapReduceJobDefinition) + { + return RunJobInPowershell(runspace, mapReduceJobDefinition, CmdletScenariosTestCaseBase.GetHttpAccessEnabledCluster()); + } + + internal static AzureHDInsightJob RunJobInPowershell( + IRunspace runspace, AzureHDInsightJobDefinition mapReduceJobDefinition, ClusterDetails cluster) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.StartAzureHDInsightJob) + .WithParameter(CmdletConstants.Cluster, cluster.ConnectionUrl) + .WithParameter(CmdletConstants.Credential, GetPSCredential(cluster.HttpUserName, cluster.HttpPassword)) + .WithParameter(CmdletConstants.JobDefinition, mapReduceJobDefinition) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + IEnumerable jobCreationCmdletResults = results.Results.ToEnumerable(); + AzureHDInsightJob jobCreationResults = jobCreationCmdletResults.First(); + Assert.IsNotNull(jobCreationResults.JobId, "Should get a non-null jobDetails id"); + + return jobCreationResults; + } + + + internal static AzureHDInsightJob RunJobInPowershell( + IRunspace runspace, AzureHDInsightJobDefinition mapReduceJobDefinition, ClusterDetails cluster, bool debug, string expectedLogMessage) + { + IPipelineResult result = null; + if (debug) + { + var logWriter = new PowershellLogWriter(); + BufferingLogWriterFactory.Instance = logWriter; + result = + runspace.NewPipeline() + .AddCommand(CmdletConstants.StartAzureHDInsightJob) + .WithParameter(CmdletConstants.Cluster, cluster.ConnectionUrl) + .WithParameter(CmdletConstants.Credential, GetPSCredential(cluster.HttpUserName, cluster.HttpPassword)) + .WithParameter(CmdletConstants.JobDefinition, mapReduceJobDefinition) + .WithParameter(CmdletConstants.Debug, null) + .Invoke(); + + Assert.IsTrue(logWriter.Buffer.Any(message => message.Contains(expectedLogMessage))); + BufferingLogWriterFactory.Reset(); + } + else + { + result = + runspace.NewPipeline() + .AddCommand(CmdletConstants.StartAzureHDInsightJob) + .WithParameter(CmdletConstants.Cluster, cluster.ConnectionUrl) + .WithParameter(CmdletConstants.Credential, GetPSCredential(cluster.HttpUserName, cluster.HttpPassword)) + .WithParameter(CmdletConstants.JobDefinition, mapReduceJobDefinition) + .Invoke(); + } + Assert.AreEqual(1, result.Results.Count); + IEnumerable jobCreationCmdletResults = result.Results.ToEnumerable(); + AzureHDInsightJob jobCreationResults = jobCreationCmdletResults.First(); + Assert.IsNotNull(jobCreationResults.JobId, "Should get a non-null jobDetails id"); + + return jobCreationResults; + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/StartJobsCmdletTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/StartJobsCmdletTests.cs new file mode 100644 index 000000000000..09456e7864ef --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/StartJobsCmdletTests.cs @@ -0,0 +1,139 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Globalization; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Interfaces; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests +{ + [TestClass] + public class StarttJobsCmdletTests : StartJobsCmdletTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Start-AzureHDInsightJob")] + public override void ICanCallThe_NewHiveJob_Then_Start_HDInsightJobsCmdlet() + { + base.ICanCallThe_NewHiveJob_Then_Start_HDInsightJobsCmdlet(); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Start-AzureHDInsightJob")] + public override void ICanCallThe_NewMapReduceJob_Then_Start_HDInsightJobsCmdlet() + { + base.ICanCallThe_NewMapReduceJob_Then_Start_HDInsightJobsCmdlet(); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Start-AzureHDInsightJob")] + public override void ICanCallThe_NewPigJob_Then_Start_HDInsightJobsCmdlet() + { + base.ICanCallThe_NewPigJob_Then_Start_HDInsightJobsCmdlet(); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Start-AzureHDInsightJob")] + public override void ICanCallThe_NewSqoopJob_Then_Start_HDInsightJobsCmdlet() + { + base.ICanCallThe_NewSqoopJob_Then_Start_HDInsightJobsCmdlet(); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Start-AzureHDInsightJob")] + public override void ICanCallThe_NewStreamingJob_Then_Start_HDInsightJobsCmdlet() + { + base.ICanCallThe_NewStreamingJob_Then_Start_HDInsightJobsCmdlet(); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Start-AzureHDInsightJob")] + public override void ICanCallThe_Start_HDInsightJobsCmdlet() + { + base.ICanCallThe_Start_HDInsightJobsCmdlet(); + } + + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Start-AzureHDInsightJob")] + public void ICanCallThe_Start_HDInsightJobsCmdlet_WithDebug() + { + var mapReduceJobDefinition = new AzureHDInsightMapReduceJobDefinition + { + JobName = "pi estimation jobDetails", + ClassName = "pi", + JarFile = TestConstants.WabsProtocolSchemeName + "container@hostname/examples.jar" + }; + + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + string expectedLogMessage = string.Format(CultureInfo.InvariantCulture, "Starting jobDetails '{0}'.", mapReduceJobDefinition.JobName); + RunJobInPowershell( + runspace, mapReduceJobDefinition, CmdletScenariosTestCaseBase.GetHttpAccessEnabledCluster(), true, expectedLogMessage); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Start-AzureHDInsightJob")] + public override void ICanCallThe_Start_HDInsightJobsCmdlet_WithoutName() + { + base.ICanCallThe_Start_HDInsightJobsCmdlet_WithoutName(); + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/TestSetupCleanup.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/TestSetupCleanup.cs new file mode 100644 index 000000000000..8425f8defd28 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/TestSetupCleanup.cs @@ -0,0 +1,34 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities +{ + [TestClass] + public static class TestSetupCleanup + { + [AssemblyInitialize] + public static void AssemblyInit(TestContext context) + { + IntegrationTestBase.TestRunSetup(); + } + + [AssemblyCleanup] + public static void AssemblyCleanup() + { + IntegrationTestBase.TestRunCleanup(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/WaitCmdletTest.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/WaitCmdletTest.cs new file mode 100644 index 000000000000..d3b4f18f663a --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CmdLetTests/WaitCmdletTest.cs @@ -0,0 +1,235 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using Microsoft.Hadoop.Client; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Interfaces; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities; +using Microsoft.WindowsAzure.Management.HDInsight; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests +{ + [TestClass] + public class WaitCmdletTest : HDInsightTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Jobs")] + public virtual void WaitForInvalidJobDoesNotThrow() + { + var jobDetails = new JobDetails { JobId = Guid.NewGuid().ToString() }; + var invalidJob = new AzureHDInsightJob(jobDetails, TestCredentials.WellKnownCluster.DnsName); + + // IHadoopClientExtensions.GetPollingInterval = () => 0; + ClusterDetails cluster = CmdletScenariosTestCaseBase.GetHttpAccessEnabledCluster(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + runspace.NewPipeline() + .AddCommand(CmdletConstants.WaitAzureHDInsightJob) + .WithParameter(CmdletConstants.Credential, GetPSCredential(cluster.HttpUserName, cluster.HttpPassword)) + .WithParameter(CmdletConstants.Job, invalidJob) + .Invoke(); + } + } + + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Jobs")] + public virtual void WaitForJobWithId() + { + var hiveJobDefinition = new HiveJobCreateParameters() + { + JobName = "show tables jobDetails", + Query = "show tables" + }; + + var cluster = CmdletScenariosTestCaseBase.GetHttpAccessEnabledCluster(); + using (var runspace = this.GetPowerShellRunspace()) + { + var results = runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightHiveJobDefinition) + .WithParameter(CmdletConstants.JobName, hiveJobDefinition.JobName) + .WithParameter(CmdletConstants.Query, hiveJobDefinition.Query) + .AddCommand(CmdletConstants.StartAzureHDInsightJob) + .WithParameter(CmdletConstants.Cluster, cluster.ConnectionUrl) + .WithParameter(CmdletConstants.Credential, IntegrationTestBase.GetPSCredential(cluster.HttpUserName, cluster.HttpPassword)) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + var job = results.Results.First().BaseObject as Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects.AzureHDInsightJob; + + results = runspace.NewPipeline() + .AddCommand(CmdletConstants.WaitAzureHDInsightJob) + .WithParameter(CmdletConstants.Credential, IntegrationTestBase.GetPSCredential(cluster.HttpUserName, cluster.HttpPassword)) + .WithParameter(CmdletConstants.JobId, job.JobId) + .WithParameter(CmdletConstants.Cluster, job.Cluster) + .Invoke(); + var completedJob = results.Results.ToEnumerable().FirstOrDefault(); + Assert.IsNotNull(completedJob); + Assert.AreEqual(job.JobId, completedJob.JobId); + Assert.AreEqual("Completed", completedJob.State); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Jobs")] + public virtual void WaitForJob() + { + var hiveJobDefinition = new HiveJobCreateParameters { JobName = "show tables jobDetails", Query = "show tables" }; + + // IHadoopClientExtensions.GetPollingInterval = () => 0; + ClusterDetails cluster = CmdletScenariosTestCaseBase.GetHttpAccessEnabledCluster(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightHiveJobDefinition) + .WithParameter(CmdletConstants.JobName, hiveJobDefinition.JobName) + .WithParameter(CmdletConstants.Query, hiveJobDefinition.Query) + .AddCommand(CmdletConstants.StartAzureHDInsightJob) + .WithParameter(CmdletConstants.Cluster, cluster.ConnectionUrl) + .WithParameter(CmdletConstants.Credential, GetPSCredential(cluster.HttpUserName, cluster.HttpPassword)) + .AddCommand(CmdletConstants.WaitAzureHDInsightJob) + .WithParameter(CmdletConstants.Credential, GetPSCredential(cluster.HttpUserName, cluster.HttpPassword)) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + Assert.AreEqual("Completed", results.Results.ToEnumerable().First().State); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Jobs")] + public virtual void WaitForInvalidJobIdDoesNotThrow() + { + var jobDetails = new JobDetails() + { + JobId = Guid.NewGuid().ToString() + }; + + var cluster = CmdletScenariosTestCaseBase.GetHttpAccessEnabledCluster(); + using (var runspace = this.GetPowerShellRunspace()) + { + runspace.NewPipeline() + .AddCommand(CmdletConstants.WaitAzureHDInsightJob) + .WithParameter(CmdletConstants.Credential, IntegrationTestBase.GetPSCredential(cluster.HttpUserName, cluster.HttpPassword)) + .WithParameter(CmdletConstants.JobId, jobDetails.JobId) + .WithParameter(CmdletConstants.Cluster, jobDetails.JobId) + .Invoke(); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Jobs")] + public virtual void WaitForJobWithTimeout() + { + var hiveJobDefinition = new HiveJobCreateParameters { JobName = "show tables jobDetails", Query = "show tables" }; + + // IHadoopClientExtensions.GetPollingInterval = () => 0; + ClusterDetails cluster = CmdletScenariosTestCaseBase.GetHttpAccessEnabledCluster(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightHiveJobDefinition) + .WithParameter(CmdletConstants.JobName, hiveJobDefinition.JobName) + .WithParameter(CmdletConstants.Query, hiveJobDefinition.Query) + .AddCommand(CmdletConstants.StartAzureHDInsightJob) + .WithParameter(CmdletConstants.Cluster, cluster.ConnectionUrl) + .WithParameter(CmdletConstants.Credential, GetPSCredential(cluster.HttpUserName, cluster.HttpPassword)) + .AddCommand(CmdletConstants.WaitAzureHDInsightJob) + .WithParameter(CmdletConstants.Credential, GetPSCredential(cluster.HttpUserName, cluster.HttpPassword)) + .WithParameter(CmdletConstants.WaitTimeoutInSeconds, 0.01) + .Invoke(); + Assert.AreEqual(1, results.Results.Count); + Assert.AreEqual("Completed", results.Results.ToEnumerable().First().State); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Jobs")] + public void WaitForJobs() + { + // IHadoopClientExtensions.GetPollingInterval = () => 0; + var hiveJobDefinition = new HiveJobCreateParameters { JobName = "show tables jobDetails", Query = "show tables" }; + + ClusterDetails cluster = CmdletScenariosTestCaseBase.GetHttpAccessEnabledCluster(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.GetAzureHDInsightJob) + .WithParameter(CmdletConstants.Cluster, cluster.ConnectionUrl) + .WithParameter(CmdletConstants.Credential, GetPSCredential(cluster.HttpUserName, cluster.HttpPassword)) + .Invoke(); + + int startingCount = results.Results.Count; + + results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.NewAzureHDInsightHiveJobDefinition) + .WithParameter(CmdletConstants.JobName, hiveJobDefinition.JobName) + .WithParameter(CmdletConstants.Query, hiveJobDefinition.Query) + .AddCommand(CmdletConstants.StartAzureHDInsightJob) + .WithParameter(CmdletConstants.Cluster, cluster.ConnectionUrl) + .WithParameter(CmdletConstants.Credential, GetPSCredential(cluster.HttpUserName, cluster.HttpPassword)) + .AddCommand(CmdletConstants.NewAzureHDInsightHiveJobDefinition) + .WithParameter(CmdletConstants.JobName, hiveJobDefinition.JobName) + .WithParameter(CmdletConstants.Query, hiveJobDefinition.Query) + .AddCommand(CmdletConstants.StartAzureHDInsightJob) + .WithParameter(CmdletConstants.Cluster, cluster.ConnectionUrl) + .WithParameter(CmdletConstants.Credential, GetPSCredential(cluster.HttpUserName, cluster.HttpPassword)) + .AddCommand(CmdletConstants.NewAzureHDInsightHiveJobDefinition) + .WithParameter(CmdletConstants.JobName, hiveJobDefinition.JobName) + .WithParameter(CmdletConstants.Query, hiveJobDefinition.Query) + .AddCommand(CmdletConstants.StartAzureHDInsightJob) + .WithParameter(CmdletConstants.Cluster, cluster.ConnectionUrl) + .WithParameter(CmdletConstants.Credential, GetPSCredential(cluster.HttpUserName, cluster.HttpPassword)) + .Invoke(); + + results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.GetAzureHDInsightJob) + .WithParameter(CmdletConstants.Cluster, cluster.ConnectionUrl) + .WithParameter(CmdletConstants.Credential, GetPSCredential(cluster.HttpUserName, cluster.HttpPassword)) + .AddCommand(CmdletConstants.WaitAzureHDInsightJob) + .WithParameter(CmdletConstants.Credential, GetPSCredential(cluster.HttpUserName, cluster.HttpPassword)) + .Invoke(); + Assert.AreEqual(startingCount + 3, results.Results.Count); + foreach (AzureHDInsightJob entity in results.Results.ToEnumerable()) + { + Assert.IsTrue(entity.State == "Completed" || entity.State == "Canceled" || entity.State == "Failed"); + } + } + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/AddAzureHDInsightScriptActionCommandTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/AddAzureHDInsightScriptActionCommandTests.cs new file mode 100644 index 000000000000..f44ee65559fe --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/AddAzureHDInsightScriptActionCommandTests.cs @@ -0,0 +1,119 @@ +//---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CommandTests +{ + using CmdLetTests; + using Management.HDInsight.Cmdlet.Commands.CommandInterfaces; + using Management.HDInsight.Cmdlet.DataObjects; + using Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; + using Management.HDInsight.Cmdlet.ServiceLocation; + using Microsoft.WindowsAzure.Management.HDInsight; + using System; + using System.Linq; + using VisualStudio.TestTools.UnitTesting; + + [TestClass] + public class AddHDInsightScriptActionCommandTests : HDInsightTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("CheckIn")] + public void CanAddScriptAction() + { + var config = new AzureHDInsightConfig(); + IAddAzureHDInsightScriptActionCommand scriptActionCommand = + ServiceLocator.Instance.Locate().CreateAddScriptAction(); + + scriptActionCommand.Name = "test"; + scriptActionCommand.Uri = new Uri("http://test.com"); + scriptActionCommand.Parameters = "test parameters"; + scriptActionCommand.Config = config; + scriptActionCommand.EndProcessing(); + + AzureHDInsightConfig newConfig = scriptActionCommand.Output.First(); + + Assert.AreEqual(config.ClusterSizeInNodes, newConfig.ClusterSizeInNodes); + Assert.AreEqual(config.DefaultStorageAccount, newConfig.DefaultStorageAccount); + Assert.IsTrue(config.ConfigActions.Count == newConfig.ConfigActions.Count && config.ConfigActions.Count == 1); + Assert.IsTrue(newConfig.ConfigActions.ElementAt(0) is AzureHDInsightScriptAction); + Assert.IsTrue(newConfig.ConfigActions.ElementAt(0).Name == "test" && + ((AzureHDInsightScriptAction)newConfig.ConfigActions.ElementAt(0)).Uri == new Uri("http://test.com") && + ((AzureHDInsightScriptAction)newConfig.ConfigActions.ElementAt(0)).Parameters == "test parameters"); + + } + + [TestMethod] + [TestCategory("CheckIn")] + public void CanAddRoleCollectionToScriptAction() + { + var config = new AzureHDInsightConfig(); + IAddAzureHDInsightScriptActionCommand scriptActionCommand = + ServiceLocator.Instance.Locate().CreateAddScriptAction(); + + scriptActionCommand.ClusterRoleCollection = + new ClusterNodeType[] { ClusterNodeType.HeadNode, ClusterNodeType.DataNode }; + scriptActionCommand.Name = "test"; + scriptActionCommand.Uri = new Uri("http://test.com"); + scriptActionCommand.Parameters = "test parameters"; + scriptActionCommand.Config = config; + scriptActionCommand.EndProcessing(); + + AzureHDInsightConfig newConfig = scriptActionCommand.Output.First(); + + Assert.AreEqual(config.ClusterSizeInNodes, newConfig.ClusterSizeInNodes); + Assert.AreEqual(config.DefaultStorageAccount, newConfig.DefaultStorageAccount); + Assert.IsTrue(config.ConfigActions.Count == newConfig.ConfigActions.Count && config.ConfigActions.Count == 1); + Assert.IsTrue(newConfig.ConfigActions.ElementAt(0) is AzureHDInsightScriptAction); + Assert.IsTrue(newConfig.ConfigActions.ElementAt(0).Name == "test" && + ((AzureHDInsightScriptAction)newConfig.ConfigActions.ElementAt(0)).Uri == new Uri("http://test.com") && + ((AzureHDInsightScriptAction)newConfig.ConfigActions.ElementAt(0)).Parameters == "test parameters"); + Assert.IsTrue(Enumerable.SequenceEqual(newConfig.ConfigActions.ElementAt(0).ClusterRoleCollection, + new ClusterNodeType[] { ClusterNodeType.HeadNode, ClusterNodeType.DataNode })); + } + + [TestMethod] + [TestCategory("CheckIn")] + public void CanAddComplexScriptAction() + { + var config = new AzureHDInsightConfig(); + IAddAzureHDInsightScriptActionCommand scriptActionCommand = + ServiceLocator.Instance.Locate().CreateAddScriptAction(); + + scriptActionCommand.ClusterRoleCollection = + new ClusterNodeType[] { ClusterNodeType.HeadNode }; + scriptActionCommand.Config = config; + scriptActionCommand.EndProcessing(); + + AzureHDInsightConfig newConfig = scriptActionCommand.Output.First(); + + Assert.AreEqual(config.ClusterSizeInNodes, newConfig.ClusterSizeInNodes); + Assert.AreEqual(config.DefaultStorageAccount, newConfig.DefaultStorageAccount); + Assert.IsTrue(config.ConfigActions.Count == newConfig.ConfigActions.Count && config.ConfigActions.Count == 1); + Assert.IsTrue(newConfig.ConfigActions.ElementAt(0) is AzureHDInsightScriptAction); + Assert.IsTrue(Enumerable.SequenceEqual(newConfig.ConfigActions.ElementAt(0).ClusterRoleCollection, + new ClusterNodeType[] { ClusterNodeType.HeadNode })); + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/AddHDInsightConfigValuesCommandTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/AddHDInsightConfigValuesCommandTests.cs new file mode 100644 index 000000000000..66c40eb21bdc --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/AddHDInsightConfigValuesCommandTests.cs @@ -0,0 +1,228 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CommandTests +{ + [TestClass] + public class AddHDInsightConfigValuesCommandTests : HDInsightTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("CheckIn")] + public void CanAddCoreConfigValues() + { + var config = new AzureHDInsightConfig(); + IAddAzureHDInsightConfigValuesCommand addCoreConfigValues = + ServiceLocator.Instance.Locate().CreateAddConfig(); + + addCoreConfigValues.Core.Add("hadoop.log.file.size", "12345"); + addCoreConfigValues.Config = config; + addCoreConfigValues.EndProcessing(); + + AzureHDInsightConfig newConfig = addCoreConfigValues.Output.First(); + + Assert.AreEqual(config.ClusterSizeInNodes, newConfig.ClusterSizeInNodes); + Assert.AreEqual(config.DefaultStorageAccount, newConfig.DefaultStorageAccount); + Assert.IsTrue( + newConfig.CoreConfiguration.Any(configOption => configOption.Key == "hadoop.log.file.size" && configOption.Value == "12345")); + } + + + [TestMethod] + [TestCategory("CheckIn")] + public void CanAddYarnConfigValues() + { + var config = new AzureHDInsightConfig(); + IAddAzureHDInsightConfigValuesCommand addYarnConfigValues = + ServiceLocator.Instance.Locate().CreateAddConfig(); + + addYarnConfigValues.Core.Add("yarn.fakekey", "12345"); + addYarnConfigValues.Config = config; + addYarnConfigValues.EndProcessing(); + + AzureHDInsightConfig newConfig = addYarnConfigValues.Output.First(); + + Assert.AreEqual(config.ClusterSizeInNodes, newConfig.ClusterSizeInNodes); + Assert.AreEqual(config.DefaultStorageAccount, newConfig.DefaultStorageAccount); + Assert.IsTrue( + newConfig.CoreConfiguration.Any(configOption => configOption.Key == "yarn.fakekey" && configOption.Value == "12345")); + } + + [TestMethod] + [TestCategory("CheckIn")] + public void CanAddHdfsConfigValues() + { + var config = new AzureHDInsightConfig(); + IAddAzureHDInsightConfigValuesCommand addCoreConfigValues = + ServiceLocator.Instance.Locate().CreateAddConfig(); + + addCoreConfigValues.Hdfs.Add("hadoop.log.file.size", "12345"); + addCoreConfigValues.Config = config; + addCoreConfigValues.EndProcessing(); + + AzureHDInsightConfig newConfig = addCoreConfigValues.Output.First(); + + Assert.AreEqual(config.ClusterSizeInNodes, newConfig.ClusterSizeInNodes); + Assert.AreEqual(config.DefaultStorageAccount, newConfig.DefaultStorageAccount); + Assert.IsTrue( + newConfig.HdfsConfiguration.Any(configOption => configOption.Key == "hadoop.log.file.size" && configOption.Value == "12345")); + } + + + [TestMethod] + [TestCategory("CheckIn")] + public void CanAddHiveAdditionalLibrariesValues() + { + var config = new AzureHDInsightConfig(); + IAddAzureHDInsightConfigValuesCommand addCoreConfigValues = + ServiceLocator.Instance.Locate().CreateAddConfig(); + + addCoreConfigValues.Hive.AdditionalLibraries = new AzureHDInsightDefaultStorageAccount + { + StorageAccountKey = Guid.NewGuid().ToString(), + StorageAccountName = Guid.NewGuid().ToString(), + StorageContainerName = Guid.NewGuid().ToString() + }; + + addCoreConfigValues.Config = config; + addCoreConfigValues.EndProcessing(); + + AzureHDInsightConfig newConfig = addCoreConfigValues.Output.First(); + + Assert.AreEqual(config.ClusterSizeInNodes, newConfig.ClusterSizeInNodes); + Assert.AreEqual(config.DefaultStorageAccount, newConfig.DefaultStorageAccount); + Assert.IsNotNull(newConfig.HiveConfiguration.AdditionalLibraries); + Assert.AreEqual( + newConfig.HiveConfiguration.AdditionalLibraries.Container, addCoreConfigValues.Hive.AdditionalLibraries.StorageContainerName); + Assert.AreEqual(newConfig.HiveConfiguration.AdditionalLibraries.Key, addCoreConfigValues.Hive.AdditionalLibraries.StorageAccountKey); + Assert.AreEqual(newConfig.HiveConfiguration.AdditionalLibraries.Name, addCoreConfigValues.Hive.AdditionalLibraries.StorageAccountName); + } + + [TestMethod] + [TestCategory("CheckIn")] + public void CanAddHiveConfigValues() + { + var config = new AzureHDInsightConfig(); + IAddAzureHDInsightConfigValuesCommand addCoreConfigValues = + ServiceLocator.Instance.Locate().CreateAddConfig(); + + addCoreConfigValues.Hive.Configuration.Add("hadoop.log.file.size", "12345"); + addCoreConfigValues.Config = config; + addCoreConfigValues.EndProcessing(); + + AzureHDInsightConfig newConfig = addCoreConfigValues.Output.First(); + + Assert.AreEqual(config.ClusterSizeInNodes, newConfig.ClusterSizeInNodes); + Assert.AreEqual(config.DefaultStorageAccount, newConfig.DefaultStorageAccount); + Assert.IsTrue( + newConfig.HiveConfiguration.ConfigurationCollection.Any( + configOption => configOption.Key == "hadoop.log.file.size" && configOption.Value == "12345")); + } + + [TestMethod] + [TestCategory("CheckIn")] + public void CanAddMapReduceConfigValues() + { + var config = new AzureHDInsightConfig(); + IAddAzureHDInsightConfigValuesCommand addCoreConfigValues = + ServiceLocator.Instance.Locate().CreateAddConfig(); + addCoreConfigValues.MapReduce = new AzureHDInsightMapReduceConfiguration(); + addCoreConfigValues.MapReduce.Configuration.Add("hadoop.log.file.size", "12345"); + addCoreConfigValues.Config = config; + addCoreConfigValues.EndProcessing(); + + AzureHDInsightConfig newConfig = addCoreConfigValues.Output.First(); + + Assert.AreEqual(config.ClusterSizeInNodes, newConfig.ClusterSizeInNodes); + Assert.AreEqual(config.DefaultStorageAccount, newConfig.DefaultStorageAccount); + Assert.IsTrue( + newConfig.MapReduceConfiguration.ConfigurationCollection.Any( + configOption => configOption.Key == "hadoop.log.file.size" && configOption.Value == "12345")); + } + + [TestMethod] + [TestCategory("CheckIn")] + public void CanAddOozieConfigValues() + { + var config = new AzureHDInsightConfig(); + IAddAzureHDInsightConfigValuesCommand addCoreConfigValues = + ServiceLocator.Instance.Locate().CreateAddConfig(); + + addCoreConfigValues.Oozie.AdditionalSharedLibraries = new AzureHDInsightDefaultStorageAccount + { + StorageAccountKey = Guid.NewGuid().ToString(), + StorageAccountName = Guid.NewGuid().ToString(), + StorageContainerName = Guid.NewGuid().ToString() + }; + + addCoreConfigValues.Oozie.AdditionalActionExecutorLibraries = new AzureHDInsightDefaultStorageAccount + { + StorageAccountKey = Guid.NewGuid().ToString(), + StorageAccountName = Guid.NewGuid().ToString(), + StorageContainerName = Guid.NewGuid().ToString() + }; + + addCoreConfigValues.Oozie.Configuration.Add("hadoop.log.file.size", "12345"); + addCoreConfigValues.Config = config; + addCoreConfigValues.EndProcessing(); + + AzureHDInsightConfig newConfig = addCoreConfigValues.Output.First(); + + Assert.AreEqual(config.ClusterSizeInNodes, newConfig.ClusterSizeInNodes); + Assert.AreEqual(config.DefaultStorageAccount, newConfig.DefaultStorageAccount); + Assert.IsTrue( + newConfig.OozieConfiguration.ConfigurationCollection.Any( + configOption => configOption.Key == "hadoop.log.file.size" && configOption.Value == "12345")); + Assert.IsNotNull(newConfig.OozieConfiguration.AdditionalSharedLibraries); + Assert.AreEqual( + newConfig.OozieConfiguration.AdditionalSharedLibraries.Container, + addCoreConfigValues.Oozie.AdditionalSharedLibraries.StorageContainerName); + Assert.AreEqual( + newConfig.OozieConfiguration.AdditionalSharedLibraries.Key, addCoreConfigValues.Oozie.AdditionalSharedLibraries.StorageAccountKey); + Assert.AreEqual( + newConfig.OozieConfiguration.AdditionalSharedLibraries.Name, addCoreConfigValues.Oozie.AdditionalSharedLibraries.StorageAccountName); + + Assert.IsNotNull(newConfig.OozieConfiguration.AdditionalActionExecutorLibraries); + Assert.AreEqual( + newConfig.OozieConfiguration.AdditionalActionExecutorLibraries.Container, + addCoreConfigValues.Oozie.AdditionalActionExecutorLibraries.StorageContainerName); + Assert.AreEqual( + newConfig.OozieConfiguration.AdditionalActionExecutorLibraries.Key, + addCoreConfigValues.Oozie.AdditionalActionExecutorLibraries.StorageAccountKey); + Assert.AreEqual( + newConfig.OozieConfiguration.AdditionalActionExecutorLibraries.Name, + addCoreConfigValues.Oozie.AdditionalActionExecutorLibraries.StorageAccountName); + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/ConnectClusterCommandTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/ConnectClusterCommandTests.cs new file mode 100644 index 000000000000..f9fb32365283 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/ConnectClusterCommandTests.cs @@ -0,0 +1,145 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Interfaces; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities; +using Microsoft.WindowsAzure.Management.HDInsight; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CommandTests +{ + [TestClass] + public class ConnectClusterCommandTests : HDInsightTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + [TestCategory("PowerShell")] + public void CanConnectToValidCluster() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + IUseAzureHDInsightClusterCommand connectCommand = ServiceLocator.Instance.Locate().CreateUseCluster(); + connectCommand.CurrentSubscription = GetCurrentSubscription(); + connectCommand.Name = TestCredentials.WellKnownCluster.DnsName; + connectCommand.EndProcessing(); + + Assert.AreEqual(1, connectCommand.Output.Count); + AzureHDInsightClusterConnection currentCluster = connectCommand.Output.First(); + Assert.IsNotNull(currentCluster); + ValidateGetCluster(currentCluster.Cluster); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + [TestCategory("PowerShell")] + + public void CanConnectToValidClustersMoreThanOnce() + { + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + IPipelineResult results = + runspace.NewPipeline() + .AddCommand(CmdletConstants.GetAzureHDInsightCluster) + .WithParameter(CmdletConstants.Name, TestCredentials.WellKnownCluster.DnsName) + .Invoke(); + IEnumerable clusters = results.Results.ToEnumerable(); + foreach (AzureHDInsightCluster cluster in clusters) + { + IUseAzureHDInsightClusterCommand connectCommand = + ServiceLocator.Instance.Locate().CreateUseCluster(); + connectCommand.CurrentSubscription = GetCurrentSubscription(); + connectCommand.Name = cluster.Name; + connectCommand.EndProcessing(); + Assert.AreEqual(1, connectCommand.Output.Count); + AzureHDInsightClusterConnection currentCluster = connectCommand.Output.First(); + Assert.IsNotNull(currentCluster); + ValidateGetCluster(cluster, currentCluster.Cluster); + } + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + [TestCategory("PowerShell")] + + public void CannotConnectToInvalidCluster() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + string errorMessage = string.Empty; + string invalidCluster = Guid.NewGuid().ToString(); + try + { + IUseAzureHDInsightClusterCommand connectCommand = ServiceLocator.Instance.Locate().CreateUseCluster(); + connectCommand.CurrentSubscription = GetCurrentSubscription(); + connectCommand.Certificate = creds.Certificate; + connectCommand.Name = invalidCluster; + connectCommand.EndProcessing().Wait(); + } + catch (AggregateException aex) + { + errorMessage = aex.InnerExceptions.FirstOrDefault().Message; + } + + Assert.AreEqual("Failed to connect to cluster :" + invalidCluster, errorMessage); + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + + private static void ValidateGetCluster(AzureHDInsightCluster expected, AzureHDInsightCluster actual) + { + Assert.AreEqual(expected.Name, actual.Name); + Assert.AreEqual(expected.Version, actual.Version); + Assert.AreEqual(expected.HttpUserName, actual.HttpUserName); + Assert.AreEqual(expected.HttpPassword, actual.HttpPassword); + } + + private static void ValidateGetCluster(AzureHDInsightCluster cluster) + { + Assert.AreEqual(TestCredentials.WellKnownCluster.DnsName, cluster.Name); + Assert.AreEqual(TestCredentials.WellKnownCluster.Version, cluster.Version); + WabStorageAccountConfiguration defaultStorageAccount = GetWellKnownStorageAccounts().First(); + Assert.AreEqual(defaultStorageAccount.Key, cluster.DefaultStorageAccount.StorageAccountKey); + Assert.AreEqual(defaultStorageAccount.Name, cluster.DefaultStorageAccount.StorageAccountName); + Assert.AreEqual(defaultStorageAccount.Container, cluster.DefaultStorageAccount.StorageContainerName); + foreach (WabStorageAccountConfiguration account in GetWellKnownStorageAccounts().Skip(1)) + { + AzureHDInsightStorageAccount deserializedAccount = + cluster.StorageAccounts.FirstOrDefault(acc => acc.StorageAccountName == account.Name); + Assert.IsNotNull(deserializedAccount, account.Name); + Assert.AreEqual(account.Key, deserializedAccount.StorageAccountKey); + } + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/HDInsightGetCommandTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/HDInsightGetCommandTests.cs new file mode 100644 index 000000000000..fa6e95cb3bc9 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/HDInsightGetCommandTests.cs @@ -0,0 +1,244 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.Hadoop.Client; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities; +using Microsoft.WindowsAzure.Management.HDInsight; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CommandTests +{ + [TestClass] + public class HDInsightGetCommandTests : HDInsightTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("CheckIn")] + public void ICanPerform_GetClusters_HDInsightGetCommand() + { + var client = ServiceLocator.Instance.Locate().CreateGet(); + client.CurrentSubscription = GetCurrentSubscription(); + client.EndProcessing(); + IEnumerable containers = from container in client.Output + where container.Name.Equals(TestCredentials.WellKnownCluster.DnsName) + select container; + Assert.AreEqual(1, containers.Count()); + } + + [TestMethod] + [TestCategory("CheckIn")] + public void ICanPerform_GetClusters_HDInsightGetCommand_DnsName() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + var client = ServiceLocator.Instance.Locate().CreateGet(); + client.CurrentSubscription = GetCurrentSubscription(); + client.Name = TestCredentials.WellKnownCluster.DnsName; + client.EndProcessing(); + IEnumerable containers = from container in client.Output + where container.Name.Equals(TestCredentials.WellKnownCluster.DnsName) + select container; + Assert.AreEqual(1, containers.Count()); + } + + [TestMethod] + [TestCategory("CheckIn")] + public void ICanPerform_GetClusters_HDInsightGetCommand_InvalidDnsName() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + var client = ServiceLocator.Instance.Locate().CreateGet(); + client.CurrentSubscription = GetCurrentSubscription(); + client.Name = Guid.NewGuid().ToString("N"); + client.EndProcessing(); + Assert.IsFalse(client.Output.Any()); + } + + [TestMethod] + [TestCategory("CheckIn")] + public void CommandsNeedCurrentSubscriptionSet() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + var getClustersCommand = new GetAzureHDInsightClusterCommand(); + try + { + getClustersCommand.GetClient(); + Assert.Fail("Should have failed."); + } + catch (ArgumentNullException noSubscriptionException) + { + Assert.AreEqual(noSubscriptionException.ParamName, "CurrentSubscription"); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + public void CanGetSubscriptionsCertificateCredentialFromCurrentSubscription() + { + var getClustersCommand = new GetAzureHDInsightClusterCommand(); + var waSubscription = GetCurrentSubscription(); + ProfileClient profileClient = new ProfileClient(); + + var subscriptionCreds = getClustersCommand.GetSubscriptionCredentials(waSubscription, AzureSession.CurrentContext.Environment, profileClient.Profile); + + Assert.IsInstanceOfType(subscriptionCreds, typeof(HDInsightCertificateCredential)); + var asCertificateCreds = subscriptionCreds as HDInsightCertificateCredential; + Assert.AreEqual(waSubscription.Id, asCertificateCreds.SubscriptionId); + Assert.IsNotNull(asCertificateCreds.Certificate); + } + + [TestMethod] + [TestCategory("CheckIn")] + public void CanGetAccessTokenCertificateCredentialFromCurrentSubscription() + { + var getClustersCommand = new GetAzureHDInsightClusterCommand(); + var waSubscription = new AzureSubscription() + { + Id = IntegrationTestBase.TestCredentials.SubscriptionId, + }; + ProfileClient profileClient = new ProfileClient(); + profileClient.Profile.Accounts["test"] = new AzureAccount + { + Id = "test", + Type = AzureAccount.AccountType.User, + Properties = + new Dictionary + { + {AzureAccount.Property.Subscriptions, IntegrationTestBase.TestCredentials.SubscriptionId.ToString() } + } + }; + profileClient.Profile.Save(); + + waSubscription.Account = "test"; + var accessTokenCreds = getClustersCommand.GetSubscriptionCredentials(waSubscription, AzureSession.CurrentContext.Environment, profileClient.Profile); + Assert.IsInstanceOfType(accessTokenCreds, typeof(HDInsightAccessTokenCredential)); + var asAccessTokenCreds = accessTokenCreds as HDInsightAccessTokenCredential; + Assert.AreEqual("abc", asAccessTokenCreds.AccessToken); + Assert.AreEqual(waSubscription.Id, asAccessTokenCreds.SubscriptionId); + } + + [TestMethod] + [TestCategory("CheckIn")] + public void CanGetJobSubmissionCertificateCredentialFromCurrentSubscription() + { + var getClustersCommand = new GetAzureHDInsightJobCommand(); + var waSubscription = GetCurrentSubscription(); + ProfileClient profileClient = new ProfileClient(); + + var subscriptionCreds = getClustersCommand.GetJobSubmissionClientCredentials( + waSubscription, + AzureSession.CurrentContext.Environment, + IntegrationTestBase.TestCredentials.WellKnownCluster.DnsName, + profileClient.Profile); + + Assert.IsInstanceOfType(subscriptionCreds, typeof(JobSubmissionCertificateCredential)); + var asCertificateCreds = subscriptionCreds as JobSubmissionCertificateCredential; + Assert.AreEqual(waSubscription.Id, asCertificateCreds.SubscriptionId); + Assert.AreEqual(IntegrationTestBase.TestCredentials.WellKnownCluster.DnsName, asCertificateCreds.Cluster); + } + + [TestMethod] + [TestCategory("CheckIn")] + public void CanGetJobSubmissionAccessTokenCredentialFromCurrentSubscription() + { + var getClustersCommand = new GetAzureHDInsightJobCommand(); + var waSubscription = new AzureSubscription() + { + Id = IntegrationTestBase.TestCredentials.SubscriptionId, + Account = "test" + }; + ProfileClient profileClient = new ProfileClient(); + profileClient.Profile.Accounts["test"] = new AzureAccount + { + Id = "test", + Type = AzureAccount.AccountType.User, + Properties = + new Dictionary + { + {AzureAccount.Property.Subscriptions, IntegrationTestBase.TestCredentials.SubscriptionId.ToString() } + } + }; + profileClient.Profile.Save(); + var accessTokenCreds = getClustersCommand.GetJobSubmissionClientCredentials( + waSubscription, + AzureSession.CurrentContext.Environment, + IntegrationTestBase.TestCredentials.WellKnownCluster.DnsName, + profileClient.Profile); + Assert.IsInstanceOfType(accessTokenCreds, typeof(HDInsightAccessTokenCredential)); + var asTokenCreds = accessTokenCreds as HDInsightAccessTokenCredential; + Assert.IsNotNull(asTokenCreds); + Assert.AreEqual("abc", asTokenCreds.AccessToken); + } + + [TestMethod] + [TestCategory("CheckIn")] + public void CanGetBasicAuthCredentialFromCredentials() + { + var getClustersCommand = new GetAzureHDInsightJobCommand(); + getClustersCommand.Credential = GetPSCredential(TestCredentials.AzureUserName, TestCredentials.AzurePassword); + var waSubscription = new AzureSubscription() + { + Id = IntegrationTestBase.TestCredentials.SubscriptionId, + }; + waSubscription.Account = "test"; + var profile = new AzureProfile(); + var accessTokenCreds = getClustersCommand.GetJobSubmissionClientCredentials( + waSubscription, + AzureSession.CurrentContext.Environment, + IntegrationTestBase.TestCredentials.WellKnownCluster.DnsName, profile); + Assert.IsInstanceOfType(accessTokenCreds, typeof(BasicAuthCredential)); + var asBasicAuthCredentials = accessTokenCreds as BasicAuthCredential; + Assert.IsNotNull(asBasicAuthCredentials); + Assert.AreEqual(IntegrationTestBase.TestCredentials.AzureUserName, asBasicAuthCredentials.UserName); + Assert.AreEqual(IntegrationTestBase.TestCredentials.AzurePassword, asBasicAuthCredentials.Password); + } + + [TestMethod] + [TestCategory("CheckIn")] + public void GetJobSubmissionCredentialsThrowsInvalidOperationException() + { + string invalidClusterName = Guid.NewGuid().ToString("N"); + var getClustersCommand = new GetAzureHDInsightJobCommand(); + + try + { + getClustersCommand.GetClient(invalidClusterName); + Assert.Fail("Should have failed."); + } + catch (InvalidOperationException invalidOperationException) + { + Assert.AreEqual("Expected either a Subscription or Credential parameter.", invalidOperationException.Message); + } + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/HDInsightGetJobOutputCommandTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/HDInsightGetJobOutputCommandTests.cs new file mode 100644 index 000000000000..1cb18b765790 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/HDInsightGetJobOutputCommandTests.cs @@ -0,0 +1,168 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using Microsoft.Hadoop.Client; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Simulators; +using Microsoft.WindowsAzure.Management.HDInsight; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CommandTests +{ + [TestClass] + public class HDInsightGetJobOutputCommandTests : HDInsightTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Jobs")] + [TestCategory("GetAzureHDInsightJobCommand")] + public void CanGetJobErrorLogsForCompletedJob() + { + ClusterDetails cluster = CmdletScenariosTestCaseBase.GetHttpAccessEnabledCluster(); + IGetAzureHDInsightJobCommand getJobsCommand = ServiceLocator.Instance.Locate().CreateGetJobs(); + getJobsCommand.Credential = GetPSCredential(cluster.HttpUserName, cluster.HttpPassword); + getJobsCommand.Cluster = cluster.ConnectionUrl; + getJobsCommand.EndProcessing(); + + AzureHDInsightJob jobWithStatusDirectory = getJobsCommand.Output.First(j => !string.IsNullOrEmpty(j.StatusDirectory)); + + IGetAzureHDInsightJobOutputCommand getJobOutputCommand = + ServiceLocator.Instance.Locate().CreateGetJobOutput(); + getJobOutputCommand.CurrentSubscription = GetCurrentSubscription(); + getJobOutputCommand.Cluster = cluster.Name; + getJobOutputCommand.OutputType = JobOutputType.StandardError; + getJobOutputCommand.JobId = jobWithStatusDirectory.JobId; + getJobOutputCommand.EndProcessing(); + + Stream outputStream = getJobOutputCommand.Output.First(); + Assert.IsTrue(outputStream.Length > 0); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Jobs")] + [TestCategory("GetAzureHDInsightJobCommand")] + public void CanGetJobOutputForCompletedJob() + { + ClusterDetails cluster = CmdletScenariosTestCaseBase.GetHttpAccessEnabledCluster(); + IGetAzureHDInsightJobCommand getJobsCommand = ServiceLocator.Instance.Locate().CreateGetJobs(); + getJobsCommand.Credential = GetPSCredential(cluster.HttpUserName, cluster.HttpPassword); + getJobsCommand.Cluster = cluster.ConnectionUrl; + getJobsCommand.EndProcessing(); + + AzureHDInsightJob jobWithStatusDirectory = getJobsCommand.Output.First(j => !string.IsNullOrEmpty(j.StatusDirectory)); + + IGetAzureHDInsightJobOutputCommand getJobOutputCommand = + ServiceLocator.Instance.Locate().CreateGetJobOutput(); + getJobOutputCommand.CurrentSubscription = GetCurrentSubscription(); + getJobOutputCommand.Cluster = cluster.Name; + getJobOutputCommand.JobId = jobWithStatusDirectory.JobId; + getJobOutputCommand.EndProcessing(); + + Stream outputStream = getJobOutputCommand.Output.First(); + Assert.IsTrue(outputStream.Length > 0); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Jobs")] + [TestCategory("GetAzureHDInsightJobCommand")] + public void CanGetTaskLogsForCompletedJob() + { + ClusterDetails cluster = CmdletScenariosTestCaseBase.GetHttpAccessEnabledCluster(); + IGetAzureHDInsightJobCommand getJobsCommand = ServiceLocator.Instance.Locate().CreateGetJobs(); + getJobsCommand.Credential = GetPSCredential(cluster.HttpUserName, cluster.HttpPassword); + getJobsCommand.Cluster = cluster.ConnectionUrl; + getJobsCommand.EndProcessing(); + + AzureHDInsightJob jobWithStatusDirectory = getJobsCommand.Output.First(j => !string.IsNullOrEmpty(j.StatusDirectory)); + string logDirectoryPath = Path.Combine(System.Environment.CurrentDirectory, Guid.NewGuid().ToString()); + IGetAzureHDInsightJobOutputCommand getJobOutputCommand = + ServiceLocator.Instance.Locate().CreateGetJobOutput(); + getJobOutputCommand.CurrentSubscription = GetCurrentSubscription(); + getJobOutputCommand.Cluster = cluster.Name; + getJobOutputCommand.OutputType = JobOutputType.TaskLogs; + getJobOutputCommand.TaskLogsDirectory = logDirectoryPath; + getJobOutputCommand.JobId = jobWithStatusDirectory.JobId; + getJobOutputCommand.EndProcessing(); + + IEnumerable logFiles = Directory.EnumerateFiles(logDirectoryPath); + Assert.IsTrue(logFiles.Any()); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Jobs")] + [TestCategory("GetAzureHDInsightJobCommand")] + public void CanGetTaskSummaryForCompletedJob() + { + ClusterDetails cluster = CmdletScenariosTestCaseBase.GetHttpAccessEnabledCluster(); + IGetAzureHDInsightJobCommand getJobsCommand = ServiceLocator.Instance.Locate().CreateGetJobs(); + getJobsCommand.Credential = GetPSCredential(cluster.HttpUserName, cluster.HttpPassword); + getJobsCommand.Cluster = cluster.ConnectionUrl; + getJobsCommand.EndProcessing(); + + AzureHDInsightJob jobWithStatusDirectory = getJobsCommand.Output.First(j => !string.IsNullOrEmpty(j.StatusDirectory)); + + IGetAzureHDInsightJobOutputCommand getJobOutputCommand = + ServiceLocator.Instance.Locate().CreateGetJobOutput(); + getJobOutputCommand.CurrentSubscription = GetCurrentSubscription(); + getJobOutputCommand.Cluster = cluster.Name; + getJobOutputCommand.OutputType = JobOutputType.TaskSummary; + getJobOutputCommand.JobId = jobWithStatusDirectory.JobId; + getJobOutputCommand.EndProcessing(); + + Stream outputStream = getJobOutputCommand.Output.First(); + Assert.IsTrue(outputStream.Length > 0); + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + + internal static JobList GetJobHistory(string clusterEndpoint) + { + string clusterGatewayUri = GatewayUriResolver.GetGatewayUri(clusterEndpoint).AbsoluteUri.ToUpperInvariant(); + var manager = ServiceLocator.Instance.Locate(); + if (manager.MockingLevel == ServiceLocationMockingLevel.ApplyFullMocking) + { + if (AzureHDInsightJobSubmissionClientSimulatorFactory.jobSubmissionClients.ContainsKey(clusterGatewayUri)) + { + return AzureHDInsightJobSubmissionClientSimulatorFactory.jobSubmissionClients[clusterGatewayUri].ListJobs(); + } + } + + return new JobList { ErrorCode = HttpStatusCode.NotFound.ToString() }; + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/HDInsightGetJobsCommandTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/HDInsightGetJobsCommandTests.cs new file mode 100644 index 000000000000..c94736a6023e --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/HDInsightGetJobsCommandTests.cs @@ -0,0 +1,129 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using System.Net; +using Microsoft.Hadoop.Client; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Simulators; +using Microsoft.WindowsAzure.Management.HDInsight; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CommandTests +{ + [TestClass] + public class HDInsightGetJobsCommandTests : HDInsightTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Jobs")] + [TestCategory("GetAzureHDInsightJobCommand")] + public void CanListJobsForAValidCluster() + { + ClusterDetails cluster = CmdletScenariosTestCaseBase.GetHttpAccessEnabledCluster(); + IGetAzureHDInsightJobCommand getJobsCommand = ServiceLocator.Instance.Locate().CreateGetJobs(); + getJobsCommand.Credential = GetPSCredential(cluster.HttpUserName, cluster.HttpPassword); + getJobsCommand.Cluster = cluster.ConnectionUrl; + getJobsCommand.EndProcessing(); + + JobList history = GetJobHistory(getJobsCommand.Cluster); + + Assert.AreEqual(history.Jobs.Count, getJobsCommand.Output.Count, "Should have {0} jobs.", history.Jobs.Count); + foreach (AzureHDInsightJob job in getJobsCommand.Output) + { + Assert.IsFalse(string.IsNullOrEmpty(job.PercentComplete)); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Jobs")] + [TestCategory("GetAzureHDInsightJobCommand")] + public void CanListJobsForAValidClusterWithJobId() + { + ClusterDetails cluster = CmdletScenariosTestCaseBase.GetHttpAccessEnabledCluster(); + PSCredential psCredentials = GetPSCredential(cluster.HttpUserName, cluster.HttpPassword); + IGetAzureHDInsightJobCommand getJobsCommand = ServiceLocator.Instance.Locate().CreateGetJobs(); + getJobsCommand.Credential = psCredentials; + getJobsCommand.Cluster = cluster.ConnectionUrl; + getJobsCommand.EndProcessing(); + + if (!getJobsCommand.Output.Any()) + { + return; + } + + AzureHDInsightJob jobDetail = getJobsCommand.Output.First(); + + IGetAzureHDInsightJobCommand getJobWithIdCommand = ServiceLocator.Instance.Locate().CreateGetJobs(); + getJobWithIdCommand.Credential = psCredentials; + getJobWithIdCommand.Cluster = cluster.ConnectionUrl; + getJobWithIdCommand.JobId = jobDetail.JobId; + getJobWithIdCommand.EndProcessing(); + + Assert.AreEqual(1, getJobWithIdCommand.Output.Count, "Should have only one jobDetails when called with jobId."); + Assert.AreEqual(jobDetail.JobId, getJobsCommand.Output.First().JobId, "Should get jobDetails with the same jobId as the one requested."); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Jobs")] + [TestCategory("GetAzureHDInsightJobCommand")] + [ExpectedException(typeof(InvalidOperationException))] + public void GetClientWithoutCredentialsorSubscriptionCertificateThrows() + { + ClusterDetails cluster = CmdletScenariosTestCaseBase.GetHttpAccessEnabledCluster(); + using (var cmd = new GetAzureHDInsightJobCommand()) + { + cmd.Cluster = cluster.Name; + + cmd.GetClient(cmd.Cluster); + } + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + + internal static JobList GetJobHistory(string clusterEndpoint) + { + string clusterGatewayUri = GatewayUriResolver.GetGatewayUri(clusterEndpoint).AbsoluteUri.ToUpperInvariant(); + var manager = ServiceLocator.Instance.Locate(); + if (manager.MockingLevel == ServiceLocationMockingLevel.ApplyFullMocking) + { + if (AzureHDInsightJobSubmissionClientSimulatorFactory.jobSubmissionClients.ContainsKey(clusterGatewayUri)) + { + return AzureHDInsightJobSubmissionClientSimulatorFactory.jobSubmissionClients[clusterGatewayUri].ListJobs(); + } + } + + return new JobList { ErrorCode = HttpStatusCode.NotFound.ToString() }; + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/HDInsightGetPropertiesCommandTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/HDInsightGetPropertiesCommandTests.cs new file mode 100644 index 000000000000..3fbff1f790b5 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/HDInsightGetPropertiesCommandTests.cs @@ -0,0 +1,118 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests; +using Microsoft.WindowsAzure.Management.HDInsight; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CommandTests +{ + [TestClass] + public class HDInsightGetPropertiesCommandTests : HDInsightTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("CheckIn")] + public void HDInsightDefaultStorageContainerToStringIsAccountName() + { + string accountName = "storageaccountname.blob.core.windows.net"; + var storageAccount = new AzureHDInsightDefaultStorageAccount + { + StorageAccountKey = Guid.NewGuid().ToString(), + StorageAccountName = accountName, + StorageContainerName = "default" + }; + + Assert.AreEqual(accountName, storageAccount.ToString()); + } + + [TestMethod] + [TestCategory("CheckIn")] + public void HDInsightStorageContainerToStringIsAccountName() + { + string accountName = "storageaccountname.blob.core.windows.net"; + var storageAccount = new AzureHDInsightStorageAccount { StorageAccountKey = Guid.NewGuid().ToString(), StorageAccountName = accountName }; + + Assert.AreEqual(accountName, storageAccount.ToString()); + } + + [TestMethod] + [TestCategory("CheckIn")] + public void HDInsightVersionToStringIsVersionNumber() + { + string version = "1.4.0.0.LargeAMD64SKU"; + var hdInsightVersion = new HDInsightVersion { Version = version, VersionStatus = VersionStatus.Obsolete }; + Assert.AreEqual(version, hdInsightVersion.ToString()); + } + + [TestMethod] + [TestCategory("CheckIn")] + public void ICanPerform_GetProperties_HDInsightGetCommand() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + IGetAzureHDInsightPropertiesCommand client = ServiceLocator.Instance.Locate().CreateGetProperties(); + client.CurrentSubscription = GetCurrentSubscription(); + client.EndProcessing(); + + ValidateCapabilities(client.Output); + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + + internal static void ValidateCapabilities(IEnumerable capabilities) + { + var versions = new Collection(); + versions.Add(new HDInsightVersion { Version = "1.2", VersionStatus = VersionStatus.Obsolete }); + versions.Add(new HDInsightVersion { Version = "1.5", VersionStatus = VersionStatus.Obsolete }); + versions.Add(new HDInsightVersion { Version = "1.6", VersionStatus = VersionStatus.Compatible }); + versions.Add(new HDInsightVersion { Version = "2.1", VersionStatus = VersionStatus.Compatible }); + foreach (HDInsightVersion version in versions) + { + Assert.IsTrue( + capabilities.Any( + capability => + capability.Versions.Any(capVersion => string.Equals(version.Version, capVersion.Version, StringComparison.Ordinal))), + "unable to find version '{0}' in capabilities", + version); + } + + var locations = new Collection { "East US", "East US 2", "West US", "North Europe" }; + foreach (string location in locations) + { + Assert.IsTrue( + capabilities.Any( + capability => capability.Locations.Any(capLocation => string.Equals(location, capLocation, StringComparison.Ordinal))), + "unable to find location '{0}' in capabilities", + location); + } + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/HadoopCustomJobCerationDetails.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/HadoopCustomJobCerationDetails.cs new file mode 100644 index 000000000000..9ebcee2e6265 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/HadoopCustomJobCerationDetails.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CommandTests +{ + public class HadoopCustomJobCreationDetails : AzureHDInsightJobDefinition + { + public string CustomText { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/InvokeHiveCommandTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/InvokeHiveCommandTests.cs new file mode 100644 index 000000000000..bd062d2c3fac --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/InvokeHiveCommandTests.cs @@ -0,0 +1,209 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.IO; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Interfaces; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Simulators; +using Microsoft.WindowsAzure.Management.HDInsight; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CommandTests +{ + [TestClass] + public class InvokeHiveCommandTests : HDInsightTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + [TestCategory("PowerShell")] + + public void CanCallTheExecHiveCommand() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + AzureHDInsightClusterConnection connection = ConnectToCluster(runspace, creds); + IInvokeHiveCommand execHiveCommand = ServiceLocator.Instance.Locate().CreateInvokeHive(); + execHiveCommand.JobDefinition = new AzureHDInsightHiveJobDefinition { Query = "show tables", JobName = "show tables" }; + execHiveCommand.CurrentSubscription = GetCurrentSubscription(); + execHiveCommand.Connection = connection; + execHiveCommand.EndProcessing(); + + string outputContent = execHiveCommand.Output.Last(); + + Assert.AreEqual(5, execHiveCommand.Output.Count()); + Assert.AreEqual("hivesampletable", outputContent); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + [TestCategory("PowerShell")] + + public void CanCallTheExecHiveCommandWithAFailedQuery() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + AzureHDInsightClusterConnection connection = ConnectToCluster(runspace, creds); + IInvokeHiveCommand execHiveCommand = ServiceLocator.Instance.Locate().CreateInvokeHive(); + execHiveCommand.CurrentSubscription = GetCurrentSubscription(); + execHiveCommand.JobDefinition = new AzureHDInsightHiveJobDefinition { Query = "show tableaus", JobName = "Fail_this_job" }; + execHiveCommand.Connection = connection; + execHiveCommand.EndProcessing(); + + string outputContent = execHiveCommand.Output.Last(); + Assert.AreEqual(5, execHiveCommand.Output.Count()); + Assert.AreEqual(AzureHDInsightJobSubmissionClientSimulator.JobFailed, outputContent); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + [TestCategory("PowerShell")] + + public void CanCallTheExecHiveCommand_DoesNotUploadFile() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + AzureHDInsightClusterConnection connection = ConnectToCluster(runspace, creds); + var storageHandlerSimulator = new AzureHDInsightStorageHandlerSimulator(); + AzureHDInsightStorageHandlerSimulatorFactory.Instance = storageHandlerSimulator; + + IInvokeHiveCommand execHiveCommand = ServiceLocator.Instance.Locate().CreateInvokeHive(); + execHiveCommand.JobDefinition = new AzureHDInsightHiveJobDefinition { File = "query.hql", JobName = "show tables" }; + execHiveCommand.CurrentSubscription = GetCurrentSubscription(); + execHiveCommand.Connection = connection; + execHiveCommand.EndProcessing(); + + string outputContent = execHiveCommand.Output.Last(); + Assert.AreEqual(5, execHiveCommand.Output.Count()); + Assert.AreEqual("hivesampletable", outputContent); + + Assert.IsNull(storageHandlerSimulator.UploadedStream); + Assert.IsNull(storageHandlerSimulator.Path); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + [TestCategory("PowerShell")] + + public void CanCallTheExecHiveCommand_UploadsFile() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + using (IRunspace runspace = this.GetPowerShellRunspace()) + { + AzureHDInsightClusterConnection connection = ConnectToCluster(runspace, creds); + var storageHandlerSimulator = new AzureHDInsightStorageHandlerSimulator(); + AzureHDInsightStorageHandlerSimulatorFactory.Instance = storageHandlerSimulator; + + IInvokeHiveCommand execHiveCommand = ServiceLocator.Instance.Locate().CreateInvokeHive(); + execHiveCommand.JobDefinition = new AzureHDInsightHiveJobDefinition { Query = "show tables", JobName = "show tables" }; + execHiveCommand.CurrentSubscription = GetCurrentSubscription(); + execHiveCommand.Connection = connection; + execHiveCommand.EndProcessing(); + + string destinationPath = string.Format( + CultureInfo.InvariantCulture, + "http://{0}/{1}/user/{2}/", + connection.Cluster.DefaultStorageAccount.StorageAccountName, + connection.Cluster.DefaultStorageAccount.StorageContainerName, + connection.Cluster.HttpUserName); + string outputContent = execHiveCommand.Output.Last(); + Assert.IsNotNull(storageHandlerSimulator.UploadedStream); + storageHandlerSimulator.UploadedStream.Seek(0, SeekOrigin.Begin); + string contents = new StreamReader(storageHandlerSimulator.UploadedStream).ReadToEnd(); + Assert.AreEqual("show tables", contents); + Assert.IsFalse(string.IsNullOrEmpty(storageHandlerSimulator.Path.OriginalString)); + Assert.IsTrue(storageHandlerSimulator.Path.OriginalString.StartsWith(destinationPath, StringComparison.OrdinalIgnoreCase)); + + Assert.AreEqual(5, execHiveCommand.Output.Count()); + Assert.AreEqual("hivesampletable", outputContent); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + [TestCategory("PowerShell")] + + public void CannotCallTheExecHiveCmdlet_WithoutConnecting() + { + try + { + IInvokeHiveCommand execHiveCommand = ServiceLocator.Instance.Locate().CreateInvokeHive(); + execHiveCommand.JobDefinition = new AzureHDInsightHiveJobDefinition { Query = "show tables" }; + execHiveCommand.Connection = null; + } + catch (ArgumentNullException argumentNullException) + { + Assert.AreEqual(argumentNullException.ParamName, "Connection"); + } + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + + private static AzureHDInsightClusterConnection ConnectToCluster(IRunspace runspace, IHDInsightCertificateCredential creds) + { + IUseAzureHDInsightClusterCommand connectCommand = ServiceLocator.Instance.Locate().CreateUseCluster(); + connectCommand.CurrentSubscription = GetCurrentSubscription(); + connectCommand.Name = TestCredentials.WellKnownCluster.DnsName; + connectCommand.EndProcessing(); + Assert.AreEqual(1, connectCommand.Output.Count); + AzureHDInsightClusterConnection currentCluster = connectCommand.Output.First(); + ValidateGetCluster(currentCluster.Cluster); + return currentCluster; + } + + private static void ValidateGetCluster(AzureHDInsightCluster cluster) + { + Assert.AreEqual(TestCredentials.WellKnownCluster.DnsName, cluster.Name); + Assert.AreEqual(TestCredentials.WellKnownCluster.Version, cluster.Version); + WabStorageAccountConfiguration defaultStorageAccount = GetWellKnownStorageAccounts().First(); + Assert.AreEqual(defaultStorageAccount.Key, cluster.DefaultStorageAccount.StorageAccountKey); + Assert.AreEqual(defaultStorageAccount.Name, cluster.DefaultStorageAccount.StorageAccountName); + Assert.AreEqual(defaultStorageAccount.Container, cluster.DefaultStorageAccount.StorageContainerName); + foreach (WabStorageAccountConfiguration account in GetWellKnownStorageAccounts().Skip(1)) + { + AzureHDInsightStorageAccount deserializedAccount = + cluster.StorageAccounts.FirstOrDefault(acc => acc.StorageAccountName == account.Name); + Assert.IsNotNull(deserializedAccount, account.Name); + Assert.AreEqual(account.Key, deserializedAccount.StorageAccountKey); + } + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/ManageAzureHDInsightHttpAccessCommandTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/ManageAzureHDInsightHttpAccessCommandTests.cs new file mode 100644 index 000000000000..2a6198c3445a --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/ManageAzureHDInsightHttpAccessCommandTests.cs @@ -0,0 +1,117 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests; +using Microsoft.WindowsAzure.Management.HDInsight; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CommandTests +{ + [TestClass] + public class ManageAzureHDInsightHttpAccessCommandTests : HDInsightTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("Integration")] + [TestCategory("CheckIn")] + [TestCategory("Rdfe")] + public void CanGrantAccessToHttpServices() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + AzureHDInsightCluster testCluster = GetClusterWithHttpAccessDisabled(creds); + AzureHDInsightCluster cluster = EnableHttpAccessToCluster( + creds, testCluster, TestCredentials.AzureUserName, TestCredentials.AzurePassword); + Assert.IsNotNull(cluster); + Assert.AreEqual(cluster.HttpUserName, TestCredentials.AzureUserName); + Assert.AreEqual(cluster.HttpPassword, TestCredentials.AzurePassword); + } + + [TestMethod] + [TestCategory("Integration")] + [TestCategory("CheckIn")] + [TestCategory("Rdfe")] + public void CanRevokeAccessToHttpServices() + { + IHDInsightCertificateCredential creds = GetValidCredentials(); + AzureHDInsightCluster testCluster = GetClusterWithHttpAccessDisabled(creds); + EnableHttpAccessToCluster(creds, testCluster, TestCredentials.AzureUserName, TestCredentials.AzurePassword); + AzureHDInsightCluster cluster = DisableHttpAccessToCluster(creds, testCluster); + Assert.IsNotNull(cluster); + Assert.IsTrue(string.IsNullOrEmpty(cluster.HttpUserName)); + Assert.IsTrue(string.IsNullOrEmpty(cluster.HttpPassword)); + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + + private static AzureHDInsightCluster GetClusterWithHttpAccessDisabled(IHDInsightCertificateCredential creds) + { + IGetAzureHDInsightClusterCommand client = ServiceLocator.Instance.Locate().CreateGet(); + client.CurrentSubscription = GetCurrentSubscription(); + client.EndProcessing(); + List clusters = client.Output.ToList(); + AzureHDInsightCluster containerWithHttpAccessDisabled = clusters.FirstOrDefault(cluster => cluster.HttpUserName.IsNullOrEmpty()); + if (containerWithHttpAccessDisabled == null) + { + containerWithHttpAccessDisabled = clusters.Last(); + DisableHttpAccessToCluster(creds, containerWithHttpAccessDisabled); + } + + return containerWithHttpAccessDisabled; + } + + private static AzureHDInsightCluster DisableHttpAccessToCluster( + IHDInsightCertificateCredential creds, AzureHDInsightCluster containerWithHttpAccessDisabled) + { + IManageAzureHDInsightHttpAccessCommand httpManagementClient = + ServiceLocator.Instance.Locate().CreateManageHttpAccess(); + httpManagementClient.CurrentSubscription = GetCurrentSubscription(); + httpManagementClient.Credential = GetAzurePsCredentials(); + httpManagementClient.Name = containerWithHttpAccessDisabled.Name; + httpManagementClient.Location = containerWithHttpAccessDisabled.Location; + httpManagementClient.Enable = false; + httpManagementClient.EndProcessing(); + return httpManagementClient.Output.First(); + } + + private static AzureHDInsightCluster EnableHttpAccessToCluster( + IHDInsightCertificateCredential creds, AzureHDInsightCluster containerWithHttpAccessDisabled, string httpUserName, string httpPassword) + { + IManageAzureHDInsightHttpAccessCommand httpManagementClient = + ServiceLocator.Instance.Locate().CreateManageHttpAccess(); + httpManagementClient.CurrentSubscription = GetCurrentSubscription(); + httpManagementClient.Credential = GetPSCredential(httpUserName, httpPassword); + httpManagementClient.Name = containerWithHttpAccessDisabled.Name; + httpManagementClient.Location = containerWithHttpAccessDisabled.Location; + httpManagementClient.Enable = true; + httpManagementClient.EndProcessing(); + return httpManagementClient.Output.First(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/NewHDInsightMapReduceJobCommandTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/NewHDInsightMapReduceJobCommandTests.cs new file mode 100644 index 000000000000..ba10c58833fb --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/NewHDInsightMapReduceJobCommandTests.cs @@ -0,0 +1,237 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using Microsoft.Hadoop.Client; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CommandTests +{ + [TestClass] + public class NewHDInsightMapReduceJobCommandTests : HDInsightTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightMapReduceJobDefinition")] + public void CanCreateNewMapReduceDefinition() + { + var mapReduceJobDefinition = new MapReduceJobCreateParameters + { + JobName = "pi estimation jobDetails", + ClassName = "pi", + JarFile = TestConstants.WabsProtocolSchemeName + "container@hostname/examples.jar" + }; + + INewAzureHDInsightMapReduceJobDefinitionCommand newMapReduceJobDefinitionCommand = + ServiceLocator.Instance.Locate().CreateNewMapReduceDefinition(); + newMapReduceJobDefinitionCommand.JobName = mapReduceJobDefinition.JobName; + newMapReduceJobDefinitionCommand.JarFile = mapReduceJobDefinition.JarFile; + newMapReduceJobDefinitionCommand.ClassName = mapReduceJobDefinition.ClassName; + newMapReduceJobDefinitionCommand.EndProcessing(); + + AzureHDInsightMapReduceJobDefinition mapReduceJobFromCommand = newMapReduceJobDefinitionCommand.Output.ElementAt(0); + + Assert.AreEqual(mapReduceJobDefinition.JobName, mapReduceJobFromCommand.JobName); + Assert.AreEqual(mapReduceJobDefinition.ClassName, mapReduceJobFromCommand.ClassName); + Assert.AreEqual(mapReduceJobDefinition.JarFile, mapReduceJobFromCommand.JarFile); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightMapReduceJobDefinition")] + public void CanCreateNewMapReduceDefinition_WithArguments() + { + var mapReduceJobDefinition = new MapReduceJobCreateParameters + { + JobName = "pi estimation jobDetails", + ClassName = "pi", + JarFile = TestConstants.WabsProtocolSchemeName + "container@hostname/examples.jar" + }; + mapReduceJobDefinition.Arguments.Add("16"); + mapReduceJobDefinition.Arguments.Add("10000"); + + INewAzureHDInsightMapReduceJobDefinitionCommand newMapReduceJobDefinitionCommand = + ServiceLocator.Instance.Locate().CreateNewMapReduceDefinition(); + newMapReduceJobDefinitionCommand.JobName = mapReduceJobDefinition.JobName; + newMapReduceJobDefinitionCommand.JarFile = mapReduceJobDefinition.JarFile; + newMapReduceJobDefinitionCommand.ClassName = mapReduceJobDefinition.ClassName; + newMapReduceJobDefinitionCommand.Arguments = mapReduceJobDefinition.Arguments.ToArray(); + newMapReduceJobDefinitionCommand.EndProcessing(); + + AzureHDInsightMapReduceJobDefinition mapReduceJobFromCommand = newMapReduceJobDefinitionCommand.Output.ElementAt(0); + + Assert.AreEqual(mapReduceJobDefinition.JobName, mapReduceJobFromCommand.JobName); + Assert.AreEqual(mapReduceJobDefinition.ClassName, mapReduceJobFromCommand.ClassName); + Assert.AreEqual(mapReduceJobDefinition.JarFile, mapReduceJobFromCommand.JarFile); + + foreach (string argument in mapReduceJobDefinition.Arguments) + { + Assert.IsTrue( + mapReduceJobFromCommand.Arguments.Any(arg => string.Equals(argument, arg)), + "Unable to find argument '{0}' in value returned from command", + argument); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightMapReduceJobDefinition")] + public void CanCreateNewMapReduceDefinition_WithLibJars() + { + var mapReduceJobDefinition = new MapReduceJobCreateParameters + { + JobName = "pi estimation jobDetails", + ClassName = "pi", + JarFile = TestConstants.WabsProtocolSchemeName + "container@hostname/examples.jar" + }; + mapReduceJobDefinition.LibJars.Add("pidata.jar"); + mapReduceJobDefinition.LibJars.Add("pidata2.jar"); + + INewAzureHDInsightMapReduceJobDefinitionCommand newMapReduceJobDefinitionCommand = + ServiceLocator.Instance.Locate().CreateNewMapReduceDefinition(); + newMapReduceJobDefinitionCommand.JobName = mapReduceJobDefinition.JobName; + newMapReduceJobDefinitionCommand.JarFile = mapReduceJobDefinition.JarFile; + newMapReduceJobDefinitionCommand.ClassName = mapReduceJobDefinition.ClassName; + newMapReduceJobDefinitionCommand.LibJars = mapReduceJobDefinition.LibJars.ToArray(); + newMapReduceJobDefinitionCommand.EndProcessing(); + + AzureHDInsightMapReduceJobDefinition mapReduceJobFromCommand = newMapReduceJobDefinitionCommand.Output.ElementAt(0); + + Assert.AreEqual(mapReduceJobDefinition.JobName, mapReduceJobFromCommand.JobName); + Assert.AreEqual(mapReduceJobDefinition.ClassName, mapReduceJobFromCommand.ClassName); + Assert.AreEqual(mapReduceJobDefinition.JarFile, mapReduceJobFromCommand.JarFile); + + foreach (string libjar in mapReduceJobDefinition.LibJars) + { + Assert.IsTrue( + mapReduceJobFromCommand.LibJars.Any(arg => string.Equals(libjar, arg)), + "Unable to find LibJar '{0}' in value returned from command", + libjar); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightMapReduceJobDefinition")] + public void CanCreateNewMapReduceDefinition_WithParameters() + { + var mapReduceJobDefinition = new MapReduceJobCreateParameters + { + JobName = "pi estimation jobDetails", + ClassName = "pi", + JarFile = TestConstants.WabsProtocolSchemeName + "container@hostname/examples.jar" + }; + + mapReduceJobDefinition.Defines.Add("map.input.tasks", "1000"); + mapReduceJobDefinition.Defines.Add("map.input.reducers", "1000"); + + + INewAzureHDInsightMapReduceJobDefinitionCommand newMapReduceJobDefinitionCommand = + ServiceLocator.Instance.Locate().CreateNewMapReduceDefinition(); + newMapReduceJobDefinitionCommand.JobName = mapReduceJobDefinition.JobName; + newMapReduceJobDefinitionCommand.JarFile = mapReduceJobDefinition.JarFile; + newMapReduceJobDefinitionCommand.ClassName = mapReduceJobDefinition.ClassName; + foreach (var define in mapReduceJobDefinition.Defines) + { + newMapReduceJobDefinitionCommand.Defines.Add(define.Key, define.Value); + } + + newMapReduceJobDefinitionCommand.EndProcessing(); + + AzureHDInsightMapReduceJobDefinition mapReduceJobFromCommand = newMapReduceJobDefinitionCommand.Output.ElementAt(0); + + Assert.AreEqual(mapReduceJobDefinition.JobName, mapReduceJobFromCommand.JobName); + Assert.AreEqual(mapReduceJobDefinition.ClassName, mapReduceJobFromCommand.ClassName); + Assert.AreEqual(mapReduceJobDefinition.JarFile, mapReduceJobFromCommand.JarFile); + + foreach (var parameter in mapReduceJobDefinition.Defines) + { + Assert.IsTrue( + mapReduceJobFromCommand.Defines.Any(arg => string.Equals(parameter.Key, arg.Key) && string.Equals(parameter.Value, arg.Value)), + "Unable to find parameter '{0}' in value returned from command", + parameter.Key); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightMapReduceJobDefinition")] + public void CanCreateNewMapReduceDefinition_WithResources() + { + var mapReduceJobDefinition = new MapReduceJobCreateParameters + { + JobName = "pi estimation jobDetails", + ClassName = "pi", + JarFile = TestConstants.WabsProtocolSchemeName + "container@hostname/examples.jar" + }; + mapReduceJobDefinition.Files.Add("pidata.txt"); + mapReduceJobDefinition.Files.Add("pidate2.txt"); + + INewAzureHDInsightMapReduceJobDefinitionCommand newMapReduceJobDefinitionCommand = + ServiceLocator.Instance.Locate().CreateNewMapReduceDefinition(); + newMapReduceJobDefinitionCommand.JobName = mapReduceJobDefinition.JobName; + newMapReduceJobDefinitionCommand.JarFile = mapReduceJobDefinition.JarFile; + newMapReduceJobDefinitionCommand.ClassName = mapReduceJobDefinition.ClassName; + newMapReduceJobDefinitionCommand.Files = mapReduceJobDefinition.Files.ToArray(); + newMapReduceJobDefinitionCommand.EndProcessing(); + + AzureHDInsightMapReduceJobDefinition mapReduceJobFromCommand = newMapReduceJobDefinitionCommand.Output.ElementAt(0); + + Assert.AreEqual(mapReduceJobDefinition.JobName, mapReduceJobFromCommand.JobName); + Assert.AreEqual(mapReduceJobDefinition.ClassName, mapReduceJobFromCommand.ClassName); + Assert.AreEqual(mapReduceJobDefinition.JarFile, mapReduceJobFromCommand.JarFile); + + foreach (string resource in mapReduceJobDefinition.Files) + { + Assert.IsTrue( + mapReduceJobFromCommand.Files.Any(arg => string.Equals(resource, arg)), + "Unable to find File '{0}' in value returned from command", + resource); + } + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/NewHDInsightPigJobCommandTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/NewHDInsightPigJobCommandTests.cs new file mode 100644 index 000000000000..fc63e5223693 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/NewHDInsightPigJobCommandTests.cs @@ -0,0 +1,125 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using Microsoft.Hadoop.Client; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CommandTests +{ + [TestClass] + public class NewHDInsightPigJobCommandTests : HDInsightTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightPigJobDefinition")] + public void CanCreateNewPigDefinition() + { + var pigJobDefinition = new PigJobCreateParameters { Query = "load 'passwd' using PigStorage(':'); B = foreach A generate $0 as id;" }; + + INewAzureHDInsightPigJobDefinitionCommand newPigJobDefinitionCommand = + ServiceLocator.Instance.Locate().CreateNewPigJobDefinition(); + newPigJobDefinitionCommand.Query = pigJobDefinition.Query; + newPigJobDefinitionCommand.EndProcessing(); + + AzureHDInsightPigJobDefinition pigJobFromCommand = newPigJobDefinitionCommand.Output.ElementAt(0); + + Assert.AreEqual(pigJobDefinition.Query, pigJobFromCommand.Query); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightPigJobDefinition")] + public void CanCreateNewPigDefinition_WithArguments() + { + var pigJobDefinition = new PigJobCreateParameters { Query = "load 'passwd' using PigStorage(':'); B = foreach A generate $0 as id;" }; + + pigJobDefinition.Arguments.Add("map.input.tasks=1000"); + pigJobDefinition.Arguments.Add("map.input.reducers=1000"); + + + INewAzureHDInsightPigJobDefinitionCommand newPigJobDefinitionCommand = + ServiceLocator.Instance.Locate().CreateNewPigJobDefinition(); + newPigJobDefinitionCommand.Query = pigJobDefinition.Query; + newPigJobDefinitionCommand.Arguments = pigJobDefinition.Arguments.ToArray(); + newPigJobDefinitionCommand.EndProcessing(); + + AzureHDInsightPigJobDefinition pigJobFromCommand = newPigJobDefinitionCommand.Output.ElementAt(0); + + Assert.AreEqual(pigJobDefinition.Query, pigJobFromCommand.Query); + + foreach (string parameter in pigJobDefinition.Arguments) + { + Assert.IsTrue( + pigJobFromCommand.Arguments.Any(arg => string.Equals(parameter, arg)), + "Unable to find parameter '{0}' in value returned from command", + parameter); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightPigJobDefinition")] + public void CanCreateNewPigDefinition_WithResources() + { + var pigJobDefinition = new PigJobCreateParameters { Query = "load 'passwd' using PigStorage(':'); B = foreach A generate $0 as id;" }; + pigJobDefinition.Files.Add("pidata.txt"); + pigJobDefinition.Files.Add("pidate2.txt"); + + INewAzureHDInsightPigJobDefinitionCommand newPigJobDefinitionCommand = + ServiceLocator.Instance.Locate().CreateNewPigJobDefinition(); + newPigJobDefinitionCommand.Query = pigJobDefinition.Query; + newPigJobDefinitionCommand.Files = pigJobDefinition.Files.ToArray(); + newPigJobDefinitionCommand.EndProcessing(); + + AzureHDInsightPigJobDefinition pigJobFromCommand = newPigJobDefinitionCommand.Output.ElementAt(0); + + Assert.AreEqual(pigJobDefinition.Query, pigJobFromCommand.Query); + + foreach (string resource in pigJobDefinition.Files) + { + Assert.IsTrue( + pigJobFromCommand.Files.Any(arg => string.Equals(resource, arg)), + "Unable to find File '{0}' in value returned from command", + resource); + } + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/NewHDInsightSqoopJobCommandTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/NewHDInsightSqoopJobCommandTests.cs new file mode 100644 index 000000000000..1259902366b0 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/NewHDInsightSqoopJobCommandTests.cs @@ -0,0 +1,118 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using Microsoft.Hadoop.Client; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CommandTests +{ + [TestClass] + public class NewHDInsightSqoopJobCommandTests : HDInsightTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightSqoopJobDefinition")] + public void CanCreateNewSqoopDefinition() + { + var pigJobDefinition = new SqoopJobCreateParameters + { + Command = "load 'passwd' using SqoopStorage(':'); B = foreach A generate $0 as id;" + }; + + INewAzureHDInsightSqoopJobDefinitionCommand newSqoopJobDefinitionCommand = + ServiceLocator.Instance.Locate().CreateNewSqoopDefinition(); + newSqoopJobDefinitionCommand.Command = pigJobDefinition.Command; + newSqoopJobDefinitionCommand.EndProcessing(); + + AzureHDInsightSqoopJobDefinition pigJobFromCommand = newSqoopJobDefinitionCommand.Output.ElementAt(0); + + Assert.AreEqual(pigJobDefinition.Command, pigJobFromCommand.Command); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightSqoopJobDefinition")] + public void CanCreateNewSqoopDefinition_WithFile() + { + var pigJobDefinition = new SqoopJobCreateParameters { File = "my local file" }; + + INewAzureHDInsightSqoopJobDefinitionCommand newSqoopJobDefinitionCommand = + ServiceLocator.Instance.Locate().CreateNewSqoopDefinition(); + newSqoopJobDefinitionCommand.File = pigJobDefinition.File; + newSqoopJobDefinitionCommand.EndProcessing(); + + AzureHDInsightSqoopJobDefinition pigJobFromCommand = newSqoopJobDefinitionCommand.Output.ElementAt(0); + + Assert.AreEqual(pigJobDefinition.File, pigJobFromCommand.File); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightSqoopJobDefinition")] + public void CanCreateNewSqoopDefinition_WithResources() + { + var pigJobDefinition = new SqoopJobCreateParameters + { + Command = "load 'passwd' using SqoopStorage(':'); B = foreach A generate $0 as id;" + }; + pigJobDefinition.Files.Add("pidata.txt"); + pigJobDefinition.Files.Add("pidate2.txt"); + + INewAzureHDInsightSqoopJobDefinitionCommand newSqoopJobDefinitionCommand = + ServiceLocator.Instance.Locate().CreateNewSqoopDefinition(); + newSqoopJobDefinitionCommand.Command = pigJobDefinition.Command; + newSqoopJobDefinitionCommand.Files = pigJobDefinition.Files.ToArray(); + newSqoopJobDefinitionCommand.EndProcessing(); + + AzureHDInsightSqoopJobDefinition pigJobFromCommand = newSqoopJobDefinitionCommand.Output.ElementAt(0); + + Assert.AreEqual(pigJobDefinition.Command, pigJobFromCommand.Command); + + foreach (string resource in pigJobDefinition.Files) + { + Assert.IsTrue( + pigJobFromCommand.Files.Any(arg => string.Equals(resource, arg)), + "Unable to find File '{0}' in value returned from command", + resource); + } + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/NewHDInsightStreamingMapReduceJobCommandTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/NewHDInsightStreamingMapReduceJobCommandTests.cs new file mode 100644 index 000000000000..655796810a20 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/NewHDInsightStreamingMapReduceJobCommandTests.cs @@ -0,0 +1,203 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections; +using System.Linq; +using Microsoft.Hadoop.Client; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CommandTests +{ + [TestClass] + public class NewHDInsightStreamingMapReduceJobCommandTests : HDInsightTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightStreamingMapReduceJobDefinition")] + public void CanCreateNewStreamingMapReduceDefinition() + { + StreamingMapReduceJobCreateParameters streamingMapReduceJobDefinition = this.GetStreamingMapReduceJob(); + + INewAzureHDInsightStreamingJobDefinitionCommand newStreamingMapReduceJobDefinitionCommand = + ServiceLocator.Instance.Locate().CreateNewStreamingMapReduceDefinition(); + newStreamingMapReduceJobDefinitionCommand.JobName = streamingMapReduceJobDefinition.JobName; + newStreamingMapReduceJobDefinitionCommand.JobName = streamingMapReduceJobDefinition.JobName; + newStreamingMapReduceJobDefinitionCommand.InputPath = streamingMapReduceJobDefinition.Input; + newStreamingMapReduceJobDefinitionCommand.OutputPath = streamingMapReduceJobDefinition.Output; + newStreamingMapReduceJobDefinitionCommand.Mapper = streamingMapReduceJobDefinition.Mapper; + newStreamingMapReduceJobDefinitionCommand.Reducer = streamingMapReduceJobDefinition.Reducer; + newStreamingMapReduceJobDefinitionCommand.StatusFolder = streamingMapReduceJobDefinition.StatusFolder; + newStreamingMapReduceJobDefinitionCommand.EndProcessing(); + + AzureHDInsightStreamingMapReduceJobDefinition streamingMapReduceJobFromCommand = + newStreamingMapReduceJobDefinitionCommand.Output.ElementAt(0); + + NewStreamingMapReduceJobCmdLetTests.AssertJobDefinitionsEqual(streamingMapReduceJobDefinition, streamingMapReduceJobFromCommand); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightStreamingMapReduceJobDefinition")] + public void CanCreateNewStreamingMapReduceDefinition_WithArguments() + { + StreamingMapReduceJobCreateParameters streamingMapReduceJobDefinition = this.GetStreamingMapReduceJob(); + streamingMapReduceJobDefinition.Arguments.Add("16"); + streamingMapReduceJobDefinition.Arguments.Add("10000"); + + INewAzureHDInsightStreamingJobDefinitionCommand newStreamingMapReduceJobDefinitionCommand = + ServiceLocator.Instance.Locate().CreateNewStreamingMapReduceDefinition(); + newStreamingMapReduceJobDefinitionCommand.JobName = streamingMapReduceJobDefinition.JobName; + newStreamingMapReduceJobDefinitionCommand.JobName = streamingMapReduceJobDefinition.JobName; + newStreamingMapReduceJobDefinitionCommand.InputPath = streamingMapReduceJobDefinition.Input; + newStreamingMapReduceJobDefinitionCommand.OutputPath = streamingMapReduceJobDefinition.Output; + newStreamingMapReduceJobDefinitionCommand.Mapper = streamingMapReduceJobDefinition.Mapper; + newStreamingMapReduceJobDefinitionCommand.Reducer = streamingMapReduceJobDefinition.Reducer; + newStreamingMapReduceJobDefinitionCommand.StatusFolder = streamingMapReduceJobDefinition.StatusFolder; + newStreamingMapReduceJobDefinitionCommand.Arguments = streamingMapReduceJobDefinition.Arguments.ToArray(); + newStreamingMapReduceJobDefinitionCommand.EndProcessing(); + + AzureHDInsightStreamingMapReduceJobDefinition streamingMapReduceJobFromCommand = + newStreamingMapReduceJobDefinitionCommand.Output.ElementAt(0); + + NewStreamingMapReduceJobCmdLetTests.AssertJobDefinitionsEqual(streamingMapReduceJobDefinition, streamingMapReduceJobFromCommand); + + foreach (string argument in streamingMapReduceJobDefinition.Arguments) + { + Assert.IsTrue( + streamingMapReduceJobFromCommand.Arguments.Any(arg => string.Equals(argument, arg)), + "Unable to find argument '{0}' in value returned from command", + argument); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightStreamingMapReduceJobDefinition")] + public void CanCreateNewStreamingMapReduceDefinition_WithParameters() + { + StreamingMapReduceJobCreateParameters streamingMapReduceJobDefinition = this.GetStreamingMapReduceJob(); + + streamingMapReduceJobDefinition.Defines.Add("map.input.tasks", "1000"); + streamingMapReduceJobDefinition.Defines.Add("map.input.reducers", "1000"); + + INewAzureHDInsightStreamingJobDefinitionCommand newStreamingMapReduceJobDefinitionCommand = + ServiceLocator.Instance.Locate().CreateNewStreamingMapReduceDefinition(); + newStreamingMapReduceJobDefinitionCommand.JobName = streamingMapReduceJobDefinition.JobName; + newStreamingMapReduceJobDefinitionCommand.JobName = streamingMapReduceJobDefinition.JobName; + newStreamingMapReduceJobDefinitionCommand.InputPath = streamingMapReduceJobDefinition.Input; + newStreamingMapReduceJobDefinitionCommand.OutputPath = streamingMapReduceJobDefinition.Output; + newStreamingMapReduceJobDefinitionCommand.Mapper = streamingMapReduceJobDefinition.Mapper; + newStreamingMapReduceJobDefinitionCommand.Reducer = streamingMapReduceJobDefinition.Reducer; + newStreamingMapReduceJobDefinitionCommand.StatusFolder = streamingMapReduceJobDefinition.StatusFolder; + newStreamingMapReduceJobDefinitionCommand.Defines = new Hashtable(); + foreach (var define in streamingMapReduceJobDefinition.Defines) + { + newStreamingMapReduceJobDefinitionCommand.Defines.Add(define.Key, define.Value); + } + newStreamingMapReduceJobDefinitionCommand.EndProcessing(); + + AzureHDInsightStreamingMapReduceJobDefinition streamingMapReduceJobFromCommand = + newStreamingMapReduceJobDefinitionCommand.Output.ElementAt(0); + + NewStreamingMapReduceJobCmdLetTests.AssertJobDefinitionsEqual(streamingMapReduceJobDefinition, streamingMapReduceJobFromCommand); + + foreach (var parameter in streamingMapReduceJobDefinition.Defines) + { + Assert.IsTrue( + streamingMapReduceJobFromCommand.Defines.Any( + arg => string.Equals(parameter.Key, arg.Key) && string.Equals(parameter.Value, arg.Value)), + "Unable to find parameter '{0}' in value returned from command", + parameter.Key); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("New-AzureHDInsightStreamingMapReduceJobDefinition")] + public void CanCreateNewStreamingMapReduceDefinition_WithResources() + { + StreamingMapReduceJobCreateParameters streamingMapReduceJobDefinition = this.GetStreamingMapReduceJob(); + streamingMapReduceJobDefinition.Files.Add("pidata.txt"); + streamingMapReduceJobDefinition.Files.Add("pidate2.txt"); + + INewAzureHDInsightStreamingJobDefinitionCommand newStreamingMapReduceJobDefinitionCommand = + ServiceLocator.Instance.Locate().CreateNewStreamingMapReduceDefinition(); + newStreamingMapReduceJobDefinitionCommand.JobName = streamingMapReduceJobDefinition.JobName; + newStreamingMapReduceJobDefinitionCommand.JobName = streamingMapReduceJobDefinition.JobName; + newStreamingMapReduceJobDefinitionCommand.InputPath = streamingMapReduceJobDefinition.Input; + newStreamingMapReduceJobDefinitionCommand.OutputPath = streamingMapReduceJobDefinition.Output; + newStreamingMapReduceJobDefinitionCommand.Mapper = streamingMapReduceJobDefinition.Mapper; + newStreamingMapReduceJobDefinitionCommand.Reducer = streamingMapReduceJobDefinition.Reducer; + newStreamingMapReduceJobDefinitionCommand.StatusFolder = streamingMapReduceJobDefinition.StatusFolder; + newStreamingMapReduceJobDefinitionCommand.Files = streamingMapReduceJobDefinition.Files.ToArray(); + newStreamingMapReduceJobDefinitionCommand.EndProcessing(); + + AzureHDInsightStreamingMapReduceJobDefinition streamingMapReduceJobFromCommand = + newStreamingMapReduceJobDefinitionCommand.Output.ElementAt(0); + + NewStreamingMapReduceJobCmdLetTests.AssertJobDefinitionsEqual(streamingMapReduceJobDefinition, streamingMapReduceJobFromCommand); + + foreach (string resource in streamingMapReduceJobDefinition.Files) + { + Assert.IsTrue( + streamingMapReduceJobFromCommand.Files.Any(arg => string.Equals(resource, arg)), + "Unable to find File '{0}' in value returned from command", + resource); + } + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + + private StreamingMapReduceJobCreateParameters GetStreamingMapReduceJob() + { + return new StreamingMapReduceJobCreateParameters + { + JobName = "pi estimation jobDetails", + Input = TestConstants.WabsProtocolSchemeName + "input", + Output = TestConstants.WabsProtocolSchemeName + "input", + Mapper = TestConstants.WabsProtocolSchemeName + "combiner", + Reducer = TestConstants.WabsProtocolSchemeName + "combiner", + StatusFolder = TestConstants.WabsProtocolSchemeName + "someotherlocation" + }; + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/StartAzureHDInsightJobCommandTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/StartAzureHDInsightJobCommandTests.cs new file mode 100644 index 000000000000..fa5eac167fd6 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/StartAzureHDInsightJobCommandTests.cs @@ -0,0 +1,494 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using Microsoft.Hadoop.Client; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities; +using Microsoft.WindowsAzure.Management.HDInsight; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CommandTests +{ + [TestClass] + public class StartAzureHDInsightJobCommandTests : HDInsightTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Start-AzureHDInsightJob")] + public void CanAutoGenerateStatusDirectoryForMapReduceJob() + { + var mapReduceJobDefinition = new AzureHDInsightMapReduceJobDefinition + { + JobName = "pi estimation jobDetails", + ClassName = "pi", + JarFile = TestConstants.WabsProtocolSchemeName + "container@hostname/examples.jar" + }; + + AzureHDInsightJob startedJob = TestJobStart(mapReduceJobDefinition); + Assert.IsFalse(string.IsNullOrEmpty(startedJob.StatusDirectory)); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Start-AzureHDInsightJob")] + public void CanCreateNewHiveJob_StartJob() + { + var hiveJobDefinition = new HiveJobCreateParameters { JobName = "show tables jobDetails", Query = "show tables" }; + + INewAzureHDInsightHiveJobDefinitionCommand newHiveJobDefinitionCommand = + ServiceLocator.Instance.Locate().CreateNewHiveDefinition(); + newHiveJobDefinitionCommand.JobName = hiveJobDefinition.JobName; + newHiveJobDefinitionCommand.Query = hiveJobDefinition.Query; + newHiveJobDefinitionCommand.EndProcessing(); + + AzureHDInsightHiveJobDefinition hiveJobFromCommand = newHiveJobDefinitionCommand.Output.ElementAt(0); + TestJobStart(hiveJobFromCommand); + } + + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Start-AzureHDInsightJob")] + public void CannotCreateNewHiveJob_WithRestrictedCharacters_StartJob() + { + var hiveJobDefinition = new HiveJobCreateParameters { JobName = "show tables jobDetails", Query = "show tables %" }; + + INewAzureHDInsightHiveJobDefinitionCommand newHiveJobDefinitionCommand = + ServiceLocator.Instance.Locate().CreateNewHiveDefinition(); + newHiveJobDefinitionCommand.JobName = hiveJobDefinition.JobName; + newHiveJobDefinitionCommand.Query = hiveJobDefinition.Query; + newHiveJobDefinitionCommand.EndProcessing(); + + AzureHDInsightHiveJobDefinition hiveJobFromCommand = newHiveJobDefinitionCommand.Output.ElementAt(0); + try + { + TestJobStart(hiveJobFromCommand); + Assert.Fail(); + } + catch (AggregateException aggregateException) + { + var invalidOperationException = aggregateException.GetBaseException() as InvalidOperationException; + Assert.IsNotNull(invalidOperationException); + Assert.IsTrue(invalidOperationException.Message.Contains("Query contains restricted character :'%'"), "Exception not thrown for special character"); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Start-AzureHDInsightJob")] + public void CanCreateNewHiveJob_WithoutJobName_WithFile() + { + var hiveJobDefinition = new AzureHDInsightHiveJobDefinition + { + File = TestConstants.WabsProtocolSchemeName + "container@hostname/Container1/myqueryfile.hql" + }; + + AzureHDInsightJob startedJob = TestJobStart(hiveJobDefinition); + Assert.AreEqual(startedJob.Name, "Hive: myqueryfile.hql"); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Start-AzureHDInsightJob")] + public void CanCreateNewHiveJob_WithoutJobName_WithQuery() + { + var hiveJobDefinition = new AzureHDInsightHiveJobDefinition { Query = "show tables" }; + + AzureHDInsightJob startedJob = TestJobStart(hiveJobDefinition); + Assert.AreEqual(startedJob.Name, "Hive: show tables"); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Start-AzureHDInsightJob")] + public void CanCreateNewMapReduceJob_StartJob() + { + var mapReduceJobDefinition = new MapReduceJobCreateParameters + { + JobName = "pi estimation jobDetails", + ClassName = "pi", + JarFile = TestConstants.WabsProtocolSchemeName + "container@hostname/examples.jar" + }; + + INewAzureHDInsightMapReduceJobDefinitionCommand newMapReduceJobDefinitionCommand = + ServiceLocator.Instance.Locate().CreateNewMapReduceDefinition(); + newMapReduceJobDefinitionCommand.JobName = mapReduceJobDefinition.JobName; + newMapReduceJobDefinitionCommand.JarFile = mapReduceJobDefinition.JarFile; + newMapReduceJobDefinitionCommand.ClassName = mapReduceJobDefinition.ClassName; + newMapReduceJobDefinitionCommand.EndProcessing(); + + AzureHDInsightMapReduceJobDefinition mapReduceJobFromCommand = newMapReduceJobDefinitionCommand.Output.ElementAt(0); + + TestJobStart(mapReduceJobFromCommand); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Start-AzureHDInsightJob")] + public void CanCreateNewMapReduceJob_WithoutJobName() + { + var mapReduceJobDefinition = new AzureHDInsightMapReduceJobDefinition + { + ClassName = "pi", + JarFile = TestConstants.WabsProtocolSchemeName + "container@hostname/examples.jar", + StatusFolder = "/myoutputfolder" + }; + + AzureHDInsightJob startedJob = TestJobStart(mapReduceJobDefinition); + Assert.AreEqual("pi", startedJob.Name); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Start-AzureHDInsightJob")] + public void CanCreateNewPigJob_StartJob() + { + var pigJobDefinition = new PigJobCreateParameters { Query = "load table from 'A'" }; + + INewAzureHDInsightPigJobDefinitionCommand newMapReduceJobDefinitionCommand = + ServiceLocator.Instance.Locate().CreateNewPigJobDefinition(); + newMapReduceJobDefinitionCommand.Query = pigJobDefinition.Query; + newMapReduceJobDefinitionCommand.EndProcessing(); + + AzureHDInsightPigJobDefinition pigJobFromCommand = newMapReduceJobDefinitionCommand.Output.ElementAt(0); + + TestJobStart(pigJobFromCommand); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Start-AzureHDInsightJob")] + public void CannotCreateNewPigJob_WithRestrictedCharacters_StartJob() + { + var pigJobDefinition = new PigJobCreateParameters { Query = "load table from 'A' %" }; + + INewAzureHDInsightPigJobDefinitionCommand newMapReduceJobDefinitionCommand = + ServiceLocator.Instance.Locate().CreateNewPigJobDefinition(); + newMapReduceJobDefinitionCommand.Query = pigJobDefinition.Query; + newMapReduceJobDefinitionCommand.EndProcessing(); + + AzureHDInsightPigJobDefinition pigJobFromCommand = newMapReduceJobDefinitionCommand.Output.ElementAt(0); + try + { + TestJobStart(pigJobFromCommand); + Assert.Fail(); + } + catch (AggregateException aggregateException) + { + var invalidOperationException = aggregateException.GetBaseException() as InvalidOperationException; + Assert.IsNotNull(invalidOperationException); + Assert.IsTrue(invalidOperationException.Message.Contains("Query contains restricted character :'%'"), "Exception not thrown for special character"); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Start-AzureHDInsightJob")] + public void CanCreateNewPigJob_WithoutJobName_WithFile() + { + var pigJobDefinition = new AzureHDInsightPigJobDefinition + { + File = TestConstants.WabsProtocolSchemeName + "container@hostname/Container1/myqueryfile.hql" + }; + + AzureHDInsightJob startedJob = TestJobStart(pigJobDefinition); + Assert.AreEqual(string.Empty, startedJob.Name); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Start-AzureHDInsightJob")] + public void CanCreateNewPigJob_WithoutJobName_WithQuery() + { + var pigJobDefinition = new AzureHDInsightPigJobDefinition { Query = "show tables" }; + + AzureHDInsightJob startedJob = TestJobStart(pigJobDefinition); + Assert.AreEqual(string.Empty, startedJob.Name); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Start-AzureHDInsightJob")] + public void CanCreateNewStreamingJob_StartJob() + { + var streamingMapReduceJobDefinition = new StreamingMapReduceJobCreateParameters + { + JobName = "pi estimation jobDetails", + Input = TestConstants.WabsProtocolSchemeName + "container@hostname/input", + Output = TestConstants.WabsProtocolSchemeName + "container@hostname/input", + Mapper = TestConstants.WabsProtocolSchemeName + "container@hostname/combiner", + Reducer = TestConstants.WabsProtocolSchemeName + "container@hostname/combiner", + StatusFolder = TestConstants.WabsProtocolSchemeName + "container@hostname/someotherlocation" + }; + + INewAzureHDInsightStreamingJobDefinitionCommand newStreamingMapReduceJobDefinitionCommand = + ServiceLocator.Instance.Locate().CreateNewStreamingMapReduceDefinition(); + newStreamingMapReduceJobDefinitionCommand.JobName = streamingMapReduceJobDefinition.JobName; + newStreamingMapReduceJobDefinitionCommand.JobName = streamingMapReduceJobDefinition.JobName; + newStreamingMapReduceJobDefinitionCommand.InputPath = streamingMapReduceJobDefinition.Input; + newStreamingMapReduceJobDefinitionCommand.OutputPath = streamingMapReduceJobDefinition.Output; + newStreamingMapReduceJobDefinitionCommand.Mapper = streamingMapReduceJobDefinition.Mapper; + newStreamingMapReduceJobDefinitionCommand.Reducer = streamingMapReduceJobDefinition.Reducer; + newStreamingMapReduceJobDefinitionCommand.StatusFolder = streamingMapReduceJobDefinition.StatusFolder; + newStreamingMapReduceJobDefinitionCommand.EndProcessing(); + + AzureHDInsightStreamingMapReduceJobDefinition streamingJobFromCommand = newStreamingMapReduceJobDefinitionCommand.Output.ElementAt(0); + + TestJobStart(streamingJobFromCommand); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Start-AzureHDInsightJob")] + public void CanCreateNewStreamingMapReduceJob_WithoutJobName() + { + var streamingMapReduceJobDefinition = new AzureHDInsightStreamingMapReduceJobDefinition + { + Input = TestConstants.WabsProtocolSchemeName + "container@hostname/input", + Output = TestConstants.WabsProtocolSchemeName + "container@hostname/input", + Mapper = TestConstants.WabsProtocolSchemeName + "container@hostname/mapper", + Reducer = TestConstants.WabsProtocolSchemeName + "container@hostname/combiner", + StatusFolder = TestConstants.WabsProtocolSchemeName + "container@hostname/someotherlocation" + }; + + AzureHDInsightJob startedJob = TestJobStart(streamingMapReduceJobDefinition); + Assert.AreEqual(startedJob.Name, "mapper"); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Defect")] + public void CanCreateNewStreamingMapReduceJob_WithoutJobName_FilesName() + { + var streamingMapReduceJobDefinition = new AzureHDInsightStreamingMapReduceJobDefinition + { + Input = "input", + Output = "output", + Mapper = "mapper.exe", + Reducer = "combiner.exe", + StatusFolder = "/someotherlocation" + }; + + AzureHDInsightJob startedJob = TestJobStart(streamingMapReduceJobDefinition); + Assert.AreEqual(startedJob.Name, "mapper.exe"); + } + + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Defect")] + public void CanCreateNewStreamingMapReduceJob_WithoutJobName_FilesRelative() + { + var streamingMapReduceJobDefinition = new AzureHDInsightStreamingMapReduceJobDefinition + { + Input = "input", + Output = "output", + Mapper = "/examples/mapper.exe", + Reducer = "/examples/combiner.exe", + StatusFolder = "/someotherlocation" + }; + + AzureHDInsightJob startedJob = TestJobStart(streamingMapReduceJobDefinition); + Assert.AreEqual("mapper.exe", startedJob.Name); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Start-AzureHDInsightJob")] + public void CanStartHiveJob() + { + var hiveJobDefinition = new AzureHDInsightHiveJobDefinition { JobName = "pi estimation jobDetails", Query = "show tables;" }; + + TestJobStart(hiveJobDefinition); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Start-AzureHDInsightJob")] + public void CanStartMapReduceJob() + { + var mapReduceJobDefinition = new AzureHDInsightMapReduceJobDefinition + { + JobName = "pi estimation jobDetails", + ClassName = "pi", + JarFile = TestConstants.WabsProtocolSchemeName + "container@hostname/examples.jar" + }; + TestJobStart(mapReduceJobDefinition); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Start-AzureHDInsightJob")] + public void CanStartSqoopJob() + { + var sqoopJobDefinition = new AzureHDInsightSqoopJobDefinition { Command = "show tables;" }; + + TestJobStart(sqoopJobDefinition); + } + + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Start-AzureHDInsightJob")] + public void CannotStartSqoopJob_WithRestrictedCharacters() + { + var sqoopJobDefinition = new AzureHDInsightSqoopJobDefinition { Command = "show tables; %" }; + try + { + TestJobStart(sqoopJobDefinition); + Assert.Fail(); + } + catch (AggregateException aggregateException) + { + var invalidOperationException = aggregateException.GetBaseException() as InvalidOperationException; + Assert.IsNotNull(invalidOperationException); + Assert.IsTrue(invalidOperationException.Message.Contains("Query contains restricted character :'%'"), "Exception not thrown for special character"); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Start-AzureHDInsightJob")] + public void CannotStartCustomJobType() + { + try + { + var mapReduceJobDefinition = new HadoopCustomJobCreationDetails { CustomText = "pig text" }; + + TestJobStart(mapReduceJobDefinition); + Assert.Fail("An exception was expected"); + } + catch (AggregateException aex) + { + Exception inner = aex.InnerExceptions.FirstOrDefault(); + Assert.IsNotNull(inner); + Assert.IsInstanceOfType(inner, typeof(NotSupportedException)); + Assert.IsTrue(inner.Message.Contains("Cannot start jobDetails of type")); + Assert.IsTrue(inner.Message.Contains("HadoopCustomJobCreationDetails")); + } + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Start-AzureHDInsightJob")] + public void UserCanSupplyStatusDirectoryForMapReduceJob() + { + var mapReduceJobDefinition = new AzureHDInsightMapReduceJobDefinition + { + JobName = "pi estimation jobDetails", + ClassName = "pi", + JarFile = TestConstants.WabsProtocolSchemeName + "container@hostname/examples.jar", + StatusFolder = "/myoutputfolder" + }; + + AzureHDInsightJob startedJob = TestJobStart(mapReduceJobDefinition); + Assert.AreEqual(startedJob.StatusDirectory, mapReduceJobDefinition.StatusFolder); + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + + private static AzureHDInsightJob TestJobStart(AzureHDInsightJobDefinition mapReduceJobDefinition) + { + ClusterDetails testCluster = CmdletScenariosTestCaseBase.GetHttpAccessEnabledCluster(); + IStartAzureHDInsightJobCommand startJobCommand = ServiceLocator.Instance.Locate().CreateStartJob(); + startJobCommand.Cluster = testCluster.ConnectionUrl; + startJobCommand.Credential = GetPSCredential(testCluster.HttpUserName, testCluster.HttpPassword); + startJobCommand.JobDefinition = mapReduceJobDefinition; + startJobCommand.EndProcessing().Wait(); + AzureHDInsightJob jobCreationResults = startJobCommand.Output.ElementAt(0); + Assert.IsNotNull(jobCreationResults.JobId, "Should get a non-null jobDetails id"); + Assert.IsNotNull(jobCreationResults.StatusDirectory, "StatusDirectory should be set on jobDetails"); + return jobCreationResults; + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/StopAzureHDInsightJobCommandTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/StopAzureHDInsightJobCommandTests.cs new file mode 100644 index 000000000000..d7f41bd8e4a2 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/StopAzureHDInsightJobCommandTests.cs @@ -0,0 +1,232 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using Microsoft.Hadoop.Client; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities; +using Microsoft.WindowsAzure.Management.HDInsight; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CommandTests +{ + [TestClass] + public class StopAzureHDInsightJobCommandTests : HDInsightTestCaseBase + { + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Start-AzureHDInsightJob")] + public void CanCreateNewHiveJob_StartJob_StopJob() + { + var hiveJobDefinition = new HiveJobCreateParameters { JobName = "show tables jobDetails", Query = "show tables" }; + + INewAzureHDInsightHiveJobDefinitionCommand newMapReduceJobDefinitionCommand = + ServiceLocator.Instance.Locate().CreateNewHiveDefinition(); + newMapReduceJobDefinitionCommand.JobName = hiveJobDefinition.JobName; + newMapReduceJobDefinitionCommand.Query = hiveJobDefinition.Query; + newMapReduceJobDefinitionCommand.EndProcessing(); + + AzureHDInsightHiveJobDefinition hiveJobFromCommand = newMapReduceJobDefinitionCommand.Output.ElementAt(0); + TestJobLifecycle(hiveJobFromCommand); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Start-AzureHDInsightJob")] + public void CanCreateNewMapReduceJob_StartJob_StopJob() + { + var mapReduceJobDefinition = new MapReduceJobCreateParameters + { + JobName = "pi estimation job", + ClassName = "pi", + JarFile = TestConstants.WabsProtocolSchemeName + "container@hostname/examples.jar" + }; + + INewAzureHDInsightMapReduceJobDefinitionCommand newMapReduceJobDefinitionCommand = + ServiceLocator.Instance.Locate().CreateNewMapReduceDefinition(); + newMapReduceJobDefinitionCommand.JobName = mapReduceJobDefinition.JobName; + newMapReduceJobDefinitionCommand.JarFile = mapReduceJobDefinition.JarFile; + newMapReduceJobDefinitionCommand.ClassName = mapReduceJobDefinition.ClassName; + newMapReduceJobDefinitionCommand.EndProcessing(); + + AzureHDInsightMapReduceJobDefinition mapReduceJobFromCommand = newMapReduceJobDefinitionCommand.Output.ElementAt(0); + + TestJobLifecycle(mapReduceJobFromCommand); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Start-AzureHDInsightJob")] + public void CanCreateNewPigJob_StartJob_StopJob() + { + var pigJobDefinition = new PigJobCreateParameters { Query = "load table from 'A'" }; + + INewAzureHDInsightPigJobDefinitionCommand newMapReduceJobDefinitionCommand = + ServiceLocator.Instance.Locate().CreateNewPigJobDefinition(); + newMapReduceJobDefinitionCommand.Query = pigJobDefinition.Query; + newMapReduceJobDefinitionCommand.EndProcessing(); + + AzureHDInsightPigJobDefinition pigJobFromCommand = newMapReduceJobDefinitionCommand.Output.ElementAt(0); + + TestJobLifecycle(pigJobFromCommand); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Start-AzureHDInsightJob")] + public void CanCreateNewStreamingJob_StartJob_StopJob() + { + var streamingMapReduceJobDefinition = new StreamingMapReduceJobCreateParameters + { + JobName = "pi estimation jobDetails", + Input = TestConstants.WabsProtocolSchemeName + "input", + Output = TestConstants.WabsProtocolSchemeName + "input", + Mapper = TestConstants.WabsProtocolSchemeName + "combiner", + Reducer = TestConstants.WabsProtocolSchemeName + "combiner", + StatusFolder = TestConstants.WabsProtocolSchemeName + "someotherlocation" + }; + + INewAzureHDInsightStreamingJobDefinitionCommand newStreamingMapReduceJobDefinitionCommand = + ServiceLocator.Instance.Locate().CreateNewStreamingMapReduceDefinition(); + newStreamingMapReduceJobDefinitionCommand.JobName = streamingMapReduceJobDefinition.JobName; + newStreamingMapReduceJobDefinitionCommand.JobName = streamingMapReduceJobDefinition.JobName; + newStreamingMapReduceJobDefinitionCommand.InputPath = streamingMapReduceJobDefinition.Input; + newStreamingMapReduceJobDefinitionCommand.OutputPath = streamingMapReduceJobDefinition.Output; + newStreamingMapReduceJobDefinitionCommand.Mapper = streamingMapReduceJobDefinition.Mapper; + newStreamingMapReduceJobDefinitionCommand.Reducer = streamingMapReduceJobDefinition.Reducer; + newStreamingMapReduceJobDefinitionCommand.StatusFolder = streamingMapReduceJobDefinition.StatusFolder; + newStreamingMapReduceJobDefinitionCommand.EndProcessing(); + + AzureHDInsightStreamingMapReduceJobDefinition streamingJobFromCommand = newStreamingMapReduceJobDefinitionCommand.Output.ElementAt(0); + + TestJobLifecycle(streamingJobFromCommand); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Start-AzureHDInsightJob")] + public void CanStopHiveJob() + { + var hiveJobDefinition = new AzureHDInsightHiveJobDefinition { JobName = "pi estimation jobDetails", Query = "show tables;" }; + + TestJobLifecycle(hiveJobDefinition); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Start-AzureHDInsightJob")] + public void CanStopMapReduceJob() + { + var mapReduceJobDefinition = new AzureHDInsightMapReduceJobDefinition + { + JobName = "pi estimation jobDetails", + ClassName = "pi", + JarFile = TestConstants.WabsProtocolSchemeName + "container@hostname/examples.jar" + }; + + TestJobLifecycle(mapReduceJobDefinition); + } + + [TestMethod] + [TestCategory("CheckIn")] + [TestCategory("Integration")] + + [TestCategory("Jobs")] + [TestCategory("Start-AzureHDInsightJob")] + public void CannotStopNonExistingJob() + { + ClusterDetails testCluster = CmdletScenariosTestCaseBase.GetHttpAccessEnabledCluster(); + TestJobStop(testCluster, Guid.NewGuid().ToString()); + } + + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + + private static AzureHDInsightJob TestJobStart(AzureHDInsightJobDefinition mapReduceJobDefinition) + { + ClusterDetails testCluster = CmdletScenariosTestCaseBase.GetHttpAccessEnabledCluster(); + return TestJobStart(mapReduceJobDefinition, testCluster); + } + + private static void TestJobLifecycle(AzureHDInsightJobDefinition mapReduceJobDefinition) + { + ClusterDetails testCluster = CmdletScenariosTestCaseBase.GetHttpAccessEnabledCluster(); + AzureHDInsightJob startedJob = TestJobStart(mapReduceJobDefinition, testCluster); + TestJobStop(testCluster, startedJob.JobId); + } + + private static AzureHDInsightJob TestJobStart(AzureHDInsightJobDefinition mapReduceJobDefinition, ClusterDetails testCluster) + { + IStartAzureHDInsightJobCommand startJobCommand = ServiceLocator.Instance.Locate().CreateStartJob(); + startJobCommand.Cluster = testCluster.ConnectionUrl; + startJobCommand.Credential = GetPSCredential(testCluster.HttpUserName, testCluster.HttpPassword); + startJobCommand.JobDefinition = mapReduceJobDefinition; + startJobCommand.EndProcessing(); + AzureHDInsightJob jobCreationResults = startJobCommand.Output.ElementAt(0); + Assert.IsNotNull(jobCreationResults.JobId, "Should get a non-null jobDetails id"); + Assert.IsNotNull(jobCreationResults.StatusDirectory, "StatusDirectory should be set on jobDetails"); + return jobCreationResults; + } + + private static AzureHDInsightJob TestJobStop(ClusterDetails testCluster, string jobId) + { + IStopAzureHDInsightJobCommand stopJobCommand = ServiceLocator.Instance.Locate().CreateStopJob(); + stopJobCommand.Cluster = testCluster.ConnectionUrl; + stopJobCommand.Credential = GetPSCredential(testCluster.HttpUserName, testCluster.HttpPassword); + stopJobCommand.JobId = jobId; + stopJobCommand.EndProcessing(); + + if (stopJobCommand.Output.Count != 0) + { + AzureHDInsightJob jobCancellationResults = stopJobCommand.Output.ElementAt(0); + Assert.IsNotNull(jobCancellationResults.JobId, "Should get a non-null jobDetails id"); + Assert.IsNotNull(jobCancellationResults.StatusDirectory, "StatusDirectory should be set on jobDetails"); + return jobCancellationResults; + } + return null; + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/StorageAbstractionTests.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/StorageAbstractionTests.cs new file mode 100644 index 000000000000..4a6ed1627a34 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/HDInsight/CommandTests/StorageAbstractionTests.cs @@ -0,0 +1,63 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Text; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.HDInsight.CmdLetTests; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations; + +namespace Microsoft.WindowsAzure.Commands.Test.HDInsight.CommandTests +{ + [TestClass] + public class StorageAbstractionTests : HDInsightTestCaseBase + { + [TestInitialize] + public override void Initialize() + { + base.Initialize(); + } + + [TestCleanup] + public override void TestCleanup() + { + base.TestCleanup(); + } + + [TestMethod] + [TestCategory("Scenario")] + public void CanWriteHiveQueryFile() + { + this.ApplyIndividualTestMockingOnly(); + var wellKnownStorageAccount = IntegrationTestBase.GetWellKnownStorageAccounts().First(); + var wabsStorageClient = new AzureHDInsightStorageHandler(wellKnownStorageAccount); + string hiveQueryFilePath = string.Format(CultureInfo.InvariantCulture, + "http://{0}/{1}/user/{2}/{3}.hql", + wellKnownStorageAccount.Name, + wellKnownStorageAccount.Container, + IntegrationTestBase.TestCredentials.HadoopUserName, + Guid.NewGuid().ToString("N")); + var testFilePath = new Uri(hiveQueryFilePath, UriKind.RelativeOrAbsolute); + var bytes = Encoding.UTF8.GetBytes("Select * from hivesampletable where name like '%bat%'"); + using (var stream = new MemoryStream(bytes, 0, bytes.Length)) + { + wabsStorageClient.UploadFile(testFilePath, stream); + } + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/MSSharedLibKey.snk b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/MSSharedLibKey.snk differ diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Concretes/CommandAbstraction.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Concretes/CommandAbstraction.cs new file mode 100644 index 000000000000..9c86d32d3a7a --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Concretes/CommandAbstraction.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation.Runspaces; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Interfaces; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Concretes +{ + public class CommandAbstraction : PipelineAbstraction, ICommand + { + internal CommandAbstraction(Command command, Pipeline pipeline, Runspace runsapce) : base(pipeline, runsapce) + { + this.Command = command; + } + + protected Command Command { get; private set; } + + public ICommand WithParameter(string name, object value) + { + this.Command.Parameters.Add(name, value); + return this; + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Concretes/PipelineAbstraction.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Concretes/PipelineAbstraction.cs new file mode 100644 index 000000000000..0f0ffd47bbc4 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Concretes/PipelineAbstraction.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.ObjectModel; +using System.Management.Automation; +using System.Management.Automation.Runspaces; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Interfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Concretes +{ + public class PipelineAbstraction : RunspaceAbstraction, IPipeline + { + internal PipelineAbstraction(Pipeline pipeline, Runspace runspace) : base(runspace) + { + this.Pipeline = pipeline; + } + + protected Pipeline Pipeline { get; private set; } + + public ICommand AddCommand(string commandName) + { + var command = new Command(commandName); + this.Pipeline.Commands.Add(command); + return Help.SafeCreate(() => new CommandAbstraction(command, this.Pipeline, this.Runspace)); + } + + public IPipelineResult Invoke() + { + Collection results = this.Pipeline.Invoke(); + return Help.SafeCreate(() => new PipelineResultsAbstraction(results, this.Runspace)); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Concretes/PipelineResultsAbstraction.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Concretes/PipelineResultsAbstraction.cs new file mode 100644 index 000000000000..e3d6ac7b97cf --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Concretes/PipelineResultsAbstraction.cs @@ -0,0 +1,31 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using System.Management.Automation.Runspaces; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Interfaces; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Concretes +{ + public class PipelineResultsAbstraction : RunspaceAbstraction, IPipelineResult + { + public PipelineResultsAbstraction(ICollection results, Runspace runspace) : base(runspace) + { + this.Results = results; + } + + public ICollection Results { get; private set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Concretes/RunspaceAbstraction.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Concretes/RunspaceAbstraction.cs new file mode 100644 index 000000000000..6d98d1e6359b --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Concretes/RunspaceAbstraction.cs @@ -0,0 +1,46 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Diagnostics.CodeAnalysis; +using System.Management.Automation.Runspaces; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Disposable; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Interfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Concretes +{ + [SuppressMessage("Microsoft.Design", "CA1063:ImplementIDisposableCorrectly", + Justification = "Anything derived from Disposable Object is correct. [tgs]")] + public class RunspaceAbstraction : DisposableObject, IRunspace + { + public RunspaceAbstraction(Runspace runspace) + { + this.Runspace = runspace; + } + + public static IRunspace Create() + { + Runspace runspace = Help.SafeCreate(() => RunspaceFactory.CreateRunspace()); + runspace.Open(); + return new RunspaceAbstraction(runspace); + } + + protected Runspace Runspace { get; private set; } + + public IPipeline NewPipeline() + { + return Help.SafeCreate(() => new PipelineAbstraction(this.Runspace.CreatePipeline(), this.Runspace)); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Disposable/DisposableObject.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Disposable/DisposableObject.cs new file mode 100644 index 000000000000..7d243d5d54aa --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Disposable/DisposableObject.cs @@ -0,0 +1,137 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Reflection; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Disposable +{ + /// + /// Base implementation of a disposable object. + /// + public abstract class DisposableObject : IQueryDisposable + { + private InterlockedBoolean disposed = new InterlockedBoolean(false); + + /// + /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + /// + [SuppressMessage("Microsoft.Design", "CA1063:ImplementIDisposableCorrectly", Justification = "Altered to be thread-safe(MWP)")] + public void Dispose() + { + if (this.disposed.ExchangeValue(true)) + { + // already disposed or disposing; + return; + } + + this.Dispose(true); + + // Use SupressFinalize in case a subclass + // of this type implements a finalizer. + GC.SuppressFinalize(this); + } + + /// + /// Releases unmanaged and - optionally - managed resources. + /// + /// + /// Use true to release both managed and unmanaged resources; false to release only unmanaged resources. + /// + protected virtual void Dispose(bool disposing) + { + if (disposing) + { + // Clean up managed resources if disposing + this.ReleaseManagedResources(); + } + + // Clean up native resources always + this.ReleaseUnmanagedResources(); + } + + /// + /// Finalizes an instance of the class. + /// + /// + /// Releases unmanaged resources and performs other cleanup operations before the + /// is reclaimed by garbage collection. + /// + ~DisposableObject() + { + this.Dispose(false); + } + + /// + public bool IsDisposed() + { + return this.disposed.GetValue(); + } + + /// + /// Checks the disposed. + /// + protected void CheckDisposed() + { + if (this.disposed.GetValue()) + { + throw new ObjectDisposedException(this.GetType().Name); + } + } + + /// + /// Releases the managed resources. + /// + protected virtual void ReleaseManagedResources() + { + Type derrivedType = this.GetType(); + FieldInfo[] fields = derrivedType.GetFields(); + foreach (FieldInfo field in fields) + { + object value = field.GetValue(this); + if (value.IsNotNull()) + { + Type valueType = value.GetType(); + if (!valueType.IsValueType) + { + var asDisposable = value as IDisposable; + if (asDisposable.IsNotNull()) + { + asDisposable.Dispose(); + } + var asDisposableEnum = value as IEnumerable; + if (asDisposableEnum.IsNotNull()) + { + foreach (IDisposable disposable in asDisposableEnum) + { + disposable.Dispose(); + } + } + field.SetValue(this, null); + } + } + } + } + + /// + /// Releases the unmanaged resources. + /// + protected virtual void ReleaseUnmanagedResources() + { + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Disposable/IQueryDisposable.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Disposable/IQueryDisposable.cs new file mode 100644 index 000000000000..a7534a98df30 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Disposable/IQueryDisposable.cs @@ -0,0 +1,32 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Disposable +{ + /// + /// Extends to expose the status. + /// + public interface IQueryDisposable : IDisposable + { + /// + /// Determines whether this instance is disposed. + /// + /// + /// true if this instance is disposed; otherwise, false . + /// + bool IsDisposed(); + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Disposable/InterlockedBoolean.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Disposable/InterlockedBoolean.cs new file mode 100644 index 000000000000..d6b9c4b72fe7 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Disposable/InterlockedBoolean.cs @@ -0,0 +1,432 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Diagnostics.CodeAnalysis; +using System.Threading; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Disposable +{ + /// + /// An interlocked Boolean. + /// + [Serializable] + public struct InterlockedBoolean + : IComparable, IComparable, IComparable, IEquatable, IEquatable + { + private int value; + + /// + /// Initializes a new instance of the struct. + /// + /// The initial value of the instance. + public InterlockedBoolean(bool value) + { + this.value = value ? 1 : 0; + } + + /// + public int CompareTo(bool other) + { + return this.GetValue().CompareTo(other); + } + + /// + public int CompareTo(InterlockedBoolean other) + { + return this.GetValue().CompareTo(other.GetValue()); + } + + /// + public bool Equals(bool other) + { + return other.Equals(this.GetValue()); + } + + /// + /// Indicates whether the current object is equal to another object of the same type. + /// + /// + /// true if the current object is equal to the parameter; otherwise, false . + /// + /// An object to compare with this object. + [SuppressMessage("Microsoft.StyleCop.CSharp.ReadabilityRules", "SA1101:PrefixLocalCallsWithThis", + Justification = "SA is incorrectly ignoring the static method on Object.")] + public bool Equals(InterlockedBoolean other) + { + return this.Equals(other.GetValue()); + } + + /// + /// Determines whether the specified is equal to this instance. + /// + /// + /// The to compare with this instance. + /// + /// + /// true if the specified is equal to this instance; otherwise, false . + /// + public override bool Equals(object obj) + { + if (obj.IsNull()) + { + return false; + } + + if (obj is InterlockedBoolean) + { + return this.Equals((InterlockedBoolean)obj); + } + + if (obj is bool) + { + return this.Equals((bool)obj); + } + + return false; + } + + /// + /// Exchanges the value. + /// + /// The value to which the instance is set. + /// The original value. + public bool ExchangeValue(bool newValue) + { + int workingValue = newValue ? 1 : 0; + int was = Interlocked.Exchange(ref this.value, workingValue); + return was == 1; + } + + /// + /// Returns a hash code for this instance. + /// + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + public override int GetHashCode() + { + return Thread.VolatileRead(ref this.value); + } + + /// + /// Gets the value. + /// + /// The current value. + [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "Method indicates relative cost MWP")] + public bool GetValue() + { + return 0 != Thread.VolatileRead(ref this.value); + } + + /// + /// Sets the value. + /// + /// The value to which the instance is set. + public void SetValue(bool newValue) + { + this.ExchangeValue(newValue); + } + + /// + /// Returns a that represents this instance. + /// + /// + /// A that represents this instance. + /// + public override string ToString() + { + return this.GetValue().ToString(); + } + + /// + /// Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. + /// + /// An object to compare with this instance. + /// + /// A value that indicates the relative order of the objects being compared. The return value has these meanings: Value Meaning Less than zero This instance is less than + /// + /// . Zero This instance is equal to . Greater than zero This instance is greater than + /// + /// . + /// + /// The parameter "obj" is not the same type as this instance. + int IComparable.CompareTo(object obj) + { + if (obj.IsNull()) + { + // this object is greater than null. + return 1; + } + + if (obj is bool) + { + return this.CompareTo((bool)obj); + } + + if (obj is InterlockedBoolean) + { + return this.CompareTo((InterlockedBoolean)obj); + } + + // It is "standard" to throw ArgumentException when the object is not of a comparable type. + throw new ArgumentException("Object must be of type Boolean or InterlockedBoolean", "obj"); + } + + /// + /// Equality operator overload. + /// + /// The left value. + /// The right value. + /// + /// true when the instances are equal, otherwise false . + /// + public static bool operator ==(bool left, InterlockedBoolean right) + { + return left.Equals(right.GetValue()); + } + + /// + /// Equality operator overload. + /// + /// The left value. + /// The right value. + /// + /// true when the instances are equal, otherwise false . + /// + public static bool operator ==(InterlockedBoolean left, bool right) + { + return left.Equals(right); + } + + /// + /// Equality operator overload. + /// + /// The left value. + /// The right value. + /// + /// true when the instances are equal, otherwise false . + /// + public static bool operator ==(InterlockedBoolean left, InterlockedBoolean right) + { + return left.Equals(right); + } + + /// + /// Greater-than operator overload. + /// + /// The left value. + /// The right value. + /// + /// true when the is greater-than , otherwise false . + /// + public static bool operator >(bool left, InterlockedBoolean right) + { + return left.CompareTo(right.GetValue()) > 0; + } + + /// + /// Greater-than operator overload. + /// + /// The left value. + /// The right value. + /// + /// true when the is greater-than , otherwise false . + /// + public static bool operator >(InterlockedBoolean left, bool right) + { + return left.GetValue().CompareTo(right) > 0; + } + + /// + /// Greater-than operator overload. + /// + /// The left value. + /// The right value. + /// + /// true when the is greater-than , otherwise false . + /// + public static bool operator >(InterlockedBoolean left, InterlockedBoolean right) + { + return left.CompareTo(right) > 0; + } + + /// + /// Greater-than-or-equal-to operator overload. + /// + /// The left value. + /// The right value. + /// + /// true when the is Greater-than-or-equal-to , otherwise false . + /// + public static bool operator >=(bool left, InterlockedBoolean right) + { + return left.CompareTo(right.GetValue()) >= 0; + } + + /// + /// Greater-than-or-equal-to operator overload. + /// + /// The left value. + /// The right value. + /// + /// true when the is Greater-than-or-equal-to , otherwise false . + /// + public static bool operator >=(InterlockedBoolean left, bool right) + { + return left.GetValue().CompareTo(right) >= 0; + } + + /// + /// Greater-than-or-equal-to operator overload. + /// + /// The left value. + /// The right value. + /// + /// true when the is Greater-than-or-equal-to , otherwise false . + /// + public static bool operator >=(InterlockedBoolean left, InterlockedBoolean right) + { + return left.CompareTo(right) >= 0; + } + + /// + /// Performs an implicit conversion from to . + /// + /// The value. + /// The result of the conversion. + public static implicit operator bool(InterlockedBoolean value) + { + return value.GetValue(); + } + + /// + /// Inequality operator overload. + /// + /// The left value. + /// The right value. + /// + /// true when the instances are not equal, otherwise false . + /// + public static bool operator !=(bool left, InterlockedBoolean right) + { + return !left.Equals(right.GetValue()); + } + + /// + /// Inequality operator overload. + /// + /// The left value. + /// The right value. + /// + /// true when the instances are not equal, otherwise false . + /// + public static bool operator !=(InterlockedBoolean left, bool right) + { + return !left.Equals(right); + } + + /// + /// Inequality operator overload. + /// + /// The left value. + /// The right value. + /// + /// true when the instances are not equal, otherwise false . + /// + public static bool operator !=(InterlockedBoolean left, InterlockedBoolean right) + { + return !left.Equals(right); + } + + /// + /// Less-than operator overload. + /// + /// The left value. + /// The right value. + /// + /// true when the is less-than , otherwise false . + /// + public static bool operator <(bool left, InterlockedBoolean right) + { + return left.CompareTo(right.GetValue()) < 0; + } + + /// + /// Less-than operator overload. + /// + /// The left value. + /// The right value. + /// + /// true when the is less-than , otherwise false . + /// + public static bool operator <(InterlockedBoolean left, bool right) + { + return left.GetValue().CompareTo(right) < 0; + } + + /// + /// Less-than operator overload. + /// + /// The left value. + /// The right value. + /// + /// true when the is less-than , otherwise false . + /// + public static bool operator <(InterlockedBoolean left, InterlockedBoolean right) + { + return left.CompareTo(right) < 0; + } + + /// + /// Less-than-or-equal-to operator overload. + /// + /// The left value. + /// The right value. + /// + /// true when the is Less-than-or-equal-to , otherwise false . + /// + public static bool operator <=(bool left, InterlockedBoolean right) + { + return left.CompareTo(right.GetValue()) <= 0; + } + + /// + /// Less-than-or-equal-to operator overload. + /// + /// The left value. + /// The right value. + /// + /// true when the is Less-than-or-equal-to , otherwise false . + /// + public static bool operator <=(InterlockedBoolean left, bool right) + { + return left.GetValue().CompareTo(right) <= 0; + } + + /// + /// Less-than-or-equal-to operator overload. + /// + /// The left value. + /// The right value. + /// + /// true when the is Less-than-or-equal-to , otherwise false . + /// + public static bool operator <=(InterlockedBoolean left, InterlockedBoolean right) + { + return left.CompareTo(right) <= 0; + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Interfaces/ICommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Interfaces/ICommand.cs new file mode 100644 index 000000000000..e485e5c57459 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Interfaces/ICommand.cs @@ -0,0 +1,20 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Interfaces +{ + public interface ICommand : IPipeline + { + ICommand WithParameter(string name, object value); + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Interfaces/IPipeline.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Interfaces/IPipeline.cs new file mode 100644 index 000000000000..4abfcdfffaec --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Interfaces/IPipeline.cs @@ -0,0 +1,21 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Interfaces +{ + public interface IPipeline : IRunspaceBase + { + ICommand AddCommand(string commandName); + IPipelineResult Invoke(); + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Interfaces/IPipelineResult.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Interfaces/IPipelineResult.cs new file mode 100644 index 000000000000..4731151a1d92 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Interfaces/IPipelineResult.cs @@ -0,0 +1,24 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Interfaces +{ + public interface IPipelineResult : IRunspaceBase + { + ICollection Results { get; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Interfaces/IRunspace.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Interfaces/IRunspace.cs new file mode 100644 index 000000000000..ab9091c1b8f9 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Interfaces/IRunspace.cs @@ -0,0 +1,22 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Disposable; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Interfaces +{ + public interface IRunspace : IRunspaceBase, IQueryDisposable + { + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Interfaces/IRunspaceBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Interfaces/IRunspaceBase.cs new file mode 100644 index 000000000000..cdb4990745aa --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/PowerShellTestAbstraction/Interfaces/IRunspaceBase.cs @@ -0,0 +1,20 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Interfaces +{ + public interface IRunspaceBase + { + IPipeline NewPipeline(); + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/AzureHDInsightClusterManagementClientSimulator.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/AzureHDInsightClusterManagementClientSimulator.cs new file mode 100644 index 000000000000..c4c9716a3f24 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/AzureHDInsightClusterManagementClientSimulator.cs @@ -0,0 +1,453 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Globalization; +using System.Linq; +using System.Net; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Hadoop.Client; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities; +using Microsoft.WindowsAzure.Management.HDInsight; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; +using Microsoft.WindowsAzure.Management.HDInsight.Logging; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Simulators +{ + internal class AzureHDInsightClusterManagementClientSimulator : IHDInsightClient + { + internal static ClusterCreateParameters LastCreateRequest; + + private static readonly Collection Clusters = new Collection + { + new SimulatorClusterContainer + { + Cluster = + new ClusterDetails + { + Name = "VersionLowerThanSupported", + State = ClusterState.Running, + ConnectionUrl = @"https://VersionLowerThanSupported.azurehdinsight.net", + CreatedDate = DateTime.UtcNow, + VersionStatus = VersionStatus.Obsolete, + Location = "East US 2", + Error = null, + Version = + new Version(HDInsightSDKSupportedVersions.MinVersion.Major, HDInsightSDKSupportedVersions.MinVersion.Minor - 1).ToString(), + VersionNumber = + new Version(HDInsightSDKSupportedVersions.MinVersion.Major, HDInsightSDKSupportedVersions.MinVersion.Minor - 1), + HttpUserName = "sa-po-svc", + ClusterSizeInNodes = 4, + DefaultStorageAccount = IntegrationTestBase.GetWellKnownStorageAccounts().First(), + AdditionalStorageAccounts = IntegrationTestBase.GetWellKnownStorageAccounts().Skip(1) + } + }, + new SimulatorClusterContainer + { + Cluster = + new ClusterDetails + { + ConnectionUrl = @"https://VersionHigherThanSupported.azurehdinsight.net", + CreatedDate = DateTime.UtcNow, + Name = "VersionHigherThanSupported", + State = ClusterState.Running, + Location = "East US 2", + Error = null, + Version = + new Version(HDInsightSDKSupportedVersions.MaxVersion.Major, HDInsightSDKSupportedVersions.MaxVersion.Minor + 1).ToString(), + VersionStatus = VersionStatus.ToolsUpgradeRequired, + VersionNumber = + new Version(HDInsightSDKSupportedVersions.MaxVersion.Major, HDInsightSDKSupportedVersions.MaxVersion.Minor + 1), + HttpUserName = "sa-po-svc", + ClusterSizeInNodes = 4, + DefaultStorageAccount = IntegrationTestBase.GetWellKnownStorageAccounts().First(), + AdditionalStorageAccounts = IntegrationTestBase.GetWellKnownStorageAccounts().Skip(1) + } + }, + new SimulatorClusterContainer + { + Cluster = + new ClusterDetails + { + ConnectionUrl = @"https://" + IntegrationTestBase.TestCredentials.WellKnownCluster.DnsName + ".azurehdinsight.net", + CreatedDate = DateTime.UtcNow, + Name = IntegrationTestBase.TestCredentials.WellKnownCluster.DnsName, + State = ClusterState.Running, + Location = "East US 2", + Error = null, + Version = IntegrationTestBase.TestCredentials.WellKnownCluster.Version, + VersionNumber = new Version(IntegrationTestBase.TestCredentials.WellKnownCluster.Version), + VersionStatus = VersionStatus.Compatible, + HttpUserName = IntegrationTestBase.TestCredentials.AzureUserName, + HttpPassword = IntegrationTestBase.TestCredentials.AzurePassword, + ClusterSizeInNodes = 4, + DefaultStorageAccount = IntegrationTestBase.GetWellKnownStorageAccounts().First(), + AdditionalStorageAccounts = IntegrationTestBase.GetWellKnownStorageAccounts().Skip(1) + } + }, + new SimulatorClusterContainer + { + Cluster = + new ClusterDetails + { + Name = "NoHttpAccessCluster", + State = ClusterState.Running, + ConnectionUrl = @"https://NoHttpAccessCluster.azurehdinsight.net", + CreatedDate = DateTime.UtcNow, + Location = "East US 2", + Error = null, + VersionStatus = VersionStatus.Compatible, + Version = + new Version(HDInsightSDKSupportedVersions.MaxVersion.Major, HDInsightSDKSupportedVersions.MaxVersion.Minor).ToString(), + VersionNumber = new Version(HDInsightSDKSupportedVersions.MaxVersion.Major, HDInsightSDKSupportedVersions.MaxVersion.Minor), + ClusterSizeInNodes = 4, + DefaultStorageAccount = IntegrationTestBase.GetWellKnownStorageAccounts().First(), + AdditionalStorageAccounts = IntegrationTestBase.GetWellKnownStorageAccounts().Skip(1) + } + }, + new SimulatorClusterContainer + { + Cluster = + new ClusterDetails + { + Name = "HttpAccessCluster", + ConnectionUrl = @"https://HttpAccessCluster.azurehdinsight.net", + CreatedDate = DateTime.UtcNow, + Location = "East US 2", + Error = null, + VersionStatus = VersionStatus.Compatible, + Version = + new Version(HDInsightSDKSupportedVersions.MaxVersion.Major, HDInsightSDKSupportedVersions.MaxVersion.Minor).ToString(), + VersionNumber = new Version(HDInsightSDKSupportedVersions.MaxVersion.Major, HDInsightSDKSupportedVersions.MaxVersion.Minor), + HttpUserName = IntegrationTestBase.TestCredentials.AzureUserName, + HttpPassword = IntegrationTestBase.TestCredentials.AzurePassword, + ClusterSizeInNodes = 4, + DefaultStorageAccount = IntegrationTestBase.GetWellKnownStorageAccounts().First(), + AdditionalStorageAccounts = IntegrationTestBase.GetWellKnownStorageAccounts().Skip(1) + } + } + }; + + private readonly IHDInsightSubscriptionCredentials credentials; + private readonly ILogger logger; + + private CancellationTokenSource cancellationTokenSource; + + public AzureHDInsightClusterManagementClientSimulator(IHDInsightSubscriptionCredentials credentials) + { + this.credentials = credentials; + this.logger = new Logger(); + } + + public void Dispose() + { + } + + public event EventHandler ClusterProvisioning; + public CancellationToken CancellationToken { get; private set; } + public IHDInsightSubscriptionCredentials Credentials { get; private set; } + public TimeSpan PollingInterval { get; set; } + + public void AddLogWriter(ILogWriter logWriter) + { + this.logger.AddWriter(logWriter); + } + + public void RemoveLogWriter(ILogWriter logWriter) + { + this.logger.RemoveWriter(logWriter); + } + + public void Cancel() + { + } + + public ClusterDetails CreateCluster(ClusterCreateParameters cluster) + { + Task createTask = this.CreateClusterAsync(cluster); + createTask.Wait(); + return createTask.Result; + } + + public ClusterDetails CreateCluster(ClusterCreateParameters cluster, TimeSpan timeout) + { + return this.CreateCluster(cluster); + } + + public Task CreateClusterAsync(ClusterCreateParameters clusterCreateParameters) + { + this.LogMessage("Creating cluster '{0}' in location {1}", clusterCreateParameters.Name, clusterCreateParameters.Location); + LastCreateRequest = clusterCreateParameters; + var clusterDetails = new ClusterDetails(); + clusterDetails.Name = clusterCreateParameters.Name; + clusterDetails.HttpPassword = clusterCreateParameters.Password; + clusterDetails.HttpUserName = clusterCreateParameters.UserName; + clusterDetails.Version = clusterCreateParameters.Version; + clusterDetails.Location = clusterCreateParameters.Location; + clusterDetails.State = ClusterState.Running; + clusterDetails.AdditionalStorageAccounts = clusterCreateParameters.AdditionalStorageAccounts; + clusterDetails.DefaultStorageAccount = new WabStorageAccountConfiguration( + clusterCreateParameters.DefaultStorageAccountName, + clusterCreateParameters.DefaultStorageAccountKey, + clusterCreateParameters.DefaultStorageContainer); + Clusters.Add(new SimulatorClusterContainer { Cluster = clusterDetails }); + return TaskEx2.FromResult(clusterDetails); + } + + public void DeleteCluster(string dnsName) + { + this.DeleteClusterAsync(dnsName).Wait(); + } + + public void DeleteCluster(string dnsName, TimeSpan timeout) + { + this.DeleteClusterAsync(dnsName).Wait(); + } + + public async Task DeleteClusterAsync(string name) + { + ClusterDetails cluster = await this.GetClusterAsync(name); + if (cluster == null) + { + throw new InvalidOperationException("The cluster '" + name + "' doesn't exist."); + } + + this.LogMessage("Deleting cluster '{0}' in location {1}", name, cluster.Location); + Clusters.Remove(GetClusterInternal(name)); + } + + public void DisableHttp(string dnsName, string location) + { + this.DisableHttpAsync(dnsName, location).Wait(); + } + + public async Task DisableHttpAsync(string dnsName, string location) + { + ClusterDetails cluster = await this.GetClusterAsync(dnsName); + Clusters.Remove(GetClusterInternal(dnsName)); + cluster.HttpUserName = string.Empty; + cluster.HttpPassword = string.Empty; + Clusters.Add(new SimulatorClusterContainer { Cluster = cluster }); + } + + public void EnableHttp(string dnsName, string location, string httpUserName, string httpPassword) + { + this.EnableHttpAsync(dnsName, location, httpUserName, httpPassword).Wait(); + } + + public async Task EnableHttpAsync(string dnsName, string location, string httpUserName, string httpPassword) + { + ClusterDetails cluster = await this.GetClusterAsync(dnsName); + Clusters.Remove(GetClusterInternal(dnsName)); + cluster.HttpUserName = httpUserName; + cluster.HttpPassword = httpPassword; + Clusters.Add(new SimulatorClusterContainer { Cluster = cluster }); + } + + public ClusterDetails GetCluster(string dnsName) + { + Task getTask = this.GetClusterAsync(dnsName); + getTask.Wait(); + return getTask.Result; + } + + public async Task GetClusterAsync(string name) + { + this.LogMessage("Getting hdinsight clusters for subscriptionid : {0}", this.credentials.SubscriptionId.ToString()); + ICollection knownClusters = await this.ListClustersAsync(); + ClusterDetails cluster = knownClusters.FirstOrDefault(c => string.Equals(c.Name, name, StringComparison.OrdinalIgnoreCase)); + return cluster; + } + + public ClusterDetails ChangeClusterSize(string dnsName, string location, int newSize) + { + return ChangeClusterSizeAsync(dnsName, location, newSize).WaitForResult(); + } + + public async Task ChangeClusterSizeAsync(string dnsName, string location, int newSize) + { + LogMessage("Getting hdinsight clusters for subscriptionid : {0}", credentials.SubscriptionId.ToString()); + var knownClusters = await ListClustersAsync(); + var cluster = knownClusters.FirstOrDefault(c => string.Equals(c.Name, dnsName, StringComparison.OrdinalIgnoreCase)); + if (cluster == null) + { + return null; + } + cluster.ClusterSizeInNodes = newSize; + return cluster; + } + + public Collection ListAvailableLocations() + { + Task> listTask = this.ListAvailableLocationsAsync(); + listTask.Wait(); + return listTask.Result; + } + + public Task> ListAvailableLocationsAsync() + { + return TaskEx2.FromResult(new Collection { "East US", "East US 2", "West US", "North Europe" }); + } + + public Collection ListAvailableVersions() + { + Task> listTask = this.ListAvailableVersionsAsync(); + listTask.Wait(); + return listTask.Result; + } + + public Task> ListAvailableVersionsAsync() + { + var versions = new Collection(); + versions.Add(new HDInsightVersion { Version = "1.2", VersionStatus = VersionStatus.Obsolete }); + versions.Add(new HDInsightVersion { Version = "1.5", VersionStatus = VersionStatus.Obsolete }); + versions.Add(new HDInsightVersion { Version = "1.6", VersionStatus = VersionStatus.Compatible }); + versions.Add(new HDInsightVersion { Version = "2.1", VersionStatus = VersionStatus.Compatible }); + return TaskEx2.FromResult(versions); + } + + public ICollection ListClusters() + { + Task> listTask = this.ListClustersAsync(); + listTask.Wait(); + return listTask.Result; + } + + public Task> ListClustersAsync() + { + this.LogMessage("Getting hdinsight clusters for subscriptionid : {0}", this.credentials.SubscriptionId.ToString()); + ICollection resultClusters = new Collection(Clusters.Select(c => c.Cluster).ToList()); + foreach (ClusterDetails cluster in resultClusters) + { + cluster.SubscriptionId = this.credentials.SubscriptionId; + } + + return TaskEx2.FromResult(resultClusters); + } + + public IEnumerable> ListResourceProviderProperties() + { + Task>> listTask = this.ListResourceProviderPropertiesAsync(); + listTask.Wait(); + return listTask.Result; + } + + public Task>> ListResourceProviderPropertiesAsync() + { + var resourceProviderProperties = new List>(); + resourceProviderProperties.Add(new KeyValuePair("CAPABILITY_FEATURE_CUSTOM_ACTIONS_V2", "Custom Actions V2")); + resourceProviderProperties.Add(new KeyValuePair("CAPABILITY_REGION_EAST_US", "East US")); + resourceProviderProperties.Add(new KeyValuePair("CAPABILITY_REGION_EAST_US_2", "East US 2")); + resourceProviderProperties.Add(new KeyValuePair("CAPABILITY_REGION_NORTH_EUROPE", "North Europe")); + resourceProviderProperties.Add(new KeyValuePair("CAPABILITY_VERSION_1.2", "1.2.0.0.LargeSKU-amd64-134231")); + resourceProviderProperties.Add(new KeyValuePair("CAPABILITY_VERSION_2.1", "2.1.0.0.LargeSKU-amd64-134231")); + resourceProviderProperties.Add(new KeyValuePair("CAPABILITY_VERSION_1.5", "1.5.0.0.LargeSKU-amd64-134231")); + resourceProviderProperties.Add(new KeyValuePair("CAPABILITY_VERSION_1.6", "1.6.0.0.LargeSKU-amd64-134231")); + + resourceProviderProperties.Add(new KeyValuePair("CONTAINERS_Count", "1")); + + resourceProviderProperties.Add(new KeyValuePair("CONTAINERS_CoresUsed", "168")); + + resourceProviderProperties.Add(new KeyValuePair("CONTAINERS_MaxCoresAllowed", "170")); + + return TaskEx2.FromResult(resourceProviderProperties.AsEnumerable()); + } + + public void RaiseClusterProvisioningEvent(object sender, ClusterProvisioningStatusEventArgs e) + { + if (this.ClusterProvisioning != null) + { + this.ClusterProvisioning(sender, e); + } + } + + public void SetCancellationSource(CancellationTokenSource tokenSource) + { + // tokenSource.ArgumentNotNull("tokenSource") + this.cancellationTokenSource = tokenSource; + this.CancellationToken = this.cancellationTokenSource.Token; + } + + public bool IgnoreSslErrors { get; set; } + + internal static SimulatorClusterContainer GetClusterInternal(string clusterName) + { + SimulatorClusterContainer simulationCluster = + Clusters.First(cluster => string.Equals(cluster.Cluster.Name, clusterName, StringComparison.OrdinalIgnoreCase)); + simulationCluster.Cluster.SubscriptionId = IntegrationTestBase.TestCredentials.SubscriptionId; + return simulationCluster; + } + + private void LogMessage(string content, params string[] args) + { + string message = content; + if (args.Any()) + { + message = string.Format(CultureInfo.InvariantCulture, content, args); + } + + this.logger.LogMessage(message, Severity.Informational, Verbosity.Diagnostic); + } + + internal class PendingOp + { + public PendingOp(UserChangeOperationStatusResponse response) + { + this.Response = response; + this.Id = Guid.NewGuid(); + } + + public Guid Id { get; private set; } + public UserChangeOperationStatusResponse Response { get; private set; } + } + + internal class SimulatorClusterContainer + { + private readonly IDictionary jobQueue; + + private readonly IDictionary markedForDeletionJobs; + + public SimulatorClusterContainer() + { + this.jobQueue = new Dictionary(); + this.markedForDeletionJobs = new Dictionary(); + } + + public ClusterDetails Cluster { get; set; } + + public IDictionary JobDeletionQueue + { + get { return this.markedForDeletionJobs; } + } + + public IDictionary JobQueue + { + get + { + if (!string.IsNullOrEmpty(this.Cluster.HttpUserName)) + { + return this.jobQueue; + } + + throw new UnauthorizedAccessException(); + } + } + } + + public ILogger Logger { get; private set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/AzureHDInsightClusterManagementClientSimulatorFactory.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/AzureHDInsightClusterManagementClientSimulatorFactory.cs new file mode 100644 index 000000000000..1e1436c55f5e --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/AzureHDInsightClusterManagementClientSimulatorFactory.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.BaseInterfaces; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Simulators +{ + public class AzureHDInsightClusterManagementClientSimulatorFactory : IAzureHDInsightClusterManagementClientFactory + { + public IHDInsightClient Create(IHDInsightSubscriptionCredentials credentials) + { + return new AzureHDInsightClusterManagementClientSimulator(credentials); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/AzureHDInsightConnectionSessionManagerSimulator.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/AzureHDInsightConnectionSessionManagerSimulator.cs new file mode 100644 index 000000000000..da575dedf927 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/AzureHDInsightConnectionSessionManagerSimulator.cs @@ -0,0 +1,34 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Simulators +{ + internal class AzureHDInsightConnectionSessionManagerSimulator : IAzureHDInsightConnectionSessionManager + { + private AzureHDInsightClusterConnection currentCluster; + + public AzureHDInsightClusterConnection GetCurrentCluster() + { + return this.currentCluster; + } + + public void SetCurrentCluster(AzureHDInsightClusterConnection cluster) + { + this.currentCluster = cluster; + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/AzureHDInsightConnectionSessionManagerSimulatorFactory.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/AzureHDInsightConnectionSessionManagerSimulatorFactory.cs new file mode 100644 index 000000000000..88cf79bcd361 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/AzureHDInsightConnectionSessionManagerSimulatorFactory.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Simulators +{ + internal class AzureHDInsightConnectionSessionManagerSimulatorFactory : IAzureHDInsightConnectionSessionManagerFactory + { + private static IAzureHDInsightConnectionSessionManager singleton; + + public IAzureHDInsightConnectionSessionManager Create(SessionState sessionState) + { + if (singleton == null) + { + singleton = new AzureHDInsightConnectionSessionManagerSimulator(); + } + + return singleton; + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/AzureHDInsightJobSubmissionClientSimulator.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/AzureHDInsightJobSubmissionClientSimulator.cs new file mode 100644 index 000000000000..d59b5c97ee79 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/AzureHDInsightJobSubmissionClientSimulator.cs @@ -0,0 +1,542 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Hadoop.Client; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; +using Microsoft.WindowsAzure.Management.HDInsight.Framework.Core.Library.WebRequest; +using Microsoft.WindowsAzure.Management.HDInsight.Logging; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Simulators +{ + internal class AzureHDInsightJobSubmissionClientSimulator : ClientBase, IJobSubmissionClient + { + internal const string JobFailed = "jobDetails failed"; + internal const string JobSuccesful = "jobDetails succeeded"; + private readonly AzureHDInsightClusterManagementClientSimulator.SimulatorClusterContainer cluster; + private readonly IDictionary jobError = new Dictionary(); + private readonly IDictionary jobOutput = new Dictionary(); + private readonly ILogger logger; + private readonly IDictionary> taskLogAttempts = new Dictionary>(); + private readonly IDictionary taskLogs = new Dictionary(); + private CancellationTokenSource cancellationTokenSource; + + private IJobSubmissionClientCredential credentials; + + public AzureHDInsightJobSubmissionClientSimulator( + IJobSubmissionClientCredential credential, AzureHDInsightClusterManagementClientSimulator.SimulatorClusterContainer cluster) + { + this.credentials = credential; + this.cluster = cluster; + this.logger = new Logger(); + this.InitializeSimulator(); + } + + public void Dispose() + { + } + + public event EventHandler JobStatusEvent; + + public string GetCustomUserAgent() + { + throw new NotImplementedException(); + } + + public void AddLogWriter(ILogWriter logWriter) + { + this.logger.AddWriter(logWriter); + } + + public void RemoveLogWriter(ILogWriter logWriter) + { + this.logger.RemoveWriter(logWriter); + } + + public void Cancel() + { + } + + public JobCreationResults CreateHiveJob(HiveJobCreateParameters hiveJobCreateParameters) + { + this.PrepareQueryJob(hiveJobCreateParameters); + return this.CreateHiveJobAsync(hiveJobCreateParameters).WaitForResult(); + } + + public Task CreateHiveJobAsync(HiveJobCreateParameters hiveJobCreateParameters) + { + if (hiveJobCreateParameters.Query.IsNullOrEmpty()) + { + hiveJobCreateParameters.File.ArgumentNotNullOrEmpty("File"); + if (hiveJobCreateParameters.File.Contains("://") && + !hiveJobCreateParameters.File.StartsWith("wasb", StringComparison.OrdinalIgnoreCase)) + { + throw new InvalidOperationException("Invalid file protocol : " + hiveJobCreateParameters.File); + } + } + else + { + this.PrepareQueryJob(hiveJobCreateParameters); + } + + JobCreationResults retval = + this.CreateJobSuccessResult( + new JobDetails + { + Name = hiveJobCreateParameters.JobName, + Query = hiveJobCreateParameters.Query, + StatusDirectory = hiveJobCreateParameters.StatusFolder + }, + hiveJobCreateParameters.JobName); + return TaskEx2.FromResult(retval); + } + + public JobCreationResults CreateMapReduceJob(MapReduceJobCreateParameters mapReduceJobCreateParameters) + { + return this.CreateMapReduceJobAsync(mapReduceJobCreateParameters).WaitForResult(); + } + + public Task CreateMapReduceJobAsync(MapReduceJobCreateParameters mapReduceJobCreateParameters) + { + if (mapReduceJobCreateParameters.JobName == "1456577") + { + throw new HttpLayerException(HttpStatusCode.BadRequest, "{ \"error\": \"File /example/files/WordCount.jar does not exist.\"}"); + } + + mapReduceJobCreateParameters.JarFile.ArgumentNotNullOrEmpty("JarFile"); + mapReduceJobCreateParameters.ClassName.ArgumentNotNullOrEmpty("ClassName"); + return TaskEx2.FromResult(this.CreateJobSuccessResult(mapReduceJobCreateParameters, mapReduceJobCreateParameters.JobName)); + } + + public JobCreationResults CreatePigJob(PigJobCreateParameters pigJobCreateParameters) + { + this.PrepareQueryJob(pigJobCreateParameters); + return this.CreatePigJobAsync(pigJobCreateParameters).WaitForResult(); + } + + public Task CreatePigJobAsync(PigJobCreateParameters pigJobCreateParameters) + { + if (pigJobCreateParameters == null) + { + throw new ArgumentNullException("pigJobCreateParameters"); + } + + this.PrepareQueryJob(pigJobCreateParameters); + JobCreationResults retval = + this.CreateJobSuccessResult( + new JobDetails { Query = pigJobCreateParameters.Query, StatusDirectory = pigJobCreateParameters.StatusFolder }, string.Empty); + return TaskEx2.FromResult(retval); + } + + public JobCreationResults CreateSqoopJob(SqoopJobCreateParameters sqoopJobCreateParameters) + { + this.PrepareQueryJob(sqoopJobCreateParameters); + return this.CreateSqoopJobAsync(sqoopJobCreateParameters).WaitForResult(); + } + + public Task CreateSqoopJobAsync(SqoopJobCreateParameters sqoopJobCreateParameters) + { + if (sqoopJobCreateParameters == null) + { + throw new ArgumentNullException("sqoopJobCreateParameters"); + } + + this.PrepareQueryJob(sqoopJobCreateParameters); + JobCreationResults retval = + this.CreateJobSuccessResult( + new JobDetails { Query = sqoopJobCreateParameters.Command, StatusDirectory = sqoopJobCreateParameters.StatusFolder }, string.Empty); + return TaskEx2.FromResult(retval); + } + + public JobCreationResults CreateStreamingJob(StreamingMapReduceJobCreateParameters streamingMapReduceJobCreateParameters) + { + return this.CreateStreamingJobAsync(streamingMapReduceJobCreateParameters).WaitForResult(); + } + + public Task CreateStreamingJobAsync(StreamingMapReduceJobCreateParameters streamingMapReduceJobCreateParameters) + { + if (streamingMapReduceJobCreateParameters == null) + { + throw new ArgumentNullException("streamingMapReduceJobCreateParameters"); + } + + return + TaskEx2.FromResult(this.CreateJobSuccessResult(streamingMapReduceJobCreateParameters, streamingMapReduceJobCreateParameters.JobName)); + } + + public void DownloadJobTaskLogs(string jobId, string targetDirectory) + { + this.DownloadJobTaskLogsAsync(jobId, targetDirectory).WaitForResult(); + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "Needed to implement interface")] + public Task DownloadJobTaskLogsAsync(string jobId, string targetDirectory) + { + if (this.taskLogAttempts.ContainsKey(jobId)) + { + if (!Directory.Exists(targetDirectory)) + { + Directory.CreateDirectory(targetDirectory); + } + foreach (string file in this.taskLogAttempts[jobId]) + { + File.Create(Path.Combine(targetDirectory, file)); + } + } + else + { + throw new InvalidOperationException("Job with id " + jobId + " does not exist."); + } + + return TaskEx2.FromResult(""); + } + + public JobDetails GetJob(string jobId) + { + return this.GetJobAsync(jobId).WaitForResult(); + } + + public Task GetJobAsync(string jobId) + { + this.LogMessage("Getting jobDetails '{0}'.", jobId); + lock (this.cluster.JobQueue) + { + if (this.cluster.JobQueue.ContainsKey(jobId)) + { + JobList jobHistory = this.ListJobs(); + JobDetails jobHistoryItem = jobHistory.Jobs.FirstOrDefault(job => job.JobId == jobId); + if (jobHistoryItem != null) + { + if (jobHistoryItem.Name.IsNotNull() && jobHistoryItem.Name.IndexOf("timeout", StringComparison.OrdinalIgnoreCase) > -1) + { + Thread.Sleep(50); + } + return TaskEx2.FromResult(jobHistoryItem); + } + } + } + + return TaskEx2.FromResult(null); + } + + public Stream GetJobErrorLogs(string jobId) + { + return this.GetJobErrorLogsAsync(jobId).WaitForResult(); + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "Needed to implement interface")] + public Task GetJobErrorLogsAsync(string jobId) + { + Stream resultStream = new MemoryStream(); + if (this.jobError.ContainsKey(jobId)) + { + resultStream = GetStream(this.jobError[jobId]); + } + + return TaskEx2.FromResult(resultStream); + } + + public Stream GetJobOutput(string jobId) + { + return this.GetJobOutputAsync(jobId).WaitForResult(); + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "Needed to implement interface")] + public Task GetJobOutputAsync(string jobId) + { + Stream resultStream = new MemoryStream(); + if (this.jobOutput.ContainsKey(jobId)) + { + resultStream = GetStream(this.jobOutput[jobId]); + } + + return TaskEx2.FromResult(resultStream); + } + + public Stream GetJobTaskLogSummary(string jobId) + { + return this.GetJobTaskLogSummaryAsync(jobId).WaitForResult(); + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "Needed to implement interface")] + public Task GetJobTaskLogSummaryAsync(string jobId) + { + Stream resultStream = new MemoryStream(); + if (this.taskLogs.ContainsKey(jobId)) + { + resultStream = GetStream(this.taskLogs[jobId]); + } + + return TaskEx2.FromResult(resultStream); + } + + public void HandleClusterWaitNotifyEvent(JobDetails jobDetails) + { + EventHandler handler = this.JobStatusEvent; + if (handler.IsNotNull()) + { + handler(this, new WaitJobStatusEventArgs(jobDetails)); + } + } + + public JobList ListJobs() + { + return this.ListJobsAsync().WaitForResult(); + } + + public Task ListJobsAsync() + { + this.LogMessage("Listing jobs"); + var jobDetailList = new JobList(); + var changedJobs = new List(); + lock (this.cluster.JobQueue) + { + foreach (JobDetails jobHistoryItem in this.cluster.JobQueue.Values) + { + JobDetails changedJob = this.ChangeJobState(jobHistoryItem); + jobDetailList.Jobs.Add(changedJob); + changedJobs.Add(changedJob); + } + + foreach (JobDetails changedJob in changedJobs) + { + this.cluster.JobQueue[changedJob.JobId] = changedJob; + } + } + + return TaskEx2.FromResult(jobDetailList); + } + + public void SetCancellationSource(CancellationTokenSource tokenSource) + { + this.cancellationTokenSource = tokenSource; + } + + public bool IgnoreSslErrors { get; set; } + + public JobDetails StopJob(string jobId) + { + return this.StopJobAsync(jobId).WaitForResult(); + } + + public Task StopJobAsync(string jobId) + { + JobDetails jobToStop = this.GetJob(jobId); + lock (this.cluster.JobDeletionQueue) + { + this.cluster.JobDeletionQueue.Add(jobId, DateTime.Now.AddSeconds(0.5)); + } + + return TaskEx2.FromResult(jobToStop); + } + + private static Stream GetStream(string contents) + { + byte[] bytes = Encoding.UTF8.GetBytes(contents); + return new MemoryStream(bytes); + } + + private JobDetails ChangeJobState(JobDetails jobDetailsHistoryItem) + { + if (jobDetailsHistoryItem.StatusCode == JobStatusCode.Unknown) + { + jobDetailsHistoryItem.StatusCode = JobStatusCode.Initializing; + } + else + { + switch (jobDetailsHistoryItem.StatusCode) + { + case JobStatusCode.Initializing: + jobDetailsHistoryItem.StatusCode = JobStatusCode.Running; + jobDetailsHistoryItem.PercentComplete = "map 5% reduce 0%"; + break; + case JobStatusCode.Running: + jobDetailsHistoryItem.StatusCode = JobStatusCode.Completed; + jobDetailsHistoryItem.PercentComplete = "map 100% reduce 100%"; + jobDetailsHistoryItem.ExitCode = 0; + if ((jobDetailsHistoryItem.Name.IsNotNullOrEmpty() && + string.Equals(jobDetailsHistoryItem.Name, "show tables", StringComparison.OrdinalIgnoreCase)) || + string.Equals(jobDetailsHistoryItem.Query, "show tables", StringComparison.OrdinalIgnoreCase)) + { + this.WriteJobOutput(jobDetailsHistoryItem.JobId, jobDetailsHistoryItem.StatusDirectory, "hivesampletable"); + this.WriteJobError(jobDetailsHistoryItem.JobId, jobDetailsHistoryItem.StatusDirectory, JobSuccesful); + } + else if (jobDetailsHistoryItem.Name.IsNotNullOrEmpty() && + string.Equals(jobDetailsHistoryItem.Name, "pi estimation job", StringComparison.OrdinalIgnoreCase)) + { + this.WriteJobOutput(jobDetailsHistoryItem.JobId, jobDetailsHistoryItem.StatusDirectory, "3.142"); + this.WriteJobError(jobDetailsHistoryItem.JobId, jobDetailsHistoryItem.StatusDirectory, JobSuccesful); + } + else + { + this.WriteJobOutput(jobDetailsHistoryItem.JobId, jobDetailsHistoryItem.StatusDirectory, JobSuccesful); + this.WriteJobError(jobDetailsHistoryItem.JobId, jobDetailsHistoryItem.StatusDirectory, JobSuccesful); + } + + this.WriteJobLogSummary(jobDetailsHistoryItem.StatusDirectory, jobDetailsHistoryItem.JobId); + break; + } + } + + KeyValuePair jobDeletionTime = + this.cluster.JobDeletionQueue.FirstOrDefault(deletedJob => deletedJob.Key == jobDetailsHistoryItem.JobId); + if (jobDeletionTime.Value != DateTime.MinValue && jobDeletionTime.Value != DateTime.MaxValue && jobDeletionTime.Value <= DateTime.Now) + { + jobDetailsHistoryItem.StatusCode = JobStatusCode.Canceled; + } + else + { + if (this.ShouldFail(jobDetailsHistoryItem)) + { + if (jobDetailsHistoryItem.StatusCode == JobStatusCode.Running) + { + jobDetailsHistoryItem.StatusCode = JobStatusCode.Failed; + jobDetailsHistoryItem.ExitCode = 4000; + this.WriteJobOutput(jobDetailsHistoryItem.JobId, jobDetailsHistoryItem.StatusDirectory, JobFailed); + this.WriteJobError(jobDetailsHistoryItem.JobId, jobDetailsHistoryItem.StatusDirectory, JobFailed); + } + } + else if (jobDetailsHistoryItem.Name.IsNotNullOrEmpty() && jobDetailsHistoryItem.Name.Contains("Unknown")) + { + if (jobDetailsHistoryItem.StatusCode == JobStatusCode.Running) + { + jobDetailsHistoryItem.StatusCode = JobStatusCode.Unknown; + } + } + } + + return jobDetailsHistoryItem; + } + + private JobCreationResults CreateJobSuccessResult(JobCreateParameters details, string jobName) + { + return this.CreateJobSuccessResult(new JobDetails { StatusDirectory = details.StatusFolder }, jobName); + } + + private JobCreationResults CreateJobSuccessResult(JobDetails jobDetailsHistoryEntry, string jobName) + { + if (this.cluster.IsNull()) + { + throw new InvalidOperationException("The cluster could not be found."); + } + + //if (this.credentials.UserName != this.cluster.Cluster.HttpUserName && this.credentials.Password != this.cluster.Cluster.HttpPassword) + //{ + // throw new UnauthorizedAccessException("The supplied credential do not have access to the server."); + //} + lock (this.cluster.JobQueue) + { + this.LogMessage("Starting jobDetails '{0}'.", jobName); + var jobCreationResults = new JobCreationResults { JobId = "job_" + Guid.NewGuid().ToString(), HttpStatusCode = HttpStatusCode.OK }; + + jobDetailsHistoryEntry.Name = jobName; + jobDetailsHistoryEntry.JobId = jobCreationResults.JobId; + jobDetailsHistoryEntry.PercentComplete = "map 0% reduce 0%"; + this.cluster.JobQueue.Add(jobDetailsHistoryEntry.JobId, jobDetailsHistoryEntry); + + return jobCreationResults; + } + } + + private void InitializeSimulator() + { + if (this.cluster.IsNull()) + { + throw new InvalidOperationException("Cluster is not set to a valid instance."); + } + + JobCreationResults piJob = + this.CreateMapReduceJob( + new MapReduceJobCreateParameters + { + ClassName = "pi", + JarFile = "wasb://containerName@hostname/jarfileName", + JobName = "pi estimation jobDetails", + StatusFolder = "/pioutput" + }); + + JobCreationResults hiveJob = + this.CreateHiveJob( + new HiveJobCreateParameters { JobName = "show tables jobDetails", Query = "show tables", StatusFolder = "/hiveoutput" }); + + JobCreationResults pigJob = this.CreatePigJob(new PigJobCreateParameters { Query = "show tables", StatusFolder = "/pigoutput" }); + + this.WriteJobOutput(piJob.JobId, "/pioutput", JobSuccesful); + this.WriteJobOutput(hiveJob.JobId, "/hiveoutput", "hivesampletable"); + this.WriteJobOutput(pigJob.JobId, "/pigoutput", JobSuccesful); + + this.WriteJobError(piJob.JobId, "/pioutput", JobSuccesful); + this.WriteJobError(hiveJob.JobId, "/hiveoutput", JobSuccesful); + this.WriteJobError(pigJob.JobId, "/pigoutput", JobSuccesful); + + this.WriteJobLogSummary("/pioutput", piJob.JobId); + this.WriteJobLogSummary("/hiveoutput", hiveJob.JobId); + this.WriteJobLogSummary("/pigoutput", pigJob.JobId); + } + + private void LogMessage(string content, params string[] args) + { + string message = content; + if (args.Any()) + { + message = string.Format(CultureInfo.InvariantCulture, content, args); + } + + this.logger.LogMessage(message, Severity.Informational, Verbosity.Diagnostic); + } + + private bool ShouldFail(JobDetails jobDetailsHistoryItem) + { + if (jobDetailsHistoryItem.Name.IsNotNullOrEmpty() && jobDetailsHistoryItem.Name.Contains("Fail")) + { + return true; + } + + return jobDetailsHistoryItem.Query.IsNotNullOrEmpty() && jobDetailsHistoryItem.Query.Contains("Fail"); + } + + private void WriteJobError(string jobId, string statusDirectory, string stdErrContent) + { + this.jobError[jobId] = stdErrContent; + } + + private void WriteJobLogSummary(string statusDirectory, string jobId) + { + this.taskLogs[jobId] = jobId + " ran on this server."; + var taskLogAttemptFiles = new List(); + taskLogAttemptFiles.Add("attempt_" + jobId + "_0"); + taskLogAttemptFiles.Add("attempt_" + jobId + "_1"); + taskLogAttemptFiles.Add("attempt_" + jobId + "_2"); + this.taskLogAttempts[jobId] = taskLogAttemptFiles; + } + + private void WriteJobOutput(string jobId, string statusDirectory, string stdoutContent) + { + this.jobOutput[jobId] = stdoutContent; + } + + public ILogger Logger { get; private set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/AzureHDInsightJobSubmissionClientSimulatorFactory.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/AzureHDInsightJobSubmissionClientSimulatorFactory.cs new file mode 100644 index 000000000000..05fc506e976a --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/AzureHDInsightJobSubmissionClientSimulatorFactory.cs @@ -0,0 +1,60 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.Hadoop.Client; +using Microsoft.WindowsAzure.Management.HDInsight; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.BaseInterfaces; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Simulators +{ + public class AzureHDInsightJobSubmissionClientSimulatorFactory : IAzureHDInsightJobSubmissionClientFactory + { + internal static IDictionary jobSubmissionClients = new Dictionary(); + + public IJobSubmissionClient Create(IJobSubmissionClientCredential credentials) + { + var asBasic = credentials as BasicAuthCredential; + var asSubscription = credentials as JobSubmissionCertificateCredential; + string clusterName = string.Empty; + + if (asBasic != null) + { + clusterName = asBasic.Server.Host.Split('.').First(); + } + else if (asSubscription != null) + { + clusterName = asSubscription.Cluster; + } + else + { + throw new NotSupportedException("Credential type :" + credentials.GetType().Name + ": is not supported"); + } + + string clusterUri = GatewayUriResolver.GetGatewayUri(clusterName).AbsoluteUri.ToUpperInvariant(); + if (!jobSubmissionClients.ContainsKey(clusterUri)) + { + AzureHDInsightClusterManagementClientSimulator.SimulatorClusterContainer cluster = + AzureHDInsightClusterManagementClientSimulator.GetClusterInternal(clusterName); + var jobClient = new AzureHDInsightJobSubmissionClientSimulator(credentials, cluster); + jobSubmissionClients.Add(clusterUri, jobClient); + } + + return jobSubmissionClients[clusterUri]; + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/AzureHDInsightStorageHandlerSimulator.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/AzureHDInsightStorageHandlerSimulator.cs new file mode 100644 index 000000000000..ff1529d9b2bf --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/AzureHDInsightStorageHandlerSimulator.cs @@ -0,0 +1,39 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Simulators +{ + internal class AzureHDInsightStorageHandlerSimulator : IAzureHDInsightStorageHandler + { + internal Uri Path { get; private set; } + internal Stream UploadedStream { get; private set; } + + public Uri GetStoragePath(Uri httpPath) + { + return AzureHDInsightStorageHandler.GetWasbStoragePath(httpPath); + } + + public void UploadFile(Uri path, Stream contents) + { + this.Path = path; + this.UploadedStream = new MemoryStream(); + contents.CopyTo(this.UploadedStream); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/AzureHDInsightStorageHandlerSimulatorFactory.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/AzureHDInsightStorageHandlerSimulatorFactory.cs new file mode 100644 index 000000000000..8c9c7e0d6f98 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/AzureHDInsightStorageHandlerSimulatorFactory.cs @@ -0,0 +1,34 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Simulators +{ + internal class AzureHDInsightStorageHandlerSimulatorFactory : IAzureHDInsightStorageHandlerFactory + { + public AzureHDInsightStorageHandlerSimulatorFactory() + { + Instance = new AzureHDInsightStorageHandlerSimulator(); + } + + internal static IAzureHDInsightStorageHandler Instance { get; set; } + + public IAzureHDInsightStorageHandler Create(WabStorageAccountConfiguration storageAccountConfiguration) + { + return Instance; + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/AzureHDInsightSubscriptionResolverSimulator.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/AzureHDInsightSubscriptionResolverSimulator.cs new file mode 100644 index 000000000000..707b1ebc29ff --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/AzureHDInsightSubscriptionResolverSimulator.cs @@ -0,0 +1,75 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Security.Cryptography.X509Certificates; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.BaseInterfaces; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Simulators +{ + internal class AzureHDInsightSubscriptionResolverSimulator : IAzureHDInsightSubscriptionResolver + { + private IEnumerable knownSubscriptions; + + internal AzureHDInsightSubscriptionResolverSimulator() + { + var certificate = new X509Certificate2(Convert.FromBase64String(IntegrationTestBase.TestCredentials.Certificate), string.Empty); + ProfileClient.DataStore.AddCertificate(certificate); + ProfileClient profileClient = new ProfileClient(); + profileClient.Profile.Accounts[certificate.Thumbprint] = new AzureAccount + { + Id = certificate.Thumbprint, + Type = AzureAccount.AccountType.Certificate, + Properties = + new Dictionary + { + { + AzureAccount.Property.Subscriptions, + IntegrationTestBase.TestCredentials.SubscriptionId.ToString() + } + } + }; + profileClient.Profile.Save(); + + this.knownSubscriptions = new AzureSubscription[] + { + new AzureSubscription() + { + Id = IntegrationTestBase.TestCredentials.SubscriptionId, + Account = certificate.Thumbprint, + Environment = EnvironmentName.AzureCloud + }, + }; + } + + public AzureSubscription ResolveSubscription(string subscription) + { + Guid subId; + if (Guid.TryParse(subscription, out subId)) + { + return this.knownSubscriptions.FirstOrDefault(s => s.Id == subId); + } + else + { + return this.knownSubscriptions.FirstOrDefault(s => s.Name == subscription); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/AzureHDInsightSubscriptionResolverSimulatorFactory.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/AzureHDInsightSubscriptionResolverSimulatorFactory.cs new file mode 100644 index 000000000000..fa9d1e79a8c3 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/AzureHDInsightSubscriptionResolverSimulatorFactory.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.BaseInterfaces; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Simulators +{ + internal class AzureHDInsightSubscriptionResolverSimulatorFactory : IAzureHDInsightSubscriptionResolverFactory + { + public IAzureHDInsightSubscriptionResolver Create(AzureProfile profile) + { + return new AzureHDInsightSubscriptionResolverSimulator(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/BufferingLogWriterFactory.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/BufferingLogWriterFactory.cs new file mode 100644 index 000000000000..ca31e875add0 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/BufferingLogWriterFactory.cs @@ -0,0 +1,34 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Logging; +using Microsoft.WindowsAzure.Management.HDInsight.Logging; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Simulators +{ + internal class BufferingLogWriterFactory : IBufferingLogWriterFactory + { + public static IBufferingLogWriter Instance { get; set; } + + public static void Reset() + { + Instance = null; + } + + public IBufferingLogWriter Create() + { + return Instance; + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/HDInsightSDKSupportedVersions.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/HDInsightSDKSupportedVersions.cs new file mode 100644 index 000000000000..3c6845357b50 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/HDInsightSDKSupportedVersions.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Simulators +{ + /// + /// Contains the minimum and maximum supported versions. + /// + internal class HDInsightSDKSupportedVersions + { + public static readonly Version MaxVersion = new Version("2.1"); + public static readonly Version MinVersion = new Version("1.6"); + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/Types/ErrorDetails.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/Types/ErrorDetails.cs new file mode 100644 index 000000000000..f902e05d9818 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/Types/ErrorDetails.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Net; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Simulators.Types +{ + /// + /// Class to represent an error that has been returned in response to a passthrough request. + /// + [DataContract(Namespace = "http://schemas.microsoft.com/hdinsight/2013/05/management")] + public class ErrorDetails + { + [DataMember(EmitDefaultValue = false, IsRequired = true, Order = 2)] + public string ErrorId { get; set; } + + [DataMember(EmitDefaultValue = false, IsRequired = true, Order = 3)] + public string ErrorMessage { get; set; } + + [DataMember(EmitDefaultValue = false, IsRequired = true, Order = 1)] + public HttpStatusCode StatusCode { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/Types/UserChangeOperationState.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/Types/UserChangeOperationState.cs new file mode 100644 index 000000000000..42cea58291c4 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/Types/UserChangeOperationState.cs @@ -0,0 +1,25 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Simulators.Types +{ + /// + /// Represents the operation being requested on the user + /// + public enum UserChangeOperationState + { + Pending, + Completed, + Error + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/Types/UserChangeOperationType.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/Types/UserChangeOperationType.cs new file mode 100644 index 000000000000..d1d19a4bfc07 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/Types/UserChangeOperationType.cs @@ -0,0 +1,24 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Simulators.Types +{ + /// + /// Represents the operation being requested for the user. + /// + public enum UserChangeOperationType + { + Disable, + Enable + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/Types/UserType.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/Types/UserType.cs new file mode 100644 index 000000000000..cd2584d31cf4 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Simulators/Types/UserType.cs @@ -0,0 +1,24 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Simulators.Types +{ + /// + /// The type of cluster user being changed. + /// + public enum UserType + { + Rdp, + Http + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Utilities/AzureTestCredentials.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Utilities/AzureTestCredentials.cs new file mode 100644 index 000000000000..c96d99103339 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Utilities/AzureTestCredentials.cs @@ -0,0 +1,107 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Diagnostics.CodeAnalysis; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities +{ + public class StorageAccountCredentials + { + public string Container { get; set; } + public string Key { get; set; } + public string Name { get; set; } + } + + public class AlternativeEnvironment + { + public string Endpoint { get; set; } + public string Namespace { get; set; } + public Guid SubscriptionId { get; set; } + } + + public class MetastoreCredentials + { + public string Database { get; set; } + public string Description { get; set; } + public string SqlServer { get; set; } + } + + public class ResourceProviderProperty + { + public string Key { get; set; } + public string Value { get; set; } + } + + public class KnownCluster + { + public string Cluster { get; set; } + public string DnsName { get; set; } + public string Version { get; set; } + } + + public enum EnvironmentType + { + Production, + Current, + Next, + DogFood + } + + public class CreationDetails + { + [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", + Justification = "Needed for serialization to work correctly. [tgs]")] + public StorageAccountCredentials[] AdditionalStorageAccounts { get; set; } + + public StorageAccountCredentials DefaultStorageAccount { get; set; } + + [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", + Justification = "Needed for serialization to work correctly. [tgs]")] + public MetastoreCredentials[] HiveStores { get; set; } + + public string Location { get; set; } + + [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", + Justification = "Needed for serialization to work correctly. [tgs]")] + public MetastoreCredentials[] OozieStores { get; set; } + } + + [Serializable] + public class AzureTestCredentials + { + public string AccessToken { get; set; } + public string AzurePassword { get; set; } + public string AzureUserName { get; set; } + public string Certificate { get; set; } + public string CloudServiceName { get; set; } + public string CredentialsName { get; set; } + public string Endpoint { get; set; } + public EnvironmentType EnvironmentType { get; set; } + + [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", + Justification = "Needed for serialization to work correctly. [tgs]")] + public CreationDetails[] Environments { get; set; } + + public string HadoopUserName { get; set; } + public string InvalidCertificate { get; set; } + + [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", + Justification = "Needed for serialization to work correctly. [tgs]")] + public ResourceProviderProperty[] ResourceProviderProperties { get; set; } + + public Guid SubscriptionId { get; set; } + public KnownCluster WellKnownCluster { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Utilities/IntegrationTestBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Utilities/IntegrationTestBase.cs new file mode 100644 index 000000000000..1b3b73b190fa --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Utilities/IntegrationTestBase.cs @@ -0,0 +1,390 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Linq; +using System.Management.Automation; +using System.Security; +using System.Security.Cryptography.X509Certificates; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Concretes; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.PowerShellTestAbstraction.Interfaces; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Simulators; +using Microsoft.WindowsAzure.Management.HDInsight; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.BaseInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; +using Microsoft.WindowsAzure.Management.HDInsight.Framework.Core; +using Microsoft.WindowsAzure.Management.HDInsight.Logging; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities +{ + public class IntegrationTestBase : DisposableObject + { + [SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes", + Justification = + "This is a bad pattern but is used strictly for test purposes. This should be cleaned up later and should not be duplicated as a pattern elsewhere. [TGS]" + )] + public static readonly IntegrationTestManager TestManager = new IntegrationTestManager(); + + private static bool IsInitialized = true; + internal static Dictionary testToClusterMap = new Dictionary(); + + protected static string ClusterPrefix; + private static readonly List types = new List(); + private static IHDInsightSubscriptionCredentials invalidCertificate; + private static IHDInsightSubscriptionCredentials invalidSubscriptionId; + private static IHDInsightSubscriptionCredentials validCredentials; + private IRunspace runspace; + public static AzureTestCredentials TestCredentials { get; private set; } + public TestContext TestContext { get; set; } + + public static IEnumerable GetAllCredentials() + { + return TestManager.GetAllCredentials(); + } + + public static AzureSubscription GetCurrentSubscription() + { + string certificateThumbprint1 = "jb245f1d1257fw27dfc402e9ecde37e400g0176r"; + ProfileClient profileClient = new ProfileClient(); + profileClient.Profile.Accounts[certificateThumbprint1] = + new AzureAccount() + { + Id = certificateThumbprint1, + Type = AzureAccount.AccountType.Certificate + }; + + profileClient.Profile.Save(); + + return new AzureSubscription() + { + Id = IntegrationTestBase.TestCredentials.SubscriptionId, + // Use fake certificate thumbprint + Account = certificateThumbprint1 + }; + } + + public static AzureTestCredentials GetCredentialsForEnvironmentType(EnvironmentType type) + { + AzureTestCredentials[] environments = TestManager.GetAllCredentials().ToArray(); + for (int i = 0; i < environments.Length; i++) + { + if (environments[i].EnvironmentType == type) + { + return environments[i]; + } + } + return null; + } + + public static AzureTestCredentials GetCredentialsForLocation(string name, string location) + { + AzureTestCredentials namedCreds = GetCredentials(name); + for (int i = 0; i < namedCreds.Environments.Length; i++) + { + if (namedCreds.Environments[i].Location == location) + { + return CloneForEnvironment(namedCreds, i); + } + } + return null; + } + + public static AzureTestCredentials GetCredentialsForLocation(string location) + { + return GetCredentialsForLocation(TestCredentialsNames.Default, location); + } + + public static IHDInsightCertificateCredential GetValidCredentials() + { + return validCredentials as IHDInsightCertificateCredential; + } + + public static IEnumerable GetWellKnownStorageAccounts() + { + var accounts = new List(); + accounts.AddRange( + TestCredentials.Environments.Select( + env => + new WabStorageAccountConfiguration( + env.DefaultStorageAccount.Name, env.DefaultStorageAccount.Key, env.DefaultStorageAccount.Container))); + accounts.AddRange( + TestCredentials.Environments.SelectMany(env => env.AdditionalStorageAccounts) + .Select(acc => new WabStorageAccountConfiguration(acc.Name, acc.Key, acc.Container))); + return accounts; + } + + public static void TestRunCleanup() + { + } + + public static void TestRunSetup() + { + // This is to ensure that all key assemblies are loaded before IOC registration is required. + // This is only necessary for the test system as load order is correct for a production run. + // types.Add(typeof(GetAzureHDInsightClusterCmdlet)); + var cmdletRunManager = ServiceLocator.Instance.Locate(); + cmdletRunManager.RegisterType(); + cmdletRunManager.RegisterType(); + cmdletRunManager.RegisterType(); + cmdletRunManager.RegisterType(); + cmdletRunManager.RegisterType(); + cmdletRunManager.RegisterType(); + var testManager = new IntegrationTestManager(); + + TestCredentials = testManager.GetCredentials("default"); + if (TestCredentials == null) + { + Assert.Inconclusive("No entry was found in the credential config file for the specified test configuration."); + } + + // Sets the certificate + var defaultCertificate = new X509Certificate2( + Convert.FromBase64String(TestCredentials.Certificate), string.Empty); + // Sets the test static properties + ClusterPrefix = string.Format("CLITest-{0}", Environment.GetEnvironmentVariable("computername") ?? "unknown"); + + // Sets the credential objects + var tempCredentials = new HDInsightCertificateCredential + { + SubscriptionId = TestCredentials.SubscriptionId, + Certificate = defaultCertificate + }; + + validCredentials = tempCredentials; + tempCredentials = new HDInsightCertificateCredential { SubscriptionId = Guid.NewGuid(), Certificate = defaultCertificate }; + invalidSubscriptionId = tempCredentials; + invalidCertificate = tempCredentials; + } + + public void ApplyFullMocking() + { + WaitAzureHDInsightJobCommand.ReduceWaitTime = true; + var cmdletManager = ServiceLocator.Instance.Locate(); + cmdletManager.MockingLevel = ServiceLocationMockingLevel.ApplyFullMocking; + AzureSession.AuthenticationFactory = new MockTokenAuthenticationFactory(); + ProfileClient.DataStore = new MockDataStore(); + } + + public void ApplyIndividualTestMockingOnly() + { + WaitAzureHDInsightJobCommand.ReduceWaitTime = false; + var cmdletManager = ServiceLocator.Instance.Locate(); + cmdletManager.MockingLevel = ServiceLocationMockingLevel.ApplyIndividualTestMockingOnly; + } + + public void ApplyNoMocking() + { + WaitAzureHDInsightJobCommand.ReduceWaitTime = false; + var cmdletManager = ServiceLocator.Instance.Locate(); + cmdletManager.MockingLevel = ServiceLocationMockingLevel.ApplyNoMocking; + } + + public void ApplySimulatorMockingOnly() + { + WaitAzureHDInsightJobCommand.ReduceWaitTime = true; + var cmdletManager = ServiceLocator.Instance.Locate(); + cmdletManager.MockingLevel = ServiceLocationMockingLevel.ApplyTestRunMockingOnly; + } + + public ClusterCreateParameters GetRandomCluster() + { + // Creates the cluster + return new ClusterCreateParameters + { + Name = this.GetRandomClusterName(), + UserName = TestCredentials.AzureUserName, + Password = this.GetRandomValidPassword(), + Location = "East US 2", + Version = "default", + DefaultStorageAccountName = TestCredentials.Environments[0].DefaultStorageAccount.Name, + DefaultStorageAccountKey = TestCredentials.Environments[0].DefaultStorageAccount.Key, + DefaultStorageContainer = TestCredentials.Environments[0].DefaultStorageAccount.Container, + ClusterSizeInNodes = 3 + }; + } + + [SuppressMessage("Microsoft.Globalization", "CA1308:NormalizeStringsToUppercase", Justification = "Azure names must be lowercase.")] + public string GetRandomClusterName() + { + // Random DNS name. + DateTime time = DateTime.UtcNow; + string retval = + string.Format( + "{0}-{1}{2}{3}-{4}", + ClusterPrefix, + time.Month.ToString("00"), + time.Day.ToString("00"), + time.Hour.ToString("00"), + Guid.NewGuid().ToString("N")).ToLowerInvariant(); + testToClusterMap.Add(retval, Environment.StackTrace); + return retval; + } + + public string GetRandomValidPassword() + { + return Guid.NewGuid().ToString().ToUpperInvariant().Replace('A', 'a').Replace('B', 'b').Replace('C', 'c') + "forTest!"; + } + + public virtual void Initialize() + { + if (!IsInitialized) + { + TestRunSetup(); + IsInitialized = true; + } + + this.ApplyFullMocking(); + this.ResetIndividualMocks(); + } + + public void ResetIndividualMocks() + { + var cmdletManager = ServiceLocator.Instance.Locate(); + cmdletManager.Reset(); + } + + public virtual void TestCleanup() + { + this.ApplyFullMocking(); + this.ResetIndividualMocks(); + } + + protected static PSCredential GetAzurePsCredentials() + { + return GetPSCredential(TestCredentials.AzureUserName, TestCredentials.AzurePassword); + } + + protected static AzureTestCredentials GetCredentials(string name) + { + return TestManager.GetCredentials(name); + } + + protected static IHDInsightCertificateCredential GetInvalidCertificateCredentials() + { + return invalidCertificate as IHDInsightCertificateCredential; + } + + protected static IHDInsightCertificateCredential GetInvalidSubscriptionIdCredentials() + { + return invalidSubscriptionId as IHDInsightCertificateCredential; + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", + Justification = "Need secure string for pscredential object.")] + protected static PSCredential GetPSCredential(string userName, string password) + { + var securePassword = new SecureString(); + + foreach (char character in password) + { + securePassword.AppendChar(character); + } + + return new PSCredential(userName, securePassword); + } + + protected IRunspace GetPowerShellRunspace(string location) + { + if (this.runspace.IsNull()) + { + // string loc = typeof(GetAzureHDInsightClusterCmdlet).Assembly.Location; + this.runspace = Help.SafeCreate(() => RunspaceAbstraction.Create()); + this.runspace.NewPipeline().AddCommand("Import-Module").WithParameter("Name", location).Invoke(); + } + return this.runspace; + } + + private static AzureTestCredentials CloneForEnvironment(AzureTestCredentials orig, int index) + { + var retval = new AzureTestCredentials(); + retval.AzurePassword = orig.AzurePassword; + retval.AzureUserName = orig.AzureUserName; + retval.Certificate = orig.Certificate; + retval.CredentialsName = orig.CredentialsName; + retval.HadoopUserName = orig.HadoopUserName; + retval.InvalidCertificate = orig.InvalidCertificate; + retval.SubscriptionId = orig.SubscriptionId; + retval.ResourceProviderProperties = orig.ResourceProviderProperties; + retval.WellKnownCluster = new KnownCluster + { + Cluster = orig.WellKnownCluster.Cluster, + DnsName = orig.WellKnownCluster.DnsName, + Version = orig.WellKnownCluster.Version + }; + retval.Environments = new CreationDetails[0]; + CreationDetails env = retval.Environments[0] = new CreationDetails(); + CreationDetails origEnv = orig.Environments[index]; + retval.CloudServiceName = orig.CloudServiceName; + env.DefaultStorageAccount = new StorageAccountCredentials + { + Container = origEnv.DefaultStorageAccount.Container, + Key = origEnv.DefaultStorageAccount.Key, + Name = origEnv.DefaultStorageAccount.Name + }; + retval.Endpoint = orig.Endpoint; + env.Location = origEnv.Location; + retval.EnvironmentType = orig.EnvironmentType; + var storageAccounts = new List(); + foreach (StorageAccountCredentials storageAccountCredentials in origEnv.AdditionalStorageAccounts) + { + var account = new StorageAccountCredentials + { + Container = storageAccountCredentials.Container, + Key = storageAccountCredentials.Key, + Name = storageAccountCredentials.Name + }; + storageAccounts.Add(account); + } + env.AdditionalStorageAccounts = storageAccounts.ToArray(); + var stores = new List(); + foreach (MetastoreCredentials metastoreCredentials in origEnv.HiveStores) + { + var metaStore = new MetastoreCredentials + { + Database = metastoreCredentials.Database, + Description = metastoreCredentials.Description, + SqlServer = metastoreCredentials.SqlServer + }; + } + env.HiveStores = stores.ToArray(); + stores.Clear(); + foreach (MetastoreCredentials metastoreCredentials in origEnv.OozieStores) + { + var metaStore = new MetastoreCredentials + { + Database = metastoreCredentials.Database, + Description = metastoreCredentials.Description, + SqlServer = metastoreCredentials.SqlServer + }; + } + env.OozieStores = stores.ToArray(); + return retval; + } + + public static class TestCredentialsNames + { + public const string Default = "default"; + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Utilities/IntegrationTestManager.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Utilities/IntegrationTestManager.cs new file mode 100644 index 000000000000..0494c011f1f7 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Utilities/IntegrationTestManager.cs @@ -0,0 +1,112 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities +{ + public class IntegrationTestManager + { + public IntegrationTestManager() + { + this.InitializeCredentialSets(); + } + + private void InitializeCredentialSets() + { + var defaultCredentialSet = new AzureTestCredentials() + { + AccessToken = Guid.NewGuid().ToString("N"), + AzurePassword = "HDInsight123!", + AzureUserName = "HDInsightUser", + Certificate = @"MIIKJAIBAzCCCeQGCSqGSIb3DQEHAaCCCdUEggnRMIIJzTCCBe4GCSqGSIb3DQEHAaCCBd8EggXbMIIF1zCCBdMGCyqGSIb3DQEMCgECoIIE7jCCBOowHAYKKoZIhvcNAQwBAzAOBAi3trgRTVm06gICB9AEggTIlm0GB/VlsXv0K7CYreHb8OG+QfqJFpTlZAlGZhdm3i/bdCS86gnX4+F8SfW/x4f3nPnDIW50Avf0e9uULXBPIKvLKjQJL1xSOm+R1L1LVV/g4cXuK3jjCreDJaYVhhr2cmo2mrRCmyHePED39h0oBmwABRR/b49HcUQGTYN+dgh3ZcrhfLqrePhcufCaVREepJ6KNgIjYyPxoj2CU43maNiDwS1jl2rCbSe9EwLsvabV0yngHZZKtdOtwD14f6sbTJd3IlxNR+ohQZ2sP182PhCWGavHtDPagbj0CnVNl6zVQKqjQGbide8Nu6jskQxtmcQ0OriUHTz7ZsH6dJXhLBdxY8wYzZlCooOWei58HehWacPfC2RxG2uZz5Yq1ARoU9Py+L0j5SGg6/WhZNEakRDfVtwm2ias97jy/U+534UdeQobTQeZrKTpoYCaVBpd1FRt7s9LBP2z3wp84FdjI2QbvnHey/NS3ACplejOX5ZeHXRqJQhzLy2BFdmMXpS+eX8iqhVkXFzDEoJJtX7DlSdCvfFVODw2lz5DvxJidPayadDrh1WVpZTI/y5UtSrBiU9Z+xiE5FmgIK6i5WPxkoxIDcyeshlY6uyubdJi//EAe9+J7Lhenn20UgoVG7X9wnPiQIGfaTAXiVVbHf4ZvKogoLk03lFCGJhJDLbo5X6wvDOP0uY+zgnSPqoajv2pm/Znuwr7EdE5PLzNxuM0fFcO60+Fk/uwp9cL/jtN5EZ2jx83JR/zighBr2rJokDnaOMD7LQLwEooNL2kPrXLxr7KbwNzTpLB99spBSqdMC/W4y3elyJsquvopt5FAveLbXYV0auGe/3RSu8WXebTlVHjikJgZi/rpsyA0GG8sjixXAUcCyJLGKcxkFsk5+duds1RkoRo81+1PNlxQjFptqgKzHp0oDHswZgFBXZkq7Fa1anTqrH9qBOuY8xa0bgA6/XcUEvcWqWYpCTL1z0T3FwtraOSpg8SvLFoIGoVkEMzBAMHIq0KVDyTINE7SGOlPDHkkw1X7Hq1xItKjh9iJ3B6jp0nKmV+tqDeIOUgtNhQwAs8cpIAgXLq9zUL9nUDiYvqZnV9+uqO/j6/Ushq3+bHRa6aJh2750siwwF1n3sYG7rDykWH9BqtBJHgrzSfepxzJNOFEgwIAAm578iKAofEf9takCVmj1ndKRBiqRxA+qHOxKkE7D8CmrNvpz8Q1bz0WFVgP6XIQJquM9az9jf6VvTU9p4qrI/NQ8sdUtNEO1uwqzwrSf2sLAIVyNXjA1KrubRVNZn+qnTaoF0uEZce4foIBSxuHRF+ZFpbhC3QM6f6xuYIpMhnfSEt76Xo3D66pmOmcQmhjVMp1QbxdoBCtsPhCsGGKGfCdDBdMm5EHvB7PXHFEoxBoVKLGReuHRLMgVv+8eaa0rIGAXbxFOXff+UZKthXoI/MsBDzP9EMly83GH0VOePVgLixNZgx9rcAL91o2l+s8i1ZNklqe85XUQUmzJJ3UHRUJo1Bwcgg47RR+gJpZ5N8ArVB9TxSKUyKignQ6Hmo4CMrPaj+/4JovzxWz8MviteHxYhSkpgmFKPqe7H1UtD8Ri5t5XwdPKpGOjthUtDsFMfH/u8Mp61wMjE8ec8pMYHRMBMGCSqGSIb3DQEJFTEGBAQBAAAAMFsGCSqGSIb3DQEJFDFOHkwAewBGAEUAMABCAEMAOQAyADYALQBFADYAMwA0AC0ANABBAEQAOQAtADgAOQA3ADIALQA3AEMAMAA4AEUANgAzAEUANwA4ADIARgB9MF0GCSsGAQQBgjcRATFQHk4ATQBpAGMAcgBvAHMAbwBmAHQAIABTAG8AZgB0AHcAYQByAGUAIABLAGUAeQAgAFMAdABvAHIAYQBnAGUAIABQAHIAbwB2AGkAZABlAHIwggPXBgkqhkiG9w0BBwagggPIMIIDxAIBADCCA70GCSqGSIb3DQEHATAcBgoqhkiG9w0BDAEGMA4ECCBMrMfW/pLnAgIH0ICCA5ACNbwiA1a9rPXiCXXjyUB2R/UQeRCOZQpt0RJyY+thE8POzrwXOudXtM4lZjAd8XMSvSrojC+lN+yKdjjrcN7L5rWQP+TCCilaO4LpEcso1xTe65NH7yMQzNXSKCkmzIToqcp12vh4DiYg9aT1m968c7KcyoJcvt2qn5ezcKSyv0dHZdKt9RNr3mPsPxA7vMesC6wsHRr0nCkvo8sgPTMgZdJIM0pLqyBEmZPTHz15dcUzNOb7A+5pi7vdzJ7ezalrG8jyHdBpnBp+7ct/5DzZALawWdngR5mbxbDqxooO+8hWH15DpsEvBjqt6AUwsVl4iszlCrdafqJHW5igmA8TC69NS1OerueU6VYcZBD1kf/T5Jt+ax9rq5NgQ0HrQwAbFeS+nnFABHJWFrzF79sfgT3i185ke5qYllN9ttX2Fh14HkJ/ZvlKOVsPkmEKbmWq83SQ9DNsL46ltjWB/krTWA836UVUtrXwKYRVmMKrleLNmpwKCoZ4En3G2ZHyOaRYcDGm3Sc0ZM7OgdSOnvGiOCo4FAUjV8K2ZtNAkxLJ4aoLV6qJqEaoSvNNCpBD8B8ZgjwoyG5JEE4SE/pJBOQPmqmbys5+wXIif76TBKy8aIFv2zuMZjSdF9I0Ma6gI23jO94HGsXPin/ed2PAn9WGhaqqQ+vQ9YUnfXRq/xucQ3X550pwUdEVTlB9F7zGe4H2p8eHUqJUd8acZeghTOOJsQYfeP2al8yS9NKwQsYMjEPal8Jvf6shZJ0M0g4LwxAXFk9FUzWubNT3nYqVYOteMpCUswBW+qCwZ9fMEOV/U77ESP0IAP1Lmec2i5Az3Efj1XIDu0xJxCTY/s0ZpJeNx/kIVtlPZPFAOPh18EJk75jyAcU8JkTkKwB5Vppi0k8BRdWONkH1zTApaQxX0wO4nsN+BKL730kvI/2Hx1Hf1z7RXpTFBzjoEjFO6HkQKC63aun4JK3MO51FgxXAjgvF36PLBF2NwwHRXIChwY4NawSPfG2Vy0LXfgNU/LnSdK5TI+YvAq/Z1MWtvRcV9f5323vtieEZ2LP7xhQ5TDyEE2WJagn5GuUM5h17x2a5VhXw2tLZYyyqrdbZh/aB6qIEtbD/wrirqj2Cb/T27G1Ya4GuQRTYIzSeD1NQ0wamBZo7FlmLHRo9gwaiGK1MFZgZp/6xbdleKGCvEyvrPzhPDbkO2yuz4TyOpL5S4nmb+mEwNzAfMAcGBSsOAwIaBBSi0CmFbjfFF5eZ3Ew3lnTrOvlZRwQUx15wNo0WgvIEMjLF9YCzvK0PTXE=", + CloudServiceName = "HDInsight", + SubscriptionId = new Guid("e4c4bcab-7e3b-4439-9919-d2e607f10286"), + CredentialsName = "default", + Endpoint = "https://management.core.windows.net:8443/", + HadoopUserName = "HDInsightUser", + WellKnownCluster = + new KnownCluster() + { + Cluster = "https://AzureHDInsightTestCluster.AzureHDInsight.net", + DnsName = "AzureHDInsightTestCluster", + Version = "1.6" + }, + Environments = new CreationDetails[] + { + new CreationDetails() + { + Location="East US 2", + HiveStores = new MetastoreCredentials[] + { + new MetastoreCredentials() + { + Database = "Hivemetabase", + Description="Hive metabase", + SqlServer ="hive.sql.server.azure.net" + } + }, + OozieStores = new MetastoreCredentials[] + { + new MetastoreCredentials() + { + Database = "ooziemetabase", + Description="oozie metabase", + SqlServer ="oozie.sql.server.azure.net" + } + }, + DefaultStorageAccount = new StorageAccountCredentials() + { + Container = "deployment1", + Key = Guid.NewGuid().ToString("N"), + Name = "defaultstorageaccount.blob.core.windows.net" + }, + AdditionalStorageAccounts = new StorageAccountCredentials[] + { + new StorageAccountCredentials() + { + Container = "deployment1", + Key = Guid.NewGuid().ToString("N"), + Name = "additionaltorageaccount1.blob.core.windows.net" + }, + new StorageAccountCredentials() + { + Container = "deployment1", + Key = Guid.NewGuid().ToString("N"), + Name = "additionaltorageaccount2.blob.core.windows.net" + } + } + } + } + }; + + this.credentialSets.Add("default", defaultCredentialSet); + } + + private readonly Dictionary credentialSets = new Dictionary(); + + public IEnumerable GetAllCredentials() + { + return this.credentialSets.Values; + } + + public AzureTestCredentials GetCredentials(string name) + { + AzureTestCredentials creds = null; + this.credentialSets.TryGetValue(name, out creds); + return creds; + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Utilities/Logger.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Utilities/Logger.cs new file mode 100644 index 000000000000..0562a2266a69 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Utilities/Logger.cs @@ -0,0 +1,54 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Microsoft.WindowsAzure.Management.HDInsight.Logging; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities +{ + /// + /// The default implementation of the logger. All messages are + /// simply passed into the LogWriter. + /// + internal class Logger : ILogger + { + private readonly List writers = new List(); + + /// + public void AddWriter(ILogWriter writer) + { + this.writers.Add(writer); + } + + /// + public void RemoveWriter(ILogWriter writer) + { + this.writers.Remove(writer); + } + + /// + public void LogMessage(string message) + { + this.LogMessage(message, Severity.Message, Verbosity.Normal); + } + + public void LogMessage(string message, Severity severity, Verbosity verbosity) + { + foreach (ILogWriter logWriter in this.writers) + { + logWriter.Log(severity, verbosity, message); + } + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Utilities/TaskExtensions.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Utilities/TaskExtensions.cs new file mode 100644 index 000000000000..ffd008694034 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Utilities/TaskExtensions.cs @@ -0,0 +1,49 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Management.Automation; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities +{ + internal static class TaskEx2 + { + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "Required for functionality.")] + public static Task FromResult(TResult result) + { + var task = new Task(() => result); + task.RunSynchronously(); + return task; + } + + public static IEnumerable ToEnumerable(this ICollection powerShellObjects) where TEntity : class + { + powerShellObjects.ArgumentNotNull("psObjects"); + var enumerableEntities = new List(); + foreach (PSObject psObject in powerShellObjects) + { + var entity = psObject.ImmediateBaseObject as TEntity; + if (entity != null) + { + enumerableEntities.Add(entity); + } + } + + return enumerableEntities; + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Utilities/TestConstants.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Utilities/TestConstants.cs new file mode 100644 index 000000000000..cf3f6f06e42b --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Utilities/TestConstants.cs @@ -0,0 +1,41 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities +{ + /// + /// Provides Hard codes for key values. + /// + internal static class TestConstants + { + /// + /// The interval to use when polling a Hadoop cluster. + /// + public const int PollingInterval = 5000; + + /// + /// The number of times to retry when communicating with a Hadoop cluster. + /// + public const int RetryCount = 5; + + /// + /// The protocol string to use when using a Microsoft Azure Blob Storage account. + /// + public const string WabsProtocol = "wasb"; + + /// + /// The protocol scheme name to use when using a Microsoft Azure Blob Storage account. + /// + public const string WabsProtocolSchemeName = "wasb://"; + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Utilities/UserChangeOperationStatusResponse.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Utilities/UserChangeOperationStatusResponse.cs new file mode 100644 index 000000000000..d04483e20acf --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Models/Utilities/UserChangeOperationStatusResponse.cs @@ -0,0 +1,39 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Runtime.Serialization; +using Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Simulators.Types; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.HDInsight.Utilities +{ + [DataContract(Namespace = "http://schemas.microsoft.com/hdinsight/2013/05/management")] + public class UserChangeOperationStatusResponse + { + [DataMember(EmitDefaultValue = true, IsRequired = false, Order = 5)] + public ErrorDetails Error { get; set; } + + [DataMember(EmitDefaultValue = true, IsRequired = true, Order = 3)] + public UserChangeOperationType OperationType { get; set; } + + [DataMember(EmitDefaultValue = true, IsRequired = true, Order = 4)] + public DateTime RequestIssueDate { get; set; } + + [DataMember(EmitDefaultValue = true, IsRequired = true, Order = 1)] + public UserChangeOperationState State { get; set; } + + [DataMember(EmitDefaultValue = true, IsRequired = true, Order = 2)] + public UserType UserType { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Properties/AssemblyInfo.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..b6b9cc35f70b --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/Properties/AssemblyInfo.cs @@ -0,0 +1,47 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft Azure Powershell")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("8d4efcd0-0ce9-4a27-8322-dd087b326a87")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] +[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] +[assembly: CLSCompliant(false)] diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/packages.config b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/packages.config new file mode 100644 index 000000000000..26c6b2de0c82 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight.Test/packages.config @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AddAzureHDInsightConfigValuesCmdlet.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AddAzureHDInsightConfigValuesCmdlet.cs new file mode 100644 index 000000000000..1fb4d0adb1ef --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AddAzureHDInsightConfigValuesCmdlet.cs @@ -0,0 +1,209 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Diagnostics.CodeAnalysis; +using System.Management.Automation; +using System.Reflection; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; +using Microsoft.WindowsAzure.Management.HDInsight.Logging; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets +{ + /// + /// Sets the Default Storage Container for the HDInsight cluster configuration. + /// + [Cmdlet(VerbsCommon.Add, AzureHdInsightPowerShellConstants.AzureHDInsightConfigValues)] + [OutputType(typeof(AzureHDInsightConfig))] + public class AddAzureHDInsightConfigValuesCmdlet : AzureHDInsightCmdlet, IAddAzureHDInsightConfigValuesBase + { + private readonly IAddAzureHDInsightConfigValuesCommand command; + + /// + /// Initializes a new instance of the AddAzureHDInsightConfigValuesCmdlet class. + /// + public AddAzureHDInsightConfigValuesCmdlet() + { + this.command = ServiceLocator.Instance.Locate().CreateAddConfig(); + } + + /// + /// Gets or sets the Azure HDInsight Configuration for the Azure HDInsight cluster being constructed. + /// + [Parameter(Position = 0, Mandatory = true, + HelpMessage = "The HDInsight cluster configuration to use when creating the new cluster (created by New-AzureHDInsightConfig).", + ValueFromPipeline = true, ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetDefaultStorageAccount)] + public AzureHDInsightConfig Config + { + get { return this.command.Config; } + set + { + if (value.IsNull()) + { + throw new ArgumentNullException("value", "The value for the configuration can not be null."); + } + + this.command.Config.ClusterSizeInNodes = value.ClusterSizeInNodes; + this.command.Config.DefaultStorageAccount = value.DefaultStorageAccount; + this.command.Config.AdditionalStorageAccounts.AddRange(value.AdditionalStorageAccounts); + this.command.Config.ConfigActions.AddRange(value.ConfigActions); + this.command.Config.HiveMetastore = value.HiveMetastore ?? this.command.Config.HiveMetastore; + this.command.Config.OozieMetastore = value.OozieMetastore ?? this.command.Config.OozieMetastore; + this.command.Config.CoreConfiguration.AddRange(value.CoreConfiguration); + this.command.Config.YarnConfiguration.AddRange(value.YarnConfiguration); + this.command.Config.HdfsConfiguration.AddRange(value.HdfsConfiguration); + this.command.Config.MapReduceConfiguration.ConfigurationCollection.AddRange(value.MapReduceConfiguration.ConfigurationCollection); + this.command.Config.MapReduceConfiguration.CapacitySchedulerConfigurationCollection.AddRange( + value.MapReduceConfiguration.CapacitySchedulerConfigurationCollection); + this.command.Config.HiveConfiguration.ConfigurationCollection.AddRange(value.HiveConfiguration.ConfigurationCollection); + this.command.Config.OozieConfiguration.ConfigurationCollection.AddRange(value.OozieConfiguration.ConfigurationCollection); + this.command.Config.HeadNodeVMSize = value.HeadNodeVMSize; + this.command.Config.ClusterType = value.ClusterType; + this.command.Config.VirtualNetworkId = value.VirtualNetworkId; + this.command.Config.SubnetName = value.SubnetName; + this.command.Config.StormConfiguration.AddRange(value.StormConfiguration); + this.command.Config.HBaseConfiguration.ConfigurationCollection.AddRange(value.HBaseConfiguration.ConfigurationCollection); + } + } + + /// + /// Gets or sets a collection of configuration properties to customize the Core Hadoop service. + /// + [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Ease of use in Powershell")] + [Parameter(Mandatory = false, HelpMessage = "a collection of configuration properties to customize the Core Hadoop service.")] + public Hashtable Core + { + get { return this.command.Core; } + set { this.command.Core = value; } + } + + /// + /// Gets or sets a collection of configuration properties to customize the Yarn Hadoop service. + /// + [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Ease of use in Powershell")] + [Parameter(Mandatory = false, HelpMessage = "a collection of configuration properties to customize the Yarn Hadoop service.")] + public Hashtable Yarn + { + get { return this.command.Yarn; } + set { this.command.Yarn = value; } + } + + /// + /// Gets or sets a collection of configuration properties to customize the Hdfs Hadoop service. + /// + [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Ease of use in Powershell")] + [Parameter(Mandatory = false, HelpMessage = "a collection of configuration properties to customize Hdfs Core Hadoop service.")] + public Hashtable Hdfs + { + get { return this.command.Hdfs; } + set { this.command.Hdfs = value; } + } + + /// + /// Gets or sets a collection of configuration properties to customize the Hive Hadoop service. + /// + [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Ease of use in Powershell")] + [Parameter(Mandatory = false, HelpMessage = "a collection of configuration properties to customize the Hive Hadoop service.")] + public AzureHDInsightHiveConfiguration Hive + { + get { return this.command.Hive; } + set { this.command.Hive = value; } + } + + /// + /// Gets or sets a collection of configuration properties to customize the MapReduce Hadoop service. + /// + [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Ease of use in Powershell")] + [Parameter(Mandatory = false, HelpMessage = "a collection of configuration properties to customize the MapReduce Hadoop service.")] + public AzureHDInsightMapReduceConfiguration MapReduce + { + get { return this.command.MapReduce; } + set { this.command.MapReduce = value; } + } + + /// + /// Gets or sets a collection of configuration properties to customize the Oozie Hadoop service. + /// + [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Ease of use in Powershell")] + [Parameter(Mandatory = false, HelpMessage = "a collection of configuration properties to customize the Oozie Hadoop service.")] + public AzureHDInsightOozieConfiguration Oozie + { + get { return this.command.Oozie; } + set { this.command.Oozie = value; } + } + + /// + /// Gets or sets a collection of configuration properties to customize the Storm service. + /// + [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Ease of use in Powershell")] + [Parameter(Mandatory = false, HelpMessage = "a collection of configuration properties to customize the Storm service.")] + public Hashtable Storm + { + get { return this.command.Storm; } + set { this.command.Storm = value; } + } + + /// + /// Gets or sets a collection of configuration properties to customize the HBase service. + /// + [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Ease of use in Powershell")] + [Parameter(Mandatory = false, HelpMessage = "a collection of configuration properties to customize the HBase service.")] + public AzureHDInsightHBaseConfiguration HBase + { + get { return this.command.HBase; } + set { this.command.HBase = value; } + } + + /// + protected override void EndProcessing() + { + try + { + this.command.EndProcessing().Wait(); + foreach (AzureHDInsightConfig output in this.command.Output) + { + this.WriteObject(output); + } + } + catch (Exception ex) + { + Type type = ex.GetType(); + this.Logger.Log(Severity.Error, Verbosity.Normal, this.FormatException(ex)); + this.WriteDebugLog(); + if (type == typeof(AggregateException) || type == typeof(TargetInvocationException) || type == typeof(TaskCanceledException)) + { + ex.Rethrow(); + } + else + { + throw; + } + } + this.WriteDebugLog(); + } + + /// + protected override void StopProcessing() + { + this.command.Cancel(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AddAzureHDInsightMetastoreCmdlet.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AddAzureHDInsightMetastoreCmdlet.cs new file mode 100644 index 000000000000..ad1cdb079ca0 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AddAzureHDInsightMetastoreCmdlet.cs @@ -0,0 +1,162 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Reflection; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; +using Microsoft.WindowsAzure.Management.HDInsight.Logging; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets +{ + /// + /// Adds an AzureHDInsight metastore to the AzureHDInsight configuration. + /// + [Cmdlet(VerbsCommon.Add, AzureHdInsightPowerShellConstants.AzureHDInsightMetastore)] + [OutputType(typeof(AzureHDInsightConfig))] + public class AddAzureHDInsightMetastoreCmdlet : AzureHDInsightCmdlet, IAddAzureHDInsightMetastoreBase + { + private readonly IAddAzureHDInsightMetastoreCommand command; + + /// + /// Initializes a new instance of the AddAzureHDInsightMetastoreCmdlet class. + /// + public AddAzureHDInsightMetastoreCmdlet() + { + this.command = ServiceLocator.Instance.Locate().CreateAddMetastore(); + } + + /// + /// Gets or sets the Azure HDInsight Configuration for the Azure HDInsight cluster being constructed. + /// + [Parameter(Position = 0, Mandatory = true, + HelpMessage = "The HDInsight cluster configuration to use when creating the new cluster (created by New-AzureHDInsightConfig).", + ValueFromPipeline = true, ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetAddMetastore)] + public AzureHDInsightConfig Config + { + get { return this.command.Config; } + set + { + if (value.IsNull()) + { + throw new ArgumentNullException("value", "The value for the configuration can not be null."); + } + this.command.Config.ClusterSizeInNodes = value.ClusterSizeInNodes; + this.command.Config.DefaultStorageAccount = value.DefaultStorageAccount; + this.command.Config.AdditionalStorageAccounts.AddRange(value.AdditionalStorageAccounts); + this.command.Config.ConfigActions.AddRange(value.ConfigActions); + if (value.HiveMetastore.IsNotNull()) + { + this.command.Config.HiveMetastore = value.HiveMetastore; + } + if (value.OozieMetastore.IsNotNull()) + { + this.command.Config.OozieMetastore = value.OozieMetastore; + } + } + } + + /// + /// Gets or sets the user credentials to use for the Azure SQL Server database. + /// + [Parameter(Position = 3, Mandatory = true, HelpMessage = "The user credentials to use for the Azure SQL Server database.", + ValueFromPipeline = false, ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetAddMetastore)] + public PSCredential Credential + { + get { return this.command.Credential; } + set { this.command.Credential = value; } + } + + /// + /// Gets or sets the Azure SQL Server database to use for this metastore. + /// + [Parameter(Position = 2, Mandatory = true, HelpMessage = "The database on the Azure SQL Server instance to use for this metastore.", + ValueFromPipeline = false, ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetAddMetastore)] + public string DatabaseName + { + get { return this.command.DatabaseName; } + set { this.command.DatabaseName = value; } + } + + /// + /// Gets or sets the type of AzureHDInsight metastore represented by this object. + /// + [Parameter(Position = 5, Mandatory = true, HelpMessage = "The type of AzureHDInsight metastore represented by this metastore.", + ValueFromPipeline = false, ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetAddMetastore)] + public AzureHDInsightMetastoreType MetastoreType + { + get { return this.command.MetastoreType; } + set { this.command.MetastoreType = value; } + } + + /// + /// Gets or sets the Azure SQL Server to use for this metastore. + /// + [Parameter(Position = 1, Mandatory = true, + HelpMessage = "The Azure SQL Server instance to use for this metastore.", + ValueFromPipeline = false, + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetAddMetastore)] + public string SqlAzureServerName + { + get { return this.command.SqlAzureServerName; } + set { this.command.SqlAzureServerName = value; } + } + + /// + protected override void EndProcessing() + { + try + { + this.command.EndProcessing().Wait(); + foreach (AzureHDInsightConfig output in this.command.Output) + { + this.WriteObject(output); + } + } + catch (Exception ex) + { + Type type = ex.GetType(); + this.Logger.Log(Severity.Error, Verbosity.Normal, this.FormatException(ex)); + this.WriteDebugLog(); + if (type == typeof(AggregateException) || type == typeof(TargetInvocationException) || type == typeof(TaskCanceledException)) + { + ex.Rethrow(); + } + else + { + throw; + } + } + this.WriteDebugLog(); + } + + /// + protected override void ProcessRecord() + { + base.ProcessRecord(); + } + + /// + protected override void StopProcessing() + { + this.command.Cancel(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AddAzureHDInsightScriptActionCmdlet.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AddAzureHDInsightScriptActionCmdlet.cs new file mode 100644 index 000000000000..3c87f29c5b11 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AddAzureHDInsightScriptActionCmdlet.cs @@ -0,0 +1,170 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets +{ + using Commands.BaseCommandInterfaces; + using Commands.CommandInterfaces; + using DataObjects; + using GetAzureHDInsightClusters; + using GetAzureHDInsightClusters.Extensions; + using HDInsight.Logging; + using Microsoft.WindowsAzure.Management.HDInsight.ClusterProvisioning.Data; + using ServiceLocation; + using System; + using System.Collections.Generic; + using System.Management.Automation; + using System.Reflection; + using System.Threading.Tasks; + + /// + /// Adds an AzureHDInsight script action to the AzureHDInsight configuration. + /// + [Cmdlet(VerbsCommon.Add, AzureHdInsightPowerShellConstants.AzureHDInsightScriptAction)] + [OutputType(typeof(AzureHDInsightConfig))] + public class AddAzureHDInsightScriptActionCmdlet : AzureHDInsightCmdlet, IAddAzureHDInsightScriptActionBase + { + private readonly IAddAzureHDInsightScriptActionCommand command; + + /// + /// Initializes a new instance of the AddAzureHDInsightMetastoreCmdlet class. + /// + public AddAzureHDInsightScriptActionCmdlet() + { + this.command = ServiceLocator.Instance.Locate().CreateAddScriptAction(); + } + + /// + /// Gets or sets the Azure HDInsight Configuration for the Azure HDInsight cluster being constructed. + /// + [Parameter(Position = 0, Mandatory = true, + HelpMessage = "The HDInsight cluster configuration to use when creating the new cluster (created by New-AzureHDInsightConfig).", + ValueFromPipeline = true, ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetAddScriptAction)] + public AzureHDInsightConfig Config + { + get { return this.command.Config; } + set + { + if (value.IsNull()) + { + throw new ArgumentNullException("value", "The value for the configuration can not be null."); + } + + this.command.Config.ClusterSizeInNodes = value.ClusterSizeInNodes; + this.command.Config.DefaultStorageAccount = value.DefaultStorageAccount; + this.command.Config.AdditionalStorageAccounts.AddRange(value.AdditionalStorageAccounts); + this.command.Config.ConfigActions.AddRange(value.ConfigActions); + this.command.Config.HiveMetastore = value.HiveMetastore ?? this.command.Config.HiveMetastore; + this.command.Config.OozieMetastore = value.OozieMetastore ?? this.command.Config.OozieMetastore; + this.command.Config.CoreConfiguration.AddRange(value.CoreConfiguration); + this.command.Config.YarnConfiguration.AddRange(value.YarnConfiguration); + this.command.Config.HdfsConfiguration.AddRange(value.HdfsConfiguration); + this.command.Config.MapReduceConfiguration.ConfigurationCollection.AddRange(value.MapReduceConfiguration.ConfigurationCollection); + this.command.Config.MapReduceConfiguration.CapacitySchedulerConfigurationCollection.AddRange( + value.MapReduceConfiguration.CapacitySchedulerConfigurationCollection); + this.command.Config.HiveConfiguration.ConfigurationCollection.AddRange(value.HiveConfiguration.ConfigurationCollection); + this.command.Config.OozieConfiguration.ConfigurationCollection.AddRange(value.OozieConfiguration.ConfigurationCollection); + this.command.Config.HeadNodeVMSize = value.HeadNodeVMSize; + this.command.Config.ClusterType = value.ClusterType; + this.command.Config.VirtualNetworkId = value.VirtualNetworkId; + this.command.Config.SubnetName = value.SubnetName; + this.command.Config.StormConfiguration.AddRange(value.StormConfiguration); + this.command.Config.HBaseConfiguration.ConfigurationCollection.AddRange(value.HBaseConfiguration.ConfigurationCollection); + } + } + + /// + /// Gets or sets the name of the script action. + /// + [Parameter(Position = 1, Mandatory = true, HelpMessage = "The name of the script action.", + ValueFromPipeline = false, ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetAddScriptAction)] + public string Name + { + get { return this.command.Name; } + set { this.command.Name = value; } + } + + /// + /// Gets or sets the affected cluster roles for this script action. + /// + [Parameter(Position = 2, Mandatory = true, HelpMessage = "The affected cluster roles for this script action.", + ValueFromPipeline = false, ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetAddScriptAction)] + public ClusterNodeType[] ClusterRoleCollection + { + get { return this.command.ClusterRoleCollection; } + set { this.command.ClusterRoleCollection = value; } + } + + /// + /// Gets or sets the uri of the script action. + /// + [Parameter(Position = 3, Mandatory = true, HelpMessage = "The uri of the script action.", + ValueFromPipeline = false, ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetAddScriptAction)] + public Uri Uri + { + get { return this.command.Uri; } + set { this.command.Uri = value; } + } + + /// + /// Gets or sets the name of the script action. + /// + [Parameter(Position = 4, Mandatory = false, HelpMessage = "The parameters of the script action.", + ValueFromPipeline = false, ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetAddScriptAction)] + public string Parameters + { + get { return this.command.Parameters; } + set { this.command.Parameters = value; } + } + + /// + protected override void EndProcessing() + { + try + { + this.command.EndProcessing().Wait(); + foreach (AzureHDInsightConfig output in this.command.Output) + { + this.WriteObject(output); + } + } + catch (Exception ex) + { + Type type = ex.GetType(); + this.Logger.Log(Severity.Error, Verbosity.Normal, this.FormatException(ex)); + this.WriteDebugLog(); + if (type == typeof(AggregateException) || type == typeof(TargetInvocationException) || type == typeof(TaskCanceledException)) + { + ex.Rethrow(); + } + else + { + throw; + } + } + this.WriteDebugLog(); + } + + /// + protected override void ProcessRecord() + { + base.ProcessRecord(); + } + + /// + protected override void StopProcessing() + { + this.command.Cancel(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AddAzureHDInsightStorageCmdlet.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AddAzureHDInsightStorageCmdlet.cs new file mode 100644 index 000000000000..b499d0d499c3 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AddAzureHDInsightStorageCmdlet.cs @@ -0,0 +1,132 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Reflection; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; +using Microsoft.WindowsAzure.Management.HDInsight.Logging; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets +{ + /// + /// Adds an AzureHDInsight Storage Account to the current configuration. + /// + [Cmdlet(VerbsCommon.Add, AzureHdInsightPowerShellConstants.AzureHDInsightStorage)] + [OutputType(typeof(AzureHDInsightConfig))] + public class AddAzureHDInsightStorageCmdlet : AzureHDInsightCmdlet, IAddAzureHDInsightStorageBase + { + private readonly IAddAzureHDInsightStorageCommand command; + + /// + /// Initializes a new instance of the AddAzureHDInsightStorageCmdlet class. + /// + public AddAzureHDInsightStorageCmdlet() + { + this.command = ServiceLocator.Instance.Locate().CreateAddStorage(); + } + + /// + /// Gets or sets the Azure HDInsight Configuration for the Azure HDInsight cluster being constructed. + /// + [Parameter(Position = 0, Mandatory = true, + HelpMessage = "The HDInsight cluster configuration to use when creating the new cluster (created by New-AzureHDInsightConfig).", + ValueFromPipeline = true, ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetAddStorageAccount)] + public AzureHDInsightConfig Config + { + get { return this.command.Config; } + set + { + if (value.IsNull()) + { + throw new ArgumentNullException("value", "The value for the configuration can not be null."); + } + this.command.Config.ClusterSizeInNodes = value.ClusterSizeInNodes; + this.command.Config.DefaultStorageAccount = value.DefaultStorageAccount; + this.command.Config.HiveMetastore = value.HiveMetastore ?? this.command.Config.HiveMetastore; + this.command.Config.OozieMetastore = value.OozieMetastore ?? this.command.Config.OozieMetastore; + this.command.Config.AdditionalStorageAccounts.AddRange(value.AdditionalStorageAccounts); + this.command.Config.ConfigActions.AddRange(value.ConfigActions); + } + } + + /// + /// Gets or sets the Storage Account key for the storage account to be added to the cluster. + /// + [Parameter(Position = 2, Mandatory = true, HelpMessage = "The storage account key for the storage account to be added to the new cluster.", + ValueFromPipeline = false, ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetAddStorageAccount)] + public string StorageAccountKey + { + get { return this.command.StorageAccountKey; } + set { this.command.StorageAccountKey = value; } + } + + /// + /// Gets or sets the Storage Account Name for the storage account to be added to the cluster. + /// + [Parameter(Position = 1, Mandatory = true, HelpMessage = "The storage account name for the storage account to be added to the new cluster.", + ValueFromPipeline = false, ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetAddStorageAccount)] + public string StorageAccountName + { + get { return this.command.StorageAccountName; } + set { this.command.StorageAccountName = value; } + } + + /// + protected override void EndProcessing() + { + try + { + this.command.EndProcessing().Wait(); + foreach (AzureHDInsightConfig output in this.command.Output) + { + this.WriteObject(output); + } + } + catch (Exception ex) + { + Type type = ex.GetType(); + this.Logger.Log(Severity.Error, Verbosity.Normal, this.FormatException(ex)); + this.WriteDebugLog(); + if (type == typeof(AggregateException) || type == typeof(TargetInvocationException) || type == typeof(TaskCanceledException)) + { + ex.Rethrow(); + } + else + { + throw; + } + } + this.WriteDebugLog(); + } + + /// + protected override void ProcessRecord() + { + base.ProcessRecord(); + } + + /// + protected override void StopProcessing() + { + this.command.Cancel(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AzureHDInsightCmdlet.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AzureHDInsightCmdlet.cs new file mode 100644 index 000000000000..f44e44c940b8 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AzureHDInsightCmdlet.cs @@ -0,0 +1,158 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Security.Cryptography.X509Certificates; +using System.Text; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.BaseInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Logging; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; +using Microsoft.WindowsAzure.Management.HDInsight.Logging; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets +{ + /// + /// The base class for HDInsight Cmdlets. + /// + public abstract class AzureHDInsightCmdlet : AzurePSCmdlet + { + internal static AzureSubscription testSubscription; + + private ILogWriter logger; + + /// + /// Gets or sets a value indicating whether logging should be enabled. + /// + public ILogWriter Logger + { + get + { + if (this.logger == null) + { + if (this.MyInvocation.BoundParameters.ContainsKey("Debug")) + { + this.logger = ServiceLocator.Instance.Locate().Create(); + } + else + { + this.logger = new NullLogWriter(); + } + } + + return this.logger; + } + + set { this.logger = value; } + } + + /// + /// Formats an exception to be placed in the debug output. + /// + /// + /// The exception. + /// + /// + /// A string that represents the message to display for the exception. + /// + protected string FormatException(Exception ex) + { + var builder = new StringBuilder(); + if (ex.IsNotNull()) + { + builder.AppendLine(ex.Message); + builder.AppendLine(ex.StackTrace); + var aggex = ex as AggregateException; + if (aggex.IsNotNull()) + { + foreach (Exception innerException in aggex.InnerExceptions) + { + builder.AppendLine(this.FormatException(innerException)); + } + } + else if (ex.InnerException.IsNotNull()) + { + builder.AppendLine(this.FormatException(ex.InnerException)); + } + } + return builder.ToString(); + } + + /// + protected abstract override void StopProcessing(); + + /// + /// Writes any collected log messages to the debug output. + /// + protected void WriteDebugLog() + { + var bufferingLogWriter = this.Logger as IBufferingLogWriter; + if (bufferingLogWriter.IsNotNull()) + { + foreach (string line in bufferingLogWriter.DequeueBuffer()) + { + this.WriteDebug(line); + } + } + } + + protected AzureSubscription GetCurrentSubscription(string Subscription, X509Certificate2 certificate) + { + if (Subscription.IsNotNullOrEmpty()) + { + this.WriteWarning("The -Subscription parameter is deprecated, Please use Select-AzureSubscription -Current to select a subscription to use."); + + ProfileClient client = new ProfileClient(); + + var subscriptionResolver = + ServiceLocator.Instance.Locate().Create(client.Profile); + var resolvedSubscription = subscriptionResolver.ResolveSubscription(Subscription); + if (certificate.IsNotNull() && resolvedSubscription.Account != certificate.Thumbprint) + { + ProfileClient.DataStore.AddCertificate(certificate); + } + + if (resolvedSubscription.IsNull()) + { + throw new ArgumentException( + string.Format( + CultureInfo.InvariantCulture, + "Failed to retrieve Certificate for the subscription '{0}'." + + "Please use Select-AzureSubscription -Current to select a subscription.", + Subscription)); + } + + return resolvedSubscription; + } + else + { +#if DEBUG + // we need this for the tests to mock out the current subscription. + if (this.HasCurrentSubscription) + { + return this.CurrentContext.Subscription; + } + + return testSubscription; +#else + return this.CurrentContext.Subscription; +#endif + } + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AzureHdInsightPowerShellHardCodes.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AzureHdInsightPowerShellHardCodes.cs new file mode 100644 index 000000000000..25046ce8f8e1 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/AzureHdInsightPowerShellHardCodes.cs @@ -0,0 +1,107 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets +{ + internal class AzureHdInsightPowerShellConstants + { + public const string AliasArguments = "Args"; + public const string AliasCert = "Cert"; + public const string AliasCloudServiceName = "CloudServiceName"; + public const string AliasClassName = "Class"; + public const string AliasClusterName = "ClusterName"; + public const string AliasCredentials = "Cred"; + public const string AliasDnsName = "DnsName"; + public const string AliasEndpoint = "Endpoint"; + public const string AliasInput = "Input"; + public const string AliasInputFormat = "InputFormat"; + public const string AliasInputReader = "InputReader"; + public const string AliasJarFile = "Jar"; + public const string AliasJobName = "Name"; + public const string AliasLoc = "Loc"; + public const string AliasNodes = "Nodes"; + public const string AliasOutput = "Output"; + public const string AliasOutputFormat = "OutputFormat"; + public const string AliasParameters = "Params"; + public const string AliasPartitioner = "Partitioner"; + public const string AliasQuery = "QueryText"; + public const string AliasQueryFile = "QueryFile"; + public const string AliasSize = "Size"; + public const string AliasStorageAccount = "StorageAccount"; + public const string AliasStorageContainer = "StorageContainer"; + public const string AliasStorageKey = "StorageKey"; + public const string AliasSub = "Sub"; + public const string AliasSubscription = "Subscription"; + public const string AliasTaskLogsDirectory = "LogsDir"; + public const string AliasVersion = "Ver"; + public const string AliasClusterType = "ClusterType"; + public const string AliasVirtualNetworkId = "VirtualNetworkId"; + public const string AliasSubnetName = "SubnetName"; + public const string AzureHDInsightCluster = "AzureHDInsightCluster"; + public const string AzureHDInsightClusterConfig = "AzureHDInsightClusterConfig"; + public const string AzureHDInsightConfigValues = "AzureHDInsightConfigValues"; + public const string AzureHDInsightDefaultStorage = "AzureHDInsightDefaultStorage"; + public const string AzureHDInsightHiveJobDefinition = "AzureHDInsightHiveJobDefinition"; + public const string AzureHDInsightHttpServicesAccess = "AzureHDInsightHttpServicesAccess"; + public const string AzureHDInsightJobOutput = "AzureHDInsightJobOutput"; + public const string AzureHDInsightJobs = "AzureHDInsightJob"; + public const string AzureHDInsightMapReduceJobDefinition = "AzureHDInsightMapReduceJobDefinition"; + public const string AzureHDInsightMetastore = "AzureHDInsightMetastore"; + public const string AzureHDInsightPigJobDefinition = "AzureHDInsightPigJobDefinition"; + public const string AzureHDInsightScriptAction = "AzureHDInsightScriptAction"; + public const string AzureHDInsightProperties = "AzureHDInsightProperties"; + public const string AzureHDInsightSqoopJobDefinition = "AzureHDInsightSqoopJobDefinition"; + public const string AzureHDInsightStorage = "AzureHDInsightStorage"; + public const string AzureHDInsightStreamingMapReduceJobDefinition = "AzureHDInsightStreamingMapReduceJobDefinition"; + public const string Exec = "Exec"; + public const string FromDateTime = "From"; + public const string Hive = "AzureHDInsightHiveJob"; + public const string HiveCmdExecute = "execute"; + public const string HiveCmdExecuteAlias = "e"; + + public const string JobDefinition = "jobDetails"; + public const string JobId = "Id"; + public const string Jobs = "Jobs"; + public const string MapReduce = "MapReduce"; + + public const string ParameterSetAddMetastore = "Add Metastore"; + public const string ParameterSetAddStorageAccount = "Add Storage Account"; + public const string ParameterSetAddScriptAction = "Add Script Action"; + + public const string ParameterSetClusterByConfigWithSpecificSubscriptionCredentials = + "Cluster By Config (with Specific Subscription Credential)"; + + public const string ParameterSetClusterByNameWithSpecificSubscriptionCredentials = "Cluster By Name (with Specific Subscription Credential)"; + public const string ParameterSetConfigClusterSizeInNodesOnly = "Config ClusterSizeInNodes Only"; + public const string ParameterSetDefaultStorageAccount = "Set Default Storage Account"; + public const string ParameterSetJobHistoryByName = "Get jobDetails History of a HDInsight Cluster"; + public const string ParameterSetJobHistoryByNameAndJobId = "Get jobDetails History for a specific jobDetails in a HDInsight Cluster"; + + public const string ParameterSetResizingWithName = "Set cluster size in nodes with name."; + public const string ParameterSetResizingWithPiping = "Set cluster size in nodes with cluster from pipeline."; + + public const string ParameterSetJobHistoryByNameWithSpecificSubscriptionCredentials = + "Get jobDetails History of a HDInsight Cluster (with Specific Subscription Credential)"; + + public const string ParameterSetStartJobByName = "Start jobDetails on an HDInsight Cluster"; + + public const string ParameterSetStartJobByNameWithSpecificSubscriptionCredentials = + "Start jobDetails on an HDInsight Cluster (with Specific Subscription Credential)"; + + public const string ParameterSetWaitJobById = "Wait Job with JobId on an HDInsight Cluster"; + public const string ParameterSetWaitJobByJob = "Wait Job with Job on an HDInsight Cluster"; + public const string Show = "Show"; + public const string Skip = "Skip"; + public const string ToDateTime = "To"; + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/GetAzureHDInsightClusterCmdlet.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/GetAzureHDInsightClusterCmdlet.cs new file mode 100644 index 000000000000..6c9f66922297 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/GetAzureHDInsightClusterCmdlet.cs @@ -0,0 +1,145 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Reflection; +using System.Security.Cryptography.X509Certificates; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; +using Microsoft.WindowsAzure.Management.HDInsight.Logging; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets +{ + /// + /// Cmdlet that lists all the clusters registered in the HDInsight service. + /// + [Cmdlet(VerbsCommon.Get, AzureHdInsightPowerShellConstants.AzureHDInsightCluster)] + [OutputType(typeof(AzureHDInsightCluster))] + public class GetAzureHDInsightClusterCmdlet : AzureHDInsightCmdlet, IAzureHDInsightClusterCommandBase + { + private readonly IGetAzureHDInsightClusterCommand command; + + /// + /// Initializes a new instance of the GetAzureHDInsightClusterCmdlet class. + /// + public GetAzureHDInsightClusterCmdlet() + { + this.command = ServiceLocator.Instance.Locate().CreateGet(); + } + + /// + [Parameter(Position = 2, Mandatory = false, HelpMessage = "The management certificate used to manage the Azure subscription.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasCert)] + public X509Certificate2 Certificate + { + get { return this.command.Certificate; } + set { this.command.Certificate = value; } + } + + /// + [Parameter(Position = 4, Mandatory = false, HelpMessage = "The HostedService to use when managing the HDInsight cluster.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasCloudServiceName)] + public string HostedService + { + get { return this.command.HostedService; } + set { this.command.HostedService = value; } + } + + /// + [Parameter(Position = 3, Mandatory = false, HelpMessage = "The Endpoint to use when connecting to Azure.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + public Uri Endpoint + { + get { return this.command.Endpoint; } + set { this.command.Endpoint = value; } + } + + /// + [Parameter(Position = 0, Mandatory = false, HelpMessage = "The name of the HDInsight cluster to locate.", ValueFromPipeline = true, + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasClusterName, AzureHdInsightPowerShellConstants.AliasDnsName)] + public string Name + { + get { return this.command.Name; } + set { this.command.Name = value; } + } + + /// + [Parameter(Position = 1, Mandatory = false, HelpMessage = "The subscription id for the Azure subscription.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasSub)] + public string Subscription + { + get { return this.command.Subscription; } + set { this.command.Subscription = value; } + } + + /// + /// Finishes the execution of the cmdlet by listing the clusters. + /// + protected override void EndProcessing() + { + try + { + this.command.CurrentSubscription = this.GetCurrentSubscription(this.Subscription, this.Certificate); + this.command.Logger = this.Logger; + Task task = this.command.EndProcessing(); + CancellationToken token = this.command.CancellationToken; + while (!task.IsCompleted) + { + this.WriteDebugLog(); + task.Wait(1000, token); + } + if (task.IsFaulted) + { + throw new AggregateException(task.Exception); + } + foreach (AzureHDInsightCluster output in this.command.Output) + { + this.WriteObject(output); + } + this.WriteDebugLog(); + } + catch (Exception ex) + { + Type type = ex.GetType(); + this.Logger.Log(Severity.Error, Verbosity.Normal, this.FormatException(ex)); + this.WriteDebugLog(); + if (type == typeof(AggregateException) || type == typeof(TargetInvocationException) || type == typeof(TaskCanceledException)) + { + ex.Rethrow(); + } + else + { + throw; + } + } + this.WriteDebugLog(); + } + + /// + protected override void StopProcessing() + { + this.command.Cancel(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/GetAzureHDInsightJobCmdlet.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/GetAzureHDInsightJobCmdlet.cs new file mode 100644 index 000000000000..b0f267b5f855 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/GetAzureHDInsightJobCmdlet.cs @@ -0,0 +1,165 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Reflection; +using System.Security.Cryptography.X509Certificates; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; +using Microsoft.WindowsAzure.Management.HDInsight.Logging; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets +{ + /// + /// Cmdlet that lists all the Jobs running on a HDInsight cluster. + /// + [Cmdlet(VerbsCommon.Get, AzureHdInsightPowerShellConstants.AzureHDInsightJobs, + DefaultParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetJobHistoryByName)] + [OutputType(typeof(AzureHDInsightJob))] + public class GetAzureHDInsightJobCmdlet : AzureHDInsightCmdlet, IGetAzureHDInsightJobBase + { + private readonly IGetAzureHDInsightJobCommand command; + + /// + /// Initializes a new instance of the GetAzureHDInsightJobCmdlet class. + /// + public GetAzureHDInsightJobCmdlet() + { + this.command = ServiceLocator.Instance.Locate().CreateGetJobs(); + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The management certificate used to manage the Azure subscription.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetJobHistoryByNameWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasCert)] + public X509Certificate2 Certificate + { + get { return this.command.Certificate; } + set { this.command.Certificate = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The HostedService to use when managing the HDInsight cluster.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetJobHistoryByNameWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasCloudServiceName)] + public string HostedService + { + get { return this.command.HostedService; } + set { this.command.HostedService = value; } + } + + /// + [Parameter(Position = 0, Mandatory = true, HelpMessage = "The endpoint to connect to the Azure HDInsight cluster.", ValueFromPipeline = true, + ValueFromPipelineByPropertyName = true)] + [Alias(AzureHdInsightPowerShellConstants.AliasClusterName)] + public string Cluster + { + get { return this.command.Cluster; } + set { this.command.Cluster = value; } + } + + /// + [Parameter(Mandatory = false, Position = 1, HelpMessage = "The credentials to connect to Azure HDInsight cluster.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetJobHistoryByName)] + [Alias(AzureHdInsightPowerShellConstants.AliasCredentials)] + public PSCredential Credential + { + get { return this.command.Credential; } + set { this.command.Credential = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The Endpoint to use when connecting to Azure.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetJobHistoryByNameWithSpecificSubscriptionCredentials)] + public Uri Endpoint + { + get { return this.command.Endpoint; } + set { this.command.Endpoint = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The JobID of the jobDetails to get details for.", ValueFromPipeline = true, + ValueFromPipelineByPropertyName = true)] + [Alias(AzureHdInsightPowerShellConstants.JobId)] + public string JobId + { + get { return this.command.JobId; } + set { this.command.JobId = value; } + } + + /// + [Parameter(Position = 1, Mandatory = false, HelpMessage = "The subscription id for the Azure subscription.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetJobHistoryByNameWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasSub)] + public string Subscription + { + get { return this.command.Subscription; } + set { this.command.Subscription = value; } + } + + /// + protected override void EndProcessing() + { + try + { + this.command.CurrentSubscription = this.GetCurrentSubscription(this.Subscription, this.Certificate); + this.command.Logger = this.Logger; + Task task = this.command.EndProcessing(); + CancellationToken token = this.command.CancellationToken; + while (!task.IsCompleted) + { + this.WriteDebugLog(); + task.Wait(1000, token); + } + if (task.IsFaulted) + { + throw new AggregateException(task.Exception); + } + foreach (AzureHDInsightJob output in this.command.Output) + { + this.WriteObject(output); + } + this.WriteDebugLog(); + } + catch (Exception ex) + { + Type type = ex.GetType(); + this.Logger.Log(Severity.Error, Verbosity.Normal, this.FormatException(ex)); + this.WriteDebugLog(); + if (type == typeof(AggregateException) || type == typeof(TargetInvocationException) || type == typeof(TaskCanceledException)) + { + ex.Rethrow(); + } + else + { + throw; + } + } + this.WriteDebugLog(); + } + + /// + protected override void StopProcessing() + { + this.command.Cancel(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/GetAzureHDInsightJobOutputCmdlet.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/GetAzureHDInsightJobOutputCmdlet.cs new file mode 100644 index 000000000000..2fc8ef42facc --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/GetAzureHDInsightJobOutputCmdlet.cs @@ -0,0 +1,208 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Management.Automation; +using System.Reflection; +using System.Security.Cryptography.X509Certificates; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; +using Microsoft.WindowsAzure.Management.HDInsight.Logging; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets +{ + /// + /// Cmdlet that lists all the Jobs running on a HDInsight cluster. + /// + [Cmdlet(VerbsCommon.Get, AzureHdInsightPowerShellConstants.AzureHDInsightJobOutput)] + [OutputType(typeof(Stream))] + public class GetAzureHDInsightJobOutputCmdlet : AzureHDInsightCmdlet, IGetAzureHDInsightJobOutputBase + { + private readonly IGetAzureHDInsightJobOutputCommand command; + + /// + /// Initializes a new instance of the GetAzureHDInsightJobOutputCmdlet class. + /// + public GetAzureHDInsightJobOutputCmdlet() + { + this.command = ServiceLocator.Instance.Locate().CreateGetJobOutput(); + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The management certificate used to manage the Azure subscription.")] + [Alias(AzureHdInsightPowerShellConstants.AliasCert)] + public X509Certificate2 Certificate + { + get { return this.command.Certificate; } + set { this.command.Certificate = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The HostedService to use when managing the HDInsight cluster.")] + [Alias(AzureHdInsightPowerShellConstants.AliasCloudServiceName)] + public string HostedService + { + get { return this.command.HostedService; } + set { this.command.HostedService = value; } + } + + /// + [Parameter(Position = 0, Mandatory = true, HelpMessage = "The endpoint to connect to the Azure HDInsight cluster.", ValueFromPipeline = true, + ValueFromPipelineByPropertyName = true)] + [Alias(AzureHdInsightPowerShellConstants.AliasClusterName)] + public string Cluster + { + get { return this.command.Cluster; } + set { this.command.Cluster = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "Specify this switch to download the task logs.")] + public SwitchParameter DownloadTaskLogs { get; set; } + + /// + [Parameter(Mandatory = false, HelpMessage = "The Endpoint to use when connecting to Azure.")] + public Uri Endpoint + { + get { return this.command.Endpoint; } + set { this.command.Endpoint = value; } + } + + /// + [Parameter(Mandatory = true, HelpMessage = "The JobID of the jobDetails to get details for.", ValueFromPipeline = true, + ValueFromPipelineByPropertyName = true)] + [Alias(AzureHdInsightPowerShellConstants.JobId)] + public string JobId + { + get { return this.command.JobId; } + set { this.command.JobId = value; } + } + + /// + public JobOutputType OutputType { get; set; } + + /// + [Parameter(Mandatory = false, HelpMessage = "Specify this switch to get the Standard error logs.")] + public SwitchParameter StandardError { get; set; } + + /// + [Parameter(Mandatory = false, HelpMessage = "Specify this switch to get the Standard output logs.")] + public SwitchParameter StandardOutput { get; set; } + + /// + [Parameter(Position = 1, Mandatory = false, HelpMessage = "The subscription id for the Azure subscription.")] + [Alias(AzureHdInsightPowerShellConstants.AliasSub)] + public string Subscription + { + get { return this.command.Subscription; } + set { this.command.Subscription = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The target directory to download the task logs to.")] + [Alias(AzureHdInsightPowerShellConstants.AliasTaskLogsDirectory)] + public string TaskLogsDirectory + { + get { return this.command.TaskLogsDirectory; } + set { this.command.TaskLogsDirectory = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "Specify this switch to get the Task log summary.")] + public SwitchParameter TaskSummary { get; set; } + + /// + protected override void EndProcessing() + { + this.command.Logger = this.Logger; + this.command.CurrentSubscription = this.GetCurrentSubscription(this.Subscription, this.Certificate); + this.AssertTaskLogsDirectorySpecified(this.TaskLogsDirectory); + + if (this.StandardError.IsPresent) + { + this.command.OutputType = JobOutputType.StandardError; + } + else if (this.TaskSummary.IsPresent) + { + this.command.OutputType = JobOutputType.TaskSummary; + } + else if (this.DownloadTaskLogs.IsPresent) + { + this.command.OutputType = JobOutputType.TaskLogs; + } + else + { + this.command.OutputType = JobOutputType.StandardOutput; + } + + try + { + this.command.Logger = this.Logger; + Task task = this.command.EndProcessing(); + CancellationToken token = this.command.CancellationToken; + while (!task.IsCompleted) + { + this.WriteDebugLog(); + task.Wait(1000, token); + } + if (task.IsFaulted) + { + throw new AggregateException(task.Exception); + } + foreach (Stream output in this.command.Output) + { + string contents = new StreamReader(output).ReadToEnd(); + this.WriteObject(contents); + } + this.WriteDebugLog(); + } + catch (Exception ex) + { + Type type = ex.GetType(); + this.Logger.Log(Severity.Error, Verbosity.Normal, this.FormatException(ex)); + this.WriteDebugLog(); + if (type == typeof(AggregateException) || type == typeof(TargetInvocationException) || type == typeof(TaskCanceledException)) + { + ex.Rethrow(); + } + else + { + throw; + } + } + this.WriteDebugLog(); + } + + /// + protected override void StopProcessing() + { + this.command.Cancel(); + } + + private void AssertTaskLogsDirectorySpecified(string taskLogsDirectory) + { + if (this.DownloadTaskLogs.IsPresent && taskLogsDirectory.IsNullOrEmpty()) + { + throw new PSArgumentException("Please specify the directory to download logs to.", "taskLogsDirectory"); + } + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/GetAzureHDInsightPropertiesCmdlet.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/GetAzureHDInsightPropertiesCmdlet.cs new file mode 100644 index 000000000000..c3e6aa9d9d67 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/GetAzureHDInsightPropertiesCmdlet.cs @@ -0,0 +1,171 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using System.Reflection; +using System.Security.Cryptography.X509Certificates; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.BaseInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; +using Microsoft.WindowsAzure.Management.HDInsight.Logging; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets +{ + /// + /// Cmdlet that lists all the properties of a subscription registered with the HDInsight service. + /// + [Cmdlet(VerbsCommon.Get, AzureHdInsightPowerShellConstants.AzureHDInsightProperties)] + [OutputType(typeof(AzureHDInsightCapabilities))] + public class GetAzureHDInsightPropertiesCmdlet : AzureHDInsightCmdlet, IAzureHDInsightCommonCommandBase + { + private readonly IGetAzureHDInsightPropertiesCommand command; + + /// + /// Initializes a new instance of the GetAzureHDInsightPropertiesCmdlet class. + /// + public GetAzureHDInsightPropertiesCmdlet() + { + this.command = ServiceLocator.Instance.Locate().CreateGetProperties(); + } + + /// + [Parameter(Position = 2, Mandatory = false, HelpMessage = "The management certificate used to manage the Azure subscription.")] + [Alias(AzureHdInsightPowerShellConstants.AliasCert)] + public X509Certificate2 Certificate + { + get { return this.command.Certificate; } + set { this.command.Certificate = value; } + } + + /// + [Parameter(Position = 4, Mandatory = false, HelpMessage = "The HostedService to use when managing the HDInsight cluster.")] + [Alias(AzureHdInsightPowerShellConstants.AliasCloudServiceName)] + public string HostedService + { + get { return this.command.HostedService; } + set { this.command.HostedService = value; } + } + + /// + [Parameter(Position = 3, Mandatory = false, HelpMessage = "The Endpoint to use when connecting to Azure.")] + public Uri Endpoint + { + get { return this.command.Endpoint; } + set { this.command.Endpoint = value; } + } + + /// + /// Gets or sets a flag to only show Azure regions available to the subscription. + /// + [Parameter(Mandatory = false, HelpMessage = "Flag to only show Azure regions available to the subscription.")] + public SwitchParameter Locations { get; set; } + + /// + [Parameter(Position = 1, Mandatory = false, HelpMessage = "The subscription id for the Azure subscription.")] + [Alias(AzureHdInsightPowerShellConstants.AliasSub)] + public string Subscription + { + get { return this.command.Subscription; } + set { this.command.Subscription = value; } + } + + /// + /// Gets or sets a flag to only show HDInsight versions available to the subscription. + /// + [Parameter(Mandatory = false, HelpMessage = "Flag to only show HDInsight versions available to the subscription")] + public SwitchParameter Versions { get; set; } + + /// + /// Finishes the execution of the cmdlet by listing the clusters. + /// + protected override void EndProcessing() + { + this.command.Logger = this.Logger; + try + { + this.command.Logger = this.Logger; + this.command.CurrentSubscription = this.GetCurrentSubscription(this.Subscription, this.Certificate); + Task task = this.command.EndProcessing(); + CancellationToken token = this.command.CancellationToken; + while (!task.IsCompleted) + { + this.WriteDebugLog(); + task.Wait(1000, token); + } + if (task.IsFaulted) + { + throw new AggregateException(task.Exception); + } + if (this.MyInvocation.BoundParameters.ContainsKey("Debug")) + { + this.WriteObject(this.command.Output.SelectMany(output => output.Capabilities)); + } + else + { + if (this.Versions.IsPresent) + { + foreach (AzureHDInsightCapabilities output in this.command.Output) + { + this.WriteObject(output.Versions); + } + } + else if (this.Locations.IsPresent) + { + foreach (AzureHDInsightCapabilities output in this.command.Output) + { + this.WriteObject(output.Locations); + } + } + else + { + foreach (AzureHDInsightCapabilities output in this.command.Output) + { + this.WriteObject(output); + } + } + } + this.WriteDebugLog(); + } + catch (Exception ex) + { + Type type = ex.GetType(); + this.Logger.Log(Severity.Error, Verbosity.Normal, this.FormatException(ex)); + + this.WriteDebugLog(); + if (type == typeof(AggregateException) || type == typeof(TargetInvocationException) || type == typeof(TaskCanceledException)) + { + ex.Rethrow(); + } + else + { + throw; + } + } + this.WriteDebugLog(); + } + + /// + protected override void StopProcessing() + { + this.command.Cancel(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/GrantAzureHDInsightHttpServicesAccessCmdlet.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/GrantAzureHDInsightHttpServicesAccessCmdlet.cs new file mode 100644 index 000000000000..cae81612f1ed --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/GrantAzureHDInsightHttpServicesAccessCmdlet.cs @@ -0,0 +1,170 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Reflection; +using System.Security.Cryptography.X509Certificates; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; +using Microsoft.WindowsAzure.Management.HDInsight.Logging; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets +{ + /// + /// Cmdlet that grants Http Services access to an HDInsight cluster. + /// + [Cmdlet(VerbsSecurity.Grant, AzureHdInsightPowerShellConstants.AzureHDInsightHttpServicesAccess)] + [OutputType(typeof(AzureHDInsightCluster))] + public class GrantAzureHDInsightHttpServicesAccessCmdlet : AzureHDInsightCmdlet, IManageAzureHDInsightHttpAccessBase + { + private readonly IManageAzureHDInsightHttpAccessCommand command; + private bool enableHttpServices = true; + + /// + /// Initializes a new instance of the GrantAzureHDInsightHttpServicesAccessCmdlet class. + /// + public GrantAzureHDInsightHttpServicesAccessCmdlet() + { + this.command = ServiceLocator.Instance.Locate().CreateManageHttpAccess(); + } + + /// + [Parameter(Position = 3, Mandatory = false, HelpMessage = "The management certificate used to manage the Azure subscription.")] + [Alias(AzureHdInsightPowerShellConstants.AliasCert)] + public X509Certificate2 Certificate + { + get { return this.command.Certificate; } + set { this.command.Certificate = value; } + } + + /// + [Parameter(Position = 5, Mandatory = false, HelpMessage = "The HostedService to use when managing the HDInsight cluster.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasCloudServiceName)] + public string HostedService + { + get { return this.command.HostedService; } + set { this.command.HostedService = value; } + } + + /// + [Parameter(Position = 3, Mandatory = true, HelpMessage = "The credentials to use when connecting to Azure.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + public PSCredential Credential + { + get { return this.command.Credential; } + set { this.command.Credential = value; } + } + + /// + public bool Enable + { + get { return this.enableHttpServices; } + set { this.enableHttpServices = value; } + } + + /// + [Parameter(Position = 4, Mandatory = false, HelpMessage = "The Endpoint to use when connecting to Azure.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + public Uri Endpoint + { + get { return this.command.Endpoint; } + set { this.command.Endpoint = value; } + } + + /// + [Parameter(Position = 1, Mandatory = true, HelpMessage = "The Location of the HDInsight cluster to grant http access to.")] + public string Location + { + get { return this.command.Location; } + set { this.command.Location = value; } + } + + /// + [Parameter(Position = 0, Mandatory = true, HelpMessage = "The name of the HDInsight cluster to grant http access to.", + ValueFromPipeline = true)] + [Alias(AzureHdInsightPowerShellConstants.AliasClusterName, AzureHdInsightPowerShellConstants.AliasDnsName)] + public string Name + { + get { return this.command.Name; } + set { this.command.Name = value; } + } + + /// + [Parameter(Position = 2, Mandatory = false, HelpMessage = "The subscription id for the Azure subscription.")] + [Alias(AzureHdInsightPowerShellConstants.AliasSub)] + public string Subscription + { + get { return this.command.Subscription; } + set { this.command.Subscription = value; } + } + + /// + /// Finishes the execution of the cmdlet by listing the clusters. + /// + protected override void EndProcessing() + { + this.command.Enable = true; + try + { + this.command.Logger = this.Logger; + this.command.CurrentSubscription = this.GetCurrentSubscription(this.Subscription, this.Certificate); + Task task = this.command.EndProcessing(); + CancellationToken token = this.command.CancellationToken; + while (!task.IsCompleted) + { + this.WriteDebugLog(); + task.Wait(1000, token); + } + if (task.IsFaulted) + { + throw new AggregateException(task.Exception); + } + foreach (AzureHDInsightCluster output in this.command.Output) + { + this.WriteObject(output); + } + this.WriteDebugLog(); + } + catch (Exception ex) + { + Type type = ex.GetType(); + this.Logger.Log(Severity.Error, Verbosity.Normal, this.FormatException(ex)); + this.WriteDebugLog(); + if (type == typeof(AggregateException) || type == typeof(TargetInvocationException) || type == typeof(TaskCanceledException)) + { + ex.Rethrow(); + } + else + { + throw; + } + } + this.WriteDebugLog(); + } + + /// + protected override void StopProcessing() + { + this.command.Cancel(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/InvokeHiveCmdlet.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/InvokeHiveCmdlet.cs new file mode 100644 index 000000000000..2fad60725cd7 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/InvokeHiveCmdlet.cs @@ -0,0 +1,211 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.Specialized; +using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.Linq; +using System.Management.Automation; +using System.Reflection; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; +using Microsoft.WindowsAzure.Management.HDInsight.Logging; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets +{ + /// + /// Cmdlet that lists submits a jobDetails to a running HDInsight cluster. + /// + [Cmdlet(VerbsLifecycle.Invoke, AzureHdInsightPowerShellConstants.Hive)] + [OutputType(typeof(string))] + public class InvokeHiveCmdlet : AzureHDInsightCmdlet, INewAzureHDInsightHiveJobDefinitionBase + { + private readonly IInvokeHiveCommand command; + private readonly INewAzureHDInsightHiveJobDefinitionCommand hiveJobDefinitionCommand; + private readonly Queue queue = new Queue(); + + /// + /// Initializes a new instance of the InvokeHiveCmdlet class. + /// + public InvokeHiveCmdlet() + { + this.command = ServiceLocator.Instance.Locate().CreateInvokeHive(); + this.hiveJobDefinitionCommand = ServiceLocator.Instance.Locate().CreateNewHiveDefinition(); + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The hive arguments for the jobDetails.")] + [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Need collections for input parameters")] + public string[] Arguments + { + get { return this.hiveJobDefinitionCommand.Arguments; } + set { this.hiveJobDefinitionCommand.Arguments = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The parameters for the jobDetails.")] + [Alias(AzureHdInsightPowerShellConstants.AliasParameters)] + [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Need collections for input parameters")] + public Hashtable Defines + { + get { return this.hiveJobDefinitionCommand.Defines; } + set { this.hiveJobDefinitionCommand.Defines = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The query file to run in the jobDetails.")] + [Alias(AzureHdInsightPowerShellConstants.AliasQueryFile)] + public string File + { + get { return this.hiveJobDefinitionCommand.File; } + set { this.hiveJobDefinitionCommand.File = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The files for the jobDetails.")] + [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Need collections for input parameters")] + public string[] Files + { + get { return this.hiveJobDefinitionCommand.Files; } + set { this.hiveJobDefinitionCommand.Files = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The name of the jobDetails.")] + [Alias(AzureHdInsightPowerShellConstants.AliasJobName)] + public string JobName + { + get { return this.hiveJobDefinitionCommand.JobName; } + set { this.hiveJobDefinitionCommand.JobName = value; } + } + + /// + [Parameter(Mandatory = false, Position = 1, HelpMessage = "The query to run in the jobDetails.")] + [Alias(AzureHdInsightPowerShellConstants.AliasQuery)] + public string Query + { + get { return this.hiveJobDefinitionCommand.Query; } + set { this.hiveJobDefinitionCommand.Query = value; } + } + + /// + /// + /// Invoke-Hive always submits the job as a file. + /// + [Parameter(Mandatory = false, HelpMessage = "Run the query as a file.")] + public SwitchParameter RunAsFileJob + { + get { return true; } + set { this.hiveJobDefinitionCommand.RunAsFileJob = true; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The output location to use for the jobDetails.")] + public string StatusFolder + { + get { return this.hiveJobDefinitionCommand.StatusFolder; } + set { this.hiveJobDefinitionCommand.StatusFolder = value; } + } + + /// + protected override void EndProcessing() + { + AzureHDInsightClusterConnection currentConnection = this.AssertValidConnection(); + this.hiveJobDefinitionCommand.EndProcessing().Wait(); + AzureHDInsightHiveJobDefinition hiveJob = this.hiveJobDefinitionCommand.Output.Last(); + this.command.JobDefinition = hiveJob; + this.command.Output.CollectionChanged += this.OutputItemAdded; + this.command.Connection = currentConnection; + try + { + this.command.Logger = this.Logger; + this.command.CurrentSubscription = this.GetCurrentSubscription(string.Empty, null); + Task task = this.command.EndProcessing(); + CancellationToken token = this.command.CancellationToken; + while (!task.IsCompleted) + { + this.WriteDebugLog(); + task.Wait(1000, token); + if (this.command.JobDetailsStatus.IsNotNull()) + { + string msg = string.Format(CultureInfo.CurrentCulture, "Waiting for jobDetails : {0}", this.command.JobId); + var record = new ProgressRecord( + 0, msg, this.command.JobDetailsStatus.StatusCode.ToString() + " : " + this.command.JobDetailsStatus.PercentComplete); + this.WriteProgress(record); + } + while (this.queue.Count > 0) + { + lock (this.queue) + { + this.WriteObject(this.queue.Dequeue(), true); + } + } + } + if (task.IsFaulted) + { + throw new AggregateException(task.Exception); + } + this.WriteDebugLog(); + } + catch (Exception ex) + { + Type type = ex.GetType(); + this.Logger.Log(Severity.Error, Verbosity.Normal, this.FormatException(ex)); + this.WriteDebugLog(); + if (type == typeof(AggregateException) || type == typeof(TargetInvocationException) || type == typeof(TaskCanceledException)) + { + ex.Rethrow(); + } + else + { + throw; + } + } + this.WriteDebugLog(); + while (this.queue.Count > 0) + { + lock (this.queue) + { + this.WriteObject(this.queue.Dequeue(), true); + } + } + } + + /// + protected override void StopProcessing() + { + this.command.Cancel(); + } + + private void OutputItemAdded(object sender, NotifyCollectionChangedEventArgs e) + { + if (e.Action == NotifyCollectionChangedAction.Add) + { + lock (this.queue) + { + this.queue.Enqueue(e.NewItems); + } + } + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/NewAzureHDInsightClusterCmdlet.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/NewAzureHDInsightClusterCmdlet.cs new file mode 100644 index 000000000000..c07abeaed4be --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/NewAzureHDInsightClusterCmdlet.cs @@ -0,0 +1,364 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Management.Automation; +using System.Reflection; +using System.Security.Cryptography.X509Certificates; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Management.HDInsight.ClusterProvisioning.Data; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; +using Microsoft.WindowsAzure.Management.HDInsight.Logging; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets +{ + /// + /// Cmdlet that creates a new HDInsight cluster. + /// + [Cmdlet(VerbsCommon.New, AzureHdInsightPowerShellConstants.AzureHDInsightCluster, + DefaultParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByConfigWithSpecificSubscriptionCredentials)] + [OutputType(typeof(AzureHDInsightCluster))] + public class NewAzureHDInsightClusterCmdlet : AzureHDInsightCmdlet + { + private readonly INewAzureHDInsightClusterCommand command; + + /// + /// Initializes a new instance of the NewAzureHDInsightClusterCmdlet class. + /// + public NewAzureHDInsightClusterCmdlet() + { + this.command = ServiceLocator.Instance.Locate().CreateCreate(); + } + + /// + [Parameter(Position = 2, Mandatory = false, HelpMessage = "The management certificate used to manage the Azure subscription.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + [Parameter(Position = 3, Mandatory = false, HelpMessage = "The management certificate used to manage the Azure subscription.", + ValueFromPipeline = false, + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByConfigWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasCert)] + public X509Certificate2 Certificate + { + get { return this.command.Certificate; } + set { this.command.Certificate = value; } + } + + /// + [Parameter(Position = 8, Mandatory = false, HelpMessage = "The Endpoint to use when connecting to Azure.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByConfigWithSpecificSubscriptionCredentials)] + [Parameter(Position = 11, Mandatory = false, HelpMessage = "The Endpoint to use when connecting to Azure.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasCloudServiceName)] + public string HostedService + { + get { return this.command.HostedService; } + set { this.command.HostedService = value; } + } + + /// + [Parameter(Position = 9, Mandatory = true, HelpMessage = "The number of data nodes to use for the HDInsight cluster.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasNodes, AzureHdInsightPowerShellConstants.AliasSize)] + public int ClusterSizeInNodes + { + get { return this.command.ClusterSizeInNodes; } + set { this.command.ClusterSizeInNodes = value; } + } + + /// + [Parameter(Position = 1, Mandatory = true, + HelpMessage = "The HDInsight cluster configuration to use when creating the new cluster (created by New-AzureHDInsightConfig).", + ValueFromPipeline = true, + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByConfigWithSpecificSubscriptionCredentials)] + public AzureHDInsightConfig Config + { + get + { + var result = new AzureHDInsightConfig(); + result.ClusterSizeInNodes = this.command.ClusterSizeInNodes; + result.HeadNodeVMSize = this.command.HeadNodeSize; + result.ClusterType = this.command.ClusterType; + result.VirtualNetworkId = this.command.VirtualNetworkId; + result.SubnetName = this.command.SubnetName; + result.DefaultStorageAccount.StorageAccountName = this.command.DefaultStorageAccountName; + result.DefaultStorageAccount.StorageAccountKey = this.command.DefaultStorageAccountKey; + result.DefaultStorageAccount.StorageContainerName = this.command.DefaultStorageContainerName; + result.AdditionalStorageAccounts.AddRange(this.command.AdditionalStorageAccounts); + result.ConfigActions.AddRange(this.command.ConfigActions); + result.CoreConfiguration.AddRange(this.command.CoreConfiguration); + result.YarnConfiguration.AddRange(this.command.YarnConfiguration); + result.HdfsConfiguration.AddRange(this.command.HdfsConfiguration); + result.OozieConfiguration.ConfigurationCollection.AddRange(this.command.OozieConfiguration.ConfigurationCollection); + result.HiveConfiguration.AdditionalLibraries = this.command.HiveConfiguration.AdditionalLibraries; + result.HiveConfiguration.ConfigurationCollection.AddRange(this.command.HiveConfiguration.ConfigurationCollection); + result.MapReduceConfiguration.ConfigurationCollection.AddRange(this.command.MapReduceConfiguration.ConfigurationCollection); + result.MapReduceConfiguration.CapacitySchedulerConfigurationCollection.AddRange( + this.command.MapReduceConfiguration.CapacitySchedulerConfigurationCollection); + result.StormConfiguration.AddRange(this.command.StormConfiguration); + result.HBaseConfiguration.AdditionalLibraries = this.command.HBaseConfiguration.AdditionalLibraries; + result.HBaseConfiguration.ConfigurationCollection.AddRange(this.command.HBaseConfiguration.ConfigurationCollection); + return result; + } + + set + { + if (value.IsNull()) + { + throw new ArgumentNullException("value", "The value for the configuration can not be null."); + } + this.command.ClusterSizeInNodes = value.ClusterSizeInNodes; + this.command.ClusterType = value.ClusterType; + this.command.VirtualNetworkId = value.VirtualNetworkId; + this.command.SubnetName = value.SubnetName; + this.command.HeadNodeSize = value.HeadNodeVMSize; + this.command.DefaultStorageAccountName = value.DefaultStorageAccount.StorageAccountName; + this.command.DefaultStorageAccountKey = value.DefaultStorageAccount.StorageAccountKey; + this.command.DefaultStorageContainerName = value.DefaultStorageAccount.StorageContainerName; + this.command.AdditionalStorageAccounts.AddRange(value.AdditionalStorageAccounts); + this.command.ConfigActions.AddRange(value.ConfigActions); + this.command.CoreConfiguration.AddRange(value.CoreConfiguration); + this.command.YarnConfiguration.AddRange(value.YarnConfiguration); + this.command.HdfsConfiguration.AddRange(value.HdfsConfiguration); + this.command.MapReduceConfiguration.ConfigurationCollection.AddRange(value.MapReduceConfiguration.ConfigurationCollection); + this.command.MapReduceConfiguration.CapacitySchedulerConfigurationCollection.AddRange( + value.MapReduceConfiguration.CapacitySchedulerConfigurationCollection); + this.command.HiveConfiguration.AdditionalLibraries = value.HiveConfiguration.AdditionalLibraries; + this.command.HiveConfiguration.ConfigurationCollection.AddRange(value.HiveConfiguration.ConfigurationCollection); + this.command.OozieConfiguration.ConfigurationCollection.AddRange(value.OozieConfiguration.ConfigurationCollection); + this.command.OozieConfiguration.AdditionalSharedLibraries = value.OozieConfiguration.AdditionalSharedLibraries; + this.command.OozieConfiguration.AdditionalActionExecutorLibraries = value.OozieConfiguration.AdditionalActionExecutorLibraries; + this.command.HiveMetastore = value.HiveMetastore; + this.command.OozieMetastore = value.OozieMetastore; + this.command.StormConfiguration.AddRange(value.StormConfiguration); + this.command.HBaseConfiguration.AdditionalLibraries = value.HBaseConfiguration.AdditionalLibraries; + this.command.HBaseConfiguration.ConfigurationCollection.AddRange(value.HBaseConfiguration.ConfigurationCollection); + } + } + + /// + [Parameter(Position = 7, Mandatory = true, HelpMessage = "The user credentials for the HDInsight cluster.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + [Parameter(Position = 5, Mandatory = true, HelpMessage = "The user credentials for the HDInsight cluster.", ValueFromPipeline = false, + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByConfigWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasCredentials)] + public PSCredential Credential + { + get { return this.command.Credential; } + set { this.command.Credential = value; } + } + + /// + [Parameter(Position = 5, Mandatory = true, HelpMessage = "The key to use for the default storage account.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasStorageKey)] + public string DefaultStorageAccountKey + { + get { return this.command.DefaultStorageAccountKey; } + set { this.command.DefaultStorageAccountKey = value; } + } + + /// + [Parameter(Position = 4, Mandatory = true, HelpMessage = "The default storage account to use for the new cluster.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasStorageAccount)] + public string DefaultStorageAccountName + { + get { return this.command.DefaultStorageAccountName; } + set { this.command.DefaultStorageAccountName = value; } + } + + /// + [Parameter(Position = 6, Mandatory = true, HelpMessage = "The container in the storage account to use for default HDInsight storage.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasStorageContainer)] + public string DefaultStorageContainerName + { + get { return this.command.DefaultStorageContainerName; } + set { this.command.DefaultStorageContainerName = value; } + } + + /// + [Parameter(Position = 7, Mandatory = false, HelpMessage = "The Endpoint to use when connecting to Azure.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByConfigWithSpecificSubscriptionCredentials)] + [Parameter(Position = 10, Mandatory = false, HelpMessage = "The Endpoint to use when connecting to Azure.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + public Uri EndPoint + { + get { return this.command.Endpoint; } + set { this.command.Endpoint = value; } + } + + /// + [Parameter(Position = 3, Mandatory = true, HelpMessage = "The azure location where the new cluster should be created.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + [Parameter(Position = 4, Mandatory = true, HelpMessage = "The azure location where the new cluster should be created.", + ValueFromPipeline = false, + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByConfigWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasLoc)] + public string Location + { + get { return this.command.Location; } + set { this.command.Location = value; } + } + + /// + [Parameter(Position = 0, Mandatory = true, HelpMessage = "The name of the HDInsight cluster to locate.", ValueFromPipeline = true, + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + [Parameter(Position = 0, Mandatory = true, HelpMessage = "The name of the HDInsight cluster to locate.", ValueFromPipeline = false, + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByConfigWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasClusterName, AzureHdInsightPowerShellConstants.AliasDnsName)] + public string Name + { + get { return this.command.Name; } + set { this.command.Name = value; } + } + + /// + [Parameter(Position = 1, Mandatory = false, HelpMessage = "The subscription id for the Azure subscription.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + [Parameter(Position = 2, Mandatory = false, HelpMessage = "The subscription id for the Azure subscription.", ValueFromPipeline = false, + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByConfigWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasSub)] + public string Subscription + { + get { return this.command.Subscription; } + set { this.command.Subscription = value; } + } + + /// + [Parameter(Position = 12, Mandatory = false, HelpMessage = "The version of the HDInsight cluster to create.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + [Parameter(Position = 9, Mandatory = false, HelpMessage = "The version of the HDInsight cluster to create.", ValueFromPipeline = false, + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByConfigWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasVersion)] + public string Version + { + get { return this.command.Version; } + set { this.command.Version = value; } + } + + /// + [Parameter(Position = 13, Mandatory = false, HelpMessage = "The size of the headnode VM.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + public NodeVMSize HeadNodeVMSize + { + get { return this.command.HeadNodeSize; } + set { this.command.HeadNodeSize = value; } + } + + /// + [Parameter(Position = 14, Mandatory = false, HelpMessage = "The type HDInsight cluster.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + public ClusterType ClusterType + { + get { return this.command.ClusterType; } + set { this.command.ClusterType = value; } + } + + /// + [Parameter(Position = 15, Mandatory = false, HelpMessage = "GUID of virtual network to deploy HDInsight cluster.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + public string VirtualNetworkId + { + get { return this.command.VirtualNetworkId; } + set { this.command.VirtualNetworkId = value; } + } + + /// + [Parameter(Position = 16, Mandatory = false, HelpMessage = "Name of subnet to deploy HDInsight cluster.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + public string SubnetName + { + get { return this.command.SubnetName; } + set { this.command.SubnetName = value; } + } + + /// + protected override void BeginProcessing() + { + base.BeginProcessing(); + } + + /// + protected override void EndProcessing() + { + DateTime start = DateTime.Now; + string msg = string.Format(CultureInfo.CurrentCulture, "Create Cluster Started : {0}", start.ToString(CultureInfo.CurrentCulture)); + this.Logger.Log(Severity.Informational, Verbosity.Detailed, msg); + try + { + this.command.Logger = this.Logger; + this.command.CurrentSubscription = this.GetCurrentSubscription(this.Subscription, this.Certificate); + Task task = this.command.EndProcessing(); + CancellationToken token = this.command.CancellationToken; + while (!task.IsCompleted) + { + this.WriteDebugLog(); + msg = string.Format(CultureInfo.CurrentCulture, "Creating Cluster: {0}", this.Name); + this.WriteProgress(new ProgressRecord(0, msg, this.command.State.ToString())); + task.Wait(1000, token); + } + if (task.IsFaulted) + { + throw new AggregateException(task.Exception); + } + foreach (AzureHDInsightCluster output in this.command.Output) + { + this.WriteObject(output); + } + this.WriteDebugLog(); + } + catch (Exception ex) + { + Type type = ex.GetType(); + this.Logger.Log(Severity.Error, Verbosity.Normal, this.FormatException(ex)); + this.WriteDebugLog(); + if (type == typeof(AggregateException) || type == typeof(TargetInvocationException) || type == typeof(TaskCanceledException)) + { + ex.Rethrow(); + } + else + { + throw; + } + } + msg = string.Format(CultureInfo.CurrentCulture, "Create Cluster Stopped : {0}", DateTime.Now.ToString(CultureInfo.CurrentCulture)); + this.Logger.Log(Severity.Informational, Verbosity.Detailed, msg); + msg = string.Format( + CultureInfo.CurrentCulture, + "Create Cluster Executed for {0} minutes", + (DateTime.Now - start).TotalMinutes.ToString(CultureInfo.CurrentCulture)); + this.Logger.Log(Severity.Informational, Verbosity.Detailed, msg); + this.WriteDebugLog(); + } + + /// + protected override void ProcessRecord() + { + base.ProcessRecord(); + } + + /// + protected override void StopProcessing() + { + this.command.Cancel(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/NewAzureHDInsightClusterConfigCmdlet.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/NewAzureHDInsightClusterConfigCmdlet.cs new file mode 100644 index 000000000000..d4a8f64885fb --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/NewAzureHDInsightClusterConfigCmdlet.cs @@ -0,0 +1,107 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Management.HDInsight.ClusterProvisioning.Data; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets +{ + /// + /// Represents the New-AzureHDInsightClusterConfig Power Shell Cmdlet. + /// + [Cmdlet(VerbsCommon.New, AzureHdInsightPowerShellConstants.AzureHDInsightClusterConfig)] + [OutputType(typeof(AzureHDInsightConfig))] + public class NewAzureHDInsightClusterConfigCmdlet : AzureHDInsightCmdlet, INewAzureHDInsightClusterConfigBase + { + private readonly INewAzureHDInsightClusterConfigCommand command; + + /// + /// Initializes a new instance of the NewAzureHDInsightClusterConfigCmdlet class. + /// + public NewAzureHDInsightClusterConfigCmdlet() + { + this.command = ServiceLocator.Instance.Locate().CreateNewConfig(); + } + + /// + [Parameter(Position = 0, Mandatory = true, HelpMessage = "The number of data nodes to use for the HDInsight cluster.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetConfigClusterSizeInNodesOnly)] + [Alias(AzureHdInsightPowerShellConstants.AliasNodes, AzureHdInsightPowerShellConstants.AliasSize)] + public int ClusterSizeInNodes + { + get { return this.command.ClusterSizeInNodes; } + set { this.command.ClusterSizeInNodes = value; } + } + + /// + [Parameter(Position = 1, Mandatory = false, HelpMessage = "The size of the head node VMs.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetConfigClusterSizeInNodesOnly)] + public NodeVMSize HeadNodeVMSize + { + get { return command.HeadNodeVMSize; } + set { command.HeadNodeVMSize = value; } + } + + /// + [Parameter(Position = 2, Mandatory = false, HelpMessage = "The type of cluster.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetConfigClusterSizeInNodesOnly)] + public ClusterType ClusterType + { + get { return command.ClusterType; } + set { command.ClusterType = value; } + } + + /// + [Parameter(Position = 3, Mandatory = false, HelpMessage = "GUID of virtual network to deploy HDInsight cluster.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetConfigClusterSizeInNodesOnly)] + public string VirtualNetworkId + { + get { return command.VirtualNetworkId; } + set { command.VirtualNetworkId = value; } + } + + /// + [Parameter(Position = 4, Mandatory = false, HelpMessage = "Name of subnet to deploy HDInsight cluster.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetConfigClusterSizeInNodesOnly)] + public string SubnetName + { + get { return command.SubnetName; } + set { command.SubnetName = value; } + } + + /// + /// Finishes the execution of the cmdlet by listing the clusters. + /// + protected override void EndProcessing() + { + this.command.EndProcessing().Wait(); + foreach (AzureHDInsightConfig output in this.command.Output) + { + this.WriteObject(output); + } + this.WriteDebugLog(); + } + + /// + protected override void StopProcessing() + { + this.command.Cancel(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/NewAzureHDInsightHiveJobDefinitionCmdlet.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/NewAzureHDInsightHiveJobDefinitionCmdlet.cs new file mode 100644 index 000000000000..cc37dfd51f62 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/NewAzureHDInsightHiveJobDefinitionCmdlet.cs @@ -0,0 +1,138 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections; +using System.Diagnostics.CodeAnalysis; +using System.Management.Automation; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets +{ + /// + /// Represents the New-AzureHDInsightConfig Power Shell Cmdlet. + /// + [Cmdlet(VerbsCommon.New, AzureHdInsightPowerShellConstants.AzureHDInsightHiveJobDefinition)] + [OutputType(typeof(AzureHDInsightHiveJobDefinition))] + public class NewAzureHDInsightHiveJobDefinitionCmdlet : AzureHDInsightCmdlet, INewAzureHDInsightHiveJobDefinitionBase + { + private readonly INewAzureHDInsightHiveJobDefinitionCommand command; + + /// + /// Initializes a new instance of the NewAzureHDInsightHiveJobDefinitionCmdlet class. + /// + public NewAzureHDInsightHiveJobDefinitionCmdlet() + { + this.command = ServiceLocator.Instance.Locate().CreateNewHiveDefinition(); + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The hive arguments for the jobDetails.")] + [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Need collections for input parameters")] + public string[] Arguments + { + get { return this.command.Arguments; } + set { this.command.Arguments = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The parameters for the jobDetails.")] + [Alias(AzureHdInsightPowerShellConstants.AliasParameters)] + [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Need collections for input parameters")] + public Hashtable Defines + { + get { return this.command.Defines; } + set { this.command.Defines = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The query file to run in the jobDetails.")] + [Alias(AzureHdInsightPowerShellConstants.AliasQueryFile)] + public string File + { + get { return this.command.File; } + set { this.command.File = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The files for the jobDetails.")] + [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Need collections for input parameters")] + public string[] Files + { + get { return this.command.Files; } + set { this.command.Files = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The name of the jobDetails.")] + [Alias(AzureHdInsightPowerShellConstants.AliasJobName)] + public string JobName + { + get { return this.command.JobName; } + set { this.command.JobName = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The query to run in the jobDetails.")] + [Alias(AzureHdInsightPowerShellConstants.AliasQuery)] + public string Query + { + get { return this.command.Query; } + set { this.command.Query = value; } + } + + [Parameter(Mandatory = false, HelpMessage = "Run the query as a file.")] + public SwitchParameter RunAsFileJob + { + get { return this.command.RunAsFileJob; } + set { this.command.RunAsFileJob = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The output location to use for the job.")] + public string StatusFolder + { + get { return this.command.StatusFolder; } + set { this.command.StatusFolder = value; } + } + + /// + /// Finishes the execution of the cmdlet by writing out the config object. + /// + protected override void EndProcessing() + { + if (this.File.IsNullOrEmpty() && this.Query.IsNullOrEmpty()) + { + throw new PSArgumentException("Either File or Query should be specified for Hive jobs."); + } + + this.command.EndProcessing().Wait(); + foreach (AzureHDInsightHiveJobDefinition output in this.command.Output) + { + this.WriteObject(output); + } + this.WriteDebugLog(); + } + + /// + protected override void StopProcessing() + { + this.command.Cancel(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/NewAzureHDInsightMapReduceDefinitionCmdlet.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/NewAzureHDInsightMapReduceDefinitionCmdlet.cs new file mode 100644 index 000000000000..1241bbaeb213 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/NewAzureHDInsightMapReduceDefinitionCmdlet.cs @@ -0,0 +1,135 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections; +using System.Diagnostics.CodeAnalysis; +using System.Management.Automation; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets +{ + /// + /// Represents the New-AzureHDInsightConfig Power Shell Cmdlet. + /// + [Cmdlet(VerbsCommon.New, AzureHdInsightPowerShellConstants.AzureHDInsightMapReduceJobDefinition)] + [OutputType(typeof(AzureHDInsightMapReduceJobDefinition))] + public class NewAzureHDInsightMapReduceDefinitionCmdlet : AzureHDInsightCmdlet, INewAzureHDInsightMapReduceJobDefinitionBase + { + private readonly INewAzureHDInsightMapReduceJobDefinitionCommand command; + + /// + /// Initializes a new instance of the NewAzureHDInsightMapReduceDefinitionCmdlet class. + /// + public NewAzureHDInsightMapReduceDefinitionCmdlet() + { + this.command = ServiceLocator.Instance.Locate().CreateNewMapReduceDefinition(); + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The arguments for the jobDetails.")] + [Alias(AzureHdInsightPowerShellConstants.AliasArguments)] + [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Need collections for input parameters")] + public string[] Arguments + { + get { return this.command.Arguments; } + set { this.command.Arguments = value; } + } + + /// + [Parameter(Mandatory = true, HelpMessage = "The class name to use for the jobDetails.")] + [Alias(AzureHdInsightPowerShellConstants.AliasClassName)] + public string ClassName + { + get { return this.command.ClassName; } + set { this.command.ClassName = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The parameters for the jobDetails.")] + [Alias(AzureHdInsightPowerShellConstants.AliasParameters)] + [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Need collections for input parameters")] + public Hashtable Defines + { + get { return this.command.Defines; } + set { this.command.Defines = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The resources for the jobDetails.")] + [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Need collections for input parameters")] + public string[] Files + { + get { return this.command.Files; } + set { this.command.Files = value; } + } + + /// + [Parameter(Mandatory = true, HelpMessage = "The jar file to use for the jobDetails.")] + [Alias(AzureHdInsightPowerShellConstants.AliasJarFile)] + public string JarFile + { + get { return this.command.JarFile; } + set { this.command.JarFile = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The name of the jobDetails.")] + [Alias(AzureHdInsightPowerShellConstants.AliasJobName)] + public string JobName + { + get { return this.command.JobName; } + set { this.command.JobName = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The lib jars for the jobDetails.")] + [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Need collections for input parameters")] + public string[] LibJars + { + get { return this.command.LibJars; } + set { this.command.LibJars = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The output location to use for the jobDetails.")] + public string StatusFolder + { + get { return this.command.StatusFolder; } + set { this.command.StatusFolder = value; } + } + + /// + /// Finishes the execution of the cmdlet by writing out the config object. + /// + protected override void EndProcessing() + { + this.command.EndProcessing().Wait(); + foreach (AzureHDInsightMapReduceJobDefinition output in this.command.Output) + { + this.WriteObject(output); + } + this.WriteDebugLog(); + } + + /// + protected override void StopProcessing() + { + this.command.Cancel(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/NewAzureHDInsightPigJobDefinitionCmdlet.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/NewAzureHDInsightPigJobDefinitionCmdlet.cs new file mode 100644 index 000000000000..f831f16d2562 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/NewAzureHDInsightPigJobDefinitionCmdlet.cs @@ -0,0 +1,112 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Diagnostics.CodeAnalysis; +using System.Management.Automation; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets +{ + /// + /// Represents the New-AzureHDInsightConfig Power Shell Cmdlet. + /// + [Cmdlet(VerbsCommon.New, AzureHdInsightPowerShellConstants.AzureHDInsightPigJobDefinition)] + [OutputType(typeof(AzureHDInsightPigJobDefinition))] + public class NewAzureHDInsightPigDefinitionCmdlet : AzureHDInsightCmdlet, INewAzureHDInsightPigJobDefinitionBase + { + private readonly INewAzureHDInsightPigJobDefinitionCommand command; + + /// + /// Initializes a new instance of the NewAzureHDInsightPigDefinitionCmdlet class. + /// + public NewAzureHDInsightPigDefinitionCmdlet() + { + this.command = ServiceLocator.Instance.Locate().CreateNewPigJobDefinition(); + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The Arguments for the jobDetails.")] + [Alias(AzureHdInsightPowerShellConstants.AliasArguments)] + [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Need collections for input parameters")] + public string[] Arguments + { + get { return this.command.Arguments; } + set { this.command.Arguments = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The query to use for a pig jobDetails.")] + [Alias(AzureHdInsightPowerShellConstants.AliasQueryFile)] + public string File + { + get { return this.command.File; } + set { this.command.File = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The resources for the jobDetails.")] + [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Need collections for input parameters")] + public string[] Files + { + get { return this.command.Files; } + set { this.command.Files = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The query to use for a pig jobDetails.")] + [Alias(AzureHdInsightPowerShellConstants.AliasQuery)] + public string Query + { + get { return this.command.Query; } + set { this.command.Query = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The output location to use for the jobDetails.")] + public string StatusFolder + { + get { return this.command.StatusFolder; } + set { this.command.StatusFolder = value; } + } + + /// + /// Finishes the execution of the cmdlet by writing out the config object. + /// + protected override void EndProcessing() + { + if (this.File.IsNullOrEmpty() && this.Query.IsNullOrEmpty()) + { + throw new PSArgumentException("Either File or Query should be specified for Pig jobs."); + } + + this.command.EndProcessing().Wait(); + foreach (AzureHDInsightPigJobDefinition output in this.command.Output) + { + this.WriteObject(output); + } + this.WriteDebugLog(); + } + + /// + protected override void StopProcessing() + { + this.command.Cancel(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/NewAzureHDInsightSqoopJobDefinitionCmdlet.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/NewAzureHDInsightSqoopJobDefinitionCmdlet.cs new file mode 100644 index 000000000000..83be88812484 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/NewAzureHDInsightSqoopJobDefinitionCmdlet.cs @@ -0,0 +1,101 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Diagnostics.CodeAnalysis; +using System.Management.Automation; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets +{ + /// + /// Represents the New-AzureHDInsightSqoopJobDefinition Power Shell Cmdlet. + /// + [Cmdlet(VerbsCommon.New, AzureHdInsightPowerShellConstants.AzureHDInsightSqoopJobDefinition)] + [OutputType(typeof(AzureHDInsightSqoopJobDefinition))] + public class NewAzureHDInsightSqoopJobDefinitionCmdlet : AzureHDInsightCmdlet, INewAzureHDInsightSqoopJobDefinitionBase + { + private readonly INewAzureHDInsightSqoopJobDefinitionCommand command; + + /// + /// Initializes a new instance of the NewAzureHDInsightSqoopJobDefinitionCmdlet class. + /// + public NewAzureHDInsightSqoopJobDefinitionCmdlet() + { + this.command = ServiceLocator.Instance.Locate().CreateNewSqoopDefinition(); + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The command to run in the sqoop job.")] + public string Command + { + get { return this.command.Command; } + set { this.command.Command = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The query file to run in the sqoop job.")] + [Alias(AzureHdInsightPowerShellConstants.AliasQueryFile)] + public string File + { + get { return this.command.File; } + set { this.command.File = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The files for the sqoop job.")] + [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Need collections for input parameters")] + public string[] Files + { + get { return this.command.Files; } + set { this.command.Files = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The output location to use for the job.")] + public string StatusFolder + { + get { return this.command.StatusFolder; } + set { this.command.StatusFolder = value; } + } + + /// + /// Finishes the execution of the cmdlet by writing out the config object. + /// + protected override void EndProcessing() + { + if (this.File.IsNullOrEmpty() && this.Command.IsNullOrEmpty()) + { + throw new PSArgumentException("Either File or Command should be specified for Sqoop jobs."); + } + + this.command.EndProcessing().Wait(); + foreach (AzureHDInsightSqoopJobDefinition output in this.command.Output) + { + this.WriteObject(output); + } + this.WriteDebugLog(); + } + + /// + protected override void StopProcessing() + { + this.command.Cancel(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/NewAzureHDInsightStreamingJobDefinitionCmdlet.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/NewAzureHDInsightStreamingJobDefinitionCmdlet.cs new file mode 100644 index 000000000000..28908089d58d --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/NewAzureHDInsightStreamingJobDefinitionCmdlet.cs @@ -0,0 +1,159 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections; +using System.Diagnostics.CodeAnalysis; +using System.Management.Automation; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets +{ + /// + /// Represents the New-AzureHDInsightConfig Power Shell Cmdlet. + /// + [Cmdlet(VerbsCommon.New, AzureHdInsightPowerShellConstants.AzureHDInsightStreamingMapReduceJobDefinition)] + [OutputType(typeof(AzureHDInsightStreamingMapReduceJobDefinition))] + public class NewAzureHDInsightStreamingJobDefinitionCmdlet : AzureHDInsightCmdlet, INewAzureHDInsightStreamingJobDefinitionBase + { + private readonly INewAzureHDInsightStreamingJobDefinitionCommand command; + + /// + /// Initializes a new instance of the NewAzureHDInsightStreamingJobDefinitionCmdlet class. + /// + public NewAzureHDInsightStreamingJobDefinitionCmdlet() + { + this.command = ServiceLocator.Instance.Locate().CreateNewStreamingMapReduceDefinition(); + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The parameters for the jobDetails.")] + [Alias(AzureHdInsightPowerShellConstants.AliasArguments)] + [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Need collections for input parameters")] + public string[] Arguments + { + get { return this.command.Arguments; } + set { this.command.Arguments = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The command line environment for the mappers or the reducers.")] + [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Need collections for input parameters")] + public string[] CmdEnv + { + get { return this.command.CmdEnv; } + set { this.command.CmdEnv = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The Combiner to use for the jobDetails.")] + public string Combiner + { + get { return this.command.Combiner; } + set { this.command.Combiner = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The parameters for the jobDetails.")] + [Alias(AzureHdInsightPowerShellConstants.AliasParameters)] + [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Need collections for input parameters")] + public Hashtable Defines + { + get { return this.command.Defines; } + set { this.command.Defines = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The resources for the jobDetails.")] + [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Need collections for input parameters")] + public string[] Files + { + get { return this.command.Files; } + set { this.command.Files = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The input path to use for the jobDetails.")] + [Alias(AzureHdInsightPowerShellConstants.AliasInput)] + public string InputPath + { + get { return this.command.InputPath; } + set { this.command.InputPath = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The name of the jobDetails.")] + [Alias(AzureHdInsightPowerShellConstants.AliasJobName)] + public string JobName + { + get { return this.command.JobName; } + set { this.command.JobName = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The Mapper to use for the jobDetails.")] + public string Mapper + { + get { return this.command.Mapper; } + set { this.command.Mapper = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The output path to use for the jobDetails.")] + [Alias(AzureHdInsightPowerShellConstants.AliasOutput)] + public string OutputPath + { + get { return this.command.OutputPath; } + set { this.command.OutputPath = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The Reducer to use for the jobDetails.")] + public string Reducer + { + get { return this.command.Reducer; } + set { this.command.Reducer = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The output location to use for the jobDetails.")] + public string StatusFolder + { + get { return this.command.StatusFolder; } + set { this.command.StatusFolder = value; } + } + + /// + /// Finishes the execution of the cmdlet by writing out the config object. + /// + protected override void EndProcessing() + { + this.command.EndProcessing().Wait(); + foreach (AzureHDInsightStreamingMapReduceJobDefinition output in this.command.Output) + { + this.WriteObject(output); + } + this.WriteDebugLog(); + } + + /// + protected override void StopProcessing() + { + this.command.Cancel(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/RemoveClusterHDInsightClusterCmdlet.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/RemoveClusterHDInsightClusterCmdlet.cs new file mode 100644 index 000000000000..b6fb8cd0648f --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/RemoveClusterHDInsightClusterCmdlet.cs @@ -0,0 +1,139 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Reflection; +using System.Security.Cryptography.X509Certificates; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; +using Microsoft.WindowsAzure.Management.HDInsight.Logging; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets +{ + /// + /// Cmdlet that deletes a cluster from the HDInsight service. + /// + [Cmdlet(VerbsCommon.Remove, AzureHdInsightPowerShellConstants.AzureHDInsightCluster)] + public class RemoveClusterHDInsightClusterCmdlet : AzureHDInsightCmdlet, IAzureHDInsightClusterCommandBase + { + private readonly IRemoveAzureHDInsightClusterCommand command; + + /// + /// Initializes a new instance of the RemoveClusterHDInsightClusterCmdlet class. + /// + public RemoveClusterHDInsightClusterCmdlet() + { + this.command = ServiceLocator.Instance.Locate().CreateDelete(); + } + + /// + [Parameter(Position = 2, Mandatory = false, HelpMessage = "The management certificate used to manage the Azure subscription.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasCert)] + public X509Certificate2 Certificate + { + get { return this.command.Certificate; } + set { this.command.Certificate = value; } + } + + /// + [Parameter(Position = 5, Mandatory = false, HelpMessage = "The HostedService to use when managing the HDInsight cluster.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasCloudServiceName)] + public string HostedService + { + get { return this.command.HostedService; } + set { this.command.HostedService = value; } + } + + /// + [Parameter(Position = 4, Mandatory = false, HelpMessage = "The Endpoint to use when connecting to Azure.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + public Uri Endpoint + { + get { return this.command.Endpoint; } + set { this.command.Endpoint = value; } + } + + /// + [Parameter(Position = 0, Mandatory = true, HelpMessage = "The name of the cluster to remove.", ValueFromPipeline = true, + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasClusterName, AzureHdInsightPowerShellConstants.AliasDnsName)] + public string Name + { + get { return this.command.Name; } + set { this.command.Name = value; } + } + + /// + [Parameter(Position = 1, Mandatory = false, HelpMessage = "The subscription id for the Azure subscription.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasSub)] + public string Subscription + { + get { return this.command.Subscription; } + set { this.command.Subscription = value; } + } + + /// + /// Finishes the execution of the cmdlet by listing the clusters. + /// + protected override void EndProcessing() + { + try + { + this.command.CurrentSubscription = this.GetCurrentSubscription(this.Subscription, this.Certificate); + this.command.Logger = this.Logger; + Task task = this.command.EndProcessing(); + CancellationToken token = this.command.CancellationToken; + while (!task.IsCompleted) + { + this.WriteDebugLog(); + task.Wait(1000, token); + } + if (task.IsFaulted) + { + throw new AggregateException(task.Exception); + } + this.WriteDebugLog(); + } + catch (Exception ex) + { + Type type = ex.GetType(); + this.Logger.Log(Severity.Error, Verbosity.Normal, this.FormatException(ex)); + this.WriteDebugLog(); + if (type == typeof(AggregateException) || type == typeof(TargetInvocationException) || type == typeof(TaskCanceledException)) + { + ex.Rethrow(); + } + else + { + throw; + } + } + this.WriteDebugLog(); + } + + /// + protected override void StopProcessing() + { + this.command.Cancel(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/RevokeAzureHDInsightHttpServicesAccessCmdlet.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/RevokeAzureHDInsightHttpServicesAccessCmdlet.cs new file mode 100644 index 000000000000..e08e2a3b704a --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/RevokeAzureHDInsightHttpServicesAccessCmdlet.cs @@ -0,0 +1,168 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Reflection; +using System.Security.Cryptography.X509Certificates; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; +using Microsoft.WindowsAzure.Management.HDInsight.Logging; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets +{ + /// + /// Cmdlet that Revokes Http Services access to an HDInsight cluster. + /// + [Cmdlet(VerbsSecurity.Revoke, AzureHdInsightPowerShellConstants.AzureHDInsightHttpServicesAccess)] + [OutputType(typeof(AzureHDInsightCluster))] + public class RevokeAzureHDInsightHttpServicesAccessCmdlet : AzureHDInsightCmdlet, IManageAzureHDInsightHttpAccessBase + { + private readonly IManageAzureHDInsightHttpAccessCommand command; + private bool enableHttpServices = true; + + /// + /// Initializes a new instance of the RevokeAzureHDInsightHttpServicesAccessCmdlet class. + /// + public RevokeAzureHDInsightHttpServicesAccessCmdlet() + { + this.command = ServiceLocator.Instance.Locate().CreateManageHttpAccess(); + } + + /// + [Parameter(Position = 3, Mandatory = false, HelpMessage = "The management certificate used to manage the Azure subscription.")] + [Alias(AzureHdInsightPowerShellConstants.AliasCert)] + public X509Certificate2 Certificate + { + get { return this.command.Certificate; } + set { this.command.Certificate = value; } + } + + /// + [Parameter(Position = 5, Mandatory = false, HelpMessage = "The HostedService to use when managing the HDInsight cluster.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasCloudServiceName)] + public string HostedService + { + get { return this.command.HostedService; } + set { this.command.HostedService = value; } + } + + /// + public PSCredential Credential + { + get { return this.command.Credential; } + set { this.command.Credential = value; } + } + + /// + public bool Enable + { + get { return this.enableHttpServices; } + set { this.enableHttpServices = value; } + } + + /// + [Parameter(Position = 4, Mandatory = false, HelpMessage = "The Endpoint to use when connecting to Azure.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + public Uri Endpoint + { + get { return this.command.Endpoint; } + set { this.command.Endpoint = value; } + } + + /// + [Parameter(Position = 1, Mandatory = true, HelpMessage = "The Location of the HDInsight cluster to Revoke http access to.")] + public string Location + { + get { return this.command.Location; } + set { this.command.Location = value; } + } + + /// + [Parameter(Position = 0, Mandatory = true, HelpMessage = "The name of the HDInsight cluster to Revoke http access to.", + ValueFromPipeline = true)] + [Alias(AzureHdInsightPowerShellConstants.AliasClusterName, AzureHdInsightPowerShellConstants.AliasDnsName)] + public string Name + { + get { return this.command.Name; } + set { this.command.Name = value; } + } + + /// + [Parameter(Position = 2, Mandatory = false, HelpMessage = "The subscription id for the Azure subscription.")] + [Alias(AzureHdInsightPowerShellConstants.AliasSub)] + public string Subscription + { + get { return this.command.Subscription; } + set { this.command.Subscription = value; } + } + + /// + /// Finishes the execution of the cmdlet by listing the clusters. + /// + protected override void EndProcessing() + { + this.command.Enable = false; + try + { + this.command.Logger = this.Logger; + this.command.CurrentSubscription = this.GetCurrentSubscription(this.Subscription, this.Certificate); + Task task = this.command.EndProcessing(); + CancellationToken token = this.command.CancellationToken; + while (!task.IsCompleted) + { + this.WriteDebugLog(); + task.Wait(1000, token); + } + if (task.IsFaulted) + { + throw new AggregateException(task.Exception); + } + foreach (AzureHDInsightCluster output in this.command.Output) + { + this.WriteObject(output); + } + this.WriteDebugLog(); + } + catch (Exception ex) + { + Type type = ex.GetType(); + this.Logger.Log(Severity.Error, Verbosity.Normal, this.FormatException(ex)); + this.WriteDebugLog(); + if (type == typeof(AggregateException) || type == typeof(TargetInvocationException) || type == typeof(TaskCanceledException)) + { + ex.Rethrow(); + } + else + { + throw; + } + } + this.WriteDebugLog(); + } + + /// + protected override void StopProcessing() + { + this.command.Cancel(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/SetAzureHDInsightClusterSizeCmdlet.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/SetAzureHDInsightClusterSizeCmdlet.cs new file mode 100644 index 000000000000..0a6c44eec408 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/SetAzureHDInsightClusterSizeCmdlet.cs @@ -0,0 +1,238 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Linq; +using System.Management.Automation; +using System.Reflection; +using System.Security.Cryptography.X509Certificates; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; +using Microsoft.WindowsAzure.Management.HDInsight.Logging; + +namespace Microsoft.WindowsAzure.Commands.HDInsight.Cmdlet.PSCmdlets +{ + /// + /// Cmdlet that allows a user to change the size of a cluster. + /// + [Cmdlet(VerbsCommon.Set, "AzureHDInsightClusterSize")] + [OutputType(typeof(AzureHDInsightCluster))] + public class SetAzureHDInsightClusterSizeCmdlet : AzureHDInsightCmdlet + { + private readonly ISetAzureHDInsightClusterSizeCommand command; + + [Parameter(Position = 1, Mandatory = true, HelpMessage = "The new cluster size in nodes requested.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetResizingWithName)] + [Parameter(Mandatory = true, HelpMessage = "The new cluster size in nodes requested.", ValueFromPipeline = true, + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetResizingWithPiping)] + public int ClusterSizeInNodes + { + get { return command.ClusterSizeInNodes; } + set { command.ClusterSizeInNodes = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The management certificate used to manage the Azure subscription.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasCert)] + public X509Certificate2 Certificate + { + get { return command.Certificate; } + set { command.Certificate = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The subscription id for the Azure subscription.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasSub)] + public string Subscription + { + get { return command.Subscription; } + set { command.Subscription = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The Endpoint to use when connecting to Azure.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + public Uri Endpoint + { + get { return command.Endpoint; } + set { command.Endpoint = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The name of the HDInsight cluster to set the size of.", ValueFromPipeline = false, + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + [Parameter(Mandatory = true, HelpMessage = "The name of the HDInsight cluster to set the size of", ValueFromPipeline = false, + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetResizingWithName)] + [Alias(AzureHdInsightPowerShellConstants.AliasClusterName, AzureHdInsightPowerShellConstants.AliasDnsName)] + public string Name + { + get { return command.Name; } + set { command.Name = value; } + } + + [Parameter(Mandatory = false, HelpMessage = "Do not ask for confirmation.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetResizingWithName)] + [Parameter(Mandatory = false, HelpMessage = "Do not ask for confirmation.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetResizingWithPiping)] + public SwitchParameter Force + { + get { return command.Force; } + set { command.Force = value; } + } + + [Parameter(Mandatory=true, HelpMessage = "The HDInsight cluster to set the size of.", ValueFromPipeline = true, + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetResizingWithPiping)] + public AzureHDInsightCluster Cluster + { + get { return command.Cluster; } + set { command.Cluster = value; } + } + + public SetAzureHDInsightClusterSizeCmdlet() + { + command = ServiceLocator.Instance.Locate().CreateSetClusterSize(); + } + + protected override void EndProcessing() + { + if (Cluster != null) + { + Name = Cluster.Name; + } + Name.ArgumentNotNull("Name"); + if (ClusterSizeInNodes < 1) + { + throw new ArgumentOutOfRangeException("ClusterSizeInNodes", "The requested ClusterSizeInNodes must be at least 1."); + } + try + { + command.Logger = Logger; + var currentSubscription = GetCurrentSubscription(Subscription, Certificate); + command.CurrentSubscription = currentSubscription; + Func action = () => command.EndProcessing(); + var token = command.CancellationToken; + + //get cluster + AzureHDInsightCluster cluster = Cluster; + if (cluster == null) + { + var getCommand = ServiceLocator.Instance.Locate().CreateGet(); + getCommand.CurrentSubscription = currentSubscription; + getCommand.Name = Name; + var getTask = getCommand.EndProcessing(); + while (!getTask.IsCompleted) + { + WriteDebugLog(); + getTask.Wait(1000, token); + } + if (getTask.IsFaulted) + { + throw new AggregateException(getTask.Exception); + } + if (getCommand.Output == null || getCommand.Output.Count == 0) + { + throw new InvalidOperationException(string.Format("Could not find cluster {0}", Name)); + } + cluster = getCommand.Output.First(); + } + + //prep cluster resize operation + command.Location = cluster.Location; + if (ClusterSizeInNodes < cluster.ClusterSizeInNodes) + { + var task = ConfirmSetAction( + "You are requesting a cluster size that is less than the current cluster size. We recommend not running jobs till the operation is complete as all running jobs will fail at end of resize operation and may impact the health of your cluster. Do you want to continue?", + "Continuing with set cluster operation.", + ClusterSizeInNodes.ToString(CultureInfo.InvariantCulture), + action); + if (task == null) + { + throw new OperationCanceledException("The change cluster size operation was aborted."); + } + while (!task.IsCompleted) + { + WriteDebugLog(); + task.Wait(1000, token); + } + if (task.IsFaulted) + { + throw new AggregateException(task.Exception); + } + } + else + { + var task = action(); + while (!task.IsCompleted) + { + WriteDebugLog(); + task.Wait(1000, token); + } + if (task.IsFaulted) + { + throw new AggregateException(task.Exception); + } + } + //print cluster details + foreach (var output in command.Output) + { + WriteObject(output); + } + WriteDebugLog(); + } + catch (Exception ex) + { + var type = ex.GetType(); + Logger.Log(Severity.Error, Verbosity.Normal, FormatException(ex)); + WriteDebugLog(); + if (type == typeof (AggregateException) || type == typeof (TargetInvocationException) || + type == typeof (TaskCanceledException)) + { + ex.Rethrow(); + } + else + { + throw; + } + } + + WriteDebugLog(); + } + + protected Task ConfirmSetAction(string actionMessage, string processMessage, string target, + Func action) + { + if (Force.IsPresent || ShouldContinue(actionMessage, "")) + { + if (ShouldProcess(target, processMessage)) + { + return action(); + } + } + return null; + } + + protected override void StopProcessing() + { + command.Cancel(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/SetAzureHDInsightDefaultStorageCmdlet.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/SetAzureHDInsightDefaultStorageCmdlet.cs new file mode 100644 index 000000000000..aa2084f49faf --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/SetAzureHDInsightDefaultStorageCmdlet.cs @@ -0,0 +1,142 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets +{ + /// + /// Sets the Default Storage Container for the HDInsight cluster configuration. + /// + [Cmdlet(VerbsCommon.Set, AzureHdInsightPowerShellConstants.AzureHDInsightDefaultStorage)] + [OutputType(typeof(AzureHDInsightConfig))] + public class SetAzureHDInsightDefaultStorageCmdlet : AzureHDInsightCmdlet, ISetAzureHDInsightDefaultStorageBase + { + private readonly ISetAzureHDInsightDefaultStorageCommand command; + + /// + /// Initializes a new instance of the SetAzureHDInsightDefaultStorageCmdlet class. + /// + public SetAzureHDInsightDefaultStorageCmdlet() + { + this.command = ServiceLocator.Instance.Locate().CreateSetDefaultStorage(); + } + + /// + /// Gets or sets the Azure HDInsight Configuration for the Azure HDInsight cluster being constructed. + /// + [Parameter(Position = 0, Mandatory = true, + HelpMessage = "The HDInsight cluster configuration to use when creating the new cluster (created by New-AzureHDInsightConfig).", + ValueFromPipeline = true, ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetDefaultStorageAccount)] + public AzureHDInsightConfig Config + { + get { return this.command.Config; } + set + { + if (value.IsNull()) + { + throw new ArgumentNullException("value", "The value for the configuration can not be null."); + } + + if (value.CoreConfiguration != null) + { + this.command.Config.CoreConfiguration.AddRange(value.CoreConfiguration); + } + + if (value.YarnConfiguration != null) + { + this.command.Config.YarnConfiguration.AddRange(value.YarnConfiguration); + } + this.command.Config.ClusterSizeInNodes = value.ClusterSizeInNodes; + this.command.Config.AdditionalStorageAccounts.AddRange(value.AdditionalStorageAccounts); + this.command.Config.ConfigActions.AddRange(value.ConfigActions); + this.command.Config.HiveMetastore = value.HiveMetastore ?? this.command.Config.HiveMetastore; + this.command.Config.OozieMetastore = value.OozieMetastore ?? this.command.Config.OozieMetastore; + this.command.Config.HeadNodeVMSize = value.HeadNodeVMSize; + this.command.Config.ClusterType = value.ClusterType; + if (!string.IsNullOrEmpty(value.VirtualNetworkId)) + { + this.command.Config.VirtualNetworkId = value.VirtualNetworkId; + } + if (!string.IsNullOrEmpty(value.SubnetName)) + { + this.command.Config.SubnetName = value.SubnetName; + } + } + } + + /// + /// Gets or sets the Storage Account key for the Default Storage Account. + /// + [Parameter(Position = 2, Mandatory = true, HelpMessage = "The key to use for the default storage account.", ValueFromPipeline = false, + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetDefaultStorageAccount)] + public string StorageAccountKey + { + get { return this.command.StorageAccountKey; } + set { this.command.StorageAccountKey = value; } + } + + /// + /// Gets or sets the Storage Account name for the Default Storage Account. + /// + [Parameter(Position = 1, Mandatory = true, HelpMessage = "The default storage account to use for the new cluster.", ValueFromPipeline = false, + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetDefaultStorageAccount)] + public string StorageAccountName + { + get { return this.command.StorageAccountName; } + set { this.command.StorageAccountName = value; } + } + + /// + /// Gets or sets the Storage Account container for the Default Storage Account. + /// + [Parameter(Position = 3, Mandatory = true, HelpMessage = "The container in the storage account to use for default HDInsight storage.", + ValueFromPipeline = false, ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetDefaultStorageAccount)] + public string StorageContainerName + { + get { return this.command.StorageContainerName; } + set { this.command.StorageContainerName = value; } + } + + /// + protected override void EndProcessing() + { + this.command.EndProcessing().Wait(); + foreach (AzureHDInsightConfig output in this.command.Output) + { + this.WriteObject(output); + } + this.WriteDebugLog(); + } + + /// + protected override void ProcessRecord() + { + base.ProcessRecord(); + } + + /// + protected override void StopProcessing() + { + this.command.Cancel(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/StartAzureHDInsightJobCmdlet.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/StartAzureHDInsightJobCmdlet.cs new file mode 100644 index 000000000000..e15a485dbf5b --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/StartAzureHDInsightJobCmdlet.cs @@ -0,0 +1,175 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Reflection; +using System.Security.Cryptography.X509Certificates; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; +using Microsoft.WindowsAzure.Management.HDInsight.Logging; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets +{ + /// + /// Cmdlet that lists submits a jobDetails to a running HDInsight cluster. + /// + [Cmdlet(VerbsLifecycle.Start, AzureHdInsightPowerShellConstants.AzureHDInsightJobs, + DefaultParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetStartJobByName)] + [OutputType(typeof(AzureHDInsightJob))] + public class StartAzureHDInsightJobCmdlet : AzureHDInsightCmdlet, IStartAzureHDInsightJobBase + { + private readonly IStartAzureHDInsightJobCommand command; + + /// + /// Initializes a new instance of the StartAzureHDInsightJobCmdlet class. + /// + public StartAzureHDInsightJobCmdlet() + { + this.command = ServiceLocator.Instance.Locate().CreateStartJob(); + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The management certificate used to manage the Azure subscription.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetStartJobByNameWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasCert)] + public X509Certificate2 Certificate + { + get { return this.command.Certificate; } + set { this.command.Certificate = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The HostedService to use when connecting to the HDInsight cluster.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetStartJobByNameWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasCloudServiceName)] + public string HostedService + { + get { return this.command.HostedService; } + set { this.command.HostedService = value; } + } + + /// + [Parameter(Mandatory = true, Position = 0, HelpMessage = "the Azure HDInsight cluster to start the jobDetails on.", ValueFromPipeline = true)] + [Alias(AzureHdInsightPowerShellConstants.AliasClusterName)] + public string Cluster + { + get { return this.command.Cluster; } + set { this.command.Cluster = value; } + } + + /// + [Parameter(Mandatory = false, Position = 1, HelpMessage = "The credentials to connect to Azure HDInsight cluster.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetStartJobByName)] + [Alias(AzureHdInsightPowerShellConstants.AliasCredentials)] + public PSCredential Credential + { + get { return this.command.Credential; } + set { this.command.Credential = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The Endpoint to use when connecting to Azure.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetStartJobByNameWithSpecificSubscriptionCredentials)] + public Uri Endpoint + { + get { return this.command.Endpoint; } + set { this.command.Endpoint = value; } + } + + /// + [Parameter(Mandatory = true, Position = 2, HelpMessage = "The jobDetails definition to start on the Azure HDInsight cluster.", + ValueFromPipeline = true)] + [Alias(AzureHdInsightPowerShellConstants.JobDefinition)] + public AzureHDInsightJobDefinition JobDefinition + { + get { return this.command.JobDefinition; } + set { this.command.JobDefinition = value; } + } + + /// + [Parameter(Position = 1, Mandatory = false, HelpMessage = "The subscription id for the Azure subscription.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetStartJobByNameWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasSub)] + public string Subscription + { + get { return this.command.Subscription; } + set { this.command.Subscription = value; } + } + + /// + protected override void EndProcessing() + { + try + { + this.command.Logger = this.Logger; + this.command.CurrentSubscription = this.GetCurrentSubscription(this.Subscription, this.Certificate); + AzureHDInsightHiveJobDefinition jobDef = this.command.JobDefinition as AzureHDInsightHiveJobDefinition; + //If the credential is null then they are connected to the subscription. + if(jobDef.IsNotNull() && jobDef.Query.IsNotNullOrEmpty() && !jobDef.RunAsFileJob && this.Credential.IsNull()) + { + this.WriteWarning("When submitting a query use the -RunAsFile switch to prevent errors with query lengths or special characters"); + } + else if(jobDef.IsNotNull() && jobDef.Query.IsNotNullOrEmpty() && this.Credential.IsNotNull()) + { + //If they are only connected to the cluster, then they should submit via file. + this.WriteWarning("Running queries is deprecated due to inability to process special characters and multiple lines. Please upload the query to a file in storage and re-submit the job using the -File parameter"); + } + Task task = this.command.EndProcessing(); + CancellationToken token = this.command.CancellationToken; + while (!task.IsCompleted) + { + this.WriteDebugLog(); + task.Wait(1000, token); + } + if (task.IsFaulted) + { + throw new AggregateException(task.Exception); + } + foreach (AzureHDInsightJob output in this.command.Output) + { + this.WriteObject(output); + } + this.WriteDebugLog(); + } + catch (Exception ex) + { + Type type = ex.GetType(); + this.Logger.Log(Severity.Error, Verbosity.Normal, this.FormatException(ex)); + this.WriteDebugLog(); + if (type == typeof(AggregateException) || type == typeof(TargetInvocationException) || type == typeof(TaskCanceledException)) + { + ex.Rethrow(); + } + else + { + throw; + } + } + this.WriteDebugLog(); + } + + /// + protected override void StopProcessing() + { + this.command.Cancel(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/StopAzureHDInsightJobCmdlet.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/StopAzureHDInsightJobCmdlet.cs new file mode 100644 index 000000000000..87a214b263ee --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/StopAzureHDInsightJobCmdlet.cs @@ -0,0 +1,162 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Reflection; +using System.Security.Cryptography.X509Certificates; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; +using Microsoft.WindowsAzure.Management.HDInsight.Logging; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets +{ + /// + /// Cmdlet that stops a jobDetails running on a HDInsight cluster. + /// + [Cmdlet(VerbsLifecycle.Stop, AzureHdInsightPowerShellConstants.AzureHDInsightJobs, + DefaultParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetStartJobByName)] + [OutputType(typeof(AzureHDInsightJob))] + public class StopAzureHDInsightJobCmdlet : AzureHDInsightCmdlet, IStopAzureHDInsightJobBase + { + private readonly IStopAzureHDInsightJobCommand command; + + /// + /// Initializes a new instance of the StopAzureHDInsightJobCmdlet class. + /// + public StopAzureHDInsightJobCmdlet() + { + this.command = ServiceLocator.Instance.Locate().CreateStopJob(); + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The management certificate used to manage the Azure subscription.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetStartJobByNameWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasCert)] + public X509Certificate2 Certificate + { + get { return this.command.Certificate; } + set { this.command.Certificate = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The HostedService to use when connecting to the HDInsight cluster.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetStartJobByNameWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasCloudServiceName)] + public string HostedService + { + get { return this.command.HostedService; } + set { this.command.HostedService = value; } + } + + /// + [Parameter(Mandatory = true, HelpMessage = "The endpoint to connect to the Azure HDInsight cluster.", ValueFromPipeline = true)] + public string Cluster + { + get { return this.command.Cluster; } + set { this.command.Cluster = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The credentials to connect to Azure HDInsight cluster.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetStartJobByName)] + [Alias(AzureHdInsightPowerShellConstants.AliasCredentials)] + public PSCredential Credential + { + get { return this.command.Credential; } + set { this.command.Credential = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The Endpoint to use when connecting to Azure.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetStartJobByNameWithSpecificSubscriptionCredentials)] + public Uri Endpoint + { + get { return this.command.Endpoint; } + set { this.command.Endpoint = value; } + } + + /// + [Parameter(Mandatory = true, HelpMessage = "The JobID of the jobDetails to stop.", ValueFromPipeline = true)] + [Alias(AzureHdInsightPowerShellConstants.JobId)] + public string JobId + { + get { return this.command.JobId; } + set { this.command.JobId = value; } + } + + /// + [Parameter(Position = 1, Mandatory = false, HelpMessage = "The subscription id for the Azure subscription.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetStartJobByNameWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasSub)] + public string Subscription + { + get { return this.command.Subscription; } + set { this.command.Subscription = value; } + } + + /// + protected override void EndProcessing() + { + try + { + this.command.Logger = this.Logger; + this.command.CurrentSubscription = this.GetCurrentSubscription(this.Subscription, this.Certificate); + Task task = this.command.EndProcessing(); + CancellationToken token = this.command.CancellationToken; + while (!task.IsCompleted) + { + this.WriteDebugLog(); + task.Wait(1000, token); + } + if (task.IsFaulted) + { + throw new AggregateException(task.Exception); + } + foreach (AzureHDInsightJob output in this.command.Output) + { + this.WriteObject(output); + } + this.WriteDebugLog(); + } + catch (Exception ex) + { + Type type = ex.GetType(); + this.Logger.Log(Severity.Error, Verbosity.Normal, this.FormatException(ex)); + this.WriteDebugLog(); + if (type == typeof(AggregateException) || type == typeof(TargetInvocationException) || type == typeof(TaskCanceledException)) + { + ex.Rethrow(); + } + else + { + throw; + } + } + this.WriteDebugLog(); + } + + /// + protected override void StopProcessing() + { + this.command.Cancel(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/UseAzureHDInsightClusterCmdlet.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/UseAzureHDInsightClusterCmdlet.cs new file mode 100644 index 000000000000..11f7b42aee7f --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/UseAzureHDInsightClusterCmdlet.cs @@ -0,0 +1,147 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Linq; +using System.Management.Automation; +using System.Reflection; +using System.Security.Cryptography.X509Certificates; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; +using Microsoft.WindowsAzure.Management.HDInsight.Logging; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets +{ + /// + /// Cmdlet that connects to a cluster registered in the HDInsight service. + /// + [Cmdlet(VerbsOther.Use, AzureHdInsightPowerShellConstants.AzureHDInsightCluster)] + [OutputType(typeof(string))] + public class UseAzureHDInsightClusterCmdlet : AzureHDInsightCmdlet, IAzureHDInsightClusterCommandBase + { + private readonly IUseAzureHDInsightClusterCommand command; + + /// + /// Initializes a new instance of the UseAzureHDInsightClusterCmdlet class. + /// + public UseAzureHDInsightClusterCmdlet() + { + this.command = ServiceLocator.Instance.Locate().CreateUseCluster(); + } + + /// + [Parameter(Position = 2, Mandatory = false, HelpMessage = "The management certificate used to manage the Azure subscription.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasCert)] + public X509Certificate2 Certificate + { + get { return this.command.Certificate; } + set { this.command.Certificate = value; } + } + + /// + [Parameter(Position = 4, Mandatory = false, HelpMessage = "The HostedService to use when managing the HDInsight cluster.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasCloudServiceName)] + public string HostedService + { + get { return this.command.HostedService; } + set { this.command.HostedService = value; } + } + + /// + [Parameter(Position = 3, Mandatory = false, HelpMessage = "The Endpoint to use when connecting to Azure.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + public Uri Endpoint + { + get { return this.command.Endpoint; } + set { this.command.Endpoint = value; } + } + + /// + [Parameter(Position = 0, Mandatory = true, HelpMessage = "The name of the HDInsight cluster to locate.", ValueFromPipeline = true, + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasClusterName, AzureHdInsightPowerShellConstants.AliasDnsName)] + public string Name + { + get { return this.command.Name; } + set { this.command.Name = value; } + } + + /// + [Parameter(Position = 1, Mandatory = false, HelpMessage = "The subscription id for the Azure subscription.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetClusterByNameWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasSub)] + public string Subscription + { + get { return this.command.Subscription; } + set { this.command.Subscription = value; } + } + + /// + /// Finishes the execution of the cmdlet by listing the clusters. + /// + protected override void EndProcessing() + { + try + { + this.command.Logger = this.Logger; + this.command.CurrentSubscription = this.GetCurrentSubscription(this.Subscription, this.Certificate); + Task task = this.command.EndProcessing(); + CancellationToken token = this.command.CancellationToken; + while (!task.IsCompleted) + { + this.WriteDebugLog(); + task.Wait(1000, token); + } + if (task.IsFaulted) + { + throw new AggregateException(task.Exception); + } + AzureHDInsightClusterConnection connection = this.command.Output.FirstOrDefault(); + var sessionManager = ServiceLocator.Instance.Locate().Create(this.SessionState); + sessionManager.SetCurrentCluster(connection); + this.WriteObject(string.Format(CultureInfo.InvariantCulture, "Successfully connected to cluster {0}", this.Name)); + this.WriteDebugLog(); + } + catch (Exception ex) + { + Type type = ex.GetType(); + this.Logger.Log(Severity.Error, Verbosity.Normal, this.FormatException(ex)); + this.WriteDebugLog(); + if (type == typeof(AggregateException) || type == typeof(TargetInvocationException) || type == typeof(TaskCanceledException)) + { + ex.Rethrow(); + } + else + { + throw; + } + } + this.WriteDebugLog(); + } + + /// + protected override void StopProcessing() + { + this.command.Cancel(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/WaitAzureHDInsightJobCmdlet.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/WaitAzureHDInsightJobCmdlet.cs new file mode 100644 index 000000000000..cd2abf70a0f6 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Cmdlet/WaitAzureHDInsightJobCmdlet.cs @@ -0,0 +1,238 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Management.Automation; +using System.Reflection; +using System.Security.Cryptography.X509Certificates; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; +using Microsoft.WindowsAzure.Management.HDInsight.Logging; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets +{ + /// + /// Cmdlet that lists all the Jobs running on a HDInsight cluster. + /// + [Cmdlet(VerbsLifecycle.Wait, AzureHdInsightPowerShellConstants.AzureHDInsightJobs, + DefaultParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetJobHistoryByName)] + [OutputType(typeof(AzureHDInsightJob))] + public class WaitAzureHDInsightJobCmdlet : AzureHDInsightCmdlet, IWaitAzureHDInsightJobBase + { + private readonly IWaitAzureHDInsightJobCommand command; + + /// + /// Initializes a new instance of the WaitAzureHDInsightJobCmdlet class. + /// + public WaitAzureHDInsightJobCmdlet() + { + this.command = ServiceLocator.Instance.Locate().CreateWaitJobs(); + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The management certificate used to manage the Azure subscription.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetJobHistoryByNameWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasCert)] + public X509Certificate2 Certificate + { + get { return this.command.Certificate; } + set { this.command.Certificate = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The HostedService to use when managing the HDInsight cluster.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetJobHistoryByNameWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasCloudServiceName)] + public string HostedService + { + get { return this.command.HostedService; } + set { this.command.HostedService = value; } + } + + /// + [Parameter(Mandatory = true, HelpMessage = "The name of the cluster the Job is running on", ValueFromPipelineByPropertyName = true, + ValueFromPipeline = true, ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetWaitJobById)] + public string Cluster + { + get { return this.command.Cluster; } + set { this.command.Cluster = value; } + } + + /// + [Parameter(Mandatory = false, Position = 1, HelpMessage = "The credentials to connect to Azure HDInsight cluster.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetJobHistoryByName)] + [Parameter(Mandatory = false, HelpMessage = "The credentials to connect to Azure HDInsight cluster.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetWaitJobByJob)] + [Parameter(Mandatory = false, HelpMessage = "The credentials to connect to Azure HDInsight cluster.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetWaitJobById)] + [Alias(AzureHdInsightPowerShellConstants.AliasCredentials)] + public PSCredential Credential + { + get { return this.command.Credential; } + set { this.command.Credential = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The Endpoint to use when connecting to Azure.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetJobHistoryByNameWithSpecificSubscriptionCredentials)] + public Uri Endpoint + { + get { return this.command.Endpoint; } + set { this.command.Endpoint = value; } + } + + /// + [Parameter(Mandatory = true, HelpMessage = "The Jobs to wait for.", ValueFromPipeline = true, + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetWaitJobByJob)] + [Parameter(Mandatory = true, HelpMessage = "The Jobs to wait for.", ValueFromPipeline = true, + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetJobHistoryByNameWithSpecificSubscriptionCredentials)] + public AzureHDInsightJob Job + { + get { return this.command.Job; } + set + { + this.command.Job = value; + if (value.IsNotNull()) + { + this.command.JobId = this.command.Job.JobId; + this.command.Cluster = this.command.Job.Cluster; + } + } + } + + /// + [Parameter(Mandatory = true, HelpMessage = "The Id of the Job to wait for.", ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetWaitJobById)] + public string JobId + { + get { return this.command.JobId; } + set { this.command.JobId = value; } + } + + /// + [Parameter(Position = 1, Mandatory = true, HelpMessage = "The subscription id for the Azure subscription.", + ParameterSetName = AzureHdInsightPowerShellConstants.ParameterSetJobHistoryByNameWithSpecificSubscriptionCredentials)] + [Alias(AzureHdInsightPowerShellConstants.AliasSub)] + public string Subscription + { + get { return this.command.Subscription; } + set { this.command.Subscription = value; } + } + + /// + [Parameter(Mandatory = false, HelpMessage = "The number of seconds to wait for completion, before cancelling waiting.", + ValueFromPipeline = true)] + public double WaitTimeoutInSeconds + { + get { return this.command.WaitTimeoutInSeconds; } + set { this.command.WaitTimeoutInSeconds = value; } + } + + /// + protected override void EndProcessing() + { + try + { + this.command.Logger = this.Logger; + this.command.CurrentSubscription = this.GetCurrentSubscription(this.Subscription, this.Certificate); + Task task = this.command.EndProcessing(); + CancellationToken token = this.command.CancellationToken; + while (!task.IsCompleted) + { + this.WriteDebugLog(); + task.Wait(1000, token); + } + if (task.IsFaulted) + { + throw new AggregateException(task.Exception); + } + foreach (AzureHDInsightJob output in this.command.Output) + { + this.WriteObject(output); + } + this.WriteDebugLog(); + } + catch (AggregateException ex) + { + this.WriteObject(this.FormatException(ex)); + this.Logger.Log(Severity.Error, Verbosity.Normal, this.FormatException(ex)); + throw ex.InnerException; + } + this.WriteDebugLog(); + } + + /// + protected override void ProcessRecord() + { + DateTime start = DateTime.Now; + string msg = string.Format(CultureInfo.CurrentCulture, "Waiting for jobDetails Started : {0}", start.ToString(CultureInfo.CurrentCulture)); + this.Logger.Log(Severity.Informational, Verbosity.Detailed, msg); + try + { + this.command.Logger = this.Logger; + this.command.CurrentSubscription = this.GetCurrentSubscription(this.Subscription, this.Certificate); + Task task = this.command.ProcessRecord(); + CancellationToken token = this.command.CancellationToken; + while (!task.IsCompleted) + { + this.WriteDebugLog(); + if (this.command.JobDetailsStatus.IsNotNull()) + { + msg = string.Format(CultureInfo.CurrentCulture, "Waiting for jobDetails : {0}", this.JobId); + var record = new ProgressRecord( + 0, msg, this.command.JobDetailsStatus.StatusCode.ToString() + " : " + this.command.JobDetailsStatus.PercentComplete); + this.WriteProgress(record); + } + task.Wait(1000, token); + } + this.WriteDebugLog(); + } + catch (Exception ex) + { + Type type = ex.GetType(); + this.Logger.Log(Severity.Error, Verbosity.Normal, this.FormatException(ex)); + this.WriteDebugLog(); + if (type == typeof(AggregateException) || type == typeof(TargetInvocationException) || type == typeof(TaskCanceledException)) + { + ex.Rethrow(); + } + else + { + throw; + } + } + msg = string.Format(CultureInfo.CurrentCulture, "Waiting for jobDetails Stopped : {0}", DateTime.Now.ToString(CultureInfo.CurrentCulture)); + this.Logger.Log(Severity.Informational, Verbosity.Detailed, msg); + msg = string.Format( + CultureInfo.CurrentCulture, + "Waiting for jobDetails Executed for {0} minutes", + (DateTime.Now - start).TotalMinutes.ToString(CultureInfo.CurrentCulture)); + this.Logger.Log(Severity.Informational, Verbosity.Detailed, msg); + this.WriteDebugLog(); + } + + /// + protected override void StopProcessing() + { + this.command.Cancel(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Commands.HDInsight.csproj b/src/ServiceManagement/HDInsight/Commands.HDInsight/Commands.HDInsight.csproj new file mode 100644 index 000000000000..5299623ae63a --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Commands.HDInsight.csproj @@ -0,0 +1,356 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {137D404A-865A-43DB-930C-6DA67DA048DF} + Library + Properties + Microsoft.WindowsAzure.Commands.HDInsight + Microsoft.WindowsAzure.Commands.HDInsight + v4.5 + 512 + ..\..\..\ + true + + + true + full + false + ..\..\..\Package\Debug\ServiceManagement\Azure\HDInsight + DEBUG;TRACE + prompt + 4 + true + true + false + + + ..\..\..\Package\Release\ServiceManagement\Azure\HDInsight + TRACE;SIGN + true + pdbonly + AnyCPU + bin\Release\Management.dll.CodeAnalysisLog.xml + true + GlobalSuppressions.cs + prompt + MinimumRecommendedRules.ruleset + ;$(ProgramFiles)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\Rule Sets + ;$(ProgramFiles)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\FxCop\Rules + true + true + MSSharedLibKey.snk + true + false + + + + ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll + + + ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll + + + ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll + + + ..\..\..\packages\Microsoft.Hadoop.Client.1.3.3.2\lib\net40\Microsoft.Hadoop.Client.dll + + + ..\..\..\packages\Microsoft.Hadoop.Client.1.3.3.2\lib\net40\Microsoft.HDInsight.Net.Http.Formatting.dll + + + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.1.8.0.0\lib\net35-full\Microsoft.WindowsAzure.Configuration.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.Management.HDInsight.1.3.3.2\lib\net40\Microsoft.WindowsAzure.Management.HDInsight.dll + + + ..\..\..\packages\Microsoft.Hadoop.Client.1.3.3.2\lib\net40\Microsoft.WindowsAzure.Management.HDInsight.Framework.dll + + + ..\..\..\packages\Microsoft.Hadoop.Client.1.3.3.2\lib\net40\Microsoft.WindowsAzure.Management.HDInsight.Framework.Core.dll + + + ..\..\..\packages\WindowsAzure.Storage.3.0.3.0\lib\net40\Microsoft.WindowsAzure.Storage.dll + + + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + True + + + + + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Designer + + + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + + + Designer + PreserveNewest + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/MSSharedLibKey.snk b/src/ServiceManagement/HDInsight/Commands.HDInsight/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ServiceManagement/HDInsight/Commands.HDInsight/MSSharedLibKey.snk differ diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Microsoft.WindowsAzure.Commands.HDInsight.dll-Help.psd1 b/src/ServiceManagement/HDInsight/Commands.HDInsight/Microsoft.WindowsAzure.Commands.HDInsight.dll-Help.psd1 new file mode 100644 index 000000000000..cb3f443c4aff --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Microsoft.WindowsAzure.Commands.HDInsight.dll-Help.psd1 @@ -0,0 +1,86 @@ +# +# Module manifest for module 'Azure' +# +# Generated by: Microsoft Corporation +# +# Generated on: 5/23/2012 +# + +@{ + +# Version number of this module. +ModuleVersion = '0.8.8' + +# ID used to uniquely identify this module +GUID = 'D48CF693-4125-4D2D-8790-1514F44CE325' + +# Author of this module +Author = 'Microsoft Corporation' + +# Company or vendor of this module +CompanyName = 'Microsoft Corporation' + +# Copyright statement for this module +Copyright = '?Microsoft Corporation. All rights reserved.' + +# Description of the functionality provided by this module +Description = '' + +# Minimum version of the Windows PowerShell engine required by this module +PowerShellVersion = '3.0' + +# Name of the Windows PowerShell host required by this module +PowerShellHostName = '' + +# Minimum version of the Windows PowerShell host required by this module +PowerShellHostVersion = '' + +# Minimum version of the .NET Framework required by this module +DotNetFrameworkVersion = '4.0' + +# Minimum version of the common language runtime (CLR) required by this module +CLRVersion='4.0' + +# Processor architecture (None, X86, Amd64, IA64) required by this module +ProcessorArchitecture = 'None' + +# Modules that must be imported into the global environment prior to importing this module +RequiredModules = @() + +# Assemblies that must be loaded prior to importing this module +RequiredAssemblies = @() + +# Script files (.ps1) that are run in the caller's environment prior to importing this module +ScriptsToProcess = @() + +# Type files (.ps1xml) to be loaded when importing this module +TypesToProcess = @() + +# Format files (.ps1xml) to be loaded when importing this module +FormatsToProcess = @() + +# Modules to import as nested modules of the module specified in ModuleToProcess +NestedModules = '..\..\..\Package\Debug\ServiceManagement\Azure\HDInsight\Microsoft.WindowsAzure.Commands.HDInsight.dll' + +# Functions to export from this module +FunctionsToExport = '*' + +# Cmdlets to export from this module +CmdletsToExport = '*' + +# Variables to export from this module +VariablesToExport = '*' + +# Aliases to export from this module +AliasesToExport = @() + +# List of all modules packaged with this module +ModuleList = @() + +# List of all files packaged with this module +FileList = @() + +# Private data to pass to the module specified in ModuleToProcess +PrivateData = '' + +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Microsoft.WindowsAzure.Commands.HDInsight.dll-Help.xml b/src/ServiceManagement/HDInsight/Commands.HDInsight/Microsoft.WindowsAzure.Commands.HDInsight.dll-Help.xml new file mode 100644 index 000000000000..f05a0b70b796 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Microsoft.WindowsAzure.Commands.HDInsight.dll-Help.xml @@ -0,0 +1,5306 @@ + + + + + Add-AzureHDInsightConfigValues + + Adds a Hadoop configuration value customization and/or a Hive shared library customization to the Microsoft Azure HDInsight cluster configuration. + + + + + Add + AzureHDInsightConfigValues + + + + + Adds a Hadoop configuration value customization, such as core-site.xml or hive-site.xml, and/or a Hive shared library customization to the Microsoft Azure HDInsight cluster configuration.This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version. + + + + Add-AzureHDInsightConfigValues + + Config + + The configuration object to which Hadoop configuration is added. + + AzureHDInsightConfig + + + Core + + Set of customized Hadoop configuration values for core-site.xml. + + Hashtable + + + Yarn + + + + Hashtable + + + Hdfs + + Set of customized Hadoop configuration values for hdfs-site.xml. + + Hashtable + + + Hive + + Customization object for Hadoop Hive service, including a set of Hadoop configuration values for hive-site.xml and Hive shared libraries. + + AzureHDInsightHiveConfiguration + + + MapReduce + + Customization object for map reduce and the capacity scheduler. + + AzureHDInsightMapReduceConfiguration + + + Oozie + + Customization object for Hadoop Oozie service. Includes set of Hadoop configuration values for oozie-site.xml. + + AzureHDInsightOozieConfiguration + + + Storm + + + + Hashtable + + + HBase + + + + AzureHDInsightHBaseConfiguration + + + + + + Config + + The configuration object to which Hadoop configuration is added. + + AzureHDInsightConfig + + AzureHDInsightConfig + + + + + + Core + + Set of customized Hadoop configuration values for core-site.xml. + + Hashtable + + Hashtable + + + + + + Yarn + + + + Hashtable + + Hashtable + + + + + + Hdfs + + Set of customized Hadoop configuration values for hdfs-site.xml. + + Hashtable + + Hashtable + + + + + + Hive + + Customization object for Hadoop Hive service, including a set of Hadoop configuration values for hive-site.xml and Hive shared libraries. + + AzureHDInsightHiveConfiguration + + AzureHDInsightHiveConfiguration + + + + + + MapReduce + + Customization object for map reduce and the capacity scheduler. + + AzureHDInsightMapReduceConfiguration + + AzureHDInsightMapReduceConfiguration + + + + + + Oozie + + Customization object for Hadoop Oozie service. Includes set of Hadoop configuration values for oozie-site.xml. + + AzureHDInsightOozieConfiguration + + AzureHDInsightOozieConfiguration + + + + + + Storm + + + + Hashtable + + Hashtable + + + + + + HBase + + + + AzureHDInsightHBaseConfiguration + + AzureHDInsightHBaseConfiguration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Cluster configuration -------------------------- + + + + PS C:\> + $hiveConfigvalues = new-object 'Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects.AzureHDInsightHiveConfiguration' + $hiveConfigvalues.Configuration = @{ ???hive.exec.compress.output???=???true??? } + $hiveConfigvalues.AdditionalLibraries = new-object 'Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects.AzureHDInsightDefaultStorageAccount' + $hiveConfigvalues.AdditionalLibraries.StorageAccountName = "yourstorageaccount.blob.core.windows.net" + $hiveConfigvalues.AdditionalLibraries.StorageAccountKey = (Get-AzureStorageKey yourstorageaccount).Primary + $hiveConfigvalues.AdditionalLibraries.StorageContainerName = "yoursharedlibcontainer" + + $oozieConfigvalues = new-object 'Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects.AzureHDInsightOozieConfiguration' + $oozieConfigvalues.Configuration = @{ ???hive.exec.compress.output???=???true??? } + + $mapredConfigvalues = new-object 'Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects.AzureHDInsightMapReduceConfiguration' + $mapredConfigvalues.Configuration = @{ ???mapred.map.max.attempts???=???2??? } + $mapredConfigvalues.CapacitySchedulerConfiguration = @{ ???mapred.capacity-scheduler.init-poll-interval???=???1000??? } + + $config = New-AzureHDInsightClusterConfig -ClusterSizeInNodes 4 ` + ?????? | Set-AzureHDInsightDefaultStorage -StorageAccountName yourstorageaccount.blob.core.windows.net ` + ?????????????? -StorageAccountKey (Get-AzureStorageKey yourstorageaccount).Primary -StorageContainerName " yourstoragecontainer" ` + ?????? | Add-AzureHDInsightConfigValues -Core @{ ???io.file.buffer.size???=???300000??? } -MapReduce $mapredConfigvalues -Hive $hiveConfigvalues -Oozie $oozieConfigvalues + + $config | New-AzureHDInsightCluster -Subscription $subid -Credential $creds -Name yourcluster -Location "North Europe" + + Set Hive,Oozie, and MapReduce configuration values for an HDInsight cluster. + + + + + + + + + + + Online Version: + + + + + + + + Add-AzureHDInsightMetastore + + Adds a SQL Database account to the Microsoft Azure HDInsight cluster configuration. + + + + + Add + AzureHDInsightMetastore + + + + + Adds a SQL Database to the HDInsight configuration created by the New-AzureHDInsightClusterConfig cmdlet. The database is used to store Hive and/or Oozie metadata. This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version. + + + + Add-AzureHDInsightMetastore + + Config + + The configuration object to which metastore information is added. + + AzureHDInsightConfig + + + Credential + + Credentials to access SQL Database + + PSCredential + + + DatabaseName + + The name of the database that will store the Hive or Oozie metadata. + + String + + + MetastoreType + + The metastore type: HiveMetaStore if storing Hive metadata; OozieMetaStore if storing Oozie metadata. + + AzureHDInsightMetastoreType + + + SqlAzureServerName + + The fully qualified domain name (FQDN) of the SQL Database server that contains the database used to store the Hive or Oozie metadata. + + String + + + + + + Config + + The configuration object to which metastore information is added. + + AzureHDInsightConfig + + AzureHDInsightConfig + + + + + + Credential + + Credentials to access SQL Database + + PSCredential + + PSCredential + + + + + + DatabaseName + + The name of the database that will store the Hive or Oozie metadata. + + String + + String + + + + + + MetastoreType + + The metastore type: HiveMetaStore if storing Hive metadata; OozieMetaStore if storing Oozie metadata. + + AzureHDInsightMetastoreType + + AzureHDInsightMetastoreType + + + + + + SqlAzureServerName + + The fully qualified domain name (FQDN) of the SQL Database server that contains the database used to store the Hive or Oozie metadata. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Add a metastore -------------------------- + + + + PS C:\>$metaconfig = Add-AzureHDInsightMetastore -Config $config -SqlAzureServerName servername -DatabaseName dbname ???Credential (Get-Credential) -MetastoreType HiveMetastore + + Add a SQL database to serve as a metastore for an HDInsight cluster. + + + + + + + + + -------------------------- Configure storage -------------------------- + + + + PS C:\>$subid = (Get-AzureSubscription ???Current).SubscriptionId$key1 = Get-AzureStorageKey yourblobstorage | %{ $_.Primary }$key2 = Get-AzureStorageKey yoursecondblobstorage | %{ $_.Primary }$creds = Get-Credential$oozieCreds = Get-Credential$hiveCreds = Get-CredentialNew-AzureHDInsightClusterConfig -ClusterSizeInNodes 4 ` | Set-AzureHDInsightDefaultStorage -StorageAccountName yourblobstorage.blob.core.windows.net -StorageAccountKey $key1 -StorageContainerName &quot;yourcontainer&quot; | Add-AzureHDInsightStorage -StorageAccountName yoursecondbobstorage.blob.core.windows.net -StorageAccountKey $key2 ` | Add-AzureHDInsightMetastore -SqlAzureServerName &quot;yoursqlserver.database.windows.net&quot; -DatabaseName &quot;yourOozieDatabaseName&quot; -Credential $oozieCreds -MetastoreType OozieMetastore ` | Add-AzureHDInsightMetastore -SqlAzureServerName &quot;yoursqlserver.database.widows.net&quot; -DatabaseName &quot;yourHiveDatabaseName&quot; -Credential $hiveCreds -MetastoreType HiveMetastore ` | New-AzureHDInsightCluster -Subscription $subid -Credential $creds + + Configure storage and add metastore. + + + + + + + + + + + Online Version: + + + + + + + + Add-AzureHDInsightStorage + + Adds a Microsoft Azure Blob Storage account entry to a target HDInsight configuration. + + + + + Add + AzureHDInsightStorage + + + + + This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version. + + + + Add-AzureHDInsightStorage + + Config + + The target configuration to which storage account information is added. + + AzureHDInsightConfig + + + StorageAccountKey + + The storage account key needed to access the storage account that is being added to the target configuration. + + String + + + StorageAccountName + + + + String + + + + + + Config + + The target configuration to which storage account information is added. + + AzureHDInsightConfig + + AzureHDInsightConfig + + + + + + StorageAccountKey + + The storage account key needed to access the storage account that is being added to the target configuration. + + String + + String + + + + + + StorageAccountName + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Unknown -------------------------- + + + + PS C:\> + + + + + + + + + + + -------------------------- Unknown -------------------------- + + + + PS C:\> Add a storage account. + PS C:\>$storeconfig = Add-AzureHDInsightStorage -Config $config -StorageAccountName name -StorageAccountKey key + + + Configure storage accounts and access. + PS C:\>$subid = (Get-AzureSubscription ???Current).SubscriptionId + $key1 = Get-AzureStorageKey yourblobstorage | %{ $_.Primary } + $key2 = Get-AzureStorageKey yoursecondblobstorage | %{ $_.Primary } + $creds = Get-Credential + $oozieCreds = Get-Credential + $hiveCreds = Get-Credential + New-AzureHDInsightClusterConfig -ClusterSizeInNodes 4 ` + | Set-AzureHDInsightDefaultStorage -StorageAccountName yourblobstorage.blob.core.windows.net + -StorageAccountKey $key1 -StorageContainerName &quot;yourcontainer&quot; + | Add-AzureHDInsightStorage -StorageAccountName yoursecondbobstorage.blob.core.windows.net -StorageAccountKey $key2 ` + | Add-AzureHDInsightMetastore -SqlAzureServerName &quot;yoursqlserver.database.windows.net&quot; -DatabaseName &quot;yourOozieDatabaseName&quot; -Credential $oozieCreds -MetastoreType OozieMetastore ` + | Add-AzureHDInsightMetastore -SqlAzureServerName &quot;yoursqlserver.database.widows.net&quot; -DatabaseName &quot;yourHiveDatabaseName&quot; -Credential $hiveCreds -MetastoreType HiveMetastore ` + | New-AzureHDInsightCluster -Subscription $subid -Credential $creds + + Add storage + + + + + + + + + + + Online Version: + + + + + + + + Get-AzureHDInsightCluster + + Retrieves and lists all of the Microsoft Azure HDInsight clusters associated with the current subscription or retrieves a specific named cluster. + + + + + Get + AzureHDInsightCluster + + + + + Lists all Microsoft Azure HDInsight Service clusters for the current subscription. If the Name parameter is specified, only information for the cluster with that name is returned. This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version. + + + + Get-AzureHDInsightCluster + + Certificate + + Management certificate of the Azure subscription. + + X509Certificate2 + + + HostedService + + The namespace of the Azure HDInsight Service if it is different from default. + + String + + + Endpoint + + Specifies the endpoint to use when connecting to Microsoft Azure if the endpoint is different from the default. + + Uri + + + Name + + The name of an HDInsight cluster to retrieve. + + String + + + Subscription + + The subscription that contains the HDInsight clusters to retrieve. + + String + + + + + + Certificate + + Management certificate of the Azure subscription. + + X509Certificate2 + + X509Certificate2 + + + + + + HostedService + + The namespace of the Azure HDInsight Service if it is different from default. + + String + + String + + + + + + Endpoint + + Specifies the endpoint to use when connecting to Microsoft Azure if the endpoint is different from the default. + + Uri + + Uri + + + + + + Name + + The name of an HDInsight cluster to retrieve. + + String + + String + + + + + + Subscription + + The subscription that contains the HDInsight clusters to retrieve. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Clusters in a subscription -------------------------- + + + + PS C:\>Get-AzureHDInsightCluster -Subscription (Get-AzureSubscription -Current).SubscriptionId + + Get information about the clusters associated with a specified subscription. + + + + + + + + + + + Online Version: + + + + + + + + Get-AzureHDInsightJob + + Retrieves the Azure HDInsight jobs from a cluster and lists them in reverse chronological order. + + + + + Get + AzureHDInsightJob + + + + + Lists recent jobs for a specified cluster in reverse chronological order, the most recent at the top of the list.This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version. + + + + Get-AzureHDInsightJob + + Cluster + + Name of the cluster used to run the jobs that are being retrieved. + + String + + + Credential + + Cluster credentials used for direct HTTP access to the cluster. Can be used instead of Subscription parameter to authenticate access to the cluster. + + PSCredential + + + JobId + + The Id of a specific job to be retrieved. + + String + + + + Get-AzureHDInsightJob + + Certificate + + Management certificate of the Azure subscription. + + X509Certificate2 + + + HostedService + + The namespace of the Azure HDInsight Service if it is different from the default. + + String + + + Cluster + + Name of the cluster used to run the jobs that are being retrieved. + + String + + + Endpoint + + Specifies the endpoint to use when connecting to Microsoft Azure if the endpoint is different from the default. + + Uri + + + JobId + + The Id of a specific job to be retrieved. + + String + + + Subscription + + The subscription that contains the HDInsight jobs to retrieve. + + String + + + + + + Cluster + + Name of the cluster used to run the jobs that are being retrieved. + + String + + String + + + + + + Credential + + Cluster credentials used for direct HTTP access to the cluster. Can be used instead of Subscription parameter to authenticate access to the cluster. + + PSCredential + + PSCredential + + + + + + JobId + + The Id of a specific job to be retrieved. + + String + + String + + + + + + Certificate + + Management certificate of the Azure subscription. + + X509Certificate2 + + X509Certificate2 + + + + + + HostedService + + The namespace of the Azure HDInsight Service if it is different from the default. + + String + + String + + + + + + Endpoint + + Specifies the endpoint to use when connecting to Microsoft Azure if the endpoint is different from the default. + + Uri + + Uri + + + + + + Subscription + + The subscription that contains the HDInsight jobs to retrieve. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Unknown -------------------------- + + + + PS C:\> + + + + + + + + + + + -------------------------- Unknown -------------------------- + + + + PS C:\> + + + + + + + + + + + + + Online Version: + + + + + + + + Get-AzureHDInsightJobOutput + + Retrieves the log output for a job from the storage account associated with a specified cluster. + + + + + Get + AzureHDInsightJobOutput + + + + + Retrieves various types of job logs including Standard Output, Standard Error, Task logs, and a summary of the task logs.This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version. + + + + Get-AzureHDInsightJobOutput + + Certificate + + Management certificate of the Azure subscription. + + X509Certificate2 + + + HostedService + + The namespace of the Azure HDInsight Service if it is different from the default. + + String + + + Cluster + + Name of the cluster that ran the jobs that are being retrieved. + + String + + + DownloadTaskLogs + + Switch used to retrieve the task logs for the job. + + SwitchParameter + + + Endpoint + + Specifies the endpoint to use when connecting to Azure if the endpoint is different from the default. + + Uri + + + JobId + + The Id of a specific job to be retrieved. + + String + + + StandardError + + Switch used to retrieve the StdErr output of the job. + + SwitchParameter + + + StandardOutput + + Switch used to retrieve the SdtOut output of the job. + + SwitchParameter + + + Subscription + + The subscription containing the HDInsight clusters to retrieve. + + String + + + TaskLogsDirectory + + When DownloadTaksLogs switch is used this parameter specifies destination local folder where tasks logs will be downloaded. + + String + + + TaskSummary + + Switch used to retrieve task log summary + + SwitchParameter + + + + + + Certificate + + Management certificate of the Azure subscription. + + X509Certificate2 + + X509Certificate2 + + + + + + HostedService + + The namespace of the Azure HDInsight Service if it is different from the default. + + String + + String + + + + + + Cluster + + Name of the cluster that ran the jobs that are being retrieved. + + String + + String + + + + + + DownloadTaskLogs + + Switch used to retrieve the task logs for the job. + + SwitchParameter + + SwitchParameter + + + + + + Endpoint + + Specifies the endpoint to use when connecting to Azure if the endpoint is different from the default. + + Uri + + Uri + + + + + + JobId + + The Id of a specific job to be retrieved. + + String + + String + + + + + + StandardError + + Switch used to retrieve the StdErr output of the job. + + SwitchParameter + + SwitchParameter + + + + + + StandardOutput + + Switch used to retrieve the SdtOut output of the job. + + SwitchParameter + + SwitchParameter + + + + + + Subscription + + The subscription containing the HDInsight clusters to retrieve. + + String + + String + + + + + + TaskLogsDirectory + + When DownloadTaksLogs switch is used this parameter specifies destination local folder where tasks logs will be downloaded. + + String + + String + + + + + + TaskSummary + + Switch used to retrieve task log summary + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Get Job Output -------------------------- + + + + PS C:\>$subid = (Get-AzureSubscription ???Current).SubscriptionId$clustername = ???yourcluster???$wordCountJob = New-AzureHDInsightMapReduceJobDefinition -JarFile "/example/apps/hadoop-examples.jar" -ClassName "wordcount" ` -Defines @{ "mapred.map.tasks"="3" } -Arguments "/example/data/gutenberg/davinci.txt", "/example/output/WordCount"$wordCountJob ` | Start-AzureHDInsightJob -Subscription $subid -Cluster $clustername ` | Wait-AzureHDInsightJob -Subscription $subid -WaitTimeoutInSeconds 3600 ` | Get-AzureHDInsightJobOutput -Cluster $clustername -Subscription $subid -StandardError + + Retrieve the output from an HDInsight job. + + + + + + + + + + + Online Version: + + + + + + + + Get-AzureHDInsightProperties + + Retrieves properties specific to a Microsoft Azure HDInsight service. + + + + + Get + AzureHDInsightProperties + + + + + Retrieves properties specific to a Microsoft Azure HDInsight service, such as a list of available Azure regions, HDInsight cluster versions, and available compute capacity.This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version. + + + + Get-AzureHDInsightProperties + + Certificate + + Management certificate of the Azure subscription. + + X509Certificate2 + + + HostedService + + The namespace of the Azure HDInsight Service if it is different from the default. + + String + + + Endpoint + + Specifies the endpoint to use when connecting to Microsoft Azure if the endpoint is different from the default. + + Uri + + + Locations + + Retrieves the list of Azure regions where the HDInsight service is available. + + SwitchParameter + + + Subscription + + The subscription that contains the HDInsight properties to retrieve. + + String + + + Versions + + Retrieves list of HDInsight cluster versions available in the service for this subscription. + + SwitchParameter + + + + + + Certificate + + Management certificate of the Azure subscription. + + X509Certificate2 + + X509Certificate2 + + + + + + HostedService + + The namespace of the Azure HDInsight Service if it is different from the default. + + String + + String + + + + + + Endpoint + + Specifies the endpoint to use when connecting to Microsoft Azure if the endpoint is different from the default. + + Uri + + Uri + + + + + + Locations + + Retrieves the list of Azure regions where the HDInsight service is available. + + SwitchParameter + + SwitchParameter + + + + + + Subscription + + The subscription that contains the HDInsight properties to retrieve. + + String + + String + + + + + + Versions + + Retrieves list of HDInsight cluster versions available in the service for this subscription. + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Get HDInsight properties -------------------------- + + + + PS C:\>$SubName = Get-AzureSubscription -Current | %{ $_.SubscriptionName } + Get-AzureHDInsightProperties -Subscription $SubName + + Retrieve the HDInsight properties of an Azure subscription. + + + + + + + + + + + Online Version: + + + + + + + + Grant-AzureHDInsightHttpServicesAccess + + Grants HTTP access to the cluster. + + + + + Grant + AzureHDInsightHttpServicesAccess + + + + + Enables HTTP to access to the cluster using ODBC, Ambari, Oozie and web services.This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version. + + + + Grant-AzureHDInsightHttpServicesAccess + + Certificate + + Management certificate of the Azure subscription + + X509Certificate2 + + + HostedService + + The namespace of the Azure HDInsight Service if it is different from the default. + + String + + + Credential + + User name and password used for HTTP access. + + PSCredential + + + Endpoint + + Specifies the endpoint to use when connecting to Microsoft Azure if the endpoint is different from the default. + + Uri + + + Location + + Azure region where the cluster is located. + + String + + + Name + + The name of the cluster. + + String + + + Subscription + + The subscription that contains the HDInsight cluster to which access is being granted. + + String + + + + + + Certificate + + Management certificate of the Azure subscription + + X509Certificate2 + + X509Certificate2 + + + + + + HostedService + + The namespace of the Azure HDInsight Service if it is different from the default. + + String + + String + + + + + + Credential + + User name and password used for HTTP access. + + PSCredential + + PSCredential + + + + + + Endpoint + + Specifies the endpoint to use when connecting to Microsoft Azure if the endpoint is different from the default. + + Uri + + Uri + + + + + + Location + + Azure region where the cluster is located. + + String + + String + + + + + + Name + + The name of the cluster. + + String + + String + + + + + + Subscription + + The subscription that contains the HDInsight cluster to which access is being granted. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Unknown -------------------------- + + + + PS C:\> + + + + + + + + + + + -------------------------- Unknown -------------------------- + + + + PS C:\> + + + + + + + + + + + + + Online Version: + + + + + + + + Invoke-AzureHDInsightHiveJob + + Submits Hive queries to the HDInsight cluster, shows progress of the query execution, and retrieves query results in one operation. + + + + + Invoke + AzureHDInsightHiveJob + + + + + Submits Hive queries to the HDInsight cluster, shows progress of the query execution, and retrieves query results in one operation. The Use-AzureHDInsightCluster cmdlet needs to be used before calling Invoke-Hive to specify which HDInsight cluster the query will be submitted to.This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version. + + + + Invoke-AzureHDInsightHiveJob + + Arguments + + Arguments of the Hadoop job. The arguments will be passed as command line arguments to each task. + + String[] + + + Defines + + Hadoop configuration values to be set during the job execution. + + Hashtable + + + File + + The wasb path to a file in Azure Blob Storage that contains the query to be executed. Use this File parameter in place of a query parameter. + + String + + + Files + + A collection of files required for the Hive job to execute. + + String[] + + + JobName + + The name of the Hive job being defined. If the name is not specified, it is "Hive: <first 100 characters of Query>" by default. + + String + + + Query + + The Hive query to be executed. + + String + + + StatusFolder + + Location of the status folder where the standard and error outputs of the job will be stored, including its exit code and task logs. + + String + + + + + + Arguments + + Arguments of the Hadoop job. The arguments will be passed as command line arguments to each task. + + String[] + + String[] + + + + + + Defines + + Hadoop configuration values to be set during the job execution. + + Hashtable + + Hashtable + + + + + + File + + The wasb path to a file in Azure Blob Storage that contains the query to be executed. Use this File parameter in place of a query parameter. + + String + + String + + + + + + Files + + A collection of files required for the Hive job to execute. + + String[] + + String[] + + + + + + JobName + + The name of the Hive job being defined. If the name is not specified, it is "Hive: <first 100 characters of Query>" by default. + + String + + String + + + + + + Query + + The Hive query to be executed. + + String + + String + + + + + + StatusFolder + + Location of the status folder where the standard and error outputs of the job will be stored, including its exit code and task logs. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Submit a Hive query -------------------------- + + + + PS C:\>Use-AzureHDInsightCluster yourcluster -Subscription (Get-AzureSubscription -Current).SubscriptionId + Invoke-Hive "select * from hivesampletable limit 10" + + Submit a Hive queries to the HDInsight cluster. + + + + + + + + + + + Online Version: + + + + + + + + New-AzureHDInsightCluster + + Creates a new Microsoft Azure HDInsight cluster for the current subscription. + + + + + New + AzureHDInsightCluster + + + + + Creates a new Microsoft Azure HDInsight cluster using the specified parameters or configuration created using the New-AzureHDInsightClusterConfig cmdlet. This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version. + + + + New-AzureHDInsightCluster + + Certificate + + Management certificate of the Azure subscription. + + X509Certificate2 + + + HostedService + + The namespace of the Azure HDInsight Service if it is different from the default. + + String + + + Config + + A configuration object created using the New-AzureHDInsightClusterConfig cmdlet. + + AzureHDInsightConfig + + + Credential + + The user credentials for the Azure HDInsight cluster to be started. + + PSCredential + + + EndPoint + + Specifies the endpoint to use when connecting to Microsoft Azure if the endpoint is different from the default. + + Uri + + + Location + + The region that the HDInsight cluster will be created in. + + String + + + Name + + The name of the Azure HDInsight cluster. + + String + + + Subscription + + The Azure subscription in which the new HDInsight cluster is being created. + + String + + + Version + + The HDInsight cluster version to be created. + + String + + + + New-AzureHDInsightCluster + + Certificate + + Management certificate of the Azure subscription. + + X509Certificate2 + + + HostedService + + The namespace of the Azure HDInsight Service if it is different from the default. + + String + + + ClusterSizeInNodes + + The number of data nodes to be created for the cluster. + + Int32 + + + Credential + + The user credentials for the Azure HDInsight cluster to be started. + + PSCredential + + + DefaultStorageAccountKey + + The account key for the default storage account used by the HDInsight cluster. + + String + + + DefaultStorageAccountName + + The name of the default storage account used by the HDInsight cluster. + + String + + + DefaultStorageContainerName + + The name of the default container in the default Microsoft Azure Storage Account used by the HDInsight cluster. + + String + + + EndPoint + + Specifies the endpoint to use when connecting to Microsoft Azure if the endpoint is different from the default. + + Uri + + + Location + + The region that the HDInsight cluster will be created in. + + String + + + Name + + The name of the Azure HDInsight cluster. + + String + + + Subscription + + The Azure subscription in which the new HDInsight cluster is being created. + + String + + + Version + + The HDInsight cluster version to be created. + + String + + + HeadNodeVMSize + + + + NodeVMSize + + + ClusterType + + + + ClusterType + + + VirtualNetworkId + + + + String + + + SubnetName + + + + String + + + + + + Certificate + + Management certificate of the Azure subscription. + + X509Certificate2 + + X509Certificate2 + + + + + + HostedService + + The namespace of the Azure HDInsight Service if it is different from the default. + + String + + String + + + + + + Config + + A configuration object created using the New-AzureHDInsightClusterConfig cmdlet. + + AzureHDInsightConfig + + AzureHDInsightConfig + + + + + + Credential + + The user credentials for the Azure HDInsight cluster to be started. + + PSCredential + + PSCredential + + + + + + EndPoint + + Specifies the endpoint to use when connecting to Microsoft Azure if the endpoint is different from the default. + + Uri + + Uri + + + + + + Location + + The region that the HDInsight cluster will be created in. + + String + + String + + + + + + Name + + The name of the Azure HDInsight cluster. + + String + + String + + + + + + Subscription + + The Azure subscription in which the new HDInsight cluster is being created. + + String + + String + + + + + + Version + + The HDInsight cluster version to be created. + + String + + String + + + + + + ClusterSizeInNodes + + The number of data nodes to be created for the cluster. + + Int32 + + Int32 + + + + + + DefaultStorageAccountKey + + The account key for the default storage account used by the HDInsight cluster. + + String + + String + + + + + + DefaultStorageAccountName + + The name of the default storage account used by the HDInsight cluster. + + String + + String + + + + + + DefaultStorageContainerName + + The name of the default container in the default Microsoft Azure Storage Account used by the HDInsight cluster. + + String + + String + + + + + + HeadNodeVMSize + + + + NodeVMSize + + NodeVMSize + + + + + + ClusterType + + + + ClusterType + + ClusterType + + + + + + VirtualNetworkId + + + + String + + String + + + + + + SubnetName + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Create HDInsight cluster -------------------------- + + + + PS C:\>$subid = (Get-AzureSubscription ???Current).SubscriptionId$key1 = Get-AzureStorageKey yourblobstorage | %{ $_.Primary }$key2 = Get-AzureStorageKey yoursecondblobstorage | %{ $_.Primary }$creds = Get-Credential$oozieCreds = Get-Credential$hiveCreds = Get-Credential New-AzureHDInsightClusterConfig -ClusterSizeInNodes 4 | Set-AzureHDInsightDefaultStorage -StorageAccountName yourblobstorage.blob.core.windows.net -StorageAccountKey $key1 -StorageContainerName "yourcontainer" | Add-AzureHDInsightStorage -StorageAccountName yoursecondbobstorage.blob.core.windows.net -StorageAccountKey $key2 | Add-AzureHDInsightMetastore -SqlAzureServerName "yoursqlserver.database.windows.net" -DatabaseName "yourOozieDatabaseName" -Credential $oozieCreds -MetastoreType OozieMetastore | Add-AzureHDInsightMetastore -SqlAzureServerName "yoursqlserver.database.windows.net" -DatabaseName "yourHiveDatabaseName" -Credential $hiveCreds -MetastoreType HiveMetastore | New-AzureHDInsightCluster -Subscription $subid -Credential $creds + + Create a new Microsoft Azure HDInsight cluster for the current subscription. + + + + + + + + + + + Online Version: + + + + + + + + New-AzureHDInsightClusterConfig + + Creates a non-persisted configuration that describes a Microsoft Azure HDInsight cluster configuration. + + + + + New + AzureHDInsightClusterConfig + + + + + Creates a non-persisted configuration that describes a Microsoft Azure HDInsight cluster configuration. This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version. + + + + New-AzureHDInsightClusterConfig + + ClusterSizeInNodes + + The number of nodes to be created for this cluster. + + Int32 + + + HeadNodeVMSize + + + + NodeVMSize + + + ClusterType + + + + ClusterType + + + VirtualNetworkId + + + + String + + + SubnetName + + + + String + + + + + + ClusterSizeInNodes + + The number of nodes to be created for this cluster. + + Int32 + + Int32 + + + + + + HeadNodeVMSize + + + + NodeVMSize + + NodeVMSize + + + + + + ClusterType + + + + ClusterType + + ClusterType + + + + + + VirtualNetworkId + + + + String + + String + + + + + + SubnetName + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Unknown -------------------------- + + + + PS C:\> + + + + + + + + + + + -------------------------- Create a cluster configuration -------------------------- + + + + PS C:\>$subid = (Get-AzureSubscription ???Current).SubscriptionId + $key1 = Get-AzureStorageKey yourblobstorage | %{ $_.Primary } + $key2 = Get-AzureStorageKey yoursecondblobstorage | %{ $_.Primary } + $creds = Get-Credential + $oozieCreds = Get-Credential + $hiveCreds = Get-Credential + New-AzureHDInsightClusterConfig -ClusterSizeInNodes 4 ` + | Set-AzureHDInsightDefaultStorage -StorageAccountName yourblobstorage.blob.core.windows.net + -StorageAccountKey $key1 -StorageContainerName &quot;yourcontainer&quot; + | Add-AzureHDInsightStorage -StorageAccountName yoursecondbobstorage.blob.core.windows.net -StorageAccountKey $key2 ` + | Add-AzureHDInsightMetastore -SqlAzureServerName &quot;yoursqlserver.database.windows.net&quot; -DatabaseName &quot;yourOozieDatabaseName&quot; -Credential $oozieCreds -MetastoreType OozieMetastore ` + | Add-AzureHDInsightMetastore -SqlAzureServerName &quot;yoursqlserver.database.widows.net&quot; -DatabaseName &quot;yourHiveDatabaseName&quot; -Credential $hiveCreds -MetastoreType HiveMetastore ` + | New-AzureHDInsightCluster -Subscription $subid -Credential $creds + + Create a non-persisted configuration that describes a Microsoft Azure HDInsight cluster configuration. Specify a 4 node cluster. + + + + + + + + + + + Online Version: + + + + + + + + New-AzureHDInsightHiveJobDefinition + + Defines a hive job for an Azure HDInsight service. + + + + + New + AzureHDInsightHiveJobDefinition + + + + + Defines a hive job for an Azure HDInsight service.This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version. + + + + New-AzureHDInsightHiveJobDefinition + + Arguments + + Arguments of the Hadoop job. The arguments will be passed as command line arguments to each task. + + String[] + + + Defines + + Hadoop configuration values to be set during the job execution + + Hashtable + + + File + + The path to a file that contains the query to be executed. Use this File parameter in place of a query parameter. + + String + + + Files + + A collection of files associated with the pig job. + + String[] + + + JobName + + The name of the Hive job being defined. If the name is not specified, it is "Hive: <first 100 characters of Query>" by default. + + String + + + Query + + The Hive query to be executed by the Hive job defined. + + String + + + StatusFolder + + Contains the standard and error outputs for the job, including its exit code and task logs. + + String + + + + + + Arguments + + Arguments of the Hadoop job. The arguments will be passed as command line arguments to each task. + + String[] + + String[] + + + + + + Defines + + Hadoop configuration values to be set during the job execution + + Hashtable + + Hashtable + + + + + + File + + The path to a file that contains the query to be executed. Use this File parameter in place of a query parameter. + + String + + String + + + + + + Files + + A collection of files associated with the pig job. + + String[] + + String[] + + + + + + JobName + + The name of the Hive job being defined. If the name is not specified, it is "Hive: <first 100 characters of Query>" by default. + + String + + String + + + + + + Query + + The Hive query to be executed by the Hive job defined. + + String + + String + + + + + + StatusFolder + + Contains the standard and error outputs for the job, including its exit code and task logs. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Create a Hive job definition -------------------------- + + + + PS C:\>$hiveJobDefinition = New-AzureHDInsightHiveJobDefinition -Query $queryString + + Define a hive job for an Azure HDInsight service. + + + + + + + + + + + Online Version: + + + + + + + + New-AzureHDInsightMapReduceJobDefinition + + Defines a new Map Reduce job. + + + + + New + AzureHDInsightMapReduceJobDefinition + + + + + Defines a new Map Reduce job to be run on an Azure HDInsight cluster. This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version. + + + + New-AzureHDInsightMapReduceJobDefinition + + Arguments + + Arguments of the Hadoop job. The arguments will be passed as command line arguments to each task. + + String[] + + + ClassName + + Name of the job class in the job JAR file. + + String + + + Defines + + Hadoop configuration values to be set during the job execution. + + Hashtable + + + Files + + The collection of files required for the execution of the job. Use wasb file references here. + + String[] + + + JarFile + + The fully qualified name of the JAR file that contains the code and dependencies of the MapReduce job. + + String + + + JobName + + The name of the MapReduce job. Specifying the name is optional. If it is not explicitly specified the value of the ClassName parameter is used by default. + + String + + + LibJars + + LibJar references of the job. + + String[] + + + StatusFolder + + + + String + + + + + + Arguments + + Arguments of the Hadoop job. The arguments will be passed as command line arguments to each task. + + String[] + + String[] + + + + + + ClassName + + Name of the job class in the job JAR file. + + String + + String + + + + + + Defines + + Hadoop configuration values to be set during the job execution. + + Hashtable + + Hashtable + + + + + + Files + + The collection of files required for the execution of the job. Use wasb file references here. + + String[] + + String[] + + + + + + JarFile + + The fully qualified name of the JAR file that contains the code and dependencies of the MapReduce job. + + String + + String + + + + + + JobName + + The name of the MapReduce job. Specifying the name is optional. If it is not explicitly specified the value of the ClassName parameter is used by default. + + String + + String + + + + + + LibJars + + LibJar references of the job. + + String[] + + String[] + + + + + + StatusFolder + + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Unknown -------------------------- + + + + PS C:\> + + + + + + + + + + + -------------------------- Unknown -------------------------- + + + + PS C:\> Define a new Map Reduce job to be run on a specified Azure HDInsight cluster.. + PS C:\>$subid = (Get-AzureSubscription ???Current).SubscriptionId$clustername = ???yourcluster???$wordCountJob = New-AzureHDInsightMapReduceJobDefinition -JarFile "/example/apps/hadoop-examples.jar" -ClassName "wordcount" `??????-Defines @{ "mapred.map.tasks"="3" } -Arguments "/example/data/gutenberg/davinci.txt", "/example/output/WordCount"$wordCountJob `?????? | Start-AzureHDInsightJob -Subscription $subid -Cluster $clustername `?????? | Wait-AzureHDInsightJob -Subscription $subid -WaitTimeoutInSeconds 3600 `?????? | Get-AzureHDInsightJobOutput -Cluster $clustername -Subscription $subid -StandardError + + Define a Map Reduce job. + + + + + + + + + + + Online Version: + + + + + + + + New-AzureHDInsightPigJobDefinition + + Defines a new pig job for an Azure HDInsight service. + + + + + New + AzureHDInsightPigJobDefinition + + + + + Defines a new pig job for an Azure HDInsight service.This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version. + + + + New-AzureHDInsightPigJobDefinition + + Arguments + + Arguments of the Hadoop job. The arguments will be passed as command line arguments to each task. + + String[] + + + File + + The path to a file that contains the query to be executed. Use this File parameter in place of a query parameter. + + String + + + Files + + A collections of files associated with the pig job. + + String[] + + + Query + + The query to be executed by the pig job. + + String + + + StatusFolder + + Contains the standard and error outputs for the job, including its exit code and task logs. + + String + + + + + + Arguments + + Arguments of the Hadoop job. The arguments will be passed as command line arguments to each task. + + String[] + + String[] + + + + + + File + + The path to a file that contains the query to be executed. Use this File parameter in place of a query parameter. + + String + + String + + + + + + Files + + A collections of files associated with the pig job. + + String[] + + String[] + + + + + + Query + + The query to be executed by the pig job. + + String + + String + + + + + + StatusFolder + + Contains the standard and error outputs for the job, including its exit code and task logs. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Unknown -------------------------- + + + + PS C:\> + + + + + + + + + + + -------------------------- Define a Pig job -------------------------- + + + + PS C:\># Provide the HDInsight cluster name + $subscriptionName = "<SubscriptionName>" + $clusterName = "<HDInsightClusterName>" + + # Create the Pig job definition + $0 = '$0'; + $QueryString = "LOGS = LOAD 'wasb:///example/data/sample.log';" + + "LEVELS = foreach LOGS generate REGEX_EXTRACT($0, '(TRACE|DEBUG|INFO|WARN|ERROR|FATAL)', 1) as LOGLEVEL;" + + "FILTEREDLEVELS = FILTER LEVELS by LOGLEVEL is not null;" + + "GROUPEDLEVELS = GROUP FILTEREDLEVELS by LOGLEVEL;" + + "FREQUENCIES = foreach GROUPEDLEVELS generate group as LOGLEVEL, COUNT(FILTEREDLEVELS.LOGLEVEL) as COUNT;" + + "RESULT = order FREQUENCIES by COUNT desc;" + + "DUMP RESULT;" + + $pigJobDefinition = New-AzureHDInsightPigJobDefinition -Query $QueryString + + Define a new pig job for an Azure HDInsight service. + + + + + + + + + + + Online Version: + + + + + + + + New-AzureHDInsightSqoopJobDefinition + + Defines a new Sqoop job. + + + + + New + AzureHDInsightSqoopJobDefinition + + + + + Defines a Sqoop job to be run on an HDInsight cluster.This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version. + + + + New-AzureHDInsightSqoopJobDefinition + + Command + + Specifies a Sqoop command and its arguments. + + String + + + File + + The path to a script file that contains the commands to be executed. The script file must be located on wasb. + + String + + + Files + + The collection of files required for the execution of the job. Use wasb file references here. + + String[] + + + StatusFolder + + Location of the status folder where the standard and error outputs of the Sqoop job will be stored, including its exit code and task logs. + + String + + + + + + Command + + Specifies a Sqoop command and its arguments. + + String + + String + + + + + + File + + The path to a script file that contains the commands to be executed. The script file must be located on wasb. + + String + + String + + + + + + Files + + The collection of files required for the execution of the job. Use wasb file references here. + + String[] + + String[] + + + + + + StatusFolder + + Location of the status folder where the standard and error outputs of the Sqoop job will be stored, including its exit code and task logs. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Sqoop is a tool designed to transfer data between Hadoop clusters and relational databases. You can use Sqoop to import data from a SQL database into an Hadoop Distributed File System (HDFS), transform the data with Hadoop MapReduce, and then export the data from the HDFS back into the SQL database. + + + + + -------------------------- Import data -------------------------- + + + + PS C:\>$sqoopJobDef = New-AzureHDInsightSqoopJobDefinition -Command "import --connect jdbc:sqlserver://<SQLDatabaseServerName>.database.windows.net:1433;username=<SQLDatabasUsername>@<SQLDatabaseServerName>; password=<SQLDatabasePassword>; database=<SQLDatabaseDatabaseName> --table <TableName> --target-dir wasb://<ContainerName>@<WindowsAzureStorageAccountName>.blob.core.windows.net/<Path>" + + Define a Sqoop job that that imports??all the rows of a table from a Microsoft Azure SQL Database to an HDInsight cluster. + + + + + + + + + + + Online Version: + + + + + + + + New-AzureHDInsightStreamingMapReduceJobDefinition + + Defines a new streaming Map Reduce job. + + + + + New + AzureHDInsightStreamingMapReduceJobDefinition + + + + + Defines new job definition object that represents parameters of the Hadoop streaming job.This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version. + + + + New-AzureHDInsightStreamingMapReduceJobDefinition + + Arguments + + Arguments of the Hadoop job. The arguments will be passed as command line arguments to each task. + + String[] + + + CmdEnv + + Command line environmental variables that should be set during job execution on data nodes. + + String[] + + + Combiner + + Combiner executable name. + + String + + + Defines + + Hadoop configuration values to be set during the job execution. + + Hashtable + + + Files + + The collection of files associated with the MapReduce job. + + String[] + + + InputPath + + WASB path representing location of input files. + + String + + + JobName + + The name of the MapReduce job. Specifying the name is optional. + + String + + + Mapper + + Mapper executable name. + + String + + + OutputPath + + WASB path representing location for the job output. + + String + + + Reducer + + Reducer executable name. + + String + + + StatusFolder + + Contains the standard and error outputs for the job, including its exit code and task logs. + + String + + + + + + Arguments + + Arguments of the Hadoop job. The arguments will be passed as command line arguments to each task. + + String[] + + String[] + + + + + + CmdEnv + + Command line environmental variables that should be set during job execution on data nodes. + + String[] + + String[] + + + + + + Combiner + + Combiner executable name. + + String + + String + + + + + + Defines + + Hadoop configuration values to be set during the job execution. + + Hashtable + + Hashtable + + + + + + Files + + The collection of files associated with the MapReduce job. + + String[] + + String[] + + + + + + InputPath + + WASB path representing location of input files. + + String + + String + + + + + + JobName + + The name of the MapReduce job. Specifying the name is optional. + + String + + String + + + + + + Mapper + + Mapper executable name. + + String + + String + + + + + + OutputPath + + WASB path representing location for the job output. + + String + + String + + + + + + Reducer + + Reducer executable name. + + String + + String + + + + + + StatusFolder + + Contains the standard and error outputs for the job, including its exit code and task logs. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Unknown -------------------------- + + + + PS C:\> + + + + + + + + + + + -------------------------- Unknown -------------------------- + + + + PS C:\> Create a MapReduce job definition for the streaming job. + PS C:\>$subscriptionName = "<SubscriptionName>" # Azure subscription name + $clusterName = "<ClusterName>" # HDInsight cluster name + + # Create a MapReduce job definition for the streaming job. + $streamingWC = New-AzureHDInsightStreamingMapReduceJobDefinition -Files "/example/apps/wc.exe", "/example/apps/cat.exe" -InputPath "/example/data/gutenberg/davinci.txt" -OutputPath "/example/data/StreamingOutput/wc.txt" -Mapper "cat.exe" -Reducer "wc.exe" + + Define a new streaming Map Reduce job. + + + + + + + + + + + Online Version: + + + + + + + + Remove-AzureHDInsightCluster + + Deletes the specified HDInsight cluster from your Microsoft Azure subscription. + + + + + Remove + AzureHDInsightCluster + + + + + Deletes the specified HDInsight Service cluster. This will also delete any data stored in HDFS on the cluster. Data stored in the associated Microsoft Azure Storage Account will not be deleted. This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version. + + + + Remove-AzureHDInsightCluster + + Certificate + + Management certificate of the Azure subscription. + + X509Certificate2 + + + HostedService + + The namespace of the Azure HDInsight Service if it is different from the default. + + String + + + Endpoint + + Specifies the endpoint to use when connecting to Microsoft Azure if the endpoint is different from the default. + + Uri + + + Name + + The name of the HDInsight cluster to be removed. + + String + + + Subscription + + The subscription account containing the HDInsight cluster to be removed. + + String + + + + + + Certificate + + Management certificate of the Azure subscription. + + X509Certificate2 + + X509Certificate2 + + + + + + HostedService + + The namespace of the Azure HDInsight Service if it is different from the default. + + String + + String + + + + + + Endpoint + + Specifies the endpoint to use when connecting to Microsoft Azure if the endpoint is different from the default. + + Uri + + Uri + + + + + + Name + + The name of the HDInsight cluster to be removed. + + String + + String + + + + + + Subscription + + The subscription account containing the HDInsight cluster to be removed. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Unknown -------------------------- + + + + PS C:\> + + + + + + + + + + + -------------------------- Remove cluster -------------------------- + + + + PS C:\>Remove-AzureHDInsightCluster -Name HDICluster -Subscription (Get-AzureSubscription -Current).SubscriptionId + + Delete a specified HDInsight cluster. + + + + + + + + + + + Online Version: + + + + + + + + Revoke-AzureHDInsightHttpServicesAccess + + Disables HTTP access to the cluster. + + + + + Revoke + AzureHDInsightHttpServicesAccess + + + + + Disables HTTP access to the cluster for ODBC, Ambari, Oozie and webHCatalog web services.This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version. + + + + Revoke-AzureHDInsightHttpServicesAccess + + Certificate + + Management certificate of the Azure subscription. + + X509Certificate2 + + + HostedService + + The namespace of the Azure HDInsight Service if it is different from the default. + + String + + + Endpoint + + Specifies the endpoint to use when connecting to Microsoft Azure if the endpoint is different from the default. + + Uri + + + Location + + The region where the HDInsight cluster is located. + + String + + + Name + + The name of the HDInsight cluster to be removed. + + String + + + Subscription + + The subscription account containing the HDInsight cluster to be revoked. + + String + + + + + + Certificate + + Management certificate of the Azure subscription. + + X509Certificate2 + + X509Certificate2 + + + + + + HostedService + + The namespace of the Azure HDInsight Service if it is different from the default. + + String + + String + + + + + + Endpoint + + Specifies the endpoint to use when connecting to Microsoft Azure if the endpoint is different from the default. + + Uri + + Uri + + + + + + Location + + The region where the HDInsight cluster is located. + + String + + String + + + + + + Name + + The name of the HDInsight cluster to be removed. + + String + + String + + + + + + Subscription + + The subscription account containing the HDInsight cluster to be revoked. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Unknown -------------------------- + + + + PS C:\> + + + + + + + + + + + -------------------------- Unknown -------------------------- + + + + PS C:\> + + + + + + + + + + + + + Online Version: + + + + + + + + Set-AzureHDInsightDefaultStorage + + Sets default storage account setting in the HDInsight cluster configuration object. + + + + + Set + AzureHDInsightDefaultStorage + + + + + Sets default storage account setting in the HDInsight cluster configuration object.This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version. + + + + Set-AzureHDInsightDefaultStorage + + Config + + The configuration object in which to set default storage account information. + + AzureHDInsightConfig + + + StorageAccountKey + + The storage account key needed to access the default storage account. + + String + + + StorageAccountName + + The name of the default storage account. + + String + + + StorageContainerName + + Name of the default storage container for the cluster. + + String + + + + + + Config + + The configuration object in which to set default storage account information. + + AzureHDInsightConfig + + AzureHDInsightConfig + + + + + + StorageAccountKey + + The storage account key needed to access the default storage account. + + String + + String + + + + + + StorageAccountName + + The name of the default storage account. + + String + + String + + + + + + StorageContainerName + + Name of the default storage container for the cluster. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Sets default storage account -------------------------- + + + + PS C:\>$subid = (Get-AzureSubscription ???Current).SubscriptionId + $key1 = Get-AzureStorageKey yourblobstorage | %{ $_.Primary } + $key2 = Get-AzureStorageKey yoursecondblobstorage | %{ $_.Primary } + $creds = Get-Credential + $oozieCreds = Get-Credential + $hiveCreds = Get-Credential + New-AzureHDInsightClusterConfig -ClusterSizeInNodes 4 ` + | Set-AzureHDInsightDefaultStorage -StorageAccountName yourblobstorage.blob.core.windows.net + -StorageAccountKey $key1 -StorageContainerName &quot;yourcontainer&quot; + | Add-AzureHDInsightStorage -StorageAccountName yoursecondbobstorage.blob.core.windows.net -StorageAccountKey $key2 ` + | Add-AzureHDInsightMetastore -SqlAzureServerName &quot;yoursqlserver.database.windows.net&quot; -DatabaseName &quot;yourOozieDatabaseName&quot; -Credential $oozieCreds -MetastoreType OozieMetastore ` + | Add-AzureHDInsightMetastore -SqlAzureServerName &quot;yoursqlserver.database.widows.net&quot; -DatabaseName &quot;yourHiveDatabaseName&quot; -Credential $hiveCreds -MetastoreType HiveMetastore ` + | New-AzureHDInsightCluster -Subscription $subid -Credential $creds + + Set default storage account setting in the HDInsight cluster configuration object. + + + + + + + + + + + Online Version: + + + + + + + + Start-AzureHDInsightJob + + Starts an Azure HDInsight job on a specified cluster. + + + + + Start + AzureHDInsightJob + + + + + Starts a defined Azure HDInsight job on a specified cluster. This can be a MapReduce job, a streaming job, a Hive job, or a Pig job. This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version. + + + + Start-AzureHDInsightJob + + Cluster + + The name of the Azure HDInsight cluster. + + String + + + Credential + + Cluster credentials used for direct HTTP access to the cluster. Can be used instead of Subscription parameter to authenticate access to the cluster. + + PSCredential + + + JobDefinition + + Specifies the endpoint to use when connecting to Microsoft Azure if the endpoint is different from the default. + + AzureHDInsightJobDefinition + + + + Start-AzureHDInsightJob + + Certificate + + Management certificate of the Azure subscription. + + X509Certificate2 + + + HostedService + + The namespace of the Azure HDInsight Service if it is different from the default. + + String + + + Cluster + + The name of the Azure HDInsight cluster. + + String + + + Endpoint + + Specifies the endpoint to use when connecting to Microsoft Azure if the endpoint is different from the default. + + Uri + + + JobDefinition + + Specifies the endpoint to use when connecting to Microsoft Azure if the endpoint is different from the default. + + AzureHDInsightJobDefinition + + + Subscription + + The subscription that contains the HDInsight cluster. + + String + + + + + + Cluster + + The name of the Azure HDInsight cluster. + + String + + String + + + + + + Credential + + Cluster credentials used for direct HTTP access to the cluster. Can be used instead of Subscription parameter to authenticate access to the cluster. + + PSCredential + + PSCredential + + + + + + JobDefinition + + Specifies the endpoint to use when connecting to Microsoft Azure if the endpoint is different from the default. + + AzureHDInsightJobDefinition + + AzureHDInsightJobDefinition + + + + + + Certificate + + Management certificate of the Azure subscription. + + X509Certificate2 + + X509Certificate2 + + + + + + HostedService + + The namespace of the Azure HDInsight Service if it is different from the default. + + String + + String + + + + + + Endpoint + + Specifies the endpoint to use when connecting to Microsoft Azure if the endpoint is different from the default. + + Uri + + Uri + + + + + + Subscription + + The subscription that contains the HDInsight cluster. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Start an Azure HDInsight job -------------------------- + + + + PS C:\>$subid = (Get-AzureSubscription ???Current).SubscriptionId$clustername = ???yourcluster???$wordCountJob = New-AzureHDInsightMapReduceJobDefinition -JarFile "/example/apps/hadoop-examples.jar" -ClassName "wordcount" `??????-Defines @{ "mapred.map.tasks"="3" } -Arguments "/example/data/gutenberg/davinci.txt", "/example/output/WordCount"$wordCountJob `?????? | Start-AzureHDInsightJob -Subscription $subid -Cluster $clustername `?????? | Wait-AzureHDInsightJob -Subscription $subid -WaitTimeoutInSeconds 3600 `?????? | Get-AzureHDInsightJobOutput -Cluster $clustername -Subscription $subid -StandardError + + Start an Azure HDInsight job on a specified cluster. + + + + + + + + + + + Online Version: + + + + + + + + Stop-AzureHDInsightJob + + Stops running an Azure HDInsight job on a specified cluster. + + + + + Stop + AzureHDInsightJob + + + + + Stops running Azure HDInsight job on a specified cluster.This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version. + + + + Stop-AzureHDInsightJob + + Cluster + + The name of the Azure HDInsight cluster. + + String + + + Credential + + Cluster credentials used for direct HTTP access to the cluster. Can be used instead of Subscription parameter to authenticate access to the cluster. + + PSCredential + + + JobId + + The Id of the HDInsight job to stop. + + String + + + + Stop-AzureHDInsightJob + + Certificate + + Management certificate of the Azure subscription. + + X509Certificate2 + + + HostedService + + The namespace of the Azure HDInsight Service if it is different from the default. + + String + + + Cluster + + The name of the Azure HDInsight cluster. + + String + + + Endpoint + + Specifies the endpoint to use when connecting to Microsoft Azure if the endpoint is different from the default. + + Uri + + + JobId + + The Id of the HDInsight job to stop. + + String + + + Subscription + + The subscription that contains the HDInsight cluster. + + String + + + + + + Cluster + + The name of the Azure HDInsight cluster. + + String + + String + + + + + + Credential + + Cluster credentials used for direct HTTP access to the cluster. Can be used instead of Subscription parameter to authenticate access to the cluster. + + PSCredential + + PSCredential + + + + + + JobId + + The Id of the HDInsight job to stop. + + String + + String + + + + + + Certificate + + Management certificate of the Azure subscription. + + X509Certificate2 + + X509Certificate2 + + + + + + HostedService + + The namespace of the Azure HDInsight Service if it is different from the default. + + String + + String + + + + + + Endpoint + + Specifies the endpoint to use when connecting to Microsoft Azure if the endpoint is different from the default. + + Uri + + Uri + + + + + + Subscription + + The subscription that contains the HDInsight cluster. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Unknown -------------------------- + + + + PS C:\> + + + + + + + + + + + + + Online Version: + + + + + + + + Use-AzureHDInsightCluster + + Selects Azure HDInsight cluster that will be used by the Invoke-Hive cmdlet for job submission. + + + + + Use + AzureHDInsightCluster + + + + + Selects Azure HDInsight cluster that will be used by Invoke-Hive cmdlet for job submission.This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version. + + + + Use-AzureHDInsightCluster + + Certificate + + Management certificate of the Azure subscription. + + X509Certificate2 + + + HostedService + + The namespace of the Azure HDInsight Service if it is different from the default. + + String + + + Endpoint + + The namespace of the Azure HDInsight Service if it is different from the default. + + Uri + + + Name + + The name of the cluster used by Invoke-Hive. + + String + + + Subscription + + The subscription that contains the HDInsight clusters to use. + + String + + + + + + Certificate + + Management certificate of the Azure subscription. + + X509Certificate2 + + X509Certificate2 + + + + + + HostedService + + The namespace of the Azure HDInsight Service if it is different from the default. + + String + + String + + + + + + Endpoint + + The namespace of the Azure HDInsight Service if it is different from the default. + + Uri + + Uri + + + + + + Name + + The name of the cluster used by Invoke-Hive. + + String + + String + + + + + + Subscription + + The subscription that contains the HDInsight clusters to use. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Unknown -------------------------- + + + + PS C:\> + + + + + + + + + + + + + Online Version: + + + + + + + + Wait-AzureHDInsightJob + + Awaits the completion or failure of the HDInsight job and shows its progress. + + + + + Wait + AzureHDInsightJob + + + + + Awaits the completion or failure of the HDInsight job and shows its progress.This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version. + + + + Wait-AzureHDInsightJob + + Credential + + Cluster credentials used for direct HTTP access to the cluster. Can be used instead of Subscription parameter to authenticate access to the cluster. + + PSCredential + + + WaitTimeoutInSeconds + + Timeout (in seconds) for the wait operation. When timeout expires the cmdlet finishes execution. + + Double + + + + Wait-AzureHDInsightJob + + Certificate + + Management certificate of the Azure subscription. + + X509Certificate2 + + + HostedService + + The namespace of the Azure HDInsight Service if it is different from the default. + + String + + + Endpoint + + Specifies the endpoint to use when connecting to Microsoft Azure if the endpoint is different from the default. + + Uri + + + Job + + The HDInsight job running for which the script awaits. + + AzureHDInsightJob + + + Subscription + + The subscription that contains the HDInsight clusters to use + + String + + + WaitTimeoutInSeconds + + Timeout (in seconds) for the wait operation. When timeout expires the cmdlet finishes execution. + + Double + + + + Wait-AzureHDInsightJob + + Cluster + + The cluster running the job. + + String + + + Credential + + Cluster credentials used for direct HTTP access to the cluster. Can be used instead of Subscription parameter to authenticate access to the cluster. + + PSCredential + + + JobId + + The Id of the job running. + + String + + + WaitTimeoutInSeconds + + Timeout (in seconds) for the wait operation. When timeout expires the cmdlet finishes execution. + + Double + + + + Wait-AzureHDInsightJob + + Credential + + Cluster credentials used for direct HTTP access to the cluster. Can be used instead of Subscription parameter to authenticate access to the cluster. + + PSCredential + + + Job + + The HDInsight job running for which the script awaits. + + AzureHDInsightJob + + + WaitTimeoutInSeconds + + Timeout (in seconds) for the wait operation. When timeout expires the cmdlet finishes execution. + + Double + + + + + + Credential + + Cluster credentials used for direct HTTP access to the cluster. Can be used instead of Subscription parameter to authenticate access to the cluster. + + PSCredential + + PSCredential + + + + + + WaitTimeoutInSeconds + + Timeout (in seconds) for the wait operation. When timeout expires the cmdlet finishes execution. + + Double + + Double + + + + + + Certificate + + Management certificate of the Azure subscription. + + X509Certificate2 + + X509Certificate2 + + + + + + HostedService + + The namespace of the Azure HDInsight Service if it is different from the default. + + String + + String + + + + + + Endpoint + + Specifies the endpoint to use when connecting to Microsoft Azure if the endpoint is different from the default. + + Uri + + Uri + + + + + + Job + + The HDInsight job running for which the script awaits. + + AzureHDInsightJob + + AzureHDInsightJob + + + + + + Subscription + + The subscription that contains the HDInsight clusters to use + + String + + String + + + + + + Cluster + + The cluster running the job. + + String + + String + + + + + + JobId + + The Id of the job running. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Wait for job completion -------------------------- + + + + PS C:\>$subid = (Get-AzureSubscription ???Current).SubscriptionId + $clustername = ???yourcluster??? + $wordCountJob = New-AzureHDInsightMapReduceJobDefinition -JarFile "/example/apps/hadoop-examples.jar" -ClassName "wordcount" ` + -Defines @{ "mapred.map.tasks"="3" } -Arguments "/example/data/gutenberg/davinci.txt", "/example/output/WordCount" + $wordCountJob ` + | Start-AzureHDInsightJob -Subscription $subid -Cluster $clustername ` + | Wait-AzureHDInsightJob -Subscription $subid -WaitTimeoutInSeconds 3600 ` + | Get-AzureHDInsightJobOutput -Cluster $clustername -Subscription $subid -StandardError + + Await the completion or failure of the HDInsight job for a specified interval of time. + + + + + + + + + + + Online Version: + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IAddAzureHDInsightConfigActionBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IAddAzureHDInsightConfigActionBase.cs new file mode 100644 index 000000000000..3e0630ac4219 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IAddAzureHDInsightConfigActionBase.cs @@ -0,0 +1,36 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces +{ + internal interface IAddAzureHDInsightConfigActionBase + { + /// + /// Gets or sets the AzureHDInsightConfig. + /// + AzureHDInsightConfig Config { get; set; } + + /// + /// Gets or sets the name of the config action. + /// + string Name { get; set; } + + /// + /// Gets or sets the affected nodes of the config action. + /// + ClusterNodeType[] ClusterRoleCollection { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IAddAzureHDInsightConfigValuesBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IAddAzureHDInsightConfigValuesBase.cs new file mode 100644 index 000000000000..b67eea38cc33 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IAddAzureHDInsightConfigValuesBase.cs @@ -0,0 +1,70 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces +{ + /// + /// Represents a command to set custom configuration values for Hadoop services. + /// + internal interface IAddAzureHDInsightConfigValuesBase + { + /// + /// Gets or sets the AzureHDInsightConfig. + /// + AzureHDInsightConfig Config { get; set; } + + /// + /// Gets or sets a collection of configuration properties to customize the Core Hadoop service. + /// + Hashtable Core { get; set; } + + /// + /// Gets or sets a collection of configuration properties to customize the Yarn Hadoop service. + /// + Hashtable Yarn { get; set; } + + /// + /// Gets or sets a collection of configuration properties to customize the Hdfs Hadoop service. + /// + Hashtable Hdfs { get; set; } + + /// + /// Gets or sets a collection of configuration properties to customize the Hive Hadoop service. + /// + AzureHDInsightHiveConfiguration Hive { get; set; } + + /// + /// Gets or sets a collection of configuration properties to customize the MapReduce Hadoop service. + /// + AzureHDInsightMapReduceConfiguration MapReduce { get; set; } + + /// + /// Gets or sets a collection of configuration properties to customize the Oozie Hadoop service. + /// + AzureHDInsightOozieConfiguration Oozie { get; set; } + + /// + /// Gets or sets a collection of configuration properties to customize the Storm service. + /// + Hashtable Storm { get; set; } + + /// + /// Gets or sets a collection of configuration properties to customize the HBase service. + /// + AzureHDInsightHBaseConfiguration HBase { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IAddAzureHDInsightMetaStoreBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IAddAzureHDInsightMetaStoreBase.cs new file mode 100644 index 000000000000..20c6a27529a4 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IAddAzureHDInsightMetaStoreBase.cs @@ -0,0 +1,47 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces +{ + internal interface IAddAzureHDInsightMetastoreBase + { + /// + /// Gets or sets the AzureHDInsightConfig. + /// + AzureHDInsightConfig Config { get; set; } + + /// + /// Gets or sets the Azure SQL Server user credentials. + /// + PSCredential Credential { get; set; } + + /// + /// Gets or sets the Azure SQL Server database name. + /// + string DatabaseName { get; set; } + + /// + /// Gets or sets the type of metastore represented by this object. + /// + AzureHDInsightMetastoreType MetastoreType { get; set; } + + /// + /// Gets or sets the Azure SQL Server for the metastore. + /// + string SqlAzureServerName { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IAddAzureHDInsightScriptActionBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IAddAzureHDInsightScriptActionBase.cs new file mode 100644 index 000000000000..afab7dd19b8a --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IAddAzureHDInsightScriptActionBase.cs @@ -0,0 +1,31 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces +{ + internal interface IAddAzureHDInsightScriptActionBase : IAddAzureHDInsightConfigActionBase + { + /// + /// Gets or sets the uri of the script action. + /// + Uri Uri { get; set; } + + /// + /// Gets or sets the parameters of the script action. + /// + string Parameters { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IAddAzureHDInsightStorageBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IAddAzureHDInsightStorageBase.cs new file mode 100644 index 000000000000..03cd3d500b7d --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IAddAzureHDInsightStorageBase.cs @@ -0,0 +1,36 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces +{ + internal interface IAddAzureHDInsightStorageBase + { + /// + /// Gets or sets the AzureHDInsightConfig. + /// + AzureHDInsightConfig Config { get; set; } + + /// + /// Gets or sets the Storage Account Key. + /// + string StorageAccountKey { get; set; } + + /// + /// Gets or sets the Storage Account Name. + /// + string StorageAccountName { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IAzureHDInsightStorageHandler.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IAzureHDInsightStorageHandler.cs new file mode 100644 index 000000000000..a57cdc1a79bb --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IAzureHDInsightStorageHandler.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces +{ + internal interface IAzureHDInsightStorageHandler + { + Uri GetStoragePath(Uri httpPath); + + void UploadFile(Uri path, Stream contents); + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IAzureHDInsightStorageHandlerFactory.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IAzureHDInsightStorageHandlerFactory.cs new file mode 100644 index 000000000000..fa558c34df97 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IAzureHDInsightStorageHandlerFactory.cs @@ -0,0 +1,20 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces +{ + internal interface IAzureHDInsightStorageHandlerFactory + { + IAzureHDInsightStorageHandler Create(WabStorageAccountConfiguration storageAccountConfiguration); + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IGetAzureHDInsightJobBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IGetAzureHDInsightJobBase.cs new file mode 100644 index 000000000000..282e90abbad8 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IGetAzureHDInsightJobBase.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.BaseInterfaces; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces +{ + internal interface IGetAzureHDInsightJobBase : IAzureHDInsightJobCommandBase + { + /// + /// Gets or sets the Id of the jobDetails to retrieve. + /// + string JobId { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IGetAzureHDInsightJobOutputBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IGetAzureHDInsightJobOutputBase.cs new file mode 100644 index 000000000000..ffa815302a28 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IGetAzureHDInsightJobOutputBase.cs @@ -0,0 +1,42 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.BaseInterfaces; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces +{ + internal interface IGetAzureHDInsightJobOutputBase : IAzureHDInsightCommonCommandBase + { + /// + /// Gets or sets the HDInsight cluster to connect to. + /// + string Cluster { get; set; } + + /// + /// Gets or sets the Id of the jobDetails to retrieve. + /// + string JobId { get; set; } + + /// + /// Gets or sets the type of jobDetails output to retrieve. + /// + JobOutputType OutputType { get; set; } + + /// + /// Gets or sets the directory to download task logs to. + /// + string TaskLogsDirectory { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IManageAzureHDInsightHttpAccessBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IManageAzureHDInsightHttpAccessBase.cs new file mode 100644 index 000000000000..64d241d0e8ad --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IManageAzureHDInsightHttpAccessBase.cs @@ -0,0 +1,37 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces +{ + internal interface IManageAzureHDInsightHttpAccessBase : IAzureHDInsightClusterCommandBase + { + /// + /// Gets or sets Credential to connect to the HDInsight cluster. + /// + PSCredential Credential { get; set; } + + /// + /// Gets or sets a value indicating whether to enable or disable Http services on this Azure HDInsight cluster. + /// + bool Enable { get; set; } + + /// + /// Gets or sets the Location for the cluster to return. + /// + string Location { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/INewAzureHDInsightClusterBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/INewAzureHDInsightClusterBase.cs new file mode 100644 index 000000000000..8d9d896e976b --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/INewAzureHDInsightClusterBase.cs @@ -0,0 +1,52 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces +{ + internal interface INewAzureHDInsightClusterBase : IAzureHDInsightClusterCommandBase + { + /// + /// Gets or sets the number of data (worker) nodes to use in the cluster. + /// + int ClusterSizeInNodes { get; set; } + + /// + /// Gets or sets the user credentials (username and password). + /// + PSCredential Credential { get; set; } + + /// + /// Gets or sets the Asv Account key to use for the cluster's default container. + /// + string DefaultStorageAccountKey { get; set; } + + /// + /// Gets or sets the Asv Account name to use for the cluster's default container. + /// + string DefaultStorageAccountName { get; set; } + + /// + /// Gets or sets the container to use for the cluster's default container. + /// + string DefaultStorageContainerName { get; set; } + + /// + /// Gets or sets the version to use for the cluster. + /// + string Version { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/INewAzureHDInsightClusterConfigBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/INewAzureHDInsightClusterConfigBase.cs new file mode 100644 index 000000000000..eec3b73a7fed --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/INewAzureHDInsightClusterConfigBase.cs @@ -0,0 +1,58 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.ClusterProvisioning.Data; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces +{ + internal interface INewAzureHDInsightClusterConfigBase + { + /// + /// Gets or sets the size of the cluster in data nodes. + /// + int ClusterSizeInNodes { get; set; } + + /// + /// Gets or sets the size of the head node VMs. + /// + /// + /// The size of the head node VM. + /// + NodeVMSize HeadNodeVMSize { get; set; } + + /// + /// Gets or sets the type of the cluster. + /// + /// + /// The type of cluster. + /// + ClusterType ClusterType { get; set; } + + /// + /// Gets or sets the virtual network id of the cluster. + /// + /// + /// The GUID of virtual network. + /// + string VirtualNetworkId { get; set; } + + /// + /// Gets or sets the subnet name of the cluster. + /// + /// + /// The name of subnet. + /// + string SubnetName { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/INewAzureHDInsightHiveJobDefinitionBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/INewAzureHDInsightHiveJobDefinitionBase.cs new file mode 100644 index 000000000000..6abb0e1fb3f8 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/INewAzureHDInsightHiveJobDefinitionBase.cs @@ -0,0 +1,40 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces +{ + using System.Management.Automation; + + internal interface INewAzureHDInsightHiveJobDefinitionBase : INewAzureHDInsightJobWithDefinesConfigBase + { + /// + /// Gets or sets the Arguments for the jobDetails. + /// + string[] Arguments { get; set; } + + /// + /// Gets or sets the query file to use for a hive job. + /// + string File { get; set; } + + /// + /// Gets or sets the Query to use for the jobDetails. + /// + string Query { get; set; } + + /// + /// Gets or sets RunAsFileJob. + /// + SwitchParameter RunAsFileJob { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/INewAzureHDInsightJobDefinitionBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/INewAzureHDInsightJobDefinitionBase.cs new file mode 100644 index 000000000000..d65b3d885323 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/INewAzureHDInsightJobDefinitionBase.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces +{ + internal interface INewAzureHDInsightJobConfigBase + { + /// + /// Gets or sets the resources for the jobDetails. + /// + string[] Files { get; set; } + + /// + /// Gets or sets the output location to use for the jobDetails. + /// + string StatusFolder { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/INewAzureHDInsightJobWithParameterConfigBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/INewAzureHDInsightJobWithParameterConfigBase.cs new file mode 100644 index 000000000000..15cf603631e9 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/INewAzureHDInsightJobWithParameterConfigBase.cs @@ -0,0 +1,31 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces +{ + internal interface INewAzureHDInsightJobWithDefinesConfigBase : INewAzureHDInsightJobConfigBase + { + /// + /// Gets or sets the parameters for the jobDetails. + /// + Hashtable Defines { get; set; } + + /// + /// Gets or sets the Mapper. + /// + string JobName { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/INewAzureHDInsightMapReduceJobDefinitionBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/INewAzureHDInsightMapReduceJobDefinitionBase.cs new file mode 100644 index 000000000000..07759f2f52ed --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/INewAzureHDInsightMapReduceJobDefinitionBase.cs @@ -0,0 +1,38 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces +{ + internal interface INewAzureHDInsightMapReduceJobDefinitionBase : INewAzureHDInsightJobWithDefinesConfigBase + { + /// + /// Gets or sets the arguments for the jobDetails. + /// + string[] Arguments { get; set; } + + /// + /// Gets or sets the class name to use for the jobDetails. + /// + string ClassName { get; set; } + + /// + /// Gets or sets the jar file to use for the job. + /// + string JarFile { get; set; } + + /// + /// Gets or sets the lib jars for the jobDetails. + /// + string[] LibJars { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/INewAzureHDInsightPigJobDefinitionBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/INewAzureHDInsightPigJobDefinitionBase.cs new file mode 100644 index 000000000000..a8a3df471712 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/INewAzureHDInsightPigJobDefinitionBase.cs @@ -0,0 +1,33 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces +{ + internal interface INewAzureHDInsightPigJobDefinitionBase : INewAzureHDInsightJobConfigBase + { + /// + /// Gets or sets the arguments for the jobDetails. + /// + string[] Arguments { get; set; } + + /// + /// Gets or sets the query file to use for a pig jobDetails. + /// + string File { get; set; } + + /// + /// Gets or sets the query text to use for a pig jobDetails. + /// + string Query { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/INewAzureHDInsightSqoopJobDefinitionBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/INewAzureHDInsightSqoopJobDefinitionBase.cs new file mode 100644 index 000000000000..b1fce5e1ab35 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/INewAzureHDInsightSqoopJobDefinitionBase.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces +{ + internal interface INewAzureHDInsightSqoopJobDefinitionBase : INewAzureHDInsightJobConfigBase + { + /// + /// Gets or sets the Query to use for the sqoop job. + /// + string Command { get; set; } + + /// + /// Gets or sets the query file to use for a sqoop job. + /// + string File { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/INewAzureHDInsightStreamingJobDefinitionBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/INewAzureHDInsightStreamingJobDefinitionBase.cs new file mode 100644 index 000000000000..8da08dcbf23d --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/INewAzureHDInsightStreamingJobDefinitionBase.cs @@ -0,0 +1,53 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces +{ + internal interface INewAzureHDInsightStreamingJobDefinitionBase : INewAzureHDInsightJobWithDefinesConfigBase + { + /// + /// Gets or sets the arguments for the jobDetails. + /// + string[] Arguments { get; set; } + + /// + /// Gets or sets the command line environment for the mappers or the reducers. + /// + string[] CmdEnv { get; set; } + + /// + /// Gets or sets the Combiner. + /// + string Combiner { get; set; } + + /// + /// Gets or sets the location of the input data in Hadoop. + /// + string InputPath { get; set; } + + /// + /// Gets or sets the Mapper. + /// + string Mapper { get; set; } + + /// + /// Gets or sets the Location in which to store the output data. + /// + string OutputPath { get; set; } + + /// + /// Gets or sets the Reducer. + /// + string Reducer { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/ISetAzureHDInsightDefaultStorageBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/ISetAzureHDInsightDefaultStorageBase.cs new file mode 100644 index 000000000000..9cee70840418 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/ISetAzureHDInsightDefaultStorageBase.cs @@ -0,0 +1,44 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces +{ + /// + /// Represents a command to set a default storage account for an Azure HDInsight config. + /// + internal interface ISetAzureHDInsightDefaultStorageBase + { + /// + /// Gets or sets the AzureHDInsightConfig. + /// + AzureHDInsightConfig Config { get; set; } + + /// + /// Gets or sets the Storage Account Key. + /// + string StorageAccountKey { get; set; } + + /// + /// Gets or sets the Storage Account Name. + /// + string StorageAccountName { get; set; } + + /// + /// Gets or sets the Storage Container Name. + /// + string StorageContainerName { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IStartAzureHDInsightJobBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IStartAzureHDInsightJobBase.cs new file mode 100644 index 000000000000..b6998a8a478b --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IStartAzureHDInsightJobBase.cs @@ -0,0 +1,24 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.BaseInterfaces; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces +{ + internal interface IStartAzureHDInsightJobBase : IAzureHDInsightJobCommandBase + { + AzureHDInsightJobDefinition JobDefinition { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IStopAzureHDInsightJobBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IStopAzureHDInsightJobBase.cs new file mode 100644 index 000000000000..5590085e4f58 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IStopAzureHDInsightJobBase.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.BaseInterfaces; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces +{ + internal interface IStopAzureHDInsightJobBase : IAzureHDInsightJobCommandBase + { + /// + /// Gets or sets the Id of the jobDetails to retrieve. + /// + string JobId { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IWaitAzureHDInsightJobBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IWaitAzureHDInsightJobBase.cs new file mode 100644 index 000000000000..16d97462609a --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/BaseCommandInterfaces/IWaitAzureHDInsightJobBase.cs @@ -0,0 +1,42 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.BaseInterfaces; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces +{ + internal interface IWaitAzureHDInsightJobBase : IAzureHDInsightJobCommandCredentialsBase + { + /// + /// Gets or sets the cluster the job is running on. + /// + string Cluster { get; set; } + + /// + /// Gets or sets the Id of the jobDetails to retrieve. + /// + AzureHDInsightJob Job { get; set; } + + /// + /// Gets or sets the job Id of the jobDetails to retrieve. + /// + string JobId { get; set; } + + /// + /// Gets or sets the timeout duration while waiting for completion. + /// + double WaitTimeoutInSeconds { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/AddAzureHDInsightConfigValuesCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/AddAzureHDInsightConfigValuesCommand.cs new file mode 100644 index 000000000000..99e355626660 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/AddAzureHDInsightConfigValuesCommand.cs @@ -0,0 +1,95 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations +{ + internal class AddAzureHDInsightConfigValuesCommand : AzureHDInsightCommand, IAddAzureHDInsightConfigValuesCommand + { + public AddAzureHDInsightConfigValuesCommand() + { + this.Config = new AzureHDInsightConfig(); + this.Core = new Hashtable(); + this.Yarn = new Hashtable(); + this.Hdfs = new Hashtable(); + this.MapReduce = new AzureHDInsightMapReduceConfiguration(); + this.Hive = new AzureHDInsightHiveConfiguration(); + this.Oozie = new AzureHDInsightOozieConfiguration(); + this.Storm = new Hashtable(); + this.HBase = new AzureHDInsightHBaseConfiguration(); + } + + public AzureHDInsightConfig Config { get; set; } + + public Hashtable Core { get; set; } + + public Hashtable Yarn { get; set; } + + public Hashtable Hdfs { get; set; } + + public AzureHDInsightHiveConfiguration Hive { get; set; } + + public AzureHDInsightMapReduceConfiguration MapReduce { get; set; } + + public AzureHDInsightOozieConfiguration Oozie { get; set; } + + public Hashtable Storm { get; set; } + + public AzureHDInsightHBaseConfiguration HBase { get; set; } + + public override Task EndProcessing() + { + this.Config.CoreConfiguration.AddRange(this.Core.ToKeyValuePairs()); + this.Config.YarnConfiguration.AddRange(this.Yarn.ToKeyValuePairs()); + this.Config.HdfsConfiguration.AddRange(this.Hdfs.ToKeyValuePairs()); + this.Config.MapReduceConfiguration.ConfigurationCollection.AddRange(this.MapReduce.Configuration.ToKeyValuePairs()); + this.Config.MapReduceConfiguration.CapacitySchedulerConfigurationCollection.AddRange( + this.MapReduce.CapacitySchedulerConfiguration.ToKeyValuePairs()); + this.Config.HiveConfiguration.ConfigurationCollection.AddRange(this.Hive.Configuration.ToKeyValuePairs()); + this.Config.OozieConfiguration.ConfigurationCollection.AddRange(this.Oozie.Configuration.ToKeyValuePairs()); + this.Config.StormConfiguration.AddRange(this.Storm.ToKeyValuePairs()); + this.Config.HBaseConfiguration.ConfigurationCollection.AddRange(this.HBase.Configuration.ToKeyValuePairs()); + + if (this.Hive.AdditionalLibraries != null) + { + this.Config.HiveConfiguration.AdditionalLibraries = this.Hive.AdditionalLibraries.ToWabStorageAccountConfiguration(); + } + + if (this.Oozie.AdditionalSharedLibraries != null) + { + this.Config.OozieConfiguration.AdditionalSharedLibraries = this.Oozie.AdditionalSharedLibraries.ToWabStorageAccountConfiguration(); + } + + if (this.Oozie.AdditionalActionExecutorLibraries != null) + { + this.Config.OozieConfiguration.AdditionalActionExecutorLibraries = + this.Oozie.AdditionalActionExecutorLibraries.ToWabStorageAccountConfiguration(); + } + + if (this.HBase.AdditionalLibraries != null) + { + this.Config.HBaseConfiguration.AdditionalLibraries = this.HBase.AdditionalLibraries.ToWabStorageAccountConfiguration(); + } + + this.Output.Add(this.Config); + return TaskEx.FromResult(0); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/AddAzureHDInsightMetastoreCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/AddAzureHDInsightMetastoreCommand.cs new file mode 100644 index 000000000000..14a8d5df1cdc --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/AddAzureHDInsightMetastoreCommand.cs @@ -0,0 +1,72 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations +{ + internal class AddAzureHDInsightMetastoreCommand : AzureHDInsightCommand, IAddAzureHDInsightMetastoreCommand + { + private readonly AzureHDInsightMetastore metastore = new AzureHDInsightMetastore(); + + public AddAzureHDInsightMetastoreCommand() + { + this.Config = new AzureHDInsightConfig(); + } + + public AzureHDInsightConfig Config { get; set; } + + public PSCredential Credential + { + get { return this.metastore.Credential; } + set { this.metastore.Credential = value; } + } + + public string DatabaseName + { + get { return this.metastore.DatabaseName; } + set { this.metastore.DatabaseName = value; } + } + + public AzureHDInsightMetastoreType MetastoreType + { + get { return this.metastore.MetastoreType; } + set { this.metastore.MetastoreType = value; } + } + + public string SqlAzureServerName + { + get { return this.metastore.SqlAzureServerName; } + set { this.metastore.SqlAzureServerName = value; } + } + + public override Task EndProcessing() + { + if (this.MetastoreType == AzureHDInsightMetastoreType.HiveMetastore) + { + this.Config.HiveMetastore = this.metastore; + } + else + { + this.Config.OozieMetastore = this.metastore; + } + this.Output.Add(this.Config); + return TaskEx.FromResult(0); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/AddAzureHDInsightScriptActionCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/AddAzureHDInsightScriptActionCommand.cs new file mode 100644 index 000000000000..3da264971623 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/AddAzureHDInsightScriptActionCommand.cs @@ -0,0 +1,66 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations +{ + using CommandInterfaces; + using DataObjects; + using GetAzureHDInsightClusters; + using Microsoft.WindowsAzure.Management.HDInsight.ClusterProvisioning.Data; + using System; + using System.Management.Automation; + using System.Threading.Tasks; + + internal class AddAzureHDInsightScriptActionCommand : AzureHDInsightCommand, IAddAzureHDInsightScriptActionCommand + { + private readonly AzureHDInsightScriptAction scriptAction = new AzureHDInsightScriptAction(); + + public AddAzureHDInsightScriptActionCommand() + { + this.Config = new AzureHDInsightConfig(); + } + + public AzureHDInsightConfig Config { get; set; } + + public string Name + { + get { return this.scriptAction.Name; } + set { this.scriptAction.Name = value; } + } + + public ClusterNodeType[] ClusterRoleCollection + { + get { return this.scriptAction.ClusterRoleCollection; } + set { this.scriptAction.ClusterRoleCollection = value; } + } + + public Uri Uri + { + get { return this.scriptAction.Uri; } + set { this.scriptAction.Uri = value; } + } + + public string Parameters + { + get { return this.scriptAction.Parameters; } + set { this.scriptAction.Parameters = value; } + } + + public override Task EndProcessing() + { + this.Config.ConfigActions.Add(this.scriptAction); + this.Output.Add(this.Config); + return TaskEx.FromResult(0); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/AddAzureHDInsightStorageCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/AddAzureHDInsightStorageCommand.cs new file mode 100644 index 000000000000..25a1031b0912 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/AddAzureHDInsightStorageCommand.cs @@ -0,0 +1,68 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations +{ + /// + /// Adds a storage account to the HDInsight cluster configuration. + /// + internal class AddAzureHDInsightStorageCommand : IAddAzureHDInsightStorageCommand + { + /// + /// Initializes a new instance of the AddAzureHDInsightStorageCommand class. + /// + public AddAzureHDInsightStorageCommand() + { + this.Config = new AzureHDInsightConfig(); + this.Output = new Collection(); + } + + public CancellationToken CancellationToken + { + get { return CancellationToken.None; } + } + + public AzureHDInsightConfig Config { get; set; } + + public ICollection Output { get; private set; } + + public string StorageAccountKey { get; set; } + + public string StorageAccountName { get; set; } + + public AzureSubscription CurrentSubscription { get; set; } + + public void Cancel() + { + } + + public Task EndProcessing() + { + var account = new AzureHDInsightStorageAccount(); + account.StorageAccountName = this.StorageAccountName; + account.StorageAccountKey = this.StorageAccountKey; + this.Config.AdditionalStorageAccounts.Add(account); + this.Output.Add(this.Config); + return TaskEx.FromResult(0); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/AzureHDInsightStorageHandler.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/AzureHDInsightStorageHandler.cs new file mode 100644 index 000000000000..2fcfe8eab15a --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/AzureHDInsightStorageHandler.cs @@ -0,0 +1,97 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.IO; +using System.Linq; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; +using Microsoft.WindowsAzure.Storage.Auth; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations +{ + internal class AzureHDInsightStorageHandler : IAzureHDInsightStorageHandler + { + private const string ProductionStorageAccountEndpointUriTemplate = "http://{0}.blob.core.windows.net/"; + private const string WabsProtocol = "wasb"; + private readonly WabStorageAccountConfiguration storageAccountConfiguration; + + public AzureHDInsightStorageHandler(WabStorageAccountConfiguration storageAccountConfiguration) + { + this.storageAccountConfiguration = storageAccountConfiguration; + } + + public Uri GetStoragePath(Uri httpPath) + { + return GetWasbStoragePath(httpPath); + } + + public void UploadFile(Uri path, Stream contents) + { + CloudBlobClient client = this.GetStorageClient(); + CloudBlobContainer container = client.GetContainerReference(this.storageAccountConfiguration.Container); + CloudBlockBlob blobReference = container.GetBlockBlobReference(path.OriginalString); + blobReference.UploadFromStream(contents); + } + + internal static Uri GetWasbStoragePath(Uri httpPath) + { + httpPath.ArgumentNotNull("httpPath"); + + if ( + !(string.Equals(httpPath.Scheme, Uri.UriSchemeHttp, StringComparison.OrdinalIgnoreCase) || + string.Equals(httpPath.Scheme, Uri.UriSchemeHttps, StringComparison.OrdinalIgnoreCase))) + { + throw new ArgumentException("httpPath should have a uri scheme of http", "httpPath"); + } + + int segmentTakeCount = 1; + string containerName = httpPath.Segments.First(); + if (containerName == "/" && httpPath.Segments.Length > segmentTakeCount) + { + containerName = httpPath.Segments.Skip(segmentTakeCount).FirstOrDefault(); + segmentTakeCount++; + } + + string asvPath = string.Format( + CultureInfo.InvariantCulture, + "{0}://{1}@{2}/{3}", + WabsProtocol, + containerName.TrimEnd('/'), + httpPath.Host, + string.Join(string.Empty, httpPath.Segments.Skip(segmentTakeCount))); + return new Uri(asvPath); + } + + private CloudBlobClient GetStorageClient() + { + string storageRoot = this.storageAccountConfiguration.Name; + if (storageRoot.Contains(".")) + { + storageRoot = string.Format(CultureInfo.InvariantCulture, "http://{0}", storageRoot); + } + else + { + storageRoot = string.Format(CultureInfo.InvariantCulture, ProductionStorageAccountEndpointUriTemplate, storageRoot); + } + var storageCredentials = new StorageCredentials( + this.storageAccountConfiguration.Name.Split('.').First(), this.storageAccountConfiguration.Key); + var storageAccountUri = new Uri(storageRoot); + var blobClient = new CloudBlobClient(storageAccountUri, storageCredentials); + return blobClient; + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/AzureHDInsightStorageHandlerFactory.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/AzureHDInsightStorageHandlerFactory.cs new file mode 100644 index 000000000000..e92ba62b4f18 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/AzureHDInsightStorageHandlerFactory.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations +{ + internal class AzureHDInsightStorageHandlerFactory : IAzureHDInsightStorageHandlerFactory + { + public IAzureHDInsightStorageHandler Create(WabStorageAccountConfiguration storageAccountConfiguration) + { + return new AzureHDInsightStorageHandler(storageAccountConfiguration); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/GatewayUriResolver.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/GatewayUriResolver.cs new file mode 100644 index 000000000000..8049cfd6a144 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/GatewayUriResolver.cs @@ -0,0 +1,117 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations +{ + /// + /// This type generates the gateway Uri for an AzureHDInsight cluster given its DNS Name or Endpoint uri. + /// + internal static class GatewayUriResolver + { + private const int AzureGatewayUriPortNumberVersion15AndBelow = 563; + private const int AzureGatewayUriPortNumberVersion16AndAbove = 443; + private const string AzureWellKnownClusterSuffix = ".azurehdinsight.net"; + private static readonly Version unknownVersion = new Version(0, 0, 0, 0); + private static readonly Version version20 = new Version(2, 0, 0, 0); + + /// + /// Gets the Gateway Uri for Http Services accessible on an Azure HDInsight cluster. + /// + /// The DNS Name or Endpoint uri of an Azure HDInsight cluster. + /// The version of the HDInsight cluster. + /// The Gateway Uri for Http Services accessible on an Azure HDInsight cluster. + public static Uri GetGatewayUri(string clusterDnsNameOrEndpoint, Version version) + { + clusterDnsNameOrEndpoint.ArgumentNotNullOrEmpty("clusterDnsNameOrUri"); + string computedEndpoint; + string originalScheme = string.Empty; + int index = clusterDnsNameOrEndpoint.IndexOf("://", StringComparison.OrdinalIgnoreCase); + if (index >= 0) + { + computedEndpoint = "http://" + clusterDnsNameOrEndpoint.Substring(index + 3); + originalScheme = clusterDnsNameOrEndpoint.Substring(0, index); + } + else + { + computedEndpoint = "http://" + clusterDnsNameOrEndpoint; + originalScheme = "http"; + } + + Uri tempUri; + + if (!Uri.TryCreate(computedEndpoint, UriKind.Absolute, out tempUri)) + { + throw new NotSupportedException("Unable to compute Uri for given endpoint"); + } + + if (tempUri.Port == 80) + { + if (tempUri.Host == "localhost") + { + return new Uri(originalScheme + "://" + tempUri.Host + ":50111"); + } + + tempUri = new Uri("https://" + tempUri.Host); + } + + if (tempUri.Host == "localhost") + { + tempUri = new Uri(originalScheme + "://" + tempUri.Host + ":" + tempUri.Port); + return tempUri; + } + + if (tempUri.Scheme != "https") + { + tempUri = new Uri("https://" + tempUri.Host + ":" + tempUri.Port); + } + + if (!tempUri.Host.Contains(".")) + { + tempUri = new Uri(tempUri.Scheme + "://" + tempUri.Host + AzureWellKnownClusterSuffix + ":" + tempUri.Port); + } + + if (version > unknownVersion) + { + int gatewayPort = GetGatewayPort(version); + tempUri = new Uri(tempUri.Scheme + "://" + tempUri.Host + ":" + gatewayPort); + } + + return tempUri; + } + + /// + /// Gets the Gateway Uri for Http Services accessible on an Azure HDInsight cluster. + /// + /// The DNS Name or Endpoint uri of an Azure HDInsight cluster. + /// The Gateway Uri for Http Services accessible on an Azure HDInsight cluster. + public static Uri GetGatewayUri(string clusterDnsNameOrEndpoint) + { + clusterDnsNameOrEndpoint.ArgumentNotNullOrEmpty("clusterDnsNameOrUri"); + return GetGatewayUri(clusterDnsNameOrEndpoint, unknownVersion); + } + + private static int GetGatewayPort(Version version) + { + if (version.Major == version20.Major && version.Minor == version20.Minor) + { + return AzureGatewayUriPortNumberVersion15AndBelow; + } + + return AzureGatewayUriPortNumberVersion16AndAbove; + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/GetAzureHDInsightClusterCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/GetAzureHDInsightClusterCommand.cs new file mode 100644 index 000000000000..16a14fc71158 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/GetAzureHDInsightClusterCommand.cs @@ -0,0 +1,43 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations +{ + internal class GetAzureHDInsightClusterCommand : AzureHDInsightClusterCommand, IGetAzureHDInsightClusterCommand + { + public override async Task EndProcessing() + { + IHDInsightClient client = this.GetClient(); + if (!string.IsNullOrWhiteSpace(this.Name)) + { + var azureCluster = await client.GetClusterAsync(this.Name); + if (azureCluster != null) + { + this.Output.Add(new AzureHDInsightCluster(azureCluster)); + } + } + else + { + this.Output.AddRange(client.ListClusters().Select(c => new AzureHDInsightCluster(c))); + } + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/GetAzureHDInsightJobCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/GetAzureHDInsightJobCommand.cs new file mode 100644 index 000000000000..345c551d68bf --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/GetAzureHDInsightJobCommand.cs @@ -0,0 +1,46 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Threading.Tasks; +using Microsoft.Hadoop.Client; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations +{ + internal class GetAzureHDInsightJobCommand : AzureHDInsightJobCommand, IGetAzureHDInsightJobCommand + { + public override async Task EndProcessing() + { + IJobSubmissionClient client = this.GetClient(this.Cluster); + this.Output.Clear(); + if (string.IsNullOrEmpty(this.JobId)) + { + var jobsList = await client.ListJobsAsync(); + this.Output.AddRange(jobsList.Jobs.Select(hadoopJob => new AzureHDInsightJob(hadoopJob, this.Cluster))); + } + else + { + var jobDetail = await client.GetJobAsync(this.JobId); + if (jobDetail != null) + { + this.Output.Add(new AzureHDInsightJob(jobDetail, this.Cluster)); + } + } + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/GetAzureHDInsightJobOutputCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/GetAzureHDInsightJobOutputCommand.cs new file mode 100644 index 000000000000..dd2c2c3cb38b --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/GetAzureHDInsightJobOutputCommand.cs @@ -0,0 +1,84 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.IO; +using System.Text; +using System.Threading.Tasks; +using Microsoft.Hadoop.Client; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations +{ + internal class GetAzureHDInsightJobOutputCommand : AzureHDInsightJobCommand, IGetAzureHDInsightJobOutputCommand + { + private const string TaskLogDownloadCompleteTemplate = "Task logs for jobDetails {0} were Successfully downloaded to {1}"; + + public GetAzureHDInsightJobOutputCommand() + { + this.OutputType = JobOutputType.StandardOutput; + } + + /// + public JobOutputType OutputType { get; set; } + + /// + public string TaskLogsDirectory { get; set; } + + /// + public override Task EndProcessing() + { + return this.GetJobOutput(this.JobId); + } + + [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", + Justification = "The only stream we're not disposing is created when the task logs are downloaded.")] + private async Task GetJobOutput(string jobId) + { + this.JobId.ArgumentNotNullOrEmpty("jobId"); + Stream outputStream = null; + + IJobSubmissionClient hadoopClient = this.GetClient(this.Cluster); + switch (this.OutputType) + { + case JobOutputType.StandardError: + outputStream = await hadoopClient.GetJobErrorLogsAsync(jobId); + break; + case JobOutputType.StandardOutput: + outputStream = await hadoopClient.GetJobOutputAsync(jobId); + break; + case JobOutputType.TaskSummary: + outputStream = await hadoopClient.GetJobTaskLogSummaryAsync(jobId); + break; + case JobOutputType.TaskLogs: + this.TaskLogsDirectory.ArgumentNotNullOrEmpty("TaskLogsDirectory"); + await hadoopClient.DownloadJobTaskLogsAsync(jobId, this.TaskLogsDirectory); + var messageStream = new MemoryStream(); + string downloadCompleteMessage = string.Format( + CultureInfo.InvariantCulture, TaskLogDownloadCompleteTemplate, this.JobId, this.TaskLogsDirectory); + byte[] messageBytes = Encoding.UTF8.GetBytes(downloadCompleteMessage); + messageStream.Write(messageBytes, 0, messageBytes.Length); + messageStream.Seek(0, SeekOrigin.Begin); + outputStream = messageStream; + break; + } + + this.Output.Add(outputStream); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/GetAzureHDInsightPropertiesCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/GetAzureHDInsightPropertiesCommand.cs new file mode 100644 index 000000000000..320b9298a962 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/GetAzureHDInsightPropertiesCommand.cs @@ -0,0 +1,57 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations +{ + internal class GetAzureHDInsightPropertiesCommand : AzureHDInsightClusterCommand, IGetAzureHDInsightPropertiesCommand + { + private const string ContainersCountKey = "CONTAINERS_Count"; + private const string CoresUsedKey = "CONTAINERS_CoresUsed"; + private const string MaxCoresAllowedKey = "CONTAINERS_MaxCoresAllowed"; + + public override async Task EndProcessing() + { + IHDInsightClient client = this.GetClient(); + var capabilities = await client.ListResourceProviderPropertiesAsync(); + capabilities = capabilities.ToList(); + var azureCapabilities = new AzureHDInsightCapabilities(capabilities); + azureCapabilities.Versions = await client.ListAvailableVersionsAsync(); + azureCapabilities.Locations = await client.ListAvailableLocationsAsync(); + azureCapabilities.ClusterCount = this.GetIntCapability(capabilities, ContainersCountKey); + azureCapabilities.CoresUsed = this.GetIntCapability(capabilities, CoresUsedKey); + azureCapabilities.MaxCoresAllowed = this.GetIntCapability(capabilities, MaxCoresAllowedKey); + this.Output.Add(azureCapabilities); + } + + private int GetIntCapability(IEnumerable> capabilities, string capabilityName) + { + int capabilityValue = 0; + KeyValuePair capablity = capabilities.FirstOrDefault(cap => cap.Key == capabilityName); + if (int.TryParse(capablity.Value, NumberStyles.Any, CultureInfo.InvariantCulture, out capabilityValue)) + { + return capabilityValue; + } + + return 0; + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/InvokeHiveCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/InvokeHiveCommand.cs new file mode 100644 index 000000000000..d91c877a684b --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/InvokeHiveCommand.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations +{ + internal class InvokeHiveCommand : InvokeAzureHDInsightJobCommandBase, IInvokeHiveCommand + { + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/ManageAzureHDInsightHttpAccessCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/ManageAzureHDInsightHttpAccessCommand.cs new file mode 100644 index 000000000000..1186d60bdeec --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/ManageAzureHDInsightHttpAccessCommand.cs @@ -0,0 +1,60 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations +{ + internal class ManageAzureHDInsightHttpAccessCommand : AzureHDInsightClusterCommand, IManageAzureHDInsightHttpAccessCommand + { + /// + public PSCredential Credential { get; set; } + + /// + public bool Enable { get; set; } + + /// + public string Location { get; set; } + + /// + public override async Task EndProcessing() + { + this.Name.ArgumentNotNullOrEmpty("Name"); + this.Location.ArgumentNotNullOrEmpty("Location"); + + IHDInsightClient client = this.GetClient(); + if (this.Enable) + { + this.Credential.ArgumentNotNull("Credential"); + await client.EnableHttpAsync(this.Name, this.Location, this.Credential.UserName, this.Credential.GetCleartextPassword()); + } + else + { + await client.DisableHttpAsync(this.Name, this.Location); + } + + var getCommand = ServiceLocator.Instance.Locate().CreateGet(); + getCommand.CurrentSubscription = this.CurrentSubscription; + getCommand.Name = this.Name; + await getCommand.EndProcessing(); + this.Output.AddRange(getCommand.Output); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/NewAzureHDInsightClusterCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/NewAzureHDInsightClusterCommand.cs new file mode 100644 index 000000000000..60b8716a808d --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/NewAzureHDInsightClusterCommand.cs @@ -0,0 +1,182 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Management.HDInsight.ClusterProvisioning.Data; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations +{ + internal class NewAzureHDInsightClusterCommand : AzureHDInsightClusterCommand, INewAzureHDInsightClusterCommand + { + public NewAzureHDInsightClusterCommand() + { + this.AdditionalStorageAccounts = new List(); + this.ConfigActions = new List(); + this.CoreConfiguration = new ConfigValuesCollection(); + this.YarnConfiguration = new ConfigValuesCollection(); + this.HdfsConfiguration = new ConfigValuesCollection(); + this.MapReduceConfiguration = new MapReduceConfiguration(); + this.HiveConfiguration = new HiveConfiguration(); + this.OozieConfiguration = new OozieConfiguration(); + this.StormConfiguration = new ConfigValuesCollection(); + this.HBaseConfiguration = new HBaseConfiguration(); + } + + public ICollection AdditionalStorageAccounts { get; private set; } + + /// + public int ClusterSizeInNodes { get; set; } + + /// + public NodeVMSize HeadNodeSize { get; set; } + + /// + public ConfigValuesCollection CoreConfiguration { get; set; } + + /// + public ConfigValuesCollection YarnConfiguration { get; set; } + + /// + public PSCredential Credential { get; set; } + + /// + public string DefaultStorageAccountKey { get; set; } + + /// + public string DefaultStorageAccountName { get; set; } + + /// + public string DefaultStorageContainerName { get; set; } + + /// + public ConfigValuesCollection HdfsConfiguration { get; set; } + + /// + public HiveConfiguration HiveConfiguration { get; set; } + + public AzureHDInsightMetastore HiveMetastore { get; set; } + + /// + public string Location { get; set; } + + /// + public bool EnableHighAvailability { get; set; } + + /// + public MapReduceConfiguration MapReduceConfiguration { get; set; } + + /// + public OozieConfiguration OozieConfiguration { get; set; } + + public AzureHDInsightMetastore OozieMetastore { get; set; } + + /// + public ConfigValuesCollection StormConfiguration { get; set; } + + /// + public HBaseConfiguration HBaseConfiguration { get; set; } + + public ICollection ConfigActions { get; set; } + + public ClusterState State { get; private set; } + + public ClusterType ClusterType { get; set; } + + public string VirtualNetworkId { get; set; } + + public string SubnetName { get; set; } + + /// + public string Version { get; set; } + + public override async Task EndProcessing() + { + IHDInsightClient client = this.GetClient(); + client.ClusterProvisioning += this.ClientOnClusterProvisioning; + ClusterCreateParameters createClusterRequest = this.GetClusterCreateParameters(); + var cluster = await client.CreateClusterAsync(createClusterRequest); + this.Output.Add(new AzureHDInsightCluster(cluster)); + } + + internal ClusterCreateParameters GetClusterCreateParameters() + { + var createClusterRequest = new ClusterCreateParameters(); + createClusterRequest.Name = this.Name; + createClusterRequest.Version = this.Version; + createClusterRequest.Location = this.Location; + createClusterRequest.CoreConfiguration.AddRange(this.CoreConfiguration); + createClusterRequest.YarnConfiguration.AddRange(this.YarnConfiguration); + createClusterRequest.HdfsConfiguration.AddRange(this.HdfsConfiguration); + createClusterRequest.MapReduceConfiguration.ConfigurationCollection.AddRange(this.MapReduceConfiguration.ConfigurationCollection); + createClusterRequest.MapReduceConfiguration.CapacitySchedulerConfigurationCollection.AddRange( + this.MapReduceConfiguration.CapacitySchedulerConfigurationCollection); + createClusterRequest.HiveConfiguration.AdditionalLibraries = this.HiveConfiguration.AdditionalLibraries; + createClusterRequest.HiveConfiguration.ConfigurationCollection.AddRange(this.HiveConfiguration.ConfigurationCollection); + createClusterRequest.OozieConfiguration.ConfigurationCollection.AddRange(this.OozieConfiguration.ConfigurationCollection); + createClusterRequest.OozieConfiguration.AdditionalSharedLibraries = this.OozieConfiguration.AdditionalSharedLibraries; + createClusterRequest.OozieConfiguration.AdditionalActionExecutorLibraries = this.OozieConfiguration.AdditionalActionExecutorLibraries; + createClusterRequest.StormConfiguration.AddRange(this.StormConfiguration); + createClusterRequest.HBaseConfiguration.AdditionalLibraries = this.HBaseConfiguration.AdditionalLibraries; + createClusterRequest.HBaseConfiguration.ConfigurationCollection.AddRange(this.HBaseConfiguration.ConfigurationCollection); + createClusterRequest.HeadNodeSize = this.HeadNodeSize; + createClusterRequest.DefaultStorageAccountName = this.DefaultStorageAccountName; + createClusterRequest.DefaultStorageAccountKey = this.DefaultStorageAccountKey; + createClusterRequest.DefaultStorageContainer = this.DefaultStorageContainerName; + createClusterRequest.UserName = this.Credential.UserName; + createClusterRequest.Password = this.Credential.GetCleartextPassword(); + createClusterRequest.ClusterSizeInNodes = this.ClusterSizeInNodes; + createClusterRequest.ClusterType = this.ClusterType; + if (!string.IsNullOrEmpty(this.VirtualNetworkId)) + { + createClusterRequest.VirtualNetworkId = this.VirtualNetworkId; + } + if (!string.IsNullOrEmpty(this.SubnetName)) + { + createClusterRequest.SubnetName = this.SubnetName; + } + createClusterRequest.AdditionalStorageAccounts.AddRange( + this.AdditionalStorageAccounts.Select(act => new WabStorageAccountConfiguration(act.StorageAccountName, act.StorageAccountKey))); + createClusterRequest.ConfigActions.AddRange(this.ConfigActions.Select(ca => ca.ToSDKConfigAction())); + if (this.HiveMetastore.IsNotNull()) + { + createClusterRequest.HiveMetastore = new Metastore( + this.HiveMetastore.SqlAzureServerName, + this.HiveMetastore.DatabaseName, + this.HiveMetastore.Credential.UserName, + this.HiveMetastore.Credential.GetCleartextPassword()); + } + if (this.OozieMetastore.IsNotNull()) + { + createClusterRequest.OozieMetastore = new Metastore( + this.OozieMetastore.SqlAzureServerName, + this.OozieMetastore.DatabaseName, + this.OozieMetastore.Credential.UserName, + this.OozieMetastore.Credential.GetCleartextPassword()); + } + return createClusterRequest; + } + + private void ClientOnClusterProvisioning(object sender, ClusterProvisioningStatusEventArgs clusterProvisioningStatusEventArgs) + { + this.State = clusterProvisioningStatusEventArgs.State; + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/NewAzureHDInsightClusterConfigCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/NewAzureHDInsightClusterConfigCommand.cs new file mode 100644 index 000000000000..1d61c95d12e4 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/NewAzureHDInsightClusterConfigCommand.cs @@ -0,0 +1,66 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Management.HDInsight.ClusterProvisioning.Data; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations +{ + internal class NewAzureHDInsightClusterConfigCommand : AzureHDInsightCommand, INewAzureHDInsightClusterConfigCommand + { + private readonly AzureHDInsightConfig config = new AzureHDInsightConfig(); + + /// + /// Gets or sets the size of the cluster in worker nodes. + /// + public int ClusterSizeInNodes + { + get { return this.config.ClusterSizeInNodes; } + set { this.config.ClusterSizeInNodes = value; } + } + + public NodeVMSize HeadNodeVMSize + { + get { return this.config.HeadNodeVMSize; } + set { this.config.HeadNodeVMSize = value; } + } + + public ClusterType ClusterType + { + get { return this.config.ClusterType; } + set { this.config.ClusterType = value; } + } + + public string VirtualNetworkId + { + get { return this.config.VirtualNetworkId; } + set { this.config.VirtualNetworkId = value; } + } + + public string SubnetName + { + get { return this.config.SubnetName; } + set { this.config.SubnetName = value; } + } + + public override Task EndProcessing() + { + this.Output.Add(this.config); + return TaskEx.FromResult(0); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/NewAzureHDInsightHiveJobDefinitionCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/NewAzureHDInsightHiveJobDefinitionCommand.cs new file mode 100644 index 000000000000..78e820e120b7 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/NewAzureHDInsightHiveJobDefinitionCommand.cs @@ -0,0 +1,121 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Management.Automation; +using System.Threading.Tasks; +using Microsoft.Hadoop.Client; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations +{ + internal class NewAzureHDInsightHiveJobDefinitionCommand + : AzureHDInsightNewJobDefinitionCommand, INewAzureHDInsightHiveJobDefinitionCommand + { + private readonly HiveJobCreateParameters hiveJobDefinition = new HiveJobCreateParameters(); + private string[] args = new string[] { }; + private Hashtable defines = new Hashtable(); + private string[] resources = new string[] { }; + + public string[] Arguments + { + get { return this.args; } + set { this.args = value; } + } + + public override Hashtable Defines + { + get { return this.defines; } + set { this.defines = value; } + } + + public string File + { + get { return this.hiveJobDefinition.File; } + set { this.hiveJobDefinition.File = value; } + } + + public override string[] Files + { + get { return this.resources; } + set { this.resources = value; } + } + + public string JobName + { + get { return this.hiveJobDefinition.JobName; } + set { this.hiveJobDefinition.JobName = value; } + } + + public string Query + { + get { return this.hiveJobDefinition.Query; } + set { this.hiveJobDefinition.Query = value; } + } + + public SwitchParameter RunAsFileJob + { + get { return this.hiveJobDefinition.RunAsFileJob; } + set { this.hiveJobDefinition.RunAsFileJob = true; } + } + + public override string StatusFolder + { + get { return this.hiveJobDefinition.StatusFolder; } + set { this.hiveJobDefinition.StatusFolder = value; } + } + + public override Task EndProcessing() + { + if (this.Query.IsNotNullOrEmpty() && this.File.IsNotNullOrEmpty()) + { + throw new ArgumentException("Only Query or File can be specified, not both."); + } + + var hiveJob = new AzureHDInsightHiveJobDefinition(); + hiveJob.JobName = this.JobName; + hiveJob.Query = this.Query; + hiveJob.File = this.File; + hiveJob.RunAsFileJob = this.RunAsFileJob.ToBool(); + + if (hiveJob.Query.IsNullOrEmpty()) + { + hiveJob.File.ArgumentNotNullOrEmpty("File"); + } + + hiveJob.StatusFolder = this.StatusFolder; + if (this.Defines.IsNotNull()) + { + hiveJob.Defines.AddRange(this.Defines.ToKeyValuePairs()); + } + + if (this.Files.IsNotNull()) + { + hiveJob.Files.AddRange(this.Files); + } + + if (this.Arguments.IsNotNull()) + { + hiveJob.Arguments.AddRange(this.Arguments); + } + + this.Output.Add(hiveJob); + return TaskEx.FromResult(0); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/NewAzureHDInsightMapReduceJobDefinitionCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/NewAzureHDInsightMapReduceJobDefinitionCommand.cs new file mode 100644 index 000000000000..2c91c990751e --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/NewAzureHDInsightMapReduceJobDefinitionCommand.cs @@ -0,0 +1,116 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections; +using System.Threading.Tasks; +using Microsoft.Hadoop.Client; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations +{ + internal class NewAzureHDInsightMapReduceJobJobDefinitionCommand + : AzureHDInsightNewJobDefinitionCommand, INewAzureHDInsightMapReduceJobDefinitionCommand + { + private readonly MapReduceJobCreateParameters mapReduceJobDefinition = new MapReduceJobCreateParameters(); + private string[] arguments = new string[] { }; + private Hashtable defines = new Hashtable(); + private string[] libjars = new string[] { }; + private string[] resources = new string[] { }; + + public string[] Arguments + { + get { return this.arguments; } + set { this.arguments = value; } + } + + public string ClassName + { + get { return this.mapReduceJobDefinition.ClassName; } + set { this.mapReduceJobDefinition.ClassName = value; } + } + + public override Hashtable Defines + { + get { return this.defines; } + set { this.defines = value; } + } + + public override string[] Files + { + get { return this.resources; } + set { this.resources = value; } + } + + public string JarFile + { + get { return this.mapReduceJobDefinition.JarFile; } + set { this.mapReduceJobDefinition.JarFile = value; } + } + + public string JobName + { + get { return this.mapReduceJobDefinition.JobName; } + set { this.mapReduceJobDefinition.JobName = value; } + } + + public string[] LibJars + { + get { return this.libjars; } + set { this.libjars = value; } + } + + public override string StatusFolder + { + get { return this.mapReduceJobDefinition.StatusFolder; } + set { this.mapReduceJobDefinition.StatusFolder = value; } + } + + public override Task EndProcessing() + { + this.ClassName.ArgumentNotNullOrEmpty("ClassName"); + this.JarFile.ArgumentNotNullOrEmpty("JarFile"); + + var mapReduceJob = new AzureHDInsightMapReduceJobDefinition(); + mapReduceJob.ClassName = this.ClassName; + mapReduceJob.JarFile = this.JarFile; + mapReduceJob.JobName = this.JobName; + mapReduceJob.StatusFolder = this.StatusFolder; + if (this.Defines.IsNotNull()) + { + mapReduceJob.Defines.AddRange(this.Defines.ToKeyValuePairs()); + } + + if (this.Arguments.IsNotNull()) + { + mapReduceJob.Arguments.AddRange(this.Arguments); + } + + if (this.Files.IsNotNull()) + { + mapReduceJob.Files.AddRange(this.Files); + } + + if (this.LibJars.IsNotNull()) + { + mapReduceJob.LibJars.AddRange(this.LibJars); + } + + this.Output.Add(mapReduceJob); + return TaskEx.FromResult(0); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/NewAzureHDInsightPigJobDefinitionCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/NewAzureHDInsightPigJobDefinitionCommand.cs new file mode 100644 index 000000000000..8a22685b23f8 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/NewAzureHDInsightPigJobDefinitionCommand.cs @@ -0,0 +1,91 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Threading.Tasks; +using Microsoft.Hadoop.Client; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations +{ + internal class NewAzureHDInsightPigJobDefinitionCommand + : AzureHDInsightNewJobDefinitionCommand, INewAzureHDInsightPigJobDefinitionCommand + { + private readonly PigJobCreateParameters pigJobDefinition = new PigJobCreateParameters(); + private Hashtable defines = new Hashtable(); + private string[] resources = new string[] { }; + + public string[] Arguments { get; set; } + + public override Hashtable Defines + { + get { return this.defines; } + set { this.defines = value; } + } + + public string File + { + get { return this.pigJobDefinition.File; } + set { this.pigJobDefinition.File = value; } + } + + public override string[] Files + { + get { return this.resources; } + set { this.resources = value; } + } + + public string Query + { + get { return this.pigJobDefinition.Query; } + set { this.pigJobDefinition.Query = value; } + } + + public override string StatusFolder + { + get { return this.pigJobDefinition.StatusFolder; } + set { this.pigJobDefinition.StatusFolder = value; } + } + + public override Task EndProcessing() + { + if (this.Query.IsNotNullOrEmpty() && this.File.IsNotNullOrEmpty()) + { + throw new ArgumentException("Only Query or File can be specified, not both."); + } + + var pigJob = new AzureHDInsightPigJobDefinition(); + pigJob.Query = this.Query; + pigJob.File = this.File; + pigJob.StatusFolder = this.StatusFolder; + + if (this.Arguments.IsNotNull()) + { + pigJob.Arguments.AddRange(this.Arguments); + } + + if (this.Files.IsNotNull()) + { + pigJob.Files.AddRange(this.Files); + } + + this.Output.Add(pigJob); + return TaskEx.FromResult(0); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/NewAzureHDInsightSqoopJobDefinitionCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/NewAzureHDInsightSqoopJobDefinitionCommand.cs new file mode 100644 index 000000000000..c844c6abfd54 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/NewAzureHDInsightSqoopJobDefinitionCommand.cs @@ -0,0 +1,84 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Threading.Tasks; +using Microsoft.Hadoop.Client; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations +{ + internal class NewAzureHDInsightSqoopJobDefinitionCommand + : AzureHDInsightNewJobDefinitionCommand, INewAzureHDInsightSqoopJobDefinitionCommand + { + private readonly SqoopJobCreateParameters sqoopJobDefinition = new SqoopJobCreateParameters(); + private string[] resources = new string[] { }; + + public string Command + { + get { return this.sqoopJobDefinition.Command; } + set { this.sqoopJobDefinition.Command = value; } + } + + public override Hashtable Defines { get; set; } + + public string File + { + get { return this.sqoopJobDefinition.File; } + set { this.sqoopJobDefinition.File = value; } + } + + public override string[] Files + { + get { return this.resources; } + set { this.resources = value; } + } + + public override string StatusFolder + { + get { return this.sqoopJobDefinition.StatusFolder; } + set { this.sqoopJobDefinition.StatusFolder = value; } + } + + public override Task EndProcessing() + { + if (this.Command.IsNotNullOrEmpty() && this.File.IsNotNullOrEmpty()) + { + throw new ArgumentException("Only Query or File can be specified, not both."); + } + + var sqoopJob = new AzureHDInsightSqoopJobDefinition(); + sqoopJob.Command = this.Command; + sqoopJob.File = this.File; + sqoopJob.StatusFolder = this.StatusFolder; + + if (sqoopJob.Command.IsNullOrEmpty()) + { + sqoopJob.File.ArgumentNotNullOrEmpty("File"); + } + + if (this.Files.IsNotNull()) + { + sqoopJob.Files.AddRange(this.Files); + } + + this.Output.Add(sqoopJob); + return TaskEx.FromResult(0); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/NewAzureHDInsightStreamingJobDefinitionCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/NewAzureHDInsightStreamingJobDefinitionCommand.cs new file mode 100644 index 000000000000..39247b8e7d83 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/NewAzureHDInsightStreamingJobDefinitionCommand.cs @@ -0,0 +1,99 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations +{ + internal class NewAzureHDInsightStreamingJobDefinitionCommand + : AzureHDInsightNewJobDefinitionCommand, INewAzureHDInsightStreamingJobDefinitionCommand + { + /// + public string[] Arguments { get; set; } + + /// + public string[] CmdEnv { get; set; } + + /// + public string Combiner { get; set; } + + /// + public override Hashtable Defines { get; set; } + + /// + public override string[] Files { get; set; } + + /// + public string InputPath { get; set; } + + /// + public string JobName { get; set; } + + /// + public string Mapper { get; set; } + + /// + public string OutputPath { get; set; } + + /// + public string Reducer { get; set; } + + /// + public override string StatusFolder { get; set; } + + public override Task EndProcessing() + { + this.InputPath.ArgumentNotNullOrEmpty("Input"); + this.OutputPath.ArgumentNotNullOrEmpty("Output"); + this.Mapper.ArgumentNotNullOrEmpty("Mapper"); + + var streamingMapReduceJob = new AzureHDInsightStreamingMapReduceJobDefinition(); + streamingMapReduceJob.JobName = this.JobName; + streamingMapReduceJob.Input = this.InputPath; + streamingMapReduceJob.Output = this.OutputPath; + streamingMapReduceJob.Mapper = this.Mapper; + streamingMapReduceJob.Reducer = this.Reducer; + streamingMapReduceJob.Combiner = this.Combiner; + streamingMapReduceJob.StatusFolder = this.StatusFolder; + + if (this.Defines.IsNotNull()) + { + streamingMapReduceJob.Defines.AddRange(this.Defines.ToKeyValuePairs()); + } + + if (this.CmdEnv.IsNotNull()) + { + streamingMapReduceJob.CommandEnvironment.AddRange(this.CmdEnv); + } + + if (this.Arguments.IsNotNull()) + { + streamingMapReduceJob.Arguments.AddRange(this.Arguments); + } + + if (this.Files.IsNotNull()) + { + streamingMapReduceJob.Files.AddRange(this.Files); + } + + this.Output.Add(streamingMapReduceJob); + return TaskEx.FromResult(0); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/RemoveAzureHDInsightClusterCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/RemoveAzureHDInsightClusterCommand.cs new file mode 100644 index 000000000000..071131cc647e --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/RemoveAzureHDInsightClusterCommand.cs @@ -0,0 +1,32 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations +{ + internal class RemoveAzureHDInsightClusterCommand : AzureHDInsightClusterCommandBase, IRemoveAzureHDInsightClusterCommand + { + /// + public string Location { get; set; } + + public override async Task EndProcessing() + { + IHDInsightClient client = this.GetClient(); + await client.DeleteClusterAsync(this.Name); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/SetAzureHDInsightDefaultStorageCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/SetAzureHDInsightDefaultStorageCommand.cs new file mode 100644 index 000000000000..0b806ff606ae --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/SetAzureHDInsightDefaultStorageCommand.cs @@ -0,0 +1,46 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations +{ + internal class SetAzureHDInsightDefaultStorageCommand : AzureHDInsightCommand, ISetAzureHDInsightDefaultStorageCommand + { + public SetAzureHDInsightDefaultStorageCommand() + { + this.Config = new AzureHDInsightConfig(); + } + + public AzureHDInsightConfig Config { get; set; } + + public string StorageAccountKey { get; set; } + + public string StorageAccountName { get; set; } + + public string StorageContainerName { get; set; } + + public override Task EndProcessing() + { + this.Config.DefaultStorageAccount.StorageAccountName = this.StorageAccountName; + this.Config.DefaultStorageAccount.StorageAccountKey = this.StorageAccountKey; + this.Config.DefaultStorageAccount.StorageContainerName = this.StorageContainerName; + this.Output.Add(this.Config); + return TaskEx.FromResult(0); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/SetAzureHdInsightClusterSizeCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/SetAzureHdInsightClusterSizeCommand.cs new file mode 100644 index 000000000000..46cefcb7a882 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/SetAzureHdInsightClusterSizeCommand.cs @@ -0,0 +1,56 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations +{ + /// + /// Command referenced by the cmdlet that allows a user to change the size of a cluster. + /// + internal class SetAzureHdInsightClusterSizeCommand : AzureHDInsightClusterCommand, + ISetAzureHDInsightClusterSizeCommand + { + private SwitchParameter force; + + public SwitchParameter Force + { + get { return force; } + set { force = value; } + } + + public string Location { get; set; } + + public AzureHDInsightCluster Cluster { get; set; } + + public int ClusterSizeInNodes { get; set; } + + public override async Task EndProcessing() + { + Name.ArgumentNotNull("Name"); + Location.ArgumentNotNull("Location"); + var client = GetClient(); + var cluster = await client.ChangeClusterSizeAsync(Name, Location, ClusterSizeInNodes); + if (cluster != null) + { + Output.Add(new AzureHDInsightCluster(cluster)); + } + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/StartAzureHDInsightJobCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/StartAzureHDInsightJobCommand.cs new file mode 100644 index 000000000000..a3e048820833 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/StartAzureHDInsightJobCommand.cs @@ -0,0 +1,200 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.Hadoop.Client; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations +{ + internal class StartAzureHDInsightJobCommand : AzureHDInsightJobCommand, IStartAzureHDInsightJobCommand + { + private const string HiveJobNameFormat = "Hive: {0}"; + private const int MaxLengthForJobName = 20; + + private static async Task CreateSqoopJob( + AzureHDInsightSqoopJobDefinition azureSqoopJobDefinition, IJobSubmissionClient client) + { + SqoopJobCreateParameters sqoopJobDefinition = azureSqoopJobDefinition.ToSqoopJobCreateParameters(); + + var jobCreationResults = await client.CreateSqoopJobAsync(sqoopJobDefinition); + return jobCreationResults; + } + + private static async Task CreateStreamingJob( + AzureHDInsightStreamingMapReduceJobDefinition azureStreamingJobDefinition, IJobSubmissionClient client) + { + var streamingJobDefinition = new StreamingMapReduceJobCreateParameters + { + JobName = azureStreamingJobDefinition.JobName, + Input = azureStreamingJobDefinition.Input, + Output = azureStreamingJobDefinition.Output, + Reducer = azureStreamingJobDefinition.Reducer, + Combiner = azureStreamingJobDefinition.Combiner, + Mapper = azureStreamingJobDefinition.Mapper + }; + streamingJobDefinition.StatusFolder = azureStreamingJobDefinition.StatusFolder; + streamingJobDefinition.CommandEnvironment.AddRange(azureStreamingJobDefinition.CommandEnvironment); + streamingJobDefinition.Arguments.AddRange(azureStreamingJobDefinition.Arguments); + streamingJobDefinition.Defines.AddRange(azureStreamingJobDefinition.Defines); + streamingJobDefinition.Files.AddRange(azureStreamingJobDefinition.Files); + + var jobCreationResults = await client.CreateStreamingJobAsync(streamingJobDefinition); + return jobCreationResults; + } + + public AzureHDInsightJobDefinition JobDefinition { get; set; } + + public override async Task EndProcessing() + { + this.JobDefinition.ArgumentNotNull("JobDefinition"); + + IJobSubmissionClient client = this.GetClient(this.Cluster); + JobCreationResults jobCreationResults = null; + if (this.JobDefinition.StatusFolder.IsNullOrEmpty()) + { + this.JobDefinition.StatusFolder = Guid.NewGuid().ToString(); + } + + var azureMapReduceJobDefinition = this.JobDefinition as AzureHDInsightMapReduceJobDefinition; + var azureHiveJobDefinition = this.JobDefinition as AzureHDInsightHiveJobDefinition; + var azurePigJobDefinition = this.JobDefinition as AzureHDInsightPigJobDefinition; + var azureStreamingJobDefinition = this.JobDefinition as AzureHDInsightStreamingMapReduceJobDefinition; + var azureSqoopJobDefinition = this.JobDefinition as AzureHDInsightSqoopJobDefinition; + + if (azureMapReduceJobDefinition != null) + { + if (azureMapReduceJobDefinition.JobName.IsNullOrEmpty()) + { + azureMapReduceJobDefinition.JobName = azureMapReduceJobDefinition.ClassName; + } + jobCreationResults = await SubmitMapReduceJob(azureMapReduceJobDefinition, client); + } + else if (azureHiveJobDefinition != null) + { + if (azureHiveJobDefinition.JobName.IsNullOrEmpty()) + { + azureHiveJobDefinition.JobName = string.Format( + CultureInfo.InvariantCulture, + HiveJobNameFormat, + GetJobNameFromQueryOrFile(azureHiveJobDefinition.Query, azureHiveJobDefinition.File)); + } + jobCreationResults = await SubmitHiveJob(azureHiveJobDefinition, client); + } + else if (azurePigJobDefinition != null) + { + jobCreationResults = await SubmitPigJob(azurePigJobDefinition, client); + } + else if (azureStreamingJobDefinition != null) + { + if (azureStreamingJobDefinition.JobName.IsNullOrEmpty()) + { + azureStreamingJobDefinition.JobName = GetLastSegment(azureStreamingJobDefinition.Mapper); + } + jobCreationResults = await CreateStreamingJob(azureStreamingJobDefinition, client); + } + else if (azureSqoopJobDefinition != null) + { + jobCreationResults = await CreateSqoopJob(azureSqoopJobDefinition, client); + } + else + { + throw new NotSupportedException( + string.Format(CultureInfo.InvariantCulture, "Cannot start jobDetails of type : {0}.", this.JobDefinition.GetType())); + } + + var startedJob = await client.GetJobAsync(jobCreationResults.JobId); + if (startedJob.ErrorCode.IsNotNullOrEmpty()) + { + throw new InvalidOperationException("Failed to start jobDetails :" + startedJob.ErrorCode); + } + + var jobDetail = new AzureHDInsightJob(startedJob, this.Cluster); + this.Output.Add(jobDetail); + } + + private static string GetJobNameFromQueryOrFile(string query, string file) + { + string jobName; + if (query.IsNotNullOrEmpty()) + { + jobName = query.Substring(0, Math.Min(MaxLengthForJobName, query.Length)); + } + else + { + jobName = GetLastSegment(file); + } + return jobName; + } + + private static string GetLastSegment(string uriString) + { + Uri uriAddress = null; + if (Uri.TryCreate(uriString, UriKind.Absolute, out uriAddress)) + { + string fileName = uriAddress.Segments.Last(); + return fileName.Substring(0, Math.Min(MaxLengthForJobName, fileName.Length)); + } + + string lastSegment = uriString.Split('/').Last(); + return lastSegment.Substring(0, Math.Min(MaxLengthForJobName, lastSegment.Length)); + } + + private static async Task SubmitHiveJob( + AzureHDInsightHiveJobDefinition azureHiveJobDefinition, IJobSubmissionClient client) + { + var hiveJobDefinition = new HiveJobCreateParameters + { + JobName = azureHiveJobDefinition.JobName, + Query = azureHiveJobDefinition.Query, + File = azureHiveJobDefinition.File, + RunAsFileJob = azureHiveJobDefinition.RunAsFileJob + }; + + hiveJobDefinition.StatusFolder = azureHiveJobDefinition.StatusFolder; + hiveJobDefinition.Arguments.AddRange(azureHiveJobDefinition.Arguments); + hiveJobDefinition.Defines.AddRange(azureHiveJobDefinition.Defines); + hiveJobDefinition.Files.AddRange(azureHiveJobDefinition.Files); + + var jobCreationResults = await client.CreateHiveJobAsync(hiveJobDefinition); + return jobCreationResults; + } + + private static async Task SubmitMapReduceJob( + AzureHDInsightMapReduceJobDefinition azureMapReduceJobDefinition, IJobSubmissionClient client) + { + MapReduceJobCreateParameters mapReduceJobDefinition = azureMapReduceJobDefinition.ToMapReduceJobCreateParameters(); + var jobCreationResults = await client.CreateMapReduceJobAsync(mapReduceJobDefinition); + return jobCreationResults; + } + + private static async Task SubmitPigJob(AzureHDInsightPigJobDefinition azurePigJobDefinition, IJobSubmissionClient client) + { + var pigJobDefinition = new PigJobCreateParameters { Query = azurePigJobDefinition.Query, File = azurePigJobDefinition.File }; + + pigJobDefinition.StatusFolder = azurePigJobDefinition.StatusFolder; + pigJobDefinition.Arguments.AddRange(azurePigJobDefinition.Arguments); + pigJobDefinition.Files.AddRange(azurePigJobDefinition.Files); + + var jobCreationResults = await client.CreatePigJobAsync(pigJobDefinition); + return jobCreationResults; + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/StopAzureHDInsightJobCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/StopAzureHDInsightJobCommand.cs new file mode 100644 index 000000000000..d2d65bcf2c62 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/StopAzureHDInsightJobCommand.cs @@ -0,0 +1,40 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Threading.Tasks; +using Microsoft.Hadoop.Client; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations +{ + internal class StopAzureHDInsightJobCommand : AzureHDInsightJobCommand, IStopAzureHDInsightJobCommand + { + public override async Task EndProcessing() + { + this.JobId.ArgumentNotNullOrEmpty("JobId"); + IJobSubmissionClient client = this.GetClient(this.Cluster); + if (client != null) + { + var jobDetail = await client.StopJobAsync(this.JobId); + if (jobDetail != null) + { + this.Output.Add(new AzureHDInsightJob(jobDetail, this.Cluster)); + } + } + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/UseAzureHDInsightClusterCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/UseAzureHDInsightClusterCommand.cs new file mode 100644 index 000000000000..ce40cf65eabf --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/UseAzureHDInsightClusterCommand.cs @@ -0,0 +1,67 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations +{ + internal class UseAzureHDInsightClusterCommand : AzureHDInsightClusterCommand, IUseAzureHDInsightClusterCommand + { + private const string GrantHttpAccessCmdletName = "Grant Azure HDInsight Http Services Access"; + + public override async Task EndProcessing() + { + this.Name.ArgumentNotNullOrEmpty("Name"); + IHDInsightClient client = this.GetClient(); + var cluster = await client.GetClusterAsync(this.Name); + var connection = new AzureHDInsightClusterConnection(); + ProfileClient profileClient = new ProfileClient(); + connection.Credential = this.GetSubscriptionCredentials(this.CurrentSubscription, + profileClient.GetEnvironmentOrDefault(this.CurrentSubscription.Environment), + profileClient.Profile); + + if (cluster == null) + { + throw new NotSupportedException(string.Format(CultureInfo.InvariantCulture, "Failed to connect to cluster :{0}", this.Name)); + } + + connection.Cluster = new AzureHDInsightCluster(cluster); + + if (!(cluster.State == ClusterState.Running || cluster.State == ClusterState.Operational)) + { + throw new NotSupportedException( + string.Format(CultureInfo.InvariantCulture, "Cluster {0} is in an invalid state : {1}", this.Name, cluster.State.ToString())); + } + + if (string.IsNullOrEmpty(cluster.HttpUserName)) + { + throw new NotSupportedException( + string.Format( + CultureInfo.InvariantCulture, + "Cluster {0} is not configured for Http Services access.\r\nPlease use the {1} cmdlet to enable Http Services access.", + this.Name, + GrantHttpAccessCmdletName)); + } + + this.Output.Add(connection); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/WaitAzureHDInsightJobCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/WaitAzureHDInsightJobCommand.cs new file mode 100644 index 000000000000..a2d591b8504b --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandImplementations/WaitAzureHDInsightJobCommand.cs @@ -0,0 +1,89 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Threading.Tasks; +using Microsoft.Hadoop.Client; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations +{ + internal class WaitAzureHDInsightJobCommand : AzureHDInsightJobExecutorCommand, IWaitAzureHDInsightJobCommand + { + internal static bool ReduceWaitTime = false; + + public WaitAzureHDInsightJobCommand() + { + this.WaitTimeoutInSeconds = 30 * 60; + } + + public event EventHandler JobStatusEvent; + + public string Cluster { get; set; } + + public AzureHDInsightJob Job { get; set; } + + public JobDetails JobDetailsStatus { get; private set; } + + public string JobId { get; set; } + + public double WaitTimeoutInSeconds { get; set; } + + public override Task EndProcessing() + { + return TaskEx.FromResult(0); + } + + public async Task ProcessRecord() + { + if (string.IsNullOrWhiteSpace(this.JobId) || string.IsNullOrWhiteSpace(this.Cluster)) + { + this.JobId = this.Job.JobId; + this.Cluster = this.Job.Cluster; + } + + IJobSubmissionClient client = this.GetClient(this.Cluster); + client.JobStatusEvent += this.ClientOnJobStatus; + JobDetails jobDetail = null; + if (ReduceWaitTime) + { + jobDetail = await client.GetJobAsync(this.JobId); + while (jobDetail.StatusCode != JobStatusCode.Completed && jobDetail.StatusCode != JobStatusCode.Failed && + jobDetail.StatusCode != JobStatusCode.Canceled) + { + jobDetail = await client.GetJobAsync(this.JobId); + } + } + else + { + var job = new JobCreationResults { JobId = this.JobId }; + jobDetail = await client.WaitForJobCompletionAsync(job, TimeSpan.FromSeconds(this.WaitTimeoutInSeconds), this.tokenSource.Token); + } + + this.Output.Add(new AzureHDInsightJob(jobDetail, this.Cluster)); + } + + private void ClientOnJobStatus(object sender, WaitJobStatusEventArgs waitJobStatusEventArgs) + { + this.JobDetailsStatus = waitJobStatusEventArgs.JobDetails; + EventHandler handler = this.JobStatusEvent; + if (handler != null) + { + handler(sender, waitJobStatusEventArgs); + } + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IAddAzureHDInsightConfigValuesCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IAddAzureHDInsightConfigValuesCommand.cs new file mode 100644 index 000000000000..fd6ed4ec2555 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IAddAzureHDInsightConfigValuesCommand.cs @@ -0,0 +1,24 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces +{ + internal interface IAddAzureHDInsightConfigValuesCommand : IAzureHDInsightCommand, IAddAzureHDInsightConfigValuesBase + { + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IAddAzureHDInsightMetaStoreCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IAddAzureHDInsightMetaStoreCommand.cs new file mode 100644 index 000000000000..4ea6f5327fb6 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IAddAzureHDInsightMetaStoreCommand.cs @@ -0,0 +1,24 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces +{ + internal interface IAddAzureHDInsightMetastoreCommand : IAzureHDInsightCommand, IAddAzureHDInsightMetastoreBase + { + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IAddAzureHDInsightScriptActionCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IAddAzureHDInsightScriptActionCommand.cs new file mode 100644 index 000000000000..9d00b91737e7 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IAddAzureHDInsightScriptActionCommand.cs @@ -0,0 +1,24 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces +{ + using BaseCommandInterfaces; + using DataObjects; + using GetAzureHDInsightClusters; + + internal interface IAddAzureHDInsightScriptActionCommand : IAzureHDInsightCommand, IAddAzureHDInsightScriptActionBase + { + + } +} \ No newline at end of file diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IAddAzureHDInsightStorageCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IAddAzureHDInsightStorageCommand.cs new file mode 100644 index 000000000000..468a9a4217de --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IAddAzureHDInsightStorageCommand.cs @@ -0,0 +1,24 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces +{ + internal interface IAddAzureHDInsightStorageCommand : IAzureHDInsightCommand, IAddAzureHDInsightStorageBase + { + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IGetAzureHDInsightClusterCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IGetAzureHDInsightClusterCommand.cs new file mode 100644 index 000000000000..f0d7ebc40e74 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IGetAzureHDInsightClusterCommand.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces +{ + internal interface IGetAzureHDInsightClusterCommand : IAzureHDInsightCommand, IAzureHDInsightClusterCommandBase + { + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IGetAzureHDInsightJobCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IGetAzureHDInsightJobCommand.cs new file mode 100644 index 000000000000..6c2c90a167ae --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IGetAzureHDInsightJobCommand.cs @@ -0,0 +1,24 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces +{ + internal interface IGetAzureHDInsightJobCommand : IAzureHDInsightCommand, IGetAzureHDInsightJobBase + { + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IGetAzureHDInsightJobOutputCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IGetAzureHDInsightJobOutputCommand.cs new file mode 100644 index 000000000000..995c7c0bc508 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IGetAzureHDInsightJobOutputCommand.cs @@ -0,0 +1,24 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces +{ + internal interface IGetAzureHDInsightJobOutputCommand : IAzureHDInsightCommand, IGetAzureHDInsightJobOutputBase + { + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IGetAzureHDInsightPropertiesCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IGetAzureHDInsightPropertiesCommand.cs new file mode 100644 index 000000000000..395ed1aa0e9d --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IGetAzureHDInsightPropertiesCommand.cs @@ -0,0 +1,24 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.BaseInterfaces; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces +{ + internal interface IGetAzureHDInsightPropertiesCommand : IAzureHDInsightCommand, IAzureHDInsightCommonCommandBase + { + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IInvokeHiveCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IInvokeHiveCommand.cs new file mode 100644 index 000000000000..72b93a6046d6 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IInvokeHiveCommand.cs @@ -0,0 +1,24 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Hadoop.Client; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces +{ + internal interface IInvokeHiveCommand : IInvokeAzureHDInsightJobCommand + { + JobDetails JobDetailsStatus { get; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IManageAzureHDInsightHttpAccessCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IManageAzureHDInsightHttpAccessCommand.cs new file mode 100644 index 000000000000..17ce2eebc4eb --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IManageAzureHDInsightHttpAccessCommand.cs @@ -0,0 +1,24 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces +{ + internal interface IManageAzureHDInsightHttpAccessCommand : IAzureHDInsightCommand, IManageAzureHDInsightHttpAccessBase + { + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/INewAzureHDInsightClusterCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/INewAzureHDInsightClusterCommand.cs new file mode 100644 index 000000000000..188412343f03 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/INewAzureHDInsightClusterCommand.cs @@ -0,0 +1,64 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Microsoft.WindowsAzure.Management.HDInsight.ClusterProvisioning.Data; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces +{ + /// + /// Worker object for creating a cluster via PowerShell. + /// + internal interface INewAzureHDInsightClusterCommand : IAzureHDInsightCommand, INewAzureHDInsightClusterBase + { + ICollection AdditionalStorageAccounts { get; } + + ICollection ConfigActions { get; } + + ConfigValuesCollection CoreConfiguration { get; set; } + + ConfigValuesCollection YarnConfiguration { get; set; } + + ConfigValuesCollection HdfsConfiguration { get; set; } + + HiveConfiguration HiveConfiguration { get; set; } + + AzureHDInsightMetastore HiveMetastore { get; set; } + + MapReduceConfiguration MapReduceConfiguration { get; set; } + + OozieConfiguration OozieConfiguration { get; set; } + + AzureHDInsightMetastore OozieMetastore { get; set; } + + ClusterState State { get; } + + string Location { get; set; } + + NodeVMSize HeadNodeSize { get; set; } + + ClusterType ClusterType { get; set; } + + string VirtualNetworkId { get; set; } + + string SubnetName { get; set; } + + ConfigValuesCollection StormConfiguration { get; set; } + + HBaseConfiguration HBaseConfiguration { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/INewAzureHDInsightClusterConfigCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/INewAzureHDInsightClusterConfigCommand.cs new file mode 100644 index 000000000000..9991da681268 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/INewAzureHDInsightClusterConfigCommand.cs @@ -0,0 +1,24 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces +{ + internal interface INewAzureHDInsightClusterConfigCommand : IAzureHDInsightCommand, INewAzureHDInsightClusterConfigBase + { + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/INewAzureHDInsightHiveJobDefinitionCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/INewAzureHDInsightHiveJobDefinitionCommand.cs new file mode 100644 index 000000000000..d1fc1a3c7130 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/INewAzureHDInsightHiveJobDefinitionCommand.cs @@ -0,0 +1,25 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces +{ + internal interface INewAzureHDInsightHiveJobDefinitionCommand + : IAzureHDInsightCommand, INewAzureHDInsightHiveJobDefinitionBase + { + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/INewAzureHDInsightMapReduceJobDefinitionCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/INewAzureHDInsightMapReduceJobDefinitionCommand.cs new file mode 100644 index 000000000000..8194530e6c3b --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/INewAzureHDInsightMapReduceJobDefinitionCommand.cs @@ -0,0 +1,25 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces +{ + internal interface INewAzureHDInsightMapReduceJobDefinitionCommand + : IAzureHDInsightCommand, INewAzureHDInsightMapReduceJobDefinitionBase + { + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/INewAzureHDInsightPigJobDefinitionCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/INewAzureHDInsightPigJobDefinitionCommand.cs new file mode 100644 index 000000000000..463c09e3d871 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/INewAzureHDInsightPigJobDefinitionCommand.cs @@ -0,0 +1,25 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces +{ + internal interface INewAzureHDInsightPigJobDefinitionCommand + : IAzureHDInsightCommand, INewAzureHDInsightPigJobDefinitionBase + { + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/INewAzureHDInsightSqoopJobDefinitionCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/INewAzureHDInsightSqoopJobDefinitionCommand.cs new file mode 100644 index 000000000000..b0b4f89aeac1 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/INewAzureHDInsightSqoopJobDefinitionCommand.cs @@ -0,0 +1,25 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces +{ + internal interface INewAzureHDInsightSqoopJobDefinitionCommand + : IAzureHDInsightCommand, INewAzureHDInsightSqoopJobDefinitionBase + { + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/INewAzureHDInsightStreamingJobDefinitionCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/INewAzureHDInsightStreamingJobDefinitionCommand.cs new file mode 100644 index 000000000000..325ea244d72c --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/INewAzureHDInsightStreamingJobDefinitionCommand.cs @@ -0,0 +1,25 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces +{ + internal interface INewAzureHDInsightStreamingJobDefinitionCommand + : IAzureHDInsightCommand, INewAzureHDInsightStreamingJobDefinitionBase + { + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IRemoveAzureHDInsightClusterCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IRemoveAzureHDInsightClusterCommand.cs new file mode 100644 index 000000000000..fe344d9024df --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IRemoveAzureHDInsightClusterCommand.cs @@ -0,0 +1,22 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces +{ + internal interface IRemoveAzureHDInsightClusterCommand : IAzureHDInsightClusterCommandBase, IAzureHDInsightCommandBase + { + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/ISetAzureHDInsightClusterSizeCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/ISetAzureHDInsightClusterSizeCommand.cs new file mode 100644 index 000000000000..f4ceb100560d --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/ISetAzureHDInsightClusterSizeCommand.cs @@ -0,0 +1,34 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces +{ + /// + /// Command interface referenced by the cmdlet that allows a user to change the size of a cluster. + /// + internal interface ISetAzureHDInsightClusterSizeCommand : IAzureHDInsightCommand, IAzureHDInsightClusterCommandBase + { + SwitchParameter Force { get; set; } + + int ClusterSizeInNodes { get; set; } + + string Location { get; set; } + + AzureHDInsightCluster Cluster { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/ISetAzureHDInsightDefaultStorageCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/ISetAzureHDInsightDefaultStorageCommand.cs new file mode 100644 index 000000000000..a95c32f51978 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/ISetAzureHDInsightDefaultStorageCommand.cs @@ -0,0 +1,24 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces +{ + internal interface ISetAzureHDInsightDefaultStorageCommand : IAzureHDInsightCommand, ISetAzureHDInsightDefaultStorageBase + { + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IStartAzureHDInsightJobCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IStartAzureHDInsightJobCommand.cs new file mode 100644 index 000000000000..6f88b3326850 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IStartAzureHDInsightJobCommand.cs @@ -0,0 +1,24 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces +{ + internal interface IStartAzureHDInsightJobCommand : IAzureHDInsightCommand, IStartAzureHDInsightJobBase + { + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IStopAzureHDInsightJobCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IStopAzureHDInsightJobCommand.cs new file mode 100644 index 000000000000..a9123b0022b7 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IStopAzureHDInsightJobCommand.cs @@ -0,0 +1,24 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces +{ + internal interface IStopAzureHDInsightJobCommand : IAzureHDInsightCommand, IStopAzureHDInsightJobBase + { + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IUseAzureHDInsightClusterCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IUseAzureHDInsightClusterCommand.cs new file mode 100644 index 000000000000..c510b57b98de --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IUseAzureHDInsightClusterCommand.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces +{ + internal interface IUseAzureHDInsightClusterCommand : IAzureHDInsightCommand, IAzureHDInsightClusterCommandBase + { + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IWaitAzureHDInsightJobCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IWaitAzureHDInsightJobCommand.cs new file mode 100644 index 000000000000..050a4f57048e --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Commands/CommandInterfaces/IWaitAzureHDInsightJobCommand.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Threading.Tasks; +using Microsoft.Hadoop.Client; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces +{ + internal interface IWaitAzureHDInsightJobCommand : IAzureHDInsightCommand, IWaitAzureHDInsightJobBase + { + /// + /// Event that is fired when the client provisions a cluster. + /// + event EventHandler JobStatusEvent; + + JobDetails JobDetailsStatus { get; } + + Task ProcessRecord(); + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightCapabilities.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightCapabilities.cs new file mode 100644 index 000000000000..3cb4bc0f0412 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightCapabilities.cs @@ -0,0 +1,72 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects +{ + /// + /// Type to represent the HDInsight capabilities of a subscription. + /// + public class AzureHDInsightCapabilities + { + /// + /// Initializes a new instance of the AzureHDInsightCapabilities class. + /// + /// Capabilities for this subscription. + public AzureHDInsightCapabilities(IEnumerable> capabilities) + { + this.Capabilities = capabilities; + } + + /// + /// Gets the number of HDInsight clusters created with the subscription. + /// + public int ClusterCount { get; internal set; } + + /// + /// Gets the number of CPU cores available for the subscription. + /// + public int CoresAvailable + { + get { return Math.Abs(this.MaxCoresAllowed - this.CoresUsed); } + } + + /// + /// Gets the number of CPU cores used by the subscription. + /// + public int CoresUsed { get; internal set; } + + /// + /// Gets the Azure Locations allowed for the subscription. + /// + public IEnumerable Locations { get; internal set; } + + /// + /// Gets the maximum number of CPU cores that can be used by the subscription. + /// + public int MaxCoresAllowed { get; internal set; } + + /// + /// Gets the HDInsight Versions allowed for the subscription. + /// + public IEnumerable Versions { get; internal set; } + + /// + /// Gets the HDInsight Capabilities allowed for the subscription. + /// + internal IEnumerable> Capabilities { get; private set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightCluster.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightCluster.cs new file mode 100644 index 000000000000..244c6ece3e57 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightCluster.cs @@ -0,0 +1,192 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Linq; +using Microsoft.WindowsAzure.Management.HDInsight.ClusterProvisioning.Data; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects +{ + /// + /// Represents an Azure HD Insight Cluster for the PowerShell Cmdlets. + /// + public class AzureHDInsightCluster + { + private readonly ClusterDetails cluster; + + /// + /// Initializes a new instance of the class. + /// + /// + /// The underlying SDK data object representing the cluster. + /// + public AzureHDInsightCluster(ClusterDetails cluster) + { + this.cluster = cluster; + } + + /// + /// Gets the size of the Azure HD Insight cluster in units of worker nodes. + /// + public int ClusterSizeInNodes + { + get { return this.cluster.ClusterSizeInNodes; } + } + + /// + /// Gets the type of the Azure HD Insight cluster. + /// + public ClusterType ClusterType + { + get { return this.cluster.ClusterType; } + } + + /// + /// Gets the virtual network Id of the cluster. + /// + public string VirtualNetworkId + { + get { return this.cluster.VirtualNetworkId; } + } + + /// + /// Gets the subnet name of the cluster. + /// + public string SubnetName + { + get { return this.cluster.SubnetName; } + } + + /// + /// Gets the connection Url for the Azure HD Insight Cluster. + /// + [SuppressMessage("Microsoft.Design", "CA1056:UriPropertiesShouldNotBeStrings", + Justification = "this is a read only property coming from the server. It is safer to leave as a string. [tgs]")] + public string ConnectionUrl + { + get { return this.cluster.ConnectionUrl; } + } + + /// + /// Gets the Date the Azure HD Insight Cluster was created. + /// + public DateTime CreateDate + { + get { return this.cluster.CreatedDate; } + } + + /// + /// Gets the default storage accounts associated with the Azure HDInsight cluster. + /// + public AzureHDInsightDefaultStorageAccount DefaultStorageAccount + { + get + { + return new AzureHDInsightDefaultStorageAccount + { + StorageAccountName = this.cluster.DefaultStorageAccount.Name, + StorageAccountKey = this.cluster.DefaultStorageAccount.Key, + StorageContainerName = this.cluster.DefaultStorageAccount.Container + }; + } + } + + /// + /// Gets the password associated with Http requests to the cluster. + /// + internal string HttpPassword + { + get { return this.cluster.HttpPassword; } + } + + /// + /// Gets the login username for the cluster. + /// + public string HttpUserName + { + get { return this.cluster.HttpUserName; } + } + + /// + /// Gets the Azure location where the Azure HD Insight Cluster is located. + /// + public string Location + { + get { return this.cluster.Location; } + } + + /// + /// Gets the name of the Azure HD Insight Cluster. + /// + public string Name + { + get { return this.cluster.Name; } + } + + /// + /// Gets the ClusterState for the Azure HD Insight Cluster. + /// + public ClusterState State + { + get { return this.cluster.State; } + } + + /// + /// Gets any storage accounts associated with the Azure HDInsight cluster. + /// + public IEnumerable StorageAccounts + { + get + { + return + this.cluster.AdditionalStorageAccounts.Select( + acc => new AzureHDInsightStorageAccount { StorageAccountName = acc.Name, StorageAccountKey = acc.Key }); + } + } + + /// + /// Gets the subscriptionid associated with this cluster. + /// + public Guid SubscriptionId + { + get { return this.cluster.SubscriptionId; } + } + + /// + /// Gets the username used when creating the Azure HD Insight Cluster. + /// + public string UserName + { + get { return this.cluster.HttpUserName; } + } + + /// + /// Gets the name of the Azure HD Insight Cluster. + /// + public string Version + { + get { return this.cluster.Version; } + } + + /// + /// Gets the version status of the Azure HD Insight Cluster. + /// + public string VersionStatus + { + get { return this.cluster.VersionStatus.ToString(); } + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightClusterConnection.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightClusterConnection.cs new file mode 100644 index 000000000000..5a1df4af3391 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightClusterConnection.cs @@ -0,0 +1,31 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects +{ + /// + /// Represents an Azure HD Insight Cluster connection object for the PowerShell Cmdlets. + /// + public class AzureHDInsightClusterConnection + { + /// + /// Gets or sets the Azure HDInsight cluster we're connected to. + /// + public AzureHDInsightCluster Cluster { get; set; } + + /// + /// Gets or sets the subscription credentials for the connection. + /// + public IHDInsightSubscriptionCredentials Credential { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightConfig.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightConfig.cs new file mode 100644 index 000000000000..94b82753270c --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightConfig.cs @@ -0,0 +1,138 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Microsoft.WindowsAzure.Management.HDInsight.ClusterProvisioning.Data; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects +{ + /// + /// Represents an Azure Configuration to be used when creating new clusters. + /// + public class AzureHDInsightConfig + { + /// + /// Initializes a new instance of the AzureHDInsightConfig class. + /// + public AzureHDInsightConfig() + { + this.DefaultStorageAccount = new AzureHDInsightDefaultStorageAccount(); + this.AdditionalStorageAccounts = new List(); + this.ConfigActions = new List(); + this.CoreConfiguration = new ConfigValuesCollection(); + this.YarnConfiguration = new ConfigValuesCollection(); + this.HdfsConfiguration = new ConfigValuesCollection(); + this.MapReduceConfiguration = new MapReduceConfiguration(); + this.HiveConfiguration = new HiveConfiguration(); + this.OozieConfiguration = new OozieConfiguration(); + this.HeadNodeVMSize = NodeVMSize.Default; + this.ClusterType = ClusterType.Hadoop; + this.StormConfiguration = new ConfigValuesCollection(); + this.HBaseConfiguration = new HBaseConfiguration(); + } + + /// + /// Gets the additional storage accounts for the HDInsight cluster. + /// + public ICollection AdditionalStorageAccounts { get; private set; } + + /// + /// Gets or sets the size of the head node VM. + /// + /// + /// The size of the head node VM. + /// + public NodeVMSize HeadNodeVMSize { get; set; } + + /// + /// Gets or sets the size of the cluster in data nodes. + /// + public int ClusterSizeInNodes { get; set; } + + /// + /// Gets or sets the type of the cluster. + /// + public ClusterType ClusterType { get; set; } + + /// + /// Gets or sets the virtual network id. + /// + public string VirtualNetworkId { get; set; } + + /// + /// Gets or sets the subnet name. + /// + public string SubnetName { get; set; } + + /// + /// Gets a collection of configuration properties to customize the Core Hadoop service. + /// + public ConfigValuesCollection CoreConfiguration { get; private set; } + + /// + /// Gets a collection of configuration properties to customize the Yarn Hadoop service. + /// + public ConfigValuesCollection YarnConfiguration { get; private set; } + + /// + /// Gets or sets the default storage account for the HDInsight cluster. + /// + public AzureHDInsightDefaultStorageAccount DefaultStorageAccount { get; set; } + + /// + /// Gets a collection of configuration properties to customize the Hdfs Hadoop service. + /// + public ConfigValuesCollection HdfsConfiguration { get; private set; } + + /// + /// Gets a collection of configuration properties to customize the Hive Hadoop service. + /// + public HiveConfiguration HiveConfiguration { get; private set; } + + /// + /// Gets or sets the Hive Metastore. + /// + public AzureHDInsightMetastore HiveMetastore { get; set; } + + /// + /// Gets the config actions for the HDInsight cluster. + /// + public ICollection ConfigActions { get; private set; } + + /// + /// Gets a collection of configuration properties to customize the MapReduce Hadoop service. + /// + public MapReduceConfiguration MapReduceConfiguration { get; private set; } + + /// + /// Gets a collection of configuration properties to customize the Oozie Hadoop service. + /// + public OozieConfiguration OozieConfiguration { get; private set; } + + /// + /// Gets or sets the Oozie Metastore. + /// + public AzureHDInsightMetastore OozieMetastore { get; set; } + + /// + /// Gets a collection of configuration properties to customize the Storm service. + /// + public ConfigValuesCollection StormConfiguration { get; private set; } + + /// + /// Gets a collection of configuration properties to customize the HBase service. + /// + public HBaseConfiguration HBaseConfiguration { get; private set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightConfigAction.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightConfigAction.cs new file mode 100644 index 000000000000..4cb62a764177 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightConfigAction.cs @@ -0,0 +1,36 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects +{ + /// + /// Represents an AzureHDInsightConfigAction. + /// + public abstract class AzureHDInsightConfigAction + { + /// + /// Gets or sets the name of the config action. + /// + public string Name { get; set; } + + /// + /// Gets or sets the affected nodes of the config action. + /// + public ClusterNodeType[] ClusterRoleCollection { get; set; } + + /// + /// Convert this config action to SDK recognizable. + /// + public abstract ConfigAction ToSDKConfigAction(); + } +} \ No newline at end of file diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightDefaultStorageAccount.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightDefaultStorageAccount.cs new file mode 100644 index 000000000000..8a2ece4c5510 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightDefaultStorageAccount.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects +{ + /// + /// Represents a Default Storage Account used for an HDInsight cluster. + /// + public class AzureHDInsightDefaultStorageAccount : AzureHDInsightStorageAccount + { + /// + /// Gets or sets the Storage Container for the Default Storage Account. + /// + public string StorageContainerName { get; set; } + + /// + /// Creates an SDK object from this Powershell object type. + /// + /// A storage account configuration. + public WabStorageAccountConfiguration ToWabStorageAccountConfiguration() + { + return new WabStorageAccountConfiguration(this.StorageAccountName, this.StorageAccountKey, this.StorageContainerName); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightHBaseConfiguration.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightHBaseConfiguration.cs new file mode 100644 index 000000000000..2e0d87841012 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightHBaseConfiguration.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections; +using System.Diagnostics.CodeAnalysis; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects +{ + /// + /// Structure to contain Hadoop HBase service configuration. + /// + public class AzureHDInsightHBaseConfiguration + { + /// + /// Initializes a new instance of the AzureHDInsightHBaseConfiguration class. + /// + public AzureHDInsightHBaseConfiguration() + { + this.Configuration = new Hashtable(); + } + + /// + /// Gets or sets the location for additional JAR files. + /// + public AzureHDInsightDefaultStorageAccount AdditionalLibraries { get; set; } + + /// + /// Gets or sets the configuration settings. + /// + [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", + Justification = "Needed for ease of use in Powershell invocation.")] + public Hashtable Configuration { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightHiveConfiguration.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightHiveConfiguration.cs new file mode 100644 index 000000000000..9c8fbfd90ae8 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightHiveConfiguration.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections; +using System.Diagnostics.CodeAnalysis; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects +{ + /// + /// Structure to contain Hadoop Map-Reduce service configuration. + /// + public class AzureHDInsightHiveConfiguration + { + /// + /// Initializes a new instance of the AzureHDInsightHiveConfiguration class. + /// + public AzureHDInsightHiveConfiguration() + { + this.Configuration = new Hashtable(); + } + + /// + /// Gets or sets the location for additional JAR files. + /// + public AzureHDInsightDefaultStorageAccount AdditionalLibraries { get; set; } + + /// + /// Gets or sets the configuration settings. + /// + [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", + Justification = "Needed for ease of use in Powershell invocation.")] + public Hashtable Configuration { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightHiveJobDefinition.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightHiveJobDefinition.cs new file mode 100644 index 000000000000..f512f6e681b0 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightHiveJobDefinition.cs @@ -0,0 +1,57 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects +{ + /// + /// Provides creation details for a new Hive jobDetails. + /// + public class AzureHDInsightHiveJobDefinition : AzureHDInsightJobDefinition + { + /// + /// Initializes a new instance of the AzureHDInsightHiveJobDefinition class. + /// + public AzureHDInsightHiveJobDefinition() + { + this.Defines = new Dictionary(); + } + + /// + /// Gets the parameters for the jobDetails. + /// + public IDictionary Defines { get; private set; } + + /// + /// Gets or sets the query file to use for a hive jobDetails. + /// + public string File { get; set; } + + /// + /// Gets or sets the name of the jobDetails. + /// + public string JobName { get; set; } + + /// + /// Gets or sets the query to use for a hive jobDetails. + /// + public string Query { get; set; } + + /// + /// Gets or sets the switch to run queries as files. + /// + public bool RunAsFileJob { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightJob.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightJob.cs new file mode 100644 index 000000000000..45770310864e --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightJob.cs @@ -0,0 +1,85 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.Hadoop.Client; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects +{ + /// + /// Represents an Azure HD Insight jobDetails for the PowerShell Cmdlets. + /// + public class AzureHDInsightJob : AzureHDInsightJobBase + { + /// + /// Initializes a new instance of the AzureHDInsightJob class. + /// + /// The HDInsight jobDetails. + /// The cluster that the jobDetails was created against. + public AzureHDInsightJob(JobDetails jobDetails, string cluster) : base(jobDetails) + { + jobDetails.ArgumentNotNull("jobDetails"); + this.ExitCode = jobDetails.ExitCode; + this.Name = jobDetails.Name; + this.Query = jobDetails.Query; + this.State = jobDetails.StatusCode.ToString(); + + this.Cluster = cluster; + this.StatusDirectory = jobDetails.StatusDirectory; + this.SubmissionTime = jobDetails.SubmissionTime; + this.PercentComplete = jobDetails.PercentComplete; + } + + /// + /// Gets or sets the cluster to which the jobDetails was submitted. + /// + public string Cluster { get; set; } + + /// + /// Gets the exit code for the jobDetails. + /// + public int? ExitCode { get; private set; } + + /// + /// Gets the name of the jobDetails. + /// + public string Name { get; private set; } + + /// + /// Gets or sets the percentage completion of the jobDetails. + /// + public string PercentComplete { get; set; } + + /// + /// Gets the query for the jobDetails (if it was a hive jobDetails). + /// + public string Query { get; private set; } + + /// + /// Gets the status code for the jobDetails. + /// + public string State { get; private set; } + + /// + /// Gets or sets the status directory for the jobDetails. + /// + public string StatusDirectory { get; set; } + + /// + /// Gets the time the jobDetails was submitted. + /// + public DateTime SubmissionTime { get; private set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightJobBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightJobBase.cs new file mode 100644 index 000000000000..e98b4873a828 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightJobBase.cs @@ -0,0 +1,40 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Hadoop.Client; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects +{ + /// + /// Provides the base class for an AzureHDInsightJob object. + /// + public class AzureHDInsightJobBase + { + /// + /// Initializes a new instance of the AzureHDInsightJobBase class. + /// + /// The HDInsight jobDetails. + public AzureHDInsightJobBase(JobDetails jobDetails) + { + jobDetails.ArgumentNotNull("jobDetails"); + this.JobId = jobDetails.JobId; + } + + /// + /// Gets the JobId returned by the request. + /// + public string JobId { get; private set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightJobDefinition.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightJobDefinition.cs new file mode 100644 index 000000000000..77a98a259afa --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightJobDefinition.cs @@ -0,0 +1,49 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Collections.ObjectModel; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects +{ + /// + /// Provides the details of an HDInsight jobDetails when creating the jobDetails. + /// + public abstract class AzureHDInsightJobDefinition + { + /// + /// Initializes a new instance of the AzureHDInsightJobDefinition class. + /// + protected AzureHDInsightJobDefinition() + { + this.Files = new List(); + this.Arguments = new Collection(); + } + + /// + /// Gets the arguments for the jobDetails. + /// + public ICollection Arguments { get; private set; } + + /// + /// Gets the resources for the jobDetails. + /// + public ICollection Files { get; private set; } + + /// + /// Gets or sets the status folder to use for the jobDetails. + /// + public string StatusFolder { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightMapReduceConfiguration.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightMapReduceConfiguration.cs new file mode 100644 index 000000000000..1435a171e248 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightMapReduceConfiguration.cs @@ -0,0 +1,48 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections; +using System.Diagnostics.CodeAnalysis; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects +{ + /// + /// Structure to contain Hadoop Map-Reduce service configuration. + /// + public class AzureHDInsightMapReduceConfiguration + { + /// + /// Initializes a new instance of the AzureHDInsightMapReduceConfiguration class. + /// + public AzureHDInsightMapReduceConfiguration() + { + this.Configuration = new Hashtable(); + this.CapacitySchedulerConfiguration = new Hashtable(); + } + + /// + /// Gets or sets the capacity scheduler settings. + /// + [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", + Justification = "Needed for ease of use in Powershell invocation.")] + public Hashtable CapacitySchedulerConfiguration { get; set; } + + /// + /// Gets or sets the configuration settings. + /// + [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", + Justification = "Needed for ease of use in Powershell invocation.")] + public Hashtable Configuration { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightMapReduceJobDefinition.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightMapReduceJobDefinition.cs new file mode 100644 index 000000000000..e9d5a88ccfa1 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightMapReduceJobDefinition.cs @@ -0,0 +1,97 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Microsoft.Hadoop.Client; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects +{ + /// + /// Provides creation details for a new MapReduce jobDetails. + /// + public class AzureHDInsightMapReduceJobDefinition : AzureHDInsightJobDefinition + { + /// + /// Initializes a new instance of the AzureHDInsightMapReduceJobDefinition class. + /// + public AzureHDInsightMapReduceJobDefinition() + { + this.LibJars = new List(); + this.Defines = new Dictionary(); + } + + /// + /// Gets or sets the class name to use for the jobDetails. + /// + public string ClassName { get; set; } + + /// + /// Gets the parameters for the jobDetails. + /// + public IDictionary Defines { get; private set; } + + /// + /// Gets or sets the jar file to use for the jobDetails. + /// + public string JarFile { get; set; } + + /// + /// Gets or sets the name of the jobDetails. + /// + public string JobName { get; set; } + + /// + /// Gets the libjars to use for the jobDetails. + /// + public ICollection LibJars { get; private set; } + + /// + /// Converts the Powershell object type to SDK object type. + /// + /// An SDK MapReduce object type. + internal MapReduceJobCreateParameters ToMapReduceJobCreateParameters() + { + var mapReduceJobDefinition = new MapReduceJobCreateParameters + { + ClassName = this.ClassName, + JarFile = this.JarFile, + JobName = this.JobName, + StatusFolder = this.StatusFolder + }; + + if (this.Arguments.IsNotNull()) + { + mapReduceJobDefinition.Arguments.AddRange(this.Arguments); + } + + if (this.Defines.IsNotNull()) + { + mapReduceJobDefinition.Defines.AddRange(this.Defines); + } + + if (this.Files.IsNotNull()) + { + mapReduceJobDefinition.Files.AddRange(this.Files); + } + + if (this.LibJars.IsNotNull()) + { + mapReduceJobDefinition.LibJars.AddRange(this.LibJars); + } + + return mapReduceJobDefinition; + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightMetastore.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightMetastore.cs new file mode 100644 index 000000000000..c75afa19d4ee --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightMetastore.cs @@ -0,0 +1,44 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects +{ + /// + /// Represents an AzureHDInsightMetastore. + /// + public class AzureHDInsightMetastore + { + /// + /// Gets or sets the Azure SQL Server user credentials. + /// + public PSCredential Credential { get; set; } + + /// + /// Gets or sets the Azure SQL Server database name. + /// + public string DatabaseName { get; set; } + + /// + /// Gets or sets the type of metastore represented by this object. + /// + public AzureHDInsightMetastoreType MetastoreType { get; set; } + + /// + /// Gets or sets the Azure SQL Server for the metastore. + /// + public string SqlAzureServerName { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightMetastoreType.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightMetastoreType.cs new file mode 100644 index 000000000000..18b19f342f2f --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightMetastoreType.cs @@ -0,0 +1,31 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects +{ + /// + /// Defines the type of an AzureHDInsight cluster metastore. + /// + public enum AzureHDInsightMetastoreType + { + /// + /// A Hive metastore. + /// + HiveMetastore, + + /// + /// An Oozie metastore. + /// + OozieMetastore, + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightOozieConfiguration.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightOozieConfiguration.cs new file mode 100644 index 000000000000..a73673092fd1 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightOozieConfiguration.cs @@ -0,0 +1,50 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections; +using System.Diagnostics.CodeAnalysis; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects +{ + /// + /// Structure to contain Hadoop Map-Reduce service configuration. + /// + public class AzureHDInsightOozieConfiguration + { + /// + /// Initializes a new instance of the AzureHDInsightOozieConfiguration class. + /// + public AzureHDInsightOozieConfiguration() + { + this.Configuration = new Hashtable(); + } + + /// + /// Gets or sets the location for additional JAR files. + /// + public AzureHDInsightDefaultStorageAccount AdditionalActionExecutorLibraries { get; set; } + + /// + /// Gets or sets the location for additional JAR files. + /// + public AzureHDInsightDefaultStorageAccount AdditionalSharedLibraries { get; set; } + + /// + /// Gets or sets the configuration settings. + /// + [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", + Justification = "Needed for ease of use in Powershell invocation.")] + public Hashtable Configuration { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightPigJobDefinition.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightPigJobDefinition.cs new file mode 100644 index 000000000000..e23ad6a48117 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightPigJobDefinition.cs @@ -0,0 +1,31 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects +{ + /// + /// Provides creation details for a new Pig jobDetails. + /// + public class AzureHDInsightPigJobDefinition : AzureHDInsightJobDefinition + { + /// + /// Gets or sets the query file to use for a pig jobDetails. + /// + public string File { get; set; } + + /// + /// Gets or sets the query to use for a pig jobDetails. + /// + public string Query { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightScriptAction.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightScriptAction.cs new file mode 100644 index 000000000000..2112b96a5a52 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightScriptAction.cs @@ -0,0 +1,41 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects +{ + using System; + + /// + /// Represents an AzureHDInsightScriptAction. + /// + public class AzureHDInsightScriptAction : AzureHDInsightConfigAction + { + /// + /// Gets or sets the uri of the script action. + /// + public Uri Uri { get; set; } + + /// + /// Gets or sets the parameters of the script action. + /// + public string Parameters { get; set; } + + /// + /// Convert this script action to SDK recognizable. + /// + public override ConfigAction ToSDKConfigAction() + { + return new ScriptAction(Name, ClusterRoleCollection, Uri, Parameters); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightSqoopJobDefinition.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightSqoopJobDefinition.cs new file mode 100644 index 000000000000..f2611481f833 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightSqoopJobDefinition.cs @@ -0,0 +1,51 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Hadoop.Client; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects +{ + /// + /// Provides creation details for a new Pig jobDetails. + /// + public class AzureHDInsightSqoopJobDefinition : AzureHDInsightJobDefinition + { + /// + /// Gets or sets the Command to use for a sqoop job. + /// + public string Command { get; set; } + + /// + /// Gets or sets the query file to use for a sqoop job. + /// + public string File { get; set; } + + /// + /// Creates a SDK object from the PSCmdlet object type. + /// + /// A SDK Sqoop job definition object. + internal SqoopJobCreateParameters ToSqoopJobCreateParameters() + { + var soopJobDefinition = new SqoopJobCreateParameters { Command = this.Command, File = this.File, StatusFolder = this.StatusFolder }; + + if (this.Files.IsNotNull()) + { + soopJobDefinition.Files.AddRange(this.Files); + } + + return soopJobDefinition; + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightStorageAccount.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightStorageAccount.cs new file mode 100644 index 000000000000..18922731f974 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightStorageAccount.cs @@ -0,0 +1,40 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects +{ + /// + /// Represents a Storage Account for an HD Insight Configuration. + /// + public class AzureHDInsightStorageAccount + { + /// + /// Gets or sets the Storage Account Key. + /// + public string StorageAccountKey { get; set; } + + /// + /// Gets or sets the Storage Account Name. + /// + public string StorageAccountName { get; set; } + + /// + /// Overrides the ToString() method to return the storage account name. + /// + /// The string representation of this object. + public override string ToString() + { + return this.StorageAccountName; + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightStreamingMapReduceJobDefinition.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightStreamingMapReduceJobDefinition.cs new file mode 100644 index 000000000000..a8e8395270b6 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/AzureHDInsightStreamingMapReduceJobDefinition.cs @@ -0,0 +1,97 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Collections.ObjectModel; +using Microsoft.Hadoop.Client; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects +{ + /// + /// Provides creation details for a new Streaming jobDetails. + /// + public class AzureHDInsightStreamingMapReduceJobDefinition : AzureHDInsightJobDefinition + { + /// + /// Initializes a new instance of the AzureHDInsightStreamingMapReduceJobDefinition class. + /// + public AzureHDInsightStreamingMapReduceJobDefinition() + { + this.CommandEnvironment = new Collection(); + this.Defines = new Dictionary(); + } + + /// + /// Gets or sets the Combiner. + /// + public string Combiner { get; set; } + + /// + /// Gets the command line environment for the mappers or the reducers. + /// + public ICollection CommandEnvironment { get; private set; } + + /// + /// Gets the parameters for the jobDetails. + /// + public IDictionary Defines { get; private set; } + + /// + /// Gets or sets the location of the input data in Hadoop. + /// + public string Input { get; set; } + + /// + /// Gets or sets the name of the jobDetails. + /// + public string JobName { get; set; } + + /// + /// Gets or sets the Mapper. + /// + public string Mapper { get; set; } + + /// + /// Gets or sets the Location in which to store the output data. + /// + public string Output { get; set; } + + /// + /// Gets or sets the Reducer. + /// + public string Reducer { get; set; } + + internal StreamingMapReduceJobCreateParameters ToStreamingMapReduceJobCreateParameters() + { + var streamingJobDefinition = new StreamingMapReduceJobCreateParameters + { + JobName = this.JobName, + Input = this.Input, + Output = this.Output, + Reducer = this.Reducer, + Combiner = this.Combiner, + Mapper = this.Mapper, + StatusFolder = this.StatusFolder + }; + + streamingJobDefinition.CommandEnvironment.AddRange(this.CommandEnvironment); + streamingJobDefinition.Arguments.AddRange(this.Arguments); + streamingJobDefinition.Defines.AddRange(this.Defines); + streamingJobDefinition.Files.AddRange(this.Files); + + return streamingJobDefinition; + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/JobOutputType.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/JobOutputType.cs new file mode 100644 index 000000000000..3ddc0342fc01 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/DataObjects/JobOutputType.cs @@ -0,0 +1,41 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects +{ + /// + /// Enumeration of possible jobDetails output types. + /// + public enum JobOutputType + { + /// + /// Specifies that the jobDetails output file to download is the stdout file. + /// + StandardOutput, + + /// + /// Specifies that the jobDetails output file to download is the stderr file. + /// + StandardError, + + /// + /// Specifies that the jobDetails output file to download is the logs/list.txt file. + /// + TaskSummary, + + /// + /// Specifies that the jobDetails files under logs/ folder should be downloaded. + /// + TaskLogs + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightClientFactory.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightClientFactory.cs new file mode 100644 index 000000000000..cbe239985b0b --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightClientFactory.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.BaseInterfaces; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters +{ + internal class AzureHDInsightClusterManagementClientFactory : IAzureHDInsightClusterManagementClientFactory + { + public IHDInsightClient Create(IHDInsightSubscriptionCredentials credentials) + { + return HDInsightClient.Connect(credentials); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightClusterCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightClusterCommand.cs new file mode 100644 index 000000000000..d41904a18273 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightClusterCommand.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Collections.ObjectModel; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters +{ + internal abstract class AzureHDInsightClusterCommand : AzureHDInsightClusterCommandBase, IAzureHDInsightCommand + { + public AzureHDInsightClusterCommand() + { + this.Output = new Collection(); + } + + public ICollection Output { get; private set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightClusterCommandBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightClusterCommandBase.cs new file mode 100644 index 000000000000..1b7efc87dd02 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightClusterCommandBase.cs @@ -0,0 +1,59 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Threading; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.BaseInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters +{ + internal abstract class AzureHDInsightClusterCommandBase : AzureHDInsightCommandBase, IAzureHDInsightClusterCommandBase + { + private readonly CancellationTokenSource tokenSource = new CancellationTokenSource(); + + public override CancellationToken CancellationToken + { + get { return this.tokenSource.Token; } + } + + public string Name { get; set; } + + public override void Cancel() + { + this.tokenSource.Cancel(); + } + + internal IHDInsightClient GetClient() + { + this.CurrentSubscription.ArgumentNotNull("CurrentSubscription"); + + ProfileClient client = new ProfileClient(); + + var subscriptionCredentials = this.GetSubscriptionCredentials( + this.CurrentSubscription, + client.GetEnvironmentOrDefault(this.CurrentSubscription.Environment), + client.Profile); + var clientInstance = ServiceLocator.Instance.Locate().Create(subscriptionCredentials); + clientInstance.SetCancellationSource(this.tokenSource); + if (this.Logger.IsNotNull()) + { + clientInstance.AddLogWriter(this.Logger); + } + + return clientInstance; + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightCommand.cs new file mode 100644 index 000000000000..524c978850a1 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightCommand.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Collections.ObjectModel; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters +{ + internal abstract class AzureHDInsightCommand : AzureHDInsightCommandBase, IAzureHDInsightCommand + { + public AzureHDInsightCommand() + { + this.Output = new Collection(); + } + + public ICollection Output { get; private set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightCommandBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightCommandBase.cs new file mode 100644 index 000000000000..b4a0ca978f5d --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightCommandBase.cs @@ -0,0 +1,50 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Security.Cryptography.X509Certificates; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Management.HDInsight.Framework.Core; +using Microsoft.WindowsAzure.Management.HDInsight.Logging; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters +{ + internal abstract class AzureHDInsightCommandBase : DisposableObject, IAzureHDInsightCommandBase + { + public virtual CancellationToken CancellationToken + { + get { return CancellationToken.None; } + } + + public X509Certificate2 Certificate { get; set; } + + public string HostedService { get; set; } + + public Uri Endpoint { get; set; } + + public ILogWriter Logger { get; set; } + + public string Subscription { get; set; } + + public AzureSubscription CurrentSubscription { get; set; } + + public virtual void Cancel() + { + } + + public abstract Task EndProcessing(); + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightCommandExtensions.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightCommandExtensions.cs new file mode 100644 index 000000000000..07e347d88d3b --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightCommandExtensions.cs @@ -0,0 +1,130 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Reflection; +using Microsoft.Hadoop.Client; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Factories; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common.Authentication; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.BaseInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; +using System.Diagnostics; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters +{ + internal static class AzureHDInsightCommandExtensions + { + public static IHDInsightSubscriptionCredentials GetSubscriptionCredentials( + this IAzureHDInsightCommonCommandBase command, + AzureSubscription currentSubscription, + AzureEnvironment environment, + AzureProfile profile) + { + var accountId = currentSubscription.Account; + Debug.Assert(profile.Accounts.ContainsKey(accountId)); + + if (profile.Accounts[accountId].Type == AzureAccount.AccountType.Certificate) + { + return GetSubscriptionCertificateCredentials(command, currentSubscription, profile.Accounts[accountId], environment); + } + else if (profile.Accounts[accountId].Type == AzureAccount.AccountType.User) + { + return GetAccessTokenCredentials(command, currentSubscription, profile.Accounts[accountId], environment); + } + else if (profile.Accounts[accountId].Type == AzureAccount.AccountType.ServicePrincipal) + { + return GetAccessTokenCredentials(command, currentSubscription, profile.Accounts[accountId], environment); + } + + throw new NotSupportedException(); + } + + public static IHDInsightSubscriptionCredentials GetSubscriptionCertificateCredentials(this IAzureHDInsightCommonCommandBase command, + AzureSubscription currentSubscription, AzureAccount azureAccount, AzureEnvironment environment) + { + return new HDInsightCertificateCredential + { + SubscriptionId = currentSubscription.Id, + Certificate = ProfileClient.DataStore.GetCertificate(currentSubscription.Account), + Endpoint = environment.GetEndpointAsUri(AzureEnvironment.Endpoint.ServiceManagement), + }; + } + + public static IHDInsightSubscriptionCredentials GetAccessTokenCredentials(this IAzureHDInsightCommonCommandBase command, + AzureSubscription currentSubscription, AzureAccount azureAccount, AzureEnvironment environment) + { + ProfileClient profileClient = new ProfileClient(); + AzureContext azureContext = new AzureContext + { + Subscription = currentSubscription, + Environment = environment, + Account = azureAccount + }; + + var cloudCredentials = AzureSession.AuthenticationFactory.GetSubscriptionCloudCredentials(azureContext) as AccessTokenCredential; + if (cloudCredentials != null) + { + var field= typeof(AccessTokenCredential).GetField("token", BindingFlags.NonPublic | BindingFlags.GetField | BindingFlags.Instance); + var accessToken = field.GetValue(cloudCredentials) as IAccessToken; + if (accessToken != null) + { + return new HDInsightAccessTokenCredential() + { + SubscriptionId = currentSubscription.Id, + AccessToken = accessToken.AccessToken + }; + } + } + return null; + } + + public static IJobSubmissionClientCredential GetJobSubmissionClientCredentials( + this IAzureHDInsightJobCommandCredentialsBase command, + AzureSubscription currentSubscription, + AzureEnvironment environment, string cluster, + AzureProfile profile) + { + IJobSubmissionClientCredential clientCredential = null; + if (command.Credential != null) + { + clientCredential = new BasicAuthCredential + { + Server = GatewayUriResolver.GetGatewayUri(cluster), + UserName = command.Credential.UserName, + Password = command.Credential.GetCleartextPassword() + }; + } + else if (currentSubscription.IsNotNull()) + { + var subscriptionCredentials = GetSubscriptionCredentials(command, currentSubscription, environment, profile); + var asCertificateCredentials = subscriptionCredentials as HDInsightCertificateCredential; + var asTokenCredentials = subscriptionCredentials as HDInsightAccessTokenCredential; + if (asCertificateCredentials.IsNotNull()) + { + clientCredential = new JobSubmissionCertificateCredential(asCertificateCredentials, cluster); + } + else if (asTokenCredentials.IsNotNull()) + { + clientCredential = new JobSubmissionAccessTokenCredential(asTokenCredentials, cluster); + } + } + + return clientCredential; + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightCommandFactory.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightCommandFactory.cs new file mode 100644 index 000000000000..d1ad4e85204d --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightCommandFactory.cs @@ -0,0 +1,143 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters +{ + internal class AzureHDInsightCommandFactory : IAzureHDInsightCommandFactory + { + public IAddAzureHDInsightConfigValuesCommand CreateAddConfig() + { + return Help.SafeCreate(); + } + + public IAddAzureHDInsightMetastoreCommand CreateAddMetastore() + { + return Help.SafeCreate(); + } + + public IAddAzureHDInsightScriptActionCommand CreateAddScriptAction() + { + return Help.SafeCreate(); + } + + public IAddAzureHDInsightStorageCommand CreateAddStorage() + { + return new AddAzureHDInsightStorageCommand(); + } + + public INewAzureHDInsightClusterCommand CreateCreate() + { + return Help.SafeCreate(); + } + + public IRemoveAzureHDInsightClusterCommand CreateDelete() + { + return Help.SafeCreate(); + } + + public IGetAzureHDInsightClusterCommand CreateGet() + { + return Help.SafeCreate(); + } + + public IGetAzureHDInsightJobOutputCommand CreateGetJobOutput() + { + return Help.SafeCreate(); + } + + public IGetAzureHDInsightJobCommand CreateGetJobs() + { + return Help.SafeCreate(); + } + + public IGetAzureHDInsightPropertiesCommand CreateGetProperties() + { + return Help.SafeCreate(); + } + + public IInvokeHiveCommand CreateInvokeHive() + { + return new InvokeHiveCommand(); + } + + public IManageAzureHDInsightHttpAccessCommand CreateManageHttpAccess() + { + return Help.SafeCreate(); + } + + public INewAzureHDInsightClusterConfigCommand CreateNewConfig() + { + return Help.SafeCreate(); + } + + public INewAzureHDInsightHiveJobDefinitionCommand CreateNewHiveDefinition() + { + return Help.SafeCreate(); + } + + public INewAzureHDInsightMapReduceJobDefinitionCommand CreateNewMapReduceDefinition() + { + return Help.SafeCreate(); + } + + public INewAzureHDInsightPigJobDefinitionCommand CreateNewPigJobDefinition() + { + return Help.SafeCreate(); + } + + public INewAzureHDInsightSqoopJobDefinitionCommand CreateNewSqoopDefinition() + { + return Help.SafeCreate(); + } + + public INewAzureHDInsightStreamingJobDefinitionCommand CreateNewStreamingMapReduceDefinition() + { + return Help.SafeCreate(); + } + + public ISetAzureHDInsightClusterSizeCommand CreateSetClusterSize() + { + return Help.SafeCreate(); + } + + public ISetAzureHDInsightDefaultStorageCommand CreateSetDefaultStorage() + { + return Help.SafeCreate(); + } + + public IStartAzureHDInsightJobCommand CreateStartJob() + { + return Help.SafeCreate(); + } + + public IStopAzureHDInsightJobCommand CreateStopJob() + { + return Help.SafeCreate(); + } + + public IUseAzureHDInsightClusterCommand CreateUseCluster() + { + return Help.SafeCreate(); + } + + public IWaitAzureHDInsightJobCommand CreateWaitJobs() + { + return Help.SafeCreate(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightConnectionSessionManager.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightConnectionSessionManager.cs new file mode 100644 index 000000000000..5e7cc22ec268 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightConnectionSessionManager.cs @@ -0,0 +1,47 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters +{ + internal class AzureHDInsightConnectionSessionManager : IAzureHDInsightConnectionSessionManager + { + private const string CurrentClusterVariableName = "_hdinsightCurrentCluster"; + + private readonly SessionState sessionState; + + public AzureHDInsightConnectionSessionManager(SessionState sessionState) + { + this.sessionState = sessionState; + } + + public AzureHDInsightClusterConnection GetCurrentCluster() + { + PSVariable currentClusterVariable = this.sessionState.PSVariable.Get(CurrentClusterVariableName); + if (currentClusterVariable == null) + { + return null; + } + + return (AzureHDInsightClusterConnection)currentClusterVariable.Value; + } + + public void SetCurrentCluster(AzureHDInsightClusterConnection cluster) + { + this.sessionState.PSVariable.Set(CurrentClusterVariableName, cluster); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightConnectionSessionManagerFactory.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightConnectionSessionManagerFactory.cs new file mode 100644 index 000000000000..ee49c8984c2b --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightConnectionSessionManagerFactory.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters +{ + internal class AzureHDInsightConnectionSessionManagerFactory : IAzureHDInsightConnectionSessionManagerFactory + { + public IAzureHDInsightConnectionSessionManager Create(SessionState sessionState) + { + return new AzureHDInsightConnectionSessionManager(sessionState); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightJobCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightJobCommand.cs new file mode 100644 index 000000000000..c3a6091aa69d --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightJobCommand.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Collections.ObjectModel; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters +{ + internal abstract class AzureHDInsightJobCommand : AzureHDInsightJobCommandBase, IAzureHDInsightCommand + { + public AzureHDInsightJobCommand() + { + this.Output = new Collection(); + } + + public ICollection Output { get; private set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightJobCommandBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightJobCommandBase.cs new file mode 100644 index 000000000000..79745fb20156 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightJobCommandBase.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.BaseInterfaces; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters +{ + internal abstract class AzureHDInsightJobCommandBase : AzureHDInsightJobCommandExecutorBase, IAzureHDInsightJobCommandBase + { + public string Cluster { get; set; } + + public string JobId { get; set; } + + public string Name { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightJobCommandExecutorBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightJobCommandExecutorBase.cs new file mode 100644 index 000000000000..d2d26f9dc1a3 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightJobCommandExecutorBase.cs @@ -0,0 +1,74 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Diagnostics.CodeAnalysis; +using System.Management.Automation; +using System.Threading; +using Microsoft.Hadoop.Client; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.BaseInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters +{ + internal abstract class AzureHDInsightJobCommandExecutorBase : AzureHDInsightCommandBase, IAzureHDInsightJobCommandCredentialsBase + { + protected CancellationTokenSource tokenSource = new CancellationTokenSource(); + + public override CancellationToken CancellationToken + { + get { return this.tokenSource.Token; } + } + + public PSCredential Credential { get; set; } + + public override void Cancel() + { + this.tokenSource.Cancel(); + } + + [SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", + Justification = "Url resolution is done when the EndProcessing method is called.")] + internal IJobSubmissionClient GetClient(string cluster) + { + cluster.ArgumentNotNull("ClusterEndpoint"); + IJobSubmissionClient client = null; + ProfileClient profileClient = new ProfileClient(); + + string currentEnvironmentName = this.CurrentSubscription == null ? null : this.CurrentSubscription.Environment; + + var clientCredential = this.GetJobSubmissionClientCredentials( + this.CurrentSubscription, + profileClient.GetEnvironmentOrDefault(currentEnvironmentName), + cluster, + profileClient.Profile); + if (clientCredential != null) + { + client = ServiceLocator.Instance.Locate().Create(clientCredential); + client.SetCancellationSource(this.tokenSource); + if (this.Logger.IsNotNull()) + { + client.AddLogWriter(this.Logger); + } + + return client; + } + + throw new InvalidOperationException("Expected either a Subscription or Credential parameter."); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightJobExecutorCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightJobExecutorCommand.cs new file mode 100644 index 000000000000..fc5a8a63d89e --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightJobExecutorCommand.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Collections.ObjectModel; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters +{ + internal abstract class AzureHDInsightJobExecutorCommand : AzureHDInsightJobCommandExecutorBase, IAzureHDInsightCommand + { + public AzureHDInsightJobExecutorCommand() + { + this.Output = new Collection(); + } + + public ICollection Output { get; private set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightJobSubmissionClientFactory.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightJobSubmissionClientFactory.cs new file mode 100644 index 000000000000..cc789a76a27c --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightJobSubmissionClientFactory.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Hadoop.Client; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.BaseInterfaces; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters +{ + internal class AzureHDInsightJobSubmissionClientFactory : IAzureHDInsightJobSubmissionClientFactory + { + public IJobSubmissionClient Create(IJobSubmissionClientCredential credentials) + { + return JobSubmissionClientFactory.Connect(credentials); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightNewJobDefinitionCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightNewJobDefinitionCommand.cs new file mode 100644 index 000000000000..f6476d33dd58 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightNewJobDefinitionCommand.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Collections.ObjectModel; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters +{ + internal abstract class AzureHDInsightNewJobDefinitionCommand : AzureHDInsightNewJobDefinitionCommandBase, IAzureHDInsightCommand + { + public AzureHDInsightNewJobDefinitionCommand() + { + this.Output = new Collection(); + } + + public ICollection Output { get; private set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightNewJobDefinitionCommandBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightNewJobDefinitionCommandBase.cs new file mode 100644 index 000000000000..dc24c4e34b4f --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightNewJobDefinitionCommandBase.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters +{ + internal abstract class AzureHDInsightNewJobDefinitionCommandBase : AzureHDInsightCommandBase, INewAzureHDInsightJobConfigBase + { + public abstract Hashtable Defines { get; set; } + + public abstract string[] Files { get; set; } + + public abstract string StatusFolder { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightSubscriptionResolver.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightSubscriptionResolver.cs new file mode 100644 index 000000000000..893d8ba2b11e --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightSubscriptionResolver.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.BaseInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters +{ + + + internal class AzureHDInsightSubscriptionResolver : IAzureHDInsightSubscriptionResolver + { + private readonly AzureProfile profile; + + public AzureHDInsightSubscriptionResolver(AzureProfile profile) + { + this.profile = profile; + } + + public AzureSubscription ResolveSubscription(string subscription) + { + var resolvedSubscription = this.profile.Subscriptions.Values.FirstOrDefault(s => s.Id == new Guid(subscription)); + if (resolvedSubscription.IsNull()) + { + resolvedSubscription = this.profile.Subscriptions.Values.FirstOrDefault(s => s.Name == subscription); + } + + return resolvedSubscription; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightSubscriptionResolverFactory.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightSubscriptionResolverFactory.cs new file mode 100644 index 000000000000..0da5844a0e5b --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/AzureHDInsightSubscriptionResolverFactory.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.BaseInterfaces; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters +{ + internal class AzureHDInsightSubscriptionResolverFactory : IAzureHDInsightSubscriptionResolverFactory + { + public IAzureHDInsightSubscriptionResolver Create(AzureProfile profile) + { + return new AzureHDInsightSubscriptionResolver(profile); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightClusterCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightClusterCommand.cs new file mode 100644 index 000000000000..89bd9850d9dc --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightClusterCommand.cs @@ -0,0 +1,19 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.BaseInterfaces +{ + internal interface IAzureHDInsightClusterCommand : IAzureHDInsightClusterCommandBase, IAzureHDInsightCommand + { + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightClusterCommandBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightClusterCommandBase.cs new file mode 100644 index 000000000000..b565436f89f6 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightClusterCommandBase.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.BaseInterfaces; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters +{ + internal interface IAzureHDInsightClusterCommandBase : IAzureHDInsightCommonCommandBase + { + /// + /// Gets or sets the Name for the cluster to return. + /// + string Name { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightClusterManagementClientFactory.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightClusterManagementClientFactory.cs new file mode 100644 index 000000000000..0ddcc4a0f0a7 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightClusterManagementClientFactory.cs @@ -0,0 +1,20 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.BaseInterfaces +{ + internal interface IAzureHDInsightClusterManagementClientFactory + { + IHDInsightClient Create(IHDInsightSubscriptionCredentials credentials); + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightCommand.cs new file mode 100644 index 000000000000..36fbdc7041f8 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightCommand.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters +{ + /// + /// Represents an underlying command for an AzureHDInsight Cmdlet. + /// + /// + /// The type of values that would be returned by the Cmdlet. + /// + internal interface IAzureHDInsightCommand : IAzureHDInsightCommandBase + { + ICollection Output { get; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightCommandBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightCommandBase.cs new file mode 100644 index 000000000000..1817da51d5bd --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightCommandBase.cs @@ -0,0 +1,32 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Threading; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Commands.Common.Models; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters +{ + + internal interface IAzureHDInsightCommandBase + { + CancellationToken CancellationToken { get; } + + void Cancel(); + + Task EndProcessing(); + + AzureSubscription CurrentSubscription { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightCommonCommandBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightCommonCommandBase.cs new file mode 100644 index 000000000000..15c1c8cadb2e --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightCommonCommandBase.cs @@ -0,0 +1,48 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Security.Cryptography.X509Certificates; +using Microsoft.WindowsAzure.Management.HDInsight.Logging; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.BaseInterfaces +{ + internal interface IAzureHDInsightCommonCommandBase + { + /// + /// Gets or sets the certificate File to be used. + /// + X509Certificate2 Certificate { get; set; } + + /// + /// Gets or sets the cloud service name to use (if provided). + /// + string HostedService { get; set; } + + /// + /// Gets or sets the Endpoint URI to use (if provided). + /// + Uri Endpoint { get; set; } + + /// + /// Gets or sets a logger to write log messages to. + /// + ILogWriter Logger { get; set; } + + /// + /// Gets or sets the Azure Subscription to be used. + /// + string Subscription { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightJobCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightJobCommand.cs new file mode 100644 index 000000000000..d806c0c94a9d --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightJobCommand.cs @@ -0,0 +1,19 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.BaseInterfaces +{ + internal interface IAzureHDInsightJobCommand : IAzureHDInsightClusterCommandBase, IAzureHDInsightCommand + { + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightJobCommandBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightJobCommandBase.cs new file mode 100644 index 000000000000..a786b1dfb368 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightJobCommandBase.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.BaseInterfaces +{ + internal interface IAzureHDInsightJobCommandBase : IAzureHDInsightJobCommandCredentialsBase + { + /// + /// Gets or sets the HDInsight cluster to connect to. + /// + string Cluster { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightJobCommandCredentialsBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightJobCommandCredentialsBase.cs new file mode 100644 index 000000000000..fe16bd78f611 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightJobCommandCredentialsBase.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.BaseInterfaces +{ + internal interface IAzureHDInsightJobCommandCredentialsBase : IAzureHDInsightCommonCommandBase + { + /// + /// Gets or sets Credential to connect to the HDInsight cluster. + /// + PSCredential Credential { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightJobSubmissionClientFactory.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightJobSubmissionClientFactory.cs new file mode 100644 index 000000000000..e6b4dd37ab17 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightJobSubmissionClientFactory.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Hadoop.Client; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.BaseInterfaces +{ + internal interface IAzureHDInsightJobSubmissionClientFactory + { + IJobSubmissionClient Create(IJobSubmissionClientCredential credentials); + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightSubscriptionResolver.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightSubscriptionResolver.cs new file mode 100644 index 000000000000..365eb5274966 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightSubscriptionResolver.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Common.Models; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.BaseInterfaces +{ + internal interface IAzureHDInsightSubscriptionResolver + { + AzureSubscription ResolveSubscription(string subscription); + } +} \ No newline at end of file diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightSubscriptionResolverFactory.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightSubscriptionResolverFactory.cs new file mode 100644 index 000000000000..9f6f04fe28d6 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/BaseInterfaces/IAzureHDInsightSubscriptionResolverFactory.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Common.Models; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.BaseInterfaces +{ + internal interface IAzureHDInsightSubscriptionResolverFactory + { + IAzureHDInsightSubscriptionResolver Create(AzureProfile profile); + } +} \ No newline at end of file diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/CollectionExtensions.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/CollectionExtensions.cs new file mode 100644 index 000000000000..406a1142728a --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/CollectionExtensions.cs @@ -0,0 +1,54 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions +{ + /// + /// Adds Extension methods to the ICollection(of T) objects. + /// + internal static class CollectionExtensions + { + /// + /// Allows a range of objects IEnumerable(of T) to be added to the collection. + /// + /// + /// The Type of objects in the collection. + /// + /// + /// The collection that this extension method is extending. + /// + /// + /// The IEnumerable(of T) of objects in the collection. + /// + public static void AddRange(this ICollection collection, IEnumerable items) + { + if (collection.IsNull()) + { + throw new ArgumentNullException("collection"); + } + if (items.IsNull()) + { + throw new ArgumentNullException("items"); + } + + foreach (T item in items) + { + collection.Add(item); + } + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/ExceptionExtensions.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/ExceptionExtensions.cs new file mode 100644 index 000000000000..a09479979b5f --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/ExceptionExtensions.cs @@ -0,0 +1,76 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Reflection; +using System.Threading.Tasks; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions +{ + /// + /// Provides a set of extension over the Exception class. + /// + internal static class ExceptionExtensions + { + /// + /// Gets the first usable exception for this exception. + /// This method undoes Target Invoke, Aggregate Exception and + /// Task Canceled Exceptions. + /// + /// + /// The exception to be converted. + /// + /// + /// The first "non wrapping" exception that can be found based + /// on unwrapping rules. + /// + public static Exception GetFirstException(this Exception ex) + { + var asAgg = ex as AggregateException; + if (asAgg.IsNotNull()) + { + AggregateException exs = asAgg.Flatten(); + if (exs.InnerException.IsNotNull()) + { + return exs.InnerException.GetFirstException(); + } + } + var asTargetOfInvoke = ex as TargetInvocationException; + if (asTargetOfInvoke.IsNotNull()) + { + return asTargetOfInvoke.InnerException.GetFirstException(); + } + var asTaskCancel = ex as TaskCanceledException; + if (asTaskCancel.IsNotNull()) + { + if (asTaskCancel.InnerException.IsNotNull()) + { + return asTaskCancel.InnerException.GetFirstException(); + } + } + return ex; + } + + /// + /// Rethrows an exception based on unwrapping rules. + /// + /// + /// The exception to rethrow. + /// + public static void Rethrow(this Exception ex) + { + throw ex.GetFirstException(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/Help.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/Help.cs new file mode 100644 index 000000000000..fe0fec70fd81 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/Help.cs @@ -0,0 +1,98 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Diagnostics.CodeAnalysis; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions +{ + /// + /// Helper class to provide some useful functions. + /// + internal static class Help + { + /// + /// Safely creates a disposable object with a default constructor. + /// + /// + /// The type of object to create. + /// + /// + /// The disposable object that has been safely created. + /// + public static T SafeCreate() where T : class, IDisposable, new() + { + T retval = null; + try + { + retval = new T(); + } + catch (Exception) + { + if (retval.IsNotNull()) + { + retval.Dispose(); + } + throw; + } + return retval; + } + + /// + /// Safely creates a disposable object with a custom constructor. + /// + /// + /// The type of object to create. + /// + /// + /// The factory method used to construct the object. + /// + /// + /// The disposable object that has been safely created. + /// + public static T SafeCreate(Func factory) where T : class, IDisposable + { + if (factory.IsNull()) + { + throw new ArgumentNullException("factory"); + } + T retval = null; + try + { + retval = factory(); + } + catch (Exception) + { + if (retval.IsNotNull()) + { + retval.Dispose(); + } + throw; + } + return retval; + } + + /// + /// Performs No Action (used to make use of unused, until they are used). + /// + /// + /// The inputs to the function. + /// + [SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "inputs", + Justification = "This method is designed for the very purpose of moving around this warning. [tgs]")] + public static void DoNothing(params object[] inputs) + { + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/NullLogWriter.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/NullLogWriter.cs new file mode 100644 index 000000000000..384cb07bc5c1 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/NullLogWriter.cs @@ -0,0 +1,25 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Logging; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions +{ + internal class NullLogWriter : ILogWriter + { + public void Log(Severity severity, Verbosity verbosity, string content) + { + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/ObjectExtensions.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/ObjectExtensions.cs new file mode 100644 index 000000000000..a5435b6bb659 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/ObjectExtensions.cs @@ -0,0 +1,152 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions +{ + /// + /// Provides extensions methods to the Object class. + /// + internal static class ObjectExtensions + { + /// + /// Throws if the specified object is null. + /// + /// The object. + /// The argumentName. + /// Thrown if the argument is null. + public static void ArgumentNotNull([ValidatedNotNull] this object inputValue, string argumentName) + { + if (ReferenceEquals(inputValue, null)) + { + throw new ArgumentNullException(argumentName); + } + } + + /// + /// Throws if the specified string is null or empty. + /// + /// The string. + /// The argumentName. + /// Thrown if the argument is null or empty. + public static void ArgumentNotNullOrEmpty([ValidatedNotNull] this string inputValue, string argumentName) + { + if (string.IsNullOrEmpty(inputValue)) + { + throw new ArgumentNullException(argumentName); + } + } + + /// + /// Performs an as operation on the supplied object. + /// + /// The target type of the as operation. + /// The object. + /// The result of the as operation. + public static T As(this object inputValue) where T : class + { + return inputValue as T; + } + + /// + /// Casts the specified obj. + /// + /// The target type of the cast. + /// The object. + /// The result of the cast. + public static T CastTo(this object inputValue) + { + return (T)inputValue; + } + + /// + /// Evaluates type compatibility. + /// + /// The type to evaluate against. + /// The object to evaluate compatibility for. + /// True if the object is compatible otherwise false. + public static bool Is(this object inputValue) + { + return inputValue is T; + } + + /// + /// Determines whether the specified object is not null. + /// + /// The object. + /// + /// true if the specified object is not null; otherwise, false . + /// + public static bool IsNotNull([ValidatedNotNull] this object inputValue) + { + return !ReferenceEquals(inputValue, null); + } + + /// + /// Determines whether the specified object is null. + /// + /// The object. + /// + /// true if the specified object is null; otherwise, false . + /// + public static bool IsNull([ValidatedNotNull] this object inputValue) + { + return ReferenceEquals(inputValue, null); + } + + /// + /// Returns an IEnumerable(of T) containing the supplied object as it's only entry. + /// + /// + /// The type of IEnumerable to return. + /// + /// + /// The item to be used to create the enumerable. + /// + /// + /// An IEnumerable(of T) containing the supplied object. + /// + public static IEnumerable MakeEnumeration(this T item) + { + var results = new List(); + results.Add(item); + return results; + } + + /// + /// Converts a hashtable into an enumerable of KeyValue pairs. + /// + /// The hashtable To convert. + /// An enumerable of Key-Value pairs. + public static IEnumerable> ToKeyValuePairs(this Hashtable hashtable) + { + if (hashtable == null) + { + return Enumerable.Empty>(); + } + + var keys = new List>(); + foreach (object key in hashtable.Keys) + { + keys.Add(new KeyValuePair(key.ToString(), hashtable[key].ToString())); + } + + return keys; + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/PSCredentialsExtensionMethods.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/PSCredentialsExtensionMethods.cs new file mode 100644 index 000000000000..a84bf3685861 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/PSCredentialsExtensionMethods.cs @@ -0,0 +1,48 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Runtime.InteropServices; +using System.Security; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters +{ + internal static class PsCredentialsExtensionMethods + { + internal static string GetCleartextFromSecureString(SecureString secureString) + { + secureString.ArgumentNotNull("secureString"); + IntPtr bstr = Marshal.SecureStringToBSTR(secureString); + string clearTextValue; + try + { + clearTextValue = Marshal.PtrToStringBSTR(bstr); + } + finally + { + Marshal.FreeBSTR(bstr); + } + + return clearTextValue; + } + + internal static string GetCleartextPassword(this PSCredential credentials) + { + credentials.ArgumentNotNull("credentials"); + return GetCleartextFromSecureString(credentials.Password); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/PsCmdletExtensions.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/PsCmdletExtensions.cs new file mode 100644 index 000000000000..3aa2778acac9 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/PsCmdletExtensions.cs @@ -0,0 +1,42 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions +{ + internal static class PsCmdletExtensions + { + public static AzureHDInsightClusterConnection AssertValidConnection(this PSCmdlet cmdlet) + { + IAzureHDInsightConnectionSessionManager sessionManager = + ServiceLocator.Instance.Locate().Create(cmdlet.SessionState); + AzureHDInsightClusterConnection currentConnection = sessionManager.GetCurrentCluster(); + if (currentConnection == null) + { + cmdlet.ThrowTerminatingError( + new ErrorRecord( + new NotSupportedException("Please connect to a valid Azure HDInsight cluster before calling this cmdlet."), + "1024", + ErrorCategory.ConnectionError, + cmdlet)); + } + + return currentConnection; + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/QueueExtensions.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/QueueExtensions.cs new file mode 100644 index 000000000000..542cde43d6f0 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/QueueExtensions.cs @@ -0,0 +1,82 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions +{ + /// + /// Provides extension methods for Queues. + /// + internal static class QueueExtensions + { + /// + /// Adds an item to the Queue. This is the same as an Enqueue operation. + /// + /// + /// The type of the item stored in the queue. + /// + /// + /// The queue. + /// + /// + /// The item to add. + /// + public static void Add(this Queue queue, T item) + { + queue.ArgumentNotNull("queue"); + queue.Enqueue(item); + } + + /// + /// Adds a range of items to the queue. + /// + /// + /// The type of the item stored in the queue. + /// + /// + /// The queue. + /// + /// + /// The items to be added (they will be added in the order presented). + /// + public static void AddRange(this Queue queue, IEnumerable items) + { + queue.ArgumentNotNull("queue"); + items.ArgumentNotNull("items"); + foreach (T item in items) + { + queue.Add(item); + } + } + + /// + /// Removes an item from the Queuue. This is the same as a Dequeue operation. + /// + /// + /// The type of the item stored in the queue. + /// + /// + /// The queue. + /// + /// + /// The next item in the queue. + /// + public static T Remove(this Queue queue) + { + queue.ArgumentNotNull("queue"); + return queue.Dequeue(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/StackExtensions.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/StackExtensions.cs new file mode 100644 index 000000000000..489208f0fcf2 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/StackExtensions.cs @@ -0,0 +1,82 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions +{ + /// + /// Provides extension methods for Stacks. + /// + internal static class StackExtensions + { + /// + /// Adds an Item to the stack. This is the same as a Push operation. + /// + /// + /// The type of items stored in the stack. + /// + /// + /// The stack. + /// + /// + /// The item to be added. + /// + public static void Add(this Stack stack, T item) + { + stack.ArgumentNotNull("stack"); + stack.Push(item); + } + + /// + /// Adds a range of items onto the stack. This is the same as multiple push operations. + /// + /// + /// The type of items stored in the stack. + /// + /// + /// The stack. + /// + /// + /// The items to be added to the stack (they will be added in the order presented). + /// + public static void AddRange(this Stack stack, IEnumerable items) + { + stack.ArgumentNotNull("stack"); + items.ArgumentNotNull("items"); + foreach (T item in items) + { + stack.Add(item); + } + } + + /// + /// Removes an item from the stack. This is the same as a Pop operation. + /// + /// + /// The type of items stored in the stack. + /// + /// + /// The stack. + /// + /// + /// The item on the top of the stack that was removed (poped). + /// + public static T Remove(this Stack stack) + { + stack.ArgumentNotNull("stack"); + return stack.Pop(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/StringExtensions.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/StringExtensions.cs new file mode 100644 index 000000000000..7b54b5708ffd --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/StringExtensions.cs @@ -0,0 +1,101 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Text; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions +{ + /// + /// Provides useful extension methods for strings. + /// + internal static class StringExtensions + { + /// + /// Uri Encodes the value of a string. + /// + /// + /// The string to encode. + /// + /// + /// A Uri encoded string. + /// + [SuppressMessage("Microsoft.Design", "CA1055:UriReturnValuesShouldNotBeStrings", + Justification = "This method does not return a Uri but a string that is encoded properly for Uris [tgs]")] + public static string EscapeDataString([ValidatedNotNull] this string inputValue) + { + if (inputValue.IsNullOrEmpty()) + { + return string.Empty; + } + + return Uri.EscapeDataString(inputValue); + } + + /// + /// Determines if a string is not null or empty. + /// + /// + /// The string to check. + /// + /// + /// True if the string is something other than null or string.Empty otherwise false. + /// + public static bool IsNotNullOrEmpty([ValidatedNotNull] this string value) + { + return !string.IsNullOrEmpty(value); + } + + /// + /// Determines if a string is null or empty. + /// + /// + /// The string to check. + /// + /// + /// True if the string is null or string.Empty otherwise false. + /// + public static bool IsNullOrEmpty([ValidatedNotNull] this string value) + { + return string.IsNullOrEmpty(value); + } + + /// + /// Returns a stream containing the UTF8 encoded content of a string. + /// + /// + /// The string to convert. + /// + /// + /// A UTF8 Stream with the contents of the string present. + /// + public static Stream ToUtf8Stream(this string value) + { + var result = Help.SafeCreate(); + using (var temp = new MemoryStream()) + { + var writer = new StreamWriter(temp, Encoding.UTF8); + writer.Write(value); + writer.Flush(); + temp.Flush(); + temp.Position = 0; + temp.CopyTo(result); + } + result.Position = 0; + return result; + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/TaskExtensions.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/TaskExtensions.cs new file mode 100644 index 000000000000..69ae16acce2e --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/TaskExtensions.cs @@ -0,0 +1,190 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Threading.Tasks; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions +{ + /// + /// Provides useful extensions to task when working in a NetFx 4.0 environment. + /// + internal static class TaskExtensions + { + /// + /// Performs a conversion from one task type to another. + /// + /// + /// The original task return type. + /// + /// + /// The new task return type. + /// + /// + /// The task to execute. + /// + /// + /// A time out period to wait for the task execution. + /// + /// + /// The conversion method that performs the conversion. + /// + /// + /// A new task that will execute the conversion with the original task + /// is completed. + /// + public static Task AsyncConvert( + this Task task, TimeSpan timeout, Func convert) + { + if (task.IsNull()) + { + throw new ArgumentNullException("task"); + } + if (convert.IsNull()) + { + throw new ArgumentNullException("convert"); + } + + Task retval = null; + try + { + retval = Help.SafeCreate(() => new Task(() => convert(task.WaitForResult(timeout)))); + retval.Start(); + return retval; + } + catch (Exception) + { + if (retval.IsNotNull()) + { + retval.Dispose(); + } + throw; + } + } + + /// + /// Waits for the task to complete. This works for tasks that + /// have no return values. As such, this name is misleading but correct + /// from a consistency standpoint because all Wait request should use this + /// to ensure proper processing of exceptions. + /// + /// + /// The task parameter. + /// + /// + /// The timeout period to wait. + /// + public static void WaitForResult(this Task task, TimeSpan timeout) + { + if (task.IsNull()) + { + throw new ArgumentNullException("task"); + } + try + { + task.Wait(timeout); + } + catch (AggregateException aggregateException) + { + throw GetInnerException(aggregateException); + } + if (task.Status != TaskStatus.RanToCompletion && task.Status != TaskStatus.Faulted && task.Status != TaskStatus.Canceled) + { + throw new TimeoutException("The requested task failed to complete in the allotted time."); + } + } + + /// + /// Waits for the task to complete. This works for tasks that + /// have no return values. As such, this name is misleading but correct + /// from a consistency standpoint because all Wait request should use this + /// to ensure proper processing of exceptions. + /// + /// + /// The task parameter. + /// + public static void WaitForResult(this Task task) + { + WaitForResult(task, new TimeSpan(0, 0, 0, 0, int.MaxValue)); + } + + /// + /// Waits for the task to complete and then returns the result. + /// + /// + /// The type of return value for the task. + /// + /// + /// The task parameter. + /// + /// + /// The result of the task execution. + /// + public static T WaitForResult(this Task task) + { + return WaitForResult(task, new TimeSpan(0, 0, 0, 0, int.MaxValue)); + } + + /// + /// Waits for the task to complete for a given timeout and then returns the result. + /// + /// + /// The type of return value for the task. + /// + /// + /// The task parameter. + /// + /// + /// The timeout period to wait. + /// + /// + /// The result of the task execution. + /// + public static T WaitForResult(this Task task, TimeSpan timeout) + { + if (task.IsNull()) + { + throw new ArgumentNullException("task"); + } + try + { + task.Wait(timeout); + } + catch (AggregateException aggregateException) + { + throw GetInnerException(aggregateException); + } + if (task.Status != TaskStatus.RanToCompletion && task.Status != TaskStatus.Faulted && task.Status != TaskStatus.Canceled) + { + throw new TimeoutException("The requested task failed to complete in the allotted time."); + } + return task.Result; + } + + private static Exception GetInnerException(AggregateException aggregateException) + { + Exception innerExcception = aggregateException; + while (aggregateException is AggregateException) + { + innerExcception = aggregateException.InnerExceptions[0]; + aggregateException = innerExcception.As(); + if (aggregateException.IsNull()) + { + break; + } + } + return innerExcception; + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/ValidatedNotNullAttribute.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/ValidatedNotNullAttribute.cs new file mode 100644 index 000000000000..c371da990485 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/Extensions/ValidatedNotNullAttribute.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions +{ + /// + /// Instructs Code Analysis to treat a method as a validation + /// method for a given parameter and not fire 1062 when it is used. + /// + [AttributeUsage(AttributeTargets.Parameter)] + internal sealed class ValidatedNotNullAttribute : Attribute + { + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/IAzureHDInsightCommandFactory.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/IAzureHDInsightCommandFactory.cs new file mode 100644 index 000000000000..5707caa3f0b9 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/IAzureHDInsightCommandFactory.cs @@ -0,0 +1,69 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandInterfaces; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters +{ + internal interface IAzureHDInsightCommandFactory + { + IAddAzureHDInsightConfigValuesCommand CreateAddConfig(); + + IAddAzureHDInsightMetastoreCommand CreateAddMetastore(); + + IAddAzureHDInsightStorageCommand CreateAddStorage(); + + IAddAzureHDInsightScriptActionCommand CreateAddScriptAction(); + + INewAzureHDInsightClusterCommand CreateCreate(); + + IRemoveAzureHDInsightClusterCommand CreateDelete(); + + IGetAzureHDInsightClusterCommand CreateGet(); + + IGetAzureHDInsightJobOutputCommand CreateGetJobOutput(); + + IGetAzureHDInsightJobCommand CreateGetJobs(); + + IGetAzureHDInsightPropertiesCommand CreateGetProperties(); + + IInvokeHiveCommand CreateInvokeHive(); + + IManageAzureHDInsightHttpAccessCommand CreateManageHttpAccess(); + + INewAzureHDInsightClusterConfigCommand CreateNewConfig(); + + INewAzureHDInsightHiveJobDefinitionCommand CreateNewHiveDefinition(); + + INewAzureHDInsightMapReduceJobDefinitionCommand CreateNewMapReduceDefinition(); + + INewAzureHDInsightPigJobDefinitionCommand CreateNewPigJobDefinition(); + + INewAzureHDInsightSqoopJobDefinitionCommand CreateNewSqoopDefinition(); + + INewAzureHDInsightStreamingJobDefinitionCommand CreateNewStreamingMapReduceDefinition(); + + ISetAzureHDInsightClusterSizeCommand CreateSetClusterSize(); + + ISetAzureHDInsightDefaultStorageCommand CreateSetDefaultStorage(); + + IStartAzureHDInsightJobCommand CreateStartJob(); + + IStopAzureHDInsightJobCommand CreateStopJob(); + + IUseAzureHDInsightClusterCommand CreateUseCluster(); + + IWaitAzureHDInsightJobCommand CreateWaitJobs(); + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/IAzureHDInsightConnectionSessionManager.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/IAzureHDInsightConnectionSessionManager.cs new file mode 100644 index 000000000000..13254dd35837 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/IAzureHDInsightConnectionSessionManager.cs @@ -0,0 +1,25 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet +{ + internal interface IAzureHDInsightConnectionSessionManager + { + AzureHDInsightClusterConnection GetCurrentCluster(); + + void SetCurrentCluster(AzureHDInsightClusterConnection cluster); + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/IAzureHDInsightConnectionSessionManagerFactory.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/IAzureHDInsightConnectionSessionManagerFactory.cs new file mode 100644 index 000000000000..481ca13c2da0 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/IAzureHDInsightConnectionSessionManagerFactory.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters +{ + internal interface IAzureHDInsightConnectionSessionManagerFactory + { + IAzureHDInsightConnectionSessionManager Create(SessionState sessionState); + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ICancelCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ICancelCommand.cs new file mode 100644 index 000000000000..97e89f0992a3 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ICancelCommand.cs @@ -0,0 +1,20 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters +{ + public interface ICancelCommand + { + void Cancel(); + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/IInvokeAzureHDInsightJobCommand.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/IInvokeAzureHDInsightJobCommand.cs new file mode 100644 index 000000000000..b14ab4086fb7 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/IInvokeAzureHDInsightJobCommand.cs @@ -0,0 +1,44 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.ObjectModel; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Logging; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters +{ + internal interface IInvokeAzureHDInsightJobCommand + { + CancellationToken CancellationToken { get; } + + AzureSubscription CurrentSubscription { get; set; } + + AzureHDInsightClusterConnection Connection { get; set; } + + AzureHDInsightHiveJobDefinition JobDefinition { get; set; } + + string JobId { get; } + + ILogWriter Logger { get; set; } + + ObservableCollection Output { get; } + + void Cancel(); + + Task EndProcessing(); + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/InvokeAzureHDInsightJobCommandBase.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/InvokeAzureHDInsightJobCommandBase.cs new file mode 100644 index 000000000000..1b4e22a07739 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/InvokeAzureHDInsightJobCommandBase.cs @@ -0,0 +1,248 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.ObjectModel; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Hadoop.Client; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.DataObjects; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; +using Microsoft.WindowsAzure.Management.HDInsight.Logging; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters +{ + internal abstract class InvokeAzureHDInsightJobCommandBase : IInvokeAzureHDInsightJobCommand + { + private const string HiveQueryFileStoragePath = "http://{0}/{1}/user/{2}/{3}.hql"; + private const decimal Success = 0; + + private const double WaitAnHourInSeconds = 3600; + + private readonly object lockObject = new object(); + private bool canceled; + private IAzureHDInsightCommandBase client; + + public InvokeAzureHDInsightJobCommandBase() + { + this.Output = new ObservableCollection(); + } + + public CancellationToken CancellationToken + { + get { return this.client != null ? this.client.CancellationToken : new CancellationTokenSource().Token; } + } + + public AzureSubscription CurrentSubscription { get; set; } + + public AzureHDInsightClusterConnection Connection { get; set; } + + public AzureHDInsightHiveJobDefinition JobDefinition { get; set; } + + public JobDetails JobDetailsStatus { get; private set; } + + public string JobId { get; private set; } + + public ILogWriter Logger { get; set; } + + public ObservableCollection Output { get; private set; } + + public void Cancel() + { + lock (this.lockObject) + { + this.canceled = true; + if (this.client.IsNotNull()) + { + this.client.Cancel(); + } + } + } + + public async Task EndProcessing() + { + this.Connection.ArgumentNotNull("Connection"); + this.JobDefinition.ArgumentNotNull("HiveJob"); + + this.Output.Clear(); + AzureHDInsightClusterConnection currentConnection = this.Connection; + + this.WriteOutput("Submitting Hive query.."); + AzureHDInsightHiveJobDefinition hiveJobDefinition = this.JobDefinition; + if (hiveJobDefinition.Query.IsNotNullOrEmpty() && hiveJobDefinition.File.IsNullOrEmpty()) + { + hiveJobDefinition = this.UploadFileToStorage(this.JobDefinition, currentConnection); + } + + var startedJob = await this.StartJob(hiveJobDefinition, currentConnection); + this.JobId = startedJob.JobId; + this.WriteOutput("Started Hive query with jobDetails Id : {0}", startedJob.JobId); + + var completedJob = await this.WaitForCompletion(startedJob, currentConnection); + if (completedJob.ExitCode == Success) + { + await this.WriteJobSuccess(completedJob, currentConnection); + } + else + { + await this.WriteJobFailure(completedJob, currentConnection); + } + } + + public void SetClient(IAzureHDInsightCommandBase client) + { + lock (this.lockObject) + { + this.client = client; + } + } + + public void ValidateNotCanceled() + { + if (this.canceled) + { + throw new OperationCanceledException("The operation was canceled by the user."); + } + } + + protected virtual async Task StartJob( + AzureHDInsightJobDefinition jobDefinition, AzureHDInsightClusterConnection currentConnection) + { + jobDefinition.ArgumentNotNull("jobDefinition"); + currentConnection.ArgumentNotNull("currentCluster"); + this.ValidateNotCanceled(); + var startJobCommand = ServiceLocator.Instance.Locate().CreateStartJob(); + this.SetClient(startJobCommand); + startJobCommand.Cluster = currentConnection.Cluster.Name; + startJobCommand.Logger = this.Logger; + startJobCommand.CurrentSubscription = this.CurrentSubscription; + startJobCommand.JobDefinition = jobDefinition; + this.ValidateNotCanceled(); + await startJobCommand.EndProcessing(); + return startJobCommand.Output.Last(); + } + + protected virtual async Task WaitForCompletion( + AzureHDInsightJob startedJob, AzureHDInsightClusterConnection currentConnection) + { + startedJob.ArgumentNotNull("startedJob"); + currentConnection.ArgumentNotNull("currentConnection"); + this.ValidateNotCanceled(); + var waitJobCommand = ServiceLocator.Instance.Locate().CreateWaitJobs(); + waitJobCommand.JobStatusEvent += this.ClientOnJobStatus; + this.SetClient(waitJobCommand); + waitJobCommand.Job = startedJob; + waitJobCommand.Logger = this.Logger; + waitJobCommand.WaitTimeoutInSeconds = WaitAnHourInSeconds; + waitJobCommand.CurrentSubscription = this.CurrentSubscription; + this.ValidateNotCanceled(); + await waitJobCommand.ProcessRecord(); + return waitJobCommand.Output.Last(); + } + + protected virtual async Task WriteJobFailure(AzureHDInsightJob completedJob, AzureHDInsightClusterConnection currentConnection) + { + completedJob.ArgumentNotNull("completedJob"); + currentConnection.ArgumentNotNull("currentConnection"); + this.WriteOutput("Hive query failed."); + this.WriteOutput(Environment.NewLine); + this.ValidateNotCanceled(); + var getJobOutputCommand = ServiceLocator.Instance.Locate().CreateGetJobOutput(); + this.SetClient(getJobOutputCommand); + getJobOutputCommand.JobId = completedJob.JobId; + getJobOutputCommand.Logger = this.Logger; + getJobOutputCommand.OutputType = JobOutputType.StandardError; + getJobOutputCommand.CurrentSubscription = this.CurrentSubscription; + getJobOutputCommand.Cluster = currentConnection.Cluster.Name; + this.ValidateNotCanceled(); + await getJobOutputCommand.EndProcessing(); + var outputStream = getJobOutputCommand.Output.First(); + string content = new StreamReader(outputStream).ReadToEnd(); + this.WriteOutput(content); + } + + protected virtual async Task WriteJobSuccess(AzureHDInsightJob completedJob, AzureHDInsightClusterConnection currentConnection) + { + completedJob.ArgumentNotNull("completedJob"); + currentConnection.ArgumentNotNull("currentConnection"); + this.WriteOutput("Hive query completed Successfully"); + this.WriteOutput(Environment.NewLine); + this.ValidateNotCanceled(); + var getJobOutputCommand = ServiceLocator.Instance.Locate().CreateGetJobOutput(); + this.SetClient(getJobOutputCommand); + getJobOutputCommand.JobId = completedJob.JobId; + getJobOutputCommand.Logger = this.Logger; + getJobOutputCommand.CurrentSubscription = this.CurrentSubscription; + getJobOutputCommand.Cluster = currentConnection.Cluster.Name; + this.ValidateNotCanceled(); + await getJobOutputCommand.EndProcessing(); + var outputStream = getJobOutputCommand.Output.First(); + string content = new StreamReader(outputStream).ReadToEnd(); + this.WriteOutput(content); + } + + protected virtual void WriteOutput(string content, params string[] args) + { + if (args.Any()) + { + content = string.Format(CultureInfo.InvariantCulture, content, args); + } + + this.Output.Add(content); + } + + private void ClientOnJobStatus(object sender, WaitJobStatusEventArgs waitJobStatusEventArgs) + { + this.JobDetailsStatus = waitJobStatusEventArgs.JobDetails; + } + + private Stream GetStreamForText(string textContents) + { + byte[] bytes = Encoding.UTF8.GetBytes(textContents); + var stream = new MemoryStream(bytes, 0, bytes.Length); + return stream; + } + + private AzureHDInsightHiveJobDefinition UploadFileToStorage( + AzureHDInsightHiveJobDefinition jobDefinition, AzureHDInsightClusterConnection currentConnection) + { + currentConnection.Cluster.DefaultStorageAccount.ArgumentNotNull("DefaultStorageAccount"); + WabStorageAccountConfiguration storageAccount = currentConnection.Cluster.DefaultStorageAccount.ToWabStorageAccountConfiguration(); + var storageHandler = ServiceLocator.Instance.Locate().Create(storageAccount); + string hiveQueryFilePath = string.Format( + CultureInfo.InvariantCulture, + HiveQueryFileStoragePath, + currentConnection.Cluster.DefaultStorageAccount.StorageAccountName, + currentConnection.Cluster.DefaultStorageAccount.StorageContainerName, + currentConnection.Cluster.HttpUserName, + Guid.NewGuid().ToString("N")); + using (Stream hiveQueryFileStream = this.GetStreamForText(jobDefinition.Query)) + { + var hiveQueryFileUri = new Uri(hiveQueryFilePath, UriKind.RelativeOrAbsolute); + storageHandler.UploadFile(hiveQueryFileUri, hiveQueryFileStream); + jobDefinition.Query = string.Empty; + jobDefinition.File = storageHandler.GetStoragePath(hiveQueryFileUri).OriginalString; + } + + return jobDefinition; + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/IRegisteringService.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/IRegisteringService.cs new file mode 100644 index 000000000000..e9538c6914ae --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/IRegisteringService.cs @@ -0,0 +1,32 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation +{ + /// + /// Allows a service to provide additional registrations when it is registered with the ServiceLocator. + /// + internal interface IRegisteringService + { + /// + /// Allows a service to provide additional registrations when it is registered with the ServiceLocator. + /// + /// + /// The runtime service location manager to use to register additional services. + /// + /// + /// The service locator to use. + /// + void Register(IServiceLocationRuntimeManager manager, IServiceLocator locator); + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/IServiceLocationAssemblySweep.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/IServiceLocationAssemblySweep.cs new file mode 100644 index 000000000000..723eb95fbb99 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/IServiceLocationAssemblySweep.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation +{ + internal interface IServiceLocationAssemblySweep + { + IEnumerable GetRegistrars(); + + bool NewAssembliesPresent(); + + void RegisterRegistrarProxy(IServiceLocationRegistrarProxyFactory proxy); + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/IServiceLocationIndividualTestManager.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/IServiceLocationIndividualTestManager.cs new file mode 100644 index 000000000000..4145afc4164b --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/IServiceLocationIndividualTestManager.cs @@ -0,0 +1,43 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation +{ + /// + /// Provides services to override a service location for a single test. + /// + internal interface IServiceLocationIndividualTestManager + { + /// + /// Override default interface-to-implementation association. + /// + /// Interface to override. + /// Value to override with. + void Override(T overrideValue); + + /// + /// Override default interface-to-implementation association. + /// + /// Interface to override. + /// Value to override with. + void Override(Type type, object overrideValue); + + /// + /// Resets the overrides. + /// + void Reset(); + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/IServiceLocationManager.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/IServiceLocationManager.cs new file mode 100644 index 000000000000..873964d496c3 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/IServiceLocationManager.cs @@ -0,0 +1,67 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation +{ + /// + /// Locates services that ViewModels need. + /// + internal interface IServiceLocationManager + { + /// + /// Registers a new instance with of a service with the container. + /// + /// + /// The type to register. + /// + /// + /// The instance to register. + /// + void RegisterInstance(TService instance); + + /// + /// Registers a new instance with of a service with the container. + /// + /// + /// The type to register. + /// + /// + /// The instance to register. + /// + void RegisterInstance(Type type, object instance); + + /// + /// Register type. + /// + /// Type to map. + /// Type to map to. + void RegisterType(Type type); + + /// + /// Register type. + /// + /// The service interface. + /// The implementation type. + void RegisterType() where TConcretion : class, TInterface; + + /// + /// Register type. + /// + /// Type to map. + /// Type to map to. + void RegisterType(Type type, Type registrationValue); + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/IServiceLocationRegistrar.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/IServiceLocationRegistrar.cs new file mode 100644 index 000000000000..5c5d6c67882e --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/IServiceLocationRegistrar.cs @@ -0,0 +1,22 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation +{ + /// + /// Allows an assembly to register services with the IoC container. + /// + internal interface IServiceLocationRegistrar : IRegisteringService + { + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/IServiceLocationRegistrarProxyFactory.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/IServiceLocationRegistrarProxyFactory.cs new file mode 100644 index 000000000000..c5f8fb8525db --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/IServiceLocationRegistrarProxyFactory.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation +{ + internal interface IServiceLocationRegistrarProxyFactory + { + IServiceLocationRegistrar Create(Type type); + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/IServiceLocationRuntimeManager.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/IServiceLocationRuntimeManager.cs new file mode 100644 index 000000000000..7654067b24a6 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/IServiceLocationRuntimeManager.cs @@ -0,0 +1,22 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation +{ + /// + /// Provides services to provide additional service locations for the runtime. + /// + internal interface IServiceLocationRuntimeManager : IServiceLocationManager + { + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/IServiceLocationSimulationManager.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/IServiceLocationSimulationManager.cs new file mode 100644 index 000000000000..122e6e585e01 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/IServiceLocationSimulationManager.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation +{ + /// + /// Provides services to fake out service location during debugging and test scenarios. + /// + internal interface IServiceLocationSimulationManager : IServiceLocationManager + { + /// + /// Gets or sets the mocking level to use when performing service location. + /// + ServiceLocationMockingLevel MockingLevel { get; set; } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/IServiceLocator.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/IServiceLocator.cs new file mode 100644 index 000000000000..662fd34e57f2 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/IServiceLocator.cs @@ -0,0 +1,38 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation +{ + /// + /// Locates services that ViewModels need. + /// + internal interface IServiceLocator + { + /// + /// Locates an instance that implements the specified interface. + /// + /// Interface to locate. + /// Instance of the interface. + T Locate(); + + /// + /// Locates an instance that implements the specified interface. + /// + /// Interface to locate. + /// Instance of the interface. + object Locate(Type type); + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/ServiceLocationAssemblySweep.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/ServiceLocationAssemblySweep.cs new file mode 100644 index 000000000000..1f609172f9fa --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/ServiceLocationAssemblySweep.cs @@ -0,0 +1,144 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation +{ + internal class ServiceLocationAssemblySweep : IServiceLocationAssemblySweep + { + private readonly List> knownRegistrars = + new List>(); + + private readonly Dictionary proxies = + new Dictionary(); + + public IEnumerable GetRegistrars() + { + List> registrars = this.GetRegistrarTypes().ToList(); + this.knownRegistrars.All(registrars.Remove); + this.knownRegistrars.AddRange(registrars); + + List objects = (from t in registrars select t.Value.Create(t.Key)).ToList(); + return objects; + } + + public bool NewAssembliesPresent() + { + List> registrars = this.GetRegistrarTypes().ToList(); + this.knownRegistrars.All(r => registrars.Remove(r)); + return registrars.Any(); + } + + public void RegisterRegistrarProxy(IServiceLocationRegistrarProxyFactory proxy) + { + this.proxies.Add(typeof(T), proxy); + } + + internal IEnumerable> GetRegistrarTypes() + { + var comparer = new AssemblyNameEqualityComparer(); + var types = new List(); + Assembly[] scansedAssemblies = AppDomain.CurrentDomain.GetAssemblies(); + List proxyAssemblies = (from p in this.proxies select p.Value.GetType().Assembly.GetName()).ToList(); + List workingAssemblies = + (from s in scansedAssemblies from r in proxyAssemblies where s.GetReferencedAssemblies().Contains(r, comparer) select s).ToList(); + workingAssemblies.Add(this.GetType().Assembly); + foreach (Assembly assembly in workingAssemblies) + { + try + { + types.AddRange(assembly.GetTypes()); + } + catch (ReflectionTypeLoadException loadEx) + { + List foundTypes = (from t in loadEx.Types where t.IsNotNull() select t).ToList(); + types.AddRange(foundTypes); + } + } + var preOrdered = new Queue>(); + foreach (Type type in types) + { + if (type.IsInterface) + { + continue; + } + foreach (var proxy in this.proxies) + { + if (proxy.Key.IsAssignableFrom(type) && !ReferenceEquals(type.GetConstructor(new Type[0]), null)) + { + preOrdered.Add(new KeyValuePair(type, proxy.Value)); + } + } + } + + var orderedList = new List>(); + while (preOrdered.Count > 0) + { + KeyValuePair type = preOrdered.Remove(); + bool addToList = true; + foreach (var stackType in preOrdered) + { + if (type.Key.Assembly.GetReferencedAssemblies().Contains(stackType.Key.Assembly.GetName(), comparer)) + { + addToList = false; + preOrdered.Add(type); + break; + } + } + if (addToList) + { + orderedList.Add(type); + } + } + + return orderedList; + } + + private class AssemblyNameEqualityComparer : IEqualityComparer + { + public bool Equals(AssemblyName x, AssemblyName y) + { + if (x.IsNull() && y.IsNull()) + { + return true; + } + if (x.IsNull() || y.IsNull()) + { + return false; + } + if (x.Name.Equals(y.Name, StringComparison.Ordinal) && x.Version.Equals(y.Version) && x.CultureInfo.Equals(y.CultureInfo) && + (ReferenceEquals(x.KeyPair, y.KeyPair) || + (x.KeyPair.IsNotNull() && y.KeyPair.IsNotNull() && x.KeyPair.PublicKey.SequenceEqual(y.KeyPair.PublicKey)))) + { + return true; + } + return false; + } + + public int GetHashCode(AssemblyName obj) + { + if (obj.IsNotNull()) + { + return obj.GetHashCode(); + } + return 0; + } + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/ServiceLocationMockingLevel.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/ServiceLocationMockingLevel.cs new file mode 100644 index 000000000000..a24da3a1a9f1 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/ServiceLocationMockingLevel.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation +{ + /// + /// Test Mocking Levels, which control how the service locator should work in + /// a test environment. + /// + internal enum ServiceLocationMockingLevel + { + /// + /// Apply Full Mocking, All mocking levels should be respected. + /// + ApplyFullMocking, + + /// + /// Apply Individual Test Mocking only. Only individual test overrides + /// should be respected. + /// + ApplyIndividualTestMockingOnly, + + /// + /// Apply Test Run Mocking Only. Only full test run overrides should + /// be respected. + /// + ApplyTestRunMockingOnly, + + /// + /// Apply No Mocking. No mocking should be respected and only runtime + /// objects should be utilized. + /// + ApplyNoMocking + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/ServiceLocationRegistrarProxyFactory.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/ServiceLocationRegistrarProxyFactory.cs new file mode 100644 index 000000000000..6e4c0a745756 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/ServiceLocationRegistrarProxyFactory.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation +{ + internal class ServiceLocationRegistrarProxyFactory : IServiceLocationRegistrarProxyFactory + { + public IServiceLocationRegistrar Create(Type type) + { + return (IServiceLocationRegistrar)Activator.CreateInstance(type); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/ServiceLocator.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/ServiceLocator.cs new file mode 100644 index 000000000000..ccc87a0a5545 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/GetAzureHDInsightClusters/ServiceLocation/ServiceLocator.cs @@ -0,0 +1,319 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation +{ + /// + /// The main service locator for any application. + /// + internal class ServiceLocator : IServiceLocator + { + private static readonly ServiceLocator singletonInstance = new ServiceLocator(); + private readonly ServiceLocationRuntimeManager runtimeManager; + private readonly Dictionary runtimeServices = new Dictionary(); + private readonly IServiceLocationAssemblySweep sweeper = new ServiceLocationAssemblySweep(); + private readonly Dictionary testRunServices = new Dictionary(); + private Dictionary individualTestServices = new Dictionary(); + private ServiceLocationMockingLevel mockingLevel = ServiceLocationMockingLevel.ApplyFullMocking; + + /// + /// Prevents a default instance of the ServiceLocator class from being created. + /// + private ServiceLocator() + { + this.sweeper.RegisterRegistrarProxy(new ServiceLocationRegistrarProxyFactory()); + this.runtimeManager = new ServiceLocationRuntimeManager(this); + this.runtimeServices.Add(typeof(IServiceLocationRuntimeManager), this.runtimeManager); + this.runtimeServices.Add(typeof(IServiceLocationSimulationManager), new ServiceLocationSimulationManager(this)); + this.runtimeServices.Add(typeof(IServiceLocationIndividualTestManager), new ServiceLocationIndividualTestManager(this)); + this.runtimeServices.Add(typeof(IServiceLocationAssemblySweep), this.sweeper); + this.runtimeServices.Add(typeof(IServiceLocator), this); + this.RegisterAssemblies(); + } + + /// + /// Gets the singleton instance of the ServiceLocator. + /// + public static IServiceLocator Instance + { + get { return singletonInstance; } + } + + /// + public T Locate() + { + return (T)this.Locate(typeof(T)); + } + + /// + public object Locate(Type type) + { + object retval = this.InternalLocate(type); + if (retval.IsNull()) + { + if (this.sweeper.NewAssembliesPresent()) + { + this.RegisterAssemblies(); + retval = this.InternalLocate(type); + } + if (retval.IsNull()) + { + string message = string.Format( + CultureInfo.InvariantCulture, "Attempt to locate a service '{0}' that has not been registered", type.FullName); + throw new InvalidOperationException(message); + } + } + return retval; + } + + internal static void ThrowIfInvalidRegistration(Type type, Type implementation) + { + ThrowIfNullInstance(type, implementation); + if (type == typeof(IServiceLocationRuntimeManager) || type == typeof(IServiceLocationSimulationManager) || + type == typeof(IServiceLocationIndividualTestManager) || type == typeof(IServiceLocator)) + { + string msg = string.Format( + CultureInfo.InvariantCulture, "An attempt was made to register or override the restrictive service '{0}'", type.FullName); + throw new InvalidOperationException(msg); + } + if (!type.IsInterface) + { + string msg = string.Format( + CultureInfo.InvariantCulture, + "An attempt was made to register or override a service for the type '{0}' that was not an interface", + type.FullName); + throw new InvalidOperationException(msg); + } + if (!type.IsAssignableFrom(implementation)) + { + string msg = string.Format( + CultureInfo.InvariantCulture, + "An attempt was made to register or override the service '{0}' for the type '{1}' which was not derived from the service", + implementation.FullName, + type.FullName); + throw new InvalidOperationException(msg); + } + } + + internal static void ThrowIfNullInstance([ValidatedNotNull] Type type, [ValidatedNotNull] object implementation) + { + if (ReferenceEquals(type, null)) + { + string msg = string.Format(CultureInfo.InvariantCulture, "An attempt was made to register a null type as service"); + throw new InvalidOperationException(msg); + } + if (ReferenceEquals(implementation, null)) + { + string msg = string.Format( + CultureInfo.InvariantCulture, + "An attempt was made to register or override a service with a null implementation '{0}'", + type.FullName); + throw new InvalidOperationException(msg); + } + } + + private object InternalLocate(Type type) + { + if (ReferenceEquals(type, null)) + { + throw new ArgumentNullException("type"); + } + object runtimeVersion = null; + object fakeVersion = null; + object overrideVersion = null; + + // First try to get a IndiviudalTest Mock + if ( + !((this.mockingLevel == ServiceLocationMockingLevel.ApplyFullMocking || + this.mockingLevel == ServiceLocationMockingLevel.ApplyIndividualTestMockingOnly) && + this.individualTestServices.TryGetValue(type, out overrideVersion)) && // Next try to get a TestRun Mock + !((this.mockingLevel == ServiceLocationMockingLevel.ApplyFullMocking || + this.mockingLevel == ServiceLocationMockingLevel.ApplyTestRunMockingOnly) && + this.testRunServices.TryGetValue(type, out fakeVersion)) && // Finally try to get the actual service + !this.runtimeServices.TryGetValue(type, out runtimeVersion)) + { + } + object retval = overrideVersion; + if (retval.IsNull()) + { + retval = fakeVersion; + if (retval.IsNull()) + { + retval = runtimeVersion; + } + } + return retval; + } + + private void RegisterAssemblies() + { + List registrars = this.sweeper.GetRegistrars().ToList(); + foreach (IServiceLocationRegistrar serviceLocationRegistrar in registrars) + { + serviceLocationRegistrar.Register(this.runtimeManager, this); + } + } + + private abstract class ServiceLocationManager : IServiceLocationManager + { + /// + public void RegisterInstance(TService instance) + { + this.RegisterInstance(typeof(TService), instance); + } + + /// + public abstract void RegisterInstance(Type type, object instance); + + /// + public void RegisterType(Type registrationValue) + { + this.RegisterType(typeof(T), registrationValue); + } + + /// + public void RegisterType() where TConcreate : class, TInterface + { + this.RegisterType(typeof(TInterface), typeof(TConcreate)); + } + + /// + public void RegisterType(Type type, Type registrationValue) + { + // TODO: see if an injection is necessary here (for Service Locator) + ThrowIfInvalidRegistration(type, registrationValue); + object obj = Activator.CreateInstance(registrationValue); + this.RegisterInstance(type, obj); + } + } + + private class InternalRuntimeRegistrationManager : ServiceLocationManager, IServiceLocationRuntimeManager + { + private readonly Dictionary discovered = new Dictionary(); + private readonly IServiceLocator locator; + + public InternalRuntimeRegistrationManager(IServiceLocator locator) + { + this.locator = locator; + } + + public IEnumerable> GetDiscovered() + { + return this.discovered; + } + + public override void RegisterInstance(Type serviceType, object instance) + { + var registering = instance as IRegisteringService; + object discoveredInstance; + if (this.discovered.TryGetValue(serviceType, out discoveredInstance)) + { + if (!ReferenceEquals(discoveredInstance, instance) && !ReferenceEquals(registering, null)) + { + this.discovered[serviceType] = instance; + registering.Register(this, this.locator); + } + } + else + { + this.discovered[serviceType] = instance; + if (!ReferenceEquals(registering, null)) + { + registering.Register(this, this.locator); + } + } + } + } + + private class ServiceLocationIndividualTestManager : IServiceLocationIndividualTestManager + { + private readonly ServiceLocator locator; + + public ServiceLocationIndividualTestManager(ServiceLocator locator) + { + this.locator = locator; + } + + public void Override(T overrideValue) + { + this.Override(typeof(T), overrideValue); + } + + public void Override(Type type, object overrideValue) + { + ThrowIfNullInstance(type, overrideValue); + ThrowIfInvalidRegistration(type, overrideValue.GetType()); + this.locator.individualTestServices.Add(type, overrideValue); + } + + public void Reset() + { + this.locator.individualTestServices = new Dictionary(); + } + } + + private class ServiceLocationRuntimeManager : ServiceLocationManager, IServiceLocationRuntimeManager + { + private readonly ServiceLocator locator; + + public ServiceLocationRuntimeManager(ServiceLocator locator) + { + this.locator = locator; + } + + /// + public override void RegisterInstance(Type type, object instance) + { + ThrowIfNullInstance(type, instance); + ThrowIfInvalidRegistration(type, instance.GetType()); + var internalManager = new InternalRuntimeRegistrationManager(this.locator); + internalManager.RegisterInstance(type, instance); + foreach (var keyValuePair in internalManager.GetDiscovered()) + { + this.locator.runtimeServices[keyValuePair.Key] = keyValuePair.Value; + } + } + } + + private class ServiceLocationSimulationManager : ServiceLocationManager, IServiceLocationSimulationManager + { + private readonly ServiceLocator locator; + + public ServiceLocationSimulationManager(ServiceLocator locator) + { + this.locator = locator; + } + + public ServiceLocationMockingLevel MockingLevel + { + get { return this.locator.mockingLevel; } + set { this.locator.mockingLevel = value; } + } + + /// + public override void RegisterInstance(Type type, object instance) + { + ThrowIfNullInstance(type, instance); + ThrowIfInvalidRegistration(type, instance.GetType()); + this.locator.testRunServices[type] = instance; + } + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/InversionOfControl/CmdletServiceLocationRegistrar.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/InversionOfControl/CmdletServiceLocationRegistrar.cs new file mode 100644 index 000000000000..c7073beab369 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/InversionOfControl/CmdletServiceLocationRegistrar.cs @@ -0,0 +1,49 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.BaseCommandInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.BaseInterfaces; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.GetAzureHDInsightClusters.Extensions; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Logging; +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.ServiceLocation; +using Microsoft.WindowsAzure.Management.HDInsight.Logging; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet +{ + /// + /// Registers Cmdlet services with the IoC system. + /// + internal class CmdletServiceLocationRegistrar : IServiceLocationRegistrar + { + /// + public void Register(IServiceLocationRuntimeManager manager, IServiceLocator locator) + { + if (manager.IsNull()) + { + throw new ArgumentNullException("manager"); + } + + manager.RegisterType(); + manager.RegisterType(); + manager.RegisterType(); + manager.RegisterType(); + manager.RegisterType(); + manager.RegisterType(); + manager.RegisterType(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Logging/IBufferingLogWriter.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Logging/IBufferingLogWriter.cs new file mode 100644 index 000000000000..7ae86a14fb91 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Logging/IBufferingLogWriter.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Microsoft.WindowsAzure.Management.HDInsight.Logging; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Logging +{ + internal interface IBufferingLogWriter : ILogWriter + { + IEnumerable Buffer { get; } + + IEnumerable DequeueBuffer(); + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Logging/IBufferingLogWriterFactory.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Logging/IBufferingLogWriterFactory.cs new file mode 100644 index 000000000000..6b1ffe41f16c --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Logging/IBufferingLogWriterFactory.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Logging; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Logging +{ + /// + /// Factory interface to create LogWriters. + /// + internal interface IBufferingLogWriterFactory + { + /// + /// Creates a Log Writer. + /// + /// A Logwriter instance. + IBufferingLogWriter Create(); + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Logging/PowershellLogWriter.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Logging/PowershellLogWriter.cs new file mode 100644 index 000000000000..61c2de962a7d --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Logging/PowershellLogWriter.cs @@ -0,0 +1,59 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Globalization; +using Microsoft.WindowsAzure.Management.HDInsight.Logging; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Logging +{ + internal class PowershellLogWriter : IBufferingLogWriter + { + private readonly List buffer = new List(); + private readonly Queue messageLines = new Queue(); + + public IEnumerable Buffer + { + get { return this.buffer; } + } + + public IEnumerable DequeueBuffer() + { + var results = new List(); + lock (this.messageLines) + { + while (this.messageLines.Count > 0) + { + results.Add(this.messageLines.Dequeue()); + } + } + return results; + } + + public void Log(Severity severity, Verbosity verbosity, string content) + { + string msg = string.Format(CultureInfo.InvariantCulture, "Severity: {0}\r\n{1}", severity, content); + this.Write(msg); + } + + protected void Write(string content) + { + lock (this.messageLines) + { + this.messageLines.Enqueue(content); + this.buffer.Add(content); + } + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Logging/PowershellLogWriterFactory.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Logging/PowershellLogWriterFactory.cs new file mode 100644 index 000000000000..8e7c0dfd80ef --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Model/Logging/PowershellLogWriterFactory.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.HDInsight.Logging; + +namespace Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Logging +{ + internal class PowershellLogWriterFactory : IBufferingLogWriterFactory + { + public IBufferingLogWriter Create() + { + return new PowershellLogWriter(); + } + } +} diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/Properties/AssemblyInfo.cs b/src/ServiceManagement/HDInsight/Commands.HDInsight/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..407965d47c50 --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/Properties/AssemblyInfo.cs @@ -0,0 +1,53 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft Azure Powershell")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("ec12edf5-4fb4-4196-a96e-14014ffe6b18")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] +[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] +#if SIGN +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.HDInsight.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +#else +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.HDInsight.Test")] +#endif +[assembly: CLSCompliant(false)] diff --git a/src/ServiceManagement/HDInsight/Commands.HDInsight/packages.config b/src/ServiceManagement/HDInsight/Commands.HDInsight/packages.config new file mode 100644 index 000000000000..c12aa7900a7c --- /dev/null +++ b/src/ServiceManagement/HDInsight/Commands.HDInsight/packages.config @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/CacheAccessKeysTest.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/CacheAccessKeysTest.cs new file mode 100644 index 000000000000..23697664a3b8 --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/CacheAccessKeysTest.cs @@ -0,0 +1,51 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.ManagedCache.Models; +using Microsoft.Azure.Management.ManagedCache.Models; +using Xunit; + +namespace Microsoft.Azure.Commands.ManagedCache.Test +{ + public class CacheAccessKeysTest + { + [Fact] + public void InitializeAllFieldsCorrect() + { + //Arrange + string primary = "primary"; + string secondary = "secondary"; + string requestID = "ID1"; + string serviceName = "cache1"; + System.Net.HttpStatusCode statusCode = System.Net.HttpStatusCode.OK; + CachingKeysResponse response = new CachingKeysResponse() + { + Primary = primary, + Secondary = secondary, + StatusCode = statusCode, + RequestId = requestID + }; + + //Act + CacheAccessKeys keys = new CacheAccessKeys(serviceName, response); + + //Assert + Assert.Equal(primary, keys.Primary); + Assert.Equal(secondary, keys.Secondary); + Assert.Equal(statusCode, keys.StatusCode); + Assert.Equal(requestID, keys.RequestId); + Assert.Equal(serviceName, keys.Name); + } + } +} diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/CacheSkuCountConvertTest.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/CacheSkuCountConvertTest.cs new file mode 100644 index 000000000000..52a19eb2ae46 --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/CacheSkuCountConvertTest.cs @@ -0,0 +1,67 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.Azure.Commands.ManagedCache.Models; +using Microsoft.Azure.Management.ManagedCache.Models; +using Xunit; + +namespace Microsoft.Azure.Commands.ManagedCache.Test +{ + public class CacheSkuCountConvertTest + { + [Fact] + public void ManagedCache_ConversionWorksForBasicSku() + { + CacheSkuCountConvert convert = new CacheSkuCountConvert(CacheServiceSkuType.Basic); + Assert.Equal("128MB", convert.ToMemorySize(1)); + Assert.Equal("256MB", convert.ToMemorySize(2)); + Assert.Equal(2, convert.ToSkuCount("256")); + Assert.Equal(1, convert.ToSkuCount("128MB")); + Assert.Equal(1, convert.ToSkuCount("128mb")); + Assert.Throws(typeof(ArgumentException), () => { convert.ToSkuCount("2222"); }); + Assert.Throws(typeof(ArgumentException), () => { convert.ToSkuCount("foo-bar"); }); + } + + [Fact] + public void ManagedCache_ConversionWorksForStandardSku() + { + CacheSkuCountConvert convert = new CacheSkuCountConvert(CacheServiceSkuType.Standard); + Assert.Equal("1GB", convert.ToMemorySize(1)); + Assert.Equal("2GB", convert.ToMemorySize(2)); + Assert.Equal(1, convert.ToSkuCount("1GB")); + Assert.Equal(10, convert.ToSkuCount("10GB")); + Assert.Throws(typeof(ArgumentException), () => { convert.ToSkuCount("11"); }); + Assert.Throws(typeof(ArgumentException), () => { convert.ToSkuCount("foo-bar"); }); + } + + [Fact] + public void ManagedCache_ConversionWorksForPremiumSku() + { + CacheSkuCountConvert convert = new CacheSkuCountConvert(CacheServiceSkuType.Premium); + Assert.Equal("5GB", convert.ToMemorySize(1)); + Assert.Equal("10GB", convert.ToMemorySize(2)); + Assert.Equal(1, convert.ToSkuCount("5GB")); + Assert.Equal(30, convert.ToSkuCount("150GB")); + Assert.Throws(typeof(ArgumentException), () => { convert.ToSkuCount("12MB"); }); + Assert.Throws(typeof(ArgumentException), () => { convert.ToSkuCount("-1"); }); + } + + [Fact] + public void ManagedCache_CountIsOneIfMemorySizeIsNull() + { + Assert.Equal(1, new CacheSkuCountConvert(CacheServiceSkuType.Basic).ToSkuCount(null)); + } + } +} diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/Commands.ManagedCache.Test.csproj b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/Commands.ManagedCache.Test.csproj new file mode 100644 index 000000000000..da7e309099eb --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/Commands.ManagedCache.Test.csproj @@ -0,0 +1,203 @@ + + + + + Debug + AnyCPU + {374D4000-DEDE-4995-9B63-E3B9FE0C4D29} + Library + Properties + Microsoft.Azure.Commands.ManagedCache.Test + Microsoft.Azure.Commands.ManagedCache.Test + v4.5 + 512 + + ..\..\..\ + true + + + bin\Release\ + TRACE;SIGN + true + pdbonly + true + MSSharedLibKey.snk + true + true + prompt + false + false + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + + False + ..\..\..\packages\Hydra.HttpRecorder.1.0.5417.13285-prerelease\lib\net45\Microsoft.Azure.Utilities.HttpRecorder.dll + + + ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll + + + ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll + + + ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll + + + False + ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll + + + False + ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + False + ..\..\..\packages\Hydra.SpecTestSupport.1.0.5417.13285-prerelease\lib\net45\Microsoft.WindowsAzure.Testing.dll + + + False + ..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll + + + False + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + + + + + + False + C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Management.Automation\v4.0_3.0.0.0__31bf3856ad364e35\System.Management.Automation.dll + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll + + + + + + + + False + ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + + + + + + + + + + + + + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + + + + {3b48a77b-5956-4a62-9081-92ba04b02b27} + Commands.Common.Test + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + {c1bda476-a5cc-4394-914d-48b0ec31a710} + Commands.ScenarioTests.Common + + + {bc420543-c04e-4bf3-96e1-cd81b823bdd7} + Commands.Test.Utilities + + + {4900ec4e-8deb-4412-9108-0bc52f81d457} + Commands.Utilities + + + {cd5aa507-f5ef-473d-855b-84b91a1abe54} + Commands + + + {46c06ed8-43d9-41fd-b73b-41547d9c04e1} + Commands.ManagedCache + + + + + + + + + + + + xcopy "$(SolutionDir)Package\$(ConfigurationName)\*.*" $(TargetDir) /Y /E + + \ No newline at end of file diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/MSSharedLibKey.snk b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/MSSharedLibKey.snk differ diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/PSCacheClientTest.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/PSCacheClientTest.cs new file mode 100644 index 000000000000..0479e03df0f8 --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/PSCacheClientTest.cs @@ -0,0 +1,37 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Xunit; + +namespace Microsoft.Azure.Commands.ManagedCache.Test +{ + public class PSCacheClientTest + { + [Fact] + public void ManagedCache_NormalizeCacheServiceName() + { + PSCacheClient client = new PSCacheClient(); + Assert.Equal("foobar", client.NormalizeCacheServiceName("FOOBAR")); + //can't start with a number + Assert.Throws(typeof(ArgumentException), () => { client.NormalizeCacheServiceName("2222"); }); + //too short + Assert.Throws(typeof(ArgumentException), () => { client.NormalizeCacheServiceName("foo"); }); + //too long + Assert.Throws(typeof(ArgumentException), () => { client.NormalizeCacheServiceName("h01234567890123456789"); }); + //empty + Assert.Throws(typeof(ArgumentException), () => { client.NormalizeCacheServiceName(""); }); + } + } +} diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/PSCacheServiceTest.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/PSCacheServiceTest.cs new file mode 100644 index 000000000000..9e938b3f992f --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/PSCacheServiceTest.cs @@ -0,0 +1,59 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.ManagedCache.Models; +using Microsoft.Azure.Management.ManagedCache.Models; +using Xunit; + +namespace Microsoft.Azure.Commands.ManagedCache.Test +{ + public class PSCacheServiceTest + { + [Fact] + public void InitializeAllFieldsFromResponseObject() + { + //Arrange + string testState = "Started"; + string testSubState = "Active"; + string testName = "Dummy"; + string testLocation = "West US"; + CacheServiceSkuType testSku = CacheServiceSkuType.Premium; + int testSkuCount = 2; //This will be mapped to 10GB display value + string expectedMemoryInfo = "10GB"; + + CloudServiceResource resource = new CloudServiceResource(); + resource.State = testState; + resource.SubState = testSubState; + resource.Name = testName; + + IntrinsicSettings intrinsic = new IntrinsicSettings(); + IntrinsicSettings.CacheServiceInput cacheInput = new IntrinsicSettings.CacheServiceInput(); + intrinsic.CacheServiceInputSection = cacheInput; + resource.IntrinsicSettingsSection = intrinsic; + cacheInput.Location = testLocation; + cacheInput.SkuCount = testSkuCount; + cacheInput.SkuType = testSku; + + //Act + PSCacheService service = new PSCacheService(resource); + + //Assert + Assert.Equal(testSubState, service.State); + Assert.Equal(testName, service.Name); + Assert.Equal(testLocation, service.Location); + Assert.Equal(expectedMemoryInfo, service.Memory); + Assert.Equal(testSku, service.Sku); + } + } +} diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/Properties/AssemblyInfo.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..55d7f84136ff --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/Properties/AssemblyInfo.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Reflection; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("ManagedCache Test Assembly")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct("ManagedCache Test Assembly")] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] + +[assembly: ComVisible(false)] +[assembly: CLSCompliant(false)] +[assembly: Guid("3E5D3114-DEBB-4DC2-BB9D-CF2A2707F74D")] +[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] +[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/RuntimeDefinedParameterDictionaryTest.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/RuntimeDefinedParameterDictionaryTest.cs new file mode 100644 index 000000000000..ef6dea959cb9 --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/RuntimeDefinedParameterDictionaryTest.cs @@ -0,0 +1,67 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.Azure.Commands.ManagedCache.Models; +using Microsoft.Azure.Management.ManagedCache.Models; +using Xunit; + +namespace Microsoft.Azure.Commands.ManagedCache.Test +{ + public class MemoryDynamicParameterSetTest + { + [Fact] + public void ConstructCorrectDynamicParameterBasedOnCurrentSku() + { + //Arrange + CacheServiceSkuType skuType = CacheServiceSkuType.Standard; + int expectedValueNumber = 10; + string minValue = "1GB"; + string maxValue = "10GB"; + string secondMinValue = "2GB"; + string memoryParameterName = "Memory"; + MemoryDynamicParameterSet memoryDynamicParameter = new MemoryDynamicParameterSet(); + + //Act + RuntimeDefinedParameterDictionary parameters = memoryDynamicParameter.GetDynamicParameters(skuType) + as RuntimeDefinedParameterDictionary; + RuntimeDefinedParameter parameter = parameters[memoryParameterName]; + + //Assert + Assert.Equal(memoryParameterName, parameter.Name); + Assert.Equal(2, parameter.Attributes.Count); + Assert.True(parameter.Attributes[1] is ValidateSetAttribute); + ValidateSetAttribute validateSetAttribute = parameter.Attributes[1] as ValidateSetAttribute; + Assert.Equal(expectedValueNumber, validateSetAttribute.ValidValues.Count); + Assert.Equal(minValue, validateSetAttribute.ValidValues[0]); + Assert.Equal(secondMinValue, validateSetAttribute.ValidValues[1]); + Assert.Equal(maxValue, validateSetAttribute.ValidValues[expectedValueNumber-1]); + } + + [Fact] + public void GetCorrectDefaultMemoryValueFromDynamicParameter() + { + //Arrange + CacheServiceSkuType skuType = CacheServiceSkuType.Basic; + MemoryDynamicParameterSet memoryDynamicParameter = new MemoryDynamicParameterSet(); + + //Act + memoryDynamicParameter.GetDynamicParameters(skuType); + string memoryValue = memoryDynamicParameter.GetMemoryValue(skuType); + + //Assert + Assert.Equal("128MB", memoryValue); + } + } +} diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/ScenarioTests/ManagedCacheTests.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/ScenarioTests/ManagedCacheTests.cs new file mode 100644 index 000000000000..b4fa1f56cf2b --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/ScenarioTests/ManagedCacheTests.cs @@ -0,0 +1,58 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Microsoft.WindowsAzure.Testing; +using Xunit; + +namespace Microsoft.Azure.Commands.ManagedCache.Test.ScenarioTests +{ + public class ManagedCacheTests : ManagedCacheTestsBase + { + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void ManagedCacheEndToEndTest() + { + this.RunPowerShellTest("Test-ManagedCacheEndToEnd"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void ListLocationsTest() + { + this.RunPowerShellTest("Test-ListLocationsSupportCaching"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestManagedCacheNamedCacheStandard() + { + this.RunPowerShellTest("Test-ManagedCacheNamedCacheStandard"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestManagedCacheNamedCacheBasic() + { + this.RunPowerShellTest("Test-ManagedCacheNamedCacheBasic"); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestManagedCacheNamedCacheDoNotExists() + { + this.RunPowerShellTest("Test-ManagedCacheNamedCacheDoNotExists"); + } + } +} diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/ScenarioTests/ManagedCacheTests.ps1 b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/ScenarioTests/ManagedCacheTests.ps1 new file mode 100644 index 000000000000..1c13341d8d8d --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/ScenarioTests/ManagedCacheTests.ps1 @@ -0,0 +1,234 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +########################## Managed Cache End to End Scenario Tests ############################# + +<# +.SYNOPSIS +Managed Cache End to End +#> +function Test-ManagedCacheEndToEnd +{ + $cacheName = getAssetName + # cache service can only take lower case name + $cacheName = $cacheName.ToLower() + # new a sevice + New-AzureManagedCache $cacheName "West US" + + # verify using a get + $newCacheService = Get-AzureManagedCache $cacheName + Assert-AreEqual $cacheName $newCacheService.Name + Assert-AreEqual 'Basic' $newCacheService.Sku + Assert-AreEqual '128MB' $newCacheService.Memory + + # updating a proeprty and verify + $newCacheService = Set-AzureManagedCache $cacheName -Memory 256MB + Assert-AreEqual '256MB' $newCacheService.Memory + + # verify the access keys + $existingKey = Get-AzureManagedCacheAccessKey $cacheName + $newKey = New-AzureManagedCacheAccessKey $cacheName + Assert-AreNotEqual $existingKey.Primary $newKey.Primary + + # Remove it + Remove-AzureManagedCache $cacheName -Force +} + +########################## List caching service location Test ############################# +<# +.SYNOPSIS +List locations that support managed caching service +#> +function Test-ListLocationsSupportCaching +{ + $allLocations = Get-AzureManagedCacheLocation + + Assert-AreNotEqual 0 $allLocations.Count + + $found = $FALSE + foreach ($location in $allLocations) + { + if ($location.Location -eq "West US") + { + $found = $TRUE + break + } + } + Assert-True {$found} +} + +########################## Managed Cache (Named cache) Scenario Tests ############################# +<# +.SYNOPSIS +Managed Cache (Named cache) without actual cache +#> +function Test-ManagedCacheNamedCacheDoNotExists +{ + $cacheName = "nonexistingcache" + # cache service can only take lower case name + $cacheName = $cacheName.ToLower() + + Assert-ThrowsContains {New-AzureManagedCacheNamedCache -Name $cacheName -NamedCache "nonexisting" -ExpiryTime 10} "doesn't exist in current subscription" +} + +<# +.SYNOPSIS +Managed Cache (Named cache for basic sku) End to End +#> +function Test-ManagedCacheNamedCacheBasic +{ + $cacheName = "powershellbasic" + # cache service can only take lower case name + $cacheName = $cacheName.ToLower() + + # new a sevice + New-AzureManagedCache -Name $cacheName -Location "East US" -Sku Basic -Memory 128MB + + # verify using a get + $newCacheService = Get-AzureManagedCache $cacheName + Assert-AreEqual $cacheName $newCacheService.Name + Assert-AreEqual 'Basic' $newCacheService.Sku + Assert-AreEqual '128MB' $newCacheService.Memory + + Assert-ThrowsContains {New-AzureManagedCacheNamedCache -Name $cacheName -NamedCache "default"} "already has named cache with name" + Assert-ThrowsContains {New-AzureManagedCacheNamedCache -Name $cacheName -NamedCache "random"} "It is not possible to create named cache in Basic Sku" + + $cacheDetails = Get-AzureManagedCacheNamedCache -Name $cacheName + Assert-AreEqual $cacheName $cacheDetails.Name + Assert-AreEqual 'Basic' $cacheDetails.Sku + Assert-AreEqual '128MB' $cacheDetails.Memory + Assert-AreEqual 'East US' $cacheDetails.Location + Assert-AreEqual 1 $cacheDetails.NamedCaches.Count + foreach($singleNamedCache in $cacheDetails.NamedCaches) { + Assert-AreEqual "default" $singleNamedCache.CacheName + Assert-AreEqual "Absolute" $singleNamedCache.ExpiryPolicy + Assert-AreEqual 10 $singleNamedCache.TimeToLiveInMinutes + Assert-AreEqual "Enabled" $singleNamedCache.Eviction + Assert-AreEqual "Disabled" $singleNamedCache.Notifications + Assert-AreEqual "Disabled" $singleNamedCache.HighAvailability + } + + Assert-ThrowsContains {Set-AzureManagedCacheNamedCache -Name $cacheName -NamedCache "random"} "do not have named cache with name" + Assert-ThrowsContains {Set-AzureManagedCacheNamedCache -Name $cacheName -NamedCache "default" -WithNotifications} "Parameter 'WithNotifications' is not available for cache with Basic sku" + Assert-ThrowsContains {Set-AzureManagedCacheNamedCache -Name $cacheName -NamedCache "default" -WithHighAvailability} "Parameter 'WithHighAvailability' is not available for cache with Basic sku" + + $cacheDetailsAfterUpdate = Set-AzureManagedCacheNamedCache -Name $cacheName -NamedCache "default" -ExpiryTime 11 -ExpiryPolicy "Sliding" -Force + Assert-AreEqual $cacheName $cacheDetailsAfterUpdate.Name + Assert-AreEqual 'Basic' $cacheDetailsAfterUpdate.Sku + Assert-AreEqual '128MB' $cacheDetailsAfterUpdate.Memory + Assert-AreEqual 'East US' $cacheDetailsAfterUpdate.Location + Assert-AreEqual 1 $cacheDetailsAfterUpdate.NamedCaches.Count + foreach($singleNamedCache in $cacheDetailsAfterUpdate.NamedCaches) { + Assert-AreEqual "default" $singleNamedCache.CacheName + Assert-AreEqual "Sliding" $singleNamedCache.ExpiryPolicy + Assert-AreEqual 11 $singleNamedCache.TimeToLiveInMinutes + Assert-AreEqual "Enabled" $singleNamedCache.Eviction + Assert-AreEqual "Disabled" $singleNamedCache.Notifications + Assert-AreEqual "Disabled" $singleNamedCache.HighAvailability + } + + Assert-ThrowsContains {Remove-AzureManagedCacheNamedCache -Name $cacheName -NamedCache "default" -Force -PassThru} "It is not possible to remove 'default' named cache" + + # Remove it + Remove-AzureManagedCache $cacheName -Force +} + +<# +.SYNOPSIS +Managed Cache (Named cache for standard sku) End to End +#> +function Test-ManagedCacheNamedCacheStandard +{ + $cacheName = "powershellstandard" + # cache service can only take lower case name + $cacheName = $cacheName.ToLower() + + # new a sevice + New-AzureManagedCache -Name $cacheName -Location "West US" -Sku Standard -Memory 1GB + + # verify using a get + $newCacheService = Get-AzureManagedCache $cacheName + Assert-AreEqual $cacheName $newCacheService.Name + Assert-AreEqual 'Standard' $newCacheService.Sku + Assert-AreEqual '1GB' $newCacheService.Memory + + New-AzureManagedCacheNamedCache -Name $cacheName -NamedCache "random1" + Assert-ThrowsContains {New-AzureManagedCacheNamedCache -Name $cacheName -NamedCache "random1"} "already has named cache with name" + + New-AzureManagedCacheNamedCache -Name $cacheName -NamedCache "random2" -WithNotifications -WithHighAvailability -WithoutEviction + + $cacheDetails = Get-AzureManagedCacheNamedCache -Name $cacheName + Assert-AreEqual $cacheName $cacheDetails.Name + Assert-AreEqual 'Standard' $cacheDetails.Sku + Assert-AreEqual '1GB' $cacheDetails.Memory + Assert-AreEqual 'West US' $cacheDetails.Location + Assert-AreEqual 3 $cacheDetails.NamedCaches.Count + + $cacheRandom1 = Get-AzureManagedCacheNamedCache -Name $cacheName -NamedCache "random1" + Assert-AreEqual 1 $cacheRandom1.NamedCaches.Count + foreach($singleNamedCache in $cacheRandom1.NamedCaches) { + Assert-AreEqual "random1" $singleNamedCache.CacheName + Assert-AreEqual "Absolute" $singleNamedCache.ExpiryPolicy + Assert-AreEqual 10 $singleNamedCache.TimeToLiveInMinutes + Assert-AreEqual "Enabled" $singleNamedCache.Eviction + Assert-AreEqual "Disabled" $singleNamedCache.Notifications + Assert-AreEqual "Disabled" $singleNamedCache.HighAvailability + } + + $cacheRandom2 = Get-AzureManagedCacheNamedCache -Name $cacheName -NamedCache "random2" + Assert-AreEqual 1 $cacheRandom2.NamedCaches.Count + foreach($singleNamedCache in $cacheRandom2.NamedCaches) { + Assert-AreEqual "random2" $singleNamedCache.CacheName + Assert-AreEqual "Absolute" $singleNamedCache.ExpiryPolicy + Assert-AreEqual 10 $singleNamedCache.TimeToLiveInMinutes + Assert-AreEqual "Disabled" $singleNamedCache.Eviction + Assert-AreEqual "Enabled" $singleNamedCache.Notifications + Assert-AreEqual "Enabled" $singleNamedCache.HighAvailability + } + + Assert-ThrowsContains {Set-AzureManagedCacheNamedCache -Name $cacheName -NamedCache "nonexisting"} "do not have named cache with name" + + Set-AzureManagedCacheNamedCache -Name $cacheName -NamedCache "random1" -ExpiryTime 11 -ExpiryPolicy "Sliding" -WithNotifications -WithHighAvailability -Force + $cacheDetailsAfterUpdate = Get-AzureManagedCacheNamedCache -Name $cacheName -NamedCache "random1" + Assert-AreEqual 1 $cacheDetailsAfterUpdate.NamedCaches.Count + foreach($singleNamedCache in $cacheDetailsAfterUpdate.NamedCaches) { + Assert-AreEqual "random1" $singleNamedCache.CacheName + Assert-AreEqual "Sliding" $singleNamedCache.ExpiryPolicy + Assert-AreEqual 11 $singleNamedCache.TimeToLiveInMinutes + Assert-AreEqual "Enabled" $singleNamedCache.Eviction + Assert-AreEqual "Enabled" $singleNamedCache.Notifications + Assert-AreEqual "Enabled" $singleNamedCache.HighAvailability + } + + Set-AzureManagedCacheNamedCache -Name $cacheName -NamedCache "random2" -Force + $cacheDetailsAfterUpdate2 = Get-AzureManagedCacheNamedCache -Name $cacheName -NamedCache "random2" + Assert-AreEqual 1 $cacheDetailsAfterUpdate2.NamedCaches.Count + foreach($singleNamedCache in $cacheDetailsAfterUpdate2.NamedCaches) { + Assert-AreEqual "random2" $singleNamedCache.CacheName + Assert-AreEqual "Absolute" $singleNamedCache.ExpiryPolicy + Assert-AreEqual 10 $singleNamedCache.TimeToLiveInMinutes + Assert-AreEqual "Enabled" $singleNamedCache.Eviction + Assert-AreEqual "Disabled" $singleNamedCache.Notifications + Assert-AreEqual "Disabled" $singleNamedCache.HighAvailability + } + + Assert-ThrowsContains {Remove-AzureManagedCacheNamedCache -Name $cacheName -NamedCache "nonexisting" -Force -PassThru} "do not have named cache with name" + Assert-True { Remove-AzureManagedCacheNamedCache -Name $cacheName -NamedCache "random2" -Force -PassThru } + + $cacheDetailsAfterRemove = Get-AzureManagedCacheNamedCache -Name $cacheName + Assert-AreEqual 2 $cacheDetailsAfterRemove.NamedCaches.Count + + # Remove it + Remove-AzureManagedCache $cacheName -Force +} \ No newline at end of file diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/ScenarioTests/ManagedCacheTestsBase.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/ScenarioTests/ManagedCacheTestsBase.cs new file mode 100644 index 000000000000..320cd6660e95 --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/ScenarioTests/ManagedCacheTestsBase.cs @@ -0,0 +1,59 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Management.ManagedCache; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Testing; + +namespace Microsoft.Azure.Commands.ManagedCache.Test.ScenarioTests +{ + public abstract class ManagedCacheTestsBase + { + private EnvironmentSetupHelper helper; + + protected ManagedCacheTestsBase() + { + helper = new EnvironmentSetupHelper(); + } + + protected void SetupManagementClients() + { + var managedCacheClient = GetManagedCacheClient(); + + helper.SetupManagementClients(managedCacheClient); + } + + protected void RunPowerShellTest(params string[] scripts) + { + using (UndoContext context = UndoContext.Current) + { + context.Start(TestUtilities.GetCallingClass(2), TestUtilities.GetCurrentMethodName(2)); + + SetupManagementClients(); + + helper.SetupEnvironment(AzureModule.AzureServiceManagement); + helper.SetupModules(AzureModule.AzureServiceManagement, + "ScenarioTests\\" + this.GetType().Name + ".ps1"); + + helper.RunPowerShellTest(scripts); + } + } + + protected ManagedCacheClient GetManagedCacheClient() + { + return TestBase.GetServiceClient(new RDFETestEnvironmentFactory()); + } + } +} diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/SessionRecords/Microsoft.Azure.Commands.ManagedCache.Test.ScenarioTests.ManagedCacheTests/ListLocationsTest.json b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/SessionRecords/Microsoft.Azure.Commands.ManagedCache.Test.ScenarioTests.ManagedCacheTests/ListLocationsTest.json new file mode 100644 index 000000000000..7154274ed6d3 --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/SessionRecords/Microsoft.Azure.Commands.ManagedCache.Test.ScenarioTests.ManagedCacheTests/ListLocationsTest.json @@ -0,0 +1,46 @@ +{ + "Entries": [ + { + "RequestUri": "/2c224e7e-3ef5-431d-a57b-e71f4662e3a6/cloudservices/mycloudservice/resources/cacheservice/~/Caching/mycacheservice/Options/Regions", + "EncodedRequestUri": "LzJjMjI0ZTdlLTNlZjUtNDMxZC1hNTdiLWU3MWY0NjYyZTNhNi9jbG91ZHNlcnZpY2VzL215Y2xvdWRzZXJ2aWNlL3Jlc291cmNlcy9jYWNoZXNlcnZpY2Uvfi9DYWNoaW5nL215Y2FjaGVzZXJ2aWNlL09wdGlvbnMvUmVnaW9ucw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.0" + ] + }, + "ResponseBody": "\r\n East Asia\r\n East US\r\n East US 2\r\n North Central US\r\n North Europe\r\n Southeast Asia\r\n West Europe\r\n West US\r\n South Central US\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "01a9adbe4c6d1f1cbbe16f99c4d7d519" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 23 Sep 2014 23:47:54 GMT" + ], + "Server": [ + "1.0.6198.129", + "(rd_rdfe_stable.140922-1311)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "2c224e7e-3ef5-431d-a57b-e71f4662e3a6" + } +} \ No newline at end of file diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/SessionRecords/Microsoft.Azure.Commands.ManagedCache.Test.ScenarioTests.ManagedCacheTests/ManagedCacheEndToEndTest.json b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/SessionRecords/Microsoft.Azure.Commands.ManagedCache.Test.ScenarioTests.ManagedCacheTests/ManagedCacheEndToEndTest.json new file mode 100644 index 000000000000..a957bbcef232 --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/SessionRecords/Microsoft.Azure.Commands.ManagedCache.Test.ScenarioTests.ManagedCacheTests/ManagedCacheEndToEndTest.json @@ -0,0 +1,1526 @@ +{ + "Entries": [ + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices/CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n \r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n West US\r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "2b985d2080adb029b9c9f3bfd0c8ea54" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 17:50:56 GMT" + ], + "ETag": [ + "29730e3e-1926-4025-aa39-43b5cab2c729" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices/CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n \r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n onesdk2608\r\n 1.0\r\n 9b0c4024-716c-42c5-bd03-fa0e56c2eca0\r\n Started\r\n Creating\r\n \r\n \r\n \r\n Basic\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 7/6/2014 5:51:01 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "490e446702d5bde1b2dd98c5fc854958" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 17:51:30 GMT" + ], + "ETag": [ + "29730e3e-1926-4025-aa39-43b5cab2c729" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices/CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n \r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n onesdk2608\r\n 1.0\r\n 9b0c4024-716c-42c5-bd03-fa0e56c2eca0\r\n Started\r\n Creating\r\n \r\n \r\n \r\n Basic\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 7/6/2014 5:51:01 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "04c1d0dc5395b79a8e1d26878c8faeb1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 17:52:30 GMT" + ], + "ETag": [ + "29730e3e-1926-4025-aa39-43b5cab2c729" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices/CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n \r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n onesdk2608\r\n 1.0\r\n 9b0c4024-716c-42c5-bd03-fa0e56c2eca0\r\n Started\r\n Creating\r\n \r\n \r\n \r\n Basic\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 7/6/2014 5:51:01 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "c1c0ba84b022bee0bf6094ee41166f16" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 17:53:30 GMT" + ], + "ETag": [ + "29730e3e-1926-4025-aa39-43b5cab2c729" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices/CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n \r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n onesdk2608\r\n 1.0\r\n 9b0c4024-716c-42c5-bd03-fa0e56c2eca0\r\n Started\r\n Creating\r\n \r\n \r\n \r\n Basic\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 7/6/2014 5:51:01 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "4f63852c2260bd50a8a66949a32a725e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 17:54:31 GMT" + ], + "ETag": [ + "29730e3e-1926-4025-aa39-43b5cab2c729" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices/CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n \r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n onesdk2608\r\n 1.0\r\n 9b0c4024-716c-42c5-bd03-fa0e56c2eca0\r\n Started\r\n Creating\r\n \r\n \r\n \r\n Basic\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 7/6/2014 5:51:01 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "5d68a3689127bd41aed84b3f04710640" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 17:55:31 GMT" + ], + "ETag": [ + "29730e3e-1926-4025-aa39-43b5cab2c729" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices/CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n \r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n onesdk2608\r\n 1.0\r\n 9b0c4024-716c-42c5-bd03-fa0e56c2eca0\r\n Started\r\n Creating\r\n \r\n \r\n \r\n Basic\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 7/6/2014 5:51:01 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "ecb4bf6ebe6db60baa33509434951b8f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 17:56:32 GMT" + ], + "ETag": [ + "29730e3e-1926-4025-aa39-43b5cab2c729" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices/CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n \r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n onesdk2608\r\n 1.0\r\n 9b0c4024-716c-42c5-bd03-fa0e56c2eca0\r\n Started\r\n Creating\r\n \r\n \r\n \r\n Basic\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 7/6/2014 5:51:01 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "4bb8222a0201bf689325a2abaf118165" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 17:57:32 GMT" + ], + "ETag": [ + "29730e3e-1926-4025-aa39-43b5cab2c729" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices/CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n \r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n onesdk2608\r\n 1.0\r\n 9b0c4024-716c-42c5-bd03-fa0e56c2eca0\r\n Started\r\n Creating\r\n \r\n \r\n \r\n Basic\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 7/6/2014 5:51:01 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "be06adb3660ebf369763e0f57f08cce9" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 17:58:32 GMT" + ], + "ETag": [ + "29730e3e-1926-4025-aa39-43b5cab2c729" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices/CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n \r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n onesdk2608\r\n 1.0\r\n 9b0c4024-716c-42c5-bd03-fa0e56c2eca0\r\n Started\r\n Creating\r\n \r\n \r\n \r\n Basic\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 7/6/2014 5:51:01 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "4e7059c8b540b023851d054d58883e44" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 17:59:33 GMT" + ], + "ETag": [ + "29730e3e-1926-4025-aa39-43b5cab2c729" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices/CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n \r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n onesdk2608\r\n 1.0\r\n 9b0c4024-716c-42c5-bd03-fa0e56c2eca0\r\n Started\r\n Creating\r\n \r\n \r\n \r\n Basic\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 7/6/2014 5:51:01 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "144fe34ad400ba96bbd550891588c337" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 18:00:34 GMT" + ], + "ETag": [ + "29730e3e-1926-4025-aa39-43b5cab2c729" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices/CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n \r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n onesdk2608\r\n 1.0\r\n 9b0c4024-716c-42c5-bd03-fa0e56c2eca0\r\n Started\r\n Active\r\n \r\n \r\n \r\n Basic\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 7/6/2014 5:51:01 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "4530567cb681bcce90f7c25562d1181d" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 18:01:33 GMT" + ], + "ETag": [ + "29730e3e-1926-4025-aa39-43b5cab2c729" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices/CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n \r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n onesdk2608\r\n 1.0\r\n de579dfd-1347-4f05-9110-cde88b579297\r\n Started\r\n Updating\r\n \r\n \r\n \r\n Basic\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 7/6/2014 6:01:16 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "94bae2da848fbe549ac898a548dda1d6" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 18:02:08 GMT" + ], + "ETag": [ + "29730e3e-1926-4025-aa39-43b5cab2c729" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices/CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n \r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n onesdk2608\r\n 1.0\r\n de579dfd-1347-4f05-9110-cde88b579297\r\n Started\r\n Updating\r\n \r\n \r\n \r\n Basic\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 7/6/2014 6:01:16 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "6d36f3ce723db1b59c86a1531d762841" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 18:03:08 GMT" + ], + "ETag": [ + "29730e3e-1926-4025-aa39-43b5cab2c729" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices/CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n \r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n onesdk2608\r\n 1.0\r\n de579dfd-1347-4f05-9110-cde88b579297\r\n Started\r\n Updating\r\n \r\n \r\n \r\n Basic\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 7/6/2014 6:01:16 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "f72edbbfd711b0c2bcb2b3244f507a6b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 18:04:08 GMT" + ], + "ETag": [ + "29730e3e-1926-4025-aa39-43b5cab2c729" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices/CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n \r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n onesdk2608\r\n 1.0\r\n de579dfd-1347-4f05-9110-cde88b579297\r\n Started\r\n Updating\r\n \r\n \r\n \r\n Basic\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 7/6/2014 6:01:16 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "39f1114aa676be809ed6b6831b2236b8" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 18:05:09 GMT" + ], + "ETag": [ + "29730e3e-1926-4025-aa39-43b5cab2c729" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices/CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n \r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n onesdk2608\r\n 1.0\r\n de579dfd-1347-4f05-9110-cde88b579297\r\n Started\r\n Updating\r\n \r\n \r\n \r\n Basic\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 7/6/2014 6:01:16 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "029ed4985adaba6e92a400ff1b18b171" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 18:06:10 GMT" + ], + "ETag": [ + "29730e3e-1926-4025-aa39-43b5cab2c729" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices/CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n \r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n onesdk2608\r\n 1.0\r\n de579dfd-1347-4f05-9110-cde88b579297\r\n Started\r\n Updating\r\n \r\n \r\n \r\n Basic\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 7/6/2014 6:01:16 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "3eaba2d57db0b232b803e7945506f8f8" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 18:07:10 GMT" + ], + "ETag": [ + "29730e3e-1926-4025-aa39-43b5cab2c729" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices/CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n \r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n onesdk2608\r\n 1.0\r\n de579dfd-1347-4f05-9110-cde88b579297\r\n Started\r\n Updating\r\n \r\n \r\n \r\n Basic\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 7/6/2014 6:01:16 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "7e727bf458acbb2790415ad15a75b9d9" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 18:08:11 GMT" + ], + "ETag": [ + "29730e3e-1926-4025-aa39-43b5cab2c729" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices/CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n \r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n onesdk2608\r\n 1.0\r\n de579dfd-1347-4f05-9110-cde88b579297\r\n Started\r\n Updating\r\n \r\n \r\n \r\n Basic\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 7/6/2014 6:01:16 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "c898f37bd56eb608b5105609bf8a9a5a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 18:09:11 GMT" + ], + "ETag": [ + "29730e3e-1926-4025-aa39-43b5cab2c729" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices/CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n \r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n onesdk2608\r\n 1.0\r\n de579dfd-1347-4f05-9110-cde88b579297\r\n Started\r\n Updating\r\n \r\n \r\n \r\n Basic\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 7/6/2014 6:01:16 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "ca88f9fb7f0bbd96bbf7dd6d72a33cf4" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 18:10:11 GMT" + ], + "ETag": [ + "29730e3e-1926-4025-aa39-43b5cab2c729" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices/CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n \r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n onesdk2608\r\n 1.0\r\n de579dfd-1347-4f05-9110-cde88b579297\r\n Started\r\n Updating\r\n \r\n \r\n \r\n Basic\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 7/6/2014 6:01:16 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "521dbf1d8d53ba3bbd64141b7834ffe8" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 18:11:12 GMT" + ], + "ETag": [ + "29730e3e-1926-4025-aa39-43b5cab2c729" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices/CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n \r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n onesdk2608\r\n 1.0\r\n de579dfd-1347-4f05-9110-cde88b579297\r\n Started\r\n Active\r\n \r\n \r\n \r\n Basic\r\n West US\r\n 2\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 7/6/2014 6:01:16 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "1d5f6272275fba26b75da2909ae0b4eb" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 18:12:13 GMT" + ], + "ETag": [ + "29730e3e-1926-4025-aa39-43b5cab2c729" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US/resources/cacheservice/~/Caching/dummy/Namespaces/onesdk2608", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "true", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "30e36fc0f4a5b88094d66626b4eb60d3" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 17:50:59 GMT" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US/resources/cacheservice/Caching/onesdk2608", + "RequestMethod": "PUT", + "RequestBody": "\r\n \r\n \r\n Basic\r\n West US\r\n 1\r\n 1.0.0\r\n 1024\r\n \r\n \r\n \r\n", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ], + "x-ms-version": [ + "2012-08-01" + ], + "client-tracking-id": [ + "3" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "e1f90e254c21bcf68e59460b1acc2487" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 17:50:59 GMT" + ], + "ETag": [ + "9b0c4024-716c-42c5-bd03-fa0e56c2eca0" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US/resources/cacheservice/Caching/onesdk2608", + "RequestMethod": "PUT", + "RequestBody": "\r\n \r\n \r\n Basic\r\n West US\r\n 2\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n \r\n \r\n \r\n", + "RequestHeaders": { + "If-Match": [ + "9b0c4024-716c-42c5-bd03-fa0e56c2eca0" + ], + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ], + "client-tracking-id": [ + "20" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "184737f95eefb88086e28caa3fb75b0b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 18:01:37 GMT" + ], + "ETag": [ + "de579dfd-1347-4f05-9110-cde88b579297" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operations/e1f90e254c21bcf68e59460b1acc2487", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ], + "client-tracking-id": [ + "3" + ] + }, + "ResponseBody": "\r\n e1f90e25-4c21-bcf6-8e59-460b1acc2487\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "277ea8cfbb77b464b301c073e52ce0c4" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 17:51:00 GMT" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operations/e1f90e254c21bcf68e59460b1acc2487", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ], + "client-tracking-id": [ + "3" + ] + }, + "ResponseBody": "\r\n e1f90e25-4c21-bcf6-8e59-460b1acc2487\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "b0d6b4a22c09bb48a240aa853d695ea3" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 17:51:30 GMT" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n \r\n aztstjcjobclsabrzy\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsadcuu\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsanbmb\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsaqjwu\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsaskes\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsatabp\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsavrzs\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsbfllr\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsbgnqk\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsbrhbj\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsbsefr\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsbvuae\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclscdclk\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclscdjdp\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclscrwsz\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsczxzk\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsdblyf\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsdezvt\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsdjfrl\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsdtvmd\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsduhom\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclselofj\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclseshfx\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclseuzny\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsexies\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsexnyf\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsfyvee\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsfywzg\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n scheduler\r\n JobCollections\r\n aztstjcjobcllnkvbcv\r\n 1.1\r\n 29d5806a-c1ae-417e-ba20-63953ec823d0\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n aztstjcjobclsgjxwz\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsguzix\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclshgdva\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclshhltr\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsidgrg\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsilaic\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsixcht\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsjmafh\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsjvzbw\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsjxxrm\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsjyslm\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclskebaj\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclslfwil\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclslhnch\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsltxec\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsluoay\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsmcgiy\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsmpvtc\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsmwyjx\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsndfra\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsnedcm\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsnffyk\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsnodpd\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsntawk\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsoazst\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsotqhy\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclspdklh\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclspobdn\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclspsziv\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclspupar\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqasdr\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqbsjt\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqemag\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqfyva\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqitok\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqlkph\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqpsxk\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqtewe\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqvecg\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqwgeh\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqzptb\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsrhlub\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsrjtnr\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsrjxsq\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsrredc\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstblsn\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstcbjj\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstfpqz\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstglen\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstkacb\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstsrkv\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstxeua\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsugcpk\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsuwnbq\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsuzvkn\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsvkbrv\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsvorjd\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsvwiiv\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclswefsv\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclswnewk\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclswxpjf\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsxgagp\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsxhzwt\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsxoyhe\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsxzazs\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsxzgco\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsyalqw\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsycujm\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsyibac\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsynyam\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsypule\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsyvkyd\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszbtxw\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszelvz\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszfowt\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszjkzl\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszmbfw\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszncpv\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszoeih\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszqnox\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n \r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n onesdk2608\r\n 1.0\r\n 9b0c4024-716c-42c5-bd03-fa0e56c2eca0\r\n Started\r\n Active\r\n \r\n \r\n \r\n Basic\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 7/6/2014 5:51:01 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n cloudserv\r\n \r\n hi there\r\n West US\r\n \r\n \r\n \r\n CS-NorthCentralUS-scheduler\r\n \r\n CS-NorthCentralUS-scheduler\r\n North Central US\r\n \r\n \r\n \r\n CS-SouthCentralUS-scheduler\r\n \r\n CS-SouthCentralUS-scheduler\r\n South Central US\r\n \r\n \r\n \r\n CS-WebJobs-WestEurope-scheduler\r\n \r\n CS-WebJobs-WestEurope-scheduler\r\n West Europe\r\n \r\n \r\n \r\n CS-WebJobs-WestUS-scheduler\r\n \r\n CS-WebJobs-WestUS-scheduler\r\n West US\r\n \r\n \r\n \r\n devSaopDS-cs1\r\n \r\n devSaopDS-cs1\r\n north europe\r\n \r\n \r\n \r\n name\r\n \r\n couves\r\n West US\r\n \r\n \r\n \r\n RecoveryServices-P2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-east-asia\r\n \r\n 04301767-ecac-4e60-a412-d289bf890e93\r\n east asia\r\n \r\n \r\n WABackup\r\n BackupVault\r\n Test\r\n \r\n 1.1\r\n e25454eb-a351-4199-a6e5-1208207bf9cf\r\n Started\r\n Ok\r\n \r\n \r\n StampId\r\n 64437628-f3e5-4d8a-928b-44b2c9889117\r\n \r\n \r\n ResourceId\r\n 3888925532610829152\r\n \r\n \r\n BackendStampId\r\n 64437628-f3e5-4d8a-928b-44b2c9889117\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "f2b256c1cbdcbf6bb2cf1965f77bff33" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 18:01:35 GMT" + ], + "Server": [ + "1.0.6198.100", + "(rd_rdfe_stable.140703-1223)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n \r\n aztstjcjobclsabrzy\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsadcuu\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsanbmb\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsaqjwu\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsaskes\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsatabp\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsavrzs\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsbfllr\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsbgnqk\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsbrhbj\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsbsefr\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsbvuae\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclscdclk\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclscdjdp\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclscrwsz\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsczxzk\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsdblyf\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsdezvt\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsdjfrl\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsdtvmd\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsduhom\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclselofj\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclseshfx\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclseuzny\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsexies\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsexnyf\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsfyvee\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsfywzg\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n scheduler\r\n JobCollections\r\n aztstjcjobcllnkvbcv\r\n 1.1\r\n 29d5806a-c1ae-417e-ba20-63953ec823d0\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n aztstjcjobclsgjxwz\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsguzix\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclshgdva\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclshhltr\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsidgrg\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsilaic\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsixcht\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsjmafh\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsjvzbw\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsjxxrm\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsjyslm\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclskebaj\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclslfwil\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclslhnch\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsltxec\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsluoay\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsmcgiy\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsmpvtc\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsmwyjx\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsndfra\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsnedcm\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsnffyk\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsnodpd\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsntawk\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsoazst\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsotqhy\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclspdklh\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclspobdn\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclspsziv\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclspupar\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqasdr\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqbsjt\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqemag\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqfyva\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqitok\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqlkph\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqpsxk\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqtewe\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqvecg\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqwgeh\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqzptb\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsrhlub\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsrjtnr\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsrjxsq\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsrredc\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstblsn\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstcbjj\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstfpqz\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstglen\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstkacb\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstsrkv\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstxeua\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsugcpk\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsuwnbq\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsuzvkn\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsvkbrv\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsvorjd\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsvwiiv\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclswefsv\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclswnewk\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclswxpjf\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsxgagp\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsxhzwt\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsxoyhe\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsxzazs\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsxzgco\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsyalqw\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsycujm\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsyibac\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsynyam\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsypule\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsyvkyd\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszbtxw\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszelvz\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszfowt\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszjkzl\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszmbfw\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszncpv\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszoeih\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszqnox\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n \r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n onesdk2608\r\n 1.0\r\n 9b0c4024-716c-42c5-bd03-fa0e56c2eca0\r\n Started\r\n Active\r\n \r\n \r\n \r\n Basic\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 7/6/2014 5:51:01 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n cloudserv\r\n \r\n hi there\r\n West US\r\n \r\n \r\n \r\n CS-NorthCentralUS-scheduler\r\n \r\n CS-NorthCentralUS-scheduler\r\n North Central US\r\n \r\n \r\n \r\n CS-SouthCentralUS-scheduler\r\n \r\n CS-SouthCentralUS-scheduler\r\n South Central US\r\n \r\n \r\n \r\n CS-WebJobs-WestEurope-scheduler\r\n \r\n CS-WebJobs-WestEurope-scheduler\r\n West Europe\r\n \r\n \r\n \r\n CS-WebJobs-WestUS-scheduler\r\n \r\n CS-WebJobs-WestUS-scheduler\r\n West US\r\n \r\n \r\n \r\n devSaopDS-cs1\r\n \r\n devSaopDS-cs1\r\n north europe\r\n \r\n \r\n \r\n name\r\n \r\n couves\r\n West US\r\n \r\n \r\n \r\n RecoveryServices-P2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-east-asia\r\n \r\n 04301767-ecac-4e60-a412-d289bf890e93\r\n east asia\r\n \r\n \r\n WABackup\r\n BackupVault\r\n Test\r\n \r\n 1.1\r\n e25454eb-a351-4199-a6e5-1208207bf9cf\r\n Started\r\n Ok\r\n \r\n \r\n StampId\r\n 64437628-f3e5-4d8a-928b-44b2c9889117\r\n \r\n \r\n ResourceId\r\n 3888925532610829152\r\n \r\n \r\n BackendStampId\r\n 64437628-f3e5-4d8a-928b-44b2c9889117\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "5ab293f473dab923bab76385de3d1ffa" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 18:01:36 GMT" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n \r\n aztstjcjobclsabrzy\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsadcuu\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsanbmb\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsaqjwu\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsaskes\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsatabp\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsavrzs\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsbfllr\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsbgnqk\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsbrhbj\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsbsefr\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsbvuae\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclscdclk\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclscdjdp\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclscrwsz\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsczxzk\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsdblyf\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsdezvt\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsdjfrl\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsdtvmd\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsduhom\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclselofj\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclseshfx\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclseuzny\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsexies\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsexnyf\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsfyvee\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsfywzg\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n scheduler\r\n JobCollections\r\n aztstjcjobcllnkvbcv\r\n 1.1\r\n 29d5806a-c1ae-417e-ba20-63953ec823d0\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n aztstjcjobclsgjxwz\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsguzix\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclshgdva\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclshhltr\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsidgrg\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsilaic\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsixcht\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsjmafh\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsjvzbw\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsjxxrm\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsjyslm\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclskebaj\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclslfwil\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclslhnch\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsltxec\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsluoay\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsmcgiy\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsmpvtc\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsmwyjx\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsndfra\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsnedcm\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsnffyk\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsnodpd\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsntawk\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsoazst\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsotqhy\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclspdklh\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclspobdn\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclspsziv\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclspupar\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqasdr\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqbsjt\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqemag\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqfyva\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqitok\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqlkph\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqpsxk\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqtewe\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqvecg\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqwgeh\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqzptb\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsrhlub\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsrjtnr\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsrjxsq\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsrredc\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstblsn\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstcbjj\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstfpqz\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstglen\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstkacb\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstsrkv\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstxeua\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsugcpk\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsuwnbq\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsuzvkn\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsvkbrv\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsvorjd\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsvwiiv\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclswefsv\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclswnewk\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclswxpjf\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsxgagp\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsxhzwt\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsxoyhe\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsxzazs\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsxzgco\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsyalqw\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsycujm\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsyibac\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsynyam\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsypule\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsyvkyd\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszbtxw\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszelvz\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszfowt\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszjkzl\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszmbfw\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszncpv\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszoeih\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszqnox\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n \r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n onesdk2608\r\n 1.0\r\n de579dfd-1347-4f05-9110-cde88b579297\r\n Started\r\n Active\r\n \r\n \r\n \r\n Basic\r\n West US\r\n 2\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 7/6/2014 6:01:16 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n cloudserv\r\n \r\n hi there\r\n West US\r\n \r\n \r\n \r\n CS-NorthCentralUS-scheduler\r\n \r\n CS-NorthCentralUS-scheduler\r\n North Central US\r\n \r\n \r\n \r\n CS-SouthCentralUS-scheduler\r\n \r\n CS-SouthCentralUS-scheduler\r\n South Central US\r\n \r\n \r\n \r\n CS-WebJobs-WestEurope-scheduler\r\n \r\n CS-WebJobs-WestEurope-scheduler\r\n West Europe\r\n \r\n \r\n \r\n CS-WebJobs-WestUS-scheduler\r\n \r\n CS-WebJobs-WestUS-scheduler\r\n West US\r\n \r\n \r\n \r\n devSaopDS-cs1\r\n \r\n devSaopDS-cs1\r\n north europe\r\n \r\n \r\n \r\n name\r\n \r\n couves\r\n West US\r\n \r\n \r\n \r\n RecoveryServices-P2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-east-asia\r\n \r\n 04301767-ecac-4e60-a412-d289bf890e93\r\n east asia\r\n \r\n \r\n WABackup\r\n BackupVault\r\n Test\r\n \r\n 1.1\r\n e25454eb-a351-4199-a6e5-1208207bf9cf\r\n Started\r\n Ok\r\n \r\n \r\n StampId\r\n 64437628-f3e5-4d8a-928b-44b2c9889117\r\n \r\n \r\n ResourceId\r\n 3888925532610829152\r\n \r\n \r\n BackendStampId\r\n 64437628-f3e5-4d8a-928b-44b2c9889117\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "131471d6f898b9e68c7bfd064ee64b3f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 18:12:14 GMT" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n \r\n aztstjcjobclsabrzy\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsadcuu\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsanbmb\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsaqjwu\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsaskes\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsatabp\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsavrzs\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsbfllr\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsbgnqk\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsbrhbj\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsbsefr\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsbvuae\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclscdclk\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclscdjdp\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclscrwsz\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsczxzk\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsdblyf\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsdezvt\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsdjfrl\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsdtvmd\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsduhom\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclselofj\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclseshfx\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclseuzny\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsexies\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsexnyf\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsfyvee\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsfywzg\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n scheduler\r\n JobCollections\r\n aztstjcjobcllnkvbcv\r\n 1.1\r\n 29d5806a-c1ae-417e-ba20-63953ec823d0\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n aztstjcjobclsgjxwz\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsguzix\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclshgdva\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclshhltr\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsidgrg\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsilaic\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsixcht\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsjmafh\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsjvzbw\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsjxxrm\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsjyslm\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclskebaj\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclslfwil\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclslhnch\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsltxec\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsluoay\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsmcgiy\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsmpvtc\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsmwyjx\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsndfra\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsnedcm\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsnffyk\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsnodpd\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsntawk\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsoazst\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsotqhy\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclspdklh\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclspobdn\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclspsziv\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclspupar\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqasdr\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqbsjt\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqemag\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqfyva\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqitok\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqlkph\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqpsxk\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqtewe\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqvecg\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqwgeh\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqzptb\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsrhlub\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsrjtnr\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsrjxsq\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsrredc\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstblsn\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstcbjj\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstfpqz\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstglen\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstkacb\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstsrkv\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstxeua\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsugcpk\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsuwnbq\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsuzvkn\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsvkbrv\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsvorjd\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsvwiiv\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclswefsv\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclswnewk\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclswxpjf\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsxgagp\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsxhzwt\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsxoyhe\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsxzazs\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsxzgco\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsyalqw\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsycujm\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsyibac\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsynyam\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsypule\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsyvkyd\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszbtxw\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszelvz\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszfowt\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszjkzl\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszmbfw\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszncpv\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszoeih\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszqnox\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n \r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n onesdk2608\r\n 1.0\r\n de579dfd-1347-4f05-9110-cde88b579297\r\n Started\r\n Active\r\n \r\n \r\n \r\n Basic\r\n West US\r\n 2\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 7/6/2014 6:01:16 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n cloudserv\r\n \r\n hi there\r\n West US\r\n \r\n \r\n \r\n CS-NorthCentralUS-scheduler\r\n \r\n CS-NorthCentralUS-scheduler\r\n North Central US\r\n \r\n \r\n \r\n CS-SouthCentralUS-scheduler\r\n \r\n CS-SouthCentralUS-scheduler\r\n South Central US\r\n \r\n \r\n \r\n CS-WebJobs-WestEurope-scheduler\r\n \r\n CS-WebJobs-WestEurope-scheduler\r\n West Europe\r\n \r\n \r\n \r\n CS-WebJobs-WestUS-scheduler\r\n \r\n CS-WebJobs-WestUS-scheduler\r\n West US\r\n \r\n \r\n \r\n devSaopDS-cs1\r\n \r\n devSaopDS-cs1\r\n north europe\r\n \r\n \r\n \r\n name\r\n \r\n couves\r\n West US\r\n \r\n \r\n \r\n RecoveryServices-P2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-east-asia\r\n \r\n 04301767-ecac-4e60-a412-d289bf890e93\r\n east asia\r\n \r\n \r\n WABackup\r\n BackupVault\r\n Test\r\n \r\n 1.1\r\n e25454eb-a351-4199-a6e5-1208207bf9cf\r\n Started\r\n Ok\r\n \r\n \r\n StampId\r\n 64437628-f3e5-4d8a-928b-44b2c9889117\r\n \r\n \r\n ResourceId\r\n 3888925532610829152\r\n \r\n \r\n BackendStampId\r\n 64437628-f3e5-4d8a-928b-44b2c9889117\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "b9c239466864b0afb75064fb6c89c06a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 18:12:16 GMT" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/CloudServices", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n \r\n aztstjcjobclsabrzy\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsadcuu\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsanbmb\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsaqjwu\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsaskes\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsatabp\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsavrzs\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsbfllr\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsbgnqk\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsbrhbj\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsbsefr\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsbvuae\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclscdclk\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclscdjdp\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclscrwsz\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsczxzk\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsdblyf\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsdezvt\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsdjfrl\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsdtvmd\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsduhom\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclselofj\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclseshfx\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclseuzny\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsexies\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsexnyf\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsfyvee\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsfywzg\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n scheduler\r\n JobCollections\r\n aztstjcjobcllnkvbcv\r\n 1.1\r\n 29d5806a-c1ae-417e-ba20-63953ec823d0\r\n Started\r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n aztstjcjobclsgjxwz\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsguzix\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclshgdva\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclshhltr\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsidgrg\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsilaic\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsixcht\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsjmafh\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsjvzbw\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsjxxrm\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsjyslm\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclskebaj\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclslfwil\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclslhnch\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsltxec\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsluoay\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsmcgiy\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsmpvtc\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsmwyjx\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsndfra\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsnedcm\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsnffyk\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsnodpd\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsntawk\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsoazst\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsotqhy\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclspdklh\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclspobdn\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclspsziv\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclspupar\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqasdr\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqbsjt\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqemag\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqfyva\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqitok\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqlkph\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqpsxk\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqtewe\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqvecg\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqwgeh\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsqzptb\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsrhlub\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsrjtnr\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsrjxsq\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsrredc\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstblsn\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstcbjj\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstfpqz\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstglen\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstkacb\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstsrkv\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclstxeua\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsugcpk\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsuwnbq\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsuzvkn\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsvkbrv\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsvorjd\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsvwiiv\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclswefsv\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclswnewk\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclswxpjf\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsxgagp\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsxhzwt\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsxoyhe\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsxzazs\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsxzgco\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsyalqw\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsycujm\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsyibac\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsynyam\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsypule\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclsyvkyd\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszbtxw\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszelvz\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszfowt\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszjkzl\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszmbfw\r\n \r\n aztstjcDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszncpv\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszoeih\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n aztstjcjobclszqnox\r\n \r\n aztstschDesc1\r\n West US\r\n \r\n \r\n \r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n \r\n CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n onesdk2608\r\n 1.0\r\n de579dfd-1347-4f05-9110-cde88b579297\r\n Started\r\n Active\r\n \r\n \r\n \r\n Basic\r\n West US\r\n 2\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 7/6/2014 6:01:16 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n cloudserv\r\n \r\n hi there\r\n West US\r\n \r\n \r\n \r\n CS-NorthCentralUS-scheduler\r\n \r\n CS-NorthCentralUS-scheduler\r\n North Central US\r\n \r\n \r\n \r\n CS-SouthCentralUS-scheduler\r\n \r\n CS-SouthCentralUS-scheduler\r\n South Central US\r\n \r\n \r\n \r\n CS-WebJobs-WestEurope-scheduler\r\n \r\n CS-WebJobs-WestEurope-scheduler\r\n West Europe\r\n \r\n \r\n \r\n CS-WebJobs-WestUS-scheduler\r\n \r\n CS-WebJobs-WestUS-scheduler\r\n West US\r\n \r\n \r\n \r\n devSaopDS-cs1\r\n \r\n devSaopDS-cs1\r\n north europe\r\n \r\n \r\n \r\n name\r\n \r\n couves\r\n West US\r\n \r\n \r\n \r\n RecoveryServices-P2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-east-asia\r\n \r\n 04301767-ecac-4e60-a412-d289bf890e93\r\n east asia\r\n \r\n \r\n WABackup\r\n BackupVault\r\n Test\r\n \r\n 1.1\r\n e25454eb-a351-4199-a6e5-1208207bf9cf\r\n Started\r\n Ok\r\n \r\n \r\n StampId\r\n 64437628-f3e5-4d8a-928b-44b2c9889117\r\n \r\n \r\n ResourceId\r\n 3888925532610829152\r\n \r\n \r\n BackendStampId\r\n 64437628-f3e5-4d8a-928b-44b2c9889117\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "120620ce4f0ab8b4a5ce92da3500a809" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 18:12:21 GMT" + ], + "Server": [ + "1.0.6198.100", + "(rd_rdfe_stable.140703-1223)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operations/184737f95eefb88086e28caa3fb75b0b", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ], + "client-tracking-id": [ + "20" + ] + }, + "ResponseBody": "\r\n 184737f9-5eef-b880-86e2-8caa3fb75b0b\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "8b7af8cd3557b1a5901f5c12c9281ce8" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 18:01:37 GMT" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operations/184737f95eefb88086e28caa3fb75b0b", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ], + "client-tracking-id": [ + "20" + ] + }, + "ResponseBody": "\r\n 184737f9-5eef-b880-86e2-8caa3fb75b0b\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "683db6b04bc9b855b4308750918f7bf4" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 18:02:08 GMT" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US/resources/cacheservice/~/Caching/onesdk2608/Keys", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n YWNzOmh0dHBzOi8vb25lc2RrMjYwODQ1ODEtY2FjaGUuYWNjZXNzY29udHJvbC53aW5kb3dzLm5ldC8vV1JBUHYwLjkvJm93bmVyJmk5cUEvcVp1eUpCRzZvT1gxY1k4NTAwWW4yUGNjVGROZFNianpMT29sY289Jmh0dHA6Ly9vbmVzZGsyNjA4LmNhY2hlLndpbmRvd3MubmV0Lw==\r\n YWNzOmh0dHBzOi8vb25lc2RrMjYwODQ1ODEtY2FjaGUuYWNjZXNzY29udHJvbC53aW5kb3dzLm5ldC8vV1JBUHYwLjkvJm93bmVyJkpmdHpnYS9pVjJjMzF4V0tiUWlBRi9qb043SHoybVBCaUczMlhjQmUwcDA9Jmh0dHA6Ly9vbmVzZGsyNjA4LmNhY2hlLndpbmRvd3MubmV0Lw==\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b53bb7d1c38fbff7bf4b15b6f7df5bbc" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 18:12:15 GMT" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US/resources/cacheservice/~/Caching/onesdk2608/Keys/?comp=regenerate", + "RequestMethod": "POST", + "RequestBody": "\r\n Primary\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n YWNzOmh0dHBzOi8vb25lc2RrMjYwODQ1ODEtY2FjaGUuYWNjZXNzY29udHJvbC53aW5kb3dzLm5ldC8vV1JBUHYwLjkvJm93bmVyJllLSmJFeTVvSEZvZkRmdmt6VTRqMTViWnlkNlEwbG1pUmFmZ2ZtQ2phVTQ9Jmh0dHA6Ly9vbmVzZGsyNjA4LmNhY2hlLndpbmRvd3MubmV0Lw==\r\n YWNzOmh0dHBzOi8vb25lc2RrMjYwODQ1ODEtY2FjaGUuYWNjZXNzY29udHJvbC53aW5kb3dzLm5ldC8vV1JBUHYwLjkvJm93bmVyJkpmdHpnYS9pVjJjMzF4V0tiUWlBRi9qb043SHoybVBCaUczMlhjQmUwcDA9Jmh0dHA6Ly9vbmVzZGsyNjA4LmNhY2hlLndpbmRvd3MubmV0Lw==\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "3769ee019f26b64fae38fd659e7ca6db" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 18:12:19 GMT" + ], + "Server": [ + "1.0.6198.98", + "(rd_rdfe_stable.140626-1722)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/cloudservices/CachingP2VBRNX3ZH3GXC5MWKW5VS3K5J4T7XSMRHBCI2OMUCUGDVAVQXXA-West-US/resources/cacheservice/Caching/onesdk2608", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ], + "client-tracking-id": [ + "40" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "05e5a19d43fcbeb08e13051a148c8884" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 18:12:21 GMT" + ], + "Server": [ + "1.0.6198.100", + "(rd_rdfe_stable.140703-1223)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operations/05e5a19d43fcbeb08e13051a148c8884", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ], + "client-tracking-id": [ + "40" + ] + }, + "ResponseBody": "\r\n 05e5a19d-43fc-beb0-8e13-051a148c8884\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "4fd2344787c0b8a7ab6ddd455314126c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 18:12:21 GMT" + ], + "Server": [ + "1.0.6198.100", + "(rd_rdfe_stable.140703-1223)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/db1ab6f0-4769-4b27-930e-01e2ef9c123c/operations/05e5a19d43fcbeb08e13051a148c8884", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.11", + "AzurePowershell/v0.8.11" + ], + "client-tracking-id": [ + "40" + ] + }, + "ResponseBody": "\r\n 05e5a19d-43fc-beb0-8e13-051a148c8884\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-servedbyregion": [ + "ussouth2" + ], + "x-ms-request-id": [ + "c6ba46926a4cb0ddaae7f827aa9766a5" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Sun, 06 Jul 2014 18:12:51 GMT" + ], + "Server": [ + "1.0.6198.100", + "(rd_rdfe_stable.140703-1223)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-ManagedCacheEndToEnd": [ + "onesdk2608" + ] + }, + "Variables": { + "SubscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/SessionRecords/Microsoft.Azure.Commands.ManagedCache.Test.ScenarioTests.ManagedCacheTests/TestManagedCacheNamedCacheBasic.json b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/SessionRecords/Microsoft.Azure.Commands.ManagedCache.Test.ScenarioTests.ManagedCacheTests/TestManagedCacheNamedCacheBasic.json new file mode 100644 index 000000000000..8836c1eb9a72 --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/SessionRecords/Microsoft.Azure.Commands.ManagedCache.Test.ScenarioTests.ManagedCacheTests/TestManagedCacheNamedCacheBasic.json @@ -0,0 +1,1320 @@ +{ + "Entries": [ + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLUVhc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "8a9649f6a02cb645be0654a43089ff70" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:39:17 GMT" + ], + "ETag": [ + "8c0f3b73-56a2-4b98-8719-d7301209eea3" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLUVhc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellbasic\r\n 1.0\r\n 467d3105-3a62-4c09-b495-7b4a65603bc1\r\n Started\r\n Creating\r\n \r\n \r\n \r\n Basic\r\n East US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 5:39:26 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "b0c144b5ef08bb4a9ab3e756e9a85e97" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:39:54 GMT" + ], + "ETag": [ + "8c0f3b73-56a2-4b98-8719-d7301209eea3" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLUVhc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellbasic\r\n 1.0\r\n 467d3105-3a62-4c09-b495-7b4a65603bc1\r\n Started\r\n Creating\r\n \r\n \r\n \r\n Basic\r\n East US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 5:39:26 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "bf3b79f3bc31bd1ca632ac081060c5f6" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:40:55 GMT" + ], + "ETag": [ + "8c0f3b73-56a2-4b98-8719-d7301209eea3" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLUVhc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellbasic\r\n 1.0\r\n 467d3105-3a62-4c09-b495-7b4a65603bc1\r\n Started\r\n Creating\r\n \r\n \r\n \r\n Basic\r\n East US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 5:39:26 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "0f21231466d3be6286cf34678c2fe1f3" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:41:57 GMT" + ], + "ETag": [ + "8c0f3b73-56a2-4b98-8719-d7301209eea3" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLUVhc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellbasic\r\n 1.0\r\n 467d3105-3a62-4c09-b495-7b4a65603bc1\r\n Started\r\n Creating\r\n \r\n \r\n \r\n Basic\r\n East US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 5:39:26 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "443527abee65bf36a70f1b08174e6189" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:42:57 GMT" + ], + "ETag": [ + "8c0f3b73-56a2-4b98-8719-d7301209eea3" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLUVhc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellbasic\r\n 1.0\r\n 467d3105-3a62-4c09-b495-7b4a65603bc1\r\n Started\r\n Creating\r\n \r\n \r\n \r\n Basic\r\n East US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 5:39:26 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "61829efc2aeab6fcb5fc28f3fd3466ae" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:43:58 GMT" + ], + "ETag": [ + "8c0f3b73-56a2-4b98-8719-d7301209eea3" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLUVhc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellbasic\r\n 1.0\r\n 467d3105-3a62-4c09-b495-7b4a65603bc1\r\n Started\r\n Creating\r\n \r\n \r\n \r\n Basic\r\n East US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 5:39:26 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "130cebbc5196bdb9b08bb9377e6d6e00" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:45:00 GMT" + ], + "ETag": [ + "8c0f3b73-56a2-4b98-8719-d7301209eea3" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLUVhc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellbasic\r\n 1.0\r\n 467d3105-3a62-4c09-b495-7b4a65603bc1\r\n Started\r\n Creating\r\n \r\n \r\n \r\n Basic\r\n East US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 5:39:26 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "490fa6d17adfb372bd5a7edd1b3dac78" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:46:02 GMT" + ], + "ETag": [ + "8c0f3b73-56a2-4b98-8719-d7301209eea3" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLUVhc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellbasic\r\n 1.0\r\n 467d3105-3a62-4c09-b495-7b4a65603bc1\r\n Started\r\n Creating\r\n \r\n \r\n \r\n Basic\r\n East US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 5:39:26 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "d5be515f9ee1b78fa123c31296271f98" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:47:03 GMT" + ], + "ETag": [ + "8c0f3b73-56a2-4b98-8719-d7301209eea3" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLUVhc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellbasic\r\n 1.0\r\n 467d3105-3a62-4c09-b495-7b4a65603bc1\r\n Started\r\n Creating\r\n \r\n \r\n \r\n Basic\r\n East US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 5:39:26 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "c65d5c82df4cba188490aca4f06e0797" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:48:04 GMT" + ], + "ETag": [ + "8c0f3b73-56a2-4b98-8719-d7301209eea3" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLUVhc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellbasic\r\n 1.0\r\n 467d3105-3a62-4c09-b495-7b4a65603bc1\r\n Started\r\n Creating\r\n \r\n \r\n \r\n Basic\r\n East US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 5:39:26 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "dfe2ff24ede5b29b8b604b8dadb03ba5" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:49:05 GMT" + ], + "ETag": [ + "8c0f3b73-56a2-4b98-8719-d7301209eea3" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLUVhc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellbasic\r\n 1.0\r\n 467d3105-3a62-4c09-b495-7b4a65603bc1\r\n Started\r\n Creating\r\n \r\n \r\n \r\n Basic\r\n East US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 5:39:26 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "990b0229e3ddb5839d390d372a34c0fb" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:50:05 GMT" + ], + "ETag": [ + "8c0f3b73-56a2-4b98-8719-d7301209eea3" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLUVhc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellbasic\r\n 1.0\r\n 467d3105-3a62-4c09-b495-7b4a65603bc1\r\n Started\r\n Creating\r\n \r\n \r\n \r\n Basic\r\n East US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 5:39:26 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "14c2dc73187ab3559d5f75c3844a74eb" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:51:08 GMT" + ], + "ETag": [ + "8c0f3b73-56a2-4b98-8719-d7301209eea3" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLUVhc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellbasic\r\n 1.0\r\n 467d3105-3a62-4c09-b495-7b4a65603bc1\r\n Started\r\n Creating\r\n \r\n \r\n \r\n Basic\r\n East US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 5:39:26 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "85fb704582d2bd97a5e2f7c3384d463b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:52:09 GMT" + ], + "ETag": [ + "8c0f3b73-56a2-4b98-8719-d7301209eea3" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLUVhc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellbasic\r\n 1.0\r\n 467d3105-3a62-4c09-b495-7b4a65603bc1\r\n Started\r\n Active\r\n \r\n \r\n \r\n Basic\r\n East US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 5:39:26 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "d48963f56b68bb0a97853b2ff5465fcc" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:53:09 GMT" + ], + "ETag": [ + "8c0f3b73-56a2-4b98-8719-d7301209eea3" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLUVhc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellbasic\r\n 1.0\r\n 14857726-58e9-4b96-9776-731eeef73446\r\n Started\r\n Updating\r\n \r\n \r\n \r\n Basic\r\n East US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 5:53:00 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "78266ca57b6cb5cfa3d2fcb47453c000" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:53:53 GMT" + ], + "ETag": [ + "8c0f3b73-56a2-4b98-8719-d7301209eea3" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLUVhc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellbasic\r\n 1.0\r\n 14857726-58e9-4b96-9776-731eeef73446\r\n Started\r\n Updating\r\n \r\n \r\n \r\n Basic\r\n East US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 5:53:00 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "58f38f919aaab8fe8dc4d6fe7b38934a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:54:53 GMT" + ], + "ETag": [ + "8c0f3b73-56a2-4b98-8719-d7301209eea3" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLUVhc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellbasic\r\n 1.0\r\n 14857726-58e9-4b96-9776-731eeef73446\r\n Started\r\n Updating\r\n \r\n \r\n \r\n Basic\r\n East US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 5:53:00 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "75efc1aec8b8b5278faa440e4a307637" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:55:55 GMT" + ], + "ETag": [ + "8c0f3b73-56a2-4b98-8719-d7301209eea3" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLUVhc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellbasic\r\n 1.0\r\n 14857726-58e9-4b96-9776-731eeef73446\r\n Started\r\n Active\r\n \r\n \r\n \r\n Basic\r\n East US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 11\r\n Sliding\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 5:53:00 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "afcebf7967aeba10ada8c0f37c1ac540" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:56:56 GMT" + ], + "ETag": [ + "8c0f3b73-56a2-4b98-8719-d7301209eea3" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/cloudservices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US/resources/cacheservice/~/Caching/dummy/Namespaces/powershellbasic", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9jbG91ZHNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLUVhc3QtVVMvcmVzb3VyY2VzL2NhY2hlc2VydmljZS9+L0NhY2hpbmcvZHVtbXkvTmFtZXNwYWNlcy9wb3dlcnNoZWxsYmFzaWM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "true", + "ResponseHeaders": { + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "e6ea306cd367bc96bf3d0c4e566bb62c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:39:20 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/cloudservices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US/resources/cacheservice/Caching/powershellbasic", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9jbG91ZHNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLUVhc3QtVVMvcmVzb3VyY2VzL2NhY2hlc2VydmljZS9DYWNoaW5nL3Bvd2Vyc2hlbGxiYXNpYw==", + "RequestMethod": "PUT", + "RequestBody": "\r\n \r\n \r\n Basic\r\n East US\r\n 1\r\n 1.0.0\r\n 1024\r\n \r\n \r\n \r\n", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ], + "x-ms-version": [ + "2012-08-01" + ], + "client-tracking-id": [ + "6" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-request-id": [ + "ac0274caef15bf85b5d8bb4a6e3bc3b8" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:39:22 GMT" + ], + "ETag": [ + "467d3105-3a62-4c09-b495-7b4a65603bc1" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/cloudservices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US/resources/cacheservice/Caching/powershellbasic", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9jbG91ZHNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLUVhc3QtVVMvcmVzb3VyY2VzL2NhY2hlc2VydmljZS9DYWNoaW5nL3Bvd2Vyc2hlbGxiYXNpYw==", + "RequestMethod": "PUT", + "RequestBody": "\r\n \r\n \r\n Basic\r\n East US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 11\r\n Sliding\r\n \r\n \r\n \r\n \r\n \r\n", + "RequestHeaders": { + "If-Match": [ + "467d3105-3a62-4c09-b495-7b4a65603bc1" + ], + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ], + "client-tracking-id": [ + "32" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-request-id": [ + "40bb52353667b724972f2547f2bc202e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:53:20 GMT" + ], + "ETag": [ + "14857726-58e9-4b96-9776-731eeef73446" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/operations/ac0274caef15bf85b5d8bb4a6e3bc3b8", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9vcGVyYXRpb25zL2FjMDI3NGNhZWYxNWJmODViNWQ4YmI0YTZlM2JjM2I4", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ], + "client-tracking-id": [ + "6" + ] + }, + "ResponseBody": "\r\n ac0274ca-ef15-bf85-b5d8-bb4a6e3bc3b8\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "cb08d5c3c430b0ff899efa51ed99d21c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:39:22 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/operations/ac0274caef15bf85b5d8bb4a6e3bc3b8", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9vcGVyYXRpb25zL2FjMDI3NGNhZWYxNWJmODViNWQ4YmI0YTZlM2JjM2I4", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ], + "client-tracking-id": [ + "6" + ] + }, + "ResponseBody": "\r\n ac0274ca-ef15-bf85-b5d8-bb4a6e3bc3b8\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "cb134640b8dbb3a0be8d622a3977da68" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:39:53 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2Vz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellbasic\r\n 1.0\r\n 467d3105-3a62-4c09-b495-7b4a65603bc1\r\n Started\r\n Active\r\n \r\n \r\n \r\n Basic\r\n East US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 5:39:26 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "323df78fde00b331a19db4eb4b13c530" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:53:11 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2Vz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellbasic\r\n 1.0\r\n 467d3105-3a62-4c09-b495-7b4a65603bc1\r\n Started\r\n Active\r\n \r\n \r\n \r\n Basic\r\n East US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 5:39:26 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "a04c234bda23b67980ed255cd0db7cc5" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:53:12 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2Vz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellbasic\r\n 1.0\r\n 467d3105-3a62-4c09-b495-7b4a65603bc1\r\n Started\r\n Active\r\n \r\n \r\n \r\n Basic\r\n East US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 5:39:26 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "10fd8f50aa6eb477a8d6e42b4908cbbe" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:53:13 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2Vz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellbasic\r\n 1.0\r\n 467d3105-3a62-4c09-b495-7b4a65603bc1\r\n Started\r\n Active\r\n \r\n \r\n \r\n Basic\r\n East US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 5:39:26 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "866fc2eb01f9b86e9849377b1b0fa11d" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:53:14 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2Vz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellbasic\r\n 1.0\r\n 467d3105-3a62-4c09-b495-7b4a65603bc1\r\n Started\r\n Active\r\n \r\n \r\n \r\n Basic\r\n East US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 5:39:26 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "806df0cfcca3bb8cb9b2d3f7d5e85d53" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:53:15 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2Vz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellbasic\r\n 1.0\r\n 467d3105-3a62-4c09-b495-7b4a65603bc1\r\n Started\r\n Active\r\n \r\n \r\n \r\n Basic\r\n East US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 5:39:26 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "7c1cde9294bbbd52afd2dbb520de304c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:53:16 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2Vz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellbasic\r\n 1.0\r\n 467d3105-3a62-4c09-b495-7b4a65603bc1\r\n Started\r\n Active\r\n \r\n \r\n \r\n Basic\r\n East US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 5:39:26 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "9e9ec9c88635b0bc94ecfbd516550093" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:53:17 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2Vz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellbasic\r\n 1.0\r\n 467d3105-3a62-4c09-b495-7b4a65603bc1\r\n Started\r\n Active\r\n \r\n \r\n \r\n Basic\r\n East US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 5:39:26 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "cf6c0bcea5a3b8f39f27b61d140f43cb" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:53:17 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2Vz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellbasic\r\n 1.0\r\n 14857726-58e9-4b96-9776-731eeef73446\r\n Started\r\n Active\r\n \r\n \r\n \r\n Basic\r\n East US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 11\r\n Sliding\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 5:53:00 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "abd103fb6a3bb575862efeaecfc932ee" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:56:57 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/operations/40bb52353667b724972f2547f2bc202e", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9vcGVyYXRpb25zLzQwYmI1MjM1MzY2N2I3MjQ5NzJmMjU0N2YyYmMyMDJl", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ], + "client-tracking-id": [ + "32" + ] + }, + "ResponseBody": "\r\n 40bb5235-3667-b724-972f-2547f2bc202e\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "472c52559f5fbaedacddfa7e41ab9edf" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:53:20 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/operations/40bb52353667b724972f2547f2bc202e", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9vcGVyYXRpb25zLzQwYmI1MjM1MzY2N2I3MjQ5NzJmMjU0N2YyYmMyMDJl", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ], + "client-tracking-id": [ + "32" + ] + }, + "ResponseBody": "\r\n 40bb5235-3667-b724-972f-2547f2bc202e\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "f1f073a5ce1fb9d4bfd053a336e983be" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:53:51 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/cloudservices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US/resources/cacheservice/Caching/powershellbasic", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9jbG91ZHNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLUVhc3QtVVMvcmVzb3VyY2VzL2NhY2hlc2VydmljZS9DYWNoaW5nL3Bvd2Vyc2hlbGxiYXNpYw==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ], + "client-tracking-id": [ + "41" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-request-id": [ + "3f5a18d2abe5b2ab86a650f3913f84a6" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:56:58 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/operations/3f5a18d2abe5b2ab86a650f3913f84a6", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9vcGVyYXRpb25zLzNmNWExOGQyYWJlNWIyYWI4NmE2NTBmMzkxM2Y4NGE2", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ], + "client-tracking-id": [ + "41" + ] + }, + "ResponseBody": "\r\n 3f5a18d2-abe5-b2ab-86a6-50f3913f84a6\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "41525c709a8cb60788ee2abd6bd39e74" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:56:58 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/operations/3f5a18d2abe5b2ab86a650f3913f84a6", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9vcGVyYXRpb25zLzNmNWExOGQyYWJlNWIyYWI4NmE2NTBmMzkxM2Y4NGE2", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ], + "client-tracking-id": [ + "41" + ] + }, + "ResponseBody": "\r\n 3f5a18d2-abe5-b2ab-86a6-50f3913f84a6\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "87090aff7122b836a4f8619281a96c3a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:57:28 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "81d469b7-5467-4107-bb5a-d11907112633" + } +} \ No newline at end of file diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/SessionRecords/Microsoft.Azure.Commands.ManagedCache.Test.ScenarioTests.ManagedCacheTests/TestManagedCacheNamedCacheDoNotExists.json b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/SessionRecords/Microsoft.Azure.Commands.ManagedCache.Test.ScenarioTests.ManagedCacheTests/TestManagedCacheNamedCacheDoNotExists.json new file mode 100644 index 000000000000..83fca805eba5 --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/SessionRecords/Microsoft.Azure.Commands.ManagedCache.Test.ScenarioTests.ManagedCacheTests/TestManagedCacheNamedCacheDoNotExists.json @@ -0,0 +1,40 @@ +{ + "Entries": [ + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2Vz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "38198fd7fbecbad0947e453b541340ec" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 17:39:14 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "81d469b7-5467-4107-bb5a-d11907112633" + } +} \ No newline at end of file diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/SessionRecords/Microsoft.Azure.Commands.ManagedCache.Test.ScenarioTests.ManagedCacheTests/TestManagedCacheNamedCacheStandard.json b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/SessionRecords/Microsoft.Azure.Commands.ManagedCache.Test.ScenarioTests.ManagedCacheTests/TestManagedCacheNamedCacheStandard.json new file mode 100644 index 000000000000..9335c3ddf09b --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/SessionRecords/Microsoft.Azure.Commands.ManagedCache.Test.ScenarioTests.ManagedCacheTests/TestManagedCacheNamedCacheStandard.json @@ -0,0 +1,2443 @@ +{ + "Entries": [ + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "8e9b1aca22fdb19595e1f897fd25da6d" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:17:06 GMT" + ], + "ETag": [ + "74d7bb24-8181-4ff2-881e-b6c247a97098" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n e024ffa6-2b57-4220-8f34-1df7ca669f06\r\n Started\r\n Creating\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:17:16 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "562be9850537b7be8d11237e0d3ae316" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:17:44 GMT" + ], + "ETag": [ + "74d7bb24-8181-4ff2-881e-b6c247a97098" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n e024ffa6-2b57-4220-8f34-1df7ca669f06\r\n Started\r\n Creating\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:17:16 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "b1098caab554be8c8e185e6eed37f6a5" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:18:45 GMT" + ], + "ETag": [ + "74d7bb24-8181-4ff2-881e-b6c247a97098" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n e024ffa6-2b57-4220-8f34-1df7ca669f06\r\n Started\r\n Creating\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:17:16 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "bd77c8a295ccbb049284e363abaa5cf0" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:19:46 GMT" + ], + "ETag": [ + "74d7bb24-8181-4ff2-881e-b6c247a97098" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n e024ffa6-2b57-4220-8f34-1df7ca669f06\r\n Started\r\n Creating\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:17:16 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "31edb9c4dd2abc7eb9b9e5c77517671a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:20:48 GMT" + ], + "ETag": [ + "74d7bb24-8181-4ff2-881e-b6c247a97098" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n e024ffa6-2b57-4220-8f34-1df7ca669f06\r\n Started\r\n Creating\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:17:16 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "b91cbea30c09b3f98099fdbd4f4ca220" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:21:49 GMT" + ], + "ETag": [ + "74d7bb24-8181-4ff2-881e-b6c247a97098" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n e024ffa6-2b57-4220-8f34-1df7ca669f06\r\n Started\r\n Creating\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:17:16 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "30e7bb74ade4b4bc9bff3fbbdc80fe42" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:22:50 GMT" + ], + "ETag": [ + "74d7bb24-8181-4ff2-881e-b6c247a97098" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n e024ffa6-2b57-4220-8f34-1df7ca669f06\r\n Started\r\n Creating\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:17:16 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "f54e637775abbdff9ed95429bc1970f4" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:23:51 GMT" + ], + "ETag": [ + "74d7bb24-8181-4ff2-881e-b6c247a97098" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n e024ffa6-2b57-4220-8f34-1df7ca669f06\r\n Started\r\n Creating\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:17:16 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "baf26a4bb849b761834f2671ffe8ccca" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:24:52 GMT" + ], + "ETag": [ + "74d7bb24-8181-4ff2-881e-b6c247a97098" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n e024ffa6-2b57-4220-8f34-1df7ca669f06\r\n Started\r\n Creating\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:17:16 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "099ecab17eb3bd78a1923591dab3109e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:25:54 GMT" + ], + "ETag": [ + "74d7bb24-8181-4ff2-881e-b6c247a97098" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n e024ffa6-2b57-4220-8f34-1df7ca669f06\r\n Started\r\n Creating\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:17:16 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "12c9fb70e965bee0919a78d5bef48204" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:26:55 GMT" + ], + "ETag": [ + "74d7bb24-8181-4ff2-881e-b6c247a97098" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n e024ffa6-2b57-4220-8f34-1df7ca669f06\r\n Started\r\n Active\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:17:16 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "97835a2da7ddb88bb6f084fb5aef4106" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:27:56 GMT" + ], + "ETag": [ + "74d7bb24-8181-4ff2-881e-b6c247a97098" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n f2e2e990-5497-4fca-b98d-9c2b5a9cb422\r\n Started\r\n Updating\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:27:35 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "851b04530b7ebac28a0c14c82d5af1da" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:28:32 GMT" + ], + "ETag": [ + "74d7bb24-8181-4ff2-881e-b6c247a97098" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n f2e2e990-5497-4fca-b98d-9c2b5a9cb422\r\n Started\r\n Updating\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:27:35 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "4dd785ace0d0bde7b83cf33b7c95006c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:29:34 GMT" + ], + "ETag": [ + "74d7bb24-8181-4ff2-881e-b6c247a97098" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n f2e2e990-5497-4fca-b98d-9c2b5a9cb422\r\n Started\r\n Updating\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:27:35 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "02dea81407e0bc1984c1ccf15e8cbb06" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:30:35 GMT" + ], + "ETag": [ + "74d7bb24-8181-4ff2-881e-b6c247a97098" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n f2e2e990-5497-4fca-b98d-9c2b5a9cb422\r\n Started\r\n Active\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:27:35 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "07288ab1514ab9b4a7ce837de9e129c1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:31:35 GMT" + ], + "ETag": [ + "74d7bb24-8181-4ff2-881e-b6c247a97098" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n e3bc99f7-e458-4cc2-9c20-f0ce98676b5e\r\n Started\r\n Updating\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:27:35 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "f3a44e1bac83b67c914b8faf0fdd891e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:32:12 GMT" + ], + "ETag": [ + "74d7bb24-8181-4ff2-881e-b6c247a97098" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n e3bc99f7-e458-4cc2-9c20-f0ce98676b5e\r\n Started\r\n Updating\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:27:35 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "3862338ab63db42596d2adc949c4f6a4" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:33:13 GMT" + ], + "ETag": [ + "74d7bb24-8181-4ff2-881e-b6c247a97098" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n e3bc99f7-e458-4cc2-9c20-f0ce98676b5e\r\n Started\r\n Updating\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:27:35 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "763cffa67464bda39221b8667d34c5f0" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:34:14 GMT" + ], + "ETag": [ + "74d7bb24-8181-4ff2-881e-b6c247a97098" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n e3bc99f7-e458-4cc2-9c20-f0ce98676b5e\r\n Started\r\n Active\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random2\r\n true\r\n true\r\n None\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:27:35 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "65f21410e24ebfe898524b587aed87a1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:35:15 GMT" + ], + "ETag": [ + "74d7bb24-8181-4ff2-881e-b6c247a97098" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n 30695909-301d-41ca-a872-d0231786c44a\r\n Started\r\n Updating\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random2\r\n true\r\n true\r\n None\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:27:35 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "4c18e0a05106bf2d8f7b4b5b290048a5" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:35:54 GMT" + ], + "ETag": [ + "74d7bb24-8181-4ff2-881e-b6c247a97098" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n 30695909-301d-41ca-a872-d0231786c44a\r\n Started\r\n Updating\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random2\r\n true\r\n true\r\n None\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:27:35 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "580acafd4789ba14b675b370d9b8d7d0" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:36:56 GMT" + ], + "ETag": [ + "74d7bb24-8181-4ff2-881e-b6c247a97098" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n 30695909-301d-41ca-a872-d0231786c44a\r\n Started\r\n Updating\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random2\r\n true\r\n true\r\n None\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:27:35 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "206d98b09200b54fb6cd848d6fadbcc2" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:37:57 GMT" + ], + "ETag": [ + "74d7bb24-8181-4ff2-881e-b6c247a97098" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n 30695909-301d-41ca-a872-d0231786c44a\r\n Started\r\n Active\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n true\r\n true\r\n LeastRecentlyUsed\r\n \r\n 11\r\n Sliding\r\n \r\n \r\n \r\n random2\r\n true\r\n true\r\n None\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:27:35 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "2df1b6e2db50b04db9fca466fdcb598c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:38:58 GMT" + ], + "ETag": [ + "74d7bb24-8181-4ff2-881e-b6c247a97098" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n 84dbbfd8-a0e1-4ea2-b044-b41c6fe58c32\r\n Started\r\n Updating\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n true\r\n true\r\n LeastRecentlyUsed\r\n \r\n 11\r\n Sliding\r\n \r\n \r\n \r\n random2\r\n true\r\n true\r\n None\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:27:35 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "0b2e95121ab4b93f89810ac728e8d4d1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:39:33 GMT" + ], + "ETag": [ + "74d7bb24-8181-4ff2-881e-b6c247a97098" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n 84dbbfd8-a0e1-4ea2-b044-b41c6fe58c32\r\n Started\r\n Updating\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n true\r\n true\r\n LeastRecentlyUsed\r\n \r\n 11\r\n Sliding\r\n \r\n \r\n \r\n random2\r\n true\r\n true\r\n None\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:27:35 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "f792589602c4baa1aded96359c7ad74b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:40:34 GMT" + ], + "ETag": [ + "74d7bb24-8181-4ff2-881e-b6c247a97098" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n 84dbbfd8-a0e1-4ea2-b044-b41c6fe58c32\r\n Started\r\n Updating\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n true\r\n true\r\n LeastRecentlyUsed\r\n \r\n 11\r\n Sliding\r\n \r\n \r\n \r\n random2\r\n true\r\n true\r\n None\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:27:35 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "d92eb17e63b5bad69054bc5e2702e28c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:41:35 GMT" + ], + "ETag": [ + "74d7bb24-8181-4ff2-881e-b6c247a97098" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n 84dbbfd8-a0e1-4ea2-b044-b41c6fe58c32\r\n Started\r\n Active\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n true\r\n true\r\n LeastRecentlyUsed\r\n \r\n 11\r\n Sliding\r\n \r\n \r\n \r\n random2\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:27:35 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "5cd17bdd84fcbeeba3c05bc041ed8584" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:42:37 GMT" + ], + "ETag": [ + "74d7bb24-8181-4ff2-881e-b6c247a97098" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n 37e91c7d-01ba-472e-8b0d-5d25f474b828\r\n Started\r\n Updating\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n true\r\n true\r\n LeastRecentlyUsed\r\n \r\n 11\r\n Sliding\r\n \r\n \r\n \r\n random2\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:27:35 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "1cdc2037153fb78486a821e253c0590a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:43:14 GMT" + ], + "ETag": [ + "74d7bb24-8181-4ff2-881e-b6c247a97098" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n 37e91c7d-01ba-472e-8b0d-5d25f474b828\r\n Started\r\n Updating\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n true\r\n true\r\n LeastRecentlyUsed\r\n \r\n 11\r\n Sliding\r\n \r\n \r\n \r\n random2\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:27:35 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "eace26e36e28b46b8fe24592301dea1b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:44:15 GMT" + ], + "ETag": [ + "74d7bb24-8181-4ff2-881e-b6c247a97098" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n 37e91c7d-01ba-472e-8b0d-5d25f474b828\r\n Started\r\n Updating\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n true\r\n true\r\n LeastRecentlyUsed\r\n \r\n 11\r\n Sliding\r\n \r\n \r\n \r\n random2\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:27:35 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "0347ddc1e40eb4348ac2d1818a68fc65" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:45:17 GMT" + ], + "ETag": [ + "74d7bb24-8181-4ff2-881e-b6c247a97098" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n 37e91c7d-01ba-472e-8b0d-5d25f474b828\r\n Started\r\n Active\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n true\r\n true\r\n LeastRecentlyUsed\r\n \r\n 11\r\n Sliding\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:27:35 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "6ff9b4167f3ab705a6f0d1d8c9545436" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:46:17 GMT" + ], + "ETag": [ + "74d7bb24-8181-4ff2-881e-b6c247a97098" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/cloudservices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US/resources/cacheservice/~/Caching/dummy/Namespaces/powershellstandard", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9jbG91ZHNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVMvcmVzb3VyY2VzL2NhY2hlc2VydmljZS9+L0NhY2hpbmcvZHVtbXkvTmFtZXNwYWNlcy9wb3dlcnNoZWxsc3RhbmRhcmQ=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "true", + "ResponseHeaders": { + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c668b434623cb759a17344cfc755ce2c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:17:10 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/cloudservices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US/resources/cacheservice/Caching/powershellstandard", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9jbG91ZHNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVMvcmVzb3VyY2VzL2NhY2hlc2VydmljZS9DYWNoaW5nL3Bvd2Vyc2hlbGxzdGFuZGFyZA==", + "RequestMethod": "PUT", + "RequestBody": "\r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.0.0\r\n 1024\r\n \r\n \r\n \r\n", + "RequestHeaders": { + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ], + "x-ms-version": [ + "2012-08-01" + ], + "client-tracking-id": [ + "3" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-request-id": [ + "a8237a6034efbcceb23ac2c0733c5a5f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:17:12 GMT" + ], + "ETag": [ + "e024ffa6-2b57-4220-8f34-1df7ca669f06" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/cloudservices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US/resources/cacheservice/Caching/powershellstandard", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9jbG91ZHNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVMvcmVzb3VyY2VzL2NhY2hlc2VydmljZS9DYWNoaW5nL3Bvd2Vyc2hlbGxzdGFuZGFyZA==", + "RequestMethod": "PUT", + "RequestBody": "\r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n", + "RequestHeaders": { + "If-Match": [ + "e024ffa6-2b57-4220-8f34-1df7ca669f06" + ], + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ], + "client-tracking-id": [ + "20" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-request-id": [ + "83f70ec6c197b37f83058a023c8ace83" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:28:00 GMT" + ], + "ETag": [ + "f2e2e990-5497-4fca-b98d-9c2b5a9cb422" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/cloudservices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US/resources/cacheservice/Caching/powershellstandard", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9jbG91ZHNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVMvcmVzb3VyY2VzL2NhY2hlc2VydmljZS9DYWNoaW5nL3Bvd2Vyc2hlbGxzdGFuZGFyZA==", + "RequestMethod": "PUT", + "RequestBody": "\r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random2\r\n true\r\n true\r\n None\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n", + "RequestHeaders": { + "If-Match": [ + "f2e2e990-5497-4fca-b98d-9c2b5a9cb422" + ], + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ], + "client-tracking-id": [ + "30" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-request-id": [ + "7c2f37d9c282babdb26811b5bda2506c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:31:40 GMT" + ], + "ETag": [ + "e3bc99f7-e458-4cc2-9c20-f0ce98676b5e" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/cloudservices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US/resources/cacheservice/Caching/powershellstandard", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9jbG91ZHNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVMvcmVzb3VyY2VzL2NhY2hlc2VydmljZS9DYWNoaW5nL3Bvd2Vyc2hlbGxzdGFuZGFyZA==", + "RequestMethod": "PUT", + "RequestBody": "\r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n true\r\n true\r\n LeastRecentlyUsed\r\n \r\n 11\r\n Sliding\r\n \r\n \r\n \r\n random2\r\n true\r\n true\r\n None\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n", + "RequestHeaders": { + "If-Match": [ + "e3bc99f7-e458-4cc2-9c20-f0ce98676b5e" + ], + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ], + "client-tracking-id": [ + "43" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-request-id": [ + "e02dd4258c2abe06994157a18ab57a88" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:35:23 GMT" + ], + "ETag": [ + "30695909-301d-41ca-a872-d0231786c44a" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/cloudservices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US/resources/cacheservice/Caching/powershellstandard", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9jbG91ZHNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVMvcmVzb3VyY2VzL2NhY2hlc2VydmljZS9DYWNoaW5nL3Bvd2Vyc2hlbGxzdGFuZGFyZA==", + "RequestMethod": "PUT", + "RequestBody": "\r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n true\r\n true\r\n LeastRecentlyUsed\r\n \r\n 11\r\n Sliding\r\n \r\n \r\n \r\n random2\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n", + "RequestHeaders": { + "If-Match": [ + "30695909-301d-41ca-a872-d0231786c44a" + ], + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ], + "client-tracking-id": [ + "53" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-request-id": [ + "f45321ad9fc9b2b9bc58ec6cdb34091d" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:39:01 GMT" + ], + "ETag": [ + "84dbbfd8-a0e1-4ea2-b044-b41c6fe58c32" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/cloudservices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US/resources/cacheservice/Caching/powershellstandard", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9jbG91ZHNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVMvcmVzb3VyY2VzL2NhY2hlc2VydmljZS9DYWNoaW5nL3Bvd2Vyc2hlbGxzdGFuZGFyZA==", + "RequestMethod": "PUT", + "RequestBody": "\r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n true\r\n true\r\n LeastRecentlyUsed\r\n \r\n 11\r\n Sliding\r\n \r\n \r\n \r\n \r\n \r\n", + "RequestHeaders": { + "If-Match": [ + "84dbbfd8-a0e1-4ea2-b044-b41c6fe58c32" + ], + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ], + "client-tracking-id": [ + "64" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-request-id": [ + "3a335048bda0b2ab943a922798f55195" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:42:42 GMT" + ], + "ETag": [ + "37e91c7d-01ba-472e-8b0d-5d25f474b828" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/operations/a8237a6034efbcceb23ac2c0733c5a5f", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9vcGVyYXRpb25zL2E4MjM3YTYwMzRlZmJjY2ViMjNhYzJjMDczM2M1YTVm", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ], + "client-tracking-id": [ + "3" + ] + }, + "ResponseBody": "\r\n a8237a60-34ef-bcce-b23a-c2c0733c5a5f\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "e824f9d6ff6bbee3a563048589f24b72" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:17:12 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/operations/a8237a6034efbcceb23ac2c0733c5a5f", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9vcGVyYXRpb25zL2E4MjM3YTYwMzRlZmJjY2ViMjNhYzJjMDczM2M1YTVm", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ], + "client-tracking-id": [ + "3" + ] + }, + "ResponseBody": "\r\n a8237a60-34ef-bcce-b23a-c2c0733c5a5f\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "308070c26312bebea87b46df1d309060" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:17:43 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2Vz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n e024ffa6-2b57-4220-8f34-1df7ca669f06\r\n Started\r\n Active\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:17:16 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "69379e03b061ba13a9e159beb87a814a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:27:57 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2Vz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n e024ffa6-2b57-4220-8f34-1df7ca669f06\r\n Started\r\n Active\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:17:16 PM +00:00\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "dfdcd8183c38b521bea8c67b12a6c95a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:27:58 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2Vz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n f2e2e990-5497-4fca-b98d-9c2b5a9cb422\r\n Started\r\n Active\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:27:35 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "f3db81eeb5feb7bd9d315615254dde2f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:31:37 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2Vz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n f2e2e990-5497-4fca-b98d-9c2b5a9cb422\r\n Started\r\n Active\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:27:35 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "818b771e431fb782abb5663363fbd3d8" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:31:38 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2Vz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n e3bc99f7-e458-4cc2-9c20-f0ce98676b5e\r\n Started\r\n Active\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random2\r\n true\r\n true\r\n None\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:27:35 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "89c377f263d5b89786cedd08c259009f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:35:16 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2Vz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n e3bc99f7-e458-4cc2-9c20-f0ce98676b5e\r\n Started\r\n Active\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random2\r\n true\r\n true\r\n None\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:27:35 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "d9d2d0ec7541bd148852a94c1eba24f8" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:35:17 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2Vz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n e3bc99f7-e458-4cc2-9c20-f0ce98676b5e\r\n Started\r\n Active\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random2\r\n true\r\n true\r\n None\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:27:35 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "d8cde0d822d0b7ef9f433fbc1458d4ae" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:35:18 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2Vz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n e3bc99f7-e458-4cc2-9c20-f0ce98676b5e\r\n Started\r\n Active\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random2\r\n true\r\n true\r\n None\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:27:35 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "9c838f662d23b20589bea92fc9f9b507" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:35:18 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2Vz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n e3bc99f7-e458-4cc2-9c20-f0ce98676b5e\r\n Started\r\n Active\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random2\r\n true\r\n true\r\n None\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:27:35 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "d2f5ce365393b46289bf1147adf9447e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:35:20 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2Vz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n 30695909-301d-41ca-a872-d0231786c44a\r\n Started\r\n Active\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n true\r\n true\r\n LeastRecentlyUsed\r\n \r\n 11\r\n Sliding\r\n \r\n \r\n \r\n random2\r\n true\r\n true\r\n None\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:27:35 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "52f67f93fd75b471a6f4a75c70c38d4f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:38:59 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2Vz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n 30695909-301d-41ca-a872-d0231786c44a\r\n Started\r\n Active\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n true\r\n true\r\n LeastRecentlyUsed\r\n \r\n 11\r\n Sliding\r\n \r\n \r\n \r\n random2\r\n true\r\n true\r\n None\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:27:35 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "9b8e1cd25737bbdb983fecbc7d00fcbd" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:38:59 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2Vz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n 84dbbfd8-a0e1-4ea2-b044-b41c6fe58c32\r\n Started\r\n Active\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n true\r\n true\r\n LeastRecentlyUsed\r\n \r\n 11\r\n Sliding\r\n \r\n \r\n \r\n random2\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:27:35 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "662a74003d09b8ff9209533ecc6f2a7e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:42:37 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2Vz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n 84dbbfd8-a0e1-4ea2-b044-b41c6fe58c32\r\n Started\r\n Active\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n true\r\n true\r\n LeastRecentlyUsed\r\n \r\n 11\r\n Sliding\r\n \r\n \r\n \r\n random2\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:27:35 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "24e8e65add9cb5b8b90a272bd43289f2" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:42:39 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2Vz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n 84dbbfd8-a0e1-4ea2-b044-b41c6fe58c32\r\n Started\r\n Active\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n true\r\n true\r\n LeastRecentlyUsed\r\n \r\n 11\r\n Sliding\r\n \r\n \r\n \r\n random2\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:27:35 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "c6a96588c85ebe7ca9fbd4869e9a338c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:42:40 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2Vz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n 37e91c7d-01ba-472e-8b0d-5d25f474b828\r\n Started\r\n Active\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n true\r\n true\r\n LeastRecentlyUsed\r\n \r\n 11\r\n Sliding\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:27:35 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "0183e041869fbc2482451e628d353082" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:46:18 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/CloudServices", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9DbG91ZFNlcnZpY2Vz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ] + }, + "ResponseBody": "\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-East-US\r\n East US\r\n \r\n \r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n \r\n CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US\r\n West US\r\n \r\n \r\n cacheservice\r\n Caching\r\n powershellstandard\r\n 1.0\r\n 37e91c7d-01ba-472e-8b0d-5d25f474b828\r\n Started\r\n Active\r\n \r\n \r\n \r\n Standard\r\n West US\r\n 1\r\n 1.2.0\r\n 1024\r\n \r\n \r\n default\r\n false\r\n false\r\n LeastRecentlyUsed\r\n \r\n 10\r\n Absolute\r\n \r\n \r\n \r\n random1\r\n true\r\n true\r\n LeastRecentlyUsed\r\n \r\n 11\r\n Sliding\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n CreationDate\r\n 10/1/2014 8:27:35 PM +00:00\r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "9e348b8656e0b6e3bd84d37a19fd0293" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:46:20 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/operations/83f70ec6c197b37f83058a023c8ace83", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9vcGVyYXRpb25zLzgzZjcwZWM2YzE5N2IzN2Y4MzA1OGEwMjNjOGFjZTgz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ], + "client-tracking-id": [ + "20" + ] + }, + "ResponseBody": "\r\n 83f70ec6-c197-b37f-8305-8a023c8ace83\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "401fb0fff223b008938e4d7f2705dd56" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:28:00 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/operations/83f70ec6c197b37f83058a023c8ace83", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9vcGVyYXRpb25zLzgzZjcwZWM2YzE5N2IzN2Y4MzA1OGEwMjNjOGFjZTgz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ], + "client-tracking-id": [ + "20" + ] + }, + "ResponseBody": "\r\n 83f70ec6-c197-b37f-8305-8a023c8ace83\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "d78d03eab14abee1aeadad1a1eb22d7b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:28:30 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/operations/7c2f37d9c282babdb26811b5bda2506c", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9vcGVyYXRpb25zLzdjMmYzN2Q5YzI4MmJhYmRiMjY4MTFiNWJkYTI1MDZj", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ], + "client-tracking-id": [ + "30" + ] + }, + "ResponseBody": "\r\n 7c2f37d9-c282-babd-b268-11b5bda2506c\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "faa8b7c35618b61594112a657a98bbb2" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:31:40 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/operations/7c2f37d9c282babdb26811b5bda2506c", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9vcGVyYXRpb25zLzdjMmYzN2Q5YzI4MmJhYmRiMjY4MTFiNWJkYTI1MDZj", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ], + "client-tracking-id": [ + "30" + ] + }, + "ResponseBody": "\r\n 7c2f37d9-c282-babd-b268-11b5bda2506c\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "f2bae495b6c5b6b4b9f078a0d6933e4c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:32:11 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/operations/e02dd4258c2abe06994157a18ab57a88", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9vcGVyYXRpb25zL2UwMmRkNDI1OGMyYWJlMDY5OTQxNTdhMThhYjU3YTg4", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ], + "client-tracking-id": [ + "43" + ] + }, + "ResponseBody": "\r\n e02dd425-8c2a-be06-9941-57a18ab57a88\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "bf69636c53a3bd89add83eb17ed5e3f1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:35:23 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/operations/e02dd4258c2abe06994157a18ab57a88", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9vcGVyYXRpb25zL2UwMmRkNDI1OGMyYWJlMDY5OTQxNTdhMThhYjU3YTg4", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ], + "client-tracking-id": [ + "43" + ] + }, + "ResponseBody": "\r\n e02dd425-8c2a-be06-9941-57a18ab57a88\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "c7a3207c2c19bf9bbf93419e1401e81a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:35:53 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/operations/f45321ad9fc9b2b9bc58ec6cdb34091d", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9vcGVyYXRpb25zL2Y0NTMyMWFkOWZjOWIyYjliYzU4ZWM2Y2RiMzQwOTFk", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ], + "client-tracking-id": [ + "53" + ] + }, + "ResponseBody": "\r\n f45321ad-9fc9-b2b9-bc58-ec6cdb34091d\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "986ec411273cb0f1a3969e9ddbbba847" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:39:02 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/operations/f45321ad9fc9b2b9bc58ec6cdb34091d", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9vcGVyYXRpb25zL2Y0NTMyMWFkOWZjOWIyYjliYzU4ZWM2Y2RiMzQwOTFk", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ], + "client-tracking-id": [ + "53" + ] + }, + "ResponseBody": "\r\n f45321ad-9fc9-b2b9-bc58-ec6cdb34091d\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "9ed3b2d6b749b1e983fc6f4852ae0d79" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:39:32 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/operations/3a335048bda0b2ab943a922798f55195", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9vcGVyYXRpb25zLzNhMzM1MDQ4YmRhMGIyYWI5NDNhOTIyNzk4ZjU1MTk1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ], + "client-tracking-id": [ + "64" + ] + }, + "ResponseBody": "\r\n 3a335048-bda0-b2ab-943a-922798f55195\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "013aa1694ebeb1f69492001283ddd477" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:42:43 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/operations/3a335048bda0b2ab943a922798f55195", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9vcGVyYXRpb25zLzNhMzM1MDQ4YmRhMGIyYWI5NDNhOTIyNzk4ZjU1MTk1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ], + "client-tracking-id": [ + "64" + ] + }, + "ResponseBody": "\r\n 3a335048-bda0-b2ab-943a-922798f55195\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "05b8db5f3c78b319a550c6c282899fe6" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:43:13 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/cloudservices/CachingHYN2S65IWI5KBKCZWNC6LXBBIQ2ZQ6EU5BLHDXSMRZ5IJLDD77UQ-West-US/resources/cacheservice/Caching/powershellstandard", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9jbG91ZHNlcnZpY2VzL0NhY2hpbmdIWU4yUzY1SVdJNUtCS0NaV05DNkxYQkJJUTJaUTZFVTVCTEhEWFNNUlo1SUpMREQ3N1VRLVdlc3QtVVMvcmVzb3VyY2VzL2NhY2hlc2VydmljZS9DYWNoaW5nL3Bvd2Vyc2hlbGxzdGFuZGFyZA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ], + "client-tracking-id": [ + "74" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-request-id": [ + "0aea81c5f7d0b9239e0169d9ed9b2123" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:46:21 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/operations/0aea81c5f7d0b9239e0169d9ed9b2123", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9vcGVyYXRpb25zLzBhZWE4MWM1ZjdkMGI5MjM5ZTAxNjlkOWVkOWIyMTIz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ], + "client-tracking-id": [ + "74" + ] + }, + "ResponseBody": "\r\n 0aea81c5-f7d0-b923-9e01-69d9ed9b2123\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "9a0d39e623c5bb3db6922aa6d993f015" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:46:21 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/81d469b7-5467-4107-bb5a-d11907112633/operations/0aea81c5f7d0b9239e0169d9ed9b2123", + "EncodedRequestUri": "LzgxZDQ2OWI3LTU0NjctNDEwNy1iYjVhLWQxMTkwNzExMjYzMy9vcGVyYXRpb25zLzBhZWE4MWM1ZjdkMGI5MjM5ZTAxNjlkOWVkOWIyMTIz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2012-08-01" + ], + "User-Agent": [ + "Microsoft.Azure.Management.ManagedCache.ManagedCacheClient/0.8.8.1" + ], + "client-tracking-id": [ + "74" + ] + }, + "ResponseBody": "\r\n 0aea81c5-f7d0-b923-9e01-69d9ed9b2123\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "77b88d1acd88b106949d783b5de10e74" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 01 Oct 2014 20:46:51 GMT" + ], + "Server": [ + "1.0.6198.125", + "(rd_rdfe_stable.140911-0949)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "81d469b7-5467-4107-bb5a-d11907112633" + } +} \ No newline at end of file diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/packages.config b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/packages.config new file mode 100644 index 000000000000..304b6619a203 --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache.Test/packages.config @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Commands.ManagedCache.csproj b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Commands.ManagedCache.csproj new file mode 100644 index 000000000000..d1b1e36ed9eb --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Commands.ManagedCache.csproj @@ -0,0 +1,169 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {46C06ED8-43D9-41FD-B73B-41547D9C04E1} + Library + Properties + Microsoft.Azure.Commands.ManagedCache + Microsoft.Azure.Commands.ManagedCache + v4.5 + 512 + + ..\..\..\ + true + + + true + full + false + ..\..\..\Package\Debug\ServiceManagement\Azure\ManagedCache + DEBUG;TRACE + 4 + true + false + + + OnBuildSuccess + + + true + MSSharedLibKey.snk + true + ..\..\..\Package\Release\ServiceManagement\Azure\ManagedCache + TRACE;SIGN + true + pdbonly + AnyCPU + false + + + + ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll + + + ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll + + + ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll + + + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + True + + + + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + + + ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll + + + + + + + False + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + True + Resources.resx + + + + + + + {CD5AA507-F5EF-473D-855B-84B91A1ABE54} + Commands + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + + + PreserveNewest + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/MSSharedLibKey.snk b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/MSSharedLibKey.snk differ diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/ManagedCacheCmdletBase.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/ManagedCacheCmdletBase.cs new file mode 100644 index 000000000000..3c7827f65823 --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/ManagedCacheCmdletBase.cs @@ -0,0 +1,38 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.ManagedCache +{ + using Microsoft.WindowsAzure.Commands.Utilities.Common; + + /// + /// The base class for all Microsoft Azure Managed Cache Management Cmdlets + /// + public abstract class ManagedCacheCmdletBase : AzurePSCmdlet + { + private PSCacheClient cacheClient; + + internal PSCacheClient CacheClient + { + get + { + if (cacheClient == null) + { + cacheClient = new PSCacheClient(CurrentContext.Subscription); + } + return cacheClient; + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Microsoft.Azure.Commands.ManagedCache.dll-help.psd1 b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Microsoft.Azure.Commands.ManagedCache.dll-help.psd1 new file mode 100644 index 000000000000..a57ca0951686 --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Microsoft.Azure.Commands.ManagedCache.dll-help.psd1 @@ -0,0 +1,86 @@ +# +# Module manifest for module 'Azure' +# +# Generated by: Microsoft Corporation +# +# Generated on: 5/23/2012 +# + +@{ + +# Version number of this module. +ModuleVersion = '0.8.8' + +# ID used to uniquely identify this module +GUID = 'D48CF693-4125-4D2D-8790-1514F44CE325' + +# Author of this module +Author = 'Microsoft Corporation' + +# Company or vendor of this module +CompanyName = 'Microsoft Corporation' + +# Copyright statement for this module +Copyright = '?Microsoft Corporation. All rights reserved.' + +# Description of the functionality provided by this module +Description = '' + +# Minimum version of the Windows PowerShell engine required by this module +PowerShellVersion = '3.0' + +# Name of the Windows PowerShell host required by this module +PowerShellHostName = '' + +# Minimum version of the Windows PowerShell host required by this module +PowerShellHostVersion = '' + +# Minimum version of the .NET Framework required by this module +DotNetFrameworkVersion = '4.0' + +# Minimum version of the common language runtime (CLR) required by this module +CLRVersion='4.0' + +# Processor architecture (None, X86, Amd64, IA64) required by this module +ProcessorArchitecture = 'None' + +# Modules that must be imported into the global environment prior to importing this module +RequiredModules = @() + +# Assemblies that must be loaded prior to importing this module +RequiredAssemblies = @() + +# Script files (.ps1) that are run in the caller's environment prior to importing this module +ScriptsToProcess = @() + +# Type files (.ps1xml) to be loaded when importing this module +TypesToProcess = @() + +# Format files (.ps1xml) to be loaded when importing this module +FormatsToProcess = @() + +# Modules to import as nested modules of the module specified in ModuleToProcess +NestedModules = '..\..\..\Package\Debug\ServiceManagement\Azure\ManagedCache\Microsoft.Azure.Commands.ManagedCache.dll' + +# Functions to export from this module +FunctionsToExport = '*' + +# Cmdlets to export from this module +CmdletsToExport = '*' + +# Variables to export from this module +VariablesToExport = '*' + +# Aliases to export from this module +AliasesToExport = @() + +# List of all modules packaged with this module +ModuleList = @() + +# List of all files packaged with this module +FileList = @() + +# Private data to pass to the module specified in ModuleToProcess +PrivateData = '' + +} diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Microsoft.Azure.Commands.ManagedCache.dll-help.xml b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Microsoft.Azure.Commands.ManagedCache.dll-help.xml new file mode 100644 index 000000000000..bd72fc1f3644 --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Microsoft.Azure.Commands.ManagedCache.dll-help.xml @@ -0,0 +1,1764 @@ + + + + + Get-AzureManagedCache + + Gets the Azure Caches in your Azure account. + + + + + Get + AzureManagedCache + + + + + The Get-AzureManagedCache cmdlet get the Azure Caches in your account. By default, it gets all Azure Caches in the account. To get a particular Azure Cache, use the Name parameter.An Azure Cache is a secure, dedicated cache that provides extremely fast access to data. This distributed, in-memory, scalable solution enables you to build highly scalable and responsive applications. For more information about Azure Cache, see Azure Cache (http://azure.microsoft.com/en-us/services/cache/). + + + + Get-AzureManagedCache + + Name + + Gets only the specified Azure Cache. Enter the name of an Azure Cache. The parameter value is case-sensitive. Wildcards are not permitted. This parameter is optional. By default, Get-AzureManagedCache get all Azure Caches in the account. + + String + + + + + + Name + + Gets only the specified Azure Cache. Enter the name of an Azure Cache. The parameter value is case-sensitive. Wildcards are not permitted. This parameter is optional. By default, Get-AzureManagedCache get all Azure Caches in the account. + + String + + String + + + + + + + + + None + + + + + + + + + + + + Microsoft.Azure.Commands.ManagedCache.Models.PSCacheService + + + + + + + + + + + + + + Before using this cmdlet, use Add-AzureAccount or Import-AzurePublishSettingsFile to make your Azure account available to Windows PowerShell. For more information, see How to install and configure Azure PowerShell (http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/). + + + + + -------------------------- Example 1: Get all Azure Caches -------------------------- + + + + PS C:\>Get-AzureManagedCache + + This command gets all Azure Caches in your account. + + + + + + + + + -------------------------- Example 2: Get an Azure Cache by name -------------------------- + + + + PS C:\>Get-AzureManagedCache -Name ContosoCache + + This command gets only the ContosoCache Azure Cache. + + + + + + + + + + + Online Version: + + + + New-AzureManagedCache + + + + Set-AzureManagedCache + + + + Remove-AzureManagedCache + + + + Get-AzureManagedCacheAccessKey + + + + New-AzureManagedCacheAccessKey + + + + + + + + Get-AzureManagedCacheAccessKey + + Gets the access keys for an Azure Cache + + + + + Get + AzureManagedCacheAccessKey + + + + + The Get-AzureManagedCacheAccessKey cmdlet gets the primary and secondary access keys for an Azure Cache. You can use these keys to allow clients, such as web applications, to access to your Azure Cache. Typically, you use the primary key, but use the secondary key to avoid delays while the primary key is being regenerated. To get new access keys, use the New- AzureManagedCacheAccessKey cmdletAn Azure Cache is a secure, dedicated cache that provides extremely fast access to data. This distributed, in-memory, scalable solution enables you to build highly scalable and responsive applications. For more information about Azure Cache, see Azure Cache (http://azure.microsoft.com/en-us/services/cache/). + + + + Get-AzureManagedCacheAccessKey + + Name + + Specifies the name of the Azure Cache. This parameter value is case-sensitve. Wildcard characters are not permitted. This parameter is required. + + String + + + + + + Name + + Specifies the name of the Azure Cache. This parameter value is case-sensitve. Wildcard characters are not permitted. This parameter is required. + + String + + String + + + + + + + + + None + + + + + + + + + + + + Microsoft.Azure.Management.ManagedCache.Models.CachingKeysResponse + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Get the access key -------------------------- + + + + PS C:\>Get-AzureManagedCacheAccessKey -Name contosocache + + This command gets the access key for the contosocache Azure Cache. + + + + + + + + + + + New-AzureManagedCacheAccessKey + + + + New-AzureManagedCache + + + + Get-AzureManagedCache + + + + Set-AzureManagedCache + + + + Remove-AzureManagedCache + + + + Get-AzureManagedCacheAccessKey + + + + New-AzureManagedCacheAccessKey + + + + + + + + New-AzureManagedCache + + Creates an Azure cache + + + + + New + AzureManagedCache + + + + + The New-AzureManagedCache cmdlet creates an Azure Cache in your Azure account and returns an object that represents the new Azure Cache.An Azure Cache is a secure, dedicated cache that provides extremely fast access to data. This distributed, in-memory, scalable solution enables you to build highly scalable and responsive applications. For more information about Azure Cache, see Azure Cache (http://azure.microsoft.com/en-us/services/cache/). + + + + New-AzureManagedCache + + Name + + Specifies a name for the Azure Cache. The name can include only lower-case letters and numbers, and it must begin with a lower-case letter. The name must be unique. This parameter is required. + + String + + + Location + + Specifies the location of the Azure Cache. Enter an Azure data center location, such as "North Central US" or "West Europe". This parameter is required.To find a location that supports Azure Cache, use the Switch-AzureModule cmdlet to switch to the AzureResourceManager module, and then use the Get-AzureLocation cmdlet. + + String + + + Sku + + Specifies the tier of the Azure Cache. Valid values are Basic (128MB - 1GB), Standard (1GB - 10GB), and Premium (5GB - 150GB). This parameter is optional. The default value is Basic. + + CacheServiceSkuType + + + Memory + + Specifies the size of the Azure Cache. The cache size might affect the cost of the service. Enter a value followed by "MB" or "GB" (no intervening space), such as (128MB or 8GB). This value must be compatible with the value of the Sku parameter. This parameter is optional. The default value is the lowest value in the range specified by the Sku parameter. -- When the value of Sku is Basic, the value of Memory must be divisible by 128MB. + +-- When the value of Sku is Standard, the value of Memory must be divisible by 1GB. + +-- When the value of Sku is Premium, the value of Memory must be divisible by 5GB. + + String + + + + + + Name + + Specifies a name for the Azure Cache. The name can include only lower-case letters and numbers, and it must begin with a lower-case letter. The name must be unique. This parameter is required. + + String + + String + + + + + + Location + + Specifies the location of the Azure Cache. Enter an Azure data center location, such as "North Central US" or "West Europe". This parameter is required.To find a location that supports Azure Cache, use the Switch-AzureModule cmdlet to switch to the AzureResourceManager module, and then use the Get-AzureLocation cmdlet. + + String + + String + + + + + + Sku + + Specifies the tier of the Azure Cache. Valid values are Basic (128MB - 1GB), Standard (1GB - 10GB), and Premium (5GB - 150GB). This parameter is optional. The default value is Basic. + + CacheServiceSkuType + + CacheServiceSkuType + + + + + + Memory + + Specifies the size of the Azure Cache. The cache size might affect the cost of the service. Enter a value followed by "MB" or "GB" (no intervening space), such as (128MB or 8GB). This value must be compatible with the value of the Sku parameter. This parameter is optional. The default value is the lowest value in the range specified by the Sku parameter. -- When the value of Sku is Basic, the value of Memory must be divisible by 128MB. + +-- When the value of Sku is Standard, the value of Memory must be divisible by 1GB. + +-- When the value of Sku is Premium, the value of Memory must be divisible by 5GB. + + String + + String + + + + + + + + + None + + + + + + + + + + + + Microsoft.Azure.Commands.ManagedCache.Models .PSCacheService + + + + + + + + + + + + + + Before using this cmdlet, use Add-AzureAccount or Import-AzurePublishSettingsFile to make your Azure account available to Windows PowerShell. For more information, see How to install and configure Azure PowerShell (http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/). + + + + + -------------------------- Example 1: Create an Azure Cache -------------------------- + + + + PS C:\>New-AzureManagedCache -Name contosocache -Location "West Europe" + + This command creates an Azure Cache named ContosoCache in the West Europe Azure data center. It uses the default values for the Sku and Memory parameters, which are Basic and 128MB. + + + + + + + + + -------------------------- Example 2: Create a premium Azure Cache -------------------------- + + + + PS C:\>New-AzureManagedCache -Name contosoappcache -Location "West Europe" -Sku Premium -Memory 150GB + + This command creates the largest available Azure Cache. + + + + + + + + + + + Online Version: + + + + Get-AzureManagedCache + + + + Set-AzureManagedCache + + + + Remove-AzureManagedCache + + + + Get-AzureManagedCacheAccessKey + + + + New-AzureManagedCacheAccessKey + + + + + + + + New-AzureManagedCacheAccessKey + + Creates new access keys for an Azure Cache. + + + + + New + AzureManagedCacheAccessKey + + + + + The New-AzureManagedCacheAccessKey cmdlet generates new primary or secondary access keys for an Azure Cache. When you create an Azure Cache, it includes a set of access keys. To get the current access keys, use the Get-AzureManagedCacheAccessKey cmdlet. You can use these keys to allow clients, such as web applications, to access to your Azure Cache.An Azure Cache is a secure, dedicated cache that provides extremely fast access to data. This distributed, in-memory, scalable solution enables you to build highly scalable and responsive applications. For more information about Azure Cache, see Azure Cache (http://azure.microsoft.com/en-us/services/cache/).Typically, you use the primary key, but use the secondary key to avoid delays while the primary key is being regenerated. To get new access keys, use the New- AzureManagedCacheAccessKey cmdlet + + + + New-AzureManagedCacheAccessKey + + Name + + Generates keys for the specified Azure Cache. Enter the name of the Azure Cache. This parameter is required. The parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + + KeyType + + Specifies the type of key to create. Valid values are Primary and Secondary. This parameter is optional. The default value is Primary. + + String + + + + + + Name + + Generates keys for the specified Azure Cache. Enter the name of the Azure Cache. This parameter is required. The parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + String + + + + + + KeyType + + Specifies the type of key to create. Valid values are Primary and Secondary. This parameter is optional. The default value is Primary. + + String + + String + + + + + + + + + None + + + + + + + + + + + + Microsoft.Azure.Management.ManagedCache.Models.CachingKeysResponse + + + + + + + + + + + + + + + + + + + -------------------------- Create a new primary key -------------------------- + + + + PS C:\>New-AzureManagedCacheAccessKey -Name contosocache + + This command creates a new primary key for the contosocache Azure Cache. + + + + + + + + + -------------------------- Create a new secondary key -------------------------- + + + + PS C:\>New-AzureManagedCacheAccessKey -Name contosocache -KeyType Secondary + + This command creates a new secondary key for the contosocache Azure Cache. + + + + + + + + + -------------------------- Create new access keys -------------------------- + + + + PS C:\>'Primary', 'Secondary' | ForEach-Object {New-AzureManagedCacheAccessKey -Name contosocache -KeyType $_} + + This command creates new primary and secondary keys for the contosocache Azure Cache. + + + + + + + + + + + Online Version: + + + + Get-AzureManagedCacheAccessKey + + + + New-AzureManagedCache + + + + Get-AzureManagedCache + + + + Set-AzureManagedCache + + + + Remove-AzureManagedCache + + + + + + + + Remove-AzureManagedCache + + Deletes an Azure Cache + + + + + Remove + AzureManagedCache + + + + + The Remove-AzureManagedCache cmdlet deletes an Azure Cache and all of the data in the Cache. It returns True if the operation was successful and False if it failed.By default, Remove-AzureManagedCache prompts you for confirmation before deleting the Azure Cache, but you can use the Force parameter to suppress the prompt.An Azure Cache is a secure, dedicated cache that provides extremely fast access to data. This distributed, in-memory, scalable solution enables you to build highly scalable and responsive applications. For more information about Azure Cache, see Azure Cache (http://azure.microsoft.com/en-us/services/cache/). + + + + Remove-AzureManagedCache + + Name + + Specifies the name of the Azure Cache to delete. The parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + + PassThru + + + + SwitchParameter + + + Force + + Suppresses the confirmation prompt. By default, Remove-AzureManagedCache prompts you for confirmation before deleting the Azure Cache. + + SwitchParameter + + + + + + Name + + Specifies the name of the Azure Cache to delete. The parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + String + + + + + + PassThru + + + + SwitchParameter + + SwitchParameter + + + + + + Force + + Suppresses the confirmation prompt. By default, Remove-AzureManagedCache prompts you for confirmation before deleting the Azure Cache. + + SwitchParameter + + SwitchParameter + + + + + + + + + None + + + + + + + + + + + + System.Boolean + + + + + + + + + + + + + + Before using this cmdlet, use Add-AzureAccount or Import-AzurePublishSettingsFile to make your Azure account available to Windows PowerShell. For more information, see How to install and configure Azure PowerShell (http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/). + + + + + -------------------------- Delete an Azure Cache -------------------------- + + + + PS C:\>Remove-AzureManagedCache -Name contosocache + +Confirm +Are you sure you want to perform this action? +Performing the operation "Delete" on target "contosocache". +[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): +Y + +True + + This command deletes the contosocache Azure Cache. The command prompts for confirmation before deleting the Cache. It returns a value of $True to indicate that the Cache was deleted. + + + + + + + + + -------------------------- Example 2: Remove all test caches -------------------------- + + + + PS C:\>Get-AzureManagedCache | Where-Object Name -like Test* | Remove-AzureManagedCache -Force + + This command removes all Azure Caches that have names that begin with "Test." It uses the Get-AzureManagedCache cmdlet to get the Azure Caches in your account. It pipes them to the Where-Object cmdlet, which returns only the Azure Caches that have names that begin with "Test". Then, it pipes the test caches to the Remove-AzureManagedCache cmdlet with the Force parameter, which deletes them without prompting for confirmation. + + + + + + + + + + + Online Version: + + + + New-AzureManagedCache + + + + Get-AzureManagedCache + + + + Set-AzureManagedCache + + + + Get-AzureManagedCacheAccessKey + + + + New-AzureManagedCacheAccessKey + + + + + + + + Set-AzureManagedCache + + Changes the properties of an Azure Cache. + + + + + Set + AzureManagedCache + + + + + The Set-AzureManagedCache cmdlet changes the properties of an Azure Cache and returns an object that represents the cache with the changes. Use the Name and Location parameters to identify the Azure Cache, and the Sku and Memory parameters to change its properties.An Azure Cache is a secure, dedicated cache that provides extremely fast access to data. This distributed, in-memory, scalable solution enables you to build highly scalable and responsive applications. For more information about Azure Cache, see Azure Cache (http://azure.microsoft.com/en-us/services/cache/).WARNING: When you change the SKU of an Azure Cache, all data in the cache is deleted and a new, empty Azure Cache is created for you with the same name and location. When you use the Sku parameter, Set-AzureManagedCache prompts for confirmation. To suppress the confirmation prompt, use the Force parameter. + + + + Set-AzureManagedCache + + Name + + Identifies the Azure Cache. Enter the name of an Azure Cache. This parameter is required. The parameter value is case-sensitive. Wildcards are not permitted. You cannot use this cmdlet to change the name of an Azure Cache. + + String + + + Sku + + Changes the tier of the Azure Cache. Valid values are Basic (128MB - 1GB), Standard (1GB - 10GB), and Premium (5GB - 150GB). This parameter is optional. + + CacheServiceSkuType + + + Force + + Suppresses the confirmation prompt that appears when you use the Sku parameter. Because changing the SKU deletes all data in the Azure Cache, Set-AzureManagedCache prompts you for confirmation before performing the operation. + + SwitchParameter + + + Memory + + Changes the Azure Cache to the specified size. The cache size might affect the cost of the service. Enter a value followed by "MB" or "GB" (no intervening space), such as (128MB or 8GB). This value must be compatible with the Sku of the Azure Cache. This parameter is optional. -- When the value of Sku is Basic, the value of Memory must be divisible by 128MB. + +-- When the value of Sku is Standard, the value of Memory must be divisible by 1GB. + +-- When the value of Sku is Premium, the value of Memory must be divisible by 5GB. + + String + + + + + + Name + + Identifies the Azure Cache. Enter the name of an Azure Cache. This parameter is required. The parameter value is case-sensitive. Wildcards are not permitted. You cannot use this cmdlet to change the name of an Azure Cache. + + String + + String + + + + + + Sku + + Changes the tier of the Azure Cache. Valid values are Basic (128MB - 1GB), Standard (1GB - 10GB), and Premium (5GB - 150GB). This parameter is optional. + + CacheServiceSkuType + + CacheServiceSkuType + + + + + + Force + + Suppresses the confirmation prompt that appears when you use the Sku parameter. Because changing the SKU deletes all data in the Azure Cache, Set-AzureManagedCache prompts you for confirmation before performing the operation. + + SwitchParameter + + SwitchParameter + + + + + + Memory + + Changes the Azure Cache to the specified size. The cache size might affect the cost of the service. Enter a value followed by "MB" or "GB" (no intervening space), such as (128MB or 8GB). This value must be compatible with the Sku of the Azure Cache. This parameter is optional. -- When the value of Sku is Basic, the value of Memory must be divisible by 128MB. + +-- When the value of Sku is Standard, the value of Memory must be divisible by 1GB. + +-- When the value of Sku is Premium, the value of Memory must be divisible by 5GB. + + String + + String + + + + + + Location + + Specifies the location of the Azure Cache. This parameter is required. Enter the name of the Azure data center location where the Azure Cache resides, such as "North Central US" or "West Europe". This parameter identifies the Azure Cache. You cannot use this parameter to change the location of the Azure Cache. + + string + + string + + + + + + + + + None + + + + + + + + + + + + Microsoft.Azure.Commands.ManagedCache.Models.PsCacheService + + + + + + + + + + + + + + Before using this cmdlet, use Add-AzureAccount or Import-AzurePublishSettingsFile to make your Azure account available to Windows PowerShell. For more information, see How to install and configure Azure PowerShell (http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/). + + + + + -------------------------- Example 1: Change the size of an Azure Cache -------------------------- + + + + PS C:\>Set-AzureManagedCache -Name contosocache -Location "West Europe" -Memory 256MB + + This command increases the size of the contosocache Azure Cache to 256 MB. + + + + + + + + + -------------------------- Example 2: Change the SKU of an Azure Cache -------------------------- + + + + PS C:\>Set-AzureManagedCache -Name contosocache -Location "West Europe" -Sku Standard -Size 10GB + +Confirm +Are you sure you want to perform this action? +Performing the operation "Delete" on target "contosocache". +[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): + + This command changes the SKU of the contosocache Azure Cache from Basic to Standard and the Size to 10 GB. + + + + Because this operation deletes the existing Azure Cache and its data and creates a new empty Azure Cache, Set-AzureManagedCache prompts you for confirmation before deleting the cache. To suppress this prompt, use the Force parameter. + + + + + + + Online Version: + + + + + + + + New-AzureManagedCacheNamedCache + + Creates a named cache in the specified Azure Managed Cache Service instance. + + + + + New + AzureManagedCacheNamedCache + + + + + The New-AzureManagedCacheNamedCache cmdlet creates a named cache in the specified Azure Managed Cache Service instance in your account and returns an object that represents the new azure cache. Named caches are supported in the Standard and Premium cache offerings, and are not supported in the Basic cache offering. + + + + New-AzureManagedCacheNamedCache + + Name + + Specifies the name of the Azure Managed Cache Service instance in which to create a named cache. + + String + + + NamedCache + + Name of the named cache to create. + + String + + + ExpiryPolicy + + ExpiryPolicy for the named cache. Possible values are 'Absolute', 'Sliding' and 'Never'. The default value is 'Absolute'. + + String + + + ExpiryTime + + ExpiryTime of the named cache, in minutes. The default value is 10. + + int? + + + WithNotifications + + When the WithNotification parameter is used, notifications are enabled for the named cache. Notifcations are supported in the Standard and Premium cache offerings, and are unavailable in the Basic cache offering. + + + + WithHighAvailability + + When the HighAvailability parameter is used, high availability is enabled for the named cache. + + + + WithoutEviction + + When the WithoutEviction parameter is used, eviction is disabled for the named cache. + + + + + + + Name + + Specifies the name of the Azure Managed Cache Service instance in which to create the named cache. + + String + + String + + + + + + NamedCache + + Name of the named cache to create. + + String + + String + + + + + + ExpiryPolicy + + ExpiryPolicy for the named cache. Possible values are 'Absolute', 'Sliding' and 'Never'. The default value is 'Absolute'. + + String + + String + + + + + + ExpiryTime + + ExpiryTime of the named cache, in minutes. The default value is 10. + + int? + + int? + + + + + + WithHighAvailability + + When the HighAvailability parameter is used, high availability is enabled for the named cache. + + + SwitchParameter + + + + + + WithNotifications + + When the WithNotification parameter is used, notifications are enabled for the named cache. + + + SwitchParameter + + + + + + WithoutEviction + + When the WithoutEviction parameter is used, eviction is disabled for the named cache. + + + SwitchParameter + + + + + + + + + None + + + + + + + + + + + + Microsoft.Azure.Commands.ManagedCache.Models.PSCacheServiceWithNamedCaches + + + + + + + + + + + + + + Before using this cmdlet, use Add-AzureAccount or Import-AzurePublishSettingsFile to make your Azure account available to Windows PowerShell. For more information, see How to install and configure Azure PowerShell (http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/). + + + + + -------------------------- Example 1: Create a named cache in the contosocache Managed Cache Service instance -------------------------- + + + + PS C:\>New-AzureManagedCacheNamedCache -Name contosocache -NamedCache contosonamedcache + + This command creates a named cache named contosonamedcache in the contosocache Azure Managed Cache Service instance. It uses default values for all the other parameters. + + + + + + + + + -------------------------- Example 2: Create a named cache named contosonamedcache in the contosocache Azure Managed Cache Service instance with all parameters specified -------------------------- + + + + PS C:\>New-AzureManagedCacheNamedCache -Name contosocache -NamedCache contosonamedcache -ExpiryPolicy "Sliding" -ExpiryTime 10 -WithNotifications -WithHighAvailability -WithoutEviction + + This command creates a named cache in the contosocache Azure Managed Cache Service instance. It has Notifications and High Availability enabled and Eviction disabled. + + + + + + + + + + + Online Version: + + + + + + + + Set-AzureManagedCacheNamedCache + + Updates a named cache in the specified Azure Managed Cache Service instance. + + + + + Set + AzureManagedCacheNamedCache + + + + + The Set-AzureManagedCacheNamedCache cmdlet updates a named cache in the specified Azure Managed Cache Service instance in your azure account and returns an object that represents the named cache. + + + + Set-AzureManagedCacheNamedCache + + Name + + Specifies the name of the Azure Managed Cache Service instance in which to update a named cache. + + String + + + NamedCache + + Name of the named cache to update. + + String + + + ExpiryPolicy + + ExpiryPolicy for the named cache. Possible values are 'Absolute', 'Sliding' and 'Never'. The default value is 'Absolute'. + + String + + + ExpiryTime + + ExpiryTime of the named cache, in minutes. The value is 10. + + int? + + + WithNotifications + + When the WithNotification parameter is used, notifications are enabled for the named cache. Notifcations are supported in the Standard and Premium cache offerings, and are unavailable in the Basic cache offering. + + + + WithHighAvailability + + When the HighAvailability parameter is used, high availability is enabled for the named cache. High Availability is supported in the Standard and Premium cache offerings, and is unavailable in the Basic cache offering. + + + + WithoutEviction + + It will disable the Eviction. + + + + Force + + When the Force parameter is used, the confirmation prompt is suppressed. Because changing named cache deletes all data in that cache, Set-AzureManagedCacheNamedCache prompts you for confirmation before performing the operation. + + SwitchParameter + + + + + + Name + + Specifies the name of the Azure Managed Cache Service instance in which to update the named cache. + + String + + String + + + + + + NamedCache + + Name of the named cache to update. + + String + + String + + + + + + ExpiryPolicy + + ExpiryPolicy for the named cache. Possible values are 'Absolute', 'Sliding' and 'Never'. The default value is 'Absolute'. + + String + + String + + + + + + ExpiryTime + + ExpiryTime of the named cache, in minutes. The default value is 10. + + int? + + int? + + + + + + WithHighAvailability + + When the HighAvailability parameter is used, high availability is enabled for the named cache. High Availability is supported in the Standard and Premium cache offerings, and is unavailable in the Basic cache offering. + + + SwitchParameter + + + + + + WithNotifications + + When the WithNotifications parameter is used, notifications are enabled for the named cache. Notifications are supported in the Standard and Premium cache offerings, and are unavailable in the Basic cache offering. + + + SwitchParameter + + + + + + WithoutEviction + + When the WithoutEviction parameter is used, eviction is disabled for the named cache. + + + SwitchParameter + + + + + + Force + + When the Force parameter is used, the confirmation prompt is suppressed. Because updating a named cache deletes all data in that named cache, Set-AzureManagedCacheNamedCache prompts you for confirmation before performing the operation. + + SwitchParameter + + SwitchParameter + + + + + + + + + None + + + + + + + + + + + + Microsoft.Azure.Commands.ManagedCache.Models.PSCacheServiceWithNamedCaches + + + + + + + + + + + + + + Before using this cmdlet, use Add-AzureAccount or Import-AzurePublishSettingsFile to make your Azure account available to Windows PowerShell. For more information, see How to install and configure Azure PowerShell (http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/). + + + + + -------------------------- Example 1: Update a named cache in the contosocache Azure Managed Cache Service instance -------------------------- + + + + PS C:\>Set-AzureManagedCacheNamedCache -Name contosocache -NamedCache contosonamedcache + + This command updates a named cache named contosonamedcache in the contosocache Azure Managed Cache Service instance. It will update the named cache to use default values. + + + + + + + + + -------------------------- Example 2: Update a named cache with all parameters specified -------------------------- + + + + PS C:\>Set-AzureManagedCacheNamedCache -Name contosocache -NamedCache contosonamedcache -ExpiryPolicy "Sliding" -ExpiryTime 10 -WithNotifications -WithHighAvailability -WithoutEviction + + This command updates a named cache named contosonamedcache in the contosocache Azure Managed Cache Service instance. It has Notifications and High Availability enabled and Eviction disabled. + + + + + + + + + + + Online Version: + + + + + + + + Remove-AzureManagedCacheNamedCache + + Remove a named cache from an Azure Managed Cache Service instance + + + + + Remove + AzureManagedCacheNamedCache + + + + + The Remove-AzureManagedCacheNamedCache cmdlet removes a named cache from the specified Azure Manage Cache Service instance in your azure account. + + + + Remove-AzureManagedCacheNamedCache + + Name + + Specifies the name of the Azure Managed Cache Service instance from which to remove the named cache. + + String + + + NamedCache + + Name of the named cache to remove. + + String + + + Force + + When the Force parameter is used, the confirmation prompt is suppressed. Because removing a named cache deletes all data in that cache, this command prompts you for confirmation before performing the operation. + + SwitchParameter + + + PassThru + + By default Remove-AzureManagedCacheNamedCache removes the named cache and does not return any value. If the PassThru parameter is provided then Remove-AzureManagedCacheNamedCache returns a boolean value indicating the success of the operation. + + SwitchParameter + + + + + + Name + + Specifies the name of the Azure Managed Cache Service instance from which to remove the named cache. + + String + + String + + + + + + NamedCache + + Name of the named cache to remove. + + String + + String + + + + + + Force + + When the Force parameter is used, the confirmation prompt is suppressed. Because removing a named cache deletes all data in that cache, this command prompts you for confirmation before performing the operation. + + SwitchParameter + + SwitchParameter + + + + + + PassThru + + By default Remove-AzureManagedCacheNamedCache removes the named cache and does not return any value. If the PassThru parameter is provided then Remove-AzureManagedCacheNamedCache returns a boolean value indicating the success of the operation. + + SwitchParameter + + SwitchParameter + + + + + + + + + None + + + + + + + + + + + + Boolean + + + + + + + + + + + + + + Before using this cmdlet, use Add-AzureAccount or Import-AzurePublishSettingsFile to make your azure account available to Windows PowerShell. For more information, see How to install and configure Azure PowerShell (http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/). + + + + + -------------------------- Example 1: Remove the specified named cache from the specified Azure Managed Cache Service instance -------------------------- + + + + PS C:\>Remove-AzureManagedCacheNamedCache -Name contosocache -NamedCache contosonamedcache -Force -PassThru + + This command removes an azure named cache named contosonamedcache. + + + + + + + + + + + Online Version: + + + + + + + + Get-AzureManagedCacheNamedCache + + Gets a specific named cache or all named caches in an Azure Managed Cache Service instance + + + + + Get + AzureManagedCacheNamedCache + + + + + The Get-AzureManagedCacheNamedCache cmdlet gets a specific named cache or all named caches in an Azure Managed Cache Service instance in your azure account. + + + + Get-AzureManagedCacheNamedCache + + Name + + The name of the Azure Managed Cache Service instance that contains the named cache or caches to retrieve. + + String + + + NamedCache + + When retrieving a single named cache, specifies the name of the named cache. If this parameter is not provided all named caches from the specified Azure Managed Cache Service instance will be returned. + + String + + + + + + Name + + The name of the Azure Managed Cache Service instance that contains the named cache or caches to retrieve. + + String + + String + + + + + + NamedCache + + When retrieving a single named cache, specifies the name of the named cache. If this parameter is not provided all named caches from the specified Azure Managed Cache Service instance will be returned. + + String + + String + + + + + + + + + None + + + + + + + + + + + + Microsoft.Azure.Commands.ManagedCache.Models.PSCacheServiceWithNamedCaches + + + + + + + + + + + + + + Before using this cmdlet, use Add-AzureAccount or Import-AzurePublishSettingsFile to make your azure account available to Windows PowerShell. For more information, see How to install and configure Azure PowerShell (http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/). + + + + + -------------------------- Example 1: Get the details of a specific named cache -------------------------- + + + + PS C:\>Get-AzureManagedCacheNamedCache -Name contosocache -NamedCache contosonamedcache + + This command gets details about the contosonamedcache named cache. + + + + + + + + + -------------------------- Example 2: Get the details of all Named Caches in an Azure Managed Cache Service instance -------------------------- + + + + PS C:\>Get-AzureManagedCacheNamedCache -Name contosocache + + This command gets details about all Named Caches in the Azure Managed Cache Service instance names contosocache. + + + + + + + + + + + Online Version: + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Models/CacheAccessKeys.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Models/CacheAccessKeys.cs new file mode 100644 index 000000000000..dbfde57e7ec5 --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Models/CacheAccessKeys.cs @@ -0,0 +1,41 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.ManagedCache.Models +{ + using System.Net; + using Microsoft.Azure.Management.ManagedCache.Models; + + class CacheAccessKeys + { + public CacheAccessKeys(string cacheServiceName, CachingKeysResponse response) + { + Name = cacheServiceName; + Primary = response.Primary; + Secondary = response.Secondary; + StatusCode = response.StatusCode; + RequestId = response.RequestId; + } + + public string Name { get; private set; } + + public string Primary { get; private set; } + + public string Secondary { get; private set; } + + public HttpStatusCode StatusCode { get; private set; } + + public string RequestId { get; private set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Models/CacheSkuCountConvert.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Models/CacheSkuCountConvert.cs new file mode 100644 index 000000000000..66516cd5d780 --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Models/CacheSkuCountConvert.cs @@ -0,0 +1,96 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.ManagedCache.Models +{ + using System; + using System.Collections.Generic; + using Microsoft.Azure.Management.ManagedCache.Models; + + //This class bridges the concept gap between "memory size" used by the commandlets + //and the "sku count" at server + class CacheSkuCountConvert + { + private CacheServiceSkuType skuName; + private int min; + private int max; + private int increment; + private string unit; //MB or GB + public CacheSkuCountConvert(CacheServiceSkuType sku) + { + skuName = sku; + if (sku == CacheServiceSkuType.Basic) + { + min = 128; + max = 1024; + increment = 128; + unit = "MB"; + } + else if (sku == CacheServiceSkuType.Standard) + { + min = 1; + max = 10; + increment = 1; + unit = "GB"; + } + else + { + min = 5; + max = 150; + increment = 5; + unit = "GB"; + } + } + + public int ToSkuCount (string memorySize) + { + if (string.IsNullOrEmpty(memorySize)) + { + return 1; + } + if (memorySize.EndsWith(unit, StringComparison.OrdinalIgnoreCase)) + { + memorySize = memorySize.Substring(0, memorySize.Length - unit.Length); + } + int size; + if (!int.TryParse(memorySize, out size) || + size < min || size > max || (size % increment) != 0) + { + throw new ArgumentException( + string.Format(Properties.Resources.InvalidCacheMemorySize, min, max, unit)); + } + return size / increment; + } + + public string ToMemorySize (int skuCount) + { + return GetMemoryDisplayInfo(skuCount * increment); + } + + public string[] GetValueList() + { + List values = new List(); + for (int i = min; i <= max; i+= increment) + { + values.Add(GetMemoryDisplayInfo(i)); + } + return values.ToArray(); + } + + private string GetMemoryDisplayInfo(int memory) + { + return string.Format("{0}{1}", memory, unit); + } + } +} diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Models/MemoryDynamicParameterSet.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Models/MemoryDynamicParameterSet.cs new file mode 100644 index 000000000000..070a6ee2a088 --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Models/MemoryDynamicParameterSet.cs @@ -0,0 +1,77 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.ManagedCache.Models +{ + using System.Management.Automation; + using Microsoft.Azure.Management.ManagedCache.Models; + + class MemoryDynamicParameterSet + { + private readonly RuntimeDefinedParameterDictionary _parameters = new RuntimeDefinedParameterDictionary(); + private const string MemoryParameterName = "Memory"; + + public object GetDynamicParameters(CacheServiceSkuType sku) + { + RuntimeDefinedParameter memoryParameter = CreateCacheMemoryDynamicParameter(sku); + _parameters[MemoryParameterName] = memoryParameter; + return _parameters; + } + + public string GetMemoryValue(CacheServiceSkuType sku) + { + RuntimeDefinedParameter memoryParameter; + string memory = string.Empty; + if (_parameters.TryGetValue(MemoryParameterName, out memoryParameter)) + { + if (memoryParameter != null && memoryParameter.Value != null) + { + memory = memoryParameter.Value.ToString(); + } + } + + if (string.IsNullOrEmpty(memory)) + { + memory = new CacheSkuCountConvert(sku).ToMemorySize(1); + } + return memory; + } + + private RuntimeDefinedParameter CreateCacheMemoryDynamicParameter(CacheServiceSkuType sku) + { + var parameter = new RuntimeDefinedParameter + { + Name = MemoryParameterName, + ParameterType = typeof(string), + }; + + // add the [parameter] attribute + var parameterAttribute = new ParameterAttribute + { + Mandatory = false, + }; + + parameter.Attributes.Add(parameterAttribute); + + string[] values = (new CacheSkuCountConvert(sku)).GetValueList(); + parameter.Attributes.Add(new ValidateSetAttribute(values) + { + IgnoreCase = true + }); + + return parameter; + } + + } +} \ No newline at end of file diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Models/PSCacheExtensions.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Models/PSCacheExtensions.cs new file mode 100644 index 000000000000..e838c5235ab5 --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Models/PSCacheExtensions.cs @@ -0,0 +1,80 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.ManagedCache.Models +{ + using System; + using System.Collections.Generic; + using System.Linq; + using System.Text; + using System.Threading.Tasks; + + public class PSCacheExtensions + { + public static string ConstructNamedCachesTable(List namedCaches) + { + StringBuilder namedCachesTable = new StringBuilder(); + + if (namedCaches != null && namedCaches.Count > 0) + { + int maxCacheNameLength = Math.Max("CacheName".Length, namedCaches.Where(r => r.CacheName != null).DefaultIfEmpty(EmptyNamedCaches).Max(r => r.CacheName.Length)); + int maxExpiryPolicyLength = Math.Max("ExpiryPolicy".Length, namedCaches.Where(r => r.ExpiryPolicy != null).DefaultIfEmpty(EmptyNamedCaches).Max(r => r.ExpiryPolicy.Length)); + int maxTimeToLiveInMinutesLength = Math.Max("TimeToLiveInMinutes".Length, namedCaches.Where(r => r != null).DefaultIfEmpty(EmptyNamedCaches).Max(r => r.TimeToLiveInMinutes.ToString().Length)); + int maxEvictionLength = Math.Max("Eviction".Length, namedCaches.Where(r => r.Eviction != null).DefaultIfEmpty(EmptyNamedCaches).Max(r => r.Eviction.Length)); + int maxNotificationsLength = Math.Max("Notifications".Length, namedCaches.Where(r => r.Notifications != null).DefaultIfEmpty(EmptyNamedCaches).Max(r => r.Notifications.Length)); + int maxHighAvailabilityLength = Math.Max("HighAvailability".Length, namedCaches.Where(r => r.HighAvailability != null).DefaultIfEmpty(EmptyNamedCaches).Max(r => r.HighAvailability.Length)); + + string rowFormat = "{0, -" + maxCacheNameLength + "} {1, -" + maxExpiryPolicyLength + "} {2, -" + maxTimeToLiveInMinutesLength + "} {3, -" + maxEvictionLength + "} {4, -" + maxNotificationsLength + "} {5, -" + maxHighAvailabilityLength + "}\r\n"; + namedCachesTable.AppendLine(); + namedCachesTable.AppendFormat(rowFormat, "CacheName", "ExpiryPolicy", "TimeToLiveInMinutes", "Eviction", "Notifications", "HighAvailability"); + namedCachesTable.AppendFormat(rowFormat, + GenerateSeparator(maxCacheNameLength, "="), + GenerateSeparator(maxExpiryPolicyLength, "="), + GenerateSeparator(maxTimeToLiveInMinutesLength, "="), + GenerateSeparator(maxEvictionLength, "="), + GenerateSeparator(maxNotificationsLength, "="), + GenerateSeparator(maxHighAvailabilityLength, "=")); + + foreach (PSNamedCachesAttributes namedCache in namedCaches) + { + namedCachesTable.AppendFormat(rowFormat, namedCache.CacheName, namedCache.ExpiryPolicy, namedCache.TimeToLiveInMinutes, namedCache.Eviction, namedCache.Notifications, namedCache.HighAvailability); + } + } + return namedCachesTable.ToString(); + } + + private static PSNamedCachesAttributes EmptyNamedCaches + { + get + { + return new PSNamedCachesAttributes + { + CacheName = string.Empty, + ExpiryPolicy = string.Empty, + TimeToLiveInMinutes = 0, + Eviction = string.Empty, + Notifications = string.Empty, + HighAvailability = string.Empty + }; + } + } + + private static string GenerateSeparator(int amount, string separator) + { + StringBuilder result = new StringBuilder(); + while (amount-- != 0) result.Append(separator); + return result.ToString(); + } + } +} diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Models/PSCacheService.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Models/PSCacheService.cs new file mode 100644 index 000000000000..5ee8239d4828 --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Models/PSCacheService.cs @@ -0,0 +1,43 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.ManagedCache.Models +{ + using Microsoft.Azure.Management.ManagedCache.Models; + + public class PSCacheService + { + public PSCacheService(CloudServiceResource resource) + { + Name = resource.Name; + State = resource.SubState; + Location = resource.IntrinsicSettingsSection.CacheServiceInputSection.Location; + Sku = resource.IntrinsicSettingsSection.CacheServiceInputSection.SkuType; + int skuCount = resource.IntrinsicSettingsSection.CacheServiceInputSection.SkuCount; + CacheSkuCountConvert convert = new CacheSkuCountConvert(Sku); + Memory = convert.ToMemorySize(skuCount); + } + + public string Name { get; private set; } + + public string Location { get; private set; } + + public string State { get; private set; } + + public CacheServiceSkuType Sku { get; private set; } + + public string Memory { get; private set; } + + } +} diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Models/PSCacheServiceWithNamedCaches.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Models/PSCacheServiceWithNamedCaches.cs new file mode 100644 index 000000000000..48f1e31d1911 --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Models/PSCacheServiceWithNamedCaches.cs @@ -0,0 +1,55 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.ManagedCache.Models +{ + using Microsoft.Azure.Management.ManagedCache.Models; + using System.Collections.Generic; + + public class PSCacheServiceWithNamedCaches + { + public PSCacheServiceWithNamedCaches(CloudServiceResource resource) + { + Name = resource.Name; + State = resource.SubState; + Location = resource.IntrinsicSettingsSection.CacheServiceInputSection.Location; + Sku = resource.IntrinsicSettingsSection.CacheServiceInputSection.SkuType; + int skuCount = resource.IntrinsicSettingsSection.CacheServiceInputSection.SkuCount; + CacheSkuCountConvert convert = new CacheSkuCountConvert(Sku); + Memory = convert.ToMemorySize(skuCount); + NamedCaches = new List(); + foreach (IntrinsicSettings.CacheServiceInput.NamedCache namedCache in resource.IntrinsicSettingsSection.CacheServiceInputSection.NamedCaches) + { + NamedCaches.Add(new PSNamedCachesAttributes(namedCache)); + } + } + + public string Name { get; private set; } + + public string Location { get; private set; } + + public string State { get; private set; } + + public CacheServiceSkuType Sku { get; private set; } + + public string Memory { get; private set; } + + public List NamedCaches { get; private set; } + + public string NamedCachesTable + { + get { return PSCacheExtensions.ConstructNamedCachesTable(NamedCaches); } + } + } +} diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Models/PSNamedCachesAttributes.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Models/PSNamedCachesAttributes.cs new file mode 100644 index 000000000000..0747157f77ea --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Models/PSNamedCachesAttributes.cs @@ -0,0 +1,46 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.ManagedCache.Models +{ + using Microsoft.Azure.Management.ManagedCache.Models; + + public class PSNamedCachesAttributes + { + public PSNamedCachesAttributes() + { } + + public PSNamedCachesAttributes(IntrinsicSettings.CacheServiceInput.NamedCache namedCache) + { + CacheName = namedCache.CacheName; + ExpiryPolicy = namedCache.ExpirationSettingsSection.Type; + TimeToLiveInMinutes = namedCache.ExpirationSettingsSection.TimeToLiveInMinutes; + Eviction = "LeastRecentlyUsed".Equals(namedCache.EvictionPolicy) ? "Enabled" : "Disabled"; + Notifications = namedCache.NotificationsEnabled ? "Enabled" : "Disabled"; + HighAvailability = namedCache.HighAvailabilityEnabled ? "Enabled" : "Disabled"; + } + + public string CacheName { get; set; } + + public string ExpiryPolicy { get; set; } + + public int TimeToLiveInMinutes { get; set; } + + public string Eviction { get; set; } + + public string Notifications { get; set; } + + public string HighAvailability { get; set; } + } +} diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/PSCacheClient.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/PSCacheClient.cs new file mode 100644 index 000000000000..9eb6f3f20df5 --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/PSCacheClient.cs @@ -0,0 +1,572 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Security.Cryptography; +using System.Text; +using System.Text.RegularExpressions; +using Microsoft.Azure.Commands.ManagedCache.Models; +using Microsoft.Azure.Management.ManagedCache; +using Microsoft.Azure.Management.ManagedCache.Models; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.Azure.Commands.ManagedCache +{ + class PSCacheClient + { + private const string CacheResourceType = "Caching"; + private const string CacheServiceReadyState = "Active"; + private const int MaxNamedCacheCount = 10; + + private ManagedCacheClient client; + public PSCacheClient(AzureSubscription currentSubscription) + { + client = AzureSession.ClientFactory.CreateClient(currentSubscription, AzureEnvironment.Endpoint.ServiceManagement); + } + public PSCacheClient() { } + + public Action ProgressRecorder { get; set; } + + public List GetLocations() + { + return new List(client.CacheServices.ListRegions().Regions); + } + + public CloudServiceResource CreateCacheService ( + string subscriptionID, + string cacheServiceName, + string location, + CacheServiceSkuType sku, + string memorySize) + { + WriteProgress(Properties.Resources.InitializingCacheParameters); + CacheServiceCreateParameters param = InitializeParameters(location, sku, memorySize); + + WriteProgress(Properties.Resources.CreatingPrerequisites); + string cloudServiceName = EnsureCloudServiceExists(subscriptionID, location); + + WriteProgress(Properties.Resources.VerifyingCacheServiceName); + if (!(client.CacheServices.CheckNameAvailability(cloudServiceName,cacheServiceName).Available)) + { + throw new ArgumentException(Properties.Resources.CacheServiceNameUnavailable); + } + + CloudServiceResource cacheResource = ProvisionCacheService(cloudServiceName, cacheServiceName, param, true); + + return cacheResource; + } + + private CloudServiceResource ProvisionCacheService(string cloudServiceName, + string cacheServiceName, + CacheServiceCreateParameters param, + bool createOrUpdate) + { + if (createOrUpdate) + { + WriteProgress(Properties.Resources.CreatingCacheService); + } + else + { + WriteProgress(Properties.Resources.UpdatingCacheService); + } + client.CacheServices.CreateCacheService(cloudServiceName, cacheServiceName, param); + + WriteProgress(Properties.Resources.WaitForCacheServiceReady); + CloudServiceResource cacheResource = WaitForProvisionDone(cacheServiceName, cloudServiceName); + return cacheResource; + } + + private CloudServiceResource FetchCloudServiceResource(string cacheServiceName, out string cloudServiceName) + { + CloudServiceListResponse listResponse = client.CloudServices.List(); + CloudServiceResource cacheResource = null; + cloudServiceName = null; + foreach (CloudServiceListResponse.CloudService cloudService in listResponse) + { + cacheResource = cloudService.Resources.FirstOrDefault( + p => { return p.Name.Equals(cacheServiceName) && IsCachingResource(p.Type); }); + if (cacheResource != null) + { + cloudServiceName = cloudService.Name; + break; + } + } + + if (cacheResource == null) + { + throw new ArgumentException(string.Format(Properties.Resources.CacheServiceNotExisting, cacheServiceName)); + } + + return cacheResource; + } + + public CloudServiceResource UpdateCacheService(string cacheServiceName, CacheServiceSkuType sku, string memory, + Action ConfirmAction, bool force) + { + string cloudServiceName = null; + CloudServiceResource cacheResource = FetchCloudServiceResource(cacheServiceName, out cloudServiceName); + + CacheSkuCountConvert convert = new CacheSkuCountConvert(sku); + CacheServiceSkuType existingSkuType = cacheResource.IntrinsicSettingsSection.CacheServiceInputSection.SkuType; + int existingSkuCount = cacheResource.IntrinsicSettingsSection.CacheServiceInputSection.SkuCount; + int newSkuCount = convert.ToSkuCount(memory); + if (existingSkuType == sku && existingSkuCount == newSkuCount) + { + WriteProgress("No update is needed as there is no change"); + return cacheResource; + } + + //We will prompt only if there is data loss + string promptMessage = GetPromptMessgaeIfThereIsDataLoss(existingSkuType, sku, existingSkuCount, newSkuCount); + if (string.IsNullOrEmpty(promptMessage)) + { + force = true; + } + ConfirmAction( + force, + string.Format(Properties.Resources.UpdatingCacheService), + promptMessage, + cacheServiceName, + () => + { + cacheResource.IntrinsicSettingsSection.CacheServiceInputSection.SkuCount = convert.ToSkuCount(memory); + cacheResource.IntrinsicSettingsSection.CacheServiceInputSection.SkuType = sku; + CacheServiceCreateParameters param = new CacheServiceCreateParameters(); + param.IntrinsicSettingsSection = cacheResource.IntrinsicSettingsSection; + param.ETag = cacheResource.ETag; + cacheResource = ProvisionCacheService(cloudServiceName, cacheResource.Name, param, false); + }); + return cacheResource; + } + + public CloudServiceResource AddNamedCache(string cacheServiceName, string namedCacheName, string expiryPolicy, int expiryTimeInMinutes, + bool noeviction, bool notifications, bool highAvailability) + { + string cloudServiceName = null; + CloudServiceResource cacheResource = FetchCloudServiceResource(cacheServiceName, out cloudServiceName); + + foreach (IntrinsicSettings.CacheServiceInput.NamedCache namedCache in cacheResource.IntrinsicSettingsSection.CacheServiceInputSection.NamedCaches) + { + if (namedCache.CacheName.Equals(namedCacheName)) + { + throw new ArgumentException(string.Format(Properties.Resources.NamedCacheExists, cacheServiceName, namedCacheName)); + } + } + + if (cacheResource.IntrinsicSettingsSection.CacheServiceInputSection.SkuType == CacheServiceSkuType.Basic) + { + throw new ArgumentException(Properties.Resources.NoAddInBasicSku); + } + else if (cacheResource.IntrinsicSettingsSection.CacheServiceInputSection.NamedCaches.Count == MaxNamedCacheCount) + { + throw new ArgumentException(Properties.Resources.NoAddInAllSku); + } + + IntrinsicSettings.CacheServiceInput.NamedCache newNamedCache = new IntrinsicSettings.CacheServiceInput.NamedCache(); + newNamedCache.CacheName = namedCacheName; + newNamedCache.EvictionPolicy = noeviction ? "None" : "LeastRecentlyUsed"; + newNamedCache.ExpirationSettingsSection = new IntrinsicSettings.CacheServiceInput.NamedCache.ExpirationSettings(); + newNamedCache.ExpirationSettingsSection.Type = expiryPolicy; + newNamedCache.ExpirationSettingsSection.TimeToLiveInMinutes = expiryTimeInMinutes; + newNamedCache.NotificationsEnabled = notifications; + newNamedCache.HighAvailabilityEnabled = highAvailability; + + CacheServiceCreateParameters param = new CacheServiceCreateParameters(); + param.IntrinsicSettingsSection = cacheResource.IntrinsicSettingsSection; + param.ETag = cacheResource.ETag; + param.IntrinsicSettingsSection.CacheServiceInputSection.NamedCaches.Add(newNamedCache); + cacheResource = ProvisionCacheService(cloudServiceName, cacheResource.Name, param, false); + + return cacheResource; + } + + public CloudServiceResource GetNamedCache(string cacheServiceName, string namedCacheName) + { + string cloudServiceName = null; + CloudServiceResource cacheResource = FetchCloudServiceResource(cacheServiceName, out cloudServiceName); + + if (!string.IsNullOrEmpty(namedCacheName)) + { + IList singleCache = new List(); + foreach (IntrinsicSettings.CacheServiceInput.NamedCache namedCache in cacheResource.IntrinsicSettingsSection.CacheServiceInputSection.NamedCaches) + { + if (namedCache.CacheName.Equals(namedCacheName)) + { + singleCache.Add(namedCache); + } + } + cacheResource.IntrinsicSettingsSection.CacheServiceInputSection.NamedCaches = singleCache; + } + return cacheResource; + } + + public CloudServiceResource SetNamedCache(string cacheServiceName, string namedCacheName, string expiryPolicy, int expiryTimeInMinutes, + bool noeviction, bool notifications, bool highAvailability, Action ConfirmAction, bool force) + { + string cloudServiceName = null; + CloudServiceResource cacheResource = FetchCloudServiceResource(cacheServiceName, out cloudServiceName); + + bool namedCacheFound = false; + IntrinsicSettings.CacheServiceInput.NamedCache updateNamedCache = null; + foreach (IntrinsicSettings.CacheServiceInput.NamedCache namedCache in cacheResource.IntrinsicSettingsSection.CacheServiceInputSection.NamedCaches) + { + if (namedCache.CacheName.Equals(namedCacheName)) + { + updateNamedCache = namedCache; + namedCacheFound = true; + break; + } + } + + if (!namedCacheFound) + { + throw new ArgumentException(string.Format(Properties.Resources.NamedCacheDoNotExists, cacheServiceName, namedCacheName)); + } + + if (cacheResource.IntrinsicSettingsSection.CacheServiceInputSection.SkuType == CacheServiceSkuType.Basic) + { + if (notifications) + { + throw new ArgumentException(Properties.Resources.NotificationsNotAvailable); + } + + if (highAvailability) + { + throw new ArgumentException(Properties.Resources.HighAvailabilityNotAvailable); + } + } + + ConfirmAction( + force, + Properties.Resources.UpdateNamedCacheWarning, + Properties.Resources.UpdatingNamedCache, + cacheServiceName, + () => + { + if (cacheResource.IntrinsicSettingsSection.CacheServiceInputSection.SkuType != CacheServiceSkuType.Basic) + { + updateNamedCache.NotificationsEnabled = notifications; + updateNamedCache.HighAvailabilityEnabled = highAvailability; + } + updateNamedCache.EvictionPolicy = noeviction ? "None" : "LeastRecentlyUsed"; + if (updateNamedCache.ExpirationSettingsSection == null) + { + updateNamedCache.ExpirationSettingsSection = new IntrinsicSettings.CacheServiceInput.NamedCache.ExpirationSettings(); + } + updateNamedCache.ExpirationSettingsSection.Type = expiryPolicy; + updateNamedCache.ExpirationSettingsSection.TimeToLiveInMinutes = expiryTimeInMinutes; + + CacheServiceCreateParameters param = new CacheServiceCreateParameters(); + param.IntrinsicSettingsSection = cacheResource.IntrinsicSettingsSection; + param.ETag = cacheResource.ETag; + + cacheResource = ProvisionCacheService(cloudServiceName, cacheResource.Name, param, false); + }); + return cacheResource; + } + + public void RemoveNamedCache(string cacheServiceName, string namedCacheName, Action ConfirmAction, bool force) + { + if ("default".Equals(namedCacheName)) + { + throw new ArgumentException(string.Format(Properties.Resources.DoNotRemoveDefaultNamedCache)); + } + + string cloudServiceName = null; + CloudServiceResource cacheResource = FetchCloudServiceResource(cacheServiceName, out cloudServiceName); + + bool namedCacheFound = false; + IntrinsicSettings.CacheServiceInput.NamedCache removeNamedCache = null; + foreach (IntrinsicSettings.CacheServiceInput.NamedCache namedCache in cacheResource.IntrinsicSettingsSection.CacheServiceInputSection.NamedCaches) + { + if (namedCache.CacheName.Equals(namedCacheName)) + { + removeNamedCache = namedCache; + namedCacheFound = true; + break; + } + } + + if (!namedCacheFound) + { + throw new ArgumentException(string.Format(Properties.Resources.NamedCacheDoNotExists, cacheServiceName, namedCacheName)); + } + + ConfirmAction( + force, + Properties.Resources.RemoveNamedCacheWarning, + Properties.Resources.RemovingNamedCache, + cacheServiceName, + () => + { + CacheServiceCreateParameters param = new CacheServiceCreateParameters(); + param.IntrinsicSettingsSection = cacheResource.IntrinsicSettingsSection; + param.ETag = cacheResource.ETag; + param.IntrinsicSettingsSection.CacheServiceInputSection.NamedCaches.Remove(removeNamedCache); + cacheResource = ProvisionCacheService(cloudServiceName, cacheResource.Name, param, false); + }); + } + + private static bool IsCachingResource(string resourceType) + { + return string.Compare(resourceType, CacheResourceType, StringComparison.OrdinalIgnoreCase) == 0; + } + + private string GetPromptMessgaeIfThereIsDataLoss(CacheServiceSkuType existingSkuType, + CacheServiceSkuType newSkuType, + int existingSkuCount, + int newSkuCount) + { + string promptMsg = string.Empty; + if (existingSkuType != newSkuType) + { + promptMsg = Properties.Resources.PromptOnCachePlanChange; + } + else if (existingSkuCount > newSkuCount) + { + promptMsg = Properties.Resources.PromptOnCacheMemoryReduce; + } + return promptMsg; + } + + private static CacheServiceCreateParameters InitializeParameters(string location, CacheServiceSkuType sku, string memorySize) + { + CacheServiceCreateParameters param = new CacheServiceCreateParameters(); + IntrinsicSettings settings = new IntrinsicSettings(); + IntrinsicSettings.CacheServiceInput input = new IntrinsicSettings.CacheServiceInput(); + settings.CacheServiceInputSection = input; + param.Settings = settings; + + const int CacheMemoryObjectSize = 1024; + Models.CacheSkuCountConvert convert = new Models.CacheSkuCountConvert(sku); + input.Location = location; + input.SkuCount = convert.ToSkuCount(memorySize); + input.ServiceVersion = "1.0.0"; + input.ObjectSizeInBytes = CacheMemoryObjectSize; + input.SkuType = sku; + return param; + } + + private CloudServiceResource WaitForProvisionDone(string cacheServiceName, string cloudServiceName) + { + CloudServiceResource cacheResource = null; + //Service state goes through Creating/Updating to Active. We only care about active + int waitInMinutes = 30; + while (waitInMinutes > 0) + { + cacheResource = GetCacheService(cloudServiceName, cacheServiceName); + if (CacheServiceReadyState.Equals(cacheResource.SubState, StringComparison.OrdinalIgnoreCase)) + { + break; + } + else + { + const int milliSecondPerMinute = 60000; + TestMockSupport.Delay(milliSecondPerMinute); + waitInMinutes--; + } + } + + if (waitInMinutes < 0) + { + throw new InvalidOperationException(Properties.Resources.TimeoutWaitForCacheServiceReady); + } + return cacheResource; + } + + public string NormalizeCacheServiceName(string cacheServiceName) + { + //Cache serice can only take lower case. We help people to get it right + cacheServiceName = cacheServiceName.ToLower(); + + //Now check length (6~20) and pattern + int length = cacheServiceName.Length; + if (length < 6 || length > 20 || !Regex.IsMatch(cacheServiceName,"^[a-zA-Z][a-zA-Z0-9]*$")) + { + throw new ArgumentException(Properties.Resources.InvalidCacheServiceName); + } + + return cacheServiceName; + } + + public void DeleteCacheService(string cacheServiceName) + { + string cloudServiceName = GetAssociatedCloudServiceName(cacheServiceName); + if (string.IsNullOrEmpty(cloudServiceName)) + { + string error = string.Format(Properties.Resources.CacheServiceNotExisting, cacheServiceName); + throw new ArgumentException(error); + } + client.CacheServices.Delete(cloudServiceName, cacheServiceName); + } + + private string EnsureCloudServiceExists(string subscriptionId, string location) + { + string cloudServiceName = GetCloudServiceName(subscriptionId, location); + + if (!CloudServiceExists(cloudServiceName)) + { + CloudServiceCreateParameters parameters = new CloudServiceCreateParameters(); + parameters.GeoRegion = location; + parameters.Description = cloudServiceName; + parameters.Label = cloudServiceName; + OperationResponse response = client.CloudServices.Create(cloudServiceName, parameters); + } + return cloudServiceName; + } + + public List GetCacheServices(string cacheServiceName) + { + List services = new List(); + CloudServiceListResponse listResponse = client.CloudServices.List(); + foreach (CloudServiceListResponse.CloudService cloudService in listResponse) + { + foreach(CloudServiceResource resource in cloudService.Resources) + { + if (IsCachingResource(resource.Type)) + { + bool nameMatched = string.IsNullOrEmpty(cacheServiceName) + || cacheServiceName.Equals(resource.Name, StringComparison.OrdinalIgnoreCase); + + //'unknown' is a bad caching entry due to service internal error, + // that we should not display; otherwise, it will screw up the displaying for missing some important fields. + if (nameMatched && string.Compare(resource.State, "Unknown", StringComparison.OrdinalIgnoreCase)!=0) + { + services.Add(new PSCacheService(resource)); + } + } + } + } + return services; + } + + public CachingKeysResponse RegenerateAccessKeys(string cacheServiceName, string keyType) + { + RegenerateKeysParameters param = new RegenerateKeysParameters(); + string cloudServiceName = GetAssociatedCloudServiceName(cacheServiceName); + param.KeyType = keyType; + return client.CacheServices.RegenerateKeys(cloudServiceName, cacheServiceName, param); + } + + public CachingKeysResponse GetAccessKeys(string cacheServiceName) + { + RegenerateKeysParameters param = new RegenerateKeysParameters(); + string cloudServiceName = GetAssociatedCloudServiceName(cacheServiceName); + return client.CacheServices.GetKeys(cloudServiceName, cacheServiceName); + } + + private string GetAssociatedCloudServiceName(string cacheServiceName) + { + CloudServiceListResponse listResponse = client.CloudServices.List(); + foreach (CloudServiceListResponse.CloudService cloudService in listResponse) + { + CloudServiceResource matched = cloudService.Resources.FirstOrDefault( + resource => { + return IsCachingResource(resource.Type) + && cacheServiceName.Equals(resource.Name, StringComparison.OrdinalIgnoreCase); + }); + + if (matched!=null) + { + return cloudService.Name; + } + } + return null; + } + + private CloudServiceResource GetCacheService(string cloudServiceName, string cacheServiceName) + { + CloudServiceGetResponse response = client.CloudServices.Get(cloudServiceName); + CloudServiceResource cacheResource = response.Resources.FirstOrDefault((r) => + { + return IsCachingResource(r.Type) && r.Name.Equals(cacheServiceName, StringComparison.OrdinalIgnoreCase); + }); + return cacheResource; + } + + private bool CloudServiceExists(string cloudServiceName) + { + try + { + CloudServiceGetResponse response = client.CloudServices.Get(cloudServiceName); + } + catch (CloudException ex) + { + if (ex.Response.StatusCode == System.Net.HttpStatusCode.NotFound) + { + return false; + } + throw ex; + } + return true; + } + + private void WriteProgress(string progress) + { + if (ProgressRecorder!=null) + { + ProgressRecorder(progress); + } + } + + /// + /// The following logic was ported from Azure Cache management portal. It is critical to maintain the + /// parity. Do not modify unless you understand the consequence. + /// + private string GetCloudServiceName(string subscriptionId, string region) + { + string hashedSubId = string.Empty; + string extensionPrefix = CacheResourceType; + using (SHA256 sha256 = SHA256Managed.Create()) + { + hashedSubId = Base32NoPaddingEncode(sha256.ComputeHash(UTF8Encoding.UTF8.GetBytes(subscriptionId))); + } + + return string.Format(CultureInfo.InvariantCulture, "{0}{1}-{2}", extensionPrefix, hashedSubId, region.Replace(' ', '-')); + } + + private string Base32NoPaddingEncode(byte[] data) + { + const string Base32StandardAlphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"; + + StringBuilder result = new StringBuilder(Math.Max((int)Math.Ceiling(data.Length * 8 / 5.0), 1)); + + byte[] emptyBuffer = new byte[] { 0, 0, 0, 0, 0, 0, 0, 0 }; + byte[] workingBuffer = new byte[8]; + + // Process input 5 bytes at a time + for (int i = 0; i < data.Length; i += 5) + { + int bytes = Math.Min(data.Length - i, 5); + Array.Copy(emptyBuffer, workingBuffer, emptyBuffer.Length); + Array.Copy(data, i, workingBuffer, workingBuffer.Length - (bytes + 1), bytes); + Array.Reverse(workingBuffer); + ulong val = BitConverter.ToUInt64(workingBuffer, 0); + + for (int bitOffset = ((bytes + 1) * 8) - 5; bitOffset > 3; bitOffset -= 5) + { + result.Append(Base32StandardAlphabet[(int)((val >> bitOffset) & 0x1f)]); + } + } + + return result.ToString(); + } + } +} diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Properties/AssemblyInfo.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..ec020882b1de --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Properties/AssemblyInfo.cs @@ -0,0 +1,41 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft Azure Powershell")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] +[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] +[assembly: CLSCompliant(false)] + +#if SIGN +[assembly: InternalsVisibleTo("Microsoft.Azure.Commands.ManagedCache.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +#else +[assembly: InternalsVisibleTo("Microsoft.Azure.Commands.ManagedCache.Test")] +#endif diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Properties/Resources.Designer.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Properties/Resources.Designer.cs new file mode 100644 index 000000000000..7f0f5cd0af4a --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Properties/Resources.Designer.cs @@ -0,0 +1,342 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.Azure.Commands.ManagedCache.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Azure.Commands.ManagedCache.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Not able to find the cache service just now created. + /// + internal static string CacheServiceMissing { + get { + return ResourceManager.GetString("CacheServiceMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The cache service name either has been taken or invalid. + /// + internal static string CacheServiceNameUnavailable { + get { + return ResourceManager.GetString("CacheServiceNameUnavailable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The cache service '{0}' doesn't exist in current subscription. + /// + internal static string CacheServiceNotExisting { + get { + return ResourceManager.GetString("CacheServiceNotExisting", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cache Service '{0}' was not found. + /// + internal static string CacheServiceNotFound { + get { + return ResourceManager.GetString("CacheServiceNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The cache service '{0}' has been removed. + /// + internal static string CacheServiceRemoved { + get { + return ResourceManager.GetString("CacheServiceRemoved", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing cache service.... + /// + internal static string CacheServiceRemoveStarted { + get { + return ResourceManager.GetString("CacheServiceRemoveStarted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creating cache service.... + /// + internal static string CreatingCacheService { + get { + return ResourceManager.GetString("CreatingCacheService", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creating prerequisites.... + /// + internal static string CreatingPrerequisites { + get { + return ResourceManager.GetString("CreatingPrerequisites", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to It is not possible to remove 'default' named cache.. + /// + internal static string DoNotRemoveDefaultNamedCache { + get { + return ResourceManager.GetString("DoNotRemoveDefaultNamedCache", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Parameter 'WithHighAvailability' is not available for cache with Basic sku.. + /// + internal static string HighAvailabilityNotAvailable { + get { + return ResourceManager.GetString("HighAvailabilityNotAvailable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Intializing parameters.... + /// + internal static string InitializingCacheParameters { + get { + return ResourceManager.GetString("InitializingCacheParameters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid cache memory size. Please specify value between {0} and {1}{2}. + /// + internal static string InvalidCacheMemorySize { + get { + return ResourceManager.GetString("InvalidCacheMemorySize", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The cache service name must contain between 6 and 20 characters. It can contain only lowercase letters and numbers, and must start with a letter.. + /// + internal static string InvalidCacheServiceName { + get { + return ResourceManager.GetString("InvalidCacheServiceName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid Sku. Please specify one from 'Basic', 'Standard', or "Premium".. + /// + internal static string InvalidCacheSku { + get { + return ResourceManager.GetString("InvalidCacheSku", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cache service '{0}' do not have named cache with name '{1}'.. + /// + internal static string NamedCacheDoNotExists { + get { + return ResourceManager.GetString("NamedCacheDoNotExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cache service '{0}' already has named cache with name '{1}'.. + /// + internal static string NamedCacheExists { + get { + return ResourceManager.GetString("NamedCacheExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to It is not possible to create more than 10 named caches.. + /// + internal static string NoAddInAllSku { + get { + return ResourceManager.GetString("NoAddInAllSku", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to It is not possible to create named cache in Basic Sku.. + /// + internal static string NoAddInBasicSku { + get { + return ResourceManager.GetString("NoAddInBasicSku", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Parameter 'WithNotifications' is not available for cache with Basic sku.. + /// + internal static string NotificationsNotAvailable { + get { + return ResourceManager.GetString("NotificationsNotAvailable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to reduce the cache memory? Cache data will be lost.. + /// + internal static string PromptOnCacheMemoryReduce { + get { + return ResourceManager.GetString("PromptOnCacheMemoryReduce", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to reduce the cache offering? All cache data will be lost.. + /// + internal static string PromptOnCachePlanChange { + get { + return ResourceManager.GetString("PromptOnCachePlanChange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing named cache will cause data loss. Do you still want to remove it?. + /// + internal static string RemoveNamedCacheWarning { + get { + return ResourceManager.GetString("RemoveNamedCacheWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing cache service. + /// + internal static string RemoveServiceMessage { + get { + return ResourceManager.GetString("RemoveServiceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the cache service "{0}"?. + /// + internal static string RemoveServiceWarning { + get { + return ResourceManager.GetString("RemoveServiceWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing named cache…. + /// + internal static string RemovingNamedCache { + get { + return ResourceManager.GetString("RemovingNamedCache", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Time out to wait for cache service ready. + /// + internal static string TimeoutWaitForCacheServiceReady { + get { + return ResourceManager.GetString("TimeoutWaitForCacheServiceReady", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Updating named cache will cause data loss. Do you still want to update it?. + /// + internal static string UpdateNamedCacheWarning { + get { + return ResourceManager.GetString("UpdateNamedCacheWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Updating cache service.... + /// + internal static string UpdatingCacheService { + get { + return ResourceManager.GetString("UpdatingCacheService", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Updating named cache…. + /// + internal static string UpdatingNamedCache { + get { + return ResourceManager.GetString("UpdatingNamedCache", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Verify cache service name.... + /// + internal static string VerifyingCacheServiceName { + get { + return ResourceManager.GetString("VerifyingCacheServiceName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Waiting for cache service to be in ready state.... + /// + internal static string WaitForCacheServiceReady { + get { + return ResourceManager.GetString("WaitForCacheServiceReady", resourceCulture); + } + } + } +} diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Properties/Resources.resx b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Properties/Resources.resx new file mode 100644 index 000000000000..029a7f9cecf3 --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Properties/Resources.resx @@ -0,0 +1,213 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Not able to find the cache service just now created + + + The cache service name either has been taken or invalid + + + The cache service '{0}' doesn't exist in current subscription + + + Cache Service '{0}' was not found + + + The cache service '{0}' has been removed + + + Removing cache service... + + + Creating cache service... + + + Creating prerequisites... + + + Intializing parameters... + + + Invalid cache memory size. Please specify value between {0} and {1}{2} + + + The cache service name must contain between 6 and 20 characters. It can contain only lowercase letters and numbers, and must start with a letter. + + + Invalid Sku. Please specify one from 'Basic', 'Standard', or "Premium". + + + Time out to wait for cache service ready + + + Verify cache service name... + + + Waiting for cache service to be in ready state... + + + Removing cache service + + + Are you sure you want to remove the cache service "{0}"? + + + Updating cache service... + + + Are you sure you want to reduce the cache memory? Cache data will be lost. + + + Are you sure you want to reduce the cache offering? All cache data will be lost. + + + Cache service '{0}' do not have named cache with name '{1}'. + + + Cache service '{0}' already has named cache with name '{1}'. + + + It is not possible to create more than 10 named caches. + + + It is not possible to create named cache in Basic Sku. + + + Parameter 'WithHighAvailability' is not available for cache with Basic sku. + + + Parameter 'WithNotifications' is not available for cache with Basic sku. + + + Removing named cache will cause data loss. Do you still want to remove it? + + + Removing named cache… + + + Updating named cache will cause data loss. Do you still want to update it? + + + Updating named cache… + + + It is not possible to remove 'default' named cache. + + \ No newline at end of file diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/GetAzureManagedCache.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/GetAzureManagedCache.cs new file mode 100644 index 000000000000..b2830e35b38e --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/GetAzureManagedCache.cs @@ -0,0 +1,39 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.ManagedCache +{ + using System; + using System.Collections.Generic; + using System.Management.Automation; + using Microsoft.Azure.Commands.ManagedCache.Models; + + [Cmdlet(VerbsCommon.Get, "AzureManagedCache"), OutputType(typeof(List))] + public class GetAzureManagedCache : ManagedCacheCmdletBase + { + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public string Name { get; set;} + + public override void ExecuteCmdlet() + { + List cacheServices = CacheClient.GetCacheServices(Name); + if (!string.IsNullOrEmpty(Name) && cacheServices.Count == 0) + { + throw new ArgumentException(string.Format(Properties.Resources.CacheServiceNotFound, Name)); + } + WriteObject(cacheServices); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/GetAzureManagedCacheAccessKey.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/GetAzureManagedCacheAccessKey.cs new file mode 100644 index 000000000000..f856bc1694c7 --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/GetAzureManagedCacheAccessKey.cs @@ -0,0 +1,34 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.ManagedCache +{ + using System.Management.Automation; + using Microsoft.Azure.Commands.ManagedCache.Models; + using Microsoft.Azure.Management.ManagedCache.Models; + + [Cmdlet(VerbsCommon.Get, "AzureManagedCacheAccessKey"), OutputType(typeof(CacheAccessKeys))] + public class GetAzureManagedCacheAccessKey : ManagedCacheCmdletBase + { + [Parameter(Position = 0, Mandatory=true, ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public string Name {get; set;} + + public override void ExecuteCmdlet() + { + CachingKeysResponse response = CacheClient.GetAccessKeys(Name); + WriteObject(new CacheAccessKeys(Name, response)); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/GetAzureManagedCacheLocation.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/GetAzureManagedCacheLocation.cs new file mode 100644 index 000000000000..ab76be983224 --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/GetAzureManagedCacheLocation.cs @@ -0,0 +1,31 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.ManagedCache +{ + using Microsoft.Azure.Commands.ManagedCache.Models; + using System; + using System.Collections.Generic; + using System.Management.Automation; + + [Cmdlet(VerbsCommon.Get, "AzureManagedCacheLocation"), OutputType(typeof(List))] + public class AzureManagedCacheLocation : ManagedCacheCmdletBase + { + public override void ExecuteCmdlet() + { + List locations = CacheClient.GetLocations(); + WriteObject(locations); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/GetAzureManagedCacheNamedCache.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/GetAzureManagedCacheNamedCache.cs new file mode 100644 index 000000000000..59e34f9fcdb5 --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/GetAzureManagedCacheNamedCache.cs @@ -0,0 +1,38 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.ManagedCache +{ + using System.Management.Automation; + using Microsoft.Azure.Commands.ManagedCache.Models; + using Microsoft.Azure.Management.ManagedCache.Models; + + [Cmdlet(VerbsCommon.Get, "AzureManagedCacheNamedCache"), OutputType(typeof(PSCacheServiceWithNamedCaches))] + public class GetAzureManagedCacheNamedCache : ManagedCacheCmdletBase + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Mandatory = false)] + public string NamedCache { get; set; } + + public override void ExecuteCmdlet() + { + string cacheServiceName = CacheClient.NormalizeCacheServiceName(Name); + CacheClient.ProgressRecorder = (p) => { WriteVerbose(p); }; + WriteObject(new PSCacheServiceWithNamedCaches(CacheClient.GetNamedCache(cacheServiceName, NamedCache))); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/NewAzureManagedCache.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/NewAzureManagedCache.cs new file mode 100644 index 000000000000..1f52d75504de --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/NewAzureManagedCache.cs @@ -0,0 +1,61 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.ManagedCache +{ + using System.Management.Automation; + using Microsoft.Azure.Commands.ManagedCache.Models; + using Microsoft.Azure.Management.ManagedCache.Models; + + [Cmdlet(VerbsCommon.New, "AzureManagedCache"), OutputType(typeof(PSCacheService))] + public class NewAzureManagedCache : ManagedCacheCmdletBase, IDynamicParameters + { + private string cacheServiceName; + private MemoryDynamicParameterSet memoryDynamicParameterSet = new MemoryDynamicParameterSet(); + + [Parameter(Position = 0, Mandatory=true )] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Position = 1, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Location { get; set;} + + [Parameter] + public CacheServiceSkuType Sku { get; set; } + + public override void ExecuteCmdlet() + { + cacheServiceName = CacheClient.NormalizeCacheServiceName(Name); + + CacheClient.ProgressRecorder = (p) => { WriteVerbose(p); }; + + string memory = memoryDynamicParameterSet.GetMemoryValue(Sku); + + PSCacheService cacheService = new PSCacheService(CacheClient.CreateCacheService( + CurrentContext.Subscription.Id.ToString(), + cacheServiceName, + Location, + Sku, + memory)); + + WriteObject(cacheService); + } + + public object GetDynamicParameters() + { + return memoryDynamicParameterSet.GetDynamicParameters(Sku); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/NewAzureManagedCacheAccessKey.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/NewAzureManagedCacheAccessKey.cs new file mode 100644 index 000000000000..117cd5ecaeb0 --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/NewAzureManagedCacheAccessKey.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.ManagedCache +{ + using System.Management.Automation; + using Microsoft.Azure.Commands.ManagedCache.Models; + using Microsoft.Azure.Management.ManagedCache.Models; + + [Cmdlet(VerbsCommon.New, "AzureManagedCacheAccessKey"), OutputType(typeof(CacheAccessKeys))] + public class NewAzureManagedCacheAccessKey : ManagedCacheCmdletBase + { + private const string PrimaryKeyType = "Primary"; + private const string SecondaryKeyType = "Secondary"; + + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName=true)] + [ValidateNotNullOrEmpty] + public string Name { get; set;} + + [Parameter(Position = 1)] + [ValidateSet(PrimaryKeyType, SecondaryKeyType, IgnoreCase = true)] + public string KeyType { get; set; } + + public override void ExecuteCmdlet() + { + if (string.IsNullOrEmpty(KeyType)) + { + KeyType = PrimaryKeyType; + } + CachingKeysResponse response = CacheClient.RegenerateAccessKeys(Name, KeyType); + WriteObject(new CacheAccessKeys(Name, response)); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/NewAzureManagedCacheNamedCache.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/NewAzureManagedCacheNamedCache.cs new file mode 100644 index 000000000000..a6feee4e6e85 --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/NewAzureManagedCacheNamedCache.cs @@ -0,0 +1,69 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.ManagedCache +{ + using System.Management.Automation; + using Microsoft.Azure.Commands.ManagedCache.Models; + using Microsoft.Azure.Management.ManagedCache.Models; + + [Cmdlet(VerbsCommon.New, "AzureManagedCacheNamedCache"), OutputType(typeof(PSCacheServiceWithNamedCaches))] + public class NewAzureManagedCacheNamedCache : ManagedCacheCmdletBase + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string NamedCache { get; set; } + + [Parameter(Mandatory = false)] + [ValidateSet("Absolute", "Sliding", "Never", IgnoreCase = false)] + public string ExpiryPolicy { get; set; } + + [Parameter(Mandatory = false)] + public int? ExpiryTime { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter WithNotifications { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter WithHighAvailability { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter WithoutEviction { get; set; } + + private string _DefaultExpiryPolicy = "Absolute"; + private int _DefaultExpiryTime = 10; + + public override void ExecuteCmdlet() + { + if (string.IsNullOrEmpty(ExpiryPolicy)) + { + ExpiryPolicy = _DefaultExpiryPolicy; + } + + if (ExpiryTime == null) + { + ExpiryTime = _DefaultExpiryTime; + } + + string cacheServiceName = CacheClient.NormalizeCacheServiceName(Name); + CacheClient.ProgressRecorder = (p) => { WriteVerbose(p); }; + WriteObject(new PSCacheServiceWithNamedCaches(CacheClient.AddNamedCache(cacheServiceName, NamedCache, ExpiryPolicy, (int)ExpiryTime, + WithoutEviction.IsPresent, WithNotifications.IsPresent, WithHighAvailability.IsPresent))); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/RemoveAzureManagedCache.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/RemoveAzureManagedCache.cs new file mode 100644 index 000000000000..5ea13e1f2b9c --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/RemoveAzureManagedCache.cs @@ -0,0 +1,51 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.ManagedCache +{ + using System.Management.Automation; + + [Cmdlet(VerbsCommon.Remove, "AzureManagedCache"), OutputType(typeof(bool))] + public class RemoveAzureManagedCache : ManagedCacheCmdletBase + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public string Name { get; set;} + + [Parameter] + public SwitchParameter PassThru { get; set; } + + [Parameter] + public SwitchParameter Force { get; set; } + + public override void ExecuteCmdlet() + { + ConfirmAction( + Force.IsPresent, + string.Format(Properties.Resources.RemoveServiceWarning, Name), + Properties.Resources.RemoveServiceMessage, + Name, + () => + { + WriteVerbose(Properties.Resources.CacheServiceRemoveStarted); + CacheClient.DeleteCacheService(Name); + WriteVerbose(string.Format(Properties.Resources.CacheServiceRemoved, Name)); + if (PassThru) + { + WriteObject(true); + } + }); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/RemoveAzureManagedCacheNamedCache.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/RemoveAzureManagedCacheNamedCache.cs new file mode 100644 index 000000000000..d32482d8edf3 --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/RemoveAzureManagedCacheNamedCache.cs @@ -0,0 +1,49 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.ManagedCache +{ + using System.Management.Automation; + using Microsoft.Azure.Commands.ManagedCache.Models; + using Microsoft.Azure.Management.ManagedCache.Models; + + [Cmdlet(VerbsCommon.Remove, "AzureManagedCacheNamedCache"), OutputType(typeof(bool))] + public class RemoveAzureManagedCacheNamedCache : ManagedCacheCmdletBase + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string NamedCache { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter Force { get; set; } + + [Parameter] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + string cacheServiceName = CacheClient.NormalizeCacheServiceName(Name); + CacheClient.ProgressRecorder = (p) => { WriteVerbose(p); }; + CacheClient.RemoveNamedCache(cacheServiceName, NamedCache, ConfirmAction, Force.IsPresent); + if (PassThru) + { + WriteObject(true); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/SetAzureManagedCache.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/SetAzureManagedCache.cs new file mode 100644 index 000000000000..0844cf21e45e --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/SetAzureManagedCache.cs @@ -0,0 +1,53 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.ManagedCache +{ + using System.Management.Automation; + using Microsoft.Azure.Commands.ManagedCache.Models; + using Microsoft.Azure.Management.ManagedCache.Models; + + /// + /// Retrieves a list of Microsoft Azure SQL Database servers in the selected subscription. + /// + [Cmdlet(VerbsCommon.Set, "AzureManagedCache"), OutputType(typeof(PSCacheService))] + public class SetAzureManagedCache : ManagedCacheCmdletBase, IDynamicParameters + { + private MemoryDynamicParameterSet memoryDynamicParameterSet = new MemoryDynamicParameterSet(); + + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter] + public CacheServiceSkuType Sku { get; set; } + + [Parameter] + public SwitchParameter Force { get; set; } + + public override void ExecuteCmdlet() + { + CacheClient.ProgressRecorder = (message) => { WriteVerbose(message); }; + string memory = memoryDynamicParameterSet.GetMemoryValue(Sku); + PSCacheService cacheService = new PSCacheService( + CacheClient.UpdateCacheService(Name, Sku, memory, ConfirmAction, Force.IsPresent)); + WriteObject(cacheService); + } + + public object GetDynamicParameters() + { + return memoryDynamicParameterSet.GetDynamicParameters(Sku); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/SetAzureManagedCacheNamedCache.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/SetAzureManagedCacheNamedCache.cs new file mode 100644 index 000000000000..ae02984e72cd --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/SetAzureManagedCacheNamedCache.cs @@ -0,0 +1,72 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.ManagedCache +{ + using System.Management.Automation; + using Microsoft.Azure.Commands.ManagedCache.Models; + using Microsoft.Azure.Management.ManagedCache.Models; + + [Cmdlet(VerbsCommon.Set, "AzureManagedCacheNamedCache"), OutputType(typeof(PSCacheServiceWithNamedCaches))] + public class SetAzureManagedCacheNamedCache : ManagedCacheCmdletBase + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string NamedCache { get; set; } + + [Parameter(Mandatory = false)] + [ValidateSet("Absolute", "Sliding", "Never", IgnoreCase = false)] + public string ExpiryPolicy { get; set; } + + [Parameter(Mandatory = false)] + public int? ExpiryTime { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter WithNotifications { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter WithHighAvailability { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter WithoutEviction { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter Force { get; set; } + + private string _DefaultExpiryPolicy = "Absolute"; + private int _DefaultExpiryTime = 10; + + public override void ExecuteCmdlet() + { + if (string.IsNullOrEmpty(ExpiryPolicy)) + { + ExpiryPolicy = _DefaultExpiryPolicy; + } + + if (ExpiryTime == null) + { + ExpiryTime = _DefaultExpiryTime; + } + + string cacheServiceName = CacheClient.NormalizeCacheServiceName(Name); + CacheClient.ProgressRecorder = (p) => { WriteVerbose(p); }; + WriteObject(new PSCacheServiceWithNamedCaches(CacheClient.SetNamedCache(cacheServiceName, NamedCache, ExpiryPolicy, (int) ExpiryTime, + WithoutEviction.IsPresent, WithNotifications.IsPresent, WithHighAvailability.IsPresent, ConfirmAction, Force.IsPresent))); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/lib/ManagedCacheClient.Customization.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/lib/ManagedCacheClient.Customization.cs new file mode 100644 index 000000000000..29c3bfc34a87 --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/lib/ManagedCacheClient.Customization.cs @@ -0,0 +1,70 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; +using System.Collections.Generic; +using System.Net.Http; +using Microsoft.Azure.Management.ManagedCache; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Common; +using Microsoft.WindowsAzure.Common.Internals; + +namespace Microsoft.Azure +{ + public static class ManagedCacheDiscoveryExtensions + { + public static ManagedCacheClient CreateManagedCacheManagementClient(this CloudClients clients, SubscriptionCloudCredentials credentials) + { + return new ManagedCacheClient(credentials); + } + + public static ManagedCacheClient CreateManagedCacheManagementClient(this CloudClients clients, SubscriptionCloudCredentials credentials, Uri baseUri) + { + return new ManagedCacheClient(credentials, baseUri); + } + + public static ManagedCacheClient CreateManagedCacheClient(this CloudClients clients) + { + return ConfigurationHelper.CreateFromSettings(ManagedCacheClient.Create); + } + } +} + +namespace Microsoft.Azure.Management.ManagedCache +{ + public partial class ManagedCacheClient + { + public static ManagedCacheClient Create(IDictionary settings) + { + if (settings == null) + { + throw new ArgumentNullException("settings"); + } + + SubscriptionCloudCredentials credentials = ConfigurationHelper.GetCredentials(settings); + + Uri baseUri = ConfigurationHelper.GetUri(settings, "BaseUri", false); + + return baseUri != null ? + new ManagedCacheClient(credentials, baseUri) : + new ManagedCacheClient(credentials); + } + + public override ManagedCacheClient WithHandler(DelegatingHandler handler) + { + return (ManagedCacheClient)WithHandler(new ManagedCacheClient(), handler); + } + } +} diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/lib/ManagedCacheClient.cs b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/lib/ManagedCacheClient.cs new file mode 100644 index 000000000000..9112b359d02d --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/lib/ManagedCacheClient.cs @@ -0,0 +1,4850 @@ +// +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// Warning: This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if the +// code is regenerated. + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Xml.Linq; +using Microsoft.Azure.Management.ManagedCache; +using Microsoft.Azure.Management.ManagedCache.Models; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Common; +using Microsoft.WindowsAzure.Common.Internals; + +namespace Microsoft.Azure.Management.ManagedCache.Models +{ + public partial class CacheServiceCreateParameters + { + private string _eTag; + + /// + /// Optional. + /// + public string ETag + { + get { return this._eTag; } + set { this._eTag = value; } + } + + private IntrinsicSettings _intrinsicSettingsSection; + + /// + /// Optional. + /// + public IntrinsicSettings IntrinsicSettingsSection + { + get { return this._intrinsicSettingsSection; } + set { this._intrinsicSettingsSection = value; } + } + + private string _name; + + /// + /// Optional. + /// + public string Name + { + get { return this._name; } + set { this._name = value; } + } + + private string _resourceProviderNamespace; + + /// + /// Optional. + /// + public string ResourceProviderNamespace + { + get { return this._resourceProviderNamespace; } + set { this._resourceProviderNamespace = value; } + } + + private string _schemaVersion; + + /// + /// Optional. + /// + public string SchemaVersion + { + get { return this._schemaVersion; } + set { this._schemaVersion = value; } + } + + private IntrinsicSettings _settings; + + /// + /// Optional. + /// + public IntrinsicSettings Settings + { + get { return this._settings; } + set { this._settings = value; } + } + + private string _type; + + /// + /// Optional. + /// + public string Type + { + get { return this._type; } + set { this._type = value; } + } + + /// + /// Initializes a new instance of the CacheServiceCreateParameters + /// class. + /// + public CacheServiceCreateParameters() + { + } + } + + public enum CacheServiceSkuType + { + Basic = 0, + + Standard = 1, + + Premium = 2, + } + + /// + /// A standard service response including an HTTP status code and request + /// ID. + /// + public partial class CachingKeysResponse : OperationResponse + { + private string _primary; + + /// + /// Optional. + /// + public string Primary + { + get { return this._primary; } + set { this._primary = value; } + } + + private string _secondary; + + /// + /// Optional. + /// + public string Secondary + { + get { return this._secondary; } + set { this._secondary = value; } + } + + /// + /// Initializes a new instance of the CachingKeysResponse class. + /// + public CachingKeysResponse() + { + } + } + + /// + /// A standard service response including an HTTP status code and request + /// ID. + /// + public partial class CheckCacheNameAvailabilityResponse : OperationResponse + { + private bool _available; + + /// + /// Optional. + /// + public bool Available + { + get { return this._available; } + set { this._available = value; } + } + + /// + /// Initializes a new instance of the + /// CheckCacheNameAvailabilityResponse class. + /// + public CheckCacheNameAvailabilityResponse() + { + } + } + + public partial class CloudServiceCreateParameters + { + private string _description; + + /// + /// Required. Description for the cloud service. + /// + public string Description + { + get { return this._description; } + set { this._description = value; } + } + + private string _email; + + /// + /// Optional. Optional e-mail address to associate with the service. + /// + public string Email + { + get { return this._email; } + set { this._email = value; } + } + + private string _geoRegion; + + /// + /// Required. The region for the cloud service. This field cannot be + /// updated after the cloud service is created. + /// + public string GeoRegion + { + get { return this._geoRegion; } + set { this._geoRegion = value; } + } + + private string _label; + + /// + /// Required. Label for the cloud service. + /// + public string Label + { + get { return this._label; } + set { this._label = value; } + } + + /// + /// Initializes a new instance of the CloudServiceCreateParameters + /// class. + /// + public CloudServiceCreateParameters() + { + } + + /// + /// Initializes a new instance of the CloudServiceCreateParameters + /// class with required arguments. + /// + public CloudServiceCreateParameters(string label, string description, string geoRegion) + : this() + { + if (label == null) + { + throw new ArgumentNullException("label"); + } + if (description == null) + { + throw new ArgumentNullException("description"); + } + if (geoRegion == null) + { + throw new ArgumentNullException("geoRegion"); + } + this.Label = label; + this.Description = description; + this.GeoRegion = geoRegion; + } + } + + /// + /// Information about a retrieved Cloud Service. + /// + public partial class CloudServiceGetResponse : OperationResponse + { + private string _geoLocation; + + /// + /// Optional. The location associated with the cloud service. + /// + public string GeoLocation + { + get { return this._geoLocation; } + set { this._geoLocation = value; } + } + + private IList _resources; + + /// + /// Optional. A collection of resources. + /// + public IList Resources + { + get { return this._resources; } + set { this._resources = value; } + } + + /// + /// Initializes a new instance of the CloudServiceGetResponse class. + /// + public CloudServiceGetResponse() + { + this.Resources = new List(); + } + } + + /// + /// The response structure for the Cloud Service List operation. + /// + public partial class CloudServiceListResponse : OperationResponse, IEnumerable + { + private IList _cloudServices; + + /// + /// Optional. The list of cloud service locations for this subscription. + /// + public IList CloudServices + { + get { return this._cloudServices; } + set { this._cloudServices = value; } + } + + /// + /// Initializes a new instance of the CloudServiceListResponse class. + /// + public CloudServiceListResponse() + { + this.CloudServices = new List(); + } + + /// + /// Gets the sequence of CloudServices. + /// + public IEnumerator GetEnumerator() + { + return this.CloudServices.GetEnumerator(); + } + + /// + /// Gets the sequence of CloudServices. + /// + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() + { + return this.GetEnumerator(); + } + + /// + /// Defines a cloud service-supporting region in which a item is + /// located. + /// + public partial class CloudService + { + private string _description; + + /// + /// Optional. The description of the cloud service region. + /// + public string Description + { + get { return this._description; } + set { this._description = value; } + } + + private string _geoRegion; + + /// + /// Optional. The geographical region in which this cloud service + /// can run. + /// + public string GeoRegion + { + get { return this._geoRegion; } + set { this._geoRegion = value; } + } + + private string _label; + + /// + /// Optional. The label of the cloud service region. + /// + public string Label + { + get { return this._label; } + set { this._label = value; } + } + + private string _name; + + /// + /// Optional. The name of the cloud service region. + /// + public string Name + { + get { return this._name; } + set { this._name = value; } + } + + private IList _resources; + + /// + /// Optional. A list of existing resources installed into a cloud + /// service region. + /// + public IList Resources + { + get { return this._resources; } + set { this._resources = value; } + } + + /// + /// Initializes a new instance of the CloudService class. + /// + public CloudService() + { + this.Resources = new List(); + } + } + } + + /// + /// The status of the asynchronous request. + /// + public enum CloudServiceOperationStatus + { + /// + /// The asynchronous request is in progress. + /// + InProgress = 0, + + /// + /// The asynchronous request succeeded. + /// + Succeeded = 1, + + /// + /// The asynchronous request failed. + /// + Failed = 2, + } + + /// + /// The response body contains the status of the specified asynchronous + /// operation, indicating whether it has succeeded, is inprogress, or has + /// failed. Note that this status is distinct from the HTTP status code + /// returned for the Get Operation Status operation itself. If the + /// asynchronous operation succeeded, the response body includes the HTTP + /// status code for the successful request. If the asynchronous operation + /// failed, the response body includes the HTTP status code for the failed + /// request, and also includes error information regarding the failure. + /// + public partial class CloudServiceOperationStatusResponse : OperationResponse + { + private CloudServiceOperationStatusResponse.ErrorDetails _error; + + /// + /// Optional. If the asynchronous operation failed, the response body + /// includes the HTTP status code for the failed request, and also + /// includes error information regarding the failure. + /// + public CloudServiceOperationStatusResponse.ErrorDetails Error + { + get { return this._error; } + set { this._error = value; } + } + + private HttpStatusCode _httpStatusCode; + + /// + /// Optional. The HTTP status code for the asynchronous request. + /// + public HttpStatusCode HttpStatusCode + { + get { return this._httpStatusCode; } + set { this._httpStatusCode = value; } + } + + private string _id; + + /// + /// Optional. The request ID of the asynchronous request. This value is + /// returned in the x-ms-request-id response header of the + /// asynchronous request. + /// + public string Id + { + get { return this._id; } + set { this._id = value; } + } + + private CloudServiceOperationStatus _status; + + /// + /// Optional. The status of the asynchronous request. + /// + public CloudServiceOperationStatus Status + { + get { return this._status; } + set { this._status = value; } + } + + /// + /// Initializes a new instance of the + /// CloudServiceOperationStatusResponse class. + /// + public CloudServiceOperationStatusResponse() + { + } + + /// + /// If the asynchronous operation failed, the response body includes + /// the HTTP status code for the failed request, and also includes + /// error information regarding the failure. + /// + public partial class ErrorDetails + { + private string _code; + + /// + /// Optional. The management service error code returned if the + /// asynchronous request failed. + /// + public string Code + { + get { return this._code; } + set { this._code = value; } + } + + private string _message; + + /// + /// Optional. The management service error message returned if the + /// asynchronous request failed. + /// + public string Message + { + get { return this._message; } + set { this._message = value; } + } + + /// + /// Initializes a new instance of the ErrorDetails class. + /// + public ErrorDetails() + { + } + } + } + + public partial class CloudServiceResource + { + private string _eTag; + + /// + /// Optional. The ETag for this resource. + /// + public string ETag + { + get { return this._eTag; } + set { this._eTag = value; } + } + + private IntrinsicSettings _intrinsicSettingsSection; + + /// + /// Optional. + /// + public IntrinsicSettings IntrinsicSettingsSection + { + get { return this._intrinsicSettingsSection; } + set { this._intrinsicSettingsSection = value; } + } + + private string _name; + + /// + /// Optional. The user-input name of this item. + /// + public string Name + { + get { return this._name; } + set { this._name = value; } + } + + private string _namespace; + + /// + /// Optional. The namespace in which this item resides. + /// + public string Namespace + { + get { return this._namespace; } + set { this._namespace = value; } + } + + private IDictionary _outputItems; + + /// + /// Optional. Output items associated with an individual resource. + /// + public IDictionary OutputItems + { + get { return this._outputItems; } + set { this._outputItems = value; } + } + + private string _plan; + + /// + /// Optional. The plan for this item as selected by the user. + /// + public string Plan + { + get { return this._plan; } + set { this._plan = value; } + } + + private string _schemaVersion; + + /// + /// Optional. The schema version for this resource. + /// + public string SchemaVersion + { + get { return this._schemaVersion; } + set { this._schemaVersion = value; } + } + + private string _state; + + /// + /// Optional. The state of this resource. + /// + public string State + { + get { return this._state; } + set { this._state = value; } + } + + private string _subState; + + /// + /// Optional. The state of this resource. + /// + public string SubState + { + get { return this._subState; } + set { this._subState = value; } + } + + private string _type; + + /// + /// Optional. The type of store item. + /// + public string Type + { + get { return this._type; } + set { this._type = value; } + } + + private IList _usageLimits; + + /// + /// Optional. Usage meters associated with an individual resource. + /// + public IList UsageLimits + { + get { return this._usageLimits; } + set { this._usageLimits = value; } + } + + /// + /// Initializes a new instance of the CloudServiceResource class. + /// + public CloudServiceResource() + { + this.OutputItems = new Dictionary(); + this.UsageLimits = new List(); + } + + /// + /// Describes the current utilization and metering of a resource item. + /// + public partial class UsageLimit + { + private string _amountIncluded; + + /// + /// Optional. Defines the limit of this usage included in this + /// resource's plan. + /// + public string AmountIncluded + { + get { return this._amountIncluded; } + set { this._amountIncluded = value; } + } + + private string _amountUsed; + + /// + /// Optional. The amount of this resource that has already been + /// used. + /// + public string AmountUsed + { + get { return this._amountUsed; } + set { this._amountUsed = value; } + } + + private string _name; + + /// + /// Optional. The name of this usage limit. + /// + public string Name + { + get { return this._name; } + set { this._name = value; } + } + + private string _unit; + + /// + /// Optional. The unit in which this usage limit is measured. + /// + public string Unit + { + get { return this._unit; } + set { this._unit = value; } + } + + /// + /// Initializes a new instance of the UsageLimit class. + /// + public UsageLimit() + { + } + } + } + + public partial class IntrinsicSettings + { + private IntrinsicSettings.CacheServiceInput _cacheServiceInputSection; + + /// + /// Optional. + /// + public IntrinsicSettings.CacheServiceInput CacheServiceInputSection + { + get { return this._cacheServiceInputSection; } + set { this._cacheServiceInputSection = value; } + } + + /// + /// Initializes a new instance of the IntrinsicSettings class. + /// + public IntrinsicSettings() + { + } + + public partial class CacheServiceInput + { + private string _location; + + /// + /// Optional. + /// + public string Location + { + get { return this._location; } + set { this._location = value; } + } + + private IList _namedCaches; + + /// + /// Optional. + /// + public IList NamedCaches + { + get { return this._namedCaches; } + set { this._namedCaches = value; } + } + + private int _objectSizeInBytes; + + /// + /// Optional. + /// + public int ObjectSizeInBytes + { + get { return this._objectSizeInBytes; } + set { this._objectSizeInBytes = value; } + } + + private string _serviceVersion; + + /// + /// Optional. + /// + public string ServiceVersion + { + get { return this._serviceVersion; } + set { this._serviceVersion = value; } + } + + private int _skuCount; + + /// + /// Optional. + /// + public int SkuCount + { + get { return this._skuCount; } + set { this._skuCount = value; } + } + + private CacheServiceSkuType _skuType; + + /// + /// Optional. + /// + public CacheServiceSkuType SkuType + { + get { return this._skuType; } + set { this._skuType = value; } + } + + /// + /// Initializes a new instance of the CacheServiceInput class. + /// + public CacheServiceInput() + { + this.NamedCaches = new List(); + } + + public partial class NamedCache + { + private string _cacheName; + + /// + /// Optional. + /// + public string CacheName + { + get { return this._cacheName; } + set { this._cacheName = value; } + } + + private string _evictionPolicy; + + /// + /// Optional. + /// + public string EvictionPolicy + { + get { return this._evictionPolicy; } + set { this._evictionPolicy = value; } + } + + private IntrinsicSettings.CacheServiceInput.NamedCache.ExpirationSettings _expirationSettingsSection; + + /// + /// Optional. + /// + public IntrinsicSettings.CacheServiceInput.NamedCache.ExpirationSettings ExpirationSettingsSection + { + get { return this._expirationSettingsSection; } + set { this._expirationSettingsSection = value; } + } + + private bool _highAvailabilityEnabled; + + /// + /// Optional. + /// + public bool HighAvailabilityEnabled + { + get { return this._highAvailabilityEnabled; } + set { this._highAvailabilityEnabled = value; } + } + + private bool _notificationsEnabled; + + /// + /// Optional. + /// + public bool NotificationsEnabled + { + get { return this._notificationsEnabled; } + set { this._notificationsEnabled = value; } + } + + /// + /// Initializes a new instance of the NamedCache class. + /// + public NamedCache() + { + } + + public partial class ExpirationSettings + { + private int _timeToLiveInMinutes; + + /// + /// Optional. + /// + public int TimeToLiveInMinutes + { + get { return this._timeToLiveInMinutes; } + set { this._timeToLiveInMinutes = value; } + } + + private string _type; + + /// + /// Optional. + /// + public string Type + { + get { return this._type; } + set { this._type = value; } + } + + /// + /// Initializes a new instance of the ExpirationSettings + /// class. + /// + public ExpirationSettings() + { + } + } + } + } + } + + public partial class RegenerateKeysParameters + { + private string _keyType; + + /// + /// Optional. + /// + public string KeyType + { + get { return this._keyType; } + set { this._keyType = value; } + } + + /// + /// Initializes a new instance of the RegenerateKeysParameters class. + /// + public RegenerateKeysParameters() + { + } + } + + /// + /// A standard service response including an HTTP status code and request + /// ID. + /// + public partial class RegionsResponse : OperationResponse, IEnumerable + { + private IList _regions; + + /// + /// Optional. The list of region with caching service + /// + public IList Regions + { + get { return this._regions; } + set { this._regions = value; } + } + + /// + /// Initializes a new instance of the RegionsResponse class. + /// + public RegionsResponse() + { + this.Regions = new List(); + } + + /// + /// Gets the sequence of Regions. + /// + public IEnumerator GetEnumerator() + { + return this.Regions.GetEnumerator(); + } + + /// + /// Gets the sequence of Regions. + /// + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() + { + return this.GetEnumerator(); + } + + /// + /// Defines a caching service region + /// + public partial class Region + { + private string _location; + + /// + /// Optional. The location of the caching service. + /// + public string Location + { + get { return this._location; } + set { this._location = value; } + } + + /// + /// Initializes a new instance of the Region class. + /// + public Region() + { + } + } + } +} + +namespace Microsoft.Azure.Management.ManagedCache +{ + public partial interface IManagedCacheClient : IDisposable + { + /// + /// The URI used as the base for all Service Management requests. + /// + Uri BaseUri + { + get; set; + } + + /// + /// When you create a Windows Azure subscription, it is uniquely + /// identified by a subscription ID. The subscription ID forms part of + /// the URI for every call that you make to the Service Management + /// API. The Windows Azure Service ManagementAPI use mutual + /// authentication of management certificates over SSL to ensure that + /// a request made to the service is secure. No anonymous requests + /// are allowed. + /// + SubscriptionCloudCredentials Credentials + { + get; set; + } + + /// + /// The Managed Cache API includes operations for managing cache + /// services + /// + ICacheServiceOperations CacheServices + { + get; + } + + ICloudServiceOperations CloudServices + { + get; + } + + /// + /// The Get Operation Status operation returns the status of + /// thespecified operation. After calling an asynchronous operation, + /// you can call Get Operation Status to determine whether the + /// operation has succeeded, failed, or is still in progress. (see + /// http://msdn.microsoft.com/en-us/library/windowsazure/ee460783.aspx + /// for more information) + /// + /// + /// The request ID for the request you wish to track. The request ID is + /// returned in the x-ms-request-id response header for every request. + /// + /// + /// Cancellation token. + /// + /// + /// The response body contains the status of the specified asynchronous + /// operation, indicating whether it has succeeded, is inprogress, or + /// has failed. Note that this status is distinct from the HTTP status + /// code returned for the Get Operation Status operation itself. If + /// the asynchronous operation succeeded, the response body includes + /// the HTTP status code for the successful request. If the + /// asynchronous operation failed, the response body includes the HTTP + /// status code for the failed request, and also includes error + /// information regarding the failure. + /// + Task GetOperationStatusAsync(string requestId, CancellationToken cancellationToken); + } + + public partial class ManagedCacheClient : ServiceClient, IManagedCacheClient + { + private Uri _baseUri; + + /// + /// The URI used as the base for all Service Management requests. + /// + public Uri BaseUri + { + get { return this._baseUri; } + set { this._baseUri = value; } + } + + private SubscriptionCloudCredentials _credentials; + + /// + /// When you create a Windows Azure subscription, it is uniquely + /// identified by a subscription ID. The subscription ID forms part of + /// the URI for every call that you make to the Service Management + /// API. The Windows Azure Service ManagementAPI use mutual + /// authentication of management certificates over SSL to ensure that + /// a request made to the service is secure. No anonymous requests + /// are allowed. + /// + public SubscriptionCloudCredentials Credentials + { + get { return this._credentials; } + set { this._credentials = value; } + } + + private ICacheServiceOperations _cacheServices; + + /// + /// The Managed Cache API includes operations for managing cache + /// services + /// + public virtual ICacheServiceOperations CacheServices + { + get { return this._cacheServices; } + } + + private ICloudServiceOperations _cloudServices; + + public virtual ICloudServiceOperations CloudServices + { + get { return this._cloudServices; } + } + + /// + /// Initializes a new instance of the ManagedCacheClient class. + /// + private ManagedCacheClient() + : base() + { + this._cacheServices = new CacheServiceOperations(this); + this._cloudServices = new CloudServiceOperations(this); + this.HttpClient.Timeout = TimeSpan.FromSeconds(300); + } + + /// + /// Initializes a new instance of the ManagedCacheClient class. + /// + /// + /// Required. When you create a Windows Azure subscription, it is + /// uniquely identified by a subscription ID. The subscription ID + /// forms part of the URI for every call that you make to the Service + /// Management API. The Windows Azure Service ManagementAPI use + /// mutual authentication of management certificates over SSL to + /// ensure that a request made to the service is secure. No anonymous + /// requests are allowed. + /// + /// + /// Required. The URI used as the base for all Service Management + /// requests. + /// + public ManagedCacheClient(SubscriptionCloudCredentials credentials, Uri baseUri) + : this() + { + if (credentials == null) + { + throw new ArgumentNullException("credentials"); + } + if (baseUri == null) + { + throw new ArgumentNullException("baseUri"); + } + this._credentials = credentials; + this._baseUri = baseUri; + + this.Credentials.InitializeServiceClient(this); + } + + /// + /// Initializes a new instance of the ManagedCacheClient class. + /// + /// + /// Required. When you create a Windows Azure subscription, it is + /// uniquely identified by a subscription ID. The subscription ID + /// forms part of the URI for every call that you make to the Service + /// Management API. The Windows Azure Service ManagementAPI use + /// mutual authentication of management certificates over SSL to + /// ensure that a request made to the service is secure. No anonymous + /// requests are allowed. + /// + public ManagedCacheClient(SubscriptionCloudCredentials credentials) + : this() + { + if (credentials == null) + { + throw new ArgumentNullException("credentials"); + } + this._credentials = credentials; + this._baseUri = new Uri("https://management.core.windows.net"); + + this.Credentials.InitializeServiceClient(this); + } + + /// + /// Initializes a new instance of the ManagedCacheClient class. + /// + /// + /// The Http client + /// + private ManagedCacheClient(HttpClient httpClient) + : base(httpClient) + { + this._cacheServices = new CacheServiceOperations(this); + this._cloudServices = new CloudServiceOperations(this); + this.HttpClient.Timeout = TimeSpan.FromSeconds(300); + } + + /// + /// Initializes a new instance of the ManagedCacheClient class. + /// + /// + /// Required. When you create a Windows Azure subscription, it is + /// uniquely identified by a subscription ID. The subscription ID + /// forms part of the URI for every call that you make to the Service + /// Management API. The Windows Azure Service ManagementAPI use + /// mutual authentication of management certificates over SSL to + /// ensure that a request made to the service is secure. No anonymous + /// requests are allowed. + /// + /// + /// Required. The URI used as the base for all Service Management + /// requests. + /// + /// + /// The Http client + /// + public ManagedCacheClient(SubscriptionCloudCredentials credentials, Uri baseUri, HttpClient httpClient) + : this(httpClient) + { + if (credentials == null) + { + throw new ArgumentNullException("credentials"); + } + if (baseUri == null) + { + throw new ArgumentNullException("baseUri"); + } + this._credentials = credentials; + this._baseUri = baseUri; + + this.Credentials.InitializeServiceClient(this); + } + + /// + /// Initializes a new instance of the ManagedCacheClient class. + /// + /// + /// Required. When you create a Windows Azure subscription, it is + /// uniquely identified by a subscription ID. The subscription ID + /// forms part of the URI for every call that you make to the Service + /// Management API. The Windows Azure Service ManagementAPI use + /// mutual authentication of management certificates over SSL to + /// ensure that a request made to the service is secure. No anonymous + /// requests are allowed. + /// + /// + /// The Http client + /// + public ManagedCacheClient(SubscriptionCloudCredentials credentials, HttpClient httpClient) + : this(httpClient) + { + if (credentials == null) + { + throw new ArgumentNullException("credentials"); + } + this._credentials = credentials; + this._baseUri = new Uri("https://management.core.windows.net"); + + this.Credentials.InitializeServiceClient(this); + } + + /// + /// Clones properties from current instance to another + /// ManagedCacheClient instance + /// + /// + /// Instance of ManagedCacheClient to clone to + /// + protected override void Clone(ServiceClient client) + { + base.Clone(client); + + if (client is ManagedCacheClient) + { + ManagedCacheClient clonedClient = ((ManagedCacheClient)client); + + clonedClient._credentials = this._credentials; + clonedClient._baseUri = this._baseUri; + + clonedClient.Credentials.InitializeServiceClient(clonedClient); + } + } + + /// + /// The Get Operation Status operation returns the status of + /// thespecified operation. After calling an asynchronous operation, + /// you can call Get Operation Status to determine whether the + /// operation has succeeded, failed, or is still in progress. (see + /// http://msdn.microsoft.com/en-us/library/windowsazure/ee460783.aspx + /// for more information) + /// + /// + /// Required. The request ID for the request you wish to track. The + /// request ID is returned in the x-ms-request-id response header for + /// every request. + /// + /// + /// Cancellation token. + /// + /// + /// The response body contains the status of the specified asynchronous + /// operation, indicating whether it has succeeded, is inprogress, or + /// has failed. Note that this status is distinct from the HTTP status + /// code returned for the Get Operation Status operation itself. If + /// the asynchronous operation succeeded, the response body includes + /// the HTTP status code for the successful request. If the + /// asynchronous operation failed, the response body includes the HTTP + /// status code for the failed request, and also includes error + /// information regarding the failure. + /// + public async Task GetOperationStatusAsync(string requestId, CancellationToken cancellationToken) + { + // Validate + if (requestId == null) + { + throw new ArgumentNullException("requestId"); + } + + // Tracing + bool shouldTrace = CloudContext.Configuration.Tracing.IsEnabled; + string invocationId = null; + if (shouldTrace) + { + invocationId = Tracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("requestId", requestId); + Tracing.Enter(invocationId, this, "GetOperationStatusAsync", tracingParameters); + } + + // Construct URL + string url = (this.Credentials.SubscriptionId != null ? this.Credentials.SubscriptionId.Trim() : "") + "/operations/" + requestId.Trim(); + string baseUrl = this.BaseUri.AbsoluteUri; + // Trim '/' character from the end of baseUrl and beginning of url. + if (baseUrl[baseUrl.Length - 1] == '/') + { + baseUrl = baseUrl.Substring(0, baseUrl.Length - 1); + } + if (url[0] == '/') + { + url = url.Substring(1); + } + url = baseUrl + "/" + url; + url = url.Replace(" ", "%20"); + + // Create HTTP transport objects + HttpRequestMessage httpRequest = null; + try + { + httpRequest = new HttpRequestMessage(); + httpRequest.Method = HttpMethod.Get; + httpRequest.RequestUri = new Uri(url); + + // Set Headers + httpRequest.Headers.Add("x-ms-version", "2012-08-01"); + + // Set Credentials + cancellationToken.ThrowIfCancellationRequested(); + await this.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); + + // Send Request + HttpResponseMessage httpResponse = null; + try + { + if (shouldTrace) + { + Tracing.SendRequest(invocationId, httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + httpResponse = await this.HttpClient.SendAsync(httpRequest, cancellationToken).ConfigureAwait(false); + if (shouldTrace) + { + Tracing.ReceiveResponse(invocationId, httpResponse); + } + HttpStatusCode statusCode = httpResponse.StatusCode; + if (statusCode != HttpStatusCode.OK) + { + cancellationToken.ThrowIfCancellationRequested(); + CloudException ex = CloudException.Create(httpRequest, null, httpResponse, await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false)); + if (shouldTrace) + { + Tracing.Error(invocationId, ex); + } + throw ex; + } + + // Create Result + CloudServiceOperationStatusResponse result = null; + // Deserialize Response + cancellationToken.ThrowIfCancellationRequested(); + string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + result = new CloudServiceOperationStatusResponse(); + XDocument responseDoc = XDocument.Parse(responseContent); + + XElement operationElement = responseDoc.Element(XName.Get("Operation", "http://schemas.microsoft.com/windowsazure")); + if (operationElement != null) + { + XElement idElement = operationElement.Element(XName.Get("ID", "http://schemas.microsoft.com/windowsazure")); + if (idElement != null) + { + string idInstance = idElement.Value; + result.Id = idInstance; + } + + XElement statusElement = operationElement.Element(XName.Get("Status", "http://schemas.microsoft.com/windowsazure")); + if (statusElement != null) + { + CloudServiceOperationStatus statusInstance = ((CloudServiceOperationStatus)Enum.Parse(typeof(CloudServiceOperationStatus), statusElement.Value, true)); + result.Status = statusInstance; + } + + XElement httpStatusCodeElement = operationElement.Element(XName.Get("HttpStatusCode", "http://schemas.microsoft.com/windowsazure")); + if (httpStatusCodeElement != null) + { + HttpStatusCode httpStatusCodeInstance = ((HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), httpStatusCodeElement.Value, true)); + result.HttpStatusCode = httpStatusCodeInstance; + } + + XElement errorElement = operationElement.Element(XName.Get("Error", "http://schemas.microsoft.com/windowsazure")); + if (errorElement != null) + { + CloudServiceOperationStatusResponse.ErrorDetails errorInstance = new CloudServiceOperationStatusResponse.ErrorDetails(); + result.Error = errorInstance; + + XElement codeElement = errorElement.Element(XName.Get("Code", "http://schemas.microsoft.com/windowsazure")); + if (codeElement != null) + { + string codeInstance = codeElement.Value; + errorInstance.Code = codeInstance; + } + + XElement messageElement = errorElement.Element(XName.Get("Message", "http://schemas.microsoft.com/windowsazure")); + if (messageElement != null) + { + string messageInstance = messageElement.Value; + errorInstance.Message = messageInstance; + } + } + } + + result.StatusCode = statusCode; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + + if (shouldTrace) + { + Tracing.Exit(invocationId, result); + } + return result; + } + finally + { + if (httpResponse != null) + { + httpResponse.Dispose(); + } + } + } + finally + { + if (httpRequest != null) + { + httpRequest.Dispose(); + } + } + } + } + + /// + /// The Managed Cache API includes operations for managing cache services + /// + public partial interface ICacheServiceOperations + { + /// + /// Creates a new Cache Service in specified subscription and cloud + /// service. + /// + /// + /// The name of the cloud service. + /// + /// + /// A name of the cache service. The name can be up to 20 characters + /// in length with minimum 6 characters and must be all lower cases. + /// + /// + /// Parameter supplied to create a cache service + /// + /// + /// Cancellation token. + /// + /// + /// A standard service response including an HTTP status code and + /// request ID. + /// + Task BeginCreatingCacheServiceAsync(string cloudServiceName, string cacheServiceName, CacheServiceCreateParameters parameters, CancellationToken cancellationToken); + + /// + /// The begin of deleting Cache Service.This operation is an + /// asynchronous operation. To determine whether service has finished + /// processing the request, call Get Operation. (see + /// http://msdn.microsoft.com/en-us/library/hh758254.aspx for more + /// information) + /// + /// + /// The name of the cloud service. + /// + /// + /// A name of the cache service. + /// + /// + /// Cancellation token. + /// + /// + /// A standard service response including an HTTP status code and + /// request ID. + /// + Task BeginDeletingAsync(string cloudServiceName, string cacheServiceName, CancellationToken cancellationToken); + + /// + /// Get access keys of Cache Service + /// + /// + /// The cloud service name. + /// + /// + /// The cache service name. + /// + /// + /// Cancellation token. + /// + /// + /// A standard service response including an HTTP status code and + /// request ID. + /// + Task CheckNameAvailabilityAsync(string cloudServiceName, string cacheServiceName, CancellationToken cancellationToken); + + /// + /// Creates a new Cache Service in specified subscription and cloud + /// service. + /// + /// + /// The name of the cloud service. + /// + /// + /// The name of the cache service. The name can be up to 20 characters + /// in length with minimum 6 characters and must be all lower cases. + /// + /// + /// Parameter supplied to create a cache service + /// + /// + /// Cancellation token. + /// + /// + /// The response body contains the status of the specified asynchronous + /// operation, indicating whether it has succeeded, is inprogress, or + /// has failed. Note that this status is distinct from the HTTP status + /// code returned for the Get Operation Status operation itself. If + /// the asynchronous operation succeeded, the response body includes + /// the HTTP status code for the successful request. If the + /// asynchronous operation failed, the response body includes the HTTP + /// status code for the failed request, and also includes error + /// information regarding the failure. + /// + Task CreateCacheServiceAsync(string cloudServiceName, string cacheServiceName, CacheServiceCreateParameters parameters, CancellationToken cancellationToken); + + /// + /// Delete Cache Service in specified subscription and cloud service. + /// (see http://msdn.microsoft.com/en-us/library/hh758254.aspx for + /// more information) + /// + /// + /// The name of the cloud service. + /// + /// + /// A name of the cache service. + /// + /// + /// Cancellation token. + /// + /// + /// The response body contains the status of the specified asynchronous + /// operation, indicating whether it has succeeded, is inprogress, or + /// has failed. Note that this status is distinct from the HTTP status + /// code returned for the Get Operation Status operation itself. If + /// the asynchronous operation succeeded, the response body includes + /// the HTTP status code for the successful request. If the + /// asynchronous operation failed, the response body includes the HTTP + /// status code for the failed request, and also includes error + /// information regarding the failure. + /// + Task DeleteAsync(string cloudServiceName, string cacheServiceName, CancellationToken cancellationToken); + + /// + /// Get access keys of Cache Service + /// + /// + /// The cloud service name. + /// + /// + /// The cache service name. + /// + /// + /// Cancellation token. + /// + /// + /// A standard service response including an HTTP status code and + /// request ID. + /// + Task GetKeysAsync(string cloudServiceName, string cacheServiceName, CancellationToken cancellationToken); + + /// + /// List supported regions of Cache Service + /// + /// + /// Cancellation token. + /// + /// + /// A standard service response including an HTTP status code and + /// request ID. + /// + Task ListRegionsAsync(CancellationToken cancellationToken); + + /// + /// Regenerate access keys for a Cache Service + /// + /// + /// The cloud service name. + /// + /// + /// The cache service name. + /// + /// + /// Key type + /// + /// + /// Cancellation token. + /// + /// + /// A standard service response including an HTTP status code and + /// request ID. + /// + Task RegenerateKeysAsync(string cloudServiceName, string cacheServiceName, RegenerateKeysParameters parameters, CancellationToken cancellationToken); + } + + /// + /// The Managed Cache API includes operations for managing cache services + /// + internal partial class CacheServiceOperations : IServiceOperations, ICacheServiceOperations + { + /// + /// Initializes a new instance of the CacheServiceOperations class. + /// + /// + /// Reference to the service client. + /// + internal CacheServiceOperations(ManagedCacheClient client) + { + this._client = client; + } + + private ManagedCacheClient _client; + + /// + /// Gets a reference to the + /// Microsoft.Azure.Management.ManagedCache.ManagedCacheClient. + /// + public ManagedCacheClient Client + { + get { return this._client; } + } + + /// + /// Creates a new Cache Service in specified subscription and cloud + /// service. + /// + /// + /// Required. The name of the cloud service. + /// + /// + /// Required. A name of the cache service. The name can be up to 20 + /// characters in length with minimum 6 characters and must be all + /// lower cases. + /// + /// + /// Required. Parameter supplied to create a cache service + /// + /// + /// Cancellation token. + /// + /// + /// A standard service response including an HTTP status code and + /// request ID. + /// + public async Task BeginCreatingCacheServiceAsync(string cloudServiceName, string cacheServiceName, CacheServiceCreateParameters parameters, CancellationToken cancellationToken) + { + // Validate + if (cloudServiceName == null) + { + throw new ArgumentNullException("cloudServiceName"); + } + if (cacheServiceName == null) + { + throw new ArgumentNullException("cacheServiceName"); + } + if (cacheServiceName.Length < 6) + { + throw new ArgumentOutOfRangeException("cacheServiceName"); + } + if (cacheServiceName.Length > 20) + { + throw new ArgumentOutOfRangeException("cacheServiceName"); + } + if (parameters == null) + { + throw new ArgumentNullException("parameters"); + } + + // Tracing + bool shouldTrace = CloudContext.Configuration.Tracing.IsEnabled; + string invocationId = null; + if (shouldTrace) + { + invocationId = Tracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cloudServiceName", cloudServiceName); + tracingParameters.Add("cacheServiceName", cacheServiceName); + tracingParameters.Add("parameters", parameters); + Tracing.Enter(invocationId, this, "BeginCreatingCacheServiceAsync", tracingParameters); + } + + // Construct URL + string url = "/" + (this.Client.Credentials.SubscriptionId != null ? this.Client.Credentials.SubscriptionId.Trim() : "") + "/cloudservices/" + cloudServiceName.Trim() + "/resources/cacheservice/Caching/" + cacheServiceName.Trim(); + string baseUrl = this.Client.BaseUri.AbsoluteUri; + // Trim '/' character from the end of baseUrl and beginning of url. + if (baseUrl[baseUrl.Length - 1] == '/') + { + baseUrl = baseUrl.Substring(0, baseUrl.Length - 1); + } + if (url[0] == '/') + { + url = url.Substring(1); + } + url = baseUrl + "/" + url; + url = url.Replace(" ", "%20"); + + // Create HTTP transport objects + HttpRequestMessage httpRequest = null; + try + { + httpRequest = new HttpRequestMessage(); + httpRequest.Method = HttpMethod.Put; + httpRequest.RequestUri = new Uri(url); + + // Set Headers + httpRequest.Headers.TryAddWithoutValidation("If-Match", parameters.ETag); + httpRequest.Headers.Add("x-ms-version", "2012-08-01"); + + // Set Credentials + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); + + // Serialize Request + string requestContent = null; + XDocument requestDoc = new XDocument(); + + XElement resourceElement = new XElement(XName.Get("Resource", "http://schemas.microsoft.com/windowsazure")); + requestDoc.Add(resourceElement); + + if (parameters.ResourceProviderNamespace != null) + { + XElement resourceProviderNamespaceElement = new XElement(XName.Get("ResourceProviderNamespace", "http://schemas.microsoft.com/windowsazure")); + resourceProviderNamespaceElement.Value = parameters.ResourceProviderNamespace; + resourceElement.Add(resourceProviderNamespaceElement); + } + + if (parameters.Type != null) + { + XElement typeElement = new XElement(XName.Get("Type", "http://schemas.microsoft.com/windowsazure")); + typeElement.Value = parameters.Type; + resourceElement.Add(typeElement); + } + + if (parameters.Name != null) + { + XElement nameElement = new XElement(XName.Get("Name", "http://schemas.microsoft.com/windowsazure")); + nameElement.Value = parameters.Name; + resourceElement.Add(nameElement); + } + + if (parameters.SchemaVersion != null) + { + XElement schemaVersionElement = new XElement(XName.Get("SchemaVersion", "http://schemas.microsoft.com/windowsazure")); + schemaVersionElement.Value = parameters.SchemaVersion; + resourceElement.Add(schemaVersionElement); + } + + if (parameters.Settings != null) + { + XElement intrinsicSettingsElement = new XElement(XName.Get("IntrinsicSettings", "http://schemas.microsoft.com/windowsazure")); + resourceElement.Add(intrinsicSettingsElement); + + if (parameters.Settings.CacheServiceInputSection != null) + { + XElement cacheServiceInputElement = new XElement(XName.Get("CacheServiceInput", "")); + intrinsicSettingsElement.Add(cacheServiceInputElement); + + XElement skuTypeElement = new XElement(XName.Get("SkuType", "")); + skuTypeElement.Value = parameters.Settings.CacheServiceInputSection.SkuType.ToString(); + cacheServiceInputElement.Add(skuTypeElement); + + if (parameters.Settings.CacheServiceInputSection.Location != null) + { + XElement locationElement = new XElement(XName.Get("Location", "")); + locationElement.Value = parameters.Settings.CacheServiceInputSection.Location; + cacheServiceInputElement.Add(locationElement); + } + + XElement skuCountElement = new XElement(XName.Get("SkuCount", "")); + skuCountElement.Value = parameters.Settings.CacheServiceInputSection.SkuCount.ToString(); + cacheServiceInputElement.Add(skuCountElement); + + if (parameters.Settings.CacheServiceInputSection.ServiceVersion != null) + { + XElement serviceVersionElement = new XElement(XName.Get("ServiceVersion", "")); + serviceVersionElement.Value = parameters.Settings.CacheServiceInputSection.ServiceVersion; + cacheServiceInputElement.Add(serviceVersionElement); + } + + XElement objectSizeInBytesElement = new XElement(XName.Get("ObjectSizeInBytes", "")); + objectSizeInBytesElement.Value = parameters.Settings.CacheServiceInputSection.ObjectSizeInBytes.ToString(); + cacheServiceInputElement.Add(objectSizeInBytesElement); + + if (parameters.Settings.CacheServiceInputSection.NamedCaches != null) + { + XElement namedCachesSequenceElement = new XElement(XName.Get("NamedCaches", "")); + foreach (IntrinsicSettings.CacheServiceInput.NamedCache namedCachesItem in parameters.Settings.CacheServiceInputSection.NamedCaches) + { + XElement namedCacheElement = new XElement(XName.Get("NamedCache", "")); + namedCachesSequenceElement.Add(namedCacheElement); + + if (namedCachesItem.CacheName != null) + { + XElement cacheNameElement = new XElement(XName.Get("CacheName", "")); + cacheNameElement.Value = namedCachesItem.CacheName; + namedCacheElement.Add(cacheNameElement); + } + + XElement notificationsEnabledElement = new XElement(XName.Get("NotificationsEnabled", "")); + notificationsEnabledElement.Value = namedCachesItem.NotificationsEnabled.ToString().ToLower(); + namedCacheElement.Add(notificationsEnabledElement); + + XElement highAvailabilityEnabledElement = new XElement(XName.Get("HighAvailabilityEnabled", "")); + highAvailabilityEnabledElement.Value = namedCachesItem.HighAvailabilityEnabled.ToString().ToLower(); + namedCacheElement.Add(highAvailabilityEnabledElement); + + if (namedCachesItem.EvictionPolicy != null) + { + XElement evictionPolicyElement = new XElement(XName.Get("EvictionPolicy", "")); + evictionPolicyElement.Value = namedCachesItem.EvictionPolicy; + namedCacheElement.Add(evictionPolicyElement); + } + + if (namedCachesItem.ExpirationSettingsSection != null) + { + XElement expirationSettingsElement = new XElement(XName.Get("ExpirationSettings", "")); + namedCacheElement.Add(expirationSettingsElement); + + XElement timeToLiveInMinutesElement = new XElement(XName.Get("TimeToLiveInMinutes", "")); + timeToLiveInMinutesElement.Value = namedCachesItem.ExpirationSettingsSection.TimeToLiveInMinutes.ToString(); + expirationSettingsElement.Add(timeToLiveInMinutesElement); + + if (namedCachesItem.ExpirationSettingsSection.Type != null) + { + XElement typeElement2 = new XElement(XName.Get("Type", "")); + typeElement2.Value = namedCachesItem.ExpirationSettingsSection.Type; + expirationSettingsElement.Add(typeElement2); + } + } + } + cacheServiceInputElement.Add(namedCachesSequenceElement); + } + } + } + + if (parameters.IntrinsicSettingsSection != null) + { + XElement intrinsicSettingsElement2 = new XElement(XName.Get("IntrinsicSettings", "http://schemas.microsoft.com/windowsazure")); + resourceElement.Add(intrinsicSettingsElement2); + + if (parameters.IntrinsicSettingsSection.CacheServiceInputSection != null) + { + XElement cacheServiceInputElement2 = new XElement(XName.Get("CacheServiceInput", "")); + intrinsicSettingsElement2.Add(cacheServiceInputElement2); + + XElement skuTypeElement2 = new XElement(XName.Get("SkuType", "")); + skuTypeElement2.Value = parameters.IntrinsicSettingsSection.CacheServiceInputSection.SkuType.ToString(); + cacheServiceInputElement2.Add(skuTypeElement2); + + if (parameters.IntrinsicSettingsSection.CacheServiceInputSection.Location != null) + { + XElement locationElement2 = new XElement(XName.Get("Location", "")); + locationElement2.Value = parameters.IntrinsicSettingsSection.CacheServiceInputSection.Location; + cacheServiceInputElement2.Add(locationElement2); + } + + XElement skuCountElement2 = new XElement(XName.Get("SkuCount", "")); + skuCountElement2.Value = parameters.IntrinsicSettingsSection.CacheServiceInputSection.SkuCount.ToString(); + cacheServiceInputElement2.Add(skuCountElement2); + + if (parameters.IntrinsicSettingsSection.CacheServiceInputSection.ServiceVersion != null) + { + XElement serviceVersionElement2 = new XElement(XName.Get("ServiceVersion", "")); + serviceVersionElement2.Value = parameters.IntrinsicSettingsSection.CacheServiceInputSection.ServiceVersion; + cacheServiceInputElement2.Add(serviceVersionElement2); + } + + XElement objectSizeInBytesElement2 = new XElement(XName.Get("ObjectSizeInBytes", "")); + objectSizeInBytesElement2.Value = parameters.IntrinsicSettingsSection.CacheServiceInputSection.ObjectSizeInBytes.ToString(); + cacheServiceInputElement2.Add(objectSizeInBytesElement2); + + if (parameters.IntrinsicSettingsSection.CacheServiceInputSection.NamedCaches != null) + { + XElement namedCachesSequenceElement2 = new XElement(XName.Get("NamedCaches", "")); + foreach (IntrinsicSettings.CacheServiceInput.NamedCache namedCachesItem2 in parameters.IntrinsicSettingsSection.CacheServiceInputSection.NamedCaches) + { + XElement namedCacheElement2 = new XElement(XName.Get("NamedCache", "")); + namedCachesSequenceElement2.Add(namedCacheElement2); + + if (namedCachesItem2.CacheName != null) + { + XElement cacheNameElement2 = new XElement(XName.Get("CacheName", "")); + cacheNameElement2.Value = namedCachesItem2.CacheName; + namedCacheElement2.Add(cacheNameElement2); + } + + XElement notificationsEnabledElement2 = new XElement(XName.Get("NotificationsEnabled", "")); + notificationsEnabledElement2.Value = namedCachesItem2.NotificationsEnabled.ToString().ToLower(); + namedCacheElement2.Add(notificationsEnabledElement2); + + XElement highAvailabilityEnabledElement2 = new XElement(XName.Get("HighAvailabilityEnabled", "")); + highAvailabilityEnabledElement2.Value = namedCachesItem2.HighAvailabilityEnabled.ToString().ToLower(); + namedCacheElement2.Add(highAvailabilityEnabledElement2); + + if (namedCachesItem2.EvictionPolicy != null) + { + XElement evictionPolicyElement2 = new XElement(XName.Get("EvictionPolicy", "")); + evictionPolicyElement2.Value = namedCachesItem2.EvictionPolicy; + namedCacheElement2.Add(evictionPolicyElement2); + } + + if (namedCachesItem2.ExpirationSettingsSection != null) + { + XElement expirationSettingsElement2 = new XElement(XName.Get("ExpirationSettings", "")); + namedCacheElement2.Add(expirationSettingsElement2); + + XElement timeToLiveInMinutesElement2 = new XElement(XName.Get("TimeToLiveInMinutes", "")); + timeToLiveInMinutesElement2.Value = namedCachesItem2.ExpirationSettingsSection.TimeToLiveInMinutes.ToString(); + expirationSettingsElement2.Add(timeToLiveInMinutesElement2); + + if (namedCachesItem2.ExpirationSettingsSection.Type != null) + { + XElement typeElement3 = new XElement(XName.Get("Type", "")); + typeElement3.Value = namedCachesItem2.ExpirationSettingsSection.Type; + expirationSettingsElement2.Add(typeElement3); + } + } + } + cacheServiceInputElement2.Add(namedCachesSequenceElement2); + } + } + } + + requestContent = requestDoc.ToString(); + requestContent = System.Text.RegularExpressions.Regex.Replace(requestContent, "\\s* + /// The begin of deleting Cache Service.This operation is an + /// asynchronous operation. To determine whether service has finished + /// processing the request, call Get Operation. (see + /// http://msdn.microsoft.com/en-us/library/hh758254.aspx for more + /// information) + /// + /// + /// Required. The name of the cloud service. + /// + /// + /// Required. A name of the cache service. + /// + /// + /// Cancellation token. + /// + /// + /// A standard service response including an HTTP status code and + /// request ID. + /// + public async Task BeginDeletingAsync(string cloudServiceName, string cacheServiceName, CancellationToken cancellationToken) + { + // Validate + if (cloudServiceName == null) + { + throw new ArgumentNullException("cloudServiceName"); + } + if (cacheServiceName == null) + { + throw new ArgumentNullException("cacheServiceName"); + } + + // Tracing + bool shouldTrace = CloudContext.Configuration.Tracing.IsEnabled; + string invocationId = null; + if (shouldTrace) + { + invocationId = Tracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cloudServiceName", cloudServiceName); + tracingParameters.Add("cacheServiceName", cacheServiceName); + Tracing.Enter(invocationId, this, "BeginDeletingAsync", tracingParameters); + } + + // Construct URL + string url = "/" + (this.Client.Credentials.SubscriptionId != null ? this.Client.Credentials.SubscriptionId.Trim() : "") + "/cloudservices/" + cloudServiceName.Trim() + "/resources/cacheservice/Caching/" + cacheServiceName.Trim(); + string baseUrl = this.Client.BaseUri.AbsoluteUri; + // Trim '/' character from the end of baseUrl and beginning of url. + if (baseUrl[baseUrl.Length - 1] == '/') + { + baseUrl = baseUrl.Substring(0, baseUrl.Length - 1); + } + if (url[0] == '/') + { + url = url.Substring(1); + } + url = baseUrl + "/" + url; + url = url.Replace(" ", "%20"); + + // Create HTTP transport objects + HttpRequestMessage httpRequest = null; + try + { + httpRequest = new HttpRequestMessage(); + httpRequest.Method = HttpMethod.Delete; + httpRequest.RequestUri = new Uri(url); + + // Set Headers + httpRequest.Headers.Add("x-ms-version", "2012-08-01"); + + // Set Credentials + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); + + // Send Request + HttpResponseMessage httpResponse = null; + try + { + if (shouldTrace) + { + Tracing.SendRequest(invocationId, httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + httpResponse = await this.Client.HttpClient.SendAsync(httpRequest, cancellationToken).ConfigureAwait(false); + if (shouldTrace) + { + Tracing.ReceiveResponse(invocationId, httpResponse); + } + HttpStatusCode statusCode = httpResponse.StatusCode; + if (statusCode != HttpStatusCode.Accepted) + { + cancellationToken.ThrowIfCancellationRequested(); + CloudException ex = CloudException.Create(httpRequest, null, httpResponse, await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false)); + if (shouldTrace) + { + Tracing.Error(invocationId, ex); + } + throw ex; + } + + // Create Result + OperationResponse result = null; + result = new OperationResponse(); + result.StatusCode = statusCode; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + + if (shouldTrace) + { + Tracing.Exit(invocationId, result); + } + return result; + } + finally + { + if (httpResponse != null) + { + httpResponse.Dispose(); + } + } + } + finally + { + if (httpRequest != null) + { + httpRequest.Dispose(); + } + } + } + + /// + /// Get access keys of Cache Service + /// + /// + /// Required. The cloud service name. + /// + /// + /// Required. The cache service name. + /// + /// + /// Cancellation token. + /// + /// + /// A standard service response including an HTTP status code and + /// request ID. + /// + public async Task CheckNameAvailabilityAsync(string cloudServiceName, string cacheServiceName, CancellationToken cancellationToken) + { + // Validate + if (cloudServiceName == null) + { + throw new ArgumentNullException("cloudServiceName"); + } + if (cacheServiceName == null) + { + throw new ArgumentNullException("cacheServiceName"); + } + + // Tracing + bool shouldTrace = CloudContext.Configuration.Tracing.IsEnabled; + string invocationId = null; + if (shouldTrace) + { + invocationId = Tracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cloudServiceName", cloudServiceName); + tracingParameters.Add("cacheServiceName", cacheServiceName); + Tracing.Enter(invocationId, this, "CheckNameAvailabilityAsync", tracingParameters); + } + + // Construct URL + string url = "/" + (this.Client.Credentials.SubscriptionId != null ? this.Client.Credentials.SubscriptionId.Trim() : "") + "/cloudservices/" + cloudServiceName.Trim() + "/resources/cacheservice/~/Caching/dummy/Namespaces/" + cacheServiceName.Trim(); + string baseUrl = this.Client.BaseUri.AbsoluteUri; + // Trim '/' character from the end of baseUrl and beginning of url. + if (baseUrl[baseUrl.Length - 1] == '/') + { + baseUrl = baseUrl.Substring(0, baseUrl.Length - 1); + } + if (url[0] == '/') + { + url = url.Substring(1); + } + url = baseUrl + "/" + url; + url = url.Replace(" ", "%20"); + + // Create HTTP transport objects + HttpRequestMessage httpRequest = null; + try + { + httpRequest = new HttpRequestMessage(); + httpRequest.Method = HttpMethod.Get; + httpRequest.RequestUri = new Uri(url); + + // Set Headers + httpRequest.Headers.Add("x-ms-version", "2012-08-01"); + + // Set Credentials + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); + + // Send Request + HttpResponseMessage httpResponse = null; + try + { + if (shouldTrace) + { + Tracing.SendRequest(invocationId, httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + httpResponse = await this.Client.HttpClient.SendAsync(httpRequest, cancellationToken).ConfigureAwait(false); + if (shouldTrace) + { + Tracing.ReceiveResponse(invocationId, httpResponse); + } + HttpStatusCode statusCode = httpResponse.StatusCode; + if (statusCode != HttpStatusCode.OK) + { + cancellationToken.ThrowIfCancellationRequested(); + CloudException ex = CloudException.Create(httpRequest, null, httpResponse, await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false)); + if (shouldTrace) + { + Tracing.Error(invocationId, ex); + } + throw ex; + } + + // Create Result + CheckCacheNameAvailabilityResponse result = null; + // Deserialize Response + cancellationToken.ThrowIfCancellationRequested(); + string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + result = new CheckCacheNameAvailabilityResponse(); + XDocument responseDoc = XDocument.Parse(responseContent); + + XElement booleanElement = responseDoc.Element(XName.Get("boolean", "http://schemas.microsoft.com/2003/10/Serialization/")); + if (booleanElement != null) + { + bool booleanInstance = bool.Parse(booleanElement.Value); + result.Available = booleanInstance; + } + + result.StatusCode = statusCode; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + + if (shouldTrace) + { + Tracing.Exit(invocationId, result); + } + return result; + } + finally + { + if (httpResponse != null) + { + httpResponse.Dispose(); + } + } + } + finally + { + if (httpRequest != null) + { + httpRequest.Dispose(); + } + } + } + + /// + /// Creates a new Cache Service in specified subscription and cloud + /// service. + /// + /// + /// Required. The name of the cloud service. + /// + /// + /// Required. The name of the cache service. The name can be up to 20 + /// characters in length with minimum 6 characters and must be all + /// lower cases. + /// + /// + /// Required. Parameter supplied to create a cache service + /// + /// + /// Cancellation token. + /// + /// + /// The response body contains the status of the specified asynchronous + /// operation, indicating whether it has succeeded, is inprogress, or + /// has failed. Note that this status is distinct from the HTTP status + /// code returned for the Get Operation Status operation itself. If + /// the asynchronous operation succeeded, the response body includes + /// the HTTP status code for the successful request. If the + /// asynchronous operation failed, the response body includes the HTTP + /// status code for the failed request, and also includes error + /// information regarding the failure. + /// + public async Task CreateCacheServiceAsync(string cloudServiceName, string cacheServiceName, CacheServiceCreateParameters parameters, CancellationToken cancellationToken) + { + ManagedCacheClient client = this.Client; + bool shouldTrace = CloudContext.Configuration.Tracing.IsEnabled; + string invocationId = null; + if (shouldTrace) + { + invocationId = Tracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cloudServiceName", cloudServiceName); + tracingParameters.Add("cacheServiceName", cacheServiceName); + tracingParameters.Add("parameters", parameters); + Tracing.Enter(invocationId, this, "CreateCacheServiceAsync", tracingParameters); + } + try + { + if (shouldTrace) + { + client = this.Client.WithHandler(new ClientRequestTrackingHandler(invocationId)); + } + + cancellationToken.ThrowIfCancellationRequested(); + OperationResponse response = await client.CacheServices.BeginCreatingCacheServiceAsync(cloudServiceName, cacheServiceName, parameters, cancellationToken).ConfigureAwait(false); + cancellationToken.ThrowIfCancellationRequested(); + CloudServiceOperationStatusResponse result = await client.GetOperationStatusAsync(response.RequestId, cancellationToken).ConfigureAwait(false); + int delayInSeconds = 30; + while ((result.Status != CloudServiceOperationStatus.InProgress) == false) + { + cancellationToken.ThrowIfCancellationRequested(); + await TaskEx.Delay(delayInSeconds * 1000, cancellationToken).ConfigureAwait(false); + cancellationToken.ThrowIfCancellationRequested(); + result = await client.GetOperationStatusAsync(response.RequestId, cancellationToken).ConfigureAwait(false); + delayInSeconds = 30; + } + + if (shouldTrace) + { + Tracing.Exit(invocationId, result); + } + + if (result.Status != CloudServiceOperationStatus.Succeeded) + { + if (result.Error != null) + { + CloudException ex = new CloudException(result.Error.Code + " : " + result.Error.Message); + ex.ErrorCode = result.Error.Code; + ex.ErrorMessage = result.Error.Message; + if (shouldTrace) + { + Tracing.Error(invocationId, ex); + } + throw ex; + } + else + { + CloudException ex = new CloudException(""); + if (shouldTrace) + { + Tracing.Error(invocationId, ex); + } + throw ex; + } + } + + return result; + } + finally + { + if (client != null && shouldTrace) + { + client.Dispose(); + } + } + } + + /// + /// Delete Cache Service in specified subscription and cloud service. + /// (see http://msdn.microsoft.com/en-us/library/hh758254.aspx for + /// more information) + /// + /// + /// Required. The name of the cloud service. + /// + /// + /// Required. A name of the cache service. + /// + /// + /// Cancellation token. + /// + /// + /// The response body contains the status of the specified asynchronous + /// operation, indicating whether it has succeeded, is inprogress, or + /// has failed. Note that this status is distinct from the HTTP status + /// code returned for the Get Operation Status operation itself. If + /// the asynchronous operation succeeded, the response body includes + /// the HTTP status code for the successful request. If the + /// asynchronous operation failed, the response body includes the HTTP + /// status code for the failed request, and also includes error + /// information regarding the failure. + /// + public async Task DeleteAsync(string cloudServiceName, string cacheServiceName, CancellationToken cancellationToken) + { + ManagedCacheClient client = this.Client; + bool shouldTrace = CloudContext.Configuration.Tracing.IsEnabled; + string invocationId = null; + if (shouldTrace) + { + invocationId = Tracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cloudServiceName", cloudServiceName); + tracingParameters.Add("cacheServiceName", cacheServiceName); + Tracing.Enter(invocationId, this, "DeleteAsync", tracingParameters); + } + try + { + if (shouldTrace) + { + client = this.Client.WithHandler(new ClientRequestTrackingHandler(invocationId)); + } + + cancellationToken.ThrowIfCancellationRequested(); + OperationResponse response = await client.CacheServices.BeginDeletingAsync(cloudServiceName, cacheServiceName, cancellationToken).ConfigureAwait(false); + cancellationToken.ThrowIfCancellationRequested(); + CloudServiceOperationStatusResponse result = await client.GetOperationStatusAsync(response.RequestId, cancellationToken).ConfigureAwait(false); + int delayInSeconds = 30; + while ((result.Status != CloudServiceOperationStatus.InProgress) == false) + { + cancellationToken.ThrowIfCancellationRequested(); + await TaskEx.Delay(delayInSeconds * 1000, cancellationToken).ConfigureAwait(false); + cancellationToken.ThrowIfCancellationRequested(); + result = await client.GetOperationStatusAsync(response.RequestId, cancellationToken).ConfigureAwait(false); + delayInSeconds = 30; + } + + if (shouldTrace) + { + Tracing.Exit(invocationId, result); + } + + if (result.Status != CloudServiceOperationStatus.Succeeded) + { + if (result.Error != null) + { + CloudException ex = new CloudException(result.Error.Code + " : " + result.Error.Message); + ex.ErrorCode = result.Error.Code; + ex.ErrorMessage = result.Error.Message; + if (shouldTrace) + { + Tracing.Error(invocationId, ex); + } + throw ex; + } + else + { + CloudException ex = new CloudException(""); + if (shouldTrace) + { + Tracing.Error(invocationId, ex); + } + throw ex; + } + } + + return result; + } + finally + { + if (client != null && shouldTrace) + { + client.Dispose(); + } + } + } + + /// + /// Get access keys of Cache Service + /// + /// + /// Required. The cloud service name. + /// + /// + /// Required. The cache service name. + /// + /// + /// Cancellation token. + /// + /// + /// A standard service response including an HTTP status code and + /// request ID. + /// + public async Task GetKeysAsync(string cloudServiceName, string cacheServiceName, CancellationToken cancellationToken) + { + // Validate + if (cloudServiceName == null) + { + throw new ArgumentNullException("cloudServiceName"); + } + if (cloudServiceName.Length > 100) + { + throw new ArgumentOutOfRangeException("cloudServiceName"); + } + if (cacheServiceName == null) + { + throw new ArgumentNullException("cacheServiceName"); + } + if (cacheServiceName.Length > 100) + { + throw new ArgumentOutOfRangeException("cacheServiceName"); + } + + // Tracing + bool shouldTrace = CloudContext.Configuration.Tracing.IsEnabled; + string invocationId = null; + if (shouldTrace) + { + invocationId = Tracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cloudServiceName", cloudServiceName); + tracingParameters.Add("cacheServiceName", cacheServiceName); + Tracing.Enter(invocationId, this, "GetKeysAsync", tracingParameters); + } + + // Construct URL + string url = "/" + (this.Client.Credentials.SubscriptionId != null ? this.Client.Credentials.SubscriptionId.Trim() : "") + "/cloudservices/" + cloudServiceName.Trim() + "/resources/cacheservice/~/Caching/" + cacheServiceName.Trim() + "/Keys"; + string baseUrl = this.Client.BaseUri.AbsoluteUri; + // Trim '/' character from the end of baseUrl and beginning of url. + if (baseUrl[baseUrl.Length - 1] == '/') + { + baseUrl = baseUrl.Substring(0, baseUrl.Length - 1); + } + if (url[0] == '/') + { + url = url.Substring(1); + } + url = baseUrl + "/" + url; + url = url.Replace(" ", "%20"); + + // Create HTTP transport objects + HttpRequestMessage httpRequest = null; + try + { + httpRequest = new HttpRequestMessage(); + httpRequest.Method = HttpMethod.Get; + httpRequest.RequestUri = new Uri(url); + + // Set Headers + httpRequest.Headers.Add("x-ms-version", "2012-08-01"); + + // Set Credentials + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); + + // Send Request + HttpResponseMessage httpResponse = null; + try + { + if (shouldTrace) + { + Tracing.SendRequest(invocationId, httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + httpResponse = await this.Client.HttpClient.SendAsync(httpRequest, cancellationToken).ConfigureAwait(false); + if (shouldTrace) + { + Tracing.ReceiveResponse(invocationId, httpResponse); + } + HttpStatusCode statusCode = httpResponse.StatusCode; + if (statusCode != HttpStatusCode.OK) + { + cancellationToken.ThrowIfCancellationRequested(); + CloudException ex = CloudException.Create(httpRequest, null, httpResponse, await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false)); + if (shouldTrace) + { + Tracing.Error(invocationId, ex); + } + throw ex; + } + + // Create Result + CachingKeysResponse result = null; + // Deserialize Response + cancellationToken.ThrowIfCancellationRequested(); + string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + result = new CachingKeysResponse(); + XDocument responseDoc = XDocument.Parse(responseContent); + + XElement cachingKeysElement = responseDoc.Element(XName.Get("CachingKeys", "http://schemas.microsoft.com/windowsazure")); + if (cachingKeysElement != null) + { + XElement primaryElement = cachingKeysElement.Element(XName.Get("Primary", "http://schemas.microsoft.com/windowsazure")); + if (primaryElement != null) + { + string primaryInstance = primaryElement.Value; + result.Primary = primaryInstance; + } + + XElement secondaryElement = cachingKeysElement.Element(XName.Get("Secondary", "http://schemas.microsoft.com/windowsazure")); + if (secondaryElement != null) + { + string secondaryInstance = secondaryElement.Value; + result.Secondary = secondaryInstance; + } + } + + result.StatusCode = statusCode; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + + if (shouldTrace) + { + Tracing.Exit(invocationId, result); + } + return result; + } + finally + { + if (httpResponse != null) + { + httpResponse.Dispose(); + } + } + } + finally + { + if (httpRequest != null) + { + httpRequest.Dispose(); + } + } + } + + /// + /// List supported regions of Cache Service + /// + /// + /// Cancellation token. + /// + /// + /// A standard service response including an HTTP status code and + /// request ID. + /// + public async Task ListRegionsAsync(CancellationToken cancellationToken) + { + // Validate + + // Tracing + bool shouldTrace = CloudContext.Configuration.Tracing.IsEnabled; + string invocationId = null; + if (shouldTrace) + { + invocationId = Tracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + Tracing.Enter(invocationId, this, "ListRegionsAsync", tracingParameters); + } + + // Construct URL + string url = "/" + (this.Client.Credentials.SubscriptionId != null ? this.Client.Credentials.SubscriptionId.Trim() : "") + "/cloudservices/mycloudservice/resources/cacheservice/~/Caching/mycacheservice/Options/Regions"; + string baseUrl = this.Client.BaseUri.AbsoluteUri; + // Trim '/' character from the end of baseUrl and beginning of url. + if (baseUrl[baseUrl.Length - 1] == '/') + { + baseUrl = baseUrl.Substring(0, baseUrl.Length - 1); + } + if (url[0] == '/') + { + url = url.Substring(1); + } + url = baseUrl + "/" + url; + url = url.Replace(" ", "%20"); + + // Create HTTP transport objects + HttpRequestMessage httpRequest = null; + try + { + httpRequest = new HttpRequestMessage(); + httpRequest.Method = HttpMethod.Get; + httpRequest.RequestUri = new Uri(url); + + // Set Headers + httpRequest.Headers.Add("x-ms-version", "2012-08-01"); + + // Set Credentials + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); + + // Send Request + HttpResponseMessage httpResponse = null; + try + { + if (shouldTrace) + { + Tracing.SendRequest(invocationId, httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + httpResponse = await this.Client.HttpClient.SendAsync(httpRequest, cancellationToken).ConfigureAwait(false); + if (shouldTrace) + { + Tracing.ReceiveResponse(invocationId, httpResponse); + } + HttpStatusCode statusCode = httpResponse.StatusCode; + if (statusCode != HttpStatusCode.OK) + { + cancellationToken.ThrowIfCancellationRequested(); + CloudException ex = CloudException.Create(httpRequest, null, httpResponse, await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false)); + if (shouldTrace) + { + Tracing.Error(invocationId, ex); + } + throw ex; + } + + // Create Result + RegionsResponse result = null; + // Deserialize Response + cancellationToken.ThrowIfCancellationRequested(); + string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + result = new RegionsResponse(); + XDocument responseDoc = XDocument.Parse(responseContent); + + XElement regionsSequenceElement = responseDoc.Element(XName.Get("Regions", "http://schemas.microsoft.com/windowsazure")); + if (regionsSequenceElement != null) + { + foreach (XElement regionsElement in regionsSequenceElement.Elements(XName.Get("Region", "http://schemas.microsoft.com/windowsazure"))) + { + RegionsResponse.Region regionInstance = new RegionsResponse.Region(); + result.Regions.Add(regionInstance); + + regionInstance.Location = regionsElement.Value; + } + } + + result.StatusCode = statusCode; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + + if (shouldTrace) + { + Tracing.Exit(invocationId, result); + } + return result; + } + finally + { + if (httpResponse != null) + { + httpResponse.Dispose(); + } + } + } + finally + { + if (httpRequest != null) + { + httpRequest.Dispose(); + } + } + } + + /// + /// Regenerate access keys for a Cache Service + /// + /// + /// Required. The cloud service name. + /// + /// + /// Required. The cache service name. + /// + /// + /// Required. Key type + /// + /// + /// Cancellation token. + /// + /// + /// A standard service response including an HTTP status code and + /// request ID. + /// + public async Task RegenerateKeysAsync(string cloudServiceName, string cacheServiceName, RegenerateKeysParameters parameters, CancellationToken cancellationToken) + { + // Validate + if (cloudServiceName == null) + { + throw new ArgumentNullException("cloudServiceName"); + } + if (cloudServiceName.Length > 100) + { + throw new ArgumentOutOfRangeException("cloudServiceName"); + } + if (cacheServiceName == null) + { + throw new ArgumentNullException("cacheServiceName"); + } + if (cacheServiceName.Length > 100) + { + throw new ArgumentOutOfRangeException("cacheServiceName"); + } + if (parameters == null) + { + throw new ArgumentNullException("parameters"); + } + + // Tracing + bool shouldTrace = CloudContext.Configuration.Tracing.IsEnabled; + string invocationId = null; + if (shouldTrace) + { + invocationId = Tracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cloudServiceName", cloudServiceName); + tracingParameters.Add("cacheServiceName", cacheServiceName); + tracingParameters.Add("parameters", parameters); + Tracing.Enter(invocationId, this, "RegenerateKeysAsync", tracingParameters); + } + + // Construct URL + string url = "/" + (this.Client.Credentials.SubscriptionId != null ? this.Client.Credentials.SubscriptionId.Trim() : "") + "/cloudservices/" + cloudServiceName.Trim() + "/resources/cacheservice/~/Caching/" + cacheServiceName.Trim() + "/Keys/?comp=regenerate"; + string baseUrl = this.Client.BaseUri.AbsoluteUri; + // Trim '/' character from the end of baseUrl and beginning of url. + if (baseUrl[baseUrl.Length - 1] == '/') + { + baseUrl = baseUrl.Substring(0, baseUrl.Length - 1); + } + if (url[0] == '/') + { + url = url.Substring(1); + } + url = baseUrl + "/" + url; + url = url.Replace(" ", "%20"); + + // Create HTTP transport objects + HttpRequestMessage httpRequest = null; + try + { + httpRequest = new HttpRequestMessage(); + httpRequest.Method = HttpMethod.Post; + httpRequest.RequestUri = new Uri(url); + + // Set Headers + httpRequest.Headers.Add("x-ms-version", "2012-08-01"); + + // Set Credentials + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); + + // Serialize Request + string requestContent = null; + XDocument requestDoc = new XDocument(); + + XElement regenerateKeysElement = new XElement(XName.Get("RegenerateKeys", "http://schemas.microsoft.com/windowsazure")); + requestDoc.Add(regenerateKeysElement); + + if (parameters.KeyType != null) + { + XElement keyTypeElement = new XElement(XName.Get("KeyType", "http://schemas.microsoft.com/windowsazure")); + keyTypeElement.Value = parameters.KeyType; + regenerateKeysElement.Add(keyTypeElement); + } + + requestContent = requestDoc.ToString(); + httpRequest.Content = new StringContent(requestContent, Encoding.UTF8); + httpRequest.Content.Headers.ContentType = MediaTypeHeaderValue.Parse("application/xml"); + + // Send Request + HttpResponseMessage httpResponse = null; + try + { + if (shouldTrace) + { + Tracing.SendRequest(invocationId, httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + httpResponse = await this.Client.HttpClient.SendAsync(httpRequest, cancellationToken).ConfigureAwait(false); + if (shouldTrace) + { + Tracing.ReceiveResponse(invocationId, httpResponse); + } + HttpStatusCode statusCode = httpResponse.StatusCode; + if (statusCode != HttpStatusCode.OK) + { + cancellationToken.ThrowIfCancellationRequested(); + CloudException ex = CloudException.Create(httpRequest, requestContent, httpResponse, await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false)); + if (shouldTrace) + { + Tracing.Error(invocationId, ex); + } + throw ex; + } + + // Create Result + CachingKeysResponse result = null; + // Deserialize Response + cancellationToken.ThrowIfCancellationRequested(); + string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + result = new CachingKeysResponse(); + XDocument responseDoc = XDocument.Parse(responseContent); + + XElement cachingKeysElement = responseDoc.Element(XName.Get("CachingKeys", "http://schemas.microsoft.com/windowsazure")); + if (cachingKeysElement != null) + { + XElement primaryElement = cachingKeysElement.Element(XName.Get("Primary", "http://schemas.microsoft.com/windowsazure")); + if (primaryElement != null) + { + string primaryInstance = primaryElement.Value; + result.Primary = primaryInstance; + } + + XElement secondaryElement = cachingKeysElement.Element(XName.Get("Secondary", "http://schemas.microsoft.com/windowsazure")); + if (secondaryElement != null) + { + string secondaryInstance = secondaryElement.Value; + result.Secondary = secondaryInstance; + } + } + + result.StatusCode = statusCode; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + + if (shouldTrace) + { + Tracing.Exit(invocationId, result); + } + return result; + } + finally + { + if (httpResponse != null) + { + httpResponse.Dispose(); + } + } + } + finally + { + if (httpRequest != null) + { + httpRequest.Dispose(); + } + } + } + } + + public partial interface ICloudServiceOperations + { + /// + /// Create a cloud service. + /// + /// + /// The cloud service name. + /// + /// + /// Parameters supplied to the Create cloud service operation. + /// + /// + /// Cancellation token. + /// + /// + /// A standard service response including an HTTP status code and + /// request ID. + /// + Task BeginCreatingAsync(string cloudServiceName, CloudServiceCreateParameters parameters, CancellationToken cancellationToken); + + /// + /// Create a cloud service. + /// + /// + /// The cloud service name. + /// + /// + /// Parameters supplied to the Create cloud service operation. + /// + /// + /// Cancellation token. + /// + /// + /// The response body contains the status of the specified asynchronous + /// operation, indicating whether it has succeeded, is inprogress, or + /// has failed. Note that this status is distinct from the HTTP status + /// code returned for the Get Operation Status operation itself. If + /// the asynchronous operation succeeded, the response body includes + /// the HTTP status code for the successful request. If the + /// asynchronous operation failed, the response body includes the HTTP + /// status code for the failed request, and also includes error + /// information regarding the failure. + /// + Task CreateAsync(string cloudServiceName, CloudServiceCreateParameters parameters, CancellationToken cancellationToken); + + /// + /// Retrieve a cloud service. + /// + /// + /// The cloud service name. + /// + /// + /// Cancellation token. + /// + /// + /// Information about a retrieved Cloud Service. + /// + Task GetAsync(string cloudServiceName, CancellationToken cancellationToken); + + /// + /// The List Cloud Services operation enumerates services that are + /// provisioned for a subscription. + /// + /// + /// Cancellation token. + /// + /// + /// The response structure for the Cloud Service List operation. + /// + Task ListAsync(CancellationToken cancellationToken); + } + + internal partial class CloudServiceOperations : IServiceOperations, ICloudServiceOperations + { + /// + /// Initializes a new instance of the CloudServiceOperations class. + /// + /// + /// Reference to the service client. + /// + internal CloudServiceOperations(ManagedCacheClient client) + { + this._client = client; + } + + private ManagedCacheClient _client; + + /// + /// Gets a reference to the + /// Microsoft.Azure.Management.ManagedCache.ManagedCacheClient. + /// + public ManagedCacheClient Client + { + get { return this._client; } + } + + /// + /// Create a cloud service. + /// + /// + /// Required. The cloud service name. + /// + /// + /// Required. Parameters supplied to the Create cloud service operation. + /// + /// + /// Cancellation token. + /// + /// + /// A standard service response including an HTTP status code and + /// request ID. + /// + public async Task BeginCreatingAsync(string cloudServiceName, CloudServiceCreateParameters parameters, CancellationToken cancellationToken) + { + // Validate + if (cloudServiceName == null) + { + throw new ArgumentNullException("cloudServiceName"); + } + if (cloudServiceName.Length > 100) + { + throw new ArgumentOutOfRangeException("cloudServiceName"); + } + if (parameters == null) + { + throw new ArgumentNullException("parameters"); + } + if (parameters.Description == null) + { + throw new ArgumentNullException("parameters.Description"); + } + if (parameters.Description.Length > 1024) + { + throw new ArgumentOutOfRangeException("parameters.Description"); + } + if (parameters.GeoRegion == null) + { + throw new ArgumentNullException("parameters.GeoRegion"); + } + if (parameters.Label == null) + { + throw new ArgumentNullException("parameters.Label"); + } + if (parameters.Label.Length > 100) + { + throw new ArgumentOutOfRangeException("parameters.Label"); + } + + // Tracing + bool shouldTrace = CloudContext.Configuration.Tracing.IsEnabled; + string invocationId = null; + if (shouldTrace) + { + invocationId = Tracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cloudServiceName", cloudServiceName); + tracingParameters.Add("parameters", parameters); + Tracing.Enter(invocationId, this, "BeginCreatingAsync", tracingParameters); + } + + // Construct URL + string url = (this.Client.Credentials.SubscriptionId != null ? this.Client.Credentials.SubscriptionId.Trim() : "") + "/CloudServices/" + cloudServiceName.Trim(); + string baseUrl = this.Client.BaseUri.AbsoluteUri; + // Trim '/' character from the end of baseUrl and beginning of url. + if (baseUrl[baseUrl.Length - 1] == '/') + { + baseUrl = baseUrl.Substring(0, baseUrl.Length - 1); + } + if (url[0] == '/') + { + url = url.Substring(1); + } + url = baseUrl + "/" + url; + url = url.Replace(" ", "%20"); + + // Create HTTP transport objects + HttpRequestMessage httpRequest = null; + try + { + httpRequest = new HttpRequestMessage(); + httpRequest.Method = HttpMethod.Put; + httpRequest.RequestUri = new Uri(url); + + // Set Headers + httpRequest.Headers.Add("x-ms-version", "2012-08-01"); + + // Set Credentials + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); + + // Serialize Request + string requestContent = null; + XDocument requestDoc = new XDocument(); + + XElement cloudServiceElement = new XElement(XName.Get("CloudService", "http://schemas.microsoft.com/windowsazure")); + requestDoc.Add(cloudServiceElement); + + XElement labelElement = new XElement(XName.Get("Label", "http://schemas.microsoft.com/windowsazure")); + labelElement.Value = parameters.Label; + cloudServiceElement.Add(labelElement); + + XElement descriptionElement = new XElement(XName.Get("Description", "http://schemas.microsoft.com/windowsazure")); + descriptionElement.Value = parameters.Description; + cloudServiceElement.Add(descriptionElement); + + XElement geoRegionElement = new XElement(XName.Get("GeoRegion", "http://schemas.microsoft.com/windowsazure")); + geoRegionElement.Value = parameters.GeoRegion; + cloudServiceElement.Add(geoRegionElement); + + if (parameters.Email != null) + { + XElement emailElement = new XElement(XName.Get("Email", "http://schemas.microsoft.com/windowsazure")); + emailElement.Value = parameters.Email; + cloudServiceElement.Add(emailElement); + } + + requestContent = requestDoc.ToString(); + httpRequest.Content = new StringContent(requestContent, Encoding.UTF8); + httpRequest.Content.Headers.ContentType = MediaTypeHeaderValue.Parse("application/xml"); + + // Send Request + HttpResponseMessage httpResponse = null; + try + { + if (shouldTrace) + { + Tracing.SendRequest(invocationId, httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + httpResponse = await this.Client.HttpClient.SendAsync(httpRequest, cancellationToken).ConfigureAwait(false); + if (shouldTrace) + { + Tracing.ReceiveResponse(invocationId, httpResponse); + } + HttpStatusCode statusCode = httpResponse.StatusCode; + if (statusCode != HttpStatusCode.Accepted) + { + cancellationToken.ThrowIfCancellationRequested(); + CloudException ex = CloudException.Create(httpRequest, requestContent, httpResponse, await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false)); + if (shouldTrace) + { + Tracing.Error(invocationId, ex); + } + throw ex; + } + + // Create Result + OperationResponse result = null; + result = new OperationResponse(); + result.StatusCode = statusCode; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + + if (shouldTrace) + { + Tracing.Exit(invocationId, result); + } + return result; + } + finally + { + if (httpResponse != null) + { + httpResponse.Dispose(); + } + } + } + finally + { + if (httpRequest != null) + { + httpRequest.Dispose(); + } + } + } + + /// + /// Create a cloud service. + /// + /// + /// Required. The cloud service name. + /// + /// + /// Required. Parameters supplied to the Create cloud service operation. + /// + /// + /// Cancellation token. + /// + /// + /// The response body contains the status of the specified asynchronous + /// operation, indicating whether it has succeeded, is inprogress, or + /// has failed. Note that this status is distinct from the HTTP status + /// code returned for the Get Operation Status operation itself. If + /// the asynchronous operation succeeded, the response body includes + /// the HTTP status code for the successful request. If the + /// asynchronous operation failed, the response body includes the HTTP + /// status code for the failed request, and also includes error + /// information regarding the failure. + /// + public async Task CreateAsync(string cloudServiceName, CloudServiceCreateParameters parameters, CancellationToken cancellationToken) + { + ManagedCacheClient client = this.Client; + bool shouldTrace = CloudContext.Configuration.Tracing.IsEnabled; + string invocationId = null; + if (shouldTrace) + { + invocationId = Tracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cloudServiceName", cloudServiceName); + tracingParameters.Add("parameters", parameters); + Tracing.Enter(invocationId, this, "CreateAsync", tracingParameters); + } + try + { + if (shouldTrace) + { + client = this.Client.WithHandler(new ClientRequestTrackingHandler(invocationId)); + } + + cancellationToken.ThrowIfCancellationRequested(); + OperationResponse response = await client.CloudServices.BeginCreatingAsync(cloudServiceName, parameters, cancellationToken).ConfigureAwait(false); + cancellationToken.ThrowIfCancellationRequested(); + CloudServiceOperationStatusResponse result = await client.GetOperationStatusAsync(response.RequestId, cancellationToken).ConfigureAwait(false); + int delayInSeconds = 10; + while ((result.Status != CloudServiceOperationStatus.InProgress) == false) + { + cancellationToken.ThrowIfCancellationRequested(); + await TaskEx.Delay(delayInSeconds * 1000, cancellationToken).ConfigureAwait(false); + cancellationToken.ThrowIfCancellationRequested(); + result = await client.GetOperationStatusAsync(response.RequestId, cancellationToken).ConfigureAwait(false); + delayInSeconds = 5; + } + + if (shouldTrace) + { + Tracing.Exit(invocationId, result); + } + + if (result.Status != CloudServiceOperationStatus.Succeeded) + { + if (result.Error != null) + { + CloudException ex = new CloudException(result.Error.Code + " : " + result.Error.Message); + ex.ErrorCode = result.Error.Code; + ex.ErrorMessage = result.Error.Message; + if (shouldTrace) + { + Tracing.Error(invocationId, ex); + } + throw ex; + } + else + { + CloudException ex = new CloudException(""); + if (shouldTrace) + { + Tracing.Error(invocationId, ex); + } + throw ex; + } + } + + return result; + } + finally + { + if (client != null && shouldTrace) + { + client.Dispose(); + } + } + } + + /// + /// Retrieve a cloud service. + /// + /// + /// Required. The cloud service name. + /// + /// + /// Cancellation token. + /// + /// + /// Information about a retrieved Cloud Service. + /// + public async Task GetAsync(string cloudServiceName, CancellationToken cancellationToken) + { + // Validate + if (cloudServiceName == null) + { + throw new ArgumentNullException("cloudServiceName"); + } + if (cloudServiceName.Length > 100) + { + throw new ArgumentOutOfRangeException("cloudServiceName"); + } + + // Tracing + bool shouldTrace = CloudContext.Configuration.Tracing.IsEnabled; + string invocationId = null; + if (shouldTrace) + { + invocationId = Tracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cloudServiceName", cloudServiceName); + Tracing.Enter(invocationId, this, "GetAsync", tracingParameters); + } + + // Construct URL + string url = (this.Client.Credentials.SubscriptionId != null ? this.Client.Credentials.SubscriptionId.Trim() : "") + "/CloudServices/" + cloudServiceName.Trim(); + string baseUrl = this.Client.BaseUri.AbsoluteUri; + // Trim '/' character from the end of baseUrl and beginning of url. + if (baseUrl[baseUrl.Length - 1] == '/') + { + baseUrl = baseUrl.Substring(0, baseUrl.Length - 1); + } + if (url[0] == '/') + { + url = url.Substring(1); + } + url = baseUrl + "/" + url; + url = url.Replace(" ", "%20"); + + // Create HTTP transport objects + HttpRequestMessage httpRequest = null; + try + { + httpRequest = new HttpRequestMessage(); + httpRequest.Method = HttpMethod.Get; + httpRequest.RequestUri = new Uri(url); + + // Set Headers + httpRequest.Headers.Add("x-ms-version", "2012-08-01"); + + // Set Credentials + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); + + // Send Request + HttpResponseMessage httpResponse = null; + try + { + if (shouldTrace) + { + Tracing.SendRequest(invocationId, httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + httpResponse = await this.Client.HttpClient.SendAsync(httpRequest, cancellationToken).ConfigureAwait(false); + if (shouldTrace) + { + Tracing.ReceiveResponse(invocationId, httpResponse); + } + HttpStatusCode statusCode = httpResponse.StatusCode; + if (statusCode != HttpStatusCode.OK) + { + cancellationToken.ThrowIfCancellationRequested(); + CloudException ex = CloudException.Create(httpRequest, null, httpResponse, await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false)); + if (shouldTrace) + { + Tracing.Error(invocationId, ex); + } + throw ex; + } + + // Create Result + CloudServiceGetResponse result = null; + // Deserialize Response + cancellationToken.ThrowIfCancellationRequested(); + string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + result = new CloudServiceGetResponse(); + XDocument responseDoc = XDocument.Parse(responseContent); + + XElement cloudServiceElement = responseDoc.Element(XName.Get("CloudService", "http://schemas.microsoft.com/windowsazure")); + if (cloudServiceElement != null) + { + XElement geoLocationElement = cloudServiceElement.Element(XName.Get("GeoLocation", "http://schemas.microsoft.com/windowsazure")); + if (geoLocationElement != null) + { + string geoLocationInstance = geoLocationElement.Value; + result.GeoLocation = geoLocationInstance; + } + + XElement resourcesSequenceElement = cloudServiceElement.Element(XName.Get("Resources", "http://schemas.microsoft.com/windowsazure")); + if (resourcesSequenceElement != null) + { + foreach (XElement resourcesElement in resourcesSequenceElement.Elements(XName.Get("Resource", "http://schemas.microsoft.com/windowsazure"))) + { + CloudServiceResource resourceInstance = new CloudServiceResource(); + result.Resources.Add(resourceInstance); + + XElement resourceProviderNamespaceElement = resourcesElement.Element(XName.Get("ResourceProviderNamespace", "http://schemas.microsoft.com/windowsazure")); + if (resourceProviderNamespaceElement != null) + { + string resourceProviderNamespaceInstance = resourceProviderNamespaceElement.Value; + resourceInstance.Namespace = resourceProviderNamespaceInstance; + } + + XElement typeElement = resourcesElement.Element(XName.Get("Type", "http://schemas.microsoft.com/windowsazure")); + if (typeElement != null) + { + string typeInstance = typeElement.Value; + resourceInstance.Type = typeInstance; + } + + XElement nameElement = resourcesElement.Element(XName.Get("Name", "http://schemas.microsoft.com/windowsazure")); + if (nameElement != null) + { + string nameInstance = nameElement.Value; + resourceInstance.Name = nameInstance; + } + + XElement planElement = resourcesElement.Element(XName.Get("Plan", "http://schemas.microsoft.com/windowsazure")); + if (planElement != null) + { + string planInstance = planElement.Value; + resourceInstance.Plan = planInstance; + } + + XElement schemaVersionElement = resourcesElement.Element(XName.Get("SchemaVersion", "http://schemas.microsoft.com/windowsazure")); + if (schemaVersionElement != null) + { + string schemaVersionInstance = schemaVersionElement.Value; + resourceInstance.SchemaVersion = schemaVersionInstance; + } + + XElement eTagElement = resourcesElement.Element(XName.Get("ETag", "http://schemas.microsoft.com/windowsazure")); + if (eTagElement != null) + { + string eTagInstance = eTagElement.Value; + resourceInstance.ETag = eTagInstance; + } + + XElement stateElement = resourcesElement.Element(XName.Get("State", "http://schemas.microsoft.com/windowsazure")); + if (stateElement != null) + { + string stateInstance = stateElement.Value; + resourceInstance.State = stateInstance; + } + + XElement subStateElement = resourcesElement.Element(XName.Get("SubState", "http://schemas.microsoft.com/windowsazure")); + if (subStateElement != null) + { + string subStateInstance = subStateElement.Value; + resourceInstance.SubState = subStateInstance; + } + + XElement usageMetersSequenceElement = resourcesElement.Element(XName.Get("UsageMeters", "http://schemas.microsoft.com/windowsazure")); + if (usageMetersSequenceElement != null) + { + foreach (XElement usageMetersElement in usageMetersSequenceElement.Elements(XName.Get("UsageMeter", "http://schemas.microsoft.com/windowsazure"))) + { + CloudServiceResource.UsageLimit usageMeterInstance = new CloudServiceResource.UsageLimit(); + resourceInstance.UsageLimits.Add(usageMeterInstance); + + XElement nameElement2 = usageMetersElement.Element(XName.Get("Name", "http://schemas.microsoft.com/windowsazure")); + if (nameElement2 != null) + { + string nameInstance2 = nameElement2.Value; + usageMeterInstance.Name = nameInstance2; + } + + XElement unitElement = usageMetersElement.Element(XName.Get("Unit", "http://schemas.microsoft.com/windowsazure")); + if (unitElement != null) + { + string unitInstance = unitElement.Value; + usageMeterInstance.Unit = unitInstance; + } + + XElement includedElement = usageMetersElement.Element(XName.Get("Included", "http://schemas.microsoft.com/windowsazure")); + if (includedElement != null) + { + string includedInstance = includedElement.Value; + usageMeterInstance.AmountIncluded = includedInstance; + } + + XElement usedElement = usageMetersElement.Element(XName.Get("Used", "http://schemas.microsoft.com/windowsazure")); + if (usedElement != null) + { + string usedInstance = usedElement.Value; + usageMeterInstance.AmountUsed = usedInstance; + } + } + } + + XElement outputItemsSequenceElement = resourcesElement.Element(XName.Get("OutputItems", "http://schemas.microsoft.com/windowsazure")); + if (outputItemsSequenceElement != null) + { + foreach (XElement outputItemsElement in outputItemsSequenceElement.Elements(XName.Get("OutputItem", "http://schemas.microsoft.com/windowsazure"))) + { + string outputItemsKey = outputItemsElement.Element(XName.Get("Key", "http://schemas.microsoft.com/windowsazure")).Value; + string outputItemsValue = outputItemsElement.Element(XName.Get("Value", "http://schemas.microsoft.com/windowsazure")).Value; + resourceInstance.OutputItems.Add(outputItemsKey, outputItemsValue); + } + } + + XElement intrinsicSettingsElement = resourcesElement.Element(XName.Get("IntrinsicSettings", "http://schemas.microsoft.com/windowsazure")); + if (intrinsicSettingsElement != null) + { + IntrinsicSettings intrinsicSettingsInstance = new IntrinsicSettings(); + resourceInstance.IntrinsicSettingsSection = intrinsicSettingsInstance; + + XElement cacheServiceInputElement = intrinsicSettingsElement.Element(XName.Get("CacheServiceInput", "")); + if (cacheServiceInputElement != null) + { + IntrinsicSettings.CacheServiceInput cacheServiceInputInstance = new IntrinsicSettings.CacheServiceInput(); + intrinsicSettingsInstance.CacheServiceInputSection = cacheServiceInputInstance; + + XElement skuTypeElement = cacheServiceInputElement.Element(XName.Get("SkuType", "")); + if (skuTypeElement != null) + { + CacheServiceSkuType skuTypeInstance = ((CacheServiceSkuType)Enum.Parse(typeof(CacheServiceSkuType), skuTypeElement.Value, true)); + cacheServiceInputInstance.SkuType = skuTypeInstance; + } + + XElement locationElement = cacheServiceInputElement.Element(XName.Get("Location", "")); + if (locationElement != null) + { + string locationInstance = locationElement.Value; + cacheServiceInputInstance.Location = locationInstance; + } + + XElement skuCountElement = cacheServiceInputElement.Element(XName.Get("SkuCount", "")); + if (skuCountElement != null) + { + int skuCountInstance = int.Parse(skuCountElement.Value, CultureInfo.InvariantCulture); + cacheServiceInputInstance.SkuCount = skuCountInstance; + } + + XElement serviceVersionElement = cacheServiceInputElement.Element(XName.Get("ServiceVersion", "")); + if (serviceVersionElement != null) + { + string serviceVersionInstance = serviceVersionElement.Value; + cacheServiceInputInstance.ServiceVersion = serviceVersionInstance; + } + + XElement objectSizeInBytesElement = cacheServiceInputElement.Element(XName.Get("ObjectSizeInBytes", "")); + if (objectSizeInBytesElement != null) + { + int objectSizeInBytesInstance = int.Parse(objectSizeInBytesElement.Value, CultureInfo.InvariantCulture); + cacheServiceInputInstance.ObjectSizeInBytes = objectSizeInBytesInstance; + } + + XElement namedCachesSequenceElement = cacheServiceInputElement.Element(XName.Get("NamedCaches", "")); + if (namedCachesSequenceElement != null) + { + foreach (XElement namedCachesElement in namedCachesSequenceElement.Elements(XName.Get("NamedCache", ""))) + { + IntrinsicSettings.CacheServiceInput.NamedCache namedCacheInstance = new IntrinsicSettings.CacheServiceInput.NamedCache(); + cacheServiceInputInstance.NamedCaches.Add(namedCacheInstance); + + XElement cacheNameElement = namedCachesElement.Element(XName.Get("CacheName", "")); + if (cacheNameElement != null) + { + string cacheNameInstance = cacheNameElement.Value; + namedCacheInstance.CacheName = cacheNameInstance; + } + + XElement notificationsEnabledElement = namedCachesElement.Element(XName.Get("NotificationsEnabled", "")); + if (notificationsEnabledElement != null) + { + bool notificationsEnabledInstance = bool.Parse(notificationsEnabledElement.Value); + namedCacheInstance.NotificationsEnabled = notificationsEnabledInstance; + } + + XElement highAvailabilityEnabledElement = namedCachesElement.Element(XName.Get("HighAvailabilityEnabled", "")); + if (highAvailabilityEnabledElement != null) + { + bool highAvailabilityEnabledInstance = bool.Parse(highAvailabilityEnabledElement.Value); + namedCacheInstance.HighAvailabilityEnabled = highAvailabilityEnabledInstance; + } + + XElement evictionPolicyElement = namedCachesElement.Element(XName.Get("EvictionPolicy", "")); + if (evictionPolicyElement != null) + { + string evictionPolicyInstance = evictionPolicyElement.Value; + namedCacheInstance.EvictionPolicy = evictionPolicyInstance; + } + + XElement expirationSettingsElement = namedCachesElement.Element(XName.Get("ExpirationSettings", "")); + if (expirationSettingsElement != null) + { + IntrinsicSettings.CacheServiceInput.NamedCache.ExpirationSettings expirationSettingsInstance = new IntrinsicSettings.CacheServiceInput.NamedCache.ExpirationSettings(); + namedCacheInstance.ExpirationSettingsSection = expirationSettingsInstance; + + XElement timeToLiveInMinutesElement = expirationSettingsElement.Element(XName.Get("TimeToLiveInMinutes", "")); + if (timeToLiveInMinutesElement != null) + { + int timeToLiveInMinutesInstance = int.Parse(timeToLiveInMinutesElement.Value, CultureInfo.InvariantCulture); + expirationSettingsInstance.TimeToLiveInMinutes = timeToLiveInMinutesInstance; + } + + XElement typeElement2 = expirationSettingsElement.Element(XName.Get("Type", "")); + if (typeElement2 != null) + { + string typeInstance2 = typeElement2.Value; + expirationSettingsInstance.Type = typeInstance2; + } + } + } + } + } + } + } + } + } + + result.StatusCode = statusCode; + + if (shouldTrace) + { + Tracing.Exit(invocationId, result); + } + return result; + } + finally + { + if (httpResponse != null) + { + httpResponse.Dispose(); + } + } + } + finally + { + if (httpRequest != null) + { + httpRequest.Dispose(); + } + } + } + + /// + /// The List Cloud Services operation enumerates services that are + /// provisioned for a subscription. + /// + /// + /// Cancellation token. + /// + /// + /// The response structure for the Cloud Service List operation. + /// + public async Task ListAsync(CancellationToken cancellationToken) + { + // Validate + + // Tracing + bool shouldTrace = CloudContext.Configuration.Tracing.IsEnabled; + string invocationId = null; + if (shouldTrace) + { + invocationId = Tracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + Tracing.Enter(invocationId, this, "ListAsync", tracingParameters); + } + + // Construct URL + string url = (this.Client.Credentials.SubscriptionId != null ? this.Client.Credentials.SubscriptionId.Trim() : "") + "/CloudServices"; + string baseUrl = this.Client.BaseUri.AbsoluteUri; + // Trim '/' character from the end of baseUrl and beginning of url. + if (baseUrl[baseUrl.Length - 1] == '/') + { + baseUrl = baseUrl.Substring(0, baseUrl.Length - 1); + } + if (url[0] == '/') + { + url = url.Substring(1); + } + url = baseUrl + "/" + url; + url = url.Replace(" ", "%20"); + + // Create HTTP transport objects + HttpRequestMessage httpRequest = null; + try + { + httpRequest = new HttpRequestMessage(); + httpRequest.Method = HttpMethod.Get; + httpRequest.RequestUri = new Uri(url); + + // Set Headers + httpRequest.Headers.Add("x-ms-version", "2012-08-01"); + + // Set Credentials + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false); + + // Send Request + HttpResponseMessage httpResponse = null; + try + { + if (shouldTrace) + { + Tracing.SendRequest(invocationId, httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + httpResponse = await this.Client.HttpClient.SendAsync(httpRequest, cancellationToken).ConfigureAwait(false); + if (shouldTrace) + { + Tracing.ReceiveResponse(invocationId, httpResponse); + } + HttpStatusCode statusCode = httpResponse.StatusCode; + if (statusCode != HttpStatusCode.OK) + { + cancellationToken.ThrowIfCancellationRequested(); + CloudException ex = CloudException.Create(httpRequest, null, httpResponse, await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false)); + if (shouldTrace) + { + Tracing.Error(invocationId, ex); + } + throw ex; + } + + // Create Result + CloudServiceListResponse result = null; + // Deserialize Response + cancellationToken.ThrowIfCancellationRequested(); + string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + result = new CloudServiceListResponse(); + XDocument responseDoc = XDocument.Parse(responseContent); + + XElement cloudServicesSequenceElement = responseDoc.Element(XName.Get("CloudServices", "http://schemas.microsoft.com/windowsazure")); + if (cloudServicesSequenceElement != null) + { + foreach (XElement cloudServicesElement in cloudServicesSequenceElement.Elements(XName.Get("CloudService", "http://schemas.microsoft.com/windowsazure"))) + { + CloudServiceListResponse.CloudService cloudServiceInstance = new CloudServiceListResponse.CloudService(); + result.CloudServices.Add(cloudServiceInstance); + + XElement nameElement = cloudServicesElement.Element(XName.Get("Name", "http://schemas.microsoft.com/windowsazure")); + if (nameElement != null) + { + string nameInstance = nameElement.Value; + cloudServiceInstance.Name = nameInstance; + } + + XElement labelElement = cloudServicesElement.Element(XName.Get("Label", "http://schemas.microsoft.com/windowsazure")); + if (labelElement != null) + { + string labelInstance = labelElement.Value; + cloudServiceInstance.Label = labelInstance; + } + + XElement descriptionElement = cloudServicesElement.Element(XName.Get("Description", "http://schemas.microsoft.com/windowsazure")); + if (descriptionElement != null) + { + string descriptionInstance = descriptionElement.Value; + cloudServiceInstance.Description = descriptionInstance; + } + + XElement geoRegionElement = cloudServicesElement.Element(XName.Get("GeoRegion", "http://schemas.microsoft.com/windowsazure")); + if (geoRegionElement != null) + { + string geoRegionInstance = geoRegionElement.Value; + cloudServiceInstance.GeoRegion = geoRegionInstance; + } + + XElement resourcesSequenceElement = cloudServicesElement.Element(XName.Get("Resources", "http://schemas.microsoft.com/windowsazure")); + if (resourcesSequenceElement != null) + { + foreach (XElement resourcesElement in resourcesSequenceElement.Elements(XName.Get("Resource", "http://schemas.microsoft.com/windowsazure"))) + { + CloudServiceResource resourceInstance = new CloudServiceResource(); + cloudServiceInstance.Resources.Add(resourceInstance); + + XElement resourceProviderNamespaceElement = resourcesElement.Element(XName.Get("ResourceProviderNamespace", "http://schemas.microsoft.com/windowsazure")); + if (resourceProviderNamespaceElement != null) + { + string resourceProviderNamespaceInstance = resourceProviderNamespaceElement.Value; + resourceInstance.Namespace = resourceProviderNamespaceInstance; + } + + XElement typeElement = resourcesElement.Element(XName.Get("Type", "http://schemas.microsoft.com/windowsazure")); + if (typeElement != null) + { + string typeInstance = typeElement.Value; + resourceInstance.Type = typeInstance; + } + + XElement nameElement2 = resourcesElement.Element(XName.Get("Name", "http://schemas.microsoft.com/windowsazure")); + if (nameElement2 != null) + { + string nameInstance2 = nameElement2.Value; + resourceInstance.Name = nameInstance2; + } + + XElement planElement = resourcesElement.Element(XName.Get("Plan", "http://schemas.microsoft.com/windowsazure")); + if (planElement != null) + { + string planInstance = planElement.Value; + resourceInstance.Plan = planInstance; + } + + XElement schemaVersionElement = resourcesElement.Element(XName.Get("SchemaVersion", "http://schemas.microsoft.com/windowsazure")); + if (schemaVersionElement != null) + { + string schemaVersionInstance = schemaVersionElement.Value; + resourceInstance.SchemaVersion = schemaVersionInstance; + } + + XElement eTagElement = resourcesElement.Element(XName.Get("ETag", "http://schemas.microsoft.com/windowsazure")); + if (eTagElement != null) + { + string eTagInstance = eTagElement.Value; + resourceInstance.ETag = eTagInstance; + } + + XElement stateElement = resourcesElement.Element(XName.Get("State", "http://schemas.microsoft.com/windowsazure")); + if (stateElement != null) + { + string stateInstance = stateElement.Value; + resourceInstance.State = stateInstance; + } + + XElement subStateElement = resourcesElement.Element(XName.Get("SubState", "http://schemas.microsoft.com/windowsazure")); + if (subStateElement != null) + { + string subStateInstance = subStateElement.Value; + resourceInstance.SubState = subStateInstance; + } + + XElement usageMetersSequenceElement = resourcesElement.Element(XName.Get("UsageMeters", "http://schemas.microsoft.com/windowsazure")); + if (usageMetersSequenceElement != null) + { + foreach (XElement usageMetersElement in usageMetersSequenceElement.Elements(XName.Get("UsageMeter", "http://schemas.microsoft.com/windowsazure"))) + { + CloudServiceResource.UsageLimit usageMeterInstance = new CloudServiceResource.UsageLimit(); + resourceInstance.UsageLimits.Add(usageMeterInstance); + + XElement nameElement3 = usageMetersElement.Element(XName.Get("Name", "http://schemas.microsoft.com/windowsazure")); + if (nameElement3 != null) + { + string nameInstance3 = nameElement3.Value; + usageMeterInstance.Name = nameInstance3; + } + + XElement unitElement = usageMetersElement.Element(XName.Get("Unit", "http://schemas.microsoft.com/windowsazure")); + if (unitElement != null) + { + string unitInstance = unitElement.Value; + usageMeterInstance.Unit = unitInstance; + } + + XElement includedElement = usageMetersElement.Element(XName.Get("Included", "http://schemas.microsoft.com/windowsazure")); + if (includedElement != null) + { + string includedInstance = includedElement.Value; + usageMeterInstance.AmountIncluded = includedInstance; + } + + XElement usedElement = usageMetersElement.Element(XName.Get("Used", "http://schemas.microsoft.com/windowsazure")); + if (usedElement != null) + { + string usedInstance = usedElement.Value; + usageMeterInstance.AmountUsed = usedInstance; + } + } + } + + XElement outputItemsSequenceElement = resourcesElement.Element(XName.Get("OutputItems", "http://schemas.microsoft.com/windowsazure")); + if (outputItemsSequenceElement != null) + { + foreach (XElement outputItemsElement in outputItemsSequenceElement.Elements(XName.Get("OutputItem", "http://schemas.microsoft.com/windowsazure"))) + { + string outputItemsKey = outputItemsElement.Element(XName.Get("Key", "http://schemas.microsoft.com/windowsazure")).Value; + string outputItemsValue = outputItemsElement.Element(XName.Get("Value", "http://schemas.microsoft.com/windowsazure")).Value; + resourceInstance.OutputItems.Add(outputItemsKey, outputItemsValue); + } + } + + XElement intrinsicSettingsElement = resourcesElement.Element(XName.Get("IntrinsicSettings", "http://schemas.microsoft.com/windowsazure")); + if (intrinsicSettingsElement != null) + { + IntrinsicSettings intrinsicSettingsInstance = new IntrinsicSettings(); + resourceInstance.IntrinsicSettingsSection = intrinsicSettingsInstance; + + XElement cacheServiceInputElement = intrinsicSettingsElement.Element(XName.Get("CacheServiceInput", "")); + if (cacheServiceInputElement != null) + { + IntrinsicSettings.CacheServiceInput cacheServiceInputInstance = new IntrinsicSettings.CacheServiceInput(); + intrinsicSettingsInstance.CacheServiceInputSection = cacheServiceInputInstance; + + XElement skuTypeElement = cacheServiceInputElement.Element(XName.Get("SkuType", "")); + if (skuTypeElement != null) + { + CacheServiceSkuType skuTypeInstance = ((CacheServiceSkuType)Enum.Parse(typeof(CacheServiceSkuType), skuTypeElement.Value, true)); + cacheServiceInputInstance.SkuType = skuTypeInstance; + } + + XElement locationElement = cacheServiceInputElement.Element(XName.Get("Location", "")); + if (locationElement != null) + { + string locationInstance = locationElement.Value; + cacheServiceInputInstance.Location = locationInstance; + } + + XElement skuCountElement = cacheServiceInputElement.Element(XName.Get("SkuCount", "")); + if (skuCountElement != null) + { + int skuCountInstance = int.Parse(skuCountElement.Value, CultureInfo.InvariantCulture); + cacheServiceInputInstance.SkuCount = skuCountInstance; + } + + XElement serviceVersionElement = cacheServiceInputElement.Element(XName.Get("ServiceVersion", "")); + if (serviceVersionElement != null) + { + string serviceVersionInstance = serviceVersionElement.Value; + cacheServiceInputInstance.ServiceVersion = serviceVersionInstance; + } + + XElement objectSizeInBytesElement = cacheServiceInputElement.Element(XName.Get("ObjectSizeInBytes", "")); + if (objectSizeInBytesElement != null) + { + int objectSizeInBytesInstance = int.Parse(objectSizeInBytesElement.Value, CultureInfo.InvariantCulture); + cacheServiceInputInstance.ObjectSizeInBytes = objectSizeInBytesInstance; + } + + XElement namedCachesSequenceElement = cacheServiceInputElement.Element(XName.Get("NamedCaches", "")); + if (namedCachesSequenceElement != null) + { + foreach (XElement namedCachesElement in namedCachesSequenceElement.Elements(XName.Get("NamedCache", ""))) + { + IntrinsicSettings.CacheServiceInput.NamedCache namedCacheInstance = new IntrinsicSettings.CacheServiceInput.NamedCache(); + cacheServiceInputInstance.NamedCaches.Add(namedCacheInstance); + + XElement cacheNameElement = namedCachesElement.Element(XName.Get("CacheName", "")); + if (cacheNameElement != null) + { + string cacheNameInstance = cacheNameElement.Value; + namedCacheInstance.CacheName = cacheNameInstance; + } + + XElement notificationsEnabledElement = namedCachesElement.Element(XName.Get("NotificationsEnabled", "")); + if (notificationsEnabledElement != null) + { + bool notificationsEnabledInstance = bool.Parse(notificationsEnabledElement.Value); + namedCacheInstance.NotificationsEnabled = notificationsEnabledInstance; + } + + XElement highAvailabilityEnabledElement = namedCachesElement.Element(XName.Get("HighAvailabilityEnabled", "")); + if (highAvailabilityEnabledElement != null) + { + bool highAvailabilityEnabledInstance = bool.Parse(highAvailabilityEnabledElement.Value); + namedCacheInstance.HighAvailabilityEnabled = highAvailabilityEnabledInstance; + } + + XElement evictionPolicyElement = namedCachesElement.Element(XName.Get("EvictionPolicy", "")); + if (evictionPolicyElement != null) + { + string evictionPolicyInstance = evictionPolicyElement.Value; + namedCacheInstance.EvictionPolicy = evictionPolicyInstance; + } + + XElement expirationSettingsElement = namedCachesElement.Element(XName.Get("ExpirationSettings", "")); + if (expirationSettingsElement != null) + { + IntrinsicSettings.CacheServiceInput.NamedCache.ExpirationSettings expirationSettingsInstance = new IntrinsicSettings.CacheServiceInput.NamedCache.ExpirationSettings(); + namedCacheInstance.ExpirationSettingsSection = expirationSettingsInstance; + + XElement timeToLiveInMinutesElement = expirationSettingsElement.Element(XName.Get("TimeToLiveInMinutes", "")); + if (timeToLiveInMinutesElement != null) + { + int timeToLiveInMinutesInstance = int.Parse(timeToLiveInMinutesElement.Value, CultureInfo.InvariantCulture); + expirationSettingsInstance.TimeToLiveInMinutes = timeToLiveInMinutesInstance; + } + + XElement typeElement2 = expirationSettingsElement.Element(XName.Get("Type", "")); + if (typeElement2 != null) + { + string typeInstance2 = typeElement2.Value; + expirationSettingsInstance.Type = typeInstance2; + } + } + } + } + } + } + } + } + } + } + + result.StatusCode = statusCode; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + + if (shouldTrace) + { + Tracing.Exit(invocationId, result); + } + return result; + } + finally + { + if (httpResponse != null) + { + httpResponse.Dispose(); + } + } + } + finally + { + if (httpRequest != null) + { + httpRequest.Dispose(); + } + } + } + } +} + +namespace Microsoft.WindowsAzure +{ + public static partial class ManagedCacheClientExtensions + { + /// + /// The Get Operation Status operation returns the status of + /// thespecified operation. After calling an asynchronous operation, + /// you can call Get Operation Status to determine whether the + /// operation has succeeded, failed, or is still in progress. (see + /// http://msdn.microsoft.com/en-us/library/windowsazure/ee460783.aspx + /// for more information) + /// + /// + /// Reference to the + /// Microsoft.Azure.Management.ManagedCache.IManagedCacheClient. + /// + /// + /// Required. The request ID for the request you wish to track. The + /// request ID is returned in the x-ms-request-id response header for + /// every request. + /// + /// + /// The response body contains the status of the specified asynchronous + /// operation, indicating whether it has succeeded, is inprogress, or + /// has failed. Note that this status is distinct from the HTTP status + /// code returned for the Get Operation Status operation itself. If + /// the asynchronous operation succeeded, the response body includes + /// the HTTP status code for the successful request. If the + /// asynchronous operation failed, the response body includes the HTTP + /// status code for the failed request, and also includes error + /// information regarding the failure. + /// + public static CloudServiceOperationStatusResponse GetOperationStatus(this IManagedCacheClient operations, string requestId) + { + return Task.Factory.StartNew((object s) => + { + return ((IManagedCacheClient)s).GetOperationStatusAsync(requestId); + } + , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + } + + /// + /// The Get Operation Status operation returns the status of + /// thespecified operation. After calling an asynchronous operation, + /// you can call Get Operation Status to determine whether the + /// operation has succeeded, failed, or is still in progress. (see + /// http://msdn.microsoft.com/en-us/library/windowsazure/ee460783.aspx + /// for more information) + /// + /// + /// Reference to the + /// Microsoft.Azure.Management.ManagedCache.IManagedCacheClient. + /// + /// + /// Required. The request ID for the request you wish to track. The + /// request ID is returned in the x-ms-request-id response header for + /// every request. + /// + /// + /// The response body contains the status of the specified asynchronous + /// operation, indicating whether it has succeeded, is inprogress, or + /// has failed. Note that this status is distinct from the HTTP status + /// code returned for the Get Operation Status operation itself. If + /// the asynchronous operation succeeded, the response body includes + /// the HTTP status code for the successful request. If the + /// asynchronous operation failed, the response body includes the HTTP + /// status code for the failed request, and also includes error + /// information regarding the failure. + /// + public static Task GetOperationStatusAsync(this IManagedCacheClient operations, string requestId) + { + return operations.GetOperationStatusAsync(requestId, CancellationToken.None); + } + } +} + +namespace Microsoft.WindowsAzure +{ + public static partial class CacheServiceOperationsExtensions + { + /// + /// Creates a new Cache Service in specified subscription and cloud + /// service. + /// + /// + /// Reference to the + /// Microsoft.Azure.Management.ManagedCache.ICacheServiceOperations. + /// + /// + /// Required. The name of the cloud service. + /// + /// + /// Required. A name of the cache service. The name can be up to 20 + /// characters in length with minimum 6 characters and must be all + /// lower cases. + /// + /// + /// Required. Parameter supplied to create a cache service + /// + /// + /// A standard service response including an HTTP status code and + /// request ID. + /// + public static OperationResponse BeginCreatingCacheService(this ICacheServiceOperations operations, string cloudServiceName, string cacheServiceName, CacheServiceCreateParameters parameters) + { + return Task.Factory.StartNew((object s) => + { + return ((ICacheServiceOperations)s).BeginCreatingCacheServiceAsync(cloudServiceName, cacheServiceName, parameters); + } + , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + } + + /// + /// Creates a new Cache Service in specified subscription and cloud + /// service. + /// + /// + /// Reference to the + /// Microsoft.Azure.Management.ManagedCache.ICacheServiceOperations. + /// + /// + /// Required. The name of the cloud service. + /// + /// + /// Required. A name of the cache service. The name can be up to 20 + /// characters in length with minimum 6 characters and must be all + /// lower cases. + /// + /// + /// Required. Parameter supplied to create a cache service + /// + /// + /// A standard service response including an HTTP status code and + /// request ID. + /// + public static Task BeginCreatingCacheServiceAsync(this ICacheServiceOperations operations, string cloudServiceName, string cacheServiceName, CacheServiceCreateParameters parameters) + { + return operations.BeginCreatingCacheServiceAsync(cloudServiceName, cacheServiceName, parameters, CancellationToken.None); + } + + /// + /// The begin of deleting Cache Service.This operation is an + /// asynchronous operation. To determine whether service has finished + /// processing the request, call Get Operation. (see + /// http://msdn.microsoft.com/en-us/library/hh758254.aspx for more + /// information) + /// + /// + /// Reference to the + /// Microsoft.Azure.Management.ManagedCache.ICacheServiceOperations. + /// + /// + /// Required. The name of the cloud service. + /// + /// + /// Required. A name of the cache service. + /// + /// + /// A standard service response including an HTTP status code and + /// request ID. + /// + public static OperationResponse BeginDeleting(this ICacheServiceOperations operations, string cloudServiceName, string cacheServiceName) + { + return Task.Factory.StartNew((object s) => + { + return ((ICacheServiceOperations)s).BeginDeletingAsync(cloudServiceName, cacheServiceName); + } + , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + } + + /// + /// The begin of deleting Cache Service.This operation is an + /// asynchronous operation. To determine whether service has finished + /// processing the request, call Get Operation. (see + /// http://msdn.microsoft.com/en-us/library/hh758254.aspx for more + /// information) + /// + /// + /// Reference to the + /// Microsoft.Azure.Management.ManagedCache.ICacheServiceOperations. + /// + /// + /// Required. The name of the cloud service. + /// + /// + /// Required. A name of the cache service. + /// + /// + /// A standard service response including an HTTP status code and + /// request ID. + /// + public static Task BeginDeletingAsync(this ICacheServiceOperations operations, string cloudServiceName, string cacheServiceName) + { + return operations.BeginDeletingAsync(cloudServiceName, cacheServiceName, CancellationToken.None); + } + + /// + /// Get access keys of Cache Service + /// + /// + /// Reference to the + /// Microsoft.Azure.Management.ManagedCache.ICacheServiceOperations. + /// + /// + /// Required. The cloud service name. + /// + /// + /// Required. The cache service name. + /// + /// + /// A standard service response including an HTTP status code and + /// request ID. + /// + public static CheckCacheNameAvailabilityResponse CheckNameAvailability(this ICacheServiceOperations operations, string cloudServiceName, string cacheServiceName) + { + return Task.Factory.StartNew((object s) => + { + return ((ICacheServiceOperations)s).CheckNameAvailabilityAsync(cloudServiceName, cacheServiceName); + } + , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + } + + /// + /// Get access keys of Cache Service + /// + /// + /// Reference to the + /// Microsoft.Azure.Management.ManagedCache.ICacheServiceOperations. + /// + /// + /// Required. The cloud service name. + /// + /// + /// Required. The cache service name. + /// + /// + /// A standard service response including an HTTP status code and + /// request ID. + /// + public static Task CheckNameAvailabilityAsync(this ICacheServiceOperations operations, string cloudServiceName, string cacheServiceName) + { + return operations.CheckNameAvailabilityAsync(cloudServiceName, cacheServiceName, CancellationToken.None); + } + + /// + /// Creates a new Cache Service in specified subscription and cloud + /// service. + /// + /// + /// Reference to the + /// Microsoft.Azure.Management.ManagedCache.ICacheServiceOperations. + /// + /// + /// Required. The name of the cloud service. + /// + /// + /// Required. The name of the cache service. The name can be up to 20 + /// characters in length with minimum 6 characters and must be all + /// lower cases. + /// + /// + /// Required. Parameter supplied to create a cache service + /// + /// + /// The response body contains the status of the specified asynchronous + /// operation, indicating whether it has succeeded, is inprogress, or + /// has failed. Note that this status is distinct from the HTTP status + /// code returned for the Get Operation Status operation itself. If + /// the asynchronous operation succeeded, the response body includes + /// the HTTP status code for the successful request. If the + /// asynchronous operation failed, the response body includes the HTTP + /// status code for the failed request, and also includes error + /// information regarding the failure. + /// + public static CloudServiceOperationStatusResponse CreateCacheService(this ICacheServiceOperations operations, string cloudServiceName, string cacheServiceName, CacheServiceCreateParameters parameters) + { + return Task.Factory.StartNew((object s) => + { + return ((ICacheServiceOperations)s).CreateCacheServiceAsync(cloudServiceName, cacheServiceName, parameters); + } + , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + } + + /// + /// Creates a new Cache Service in specified subscription and cloud + /// service. + /// + /// + /// Reference to the + /// Microsoft.Azure.Management.ManagedCache.ICacheServiceOperations. + /// + /// + /// Required. The name of the cloud service. + /// + /// + /// Required. The name of the cache service. The name can be up to 20 + /// characters in length with minimum 6 characters and must be all + /// lower cases. + /// + /// + /// Required. Parameter supplied to create a cache service + /// + /// + /// The response body contains the status of the specified asynchronous + /// operation, indicating whether it has succeeded, is inprogress, or + /// has failed. Note that this status is distinct from the HTTP status + /// code returned for the Get Operation Status operation itself. If + /// the asynchronous operation succeeded, the response body includes + /// the HTTP status code for the successful request. If the + /// asynchronous operation failed, the response body includes the HTTP + /// status code for the failed request, and also includes error + /// information regarding the failure. + /// + public static Task CreateCacheServiceAsync(this ICacheServiceOperations operations, string cloudServiceName, string cacheServiceName, CacheServiceCreateParameters parameters) + { + return operations.CreateCacheServiceAsync(cloudServiceName, cacheServiceName, parameters, CancellationToken.None); + } + + /// + /// Delete Cache Service in specified subscription and cloud service. + /// (see http://msdn.microsoft.com/en-us/library/hh758254.aspx for + /// more information) + /// + /// + /// Reference to the + /// Microsoft.Azure.Management.ManagedCache.ICacheServiceOperations. + /// + /// + /// Required. The name of the cloud service. + /// + /// + /// Required. A name of the cache service. + /// + /// + /// The response body contains the status of the specified asynchronous + /// operation, indicating whether it has succeeded, is inprogress, or + /// has failed. Note that this status is distinct from the HTTP status + /// code returned for the Get Operation Status operation itself. If + /// the asynchronous operation succeeded, the response body includes + /// the HTTP status code for the successful request. If the + /// asynchronous operation failed, the response body includes the HTTP + /// status code for the failed request, and also includes error + /// information regarding the failure. + /// + public static CloudServiceOperationStatusResponse Delete(this ICacheServiceOperations operations, string cloudServiceName, string cacheServiceName) + { + return Task.Factory.StartNew((object s) => + { + return ((ICacheServiceOperations)s).DeleteAsync(cloudServiceName, cacheServiceName); + } + , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + } + + /// + /// Delete Cache Service in specified subscription and cloud service. + /// (see http://msdn.microsoft.com/en-us/library/hh758254.aspx for + /// more information) + /// + /// + /// Reference to the + /// Microsoft.Azure.Management.ManagedCache.ICacheServiceOperations. + /// + /// + /// Required. The name of the cloud service. + /// + /// + /// Required. A name of the cache service. + /// + /// + /// The response body contains the status of the specified asynchronous + /// operation, indicating whether it has succeeded, is inprogress, or + /// has failed. Note that this status is distinct from the HTTP status + /// code returned for the Get Operation Status operation itself. If + /// the asynchronous operation succeeded, the response body includes + /// the HTTP status code for the successful request. If the + /// asynchronous operation failed, the response body includes the HTTP + /// status code for the failed request, and also includes error + /// information regarding the failure. + /// + public static Task DeleteAsync(this ICacheServiceOperations operations, string cloudServiceName, string cacheServiceName) + { + return operations.DeleteAsync(cloudServiceName, cacheServiceName, CancellationToken.None); + } + + /// + /// Get access keys of Cache Service + /// + /// + /// Reference to the + /// Microsoft.Azure.Management.ManagedCache.ICacheServiceOperations. + /// + /// + /// Required. The cloud service name. + /// + /// + /// Required. The cache service name. + /// + /// + /// A standard service response including an HTTP status code and + /// request ID. + /// + public static CachingKeysResponse GetKeys(this ICacheServiceOperations operations, string cloudServiceName, string cacheServiceName) + { + return Task.Factory.StartNew((object s) => + { + return ((ICacheServiceOperations)s).GetKeysAsync(cloudServiceName, cacheServiceName); + } + , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + } + + /// + /// Get access keys of Cache Service + /// + /// + /// Reference to the + /// Microsoft.Azure.Management.ManagedCache.ICacheServiceOperations. + /// + /// + /// Required. The cloud service name. + /// + /// + /// Required. The cache service name. + /// + /// + /// A standard service response including an HTTP status code and + /// request ID. + /// + public static Task GetKeysAsync(this ICacheServiceOperations operations, string cloudServiceName, string cacheServiceName) + { + return operations.GetKeysAsync(cloudServiceName, cacheServiceName, CancellationToken.None); + } + + /// + /// List supported regions of Cache Service + /// + /// + /// Reference to the + /// Microsoft.Azure.Management.ManagedCache.ICacheServiceOperations. + /// + /// + /// A standard service response including an HTTP status code and + /// request ID. + /// + public static RegionsResponse ListRegions(this ICacheServiceOperations operations) + { + return Task.Factory.StartNew((object s) => + { + return ((ICacheServiceOperations)s).ListRegionsAsync(); + } + , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + } + + /// + /// List supported regions of Cache Service + /// + /// + /// Reference to the + /// Microsoft.Azure.Management.ManagedCache.ICacheServiceOperations. + /// + /// + /// A standard service response including an HTTP status code and + /// request ID. + /// + public static Task ListRegionsAsync(this ICacheServiceOperations operations) + { + return operations.ListRegionsAsync(CancellationToken.None); + } + + /// + /// Regenerate access keys for a Cache Service + /// + /// + /// Reference to the + /// Microsoft.Azure.Management.ManagedCache.ICacheServiceOperations. + /// + /// + /// Required. The cloud service name. + /// + /// + /// Required. The cache service name. + /// + /// + /// Required. Key type + /// + /// + /// A standard service response including an HTTP status code and + /// request ID. + /// + public static CachingKeysResponse RegenerateKeys(this ICacheServiceOperations operations, string cloudServiceName, string cacheServiceName, RegenerateKeysParameters parameters) + { + return Task.Factory.StartNew((object s) => + { + return ((ICacheServiceOperations)s).RegenerateKeysAsync(cloudServiceName, cacheServiceName, parameters); + } + , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + } + + /// + /// Regenerate access keys for a Cache Service + /// + /// + /// Reference to the + /// Microsoft.Azure.Management.ManagedCache.ICacheServiceOperations. + /// + /// + /// Required. The cloud service name. + /// + /// + /// Required. The cache service name. + /// + /// + /// Required. Key type + /// + /// + /// A standard service response including an HTTP status code and + /// request ID. + /// + public static Task RegenerateKeysAsync(this ICacheServiceOperations operations, string cloudServiceName, string cacheServiceName, RegenerateKeysParameters parameters) + { + return operations.RegenerateKeysAsync(cloudServiceName, cacheServiceName, parameters, CancellationToken.None); + } + } +} + +namespace Microsoft.WindowsAzure +{ + public static partial class CloudServiceOperationsExtensions + { + /// + /// Create a cloud service. + /// + /// + /// Reference to the + /// Microsoft.Azure.Management.ManagedCache.ICloudServiceOperations. + /// + /// + /// Required. The cloud service name. + /// + /// + /// Required. Parameters supplied to the Create cloud service operation. + /// + /// + /// A standard service response including an HTTP status code and + /// request ID. + /// + public static OperationResponse BeginCreating(this ICloudServiceOperations operations, string cloudServiceName, CloudServiceCreateParameters parameters) + { + return Task.Factory.StartNew((object s) => + { + return ((ICloudServiceOperations)s).BeginCreatingAsync(cloudServiceName, parameters); + } + , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + } + + /// + /// Create a cloud service. + /// + /// + /// Reference to the + /// Microsoft.Azure.Management.ManagedCache.ICloudServiceOperations. + /// + /// + /// Required. The cloud service name. + /// + /// + /// Required. Parameters supplied to the Create cloud service operation. + /// + /// + /// A standard service response including an HTTP status code and + /// request ID. + /// + public static Task BeginCreatingAsync(this ICloudServiceOperations operations, string cloudServiceName, CloudServiceCreateParameters parameters) + { + return operations.BeginCreatingAsync(cloudServiceName, parameters, CancellationToken.None); + } + + /// + /// Create a cloud service. + /// + /// + /// Reference to the + /// Microsoft.Azure.Management.ManagedCache.ICloudServiceOperations. + /// + /// + /// Required. The cloud service name. + /// + /// + /// Required. Parameters supplied to the Create cloud service operation. + /// + /// + /// The response body contains the status of the specified asynchronous + /// operation, indicating whether it has succeeded, is inprogress, or + /// has failed. Note that this status is distinct from the HTTP status + /// code returned for the Get Operation Status operation itself. If + /// the asynchronous operation succeeded, the response body includes + /// the HTTP status code for the successful request. If the + /// asynchronous operation failed, the response body includes the HTTP + /// status code for the failed request, and also includes error + /// information regarding the failure. + /// + public static CloudServiceOperationStatusResponse Create(this ICloudServiceOperations operations, string cloudServiceName, CloudServiceCreateParameters parameters) + { + return Task.Factory.StartNew((object s) => + { + return ((ICloudServiceOperations)s).CreateAsync(cloudServiceName, parameters); + } + , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + } + + /// + /// Create a cloud service. + /// + /// + /// Reference to the + /// Microsoft.Azure.Management.ManagedCache.ICloudServiceOperations. + /// + /// + /// Required. The cloud service name. + /// + /// + /// Required. Parameters supplied to the Create cloud service operation. + /// + /// + /// The response body contains the status of the specified asynchronous + /// operation, indicating whether it has succeeded, is inprogress, or + /// has failed. Note that this status is distinct from the HTTP status + /// code returned for the Get Operation Status operation itself. If + /// the asynchronous operation succeeded, the response body includes + /// the HTTP status code for the successful request. If the + /// asynchronous operation failed, the response body includes the HTTP + /// status code for the failed request, and also includes error + /// information regarding the failure. + /// + public static Task CreateAsync(this ICloudServiceOperations operations, string cloudServiceName, CloudServiceCreateParameters parameters) + { + return operations.CreateAsync(cloudServiceName, parameters, CancellationToken.None); + } + + /// + /// Retrieve a cloud service. + /// + /// + /// Reference to the + /// Microsoft.Azure.Management.ManagedCache.ICloudServiceOperations. + /// + /// + /// Required. The cloud service name. + /// + /// + /// Information about a retrieved Cloud Service. + /// + public static CloudServiceGetResponse Get(this ICloudServiceOperations operations, string cloudServiceName) + { + return Task.Factory.StartNew((object s) => + { + return ((ICloudServiceOperations)s).GetAsync(cloudServiceName); + } + , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + } + + /// + /// Retrieve a cloud service. + /// + /// + /// Reference to the + /// Microsoft.Azure.Management.ManagedCache.ICloudServiceOperations. + /// + /// + /// Required. The cloud service name. + /// + /// + /// Information about a retrieved Cloud Service. + /// + public static Task GetAsync(this ICloudServiceOperations operations, string cloudServiceName) + { + return operations.GetAsync(cloudServiceName, CancellationToken.None); + } + + /// + /// The List Cloud Services operation enumerates services that are + /// provisioned for a subscription. + /// + /// + /// Reference to the + /// Microsoft.Azure.Management.ManagedCache.ICloudServiceOperations. + /// + /// + /// The response structure for the Cloud Service List operation. + /// + public static CloudServiceListResponse List(this ICloudServiceOperations operations) + { + return Task.Factory.StartNew((object s) => + { + return ((ICloudServiceOperations)s).ListAsync(); + } + , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + } + + /// + /// The List Cloud Services operation enumerates services that are + /// provisioned for a subscription. + /// + /// + /// Reference to the + /// Microsoft.Azure.Management.ManagedCache.ICloudServiceOperations. + /// + /// + /// The response structure for the Cloud Service List operation. + /// + public static Task ListAsync(this ICloudServiceOperations operations) + { + return operations.ListAsync(CancellationToken.None); + } + } +} diff --git a/src/ServiceManagement/ManagedCache/Commands.ManagedCache/packages.config b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/packages.config new file mode 100644 index 000000000000..fbe39bb5fc17 --- /dev/null +++ b/src/ServiceManagement/ManagedCache/Commands.ManagedCache/packages.config @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Network/Commands.Network.Test/Commands.Network.Test.csproj b/src/ServiceManagement/Network/Commands.Network.Test/Commands.Network.Test.csproj new file mode 100644 index 000000000000..de6c36559181 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network.Test/Commands.Network.Test.csproj @@ -0,0 +1,237 @@ + + + + + Debug + AnyCPU + {FDB897BD-FCB4-44A1-8D66-AC99F22EC737} + Library + Properties + Microsoft.Azure.Commands.Network.Test + Microsoft.Azure.Commands.Network.Test + v4.5 + 512 + + ..\..\..\ + true + + + bin\Release\ + TRACE;SIGN + true + pdbonly + true + MSSharedLibKey.snk + true + true + prompt + false + false + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + + False + ..\..\..\packages\Hydra.HttpRecorder.1.0.5417.13285-prerelease\lib\net45\Microsoft.Azure.Utilities.HttpRecorder.dll + + + ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll + + + ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll + + + ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll + + + False + ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll + + + False + ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.2.0.0\lib\net40\Microsoft.WindowsAzure.Management.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.6.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.Management.MediaServices.2.0.0\lib\net40\Microsoft.WindowsAzure.Management.MediaServices.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.Management.Monitoring.1.0.0\lib\net40\Microsoft.WindowsAzure.Management.Monitoring.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Network.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.Management.Scheduler.3.0.0\lib\net40\Microsoft.WindowsAzure.Management.Scheduler.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.Management.Sql.3.0.0\lib\net40\Microsoft.WindowsAzure.Management.Sql.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.3.0.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.Management.WebSites.3.0.0\lib\net40\Microsoft.WindowsAzure.Management.WebSites.dll + + + False + ..\..\..\packages\Hydra.SpecTestSupport.1.0.5417.13285-prerelease\lib\net45\Microsoft.WindowsAzure.Testing.dll + + + False + ..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll + + + False + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + + + + + + False + C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Management.Automation\v4.0_3.0.0.0__31bf3856ad364e35\System.Management.Automation.dll + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll + + + + + + + + False + ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + + + + + + + + + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + {C1BDA476-A5CC-4394-914D-48B0EC31A710} + Commands.ScenarioTests.Common + + + {46c06ed8-43d9-41fd-b73b-41547d9c04e1} + Commands.Network + + + + + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + + + + + + + xcopy "$(SolutionDir)Package\$(ConfigurationName)\*.*" $(TargetDir) /Y /E + + \ No newline at end of file diff --git a/src/ServiceManagement/Network/Commands.Network.Test/MSSharedLibKey.snk b/src/ServiceManagement/Network/Commands.Network.Test/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ServiceManagement/Network/Commands.Network.Test/MSSharedLibKey.snk differ diff --git a/src/ServiceManagement/Network/Commands.Network.Test/Properties/AssemblyInfo.cs b/src/ServiceManagement/Network/Commands.Network.Test/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..301e121a8714 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network.Test/Properties/AssemblyInfo.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Reflection; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Network Test Assembly")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Network Test Assembly")] +[assembly: AssemblyCopyright("Copyright © Microsoft")] + +[assembly: ComVisible(false)] +[assembly: CLSCompliant(false)] +[assembly: Guid("3E5D3114-DEBB-4DC2-BB9D-CF2A2707F74D")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/ServiceManagement/Network/Commands.Network.Test/ScenarioTests/NetworkSecurityGroup/Common.ps1 b/src/ServiceManagement/Network/Commands.Network.Test/ScenarioTests/NetworkSecurityGroup/Common.ps1 new file mode 100644 index 000000000000..a5159eda70ef --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network.Test/ScenarioTests/NetworkSecurityGroup/Common.ps1 @@ -0,0 +1,100 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +$ErrorActionPreference = "Stop" + +$NetworkSecurityGroupPrefix = "onesdk"; + +$NSGLabel = "Scenario Test NSG" + +$locations = Get-AzureLocation +$Location = $locations[0].Name + +$RuleType = "Outbound" +$RulePriority = 500 +$RuleAction = "Deny" +$RuleSourceAddressPrefix = "*" +$RuleSourcePortRange = "*" +$RuleDestinationAddressPrefix = "*" +$RuleDestinationPortRange = "*" +$RuleProtocol = "TCP" + +$VirtualNetworkName = "VirtualNetworkSiteName" +$SubnetName = "FrontEndSubnet" + + +<# +.SYNOPSIS +Gets valid Security Group name. +#> +function Get-SecurityGroupName +{ + $name = getAssetName + Write-Debug "Using network security group with name: $name" + return $name +} + +<# +.SYNOPSIS +Gets valid Security Rule name. +#> +function Get-SecurityRuleName +{ + $name = getAssetName + Write-Debug "Using network security rule with name: $name" + return $name +} + +<# +.SYNOPSIS +Creates a Security Group. +#> +function New-NetworkSecurityGroup +{ + param([string] $securityGroupName) + + New-AzureNetworkSecurityGroup -Name $securityGroupName -Location $location -Label $NSGLabel +} + +<# +.SYNOPSIS +Creates a Security Group. +#> +function Set-NetworkSecurityRule +{ + param([string] $securityRuleName, [object] $securityGroup) + + Set-AzureNetworkSecurityRule -Name $securityRuleName -Type $RuleType -Priority $RulePriority -Action $RuleAction -SourceAddressPrefix $RuleSourceAddressPrefix -SourcePortRange $RuleSourcePortRange -DestinationAddressPrefix $RuleDestinationAddressPrefix -DestinationPortRange $RuleDestinationPortRange -Protocol $RuleProtocol -NetworkSecurityGroup $securityGroup +} + +<# +.SYNOPSIS +Creates a Security Group. +#> +function Get-NetworkSecurityGroupForSubnet +{ + Get-AzureNetworkSecurityGroupForSubnet -VirtualNetworkName $VirtualNetworkName -SubnetName $SubnetName +} + + + +<# +.SYNOPSIS +Removes all profiles from the $profileNames list from the current subscription. +#> +function Initialize-NetworkSecurityGroupTest +{ + Set-AzureVNetConfig ($(Get-Location).Path + "\TestData\EmptyNetworkConfiguration.xml") + Get-AzureNetworkSecurityGroup | Where-Object { $_.Name.StartsWith($NetworkSecurityGroupPrefix) } | Remove-AzureNetworkSecurityGroup -Force +} diff --git a/src/ServiceManagement/Network/Commands.Network.Test/ScenarioTests/NetworkSecurityGroup/NSGScenarioTests.cs b/src/ServiceManagement/Network/Commands.Network.Test/ScenarioTests/NetworkSecurityGroup/NSGScenarioTests.cs new file mode 100644 index 000000000000..76088876f3c2 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network.Test/ScenarioTests/NetworkSecurityGroup/NSGScenarioTests.cs @@ -0,0 +1,129 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Net; +using Microsoft.WindowsAzure.Management.Network; + +namespace Microsoft.Azure.Commands.Network.Test.ScenarioTests +{ + using System.Collections.Generic; + using System.IO; + using System.Linq; + using Microsoft.WindowsAzure.Commands.ScenarioTest; + using Microsoft.WindowsAzure.Commands.Utilities.Common; + using Microsoft.WindowsAzure.Testing; + using Xunit; + using Microsoft.WindowsAzure.Management; + + public class NSGScenarioTests + { + public NSGScenarioTests() + { + this.RunPowerShellTest("Initialize-NetworkSecurityGroupTest"); + } + + private readonly EnvironmentSetupHelper helper = new EnvironmentSetupHelper(); + + [Fact] + [Trait(Category.Service, Category.Network)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestCreateAndRemoveNSG() + { + this.RunPowerShellTest("Test-CreateAndRemoveNetworkSecurityGroup"); + } + + [Fact] + [Trait(Category.Service, Category.Network)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestRemoveNSGWithNonExistingName() + { + this.RunPowerShellTest("Test-RemoveNetworkSecurityGroupWithNonExistingName"); + } + + [Fact] + [Trait(Category.Service, Category.Network)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestGetMultipleNSGs() + { + this.RunPowerShellTest("Test-GetMultipleNetworkSecurityGroups"); + } + + [Fact] + [Trait(Category.Service, Category.Network)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestSetNSR() + { + this.RunPowerShellTest("Test-SetNetworkSecurityRule"); + } + + [Fact] + [Trait(Category.Service, Category.Network)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestSetNSRWithInvalidParameter() + { + this.RunPowerShellTest("Test-SetNetworkSecurityRuleWithInvalidParameter"); + } + + [Fact] + [Trait(Category.Service, Category.Network)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestRemoveNSR() + { + this.RunPowerShellTest("Test-RemoveNetworkSecurityRule"); + } + + [Fact] + [Trait(Category.Service, Category.Network)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestSetAndGetNSGForSubnet() + { + this.RunPowerShellTest("Test-SetAndGetNetworkSecurityGroupForSubnet"); + } + + [Fact] + [Trait(Category.Service, Category.Network)] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void TestRemoveNSGFromSubnet() + { + this.RunPowerShellTest("Test-RemoveNetworkSecurityGroupFromSubnet"); + } + + #region Test setup + protected void SetupManagementClients() + { + var client = TestBase.GetServiceClient(new RDFETestEnvironmentFactory()); + var client2 = TestBase.GetServiceClient(new RDFETestEnvironmentFactory()); + helper.SetupSomeOfManagementClients(client, client2); + } + + protected void RunPowerShellTest(params string[] scripts) + { + using (UndoContext context = UndoContext.Current) + { + context.Start(TestUtilities.GetCallingClass(2), TestUtilities.GetCurrentMethodName(2)); + + List modules = Directory.GetFiles("ScenarioTests\\NetworkSecurityGroup", "*.ps1").ToList(); + modules.Add("Common.ps1"); + + SetupManagementClients(); + + helper.SetupEnvironment(AzureModule.AzureServiceManagement); + helper.SetupModules(AzureModule.AzureServiceManagement, modules.ToArray()); + + helper.RunPowerShellTest(scripts); + } + } + #endregion + } +} diff --git a/src/ServiceManagement/Network/Commands.Network.Test/ScenarioTests/NetworkSecurityGroup/NetworkSecurityGroupTests.ps1 b/src/ServiceManagement/Network/Commands.Network.Test/ScenarioTests/NetworkSecurityGroup/NetworkSecurityGroupTests.ps1 new file mode 100644 index 000000000000..661cec11cb1c --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network.Test/ScenarioTests/NetworkSecurityGroup/NetworkSecurityGroupTests.ps1 @@ -0,0 +1,198 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +########################## New Network Security Group Tests ############################# + +<# +.SYNOPSIS +Tests New-AzureNetworkSecurityGroup and Remove-AzureNetworkSecurityGroup. +#> +function Test-CreateAndRemoveNetworkSecurityGroup +{ + # Setup + $securityGroupName = Get-SecurityGroupName + New-NetworkSecurityGroup $securityGroupName + + # Test + $isDeleted = Remove-AzureNetworkSecurityGroup -Name $securityGroupName -Force -PassThru + + # Assert + Assert-True { $isDeleted } "Failed to delete Network Security Group $securityGroupName" + Assert-Throws { Get-AzureNetworkSecurityGroup -Name $securityGroupName } "ResourceNotFound: The Network Security Group $securityGroupName does not exist." +} + +<# +.SYNOPSIS +Tests Remove-AzureNetworkSecurityGroup with non existing name +#> +function Test-RemoveNetworkSecurityGroupWithNonExistingName +{ + # Setup + $nonExistingSecurityGroupName = Get-SecurityGroupName "nonexisting" + + # Assert + Assert-Throws { Remove-AzureNetworkSecurityGroup -Name $nonExistingSecurityGroupName -Force } "ResourceNotFound : The Network Security Group $nonExistingSecurityGroupName does not exist." +} + + +########################## Get Network Security Group Tests ############################# + +<# +.SYNOPSIS +Tests Get-AzureNetworkSecurityGroup +#> +function Test-GetSecurityGroup +{ + # Setup + $securityGroupName = Get-SecurityGroupName + $createdSecurityGroup = New-NetworkSecurityGroup $securityGroupName + + # Test + $retrievedSecurityGroup = Get-AzureNetworkSecurityGroup $securityGroupName + + # Assert + Assert-AreEqualObjectProperties $createdSecurityGroup $retrievedSecurityGroup +} + +<# +.SYNOPSIS +Tests Get-AzureNetworkSecurityGroup +#> +function Test-GetMultipleNetworkSecurityGroups +{ + # Setup + $securityGroupName1 = "$(Get-SecurityGroupName)1" + $securityGroupName2 = "$(Get-SecurityGroupName)2" + + $createdSecurityGroup1 = New-NetworkSecurityGroup $securityGroupName1 + $createdSecurityGroup2 = New-NetworkSecurityGroup $securityGroupName2 + + # Test + $retrievedSecurityGroups = Get-AzureNetworkSecurityGroup + + # Assert + Assert-True { $($retrievedSecurityGroups | select -ExpandProperty Name) -Contains $securityGroupName1 } "Assert failed, security group '$securityGroupName1' not found" + Assert-True { $($retrievedSecurityGroups | select -ExpandProperty Name) -Contains $securityGroupName2 } "Assert failed, security group '$securityGroupName2' not found" +} + +########################## Set Network Security Rule Tests ############################# + +<# +.SYNOPSIS +Tests Set-AzureNetworkSecurityRule +#> +function Test-SetNetworkSecurityRule +{ + # Setup + $securityGroupName = Get-SecurityGroupName + $securityRuleName = Get-SecurityRuleName + $createdSecurityGroup = New-NetworkSecurityGroup $securityGroupName + + # Test + $addedRuleGroup = Set-NetworkSecurityRule $securityRuleName $createdSecurityGroup + + # Assert + Assert-AreEqual $securityRuleName $addedRuleGroup.Rules[0].Name + Assert-AreEqual $RuleType $addedRuleGroup.Rules[0].Type + Assert-AreEqual $RulePriority $addedRuleGroup.Rules[0].Priority + Assert-AreEqual $RuleAction $addedRuleGroup.Rules[0].Action + Assert-AreEqual $RuleSourceAddressPrefix $addedRuleGroup.Rules[0].SourceAddressPrefix + Assert-AreEqual $RuleSourcePortRange $addedRuleGroup.Rules[0].SourcePortRange + Assert-AreEqual $RuleDestinationAddressPrefix $addedRuleGroup.Rules[0].DestinationAddressPrefix + Assert-AreEqual $RuleDestinationPortRange $addedRuleGroup.Rules[0].DestinationPortRange + Assert-AreEqual $RuleProtocol $addedRuleGroup.Rules[0].Protocol +} + +<# +.SYNOPSIS +Tests Set-AzureNetworkSecurityRule with invalid parameter +#> +function Test-SetNetworkSecurityRuleWithInvalidParameter +{ + # Setup + $securityGroupName = Get-SecurityGroupName + $securityRuleName = Get-SecurityRuleName + $createdSecurityGroup = New-NetworkSecurityGroup $securityGroupName + + # Assert + $expectedMessage = "BadRequest: The Source Address Prefix provided 'INVALID' is invalid. Please provide correct CIDR address or one of the allowed Address Tags." + Assert-Throws { Set-AzureNetworkSecurityRule -Name $securityRuleName -Type $RuleType -Priority $RulePriority -Action $RuleAction -SourceAddressPrefix "INVALID" -SourcePortRange $RuleSourcePortRange -DestinationAddressPrefix $RuleDestinationAddressPrefix -DestinationPortRange $RuleDestinationPortRange -Protocol $RuleProtocol -NetworkSecurityGroup $createdSecurityGroup } $expectedMessage +} + +########################## Remove Network Security Rule Tests ############################# + +<# +.SYNOPSIS +Tests Remove-AzureNetworkSecurityRule +#> +function Test-RemoveNetworkSecurityRule +{ + # Setup + $securityGroupName = Get-SecurityGroupName + $securityRuleName = Get-SecurityRuleName + $createdSecurityGroup = New-NetworkSecurityGroup $securityGroupName + $addedRuleGroup = Set-NetworkSecurityRule $securityRuleName $createdSecurityGroup + + # Test + Remove-AzureNetworkSecurityRule -Name $securityRuleName -NetworkSecurityGroup $addedRuleGroup -Force + $NoRulesGroup = Get-AzureNetworkSecurityGroup -Name $securityGroupName -Detailed + + # Assert + Assert-AreEqual $addedRuleGroup.Rules.Count ($NoRulesGroup.Rules.Count + 1) +} + +########################## Set and Get Network Security Group for Subnet Tests ############################# + +<# +.SYNOPSIS +Tests Set and Get-AzureNetworkSecurityGroupForSubnet +#> +function Test-SetAndGetNetworkSecurityGroupForSubnet +{ + # Setup + $securityGroupName = Get-SecurityGroupName + $securityRuleName = Get-SecurityRuleName + $createdSecurityGroup = New-NetworkSecurityGroup $securityGroupName + Set-AzureVNetConfig ($(Get-Location).Path + "\TestData\SimpleNetworkConfiguration.xml") + Set-AzureNetworkSecurityGroupToSubnet -Name $securityGroupName -VirtualNetwork $VirtualNetworkName -Subnet $SubnetName -Force + + # Test + $securityGroupFromSubnet = Get-AzureNetworkSecurityGroupForSubnet -VirtualNetwork $VirtualNetworkName -Subnet $SubnetName + + # Assert + Assert-AreEqual $securityGroupFromSubnet.Name $securityGroupName +} + +########################## Remove Network Security Group for Subnet Tests ############################# + +<# +.SYNOPSIS +Tests Remove-AzureNetworkSecurityGroupFromSubnet +#> +function Test-RemoveNetworkSecurityGroupFromSubnet +{ + # Setup + $securityGroupName = Get-SecurityGroupName + $securityRuleName = Get-SecurityRuleName + $createdSecurityGroup = New-NetworkSecurityGroup $securityGroupName + Set-AzureVNetConfig ($(Get-Location).Path + "\TestData\SimpleNetworkConfiguration.xml") + Set-AzureNetworkSecurityGroupToSubnet -Name $securityGroupName -VirtualNetwork $VirtualNetworkName -Subnet $SubnetName -Force + + # Test + Remove-AzureNetworkSecurityGroupFromSubnet -Name $securityGroupName -VirtualNetwork $VirtualNetworkName -Subnet $SubnetName -Force + + # Assert + $expectedMessage = "ResourceNotFound: The virtual network name $VirtualNetworkName and subnet $SubnetName does not have any network security group assigned." + Assert-Throws { Get-AzureNetworkSecurityGroupForSubnet -VirtualNetwork $VirtualNetworkName -Subnet $SubnetName } $expectedMessage +} diff --git a/src/ServiceManagement/Network/Commands.Network.Test/ScenarioTests/NetworkTests.cs b/src/ServiceManagement/Network/Commands.Network.Test/ScenarioTests/NetworkTests.cs new file mode 100644 index 000000000000..54538a8e8db4 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network.Test/ScenarioTests/NetworkTests.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Network.Test.ScenarioTests +{ + using WindowsAzure.Commands.ScenarioTest; + using Xunit; + + public class NetworkTests : NetworkTestsBase + { + [Fact(Skip = "Exploratory test by someone else not passing")] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void GetGatewayWhenGatewayDoesntExist() + { + this.RunPowerShellTest("GetGateway-WhenGatewayDoesntExist"); + } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network.Test/ScenarioTests/NetworkTests.ps1 b/src/ServiceManagement/Network/Commands.Network.Test/ScenarioTests/NetworkTests.ps1 new file mode 100644 index 000000000000..8ed7bd74adc2 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network.Test/ScenarioTests/NetworkTests.ps1 @@ -0,0 +1,23 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +########################## Network End to End Scenario Tests ############################# + +[string]$vnetName = "MockVnetName" + +function GetGateway-WhenGatewayDoesntExist +{ + $getResponse = Get-AzureVnetGateway $vnetName + Assert-NotNull $getResponse +} \ No newline at end of file diff --git a/src/ServiceManagement/Network/Commands.Network.Test/ScenarioTests/NetworkTestsBase.cs b/src/ServiceManagement/Network/Commands.Network.Test/ScenarioTests/NetworkTestsBase.cs new file mode 100644 index 000000000000..36be43cff76b --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network.Test/ScenarioTests/NetworkTestsBase.cs @@ -0,0 +1,61 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Testing; + +namespace Microsoft.Azure.Commands.Network.Test.ScenarioTests +{ + using WindowsAzure.Management.Network; + + public abstract class NetworkTestsBase + { + private const string testsFilePath = @"ScenarioTests\NetworkTests.ps1"; + + private readonly EnvironmentSetupHelper helper; + + protected NetworkTestsBase() + { + helper = new EnvironmentSetupHelper(); + } + + protected void SetupManagementClients() + { + NetworkManagementClient networkManagementClient = GetNetworkManagementClient(); + + helper.SetupManagementClients(networkManagementClient); + } + + protected void RunPowerShellTest(params string[] scripts) + { + using (UndoContext context = UndoContext.Current) + { + context.Start(TestUtilities.GetCallingClass(2), TestUtilities.GetCurrentMethodName(2)); + + SetupManagementClients(); + + helper.SetupEnvironment(AzureModule.AzureServiceManagement); + helper.SetupModules(AzureModule.AzureServiceManagement, testsFilePath); + + helper.RunPowerShellTest(scripts); + } + } + + protected NetworkManagementClient GetNetworkManagementClient() + { + return TestBase.GetServiceClient(new RDFETestEnvironmentFactory()); + } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network.Test/SessionRecords/Microsoft.Azure.Commands.Network.Test.ScenarioTests.NSGScenarioTests/.ctor.json b/src/ServiceManagement/Network/Commands.Network.Test/SessionRecords/Microsoft.Azure.Commands.Network.Test.ScenarioTests.NSGScenarioTests/.ctor.json new file mode 100644 index 000000000000..e434c612391f --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network.Test/SessionRecords/Microsoft.Azure.Commands.Network.Test.ScenarioTests.NSGScenarioTests/.ctor.json @@ -0,0 +1,314 @@ +{ + "Entries": [ + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/locations", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9sb2NhdGlvbnM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/1.0.0.0", + "AzurePowershell/v0.8.9" + ] + }, + "ResponseBody": "\r\n \r\n North Central US\r\n North Central US\r\n \r\n Compute\r\n Storage\r\n PersistentVMRole\r\n \r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n \r\n \r\n West US\r\n West US\r\n \r\n Compute\r\n Storage\r\n PersistentVMRole\r\n \r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "90002b98149e23708e876b3156f8ffff" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:21:03 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/90002b98149e23708e876b3156f8ffff", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zLzkwMDAyYjk4MTQ5ZTIzNzA4ZTg3NmIzMTU2ZjhmZmZm", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/1.0.0.0", + "AzurePowershell/v0.8.9" + ] + }, + "ResponseBody": "\r\n 90002b98-149e-2370-8e87-6b3156f8ffff\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "b393774b1823282495a2aa9d3da192f2" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:21:04 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/media", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL21lZGlh", + "RequestMethod": "PUT", + "RequestBody": "\r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "159" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-request-id": [ + "324579022e8f206f904ab0ba78c2d7a2" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:21:05 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/324579022e8f206f904ab0ba78c2d7a2", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zLzMyNDU3OTAyMmU4ZjIwNmY5MDRhYjBiYTc4YzJkN2Ey", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "159" + ] + }, + "ResponseBody": "\r\n 32457902-2e8f-206f-904a-b0ba78c2d7a2\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "f92a5bb2b4f92de4848df93dc9874c37" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:21:06 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/324579022e8f206f904ab0ba78c2d7a2", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zLzMyNDU3OTAyMmU4ZjIwNmY5MDRhYjBiYTc4YzJkN2Ey", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "159" + ] + }, + "ResponseBody": "\r\n 32457902-2e8f-206f-904a-b0ba78c2d7a2\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "f2eae6b827652987be0f92f023dc9583" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:21:37 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/networksecuritygroups", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL25ldHdvcmtzZWN1cml0eWdyb3Vwcw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "\r\n \r\n NetworkTests1329\r\n \r\n North Central US\r\n \r\n \r\n NetworkTests2209\r\n \r\n North Central US\r\n \r\n \r\n NetworkTests8401\r\n \r\n North Central US\r\n \r\n \r\n onesdk6910\r\n \r\n North Central US\r\n \r\n \r\n randomName\r\n \r\n West US\r\n \r\n \r\n randomName2\r\n \r\n West US\r\n \r\n \r\n securityGroupName\r\n North Central US\r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "b30a7959cd72240387e1021cce3cb18b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:21:37 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/networksecuritygroups/onesdk6910", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL25ldHdvcmtzZWN1cml0eWdyb3Vwcy9vbmVzZGs2OTEw", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "164" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-request-id": [ + "88cb4014c7062302b8aa0c49f0d04f81" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:21:39 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/88cb4014c7062302b8aa0c49f0d04f81", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zLzg4Y2I0MDE0YzcwNjIzMDJiOGFhMGM0OWYwZDA0Zjgx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "164" + ] + }, + "ResponseBody": "\r\n 88cb4014-c706-2302-b8aa-0c49f0d04f81\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "909d028dea1e2bf395c6245044aa3673" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:21:39 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/88cb4014c7062302b8aa0c49f0d04f81", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zLzg4Y2I0MDE0YzcwNjIzMDJiOGFhMGM0OWYwZDA0Zjgx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "164" + ] + }, + "ResponseBody": "\r\n 88cb4014-c706-2302-b8aa-0c49f0d04f81\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "ff2171d6253d269b86adf91750ef38e2" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:22:11 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": {} +} \ No newline at end of file diff --git a/src/ServiceManagement/Network/Commands.Network.Test/SessionRecords/Microsoft.Azure.Commands.Network.Test.ScenarioTests.NSGScenarioTests/TestCreateAndRemoveNSG.json b/src/ServiceManagement/Network/Commands.Network.Test/SessionRecords/Microsoft.Azure.Commands.Network.Test.ScenarioTests.NSGScenarioTests/TestCreateAndRemoveNSG.json new file mode 100644 index 000000000000..836d6b9de054 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network.Test/SessionRecords/Microsoft.Azure.Commands.Network.Test.ScenarioTests.NSGScenarioTests/TestCreateAndRemoveNSG.json @@ -0,0 +1,350 @@ +{ + "Entries": [ + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/locations", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9sb2NhdGlvbnM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/1.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n \r\n North Central US\r\n North Central US\r\n \r\n Compute\r\n Storage\r\n PersistentVMRole\r\n \r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n \r\n \r\n West US\r\n West US\r\n \r\n Compute\r\n Storage\r\n PersistentVMRole\r\n \r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "0d407ff22cad25f59565671c2ebbb224" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:15:46 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/0d407ff22cad25f59565671c2ebbb224", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zLzBkNDA3ZmYyMmNhZDI1ZjU5NTY1NjcxYzJlYmJiMjI0", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/1.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n 0d407ff2-2cad-25f5-9565-671c2ebbb224\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "b6c57592e54c2a45b5aa08a834f09150" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:15:46 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/networksecuritygroups", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL25ldHdvcmtzZWN1cml0eWdyb3Vwcw==", + "RequestMethod": "POST", + "RequestBody": "\r\n onesdk1679\r\n \r\n North Central US\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "102" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-request-id": [ + "7a7f3df488782f86860b8d61a2259e32" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:15:47 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/7a7f3df488782f86860b8d61a2259e32", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zLzdhN2YzZGY0ODg3ODJmODY4NjBiOGQ2MWEyMjU5ZTMy", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "102" + ] + }, + "ResponseBody": "\r\n 7a7f3df4-8878-2f86-860b-8d61a2259e32\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "39ea466914b02d28bb7fdea820359b23" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:15:48 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/7a7f3df488782f86860b8d61a2259e32", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zLzdhN2YzZGY0ODg3ODJmODY4NjBiOGQ2MWEyMjU5ZTMy", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "102" + ] + }, + "ResponseBody": "\r\n 7a7f3df4-8878-2f86-860b-8d61a2259e32\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "827297175ba4208a9e9bf85b1d7279bb" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:16:18 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/networksecuritygroups/onesdk1679?", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL25ldHdvcmtzZWN1cml0eWdyb3Vwcy9vbmVzZGsxNjc5Pw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "\r\n onesdk1679\r\n \r\n North Central US\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "0ffac78a638920b8bd7c5d09dc033389" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:16:18 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/networksecuritygroups/onesdk1679?", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL25ldHdvcmtzZWN1cml0eWdyb3Vwcy9vbmVzZGsxNjc5Pw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "\r\n ResourceNotFound\r\n The Network Security Group onesdk1679 does not exist.\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "398ac1ad62cc21ce99fa1b36913437ec" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:16:52 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/networksecuritygroups/onesdk1679", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL25ldHdvcmtzZWN1cml0eWdyb3Vwcy9vbmVzZGsxNjc5", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "107" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-request-id": [ + "3eb11b0270b9259d9544ef65793df3a3" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:16:21 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/3eb11b0270b9259d9544ef65793df3a3", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zLzNlYjExYjAyNzBiOTI1OWQ5NTQ0ZWY2NTc5M2RmM2Ez", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "107" + ] + }, + "ResponseBody": "\r\n 3eb11b02-70b9-259d-9544-ef65793df3a3\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "b0e953d8f6022f1186afe8bb335f195f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:16:21 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/3eb11b0270b9259d9544ef65793df3a3", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zLzNlYjExYjAyNzBiOTI1OWQ5NTQ0ZWY2NTc5M2RmM2Ez", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "107" + ] + }, + "ResponseBody": "\r\n 3eb11b02-70b9-259d-9544-ef65793df3a3\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "ffde9c0d9e332aad8514f565b0ed4a86" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:16:52 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-CreateAndRemoveNetworkSecurityGroup": [ + "onesdk1679" + ] + }, + "Variables": {} +} \ No newline at end of file diff --git a/src/ServiceManagement/Network/Commands.Network.Test/SessionRecords/Microsoft.Azure.Commands.Network.Test.ScenarioTests.NSGScenarioTests/TestGetMultipleNSGs.json b/src/ServiceManagement/Network/Commands.Network.Test/SessionRecords/Microsoft.Azure.Commands.Network.Test.ScenarioTests.NSGScenarioTests/TestGetMultipleNSGs.json new file mode 100644 index 000000000000..546b22136bc9 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network.Test/SessionRecords/Microsoft.Azure.Commands.Network.Test.ScenarioTests.NSGScenarioTests/TestGetMultipleNSGs.json @@ -0,0 +1,383 @@ +{ + "Entries": [ + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/locations", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9sb2NhdGlvbnM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/1.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n \r\n North Central US\r\n North Central US\r\n \r\n Compute\r\n Storage\r\n PersistentVMRole\r\n \r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n \r\n \r\n West US\r\n West US\r\n \r\n Compute\r\n Storage\r\n PersistentVMRole\r\n \r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "09de9bf1f1ea2e6aae48f361daaa888c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:07:37 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/09de9bf1f1ea2e6aae48f361daaa888c", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zLzA5ZGU5YmYxZjFlYTJlNmFhZTQ4ZjM2MWRhYWE4ODhj", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/1.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n 09de9bf1-f1ea-2e6a-ae48-f361daaa888c\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "2eaa925dfcb7219989b97532cb426198" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:07:39 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/networksecuritygroups", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL25ldHdvcmtzZWN1cml0eWdyb3Vwcw==", + "RequestMethod": "POST", + "RequestBody": "\r\n onesdk2651\r\n \r\n North Central US\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "23" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-request-id": [ + "c367e0ab21a224fcb49991b5624e035e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:07:40 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/networksecuritygroups", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL25ldHdvcmtzZWN1cml0eWdyb3Vwcw==", + "RequestMethod": "POST", + "RequestBody": "\r\n onesdk42982\r\n \r\n North Central US\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "28" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-request-id": [ + "a8cc7aff277829a2abc2579385e146d5" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:08:13 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/c367e0ab21a224fcb49991b5624e035e", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zL2MzNjdlMGFiMjFhMjI0ZmNiNDk5OTFiNTYyNGUwMzVl", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "23" + ] + }, + "ResponseBody": "\r\n c367e0ab-21a2-24fc-b499-91b5624e035e\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "1081ac6504782bcd81399a3d3a39e5b6" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:07:40 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/c367e0ab21a224fcb49991b5624e035e", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zL2MzNjdlMGFiMjFhMjI0ZmNiNDk5OTFiNTYyNGUwMzVl", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "23" + ] + }, + "ResponseBody": "\r\n c367e0ab-21a2-24fc-b499-91b5624e035e\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "b3fe1bc771462d08b0143b9edfb0f494" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:08:11 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/networksecuritygroups/onesdk2651?", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL25ldHdvcmtzZWN1cml0eWdyb3Vwcy9vbmVzZGsyNjUxPw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "\r\n onesdk2651\r\n \r\n North Central US\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "67f68f88248a2de38a60c8807f246d9e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:08:12 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/a8cc7aff277829a2abc2579385e146d5", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zL2E4Y2M3YWZmMjc3ODI5YTJhYmMyNTc5Mzg1ZTE0NmQ1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "28" + ] + }, + "ResponseBody": "\r\n a8cc7aff-2778-29a2-abc2-579385e146d5\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "3bacc4315f592dc68942b3c8aea41143" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:08:13 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/a8cc7aff277829a2abc2579385e146d5", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zL2E4Y2M3YWZmMjc3ODI5YTJhYmMyNTc5Mzg1ZTE0NmQ1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "28" + ] + }, + "ResponseBody": "\r\n a8cc7aff-2778-29a2-abc2-579385e146d5\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "b877edddef092c20aef8a0fb86e1d14c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:08:45 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/networksecuritygroups/onesdk42982?", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL25ldHdvcmtzZWN1cml0eWdyb3Vwcy9vbmVzZGs0Mjk4Mj8=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "\r\n onesdk42982\r\n \r\n North Central US\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "382f9285bebf242384f3636cf183e894" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:08:45 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/networksecuritygroups", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL25ldHdvcmtzZWN1cml0eWdyb3Vwcw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "\r\n \r\n NetworkTests1329\r\n \r\n North Central US\r\n \r\n \r\n NetworkTests2209\r\n \r\n North Central US\r\n \r\n \r\n NetworkTests8401\r\n \r\n North Central US\r\n \r\n \r\n onesdk2651\r\n \r\n North Central US\r\n \r\n \r\n onesdk42982\r\n \r\n North Central US\r\n \r\n \r\n randomName\r\n \r\n West US\r\n \r\n \r\n randomName2\r\n \r\n West US\r\n \r\n \r\n securityGroupName\r\n North Central US\r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "f63509d2028b29ac8b3d10c0670f5d99" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:08:46 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-GetMultipleNetworkSecurityGroups": [ + "onesdk265", + "onesdk4298" + ] + }, + "Variables": {} +} \ No newline at end of file diff --git a/src/ServiceManagement/Network/Commands.Network.Test/SessionRecords/Microsoft.Azure.Commands.Network.Test.ScenarioTests.NSGScenarioTests/TestRemoveNSGFromSubnet.json b/src/ServiceManagement/Network/Commands.Network.Test/SessionRecords/Microsoft.Azure.Commands.Network.Test.ScenarioTests.NSGScenarioTests/TestRemoveNSGFromSubnet.json new file mode 100644 index 000000000000..0e970391d928 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network.Test/SessionRecords/Microsoft.Azure.Commands.Network.Test.ScenarioTests.NSGScenarioTests/TestRemoveNSGFromSubnet.json @@ -0,0 +1,561 @@ +{ + "Entries": [ + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/locations", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9sb2NhdGlvbnM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/1.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n \r\n North Central US\r\n North Central US\r\n \r\n Compute\r\n Storage\r\n PersistentVMRole\r\n \r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n \r\n \r\n West US\r\n West US\r\n \r\n Compute\r\n Storage\r\n PersistentVMRole\r\n \r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "ecf4a0e8cf8126b8895752a2c9edba99" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:22:12 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/ecf4a0e8cf8126b8895752a2c9edba99", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zL2VjZjRhMGU4Y2Y4MTI2Yjg4OTU3NTJhMmM5ZWRiYTk5", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/1.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n ecf4a0e8-cf81-26b8-8957-52a2c9edba99\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "76fe2c744f302dcba5626dc552bdc444" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:22:12 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/networksecuritygroups", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL25ldHdvcmtzZWN1cml0eWdyb3Vwcw==", + "RequestMethod": "POST", + "RequestBody": "\r\n onesdk4044\r\n \r\n North Central US\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "170" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-request-id": [ + "1854d0dbd8bd26e49be374d38e0015dd" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:22:14 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/1854d0dbd8bd26e49be374d38e0015dd", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zLzE4NTRkMGRiZDhiZDI2ZTQ5YmUzNzRkMzhlMDAxNWRk", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "170" + ] + }, + "ResponseBody": "\r\n 1854d0db-d8bd-26e4-9be3-74d38e0015dd\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "ae56e1b9d4752e9482602575e95ce4dc" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:22:15 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/1854d0dbd8bd26e49be374d38e0015dd", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zLzE4NTRkMGRiZDhiZDI2ZTQ5YmUzNzRkMzhlMDAxNWRk", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "170" + ] + }, + "ResponseBody": "\r\n 1854d0db-d8bd-26e4-9be3-74d38e0015dd\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "58ca27fd4bc62eceba824ba3db9d1409" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:22:46 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/networksecuritygroups/onesdk4044?", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL25ldHdvcmtzZWN1cml0eWdyb3Vwcy9vbmVzZGs0MDQ0Pw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "\r\n onesdk4044\r\n \r\n North Central US\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "0ecc3617889b2ff898db50f443fbcda8" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:22:46 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/media", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL21lZGlh", + "RequestMethod": "PUT", + "RequestBody": "\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 192.168.100.0/24\r\n \r\n \r\n \r\n 192.168.100.0/28\r\n \r\n \r\n \r\n \r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "175" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-request-id": [ + "2ab9cc53081a2347be1249a56ae6f79b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:22:48 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/2ab9cc53081a2347be1249a56ae6f79b", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zLzJhYjljYzUzMDgxYTIzNDdiZTEyNDlhNTZhZTZmNzli", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "175" + ] + }, + "ResponseBody": "\r\n 2ab9cc53-081a-2347-be12-49a56ae6f79b\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "3c9ceccb5f66280ca857247e2fec7802" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:22:49 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/2ab9cc53081a2347be1249a56ae6f79b", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zLzJhYjljYzUzMDgxYTIzNDdiZTEyNDlhNTZhZTZmNzli", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "175" + ] + }, + "ResponseBody": "\r\n 2ab9cc53-081a-2347-be12-49a56ae6f79b\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "a65298c24ca62f5283cf6333f96ea7d9" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:23:20 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/virtualnetwork/VirtualNetworkSiteName/subnets/FrontEndSubnet/networksecuritygroups", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL3ZpcnR1YWxuZXR3b3JrL1ZpcnR1YWxOZXR3b3JrU2l0ZU5hbWUvc3VibmV0cy9Gcm9udEVuZFN1Ym5ldC9uZXR3b3Jrc2VjdXJpdHlncm91cHM=", + "RequestMethod": "POST", + "RequestBody": "\r\n onesdk4044\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "179" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-request-id": [ + "4a2af08e3aac2fefac5e34336c578ccb" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:23:21 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/4a2af08e3aac2fefac5e34336c578ccb", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zLzRhMmFmMDhlM2FhYzJmZWZhYzVlMzQzMzZjNTc4Y2Ni", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "179" + ] + }, + "ResponseBody": "\r\n 4a2af08e-3aac-2fef-ac5e-34336c578ccb\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "778cd93289a6273e9720a8bb0afe05bb" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:23:21 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/4a2af08e3aac2fefac5e34336c578ccb", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zLzRhMmFmMDhlM2FhYzJmZWZhYzVlMzQzMzZjNTc4Y2Ni", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "179" + ] + }, + "ResponseBody": "\r\n 4a2af08e-3aac-2fef-ac5e-34336c578ccb\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "c35b2fd4ced22730b53e76af270c3807" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:23:52 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/virtualnetwork/VirtualNetworkSiteName/subnets/FrontEndSubnet/networksecuritygroups/onesdk4044", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL3ZpcnR1YWxuZXR3b3JrL1ZpcnR1YWxOZXR3b3JrU2l0ZU5hbWUvc3VibmV0cy9Gcm9udEVuZFN1Ym5ldC9uZXR3b3Jrc2VjdXJpdHlncm91cHMvb25lc2RrNDA0NA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "183" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-request-id": [ + "54bfb8588df5206e98e8b8cb1c6338bf" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:23:53 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/54bfb8588df5206e98e8b8cb1c6338bf", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zLzU0YmZiODU4OGRmNTIwNmU5OGU4YjhjYjFjNjMzOGJm", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "183" + ] + }, + "ResponseBody": "\r\n 54bfb858-8df5-206e-98e8-b8cb1c6338bf\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "e646b503dc5b2875983d5d7295d820ce" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:23:53 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/54bfb8588df5206e98e8b8cb1c6338bf", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zLzU0YmZiODU4OGRmNTIwNmU5OGU4YjhjYjFjNjMzOGJm", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "183" + ] + }, + "ResponseBody": "\r\n 54bfb858-8df5-206e-98e8-b8cb1c6338bf\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "e5230997c4272736a4a1a0796222a405" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:24:24 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/virtualnetwork/VirtualNetworkSiteName/subnets/FrontEndSubnet/networksecuritygroups", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL3ZpcnR1YWxuZXR3b3JrL1ZpcnR1YWxOZXR3b3JrU2l0ZU5hbWUvc3VibmV0cy9Gcm9udEVuZFN1Ym5ldC9uZXR3b3Jrc2VjdXJpdHlncm91cHM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "\r\n ResourceNotFound\r\n The virtual network name VirtualNetworkSiteName and subnet FrontEndSubnet does not have any network security group assigned.\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "1b00b9dfa8622e66bdb05769a7058de1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:24:25 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 404 + } + ], + "Names": { + "Test-RemoveNetworkSecurityGroupFromSubnet": [ + "onesdk4044", + "onesdk3927" + ] + }, + "Variables": {} +} \ No newline at end of file diff --git a/src/ServiceManagement/Network/Commands.Network.Test/SessionRecords/Microsoft.Azure.Commands.Network.Test.ScenarioTests.NSGScenarioTests/TestRemoveNSGWithNonExistingName.json b/src/ServiceManagement/Network/Commands.Network.Test/SessionRecords/Microsoft.Azure.Commands.Network.Test.ScenarioTests.NSGScenarioTests/TestRemoveNSGWithNonExistingName.json new file mode 100644 index 000000000000..131b42daca57 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network.Test/SessionRecords/Microsoft.Azure.Commands.Network.Test.ScenarioTests.NSGScenarioTests/TestRemoveNSGWithNonExistingName.json @@ -0,0 +1,181 @@ +{ + "Entries": [ + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/locations", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9sb2NhdGlvbnM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/1.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n \r\n North Central US\r\n North Central US\r\n \r\n Compute\r\n Storage\r\n PersistentVMRole\r\n \r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n \r\n \r\n West US\r\n West US\r\n \r\n Compute\r\n Storage\r\n PersistentVMRole\r\n \r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "b0ae91864926292e998df1c64a1fe1b6" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:06:27 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/b0ae91864926292e998df1c64a1fe1b6", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zL2IwYWU5MTg2NDkyNjI5MmU5OThkZjFjNjRhMWZlMWI2", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/1.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n b0ae9186-4926-292e-998d-f1c64a1fe1b6\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "bc3eb1726a4b2f25965cb23ae3161fd7" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:06:27 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/networksecuritygroups/onesdk6386", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL25ldHdvcmtzZWN1cml0eWdyb3Vwcy9vbmVzZGs2Mzg2", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "10" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-request-id": [ + "a45f3373a23b2681bd42495b37757341" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:06:28 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/a45f3373a23b2681bd42495b37757341", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zL2E0NWYzMzczYTIzYjI2ODFiZDQyNDk1YjM3NzU3MzQx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "10" + ] + }, + "ResponseBody": "\r\n a45f3373-a23b-2681-bd42-495b37757341\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "09d5ea32ab192046a34638e0fa3899a7" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:06:29 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/a45f3373a23b2681bd42495b37757341", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zL2E0NWYzMzczYTIzYjI2ODFiZDQyNDk1YjM3NzU3MzQx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "10" + ] + }, + "ResponseBody": "\r\n a45f3373-a23b-2681-bd42-495b37757341\r\n Failed\r\n 404\r\n \r\n ResourceNotFound\r\n The Network Security Group onesdk6386 does not exist.\r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "643d1eb84ade2dba9f57ab706db113df" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:06:59 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-RemoveNetworkSecurityGroupWithNonExistingName": [ + "onesdk6386" + ] + }, + "Variables": {} +} \ No newline at end of file diff --git a/src/ServiceManagement/Network/Commands.Network.Test/SessionRecords/Microsoft.Azure.Commands.Network.Test.ScenarioTests.NSGScenarioTests/TestRemoveNSR.json b/src/ServiceManagement/Network/Commands.Network.Test/SessionRecords/Microsoft.Azure.Commands.Network.Test.ScenarioTests.NSGScenarioTests/TestRemoveNSR.json new file mode 100644 index 000000000000..dca10b4363b1 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network.Test/SessionRecords/Microsoft.Azure.Commands.Network.Test.ScenarioTests.NSGScenarioTests/TestRemoveNSR.json @@ -0,0 +1,520 @@ +{ + "Entries": [ + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/locations", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9sb2NhdGlvbnM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/1.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n \r\n North Central US\r\n North Central US\r\n \r\n Compute\r\n Storage\r\n PersistentVMRole\r\n \r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n \r\n \r\n West US\r\n West US\r\n \r\n Compute\r\n Storage\r\n PersistentVMRole\r\n \r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "40562aa1f91e29b2905c34ec845034a2" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:19:17 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/40562aa1f91e29b2905c34ec845034a2", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zLzQwNTYyYWExZjkxZTI5YjI5MDVjMzRlYzg0NTAzNGEy", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/1.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n 40562aa1-f91e-29b2-905c-34ec845034a2\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "50dc9b5871382417919d8b5be7aead39" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:19:19 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/networksecuritygroups", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL25ldHdvcmtzZWN1cml0eWdyb3Vwcw==", + "RequestMethod": "POST", + "RequestBody": "\r\n onesdk6910\r\n \r\n North Central US\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "141" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-request-id": [ + "5c7de8a8cfe92937aafa1ac032ca7e2a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:19:20 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/5c7de8a8cfe92937aafa1ac032ca7e2a", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zLzVjN2RlOGE4Y2ZlOTI5MzdhYWZhMWFjMDMyY2E3ZTJh", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "141" + ] + }, + "ResponseBody": "\r\n 5c7de8a8-cfe9-2937-aafa-1ac032ca7e2a\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "9d510040a4ed2e459cdbae4f5e193979" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:19:20 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/5c7de8a8cfe92937aafa1ac032ca7e2a", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zLzVjN2RlOGE4Y2ZlOTI5MzdhYWZhMWFjMDMyY2E3ZTJh", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "141" + ] + }, + "ResponseBody": "\r\n 5c7de8a8-cfe9-2937-aafa-1ac032ca7e2a\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "abb2e073e5a1244b818592e3056adb80" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:19:51 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/networksecuritygroups/onesdk6910?", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL25ldHdvcmtzZWN1cml0eWdyb3Vwcy9vbmVzZGs2OTEwPw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "\r\n onesdk6910\r\n \r\n North Central US\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "c863c1b53239205580f2867eb74bce12" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:19:51 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/networksecuritygroups/onesdk6910/rules/onesdk4030", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL25ldHdvcmtzZWN1cml0eWdyb3Vwcy9vbmVzZGs2OTEwL3J1bGVzL29uZXNkazQwMzA=", + "RequestMethod": "PUT", + "RequestBody": "\r\n Outbound\r\n 500\r\n Deny\r\n *\r\n *\r\n *\r\n *\r\n TCP\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "146" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-request-id": [ + "de86eef2ae152390a715362f11558363" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:19:53 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/de86eef2ae152390a715362f11558363", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zL2RlODZlZWYyYWUxNTIzOTBhNzE1MzYyZjExNTU4MzYz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "146" + ] + }, + "ResponseBody": "\r\n de86eef2-ae15-2390-a715-362f11558363\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "5fe44717babe2141bc2614d058626816" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:19:53 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/de86eef2ae152390a715362f11558363", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zL2RlODZlZWYyYWUxNTIzOTBhNzE1MzYyZjExNTU4MzYz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "146" + ] + }, + "ResponseBody": "\r\n de86eef2-ae15-2390-a715-362f11558363\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "d01fda22918b2abbb7469859c2d797e5" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:20:25 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/networksecuritygroups/onesdk6910?detaillevel=Full", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL25ldHdvcmtzZWN1cml0eWdyb3Vwcy9vbmVzZGs2OTEwP2RldGFpbGxldmVsPUZ1bGw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "\r\n onesdk6910\r\n \r\n North Central US\r\n \r\n \r\n onesdk4030\r\n Outbound\r\n 500\r\n Deny\r\n *\r\n *\r\n *\r\n *\r\n TCP\r\n Active\r\n \r\n \r\n ALLOW VNET OUTBOUND\r\n Outbound\r\n 65000\r\n VirtualNetwork\r\n *\r\n VirtualNetwork\r\n *\r\n *\r\n Active\r\n true\r\n \r\n \r\n ALLOW VNET INBOUND\r\n 65000\r\n VirtualNetwork\r\n *\r\n VirtualNetwork\r\n *\r\n *\r\n Active\r\n true\r\n \r\n \r\n ALLOW INTERNET OUTBOUND\r\n Outbound\r\n 65001\r\n *\r\n *\r\n Internet\r\n *\r\n *\r\n Active\r\n true\r\n \r\n \r\n DENY ALL OUTBOUND\r\n Outbound\r\n 65500\r\n Deny\r\n *\r\n *\r\n *\r\n *\r\n *\r\n Active\r\n true\r\n \r\n \r\n DENY ALL INBOUND\r\n 65500\r\n Deny\r\n *\r\n *\r\n *\r\n *\r\n *\r\n Active\r\n true\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "71279c0afb4e253b900bad4fa3811d8c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:20:25 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/networksecuritygroups/onesdk6910?detaillevel=Full", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL25ldHdvcmtzZWN1cml0eWdyb3Vwcy9vbmVzZGs2OTEwP2RldGFpbGxldmVsPUZ1bGw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "\r\n onesdk6910\r\n \r\n North Central US\r\n \r\n \r\n ALLOW VNET INBOUND\r\n 65000\r\n VirtualNetwork\r\n *\r\n VirtualNetwork\r\n *\r\n *\r\n Active\r\n true\r\n \r\n \r\n ALLOW VNET OUTBOUND\r\n Outbound\r\n 65000\r\n VirtualNetwork\r\n *\r\n VirtualNetwork\r\n *\r\n *\r\n Active\r\n true\r\n \r\n \r\n ALLOW INTERNET OUTBOUND\r\n Outbound\r\n 65001\r\n *\r\n *\r\n Internet\r\n *\r\n *\r\n Active\r\n true\r\n \r\n \r\n DENY ALL OUTBOUND\r\n Outbound\r\n 65500\r\n Deny\r\n *\r\n *\r\n *\r\n *\r\n *\r\n Active\r\n true\r\n \r\n \r\n DENY ALL INBOUND\r\n 65500\r\n Deny\r\n *\r\n *\r\n *\r\n *\r\n *\r\n Active\r\n true\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "1006abf51d912275a24ca141ae643955" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:21:01 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/networksecuritygroups/onesdk6910?detaillevel=Full", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL25ldHdvcmtzZWN1cml0eWdyb3Vwcy9vbmVzZGs2OTEwP2RldGFpbGxldmVsPUZ1bGw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "\r\n onesdk6910\r\n \r\n North Central US\r\n \r\n \r\n ALLOW VNET INBOUND\r\n 65000\r\n VirtualNetwork\r\n *\r\n VirtualNetwork\r\n *\r\n *\r\n Active\r\n true\r\n \r\n \r\n ALLOW VNET OUTBOUND\r\n Outbound\r\n 65000\r\n VirtualNetwork\r\n *\r\n VirtualNetwork\r\n *\r\n *\r\n Active\r\n true\r\n \r\n \r\n ALLOW INTERNET OUTBOUND\r\n Outbound\r\n 65001\r\n *\r\n *\r\n Internet\r\n *\r\n *\r\n Active\r\n true\r\n \r\n \r\n DENY ALL OUTBOUND\r\n Outbound\r\n 65500\r\n Deny\r\n *\r\n *\r\n *\r\n *\r\n *\r\n Active\r\n true\r\n \r\n \r\n DENY ALL INBOUND\r\n 65500\r\n Deny\r\n *\r\n *\r\n *\r\n *\r\n *\r\n Active\r\n true\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "5eb7834698c023d688148916010528b5" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:21:02 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/networksecuritygroups/onesdk6910/rules/onesdk4030", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL25ldHdvcmtzZWN1cml0eWdyb3Vwcy9vbmVzZGs2OTEwL3J1bGVzL29uZXNkazQwMzA=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "151" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-request-id": [ + "d63850dab72f28d7a6ea1546159e7549" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:20:27 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/d63850dab72f28d7a6ea1546159e7549", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zL2Q2Mzg1MGRhYjcyZjI4ZDdhNmVhMTU0NjE1OWU3NTQ5", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "151" + ] + }, + "ResponseBody": "\r\n d63850da-b72f-28d7-a6ea-1546159e7549\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "8b20057a4e2227e493488ded0b92a608" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:20:27 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/d63850dab72f28d7a6ea1546159e7549", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zL2Q2Mzg1MGRhYjcyZjI4ZDdhNmVhMTU0NjE1OWU3NTQ5", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "151" + ] + }, + "ResponseBody": "\r\n d63850da-b72f-28d7-a6ea-1546159e7549\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "2da7605f47e52fd2a536dba8a2d4b03f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:20:58 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-RemoveNetworkSecurityRule": [ + "onesdk6910", + "onesdk4030" + ] + }, + "Variables": {} +} \ No newline at end of file diff --git a/src/ServiceManagement/Network/Commands.Network.Test/SessionRecords/Microsoft.Azure.Commands.Network.Test.ScenarioTests.NSGScenarioTests/TestSetAndGetNSGForSubnet.json b/src/ServiceManagement/Network/Commands.Network.Test/SessionRecords/Microsoft.Azure.Commands.Network.Test.ScenarioTests.NSGScenarioTests/TestSetAndGetNSGForSubnet.json new file mode 100644 index 000000000000..6ca73547f746 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network.Test/SessionRecords/Microsoft.Azure.Commands.Network.Test.ScenarioTests.NSGScenarioTests/TestSetAndGetNSGForSubnet.json @@ -0,0 +1,488 @@ +{ + "Entries": [ + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/locations", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9sb2NhdGlvbnM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/1.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n \r\n North Central US\r\n North Central US\r\n \r\n Compute\r\n Storage\r\n PersistentVMRole\r\n \r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n \r\n \r\n West US\r\n West US\r\n \r\n Compute\r\n Storage\r\n PersistentVMRole\r\n \r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "f4a8e7c50d49276fa6b661956782b06a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:12:50 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/f4a8e7c50d49276fa6b661956782b06a", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zL2Y0YThlN2M1MGQ0OTI3NmZhNmI2NjE5NTY3ODJiMDZh", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/1.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n f4a8e7c5-0d49-276f-a6b6-61956782b06a\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "5432af590c59265f92628327f3753232" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:12:52 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/networksecuritygroups", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL25ldHdvcmtzZWN1cml0eWdyb3Vwcw==", + "RequestMethod": "POST", + "RequestBody": "\r\n onesdk7428\r\n \r\n North Central US\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "74" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-request-id": [ + "16a87d7fa3b724589d88572d3d46667c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:12:53 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/16a87d7fa3b724589d88572d3d46667c", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zLzE2YTg3ZDdmYTNiNzI0NTg5ZDg4NTcyZDNkNDY2Njdj", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "74" + ] + }, + "ResponseBody": "\r\n 16a87d7f-a3b7-2458-9d88-572d3d46667c\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "14cc081a7d892840afe83fd86101363c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:12:53 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/16a87d7fa3b724589d88572d3d46667c", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zLzE2YTg3ZDdmYTNiNzI0NTg5ZDg4NTcyZDNkNDY2Njdj", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "74" + ] + }, + "ResponseBody": "\r\n 16a87d7f-a3b7-2458-9d88-572d3d46667c\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "d1d8b3b85f7e2475ade65981d2d1f4d1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:13:25 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/networksecuritygroups/onesdk7428?", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL25ldHdvcmtzZWN1cml0eWdyb3Vwcy9vbmVzZGs3NDI4Pw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "\r\n onesdk7428\r\n \r\n North Central US\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "bb699f39003e28d8b8f210a3f8cbaba8" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:13:26 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/networksecuritygroups/onesdk7428?", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL25ldHdvcmtzZWN1cml0eWdyb3Vwcy9vbmVzZGs3NDI4Pw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "\r\n onesdk7428\r\n \r\n North Central US\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "d4c87a2c093c24ac82ef84af8844531c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:14:31 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/media", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL21lZGlh", + "RequestMethod": "PUT", + "RequestBody": "\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 192.168.100.0/24\r\n \r\n \r\n \r\n 192.168.100.0/28\r\n \r\n \r\n \r\n \r\n \r\n \r\n", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "79" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-request-id": [ + "13198bec779329a8bea659fd248c6f85" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:13:27 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/13198bec779329a8bea659fd248c6f85", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zLzEzMTk4YmVjNzc5MzI5YThiZWE2NTlmZDI0OGM2Zjg1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "79" + ] + }, + "ResponseBody": "\r\n 13198bec-7793-29a8-bea6-59fd248c6f85\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "8805b30095f22404bcf35987736175e7" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:13:28 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/13198bec779329a8bea659fd248c6f85", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zLzEzMTk4YmVjNzc5MzI5YThiZWE2NTlmZDI0OGM2Zjg1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "79" + ] + }, + "ResponseBody": "\r\n 13198bec-7793-29a8-bea6-59fd248c6f85\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "73587928530b29e692c2e99fac042127" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:13:58 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/virtualnetwork/VirtualNetworkSiteName/subnets/FrontEndSubnet/networksecuritygroups", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL3ZpcnR1YWxuZXR3b3JrL1ZpcnR1YWxOZXR3b3JrU2l0ZU5hbWUvc3VibmV0cy9Gcm9udEVuZFN1Ym5ldC9uZXR3b3Jrc2VjdXJpdHlncm91cHM=", + "RequestMethod": "POST", + "RequestBody": "\r\n onesdk7428\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "83" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-request-id": [ + "9dd0df61e044289085618505cd5b87f6" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:13:59 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/9dd0df61e044289085618505cd5b87f6", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zLzlkZDBkZjYxZTA0NDI4OTA4NTYxODUwNWNkNWI4N2Y2", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "83" + ] + }, + "ResponseBody": "\r\n 9dd0df61-e044-2890-8561-8505cd5b87f6\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "abe16bb060d727f398fda3f3b26b9d48" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:13:59 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/9dd0df61e044289085618505cd5b87f6", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zLzlkZDBkZjYxZTA0NDI4OTA4NTYxODUwNWNkNWI4N2Y2", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "83" + ] + }, + "ResponseBody": "\r\n 9dd0df61-e044-2890-8561-8505cd5b87f6\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "3f68f98e029223f8984fedb8135c8378" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:14:30 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/virtualnetwork/VirtualNetworkSiteName/subnets/FrontEndSubnet/networksecuritygroups", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL3ZpcnR1YWxuZXR3b3JrL1ZpcnR1YWxOZXR3b3JrU2l0ZU5hbWUvc3VibmV0cy9Gcm9udEVuZFN1Ym5ldC9uZXR3b3Jrc2VjdXJpdHlncm91cHM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "\r\n onesdk7428\r\n Created\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "8b0263e2bf5b204e93f663ba6eae8ad8" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:14:31 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-SetAndGetNetworkSecurityGroupForSubnet": [ + "onesdk7428", + "onesdk1878" + ] + }, + "Variables": {} +} \ No newline at end of file diff --git a/src/ServiceManagement/Network/Commands.Network.Test/SessionRecords/Microsoft.Azure.Commands.Network.Test.ScenarioTests.NSGScenarioTests/TestSetNSR.json b/src/ServiceManagement/Network/Commands.Network.Test/SessionRecords/Microsoft.Azure.Commands.Network.Test.ScenarioTests.NSGScenarioTests/TestSetNSR.json new file mode 100644 index 000000000000..27efd7ffc168 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network.Test/SessionRecords/Microsoft.Azure.Commands.Network.Test.ScenarioTests.NSGScenarioTests/TestSetNSR.json @@ -0,0 +1,351 @@ +{ + "Entries": [ + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/locations", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9sb2NhdGlvbnM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/1.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n \r\n North Central US\r\n North Central US\r\n \r\n Compute\r\n Storage\r\n PersistentVMRole\r\n \r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n \r\n \r\n West US\r\n West US\r\n \r\n Compute\r\n Storage\r\n PersistentVMRole\r\n \r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "336595f61f25290f82debec1c67c9e0a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:10:31 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/336595f61f25290f82debec1c67c9e0a", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zLzMzNjU5NWY2MWYyNTI5MGY4MmRlYmVjMWM2N2M5ZTBh", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/1.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n 336595f6-1f25-290f-82de-bec1c67c9e0a\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "9aa34f440f592b3aaa2e63f82adfb3dc" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:10:31 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/networksecuritygroups", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL25ldHdvcmtzZWN1cml0eWdyb3Vwcw==", + "RequestMethod": "POST", + "RequestBody": "\r\n onesdk2523\r\n \r\n North Central US\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "51" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-request-id": [ + "6b4baeac087326e1b895b1db840ee49d" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:10:33 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/6b4baeac087326e1b895b1db840ee49d", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zLzZiNGJhZWFjMDg3MzI2ZTFiODk1YjFkYjg0MGVlNDlk", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "51" + ] + }, + "ResponseBody": "\r\n 6b4baeac-0873-26e1-b895-b1db840ee49d\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "57185b0805f32b6683e3df0f23c2732c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:10:33 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/6b4baeac087326e1b895b1db840ee49d", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zLzZiNGJhZWFjMDg3MzI2ZTFiODk1YjFkYjg0MGVlNDlk", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "51" + ] + }, + "ResponseBody": "\r\n 6b4baeac-0873-26e1-b895-b1db840ee49d\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "c48cb678f35121298bf7dbf4de0f4fe2" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:11:04 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/networksecuritygroups/onesdk2523?", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL25ldHdvcmtzZWN1cml0eWdyb3Vwcy9vbmVzZGsyNTIzPw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "\r\n onesdk2523\r\n \r\n North Central US\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "2bcbad9aefc5282fbba7a661606291bc" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:11:04 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/networksecuritygroups/onesdk2523/rules/onesdk6849", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL25ldHdvcmtzZWN1cml0eWdyb3Vwcy9vbmVzZGsyNTIzL3J1bGVzL29uZXNkazY4NDk=", + "RequestMethod": "PUT", + "RequestBody": "\r\n Outbound\r\n 500\r\n Deny\r\n *\r\n *\r\n *\r\n *\r\n TCP\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "56" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-request-id": [ + "fc0bdbc67ccd2b7d9ea10a88445a6711" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:11:05 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/fc0bdbc67ccd2b7d9ea10a88445a6711", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zL2ZjMGJkYmM2N2NjZDJiN2Q5ZWExMGE4ODQ0NWE2NzEx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "56" + ] + }, + "ResponseBody": "\r\n fc0bdbc6-7ccd-2b7d-9ea1-0a88445a6711\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "eb0f44780c702107a69687e37e2387a8" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:11:07 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/fc0bdbc67ccd2b7d9ea10a88445a6711", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zL2ZjMGJkYmM2N2NjZDJiN2Q5ZWExMGE4ODQ0NWE2NzEx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "56" + ] + }, + "ResponseBody": "\r\n fc0bdbc6-7ccd-2b7d-9ea1-0a88445a6711\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "4434965aa3fd204faeba27635e1c8201" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:11:38 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/networksecuritygroups/onesdk2523?detaillevel=Full", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL25ldHdvcmtzZWN1cml0eWdyb3Vwcy9vbmVzZGsyNTIzP2RldGFpbGxldmVsPUZ1bGw=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "\r\n onesdk2523\r\n \r\n North Central US\r\n \r\n \r\n onesdk6849\r\n Outbound\r\n 500\r\n Deny\r\n *\r\n *\r\n *\r\n *\r\n TCP\r\n Active\r\n \r\n \r\n ALLOW VNET OUTBOUND\r\n Outbound\r\n 65000\r\n VirtualNetwork\r\n *\r\n VirtualNetwork\r\n *\r\n *\r\n Active\r\n true\r\n \r\n \r\n ALLOW VNET INBOUND\r\n 65000\r\n VirtualNetwork\r\n *\r\n VirtualNetwork\r\n *\r\n *\r\n Active\r\n true\r\n \r\n \r\n ALLOW INTERNET OUTBOUND\r\n Outbound\r\n 65001\r\n *\r\n *\r\n Internet\r\n *\r\n *\r\n Active\r\n true\r\n \r\n \r\n DENY ALL OUTBOUND\r\n Outbound\r\n 65500\r\n Deny\r\n *\r\n *\r\n *\r\n *\r\n *\r\n Active\r\n true\r\n \r\n \r\n DENY ALL INBOUND\r\n 65500\r\n Deny\r\n *\r\n *\r\n *\r\n *\r\n *\r\n Active\r\n true\r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "2c152661bbd32ea6b7ee623d2afd2703" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:11:40 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + } + ], + "Names": { + "Test-SetNetworkSecurityRule": [ + "onesdk2523", + "onesdk6849" + ] + }, + "Variables": {} +} \ No newline at end of file diff --git a/src/ServiceManagement/Network/Commands.Network.Test/SessionRecords/Microsoft.Azure.Commands.Network.Test.ScenarioTests.NSGScenarioTests/TestSetNSRWithInvalidParameter.json b/src/ServiceManagement/Network/Commands.Network.Test/SessionRecords/Microsoft.Azure.Commands.Network.Test.ScenarioTests.NSGScenarioTests/TestSetNSRWithInvalidParameter.json new file mode 100644 index 000000000000..58f239e5d8e2 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network.Test/SessionRecords/Microsoft.Azure.Commands.Network.Test.ScenarioTests.NSGScenarioTests/TestSetNSRWithInvalidParameter.json @@ -0,0 +1,249 @@ +{ + "Entries": [ + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/locations", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9sb2NhdGlvbnM=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/1.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n \r\n North Central US\r\n North Central US\r\n \r\n Compute\r\n Storage\r\n PersistentVMRole\r\n \r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n \r\n \r\n West US\r\n West US\r\n \r\n Compute\r\n Storage\r\n PersistentVMRole\r\n \r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n ExtraLarge\r\n ExtraSmall\r\n Large\r\n Medium\r\n Small\r\n \r\n \r\n \r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "76eb25749d2421e69dc771984800d1bb" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:17:30 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/76eb25749d2421e69dc771984800d1bb", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zLzc2ZWIyNTc0OWQyNDIxZTY5ZGM3NzE5ODQ4MDBkMWJi", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-05-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.ManagementClient/1.0.0.0", + "AzurePowershell/v0.8.11" + ] + }, + "ResponseBody": "\r\n 76eb2574-9d24-21e6-9dc7-71984800d1bb\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "751194d1ceed23279d78cad3fb872c74" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:17:31 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/networksecuritygroups", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL25ldHdvcmtzZWN1cml0eWdyb3Vwcw==", + "RequestMethod": "POST", + "RequestBody": "\r\n onesdk2475\r\n \r\n North Central US\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "121" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "x-ms-request-id": [ + "b1bc789976112c1fa43e8c4d2979bc99" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:17:32 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 202 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/b1bc789976112c1fa43e8c4d2979bc99", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zL2IxYmM3ODk5NzYxMTJjMWZhNDNlOGM0ZDI5NzliYzk5", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "121" + ] + }, + "ResponseBody": "\r\n b1bc7899-7611-2c1f-a43e-8c4d2979bc99\r\n InProgress\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "b99ff97bb4712c3d80c17e6d59ac6e69" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:17:32 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/operations/b1bc789976112c1fa43e8c4d2979bc99", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9vcGVyYXRpb25zL2IxYmM3ODk5NzYxMTJjMWZhNDNlOGM0ZDI5NzliYzk5", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "121" + ] + }, + "ResponseBody": "\r\n b1bc7899-7611-2c1f-a43e-8c4d2979bc99\r\n Succeeded\r\n 200\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "b34582a624bc27e784dd27d39421555f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:18:04 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/networksecuritygroups/onesdk2475?", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL25ldHdvcmtzZWN1cml0eWdyb3Vwcy9vbmVzZGsyNDc1Pw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ] + }, + "ResponseBody": "\r\n onesdk2475\r\n \r\n North Central US\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "e5e05721965d22e9929c492d15690d8c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:18:05 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/803c7f98-a213-4724-b8b2-46dab6bedc9a/services/networking/networksecuritygroups/onesdk2475/rules/onesdk9407", + "EncodedRequestUri": "LzgwM2M3Zjk4LWEyMTMtNDcyNC1iOGIyLTQ2ZGFiNmJlZGM5YS9zZXJ2aWNlcy9uZXR3b3JraW5nL25ldHdvcmtzZWN1cml0eWdyb3Vwcy9vbmVzZGsyNDc1L3J1bGVzL29uZXNkazk0MDc=", + "RequestMethod": "PUT", + "RequestBody": "\r\n Outbound\r\n 500\r\n Deny\r\n INVALID\r\n *\r\n *\r\n *\r\n TCP\r\n", + "RequestHeaders": { + "x-ms-version": [ + "2014-09-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.Network.NetworkManagementClient/3.0.0.0" + ], + "client-tracking-id": [ + "126" + ] + }, + "ResponseBody": "\r\n BadRequest\r\n The Source Address Prefix provided 'INVALID' is invalid. Please provide correct CIDR address or one of the allowed Address Tags.\r\n", + "ResponseHeaders": { + "x-ms-request-id": [ + "3ab476b870f32bef934ec96ff1e047af" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Oct 2014 19:18:06 GMT" + ], + "Server": [ + "1.0.6195.343", + "(rd_rdfe_dhf1.141013-1212)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 400 + } + ], + "Names": { + "Test-SetNetworkSecurityRuleWithInvalidParameter": [ + "onesdk2475", + "onesdk9407" + ] + }, + "Variables": {} +} \ No newline at end of file diff --git a/src/ServiceManagement/Network/Commands.Network.Test/TestData/EmptyNetworkConfiguration.xml b/src/ServiceManagement/Network/Commands.Network.Test/TestData/EmptyNetworkConfiguration.xml new file mode 100644 index 000000000000..d668ae5c7944 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network.Test/TestData/EmptyNetworkConfiguration.xml @@ -0,0 +1,6 @@ + + + + diff --git a/src/ServiceManagement/Network/Commands.Network.Test/TestData/SimpleNetworkConfiguration.xml b/src/ServiceManagement/Network/Commands.Network.Test/TestData/SimpleNetworkConfiguration.xml new file mode 100644 index 000000000000..a01dbaaa5081 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network.Test/TestData/SimpleNetworkConfiguration.xml @@ -0,0 +1,22 @@ + + + + + + + + + 192.168.100.0/24 + + + + 192.168.100.0/28 + + + + + + + diff --git a/src/ServiceManagement/Network/Commands.Network.Test/packages.config b/src/ServiceManagement/Network/Commands.Network.Test/packages.config new file mode 100644 index 000000000000..14c31f5af839 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network.Test/packages.config @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Network/Commands.Network/Commands.Network.csproj b/src/ServiceManagement/Network/Commands.Network/Commands.Network.csproj new file mode 100644 index 000000000000..94666af1c074 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/Commands.Network.csproj @@ -0,0 +1,176 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {40FEE0BB-FD45-4EFC-85BC-0D602A6892C4} + Library + Properties + Microsoft.Azure.Commands.Network + Microsoft.Azure.Commands.Network + v4.5 + 512 + + ..\..\..\ + true + + + true + full + false + ..\..\..\Package\Debug\ServiceManagement\Azure\Network\ + DEBUG;TRACE + 4 + true + false + + + OnBuildSuccess + + + true + MSSharedLibKey.snk + true + ..\..\..\Package\Release\ServiceManagement\Azure\Network + TRACE;SIGN + true + pdbonly + AnyCPU + false + + + + ..\..\..\packages\AutoMapper.3.1.1\lib\net40\AutoMapper.dll + True + + + ..\..\..\packages\AutoMapper.3.1.1\lib\net40\AutoMapper.Net4.dll + True + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.2.1.0\lib\net40\Microsoft.WindowsAzure.Management.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Network.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll + + + False + ..\..\..\packages\WindowsAzure.Storage.4.2.1\lib\net40\Microsoft.WindowsAzure.Storage.dll + + + False + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + + + + + + False + + + + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Always + + + + + + + + + + + + + + + + + True + True + Resources.resx + + + + + + + {65c3a86a-716d-4e7d-ab67-1db00b3bf72d} + Commands.Common.Storage + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Network/Commands.Network/Gateway/GetAzureVNetConnection.cs b/src/ServiceManagement/Network/Commands.Network/Gateway/GetAzureVNetConnection.cs new file mode 100644 index 000000000000..786393633589 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/Gateway/GetAzureVNetConnection.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Network.Gateway +{ + using System.Management.Automation; + using Model; + + [Cmdlet(VerbsCommon.Get, "AzureVNetConnection"), OutputType(typeof(GatewayConnectionContext))] + public class GetAzureVNetConnectionCommand : NetworkCmdletBase + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Virtual network name.")] + public string VNetName + { + get; + set; + } + + public override void ExecuteCmdlet() + { + WriteObject(Client.ListConnections(VNetName)); + } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/Gateway/GetAzureVNetGateway.cs b/src/ServiceManagement/Network/Commands.Network/Gateway/GetAzureVNetGateway.cs new file mode 100644 index 000000000000..27de8e693207 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/Gateway/GetAzureVNetGateway.cs @@ -0,0 +1,34 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Network.Gateway +{ + using System.Management.Automation; + + [Cmdlet(VerbsCommon.Get, "AzureVNetGateway"), OutputType(typeof(VirtualNetworkGatewayContext))] + public class GetAzureVNetGatewayCommand : NetworkCmdletBase + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Virtual network name.")] + public string VNetName + { + get; + set; + } + + public override void ExecuteCmdlet() + { + WriteObject(Client.GetGateway(VNetName)); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Network/Commands.Network/Gateway/GetAzureVNetGatewayDiagnostics.cs b/src/ServiceManagement/Network/Commands.Network/Gateway/GetAzureVNetGatewayDiagnostics.cs new file mode 100644 index 000000000000..b4ce51bfb37f --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/Gateway/GetAzureVNetGatewayDiagnostics.cs @@ -0,0 +1,31 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Network.Gateway +{ + using System.Management.Automation; + using WindowsAzure.Commands.Utilities.Common; + + [Cmdlet(VerbsCommon.Get, "AzureVNetGatewayDiagnostics"), OutputType(typeof(ManagementOperationContext))] + public class GetAzureVNetGatewayDiagnostics : NetworkCmdletBase + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Virtual network name.")] + public string VNetName { get; set; } + + public override void ExecuteCmdlet() + { + WriteObject(Client.GetDiagnostics(VNetName)); + } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/Gateway/GetAzureVnetGatewayKey.cs b/src/ServiceManagement/Network/Commands.Network/Gateway/GetAzureVnetGatewayKey.cs new file mode 100644 index 000000000000..c39b83c0d962 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/Gateway/GetAzureVnetGatewayKey.cs @@ -0,0 +1,44 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Network.Gateway +{ + using System.Management.Automation; + using Model; + + [Cmdlet(VerbsCommon.Get, "AzureVNetGatewayKey"), OutputType(typeof(SharedKeyContext))] + public class GetAzureVNetGatewayKeyCommand : NetworkCmdletBase + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "The virtual network name.")] + [ValidateNotNullOrEmpty] + public string VNetName + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = true, HelpMessage = "The local network site name.")] + [ValidateNotNullOrEmpty] + public string LocalNetworkSiteName + { + get; + set; + } + + public override void ExecuteCmdlet() + { + WriteObject(Client.GetSharedKey(VNetName, LocalNetworkSiteName)); + } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/Gateway/Model/GatewayConnectionContext.cs b/src/ServiceManagement/Network/Commands.Network/Gateway/Model/GatewayConnectionContext.cs new file mode 100644 index 000000000000..26ddb7fad734 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/Gateway/Model/GatewayConnectionContext.cs @@ -0,0 +1,37 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Network.Gateway.Model +{ + using WindowsAzure.Commands.Utilities.Common; + + public class GatewayConnectionContext : ManagementOperationContext + { + public string ConnectivityState { get; set; } + + public ulong EgressBytesTransferred { get; set; } + + public ulong IngressBytesTransferred { get; set; } + + public string LastConnectionEstablished { get; set; } + + public string LastEventID { get; set; } + + public string LastEventMessage { get; set; } + + public string LastEventTimeStamp { get; set; } + + public string LocalNetworkSiteName { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Network/Commands.Network/Gateway/Model/ProvisioningState.cs b/src/ServiceManagement/Network/Commands.Network/Gateway/Model/ProvisioningState.cs new file mode 100644 index 000000000000..78529f31ed52 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/Gateway/Model/ProvisioningState.cs @@ -0,0 +1,24 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Network +{ + public enum ProvisioningState + { + NotProvisioned, + Provisioning, + Provisioned, + Deprovisioning + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Network/Commands.Network/Gateway/Model/SharedKeyContext.cs b/src/ServiceManagement/Network/Commands.Network/Gateway/Model/SharedKeyContext.cs new file mode 100644 index 000000000000..9531f7b7f288 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/Gateway/Model/SharedKeyContext.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Network.Gateway.Model +{ + using WindowsAzure.Commands.Utilities.Common; + + public class SharedKeyContext : ManagementOperationContext + { + public string Value { get; set; } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/Gateway/Model/VirtualNetworkDiagnosticsContext.cs b/src/ServiceManagement/Network/Commands.Network/Gateway/Model/VirtualNetworkDiagnosticsContext.cs new file mode 100644 index 000000000000..c5c1dced65ee --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/Gateway/Model/VirtualNetworkDiagnosticsContext.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Network.Gateway.Model +{ + using WindowsAzure.Commands.Utilities.Common; + using WindowsAzure.Management.Network.Models; + + public class VirtualNetworkDiagnosticsContext : ManagementOperationContext + { + public string DiagnosticsUrl { get; set; } + + public GatewayDiagnosticsState State { get; set; } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/Gateway/Model/VirtualNetworkGatewayContext.cs b/src/ServiceManagement/Network/Commands.Network/Gateway/Model/VirtualNetworkGatewayContext.cs new file mode 100644 index 000000000000..86a5749bae35 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/Gateway/Model/VirtualNetworkGatewayContext.cs @@ -0,0 +1,39 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Network +{ + using System; + using WindowsAzure.Commands.Utilities.Common; + using WindowsAzure.Management.Network.Models; + + public class VirtualNetworkGatewayContext : ManagementOperationContext + { + public string LastEventData { get; set; } + + public DateTime? LastEventTimeStamp { get; set; } + + public string LastEventMessage { get; set; } + + public int LastEventID { get; set; } + + public ProvisioningState State { get; set; } + + public string VIPAddress { get; set; } + + public string DefaultSite { get; set; } + + public GatewaySKU GatewaySKU { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Network/Commands.Network/Gateway/NewAzureVNetGateway.cs b/src/ServiceManagement/Network/Commands.Network/Gateway/NewAzureVNetGateway.cs new file mode 100644 index 000000000000..383604c5bd29 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/Gateway/NewAzureVNetGateway.cs @@ -0,0 +1,38 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Network.Gateway +{ + using System.Management.Automation; + using WindowsAzure.Commands.Utilities.Common; + using WindowsAzure.Management.Network.Models; + + [Cmdlet(VerbsCommon.New, "AzureVNetGateway"), OutputType(typeof(ManagementOperationContext))] + public class NewAzureVNetGatewayCommand : NetworkCmdletBase + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Virtual network name.")] + public string VNetName { get; set; } + + [Parameter(Position = 1, Mandatory = false, HelpMessage = "The type of routing that the gateway will use. This will default to StaticRouting if no value is provided.")] + public GatewayType GatewayType { get; set; } + + [Parameter(Position = 2, Mandatory = false, HelpMessage = "The Gateway SKU for the new gateway.")] + public GatewaySKU GatewaySKU { get; set; } + + public override void ExecuteCmdlet() + { + WriteObject(Client.CreateGateway(VNetName, GatewayType, GatewaySKU)); + } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/Gateway/RemoveAzureVNetGateway.cs b/src/ServiceManagement/Network/Commands.Network/Gateway/RemoveAzureVNetGateway.cs new file mode 100644 index 000000000000..9a0a5e73fa19 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/Gateway/RemoveAzureVNetGateway.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Network.Gateway +{ + using System.Management.Automation; + using WindowsAzure.Commands.Utilities.Common; + + [Cmdlet(VerbsCommon.Remove, "AzureVNetGateway"), OutputType(typeof(ManagementOperationContext))] + public class RemoveAzureVNetGateway : NetworkCmdletBase + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Virtual network name.")] + public string VNetName + { + get; + set; + } + + public override void ExecuteCmdlet() + { + WriteObject(Client.DeleteGateway(VNetName)); + } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/Gateway/RemoveAzureVnetGatewayDefaultSite.cs b/src/ServiceManagement/Network/Commands.Network/Gateway/RemoveAzureVnetGatewayDefaultSite.cs new file mode 100644 index 000000000000..390c7ed1b06b --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/Gateway/RemoveAzureVnetGatewayDefaultSite.cs @@ -0,0 +1,36 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Network.Gateway +{ + using System.Management.Automation; + using WindowsAzure.Commands.Utilities.Common; + + [Cmdlet(VerbsCommon.Remove, "AzureVNetGatewayDefaultSite"), OutputType(typeof(ManagementOperationContext))] + public class RemoveAzureVNetGatewayDefaultSite : NetworkCmdletBase + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "The virtual network name.")] + [ValidateNotNullOrEmpty] + public string VNetName + { + get; + set; + } + + public override void ExecuteCmdlet() + { + WriteObject(Client.RemoveDefaultSite(VNetName)); + } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/Gateway/ResizeAzureVnetGateway.cs b/src/ServiceManagement/Network/Commands.Network/Gateway/ResizeAzureVnetGateway.cs new file mode 100644 index 000000000000..6aed510aa466 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/Gateway/ResizeAzureVnetGateway.cs @@ -0,0 +1,43 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Network.Gateway +{ + using System.Management.Automation; + using WindowsAzure.Commands.Utilities.Common; + using WindowsAzure.Management.Network.Models; + + [Cmdlet(VerbsCommon.Resize, "AzureVNetGateway"), OutputType(typeof(ManagementOperationContext))] + public class ResizeAzureVNetGateway : NetworkCmdletBase + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Virtual network name.")] + public string VNetName + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = true, HelpMessage = "The SKU that the existing gateway will be resized to.")] + public GatewaySKU GatewaySKU + { + get; + set; + } + + public override void ExecuteCmdlet() + { + WriteObject(Client.ResizeGateway(VNetName, GatewaySKU)); + } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/Gateway/SetAzureVNetGateway.cs b/src/ServiceManagement/Network/Commands.Network/Gateway/SetAzureVNetGateway.cs new file mode 100644 index 000000000000..4034372d558d --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/Gateway/SetAzureVNetGateway.cs @@ -0,0 +1,56 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Network.Gateway +{ + using System.Management.Automation; + using WindowsAzure.Commands.Utilities.Common; + + [Cmdlet(VerbsCommon.Set, "AzureVNetGateway", DefaultParameterSetName = "Connect"), OutputType(typeof(ManagementOperationContext))] + public class SetAzureVNetGatewayCommand : NetworkCmdletBase + { + [Parameter(Position = 0, Mandatory = true, ParameterSetName = "Connect", HelpMessage = "Connect to Gateway")] + public SwitchParameter Connect + { + get; + set; + } + + [Parameter(Position = 0, Mandatory = true, ParameterSetName = "Disconnect", HelpMessage = "Disconnect from Gateway")] + public SwitchParameter Disconnect + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = true, HelpMessage = "Virtual network name.")] + public string VNetName + { + get; + set; + } + + [Parameter(Position = 2, Mandatory = true, HelpMessage = "Local Site network name.")] + public string LocalNetworkSiteName + { + get; + set; + } + + public override void ExecuteCmdlet() + { + WriteObject(Client.ConnectDisconnectOrTest(VNetName, LocalNetworkSiteName, Connect.IsPresent)); + } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/Gateway/SetAzureVnetGatewayDefaultSite.cs b/src/ServiceManagement/Network/Commands.Network/Gateway/SetAzureVnetGatewayDefaultSite.cs new file mode 100644 index 000000000000..b7506c2a9d5b --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/Gateway/SetAzureVnetGatewayDefaultSite.cs @@ -0,0 +1,44 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Network.Gateway +{ + using System.Management.Automation; + using WindowsAzure.Commands.Utilities.Common; + + [Cmdlet(VerbsCommon.Set, "AzureVNetGatewayDefaultSite"), OutputType(typeof(ManagementOperationContext))] + public class SetAzureVNetGatewayDefaultSite : NetworkCmdletBase + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "The virtual network name.")] + [ValidateNotNullOrEmpty] + public string VNetName + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = true, HelpMessage = "The local network default site for this virtual network gateway.")] + [ValidateNotNullOrEmpty] + public string DefaultSite + { + get; + set; + } + + public override void ExecuteCmdlet() + { + WriteObject(Client.SetDefaultSite(VNetName, DefaultSite)); + } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/Gateway/SetAzureVnetGatewayKey.cs b/src/ServiceManagement/Network/Commands.Network/Gateway/SetAzureVnetGatewayKey.cs new file mode 100644 index 000000000000..9c16b2607668 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/Gateway/SetAzureVnetGatewayKey.cs @@ -0,0 +1,52 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Network.Gateway +{ + using System.Management.Automation; + using Model; + + [Cmdlet(VerbsCommon.Set, "AzureVNetGatewayKey"), OutputType(typeof(SharedKeyContext))] + public class SetAzureVNetGatewayKey : NetworkCmdletBase + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "The virtual network name.")] + [ValidateNotNullOrEmpty] + public string VNetName + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = true, HelpMessage = "The local network site name.")] + [ValidateNotNullOrEmpty] + public string LocalNetworkSiteName + { + get; + set; + } + + [Parameter(Position = 2, Mandatory = true, HelpMessage = "The shared key that will be used on the Azure Gateway and the customer's VPN device.")] + [ValidateNotNullOrEmpty] + public string SharedKey + { + get; + set; + } + + public override void ExecuteCmdlet() + { + WriteObject(Client.SetSharedKey(VNetName, LocalNetworkSiteName, SharedKey)); + } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/Gateway/StartAzureVNetGatewayDiagnostics.cs b/src/ServiceManagement/Network/Commands.Network/Gateway/StartAzureVNetGatewayDiagnostics.cs new file mode 100644 index 000000000000..9cf6ef4a48d2 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/Gateway/StartAzureVNetGatewayDiagnostics.cs @@ -0,0 +1,41 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Network.Gateway +{ + using System.Management.Automation; + using WindowsAzure.Commands.Common.Storage; + using WindowsAzure.Commands.Utilities.Common; + + [Cmdlet(VerbsLifecycle.Start, "AzureVNetGatewayDiagnostics"), OutputType(typeof(ManagementOperationContext))] + public class StartAzureVnetGatewayDiagnostics : NetworkCmdletBase + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Virtual network name.")] + public string VNetName { get; set; } + + [Parameter(Position = 1, Mandatory = true, HelpMessage = "The duration of the capture in seconds (between 1 and 300)")] + public int CaptureDurationInSeconds { get; set; } + + [Parameter(Position = 2, Mandatory = false, HelpMessage = "The container name provided by customer (optional)")] + public string ContainerName { get; set; } + + [Parameter(Position = 3, Mandatory = true, HelpMessage = "The object used to access the customer's storage account. This can be created using the Get-AzureStorageContext cmdlet.")] + public AzureStorageContext StorageContext { get; set; } + + public override void ExecuteCmdlet() + { + WriteObject(Client.StartDiagnostics(VNetName, CaptureDurationInSeconds, ContainerName, StorageContext)); + } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/Gateway/StopAzureVNetGatewayDiagnostics.cs b/src/ServiceManagement/Network/Commands.Network/Gateway/StopAzureVNetGatewayDiagnostics.cs new file mode 100644 index 000000000000..0db74df0c4ce --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/Gateway/StopAzureVNetGatewayDiagnostics.cs @@ -0,0 +1,31 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Network.Gateway +{ + using System.Management.Automation; + using WindowsAzure.Commands.Utilities.Common; + + [Cmdlet(VerbsLifecycle.Stop, "AzureVNetGatewayDiagnostics"), OutputType(typeof(ManagementOperationContext))] + public class StopAzureVnetGatewayDiagnostics : NetworkCmdletBase + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Virtual network name.")] + public string VNetName { get; set; } + + public override void ExecuteCmdlet() + { + WriteObject(Client.StopDiagnostics(VNetName)); + } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/MSSharedLibKey.snk b/src/ServiceManagement/Network/Commands.Network/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ServiceManagement/Network/Commands.Network/MSSharedLibKey.snk differ diff --git a/src/ServiceManagement/Network/Commands.Network/Microsoft.Azure.Commands.Network.dll-help.xml b/src/ServiceManagement/Network/Commands.Network/Microsoft.Azure.Commands.Network.dll-help.xml new file mode 100644 index 000000000000..686a54414f21 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/Microsoft.Azure.Commands.Network.dll-help.xml @@ -0,0 +1,1090 @@ + + + + + Get-AzureManagedCache + + Gets the Azure Caches in your Azure account. + + + + + Get + AzureManagedCache + + + + The Get-AzureManagedCache cmdlet get the Azure Caches in your account. By default, it gets all Azure Caches in the account. To get a particular Azure Cache, use the Name parameter. + An Azure Cache is a secure, dedicated cache that provides extremely fast access to data. This distributed, in-memory, scalable solution enables you to build highly scalable and responsive applications. For more information about Azure Cache, see Azure Cache (http://azure.microsoft.com/en-us/services/cache/). + + + + Get-AzureManagedCache + + Name + + Gets only the specified Azure Cache. Enter the name of an Azure Cache. The parameter value is case-sensitive. Wildcards are not permitted. This parameter is optional. By default, Get-AzureManagedCache get all Azure Caches in the account. + + String + + + + + + Name + + Gets only the specified Azure Cache. Enter the name of an Azure Cache. The parameter value is case-sensitive. Wildcards are not permitted. This parameter is optional. By default, Get-AzureManagedCache get all Azure Caches in the account. + + String + + String + + + + + + + + + + None + + + + + + + + You can pipe input to this cmdlet by property name, but not by value. + + + + + + + Microsoft.Azure.Commands.ManagedCache.Models.PSCacheService + + + + + + + + + + + + + + + + + + Before using this cmdlet, use Add-AzureAccount or Import-AzurePublishSettingsFile to make your Azure account available to Windows PowerShell. For more information, see How to install and configure Azure PowerShell (http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/). + + + + + Example 1: Get all Azure Caches + + + + + PS C:\>Get-AzureManagedCache + + + + This command gets all Azure Caches in your account. + + + + + + + + + Example 2: Get an Azure Cache by name + + + + + PS C:\>Get-AzureManagedCache -Name ContosoCache + + + + This command gets only the ContosoCache Azure Cache. + + + + + + + + + + + Online Version: + + + + + New-AzureManagedCache + + + + Set-AzureManagedCache + + + + Remove-AzureManagedCache + + + + Get-AzureManagedCacheAccessKey + + + + New-AzureManagedCacheAccessKey + + + + + + + Get-AzureManagedCacheAccessKey + + Gets the access keys for an Azure Cache + + + + + Get + AzureManagedCacheAccessKey + + + + The Get-AzureManagedCacheAccessKey cmdlet gets the primary and secondary access keys for an Azure Cache. You can use these keys to allow clients, such as web applications, to access to your Azure Cache. + Typically, you use the primary key, but use the secondary key to avoid delays while the primary key is being regenerated. To get new access keys, use the New- AzureManagedCacheAccessKey cmdlet + An Azure Cache is a secure, dedicated cache that provides extremely fast access to data. This distributed, in-memory, scalable solution enables you to build highly scalable and responsive applications. For more information about Azure Cache, see Azure Cache (http://azure.microsoft.com/en-us/services/cache/). + + + + Get-AzureManagedCacheAccessKey + + Name + + Specifies the name of the Azure Cache. This parameter value is case-sensitve. Wildcard characters are not permitted. This parameter is required. + + String + + + + + + Name + + Specifies the name of the Azure Cache. This parameter value is case-sensitve. Wildcard characters are not permitted. This parameter is required. + + String + + String + + + + + + + + + + None + + + + + + + + You can pipe input to this cmdlet by property name, but not by value. + + + + + + + Microsoft.Azure.Management.ManagedCache.Models.CachingKeysResponse + + + + + + + + + + + + + + + + + Example 1: Get the access key + + + + + PS C:\>Get-AzureManagedCacheAccessKey -Name contosocache + + + + This command gets the access key for the contosocache Azure Cache. + + + + + + + + + + + New-AzureManagedCacheAccessKey + + + + New-AzureManagedCache + + + + Get-AzureManagedCache + + + + Set-AzureManagedCache + + + + Remove-AzureManagedCache + + + + Get-AzureManagedCacheAccessKey + + + + New-AzureManagedCacheAccessKey + + + + + + + New-AzureManagedCache + + Creates an Azure cache + + + + + New + AzureManagedCache + + + + The New-AzureManagedCache cmdlet creates an Azure Cache in your Azure account and returns an object that represents the new Azure Cache. + An Azure Cache is a secure, dedicated cache that provides extremely fast access to data. This distributed, in-memory, scalable solution enables you to build highly scalable and responsive applications. For more information about Azure Cache, see Azure Cache (http://azure.microsoft.com/en-us/services/cache/). + + + + New-AzureManagedCache + + Name + + Specifies a name for the Azure Cache. The name can include only lower-case letters and numbers, and it must begin with a lower-case letter. The name must be unique. This parameter is required. + + String + + + Location + + Specifies the location of the Azure Cache. Enter an Azure data center location, such as "North Central US" or "West Europe". This parameter is required. + To find a location that supports Azure Cache, use the Switch-AzureModule cmdlet to switch to the AzureResourceManager module, and then use the Get-AzureLocation cmdlet. + + String + + + Memory + + Specifies the size of the Azure Cache. The cache size might affect the cost of the service. Enter a value followed by "MB" or "GB" (no intervening space), such as (128MB or 8GB). This value must be compatible with the value of the Sku parameter. This parameter is optional. The default value is the lowest value in the range specified by the Sku parameter. + -- When the value of Sku is Basic, the value of Memory must be divisible by 128MB. + +-- When the value of Sku is Standard, the value of Memory must be divisible by 1GB. + +-- When the value of Sku is Premium, the value of Memory must be divisible by 5GB. + + String + + + Sku + + Specifies the tier of the Azure Cache. Valid values are Basic (128MB - 1GB), Standard (1GB - 10GB), and Premium (5GB - 150GB). This parameter is optional. The default value is Basic. + + String + + + + + + Location + + Specifies the location of the Azure Cache. Enter an Azure data center location, such as "North Central US" or "West Europe". This parameter is required. + To find a location that supports Azure Cache, use the Switch-AzureModule cmdlet to switch to the AzureResourceManager module, and then use the Get-AzureLocation cmdlet. + + String + + String + + + + + + + Memory + + Specifies the size of the Azure Cache. The cache size might affect the cost of the service. Enter a value followed by "MB" or "GB" (no intervening space), such as (128MB or 8GB). This value must be compatible with the value of the Sku parameter. This parameter is optional. The default value is the lowest value in the range specified by the Sku parameter. + -- When the value of Sku is Basic, the value of Memory must be divisible by 128MB. + +-- When the value of Sku is Standard, the value of Memory must be divisible by 1GB. + +-- When the value of Sku is Premium, the value of Memory must be divisible by 5GB. + + String + + String + + + + + + + Name + + Specifies a name for the Azure Cache. The name can include only lower-case letters and numbers, and it must begin with a lower-case letter. The name must be unique. This parameter is required. + + String + + String + + + + + + + Sku + + Specifies the tier of the Azure Cache. Valid values are Basic (128MB - 1GB), Standard (1GB - 10GB), and Premium (5GB - 150GB). This parameter is optional. The default value is Basic. + + String + + String + + + + + + + + + + None + + + + + + + + You cannot pipe input to this cmdlet. + + + + + + + Microsoft.Azure.Commands.ManagedCache.Models .PSCacheService + + + + + + + + + + + + + + + + + + Before using this cmdlet, use Add-AzureAccount or Import-AzurePublishSettingsFile to make your Azure account available to Windows PowerShell. For more information, see How to install and configure Azure PowerShell (http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/). + + + + + Example 1: Create an Azure Cache + + + + + PS C:\>New-AzureManagedCache -Name contosocache -Location "West Europe" + + + + This command creates an Azure Cache named ContosoCache in the West Europe Azure data center. It uses the default values for the Sku and Memory parameters, which are Basic and 128MB. + + + + + + + + + Example 2: Create a premium Azure Cache + + + + + PS C:\>New-AzureManagedCache -Name contosoappcache -Location "West Europe" -Sku Premium -Memory 150GB + + + + This command creates the largest available Azure Cache. + + + + + + + + + + + Online Version: + + + + + Get-AzureManagedCache + + + + Set-AzureManagedCache + + + + Remove-AzureManagedCache + + + + Get-AzureManagedCacheAccessKey + + + + New-AzureManagedCacheAccessKey + + + + + + + New-AzureManagedCacheAccessKey + + Creates new access keys for an Azure Cache. + + + + + New + AzureManagedCacheAccessKey + + + + The New-AzureManagedCacheAccessKey cmdlet generates new primary or secondary access keys for an Azure Cache. When you create an Azure Cache, it includes a set of access keys. To get the current access keys, use the Get-AzureManagedCacheAccessKey cmdlet. You can use these keys to allow clients, such as web applications, to access to your Azure Cache. + An Azure Cache is a secure, dedicated cache that provides extremely fast access to data. This distributed, in-memory, scalable solution enables you to build highly scalable and responsive applications. For more information about Azure Cache, see Azure Cache (http://azure.microsoft.com/en-us/services/cache/). + Typically, you use the primary key, but use the secondary key to avoid delays while the primary key is being regenerated. To get new access keys, use the New- AzureManagedCacheAccessKey cmdlet + + + + + + New-AzureManagedCacheAccessKey + + Name + + Generates keys for the specified Azure Cache. Enter the name of the Azure Cache. This parameter is required. The parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + + KeyType + + Specifies the type of key to create. Valid values are Primary and Secondary. This parameter is optional. The default value is Primary. + + String + + + + + + KeyType + + Specifies the type of key to create. Valid values are Primary and Secondary. This parameter is optional. The default value is Primary. + + String + + String + + + + + + + Name + + Generates keys for the specified Azure Cache. Enter the name of the Azure Cache. This parameter is required. The parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + String + + + + + + + + + + None + + + + + + + + You cannot pipe input to this cmdlet. + + + + + + + Microsoft.Azure.Management.ManagedCache.Models.CachingKeysResponse + + + + + + + + + + + + + + + + + Create a new primary key + + + + + PS C:\>New-AzureManagedCacheAccessKey -Name contosocache + + + + This command creates a new primary key for the contosocache Azure Cache. + + + + + + + + + Create a new secondary key + + + + + PS C:\>New-AzureManagedCacheAccessKey -Name contosocache -KeyType Secondary + + + + This command creates a new secondary key for the contosocache Azure Cache. + + + + + + + + + Create new access keys + + + + + PS C:\>'Primary', 'Secondary' | ForEach-Object {New-AzureManagedCacheAccessKey -Name contosocache -KeyType $_} + + + + This command creates new primary and secondary keys for the contosocache Azure Cache. + + + + + + + + + + + Online Version: + + + + + Get-AzureManagedCacheAccessKey + + + + New-AzureManagedCache + + + + Get-AzureManagedCache + + + + Set-AzureManagedCache + + + + Remove-AzureManagedCache + + + + + + + Remove-AzureManagedCache + + Deletes an Azure Cache + + + + + Remove + AzureManagedCache + + + + The Remove-AzureManagedCache cmdlet deletes an Azure Cache and all of the data in the Cache. It returns True if the operation was successful and False if it failed. + By default, Remove-AzureManagedCache prompts you for confirmation before deleting the Azure Cache, but you can use the Force parameter to suppress the prompt. + An Azure Cache is a secure, dedicated cache that provides extremely fast access to data. This distributed, in-memory, scalable solution enables you to build highly scalable and responsive applications. For more information about Azure Cache, see Azure Cache (http://azure.microsoft.com/en-us/services/cache/). + + + + Remove-AzureManagedCache + + Name + + Specifies the name of the Azure Cache to delete. The parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + + Force + + Suppresses the confirmation prompt. By default, Remove-AzureManagedCache prompts you for confirmation before deleting the Azure Cache. + + + + + + + Force + + Suppresses the confirmation prompt. By default, Remove-AzureManagedCache prompts you for confirmation before deleting the Azure Cache. + + SwitchParameter + + SwitchParameter + + + + + + + Name + + Specifies the name of the Azure Cache to delete. The parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + String + + + + + + + + + + None + + + + + + + + You can input to this cmdlet by property name, but not by value. + + + + + + + System.Boolean + + + + + + + + Returns True ($true) if the operation is successful and False ($false) if it fails. + + + + + + + + + Before using this cmdlet, use Add-AzureAccount or Import-AzurePublishSettingsFile to make your Azure account available to Windows PowerShell. For more information, see How to install and configure Azure PowerShell (http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/). + + + + + Delete an Azure Cache + + + + + PS C:\>Remove-AzureManagedCache -Name contosocache + +Confirm +Are you sure you want to perform this action? +Performing the operation "Delete" on target "contosocache". +[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): +Y + +True + + + + + This command deletes the contosocache Azure Cache. The command prompts for confirmation before deleting the Cache. It returns a value of $True to indicate that the Cache was deleted. + + + + + + + + + Example 2: Remove all test caches + + + + + PS C:\>Get-AzureManagedCache | Where-Object Name -like Test* | Remove-AzureManagedCache -Force + + + + This command removes all Azure Caches that have names that begin with "Test." It uses the Get-AzureManagedCache cmdlet to get the Azure Caches in your account. It pipes them to the Where-Object cmdlet, which returns only the Azure Caches that have names that begin with "Test". Then, it pipes the test caches to the Remove-AzureManagedCache cmdlet with the Force parameter, which deletes them without prompting for confirmation. + + + + + + + + + + + Online Version: + + + + + New-AzureManagedCache + + + + Get-AzureManagedCache + + + + Set-AzureManagedCache + + + + Get-AzureManagedCacheAccessKey + + + + New-AzureManagedCacheAccessKey + + + + + + + Set-AzureManagedCache + + Changes the properties of an Azure Cache. + + + + + Set + AzureManagedCache + + + + The Set-AzureManagedCache cmdlet changes the properties of an Azure Cache and returns an object that represents the cache with the changes. Use the Name and Location parameters to identify the Azure Cache, and the Sku and Memory parameters to change its properties. + An Azure Cache is a secure, dedicated cache that provides extremely fast access to data. This distributed, in-memory, scalable solution enables you to build highly scalable and responsive applications. For more information about Azure Cache, see Azure Cache (http://azure.microsoft.com/en-us/services/cache/). + WARNING: When you change the SKU of an Azure Cache, all data in the cache is deleted and a new, empty Azure Cache is created for you with the same name and location. When you use the Sku parameter, Set-AzureManagedCache prompts for confirmation. To suppress the confirmation prompt, use the Force parameter. + + + + Set-AzureManagedCache + + Name + + Identifies the Azure Cache. Enter the name of an Azure Cache. This parameter is required. The parameter value is case-sensitive. Wildcards are not permitted. You cannot use this cmdlet to change the name of an Azure Cache. + + String + + + Location + + Specifies the location of the Azure Cache. This parameter is required. Enter the name of the Azure data center location where the Azure Cache resides, such as "North Central US" or "West Europe". This parameter identifies the Azure Cache. You cannot use this parameter to change the location of the Azure Cache. + + String + + + Sku + + Changes the tier of the Azure Cache. Valid values are Basic (128MB - 1GB), Standard (1GB - 10GB), and Premium (5GB - 150GB). This parameter is optional. + + String + + + Memory + + Changes the Azure Cache to the specified size. The cache size might affect the cost of the service. Enter a value followed by "MB" or "GB" (no intervening space), such as (128MB or 8GB). This value must be compatible with the Sku of the Azure Cache. This parameter is optional. + -- When the value of Sku is Basic, the value of Memory must be divisible by 128MB. + +-- When the value of Sku is Standard, the value of Memory must be divisible by 1GB. + +-- When the value of Sku is Premium, the value of Memory must be divisible by 5GB. + + String + + + Force + + Suppresses the confirmation prompt that appears when you use the Sku parameter. Because changing the SKU deletes all data in the Azure Cache, Set-AzureManagedCache prompts you for confirmation before performing the operation. + + + + + + + Force + + Suppresses the confirmation prompt that appears when you use the Sku parameter. Because changing the SKU deletes all data in the Azure Cache, Set-AzureManagedCache prompts you for confirmation before performing the operation. + + SwitchParameter + + SwitchParameter + + + + + + + Location + + Specifies the location of the Azure Cache. This parameter is required. Enter the name of the Azure data center location where the Azure Cache resides, such as "North Central US" or "West Europe". This parameter identifies the Azure Cache. You cannot use this parameter to change the location of the Azure Cache. + + String + + String + + + + + + + Memory + + Changes the Azure Cache to the specified size. The cache size might affect the cost of the service. Enter a value followed by "MB" or "GB" (no intervening space), such as (128MB or 8GB). This value must be compatible with the Sku of the Azure Cache. This parameter is optional. + -- When the value of Sku is Basic, the value of Memory must be divisible by 128MB. + +-- When the value of Sku is Standard, the value of Memory must be divisible by 1GB. + +-- When the value of Sku is Premium, the value of Memory must be divisible by 5GB. + + String + + String + + + + + + + Name + + Identifies the Azure Cache. Enter the name of an Azure Cache. This parameter is required. The parameter value is case-sensitive. Wildcards are not permitted. You cannot use this cmdlet to change the name of an Azure Cache. + + String + + String + + + + + + + Sku + + Changes the tier of the Azure Cache. Valid values are Basic (128MB - 1GB), Standard (1GB - 10GB), and Premium (5GB - 150GB). This parameter is optional. + + String + + String + + + + + + + + + + None + + + + + + + + You cannot pipe input to this cmdlet. + + + + + + + Microsoft.Azure.Commands.ManagedCache.Models.PsCacheService + + + + + + + + + + + + + + + + + + Before using this cmdlet, use Add-AzureAccount or Import-AzurePublishSettingsFile to make your Azure account available to Windows PowerShell. For more information, see How to install and configure Azure PowerShell (http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/). + + + + + Example 1: Change the size of an Azure Cache + + + + + PS C:\>Set-AzureManagedCache -Name contosocache -Location "West Europe" -Memory 256MB + + + + This command increases the size of the contosocache Azure Cache to 256 MB. + + + + + + + + + Example 2: Change the SKU of an Azure Cache + + + + + +PS C:\>Set-AzureManagedCache -Name contosocache -Location "West Europe" -Sku Standard -Size 10GB + +Confirm +Are you sure you want to perform this action? +Performing the operation "Delete" on target "contosocache". +[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): + + + + + This command changes the SKU of the contosocache Azure Cache from Basic to Standard and the Size to 10 GB. + Because this operation deletes the existing Azure Cache and its data and creates a new empty Azure Cache, Set-AzureManagedCache prompts you for confirmation before deleting the cache. To suppress this prompt, use the Force parameter. + + + + + + + + + + + Online Version: + + + + + + diff --git a/src/ServiceManagement/Network/Commands.Network/Microsoft.Azure.Commands.Network.format.ps1xml b/src/ServiceManagement/Network/Commands.Network/Microsoft.Azure.Commands.Network.format.ps1xml new file mode 100644 index 000000000000..420a3c528d0e --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/Microsoft.Azure.Commands.Network.format.ps1xml @@ -0,0 +1,102 @@ + + + + + Microsoft.Azure.Commands.Network.NetworkSecurityGroup.Model.NetworkSecurityGroupWithRules + + Microsoft.Azure.Commands.Network.NetworkSecurityGroup.Model.NetworkSecurityGroupWithRules + + + + + + + + Name + + + + $_.Rules | Sort-Object -Property Type,Priority | Format-Table -GroupBy Type | Out-String + + + + + + + + + + Microsoft.Azure.Commands.Network.NetworkSecurityGroup.Model.NetworkSecurityRule + + Microsoft.Azure.Commands.Network.NetworkSecurityGroup.Model.NetworkSecurityRule + + + + + + 20 + + + + 9 + + + + 8 + + + + 15 + + + + 13 + + + + 16 + + + + 14 + + + + 8 + + + + + + + + Name + + + Priority + + + Action + + + SourceAddressPrefix + + + SourcePortRange + + + DestinationAddressPrefix + + + DestinationPortRange + + + Protocol + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Network/Commands.Network/NetworkClient.cs b/src/ServiceManagement/Network/Commands.Network/NetworkClient.cs new file mode 100644 index 000000000000..c969571bd591 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/NetworkClient.cs @@ -0,0 +1,435 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +namespace Microsoft.Azure.Commands.Network +{ + using System; + using System.Collections.Generic; + using System.Linq; + using System.Management.Automation; + using Gateway.Model; + using NetworkSecurityGroup.Model; + using Routes.Model; + using WindowsAzure; + using WindowsAzure.Commands.Common; + using WindowsAzure.Commands.Common.Models; + using WindowsAzure.Commands.Common.Storage; + using WindowsAzure.Commands.Utilities.Common; + using WindowsAzure.Common; + using WindowsAzure.Management; + using WindowsAzure.Management.Network; + using WindowsAzure.Management.Network.Models; + using WindowsAzure.Storage.Auth; + + public class NetworkClient + { + private readonly NetworkManagementClient client; + private readonly ManagementClient managementClient; + private readonly ICommandRuntime commandRuntime; + + public NetworkClient(AzureSubscription subscription, ICommandRuntime commandRuntime) + : this(CreateClient(subscription), + CreateClient(subscription), + commandRuntime) + { + } + public NetworkClient(NetworkManagementClient client, ManagementClient managementClient, ICommandRuntime commandRuntime) + { + this.client = client; + this.managementClient = managementClient; + this.commandRuntime = commandRuntime; + } + + public VirtualNetworkGatewayContext GetGateway(string vnetName) + { + if (string.IsNullOrWhiteSpace(vnetName)) + { + throw new ArgumentException("vnetName cannot be null or whitespace.", "vnetName"); + } + + GatewayGetResponse response = client.Gateways.Get(vnetName); + + VirtualNetworkGatewayContext gatewayContext = new VirtualNetworkGatewayContext() + { + LastEventData = (response.LastEvent != null) ? response.LastEvent.Data : null, + LastEventMessage = (response.LastEvent != null) ? response.LastEvent.Message : null, + LastEventID = GetEventId(response.LastEvent), + LastEventTimeStamp = (response.LastEvent != null) ? (DateTime?)response.LastEvent.Timestamp : null, + State = (ProvisioningState)Enum.Parse(typeof(ProvisioningState), response.State, true), + VIPAddress = response.VipAddress, + DefaultSite = (response.DefaultSite != null ? response.DefaultSite.Name : null), + GatewaySKU = response.GatewaySKU, + }; + PopulateOperationContext(response.RequestId, gatewayContext); + + return gatewayContext; + } + + public IEnumerable ListConnections(string vnetName) + { + GatewayListConnectionsResponse response = client.Gateways.ListConnections(vnetName); + + IEnumerable connections = response.Connections.Select( + (GatewayListConnectionsResponse.GatewayConnection connection) => + { + return new GatewayConnectionContext() + { + ConnectivityState = connection.ConnectivityState.ToString(), + EgressBytesTransferred = (ulong)connection.EgressBytesTransferred, + IngressBytesTransferred = (ulong)connection.IngressBytesTransferred, + LastConnectionEstablished = connection.LastConnectionEstablished.ToString(), + LastEventID = connection.LastEvent != null ? connection.LastEvent.Id : null, + LastEventMessage = connection.LastEvent != null ? connection.LastEvent.Message : null, + LastEventTimeStamp = connection.LastEvent != null ? connection.LastEvent.Timestamp.ToString() : null, + LocalNetworkSiteName = connection.LocalNetworkSiteName + }; + }); + PopulateOperationContext(response.RequestId, connections); + + return connections; + } + + public VirtualNetworkDiagnosticsContext GetDiagnostics(string vnetName) + { + GatewayDiagnosticsStatus diagnosticsStatus = client.Gateways.GetDiagnostics(vnetName); + + VirtualNetworkDiagnosticsContext diagnosticsContext = new VirtualNetworkDiagnosticsContext() + { + DiagnosticsUrl = diagnosticsStatus.DiagnosticsUrl, + State = diagnosticsStatus.State, + }; + PopulateOperationContext(diagnosticsStatus.RequestId, diagnosticsContext); + + return diagnosticsContext; + } + + public SharedKeyContext GetSharedKey(string vnetName, string localNetworkSiteName) + { + GatewayGetSharedKeyResponse response = client.Gateways.GetSharedKey(vnetName, localNetworkSiteName); + + SharedKeyContext sharedKeyContext = new SharedKeyContext() + { + Value = response.SharedKey + }; + PopulateOperationContext(response.RequestId, sharedKeyContext); + + return sharedKeyContext; + } + + public GatewayGetOperationStatusResponse SetSharedKey(string vnetName, string localNetworkSiteName, string sharedKey) + { + GatewaySetSharedKeyParameters sharedKeyParameters = new GatewaySetSharedKeyParameters() + { + Value = sharedKey, + }; + + return client.Gateways.SetSharedKey(vnetName, localNetworkSiteName, sharedKeyParameters); + } + + public GatewayGetOperationStatusResponse CreateGateway(string vnetName, GatewayType gatewayType, GatewaySKU gatewaySKU) + { + GatewayCreateParameters parameters = new GatewayCreateParameters() + { + GatewayType = gatewayType, + GatewaySKU = gatewaySKU, + }; + + return client.Gateways.Create(vnetName, parameters); + } + + public GatewayGetOperationStatusResponse DeleteGateway(string vnetName) + { + return client.Gateways.Delete(vnetName); + } + + public GatewayGetOperationStatusResponse ResizeGateway(string vnetName, GatewaySKU gatewaySKU) + { + ResizeGatewayParameters parameters = new ResizeGatewayParameters() + { + GatewaySKU = gatewaySKU, + }; + return client.Gateways.Resize(vnetName, parameters); + } + + public GatewayGetOperationStatusResponse ConnectDisconnectOrTest(string vnetName, string localNetworkSiteName, bool isConnect) + { + GatewayConnectDisconnectOrTestParameters connParams = new GatewayConnectDisconnectOrTestParameters() + { + Operation = isConnect ? GatewayConnectionUpdateOperation.Connect : GatewayConnectionUpdateOperation.Disconnect + }; + + return client.Gateways.ConnectDisconnectOrTest(vnetName, localNetworkSiteName, connParams); + } + + public GatewayGetOperationStatusResponse StartDiagnostics(string vnetName, int captureDurationInSeconds, string containerName, AzureStorageContext storageContext) + { + StorageCredentials credentials = storageContext.StorageAccount.Credentials; + string customerStorageKey = credentials.ExportBase64EncodedKey(); + string customerStorageName = credentials.AccountName; + return StartDiagnostics(vnetName, captureDurationInSeconds, containerName, customerStorageKey, customerStorageName); + } + public GatewayGetOperationStatusResponse StartDiagnostics(string vnetName, int captureDurationInSeconds, string containerName, string customerStorageKey, string customerStorageName) + { + UpdateGatewayPublicDiagnostics parameters = new UpdateGatewayPublicDiagnostics() + { + CaptureDurationInSeconds = captureDurationInSeconds.ToString(), + ContainerName = containerName, + CustomerStorageKey = customerStorageKey, + CustomerStorageName = customerStorageName, + Operation = UpdateGatewayPublicDiagnosticsOperation.StartDiagnostics, + }; + + return client.Gateways.UpdateDiagnostics(vnetName, parameters); + } + + public GatewayGetOperationStatusResponse StopDiagnostics(string vnetName) + { + UpdateGatewayPublicDiagnostics parameters = new UpdateGatewayPublicDiagnostics() + { + Operation = UpdateGatewayPublicDiagnosticsOperation.StopDiagnostics, + }; + + return client.Gateways.UpdateDiagnostics(vnetName, parameters); + } + + public GatewayGetOperationStatusResponse SetDefaultSite(string vnetName, string defaultSiteName) + { + GatewaySetDefaultSiteListParameters parameters = new GatewaySetDefaultSiteListParameters() + { + DefaultSite = defaultSiteName, + }; + + return client.Gateways.SetDefaultSites(vnetName, parameters); + } + + public GatewayGetOperationStatusResponse RemoveDefaultSite(string vnetName) + { + return client.Gateways.RemoveDefaultSites(vnetName); + } + + public RouteTable GetRouteTable(string routeTableName, string detailLevel) + { + RouteTable result; + if (string.IsNullOrEmpty(detailLevel)) + { + result = client.Routes.GetRouteTable(routeTableName).RouteTable; + } + else + { + result = client.Routes.GetRouteTableWithDetails(routeTableName, detailLevel).RouteTable; + } + return result; + } + + public IEnumerable ListRouteTables() + { + return client.Routes.ListRouteTables().RouteTables; + } + + public OperationResponse CreateRouteTable(string routeTableName, string label, string location) + { + CreateRouteTableParameters parameters = new CreateRouteTableParameters() + { + Name = routeTableName, + Label = label, + Location = location, + }; + + return client.Routes.CreateRouteTable(parameters); + } + + public OperationResponse DeleteRouteTable(string routeTableName) + { + return client.Routes.DeleteRouteTable(routeTableName); + } + + public OperationResponse SetRoute(string routeTableName, string routeName, string addressPrefix, string nextHopType) + { + NextHop nextHop = new NextHop() + { + Type = nextHopType, + }; + SetRouteParameters parameters = new SetRouteParameters() + { + Name = routeName, + AddressPrefix = addressPrefix, + NextHop = nextHop, + }; + + return client.Routes.SetRoute(routeTableName, routeName, parameters); + } + + public OperationResponse DeleteRoute(string routeTableName, string routeName) + { + return client.Routes.DeleteRoute(routeTableName, routeName); + } + + public SubnetRouteTableContext GetRouteTableForSubnet(string vnetName, string subnetName) + { + GetRouteTableForSubnetResponse response = client.Routes.GetRouteTableForSubnet(vnetName, subnetName); + SubnetRouteTableContext context = new SubnetRouteTableContext() + { + RouteTableName = response.RouteTableName, + }; + + return context; + } + + public OperationResponse AddRouteTableToSubnet(string vnetName, string subnetName, string routeTableName) + { + AddRouteTableToSubnetParameters parameters = new AddRouteTableToSubnetParameters() + { + RouteTableName = routeTableName, + }; + + return client.Routes.AddRouteTableToSubnet(vnetName, subnetName, parameters); + } + + public OperationResponse RemoveRouteTableFromSubnet(string vnetName, string subnetName) + { + return client.Routes.RemoveRouteTableFromSubnet(vnetName, subnetName); + } + + private int GetEventId(GatewayEvent gatewayEvent) + { + int val = -1; + if (gatewayEvent != null) + { + int.TryParse(gatewayEvent.Id, out val); + } + + return val; + } + + private void PopulateOperationContext(string requestId, ManagementOperationContext operationContext) + { + OperationStatusResponse operationStatus = managementClient.GetOperationStatus(requestId); + PopulateOperationContext(operationStatus, operationContext); + } + private void PopulateOperationContext(string requestId, IEnumerable operationContexts) + { + OperationStatusResponse operationStatus = managementClient.GetOperationStatus(requestId); + foreach (ManagementOperationContext operationContext in operationContexts) + { + PopulateOperationContext(operationStatus, operationContext); + } + } + private void PopulateOperationContext(OperationStatusResponse operationStatus, ManagementOperationContext operationContext) + { + operationContext.OperationId = operationStatus.Id; + operationContext.OperationStatus = operationStatus.Status.ToString(); + operationContext.OperationDescription = commandRuntime.ToString(); + } + + private static ClientType CreateClient(AzureSubscription subscription) where ClientType : ServiceClient + { + return AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement); + } + + public void CreateNetworkSecurityGroup(string name, string location, string label) + { + NetworkSecurityGroupCreateParameters parameters = new NetworkSecurityGroupCreateParameters() + { + Location = location, + Name = name, + Label = label + }; + + client.NetworkSecurityGroups.Create(parameters); + } + + public INetworkSecurityGroup GetNetworkSecurityGroup(string name, bool details) + { + var getResponse = client.NetworkSecurityGroups.Get(name, details ? "Full" : null); + return details ? new NetworkSecurityGroupWithRules(getResponse) : new SimpleNetworkSecurityGroup(getResponse); + } + + public IEnumerable ListNetworkSecurityGroups(bool details) + { + var networkSecurityGroupList = client.NetworkSecurityGroups.List(); + IEnumerable result; + + if (details) + { + // to get the rules, need to specifically call Get for each group + result = networkSecurityGroupList.Select(nsg => GetNetworkSecurityGroup(nsg.Name, true)); + } + + else + { + result = networkSecurityGroupList.Select(nsg => new SimpleNetworkSecurityGroup(nsg.Name, nsg.Location, nsg.Label)); + } + + return result; + } + + public void SetNetworkSecurityRule( + string networkSecurityGroupName, + string ruleName, + string type, + int priority, + string action, + string sourceAddressPrefix, + string sourcePortRange, + string destinationAddressPrefix, + string destinationPortRange, + string protocol) + { + var setSecurityRuleParameters = new NetworkSecuritySetRuleParameters() + { + Type = type, + Priority = priority, + Action = action, + SourceAddressPrefix = sourceAddressPrefix, + SourcePortRange = sourcePortRange, + DestinationAddressPrefix = destinationAddressPrefix, + DestinationPortRange = destinationPortRange, + Protocol = protocol + }; + + client.NetworkSecurityGroups.SetRule(networkSecurityGroupName, ruleName, setSecurityRuleParameters); + } + + public void RemoveNetworkSecurityGroup(string name) + { + client.NetworkSecurityGroups.Delete(name); + } + + public void RemoveNetworkSecurityRule(string securityGroupName, string securityRuleName) + { + client.NetworkSecurityGroups.DeleteRule(securityGroupName, securityRuleName); + } + + public NetworkSecurityGroupGetForSubnetResponse GetNetworkSecurityGroupForSubnet(string virtualNetworkName, string subnetName) + { + return client.NetworkSecurityGroups.GetForSubnet(virtualNetworkName, subnetName); + } + + public void RemoveNetworkSecurityGroupFromSubnet(string networkSecurityGroupName, string virtualNetworkName, string subnetName) + { + client.NetworkSecurityGroups.RemoveFromSubnet(virtualNetworkName, subnetName, networkSecurityGroupName); + } + + public void SetNetworkSecurityGroupForSubnet(string networkSecurityGroupName, string subnetName, string virtualNetworkName) + { + var parameters = new NetworkSecurityGroupAddToSubnetParameters() + { + Name = networkSecurityGroupName + }; + + client.NetworkSecurityGroups.AddToSubnet(virtualNetworkName, subnetName, parameters); + } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/NetworkCmdletBase.cs b/src/ServiceManagement/Network/Commands.Network/NetworkCmdletBase.cs new file mode 100644 index 000000000000..bb0016f16b72 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/NetworkCmdletBase.cs @@ -0,0 +1,46 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Network +{ + using WindowsAzure.Commands.Common; + using WindowsAzure.Commands.Common.Models; + using WindowsAzure.Commands.Utilities.Common; + using WindowsAzure.Commands.Utilities.Profile; + + /// + /// The base class for all Microsoft Azure Network Gateway Management Cmdlets + /// + public abstract class NetworkCmdletBase : AzurePSCmdlet + { + private NetworkClient client; + + protected AzureSubscription CurrentSubscription + { + get { return AzureSession.CurrentContext.Subscription; } + } + + protected NetworkClient Client + { + get + { + if (client == null) + { + client = new NetworkClient(CurrentSubscription, CommandRuntime); + } + return client; + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/GetAzureNetworkSecurityGroup.cs b/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/GetAzureNetworkSecurityGroup.cs new file mode 100644 index 000000000000..f88eea964cdc --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/GetAzureNetworkSecurityGroup.cs @@ -0,0 +1,66 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.Azure.Commands.Network.NetworkSecurityGroup.Model; + +namespace Microsoft.Azure.Commands.Network.NetworkSecurityGroup +{ + [Cmdlet(VerbsCommon.Get, "AzureNetworkSecurityGroup"), OutputType(typeof(IEnumerable))] + public class GetAzureNetworkSecurityGroup: NetworkCmdletBase + { + [Parameter(Position = 0, Mandatory = false)] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Mandatory = false)] + [ValidateNotNullOrEmpty] + public SwitchParameter Detailed { get; set; } + + public override void ExecuteCmdlet() + { + if (string.IsNullOrEmpty(Name)) + { + GetNoName(); + } + else + { + GetByName(); + } + } + + private void GetByName() + { + INetworkSecurityGroup networkSecurityGroup = Client.GetNetworkSecurityGroup(Name, Detailed); + WriteNetworkSecurityGroup(networkSecurityGroup); + } + + private void GetNoName() + { + IEnumerable networkSecurityGroups = Client.ListNetworkSecurityGroups(Detailed); + WriteNetworkSecurityGroups(networkSecurityGroups); + } + + private void WriteNetworkSecurityGroup(INetworkSecurityGroup networkSecurityGroup) + { + WriteObject(networkSecurityGroup, true); + } + + private void WriteNetworkSecurityGroups(IEnumerable networkSecurityGroups) + { + WriteObject(networkSecurityGroups, true); + } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/Model/INetworkSecurityGroup.cs b/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/Model/INetworkSecurityGroup.cs new file mode 100644 index 000000000000..4f8deef2c376 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/Model/INetworkSecurityGroup.cs @@ -0,0 +1,21 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Network.NetworkSecurityGroup.Model +{ + public interface INetworkSecurityGroup + { + SimpleNetworkSecurityGroup GetInstance(); + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/Model/NetworkSecurityGroupWithRules.cs b/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/Model/NetworkSecurityGroupWithRules.cs new file mode 100644 index 000000000000..086bbb91d01c --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/Model/NetworkSecurityGroupWithRules.cs @@ -0,0 +1,42 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using AutoMapper; +using Microsoft.WindowsAzure.Management.Network.Models; + +namespace Microsoft.Azure.Commands.Network.NetworkSecurityGroup.Model +{ + public class NetworkSecurityGroupWithRules : SimpleNetworkSecurityGroup + { + private List rules = new List(); + + public IEnumerable Rules + { + get { return this.rules; } + set { this.rules = value.ToList(); } + } + + public NetworkSecurityGroupWithRules(NetworkSecurityGroupGetResponse networkSecurityGroupAsGetResponse) + : base(networkSecurityGroupAsGetResponse) + { + Mapper.CreateMap(); + if (networkSecurityGroupAsGetResponse.Rules != null) + { + rules.AddRange(networkSecurityGroupAsGetResponse.Rules.Select(Mapper.Map)); + } + } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/Model/NetworkSecurityRule.cs b/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/Model/NetworkSecurityRule.cs new file mode 100644 index 000000000000..2db5d61365c3 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/Model/NetworkSecurityRule.cs @@ -0,0 +1,33 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Network.NetworkSecurityGroup.Model +{ + public class NetworkSecurityRule + { + public string Action { get; set; } + public string DestinationAddressPrefix { get; set; } + public string DestinationPortRange { get; set; } + public bool IsDefault { get; set; } + public string Name { get; set; } + public int Priority { get; set; } + public string Protocol { get; set; } + public string SourceAddressPrefix { get; set; } + public string SourcePortRange { get; set; } + public string State { get; set; } + public string Type { get; set; } + + public NetworkSecurityGroupWithRules PSParentPath { get; set; } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/Model/SimpleNetworkSecurityGroup.cs b/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/Model/SimpleNetworkSecurityGroup.cs new file mode 100644 index 000000000000..a1a5653e2447 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/Model/SimpleNetworkSecurityGroup.cs @@ -0,0 +1,46 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.Network.Models; + +namespace Microsoft.Azure.Commands.Network.NetworkSecurityGroup.Model +{ + public class SimpleNetworkSecurityGroup : INetworkSecurityGroup + { + public SimpleNetworkSecurityGroup(string name, string location, string label) + { + this.Name = name; + this.Location = location; + this.Label = label; + } + + public SimpleNetworkSecurityGroup(NetworkSecurityGroupGetResponse networkSecurityGroupAsGetResponse) : + this( + networkSecurityGroupAsGetResponse.Name, + networkSecurityGroupAsGetResponse.Location, + networkSecurityGroupAsGetResponse.Label) + { + + } + + public string Name { get; set; } + public string Location { get; set; } + public string Label { get; set; } + + SimpleNetworkSecurityGroup INetworkSecurityGroup.GetInstance() + { + return this; + } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/NetworkSecurityRule/RemoveAzureNetworkSecurityRule.cs b/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/NetworkSecurityRule/RemoveAzureNetworkSecurityRule.cs new file mode 100644 index 000000000000..877da1b86bf8 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/NetworkSecurityRule/RemoveAzureNetworkSecurityRule.cs @@ -0,0 +1,46 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.Azure.Commands.Network.NetworkSecurityGroup.Model; +using Microsoft.Azure.Commands.Network.NetworkSecurityGroup.Utilities; +using Microsoft.Azure.Commands.Network.Properties; + +namespace Microsoft.Azure.Commands.Network.NetworkSecurityGroup +{ + [Cmdlet(VerbsCommon.Remove, "AzureNetworkSecurityRule"), OutputType(typeof(INetworkSecurityGroup))] + public class RemoveAzureNetworkSecurityRule : NetworkSecurityGroupConfigurationBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the Network Security Rule to remove.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Do not confirm Network Security Group deletion")] + public SwitchParameter Force { get; set; } + + public override void ExecuteCmdlet() + { + ConfirmAction( + Force.IsPresent, + string.Format(Resources.RemoveNetworkSecurityRuleWarning, Name, NetworkSecurityGroup.GetInstance().Name), + Resources.RemoveNetworkSecurityRuleWarning, + Name, + () => + { + Client.RemoveNetworkSecurityRule(NetworkSecurityGroup.GetInstance().Name, Name); + WriteObject(Client.GetNetworkSecurityGroup(NetworkSecurityGroup.GetInstance().Name, true)); + }); + } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/NetworkSecurityRule/SetAzureNetworkSecurityRule.cs b/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/NetworkSecurityRule/SetAzureNetworkSecurityRule.cs new file mode 100644 index 000000000000..be3d9ef0cdec --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/NetworkSecurityRule/SetAzureNetworkSecurityRule.cs @@ -0,0 +1,77 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.Azure.Commands.Network.NetworkSecurityGroup.Model; +using Microsoft.Azure.Commands.Network.NetworkSecurityGroup.Utilities; + +namespace Microsoft.Azure.Commands.Network.NetworkSecurityGroup +{ + [Cmdlet(VerbsCommon.Set, "AzureNetworkSecurityRule"), OutputType(typeof(INetworkSecurityGroup))] + public class SetAzureNetworkSecurityRule : NetworkSecurityGroupConfigurationBaseCmdlet + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = false, HelpMessage = "Name of the Network Security Rule to remove.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = false)] + [ValidateSet("Inbound", "Outbound", IgnoreCase = false)] + public string Type { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = false)] + [ValidateRange(100, 4096)] + public int Priority { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = false)] + [ValidateSet("Allow", "Deny", IgnoreCase = false)] + public string Action { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = false)] + [ValidateNotNullOrEmpty] + public string SourceAddressPrefix { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = false)] + [ValidateNotNullOrEmpty] + public string SourcePortRange { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = false)] + [ValidateNotNullOrEmpty] + public string DestinationAddressPrefix { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = false)] + [ValidateNotNullOrEmpty] + public string DestinationPortRange { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = false)] + [ValidateSet("TCP", "UDP", "*", IgnoreCase = false)] + public string Protocol { get; set; } + + public override void ExecuteCmdlet() + { + Client.SetNetworkSecurityRule( + NetworkSecurityGroup.GetInstance().Name, + Name, + Type, + Priority, + Action, + SourceAddressPrefix, + SourcePortRange, + DestinationAddressPrefix, + DestinationPortRange, + Protocol); + + WriteObject(Client.GetNetworkSecurityGroup(NetworkSecurityGroup.GetInstance().Name, true)); + } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/NewAzureNetworkSecurityGroup.cs b/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/NewAzureNetworkSecurityGroup.cs new file mode 100644 index 000000000000..3be63c51b524 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/NewAzureNetworkSecurityGroup.cs @@ -0,0 +1,42 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.Azure.Commands.Network.NetworkSecurityGroup.Model; + +namespace Microsoft.Azure.Commands.Network.NetworkSecurityGroup +{ + [Cmdlet(VerbsCommon.New, "AzureNetworkSecurityGroup"), OutputType(typeof(INetworkSecurityGroup))] + public class NewAzureNetworkSecurityGroup : NetworkCmdletBase + { + [Parameter(Position = 0, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Position = 1, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Location { get; set; } + + [Parameter(Position = 2, Mandatory = false)] + [ValidateNotNullOrEmpty] + public string Label { get; set; } + + public override void ExecuteCmdlet() + { + Client.CreateNetworkSecurityGroup(Name, Location, Label); + var networkSecurityGroup = Client.GetNetworkSecurityGroup(Name, false); + WriteObject(networkSecurityGroup); + } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/RemoveAzureNetworkSecurityGroup.cs b/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/RemoveAzureNetworkSecurityGroup.cs new file mode 100644 index 000000000000..c14c8b0d5f56 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/RemoveAzureNetworkSecurityGroup.cs @@ -0,0 +1,53 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.Azure.Commands.Network.NetworkSecurityGroup.Model; +using Microsoft.Azure.Commands.Network.Properties; + +namespace Microsoft.Azure.Commands.Network.NetworkSecurityGroup +{ + [Cmdlet(VerbsCommon.Remove, "AzureNetworkSecurityGroup"), OutputType(typeof(bool))] + public class RemoveAzureNetworkSecurityGroup : NetworkCmdletBase + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the Traffic Manager profile to remove.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Do not confirm Network Security Group deletion")] + public SwitchParameter Force { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + ConfirmAction( + Force.IsPresent, + string.Format(Resources.RemoveNetworkSecurityGroupWarning, Name), + Resources.RemoveNetworkSecurityGroupWarning, + Name, + () => + { + Client.RemoveNetworkSecurityGroup(Name); + + WriteVerboseWithTimestamp(Resources.RemoveNetworkSecurityGroupSucceeded, Name); + if (PassThru.IsPresent) + { + WriteObject(true); + } + }); + } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/Subnet/GetAzureNetworkSecurityGroupForSubnet.cs b/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/Subnet/GetAzureNetworkSecurityGroupForSubnet.cs new file mode 100644 index 000000000000..f5925d0dd423 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/Subnet/GetAzureNetworkSecurityGroupForSubnet.cs @@ -0,0 +1,52 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.Azure.Commands.Network.NetworkSecurityGroup.Model; +using Microsoft.Azure.Commands.Network.Properties; + +namespace Microsoft.Azure.Commands.Network.NetworkSecurityGroup.Subnet +{ + [Cmdlet(VerbsCommon.Get, "AzureNetworkSecurityGroupForSubnet"), OutputType(typeof(INetworkSecurityGroup))] + public class GetAzureNetworkSecurityGroupForSubnet : NetworkCmdletBase + { + + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = false)] + [ValidateNotNullOrEmpty] + public string VirtualNetworkName { get; set; } + + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = false)] + [ValidateNotNullOrEmpty] + public string SubnetName { get; set; } + + [Parameter(Mandatory = false)] + [ValidateNotNullOrEmpty] + public SwitchParameter Detailed { get; set; } + + public override void ExecuteCmdlet() + { + var getForSubnetResponse = Client.GetNetworkSecurityGroupForSubnet(VirtualNetworkName, SubnetName); + + if (getForSubnetResponse.State != "Created") + { + WriteWarningWithTimestamp( + string.Format(Resources.NetworkSecurityGroupNotActiveInSubnet, getForSubnetResponse.Name, VirtualNetworkName, SubnetName)); + + } + + INetworkSecurityGroup securityGroup = Client.GetNetworkSecurityGroup(getForSubnetResponse.Name, Detailed); + WriteObject(securityGroup); + } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/Subnet/RemoveAzureNetworkSecurityGroupFromSubnet.cs b/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/Subnet/RemoveAzureNetworkSecurityGroupFromSubnet.cs new file mode 100644 index 000000000000..8e7a87631a10 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/Subnet/RemoveAzureNetworkSecurityGroupFromSubnet.cs @@ -0,0 +1,61 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.Azure.Commands.Network.NetworkSecurityGroup.Model; +using Microsoft.Azure.Commands.Network.Properties; + +namespace Microsoft.Azure.Commands.Network.NetworkSecurityGroup.Subnet +{ + [Cmdlet(VerbsCommon.Remove, "AzureNetworkSecurityGroupFromSubnet"), OutputType(typeof(bool))] + public class RemoveAzureNetworkSecurityGroupFromSubnet : NetworkCmdletBase + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = false)] + [ValidateNotNullOrEmpty] + public string VirtualNetworkName { get; set; } + + [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = false)] + [ValidateNotNullOrEmpty] + public string SubnetName { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter Force { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + ConfirmAction( + Force.IsPresent, + string.Format(Resources.RemoveNetworkSecurityGroupFromSubnetWarning, Name, SubnetName, VirtualNetworkName), + Resources.RemoveNetworkSecurityGroupFromSubnetWarning, + Name, + () => + { + Client.RemoveNetworkSecurityGroupFromSubnet(Name, VirtualNetworkName, SubnetName); + + WriteVerboseWithTimestamp(Resources.RemoveNetworkSecurityGroupFromSubnetSucceeded, Name, VirtualNetworkName, SubnetName); + if (PassThru.IsPresent) + { + WriteObject(true); + } + }); + } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/Subnet/SetAzureNetworkSecurityGroupToSubnet.cs b/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/Subnet/SetAzureNetworkSecurityGroupToSubnet.cs new file mode 100644 index 000000000000..0c7080f379e6 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/Subnet/SetAzureNetworkSecurityGroupToSubnet.cs @@ -0,0 +1,78 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.Azure.Commands.Network.NetworkSecurityGroup.Model; +using Microsoft.Azure.Commands.Network.Properties; +using Microsoft.WindowsAzure; + +namespace Microsoft.Azure.Commands.Network.NetworkSecurityGroup.Subnet +{ + [Cmdlet(VerbsCommon.Set, "AzureNetworkSecurityGroupToSubnet"), OutputType(typeof(bool))] + public class SetAzureNetworkSecurityGroupToSubnet : NetworkCmdletBase + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = false)] + [ValidateNotNullOrEmpty] + public string VirtualNetworkName { get; set; } + + [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = false)] + [ValidateNotNullOrEmpty] + public string SubnetName { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter Force { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + try + { + Client.SetNetworkSecurityGroupForSubnet(Name, SubnetName, VirtualNetworkName); + if (PassThru.IsPresent) + { + WriteObject(true); + } + } + catch (CloudException ce) + { + if (ce.ErrorCode.Equals("BadRequest") && ce.ErrorMessage.Contains("already mapped to network")) + { + // there's already a NSG associated with this subnet, so confirm they want to replace it + ConfirmAction( + Force.IsPresent, + string.Format(Resources.ReplaceNetworkSecurityGroupInSubnetWarning, SubnetName, VirtualNetworkName, Name), + Resources.ReplaceNetworkSecurityGroupInSubnetWarning, + Name, + () => + { + Client.RemoveNetworkSecurityGroupFromSubnet(Name, SubnetName, VirtualNetworkName); + Client.SetNetworkSecurityGroupForSubnet(Name, SubnetName, VirtualNetworkName); + WriteVerboseWithTimestamp(Resources.ReplaceNetworkSecurityGroupInSubnetWarningSucceeded, Name, VirtualNetworkName, SubnetName); + if (PassThru.IsPresent) + { + WriteObject(true); + } + }); + } + } + } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/Utilities/NetworkSecurityGroupConfigurationBaseCmdlet.cs b/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/Utilities/NetworkSecurityGroupConfigurationBaseCmdlet.cs new file mode 100644 index 000000000000..9480eeb92f80 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/NetworkSecurityGroup/Utilities/NetworkSecurityGroupConfigurationBaseCmdlet.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.Azure.Commands.Network.NetworkSecurityGroup.Model; + +namespace Microsoft.Azure.Commands.Network.NetworkSecurityGroup.Utilities +{ + public class NetworkSecurityGroupConfigurationBaseCmdlet : NetworkCmdletBase + { + [Parameter( + Position = 0, + Mandatory = true, + ValueFromPipeline = true, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Network Security Group to update.")] + public INetworkSecurityGroup NetworkSecurityGroup { get; set; } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/Properties/AssemblyInfo.cs b/src/ServiceManagement/Network/Commands.Network/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..10c77703b1fc --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/Properties/AssemblyInfo.cs @@ -0,0 +1,41 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft Azure Powershell")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Microsoft Azure Powershell")] +[assembly: AssemblyCopyright("Copyright © Microsoft")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +[assembly: AssemblyVersion("0.8.5")] +[assembly: AssemblyFileVersion("0.8.5")] +[assembly: CLSCompliant(false)] + +#if SIGN +[assembly: InternalsVisibleTo("Microsoft.Azure.Commands.ManagedCache.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +#else +[assembly: InternalsVisibleTo("Microsoft.Azure.Commands.ManagedCache.Test")] +#endif diff --git a/src/ServiceManagement/Network/Commands.Network/Properties/Resources.Designer.cs b/src/ServiceManagement/Network/Commands.Network/Properties/Resources.Designer.cs new file mode 100644 index 000000000000..665d302a70cb --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/Properties/Resources.Designer.cs @@ -0,0 +1,315 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.Azure.Commands.Network.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Azure.Commands.Network.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Not able to find the cache service just now created. + /// + internal static string CacheServiceMissing { + get { + return ResourceManager.GetString("CacheServiceMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The cache service name either has been taken or invalid. + /// + internal static string CacheServiceNameUnavailable { + get { + return ResourceManager.GetString("CacheServiceNameUnavailable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The cache service '{0}' doesn't exist in current subscription. + /// + internal static string CacheServiceNotExisting { + get { + return ResourceManager.GetString("CacheServiceNotExisting", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cache Service '{0}' was not found. + /// + internal static string CacheServiceNotFound { + get { + return ResourceManager.GetString("CacheServiceNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The cache service '{0}' has been removed. + /// + internal static string CacheServiceRemoved { + get { + return ResourceManager.GetString("CacheServiceRemoved", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing cache service.... + /// + internal static string CacheServiceRemoveStarted { + get { + return ResourceManager.GetString("CacheServiceRemoveStarted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creating cache service.... + /// + internal static string CreatingCacheService { + get { + return ResourceManager.GetString("CreatingCacheService", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creating prerequisites.... + /// + internal static string CreatingPrerequisites { + get { + return ResourceManager.GetString("CreatingPrerequisites", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Intializing parameters.... + /// + internal static string InitializingCacheParameters { + get { + return ResourceManager.GetString("InitializingCacheParameters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid cache memory size. Please specify value between {0} and {1}{2}. + /// + internal static string InvalidCacheMemorySize { + get { + return ResourceManager.GetString("InvalidCacheMemorySize", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The cache service name must contain between 6 and 20 characters. It can contain only lowercase letters and numbers, and must start with a letter.. + /// + internal static string InvalidCacheServiceName { + get { + return ResourceManager.GetString("InvalidCacheServiceName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid Sku. Please specify one from 'Basic', 'Standard', or "Premium".. + /// + internal static string InvalidCacheSku { + get { + return ResourceManager.GetString("InvalidCacheSku", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Network SecurityGroup "{0}" is not active in Subnet "{1}" in Virtual Network "{2}".. + /// + internal static string NetworkSecurityGroupNotActiveInSubnet { + get { + return ResourceManager.GetString("NetworkSecurityGroupNotActiveInSubnet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to reduce the cache memory? Cache data will be lost.. + /// + internal static string PromptOnCacheMemoryReduce { + get { + return ResourceManager.GetString("PromptOnCacheMemoryReduce", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to reduce the cache offering? All cache data will be lost.. + /// + internal static string PromptOnCachePlanChange { + get { + return ResourceManager.GetString("PromptOnCachePlanChange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Successfully removed Network Security Group with name "{0}" from Subnet "{1}" in Virtual Network "{2}".. + /// + internal static string RemoveNetworkSecurityGroupFromSubnetSucceeded { + get { + return ResourceManager.GetString("RemoveNetworkSecurityGroupFromSubnetSucceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Network Security Group "{0}" from Subnet "{1}" in Virtual Network "{2}"?. + /// + internal static string RemoveNetworkSecurityGroupFromSubnetWarning { + get { + return ResourceManager.GetString("RemoveNetworkSecurityGroupFromSubnetWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Successfully removed Network Security Group with name "{0}".. + /// + internal static string RemoveNetworkSecurityGroupSucceeded { + get { + return ResourceManager.GetString("RemoveNetworkSecurityGroupSucceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Network Security Group "{0}"?. + /// + internal static string RemoveNetworkSecurityGroupWarning { + get { + return ResourceManager.GetString("RemoveNetworkSecurityGroupWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Network Security Rule "{0}" from Network Security Group "{1}"?. + /// + internal static string RemoveNetworkSecurityRuleWarning { + get { + return ResourceManager.GetString("RemoveNetworkSecurityRuleWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing cache service. + /// + internal static string RemoveServiceMessage { + get { + return ResourceManager.GetString("RemoveServiceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the cache service "{0}"?. + /// + internal static string RemoveServiceWarning { + get { + return ResourceManager.GetString("RemoveServiceWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is already a Network Security Group associated with Subnet "{0}" in Virtual Network "{1}". Are you sure you want to replace it with Network Security Group "{2}"?. + /// + internal static string ReplaceNetworkSecurityGroupInSubnetWarning { + get { + return ResourceManager.GetString("ReplaceNetworkSecurityGroupInSubnetWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Successfully set NetworkSecurityGroup "{0}" in Subnet "{1}" in Virtual Network "{1}". + /// + internal static string ReplaceNetworkSecurityGroupInSubnetWarningSucceeded { + get { + return ResourceManager.GetString("ReplaceNetworkSecurityGroupInSubnetWarningSucceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Time out to wait for cache service ready. + /// + internal static string TimeoutWaitForCacheServiceReady { + get { + return ResourceManager.GetString("TimeoutWaitForCacheServiceReady", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Updating cache service.... + /// + internal static string UpdatingCacheService { + get { + return ResourceManager.GetString("UpdatingCacheService", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Verify cache service name.... + /// + internal static string VerifyingCacheServiceName { + get { + return ResourceManager.GetString("VerifyingCacheServiceName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Waiting for cache service to be in ready state.... + /// + internal static string WaitForCacheServiceReady { + get { + return ResourceManager.GetString("WaitForCacheServiceReady", resourceCulture); + } + } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/Properties/Resources.resx b/src/ServiceManagement/Network/Commands.Network/Properties/Resources.resx new file mode 100644 index 000000000000..44b4f567a3d3 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/Properties/Resources.resx @@ -0,0 +1,204 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Not able to find the cache service just now created + + + The cache service name either has been taken or invalid + + + The cache service '{0}' doesn't exist in current subscription + + + Cache Service '{0}' was not found + + + The cache service '{0}' has been removed + + + Removing cache service... + + + Creating cache service... + + + Creating prerequisites... + + + Intializing parameters... + + + Invalid cache memory size. Please specify value between {0} and {1}{2} + + + The cache service name must contain between 6 and 20 characters. It can contain only lowercase letters and numbers, and must start with a letter. + + + Invalid Sku. Please specify one from 'Basic', 'Standard', or "Premium". + + + Time out to wait for cache service ready + + + Verify cache service name... + + + Waiting for cache service to be in ready state... + + + Removing cache service + + + Are you sure you want to remove the cache service "{0}"? + + + Updating cache service... + + + Are you sure you want to reduce the cache memory? Cache data will be lost. + + + Are you sure you want to reduce the cache offering? All cache data will be lost. + + + Successfully removed Network Security Group with name "{0}" from Subnet "{1}" in Virtual Network "{2}". + + + Are you sure you want to remove the Network Security Group "{0}" from Subnet "{1}" in Virtual Network "{2}"? + + + Successfully removed Network Security Group with name "{0}". + + + Are you sure you want to remove the Network Security Group "{0}"? + + + There is already a Network Security Group associated with Subnet "{0}" in Virtual Network "{1}". Are you sure you want to replace it with Network Security Group "{2}"? + + + Successfully set NetworkSecurityGroup "{0}" in Subnet "{1}" in Virtual Network "{1}" + + + Network SecurityGroup "{0}" is not active in Subnet "{1}" in Virtual Network "{2}". + + + Are you sure you want to remove the Network Security Rule "{0}" from Network Security Group "{1}"? + + \ No newline at end of file diff --git a/src/ServiceManagement/Network/Commands.Network/Routes/GetAzureRouteTable.cs b/src/ServiceManagement/Network/Commands.Network/Routes/GetAzureRouteTable.cs new file mode 100644 index 000000000000..b7e7c6554a05 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/Routes/GetAzureRouteTable.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Network.Routes +{ + using System.Collections.Generic; + using System.Management.Automation; + using WindowsAzure.Management.Network.Models; + + [Cmdlet(VerbsCommon.Get, "AzureRouteTable"), OutputType(typeof(IEnumerable))] + public class GetAzureRouteTable : NetworkCmdletBase + { + [Parameter(Position = 0, Mandatory = false, HelpMessage = "The new route table's name.")] + public string Name { get; set; } + + [Parameter(Position = 0, Mandatory = false, HelpMessage = "The level of detail that will be returned about the route table(s). Valid values are: \"Routes\" or \"Full\".")] + public string DetailLevel { get; set; } + + public override void ExecuteCmdlet() + { + IEnumerable routeTables; + if (string.IsNullOrEmpty(Name)) + { + routeTables = Client.ListRouteTables(); + } + else + { + RouteTable routeTable = Client.GetRouteTable(Name, DetailLevel); + routeTables = new List() { routeTable }; + } + WriteObject(routeTables); + } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/Routes/GetAzureSubnetRouteTable.cs b/src/ServiceManagement/Network/Commands.Network/Routes/GetAzureSubnetRouteTable.cs new file mode 100644 index 000000000000..dad5074e2ab7 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/Routes/GetAzureSubnetRouteTable.cs @@ -0,0 +1,34 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Network.Routes +{ + using System.Management.Automation; + using Model; + + [Cmdlet(VerbsCommon.Get, "AzureSubnetRouteTable"), OutputType(typeof(SubnetRouteTableContext))] + public class GetAzureSubnetRouteTable : NetworkCmdletBase + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "The name of the virtual network.")] + public string VNetName { get; set; } + + [Parameter(Position = 1, Mandatory = true, HelpMessage = "The name of the subnet that will have its route table removed.")] + public string SubnetName { get; set; } + + public override void ExecuteCmdlet() + { + WriteObject(Client.GetRouteTableForSubnet(VNetName, SubnetName)); + } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/Routes/Model/SubnetRouteTableContext.cs b/src/ServiceManagement/Network/Commands.Network/Routes/Model/SubnetRouteTableContext.cs new file mode 100644 index 000000000000..ff240fec9409 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/Routes/Model/SubnetRouteTableContext.cs @@ -0,0 +1,21 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Network.Routes.Model +{ + public class SubnetRouteTableContext + { + public string RouteTableName { get; set; } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/Routes/NewAzureRouteTable.cs b/src/ServiceManagement/Network/Commands.Network/Routes/NewAzureRouteTable.cs new file mode 100644 index 000000000000..572a248ea1cd --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/Routes/NewAzureRouteTable.cs @@ -0,0 +1,37 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Network.Gateway +{ + using System.Management.Automation; + using WindowsAzure.Commands.Utilities.Common; + + [Cmdlet(VerbsCommon.New, "AzureRouteTable"), OutputType(typeof(ManagementOperationContext))] + public class NewAzureRouteTable : NetworkCmdletBase + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "The new route table's name.")] + public string Name { get; set; } + + [Parameter(Position = 1, Mandatory = true, HelpMessage = "The new route table's label.")] + public string Label { get; set; } + + [Parameter(Position = 1, Mandatory = true, HelpMessage = "The new route table's location.")] + public string Location { get; set; } + + public override void ExecuteCmdlet() + { + WriteObject(Client.CreateRouteTable(Name, Label, Location)); + } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/Routes/RemoveAzureRoute.cs b/src/ServiceManagement/Network/Commands.Network/Routes/RemoveAzureRoute.cs new file mode 100644 index 000000000000..e6155f605181 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/Routes/RemoveAzureRoute.cs @@ -0,0 +1,34 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Network.Routes +{ + using System.Management.Automation; + using WindowsAzure.Commands.Utilities.Common; + + [Cmdlet(VerbsCommon.Remove, "AzureRoute"), OutputType(typeof(ManagementOperationContext))] + public class RemoveAzureRoute : NetworkCmdletBase + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "The existing route table's name.")] + public string RouteTableName { get; set; } + + [Parameter(Position = 1, Mandatory = true, HelpMessage = "The name of the route to remove.")] + public string RouteName { get; set; } + + public override void ExecuteCmdlet() + { + WriteObject(Client.DeleteRoute(RouteTableName, RouteName)); + } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/Routes/RemoveAzureRouteTable.cs b/src/ServiceManagement/Network/Commands.Network/Routes/RemoveAzureRouteTable.cs new file mode 100644 index 000000000000..866a0b8f8baf --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/Routes/RemoveAzureRouteTable.cs @@ -0,0 +1,31 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Network.Gateway +{ + using System.Management.Automation; + using WindowsAzure.Commands.Utilities.Common; + + [Cmdlet(VerbsCommon.Remove, "AzureRouteTable"), OutputType(typeof(ManagementOperationContext))] + public class RemoveAzureRouteTable : NetworkCmdletBase + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "The name of the route table to remove.")] + public string Name { get; set; } + + public override void ExecuteCmdlet() + { + WriteObject(Client.DeleteRouteTable(Name)); + } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/Routes/RemoveAzureSubnetRouteTable.cs b/src/ServiceManagement/Network/Commands.Network/Routes/RemoveAzureSubnetRouteTable.cs new file mode 100644 index 000000000000..b4466d0c218d --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/Routes/RemoveAzureSubnetRouteTable.cs @@ -0,0 +1,34 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Network.Gateway +{ + using System.Management.Automation; + using WindowsAzure.Commands.Utilities.Common; + + [Cmdlet(VerbsCommon.Remove, "AzureSubnetRouteTable"), OutputType(typeof(ManagementOperationContext))] + public class RemoveAzureSubnetRouteTable : NetworkCmdletBase + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "The name of the virtual network.")] + public string VNetName { get; set; } + + [Parameter(Position = 1, Mandatory = true, HelpMessage = "The name of the subnet that will have its route table removed.")] + public string SubnetName { get; set; } + + public override void ExecuteCmdlet() + { + WriteObject(Client.RemoveRouteTableFromSubnet(VNetName, SubnetName)); + } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/Routes/SetAzureRoute.cs b/src/ServiceManagement/Network/Commands.Network/Routes/SetAzureRoute.cs new file mode 100644 index 000000000000..09ae3145dae5 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/Routes/SetAzureRoute.cs @@ -0,0 +1,40 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Network.Gateway +{ + using System.Management.Automation; + using WindowsAzure.Commands.Utilities.Common; + + [Cmdlet(VerbsCommon.Set, "AzureRoute"), OutputType(typeof(ManagementOperationContext))] + public class SetAzureRoute : NetworkCmdletBase + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "The existing route table's name.")] + public string RouteTableName { get; set; } + + [Parameter(Position = 1, Mandatory = true, HelpMessage = "The new route's name.")] + public string RouteName { get; set; } + + [Parameter(Position = 2, Mandatory = true, HelpMessage = "The new route's address prefix (such as \"0.0.0.0/0\").")] + public string AddressPrefix { get; set; } + + [Parameter(Position = 3, Mandatory = true, HelpMessage = "The new route's next hop type. Valid values are \"VPNGateway\".")] + public string NextHopType { get; set; } + + public override void ExecuteCmdlet() + { + WriteObject(Client.SetRoute(RouteTableName, RouteName, AddressPrefix, NextHopType)); + } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/Routes/SetAzureSubnetRouteTable.cs b/src/ServiceManagement/Network/Commands.Network/Routes/SetAzureSubnetRouteTable.cs new file mode 100644 index 000000000000..bafe98915d37 --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/Routes/SetAzureSubnetRouteTable.cs @@ -0,0 +1,37 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.Network.Gateway +{ + using System.Management.Automation; + using WindowsAzure.Commands.Utilities.Common; + + [Cmdlet(VerbsCommon.Set, "AzureSubnetRouteTable"), OutputType(typeof(ManagementOperationContext))] + public class SetAzureSubnetRouteTable : NetworkCmdletBase + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = "The name of the virtual network.")] + public string VNetName { get; set; } + + [Parameter(Position = 1, Mandatory = true, HelpMessage = "The name of the subnet that the provided route table will be applied to.")] + public string SubnetName { get; set; } + + [Parameter(Position = 2, Mandatory = true, HelpMessage = "The name of the route table to set on the provided subnet.")] + public string RouteTableName { get; set; } + + public override void ExecuteCmdlet() + { + WriteObject(Client.AddRouteTableToSubnet(VNetName, SubnetName, RouteTableName)); + } + } +} diff --git a/src/ServiceManagement/Network/Commands.Network/packages.config b/src/ServiceManagement/Network/Commands.Network/packages.config new file mode 100644 index 000000000000..3bed37144e6b --- /dev/null +++ b/src/ServiceManagement/Network/Commands.Network/packages.config @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/Commands.RecoveryServices.Test.csproj b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/Commands.RecoveryServices.Test.csproj new file mode 100644 index 000000000000..3376f1cde7d3 --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/Commands.RecoveryServices.Test.csproj @@ -0,0 +1,170 @@ + + + + + + Debug + AnyCPU + {A415F75B-EB6A-49A6-934E-5BA71B83D6EB} + Library + Properties + Microsoft.Azure.Commands.RecoveryServices.Test + Microsoft.Azure.Commands.RecoveryServices.Test + v4.5 + 512 + + ..\..\..\ + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + + False + ..\..\..\packages\Hydra.HttpRecorder.1.0.5417.13285-prerelease\lib\net45\Microsoft.Azure.Utilities.HttpRecorder.dll + + + False + ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll + + + False + ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll + + + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + ..\..\..\packages\Microsoft.Azure.Management.RecoveryServices.0.1.0-preview\lib\net40\Microsoft.WindowsAzure.Management.SiteRecovery.dll + + + False + ..\..\..\packages\Hydra.SpecTestSupport.1.0.5417.13285-prerelease\lib\net45\Microsoft.WindowsAzure.Testing.dll + + + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + + + + + False + C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Management.Automation\v4.0_3.0.0.0__31bf3856ad364e35\System.Management.Automation.dll + + + + + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + True + + + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + True + + + + + + + + + + ..\..\..\packages\xunit.abstractions.2.0.0-beta4-build2738\lib\net35\xunit.abstractions.dll + + + ..\..\..\packages\xunit.assert.2.0.0-beta4-build2738\lib\portable-net45+win+wpa81+wp80+monoandroid+monotouch10\xunit.assert.dll + + + ..\..\..\packages\xunit.core.2.0.0-beta4-build2738\lib\portable-net45+win+wpa81+wp80+monotouch+monoandroid\xunit.core.dll + + + + + + + + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + {c1bda476-a5cc-4394-914d-48b0ec31a710} + Commands.ScenarioTests.Common + + + {98b10548-df97-4fb1-8d82-2a12945d4f21} + Commands.RecoveryServices + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + + + xcopy "$(SolutionDir)Package\$(ConfigurationName)\*.*" $(TargetDir) /Y /E + + + \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/Properties/AssemblyInfo.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..d3f6c50c9cce --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/Properties/AssemblyInfo.cs @@ -0,0 +1,50 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Commands.RecoveryServices.Test")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Commands.RecoveryServices.Test")] +[assembly: AssemblyCopyright("Copyright © 2014")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("26688a90-68b5-4aae-955a-0172672fa0d9")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/RecoveryServicesTests.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/RecoveryServicesTests.cs new file mode 100644 index 000000000000..44443cd896e1 --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/RecoveryServicesTests.cs @@ -0,0 +1,36 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Xunit; + +namespace Microsoft.Azure.Commands.RecoveryServices.Test.ScenarioTests +{ + public class RecoveryServicesTests : RecoveryServicesTestsBase + { + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void RecoveryServicesEnumerationTests() + { + this.RunPowerShellTest("Test-RecoveryServicesEnumerationTests -vaultSettingsFilePath \"" + vaultSettingsFilePath + "\""); + } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void RecoveryServicesProtectionTests() + { + this.RunPowerShellTest("Test-RecoveryServicesProtectionTests -vaultSettingsFilePath \"" + vaultSettingsFilePath + "\""); + } + } +} diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/RecoveryServicesTests.ps1 b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/RecoveryServicesTests.ps1 new file mode 100644 index 000000000000..2721086102b0 --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/RecoveryServicesTests.ps1 @@ -0,0 +1,102 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +########################## Recovery Services Tests ############################# + +<# +.SYNOPSIS +Recovery Services Enumeration Tests +#> +function Test-RecoveryServicesEnumerationTests +{ + param([string] $vaultSettingsFilePath) + + # Import Azure Site Recovery Vault Settings + Import-AzureSiteRecoveryVaultSettingsFile $vaultSettingsFilePath + + # Enumerate Servers + $servers = Get-AzureSiteRecoveryServer + Assert-True { $servers.Count -gt 0 } + Assert-NotNull($servers) + foreach($server in $servers) + { + Assert-NotNull($server.Name) + Assert-NotNull($server.ID) + } + + # Enumerate Protection Containers + $protectionContainers = Get-AzureSiteRecoveryProtectionContainer + Assert-True { $protectionContainers.Count -gt 0 } + Assert-NotNull($protectionContainers) + foreach($protectionContainer in $protectionContainers) + { + Assert-NotNull($protectionContainer.Name) + Assert-NotNull($protectionContainer.ID) + + # Enumerate Protection Entities under each configured Protection Containers + if ($protectionContainer.ConfigurationStatus -eq "Configured") + { + $protectionEntities = Get-AzureSiteRecoveryProtectionEntity -ProtectionContainer $protectionContainer + Assert-NotNull($protectionEntities) + foreach($protectionEntity in $protectionEntities) + { + Assert-NotNull($protectionEntity.Name) + Assert-NotNull($protectionEntity.ID) + } + } + } +} + +<# +.SYNOPSIS +Recovery Services Protection Tests +#> +function Test-RecoveryServicesProtectionTests +{ + param([string] $vaultSettingsFilePath) + + # Import Azure Site Recovery Vault Settings + Import-AzureSiteRecoveryVaultSettingsFile $vaultSettingsFilePath + + # Enable protection for an un protected Protection Entity and + # Disable protection for a protected Protection Entity + $protectionContainers = Get-AzureSiteRecoveryProtectionContainer + Assert-True { $protectionContainers.Count -gt 0 } + Assert-NotNull($protectionContainers) + foreach($protectionContainer in $protectionContainers) + { + Assert-NotNull($protectionContainer.Name) + Assert-NotNull($protectionContainer.ID) + + # Enumerate Protection Entities under each configured Protection Containers + if ($protectionContainer.ConfigurationStatus -eq "Configured") + { + $protectionEntities = Get-AzureSiteRecoveryProtectionEntity -ProtectionContainer $protectionContainer + Assert-NotNull($protectionEntities) + foreach($protectionEntity in $protectionEntities) + { + Assert-NotNull($protectionEntity.Name) + Assert-NotNull($protectionEntity.ID) + if ($protectionEntity.Protected) + { + Set-AzureSiteRecoveryProtectionEntity -ProtectionEntity $protectionEntity -Protection "Enable" -Force + } + else + { + Set-AzureSiteRecoveryProtectionEntity -ProtectionEntity $protectionEntity -Protection "Disable" -Force + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/RecoveryServicesTestsBase.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/RecoveryServicesTestsBase.cs new file mode 100644 index 000000000000..f18cf116a2ce --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/RecoveryServicesTestsBase.cs @@ -0,0 +1,148 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Net; +using System.Net.Security; +using System.Runtime.Serialization; +using System.Xml; +using Microsoft.Azure.Utilities.HttpRecorder; +using Microsoft.Azure.Portal.RecoveryServices.Models.Common; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.RecoveryServices; +using Microsoft.WindowsAzure.Management.SiteRecovery; +using Microsoft.WindowsAzure.Testing; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; + +namespace Microsoft.Azure.Commands.RecoveryServices.Test.ScenarioTests +{ + public abstract class RecoveryServicesTestsBase + { + private RDFETestEnvironmentFactory rdfeTestFactory; + private EnvironmentSetupHelper helper; + protected string vaultSettingsFilePath; + private ASRVaultCreds asrVaultCreds = null; + + public SiteRecoveryManagementClient SiteRecoveryMgmtClient { get; private set; } + public RecoveryServicesManagementClient RecoveryServicesMgmtClient { get; private set; } + + protected RecoveryServicesTestsBase() + { + if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("VAULT_SETTINGS_FILE_PATH"))) + { + Environment.SetEnvironmentVariable("VAULT_SETTINGS_FILE_PATH", "ScenarioTests\\vaultSettings.vaultcredentials"); + } + + this.vaultSettingsFilePath = Environment.GetEnvironmentVariable("VAULT_SETTINGS_FILE_PATH"); + if (string.IsNullOrEmpty(vaultSettingsFilePath)) + { + throw new Exception("Please set VAULT_SETTINGS_FILE_PATH environment variable before running the tests"); + } + + if (File.Exists(this.vaultSettingsFilePath)) + { + try + { + var serializer1 = new DataContractSerializer(typeof(ASRVaultCreds)); + using (var s = new FileStream( + this.vaultSettingsFilePath, + FileMode.Open, + FileAccess.Read, + FileShare.Read)) + { + asrVaultCreds = (ASRVaultCreds)serializer1.ReadObject(s); + } + } + catch (XmlException xmlException) + { + throw new XmlException( + "XML is malformed or file is empty", xmlException); + } + catch (SerializationException serializationException) + { + throw new SerializationException( + "XML is malformed or file is empty", serializationException); + } + } + else + { + throw new FileNotFoundException( + "Vault settings file not found, please pass the file downloaded from portal"); + } + + helper = new EnvironmentSetupHelper(); + } + + protected void SetupManagementClients() + { + RecoveryServicesMgmtClient = GetRecoveryServicesManagementClient(); + SiteRecoveryMgmtClient = GetSiteRecoveryManagementClient(); + + helper.SetupManagementClients(RecoveryServicesMgmtClient, SiteRecoveryMgmtClient); + } + + protected void RunPowerShellTest(params string[] scripts) + { + using (UndoContext context = UndoContext.Current) + { + context.Start(TestUtilities.GetCallingClass(2), TestUtilities.GetCurrentMethodName(2)); + + this.rdfeTestFactory = new RDFETestEnvironmentFactory(); + + SetupManagementClients(); + + helper.SetupEnvironment(AzureModule.AzureServiceManagement); + helper.SetupModules(AzureModule.AzureServiceManagement, + "ScenarioTests\\" + this.GetType().Name + ".ps1"); + + helper.RunPowerShellTest(scripts); + } + } + + private RecoveryServicesManagementClient GetRecoveryServicesManagementClient() + { + return TestBase.GetServiceClient(this.rdfeTestFactory); + } + + private SiteRecoveryManagementClient GetSiteRecoveryManagementClient() + { + TestEnvironment environment = this.rdfeTestFactory.GetTestEnvironment(); + + if (ServicePointManager.ServerCertificateValidationCallback == null) + { + ServicePointManager.ServerCertificateValidationCallback = + IgnoreCertificateErrorHandler; + } + + return new SiteRecoveryManagementClient( + asrVaultCreds.CloudServiceName, + asrVaultCreds.ResourceName, + (SubscriptionCloudCredentials)environment.Credentials, + AzureSession.CurrentContext.Environment.GetEndpointAsUri(AzureEnvironment.Endpoint.ServiceManagement)).WithHandler(HttpMockServer.CreateInstance()); + } + + private static bool IgnoreCertificateErrorHandler + (object sender, + System.Security.Cryptography.X509Certificates.X509Certificate certificate, + System.Security.Cryptography.X509Certificates.X509Chain chain, + SslPolicyErrors sslPolicyErrors) + { + return true; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/vaultSettings.vaultcredentials b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/vaultSettings.vaultcredentials new file mode 100644 index 000000000000..d552da213c75 --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/vaultSettings.vaultcredentials @@ -0,0 +1,15 @@ + + + 947a55d7-75e9-4a36-b156-305c6270f018 + HyperVRecoveryManagerVault + rijethma-vault + MIIKkgIBAzCCClIGCSqGSIb3DQEHAaCCCkMEggo/MIIKOzCCBgwGCSqGSIb3DQEHAaCCBf0EggX5MIIF9TCCBfEGCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAjivtKXFlcO0AICB9AEggTYSF0b5V0egu/RWRvOII70eUeOdQXWOoUmV51UHAsxewUZFhqXaaaRLiQTxKpaB4O6jzTYxb4fcgRMzxTD//J8ZchznLWEqc0N8mozihJbrOhPOTmG5bDtkf4K3ipcz+4OktVz5+HWcKJ69GchELKzhyoVlaDZNdjoBGkazThd3qNGhu4Om7sBVW08vf4TG/+vkvNBFGzte1BG1zjOQ5ZRJbaEbjt49dqKShYUoCEJaR/XRW8jfsnUCRpihuVCQuDF02RNpd0tk6koxbMs/qXmspWpKrGxDP3hFnPSXjpwhtPjwbUOgvMN1HBjIkerUoksY3lGtRG+DJ7ulVhszVzVzeC9VcRKOZkcDb9daVcVdr8tibR1yMLgZ/p+ixDOAkKuagpTovCnAk2Q0dFcccQIWKxbSH9Zme8yVOYHegLzvy33is9SXah84JPReQxYk/Lxhig7p3FbNaQB3kX+cRmT6CIl9UIlre986D8jz3eU9viwSRq99XJdDPnQf5hSrrSsyC5UM6ryK3DpTDYimGKXjRLlmiOn6ZRUJnSzNq4dvI8DfYWNKHueMydz6/geOLluSMbxMiyLTrnT6ArI38axIRdlo18MnEWeGRqUtHmKbni1I3KJrXrI3N+SnpBjAaO8FB0dtxl52fZi2D2SBY0J81BC2BkkpHs0nsAnwHMF9AZIx268I0Cj6ypiMyKoBaVPgennLEVzU13lJNZa+qxuCO1rQI0hxGR0pvx/DgGaHtThV3AqZWUafmeIAhs3a3U/6V/5FdX673iCT50jeYzP/2PLkTF1dU3SMCTqff0eVFxrp+izws/FK2mg2Wp+D46AkYBrBuV/7EudpWYldeQeMIIbX+oCMdZK3RSX1Ko9ghacUO/wgOzGXeAHlvTLiejclanUolxXedqxW9u6UOow+a9v8u3+lrVEQ0ti76nwMKhKR6HLU2RdxwgNh3/bdzAoV8vvcO6g4QdotTFj8LhIFIHc3vbpuXX53lQDsGqaK7EsOr40FTEvY+piV34dOFCLPrEOM1jgtsA1uY8CXWUVBb7WAwclOCe3dsM75+rtn0xH4sETz5n0dnKuInwIvmssZdLu6yq4BICaX2nauCg9Hb51vcN8XJ7I3WIeKc5B4PH6BywucSOjV7uW/FM01Mn1TumB5NPEyUY6yiZsgXjN4+QgVG2Zk2cBXk9Ug+TtrtK2Cu8Qtb7moi/4t+bL0MCWpwB2sLdxqCbvsAABOrS73w/q33ulsISluc2DEIFiTBLkjg2RAxEi7kbv3Az8FJrvojL+QO/JxbtT/dx1P3QP3C2kEV+KLQZzyLG1LFf5A/CvK3/TApghhrDc9qrjNtgT4n+sPV5HazDhtoXU0k6q6i/JNZ9GmNyE+c8g7ziGxcOqo6COObOp39Zdcd21LtTiZveqV46uiJmjp1tWlVK47muAaoYSvkNvhh6TtfCuGaDB/xExX3q0aXqHTWE1OVJk5b+Df9Wn1GSbHmxraEk2+ZNfke+SY3aUNHojbzB0QTMAOsjBfJEBX6aVQsmp3t2vjK+UfWhQC4vGmy9S1J+WTCyEIxCWeUE7Oo3mzwM56qRKzkR6pQXKg/wC3sUZU0277YtjR5R5t/XLy9QeHCWLU5/U7LXMWeMdyFCi/lRN/xbN2PfSJJbjkTGB3zATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsANQA1ADkAQwBEADcAMAA2AC0AOQBCADIAQwAtADQARABEADEALQA4ADMANAA0AC0AMgAzAEMAMQBBADgAQQA1ADUANABBADAAfTBrBgkrBgEEAYI3EQExXh5cAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMAZQBkACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcgAgAHYAMQAuADAwggQnBgkqhkiG9w0BBwagggQYMIIEFAIBADCCBA0GCSqGSIb3DQEHATAcBgoqhkiG9w0BDAEGMA4ECBzFvJHmVDhPAgIH0ICCA+Daoyui9rlgyxQooyvXdJBmkaJ+7vK3WquK6EilT+q/ppzXh9EQwLpZO0PG35QJG0ukQJi/tL3u3rq8TwFL8G0KNj0DzjukDymJgknXUbh8RxyWO8I5DRoCnJBVuj7E8/vxylEfC80HTUkrQrHf/GtfCAxzK5zk9I4yRrwCuVApGBJT9P6rRJDt1QBelUEhfPyCGV2qL0YfN4XtgnrA9Y8j9C7/pk0XJrxp1nZ7CLee/vj380+4DZLdqqylotHXu3XOBfdN0XoMQliq6ETF1NWz5uCL74ZskWIQ28iYheCrNPcUiG1eaALGUGX1WLVYeqk2ZK+bLRJkV3QeVu42XPfAmtvcGSBCz//6H0s3jGF00HRLey1oRExdG1rJ2NYTaBZlMejDeCNuNz1/k1PS4klEr7z5tUV2jAHIX8waT6YHvxph8Roa8Vv7+nXv+ZjiQPxse1L/Xr9Ph39CKHL5wSrDt8C6gcZsYXpt2RWY9maFHTMngPC7DzIe9UQNUStOySMIgx9ARJdXw6yM5iWiyBiNnxhJopnbnplKNhNuglKkZBM2/NbInGMld34p/7/5n7acMYsZPBDyeHqpXi5sFAgAgo9JRU3TD0oaKdGY+Y6ikJD958T1Htn++UDR7BoGqrwE2xeEvchlqUcMFoT89GnApNsWRKaatnh9RnWcZV57iQ5L8MDTZTMHTmxKSQs7BG+CUgTZX3qnZEFZ3gnTxJ5BKeo4KG8L8q3yqiFXifEaOMe0ENoEGn55CODvEPoBQbfY5tMI8jR1lNcVDjnepWycsXxQK0HP036Zsk80hlUICjEHqOxaSRq6Ox6TQPuAg+vWxhHuUC+XJ6Ip4mX0pW8bFW0yxe5CvJriGEh2pzdwvSMIbBii6NHC/hlpfpRNniRS4QW4LLW3E7sbIt1JtVWAMe16MTTWUh4tK/Fi5Eif7c+IPbK9hrqsk68qdUZkmeDdPYVnce8XqwzsFRmQslhycsn8oD0ouoMpCuIJ9LDAwlxpPDedgmAhULnOtI/8l+fu/AAsXhWxSDUi6fvhJGGngrHq3ocCYvi+gQ2WygLG0N1dmFsEwrpfHacFAUiN9L4j8fIjoLKy1786RmGlvnU1jNqrJe2zGXGOcd3TK7qx7T9WEintpFPStOtlIh4CrpEmeonrEWNwCxANulQaGpVIvjPERzKJVzfmLBu6MLF70N8GWczAk/tkrgtCQfal6q1bSbqJOiEBnZAhyI5yrmarkBFCNXouCsHsNlCp/w5eUI9c6bmXqU6P8bbmWx5VgSJwoH2l7ApgjrnAZcJ/UPQ0bGXVpycuB/BF2AmhlctZZjA3MB8wBwYFKw4DAhoEFLMany4kyUvsnfDJQYEv1hTJk6vPBBSE1OCCh1pspUroTmnWdX6KbYTo+w== + + accesscontrol.windows.net + seabvtd2rp1users + http://windowscloudbackup/m3 + + fcWypqGV1kzbl0Znfy4HcQ== + RecoveryServices-BKSIPEKSKUOD6BRA3PZOPIOUSEB6PBLUPHIK7Z3U7OVNBDOA257Q-west-us + 1.0 + \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/SessionRecords/Microsoft.Azure.Commands.RecoveryServices.Test.ScenarioTests.RecoveryServicesTests/RecoveryServicesEnumerationTests.json b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/SessionRecords/Microsoft.Azure.Commands.RecoveryServices.Test.ScenarioTests.RecoveryServicesTests/RecoveryServicesEnumerationTests.json new file mode 100644 index 000000000000..9d7b73ffad9e --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/SessionRecords/Microsoft.Azure.Commands.RecoveryServices.Test.ScenarioTests.RecoveryServicesTests/RecoveryServicesEnumerationTests.json @@ -0,0 +1,256 @@ +{ + "Entries": [ + { + "RequestUri": "/947a55d7-75e9-4a36-b156-305c6270f018/cloudservices?api-version=2014-10-27", + "EncodedRequestUri": "Lzk0N2E1NWQ3LTc1ZTktNGEzNi1iMTU2LTMwNWM2MjcwZjAxOC9jbG91ZHNlcnZpY2VzP2FwaS12ZXJzaW9uPTIwMTQtMTAtMjc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/xml" + ], + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.RecoveryServices.RecoveryServicesManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "\r\n \r\n cdsBKSIPEKSKUOD6BRA3PZOPIOUSEB6PBLUPHIK7Z3U7OVNBDOA257Q-North-Central-US\r\n \r\n cdsBKSIPEKSKUOD6BRA3PZOPIOUSEB6PBLUPHIK7Z3U7OVNBDOA257Q-North-Central-US in North Central US\r\n North Central US\r\n \r\n \r\n \r\n RecoveryServices-BKSIPEKSKUOD6BRA3PZOPIOUSEB6PBLUPHIK7Z3U7OVNBDOA257Q-west-us\r\n \r\n a510ea8f-1b1e-465b-927e-2caf10786579\r\n west us\r\n \r\n \r\n WAHyperVRecoveryManager\r\n HyperVRecoveryManagerVault\r\n rijethma-vault\r\n \r\n 1.1\r\n 25e8dd1c-44c6-49f1-aa50-aac068c55b96\r\n Started\r\n Ok\r\n \r\n \r\n StampId\r\n abeb635b-e186-4605-b464-c7c9e55b226a\r\n \r\n \r\n ResourceId\r\n 8856597376086032764\r\n \r\n \r\n BackendStampId\r\n 75d5c811-a801-4332-8f96-43640cad60e9\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n VS-aaddisable-Group\r\n \r\n VS-aaddisable-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-ac1-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-acc-Group\r\n \r\n VS-acc-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-acc1-Group\r\n \r\n VS-acc1-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-compact-Group\r\n \r\n Resource group based cloud service.\r\n East US\r\n \r\n \r\n visualstudio\r\n account\r\n compact\r\n None\r\n 1.0\r\n 24b0ccad-e127-4389-a56c-a3e5d510ee0c\r\n Started\r\n Succeeded\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 5\r\n \r\n \r\n Build\r\n Seats\r\n 60\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 15000\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n AdditionalMeterData\r\n PEFycmF5T2ZBcnJheU9mS2V5VmFsdWVQYWlyIHhtbG5zOmk9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxucz0iaHR0cDovL3NjaGVtYXMuZGF0YWNvbnRyYWN0Lm9yZy8yMDA0LzA3L01pY3Jvc29mdC5WaXN1YWxTdHVkaW8uU2VydmljZXMuQ29tbWVyY2UiPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkFkdmFuY2VkTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDA8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5Jc1BhaWRCaWxsaW5nRW5hYmxlZDwvS2V5PjxWYWx1ZT5UcnVlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PEFycmF5T2ZLZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk5hbWU8L0tleT48VmFsdWU+UHJvZmVzc2lvbmFsTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPlRydWU8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5TdGFuZGFyZExpY2Vuc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5NYXhpbXVtUXVhbnRpdHk8L0tleT48VmFsdWU+MTA1PC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+VHJ1ZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PC9BcnJheU9mS2V5VmFsdWVQYWlyPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkJ1aWxkPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TWF4aW11bVF1YW50aXR5PC9LZXk+PFZhbHVlPjUwMDAwPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+RmFsc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5Mb2FkVGVzdDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDAwMDAwMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPkZhbHNlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PC9BcnJheU9mQXJyYXlPZktleVZhbHVlUGFpcj4=\r\n \r\n \r\n AccountURL\r\n https://compact.billing-current.tfsallin.net/\r\n \r\n \r\n DisplayName\r\n compact\r\n \r\n \r\n IdentityDomain\r\n de86f3e7-1fe3-414c-812a-817ab249ad9b\r\n \r\n \r\n TfsRegion\r\n North Central US\r\n \r\n \r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-compat-Group\r\n \r\n VS-compat-Group in North Central US\r\n North Central US\r\n \r\n \r\n visualstudio\r\n account\r\n compat\r\n None\r\n 1.0\r\n 5c087e25-f539-43d6-bf9f-768797f6287c\r\n Started\r\n Succeeded\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 5\r\n \r\n \r\n Build\r\n Seats\r\n 60\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 15000\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n AdditionalMeterData\r\n PEFycmF5T2ZBcnJheU9mS2V5VmFsdWVQYWlyIHhtbG5zOmk9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxucz0iaHR0cDovL3NjaGVtYXMuZGF0YWNvbnRyYWN0Lm9yZy8yMDA0LzA3L01pY3Jvc29mdC5WaXN1YWxTdHVkaW8uU2VydmljZXMuQ29tbWVyY2UiPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkFkdmFuY2VkTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDA8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5Jc1BhaWRCaWxsaW5nRW5hYmxlZDwvS2V5PjxWYWx1ZT5UcnVlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PEFycmF5T2ZLZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk5hbWU8L0tleT48VmFsdWU+UHJvZmVzc2lvbmFsTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPlRydWU8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5TdGFuZGFyZExpY2Vuc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5NYXhpbXVtUXVhbnRpdHk8L0tleT48VmFsdWU+MTA1PC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+VHJ1ZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PC9BcnJheU9mS2V5VmFsdWVQYWlyPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkJ1aWxkPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TWF4aW11bVF1YW50aXR5PC9LZXk+PFZhbHVlPjUwMDAwPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+RmFsc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5Mb2FkVGVzdDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDAwMDAwMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPkZhbHNlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PC9BcnJheU9mQXJyYXlPZktleVZhbHVlUGFpcj4=\r\n \r\n \r\n AccountURL\r\n https://compat.billing-current.tfsallin.net/\r\n \r\n \r\n DisplayName\r\n compat\r\n \r\n \r\n IdentityDomain\r\n de86f3e7-1fe3-414c-812a-817ab249ad9b\r\n \r\n \r\n TfsRegion\r\n North Central US\r\n \r\n \r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-compat101-Group\r\n \r\n VS-compat101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-compat102-Group\r\n \r\n VS-compat102-Group in West US\r\n West US\r\n \r\n \r\n visualstudio\r\n account\r\n compat102\r\n None\r\n 1.0\r\n 4c907789-db73-4d38-8c81-1cdb093da81b\r\n Started\r\n Failed\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n Build\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-compat201-Group\r\n \r\n VS-compat201-Group in North Central US\r\n North Central US\r\n \r\n \r\n visualstudio\r\n account\r\n compat201\r\n None\r\n 1.0\r\n c35a685d-f549-4ca3-acd6-7c758b644e4f\r\n Started\r\n Failed\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n Build\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-compat301-Group\r\n \r\n VS-compat301-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-compt40-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n visualstudio\r\n account\r\n compt40\r\n None\r\n 1.0\r\n ba986567-5a53-4baf-9e9c-7b7ade784b5c\r\n Started\r\n Succeeded\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 5\r\n \r\n \r\n Build\r\n Seats\r\n 60\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 15000\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n AdditionalMeterData\r\n PEFycmF5T2ZBcnJheU9mS2V5VmFsdWVQYWlyIHhtbG5zOmk9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxucz0iaHR0cDovL3NjaGVtYXMuZGF0YWNvbnRyYWN0Lm9yZy8yMDA0LzA3L01pY3Jvc29mdC5WaXN1YWxTdHVkaW8uU2VydmljZXMuQ29tbWVyY2UiPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkFkdmFuY2VkTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDA8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5Jc1BhaWRCaWxsaW5nRW5hYmxlZDwvS2V5PjxWYWx1ZT5UcnVlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PEFycmF5T2ZLZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk5hbWU8L0tleT48VmFsdWU+UHJvZmVzc2lvbmFsTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPlRydWU8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5TdGFuZGFyZExpY2Vuc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5NYXhpbXVtUXVhbnRpdHk8L0tleT48VmFsdWU+MTA1PC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+VHJ1ZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PC9BcnJheU9mS2V5VmFsdWVQYWlyPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkJ1aWxkPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TWF4aW11bVF1YW50aXR5PC9LZXk+PFZhbHVlPjUwMDAwPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+RmFsc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5Mb2FkVGVzdDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDAwMDAwMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPkZhbHNlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PC9BcnJheU9mQXJyYXlPZktleVZhbHVlUGFpcj4=\r\n \r\n \r\n AccountURL\r\n https://compt40.billing-current.tfsallin.net/\r\n \r\n \r\n DisplayName\r\n compt40\r\n \r\n \r\n IdentityDomain\r\n Windows Live ID\r\n \r\n \r\n TfsRegion\r\n North Central US\r\n \r\n \r\n \r\n \r\n \r\n \r\n Update\r\n Failed\r\n \r\n 403\r\n <WrappedException xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" z:Id=\"i1\" xmlns:z=\"http://schemas.microsoft.com/2003/10/Serialization/\" xmlns=\"http://schemas.datacontract.org/2004/07/Microsoft.VisualStudio.Services.WebApi\"><ErrorCode>0</ErrorCode><EventId>3000</EventId><InnerException i:nil=\"true\" /><Message>User \"admin@aad140.ccsctp.net\" is not the account owner of \"\".</Message><TypeKey>UserIsNotAccountOwnerException</TypeKey><TypeName>Microsoft.VisualStudio.Services.Commerce.UserIsNotAccountOwnerException, Microsoft.VisualStudio.Services.Commerce, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</TypeName></WrappedException>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-createacc002-Group\r\n \r\n VS-createacc002-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-createTFS1-Group\r\n \r\n VS-createTFS1-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-createtfs2-Group\r\n \r\n VS-createtfs2-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-dbupgradetfs202-Group\r\n \r\n VS-dbupgradetfs202-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-dtestacc1-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-finalenable-Group\r\n \r\n VS-finalenable-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-finaltfacc01-Group\r\n \r\n VS-finaltfacc01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-finalupdate-Group\r\n \r\n VS-finalupdate-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-finalupdate401-Group\r\n \r\n VS-finalupdate401-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-finalUpdate401Changed-Group\r\n \r\n VS-finalUpdate401Changed-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-finalupdatetfs402-Group\r\n \r\n VS-finalupdatetfs402-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-fresh-Group\r\n \r\n VS-fresh-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-freshsoftdelete-Group\r\n \r\n VS-freshsoftdelete-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-gfsfg-Group\r\n \r\n VS-gfsfg-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-ghhd-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n visualstudio\r\n account\r\n ghhd\r\n None\r\n 1.0\r\n d4a68495-4de3-46ba-9084-a7fa951ac29e\r\n Started\r\n Succeeded\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 5\r\n \r\n \r\n Build\r\n Seats\r\n 60\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 15000\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n AdditionalMeterData\r\n PEFycmF5T2ZBcnJheU9mS2V5VmFsdWVQYWlyIHhtbG5zOmk9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxucz0iaHR0cDovL3NjaGVtYXMuZGF0YWNvbnRyYWN0Lm9yZy8yMDA0LzA3L01pY3Jvc29mdC5WaXN1YWxTdHVkaW8uU2VydmljZXMuQ29tbWVyY2UiPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkFkdmFuY2VkTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDA8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5Jc1BhaWRCaWxsaW5nRW5hYmxlZDwvS2V5PjxWYWx1ZT5UcnVlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PEFycmF5T2ZLZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk5hbWU8L0tleT48VmFsdWU+UHJvZmVzc2lvbmFsTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPlRydWU8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5TdGFuZGFyZExpY2Vuc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5NYXhpbXVtUXVhbnRpdHk8L0tleT48VmFsdWU+MTA1PC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+VHJ1ZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PC9BcnJheU9mS2V5VmFsdWVQYWlyPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkJ1aWxkPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TWF4aW11bVF1YW50aXR5PC9LZXk+PFZhbHVlPjUwMDAwPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+RmFsc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5Mb2FkVGVzdDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDAwMDAwMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPkZhbHNlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PC9BcnJheU9mQXJyYXlPZktleVZhbHVlUGFpcj4=\r\n \r\n \r\n AccountURL\r\n https://ghhd.billing-current.tfsallin.net/\r\n \r\n \r\n DisplayName\r\n ghhd\r\n \r\n \r\n IdentityDomain\r\n de86f3e7-1fe3-414c-812a-817ab249ad9b\r\n \r\n \r\n TfsRegion\r\n North Central US\r\n \r\n \r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-ghjfdjdf-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-glkdhghjgk-Group\r\n \r\n VS-glkdhghjgk-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-hh-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ia1-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ia2-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ibizaa1-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ibizaa2-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ibizaacc01-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ibizacc01-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ijkljkl-Group\r\n \r\n VS-ijkljkl-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-klgfuiadlfu-Group\r\n \r\n VS-klgfuiadlfu-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-newsignout-Group\r\n \r\n VS-newsignout-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-quickcheck-Group\r\n \r\n VS-quickcheck-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-qwerty-Group\r\n \r\n VS-qwerty-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-r717auxacc2-Group\r\n \r\n VS-r717auxacc2-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-rdfrrrrrrrrrrrrr-Group\r\n \r\n VS-rdfrrrrrrrrrrrrr-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-RGless-Group\r\n \r\n VS-RGless-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity-Group\r\n \r\n VS-sanity-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity101-Group\r\n \r\n VS-sanity101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity102-Group\r\n \r\n VS-sanity102-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity103-Group\r\n \r\n VS-sanity103-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity103ibiza-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity104-Group\r\n \r\n VS-sanity104-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity201-Group\r\n \r\n VS-sanity201-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity202-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity301-Group\r\n \r\n VS-sanity301-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity40-Group\r\n \r\n VS-sanity40-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity401-Group\r\n \r\n VS-sanity401-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity402-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity403-Group\r\n \r\n VS-sanity403-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity601-Group\r\n \r\n VS-sanity601-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity603-Group\r\n \r\n VS-sanity603-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity604-Group\r\n \r\n VS-sanity604-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity605-Group\r\n \r\n VS-sanity605-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity701-Group\r\n \r\n VS-sanity701-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity702-Group\r\n \r\n VS-sanity702-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity706-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-sanityclean101-Group\r\n \r\n VS-sanityclean101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanityclean101r-Group\r\n \r\n VS-sanityclean101r-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanityclean102-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-sanityclean103-Group\r\n \r\n VS-sanityclean103-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanityr-Group\r\n \r\n VS-sanityr-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdelete-Group\r\n \r\n VS-softdelete-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdelete401-Group\r\n \r\n VS-softdelete401-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdelete402-Group\r\n \r\n VS-softdelete402-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdelete403-Group\r\n \r\n VS-softdelete403-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdelete405-Group\r\n \r\n VS-softdelete405-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdelete405changed-Group\r\n \r\n VS-softdelete405changed-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdeleteacc01-Group\r\n \r\n VS-softdeleteacc01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-spsdbupgrade201-Group\r\n \r\n VS-spsdbupgrade201-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-spsupgrade101-Group\r\n \r\n VS-spsupgrade101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-spsupgradenone-Group\r\n \r\n VS-spsupgradenone-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-spsupgradetesting101-Group\r\n \r\n VS-spsupgradetesting101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-spsupgradetfs102-Group\r\n \r\n VS-spsupgradetfs102-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-test123-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-testacc6191-Group\r\n \r\n VS-testacc6191-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testaccaux01-Group\r\n \r\n VS-testaccaux01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testaccaux02-Group\r\n \r\n VS-testaccaux02-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testaccc-Group\r\n \r\n VS-testaccc-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testaccibiza01-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-testing-Group\r\n \r\n VS-testing-Group in North Central US\r\n North Central US\r\n \r\n \r\n visualstudio\r\n account\r\n testing\r\n None\r\n 1.0\r\n 477546e4-2b3f-4a9e-ba9d-1c818a58fa3c\r\n Started\r\n Succeeded\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 5\r\n \r\n \r\n Build\r\n Seats\r\n 60\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 15000\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n AdditionalMeterData\r\n PEFycmF5T2ZBcnJheU9mS2V5VmFsdWVQYWlyIHhtbG5zOmk9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxucz0iaHR0cDovL3NjaGVtYXMuZGF0YWNvbnRyYWN0Lm9yZy8yMDA0LzA3L01pY3Jvc29mdC5WaXN1YWxTdHVkaW8uU2VydmljZXMuQ29tbWVyY2UiPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkFkdmFuY2VkTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDA8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5Jc1BhaWRCaWxsaW5nRW5hYmxlZDwvS2V5PjxWYWx1ZT5UcnVlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PEFycmF5T2ZLZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk5hbWU8L0tleT48VmFsdWU+UHJvZmVzc2lvbmFsTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPlRydWU8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5TdGFuZGFyZExpY2Vuc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5NYXhpbXVtUXVhbnRpdHk8L0tleT48VmFsdWU+MTA1PC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+VHJ1ZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PC9BcnJheU9mS2V5VmFsdWVQYWlyPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkJ1aWxkPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TWF4aW11bVF1YW50aXR5PC9LZXk+PFZhbHVlPjUwMDAwPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+RmFsc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5Mb2FkVGVzdDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDAwMDAwMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPkZhbHNlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PC9BcnJheU9mQXJyYXlPZktleVZhbHVlUGFpcj4=\r\n \r\n \r\n AccountURL\r\n https://testing.billing-current.tfsallin.net/\r\n \r\n \r\n DisplayName\r\n testing\r\n \r\n \r\n IdentityDomain\r\n de86f3e7-1fe3-414c-812a-817ab249ad9b\r\n \r\n \r\n TfsRegion\r\n North Central US\r\n \r\n \r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-testing01-Group\r\n \r\n VS-testing01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing102-Group\r\n \r\n VS-testing102-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing3-Group\r\n \r\n VS-testing3-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing401-Group\r\n \r\n VS-testing401-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing402-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-testing701-Group\r\n \r\n VS-testing701-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing702-Group\r\n \r\n VS-testing702-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing704-Group\r\n \r\n VS-testing704-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing705-Group\r\n \r\n VS-testing705-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing901-Group\r\n \r\n VS-testing901-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing902-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-testing905-Group\r\n \r\n VS-testing905-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingaadbacked901-Group\r\n \r\n VS-testingaadbacked901-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingaux-Group\r\n \r\n VS-testingaux-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingaux101-Group\r\n \r\n VS-testingaux101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingaux102-Group\r\n \r\n VS-testingaux102-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingmbsabacked-Group\r\n \r\n VS-testingmbsabacked-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingss-Group\r\n \r\n VS-testingss-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingtfs101-Group\r\n \r\n VS-testingtfs101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingtfs2-Group\r\n \r\n VS-testingtfs2-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testting-Group\r\n \r\n VS-testting-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testtingtfs-Group\r\n \r\n VS-testtingtfs-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-TFS918-Group\r\n \r\n VS-TFS918-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-TFS918WEU-Group\r\n \r\n VS-TFS918WEU-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tfsacc301-Group\r\n \r\n VS-tfsacc301-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tfsaccount-Group\r\n \r\n VS-tfsaccount-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tfsaccount01-Group\r\n \r\n VS-tfsaccount01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tfsconp101-Group\r\n \r\n VS-tfsconp101-Group in North Central US\r\n North Central US\r\n \r\n \r\n visualstudio\r\n account\r\n tfsconp101\r\n None\r\n 1.0\r\n 3bd7ff2f-c8b1-4e7a-b07c-fedf55bd03eb\r\n Started\r\n Succeeded\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 5\r\n \r\n \r\n Build\r\n Seats\r\n 60\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 15000\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n AdditionalMeterData\r\n PEFycmF5T2ZBcnJheU9mS2V5VmFsdWVQYWlyIHhtbG5zOmk9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxucz0iaHR0cDovL3NjaGVtYXMuZGF0YWNvbnRyYWN0Lm9yZy8yMDA0LzA3L01pY3Jvc29mdC5WaXN1YWxTdHVkaW8uU2VydmljZXMuQ29tbWVyY2UiPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkFkdmFuY2VkTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDA8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5Jc1BhaWRCaWxsaW5nRW5hYmxlZDwvS2V5PjxWYWx1ZT5UcnVlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PEFycmF5T2ZLZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk5hbWU8L0tleT48VmFsdWU+UHJvZmVzc2lvbmFsTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPlRydWU8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5TdGFuZGFyZExpY2Vuc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5NYXhpbXVtUXVhbnRpdHk8L0tleT48VmFsdWU+MTA1PC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+VHJ1ZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PC9BcnJheU9mS2V5VmFsdWVQYWlyPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkJ1aWxkPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TWF4aW11bVF1YW50aXR5PC9LZXk+PFZhbHVlPjUwMDAwPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+RmFsc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5Mb2FkVGVzdDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDAwMDAwMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPkZhbHNlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PC9BcnJheU9mQXJyYXlPZktleVZhbHVlUGFpcj4=\r\n \r\n \r\n AccountURL\r\n https://tfsconp101.billing-current.tfsallin.net/\r\n \r\n \r\n DisplayName\r\n tfsconp101\r\n \r\n \r\n IdentityDomain\r\n de86f3e7-1fe3-414c-812a-817ab249ad9b\r\n \r\n \r\n TfsRegion\r\n North Central US\r\n \r\n \r\n \r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-TFSNCUS918-Group\r\n \r\n VS-TFSNCUS918-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tfsupdate301-Group\r\n \r\n VS-tfsupdate301-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tfsupdatetfsacc302-Group\r\n \r\n VS-tfsupdatetfsacc302-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-today-Group\r\n \r\n VS-today-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-todaysaux01-Group\r\n \r\n VS-todaysaux01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-todaysauxtest101-Group\r\n \r\n VS-todaysauxtest101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-todaysibiza01-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-trialacc-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-trialaccount-Group\r\n \r\n VS-trialaccount-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-trialaccount102-Group\r\n \r\n VS-trialaccount102-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-trrykweoykweoykweo-Group\r\n \r\n VS-trrykweoykweoykweo-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tuejulyauxacc01-Group\r\n \r\n VS-tuejulyauxacc01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tuejulyibiza01acc-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-westeuropeacc-Group\r\n \r\n VS-westeuropeacc-Group in North Central US\r\n North Central US\r\n \r\n \r\n", + "ResponseHeaders": { + "Content-Length": [ + "54717" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-request-id": [ + "186f75351be9863b8911c0175fb4828b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 10 Oct 2014 06:15:14 GMT" + ], + "Server": [ + "1.0.6198.130", + "(rd_rdfe_stable.140925-2236)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/947a55d7-75e9-4a36-b156-305c6270f018/cloudservices?api-version=2014-10-27", + "EncodedRequestUri": "Lzk0N2E1NWQ3LTc1ZTktNGEzNi1iMTU2LTMwNWM2MjcwZjAxOC9jbG91ZHNlcnZpY2VzP2FwaS12ZXJzaW9uPTIwMTQtMTAtMjc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/xml" + ], + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.RecoveryServices.RecoveryServicesManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "\r\n \r\n cdsBKSIPEKSKUOD6BRA3PZOPIOUSEB6PBLUPHIK7Z3U7OVNBDOA257Q-North-Central-US\r\n \r\n cdsBKSIPEKSKUOD6BRA3PZOPIOUSEB6PBLUPHIK7Z3U7OVNBDOA257Q-North-Central-US in North Central US\r\n North Central US\r\n \r\n \r\n \r\n RecoveryServices-BKSIPEKSKUOD6BRA3PZOPIOUSEB6PBLUPHIK7Z3U7OVNBDOA257Q-west-us\r\n \r\n a510ea8f-1b1e-465b-927e-2caf10786579\r\n west us\r\n \r\n \r\n WAHyperVRecoveryManager\r\n HyperVRecoveryManagerVault\r\n rijethma-vault\r\n \r\n 1.1\r\n 25e8dd1c-44c6-49f1-aa50-aac068c55b96\r\n Started\r\n Ok\r\n \r\n \r\n StampId\r\n abeb635b-e186-4605-b464-c7c9e55b226a\r\n \r\n \r\n ResourceId\r\n 8856597376086032764\r\n \r\n \r\n BackendStampId\r\n 75d5c811-a801-4332-8f96-43640cad60e9\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n VS-aaddisable-Group\r\n \r\n VS-aaddisable-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-ac1-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-acc-Group\r\n \r\n VS-acc-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-acc1-Group\r\n \r\n VS-acc1-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-compact-Group\r\n \r\n Resource group based cloud service.\r\n East US\r\n \r\n \r\n visualstudio\r\n account\r\n compact\r\n None\r\n 1.0\r\n 24b0ccad-e127-4389-a56c-a3e5d510ee0c\r\n Started\r\n Succeeded\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 5\r\n \r\n \r\n Build\r\n Seats\r\n 60\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 15000\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n AdditionalMeterData\r\n PEFycmF5T2ZBcnJheU9mS2V5VmFsdWVQYWlyIHhtbG5zOmk9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxucz0iaHR0cDovL3NjaGVtYXMuZGF0YWNvbnRyYWN0Lm9yZy8yMDA0LzA3L01pY3Jvc29mdC5WaXN1YWxTdHVkaW8uU2VydmljZXMuQ29tbWVyY2UiPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkFkdmFuY2VkTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDA8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5Jc1BhaWRCaWxsaW5nRW5hYmxlZDwvS2V5PjxWYWx1ZT5UcnVlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PEFycmF5T2ZLZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk5hbWU8L0tleT48VmFsdWU+UHJvZmVzc2lvbmFsTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPlRydWU8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5TdGFuZGFyZExpY2Vuc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5NYXhpbXVtUXVhbnRpdHk8L0tleT48VmFsdWU+MTA1PC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+VHJ1ZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PC9BcnJheU9mS2V5VmFsdWVQYWlyPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkJ1aWxkPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TWF4aW11bVF1YW50aXR5PC9LZXk+PFZhbHVlPjUwMDAwPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+RmFsc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5Mb2FkVGVzdDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDAwMDAwMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPkZhbHNlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PC9BcnJheU9mQXJyYXlPZktleVZhbHVlUGFpcj4=\r\n \r\n \r\n AccountURL\r\n https://compact.billing-current.tfsallin.net/\r\n \r\n \r\n DisplayName\r\n compact\r\n \r\n \r\n IdentityDomain\r\n de86f3e7-1fe3-414c-812a-817ab249ad9b\r\n \r\n \r\n TfsRegion\r\n North Central US\r\n \r\n \r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-compat-Group\r\n \r\n VS-compat-Group in North Central US\r\n North Central US\r\n \r\n \r\n visualstudio\r\n account\r\n compat\r\n None\r\n 1.0\r\n 5c087e25-f539-43d6-bf9f-768797f6287c\r\n Started\r\n Succeeded\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 5\r\n \r\n \r\n Build\r\n Seats\r\n 60\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 15000\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n AdditionalMeterData\r\n PEFycmF5T2ZBcnJheU9mS2V5VmFsdWVQYWlyIHhtbG5zOmk9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxucz0iaHR0cDovL3NjaGVtYXMuZGF0YWNvbnRyYWN0Lm9yZy8yMDA0LzA3L01pY3Jvc29mdC5WaXN1YWxTdHVkaW8uU2VydmljZXMuQ29tbWVyY2UiPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkFkdmFuY2VkTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDA8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5Jc1BhaWRCaWxsaW5nRW5hYmxlZDwvS2V5PjxWYWx1ZT5UcnVlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PEFycmF5T2ZLZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk5hbWU8L0tleT48VmFsdWU+UHJvZmVzc2lvbmFsTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPlRydWU8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5TdGFuZGFyZExpY2Vuc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5NYXhpbXVtUXVhbnRpdHk8L0tleT48VmFsdWU+MTA1PC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+VHJ1ZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PC9BcnJheU9mS2V5VmFsdWVQYWlyPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkJ1aWxkPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TWF4aW11bVF1YW50aXR5PC9LZXk+PFZhbHVlPjUwMDAwPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+RmFsc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5Mb2FkVGVzdDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDAwMDAwMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPkZhbHNlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PC9BcnJheU9mQXJyYXlPZktleVZhbHVlUGFpcj4=\r\n \r\n \r\n AccountURL\r\n https://compat.billing-current.tfsallin.net/\r\n \r\n \r\n DisplayName\r\n compat\r\n \r\n \r\n IdentityDomain\r\n de86f3e7-1fe3-414c-812a-817ab249ad9b\r\n \r\n \r\n TfsRegion\r\n North Central US\r\n \r\n \r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-compat101-Group\r\n \r\n VS-compat101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-compat102-Group\r\n \r\n VS-compat102-Group in West US\r\n West US\r\n \r\n \r\n visualstudio\r\n account\r\n compat102\r\n None\r\n 1.0\r\n 4c907789-db73-4d38-8c81-1cdb093da81b\r\n Started\r\n Failed\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n Build\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-compat201-Group\r\n \r\n VS-compat201-Group in North Central US\r\n North Central US\r\n \r\n \r\n visualstudio\r\n account\r\n compat201\r\n None\r\n 1.0\r\n c35a685d-f549-4ca3-acd6-7c758b644e4f\r\n Started\r\n Failed\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n Build\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-compat301-Group\r\n \r\n VS-compat301-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-compt40-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n visualstudio\r\n account\r\n compt40\r\n None\r\n 1.0\r\n ba986567-5a53-4baf-9e9c-7b7ade784b5c\r\n Started\r\n Succeeded\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 5\r\n \r\n \r\n Build\r\n Seats\r\n 60\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 15000\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n AdditionalMeterData\r\n PEFycmF5T2ZBcnJheU9mS2V5VmFsdWVQYWlyIHhtbG5zOmk9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxucz0iaHR0cDovL3NjaGVtYXMuZGF0YWNvbnRyYWN0Lm9yZy8yMDA0LzA3L01pY3Jvc29mdC5WaXN1YWxTdHVkaW8uU2VydmljZXMuQ29tbWVyY2UiPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkFkdmFuY2VkTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDA8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5Jc1BhaWRCaWxsaW5nRW5hYmxlZDwvS2V5PjxWYWx1ZT5UcnVlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PEFycmF5T2ZLZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk5hbWU8L0tleT48VmFsdWU+UHJvZmVzc2lvbmFsTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPlRydWU8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5TdGFuZGFyZExpY2Vuc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5NYXhpbXVtUXVhbnRpdHk8L0tleT48VmFsdWU+MTA1PC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+VHJ1ZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PC9BcnJheU9mS2V5VmFsdWVQYWlyPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkJ1aWxkPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TWF4aW11bVF1YW50aXR5PC9LZXk+PFZhbHVlPjUwMDAwPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+RmFsc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5Mb2FkVGVzdDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDAwMDAwMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPkZhbHNlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PC9BcnJheU9mQXJyYXlPZktleVZhbHVlUGFpcj4=\r\n \r\n \r\n AccountURL\r\n https://compt40.billing-current.tfsallin.net/\r\n \r\n \r\n DisplayName\r\n compt40\r\n \r\n \r\n IdentityDomain\r\n Windows Live ID\r\n \r\n \r\n TfsRegion\r\n North Central US\r\n \r\n \r\n \r\n \r\n \r\n \r\n Update\r\n Failed\r\n \r\n 403\r\n <WrappedException xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" z:Id=\"i1\" xmlns:z=\"http://schemas.microsoft.com/2003/10/Serialization/\" xmlns=\"http://schemas.datacontract.org/2004/07/Microsoft.VisualStudio.Services.WebApi\"><ErrorCode>0</ErrorCode><EventId>3000</EventId><InnerException i:nil=\"true\" /><Message>User \"admin@aad140.ccsctp.net\" is not the account owner of \"\".</Message><TypeKey>UserIsNotAccountOwnerException</TypeKey><TypeName>Microsoft.VisualStudio.Services.Commerce.UserIsNotAccountOwnerException, Microsoft.VisualStudio.Services.Commerce, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</TypeName></WrappedException>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-createacc002-Group\r\n \r\n VS-createacc002-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-createTFS1-Group\r\n \r\n VS-createTFS1-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-createtfs2-Group\r\n \r\n VS-createtfs2-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-dbupgradetfs202-Group\r\n \r\n VS-dbupgradetfs202-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-dtestacc1-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-finalenable-Group\r\n \r\n VS-finalenable-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-finaltfacc01-Group\r\n \r\n VS-finaltfacc01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-finalupdate-Group\r\n \r\n VS-finalupdate-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-finalupdate401-Group\r\n \r\n VS-finalupdate401-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-finalUpdate401Changed-Group\r\n \r\n VS-finalUpdate401Changed-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-finalupdatetfs402-Group\r\n \r\n VS-finalupdatetfs402-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-fresh-Group\r\n \r\n VS-fresh-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-freshsoftdelete-Group\r\n \r\n VS-freshsoftdelete-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-gfsfg-Group\r\n \r\n VS-gfsfg-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-ghhd-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n visualstudio\r\n account\r\n ghhd\r\n None\r\n 1.0\r\n d4a68495-4de3-46ba-9084-a7fa951ac29e\r\n Started\r\n Succeeded\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 5\r\n \r\n \r\n Build\r\n Seats\r\n 60\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 15000\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n AdditionalMeterData\r\n PEFycmF5T2ZBcnJheU9mS2V5VmFsdWVQYWlyIHhtbG5zOmk9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxucz0iaHR0cDovL3NjaGVtYXMuZGF0YWNvbnRyYWN0Lm9yZy8yMDA0LzA3L01pY3Jvc29mdC5WaXN1YWxTdHVkaW8uU2VydmljZXMuQ29tbWVyY2UiPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkFkdmFuY2VkTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDA8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5Jc1BhaWRCaWxsaW5nRW5hYmxlZDwvS2V5PjxWYWx1ZT5UcnVlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PEFycmF5T2ZLZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk5hbWU8L0tleT48VmFsdWU+UHJvZmVzc2lvbmFsTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPlRydWU8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5TdGFuZGFyZExpY2Vuc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5NYXhpbXVtUXVhbnRpdHk8L0tleT48VmFsdWU+MTA1PC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+VHJ1ZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PC9BcnJheU9mS2V5VmFsdWVQYWlyPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkJ1aWxkPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TWF4aW11bVF1YW50aXR5PC9LZXk+PFZhbHVlPjUwMDAwPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+RmFsc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5Mb2FkVGVzdDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDAwMDAwMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPkZhbHNlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PC9BcnJheU9mQXJyYXlPZktleVZhbHVlUGFpcj4=\r\n \r\n \r\n AccountURL\r\n https://ghhd.billing-current.tfsallin.net/\r\n \r\n \r\n DisplayName\r\n ghhd\r\n \r\n \r\n IdentityDomain\r\n de86f3e7-1fe3-414c-812a-817ab249ad9b\r\n \r\n \r\n TfsRegion\r\n North Central US\r\n \r\n \r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-ghjfdjdf-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-glkdhghjgk-Group\r\n \r\n VS-glkdhghjgk-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-hh-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ia1-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ia2-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ibizaa1-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ibizaa2-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ibizaacc01-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ibizacc01-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ijkljkl-Group\r\n \r\n VS-ijkljkl-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-klgfuiadlfu-Group\r\n \r\n VS-klgfuiadlfu-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-newsignout-Group\r\n \r\n VS-newsignout-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-quickcheck-Group\r\n \r\n VS-quickcheck-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-qwerty-Group\r\n \r\n VS-qwerty-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-r717auxacc2-Group\r\n \r\n VS-r717auxacc2-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-rdfrrrrrrrrrrrrr-Group\r\n \r\n VS-rdfrrrrrrrrrrrrr-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-RGless-Group\r\n \r\n VS-RGless-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity-Group\r\n \r\n VS-sanity-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity101-Group\r\n \r\n VS-sanity101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity102-Group\r\n \r\n VS-sanity102-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity103-Group\r\n \r\n VS-sanity103-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity103ibiza-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity104-Group\r\n \r\n VS-sanity104-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity201-Group\r\n \r\n VS-sanity201-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity202-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity301-Group\r\n \r\n VS-sanity301-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity40-Group\r\n \r\n VS-sanity40-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity401-Group\r\n \r\n VS-sanity401-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity402-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity403-Group\r\n \r\n VS-sanity403-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity601-Group\r\n \r\n VS-sanity601-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity603-Group\r\n \r\n VS-sanity603-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity604-Group\r\n \r\n VS-sanity604-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity605-Group\r\n \r\n VS-sanity605-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity701-Group\r\n \r\n VS-sanity701-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity702-Group\r\n \r\n VS-sanity702-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity706-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-sanityclean101-Group\r\n \r\n VS-sanityclean101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanityclean101r-Group\r\n \r\n VS-sanityclean101r-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanityclean102-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-sanityclean103-Group\r\n \r\n VS-sanityclean103-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanityr-Group\r\n \r\n VS-sanityr-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdelete-Group\r\n \r\n VS-softdelete-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdelete401-Group\r\n \r\n VS-softdelete401-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdelete402-Group\r\n \r\n VS-softdelete402-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdelete403-Group\r\n \r\n VS-softdelete403-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdelete405-Group\r\n \r\n VS-softdelete405-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdelete405changed-Group\r\n \r\n VS-softdelete405changed-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdeleteacc01-Group\r\n \r\n VS-softdeleteacc01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-spsdbupgrade201-Group\r\n \r\n VS-spsdbupgrade201-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-spsupgrade101-Group\r\n \r\n VS-spsupgrade101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-spsupgradenone-Group\r\n \r\n VS-spsupgradenone-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-spsupgradetesting101-Group\r\n \r\n VS-spsupgradetesting101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-spsupgradetfs102-Group\r\n \r\n VS-spsupgradetfs102-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-test123-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-testacc6191-Group\r\n \r\n VS-testacc6191-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testaccaux01-Group\r\n \r\n VS-testaccaux01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testaccaux02-Group\r\n \r\n VS-testaccaux02-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testaccc-Group\r\n \r\n VS-testaccc-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testaccibiza01-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-testing-Group\r\n \r\n VS-testing-Group in North Central US\r\n North Central US\r\n \r\n \r\n visualstudio\r\n account\r\n testing\r\n None\r\n 1.0\r\n 477546e4-2b3f-4a9e-ba9d-1c818a58fa3c\r\n Started\r\n Succeeded\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 5\r\n \r\n \r\n Build\r\n Seats\r\n 60\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 15000\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n AdditionalMeterData\r\n PEFycmF5T2ZBcnJheU9mS2V5VmFsdWVQYWlyIHhtbG5zOmk9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxucz0iaHR0cDovL3NjaGVtYXMuZGF0YWNvbnRyYWN0Lm9yZy8yMDA0LzA3L01pY3Jvc29mdC5WaXN1YWxTdHVkaW8uU2VydmljZXMuQ29tbWVyY2UiPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkFkdmFuY2VkTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDA8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5Jc1BhaWRCaWxsaW5nRW5hYmxlZDwvS2V5PjxWYWx1ZT5UcnVlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PEFycmF5T2ZLZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk5hbWU8L0tleT48VmFsdWU+UHJvZmVzc2lvbmFsTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPlRydWU8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5TdGFuZGFyZExpY2Vuc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5NYXhpbXVtUXVhbnRpdHk8L0tleT48VmFsdWU+MTA1PC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+VHJ1ZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PC9BcnJheU9mS2V5VmFsdWVQYWlyPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkJ1aWxkPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TWF4aW11bVF1YW50aXR5PC9LZXk+PFZhbHVlPjUwMDAwPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+RmFsc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5Mb2FkVGVzdDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDAwMDAwMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPkZhbHNlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PC9BcnJheU9mQXJyYXlPZktleVZhbHVlUGFpcj4=\r\n \r\n \r\n AccountURL\r\n https://testing.billing-current.tfsallin.net/\r\n \r\n \r\n DisplayName\r\n testing\r\n \r\n \r\n IdentityDomain\r\n de86f3e7-1fe3-414c-812a-817ab249ad9b\r\n \r\n \r\n TfsRegion\r\n North Central US\r\n \r\n \r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-testing01-Group\r\n \r\n VS-testing01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing102-Group\r\n \r\n VS-testing102-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing3-Group\r\n \r\n VS-testing3-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing401-Group\r\n \r\n VS-testing401-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing402-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-testing701-Group\r\n \r\n VS-testing701-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing702-Group\r\n \r\n VS-testing702-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing704-Group\r\n \r\n VS-testing704-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing705-Group\r\n \r\n VS-testing705-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing901-Group\r\n \r\n VS-testing901-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing902-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-testing905-Group\r\n \r\n VS-testing905-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingaadbacked901-Group\r\n \r\n VS-testingaadbacked901-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingaux-Group\r\n \r\n VS-testingaux-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingaux101-Group\r\n \r\n VS-testingaux101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingaux102-Group\r\n \r\n VS-testingaux102-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingmbsabacked-Group\r\n \r\n VS-testingmbsabacked-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingss-Group\r\n \r\n VS-testingss-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingtfs101-Group\r\n \r\n VS-testingtfs101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingtfs2-Group\r\n \r\n VS-testingtfs2-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testting-Group\r\n \r\n VS-testting-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testtingtfs-Group\r\n \r\n VS-testtingtfs-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-TFS918-Group\r\n \r\n VS-TFS918-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-TFS918WEU-Group\r\n \r\n VS-TFS918WEU-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tfsacc301-Group\r\n \r\n VS-tfsacc301-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tfsaccount-Group\r\n \r\n VS-tfsaccount-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tfsaccount01-Group\r\n \r\n VS-tfsaccount01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tfsconp101-Group\r\n \r\n VS-tfsconp101-Group in North Central US\r\n North Central US\r\n \r\n \r\n visualstudio\r\n account\r\n tfsconp101\r\n None\r\n 1.0\r\n 3bd7ff2f-c8b1-4e7a-b07c-fedf55bd03eb\r\n Started\r\n Succeeded\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 5\r\n \r\n \r\n Build\r\n Seats\r\n 60\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 15000\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n AdditionalMeterData\r\n PEFycmF5T2ZBcnJheU9mS2V5VmFsdWVQYWlyIHhtbG5zOmk9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxucz0iaHR0cDovL3NjaGVtYXMuZGF0YWNvbnRyYWN0Lm9yZy8yMDA0LzA3L01pY3Jvc29mdC5WaXN1YWxTdHVkaW8uU2VydmljZXMuQ29tbWVyY2UiPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkFkdmFuY2VkTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDA8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5Jc1BhaWRCaWxsaW5nRW5hYmxlZDwvS2V5PjxWYWx1ZT5UcnVlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PEFycmF5T2ZLZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk5hbWU8L0tleT48VmFsdWU+UHJvZmVzc2lvbmFsTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPlRydWU8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5TdGFuZGFyZExpY2Vuc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5NYXhpbXVtUXVhbnRpdHk8L0tleT48VmFsdWU+MTA1PC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+VHJ1ZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PC9BcnJheU9mS2V5VmFsdWVQYWlyPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkJ1aWxkPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TWF4aW11bVF1YW50aXR5PC9LZXk+PFZhbHVlPjUwMDAwPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+RmFsc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5Mb2FkVGVzdDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDAwMDAwMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPkZhbHNlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PC9BcnJheU9mQXJyYXlPZktleVZhbHVlUGFpcj4=\r\n \r\n \r\n AccountURL\r\n https://tfsconp101.billing-current.tfsallin.net/\r\n \r\n \r\n DisplayName\r\n tfsconp101\r\n \r\n \r\n IdentityDomain\r\n de86f3e7-1fe3-414c-812a-817ab249ad9b\r\n \r\n \r\n TfsRegion\r\n North Central US\r\n \r\n \r\n \r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-TFSNCUS918-Group\r\n \r\n VS-TFSNCUS918-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tfsupdate301-Group\r\n \r\n VS-tfsupdate301-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tfsupdatetfsacc302-Group\r\n \r\n VS-tfsupdatetfsacc302-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-today-Group\r\n \r\n VS-today-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-todaysaux01-Group\r\n \r\n VS-todaysaux01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-todaysauxtest101-Group\r\n \r\n VS-todaysauxtest101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-todaysibiza01-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-trialacc-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-trialaccount-Group\r\n \r\n VS-trialaccount-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-trialaccount102-Group\r\n \r\n VS-trialaccount102-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-trrykweoykweoykweo-Group\r\n \r\n VS-trrykweoykweoykweo-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tuejulyauxacc01-Group\r\n \r\n VS-tuejulyauxacc01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tuejulyibiza01acc-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-westeuropeacc-Group\r\n \r\n VS-westeuropeacc-Group in North Central US\r\n North Central US\r\n \r\n \r\n", + "ResponseHeaders": { + "Content-Length": [ + "54717" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-request-id": [ + "eb04da3ccb30842f91d9ec5ed589cf28" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 10 Oct 2014 06:15:20 GMT" + ], + "Server": [ + "1.0.6198.130", + "(rd_rdfe_stable.140925-2236)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/947a55d7-75e9-4a36-b156-305c6270f018/cloudservices?api-version=2014-10-27", + "EncodedRequestUri": "Lzk0N2E1NWQ3LTc1ZTktNGEzNi1iMTU2LTMwNWM2MjcwZjAxOC9jbG91ZHNlcnZpY2VzP2FwaS12ZXJzaW9uPTIwMTQtMTAtMjc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/xml" + ], + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.RecoveryServices.RecoveryServicesManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "\r\n \r\n cdsBKSIPEKSKUOD6BRA3PZOPIOUSEB6PBLUPHIK7Z3U7OVNBDOA257Q-North-Central-US\r\n \r\n cdsBKSIPEKSKUOD6BRA3PZOPIOUSEB6PBLUPHIK7Z3U7OVNBDOA257Q-North-Central-US in North Central US\r\n North Central US\r\n \r\n \r\n \r\n RecoveryServices-BKSIPEKSKUOD6BRA3PZOPIOUSEB6PBLUPHIK7Z3U7OVNBDOA257Q-west-us\r\n \r\n a510ea8f-1b1e-465b-927e-2caf10786579\r\n west us\r\n \r\n \r\n WAHyperVRecoveryManager\r\n HyperVRecoveryManagerVault\r\n rijethma-vault\r\n \r\n 1.1\r\n 25e8dd1c-44c6-49f1-aa50-aac068c55b96\r\n Started\r\n Ok\r\n \r\n \r\n StampId\r\n abeb635b-e186-4605-b464-c7c9e55b226a\r\n \r\n \r\n ResourceId\r\n 8856597376086032764\r\n \r\n \r\n BackendStampId\r\n 75d5c811-a801-4332-8f96-43640cad60e9\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n VS-aaddisable-Group\r\n \r\n VS-aaddisable-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-ac1-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-acc-Group\r\n \r\n VS-acc-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-acc1-Group\r\n \r\n VS-acc1-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-compact-Group\r\n \r\n Resource group based cloud service.\r\n East US\r\n \r\n \r\n visualstudio\r\n account\r\n compact\r\n None\r\n 1.0\r\n 24b0ccad-e127-4389-a56c-a3e5d510ee0c\r\n Started\r\n Succeeded\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 5\r\n \r\n \r\n Build\r\n Seats\r\n 60\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 15000\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n AdditionalMeterData\r\n PEFycmF5T2ZBcnJheU9mS2V5VmFsdWVQYWlyIHhtbG5zOmk9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxucz0iaHR0cDovL3NjaGVtYXMuZGF0YWNvbnRyYWN0Lm9yZy8yMDA0LzA3L01pY3Jvc29mdC5WaXN1YWxTdHVkaW8uU2VydmljZXMuQ29tbWVyY2UiPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkFkdmFuY2VkTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDA8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5Jc1BhaWRCaWxsaW5nRW5hYmxlZDwvS2V5PjxWYWx1ZT5UcnVlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PEFycmF5T2ZLZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk5hbWU8L0tleT48VmFsdWU+UHJvZmVzc2lvbmFsTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPlRydWU8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5TdGFuZGFyZExpY2Vuc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5NYXhpbXVtUXVhbnRpdHk8L0tleT48VmFsdWU+MTA1PC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+VHJ1ZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PC9BcnJheU9mS2V5VmFsdWVQYWlyPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkJ1aWxkPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TWF4aW11bVF1YW50aXR5PC9LZXk+PFZhbHVlPjUwMDAwPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+RmFsc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5Mb2FkVGVzdDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDAwMDAwMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPkZhbHNlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PC9BcnJheU9mQXJyYXlPZktleVZhbHVlUGFpcj4=\r\n \r\n \r\n AccountURL\r\n https://compact.billing-current.tfsallin.net/\r\n \r\n \r\n DisplayName\r\n compact\r\n \r\n \r\n IdentityDomain\r\n de86f3e7-1fe3-414c-812a-817ab249ad9b\r\n \r\n \r\n TfsRegion\r\n North Central US\r\n \r\n \r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-compat-Group\r\n \r\n VS-compat-Group in North Central US\r\n North Central US\r\n \r\n \r\n visualstudio\r\n account\r\n compat\r\n None\r\n 1.0\r\n 5c087e25-f539-43d6-bf9f-768797f6287c\r\n Started\r\n Succeeded\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 5\r\n \r\n \r\n Build\r\n Seats\r\n 60\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 15000\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n AdditionalMeterData\r\n PEFycmF5T2ZBcnJheU9mS2V5VmFsdWVQYWlyIHhtbG5zOmk9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxucz0iaHR0cDovL3NjaGVtYXMuZGF0YWNvbnRyYWN0Lm9yZy8yMDA0LzA3L01pY3Jvc29mdC5WaXN1YWxTdHVkaW8uU2VydmljZXMuQ29tbWVyY2UiPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkFkdmFuY2VkTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDA8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5Jc1BhaWRCaWxsaW5nRW5hYmxlZDwvS2V5PjxWYWx1ZT5UcnVlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PEFycmF5T2ZLZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk5hbWU8L0tleT48VmFsdWU+UHJvZmVzc2lvbmFsTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPlRydWU8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5TdGFuZGFyZExpY2Vuc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5NYXhpbXVtUXVhbnRpdHk8L0tleT48VmFsdWU+MTA1PC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+VHJ1ZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PC9BcnJheU9mS2V5VmFsdWVQYWlyPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkJ1aWxkPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TWF4aW11bVF1YW50aXR5PC9LZXk+PFZhbHVlPjUwMDAwPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+RmFsc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5Mb2FkVGVzdDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDAwMDAwMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPkZhbHNlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PC9BcnJheU9mQXJyYXlPZktleVZhbHVlUGFpcj4=\r\n \r\n \r\n AccountURL\r\n https://compat.billing-current.tfsallin.net/\r\n \r\n \r\n DisplayName\r\n compat\r\n \r\n \r\n IdentityDomain\r\n de86f3e7-1fe3-414c-812a-817ab249ad9b\r\n \r\n \r\n TfsRegion\r\n North Central US\r\n \r\n \r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-compat101-Group\r\n \r\n VS-compat101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-compat102-Group\r\n \r\n VS-compat102-Group in West US\r\n West US\r\n \r\n \r\n visualstudio\r\n account\r\n compat102\r\n None\r\n 1.0\r\n 4c907789-db73-4d38-8c81-1cdb093da81b\r\n Started\r\n Failed\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n Build\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-compat201-Group\r\n \r\n VS-compat201-Group in North Central US\r\n North Central US\r\n \r\n \r\n visualstudio\r\n account\r\n compat201\r\n None\r\n 1.0\r\n c35a685d-f549-4ca3-acd6-7c758b644e4f\r\n Started\r\n Failed\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n Build\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-compat301-Group\r\n \r\n VS-compat301-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-compt40-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n visualstudio\r\n account\r\n compt40\r\n None\r\n 1.0\r\n ba986567-5a53-4baf-9e9c-7b7ade784b5c\r\n Started\r\n Succeeded\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 5\r\n \r\n \r\n Build\r\n Seats\r\n 60\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 15000\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n AdditionalMeterData\r\n PEFycmF5T2ZBcnJheU9mS2V5VmFsdWVQYWlyIHhtbG5zOmk9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxucz0iaHR0cDovL3NjaGVtYXMuZGF0YWNvbnRyYWN0Lm9yZy8yMDA0LzA3L01pY3Jvc29mdC5WaXN1YWxTdHVkaW8uU2VydmljZXMuQ29tbWVyY2UiPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkFkdmFuY2VkTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDA8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5Jc1BhaWRCaWxsaW5nRW5hYmxlZDwvS2V5PjxWYWx1ZT5UcnVlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PEFycmF5T2ZLZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk5hbWU8L0tleT48VmFsdWU+UHJvZmVzc2lvbmFsTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPlRydWU8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5TdGFuZGFyZExpY2Vuc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5NYXhpbXVtUXVhbnRpdHk8L0tleT48VmFsdWU+MTA1PC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+VHJ1ZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PC9BcnJheU9mS2V5VmFsdWVQYWlyPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkJ1aWxkPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TWF4aW11bVF1YW50aXR5PC9LZXk+PFZhbHVlPjUwMDAwPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+RmFsc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5Mb2FkVGVzdDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDAwMDAwMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPkZhbHNlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PC9BcnJheU9mQXJyYXlPZktleVZhbHVlUGFpcj4=\r\n \r\n \r\n AccountURL\r\n https://compt40.billing-current.tfsallin.net/\r\n \r\n \r\n DisplayName\r\n compt40\r\n \r\n \r\n IdentityDomain\r\n Windows Live ID\r\n \r\n \r\n TfsRegion\r\n North Central US\r\n \r\n \r\n \r\n \r\n \r\n \r\n Update\r\n Failed\r\n \r\n 403\r\n <WrappedException xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" z:Id=\"i1\" xmlns:z=\"http://schemas.microsoft.com/2003/10/Serialization/\" xmlns=\"http://schemas.datacontract.org/2004/07/Microsoft.VisualStudio.Services.WebApi\"><ErrorCode>0</ErrorCode><EventId>3000</EventId><InnerException i:nil=\"true\" /><Message>User \"admin@aad140.ccsctp.net\" is not the account owner of \"\".</Message><TypeKey>UserIsNotAccountOwnerException</TypeKey><TypeName>Microsoft.VisualStudio.Services.Commerce.UserIsNotAccountOwnerException, Microsoft.VisualStudio.Services.Commerce, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</TypeName></WrappedException>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-createacc002-Group\r\n \r\n VS-createacc002-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-createTFS1-Group\r\n \r\n VS-createTFS1-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-createtfs2-Group\r\n \r\n VS-createtfs2-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-dbupgradetfs202-Group\r\n \r\n VS-dbupgradetfs202-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-dtestacc1-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-finalenable-Group\r\n \r\n VS-finalenable-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-finaltfacc01-Group\r\n \r\n VS-finaltfacc01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-finalupdate-Group\r\n \r\n VS-finalupdate-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-finalupdate401-Group\r\n \r\n VS-finalupdate401-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-finalUpdate401Changed-Group\r\n \r\n VS-finalUpdate401Changed-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-finalupdatetfs402-Group\r\n \r\n VS-finalupdatetfs402-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-fresh-Group\r\n \r\n VS-fresh-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-freshsoftdelete-Group\r\n \r\n VS-freshsoftdelete-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-gfsfg-Group\r\n \r\n VS-gfsfg-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-ghhd-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n visualstudio\r\n account\r\n ghhd\r\n None\r\n 1.0\r\n d4a68495-4de3-46ba-9084-a7fa951ac29e\r\n Started\r\n Succeeded\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 5\r\n \r\n \r\n Build\r\n Seats\r\n 60\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 15000\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n AdditionalMeterData\r\n PEFycmF5T2ZBcnJheU9mS2V5VmFsdWVQYWlyIHhtbG5zOmk9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxucz0iaHR0cDovL3NjaGVtYXMuZGF0YWNvbnRyYWN0Lm9yZy8yMDA0LzA3L01pY3Jvc29mdC5WaXN1YWxTdHVkaW8uU2VydmljZXMuQ29tbWVyY2UiPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkFkdmFuY2VkTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDA8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5Jc1BhaWRCaWxsaW5nRW5hYmxlZDwvS2V5PjxWYWx1ZT5UcnVlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PEFycmF5T2ZLZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk5hbWU8L0tleT48VmFsdWU+UHJvZmVzc2lvbmFsTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPlRydWU8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5TdGFuZGFyZExpY2Vuc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5NYXhpbXVtUXVhbnRpdHk8L0tleT48VmFsdWU+MTA1PC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+VHJ1ZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PC9BcnJheU9mS2V5VmFsdWVQYWlyPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkJ1aWxkPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TWF4aW11bVF1YW50aXR5PC9LZXk+PFZhbHVlPjUwMDAwPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+RmFsc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5Mb2FkVGVzdDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDAwMDAwMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPkZhbHNlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PC9BcnJheU9mQXJyYXlPZktleVZhbHVlUGFpcj4=\r\n \r\n \r\n AccountURL\r\n https://ghhd.billing-current.tfsallin.net/\r\n \r\n \r\n DisplayName\r\n ghhd\r\n \r\n \r\n IdentityDomain\r\n de86f3e7-1fe3-414c-812a-817ab249ad9b\r\n \r\n \r\n TfsRegion\r\n North Central US\r\n \r\n \r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-ghjfdjdf-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-glkdhghjgk-Group\r\n \r\n VS-glkdhghjgk-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-hh-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ia1-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ia2-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ibizaa1-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ibizaa2-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ibizaacc01-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ibizacc01-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ijkljkl-Group\r\n \r\n VS-ijkljkl-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-klgfuiadlfu-Group\r\n \r\n VS-klgfuiadlfu-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-newsignout-Group\r\n \r\n VS-newsignout-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-quickcheck-Group\r\n \r\n VS-quickcheck-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-qwerty-Group\r\n \r\n VS-qwerty-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-r717auxacc2-Group\r\n \r\n VS-r717auxacc2-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-rdfrrrrrrrrrrrrr-Group\r\n \r\n VS-rdfrrrrrrrrrrrrr-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-RGless-Group\r\n \r\n VS-RGless-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity-Group\r\n \r\n VS-sanity-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity101-Group\r\n \r\n VS-sanity101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity102-Group\r\n \r\n VS-sanity102-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity103-Group\r\n \r\n VS-sanity103-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity103ibiza-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity104-Group\r\n \r\n VS-sanity104-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity201-Group\r\n \r\n VS-sanity201-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity202-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity301-Group\r\n \r\n VS-sanity301-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity40-Group\r\n \r\n VS-sanity40-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity401-Group\r\n \r\n VS-sanity401-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity402-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity403-Group\r\n \r\n VS-sanity403-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity601-Group\r\n \r\n VS-sanity601-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity603-Group\r\n \r\n VS-sanity603-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity604-Group\r\n \r\n VS-sanity604-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity605-Group\r\n \r\n VS-sanity605-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity701-Group\r\n \r\n VS-sanity701-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity702-Group\r\n \r\n VS-sanity702-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity706-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-sanityclean101-Group\r\n \r\n VS-sanityclean101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanityclean101r-Group\r\n \r\n VS-sanityclean101r-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanityclean102-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-sanityclean103-Group\r\n \r\n VS-sanityclean103-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanityr-Group\r\n \r\n VS-sanityr-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdelete-Group\r\n \r\n VS-softdelete-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdelete401-Group\r\n \r\n VS-softdelete401-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdelete402-Group\r\n \r\n VS-softdelete402-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdelete403-Group\r\n \r\n VS-softdelete403-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdelete405-Group\r\n \r\n VS-softdelete405-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdelete405changed-Group\r\n \r\n VS-softdelete405changed-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdeleteacc01-Group\r\n \r\n VS-softdeleteacc01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-spsdbupgrade201-Group\r\n \r\n VS-spsdbupgrade201-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-spsupgrade101-Group\r\n \r\n VS-spsupgrade101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-spsupgradenone-Group\r\n \r\n VS-spsupgradenone-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-spsupgradetesting101-Group\r\n \r\n VS-spsupgradetesting101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-spsupgradetfs102-Group\r\n \r\n VS-spsupgradetfs102-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-test123-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-testacc6191-Group\r\n \r\n VS-testacc6191-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testaccaux01-Group\r\n \r\n VS-testaccaux01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testaccaux02-Group\r\n \r\n VS-testaccaux02-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testaccc-Group\r\n \r\n VS-testaccc-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testaccibiza01-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-testing-Group\r\n \r\n VS-testing-Group in North Central US\r\n North Central US\r\n \r\n \r\n visualstudio\r\n account\r\n testing\r\n None\r\n 1.0\r\n 477546e4-2b3f-4a9e-ba9d-1c818a58fa3c\r\n Started\r\n Succeeded\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 5\r\n \r\n \r\n Build\r\n Seats\r\n 60\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 15000\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n AdditionalMeterData\r\n PEFycmF5T2ZBcnJheU9mS2V5VmFsdWVQYWlyIHhtbG5zOmk9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxucz0iaHR0cDovL3NjaGVtYXMuZGF0YWNvbnRyYWN0Lm9yZy8yMDA0LzA3L01pY3Jvc29mdC5WaXN1YWxTdHVkaW8uU2VydmljZXMuQ29tbWVyY2UiPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkFkdmFuY2VkTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDA8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5Jc1BhaWRCaWxsaW5nRW5hYmxlZDwvS2V5PjxWYWx1ZT5UcnVlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PEFycmF5T2ZLZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk5hbWU8L0tleT48VmFsdWU+UHJvZmVzc2lvbmFsTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPlRydWU8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5TdGFuZGFyZExpY2Vuc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5NYXhpbXVtUXVhbnRpdHk8L0tleT48VmFsdWU+MTA1PC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+VHJ1ZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PC9BcnJheU9mS2V5VmFsdWVQYWlyPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkJ1aWxkPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TWF4aW11bVF1YW50aXR5PC9LZXk+PFZhbHVlPjUwMDAwPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+RmFsc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5Mb2FkVGVzdDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDAwMDAwMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPkZhbHNlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PC9BcnJheU9mQXJyYXlPZktleVZhbHVlUGFpcj4=\r\n \r\n \r\n AccountURL\r\n https://testing.billing-current.tfsallin.net/\r\n \r\n \r\n DisplayName\r\n testing\r\n \r\n \r\n IdentityDomain\r\n de86f3e7-1fe3-414c-812a-817ab249ad9b\r\n \r\n \r\n TfsRegion\r\n North Central US\r\n \r\n \r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-testing01-Group\r\n \r\n VS-testing01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing102-Group\r\n \r\n VS-testing102-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing3-Group\r\n \r\n VS-testing3-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing401-Group\r\n \r\n VS-testing401-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing402-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-testing701-Group\r\n \r\n VS-testing701-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing702-Group\r\n \r\n VS-testing702-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing704-Group\r\n \r\n VS-testing704-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing705-Group\r\n \r\n VS-testing705-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing901-Group\r\n \r\n VS-testing901-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing902-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-testing905-Group\r\n \r\n VS-testing905-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingaadbacked901-Group\r\n \r\n VS-testingaadbacked901-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingaux-Group\r\n \r\n VS-testingaux-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingaux101-Group\r\n \r\n VS-testingaux101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingaux102-Group\r\n \r\n VS-testingaux102-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingmbsabacked-Group\r\n \r\n VS-testingmbsabacked-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingss-Group\r\n \r\n VS-testingss-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingtfs101-Group\r\n \r\n VS-testingtfs101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingtfs2-Group\r\n \r\n VS-testingtfs2-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testting-Group\r\n \r\n VS-testting-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testtingtfs-Group\r\n \r\n VS-testtingtfs-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-TFS918-Group\r\n \r\n VS-TFS918-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-TFS918WEU-Group\r\n \r\n VS-TFS918WEU-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tfsacc301-Group\r\n \r\n VS-tfsacc301-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tfsaccount-Group\r\n \r\n VS-tfsaccount-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tfsaccount01-Group\r\n \r\n VS-tfsaccount01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tfsconp101-Group\r\n \r\n VS-tfsconp101-Group in North Central US\r\n North Central US\r\n \r\n \r\n visualstudio\r\n account\r\n tfsconp101\r\n None\r\n 1.0\r\n 3bd7ff2f-c8b1-4e7a-b07c-fedf55bd03eb\r\n Started\r\n Succeeded\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 5\r\n \r\n \r\n Build\r\n Seats\r\n 60\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 15000\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n AdditionalMeterData\r\n PEFycmF5T2ZBcnJheU9mS2V5VmFsdWVQYWlyIHhtbG5zOmk9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxucz0iaHR0cDovL3NjaGVtYXMuZGF0YWNvbnRyYWN0Lm9yZy8yMDA0LzA3L01pY3Jvc29mdC5WaXN1YWxTdHVkaW8uU2VydmljZXMuQ29tbWVyY2UiPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkFkdmFuY2VkTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDA8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5Jc1BhaWRCaWxsaW5nRW5hYmxlZDwvS2V5PjxWYWx1ZT5UcnVlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PEFycmF5T2ZLZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk5hbWU8L0tleT48VmFsdWU+UHJvZmVzc2lvbmFsTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPlRydWU8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5TdGFuZGFyZExpY2Vuc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5NYXhpbXVtUXVhbnRpdHk8L0tleT48VmFsdWU+MTA1PC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+VHJ1ZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PC9BcnJheU9mS2V5VmFsdWVQYWlyPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkJ1aWxkPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TWF4aW11bVF1YW50aXR5PC9LZXk+PFZhbHVlPjUwMDAwPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+RmFsc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5Mb2FkVGVzdDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDAwMDAwMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPkZhbHNlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PC9BcnJheU9mQXJyYXlPZktleVZhbHVlUGFpcj4=\r\n \r\n \r\n AccountURL\r\n https://tfsconp101.billing-current.tfsallin.net/\r\n \r\n \r\n DisplayName\r\n tfsconp101\r\n \r\n \r\n IdentityDomain\r\n de86f3e7-1fe3-414c-812a-817ab249ad9b\r\n \r\n \r\n TfsRegion\r\n North Central US\r\n \r\n \r\n \r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-TFSNCUS918-Group\r\n \r\n VS-TFSNCUS918-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tfsupdate301-Group\r\n \r\n VS-tfsupdate301-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tfsupdatetfsacc302-Group\r\n \r\n VS-tfsupdatetfsacc302-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-today-Group\r\n \r\n VS-today-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-todaysaux01-Group\r\n \r\n VS-todaysaux01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-todaysauxtest101-Group\r\n \r\n VS-todaysauxtest101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-todaysibiza01-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-trialacc-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-trialaccount-Group\r\n \r\n VS-trialaccount-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-trialaccount102-Group\r\n \r\n VS-trialaccount102-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-trrykweoykweoykweo-Group\r\n \r\n VS-trrykweoykweoykweo-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tuejulyauxacc01-Group\r\n \r\n VS-tuejulyauxacc01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tuejulyibiza01acc-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-westeuropeacc-Group\r\n \r\n VS-westeuropeacc-Group in North Central US\r\n North Central US\r\n \r\n \r\n", + "ResponseHeaders": { + "Content-Length": [ + "54717" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-request-id": [ + "1e1889a821208fcfbeacaa1e0df1865a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 10 Oct 2014 06:15:29 GMT" + ], + "Server": [ + "1.0.6198.130", + "(rd_rdfe_stable.140925-2236)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/947a55d7-75e9-4a36-b156-305c6270f018/cloudservices/RecoveryServices-BKSIPEKSKUOD6BRA3PZOPIOUSEB6PBLUPHIK7Z3U7OVNBDOA257Q-west-us/resources/WAHyperVRecoveryManager/~/HyperVRecoveryManagerVault/rijethma-vault/Servers?api-version=2014-10-27", + "EncodedRequestUri": "Lzk0N2E1NWQ3LTc1ZTktNGEzNi1iMTU2LTMwNWM2MjcwZjAxOC9jbG91ZHNlcnZpY2VzL1JlY292ZXJ5U2VydmljZXMtQktTSVBFS1NLVU9ENkJSQTNQWk9QSU9VU0VCNlBCTFVQSElLN1ozVTdPVk5CRE9BMjU3US13ZXN0LXVzL3Jlc291cmNlcy9XQUh5cGVyVlJlY292ZXJ5TWFuYWdlci9+L0h5cGVyVlJlY292ZXJ5TWFuYWdlclZhdWx0L3JpamV0aG1hLXZhdWx0L1NlcnZlcnM/YXBpLXZlcnNpb249MjAxNC0xMC0yNw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/xml" + ], + "x-ms-client-request-id": [ + "09043800-3e96-4983-bd3c-b15f737669b3-2014-45-10 11:45:20Z-P" + ], + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.SiteRecovery.SiteRecoveryManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "\r\n \r\n 58dc1662-e746-4510-9e8e-a2e03e10b867\r\n rijethma-server.fareast.corp.microsoft.com\r\n false\r\n 2014-09-21T20:50:16.035652Z\r\n 3.5.484.0\r\n 3.2.7510.0\r\n \r\n", + "ResponseHeaders": { + "Content-Length": [ + "494" + ], + "Content-Type": [ + "application/xml" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=15724800; includeSubDomains,max-age=15724800; includeSubDomains" + ], + "x-ms-client-request-id": [ + "09043800-3e96-4983-bd3c-b15f737669b3-2014-45-10 11:45:20Z-P" + ], + "x-ms-request-id": [ + "5ce635be1e068fa9ade58b33667ee3f0" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 10 Oct 2014 06:15:24 GMT" + ], + "Server": [ + "1.0.6198.130", + "(rd_rdfe_stable.140925-2236)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/947a55d7-75e9-4a36-b156-305c6270f018/cloudservices/RecoveryServices-BKSIPEKSKUOD6BRA3PZOPIOUSEB6PBLUPHIK7Z3U7OVNBDOA257Q-west-us/resources/WAHyperVRecoveryManager/~/HyperVRecoveryManagerVault/rijethma-vault/ProtectionContainers?api-version=2014-10-27", + "EncodedRequestUri": "Lzk0N2E1NWQ3LTc1ZTktNGEzNi1iMTU2LTMwNWM2MjcwZjAxOC9jbG91ZHNlcnZpY2VzL1JlY292ZXJ5U2VydmljZXMtQktTSVBFS1NLVU9ENkJSQTNQWk9QSU9VU0VCNlBCTFVQSElLN1ozVTdPVk5CRE9BMjU3US13ZXN0LXVzL3Jlc291cmNlcy9XQUh5cGVyVlJlY292ZXJ5TWFuYWdlci9+L0h5cGVyVlJlY292ZXJ5TWFuYWdlclZhdWx0L3JpamV0aG1hLXZhdWx0L1Byb3RlY3Rpb25Db250YWluZXJzP2FwaS12ZXJzaW9uPTIwMTQtMTAtMjc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/xml" + ], + "x-ms-client-request-id": [ + "bb080f5b-1d96-4432-9d70-364dcf5231be-2014-45-10 11:45:29Z-P" + ], + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.SiteRecovery.SiteRecoveryManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "\r\n \r\n 58dc1662-e746-4510-9e8e-a2e03e10b867_cf754905-fe70-4e68-9884-80c2643a6664\r\n rijethma-c2\r\n NotConfigured\r\n cf754905-fe70-4e68-9884-80c2643a6664\r\n _\r\n \r\n 58dc1662-e746-4510-9e8e-a2e03e10b867\r\n \r\n \r\n 58dc1662-e746-4510-9e8e-a2e03e10b867_dec364d8-d4a8-46f9-9607-586a3171d069\r\n rijethma-c1\r\n NotConfigured\r\n dec364d8-d4a8-46f9-9607-586a3171d069\r\n _\r\n \r\n 58dc1662-e746-4510-9e8e-a2e03e10b867\r\n \r\n", + "ResponseHeaders": { + "Content-Length": [ + "964" + ], + "Content-Type": [ + "application/xml" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=15724800; includeSubDomains,max-age=15724800; includeSubDomains" + ], + "x-ms-client-request-id": [ + "bb080f5b-1d96-4432-9d70-364dcf5231be-2014-45-10 11:45:29Z-P" + ], + "x-ms-request-id": [ + "24354db582d38c6c91ac40b79c0682b0" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 10 Oct 2014 06:15:31 GMT" + ], + "Server": [ + "1.0.6198.130", + "(rd_rdfe_stable.140925-2236)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "947a55d7-75e9-4a36-b156-305c6270f018", + "UserId": "admin@aad140.ccsctp.net" + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/SessionRecords/Microsoft.Azure.Commands.RecoveryServices.Test.ScenarioTests.RecoveryServicesTests/RecoveryServicesProtectionTests.json b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/SessionRecords/Microsoft.Azure.Commands.RecoveryServices.Test.ScenarioTests.RecoveryServicesTests/RecoveryServicesProtectionTests.json new file mode 100644 index 000000000000..916f535770b1 --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/SessionRecords/Microsoft.Azure.Commands.RecoveryServices.Test.ScenarioTests.RecoveryServicesTests/RecoveryServicesProtectionTests.json @@ -0,0 +1,153 @@ +{ + "Entries": [ + { + "RequestUri": "/947a55d7-75e9-4a36-b156-305c6270f018/cloudservices?api-version=2014-10-27", + "EncodedRequestUri": "Lzk0N2E1NWQ3LTc1ZTktNGEzNi1iMTU2LTMwNWM2MjcwZjAxOC9jbG91ZHNlcnZpY2VzP2FwaS12ZXJzaW9uPTIwMTQtMTAtMjc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/xml" + ], + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.RecoveryServices.RecoveryServicesManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "\r\n \r\n cdsBKSIPEKSKUOD6BRA3PZOPIOUSEB6PBLUPHIK7Z3U7OVNBDOA257Q-North-Central-US\r\n \r\n cdsBKSIPEKSKUOD6BRA3PZOPIOUSEB6PBLUPHIK7Z3U7OVNBDOA257Q-North-Central-US in North Central US\r\n North Central US\r\n \r\n \r\n \r\n RecoveryServices-BKSIPEKSKUOD6BRA3PZOPIOUSEB6PBLUPHIK7Z3U7OVNBDOA257Q-west-us\r\n \r\n a510ea8f-1b1e-465b-927e-2caf10786579\r\n west us\r\n \r\n \r\n WAHyperVRecoveryManager\r\n HyperVRecoveryManagerVault\r\n rijethma-vault\r\n \r\n 1.1\r\n 25e8dd1c-44c6-49f1-aa50-aac068c55b96\r\n Started\r\n Ok\r\n \r\n \r\n StampId\r\n abeb635b-e186-4605-b464-c7c9e55b226a\r\n \r\n \r\n ResourceId\r\n 8856597376086032764\r\n \r\n \r\n BackendStampId\r\n 75d5c811-a801-4332-8f96-43640cad60e9\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n VS-aaddisable-Group\r\n \r\n VS-aaddisable-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-ac1-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-acc-Group\r\n \r\n VS-acc-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-acc1-Group\r\n \r\n VS-acc1-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-compact-Group\r\n \r\n Resource group based cloud service.\r\n East US\r\n \r\n \r\n visualstudio\r\n account\r\n compact\r\n None\r\n 1.0\r\n 24b0ccad-e127-4389-a56c-a3e5d510ee0c\r\n Started\r\n Succeeded\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 5\r\n \r\n \r\n Build\r\n Seats\r\n 60\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 15000\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n AdditionalMeterData\r\n PEFycmF5T2ZBcnJheU9mS2V5VmFsdWVQYWlyIHhtbG5zOmk9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxucz0iaHR0cDovL3NjaGVtYXMuZGF0YWNvbnRyYWN0Lm9yZy8yMDA0LzA3L01pY3Jvc29mdC5WaXN1YWxTdHVkaW8uU2VydmljZXMuQ29tbWVyY2UiPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkFkdmFuY2VkTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDA8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5Jc1BhaWRCaWxsaW5nRW5hYmxlZDwvS2V5PjxWYWx1ZT5UcnVlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PEFycmF5T2ZLZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk5hbWU8L0tleT48VmFsdWU+UHJvZmVzc2lvbmFsTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPlRydWU8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5TdGFuZGFyZExpY2Vuc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5NYXhpbXVtUXVhbnRpdHk8L0tleT48VmFsdWU+MTA1PC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+VHJ1ZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PC9BcnJheU9mS2V5VmFsdWVQYWlyPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkJ1aWxkPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TWF4aW11bVF1YW50aXR5PC9LZXk+PFZhbHVlPjUwMDAwPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+RmFsc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5Mb2FkVGVzdDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDAwMDAwMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPkZhbHNlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PC9BcnJheU9mQXJyYXlPZktleVZhbHVlUGFpcj4=\r\n \r\n \r\n AccountURL\r\n https://compact.billing-current.tfsallin.net/\r\n \r\n \r\n DisplayName\r\n compact\r\n \r\n \r\n IdentityDomain\r\n de86f3e7-1fe3-414c-812a-817ab249ad9b\r\n \r\n \r\n TfsRegion\r\n North Central US\r\n \r\n \r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-compat-Group\r\n \r\n VS-compat-Group in North Central US\r\n North Central US\r\n \r\n \r\n visualstudio\r\n account\r\n compat\r\n None\r\n 1.0\r\n 5c087e25-f539-43d6-bf9f-768797f6287c\r\n Started\r\n Succeeded\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 5\r\n \r\n \r\n Build\r\n Seats\r\n 60\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 15000\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n AdditionalMeterData\r\n PEFycmF5T2ZBcnJheU9mS2V5VmFsdWVQYWlyIHhtbG5zOmk9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxucz0iaHR0cDovL3NjaGVtYXMuZGF0YWNvbnRyYWN0Lm9yZy8yMDA0LzA3L01pY3Jvc29mdC5WaXN1YWxTdHVkaW8uU2VydmljZXMuQ29tbWVyY2UiPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkFkdmFuY2VkTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDA8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5Jc1BhaWRCaWxsaW5nRW5hYmxlZDwvS2V5PjxWYWx1ZT5UcnVlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PEFycmF5T2ZLZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk5hbWU8L0tleT48VmFsdWU+UHJvZmVzc2lvbmFsTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPlRydWU8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5TdGFuZGFyZExpY2Vuc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5NYXhpbXVtUXVhbnRpdHk8L0tleT48VmFsdWU+MTA1PC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+VHJ1ZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PC9BcnJheU9mS2V5VmFsdWVQYWlyPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkJ1aWxkPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TWF4aW11bVF1YW50aXR5PC9LZXk+PFZhbHVlPjUwMDAwPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+RmFsc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5Mb2FkVGVzdDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDAwMDAwMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPkZhbHNlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PC9BcnJheU9mQXJyYXlPZktleVZhbHVlUGFpcj4=\r\n \r\n \r\n AccountURL\r\n https://compat.billing-current.tfsallin.net/\r\n \r\n \r\n DisplayName\r\n compat\r\n \r\n \r\n IdentityDomain\r\n de86f3e7-1fe3-414c-812a-817ab249ad9b\r\n \r\n \r\n TfsRegion\r\n North Central US\r\n \r\n \r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-compat101-Group\r\n \r\n VS-compat101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-compat102-Group\r\n \r\n VS-compat102-Group in West US\r\n West US\r\n \r\n \r\n visualstudio\r\n account\r\n compat102\r\n None\r\n 1.0\r\n 4c907789-db73-4d38-8c81-1cdb093da81b\r\n Started\r\n Failed\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n Build\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-compat201-Group\r\n \r\n VS-compat201-Group in North Central US\r\n North Central US\r\n \r\n \r\n visualstudio\r\n account\r\n compat201\r\n None\r\n 1.0\r\n c35a685d-f549-4ca3-acd6-7c758b644e4f\r\n Started\r\n Failed\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n Build\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-compat301-Group\r\n \r\n VS-compat301-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-compt40-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n visualstudio\r\n account\r\n compt40\r\n None\r\n 1.0\r\n ba986567-5a53-4baf-9e9c-7b7ade784b5c\r\n Started\r\n Succeeded\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 5\r\n \r\n \r\n Build\r\n Seats\r\n 60\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 15000\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n AdditionalMeterData\r\n PEFycmF5T2ZBcnJheU9mS2V5VmFsdWVQYWlyIHhtbG5zOmk9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxucz0iaHR0cDovL3NjaGVtYXMuZGF0YWNvbnRyYWN0Lm9yZy8yMDA0LzA3L01pY3Jvc29mdC5WaXN1YWxTdHVkaW8uU2VydmljZXMuQ29tbWVyY2UiPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkFkdmFuY2VkTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDA8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5Jc1BhaWRCaWxsaW5nRW5hYmxlZDwvS2V5PjxWYWx1ZT5UcnVlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PEFycmF5T2ZLZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk5hbWU8L0tleT48VmFsdWU+UHJvZmVzc2lvbmFsTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPlRydWU8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5TdGFuZGFyZExpY2Vuc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5NYXhpbXVtUXVhbnRpdHk8L0tleT48VmFsdWU+MTA1PC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+VHJ1ZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PC9BcnJheU9mS2V5VmFsdWVQYWlyPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkJ1aWxkPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TWF4aW11bVF1YW50aXR5PC9LZXk+PFZhbHVlPjUwMDAwPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+RmFsc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5Mb2FkVGVzdDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDAwMDAwMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPkZhbHNlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PC9BcnJheU9mQXJyYXlPZktleVZhbHVlUGFpcj4=\r\n \r\n \r\n AccountURL\r\n https://compt40.billing-current.tfsallin.net/\r\n \r\n \r\n DisplayName\r\n compt40\r\n \r\n \r\n IdentityDomain\r\n Windows Live ID\r\n \r\n \r\n TfsRegion\r\n North Central US\r\n \r\n \r\n \r\n \r\n \r\n \r\n Update\r\n Failed\r\n \r\n 403\r\n <WrappedException xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" z:Id=\"i1\" xmlns:z=\"http://schemas.microsoft.com/2003/10/Serialization/\" xmlns=\"http://schemas.datacontract.org/2004/07/Microsoft.VisualStudio.Services.WebApi\"><ErrorCode>0</ErrorCode><EventId>3000</EventId><InnerException i:nil=\"true\" /><Message>User \"admin@aad140.ccsctp.net\" is not the account owner of \"\".</Message><TypeKey>UserIsNotAccountOwnerException</TypeKey><TypeName>Microsoft.VisualStudio.Services.Commerce.UserIsNotAccountOwnerException, Microsoft.VisualStudio.Services.Commerce, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</TypeName></WrappedException>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-createacc002-Group\r\n \r\n VS-createacc002-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-createTFS1-Group\r\n \r\n VS-createTFS1-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-createtfs2-Group\r\n \r\n VS-createtfs2-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-dbupgradetfs202-Group\r\n \r\n VS-dbupgradetfs202-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-dtestacc1-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-finalenable-Group\r\n \r\n VS-finalenable-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-finaltfacc01-Group\r\n \r\n VS-finaltfacc01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-finalupdate-Group\r\n \r\n VS-finalupdate-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-finalupdate401-Group\r\n \r\n VS-finalupdate401-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-finalUpdate401Changed-Group\r\n \r\n VS-finalUpdate401Changed-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-finalupdatetfs402-Group\r\n \r\n VS-finalupdatetfs402-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-fresh-Group\r\n \r\n VS-fresh-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-freshsoftdelete-Group\r\n \r\n VS-freshsoftdelete-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-gfsfg-Group\r\n \r\n VS-gfsfg-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-ghhd-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n visualstudio\r\n account\r\n ghhd\r\n None\r\n 1.0\r\n d4a68495-4de3-46ba-9084-a7fa951ac29e\r\n Started\r\n Succeeded\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 5\r\n \r\n \r\n Build\r\n Seats\r\n 60\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 15000\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n AdditionalMeterData\r\n PEFycmF5T2ZBcnJheU9mS2V5VmFsdWVQYWlyIHhtbG5zOmk9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxucz0iaHR0cDovL3NjaGVtYXMuZGF0YWNvbnRyYWN0Lm9yZy8yMDA0LzA3L01pY3Jvc29mdC5WaXN1YWxTdHVkaW8uU2VydmljZXMuQ29tbWVyY2UiPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkFkdmFuY2VkTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDA8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5Jc1BhaWRCaWxsaW5nRW5hYmxlZDwvS2V5PjxWYWx1ZT5UcnVlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PEFycmF5T2ZLZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk5hbWU8L0tleT48VmFsdWU+UHJvZmVzc2lvbmFsTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPlRydWU8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5TdGFuZGFyZExpY2Vuc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5NYXhpbXVtUXVhbnRpdHk8L0tleT48VmFsdWU+MTA1PC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+VHJ1ZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PC9BcnJheU9mS2V5VmFsdWVQYWlyPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkJ1aWxkPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TWF4aW11bVF1YW50aXR5PC9LZXk+PFZhbHVlPjUwMDAwPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+RmFsc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5Mb2FkVGVzdDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDAwMDAwMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPkZhbHNlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PC9BcnJheU9mQXJyYXlPZktleVZhbHVlUGFpcj4=\r\n \r\n \r\n AccountURL\r\n https://ghhd.billing-current.tfsallin.net/\r\n \r\n \r\n DisplayName\r\n ghhd\r\n \r\n \r\n IdentityDomain\r\n de86f3e7-1fe3-414c-812a-817ab249ad9b\r\n \r\n \r\n TfsRegion\r\n North Central US\r\n \r\n \r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-ghjfdjdf-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-glkdhghjgk-Group\r\n \r\n VS-glkdhghjgk-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-hh-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ia1-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ia2-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ibizaa1-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ibizaa2-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ibizaacc01-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ibizacc01-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ijkljkl-Group\r\n \r\n VS-ijkljkl-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-klgfuiadlfu-Group\r\n \r\n VS-klgfuiadlfu-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-newsignout-Group\r\n \r\n VS-newsignout-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-quickcheck-Group\r\n \r\n VS-quickcheck-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-qwerty-Group\r\n \r\n VS-qwerty-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-r717auxacc2-Group\r\n \r\n VS-r717auxacc2-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-rdfrrrrrrrrrrrrr-Group\r\n \r\n VS-rdfrrrrrrrrrrrrr-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-RGless-Group\r\n \r\n VS-RGless-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity-Group\r\n \r\n VS-sanity-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity101-Group\r\n \r\n VS-sanity101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity102-Group\r\n \r\n VS-sanity102-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity103-Group\r\n \r\n VS-sanity103-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity103ibiza-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity104-Group\r\n \r\n VS-sanity104-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity201-Group\r\n \r\n VS-sanity201-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity202-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity301-Group\r\n \r\n VS-sanity301-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity40-Group\r\n \r\n VS-sanity40-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity401-Group\r\n \r\n VS-sanity401-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity402-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity403-Group\r\n \r\n VS-sanity403-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity601-Group\r\n \r\n VS-sanity601-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity603-Group\r\n \r\n VS-sanity603-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity604-Group\r\n \r\n VS-sanity604-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity605-Group\r\n \r\n VS-sanity605-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity701-Group\r\n \r\n VS-sanity701-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity702-Group\r\n \r\n VS-sanity702-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity706-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-sanityclean101-Group\r\n \r\n VS-sanityclean101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanityclean101r-Group\r\n \r\n VS-sanityclean101r-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanityclean102-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-sanityclean103-Group\r\n \r\n VS-sanityclean103-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanityr-Group\r\n \r\n VS-sanityr-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdelete-Group\r\n \r\n VS-softdelete-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdelete401-Group\r\n \r\n VS-softdelete401-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdelete402-Group\r\n \r\n VS-softdelete402-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdelete403-Group\r\n \r\n VS-softdelete403-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdelete405-Group\r\n \r\n VS-softdelete405-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdelete405changed-Group\r\n \r\n VS-softdelete405changed-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdeleteacc01-Group\r\n \r\n VS-softdeleteacc01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-spsdbupgrade201-Group\r\n \r\n VS-spsdbupgrade201-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-spsupgrade101-Group\r\n \r\n VS-spsupgrade101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-spsupgradenone-Group\r\n \r\n VS-spsupgradenone-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-spsupgradetesting101-Group\r\n \r\n VS-spsupgradetesting101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-spsupgradetfs102-Group\r\n \r\n VS-spsupgradetfs102-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-test123-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-testacc6191-Group\r\n \r\n VS-testacc6191-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testaccaux01-Group\r\n \r\n VS-testaccaux01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testaccaux02-Group\r\n \r\n VS-testaccaux02-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testaccc-Group\r\n \r\n VS-testaccc-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testaccibiza01-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-testing-Group\r\n \r\n VS-testing-Group in North Central US\r\n North Central US\r\n \r\n \r\n visualstudio\r\n account\r\n testing\r\n None\r\n 1.0\r\n 477546e4-2b3f-4a9e-ba9d-1c818a58fa3c\r\n Started\r\n Succeeded\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 5\r\n \r\n \r\n Build\r\n Seats\r\n 60\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 15000\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n AdditionalMeterData\r\n PEFycmF5T2ZBcnJheU9mS2V5VmFsdWVQYWlyIHhtbG5zOmk9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxucz0iaHR0cDovL3NjaGVtYXMuZGF0YWNvbnRyYWN0Lm9yZy8yMDA0LzA3L01pY3Jvc29mdC5WaXN1YWxTdHVkaW8uU2VydmljZXMuQ29tbWVyY2UiPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkFkdmFuY2VkTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDA8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5Jc1BhaWRCaWxsaW5nRW5hYmxlZDwvS2V5PjxWYWx1ZT5UcnVlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PEFycmF5T2ZLZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk5hbWU8L0tleT48VmFsdWU+UHJvZmVzc2lvbmFsTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPlRydWU8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5TdGFuZGFyZExpY2Vuc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5NYXhpbXVtUXVhbnRpdHk8L0tleT48VmFsdWU+MTA1PC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+VHJ1ZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PC9BcnJheU9mS2V5VmFsdWVQYWlyPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkJ1aWxkPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TWF4aW11bVF1YW50aXR5PC9LZXk+PFZhbHVlPjUwMDAwPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+RmFsc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5Mb2FkVGVzdDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDAwMDAwMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPkZhbHNlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PC9BcnJheU9mQXJyYXlPZktleVZhbHVlUGFpcj4=\r\n \r\n \r\n AccountURL\r\n https://testing.billing-current.tfsallin.net/\r\n \r\n \r\n DisplayName\r\n testing\r\n \r\n \r\n IdentityDomain\r\n de86f3e7-1fe3-414c-812a-817ab249ad9b\r\n \r\n \r\n TfsRegion\r\n North Central US\r\n \r\n \r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-testing01-Group\r\n \r\n VS-testing01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing102-Group\r\n \r\n VS-testing102-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing3-Group\r\n \r\n VS-testing3-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing401-Group\r\n \r\n VS-testing401-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing402-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-testing701-Group\r\n \r\n VS-testing701-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing702-Group\r\n \r\n VS-testing702-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing704-Group\r\n \r\n VS-testing704-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing705-Group\r\n \r\n VS-testing705-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing901-Group\r\n \r\n VS-testing901-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing902-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-testing905-Group\r\n \r\n VS-testing905-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingaadbacked901-Group\r\n \r\n VS-testingaadbacked901-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingaux-Group\r\n \r\n VS-testingaux-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingaux101-Group\r\n \r\n VS-testingaux101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingaux102-Group\r\n \r\n VS-testingaux102-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingmbsabacked-Group\r\n \r\n VS-testingmbsabacked-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingss-Group\r\n \r\n VS-testingss-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingtfs101-Group\r\n \r\n VS-testingtfs101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingtfs2-Group\r\n \r\n VS-testingtfs2-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testting-Group\r\n \r\n VS-testting-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testtingtfs-Group\r\n \r\n VS-testtingtfs-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-TFS918-Group\r\n \r\n VS-TFS918-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-TFS918WEU-Group\r\n \r\n VS-TFS918WEU-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tfsacc301-Group\r\n \r\n VS-tfsacc301-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tfsaccount-Group\r\n \r\n VS-tfsaccount-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tfsaccount01-Group\r\n \r\n VS-tfsaccount01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tfsconp101-Group\r\n \r\n VS-tfsconp101-Group in North Central US\r\n North Central US\r\n \r\n \r\n visualstudio\r\n account\r\n tfsconp101\r\n None\r\n 1.0\r\n 3bd7ff2f-c8b1-4e7a-b07c-fedf55bd03eb\r\n Started\r\n Succeeded\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 5\r\n \r\n \r\n Build\r\n Seats\r\n 60\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 15000\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n AdditionalMeterData\r\n PEFycmF5T2ZBcnJheU9mS2V5VmFsdWVQYWlyIHhtbG5zOmk9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxucz0iaHR0cDovL3NjaGVtYXMuZGF0YWNvbnRyYWN0Lm9yZy8yMDA0LzA3L01pY3Jvc29mdC5WaXN1YWxTdHVkaW8uU2VydmljZXMuQ29tbWVyY2UiPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkFkdmFuY2VkTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDA8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5Jc1BhaWRCaWxsaW5nRW5hYmxlZDwvS2V5PjxWYWx1ZT5UcnVlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PEFycmF5T2ZLZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk5hbWU8L0tleT48VmFsdWU+UHJvZmVzc2lvbmFsTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPlRydWU8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5TdGFuZGFyZExpY2Vuc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5NYXhpbXVtUXVhbnRpdHk8L0tleT48VmFsdWU+MTA1PC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+VHJ1ZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PC9BcnJheU9mS2V5VmFsdWVQYWlyPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkJ1aWxkPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TWF4aW11bVF1YW50aXR5PC9LZXk+PFZhbHVlPjUwMDAwPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+RmFsc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5Mb2FkVGVzdDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDAwMDAwMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPkZhbHNlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PC9BcnJheU9mQXJyYXlPZktleVZhbHVlUGFpcj4=\r\n \r\n \r\n AccountURL\r\n https://tfsconp101.billing-current.tfsallin.net/\r\n \r\n \r\n DisplayName\r\n tfsconp101\r\n \r\n \r\n IdentityDomain\r\n de86f3e7-1fe3-414c-812a-817ab249ad9b\r\n \r\n \r\n TfsRegion\r\n North Central US\r\n \r\n \r\n \r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-TFSNCUS918-Group\r\n \r\n VS-TFSNCUS918-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tfsupdate301-Group\r\n \r\n VS-tfsupdate301-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tfsupdatetfsacc302-Group\r\n \r\n VS-tfsupdatetfsacc302-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-today-Group\r\n \r\n VS-today-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-todaysaux01-Group\r\n \r\n VS-todaysaux01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-todaysauxtest101-Group\r\n \r\n VS-todaysauxtest101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-todaysibiza01-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-trialacc-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-trialaccount-Group\r\n \r\n VS-trialaccount-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-trialaccount102-Group\r\n \r\n VS-trialaccount102-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-trrykweoykweoykweo-Group\r\n \r\n VS-trrykweoykweoykweo-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tuejulyauxacc01-Group\r\n \r\n VS-tuejulyauxacc01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tuejulyibiza01acc-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-westeuropeacc-Group\r\n \r\n VS-westeuropeacc-Group in North Central US\r\n North Central US\r\n \r\n \r\n", + "ResponseHeaders": { + "Content-Length": [ + "54717" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-request-id": [ + "f38c811009d98b30897f576adfe177c2" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 10 Oct 2014 06:16:27 GMT" + ], + "Server": [ + "1.0.6198.130", + "(rd_rdfe_stable.140925-2236)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/947a55d7-75e9-4a36-b156-305c6270f018/cloudservices?api-version=2014-10-27", + "EncodedRequestUri": "Lzk0N2E1NWQ3LTc1ZTktNGEzNi1iMTU2LTMwNWM2MjcwZjAxOC9jbG91ZHNlcnZpY2VzP2FwaS12ZXJzaW9uPTIwMTQtMTAtMjc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/xml" + ], + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.RecoveryServices.RecoveryServicesManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "\r\n \r\n cdsBKSIPEKSKUOD6BRA3PZOPIOUSEB6PBLUPHIK7Z3U7OVNBDOA257Q-North-Central-US\r\n \r\n cdsBKSIPEKSKUOD6BRA3PZOPIOUSEB6PBLUPHIK7Z3U7OVNBDOA257Q-North-Central-US in North Central US\r\n North Central US\r\n \r\n \r\n \r\n RecoveryServices-BKSIPEKSKUOD6BRA3PZOPIOUSEB6PBLUPHIK7Z3U7OVNBDOA257Q-west-us\r\n \r\n a510ea8f-1b1e-465b-927e-2caf10786579\r\n west us\r\n \r\n \r\n WAHyperVRecoveryManager\r\n HyperVRecoveryManagerVault\r\n rijethma-vault\r\n \r\n 1.1\r\n 25e8dd1c-44c6-49f1-aa50-aac068c55b96\r\n Started\r\n Ok\r\n \r\n \r\n StampId\r\n abeb635b-e186-4605-b464-c7c9e55b226a\r\n \r\n \r\n ResourceId\r\n 8856597376086032764\r\n \r\n \r\n BackendStampId\r\n 75d5c811-a801-4332-8f96-43640cad60e9\r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n VS-aaddisable-Group\r\n \r\n VS-aaddisable-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-ac1-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-acc-Group\r\n \r\n VS-acc-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-acc1-Group\r\n \r\n VS-acc1-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-compact-Group\r\n \r\n Resource group based cloud service.\r\n East US\r\n \r\n \r\n visualstudio\r\n account\r\n compact\r\n None\r\n 1.0\r\n 24b0ccad-e127-4389-a56c-a3e5d510ee0c\r\n Started\r\n Succeeded\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 5\r\n \r\n \r\n Build\r\n Seats\r\n 60\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 15000\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n AdditionalMeterData\r\n PEFycmF5T2ZBcnJheU9mS2V5VmFsdWVQYWlyIHhtbG5zOmk9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxucz0iaHR0cDovL3NjaGVtYXMuZGF0YWNvbnRyYWN0Lm9yZy8yMDA0LzA3L01pY3Jvc29mdC5WaXN1YWxTdHVkaW8uU2VydmljZXMuQ29tbWVyY2UiPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkFkdmFuY2VkTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDA8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5Jc1BhaWRCaWxsaW5nRW5hYmxlZDwvS2V5PjxWYWx1ZT5UcnVlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PEFycmF5T2ZLZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk5hbWU8L0tleT48VmFsdWU+UHJvZmVzc2lvbmFsTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPlRydWU8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5TdGFuZGFyZExpY2Vuc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5NYXhpbXVtUXVhbnRpdHk8L0tleT48VmFsdWU+MTA1PC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+VHJ1ZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PC9BcnJheU9mS2V5VmFsdWVQYWlyPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkJ1aWxkPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TWF4aW11bVF1YW50aXR5PC9LZXk+PFZhbHVlPjUwMDAwPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+RmFsc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5Mb2FkVGVzdDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDAwMDAwMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPkZhbHNlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PC9BcnJheU9mQXJyYXlPZktleVZhbHVlUGFpcj4=\r\n \r\n \r\n AccountURL\r\n https://compact.billing-current.tfsallin.net/\r\n \r\n \r\n DisplayName\r\n compact\r\n \r\n \r\n IdentityDomain\r\n de86f3e7-1fe3-414c-812a-817ab249ad9b\r\n \r\n \r\n TfsRegion\r\n North Central US\r\n \r\n \r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-compat-Group\r\n \r\n VS-compat-Group in North Central US\r\n North Central US\r\n \r\n \r\n visualstudio\r\n account\r\n compat\r\n None\r\n 1.0\r\n 5c087e25-f539-43d6-bf9f-768797f6287c\r\n Started\r\n Succeeded\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 5\r\n \r\n \r\n Build\r\n Seats\r\n 60\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 15000\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n AdditionalMeterData\r\n PEFycmF5T2ZBcnJheU9mS2V5VmFsdWVQYWlyIHhtbG5zOmk9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxucz0iaHR0cDovL3NjaGVtYXMuZGF0YWNvbnRyYWN0Lm9yZy8yMDA0LzA3L01pY3Jvc29mdC5WaXN1YWxTdHVkaW8uU2VydmljZXMuQ29tbWVyY2UiPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkFkdmFuY2VkTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDA8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5Jc1BhaWRCaWxsaW5nRW5hYmxlZDwvS2V5PjxWYWx1ZT5UcnVlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PEFycmF5T2ZLZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk5hbWU8L0tleT48VmFsdWU+UHJvZmVzc2lvbmFsTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPlRydWU8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5TdGFuZGFyZExpY2Vuc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5NYXhpbXVtUXVhbnRpdHk8L0tleT48VmFsdWU+MTA1PC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+VHJ1ZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PC9BcnJheU9mS2V5VmFsdWVQYWlyPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkJ1aWxkPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TWF4aW11bVF1YW50aXR5PC9LZXk+PFZhbHVlPjUwMDAwPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+RmFsc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5Mb2FkVGVzdDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDAwMDAwMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPkZhbHNlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PC9BcnJheU9mQXJyYXlPZktleVZhbHVlUGFpcj4=\r\n \r\n \r\n AccountURL\r\n https://compat.billing-current.tfsallin.net/\r\n \r\n \r\n DisplayName\r\n compat\r\n \r\n \r\n IdentityDomain\r\n de86f3e7-1fe3-414c-812a-817ab249ad9b\r\n \r\n \r\n TfsRegion\r\n North Central US\r\n \r\n \r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-compat101-Group\r\n \r\n VS-compat101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-compat102-Group\r\n \r\n VS-compat102-Group in West US\r\n West US\r\n \r\n \r\n visualstudio\r\n account\r\n compat102\r\n None\r\n 1.0\r\n 4c907789-db73-4d38-8c81-1cdb093da81b\r\n Started\r\n Failed\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n Build\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-compat201-Group\r\n \r\n VS-compat201-Group in North Central US\r\n North Central US\r\n \r\n \r\n visualstudio\r\n account\r\n compat201\r\n None\r\n 1.0\r\n c35a685d-f549-4ca3-acd6-7c758b644e4f\r\n Started\r\n Failed\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n Build\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 5\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-compat301-Group\r\n \r\n VS-compat301-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-compt40-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n visualstudio\r\n account\r\n compt40\r\n None\r\n 1.0\r\n ba986567-5a53-4baf-9e9c-7b7ade784b5c\r\n Started\r\n Succeeded\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 5\r\n \r\n \r\n Build\r\n Seats\r\n 60\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 15000\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n AdditionalMeterData\r\n PEFycmF5T2ZBcnJheU9mS2V5VmFsdWVQYWlyIHhtbG5zOmk9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxucz0iaHR0cDovL3NjaGVtYXMuZGF0YWNvbnRyYWN0Lm9yZy8yMDA0LzA3L01pY3Jvc29mdC5WaXN1YWxTdHVkaW8uU2VydmljZXMuQ29tbWVyY2UiPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkFkdmFuY2VkTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDA8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5Jc1BhaWRCaWxsaW5nRW5hYmxlZDwvS2V5PjxWYWx1ZT5UcnVlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PEFycmF5T2ZLZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk5hbWU8L0tleT48VmFsdWU+UHJvZmVzc2lvbmFsTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPlRydWU8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5TdGFuZGFyZExpY2Vuc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5NYXhpbXVtUXVhbnRpdHk8L0tleT48VmFsdWU+MTA1PC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+VHJ1ZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PC9BcnJheU9mS2V5VmFsdWVQYWlyPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkJ1aWxkPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TWF4aW11bVF1YW50aXR5PC9LZXk+PFZhbHVlPjUwMDAwPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+RmFsc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5Mb2FkVGVzdDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDAwMDAwMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPkZhbHNlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PC9BcnJheU9mQXJyYXlPZktleVZhbHVlUGFpcj4=\r\n \r\n \r\n AccountURL\r\n https://compt40.billing-current.tfsallin.net/\r\n \r\n \r\n DisplayName\r\n compt40\r\n \r\n \r\n IdentityDomain\r\n Windows Live ID\r\n \r\n \r\n TfsRegion\r\n North Central US\r\n \r\n \r\n \r\n \r\n \r\n \r\n Update\r\n Failed\r\n \r\n 403\r\n <WrappedException xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" z:Id=\"i1\" xmlns:z=\"http://schemas.microsoft.com/2003/10/Serialization/\" xmlns=\"http://schemas.datacontract.org/2004/07/Microsoft.VisualStudio.Services.WebApi\"><ErrorCode>0</ErrorCode><EventId>3000</EventId><InnerException i:nil=\"true\" /><Message>User \"admin@aad140.ccsctp.net\" is not the account owner of \"\".</Message><TypeKey>UserIsNotAccountOwnerException</TypeKey><TypeName>Microsoft.VisualStudio.Services.Commerce.UserIsNotAccountOwnerException, Microsoft.VisualStudio.Services.Commerce, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</TypeName></WrappedException>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-createacc002-Group\r\n \r\n VS-createacc002-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-createTFS1-Group\r\n \r\n VS-createTFS1-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-createtfs2-Group\r\n \r\n VS-createtfs2-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-dbupgradetfs202-Group\r\n \r\n VS-dbupgradetfs202-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-dtestacc1-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-finalenable-Group\r\n \r\n VS-finalenable-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-finaltfacc01-Group\r\n \r\n VS-finaltfacc01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-finalupdate-Group\r\n \r\n VS-finalupdate-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-finalupdate401-Group\r\n \r\n VS-finalupdate401-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-finalUpdate401Changed-Group\r\n \r\n VS-finalUpdate401Changed-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-finalupdatetfs402-Group\r\n \r\n VS-finalupdatetfs402-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-fresh-Group\r\n \r\n VS-fresh-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-freshsoftdelete-Group\r\n \r\n VS-freshsoftdelete-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-gfsfg-Group\r\n \r\n VS-gfsfg-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-ghhd-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n visualstudio\r\n account\r\n ghhd\r\n None\r\n 1.0\r\n d4a68495-4de3-46ba-9084-a7fa951ac29e\r\n Started\r\n Succeeded\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 5\r\n \r\n \r\n Build\r\n Seats\r\n 60\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 15000\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n AdditionalMeterData\r\n PEFycmF5T2ZBcnJheU9mS2V5VmFsdWVQYWlyIHhtbG5zOmk9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxucz0iaHR0cDovL3NjaGVtYXMuZGF0YWNvbnRyYWN0Lm9yZy8yMDA0LzA3L01pY3Jvc29mdC5WaXN1YWxTdHVkaW8uU2VydmljZXMuQ29tbWVyY2UiPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkFkdmFuY2VkTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDA8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5Jc1BhaWRCaWxsaW5nRW5hYmxlZDwvS2V5PjxWYWx1ZT5UcnVlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PEFycmF5T2ZLZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk5hbWU8L0tleT48VmFsdWU+UHJvZmVzc2lvbmFsTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPlRydWU8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5TdGFuZGFyZExpY2Vuc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5NYXhpbXVtUXVhbnRpdHk8L0tleT48VmFsdWU+MTA1PC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+VHJ1ZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PC9BcnJheU9mS2V5VmFsdWVQYWlyPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkJ1aWxkPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TWF4aW11bVF1YW50aXR5PC9LZXk+PFZhbHVlPjUwMDAwPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+RmFsc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5Mb2FkVGVzdDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDAwMDAwMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPkZhbHNlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PC9BcnJheU9mQXJyYXlPZktleVZhbHVlUGFpcj4=\r\n \r\n \r\n AccountURL\r\n https://ghhd.billing-current.tfsallin.net/\r\n \r\n \r\n DisplayName\r\n ghhd\r\n \r\n \r\n IdentityDomain\r\n de86f3e7-1fe3-414c-812a-817ab249ad9b\r\n \r\n \r\n TfsRegion\r\n North Central US\r\n \r\n \r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-ghjfdjdf-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-glkdhghjgk-Group\r\n \r\n VS-glkdhghjgk-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-hh-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ia1-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ia2-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ibizaa1-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ibizaa2-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ibizaacc01-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ibizacc01-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-ijkljkl-Group\r\n \r\n VS-ijkljkl-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-klgfuiadlfu-Group\r\n \r\n VS-klgfuiadlfu-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-newsignout-Group\r\n \r\n VS-newsignout-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-quickcheck-Group\r\n \r\n VS-quickcheck-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-qwerty-Group\r\n \r\n VS-qwerty-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-r717auxacc2-Group\r\n \r\n VS-r717auxacc2-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-rdfrrrrrrrrrrrrr-Group\r\n \r\n VS-rdfrrrrrrrrrrrrr-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-RGless-Group\r\n \r\n VS-RGless-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity-Group\r\n \r\n VS-sanity-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity101-Group\r\n \r\n VS-sanity101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity102-Group\r\n \r\n VS-sanity102-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity103-Group\r\n \r\n VS-sanity103-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity103ibiza-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity104-Group\r\n \r\n VS-sanity104-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity201-Group\r\n \r\n VS-sanity201-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity202-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity301-Group\r\n \r\n VS-sanity301-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity40-Group\r\n \r\n VS-sanity40-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity401-Group\r\n \r\n VS-sanity401-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity402-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity403-Group\r\n \r\n VS-sanity403-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity601-Group\r\n \r\n VS-sanity601-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity603-Group\r\n \r\n VS-sanity603-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity604-Group\r\n \r\n VS-sanity604-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity605-Group\r\n \r\n VS-sanity605-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity701-Group\r\n \r\n VS-sanity701-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity702-Group\r\n \r\n VS-sanity702-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanity706-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-sanityclean101-Group\r\n \r\n VS-sanityclean101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanityclean101r-Group\r\n \r\n VS-sanityclean101r-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanityclean102-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-sanityclean103-Group\r\n \r\n VS-sanityclean103-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-sanityr-Group\r\n \r\n VS-sanityr-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdelete-Group\r\n \r\n VS-softdelete-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdelete401-Group\r\n \r\n VS-softdelete401-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdelete402-Group\r\n \r\n VS-softdelete402-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdelete403-Group\r\n \r\n VS-softdelete403-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdelete405-Group\r\n \r\n VS-softdelete405-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdelete405changed-Group\r\n \r\n VS-softdelete405changed-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-softdeleteacc01-Group\r\n \r\n VS-softdeleteacc01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-spsdbupgrade201-Group\r\n \r\n VS-spsdbupgrade201-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-spsupgrade101-Group\r\n \r\n VS-spsupgrade101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-spsupgradenone-Group\r\n \r\n VS-spsupgradenone-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-spsupgradetesting101-Group\r\n \r\n VS-spsupgradetesting101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-spsupgradetfs102-Group\r\n \r\n VS-spsupgradetfs102-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-test123-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-testacc6191-Group\r\n \r\n VS-testacc6191-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testaccaux01-Group\r\n \r\n VS-testaccaux01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testaccaux02-Group\r\n \r\n VS-testaccaux02-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testaccc-Group\r\n \r\n VS-testaccc-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testaccibiza01-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-testing-Group\r\n \r\n VS-testing-Group in North Central US\r\n North Central US\r\n \r\n \r\n visualstudio\r\n account\r\n testing\r\n None\r\n 1.0\r\n 477546e4-2b3f-4a9e-ba9d-1c818a58fa3c\r\n Started\r\n Succeeded\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 5\r\n \r\n \r\n Build\r\n Seats\r\n 60\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 15000\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n AdditionalMeterData\r\n PEFycmF5T2ZBcnJheU9mS2V5VmFsdWVQYWlyIHhtbG5zOmk9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxucz0iaHR0cDovL3NjaGVtYXMuZGF0YWNvbnRyYWN0Lm9yZy8yMDA0LzA3L01pY3Jvc29mdC5WaXN1YWxTdHVkaW8uU2VydmljZXMuQ29tbWVyY2UiPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkFkdmFuY2VkTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDA8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5Jc1BhaWRCaWxsaW5nRW5hYmxlZDwvS2V5PjxWYWx1ZT5UcnVlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PEFycmF5T2ZLZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk5hbWU8L0tleT48VmFsdWU+UHJvZmVzc2lvbmFsTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPlRydWU8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5TdGFuZGFyZExpY2Vuc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5NYXhpbXVtUXVhbnRpdHk8L0tleT48VmFsdWU+MTA1PC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+VHJ1ZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PC9BcnJheU9mS2V5VmFsdWVQYWlyPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkJ1aWxkPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TWF4aW11bVF1YW50aXR5PC9LZXk+PFZhbHVlPjUwMDAwPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+RmFsc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5Mb2FkVGVzdDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDAwMDAwMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPkZhbHNlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PC9BcnJheU9mQXJyYXlPZktleVZhbHVlUGFpcj4=\r\n \r\n \r\n AccountURL\r\n https://testing.billing-current.tfsallin.net/\r\n \r\n \r\n DisplayName\r\n testing\r\n \r\n \r\n IdentityDomain\r\n de86f3e7-1fe3-414c-812a-817ab249ad9b\r\n \r\n \r\n TfsRegion\r\n North Central US\r\n \r\n \r\n \r\n \r\n \r\n \r\n Create\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-testing01-Group\r\n \r\n VS-testing01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing102-Group\r\n \r\n VS-testing102-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing3-Group\r\n \r\n VS-testing3-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing401-Group\r\n \r\n VS-testing401-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing402-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-testing701-Group\r\n \r\n VS-testing701-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing702-Group\r\n \r\n VS-testing702-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing704-Group\r\n \r\n VS-testing704-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing705-Group\r\n \r\n VS-testing705-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing901-Group\r\n \r\n VS-testing901-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testing902-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-testing905-Group\r\n \r\n VS-testing905-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingaadbacked901-Group\r\n \r\n VS-testingaadbacked901-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingaux-Group\r\n \r\n VS-testingaux-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingaux101-Group\r\n \r\n VS-testingaux101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingaux102-Group\r\n \r\n VS-testingaux102-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingmbsabacked-Group\r\n \r\n VS-testingmbsabacked-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingss-Group\r\n \r\n VS-testingss-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingtfs101-Group\r\n \r\n VS-testingtfs101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testingtfs2-Group\r\n \r\n VS-testingtfs2-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testting-Group\r\n \r\n VS-testting-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-testtingtfs-Group\r\n \r\n VS-testtingtfs-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-TFS918-Group\r\n \r\n VS-TFS918-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-TFS918WEU-Group\r\n \r\n VS-TFS918WEU-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tfsacc301-Group\r\n \r\n VS-tfsacc301-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tfsaccount-Group\r\n \r\n VS-tfsaccount-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tfsaccount01-Group\r\n \r\n VS-tfsaccount01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tfsconp101-Group\r\n \r\n VS-tfsconp101-Group in North Central US\r\n North Central US\r\n \r\n \r\n visualstudio\r\n account\r\n tfsconp101\r\n None\r\n 1.0\r\n 3bd7ff2f-c8b1-4e7a-b07c-fedf55bd03eb\r\n Started\r\n Succeeded\r\n \r\n \r\n AdvancedLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n ProfessionalLicense\r\n Seats\r\n 0\r\n 0\r\n \r\n \r\n StandardLicense\r\n Seats\r\n 5\r\n 5\r\n \r\n \r\n Build\r\n Seats\r\n 60\r\n 0\r\n \r\n \r\n LoadTest\r\n Seats\r\n 15000\r\n 0\r\n \r\n \r\n \r\n \r\n \r\n \r\n AdditionalMeterData\r\n PEFycmF5T2ZBcnJheU9mS2V5VmFsdWVQYWlyIHhtbG5zOmk9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxucz0iaHR0cDovL3NjaGVtYXMuZGF0YWNvbnRyYWN0Lm9yZy8yMDA0LzA3L01pY3Jvc29mdC5WaXN1YWxTdHVkaW8uU2VydmljZXMuQ29tbWVyY2UiPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkFkdmFuY2VkTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDA8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5Jc1BhaWRCaWxsaW5nRW5hYmxlZDwvS2V5PjxWYWx1ZT5UcnVlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PEFycmF5T2ZLZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk5hbWU8L0tleT48VmFsdWU+UHJvZmVzc2lvbmFsTGljZW5zZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPlRydWU8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5TdGFuZGFyZExpY2Vuc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5NYXhpbXVtUXVhbnRpdHk8L0tleT48VmFsdWU+MTA1PC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+VHJ1ZTwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PC9BcnJheU9mS2V5VmFsdWVQYWlyPjxBcnJheU9mS2V5VmFsdWVQYWlyPjxLZXlWYWx1ZVBhaXI+PEtleT5OYW1lPC9LZXk+PFZhbHVlPkJ1aWxkPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TWF4aW11bVF1YW50aXR5PC9LZXk+PFZhbHVlPjUwMDAwPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+SXNQYWlkQmlsbGluZ0VuYWJsZWQ8L0tleT48VmFsdWU+RmFsc2U8L1ZhbHVlPjwvS2V5VmFsdWVQYWlyPjwvQXJyYXlPZktleVZhbHVlUGFpcj48QXJyYXlPZktleVZhbHVlUGFpcj48S2V5VmFsdWVQYWlyPjxLZXk+TmFtZTwvS2V5PjxWYWx1ZT5Mb2FkVGVzdDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5Pk1heGltdW1RdWFudGl0eTwvS2V5PjxWYWx1ZT4xMDAwMDAwMDwvVmFsdWU+PC9LZXlWYWx1ZVBhaXI+PEtleVZhbHVlUGFpcj48S2V5PklzUGFpZEJpbGxpbmdFbmFibGVkPC9LZXk+PFZhbHVlPkZhbHNlPC9WYWx1ZT48L0tleVZhbHVlUGFpcj48L0FycmF5T2ZLZXlWYWx1ZVBhaXI+PC9BcnJheU9mQXJyYXlPZktleVZhbHVlUGFpcj4=\r\n \r\n \r\n AccountURL\r\n https://tfsconp101.billing-current.tfsallin.net/\r\n \r\n \r\n DisplayName\r\n tfsconp101\r\n \r\n \r\n IdentityDomain\r\n de86f3e7-1fe3-414c-812a-817ab249ad9b\r\n \r\n \r\n TfsRegion\r\n North Central US\r\n \r\n \r\n \r\n \r\n \r\n \r\n Update\r\n Succeeded\r\n \r\n \r\n \r\n \r\n \r\n \r\n VS-TFSNCUS918-Group\r\n \r\n VS-TFSNCUS918-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tfsupdate301-Group\r\n \r\n VS-tfsupdate301-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tfsupdatetfsacc302-Group\r\n \r\n VS-tfsupdatetfsacc302-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-today-Group\r\n \r\n VS-today-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-todaysaux01-Group\r\n \r\n VS-todaysaux01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-todaysauxtest101-Group\r\n \r\n VS-todaysauxtest101-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-todaysibiza01-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-trialacc-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-trialaccount-Group\r\n \r\n VS-trialaccount-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-trialaccount102-Group\r\n \r\n VS-trialaccount102-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-trrykweoykweoykweo-Group\r\n \r\n VS-trrykweoykweoykweo-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tuejulyauxacc01-Group\r\n \r\n VS-tuejulyauxacc01-Group in North Central US\r\n North Central US\r\n \r\n \r\n \r\n VS-tuejulyibiza01acc-Group\r\n \r\n Resource group based cloud service.\r\n North Central US\r\n \r\n \r\n \r\n VS-westeuropeacc-Group\r\n \r\n VS-westeuropeacc-Group in North Central US\r\n North Central US\r\n \r\n \r\n", + "ResponseHeaders": { + "Content-Length": [ + "54717" + ], + "Content-Type": [ + "application/xml; charset=utf-8" + ], + "x-ms-request-id": [ + "d914cd8c77aa87fc80b2657d8734b74f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 10 Oct 2014 06:16:30 GMT" + ], + "Server": [ + "1.0.6198.130", + "(rd_rdfe_stable.140925-2236)", + "Microsoft-HTTPAPI/2.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/947a55d7-75e9-4a36-b156-305c6270f018/cloudservices/RecoveryServices-BKSIPEKSKUOD6BRA3PZOPIOUSEB6PBLUPHIK7Z3U7OVNBDOA257Q-west-us/resources/WAHyperVRecoveryManager/~/HyperVRecoveryManagerVault/rijethma-vault/ProtectionContainers?api-version=2014-10-27", + "EncodedRequestUri": "Lzk0N2E1NWQ3LTc1ZTktNGEzNi1iMTU2LTMwNWM2MjcwZjAxOC9jbG91ZHNlcnZpY2VzL1JlY292ZXJ5U2VydmljZXMtQktTSVBFS1NLVU9ENkJSQTNQWk9QSU9VU0VCNlBCTFVQSElLN1ozVTdPVk5CRE9BMjU3US13ZXN0LXVzL3Jlc291cmNlcy9XQUh5cGVyVlJlY292ZXJ5TWFuYWdlci9+L0h5cGVyVlJlY292ZXJ5TWFuYWdlclZhdWx0L3JpamV0aG1hLXZhdWx0L1Byb3RlY3Rpb25Db250YWluZXJzP2FwaS12ZXJzaW9uPTIwMTQtMTAtMjc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept": [ + "application/xml" + ], + "x-ms-client-request-id": [ + "a8463361-aa69-496a-9cda-b15ff8f38914-2014-46-10 11:46:31Z-P" + ], + "x-ms-version": [ + "2013-03-01" + ], + "User-Agent": [ + "Microsoft.WindowsAzure.Management.SiteRecovery.SiteRecoveryManagementClient/0.9.0.0" + ] + }, + "ResponseBody": "\r\n \r\n 58dc1662-e746-4510-9e8e-a2e03e10b867_cf754905-fe70-4e68-9884-80c2643a6664\r\n rijethma-c2\r\n NotConfigured\r\n cf754905-fe70-4e68-9884-80c2643a6664\r\n _\r\n \r\n 58dc1662-e746-4510-9e8e-a2e03e10b867\r\n \r\n \r\n 58dc1662-e746-4510-9e8e-a2e03e10b867_dec364d8-d4a8-46f9-9607-586a3171d069\r\n rijethma-c1\r\n NotConfigured\r\n dec364d8-d4a8-46f9-9607-586a3171d069\r\n _\r\n \r\n 58dc1662-e746-4510-9e8e-a2e03e10b867\r\n \r\n", + "ResponseHeaders": { + "Content-Length": [ + "964" + ], + "Content-Type": [ + "application/xml" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=15724800; includeSubDomains,max-age=15724800; includeSubDomains" + ], + "x-ms-client-request-id": [ + "a8463361-aa69-496a-9cda-b15ff8f38914-2014-46-10 11:46:31Z-P" + ], + "x-ms-request-id": [ + "b929678c1b6586b985808eafb9a620ae" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 10 Oct 2014 06:16:35 GMT" + ], + "Server": [ + "1.0.6198.130", + "(rd_rdfe_stable.140925-2236)", + "Microsoft-HTTPAPI/2.0" + ], + "X-AspNet-Version": [ + "4.0.30319" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "947a55d7-75e9-4a36-b156-305c6270f018", + "UserId": "admin@aad140.ccsctp.net" + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/packages.config b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/packages.config new file mode 100644 index 000000000000..f9dddb37ebfd --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/packages.config @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Commands.RecoveryServices.csproj b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Commands.RecoveryServices.csproj new file mode 100644 index 000000000000..d3363b92a410 --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Commands.RecoveryServices.csproj @@ -0,0 +1,185 @@ + + + + + Debug + AnyCPU + {98B10548-DF97-4FB1-8D82-2A12945D4F21} + Library + Properties + Microsoft.Azure.Commands.RecoveryServices + Microsoft.Azure.Commands.RecoveryServices + v4.5 + 512 + + ..\..\..\ + true + + + true + full + false + ..\..\..\Package\Debug\ServiceManagement\Azure\RecoveryServices\ + DEBUG;TRACE + prompt + 4 + false + false + true + true + MinimumRecommendedRules.ruleset + + + ..\..\..\Package\Release\ServiceManagement\Azure\RecoveryServices + TRACE;SIGN + true + pdbonly + AnyCPU + prompt + MinimumRecommendedRules.ruleset + true + MSSharedLibKey.snk + true + false + + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + False + ..\..\..\packages\Microsoft.Azure.Management.RecoveryServices.0.1.1-preview\lib\net40\Microsoft.WindowsAzure.Management.SiteRecovery.dll + + + False + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + + + + + False + ..\..\..\..\..\..\..\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Management.Automation\v4.0_3.0.0.0__31bf3856ad364e35\System.Management.Automation.dll + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + + + + + + + + + + + + + True + True + Resources.resx + + + + + True + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + + + PreserveNewest + + + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/MSSharedLibKey.snk b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/MSSharedLibKey.snk differ diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Microsoft.Azure.Commands.RecoveryServices.dll-help.xml b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Microsoft.Azure.Commands.RecoveryServices.dll-help.xml new file mode 100644 index 000000000000..54169f03ff98 --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Microsoft.Azure.Commands.RecoveryServices.dll-help.xml @@ -0,0 +1,4706 @@ + + + + + + + + + Get-AzureSiteRecoveryServer + + + Get information about Azure Site Recovery Server for current Azure Site Recovery vault + + + + + Get + AzureSiteRecoveryServer + + + + Get information about Azure Site recovery server for current Azure Site Recovery vault + + + + + Get-AzureSiteRecoveryServer + + + Get-AzureSiteRecoveryServer + + Id + + Id of the Server + + string + + + + Get-AzureSiteRecoveryServer + + Name + + Name of the Server + + string + + + + + + + Id + + Id of the Server + + + string + + string + + + + + + Name + + Name of the Server + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + C:\PS> + + + Get-AzureSiteRecoveryServer + + ID : cd7dec80-1144-4531-9ab3-888b8ab39bee + Name : server1.contoso.com + LastHeartbeat : 9/23/2014 3:51:22 PM + ProviderVersion : 3.5.520.0 + ServerVersion : 3.2.7634.0 + + ID : f5e713fe-5b6d-4641-9690-6fe74c976b8e + Name : Server2.contoso.com + LastHeartbeat : 8/13/2014 2:28:58 PM + ProviderVersion : 3.5 + ServerVersion : 3.2.7510.0 + + + Description + ----------- + + + + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureSiteRecoveryRecoveryPlanFile + + + Get-AzureSiteRecoveryRecoveryPlanFile download the recovery plan in an XML format. This file can be updated and used to upload the updated Recovery Plan. + + + + + Get + AzureSiteRecoveryRecoveryPlanFile + + + + Get-AzureSiteRecoveryRecoveryPlanFile download the recovery plan in an XML format. This file can be updated and used to upload the updated Recovery Plan. A recovery plan gathers virtual machines in a group for the purposes of failover and recovery + + + + + Get-AzureSiteRecoveryRecoveryPlanFile + + Id + + Id of the recovery Plan + + string + + + Path + + Path to store the recovery plan xml file + + string + + + + Get-AzureSiteRecoveryRecoveryPlanFile + + RecoveryPlan + + Recovery Plan object + + ASRRecoveryPlan + + + Path + + Path to store the recovery plan xml file + + string + + + + + + + Id + + Id of the recovery Plan + + + string + + string + + + + + + Path + + Path to store the recovery plan xml file + + + string + + string + + + + + + RecoveryPlan + + Recovery Plan object + + + ASRRecoveryPlan + + ASRRecoveryPlan + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + C:\PS> + + + $Rp = Get-AzureSiteRecoveryRecoveryPlan; Get-AzureSiteRecoveryRecoveryPlanFile -RecoveryPlan $Rp -Path C:\Users\Contoso\Desktop\RP.xml + + + Description + ----------- + + + + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureSiteRecoveryVM + + + Get information about Virtual Machines managed in Azure Site Recovery + + + + + Get + AzureSiteRecoveryVM + + + + Get information about Virtual Machines managed in Azure site Recovery + + + + + Get-AzureSiteRecoveryVM + + ProtectionContainer + + Protection Container object + + ASRProtectionContainer + + + + Get-AzureSiteRecoveryVM + + Id + + Id of the Virtual Machine + + string + + + ProtectionContainer + + Protection Container object + + ASRProtectionContainer + + + + Get-AzureSiteRecoveryVM + + Name + + Name of the Virtual Machine + + string + + + ProtectionContainer + + Protection Container object + + ASRProtectionContainer + + + + Get-AzureSiteRecoveryVM + + ProtectionContianerId + + ID of the Protection Container + + string + + + + Get-AzureSiteRecoveryVM + + Id + + Id of the Virtual Machine + + string + + + ProtectionContianerId + + ID of the Protection Container + + string + + + + Get-AzureSiteRecoveryVM + + Name + + Name of the Virtual Machine + + string + + + ProtectionContianerId + + ID of the Protection Container + + string + + + + + + + Id + + Id of the Virtual Machine + + + string + + string + + + + + + Name + + Name of the Virtual Machine + + + string + + string + + + + + + ProtectionContainer + + Protection Container object + + + ASRProtectionContainer + + ASRProtectionContainer + + + + + + ProtectionContianerId + + ID of the Protection Container + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + C:\PS> + + + $protectionContainer = Get-AzureSiteRecoveryProtectionContainer; Get-AzureSiteRecoveryVM -ProtectionContainer $protectionContainer + + ID : a205fd17-3848-4896-bab6-9dbccc3cd8ed + ServerId : 4a94c4a9-c856-4577-afbd-367fe9b3ce9c + ProtectionContainerId : 4a94c4a9-c856-4577-afbd-367fe9b3ce9c_1c513d45-645d-4ed0-b9ae-e7b869a1f7fc + Name : vm1 + Type : VirtualMachine + FabricObjectId : 86447b9e-d877-4e9a-8302-adcd6bbf18c0 + Protected : False + CanCommit : False + CanFailover : True + CanReverseReplicate : False + ActiveLocation : Primary + ProtectionState : Enabled + ReplicationHealth : Healthy + TestFailoverState : None + ReplicationProvider : HyperVReplica + + + Description + ----------- + + + + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureSiteRecoveryVaultSettings + + + Gets Azure Site Recovery Vault settings information + + + + + Get + AzureSiteRecoveryVaultSettings + + + + Gets Azure Site Recovery Vault settings information + + + + + Get-AzureSiteRecoveryVaultSettings + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + C:\PS> + + + Get-AzureSiteRecoveryVaultSettings + + ResourceName CloudServiceName + ------------ ---------------- + ContosoVault RecoveryServices-6JP23WE3SKKOM5AFQG2YQAI22MNOWK52QDKWMUP... + + + Description + ----------- + + + + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureSiteRecoveryProtectionContainer + + + Get information about Azure site recovery Protection container under current Azure Site Vault + + + + + Get + AzureSiteRecoveryProtectionContainer + + + + Get information about Azure site recovery Protection container under current Azure Site Vault. A protection container is the logical container for protection entities on which replication settings can be configured + + + + + Get-AzureSiteRecoveryProtectionContainer + + + Get-AzureSiteRecoveryProtectionContainer + + Id + + Id of the Protection Container + + string + + + + Get-AzureSiteRecoveryProtectionContainer + + Name + + Name of the Protection Container + + string + + + + + + + Id + + Id of the Protection Container + + + string + + string + + + + + + Name + + Name of the Protection Container + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + C:\PS> + + + Get-AzureSiteRecoveryProtectionContainer + + ID : 4a94c4a9-c856-4577-afbd-367fe9b3ce9c_1c513d45-645d-4ed0-b9ae-e7b869a1f7fc + Name : SourceCloud + ConfigurationStatus : Configured + PairedTo : 78facf56-b273-4941-82fd-ccb0b7597b30_5ed455e4-4933-4cff-b9dd-1b628068d972 + Role : Primary + ServerId : 4a94c4a9-c856-4577-afbd-367fe9b3ce9c + FabricObjectId : f0982c81-dfb1-4bfa-ba0d-a7d941f6e8c7 + + + ID : 78facf56-b273-4941-82fd-ccb0b7597b30_5ed455e4-4933-4cff-b9dd-1b628068d972 + Name : TargetCloud + ConfigurationStatus : Configured + PairedTo : 4a94c4a9-c856-4577-afbd-367fe9b3ce9c_1c513d45-645d-4ed0-b9ae-e7b869a1f7fc + Role : Recovery + ServerId : 78facf56-b273-4941-82fd-ccb0b7597b30 + FabricObjectId : f0982c81-dfb1-4bfa-ba0d-a7d941f6e8c7 + + + Description + ----------- + + + + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureSiteRecoveryJob + + + Get the information of the operation for current Azure Site Recovery Vault + + + + + Get + AzureSiteRecoveryJob + + + + Get the information of the operation for current Azure Site Recovery Vault + + + + + Get-AzureSiteRecoveryJob + + Id + + Id of job + + string + + + + Get-AzureSiteRecoveryJob + + Job + + Job object + + ASRJob + + + + Get-AzureSiteRecoveryJob + + StartTime + + Takes datetime as input. Allows to filter the list of jobs started after the given starttime + + datetime + + + State + + Take string input for possible states of ASR Job. Use this parameter to get filtered view of Jobs. Possible states include: Aborted, Cancelled, Cancelling, Completed, Failed, InProgress, PartiallySucceeded, CompletedWithInformation, RolledBack, Skipped, Waiting, WaitingForFinalizeProtection, WaitingForManualAction, WaitingForStopTestFailover, WaitingForUserInputAfterDataSync, NotStarted, Unknown. + + string + + + + + + + Id + + Id of job + + + string + + string + + + + + + Job + + Job object + + + ASRJob + + ASRJob + + + + + + StartTime + + Takes datetime as input. Allows to filter the list of jobs started after the given starttime + + + datetime + + datetime + + + + + + State + + Take string input for possible states of ASR Job. Use this parameter to get filtered view of Jobs. Possible states include: Aborted, Cancelled, Cancelling, Completed, Failed, InProgress, PartiallySucceeded, CompletedWithInformation, RolledBack, Skipped, Waiting, WaitingForFinalizeProtection, WaitingForManualAction, WaitingForStopTestFailover, WaitingForUserInputAfterDataSync, NotStarted, Unknown. + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + C:\PS> + + + Get-AzureSiteRecoveryJob -Id d0b56c01-1fd7-411a-94e9-be717ac6601e + + ID : d0b56c01-1fd7-411a-94e9-be717ac6601e + ClientRequestId : 0d259706-7882-4614-81bf-7d155f3600cb-2014-10-06 09:40:26Z + State : Succeeded + StateDescription : Completed + StartTime : 10/6/2014 9:40:28 AM + EndTime : 10/6/2014 9:40:30 AM + AllowedActions : {Cancel, Restart} + Name : Remove classification configuration + Tasks : {Prerequisites check for unpairing classifications, Unpairing classifications} + Errors : {} + + + Description + ----------- + + + + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureSiteRecoveryRecoveryPlan + + + Get information of the Recovery Plan for current Azure Site Recovery Vault + + + + + Get + AzureSiteRecoveryRecoveryPlan + + + + Get information of the Recovery Plan for current Azure Site Recovery Vault. A recovery plan gathers virtual machines in a group for the purposes of failover and recovery + + + + + Get-AzureSiteRecoveryRecoveryPlan + + + Get-AzureSiteRecoveryRecoveryPlan + + Name + + name of the recovery plan + + string + + + + Get-AzureSiteRecoveryRecoveryPlan + + Id + + Id of the recovery plan + + string + + + + + + + Id + + Id of the recovery plan + + + string + + string + + + + + + Name + + name of the recovery plan + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + C:\PS> + + + Get-AzureSiteRecoveryRecoveryPlan + + ID Name ServerId TargetServerId + -- ---- -------- -------------- + 71de8ebc-1e9a-4242-aec3-ee... ContosoPlan 4a94c4a9-c856-4577-afbd-36... 78facf56-b273-4941-82fd-cc... + + + Description + ----------- + + + + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureSiteRecoveryProtectionEntity + + + Get the list of Protection Entities like "VMs" + + + + + Get + AzureSiteRecoveryProtectionEntity + + + + Get the list of Protection Entities like "VMs" . A Protection Entity is an object which can be protected using Azure site Recovery + + + + + Get-AzureSiteRecoveryProtectionEntity + + ProtectionContainer + + Protection Container object + + ASRProtectionContainer + + + + Get-AzureSiteRecoveryProtectionEntity + + Id + + Id of the Protection Entity + + string + + + ProtectionContainer + + Protection Container object + + ASRProtectionContainer + + + + Get-AzureSiteRecoveryProtectionEntity + + Name + + Name of the Protection Entity + + string + + + ProtectionContainer + + Protection Container object + + ASRProtectionContainer + + + + Get-AzureSiteRecoveryProtectionEntity + + ProtectionContainerId + + Id of the Protection Container + + string + + + + Get-AzureSiteRecoveryProtectionEntity + + Id + + Id of the Protection Entity + + string + + + ProtectionContainerId + + Id of the Protection Container + + string + + + + Get-AzureSiteRecoveryProtectionEntity + + Name + + Name of the Protection Entity + + string + + + ProtectionContainerId + + Id of the Protection Container + + string + + + + + + + Id + + Id of the Protection Entity + + + string + + string + + + + + + Name + + Name of the Protection Entity + + + string + + string + + + + + + ProtectionContainer + + Protection Container object + + + ASRProtectionContainer + + ASRProtectionContainer + + + + + + ProtectionContainerId + + Id of the Protection Container + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + C:\PS> + + + $PC = Get-AzureSiteRecoveryProtectionContainer; Get-AzureSiteRecoveryProtectionEntity -ProtectionContainer $PC + + ID : 43aaab46-1cb0-4c39-8077-9a091c3b05ce + ServerId : 4a94c4a9-c856-4577-afbd-367fe9b3ce9c + ProtectionContainerId : 4a94c4a9-c856-4577-afbd-367fe9b3ce9c_1c513d45-645d-4ed0-b9ae-e7b869a1f7fc + Name : testvm + Type : VirtualMachine + FabricObjectId : 506B3CAC-5758-49E2-98C4-E5B0512E4D8E + Protected : False + CanCommit : False + CanFailover : False + CanReverseReplicate : False + ActiveLocation : Primary + ProtectionStateDescription : Enabling protection + ReplicationHealth : + TestFailoverStateDescription : None + ReplicationProvider : HyperVReplica + + + Description + ----------- + + + + + + + + + + + + + + + + + + + + + + + + + + + Import-AzureSiteRecoveryVaultSettingsFile + + + Imports a Azure site Recovery Vault Settings file to able to connect to Azure site Recovery Vault + + + + + Import + AzureSiteRecoveryVaultSettingsFile + + + + Imports a Azure site Recovery Vault Settings file to able to connect to Azure site Recovery Vault. The Vault settings file can be downloaded from Azure site recovery Vault by logging on the Azure portal + + + + + Import-AzureSiteRecoveryVaultSettingsFile + + Path + + Path to the Azure site Recovery Vault Settings file. This file can be downloaded from Azure Site Recovery Vault portal and stored locally + + string + + + + + + + Path + + Path to the Azure site Recovery Vault Settings file. This file can be downloaded from Azure Site Recovery Vault portal and stored locally + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + C:\PS> + + + Import-AzureSiteRecoveryVaultSettingsFile -Path "C:\Users\Contoso\Contosovault Monday, October 6, 2014.VaultCredentials" + + VERBOSE: Vault Settings File path: C:\Users\Contoso\Contosovault Monday, October 6, 2014.VaultCredentials + + ResourceName CloudServiceName + ------------ ---------------- + Contosovault RecoveryServices-6JP23WE3SKKOM5AFQG2YQAI22MNOWK52QDKWMUP... + + + Description + ----------- + + + + + + + + + + + + + + + + + + + + + + + + + + + New-AzureSiteRecoveryRecoveryPlan + + + Adds a Recovery Plan in to a current Azure Site Recovery Vault + + + + + New + AzureSiteRecoveryRecoveryPlan + + + + Adds a Recovery Plan in to a current Azure Site Recovery Vault. A recovery plan gathers virtual machines in a group for the purposes of failover and recovery. + + + + + New-AzureSiteRecoveryRecoveryPlan + + File + + Recovery Plan file + + string + + + WaitForCompletion + + Waits till the operation completes + + + + + + + + File + + Recovery Plan file + + + string + + string + + + + + + WaitForCompletion + + Waits till the operation completes + + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + C:\PS> + + + New-AzureSiteRecoveryRecoveryPlan -File C:\Users\contoso\Desktop\RP.xml + + ID : 189283c7-7fd9-4010-8bf1-d2a2e4a46df4 + ClientRequestId : 6c56d96e-dfdd-4898-81cf-8562f51a8129-2014-34-06 15:34:23Z-P + State : NotStarted + StateDescription : NotStarted + StartTime : + EndTime : + AllowedActions : {} + Name : + Tasks : {} + Errors : {} + + + Description + ----------- + + + + + + + + + + + + + + + + + + + + + + + + + + + Remove-AzureSiteRecoveryRecoveryPlan + + + Remove a Recovery Plan from the current Azure Site Recovery Vault + + + + + Remove + AzureSiteRecoveryRecoveryPlan + + + + Remove a Recovery Plan from the current Azure Site Recovery Vault + + + + + Remove-AzureSiteRecoveryRecoveryPlan + + Id + + Id of the Recovery Plan + + string + + + Force + + Bypasses confirmation on passing + + + + WaitForCompletion + + Waits till the operation completes + + + + + Remove-AzureSiteRecoveryRecoveryPlan + + RecoveryPlan + + Recovery Plan object + + ASRRecoveryPlan + + + Force + + Bypasses confirmation on passing + + + + WaitForCompletion + + Waits till the operation completes + + + + + + + + Force + + Bypasses confirmation on passing + + + SwitchParameter + + SwitchParameter + + + + + + Id + + Id of the Recovery Plan + + + string + + string + + + + + + RecoveryPlan + + Recovery Plan object + + + ASRRecoveryPlan + + ASRRecoveryPlan + + + + + + WaitForCompletion + + Waits till the operation completes + + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + C:\PS> + + + $Rp = Get-AzureSiteRecoveryRecoveryPlan; Remove-AzureSiteRecoveryRecoveryPlan -RecoveryPlan $Rp + + ID : 20329f92-9ed6-4529-8b74-d83309623248 + ClientRequestId : 6c967844-096f-4ca6-a166-55936fd6d61c-2014-36-06 15:36:40Z-P + State : NotStarted + StateDescription : NotStarted + StartTime : + EndTime : + AllowedActions : {} + Name : + Tasks : {} + Errors : {} + + + Description + ----------- + + + + + + + + + + + + + + + + + + + + + + + + + + + Restart-AzureSiteRecoveryJob + + + Restarts the Operation in Azure Site Recovery + + + + + Restart + AzureSiteRecoveryJob + + + + Restarts the Operation in Azure Site Recovery . This cmdlet is allowed on failed and cancelled jobs . To know allowed actions on a job look for Allowed Actions in job object + + + + + Restart-AzureSiteRecoveryJob + + Id + + Id of the Azure Site Recovery Job + + string + + + + Restart-AzureSiteRecoveryJob + + Job + + + + ASRJob + + + + + + + Id + + Id of the Azure Site Recovery Job + + + string + + string + + + + + + Job + + + + + ASRJob + + ASRJob + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + C:\PS> + + + Restart-AzureSiteRecoveryJob -Id bbf0b839-9aaa-49e1-8354-601c9145966d + + ID : bbf0b839-9aaa-49e1-8354-601c9145966d + ClientRequestId : ef42c8b0-640c-4442-960b-349f83d161a5-2014-24-06 14:24:04Z-P + State : Failed + StateDescription : Failed + StartTime : 10/6/2014 9:41:08 AM + EndTime : 10/6/2014 9:41:21 AM + AllowedActions : {Cancel, Restart} + Name : Enable protection + Tasks : {Prerequisites check for enabling protection , Identifying replication target, Enable replication, + Starting initial replication...} + Errors : {CreateProtectionTargetTask} + + + Description + ----------- + + + + + + + + + + + + + + + + + + + + + + + + + + + Resume-AzureSiteRecoveryJob + + + Resumes a suspended job in Azure Site Recovery + + + + + Resume + AzureSiteRecoveryJob + + + + Resumes the Operation in Azure Site Recovery . This cmdlet is allowed on suspended jobs . To know allowed actions on a job look for Allowed Actions in job object + + + + + Resume-AzureSiteRecoveryJob + + Id + + ID of the Azure Site Recovery Job + + string + + + Comments + + User comment can be specified while resuming the Job + + string + + + + Resume-AzureSiteRecoveryJob + + Job + + ASR Job object + + ASRJob + + + Comments + + User comment can be specified while resuming the Job + + string + + + + + + + Comments + + User comment can be specified while resuming the Job + + + string + + string + + + + + + Id + + ID of the Azure Site Recovery Job + + + string + + string + + + + + + Job + + ASR Job object + + + ASRJob + + ASRJob + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + C:\PS> + + + $jobs= Get-AzureSiteRecoveryJob; Resume-AzureSiteRecoveryJob -Job $jobs + + ID : d16397fb-cdf1-4972-b677-c333f3c557b4 + ClientRequestId : 32ace403-0916-4967-83a1-529176bd6e88-2014-49-06 15:49:24Z-P + State : Suspended + StateDescription : WaitingForManualAction + StartTime : 10/6/2014 10:19:28 AM + EndTime : 10/6/2014 10:19:31 AM + AllowedActions : {Cancel, RestartTestFailoverCleanup} + Name : Test failover + Tasks : {Recovery plan preflight checks, Create test environment, All groups failover: Pre steps (1), + Recovery plan failover...} + Errors : {} + + + Description + ----------- + + + + + + + + + + + + + + + + + + + + + + + + + + + Set-AzureSiteRecoveryProtectionEntity + + + Sets the Protection on a protection entity for Azure Site Recovery + + + + + Set + AzureSiteRecoveryProtectionEntity + + + + Sets the Protection on a protection entity for Azure Site Recovery. This is async cmdlet which will only start the operation and return the job object. The success of operation can be tracked using Get-AzuresiteRecoveryObject + + + + + Set-AzureSiteRecoveryProtectionEntity + + Id + + ID of the protection entity + + string + + + ProtectedContainerId + + ID of the Protected Container + + string + + + Protection + + set 'Enable' to enable protection and 'Disable' to disable protection + + string + + + Force + + Bypasses confirmation on passing + + + + WaitForCompletion + + Waits till the operation completes + + + + + Set-AzureSiteRecoveryProtectionEntity + + ProtectionEntity + + Protection Entity object + + ASRProtectionEntity + + + Protection + + set 'Enable' to enable protection and 'Disable' to disable protection + + string + + + Force + + Bypasses confirmation on passing + + + + WaitForCompletion + + Waits till the operation completes + + + + + + + + Id + + ID of the protection entity + + + string + + string + + + + + + ProtectedContainerId + + ID of the Protected Container + + + string + + string + + + + + + Protection + + set 'Enable' to enable protection and 'Disable' to disable protection + + + string + + string + + + + + + ProtectionEntity + + Protection Entity object + + + ASRProtectionEntity + + ASRProtectionEntity + + + + + + WaitForCompletion + + Waits till the operation completes + + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + C:\PS> + + + $PC = Get-AzureSiteRecoveryProtectionContainer; $PE = Get-AzureSiteRecoveryProtectionEntity -ProtectionContainer $PC; Set-AzureSiteRecoveryProtectionEntity -ProtectionEntity $PE -Protection Enable + + ID : e4dd2c3d-4195-4f31-9f73-c8d71b998e81 + ClientRequestId : 3d9e28b4-cf5b-4ae3-8ac5-12c850e2eee9-2014-42-06 15:42:08Z-P + State : InProgress + StateDescription : InProgress + StartTime : 10/6/2014 10:12:14 AM + EndTime : + AllowedActions : {Cancel, Restart} + Name : Enable protection + Tasks : {Prerequisites check for enabling protection , Identifying replication target, Enable replication, + Starting initial replication...} + Errors : {} + + + Description + ----------- + + + + + + + + + + + + + + + + + + + + + + + + + + + Start-AzureSiteRecoveryTestFailoverJob + + + Start the Test Failover operation for a Virtual Machine or Recovery Plan under Azure Site Recovery + + + + + Start + AzureSiteRecoveryTestFailoverJob + + + + Start the Test Failover operation for a Protection Entity or Recovery Plan under Azure Site Recovery. This will start the test failover job and success of test failover can be tracked state of the Job using Get-AzureSiteRecoveryJob + + + + + Start-AzureSiteRecoveryTestFailoverJob + + RecoveryPlan + + Recovery Plan object + + ASRRecoveryPlan + + + Direction + + Direction of the failover, either PrimaryToRecovery or RecoveryToPrimary + + string + + + WaitForCompletion + + Waits till the operation completes + + + + + Start-AzureSiteRecoveryTestFailoverJob + + RpId + + Id of the Recovery Plan + + string + + + Direction + + Direction of the failover, either PrimaryToRecovery or RecoveryToPrimary + + string + + + WaitForCompletion + + Waits till the operation completes + + + + + Start-AzureSiteRecoveryTestFailoverJob + + ProtectionEntity + + Protection Entity object + + ASRProtectionEntity + + + Direction + + Direction of the failover, either PrimaryToRecovery or RecoveryToPrimary + + string + + + WaitForCompletion + + Waits till the operation completes + + + + + Start-AzureSiteRecoveryTestFailoverJob + + ProtectionEntity + + Protection Entity object + + ASRProtectionEntity + + + LogicalNetworkId + + Logical Network Id + + string + + + Direction + + Direction of the failover, either PrimaryToRecovery or RecoveryToPrimary + + string + + + WaitForCompletion + + Waits till the operation completes + + + + + Start-AzureSiteRecoveryTestFailoverJob + + ProtectionEntity + + Protection Entity object + + ASRProtectionEntity + + + VmNetworkId + + Id of the VM Network + + string + + + Direction + + Direction of the failover, either PrimaryToRecovery or RecoveryToPrimary + + string + + + WaitForCompletion + + Waits till the operation completes + + + + + Start-AzureSiteRecoveryTestFailoverJob + + ProtectionContainerId + + Id of the Protection Container + + string + + + ProtectionEntityId + + Id of the Protection Entity + + string + + + Direction + + Direction of the failover, either PrimaryToRecovery or RecoveryToPrimary + + string + + + WaitForCompletion + + Waits till the operation completes + + + + + Start-AzureSiteRecoveryTestFailoverJob + + ProtectionContainerId + + Id of the Protection Container + + string + + + ProtectionEntityId + + Id of the Protection Entity + + string + + + LogicalNetworkId + + Logical Network Id + + string + + + Direction + + Direction of the failover, either PrimaryToRecovery or RecoveryToPrimary + + string + + + WaitForCompletion + + Waits till the operation completes + + + + + Start-AzureSiteRecoveryTestFailoverJob + + ProtectionContainerId + + Id of the Protection Container + + string + + + ProtectionEntityId + + Id of the Protection Entity + + string + + + VmNetworkId + + Id of the VM Network + + string + + + Direction + + Direction of the failover, either PrimaryToRecovery or RecoveryToPrimary + + string + + + WaitForCompletion + + Waits till the operation completes + + + + + + + + Direction + + Direction of the failover, either PrimaryToRecovery or RecoveryToPrimary + + + string + + string + + + + + + LogicalNetworkId + + Logical Network Id + + + string + + string + + + + + + ProtectionContainerId + + Id of the Protection Container + + + string + + string + + + + + + ProtectionEntity + + Protection Entity object + + + ASRProtectionEntity + + ASRProtectionEntity + + + + + + ProtectionEntityId + + Id of the Protection Entity + + + string + + string + + + + + + RecoveryPlan + + Recovery Plan object + + + ASRRecoveryPlan + + ASRRecoveryPlan + + + + + + RpId + + Id of the Recovery Plan + + + string + + string + + + + + + VmNetworkId + + Id of the VM Network + + + string + + string + + + + + + WaitForCompletion + + Waits till the operation completes + + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + C:\PS> + + + $PC = Get-AzureSiteRecoveryProtectionContainer; $PE = Get-AzureSiteRecoveryProtectionEntity -ProtectionContainer $PC; Start-AzureSiteRecoveryTestFailoverJob -ProtectionEntity $PE -Direction PrimaryToRecovery + + + ID : c38eecdc-731c-405b-a61c-08db99aae2fe + ClientRequestId : 32ace403-0916-4967-83a1-529176bd6e88-2014-49-06 15:49:24Z-P + State : NotStarted + StateDescription : NotStarted + StartTime : + EndTime : + AllowedActions : {} + Name : + Tasks : {} + Errors : {} + + + Description + ----------- + + + + + + + + + + + + + + + + + + + + + + + + + + + Start-AzureSiteRecoveryUnplannedFailoverJob + + + + + + + + Start + AzureSiteRecoveryUnplannedFailoverJob + + + + Start the Unplanned Failover operation for a Protection Entity or Recovery Plan under Azure Site Recovery. This will start the failover job and success of failover can be tracked state of the Job using Get-AzureSiteRecoveryJob + + + + + Start-AzureSiteRecoveryUnplannedFailoverJob + + RecoveryPlan + + Recovery Plan object + + ASRRecoveryPlan + + + Direction + + Direction of the failover, either PrimaryToRecovery or RecoveryToPrimary + + string + + + PrimaryAction + + Indicates whether primary site actions are required or not + + bool + + + WaitForCompletion + + Waits till the operation completes + + + + + Start-AzureSiteRecoveryUnplannedFailoverJob + + RpId + + Id of the Recovery Plan + + string + + + Direction + + Direction of the failover, either PrimaryToRecovery or RecoveryToPrimary + + string + + + PrimaryAction + + Indicates whether primary site actions are required or not + + bool + + + WaitForCompletion + + Waits till the operation completes + + + + + Start-AzureSiteRecoveryUnplannedFailoverJob + + ProtectionEntity + + Protection Entity object + + ASRProtectionEntity + + + Direction + + Direction of the failover, either PrimaryToRecovery or RecoveryToPrimary + + string + + + PerformSourceSiteOperations + + Indicates whether source site operations can be done or not + + bool + + + WaitForCompletion + + Waits till the operation completes + + + + + Start-AzureSiteRecoveryUnplannedFailoverJob + + ProtectionContainerId + + Id of the Protection Container + + string + + + ProtectionEntityId + + Id of the Protection Entity + + string + + + Direction + + Direction of the failover, either PrimaryToRecovery or RecoveryToPrimary + + string + + + PerformSourceSiteOperations + + Indicates whether source site operations can be done or not + + bool + + + WaitForCompletion + + Waits till the operation completes + + + + + + + + Direction + + Direction of the failover, either PrimaryToRecovery or RecoveryToPrimary + + + string + + string + + + + + + PerformSourceSiteOperations + + Indicates whether source site operations can be done or not + + + bool + + bool + + + + + + PrimaryAction + + Indicates whether primary site actions are required or not + + + bool + + bool + + + + + + ProtectionContainerId + + Id of the Protection Container + + + string + + string + + + + + + ProtectionEntity + + Protection Entity object + + + ASRProtectionEntity + + ASRProtectionEntity + + + + + + ProtectionEntityId + + Id of the Protection Entity + + + string + + string + + + + + + RecoveryPlan + + Recovery Plan object + + + ASRRecoveryPlan + + ASRRecoveryPlan + + + + + + RpId + + Id of the Recovery Plan + + + string + + string + + + + + + WaitForCompletion + + Waits till the operation completes + + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + C:\PS> + + + $PC = Get-AzureSiteRecoveryProtectionContainer; $PE = Get-AzureSiteRecoveryProtectionEntity -ProtectionContainer $PC; Start-AzureSiteRecoveryUnplannedFailoverJob -ProtectionEntity $PE -Direction PrimaryToRecovery + + ID : c38eecdc-731c-405b-a61c-08db99aae2fe + ClientRequestId : 32ace403-0916-4967-83a1-529176bd6e88-2014-49-06 15:49:24Z-P + State : NotStarted + StateDescription : NotStarted + StartTime : + EndTime : + AllowedActions : {} + Name : + Tasks : {} + Errors : {} + + + Description + ----------- + + + + + + + + + + + + + + + + + + + + + + + + + + + Start-AzureSiteRecoveryCommitFailoverJob + + + Start the commit failover of the Azure Site Recovery object after failover + + + + + Start + AzureSiteRecoveryCommitFailoverJob + + + + Start the commit failover of the Azure Site Recovery object after failover. This will start the commit and return the job object. Success of the job can be tracked using Get-AzureSiteRecoveryJob + + + + + Start-AzureSiteRecoveryCommitFailoverJob + + RecoveryPlan + + Recovery Plan object + + ASRRecoveryPlan + + + WaitForCompletion + + Waits for + + + + + Start-AzureSiteRecoveryCommitFailoverJob + + RpId + + Id of the Recovery Plan + + string + + + WaitForCompletion + + Waits for + + + + + Start-AzureSiteRecoveryCommitFailoverJob + + ProtectionEntity + + Protection Entity object + + ASRProtectionEntity + + + WaitForCompletion + + Waits for + + + + + Start-AzureSiteRecoveryCommitFailoverJob + + ProtectionContainerId + + Id of the Protection Container + + string + + + ProtectionEntityId + + Id of the Protection Entity + + string + + + WaitForCompletion + + Waits for + + + + + + + + ProtectionContainerId + + Id of the Protection Container + + + string + + string + + + + + + ProtectionEntity + + Protection Entity object + + + ASRProtectionEntity + + ASRProtectionEntity + + + + + + ProtectionEntityId + + Id of the Protection Entity + + + string + + string + + + + + + RecoveryPlan + + Recovery Plan object + + + ASRRecoveryPlan + + ASRRecoveryPlan + + + + + + RpId + + Id of the Recovery Plan + + + string + + string + + + + + + WaitForCompletion + + Waits for + + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + C:\PS> + + + $PC = Get-AzureSiteRecoveryProtectionContainer; $PE = Get-AzureSiteRecoveryProtectionEntity -ProtectionContainer $PC; Start-AzureSiteRecoveryCommitFailoverJob -ProtectionEntity $PE -Direction PrimaryToRecovery + + ID : c38eecdc-731c-405b-a61c-08db99aae2fe + ClientRequestId : 32ace403-0916-4967-83a1-529176bd6e88-2014-49-06 15:49:24Z-P + State : NotStarted + StateDescription : NotStarted + StartTime : + EndTime : + AllowedActions : {} + Name : + Tasks : {} + Errors : {} + + + Description + ----------- + + + + + + + + + + + + + + + + + + + + + + + + + + + Start-AzureSiteRecoveryPlannedFailoverJob + + + Start the Planned Failover operation for a Virtual Machine or Recovery Plan under Azure Site Recovery + + + Start the Planned Failover operation for a Protection Entity or Recovery Plan under Azure Site Recovery. This will start the failover and return the job object. Success of the job can be tracked using Get-AzureSiteRecoveryJob + + Start + AzureSiteRecoveryPlannedFailoverJob + + + + + + + + + Start-AzureSiteRecoveryPlannedFailoverJob + + RecoveryPlan + + Recovery Plan object + + ASRRecoveryPlan + + + Direction + + Direction of the failover, either PrimaryToRecovery or RecoveryToPrimary + + string + + + WaitForCompletion + + Waits till the operation completes + + + + + Start-AzureSiteRecoveryPlannedFailoverJob + + RpId + + Id of the Recovery Plan + + string + + + Direction + + Direction of the failover, either PrimaryToRecovery or RecoveryToPrimary + + string + + + WaitForCompletion + + Waits till the operation completes + + + + + Start-AzureSiteRecoveryPlannedFailoverJob + + ProtectionEntity + + Protection Entity object + + ASRProtectionEntity + + + Direction + + Direction of the failover, either PrimaryToRecovery or RecoveryToPrimary + + string + + + WaitForCompletion + + Waits till the operation completes + + + + + Start-AzureSiteRecoveryPlannedFailoverJob + + ProtectionContainerId + + Id of the Protection Container + + string + + + ProtectionEntityId + + Id of the Protection Entity + + string + + + Direction + + Direction of the failover, either PrimaryToRecovery or RecoveryToPrimary + + string + + + WaitForCompletion + + Waits till the operation completes + + + + + + + + Direction + + Direction of the failover, either PrimaryToRecovery or RecoveryToPrimary + + + string + + string + + + + + + ProtectionContainerId + + Id of the Protection Container + + + string + + string + + + + + + ProtectionEntity + + Protection Entity object + + + ASRProtectionEntity + + ASRProtectionEntity + + + + + + ProtectionEntityId + + Id of the Protection Entity + + + string + + string + + + + + + RecoveryPlan + + Recovery Plan object + + + ASRRecoveryPlan + + ASRRecoveryPlan + + + + + + RpId + + Id of the Recovery Plan + + + string + + string + + + + + + WaitForCompletion + + Waits till the operation completes + + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + C:\PS> + + + $PC = Get-AzureSiteRecoveryProtectionContainer; $PE = Get-AzureSiteRecoveryProtectionEntity -ProtectionContainer $PC; Start-AzureSiteRecoveryPlannedFailoverJob -ProtectionEntity $PE -Direction PrimaryToRecovery + + ID : c38eecdc-731c-405b-a61c-08db99aae2fe + ClientRequestId : 32ace403-0916-4967-83a1-529176bd6e88-2014-49-06 15:49:24Z-P + State : NotStarted + StateDescription : NotStarted + StartTime : + EndTime : + AllowedActions : {} + Name : + Tasks : {} + Errors : {} + + + Description + ----------- + + + + + + + + + + + + + + + + + + + + + + + + + + + Stop-AzureSiteRecoveryJob + + + Stops the Azure Site Recovery Job. Specify a running Job only. + + + Stops the Azure Site Recovery Job. This cmdlet is applicable on a running Job only. To know the allowed actions look for Allowedactions property of Job object + + Stop + AzureSiteRecoveryJob + + + + + + + + + Stop-AzureSiteRecoveryJob + + Id + + ID of the Azure Site Recovery Job + + string + + + + Stop-AzureSiteRecoveryJob + + Job + + ASR Job object + + ASRJob + + + + + + + Id + + ID of the Azure Site Recovery Job + + + string + + string + + + + + + Job + + ASR Job object + + + ASRJob + + ASRJob + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + C:\PS> + + + $jobs= Get-AzureSiteRecoveryJob; Stop-AzureSiteRecoveryJob -Job $jobs + + + Description + ----------- + + + + + + + + + + + + + + + + + + + + + + + + + + + Update-AzureSiteRecoveryRecoveryPlan + + + Update-AzureSiteRecoveryRecoveryPlan cmdlet allows to change an existing Recovery Plan structure and Publish the updated one + + + + + Update + AzureSiteRecoveryRecoveryPlan + + + + Update-AzureSiteRecoveryRecoveryPlan cmdlet allows to change an existing Recovery Plan structure and Publish the updated one . A recovery plan gathers virtual machines in a group for the purposes of failover and recovery + + + + + Update-AzureSiteRecoveryRecoveryPlan + + File + + XML file containing the Recovery Plan + + string + + + WaitForCompletion + + Waits till the operation completes + + + + + + + + File + + XML file containing the Recovery Plan + + + string + + string + + + + + + WaitForCompletion + + Waits till the operation completes + + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + C:\PS> + + + Update-AzureSiteRecoveryRecoveryPlan -File C:\Users\contoso\Desktop\RP.xml + + + Description + ----------- + + + + + + + + + + + + + + + + + + + + + + + + + + + Update-AzureSiteRecoveryProtectionDirection + + + + + + + + Update + AzureSiteRecoveryProtectionDirection + + + + Update the source and target server for the protection for Azure Site recovery Object after the commitfailover is completed . This is async cmdlet which will only start the operation and return the job object. The success of operation can be tracked using Get-AzuresiteRecoveryObject + + + + + Update-AzureSiteRecoveryProtectionDirection + + RecoveryPlan + + Recovery Plan object + + ASRRecoveryPlan + + + Direction + + Direction of the failover, either PrimaryToRecovery or RecoveryToPrimary + + string + + + WaitForCompletion + + Waits till the operation completes + + + + + Update-AzureSiteRecoveryProtectionDirection + + RpId + + Id of the Recovery Plan + + string + + + Direction + + Direction of the failover, either PrimaryToRecovery or RecoveryToPrimary + + string + + + WaitForCompletion + + Waits till the operation completes + + + + + Update-AzureSiteRecoveryProtectionDirection + + ProtectionEntity + + Protection Entity object + + ASRProtectionEntity + + + Direction + + Direction of the failover, either PrimaryToRecovery or RecoveryToPrimary + + string + + + WaitForCompletion + + Waits till the operation completes + + + + + Update-AzureSiteRecoveryProtectionDirection + + ProtectionContainerId + + Id of the Protection Container + + string + + + ProtectionEntityId + + Id of the Protection Entity + + string + + + Direction + + Direction of the failover, either PrimaryToRecovery or RecoveryToPrimary + + string + + + WaitForCompletion + + Waits till the operation completes + + + + + + + + Direction + + Direction of the failover, either PrimaryToRecovery or RecoveryToPrimary + + + string + + string + + + + + + ProtectionContainerId + + Id of the Protection Container + + + string + + string + + + + + + ProtectionEntity + + Protection Entity object + + + ASRProtectionEntity + + ASRProtectionEntity + + + + + + ProtectionEntityId + + Id of the Protection Entity + + + string + + string + + + + + + RecoveryPlan + + Recovery Plan object + + + ASRRecoveryPlan + + ASRRecoveryPlan + + + + + + RpId + + Id of the Recovery Plan + + + string + + string + + + + + + WaitForCompletion + + Waits till the operation completes + + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + C:\PS> + + + Update-AzureSiteRecoveryProtectionDirection -ProtectionEntity $PE -Direction RecoveryToPrimary + + ID : c38eecdc-731c-405b-a61c-08db99aae2fe + ClientRequestId : 32ace403-0916-4967-83a1-529176bd6e88-2014-49-06 15:49:24Z-P + State : NotStarted + StateDescription : NotStarted + StartTime : + EndTime : + AllowedActions : {} + Name : + Tasks : {} + Errors : {} + + + Description + ----------- + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/PSRecoveryServicesClient/PSRecoveryServicesClient.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/PSRecoveryServicesClient/PSRecoveryServicesClient.cs new file mode 100644 index 000000000000..8ba046e6aa49 --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/PSRecoveryServicesClient/PSRecoveryServicesClient.cs @@ -0,0 +1,253 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Net; +using System.Runtime.Serialization; +using System.Security.Cryptography; +using System.Security.Cryptography.X509Certificates; +using System.Text; +using System.Web.Script.Serialization; +using System.Xml; +using Microsoft.Azure.Portal.RecoveryServices.Models.Common; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Factories; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.RecoveryServices; +using Microsoft.WindowsAzure.Management.RecoveryServices.Models; +using Microsoft.WindowsAzure.Management.SiteRecovery; +using Microsoft.WindowsAzure.Management.SiteRecovery.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common.Authentication; + +namespace Microsoft.Azure.Commands.RecoveryServices +{ + /// + /// Recovery services convenience client. + /// + public partial class PSRecoveryServicesClient + { + /// + /// client request id. + /// + public string ClientRequestId { get; set; } + + /// + /// Amount of time to sleep before fetching job details again. + /// + public const int TimeToSleepBeforeFetchingJobDetailsAgain = 30000; + + /// + /// Resource credentials holds vault, cloud service name, vault key and other details. + /// + [SuppressMessage( + "Microsoft.StyleCop.CSharp.MaintainabilityRules", + "SA1401:FieldsMustBePrivate", + Justification = "For Resource Credentials.")] + public static ASRVaultCreds asrVaultCreds = new ASRVaultCreds(); + + /// + /// Recovery Services client. + /// + private RecoveryServicesManagementClient recoveryServicesClient; + + /// + /// Initializes a new instance of the class. + /// + public PSRecoveryServicesClient() + { + } + + /// + /// Initializes a new instance of the class with + /// required current subscription. + /// + /// Azure Subscription + public PSRecoveryServicesClient(AzureSubscription azureSubscription) + { + this.recoveryServicesClient = + AzureSession.ClientFactory.CreateClient(azureSubscription, AzureEnvironment.Endpoint.ServiceManagement); + } + + /// + /// Retrieves Azure Cloud services. + /// + /// Cloud service list response + public CloudServiceListResponse GetAzureCloudServicesSyncInt() + { + return this.recoveryServicesClient.CloudServices.List(); + } + + /// + /// Validates current in-memory Vault Settings. + /// + /// Resource Name + /// Cloud Service Name + /// Cloud Services + /// Whether Vault settings are valid or not + public bool ValidateVaultSettings( + string resourceName, + string cloudServiceName, + CloudServiceListResponse services = null) + { + if (string.IsNullOrEmpty(resourceName) || string.IsNullOrEmpty(cloudServiceName)) + { + throw new InvalidOperationException(Properties.Resources.MissingVaultSettings); + } + + if (null == services) + { + services = this.recoveryServicesClient.CloudServices.List(); + } + + CloudService selectedCloudService = null; + Vault selectedResource = null; + + foreach (CloudService cloudService in services) + { + if (cloudService.Name == cloudServiceName) + { + selectedCloudService = cloudService; + } + } + + if (null == selectedCloudService) + { + throw new ArgumentException(Properties.Resources.InvalidCloudService); + } + + foreach (Vault vault in selectedCloudService.Resources) + { + if (vault.Name == resourceName) + { + selectedResource = vault; + } + } + + if (null == selectedResource) + { + throw new ArgumentException(Properties.Resources.InvalidResource); + } + + return true; + } + + /// + /// Site Recovery requests that go to on-premise components (like the Provider installed + /// in VMM) require an authentication token that is signed with the vault key to indicate + /// that the request indeed originated from the end-user client. + /// Generating that authentication token here and sending it via http headers. + /// + /// Unique identifier for the client's request + /// The authentication token for the provider + public string GenerateAgentAuthenticationHeader(string clientRequestId) + { + CikTokenDetails cikTokenDetails = new CikTokenDetails(); + + DateTime currentDateTime = DateTime.Now; + currentDateTime = currentDateTime.AddHours(-1); + cikTokenDetails.NotBeforeTimestamp = TimeZoneInfo.ConvertTimeToUtc(currentDateTime); + cikTokenDetails.NotAfterTimestamp = cikTokenDetails.NotBeforeTimestamp.AddHours(6); + cikTokenDetails.ClientRequestId = clientRequestId; + cikTokenDetails.Version = new Version(1, 2); + cikTokenDetails.PropertyBag = new Dictionary(); + + string shaInput = new JavaScriptSerializer().Serialize(cikTokenDetails); + + if (null == asrVaultCreds.ChannelIntegrityKey) + { + throw new ArgumentException(Properties.Resources.MissingChannelIntergrityKey); + } + HMACSHA256 sha = new HMACSHA256(Encoding.UTF8.GetBytes(asrVaultCreds.ChannelIntegrityKey)); + cikTokenDetails.Hmac = + Convert.ToBase64String(sha.ComputeHash(Encoding.UTF8.GetBytes(shaInput))); + cikTokenDetails.HashFunction = CikSupportedHashFunctions.HMACSHA256.ToString(); + + return new JavaScriptSerializer().Serialize(cikTokenDetails); + } + + /// + /// Gets request headers. + /// + /// Custom request headers + public CustomRequestHeaders GetRequestHeaders() + { + this.ClientRequestId = Guid.NewGuid().ToString() + "-" + DateTime.Now.ToString("yyyy-mm-dd HH:mm:ssZ") + "-P"; + + return new CustomRequestHeaders() + { + // ClientRequestId is a unique ID for every request to Azure Site Recovery. + // It is useful when diagnosing failures in API calls. + ClientRequestId = this.ClientRequestId, + AgentAuthenticationHeader = this.GenerateAgentAuthenticationHeader(this.ClientRequestId) + }; + } + + /// + /// Gets Site Recovery client. + /// + /// Site Recovery Management client + private SiteRecoveryManagementClient GetSiteRecoveryClient() + { + CloudServiceListResponse services = this.recoveryServicesClient.CloudServices.List(); + this.ValidateVaultSettings( + asrVaultCreds.ResourceName, + asrVaultCreds.CloudServiceName, + services); + + CloudService selectedCloudService = null; + Vault selectedResource = null; + + foreach (CloudService cloudService in services) + { + if (cloudService.Name == asrVaultCreds.CloudServiceName) + { + selectedCloudService = cloudService; + } + } + + if (null == selectedCloudService) + { + throw new ArgumentException(Properties.Resources.InvalidCloudService); + } + + foreach (Vault vault in selectedCloudService.Resources) + { + if (vault.Name == asrVaultCreds.ResourceName) + { + selectedResource = vault; + } + } + + if (null == selectedResource) + { + throw new ArgumentException(Properties.Resources.InvalidResource); + } + + SiteRecoveryManagementClient siteRecoveryClient = + AzureSession.ClientFactory.CreateCustomClient(asrVaultCreds.CloudServiceName, asrVaultCreds.ResourceName, recoveryServicesClient.Credentials, AzureSession.CurrentContext.Environment.GetEndpointAsUri(AzureEnvironment.Endpoint.ServiceManagement)); + + if (null == siteRecoveryClient) + { + throw new InvalidOperationException(Properties.Resources.NullRecoveryServicesClient); + } + + return siteRecoveryClient; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/PSRecoveryServicesClient/PSRecoveryServicesJobsClient.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/PSRecoveryServicesClient/PSRecoveryServicesJobsClient.cs new file mode 100644 index 000000000000..f11c6c679d60 --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/PSRecoveryServicesClient/PSRecoveryServicesJobsClient.cs @@ -0,0 +1,77 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Management.SiteRecovery.Models; + +namespace Microsoft.Azure.Commands.RecoveryServices +{ + /// + /// Recovery services convenience client. + /// + public partial class PSRecoveryServicesClient + { + /// + /// Gets Azure Site Recovery Job details. + /// + /// Job ID + /// Job response + public JobResponse GetAzureSiteRecoveryJobDetails(string jobId) + { + return this.GetSiteRecoveryClient().Jobs.Get(jobId, this.GetRequestHeaders()); + } + + /// + /// Get Azure Site Recovery Job. + /// + /// Job query parameter. + /// Job list response + public JobListResponse GetAzureSiteRecoveryJob(JobQueryParameter jqp) + { + return this.GetSiteRecoveryClient().Jobs.List(jqp, this.GetRequestHeaders()); + } + + /// + /// Stops Azure Site Recovery Job. + /// + /// Job ID + public void StopAzureSiteRecoveryJob(string jobId) + { + this.GetSiteRecoveryClient().Jobs.Cancel(jobId, this.GetRequestHeaders()); + } + + /// + /// Restarts Azure Site Recovery Job. + /// + /// Job ID + /// Job response + public JobResponse RestartAzureSiteRecoveryJob(string jobId) + { + return this.GetSiteRecoveryClient().Jobs.Restart(jobId, this.GetRequestHeaders()); + } + + /// + /// Resumes Azure Site Recovery Job. + /// + /// Job ID + /// Resume Job parameters + /// Job response + public JobResponse ResumeAzureSiteRecoveryJob( + string jobId, + ResumeJobParams resumeJobParams) + { + return this.GetSiteRecoveryClient().Jobs.Resume(jobId, resumeJobParams, this.GetRequestHeaders()); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/PSRecoveryServicesClient/PSRecoveryServicesPEClient.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/PSRecoveryServicesClient/PSRecoveryServicesPEClient.cs new file mode 100644 index 000000000000..6c95b10d1b31 --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/PSRecoveryServicesClient/PSRecoveryServicesPEClient.cs @@ -0,0 +1,196 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Management.SiteRecovery; +using Microsoft.WindowsAzure.Management.SiteRecovery.Models; + +namespace Microsoft.Azure.Commands.RecoveryServices +{ + /// + /// Recovery services convenience client. + /// + public partial class PSRecoveryServicesClient + { + /// + /// Represents Enable protection. + /// + public const string EnableProtection = "Enable"; + + /// + /// Represents Disable protection. + /// + public const string DisableProtection = "Disable"; + + /// + /// Retrieves Protection Entity. + /// + /// Protection Container ID + /// Protection entity list response + public ProtectionEntityListResponse GetAzureSiteRecoveryProtectionEntity( + string protectionContainerId) + { + return + this + .GetSiteRecoveryClient() + .ProtectionEntity + .List(protectionContainerId, this.GetRequestHeaders()); + } + + /// + /// Retrieves Protection Entity. + /// + /// Protection Container ID + /// Virtual Machine ID + /// Protection entity response + public ProtectionEntityResponse GetAzureSiteRecoveryProtectionEntity( + string protectionContainerId, + string virtualMachineId) + { + return + this + .GetSiteRecoveryClient() + .ProtectionEntity + .Get(protectionContainerId, virtualMachineId, this.GetRequestHeaders()); + } + + /// + /// Sets protection on Protection entity. + /// + /// Protection Container ID + /// Virtual Machine ID + /// Protection state to set + /// Job response + public JobResponse SetProtectionOnProtectionEntity( + string protectionContainerId, + string virtualMachineId, + string protection) + { + var requestHeaders = this.GetRequestHeaders(); + + JobResponse jobResponse = null; + + if (0 == string.Compare(EnableProtection, protection, StringComparison.OrdinalIgnoreCase)) + { + jobResponse = + this.GetSiteRecoveryClient().ProtectionEntity.EnableProtection( + protectionContainerId, + virtualMachineId, + requestHeaders); + } + else if (0 == string.Compare(DisableProtection, protection, StringComparison.OrdinalIgnoreCase)) + { + jobResponse = + this.GetSiteRecoveryClient().ProtectionEntity.DisableProtection( + protectionContainerId, + virtualMachineId, + requestHeaders); + } + + return jobResponse; + } + + /// + /// Starts Azure Site Recovery Planned failover. + /// + /// Protection Container ID + /// Protection entity ID + /// Planned failover request + /// Job response + public JobResponse StartAzureSiteRecoveryPlannedFailover( + string protectionContainerId, + string protectionEntityId, + PlannedFailoverRequest plannedFailoverRequest) + { + return this.GetSiteRecoveryClient().ProtectionEntity.PlannedFailover( + protectionContainerId, + protectionEntityId, + plannedFailoverRequest, + this.GetRequestHeaders()); + } + + /// + /// Starts Azure Site Recovery Unplanned failover. + /// + /// Protection Container ID + /// Protection entity ID + /// Unplanned failover request + /// Job response + public JobResponse StartAzureSiteRecoveryUnplannedFailover( + string protectionContainerId, + string protectionEntityId, + UnplannedFailoverRequest unplannedFailoverRequest) + { + return this.GetSiteRecoveryClient().ProtectionEntity.UnplannedFailover( + protectionContainerId, + protectionEntityId, + unplannedFailoverRequest, + this.GetRequestHeaders()); + } + + /// + /// Starts Azure Site Recovery Unplanned failover. + /// + /// Protection Container ID + /// Protection entity ID + /// Test failover request + /// Job response + public JobResponse StartAzureSiteRecoveryTestFailover( + string protectionContainerId, + string protectionEntityId, + TestFailoverRequest testFailoverRequest) + { + return this.GetSiteRecoveryClient().ProtectionEntity.TestFailover( + protectionContainerId, + protectionEntityId, + testFailoverRequest, + this.GetRequestHeaders()); + } + + /// + /// Starts Azure Site Recovery Commit failover. + /// + /// Protection Container ID + /// Recovery Plan ID + /// Job response + public JobResponse StartAzureSiteRecoveryCommitFailover( + string protectionContainerId, + string protectionEntityId) + { + return this.GetSiteRecoveryClient().ProtectionEntity.CommitFailover( + protectionContainerId, + protectionEntityId, + this.GetRequestHeaders()); + } + + /// + /// Re-protects the Azure Site Recovery protection entity. + /// + /// Protection Container ID + /// Recovery Plan ID + /// Job response + public JobResponse StartAzureSiteRecoveryReprotection( + string protectionContainerId, + string protectionEntityId) + { + var request = new ReprotectRequest(); + return this.GetSiteRecoveryClient().ProtectionEntity.Reprotect( + protectionContainerId, + protectionEntityId, + request, + this.GetRequestHeaders()); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/PSRecoveryServicesClient/PSRecoveryServicesProtectedContainerClient.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/PSRecoveryServicesClient/PSRecoveryServicesProtectedContainerClient.cs new file mode 100644 index 000000000000..8300ffecc1a3 --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/PSRecoveryServicesClient/PSRecoveryServicesProtectedContainerClient.cs @@ -0,0 +1,47 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Management.SiteRecovery; +using Microsoft.WindowsAzure.Management.SiteRecovery.Models; + +namespace Microsoft.Azure.Commands.RecoveryServices +{ + /// + /// Recovery services convenience client. + /// + public partial class PSRecoveryServicesClient + { + /// + /// Gets Azure Site Recovery Protection Container. + /// + /// Protection Container list response + public ProtectionContainerListResponse GetAzureSiteRecoveryProtectionContainer() + { + return this.GetSiteRecoveryClient().ProtectionContainer.List(this.GetRequestHeaders()); + } + + /// + /// Gets Azure Site Recovery Protection Container. + /// + /// Protection Container ID + /// Protection Container response + public ProtectionContainerResponse GetAzureSiteRecoveryProtectionContainer( + string protectionContainerId) + { + return this.GetSiteRecoveryClient().ProtectionContainer.Get(protectionContainerId, this.GetRequestHeaders()); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/PSRecoveryServicesClient/PSRecoveryServicesRecoveryPlanClient.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/PSRecoveryServicesClient/PSRecoveryServicesRecoveryPlanClient.cs new file mode 100644 index 000000000000..6cdf97cb4fc7 --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/PSRecoveryServicesClient/PSRecoveryServicesRecoveryPlanClient.cs @@ -0,0 +1,192 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Management.SiteRecovery; +using Microsoft.WindowsAzure.Management.SiteRecovery.Models; + +namespace Microsoft.Azure.Commands.RecoveryServices +{ + /// + /// Recovery services convenience client. + /// + public partial class PSRecoveryServicesClient + { + /// + /// Represents direction primary to secondary. + /// + public const string PrimaryToRecovery = "PrimaryToRecovery"; + + /// + /// Represents direction secondary to primary. + /// + public const string RecoveryToPrimary = "RecoveryToPrimary"; + + /// + /// Represents primary location. + /// + public const string PrimaryLocation = "Primary"; + + /// + /// Represents Recovery location. + /// + public const string RecoveryLocation = "Recovery"; + + /// + /// Gets Azure Site Recovery Plan. + /// + /// Recovery Plan list response + public RecoveryPlanListResponse GetAzureSiteRecoveryRecoveryPlan() + { + return this.GetSiteRecoveryClient().RecoveryPlan.List(this.GetRequestHeaders()); + } + + /// + /// Get Azure Site Recovery recovery plan XML. + /// + /// Recovery plan id. + /// Recovery plan XML. + public RecoveryPlanXmlOuput GetAzureSiteRecoveryRecoveryPlanFile(string recoveryPlanId) + { + return this.GetSiteRecoveryClient().RecoveryPlan.GetRecoveryPlanXml( + recoveryPlanId, + this.GetRequestHeaders()); + } + + /// + /// Gets Azure Site Recovery Recovery Plan. + /// + /// Recovery Plan ID + /// Recovery Plan response + public RecoveryPlanResponse GetAzureSiteRecoveryRecoveryPlan(string recoveryPlanId) + { + return this.GetSiteRecoveryClient().RecoveryPlan.Get(recoveryPlanId, this.GetRequestHeaders()); + } + + /// + /// Starts Azure Site Recovery Commit failover. + /// + /// Recovery Plan ID + /// Job response + public JobResponse StartAzureSiteRecoveryCommitFailover(string recoveryPlanId) + { + return this.GetSiteRecoveryClient().RecoveryPlan.Commit(recoveryPlanId, this.GetRequestHeaders()); + } + + /// + /// Updates Azure Site Recovery protection. + /// + /// Recovery Plan ID + /// Job response + public JobResponse UpdateAzureSiteRecoveryProtection(string recoveryPlanId) + { + return this.GetSiteRecoveryClient().RecoveryPlan.Reprotect(recoveryPlanId, this.GetRequestHeaders()); + } + + /// + /// Starts Azure Site Recovery Planned failover. + /// + /// Recovery Plan ID + /// Recovery Plan Planned failover request + /// Job response + public JobResponse StartAzureSiteRecoveryPlannedFailover( + string recoveryPlanId, + RpPlannedFailoverRequest recoveryPlanPlannedFailoverRequest) + { + return this.GetSiteRecoveryClient().RecoveryPlan.RecoveryPlanPlannedFailover( + recoveryPlanId, + recoveryPlanPlannedFailoverRequest, + this.GetRequestHeaders()); + } + + /// + /// Starts Azure Site Recovery Unplanned failover. + /// + /// Recovery Plan ID + /// Recovery Plan Unplanned failover request + /// Job response + public JobResponse StartAzureSiteRecoveryUnplannedFailover( + string recoveryPlanId, + RpUnplannedFailoverRequest recoveryPlanUnPlannedFailoverRequest) + { + return this.GetSiteRecoveryClient().RecoveryPlan.RecoveryPlanUnplannedFailover( + recoveryPlanId, + recoveryPlanUnPlannedFailoverRequest, + this.GetRequestHeaders()); + } + + /// + /// Starts Azure Site Recovery test failover. + /// + /// Recovery Plan ID + /// Recovery Plan test failover request + /// Job response + public JobResponse StartAzureSiteRecoveryTestFailover( + string recoveryPlanId, + RpTestFailoverRequest recoveryPlanTestFailoverRequest) + { + return this.GetSiteRecoveryClient().RecoveryPlan.RecoveryPlanTestFailover( + recoveryPlanId, + recoveryPlanTestFailoverRequest, + this.GetRequestHeaders()); + } + + /// + /// Remove Azure Site Recovery recovery plan. + /// + /// Recovery plan id. + /// Job response + public JobResponse RemoveAzureSiteRecoveryRecoveryPlan(string recoveryPlanId) + { + return this.GetSiteRecoveryClient().RecoveryPlan.Delete( + recoveryPlanId, + this.GetRequestHeaders()); + } + + /// + /// Create Azure Site Recovery Recovery Plan. + /// + /// Recovery Plan Xml. + /// Job response + public JobResponse CreateAzureSiteRecoveryRecoveryPlan(string recoveryPlanXml) + { + RecoveryPlanXmlData recoveryPlanXmlData = new RecoveryPlanXmlData + { + RecoveryPlanXml = recoveryPlanXml + }; + + return this.GetSiteRecoveryClient().RecoveryPlan.CreateRecoveryPlan( + recoveryPlanXmlData, + this.GetRequestHeaders()); + } + + /// + /// Update Azure Site Recovery Recovery Plan. + /// + /// Recovery Plan Xml. + /// Job response + public JobResponse UpdateAzureSiteRecoveryRecoveryPlan(string recoveryPlanXml) + { + RecoveryPlanXmlData recoveryPlanXmlData = new RecoveryPlanXmlData + { + RecoveryPlanXml = recoveryPlanXml + }; + + return this.GetSiteRecoveryClient().RecoveryPlan.UpdateRecoveryPlan( + recoveryPlanXmlData, + this.GetRequestHeaders()); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/PSRecoveryServicesClient/PSRecoveryServicesServerClient.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/PSRecoveryServicesClient/PSRecoveryServicesServerClient.cs new file mode 100644 index 000000000000..24795e067687 --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/PSRecoveryServicesClient/PSRecoveryServicesServerClient.cs @@ -0,0 +1,46 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Management.SiteRecovery; +using Microsoft.WindowsAzure.Management.SiteRecovery.Models; + +namespace Microsoft.Azure.Commands.RecoveryServices +{ + /// + /// Recovery services convenience client. + /// + public partial class PSRecoveryServicesClient + { + /// + /// Gets Azure Site Recovery Servers. + /// + /// Server list response + public ServerListResponse GetAzureSiteRecoveryServer() + { + return this.GetSiteRecoveryClient().Servers.List(this.GetRequestHeaders()); + } + + /// + /// Gets Azure Site Recovery Server. + /// + /// Server ID + /// Server response + public ServerResponse GetAzureSiteRecoveryServer(string serverId) + { + return this.GetSiteRecoveryClient().Servers.Get(serverId, this.GetRequestHeaders()); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/PSRecoveryServicesClient/PSRecoveryServicesVMClient.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/PSRecoveryServicesClient/PSRecoveryServicesVMClient.cs new file mode 100644 index 000000000000..4fbaea6a422b --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/PSRecoveryServicesClient/PSRecoveryServicesVMClient.cs @@ -0,0 +1,51 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Management.SiteRecovery; +using Microsoft.WindowsAzure.Management.SiteRecovery.Models; + +namespace Microsoft.Azure.Commands.RecoveryServices +{ + /// + /// Recovery services convenience client. + /// + public partial class PSRecoveryServicesClient + { + /// + /// Gets Azure Site Recovery Virtual Machines. + /// + /// Protection Container ID + /// Virtual Machine list response + public VirtualMachineListResponse GetAzureSiteRecoveryVirtualMachine( + string protectionContainerId) + { + return this.GetSiteRecoveryClient().Vm.List(protectionContainerId, this.GetRequestHeaders()); + } + + /// + /// Gets Azure Site Recovery Virtual Machine. + /// + /// Protection Container ID + /// Virtual Machine ID + /// Virtual Machine response + public VirtualMachineResponse GetAzureSiteRecoveryVirtualMachine( + string protectionContainerId, + string virtualMachineId) + { + return this.GetSiteRecoveryClient().Vm.Get(protectionContainerId, virtualMachineId, this.GetRequestHeaders()); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/PSRecoveryServicesClient/PSRecoveryServicesVMGroupClient.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/PSRecoveryServicesClient/PSRecoveryServicesVMGroupClient.cs new file mode 100644 index 000000000000..f16cb4c1584e --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/PSRecoveryServicesClient/PSRecoveryServicesVMGroupClient.cs @@ -0,0 +1,51 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Management.SiteRecovery; +using Microsoft.WindowsAzure.Management.SiteRecovery.Models; + +namespace Microsoft.Azure.Commands.RecoveryServices +{ + /// + /// Recovery services convenience client. + /// + public partial class PSRecoveryServicesClient + { + /// + /// Retrieves Virtual Machine group. + /// + /// Protection Container ID + /// Virtual Machine group list response + public VirtualMachineGroupListResponse GetAzureSiteRecoveryVirtualMachineGroup( + string protectionContainerId) + { + return this.GetSiteRecoveryClient().VmGroup.List(protectionContainerId, this.GetRequestHeaders()); + } + + /// + /// Retrieves Virtual Machine group. + /// + /// Protection Container ID + /// Virtual Machine group ID + /// Virtual Machine group response + public VirtualMachineGroupResponse GetAzureSiteRecoveryVirtualMachineGroup( + string protectionContainerId, + string virtualMachineGroupId) + { + return this.GetSiteRecoveryClient().VmGroup.Get(protectionContainerId, virtualMachineGroupId, this.GetRequestHeaders()); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Properties/AssemblyInfo.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..66151ce08165 --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft Azure Powershell")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Microsoft Azure Powershell")] +[assembly: AssemblyCopyright("Copyright © Microsoft")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +[assembly: AssemblyVersion("0.8.3")] +[assembly: AssemblyFileVersion("0.8.3")] +[assembly: CLSCompliant(false)] diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Properties/Resources.Designer.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Properties/Resources.Designer.cs new file mode 100644 index 000000000000..a344efd311f0 --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Properties/Resources.Designer.cs @@ -0,0 +1,275 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.Azure.Commands.RecoveryServices.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Azure.Commands.RecoveryServices.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Operation Failed. + ///Message: {0} + ///Possible Causes: {1} + ///Recommended Action: {2} + ///ClientRequestId: {3}. + /// + internal static string CloudExceptionDetails { + get { + return ResourceManager.GetString("CloudExceptionDetails", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cloud Service name mentioned is either null or empty. + /// + internal static string CloudServiceNameNullOrEmpty { + get { + return ResourceManager.GetString("CloudServiceNameNullOrEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure want to disable protection on {0}. + /// + internal static string DisableProtectionWarning { + get { + return ResourceManager.GetString("DisableProtectionWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}s protection. + /// + internal static string DisableProtectionWhatIfMessage { + get { + return ResourceManager.GetString("DisableProtectionWhatIfMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation failed. + ///{0}. + /// + internal static string InvalidCloudExceptionErrorMessage { + get { + return ResourceManager.GetString("InvalidCloudExceptionErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cloud Service is not associated with the selected Subscription. + /// + internal static string InvalidCloudService { + get { + return ResourceManager.GetString("InvalidCloudService", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resource is not associted with the selected Cloud Service. + /// + internal static string InvalidResource { + get { + return ResourceManager.GetString("InvalidResource", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to XML is malformed or file is empty, exception details: {0}. + /// + internal static string InvalidXml { + get { + return ResourceManager.GetString("InvalidXml", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Vault Key value is missing. Please import Vault Settings and verify the same. + /// + internal static string MissingChannelIntergrityKey { + get { + return ResourceManager.GetString("MissingChannelIntergrityKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Vault Settings are missing. Please import Vault Settings and verify the same. + /// + internal static string MissingVaultSettings { + get { + return ResourceManager.GetString("MissingVaultSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RecoveryServices client is null, please check Resource, Cloud Service information in Vault Settings. + /// + internal static string NullRecoveryServicesClient { + get { + return ResourceManager.GetString("NullRecoveryServicesClient", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Protection Container {0} is not associated with the Vault {1}. + /// + internal static string ProtectionContainerNotFound { + get { + return ResourceManager.GetString("ProtectionContainerNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Protection Entity {0} is not associated with Protection Container {1}. + /// + internal static string ProtectionEntityNotFound { + get { + return ResourceManager.GetString("ProtectionEntityNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Protection Entity {0} is not protected.. + /// + internal static string ProtectionEntityNotProtected { + get { + return ResourceManager.GetString("ProtectionEntityNotProtected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RecoveryPlan {0} is not associated with the Vault {1}. + /// + internal static string RecoveryPlanNotFound { + get { + return ResourceManager.GetString("RecoveryPlanNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure want to remove Recovery Plan {0}. + /// + internal static string RemoveRPWarning { + get { + return ResourceManager.GetString("RemoveRPWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing Recovery Plan. + /// + internal static string RemoveRPWhatIfMessage { + get { + return ResourceManager.GetString("RemoveRPWhatIfMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resource name mentioned is either null or empty. + /// + internal static string ResourceNameNullOrEmpty { + get { + return ResourceManager.GetString("ResourceNameNullOrEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Server {0} is not associated with the Vault {1}. + /// + internal static string ServerNotFound { + get { + return ResourceManager.GetString("ServerNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Vault settings file not found, please pass the file downloaded from portal. + /// + internal static string VaultSettingFileNotFound { + get { + return ResourceManager.GetString("VaultSettingFileNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Virtual Machine Group {0} is not associated with Protection Container {1}. + /// + internal static string VirtualMachineGroupNotFound { + get { + return ResourceManager.GetString("VirtualMachineGroupNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Virtual Machine {0} is not associated with Protection Container {1}. + /// + internal static string VirtualMachineNotFound { + get { + return ResourceManager.GetString("VirtualMachineNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Waiting for completion. + /// + internal static string WaitingForCompletion { + get { + return ResourceManager.GetString("WaitingForCompletion", resourceCulture); + } + } + } +} diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Properties/Resources.resx b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Properties/Resources.resx new file mode 100644 index 000000000000..82650fa7af7f --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Properties/Resources.resx @@ -0,0 +1,194 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Operation Failed. +Message: {0} +Possible Causes: {1} +Recommended Action: {2} +ClientRequestId: {3} + + + Cloud Service name mentioned is either null or empty + + + Operation failed. +{0} + + + Cloud Service is not associated with the selected Subscription + + + Resource is not associted with the selected Cloud Service + + + XML is malformed or file is empty, exception details: {0} + + + Vault Settings are missing. Please import Vault Settings and verify the same + + + RecoveryServices client is null, please check Resource, Cloud Service information in Vault Settings + + + Protection Container {0} is not associated with the Vault {1} + + + RecoveryPlan {0} is not associated with the Vault {1} + + + Resource name mentioned is either null or empty + + + Server {0} is not associated with the Vault {1} + + + Vault settings file not found, please pass the file downloaded from portal + + + Virtual Machine {0} is not associated with Protection Container {1} + + + Virtual Machine Group {0} is not associated with Protection Container {1} + + + Protection Entity {0} is not associated with Protection Container {1} + + + Protection Entity {0} is not protected. + + + Vault Key value is missing. Please import Vault Settings and verify the same + + + Waiting for completion + + + Are you sure want to disable protection on {0} + + + {0}s protection + + + Are you sure want to remove Recovery Plan {0} + + + Removing Recovery Plan + + \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/RecoveryServicesCmdletBase.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/RecoveryServicesCmdletBase.cs new file mode 100644 index 000000000000..a50e303d68f8 --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/RecoveryServicesCmdletBase.cs @@ -0,0 +1,165 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Runtime.Serialization; +using System.Threading; +using System.Xml; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.SiteRecovery.Models; + +namespace Microsoft.Azure.Commands.RecoveryServices +{ + /// + /// The base class for all Windows Azure Recovery Services commands + /// + public abstract class RecoveryServicesCmdletBase : AzurePSCmdlet + { + /// + /// Recovery Services client. + /// + private PSRecoveryServicesClient recoveryServicesClient; + + /// + /// Gets or sets a value indicating whether stop processing has been triggered. + /// + internal bool StopProcessingFlag { get; set; } + + /// + /// Gets Recovery Services client. + /// + internal PSRecoveryServicesClient RecoveryServicesClient + { + get + { + if (this.recoveryServicesClient == null) + { + this.recoveryServicesClient = new PSRecoveryServicesClient(CurrentContext.Subscription); + } + + return this.recoveryServicesClient; + } + } + + /// + /// Exception handler. + /// + /// Exception to handle. + public void HandleException(Exception ex) + { + string clientRequestIdMsg = string.Empty; + if (this.recoveryServicesClient != null) + { + clientRequestIdMsg = "ClientRequestId: " + this.recoveryServicesClient.ClientRequestId + "\n"; + } + + CloudException cloudException = ex as CloudException; + if (cloudException != null) + { + Error error = null; + try + { + using (Stream stream = new MemoryStream()) + { + if (cloudException.ErrorMessage != null) + { + byte[] data = System.Text.Encoding.UTF8.GetBytes(cloudException.ErrorMessage); + stream.Write(data, 0, data.Length); + stream.Position = 0; + + var deserializer = new DataContractSerializer(typeof(Error)); + error = (Error)deserializer.ReadObject(stream); + + throw new InvalidOperationException( + string.Format( + Properties.Resources.CloudExceptionDetails, + error.Message, + error.PossibleCauses, + error.RecommendedAction, + error.ClientRequestId)); + } + else + { + throw new Exception( + string.Format( + Properties.Resources.InvalidCloudExceptionErrorMessage, + clientRequestIdMsg + ex.Message), + ex); + } + } + } + catch (XmlException) + { + throw new XmlException( + string.Format( + Properties.Resources.InvalidCloudExceptionErrorMessage, + cloudException.ErrorMessage), + cloudException); + } + catch (SerializationException) + { + throw new SerializationException( + string.Format( + Properties.Resources.InvalidCloudExceptionErrorMessage, + clientRequestIdMsg + cloudException.ErrorMessage), + cloudException); + } + } + else if (ex.Message != null) + { + throw new Exception( + string.Format( + Properties.Resources.InvalidCloudExceptionErrorMessage, + clientRequestIdMsg + ex.Message), + ex); + } + } + + /// + /// Waits for the job to complete. + /// + /// Id of the job to wait for. + public void WaitForJobCompletion(string jobId) + { + JobResponse jobResponse = null; + do + { + Thread.Sleep(PSRecoveryServicesClient.TimeToSleepBeforeFetchingJobDetailsAgain); + jobResponse = this.RecoveryServicesClient.GetAzureSiteRecoveryJobDetails(jobId); + this.WriteProgress( + new System.Management.Automation.ProgressRecord( + 0, + Properties.Resources.WaitingForCompletion, + jobResponse.Job.State)); + } + while (!(jobResponse.Job.State == JobStatus.Cancelled || + jobResponse.Job.State == JobStatus.Failed || + jobResponse.Job.State == JobStatus.Suspended || + jobResponse.Job.State == JobStatus.Succeeded || + this.StopProcessingFlag)); + } + + /// + /// Handles interrupts. + /// + protected override void StopProcessing() + { + // Ctrl + C and etc + base.StopProcessing(); + this.StopProcessingFlag = true; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/CreateAzureSiteRecoveryRecoveryPlan.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/CreateAzureSiteRecoveryRecoveryPlan.cs new file mode 100644 index 000000000000..7ab4f4bd117c --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/CreateAzureSiteRecoveryRecoveryPlan.cs @@ -0,0 +1,85 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Diagnostics; +using System.Management.Automation; +using System.Threading; +using Microsoft.Azure.Commands.RecoveryServices.SiteRecovery; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Management.SiteRecovery.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.Azure.Commands.RecoveryServices +{ + /// + /// Used to initiate a recovery plan create operation. + /// + [Cmdlet(VerbsCommon.New, "AzureSiteRecoveryRecoveryPlan")] + [OutputType(typeof(ASRJob))] + public class CreateAzureSiteRecoveryRecoveryPlan : RecoveryServicesCmdletBase + { + #region Parameters + /// + /// Job response. + /// + private JobResponse jobResponse = null; + + /// + /// Gets or sets XML file path of the Recovery Plan. + /// + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string File {get; set;} + + /// + /// Gets or sets switch parameter. This is required to wait for job completion. + /// + [Parameter] + public SwitchParameter WaitForCompletion { get; set; } + #endregion Parameters + + /// + /// ProcessRecord of the command. + /// + public override void ExecuteCmdlet() + { + try + { + string recoveryPlanXml = FileUtilities.DataStore.ReadFileAsText(this.File); + this.jobResponse = RecoveryServicesClient.CreateAzureSiteRecoveryRecoveryPlan( + recoveryPlanXml); + this.WriteJob(this.jobResponse.Job); + + if (this.WaitForCompletion.IsPresent) + { + this.WaitForJobCompletion(this.jobResponse.Job.ID); + } + } + catch (Exception exception) + { + this.HandleException(exception); + } + } + + /// + /// Writes Job + /// + /// Job object + private void WriteJob(Microsoft.WindowsAzure.Management.SiteRecovery.Models.Job job) + { + this.WriteObject(new ASRJob(job)); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/GetAzureSiteRecoveryJob.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/GetAzureSiteRecoveryJob.cs new file mode 100644 index 000000000000..d562714aae4c --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/GetAzureSiteRecoveryJob.cs @@ -0,0 +1,146 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using Microsoft.Azure.Commands.RecoveryServices.SiteRecovery; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Management.SiteRecovery.Models; + +namespace Microsoft.Azure.Commands.RecoveryServices +{ + /// + /// Retrieves Azure site Recovery Job. + /// + [Cmdlet(VerbsCommon.Get, "AzureSiteRecoveryJob", DefaultParameterSetName = ASRParameterSets.ByParam)] + [OutputType(typeof(IEnumerable))] + public class GetAzureSiteRecoveryJob : RecoveryServicesCmdletBase + { + #region Parameters + /// + /// Gets or sets Job ID. + /// + [Parameter(ParameterSetName = ASRParameterSets.ById, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Id {get; set;} + + /// + /// Gets or sets Job Object. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByObject, Mandatory = true, ValueFromPipeline = true)] + [ValidateNotNullOrEmpty] + public ASRJob Job { get; set; } + + /// + /// Gets or sets start time. Allows to filter the list of jobs started after the given + /// start time. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByParam, HelpMessage = "Represents start time of jobs to querying, jobs with the start time later than this will be returned")] + [ValidateNotNullOrEmpty] + public DateTime? StartTime { get; set; } + + /// + /// Gets or sets state. Take string input for possible States of ASR Job. Use this parameter + /// to get filtered view of Jobs + /// + /// Considered Valid states from WorkflowStatus enum in SRS (WorkflowData.cs) + [Parameter(ParameterSetName = ASRParameterSets.ByParam, HelpMessage = "State of job to return.")] + [ValidateNotNullOrEmpty] + [ValidateSet( + "NotStarted", + "InProgress", + "Succeeded", + "Other", + "Failed", + "Cancelled", + "Suspended")] + public string State {get; set;} + #endregion Parameters + + /// + /// ProcessRecord of the command. + /// + public override void ExecuteCmdlet() + { + try + { + switch (this.ParameterSetName) + { + case ASRParameterSets.ByObject: + this.Id = this.Job.ID; + this.GetById(); + break; + + case ASRParameterSets.ById: + this.GetById(); + break; + + case ASRParameterSets.ByParam: + default: + this.GetByParam(); + break; + } + } + catch (Exception exception) + { + this.HandleException(exception); + } + } + + /// + /// Queries by ID. + /// + private void GetById() + { + this.WriteJob(RecoveryServicesClient.GetAzureSiteRecoveryJobDetails(this.Id).Job); + } + + /// + /// Queries by Parameters. + /// + private void GetByParam() + { + JobQueryParameter jqp = new JobQueryParameter(); + + if (this.StartTime.HasValue) + { + jqp.StartTime = + this.StartTime.Value.ToUniversalTime().ToBinary().ToString(); + } + + jqp.State = this.State; + this.WriteJobs(RecoveryServicesClient.GetAzureSiteRecoveryJob(jqp).Jobs); + } + + /// + /// Writes Job. + /// + /// JOB object + private void WriteJob(Microsoft.WindowsAzure.Management.SiteRecovery.Models.Job job) + { + this.WriteObject(new ASRJob(job)); + } + + /// + /// Writes Jobs. + /// + /// Job objects + private void WriteJobs(IList jobs) + { + this.WriteObject(jobs.Select(j => new ASRJob(j)), true); + } + } +} diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/GetAzureSiteRecoveryProtectionContainer.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/GetAzureSiteRecoveryProtectionContainer.cs new file mode 100644 index 000000000000..4e4988c52081 --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/GetAzureSiteRecoveryProtectionContainer.cs @@ -0,0 +1,144 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using Microsoft.Azure.Commands.RecoveryServices.SiteRecovery; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Management.SiteRecovery.Models; + +namespace Microsoft.Azure.Commands.RecoveryServices +{ + /// + /// Retrieves Azure Site Recovery Protection Container. + /// + [Cmdlet(VerbsCommon.Get, "AzureSiteRecoveryProtectionContainer", DefaultParameterSetName = ASRParameterSets.Default)] + [OutputType(typeof(IEnumerable))] + public class GetAzureSiteRecoveryProtectionContainer : RecoveryServicesCmdletBase + { + #region Parameters + /// + /// Gets or sets ID of the Protection Container. + /// + [Parameter(ParameterSetName = ASRParameterSets.ById, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Id {get; set;} + + /// + /// Gets or sets name of the Protection Container. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByName, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Name {get; set;} + #endregion Parameters + + /// + /// ProcessRecord of the command. + /// + public override void ExecuteCmdlet() + { + try + { + switch (this.ParameterSetName) + { + case ASRParameterSets.ByName: + this.GetByName(); + break; + case ASRParameterSets.ById: + this.GetById(); + break; + case ASRParameterSets.Default: + this.GetByDefault(); + break; + } + } + catch (Exception exception) + { + this.HandleException(exception); + } + } + + /// + /// Queries by name. + /// + private void GetByName() + { + ProtectionContainerListResponse protectionContainerListResponse = + RecoveryServicesClient.GetAzureSiteRecoveryProtectionContainer(); + + bool found = false; + foreach ( + ProtectionContainer protectionContainer in + protectionContainerListResponse.ProtectionContainers) + { + if (0 == string.Compare(this.Name, protectionContainer.Name, true)) + { + this.WriteProtectionContainer(protectionContainer); + found = true; + } + } + + if (!found) + { + throw new InvalidOperationException( + string.Format( + Properties.Resources.ProtectionContainerNotFound, + this.Name, + PSRecoveryServicesClient.asrVaultCreds.ResourceName)); + } + } + + /// + /// Queries by ID. + /// + private void GetById() + { + ProtectionContainerResponse protectionContainerResponse = + RecoveryServicesClient.GetAzureSiteRecoveryProtectionContainer(this.Id); + + this.WriteProtectionContainer(protectionContainerResponse.ProtectionContainer); + } + + /// + /// Queries all, by default. + /// + private void GetByDefault() + { + ProtectionContainerListResponse protectionContainerListResponse = + RecoveryServicesClient.GetAzureSiteRecoveryProtectionContainer(); + + this.WriteProtectionContainers(protectionContainerListResponse.ProtectionContainers); + } + + /// + /// Writes Protection Containers. + /// + /// List of Protection Containers + private void WriteProtectionContainers(IList protectionContainers) + { + this.WriteObject(protectionContainers.Select(pc => new ASRProtectionContainer(pc)), true); + } + + /// + /// Write Protection Container. + /// + /// Protection Container + private void WriteProtectionContainer(ProtectionContainer protectionContainer) + { + this.WriteObject(new ASRProtectionContainer(protectionContainer)); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/GetAzureSiteRecoveryProtectionEntity.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/GetAzureSiteRecoveryProtectionEntity.cs new file mode 100644 index 000000000000..6841b405f626 --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/GetAzureSiteRecoveryProtectionEntity.cs @@ -0,0 +1,179 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using Microsoft.Azure.Commands.RecoveryServices.SiteRecovery; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Management.SiteRecovery.Models; + +namespace Microsoft.Azure.Commands.RecoveryServices +{ + /// + /// Retrieves Azure Site Recovery Protection Entity. + /// + [Cmdlet(VerbsCommon.Get, "AzureSiteRecoveryProtectionEntity", DefaultParameterSetName = ASRParameterSets.ByObject)] + [OutputType(typeof(IEnumerable))] + public class GetAzureSiteRecoveryProtectionEntity : RecoveryServicesCmdletBase + { + #region Parameters + /// + /// Gets or sets ID of the Virtual Machine. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByObjectWithId, Mandatory = true)] + [Parameter(ParameterSetName = ASRParameterSets.ByIDsWithId, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Id {get; set;} + + /// + /// Gets or sets name of the Virtual Machine. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByObjectWithName, Mandatory = true)] + [Parameter(ParameterSetName = ASRParameterSets.ByIDsWithName, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Name {get; set;} + + /// + /// Gets or sets ID of the ProtectionContainer containing the Virtual Machine. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByIDs, Mandatory = true)] + [Parameter(ParameterSetName = ASRParameterSets.ByIDsWithId, Mandatory = true)] + [Parameter(ParameterSetName = ASRParameterSets.ByIDsWithName, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ProtectionContainerId {get; set;} + + /// + /// Gets or sets Server Object. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByObject, Mandatory = true, ValueFromPipeline = true)] + [Parameter(ParameterSetName = ASRParameterSets.ByObjectWithId, Mandatory = true)] + [Parameter(ParameterSetName = ASRParameterSets.ByObjectWithName, Mandatory = true)] + [ValidateNotNullOrEmpty] + public ASRProtectionContainer ProtectionContainer {get; set;} + #endregion Parameters + + /// + /// ProcessRecord of the command. + /// + public override void ExecuteCmdlet() + { + try + { + switch (this.ParameterSetName) + { + case ASRParameterSets.ByObject: + case ASRParameterSets.ByObjectWithId: + case ASRParameterSets.ByObjectWithName: + this.ProtectionContainerId = this.ProtectionContainer.ID; + break; + case ASRParameterSets.ByIDs: + case ASRParameterSets.ByIDsWithId: + case ASRParameterSets.ByIDsWithName: + break; + } + + if (this.Id != null) + { + this.GetById(); + } + else if (this.Name != null) + { + this.GetByName(); + } + else + { + this.GetAll(); + } + } + catch (Exception exception) + { + this.HandleException(exception); + } + } + + /// + /// Queries by name. + /// + private void GetByName() + { + ProtectionEntityListResponse protectionEntityListResponse = + RecoveryServicesClient.GetAzureSiteRecoveryProtectionEntity( + this.ProtectionContainerId); + + bool found = false; + foreach (ProtectionEntity pe in protectionEntityListResponse.ProtectionEntities) + { + if (0 == string.Compare(this.Name, pe.Name, true)) + { + this.WriteProtectionEntity(pe); + found = true; + } + } + + if (!found) + { + throw new InvalidOperationException( + string.Format( + Properties.Resources.ProtectionEntityNotFound, + this.Name, + this.ProtectionContainerId)); + } + } + + /// + /// Queries by Id. + /// + private void GetById() + { + ProtectionEntityResponse protectionEntityResponse = + RecoveryServicesClient.GetAzureSiteRecoveryProtectionEntity( + this.ProtectionContainerId, + this.Id); + + this.WriteProtectionEntity(protectionEntityResponse.ProtectionEntity); + } + + /// + /// Queries all. + /// + private void GetAll() + { + ProtectionEntityListResponse protectionEntityListResponse = + RecoveryServicesClient.GetAzureSiteRecoveryProtectionEntity( + this.ProtectionContainerId); + + this.WriteProtectionEntities(protectionEntityListResponse.ProtectionEntities); + } + + /// + /// Writes Protection Entities. + /// + /// Protection Entities + private void WriteProtectionEntities(IList protectionEntities) + { + this.WriteObject(protectionEntities.Select(pe => new ASRProtectionEntity(pe)), true); + } + + /// + /// Writes Protection Entity. + /// + /// Protection Entity + private void WriteProtectionEntity(ProtectionEntity pe) + { + this.WriteObject(new ASRProtectionEntity(pe)); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/GetAzureSiteRecoveryRecoveryPlan.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/GetAzureSiteRecoveryRecoveryPlan.cs new file mode 100644 index 000000000000..a4057970e8fa --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/GetAzureSiteRecoveryRecoveryPlan.cs @@ -0,0 +1,142 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using System.Linq; +using Microsoft.Azure.Commands.RecoveryServices.SiteRecovery; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Management.SiteRecovery.Models; + +namespace Microsoft.Azure.Commands.RecoveryServices +{ + /// + /// Retrieves Azure Site Recovery Recovery Plan. + /// + [Cmdlet(VerbsCommon.Get, "AzureSiteRecoveryRecoveryPlan", DefaultParameterSetName = ASRParameterSets.Default)] + [OutputType(typeof(IEnumerable))] + public class GetAzureSiteRecoveryRecoveryPlan : RecoveryServicesCmdletBase + { + #region Parameters + /// + /// Gets or sets Recovery Plan ID. + /// + [Parameter(ParameterSetName = ASRParameterSets.ById, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Id { get; set; } + + /// + /// Gets or sets name of the Recovery Plan. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByName, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Name {get; set;} + #endregion Parameters + + /// + /// ProcessRecord of the command. + /// + public override void ExecuteCmdlet() + { + try + { + switch (this.ParameterSetName) + { + case ASRParameterSets.ByName: + this.GetByName(); + break; + case ASRParameterSets.ById: + this.GetById(); + break; + case ASRParameterSets.Default: + this.GetByDefault(); + break; + } + } + catch (Exception exception) + { + this.HandleException(exception); + } + } + + /// + /// Queries by name. + /// + private void GetByName() + { + RecoveryPlanListResponse recoveryPlanListResponse = + RecoveryServicesClient.GetAzureSiteRecoveryRecoveryPlan(); + + bool found = false; + foreach (RecoveryPlan recoveryPlan in recoveryPlanListResponse.RecoveryPlans) + { + if (0 == string.Compare(this.Name, recoveryPlan.Name, true)) + { + this.WriteRecoveryPlan(recoveryPlan); + found = true; + } + } + + if (!found) + { + throw new InvalidOperationException( + string.Format( + Properties.Resources.RecoveryPlanNotFound, + this.Name, + PSRecoveryServicesClient.asrVaultCreds.ResourceName)); + } + } + + /// + /// Queries by ID. + /// + private void GetById() + { + RecoveryPlanResponse recoveryPlanResponse = + RecoveryServicesClient.GetAzureSiteRecoveryRecoveryPlan(this.Id); + + this.WriteRecoveryPlan(recoveryPlanResponse.RecoveryPlan); + } + + /// + /// Queries all / by default. + /// + private void GetByDefault() + { + RecoveryPlanListResponse recoveryPlanListResponse = + RecoveryServicesClient.GetAzureSiteRecoveryRecoveryPlan(); + + this.WriteRecoveryPlans(recoveryPlanListResponse.RecoveryPlans); + } + + /// + /// Writes Recovery Plans. + /// + /// List of Recovery Plans + private void WriteRecoveryPlans(IList recoveryPlans) + { + this.WriteObject(recoveryPlans.Select(rp => new ASRRecoveryPlan(rp)), true); + } + + /// + /// Writes Recovery Plan. + /// + /// Recovery Plan + private void WriteRecoveryPlan(RecoveryPlan recoveryPlan) + { + this.WriteObject(new ASRRecoveryPlan(recoveryPlan)); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/GetAzureSiteRecoveryRecoveryPlanFile.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/GetAzureSiteRecoveryRecoveryPlanFile.cs new file mode 100644 index 000000000000..2050c35aa32e --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/GetAzureSiteRecoveryRecoveryPlanFile.cs @@ -0,0 +1,88 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.Azure.Commands.RecoveryServices.SiteRecovery; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Management.SiteRecovery.Models; + +namespace Microsoft.Azure.Commands.RecoveryServices +{ + /// + /// This command will download the xml file for the recovery plan. + /// + [Cmdlet(VerbsCommon.Get, "AzureSiteRecoveryRecoveryPlanFile", DefaultParameterSetName = ASRParameterSets.ByRPObject)] + public class GetAzureSiteRecoveryRecoveryPlanFile : RecoveryServicesCmdletBase + { + #region Parameters + /// + /// Gets or sets XML file path of the Recovery Plan. + /// + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Path {get; set;} + + /// + /// Gets or sets ID of the Recovery Plan. + /// + [Parameter(ParameterSetName = ASRParameterSets.ById, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Id {get; set;} + + /// + /// Gets or sets Recovery Plan object. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByRPObject, Mandatory = true, ValueFromPipeline = true)] + [ValidateNotNullOrEmpty] + public ASRRecoveryPlan RecoveryPlan {get; set;} + #endregion Parameters + + /// + /// ProcessRecord of the command. + /// + public override void ExecuteCmdlet() + { + try + { + switch (this.ParameterSetName) + { + case ASRParameterSets.ByRPObject: + this.Id = this.RecoveryPlan.ID; + break; + + case ASRParameterSets.ById: + break; + } + + this.GetRecoveryPlanFile(); + } + catch (Exception exception) + { + this.HandleException(exception); + } + } + + /// + /// Get the recovery plan xml file. + /// + private void GetRecoveryPlanFile() + { + RecoveryPlanXmlOuput recoveryPlanXmlOuput = + RecoveryServicesClient.GetAzureSiteRecoveryRecoveryPlanFile(this.Id); + System.IO.File.WriteAllText(this.Path, recoveryPlanXmlOuput.RecoveryPlanXml); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/GetAzureSiteRecoveryServer.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/GetAzureSiteRecoveryServer.cs new file mode 100644 index 000000000000..31a8d2dd515e --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/GetAzureSiteRecoveryServer.cs @@ -0,0 +1,142 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using Microsoft.Azure.Commands.RecoveryServices.SiteRecovery; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Management.SiteRecovery.Models; + +namespace Microsoft.Azure.Commands.RecoveryServices +{ + /// + /// Retrieves Azure Site Recovery Server. + /// + [Cmdlet(VerbsCommon.Get, "AzureSiteRecoveryServer", DefaultParameterSetName = ASRParameterSets.Default)] + [OutputType(typeof(IEnumerable))] + public class GetAzureSiteRecoveryServer : RecoveryServicesCmdletBase + { + #region Parameters + /// + /// Gets or sets ID of the Server. + /// + [Parameter(ParameterSetName = ASRParameterSets.ById, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Id {get; set;} + + /// + /// Gets or sets name of the Server. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByName, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Name {get; set;} + #endregion Parameters + + /// + /// ProcessRecord of the command. + /// + public override void ExecuteCmdlet() + { + try + { + switch (this.ParameterSetName) + { + case ASRParameterSets.ByName: + this.GetByName(); + break; + case ASRParameterSets.ById: + this.GetById(); + break; + case ASRParameterSets.Default: + this.GetAll(); + break; + } + } + catch (Exception exception) + { + this.HandleException(exception); + } + } + + /// + /// Queries by name. + /// + private void GetByName() + { + ServerListResponse serverListResponse = + RecoveryServicesClient.GetAzureSiteRecoveryServer(); + + bool found = false; + foreach (Server server in serverListResponse.Servers) + { + if (0 == string.Compare(this.Name, server.Name, true)) + { + this.WriteServer(server); + found = true; + } + } + + if (!found) + { + throw new InvalidOperationException( + string.Format( + Properties.Resources.ServerNotFound, + this.Name, + PSRecoveryServicesClient.asrVaultCreds.ResourceName)); + } + } + + /// + /// Queries by ID. + /// + private void GetById() + { + ServerResponse serverResponse = + RecoveryServicesClient.GetAzureSiteRecoveryServer(this.Id); + + this.WriteServer(serverResponse.Server); + } + + /// + /// Queries all / by default. + /// + private void GetAll() + { + ServerListResponse serverListResponse = + RecoveryServicesClient.GetAzureSiteRecoveryServer(); + + this.WriteServers(serverListResponse.Servers); + } + + /// + /// Write Servers. + /// + /// List of Servers + private void WriteServers(IList servers) + { + this.WriteObject(servers.Select(s => new ASRServer(s)), true); + } + + /// + /// Write Server. + /// + /// Server object + private void WriteServer(Server server) + { + this.WriteObject(new ASRServer(server)); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/GetAzureSiteRecoveryVM.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/GetAzureSiteRecoveryVM.cs new file mode 100644 index 000000000000..63f112cae110 --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/GetAzureSiteRecoveryVM.cs @@ -0,0 +1,179 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using Microsoft.Azure.Commands.RecoveryServices.SiteRecovery; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Management.SiteRecovery.Models; + +namespace Microsoft.Azure.Commands.RecoveryServices +{ + /// + /// Retrieves Azure Site Recovery Virtual Machine. + /// + [Cmdlet(VerbsCommon.Get, "AzureSiteRecoveryVM", DefaultParameterSetName = ASRParameterSets.ByObject)] + [OutputType(typeof(IEnumerable))] + public class GetAzureSiteRecoveryVM : RecoveryServicesCmdletBase + { + #region Parameters + /// + /// Gets or sets ID of the Virtual Machine. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByObjectWithId, Mandatory = true)] + [Parameter(ParameterSetName = ASRParameterSets.ByIDsWithId, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Id {get; set;} + + /// + /// Gets or sets name of the Virtual Machine. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByObjectWithName, Mandatory = true)] + [Parameter(ParameterSetName = ASRParameterSets.ByIDsWithName, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Name {get; set;} + + /// + /// Gets or sets ID of the ProtectionContainer containing the Virtual Machine. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByIDs, Mandatory = true)] + [Parameter(ParameterSetName = ASRParameterSets.ByIDsWithId, Mandatory = true)] + [Parameter(ParameterSetName = ASRParameterSets.ByIDsWithName, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ProtectionContainerId {get; set;} + + /// + /// Gets or sets Protection Container Object. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByObject, Mandatory = true, ValueFromPipeline = true)] + [Parameter(ParameterSetName = ASRParameterSets.ByObjectWithId, Mandatory = true)] + [Parameter(ParameterSetName = ASRParameterSets.ByObjectWithName, Mandatory = true)] + [ValidateNotNullOrEmpty] + public ASRProtectionContainer ProtectionContainer {get; set;} + #endregion Parameters + + /// + /// ProcessRecord of the command. + /// + public override void ExecuteCmdlet() + { + try + { + switch (this.ParameterSetName) + { + case ASRParameterSets.ByObject: + case ASRParameterSets.ByObjectWithId: + case ASRParameterSets.ByObjectWithName: + this.ProtectionContainerId = this.ProtectionContainer.ID; + break; + case ASRParameterSets.ByIDs: + case ASRParameterSets.ByIDsWithId: + case ASRParameterSets.ByIDsWithName: + break; + } + + if (this.Id != null) + { + this.GetById(); + } + else if (this.Name != null) + { + this.GetByName(); + } + else + { + this.GetAll(); + } + } + catch (Exception exception) + { + this.HandleException(exception); + } + } + + /// + /// Queries by name. + /// + private void GetByName() + { + VirtualMachineListResponse virtualMachineListResponse = + RecoveryServicesClient.GetAzureSiteRecoveryVirtualMachine( + this.ProtectionContainerId); + + bool found = false; + foreach (VirtualMachine vm in virtualMachineListResponse.Vms) + { + if (0 == string.Compare(this.Name, vm.Name, true)) + { + this.WriteVirtualMachine(vm); + found = true; + } + } + + if (!found) + { + throw new InvalidOperationException( + string.Format( + Properties.Resources.VirtualMachineNotFound, + this.Name, + this.ProtectionContainerId)); + } + } + + /// + /// Queries by ID. + /// + private void GetById() + { + VirtualMachineResponse virtualMachineResponse = + RecoveryServicesClient.GetAzureSiteRecoveryVirtualMachine( + this.ProtectionContainerId, + this.Id); + + this.WriteVirtualMachine(virtualMachineResponse.Vm); + } + + /// + /// Queries all / by default. + /// + private void GetAll() + { + VirtualMachineListResponse virtualMachineListResponse = + RecoveryServicesClient.GetAzureSiteRecoveryVirtualMachine( + this.ProtectionContainerId); + + this.WriteVirtualMachines(virtualMachineListResponse.Vms); + } + + /// + /// Writes Virtual Machines. + /// + /// List of Virtual Machines + private void WriteVirtualMachines(IList vms) + { + this.WriteObject(vms.Select(vm => new ASRVirtualMachine(vm)), true); + } + + /// + /// Writes Virtual Machine. + /// + /// Virtual Machine + private void WriteVirtualMachine(VirtualMachine vm) + { + this.WriteObject(new ASRVirtualMachine(vm)); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/GetAzureSiteRecoveryVaultSettings.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/GetAzureSiteRecoveryVaultSettings.cs new file mode 100644 index 000000000000..cc447f0f8b11 --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/GetAzureSiteRecoveryVaultSettings.cs @@ -0,0 +1,41 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using Microsoft.Azure.Commands.RecoveryServices.SiteRecovery; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.Azure.Commands.RecoveryServices +{ + /// + /// Retrieves Azure Site Recovery Vault Settings. + /// + [Cmdlet(VerbsCommon.Get, "AzureSiteRecoveryVaultSettings")] + [OutputType(typeof(ASRVaultSettings))] + public class GetAzureSiteRecoveryVaultSettings : RecoveryServicesCmdletBase + { + /// + /// ProcessRecord of the command. + /// + public override void ExecuteCmdlet() + { + this.WriteObject(new ASRVaultSettings( + PSRecoveryServicesClient.asrVaultCreds.ResourceName, + PSRecoveryServicesClient.asrVaultCreds.CloudServiceName)); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/ImportAzureSiteRecoveryVaultSettingsFile.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/ImportAzureSiteRecoveryVaultSettingsFile.cs new file mode 100644 index 000000000000..745c05427592 --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/ImportAzureSiteRecoveryVaultSettingsFile.cs @@ -0,0 +1,140 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Runtime.Serialization; +using System.Xml; +using Microsoft.Azure.Commands.RecoveryServices.SiteRecovery; +using Microsoft.Azure.Portal.RecoveryServices.Models.Common; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.Azure.Commands.RecoveryServices +{ + /// + /// Imports Azure Site Recovery Vault Settings. + /// + [Cmdlet(VerbsData.Import, "AzureSiteRecoveryVaultSettingsFile")] + [OutputType(typeof(ASRVaultSettings))] + public class ImportAzureSiteRecoveryVaultSettingsFile : RecoveryServicesCmdletBase + { + #region Parameters + /// + /// Gets or sets path to the Azure site Recovery Vault Settings file. This file can be + /// downloaded from Azure site recovery Vault portal and stored locally. + /// + [Parameter( + Position = 0, + Mandatory = true, + HelpMessage = "AzureSiteRecovery vault settings file path", + ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public string Path {get; set;} + #endregion Parameters + + /// + /// ProcessRecord of the command. + /// + public override void ExecuteCmdlet() + { + this.WriteVerbose("Vault Settings File path: " + this.Path); + + ASRVaultCreds asrVaultCreds = null; + if (File.Exists(this.Path)) + { + try + { + var serializer = new DataContractSerializer(typeof(ASRVaultCreds)); + using (var s = new FileStream( + this.Path, + FileMode.Open, + FileAccess.Read, + FileShare.Read)) + { + asrVaultCreds = (ASRVaultCreds)serializer.ReadObject(s); + } + } + catch (XmlException xmlException) + { + throw new XmlException( + string.Format(Properties.Resources.InvalidXml, xmlException)); + } + catch (SerializationException serializationException) + { + throw new SerializationException( + string.Format(Properties.Resources.InvalidXml, serializationException)); + } + } + else + { + throw new FileNotFoundException( + Properties.Resources.VaultSettingFileNotFound, + this.Path); + } + + // Validate required parameters taken from the Vault settings file. + if (string.IsNullOrEmpty(asrVaultCreds.ResourceName)) + { + throw new ArgumentException( + Properties.Resources.ResourceNameNullOrEmpty, + asrVaultCreds.ResourceName); + } + + if (string.IsNullOrEmpty(asrVaultCreds.CloudServiceName)) + { + throw new ArgumentException( + Properties.Resources.CloudServiceNameNullOrEmpty, + asrVaultCreds.CloudServiceName); + } + + try + { + RecoveryServicesClient.ValidateVaultSettings( + asrVaultCreds.ResourceName, + asrVaultCreds.CloudServiceName); + + this.ImportAzureSiteRecoveryVaultSettings(asrVaultCreds); + this.WriteObject(new ASRVaultSettings( + asrVaultCreds.ResourceName, + asrVaultCreds.CloudServiceName)); + } + catch (Exception exception) + { + this.HandleException(exception); + } + } + + /// + /// Imports Azure Site Recovery Vault settings. + /// + /// ASR Vault credentials + public void ImportAzureSiteRecoveryVaultSettings(ASRVaultCreds asrVaultCreds) + { + object updateVaultSettingsOneAtATime = new object(); + lock (updateVaultSettingsOneAtATime) + { + PSRecoveryServicesClient.asrVaultCreds.ResourceName = + asrVaultCreds.ResourceName; + PSRecoveryServicesClient.asrVaultCreds.CloudServiceName = + asrVaultCreds.CloudServiceName; + PSRecoveryServicesClient.asrVaultCreds.ChannelIntegrityKey = + asrVaultCreds.ChannelIntegrityKey; + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/RemoveAzureSiteRecoveryRecoveryPlan.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/RemoveAzureSiteRecoveryRecoveryPlan.cs new file mode 100644 index 000000000000..2ce9d782efa1 --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/RemoveAzureSiteRecoveryRecoveryPlan.cs @@ -0,0 +1,121 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Diagnostics; +using System.Management.Automation; +using System.Threading; +using Microsoft.Azure.Commands.RecoveryServices.SiteRecovery; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Management.SiteRecovery.Models; + +namespace Microsoft.Azure.Commands.RecoveryServices +{ + /// + /// Remove a Recovery Plan from the current Azure Site Recovery Vault. + /// + [Cmdlet(VerbsCommon.Remove, "AzureSiteRecoveryRecoveryPlan", DefaultParameterSetName = ASRParameterSets.ByRPObject, SupportsShouldProcess = true)] + [OutputType(typeof(ASRJob))] + public class RemoveAzureSiteRecoveryRecoveryPlan : RecoveryServicesCmdletBase + { + #region Parameters + /// + /// Job response. + /// + private JobResponse jobResponse = null; + + /// + /// Holds either Name (if object is passed) or ID (if IDs are passed) of the PE. + /// + private string targetNameOrId = string.Empty; + + /// + /// Gets or sets ID of the Recovery Plan. + /// + [Parameter(ParameterSetName = ASRParameterSets.ById, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Id {get; set;} + + /// + /// Gets or sets Recovery Plan object. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByRPObject, Mandatory = true, ValueFromPipeline = true)] + [ValidateNotNullOrEmpty] + public ASRRecoveryPlan RecoveryPlan {get; set;} + + /// + /// Gets or sets switch parameter. This is required to wait for job completion. + /// + [Parameter] + public SwitchParameter WaitForCompletion {get; set;} + + /// + /// Gets or sets switch parameter. On passing, command does not ask for confirmation. + /// + [Parameter(Mandatory = false)] + public SwitchParameter Force { get; set; } + #endregion Parameters + + /// + /// ProcessRecord of the command. + /// + public override void ExecuteCmdlet() + { + switch (this.ParameterSetName) + { + case ASRParameterSets.ByRPObject: + this.Id = this.RecoveryPlan.ID; + this.targetNameOrId = this.RecoveryPlan.Name; + break; + case ASRParameterSets.ById: + this.targetNameOrId = this.Id; + break; + } + + ConfirmAction( + Force.IsPresent, + string.Format(Properties.Resources.RemoveRPWarning, this.targetNameOrId), + Properties.Resources.RemoveRPWhatIfMessage, + this.targetNameOrId, + () => + { + try + { + this.jobResponse = RecoveryServicesClient.RemoveAzureSiteRecoveryRecoveryPlan( + this.Id); + this.WriteJob(this.jobResponse.Job); + + string jobId = this.jobResponse.Job.ID; + if (this.WaitForCompletion.IsPresent) + { + this.WaitForJobCompletion(this.jobResponse.Job.ID); + } + } + catch (Exception exception) + { + this.HandleException(exception); + } + }); + } + + /// + /// Writes Job + /// + /// Job object + private void WriteJob(Microsoft.WindowsAzure.Management.SiteRecovery.Models.Job job) + { + this.WriteObject(new ASRJob(job)); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/RestartAzureSiteRecoveryJob.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/RestartAzureSiteRecoveryJob.cs new file mode 100644 index 000000000000..4bdc2dcc68bd --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/RestartAzureSiteRecoveryJob.cs @@ -0,0 +1,87 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.Azure.Commands.RecoveryServices.SiteRecovery; +using Microsoft.WindowsAzure; + +namespace Microsoft.Azure.Commands.RecoveryServices +{ + /// + /// Restarts Azure Site Recovery Job. + /// + [Cmdlet(VerbsLifecycle.Restart, "AzureSiteRecoveryJob", DefaultParameterSetName = ASRParameterSets.ByObject)] + [OutputType(typeof(ASRJob))] + public class RestartAzureSiteRecoveryJob : RecoveryServicesCmdletBase + { + #region Parameters + /// + /// Gets or sets Job ID. + /// + [Parameter(ParameterSetName = ASRParameterSets.ById, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Id {get; set;} + + /// + /// Gets or sets Job Object. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByObject, Mandatory = true, ValueFromPipeline = true)] + [ValidateNotNullOrEmpty] + public ASRJob Job {get; set;} + #endregion Parameters + + /// + /// ProcessRecord of the command. + /// + public override void ExecuteCmdlet() + { + try + { + switch (this.ParameterSetName) + { + case ASRParameterSets.ByObject: + this.Id = this.Job.ID; + this.GetById(); + break; + + case ASRParameterSets.ById: + this.GetById(); + break; + } + } + catch (Exception exception) + { + this.HandleException(exception); + } + } + + /// + /// Queries by ID. + /// + private void GetById() + { + this.WriteJob(RecoveryServicesClient.RestartAzureSiteRecoveryJob(this.Id).Job); + } + + /// + /// Writes Job. + /// + /// JOB object + private void WriteJob(Microsoft.WindowsAzure.Management.SiteRecovery.Models.Job job) + { + this.WriteObject(new ASRJob(job)); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/ResumeAzureSiteRecoveryJob.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/ResumeAzureSiteRecoveryJob.cs new file mode 100644 index 000000000000..577d46915cf3 --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/ResumeAzureSiteRecoveryJob.cs @@ -0,0 +1,103 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.Azure.Commands.RecoveryServices.SiteRecovery; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Management.SiteRecovery.Models; + +namespace Microsoft.Azure.Commands.RecoveryServices +{ + /// + /// Resumes Azure Site Recovery Job. + /// + [Cmdlet(VerbsLifecycle.Resume, "AzureSiteRecoveryJob", DefaultParameterSetName = ASRParameterSets.ByObject)] + [OutputType(typeof(ASRJob))] + public class ResumeAzureSiteRecoveryJob : RecoveryServicesCmdletBase + { + #region Parameters + /// + /// Gets or sets Job ID. + /// + [Parameter(ParameterSetName = ASRParameterSets.ById, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Id {get; set;} + + /// + /// Gets or sets Job Object. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByObject, Mandatory = true, ValueFromPipeline = true)] + [ValidateNotNullOrEmpty] + public ASRJob Job {get; set;} + + /// + /// Gets or sets job comments. + /// + [Parameter(Mandatory = false)] + [ValidateNotNullOrEmpty] + public string Comments {get; set;} + #endregion Parameters + + /// + /// ProcessRecord of the command. + /// + public override void ExecuteCmdlet() + { + try + { + switch (this.ParameterSetName) + { + case ASRParameterSets.ByObject: + this.Id = this.Job.ID; + this.GetById(); + break; + + case ASRParameterSets.ById: + this.GetById(); + break; + } + } + catch (Exception exception) + { + this.HandleException(exception); + } + } + + /// + /// Queries by ID. + /// + private void GetById() + { + ResumeJobParams resumeJobParams = new ResumeJobParams(); + if (string.IsNullOrEmpty(this.Comments)) + { + this.Comments = " "; + } + + resumeJobParams.Comments = this.Comments; + this.WriteJob( + RecoveryServicesClient.ResumeAzureSiteRecoveryJob(this.Id, resumeJobParams).Job); + } + + /// + /// Writes Job. + /// + /// JOB object + private void WriteJob(Microsoft.WindowsAzure.Management.SiteRecovery.Models.Job job) + { + this.WriteObject(new ASRJob(job)); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/SetAzureSiteRecoveryProtectionEntity.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/SetAzureSiteRecoveryProtectionEntity.cs new file mode 100644 index 000000000000..d53a919984d2 --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/SetAzureSiteRecoveryProtectionEntity.cs @@ -0,0 +1,142 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Diagnostics; +using System.Management.Automation; +using System.Threading; +using Microsoft.Azure.Commands.RecoveryServices.SiteRecovery; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Management.SiteRecovery.Models; + +namespace Microsoft.Azure.Commands.RecoveryServices +{ + /// + /// Set Protection Entity protection state. + /// + [Cmdlet(VerbsCommon.Set, "AzureSiteRecoveryProtectionEntity", DefaultParameterSetName = ASRParameterSets.ByPEObject, SupportsShouldProcess = true)] + [OutputType(typeof(ASRJob))] + public class SetAzureSiteRecoveryProtectionEntity : RecoveryServicesCmdletBase + { + #region Parameters + /// + /// Job response. + /// + private JobResponse jobResponse = null; + + /// + /// Holds either Name (if object is passed) or ID (if IDs are passed) of the PE. + /// + private string targetNameOrId = string.Empty; + + /// + /// Gets or sets ID of the Virtual Machine. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByIDs, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Id {get; set;} + + /// + /// Gets or sets ID of the ProtectionContainer containing the Virtual Machine. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByIDs, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ProtectionContianerId {get; set;} + + /// + /// Gets or sets Protection Entity Object. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByPEObject, Mandatory = true, ValueFromPipeline = true)] + [ValidateNotNullOrEmpty] + public ASRProtectionEntity ProtectionEntity {get; set;} + + /// + /// Gets or sets Protection to set, either enable or disable. + /// + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + [ValidateSet( + PSRecoveryServicesClient.EnableProtection, + PSRecoveryServicesClient.DisableProtection)] + public string Protection {get; set;} + + /// + /// Gets or sets switch parameter. On passing, command waits till completion. + /// + [Parameter] + public SwitchParameter WaitForCompletion {get; set;} + + /// + /// Gets or sets switch parameter. On passing, command does not ask for confirmation. + /// + [Parameter(Mandatory = false)] + public SwitchParameter Force { get; set; } + #endregion Parameters + + /// + /// ProcessRecord of the command. + /// + public override void ExecuteCmdlet() + { + switch (this.ParameterSetName) + { + case ASRParameterSets.ByPEObject: + this.Id = this.ProtectionEntity.ID; + this.ProtectionContianerId = this.ProtectionEntity.ProtectionContainerId; + this.targetNameOrId = this.ProtectionEntity.Name; + break; + case ASRParameterSets.ByIDs: + this.targetNameOrId = this.Id; + break; + } + + ConfirmAction( + Force.IsPresent || 0 != string.CompareOrdinal(this.Protection, PSRecoveryServicesClient.DisableProtection), + string.Format(Properties.Resources.DisableProtectionWarning, this.targetNameOrId), + string.Format(Properties.Resources.DisableProtectionWhatIfMessage, this.Protection), + this.targetNameOrId, + () => + { + try + { + this.jobResponse = + RecoveryServicesClient.SetProtectionOnProtectionEntity( + this.ProtectionContianerId, + this.Id, + this.Protection); + + this.WriteJob(this.jobResponse.Job); + + if (this.WaitForCompletion.IsPresent) + { + this.WaitForJobCompletion(this.jobResponse.Job.ID); + } + } + catch (Exception exception) + { + this.HandleException(exception); + } + }); + } + + /// + /// Writes Job. + /// + /// JOB object + private void WriteJob(Microsoft.WindowsAzure.Management.SiteRecovery.Models.Job job) + { + this.WriteObject(new ASRJob(job)); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/StartAzureSiteRecoveryCommitFailoverJob.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/StartAzureSiteRecoveryCommitFailoverJob.cs new file mode 100644 index 000000000000..685a894945b0 --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/StartAzureSiteRecoveryCommitFailoverJob.cs @@ -0,0 +1,154 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Diagnostics; +using System.Management.Automation; +using System.Threading; +using Microsoft.Azure.Commands.RecoveryServices.SiteRecovery; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Management.SiteRecovery.Models; + +namespace Microsoft.Azure.Commands.RecoveryServices +{ + /// + /// Used to initiate a commit operation. + /// + [Cmdlet(VerbsLifecycle.Start, "AzureSiteRecoveryCommitFailoverJob", DefaultParameterSetName = ASRParameterSets.ByRPId)] + [OutputType(typeof(ASRJob))] + public class StartAzureSiteRecoveryCommitFailoverJob : RecoveryServicesCmdletBase + { + #region Parameters + /// + /// Job response. + /// + private JobResponse jobResponse = null; + + /// + /// Gets or sets ID of the Recovery Plan. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByRPId, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string RPId {get; set;} + + /// + /// Gets or sets ID of the PE. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByPEId, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ProtectionEntityId {get; set;} + + /// + /// Gets or sets ID of the Recovery Plan. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByPEId, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ProtectionContainerId {get; set;} + + /// + /// Gets or sets Recovery Plan object. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByRPObject, Mandatory = true, ValueFromPipeline = true)] + [ValidateNotNullOrEmpty] + public ASRRecoveryPlan RecoveryPlan {get; set;} + + /// + /// Gets or sets Protection Entity object. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByPEObject, Mandatory = true, ValueFromPipeline = true)] + [ValidateNotNullOrEmpty] + public ASRProtectionEntity ProtectionEntity {get; set;} + + /// + /// Gets or sets switch parameter. This is required to wait for job completion. + /// + [Parameter] + public SwitchParameter WaitForCompletion {get; set;} + #endregion Parameters + + /// + /// ProcessRecord of the command. + /// + public override void ExecuteCmdlet() + { + try + { + switch (this.ParameterSetName) + { + case ASRParameterSets.ByRPObject: + this.RPId = this.RecoveryPlan.ID; + this.SetRpCommit(); + break; + case ASRParameterSets.ByPEObject: + this.ProtectionEntityId = this.ProtectionEntity.ID; + this.ProtectionContainerId = this.ProtectionEntity.ProtectionContainerId; + this.SetPECommit(); + break; + case ASRParameterSets.ByPEId: + this.SetPECommit(); + break; + case ASRParameterSets.ByRPId: + this.SetRpCommit(); + break; + } + } + catch (Exception exception) + { + this.HandleException(exception); + } + } + + /// + /// Sets RP Commit. + /// + private void SetRpCommit() + { + this.jobResponse = RecoveryServicesClient.StartAzureSiteRecoveryCommitFailover( + this.RPId); + + this.WriteJob(this.jobResponse.Job); + + if (this.WaitForCompletion.IsPresent) + { + this.WaitForJobCompletion(this.jobResponse.Job.ID); + } + } + + /// + /// Start PE Commit. + /// + private void SetPECommit() + { + this.jobResponse = RecoveryServicesClient.StartAzureSiteRecoveryCommitFailover( + this.ProtectionContainerId, + this.ProtectionEntityId); + + this.WriteJob(this.jobResponse.Job); + + if (this.WaitForCompletion.IsPresent) + { + this.WaitForJobCompletion(this.jobResponse.Job.ID); + } + } + + /// + /// Writes Job + /// + /// Job object + private void WriteJob(Microsoft.WindowsAzure.Management.SiteRecovery.Models.Job job) + { + this.WriteObject(new ASRJob(job)); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/StartAzureSiteRecoveryPlannedFailoverJob.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/StartAzureSiteRecoveryPlannedFailoverJob.cs new file mode 100644 index 000000000000..84a5ce689e80 --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/StartAzureSiteRecoveryPlannedFailoverJob.cs @@ -0,0 +1,172 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Diagnostics; +using System.Management.Automation; +using System.Threading; +using Microsoft.Azure.Commands.RecoveryServices.SiteRecovery; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Management.SiteRecovery.Models; + +namespace Microsoft.Azure.Commands.RecoveryServices +{ + /// + /// Used to initiate a commit operation. + /// + [Cmdlet(VerbsLifecycle.Start, "AzureSiteRecoveryPlannedFailoverJob", DefaultParameterSetName = ASRParameterSets.ByRPId)] + [OutputType(typeof(ASRJob))] + public class StartAzureSiteRecoveryPlannedFailoverJob : RecoveryServicesCmdletBase + { + #region Parameters + /// + /// Job response. + /// + private JobResponse jobResponse = null; + + /// + /// Gets or sets ID of the Recovery Plan. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByRPId, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string RPId {get; set;} + + /// + /// Gets or sets ID of the PE. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByPEId, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ProtectionEntityId {get; set;} + + /// + /// Gets or sets ID of the Recovery Plan. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByPEId, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ProtectionContainerId {get; set;} + + /// + /// Gets or sets Recovery Plan object. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByRPObject, Mandatory = true, ValueFromPipeline = true)] + [ValidateNotNullOrEmpty] + public ASRRecoveryPlan RecoveryPlan {get; set;} + + /// + /// Gets or sets Protection Entity object. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByPEObject, Mandatory = true, ValueFromPipeline = true)] + [ValidateNotNullOrEmpty] + public ASRProtectionEntity ProtectionEntity {get; set;} + + /// + /// Gets or sets Failover direction for the recovery plan. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByRPObject, Mandatory = true)] + [Parameter(ParameterSetName = ASRParameterSets.ByRPId, Mandatory = true)] + [Parameter(ParameterSetName = ASRParameterSets.ByPEObject, Mandatory = true)] + [Parameter(ParameterSetName = ASRParameterSets.ByPEId, Mandatory = true)] + [ValidateSet( + PSRecoveryServicesClient.PrimaryToRecovery, + PSRecoveryServicesClient.RecoveryToPrimary)] + public string Direction {get; set;} + + /// + /// Gets or sets switch parameter. This is required to wait for job completion. + /// + [Parameter] + public SwitchParameter WaitForCompletion {get; set;} + #endregion Parameters + + /// + /// ProcessRecord of the command. + /// + public override void ExecuteCmdlet() + { + try + { + switch (this.ParameterSetName) + { + case ASRParameterSets.ByRPObject: + this.RPId = this.RecoveryPlan.ID; + this.StartRpPlannedFailover(); + break; + case ASRParameterSets.ByPEObject: + this.ProtectionEntityId = this.ProtectionEntity.ID; + this.ProtectionContainerId = this.ProtectionEntity.ProtectionContainerId; + this.StartPEPlannedFailover(); + break; + case ASRParameterSets.ByPEId: + this.StartPEPlannedFailover(); + break; + case ASRParameterSets.ByRPId: + this.StartRpPlannedFailover(); + break; + } + } + catch (Exception exception) + { + this.HandleException(exception); + } + } + + /// + /// Starts PE Planned failover. + /// + private void StartPEPlannedFailover() + { + var pfoReqeust = new PlannedFailoverRequest(); + pfoReqeust.FailoverDirection = this.Direction; + this.jobResponse = + RecoveryServicesClient.StartAzureSiteRecoveryPlannedFailover( + this.ProtectionContainerId, + this.ProtectionEntityId, + pfoReqeust); + this.WriteJob(this.jobResponse.Job); + + if (this.WaitForCompletion.IsPresent) + { + this.WaitForJobCompletion(this.jobResponse.Job.ID); + } + } + + /// + /// Starts RP Planned failover. + /// + private void StartRpPlannedFailover() + { + RpPlannedFailoverRequest recoveryPlanPlannedFailoverRequest = new RpPlannedFailoverRequest(); + recoveryPlanPlannedFailoverRequest.FailoverDirection = this.Direction; + this.jobResponse = RecoveryServicesClient.StartAzureSiteRecoveryPlannedFailover( + this.RPId, + recoveryPlanPlannedFailoverRequest); + + this.WriteJob(this.jobResponse.Job); + + if (this.WaitForCompletion.IsPresent) + { + this.WaitForJobCompletion(this.jobResponse.Job.ID); + } + } + + /// + /// Writes Job. + /// + /// JOB object + private void WriteJob(Microsoft.WindowsAzure.Management.SiteRecovery.Models.Job job) + { + this.WriteObject(new ASRJob(job)); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/StartAzureSiteRecoveryTestFailoverJob.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/StartAzureSiteRecoveryTestFailoverJob.cs new file mode 100644 index 000000000000..226392247725 --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/StartAzureSiteRecoveryTestFailoverJob.cs @@ -0,0 +1,244 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Diagnostics; +using System.Management.Automation; +using System.Threading; +using Microsoft.Azure.Commands.RecoveryServices.SiteRecovery; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Management.SiteRecovery.Models; + +namespace Microsoft.Azure.Commands.RecoveryServices +{ + /// + /// Used to initiate a commit operation. + /// + [Cmdlet(VerbsLifecycle.Start, "AzureSiteRecoveryTestFailoverJob", DefaultParameterSetName = ASRParameterSets.ByRPObject)] + [OutputType(typeof(ASRJob))] + public class StartAzureSiteRecoveryTestFailoverJob : RecoveryServicesCmdletBase + { + #region Parameters + /// + /// Job response. + /// + private JobResponse jobResponse = null; + + /// + /// Network ID. + /// + private string networkId = string.Empty; + + /// + /// Network Type (Logical network or VM network). + /// + private string networkType = string.Empty; + + /// + /// Gets or sets ID of the Recovery Plan. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByRPId, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string RpId {get; set;} + + /// + /// Gets or sets Recovery Plan object. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByRPObject, Mandatory = true, ValueFromPipeline = true)] + [ValidateNotNullOrEmpty] + public ASRRecoveryPlan RecoveryPlan {get; set;} + + /// + /// Gets or sets failover direction for the recovery plan. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByRPObject, Mandatory = true)] + [Parameter(ParameterSetName = ASRParameterSets.ByRPId, Mandatory = true)] + [Parameter(ParameterSetName = ASRParameterSets.ByPEObject, Mandatory = true)] + [Parameter(ParameterSetName = ASRParameterSets.ByPEId, Mandatory = true)] + [ValidateSet( + PSRecoveryServicesClient.PrimaryToRecovery, + PSRecoveryServicesClient.RecoveryToPrimary)] + public string Direction {get; set;} + + /// + /// Gets or sets ID of the PE. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByPEId, Mandatory = true)] + [Parameter(ParameterSetName = ASRParameterSets.ByPEIdWithLogicalNetworkID, Mandatory = true)] + [Parameter(ParameterSetName = ASRParameterSets.ByPEIdWithVMNetworkID, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ProtectionEntityId {get; set;} + + /// + /// Gets or sets ID of the Recovery Plan. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByPEId, Mandatory = true)] + [Parameter(ParameterSetName = ASRParameterSets.ByPEIdWithLogicalNetworkID, Mandatory = true)] + [Parameter(ParameterSetName = ASRParameterSets.ByPEIdWithVMNetworkID, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ProtectionContainerId {get; set;} + + /// + /// Gets or sets Protection Entity object. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByPEObject, Mandatory = true, ValueFromPipeline = true)] + [Parameter(ParameterSetName = ASRParameterSets.ByPEObjectWithLogicalNetworkID, Mandatory = true)] + [Parameter(ParameterSetName = ASRParameterSets.ByPEObjectWithVMNetworkID, Mandatory = true)] + [ValidateNotNullOrEmpty] + public ASRProtectionEntity ProtectionEntity {get; set;} + + /// + /// Gets or sets switch parameter. This is required to wait for job completion. + /// + [Parameter] + public SwitchParameter WaitForCompletion {get; set;} + + /// + /// Gets or sets Logical network ID. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByPEObjectWithLogicalNetworkID, Mandatory = true)] + [Parameter(ParameterSetName = ASRParameterSets.ByPEIdWithLogicalNetworkID, Mandatory = true)] + public string LogicalNetworkId {get; set;} + + /// + /// Gets or sets VM network ID. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByPEObjectWithVMNetworkID, Mandatory = true)] + [Parameter(ParameterSetName = ASRParameterSets.ByPEIdWithVMNetworkID, Mandatory = true)] + public string VmNetworkId {get; set;} + #endregion Parameters + + /// + /// ProcessRecord of the command. + /// + public override void ExecuteCmdlet() + { + try + { + switch (this.ParameterSetName) + { + case ASRParameterSets.ByRPObject: + this.RpId = this.RecoveryPlan.ID; + this.StartRpTestFailover(); + break; + case ASRParameterSets.ByRPId: + this.StartRpTestFailover(); + break; + case ASRParameterSets.ByPEObject: + this.networkType = "DisconnectedVMNetworkTypeForTestFailover"; + this.UpdateRequiredParametersAndStartFailover(); + break; + case ASRParameterSets.ByPEObjectWithLogicalNetworkID: + this.networkType = "CreateVMNetworkTypeForTestFailover"; + this.networkId = this.LogicalNetworkId; + this.UpdateRequiredParametersAndStartFailover(); + break; + case ASRParameterSets.ByPEObjectWithVMNetworkID: + this.networkType = "UseVMNetworkTypeForTestFailover"; + this.networkId = this.VmNetworkId; + this.UpdateRequiredParametersAndStartFailover(); + break; + case ASRParameterSets.ByPEId: + this.StartPETestFailover(); + break; + case ASRParameterSets.ByPEIdWithLogicalNetworkID: + this.networkType = "CreateVMNetworkTypeForTestFailover"; + this.networkId = this.LogicalNetworkId; + this.StartPETestFailover(); + break; + case ASRParameterSets.ByPEIdWithVMNetworkID: + this.networkType = "UseVMNetworkTypeForTestFailover"; + this.networkId = this.VmNetworkId; + this.StartPETestFailover(); + break; + } + } + catch (Exception exception) + { + this.HandleException(exception); + } + } + + /// + /// Starts RP test failover. + /// + private void StartRpTestFailover() + { + RpTestFailoverRequest recoveryPlanTestFailoverRequest = new RpTestFailoverRequest(); + recoveryPlanTestFailoverRequest.FailoverDirection = this.Direction; + this.jobResponse = RecoveryServicesClient.StartAzureSiteRecoveryTestFailover( + this.RpId, + recoveryPlanTestFailoverRequest); + + this.WriteJob(this.jobResponse.Job); + + if (this.WaitForCompletion.IsPresent) + { + this.WaitForJobCompletion(this.jobResponse.Job.ID); + } + } + + /// + /// Starts PE Test failover. + /// + private void StartPETestFailover() + { + var tfoReqeust = new TestFailoverRequest(); + tfoReqeust.NetworkID = this.networkId; + tfoReqeust.FailoverDirection = this.Direction; + tfoReqeust.NetworkType = this.networkType; + tfoReqeust.ReplicationProvider = string.Empty; + tfoReqeust.ReplicationProviderSettings = string.Empty; + + this.jobResponse = + RecoveryServicesClient.StartAzureSiteRecoveryTestFailover( + this.ProtectionContainerId, + this.ProtectionEntityId, + tfoReqeust); + this.WriteJob(this.jobResponse.Job); + + if (this.WaitForCompletion.IsPresent) + { + this.WaitForJobCompletion(this.jobResponse.Job.ID); + } + } + + /// + /// Updates required parameters and starts test failover. + /// + private void UpdateRequiredParametersAndStartFailover() + { + if (!this.ProtectionEntity.Protected) + { + throw new InvalidOperationException( + string.Format( + Properties.Resources.ProtectionEntityNotProtected, + this.ProtectionEntity.Name)); + } + + this.ProtectionContainerId = this.ProtectionEntity.ProtectionContainerId; + this.ProtectionEntityId = this.ProtectionEntity.ID; + this.StartPETestFailover(); + } + + /// + /// Writes Job. + /// + /// JOB object + private void WriteJob(Microsoft.WindowsAzure.Management.SiteRecovery.Models.Job job) + { + this.WriteObject(new ASRJob(job)); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/StartAzureSiteRecoveryUnPlannedFailoverJob.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/StartAzureSiteRecoveryUnPlannedFailoverJob.cs new file mode 100644 index 000000000000..e13d21ee68d8 --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/StartAzureSiteRecoveryUnPlannedFailoverJob.cs @@ -0,0 +1,188 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Diagnostics; +using System.Management.Automation; +using System.Threading; +using Microsoft.Azure.Commands.RecoveryServices.SiteRecovery; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Management.SiteRecovery.Models; + +namespace Microsoft.Azure.Commands.RecoveryServices +{ + /// + /// Used to initiate a commit operation. + /// + [Cmdlet(VerbsLifecycle.Start, "AzureSiteRecoveryUnplannedFailoverJob", DefaultParameterSetName = ASRParameterSets.ByRPId)] + [OutputType(typeof(ASRJob))] + public class StartAzureSiteRecoveryUnplannedFailoverJob : RecoveryServicesCmdletBase + { + #region Parameters + /// + /// Job response. + /// + private JobResponse jobResponse = null; + + /// + /// Gets or sets ID of the Recovery Plan. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByRPId, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string RPId {get; set;} + + /// + /// Gets or sets ID of the PE. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByPEId, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ProtectionEntityId {get; set;} + + /// + /// Gets or sets ID of the Recovery Plan. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByPEId, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ProtectionContainerId {get; set;} + + /// + /// Gets or sets Recovery Plan object. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByRPObject, Mandatory = true, ValueFromPipeline = true)] + [ValidateNotNullOrEmpty] + public ASRRecoveryPlan RecoveryPlan {get; set;} + + /// + /// Gets or sets Protection Entity object. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByPEObject, Mandatory = true, ValueFromPipeline = true)] + [ValidateNotNullOrEmpty] + public ASRProtectionEntity ProtectionEntity {get; set;} + + /// + /// Gets or sets Failover direction for the recovery plan. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByRPObject, Mandatory = true)] + [Parameter(ParameterSetName = ASRParameterSets.ByRPId, Mandatory = true)] + [Parameter(ParameterSetName = ASRParameterSets.ByPEId, Mandatory = true)] + [Parameter(ParameterSetName = ASRParameterSets.ByPEObject, Mandatory = true)] + [ValidateSet( + PSRecoveryServicesClient.PrimaryToRecovery, + PSRecoveryServicesClient.RecoveryToPrimary)] + public string Direction {get; set;} + + /// + /// Gets or sets a value indicating whether primary site actions are required or not. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByRPObject, Mandatory = true)] + [Parameter(ParameterSetName = ASRParameterSets.ByRPId, Mandatory = true)] + public bool PrimaryAction {get; set;} + + /// + /// Gets or sets a value indicating whether can do source site operations. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByPEId, Mandatory = false)] + [Parameter(ParameterSetName = ASRParameterSets.ByPEObject, Mandatory = false)] + public bool PerformSourceSiteOperations {get; set;} + + /// + /// Gets or sets switch parameter. This is required to wait for job completion. + /// + [Parameter] + public SwitchParameter WaitForCompletion {get; set;} + #endregion Parameters + + /// + /// ProcessRecord of the command. + /// + public override void ExecuteCmdlet() + { + try + { + switch (this.ParameterSetName) + { + case ASRParameterSets.ByRPObject: + this.RPId = this.RecoveryPlan.ID; + this.StartRpUnPlannedFailover(); + break; + case ASRParameterSets.ByPEObject: + this.ProtectionEntityId = this.ProtectionEntity.ID; + this.ProtectionContainerId = this.ProtectionEntity.ProtectionContainerId; + this.StartPEUnplannedFailover(); + break; + case ASRParameterSets.ByPEId: + this.StartPEUnplannedFailover(); + break; + case ASRParameterSets.ByRPId: + this.StartRpUnPlannedFailover(); + break; + } + } + catch (Exception exception) + { + this.HandleException(exception); + } + } + + /// + /// Starts PE Unplanned failover. + /// + private void StartPEUnplannedFailover() + { + var ufoReqeust = new UnplannedFailoverRequest(); + ufoReqeust.FailoverDirection = this.Direction; + ufoReqeust.SourceSiteOperations = this.PerformSourceSiteOperations; + this.jobResponse = + RecoveryServicesClient.StartAzureSiteRecoveryUnplannedFailover( + this.ProtectionContainerId, + this.ProtectionEntityId, + ufoReqeust); + this.WriteJob(this.jobResponse.Job); + + if (this.WaitForCompletion.IsPresent) + { + this.WaitForJobCompletion(this.jobResponse.Job.ID); + } + } + + /// + /// Starts RP Planned failover. + /// + private void StartRpUnPlannedFailover() + { + RpUnplannedFailoverRequest recoveryPlanUnPlannedFailoverRequest = new RpUnplannedFailoverRequest(); + recoveryPlanUnPlannedFailoverRequest.FailoverDirection = this.Direction; + recoveryPlanUnPlannedFailoverRequest.PrimaryAction = this.PrimaryAction; + this.jobResponse = RecoveryServicesClient.StartAzureSiteRecoveryUnplannedFailover( + this.RPId, + recoveryPlanUnPlannedFailoverRequest); + + this.WriteJob(this.jobResponse.Job); + + if (this.WaitForCompletion.IsPresent) + { + this.WaitForJobCompletion(this.jobResponse.Job.ID); + } + } + + /// + /// Writes Job. + /// + /// JOB object + private void WriteJob(Microsoft.WindowsAzure.Management.SiteRecovery.Models.Job job) + { + this.WriteObject(new ASRJob(job)); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/StopAzureSiteRecoveryJob.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/StopAzureSiteRecoveryJob.cs new file mode 100644 index 000000000000..8d5bc61347a9 --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/StopAzureSiteRecoveryJob.cs @@ -0,0 +1,78 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.Azure.Commands.RecoveryServices.SiteRecovery; +using Microsoft.WindowsAzure; + +namespace Microsoft.Azure.Commands.RecoveryServices +{ + /// + /// Stops Azure Site Recovery Job. + /// + [Cmdlet(VerbsLifecycle.Stop, "AzureSiteRecoveryJob", DefaultParameterSetName = ASRParameterSets.ByObject)] + [OutputType(typeof(ASRJob))] + public class StopAzureSiteRecoveryJob : RecoveryServicesCmdletBase + { + #region Parameters + /// + /// Gets or sets Job ID. + /// + [Parameter(ParameterSetName = ASRParameterSets.ById, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Id {get; set;} + + /// + /// Gets or sets Job Object. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByObject, Mandatory = true, ValueFromPipeline = true)] + [ValidateNotNullOrEmpty] + public ASRJob Job {get; set;} + #endregion Parameters + + /// + /// ProcessRecord of the command. + /// + public override void ExecuteCmdlet() + { + try + { + switch (this.ParameterSetName) + { + case ASRParameterSets.ByObject: + this.Id = this.Job.ID; + this.GetById(); + break; + + case ASRParameterSets.ById: + this.GetById(); + break; + } + } + catch (Exception exception) + { + this.HandleException(exception); + } + } + + /// + /// Queries by ID. + /// + private void GetById() + { + RecoveryServicesClient.StopAzureSiteRecoveryJob(this.Id); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/UpdateAzureSiteRecoveryProtectionDirection.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/UpdateAzureSiteRecoveryProtectionDirection.cs new file mode 100644 index 000000000000..6ad03b2da75d --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/UpdateAzureSiteRecoveryProtectionDirection.cs @@ -0,0 +1,181 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Diagnostics; +using System.Management.Automation; +using System.Threading; +using Microsoft.Azure.Commands.RecoveryServices.SiteRecovery; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Management.SiteRecovery.Models; + +namespace Microsoft.Azure.Commands.RecoveryServices +{ + /// + /// Used to initiate a recovery protection operation. + /// + [Cmdlet(VerbsData.Update, "AzureSiteRecoveryProtectionDirection", DefaultParameterSetName = ASRParameterSets.ByRPObject)] + [OutputType(typeof(ASRJob))] + public class UpdateAzureSiteRecoveryProtection : RecoveryServicesCmdletBase + { + #region Parameters + /// + /// Job response. + /// + private JobResponse jobResponse = null; + + /// + /// Gets or sets ID of the Recovery Plan. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByRPId, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string RPId {get; set;} + + /// + /// Gets or sets ID of the PE. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByPEId, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ProtectionEntityId {get; set;} + + /// + /// Gets or sets ID of the Recovery Plan. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByPEId, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ProtectionContainerId {get; set;} + + /// + /// Gets or sets Recovery Plan object. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByRPObject, Mandatory = true, ValueFromPipeline = true)] + [ValidateNotNullOrEmpty] + public ASRRecoveryPlan RecoveryPlan {get; set;} + + /// + /// Gets or sets Protection Entity object. + /// + [Parameter(ParameterSetName = ASRParameterSets.ByPEObject, Mandatory = true, ValueFromPipeline = true)] + [ValidateNotNullOrEmpty] + public ASRProtectionEntity ProtectionEntity {get; set;} + + /// + /// Gets or sets Failover direction for the recovery plan. + /// + [Parameter(Mandatory = true)] + [ValidateSet( + PSRecoveryServicesClient.PrimaryToRecovery, + PSRecoveryServicesClient.RecoveryToPrimary)] + public string Direction {get; set;} + + /// + /// Gets or sets switch parameter. This is required to wait for job completion. + /// + [Parameter] + public SwitchParameter WaitForCompletion {get; set;} + #endregion Parameters + + /// + /// ProcessRecord of the command. + /// + public override void ExecuteCmdlet() + { + try + { + switch (this.ParameterSetName) + { + case ASRParameterSets.ByRPObject: + this.RPId = this.RecoveryPlan.ID; + this.SetRpReprotect(); + break; + case ASRParameterSets.ByPEObject: + this.ProtectionEntityId = this.ProtectionEntity.ID; + this.ProtectionContainerId = this.ProtectionEntity.ProtectionContainerId; + this.SetPEReprotect(); + break; + case ASRParameterSets.ByPEId: + this.SetPEReprotect(); + break; + case ASRParameterSets.ByRPId: + this.SetRpReprotect(); + break; + } + } + catch (Exception exception) + { + this.HandleException(exception); + } + } + + /// + /// Sets RP Recovery protection. + /// + private void SetRpReprotect() + { + this.jobResponse = RecoveryServicesClient.UpdateAzureSiteRecoveryProtection( + this.RPId); + + this.WriteJob(this.jobResponse.Job); + + if (this.WaitForCompletion.IsPresent) + { + this.WaitForJobCompletion(this.jobResponse.Job.ID); + } + } + + /// + /// Set PE protection. + /// + private void SetPEReprotect() + { + if (this.ProtectionEntity == null) + { + ProtectionEntityResponse protectionEntityResponse = + RecoveryServicesClient.GetAzureSiteRecoveryProtectionEntity( + this.ProtectionContainerId, + this.ProtectionEntityId); + this.ProtectionEntity = new ASRProtectionEntity(protectionEntityResponse.ProtectionEntity); + } + + // Until RR is done active location remains same from where FO was initiated. + if ((this.Direction == PSRecoveryServicesClient.PrimaryToRecovery && + this.ProtectionEntity.ActiveLocation != PSRecoveryServicesClient.RecoveryLocation) || + (this.Direction == PSRecoveryServicesClient.RecoveryToPrimary && + this.ProtectionEntity.ActiveLocation != PSRecoveryServicesClient.PrimaryLocation)) + { + throw new ArgumentException("Parameter value is not correct.", "Direction"); + } + + this.jobResponse = RecoveryServicesClient.StartAzureSiteRecoveryReprotection( + this.ProtectionContainerId, + this.ProtectionEntityId); + + this.WriteJob(this.jobResponse.Job); + + if (this.WaitForCompletion.IsPresent) + { + this.WaitForJobCompletion(this.jobResponse.Job.ID); + } + } + + /// + /// Writes Job. + /// + /// JOB object + private void WriteJob(Microsoft.WindowsAzure.Management.SiteRecovery.Models.Job job) + { + this.WriteObject(new ASRJob(job)); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/UpdateAzureSiteRecoveryRecoveryPlan.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/UpdateAzureSiteRecoveryRecoveryPlan.cs new file mode 100644 index 000000000000..d0d5324ec879 --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/UpdateAzureSiteRecoveryRecoveryPlan.cs @@ -0,0 +1,85 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Diagnostics; +using System.Management.Automation; +using System.Threading; +using Microsoft.Azure.Commands.RecoveryServices.SiteRecovery; +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Management.SiteRecovery.Models; + +namespace Microsoft.Azure.Commands.RecoveryServices +{ + /// + /// Used to initiate a recovery plan update operation. + /// + [Cmdlet(VerbsData.Update, "AzureSiteRecoveryRecoveryPlan")] + [OutputType(typeof(ASRJob))] + public class UpdateAzureSiteRecoveryRecoveryPlan : RecoveryServicesCmdletBase + { + #region Parameters + /// + /// Job response. + /// + private JobResponse jobResponse = null; + + /// + /// Gets or sets XML file path of the Recovery Plan. + /// + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string File {get; set;} + + /// + /// Gets or sets switch parameter. This is required to wait for job completion. + /// + [Parameter] + public SwitchParameter WaitForCompletion {get; set;} + #endregion Parameters + + /// + /// ProcessRecord of the command. + /// + public override void ExecuteCmdlet() + { + try + { + string recoveryPlanXml = System.IO.File.ReadAllText(this.File); + + this.jobResponse = RecoveryServicesClient.UpdateAzureSiteRecoveryRecoveryPlan( + recoveryPlanXml); + this.WriteJob(this.jobResponse.Job); + + if (this.WaitForCompletion.IsPresent) + { + this.WaitForJobCompletion(this.jobResponse.Job.ID); + } + } + catch (Exception exception) + { + this.HandleException(exception); + } + } + + /// + /// Writes Job + /// + /// Job object + private void WriteJob(Microsoft.WindowsAzure.Management.SiteRecovery.Models.Job job) + { + this.WriteObject(new ASRJob(job)); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/lib/PSContracts.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/lib/PSContracts.cs new file mode 100644 index 000000000000..2e12a3caa39c --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/lib/PSContracts.cs @@ -0,0 +1,347 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Runtime.Serialization; +using System.Security.Cryptography.X509Certificates; +using System.Text; +using Microsoft.WindowsAzure.Management.SiteRecovery.Models; + +namespace Microsoft.Azure.Commands.RecoveryServices +{ + /// + /// Hash functions which can be used to calculate CIK HMAC. + /// + public enum CikSupportedHashFunctions + { + /// + /// Represents a HMACSHA256 hash function. + /// + HMACSHA256, + + /// + /// Represents a HMACSHA384 hash function. + /// + HMACSHA384, + + /// + /// Represents a HMACSHA512 hash function. + /// + HMACSHA512 + } + + /// + /// Error contract returned when some exception occurs in ASR REST API. + /// + [SuppressMessage( + "Microsoft.StyleCop.CSharp.MaintainabilityRules", + "SA1402:FileMayOnlyContainASingleClass", + Justification = "Keeping all contracts together.")] + [DataContract(Namespace = "http://schemas.microsoft.com/windowsazure")] + public class Error + { + /// + /// Initializes a new instance of the class. + /// + public Error() + { + } + + /// + /// Initializes a new instance of the class with required parameters. + /// + /// Service Error + public Error(ServiceError se) + { + this.ClientRequestId = se.ActivityId; + this.Code = se.Code; + this.Message = se.Message; + this.PossibleCauses = se.PossibleCauses; + this.RecommendedAction = se.RecommendedAction; + } + + /// + /// Initializes a new instance of the class. + /// + /// Service generated error code. + /// Error message. + /// Possible causes of the error. + /// Recommended action to resolve the error. + /// ActivityId in which error occurred. + public Error( + string errorCode, + string message, + string possibleCauses, + string recommendedAction, + string activityId) + { + this.Code = errorCode; + this.Message = message; + this.PossibleCauses = possibleCauses; + this.RecommendedAction = recommendedAction; + this.ClientRequestId = activityId; + } + + /// + /// Gets or sets error code. + /// + [DataMember] + public string Code { get; set; } + + /// + /// Gets or sets error message. + /// + [DataMember] + public string Message { get; set; } + + /// + /// Gets or sets possible causes of error. + /// + [DataMember] + public string PossibleCauses { get; set; } + + /// + /// Gets or sets recommended action to resolve error. + /// + [DataMember] + public string RecommendedAction { get; set; } + + /// + /// Gets or sets client request Id. + /// + [DataMember(Name = "ActivityId")] + public string ClientRequestId { get; set; } + } + + /// + /// CIK token details. + /// + [SuppressMessage( + "Microsoft.StyleCop.CSharp.MaintainabilityRules", + "SA1402:FileMayOnlyContainASingleClass", + Justification = "Keeping all contracts together.")] + [DataContract] + public class CikTokenDetails + { + /// + /// Gets or sets the timestamp before which the token is not valid. + /// + [DataMember] + public DateTime NotBeforeTimestamp { get; set; } + + /// + /// Gets or sets the timestamp after which the token is not valid. + /// + [DataMember] + public DateTime NotAfterTimestamp { get; set; } + + /// + /// Gets or sets the client request Id for the operation linked with this CIK token. + /// + [DataMember] + public string ClientRequestId { get; set; } + + /// + /// Gets or sets Hash function used to calculate the HMAC. + /// + [DataMember] + public string HashFunction { get; set; } + + /// + /// Gets or sets the HMAC generated using the CIK key. + /// + [DataMember] + public string Hmac { get; set; } + + /// + /// Gets or sets Data contract version. + /// + [DataMember(Name = "Version")] + public Version Version { get; set; } + + /// + /// Gets or sets property bag. This property bag is introduced to support addition of any + /// new property in data contract without breaking the existing clients. + /// If any new property needs to be introduced in the contract, + /// add a key value pair for it in this dictionary. + /// + [DataMember] + public Dictionary PropertyBag { get; set; } + + /// + /// Converts the object into string. + /// + /// The string representation. + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.AppendLine("NotBeforeTimestamp: " + this.NotBeforeTimestamp); + sb.AppendLine("NotAfterTimestamp: " + this.NotAfterTimestamp); + sb.AppendLine("ClientRequestId: " + this.ClientRequestId); + sb.AppendLine("Hmac: " + this.Hmac); + return sb.ToString(); + } + } + + /// + /// Possible states of the Job. + /// + public class JobStatus : TaskStatus + { + } + + /// + /// Possible states of the Task. + /// + public class TaskStatus + { + /// + /// TaskStatus NotStarted value. + /// + public static readonly string NotStarted = "NotStarted"; + + /// + /// Status InProgress value. + /// + public static readonly string InProgress = "InProgress"; + + /// + /// Status Succeeded value. + /// + public static readonly string Succeeded = "Succeeded"; + + /// + /// Status Other value. + /// + public static readonly string Other = "Other"; + + /// + /// Status Failed value. + /// + public static readonly string Failed = "Failed"; + + /// + /// Status Cancelled value. + /// + public static readonly string Cancelled = "Cancelled"; + + /// + /// Status Suspended value. + /// + public static readonly string Suspended = "Suspended"; + } +} + +namespace Microsoft.Azure.Portal.RecoveryServices.Models.Common +{ + /// + /// Class to define Vault credentials + /// + [SuppressMessage( + "Microsoft.StyleCop.CSharp.MaintainabilityRules", + "SA1402:FileMayOnlyContainASingleClass", + Justification = "Keeping all contracts together.")] + [DataContract] + public class VaultCreds + { + #region Properties + /// + /// Gets or sets the key name for Namespace entry + /// + [DataMember(Order = 0)] + public string SubscriptionId { get; set; } + + /// + /// Gets or sets the key name for Namespace entry + /// + [DataMember(Order = 1)] + public string ResourceType { get; set; } + + /// + /// Gets or sets the key name for Namespace entry + /// + [DataMember(Order = 2)] + public string ResourceName { get; set; } + + /// + /// Gets or sets the key name for Namespace entry + /// + [DataMember(Order = 3)] + public string ManagementCert { get; set; } + + /// + /// Gets or sets the key name for HostName entry + /// + [DataMember(Order = 4)] + public AcsNamespace AcsNamespace { get; set; } + #endregion + } + + /// + /// Class to define ASR Vault credentials + /// + [SuppressMessage( + "Microsoft.StyleCop.CSharp.MaintainabilityRules", + "SA1402:FileMayOnlyContainASingleClass", + Justification = "Keeping all contracts together.")] + public class ASRVaultCreds : VaultCreds + { + #region Properties + /// + /// Gets or sets the value for ACIK + /// + [DataMember(Order = 0)] + public string ChannelIntegrityKey { get; set; } + + /// + /// Gets or sets the value for cloud service name + /// + [DataMember(Order = 1)] + public string CloudServiceName { get; set; } + + /// + /// Gets or sets the values for the version of the credentials + /// + [DataMember(Order = 2)] + public string Version { get; set; } + #endregion + } + + /// + /// Class to define ACS name space + /// + [SuppressMessage( + "Microsoft.StyleCop.CSharp.MaintainabilityRules", + "SA1402:FileMayOnlyContainASingleClass", + Justification = "Keeping all contracts together.")] + public class AcsNamespace + { + /// + /// Gets or sets Host name + /// + public string HostName { get; set; } + + /// + /// Gets or sets Name space + /// + public string Namespace { get; set; } + + /// + /// Gets or sets Resource provider realm + /// + public string ResourceProviderRealm { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/lib/PSObjects.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/lib/PSObjects.cs new file mode 100644 index 000000000000..f43e6f7ae13b --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/lib/PSObjects.cs @@ -0,0 +1,815 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Linq; +using System.Runtime.Serialization; +using Microsoft.WindowsAzure.Management.SiteRecovery.Models; + +namespace Microsoft.Azure.Commands.RecoveryServices.SiteRecovery +{ + /// + /// Azure Site Recovery Vault Settings. + /// + [SuppressMessage( + "Microsoft.StyleCop.CSharp.MaintainabilityRules", + "SA1402:FileMayOnlyContainASingleClass", + Justification = "Keeping all related objects together.")] + public class ASRVaultSettings + { + /// + /// Initializes a new instance of the class. + /// + public ASRVaultSettings() + { + } + + /// + /// Initializes a new instance of the class with Resource + /// and Cloud Service names. + /// + /// Resource Name + /// Cloud Service Name + public ASRVaultSettings(string resourceName, string cloudServiceName) + { + this.ResourceName = resourceName; + this.CloudServiceName = cloudServiceName; + } + + #region Properties + /// + /// Gets or sets Resource Name. + /// + public string ResourceName { get; set; } + + /// + /// Gets or sets Cloud Service Name. + /// + public string CloudServiceName { get; set; } + #endregion Properties + } + + /// + /// Azure Site Recovery Server. + /// + [SuppressMessage( + "Microsoft.StyleCop.CSharp.MaintainabilityRules", + "SA1402:FileMayOnlyContainASingleClass", + Justification = "Keeping all related objects together.")] + public class ASRServer + { + /// + /// Initializes a new instance of the class. + /// + public ASRServer() + { + } + + /// + /// Initializes a new instance of the class with required + /// parameters. + /// + /// Server object + public ASRServer(Server server) + { + this.ID = server.ID; + this.Name = server.Name; + this.LastHeartbeat = server.LastHeartbeat; + this.ProviderVersion = server.ProviderVersion; + this.ServerVersion = server.ServerVersion; + } + + #region Properties + /// + /// Gets or sets Name of the Server. + /// + public string Name { get; set; } + + /// + /// Gets or sets Server ID. + /// + public string ID { get; set; } + + /// + /// Gets or sets Last communicated time. + /// + public DateTime LastHeartbeat { get; set; } + + /// + /// Gets or sets Provider version. + /// + public string ProviderVersion { get; set; } + + /// + /// Gets or sets Server version. + /// + public string ServerVersion { get; set; } + #endregion + } + + /// + /// Azure Site Recovery Protection Container. + /// + [SuppressMessage( + "Microsoft.StyleCop.CSharp.MaintainabilityRules", + "SA1402:FileMayOnlyContainASingleClass", + Justification = "Keeping all related objects together.")] + public class ASRProtectionContainer + { + /// + /// Initializes a new instance of the class. + /// + public ASRProtectionContainer() + { + } + + /// + /// Initializes a new instance of the class with + /// required parameters. + /// + /// Protection container object + public ASRProtectionContainer(ProtectionContainer pc) + { + this.ID = pc.ID; + this.Name = pc.Name; + this.ConfigurationStatus = pc.ConfigurationStatus; + this.Role = pc.Role; + this.ServerId = pc.ServerId; + this.FabricObjectId = pc.FabricObjectId; + } + + #region Properties + /// + /// Gets or sets name of the Protection container. + /// + public string Name { get; set; } + + /// + /// Gets or sets Protection container ID. + /// + public string ID { get; set; } + + /// + /// Gets or sets Protection container's FabricObjectId. + /// + public string FabricObjectId { get; set; } + + /// + /// Gets or sets Server ID. + /// + public string ServerId { get; set; } + + /// + /// Gets or sets configuration status. + /// + public string ConfigurationStatus { get; set; } + + /// + /// Gets or sets a role of the protection container. + /// + public string Role { get; set; } + + #endregion + } + + /// + /// Azure Site Recovery Virtual Machine. + /// + [SuppressMessage( + "Microsoft.StyleCop.CSharp.MaintainabilityRules", + "SA1402:FileMayOnlyContainASingleClass", + Justification = "Keeping all related objects together.")] + public class ASRVirtualMachine : ASRProtectionEntity + { + /// + /// Initializes a new instance of the class. + /// + public ASRVirtualMachine() + { + } + + public ASRVirtualMachine(VirtualMachine vm) + : base( + vm.ID, + vm.ServerId, + vm.ProtectionContainerId, + vm.Name, + vm.Type, + vm.FabricObjectId, + vm.Protected, + vm.CanCommit, + vm.CanFailover, + vm.CanReverseReplicate, + vm.ActiveLocation, + vm.ProtectionStateDescription, + vm.TestFailoverStateDescription, + vm.ReplicationHealth, + vm.ReplicationProvider) + { + } + + /// + /// Initializes a new instance of the class with required + /// parameters. + /// + /// Virtual Machine ID + /// Server ID + /// Protection Container ID + /// Name of the Virtual Machine + /// Virtual Machine type + /// Fabric object ID + /// Can protected or not + /// Can commit or not + /// Can failover or not + /// Can reverse replicate or not + /// Active location + /// Protection state + /// Test fail over state + /// Replication health + /// Replication provider + public ASRVirtualMachine( + string id, + string serverId, + string protectionContainerId, + string name, + string type, + string fabricObjectId, + bool protectedOrNot, + bool canCommit, + bool canFailover, + bool canReverseReplicate, + string activeLocation, + string protectionStateDescription, + string testFailoverStateDescription, + string replicationHealth, + string replicationProvider) + : base( + id, + serverId, + protectionContainerId, + name, + type, + fabricObjectId, + protectedOrNot, + canCommit, + canFailover, + canReverseReplicate, + activeLocation, + protectionStateDescription, + testFailoverStateDescription, + replicationHealth, + replicationProvider) + { + } + } + + /// + /// Azure Site Recovery Virtual Machine Group. + /// + [SuppressMessage( + "Microsoft.StyleCop.CSharp.MaintainabilityRules", + "SA1402:FileMayOnlyContainASingleClass", + Justification = "Keeping all related objects together.")] + public class ASRVirtualMachineGroup : ASRProtectionEntity + { + /// + /// Initializes a new instance of the class. + /// + public ASRVirtualMachineGroup() + { + } + + /// + /// Initializes a new instance of the class with + /// required parameters. + /// + /// Virtual Machine group ID + /// Server ID + /// Protection Container ID + /// Name of the Virtual Machine + /// Virtual Machine type + /// Fabric object ID + /// Can protected or not + /// Can commit or not + /// Can failover or not + /// Can reverse replicate or not + /// Active location + /// Protection state + /// Test fail over state + /// Replication health + /// Replication provider + /// List of Virtual Machines + public ASRVirtualMachineGroup( + string id, + string serverId, + string protectionContainerId, + string name, + string type, + string fabricObjectId, + bool protectedOrNot, + bool canCommit, + bool canFailover, + bool canReverseReplicate, + string activeLocation, + string protectionState, + string testFailoverState, + string replicationHealth, + string replicationProvider, + IList virtualMachineList) + : base( + id, + serverId, + protectionContainerId, + name, + type, + fabricObjectId, + protectedOrNot, + canCommit, + canFailover, + canReverseReplicate, + activeLocation, + protectionState, + testFailoverState, + replicationHealth, + replicationProvider) + { + this.VirtualMachineList = new List(); + foreach (var vm in virtualMachineList) + { + this.VirtualMachineList.Add( + new ASRVirtualMachine( + vm.ID, + vm.ServerId, + vm.ProtectionContainerId, + vm.Name, + vm.Type, + vm.FabricObjectId, + vm.Protected, + vm.CanCommit, + vm.CanFailover, + vm.CanReverseReplicate, + vm.ActiveLocation, + vm.ProtectionStateDescription, + vm.TestFailoverStateDescription, + vm.ReplicationHealth, + vm.ReplicationProvider)); + } + } + + /// + /// Gets or sets Virtual Machine list. + /// + public List VirtualMachineList { get; set; } + } + + /// + /// Azure Site Recovery Protection Entity. + /// + [SuppressMessage( + "Microsoft.StyleCop.CSharp.MaintainabilityRules", + "SA1402:FileMayOnlyContainASingleClass", + Justification = "Keeping all related objects together.")] + public class ASRProtectionEntity + { + /// + /// Initializes a new instance of the class. + /// + public ASRProtectionEntity() + { + } + + /// + /// Initializes a new instance of the class. + /// + /// Protection entity object to read values from. + public ASRProtectionEntity(ProtectionEntity pe) + { + this.ID = pe.ID; + this.ServerId = pe.ServerId; + this.ProtectionContainerId = pe.ProtectionContainerId; + this.Name = pe.Name; + this.Type = pe.Type; + this.FabricObjectId = + (0 == string.Compare(this.Type, "VirtualMachine", StringComparison.OrdinalIgnoreCase)) ? + pe.FabricObjectId.ToUpper() : + pe.FabricObjectId; + this.Protected = pe.Protected; + this.ProtectionStateDescription = pe.ProtectionStateDescription; + this.CanCommit = pe.CanCommit; + this.CanFailover = pe.CanFailover; + this.CanReverseReplicate = pe.CanReverseReplicate; + this.ReplicationProvider = pe.ReplicationProvider; + this.ActiveLocation = pe.ActiveLocation; + this.ReplicationHealth = pe.ReplicationHealth; + this.TestFailoverStateDescription = pe.TestFailoverStateDescription; + } + + /// + /// Initializes a new instance of the class with + /// required parameters. + /// + /// Protection Entity ID + /// Server ID + /// Protection Container ID + /// Name of the Virtual Machine + /// Virtual Machine type + /// Fabric object ID + /// Can protected or not + /// Can commit or not + /// Can failover or not + /// Can reverse replicate or not + /// Active location + /// Protection state + /// Test fail over state + /// Replication health + /// Replication provider + public ASRProtectionEntity( + string protectionEntityId, + string serverId, + string protectionContainerId, + string name, + string type, + string fabricObjectId, + bool protectedOrNot, + bool canCommit, + bool canFailover, + bool canReverseReplicate, + string activeLocation, + string protectionStateDescription, + string testFailoverStateDescription, + string replicationHealth, + string replicationProvider) + { + this.ID = protectionEntityId; + this.ServerId = serverId; + this.ProtectionContainerId = protectionContainerId; + this.Name = name; + this.Type = type; + this.FabricObjectId = + (0 == string.Compare(this.Type, "VirtualMachine", StringComparison.OrdinalIgnoreCase)) ? + fabricObjectId.ToUpper() : + fabricObjectId; + this.Protected = protectedOrNot; + this.ProtectionStateDescription = protectionStateDescription; + this.CanCommit = canCommit; + this.CanFailover = canFailover; + this.CanReverseReplicate = canReverseReplicate; + this.ReplicationProvider = replicationProvider; + this.ActiveLocation = activeLocation; + this.ReplicationHealth = replicationHealth; + this.TestFailoverStateDescription = testFailoverStateDescription; + } + + /// + /// Gets or sets Name of the Protection entity. + /// + public string Name { get; set; } + + /// + /// Gets or sets Protection entity ID. + /// + public string ID { get; set; } + + /// + /// Gets or sets fabric object ID. + /// + public string FabricObjectId { get; set; } + + /// + /// Gets or sets Protection container ID. + /// + public string ProtectionContainerId { get; set; } + + /// + /// Gets or sets Server ID. + /// + public string ServerId { get; set; } + + /// + /// Gets or sets type of the Protection entity. + /// + public string Type { get; set; } + + /// + /// Gets or sets a value indicating whether it is protected or not. + /// + public bool Protected { get; set; } + + /// + /// Gets or sets a value indicating whether it can be committed or not. + /// + public bool CanCommit { get; set; } + + /// + /// Gets or sets a value indicating whether it can be failed over or not. + /// + public bool CanFailover { get; set; } + + /// + /// Gets or sets a value indicating whether it can be reverse replicated or not. + /// + public bool CanReverseReplicate { get; set; } + + /// + /// Gets or sets a active location of protection entity. + /// + public string ActiveLocation { get; set; } + + /// + /// Gets or sets protection state. + /// + public string ProtectionStateDescription { get; set; } + + /// + /// Gets or sets Replication health. + /// + public string ReplicationHealth { get; set; } + + /// + /// Gets or sets test failover state. + /// + public string TestFailoverStateDescription { get; set; } + + /// + /// Gets or sets Replication provider. + /// + public string ReplicationProvider { get; set; } + } + + /// + /// Task of the Job. + /// + public class ASRTask + { + /// + /// Initializes a new instance of the class. + /// + public ASRTask() + { + } + + /// + /// Initializes a new instance of the class. + /// + /// Task details to load values from. + public ASRTask(AsrTask task) + { + this.ID = task.ID; + this.EndTime = task.EndTime; + this.Name = task.Name; + this.StartTime = task.StartTime; + this.State = task.State; + this.StateDescription = task.StateDescription; + } + + /// + /// Gets or sets the task name. + /// + public string Name { get; set; } + + /// + /// Gets or sets Job ID. + /// + public string ID { get; set; } + + /// + /// Gets or sets the Status. + /// + public string State { get; set; } + + /// + /// Gets or sets the State description, which tells the exact internal state. + /// + public string StateDescription { get; set; } + + /// + /// Gets or sets the start time. + /// + public DateTime StartTime { get; set; } + + /// + /// Gets or sets the end time. + /// + public DateTime EndTime { get; set; } + } + + /// + /// Azure Site Recovery Job. + /// + [SuppressMessage( + "Microsoft.StyleCop.CSharp.MaintainabilityRules", + "SA1402:FileMayOnlyContainASingleClass", + Justification = "Keeping all related objects together.")] + public class ASRJob + { + /// + /// Initializes a new instance of the class. + /// + public ASRJob() + { + } + + /// + /// Initializes a new instance of the class with required parameters. + /// + /// ASR Job object + public ASRJob(Job job) + { + this.ID = job.ID; + this.ClientRequestId = job.ActivityId; + this.State = job.State; + this.StateDescription = job.StateDescription; + this.EndTime = job.EndTimestamp; + this.StartTime = job.StartTimestamp; + this.AllowedActions = job.AllowedActions as List; + this.Name = job.Name; + this.Tasks = new List(); + foreach (var task in job.Tasks) + { + this.Tasks.Add(new ASRTask(task)); + } + + this.Errors = new List(); + + foreach (var error in job.Errors) + { + ASRErrorDetails errorDetails = new ASRErrorDetails(); + errorDetails.TaskId = error.TaskId; + errorDetails.ServiceErrorDetails = new ASRServiceError(error.ServiceErrorDetails); + errorDetails.ProviderErrorDetails = new ASRProviderError(error.ProviderErrorDetails); + this.Errors.Add(errorDetails); + } + } + + #region Properties + /// + /// Gets or sets Job display name. + /// + public string Name { get; set; } + + /// + /// Gets or sets Job ID. + /// + public string ID { get; set; } + + /// + /// Gets or sets Activity ID. + /// + public string ClientRequestId { get; set; } + + /// + /// Gets or sets State of the Job. + /// + public string State { get; set; } + + /// + /// Gets or sets StateDescription of the Job. + /// + public string StateDescription { get; set; } + + /// + /// Gets or sets Start timestamp. + /// + public string StartTime { get; set; } + + /// + /// Gets or sets End timestamp. + /// + public string EndTime { get; set; } + + /// + /// Gets or sets list of allowed actions. + /// + public List AllowedActions { get; set; } + + /// + /// Gets or sets list of tasks. + /// + public List Tasks { get; set; } + + /// + /// Gets or sets list of Errors. + /// + public List Errors { get; set; } + #endregion + } + + /// + /// This class contains the error details per object. + /// + public class ASRErrorDetails + { + /// + /// Gets or sets the Service error details. + /// + public ASRServiceError ServiceErrorDetails { get; set; } + + /// + /// Gets or sets the Provider error details. + /// + public ASRProviderError ProviderErrorDetails { get; set; } + + /// + /// Gets or sets the Id of the task. + /// + public string TaskId { get; set; } + } + + /// + /// This class contains the ASR error details per object. + /// + public class ASRServiceError : Error + { + /// + /// Initializes a new instance of the class with required parameters. + /// + public ASRServiceError() + { + } + + /// + /// Initializes a new instance of the class with required parameters. + /// + /// ServiceError object + public ASRServiceError(ServiceError serviceError) + : base(serviceError) + { + } + } + + /// + /// This class contains the provider error details per object. + /// + public class ASRProviderError + { + /// + /// Initializes a new instance of the class with required parameters. + /// + public ASRProviderError() + { + } + + /// + /// Initializes a new instance of the class with required parameters. + /// + /// ProviderError object + public ASRProviderError(ProviderError error) + { + this.AffectedObjects = error.AffectedObjects; + this.CreationTimeUtc = error.CreationTimeUtc; + this.ErrorCode = error.ErrorCode; + this.ErrorId = error.ErrorId; + this.ErrorLevel = error.ErrorLevel; + this.ErrorMessage = error.ErrorMessage; + this.WorkflowId = error.WorkflowId; + } + + /// + /// Gets or sets the Error code. + /// + public int ErrorCode { get; set; } + + /// + /// Gets or sets the Error message + /// + public string ErrorMessage { get; set; } + + /// + /// Gets or sets the Provider error Id + /// + public string ErrorId { get; set; } + + /// + /// Gets or sets Workflow Id. + /// + public string WorkflowId { get; set; } + + /// + /// Gets or sets the AffectedObjects. + /// + public IDictionary AffectedObjects { get; set; } + + /// + /// Gets or sets the Time of the error creation. + /// + public DateTime CreationTimeUtc { get; set; } + + /// + /// Gets or sets the Error level. + /// + public string ErrorLevel { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/lib/PSParameterSets.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/lib/PSParameterSets.cs new file mode 100644 index 000000000000..d7fab87d4e55 --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/lib/PSParameterSets.cs @@ -0,0 +1,112 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.Azure.Commands.RecoveryServices.SiteRecovery +{ + /// + /// Parameter Sets used for Azure Site Recovery commands. + /// + internal static class ASRParameterSets + { + /// + /// When only RP Object is passed to the command. + /// + internal const string ByRPObject = "ByRPObject"; + + /// + /// When only Object is passed to the command. + /// + internal const string ByObject = "ByObject"; + + /// + /// When only PE Object is passed to the command. + /// + internal const string ByPEObject = "ByPEObject"; + + /// + /// When only PE Object is passed along with logical network ID to the command. + /// + internal const string ByPEObjectWithLogicalNetworkID = "ByPEObjectWithLogicalNetworkID"; + + /// + /// When only PE Object is passed along with VM network ID to the command. + /// + internal const string ByPEObjectWithVMNetworkID = "ByPEObjectWithVMNetworkID"; + + /// + /// When only PC and PE ids are passed to the command. + /// + internal const string ByPEId = "ByPEId"; + + /// + /// When only PC and PE ids are passed along with logical network ID to the command. + /// + internal const string ByPEIdWithLogicalNetworkID = "ByPEIdWithLogicalNetworkID"; + + /// + /// When only PC and PE ids are passed along with VM network ID to the command. + /// + internal const string ByPEIdWithVMNetworkID = "ByPEIdWithVMNetworkID"; + + /// + /// When only ID is passed to the command. + /// + internal const string ById = "ById"; + + /// + /// When only RP ID is passed to the command. + /// + internal const string ByRPId = "ByRPId"; + + /// + /// When only Name is passed to the command. + /// + internal const string ByName = "ByName"; + + /// + /// When nothing is passed to the command. + /// + internal const string Default = "Default"; + + /// + /// When group of IDs are passed to the command. + /// + internal const string ByIDs = "ByIDs"; + + /// + /// When Object and ID are passed to the command. + /// + internal const string ByObjectWithId = "ByObjectWithId"; + + /// + /// When Object and Name are passed to the command. + /// + internal const string ByObjectWithName = "ByObjectWithName"; + + /// + /// When group of IDs and ID are passed to the command. + /// + internal const string ByIDsWithId = "ByIDsWithId"; + + /// + /// When group of IDs and Name are passed to the command. + /// + internal const string ByIDsWithName = "ByIDsWithName"; + + /// + /// When parameters are passed to the command. + /// + internal const string ByParam = "ByParam"; + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/lib/PSRecoveryPlanObjects.cs b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/lib/PSRecoveryPlanObjects.cs new file mode 100644 index 000000000000..31126c35bd4c --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/lib/PSRecoveryPlanObjects.cs @@ -0,0 +1,69 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Runtime.Serialization; +using Microsoft.WindowsAzure.Management.SiteRecovery.Models; + +namespace Microsoft.Azure.Commands.RecoveryServices +{ + /// + /// Azure Site Recovery Recovery Plan. + /// + public class ASRRecoveryPlan + { + /// + /// Initializes a new instance of the class. + /// + public ASRRecoveryPlan() + { + } + + /// + /// Initializes a new instance of the class with required + /// parameters. + /// + /// Recovery plan object + public ASRRecoveryPlan(RecoveryPlan recoveryPlan) + { + this.ID = recoveryPlan.ID; + this.Name = recoveryPlan.Name; + this.ServerId = recoveryPlan.ServerId; + this.TargetServerId = recoveryPlan.TargetServerId; + } + + #region Properties + /// + /// Gets or sets Recovery plan ID. + /// + public string ID { get; set; } + + /// + /// Gets or sets name of the Recovery Plan. + /// + public string Name { get; set; } + + /// + /// Gets or sets to Server ID. + /// + public string ServerId { get; set; } + + /// + /// Gets or sets target Server ID. + /// + public string TargetServerId { get; set; } + + #endregion + } +} \ No newline at end of file diff --git a/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/packages.config b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/packages.config new file mode 100644 index 000000000000..3f0757f68cd5 --- /dev/null +++ b/src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/packages.config @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test.Utilities/CloudService/AzureServiceWrapper.cs b/src/ServiceManagement/Services/Commands.Test.Utilities/CloudService/AzureServiceWrapper.cs new file mode 100644 index 000000000000..fbfe26f2579f --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test.Utilities/CloudService/AzureServiceWrapper.cs @@ -0,0 +1,44 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.CloudService +{ + public class AzureServiceWrapper : CloudServiceProject + { + public AzureServiceWrapper(string rootPath, string serviceName, string scaffoldingPath) : base(rootPath, serviceName, scaffoldingPath) { } + + public AzureServiceWrapper(string rootPath, string scaffoldingPath) : base(rootPath, scaffoldingPath) { } + + public void AddRole(string webScaffolding, string workerScaffolding, int webRole, int workerRole) + { + for (int i = 0; i < webRole; i++) + { + AddWebRole(webScaffolding); + } + + for (int i = 0; i < workerRole; i++) + { + AddWorkerRole(workerScaffolding); + } + } + + public void CreateVirtualCloudPackage() + { + File.Create(Paths.CloudPackage); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test.Utilities/CloudService/RuntimePackageHelper.cs b/src/ServiceManagement/Services/Commands.Test.Utilities/CloudService/RuntimePackageHelper.cs new file mode 100644 index 000000000000..925ee4c687bf --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test.Utilities/CloudService/RuntimePackageHelper.cs @@ -0,0 +1,318 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Xml; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.CloudService +{ + using TestResources = Commands.Common.Test.Properties.Resources; + + public class RuntimePackageHelper + { + /// + /// Write out the test manifest file to a directory under the rootPath + /// + /// The file system helper being used for the test + /// The path to the test manifest file + public static string GetTestManifest(FileSystemHelper helper) + { + string filePath = helper.CreateEmptyFile("testruntimemanifest.xml"); + File.WriteAllText(filePath, TestResources.testruntimemanifest); + return filePath; + } + + /// + /// Set the runtime properties for a role + /// + /// The service containing the role + /// The name of the role to change + /// The path to the service + /// The version of the runtime to be installed + /// The value of the override url, if the user wants to opt out of the system + /// true if the settings were successfully changed + public static bool SetRoleRuntime(ServiceDefinition definition, string roleName, CloudProjectPathInfo path, string version = null, string overrideUrl = null) + { + bool changed = false; + Variable[] environment = GetRoleRuntimeEnvironment(definition, roleName); + if (version != null) + { + string filePath = Path.Combine(path.RootPath, roleName, "package.json"); + File.WriteAllText(filePath, string.Format(TestResources.ValidPackageJson, "testapp", version)); + changed = true; + } + + + if (overrideUrl != null) + { + environment = SetRuntimeEnvironment(environment, Resources.RuntimeOverrideKey, overrideUrl); + changed = true; + } + + return changed && ApplyRuntimeChanges(definition, roleName, environment); + } + + /// + /// Get the resolved runtime url for the runtime that will be installed on the given role + /// + /// The service definition containing the role + /// The name of the role + /// The resolved runtime url for the runtime package to be installed on the role + public static string GetRoleRuntimeUrl(ServiceDefinition definition, string roleName) + { + Variable v = GetRoleRuntimeEnvironment(definition, roleName).FirstOrDefault( + variable => string.Equals(variable.name, Resources.RuntimeUrlKey)); + return (null == v ? null : v.value); + } + + /// + /// Get the override url for the specified role + /// + /// The service definition containing the role + /// The name of the role + /// The user-specified url of a privately hosted runtime to be insytalled on the role (if any) + public static string GetRoleRuntimeOverrideUrl(ServiceDefinition definition, string roleName) + { + Variable v = GetRoleRuntimeEnvironment(definition, roleName).FirstOrDefault( + variable => string.Equals(variable.name, Resources.RuntimeOverrideKey)); + return (null == v ? null : v.value); + } + + /// + /// Validate that the actual role runtime values for the given role match the given expected values + /// + /// The service definition containing the role to validate + /// The name of the role to validate + /// The resolved runtime url for the role + /// The override url for the role runtime + public static void ValidateRoleRuntime(ServiceDefinition definition, string roleName, string runtimeUrl, + string overrideUrl) + { + string actualRuntimeUrl = GetRoleRuntimeUrl(definition, roleName); + string actualOverrideUrl = GetRoleRuntimeOverrideUrl(definition, roleName); + Assert.IsTrue(VerifySetting(runtimeUrl, actualRuntimeUrl), string.Format( + "Actual runtime URL '{0}' does not match expected runtime URL '{1}'", actualRuntimeUrl, runtimeUrl)); + Assert.IsTrue(VerifySetting(overrideUrl, actualOverrideUrl), string.Format( + "Actual override URL '{0}' does not match expected override URL '{1}'", actualOverrideUrl, overrideUrl)); + } + + /// + /// Asserts that given environment variable exists with it's associated value. + /// + /// The role startup + /// The environment variable name + /// The expected value + public static void ValidateRoleRuntimeVariable(Startup roleStartup, string variableName, string expectedValue) + { + string actualValue; + Assert.IsTrue(TryGetEnvironmentValue(roleStartup.Task, variableName, out actualValue)); + Assert.AreEqual(expectedValue, actualValue); + } + + /// + /// Verify that a given role variable setting matches expectations, null, blank, empty and whitespace only values + /// are counted as equivalent + /// + /// The expected value + /// The actual value (from the definition) + /// True if the expected and actaul values match + private static bool VerifySetting(string expected, string actual) + { + if (string.IsNullOrWhiteSpace(expected)) + { + return string.IsNullOrWhiteSpace(actual); + } + + return string.Equals(expected, actual, StringComparison.OrdinalIgnoreCase); + } + + /// + /// Apply the specified Variable values to the specified role's startup task environment + /// + /// The service definition containing the role + /// The name of the role to change + /// The Variables containing the changes + /// true if the variables environment is successfully changed + private static bool ApplyRuntimeChanges(ServiceDefinition definition, string roleName, Variable[] environment) + { + WebRole webRole; + if (TryGetWebRole(definition, roleName, out webRole)) + { + CloudRuntime.GetRuntimeStartupTask(webRole.Startup).Environment = environment; + return true; + } + + WorkerRole workerRole; + if (TryGetWorkerRole(definition, roleName, out workerRole)) + { + CloudRuntime.GetRuntimeStartupTask(workerRole.Startup).Environment = environment; + return true; + } + + return false; + } + + /// + /// Adds the specified runtime environment setting to the specified runtime environment - either changes the setting in + /// the environment if the setting already exists, or adds a new setting if it does not + /// + /// The source runtime environment + /// The variable key + /// The variable value + /// The runtime environment with the given setting applied + private static Variable[] SetRuntimeEnvironment(IEnumerable environment, string keyName, string keyValue) + { + Variable v = environment.FirstOrDefault(variable => string.Equals(variable.name, keyName, + StringComparison.OrdinalIgnoreCase)); + if (v != null) + { + v.value = keyValue; + return environment.ToArray(); + } + else + { + v = new Variable { name = keyName, value = keyValue }; + return environment.Concat(new List { v }).ToArray(); + } + } + + /// + /// Get the startup task environment settings for the given role + /// + /// The definition containign the role + /// The name of the role + /// The environment settings for the role, or null if the role is not found + private static Variable[] GetRoleRuntimeEnvironment(ServiceDefinition definition, string roleName) + { + WebRole webRole; + if (TryGetWebRole(definition, roleName, out webRole)) + { + return CloudRuntime.GetRuntimeStartupTask(webRole.Startup).Environment; + } + + WorkerRole workerRole; + if (TryGetWorkerRole(definition, roleName, out workerRole)) + { + return CloudRuntime.GetRuntimeStartupTask(workerRole.Startup).Environment; + } + + return null; + } + + /// + /// Try to get the specified web role from the given definiiton + /// + /// The service definiiton + /// The name of the role + /// output variable where the webRole is returned + /// true if the web role is found in the given definition + private static bool TryGetWebRole(ServiceDefinition definition, string roleName, out WebRole role) + { + role = definition.WebRole.FirstOrDefault(r => string.Equals(r.name, roleName, + StringComparison.OrdinalIgnoreCase)); + return role != null; + } + + /// + /// Try to get the specified worker role from the given definiiton + /// + /// The service definiiton + /// The name of the role + /// output variable where the worker role is returned + /// true if the web role is found in the given definition + private static bool TryGetWorkerRole(ServiceDefinition definition, string roleName, out WorkerRole role) + { + role = definition.WorkerRole.FirstOrDefault(r => string.Equals(r.name, roleName, + StringComparison.OrdinalIgnoreCase)); + return role != null; + } + + /// + /// Return the value for the specified setting, if it exists in the given runtime environment + /// + /// The runtime environment to search + /// The name of the setting + /// The value of the setting, if it is found, null otherwise + /// true if the setting is found in the given environment + private static bool TryGetEnvironmentValue(Task[] tasks, string key, out string value) + { + value = string.Empty; + + foreach (Task task in tasks) + { + Variable[] environment = task.Environment; + value = null; + if (environment != null) + { + foreach (Variable setting in environment) + { + if (string.Equals(setting.name, key, StringComparison.OrdinalIgnoreCase)) + { + value = setting.value; + return true; + } + } + } + } + + return false; + } + + private static XmlDocument GetManifest(string manifest) + { + XmlDocument document = new XmlDocument(); + document.Load(XmlReader.Create(new MemoryStream(File.ReadAllBytes(manifest)))); + return document; + } + + private static List GetNodesFromManifest(string manifestFile, string runtimeType = null) + { + List packages = new List(); + XmlDocument document = new XmlDocument(); + XmlReader reader = XmlReader.Create(new MemoryStream(File.ReadAllBytes(manifestFile))); + document.Load(reader); + XmlNodeList items = document.SelectNodes("/runtimemanifest/runtimes/runtime"); + foreach (XmlNode node in items) + { + if (string.IsNullOrEmpty(runtimeType) || string.Equals(node.Attributes["type"].Value, runtimeType, StringComparison.OrdinalIgnoreCase)) + { + packages.Add(new CloudRuntimePackage(node, "http://DATACENTER/")); + } + } + + reader.Close(); + return packages; + } + + public static void ValidateRuntimesMatchManifest(string manifestFile, IEnumerable packages, string runtimeType = null) + { + List allPackages = GetNodesFromManifest(manifestFile, runtimeType); + foreach (CloudRuntimePackage package in packages) + { + Assert.AreEqual(1, allPackages.Count( + p => p.Runtime.Equals(package.Runtime) && string.Equals(p.Version, package.Version, + StringComparison.OrdinalIgnoreCase))); + + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test.Utilities/CloudService/ServiceSettingsTestData.cs b/src/ServiceManagement/Services/Commands.Test.Utilities/CloudService/ServiceSettingsTestData.cs new file mode 100644 index 000000000000..5daef7c2c4b8 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test.Utilities/CloudService/ServiceSettingsTestData.cs @@ -0,0 +1,78 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System.Collections.Generic; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.CloudService +{ + class ServiceSettingsTestData + { + // To Do: Add bad cases for ServiceSettings + public List Good; + public List Bad; + public Dictionary Data; + private static ServiceSettingsTestData instance; + + public static ServiceSettingsTestData Instance { get { if (instance == null) instance = new ServiceSettingsTestData(); return instance; } } + + private ServiceSettingsTestData() + { + InitializeGood(); + InitializeBad(); + InitializeData(); + } + + private void InitializeData() + { + ServiceSettings settings; + + Data = new Dictionary(); + Data.Add(ServiceSettingsState.Default, new ServiceSettings()); + + settings = new ServiceSettings(); + settings.Location = "South Central US"; + settings.Slot = DeploymentSlotType.Production; + settings.StorageServiceName = "mystore"; + settings.Subscription = "TestSubscription2"; + Data.Add(ServiceSettingsState.Sample1, settings); + + settings = new ServiceSettings(); + settings.Location = "South Central US"; + settings.Slot = DeploymentSlotType.Production; + settings.StorageServiceName = "mystore"; + settings.Subscription = "Does not exist subscription"; + Data.Add(ServiceSettingsState.DoesNotExistSubscription, settings); + } + + private void InitializeGood() + { + Good = new List(); + } + + private void InitializeBad() + { + Bad = new List(); + } + } + + enum ServiceSettingsState + { + Default, + Sample1, + DoesNotExistSubscription + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test.Utilities/CloudService/SimpleServiceManagement.cs b/src/ServiceManagement/Services/Commands.Test.Utilities/CloudService/SimpleServiceManagement.cs new file mode 100644 index 000000000000..dd15fb89ddea --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test.Utilities/CloudService/SimpleServiceManagement.cs @@ -0,0 +1,2073 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.ServiceModel.Channels; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.CloudService +{ + /// + /// Simple implementation of the IServiceManagement interface that can be + /// used for mocking basic interactions without involving Azure directly. + /// + public class SimpleServiceManagement : IServiceManagement + { + /// + /// Gets or sets a value indicating whether the thunk wrappers will + /// throw an exception if the thunk is not implemented. This is useful + /// when debugging a test. + /// + public bool ThrowsIfNotImplemented { get; set; } + + /// + /// Initializes a new instance of the SimpleServiceManagement class. + /// + public SimpleServiceManagement() + { + ThrowsIfNotImplemented = true; + } + + #region AddCertificates + public Action AddCertificatesThunk { get; set; } + public IAsyncResult BeginAddCertificates(string subscriptionId, string serviceName, CertificateFile input, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["serviceName"] = serviceName; + result.Values["input"] = input; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public void EndAddCertificates(IAsyncResult asyncResult) + { + if (AddCertificatesThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + AddCertificatesThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("AddCertificatesThunk is not implemented!"); + } + } + + #endregion + + #region DeleteCertificate + + public Action DeleteCertificateThunk { get; set; } + + public IAsyncResult BeginDeleteCertificate(string subscriptionId, string serviceName, string thumbprintAlgorithm, string thumbprintInHex, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["serviceName"] = serviceName; + result.Values["thumbprintalgorithm"] = thumbprintAlgorithm; + result.Values["thumbprintInHex"] = thumbprintInHex; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public void EndDeleteCertificate(IAsyncResult asyncResult) + { + if (DeleteCertificateThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + DeleteCertificateThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("DeleteCertificateThunk is not implemented!"); + } + } + + #endregion + + #region GetCertificate + + public Func GetCertificateThunk { get; set; } + + public IAsyncResult BeginGetCertificate(string subscriptionId, string serviceName, string thumbprintAlgorithm, string thumbprintInHex, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["serviceName"] = serviceName; + result.Values["thumbprintAlgorithm"] = thumbprintAlgorithm; + result.Values["thumbprintInHex"] = thumbprintInHex; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public Certificate EndGetCertificate(IAsyncResult asyncResult) + { + if (GetCertificateThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + return GetCertificateThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("GetCertificateThunk is not implemented!"); + } + + return default(Certificate); + } + + #endregion + + #region ListCertificates + + public Func ListCertificatesThunk { get; set; } + + public void EndDeleteDiskEx(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginListCertificates(string subscriptionId, string serviceName, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["serviceName"] = serviceName; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public CertificateList EndListCertificates(IAsyncResult asyncResult) + { + CertificateList certificates = default(CertificateList); + if (ListCertificatesThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + return ListCertificatesThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("ListCertificatesThunk is not implemented!"); + } + + return certificates; + } + #endregion + + #region Autogenerated Thunks + + #region ChangeConfiguration + + public Action ChangeConfigurationThunk { get; set; } + + public IAsyncResult BeginChangeConfiguration(string subscriptionId, string serviceName, string deploymentName, ChangeConfigurationInput input, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["serviceName"] = serviceName; + result.Values["deploymentName"] = deploymentName; + result.Values["input"] = input; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public void EndChangeConfiguration(IAsyncResult asyncResult) + { + if (ChangeConfigurationThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + ChangeConfigurationThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("ChangeConfigurationThunk is not implemented!"); + } + } + #endregion ChangeConfiguration + + #region ChangeConfigurationBySlot + public Action ChangeConfigurationBySlotThunk { get; set; } + + public IAsyncResult BeginChangeConfigurationBySlot(string subscriptionId, string serviceName, string deploymentSlot, ChangeConfigurationInput input, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["serviceName"] = serviceName; + result.Values["deploymentSlot"] = deploymentSlot; + result.Values["input"] = input; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public void EndChangeConfigurationBySlot(IAsyncResult asyncResult) + { + if (ChangeConfigurationBySlotThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + ChangeConfigurationBySlotThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("ChangeConfigurationBySlotThunk is not implemented!"); + } + } + #endregion ChangeConfigurationBySlot + + #region UpdateDeploymentStatus + public Action UpdateDeploymentStatusThunk { get; set; } + + public IAsyncResult BeginUpdateDeploymentStatus(string subscriptionId, string serviceName, string deploymentName, UpdateDeploymentStatusInput input, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["serviceName"] = serviceName; + result.Values["deploymentName"] = deploymentName; + result.Values["input"] = input; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public void EndUpdateDeploymentStatus(IAsyncResult asyncResult) + { + if (UpdateDeploymentStatusThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + UpdateDeploymentStatusThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("UpdateDeploymentStatusThunk is not implemented!"); + } + } + #endregion UpdateDeploymentStatus + + #region UpdateDeploymentStatusBySlot + public Action UpdateDeploymentStatusBySlotThunk { get; set; } + + public IAsyncResult BeginUpdateDeploymentStatusBySlot(string subscriptionId, string serviceName, string deploymentSlot, UpdateDeploymentStatusInput input, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["serviceName"] = serviceName; + result.Values["deploymentSlot"] = deploymentSlot; + result.Values["input"] = input; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public void EndUpdateDeploymentStatusBySlot(IAsyncResult asyncResult) + { + if (UpdateDeploymentStatusBySlotThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + UpdateDeploymentStatusBySlotThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("UpdateDeploymentStatusBySlotThunk is not implemented!"); + } + } + #endregion UpdateDeploymentStatusBySlot + + #region UpgradeDeployment + public Action UpgradeDeploymentThunk { get; set; } + + public IAsyncResult BeginUpgradeDeployment(string subscriptionId, string serviceName, string deploymentName, UpgradeDeploymentInput input, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["serviceName"] = serviceName; + result.Values["deploymentName"] = deploymentName; + result.Values["input"] = input; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public void EndUpgradeDeployment(IAsyncResult asyncResult) + { + if (UpgradeDeploymentThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + UpgradeDeploymentThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("UpgradeDeploymentThunk is not implemented!"); + } + } + #endregion UpgradeDeployment + + #region UpgradeDeploymentBySlot + public Action UpgradeDeploymentBySlotThunk { get; set; } + + public IAsyncResult BeginUpgradeDeploymentBySlot(string subscriptionId, string serviceName, string deploymentSlot, UpgradeDeploymentInput input, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["serviceName"] = serviceName; + result.Values["deploymentSlot"] = deploymentSlot; + result.Values["input"] = input; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public void EndUpgradeDeploymentBySlot(IAsyncResult asyncResult) + { + if (UpgradeDeploymentBySlotThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + UpgradeDeploymentBySlotThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("UpgradeDeploymentBySlotThunk is not implemented!"); + } + } + #endregion UpgradeDeploymentBySlot + + #region WalkUpgradeDomain + public Action WalkUpgradeDomainThunk { get; set; } + + public IAsyncResult BeginWalkUpgradeDomain(string subscriptionId, string serviceName, string deploymentName, WalkUpgradeDomainInput input, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["serviceName"] = serviceName; + result.Values["deploymentName"] = deploymentName; + result.Values["input"] = input; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public void EndWalkUpgradeDomain(IAsyncResult asyncResult) + { + if (WalkUpgradeDomainThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + WalkUpgradeDomainThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("WalkUpgradeDomainThunk is not implemented!"); + } + } + #endregion WalkUpgradeDomain + + #region WalkUpgradeDomainBySlot + public Action WalkUpgradeDomainBySlotThunk { get; set; } + + public IAsyncResult BeginWalkUpgradeDomainBySlot(string subscriptionId, string serviceName, string deploymentSlot, WalkUpgradeDomainInput input, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["serviceName"] = serviceName; + result.Values["deploymentSlot"] = deploymentSlot; + result.Values["input"] = input; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public void EndWalkUpgradeDomainBySlot(IAsyncResult asyncResult) + { + if (WalkUpgradeDomainBySlotThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + WalkUpgradeDomainBySlotThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("WalkUpgradeDomainBySlotThunk is not implemented!"); + } + } + #endregion WalkUpgradeDomainBySlot + + #region RebootDeploymentRoleInstance + public Action RebootDeploymentRoleInstanceThunk { get; set; } + + public IAsyncResult BeginRebootDeploymentRoleInstance(string subscriptionId, string serviceName, string deploymentName, string roleInstanceName, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["serviceName"] = serviceName; + result.Values["deploymentName"] = deploymentName; + result.Values["roleInstanceName"] = roleInstanceName; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public void EndRebootDeploymentRoleInstance(IAsyncResult asyncResult) + { + if (RebootDeploymentRoleInstanceThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + RebootDeploymentRoleInstanceThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("RebootDeploymentRoleInstanceThunk is not implemented!"); + } + } + #endregion RebootDeploymentRoleInstance + + #region ReimageDeploymentRoleInstance + public Action ReimageDeploymentRoleInstanceThunk { get; set; } + + public IAsyncResult BeginReimageDeploymentRoleInstance(string subscriptionId, string serviceName, string deploymentName, string roleInstanceName, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["serviceName"] = serviceName; + result.Values["deploymentName"] = deploymentName; + result.Values["roleInstanceName"] = roleInstanceName; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public void EndReimageDeploymentRoleInstance(IAsyncResult asyncResult) + { + if (ReimageDeploymentRoleInstanceThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + ReimageDeploymentRoleInstanceThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("ReimageDeploymentRoleInstanceThunk is not implemented!"); + } + } + #endregion ReimageDeploymentRoleInstance + + #region RebootDeploymentRoleInstanceBySlot + public Action RebootDeploymentRoleInstanceBySlotThunk { get; set; } + + public IAsyncResult BeginRebootDeploymentRoleInstanceBySlot(string subscriptionId, string serviceName, string deploymentSlot, string roleInstanceName, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["serviceName"] = serviceName; + result.Values["deploymentSlot"] = deploymentSlot; + result.Values["roleInstanceName"] = roleInstanceName; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public void EndRebootDeploymentRoleInstanceBySlot(IAsyncResult asyncResult) + { + if (RebootDeploymentRoleInstanceBySlotThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + RebootDeploymentRoleInstanceBySlotThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("RebootDeploymentRoleInstanceBySlotThunk is not implemented!"); + } + } + #endregion RebootDeploymentRoleInstanceBySlot + + #region ReimageDeploymentRoleInstanceBySlot + public Action ReimageDeploymentRoleInstanceBySlotThunk { get; set; } + + public IAsyncResult BeginReimageDeploymentRoleInstanceBySlot(string subscriptionId, string serviceName, string deploymentSlot, string roleInstanceName, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["serviceName"] = serviceName; + result.Values["deploymentSlot"] = deploymentSlot; + result.Values["roleInstanceName"] = roleInstanceName; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public void EndReimageDeploymentRoleInstanceBySlot(IAsyncResult asyncResult) + { + if (ReimageDeploymentRoleInstanceBySlotThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + ReimageDeploymentRoleInstanceBySlotThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("ReimageDeploymentRoleInstanceBySlotThunk is not implemented!"); + } + } + #endregion ReimageDeploymentRoleInstanceBySlot + + #region UpdateHostedService + public Action UpdateHostedServiceThunk { get; set; } + + public IAsyncResult BeginUpdateHostedService(string subscriptionId, string serviceName, UpdateHostedServiceInput input, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["serviceName"] = serviceName; + result.Values["input"] = input; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public void EndUpdateHostedService(IAsyncResult asyncResult) + { + if (UpdateHostedServiceThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + UpdateHostedServiceThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("UpdateHostedServiceThunk is not implemented!"); + } + } + #endregion UpdateHostedService + + #region DeleteHostedService + public Action DeleteHostedServiceThunk { get; set; } + + public IAsyncResult BeginDeleteHostedService(string subscriptionId, string serviceName, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["serviceName"] = serviceName; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public void EndDeleteHostedService(IAsyncResult asyncResult) + { + if (DeleteHostedServiceThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + DeleteHostedServiceThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("DeleteHostedServiceThunk is not implemented!"); + } + } + #endregion DeleteHostedService + + #region ListHostedServices + public Func ListHostedServicesThunk { get; set; } + + public IAsyncResult BeginListHostedServices(string subscriptionId, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public HostedServiceList EndListHostedServices(IAsyncResult asyncResult) + { + HostedServiceList value = default(HostedServiceList); + if (ListHostedServicesThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + value = ListHostedServicesThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("ListHostedServicesThunk is not implemented!"); + } + + return value; + } + #endregion ListHostedServices + + #region GetHostedService + public Func GetHostedServiceThunk { get; set; } + + public IAsyncResult BeginGetHostedService(string subscriptionId, string serviceName, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["serviceName"] = serviceName; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public HostedService EndGetHostedService(IAsyncResult asyncResult) + { + HostedService value = default(HostedService); + if (GetHostedServiceThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + value = GetHostedServiceThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("GetHostedServiceThunk is not implemented!"); + } + + return value; + } + #endregion GetHostedService + + #region GetHostedServiceWithDetails + public Func GetHostedServiceWithDetailsThunk { get; set; } + + public IAsyncResult BeginGetHostedServiceWithDetails(string subscriptionId, string serviceName, Boolean embedDetail, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["serviceName"] = serviceName; + result.Values["embedDetail"] = embedDetail; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public HostedService EndGetHostedServiceWithDetails(IAsyncResult asyncResult) + { + HostedService value = default(HostedService); + if (GetHostedServiceWithDetailsThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + value = GetHostedServiceWithDetailsThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("GetHostedServiceWithDetailsThunk is not implemented!"); + } + + return value; + } + #endregion GetHostedServiceWithDetails + + #region ListLocations + public Func ListLocationsThunk { get; set; } + + public IAsyncResult BeginListLocations(string subscriptionId, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public LocationList EndListLocations(IAsyncResult asyncResult) + { + LocationList value = default(LocationList); + if (ListLocationsThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + value = ListLocationsThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("ListLocationsThunk is not implemented!"); + } + + return value; + } + #endregion ListLocations + + #region SwapDeployment + public Action SwapDeploymentThunk { get; set; } + + public IAsyncResult BeginSwapDeployment(string subscriptionId, string serviceName, SwapDeploymentInput input, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["serviceName"] = serviceName; + result.Values["input"] = input; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public void EndSwapDeployment(IAsyncResult asyncResult) + { + if (SwapDeploymentThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + SwapDeploymentThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("SwapDeploymentThunk is not implemented!"); + } + } + #endregion SwapDeployment + + #region CreateOrUpdateDeployment + public Action CreateOrUpdateDeploymentThunk { get; set; } + + public IAsyncResult BeginCreateOrUpdateDeployment(string subscriptionId, string serviceName, string deploymentSlot, CreateDeploymentInput input, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["serviceName"] = serviceName; + result.Values["deploymentSlot"] = deploymentSlot; + result.Values["input"] = input; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public void EndCreateOrUpdateDeployment(IAsyncResult asyncResult) + { + if (CreateOrUpdateDeploymentThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + CreateOrUpdateDeploymentThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("CreateOrUpdateDeploymentThunk is not implemented!"); + } + } + #endregion CreateOrUpdateDeployment + + #region DeleteDeployment + public Action DeleteDeploymentThunk { get; set; } + + public IAsyncResult BeginDeleteDeployment(string subscriptionId, string serviceName, string deploymentName, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["serviceName"] = serviceName; + result.Values["deploymentName"] = deploymentName; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public void EndDeleteDeployment(IAsyncResult asyncResult) + { + if (DeleteDeploymentThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + DeleteDeploymentThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("DeleteDeploymentThunk is not implemented!"); + } + } + #endregion DeleteDeployment + + #region DeleteDeploymentBySlot + public Action DeleteDeploymentBySlotThunk { get; set; } + + public IAsyncResult BeginDeleteDeploymentBySlot(string subscriptionId, string serviceName, string deploymentSlot, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["serviceName"] = serviceName; + result.Values["deploymentSlot"] = deploymentSlot; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public void EndDeleteDeploymentBySlot(IAsyncResult asyncResult) + { + if (DeleteDeploymentBySlotThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + DeleteDeploymentBySlotThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("DeleteDeploymentBySlotThunk is not implemented!"); + } + } + #endregion DeleteDeploymentBySlot + + #region GetDeployment + public Func GetDeploymentThunk { get; set; } + + public IAsyncResult BeginGetDeployment(string subscriptionId, string serviceName, string deploymentName, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["serviceName"] = serviceName; + result.Values["deploymentName"] = deploymentName; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public Deployment EndGetDeployment(IAsyncResult asyncResult) + { + Deployment value = default(Deployment); + if (GetDeploymentThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + value = GetDeploymentThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("GetDeploymentThunk is not implemented!"); + } + + return value; + } + #endregion GetDeployment + + #region GetDeploymentBySlot + public Func GetDeploymentBySlotThunk { get; set; } + + public IAsyncResult BeginGetDeploymentBySlot(string subscriptionId, string serviceName, string deploymentSlot, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["serviceName"] = serviceName; + result.Values["deploymentSlot"] = deploymentSlot; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public Deployment EndGetDeploymentBySlot(IAsyncResult asyncResult) + { + Deployment value = default(Deployment); + if (GetDeploymentBySlotThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + value = GetDeploymentBySlotThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("GetDeploymentBySlotThunk is not implemented!"); + } + + return value; + } + #endregion GetDeploymentBySlot + + #region ListOperatingSystems + public Func ListOperatingSystemsThunk { get; set; } + + public IAsyncResult BeginListOperatingSystems(string subscriptionId, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public OperatingSystemList EndListOperatingSystems(IAsyncResult asyncResult) + { + OperatingSystemList value = default(OperatingSystemList); + if (ListOperatingSystemsThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + value = ListOperatingSystemsThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("ListOperatingSystemsThunk is not implemented!"); + } + + return value; + } + #endregion ListOperatingSystems + + #region ListOperatingSystemFamilies + public Func ListOperatingSystemFamiliesThunk { get; set; } + + public IAsyncResult BeginListOperatingSystemFamilies(string subscriptionId, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public OperatingSystemFamilyList EndListOperatingSystemFamilies(IAsyncResult asyncResult) + { + OperatingSystemFamilyList value = default(OperatingSystemFamilyList); + if (ListOperatingSystemFamiliesThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + value = ListOperatingSystemFamiliesThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("ListOperatingSystemFamiliesThunk is not implemented!"); + } + + return value; + } + #endregion ListOperatingSystemFamilies + + #region GetOperationStatus + public Func GetOperationStatusThunk { get; set; } + + public OSImageDetails EndGetOSImageWithDetails(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginGetOperationStatus(string subscriptionId, string operationTrackingId, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["operationTrackingId"] = operationTrackingId; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public Operation EndGetOperationStatus(IAsyncResult asyncResult) + { + Operation value = default(Operation); + if (GetOperationStatusThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + value = GetOperationStatusThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("GetOperationStatusThunk is not implemented!"); + } + + return value; + } + #endregion GetOperationStatus + + #region ListStorageServices + public Func ListStorageServicesThunk { get; set; } + + public IAsyncResult BeginListStorageServices(string subscriptionId, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public StorageServiceList EndListStorageServices(IAsyncResult asyncResult) + { + StorageServiceList value = default(StorageServiceList); + if (ListStorageServicesThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + value = ListStorageServicesThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("ListStorageServicesThunk is not implemented!"); + } + + return value; + } + #endregion ListStorageServices + + #region GetStorageService + public Func GetStorageServiceThunk { get; set; } + + public IAsyncResult BeginGetStorageService(string subscriptionId, string serviceName, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["serviceName"] = serviceName; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public StorageService EndGetStorageService(IAsyncResult asyncResult) + { + StorageService value = default(StorageService); + if (GetStorageServiceThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + value = GetStorageServiceThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("GetStorageServiceThunk is not implemented!"); + } + + return value; + } + #endregion GetStorageService + + #region GetStorageKeys + public Func GetStorageKeysThunk { get; set; } + + public IAsyncResult BeginGetStorageKeys(string subscriptionId, string serviceName, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["serviceName"] = serviceName; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public StorageService EndGetStorageKeys(IAsyncResult asyncResult) + { + StorageService value = default(StorageService); + if (GetStorageKeysThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + value = GetStorageKeysThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("GetStorageKeysThunk is not implemented!"); + } + + return value; + } + #endregion GetStorageKeys + + #region RegenerateStorageServiceKeys + public Func RegenerateStorageServiceKeysThunk { get; set; } + + public IAsyncResult BeginRegenerateStorageServiceKeys(string subscriptionId, string serviceName, RegenerateKeys regenerateKeys, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["serviceName"] = serviceName; + result.Values["regenerateKeys"] = regenerateKeys; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public StorageService EndRegenerateStorageServiceKeys(IAsyncResult asyncResult) + { + StorageService value = default(StorageService); + if (RegenerateStorageServiceKeysThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + value = RegenerateStorageServiceKeysThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("RegenerateStorageServiceKeysThunk is not implemented!"); + } + + return value; + } + #endregion RegenerateStorageServiceKeys + + #region CreateStorageService + public Action CreateStorageServiceThunk { get; set; } + + public IAsyncResult BeginCreateStorageService(string subscriptionId, CreateStorageServiceInput createStorageServiceInput, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["createStorageServiceInput"] = createStorageServiceInput; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public void EndCreateStorageService(IAsyncResult asyncResult) + { + if (CreateStorageServiceThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + CreateStorageServiceThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("CreateStorageServiceThunk is not implemented!"); + } + } + #endregion CreateStorageService + + #region DeleteStorageService + public Action DeleteStorageServiceThunk { get; set; } + + public IAsyncResult BeginDeleteStorageService(string subscriptionId, string StorageServiceName, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["StorageServiceName"] = StorageServiceName; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public void EndDeleteStorageService(IAsyncResult asyncResult) + { + if (DeleteStorageServiceThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + DeleteStorageServiceThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("DeleteStorageServiceThunk is not implemented!"); + } + } + #endregion DeleteStorageService + + #region UpdateStorageService + public Action UpdateStorageServiceThunk { get; set; } + + public IAsyncResult BeginUpdateStorageService(string subscriptionId, string StorageServiceName, UpdateStorageServiceInput updateStorageServiceInput, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["StorageServiceName"] = StorageServiceName; + result.Values["updateStorageServiceInput"] = updateStorageServiceInput; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public void EndUpdateStorageService(IAsyncResult asyncResult) + { + if (UpdateStorageServiceThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + UpdateStorageServiceThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("UpdateStorageServiceThunk is not implemented!"); + } + } + #endregion UpdateStorageService + + #region CreateAffinityGroup + + public Action CreateAffinityGroupThunk { get; set; } + + public IAsyncResult BeginCreateAffinityGroup(string subscriptionId, CreateAffinityGroupInput input, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["input"] = input; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public void EndCreateAffinityGroup(IAsyncResult asyncResult) + { + if (CreateAffinityGroupThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + CreateAffinityGroupThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("CreateAffinityGroupThunk is not implemented!"); + } + } + + #endregion + + #region DeleteAffinityGroup + + public Action DeleteAffinityGroupThunk { get; set; } + + public IAsyncResult BeginDeleteAffinityGroup(string subscriptionId, string affinityGroupName, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["affinityGroupName"] = affinityGroupName; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public void EndDeleteAffinityGroup(IAsyncResult asyncResult) + { + if (DeleteAffinityGroupThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + DeleteAffinityGroupThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("DeleteAffinityGroupThunk is not implemented!"); + } + } + + #endregion + + #region UpdateAffinityGroup + + public Action UpdateAffinityGroupThunk { get; set; } + + public IAsyncResult BeginUpdateAffinityGroup(string subscriptionId, string affinityGroupName, UpdateAffinityGroupInput input, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["affinityGroupName"] = affinityGroupName; + result.Values["input"] = input; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public void EndUpdateAffinityGroup(IAsyncResult asyncResult) + { + if (UpdateAffinityGroupThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + UpdateAffinityGroupThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("UpdateAffinityGroupThunk is not implemented!"); + } + } + + #endregion + + #region ListAffinityGroups + + public Func ListAffinityGroupsThunk { get; set; } + + public IAsyncResult BeginListAffinityGroups(string subscriptionId, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public AffinityGroupList EndListAffinityGroups(IAsyncResult asyncResult) + { + AffinityGroupList value = default(AffinityGroupList); + if (ListAffinityGroupsThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + value = ListAffinityGroupsThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("ListAffinityGroupsThunk is not implemented!"); + } + + return value; + } + + #endregion ListAffinityGroups + + #region GetAffinityGroup + public Func GetAffinityGroupThunk { get; set; } + + public IAsyncResult BeginGetAffinityGroup(string subscriptionId, string affinityGroupName, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["affinityGroupName"] = affinityGroupName; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public AffinityGroup EndGetAffinityGroup(IAsyncResult asyncResult) + { + AffinityGroup value = default(AffinityGroup); + if (GetAffinityGroupThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + value = GetAffinityGroupThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("GetAffinityGroupThunk is not implemented!"); + } + + return value; + } + #endregion GetAffinityGroup + + #region CreateHostedService + public Action CreateHostedServiceThunk { get; set; } + + public IAsyncResult BeginCreateHostedService(string subscriptionId, CreateHostedServiceInput input, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["input"] = input; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public void EndCreateHostedService(IAsyncResult asyncResult) + { + if (CreateHostedServiceThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + CreateHostedServiceThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("CreateHostedServiceThunk is not implemented!"); + } + } + #endregion CreateHostedService + + #endregion Autogenerated Thunks + + public IAsyncResult BeginCreateDeployment(string subscriptionId, string serviceName, Deployment deployment, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public void EndCreateDeployment(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginResumeDeploymentUpdateOrUpgrade(string subscriptionId, string serviceName, string deploymentName, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public void EndResumeDeploymentUpdateOrUpgrade(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginResumeDeploymentUpdateOrUpgradeBySlot(string subscriptionId, string serviceName, string deploymentSlot, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public void EndResumeDeploymentUpdateOrUpgradeBySlot(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginSuspendDeploymentUpdateOrUpgrade(string subscriptionId, string serviceName, string deploymentName, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public void EndSuspendDeploymentUpdateOrUpgrade(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginSuspendDeploymentUpdateOrUpgradeBySlot(string subscriptionId, string serviceName, string deploymentSlot, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public void EndSuspendDeploymentUpdateOrUpgradeBySlot(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginRollbackDeploymentUpdateOrUpgrade(string subscriptionId, string serviceName, string deploymentName, RollbackUpdateOrUpgradeInput input, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public void EndRollbackDeploymentUpdateOrUpgrade(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginRollbackDeploymentUpdateOrUpgradeBySlot(string subscriptionId, string serviceName, string deploymentSlot, RollbackUpdateOrUpgradeInput input, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public void EndRollbackDeploymentUpdateOrUpgradeBySlot(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginGetPackage(string subscriptionId, string serviceName, string deploymentName, string containerUri, bool overwriteExisting, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public void EndGetPackage(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginGetPackageBySlot(string subscriptionId, string serviceName, string deploymentSlot, string containerUri, bool overwriteExisting, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public void EndGetPackageBySlot(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginListDisks(string subscriptionID, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public DiskList EndListDisks(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginCreateDisk(string subscriptionID, Disk disk, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public Disk EndCreateDisk(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginGetDisk(string subscriptionID, string diskName, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public Disk EndGetDisk(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginUpdateDisk(string subscriptionID, string diskName, Disk disk, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public Disk EndUpdateDisk(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginDeleteDisk(string subscriptionID, string diskName, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public void EndDeleteDisk(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginDeleteDiskEx(string subscriptionID, string diskName, string comp, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginAddRole(string subscriptionID, string serviceName, string deploymentName, Role role, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public void EndAddRole(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginGetRole(string subscriptionID, string serviceName, string deploymentName, string roleName, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public Role EndGetRole(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginUpdateRole(string subscriptionID, string serviceName, string deploymentName, string roleName, Role role, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public void EndUpdateRole(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginDeleteRole(string subscriptionID, string serviceName, string deploymentName, string roleName, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public void EndDeleteRole(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginAddDataDisk(string subscriptionID, string serviceName, string deploymentName, string roleName, DataVirtualHardDisk dataDisk, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public void EndAddDataDisk(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginUpdateDataDisk(string subscriptionID, string serviceName, string deploymentName, string roleName, string lun, DataVirtualHardDisk dataDisk, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public void EndUpdateDataDisk(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginGetDataDisk(string subscriptionID, string serviceName, string deploymentName, string roleName, string lun, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public DataVirtualHardDisk EndGetDataDisk(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginDeleteDataDisk(string subscriptionID, string serviceName, string deploymentName, string roleName, string lun, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public void EndDeleteDataDisk(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginExecuteRoleOperation(string subscriptionID, string serviceName, string deploymentName, string roleInstanceName, RoleOperation roleOperation, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public void EndExecuteRoleOperation(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginDownloadRDPFile(string subscriptionID, string serviceName, string deploymentName, string instanceName, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public System.IO.Stream EndDownloadRDPFile(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public Func IsDNSAvailableThunk { get; set; } + public IAsyncResult BeginIsDNSAvailable(string subscriptionId, string serviceName, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["serviceName"] = serviceName; + result.Values["callback"] = callback; + result.Values["state"] = state; + + return result; + } + + public AvailabilityResponse EndIsDNSAvailable(IAsyncResult asyncResult) + { + AvailabilityResponse availabilityResponse = new AvailabilityResponse(); + + if (IsDNSAvailableThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + availabilityResponse = IsDNSAvailableThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("IsDNSAvailableThunk is not implemented!"); + } + + return availabilityResponse; + } + + public IAsyncResult BeginSetNetworkConfiguration(string subscriptionId, System.IO.Stream networkConfiguration, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public void EndSetNetworkConfiguration(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginGetNetworkConfiguration(string subscriptionId, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public System.IO.Stream EndGetNetworkConfiguration(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginListVirtualNetworkSites(string subscriptionId, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public VirtualNetworkSiteList EndListVirtualNetworkSites(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public void EndSetVirtualNetworkGatewayConfiguration(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginListOSImages(string subscriptionID, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public OSImageList EndListOSImages(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginCreateOSImage(string subscriptionID, OSImage image, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public OSImage EndCreateOSImage(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginGetOSImage(string subscriptionID, string imageName, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public OSImage EndGetOSImage(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginUpdateOSImage(string subscriptionID, string imageName, OSImage image, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public OSImage EndUpdateOSImage(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginDeleteOSImage(string subscriptionID, string imageName, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public void EndDeleteOSImage(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginDeleteOSImageEx(string subscriptionID, string imageName, string comp, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public void EndDeleteOSImageEx(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginReplicateOSImage(string subscriptionID, string imageName, ReplicationInput replicationInput, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public string EndReplicateOSImage(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginShareOSImage(string subscriptionID, string imageName, string permission, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public bool EndShareOSImage(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginUnReplicateOSImage(string subscriptionID, string imageName, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public void EndUnReplicateOSImage(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginQueryOSImages(string subscriptionID, string location, string publisher, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public OSImageList EndQueryOSImages(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginGetOSImageWithDetails(string subscriptionID, string imageName, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public Func IsStorageServiceAvailableThunk { get; set; } + public IAsyncResult BeginIsStorageServiceAvailable(string subscriptionId, string serviceName, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionId"] = subscriptionId; + result.Values["serviceName"] = serviceName; + result.Values["callback"] = callback; + result.Values["state"] = state; + + return result; + } + + public AvailabilityResponse EndIsStorageServiceAvailable(IAsyncResult asyncResult) + { + AvailabilityResponse availabilityResponse = new AvailabilityResponse(); + + if (IsStorageServiceAvailableThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + availabilityResponse = IsStorageServiceAvailableThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("IsStorageServiceAvailableThunk is not implemented!"); + } + + return availabilityResponse; + } + + public IAsyncResult BeginGetAzureWebsites(string subscriptionId, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public void EndGetAzureWebsites(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginGetSubscription(string subscriptionID, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public Subscription EndGetSubscription(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginListSubscriptionOperations(string subscriptionID, string startTime, string endTime, string objectIdFilter, string operationResultFilter, string continuationToken, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public SubscriptionOperationCollection EndListSubscriptionOperations(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginProcessMessage(Message request, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public System.ServiceModel.Channels.Message EndProcessMessage(IAsyncResult result) + { + throw new NotImplementedException(); + } + + + public IAsyncResult BeginAddHostedServiceExtension(string subscriptionId, string serviceName, HostedServiceExtensionInput extension, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginDeleteDeploymentVirtualIPs(string subscriptionId, string serviceName, string deploymentName, string vipGroupName, VirtualIPList vips, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginDeleteDeploymentVirtualIPsBySlot(string subscriptionId, string serviceName, string deploymentSlot, string vipGroupName, VirtualIPList vips, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginDeleteHostedServiceExtension(string subscriptionId, string serviceName, string extensionId, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginGetHostedServiceExtension(string subscriptionId, string serviceName, string extensionId, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginListHostedServiceExtensions(string subscriptionId, string serviceName, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginListLatestExtensions(string subscriptionId, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public void EndAddHostedServiceExtension(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public void EndDeleteDeploymentVirtualIPs(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public void EndDeleteDeploymentVirtualIPsBySlot(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public void EndDeleteHostedServiceExtension(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public HostedServiceExtension EndGetHostedServiceExtension(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public HostedServiceExtensionList EndListHostedServiceExtensions(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public ExtensionImageList EndListLatestExtensions(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + + public IAsyncResult BeginAddSubscriptionCertificate(string subscriptionId, SubscriptionCertificate Certificate, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginExecuteRoleSetOperation(string subscriptionID, string serviceName, string deploymentName, RoleSetOperation roleSetOperation, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginGetSubscriptionCertificate(string subscriptionID, string thumbprint, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginListSubscriptionCertificates(string subscriptionID, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginRemoveSubscriptionCertificate(string subscriptionID, string thumbprint, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginUpdateLoadBalancedEndpointSet(string subscriptionID, string serviceName, string deploymentName, LoadBalancedEndpointList loadBalancedEndpointList, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public void EndAddSubscriptionCertificate(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public void EndExecuteRoleSetOperation(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public SubscriptionCertificate EndGetSubscriptionCertificate(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public SubscriptionCertificateList EndListSubscriptionCertificates(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public void EndRemoveSubscriptionCertificate(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public void EndUpdateLoadBalancedEndpointSet(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + + public IAsyncResult BeginRebuildDeploymentRoleInstance(string subscriptionId, string serviceName, string deploymentName, string roleInstanceName, string resources, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginRebuildDeploymentRoleInstanceBySlot(string subscriptionId, string serviceName, string deploymentSlot, string roleInstanceName, string resources, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public void EndRebuildDeploymentRoleInstance(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public void EndRebuildDeploymentRoleInstanceBySlot(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test.Utilities/Commands.Test.Utilities.csproj b/src/ServiceManagement/Services/Commands.Test.Utilities/Commands.Test.Utilities.csproj new file mode 100644 index 000000000000..845f91162e43 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test.Utilities/Commands.Test.Utilities.csproj @@ -0,0 +1,157 @@ + + + + + Debug + AnyCPU + {BC420543-C04E-4BF3-96E1-CD81B823BDD7} + Library + Properties + Microsoft.WindowsAzure.Commands.Test.Utilities + Microsoft.WindowsAzure.Commands.Test.Utilities + v4.5 + 512 + + ..\..\..\ + true + /assemblyCompareMode:StrongNameIgnoringVersion + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + false + + + bin\Release\ + TRACE;SIGN + true + pdbonly + AnyCPU + prompt + false + true + MSSharedLibKey.snk + true + true + false + + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.2.1.0\lib\net40\Microsoft.WindowsAzure.Management.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.6.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.3.1.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll + + + False + ..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll + + + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + True + + + + + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {e1ca72ba-8374-45f6-904d-fd34ecdf5b6f} + Commands.ServiceManagement + + + {4900ec4e-8deb-4412-9108-0bc52f81d457} + Commands.Utilities + + + {3b48a77b-5956-4a62-9081-92ba04b02b27} + Commands.Common.Test + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test.Utilities/Common/AzureAssert.cs b/src/ServiceManagement/Services/Commands.Test.Utilities/Common/AzureAssert.cs new file mode 100644 index 000000000000..d3e215eae724 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test.Utilities/Common/AzureAssert.cs @@ -0,0 +1,320 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService.Scaffolding; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.Common +{ + using ConfigConfigurationSetting = Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema.ConfigurationSetting; + using DefinitionConfigurationSetting = Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema.ConfigurationSetting; + + public static class AzureAssert + { + public static void AreEqualServiceSettings(ServiceSettings expected, ServiceSettings actual) + { + AreEqualServiceSettings(expected.Location, expected.Slot, expected.StorageServiceName, expected.Subscription, actual); + } + + public static void AreEqualServiceSettings(string location, string slot, string storageAccountName, string subscriptionName, ServiceSettings actual) + { + Assert.AreEqual(location, actual.Location); + Assert.AreEqual(slot, actual.Slot); + Assert.AreEqual(storageAccountName, actual.StorageServiceName); + Assert.AreEqual(subscriptionName, actual.Subscription); + } + + public static void AreEqualDeploymentSettings(PublishContext expected, PublishContext actual) + { + AreEqualPublishContext(expected.ServiceSettings, expected.CloudConfigPath, expected.DeploymentName, expected.ServiceName, expected.PackagePath, expected.SubscriptionId, actual); + } + + public static void AreEqualPublishContext(ServiceSettings settings, string configPath, string deploymentName, string label, string packagePath, string subscriptionId, PublishContext actual) + { + AreEqualServiceSettings(settings, actual.ServiceSettings); + Assert.AreEqual(configPath, actual.CloudConfigPath); + Assert.AreEqual(deploymentName, actual.DeploymentName); + Assert.AreEqual(label, actual.ServiceName); + Assert.AreEqual(packagePath, actual.PackagePath); + Assert.AreEqual(subscriptionId, actual.SubscriptionId); + + Assert.IsTrue(File.Exists(actual.CloudConfigPath)); + Assert.IsTrue(File.Exists(actual.PackagePath)); + } + + public static void AreEqualServicePathInfo(CloudProjectPathInfo expected, CloudProjectPathInfo actual) + { + AreEqualServicePathInfo(expected.CloudConfiguration, expected.CloudPackage, expected.Definition, expected.LocalConfiguration, + expected.LocalPackage, expected.RootPath, expected.Settings, actual); + } + + public static void AreEqualServicePathInfo(string cloudConfig, string cloudPackage, string def, string localConfig, string localPackage, string rootPath, string settings, CloudProjectPathInfo actual) + { + throw new NotImplementedException(); + } + + public static void AreEqualServicePathInfo(string rootPath, CloudProjectPathInfo actual) + { + Assert.AreEqual(rootPath, actual.RootPath); + Assert.AreEqual(Path.Combine(rootPath, Resources.ServiceDefinitionFileName), actual.Definition); + Assert.AreEqual(Path.Combine(rootPath, Resources.CloudServiceConfigurationFileName), actual.CloudConfiguration); + Assert.AreEqual(Path.Combine(rootPath, Resources.LocalServiceConfigurationFileName), actual.LocalConfiguration); + Assert.AreEqual(Path.Combine(rootPath, Resources.SettingsFileName), actual.Settings); + Assert.AreEqual(Path.Combine(rootPath, Resources.CloudPackageFileName), actual.CloudPackage); + Assert.AreEqual(Path.Combine(rootPath, Resources.LocalPackageFileName), actual.LocalPackage); + } + + public static void AreEqualServiceComponents(ServiceComponents actual) + { + Assert.IsNotNull(actual.CloudConfig); + Assert.IsNotNull(actual.Definition); + Assert.IsNotNull(actual.LocalConfig); + Assert.IsNotNull(actual.Settings); + } + + public static void ScaffoldingExists(string destinationDirectory, string scaffoldFilePath, string roleName = "WebRole") + { + Scaffold scaffold = Scaffold.Parse(Path.Combine(Data.TestResultDirectory, scaffoldFilePath, Resources.ScaffoldXml)); + + foreach (ScaffoldFile file in scaffold.Files) + { + if (file.Copy) + { + + string elementPath; + if (string.IsNullOrEmpty(file.PathExpression)) + { + elementPath = string.IsNullOrEmpty(file.TargetPath) ? Path.Combine(destinationDirectory, file.Path) : Path.Combine(destinationDirectory, file.TargetPath); + elementPath = elementPath.Replace("$RoleName$", roleName); + Assert.IsTrue(File.Exists(elementPath)); + } + else + { + string substring = file.PathExpression.Substring(0, file.PathExpression.LastIndexOf('\\')); + elementPath = string.IsNullOrEmpty(file.TargetPath) ? Path.Combine(destinationDirectory, substring) : Path.Combine(destinationDirectory, file.TargetPath); + elementPath = elementPath.Replace("$RoleName$", roleName); + Assert.IsTrue(Directory.Exists(elementPath)); + } + } + } + } + + public static void AzureServiceExists(string serviceRootPath, string scaffoldFilePath, string serviceName, ServiceSettings settings = null, WebRoleInfo[] webRoles = null, WorkerRoleInfo[] workerRoles = null, string webScaff = null, string workerScaff = null, RoleInfo[] roles = null) + { + ServiceComponents components = new ServiceComponents(new PowerShellProjectPathInfo(serviceRootPath)); + + ScaffoldingExists(serviceRootPath, scaffoldFilePath); + + if (webRoles != null) + { + for (int i = 0; i < webRoles.Length; i++) + { + ScaffoldingExists(Path.Combine(serviceRootPath, webRoles[i].Name), webScaff); + } + } + + if (workerRoles != null) + { + for (int i = 0; i < workerRoles.Length; i++) + { + ScaffoldingExists(Path.Combine(serviceRootPath, workerRoles[i].Name), workerScaff); + } + } + + AreEqualServiceConfiguration(components.LocalConfig, serviceName, roles); + AreEqualServiceConfiguration(components.CloudConfig, serviceName, roles); + IsValidServiceDefinition(components.Definition, serviceName, webRoles, workerRoles); + AreEqualServiceSettings(settings ?? new ServiceSettings(), components.Settings); + } + + /// + /// Validates that given service definition is valid for a service. Validation steps: + /// 1. Validates name element matches serviceName + /// 2. Validates web role element has all webRoles with same configuration. + /// 3. Validates worker role element has all workerRoles with same configuration. + /// + /// Service definition to be checked + /// New created service name + public static void IsValidServiceDefinition(ServiceDefinition actual, string serviceName, WebRoleInfo[] webRoles = null, WorkerRoleInfo[] workerRoles = null) + { + Assert.AreEqual(serviceName, actual.name); + + if (webRoles != null) + { + Assert.AreEqual(webRoles.Length, actual.WebRole.Length); + int length = webRoles.Length; + + for (int i = 0; i < length; i++) + { + Assert.IsTrue(webRoles[i].Equals(actual.WebRole[i])); + } + } + else + { + Assert.IsNull(actual.WebRole); + } + + if (workerRoles != null) + { + Assert.AreEqual(workerRoles.Length, actual.WorkerRole.Length); + int length = workerRoles.Length; + + for (int i = 0; i < length; i++) + { + Assert.IsTrue(workerRoles[i].Equals(actual.WorkerRole[i])); + } + } + else + { + Assert.IsNull(actual.WorkerRole); + } + } + + /// + /// Validates that given service definition is valid against list of web/worker roles. Validation steps: + /// 1. Make sure that name element + /// + /// Service definition to be checked + /// New created service name + public static void IsValidServiceDefinition(ServiceDefinition actual, string serviceName) + { + Assert.AreEqual(serviceName, actual.name); + Assert.IsNull(actual.WebRole); + Assert.IsNull(actual.WorkerRole); + } + + public static void AreEqualServiceDefinition(ServiceDefinition expected, ServiceDefinition actual) + { + throw new NotImplementedException(); + } + + public static void AreEqualServiceConfiguration(ServiceConfiguration expected, ServiceConfiguration actual) + { + throw new NotImplementedException(); + } + + public static void AreEqualServiceConfiguration(ServiceConfiguration actual, string serviceName, RoleInfo[] roles = null) + { + Assert.AreEqual(actual.serviceName, serviceName); + + if (roles != null) + { + Assert.AreEqual(actual.Role.Length, roles.Length); + int length = roles.Length; + + for (int i = 0; i < length; i++) + { + Assert.IsTrue(roles[i].Equals(actual.Role[i])); + } + } + } + + public static void WorkerRoleImportsExists(Import expected, WorkerRole actual) + { + Assert.IsTrue(Array.Exists(actual.Imports, i => i.moduleName.Equals(expected.moduleName))); + } + + public static void LocalResourcesLocalStoreExists(LocalStore expected, LocalResources actual) + { + Assert.IsTrue(Array.Exists(actual.LocalStorage, l => l.name.Equals(expected.name) && + l.cleanOnRoleRecycle.Equals(expected.cleanOnRoleRecycle) && l.sizeInMB.Equals(expected.sizeInMB))); + } + + public static void ConfigurationSettingExist(DefinitionConfigurationSetting expected, DefinitionConfigurationSetting[] actual) + { + Assert.IsTrue(Array.Exists(actual, c => c.name == expected.name)); + } + + public static void ConfigurationSettingExist(ConfigConfigurationSetting expected, ConfigConfigurationSetting[] actual) + { + Assert.IsTrue(Array.Exists(actual, c => c.name == expected.name)); + } + + public static void RuntimeUrlAndIdExists(Task[] tasks, string runtimeValue) + { + Assert.IsTrue(Array.Exists(tasks, t => Array.Exists(t.Environment, + e => e.value != null && e.value.Contains(runtimeValue)))); + Assert.IsTrue(Array.Exists(tasks, t => Array.Exists(t.Environment, + e => e.value != null && e.value.Contains(string.Format("http://az413943.vo.msecnd.net/{0}/", runtimeValue))))); + } + + public static void RuntimeIdExists(Task[] tasks, string runtimeValue) + { + Assert.IsTrue(Array.Exists(tasks, t => Array.Exists(t.Environment, + e => e.value != null && e.value.Contains(runtimeValue)))); + } + + public static void StartupTaskExists(Task[] tasks, string startupCommand) + { + Assert.IsTrue(Array.Exists(tasks, t => t.commandLine == startupCommand)); + } + + public static void InternalEndpointExists(InternalEndpoint[] internalEndpoints, InternalEndpoint internalEndpoint) + { + Assert.IsTrue(Array.Exists(internalEndpoints, i => i.name == internalEndpoint.name && + i.port == internalEndpoint.port && i.protocol == internalEndpoint.protocol)); + } + + /// + /// Gets worker role object from service definition. + /// + /// The azure service rootPath path + /// The worker role object + internal static WorkerRole GetWorkerRole(string rootPath, string name) + { + CloudServiceProject service = new CloudServiceProject(rootPath, FileUtilities.GetContentFilePath("Services")); + return service.Components.GetWorkerRole(name); + } + + /// + /// Gets web role object from service definition. + /// + /// The azure service rootPath path + /// The web role object + internal static WebRole GetWebRole(string rootPath, string name) + { + CloudServiceProject service = new CloudServiceProject(rootPath, FileUtilities.GetContentFilePath("Services")); + return service.Components.GetWebRole(name); + } + + /// + /// Gets the role settings object from cloud service configuration. + /// + /// The azure service rootPath path + /// The role settings object + internal static RoleSettings GetCloudRole(string rootPath, string name) + { + CloudServiceProject service = new CloudServiceProject(rootPath, FileUtilities.GetContentFilePath("Services")); + return service.Components.GetCloudConfigRole(name); + } + + /// + /// Gets the role settings object from local service configuration. + /// + /// The azure service rootPath path + /// The role settings object + internal static RoleSettings GetLocalRole(string rootPath, string name) + { + CloudServiceProject service = new CloudServiceProject(rootPath, FileUtilities.GetContentFilePath("Services")); + return service.Components.GetLocalConfigRole(name); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test.Utilities/Common/FakeAccessToken.cs b/src/ServiceManagement/Services/Commands.Test.Utilities/Common/FakeAccessToken.cs new file mode 100644 index 000000000000..2790d8cf256d --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test.Utilities/Common/FakeAccessToken.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure.Commands.Utilities.Common.Authentication; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.Common +{ + public class FakeAccessToken : IAccessToken + { + public void AuthorizeRequest(Action authTokenSetter) + { + authTokenSetter("Bearer", AccessToken); + } + + public string AccessToken { get; set; } + + public string UserId { get; set; } + + public LoginType LoginType { get; set; } + + public string TenantId { get; set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test.Utilities/Common/FakeAccessTokenProvider.cs b/src/ServiceManagement/Services/Commands.Test.Utilities/Common/FakeAccessTokenProvider.cs new file mode 100644 index 000000000000..2166aae9ecdc --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test.Utilities/Common/FakeAccessTokenProvider.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Security; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Utilities.Common.Authentication; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.Common +{ + public class FakeAccessTokenProvider : ITokenProvider + { + private readonly IAccessToken accessToken; + + public FakeAccessTokenProvider(string token) + : this(token, "user@live.com") + { } + + public FakeAccessTokenProvider(string token, string userId) + { + this.accessToken = new MockAccessToken() + { + AccessToken = token, + UserId = userId + }; + } + + public IAccessToken GetAccessToken(AdalConfiguration config, ShowDialog promptBehavior, string userId, SecureString password, + AzureAccount.AccountType credentialType) + { + return this.accessToken; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test.Utilities/Common/FileSystemHelper.cs b/src/ServiceManagement/Services/Commands.Test.Utilities/Common/FileSystemHelper.cs new file mode 100644 index 000000000000..f3b310d1abb7 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test.Utilities/Common/FileSystemHelper.cs @@ -0,0 +1,329 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Diagnostics; +using System.IO; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.Common +{ + /// + /// Utility used to create files and directories and clean them up when + /// complete. + /// + public class FileSystemHelper : IDisposable + { + /// + /// Gets the path to the rootPath of the file system utilized by the test. + /// + public string RootPath { get; private set; } + + /// + /// Gets or sets the path to a temporary Azure SDK which we use to + /// store and cleanup after global files. + /// + public string AzureSdkPath { get; private set; } + + /// + /// Gets a reference to the test class using the FileSystemHelper to + /// provide access to its logging. + /// + public TestBase TestInstance { get; private set; } + + /// + /// Monitors changes to the file system. + /// + private FileSystemWatcher _watcher = null; + + /// + /// The previous Environment.CurrentDirectory which is cached so it can + /// be restored on disposal. + /// + private string _previousDirectory = null; + + /// + /// Gets or sets a value indicating whether to enable monitoring on + /// the portion of the file system being managed by FileSystemHelper. + /// + public bool EnableMonitoring + { + get { return _watcher != null; } + set + { + if (!value && _watcher != null) + { + // Dispose of the watcher if we're turning it off + DisposeWatcher(); + } + else if (value && _watcher == null) + { + // Create a file system watcher + _watcher = new FileSystemWatcher(); + _watcher.Path = RootPath; + _watcher.IncludeSubdirectories = true; + _watcher.Changed += (s, e) => Log(" Changed {0}", GetRelativePath(e.FullPath)); + _watcher.Created += (s, e) => Log(" Created at {0}", GetRelativePath(e.FullPath)); + _watcher.Deleted += (s, e) => Log(" Deleted at {0}", GetRelativePath(e.FullPath)); + _watcher.Renamed += (s, e) => Log(" Renamed {0} to {1}", GetRelativePath(e.OldFullPath), GetRelativePath(e.FullPath)); + _watcher.EnableRaisingEvents = true; + } + + } + } + + /// + /// Initializes a new FileSystemHelper to a random temp directory. + /// + /// + /// Reference to the test class (to access its logging). + /// + public FileSystemHelper(TestBase testInstance) + : this(testInstance, GetTemporaryDirectoryName()) + { + } + + /// + /// Initialize a new FileSystemHelper to a specific directory. + /// + /// + /// Reference to the test class (to access its logging). + /// + /// The rootPath directory. + public FileSystemHelper(TestBase testInstance, string rootPath) + { + Debug.Assert(testInstance != null); + Debug.Assert(!string.IsNullOrEmpty(rootPath)); + + TestInstance = testInstance; + + // Set the directory and create it if necessary. + RootPath = rootPath; + if (!FileUtilities.DataStore.DirectoryExists(rootPath)) + { + Log("Creating directory {0}", rootPath); + FileUtilities.DataStore.CreateDirectory(rootPath); + } + } + + /// + /// Destroy the files and directories created during the test. + /// + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) + { + if (disposing) + { + if (RootPath != null) + { + // Cleanup any certificates added during the test + if (!string.IsNullOrEmpty(AzureSdkPath)) + { + try { new RemoveAzurePublishSettingsCommand().RemovePublishSettingsProcess(AzureSdkPath); } + catch { /* Cleanup failed, ignore*/ } + + AzureSdkPath = null; + } + + // Restore the previous CurrentDirectory + if (_previousDirectory != null) + { + Environment.CurrentDirectory = _previousDirectory; + } + + Log("Deleting directory {0}", RootPath); + FileUtilities.DataStore.DeleteDirectory(RootPath); + + DisposeWatcher(); + + // Note: We can't clear the RootPath until we've disposed the + // watcher because its handlers will attempt to get relative + // paths which will fail if there is no RootPath + RootPath = null; + } + } + } + + /// + /// Dispose of the FileSystemWatcher we're using to monitor changes to + /// the FileSystem. + /// + private void DisposeWatcher() + { + if (_watcher != null) + { + _watcher.EnableRaisingEvents = false; + _watcher.Dispose(); + _watcher = null; + } + } + + /// + /// Log a message from the FileSytemHelper. + /// + /// Message format. + /// Message argument. + private void Log(string format, params object[] args) + { + TestInstance.Log("[FileSystemHelper] " + format, args); + } + + /// + /// Get the path of a file relative to the FileSystemHelper's rootPath. + /// + /// The full path to the file. + /// The path relative to the FileSystemHelper's rootPath. + public string GetRelativePath(string fullPath) + { + Debug.Assert(!string.IsNullOrEmpty(fullPath)); + Debug.Assert(fullPath.StartsWith(RootPath, StringComparison.OrdinalIgnoreCase)); + return fullPath.Substring(RootPath.Length, fullPath.Length - RootPath.Length); + } + + /// + /// Get the full path to a file given a path relative to the + /// FileSystemHelper's rootPath. + /// + /// Relative path. + /// Corresponding full path. + public string GetFullPath(string relativePath) + { + Debug.Assert(!string.IsNullOrEmpty(relativePath)); + return Path.Combine(RootPath, relativePath); + } + + /// + /// Create a random directory name that doesn't yet exist on disk. + /// + /// A random, non-existant directory name. + public static string GetTemporaryDirectoryName() + { + string path = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); + while (Directory.Exists(path)) + { + path = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); + } + + return path; + } + + /// + /// Create a new directory relative to the rootPath. + /// + /// Relative path to the directory. + /// The full path to the directory. + public string CreateDirectory(string relativePath) + { + Debug.Assert(!string.IsNullOrEmpty(relativePath)); + + string path = Path.Combine(RootPath, relativePath); + if (!FileUtilities.DataStore.DirectoryExists(path)) + { + Log("Creating directory {0}", path); + FileUtilities.DataStore.CreateDirectory(path); + } + + return path; + } + + /// + /// Create an empty file relative to the rootPath. + /// + /// Relative path to the file. + /// The full path to the file. + public string CreateEmptyFile(string relativePath) + { + Debug.Assert(!string.IsNullOrEmpty(relativePath)); + + string path = Path.Combine(RootPath, relativePath); + if (!FileUtilities.DataStore.FileExists(path)) + { + Log("Creating empty file {0}", path); + FileUtilities.DataStore.WriteFile(path, ""); + } + + return path; + } + + /// + /// Create a temporary Azure SDK directory to simulate global files. + /// + /// The path to the temporary Azure SDK directory. + public string CreateAzureSdkDirectoryAndImportPublishSettings() + { + return CreateAzureSdkDirectoryAndImportPublishSettings(Data.ValidPublishSettings[0]); + } + + /// + /// Create a temporary Azure SDK directory to simulate global files. + /// + /// + /// Path to the publish settings. + /// + /// The path to the temporary Azure SDK directory. + public string CreateAzureSdkDirectoryAndImportPublishSettings(string publishSettingsPath) + { + Debug.Assert(!string.IsNullOrEmpty(publishSettingsPath)); + Debug.Assert(File.Exists(publishSettingsPath)); + Debug.Assert(string.IsNullOrEmpty(AzureSdkPath)); + + AzureSdkPath = CreateDirectory("AzureSdk"); + ProfileClient client = new ProfileClient(); + ProfileClient.DataStore.WriteFile(publishSettingsPath, File.ReadAllText(publishSettingsPath)); + client.ImportPublishSettings(publishSettingsPath, null); + client.Profile.Save(); + + return AzureSdkPath; + } + + /// + /// Create a new service with a given name and make that the current + /// directory used by cmdlets. + /// + /// Name of the service. + /// Directory created for the service. + public string CreateNewService(string serviceName) + { + CloudServiceProject newService = new CloudServiceProject(RootPath, serviceName, FileUtilities.GetContentFilePath("Services")); + string path = Path.Combine(RootPath, serviceName); + _previousDirectory = Environment.CurrentDirectory; + Environment.CurrentDirectory = path; + + return path; + } + + public void CreateDirectoryWithPrebuiltPackage(string packageName, out string package, out string configuration) + { + string serviceName = packageName; + package = Path.Combine(RootPath, packageName + ".cspkg"); + FileUtilities.DataStore.WriteFile(package, "does not matter"); + configuration = Path.Combine(RootPath, "ServiceConfiguration.Cloud.cscfg"); + string template = "" + + Environment.NewLine + + ""; + FileUtilities.DataStore.WriteFile(configuration, template); + _previousDirectory = Environment.CurrentDirectory; + Environment.CurrentDirectory = RootPath; + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test.Utilities/Common/MockServicesHost.cs b/src/ServiceManagement/Services/Commands.Test.Utilities/Common/MockServicesHost.cs new file mode 100644 index 000000000000..9325fa70b099 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test.Utilities/Common/MockServicesHost.cs @@ -0,0 +1,230 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute; +using Microsoft.WindowsAzure.Management.Compute.Models; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.Common +{ + /// + /// This class simulates querying and updating hosted services. + /// + public class MockServicesHost + { + public class ServiceData + { + public string Name { get; set; } + public DeploymentData ProductionDeployment { get; set; } + public DeploymentData StagingDeployment { get; set; } + + public ServiceData AddDeployment(Action setter) + { + var data = new DeploymentData(); + setter(data); + + switch (data.Slot) + { + case DeploymentSlot.Production: + ProductionDeployment = data; + break; + case DeploymentSlot.Staging: + StagingDeployment = data; + break; + } + return this; + } + } + + public class DeploymentData + { + public string Name { get; set; } + public DeploymentSlot Slot { get; set; } + } + + public IList Services { get; private set; } + + public UpdatedDeploymentStatus? LastDeploymentStatusUpdate { get; set; } + + public MockServicesHost() + { + Services = new List(); + } + + public MockServicesHost Add(Action setter) + { + var service = new ServiceData(); + setter(service); + Services.Add(service); + return this; + } + + public MockServicesHost Clear() + { + Services.Clear(); + return this; + } + + public void InitializeMocks(Mock mock) + { + mock.Setup(c => c.HostedServices.GetDetailedAsync(It.IsAny(), It.IsAny())) + .Returns((string s, CancellationToken cancellationToken) => CreateGetDetailedResponse(s)); + + mock.Setup(c => c.Deployments.GetBySlotAsync(It.IsAny(), It.IsAny(), It.IsAny())) + .Returns((string serviceName, DeploymentSlot slot, CancellationToken cancellationToken) => CreateDeploymentGetResponse(serviceName, slot)); + + mock.Setup( + c => + c.Deployments.CreateAsync( + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny())) + .Callback( + (string name, DeploymentSlot slot, DeploymentCreateParameters createParameters, CancellationToken cancellationToken) => + CreateDeployment(name, slot, createParameters)) + .Returns(CreateDeploymentCreateResponse); + + mock.Setup(c => c.ServiceCertificates.ListAsync(It.IsAny(), It.IsAny())) + .Returns(Tasks.FromResult(null)); + + mock.Setup(c => c.Deployments.UpdateStatusByDeploymentSlotAsync( + It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) + .Callback((string name, DeploymentSlot slot, DeploymentUpdateStatusParameters p, CancellationToken cancellationToken) => + { + LastDeploymentStatusUpdate = p.Status; + }) + .Returns(CreateUpdateStatusResponse); + } + + private Task CreateGetDetailedResponse(string serviceName) + { + var service = Services.FirstOrDefault(s => s.Name == serviceName); + Task resultTask; + + if (service != null) + { + var response = new HostedServiceGetDetailedResponse + { + ServiceName = service.Name, + StatusCode = HttpStatusCode.OK, + }; + if (service.ProductionDeployment != null) + { + response.Deployments.Add(CreateDeploymentResponse(service.ProductionDeployment)); + } + + if (service.StagingDeployment != null) + { + response.Deployments.Add(CreateDeploymentResponse(service.StagingDeployment)); + } + resultTask = Tasks.FromResult(response); + } + else + { + resultTask = Tasks.FromException(ClientMocks.Make404Exception()); + } + return resultTask; + } + + private HostedServiceGetDetailedResponse.Deployment CreateDeploymentResponse(DeploymentData d) + { + if (d != null) + { + return new HostedServiceGetDetailedResponse.Deployment + { + DeploymentSlot = d.Slot, + Name = d.Name, + Roles = + { + new Role + { + RoleName = "Role1" + } + } + }; + } + return null; + } + + private Task CreateDeploymentGetResponse(string serviceName, DeploymentSlot slot) + { + var service = Services.FirstOrDefault(s => s.Name == serviceName); + var failedResponse = Tasks.FromException(ClientMocks.Make404Exception()); + if (service == null) + { + return failedResponse; + } + + if (slot == DeploymentSlot.Production && service.ProductionDeployment == null || + slot == DeploymentSlot.Staging && service.StagingDeployment == null) + { + return failedResponse; + } + + var response = new DeploymentGetResponse + { + Name = serviceName, + Configuration = "config", + DeploymentSlot = slot, + Status = DeploymentStatus.Starting, + PersistentVMDowntime = new PersistentVMDowntime + { + EndTime = DateTime.Now, + StartTime = DateTime.Now, + Status = "", + }, + LastModifiedTime = DateTime.Now + }; + + return Tasks.FromResult(response); + } + + private void CreateDeployment(string serviceName, DeploymentSlot slot, + DeploymentCreateParameters createParameters) + { + var service = Services.First(s => s.Name == serviceName); + service.AddDeployment(d => + { + d.Name = createParameters.Name; + d.Slot = slot; + }); + } + + private Task CreateDeploymentCreateResponse() + { + return Tasks.FromResult(new OperationStatusResponse + { + RequestId = "someid", + StatusCode = HttpStatusCode.OK + }); + } + + private Task CreateUpdateStatusResponse() + { + return Tasks.FromResult(new OperationStatusResponse + { + Status = OperationStatus.InProgress + }); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test.Utilities/Common/MockStorageService.cs b/src/ServiceManagement/Services/Commands.Test.Utilities/Common/MockStorageService.cs new file mode 100644 index 000000000000..dee827deb3e7 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test.Utilities/Common/MockStorageService.cs @@ -0,0 +1,179 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Storage; +using Microsoft.WindowsAzure.Management.Storage.Models; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.Common +{ + /// + /// A class used to simulate the behavior of a storage account as far as existing, + /// creation, and querying are concerned. + /// + public class MockStorageService + { + public class StorageAccountData + { + private string blobEndpoint; + private string queueEndpoint; + private string tableEndpoint; + private string primaryKey; + private string secondaryKey; + + private const string defaultPrimaryKey = "MNao3bm7t7B/x+g2/ssh9HnG0mEh1QV5EHpcna8CetYn+TSRoA8/SBoH6B3Ufwtnz3jZLSw9GEUuCTr3VooBWq=="; + private const string defaultSecondaryKey = "secondaryKey"; + + public string Name { get; set; } + + public string BlobEndpoint + { + get + { + return blobEndpoint ?? "http://awesome.blob.windows.core.net/"; + } + set { blobEndpoint = value; } + } + + public string QueueEndpoint + { + get { return queueEndpoint ?? "http://awesome.queue.windows.core.net/"; } + set { queueEndpoint = value; } + } + + public string TableEndpoint + { + get { return tableEndpoint ?? "http://awesome.table.windows.core.net"; } + set { tableEndpoint = value; } + } + + public string PrimaryKey + { + get { return primaryKey ?? defaultPrimaryKey; } + set { primaryKey = value; } + } + + public string SecondaryKey + { + get { return secondaryKey ?? defaultSecondaryKey; } + set { secondaryKey = value; } + } + } + + private readonly List accounts = new List(); + + public MockStorageService Add(Action dataSetter) + { + var account = new StorageAccountData(); + dataSetter(account); + accounts.Add(account); + return this; + } + + public void Clear() + { + accounts.Clear(); + } + + public void InitializeMocks(Mock mock) + { + mock.Setup(c => c.StorageAccounts.GetAsync(It.IsAny(), It.IsAny())) + .Returns((string serviceName, CancellationToken cancellationToken) => CreateGetResponse(serviceName)); + + mock.Setup(c => c.StorageAccounts.GetKeysAsync(It.IsAny(), It.IsAny())) + .Returns((string serviceName, CancellationToken cancellationToken) => CreateGetKeysResponse(serviceName)); + + mock.Setup(c => c.StorageAccounts.CreateAsync(It.IsAny(), It.IsAny())) + .Callback((StorageAccountCreateParameters createParameters, CancellationToken cancellationToken) => AddService(createParameters)) + .Returns(CreateCreateResponse); + } + + private Task CreateGetResponse(string serviceName) + { + Task resultTask; + var data = accounts.FirstOrDefault(a => a.Name == serviceName); + if (data != null) + { + var storageServiceGetResponse = new StorageAccountGetResponse + { + StorageAccount = new StorageAccount + { + Name = data.Name, + Properties = new StorageAccountProperties + { + Endpoints = + { + new Uri(data.BlobEndpoint), + new Uri(data.QueueEndpoint), + new Uri(data.TableEndpoint) + } + } + } + }; + resultTask = Tasks.FromResult(storageServiceGetResponse); + } + else + { + resultTask = Tasks.FromException(ClientMocks.Make404Exception()); + } + return resultTask; + } + + private Task CreateGetKeysResponse(string serviceName) + { + Task resultTask; + var data = accounts.FirstOrDefault(a => a.Name == serviceName); + if (data != null) + { + var response = new StorageAccountGetKeysResponse + { + PrimaryKey = data.PrimaryKey, + SecondaryKey = data.SecondaryKey, + StatusCode = HttpStatusCode.OK + }; + resultTask = Tasks.FromResult(response); + } + else + { + resultTask = Tasks.FromException(ClientMocks.Make404Exception()); + } + return resultTask; + } + + private void AddService(StorageAccountCreateParameters createParameters) + { + Add(a => + { + a.Name = createParameters.Name; + }); + } + private Task CreateCreateResponse() + { + return Tasks.FromResult(new OperationStatusResponse + { + RequestId = "unused", + StatusCode = HttpStatusCode.OK, + Status = OperationStatus.Succeeded + }); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test.Utilities/Common/XUnitHelper.cs b/src/ServiceManagement/Services/Commands.Test.Utilities/Common/XUnitHelper.cs new file mode 100644 index 000000000000..6276b66f3f31 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test.Utilities/Common/XUnitHelper.cs @@ -0,0 +1,41 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.Common +{ + /// + /// Remove this class once migrate to XUnit 2.0 + /// + public class XUnitHelper + { + public static bool IsCheckin() + { + var type = Environment.GetEnvironmentVariable("POWERSHELL_TEST_TYPE"); + if (type == null || type.Equals("Checkin", StringComparison.InvariantCultureIgnoreCase)) + { + return true; + } + else + { + return false; + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test.Utilities/MSSharedLibKey.snk b/src/ServiceManagement/Services/Commands.Test.Utilities/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ServiceManagement/Services/Commands.Test.Utilities/MSSharedLibKey.snk differ diff --git a/src/ServiceManagement/Services/Commands.Test.Utilities/Properties/AssemblyInfo.cs b/src/ServiceManagement/Services/Commands.Test.Utilities/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..fe165d4f43c3 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test.Utilities/Properties/AssemblyInfo.cs @@ -0,0 +1,55 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft Azure Powershell")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("8d4efcd0-0ce9-4a27-8322-dd087b326a87")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] +[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] +#if SIGN +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.HDInsight.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +#else +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.Test")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.HDInsight.Test")] +#endif +[assembly: CLSCompliant(false)] diff --git a/src/ServiceManagement/Services/Commands.Test.Utilities/Websites/SimpleDeploymentServiceManagement.cs b/src/ServiceManagement/Services/Commands.Test.Utilities/Websites/SimpleDeploymentServiceManagement.cs new file mode 100644 index 000000000000..c912ffde29af --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test.Utilities/Websites/SimpleDeploymentServiceManagement.cs @@ -0,0 +1,228 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.DeploymentEntities; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.Websites +{ + /// + /// Simple implementation of the interface that can be + /// used for mocking basic interactions without involving Azure directly. + /// + public class SimpleDeploymentServiceManagement : IDeploymentServiceManagement + { + /// + /// Gets or sets a value indicating whether the thunk wrappers will + /// throw an exception if the thunk is not implemented. This is useful + /// when debugging a test. + /// + public bool ThrowsIfNotImplemented { get; set; } + + /// + /// Initializes a new instance of the class. + /// + public SimpleDeploymentServiceManagement() + { + ThrowsIfNotImplemented = true; + } + + #region Implementation Thunks + + #region GetDeployments + + public Func> GetDeploymentsThunk { get; set; } + + public IAsyncResult BeginGetDeployments(int maxItems, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["maxItems"] = maxItems; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public List EndGetDeployments(IAsyncResult asyncResult) + { + if (GetDeploymentsThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleDeploymentServiceManagementAsyncResult!"); + + return GetDeploymentsThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("GetDeploymentsThunk is not implemented!"); + } + + return default(List); + } + + #endregion + + #region Deploy + + public Action DeployThunk { get; set; } + + public IAsyncResult BeginDeploy(string commitId, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["commitId"] = commitId; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public void EndDeploy(IAsyncResult asyncResult) + { + if (DeployThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleDeploymentServiceManagementAsyncResult!"); + DeployThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("DeployThunk is not implemented!"); + } + } + + #endregion + + #region GetDeploymentLogs + + public Func> GetDeploymentLogsThunk { get; set; } + + public IAsyncResult BeginGetDeploymentLogs(string commitId, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["commitId"] = commitId; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public List EndGetDeploymentLogs(IAsyncResult asyncResult) + { + if (GetDeploymentLogsThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleDeploymentServiceManagementAsyncResult!"); + + return GetDeploymentLogsThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("GetDeploymentLogs is not implemented!"); + } + + return default(List); + } + + #endregion + + #region GetDeploymentLog + + public Func GetDeploymentLogThunk { get; set; } + + public IAsyncResult BeginGetDeploymentLog(string commitId, string logId, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["commitId"] = commitId; + result.Values["logId"] = logId; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public LogEntry EndGetDeploymentLog(IAsyncResult asyncResult) + { + if (GetDeploymentLogThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleDeploymentServiceManagementAsyncResult!"); + + return GetDeploymentLogThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("GetDeploymentLog is not implemented!"); + } + + return default(LogEntry); + } + + #endregion + + #region DownloadLogs + + public Func DownloadLogsThunk { get; set; } + + public IAsyncResult BeginDownloadLogs(AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public Stream EndDownloadLogs(IAsyncResult asyncResult) + { + if (DownloadLogsThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleDeploymentServiceManagementAsyncResult!"); + + return DownloadLogsThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("GetDeploymentLog is not implemented!"); + } + + return default(Stream); + } + + #endregion + + #endregion + + public IAsyncResult BeginGetDiagnosticsSettings(AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public DiagnosticsSettings EndGetDiagnosticsSettings(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginSetDiagnosticsSettings(DiagnosticsSettings diagnosticsSettings, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public void EndSetDiagnosticsSettings(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + } +} + diff --git a/src/ServiceManagement/Services/Commands.Test.Utilities/Websites/SimpleGithubManagement.cs b/src/ServiceManagement/Services/Commands.Test.Utilities/Websites/SimpleGithubManagement.cs new file mode 100644 index 000000000000..e1863fff251b --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test.Utilities/Websites/SimpleGithubManagement.cs @@ -0,0 +1,304 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.Github; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.Github.Entities; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.Websites +{ + public class SimpleGithubManagement : IGithubServiceManagement + { + /// + /// Gets or sets a value indicating whether the thunk wrappers will + /// throw an exception if the thunk is not implemented. This is useful + /// when debugging a test. + /// + public bool ThrowsIfNotImplemented { get; set; } + + /// + /// Initializes a new instance of the class. + /// + public SimpleGithubManagement() + { + ThrowsIfNotImplemented = true; + } + + #region Implementation Thunks + + #region GetRepositories + + public Func> GetRepositoriesThunk { get; set; } + + public IAsyncResult BeginGetRepositories(AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public List EndGetRepositories(IAsyncResult asyncResult) + { + if (GetRepositoriesThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleDeploymentServiceManagementAsyncResult!"); + + return GetRepositoriesThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("GetRepositoriesThunk is not implemented!"); + } + + return default(List); + } + + #endregion + + #region GetOrganizations + + public Func> GetOrganizationsThunk { get; set; } + + public IAsyncResult BeginGetOrganizations(AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public List EndGetOrganizations(IAsyncResult asyncResult) + { + if (GetOrganizationsThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleDeploymentServiceManagementAsyncResult!"); + + return GetOrganizationsThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("GetOrganizationsThunk is not implemented!"); + } + + return default(List); + } + + #endregion + + + #region GetRepositoriesFromOrg + + public Func> GetRepositoriesFromOrgThunk { get; set; } + + public IAsyncResult BeginGetRepositoriesFromOrg(string organization, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["organization"] = organization; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public List EndGetRepositoriesFromOrg(IAsyncResult asyncResult) + { + if (GetRepositoriesFromOrgThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleDeploymentServiceManagementAsyncResult!"); + + return GetRepositoriesFromOrgThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("GetRepositoriesFromOrgThunk is not implemented!"); + } + + return default(List); + } + + #endregion + + #region GetRepositoryHooks + + public Func> GetRepositoryHooksThunk { get; set; } + + public IAsyncResult BeginGetRepositoryHooks(string owner, string repository, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["owner"] = owner; + result.Values["repository"] = repository; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public List EndGetRepositoryHooks(IAsyncResult asyncResult) + { + if (GetRepositoryHooksThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleDeploymentServiceManagementAsyncResult!"); + + return GetRepositoryHooksThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("GetRepositoryHooksThunk is not implemented!"); + } + + return default(List); + } + + #endregion + + #region CreatedRepositoryHook + + public Func CreateRepositoryHookThunk { get; set; } + + public IAsyncResult BeginCreateRepositoryHook(string owner, string repository, GithubRepositoryHook hook, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["owner"] = owner; + result.Values["repository"] = repository; + result.Values["hook"] = hook; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public GithubRepositoryHook EndCreateRepositoryHook(IAsyncResult asyncResult) + { + if (CreateRepositoryHookThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleDeploymentServiceManagementAsyncResult!"); + + return CreateRepositoryHookThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("CreateRepositoryHookThunk is not implemented!"); + } + + return default(GithubRepositoryHook); + } + + #endregion + + #region UpdateRepositoryHook + + public Func UpdateRepositoryHookThunk { get; set; } + + public IAsyncResult BeginUpdateRepositoryHook(string owner, string repository, string id, GithubRepositoryHook hook, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["owner"] = owner; + result.Values["repository"] = repository; + result.Values["id"] = id; + result.Values["hook"] = hook; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public GithubRepositoryHook EndUpdateRepositoryHook(IAsyncResult asyncResult) + { + if (UpdateRepositoryHookThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleDeploymentServiceManagementAsyncResult!"); + + return UpdateRepositoryHookThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("UpdateRepositoryHookThunk is not implemented!"); + } + + return default(GithubRepositoryHook); + } + + #endregion + + #region TestRepositoryHook + + public Action TestRepositoryHookThunk { get; set; } + + public IAsyncResult BeginTestRepositoryHook(string owner, string repository, string id, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["owner"] = owner; + result.Values["repository"] = repository; + result.Values["id"] = id; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public void EndTestRepositoryHook(IAsyncResult asyncResult) + { + if (TestRepositoryHookThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleDeploymentServiceManagementAsyncResult!"); + + TestRepositoryHookThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("TestRepositoryHookThunk is not implemented!"); + } + } + + #endregion + + #endregion + + public IAsyncResult BeginCreateAuthorizationToken(GithubAuthorizationRequest request, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public GithubAuthorization EndCreateAuthorizationToken(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginGetOrganizationsFromUser(string user, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public List EndGetOrganizationsFromUser(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginGetRepositoriesFromUser(string user, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public List EndGetRepositoriesFromUser(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test.Utilities/Websites/SimpleWebsitesManagement.cs b/src/ServiceManagement/Services/Commands.Test.Utilities/Websites/SimpleWebsitesManagement.cs new file mode 100644 index 000000000000..1f9bde5ca063 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test.Utilities/Websites/SimpleWebsitesManagement.cs @@ -0,0 +1,503 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.GeoEntities; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.Websites +{ + /// + /// Simple implementation of the interface that can be + /// used for mocking basic interactions without involving Azure directly. + /// + public class SimpleWebsitesManagement : IWebsitesServiceManagement + { + /// + /// Gets or sets a value indicating whether the thunk wrappers will + /// throw an exception if the thunk is not implemented. This is useful + /// when debugging a test. + /// + public bool ThrowsIfNotImplemented { get; set; } + + /// + /// Initializes a new instance of the class. + /// + public SimpleWebsitesManagement() + { + ThrowsIfNotImplemented = true; + } + + #region Implementation Thunks + + #region GetWebspaces + + public Func GetWebSpacesThunk { get; set; } + + public IAsyncResult BeginGetWebSpaces(string subscriptionName, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionName"] = subscriptionName; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public WebSpaces EndGetWebSpaces(IAsyncResult asyncResult) + { + if (GetWebSpacesThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + return GetWebSpacesThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("GetWebSpacesThunk is not implemented!"); + } + + return default(WebSpaces); + } + + #endregion + + #region GetSites + + public Func GetSitesThunk { get; set; } + + public IAsyncResult BeginGetSites(string subscriptionName, string webspaceName, string propertiesToInclude, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionName"] = subscriptionName; + result.Values["webspaceName"] = webspaceName; + result.Values["propertiesToInclude"] = propertiesToInclude; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public Sites EndGetSites(IAsyncResult asyncResult) + { + if (GetSitesThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + return GetSitesThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("GetSitesThunk is not implemented!"); + } + + return default(Sites); + } + + #endregion + + #region DeleteWebsite + + public Action DeleteSiteThunk { get; set; } + + public IAsyncResult BeginDeleteSite(string subscriptionName, string webspaceName, string name, string deleteMetrics, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionName"] = subscriptionName; + result.Values["webspaceName"] = webspaceName; + result.Values["name"] = name; + result.Values["deleteMetrics"] = deleteMetrics; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public void EndDeleteSite(IAsyncResult asyncResult) + { + if (DeleteSiteThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + DeleteSiteThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("DeleteSiteThunk is not implemented!"); + } + } + + #endregion + + #region GetSiteConfig + + public Func GetSiteConfigThunk { get; set; } + + public IAsyncResult BeginGetSiteConfig(string subscriptionName, string webspaceName, string name, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionName"] = subscriptionName; + result.Values["webspaceName"] = webspaceName; + result.Values["name"] = name; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public SiteConfig EndGetSiteConfig(IAsyncResult asyncResult) + { + if (GetSiteConfigThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + return GetSiteConfigThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("GetSiteConfigThunk is not implemented!"); + } + + return default(SiteConfig); + } + + #endregion + + #region CreateSite + + public Func CreateSiteThunk { get; set; } + + public IAsyncResult BeginCreateSite(string subscriptionName, string webspaceName, Site site, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionName"] = subscriptionName; + result.Values["webspaceName"] = webspaceName; + result.Values["site"] = site; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public Site EndCreateSite(IAsyncResult asyncResult) + { + if (CreateSiteThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + return CreateSiteThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("CreateSiteThunk is not implemented!"); + } + + return default(Site); + } + + #endregion + + #region UpdateWebsite + + public Action UpdateSiteThunk { get; set; } + + public IAsyncResult BeginUpdateSite(string subscriptionName, string webspaceName, string name, Site site, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionName"] = subscriptionName; + result.Values["webspaceName"] = webspaceName; + result.Values["name"] = name; + result.Values["site"] = site; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public void EndUpdateSite(IAsyncResult asyncResult) + { + if (UpdateSiteThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + UpdateSiteThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("UpdateSiteThunk is not implemented!"); + } + } + + #endregion + + #region UpdateSiteConfig + + public Action UpdateSiteConfigThunk { get; set; } + + public IAsyncResult BeginUpdateSiteConfig(string subscriptionName, string webspaceName, string name, SiteConfig siteConfig, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionName"] = subscriptionName; + result.Values["webspaceName"] = webspaceName; + result.Values["name"] = name; + result.Values["siteConfig"] = siteConfig; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public void EndUpdateSiteConfig(IAsyncResult asyncResult) + { + if (UpdateSiteConfigThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + UpdateSiteConfigThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("UpdateSiteConfigThunk is not implemented!"); + } + } + + #endregion + + #region GetPublishingUsers + + public Func GetSubscriptionPublishingUsersThunk { get; set; } + + public IAsyncResult BeginGetSubscriptionPublishingUsers(string subscriptionName, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionName"] = subscriptionName; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public string[] EndGetSubscriptionPublishingUsers(IAsyncResult asyncResult) + { + if (GetSubscriptionPublishingUsersThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + return GetSubscriptionPublishingUsersThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("GetSubscriptionPublishingUsersThunk is not implemented!"); + } + + return default(string[]); + } + + #endregion + + #region CreateWebsiteRepository + + public Action CreateSiteRepositoryThunk { get; set; } + + public IAsyncResult BeginCreateSiteRepository(string subscriptionName, string webspaceName, string name, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionName"] = subscriptionName; + result.Values["webspaceName"] = webspaceName; + result.Values["name"] = name; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public void EndCreateSiteRepository(IAsyncResult asyncResult) + { + if (CreateSiteRepositoryThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + CreateSiteRepositoryThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("CreateSiteRepositoryThunk is not implemented!"); + } + } + + #endregion + + #region GetSite + + public Func GetSiteThunk { get; set; } + + public IAsyncResult BeginGetSite(string subscriptionName, string webspaceName, string name, string propertiesToInclude, AsyncCallback callback, object state) + { + SimpleServiceManagementAsyncResult result = new SimpleServiceManagementAsyncResult(); + result.Values["subscriptionName"] = subscriptionName; + result.Values["webspaceName"] = webspaceName; + result.Values["name"] = name; + result.Values["propertiesToInclude"] = propertiesToInclude; + result.Values["callback"] = callback; + result.Values["state"] = state; + return result; + } + + public Site EndGetSite(IAsyncResult asyncResult) + { + if (GetSiteThunk != null) + { + SimpleServiceManagementAsyncResult result = asyncResult as SimpleServiceManagementAsyncResult; + Assert.IsNotNull(result, "asyncResult was not SimpleServiceManagementAsyncResult!"); + + return GetSiteThunk(result); + } + else if (ThrowsIfNotImplemented) + { + throw new NotImplementedException("GetSiteThunk is not implemented!"); + } + + return default(Site); + } + + #endregion + + #endregion + + public IAsyncResult BeginGetWebSpace(string subscriptionName, string name, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public WebSpace EndGetWebSpace(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginCreateWebSpace(string subscriptionName, bool allowPendingState, WebSpace webSpace, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public WebSpace EndCreateWebSpace(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginUpdateWebSpace(string subscriptionName, string name, bool allowPendingState, WebSpace webSpace, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public WebSpace EndUpdateWebSpace(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginDeleteWebSpace(string subscriptionName, string name, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public void EndDeleteWebSpace(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginGetSiteRepositoryUri(string subscriptionName, string webspaceName, string name, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public Uri EndGetSiteRepositoryUri(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginDeleteSiteRepository(string subscriptionName, string webspaceName, string name, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public void EndDeleteSiteRepository(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginCreateDevSite(string subscriptionName, string webspaceName, string name, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public void EndCreateDevSite(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginGetDevSite(string subscriptionName, string webspaceName, string name, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public SiteRepositoryDev EndGetDevSite(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginUpdateDevSite(string subscriptionName, string webspaceName, string name, SiteRepositoryDev repositoryDevSite, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public void EndUpdateDevSite(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginDeleteDevSite(string subscriptionName, string webspaceName, string name, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public void EndDeleteDevSite(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + + public IAsyncResult BeginGetRegions(bool listOnlyOnline, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public GeoRegions EndGetRegions(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + + public IAsyncResult BeginGetLocations(string regionName, AsyncCallback callback, object state) + { + throw new NotImplementedException(); + } + + public GeoLocations EndGetLocations(IAsyncResult asyncResult) + { + throw new NotImplementedException(); + } + } +} + diff --git a/src/ServiceManagement/Services/Commands.Test.Utilities/Websites/WebsitesTestBase.cs b/src/ServiceManagement/Services/Commands.Test.Utilities/Websites/WebsitesTestBase.cs new file mode 100644 index 000000000000..7f0943b1c39c --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test.Utilities/Websites/WebsitesTestBase.cs @@ -0,0 +1,54 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Common; + +namespace Microsoft.WindowsAzure.Commands.Test.Utilities.Websites +{ + [TestClass] + public class WebsitesTestBase : TestBase + { + protected string subscriptionId = "035B9E16-BA8E-40A3-BEEA-4998F452C203"; + + [TestInitialize] + public virtual void SetupTest() + { + new FileSystemHelper(this).CreateAzureSdkDirectoryAndImportPublishSettings(); + } + + [TestCleanup] + public void TestCleanup() + { + string webSpacesFile = Path.Combine(AzurePowerShell.ProfileDirectory, + string.Format("spaces.{0}.json", subscriptionId)); + + string sitesFile = Path.Combine(AzurePowerShell.ProfileDirectory, + string.Format("sites.{0}.json", subscriptionId)); + + if (File.Exists(webSpacesFile)) + { + File.Delete(webSpacesFile); + } + + if (File.Exists(sitesFile)) + { + File.Delete(sitesFile); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test.Utilities/packages.config b/src/ServiceManagement/Services/Commands.Test.Utilities/packages.config new file mode 100644 index 000000000000..06e73968cf50 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test.Utilities/packages.config @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/DisableAzureRemoteDesktopCommandTest.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/DisableAzureRemoteDesktopCommandTest.cs new file mode 100644 index 000000000000..8b269008b892 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/DisableAzureRemoteDesktopCommandTest.cs @@ -0,0 +1,191 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using Microsoft.WindowsAzure.Commands.CloudService.Development; +using Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema; +using Microsoft.WindowsAzure.Commands.Common; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Development +{ + /// + /// Basic unit tests for the Enable-Enable-AzureServiceProjectRemoteDesktop command. + /// + public class DisableAzureRemoteDesktopCommandTest : TestBase + { + private MockCommandRuntime mockCommandRuntime; + + private AddAzureNodeWebRoleCommand addNodeWebCmdlet; + + private AddAzureNodeWorkerRoleCommand addNodeWorkerCmdlet; + + private DisableAzureServiceProjectRemoteDesktopCommand disableRDCmdlet; + + public DisableAzureRemoteDesktopCommandTest() + { + AzurePowerShell.ProfileDirectory = Test.Utilities.Common.Data.AzureSdkAppDir; + mockCommandRuntime = new MockCommandRuntime(); + + disableRDCmdlet = new DisableAzureServiceProjectRemoteDesktopCommand(); + disableRDCmdlet.CommandRuntime = mockCommandRuntime; + } + + private static void VerifyDisableRoleSettings(CloudServiceProject service) + { + IEnumerable settings = + Enumerable.Concat( + service.Components.CloudConfig.Role, + service.Components.LocalConfig.Role); + foreach (RoleSettings roleSettings in settings) + { + Assert.Equal( + 1, + roleSettings.ConfigurationSettings + .Where(c => c.name == "Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" && c.value == "false") + .Count()); + } + } + + /// + /// Enable remote desktop for an empty service. + /// + [Fact] + public void DisableRemoteDesktopForEmptyService() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + files.CreateAzureSdkDirectoryAndImportPublishSettings(); + files.CreateNewService("NEW_SERVICE"); + disableRDCmdlet.DisableRemoteDesktop(); + } + } + + /// + /// Disable remote desktop for a simple web role. + /// + [Fact] + public void DisableRemoteDesktopForWebRole() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + files.CreateAzureSdkDirectoryAndImportPublishSettings(); + string rootPath = files.CreateNewService("NEW_SERVICE"); + addNodeWebCmdlet = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = "WebRole" }; + addNodeWebCmdlet.ExecuteCmdlet(); + disableRDCmdlet.PassThru = true; + disableRDCmdlet.DisableRemoteDesktop(); + + Assert.True((bool)mockCommandRuntime.OutputPipeline[1]); + } + } + + /// + /// Disable remote desktop for web and worker roles. + /// + [Fact] + public void DisableRemoteDesktopForWebAndWorkerRoles() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + files.CreateAzureSdkDirectoryAndImportPublishSettings(); + string rootPath = files.CreateNewService("NEW_SERVICE"); + addNodeWebCmdlet = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = "WebRole" }; + addNodeWebCmdlet.ExecuteCmdlet(); + addNodeWorkerCmdlet = new AddAzureNodeWorkerRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = "WorkerRole" }; + addNodeWorkerCmdlet.ExecuteCmdlet(); + disableRDCmdlet.DisableRemoteDesktop(); + } + } + + /// + /// Enable then disable remote desktop for a simple web role. + /// + [Fact] + public void EnableDisableRemoteDesktopForWebRole() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + files.CreateAzureSdkDirectoryAndImportPublishSettings(); + string rootPath = files.CreateNewService("NEW_SERVICE"); + addNodeWebCmdlet = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = "WebRole" }; + addNodeWebCmdlet.ExecuteCmdlet(); + EnableAzureRemoteDesktopCommandTest.EnableRemoteDesktop("user", "GoodPassword!"); + disableRDCmdlet.DisableRemoteDesktop(); + // Verify the role has been setup with forwarding, access, + // and certs + CloudServiceProject service = new CloudServiceProject(rootPath, FileUtilities.GetContentFilePath("Services")); + EnableAzureRemoteDesktopCommandTest.VerifyWebRole(service.Components.Definition.WebRole[0], true); + VerifyDisableRoleSettings(service); + } + } + + /// + /// Enable then disable remote desktop for web and worker roles. + /// + [Fact] + public void EnableDisableRemoteDesktopForWebAndWorkerRoles() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + files.CreateAzureSdkDirectoryAndImportPublishSettings(); + string rootPath = files.CreateNewService("NEW_SERVICE"); + addNodeWebCmdlet = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = "WebRole" }; + addNodeWebCmdlet.ExecuteCmdlet(); + addNodeWorkerCmdlet = new AddAzureNodeWorkerRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = "WorkerRole" }; + addNodeWorkerCmdlet.ExecuteCmdlet(); + EnableAzureRemoteDesktopCommandTest.EnableRemoteDesktop("user", "GoodPassword!"); + disableRDCmdlet.DisableRemoteDesktop(); + // Verify the roles have been setup with forwarding, access, + // and certs + CloudServiceProject service = new CloudServiceProject(rootPath, FileUtilities.GetContentFilePath("Services")); + EnableAzureRemoteDesktopCommandTest.VerifyWebRole(service.Components.Definition.WebRole[0], false); + EnableAzureRemoteDesktopCommandTest.VerifyWorkerRole(service.Components.Definition.WorkerRole[0], true); + VerifyDisableRoleSettings(service); + } + } + + /// + /// Enable then disable remote desktop for web and worker roles. + /// + [Fact] + public void EnableDisableEnableRemoteDesktopForWebAndWorkerRoles() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + files.CreateAzureSdkDirectoryAndImportPublishSettings(); + string rootPath = files.CreateNewService("NEW_SERVICE"); + addNodeWebCmdlet = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = "WebRole" }; + addNodeWebCmdlet.ExecuteCmdlet(); + addNodeWorkerCmdlet = new AddAzureNodeWorkerRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = "WorkerRole" }; + addNodeWorkerCmdlet.ExecuteCmdlet(); + EnableAzureRemoteDesktopCommandTest.EnableRemoteDesktop("user", "GoodPassword!"); + disableRDCmdlet.DisableRemoteDesktop(); + EnableAzureRemoteDesktopCommandTest.EnableRemoteDesktop("user", "GoodPassword!"); + // Verify the roles have been setup with forwarding, access, + // and certs + CloudServiceProject service = new CloudServiceProject(rootPath, FileUtilities.GetContentFilePath("Services")); + EnableAzureRemoteDesktopCommandTest.VerifyWebRole(service.Components.Definition.WebRole[0], false); + EnableAzureRemoteDesktopCommandTest.VerifyWorkerRole(service.Components.Definition.WorkerRole[0], true); + EnableAzureRemoteDesktopCommandTest.VerifyRoleSettings(service); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/EnableAzureMemcacheRoleTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/EnableAzureMemcacheRoleTests.cs new file mode 100644 index 000000000000..27f967e5350c --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/EnableAzureMemcacheRoleTests.cs @@ -0,0 +1,427 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.CloudService.Development; +using Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService.AzureTools; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Development.Tests +{ + using ConfigConfigurationSetting = Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema.ConfigurationSetting; + using DefinitionConfigurationSetting = Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema.ConfigurationSetting; + using TestResources = Commands.Common.Test.Properties.Resources; + + public class EnableAzureMemcacheRoleTests : TestBase + { + private MockCommandRuntime mockCommandRuntime; + + private AddAzureNodeWebRoleCommand addNodeWebCmdlet; + + private AddAzureNodeWorkerRoleCommand addNodeWorkerCmdlet; + + private AddAzureCacheWorkerRoleCommand addCacheRoleCmdlet; + + private EnableAzureMemcacheRoleCommand enableCacheCmdlet; + + public EnableAzureMemcacheRoleTests() + { + AzureTool.IgnoreMissingSDKError = true; + AzurePowerShell.ProfileDirectory = Test.Utilities.Common.Data.AzureSdkAppDir; + mockCommandRuntime = new MockCommandRuntime(); + + enableCacheCmdlet = new EnableAzureMemcacheRoleCommand(); + addCacheRoleCmdlet = new AddAzureCacheWorkerRoleCommand(); + addCacheRoleCmdlet.CommandRuntime = mockCommandRuntime; + enableCacheCmdlet.CommandRuntime = mockCommandRuntime; + } + + [Fact] + public void EnableAzureMemcacheRoleProcess() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string serviceName = "AzureService"; + string rootPath = files.CreateNewService(serviceName); + string cacheRoleName = "WorkerRole"; + string webRoleName = "WebRole"; + string expectedMessage = string.Format(Resources.EnableMemcacheMessage, webRoleName, cacheRoleName, Resources.MemcacheEndpointPort); + + addNodeWebCmdlet = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = webRoleName }; + addNodeWebCmdlet.ExecuteCmdlet(); + addCacheRoleCmdlet.AddAzureCacheWorkerRoleProcess(cacheRoleName, 1, rootPath); + mockCommandRuntime.ResetPipelines(); + enableCacheCmdlet.PassThru = true; + enableCacheCmdlet.CacheRuntimeVersion = "2.5.0"; + enableCacheCmdlet.EnableAzureMemcacheRoleProcess(webRoleName, cacheRoleName, rootPath); + + AssertCachingEnabled(files, serviceName, rootPath, webRoleName, expectedMessage); + } + } + + /// + /// Verify that enabling cache on worker role will pass. + /// + [Fact] + public void EnableAzureMemcacheRoleProcessOnWorkerRoleSuccess() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string serviceName = "AzureService"; + string rootPath = files.CreateNewService(serviceName); + string cacheRoleName = "CacheWorkerRole"; + string workerRoleName = "WorkerRole"; + string expectedMessage = string.Format(Resources.EnableMemcacheMessage, workerRoleName, cacheRoleName, Resources.MemcacheEndpointPort); + + addNodeWorkerCmdlet = new AddAzureNodeWorkerRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = workerRoleName }; + addNodeWorkerCmdlet.ExecuteCmdlet(); + addCacheRoleCmdlet.AddAzureCacheWorkerRoleProcess(cacheRoleName, 1, rootPath); + mockCommandRuntime.ResetPipelines(); + enableCacheCmdlet.PassThru = true; + enableCacheCmdlet.EnableAzureMemcacheRoleProcess(workerRoleName, cacheRoleName, rootPath); + + WorkerRole workerRole = AzureAssert.GetWorkerRole(rootPath, workerRoleName); + + AzureAssert.RuntimeUrlAndIdExists(workerRole.Startup.Task, Resources.CacheRuntimeValue); + + AzureAssert.ScaffoldingExists(Path.Combine(files.RootPath, serviceName, workerRoleName), Path.Combine(Resources.CacheScaffolding, Resources.WorkerRole)); + AzureAssert.StartupTaskExists(workerRole.Startup.Task, Resources.CacheStartupCommand); + + AzureAssert.InternalEndpointExists(workerRole.Endpoints.InternalEndpoint, + new InternalEndpoint { name = Resources.MemcacheEndpointName, protocol = InternalProtocol.tcp, port = Resources.MemcacheEndpointPort }); + + LocalStore localStore = new LocalStore + { + name = Resources.CacheDiagnosticStoreName, + cleanOnRoleRecycle = false + }; + + AzureAssert.LocalResourcesLocalStoreExists(localStore, workerRole.LocalResources); + + DefinitionConfigurationSetting diagnosticLevel = new DefinitionConfigurationSetting { name = Resources.CacheClientDiagnosticLevelAssemblyName }; + AzureAssert.ConfigurationSettingExist(diagnosticLevel, workerRole.ConfigurationSettings); + + ConfigConfigurationSetting clientDiagnosticLevel = new ConfigConfigurationSetting { name = Resources.ClientDiagnosticLevelName, value = Resources.ClientDiagnosticLevelValue }; + AzureAssert.ConfigurationSettingExist(clientDiagnosticLevel, AzureAssert.GetCloudRole(rootPath, workerRoleName).ConfigurationSettings); + AzureAssert.ConfigurationSettingExist(clientDiagnosticLevel, AzureAssert.GetLocalRole(rootPath, workerRoleName).ConfigurationSettings); + + string workerConfigPath = string.Format(@"{0}\{1}\{2}", rootPath, workerRoleName, "web.config"); + string workerCloudConfig = File.ReadAllText(workerConfigPath); + Assert.True(workerCloudConfig.Contains("configSections")); + Assert.True(workerCloudConfig.Contains("dataCacheClients")); + + Assert.Equal(expectedMessage, mockCommandRuntime.VerboseStream[0]); + Assert.Equal(workerRoleName, (mockCommandRuntime.OutputPipeline[0] as PSObject).GetVariableValue(Parameters.RoleName)); + } + } + + /// + /// Verify that enabling cache with non-existing cache worker role will fail. + /// + [Fact] + public void EnableAzureMemcacheRoleProcessCacheRoleDoesNotExistFail() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string serviceName = "AzureService"; + string rootPath = files.CreateNewService(serviceName); + string cacheRoleName = "WorkerRole"; + string webRoleName = "WebRole"; + string expected = string.Format(Resources.RoleNotFoundMessage, cacheRoleName); + + addNodeWebCmdlet = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = webRoleName }; + addNodeWebCmdlet.ExecuteCmdlet(); + + Testing.AssertThrows(() => enableCacheCmdlet.EnableAzureMemcacheRoleProcess(webRoleName, cacheRoleName, rootPath)); + } + } + + /// + /// Verify that enabling cache with non-existing role to enable on will fail. + /// + [Fact] + public void EnableAzureMemcacheRoleProcessRoleDoesNotExistFail() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string serviceName = "AzureService"; + string rootPath = files.CreateNewService(serviceName); + string cacheRoleName = "WorkerRole"; + string webRoleName = "WebRole"; + string expected = string.Format(Resources.RoleNotFoundMessage, webRoleName); + + addCacheRoleCmdlet.AddAzureCacheWorkerRoleProcess(cacheRoleName, 1, rootPath); + + Testing.AssertThrows(() => enableCacheCmdlet.EnableAzureMemcacheRoleProcess(webRoleName, cacheRoleName, rootPath)); + } + } + + /// + /// Verify that enabling cache using same cache worker role on role with cache will fail. + /// + [Fact] + public void EnableAzureMemcacheRoleProcessAlreadyEnabledFail() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string serviceName = "AzureService"; + string rootPath = files.CreateNewService(serviceName); + string cacheRoleName = "WorkerRole"; + string webRoleName = "WebRole"; + string expected = string.Format(Resources.CacheAlreadyEnabledMessage, webRoleName); + + addNodeWebCmdlet = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = webRoleName }; + addNodeWebCmdlet.ExecuteCmdlet(); + addCacheRoleCmdlet.AddAzureCacheWorkerRoleProcess(cacheRoleName, 1, rootPath); + enableCacheCmdlet.EnableAzureMemcacheRoleProcess(webRoleName, cacheRoleName, rootPath); + + Testing.AssertThrows(() => enableCacheCmdlet.EnableAzureMemcacheRoleProcess(webRoleName, cacheRoleName, rootPath)); + } + } + + /// + /// Verify that enabling cache using different cache worker role on role with cache will fail. + /// + [Fact] + public void EnableAzureMemcacheRoleProcessAlreadyEnabledNewCacheRoleFail() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string serviceName = "AzureService"; + string rootPath = files.CreateNewService(serviceName); + string cacheRoleName = "WorkerRole"; + string newCacheRoleName = "NewCacheWorkerRole"; + string webRoleName = "WebRole"; + string expected = string.Format(Resources.CacheAlreadyEnabledMessage, webRoleName); + + addNodeWebCmdlet = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = webRoleName }; + addNodeWebCmdlet.ExecuteCmdlet(); + addCacheRoleCmdlet.AddAzureCacheWorkerRoleProcess(cacheRoleName, 1, rootPath); + enableCacheCmdlet.EnableAzureMemcacheRoleProcess(webRoleName, cacheRoleName, rootPath); + addCacheRoleCmdlet.AddAzureCacheWorkerRoleProcess(newCacheRoleName, 1, rootPath); + + Testing.AssertThrows(() => enableCacheCmdlet.EnableAzureMemcacheRoleProcess(webRoleName, cacheRoleName, rootPath)); + } + } + + /// + /// Verify that enabling cache using non-cache worker role will fail. + /// + [Fact] + public void EnableAzureMemcacheRoleProcessUsingNonCacheWorkerRole() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string serviceName = "AzureService"; + string rootPath = files.CreateNewService(serviceName); + string workerRoleName = "WorkerRole"; + string webRoleName = "WebRole"; + string expected = string.Format(Resources.NotCacheWorkerRole, workerRoleName); + + addNodeWebCmdlet = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = webRoleName }; + addNodeWebCmdlet.ExecuteCmdlet(); + addNodeWorkerCmdlet = new AddAzureNodeWorkerRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = workerRoleName }; + addNodeWorkerCmdlet.ExecuteCmdlet(); + + Testing.AssertThrows(() => enableCacheCmdlet.EnableAzureMemcacheRoleProcess(webRoleName, workerRoleName, rootPath)); + } + } + + [Fact] + public void EnableAzureMemcacheRoleProcessWithDefaultRoleName() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string originalDirectory = Directory.GetCurrentDirectory(); + string serviceName = "AzureService"; + string rootPath = files.CreateNewService(serviceName); + string webRoleName = "WebRole"; + string cacheRoleName = "WorkerRole"; + string expectedMessage = string.Format(Resources.EnableMemcacheMessage, webRoleName, cacheRoleName, Resources.MemcacheEndpointPort); + + addNodeWebCmdlet = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = webRoleName }; + addNodeWebCmdlet.ExecuteCmdlet(); + Directory.SetCurrentDirectory(Path.Combine(rootPath, webRoleName)); + addCacheRoleCmdlet.AddAzureCacheWorkerRoleProcess(cacheRoleName, 1, rootPath); + mockCommandRuntime.ResetPipelines(); + enableCacheCmdlet.PassThru = true; + enableCacheCmdlet.CacheRuntimeVersion = "2.5.0"; + enableCacheCmdlet.RoleName = string.Empty; + enableCacheCmdlet.CacheWorkerRoleName = cacheRoleName; + enableCacheCmdlet.ExecuteCmdlet(); + + AssertCachingEnabled(files, serviceName, rootPath, webRoleName, expectedMessage); + Directory.SetCurrentDirectory(originalDirectory); + } + } + + private void AssertCachingEnabled( + FileSystemHelper files, + string serviceName, + string rootPath, + string webRoleName, + string expectedMessage) + { + WebRole webRole = AzureAssert.GetWebRole(rootPath, webRoleName); + RoleSettings roleSettings = AzureAssert.GetCloudRole(rootPath, webRoleName); + + AzureAssert.RuntimeUrlAndIdExists(webRole.Startup.Task, Resources.CacheRuntimeValue); + + Assert.Equal(Resources.CacheRuntimeVersionKey, webRole.Startup.Task[0].Environment[0].name); + Assert.Equal(enableCacheCmdlet.CacheRuntimeVersion, webRole.Startup.Task[0].Environment[0].value); + + Assert.Equal(Resources.EmulatedKey, webRole.Startup.Task[2].Environment[0].name); + Assert.Equal("/RoleEnvironment/Deployment/@emulated", webRole.Startup.Task[2].Environment[0].RoleInstanceValue.xpath); + + Assert.Equal(Resources.CacheRuntimeUrl, webRole.Startup.Task[2].Environment[1].name); + Assert.Equal(TestResources.CacheRuntimeUrl, webRole.Startup.Task[2].Environment[1].value); + Assert.Equal(1, webRole.Startup.Task.Count(t => t.commandLine.Equals(Resources.CacheStartupCommand))); + + + AzureAssert.ScaffoldingExists(Path.Combine(files.RootPath, serviceName, webRoleName), Path.Combine(Resources.CacheScaffolding, Resources.WebRole)); + AzureAssert.StartupTaskExists(webRole.Startup.Task, Resources.CacheStartupCommand); + + AzureAssert.InternalEndpointExists(webRole.Endpoints.InternalEndpoint, + new InternalEndpoint { name = Resources.MemcacheEndpointName, protocol = InternalProtocol.tcp, port = Resources.MemcacheEndpointPort }); + + LocalStore localStore = new LocalStore + { + name = Resources.CacheDiagnosticStoreName, + cleanOnRoleRecycle = false + }; + + AzureAssert.LocalResourcesLocalStoreExists(localStore, webRole.LocalResources); + + DefinitionConfigurationSetting diagnosticLevel = new DefinitionConfigurationSetting { name = Resources.CacheClientDiagnosticLevelAssemblyName }; + AzureAssert.ConfigurationSettingExist(diagnosticLevel, webRole.ConfigurationSettings); + + ConfigConfigurationSetting clientDiagnosticLevel = new ConfigConfigurationSetting { name = Resources.ClientDiagnosticLevelName, value = Resources.ClientDiagnosticLevelValue }; + AzureAssert.ConfigurationSettingExist(clientDiagnosticLevel, roleSettings.ConfigurationSettings); + + AssertWebConfig(string.Format(@"{0}\{1}\{2}", rootPath, webRoleName, Resources.WebCloudConfig)); + AssertWebConfig(string.Format(@"{0}\{1}\{2}", rootPath, webRoleName, Resources.WebConfigTemplateFileName)); + + Assert.Equal(expectedMessage, mockCommandRuntime.VerboseStream[0]); + Assert.Equal(webRoleName, (mockCommandRuntime.OutputPipeline[0] as PSObject).GetVariableValue(Parameters.RoleName)); + } + + private static void AssertWebConfig(string webCloudConfigPath) + { + string webCloudCloudConfigContents = FileUtilities.DataStore.ReadFileAsText(webCloudConfigPath); + Assert.True(webCloudCloudConfigContents.Contains("configSections")); + Assert.True(webCloudCloudConfigContents.Contains("dataCacheClients")); + } + + /// + /// Verify that enabling cache with non-existing cache worker role will fail. + /// + [Fact] + public void EnableAzureMemcacheRoleProcessOnCacheWorkerRoleFail() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string serviceName = "AzureService"; + string rootPath = files.CreateNewService(serviceName); + string cacheRoleName = "WorkerRole"; + string expected = string.Format(Resources.InvalidCacheRoleName, cacheRoleName); + + addCacheRoleCmdlet.AddAzureCacheWorkerRoleProcess(cacheRoleName, 1, rootPath); + + Testing.AssertThrows(() => enableCacheCmdlet.EnableAzureMemcacheRoleProcess(cacheRoleName, cacheRoleName, rootPath)); + } + } + + [Fact] + public void EnableAzureMemcacheWithoutCacheWorkerRoleName() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string serviceName = "AzureService"; + string rootPath = files.CreateNewService(serviceName); + string cacheRoleName = "WorkerRole"; + string webRoleName = "WebRole"; + string expectedMessage = string.Format(Resources.EnableMemcacheMessage, webRoleName, cacheRoleName, Resources.MemcacheEndpointPort); + + addNodeWebCmdlet = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = webRoleName }; + addNodeWebCmdlet.ExecuteCmdlet(); + addCacheRoleCmdlet.AddAzureCacheWorkerRoleProcess(cacheRoleName, 1, rootPath); + mockCommandRuntime.ResetPipelines(); + enableCacheCmdlet.PassThru = true; + enableCacheCmdlet.CacheRuntimeVersion = "2.5.0"; + enableCacheCmdlet.EnableAzureMemcacheRoleProcess(webRoleName, null, rootPath); + + AssertCachingEnabled(files, serviceName, rootPath, webRoleName, expectedMessage); + } + } + + [Fact] + public void EnableAzureMemcacheWithoutCacheWorkerRoleNameAndServiceHasMultipleWorkerRoles() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string serviceName = "AzureService"; + string rootPath = files.CreateNewService(serviceName); + string cacheRoleName = "CacheWorkerRole"; + string webRoleName = "WebRole"; + string expectedMessage = string.Format(Resources.EnableMemcacheMessage, webRoleName, cacheRoleName, Resources.MemcacheEndpointPort); + + addNodeWebCmdlet = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = webRoleName }; + addNodeWebCmdlet.ExecuteCmdlet(); + addNodeWorkerCmdlet = new AddAzureNodeWorkerRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = "WorkerRole" }; + addNodeWorkerCmdlet.ExecuteCmdlet(); + addCacheRoleCmdlet.AddAzureCacheWorkerRoleProcess(cacheRoleName, 1, rootPath); + mockCommandRuntime.ResetPipelines(); + enableCacheCmdlet.PassThru = true; + enableCacheCmdlet.CacheRuntimeVersion = "2.5.0"; + enableCacheCmdlet.EnableAzureMemcacheRoleProcess(webRoleName, null, rootPath); + + AssertCachingEnabled(files, serviceName, rootPath, webRoleName, expectedMessage); + } + } + + [Fact] + public void EnableAzureMemcacheWithNoCacheWorkerRolesFail() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string serviceName = "AzureService"; + string rootPath = files.CreateNewService(serviceName); + string webRoleName = "WebRole"; + string expectedMessage = string.Format(Resources.NoCacheWorkerRoles); + + addNodeWebCmdlet = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = webRoleName }; + addNodeWebCmdlet.ExecuteCmdlet(); + addNodeWorkerCmdlet = new AddAzureNodeWorkerRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = "WorkerRole" }; + addNodeWorkerCmdlet.ExecuteCmdlet(); + mockCommandRuntime.ResetPipelines(); + enableCacheCmdlet.PassThru = true; + enableCacheCmdlet.CacheRuntimeVersion = "2.5.0"; + + Testing.AssertThrows(() => enableCacheCmdlet.EnableAzureMemcacheRoleProcess(webRoleName, null, rootPath), expectedMessage); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/EnableAzureRemoteDesktopCommandTest.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/EnableAzureRemoteDesktopCommandTest.cs new file mode 100644 index 000000000000..75fd05db5a10 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/EnableAzureRemoteDesktopCommandTest.cs @@ -0,0 +1,304 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Security; +using Microsoft.WindowsAzure.Commands.CloudService.Development; +using Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema; +using Microsoft.WindowsAzure.Commands.Common; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Development +{ + /// + /// Basic unit tests for the Enable-AzureServiceProjectRemoteDesktop enableRDCmdlet. + /// + public class EnableAzureRemoteDesktopCommandTest : TestBase + { + static private MockCommandRuntime mockCommandRuntime; + + static private EnableAzureServiceProjectRemoteDesktopCommand enableRDCmdlet; + + private AddAzureNodeWebRoleCommand addNodeWebCmdlet; + + private AddAzureNodeWorkerRoleCommand addNodeWorkerCmdlet; + + public EnableAzureRemoteDesktopCommandTest() + { + AzurePowerShell.ProfileDirectory = Test.Utilities.Common.Data.AzureSdkAppDir; + mockCommandRuntime = new MockCommandRuntime(); + + addNodeWebCmdlet = new AddAzureNodeWebRoleCommand(); + addNodeWorkerCmdlet = new AddAzureNodeWorkerRoleCommand(); + enableRDCmdlet = new EnableAzureServiceProjectRemoteDesktopCommand(); + + addNodeWorkerCmdlet.CommandRuntime = mockCommandRuntime; + addNodeWebCmdlet.CommandRuntime = mockCommandRuntime; + enableRDCmdlet.CommandRuntime = mockCommandRuntime; + } + + /// + /// Invoke the Enable-AzureServiceProjectRemoteDesktop enableRDCmdlet. + /// + /// Username. + /// Password. + public static void EnableRemoteDesktop(string username, string password) + { + SecureString securePassword = null; + if (password != null) + { + securePassword = new SecureString(); + foreach (char ch in password) + { + securePassword.AppendChar(ch); + } + securePassword.MakeReadOnly(); + } + + if (enableRDCmdlet == null) + { + enableRDCmdlet = new EnableAzureServiceProjectRemoteDesktopCommand(); + if (mockCommandRuntime == null) + { + mockCommandRuntime = new MockCommandRuntime(); + } + enableRDCmdlet.CommandRuntime = mockCommandRuntime; + } + + enableRDCmdlet.Username = username; + enableRDCmdlet.Password = securePassword; + enableRDCmdlet.EnableRemoteDesktop(); + } + + public static void VerifyWebRole(WebRole role, bool isForwarder) + { + Assert.Equal(isForwarder ? 1 : 0, role.Imports.Where(i => i.moduleName == "RemoteForwarder").Count()); + Assert.Equal(1, role.Imports.Where(i => i.moduleName == "RemoteAccess").Count()); + } + + public static void VerifyWorkerRole(WorkerRole role, bool isForwarder) + { + Assert.Equal(isForwarder ? 1 : 0, role.Imports.Where(i => i.moduleName == "RemoteForwarder").Count()); + Assert.Equal(1, role.Imports.Where(i => i.moduleName == "RemoteAccess").Count()); + } + + public static void VerifyRoleSettings(CloudServiceProject service) + { + IEnumerable settings = + Enumerable.Concat( + service.Components.CloudConfig.Role, + service.Components.LocalConfig.Role); + foreach (RoleSettings roleSettings in settings) + { + Assert.Equal( + 1, + roleSettings + .Certificates + .Where(c => c.name == "Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption") + .Count()); + } + } + + /// + /// Perform basic parameter validation. + /// + [Fact] + public void EnableRemoteDesktopBasicParameterValidation() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + files.CreateAzureSdkDirectoryAndImportPublishSettings(); + files.CreateNewService("NEW_SERVICE"); + + Testing.AssertThrows( + () => EnableRemoteDesktop(null, null)); + Testing.AssertThrows( + () => EnableRemoteDesktop(string.Empty, string.Empty)); + Testing.AssertThrows( + () => EnableRemoteDesktop("user", null)); + Testing.AssertThrows( + () => EnableRemoteDesktop("user", string.Empty)); + Testing.AssertThrows( + () => EnableRemoteDesktop("user", "short")); + Testing.AssertThrows( + () => EnableRemoteDesktop("user", "onlylower")); + Testing.AssertThrows( + () => EnableRemoteDesktop("user", "ONLYUPPER")); + Testing.AssertThrows( + () => EnableRemoteDesktop("user", "1234567890")); + } + } + + /// + /// Enable remote desktop for an empty service. + /// + [Fact] + public void EnableRemoteDesktopForEmptyService() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + files.CreateAzureSdkDirectoryAndImportPublishSettings(); + files.CreateNewService("NEW_SERVICE"); + Testing.AssertThrows(() => + EnableRemoteDesktop("user", "GoodPassword!")); + } + } + + /// + /// Enable remote desktop for a simple web role. + /// + [Fact] + public void EnableRemoteDesktopForWebRole() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + files.CreateAzureSdkDirectoryAndImportPublishSettings(); + string rootPath = files.CreateNewService("NEW_SERVICE"); + addNodeWebCmdlet = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = "WebRole", Instances = 1 }; + addNodeWebCmdlet.ExecuteCmdlet(); + EnableRemoteDesktop("user", "GoodPassword!"); + + // Verify the role has been setup with forwarding, access, + // and certs + CloudServiceProject service = new CloudServiceProject(rootPath, FileUtilities.GetContentFilePath("Services")); + VerifyWebRole(service.Components.Definition.WebRole[0], true); + VerifyRoleSettings(service); + } + } + + /// + /// Enable remote desktop for web and worker roles. + /// + [Fact] + public void EnableRemoteDesktopForWebAndWorkerRoles() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + files.CreateAzureSdkDirectoryAndImportPublishSettings(); + string rootPath = files.CreateNewService("NEW_SERVICE"); + addNodeWebCmdlet = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = "WebRole", Instances = 1 }; + addNodeWebCmdlet.ExecuteCmdlet(); + addNodeWorkerCmdlet = new AddAzureNodeWorkerRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = "WorkerRole", Instances = 1 }; + addNodeWorkerCmdlet.ExecuteCmdlet(); + mockCommandRuntime.ResetPipelines(); + EnableRemoteDesktop("user", "GoodPassword!"); + + // Verify the roles have been setup with forwarding, access, + // and certs + CloudServiceProject service = new CloudServiceProject(rootPath, FileUtilities.GetContentFilePath("Services")); + VerifyWebRole(service.Components.Definition.WebRole[0], false); + VerifyWorkerRole(service.Components.Definition.WorkerRole[0], true); + VerifyRoleSettings(service); + Assert.Equal(0, mockCommandRuntime.OutputPipeline.Count); + } + } + + /// + /// Enable remote desktop for multiple web and worker roles. + /// + [Fact] + public void EnableRemoteDesktopForMultipleWebAndWorkerRolesTwice() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + files.CreateAzureSdkDirectoryAndImportPublishSettings(); + string rootPath = files.CreateNewService("NEW_SERVICE"); + addNodeWebCmdlet = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = "WebRole_1", Instances = 1 }; + addNodeWebCmdlet.ExecuteCmdlet(); + addNodeWebCmdlet = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = "WebRole_2", Instances = 1 }; + addNodeWebCmdlet.ExecuteCmdlet(); + addNodeWorkerCmdlet = new AddAzureNodeWorkerRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = "WorkerRole_1", Instances = 1 }; + addNodeWorkerCmdlet.ExecuteCmdlet(); + addNodeWorkerCmdlet = new AddAzureNodeWorkerRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = "WorkerRole_2", Instances = 1 }; + addNodeWorkerCmdlet.ExecuteCmdlet(); + mockCommandRuntime.ResetPipelines(); + + enableRDCmdlet.PassThru = true; + EnableRemoteDesktop("user", "GoodPassword!"); + + enableRDCmdlet.PassThru = false; + EnableRemoteDesktop("other", "OtherPassword!"); + + // Verify the roles have been setup with forwarding, access, + // and certs + CloudServiceProject service = new CloudServiceProject(rootPath, FileUtilities.GetContentFilePath("Services")); + VerifyWebRole(service.Components.Definition.WebRole[0], false); + VerifyWebRole(service.Components.Definition.WebRole[0], false); + VerifyWorkerRole(service.Components.Definition.WorkerRole[0], true); + VerifyWorkerRole(service.Components.Definition.WorkerRole[1], false); + VerifyRoleSettings(service); + Assert.Equal(1, mockCommandRuntime.OutputPipeline.Count); + Assert.True((bool)mockCommandRuntime.OutputPipeline[0]); + } + } + + /// + /// Enable remote desktop for a simple web role. + /// + [Fact] + public void EnableRemoteDesktopUnicode() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + files.CreateAzureSdkDirectoryAndImportPublishSettings(); + string rootPath = files.CreateNewService("NEW_SERVICE"); + addNodeWebCmdlet = new AddAzureNodeWebRoleCommand() + { + RootPath = rootPath, + CommandRuntime = mockCommandRuntime, + Name = "WebRole", + Instances = 1 + }; + addNodeWebCmdlet.ExecuteCmdlet(); + EnableRemoteDesktop("㯑䲘䄂㮉", "㯑䲘䄂㮉㮉㮉㮉L"); + + // Verify the role has been setup with forwarding, access, + // and certs + CloudServiceProject service = new CloudServiceProject(rootPath, FileUtilities.GetContentFilePath("Services")); + VerifyWebRole(service.Components.Definition.WebRole[0], true); + VerifyRoleSettings(service); + } + } + + /// + /// Enable remote desktop using short unicode password. + /// + [Fact] + public void EnableRemoteDesktopUnicodeAndShortPasswordFails() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + files.CreateAzureSdkDirectoryAndImportPublishSettings(); + string rootPath = files.CreateNewService("NEW_SERVICE"); + addNodeWebCmdlet = new AddAzureNodeWebRoleCommand() + { + RootPath = rootPath, + CommandRuntime = mockCommandRuntime, + Name = "WebRole", + Instances = 1 + }; + addNodeWebCmdlet.ExecuteCmdlet(); + Testing.AssertThrows(() => EnableRemoteDesktop("㯑䲘䄂㮉", "㯑䲘")); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/GetAzureServiceProjectRuntimesTest.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/GetAzureServiceProjectRuntimesTest.cs new file mode 100644 index 000000000000..77851e542bce --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/GetAzureServiceProjectRuntimesTest.cs @@ -0,0 +1,62 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using Microsoft.WindowsAzure.Commands.CloudService.Development; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Development.Tests.Cmdlet +{ + public class GetAzureServiceProjectRuntimesTests : TestBase + { + private const string serviceName = "AzureService"; + + MockCommandRuntime mockCommandRuntime; + + private GetAzureServiceProjectRoleRuntimeCommand cmdlet; + + public GetAzureServiceProjectRuntimesTests() + { + cmdlet = new GetAzureServiceProjectRoleRuntimeCommand(); + mockCommandRuntime = new MockCommandRuntime(); + cmdlet.CommandRuntime = mockCommandRuntime; + } + + /// + /// Verify that the correct runtimes are returned in the correct format from a given runtime manifest + /// + [Fact] + public void TestGetRuntimes() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string manifest = RuntimePackageHelper.GetTestManifest(files); + CloudRuntimeCollection runtimes; + CloudRuntimeCollection.CreateCloudRuntimeCollection(out runtimes, manifest); + + cmdlet.GetAzureRuntimesProcess(string.Empty, manifest); + + List actual = mockCommandRuntime.OutputPipeline[0] as List; + + Assert.Equal(runtimes.Count, actual.Count); + Assert.True(runtimes.All(p => actual.Any(p2 => p2.PackageUri.Equals(p.PackageUri)))); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/SaveAzureServiceProjectPackageTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/SaveAzureServiceProjectPackageTests.cs new file mode 100644 index 000000000000..b5851fa57a2c --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/SaveAzureServiceProjectPackageTests.cs @@ -0,0 +1,154 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.CloudService.Development; +using Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Common; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Development +{ + /// + /// Basic unit tests for the Enable-AzureServiceProjectRemoteDesktop enableRDCmdlet. + /// + internal class SaveAzureServiceProjectPackageCommandTest : TestBase + { + static private MockCommandRuntime mockCommandRuntime; + + static private SaveAzureServiceProjectPackageCommand cmdlet; + + private AddAzureNodeWebRoleCommand addNodeWebCmdlet; + + private AddAzureNodeWorkerRoleCommand addNodeWorkerCmdlet; + + public SaveAzureServiceProjectPackageCommandTest() + { + AzurePowerShell.ProfileDirectory = Test.Utilities.Common.Data.AzureSdkAppDir; + mockCommandRuntime = new MockCommandRuntime(); + + addNodeWebCmdlet = new AddAzureNodeWebRoleCommand(); + addNodeWorkerCmdlet = new AddAzureNodeWorkerRoleCommand(); + cmdlet = new SaveAzureServiceProjectPackageCommand(); + + addNodeWorkerCmdlet.CommandRuntime = mockCommandRuntime; + addNodeWebCmdlet.CommandRuntime = mockCommandRuntime; + cmdlet.CommandRuntime = mockCommandRuntime; + } + + [Fact] + public void TestCreatePackageSuccessfull() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + files.CreateAzureSdkDirectoryAndImportPublishSettings(); + files.CreateNewService("NEW_SERVICE"); + string rootPath = Path.Combine(files.RootPath, "NEW_SERVICE"); + string packagePath = Path.Combine(rootPath, Resources.CloudPackageFileName); + + CloudServiceProject service = new CloudServiceProject(rootPath, FileUtilities.GetContentFilePath("Services")); + service.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); + + cmdlet.ExecuteCmdlet(); + + PSObject obj = mockCommandRuntime.OutputPipeline[0] as PSObject; + Assert.Equal(string.Format(Resources.PackageCreated, packagePath), mockCommandRuntime.VerboseStream[0]); + Assert.Equal(packagePath, obj.GetVariableValue(Parameters.PackagePath)); + Assert.True(File.Exists(packagePath)); + } + } + + [Fact] + public void TestCreatePackageWithEmptyServiceSuccessfull() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + files.CreateAzureSdkDirectoryAndImportPublishSettings(); + files.CreateNewService("NEW_SERVICE"); + string rootPath = Path.Combine(files.RootPath, "NEW_SERVICE"); + string packagePath = Path.Combine(rootPath, Resources.CloudPackageFileName); + + cmdlet.ExecuteCmdlet(); + + PSObject obj = mockCommandRuntime.OutputPipeline[0] as PSObject; + Assert.Equal(string.Format(Resources.PackageCreated, packagePath), mockCommandRuntime.VerboseStream[0]); + Assert.Equal(packagePath, obj.GetVariableValue(Parameters.PackagePath)); + Assert.True(File.Exists(packagePath)); + } + } + + [Fact] + public void TestCreatePackageWithMultipleRolesSuccessfull() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + files.CreateAzureSdkDirectoryAndImportPublishSettings(); + files.CreateNewService("NEW_SERVICE"); + string rootPath = Path.Combine(files.RootPath, "NEW_SERVICE"); + string packagePath = Path.Combine(rootPath, Resources.CloudPackageFileName); + + CloudServiceProject service = new CloudServiceProject(rootPath, FileUtilities.GetContentFilePath("Services")); + service.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); + service.AddWorkerRole(Test.Utilities.Common.Data.NodeWorkerRoleScaffoldingPath); + service.AddWorkerRole(Test.Utilities.Common.Data.NodeWorkerRoleScaffoldingPath); + service.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); + + cmdlet.ExecuteCmdlet(); + + PSObject obj = mockCommandRuntime.OutputPipeline[0] as PSObject; + Assert.Equal(string.Format(Resources.PackageCreated, packagePath), mockCommandRuntime.VerboseStream[0]); + Assert.Equal(packagePath, obj.GetVariableValue(Parameters.PackagePath)); + Assert.True(File.Exists(packagePath)); + } + } + + [Fact] + public void ThrowsErrorForInvalidCacheVersion() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + files.CreateAzureSdkDirectoryAndImportPublishSettings(); + files.CreateNewService("NEW_SERVICE"); + string rootPath = Path.Combine(files.RootPath, "NEW_SERVICE"); + string packagePath = Path.Combine(rootPath, Resources.CloudPackageFileName); + string cacheRoleName = "WorkerRole1"; + AddAzureCacheWorkerRoleCommand addCacheWorkerCmdlet = new AddAzureCacheWorkerRoleCommand() + { + CommandRuntime = mockCommandRuntime + }; + EnableAzureMemcacheRoleCommand enableCacheCmdlet = new EnableAzureMemcacheRoleCommand() + { + CacheRuntimeVersion = "1.8.0", + CommandRuntime = mockCommandRuntime + }; + + CloudServiceProject service = new CloudServiceProject(rootPath, FileUtilities.GetContentFilePath("Services")); + service.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); + addCacheWorkerCmdlet.AddAzureCacheWorkerRoleProcess(cacheRoleName, 1, rootPath); + enableCacheCmdlet.EnableAzureMemcacheRoleProcess("WebRole1", cacheRoleName, rootPath); + + Testing.AssertThrows( + () => cmdlet.ExecuteCmdlet(), + string.Format(Resources.CacheMismatchMessage, "WebRole1", "2.5.0")); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzureCacheWorkerRoleTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzureCacheWorkerRoleTests.cs new file mode 100644 index 000000000000..1ed81dfc23b6 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzureCacheWorkerRoleTests.cs @@ -0,0 +1,125 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Management.Automation; +using Xunit; +using Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService.AzureTools; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Development.Scaffolding +{ + using ConfigConfigurationSetting = Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema.ConfigurationSetting; + using Microsoft.WindowsAzure.Commands.Common; + + + public class AddAzureCacheWorkerRoleTests : TestBase + { + private MockCommandRuntime mockCommandRuntime; + + private NewAzureServiceProjectCommand newServiceCmdlet; + + private AddAzureCacheWorkerRoleCommand addCacheRoleCmdlet; + + public AddAzureCacheWorkerRoleTests() + { + AzureTool.IgnoreMissingSDKError = true; + AzurePowerShell.ProfileDirectory = Test.Utilities.Common.Data.AzureSdkAppDir; + mockCommandRuntime = new MockCommandRuntime(); + + newServiceCmdlet = new NewAzureServiceProjectCommand(); + addCacheRoleCmdlet = new AddAzureCacheWorkerRoleCommand(); + + newServiceCmdlet.CommandRuntime = mockCommandRuntime; + addCacheRoleCmdlet.CommandRuntime = mockCommandRuntime; + } + + [Fact] + public void AddNewCacheWorkerRoleSuccessful() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string rootPath = Path.Combine(files.RootPath, "AzureService"); + string roleName = "WorkerRole"; + int expectedInstanceCount = 10; + newServiceCmdlet.NewAzureServiceProcess(files.RootPath, "AzureService"); + WorkerRole cacheWorkerRole = addCacheRoleCmdlet.AddAzureCacheWorkerRoleProcess(roleName, expectedInstanceCount, rootPath); + + AzureAssert.ScaffoldingExists(Path.Combine(files.RootPath, "AzureService", "WorkerRole"), Path.Combine(Resources.GeneralScaffolding, Resources.WorkerRole)); + + AzureAssert.WorkerRoleImportsExists(new Import { moduleName = Resources.CachingModuleName }, cacheWorkerRole); + + AzureAssert.LocalResourcesLocalStoreExists(new LocalStore { name = Resources.CacheDiagnosticStoreName, cleanOnRoleRecycle = false }, + cacheWorkerRole.LocalResources); + + Assert.Null(cacheWorkerRole.Endpoints.InputEndpoint); + + AssertConfigExists(AzureAssert.GetCloudRole(rootPath, roleName)); + AssertConfigExists(AzureAssert.GetLocalRole(rootPath, roleName), Resources.EmulatorConnectionString); + + PSObject actualOutput = mockCommandRuntime.OutputPipeline[1] as PSObject; + Assert.Equal(roleName, actualOutput.Members[Parameters.CacheWorkerRoleName].Value.ToString()); + Assert.Equal(expectedInstanceCount, int.Parse(actualOutput.Members[Parameters.Instances].Value.ToString())); + } + } + + private static void AssertConfigExists(RoleSettings role, string connectionString = "") + { + AzureAssert.ConfigurationSettingExist(new ConfigConfigurationSetting { name = Resources.NamedCacheSettingName, value = Resources.NamedCacheSettingValue }, role.ConfigurationSettings); + AzureAssert.ConfigurationSettingExist(new ConfigConfigurationSetting { name = Resources.DiagnosticLevelName, value = Resources.DiagnosticLevelValue }, role.ConfigurationSettings); + AzureAssert.ConfigurationSettingExist(new ConfigConfigurationSetting { name = Resources.CachingCacheSizePercentageSettingName, value = string.Empty }, role.ConfigurationSettings); + AzureAssert.ConfigurationSettingExist(new ConfigConfigurationSetting { name = Resources.CachingConfigStoreConnectionStringSettingName, value = connectionString }, role.ConfigurationSettings); + } + + [Fact] + public void AddNewCacheWorkerRoleWithInvalidNamesFail() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string rootPath = Path.Combine(files.RootPath, "AzureService"); + newServiceCmdlet.NewAzureServiceProcess(files.RootPath, "AzureService"); + + foreach (string invalidName in Test.Utilities.Common.Data.InvalidRoleNames) + { + Testing.AssertThrows(() => addCacheRoleCmdlet.AddAzureCacheWorkerRoleProcess(invalidName, 1, rootPath)); + } + } + } + + [Fact] + public void AddNewCacheWorkerRoleDoesNotHaveAnyRuntime() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string rootPath = Path.Combine(files.RootPath, "AzureService"); + string roleName = "WorkerRole"; + int expectedInstanceCount = 10; + newServiceCmdlet.NewAzureServiceProcess(files.RootPath, "AzureService"); + + WorkerRole cacheWorkerRole = addCacheRoleCmdlet.AddAzureCacheWorkerRoleProcess(roleName, expectedInstanceCount, rootPath); + + Variable runtimeId = Array.Find(cacheWorkerRole.Startup.Task[0].Environment, v => v.name.Equals(Resources.RuntimeTypeKey)); + Assert.Equal(string.Empty, runtimeId.value); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzureNodeWebRoleTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzureNodeWebRoleTests.cs new file mode 100644 index 000000000000..c530cc098498 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzureNodeWebRoleTests.cs @@ -0,0 +1,83 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using System.Management.Automation; +using Xunit; +using Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Common; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Development.Scaffolding +{ + + public class AddAzureNodeWebRoleTests : TestBase + { + private MockCommandRuntime mockCommandRuntime; + + private AddAzureNodeWebRoleCommand addNodeWebCmdlet; + + public AddAzureNodeWebRoleTests() + { + AzurePowerShell.ProfileDirectory = Test.Utilities.Common.Data.AzureSdkAppDir; + mockCommandRuntime = new MockCommandRuntime(); + } + + [Fact] + public void AddAzureNodeWebRoleProcess() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string roleName = "WebRole1"; + string serviceName = "AzureService"; + string rootPath = files.CreateNewService(serviceName); + addNodeWebCmdlet = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime }; + string expectedVerboseMessage = string.Format(Resources.AddRoleMessageCreateNode, rootPath, roleName); + + addNodeWebCmdlet.ExecuteCmdlet(); + + AzureAssert.ScaffoldingExists(Path.Combine(rootPath, roleName), Path.Combine(Resources.NodeScaffolding, Resources.WebRole)); + Assert.Equal(roleName, ((PSObject)mockCommandRuntime.OutputPipeline[0]).GetVariableValue(Parameters.RoleName)); + Assert.Equal(expectedVerboseMessage, mockCommandRuntime.VerboseStream[0]); + } + } + + [Fact] + public void AddAzureNodeWebRoleWillRecreateDeploymentSettings() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string roleName = "WebRole1"; + string serviceName = "AzureService"; + string rootPath = files.CreateNewService(serviceName); + addNodeWebCmdlet = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime }; + string expectedVerboseMessage = string.Format(Resources.AddRoleMessageCreateNode, rootPath, roleName); + string settingsFilePath = Path.Combine(rootPath, Resources.SettingsFileName); + File.Delete(settingsFilePath); + Assert.False(File.Exists(settingsFilePath)); + + addNodeWebCmdlet.ExecuteCmdlet(); + + AzureAssert.ScaffoldingExists(Path.Combine(rootPath, roleName), Path.Combine(Resources.NodeScaffolding, Resources.WebRole)); + Assert.Equal(roleName, ((PSObject)mockCommandRuntime.OutputPipeline[0]).GetVariableValue(Parameters.RoleName)); + Assert.Equal(expectedVerboseMessage, mockCommandRuntime.VerboseStream[0]); + Assert.True(File.Exists(settingsFilePath)); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzureNodeWorkerRoleTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzureNodeWorkerRoleTests.cs new file mode 100644 index 000000000000..a76b2667e582 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzureNodeWorkerRoleTests.cs @@ -0,0 +1,83 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using System.Management.Automation; +using Xunit; +using Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Common; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Development.Scaffolding +{ + + public class AddAzureNodeWorkerRoleTests : TestBase + { + private MockCommandRuntime mockCommandRuntime; + + private AddAzureNodeWorkerRoleCommand addNodeWorkerCmdlet; + + public AddAzureNodeWorkerRoleTests() + { + AzurePowerShell.ProfileDirectory = Test.Utilities.Common.Data.AzureSdkAppDir; + mockCommandRuntime = new MockCommandRuntime(); + } + + [Fact] + public void AddAzureNodeWorkerRoleProcess() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string roleName = "WorkerRole1"; + string serviceName = "AzureService"; + string rootPath = files.CreateNewService(serviceName); + addNodeWorkerCmdlet = new AddAzureNodeWorkerRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime }; + string expectedVerboseMessage = string.Format(Resources.AddRoleMessageCreateNode, rootPath, roleName); + + addNodeWorkerCmdlet.ExecuteCmdlet(); + + AzureAssert.ScaffoldingExists(Path.Combine(rootPath, roleName), Path.Combine(Resources.NodeScaffolding, Resources.WorkerRole)); + Assert.Equal(roleName, ((PSObject)mockCommandRuntime.OutputPipeline[0]).GetVariableValue(Parameters.RoleName)); + Assert.Equal(expectedVerboseMessage, mockCommandRuntime.VerboseStream[0]); + } + } + + [Fact] + public void AddAzureNodeWorkerRoleWillRecreateDeploymentSettings() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string roleName = "WorkerRole1"; + string serviceName = "AzureService"; + string rootPath = files.CreateNewService(serviceName); + addNodeWorkerCmdlet = new AddAzureNodeWorkerRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime }; + string expectedVerboseMessage = string.Format(Resources.AddRoleMessageCreateNode, rootPath, roleName); + string settingsFilePath = Path.Combine(rootPath, Resources.SettingsFileName); + File.Delete(settingsFilePath); + Assert.False(File.Exists(settingsFilePath)); + + addNodeWorkerCmdlet.ExecuteCmdlet(); + + AzureAssert.ScaffoldingExists(Path.Combine(rootPath, roleName), Path.Combine(Resources.NodeScaffolding, Resources.WorkerRole)); + Assert.Equal(roleName, ((PSObject)mockCommandRuntime.OutputPipeline[0]).GetVariableValue(Parameters.RoleName)); + Assert.Equal(expectedVerboseMessage, mockCommandRuntime.VerboseStream[0]); + Assert.True(File.Exists(settingsFilePath)); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzurePHPWebRoleTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzurePHPWebRoleTests.cs new file mode 100644 index 000000000000..f6e7c7dc3f7c --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzurePHPWebRoleTests.cs @@ -0,0 +1,83 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using System.Management.Automation; +using Xunit; +using Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Common; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Development.Scaffolding +{ + + public class AddAzurePHPWebRoleTests : TestBase + { + private MockCommandRuntime mockCommandRuntime; + + private AddAzurePHPWebRoleCommand addPHPWebCmdlet; + + public AddAzurePHPWebRoleTests() + { + AzurePowerShell.ProfileDirectory = Test.Utilities.Common.Data.AzureSdkAppDir; + mockCommandRuntime = new MockCommandRuntime(); + } + + [Fact] + public void AddAzurePHPWebRoleProcess() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string roleName = "WebRole1"; + string serviceName = "AzureService"; + string rootPath = files.CreateNewService(serviceName); + addPHPWebCmdlet = new AddAzurePHPWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime }; + string expectedVerboseMessage = string.Format(Resources.AddRoleMessageCreatePHP, rootPath, roleName); + + addPHPWebCmdlet.ExecuteCmdlet(); + + AzureAssert.ScaffoldingExists(Path.Combine(rootPath, roleName), Path.Combine(Resources.PHPScaffolding, Resources.WebRole)); + Assert.Equal(roleName, ((PSObject)mockCommandRuntime.OutputPipeline[0]).GetVariableValue(Parameters.RoleName)); + Assert.Equal(expectedVerboseMessage, mockCommandRuntime.VerboseStream[0]); + } + } + + [Fact] + public void AddAzurePHPWebRoleWillRecreateDeploymentSettings() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string roleName = "WebRole1"; + string serviceName = "AzureService"; + string rootPath = files.CreateNewService(serviceName); + addPHPWebCmdlet = new AddAzurePHPWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime }; + string expectedVerboseMessage = string.Format(Resources.AddRoleMessageCreatePHP, rootPath, roleName); + string settingsFilePath = Path.Combine(rootPath, Resources.SettingsFileName); + File.Delete(settingsFilePath); + Assert.False(File.Exists(settingsFilePath)); + + addPHPWebCmdlet.ExecuteCmdlet(); + + AzureAssert.ScaffoldingExists(Path.Combine(rootPath, roleName), Path.Combine(Resources.PHPScaffolding, Resources.WebRole)); + Assert.Equal(roleName, ((PSObject)mockCommandRuntime.OutputPipeline[0]).GetVariableValue(Parameters.RoleName)); + Assert.Equal(expectedVerboseMessage, mockCommandRuntime.VerboseStream[0]); + Assert.True(File.Exists(settingsFilePath)); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzurePHPWorkerRoleTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzurePHPWorkerRoleTests.cs new file mode 100644 index 000000000000..06259a0e324b --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzurePHPWorkerRoleTests.cs @@ -0,0 +1,84 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using System.Management.Automation; +using Xunit; +using Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Common; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Development.Scaffolding +{ + + public class AddAzurePHPWorkerRoleTests : TestBase + { + private MockCommandRuntime mockCommandRuntime; + + private AddAzurePHPWorkerRoleCommand addPHPWorkerCmdlet; + + public AddAzurePHPWorkerRoleTests() + { + AzurePowerShell.ProfileDirectory = Test.Utilities.Common.Data.AzureSdkAppDir; + } + + [Fact] + public void AddAzurePHPWorkerRoleProcess() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string roleName = "WorkerRole1"; + string serviceName = "AzureService"; + string rootPath = files.CreateNewService(serviceName); + mockCommandRuntime = new MockCommandRuntime(); + addPHPWorkerCmdlet = new AddAzurePHPWorkerRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime }; + string expectedVerboseMessage = string.Format(Resources.AddRoleMessageCreatePHP, rootPath, roleName); + + addPHPWorkerCmdlet.ExecuteCmdlet(); + + AzureAssert.ScaffoldingExists(Path.Combine(rootPath, roleName), Path.Combine(Resources.PHPScaffolding, Resources.WorkerRole)); + Assert.Equal(roleName, ((PSObject)mockCommandRuntime.OutputPipeline[0]).GetVariableValue(Parameters.RoleName)); + Assert.Equal(expectedVerboseMessage, mockCommandRuntime.VerboseStream[0]); + } + } + + [Fact] + public void AddAzurePHPWorkerRoleWillRecreateDeploymentSettings() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string roleName = "WorkerRole1"; + string serviceName = "AzureService"; + string rootPath = files.CreateNewService(serviceName); + mockCommandRuntime = new MockCommandRuntime(); + addPHPWorkerCmdlet = new AddAzurePHPWorkerRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime }; + string expectedVerboseMessage = string.Format(Resources.AddRoleMessageCreatePHP, rootPath, roleName); + string settingsFilePath = Path.Combine(rootPath, Resources.SettingsFileName); + File.Delete(settingsFilePath); + Assert.False(File.Exists(settingsFilePath)); + + addPHPWorkerCmdlet.ExecuteCmdlet(); + + AzureAssert.ScaffoldingExists(Path.Combine(rootPath, roleName), Path.Combine(Resources.PHPScaffolding, Resources.WorkerRole)); + Assert.Equal(roleName, ((PSObject)mockCommandRuntime.OutputPipeline[0]).GetVariableValue(Parameters.RoleName)); + Assert.Equal(expectedVerboseMessage, mockCommandRuntime.VerboseStream[0]); + Assert.True(File.Exists(settingsFilePath)); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzurePythonWebRoleTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzurePythonWebRoleTests.cs new file mode 100644 index 000000000000..a5f62bd45a7c --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzurePythonWebRoleTests.cs @@ -0,0 +1,116 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Diagnostics; +using System.IO; +using System.Management.Automation; +using Xunit; +using Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Common; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Development.Scaffolding +{ + public class AddAzurePythonWebRoleTests : TestBase + { + private MockCommandRuntime mockCommandRuntime; + + private AddAzureDjangoWebRoleCommand addPythonWebCmdlet; + + public AddAzurePythonWebRoleTests() + { + AzurePowerShell.ProfileDirectory = Test.Utilities.Common.Data.AzureSdkAppDir; + mockCommandRuntime = new MockCommandRuntime(); + } + + [Fact] + public void AddAzurePythonWebRoleProcess() + { + var pyInstall = AddAzureDjangoWebRoleCommand.FindPythonInterpreterPath(); + if (pyInstall == null) + { + Assert.True(false, "Python is not installed on this machine and therefore the Python tests cannot be run"); + return; + } + + string stdOut, stdErr; + ProcessHelper.StartAndWaitForProcess( + new ProcessStartInfo( + Path.Combine(pyInstall, "python.exe"), + string.Format("-m django.bin.django-admin") + ), + out stdOut, + out stdErr + ); + + if (stdOut.IndexOf("django-admin.py") == -1) + { + Assert.True(false, "Django is not installed on this machine and therefore the Python tests cannot be run. Please 'pip install Django==1.5'"); + return; + } + + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string roleName = "WebRole1"; + string serviceName = "AzureService"; + string rootPath = files.CreateNewService(serviceName); + addPythonWebCmdlet = new AddAzureDjangoWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime }; + addPythonWebCmdlet.CommandRuntime = mockCommandRuntime; + string expectedVerboseMessage = string.Format(Resources.AddRoleMessageCreatePython, rootPath, roleName); + mockCommandRuntime.ResetPipelines(); + + addPythonWebCmdlet.ExecuteCmdlet(); + + AzureAssert.ScaffoldingExists(Path.Combine(rootPath, roleName), Path.Combine(Resources.PythonScaffolding, Resources.WebRole)); + Assert.Equal(roleName, ((PSObject)mockCommandRuntime.OutputPipeline[0]).GetVariableValue(Parameters.RoleName)); + Assert.Equal(expectedVerboseMessage, mockCommandRuntime.VerboseStream[0]); + Assert.True(Directory.Exists(Path.Combine(rootPath, roleName, roleName))); + Assert.True(File.Exists(Path.Combine(rootPath, roleName, roleName, "manage.py"))); + Assert.True(Directory.Exists(Path.Combine(rootPath, roleName, roleName, roleName))); + Assert.True(File.Exists(Path.Combine(rootPath, roleName, roleName, roleName, "__init__.py"))); + Assert.True(File.Exists(Path.Combine(rootPath, roleName, roleName, roleName, "settings.py"))); + Assert.True(File.Exists(Path.Combine(rootPath, roleName, roleName, roleName, "urls.py"))); + Assert.True(File.Exists(Path.Combine(rootPath, roleName, roleName, roleName, "wsgi.py"))); + } + } + + [Fact] + public void AddAzurePythonWebRoleWillRecreateDeploymentSettings() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string roleName = "WebRole1"; + string serviceName = "AzureService"; + string rootPath = files.CreateNewService(serviceName); + addPythonWebCmdlet = new AddAzureDjangoWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime }; + addPythonWebCmdlet.CommandRuntime = mockCommandRuntime; + string expectedVerboseMessage = string.Format(Resources.AddRoleMessageCreatePython, rootPath, roleName); + string settingsFilePath = Path.Combine(rootPath, Resources.SettingsFileName); + File.Delete(settingsFilePath); + Assert.False(File.Exists(settingsFilePath)); + + addPythonWebCmdlet.ExecuteCmdlet(); + + AzureAssert.ScaffoldingExists(Path.Combine(rootPath, roleName), Path.Combine(Resources.PythonScaffolding, Resources.WebRole)); + Assert.Equal(roleName, ((PSObject)mockCommandRuntime.OutputPipeline[0]).GetVariableValue(Parameters.RoleName)); + Assert.Equal(expectedVerboseMessage, mockCommandRuntime.VerboseStream[0]); + Assert.True(File.Exists(settingsFilePath)); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzureWebRoleTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzureWebRoleTests.cs new file mode 100644 index 000000000000..0c8e7c4d9e45 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzureWebRoleTests.cs @@ -0,0 +1,138 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using System.Management.Automation; +using Xunit; +using Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Common; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Development.Scaffolding +{ + + public class AddAzureWebRoleTests : TestBase + { + private MockCommandRuntime mockCommandRuntime; + + private AddAzureWebRoleCommand addWebCmdlet; + + public AddAzureWebRoleTests() + { + AzurePowerShell.ProfileDirectory = Test.Utilities.Common.Data.AzureSdkAppDir; + mockCommandRuntime = new MockCommandRuntime(); + } + + [Fact] + public void AddAzureWebRoleProcess() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string roleName = "WebRole1"; + string serviceName = "AzureService"; + string rootPath = files.CreateNewService(serviceName); + string expectedVerboseMessage = string.Format(Resources.AddRoleMessageCreate, rootPath, roleName); + string originalDirectory = Directory.GetCurrentDirectory(); + Directory.SetCurrentDirectory(rootPath); + addWebCmdlet = new AddAzureWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = roleName }; + + addWebCmdlet.ExecuteCmdlet(); + + AzureAssert.ScaffoldingExists(Path.Combine(files.RootPath, "AzureService", roleName), Path.Combine(Resources.GeneralScaffolding, Resources.WebRole)); + Assert.Equal(roleName, ((PSObject)mockCommandRuntime.OutputPipeline[0]).GetVariableValue(Parameters.RoleName)); + Assert.Equal(expectedVerboseMessage, mockCommandRuntime.VerboseStream[0]); + + Directory.SetCurrentDirectory(originalDirectory); + } + } + + [Fact] + public void AddAzureWebRoleWillRecreateDeploymentSettings() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string roleName = "WebRole1"; + string serviceName = "AzureService"; + string rootPath = files.CreateNewService(serviceName); + string expectedVerboseMessage = string.Format(Resources.AddRoleMessageCreate, rootPath, roleName); + string settingsFilePath = Path.Combine(rootPath, Resources.SettingsFileName); + string originalDirectory = Directory.GetCurrentDirectory(); + Directory.SetCurrentDirectory(rootPath); + File.Delete(settingsFilePath); + Assert.False(File.Exists(settingsFilePath)); + addWebCmdlet = new AddAzureWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = roleName }; + + addWebCmdlet.ExecuteCmdlet(); + + AzureAssert.ScaffoldingExists(Path.Combine(files.RootPath, "AzureService", roleName), Path.Combine(Resources.GeneralScaffolding, Resources.WebRole)); + Assert.Equal(roleName, ((PSObject)mockCommandRuntime.OutputPipeline[0]).GetVariableValue(Parameters.RoleName)); + Assert.Equal(expectedVerboseMessage, mockCommandRuntime.VerboseStream[0]); + Assert.True(File.Exists(settingsFilePath)); + + Directory.SetCurrentDirectory(originalDirectory); + } + } + + [Fact(Skip = "TODO: Fix SetScaffolding in CloudServiceProject.")] + public void AddAzureWebRoleWithTemplateFolder() + { + string scaffoldingPath = "MyWebTemplateFolder"; + Directory.CreateDirectory(Path.Combine(System.Environment.CurrentDirectory, scaffoldingPath)); + + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string roleName = "WebRole1"; + string serviceName = "AzureService"; + string rootPath = files.CreateNewService(serviceName); + string expectedVerboseMessage = string.Format(Resources.AddRoleMessageCreate, rootPath, roleName); + string originalDirectory = Directory.GetCurrentDirectory(); + Directory.SetCurrentDirectory(rootPath); + addWebCmdlet = new AddAzureWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = roleName, TemplateFolder = scaffoldingPath }; + + addWebCmdlet.ExecuteCmdlet(); + + AzureAssert.ScaffoldingExists(Path.Combine(rootPath, roleName), scaffoldingPath); + Assert.Equal(roleName, ((PSObject)mockCommandRuntime.OutputPipeline[0]).GetVariableValue(Parameters.RoleName)); + Assert.Equal(expectedVerboseMessage, mockCommandRuntime.VerboseStream[0]); + + Directory.SetCurrentDirectory(originalDirectory); + } + } + + [Fact] + public void AddAzureWebRoleWithMissingScaffoldXmlFail() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string roleName = "WebRole1"; + string serviceName = "AzureService"; + string scaffoldingPath = "TemplateMissingScaffoldXml"; + if (Directory.Exists(scaffoldingPath)) + { + Directory.Delete(scaffoldingPath, true); + } + string rootPath = files.CreateNewService(serviceName); + string expectedVerboseMessage = string.Format(Resources.AddRoleMessageCreate, rootPath, roleName); + string originalDirectory = Directory.GetCurrentDirectory(); + addWebCmdlet = new AddAzureWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = roleName, TemplateFolder = scaffoldingPath }; + + Assert.Throws(() => addWebCmdlet.ExecuteCmdlet()); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzureWorkerRoleTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzureWorkerRoleTests.cs new file mode 100644 index 000000000000..d4925b8efa2b --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzureWorkerRoleTests.cs @@ -0,0 +1,138 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using System.Management.Automation; +using Xunit; +using Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Common; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Development.Scaffolding +{ + + public class AddAzureWorkerRoleTests : TestBase + { + private MockCommandRuntime mockCommandRuntime; + + private AddAzureWorkerRoleCommand addWorkerCmdlet; + + public AddAzureWorkerRoleTests() + { + AzurePowerShell.ProfileDirectory = Test.Utilities.Common.Data.AzureSdkAppDir; + mockCommandRuntime = new MockCommandRuntime(); + } + + [Fact] + public void AddAzureWorkerRoleProcess() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string roleName = "WorkerRole1"; + string serviceName = "AzureService"; + string rootPath = files.CreateNewService(serviceName); + string expectedVerboseMessage = string.Format(Resources.AddRoleMessageCreate, rootPath, roleName); + string originalDirectory = Directory.GetCurrentDirectory(); + Directory.SetCurrentDirectory(rootPath); + addWorkerCmdlet = new AddAzureWorkerRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = roleName }; + + addWorkerCmdlet.ExecuteCmdlet(); + + AzureAssert.ScaffoldingExists(Path.Combine(rootPath, roleName), Path.Combine(Resources.GeneralScaffolding, Resources.WorkerRole)); + Assert.Equal(roleName, ((PSObject)mockCommandRuntime.OutputPipeline[0]).GetVariableValue(Parameters.RoleName)); + Assert.Equal(expectedVerboseMessage, mockCommandRuntime.VerboseStream[0]); + + Directory.SetCurrentDirectory(originalDirectory); + } + } + + [Fact] + public void AddAzureWorkerRoleWillRecreateDeploymentSettings() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string roleName = "WorkerRole1"; + string serviceName = "AzureService"; + string rootPath = files.CreateNewService(serviceName); + string expectedVerboseMessage = string.Format(Resources.AddRoleMessageCreate, rootPath, roleName); + string settingsFilePath = Path.Combine(rootPath, Resources.SettingsFileName); + string originalDirectory = Directory.GetCurrentDirectory(); + Directory.SetCurrentDirectory(rootPath); + File.Delete(settingsFilePath); + Assert.False(File.Exists(settingsFilePath)); + addWorkerCmdlet = new AddAzureWorkerRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = roleName }; + + addWorkerCmdlet.ExecuteCmdlet(); + + AzureAssert.ScaffoldingExists(Path.Combine(rootPath, roleName), Path.Combine(Resources.GeneralScaffolding, Resources.WorkerRole)); + Assert.Equal(roleName, ((PSObject)mockCommandRuntime.OutputPipeline[0]).GetVariableValue(Parameters.RoleName)); + Assert.Equal(expectedVerboseMessage, mockCommandRuntime.VerboseStream[0]); + Assert.True(File.Exists(settingsFilePath)); + + Directory.SetCurrentDirectory(originalDirectory); + } + } + + [Fact(Skip = "TODO: Fix SetScaffolding in CloudServiceProject.")] + public void AddAzureWorkerRoleWithTemplateFolder() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string roleName = "WorkerRole1"; + string serviceName = "AzureService"; + string rootPath = files.CreateNewService(serviceName); + string expectedVerboseMessage = string.Format(Resources.AddRoleMessageCreate, rootPath, roleName); + string scaffoldingPath = "MyWorkerTemplateFolder"; + using (new DirStack(rootPath)) + { + addWorkerCmdlet = new AddAzureWorkerRoleCommand() + { + RootPath = rootPath, + CommandRuntime = mockCommandRuntime, + Name = roleName, + TemplateFolder = scaffoldingPath + }; + + addWorkerCmdlet.ExecuteCmdlet(); + + AzureAssert.ScaffoldingExists(Path.Combine(rootPath, roleName), scaffoldingPath); + Assert.Equal(roleName, + ((PSObject) mockCommandRuntime.OutputPipeline[0]).GetVariableValue(Parameters.RoleName)); + Assert.Equal(expectedVerboseMessage, mockCommandRuntime.VerboseStream[0]); + } + } + } + + [Fact] + public void AddAzureWorkerRoleWithMissingScaffoldXmlFail() + { + string scaffoldingPath = "TemplateMissingScaffoldXml"; + Directory.CreateDirectory(Path.Combine(System.Environment.CurrentDirectory, scaffoldingPath)); + + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string roleName = "WorkerRole1"; + string serviceName = "AzureService"; + string rootPath = files.CreateNewService(serviceName); + addWorkerCmdlet = new AddAzureWorkerRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = roleName, TemplateFolder = scaffoldingPath }; + + Testing.AssertThrows(() => addWorkerCmdlet.ExecuteCmdlet()); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/NewAzureRoleTemplateTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/NewAzureRoleTemplateTests.cs new file mode 100644 index 000000000000..869f381b7f11 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/NewAzureRoleTemplateTests.cs @@ -0,0 +1,128 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using System.Management.Automation; +using System.Reflection; +using Xunit; +using Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Common; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Development.Scaffolding +{ + + public class NewAzureRoleTemplateTests : TestBase + { + private MockCommandRuntime mockCommandRuntime; + + private NewAzureRoleTemplateCommand addTemplateCmdlet; + + public NewAzureRoleTemplateTests() + { + AzurePowerShell.ProfileDirectory = Test.Utilities.Common.Data.AzureSdkAppDir; + mockCommandRuntime = new MockCommandRuntime(); + } + + [Fact] + public void NewAzureRoleTemplateWithWebRole() + { + string outputPath = Path.Combine(Directory.GetCurrentDirectory(), "WebRoleTemplate"); + addTemplateCmdlet = new NewAzureRoleTemplateCommand() { Web = true, CommandRuntime = mockCommandRuntime }; + + addTemplateCmdlet.ExecuteCmdlet(); + + Assert.Equal(outputPath, ((PSObject)mockCommandRuntime.OutputPipeline[0]).GetVariableValue(Parameters.Path)); + Testing.AssertDirectoryIdentical(Path.Combine(Resources.GeneralScaffolding, RoleType.WebRole.ToString()), outputPath); + } + + [Fact] + public void NewAzureRoleTemplateWithWorkerRole() + { + string outputPath = Path.Combine(Directory.GetCurrentDirectory(), "WorkerRoleTemplate"); + addTemplateCmdlet = new NewAzureRoleTemplateCommand() { Worker = true, CommandRuntime = mockCommandRuntime }; + + addTemplateCmdlet.ExecuteCmdlet(); + + Assert.Equal(outputPath, ((PSObject)mockCommandRuntime.OutputPipeline[0]).GetVariableValue(Parameters.Path)); + Testing.AssertDirectoryIdentical(Path.Combine(Resources.GeneralScaffolding, RoleType.WorkerRole.ToString()), outputPath); + } + + [Fact] + public void NewAzureRoleTemplateWithOutputPath() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string outputPath = files.RootPath; + addTemplateCmdlet = new NewAzureRoleTemplateCommand() { Worker = true, CommandRuntime = mockCommandRuntime, Output = outputPath }; + + addTemplateCmdlet.ExecuteCmdlet(); + + Assert.Equal(outputPath, ((PSObject)mockCommandRuntime.OutputPipeline[0]).GetVariableValue(Parameters.Path)); + Testing.AssertDirectoryIdentical(Path.Combine(Resources.GeneralScaffolding, RoleType.WorkerRole.ToString()), outputPath); + } + } + + [Fact] + public void NewAzureRoleTemplateWithDirectoryExists() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string outputPath = files.CreateDirectory("test"); + addTemplateCmdlet = new NewAzureRoleTemplateCommand() { Worker = true, CommandRuntime = mockCommandRuntime, Output = outputPath }; + + addTemplateCmdlet.ExecuteCmdlet(); + + Assert.Equal( + outputPath, + ((PSObject)mockCommandRuntime.OutputPipeline[0]).GetVariableValue(Parameters.Path)); + Testing.AssertDirectoryIdentical( + Path.Combine(Resources.GeneralScaffolding, + RoleType.WorkerRole.ToString()), + outputPath); + } + } + + [Fact(Skip = "TODO: Fix SetScaffolding in CloudServiceProject.")] + public void NewAzureRoleTemplateWithRunningOutsideDefaultDirectory() + { + string outputPath = Path.Combine(Directory.GetCurrentDirectory(), "TestDir", "WebRoleTemplate"); + addTemplateCmdlet = new NewAzureRoleTemplateCommand() { Web = true, CommandRuntime = mockCommandRuntime }; + string originalDir = Directory.GetCurrentDirectory(); + Directory.CreateDirectory("TestDir"); + Directory.SetCurrentDirectory("TestDir"); + + try + { + addTemplateCmdlet.ExecuteCmdlet(); + + Assert.Equal( + outputPath, + ((PSObject)mockCommandRuntime.OutputPipeline[0]).GetVariableValue(Parameters.Path)); + Testing.AssertDirectoryIdentical( + Path.Combine(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), + Resources.GeneralScaffolding, RoleType.WebRole.ToString())), + outputPath); + } + finally + { + Directory.SetCurrentDirectory(originalDir); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/NewAzureServiceTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/NewAzureServiceTests.cs new file mode 100644 index 000000000000..fa164c94a443 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/NewAzureServiceTests.cs @@ -0,0 +1,79 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Management.Automation; +using Xunit; +using Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Development.Scaffolding.Cmdlet +{ + + public class NewAzureServiceTests : TestBase + { + NewAzureServiceProjectCommand cmdlet; + + MockCommandRuntime mockCommandRuntime; + + public NewAzureServiceTests() + { + cmdlet = new NewAzureServiceProjectCommand(); + mockCommandRuntime = new MockCommandRuntime(); + cmdlet.CommandRuntime = mockCommandRuntime; + } + + [Fact] + public void NewAzureServiceSuccessfull() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + // Setup + string expectedName = "test"; + string expectedRootPath = Path.Combine(files.RootPath, expectedName); + string expectedServiceCreatedMessage = string.Format(Resources.NewServiceCreatedMessage, expectedRootPath); + cmdlet.ServiceName = expectedName; + + // Test + cmdlet.NewAzureServiceProcess(files.RootPath, expectedName); + + // Assert + PSObject actualPSObject = mockCommandRuntime.OutputPipeline[0] as PSObject; + string actualServiceCreatedMessage = mockCommandRuntime.VerboseStream[0]; + + Assert.Equal(expectedName, actualPSObject.Members[Parameters.ServiceName].Value.ToString()); + Assert.Equal(expectedRootPath, actualPSObject.Members[Parameters.RootPath].Value.ToString()); + Assert.Equal(expectedServiceCreatedMessage, actualServiceCreatedMessage); + AzureAssert.AzureServiceExists(expectedRootPath, Resources.GeneralScaffolding, expectedName); + } + } + + [Fact] + public void NewAzureServiceWithInvalidNames() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + foreach (string name in Test.Utilities.Common.Data.InvalidServiceNames) + { + cmdlet.ServiceName = name; + Testing.AssertThrows(() => cmdlet.ExecuteCmdlet()); + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/SetAzureInstancesTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/SetAzureInstancesTests.cs new file mode 100644 index 000000000000..8a9a2cd281dc --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/SetAzureInstancesTests.cs @@ -0,0 +1,278 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.CloudService.Development; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Development.Tests.Cmdlet +{ + public class SetAzureInstancesTests : TestBase + { + private const string serviceName = "AzureService"; + + private MockCommandRuntime mockCommandRuntime; + + private SetAzureServiceProjectRoleCommand cmdlet; + + public SetAzureInstancesTests() + { + mockCommandRuntime = new MockCommandRuntime(); + cmdlet = new SetAzureServiceProjectRoleCommand(); + cmdlet.CommandRuntime = mockCommandRuntime; + cmdlet.PassThru = true; + } + + [Fact] + public void SetAzureInstancesProcessTestsNode() + { + int newRoleInstances = 10; + + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + string roleName = "WebRole1"; + service.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); + cmdlet.PassThru = false; + RoleSettings roleSettings = cmdlet.SetAzureInstancesProcess("WebRole1", newRoleInstances, service.Paths.RootPath); + service = new CloudServiceProject(service.Paths.RootPath, null); + + Assert.Equal(newRoleInstances, service.Components.CloudConfig.Role[0].Instances.count); + Assert.Equal(newRoleInstances, service.Components.LocalConfig.Role[0].Instances.count); + Assert.Equal(0, mockCommandRuntime.OutputPipeline.Count); + Assert.Equal(newRoleInstances, roleSettings.Instances.count); + Assert.Equal(roleName, roleSettings.name); + + } + } + + [Fact] + public void SetAzureInstancesProcessTestsPHP() + { + int newRoleInstances = 10; + + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + string roleName = "WebRole1"; + service.AddWebRole(Test.Utilities.Common.Data.PHPWebRoleScaffoldingPath); + RoleSettings roleSettings = cmdlet.SetAzureInstancesProcess("WebRole1", newRoleInstances, service.Paths.RootPath); + service = new CloudServiceProject(service.Paths.RootPath, null); + + Assert.Equal(newRoleInstances, service.Components.CloudConfig.Role[0].Instances.count); + Assert.Equal(newRoleInstances, service.Components.LocalConfig.Role[0].Instances.count); + Assert.Equal(roleName, ((PSObject)mockCommandRuntime.OutputPipeline[0]).Members[Parameters.RoleName].Value.ToString()); + Assert.True(((PSObject)mockCommandRuntime.OutputPipeline[0]).TypeNames.Contains(typeof(RoleSettings).FullName)); + Assert.Equal(newRoleInstances, roleSettings.Instances.count); + Assert.Equal(roleName, roleSettings.name); + } + } + + [Fact] + public void SetAzureInstancesProcessTestsRoleNameDoesNotExistFail() + { + string roleName = "WebRole1"; + + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + Testing.AssertThrows(() => service.SetRoleInstances(service.Paths, roleName, 10), string.Format(Resources.RoleNotFoundMessage, roleName)); + } + } + + [Fact] + public void SetAzureInstancesProcessTestsNodeRoleNameDoesNotExistServiceContainsWebRoleFail() + { + string roleName = "WebRole1"; + string invalidRoleName = "foo"; + + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + service.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath, roleName, 1); + Testing.AssertThrows(() => service.SetRoleInstances(service.Paths, invalidRoleName, 10), string.Format(Resources.RoleNotFoundMessage, invalidRoleName)); + } + } + + [Fact] + public void SetAzureInstancesProcessTestsPHPRoleNameDoesNotExistServiceContainsWebRoleFail() + { + string roleName = "WebRole1"; + string invalidRoleName = "foo"; + + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + service.AddWebRole(Test.Utilities.Common.Data.PHPWebRoleScaffoldingPath, roleName, 1); + Testing.AssertThrows(() => service.SetRoleInstances(service.Paths, invalidRoleName, 10), string.Format(Resources.RoleNotFoundMessage, invalidRoleName)); + } + } + + [Fact] + public void SetAzureInstancesProcessTestsNodeRoleNameDoesNotExistServiceContainsWorkerRoleFail() + { + string roleName = "WorkerRole1"; + string invalidRoleName = "foo"; + + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + service.AddWorkerRole(Test.Utilities.Common.Data.NodeWorkerRoleScaffoldingPath, roleName, 1); + Testing.AssertThrows(() => service.SetRoleInstances(service.Paths, invalidRoleName, 10), string.Format(Resources.RoleNotFoundMessage, invalidRoleName)); + } + } + + [Fact] + public void SetAzureInstancesProcessTestsPHPRoleNameDoesNotExistServiceContainsWorkerRoleFail() + { + string roleName = "WorkerRole1"; + string invalidRoleName = "foo"; + + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + service.AddWorkerRole(Test.Utilities.Common.Data.PHPWorkerRoleScaffoldingPath, roleName, 1); + Testing.AssertThrows(() => service.SetRoleInstances(service.Paths, invalidRoleName, 10), string.Format(Resources.RoleNotFoundMessage, invalidRoleName)); + } + } + + [Fact] + public void SetAzureInstancesProcessTestsEmptyRoleNameFail() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + Testing.AssertThrows(() => service.SetRoleInstances(service.Paths, string.Empty, 10), string.Format(Resources.InvalidOrEmptyArgumentMessage, Resources.RoleName)); + } + } + + [Fact] + public void SetAzureInstancesProcessTestsNullRoleNameFail() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + Testing.AssertThrows(() => service.SetRoleInstances(service.Paths, null, 10), string.Format(Resources.InvalidOrEmptyArgumentMessage, Resources.RoleName)); + } + } + + [Fact] + public void SetAzureInstancesProcessTestsLargeRoleInstanceFail() + { + string roleName = "WebRole1"; + + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + Testing.AssertThrows(() => service.SetRoleInstances(service.Paths, roleName, 2000), string.Format(Resources.InvalidInstancesCount, roleName)); + } + } + + [Fact] + public void SetAzureInstancesProcessNegativeRoleInstanceFail() + { + string roleName = "WebRole1"; + + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + Testing.AssertThrows(() => service.SetRoleInstances(service.Paths, roleName, -1), string.Format(Resources.InvalidInstancesCount, roleName)); + } + } + + [Fact] + public void SetAzureInstancesProcessTestsCaseInsensitive() + { + int newRoleInstances = 10; + + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + string roleName = "WebRole1"; + service.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); + cmdlet.PassThru = false; + RoleSettings roleSettings = cmdlet.SetAzureInstancesProcess("WeBrolE1", newRoleInstances, service.Paths.RootPath); + service = new CloudServiceProject(service.Paths.RootPath, null); + + Assert.Equal(newRoleInstances, service.Components.CloudConfig.Role[0].Instances.count); + Assert.Equal(newRoleInstances, service.Components.LocalConfig.Role[0].Instances.count); + Assert.Equal(0, mockCommandRuntime.OutputPipeline.Count); + Assert.Equal(newRoleInstances, roleSettings.Instances.count); + Assert.Equal(roleName, roleSettings.name); + + } + } + + [Fact] + public void SetAzureServiceProjectRoleWithoutPassingRoleName() + { + string originalDirectory = Directory.GetCurrentDirectory(); + string serviceName = "AzureService1"; + if (Directory.Exists(serviceName)) + { + Directory.Delete(serviceName, true); + } + CloudServiceProject service = new CloudServiceProject(Directory.GetCurrentDirectory(), serviceName, null); + service.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); + Directory.SetCurrentDirectory(Path.Combine(service.Paths.RootPath, "WebRole1")); + cmdlet.RoleName = string.Empty; + cmdlet.ExecuteCmdlet(); + service = new CloudServiceProject(service.Paths.RootPath, null); + + Assert.Equal("WebRole1", cmdlet.RoleName); + Directory.SetCurrentDirectory(originalDirectory); + } + + [Fact] + public void SetAzureServiceProjectRoleInDeepDirectory() + { + string originalDirectory = Directory.GetCurrentDirectory(); + string serviceName = "AzureService2"; + if (Directory.Exists(serviceName)) + { + Directory.Delete(serviceName, true); + } + CloudServiceProject service = new CloudServiceProject(Directory.GetCurrentDirectory(), serviceName, null); + service.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); + Directory.SetCurrentDirectory(Path.Combine(service.Paths.RootPath, "WebRole1", "bin")); + cmdlet.RoleName = string.Empty; + cmdlet.ExecuteCmdlet(); + service = new CloudServiceProject(service.Paths.RootPath, null); + + Assert.Equal("WebRole1", cmdlet.RoleName); + Directory.SetCurrentDirectory(originalDirectory); + } + + [Fact] + public void SetAzureServiceProjectRoleInServiecRootDirectoryFail() + { + string serviceName = "AzureService3"; + if (Directory.Exists(serviceName)) + { + Directory.Delete(serviceName, true); + } + CloudServiceProject service = new CloudServiceProject(Directory.GetCurrentDirectory(), serviceName, null); + service.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); + cmdlet.RoleName = string.Empty; + Testing.AssertThrows(() => cmdlet.ExecuteCmdlet(), Resources.CannotFindServiceRoot); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/SetAzureRuntimeTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/SetAzureRuntimeTests.cs new file mode 100644 index 000000000000..ea4210a75a02 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/SetAzureRuntimeTests.cs @@ -0,0 +1,159 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.CloudService.Development; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Development.Tests.Cmdlet +{ + public class SetAzureRuntimeTests : TestBase + { + private MockCommandRuntime mockCommandRuntime; + + private SetAzureServiceProjectRoleCommand cmdlet; + + private const string serviceName = "AzureService"; + + public static void VerifyPackageJsonVersion(string rootPath, string roleName, string runtime, string version) + { + string packagePath = Path.Combine(rootPath, roleName); + string actualVersion; + Assert.True(JavaScriptPackageHelpers.TryGetEngineVersion(packagePath, runtime, out actualVersion)); + Assert.Equal(version, actualVersion); + } + + public static void VerifyInvalidPackageJsonVersion(string rootPath, string roleName, string runtime, string version) + { + string packagePath = Path.Combine(rootPath, roleName); + string actualVersion; + Assert.False(JavaScriptPackageHelpers.TryGetEngineVersion(packagePath, runtime, out actualVersion)); + } + + public SetAzureRuntimeTests() + { + mockCommandRuntime = new MockCommandRuntime(); + cmdlet = new SetAzureServiceProjectRoleCommand(); + cmdlet.CommandRuntime = mockCommandRuntime; + cmdlet.PassThru = true; + } + + /// + /// Verify that adding valid role runtimes results in valid changes in the commandlet scaffolding + /// (in this case, valid package.json changes). Test for both a valid node runtiem version and + /// valid iisnode runtiem version + /// + [Fact] + public void TestSetAzureRuntimeValidRuntimeVersions() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + service.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); + string roleName = "WebRole1"; + cmdlet.PassThru = false; + + RoleSettings roleSettings1 = cmdlet.SetAzureRuntimesProcess(roleName, "node", "0.8.2", service.Paths.RootPath, RuntimePackageHelper.GetTestManifest(files)); + RoleSettings roleSettings2 = cmdlet.SetAzureRuntimesProcess(roleName, "iisnode", "0.1.21", service.Paths.RootPath, RuntimePackageHelper.GetTestManifest(files)); + VerifyPackageJsonVersion(service.Paths.RootPath, roleName, "node", "0.8.2"); + VerifyPackageJsonVersion(service.Paths.RootPath, roleName, "iisnode", "0.1.21"); + Assert.Equal(0, mockCommandRuntime.OutputPipeline.Count); + Assert.Equal(roleName, roleSettings1.name); + Assert.Equal(roleName, roleSettings2.name); + } + } + + /// + /// Test that attempting to set an invlaid runtime version (one that is not listed in the runtime manifest) + /// results in no changes to package scaffolding (no changes in package.json) + /// + [Fact] + public void TestSetAzureRuntimeInvalidRuntimeVersion() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + service.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); + string roleName = "WebRole1"; + RoleSettings roleSettings1 = cmdlet.SetAzureRuntimesProcess(roleName, "node", "0.8.99", service.Paths.RootPath, RuntimePackageHelper.GetTestManifest(files)); + RoleSettings roleSettings2 = cmdlet.SetAzureRuntimesProcess(roleName, "iisnode", "0.9.99", service.Paths.RootPath, RuntimePackageHelper.GetTestManifest(files)); + VerifyInvalidPackageJsonVersion(service.Paths.RootPath, roleName, "node", "*"); + VerifyInvalidPackageJsonVersion(service.Paths.RootPath, roleName, "iisnode", "*"); + Assert.Equal(roleName, ((PSObject)mockCommandRuntime.OutputPipeline[0]).Members[Parameters.RoleName].Value.ToString()); + Assert.Equal(roleName, ((PSObject)mockCommandRuntime.OutputPipeline[1]).Members[Parameters.RoleName].Value.ToString()); + Assert.True(((PSObject)mockCommandRuntime.OutputPipeline[0]).TypeNames.Contains(typeof(RoleSettings).FullName)); + Assert.True(((PSObject)mockCommandRuntime.OutputPipeline[1]).TypeNames.Contains(typeof(RoleSettings).FullName)); + Assert.Equal(roleName, roleSettings1.name); + Assert.Equal(roleName, roleSettings2.name); + } + } + + /// + /// Test that attempting to add a runtime with an invlid runtime type (a runtime type that has no entries in the + /// master package.json). Results in no scaffolding changes - no changes to package.json. + /// + [Fact] + public void TestSetAzureRuntimeInvalidRuntimeType() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + string roleName = "WebRole1"; + service.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); + RoleSettings roleSettings1 = cmdlet.SetAzureRuntimesProcess(roleName, "noide", "0.8.99", service.Paths.RootPath, RuntimePackageHelper.GetTestManifest(files)); + RoleSettings roleSettings2 = cmdlet.SetAzureRuntimesProcess(roleName, "iisnoide", "0.9.99", service.Paths.RootPath, RuntimePackageHelper.GetTestManifest(files)); + VerifyInvalidPackageJsonVersion(service.Paths.RootPath, roleName, "node", "*"); + VerifyInvalidPackageJsonVersion(service.Paths.RootPath, roleName, "iisnode", "*"); + Assert.Equal(roleName, ((PSObject)mockCommandRuntime.OutputPipeline[0]).Members[Parameters.RoleName].Value.ToString()); + Assert.Equal(roleName, ((PSObject)mockCommandRuntime.OutputPipeline[1]).Members[Parameters.RoleName].Value.ToString()); + Assert.True(((PSObject)mockCommandRuntime.OutputPipeline[0]).TypeNames.Contains(typeof(RoleSettings).FullName)); + Assert.True(((PSObject)mockCommandRuntime.OutputPipeline[1]).TypeNames.Contains(typeof(RoleSettings).FullName)); + Assert.Equal(roleName, roleSettings1.name); + Assert.Equal(roleName, roleSettings2.name); + } + } + + /// + /// Verify that adding valid role runtimes results in valid changes in the commandlet scaffolding + /// (in this case, valid package.json changes). Test for both a valid node runtiem version and + /// valid iisnode runtiem version + /// + [Fact] + public void TestSetAzureRuntimeValidRuntimeVersionsCanInsensitive() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + service.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); + string roleName = "WebRole1"; + string caseInsensitiveName = "weBrolE1"; + cmdlet.PassThru = false; + + RoleSettings roleSettings1 = cmdlet.SetAzureRuntimesProcess(caseInsensitiveName, "node", "0.8.2", service.Paths.RootPath, RuntimePackageHelper.GetTestManifest(files)); + RoleSettings roleSettings2 = cmdlet.SetAzureRuntimesProcess(caseInsensitiveName, "iisnode", "0.1.21", service.Paths.RootPath, RuntimePackageHelper.GetTestManifest(files)); + VerifyPackageJsonVersion(service.Paths.RootPath, roleName, "node", "0.8.2"); + VerifyPackageJsonVersion(service.Paths.RootPath, roleName, "iisnode", "0.1.21"); + Assert.Equal(0, mockCommandRuntime.OutputPipeline.Count); + Assert.Equal(roleName, roleSettings1.name); + Assert.Equal(roleName, roleSettings2.name); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/SetAzureServiceProjectTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/SetAzureServiceProjectTests.cs new file mode 100644 index 000000000000..7e079c6f4003 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/SetAzureServiceProjectTests.cs @@ -0,0 +1,200 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure.Commands.CloudService.Development; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Common; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Development.Tests.Cmdlet +{ + public class SetAzureServiceProjectTests : TestBase + { + private MockCommandRuntime mockCommandRuntime; + + private SetAzureServiceProjectCommand setServiceProjectCmdlet; + + public SetAzureServiceProjectTests() + { + AzurePowerShell.ProfileDirectory = Test.Utilities.Common.Data.AzureSdkAppDir; + mockCommandRuntime = new MockCommandRuntime(); + + setServiceProjectCmdlet = new SetAzureServiceProjectCommand(); + setServiceProjectCmdlet.CommandRuntime = mockCommandRuntime; + setServiceProjectCmdlet.PassThru = true; + } + + [Fact] + public void SetAzureServiceProjectTestsLocationValid() + { + string[] locations = { "West US", "East US", "East Asia", "North Europe" }; + foreach (string item in locations) + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + // Create new empty settings file + // + PowerShellProjectPathInfo paths = new PowerShellProjectPathInfo(files.RootPath); + ServiceSettings settings = new ServiceSettings(); + mockCommandRuntime = new MockCommandRuntime(); + setServiceProjectCmdlet.CommandRuntime = mockCommandRuntime; + settings.Save(paths.Settings); + + settings = setServiceProjectCmdlet.SetAzureServiceProjectProcess(item, null, null, paths.Settings); + + // Assert location is changed + // + Assert.Equal(item, settings.Location); + ServiceSettings actualOutput = mockCommandRuntime.OutputPipeline[0] as ServiceSettings; + Assert.Equal(item, settings.Location); + } + } + } + + [Fact] + public void SetAzureServiceProjectTestsLocationEmptyFail() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + // Create new empty settings file + // + PowerShellProjectPathInfo paths = new PowerShellProjectPathInfo(files.RootPath); + ServiceSettings settings = new ServiceSettings(); + settings.Save(paths.Settings); + + Testing.AssertThrows(() => setServiceProjectCmdlet.SetAzureServiceProjectProcess(string.Empty, null, null, paths.Settings), string.Format(Resources.InvalidOrEmptyArgumentMessage, "Location")); + } + } + + [Fact] + public void SetAzureServiceProjectTestsUnknownLocation() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + // Create new empty settings file + // + PowerShellProjectPathInfo paths = new PowerShellProjectPathInfo(files.RootPath); + ServiceSettings settings = new ServiceSettings(); + settings.Save(paths.Settings); + string unknownLocation = "Unknown Location"; + + settings = setServiceProjectCmdlet.SetAzureServiceProjectProcess(unknownLocation, null, null, paths.Settings); + + // Assert location is changed + // + Assert.Equal(unknownLocation, settings.Location); + ServiceSettings actualOutput = mockCommandRuntime.OutputPipeline[0] as ServiceSettings; + Assert.Equal(unknownLocation, settings.Location); + } + } + + [Fact] + public void SetAzureServiceProjectTestsStorageTests() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + // Create new empty settings file + // + PowerShellProjectPathInfo paths = new PowerShellProjectPathInfo(files.RootPath); + ServiceSettings settings = new ServiceSettings(); + mockCommandRuntime = new MockCommandRuntime(); + setServiceProjectCmdlet.CommandRuntime = mockCommandRuntime; + settings.Save(paths.Settings); + + settings = setServiceProjectCmdlet.SetAzureServiceProjectProcess(null, null, "companystore", paths.Settings); + + // Assert storageAccountName is changed + // + Assert.Equal("companystore", settings.StorageServiceName); + ServiceSettings actualOutput = mockCommandRuntime.OutputPipeline[0] as ServiceSettings; + Assert.Equal("companystore", settings.StorageServiceName); + } + } + + [Fact] + public void SetAzureServiceProjectTestsStorageTestsEmptyFail() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + // Create new empty settings file + // + PowerShellProjectPathInfo paths = new PowerShellProjectPathInfo(files.RootPath); + ServiceSettings settings = new ServiceSettings(); + settings.Save(paths.Settings); + + Testing.AssertThrows(() => setServiceProjectCmdlet.SetAzureServiceProjectProcess(null, null, string.Empty, paths.Settings), string.Format(Resources.InvalidOrEmptyArgumentMessage, "StorageAccountName")); + } + } + + [Fact] + public void SetAzureServiceProjectTestsSlotTests() + { + string[] slots = { DeploymentSlotType.Production, DeploymentSlotType.Staging }; + foreach (string item in slots) + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + // Create new empty settings file + // + PowerShellProjectPathInfo paths = new PowerShellProjectPathInfo(files.RootPath); + ServiceSettings settings = new ServiceSettings(); + settings.Save(paths.Settings); + + setServiceProjectCmdlet.SetAzureServiceProjectProcess(null, item, null, paths.Settings); + + // Assert slot is changed + // + settings = ServiceSettings.Load(paths.Settings); + Assert.Equal(item, settings.Slot); + } + } + } + + [Fact] + public void SetAzureServiceProjectTestsSlotTestsEmptyFail() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + // Create new empty settings file + // + PowerShellProjectPathInfo paths = new PowerShellProjectPathInfo(files.RootPath); + ServiceSettings settings = new ServiceSettings(); + settings.Save(paths.Settings); + + Testing.AssertThrows(() => setServiceProjectCmdlet.SetAzureServiceProjectProcess(null, string.Empty, null, paths.Settings), string.Format(Resources.InvalidOrEmptyArgumentMessage, "Slot")); + } + } + + [Fact] + public void SetAzureServiceProjectTestsSlotTestsInvalidFail() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + // Create new empty settings file + // + PowerShellProjectPathInfo paths = new PowerShellProjectPathInfo(files.RootPath); + ServiceSettings settings = new ServiceSettings(); + settings.Save(paths.Settings); + + Testing.AssertThrows(() => setServiceProjectCmdlet.SetAzureServiceProjectProcess(null, "MyHome", null, paths.Settings), string.Format(Resources.InvalidServiceSettingElement, "Slot")); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/SetAzureVMSizeTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/SetAzureVMSizeTests.cs new file mode 100644 index 000000000000..d4910dd19410 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/SetAzureVMSizeTests.cs @@ -0,0 +1,216 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.CloudService.Development; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Development.Tests.Cmdlet +{ + public class SetAzureVMSizeTests : TestBase + { + private const string serviceName = "AzureService"; + + private MockCommandRuntime mockCommandRuntime; + + private SetAzureServiceProjectRoleCommand cmdlet; + + public SetAzureVMSizeTests() + { + mockCommandRuntime = new MockCommandRuntime(); + cmdlet = new SetAzureServiceProjectRoleCommand(); + cmdlet.CommandRuntime = mockCommandRuntime; + cmdlet.PassThru = true; + } + + [Fact] + public void SetAzureVMSizeProcessTestsNode() + { + string newRoleVMSize = "Large"; + + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + string roleName = "WebRole1"; + service.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); + cmdlet.PassThru = false; + RoleSettings roleSettings = cmdlet.SetAzureVMSizeProcess("WebRole1", newRoleVMSize, service.Paths.RootPath); + service = new CloudServiceProject(service.Paths.RootPath, null); + + Assert.Equal(newRoleVMSize, service.Components.Definition.WebRole[0].vmsize.ToString()); + Assert.Equal(0, mockCommandRuntime.OutputPipeline.Count); + Assert.Equal(roleName, roleSettings.name); + } + } + + [Fact] + public void SetAzureVMSizeProcessTestsPHP() + { + string newRoleVMSize = "Medium"; + + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + string roleName = "WebRole1"; + service.AddWebRole(Test.Utilities.Common.Data.PHPWebRoleScaffoldingPath); + RoleSettings roleSettings = cmdlet.SetAzureVMSizeProcess("WebRole1", newRoleVMSize, service.Paths.RootPath); + service = new CloudServiceProject(service.Paths.RootPath, null); + + + Assert.Equal(newRoleVMSize, service.Components.Definition.WebRole[0].vmsize.ToString()); + Assert.Equal(roleName, ((PSObject)mockCommandRuntime.OutputPipeline[0]).Members[Parameters.RoleName].Value.ToString()); + Assert.True(((PSObject)mockCommandRuntime.OutputPipeline[0]).TypeNames.Contains(typeof(RoleSettings).FullName)); + Assert.Equal(roleName, roleSettings.name); + } + } + + [Fact] + public void SetAzureVMSizeProcessTestsRoleNameDoesNotExistFail() + { + string roleName = "WebRole1"; + + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + Testing.AssertThrows(() => service.SetRoleVMSize(service.Paths, roleName, "Medium"), string.Format(Resources.RoleNotFoundMessage, roleName)); + } + } + + [Fact] + public void SetAzureVMSizeProcessTestsNodeRoleNameDoesNotExistServiceContainsWebRoleFail() + { + string roleName = "WebRole1"; + string invalidRoleName = "foo"; + + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + service.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath, roleName, 1); + Testing.AssertThrows(() => service.SetRoleVMSize(service.Paths, invalidRoleName, "Large"), string.Format(Resources.RoleNotFoundMessage, invalidRoleName)); + } + } + + [Fact] + public void SetAzureVMSizeProcessTestsPHPRoleNameDoesNotExistServiceContainsWebRoleFail() + { + string roleName = "WebRole1"; + string invalidRoleName = "foo"; + + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + service.AddWebRole(Test.Utilities.Common.Data.PHPWebRoleScaffoldingPath, roleName, 1); + Testing.AssertThrows(() => service.SetRoleVMSize(service.Paths, invalidRoleName, "Large"), string.Format(Resources.RoleNotFoundMessage, invalidRoleName)); + } + } + + [Fact] + public void SetAzureVMSizeProcessTestsNodeRoleNameDoesNotExistServiceContainsWorkerRoleFail() + { + string roleName = "WorkerRole1"; + string invalidRoleName = "foo"; + + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + service.AddWorkerRole(Test.Utilities.Common.Data.NodeWorkerRoleScaffoldingPath, roleName, 1); + Testing.AssertThrows(() => service.SetRoleVMSize(service.Paths, invalidRoleName, "Large"), string.Format(Resources.RoleNotFoundMessage, invalidRoleName)); + } + } + + [Fact] + public void SetAzureVMSizeProcessTestsPHPRoleNameDoesNotExistServiceContainsWorkerRoleFail() + { + string roleName = "WorkerRole1"; + string invalidRoleName = "foo"; + + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + service.AddWorkerRole(Test.Utilities.Common.Data.PHPWorkerRoleScaffoldingPath, roleName, 1); + Testing.AssertThrows(() => service.SetRoleVMSize(service.Paths, invalidRoleName, "Large"), string.Format(Resources.RoleNotFoundMessage, invalidRoleName)); + } + } + + [Fact] + public void SetAzureVMSizeProcessTestsEmptyRoleNameFail() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + Testing.AssertThrows(() => service.SetRoleVMSize(service.Paths, string.Empty, "Large"), string.Format(Resources.InvalidOrEmptyArgumentMessage, Resources.RoleName)); + } + } + + [Fact] + public void SetAzureVMSizeProcessTestsNullRoleNameFail() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + Testing.AssertThrows(() => service.SetRoleVMSize(service.Paths, null, "Large"), string.Format(Resources.InvalidOrEmptyArgumentMessage, Resources.RoleName)); + } + } + + [Fact] + public void SetAzureVMSizeProcessTestsCaseInsensitive() + { + string newRoleVMSize = "Large" /*RoleSize.Large.ToString()*/; + + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + string roleName = "WebRole1"; + service.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); + cmdlet.PassThru = false; + RoleSettings roleSettings = cmdlet.SetAzureVMSizeProcess("WeBrolE1", newRoleVMSize, service.Paths.RootPath); + service = new CloudServiceProject(service.Paths.RootPath, null); + + + Assert.Equal(newRoleVMSize, service.Components.Definition.WebRole[0].vmsize.ToString()); + Assert.Equal(0, mockCommandRuntime.OutputPipeline.Count); + Assert.Equal(roleName, roleSettings.name); + + } + } + + [Fact] + public void SetAzureVMSizeProcessTestsCaseInsensitiveVMSizeSize() + { + string newRoleVMSize = "ExTraLaRge"; + + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + string roleName = "WebRole1"; + service.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); + cmdlet.PassThru = false; + RoleSettings roleSettings = cmdlet.SetAzureVMSizeProcess("WebRole1", newRoleVMSize, service.Paths.RootPath); + service = new CloudServiceProject(service.Paths.RootPath, null); + + + Assert.Equal(newRoleVMSize.ToLower(), service.Components.Definition.WebRole[0].vmsize.ToString().ToLower()); + Assert.Equal(0, mockCommandRuntime.OutputPipeline.Count); + Assert.Equal(roleName, roleSettings.name); + + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/PublishAzureServiceProjectTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/PublishAzureServiceProjectTests.cs new file mode 100644 index 000000000000..1dcabe66a60f --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/PublishAzureServiceProjectTests.cs @@ -0,0 +1,64 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.CloudService; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService.Model; +using Moq; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService +{ + public class PublishAzureServiceTests : TestBase + { + private Mock clientMock; + + private Mock commandRuntimeMock; + + private PublishAzureServiceProjectCommand publishAzureServiceCmdlet; + + private string serviceName = "cloudService"; + + public PublishAzureServiceTests() + { + clientMock = new Mock(); + clientMock.Setup(f => f.PublishCloudService(serviceName, null, null, null, null, null, false, false)) + .Returns(new Deployment()); + + commandRuntimeMock = new Mock(); + + publishAzureServiceCmdlet = new PublishAzureServiceProjectCommand() + { + CloudServiceClient = clientMock.Object, + CommandRuntime = commandRuntimeMock.Object + }; + } + + [Fact] + public void TestPublishAzureService() + { + // Setup + publishAzureServiceCmdlet.ServiceName = serviceName; + + // Test + publishAzureServiceCmdlet.ExecuteCmdlet(); + + // Assert + clientMock.Verify(f => f.PublishCloudService(serviceName, null, null, null, null, null, false, false), Times.Once()); + commandRuntimeMock.Verify(f => f.WriteObject(It.IsAny()), Times.Once()); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/RemoveAzureServiceTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/RemoveAzureServiceTests.cs new file mode 100644 index 000000000000..9a52d5ffd15f --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/RemoveAzureServiceTests.cs @@ -0,0 +1,81 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.CloudService; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Moq; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService +{ + public class RemoveAzureServiceTests : TestBase + { + private Mock clientMock; + + private Mock commandRuntimeMock; + + private RemoveAzureServiceCommand removeAzureServiceCmdlet; + + private string serviceName = "cloudService"; + + public RemoveAzureServiceTests() + { + clientMock = new Mock(); + clientMock.Setup(f => f.RemoveCloudService(serviceName, false)); + + commandRuntimeMock = new Mock(); + commandRuntimeMock.Setup(f => f.WriteObject(true)); + commandRuntimeMock.Setup(f => f.ShouldProcess(It.IsAny(), It.IsAny())).Returns(true); + + removeAzureServiceCmdlet = new RemoveAzureServiceCommand() + { + CloudServiceClient = clientMock.Object, + CommandRuntime = commandRuntimeMock.Object + }; + } + + [Fact] + public void TestRemoveAzureService() + { + // Setup + removeAzureServiceCmdlet.PassThru = true; + removeAzureServiceCmdlet.Force = true; + removeAzureServiceCmdlet.ServiceName = serviceName; + + // Test + removeAzureServiceCmdlet.ExecuteCmdlet(); + + // Assert + clientMock.Verify(f => f.RemoveCloudService(serviceName, false), Times.Once()); + commandRuntimeMock.Verify(f => f.WriteObject(true), Times.Once()); + } + + [Fact] + public void TestRemoveAzureServiceNoForce() + { + // Setup + removeAzureServiceCmdlet.PassThru = true; + removeAzureServiceCmdlet.ServiceName = serviceName; + + // Test + removeAzureServiceCmdlet.ExecuteCmdlet(); + + // Assert + clientMock.Verify(f => f.RemoveCloudService(serviceName, false), Times.Never()); + commandRuntimeMock.Verify(f => f.WriteObject(true), Times.Never()); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/StartAzureServiceTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/StartAzureServiceTests.cs new file mode 100644 index 000000000000..2a657dfbbc47 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/StartAzureServiceTests.cs @@ -0,0 +1,69 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.CloudService; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Moq; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService +{ + public class StartAzureServiceTests : TestBase + { + private const string serviceName = "AzureService"; + + string slot = DeploymentSlotType.Production; + + private MockCommandRuntime mockCommandRuntime; + + private StartAzureServiceCommand stopServiceCmdlet; + + private Mock cloudServiceClientMock; + + public StartAzureServiceTests() + { + AzurePowerShell.ProfileDirectory = Test.Utilities.Common.Data.AzureSdkAppDir; + mockCommandRuntime = new MockCommandRuntime(); + cloudServiceClientMock = new Mock(); + + stopServiceCmdlet = new StartAzureServiceCommand() + { + CloudServiceClient = cloudServiceClientMock.Object, + CommandRuntime = mockCommandRuntime + }; + } + + [Fact] + public void TestStartAzureService() + { + stopServiceCmdlet.ServiceName = serviceName; + stopServiceCmdlet.Slot = slot; + cloudServiceClientMock.Setup(f => f.StartCloudService(serviceName, slot)); + + using (FileSystemHelper files = new FileSystemHelper(this)) + { + files.CreateAzureSdkDirectoryAndImportPublishSettings(); + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + stopServiceCmdlet.ExecuteCmdlet(); + + Assert.Equal(0, mockCommandRuntime.OutputPipeline.Count); + cloudServiceClientMock.Verify(f => f.StartCloudService(serviceName, slot), Times.Once()); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/StopAzureServiceTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/StopAzureServiceTests.cs new file mode 100644 index 000000000000..234668de01a2 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/StopAzureServiceTests.cs @@ -0,0 +1,69 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.CloudService; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Moq; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService +{ + public class StopAzureServiceTests : TestBase + { + private const string serviceName = "AzureService"; + + string slot = DeploymentSlotType.Production; + + private MockCommandRuntime mockCommandRuntime; + + private StopAzureServiceCommand stopServiceCmdlet; + + private Mock cloudServiceClientMock; + + public StopAzureServiceTests() + { + AzurePowerShell.ProfileDirectory = Test.Utilities.Common.Data.AzureSdkAppDir; + mockCommandRuntime = new MockCommandRuntime(); + cloudServiceClientMock = new Mock(); + + stopServiceCmdlet = new StopAzureServiceCommand() + { + CloudServiceClient = cloudServiceClientMock.Object, + CommandRuntime = mockCommandRuntime + }; + } + + [Fact] + public void TestStopAzureService() + { + stopServiceCmdlet.ServiceName = serviceName; + stopServiceCmdlet.Slot = slot; + cloudServiceClientMock.Setup(f => f.StopCloudService(serviceName, slot)); + + using (FileSystemHelper files = new FileSystemHelper(this)) + { + files.CreateAzureSdkDirectoryAndImportPublishSettings(); + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + stopServiceCmdlet.ExecuteCmdlet(); + + Assert.Equal(0, mockCommandRuntime.OutputPipeline.Count); + cloudServiceClientMock.Verify(f => f.StopCloudService(serviceName, slot), Times.Once()); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/TestAzureNameTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/TestAzureNameTests.cs new file mode 100644 index 000000000000..20dba2e14905 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/TestAzureNameTests.cs @@ -0,0 +1,149 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Xunit; +using Microsoft.WindowsAzure.Commands.CloudService; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.ServiceBus; +using Microsoft.WindowsAzure.Commands.Utilities.Websites; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService +{ + public class TestAzureNameTests : TestBase + { + private Mock cloudServiceClientMock; + private Mock websitesClientMock; + MockCommandRuntime commandRuntimeMock; + TestAzureNameCommand cmdlet; + Mock serviceBusClientMock; + string subscriptionId = "my subscription Id"; + + public TestAzureNameTests() + { + cloudServiceClientMock = new Mock(); + commandRuntimeMock = new MockCommandRuntime(); + serviceBusClientMock = new Mock(); + websitesClientMock = new Mock(); + + cmdlet = new TestAzureNameCommand() + { + CommandRuntime = commandRuntimeMock, + ServiceBusClient = serviceBusClientMock.Object, + CloudServiceClient = cloudServiceClientMock.Object, + WebsitesClient = websitesClientMock.Object + }; + } + + [Fact] + public void TestAzureServiceNameUsed() + { + string name = "test"; + cloudServiceClientMock.Setup(f => f.CheckHostedServiceNameAvailability(name)).Returns(false); + + cmdlet.IsDNSAvailable(null, name); + + bool actual = (bool)commandRuntimeMock.OutputPipeline[0]; + Assert.True(actual); + } + + [Fact] + public void TestAzureServiceNameIsNotUsed() + { + string name = "test"; + cloudServiceClientMock.Setup(f => f.CheckHostedServiceNameAvailability(name)).Returns(true); + + cmdlet.IsDNSAvailable(null, name); + + bool actual = (bool)commandRuntimeMock.OutputPipeline[0]; + Assert.False(actual); + } + + [Fact] + public void TestAzureStorageNameUsed() + { + string name = "test"; + cloudServiceClientMock.Setup(f => f.CheckStorageServiceAvailability(name)).Returns(false); + + cmdlet.IsStorageServiceAvailable(null, name); + + bool actual = (bool)commandRuntimeMock.OutputPipeline[0]; + Assert.True(actual); + } + + [Fact] + public void TestAzureStorageNameIsNotUsed() + { + string name = "test"; + cloudServiceClientMock.Setup(f => f.CheckStorageServiceAvailability(name)).Returns(true); + + cmdlet.IsStorageServiceAvailable(null, name); + + bool actual = (bool)commandRuntimeMock.OutputPipeline[0]; + Assert.False(actual); + } + + [Fact] + public void TestAzureServiceBusNamespaceUsed() + { + string name = "test"; + serviceBusClientMock.Setup(f => f.IsAvailableNamespace(name)).Returns(false); + + cmdlet.IsServiceBusNamespaceAvailable(subscriptionId, name); + + bool actual = (bool)commandRuntimeMock.OutputPipeline[0]; + + Assert.True(actual); + } + + [Fact] + public void TestAzureServiceBusNamespaceIsNotUsed() + { + string name = "test"; + serviceBusClientMock.Setup(f => f.IsAvailableNamespace(name)).Returns(true); + + cmdlet.IsServiceBusNamespaceAvailable(subscriptionId, name); + + bool actual = (bool)commandRuntimeMock.OutputPipeline[0]; + + Assert.False(actual); + } + + [Fact] + public void TestAzureWebsiteNameUsed() + { + string name = "test"; + websitesClientMock.Setup(f => f.CheckWebsiteNameAvailability(name)).Returns(false); + + cmdlet.IsWebsiteAvailable(name); + + bool actual = (bool)commandRuntimeMock.OutputPipeline[0]; + Assert.True(actual); + } + + [Fact] + public void TestAzureWebsiteNameIsNotUsed() + { + string name = "test"; + websitesClientMock.Setup(f => f.CheckWebsiteNameAvailability(name)).Returns(true); + + cmdlet.IsWebsiteAvailable(name); + + bool actual = (bool)commandRuntimeMock.OutputPipeline[0]; + Assert.False(actual); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/AzureServiceTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/AzureServiceTests.cs new file mode 100644 index 000000000000..34fd2df6c4f7 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/AzureServiceTests.cs @@ -0,0 +1,595 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Linq; +using Xunit; +using Microsoft.WindowsAzure.Commands.CloudService.Development; +using Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService.AzureTools; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Common; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Utilities +{ + public class AzureServiceTests: TestBase + { + private const string serviceName = "AzureService"; + + private MockCommandRuntime mockCommandRuntime; + + private AddAzureNodeWebRoleCommand addNodeWebCmdlet; + + private AddAzureNodeWorkerRoleCommand addNodeWorkerCmdlet; + + private AddAzureCacheWorkerRoleCommand addCacheRoleCmdlet; + + private EnableAzureMemcacheRoleCommand enableCacheCmdlet; + + /// + /// This method handles most possible cases that user can do to create role + /// + /// Count of web roles to add + /// Count of worker role to add + /// Decides in what order to add roles. There are three options, note that value between brackets is the value to pass: + /// 1. Web then, interleaving (0): interleave adding and start by adding web role first. + /// 2. Worker then, interleaving (1): interleave adding and start by adding worker role first. + /// 3. Web then worker (2): add all web roles then worker roles. + /// 4. Worker then web (3): add all worker roles then web roles. + /// By default this parameter is set to 0 + /// + private void AddNodeRoleTest(int webRole, int workerRole, int order = 0) + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + AzureServiceWrapper wrappedService = new AzureServiceWrapper(files.RootPath, serviceName, null); + CloudServiceProject service = new CloudServiceProject(Path.Combine(files.RootPath, serviceName), null); + + WebRoleInfo[] webRoles = null; + if (webRole > 0) + { + webRoles = new WebRoleInfo[webRole]; + for (int i = 0; i < webRoles.Length; i++) + { + webRoles[i] = new WebRoleInfo(string.Format("{0}{1}", Resources.WebRole, i + 1), 1); + } + } + + + WorkerRoleInfo[] workerRoles = null; + if (workerRole > 0) + { + workerRoles = new WorkerRoleInfo[workerRole]; + for (int i = 0; i < workerRoles.Length; i++) + { + workerRoles[i] = new WorkerRoleInfo(string.Format("{0}{1}", Resources.WorkerRole, i + 1), 1); + } + } + + RoleInfo[] roles = (webRole + workerRole > 0) ? new RoleInfo[webRole + workerRole] : null; + if (order == 0) + { + for (int i = 0, w = 0, wo = 0; i < webRole + workerRole; ) + { + if (w++ < webRole) roles[i++] = wrappedService.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); + if (wo++ < workerRole) roles[i++] = wrappedService.AddWorkerRole(Test.Utilities.Common.Data.NodeWorkerRoleScaffoldingPath); + } + } + else if (order == 1) + { + for (int i = 0, w = 0, wo = 0; i < webRole + workerRole; ) + { + if (wo++ < workerRole) roles[i++] = wrappedService.AddWorkerRole(Test.Utilities.Common.Data.NodeWorkerRoleScaffoldingPath); + if (w++ < webRole) roles[i++] = wrappedService.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); + } + } + else if (order == 2) + { + wrappedService.AddRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath, Test.Utilities.Common.Data.NodeWorkerRoleScaffoldingPath, webRole, workerRole); + webRoles.CopyTo(roles, 0); + Array.Copy(workerRoles, 0, roles, webRole, workerRoles.Length); + } + else if (order == 3) + { + wrappedService.AddRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath, Test.Utilities.Common.Data.NodeWorkerRoleScaffoldingPath, 0, workerRole); + workerRoles.CopyTo(roles, 0); + wrappedService.AddRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath, Test.Utilities.Common.Data.NodeWorkerRoleScaffoldingPath, webRole, 0); + Array.Copy(webRoles, 0, roles, workerRole, webRoles.Length); + } + else + { + throw new ArgumentException("value for order parameter is unknown"); + } + + AzureAssert.AzureServiceExists(Path.Combine(files.RootPath, serviceName), Resources.GeneralScaffolding, serviceName, webRoles: webRoles, workerRoles: workerRoles, webScaff: Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath, workerScaff: Test.Utilities.Common.Data.NodeWorkerRoleScaffoldingPath, roles: roles); + } + } + + private void AddPHPRoleTest(int webRole, int workerRole, int order = 0) + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + AzureServiceWrapper wrappedService = new AzureServiceWrapper(files.RootPath, serviceName, null); + CloudServiceProject service = new CloudServiceProject(Path.Combine(files.RootPath, serviceName), null); + + WebRoleInfo[] webRoles = null; + if (webRole > 0) + { + webRoles = new WebRoleInfo[webRole]; + for (int i = 0; i < webRoles.Length; i++) + { + webRoles[i] = new WebRoleInfo(string.Format("{0}{1}", Resources.WebRole, i + 1), 1); + } + } + + + WorkerRoleInfo[] workerRoles = null; + if (workerRole > 0) + { + workerRoles = new WorkerRoleInfo[workerRole]; + for (int i = 0; i < workerRoles.Length; i++) + { + workerRoles[i] = new WorkerRoleInfo(string.Format("{0}{1}", Resources.WorkerRole, i + 1), 1); + } + } + + RoleInfo[] roles = (webRole + workerRole > 0) ? new RoleInfo[webRole + workerRole] : null; + if (order == 0) + { + for (int i = 0, w = 0, wo = 0; i < webRole + workerRole; ) + { + if (w++ < webRole) roles[i++] = wrappedService.AddWebRole(Test.Utilities.Common.Data.PHPWebRoleScaffoldingPath); + if (wo++ < workerRole) roles[i++] = wrappedService.AddWorkerRole(Test.Utilities.Common.Data.PHPWorkerRoleScaffoldingPath); + } + } + else if (order == 1) + { + for (int i = 0, w = 0, wo = 0; i < webRole + workerRole; ) + { + if (wo++ < workerRole) roles[i++] = wrappedService.AddWorkerRole(Test.Utilities.Common.Data.PHPWorkerRoleScaffoldingPath); + if (w++ < webRole) roles[i++] = wrappedService.AddWebRole(Test.Utilities.Common.Data.PHPWebRoleScaffoldingPath); + } + } + else if (order == 2) + { + wrappedService.AddRole(Test.Utilities.Common.Data.PHPWebRoleScaffoldingPath, Test.Utilities.Common.Data.PHPWorkerRoleScaffoldingPath, webRole, workerRole); + webRoles.CopyTo(roles, 0); + Array.Copy(workerRoles, 0, roles, webRole, workerRoles.Length); + } + else if (order == 3) + { + wrappedService.AddRole(Test.Utilities.Common.Data.PHPWebRoleScaffoldingPath, Test.Utilities.Common.Data.PHPWorkerRoleScaffoldingPath, 0, workerRole); + workerRoles.CopyTo(roles, 0); + wrappedService.AddRole(Test.Utilities.Common.Data.PHPWebRoleScaffoldingPath, Test.Utilities.Common.Data.PHPWorkerRoleScaffoldingPath, webRole, 0); + Array.Copy(webRoles, 0, roles, workerRole, webRoles.Length); + } + else + { + throw new ArgumentException("value for order parameter is unknown"); + } + + AzureAssert.AzureServiceExists(Path.Combine(files.RootPath, serviceName), Resources.GeneralScaffolding, serviceName, webRoles: webRoles, workerRoles: workerRoles, webScaff: Test.Utilities.Common.Data.PHPWebRoleScaffoldingPath, workerScaff: Test.Utilities.Common.Data.PHPWorkerRoleScaffoldingPath, roles: roles); + } + } + + public AzureServiceTests() + { + AzureTool.IgnoreMissingSDKError = true; + AzurePowerShell.ProfileDirectory = Test.Utilities.Common.Data.AzureSdkAppDir; + mockCommandRuntime = new MockCommandRuntime(); + + enableCacheCmdlet = new EnableAzureMemcacheRoleCommand(); + addCacheRoleCmdlet = new AddAzureCacheWorkerRoleCommand(); + + addCacheRoleCmdlet.CommandRuntime = mockCommandRuntime; + enableCacheCmdlet.CommandRuntime = mockCommandRuntime; + } + + [Fact] + public void AzureServiceCreateNew() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + AzureAssert.AzureServiceExists(Path.Combine(files.RootPath, serviceName), Resources.GeneralScaffolding, serviceName); + } + } + + [Fact] + public void AzureServiceCreateNewEmptyParentDirectoryFail() + { + Testing.AssertThrows(() => new CloudServiceProject(string.Empty, serviceName, null), string.Format(Resources.InvalidOrEmptyArgumentMessage, "service parent directory")); + } + + [Fact] + public void AzureServiceCreateNewNullParentDirectoryFail() + { + Testing.AssertThrows(() => new CloudServiceProject(null, serviceName, null), string.Format(Resources.InvalidOrEmptyArgumentMessage, "service parent directory")); + } + + [Fact] + public void AzureServiceCreateNewInvalidParentDirectoryFail() + { + foreach (string invalidName in Test.Utilities.Common.Data.InvalidFileName) + { + Testing.AssertThrows(() => new CloudServiceProject(string.Empty, serviceName, null), string.Format(Resources.InvalidOrEmptyArgumentMessage, "service parent directory")); + } + } + + [Fact] + public void AzureServiceCreateNewDoesNotExistParentDirectoryFail() + { + Testing.AssertThrows(() => new CloudServiceProject("DoesNotExist", serviceName, null), string.Format(Resources.PathDoesNotExistForElement, Resources.ServiceParentDirectory, "DoesNotExist")); + } + + [Fact] + public void AzureServiceCreateNewEmptyServiceNameFail() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + Testing.AssertThrows(() => new CloudServiceProject(files.RootPath, string.Empty, null), string.Format(Resources.InvalidOrEmptyArgumentMessage, "Name")); + } + } + + [Fact] + public void AzureServiceCreateNewNullServiceNameFail() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + Testing.AssertThrows(() => new CloudServiceProject(files.RootPath, null, null), string.Format(Resources.InvalidOrEmptyArgumentMessage, "Name")); + } + } + + [Fact] + public void AzureServiceCreateNewInvalidServiceNameFail() + { + foreach (string invalidFileName in Test.Utilities.Common.Data.InvalidFileName) + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + Testing.AssertThrows(() => new CloudServiceProject(files.RootPath, invalidFileName, null), string.Format(Resources.InvalidFileName, "Name")); + } + } + } + + [Fact] + public void AzureServiceCreateNewInvalidDnsServiceNameFail() + { + char[] invalidFileNameChars = Path.GetInvalidFileNameChars(); + + foreach (string invalidDnsName in Test.Utilities.Common.Data.InvalidServiceNames) + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + // This case is handled in AzureServiceCreateNewInvalidDnsServiceNameFail test + // + if (invalidFileNameChars.Any(c => invalidFileNameChars.Contains(c))) continue; + Testing.AssertThrows(() => new CloudServiceProject(files.RootPath, invalidDnsName, null), string.Format(Resources.InvalidDnsName, invalidDnsName, "Name")); + } + } + } + + [Fact] + public void AzureServiceCreateNewExistingServiceFail() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + new CloudServiceProject(files.RootPath, serviceName, null); + Testing.AssertThrows(() => new CloudServiceProject(files.RootPath, serviceName, null), string.Format(Resources.ServiceAlreadyExistsOnDisk, serviceName, Path.Combine(files.RootPath, serviceName))); + } + } + + [Fact] + public void AzureNodeServiceLoadExistingSimpleService() + { + AddNodeRoleTest(0, 0, 0); + } + + [Fact] + public void AzureNodeServiceLoadExistingOneWebRoleService() + { + AddNodeRoleTest(1, 0, 0); + } + + [Fact] + public void AzureNodeServiceLoadExistingOneWorkerRoleService() + { + AddNodeRoleTest(0, 1, 0); + } + + [Fact] + public void AzureNodeServiceLoadExistingMultipleWebRolesService() + { + AddNodeRoleTest(5, 0, 0); + } + + [Fact] + public void AzureNodeServiceLoadExistingMultipleWorkerRolesService() + { + AddNodeRoleTest(0, 5, 0); + } + + [Fact] + public void AzureNodeServiceLoadExistingMultipleWebAndOneWorkerRolesService() + { + int order = 0; + AddNodeRoleTest(3, 4, order++); + AddNodeRoleTest(2, 4, order++); + AddNodeRoleTest(4, 2, order++); + AddNodeRoleTest(3, 5, order++); + } + + [Fact] + public void AzurePHPServiceLoadExistingSimpleService() + { + AddPHPRoleTest(0, 0, 0); + } + + [Fact] + public void AzurePHPServiceLoadExistingOneWebRoleService() + { + AddPHPRoleTest(1, 0, 0); + } + + [Fact] + public void AzurePHPServiceLoadExistingOneWorkerRoleService() + { + AddPHPRoleTest(0, 1, 0); + } + + [Fact] + public void AzurePHPServiceLoadExistingMultipleWebRolesService() + { + AddPHPRoleTest(5, 0, 0); + } + + [Fact] + public void AzurePHPServiceLoadExistingMultipleWorkerRolesService() + { + AddPHPRoleTest(0, 5, 0); + } + + [Fact] + public void AzurePHPServiceLoadExistingMultipleWebAndOneWorkerRolesService() + { + int order = 0; + AddPHPRoleTest(3, 4, order++); + AddPHPRoleTest(2, 4, order++); + AddPHPRoleTest(4, 2, order++); + AddPHPRoleTest(3, 5, order++); + } + + [Fact] + public void AzureServiceAddNewNodeWebRoleTest() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + RoleInfo webRole = service.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath, "MyWebRole", 10); + + AzureAssert.AzureServiceExists(Path.Combine(files.RootPath, serviceName), Resources.GeneralScaffolding, serviceName, webRoles: new WebRoleInfo[] { (WebRoleInfo)webRole }, webScaff: Path.Combine(Resources.NodeScaffolding, Resources.WebRole), roles: new RoleInfo[] { webRole }); + } + } + + [Fact] + public void AzureServiceAddNewPHPWebRoleTest() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + RoleInfo webRole = service.AddWebRole(Test.Utilities.Common.Data.PHPWebRoleScaffoldingPath, "MyWebRole", 10); + + AzureAssert.AzureServiceExists(Path.Combine(files.RootPath, serviceName), Resources.GeneralScaffolding, serviceName, webRoles: new WebRoleInfo[] { (WebRoleInfo)webRole }, webScaff: Path.Combine(Resources.PHPScaffolding, Resources.WebRole), roles: new RoleInfo[] { webRole }); + } + } + + [Fact] + public void AzureServiceAddNewNodeWorkerRoleTest() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + RoleInfo workerRole = service.AddWorkerRole(Test.Utilities.Common.Data.NodeWorkerRoleScaffoldingPath, "MyWorkerRole", 10); + + AzureAssert.AzureServiceExists(Path.Combine(files.RootPath, serviceName), Resources.GeneralScaffolding, serviceName, workerRoles: new WorkerRoleInfo[] { (WorkerRoleInfo)workerRole }, workerScaff: Path.Combine(Resources.NodeScaffolding, Resources.WorkerRole), roles: new RoleInfo[] { workerRole }); + } + } + + [Fact] + public void AzureServiceAddNewPHPWorkerRoleTest() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + RoleInfo workerRole = service.AddWorkerRole(Test.Utilities.Common.Data.PHPWorkerRoleScaffoldingPath, "MyWorkerRole", 10); + + AzureAssert.AzureServiceExists(Path.Combine(files.RootPath, serviceName), Resources.GeneralScaffolding, serviceName, workerRoles: new WorkerRoleInfo[] { (WorkerRoleInfo)workerRole }, workerScaff: Path.Combine(Resources.PHPScaffolding, Resources.WorkerRole), roles: new RoleInfo[] { workerRole }); + } + } + + [Fact] + public void AzureServiceAddNewNodeWorkerRoleWithWhiteCharFail() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + Testing.AssertThrows(() => new CloudServiceProject(files.RootPath, serviceName, null).AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath, "\tRole"), string.Format(Resources.InvalidRoleNameMessage, "\tRole")); + } + } + + [Fact] + public void AzureServiceAddNewPHPWorkerRoleWithWhiteCharFail() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + Testing.AssertThrows(() => new CloudServiceProject(files.RootPath, serviceName, null).AddWebRole(Test.Utilities.Common.Data.PHPWebRoleScaffoldingPath, "\tRole"), string.Format(Resources.InvalidRoleNameMessage, "\tRole")); + } + } + + [Fact] + public void AzureServiceAddExistingNodeRoleFail() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + service.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath, "WebRole"); + Testing.AssertThrows(() => service.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath, "WebRole"), string.Format(Resources.AddRoleMessageRoleExists, "WebRole")); + } + } + + [Fact] + public void AzureServiceAddExistingPHPRoleFail() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + service.AddWebRole(Test.Utilities.Common.Data.PHPWebRoleScaffoldingPath, "WebRole"); + Testing.AssertThrows(() => service.AddWebRole(Test.Utilities.Common.Data.PHPWebRoleScaffoldingPath, "WebRole"), string.Format(Resources.AddRoleMessageRoleExists, "WebRole")); + } + } + + [Fact] + public void GetServiceNameTest() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + NewAzureServiceProjectCommand newServiceCmdlet = new NewAzureServiceProjectCommand(); + newServiceCmdlet.CommandRuntime = new MockCommandRuntime(); + newServiceCmdlet.NewAzureServiceProcess(files.RootPath, serviceName); + Assert.Equal(serviceName, new CloudServiceProject(Path.Combine(files.RootPath, serviceName), null).ServiceName); + } + } + + [Fact] + public void ChangeServiceNameTest() + { + string newName = "NodeAppService"; + + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + service.ChangeServiceName(newName, service.Paths); + Assert.Equal(newName, service.Components.CloudConfig.serviceName); + Assert.Equal(newName, service.Components.LocalConfig.serviceName); + Assert.Equal(newName, service.Components.Definition.name); + } + } + + [Fact] + public void SetNodeRoleInstancesTest() + { + int newInstances = 10; + + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + service.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath, "WebRole", 1); + service.SetRoleInstances(service.Paths, "WebRole", newInstances); + Assert.Equal(service.Components.CloudConfig.Role[0].Instances.count, newInstances); + Assert.Equal(service.Components.LocalConfig.Role[0].Instances.count, newInstances); + } + } + + [Fact] + public void SetPHPRoleInstancesTest() + { + int newInstances = 10; + + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + service.AddWebRole(Test.Utilities.Common.Data.PHPWebRoleScaffoldingPath, "WebRole", 1); + service.SetRoleInstances(service.Paths, "WebRole", newInstances); + Assert.Equal(service.Components.CloudConfig.Role[0].Instances.count, newInstances); + Assert.Equal(service.Components.LocalConfig.Role[0].Instances.count, newInstances); + } + } + + [Fact] + public void TestResolveRuntimePackageUrls() + { + // Create a temp directory that we'll use to "publish" our service + using (FileSystemHelper files = new FileSystemHelper(this) { EnableMonitoring = true }) + { + // Import our default publish settings + files.CreateAzureSdkDirectoryAndImportPublishSettings(); + + // Create a new service that we're going to publish + string serviceName = "TEST_SERVICE_NAME"; + + string rootPath = files.CreateNewService(serviceName); + + // Add web and worker roles + string defaultWebRoleName = "WebRoleDefault"; + addNodeWebCmdlet = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = defaultWebRoleName, Instances = 2 }; + addNodeWebCmdlet.ExecuteCmdlet(); + + string defaultWorkerRoleName = "WorkerRoleDefault"; + addNodeWorkerCmdlet = new AddAzureNodeWorkerRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = defaultWorkerRoleName, Instances = 2 }; + addNodeWorkerCmdlet.ExecuteCmdlet(); + + AddAzureNodeWebRoleCommand matchWebRole = addNodeWebCmdlet; + string matchWebRoleName = "WebRoleExactMatch"; + addNodeWebCmdlet = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = matchWebRoleName, Instances = 2 }; + addNodeWebCmdlet.ExecuteCmdlet(); + + AddAzureNodeWorkerRoleCommand matchWorkerRole = addNodeWorkerCmdlet; + string matchWorkerRoleName = "WorkerRoleExactMatch"; + addNodeWorkerCmdlet = new AddAzureNodeWorkerRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = matchWorkerRoleName, Instances = 2 }; + addNodeWorkerCmdlet.ExecuteCmdlet(); + + AddAzureNodeWebRoleCommand overrideWebRole = addNodeWebCmdlet; + string overrideWebRoleName = "WebRoleOverride"; + addNodeWebCmdlet = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = overrideWebRoleName, Instances = 2 }; + addNodeWebCmdlet.ExecuteCmdlet(); + + AddAzureNodeWorkerRoleCommand overrideWorkerRole = addNodeWorkerCmdlet; + string overrideWorkerRoleName = "WorkerRoleOverride"; + addNodeWorkerCmdlet = new AddAzureNodeWorkerRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = overrideWorkerRoleName, Instances = 2 }; + addNodeWorkerCmdlet.ExecuteCmdlet(); + + string cacheWebRoleName = "cacheWebRole"; + string cacheRuntimeVersion = "1.7.0"; + AddAzureNodeWebRoleCommand addAzureWebRole = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = cacheWebRoleName }; + addAzureWebRole.ExecuteCmdlet(); + + CloudServiceProject testService = new CloudServiceProject(rootPath, FileUtilities.GetContentFilePath("Services")); + RuntimePackageHelper.SetRoleRuntime(testService.Components.Definition, matchWebRoleName, testService.Paths, version: "0.8.2"); + RuntimePackageHelper.SetRoleRuntime(testService.Components.Definition, matchWorkerRoleName, testService.Paths, version: "0.8.2"); + RuntimePackageHelper.SetRoleRuntime(testService.Components.Definition, overrideWebRoleName, testService.Paths, overrideUrl: "http://OVERRIDE"); + RuntimePackageHelper.SetRoleRuntime(testService.Components.Definition, overrideWorkerRoleName, testService.Paths, overrideUrl: "http://OVERRIDE"); + testService.AddRoleRuntime(testService.Paths, cacheWebRoleName, Resources.CacheRuntimeValue, cacheRuntimeVersion, RuntimePackageHelper.GetTestManifest(files)); + testService.Components.Save(testService.Paths); + + // Get the publishing process started by creating the package + testService.ResolveRuntimePackageUrls(RuntimePackageHelper.GetTestManifest(files)); + + CloudServiceProject updatedService = new CloudServiceProject(testService.Paths.RootPath, null); + + RuntimePackageHelper.ValidateRoleRuntime(updatedService.Components.Definition, defaultWebRoleName, "http://cdn/node/default.exe;http://cdn/iisnode/default.exe", null); + RuntimePackageHelper.ValidateRoleRuntime(updatedService.Components.Definition, defaultWorkerRoleName, "http://cdn/node/default.exe", null); + RuntimePackageHelper.ValidateRoleRuntime(updatedService.Components.Definition, matchWorkerRoleName, "http://cdn/node/foo.exe", null); + RuntimePackageHelper.ValidateRoleRuntime(updatedService.Components.Definition, matchWebRoleName, "http://cdn/node/foo.exe;http://cdn/iisnode/default.exe", null); + RuntimePackageHelper.ValidateRoleRuntime(updatedService.Components.Definition, overrideWebRoleName, null, "http://OVERRIDE"); + RuntimePackageHelper.ValidateRoleRuntime(updatedService.Components.Definition, overrideWorkerRoleName, null, "http://OVERRIDE"); + RuntimePackageHelper.ValidateRoleRuntimeVariable(updatedService.Components.GetRoleStartup(cacheWebRoleName), Resources.CacheRuntimeVersionKey, cacheRuntimeVersion); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/CloudServiceClientTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/CloudServiceClientTests.cs new file mode 100644 index 000000000000..3ff4662130e6 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/CloudServiceClientTests.cs @@ -0,0 +1,519 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Net; +using System.Threading; +using Xunit; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Compute.Models; +using Microsoft.WindowsAzure.Management.Models; +using Microsoft.WindowsAzure.Management.Storage; +using Microsoft.WindowsAzure.Management.Storage.Models; +using Microsoft.WindowsAzure.Storage.Blob; +using Moq; +using MockStorageService = Microsoft.WindowsAzure.Commands.Test.Utilities.Common.MockStorageService; +using Microsoft.WindowsAzure.Commands.Common; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Utilities +{ + + public class CloudServiceClientTests : TestBase + { + private AzureSubscription subscription; + + private ClientMocks clientMocks; + + private Mock cloudBlobUtilityMock; + + private ICloudServiceClient client; + + private const string serviceName = "cloudService"; + + private const string storageName = "storagename"; + + private MockServicesHost services; + private MockStorageService storageService; + + private void ExecuteInTempCurrentDirectory(string path, Action action) + { + string currentDirectory = System.Environment.CurrentDirectory; + + try + { + System.Environment.CurrentDirectory = path; + action(); + } + catch + { + System.Environment.CurrentDirectory = currentDirectory; + throw; + } + } + + private void SetupStorage(string name, MockStorageService.StorageAccountData a) + { + a.Name = name; + a.BlobEndpoint = "http://awesome.blob.core.windows.net/"; + a.QueueEndpoint = "http://awesome.queue.core.windows.net/"; + a.TableEndpoint = "http://awesome.table.core.windows.net/"; + a.PrimaryKey = + "MNao3bm7t7B/x+g2/ssh9HnG0mEh1QV5EHpcna8CetYn+TSRoA8/SBoH6B3Ufwtnz3jZLSw9GEUuCTr3VooBWq=="; + a.SecondaryKey = "secondaryKey"; + } + + private void RemoveDeployments() + { + services.Clear() + .Add(s => { s.Name = serviceName; }); + } + + public CloudServiceClientTests() + { + AzurePowerShell.ProfileDirectory = Test.Utilities.Common.Data.AzureSdkAppDir; + + storageService = new MockStorageService() + .Add(a => SetupStorage(serviceName.ToLowerInvariant(), a)) + .Add(a => SetupStorage(storageName.ToLowerInvariant(), a)); + + services = new MockServicesHost() + .Add(s => + { + s.Name = serviceName; + s.AddDeployment(d => + { + d.Slot = DeploymentSlot.Production; + d.Name = "mydeployment"; + }); + }); + + subscription = new AzureSubscription + { + Properties = new Dictionary {{AzureSubscription.Property.Default, "True"}}, + Id = Guid.NewGuid(), + Name = Test.Utilities.Common.Data.Subscription1, + }; + + cloudBlobUtilityMock = new Mock(); + cloudBlobUtilityMock.Setup(f => f.UploadPackageToBlob( + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny())).Returns(new Uri("http://www.packageurl.azure.com")); + + clientMocks = new ClientMocks(subscription.Id); + + services.InitializeMocks(clientMocks.ComputeManagementClientMock); + storageService.InitializeMocks(clientMocks.StorageManagementClientMock); + + client = new CloudServiceClient(subscription, + clientMocks.ManagementClientMock.Object, + clientMocks.StorageManagementClientMock.Object, + clientMocks.ComputeManagementClientMock.Object + ) + { + CloudBlobUtility = cloudBlobUtilityMock.Object + }; + } + + [Fact] + public void TestStartCloudService() + { + client.StartCloudService(serviceName); + + Assert.True(services.LastDeploymentStatusUpdate.HasValue); + Assert.Equal(UpdatedDeploymentStatus.Running, services.LastDeploymentStatusUpdate.Value); + } + + [Fact] + public void TestStopCloudService() + { + client.StopCloudService(serviceName); + + Assert.True(services.LastDeploymentStatusUpdate.HasValue); + Assert.Equal(UpdatedDeploymentStatus.Suspended, services.LastDeploymentStatusUpdate.Value); + } + + [Fact] + public void TestRemoveCloudService() + { + clientMocks.ComputeManagementClientMock.Setup( + c => c.Deployments.DeleteByNameAsync(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) + .Returns((string s, string deploymentName, bool deleteAll, CancellationToken cancellationToken) => Tasks.FromResult( + CreateComputeOperationResponse("req0"))); + + clientMocks.ComputeManagementClientMock.Setup( + c => c.HostedServices.DeleteAsync(It.IsAny(), It.IsAny())) + .Returns(Tasks.FromResult(new OperationResponse + { + RequestId = "request000", + StatusCode = HttpStatusCode.OK + })); + + // Test + client.RemoveCloudService(serviceName); + + // Assert + clientMocks.ComputeManagementClientMock.Verify( + c => c.Deployments.DeleteByNameAsync(serviceName, "mydeployment", false, It.IsAny()), Times.Once); + + clientMocks.ComputeManagementClientMock.Verify( + c => c.HostedServices.DeleteAsync(serviceName, It.IsAny()), Times.Once); + } + + [Fact] + public void TestRemoveCloudServiceWithStaging() + { + services.Clear() + .Add(s => + { + s.Name = serviceName; + s.AddDeployment(d => + { + d.Name = "myStagingdeployment"; + d.Slot = DeploymentSlot.Staging; + }); + }); + + clientMocks.ComputeManagementClientMock.Setup( + c => c.Deployments.DeleteByNameAsync(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) + .Returns((string s, string deploymentName, bool deleteAll, CancellationToken cancellationToken) => Tasks.FromResult( + CreateComputeOperationResponse("request001"))); + + clientMocks.ComputeManagementClientMock.Setup( + c => c.HostedServices.DeleteAsync(It.IsAny(), It.IsAny())) + .Returns(Tasks.FromResult(new OperationResponse + { + RequestId = "request000", + StatusCode = HttpStatusCode.OK + })); + + // Test + client.RemoveCloudService(serviceName); + + // Assert + clientMocks.ComputeManagementClientMock.Verify( + c => c.Deployments.DeleteByNameAsync(serviceName, "myStagingdeployment", false, It.IsAny()), Times.Once); + + clientMocks.ComputeManagementClientMock.Verify( + c => c.HostedServices.DeleteAsync(serviceName, It.IsAny()), Times.Once); + + } + + [Fact] + public void TestRemoveCloudServiceWithoutDeployments() + { + RemoveDeployments(); + + clientMocks.ComputeManagementClientMock.Setup( + c => c.Deployments.BeginDeletingBySlotAsync(It.IsAny(), DeploymentSlot.Production, It.IsAny())) + .Returns((string s, DeploymentSlot slot, CancellationToken cancellationToken) => Tasks.FromResult(new OperationResponse + { + RequestId = "req0", + StatusCode = HttpStatusCode.OK + })); + + clientMocks.ComputeManagementClientMock.Setup( + c => c.HostedServices.DeleteAsync(It.IsAny(), It.IsAny())) + .Returns(Tasks.FromResult(new OperationResponse + { + RequestId = "request000", + StatusCode = HttpStatusCode.OK + })); + + // Test + client.RemoveCloudService(serviceName); + + // Assert + clientMocks.ComputeManagementClientMock.Verify( + c => c.Deployments.BeginDeletingBySlotAsync(serviceName, DeploymentSlot.Production, It.IsAny()), Times.Never); + + clientMocks.ComputeManagementClientMock.Verify( + c => c.HostedServices.DeleteAsync(serviceName, It.IsAny()), Times.Once); + + } + + [Fact (Skip = "Ignore")] + public void TestPublishNewCloudService() + { + RemoveDeployments(); + + clientMocks.ComputeManagementClientMock.Setup( + c => + c.HostedServices.CreateAsync(It.IsAny(), It.IsAny())) + .Returns(Tasks.FromResult(new OperationResponse + { + RequestId = "request001", + StatusCode = HttpStatusCode.OK + })); + + using (var files = new FileSystemHelper(this) { EnableMonitoring = true }) + { + // Setup + string rootPath = files.CreateNewService(serviceName); + files.CreateAzureSdkDirectoryAndImportPublishSettings(); + var cloudServiceProject = new CloudServiceProject(rootPath, FileUtilities.GetContentFilePath("Services")); + cloudServiceProject.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); + + + ExecuteInTempCurrentDirectory(rootPath, () => client.PublishCloudService(location: "West US")); + + clientMocks.ComputeManagementClientMock.Verify(c => c.Deployments.CreateAsync( + serviceName, DeploymentSlot.Production, It.IsAny(), It.IsAny()), Times.Once); + } + + } + + [Fact(Skip = "Ignore")] + public void TestUpgradeCloudService() + { + clientMocks.ComputeManagementClientMock.Setup( + c => + c.HostedServices.CreateAsync(It.IsAny(), It.IsAny())) + .Returns(Tasks.FromResult(new OperationResponse + { + RequestId = "request001", + StatusCode = HttpStatusCode.OK + })); + + clientMocks.ComputeManagementClientMock.Setup( + c => + c.Deployments.UpgradeBySlotAsync(It.IsAny(), DeploymentSlot.Production, + It.IsAny(), + It.IsAny())) + .Returns(Tasks.FromResult(CreateComputeOperationResponse("req002"))); + + using (var files = new FileSystemHelper(this) { EnableMonitoring = true }) + { + // Setup + string rootPath = files.CreateNewService(serviceName); + files.CreateAzureSdkDirectoryAndImportPublishSettings(); + var cloudServiceProject = new CloudServiceProject(rootPath, FileUtilities.GetContentFilePath("Services")); + cloudServiceProject.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); + + ExecuteInTempCurrentDirectory(rootPath, () => client.PublishCloudService(location: "West US")); + + clientMocks.ComputeManagementClientMock.Verify(c => c.Deployments.UpgradeBySlotAsync(serviceName, DeploymentSlot.Production, It.IsAny(), It.IsAny()), Times.Once); + } + + } + + [Fact(Skip = "Ignore")] + public void TestCreateStorageServiceWithPublish() + { + RemoveDeployments(); + + clientMocks.ComputeManagementClientMock.Setup( + c => + c.HostedServices.CreateAsync(It.IsAny(), It.IsAny())) + .Returns(Tasks.FromResult(new OperationResponse + { + RequestId = "request001", + StatusCode = HttpStatusCode.OK + })); + + storageService.Clear(); + + using (var files = new FileSystemHelper(this) { EnableMonitoring = true }) + { + // Setup + string rootPath = files.CreateNewService(serviceName); + files.CreateAzureSdkDirectoryAndImportPublishSettings(); + var cloudServiceProject = new CloudServiceProject(rootPath, FileUtilities.GetContentFilePath("Services")); + cloudServiceProject.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); + + ExecuteInTempCurrentDirectory(rootPath, () => client.PublishCloudService(location: "West US")); + + clientMocks.StorageManagementClientMock.Verify(c => c.StorageAccounts.CreateAsync(It.IsAny(), It.IsAny()), Times.Once); + } + } + + [Fact(Skip = "Ignore")] + public void TestPublishWithCurrentStorageAccount() + { + RemoveDeployments(); + + clientMocks.ComputeManagementClientMock.Setup( + c => + c.HostedServices.CreateAsync(It.IsAny(), It.IsAny())) + .Returns(Tasks.FromResult(new OperationResponse + { + RequestId = "request001", + StatusCode = HttpStatusCode.OK + })); + + using (var files = new FileSystemHelper(this) { EnableMonitoring = true }) + { + // Setup + string rootPath = files.CreateNewService(serviceName); + files.CreateAzureSdkDirectoryAndImportPublishSettings(); + var cloudServiceProject = new CloudServiceProject(rootPath, FileUtilities.GetContentFilePath("Services")); + cloudServiceProject.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); + subscription.Properties[AzureSubscription.Property.StorageAccount] = storageName; + + ExecuteInTempCurrentDirectory(rootPath, () => client.PublishCloudService(location: "West US")); + + cloudBlobUtilityMock.Verify(f => f.UploadPackageToBlob( + clientMocks.StorageManagementClientMock.Object, + subscription.GetProperty(AzureSubscription.Property.StorageAccount), + It.IsAny(), + It.IsAny()), Times.Once()); + } + } + + [Fact(Skip = "Ignore")] + public void TestPublishWithDefaultLocation() + { + RemoveDeployments(); + + clientMocks.ComputeManagementClientMock.Setup( + c => + c.HostedServices.CreateAsync(It.IsAny(), It.IsAny())) + .Returns(Tasks.FromResult(new OperationResponse + { + RequestId = "request001", + StatusCode = HttpStatusCode.OK + })); + + clientMocks.ManagementClientMock.Setup(c => c.Locations.ListAsync(It.IsAny())) + .Returns(Tasks.FromResult(new LocationsListResponse + { + Locations = + { + new LocationsListResponse.Location {DisplayName = "East US", Name = "EastUS"} + } + })); + + using (var files = new FileSystemHelper(this) { EnableMonitoring = true }) + { + // Setup + string rootPath = files.CreateNewService(serviceName); + files.CreateAzureSdkDirectoryAndImportPublishSettings(); + var cloudServiceProject = new CloudServiceProject(rootPath, FileUtilities.GetContentFilePath("Services")); + cloudServiceProject.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); + + ExecuteInTempCurrentDirectory(rootPath, () => client.PublishCloudService()); + + clientMocks.ManagementClientMock.Verify(c => c.Locations.ListAsync(It.IsAny()), Times.Once); + } + } + + [Fact] + public void TestPublishFromPackageUsingDefaultLocation() + { + RemoveDeployments(); + + clientMocks.ComputeManagementClientMock.Setup( + c => + c.HostedServices.CreateAsync(It.IsAny(), It.IsAny())) + .Returns(Tasks.FromResult(new OperationResponse + { + RequestId = "request001", + StatusCode = HttpStatusCode.OK + })); + + clientMocks.ManagementClientMock.Setup(c => c.Locations.ListAsync(It.IsAny())) + .Returns(Tasks.FromResult(new LocationsListResponse + { + Locations = + { + new LocationsListResponse.Location {DisplayName = "East US", Name = "EastUS"} + } + })); + + using (var files = new FileSystemHelper(this) { EnableMonitoring = false }) + { + // Setup + string packageName = serviceName; + string package, configuration; + files.CreateDirectoryWithPrebuiltPackage(packageName, out package, out configuration); + files.CreateAzureSdkDirectoryAndImportPublishSettings(); + + // Execute + ExecuteInTempCurrentDirectory(Path.GetDirectoryName(package), + () => client.PublishCloudService(package, configuration, null, null, null, null, null, false, false)); + + // Verify + clientMocks.ComputeManagementClientMock.Verify(c => c.Deployments.CreateAsync( + serviceName, DeploymentSlot.Production, It.IsAny(), It.IsAny()), Times.Once); + } + } + + [Fact] + public void TestUpgradeCloudServiceFromAPackage() + { + clientMocks.ComputeManagementClientMock.Setup( + c => + c.HostedServices.CreateAsync(It.IsAny(), It.IsAny())) + .Returns(Tasks.FromResult(new OperationResponse + { + RequestId = "request001", + StatusCode = HttpStatusCode.OK + })); + + clientMocks.ComputeManagementClientMock.Setup( + c => + c.Deployments.UpgradeBySlotAsync(It.IsAny(), DeploymentSlot.Production, + It.IsAny(), + It.IsAny())) + .Returns(Tasks.FromResult(CreateComputeOperationResponse("req002"))); + + + clientMocks.ManagementClientMock.Setup(c => c.Locations.ListAsync(It.IsAny())) + .Returns(Tasks.FromResult(new LocationsListResponse + { + Locations = + { + new LocationsListResponse.Location {DisplayName = "East US", Name = "EastUS"} + } + })); + + using (var files = new FileSystemHelper(this) { EnableMonitoring = true }) + { + // Setup + string packageName = serviceName; + string package, configuration; + files.CreateDirectoryWithPrebuiltPackage(packageName, out package, out configuration); + files.CreateAzureSdkDirectoryAndImportPublishSettings(); + + // Execute + ExecuteInTempCurrentDirectory(Path.GetDirectoryName(package), + () => client.PublishCloudService(package, configuration, null, null, null, null, null, false, false)); + + // Verify + clientMocks.ComputeManagementClientMock.Verify(c => c.Deployments.UpgradeBySlotAsync(serviceName, + DeploymentSlot.Production, It.IsAny(), It.IsAny()), Times.Once); + } + } + + private OperationStatusResponse CreateComputeOperationResponse(string requestId, OperationStatus status = OperationStatus.Succeeded) + { + return new OperationStatusResponse + { + Error = null, + HttpStatusCode = HttpStatusCode.OK, + Id = "id", + RequestId = requestId, + Status = status, + StatusCode = HttpStatusCode.OK + }; + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/CsPackTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/CsPackTests.cs new file mode 100644 index 000000000000..4763a411a036 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/CsPackTests.cs @@ -0,0 +1,133 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using System.IO.Packaging; +using System.Linq; +using Xunit; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Utilities +{ + + internal class CsPackTests : TestBase + { + private const string serviceName = "AzureService"; + + [Fact] + public void CreateLocalPackageWithOneNodeWebRoleTest() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + RoleInfo webRoleInfo = service.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); + string logsDir = Path.Combine(service.Paths.RootPath, webRoleInfo.Name, "server.js.logs"); + string logFile = Path.Combine(logsDir, "0.txt"); + string targetLogsFile = Path.Combine(service.Paths.LocalPackage, "roles", webRoleInfo.Name, @"approot\server.js.logs\0.txt"); + files.CreateDirectory(logsDir); + files.CreateEmptyFile(logFile); + service.CreatePackage(DevEnv.Local); + + AzureAssert.ScaffoldingExists(Path.Combine(service.Paths.LocalPackage, @"roles\WebRole1\approot"), Path.Combine(Resources.NodeScaffolding, Resources.WebRole)); + Assert.True(File.Exists(targetLogsFile)); + } + } + + [Fact] + public void CreateLocalPackageWithOnePHPWebRoleTest() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + RoleInfo webRoleInfo = service.AddWebRole(Test.Utilities.Common.Data.PHPWebRoleScaffoldingPath); + string logsDir = Path.Combine(service.Paths.RootPath, webRoleInfo.Name, "server.js.logs"); + string logFile = Path.Combine(logsDir, "0.txt"); + string targetLogsFile = Path.Combine(service.Paths.LocalPackage, "roles", webRoleInfo.Name, @"approot\server.js.logs\0.txt"); + files.CreateDirectory(logsDir); + files.CreateEmptyFile(logFile); + service.CreatePackage(DevEnv.Local); + + AzureAssert.ScaffoldingExists(Path.Combine(service.Paths.LocalPackage, @"roles\WebRole1\approot"), Path.Combine(Resources.PHPScaffolding, Resources.WebRole)); + Assert.True(File.Exists(targetLogsFile)); + } + } + + [Fact] + public void CreateLocalPackageWithNodeWorkerRoleTest() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + service.AddWorkerRole(Test.Utilities.Common.Data.NodeWorkerRoleScaffoldingPath); + service.CreatePackage(DevEnv.Local); + + AzureAssert.ScaffoldingExists(Path.Combine(service.Paths.LocalPackage, @"roles\WorkerRole1\approot"), Path.Combine(Resources.NodeScaffolding, Resources.WorkerRole)); + } + } + + [Fact] + public void CreateLocalPackageWithPHPWorkerRoleTest() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + service.AddWorkerRole(Test.Utilities.Common.Data.PHPWorkerRoleScaffoldingPath); + service.CreatePackage(DevEnv.Local); + + AzureAssert.ScaffoldingExists(Path.Combine(service.Paths.LocalPackage, @"roles\WorkerRole1\approot"), Path.Combine(Resources.PHPScaffolding, Resources.WorkerRole)); + } + } + + [Fact] + public void CreateLocalPackageWithMultipleRoles() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + service.AddWorkerRole(Test.Utilities.Common.Data.NodeWorkerRoleScaffoldingPath); + service.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); + service.AddWorkerRole(Test.Utilities.Common.Data.PHPWorkerRoleScaffoldingPath); + service.AddWebRole(Test.Utilities.Common.Data.PHPWebRoleScaffoldingPath); + service.CreatePackage(DevEnv.Local); + + AzureAssert.ScaffoldingExists(Path.Combine(service.Paths.LocalPackage, @"roles\WorkerRole1\approot"), Path.Combine(Resources.NodeScaffolding, Resources.WorkerRole)); + AzureAssert.ScaffoldingExists(Path.Combine(service.Paths.LocalPackage, @"roles\WebRole1\approot"), Path.Combine(Resources.NodeScaffolding, Resources.WebRole)); + AzureAssert.ScaffoldingExists(Path.Combine(service.Paths.LocalPackage, @"roles\WorkerRole2\approot"), Path.Combine(Resources.PHPScaffolding, Resources.WorkerRole)); + AzureAssert.ScaffoldingExists(Path.Combine(service.Paths.LocalPackage, @"roles\WebRole2\approot"), Path.Combine(Resources.PHPScaffolding, Resources.WebRole)); + } + } + + [Fact] + public void CreateCloudPackageWithMultipleRoles() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + service.AddWorkerRole(Test.Utilities.Common.Data.NodeWorkerRoleScaffoldingPath); + service.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); + service.AddWorkerRole(Test.Utilities.Common.Data.PHPWorkerRoleScaffoldingPath); + service.AddWebRole(Test.Utilities.Common.Data.PHPWebRoleScaffoldingPath); + service.CreatePackage(DevEnv.Cloud); + + using (Package package = Package.Open(service.Paths.CloudPackage)) + { + Assert.Equal(9, package.GetParts().Count()); + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/CsPackUtilTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/CsPackUtilTests.cs new file mode 100644 index 000000000000..d5bffb1bceca --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/CsPackUtilTests.cs @@ -0,0 +1,99 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService.AzureTools; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Moq; +using System.IO; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Utilities +{ + public class CsPackUtilTests + { + [Fact] + void RetrieveRightErrorFromCsPackProcess() + { + string serviceName = "AzureService"; + string sampleError = "error"; + string stagingFolder = FileSystemHelper.GetTemporaryDirectoryName(); + string fakedSDKBinPath = @"c:\foobar"; + Directory.CreateDirectory(stagingFolder); + try + { + CloudServiceProject service = new CloudServiceProject(stagingFolder, serviceName, null); + service.AddWorkerRole(Test.Utilities.Common.Data.NodeWorkerRoleScaffoldingPath); + CsPack packTool = new CsPack(); + string standardOutput, standardError; + + //Scenario #1 we set up so cspack.exe fails (exitcode is 1), but gives out the error through standardOutput. + Mock commandRunner = new Mock(); + commandRunner.Setup(p => p.StartAndWaitForProcess(It.IsAny(), It.IsAny())) + .Callback(() => { + commandRunner.Object.StandardOutput = sampleError; + commandRunner.Object.StandardError = ""; + commandRunner.Object.ExitCode = 1; + }); + packTool.ProcessUtil = commandRunner.Object; + + //action + packTool.CreatePackage(service.Components.Definition, service.Paths, DevEnv.Local, fakedSDKBinPath, out standardOutput, out standardError); + + //assert we take "standardoutput" as the error message + Assert.Equal(sampleError, standardError); + + //Scenario #2: set up so cspack.exe succeed (exitcode is 0) + commandRunner = new Mock(); + commandRunner.Setup(p => p.StartAndWaitForProcess(It.IsAny(), It.IsAny())) + .Callback(() => + { + commandRunner.Object.StandardOutput = sampleError; + commandRunner.Object.StandardError = string.Empty; + commandRunner.Object.ExitCode = 0; + }); + packTool.ProcessUtil = commandRunner.Object; + + //action + packTool.CreatePackage(service.Components.Definition, service.Paths, DevEnv.Local, fakedSDKBinPath, out standardOutput, out standardError); + + //assert, we outputs no error + Assert.Equal(string.Empty, standardError); + + //Sceanrio 3: set up so cspack.exe failed (exitcode is 1), but gives out no ouput and error + commandRunner = new Mock(); + commandRunner.Setup(p => p.StartAndWaitForProcess(It.IsAny(), It.IsAny())) + .Callback(() => + { + commandRunner.Object.StandardOutput = string.Empty; + commandRunner.Object.StandardError = string.Empty; + commandRunner.Object.ExitCode = 1; + }); + packTool.ProcessUtil = commandRunner.Object; + + //action + packTool.CreatePackage(service.Components.Definition, service.Paths, DevEnv.Local, fakedSDKBinPath, out standardOutput, out standardError); + + //assert, we output a generic error message + Assert.Equal(Resources.CsPackExeGenericFailure, standardError); + } + finally + { + Directory.Delete(stagingFolder, true); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/CsRunTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/CsRunTests.cs new file mode 100644 index 000000000000..80d9d0cb6a1c --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/CsRunTests.cs @@ -0,0 +1,89 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Xunit; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService.AzureTools; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Utilities +{ + + public class CsRunTests : TestBase + { + [Fact] + public void RoleInfoIsExtractedFromEmulatorOutput() + { + var dummyEmulatorOutput = "Exported interface at http://127.0.0.1:81/.\r\nExported interface at tcp://127.0.0.1:8080/."; + var output = CsRun.GetRoleInfoMessage(dummyEmulatorOutput); + Assert.True(output.Contains("Role is running at http://127.0.0.1:81")); + Assert.True(output.Contains("Role is running at tcp://127.0.0.1:8080")); + } + + [Fact] + public void StartEmulatorUsingExpressMode_VerifyCommandLine() + { + StartEmulatorCommonTest(ComputeEmulatorMode.Express); + } + + [Fact] + public void StartEmulatorUsingFullMode_VerifyCommandLine() + { + StartEmulatorCommonTest(ComputeEmulatorMode.Full); + } + + private void StartEmulatorCommonTest(ComputeEmulatorMode mode) + { + // Setup + string testEmulatorFolder = @"C:\sample-path"; + string testPackagePath = @"c:\sample-path\local_package.csx"; + string testConfigPath = @"c:\sample-path\ServiceConfiguration.Local.cscfg"; + string expectedCsrunCommand = testEmulatorFolder + @"\" + Resources.CsRunExe; + string expectedComputeArguments = Resources.CsRunStartComputeEmulatorArg; + string expectedRemoveAllDeploymentsArgument = Resources.CsRunRemoveAllDeploymentsArg; + string expectedAzureProjectArgument = string.Format("/run:\"{0}\";\"{1}\" {2} /useiisexpress", + testPackagePath, testConfigPath, Resources.CsRunLanuchBrowserArg); + if (mode== ComputeEmulatorMode.Full) + { + expectedComputeArguments += " " + Resources.CsRunFullEmulatorArg; + expectedAzureProjectArgument += " " + Resources.CsRunFullEmulatorArg; + } + + string testRoleUrl = "http://127.0.0.1:8080/"; + int testDeploymentId = 58; + string testOutput = string.Format("Started: deployment23({0}) Role is running at " + testRoleUrl + ".", testDeploymentId.ToString()); + string expectedRoleRunningMessage = string.Format(Resources.EmulatorRoleRunningMessage, testRoleUrl) + System.Environment.NewLine; + + CsRun csRun = new CsRun(testEmulatorFolder); + Mock commandRunner = new Mock(); + commandRunner.Setup(p => p.StartAndWaitForProcess(expectedCsrunCommand, expectedComputeArguments)); + commandRunner.Setup(p => p.StartAndWaitForProcess(expectedCsrunCommand, expectedRemoveAllDeploymentsArgument)); + commandRunner.Setup(p => p.StartAndWaitForProcess(expectedCsrunCommand, expectedAzureProjectArgument)) + .Callback(() => { commandRunner.Object.StandardOutput = testOutput; }); + + // Execute + csRun.CommandRunner = commandRunner.Object; + + csRun.StartEmulator(testPackagePath, testConfigPath, true, mode); + + // Assert + commandRunner.VerifyAll(); + Assert.Equal(csRun.DeploymentId, testDeploymentId); + Assert.Equal(csRun.RoleInformation, expectedRoleRunningMessage); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/GeneralTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/GeneralTests.cs new file mode 100644 index 000000000000..31425f73bd46 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/GeneralTests.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System.IO; +using Xunit; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Utilities +{ + + public class GeneralTests : TestBase + { + [Fact] + public void SerializationTestWithGB18030() + { + // Setup + string outputFileName = "outputFile.txt"; + ServiceDefinition serviceDefinition = XmlUtilities.DeserializeXmlFile( + Testing.GetTestResourcePath("GB18030ServiceDefinition.csdef")); + + // Test + File.Create(outputFileName).Close(); + XmlUtilities.SerializeXmlFile(serviceDefinition, outputFileName); + + // Assert + // And check we are writing out with UTF encoding with a BOM + byte[] data = System.IO.File.ReadAllBytes(outputFileName); + Assert.True(data[0] == 0xff && data[1] == 0xfe); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/PublishContextTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/PublishContextTests.cs new file mode 100644 index 000000000000..996c4b7bd747 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/PublishContextTests.cs @@ -0,0 +1,270 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Linq; +using Xunit; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Utilities +{ + + public class PublishContextTests : TestBase, IDisposable + { + private static AzureServiceWrapper service; + + private static string packagePath; + + private static string configPath; + + private static ServiceSettings settings; + + private string rootPath = "serviceRootPath"; + + /// + /// When running this test double check that the certificate used in Azure.PublishSettings has not expired. + /// + public PublishContextTests() + { + AzurePowerShell.ProfileDirectory = Test.Utilities.Common.Data.AzureSdkAppDir; + service = new AzureServiceWrapper(Directory.GetCurrentDirectory(), Path.GetRandomFileName(), null); + service.CreateVirtualCloudPackage(); + packagePath = service.Paths.CloudPackage; + configPath = service.Paths.CloudConfiguration; + settings = ServiceSettingsTestData.Instance.Data[ServiceSettingsState.Default]; + ProfileClient.DataStore = new MockDataStore(); + ProfileClient client = new ProfileClient(); + ProfileClient.DataStore.WriteFile(Test.Utilities.Common.Data.ValidPublishSettings.First(), + File.ReadAllText(Test.Utilities.Common.Data.ValidPublishSettings.First())); + client.ImportPublishSettings(Test.Utilities.Common.Data.ValidPublishSettings.First(), null); + client.Profile.Save(); + } + + public void TestCleanup() + { + ProfileClient.DataStore = new MockDataStore(); + if (Directory.Exists(Test.Utilities.Common.Data.AzureSdkAppDir)) + { + new RemoveAzurePublishSettingsCommand().RemovePublishSettingsProcess(Test.Utilities.Common.Data.AzureSdkAppDir); + } + } + + #region settings + + [Fact] + public void TestDeploymentSettingsTestWithDefaultServiceSettings() + { + string label = "MyLabel"; + string deploymentName = service.ServiceName; + settings.Subscription = "TestSubscription2"; + PublishContext deploySettings = new PublishContext( + settings, + packagePath, + configPath, + label, + deploymentName, + rootPath); + + AzureAssert.AreEqualPublishContext(settings, configPath, deploymentName, label, packagePath, "f62b1e05-af8f-4205-8f98-325079adc155", deploySettings); + } + + [Fact] + public void TestDeploymentSettingsTestWithFullServiceSettings() + { + string label = "MyLabel"; + string deploymentName = service.ServiceName; + ServiceSettings fullSettings = ServiceSettingsTestData.Instance.Data[ServiceSettingsState.Sample1]; + PublishContext deploySettings = new PublishContext( + fullSettings, + packagePath, + configPath, + label, + deploymentName, + rootPath); + + AzureAssert.AreEqualPublishContext( + fullSettings, + configPath, + deploymentName, + label, + packagePath, + "f62b1e05-af8f-4205-8f98-325079adc155", + deploySettings); + } + + [Fact] + public void TestDeploymentSettingsTestNullSettingsFail() + { + string label = "MyLabel"; + string deploymentName = service.ServiceName; + + try + { + PublishContext deploySettings = new PublishContext( + null, + packagePath, + configPath, + label, + deploymentName, + rootPath); + Assert.True(false, "No exception was thrown"); + } + catch (Exception ex) + { + Assert.True(ex is ArgumentException); + Assert.Equal(Resources.InvalidServiceSettingMessage, ex.Message); + } + } + + #endregion + + #region packagePath + + [Fact] + public void TestDeploymentSettingsTestEmptyPackagePathFail() + { + string label = "MyLabel"; + string deploymentName = service.ServiceName; + string expectedMessage = string.Format(Resources.InvalidOrEmptyArgumentMessage, "packagePath"); + + Testing.AssertThrows(() => new PublishContext( + settings, + string.Empty, + configPath, + label, + deploymentName, + rootPath), expectedMessage); + } + + [Fact] + public void TestDeploymentSettingsTestNullPackagePathFail() + { + string label = "MyLabel"; + string deploymentName = service.ServiceName; + string expectedMessage = string.Format(Resources.InvalidOrEmptyArgumentMessage, "packagePath"); + + Testing.AssertThrows(() => new PublishContext( + settings, + null, + configPath, + label, + deploymentName, + rootPath), expectedMessage); + } + + #endregion + + #region configPath + + [Fact] + public void TestDeploymentSettingsTestEmptyConfigPathFail() + { + string label = "MyLabel"; + string deploymentName = service.ServiceName; + string expectedMessage = string.Format(Resources.InvalidOrEmptyArgumentMessage, Resources.ServiceConfiguration); + + Testing.AssertThrows(() => new PublishContext( + settings, + packagePath, + string.Empty, + label, + deploymentName, + rootPath), expectedMessage); + } + + [Fact] + public void TestDeploymentSettingsTestNullConfigPathFail() + { + string label = "MyLabel"; + string deploymentName = service.ServiceName; + string expectedMessage = string.Format(Resources.InvalidOrEmptyArgumentMessage, Resources.ServiceConfiguration); + + Testing.AssertThrows(() => new PublishContext( + settings, + packagePath, + null, + label, + deploymentName, + rootPath), expectedMessage); + } + + [Fact] + public void TestDeploymentSettingsTestDoesNotConfigPathFail() + { + string label = "MyLabel"; + string deploymentName = service.ServiceName; + string doesNotExistDir = Path.Combine(Directory.GetCurrentDirectory(), "qewindw443298.cscfg"); + + try + { + PublishContext deploySettings = new PublishContext( + settings, + packagePath, + doesNotExistDir, + label, + deploymentName, + rootPath); + Assert.True(false, "No exception was thrown"); + } + catch (Exception ex) + { + Assert.True(ex is FileNotFoundException); + Assert.Equal(string.Format(Resources.PathDoesNotExistForElement, Resources.ServiceConfiguration, doesNotExistDir), ex.Message); + } + } + + #endregion + + #region label + + [Fact] + public void TestDeploymentSettingsTestNullLabelFail() + { + string deploymentName = service.ServiceName; + + try + { + PublishContext deploySettings = new PublishContext( + settings, + packagePath, + configPath, + null, + deploymentName, + rootPath); + Assert.True(false, "No exception was thrown"); + } + catch (Exception ex) + { + Assert.True(ex is ArgumentException); + Assert.True(string.Compare( + string.Format(Resources.InvalidOrEmptyArgumentMessage, + "serviceName"), ex.Message, true) == 0); + } + } + + #endregion + + public void Dispose() + { + TestCleanup(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/ScaffoldTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/ScaffoldTests.cs new file mode 100644 index 000000000000..1a85239d1612 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/ScaffoldTests.cs @@ -0,0 +1,50 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Xunit; +using Microsoft.WindowsAzure.Commands.Common.Test.Properties; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService.Scaffolding; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Utilities +{ + + public class ScaffoldTests : TestBase + { + [Fact] + public void ParseTests() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string path = files.CreateEmptyFile("Scaffold.xml"); + FileUtilities.DataStore.WriteFile(path, Resources.ValidScaffoldXml); + + Scaffold scaffold = Scaffold.Parse(path); + + Assert.Equal(scaffold.Files.Count, 6); + Assert.Equal(scaffold.Files[0].PathExpression, "modules\\.*"); + Assert.Equal(scaffold.Files[1].Path, @"bin/node123dfx65.exe"); + Assert.Equal(scaffold.Files[1].TargetPath, @"/bin/node.exe"); + Assert.Equal(scaffold.Files[2].Path, @"bin/iisnode.dll"); + Assert.Equal(scaffold.Files[3].Path, @"bin/setup.cmd"); + Assert.Equal(scaffold.Files[4].Path, "Web.config"); + Assert.Equal(scaffold.Files[4].Rules.Count, 1); + Assert.Equal(scaffold.Files[5].Path, "WebRole.xml"); + Assert.Equal(scaffold.Files[5].Copy, false); + Assert.Equal(scaffold.Files[5].Rules.Count, 1); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/ServiceComponentsTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/ServiceComponentsTests.cs new file mode 100644 index 000000000000..7a2693d44308 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/ServiceComponentsTests.cs @@ -0,0 +1,317 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Linq; +using Xunit; +using Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Utilities +{ + public class ServiceComponentsTests : TestBase, IDisposable + { + private const string serviceName = "NodeService"; + + private NewAzureServiceProjectCommand newServiceCmdlet; + + private MockCommandRuntime mockCommandRuntime; + + public ServiceComponentsTests() + { + mockCommandRuntime = new MockCommandRuntime(); + newServiceCmdlet = new NewAzureServiceProjectCommand(); + newServiceCmdlet.CommandRuntime = mockCommandRuntime; + } + + public void TestCleanup() + { + if (Directory.Exists(serviceName)) + { + Directory.Delete(serviceName, true); + } + } + + public void Dispose() + { + TestCleanup(); + } + + [Fact] + public void ServiceComponentsTest() + { + newServiceCmdlet.NewAzureServiceProcess(Directory.GetCurrentDirectory(), serviceName); + ServiceComponents components = new ServiceComponents(new PowerShellProjectPathInfo(serviceName)); + AzureAssert.AreEqualServiceComponents(components); + } + + [Fact] + public void ServiceComponentsTestNullPathsFail() + { + try + { + ServiceComponents components = new ServiceComponents(null as CloudProjectPathInfo); + Assert.True(false, "No exception was thrown"); + } + catch (Exception ex) + { + Assert.True(ex is ArgumentException); + Assert.Equal(ex.Message, string.Format(Resources.NullObjectMessage, "paths")); + } + } + + [Fact] + public void ServiceComponentsTestCloudConfigDoesNotExistFail() + { + newServiceCmdlet.NewAzureServiceProcess(Directory.GetCurrentDirectory(), serviceName); + PowerShellProjectPathInfo paths = new PowerShellProjectPathInfo(serviceName); + + try + { + File.Delete(paths.CloudConfiguration); + ServiceComponents components = new ServiceComponents(paths); + Assert.True(false, "No exception was thrown"); + } + catch (Exception ex) + { + Assert.True(ex is FileNotFoundException); + Assert.Equal(ex.Message, string.Format(Resources.PathDoesNotExistForElement, Resources.ServiceConfiguration, paths.CloudConfiguration)); + } + } + + [Fact] + public void ServiceComponentsTestLocalConfigDoesNotExistFail() + { + newServiceCmdlet.NewAzureServiceProcess(Directory.GetCurrentDirectory(), serviceName); + PowerShellProjectPathInfo paths = new PowerShellProjectPathInfo(serviceName); + + try + { + File.Delete(paths.LocalConfiguration); + ServiceComponents components = new ServiceComponents(paths); + Assert.True(false, "No exception was thrown"); + } + catch (Exception ex) + { + Assert.True(ex is FileNotFoundException); + Assert.Equal(string.Format(Resources.PathDoesNotExistForElement, Resources.ServiceConfiguration, paths.LocalConfiguration), ex.Message); + } + } + + [Fact] + public void ServiceComponentsTestSettingsDoesNotExistFail() + { + newServiceCmdlet.NewAzureServiceProcess(Directory.GetCurrentDirectory(), serviceName); + PowerShellProjectPathInfo paths = new PowerShellProjectPathInfo(serviceName); + + try + { + File.Delete(paths.Definition); + ServiceComponents components = new ServiceComponents(paths); + Assert.True(false, "No exception was thrown"); + } + catch (Exception ex) + { + Assert.True(ex is FileNotFoundException); + Assert.Equal(string.Format(Resources.PathDoesNotExistForElement, Resources.ServiceDefinition, paths.Definition), ex.Message); + } + } + + [Fact] + public void ServiceComponentsTestDefinitionDoesNotExistFail() + { + newServiceCmdlet.NewAzureServiceProcess(Directory.GetCurrentDirectory(), serviceName); + PowerShellProjectPathInfo paths = new PowerShellProjectPathInfo(serviceName); + + try + { + File.Delete(paths.Definition); + ServiceComponents components = new ServiceComponents(paths); + Assert.True(false, "No exception was thrown"); + } + catch (Exception ex) + { + Assert.True(ex is FileNotFoundException); + Assert.Equal(string.Format(Resources.PathDoesNotExistForElement, Resources.ServiceDefinition, paths.Definition), ex.Message); + } + } + + [Fact] + public void GetNextPortAllNull() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + int expectedPort = int.Parse(Resources.DefaultWebPort); + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + int nextPort = service.Components.GetNextPort(); + Assert.Equal(expectedPort, nextPort); + } + } + + [Fact] + public void GetNextPortNodeWorkerRoleNull() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + int expectedPort = int.Parse(Resources.DefaultPort); + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + service.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); + service = new CloudServiceProject(service.Paths.RootPath, null); + int nextPort = service.Components.GetNextPort(); + Assert.Equal(expectedPort, nextPort); + } + } + + [Fact] + public void GetNextPortPHPWorkerRoleNull() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + int expectedPort = int.Parse(Resources.DefaultPort); + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + service.AddWebRole(Test.Utilities.Common.Data.PHPWebRoleScaffoldingPath); + service = new CloudServiceProject(service.Paths.RootPath, null); + int nextPort = service.Components.GetNextPort(); + Assert.Equal(expectedPort, nextPort); + } + } + + [Fact] + public void GetNextPortNodeWebRoleNull() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + int expectedPort = int.Parse(Resources.DefaultPort); + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + service.AddWorkerRole(Test.Utilities.Common.Data.NodeWorkerRoleScaffoldingPath); + service = new CloudServiceProject(service.Paths.RootPath, null); + int nextPort = service.Components.GetNextPort(); + Assert.Equal(expectedPort, nextPort); + } + } + + [Fact] + public void GetNextPortPHPWebRoleNull() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + int expectedPort = int.Parse(Resources.DefaultPort); + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + service.AddWorkerRole(Test.Utilities.Common.Data.PHPWorkerRoleScaffoldingPath); + service = new CloudServiceProject(service.Paths.RootPath, null); + int nextPort = service.Components.GetNextPort(); + Assert.Equal(expectedPort, nextPort); + } + } + + [Fact] + public void GetNextPortNullNodeWebEndpointAndNullWorkerRole() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + int expectedPort = int.Parse(Resources.DefaultWebPort); + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + service.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); + service = new CloudServiceProject(service.Paths.RootPath, null); + service.Components.Definition.WebRole.ToList().ForEach(wr => wr.Endpoints = null); + int nextPort = service.Components.GetNextPort(); + Assert.Equal(expectedPort, nextPort); + } + } + + [Fact] + public void GetNextPortNullPHPWebEndpointAndNullWorkerRole() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + int expectedPort = int.Parse(Resources.DefaultWebPort); + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + service.AddWebRole(Test.Utilities.Common.Data.PHPWebRoleScaffoldingPath); + service = new CloudServiceProject(service.Paths.RootPath, null); + service.Components.Definition.WebRole.ToList().ForEach(wr => wr.Endpoints = null); + int nextPort = service.Components.GetNextPort(); + Assert.Equal(expectedPort, nextPort); + } + } + + [Fact] + public void GetNextPortNullNodeWebEndpointAndWorkerRole() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + int expectedPort = int.Parse(Resources.DefaultPort); + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + service.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); + service.Components.Definition.WebRole.ToList().ForEach(wr => wr.Endpoints = null); + service.AddWorkerRole(Test.Utilities.Common.Data.NodeWorkerRoleScaffoldingPath); + service = new CloudServiceProject(service.Paths.RootPath, null); + int nextPort = service.Components.GetNextPort(); + Assert.Equal(expectedPort, nextPort); + } + } + + [Fact] + public void GetNextPortNullPHPWebEndpointAndWorkerRole() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + int expectedPort = int.Parse(Resources.DefaultPort); + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + service.AddWebRole(Test.Utilities.Common.Data.PHPWebRoleScaffoldingPath); + service.Components.Definition.WebRole.ToList().ForEach(wr => wr.Endpoints = null); + service.AddWorkerRole(Test.Utilities.Common.Data.PHPWorkerRoleScaffoldingPath); + service = new CloudServiceProject(service.Paths.RootPath, null); + int nextPort = service.Components.GetNextPort(); + Assert.Equal(expectedPort, nextPort); + } + } + + [Fact] + public void GetNextPortWithEmptyPortIndpoints() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + int expectedPort = int.Parse(Resources.DefaultPort); + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + service.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); + service.Components.Definition.WebRole[0].Endpoints.InputEndpoint = null; + service.Components.Save(service.Paths); + service.AddWebRole(Test.Utilities.Common.Data.PHPWebRoleScaffoldingPath); + service = new AzureServiceWrapper(service.Paths.RootPath, null); + int nextPort = service.Components.GetNextPort(); + Assert.Equal(expectedPort, nextPort); + } + } + + [Fact] + public void GetNextPortAddingThirdEndpoint() + { + using (FileSystemHelper files = new FileSystemHelper(this)) + { + int expectedPort = int.Parse(Resources.DefaultPort) + 1; + CloudServiceProject service = new CloudServiceProject(files.RootPath, serviceName, null); + service.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); + service.AddWebRole(Test.Utilities.Common.Data.PHPWebRoleScaffoldingPath); + service = new AzureServiceWrapper(service.Paths.RootPath, null); + int nextPort = service.Components.GetNextPort(); + Assert.Equal(expectedPort, nextPort); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/ServicePathInfoTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/ServicePathInfoTests.cs new file mode 100644 index 000000000000..936442b0663d --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/ServicePathInfoTests.cs @@ -0,0 +1,81 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Xunit; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Utilities +{ + + public class ServicePathInfoTests + { + [Fact] + public void ServicePathInfoTest() + { + PowerShellProjectPathInfo paths = new PowerShellProjectPathInfo("MyService"); + AzureAssert.AreEqualServicePathInfo("MyService", paths); + } + + [Fact] + public void ServicePathInfoTestEmptyRootPathFail() + { + try + { + PowerShellProjectPathInfo paths = new PowerShellProjectPathInfo(string.Empty); + Assert.True(false, "No exception was thrown"); + } + catch (Exception ex) + { + Assert.True(ex is ArgumentException); + Assert.Equal(string.Format(Resources.InvalidOrEmptyArgumentMessage, "rootPath"), ex.Message); + } + } + + [Fact] + public void ServicePathInfoTestNullRootPathFail() + { + try + { + PowerShellProjectPathInfo paths = new PowerShellProjectPathInfo(null); + Assert.True(false, "No exception was thrown"); + } + catch (Exception ex) + { + Assert.True(ex is ArgumentException); + Assert.Equal(string.Format(Resources.InvalidOrEmptyArgumentMessage, "rootPath"), ex.Message); + } + } + + [Fact] + public void ServicePathInfoTestInvalidRootPathFail() + { + foreach (string invalidDirectoryName in Test.Utilities.Common.Data.InvalidServiceRootName) + { + try + { + PowerShellProjectPathInfo paths = new PowerShellProjectPathInfo(invalidDirectoryName); + Assert.True(false, "No exception was thrown"); + } + catch (Exception ex) + { + Assert.True(ex is ArgumentException); + Assert.Equal(Resources.InvalidRootNameMessage, ex.Message); + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/ServiceSettingsTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/ServiceSettingsTests.cs new file mode 100644 index 000000000000..1405a1fd7e31 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/ServiceSettingsTests.cs @@ -0,0 +1,104 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Xunit; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Common; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Utilities +{ + + public class ServiceSettingsTests : TestBase + { + public ServiceSettingsTests() + { + AzurePowerShell.ProfileDirectory = Test.Utilities.Common.Data.AzureSdkAppDir; + } + + [Fact] + public void ServiceSettingsTest() + { + + + ServiceSettings settings = new ServiceSettings(); + AzureAssert.AreEqualServiceSettings(string.Empty, string.Empty, string.Empty, string.Empty, settings); + } + + /// + /// Verify that using an invalid storage account name throws an + /// exception. + /// + [Fact] + public void InvalidStorageAccountName() + { + // Create a temp directory that we'll use to "publish" our service + using (FileSystemHelper files = new FileSystemHelper(this) { EnableMonitoring = true }) + { + // Import our default publish settings + files.CreateAzureSdkDirectoryAndImportPublishSettings(); + + string serviceName = null; + Testing.AssertThrows(() => + ServiceSettings.LoadDefault(null, null, null, null, null, "I HAVE INVALID CHARACTERS !@#$%", null, null, out serviceName)); + Testing.AssertThrows(() => + ServiceSettings.LoadDefault(null, null, null, null, null, "ihavevalidcharsbutimjustwaytooooooooooooooooooooooooooooooooooooooooolong", null, null, out serviceName)); + } + } + + /// + /// Verify that a service name with invalid characters is correctly + /// sanitized to a storage account name. + /// + [Fact] + public void SanitizeServiceNameForStorageAccountName() + { + // Create a temp directory that we'll use to "publish" our service + using (FileSystemHelper files = new FileSystemHelper(this) { EnableMonitoring = true }) + { + // Import our default publish settings + files.CreateAzureSdkDirectoryAndImportPublishSettings(); + + string serviceName = null; + ServiceSettings settings = ServiceSettings.LoadDefault(null, null, null, null, null, null, "My-Custom-Service!", null, out serviceName); + Assert.Equal("myx2dcustomx2dservicex21", settings.StorageServiceName); + + settings = ServiceSettings.LoadDefault(null, null, null, null, null, null, "MyCustomServiceIsWayTooooooooooooooooooooooooLong", null, out serviceName); + Assert.Equal("mycustomserviceiswaytooo", settings.StorageServiceName); + } + } + + /// + /// Verify that ServicSettings will accept unknown Microsoft Azure RDFE location. + /// + [Fact] + public void GetDefaultLocationWithUnknwonLocation() + { + // Create a temp directory that we'll use to "publish" our service + using (FileSystemHelper files = new FileSystemHelper(this) { EnableMonitoring = true }) + { + // Import our default publish settings + files.CreateAzureSdkDirectoryAndImportPublishSettings(); + string serviceName = null; + string unknownLocation = "Unknown Location"; + + ServiceSettings settings = ServiceSettings.LoadDefault(null, null, unknownLocation, null, null, null, "My-Custom-Service!", null, out serviceName); + Assert.Equal(unknownLocation.ToLower(), settings.Location.ToLower()); + + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/StorageEmulatorTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/StorageEmulatorTests.cs new file mode 100644 index 000000000000..841e1e2a7c6c --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/StorageEmulatorTests.cs @@ -0,0 +1,80 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using Xunit; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService.AzureTools; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Utilities +{ + + public class StorageEmulatorTests : TestBase + { + [Fact] + public void Start_StorageEmulatorInstalled_UseCorrectCommand() + { + // Setup + string testFolder = @"c:\sample-path"; + string expectedCommand = Path.Combine(testFolder, Resources.StorageEmulatorExe); + + StorageEmulator emulator = new StorageEmulator(@"c:\sample-path"); + Mock commandRunner = new Mock(); + commandRunner.Setup(p=>p.StartAndWaitForProcess(expectedCommand, Resources.StartStorageEmulatorCommandArgument)); + emulator.CommandRunner = commandRunner.Object; + + // Execute + emulator.Start(); + + // Assert + commandRunner.Verify(); + } + + [Fact] + public void Stop_StorageEmulatorInstalled_UseCorrectCommand() + { + // Setup + string testFolder = @"c:\sample-path"; + string expectedCommand = Path.Combine(testFolder, Resources.StorageEmulatorExe); + + StorageEmulator emulator = new StorageEmulator(@"c:\sample-path"); + Mock commandRunner = new Mock(); + commandRunner.Setup(p => p.StartAndWaitForProcess(expectedCommand, Resources.StopStorageEmulatorCommandArgument)); + emulator.CommandRunner = commandRunner.Object; + + // Execute + emulator.Stop(); + + // Assert + commandRunner.Verify(); + } + + [Fact] + public void Start_StorageEmulatorNotInstalled_GetWarning() + { + // Setup + StorageEmulator emulator = new StorageEmulator(null); + Mock commandRunner = new Mock(); + + // Execute + emulator.Start(); + + // Assert + Assert.Equal(Resources.WarningWhenStorageEmulatorIsMissing, emulator.Error); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Commands.Test.csproj b/src/ServiceManagement/Services/Commands.Test/Commands.Test.csproj new file mode 100644 index 000000000000..ade95128367b --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Commands.Test.csproj @@ -0,0 +1,400 @@ + + + + Debug + AnyCPU + + + 2.0 + {B7FD03F6-98BC-4F54-9A14-0455E579FCD4} + Library + Properties + Microsoft.WindowsAzure.Commands.Test + Microsoft.WindowsAzure.Commands.Test + v4.5 + 512 + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + ..\..\..\ + true + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + false + + + OnBuildSuccess + + + bin\Release\ + TRACE;SIGN + true + pdbonly + AnyCPU + prompt + false + true + MSSharedLibKey.snk + true + true + false + + + + ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll + + + ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll + + + ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll + + + ..\..\..\packages\WindowsAzure.ServiceBus.2.3.2.0\lib\net40-full\Microsoft.ServiceBus.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + + False + ..\..\..\lib\Microsoft.Web.Deployment.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.2.1.0\lib\net40\Microsoft.WindowsAzure.Management.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.6.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.ExpressRoute.0.11.2-preview\lib\net40\Microsoft.WindowsAzure.Management.ExpressRoute.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.Management.MediaServices.1.2.0\lib\net40\Microsoft.WindowsAzure.Management.MediaServices.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.Management.ServiceBus.0.15.0-preview\lib\net40\Microsoft.WindowsAzure.Management.ServiceBus.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.3.1.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.Management.Store.0.11.0-preview\lib\net40\Microsoft.WindowsAzure.Management.Store.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.Management.TrafficManager.0.11.0-preview\lib\net40\Microsoft.WindowsAzure.Management.TrafficManager.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.WebSites.4.0.1-prerelease\lib\net40\Microsoft.WindowsAzure.Management.WebSites.dll + + + ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll + + + False + ..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll + + + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + True + + + + + + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + + ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll + + + + + + ..\..\..\packages\xunit.1.9.2\lib\net20\xunit.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PreserveNewest + + + Designer + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + Designer + PreserveNewest + + + PreserveNewest + + + Designer + PreserveNewest + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + + + {e1ca72ba-8374-45f6-904d-fd34ecdf5b6f} + Commands.ServiceManagement + + + {45c2d687-e0ce-4c97-b731-335834dc2bf2} + Commands.ExpressRoute + + + {c60342b1-47d3-4a0e-8081-9b97ce60b7af} + Commands.Profile + + + {bc420543-c04e-4bf3-96e1-cd81b823bdd7} + Commands.Test.Utilities + + + {4900ec4e-8deb-4412-9108-0bc52f81d457} + Commands.Utilities + + + {cd5aa507-f5ef-473d-855b-84b91a1abe54} + Commands + + + {3b48a77b-5956-4a62-9081-92ba04b02b27} + Commands.Common.Test + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + + + PreserveNewest + + + PreserveNewest + + + Designer + PreserveNewest + + + + + + + + + + + + xcopy "$(SolutionDir)Package\$(ConfigurationName)\*.*" $(TargetDir) /Y /E + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Common/CmdletExtensionsTest.cs b/src/ServiceManagement/Services/Commands.Test/Common/CmdletExtensionsTest.cs new file mode 100644 index 000000000000..5a9eaeebb446 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Common/CmdletExtensionsTest.cs @@ -0,0 +1,40 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Xunit; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.Test.Common +{ + + public class CmdletExtensionsTest + { + [Fact] + public void ResolvePathTest() + { + StubCmdlet stubCmdlet = new StubCmdlet(); + + // Null path + Assert.Equal(null, stubCmdlet.ResolvePath(null)); + + // No session state + Assert.Equal(".\\", stubCmdlet.ResolvePath(".\\")); + } + } + + internal class StubCmdlet : PSCmdlet + { + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/Common/DeltaMapperTests.cs b/src/ServiceManagement/Services/Commands.Test/Common/DeltaMapperTests.cs new file mode 100644 index 000000000000..058d3d5a39c4 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Common/DeltaMapperTests.cs @@ -0,0 +1,112 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Xunit; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.Test.Common +{ + + public class DeltaMapperTests + { + class SourceClass + { + public int? A { get; set; } + public bool? B { get; set; } + public string C { get; set; } + public double Excluded { get; set; } + } + + class RefClass + { + public int? A { get; set; } + public string C { get; set; } + } + + class DestClass + { + public int? A { get; set; } + public bool? B { get; set; } + public string C { get; set; } + } + + [Fact] + public void MappingWithNoChangesReturnsFalse() + { + var src = new SourceClass + { + A = 1, + B = true, + C = "hello", + Excluded = 42.0 + }; + + var reference = new RefClass + { + A = 1, + C = "hello" + }; + + var dest = new DestClass(); + + bool changes = ObjectDeltaMapper.Map(src, reference, dest, "Excluded"); + Assert.False(changes); + } + + [Fact] + public void MappingWithChangeCopiesChangedProperties() + { + var src = new SourceClass + { + A = 1, + B = true, + C = "hello", + Excluded = 42.0 + }; + + var reference = new RefClass + { + A = 4, + C = "hello" + }; + + var dest = new DestClass(); + + bool changes = ObjectDeltaMapper.Map(src, reference, dest, "Excluded"); + Assert.True(changes); + Assert.Equal(1, dest.A); + Assert.Null(dest.C); + } + + [Fact] + public void NullSourcePropertyIsNotAChange() + { + var src = new SourceClass + { + A = null, + C = "hello" + }; + + var reference = new RefClass + { + A = 4, + C = "hello" + }; + + var dest = new DestClass(); + bool changes = ObjectDeltaMapper.Map(src, reference, dest); + Assert.False(changes); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/Common/GeneralTest.cs b/src/ServiceManagement/Services/Commands.Test/Common/GeneralTest.cs new file mode 100644 index 000000000000..c00b296c9d33 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Common/GeneralTest.cs @@ -0,0 +1,64 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using Xunit; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.Test.Common +{ + + public class GeneralTests : IDisposable + { + private const string _publishSettingsUrl = "http://manage.windowsazure.com/"; + private const string _azureHostNameSuffix = "the suffix"; + + public GeneralTests() + { + // Set test environment variables + System.Environment.SetEnvironmentVariable(Resources.PublishSettingsUrlEnv, _publishSettingsUrl); + } + + public void ClassCleanup() + { + // Delete test environment variables + System.Environment.SetEnvironmentVariable(Resources.PublishSettingsUrlEnv, null); + } + + [Fact] + public void TestBlobEndpointUri() + { + string accountName = "azure awesome account"; + string expected = string.Format(Resources.BlobEndpointUri, accountName); + string actual = string.Format(CultureInfo.InvariantCulture, + TryGetEnvironmentVariable(Resources.BlobEndpointUriEnv, Resources.BlobEndpointUri), + accountName); + + Assert.Equal(expected, actual); + } + + private static string TryGetEnvironmentVariable(string environmentVariableName, string defaultValue) + { + string value = System.Environment.GetEnvironmentVariable(environmentVariableName); + return (string.IsNullOrEmpty(value)) ? defaultValue : value; + } + + public void Dispose() + { + ClassCleanup(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Environment/AddAzureEnvironmentTests.cs b/src/ServiceManagement/Services/Commands.Test/Environment/AddAzureEnvironmentTests.cs new file mode 100644 index 000000000000..0a18681f19cd --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Environment/AddAzureEnvironmentTests.cs @@ -0,0 +1,162 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Reflection; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Profile; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Moq; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.Test.Environment +{ + public class AddAzureEnvironmentTests : TestBase, IDisposable + { + private MockDataStore dataStore; + + public AddAzureEnvironmentTests() + { + dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + } + + public void Cleanup() + { + AzureSession.SetCurrentContext(null, null, null); + } + + [Fact] + public void AddsAzureEnvironment() + { + Mock commandRuntimeMock = new Mock(); + AddAzureEnvironmentCommand cmdlet = new AddAzureEnvironmentCommand() + { + CommandRuntime = commandRuntimeMock.Object, + Name = "Katal", + PublishSettingsFileUrl = "http://microsoft.com", + ServiceEndpoint = "endpoint.net", + ManagementPortalUrl = "management portal url", + StorageEndpoint = "endpoint.net", + GalleryEndpoint = "http://galleryendpoint.com" + }; + cmdlet.InvokeBeginProcessing(); + cmdlet.ExecuteCmdlet(); + cmdlet.InvokeEndProcessing(); + + commandRuntimeMock.Verify(f => f.WriteObject(It.IsAny()), Times.Once()); + ProfileClient client = new ProfileClient(); + AzureEnvironment env = client.GetEnvironmentOrDefault("KaTaL"); + Assert.Equal(env.Name, cmdlet.Name); + Assert.Equal(env.Endpoints[AzureEnvironment.Endpoint.PublishSettingsFileUrl], cmdlet.PublishSettingsFileUrl); + Assert.Equal(env.Endpoints[AzureEnvironment.Endpoint.ServiceManagement], cmdlet.ServiceEndpoint); + Assert.Equal(env.Endpoints[AzureEnvironment.Endpoint.ManagementPortalUrl], cmdlet.ManagementPortalUrl); + Assert.Equal(env.Endpoints[AzureEnvironment.Endpoint.Gallery], "http://galleryendpoint.com"); + } + + [Fact] + public void AddsEnvironmentWithMinimumInformation() + { + Mock commandRuntimeMock = new Mock(); + AddAzureEnvironmentCommand cmdlet = new AddAzureEnvironmentCommand() + { + CommandRuntime = commandRuntimeMock.Object, + Name = "Katal", + PublishSettingsFileUrl = "http://microsoft.com" + }; + + cmdlet.InvokeBeginProcessing(); + cmdlet.ExecuteCmdlet(); + cmdlet.InvokeEndProcessing(); + + commandRuntimeMock.Verify(f => f.WriteObject(It.IsAny()), Times.Once()); + ProfileClient client = new ProfileClient(); + AzureEnvironment env = client.Profile.Environments["KaTaL"]; + Assert.Equal(env.Name, cmdlet.Name); + Assert.Equal(env.Endpoints[AzureEnvironment.Endpoint.PublishSettingsFileUrl], cmdlet.PublishSettingsFileUrl); + } + + [Fact] + public void IgnoresAddingDuplicatedEnvironment() + { + Mock commandRuntimeMock = new Mock(); + AddAzureEnvironmentCommand cmdlet = new AddAzureEnvironmentCommand() + { + CommandRuntime = commandRuntimeMock.Object, + Name = "Katal", + PublishSettingsFileUrl = "http://microsoft.com", + ServiceEndpoint = "endpoint.net", + ManagementPortalUrl = "management portal url", + StorageEndpoint = "endpoint.net" + }; + cmdlet.InvokeBeginProcessing(); + cmdlet.ExecuteCmdlet(); + cmdlet.InvokeEndProcessing(); + ProfileClient client = new ProfileClient(); + int count = client.Profile.Environments.Count; + + // Add again + cmdlet.Name = "kAtAl"; + Testing.AssertThrows(() => cmdlet.ExecuteCmdlet()); + } + + [Fact] + public void IgnoresAddingPublicEnvironment() + { + Mock commandRuntimeMock = new Mock(); + AddAzureEnvironmentCommand cmdlet = new AddAzureEnvironmentCommand() + { + CommandRuntime = commandRuntimeMock.Object, + Name = EnvironmentName.AzureCloud, + PublishSettingsFileUrl = "http://microsoft.com" + }; + + Testing.AssertThrows(() => cmdlet.ExecuteCmdlet()); + } + + [Fact] + public void AddsEnvironmentWithStorageEndpoint() + { + Mock commandRuntimeMock = new Mock(); + PSObject actual = null; + commandRuntimeMock.Setup(f => f.WriteObject(It.IsAny())) + .Callback((object output) => actual = (PSObject)output); + AddAzureEnvironmentCommand cmdlet = new AddAzureEnvironmentCommand() + { + CommandRuntime = commandRuntimeMock.Object, + Name = "Katal", + PublishSettingsFileUrl = "http://microsoft.com", + StorageEndpoint = "core.windows.net" + }; + + cmdlet.InvokeBeginProcessing(); + cmdlet.ExecuteCmdlet(); + cmdlet.InvokeEndProcessing(); + + commandRuntimeMock.Verify(f => f.WriteObject(It.IsAny()), Times.Once()); + ProfileClient client = new ProfileClient(); + AzureEnvironment env = client.Profile.Environments["KaTaL"]; + Assert.Equal(env.Name, cmdlet.Name); + Assert.Equal(env.Endpoints[AzureEnvironment.Endpoint.PublishSettingsFileUrl], actual.GetVariableValue(AzureEnvironment.Endpoint.PublishSettingsFileUrl.ToString())); + } + public void Dispose() + { + Cleanup(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Environment/GetAzureEnvironmentTests.cs b/src/ServiceManagement/Services/Commands.Test/Environment/GetAzureEnvironmentTests.cs new file mode 100644 index 000000000000..86cd58ef51b7 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Environment/GetAzureEnvironmentTests.cs @@ -0,0 +1,79 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Profile; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Moq; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.Test.Environment +{ + public class GetAzureEnvironmentTests : TestBase + { + private MockDataStore dataStore; + + public GetAzureEnvironmentTests() + { + dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + } + + [Fact] + public void GetsAzureEnvironments() + { + List environments = null; + Mock commandRuntimeMock = new Mock(); + commandRuntimeMock.Setup(c => c.WriteObject(It.IsAny(), It.IsAny())) + .Callback((e, _) => environments = (List)e); + + GetAzureEnvironmentCommand cmdlet = new GetAzureEnvironmentCommand() + { + CommandRuntime = commandRuntimeMock.Object + }; + + cmdlet.InvokeBeginProcessing(); + cmdlet.ExecuteCmdlet(); + cmdlet.InvokeEndProcessing(); + + Assert.Equal(2, environments.Count); + } + + [Fact] + public void GetsAzureEnvironment() + { + List environments = null; + Mock commandRuntimeMock = new Mock(); + commandRuntimeMock.Setup(c => c.WriteObject(It.IsAny(), It.IsAny())) + .Callback((e, _) => environments = (List)e); + + GetAzureEnvironmentCommand cmdlet = new GetAzureEnvironmentCommand() + { + CommandRuntime = commandRuntimeMock.Object, + Name = EnvironmentName.AzureChinaCloud + }; + + cmdlet.InvokeBeginProcessing(); + cmdlet.ExecuteCmdlet(); + cmdlet.InvokeEndProcessing(); + + Assert.Equal(1, environments.Count); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Environment/RemoveAzureEnvironmentTests.cs b/src/ServiceManagement/Services/Commands.Test/Environment/RemoveAzureEnvironmentTests.cs new file mode 100644 index 000000000000..bb5af475b2be --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Environment/RemoveAzureEnvironmentTests.cs @@ -0,0 +1,115 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Profile; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Moq; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.Test.Environment +{ + public class RemoveAzureEnvironmentTests : TestBase, IDisposable + { + private MockDataStore dataStore; + + public RemoveAzureEnvironmentTests() + { + dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + } + + public void Cleanup() + { + AzureSession.SetCurrentContext(null, null, null); + } + + [Fact] + public void RemovesAzureEnvironment() + { + var commandRuntimeMock = new Mock(); + commandRuntimeMock.Setup(f => f.ShouldProcess(It.IsAny(), It.IsAny())).Returns(true); + + const string name = "test"; + ProfileClient client = new ProfileClient(); + client.AddOrSetEnvironment(new AzureEnvironment + { + Name = name + }); + client.Profile.Save(); + + var cmdlet = new RemoveAzureEnvironmentCommand() + { + CommandRuntime = commandRuntimeMock.Object, + Force = true, + Name = name + }; + + cmdlet.InvokeBeginProcessing(); + cmdlet.ExecuteCmdlet(); + cmdlet.InvokeEndProcessing(); + + client = new ProfileClient(); + Assert.False(client.Profile.Environments.ContainsKey(name)); + } + + [Fact] + public void ThrowsForUnknownEnvironment() + { + Mock commandRuntimeMock = new Mock(); + commandRuntimeMock.Setup(f => f.ShouldProcess(It.IsAny(), It.IsAny())).Returns(true); + + RemoveAzureEnvironmentCommand cmdlet = new RemoveAzureEnvironmentCommand() + { + CommandRuntime = commandRuntimeMock.Object, + Name = "test2", + Force = true + }; + + cmdlet.InvokeBeginProcessing(); + Assert.Throws(() => cmdlet.ExecuteCmdlet()); + } + + [Fact] + public void ThrowsForPublicEnvironment() + { + Mock commandRuntimeMock = new Mock(); + commandRuntimeMock.Setup(f => f.ShouldProcess(It.IsAny(), It.IsAny())).Returns(true); + + foreach (string name in AzureEnvironment.PublicEnvironments.Keys) + { + RemoveAzureEnvironmentCommand cmdlet = new RemoveAzureEnvironmentCommand() + { + CommandRuntime = commandRuntimeMock.Object, + Force = true, + Name = name + }; + + cmdlet.InvokeBeginProcessing(); + Assert.Throws(() => cmdlet.ExecuteCmdlet()); + } + } + + public void Dispose() + { + Cleanup(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Environment/SetAzureEnvironmentTests.cs b/src/ServiceManagement/Services/Commands.Test/Environment/SetAzureEnvironmentTests.cs new file mode 100644 index 000000000000..c98fbb613994 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Environment/SetAzureEnvironmentTests.cs @@ -0,0 +1,103 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Xunit; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Profile; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.Environment +{ + + public class SetAzureEnvironmentTests : TestBase, IDisposable + { + private MockDataStore dataStore; + + public SetAzureEnvironmentTests() + { + dataStore = new MockDataStore(); + ProfileClient.DataStore = dataStore; + } + + public void Cleanup() + { + AzureSession.SetCurrentContext(null, null, null); + } + + [Fact] + public void SetsAzureEnvironment() + { + Mock commandRuntimeMock = new Mock(); + string name = "Katal"; + ProfileClient client = new ProfileClient(); + client.AddOrSetEnvironment(new AzureEnvironment { Name = name }); + + SetAzureEnvironmentCommand cmdlet = new SetAzureEnvironmentCommand() + { + CommandRuntime = commandRuntimeMock.Object, + Name = "KATaL", + PublishSettingsFileUrl = "http://microsoft.com", + ServiceEndpoint = "endpoint.net", + ManagementPortalUrl = "management portal url", + StorageEndpoint = "endpoint.net", + GalleryEndpoint = "galleryendpoint" + }; + + cmdlet.InvokeBeginProcessing(); + cmdlet.ExecuteCmdlet(); + cmdlet.InvokeEndProcessing(); + + commandRuntimeMock.Verify(f => f.WriteObject(It.IsAny()), Times.Once()); + client = new ProfileClient(); + AzureEnvironment env = client.Profile.Environments["KaTaL"]; + Assert.Equal(env.Name.ToLower(), cmdlet.Name.ToLower()); + Assert.Equal(env.Endpoints[AzureEnvironment.Endpoint.PublishSettingsFileUrl], cmdlet.PublishSettingsFileUrl); + Assert.Equal(env.Endpoints[AzureEnvironment.Endpoint.ServiceManagement], cmdlet.ServiceEndpoint); + Assert.Equal(env.Endpoints[AzureEnvironment.Endpoint.ManagementPortalUrl], cmdlet.ManagementPortalUrl); + Assert.Equal(env.Endpoints[AzureEnvironment.Endpoint.Gallery], "galleryendpoint"); + } + + [Fact] + public void ThrowsWhenSettingPublicEnvironment() + { + Mock commandRuntimeMock = new Mock(); + + foreach (string name in AzureEnvironment.PublicEnvironments.Keys) + { + SetAzureEnvironmentCommand cmdlet = new SetAzureEnvironmentCommand() + { + CommandRuntime = commandRuntimeMock.Object, + Name = name, + PublishSettingsFileUrl = "http://microsoft.com" + }; + + cmdlet.InvokeBeginProcessing(); + Assert.Throws(() => cmdlet.ExecuteCmdlet()); + } + } + + public void Dispose() + { + Cleanup(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/ExpressRoute/AzureBgpPeeringTests.cs b/src/ServiceManagement/Services/Commands.Test/ExpressRoute/AzureBgpPeeringTests.cs new file mode 100644 index 000000000000..c393bc5a5e57 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/ExpressRoute/AzureBgpPeeringTests.cs @@ -0,0 +1,319 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Net; +using System.Security.Cryptography.X509Certificates; +using System.Threading; +using System.Threading.Tasks; +using Xunit; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.ExpressRoute; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Management.ExpressRoute; +using Microsoft.WindowsAzure.Management.ExpressRoute.Models; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.ExpressRoute +{ + + public class AzureBgpPeeringTests : TestBase + { + private const string SubscriptionId = "foo"; + + private static Mock InitExpressRouteManagementClient() + { + return + (new Mock( + new CertificateCloudCredentials(SubscriptionId, new X509Certificate2(new byte[] {})), + new Uri("http://someValue"))); + } + + [Fact] + public void NewAzureBgpPeeringSuccessful() + { + // Setup + + string serviceKey = "aa28cd19-b10a-41ff-981b-53c6bbf15ead"; + UInt32 peerAsn = 64496; + string primaryPeerSubnet = "aaa"; + string secondayPeerSubnet = "bbb"; + UInt32 azureAsn = 64494; + string primaryAzurePort = "8081"; + string secondaryAzurePort = "8082"; + var state = BgpPeeringState.Enabled; + uint vlanId = 2; + var accessType = BgpPeeringAccessType.Private; + + MockCommandRuntime mockCommandRuntime = new MockCommandRuntime(); + Mock client = InitExpressRouteManagementClient(); + var bgpMock = new Mock(); + + BorderGatewayProtocolPeeringGetResponse expected = + new BorderGatewayProtocolPeeringGetResponse + { + BgpPeering = new AzureBgpPeering() + { + AzureAsn = azureAsn, + PeerAsn = peerAsn, + PrimaryAzurePort = primaryAzurePort, + PrimaryPeerSubnet = primaryPeerSubnet, + SecondaryAzurePort = secondaryAzurePort, + SecondaryPeerSubnet = secondayPeerSubnet, + State = state, + VlanId = vlanId + }, + RequestId = "", + StatusCode = new HttpStatusCode() + }; + var t = new Task(() => expected); + t.Start(); + + bgpMock.Setup( + f => + f.NewAsync(It.Is(x => x == serviceKey), + It.Is( + y => y == accessType), + It.Is( + z => + z.PeerAutonomousSystemNumber == peerAsn && z.PrimaryPeerSubnet == primaryPeerSubnet && + z.SecondaryPeerSubnet == secondayPeerSubnet && z.VirtualLanId == vlanId), + It.IsAny())) + .Returns((string sKey, BgpPeeringAccessType atype, BorderGatewayProtocolPeeringNewParameters param, CancellationToken cancellation) => t); + client.SetupGet(f => f.BorderGatewayProtocolPeerings).Returns(bgpMock.Object); + + NewAzureBGPPeeringCommand cmdlet = new NewAzureBGPPeeringCommand() + { + ServiceKey = serviceKey, + AccessType = accessType, + PeerAsn = peerAsn, + PrimaryPeerSubnet = primaryPeerSubnet, + SecondaryPeerSubnet = secondayPeerSubnet, + SharedKey = null, + VlanId = vlanId, + CommandRuntime = mockCommandRuntime, + ExpressRouteClient = new ExpressRouteClient(client.Object) + }; + + cmdlet.ExecuteCmdlet(); + + // Assert + AzureBgpPeering actual = mockCommandRuntime.OutputPipeline[0] as AzureBgpPeering; + Assert.Equal(expected.BgpPeering.State, actual.State); + Assert.Equal(expected.BgpPeering.PrimaryAzurePort, actual.PrimaryAzurePort); + } + + [Fact] + public void GetAzureBgpPeeringSuccessful() + { + // Setup + + string serviceKey = "aa28cd19-b10a-41ff-981b-53c6bbf15ead"; + UInt32 peerAsn = 64496; + string primaryPeerSubnet = "aaa"; + string secondayPeerSubnet = "bbb"; + UInt32 azureAsn = 64494; + string primaryAzurePort = "8081"; + string secondaryAzurePort = "8082"; + var state = BgpPeeringState.Enabled; + uint vlanId = 2; + var accessType = BgpPeeringAccessType.Private; + + MockCommandRuntime mockCommandRuntime = new MockCommandRuntime(); + Mock client = InitExpressRouteManagementClient(); + var bgpMock = new Mock(); + + BorderGatewayProtocolPeeringGetResponse expected = + new BorderGatewayProtocolPeeringGetResponse() + { + BgpPeering = new AzureBgpPeering() + { + AzureAsn = azureAsn, + PeerAsn = peerAsn, + PrimaryAzurePort = primaryAzurePort, + PrimaryPeerSubnet = primaryPeerSubnet, + SecondaryAzurePort = secondaryAzurePort, + SecondaryPeerSubnet = secondayPeerSubnet, + State = state, + VlanId = vlanId + }, + RequestId = "", + StatusCode = new HttpStatusCode() + }; + var t = new Task(() => expected); + t.Start(); + + bgpMock.Setup( + f => + f.GetAsync(It.Is(x => x == serviceKey), + It.Is( + y => y == accessType), + It.IsAny())) + .Returns((string sKey, BgpPeeringAccessType atype, CancellationToken cancellation) => t); + client.SetupGet(f => f.BorderGatewayProtocolPeerings).Returns(bgpMock.Object); + + GetAzureBGPPeeringCommand cmdlet = new GetAzureBGPPeeringCommand() + { + ServiceKey = serviceKey, + AccessType = accessType, + CommandRuntime = mockCommandRuntime, + ExpressRouteClient = new ExpressRouteClient(client.Object) + }; + + cmdlet.ExecuteCmdlet(); + + // Assert + AzureBgpPeering actual = mockCommandRuntime.OutputPipeline[0] as AzureBgpPeering; + Assert.Equal(expected.BgpPeering.State, actual.State); + Assert.Equal(expected.BgpPeering.PrimaryAzurePort, actual.PrimaryAzurePort); + } + + [Fact] + public void RemoveAzureBgpPeeringSuccessful() + { + // Setup + + string serviceKey = "aa28cd19-b10a-41ff-981b-53c6bbf15ead"; + BgpPeeringAccessType accessType = BgpPeeringAccessType.Private; + + MockCommandRuntime mockCommandRuntime = new MockCommandRuntime(); + Mock client = InitExpressRouteManagementClient(); + var bgpMock = new Mock(); + + ExpressRouteOperationStatusResponse expected = + new ExpressRouteOperationStatusResponse() + { + Status = ExpressRouteOperationStatus.Successful, + HttpStatusCode = HttpStatusCode.OK + }; + + var t = new Task(() => expected); + t.Start(); + + bgpMock.Setup(f => f.RemoveAsync(It.Is(sKey => sKey == serviceKey), It.Is( + y => y == accessType), + It.IsAny())) + .Returns((string sKey, BgpPeeringAccessType aType, CancellationToken cancellation) => t); + client.SetupGet(f => f.BorderGatewayProtocolPeerings).Returns(bgpMock.Object); + + RemoveAzureBGPPeeringCommand cmdlet = new RemoveAzureBGPPeeringCommand() + { + ServiceKey = serviceKey, + AccessType = accessType, + CommandRuntime = mockCommandRuntime, + ExpressRouteClient = new ExpressRouteClient(client.Object) + }; + + cmdlet.ExecuteCmdlet(); + + Assert.True(mockCommandRuntime.VerboseStream[0].Contains(serviceKey)); + } + + [Fact] + public void SetBgpPeeringSuccessful() + { + // Setup + + string serviceKey = "aa28cd19-b10a-41ff-981b-53c6bbf15ead"; + UInt32 peerAsn = 64496; + string primaryPeerSubnet = "aaa"; + string newPrimaryPeerSubnet = "ccc"; + string secondayPeerSubnet = "bbb"; + UInt32 azureAsn = 64494; + string primaryAzurePort = "8081"; + string secondaryAzurePort = "8082"; + BgpPeeringState state = BgpPeeringState.Enabled; + uint vlanId = 2; + BgpPeeringAccessType accessType = BgpPeeringAccessType.Private; + + MockCommandRuntime mockCommandRuntime = new MockCommandRuntime(); + Mock client = InitExpressRouteManagementClient(); + var bgpMock = new Mock(); + + BorderGatewayProtocolPeeringGetResponse expected = + new BorderGatewayProtocolPeeringGetResponse() + { + BgpPeering = new AzureBgpPeering() + { + AzureAsn = azureAsn, + PeerAsn = peerAsn, + PrimaryAzurePort = primaryAzurePort, + PrimaryPeerSubnet = primaryPeerSubnet, + SecondaryAzurePort = secondaryAzurePort, + SecondaryPeerSubnet = secondayPeerSubnet, + State = state, + VlanId = vlanId + }, + RequestId = "", + StatusCode = new HttpStatusCode() + }; + var t = new Task(() => expected); + t.Start(); + + BorderGatewayProtocolPeeringGetResponse expected2 = + new BorderGatewayProtocolPeeringGetResponse() + { + BgpPeering = new AzureBgpPeering() + { + AzureAsn = azureAsn, + PeerAsn = peerAsn, + PrimaryAzurePort = primaryAzurePort, + PrimaryPeerSubnet = newPrimaryPeerSubnet, + SecondaryAzurePort = secondaryAzurePort, + SecondaryPeerSubnet = secondayPeerSubnet, + State = state, + VlanId = vlanId + }, + RequestId = "", + StatusCode = new HttpStatusCode() + }; + var t2 = new Task(() => expected2); + t2.Start(); + + bgpMock.Setup( + f => + f.GetAsync(It.Is(x => x == serviceKey), + It.Is( + y => y == accessType), + It.IsAny())) + .Returns((string sKey, BgpPeeringAccessType atype, CancellationToken cancellation) => t); + + bgpMock.Setup( + f => + f.UpdateAsync(It.Is(x => x == serviceKey), + It.Is( + y => y == accessType), + It.Is(z => z.PrimaryPeerSubnet == newPrimaryPeerSubnet), + It.IsAny())) + .Returns((string sKey, BgpPeeringAccessType atype, BorderGatewayProtocolPeeringUpdateParameters param, CancellationToken cancellation) => t2); + client.SetupGet(f => f.BorderGatewayProtocolPeerings).Returns(bgpMock.Object); + + SetAzureBGPPeeringCommand cmdlet = new SetAzureBGPPeeringCommand() + { + ServiceKey = serviceKey, + AccessType = accessType, + PrimaryPeerSubnet = newPrimaryPeerSubnet, + CommandRuntime = mockCommandRuntime, + ExpressRouteClient = new ExpressRouteClient(client.Object) + }; + + cmdlet.ExecuteCmdlet(); + + // Assert + AzureBgpPeering actual = mockCommandRuntime.OutputPipeline[0] as AzureBgpPeering; + Assert.Equal(expected2.BgpPeering.PrimaryPeerSubnet, actual.PrimaryPeerSubnet); + Assert.Equal(expected.BgpPeering.PrimaryAzurePort, actual.PrimaryAzurePort); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/ExpressRoute/AzureDedicatedCircuitLinkTests.cs b/src/ServiceManagement/Services/Commands.Test/ExpressRoute/AzureDedicatedCircuitLinkTests.cs new file mode 100644 index 000000000000..9cc0f753104e --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/ExpressRoute/AzureDedicatedCircuitLinkTests.cs @@ -0,0 +1,220 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Security.Cryptography.X509Certificates; +using System.Threading; +using System.Threading.Tasks; +using Xunit; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.ExpressRoute; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Management.ExpressRoute; +using Microsoft.WindowsAzure.Management.ExpressRoute.Models; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.ExpressRoute +{ + + public class AzureDedicatedCircuitLinkTests : TestBase + { + private const string SubscriptionId = "foo"; + + private static Mock InitExpressRouteManagementClient() + { + return + (new Mock( + new CertificateCloudCredentials(SubscriptionId, new X509Certificate2(new byte[] { })), + new Uri("http://someValue"))); + } + + [Fact] + public void NewAzureDedicatedCircuitLinkSuccessful() + { + // Setup + + string serviceKey = "aa28cd19-b10a-41ff-981b-53c6bbf15ead"; + string vNetName = "DedicatedCircuitNetwork"; + + MockCommandRuntime mockCommandRuntime = new MockCommandRuntime(); + Mock client = InitExpressRouteManagementClient(); + var dclMock = new Mock(); + + DedicatedCircuitLinkGetResponse expected = + new DedicatedCircuitLinkGetResponse() + { + DedicatedCircuitLink = new AzureDedicatedCircuitLink() + { + VnetName = vNetName, + State = DedicatedCircuitLinkState.Provisioned + }, + RequestId = "", + StatusCode = new HttpStatusCode() + }; + var t = new Task(() => expected); + t.Start(); + + dclMock.Setup(f => f.NewAsync(It.Is(x => x == serviceKey), It.Is(y => y == vNetName), It.IsAny())).Returns((string sKey, string vNet, CancellationToken cancellation) => t); + client.SetupGet(f => f.DedicatedCircuitLinks).Returns(dclMock.Object); + + NewAzureDedicatedCircuitLinkCommand cmdlet = new NewAzureDedicatedCircuitLinkCommand() + { + ServiceKey = serviceKey, + VNetName = vNetName, + CommandRuntime = mockCommandRuntime, + ExpressRouteClient = new ExpressRouteClient(client.Object) + }; + + cmdlet.ExecuteCmdlet(); + + // Assert + AzureDedicatedCircuitLink actual = mockCommandRuntime.OutputPipeline[0] as AzureDedicatedCircuitLink; + Assert.Equal(expected.DedicatedCircuitLink.VnetName, actual.VnetName); + Assert.Equal(expected.DedicatedCircuitLink.State.ToString(), actual.State.ToString()); + } + + [Fact] + public void GetAzureDedicatedCircuitLinkSuccessful() + { + // Setup + + string serviceKey = "aa28cd19-b10a-41ff-981b-53c6bbf15ead"; + string vNetName = "DedicatedCircuitNetwork"; + + MockCommandRuntime mockCommandRuntime = new MockCommandRuntime(); + Mock client = InitExpressRouteManagementClient(); + var dclMock = new Mock(); + + DedicatedCircuitLinkGetResponse expected = + new DedicatedCircuitLinkGetResponse() + { + DedicatedCircuitLink = new AzureDedicatedCircuitLink() + { + VnetName = vNetName, + State = DedicatedCircuitLinkState.Provisioned + }, + RequestId = "", + StatusCode = new HttpStatusCode() + }; + var t = new Task(() => expected); + t.Start(); + + dclMock.Setup(f => f.GetAsync(It.Is(skey => skey == serviceKey), It.Is(vnet => vnet == vNetName), It.IsAny())).Returns((string skey, string vnet, CancellationToken cancellation) => t); + client.SetupGet(f => f.DedicatedCircuitLinks).Returns(dclMock.Object); + + GetAzureDedicatedCircuitLinkCommand cmdlet = new GetAzureDedicatedCircuitLinkCommand() + { + ServiceKey = serviceKey, + VNetName = vNetName, + CommandRuntime = mockCommandRuntime, + ExpressRouteClient = new ExpressRouteClient(client.Object) + }; + + cmdlet.ExecuteCmdlet(); + + // Assert + AzureDedicatedCircuitLink actual = mockCommandRuntime.OutputPipeline[0] as AzureDedicatedCircuitLink; + Assert.Equal(expected.DedicatedCircuitLink.VnetName, actual.VnetName); + Assert.Equal(expected.DedicatedCircuitLink.State.ToString(), actual.State.ToString()); + + } + + [Fact] + public void RemoveAzureDedicatedCircuitSuccessful() + { + string serviceKey = "aa28cd19-b10a-41ff-981b-53c6bbf15ead"; + string vNetName = "DedicatedCircuitNetwork"; + ExpressRouteOperationStatusResponse expected = + new ExpressRouteOperationStatusResponse() + { + Status = ExpressRouteOperationStatus.Successful, + HttpStatusCode = HttpStatusCode.OK + }; + + MockCommandRuntime mockCommandRuntime = new MockCommandRuntime(); + Mock client = InitExpressRouteManagementClient(); + var dclMock = new Mock(); + + var t = new Task(() => expected); + t.Start(); + + dclMock.Setup(f => f.RemoveAsync(It.Is(sKey => sKey == serviceKey), It.Is(vnet => vnet == vNetName), It.IsAny())).Returns((string sKey, string vnet, CancellationToken cancellation) => t); + client.SetupGet(f => f.DedicatedCircuitLinks).Returns(dclMock.Object); + + RemoveAzureDedicatedCircuitLinkCommand cmdlet = new RemoveAzureDedicatedCircuitLinkCommand() + { + ServiceKey = serviceKey, + VNetName = vNetName, + CommandRuntime = mockCommandRuntime, + ExpressRouteClient = new ExpressRouteClient(client.Object) + }; + + cmdlet.ExecuteCmdlet(); + + Assert.True(mockCommandRuntime.VerboseStream[0].Contains(serviceKey)); + } + + + + [Fact] + public void ListAzureDedicatedCircuitLinkSuccessful() + { + // Setup + + + string serviceKey = "aa28cd19-b10a-41ff-981b-53c6bbf15ead"; + + string vnet1 = "DedicatedCircuitNetwork"; + string vnet2 = "AzureNetwork"; + + MockCommandRuntime mockCommandRuntime = new MockCommandRuntime(); + Mock client = InitExpressRouteManagementClient(); + var dclMock = new Mock(); + + List dedicatedCircuitLinks = new List(){ + new AzureDedicatedCircuitLink(){ VnetName = vnet1, State = DedicatedCircuitLinkState.Provisioned}, + new AzureDedicatedCircuitLink(){ VnetName = vnet2, State = DedicatedCircuitLinkState.NotProvisioned}}; + + DedicatedCircuitLinkListResponse expected = + new DedicatedCircuitLinkListResponse() + { + DedicatedCircuitLinks = dedicatedCircuitLinks, + StatusCode = HttpStatusCode.OK + }; + + var t = new Task(() => expected); + t.Start(); + + dclMock.Setup(f => f.ListAsync(It.Is(skey => skey == serviceKey), It.IsAny())).Returns((string skey, CancellationToken cancellation) => t); + client.SetupGet(f => f.DedicatedCircuitLinks).Returns(dclMock.Object); + + GetAzureDedicatedCircuitLinkCommand cmdlet = new GetAzureDedicatedCircuitLinkCommand() + { + ServiceKey = serviceKey, + CommandRuntime = mockCommandRuntime, + ExpressRouteClient = new ExpressRouteClient(client.Object) + }; + + cmdlet.ExecuteCmdlet(); + + // Assert + IEnumerable actual = + mockCommandRuntime.OutputPipeline[0] as IEnumerable; + Assert.Equal(actual.ToArray().Count(), 2); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/ExpressRoute/AzureDedicatedCircuitServiceProviderTests.cs b/src/ServiceManagement/Services/Commands.Test/ExpressRoute/AzureDedicatedCircuitServiceProviderTests.cs new file mode 100644 index 000000000000..3817d53b166d --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/ExpressRoute/AzureDedicatedCircuitServiceProviderTests.cs @@ -0,0 +1,121 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Security.Cryptography.X509Certificates; +using System.Threading; +using System.Threading.Tasks; +using Xunit; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.ExpressRoute; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Management.ExpressRoute; +using Microsoft.WindowsAzure.Management.ExpressRoute.Models; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.ExpressRoute +{ + + public class AzureDedicatedCircuitServiceProviderTests : TestBase + { + private const string SubscriptionId = "foo"; + + private static Mock InitExpressRouteManagementClient() + { + return + (new Mock( + new CertificateCloudCredentials(SubscriptionId, new X509Certificate2(new byte[] { })), + new Uri("http://someValue"))); + } + + [Fact] + public void ListAzureDedicatedCircuitServiceProviderSuccessful() + { + // Setup + + var serviceProviderName = "TestServiceProvider1"; + var serviceProviderName2 = "TestServiceProvier2"; + var type1 = "IXP"; + var type2 = "Telco"; + + MockCommandRuntime mockCommandRuntime = new MockCommandRuntime(); + Mock client = InitExpressRouteManagementClient(); + var dcsMock = new Mock(); + + List + dedicatedCircuitServiceProviders = new List + () + { + new AzureDedicatedCircuitServiceProvider() + { + DedicatedCircuitBandwidths = + new DedicatedCircuitBandwidth[1] + { + new DedicatedCircuitBandwidth() + { + Bandwidth = 10, + Label = "T1" + } + }, + DedicatedCircuitLocations = "us-west", + Name = serviceProviderName, + Type = type1 + }, + new AzureDedicatedCircuitServiceProvider() + { + DedicatedCircuitBandwidths = + new DedicatedCircuitBandwidth[1] + { + new DedicatedCircuitBandwidth() + { + Bandwidth = 10, + Label = "T1" + } + }, + DedicatedCircuitLocations = "us-west", + Name = serviceProviderName2, + Type = type2 + } + }; + DedicatedCircuitServiceProviderListResponse expected = + new DedicatedCircuitServiceProviderListResponse() + { + DedicatedCircuitServiceProviders = dedicatedCircuitServiceProviders, + StatusCode = HttpStatusCode.OK + }; + + var t = new Task(() => expected); + t.Start(); + + dcsMock.Setup(f => f.ListAsync(It.IsAny())).Returns((CancellationToken cancellation) => t); + client.SetupGet(f => f.DedicatedCircuitServiceProviders).Returns(dcsMock.Object); + + GetAzureDedicatedCircuitServiceProviderCommand cmdlet = new GetAzureDedicatedCircuitServiceProviderCommand() + { + CommandRuntime = mockCommandRuntime, + ExpressRouteClient = new ExpressRouteClient(client.Object) + }; + + cmdlet.ExecuteCmdlet(); + + // Assert + IEnumerable actual = + mockCommandRuntime.OutputPipeline[0] as IEnumerable; + Assert.Equal(actual.ToArray().Count(), 2); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/ExpressRoute/AzureDedicatedCircuitTests.cs b/src/ServiceManagement/Services/Commands.Test/ExpressRoute/AzureDedicatedCircuitTests.cs new file mode 100644 index 000000000000..5d3a73aba636 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/ExpressRoute/AzureDedicatedCircuitTests.cs @@ -0,0 +1,248 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Security.Cryptography.X509Certificates; +using System.Threading; +using System.Threading.Tasks; +using Xunit; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.ExpressRoute; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Management.ExpressRoute; +using Microsoft.WindowsAzure.Management.ExpressRoute.Models; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.ExpressRoute +{ + + public class AzureDedicatedCircuitTests : TestBase + { + private const string SubscriptionId = "foo"; + + private static Mock InitExpressRouteManagementClient() + { + return + (new Mock( + new CertificateCloudCredentials(SubscriptionId, new X509Certificate2(new byte[] { })), + new Uri("http://someValue"))); + } + + [Fact] + public void NewAzureDedicatedCircuitSuccessful() + { + // Setup + + string circuitName = "TestCircuit"; + uint bandwidth = 10; + string serviceProviderName = "TestProvider"; + string location = "us-west"; + string serviceKey = "aa28cd19-b10a-41ff-981b-53c6bbf15ead"; + + MockCommandRuntime mockCommandRuntime = new MockCommandRuntime(); + Mock client = InitExpressRouteManagementClient(); + var dcMock = new Mock(); + + DedicatedCircuitGetResponse expected = + new DedicatedCircuitGetResponse() + { + DedicatedCircuit = new AzureDedicatedCircuit() + { + CircuitName = circuitName, + Bandwidth = bandwidth, + Location = location, + ServiceProviderName = serviceProviderName, + ServiceKey = serviceKey, + ServiceProviderProvisioningState = ProviderProvisioningState.NotProvisioned, + Status = DedicatedCircuitState.Enabled, + }, + RequestId = "", + StatusCode = new HttpStatusCode() + }; + var t = new Task(() => expected); + t.Start(); + + dcMock.Setup(f => f.NewAsync(It.Is(x => x.Bandwidth == bandwidth && x.CircuitName == circuitName && x.Location == location && x.ServiceProviderName == serviceProviderName), It.IsAny())).Returns((DedicatedCircuitNewParameters param, CancellationToken cancellation) => t); + client.SetupGet(f => f.DedicatedCircuits).Returns(dcMock.Object); + + NewAzureDedicatedCircuitCommand cmdlet = new NewAzureDedicatedCircuitCommand() + { + CircuitName = circuitName, + Bandwidth = bandwidth, + Location = location, + ServiceProviderName = serviceProviderName, + CommandRuntime = mockCommandRuntime, + ExpressRouteClient = new ExpressRouteClient(client.Object) + }; + + cmdlet.ExecuteCmdlet(); + + // Assert + AzureDedicatedCircuit actual = mockCommandRuntime.OutputPipeline[0] as AzureDedicatedCircuit; + Assert.Equal(expected.DedicatedCircuit.CircuitName, actual.CircuitName); + Assert.Equal(expected.DedicatedCircuit.Bandwidth, actual.Bandwidth); + Assert.Equal(expected.DedicatedCircuit.Location, actual.Location); + Assert.Equal(expected.DedicatedCircuit.ServiceProviderName, actual.ServiceProviderName); + Assert.Equal(expected.DedicatedCircuit.ServiceProviderProvisioningState, actual.ServiceProviderProvisioningState); + Assert.Equal(expected.DedicatedCircuit.Status, actual.Status); + Assert.Equal(expected.DedicatedCircuit.ServiceKey, actual.ServiceKey); + } + + [Fact] + public void GetAzureDedicatedCircuitSuccessful() + { + // Setup + + string circuitName = "TestCircuit"; + uint bandwidth = 10; + string serviceProviderName = "TestProvider"; + string location = "us-west"; + string serviceKey = "aa28cd19-b10a-41ff-981b-53c6bbf15ead"; + + MockCommandRuntime mockCommandRuntime = new MockCommandRuntime(); + Mock client = InitExpressRouteManagementClient(); + var dcMock = new Mock(); + + DedicatedCircuitGetResponse expected = + new DedicatedCircuitGetResponse() + { + DedicatedCircuit = new AzureDedicatedCircuit() + { + CircuitName = circuitName, + Bandwidth = bandwidth, + Location = location, + ServiceProviderName = serviceProviderName, + ServiceKey = serviceKey, + ServiceProviderProvisioningState = ProviderProvisioningState.NotProvisioned, + Status = DedicatedCircuitState.Enabled, + }, + RequestId = "", + StatusCode = new HttpStatusCode() + }; + var t = new Task(() => expected); + t.Start(); + + dcMock.Setup(f => f.GetAsync(It.Is(sKey => sKey == serviceKey), It.IsAny())).Returns((string sKey, CancellationToken cancellation) => t); + client.SetupGet(f => f.DedicatedCircuits).Returns(dcMock.Object); + + GetAzureDedicatedCircuitCommand cmdlet = new GetAzureDedicatedCircuitCommand() + { + ServiceKey = serviceKey, + CommandRuntime = mockCommandRuntime, + ExpressRouteClient = new ExpressRouteClient(client.Object) + }; + + cmdlet.ExecuteCmdlet(); + + // Assert + AzureDedicatedCircuit actual = mockCommandRuntime.OutputPipeline[0] as AzureDedicatedCircuit; + Assert.Equal(expected.DedicatedCircuit.CircuitName, actual.CircuitName); + Assert.Equal(expected.DedicatedCircuit.Bandwidth, actual.Bandwidth); + Assert.Equal(expected.DedicatedCircuit.Location, actual.Location); + Assert.Equal(expected.DedicatedCircuit.ServiceProviderName, actual.ServiceProviderName); + Assert.Equal(expected.DedicatedCircuit.ServiceProviderProvisioningState, actual.ServiceProviderProvisioningState); + Assert.Equal(expected.DedicatedCircuit.Status, actual.Status); + Assert.Equal(expected.DedicatedCircuit.ServiceKey, actual.ServiceKey); + } + + [Fact] + public void RemoveAzureDedicatedCircuitSuccessful() + { + string serviceKey = "aa28cd19-b10a-41ff-981b-53c6bbf15ead"; + ExpressRouteOperationStatusResponse expected = + new ExpressRouteOperationStatusResponse() + { + Status = ExpressRouteOperationStatus.Successful, + HttpStatusCode = HttpStatusCode.OK + }; + + MockCommandRuntime mockCommandRuntime = new MockCommandRuntime(); + Mock client = InitExpressRouteManagementClient(); + var dcMock = new Mock(); + + var t = new Task(() => expected); + t.Start(); + + dcMock.Setup(f => f.RemoveAsync(It.Is(sKey => sKey == serviceKey), It.IsAny())).Returns((string sKey, CancellationToken cancellation) => t); + client.SetupGet(f => f.DedicatedCircuits).Returns(dcMock.Object); + + RemoveAzureDedicatedCircuitCommand cmdlet = new RemoveAzureDedicatedCircuitCommand() + { + ServiceKey = serviceKey, + CommandRuntime = mockCommandRuntime, + ExpressRouteClient = new ExpressRouteClient(client.Object) + }; + + cmdlet.ExecuteCmdlet(); + + Assert.True(mockCommandRuntime.VerboseStream[0].Contains(serviceKey)); + } + + [Fact] + public void ListAzureDedicatedCircuitSuccessful() + { + // Setup + + string circuitName1 = "TestCircuit"; + uint bandwidth1 = 10; + string serviceProviderName1 = "TestProvider"; + string location1 = "us-west"; + string serviceKey1 = "aa28cd19-b10a-41ff-981b-53c6bbf15ead"; + + string circuitName2 = "TestCircuit2"; + uint bandwidth2 = 10; + string serviceProviderName2 = "TestProvider"; + string location2 = "us-north"; + string serviceKey2 = "bc28cd19-b10a-41ff-981b-53c6bbf15ead"; + + MockCommandRuntime mockCommandRuntime = new MockCommandRuntime(); + Mock client = InitExpressRouteManagementClient(); + var dcMock = new Mock(); + + List dedicatedCircuits = new List(){ + new AzureDedicatedCircuit(){ Bandwidth = bandwidth1, CircuitName = circuitName1, ServiceKey = serviceKey1, Location = location1, ServiceProviderName = serviceProviderName1, ServiceProviderProvisioningState = ProviderProvisioningState.NotProvisioned, Status = DedicatedCircuitState.Enabled}, + new AzureDedicatedCircuit(){ Bandwidth = bandwidth2, CircuitName = circuitName2, ServiceKey = serviceKey2, Location = location2, ServiceProviderName = serviceProviderName2, ServiceProviderProvisioningState = ProviderProvisioningState.Provisioned, Status = DedicatedCircuitState.Enabled} + }; + + DedicatedCircuitListResponse expected = + new DedicatedCircuitListResponse() + { + DedicatedCircuits = dedicatedCircuits, + StatusCode = HttpStatusCode.OK + }; + + var t = new Task(() => expected); + t.Start(); + + dcMock.Setup(f => f.ListAsync(It.IsAny())).Returns((CancellationToken cancellation) => t); + client.SetupGet(f => f.DedicatedCircuits).Returns(dcMock.Object); + + GetAzureDedicatedCircuitCommand cmdlet = new GetAzureDedicatedCircuitCommand() + { + CommandRuntime = mockCommandRuntime, + ExpressRouteClient = new ExpressRouteClient(client.Object) + }; + + cmdlet.ExecuteCmdlet(); + + // Assert + IEnumerable actual = + mockCommandRuntime.OutputPipeline[0] as IEnumerable; + Assert.Equal(actual.ToArray().Count(), 2); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/MSSharedLibKey.snk b/src/ServiceManagement/Services/Commands.Test/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ServiceManagement/Services/Commands.Test/MSSharedLibKey.snk differ diff --git a/src/ServiceManagement/Services/Commands.Test/MediaServices/FakeHttpContent.cs b/src/ServiceManagement/Services/Commands.Test/MediaServices/FakeHttpContent.cs new file mode 100644 index 000000000000..28b35515aff6 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/MediaServices/FakeHttpContent.cs @@ -0,0 +1,46 @@ +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using System.Net; +using System.Net.Http; +using System.Text; +using System.Threading.Tasks; + +namespace Microsoft.WindowsAzure.Commands.Test.MediaServices +{ + internal class FakeHttpContent : HttpContent + { + private readonly string _content; + + public FakeHttpContent(string content) + { + _content = content; + } + + public FakeHttpContent() : this("") + { + } + + protected override Task SerializeToStreamAsync(Stream stream, TransportContext context) + { + byte[] bytes = new UTF8Encoding().GetBytes(_content); + return Task.Factory.StartNew(() => stream.Write(bytes, 0, bytes.Length)); + } + + protected override bool TryComputeLength(out long length) + { + length = _content.Length; + return true; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/MediaServices/FakeHttpMessageHandler.cs b/src/ServiceManagement/Services/Commands.Test/MediaServices/FakeHttpMessageHandler.cs new file mode 100644 index 000000000000..55e8d1dbf30d --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/MediaServices/FakeHttpMessageHandler.cs @@ -0,0 +1,33 @@ +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Net; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; + +namespace Microsoft.WindowsAzure.Commands.Test.MediaServices +{ + public class FakeHttpMessageHandler : DelegatingHandler + { + /// + /// Send stub + /// + public Func Send { get; set; } + + protected override Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) + { + return Task.Factory.StartNew(() => Send != null ? Send(request) : new HttpResponseMessage(HttpStatusCode.OK)); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/MediaServices/GetAzureMediaServicesTests.cs b/src/ServiceManagement/Services/Commands.Test/MediaServices/GetAzureMediaServicesTests.cs new file mode 100644 index 000000000000..c582d6eedc9a --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/MediaServices/GetAzureMediaServicesTests.cs @@ -0,0 +1,149 @@ +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Threading.Tasks; +using Xunit; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.MediaServices; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.MediaServices; +using Microsoft.WindowsAzure.Commands.Utilities.MediaServices.Services.Entities; +using Microsoft.WindowsAzure.Management.MediaServices.Models; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.MediaServices +{ + + public class GetAzureMediaServicesTests : TestBase + { + protected string SubscriptionId = "DE8C2681-0BCD-47DB-A8A6-A103D2D4A1B9"; + + public GetAzureMediaServicesTests() + { + new FileSystemHelper(this).CreateAzureSdkDirectoryAndImportPublishSettings(); + } + + [Fact] + public void ProcessGetMediaServicesTest() + { + // Setup + Mock clientMock = new Mock(); + + Guid id1 = Guid.NewGuid(); + Guid id2 = Guid.NewGuid(); + + MediaServicesAccountListResponse response = new MediaServicesAccountListResponse(); + response.Accounts.Add(new MediaServicesAccountListResponse.MediaServiceAccount + { + AccountId = id1.ToString(), + Name = "WAMS Account 1" + }); + response.Accounts.Add(new MediaServicesAccountListResponse.MediaServiceAccount + { + AccountId = id2.ToString(), + Name = "WAMS Account 2" + }); + + + clientMock.Setup(f => f.GetMediaServiceAccountsAsync()).Returns(Task.Factory.StartNew(() => response)); + + // Test + GetAzureMediaServiceCommand getAzureMediaServiceCommand = new GetAzureMediaServiceCommand + { + CommandRuntime = new MockCommandRuntime(), + MediaServicesClient = clientMock.Object, + }; + + AzureSession.SetCurrentContext(new AzureSubscription {Id = new Guid(SubscriptionId)}, null, null); + + getAzureMediaServiceCommand.ExecuteCmdlet(); + Assert.Equal(1, ((MockCommandRuntime)getAzureMediaServiceCommand.CommandRuntime).OutputPipeline.Count); + IEnumerable accounts = (IEnumerable)((MockCommandRuntime)getAzureMediaServiceCommand.CommandRuntime).OutputPipeline.FirstOrDefault(); + Assert.NotNull(accounts); + Assert.True(accounts.Any(mediaservice => (mediaservice).AccountId == id1)); + Assert.True(accounts.Any(mediaservice => (mediaservice).AccountId == id2)); + Assert.True(accounts.Any(mediaservice => (mediaservice).Name.Equals("WAMS Account 1"))); + Assert.True(accounts.Any(mediaservice => (mediaservice).Name.Equals("WAMS Account 2"))); + } + + [Fact] + public void ProcessGetMediaServiceByNameShouldReturnOneMatchingEntry() + { + Mock clientMock = new Mock(); + + + const string expectedName = "WAMS Account 1"; + MediaServicesAccountGetResponse detail = new MediaServicesAccountGetResponse + { + Account = new MediaServicesAccount() { AccountName = expectedName } + }; + + clientMock.Setup(f => f.GetMediaServiceAsync(detail.Account.AccountName)).Returns(Task.Factory.StartNew(() => detail)); + + // Test + GetAzureMediaServiceCommand getAzureMediaServiceCommand = new GetAzureMediaServiceCommand + { + CommandRuntime = new MockCommandRuntime(), + MediaServicesClient = clientMock.Object, + Name = expectedName + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(SubscriptionId) }, null, null); + getAzureMediaServiceCommand.ExecuteCmdlet(); + Assert.Equal(1, ((MockCommandRuntime)getAzureMediaServiceCommand.CommandRuntime).OutputPipeline.Count); + MediaServiceAccountDetails accounts = (MediaServiceAccountDetails)((MockCommandRuntime)getAzureMediaServiceCommand.CommandRuntime).OutputPipeline.FirstOrDefault(); + Assert.NotNull(accounts); + Assert.Equal(expectedName, accounts.Name); + } + + [Fact] + public void ProcessGetMediaServiceByNameShouldNotReturnEntriesForNoneMatchingName() + { + Mock clientMock = new Mock(); + string mediaServicesAccountName = Guid.NewGuid().ToString(); + + + clientMock.Setup(f => f.GetMediaServiceAsync(mediaServicesAccountName)).Returns(Task.Factory.StartNew(() => + { + if (String.IsNullOrEmpty(mediaServicesAccountName)) + { + return new MediaServicesAccountGetResponse(); + } + throw new ServiceManagementClientException(HttpStatusCode.NotFound, + new ServiceManagementError + { + Code = HttpStatusCode.NotFound.ToString(), + Message = "Account not found" + }, + string.Empty); + })); + + // Test + GetAzureMediaServiceCommand getAzureMediaServiceCommand = new GetAzureMediaServiceCommand + { + CommandRuntime = new MockCommandRuntime(), + MediaServicesClient = clientMock.Object, + Name = mediaServicesAccountName + }; + + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(SubscriptionId) }, null, null); + Assert.Throws(()=> getAzureMediaServiceCommand.ExecuteCmdlet()); + Assert.Equal(0, ((MockCommandRuntime)getAzureMediaServiceCommand.CommandRuntime).OutputPipeline.Count); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/MediaServices/MediaServicesClientTests.cs b/src/ServiceManagement/Services/Commands.Test/MediaServices/MediaServicesClientTests.cs new file mode 100644 index 000000000000..7a32a10f6d40 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/MediaServices/MediaServicesClientTests.cs @@ -0,0 +1,288 @@ +using System; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Security.Cryptography.X509Certificates; +using System.Threading; +using System.Threading.Tasks; +using Xunit; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Utilities.MediaServices; +using Microsoft.WindowsAzure.Management.MediaServices; +using Microsoft.WindowsAzure.Management.MediaServices.Models; +using Microsoft.WindowsAzure.Management.Storage; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.MediaServices +{ + + public class MediaServicesClientTests + { + private const string AccountName = "testacc"; + private const string SubscriptionId = "foo"; + private static readonly StorageManagementClient StorageClient = new StorageManagementClient(new CertificateCloudCredentials(SubscriptionId, new X509Certificate2(new byte[] { })), new Uri("http://someValue")); + + + [Fact] + public void TestDeleteAzureMediaServiceAccountAsync() + { + Mock clientMock = InitMediaManagementClientMock(); + Mock iAccountOperations = new Mock(); + iAccountOperations.Setup(m => m.DeleteAsync(It.IsAny(), It.IsAny())).Returns(() => Task.Factory.StartNew(() => new OperationResponse + { + RequestId = "request", + StatusCode = HttpStatusCode.OK + })); + clientMock.Setup(m => m.Accounts).Returns(() => iAccountOperations.Object); + + StorageManagementClient storageClient = StorageClient.WithHandler(new FakeHttpMessageHandler()); + MediaServicesClient target = new MediaServicesClient(null, + clientMock.Object, + storageClient); + + OperationResponse result = target.DeleteAzureMediaServiceAccountAsync(AccountName).Result; + + Assert.Equal(HttpStatusCode.OK, result.StatusCode); + } + + [Fact] + public void TestDeleteAzureMediaServiceAccountAsync404() + { + FakeHttpMessageHandler fakeHttpHandler; + MediaServicesManagementClient clientWithHandler = CreateMediaManagementClientWithFakeHttpMessageHandler(out fakeHttpHandler); + + const string responseText = "{\"Code\":\"NotFound\",\"Message\":\"The specified account was not found.\"}"; + + HttpResponseMessage response = new HttpResponseMessage(HttpStatusCode.NotFound) + { + Content = new FakeHttpContent(responseText) + }; + + fakeHttpHandler.Send = request => response; + + MediaServicesClient target = new MediaServicesClient(null, + clientWithHandler, + StorageClient.WithHandler(new FakeHttpMessageHandler())); + + try + { + OperationResponse result = target.DeleteAzureMediaServiceAccountAsync(AccountName).Result; + } + catch (AggregateException ax) + { + CloudException x = (CloudException)ax.InnerExceptions.Single(); + Assert.Equal(HttpStatusCode.NotFound, x.Response.StatusCode); + return; + } + + Assert.True(false, "ServiceManagementClientException expected"); + } + + [Fact] + public void TestRegenerateMediaServicesAccountAsync() + { + Mock clientMock = InitMediaManagementClientMock(); + Mock iAccountOperations = new Mock(); + iAccountOperations + .Setup(m => m.RegenerateKeyAsync(It.IsAny(), It.IsAny(), It.IsAny())) + .Returns(() => Task.Factory.StartNew( + () => new OperationResponse + { + RequestId = "request", + StatusCode = HttpStatusCode.OK + })); + + clientMock.Setup(m => m.Accounts).Returns(() => iAccountOperations.Object); + + MediaServicesClient target = new MediaServicesClient(null, + clientMock.Object, + StorageClient); + + OperationResponse result = target.RegenerateMediaServicesAccountAsync(AccountName, MediaServicesKeyType.Primary).Result; + + Assert.Equal(HttpStatusCode.OK, result.StatusCode); + } + + [Fact] + public void TestGetMediaServiceAsync() + { + + + FakeHttpMessageHandler fakeHttpHandler; + MediaServicesManagementClient clientWithHandler = CreateMediaManagementClientWithFakeHttpMessageHandler(out fakeHttpHandler); + + const string responseText = @" + { + ""AccountName"":""testps"", + ""AccountKey"":""primarykey"", + ""AccountKeys"":{""Primary"":""primarykey"",""Secondary"":""secondarykey""}, + ""StorageAccountName"":""psstorage"", + ""AccountRegion"":""West US"" + }"; + + HttpResponseMessage response = new HttpResponseMessage(HttpStatusCode.OK) + { + Content = new FakeHttpContent(responseText) + }; + + fakeHttpHandler.Send = request => response; + + MediaServicesClient target = new MediaServicesClient(null, + clientWithHandler, + StorageClient.WithHandler(new FakeHttpMessageHandler())); + + MediaServicesAccountGetResponse result = target.GetMediaServiceAsync(AccountName).Result; + Assert.Equal("primarykey", result.Account.StorageAccountKeys.Primary); + Assert.Equal("secondarykey", result.Account.StorageAccountKeys.Secondary); + Assert.Equal("testps", result.Account.AccountName); + Assert.Equal("psstorage", result.Account.StorageAccountName); + } + + [Fact] + public void TestGetMediaServiceAccountsAsync() + { + + FakeHttpMessageHandler fakeHttpHandler; + MediaServicesManagementClient clientWithHandler = CreateMediaManagementClientWithFakeHttpMessageHandler(out fakeHttpHandler); + + const string responseText = @" + + mymediademo + MediaService + Active + E0658294-5C96-4B0F-AD55-F7446CE4F788 + + + nimbusorigintrial + MediaService + Active + C92B17C8-5422-4CD1-8D3C-61E576E861DD + + "; + + HttpResponseMessage response = new HttpResponseMessage(HttpStatusCode.OK) + { + Content = new FakeHttpContent(responseText) + }; + + fakeHttpHandler.Send = request => response; + + MediaServicesClient target = new MediaServicesClient(null, + clientWithHandler, + StorageClient.WithHandler(new FakeHttpMessageHandler())); + + MediaServicesAccountListResponse.MediaServiceAccount[] result = target.GetMediaServiceAccountsAsync().Result.Accounts.ToArray(); + Assert.Equal("E0658294-5C96-4B0F-AD55-F7446CE4F788", result[0].AccountId); + Assert.Equal("C92B17C8-5422-4CD1-8D3C-61E576E861DD", result[1].AccountId); + } + + [Fact] + public void TestCreateNewAzureMediaServiceAsync() + { + FakeHttpMessageHandler fakeHttpHandler; + MediaServicesManagementClient clientWithHandler = CreateMediaManagementClientWithFakeHttpMessageHandler(out fakeHttpHandler); + + const string responseText = + @"{""AccountId"":""e26ca098-e363-450d-877c-384ce5a97c72"", + ""AccountName"":""tmp"", + ""Subscription"":""d4e66bc8-6ccb-4e49-9ee6-dc6925d5bbdb"", + ""StatusCode"":201}"; + + HttpResponseMessage response = new HttpResponseMessage(HttpStatusCode.Created) + { + Content = new FakeHttpContent(responseText) + }; + + fakeHttpHandler.Send = request => response; + + MediaServicesClient target = new MediaServicesClient(null, + clientWithHandler, + StorageClient); + + MediaServicesAccountCreateParameters creationRequest = new MediaServicesAccountCreateParameters + { + AccountName = AccountName, + BlobStorageEndpointUri = new Uri("http://tmp"), + Region = "West US", + StorageAccountKey = Guid.NewGuid().ToString(), + StorageAccountName = "test" + }; + + MediaServicesAccountCreateResponse result = target.CreateNewAzureMediaServiceAsync(creationRequest).Result; + Assert.Equal("tmp", result.Account.AccountName); + } + + [Fact] + public void TestCreateNewAzureMediaServiceAsyncInvalidAccount() + { + FakeHttpMessageHandler fakeHttpHandler; + MediaServicesManagementClient clientWithHandler = CreateMediaManagementClientWithFakeHttpMessageHandler(out fakeHttpHandler); + + const string responseText = @" + BadRequest + Account Creation Request contains an invalid account name. + "; + + HttpResponseMessage response = new HttpResponseMessage(HttpStatusCode.BadRequest) + { + Content = new FakeHttpContent(responseText) + }; + + fakeHttpHandler.Send = request => response; + + MediaServicesClient target = new MediaServicesClient(null, + clientWithHandler, + StorageClient); + + MediaServicesAccountCreateParameters creationRequest = new MediaServicesAccountCreateParameters + { + AccountName = AccountName, + BlobStorageEndpointUri = new Uri("http://tmp"), + Region = "West US", + StorageAccountKey = Guid.NewGuid().ToString(), + StorageAccountName = "test" + }; + + try + { + MediaServicesAccountCreateResponse result = target.CreateNewAzureMediaServiceAsync(creationRequest).Result; + } + catch (AggregateException ex) + { + CloudException cloudException = ex.Flatten().InnerException as CloudException; + Assert.NotNull(cloudException); + Assert.Equal(HttpStatusCode.BadRequest, cloudException.Response.StatusCode); + } + + } + + #region Helper Methods + + private static AzureSubscription GetWindowsAzureSubscription() + { + AzureSubscription windowsAzureSubscription = new AzureSubscription + { + Id = new Guid(SubscriptionId), + }; + return windowsAzureSubscription; + } + private static Mock InitMediaManagementClientMock() + { + return new Mock(new CertificateCloudCredentials(SubscriptionId, new X509Certificate2(new byte[] { })), new Uri("http://someValue")); + } + private static MediaServicesManagementClient CreateMediaManagementClientWithFakeHttpMessageHandler(out FakeHttpMessageHandler fakeHttpHandler) + { + fakeHttpHandler = new FakeHttpMessageHandler(); + MediaServicesManagementClient managementClient = InitManagementClient(); + MediaServicesManagementClient clientWithHandler = managementClient.WithHandler(fakeHttpHandler); + return clientWithHandler; + } + private static MediaServicesManagementClient InitManagementClient() + { + return new MediaServicesManagementClient(new CertificateCloudCredentials(SubscriptionId, new X509Certificate2(new byte[] { })), new Uri("http://someValue")); + } + + #endregion + + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/MediaServices/NewAzureMediaServicesKeyTest.cs b/src/ServiceManagement/Services/Commands.Test/MediaServices/NewAzureMediaServicesKeyTest.cs new file mode 100644 index 000000000000..95280a837820 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/MediaServices/NewAzureMediaServicesKeyTest.cs @@ -0,0 +1,69 @@ +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Net; +using System.Threading.Tasks; +using Xunit; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.MediaServices; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.MediaServices; +using Microsoft.WindowsAzure.Management.MediaServices.Models; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.MediaServices +{ + + public class RegenerateMediaServicesAccountTests : TestBase + { + [Fact] + public void RegenerateMediaServicesAccountTest() + { + // Setup + Mock clientMock = new Mock(); + + const string newKey = "newkey"; + const string expectedName = "testacc"; + + clientMock.Setup(f => f.RegenerateMediaServicesAccountAsync(expectedName, MediaServicesKeyType.Primary)).Returns( + Task.Factory.StartNew(() => new OperationResponse { StatusCode = HttpStatusCode.OK })); + + MediaServicesAccountGetResponse detail = new MediaServicesAccountGetResponse + { + Account = new MediaServicesAccount { + AccountName = expectedName, + StorageAccountKeys = new MediaServicesAccount.AccountKeys + { + Primary = newKey + } + } + }; + + clientMock.Setup(f => f.GetMediaServiceAsync(expectedName)).Returns(Task.Factory.StartNew(() => detail)); + + // Test + NewAzureMediaServiceKeyCommand command = new NewAzureMediaServiceKeyCommand + { + CommandRuntime = new MockCommandRuntime(), + Name = expectedName, + KeyType = MediaServicesKeyType.Primary, + MediaServicesClient = clientMock.Object, + }; + + command.ExecuteCmdlet(); + Assert.Equal(1, ((MockCommandRuntime)command.CommandRuntime).OutputPipeline.Count); + string key = (string)((MockCommandRuntime)command.CommandRuntime).OutputPipeline.FirstOrDefault(); + Assert.Equal(newKey, key); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/MediaServices/NewMediaServicesAccountTests.cs b/src/ServiceManagement/Services/Commands.Test/MediaServices/NewMediaServicesAccountTests.cs new file mode 100644 index 000000000000..ba5ce937f585 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/MediaServices/NewMediaServicesAccountTests.cs @@ -0,0 +1,104 @@ +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Threading.Tasks; +using Xunit; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.MediaServices; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.MediaServices; +using Microsoft.WindowsAzure.Commands.Utilities.MediaServices.Services.Entities; +using Microsoft.WindowsAzure.Management.MediaServices.Models; +using Microsoft.WindowsAzure.Management.Storage.Models; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.MediaServices +{ + + public class NewMediaServicesAccountTests : TestBase + { + [Fact] + public void NewMediaServiceAccountShouldPassWithValidParameters() + { + // Setup + Mock clientMock = new Mock(); + + const string storageAccountName = "teststorage"; + const string storageAccountKey = "key"; + const string accountName = "testaccount"; + const string region = "West US"; + const string blobStorageEndpointUri = "http://awesome.blob.core.windows.net/"; + + MediaServicesAccountCreateParameters request = new MediaServicesAccountCreateParameters + { + AccountName = accountName, + BlobStorageEndpointUri = new Uri(blobStorageEndpointUri), + Region = region, + StorageAccountKey = storageAccountKey, + StorageAccountName = storageAccountName + + }; + + clientMock.Setup(f => f.CreateNewAzureMediaServiceAsync(It.Is(creationRequest => request.AccountName == accountName))).Returns( + Task.Factory.StartNew(() => new MediaServicesAccountCreateResponse + { + Account = new MediaServicesCreatedAccount { + AccountId = Guid.NewGuid().ToString(), + AccountName = request.AccountName, + SubscriptionId = Guid.NewGuid().ToString() + } + })); + + + clientMock.Setup(f => f.GetStorageServiceKeysAsync(storageAccountName)).Returns( + Task.Factory.StartNew(() => new StorageAccountGetKeysResponse + { + PrimaryKey = storageAccountKey, + SecondaryKey = storageAccountKey + + + })); + + + clientMock.Setup(f => f.GetStorageServicePropertiesAsync(storageAccountName)).Returns(Task.Factory.StartNew(() => + { + StorageAccountGetResponse response = new StorageAccountGetResponse + { + StorageAccount = new StorageAccount + { + Properties = new StorageAccountProperties() + } + }; + response.StorageAccount.Properties.Endpoints.Add(new Uri(blobStorageEndpointUri)); + return response; + })); + + // Test + NewAzureMediaServiceCommand command = new NewAzureMediaServiceCommand + { + CommandRuntime = new MockCommandRuntime(), + Name = accountName, + Location = region, + StorageAccountName = storageAccountName, + MediaServicesClient = clientMock.Object, + }; + + command.ExecuteCmdlet(); + Assert.Equal(1, ((MockCommandRuntime)command.CommandRuntime).OutputPipeline.Count); + AccountCreationResult accountCreationResult = (AccountCreationResult)((MockCommandRuntime)command.CommandRuntime).OutputPipeline.FirstOrDefault(); + Assert.NotNull(accountCreationResult); + Assert.Equal(accountName, accountCreationResult.Name); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/MediaServices/RemoveMediaServicesAccountTests.cs b/src/ServiceManagement/Services/Commands.Test/MediaServices/RemoveMediaServicesAccountTests.cs new file mode 100644 index 000000000000..4399e47d46a6 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/MediaServices/RemoveMediaServicesAccountTests.cs @@ -0,0 +1,53 @@ +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Net; +using System.Threading.Tasks; +using Xunit; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.MediaServices; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.MediaServices; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.MediaServices +{ + + public class RemoveMediaServicesAccountTests : TestBase + { + [Fact] + public void ProcessRemoveMediaServicesAccountTest() + { + // Setup + Mock clientMock = new Mock(); + + const string expectedName = "testacc"; + + clientMock.Setup(f => f.DeleteAzureMediaServiceAccountAsync(expectedName)).Returns( + Task.Factory.StartNew(() => new OperationResponse { StatusCode = HttpStatusCode.NoContent })); + + // Test + RemoveAzureMediaServiceCommand command = new RemoveAzureMediaServiceCommand + { + CommandRuntime = new MockCommandRuntime(), + Name = expectedName, + MediaServicesClient = clientMock.Object, + }; + + command.ExecuteCmdlet(); + Assert.Equal(1, ((MockCommandRuntime)command.CommandRuntime).OutputPipeline.Count); + bool response = (bool)((MockCommandRuntime)command.CommandRuntime).OutputPipeline.FirstOrDefault(); + Assert.True(response); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Profile/GetAzurePublishSettingsFileTests.cs b/src/ServiceManagement/Services/Commands.Test/Profile/GetAzurePublishSettingsFileTests.cs new file mode 100644 index 000000000000..dc826e3222c1 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Profile/GetAzurePublishSettingsFileTests.cs @@ -0,0 +1,50 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Xunit; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Profile; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.Profile +{ + + public class GetAzurePublishSettingsFileTests + { + [Fact (Skip = "Consider removing these.")] + public void GetsPublishSettingsFileUrl() + { + // Setup + ProfileClient.DataStore = new MockDataStore(); + Mock commandRuntimeMock = new Mock(); + GetAzurePublishSettingsFileCommand cmdlet = new GetAzurePublishSettingsFileCommand() + { + CommandRuntime = commandRuntimeMock.Object, + PassThru = true, + Environment = EnvironmentName.AzureCloud, + Realm = "microsoft.com" + }; + cmdlet.ProfileClient = new ProfileClient(); + + // Test + cmdlet.ExecuteCmdlet(); + + // Assert + commandRuntimeMock.Verify(f => f.WriteObject(true), Times.Once()); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Profile/SelectAzureSubscriptionTests.cs b/src/ServiceManagement/Services/Commands.Test/Profile/SelectAzureSubscriptionTests.cs new file mode 100644 index 000000000000..b9436a9c860f --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Profile/SelectAzureSubscriptionTests.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Xunit; +using Microsoft.WindowsAzure.Commands.Profile; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.Profile +{ + + public class SelectAzureSubscriptionTests + { + [Fact] + public void CleansDefaultSubscriptionTwice() + { + // Setup + Mock commandRuntimeMock = new Mock(); + SelectAzureSubscriptionCommand cmdlet = new SelectAzureSubscriptionCommand() + { + CommandRuntime = commandRuntimeMock.Object, + PassThru = true, + NoDefault = true + }; + + // Test + cmdlet.ExecuteCmdlet(); + cmdlet.ExecuteCmdlet(); + + // Assert that no exception is thrown + Assert.True(true); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Properties/AssemblyInfo.cs b/src/ServiceManagement/Services/Commands.Test/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..669c57dc5e66 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Properties/AssemblyInfo.cs @@ -0,0 +1,30 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft.WindowsAzure.Commands.Test")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("88accda2-ccb3-4813-8141-5d1a2640f93d")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] +[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] diff --git a/src/ServiceManagement/Services/Commands.Test/Resources/MyWebApplication/Web.Debug.config b/src/ServiceManagement/Services/Commands.Test/Resources/MyWebApplication/Web.Debug.config new file mode 100644 index 000000000000..c1bf1db285d2 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Resources/MyWebApplication/Web.Debug.config @@ -0,0 +1,30 @@ + + + + + + + + + + diff --git a/src/ServiceManagement/Services/Commands.Test/Resources/MyWebApplication/Web.Release.config b/src/ServiceManagement/Services/Commands.Test/Resources/MyWebApplication/Web.Release.config new file mode 100644 index 000000000000..bdd237c33783 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Resources/MyWebApplication/Web.Release.config @@ -0,0 +1,31 @@ + + + + + + + + + + + diff --git a/src/ServiceManagement/Services/Commands.Test/Resources/MyWebApplication/Web.config b/src/ServiceManagement/Services/Commands.Test/Resources/MyWebApplication/Web.config new file mode 100644 index 000000000000..5bbcc8aff036 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Resources/MyWebApplication/Web.config @@ -0,0 +1,62 @@ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Resources/MyWebApplication/WebApplication4.csproj b/src/ServiceManagement/Services/Commands.Test/Resources/MyWebApplication/WebApplication4.csproj new file mode 100644 index 000000000000..b30fcdcd7d1c --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Resources/MyWebApplication/WebApplication4.csproj @@ -0,0 +1,259 @@ + + + + + Debug + AnyCPU + + + 2.0 + {5F4CDEAC-2EA1-406C-88CC-DD9CAE6297DF} + {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + WebApplication4 + WebApplication4 + v4.5 + false + true + + + + + + + true + full + false + bin\ + DEBUG;TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + + True + ..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll + + + + + + + True + ..\..\..\packages\Microsoft.AspNet.WebPages.3.0.0\lib\net45\System.Web.Helpers.dll + + + True + ..\..\..\packages\Microsoft.AspNet.Mvc.5.0.0\lib\net45\System.Web.Mvc.dll + + + ..\..\..\packages\Microsoft.AspNet.Web.Optimization.1.1.1\lib\net40\System.Web.Optimization.dll + + + True + ..\..\..\packages\Microsoft.AspNet.Razor.3.0.0\lib\net45\System.Web.Razor.dll + + + True + ..\..\..\packages\Microsoft.AspNet.WebPages.3.0.0\lib\net45\System.Web.WebPages.dll + + + True + ..\..\..\packages\Microsoft.AspNet.WebPages.3.0.0\lib\net45\System.Web.WebPages.Deployment.dll + + + True + ..\..\..\packages\Microsoft.AspNet.WebPages.3.0.0\lib\net45\System.Web.WebPages.Razor.dll + + + True + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + + + True + ..\..\..\packages\WebGrease.1.5.2\lib\WebGrease.dll + + + True + ..\..\..\packages\Antlr.3.4.1.9004\lib\Antlr3.Runtime.dll + + + + + ..\..\..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.dll + + + ..\..\..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.SqlServer.dll + + + ..\..\..\packages\Microsoft.AspNet.Identity.Core.1.0.0\lib\net45\Microsoft.AspNet.Identity.Core.dll + + + ..\..\..\packages\Microsoft.AspNet.Identity.Owin.1.0.0\lib\net45\Microsoft.AspNet.Identity.Owin.dll + + + ..\..\..\packages\Microsoft.AspNet.Identity.EntityFramework.1.0.0\lib\net45\Microsoft.AspNet.Identity.EntityFramework.dll + + + ..\..\..\packages\Owin.1.0\lib\net40\Owin.dll + + + ..\..\..\packages\Microsoft.Owin.2.0.0\lib\net45\Microsoft.Owin.dll + + + ..\..\..\packages\Microsoft.Owin.Host.SystemWeb.2.0.0\lib\net45\Microsoft.Owin.Host.SystemWeb.dll + + + ..\..\..\packages\Microsoft.Owin.Security.2.0.0\lib\net45\Microsoft.Owin.Security.dll + + + ..\..\..\packages\Microsoft.Owin.Security.Facebook.2.0.0\lib\net45\Microsoft.Owin.Security.Facebook.dll + + + ..\..\..\packages\Microsoft.Owin.Security.Cookies.2.0.0\lib\net45\Microsoft.Owin.Security.Cookies.dll + + + ..\..\..\packages\Microsoft.Owin.Security.OAuth.2.0.0\lib\net45\Microsoft.Owin.Security.OAuth.dll + + + ..\..\..\packages\Microsoft.Owin.Security.Google.2.0.0\lib\net45\Microsoft.Owin.Security.Google.dll + + + ..\..\..\packages\Microsoft.Owin.Security.Twitter.2.0.0\lib\net45\Microsoft.Owin.Security.Twitter.dll + + + ..\..\..\packages\Microsoft.Owin.Security.MicrosoftAccount.2.0.0\lib\net45\Microsoft.Owin.Security.MicrosoftAccount.dll + + + + + + + + + + + Global.asax + + + + + + + + + + + + + + + + + Designer + + + + + + + + + + + + + + + Designer + + + Web.config + + + Web.config + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + + + + + + + + + True + True + 21091 + / + http://localhost:21091/ + False + False + + + False + + + + + + diff --git a/src/ServiceManagement/Services/Commands.Test/Resources/MyWebTemplateFolder/RoleSettings.xml b/src/ServiceManagement/Services/Commands.Test/Resources/MyWebTemplateFolder/RoleSettings.xml new file mode 100644 index 000000000000..a802a5b5ff66 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Resources/MyWebTemplateFolder/RoleSettings.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Resources/MyWebTemplateFolder/Scaffold.xml b/src/ServiceManagement/Services/Commands.Test/Resources/MyWebTemplateFolder/Scaffold.xml new file mode 100644 index 000000000000..d24f3f3ec3ff --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Resources/MyWebTemplateFolder/Scaffold.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/src/ServiceManagement/Services/Commands.Test/Resources/MyWebTemplateFolder/Web.config b/src/ServiceManagement/Services/Commands.Test/Resources/MyWebTemplateFolder/Web.config new file mode 100644 index 000000000000..56626fa4f930 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Resources/MyWebTemplateFolder/Web.config @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Resources/MyWebTemplateFolder/WebRole.xml b/src/ServiceManagement/Services/Commands.Test/Resources/MyWebTemplateFolder/WebRole.xml new file mode 100644 index 000000000000..d9f48f8750c1 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Resources/MyWebTemplateFolder/WebRole.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Resources/MyWebTemplateFolder/hello.html b/src/ServiceManagement/Services/Commands.Test/Resources/MyWebTemplateFolder/hello.html new file mode 100644 index 000000000000..ed72a038da01 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Resources/MyWebTemplateFolder/hello.html @@ -0,0 +1,6 @@ +var http = require('http'); +var port = process.env.port || 1337; +http.createServer(function (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }); + res.end('Hello World\n'); +}).listen(port); \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Resources/MyWebTemplateFolder/web.cloud.config b/src/ServiceManagement/Services/Commands.Test/Resources/MyWebTemplateFolder/web.cloud.config new file mode 100644 index 000000000000..7cdd3af4e07c --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Resources/MyWebTemplateFolder/web.cloud.config @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Resources/MyWorkerTemplateFolder/RoleSettings.xml b/src/ServiceManagement/Services/Commands.Test/Resources/MyWorkerTemplateFolder/RoleSettings.xml new file mode 100644 index 000000000000..a802a5b5ff66 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Resources/MyWorkerTemplateFolder/RoleSettings.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Resources/MyWorkerTemplateFolder/Scaffold.xml b/src/ServiceManagement/Services/Commands.Test/Resources/MyWorkerTemplateFolder/Scaffold.xml new file mode 100644 index 000000000000..30b04e2f0ea8 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Resources/MyWorkerTemplateFolder/Scaffold.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Resources/MyWorkerTemplateFolder/WorkerRole.xml b/src/ServiceManagement/Services/Commands.Test/Resources/MyWorkerTemplateFolder/WorkerRole.xml new file mode 100644 index 000000000000..248ec68c108a --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Resources/MyWorkerTemplateFolder/WorkerRole.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Resources/MyWorkerTemplateFolder/good_bat_file.cmd b/src/ServiceManagement/Services/Commands.Test/Resources/MyWorkerTemplateFolder/good_bat_file.cmd new file mode 100644 index 000000000000..a8fb62abff83 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Resources/MyWorkerTemplateFolder/good_bat_file.cmd @@ -0,0 +1,82 @@ +$runtimeUrl = $args[0] +$overrideUrl = $args[1] +$current = [string] (Get-Location -PSProvider FileSystem) +$client = New-Object System.Net.WebClient + +# For a custom role, it may not use runtime download, if that's the case, skip. +if (!($runtimeUrl) -and (!$overrideUrl)) { Write-Host "No runtimes to download"; exit; } + +function downloadWithRetry { + param([string]$url, [string]$dest, [int]$retry) + Write-Host + Write-Host "Attempt: $retry" + Write-Host + trap { + Write-Host $_.Exception.ToString() + if ($retry -lt 5) { + $retry=$retry+1 + Write-Host + Write-Host "Waiting 5 seconds and retrying" + Write-Host + Start-Sleep -s 5 + downloadWithRetry $url $dest $retry $client + } + else { + Write-Host "Download failed" + throw "Max number of retries downloading [5] exceeded" + } + } + $client.downloadfile($url, $dest) +} + +function download($url, $dest) { + Write-Host "Downloading $url" + downloadWithRetry $url $dest 1 +} + +function copyOnVerify($file, $output) { + Write-Host "Verifying $file" + $verify = Get-AuthenticodeSignature $file + Out-Host -InputObject $verify + if ($verify.Status -ne "Valid") { + throw "Invalid signature for runtime package $file" + } + else { + mv $file $output + } +} + +if ($overrideUrl) { + Write-Host "Using override url: $overrideUrl" + $url = $overrideUrl +} +else { + $url = $runtimeUrl +} + +foreach($singleUrl in $url -split ";") +{ + $suffix = Get-Random + $downloaddir = $current + "\sandbox" + $suffix + mkdir $downloaddir + $dest = $downloaddir + "\sandbox.exe" + download $singleUrl $dest + $final = $downloaddir + "\runtime.exe" + copyOnVerify $dest $final + if (Test-Path -LiteralPath $final) + { + cd $downloaddir + Start-Process -FilePath $final -ArgumentList -y -Wait + $cmd = $downloaddir + "\setup.cmd" + Start-Process -FilePath $cmd -Wait + } + else + { + throw "Unable to verify package" + } + cd $current + if (Test-Path -LiteralPath $downloaddir) + { + Remove-Item -LiteralPath $downloaddir -Force -Recurse + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/Resources/MyWorkerTemplateFolder/helper_stuff.cmd b/src/ServiceManagement/Services/Commands.Test/Resources/MyWorkerTemplateFolder/helper_stuff.cmd new file mode 100644 index 000000000000..b4d82835daa1 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Resources/MyWorkerTemplateFolder/helper_stuff.cmd @@ -0,0 +1,6 @@ +:workerLoop + +:: Try to keep this worker role alive. +:: Do lot of work here! + +goto workerLoop \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Resources/MyWorkerTemplateFolder/setup_worker.cmd b/src/ServiceManagement/Services/Commands.Test/Resources/MyWorkerTemplateFolder/setup_worker.cmd new file mode 100644 index 000000000000..46cdeef9c201 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Resources/MyWorkerTemplateFolder/setup_worker.cmd @@ -0,0 +1,23 @@ +@echo off + +echo Granting permissions for Network Service to the deployment directory... +icacls . /grant "Users":(OI)(CI)F +if %ERRORLEVEL% neq 0 goto error +echo OK + +if "%EMULATED%"=="true" exit /b 0 + +echo Configuring powershell permissions +powershell -c "set-executionpolicy unrestricted" + +echo Downloading runtime components +powershell .\download.ps1 '%RUNTIMEURL%' '%RUNTIMEURLOVERRIDE%' +if %ERRORLEVEL% neq 0 goto error + +echo SUCCESS +exit /b 0 + +:error + +echo FAILED +exit /b -1 \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Resources/TemplateMissingScaffoldXml/RoleSettings.xml b/src/ServiceManagement/Services/Commands.Test/Resources/TemplateMissingScaffoldXml/RoleSettings.xml new file mode 100644 index 000000000000..a802a5b5ff66 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Resources/TemplateMissingScaffoldXml/RoleSettings.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Resources/TemplateMissingScaffoldXml/WorkerRole.xml b/src/ServiceManagement/Services/Commands.Test/Resources/TemplateMissingScaffoldXml/WorkerRole.xml new file mode 100644 index 000000000000..248ec68c108a --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Resources/TemplateMissingScaffoldXml/WorkerRole.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Resources/TemplateMissingScaffoldXml/good_bat_file.cmd b/src/ServiceManagement/Services/Commands.Test/Resources/TemplateMissingScaffoldXml/good_bat_file.cmd new file mode 100644 index 000000000000..a8fb62abff83 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Resources/TemplateMissingScaffoldXml/good_bat_file.cmd @@ -0,0 +1,82 @@ +$runtimeUrl = $args[0] +$overrideUrl = $args[1] +$current = [string] (Get-Location -PSProvider FileSystem) +$client = New-Object System.Net.WebClient + +# For a custom role, it may not use runtime download, if that's the case, skip. +if (!($runtimeUrl) -and (!$overrideUrl)) { Write-Host "No runtimes to download"; exit; } + +function downloadWithRetry { + param([string]$url, [string]$dest, [int]$retry) + Write-Host + Write-Host "Attempt: $retry" + Write-Host + trap { + Write-Host $_.Exception.ToString() + if ($retry -lt 5) { + $retry=$retry+1 + Write-Host + Write-Host "Waiting 5 seconds and retrying" + Write-Host + Start-Sleep -s 5 + downloadWithRetry $url $dest $retry $client + } + else { + Write-Host "Download failed" + throw "Max number of retries downloading [5] exceeded" + } + } + $client.downloadfile($url, $dest) +} + +function download($url, $dest) { + Write-Host "Downloading $url" + downloadWithRetry $url $dest 1 +} + +function copyOnVerify($file, $output) { + Write-Host "Verifying $file" + $verify = Get-AuthenticodeSignature $file + Out-Host -InputObject $verify + if ($verify.Status -ne "Valid") { + throw "Invalid signature for runtime package $file" + } + else { + mv $file $output + } +} + +if ($overrideUrl) { + Write-Host "Using override url: $overrideUrl" + $url = $overrideUrl +} +else { + $url = $runtimeUrl +} + +foreach($singleUrl in $url -split ";") +{ + $suffix = Get-Random + $downloaddir = $current + "\sandbox" + $suffix + mkdir $downloaddir + $dest = $downloaddir + "\sandbox.exe" + download $singleUrl $dest + $final = $downloaddir + "\runtime.exe" + copyOnVerify $dest $final + if (Test-Path -LiteralPath $final) + { + cd $downloaddir + Start-Process -FilePath $final -ArgumentList -y -Wait + $cmd = $downloaddir + "\setup.cmd" + Start-Process -FilePath $cmd -Wait + } + else + { + throw "Unable to verify package" + } + cd $current + if (Test-Path -LiteralPath $downloaddir) + { + Remove-Item -LiteralPath $downloaddir -Force -Recurse + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/Resources/TemplateMissingScaffoldXml/helper_stuff.cmd b/src/ServiceManagement/Services/Commands.Test/Resources/TemplateMissingScaffoldXml/helper_stuff.cmd new file mode 100644 index 000000000000..b4d82835daa1 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Resources/TemplateMissingScaffoldXml/helper_stuff.cmd @@ -0,0 +1,6 @@ +:workerLoop + +:: Try to keep this worker role alive. +:: Do lot of work here! + +goto workerLoop \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Resources/TemplateMissingScaffoldXml/setup_worker.cmd b/src/ServiceManagement/Services/Commands.Test/Resources/TemplateMissingScaffoldXml/setup_worker.cmd new file mode 100644 index 000000000000..46cdeef9c201 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Resources/TemplateMissingScaffoldXml/setup_worker.cmd @@ -0,0 +1,23 @@ +@echo off + +echo Granting permissions for Network Service to the deployment directory... +icacls . /grant "Users":(OI)(CI)F +if %ERRORLEVEL% neq 0 goto error +echo OK + +if "%EMULATED%"=="true" exit /b 0 + +echo Configuring powershell permissions +powershell -c "set-executionpolicy unrestricted" + +echo Downloading runtime components +powershell .\download.ps1 '%RUNTIMEURL%' '%RUNTIMEURLOVERRIDE%' +if %ERRORLEVEL% neq 0 goto error + +echo SUCCESS +exit /b 0 + +:error + +echo FAILED +exit /b -1 \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/ServiceBus/GetAzureSBLocationTest.cs b/src/ServiceManagement/Services/Commands.Test/ServiceBus/GetAzureSBLocationTest.cs new file mode 100644 index 000000000000..61f82a5edc83 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/ServiceBus/GetAzureSBLocationTest.cs @@ -0,0 +1,64 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Xunit; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.ServiceBus; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.ServiceBus; +using Microsoft.WindowsAzure.Management.ServiceBus.Models; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.ServiceBus +{ + + public class GetAzureSBLocationTests : TestBase + { + public GetAzureSBLocationTests() + { + new FileSystemHelper(this).CreateAzureSdkDirectoryAndImportPublishSettings(); + } + + [Fact] + public void GetAzureSBLocationSuccessfull() + { + // Setup + Mock client = new Mock(); + MockCommandRuntime mockCommandRuntime = new MockCommandRuntime(); + string name = "test"; + GetAzureSBLocationCommand cmdlet = new GetAzureSBLocationCommand() + { + CommandRuntime = mockCommandRuntime, + Client = client.Object + }; + List expected = new List(); + expected.Add(new ServiceBusLocation { Code = name, FullName = name }); + client.Setup(f => f.GetServiceBusRegions()).Returns(expected); + + // Test + cmdlet.ExecuteCmdlet(); + + // Assert + List actual = mockCommandRuntime.OutputPipeline[0] as List; + Assert.Equal(expected.Count, actual.Count); + + for (int i = 0; i < expected.Count; i++) + { + Assert.Equal(expected[i].Code, actual[i].Code); + Assert.Equal(expected[i].FullName, actual[i].FullName); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/ServiceBus/GetAzureSBNamespaceTest.cs b/src/ServiceManagement/Services/Commands.Test/ServiceBus/GetAzureSBNamespaceTest.cs new file mode 100644 index 000000000000..fa71b952eaab --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/ServiceBus/GetAzureSBNamespaceTest.cs @@ -0,0 +1,111 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Xunit; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.ServiceBus; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.ServiceBus; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.ServiceBus +{ + + public class GetAzureSBNamespaceTests : TestBase + { + Mock client; + MockCommandRuntime mockCommandRuntime; + GetAzureSBNamespaceCommand cmdlet; + + public GetAzureSBNamespaceTests() + { + new FileSystemHelper(this).CreateAzureSdkDirectoryAndImportPublishSettings(); + client = new Mock(); + mockCommandRuntime = new MockCommandRuntime(); + cmdlet = new GetAzureSBNamespaceCommand() + { + CommandRuntime = mockCommandRuntime, + Client = client.Object + }; + AzureSession.AuthenticationFactory = new MockTokenAuthenticationFactory(); + } + + [Fact] + public void GetAzureSBNamespaceSuccessfull() + { + // Setup + string name = "test"; + cmdlet.Name = name; + ExtendedServiceBusNamespace expected = new ExtendedServiceBusNamespace { Name = name }; + client.Setup(f => f.GetNamespace(name)).Returns(expected); + + // Test + cmdlet.ExecuteCmdlet(); + + // Assert + ExtendedServiceBusNamespace actual = mockCommandRuntime.OutputPipeline[0] as ExtendedServiceBusNamespace; + Assert.Equal(expected.Name, actual.Name); + } + + [Fact] + public void ListNamespacesSuccessfull() + { + // Setup + string name1 = "test1"; + string name2 = "test2"; + List expected = new List(); + expected.Add(new ExtendedServiceBusNamespace { Name = name1 }); + expected.Add(new ExtendedServiceBusNamespace { Name = name2 }); + client.Setup(f => f.GetNamespace()).Returns(expected); + + // Test + cmdlet.ExecuteCmdlet(); + + // Assert + List actual = mockCommandRuntime.OutputPipeline[0] as List; + Assert.Equal(expected.Count, actual.Count); + for (int i = 0; i < expected.Count; i++) + { + Assert.Equal(expected[i].Name, actual[i].Name); + } + } + + [Fact] + public void GetAzureSBNamespaceWithInvalidNamesFail() + { + // Setup + string[] invalidNames = { "1test", "test#", "test invaid", "-test", "_test" }; + Mock client = new Mock(); + + foreach (string invalidName in invalidNames) + { + MockCommandRuntime mockCommandRuntime = new MockCommandRuntime(); + GetAzureSBNamespaceCommand cmdlet = new GetAzureSBNamespaceCommand() + { + Name = invalidName, + CommandRuntime = mockCommandRuntime, + Client = client.Object + }; + string expected = string.Format("{0}\r\nParameter name: Name", string.Format(Resources.InvalidNamespaceName, invalidName)); + client.Setup(f => f.GetNamespace(invalidName)).Throws(new InvalidOperationException(expected)); + + Testing.AssertThrows(() => cmdlet.ExecuteCmdlet(), expected); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/ServiceBus/NewAzureSBNamespaceTest.cs b/src/ServiceManagement/Services/Commands.Test/ServiceBus/NewAzureSBNamespaceTest.cs new file mode 100644 index 000000000000..088ef0160d6b --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/ServiceBus/NewAzureSBNamespaceTest.cs @@ -0,0 +1,186 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Xunit; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.ServiceBus; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.ServiceBus; +using Microsoft.WindowsAzure.Management.ServiceBus.Models; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.ServiceBus +{ + + public class NewAzureSBNamespaceTests : TestBase + { + public NewAzureSBNamespaceTests() + { + new FileSystemHelper(this).CreateAzureSdkDirectoryAndImportPublishSettings(); + } + + [Fact] + public void NewAzureSBNamespaceSuccessfull() + { + // Setup + MockCommandRuntime mockCommandRuntime = new MockCommandRuntime(); + Mock client = new Mock(); + string name = "test"; + string location = "West US"; + NamespaceType type = NamespaceType.Messaging; + NewAzureSBNamespaceCommand cmdlet = new NewAzureSBNamespaceCommand() + { + Name = name, + Location = location, + NamespaceType = type, + CommandRuntime = mockCommandRuntime, + Client = client.Object + }; + ExtendedServiceBusNamespace expected = new ExtendedServiceBusNamespace { Name = name, Region = location, NamespaceType = type}; + client.Setup(f => f.CreateNamespace(name, location, type, true)).Returns(expected); + client.Setup(f => f.GetServiceBusRegions()).Returns(new List() + { + new ServiceBusLocation () { Code = location } + }); + + // Test + cmdlet.ExecuteCmdlet(); + + // Assert + ExtendedServiceBusNamespace actual = mockCommandRuntime.OutputPipeline[0] as ExtendedServiceBusNamespace; + Assert.Equal(expected, actual); + } + + [Fact] + public void NewAzureSBNamespaceNoACSSuccessfull() + { + // Setup + MockCommandRuntime mockCommandRuntime = new MockCommandRuntime(); + Mock client = new Mock(); + string name = "test1"; + string location = "West US"; + NamespaceType type = NamespaceType.NotificationHub; + NewAzureSBNamespaceCommand cmdlet = new NewAzureSBNamespaceCommand() + { + Name = name, + Location = location, + CreateACSNamespace = false, + NamespaceType = type, + CommandRuntime = mockCommandRuntime, + Client = client.Object + }; + ExtendedServiceBusNamespace expected = new ExtendedServiceBusNamespace { Name = name, Region = location, NamespaceType = type }; + client.Setup(f => f.CreateNamespace(name, location, type, false)).Returns(expected); + client.Setup(f => f.GetServiceBusRegions()).Returns(new List() + { + new ServiceBusLocation () { Code = location } + }); + + // Test + cmdlet.ExecuteCmdlet(); + + // Assert + ExtendedServiceBusNamespace actual = mockCommandRuntime.OutputPipeline[0] as ExtendedServiceBusNamespace; + Assert.Equal(expected, actual); + } + + [Fact] + public void NewAzureSBNamespaceGetsDefaultLocation() + { + // Setup + Mock client = new Mock(); + MockCommandRuntime mockCommandRuntime = new MockCommandRuntime(); + string name = "test"; + string location = "West US"; + NamespaceType type = NamespaceType.NotificationHub; + NewAzureSBNamespaceCommand cmdlet = new NewAzureSBNamespaceCommand() + { + Name = name, + CommandRuntime = mockCommandRuntime, + NamespaceType = type, + Client = client.Object, + Location = location + }; + ExtendedServiceBusNamespace expected = new ExtendedServiceBusNamespace { Name = name, Region = location, NamespaceType = type}; + client.Setup(f => f.CreateNamespace(name, location, type, true)).Returns(expected); + + // Test + cmdlet.ExecuteCmdlet(); + + // Assert + ExtendedServiceBusNamespace actual = mockCommandRuntime.OutputPipeline[0] as ExtendedServiceBusNamespace; + Assert.Equal(expected, actual); + } + + [Fact] + public void NewAzureSBNamespaceWithInvalidNamesFail() + { + // Setup + string[] invalidNames = { "1test", "test#", "test invaid", "-test", "_test" }; + Mock client = new Mock(); + + foreach (string invalidName in invalidNames) + { + MockCommandRuntime mockCommandRuntime = new MockCommandRuntime(); + NewAzureSBNamespaceCommand cmdlet = new NewAzureSBNamespaceCommand() + { + Name = invalidName, + Location = "West US", + NamespaceType = NamespaceType.Messaging, + CommandRuntime = mockCommandRuntime, + Client = client.Object + }; + + string expected = string.Format("{0}\r\nParameter name: Name", string.Format(Resources.InvalidNamespaceName, invalidName)); + client.Setup(f => f.CreateNamespace(invalidName, "West US", NamespaceType.Messaging, true)).Throws(new InvalidOperationException(expected)); + + Testing.AssertThrows(() => cmdlet.ExecuteCmdlet(), expected); + } + } + + [Fact] + public void CreatesNewSBCaseInsensitiveRegion() + { + // Setup + MockCommandRuntime mockCommandRuntime = new MockCommandRuntime(); + Mock client = new Mock(); + string name = "test"; + string location = "West US"; + NamespaceType type = NamespaceType.Messaging; + NewAzureSBNamespaceCommand cmdlet = new NewAzureSBNamespaceCommand() + { + Name = name, + Location = location.ToLower(), + CommandRuntime = mockCommandRuntime, + Client = client.Object + }; + ExtendedServiceBusNamespace expected = new ExtendedServiceBusNamespace { Name = name, Region = location, NamespaceType = NamespaceType.Messaging}; + client.Setup(f => f.CreateNamespace(name, location.ToLower(), type, true)).Returns(expected); + client.Setup(f => f.GetServiceBusRegions()).Returns(new List() + { + new ServiceBusLocation () { Code = location } + }); + + // Test + cmdlet.ExecuteCmdlet(); + + // Assert + ExtendedServiceBusNamespace actual = mockCommandRuntime.OutputPipeline[0] as ExtendedServiceBusNamespace; + Assert.Equal(expected, actual); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/ServiceBus/RemoveAzureSBNamespaceTest.cs b/src/ServiceManagement/Services/Commands.Test/ServiceBus/RemoveAzureSBNamespaceTest.cs new file mode 100644 index 000000000000..08f46a497806 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/ServiceBus/RemoveAzureSBNamespaceTest.cs @@ -0,0 +1,57 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Xunit; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.ServiceBus; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.ServiceBus; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.ServiceBus +{ + + public class RemoveAzureSBNamespaceTests : TestBase + { + public RemoveAzureSBNamespaceTests() + { + new FileSystemHelper(this).CreateAzureSdkDirectoryAndImportPublishSettings(); + } + + [Fact] + public void RemoveAzureSBNamespaceSuccessfull() + { + // Setup + Mock client = new Mock(); + MockCommandRuntime mockCommandRuntime = new MockCommandRuntime(); + string name = "test"; + RemoveAzureSBNamespaceCommand cmdlet = new RemoveAzureSBNamespaceCommand() + { + Name = name, + CommandRuntime = mockCommandRuntime, + PassThru = true, + Client = client.Object + }; + bool deleted = false; + client.Setup(f => f.RemoveNamespace(name)).Callback(() => deleted = true); + + // Test + cmdlet.ExecuteCmdlet(); + + // Assert + Assert.True(deleted); + Assert.True((bool)mockCommandRuntime.OutputPipeline[0]); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Store/GetAzureStoreAddOnTest.cs b/src/ServiceManagement/Services/Commands.Test/Store/GetAzureStoreAddOnTest.cs new file mode 100644 index 000000000000..f0655fb5e0ac --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Store/GetAzureStoreAddOnTest.cs @@ -0,0 +1,162 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using Xunit; +using Microsoft.WindowsAzure.Commands.Store; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.MarketplaceServiceReference; +using Microsoft.WindowsAzure.Commands.Utilities.Store; +using Microsoft.WindowsAzure.Management.Models; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.Store +{ + using Resource = Management.Store.Models.CloudServiceListResponse.CloudService.AddOnResource; + + + public class GetAzureStoreAddOnTests : TestBase + { + Mock mockCommandRuntime; + + Mock mockStoreClient; + + Mock mockMarketplaceClient; + + GetAzureStoreAddOnCommand cmdlet; + + public GetAzureStoreAddOnTests() + { + new FileSystemHelper(this).CreateAzureSdkDirectoryAndImportPublishSettings(); + mockCommandRuntime = new Mock(); + mockStoreClient = new Mock(); + mockMarketplaceClient = new Mock(); + cmdlet = new GetAzureStoreAddOnCommand() + { + StoreClient = mockStoreClient.Object, + CommandRuntime = mockCommandRuntime.Object, + MarketplaceClient = mockMarketplaceClient.Object + }; + } + + [Fact] + public void GetAzureStoreAddOnAvailableAddOnsSuccessfull() + { + // Setup + List actualWindowsAzureOffers = new List(); + mockCommandRuntime.Setup(f => f.WriteObject(It.IsAny(), true)) + .Callback((o, b) => actualWindowsAzureOffers = (List)o); + List plans = new List(); + plans.Add(new Plan() { PlanIdentifier = "Bronze" }); + plans.Add(new Plan() { PlanIdentifier = "Silver" }); + plans.Add(new Plan() { PlanIdentifier = "Gold" }); + plans.Add(new Plan() { PlanIdentifier = "Silver" }); + plans.Add(new Plan() { PlanIdentifier = "Gold" }); + + List expectedOffers = new List() + { + new Offer() { ProviderIdentifier = "Microsoft", OfferIdentifier = "Bing Translate", + ProviderId = new Guid("f8ede0df-591f-4722-b646-e5eb86f0ae52") }, + new Offer() { ProviderIdentifier = "NotExistingCompany", OfferIdentifier = "Not Existing Name", + ProviderId = new Guid("723138c2-0676-4bf6-80d4-0af31479dac4")}, + new Offer() { ProviderIdentifier = "OneSDKCompany", OfferIdentifier = "Microsoft Azure PowerShell", + ProviderId = new Guid("1441f7f7-33a1-4dcf-aeea-8ed8bc1b2e3d") } + }; + List expectedWindowsAzureOffers = new List(); + expectedOffers.ForEach(o => expectedWindowsAzureOffers.Add(new WindowsAzureOffer( + o, + plans, + new List() { "West US", "East US" }))); + + mockMarketplaceClient.Setup(f => f.GetAvailableWindowsAzureOffers(It.IsAny())) + .Returns(expectedWindowsAzureOffers); + mockMarketplaceClient.Setup(f => f.IsKnownProvider(It.IsAny())).Returns(true); + + mockStoreClient.Setup(f => f.GetLocations()) + .Returns(new List() + { + new LocationsListResponse.Location() { Name = "West US" }, + new LocationsListResponse.Location() { Name = "East US" } + }); + cmdlet.ListAvailable = true; + + // Test + cmdlet.ExecuteCmdlet(); + + // Assert + mockMarketplaceClient.Verify(f => f.GetAvailableWindowsAzureOffers(null), Times.Once()); + Assert.Equal(expectedWindowsAzureOffers, actualWindowsAzureOffers); + } + + [Fact] + public void GetAzureStoreAddOnWithEmptyCloudService() + { + // Setup + List expected = new List(); + mockStoreClient.Setup(f => f.GetAddOn(It.IsAny())).Returns(expected); + + // Test + cmdlet.ExecuteCmdlet(); + + // Assert + mockStoreClient.Verify(f => f.GetAddOn(new AddOnSearchOptions(null, null, null)), Times.Once()); + mockCommandRuntime.Verify(f => f.WriteObject(expected, true), Times.Once()); + } + + [Fact] + public void GetAzureStoreAddOnWithoutSearchOptions() + { + // Setup + List expected = new List() + { + new WindowsAzureAddOn(new Resource() { Name = "BingSearchAddOn" }, "West US", "StoreCloudService"), + new WindowsAzureAddOn(new Resource() { Name = "BingTranslateAddOn" }, "West US", "StoreCloudService") + }; + mockCommandRuntime.Setup(f => f.WriteObject(It.IsAny(), true)); + mockStoreClient.Setup(f => f.GetAddOn(It.IsAny())).Returns(expected); + + // Test + cmdlet.ExecuteCmdlet(); + + // Assert + mockStoreClient.Verify(f => f.GetAddOn(new AddOnSearchOptions(null, null, null)), Times.Once()); + mockCommandRuntime.Verify(f => f.WriteObject(expected, true), Times.Once()); + } + + [Fact] + public void GetAzureStoreAddOnWithNameFilter() + { + // Setup + List expected = new List() + { + new WindowsAzureAddOn(new Resource() { Name = "BingTranslateAddOn" }, "West US", "StoreCloudService") + }; + mockCommandRuntime.Setup(f => f.WriteObject(It.IsAny(), true)); + mockStoreClient.Setup(f => f.GetAddOn(new AddOnSearchOptions("BingTranslateAddOn", null, null))) + .Returns(expected); + cmdlet.Name = "BingTranslateAddOn"; + + // Test + cmdlet.ExecuteCmdlet(); + + // Assert + mockStoreClient.Verify( + f => f.GetAddOn(new AddOnSearchOptions("BingTranslateAddOn", null, null)), + Times.Once()); + mockCommandRuntime.Verify(f => f.WriteObject(expected, true), Times.Once()); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Store/NewAzureStoreAddOnTest.cs b/src/ServiceManagement/Services/Commands.Test/Store/NewAzureStoreAddOnTest.cs new file mode 100644 index 000000000000..915b5b59e9b6 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Store/NewAzureStoreAddOnTest.cs @@ -0,0 +1,134 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Xunit; +using Microsoft.WindowsAzure.Commands.Store; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Store; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.Store +{ + + public class NewAzureStoreAddOnTests : TestBase + { + Mock mockCommandRuntime; + + Mock mockStoreClient; + + Mock mockConfirmation; + + NewAzureStoreAddOnCommand cmdlet; + + public NewAzureStoreAddOnTests() + { + new FileSystemHelper(this).CreateAzureSdkDirectoryAndImportPublishSettings(); + mockCommandRuntime = new Mock(); + mockStoreClient = new Mock(); + mockConfirmation = new Mock(); + cmdlet = new NewAzureStoreAddOnCommand() + { + StoreClient = mockStoreClient.Object, + CommandRuntime = mockCommandRuntime.Object, + CustomConfirmation = mockConfirmation.Object + }; + } + + [Fact] + public void NewAzureStoreAddOnWithSuccessful() + { + // Setup + bool expected = true; + WindowsAzureAddOn addon; + string name = "TestAddOn"; + string location = "West US"; + string addonId = "Search"; + string plan = "free"; + string message = "Expected message for new"; + cmdlet.Name = name; + cmdlet.AddOn = addonId; + cmdlet.Plan = plan; + cmdlet.Location = location; + mockConfirmation.Setup(f => f.ShouldProcess(Resources.NewAddOnConformation, message)).Returns(true); + mockStoreClient.Setup(f => f.TryGetAddOn(name, out addon)).Returns(false); + mockStoreClient.Setup(f => f.NewAddOn(name, addonId, plan, location, null)); + mockStoreClient.Setup(f => f.GetConfirmationMessage(OperationType.New, addonId, plan)).Returns(message); + + // Test + cmdlet.ExecuteCmdlet(); + + // Assert + mockStoreClient.Verify(f => f.NewAddOn(name, addonId, plan, location, null), Times.Once()); + mockConfirmation.Verify(f => f.ShouldProcess(Resources.NewAddOnConformation, message), Times.Once()); + mockCommandRuntime.Verify(f => f.WriteObject(expected), Times.Once()); + } + + [Fact] + public void NewAzureStoreAddOnWithNoConfirmation() + { + // Setup + bool expected = true; + WindowsAzureAddOn addon; + string name = "TestAddOn"; + string location = "West US"; + string addonId = "Search"; + string plan = "free"; + string message = "Expected message for new"; + cmdlet.Name = name; + cmdlet.AddOn = addonId; + cmdlet.Plan = plan; + cmdlet.Location = location; + mockConfirmation.Setup(f => f.ShouldProcess(Resources.NewAddOnConformation, message)).Returns(false); + mockStoreClient.Setup(f => f.TryGetAddOn(name, out addon)).Returns(false); + mockStoreClient.Setup(f => f.NewAddOn(name, addonId, plan, location, null)); + mockStoreClient.Setup(f => f.GetConfirmationMessage(OperationType.New, addonId, plan)).Returns(message); + + // Test + cmdlet.ExecuteCmdlet(); + + // Assert + mockStoreClient.Verify(f => f.NewAddOn(name, addonId, plan, location, null), Times.Never()); + mockConfirmation.Verify(f => f.ShouldProcess(Resources.NewAddOnConformation, message), Times.Once()); + mockCommandRuntime.Verify(f => f.WriteObject(expected), Times.Never()); + } + + [Fact] + public void NewAzureStoreAddOnWithNameAlreadyUsed() + { + // Setup + WindowsAzureAddOn addon; + string name = "TestAddOn"; + string location = "West US"; + string addonId = "Search"; + string plan = "free"; + string message = "Expected message for new"; + cmdlet.Name = name; + cmdlet.AddOn = addonId; + cmdlet.Plan = plan; + cmdlet.Location = location; + mockConfirmation.Setup(f => f.ShouldProcess(Resources.NewAddOnConformation, message)).Returns(true); + mockStoreClient.Setup(f => f.TryGetAddOn(name, out addon)).Returns(true); + mockStoreClient.Setup(f => f.NewAddOn(name, addonId, plan, location, null)); + mockStoreClient.Setup(f => f.GetConfirmationMessage(OperationType.New, addonId, plan)).Returns(message); + + // Test + Testing.AssertThrows( + () => cmdlet.ExecuteCmdlet(), + string.Format(Resources.AddOnNameAlreadyUsed, name)); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Store/RemoveAzureStoreAddOnTest.cs b/src/ServiceManagement/Services/Commands.Test/Store/RemoveAzureStoreAddOnTest.cs new file mode 100644 index 000000000000..a04966280421 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Store/RemoveAzureStoreAddOnTest.cs @@ -0,0 +1,124 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Xunit; +using Microsoft.WindowsAzure.Commands.Store; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Store; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.Store +{ + using Resource = Management.Store.Models.CloudServiceListResponse.CloudService.AddOnResource; + + + public class RemoveAzureStoreAddOnTests : TestBase + { + Mock mockCommandRuntime; + + Mock mockStoreClient; + + Mock mockConfirmation; + + RemoveAzureStoreAddOnCommand cmdlet; + + public RemoveAzureStoreAddOnTests() + { + new FileSystemHelper(this).CreateAzureSdkDirectoryAndImportPublishSettings(); + mockCommandRuntime = new Mock(); + mockStoreClient = new Mock(); + mockConfirmation = new Mock(); + cmdlet = new RemoveAzureStoreAddOnCommand() + { + StoreClient = mockStoreClient.Object, + CommandRuntime = mockCommandRuntime.Object, + CustomConfirmation = mockConfirmation.Object + }; + } + + [Fact] + public void RemoveAzureStoreAddOnWithSuccessful() + { + // Setup + bool expected = true; + string name = "TestAddOn"; + string addonId = "Search"; + string message = "Expected message for remove"; + cmdlet.Name = name; + WindowsAzureAddOn addon = new WindowsAzureAddOn(new Resource() { Type = addonId }, "West US", null); + mockConfirmation.Setup(f => f.ShouldProcess(Resources.RemoveAddOnConformation, message)).Returns(true); + mockStoreClient.Setup(f => f.RemoveAddOn(name)); + mockStoreClient.Setup(f => f.GetConfirmationMessage(OperationType.Remove, null, null)).Returns(message); + + // Test + cmdlet.ExecuteCmdlet(); + + // Assert + mockStoreClient.Verify(f => f.RemoveAddOn(name), Times.Once()); + mockConfirmation.Verify(f => f.ShouldProcess(Resources.RemoveAddOnConformation, message), Times.Once()); + mockCommandRuntime.Verify(f => f.WriteObject(expected), Times.Never()); + } + + [Fact] + public void RemoveAzureStoreAddOnWithPassThru() + { + // Setup + bool expected = true; + string name = "TestAddOn"; + string addonId = "Search"; + string message = "Expected message for remove"; + cmdlet.Name = name; + cmdlet.PassThru = true; + WindowsAzureAddOn addon = new WindowsAzureAddOn(new Resource() { Type = addonId }, "West US", null); + mockConfirmation.Setup(f => f.ShouldProcess(Resources.RemoveAddOnConformation, message)).Returns(true); + mockStoreClient.Setup(f => f.TryGetAddOn(name, out addon)).Returns(true); + mockStoreClient.Setup(f => f.RemoveAddOn(name)); + mockStoreClient.Setup(f => f.GetConfirmationMessage(OperationType.Remove, null, null)).Returns(message); + + // Test + cmdlet.ExecuteCmdlet(); + + // Assert + mockStoreClient.Verify(f => f.RemoveAddOn(name), Times.Once()); + mockConfirmation.Verify(f => f.ShouldProcess(Resources.RemoveAddOnConformation, message), Times.Once()); + mockCommandRuntime.Verify(f => f.WriteObject(expected), Times.Once()); + } + + [Fact] + public void RemoveAzureStoreAddOnWithNo() + { + // Setup + bool expected = true; + string name = "TestAddOn"; + string addonId = "Search"; + string message = "Expected message for remove"; + cmdlet.Name = name; + WindowsAzureAddOn addon = new WindowsAzureAddOn(new Resource() { Type = addonId }, "West US", null); + mockConfirmation.Setup(f => f.ShouldProcess(Resources.RemoveAddOnConformation, message)).Returns(false); + mockStoreClient.Setup(f => f.TryGetAddOn(name, out addon)).Returns(true); + mockStoreClient.Setup(f => f.RemoveAddOn(name)); + mockStoreClient.Setup(f => f.GetConfirmationMessage(OperationType.Remove, null, null)).Returns(message); + + // Test + cmdlet.ExecuteCmdlet(); + + // Assert + mockStoreClient.Verify(f => f.RemoveAddOn(name), Times.Never()); + mockConfirmation.Verify(f => f.ShouldProcess(Resources.RemoveAddOnConformation, message), Times.Once()); + mockCommandRuntime.Verify(f => f.WriteObject(expected), Times.Never()); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Store/SetAzureStoreAddOnTest.cs b/src/ServiceManagement/Services/Commands.Test/Store/SetAzureStoreAddOnTest.cs new file mode 100644 index 000000000000..7d3b8368b3a8 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Store/SetAzureStoreAddOnTest.cs @@ -0,0 +1,131 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Xunit; +using Microsoft.WindowsAzure.Commands.Store; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Store; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.Store +{ + using Resource = Management.Store.Models.CloudServiceListResponse.CloudService.AddOnResource; + + + public class SetAzureStoreAddOnTests : TestBase + { + Mock mockCommandRuntime; + + Mock mockStoreClient; + + Mock mockConfirmation; + + SetAzureStoreAddOnCommand cmdlet; + + public SetAzureStoreAddOnTests() + { + new FileSystemHelper(this).CreateAzureSdkDirectoryAndImportPublishSettings(); + mockCommandRuntime = new Mock(); + mockStoreClient = new Mock(); + mockConfirmation = new Mock(); + cmdlet = new SetAzureStoreAddOnCommand() + { + StoreClient = mockStoreClient.Object, + CommandRuntime = mockCommandRuntime.Object, + CustomConfirmation = mockConfirmation.Object + }; + } + + [Fact] + public void SetAzureStoreAddOnWithSuccessful() + { + // Setup + bool expected = true; + string name = "TestAddOn"; + string addonId = "Search"; + string plan = "free"; + string message = "Expected message for set"; + cmdlet.Name = name; + cmdlet.Plan = plan; + WindowsAzureAddOn addon = new WindowsAzureAddOn(new Resource() { Type = addonId }, "West US", null); + mockConfirmation.Setup(f => f.ShouldProcess(Resources.SetAddOnConformation, message)).Returns(true); + mockStoreClient.Setup(f => f.TryGetAddOn(name, out addon)).Returns(true); + mockStoreClient.Setup(f => f.UpdateAddOn(name, plan, null)); + mockStoreClient.Setup(f => f.GetConfirmationMessage(OperationType.Set, addonId, plan)).Returns(message); + + // Test + cmdlet.ExecuteCmdlet(); + + // Assert + mockStoreClient.Verify(f => f.UpdateAddOn(name, plan, null), Times.Once()); + mockConfirmation.Verify(f => f.ShouldProcess(Resources.SetAddOnConformation, message), Times.Once()); + mockCommandRuntime.Verify(f => f.WriteObject(expected), Times.Never()); + } + + [Fact] + public void SetAzureStoreAddOnWithPassThru() + { + // Setup + bool expected = true; + string name = "TestAddOn"; + string addonId = "Search"; + string plan = "free"; + string message = "Expected message for set"; + cmdlet.Name = name; + cmdlet.Plan = plan; + cmdlet.PassThru = true; + WindowsAzureAddOn addon = new WindowsAzureAddOn(new Resource() { Type = addonId }, "West US", null); + mockConfirmation.Setup(f => f.ShouldProcess(Resources.SetAddOnConformation, message)).Returns(true); + mockStoreClient.Setup(f => f.TryGetAddOn(name, out addon)).Returns(true); + mockStoreClient.Setup(f => f.UpdateAddOn(name, plan, null)); + mockStoreClient.Setup(f => f.GetConfirmationMessage(OperationType.Set, addonId, plan)).Returns(message); + + // Test + cmdlet.ExecuteCmdlet(); + + // Assert + mockStoreClient.Verify(f => f.UpdateAddOn(name, plan, null), Times.Once()); + mockConfirmation.Verify(f => f.ShouldProcess(Resources.SetAddOnConformation, message), Times.Once()); + mockCommandRuntime.Verify(f => f.WriteObject(expected), Times.Once()); + } + + [Fact] + public void SetAzureStoreAddOnWithNo() + { + // Setup + bool expected = true; + string name = "TestAddOn"; + string addonId = "Search"; + string plan = "free"; + string message = "Expected message for set"; + cmdlet.Name = name; + cmdlet.Plan = plan; + WindowsAzureAddOn addon = new WindowsAzureAddOn(new Resource() { Type = addonId }, "West US", null); + mockConfirmation.Setup(f => f.ShouldProcess(Resources.SetAddOnConformation, message)).Returns(false); + mockStoreClient.Setup(f => f.TryGetAddOn(name, out addon)).Returns(true); + mockStoreClient.Setup(f => f.UpdateAddOn(name, plan, null)); + mockStoreClient.Setup(f => f.GetConfirmationMessage(OperationType.Set, addonId, plan)).Returns(message); + + // Test + cmdlet.ExecuteCmdlet(); + + // Assert + mockStoreClient.Verify(f => f.UpdateAddOn(name, plan, null), Times.Never()); + mockConfirmation.Verify(f => f.ShouldProcess(Resources.SetAddOnConformation, message), Times.Once()); + mockCommandRuntime.Verify(f => f.WriteObject(expected), Times.Never()); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/Common/WebClientFactoryTests.cs b/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/Common/WebClientFactoryTests.cs new file mode 100644 index 000000000000..baabe3641c42 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/Common/WebClientFactoryTests.cs @@ -0,0 +1,44 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Xunit; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.WebClient; + +namespace Microsoft.WindowsAzure.Commands.Test.WAPackIaaS +{ + + public class WebClientFactoryTests + { + [Fact] + [Trait("Type", "WAPackIaaS-Negative")] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldThrowWithNullSubscription() + { + var factory = new WebClientFactory(null, null); + Assert.Throws(() => factory.CreateClient(string.Empty)); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldCreateWAPackIaaSClient() + { + var factory = new WebClientFactory(new Subscription(), null); + Assert.NotNull(factory.CreateClient("a")); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/Mocks/MockLogger.cs b/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/Mocks/MockLogger.cs new file mode 100644 index 000000000000..e966d784a6f0 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/Mocks/MockLogger.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS; + +namespace Microsoft.WindowsAzure.Commands.Test.WAPackIaaS.Mocks +{ + internal class MockLogger : ILogger + { + public void Log(LogLevel logLevel, string message) + { + //do nothing + } + } +} + diff --git a/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/Mocks/MockRequestChannel.cs b/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/Mocks/MockRequestChannel.cs new file mode 100644 index 000000000000..26f32d3681b9 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/Mocks/MockRequestChannel.cs @@ -0,0 +1,142 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using Xunit; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.WebClient; + +namespace Microsoft.WindowsAzure.Commands.Test.WAPackIaaS.Mocks +{ + internal class MockRequestChannel : IRequestChannel + { + //Queue of simulated server responses. One tuple (if present) is dequeued and returned + //to the client for each call to IssueRequestAndGetResponse + private Queue, WebHeaderCollection>> requestResponseQueue; + + //Stores a list of client requests sent through the channel. Unit tests can check the list. + public List> ClientRequests; + + private Dictionary expectedValues; + private Dictionary expectedHeaders; + + public MockRequestChannel() + { + requestResponseQueue = new Queue, WebHeaderCollection>>(); + ClientRequests = new List>(); + expectedValues = new Dictionary(); + expectedHeaders = new Dictionary(); + } + + public static MockRequestChannel Create() + { + return new MockRequestChannel(); + } + + /// + /// Enqueues a response list and a list of headers to return to clients + /// + /// + /// A list of objects. For example, could be list of VirtualMachines to simulate + /// a response to a client's GET. + /// + /// List of headers to be returned to the client. + /// + public MockRequestChannel AddReturnObject(List response, WebHeaderCollection responseHeaders) + { + var toEnqueue = new Tuple, WebHeaderCollection>(response, responseHeaders); + requestResponseQueue.Enqueue(toEnqueue); + return this; + } + + public MockRequestChannel AddReturnObject(object response, WebHeaderCollection responseHeaders) + { + return this.AddReturnObject(new List { response }, responseHeaders); + } + + public MockRequestChannel AddReturnObject(object response) + { + return this.AddReturnObject(new List {response}, null); + } + + public MockRequestChannel AddReturnObject(List response) + { + return this.AddReturnObject(response, null); + } + + public List IssueRequestAndGetResponse(HttpWebRequest requestInfo, out WebHeaderCollection responseHeaders, string payload = null) + { + //Record the request that the client made so that we can examine it later in test code + ClientRequests.Add(new Tuple(requestInfo, payload)); + + var responseList = new List(); + responseHeaders = null; + + if (requestResponseQueue.Any()) + { + var tuple = requestResponseQueue.Dequeue(); + + //Response can be null if we need to return empty list, but still need to set headers + //E.g., for testing DELETE + if (tuple.Item1 != null) + responseList = tuple.Item1.Select(obj => (T)obj).ToList(); + responseHeaders = tuple.Item2; + } + + return responseList; + } + + internal IList DeserializeClientPayload(string payload) + { + var jsonHelper = new JsonHelpers(); + return jsonHelper.Deserialize(payload); + } + + public MockRequestChannel AddExpectedValue(string varName, object expectedValue) + { + expectedValues.Add(varName, expectedValue); + return this; + } + + public MockRequestChannel AddExpectedHeader(string headerName, string headerValue) + { + expectedHeaders.Add(headerName, headerValue); + return this; + } + + private void VerifyValues(HttpWebRequest request) + { + foreach (var value in expectedValues) + { + var property = request.GetType().GetProperty(value.Key); + + if (property == null) + throw new ArgumentNullException(); + + object actualValue = property.GetValue(request, null); + Assert.Equal(value.Value, actualValue); + } + } + + private void VerifyHeaders(WebHeaderCollection actualHeaders) + { + foreach (var eHeader in this.expectedHeaders) + { + Assert.Equal(actualHeaders[eHeader.Key], eHeader.Value); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/Operations/CloudServiceOperationsTests.cs b/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/Operations/CloudServiceOperationsTests.cs new file mode 100644 index 000000000000..30751b975811 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/Operations/CloudServiceOperationsTests.cs @@ -0,0 +1,162 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using Xunit; +using Microsoft.WindowsAzure.Commands.Test.WAPackIaaS.Mocks; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.WebClient; + +namespace Microsoft.WindowsAzure.Commands.Test.WAPackIaaS.Operations +{ + + public class CloudServiceOperationsTests + { + private const string baseURI = "/CloudServices"; + + private const string cloudServiceName = "CloudService01"; + private const string cloudServiceLabel = "CloudService01-Label"; + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldCreateOneCloudService() + { + var mockChannel = new MockRequestChannel(); + + var cloudServiceToCreate = new Commands.Utilities.WAPackIaaS.DataContract.CloudService { Name = cloudServiceName, Label = cloudServiceLabel }; + var cloudServiceToReturn = new Commands.Utilities.WAPackIaaS.DataContract.CloudService + { + Name = cloudServiceName, + Label = cloudServiceLabel, + }; + mockChannel.AddReturnObject(cloudServiceToReturn, new WebHeaderCollection { "x-ms-request-id:" + Guid.NewGuid() }); + + Guid? jobOut; + var cloudServiceOperations = new CloudServiceOperations(new WebClientFactory(new Subscription(), mockChannel)); + var createdCloudService = cloudServiceOperations.Create(cloudServiceToCreate, out jobOut); + + Assert.NotNull(createdCloudService); + Assert.True(createdCloudService is Commands.Utilities.WAPackIaaS.DataContract.CloudService); + Assert.Equal(cloudServiceToReturn.Name, createdCloudService.Name); + Assert.Equal(cloudServiceToReturn.Label, createdCloudService.Label); + + var requestList = mockChannel.ClientRequests; + Assert.Equal(1, requestList.Count); + Assert.Equal(HttpMethod.Post.ToString(), requestList[0].Item1.Method); + + // Check the URI (for Azure consistency) + Assert.Equal(baseURI, mockChannel.ClientRequests[0].Item1.Address.AbsolutePath.Substring(1)); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldReturnOneCloudService() + { + var mockChannel = new MockRequestChannel(); + mockChannel.AddReturnObject(new Commands.Utilities.WAPackIaaS.DataContract.CloudService { Name = cloudServiceName, Label = cloudServiceLabel }); + mockChannel.AddReturnObject(new CloudResource()); + + var cloudServiceOperations = new CloudServiceOperations(new WebClientFactory(new Subscription(), mockChannel)); + Assert.Equal(1, cloudServiceOperations.Read().Count); + + // Check the URI (for Azure consistency) + var requestList = mockChannel.ClientRequests; + Assert.Equal(3, requestList.Count); + Assert.Equal(baseURI, mockChannel.ClientRequests[0].Item1.Address.AbsolutePath.Substring(1)); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldReturnOneCloudServiceByName() + { + var mockChannel = new MockRequestChannel(); + mockChannel.AddReturnObject(new Commands.Utilities.WAPackIaaS.DataContract.CloudService { Name = cloudServiceName, Label = cloudServiceLabel }); + mockChannel.AddReturnObject(new CloudResource()); + + var cloudServiceOperations = new CloudServiceOperations(new WebClientFactory(new Subscription(), mockChannel)); + Assert.Equal(cloudServiceName, cloudServiceOperations.Read(cloudServiceName).Name); + + // Check the URI (for Azure consistency) + var requestList = mockChannel.ClientRequests; + Assert.Equal(3, requestList.Count); + Assert.Equal(baseURI + "/" + cloudServiceName, mockChannel.ClientRequests[0].Item1.Address.AbsolutePath.Substring(1)); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldReturnMultipleCloudServices() + { + var mockChannel = new MockRequestChannel(); + var cldList = new List + { + new Commands.Utilities.WAPackIaaS.DataContract.CloudService { Name = cloudServiceName, Label = cloudServiceLabel }, + new Commands.Utilities.WAPackIaaS.DataContract.CloudService { Name = cloudServiceName, Label = cloudServiceLabel } + }; + mockChannel.AddReturnObject(cldList); + mockChannel.AddReturnObject(new CloudResource()).AddReturnObject(new VMRole { Name = "VMRole01", Label = "VMRole01-Label" }).AddReturnObject(new VM {}); + mockChannel.AddReturnObject(new CloudResource()).AddReturnObject(new VMRole { Name = "VMRole01", Label = "VMRole01-Label" }).AddReturnObject(new VM {}); + + var cloudServiceOperations = new CloudServiceOperations(new WebClientFactory(new Subscription(), mockChannel)); + var cloudServiceList = cloudServiceOperations.Read(); + + Assert.Equal(2, cloudServiceList.Count); + Assert.True(cloudServiceList.All(cloudService => cloudService.Name == cloudServiceName)); + + // Check the URI (for Azure consistency) + var requestList = mockChannel.ClientRequests; + Assert.Equal(7, requestList.Count); + Assert.Equal(baseURI, mockChannel.ClientRequests[0].Item1.Address.AbsolutePath.Substring(1)); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldDeleteCloudService() + { + var mockChannel = new MockRequestChannel(); + mockChannel.AddReturnObject(new Commands.Utilities.WAPackIaaS.DataContract.CloudService { Name = cloudServiceName, Label = cloudServiceLabel }, new WebHeaderCollection { "x-ms-request-id:" + Guid.NewGuid() }); + + Guid? jobOut; + var cloudServiceOperations = new CloudServiceOperations(new WebClientFactory(new Subscription(), mockChannel)); + cloudServiceOperations.Delete(cloudServiceName, out jobOut); + + var requestList = mockChannel.ClientRequests; + Assert.Equal(1, requestList.Count); + Assert.Equal(HttpMethod.Delete.ToString(), requestList[0].Item1.Method); + + // Check the URI (for Azure consistency) + Assert.Equal(baseURI + "/" + cloudServiceName, mockChannel.ClientRequests[0].Item1.Address.AbsolutePath.Substring(1)); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + [Trait("Type", "WAPackIaaS-Negative")] + public void ShouldReturnEmptyOnNoResult() + { + var cloudServiceOperations = new CloudServiceOperations(new WebClientFactory(new Subscription(), MockRequestChannel.Create())); + Assert.False(cloudServiceOperations.Read().Any()); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/Operations/JobOperationsTests.cs b/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/Operations/JobOperationsTests.cs new file mode 100644 index 000000000000..852debc89027 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/Operations/JobOperationsTests.cs @@ -0,0 +1,124 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Xunit; +using Microsoft.WindowsAzure.Commands.Test.WAPackIaaS.Mocks; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.WebClient; + +namespace Microsoft.WindowsAzure.Commands.Test.WAPackIaaS.Operations +{ + + public class JobOperationsTests + { + /// + /// Tests WaitOnJob with no timeout and a job that completes immediately. + /// + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void WaitOnJobCompletesImmediately() + { + Guid jobId = Guid.NewGuid(); + + MockRequestChannel mockChannel = MockRequestChannel.Create(); + mockChannel.AddReturnObject(new Job {Name = "TestJob", ID = jobId, IsCompleted = true}); + + var jobOperations = new JobOperations(new WebClientFactory( + new Subscription(), + mockChannel)); + DateTime start = DateTime.Now; + jobOperations.WaitOnJob(jobId); + Assert.True((DateTime.Now - start).TotalMilliseconds < 500); + } + + /// + /// Tests WaitOnJob with a timeout where the the Job does not complete before timeout occurs + /// + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void WaitOnJobTimeoutJobNotFinished() + { + Guid jobId = Guid.NewGuid(); + + MockRequestChannel mockChannel = MockRequestChannel.Create(); + mockChannel.AddReturnObject(new Job { Name = "TestJob", ID = jobId, IsCompleted = false, Status = "Running" }); + mockChannel.AddReturnObject(new Job { Name = "TestJob", ID = jobId, IsCompleted = false, Status = "Running" }); + mockChannel.AddReturnObject(new Job { Name = "TestJob", ID = jobId, IsCompleted = false, Status = "Running" }); + mockChannel.AddReturnObject(new Job { Name = "TestJob", ID = jobId, IsCompleted = false, Status = "Running" }); + mockChannel.AddReturnObject(new Job { Name = "TestJob", ID = jobId, IsCompleted = false, Status = "Running" }); + mockChannel.AddReturnObject(new Job { Name = "TestJob", ID = jobId, IsCompleted = false, Status = "Running" }); + mockChannel.AddReturnObject(new Job { Name = "TestJob", ID = jobId, IsCompleted = false, Status = "Running" }); + + var jobOperations = new JobOperations(new WebClientFactory( + new Subscription(), + mockChannel)); + DateTime start = DateTime.Now; + var result = jobOperations.WaitOnJob(jobId, 6000); + var diff = (DateTime.Now - start).TotalMilliseconds; + Assert.True(diff > 6000); + Assert.Equal(JobStatusEnum.OperationTimedOut, result.jobStatus); + } + + /// + /// Tests WaitOnJob with empty response (no job) from server + /// + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + [Trait("Type", "WAPackIaaS-Negative")] + public void ShouldReturnJobNotFoundOnNonexistantJob() + { + Guid jobId = Guid.NewGuid(); + + MockRequestChannel mockChannel = MockRequestChannel.Create(); + + var jobOperations = new JobOperations(new WebClientFactory( + new Subscription(), + mockChannel)); + + var result = jobOperations.WaitOnJob(jobId); + + Assert.Equal(JobStatusEnum.JobNotFound, result.jobStatus); + } + + /// + /// Tests WaitOnJob with a timeout where the job completes before the timeout occurs + /// + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void WaitOnJobTimeoutJobFinished() + { + Guid jobId = Guid.NewGuid(); + + MockRequestChannel mockChannel = MockRequestChannel.Create(); + mockChannel.AddReturnObject(new Job { Name = "TestJob", ID = jobId, IsCompleted = false, Status = "Running" }); + mockChannel.AddReturnObject(new Job { Name = "TestJob", ID = jobId, IsCompleted = true, Status = "Completed" }); + + var jobOperations = new JobOperations(new WebClientFactory( + new Subscription(), + mockChannel)); + DateTime start = DateTime.Now; + var result = jobOperations.WaitOnJob(jobId, 50000); + var diff = (DateTime.Now - start).TotalMilliseconds; + Assert.True(diff < 50000); + Assert.Equal(JobStatusEnum.CompletedSuccessfully, result.jobStatus); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/Operations/LogicalNetworkOperationsTests.cs b/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/Operations/LogicalNetworkOperationsTests.cs new file mode 100644 index 000000000000..195044558d8f --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/Operations/LogicalNetworkOperationsTests.cs @@ -0,0 +1,89 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Microsoft.WindowsAzure.Commands.Test.WAPackIaaS.Mocks; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.WebClient; + +namespace Microsoft.WindowsAzure.Commands.Test.WAPackIaaS.Operations +{ + + public class LogicalNetworkOperationsTests + { + private const string logicalNetworkName = "LogicalNetwork01"; + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldReturnOneLogicalNetwork() + { + var mockChannel = new MockRequestChannel(); + mockChannel.AddReturnObject(new LogicalNetwork { ID = Guid.Empty, CloudId = Guid.Empty, Name = logicalNetworkName }); + + var logicalNetworkOperations = new LogicalNetworkOperations(new WebClientFactory(new Subscription(), mockChannel)); + Assert.Equal(1, logicalNetworkOperations.Read().Count); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldReturnOneLogicalNetworkByName() + { + var mockChannel = new MockRequestChannel(); + mockChannel.AddReturnObject(new LogicalNetwork { ID = Guid.Empty, CloudId = Guid.Empty, Name = logicalNetworkName }); + + var logicalNetworkOperations = new LogicalNetworkOperations(new WebClientFactory(new Subscription(), mockChannel)); + var logicalNetworkList = logicalNetworkOperations.Read(logicalNetworkName); + + Assert.Equal(1, logicalNetworkList.Count); + Assert.Equal(logicalNetworkName, logicalNetworkList.First().Name); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldReturnMultipleLogicalNetworks() + { + var mockChannel = new MockRequestChannel(); + var logicalNetworks = new List + { + new LogicalNetwork { ID = Guid.Empty, CloudId = Guid.Empty, Name = logicalNetworkName }, + new LogicalNetwork { ID = Guid.Empty, CloudId = Guid.Empty, Name = logicalNetworkName } + }; + mockChannel.AddReturnObject(logicalNetworks); + + var logicalNetworkOperations = new LogicalNetworkOperations(new WebClientFactory(new Subscription(), mockChannel)); + var logicalNetworkList = logicalNetworkOperations.Read(); + + Assert.Equal(2, logicalNetworkList.Count); + Assert.True(logicalNetworkList.All(logicalNetwork => logicalNetwork.Name == logicalNetworkName)); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + [Trait("Type", "WAPackIaaS-Negative")] + public void ShouldReturnEmptyOnNoResult() + { + var logicalNetworkOperations = new LogicalNetworkOperations(new WebClientFactory(new Subscription(), MockRequestChannel.Create())); + Assert.False(logicalNetworkOperations.Read().Any()); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/Operations/StaticIPAddressPoolOperationsTests.cs b/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/Operations/StaticIPAddressPoolOperationsTests.cs new file mode 100644 index 000000000000..99edc8b49db5 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/Operations/StaticIPAddressPoolOperationsTests.cs @@ -0,0 +1,140 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Net; +using System.Net.Http; +using Xunit; +using Microsoft.WindowsAzure.Commands.Test.WAPackIaaS.Mocks; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.WebClient; + +namespace Microsoft.WindowsAzure.Commands.Test.WAPackIaaS.Operations +{ + + public class StaticIPAddressPoolOperationsTests + { + private const string baseURI = "/StaticIPAddressPools"; + + private const string ipAddressRangeStart = "192.168.1.2"; + private const string ipAddressRangeEnd = "192.168.1.3"; + private const string staticIPAddressPoolName = "StaticIPAddressPool01"; + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldCreateOneStaticIPAddressPool() + { + var mockChannel = new MockRequestChannel(); + + var staticIPAddressPoolToCreate = new StaticIPAddressPool() + { + Name = staticIPAddressPoolName, + VMSubnetId = Guid.Empty, + IPAddressRangeStart = ipAddressRangeStart, + IPAddressRangeEnd = ipAddressRangeEnd, + StampId = Guid.Empty + }; + + var staticIPAddressPoolToReturn = new StaticIPAddressPool() + { + Name = staticIPAddressPoolName, + IPAddressRangeStart = ipAddressRangeStart, + IPAddressRangeEnd = ipAddressRangeEnd, + StampId = Guid.Empty + }; + + mockChannel.AddReturnObject(staticIPAddressPoolToReturn, new WebHeaderCollection { "x-ms-request-id:" + Guid.NewGuid() }); + + Guid? jobOut; + var staticIPAddressPoolOperations = new StaticIPAddressPoolOperations(new WebClientFactory(new Subscription(), mockChannel)); + var createdStaticIPAddressPool = staticIPAddressPoolOperations.Create(staticIPAddressPoolToCreate, out jobOut); + + Assert.NotNull(createdStaticIPAddressPool); + Assert.True(createdStaticIPAddressPool is StaticIPAddressPool); + Assert.Equal(staticIPAddressPoolToReturn.Name, createdStaticIPAddressPool.Name); + Assert.Equal(staticIPAddressPoolToReturn.VMSubnetId, createdStaticIPAddressPool.VMSubnetId); + Assert.Equal(staticIPAddressPoolToReturn.IPAddressRangeStart, createdStaticIPAddressPool.IPAddressRangeStart); + Assert.Equal(staticIPAddressPoolToReturn.IPAddressRangeEnd, createdStaticIPAddressPool.IPAddressRangeEnd); + Assert.Equal(staticIPAddressPoolToReturn.StampId, createdStaticIPAddressPool.StampId); + + var requestList = mockChannel.ClientRequests; + Assert.Equal(1, requestList.Count); + Assert.Equal(HttpMethod.Post.ToString(), requestList[0].Item1.Method); + + // Check the URI + Assert.Equal(baseURI, mockChannel.ClientRequests[0].Item1.Address.AbsolutePath.Substring(1)); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldReturnOneStaticIPAddressPool() + { + var mockChannel = new MockRequestChannel(); + + var staticIPAddressPoolToCreate = new StaticIPAddressPool() + { + Name = staticIPAddressPoolName, + VMSubnetId = Guid.Empty, + IPAddressRangeStart = ipAddressRangeStart, + IPAddressRangeEnd = ipAddressRangeEnd, + StampId = Guid.Empty + }; + mockChannel.AddReturnObject(staticIPAddressPoolToCreate); + + var staticIPAddressPoolOperations = new StaticIPAddressPoolOperations(new WebClientFactory(new Subscription(), mockChannel)); + var readStaticIPAddressPool = staticIPAddressPoolOperations.Read(new VMSubnet(){ StampId = Guid.Empty, ID = Guid.Empty }); + Assert.Equal(1, readStaticIPAddressPool.Count); + + // Check the URI + var requestList = mockChannel.ClientRequests; + Assert.Equal(1, requestList.Count); + Assert.Equal(baseURI, mockChannel.ClientRequests[0].Item1.Address.AbsolutePath.Substring(1)); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldDeleteStaticIPAddressPool() + { + var mockChannel = new MockRequestChannel(); + + var existingStaticIPAddressPool = new StaticIPAddressPool() + { + Name = staticIPAddressPoolName, + VMSubnetId = Guid.Empty, + IPAddressRangeStart = ipAddressRangeStart, + IPAddressRangeEnd = ipAddressRangeEnd, + StampId = Guid.Empty + }; + mockChannel.AddReturnObject(new Cloud() { StampId = Guid.NewGuid() }); + mockChannel.AddReturnObject(existingStaticIPAddressPool, new WebHeaderCollection { "x-ms-request-id:" + Guid.NewGuid() }); + + Guid? jobOut; + var staticIPAddressPoolOperations = new StaticIPAddressPoolOperations(new WebClientFactory(new Subscription(), mockChannel)); + staticIPAddressPoolOperations.Delete(Guid.Empty, out jobOut); + + Assert.Equal(2, mockChannel.ClientRequests.Count); + Assert.Equal(HttpMethod.Delete.ToString(), mockChannel.ClientRequests[1].Item1.Method); + + // Check the URI + var requestURI = mockChannel.ClientRequests[1].Item1.Address.AbsolutePath; + Assert.Equal("/Clouds", mockChannel.ClientRequests[0].Item1.Address.AbsolutePath.Substring(1)); + Assert.Equal(baseURI, mockChannel.ClientRequests[1].Item1.Address.AbsolutePath.Substring(1).Remove(requestURI.IndexOf('(') - 1)); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/Operations/VMNetworkOperationsTest.cs b/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/Operations/VMNetworkOperationsTest.cs new file mode 100644 index 000000000000..77bcc8ce6989 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/Operations/VMNetworkOperationsTest.cs @@ -0,0 +1,195 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using Xunit; +using Microsoft.WindowsAzure.Commands.Test.WAPackIaaS.Mocks; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.WebClient; + +namespace Microsoft.WindowsAzure.Commands.Test.WAPackIaaS.Operations +{ + + public class VMNetworkOperationsTest + { + private const string baseURI = "/VMNetworks"; + + private const string vNetName = "VNet01"; + private const string vNetDescription = "VNet01 - Description"; + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldCreateOneVMNetwork() + { + Guid VNetLogicalNetworkId = Guid.NewGuid(); + Guid StampId= Guid.NewGuid(); + + var mockChannel = new MockRequestChannel(); + + var vmNetworkToCreate = new VMNetwork() + { + Name = vNetName, + Description = vNetDescription, + LogicalNetworkId = VNetLogicalNetworkId, + StampId = StampId, + }; + + var vmNetworkToReturn = new VMNetwork() + { + Name = vNetName, + Description = vNetDescription, + LogicalNetworkId = VNetLogicalNetworkId, + StampId = StampId, + }; + + mockChannel.AddReturnObject(vmNetworkToReturn, new WebHeaderCollection { "x-ms-request-id:" + Guid.NewGuid() }); + + Guid? jobOut; + var VMNetworkOperations = new VMNetworkOperations(new WebClientFactory(new Subscription(), mockChannel)); + var createdVMNetwork = VMNetworkOperations.Create(vmNetworkToCreate, out jobOut); + + Assert.NotNull(createdVMNetwork); + Assert.Equal(vmNetworkToReturn.Name, vmNetworkToCreate.Name); + Assert.Equal(vmNetworkToReturn.Description, vmNetworkToCreate.Description); + Assert.Equal(vmNetworkToReturn.LogicalNetworkId, vmNetworkToCreate.LogicalNetworkId); + Assert.Equal(vmNetworkToReturn.StampId, vmNetworkToCreate.StampId); + + var requestList = mockChannel.ClientRequests; + Assert.Equal(1, requestList.Count); + Assert.Equal(HttpMethod.Post.ToString(), requestList[0].Item1.Method); + + // Check the URI + Assert.Equal(baseURI, mockChannel.ClientRequests[0].Item1.Address.AbsolutePath.Substring(1)); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldReturnOneVMNetworkByID() + { + var mockChannel = new MockRequestChannel(); + + var vmNetworkToReturn = new VMNetwork() + { + Name = vNetName, + Description = vNetDescription, + LogicalNetworkId = Guid.Empty, + StampId = Guid.Empty, + }; + mockChannel.AddReturnObject(vmNetworkToReturn); + + var VMNetworkOperations = new VMNetworkOperations(new WebClientFactory(new Subscription(), mockChannel)); + var readVMNetwork = VMNetworkOperations.Read(Guid.Empty); + Assert.Equal(Guid.Empty, readVMNetwork.ID); + + // Check the URI + var requestList = mockChannel.ClientRequests; + Assert.Equal(1, requestList.Count); + Assert.Equal(baseURI, mockChannel.ClientRequests[0].Item1.Address.AbsolutePath.Substring(1)); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldReturnOneVMNetworkByName() + { + var mockChannel = new MockRequestChannel(); + + var vmNetworkToReturn = new VMNetwork() + { + Name = vNetName, + Description = vNetDescription, + LogicalNetworkId = Guid.Empty, + StampId = Guid.Empty, + }; + mockChannel.AddReturnObject(vmNetworkToReturn); + + var filter = new Dictionary() + { + {"Name", vNetName} + }; + var VMNetworkOperations = new VMNetworkOperations(new WebClientFactory(new Subscription(), mockChannel)); + var readVMNetwork = VMNetworkOperations.Read(filter); + Assert.Equal(1, readVMNetwork.Count); + Assert.Equal(vNetName, readVMNetwork.First().Name); + + // Check the URI + var requestList = mockChannel.ClientRequests; + Assert.Equal(1, requestList.Count); + Assert.Equal(baseURI, mockChannel.ClientRequests[0].Item1.Address.AbsolutePath.Substring(1)); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldReturnMultipleVMNetworks() + { + var mockChannel = new MockRequestChannel(); + var vmNetworkList = new List + { + new VMNetwork { Name = vNetName, Description = vNetDescription }, + new VMNetwork { Name = vNetName, Description = vNetDescription } + }; + mockChannel.AddReturnObject(vmNetworkList); + + var VMNetworkOperations = new VMNetworkOperations(new WebClientFactory(new Subscription(), mockChannel)); + var readVMNetwork = VMNetworkOperations.Read(); + + Assert.Equal(2, readVMNetwork.Count); + Assert.True(readVMNetwork.All(vmNetwork => vmNetwork.Name == vNetName)); + + // Check the URI + var requestList = mockChannel.ClientRequests; + Assert.Equal(1, requestList.Count); + Assert.Equal(baseURI, mockChannel.ClientRequests[0].Item1.Address.AbsolutePath.Substring(1)); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldDeleteStaticVMNetwork() + { + var mockChannel = new MockRequestChannel(); + + var existingVmNetwork = new VMNetwork() + { + Name = vNetName, + Description = vNetDescription, + LogicalNetworkId = Guid.Empty, + StampId = Guid.Empty, + }; + mockChannel.AddReturnObject(new Cloud() { StampId = Guid.NewGuid() }); + mockChannel.AddReturnObject(existingVmNetwork, new WebHeaderCollection { "x-ms-request-id:" + Guid.NewGuid() }); + + Guid? jobOut; + var VMNetworkOperations = new VMNetworkOperations(new WebClientFactory(new Subscription(), mockChannel)); + VMNetworkOperations.Delete(Guid.Empty, out jobOut); + + Assert.Equal(2, mockChannel.ClientRequests.Count); + Assert.Equal(HttpMethod.Delete.ToString(), mockChannel.ClientRequests[1].Item1.Method); + + // Check the URI + var requestURI = mockChannel.ClientRequests[1].Item1.Address.AbsolutePath; + Assert.Equal("/Clouds", mockChannel.ClientRequests[0].Item1.Address.AbsolutePath.Substring(1)); + Assert.Equal(baseURI, mockChannel.ClientRequests[1].Item1.Address.AbsolutePath.Substring(1).Remove(requestURI.IndexOf('(') - 1)); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/Operations/VMRoleOperationsTests.cs b/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/Operations/VMRoleOperationsTests.cs new file mode 100644 index 000000000000..784503471835 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/Operations/VMRoleOperationsTests.cs @@ -0,0 +1,204 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using Xunit; +using Microsoft.WindowsAzure.Commands.Test.WAPackIaaS.Mocks; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.WebClient; + +namespace Microsoft.WindowsAzure.Commands.Test.WAPackIaaS.Operations +{ + + public class VMRoleOperationsTests + { + private const string genericBaseUri = "/CloudServices/{0}/Resources/MicrosoftCompute/VMRoles"; + private const string specificBaseUri = "/CloudServices/{0}/Resources/MicrosoftCompute/VMRoles/{1}"; + private const string vmsUri = "/CloudServices/{0}/Resources/MicrosoftCompute/VMRoles/{1}/VMs"; + + private const string vmRoleName = "VMRole01"; + private const string vmRoleLabel = "VMRole01-Label"; + private const string cloudServiceName = "CloudService01"; + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldCreateOneVMRole() + { + var mockChannel = new MockRequestChannel(); + + var vmRoleToCreate = new VMRole + { + Name = vmRoleName, + Label = vmRoleLabel + }; + + var vmRoleToReturn = new VMRole + { + Name = vmRoleName, + Label = vmRoleLabel, + }; + mockChannel.AddReturnObject(vmRoleToReturn, new WebHeaderCollection { "x-ms-request-id:" + Guid.NewGuid() }); + + Guid? jobOut; + var vmRoleOperations = new VMRoleOperations(new WebClientFactory(new Subscription(), mockChannel)); + var createdVMRole = vmRoleOperations.Create(cloudServiceName, vmRoleToCreate, out jobOut); + + Assert.NotNull(createdVMRole); + Assert.Equal(vmRoleToReturn.Name, createdVMRole.Name); + Assert.Equal(vmRoleToReturn.Label, createdVMRole.Label); + + var requestList = mockChannel.ClientRequests; + Assert.Equal(1, requestList.Count); + Assert.Equal(HttpMethod.Post.ToString(), requestList[0].Item1.Method); + + // Check the URI (for Azure consistency) + Assert.Equal(String.Format(genericBaseUri,cloudServiceName), mockChannel.ClientRequests[0].Item1.Address.AbsolutePath.Substring(1)); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldReturnOneVMRole() + { + var mockChannel = new MockRequestChannel(); + mockChannel.AddReturnObject(new VMRole { Name = vmRoleName, Label = vmRoleLabel }); + + var vmRoleOperations = new VMRoleOperations(new WebClientFactory(new Subscription(), mockChannel)); + Assert.Equal(1, vmRoleOperations.Read(cloudServiceName).Count); + + // Check the URI (for Azure consistency) + var requestList = mockChannel.ClientRequests; + Assert.Equal(2, requestList.Count); + Assert.Equal(String.Format(genericBaseUri, cloudServiceName), mockChannel.ClientRequests[0].Item1.Address.AbsolutePath.Substring(1)); + Assert.Equal(String.Format(vmsUri, cloudServiceName, vmRoleName), mockChannel.ClientRequests[1].Item1.Address.AbsolutePath.Substring(1)); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldReturnOneVMRoleByName() + { + var mockChannel = new MockRequestChannel(); + mockChannel.AddReturnObject(new VMRole { Name = vmRoleName, Label = vmRoleLabel }); + + var vmRoleOperations = new VMRoleOperations(new WebClientFactory(new Subscription(), mockChannel)); + Assert.Equal(vmRoleName, vmRoleOperations.Read(cloudServiceName, vmRoleName).Name); + + // Check the URI (for Azure consistency) + var requestList = mockChannel.ClientRequests; + Assert.Equal(2, requestList.Count); + Assert.Equal(String.Format(specificBaseUri, cloudServiceName, vmRoleName), mockChannel.ClientRequests[0].Item1.Address.AbsolutePath.Substring(1)); + Assert.Equal(String.Format(vmsUri, cloudServiceName, vmRoleName), mockChannel.ClientRequests[1].Item1.Address.AbsolutePath.Substring(1)); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldReturnMultipleVMRole() + { + const string vmRoleName01 = "VMRole01"; + const string vmRoleName02 = "VMRole02"; + const string vmRoleLabel01 = "VMRole01-Label"; + const string vmRoleLabel02 = "VMRole02-Label"; + const string cloudServiceName = "CloudService01"; + + var mockChannel = new MockRequestChannel(); + var vmRoles = new List + { + new VMRole { Name = vmRoleName01, Label = vmRoleLabel01 }, + new VMRole { Name = vmRoleName02, Label = vmRoleLabel02 } + }; + mockChannel.AddReturnObject(vmRoles); + + var vmRoleOperations = new VMRoleOperations(new WebClientFactory(new Subscription(), mockChannel)); + var vmRoleList = vmRoleOperations.Read(cloudServiceName); + + Assert.Equal(vmRoles.Count, vmRoleList.Count); + Assert.True(vmRoleList[0].Name == vmRoleName01); + Assert.True(vmRoleList[1].Name == vmRoleName02); + + // Check the URI (for Azure consistency) + var requestList = mockChannel.ClientRequests; + Assert.Equal(3, requestList.Count); + Assert.Equal(String.Format(genericBaseUri, cloudServiceName), mockChannel.ClientRequests[0].Item1.Address.AbsolutePath.Substring(1)); + Assert.Equal(String.Format(vmsUri, cloudServiceName, vmRoleName01), mockChannel.ClientRequests[1].Item1.Address.AbsolutePath.Substring(1)); + Assert.Equal(String.Format(vmsUri, cloudServiceName, vmRoleName02), mockChannel.ClientRequests[2].Item1.Address.AbsolutePath.Substring(1)); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldReturnMultipleVMRoleVMs() + { + var mockChannel = new MockRequestChannel(); + var vmRole = new VMRole + { + Name = vmRoleName, + Label = vmRoleLabel + }; + var vmList = new List { new VM() { Id = Guid.Empty }, new VM() { Id = Guid.Empty } }; + vmRole.VMs.Load(vmList); + mockChannel.AddReturnObject(vmRole); + + var vmRoleOperations = new VMRoleOperations(new WebClientFactory(new Subscription(), mockChannel)); + var readVMRole = vmRoleOperations.Read(cloudServiceName, vmRoleName); + Assert.Equal(vmRoleName, readVMRole.Name); + Assert.Equal(vmList.Count, readVMRole.VMs.Count); + + // Check the URI (for Azure consistency) + var requestList = mockChannel.ClientRequests; + Assert.Equal(2, requestList.Count); + Assert.Equal(String.Format(specificBaseUri, cloudServiceName, vmRoleName), mockChannel.ClientRequests[0].Item1.Address.AbsolutePath.Substring(1)); + Assert.Equal(String.Format(vmsUri, cloudServiceName, vmRoleName), mockChannel.ClientRequests[1].Item1.Address.AbsolutePath.Substring(1)); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldDeleteVMRole() + { + var mockChannel = new MockRequestChannel(); + mockChannel.AddReturnObject(new VMRole { Name = vmRoleName, Label = vmRoleLabel }, new WebHeaderCollection { "x-ms-request-id:" + Guid.NewGuid() }); + + Guid? jobOut; + var vmRoleOperations = new VMRoleOperations(new WebClientFactory(new Subscription(), mockChannel)); + vmRoleOperations.Delete(cloudServiceName, vmRoleName, out jobOut); + + Assert.Equal(mockChannel.ClientRequests.Count, 1); + Assert.Equal(HttpMethod.Delete.ToString(), mockChannel.ClientRequests[0].Item1.Method); + + // Check the URI (for Azure consistency) + var requestList = mockChannel.ClientRequests; + Assert.Equal(1, requestList.Count); + Assert.Equal(String.Format(specificBaseUri, cloudServiceName, vmRoleName), mockChannel.ClientRequests[0].Item1.Address.AbsolutePath.Substring(1)); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + [Trait("Type", "WAPackIaaS-Negative")] + public void ShouldReturnEmptyOnNoResult() + { + var vmRoleOperations = new VMRoleOperations(new WebClientFactory(new Subscription(), MockRequestChannel.Create())); + Assert.False(vmRoleOperations.Read().Any()); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/Operations/VMSubnetOperationsTests.cs b/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/Operations/VMSubnetOperationsTests.cs new file mode 100644 index 000000000000..fc643ecdcb1c --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/Operations/VMSubnetOperationsTests.cs @@ -0,0 +1,149 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Net; +using System.Net.Http; +using Xunit; +using Microsoft.WindowsAzure.Commands.Test.WAPackIaaS.Mocks; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.WebClient; + +namespace Microsoft.WindowsAzure.Commands.Test.WAPackIaaS.Operations +{ + + public class VMSubnetOperationsTests + { + private const string baseURI = "/VMSubnets"; + + private const string subnet = "192.168.1.0/24"; + private const string vmNetworkName = "VNet01"; + private const string vmSubnetName = "VMSubnet01"; + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldCreateOneVMSubnet() + { + var mockChannel = new MockRequestChannel(); + + var vmSubnetToCreate = new VMSubnet() + { + Name = vmSubnetName, + VMNetworkName = vmNetworkName, + VMNetworkId = Guid.Empty, + Subnet = subnet, + StampId = Guid.Empty + }; + + var vmSubnetToReturn = new VMSubnet() + { + Name = vmSubnetName, + VMNetworkName = vmNetworkName, + VMNetworkId = Guid.Empty, + Subnet = subnet, + StampId = Guid.Empty + }; + + mockChannel.AddReturnObject(vmSubnetToReturn, new WebHeaderCollection { "x-ms-request-id:" + Guid.NewGuid() }); + + Guid? jobOut; + var vmSubnetOperations = new VMSubnetOperations(new WebClientFactory(new Subscription(), mockChannel)); + var createdVMSubnet = vmSubnetOperations.Create(vmSubnetToCreate, out jobOut); + + Assert.NotNull(createdVMSubnet); + Assert.True(createdVMSubnet is VMSubnet); + Assert.Equal(vmSubnetToReturn.Name, createdVMSubnet.Name); + Assert.Equal(vmSubnetToReturn.VMNetworkName, createdVMSubnet.VMNetworkName); + Assert.Equal(vmSubnetToReturn.VMNetworkId, createdVMSubnet.VMNetworkId); + Assert.Equal(vmSubnetToReturn.Subnet, createdVMSubnet.Subnet); + Assert.Equal(vmSubnetToReturn.StampId, createdVMSubnet.StampId); + + var requestList = mockChannel.ClientRequests; + Assert.Equal(1, requestList.Count); + Assert.Equal(HttpMethod.Post.ToString(), requestList[0].Item1.Method); + + // Check the URI + Assert.Equal(baseURI, mockChannel.ClientRequests[0].Item1.Address.AbsolutePath.Substring(1)); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldReturnOneVMSubnet() + { + const string subnet = "192.168.1.0/24"; + const string vmNetworkName = "VNet01"; + const string vmSubnetName = "VMSubnet01"; + + var mockChannel = new MockRequestChannel(); + + var vmSubnetToCreate = new VMSubnet() + { + Name = vmSubnetName, + VMNetworkName = vmNetworkName, + VMNetworkId = Guid.Empty, + Subnet = subnet, + StampId = Guid.Empty + }; + mockChannel.AddReturnObject(vmSubnetToCreate); + + var vmSubnetOperations = new VMSubnetOperations(new WebClientFactory(new Subscription(), mockChannel)); + var readStaticIPAddressPool = vmSubnetOperations.Read(new VMNetwork() { StampId = Guid.Empty, ID = Guid.Empty }); + Assert.Equal(1, readStaticIPAddressPool.Count); + + // Check the URI + var requestList = mockChannel.ClientRequests; + Assert.Equal(1, requestList.Count); + Assert.Equal(baseURI, mockChannel.ClientRequests[0].Item1.Address.AbsolutePath.Substring(1)); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldDeleteVMSubnet() + { + const string subnet = "192.168.1.0/24"; + const string vmNetworkName = "VNet01"; + const string vmSubnetName = "VMSubnet01"; + + var mockChannel = new MockRequestChannel(); + + var existingVMSubnet = new VMSubnet() + { + Name = vmSubnetName, + VMNetworkName = vmNetworkName, + VMNetworkId = Guid.Empty, + Subnet = subnet, + StampId = Guid.Empty + }; + mockChannel.AddReturnObject(new Cloud() { StampId = Guid.NewGuid() }); + mockChannel.AddReturnObject(existingVMSubnet, new WebHeaderCollection { "x-ms-request-id:" + Guid.NewGuid() }); + + Guid? jobOut; + var vmSubnetOperations = new VMSubnetOperations(new WebClientFactory(new Subscription(), mockChannel)); + vmSubnetOperations.Delete(Guid.Empty, out jobOut); + + Assert.Equal(2, mockChannel.ClientRequests.Count); + Assert.Equal(HttpMethod.Delete.ToString(), mockChannel.ClientRequests[1].Item1.Method); + + // Check the URI + var requestURI = mockChannel.ClientRequests[1].Item1.Address.AbsolutePath; + Assert.Equal("/Clouds", mockChannel.ClientRequests[0].Item1.Address.AbsolutePath.Substring(1)); + Assert.Equal(baseURI, mockChannel.ClientRequests[1].Item1.Address.AbsolutePath.Substring(1).Remove(requestURI.IndexOf('(') - 1)); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/Operations/VirtualMachineOperationsTests.cs b/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/Operations/VirtualMachineOperationsTests.cs new file mode 100644 index 000000000000..b1bc959c0c7c --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/Operations/VirtualMachineOperationsTests.cs @@ -0,0 +1,411 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using Xunit; +using Microsoft.WindowsAzure.Commands.Test.WAPackIaaS.Mocks; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Exceptions; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.WebClient; + +namespace Microsoft.WindowsAzure.Commands.Test.WAPackIaaS.Operations +{ + + public class VirtualMachineOperationsTests + { + [Fact] + [Trait("Type", "WAPackIaaS-Negative")] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldReturnEmptyOnNoResult() + { + var vmOperations = new VirtualMachineOperations(new WebClientFactory( + new Subscription(), + MockRequestChannel.Create())); + + Assert.False(vmOperations.Read().Any()); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldReturnOneVM() + { + var vmOperations = new VirtualMachineOperations(new WebClientFactory( + new Subscription(), + MockRequestChannel.Create() + .AddReturnObject(new VirtualMachine { Name = "vm1", ID = Guid.NewGuid() }))); + + Assert.Equal(1, vmOperations.Read().Count); + } + + [Fact] + [Trait("Type", "WAPackIaaS-Negative")] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldThrowGetByIdNoResult() + { + var vmOperations = new VirtualMachineOperations(new WebClientFactory( + new Subscription(), + MockRequestChannel.Create())); + + Assert.Throws(()=>vmOperations.Read(Guid.NewGuid())); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldReturnOneVMGetById() + { + var expectedVmId = Guid.NewGuid(); + var vmOperations = new VirtualMachineOperations(new WebClientFactory( + new Subscription(), + MockRequestChannel.Create() + .AddReturnObject(new VirtualMachine { Name = "vm1", ID = expectedVmId }))); + + var vm = vmOperations.Read(expectedVmId); + Assert.Equal(expectedVmId, vm.ID); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldReturnMultipleVMsGetByName() + { + const string expectedVmName = "myVM"; + var expectedVmIds = new[] { Guid.NewGuid(), Guid.NewGuid() }; + var vmOperations = new VirtualMachineOperations(new WebClientFactory( + new Subscription(), + new MockRequestChannel() + .AddReturnObject(new List + {new VirtualMachine { Name = expectedVmName, ID = expectedVmIds[1] }, + new VirtualMachine { Name = expectedVmName, ID = expectedVmIds[0] }}))); + + var vmList = vmOperations.Read(expectedVmName); + Assert.Equal(expectedVmIds.Length, vmList.Count); + Assert.True(vmList.All(vm => vm.Name == expectedVmName)); + Assert.Equal(expectedVmIds.OrderBy(g => g), vmList.Select(v => v.ID).OrderBy(g => g).ToArray()); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void CreateVMFromVHD() + { + var mockChannel = new MockRequestChannel(); + + var testCloud = new Cloud { ID = Guid.NewGuid(), StampId = Guid.NewGuid() }; + mockChannel.AddReturnObject(testCloud); + + var vmToCreate = new VirtualMachine { VirtualHardDiskId = Guid.NewGuid(), Name = "Test" }; + var vmToReturn = new VirtualMachine + { + ID = Guid.NewGuid(), + Name = vmToCreate.Name, + CloudId = testCloud.ID, + StampId = testCloud.StampId + }; + + mockChannel.AddReturnObject(vmToReturn, new WebHeaderCollection { "x-ms-request-id:" + Guid.NewGuid() }); + + var vmOps = new VirtualMachineOperations(new WebClientFactory(new Subscription(), mockChannel)); + + Guid? jobOut; + var resultVM = vmOps.Create(vmToCreate, out jobOut); + + //Check the results that client returns + Assert.NotNull(resultVM); + Assert.True(resultVM is VirtualMachine); + Assert.Equal(resultVM.ID, vmToReturn.ID); + Assert.Equal(resultVM.Name, vmToReturn.Name); + Assert.Equal(resultVM.CloudId, vmToReturn.CloudId); + Assert.Equal(resultVM.StampId, vmToReturn.StampId); + + //Check the requests that the client made + var requestList = mockChannel.ClientRequests; + Assert.Equal(requestList.Count, 2); + Assert.Equal(requestList[1].Item1.Method, HttpMethod.Post.ToString()); + Assert.True(requestList[1].Item1.RequestUri.ToString().TrimEnd(new[]{'/'}).EndsWith("/VirtualMachines")); + + var sentVM = mockChannel.DeserializeClientPayload(requestList[1].Item2); + Assert.NotNull(sentVM); + Assert.True(sentVM.Count == 1); + Assert.Equal(sentVM[0].CloudId, testCloud.ID); + Assert.Equal(sentVM[0].StampId, testCloud.StampId); + Assert.Equal(sentVM[0].Name, vmToCreate.Name); + Assert.Equal(sentVM[0].VirtualHardDiskId, vmToCreate.VirtualHardDiskId); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void CreateVMFromTemplate() + { + var mockChannel = new MockRequestChannel(); + + var testCloud = new Cloud { ID = Guid.NewGuid(), StampId = Guid.NewGuid() }; + mockChannel.AddReturnObject(testCloud); + + var vmToCreate = new VirtualMachine { VMTemplateId = Guid.NewGuid(), Name = "Test" }; + var vmToReturn = new VirtualMachine + { + ID = Guid.NewGuid(), + Name = vmToCreate.Name, + CloudId = testCloud.ID, + StampId = testCloud.StampId + }; + mockChannel.AddReturnObject(vmToReturn, new WebHeaderCollection { "x-ms-request-id:" + Guid.NewGuid() }); + + var vmOps = new VirtualMachineOperations(new WebClientFactory(new Subscription(), mockChannel)); + + Guid? jobOut; + var resultVM = vmOps.Create(vmToCreate, out jobOut); + + //Check the results that client returns + Assert.NotNull(resultVM); + Assert.True(resultVM is VirtualMachine); + Assert.Equal(resultVM.ID, vmToReturn.ID); + Assert.Equal(resultVM.Name, vmToReturn.Name); + Assert.Equal(resultVM.CloudId, vmToReturn.CloudId); + Assert.Equal(resultVM.StampId, vmToReturn.StampId); + + //Check the requests that the client made + var requestList = mockChannel.ClientRequests; + Assert.Equal(requestList.Count, 2); + Assert.Equal(requestList[1].Item1.Method, HttpMethod.Post.ToString()); + Assert.True(requestList[1].Item1.RequestUri.ToString().TrimEnd(new[] { '/' }).EndsWith("/VirtualMachines")); + + var sentVM = mockChannel.DeserializeClientPayload(requestList[1].Item2); + Assert.NotNull(sentVM); + Assert.True(sentVM.Count == 1); + Assert.Equal(sentVM[0].CloudId, testCloud.ID); + Assert.Equal(sentVM[0].StampId, testCloud.StampId); + Assert.Equal(sentVM[0].Name, vmToCreate.Name); + Assert.Equal(sentVM[0].VMTemplateId, vmToCreate.VMTemplateId); + } + + [Fact] + [Trait("Type", "WAPackIaaS-Negative")] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void VmCreateShouldThrowIfNoVhdAndNoTemplateSupplied() + { + var channel = new MockRequestChannel(); + var testCloud = new Cloud { ID = Guid.NewGuid(), StampId = Guid.NewGuid() }; + channel.AddReturnObject(testCloud); + + var sub = new Subscription(); + var vmOps = new VirtualMachineOperations(new WebClientFactory(sub, channel)); + + var vmToCreate = new VirtualMachine {Name = "Test"}; + + Guid? jobOut; + Assert.Throws(() => vmOps.Create(vmToCreate, out jobOut)); + } + + [Fact] + [Trait("Type", "WAPackIaaS-Negative")] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void VmCreateShouldThrowWhenNoObjectReturned() + { + var mockChannel = new MockRequestChannel(); + + var testCloud = new Cloud { ID = Guid.NewGuid(), StampId = Guid.NewGuid() }; + mockChannel.AddReturnObject(testCloud); + + var vmOps = new VirtualMachineOperations(new WebClientFactory(new Subscription(), mockChannel)); + + var vmToCreate = new VirtualMachine { VirtualHardDiskId = Guid.NewGuid(), Name = "Test" }; + + Guid? jobOut; + Assert.Throws(() => vmOps.Create(vmToCreate, out jobOut)); + } + + [Fact] + [Trait("Type", "WAPackIaaS-Negative")] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void VmUpdateShouldThrowWhenNoObjectReturned() + { + var mockChannel = new MockRequestChannel(); + + var vmOps = new VirtualMachineOperations(new WebClientFactory(new Subscription(), mockChannel)); + + var vmToUpdate = new VirtualMachine { VirtualHardDiskId = Guid.NewGuid(), Name = "Test" }; + + Guid? jobOut; + Assert.Throws(() => vmOps.Update(vmToUpdate, out jobOut)); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void DeleteVM() + { + var sub = new Subscription(); + var channel = new MockRequestChannel(); + + //Response to client getting /Clouds (client needs stampId, gets it from clouds) + var testCloud = new Cloud { ID = Guid.NewGuid(), StampId = Guid.NewGuid() }; + channel.AddReturnObject(testCloud); + + //Response to the DELETE + channel.AddReturnObject(null, new WebHeaderCollection {"x-ms-request-id:" + Guid.NewGuid()}); + + var vmOps = new VirtualMachineOperations(new WebClientFactory(sub, channel)); + + Guid toDelete = Guid.NewGuid(); + Guid? jobOut; + + vmOps.Delete(toDelete, out jobOut); + + //Check the requests the client generated + Assert.Equal(channel.ClientRequests.Count, 2); + Assert.Equal(channel.ClientRequests[1].Item1.Method, HttpMethod.Delete.ToString()); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void StartVM() + { + var mockChannel = new MockRequestChannel(); + + VirtualMachineOperations vmOperations; + var testVM = InitVirtualMachineOperation(mockChannel, out vmOperations); + + Guid? jobOut; + vmOperations.Start(testVM.ID, out jobOut); + + CheckVirtualMachineOperationResult("Start", mockChannel, testVM); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void StopVM() + { + var mockChannel = new MockRequestChannel(); + + VirtualMachineOperations vmOperations; + var testVM = InitVirtualMachineOperation(mockChannel, out vmOperations); + + Guid? jobOut; + vmOperations.Stop(testVM.ID, out jobOut); + + CheckVirtualMachineOperationResult("Stop", mockChannel, testVM); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void RestartVM() + { + var mockChannel = new MockRequestChannel(); + + VirtualMachineOperations vmOperations; + var testVM = InitVirtualMachineOperation(mockChannel, out vmOperations); + + Guid? jobOut; + vmOperations.Restart(testVM.ID, out jobOut); + + CheckVirtualMachineOperationResult("Reset", mockChannel, testVM); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShutdownVM() + { + var mockChannel = new MockRequestChannel(); + + VirtualMachineOperations vmOperations; + var testVM = InitVirtualMachineOperation(mockChannel, out vmOperations); + + Guid? jobOut; + vmOperations.Shutdown(testVM.ID, out jobOut); + + CheckVirtualMachineOperationResult("Shutdown", mockChannel, testVM); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void SuspendVM() + { + var mockChannel = new MockRequestChannel(); + + VirtualMachineOperations vmOperations; + var testVM = InitVirtualMachineOperation(mockChannel, out vmOperations); + + Guid? jobOut; + vmOperations.Suspend(testVM.ID, out jobOut); + + CheckVirtualMachineOperationResult("Suspend", mockChannel, testVM); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ResumeVM() + { + var mockChannel = new MockRequestChannel(); + + VirtualMachineOperations vmOperations; + var testVM = InitVirtualMachineOperation(mockChannel, out vmOperations); + + Guid? jobOut; + vmOperations.Resume(testVM.ID, out jobOut); + + CheckVirtualMachineOperationResult("Resume", mockChannel, testVM); + } + + private static VirtualMachine InitVirtualMachineOperation(MockRequestChannel mockChannel, out VirtualMachineOperations vmOperations) + { + //Cloud for return value of first request (client gets cloud to get stampId) + var testCloud = new Cloud {ID = Guid.NewGuid(), StampId = Guid.NewGuid()}; + mockChannel.AddReturnObject(testCloud); + + //VM for return value of second request (client updates VM with operation) + var testVM = new VirtualMachine {ID = Guid.NewGuid(), StampId = testCloud.StampId}; + mockChannel.AddReturnObject(testVM, new WebHeaderCollection {"x-ms-request-id:" + Guid.NewGuid()}); + + var factory = new WebClientFactory(new Subscription(), mockChannel); + vmOperations = new VirtualMachineOperations(factory); + + return testVM; + } + + private static void CheckVirtualMachineOperationResult(string operation, MockRequestChannel mockChannel, VirtualMachine testVM) + { + var requests = mockChannel.ClientRequests; + Assert.Equal(requests.Count, 2); + Assert.Equal(requests[1].Item1.Method, HttpMethod.Put.ToString()); + + var clientSentVM = mockChannel.DeserializeClientPayload(requests[1].Item2); + Assert.NotNull(clientSentVM); + Assert.True(clientSentVM.Count == 1); + Assert.Equal(testVM.ID, clientSentVM[0].ID); + Assert.Equal(testVM.StampId, clientSentVM[0].StampId); + Assert.Equal(clientSentVM[0].Operation, operation); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/WebClient/GetAbsoluteUriTests.cs b/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/WebClient/GetAbsoluteUriTests.cs new file mode 100644 index 000000000000..4c2e6dbc79c2 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/WebClient/GetAbsoluteUriTests.cs @@ -0,0 +1,208 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Text; +using Xunit; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.WebClient; + +namespace Microsoft.WindowsAzure.Commands.Test.WAPackIaaS.WebClient +{ + + public class GetAbsoluteUriTests + { + private Subscription subscription; + + public GetAbsoluteUriTests() + { + var azureSub = new AzureSubscription(); + azureSub.Id = Guid.NewGuid(); + this.subscription = new Subscription(azureSub); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldGenerateUri() + { + var expectedUri = new StringBuilder(); + expectedUri.AppendFormat("{0}", this.subscription.ServiceEndpoint); + + var client = new WAPackIaaSClient(this.subscription); + var actualUri = client.GetAbsoluteUri(); + + Assert.Equal(expectedUri.ToString(), actualUri); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldGenerateUriWithoutSubscription() + { + this.subscription.SubscriptionId = String.Empty; + + var expectedUri = new StringBuilder(); + expectedUri.AppendFormat("{0}", this.subscription.ServiceEndpoint.ToString()); + + var client = new WAPackIaaSClient(this.subscription); + var actualUri = client.GetAbsoluteUri(); + + Assert.Equal(expectedUri.ToString(), actualUri); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldGenerateUriWithUriSuffix() + { + const string uriSuffix = "/myResource"; + + var expectedUri = new StringBuilder(); + expectedUri.AppendFormat("{0}{1}", this.subscription.ServiceEndpoint, uriSuffix); + + var client = new WAPackIaaSClient(this.subscription); + client.SetUriSuffix(uriSuffix); + var actualUri = client.GetAbsoluteUri(); + + Assert.Equal(expectedUri.ToString(), actualUri); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldGenerateUriWithUriSuffixAndSingleQueryParameter() + { + const string uriSuffix = "/myResource"; + + var expectedUri = new StringBuilder(); + expectedUri.AppendFormat("{0}{1}",this.subscription.ServiceEndpoint, uriSuffix); + expectedUri.Append("?query1=value1"); + + var client = new WAPackIaaSClient(this.subscription); + client.SetUriSuffix(uriSuffix); + client.AddQueryParameters("query1", "value1"); + var actualUri = client.GetAbsoluteUri(); + + Assert.Equal(expectedUri.ToString(), actualUri); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldGenerateUriWithUriSuffixAndTwoQueryParameter() + { + const string uriSuffix = "/myResource"; + + var expectedUri = new StringBuilder(); + expectedUri.AppendFormat("{0}{1}", this.subscription.ServiceEndpoint, uriSuffix); + expectedUri.Append("?query1=value1&query2=value2"); + + var client = new WAPackIaaSClient(this.subscription); + client.SetUriSuffix(uriSuffix); + client.AddQueryParameters("query1", "value1"); + client.AddQueryParameters("query2", "value2"); + var actualUri = client.GetAbsoluteUri(); + + Assert.Equal(expectedUri.ToString(), actualUri); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldGenerateUriWithUriSuffixAndSingleFilter() + { + const string uriSuffix = "/myResource"; + const string filterName = "filterName1"; + + var expectedUri = new StringBuilder(); + expectedUri.AppendFormat("{0}{1}", this.subscription.ServiceEndpoint, uriSuffix); + expectedUri.AppendFormat("?$filter={0} eq 'val1'", filterName); + + var client = new WAPackIaaSClient(this.subscription); + client.SetUriSuffix(uriSuffix); + client.AddHttpFilter(filterName, WebFilterOptions.eq, "val1"); + var actualUri = client.GetAbsoluteUri(); + + Assert.Equal(expectedUri.ToString(), actualUri); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldGenerateUriWithUriSuffixAndTwoFilters() + { + const string uriSuffix = "/myResource"; + const string filterName = "filterName1"; + const string filterName2 = "filterName2"; + + var expectedUri = new StringBuilder(); + expectedUri.AppendFormat("{0}{1}", this.subscription.ServiceEndpoint, uriSuffix); + expectedUri.AppendFormat("?$filter={0} eq 'val1' and {1} ne 20", filterName, filterName2); + + var client = new WAPackIaaSClient(this.subscription); + client.SetUriSuffix(uriSuffix); + client.AddHttpFilter(filterName, WebFilterOptions.eq, "val1"); + client.AddHttpFilter(filterName2, WebFilterOptions.ne, "20"); + var actualUri = client.GetAbsoluteUri(); + + Assert.Equal(expectedUri.ToString(), actualUri); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldGenerateUriWithSuffixAndFilterAndQueryParameter() + { + const string uriSuffix = "/myResource"; + const string filterName = "filterName1"; + + var expectedUri = new StringBuilder(); + expectedUri.AppendFormat("{0}{1}", this.subscription.ServiceEndpoint, uriSuffix); + expectedUri.Append("?query1=value1"); + expectedUri.AppendFormat("&$filter={0} eq 'val1'", filterName); + + var client = new WAPackIaaSClient(this.subscription); + client.SetUriSuffix(uriSuffix); + client.AddHttpFilter(filterName, WebFilterOptions.eq, "val1"); + client.AddQueryParameters("query1", "value1"); + + var actualUri = client.GetAbsoluteUri(); + + Assert.Equal(expectedUri.ToString(), actualUri); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ShouldGenerateUriWithUriSuffixAndSingleGuidFilter() + { + const string uriSuffix = "/myResource"; + const string filterName = "filterName1"; + + Guid guidValue = Guid.NewGuid(); + + var expectedUri = new StringBuilder(); + expectedUri.AppendFormat("{0}{1}", this.subscription.ServiceEndpoint, uriSuffix); + expectedUri.AppendFormat("?$filter={0} eq guid'{1}'", filterName, guidValue); + + var client = new WAPackIaaSClient(this.subscription); + client.SetUriSuffix(uriSuffix); + client.AddHttpFilter(filterName, WebFilterOptions.eq, guidValue.ToString()); + var actualUri = client.GetAbsoluteUri(); + + Assert.Equal(expectedUri.ToString(), actualUri); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/WebClient/JsonHelperTests.cs b/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/WebClient/JsonHelperTests.cs new file mode 100644 index 000000000000..70e20bf7b1c5 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/WebClient/JsonHelperTests.cs @@ -0,0 +1,56 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Xunit; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.WebClient; + +namespace Microsoft.WindowsAzure.Commands.Test.WAPackIaaS.WebClient +{ + + public class JsonHelperTests + { + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void SerializeDeserializeVirtualMachine() + { + var helper = new JsonHelpers(); + + + var toSerialize = new VirtualMachine + { + ID = Guid.NewGuid(), + StampId = Guid.NewGuid(), + CreationTime = DateTime.Now, + PerfDiskBytesRead = 500, + Name = @"This is a test 这是一个测试 㐀㐁㐂㐃㐄㐅" + }; + + var serialized = helper.Serialize(toSerialize); + + var vmList = helper.Deserialize(serialized); + Assert.NotNull(vmList); + Assert.Equal(vmList.Count, 1); + Assert.True(vmList[0] is VirtualMachine); + + Assert.Equal(toSerialize.ID, vmList[0].ID); + Assert.Equal(toSerialize.StampId, vmList[0].StampId); + Assert.Equal(toSerialize.CreationTime, vmList[0].CreationTime); + Assert.Equal(toSerialize.PerfDiskBytesRead, vmList[0].PerfDiskBytesRead); + Assert.Equal(toSerialize.Name, vmList[0].Name); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/WebClient/WAPackWebClientTests.cs b/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/WebClient/WAPackWebClientTests.cs new file mode 100644 index 000000000000..ef9f268eabf1 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/WAPackIaaS/WebClient/WAPackWebClientTests.cs @@ -0,0 +1,119 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Net; +using Xunit; +using Microsoft.WindowsAzure.Commands.Test.WAPackIaaS.Mocks; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.WebClient; + +namespace Microsoft.WindowsAzure.Commands.Test.WAPackIaaS.WebClient +{ + + public class WAPackWebClientTests + { + private MockRequestChannel channel; + + private WAPackIaaSClient client; + + private WebHeaderCollection responseHeaders; + + public WAPackWebClientTests() + { + this.channel = MockRequestChannel.Create(); + + var subscription = new Subscription + { + ServiceEndpoint = new Uri("http://localhost:8090/"), + SubscriptionId = Guid.NewGuid().ToString(), + }; + + this.client = new WAPackIaaSClient(subscription, channel); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void ExpectLanguageAndContentShouldBeSetToJson() + { + this.channel.AddExpectedValue("Accept", "application/json"); + this.channel.AddExpectedValue("ContentType", "application/json"); + this.client.Get(out responseHeaders); + } + + #region Test request.Method + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void MethodShouldBeSetToGetOnGet() + { + this.channel.AddExpectedValue("Method", "GET"); + this.client.Get(out responseHeaders); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void MethodShouldBeSetToPostOnCreate() + { + this.channel.AddExpectedValue("Method", "POST"); + this.client.Create(null, out responseHeaders); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void MethodShouldBeSetToDeleteOnDelete() + { + this.channel.AddExpectedValue("Method", "DELETE"); + this.client.Delete(out responseHeaders); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void MethodShouldBeSetToPutOnUpdate() + { + this.channel.AddExpectedValue("Method", "PUT"); + this.client.Update(null, out responseHeaders); + } + #endregion + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void PreferContentShouldBeSetOnUpdate() + { + this.channel.AddExpectedHeader("Prefer", "return-content"); + this.client.Update(null, out responseHeaders); + } + + [Fact] + [Trait("Type", "WAPackIaaS-All")] + [Trait("Type", "WAPackIaaS-Unit")] + public void CanAddCustomerHeaders() + { + var customHeaders = new Dictionary(); + customHeaders.Add("Header1", "value1"); + customHeaders.Add("Header2", "value2"); + + foreach (var header in customHeaders) + { + this.client.AddHeaders(header.Key, header.Value); + this.channel.AddExpectedHeader(header.Key, header.Value); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/DisableAzureWebsiteDiagnosticTests.cs b/src/ServiceManagement/Services/Commands.Test/Websites/DisableAzureWebsiteDiagnosticTests.cs new file mode 100644 index 000000000000..dd6330e9c20b --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Websites/DisableAzureWebsiteDiagnosticTests.cs @@ -0,0 +1,160 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Websites; +using Moq; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.Test.Websites +{ + public class DisableAzureWebsiteApplicationDiagnosticTests : WebsitesTestBase + { + private const string websiteName = "website1"; + + private Mock websitesClientMock = new Mock(); + + private DisableAzureWebsiteApplicationDiagnosticCommand disableAzureWebsiteApplicationDiagnosticCommand; + + private Mock commandRuntimeMock; + + public DisableAzureWebsiteApplicationDiagnosticTests() + { + websitesClientMock = new Mock(); + commandRuntimeMock = new Mock(); + } + + [Fact] + public void DisableAzureWebsiteApplicationDiagnosticApplication() + { + // Setup + websitesClientMock.Setup(f => f.DisableApplicationDiagnostic( + websiteName, + WebsiteDiagnosticOutput.FileSystem, null)); + + disableAzureWebsiteApplicationDiagnosticCommand = new DisableAzureWebsiteApplicationDiagnosticCommand() + { + CommandRuntime = commandRuntimeMock.Object, + Name = websiteName, + WebsitesClient = websitesClientMock.Object, + File = true, + }; + + AzureSession.SetCurrentContext(new AzureSubscription { Id = new System.Guid(base.subscriptionId) }, null, null); + + // Test + disableAzureWebsiteApplicationDiagnosticCommand.ExecuteCmdlet(); + + // Assert + websitesClientMock.Verify(f => f.DisableApplicationDiagnostic( + websiteName, + WebsiteDiagnosticOutput.FileSystem, null), Times.Once()); + + commandRuntimeMock.Verify(f => f.WriteObject(true), Times.Never()); + } + + [Fact] + public void DisableAzureWebsiteApplicationDiagnosticApplicationTableLog() + { + // Setup + websitesClientMock.Setup(f => f.DisableApplicationDiagnostic( + websiteName, + WebsiteDiagnosticOutput.StorageTable, null)); + + disableAzureWebsiteApplicationDiagnosticCommand = new DisableAzureWebsiteApplicationDiagnosticCommand() + { + CommandRuntime = commandRuntimeMock.Object, + Name = websiteName, + WebsitesClient = websitesClientMock.Object, + TableStorage = true + }; + + AzureSession.SetCurrentContext(new AzureSubscription { Id = new System.Guid(base.subscriptionId) }, null, null); + + // Test + disableAzureWebsiteApplicationDiagnosticCommand.ExecuteCmdlet(); + + // Assert + websitesClientMock.Verify(f => f.DisableApplicationDiagnostic( + websiteName, + WebsiteDiagnosticOutput.StorageTable, null), Times.Once()); + + commandRuntimeMock.Verify(f => f.WriteObject(true), Times.Never()); + } + + [Fact] + public void DisableAzureWebsiteApplicationDiagnosticApplicationBlobLog() + { + // Setup + websitesClientMock.Setup(f => f.DisableApplicationDiagnostic( + websiteName, + WebsiteDiagnosticOutput.StorageTable, null)); + + disableAzureWebsiteApplicationDiagnosticCommand = new DisableAzureWebsiteApplicationDiagnosticCommand() + { + CommandRuntime = commandRuntimeMock.Object, + Name = websiteName, + WebsitesClient = websitesClientMock.Object, + BlobStorage = true + }; + + AzureSession.SetCurrentContext(new AzureSubscription { Id = new System.Guid(base.subscriptionId) }, null, null); + + // Test + disableAzureWebsiteApplicationDiagnosticCommand.ExecuteCmdlet(); + + // Assert + websitesClientMock.Verify(f => f.DisableApplicationDiagnostic( + websiteName, + WebsiteDiagnosticOutput.StorageBlob, null), Times.Once()); + + commandRuntimeMock.Verify(f => f.WriteObject(true), Times.Never()); + } + + [Fact] + public void DisablesApplicationDiagnosticOnSlot() + { + // Setup + string slot = "staging"; + websitesClientMock.Setup(f => f.DisableApplicationDiagnostic( + websiteName, + WebsiteDiagnosticOutput.FileSystem, slot)); + + disableAzureWebsiteApplicationDiagnosticCommand = new DisableAzureWebsiteApplicationDiagnosticCommand() + { + CommandRuntime = commandRuntimeMock.Object, + Name = websiteName, + WebsitesClient = websitesClientMock.Object, + File = true, + Slot = slot + }; + + AzureSession.SetCurrentContext(new AzureSubscription { Id = new System.Guid(base.subscriptionId) }, null, null); + + // Test + disableAzureWebsiteApplicationDiagnosticCommand.ExecuteCmdlet(); + + // Assert + websitesClientMock.Verify(f => f.DisableApplicationDiagnostic( + websiteName, + WebsiteDiagnosticOutput.FileSystem, slot), Times.Once()); + + commandRuntimeMock.Verify(f => f.WriteObject(true), Times.Never()); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/EnableAzureWebsiteDiagnosticTests.cs b/src/ServiceManagement/Services/Commands.Test/Websites/EnableAzureWebsiteDiagnosticTests.cs new file mode 100644 index 000000000000..af3db57ecc19 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Websites/EnableAzureWebsiteDiagnosticTests.cs @@ -0,0 +1,268 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.DeploymentEntities; +using Microsoft.WindowsAzure.Commands.Websites; +using Moq; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.Test.Websites +{ + public class EnableAzureWebsiteApplicationDiagnosticTests : WebsitesTestBase + { + private const string websiteName = "website1"; + + private Mock websitesClientMock = new Mock(); + + private EnableAzureWebsiteApplicationDiagnosticCommand enableAzureWebsiteApplicationDiagnosticCommand; + + private Mock commandRuntimeMock; + + private Dictionary properties; + + public EnableAzureWebsiteApplicationDiagnosticTests() + { + websitesClientMock = new Mock(); + commandRuntimeMock = new Mock(); + properties = new Dictionary(); + properties[DiagnosticProperties.LogLevel] = LogEntryType.Information; + } + + [Fact] + public void EnableAzureWebsiteApplicationDiagnosticApplication() + { + // Setup + websitesClientMock.Setup(f => f.EnableApplicationDiagnostic( + websiteName, + WebsiteDiagnosticOutput.FileSystem, + properties, null)); + + enableAzureWebsiteApplicationDiagnosticCommand = new EnableAzureWebsiteApplicationDiagnosticCommand() + { + CommandRuntime = commandRuntimeMock.Object, + Name = websiteName, + WebsitesClient = websitesClientMock.Object, + File = true, + LogLevel = LogEntryType.Information + }; + + AzureSession.SetCurrentContext(new AzureSubscription { Id = new System.Guid(base.subscriptionId) }, null, null); + + // Test + enableAzureWebsiteApplicationDiagnosticCommand.ExecuteCmdlet(); + + // Assert + websitesClientMock.Verify(f => f.EnableApplicationDiagnostic( + websiteName, + WebsiteDiagnosticOutput.FileSystem, + properties, null), Times.Once()); + + commandRuntimeMock.Verify(f => f.WriteObject(true), Times.Never()); + } + + [Fact] + public void EnableAzureWebsiteApplicationDiagnosticApplicationTableLog() + { + // Setup + string storageName = "MyStorage"; + string tableName = "MyTable"; + properties[DiagnosticProperties.StorageAccountName] = storageName; + properties[DiagnosticProperties.StorageTableName] = tableName.ToLowerInvariant(); + websitesClientMock.Setup(f => f.EnableApplicationDiagnostic( + websiteName, + WebsiteDiagnosticOutput.StorageTable, + properties, null)); + + enableAzureWebsiteApplicationDiagnosticCommand = new EnableAzureWebsiteApplicationDiagnosticCommand() + { + CommandRuntime = commandRuntimeMock.Object, + Name = websiteName, + WebsitesClient = websitesClientMock.Object, + TableStorage = true, + LogLevel = LogEntryType.Information, + StorageAccountName = storageName, + StorageTableName = tableName + }; + + AzureSession.SetCurrentContext(new AzureSubscription { Id = new System.Guid(base.subscriptionId) }, null, null); + + // Test + enableAzureWebsiteApplicationDiagnosticCommand.ExecuteCmdlet(); + + // Assert + websitesClientMock.Verify(f => f.EnableApplicationDiagnostic( + websiteName, + WebsiteDiagnosticOutput.StorageTable, + properties, null), Times.Once()); + + commandRuntimeMock.Verify(f => f.WriteObject(true), Times.Never()); + } + + [Fact] + public void EnableAzureWebsiteApplicationDiagnosticApplicationTableLogUseCurrentStorageAccount() + { + // Setup + string storageName = "MyStorage"; + string tableName = "MyTable"; + properties[DiagnosticProperties.StorageAccountName] = storageName; + properties[DiagnosticProperties.StorageTableName] = tableName.ToLowerInvariant(); + websitesClientMock.Setup(f => f.EnableApplicationDiagnostic( + websiteName, + WebsiteDiagnosticOutput.StorageTable, + properties, null)); + + enableAzureWebsiteApplicationDiagnosticCommand = new EnableAzureWebsiteApplicationDiagnosticCommand() + { + CommandRuntime = commandRuntimeMock.Object, + Name = websiteName, + WebsitesClient = websitesClientMock.Object, + TableStorage = true, + LogLevel = LogEntryType.Information, + StorageTableName = tableName + }; + + AzureSession.SetCurrentContext(new AzureSubscription { Id = new System.Guid(base.subscriptionId) }, null, null); + AzureSession.CurrentContext.Subscription.Properties[AzureSubscription.Property.StorageAccount] = storageName; + + // Test + enableAzureWebsiteApplicationDiagnosticCommand.ExecuteCmdlet(); + + // Assert + websitesClientMock.Verify(f => f.EnableApplicationDiagnostic( + websiteName, + WebsiteDiagnosticOutput.StorageTable, + properties, null), Times.Once()); + + commandRuntimeMock.Verify(f => f.WriteObject(true), Times.Never()); + } + + [Fact] + public void EnableAzureWebsiteApplicationDiagnosticApplicationBlobLog() + { + // Setup + string storageName = "MyStorage"; + string blobContainerName = "MyBlobContainer"; + properties[DiagnosticProperties.StorageAccountName] = storageName; + properties[DiagnosticProperties.StorageBlobContainerName] = blobContainerName.ToLowerInvariant(); + websitesClientMock.Setup(f => f.EnableApplicationDiagnostic( + websiteName, + WebsiteDiagnosticOutput.StorageBlob, + properties, null)); + + enableAzureWebsiteApplicationDiagnosticCommand = new EnableAzureWebsiteApplicationDiagnosticCommand() + { + CommandRuntime = commandRuntimeMock.Object, + Name = websiteName, + WebsitesClient = websitesClientMock.Object, + BlobStorage = true, + LogLevel = LogEntryType.Information, + StorageAccountName = storageName, + StorageBlobContainerName = blobContainerName + }; + + AzureSession.SetCurrentContext(new AzureSubscription { Id = new System.Guid(base.subscriptionId) }, null, null); + + // Test + enableAzureWebsiteApplicationDiagnosticCommand.ExecuteCmdlet(); + + // Assert + websitesClientMock.Verify(f => f.EnableApplicationDiagnostic( + websiteName, + WebsiteDiagnosticOutput.StorageBlob, + properties, null), Times.Once()); + + commandRuntimeMock.Verify(f => f.WriteObject(true), Times.Never()); + } + + [Fact] + public void EnableAzureWebsiteApplicationDiagnosticApplicationBlobLogUseCurrentStorageAccount() + { + // Setup + string storageName = "MyStorage"; + string blobContainerName = "MyBlobContainer"; + properties[DiagnosticProperties.StorageAccountName] = storageName; + properties[DiagnosticProperties.StorageBlobContainerName] = blobContainerName.ToLowerInvariant(); + websitesClientMock.Setup(f => f.EnableApplicationDiagnostic( + websiteName, + WebsiteDiagnosticOutput.StorageBlob, + properties, null)); + + enableAzureWebsiteApplicationDiagnosticCommand = new EnableAzureWebsiteApplicationDiagnosticCommand() + { + CommandRuntime = commandRuntimeMock.Object, + Name = websiteName, + WebsitesClient = websitesClientMock.Object, + BlobStorage = true, + LogLevel = LogEntryType.Information, + StorageBlobContainerName = blobContainerName + }; + + AzureSession.SetCurrentContext(new AzureSubscription { Id = new System.Guid(base.subscriptionId) }, null, null); + AzureSession.CurrentContext.Subscription.Properties[AzureSubscription.Property.StorageAccount] = storageName; + + // Test + enableAzureWebsiteApplicationDiagnosticCommand.ExecuteCmdlet(); + + // Assert + websitesClientMock.Verify(f => f.EnableApplicationDiagnostic( + websiteName, + WebsiteDiagnosticOutput.StorageBlob, + properties, null), Times.Once()); + + commandRuntimeMock.Verify(f => f.WriteObject(true), Times.Never()); + } + + [Fact] + public void EnableApplicationDiagnosticOnSlot() + { + string slot = "staging"; + // Setup + websitesClientMock.Setup(f => f.EnableApplicationDiagnostic( + websiteName, + WebsiteDiagnosticOutput.FileSystem, + properties, + slot)); + + enableAzureWebsiteApplicationDiagnosticCommand = new EnableAzureWebsiteApplicationDiagnosticCommand() + { + CommandRuntime = commandRuntimeMock.Object, + Name = websiteName, + WebsitesClient = websitesClientMock.Object, + File = true, + LogLevel = LogEntryType.Information, + Slot = slot + }; + + AzureSession.SetCurrentContext(new AzureSubscription { Id = new System.Guid(base.subscriptionId) }, null, null); + + // Test + enableAzureWebsiteApplicationDiagnosticCommand.ExecuteCmdlet(); + + // Assert + websitesClientMock.Verify(f => f.EnableApplicationDiagnostic( + websiteName, + WebsiteDiagnosticOutput.FileSystem, + properties, + slot), Times.Once()); + + commandRuntimeMock.Verify(f => f.WriteObject(true), Times.Never()); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/GetAzureWebSiteMetricsTests.cs b/src/ServiceManagement/Services/Commands.Test/Websites/GetAzureWebSiteMetricsTests.cs new file mode 100644 index 000000000000..cb619b5d506f --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Websites/GetAzureWebSiteMetricsTests.cs @@ -0,0 +1,80 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; +using Microsoft.WindowsAzure.Commands.Websites; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.Websites +{ + + public class GetAzureWebsiteMetricsTests : WebsitesTestBase + { + [Fact] + public void GetWebsiteMetricsBasicTest() + { + // Setup + var clientMock = new Mock(); + clientMock.Setup(c => c.ListWebSpaces()) + .Returns(new[] {new WebSpace {Name = "webspace1"}, new WebSpace {Name = "webspace2"}}); + + clientMock.Setup(c => c.ListSitesInWebSpace("webspace1")) + .Returns(new[] {new Site {Name = "website1", WebSpace = "webspace1"}}); + + clientMock.Setup(c => c.GetHistoricalUsageMetrics("website1", null, null, null, null, null, false, false)) + .Returns(new[] {new MetricResponse() {Code = "Success", + Data = new MetricSet() + { + Name = "CPU Time", + StartTime = DateTime.Parse("7/28/2014 1:00:00 AM"), + EndTime = DateTime.Parse("7/28/2014 2:00:00 AM"), + Values = new List + { + new MetricSample + { + TimeCreated = DateTime.Parse("7/28/2014 1:00:00 AM"), + Total = 201, + } + } + }}}); + + // Test + var command = new GetAzureWebsiteMetricCommand + { + Name = "website1", + CommandRuntime = new MockCommandRuntime(), + WebsitesClient = clientMock.Object + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(subscriptionId) }, null, null); + + command.ExecuteCmdlet(); + Assert.Equal(1, ((MockCommandRuntime)command.CommandRuntime).OutputPipeline.Count); + var metrics = (MetricResponse)((MockCommandRuntime)command.CommandRuntime).OutputPipeline.FirstOrDefault(); + Assert.NotNull(metrics); + Assert.Equal("CPU Time", metrics.Data.Name); + Assert.NotNull(metrics.Data.Values); + Assert.NotNull(metrics.Data.Values[0]); + Assert.Equal(201, metrics.Data.Values[0].Total); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/GetAzureWebSiteTests.cs b/src/ServiceManagement/Services/Commands.Test/Websites/GetAzureWebSiteTests.cs new file mode 100644 index 000000000000..b00c5f774dc9 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Websites/GetAzureWebSiteTests.cs @@ -0,0 +1,264 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; +using Microsoft.WindowsAzure.Commands.Websites; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.Websites +{ + + public class GetAzureWebsiteTests : WebsitesTestBase + { + [Fact] + public void ProcessGetWebsiteTest() + { + // Setup + var clientMock = new Mock(); + clientMock.Setup(c => c.ListWebSpaces()) + .Returns(new[] {new WebSpace {Name = "webspace1"}, new WebSpace {Name = "webspace2"}}); + + clientMock.Setup(c => c.ListSitesInWebSpace("webspace1")) + .Returns(new[] {new Site {Name = "website1", WebSpace = "webspace1"}}); + + clientMock.Setup(c => c.ListSitesInWebSpace("webspace2")) + .Returns(new[] {new Site {Name = "website2", WebSpace = "webspace2"}}); + clientMock.Setup(c => c.ListWebsites()) + .Returns(new List { new Site { Name = "website1", WebSpace = "webspace1" }, + new Site { Name = "website2", WebSpace = "webspace2" }}); + + // Test + var getAzureWebsiteCommand = new GetAzureWebsiteCommand + { + CommandRuntime = new MockCommandRuntime(), + WebsitesClient = clientMock.Object + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(subscriptionId) }, null, null); + + getAzureWebsiteCommand.ExecuteCmdlet(); + Assert.Equal(1, ((MockCommandRuntime)getAzureWebsiteCommand.CommandRuntime).OutputPipeline.Count); + var sites = (IEnumerable)((MockCommandRuntime)getAzureWebsiteCommand.CommandRuntime).OutputPipeline.FirstOrDefault(); + Assert.NotNull(sites); + Assert.True(sites.Any(website => (website).Name.Equals("website1") && (website).WebSpace.Equals("webspace1"))); + Assert.True(sites.Any(website => (website).Name.Equals("website2") && (website).WebSpace.Equals("webspace2"))); + } + + [Fact] + public void GetWebsiteProcessShowTest() + { + // Setup + var clientMock = new Mock(); + clientMock.Setup(c => c.GetWebsiteSlots(It.IsAny())) + .Returns(new Sites() { new Site + { + Name = "website1", + WebSpace = "webspace1" + }}); + + clientMock.Setup(c => c.GetWebsiteConfiguration(It.IsAny())) + .Returns(new SiteConfig + { + PublishingUsername = "user1" + } + ); + clientMock.Setup(c => c.GetWebsiteConfiguration(It.IsAny(), null)) + .Returns(new SiteConfig { + PublishingUsername = "user1"} + ); + + + // Test + var getAzureWebsiteCommand = new GetAzureWebsiteCommand + { + CommandRuntime = new MockCommandRuntime(), + Name = "website1", + WebsitesClient = clientMock.Object + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(subscriptionId) }, null, null); + + getAzureWebsiteCommand.ExecuteCmdlet(); + Assert.Equal(1, ((MockCommandRuntime)getAzureWebsiteCommand.CommandRuntime).OutputPipeline.Count); + + SiteWithConfig website = ((MockCommandRuntime)getAzureWebsiteCommand.CommandRuntime).OutputPipeline[0] as SiteWithConfig; + Assert.NotNull(website); + Assert.NotNull(website); + Assert.Equal("website1", website.Name); + Assert.Equal("webspace1", website.WebSpace); + + // Run with mixed casing + getAzureWebsiteCommand = new GetAzureWebsiteCommand + { + CommandRuntime = new MockCommandRuntime(), + Name = "WEBSiTe1", + WebsitesClient = clientMock.Object + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(subscriptionId) }, null, null); + + getAzureWebsiteCommand.ExecuteCmdlet(); + Assert.Equal(1, ((MockCommandRuntime)getAzureWebsiteCommand.CommandRuntime).OutputPipeline.Count); + + website = ((MockCommandRuntime)getAzureWebsiteCommand.CommandRuntime).OutputPipeline[0] as SiteWithConfig; + Assert.NotNull(website); + Assert.NotNull(website); + Assert.Equal("website1", website.Name); + Assert.Equal("webspace1", website.WebSpace); + } + + [Fact] + public void ProcessGetWebsiteWithNullSubscription() + { + // Test + var getAzureWebsiteCommand = new GetAzureWebsiteCommand + { + CommandRuntime = new MockCommandRuntime() + }; + AzureSession.SetCurrentContext(null, null, null); + + + Testing.AssertThrows(getAzureWebsiteCommand.ExecuteCmdlet, Resources.InvalidCurrentSubscription); + } + + [Fact] + public void TestGetAzureWebsiteWithDiagnosticsSettings() + { + // Setup + string slot = "production"; + var websitesClientMock = new Mock(); + websitesClientMock.Setup(c => c.GetWebsite(It.IsAny(), slot)) + .Returns(new Site + { + Name = "website1", WebSpace = "webspace1", State = "Running" + }); + + websitesClientMock.Setup(c => c.GetWebsiteConfiguration(It.IsAny())) + .Returns(new SiteConfig { PublishingUsername = "user1" }); + websitesClientMock.Setup(c => c.GetWebsiteConfiguration(It.IsAny(), slot)) + .Returns(new SiteConfig {PublishingUsername = "user1"}); + + var getAzureWebsiteCommand = new GetAzureWebsiteCommand + { + CommandRuntime = new MockCommandRuntime(), + Name = "website1", + WebsitesClient = websitesClientMock.Object, + Slot = slot + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(subscriptionId) }, null, null); + + // Test + getAzureWebsiteCommand.ExecuteCmdlet(); + + // Assert + Assert.Equal(1, ((MockCommandRuntime)getAzureWebsiteCommand.CommandRuntime).OutputPipeline.Count); + websitesClientMock.Verify(f => f.GetApplicationDiagnosticsSettings("website1"), Times.Once()); + } + + [Fact] + public void GetsWebsiteSlot() + { + // Setup + string slot = "staging"; + var clientMock = new Mock(); + clientMock.Setup(c => c.GetWebsite(It.IsAny(), slot)) + .Returns(new Site + { + Name = "website1(stage)", + WebSpace = "webspace1" + }); + + clientMock.Setup(c => c.GetWebsiteConfiguration(It.IsAny())) + .Returns(new SiteConfig + { + PublishingUsername = "user1" + }); + clientMock.Setup(c => c.GetWebsiteConfiguration(It.IsAny(), slot)) + .Returns(new SiteConfig + { + PublishingUsername = "user1" + }); + + // Test + var getAzureWebsiteCommand = new GetAzureWebsiteCommand + { + CommandRuntime = new MockCommandRuntime(), + Name = "website1", + WebsitesClient = clientMock.Object, + Slot = slot + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(subscriptionId) }, null, null); + + getAzureWebsiteCommand.ExecuteCmdlet(); + Assert.Equal(1, ((MockCommandRuntime)getAzureWebsiteCommand.CommandRuntime).OutputPipeline.Count); + + var website = ((MockCommandRuntime)getAzureWebsiteCommand.CommandRuntime).OutputPipeline[0] as SiteWithConfig; + Assert.NotNull(website); + Assert.Equal("website1(stage)", website.Name); + Assert.Equal("webspace1", website.WebSpace); + Assert.Equal("user1", website.PublishingUsername); + } + + [Fact] + public void GetsSlots() + { + // Setup + string slot = "staging"; + var clientMock = new Mock(); + clientMock.Setup(c => c.ListWebsites(slot)) + .Returns(new List {new Site + { + Name = "website1(stage)", + WebSpace = "webspace1" + }, new Site + { + Name = "website2(stage)", + WebSpace = "webspace1" + }}); + + clientMock.Setup(c => c.GetWebsiteConfiguration(It.IsAny(), slot)) + .Returns(new SiteConfig + { + PublishingUsername = "user1" + }); + + // Test + var getAzureWebsiteCommand = new GetAzureWebsiteCommand + { + CommandRuntime = new MockCommandRuntime(), + WebsitesClient = clientMock.Object, + Slot = slot + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(subscriptionId) }, null, null); + + getAzureWebsiteCommand.ExecuteCmdlet(); + IEnumerable sites = ((MockCommandRuntime)getAzureWebsiteCommand.CommandRuntime).OutputPipeline[0] as IEnumerable; + + var website1 = sites.ElementAt(0); + var website2 = sites.ElementAt(1); + Assert.NotNull(website1); + Assert.NotNull(website2); + Assert.Equal("website1(stage)", website1.Name); + Assert.Equal("website2(stage)", website2.Name); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/GetAzureWebsiteDeploymentTests.cs b/src/ServiceManagement/Services/Commands.Test/Websites/GetAzureWebsiteDeploymentTests.cs new file mode 100644 index 000000000000..7043b0d44993 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Websites/GetAzureWebsiteDeploymentTests.cs @@ -0,0 +1,194 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.DeploymentEntities; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; +using Microsoft.WindowsAzure.Commands.Websites; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.Websites +{ + + public class GetAzureWebsiteDeploymentTests : WebsitesTestBase + { + [Fact] + public void GetAzureWebsiteDeploymentTest() + { + // Setup + var clientMock = new Mock(); + var site1 = new Site + { + Name = "website1", + WebSpace = "webspace1", + SiteProperties = new SiteProperties + { + Properties = new List + { + new NameValuePair {Name = "repositoryuri", Value = "http"}, + new NameValuePair {Name = "PublishingUsername", Value = "user1"}, + new NameValuePair {Name = "PublishingPassword", Value = "password1"} + } + } + }; + + clientMock.Setup(c => c.GetWebsite("website1", null)) + .Returns(site1); + + clientMock.Setup(c => c.ListWebSpaces()) + .Returns(new[] { new WebSpace { Name = "webspace1" }, new WebSpace { Name = "webspace2" } }); + clientMock.Setup(c => c.ListSitesInWebSpace("webspace1")) + .Returns(new[] { site1 }); + + clientMock.Setup(c => c.ListSitesInWebSpace("webspace2")) + .Returns(new[] { new Site { Name = "website2", WebSpace = "webspace2" } }); + + SimpleDeploymentServiceManagement deploymentChannel = new SimpleDeploymentServiceManagement(); + deploymentChannel.GetDeploymentsThunk = ar => new List { new DeployResult(), new DeployResult() }; + + // Test + GetAzureWebsiteDeploymentCommand getAzureWebsiteDeploymentCommand = new GetAzureWebsiteDeploymentCommand(deploymentChannel) + { + Name = "website1", + ShareChannel = true, + WebsitesClient = clientMock.Object, + CommandRuntime = new MockCommandRuntime(), + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(subscriptionId) }, null, null); + + + getAzureWebsiteDeploymentCommand.ExecuteCmdlet(); + Assert.Equal(1, ((MockCommandRuntime)getAzureWebsiteDeploymentCommand.CommandRuntime).OutputPipeline.Count); + var deployments = (IEnumerable)((MockCommandRuntime)getAzureWebsiteDeploymentCommand.CommandRuntime).OutputPipeline.FirstOrDefault(); + Assert.NotNull(deployments); + Assert.Equal(2, deployments.Count()); + } + + [Fact] + public void GetAzureWebsiteDeploymentLogsTest() + { + // Setup + var clientMock = new Mock(); + var site1 = new Site + { + Name = "website1", + WebSpace = "webspace1", + SiteProperties = new SiteProperties + { + Properties = new List + { + new NameValuePair {Name = "repositoryuri", Value = "http"}, + new NameValuePair {Name = "PublishingUsername", Value = "user1"}, + new NameValuePair {Name = "PublishingPassword", Value = "password1"} + } + } + }; + + clientMock.Setup(c => c.ListWebSpaces()) + .Returns(new[] {new WebSpace {Name = "webspace1"}, new WebSpace {Name = "webspace2"}}); + clientMock.Setup(c => c.GetWebsite("website1", null)).Returns(site1); + + SimpleDeploymentServiceManagement deploymentChannel = new SimpleDeploymentServiceManagement(); + deploymentChannel.GetDeploymentsThunk = ar => new List { new DeployResult { Id = "commit1" }, new DeployResult { Id = "commit2" } }; + deploymentChannel.GetDeploymentLogsThunk = ar => + { + if (ar.Values["commitId"].Equals("commit1")) + { + return new List { new LogEntry { Id = "log1" }, new LogEntry { Id = "log2" } }; + } + + return new List(); + }; + + // Test + GetAzureWebsiteDeploymentCommand getAzureWebsiteDeploymentCommand = new GetAzureWebsiteDeploymentCommand(deploymentChannel) + { + Name = "website1", + ShareChannel = true, + WebsitesClient = clientMock.Object, + Details = true, + CommandRuntime = new MockCommandRuntime(), + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(subscriptionId) }, null, null); + + getAzureWebsiteDeploymentCommand.ExecuteCmdlet(); + Assert.Equal(1, ((MockCommandRuntime)getAzureWebsiteDeploymentCommand.CommandRuntime).OutputPipeline.Count); + var deployments = (IEnumerable)((MockCommandRuntime)getAzureWebsiteDeploymentCommand.CommandRuntime).OutputPipeline.FirstOrDefault(); + Assert.NotNull(deployments); + Assert.Equal(2, deployments.Count()); + Assert.NotNull(deployments.First(d => d.Id.Equals("commit1")).Logs); + } + + [Fact] + public void GetsDeploymentForSlot() + { + string slot = "staging"; + // Setup + var clientMock = new Mock(); + var site1 = new Site + { + Name = "website1", + WebSpace = "webspace1", + SiteProperties = new SiteProperties + { + Properties = new List + { + new NameValuePair {Name = "repositoryuri", Value = "http"}, + new NameValuePair {Name = "PublishingUsername", Value = "user1"}, + new NameValuePair {Name = "PublishingPassword", Value = "password1"} + } + } + }; + + clientMock.Setup(c => c.GetWebsite("website1", slot)) + .Returns(site1); + + clientMock.Setup(c => c.ListWebSpaces()) + .Returns(new[] { new WebSpace { Name = "webspace1" }, new WebSpace { Name = "webspace2" } }); + clientMock.Setup(c => c.ListSitesInWebSpace("webspace1")) + .Returns(new[] { site1 }); + + clientMock.Setup(c => c.ListSitesInWebSpace("webspace2")) + .Returns(new[] { new Site { Name = "website2", WebSpace = "webspace2" } }); + + SimpleDeploymentServiceManagement deploymentChannel = new SimpleDeploymentServiceManagement(); + deploymentChannel.GetDeploymentsThunk = ar => new List { new DeployResult(), new DeployResult() }; + + // Test + GetAzureWebsiteDeploymentCommand getAzureWebsiteDeploymentCommand = new GetAzureWebsiteDeploymentCommand(deploymentChannel) + { + Name = "website1", + ShareChannel = true, + WebsitesClient = clientMock.Object, + CommandRuntime = new MockCommandRuntime(), + Slot = slot + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(subscriptionId) }, null, null); + + getAzureWebsiteDeploymentCommand.ExecuteCmdlet(); + Assert.Equal(1, ((MockCommandRuntime)getAzureWebsiteDeploymentCommand.CommandRuntime).OutputPipeline.Count); + var deployments = (IEnumerable)((MockCommandRuntime)getAzureWebsiteDeploymentCommand.CommandRuntime).OutputPipeline.FirstOrDefault(); + Assert.NotNull(deployments); + Assert.Equal(2, deployments.Count()); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/GetAzureWebsiteLocationTests.cs b/src/ServiceManagement/Services/Commands.Test/Websites/GetAzureWebsiteLocationTests.cs new file mode 100644 index 000000000000..87213f0b01c7 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Websites/GetAzureWebsiteLocationTests.cs @@ -0,0 +1,50 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Xunit; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Websites; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.Websites +{ + + public class GetAzureWebsiteLocationTests : WebsitesTestBase + { + [Fact] + public void ProcessGetAzureWebsiteLocationTest() + { + // Setup + Mock clientMock = new Mock(); + Mock commandRuntimeMock = new Mock(); + List regions = new List() {"West US", "North Moon", "Central West Sun"}; + clientMock.Setup(f => f.ListAvailableLocations()).Returns(regions); + + // Test + GetAzureWebsiteLocationCommand getAzureWebsiteCommand = new GetAzureWebsiteLocationCommand() + { + WebsitesClient = clientMock.Object, + CommandRuntime = commandRuntimeMock.Object + }; + + getAzureWebsiteCommand.ExecuteCmdlet(); + + clientMock.Verify(f => f.ListAvailableLocations(), Times.Once()); + commandRuntimeMock.Verify(f => f.WriteObject(regions, true), Times.Once()); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/GetAzureWebsiteLogTests.cs b/src/ServiceManagement/Services/Commands.Test/Websites/GetAzureWebsiteLogTests.cs new file mode 100644 index 000000000000..62d8bd5421da --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Websites/GetAzureWebsiteLogTests.cs @@ -0,0 +1,146 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using Xunit; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.DeploymentEntities; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; +using Microsoft.WindowsAzure.Commands.Websites; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.Websites +{ + + public class GetAzureWebsiteLogTests : WebsitesTestBase + { + + private Mock commandRuntimeMock; + + private Mock websitesClientMock; + + private GetAzureWebsiteLogCommand getAzureWebsiteLogCmdlet; + + private string websiteName = "TestWebsiteName"; + + private string repoUrl = "TheRepoUrl"; + + private string slot = "staging"; + + private List logs; + + private Site website; + + Predicate stopCondition; + + public GetAzureWebsiteLogTests() + { + base.SetupTest(); + websitesClientMock = new Mock(); + commandRuntimeMock = new Mock(); + stopCondition = (string line) => line != null; + websitesClientMock.Setup(f => f.StartLogStreaming( + websiteName, + slot, + string.Empty, + string.Empty, + stopCondition, + It.IsAny())) + .Returns(logs); + logs = new List() { "Log1", "Error: Log2", "Log3", "Error: Log4", null }; + getAzureWebsiteLogCmdlet = new GetAzureWebsiteLogCommand(null) + { + CommandRuntime = commandRuntimeMock.Object, + WebsitesClient = websitesClientMock.Object, + StopCondition = stopCondition, + Name = websiteName, + ShareChannel = true, + Slot = slot + }; + website = new Site() + { + Name = websiteName, + WebSpace = "webspaceName", + SiteProperties = new SiteProperties() + { + Properties = new List() + { + new NameValuePair() { Name = UriElements.RepositoryUriProperty, Value = repoUrl } + } + } + }; + Cache.AddSite(getAzureWebsiteLogCmdlet.CurrentContext.Subscription.Id.ToString(), website); + websitesClientMock.Setup(c => c.GetWebsite(websiteName, slot)) + .Returns(website); + } + + [Fact] + public void GetAzureWebsiteLogTest() + { + getAzureWebsiteLogCmdlet.Tail = true; + + getAzureWebsiteLogCmdlet.ExecuteCmdlet(); + + websitesClientMock.Verify(f => f.StartLogStreaming( + websiteName, + slot, + null, + null, + stopCondition, + It.IsAny()), + Times.Once()); + } + + [Fact] + public void CanGetAzureWebsiteLogWithPath() + { + getAzureWebsiteLogCmdlet.Tail = true; + getAzureWebsiteLogCmdlet.Path = "http"; + + getAzureWebsiteLogCmdlet.ExecuteCmdlet(); + + websitesClientMock.Verify(f => f.StartLogStreaming( + websiteName, + slot, + "http", + null, + stopCondition, + It.IsAny()), + Times.Once()); + } + + [Fact] + public void TestGetAzureWebsiteLogListPath() + { + List paths = new List() { + new LogPath() { Name = "http" }, new LogPath() { Name = "Git" } + }; + List expected = new List() { "http", "Git" }; + List actual = new List(); + websitesClientMock.Setup(f => f.ListLogPaths(websiteName, slot)).Returns(paths); + commandRuntimeMock.Setup(f => f.WriteObject(It.IsAny>(), true)) + .Callback((o, b) => actual = actual = ((IEnumerable)o).ToList()); + getAzureWebsiteLogCmdlet.ListPath = true; + + getAzureWebsiteLogCmdlet.ExecuteCmdlet(); + + Assert.Equal(expected, actual); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/NewAzureWebSiteTests.cs b/src/ServiceManagement/Services/Commands.Test/Websites/NewAzureWebSiteTests.cs new file mode 100644 index 000000000000..8a3f66fcac03 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Websites/NewAzureWebSiteTests.cs @@ -0,0 +1,171 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Xunit; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; +using Microsoft.WindowsAzure.Commands.Websites; +using Microsoft.WindowsAzure.Management.WebSites.Models; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.Websites +{ + + public class NewAzureWebsiteTests : WebsitesTestBase + { + [Fact] + public void ProcessNewWebsiteTest() + { + const string websiteName = "website1"; + const string webspaceName = "webspace1"; + const string suffix = "azurewebsites.com"; + + // Setup + Mock clientMock = new Mock(); + clientMock.Setup(c => c.GetWebsiteDnsSuffix()).Returns(suffix); + clientMock.Setup(f => f.GetWebsite(websiteName)).Returns(new Site() { Name = websiteName }); + clientMock.Setup(f => f.GetWebsiteConfiguration(websiteName, null)).Returns(new SiteConfig() { PublishingUsername = "user1" }); + clientMock.Setup(c => c.ListWebSpaces()) + .Returns(new[] + { + new WebSpace {Name = "webspace1", GeoRegion = "webspace1"}, + new WebSpace {Name = "webspace2", GeoRegion = "webspace2"} + }); + + clientMock.Setup(c => c.GetWebsiteConfiguration("website1")) + .Returns(new SiteConfig { PublishingUsername = "user1" }); + + string createdSiteName = null; + string createdWebspaceName = null; + + clientMock.Setup(c => c.CreateWebsite(webspaceName, It.IsAny(), null)) + .Returns((string space, SiteWithWebSpace site, string slot) => site) + .Callback((string space, SiteWithWebSpace site, string slot) => + { + createdSiteName = site.Name; + createdWebspaceName = space; + }); + + // Test + MockCommandRuntime mockRuntime = new MockCommandRuntime(); + NewAzureWebsiteCommand newAzureWebsiteCommand = new NewAzureWebsiteCommand + { + ShareChannel = true, + CommandRuntime = mockRuntime, + Name = websiteName, + Location = webspaceName, + WebsitesClient = clientMock.Object + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(base.subscriptionId) }, null, null); + + newAzureWebsiteCommand.ExecuteCmdlet(); + Assert.Equal(websiteName, createdSiteName); + Assert.Equal(webspaceName, createdWebspaceName); + Assert.Equal(websiteName, (mockRuntime.OutputPipeline[0] as SiteWithConfig).Name); + } + + [Fact] + public void GetsWebsiteDefaultLocation() + { + const string websiteName = "website1"; + const string suffix = "azurewebsites.com"; + const string location = "West US"; + + bool created = false; + + // Setup + Mock clientMock = new Mock(); + clientMock.Setup(c => c.GetWebsiteDnsSuffix()).Returns(suffix); + clientMock.Setup(c => c.GetDefaultLocation()).Returns(location); + + clientMock.Setup(c => c.ListWebSpaces()).Returns(new WebSpaces()); + clientMock.Setup(c => c.GetWebsite(websiteName)).Returns(new Site() { Name = websiteName }); + clientMock.Setup(c => c.GetWebsiteConfiguration(websiteName, null)) + .Returns(new SiteConfig + { + PublishingUsername = "user1" + }); + + clientMock.Setup(c => c.CreateWebsite(It.IsAny(), It.IsAny(), null)) + .Returns((string space, SiteWithWebSpace site, string slot) => site) + .Callback((string space, SiteWithWebSpace site, string slot) => + { + created = true; + }); + + // Test + MockCommandRuntime mockRuntime = new MockCommandRuntime(); + NewAzureWebsiteCommand newAzureWebsiteCommand = new NewAzureWebsiteCommand() + { + ShareChannel = true, + CommandRuntime = mockRuntime, + Name = websiteName, + WebsitesClient = clientMock.Object + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(base.subscriptionId) }, null, null); + + newAzureWebsiteCommand.ExecuteCmdlet(); + Assert.True(created); + Assert.Equal(websiteName, (mockRuntime.OutputPipeline[0] as SiteWithConfig).Name); + clientMock.Verify(f => f.GetDefaultLocation(), Times.Once()); + } + + [Fact] + public void CreateStageSlot() + { + string slot = "staging"; + const string websiteName = "website1"; + const string webspaceName = "webspace1"; + const string suffix = "azurewebsites.com"; + + // Setup + Mock clientMock = new Mock(); + clientMock.Setup(c => c.GetWebsiteDnsSuffix()).Returns(suffix); + clientMock.Setup(c => c.ListWebSpaces()) + .Returns(new[] + { + new WebSpace {Name = "webspace1", GeoRegion = "webspace1"}, + new WebSpace {Name = "webspace2", GeoRegion = "webspace2"} + }); + + clientMock.Setup(c => c.GetWebsiteConfiguration("website1", slot)) + .Returns(new SiteConfig { PublishingUsername = "user1" }); + + + clientMock.Setup(f => f.WebsiteExists(websiteName)).Returns(true); + clientMock.Setup(f => f.GetWebsite(websiteName)).Returns(new Site() { Name = websiteName, Sku = SkuOptions.Standard, WebSpace = webspaceName }); + + // Test + MockCommandRuntime mockRuntime = new MockCommandRuntime(); + NewAzureWebsiteCommand newAzureWebsiteCommand = new NewAzureWebsiteCommand + { + ShareChannel = true, + CommandRuntime = mockRuntime, + Name = websiteName, + Location = webspaceName, + WebsitesClient = clientMock.Object, + Slot = slot + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(base.subscriptionId) }, null, null); + + newAzureWebsiteCommand.ExecuteCmdlet(); + clientMock.Verify(c => c.CreateWebsite(webspaceName, It.IsAny(), slot), Times.Once()); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/PublishAzureWebsiteProjectTests.cs b/src/ServiceManagement/Services/Commands.Test/Websites/PublishAzureWebsiteProjectTests.cs new file mode 100644 index 000000000000..f55d12ce1c5e --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Websites/PublishAzureWebsiteProjectTests.cs @@ -0,0 +1,126 @@ +using System.Collections; +using System.IO; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Websites; +using Microsoft.WindowsAzure.Management.WebSites.Models; +using Moq; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.Test.Websites +{ + public class PublishAzureWebsiteProjectTests : WebsitesTestBase + { + [Fact] + public void PublishFromPackage() + { + var websiteName = "test-site"; + string slot = null; + var package = "test-package"; + var connectionStrings = new Hashtable(); + connectionStrings["DefaultConnection"] = "test-connection-string"; + + var publishProfile = new WebSiteGetPublishProfileResponse.PublishProfile() + { + UserName = "test-user-name", + UserPassword = "test-password", + PublishUrl = "test-publlish-url" + }; + + var published = false; + + Mock clientMock = new Mock(); + + clientMock.Setup(c => c.GetWebDeployPublishProfile(websiteName, slot)).Returns(publishProfile); + clientMock.Setup(c => c.PublishWebProject(websiteName, slot, package, connectionStrings, false, false)) + .Callback((string n, string s, string p, Hashtable cs, bool skipAppData, bool doNotDelete) => + { + Assert.Equal(websiteName, n); + Assert.Equal(slot, s); + Assert.Equal(package, p); + Assert.Equal(connectionStrings, cs); + Assert.False(skipAppData); + Assert.False(doNotDelete); + published = true; + }); + + Mock powerShellMock = new Mock(); + + var command = new PublishAzureWebsiteProject() + { + CommandRuntime = powerShellMock.Object, + Name = websiteName, + Package = package, + ConnectionString = connectionStrings, + WebsitesClient = clientMock.Object + }; + + command.ExecuteCmdlet(); + + powerShellMock.Verify(f => f.WriteVerbose(string.Format("[Complete] Publishing package {0}", package)), Times.Once()); + Assert.True(published); + } + + [Fact] + public void PublishFromProjectFile() + { + var websiteName = "test-site"; + string slot = null; + var projectFile = string.Format(@"{0}\Resources\MyWebApplication\WebApplication4.csproj", Directory.GetCurrentDirectory()); + var configuration = "Debug"; + var logFile = string.Format(@"{0}\build.log", Directory.GetCurrentDirectory()); + var connectionStrings = new Hashtable(); + connectionStrings["DefaultConnection"] = "test-connection-string"; + + using (FileSystemHelper files = new FileSystemHelper(this)) + { + string originalDirectory = Directory.GetCurrentDirectory(); + } + + var publishProfile = new WebSiteGetPublishProfileResponse.PublishProfile() + { + UserName = "test-user-name", + UserPassword = "test-password", + PublishUrl = "test-publlish-url" + }; + var package = "test-package.zip"; + + var published = false; + + Mock clientMock = new Mock(); + + clientMock.Setup(c => c.GetWebDeployPublishProfile(websiteName, slot)).Returns(publishProfile); + clientMock.Setup(c => c.BuildWebProject(projectFile, configuration, logFile)).Returns(package); + clientMock.Setup(c => c.PublishWebProject(websiteName, slot, package, connectionStrings, false, false)) + .Callback((string n, string s, string p, Hashtable cs, bool skipAppData, bool doNotDelete) => + { + Assert.Equal(websiteName, n); + Assert.Equal(slot, s); + Assert.Equal(package, p); + Assert.Equal(connectionStrings, cs); + Assert.False(skipAppData); + Assert.False(doNotDelete); + published = true; + }); + + Mock powerShellMock = new Mock(); + + var command = new PublishAzureWebsiteProject() + { + CommandRuntime = powerShellMock.Object, + WebsitesClient = clientMock.Object, + Name = websiteName, + ProjectFile = projectFile, + Configuration = configuration, + ConnectionString = connectionStrings + }; + + command.ExecuteCmdlet(); + + powerShellMock.Verify(f => f.WriteVerbose(string.Format("[Complete] Publishing package {0}", package)), Times.Once()); + Assert.True(published); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/RemoveAzureWebSiteTests.cs b/src/ServiceManagement/Services/Commands.Test/Websites/RemoveAzureWebSiteTests.cs new file mode 100644 index 000000000000..8f86e922c0fb --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Websites/RemoveAzureWebSiteTests.cs @@ -0,0 +1,57 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Xunit; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; +using Microsoft.WindowsAzure.Commands.Websites; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.Websites +{ + + public class RemoveAzureWebsiteTests : WebsitesTestBase + { + [Fact] + public void ProcessRemoveWebsiteTest() + { + // Setup + var mockClient = new Mock(); + string slot = "staging"; + + mockClient.Setup(c => c.GetWebsite("website1", slot)) + .Returns(new Site { Name = "website1", WebSpace = "webspace1" }); + mockClient.Setup(c => c.DeleteWebsite("webspace1", "website1", slot)).Verifiable(); + + // Test + RemoveAzureWebsiteCommand removeAzureWebsiteCommand = new RemoveAzureWebsiteCommand + { + CommandRuntime = new MockCommandRuntime(), + WebsitesClient = mockClient.Object, + Name = "website1", + Slot = slot + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(base.subscriptionId) }, null, null); + + // Delete existing website + removeAzureWebsiteCommand.ExecuteCmdlet(); + mockClient.Verify(c => c.DeleteWebsite("webspace1", "website1", slot), Times.Once()); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/RestartAzureWebsiteTests.cs b/src/ServiceManagement/Services/Commands.Test/Websites/RestartAzureWebsiteTests.cs new file mode 100644 index 000000000000..58e1a9099ef3 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Websites/RestartAzureWebsiteTests.cs @@ -0,0 +1,77 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Xunit; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Websites; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.Websites +{ + + public class RestartAzureWebsiteTests : WebsitesTestBase + { + [Fact] + public void ProcessRestartWebsiteTest() + { + // Setup + const string websiteName = "website1"; + Mock websitesClientMock = new Mock(); + websitesClientMock.Setup(f => f.RestartWebsite(websiteName, null)); + + // Test + RestartAzureWebsiteCommand restartAzureWebsiteCommand = new RestartAzureWebsiteCommand() + { + CommandRuntime = new MockCommandRuntime(), + Name = websiteName, + WebsitesClient = websitesClientMock.Object + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(base.subscriptionId) }, null, null); + + restartAzureWebsiteCommand.ExecuteCmdlet(); + + websitesClientMock.Verify(f => f.RestartWebsite(websiteName, null), Times.Once()); + } + + [Fact] + public void RestartsWebsiteSlot() + { + // Setup + const string websiteName = "website1"; + const string slot = "staging"; + + Mock websitesClientMock = new Mock(); + websitesClientMock.Setup(f => f.RestartWebsite(websiteName, slot)); + + // Test + RestartAzureWebsiteCommand restartAzureWebsiteCommand = new RestartAzureWebsiteCommand() + { + CommandRuntime = new MockCommandRuntime(), + Name = websiteName, + WebsitesClient = websitesClientMock.Object, + Slot = slot + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(base.subscriptionId) }, null, null); + + restartAzureWebsiteCommand.ExecuteCmdlet(); + + websitesClientMock.Verify(f => f.RestartWebsite(websiteName, slot), Times.Once()); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/RestoreAzureWebsiteDeploymentTests.cs b/src/ServiceManagement/Services/Commands.Test/Websites/RestoreAzureWebsiteDeploymentTests.cs new file mode 100644 index 000000000000..b9aac67c3acf --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Websites/RestoreAzureWebsiteDeploymentTests.cs @@ -0,0 +1,204 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.DeploymentEntities; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; +using Microsoft.WindowsAzure.Commands.Websites; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.Websites +{ + + public class RestoreAzureWebsiteDeploymentTests : WebsitesTestBase + { + [Fact] + public void RestoreAzureWebsiteDeploymentTest() + { + // Setup + var site1 = new Site + { + Name = "website1", + WebSpace = "webspace1", + SiteProperties = new SiteProperties + { + Properties = new List + { + new NameValuePair {Name = "repositoryuri", Value = "http"}, + new NameValuePair {Name = "PublishingUsername", Value = "user1"}, + new NameValuePair {Name = "PublishingPassword", Value = "password1"} + } + } + }; + + var clientMock = new Mock(); + clientMock.Setup(c => c.ListWebSpaces()) + .Returns(new[] {new WebSpace {Name = "webspace1"}, new WebSpace {Name = "webspace2"}}); + clientMock.Setup(c => c.GetWebsite("website1", null)) + .Returns(site1); + + SimpleDeploymentServiceManagement deploymentChannel = new SimpleDeploymentServiceManagement(); + + var deployments = new List { new DeployResult { Id = "id1", Current = false }, new DeployResult { Id = "id2", Current = true } }; + deploymentChannel.GetDeploymentsThunk = ar => deployments; + deploymentChannel.DeployThunk = ar => + { + // Keep track of currently deployed id + DeployResult newDeployment = deployments.FirstOrDefault(d => d.Id.Equals(ar.Values["commitId"])); + if (newDeployment != null) + { + // Make all inactive + deployments.ForEach(d => d.Complete = false); + + // Set new to active + newDeployment.Complete = true; + } + }; + + // Test + RestoreAzureWebsiteDeploymentCommand restoreAzureWebsiteDeploymentCommand = + new RestoreAzureWebsiteDeploymentCommand(deploymentChannel) + { + Name = "website1", + CommitId = "id2", + ShareChannel = true, + WebsitesClient = clientMock.Object, + CommandRuntime = new MockCommandRuntime(), + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(base.subscriptionId) }, null, null); + + restoreAzureWebsiteDeploymentCommand.ExecuteCmdlet(); + Assert.Equal(1, ((MockCommandRuntime) restoreAzureWebsiteDeploymentCommand.CommandRuntime).OutputPipeline.Count); + var responseDeployments = (IEnumerable)((MockCommandRuntime) restoreAzureWebsiteDeploymentCommand.CommandRuntime).OutputPipeline.FirstOrDefault(); + Assert.NotNull(responseDeployments); + Assert.Equal(2, responseDeployments.Count()); + Assert.True(responseDeployments.Any(d => d.Id.Equals("id2") && d.Complete)); + Assert.True(responseDeployments.Any(d => d.Id.Equals("id1") && !d.Complete)); + + // Change active deployment to id1 + restoreAzureWebsiteDeploymentCommand = new RestoreAzureWebsiteDeploymentCommand(deploymentChannel) + { + Name = "website1", + CommitId = "id1", + ShareChannel = true, + WebsitesClient = clientMock.Object, + CommandRuntime = new MockCommandRuntime(), + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(base.subscriptionId) }, null, null); + + restoreAzureWebsiteDeploymentCommand.ExecuteCmdlet(); + Assert.Equal(1, ((MockCommandRuntime)restoreAzureWebsiteDeploymentCommand.CommandRuntime).OutputPipeline.Count); + responseDeployments = (IEnumerable)((MockCommandRuntime)restoreAzureWebsiteDeploymentCommand.CommandRuntime).OutputPipeline.FirstOrDefault(); + Assert.NotNull(responseDeployments); + Assert.Equal(2, responseDeployments.Count()); + Assert.True(responseDeployments.Any(d => d.Id.Equals("id1") && d.Complete)); + Assert.True(responseDeployments.Any(d => d.Id.Equals("id2") && !d.Complete)); + } + + [Fact] + public void RestoresDeploymentForSlot() + { + string slot = "staging"; + // Setup + var site1 = new Site + { + Name = "website1", + WebSpace = "webspace1", + SiteProperties = new SiteProperties + { + Properties = new List + { + new NameValuePair {Name = "repositoryuri", Value = "http"}, + new NameValuePair {Name = "PublishingUsername", Value = "user1"}, + new NameValuePair {Name = "PublishingPassword", Value = "password1"} + } + } + }; + + var clientMock = new Mock(); + clientMock.Setup(c => c.ListWebSpaces()) + .Returns(new[] { new WebSpace { Name = "webspace1" }, new WebSpace { Name = "webspace2" } }); + clientMock.Setup(c => c.GetWebsite("website1", slot)) + .Returns(site1); + + SimpleDeploymentServiceManagement deploymentChannel = new SimpleDeploymentServiceManagement(); + + var deployments = new List { new DeployResult { Id = "id1", Current = false }, new DeployResult { Id = "id2", Current = true } }; + deploymentChannel.GetDeploymentsThunk = ar => deployments; + deploymentChannel.DeployThunk = ar => + { + // Keep track of currently deployed id + DeployResult newDeployment = deployments.FirstOrDefault(d => d.Id.Equals(ar.Values["commitId"])); + if (newDeployment != null) + { + // Make all inactive + deployments.ForEach(d => d.Complete = false); + + // Set new to active + newDeployment.Complete = true; + } + }; + + // Test + RestoreAzureWebsiteDeploymentCommand restoreAzureWebsiteDeploymentCommand = + new RestoreAzureWebsiteDeploymentCommand(deploymentChannel) + { + Name = "website1", + CommitId = "id2", + ShareChannel = true, + WebsitesClient = clientMock.Object, + CommandRuntime = new MockCommandRuntime(), + Slot = slot + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(base.subscriptionId) }, null, null); + + + restoreAzureWebsiteDeploymentCommand.ExecuteCmdlet(); + Assert.Equal(1, ((MockCommandRuntime)restoreAzureWebsiteDeploymentCommand.CommandRuntime).OutputPipeline.Count); + var responseDeployments = (IEnumerable)((MockCommandRuntime)restoreAzureWebsiteDeploymentCommand.CommandRuntime).OutputPipeline.FirstOrDefault(); + Assert.NotNull(responseDeployments); + Assert.Equal(2, responseDeployments.Count()); + Assert.True(responseDeployments.Any(d => d.Id.Equals("id2") && d.Complete)); + Assert.True(responseDeployments.Any(d => d.Id.Equals("id1") && !d.Complete)); + + // Change active deployment to id1 + restoreAzureWebsiteDeploymentCommand = new RestoreAzureWebsiteDeploymentCommand(deploymentChannel) + { + Name = "website1", + CommitId = "id1", + ShareChannel = true, + WebsitesClient = clientMock.Object, + CommandRuntime = new MockCommandRuntime(), + Slot = slot + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(base.subscriptionId) }, null, null); + + restoreAzureWebsiteDeploymentCommand.ExecuteCmdlet(); + Assert.Equal(1, ((MockCommandRuntime)restoreAzureWebsiteDeploymentCommand.CommandRuntime).OutputPipeline.Count); + responseDeployments = (IEnumerable)((MockCommandRuntime)restoreAzureWebsiteDeploymentCommand.CommandRuntime).OutputPipeline.FirstOrDefault(); + Assert.NotNull(responseDeployments); + Assert.Equal(2, responseDeployments.Count()); + Assert.True(responseDeployments.Any(d => d.Id.Equals("id1") && d.Complete)); + Assert.True(responseDeployments.Any(d => d.Id.Equals("id2") && !d.Complete)); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/SaveAzureWebsiteLogTests.cs b/src/ServiceManagement/Services/Commands.Test/Websites/SaveAzureWebsiteLogTests.cs new file mode 100644 index 000000000000..c6471e90303a --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Websites/SaveAzureWebsiteLogTests.cs @@ -0,0 +1,147 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using Xunit; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; +using Microsoft.WindowsAzure.Commands.Websites; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.Websites +{ + + public class SaveAzureWebsiteLogTests : WebsitesTestBase + { + private Site site1 = new Site + { + Name = "website1", + WebSpace = "webspace1", + SiteProperties = new SiteProperties + { + Properties = new List + { + new NameValuePair {Name = "repositoryuri", Value = "http"}, + new NameValuePair {Name = "PublishingUsername", Value = "user1"}, + new NameValuePair {Name = "PublishingPassword", Value = "password1"} + } + } + }; + + private string slot = "staging"; + + private List spaces = new List + { + new WebSpace {Name = "webspace1"}, + new WebSpace {Name = "webspace2"} + }; + + private Mock clientMock; + + public SaveAzureWebsiteLogTests() + { + clientMock = new Mock(); + clientMock.Setup(c => c.GetWebsite("website1", null)) + .Returns(site1); + clientMock.Setup(c => c.GetWebsite("website1", slot)) + .Returns(site1); + clientMock.Setup(c => c.ListWebSpaces()) + .Returns(spaces); + } + + [Fact] + public void SaveAzureWebsiteLogTest() + { + // Setup + SimpleDeploymentServiceManagement deploymentChannel = new SimpleDeploymentServiceManagement + { + DownloadLogsThunk = ar => new MemoryStream(Encoding.UTF8.GetBytes("test")) + }; + + // Test + SaveAzureWebsiteLogCommand getAzureWebsiteLogCommand = new SaveAzureWebsiteLogCommand(deploymentChannel) + { + Name = "website1", + ShareChannel = true, + WebsitesClient = clientMock.Object, + CommandRuntime = new MockCommandRuntime(), + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(base.subscriptionId) }, null, null); + + getAzureWebsiteLogCommand.DefaultCurrentPath = ""; + getAzureWebsiteLogCommand.ExecuteCmdlet(); + Assert.Equal("test", FileUtilities.DataStore.ReadFileAsText(SaveAzureWebsiteLogCommand.DefaultOutput)); + } + + [Fact] + public void SaveAzureWebsiteLogWithNoFileExtensionTest() + { + // Setup + string expectedOutput = "file_without_ext.zip"; + + SimpleDeploymentServiceManagement deploymentChannel = new SimpleDeploymentServiceManagement + { + DownloadLogsThunk = ar => new MemoryStream(Encoding.UTF8.GetBytes("test with no extension")) + }; + + // Test + SaveAzureWebsiteLogCommand getAzureWebsiteLogCommand = new SaveAzureWebsiteLogCommand(deploymentChannel) + { + Name = "website1", + ShareChannel = true, + WebsitesClient = clientMock.Object, + CommandRuntime = new MockCommandRuntime(), + Output = "file_without_ext" + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(base.subscriptionId) }, null, null); + + getAzureWebsiteLogCommand.DefaultCurrentPath = ""; + getAzureWebsiteLogCommand.ExecuteCmdlet(); + Assert.Equal("test with no extension", FileUtilities.DataStore.ReadFileAsText(expectedOutput)); + } + + [Fact] + public void SaveAzureWebsiteLogWithSlotTest() + { + // Setup + SimpleDeploymentServiceManagement deploymentChannel = new SimpleDeploymentServiceManagement + { + DownloadLogsThunk = ar => new MemoryStream(Encoding.UTF8.GetBytes("test")) + }; + + // Test + SaveAzureWebsiteLogCommand getAzureWebsiteLogCommand = new SaveAzureWebsiteLogCommand(deploymentChannel) + { + Name = "website1", + ShareChannel = true, + WebsitesClient = clientMock.Object, + CommandRuntime = new MockCommandRuntime(), + Slot = slot + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(base.subscriptionId) }, null, null); + + getAzureWebsiteLogCommand.DefaultCurrentPath = ""; + getAzureWebsiteLogCommand.ExecuteCmdlet(); + Assert.Equal("test", FileUtilities.DataStore.ReadFileAsText(SaveAzureWebsiteLogCommand.DefaultOutput)); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/Services/CacheTests.cs b/src/ServiceManagement/Services/Commands.Test/Websites/Services/CacheTests.cs new file mode 100644 index 000000000000..a24edfdf6f2a --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Websites/Services/CacheTests.cs @@ -0,0 +1,120 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using Xunit; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; +using Microsoft.WindowsAzure.Commands.Common; + +namespace Microsoft.WindowsAzure.Commands.Test.Websites.Services +{ + + public class CacheTests : TestBase, IDisposable + { + public static string SubscriptionName = "fakename"; + + public static string WebSpacesFile; + + public static string SitesFile; + + private FileSystemHelper helper; + + public CacheTests() + { + helper = new FileSystemHelper(this); + helper.CreateAzureSdkDirectoryAndImportPublishSettings(); + + WebSpacesFile = Path.Combine(AzurePowerShell.ProfileDirectory, + string.Format("spaces.{0}.json", SubscriptionName)); + + SitesFile = Path.Combine(AzurePowerShell.ProfileDirectory, + string.Format("sites.{0}.json", SubscriptionName)); + + if (File.Exists(WebSpacesFile)) + { + File.Delete(WebSpacesFile); + } + + if (File.Exists(SitesFile)) + { + File.Delete(SitesFile); + } + } + + public void Dispose() + { + CleanupTest(); + } + + public void CleanupTest() + { + if (File.Exists(WebSpacesFile)) + { + File.Delete(WebSpacesFile); + } + + if (File.Exists(SitesFile)) + { + File.Delete(SitesFile); + } + + helper.Dispose(); + } + + [Fact] + public void AddSiteTest() + { + Site site = new Site { Name = "newsite" }; + // Add without any cache from before + Cache.AddSite(SubscriptionName, site); + + Sites getSites = Cache.GetSites(SubscriptionName); + Assert.NotNull(getSites.Find(ws => ws.Name.Equals("newsite"))); + } + + [Fact] + public void RemoveSiteTest() + { + Site site = new Site { Name = "newsite" }; + // Add without any cache from before + Cache.AddSite(SubscriptionName, site); + + Sites getSites = Cache.GetSites(SubscriptionName); + Assert.NotNull(getSites.Find(ws => ws.Name.Equals("newsite"))); + + // Now remove it + Cache.RemoveSite(SubscriptionName, site); + getSites = Cache.GetSites(SubscriptionName); + Assert.Null(getSites.Find(ws => ws.Name.Equals("newsite"))); + } + + [Fact] + public void GetSetSitesTest() + { + Assert.Null(Cache.GetSites(SubscriptionName)); + + Sites sites = new Sites(new List { new Site { Name = "site1" }, new Site { Name = "site2" }}); + Cache.SaveSites(SubscriptionName, sites); + + Sites getSites = Cache.GetSites(SubscriptionName); + Assert.NotNull(getSites.Find(s => s.Name.Equals("site1"))); + Assert.NotNull(getSites.Find(s => s.Name.Equals("site2"))); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/Services/GitTests.cs b/src/ServiceManagement/Services/Commands.Test/Websites/Services/GitTests.cs new file mode 100644 index 000000000000..ae6d2f7ef833 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Websites/Services/GitTests.cs @@ -0,0 +1,39 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Xunit; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services; + +namespace Microsoft.WindowsAzure.Commands.Test.Websites.Services +{ + + public class GitTests + { + [Fact] + public void TestSetGetConfigurationValue() + { + // Set configuration + Git.SetConfigurationValue("azure.test", "value"); + + string value = Git.GetConfigurationValue("azure.test"); + Assert.Equal("value", value); + + // Clear configuration + Git.ClearConfigurationValue("azure.test"); + + value = Git.GetConfigurationValue("azure.test"); + Assert.True(string.IsNullOrEmpty(value)); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/Services/GithubClientTests.cs b/src/ServiceManagement/Services/Commands.Test/Websites/Services/GithubClientTests.cs new file mode 100644 index 000000000000..18a6f42ab2a2 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Websites/Services/GithubClientTests.cs @@ -0,0 +1,284 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Management.Automation.Host; +using Xunit; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.Github; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.Github.Entities; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; + +namespace Microsoft.WindowsAzure.Commands.Test.Websites.Services +{ + + public class GithubClientTests + { + [Fact] + public void TestGetRepositories() + { + // Setup + SimpleGithubManagement channel = new SimpleGithubManagement(); + + channel.GetRepositoriesThunk = ar => new List { new GithubRepository { Name = "userrepo1" } }; + channel.GetOrganizationsThunk = ar => new List { new GithubOrganization { Login = "org1" }, new GithubOrganization { Login = "org2" } }; + channel.GetRepositoriesFromOrgThunk = ar => + { + if (ar.Values["organization"].Equals("org1")) + { + return new List { new GithubRepository { Name = "org1repo1" } }; + } + + if (ar.Values["organization"].Equals("org2")) + { + return new List { new GithubRepository { Name = "org2repo1" } }; + } + + return new List { new GithubRepository { Name = "other" } }; + }; + + + // Test + CmdletAccessor cmdletAccessor = new CmdletAccessor(); + cmdletAccessor.GithubChannel = channel; + + GithubClientAccessor githubClientAccessor = new GithubClientAccessor(cmdletAccessor, null, null); + var repositories = githubClientAccessor.GetRepositoriesAccessor(); + + Assert.Equal(3, repositories.Count); + Assert.NotNull(repositories.FirstOrDefault(r => r.Name.Equals("userrepo1"))); + Assert.NotNull(repositories.FirstOrDefault(r => r.Name.Equals("org1repo1"))); + Assert.NotNull(repositories.FirstOrDefault(r => r.Name.Equals("org2repo1"))); + } + + [Fact] + public void TestCreateOrUpdateHookAlreadyExists() + { + // Setup + SimpleGithubManagement channel = new SimpleGithubManagement(); + + channel.GetRepositoryHooksThunk = ar => new List { new GithubRepositoryHook { Name = "web", Config = new GithubRepositoryHookConfig { Url = "https://$username:password@mynewsite999.scm.azurewebsites.net:443/deploy" } } }; + + Site website = new Site + { + SiteProperties = new SiteProperties + { + Properties = new List + { + new NameValuePair + { + Name = "RepositoryUri", + Value = "https://mynewsite999.scm.azurewebsites.net:443" + }, + new NameValuePair + { + Name = "PublishingUsername", + Value = "$username" + }, + new NameValuePair + { + Name = "PublishingPassword", + Value = "password" + } + } + } + }; + + // Test + CmdletAccessor cmdletAccessor = new CmdletAccessor(); + cmdletAccessor.GithubChannel = channel; + + GithubClientAccessor githubClientAccessor = new GithubClientAccessor(cmdletAccessor, null, null); + + try + { + githubClientAccessor.CreateOrUpdateHookAccessor("owner", "repository", website); + Assert.True(false, "Fail"); + } + catch (Exception e) + { + Assert.Equal("Link already established", e.Message); + } + } + + [Fact] + public void TestCreateOrUpdateHookCreate() + { + // Setup + SimpleGithubManagement channel = new SimpleGithubManagement(); + + GithubRepositoryHook createdHook = null; + bool tested = false; + + channel.GetRepositoryHooksThunk = ar => new List(); + channel.CreateRepositoryHookThunk = ar => + { + createdHook = ar.Values["hook"] as GithubRepositoryHook; + createdHook.Id = "id"; + return createdHook; + }; + + channel.TestRepositoryHookThunk = ar => + { + if (ar.Values["id"].Equals("id")) + { + tested = true; + } + }; + + Site website = new Site + { + SiteProperties = new SiteProperties + { + Properties = new List + { + new NameValuePair + { + Name = "RepositoryUri", + Value = "https://mynewsite999.scm.azurewebsites.net:443" + }, + new NameValuePair + { + Name = "PublishingUsername", + Value = "$username" + }, + new NameValuePair + { + Name = "PublishingPassword", + Value = "password" + } + } + } + }; + + // Test + CmdletAccessor cmdletAccessor = new CmdletAccessor(); + cmdletAccessor.GithubChannel = channel; + + GithubClientAccessor githubClientAccessor = new GithubClientAccessor(cmdletAccessor, null, null); + githubClientAccessor.CreateOrUpdateHookAccessor("owner", "repository", website); + Assert.NotNull(createdHook); + Assert.True(tested); + } + + [Fact] + public void TestCreateOrUpdateHookUpdate() + { + // Setup + SimpleGithubManagement channel = new SimpleGithubManagement(); + + GithubRepositoryHook createdHook = null; + bool tested = false; + + channel.GetRepositoryHooksThunk = ar => new List { new GithubRepositoryHook { Name = "web", Config = new GithubRepositoryHookConfig { Url = "https://$username:password@mynewsite999.scm.azurewebsites.net:443/deploy" } } }; + channel.UpdateRepositoryHookThunk = ar => + { + createdHook = ar.Values["hook"] as GithubRepositoryHook; + createdHook.Id = "id"; + return createdHook; + }; + + channel.TestRepositoryHookThunk = ar => + { + if (ar.Values["id"].Equals("id")) + { + tested = true; + } + }; + + Site website = new Site + { + SiteProperties = new SiteProperties + { + Properties = new List + { + new NameValuePair + { + Name = "RepositoryUri", + Value = "https://mynewsite999.scm.azurewebsites.net:443" + }, + new NameValuePair + { + Name = "PublishingUsername", + Value = "$usernamenew" + }, + new NameValuePair + { + Name = "PublishingPassword", + Value = "password" + } + } + } + }; + + // Test + CmdletAccessor cmdletAccessor = new CmdletAccessor(); + cmdletAccessor.GithubChannel = channel; + + GithubClientAccessor githubClientAccessor = new GithubClientAccessor(cmdletAccessor, null, null); + githubClientAccessor.CreateOrUpdateHookAccessor("owner", "repository", website); + Assert.NotNull(createdHook); + Assert.True(tested); + } + } + + internal class GithubClientAccessor : GithubClient + { + public GithubClientAccessor(IGithubCmdlet pscmdlet, PSCredential githubCredentials, string githubRepository) + : base (pscmdlet, githubCredentials, githubRepository) + { + } + + public IList GetRepositoriesAccessor() + { + return GetRepositories(); + } + + public void CreateOrUpdateHookAccessor(string owner, string repository, Site website) + { + CreateOrUpdateHook(owner, repository, website); + } + } + + internal class CmdletAccessor : IGithubCmdlet + { + public IGithubServiceManagement GithubChannel { get; set; } + + public bool ShareChannel + { + get { throw new NotImplementedException(); } + set { throw new NotImplementedException(); } + } + + public InvocationInfo MyInvocation + { + get { return null; } + } + + public PSHost Host + { + get { throw new NotImplementedException(); } + } + + public Action GetLogger() + { + throw new NotImplementedException(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/SetAzureWebSiteTests.cs b/src/ServiceManagement/Services/Commands.Test/Websites/SetAzureWebSiteTests.cs new file mode 100644 index 000000000000..baab7d646f42 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Websites/SetAzureWebSiteTests.cs @@ -0,0 +1,170 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; +using Microsoft.WindowsAzure.Commands.Websites; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.Websites +{ + + public class SetAzureWebsiteTests : WebsitesTestBase + { + [Fact] + public void SetAzureWebsiteProcess() + { + const string websiteName = "website1"; + const string webspaceName = "webspace"; + const string suffix = "azurewebsites.com"; + + // Setup + Mock clientMock = new Mock(); + clientMock.Setup(f => f.GetWebsiteDnsSuffix()).Returns(suffix); + + bool updatedSite = false; + bool updatedSiteConfig = false; + + clientMock.Setup(c => c.GetWebsite(websiteName, null)) + .Returns(new Site {Name = websiteName, WebSpace = webspaceName}); + clientMock.Setup(c => c.GetWebsiteConfiguration(websiteName, null)) + .Returns(new SiteConfig {NumberOfWorkers = 1}); + clientMock.Setup(c => c.UpdateWebsiteConfiguration(websiteName, It.IsAny(), null)) + .Callback((string name, SiteConfig config, string slot) => + { + Assert.NotNull(config); + Assert.Equal(config.NumberOfWorkers, 3); + updatedSiteConfig = true; + }).Verifiable(); + + clientMock.Setup(c => c.UpdateWebsiteHostNames(It.IsAny(), It.IsAny>(), null)) + .Callback((Site site, IEnumerable names, string slot) => + { + Assert.Equal(websiteName, site.Name); + Assert.True(names.Any(hostname => hostname.Equals(string.Format("{0}.{1}", websiteName, suffix)))); + Assert.True(names.Any(hostname => hostname.Equals("stuff.com"))); + updatedSite = true; + }); + clientMock.Setup(f => f.GetHostName(websiteName, null)).Returns(string.Format("{0}.{1}", websiteName, suffix)); + + // Test + SetAzureWebsiteCommand setAzureWebsiteCommand = new SetAzureWebsiteCommand + { + CommandRuntime = new MockCommandRuntime(), + Name = websiteName, + NumberOfWorkers = 3, + WebsitesClient = clientMock.Object + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(base.subscriptionId) }, null, null); + + setAzureWebsiteCommand.ExecuteCmdlet(); + Assert.True(updatedSiteConfig); + Assert.False(updatedSite); + + // Test updating site only and not configurations + updatedSite = false; + updatedSiteConfig = false; + setAzureWebsiteCommand = new SetAzureWebsiteCommand + { + CommandRuntime = new MockCommandRuntime(), + Name = websiteName, + HostNames = new [] { "stuff.com" }, + WebsitesClient = clientMock.Object + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(base.subscriptionId) }, null, null); + + setAzureWebsiteCommand.ExecuteCmdlet(); + Assert.False(updatedSiteConfig); + Assert.True(updatedSite); + } + + [Fact] + public void SetsWebsiteSlot() + { + const string websiteName = "website1"; + const string webspaceName = "webspace"; + const string suffix = "azurewebsites.com"; + const string slot = "staging"; + + // Setup + Mock clientMock = new Mock(); + clientMock.Setup(f => f.GetWebsiteDnsSuffix()).Returns(suffix); + + bool updatedSite = false; + bool updatedSiteConfig = false; + + clientMock.Setup(c => c.GetWebsite(websiteName, slot)) + .Returns(new Site { Name = websiteName, WebSpace = webspaceName }); + clientMock.Setup(c => c.GetWebsiteConfiguration(websiteName, slot)) + .Returns(new SiteConfig { NumberOfWorkers = 1 }); + clientMock.Setup(c => c.UpdateWebsiteConfiguration(websiteName, It.IsAny(), slot)) + .Callback((string name, SiteConfig config, string slotName) => + { + Assert.NotNull(config); + Assert.Equal(config.NumberOfWorkers, 3); + updatedSiteConfig = true; + }).Verifiable(); + + clientMock.Setup(c => c.UpdateWebsiteHostNames(It.IsAny(), It.IsAny>(), slot)) + .Callback((Site site, IEnumerable names, string slotName) => + { + Assert.Equal(websiteName, site.Name); + Assert.True(names.Any(hostname => hostname.Equals(string.Format("{0}.{1}", websiteName, suffix)))); + Assert.True(names.Any(hostname => hostname.Equals("stuff.com"))); + updatedSite = true; + }); + clientMock.Setup(f => f.GetHostName(websiteName, slot)).Returns(string.Format("{0}.{1}", websiteName, suffix)); + + // Test + SetAzureWebsiteCommand setAzureWebsiteCommand = new SetAzureWebsiteCommand + { + CommandRuntime = new MockCommandRuntime(), + Name = websiteName, + NumberOfWorkers = 3, + WebsitesClient = clientMock.Object, + Slot = slot + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(base.subscriptionId) }, null, null); + + setAzureWebsiteCommand.ExecuteCmdlet(); + Assert.True(updatedSiteConfig); + Assert.False(updatedSite); + + // Test updating site only and not configurations + updatedSite = false; + updatedSiteConfig = false; + setAzureWebsiteCommand = new SetAzureWebsiteCommand + { + CommandRuntime = new MockCommandRuntime(), + Name = websiteName, + HostNames = new[] { "stuff.com" }, + WebsitesClient = clientMock.Object, + Slot = slot + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(base.subscriptionId) }, null, null); + + setAzureWebsiteCommand.ExecuteCmdlet(); + Assert.False(updatedSiteConfig); + Assert.True(updatedSite); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/ShowAzurePortalTests.cs b/src/ServiceManagement/Services/Commands.Test/Websites/ShowAzurePortalTests.cs new file mode 100644 index 000000000000..37c350772665 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Websites/ShowAzurePortalTests.cs @@ -0,0 +1,40 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Xunit; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Websites; + +namespace Microsoft.WindowsAzure.Commands.Test.Websites +{ + + public class ShowAzurePortalTests : WebsitesTestBase + { + [Fact(Skip = "Consider removing these.")] + public void ProcessGetAzurePublishSettingsTest() + { + ShowAzurePortalCommand showAzurePortalCommand = new ShowAzurePortalCommand + { + Name = null, + Environment = EnvironmentName.AzureCloud, + Realm = "microsoft.com" + }; + + showAzurePortalCommand.ExecuteCmdlet(); + + //If test reaches here then it passed. + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/ShowAzureWebsiteTests.cs b/src/ServiceManagement/Services/Commands.Test/Websites/ShowAzureWebsiteTests.cs new file mode 100644 index 000000000000..4a569bc82829 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Websites/ShowAzureWebsiteTests.cs @@ -0,0 +1,57 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Xunit; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; +using Microsoft.WindowsAzure.Commands.Websites; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.Websites +{ + + public class ShowAzureWebsiteTests : WebsitesTestBase + { + [Fact(Skip = "Consider removing these.")] + public void ProcessShowWebsiteTest() + { + // Setup + var mockClient = new Mock(); + mockClient.Setup(c => c.GetWebsite("website1", null)) + .Returns(new Site + { + Name = "website1", + WebSpace = "webspace1", + HostNames = new[] {"website1.cloudapp.com"} + }); + + // Test + ShowAzureWebsiteCommand showAzureWebsiteCommand = new ShowAzureWebsiteCommand + { + CommandRuntime = new MockCommandRuntime(), + Name = "website1", + WebsitesClient = mockClient.Object + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(base.subscriptionId) }, null, null); + + // Show existing website + showAzureWebsiteCommand.ExecuteCmdlet(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/StartAzureWebSiteTests.cs b/src/ServiceManagement/Services/Commands.Test/Websites/StartAzureWebSiteTests.cs new file mode 100644 index 000000000000..79d60d38c04c --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Websites/StartAzureWebSiteTests.cs @@ -0,0 +1,78 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Xunit; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Websites; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.Websites +{ + + public class StartAzureWebsiteTests : WebsitesTestBase + { + [Fact] + public void ProcessStartWebsiteTest() + { + const string websiteName = "website1"; + + // Setup + Mock websitesClientMock = new Mock(); + websitesClientMock.Setup(f => f.StartWebsite(websiteName, null)); + + // Test + StartAzureWebsiteCommand startAzureWebsiteCommand = new StartAzureWebsiteCommand() + { + CommandRuntime = new MockCommandRuntime(), + Name = websiteName, + WebsitesClient = websitesClientMock.Object + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(base.subscriptionId) }, null, null); + + startAzureWebsiteCommand.ExecuteCmdlet(); + + websitesClientMock.Verify(f => f.StartWebsite(websiteName, null), Times.Once()); + } + + [Fact] + public void StartsWebsiteSlot() + { + const string slot = "staging"; + const string websiteName = "website1"; + + // Setup + Mock websitesClientMock = new Mock(); + websitesClientMock.Setup(f => f.StartWebsite(websiteName, slot)); + + // Test + StartAzureWebsiteCommand startAzureWebsiteCommand = new StartAzureWebsiteCommand() + { + CommandRuntime = new MockCommandRuntime(), + Name = websiteName, + WebsitesClient = websitesClientMock.Object, + Slot = slot + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(base.subscriptionId) }, null, null); + + startAzureWebsiteCommand.ExecuteCmdlet(); + + websitesClientMock.Verify(f => f.StartWebsite(websiteName, slot), Times.Once()); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/StopAzureWebSiteTests.cs b/src/ServiceManagement/Services/Commands.Test/Websites/StopAzureWebSiteTests.cs new file mode 100644 index 000000000000..7a2f97ebbc06 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Websites/StopAzureWebSiteTests.cs @@ -0,0 +1,78 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Xunit; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Websites; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.Websites +{ + + public class StopAzureWebsiteTests : WebsitesTestBase + { + [Fact] + public void ProcessStopWebsiteTest() + { + const string websiteName = "website1"; + + // Setup + Mock websitesClientMock = new Mock(); + websitesClientMock.Setup(f => f.StopWebsite(websiteName, null)); + + // Test + StopAzureWebsiteCommand stopAzureWebsiteCommand = new StopAzureWebsiteCommand() + { + CommandRuntime = new MockCommandRuntime(), + Name = websiteName, + WebsitesClient = websitesClientMock.Object + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(base.subscriptionId) }, null, null); + + stopAzureWebsiteCommand.ExecuteCmdlet(); + + websitesClientMock.Verify(f => f.StopWebsite(websiteName, null), Times.Once()); + } + + [Fact] + public void StopsWebsiteSlot() + { + const string slot = "staging"; + const string websiteName = "website1"; + + // Setup + Mock websitesClientMock = new Mock(); + websitesClientMock.Setup(f => f.StopWebsite(websiteName, slot)); + + // Test + StopAzureWebsiteCommand stopAzureWebsiteCommand = new StopAzureWebsiteCommand() + { + CommandRuntime = new MockCommandRuntime(), + Name = websiteName, + WebsitesClient = websitesClientMock.Object, + Slot = slot + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(base.subscriptionId) }, null, null); + + stopAzureWebsiteCommand.ExecuteCmdlet(); + + websitesClientMock.Verify(f => f.StopWebsite(websiteName, slot), Times.Once()); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/SwitchAzureWebSiteSlotTests.cs b/src/ServiceManagement/Services/Commands.Test/Websites/SwitchAzureWebSiteSlotTests.cs new file mode 100644 index 000000000000..badb4ec73a60 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Websites/SwitchAzureWebSiteSlotTests.cs @@ -0,0 +1,65 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Xunit; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; +using Microsoft.WindowsAzure.Commands.Websites; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.Websites +{ + + public class SwitchAzureWebsiteSlotTests : WebsitesTestBase + { + [Fact] + public void SwitchesSlots() + { + // Setup + var mockClient = new Mock(); + string slot1 = WebsiteSlotName.Production.ToString(); + string slot2 = "staging"; + + mockClient.Setup(c => c.GetWebsiteSlots("website1")) + .Returns(new List { + new Site { Name = "website1", WebSpace = "webspace1" }, + new Site { Name = "website1(staging)", WebSpace = "webspace1" } + }); + mockClient.Setup(f => f.GetSlotName("website1")).Returns(slot1); + mockClient.Setup(f => f.GetSlotName("website1(staging)")).Returns(slot2); + mockClient.Setup(f => f.SwitchSlots("webspace1", "website1(staging)", slot1, slot2)).Verifiable(); + mockClient.Setup(f => f.GetWebsiteNameFromFullName("website1")).Returns("website1"); + + // Test + SwitchAzureWebsiteSlotCommand switchAzureWebsiteCommand = new SwitchAzureWebsiteSlotCommand + { + CommandRuntime = new MockCommandRuntime(), + WebsitesClient = mockClient.Object, + Name = "website1", + Force = true + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(base.subscriptionId) }, null, null); + + // Switch existing website + switchAzureWebsiteCommand.ExecuteCmdlet(); + mockClient.Verify(c => c.SwitchSlots("webspace1", "website1", slot1, slot2), Times.Once()); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/UpdateAzureWebsiteRepositoryTests.cs b/src/ServiceManagement/Services/Commands.Test/Websites/UpdateAzureWebsiteRepositoryTests.cs new file mode 100644 index 000000000000..bb2a8517f450 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Websites/UpdateAzureWebsiteRepositoryTests.cs @@ -0,0 +1,75 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Xunit; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; +using Microsoft.WindowsAzure.Commands.Websites; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.Websites +{ + + public class UpdateAzureWebsiteRepositoryTests : WebsitesTestBase + { + [Fact] + public void UpdatesRemote() + { + // Setup + var mockClient = new Mock(); + string slot = WebsiteSlotName.Staging.ToString(); + SiteProperties props = new SiteProperties() + { + Properties = new List() + { + new NameValuePair() { Name = "RepositoryUri", Value = "https://test@website.scm.azurewebsites.net:443/website.git" }, + new NameValuePair() { Name = "PublishingUsername", Value = "test" } + } + }; + + mockClient.Setup(c => c.GetWebsiteSlots("website1")) + .Returns( + new List { + new Site { Name = "website1", WebSpace = "webspace1", SiteProperties = props }, + new Site { Name = "website1(staging)", WebSpace = "webspace1", SiteProperties = props } + }); + mockClient.Setup(c => c.GetSlotName("website1")) + .Returns(WebsiteSlotName.Production.ToString()) + .Verifiable(); + mockClient.Setup(c => c.GetSlotName("website1(staging)")) + .Returns(WebsiteSlotName.Staging.ToString()) + .Verifiable(); + + // Test + UpdateAzureWebsiteRepositoryCommand cmdlet = new UpdateAzureWebsiteRepositoryCommand + { + CommandRuntime = new MockCommandRuntime(), + WebsitesClient = mockClient.Object, + Name = "website1", + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(base.subscriptionId) }, null, null); + + // Switch existing website + cmdlet.ExecuteCmdlet(); + mockClient.Verify(c => c.GetSlotName("website1(staging)"), Times.Once()); + mockClient.Verify(c => c.GetSlotName("website1"), Times.Once()); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/WebHostingPlans/GetAzureWebHostingPlanTests.cs b/src/ServiceManagement/Services/Commands.Test/Websites/WebHostingPlans/GetAzureWebHostingPlanTests.cs new file mode 100644 index 000000000000..df0b53b9e1a4 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Websites/WebHostingPlans/GetAzureWebHostingPlanTests.cs @@ -0,0 +1,92 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; +using Microsoft.WindowsAzure.Commands.Websites.WebHostingPlan; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.Websites.WebHostingPlans +{ + + public class GetAzureWebHostingPlanTests : WebsitesTestBase + { + [Fact] + public void ListWebHostingPlansTest() + { + // Setup + var clientMock = new Mock(); + clientMock.Setup(c => c.ListWebSpaces()) + .Returns(new[] {new WebSpace {Name = "webspace1"}, new WebSpace {Name = "webspace2"}}); + + clientMock.Setup(c => c.ListWebHostingPlans()) + .Returns(new List + { + new WebHostingPlan {Name = "Plan1", WebSpace = "webspace1"}, + new WebHostingPlan { Name = "Plan2", WebSpace = "webspace2" } + }); + + // Test + var command = new GetAzureWebHostingPlanCommand + { + CommandRuntime = new MockCommandRuntime(), + WebsitesClient = clientMock.Object + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(subscriptionId) }, null, null); + + command.ExecuteCmdlet(); + Assert.Equal(1, ((MockCommandRuntime)command.CommandRuntime).OutputPipeline.Count); + var plans = (IEnumerable)((MockCommandRuntime)command.CommandRuntime).OutputPipeline.FirstOrDefault(); + Assert.NotNull(plans); + Assert.True(plans.Any(p => (p).Name.Equals("Plan1") && (p).WebSpace.Equals("webspace1"))); + Assert.True(plans.Any(p => (p).Name.Equals("Plan2") && (p).WebSpace.Equals("webspace2"))); + } + + [Fact] + public void GetAzureWebHostingPlanBasicTest() + { + // Setup + var clientMock = new Mock(); + clientMock.Setup(c => c.ListWebSpaces()) + .Returns(new[] { new WebSpace { Name = "webspace1" }, new WebSpace { Name = "webspace2" } }); + + clientMock.Setup(c => c.ListWebHostingPlans("webspace1")) + .Returns(new List { new WebHostingPlan { Name = "Plan1", WebSpace = "webspace1" } }); + + // Test + var command = new GetAzureWebHostingPlanCommand + { + WebSpaceName = "webspace1", + CommandRuntime = new MockCommandRuntime(), + WebsitesClient = clientMock.Object + }; + AzureSession.SetCurrentContext(new AzureSubscription { Id = new Guid(subscriptionId) }, null, null); + + command.ExecuteCmdlet(); + Assert.Equal(1, ((MockCommandRuntime)command.CommandRuntime).OutputPipeline.Count); + var plans = (IEnumerable)((MockCommandRuntime)command.CommandRuntime).OutputPipeline.FirstOrDefault(); + Assert.NotNull(plans); + Assert.True(plans.Any(p => (p).Name.Equals("Plan1") && (p).WebSpace.Equals("webspace1"))); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/WebJobs/GetAzureWebsiteJobHistoryTests.cs b/src/ServiceManagement/Services/Commands.Test/Websites/WebJobs/GetAzureWebsiteJobHistoryTests.cs new file mode 100644 index 000000000000..1ed2cde9c717 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Websites/WebJobs/GetAzureWebsiteJobHistoryTests.cs @@ -0,0 +1,132 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Xunit; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebJobs; +using Microsoft.WindowsAzure.Commands.Websites.WebJobs; +using Microsoft.WindowsAzure.WebSitesExtensions.Models; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.Websites +{ + + public class GetAzureWebsiteJobHistoryTests : WebsitesTestBase + { + private const string websiteName = "website1"; + + private const string slot = "staging"; + + private const string jobName = "webJobName"; + + private Mock websitesClientMock; + + private GetAzureWebsiteJobHistoryCommand cmdlet; + + private Mock commandRuntimeMock; + + public GetAzureWebsiteJobHistoryTests() + { + websitesClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new GetAzureWebsiteJobHistoryCommand() + { + CommandRuntime = commandRuntimeMock.Object, + WebsitesClient = websitesClientMock.Object, + Name = websiteName, + Slot = slot, + JobName = jobName + }; + } + + [Fact] + public void GetCompleteWebJobHistory() + { + // Setup + List output = new List() + { + new TriggeredWebJobRun() { Id = "id1", Status = "succeed"}, + new TriggeredWebJobRun() { Id = "id2", Status = "fail"}, + new TriggeredWebJobRun() { Id = "id3", Status = "succeed"} + }; + WebJobHistoryFilterOptions options = null; + websitesClientMock.Setup(f => f.FilterWebJobHistory(It.IsAny())) + .Returns(output) + .Callback((WebJobHistoryFilterOptions actual) => options = actual) + .Verifiable(); + + // Test + cmdlet.ExecuteCmdlet(); + + // Assert + Assert.Equal(options.Name, websiteName); + Assert.Equal(options.Slot, slot); + Assert.Equal(options.JobName, jobName); + websitesClientMock.Verify(f => f.FilterWebJobHistory(options), Times.Once()); + commandRuntimeMock.Verify(f => f.WriteObject(output, true), Times.Once()); + } + + [Fact] + public void GetSpecificWebJobRun() + { + // Setup + string runId = "id1"; + List output = new List() { new TriggeredWebJobRun() { Id = runId, Status = "succeed" } }; + WebJobHistoryFilterOptions options = null; + websitesClientMock.Setup(f => f.FilterWebJobHistory(It.IsAny())) + .Returns(output) + .Callback((WebJobHistoryFilterOptions actual) => options = actual) + .Verifiable(); + cmdlet.RunId = runId; + + // Test + cmdlet.ExecuteCmdlet(); + + // Assert + Assert.Equal(options.Name, websiteName); + Assert.Equal(options.Slot, slot); + Assert.Equal(options.JobName, jobName); + Assert.Equal(options.RunId, runId); + websitesClientMock.Verify(f => f.FilterWebJobHistory(options), Times.Once()); + commandRuntimeMock.Verify(f => f.WriteObject(output, true), Times.Once()); + } + + [Fact] + public void GetLatestWebJobRun() + { + // Setup + List output = new List() { new TriggeredWebJobRun() { Id = "id1", Status = "succeed" } }; + WebJobHistoryFilterOptions options = null; + websitesClientMock.Setup(f => f.FilterWebJobHistory(It.IsAny())) + .Returns(output) + .Callback((WebJobHistoryFilterOptions actual) => options = actual) + .Verifiable(); + cmdlet.Latest = true; + + // Test + cmdlet.ExecuteCmdlet(); + + // Assert + Assert.Equal(options.Name, websiteName); + Assert.Equal(options.Slot, slot); + Assert.Equal(options.JobName, jobName); + Assert.True(options.Latest); + websitesClientMock.Verify(f => f.FilterWebJobHistory(options), Times.Once()); + commandRuntimeMock.Verify(f => f.WriteObject(output, true), Times.Once()); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/WebJobs/GetAzureWebsiteJobTests.cs b/src/ServiceManagement/Services/Commands.Test/Websites/WebJobs/GetAzureWebsiteJobTests.cs new file mode 100644 index 000000000000..dd914d2a9de9 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Websites/WebJobs/GetAzureWebsiteJobTests.cs @@ -0,0 +1,124 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Xunit; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebJobs; +using Microsoft.WindowsAzure.Commands.Websites.WebJobs; +using Microsoft.WindowsAzure.WebSitesExtensions.Models; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.Websites +{ + + public class GetAzureWebsiteJobTests : WebsitesTestBase + { + private const string websiteName = "website1"; + + private const string slot = "staging"; + + private Mock websitesClientMock; + + private GetAzureWebsiteJobCommand cmdlet; + + private Mock commandRuntimeMock; + + public GetAzureWebsiteJobTests() + { + websitesClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new GetAzureWebsiteJobCommand() + { + CommandRuntime = commandRuntimeMock.Object, + WebsitesClient = websitesClientMock.Object, + Name = websiteName, + Slot = slot + }; + } + + [Fact] + public void GetEmptyWebJobList() + { + // Setup + var output = new List(); + WebJobFilterOptions options = null; + websitesClientMock.Setup(f => f.FilterWebJobs(It.IsAny())) + .Returns(output) + .Callback((WebJobFilterOptions actual) => options = actual) + .Verifiable(); + + // Test + cmdlet.ExecuteCmdlet(); + + // Assert + websitesClientMock.Verify(f => f.FilterWebJobs(options), Times.Once()); + commandRuntimeMock.Verify(f => f.WriteObject(output, true), Times.Once()); + } + + [Fact] + public void GetOneWebJob() + { + // Setup + string jobName = "webJobName"; + var type = WebJobType.Continuous; + var output = new List() { new PSContinuousWebJob() { JobName = jobName, JobType = type } }; + WebJobFilterOptions options = null; + websitesClientMock.Setup(f => f.FilterWebJobs(It.IsAny())) + .Returns(output) + .Callback((WebJobFilterOptions actual) => options = actual) + .Verifiable(); + cmdlet.JobName = jobName; + cmdlet.JobType = type.ToString(); + + // Test + cmdlet.ExecuteCmdlet(); + + // Assert + websitesClientMock.Verify(f => f.FilterWebJobs(options), Times.Once()); + commandRuntimeMock.Verify(f => f.WriteObject(output, true), Times.Once()); + } + + [Fact] + public void GetsMultipleWebJobs() + { + // Setup + string jobName1 = "webJobName1"; + string jobName2 = "webJobName2"; + string jobName3 = "webJobName3"; + WebJobType type1 = WebJobType.Continuous; + WebJobType type2 = WebJobType.Continuous; + WebJobType type3 = WebJobType.Triggered; + WebJobFilterOptions options = null; + var output = new List() { + new PSContinuousWebJob() { JobName = jobName1, JobType = type1 }, + new PSContinuousWebJob() { JobName = jobName2, JobType = type2 }, + new PSTriggeredWebJob() { JobName = jobName3, JobType = type3 } + }; + websitesClientMock.Setup(f => f.FilterWebJobs(It.IsAny())) + .Returns(output) + .Callback((WebJobFilterOptions actual) => options = actual) + .Verifiable(); + + // Test + cmdlet.ExecuteCmdlet(); + + // Assert + websitesClientMock.Verify(f => f.FilterWebJobs(options), Times.Once()); + commandRuntimeMock.Verify(f => f.WriteObject(output, true), Times.Once()); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/WebJobs/NewAzureWebsiteJobTests.cs b/src/ServiceManagement/Services/Commands.Test/Websites/WebJobs/NewAzureWebsiteJobTests.cs new file mode 100644 index 000000000000..10df32b30b25 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Websites/WebJobs/NewAzureWebsiteJobTests.cs @@ -0,0 +1,72 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Xunit; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Websites.WebJobs; +using Microsoft.WindowsAzure.WebSitesExtensions.Models; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.Websites +{ + + public class NewAzureWebsiteJobTests : WebsitesTestBase + { + private const string websiteName = "website1"; + + private const string slot = "staging"; + + private Mock websitesClientMock; + + private NewAzureWebsiteJobCommand cmdlet; + + private Mock commandRuntimeMock; + + public NewAzureWebsiteJobTests() + { + websitesClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new NewAzureWebsiteJobCommand() + { + CommandRuntime = commandRuntimeMock.Object, + WebsitesClient = websitesClientMock.Object, + Name = websiteName, + Slot = slot + }; + } + + [Fact] + public void CreatesTriggeredWebJob() + { + // Setup + string jobName = "myWebJob"; + string jobFile = "job.bat"; + WebJobType jobType = WebJobType.Triggered; + PSTriggeredWebJob output = new PSTriggeredWebJob() { JobName = jobName, JobType = jobType }; + websitesClientMock.Setup(f => f.CreateWebJob(websiteName, slot, jobName, jobType, jobFile)).Returns(output); + cmdlet.JobName = jobName; + cmdlet.JobType = jobType; + cmdlet.JobFile = jobFile; + + // Test + cmdlet.ExecuteCmdlet(); + + // Assert + websitesClientMock.Verify(f => f.CreateWebJob(websiteName, slot, jobName, jobType, jobFile), Times.Once()); + commandRuntimeMock.Verify(f => f.WriteObject(output), Times.Once()); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/WebJobs/RemoveAzureWebsiteJobTests.cs b/src/ServiceManagement/Services/Commands.Test/Websites/WebJobs/RemoveAzureWebsiteJobTests.cs new file mode 100644 index 000000000000..eea3298ceaac --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Websites/WebJobs/RemoveAzureWebsiteJobTests.cs @@ -0,0 +1,90 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Xunit; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Websites.WebJobs; +using Microsoft.WindowsAzure.WebSitesExtensions.Models; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.Websites +{ + + public class RemoveAzureWebsiteJobTests : WebsitesTestBase + { + private const string websiteName = "website1"; + + private const string slot = "staging"; + + private Mock websitesClientMock; + + private RemoveAzureWebsiteJobCommand cmdlet; + + private Mock commandRuntimeMock; + + public RemoveAzureWebsiteJobTests() + { + websitesClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new RemoveAzureWebsiteJobCommand() + { + CommandRuntime = commandRuntimeMock.Object, + WebsitesClient = websitesClientMock.Object, + Name = websiteName, + Slot = slot, + Force = true + }; + } + + [Fact] + public void DeletesTriggeredWebJob() + { + // Setup + string jobName = "myWebJob"; + WebJobType jobType = WebJobType.Triggered; + websitesClientMock.Setup(f => f.DeleteWebJob(websiteName, slot, jobName, jobType)).Verifiable(); + cmdlet.JobName = jobName; + cmdlet.JobType = jobType; + commandRuntimeMock.Setup(f => f.ShouldProcess(It.IsAny(), It.IsAny())).Returns(true); + + // Test + cmdlet.ExecuteCmdlet(); + + // Assert + websitesClientMock.Verify(f => f.DeleteWebJob(websiteName, slot, jobName, jobType), Times.Once()); + commandRuntimeMock.Verify(f => f.WriteObject(true), Times.Once()); + } + + [Fact] + public void DeletesContinuousWebJob() + { + // Setup + string jobName = "myWebJob"; + WebJobType jobType = WebJobType.Continuous; + websitesClientMock.Setup(f => f.DeleteWebJob(websiteName, slot, jobName, jobType)).Verifiable(); + cmdlet.JobName = jobName; + cmdlet.JobType = jobType; + commandRuntimeMock.Setup(f => f.ShouldProcess(It.IsAny(), It.IsAny())).Returns(true); + + // Test + cmdlet.ExecuteCmdlet(); + + // Assert + websitesClientMock.Verify(f => f.DeleteWebJob(websiteName, slot, jobName, jobType), Times.Once()); + commandRuntimeMock.Verify(f => f.WriteObject(true), Times.Once()); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/WebJobs/SaveAzureWebsiteJobLogTests.cs b/src/ServiceManagement/Services/Commands.Test/Websites/WebJobs/SaveAzureWebsiteJobLogTests.cs new file mode 100644 index 000000000000..a5d2a81ccc61 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Websites/WebJobs/SaveAzureWebsiteJobLogTests.cs @@ -0,0 +1,93 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Xunit; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Websites.WebJobs; +using Microsoft.WindowsAzure.WebSitesExtensions.Models; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.Websites +{ + + public class SaveAzureWebsiteJobLogTests : WebsitesTestBase + { + private const string websiteName = "website1"; + + private const string slot = "staging"; + + private Mock websitesClientMock; + + private SaveAzureWebsiteJobLogCommand cmdlet; + + private Mock commandRuntimeMock; + + public SaveAzureWebsiteJobLogTests() + { + websitesClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new SaveAzureWebsiteJobLogCommand() + { + CommandRuntime = commandRuntimeMock.Object, + WebsitesClient = websitesClientMock.Object, + Name = websiteName, + Slot = slot, + PassThru = true + }; + } + + [Fact] + public void SavesWebJobLog() + { + // Setup + string jobName = "myWebJob"; + WebJobType jobType = WebJobType.Continuous; + websitesClientMock.Setup(f => f.SaveWebJobLog(websiteName, slot, jobName, jobType, null, null)).Verifiable(); + cmdlet.JobName = jobName; + cmdlet.JobType = jobType; + + // Test + cmdlet.ExecuteCmdlet(); + + // Assert + websitesClientMock.Verify(f => f.SaveWebJobLog(websiteName, slot, jobName, jobType, null, null), Times.Once()); + commandRuntimeMock.Verify(f => f.WriteObject(true), Times.Once()); + } + + [Fact] + public void SavesTriggeredWebJobLog() + { + // Setup + string jobName = "myWebJob"; + string output = ".\\myFile.zip"; + string runId = "runId1"; + WebJobType jobType = WebJobType.Triggered; + websitesClientMock.Setup(f => f.SaveWebJobLog(websiteName, slot, jobName, jobType, output, runId)).Verifiable(); + cmdlet.JobName = jobName; + cmdlet.JobType = jobType; + cmdlet.Output = output; + cmdlet.RunId = runId; + cmdlet.PassThru = false; + + // Test + cmdlet.ExecuteCmdlet(); + + // Assert + websitesClientMock.Verify(f => f.SaveWebJobLog(websiteName, slot, jobName, jobType, output, runId), Times.Once()); + commandRuntimeMock.Verify(f => f.WriteObject(It.IsAny()), Times.Never()); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/WebJobs/StartAzureWebsiteJobTests.cs b/src/ServiceManagement/Services/Commands.Test/Websites/WebJobs/StartAzureWebsiteJobTests.cs new file mode 100644 index 000000000000..e1741b6d843a --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Websites/WebJobs/StartAzureWebsiteJobTests.cs @@ -0,0 +1,70 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Xunit; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Websites.WebJobs; +using Microsoft.WindowsAzure.WebSitesExtensions.Models; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.Websites +{ + + public class StartAzureWebsiteJobTests : WebsitesTestBase + { + private const string websiteName = "website1"; + + private const string slot = "staging"; + + private Mock websitesClientMock; + + private StartAzureWebsiteJobCommand cmdlet; + + private Mock commandRuntimeMock; + + public StartAzureWebsiteJobTests() + { + websitesClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new StartAzureWebsiteJobCommand() + { + CommandRuntime = commandRuntimeMock.Object, + WebsitesClient = websitesClientMock.Object, + Name = websiteName, + Slot = slot, + PassThru = true + }; + } + + [Fact] + public void StartsTriggeredWebJob() + { + // Setup + string jobName = "myWebJob"; + WebJobType jobType = WebJobType.Triggered; + websitesClientMock.Setup(f => f.StartWebJob(websiteName, slot, jobName, jobType)).Verifiable(); + cmdlet.JobName = jobName; + cmdlet.JobType = jobType; + + // Test + cmdlet.ExecuteCmdlet(); + + // Assert + websitesClientMock.Verify(f => f.StartWebJob(websiteName, slot, jobName, jobType), Times.Once()); + commandRuntimeMock.Verify(f => f.WriteObject(true), Times.Once()); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/WebJobs/StopAzureWebsiteJobTests.cs b/src/ServiceManagement/Services/Commands.Test/Websites/WebJobs/StopAzureWebsiteJobTests.cs new file mode 100644 index 000000000000..c623271dab97 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Websites/WebJobs/StopAzureWebsiteJobTests.cs @@ -0,0 +1,69 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Xunit; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Websites.WebJobs; +using Microsoft.WindowsAzure.WebSitesExtensions.Models; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.Websites +{ + + public class StopAzureWebsiteJobTests : WebsitesTestBase + { + private const string websiteName = "website1"; + + private const string slot = "staging"; + + private Mock websitesClientMock; + + private StopAzureWebsiteJobCommand cmdlet; + + private Mock commandRuntimeMock; + + public StopAzureWebsiteJobTests() + { + websitesClientMock = new Mock(); + commandRuntimeMock = new Mock(); + cmdlet = new StopAzureWebsiteJobCommand() + { + CommandRuntime = commandRuntimeMock.Object, + WebsitesClient = websitesClientMock.Object, + Name = websiteName, + Slot = slot, + PassThru = true + }; + } + + [Fact] + public void StopsTriggeredWebJob() + { + // Setup + string jobName = "myWebJob"; + WebJobType jobType = WebJobType.Continuous; + websitesClientMock.Setup(f => f.StopWebJob(websiteName, slot, jobName, jobType)).Verifiable(); + cmdlet.JobName = jobName; + + // Test + cmdlet.ExecuteCmdlet(); + + // Assert + websitesClientMock.Verify(f => f.StopWebJob(websiteName, slot, jobName, jobType), Times.Once()); + commandRuntimeMock.Verify(f => f.WriteObject(true), Times.Once()); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/Websites/WebJobs/WebJobWrapperTest.cs b/src/ServiceManagement/Services/Commands.Test/Websites/WebJobs/WebJobWrapperTest.cs new file mode 100644 index 000000000000..51a59125928e --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/Websites/WebJobs/WebJobWrapperTest.cs @@ -0,0 +1,121 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.ComponentModel; +using Microsoft.WindowsAzure.Commands.Websites.WebJobs; +using Microsoft.WindowsAzure.WebSitesExtensions.Models; +using Xunit; + +namespace Microsoft.WindowsAzure.Commands.Test.Websites +{ + public class WebJobWrapperTest + { + [Fact] + public void ReadProperties_ValuesAreSameWiththeInternalWebJobInstance() + { + //Set up + TriggeredWebJobRun jobRun = new TriggeredWebJobRun(); + TriggeredWebJob webJob = new TriggeredWebJob() + { + ExtraInfoUrl = "an extra info url", + HistoryUrl = "a history url", + LatestRun = jobRun, + Name = "my web job name", + Type = WebJobType.Triggered, + RunCommand = "my run command", + Url = new System.Uri("http://myWebJobUrl") + }; + + // Test + PSTriggeredWebJob wrapper = new PSTriggeredWebJob(webJob); + + // Assert + Assert.Equal(webJob.ExtraInfoUrl, wrapper.ExtraInfoUrl); + Assert.Equal(webJob.HistoryUrl, wrapper.HistoryUrl); + Assert.Equal(new PSTriggeredWebJobRun(webJob.LatestRun).ToString(), wrapper.LatestRun.ToString()); + Assert.Equal(webJob.Name, wrapper.JobName); + Assert.Equal(webJob.RunCommand, wrapper.RunCommand); + Assert.Equal(webJob.Type, wrapper.JobType); + Assert.Equal(webJob.Url, wrapper.Url); + } + + [Fact] + public void WriteProperties_InternalWebJobInstanceIsUpdated() + { + //Set up + TriggeredWebJobRun jobRun = new TriggeredWebJobRun(); + TriggeredWebJob webJob = new TriggeredWebJob() + { + Type = WebJobType.Triggered, + }; + + string jobName = "My Job Name"; + WebJobType jobType = WebJobType.Triggered; + string extraInfoUrl = "an extra info url"; + string historyUrl = "a history url"; + TriggeredWebJobRun latestRun = new TriggeredWebJobRun(); + string runCommand = "my run command"; + Uri url = new System.Uri("http://myWebJobUrl"); + + // Test + PSTriggeredWebJob wrapper = new PSTriggeredWebJob(webJob); + wrapper.JobType = jobType; + wrapper.JobName = jobName; + wrapper.ExtraInfoUrl = extraInfoUrl; + wrapper.HistoryUrl = historyUrl; + wrapper.LatestRun = latestRun; + wrapper.RunCommand = runCommand; + wrapper.Url = url; + + // Assert + Assert.Equal(jobName, wrapper.JobName); + Assert.Equal(jobType, wrapper.JobType); + Assert.Equal(extraInfoUrl, wrapper.ExtraInfoUrl); + Assert.Equal(historyUrl, wrapper.HistoryUrl); + Assert.Equal(new PSTriggeredWebJobRun(latestRun).ToString(), wrapper.LatestRun.ToString()); + Assert.Equal(runCommand, wrapper.RunCommand); + Assert.Equal(url, wrapper.Url); + Assert.Equal(jobName, webJob.Name); + Assert.Equal(jobType, webJob.Type); + Assert.Equal(extraInfoUrl, webJob.ExtraInfoUrl); + Assert.Equal(historyUrl, webJob.HistoryUrl); + Assert.Equal(latestRun, webJob.LatestRun); + Assert.Equal(runCommand, webJob.RunCommand); + Assert.Equal(url, webJob.Url); + } + + [Fact] + public void SamePropertyNumberWithTriggeredWebJobModelClass() + { + // Setup & Test + int webJobPropertyNumber = TypeDescriptor.GetProperties(typeof(TriggeredWebJob)).Count - 1; // Ignore the error property + int webJobWrapperPropertyNumber = TypeDescriptor.GetProperties(typeof(PSTriggeredWebJob)).Count; + + // Assert + Assert.Equal(webJobPropertyNumber, webJobWrapperPropertyNumber); + } + + [Fact] + public void SamePropertyNumberWithContinuousWebJobModelClass() + { + // Setup & Test + int webJobPropertyNumber = TypeDescriptor.GetProperties(typeof(ContinuousWebJob)).Count - 1; // Ignore the error property + int webJobWrapperPropertyNumber = TypeDescriptor.GetProperties(typeof(PSContinuousWebJob)).Count; + + // Assert + Assert.Equal(webJobPropertyNumber, webJobWrapperPropertyNumber); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Test/packages.config b/src/ServiceManagement/Services/Commands.Test/packages.config new file mode 100644 index 000000000000..16f8f94a59ca --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Test/packages.config @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ServiceManagement/Services/Commands.Utilities/Azure.psd1 b/src/ServiceManagement/Services/Commands.Utilities/Azure.psd1 new file mode 100644 index 000000000000..e4fd34966889 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Azure.psd1 @@ -0,0 +1,167 @@ +# +# Module manifest for module 'Azure' +# +# Generated by: Microsoft Corporation +# +# Generated on: 5/23/2012 +# + +@{ + +# Version number of this module. +ModuleVersion = '0.8.11' + +# ID used to uniquely identify this module +GUID = 'D48CF693-4125-4D2D-8790-1514F44CE325' + +# Author of this module +Author = 'Microsoft Corporation' + +# Company or vendor of this module +CompanyName = 'Microsoft Corporation' + +# Copyright statement for this module +Copyright = '?Microsoft Corporation. All rights reserved.' + +# Description of the functionality provided by this module +Description = '' + +# Minimum version of the Windows PowerShell engine required by this module +PowerShellVersion = '3.0' + +# Name of the Windows PowerShell host required by this module +PowerShellHostName = '' + +# Minimum version of the Windows PowerShell host required by this module +PowerShellHostVersion = '' + +# Minimum version of the .NET Framework required by this module +DotNetFrameworkVersion = '4.0' + +# Minimum version of the common language runtime (CLR) required by this module +CLRVersion='4.0' + +# Processor architecture (None, X86, Amd64, IA64) required by this module +ProcessorArchitecture = 'None' + +# Modules that must be imported into the global environment prior to importing this module +RequiredModules = @() + +# Assemblies that must be loaded prior to importing this module +RequiredAssemblies = @() + +# Script files (.ps1) that are run in the caller's environment prior to importing this module +ScriptsToProcess = @() + +# Type files (.ps1xml) to be loaded when importing this module +TypesToProcess = @( + '.\Services\Microsoft.WindowsAzure.Commands.Websites.Types.ps1xml', + '.\Sql\Microsoft.WindowsAzure.Commands.SqlDatabase.Types.ps1xml' + '.\Storage\Microsoft.WindowsAzure.Commands.Storage.Types.ps1xml' +) + +# Format files (.ps1xml) to be loaded when importing this module +FormatsToProcess = @( + '.\Services\Microsoft.WindowsAzure.Commands.Websites.format.ps1xml', + '.\Services\Microsoft.WindowsAzure.Commands.CloudService.format.ps1xml', + '.\Services\Microsoft.WindowsAzure.Commands.ServiceBus.format.ps1xml', + '.\Storage\Microsoft.WindowsAzure.Commands.Storage.format.ps1xml', + '.\Services\Microsoft.WindowsAzure.Commands.Store.format.ps1xml', + '.\Services\Microsoft.WindowsAzure.Commands.Scheduler.format.ps1xml', + '.\Compute\Microsoft.WindowsAzure.Commands.ServiceManagement.format.ps1xml', + '.\Services\Microsoft.WindowsAzure.Commands.Profile.format.ps1xml', + '.\Network\Microsoft.Azure.Commands.Network.format.ps1xml' +) + +# Modules to import as nested modules of the module specified in ModuleToProcess +NestedModules = '.\Services\Microsoft.WindowsAzure.Commands.dll', + '.\Automation\Microsoft.Azure.Commands.Automation.dll', + '.\TrafficManager\Microsoft.WindowsAzure.Commands.TrafficManager.dll', + '.\Services\Microsoft.WindowsAzure.Commands.Profile.dll', + '.\Compute\Microsoft.WindowsAzure.Commands.ServiceManagement.dll', + '.\Sql\Microsoft.WindowsAzure.Commands.SqlDatabase.dll', + '.\Storage\Microsoft.WindowsAzure.Commands.Storage.dll', + '.\ManagedCache\Microsoft.Azure.Commands.ManagedCache.dll', + '.\HDInsight\Microsoft.WindowsAzure.Commands.HDInsight.dll', + '.\Network\Microsoft.Azure.Commands.Network.dll', + '.\RecoveryServices\Microsoft.Azure.Commands.RecoveryServices.dll' + +# Functions to export from this module +FunctionsToExport = '*' + +# Cmdlets to export from this module +CmdletsToExport = '*' + +# Variables to export from this module +VariablesToExport = '*' + +# Aliases to export from this module +AliasesToExport = @( +'Add-WAPackEnvironment', +'Disable-WAPackWebsiteApplicationDiagnostic' +'Enable-WAPackWebsiteApplicationDiagnositc' +'Get-WAPackEnvironment', +'Get-WAPackPublishSettingsFile', +'Get-WAPackSBLocation', +'Get-WAPackSBNamespace', +'Get-WAPackSubscription', +'Get-WAPackWebsite', +'Get-WAPackWebsiteDeployment', +'Get-WAPackWebsiteLocation', +'Get-WAPackWebsiteLog', +'Import-WAPackPublishSettingsFile', +'New-WAPackSBNamespace', +'New-WAPackWebsite', +'Remove-WAPackEnvironment', +'Remove-WAPackSBNamespace', +'Remove-WAPackSubscription', +'Remove-WAPackWebsite', +'Restart-WAPackWebsite', +'Restore-WAPackWebsiteDeployment', +'Save-WAPackWebsiteLog', +'Select-WAPackSubscription', +'Set-WAPackEnvironment', +'Set-WAPackSubscription', +'Set-WAPackWebsite', +'Show-WAPackPortal', +'Show-WAPackWebsite', +'Start-WAPackWebsite', +'Stop-WAPackWebsite', +'Test-WAPackName', +'Add-AzureHDInsightConfigValues', +'Add-AzureHDInsightMetastore', +'Add-AzureHDInsightStorage', +'Get-AzureHDInsightCluster', +'Get-AzureHDInsightJob', +'Get-AzureHDInsightJobOutput', +'Get-AzureHDInsightProperties', +'Invoke-Hive', +'New-AzureHDInsightCluster', +'New-AzureHDInsightClusterConfig', +'New-AzureHDInsightHiveJobDefinition', +'New-AzureHDInsightMapReduceJobDefinition', +'New-AzureHDInsightPigJobDefinition', +'New-AzureHDInsightSqoopJobDefinition', +'New-AzureHDInsightStreamingMapReduceJobDefinition', +'Remove-AzureHDInsightCluster', +'Revoke-AzureHDInsightHttpServicesAccess', +'Set-AzureHDInsightDefaultStorage', +'Start-AzureHDInsightJob', +'Stop-AzureHDInsightJob', +'Use-AzureHDInsightCluster', +'Wait-AzureHDInsightJob', +'Get-AzureStorageContainerAcl', +'Start-CopyAzureStorageBlob', +'Stop-CopyAzureStorageBlob' +) + +# List of all modules packaged with this module +ModuleList = @() + +# List of all files packaged with this module +FileList = @() + +# Private data to pass to the module specified in ModuleToProcess +PrivateData = '' + +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/CloudService/AddRole.cs b/src/ServiceManagement/Services/Commands.Utilities/CloudService/AddRole.cs new file mode 100644 index 000000000000..a7888c4f22d2 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/CloudService/AddRole.cs @@ -0,0 +1,95 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService +{ + /// + /// Creates basic scaffolding structure for azure web/worker role. + /// + public abstract class AddRole : AzurePSCmdlet + { + private string successMessage; + + private bool isWebRole; + + protected string Scaffolding { set; get; } + + public string RootPath { set; get; } + + [Parameter(Position = 0, HelpMessage = "Role name")] + [Alias("n")] + public string Name { get; set; } + + [Parameter(Position = 1, HelpMessage = "Instances count")] + [Alias("i")] + public int Instances { get; set; } + + /// + /// Constructs new AddRole instance. + /// + /// The scaffolding path + /// The verbose message to emit when the cmdlet succeed + /// Flag that indicates role is web or worker + /// The service root path + public AddRole(string scaffolding, string successMessage, bool isWebRole) + { + this.Scaffolding = scaffolding; + this.isWebRole = isWebRole; + this.successMessage = successMessage; + this.Instances = 1; + } + + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + RootPath = RootPath ?? CommonUtilities.GetServiceRootPath(CurrentPath()); + CloudServiceProject service = new CloudServiceProject(RootPath, null); + RoleInfo roleInfo = null; + + if (isWebRole) + { + roleInfo = service.AddWebRole(Scaffolding, Name, Instances); + } + else + { + roleInfo = service.AddWorkerRole(Scaffolding, Name, Instances); + } + + OnProcessing(roleInfo); + + try + { + service.ChangeRolePermissions(roleInfo); + SafeWriteOutputPSObject(typeof(RoleSettings).FullName, Parameters.RoleName, roleInfo.Name); + WriteVerbose(string.Format(successMessage, RootPath, roleInfo.Name)); + } + catch (UnauthorizedAccessException) + { + WriteWarning(Resources.AddRoleMessageInsufficientPermissions); + } + } + + protected virtual void OnProcessing(RoleInfo roleInfo) + { + // Placeholder for work to do after adding the role scaffolding. + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/CloudService/CacheConfigurationFactory.cs b/src/ServiceManagement/Services/Commands.Utilities/CloudService/CacheConfigurationFactory.cs new file mode 100644 index 000000000000..e163c564997e --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/CloudService/CacheConfigurationFactory.cs @@ -0,0 +1,330 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Xml.Linq; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService.Scaffolding; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService +{ + using ConfigConfigurationSetting = Common.XmlSchema.ServiceConfigurationSchema.ConfigurationSetting; + using DefinitionConfigurationSetting = Common.XmlSchema.ServiceDefinitionSchema.ConfigurationSetting; + + static class CacheConfigurationFactory + { + private static string CurrentVersion { get; set; } + + private static Dictionary> cacheRoleConfigurationActions = + new Dictionary>() + { + { SDKVersion.Version180, CacheRole180 }, + { SDKVersion.Version200, CacheRole180 }, + { SDKVersion.Version220, CacheRole180 }, + { SDKVersion.Version230, CacheRole180 }, + { SDKVersion.Version240, CacheRole180 }, + { SDKVersion.Version250, CacheRole180 } + }; + + private static Dictionary> clientRoleConfigurationActions = + new Dictionary>() + { + { SDKVersion.Version180, CacheClientRole180 }, + { SDKVersion.Version200, CacheClientRole180 }, + { SDKVersion.Version220, CacheClientRole180 }, + { SDKVersion.Version230, CacheClientRole180 }, + { SDKVersion.Version240, CacheClientRole180 }, + { SDKVersion.Version250, CacheClientRole180 } + }; + + #region Cache Role Configuration + + /// + /// Configuration required to enable dedicated caching on a given role. + /// + /// The service project root path + /// The cache role info + private static void CacheRole180(string rootPath, RoleInfo cacheRoleInfo) + { + CloudServiceProject cloudServiceProject = new CloudServiceProject(rootPath, null); + + if (!cloudServiceProject.Components.IsWebRole(cacheRoleInfo.Name)) + { + CacheWorkerRole180(rootPath, cacheRoleInfo); + } + } + + private static void CacheWorkerRole180(string rootPath, RoleInfo cacheRoleInfo) + { + // Fetch cache role information from service definition and service configuration files. + CloudServiceProject cloudServiceProject = new CloudServiceProject(rootPath, null); + WorkerRole cacheWorkerRole = cloudServiceProject.Components.GetWorkerRole(cacheRoleInfo.Name); + RoleSettings cacheRoleSettings = cloudServiceProject.Components.GetCloudConfigRole(cacheRoleInfo.Name); + + // Add caching module to the role imports + cacheWorkerRole.Imports = GeneralUtilities.ExtendArray( + cacheWorkerRole.Imports, + new Import { moduleName = Resources.CachingModuleName }); + + // Enable caching Diagnostic store. + LocalStore diagnosticStore = new LocalStore + { + name = Resources.CacheDiagnosticStoreName, + cleanOnRoleRecycle = false + }; + cacheWorkerRole.LocalResources = GeneralUtilities.InitializeIfNull(cacheWorkerRole.LocalResources); + cacheWorkerRole.LocalResources.LocalStorage = GeneralUtilities.ExtendArray( + cacheWorkerRole.LocalResources.LocalStorage, + diagnosticStore); + + // Remove input endpoints. + cacheWorkerRole.Endpoints.InputEndpoint = null; + + // Add caching configuration settings + AddCacheConfiguration(cloudServiceProject.Components.GetCloudConfigRole(cacheRoleInfo.Name)); + AddCacheConfiguration( + cloudServiceProject.Components.GetLocalConfigRole(cacheRoleInfo.Name), + Resources.EmulatorConnectionString); + + cloudServiceProject.Components.Save(cloudServiceProject.Paths); + } + + private static void AddCacheConfiguration(RoleSettings cacheRoleSettings, string connectionString = "") + { + List cachingConfigSettings = new List(); + cachingConfigSettings.Add(new ConfigConfigurationSetting + { + name = Resources.NamedCacheSettingName, + value = Resources.NamedCacheSettingValue + }); + cachingConfigSettings.Add(new ConfigConfigurationSetting + { + name = Resources.DiagnosticLevelName, + value = Resources.DiagnosticLevelValue + }); + cachingConfigSettings.Add(new ConfigConfigurationSetting + { + name = Resources.CachingCacheSizePercentageSettingName, + value = string.Empty + }); + cachingConfigSettings.Add(new ConfigConfigurationSetting + { + name = Resources.CachingConfigStoreConnectionStringSettingName, + value = connectionString + }); + + cacheRoleSettings.ConfigurationSettings = GeneralUtilities.ExtendArray( + cacheRoleSettings.ConfigurationSettings, + cachingConfigSettings); + } + + #endregion + + #region Cache Client Role Configuration + + /// + /// Configuration action to enable using dedicated caching on the client role. + /// + /// The cloud service project instance + /// The role name + /// The dedicated cache worker role name + private static void CacheClientRole180( + CloudServiceProject cloudServiceProject, + string roleName, + string cacheWorkerRoleName) + { + // Add MemcacheShim runtime installation. + cloudServiceProject.AddRoleRuntime( + cloudServiceProject.Paths, + roleName, + Resources.CacheRuntimeValue, + CurrentVersion); + + // Fetch web role information. + Startup startup = cloudServiceProject.Components.GetRoleStartup(roleName); + + // Assert that cache runtime is added to the runtime startup. + Debug.Assert(Array.Exists(CloudRuntime.GetRuntimeStartupTask(startup).Environment, + v => v.name.Equals(Resources.RuntimeTypeKey) && v.value.Contains(Resources.CacheRuntimeValue))); + + if (cloudServiceProject.Components.IsWebRole(roleName)) + { + WebRole webRole = cloudServiceProject.Components.GetWebRole(roleName); + webRole.LocalResources = GeneralUtilities.InitializeIfNull(webRole.LocalResources); + DefinitionConfigurationSetting[] configurationSettings = webRole.ConfigurationSettings; + + CacheClientCommonConfiguration( + cloudServiceProject, + roleName, + true, + cacheWorkerRoleName, + webRole.Startup, + webRole.Endpoints, + webRole.LocalResources, + ref configurationSettings); + webRole.ConfigurationSettings = configurationSettings; + } + else + { + WorkerRole workerRole = cloudServiceProject.Components.GetWorkerRole(roleName); + workerRole.LocalResources = GeneralUtilities.InitializeIfNull(workerRole.LocalResources); + DefinitionConfigurationSetting[] configurationSettings = workerRole.ConfigurationSettings; + + CacheClientCommonConfiguration( + cloudServiceProject, + roleName, + false, + cacheWorkerRoleName, + workerRole.Startup, + workerRole.Endpoints, + workerRole.LocalResources, + ref configurationSettings); + workerRole.ConfigurationSettings = configurationSettings; + } + + // Save changes + cloudServiceProject.Components.Save(cloudServiceProject.Paths); + } + + private static void CacheClientCommonConfiguration( + CloudServiceProject cloudServiceProject, + string roleName, + bool isWebRole, + string cacheWorkerRole, + Startup startup, + Endpoints endpoints, + LocalResources localResources, + ref DefinitionConfigurationSetting[] configurationSettings) + { + if (isWebRole) + { + // Generate cache scaffolding for web role + cloudServiceProject.GenerateScaffolding(Path.Combine(Resources.CacheScaffolding, RoleType.WebRole.ToString()), + roleName, new Dictionary()); + + // Adjust web.config to enable auto discovery for the caching role. + string webCloudConfigPath = Path.Combine(cloudServiceProject.Paths.RootPath, roleName, Resources.WebCloudConfig); + string webConfigPath = Path.Combine(cloudServiceProject.Paths.RootPath, roleName, Resources.WebConfigTemplateFileName); + + UpdateWebConfig(roleName, cacheWorkerRole, webCloudConfigPath); + UpdateWebConfig(roleName, cacheWorkerRole, webConfigPath); + } + else + { + // Generate cache scaffolding for worker role + Dictionary parameters = new Dictionary(); + parameters[ScaffoldParams.RoleName] = cacheWorkerRole; + + cloudServiceProject.GenerateScaffolding(Path.Combine(Resources.CacheScaffolding, RoleType.WorkerRole.ToString()), + roleName, parameters); + } + + // Add default memcache internal endpoint. + InternalEndpoint memcacheEndpoint = new InternalEndpoint + { + name = Resources.MemcacheEndpointName, + protocol = InternalProtocol.tcp, + port = Resources.MemcacheEndpointPort + }; + endpoints.InternalEndpoint = GeneralUtilities.ExtendArray(endpoints.InternalEndpoint, memcacheEndpoint); + + // Enable cache diagnostic + LocalStore localStore = new LocalStore + { + name = Resources.CacheDiagnosticStoreName, + cleanOnRoleRecycle = false + }; + localResources.LocalStorage = GeneralUtilities.ExtendArray(localResources.LocalStorage, localStore); + + DefinitionConfigurationSetting diagnosticLevel = new DefinitionConfigurationSetting { name = Resources.CacheClientDiagnosticLevelAssemblyName }; + configurationSettings = GeneralUtilities.ExtendArray(configurationSettings, diagnosticLevel); + + // Add ClientDiagnosticLevel setting to service configuration. + AddClientDiagnosticLevelToConfig(cloudServiceProject.Components.GetCloudConfigRole(roleName)); + AddClientDiagnosticLevelToConfig(cloudServiceProject.Components.GetLocalConfigRole(roleName)); + } + + private static void AddClientDiagnosticLevelToConfig(RoleSettings roleSettings) + { + ConfigConfigurationSetting clientDiagnosticLevel = new ConfigConfigurationSetting { name = Resources.ClientDiagnosticLevelName, value = Resources.ClientDiagnosticLevelValue }; + roleSettings.ConfigurationSettings = GeneralUtilities.ExtendArray(roleSettings.ConfigurationSettings, clientDiagnosticLevel); + } + + /// + /// Updates the web.cloud.config with to auto-discover the cache role. + /// + /// The role name + /// The cache worker role name + /// The azure service instance for the role + private static void UpdateWebConfig(string roleName, string cacheWorkerRoleName, string webConfigPath) + { + XDocument webConfig = XDocument.Load(webConfigPath); + + Dictionary parameters = new Dictionary(); + parameters[ScaffoldParams.RoleName] = cacheWorkerRoleName; + string autoDiscoveryConfig = Scaffold.ReplaceParameter(Resources.CacheAutoDiscoveryConfig, parameters); + + // Adding the auto-discovery is sensetive to the placement of the nodes. The first node which is + // must be added at the first and the last node which is dataCacheClients must be added as last element. + XElement autoDiscoverXElement = XElement.Parse(autoDiscoveryConfig); + webConfig.Element("configuration").AddFirst(autoDiscoverXElement.FirstNode); + webConfig.Element("configuration").Add(autoDiscoverXElement.LastNode); + Debug.Assert(webConfig.Element("configuration").FirstNode.Ancestors("section").Attributes("name") != null); + Debug.Assert(webConfig.Element("configuration").LastNode.Ancestors("tracing").Attributes("sinkType") != null); + webConfig.Save(webConfigPath); + } + + #endregion + + /// + /// Gets the configuration action to enable dedicated caching on a role for the given SDK version. + /// + /// The SDK version + /// Action to apply to enable dedicated caching on a role + public static Action GetCacheRoleConfigurationAction(string version) + { + if (!cacheRoleConfigurationActions.ContainsKey(version)) + { + throw new Exception(string.Format(Resources.AzureSdkVersionNotSupported, + Resources.MinSupportAzureSdkVersion, Resources.MaxSupportAzureSdkVersion)); + } + + CurrentVersion = version; + return cacheRoleConfigurationActions[version]; + } + + /// + /// Gets the configuration action to enable using dedicated caching on a role for the given SDK version. + /// + /// The SDK version + /// Action to apply on the client role + public static Action GetClientRoleConfigurationAction(string version) + { + if (!clientRoleConfigurationActions.ContainsKey(version)) + { + throw new Exception(string.Format(Resources.AzureSdkVersionNotSupported, + Resources.MinSupportAzureSdkVersion, Resources.MaxSupportAzureSdkVersion)); + } + + CurrentVersion = version; + return clientRoleConfigurationActions[version]; + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/CloudService/CloudServiceClient.cs b/src/ServiceManagement/Services/Commands.Utilities/CloudService/CloudServiceClient.cs new file mode 100644 index 000000000000..1b97290245a7 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/CloudService/CloudServiceClient.cs @@ -0,0 +1,993 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Security.Cryptography; +using System.Security.Cryptography.X509Certificates; +using System.Threading; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService.AzureTools; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Management; +using Microsoft.WindowsAzure.Management.Compute; +using Microsoft.WindowsAzure.Management.Compute.Models; +using Microsoft.WindowsAzure.Management.Storage; +using Microsoft.WindowsAzure.Management.Storage.Models; +using Microsoft.WindowsAzure.Storage.Blob; +using DeploymentStatus = Microsoft.WindowsAzure.Commands.Utilities.CloudService.Model.DeploymentStatus; +using RoleInstance = Microsoft.WindowsAzure.Commands.Utilities.CloudService.Model.RoleInstance; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService +{ + using ConfigCertificate = Common.XmlSchema.ServiceConfigurationSchema.Certificate; + using ConfigConfigurationSetting = Common.XmlSchema.ServiceConfigurationSchema.ConfigurationSetting; + + public class CloudServiceClient : ICloudServiceClient + { + internal CloudBlobUtility CloudBlobUtility { get; set; } + + internal ManagementClient ManagementClient { get; set; } + + internal StorageManagementClient StorageClient { get; set; } + + internal ComputeManagementClient ComputeClient { get; set; } + + public AzureSubscription Subscription { get; set; } + + public Action DebugStream { get; set; } + + public Action VerboseStream { get; set; } + + public Action WarningStream { get; set; } + + public string CurrentDirectory { get; set; } + + public const int SleepDuration = 1000; + + enum CloudServiceState + { + Start, + Stop + } + + private void VerifyDeploymentExists(HostedServiceGetDetailedResponse cloudService, DeploymentSlot slot, out string name) + { + bool exists = false; + + if (cloudService.Deployments != null) + { + exists = cloudService.Deployments.Any(d => d.DeploymentSlot == slot ); + } + + if (exists) + { + name = cloudService.Deployments.First(d => d.DeploymentSlot == slot).Name; + } + else + { + throw new Exception(string.Format(Resources.CannotFindDeployment, cloudService.ServiceName, slot)); + } + } + + private void SetCloudServiceState(string name, DeploymentSlot slot, CloudServiceState state) + { + HostedServiceGetDetailedResponse cloudService = GetCloudService(name); + + string deploymentName = null; + VerifyDeploymentExists(cloudService, slot, out deploymentName); + ComputeClient.Deployments.UpdateStatusByDeploymentSlot(cloudService.ServiceName, + slot, new DeploymentUpdateStatusParameters + { + Status = + state == CloudServiceState.Start + ? UpdatedDeploymentStatus.Running + : UpdatedDeploymentStatus.Suspended + }); + } + + private void WriteToStream(Action stream, string format, params object[] args) + { + if (stream != null) + { + stream(string.Format(format, args)); + } + } + + private void WriteWarning(string format, params object[] args) + { + WriteToStream(WarningStream, format, args); + } + + private void WriteVerbose(string format, params object[] args) + { + WriteToStream(VerboseStream, format, args); + } + + private void WriteVerboseWithTimestamp(string format, params object[] args) + { + WriteVerbose(string.Format("{0:T} - {1}", DateTime.Now, string.Format(format, args))); + } + + private void TranslateException(Action a) + { + try + { + a(); + } + catch (CloudException ex) + { + throw new Exception(string.Format( + Resources.OperationFailedMessage, + ex.Message, + ex.Response.StatusCode), ex); + } + } + + private void PrepareCloudServicePackagesRuntime(PublishContext context) + { + CloudServiceProject cloudServiceProject = new CloudServiceProject(context.RootPath, null); + string warning = cloudServiceProject.ResolveRuntimePackageUrls(); + + if (!string.IsNullOrEmpty(warning)) + { + WriteWarning(Resources.RuntimeMismatchWarning, context.ServiceName); + WriteWarning(warning); + } + } + + private void UpdateCacheWorkerRolesCloudConfiguration(PublishContext context) + { + string connectionString = GetStorageServiceConnectionString(context.ServiceSettings.StorageServiceName); + var cloudServiceProject = new CloudServiceProject(context.RootPath, null); + + var connectionStringConfig = new ConfigConfigurationSetting + { + name = Resources.CachingConfigStoreConnectionStringSettingName, + value = string.Empty + }; + + cloudServiceProject.Components.ForEachRoleSettings( + r => Array.Exists(r.ConfigurationSettings, c => c.Equals(connectionStringConfig)), + r => + { + int index = Array.IndexOf(r.ConfigurationSettings, connectionStringConfig); + r.ConfigurationSettings[index] = new ConfigConfigurationSetting + { + name = Resources.CachingConfigStoreConnectionStringSettingName, + value = connectionString + }; + }); + + cloudServiceProject.Components.Save(cloudServiceProject.Paths); + } + + private void CreateDeployment(PublishContext context) + { + Uri packageUri = UploadPackageIfNeeded(context); + + var deploymentParams = new DeploymentCreateParameters + { + PackageUri = packageUri, + Configuration = GeneralUtilities.GetConfiguration(context.CloudConfigPath), + Label = context.ServiceName, + Name = context.DeploymentName, + StartDeployment = true + }; + + WriteVerboseWithTimestamp(Resources.PublishStartingMessage); + + ServiceCertificateListResponse uploadedCertificates = ComputeClient.ServiceCertificates.List(context.ServiceName); + AddCertificates(uploadedCertificates, context); + + ComputeClient.Deployments.Create(context.ServiceName, GetSlot(context.ServiceSettings.Slot), + deploymentParams); + } + + + private void AddCertificates(ServiceCertificateListResponse uploadedCertificates, PublishContext context) + { + string name = context.ServiceName; + CloudServiceProject cloudServiceProject = context.ServiceProject; + if (cloudServiceProject.Components.CloudConfig.Role != null) + { + foreach (ConfigCertificate certElement in cloudServiceProject.Components.CloudConfig.Role. + SelectMany(r => r.Certificates ?? new ConfigCertificate[0]).Distinct()) + { + if (uploadedCertificates == null || (uploadedCertificates.Certificates.Count(c => c.Thumbprint.Equals( + certElement.thumbprint, StringComparison.OrdinalIgnoreCase)) < 1)) + { + X509Certificate2 cert = GeneralUtilities.GetCertificateFromStore(certElement.thumbprint); + UploadCertificate(cert, certElement, name); + } + } + } + } + + private void UploadCertificate(X509Certificate2 cert, ConfigCertificate certElement, string name) + { + try + { + var createParams = new ServiceCertificateCreateParameters + { + Data = cert.Export(X509ContentType.Pfx, string.Empty), + Password = string.Empty, + CertificateFormat = CertificateFormat.Pfx + }; + TranslateException(() => ComputeClient.ServiceCertificates.Create(name, createParams)); + + } + catch (CryptographicException ex) + { + throw new ArgumentException(string.Format( + Resources.CertificatePrivateKeyAccessError, + certElement.name), ex); + } + } + + private void UpgradeDeployment(PublishContext context, bool forceUpgrade) + { + Uri packageUri = UploadPackageIfNeeded(context); + + var upgradeParams = new DeploymentUpgradeParameters + { + Configuration = GeneralUtilities.GetConfiguration(context.CloudConfigPath), + PackageUri = packageUri, + Label = context.ServiceName, + Mode = DeploymentUpgradeMode.Auto, + Force = forceUpgrade + }; + + WriteVerboseWithTimestamp(Resources.PublishUpgradingMessage); + + var uploadedCertificates = ComputeClient.ServiceCertificates.List(context.ServiceName); + AddCertificates(uploadedCertificates, context); + + ComputeClient.Deployments.UpgradeBySlot(context.ServiceName, GetSlot(context.ServiceSettings.Slot), upgradeParams); + } + + private Uri UploadPackageIfNeeded(PublishContext context) + { + Uri packageUri; + if (context.PackageIsFromStorageAccount) + { + packageUri = new Uri(context.PackagePath); + } + else + { + packageUri = UploadPackage(context); + } + return packageUri; + } + + private void VerifyDeployment(PublishContext context) + { + try + { + WriteVerboseWithTimestamp(Resources.PublishInitializingMessage); + + var roleInstanceSnapshot = new Dictionary(); + + // Continue polling for deployment until all of the roles + // indicate they're ready + Deployment deployment; + do + { + deployment = new Deployment( + ComputeClient.Deployments.GetBySlot(context.ServiceName, GetSlot(context.ServiceSettings.Slot))); + + // The goal of this loop is to output a message whenever the status of a role + // instance CHANGES. To do that, we have to remember the last status of all role instances + // and that's what the roleInstanceSnapshot array is for + foreach (RoleInstance currentInstance in deployment.RoleInstanceList) + { + // We only care about these three statuses, ignore other intermediate statuses + if (string.Equals(currentInstance.InstanceStatus, RoleInstanceStatus.BusyRole) || + string.Equals(currentInstance.InstanceStatus, RoleInstanceStatus.ReadyRole) || + string.Equals(currentInstance.InstanceStatus, RoleInstanceStatus.CreatingRole)) + { + bool createdOrChanged = false; + + // InstanceName is unique and concatenates the role name and instance name + if (roleInstanceSnapshot.ContainsKey(currentInstance.InstanceName)) + { + // If we already have a snapshot of that role instance, update it + RoleInstance previousInstance = roleInstanceSnapshot[currentInstance.InstanceName]; + if (!string.Equals(previousInstance.InstanceStatus, currentInstance.InstanceStatus)) + { + // If the instance status changed, we need to output a message + previousInstance.InstanceStatus = currentInstance.InstanceStatus; + createdOrChanged = true; + } + } + else + { + // If this is the first time we run through, we also need to output a message + roleInstanceSnapshot[currentInstance.InstanceName] = currentInstance; + createdOrChanged = true; + } + + if (createdOrChanged) + { + string statusResource; + switch (currentInstance.InstanceStatus) + { + case RoleInstanceStatus.BusyRole: + statusResource = Resources.PublishInstanceStatusBusy; + break; + + case RoleInstanceStatus.ReadyRole: + statusResource = Resources.PublishInstanceStatusReady; + break; + + default: + statusResource = Resources.PublishInstanceStatusCreating; + break; + } + + WriteVerboseWithTimestamp( + Resources.PublishInstanceStatusMessage, + currentInstance.InstanceName, + currentInstance.RoleName, + statusResource); + } + } + } + + // If a deployment has many roles to initialize, this + // thread must throttle requests so the Azure portal + // doesn't reply with a "too many requests" error + Thread.Sleep(SleepDuration); + } + while (deployment.RoleInstanceList.Any(r => r.InstanceStatus != RoleInstanceStatus.ReadyRole)); + + WriteVerboseWithTimestamp(Resources.PublishCreatedWebsiteMessage, deployment.Url); + + } + catch (CloudException) + { + throw new InvalidOperationException( + string.Format(Resources.CannotFindDeployment, context.ServiceName, context.ServiceSettings.Slot)); + } + } + + private void DeleteDeploymentIfExists(string name, DeploymentSlot slot, bool deleteFromStorage) + { + string deploymentName = null; + if (DeploymentExists(name, slot, out deploymentName)) + { + var deploymentGetResponse = ComputeClient.Deployments.GetBySlot(name, slot); + if (deploymentGetResponse != null && !string.IsNullOrEmpty(deploymentGetResponse.ReservedIPName)) + { + WriteVerboseWithTimestamp(string.Format(Resources.ReservedIPNameNoLongerInUseButStillBeingReserved, deploymentGetResponse.ReservedIPName)); + } + + WriteVerboseWithTimestamp(Resources.RemoveDeploymentWaitMessage, slot, name); + TranslateException(() => ComputeClient.Deployments.DeleteByName(name, deploymentName, deleteFromStorage)); + } + } + + private string GetDeploymentId(PublishContext context) + { + Deployment deployment = new Deployment(); + + do + { + // If a deployment has many roles to initialize, this + // thread must throttle requests so the Azure portal + // doesn't reply with a "too many requests" error + Thread.Sleep(SleepDuration); + + try + { + deployment = new Deployment( + ComputeClient.Deployments.GetBySlot(context.ServiceName, + GetSlot(context.ServiceSettings.Slot))); + } + catch (CloudException ex) + { + if (ex.Response.StatusCode != HttpStatusCode.InternalServerError) + { + throw; + } + } + } + while (deployment.Status != DeploymentStatus.Starting && deployment.Status != DeploymentStatus.Running); + + return deployment.PrivateID; + } + + private DeploymentSlot GetSlot(string slot) + { + if (string.IsNullOrEmpty(slot)) + { + return DeploymentSlot.Production; + } + if (string.Compare(slot, "Staging", StringComparison.InvariantCultureIgnoreCase) == 0) + { + return DeploymentSlot.Staging; + } + if (string.Compare(slot, "Production", StringComparison.InvariantCultureIgnoreCase) == 0) + { + return DeploymentSlot.Production; + } + throw new ArgumentException(string.Format(Resources.InvalidDeploymentSlot, slot), slot); + } + + private string GetCloudServiceName(string name) + { + if (string.IsNullOrEmpty(name)) + { + name = GetCurrentServiceProject().ServiceName; + } + + return name; + } + + private string GetCurrentDirectory() + { + return CurrentDirectory != null ? CurrentDirectory : Environment.CurrentDirectory; + } + + private Uri UploadPackage(PublishContext context) + { + WriteVerboseWithTimestamp( + Resources.PublishUploadingPackageMessage, + context.ServiceSettings.StorageServiceName); + + return CloudBlobUtility.UploadPackageToBlob( + StorageClient, + context.ServiceSettings.StorageServiceName, + context.PackagePath, + new BlobRequestOptions()); + } + + private HostedServiceGetDetailedResponse GetCloudService(string name) + { + name = GetCloudServiceName(name); + try + { + return ComputeClient.HostedServices.GetDetailed(name); + } + catch + { + throw new Exception(string.Format(Resources.ServiceDoesNotExist, name)); + } + } + + private CloudServiceProject GetCurrentServiceProject() + { + return new CloudServiceProject(CommonUtilities.GetServiceRootPath(GetCurrentDirectory()), null); + } + + private PublishContext CreatePublishContext( + string name, + string slot, + string location, + string affinityGroup, + string storageServiceName, + string deploymentName, + CloudServiceProject cloudServiceProject) + { + string serviceName; + + // If the name provided is different than existing name change it + if (!string.IsNullOrEmpty(name) && name != cloudServiceProject.ServiceName) + { + cloudServiceProject.ChangeServiceName(name, cloudServiceProject.Paths); + } + + // If there's no storage service provided, try using the default one + if (string.IsNullOrEmpty(storageServiceName)) + { + storageServiceName = Subscription.GetProperty(AzureSubscription.Property.StorageAccount); + } + + ServiceSettings serviceSettings = ServiceSettings.LoadDefault( + cloudServiceProject.Paths.Settings, + slot, + location, + affinityGroup, + Subscription.Name, + storageServiceName, + name, + cloudServiceProject.ServiceName, + out serviceName + ); + + // Use default location if not location and affinity group provided + serviceSettings.Location = string.IsNullOrEmpty(serviceSettings.Location) && + string.IsNullOrEmpty(serviceSettings.AffinityGroup) ? + GetDefaultLocation() : serviceSettings.Location; + + PublishContext context = new PublishContext( + serviceSettings, + Path.Combine(GetCurrentDirectory(), cloudServiceProject.Paths.CloudPackage), + Path.Combine(GetCurrentDirectory(), cloudServiceProject.Paths.CloudConfiguration), + serviceName, + deploymentName, + cloudServiceProject.Paths.RootPath); + + context.ServiceProject = cloudServiceProject; + + return context; + } + + /// + /// Creates new instance from CloudServiceClient. + /// + /// The subscription data + /// Directory to do operations in + /// Action used to log http requests/responses + /// Action used to log detailed client progress + /// Action used to log warning messages + public CloudServiceClient( + AzureSubscription subscription, + string currentLocation = null, + Action debugStream = null, + Action verboseStream = null, + Action warningStream = null) + : this(currentLocation, debugStream, warningStream, verboseStream) + { + Subscription = subscription; + CloudBlobUtility = new CloudBlobUtility(); + + ManagementClient = AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement); + StorageClient = AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement); + ComputeClient = AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement); + } + + private CloudServiceClient(string currentLocation, Action debugStream, Action verboseStream, + Action warningStream) + { + CurrentDirectory = currentLocation; + DebugStream = debugStream; + VerboseStream = verboseStream; + WarningStream = warningStream; + } + + internal CloudServiceClient( + AzureSubscription subscription, + ManagementClient managementClient, + StorageManagementClient storageManagementClient, + ComputeManagementClient computeManagementClient) + : this((string)null, null, null, null) + { + Subscription = subscription; + CurrentDirectory = null; + DebugStream = null; + VerboseStream = null; + WarningStream = null; + + CloudBlobUtility = new CloudBlobUtility(); + ManagementClient = managementClient; + StorageClient = storageManagementClient; + ComputeClient = computeManagementClient; + } + + /// + /// Starts a cloud service. + /// + /// The cloud service name + /// The deployment slot + public void StartCloudService(string name = null, string slot = null) + { + DeploymentSlot deploymentSlot = GetSlot(slot); + + SetCloudServiceState(name, deploymentSlot, CloudServiceState.Start); + } + + /// + /// Stops a cloud service. + /// + /// The cloud service name + /// The deployment slot + public void StopCloudService(string name = null, string slot = null) + { + DeploymentSlot deploymentSlot = GetSlot(slot); + SetCloudServiceState(name, deploymentSlot, CloudServiceState.Stop); + } + + /// + /// Check if the deployment exists for given cloud service. + /// + /// The cloud service name + /// The deployment slot name + /// Flag indicating the deployment exists or not + public bool DeploymentExists(string name = null, string slot = null) + { + DeploymentSlot deploymentSlot = GetSlot(slot); + string deploymentName = null; + return DeploymentExists(name, deploymentSlot, out deploymentName); + } + + private bool DeploymentExists(string name, DeploymentSlot slot, out string deploymentName) + { + HostedServiceGetDetailedResponse cloudService = GetCloudService(name); + deploymentName = null; + try + { + VerifyDeploymentExists(cloudService, slot, out deploymentName); + return true; + } + catch (Exception) + { + return false; + } + } + + /// + /// Checks if the given storage service name is available to be created + /// + /// The name of the storage service + /// + public bool CheckStorageServiceAvailability(string name) + { + CheckNameAvailabilityResponse response = this.StorageClient.StorageAccounts.CheckNameAvailability(name); + if (response != null && !response.IsAvailable) + { + WriteWarning(response.Reason); + } + + return response.IsAvailable; + } + + /// + /// Checks if the given hosted service name is available to be created + /// + /// The name of the hosted service + /// + public bool CheckHostedServiceNameAvailability(string name) + { + HostedServiceCheckNameAvailabilityResponse response = this.ComputeClient.HostedServices.CheckNameAvailability(name); + if (response != null && !response.IsAvailable) + { + WriteWarning(response.Reason); + } + + return response.IsAvailable; + } + + /// + /// Publishes a service project on Microsoft Azure. + /// + /// The cloud service name + /// The deployment slot + /// The deployment location + /// The deployment affinity group + /// The storage account to store the package + /// The deployment name + /// Launch the service after publishing + /// force the service upgrade even if this would result in loss of any local data on the vm (for example, changing the vm size) + /// The created deployment + public Deployment PublishCloudService( + string name = null, + string slot = null, + string location = null, + string affinityGroup = null, + string storageAccount = null, + string deploymentName = null, + bool launch = false, + bool forceUpgrade = false) + { + CloudServiceProject cloudServiceProject = GetCurrentServiceProject(); + + // Initialize publish context + PublishContext context = CreatePublishContext( + name, + slot, + location, + affinityGroup, + storageAccount, + deploymentName, + cloudServiceProject); + + WriteVerbose(string.Format(Resources.PublishServiceStartMessage, context.ServiceName)); + + // Set package runtime information + WriteVerboseWithTimestamp(Resources.RuntimeDeploymentStart, context.ServiceName); + PrepareCloudServicePackagesRuntime(context); + + // Verify storage account exists + SetupStorageService(context); + + // Update cache worker roles configuration + WriteVerboseWithTimestamp( + Resources.PublishPreparingDeploymentMessage, + context.ServiceName, + Subscription.Id); + UpdateCacheWorkerRolesCloudConfiguration(context); + + // Create cloud package + AzureTool.Validate(); + if (File.Exists(context.PackagePath)) + { + File.Delete(context.PackagePath); + } + cloudServiceProject.CreatePackage(DevEnv.Cloud); + + DeploymentGetResponse deployment = DeployPackage(launch, forceUpgrade, context); + + return new Deployment(deployment); + } + + + public Deployment PublishCloudService( + string package, + string configuration, + string slot = null, + string location = null, + string affinityGroup = null, + string storageAccount = null, + string deploymentName = null, + bool launch = false, + bool forceUpgrade = false) + { + string workingDirectory = GetCurrentDirectory(); + + string cloudConfigFullPath = configuration; + if (!Path.IsPathRooted(configuration)) + { + cloudConfigFullPath = Path.Combine(workingDirectory, configuration); + } + + CloudServiceProject cloudServiceProject = new CloudServiceProject(cloudConfigFullPath); + + // Initialize publish context + PublishContext context = CreatePublishContext( + cloudServiceProject.ServiceName, + slot, + location, + affinityGroup, + storageAccount, + deploymentName, + cloudServiceProject); + + context.ConfigPackageSettings(package, workingDirectory) ; + + // Verify storage account exists + if (!context.PackageIsFromStorageAccount) + { + SetupStorageService(context); + } + + WriteVerbose(string.Format(Resources.PublishServiceStartMessage, context.ServiceName)); + + DeploymentGetResponse deployment = DeployPackage(launch, forceUpgrade, context); + + return new Deployment(deployment); + } + + private void SetupStorageService(PublishContext context) + { + WriteVerboseWithTimestamp( + Resources.PublishVerifyingStorageMessage, + context.ServiceSettings.StorageServiceName); + + CreateStorageServiceIfNotExist( + context.ServiceSettings.StorageServiceName, + context.ServiceName, + context.ServiceSettings.Location, + context.ServiceSettings.AffinityGroup); + } + + private DeploymentGetResponse DeployPackage(bool launch, bool forceUpgrade, PublishContext context) + { + // Publish cloud service + WriteVerboseWithTimestamp(Resources.PublishConnectingMessage); + CreateCloudServiceIfNotExist( + context.ServiceName, + affinityGroup: context.ServiceSettings.AffinityGroup, + location: context.ServiceSettings.Location); + + if (DeploymentExists(context.ServiceName, context.ServiceSettings.Slot)) + { + // Upgrade the deployment + UpgradeDeployment(context, forceUpgrade); + } + else + { + // Create new deployment + CreateDeployment(context); + } + + // Get the deployment id and show it. + WriteVerboseWithTimestamp(Resources.PublishCreatedDeploymentMessage, GetDeploymentId(context)); + + // Verify the deployment succeeded by checking that each of the roles are running + VerifyDeployment(context); + + // Get object of the published deployment + DeploymentGetResponse deployment = ComputeClient.Deployments.GetBySlot(context.ServiceName, GetSlot(context.ServiceSettings.Slot)); + + if (launch) + { + GeneralUtilities.LaunchWebPage(deployment.Uri.ToString()); + } + return deployment; + } + + /// + /// Checks if a cloud service exists or not. + /// + /// The cloud service name + /// True if exists, false otherwise + public bool CloudServiceExists(string name) + { + try + { + return ComputeClient.HostedServices.GetDetailed(name) != null; + } + catch + { + return false; + } + } + + /// + /// Creates cloud service if it does not exist. + /// + /// The cloud service name + /// The cloud service label + /// The location to create the cloud service in. + /// Affinity group name for cloud service + public void CreateCloudServiceIfNotExist( + string name, + string label = null, + string location = null, + string affinityGroup = null) + { + if (!CloudServiceExists(name)) + { + WriteVerboseWithTimestamp(Resources.PublishCreatingServiceMessage); + + var createParameters = new HostedServiceCreateParameters + { + ServiceName = name, + Label = label + }; + + if (!string.IsNullOrEmpty(affinityGroup)) + { + createParameters.AffinityGroup = affinityGroup; + } + else + { + location = string.IsNullOrEmpty(location) ? GetDefaultLocation() : location; + createParameters.Location = location; + } + + ComputeClient.HostedServices.Create(createParameters); + + WriteVerboseWithTimestamp(Resources.PublishCreatedServiceMessage, name); + } + } + + /// + /// Creates storage service if it does not exist. + /// + /// The storage service name + /// The storage service label + /// The location name. If not provided default one will be used + /// The affinity group name + public void CreateStorageServiceIfNotExist( + string name, + string label = null, + string location = null, + string affinityGroup = null) + { + if (!StorageServiceExists(name)) + { + var createParameters = new StorageAccountCreateParameters {Name = name, Label = label, AccountType = "Standard_LRS"}; + + if (!string.IsNullOrEmpty(affinityGroup)) + { + createParameters.AffinityGroup = affinityGroup; + } + else + { + location = string.IsNullOrEmpty(location) ? GetDefaultLocation() : location; + createParameters.Location = location; + } + + TranslateException(() => StorageClient.StorageAccounts.Create(createParameters)); + } + } + + /// + /// Gets the default subscription location. + /// + /// The location name + public string GetDefaultLocation() + { + return ManagementClient.Locations.List().Locations.First().Name; + } + + /// + /// Checks if the provided storage service exists under the subscription or not. + /// + /// The storage service name + /// True if exists, false otherwise + public bool StorageServiceExists(string name) + { + try + { + return StorageClient.StorageAccounts.Get(name) != null; + } + catch (CloudException ex) + { + // Don't write error message. This catch block is used to + // detect that there's no such endpoint which indicates that + // the storage account doesn't exist. + if (ex.Response.StatusCode == HttpStatusCode.NotFound) + { + return false; + } + + // Something else went wrong + throw; + } + } + + /// + /// Gets connection string of the given storage service name. + /// + /// The storage service name + /// The connection string + public string GetStorageServiceConnectionString(string name) + { + return StorageUtilities.GenerateCloudStorageAccount(StorageClient, name).ToString(true); + } + + /// + /// Removes all deployments in the given cloud service and the service itself. + /// + /// The cloud service name + public void RemoveCloudService(string name) + { + RemoveCloudService(name, false); + } + + /// + /// Removes all deployments in the given cloud service and the service itself. + /// + /// The cloud service name + /// Indicates whether the underlying disk blob(s) should be deleted from storage. + public void RemoveCloudService(string name, bool deleteFromStorage) + { + var cloudService = GetCloudService(name); + + DeleteDeploymentIfExists(cloudService.ServiceName, DeploymentSlot.Production, deleteFromStorage); + DeleteDeploymentIfExists(cloudService.ServiceName, DeploymentSlot.Staging, deleteFromStorage); + + WriteVerboseWithTimestamp(string.Format(Resources.RemoveAzureServiceWaitMessage, cloudService.ServiceName)); + if (deleteFromStorage) + { + TranslateException(() => ComputeClient.HostedServices.DeleteAll(cloudService.ServiceName)); + } + else + { + TranslateException(() => ComputeClient.HostedServices.Delete(cloudService.ServiceName)); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/CloudService/ICloudServiceClient.cs b/src/ServiceManagement/Services/Commands.Utilities/CloudService/ICloudServiceClient.cs new file mode 100644 index 000000000000..97271b8adad1 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/CloudService/ICloudServiceClient.cs @@ -0,0 +1,159 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Utilities.CloudService.Model; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService +{ + public interface ICloudServiceClient + { + /// + /// Starts a cloud service. + /// + /// The cloud service name + /// The deployment slot + void StartCloudService(string name = null, string slot = null); + + /// + /// Stops a cloud service. + /// + /// The cloud service name + /// The deployment slot + void StopCloudService(string name = null, string slot = null); + + /// + /// Check if the deployment exists for given cloud service. + /// + /// The cloud service name + /// The deployment slot name + /// Flag indicating the deployment exists or not + bool DeploymentExists(string name = null, string slot = null); + + /// + /// Checks if the given name is avalable for usage in azure hosted service + /// + /// The short name of the hosted service to check + /// + bool CheckHostedServiceNameAvailability(string name); + + /// + /// Publishes a service project on Microsoft Azure. + /// + /// The cloud service name + /// The deployment slot + /// The deployment location + /// The deployment affinity group + /// The storage account to store the package + /// The deployment name + /// True to launch browser after publish is complete + /// force the service upgrade even if this would result in loss of any local data on the vm (for example, changing the vm size) + /// The created deployment + Deployment PublishCloudService( + string name = null, + string slot = null, + string location = null, + string affinityGroup = null, + string storageAccount = null, + string deploymentName = null, + bool launch = false, + bool forceUpgrade = false); + + Deployment PublishCloudService( + string package, + string Configuration, + string slot = null, + string location = null, + string affinityGroup = null, + string storageAccount = null, + string deploymentName = null, + bool launch = false, + bool forceUpgrade = false); + + + /// + /// Creates storage service if it does not exist. + /// + /// The storage service name + /// The storage service label + /// The location name. If not provided default one will be used + /// The affinity group name + void CreateStorageServiceIfNotExist( + string name, + string label = null, + string location = null, + string affinityGroup = null); + + /// + /// Gets the default subscription location. + /// + /// The location name + string GetDefaultLocation(); + + /// + /// Check iof the given storage service name is available + /// + /// The name of the storage service to check + /// + bool CheckStorageServiceAvailability(string name); + /// + /// Checks if the provided storage service exists under the subscription or not. + /// + /// The storage service name + /// True if exists, false otherwise + bool StorageServiceExists(string name); + + /// + /// Gets connection string of the given storage service name. + /// + /// The storage service name + /// The connection string + string GetStorageServiceConnectionString(string name); + + /// + /// Creates cloud service if it does not exist. + /// + /// The cloud service name + /// The cloud service label + /// The cloud service location + /// The cloud service affinity group + void CreateCloudServiceIfNotExist( + string name, + string label = null, + string location = null, + string affinityGroup = null); + + /// + /// Checks if a cloud service exists or not. + /// + /// The cloud service name + /// True if exists, false otherwise + bool CloudServiceExists(string name); + + /// + /// Removes all deployments in the given cloud service and the service itself. + /// + /// The cloud service name + void RemoveCloudService( + string name); + + /// + /// Removes all deployments in the given cloud service and the service itself. + /// + /// The cloud service name + /// Indicates whether the underlying disk blob(s) should be deleted from storage. + void RemoveCloudService( + string name, + bool deleteFromStorage); + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/CloudService/Model/ConfigurationSet.cs b/src/ServiceManagement/Services/Commands.Utilities/CloudService/Model/ConfigurationSet.cs new file mode 100644 index 000000000000..94fdb9464315 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/CloudService/Model/ConfigurationSet.cs @@ -0,0 +1,31 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService.Model +{ + public class ConfigurationSet + { + public ConfigurationSet() + { + + } + + public ConfigurationSet(Management.Compute.Models.ConfigurationSet configurationSet) + { + ConfigurationSetType = configurationSet.ConfigurationSetType; + } + + public string ConfigurationSetType { get; set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/CloudService/Model/Deployment.cs b/src/ServiceManagement/Services/Commands.Utilities/CloudService/Model/Deployment.cs new file mode 100644 index 000000000000..e9490625a676 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/CloudService/Model/Deployment.cs @@ -0,0 +1,118 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService.Model +{ + /// + /// Class describing a deployment + /// + public class Deployment + { + public Deployment() + { + RoleInstanceList = new List(); + RoleList = new List(); + ExtendedProperties = new Dictionary(); + VirtualIPs = new List(); + } + + internal Deployment(DeploymentGetResponse response) + : this() + { + if (response.PersistentVMDowntime != null) + { + PersistentVMDowntime = new PersistentVMDowntimeInfo(response.PersistentVMDowntime); + } + + Name = response.Name; + DeploymentSlot = response.DeploymentSlot == Management.Compute.Models.DeploymentSlot.Staging ? "Staging" : "Production"; + PrivateID = response.PrivateId; + Status = DeploymentStatusFactory.From(response.Status); + Label = response.Label; + Url = response.Uri; + Configuration = response.Configuration; + foreach (var roleInstance in response.RoleInstances.Select(ri => new RoleInstance(ri))) + { + RoleInstanceList.Add(roleInstance); + } + + if (response.UpgradeStatus != null) + { + UpgradeStatus = new UpgradeStatus(response.UpgradeStatus); + } + + UpgradeDomainCount = response.UpgradeDomainCount; + if (response.Roles != null) + { + foreach (var role in response.Roles.Select(r => new Role(r))) + { + RoleList.Add(role); + } + } + SdkVersion = response.SdkVersion; + Locked = response.Locked; + RollbackAllowed = response.RollbackAllowed; + VirtualNetworkName = response.VirtualNetworkName; + CreatedTime = response.CreatedTime; + LastModifiedTime = response.LastModifiedTime; + + if (response.ExtendedProperties != null) + { + foreach (var prop in response.ExtendedProperties.Keys) + { + ExtendedProperties[prop] = response.ExtendedProperties[prop]; + } + } + + if (response.DnsSettings != null) + { + Dns = new DnsSettings(response.DnsSettings); + } + if (response.VirtualIPAddresses != null) + { + foreach (var vip in response.VirtualIPAddresses.Select(v => new VirtualIP(v))) + { + VirtualIPs.Add(vip); + } + } + } + + public PersistentVMDowntimeInfo PersistentVMDowntime { get; set; } + public string Name { get; set; } + public string DeploymentSlot { get; set; } + public string PrivateID { get; set; } + public DeploymentStatus Status { get; set; } + public string Label { get; set; } + public Uri Url { get; set; } + public string Configuration { get; set; } + public IList RoleInstanceList { get; private set; } + public UpgradeStatus UpgradeStatus { get; set; } + public int UpgradeDomainCount { get; set; } + public IList RoleList { get; set; } + public string SdkVersion { get; set; } + public bool? Locked { get; set; } + public bool? RollbackAllowed { get; set; } + public string VirtualNetworkName { get; set; } + public DateTime CreatedTime { get; set; } + public DateTime LastModifiedTime { get; set; } + public IDictionary ExtendedProperties { get; private set; } + public DnsSettings Dns { get; set; } + public IList VirtualIPs { get; set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/CloudService/Model/DeploymentStatus.cs b/src/ServiceManagement/Services/Commands.Utilities/CloudService/Model/DeploymentStatus.cs new file mode 100644 index 000000000000..ec76437dd588 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/CloudService/Model/DeploymentStatus.cs @@ -0,0 +1,36 @@ +// ---------------------------------------------------------------------------------- +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService.Model +{ + using ComputeStatus = Management.Compute.Models.DeploymentStatus; + + public enum DeploymentStatus + { + Running, + Suspended, + RunningTransitioning, + SuspendedTransitioning, + Starting, + Suspending, + Deploying, + Deleting + } + + public static class DeploymentStatusFactory + { + public static DeploymentStatus From(ComputeStatus status) + { + return (DeploymentStatus) (int) (status); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/CloudService/Model/DnsSettings.cs b/src/ServiceManagement/Services/Commands.Utilities/CloudService/Model/DnsSettings.cs new file mode 100644 index 000000000000..147b458ff49f --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/CloudService/Model/DnsSettings.cs @@ -0,0 +1,38 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Net; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService.Model +{ + public class DnsSettings + { + public DnsSettings() + { + DnsServers = new Dictionary(); + } + + public DnsSettings(Management.Compute.Models.DnsSettings settings) + : this() + { + foreach (var server in settings.DnsServers) + { + DnsServers[server.Name] = IPAddress.Parse(server.Address); + } + } + + public IDictionary DnsServers { get; private set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/CloudService/Model/InstanceEndpoint.cs b/src/ServiceManagement/Services/Commands.Utilities/CloudService/Model/InstanceEndpoint.cs new file mode 100644 index 000000000000..472039673581 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/CloudService/Model/InstanceEndpoint.cs @@ -0,0 +1,42 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService.Model +{ + + public class InstanceEndpoint + { + public InstanceEndpoint() + { + + } + + public InstanceEndpoint(Management.Compute.Models.InstanceEndpoint endpoint) + { + Name = endpoint.Name; + Vip = endpoint.VirtualIPAddress.ToString(); + PublicPort = endpoint.Port; + LocalPort = endpoint.LocalPort.GetValueOrDefault(0); + Protocol = endpoint.Protocol; + IdleTimeoutInMinutes = endpoint.IdleTimeoutInMinutes; + } + + public string Name { get; set; } + public string Vip { get; set; } + public int PublicPort { get; set; } + public int LocalPort { get; set; } + public string Protocol { get; set; } + public int? IdleTimeoutInMinutes { get; set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/CloudService/Model/PersistentVMDowntimeInfo.cs b/src/ServiceManagement/Services/Commands.Utilities/CloudService/Model/PersistentVMDowntimeInfo.cs new file mode 100644 index 000000000000..b708dc7dbb29 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/CloudService/Model/PersistentVMDowntimeInfo.cs @@ -0,0 +1,38 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure.Management.Compute.Models; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService.Model +{ + public class PersistentVMDowntimeInfo + { + public PersistentVMDowntimeInfo() + { + + } + + public PersistentVMDowntimeInfo(PersistentVMDowntime persistentVmDowntime) + { + StartTime = persistentVmDowntime.StartTime; + EndTime = persistentVmDowntime.EndTime; + Status = persistentVmDowntime.Status; + } + + public DateTime StartTime { get; set; } + public DateTime EndTime { get; set; } + public string Status { get; set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/CloudService/Model/Role.cs b/src/ServiceManagement/Services/Commands.Utilities/CloudService/Model/Role.cs new file mode 100644 index 000000000000..7b309fde482e --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/CloudService/Model/Role.cs @@ -0,0 +1,41 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService.Model +{ + public class Role + { + private readonly List configurationSets = new List(); + + public Role() + { + } + + public Role(Management.Compute.Models.Role role) + { + RoleName = role.RoleName; + OsVersion = role.OSVersion; + RoleType = role.RoleType; + configurationSets.AddRange(role.ConfigurationSets.Select(cs => new ConfigurationSet(cs))); + } + + public string RoleName { get; set; } + public string OsVersion { get; set; } + public string RoleType { get; set; } + public IList ConfigurationSets { get { return configurationSets; } } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/CloudService/Model/RoleInstance.cs b/src/ServiceManagement/Services/Commands.Utilities/CloudService/Model/RoleInstance.cs new file mode 100644 index 000000000000..26d703e8f080 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/CloudService/Model/RoleInstance.cs @@ -0,0 +1,60 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using System.Net; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService.Model +{ + public class RoleInstance + { + public RoleInstance() + { + InstanceEndpoints = new List(); + } + + public RoleInstance(Management.Compute.Models.RoleInstance roleInstance) + : this() + { + RoleName = roleInstance.RoleName; + InstanceName = roleInstance.InstanceName; + InstanceStatus = roleInstance.InstanceStatus; + InstanceUpgradeDomain = roleInstance.InstanceUpgradeDomain.ToString(); + InstanceFaultDomain = roleInstance.InstanceFaultDomain.ToString(); + InstanceSize = roleInstance.InstanceSize.ToString(); + InstanceStateDetails = roleInstance.InstanceStateDetails; + InstanceErrorCode = roleInstance.InstanceErrorCode; + IPAddress = IPAddress.Parse(roleInstance.IPAddress); + InstanceEndpoints = new List(roleInstance.InstanceEndpoints.Select(ep => new InstanceEndpoint(ep))); + PowerState = roleInstance.PowerState.ToString(); + HostName = roleInstance.HostName; + RemoteAccessCertificateThumbprint = roleInstance.RemoteAccessCertificateThumbprint; + } + + public string RoleName { get; set; } + public string InstanceName { get; set; } + public string InstanceStatus { get; set; } + public string InstanceUpgradeDomain { get; set; } + public string InstanceFaultDomain { get; set; } + public string InstanceSize { get; set; } + public string InstanceStateDetails { get; set; } + public string InstanceErrorCode { get; set; } + public IPAddress IPAddress { get; set; } + public IList InstanceEndpoints { get; private set; } + public string PowerState { get; set; } + public string HostName { get; set; } + public string RemoteAccessCertificateThumbprint { get; set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/CloudService/Model/UpgradeStatus.cs b/src/ServiceManagement/Services/Commands.Utilities/CloudService/Model/UpgradeStatus.cs new file mode 100644 index 000000000000..4fe3d65cd420 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/CloudService/Model/UpgradeStatus.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService.Model +{ + public class UpgradeStatus + { + public UpgradeStatus() + { + + } + + public UpgradeStatus(Management.Compute.Models.UpgradeStatus status) + { + UpgradeType = status.UpgradeType.ToString(); + CurrentUpgradeDomainState = status.CurrentUpgradeDomainState.ToString(); + CurrentUpgradeDomain = status.CurrentUpgradeDomain; + } + + public string UpgradeType { get; set; } + public string CurrentUpgradeDomainState { get; set; } + public int CurrentUpgradeDomain { get; set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/CloudService/Model/VirtualIP.cs b/src/ServiceManagement/Services/Commands.Utilities/CloudService/Model/VirtualIP.cs new file mode 100644 index 000000000000..88d618b26863 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/CloudService/Model/VirtualIP.cs @@ -0,0 +1,33 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Net; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService.Model +{ + public class VirtualIP + { + public VirtualIP() + { + + } + + public VirtualIP(Management.Compute.Models.VirtualIPAddress vip) + { + Address = IPAddress.Parse(vip.Address); + } + + public IPAddress Address { get; set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/CloudService/SetSettings.cs b/src/ServiceManagement/Services/Commands.Utilities/CloudService/SetSettings.cs new file mode 100644 index 000000000000..12004ba30aad --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/CloudService/SetSettings.cs @@ -0,0 +1,32 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService +{ + public class SetSettings : AzurePSCmdlet + { + // Uncomment this to enable global set for settings + //[Parameter(Position = 1, Mandatory = false)] + //[Alias("g")] + public SwitchParameter Global { get; set; } + + internal string GetServiceSettingsPath(bool global) + { + return new CloudServiceProject(CommonUtilities.GetServiceRootPath(CurrentPath()), null).Paths.Settings; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Commands.Utilities.csproj b/src/ServiceManagement/Services/Commands.Utilities/Commands.Utilities.csproj new file mode 100644 index 000000000000..a78596be1433 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Commands.Utilities.csproj @@ -0,0 +1,743 @@ + + + + + Debug + AnyCPU + {4900EC4E-8DEB-4412-9108-0BC52F81D457} + Library + Properties + Microsoft.WindowsAzure.Commands.Utilities + Microsoft.WindowsAzure.Commands.Utilities + v4.5 + 512 + + ..\..\..\ + true + /assemblyCompareMode:StrongNameIgnoringVersion + + + true + full + false + ..\..\..\Package\Debug\ServiceManagement\Azure\Services + DEBUG;TRACE + prompt + 4 + true + true + false + + + ..\..\..\Package\Release\ServiceManagement\Azure\Services + TRACE;SIGN + true + pdbonly + AnyCPU + bin\Release\Management.Utilities.dll.CodeAnalysisLog.xml + true + GlobalSuppressions.cs + prompt + MinimumRecommendedRules.ruleset + ;$(ProgramFiles)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\Rule Sets + ;$(ProgramFiles)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\FxCop\Rules + true + MSSharedLibKey.snk + true + true + false + + + + False + ..\..\..\packages\AutoMapper.3.1.1\lib\net40\AutoMapper.dll + + + False + ..\..\..\packages\AutoMapper.3.1.1\lib\net40\AutoMapper.Net4.dll + + + + + ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll + + + ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll + + + ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll + + + ..\..\..\packages\WindowsAzure.ServiceBus.2.3.2.0\lib\net40-full\Microsoft.ServiceBus.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + False + ..\..\..\lib\Microsoft.Web.Deployment.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.2.1.0\lib\net40\Microsoft.WindowsAzure.Management.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.6.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.ExpressRoute.0.11.2-preview\lib\net40\Microsoft.WindowsAzure.Management.ExpressRoute.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.MediaServices.1.2.0\lib\net40\Microsoft.WindowsAzure.Management.MediaServices.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Network.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Scheduler.3.0.2\lib\net40\Microsoft.WindowsAzure.Management.Scheduler.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.Management.ServiceBus.0.15.0-preview\lib\net40\Microsoft.WindowsAzure.Management.ServiceBus.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.3.1.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Store.0.11.0-preview\lib\net40\Microsoft.WindowsAzure.Management.Store.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.TrafficManager.0.11.0-preview\lib\net40\Microsoft.WindowsAzure.Management.TrafficManager.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.VirtualNetworks.0.9.9-preview\lib\net40\Microsoft.WindowsAzure.Management.VirtualNetworks.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.WebSites.4.0.1-prerelease\lib\net40\Microsoft.WindowsAzure.Management.WebSites.dll + + + False + ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll + + + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + True + + + + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + + + ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + True + Resources.resx + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + True + Reference.datasvcmap + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AutoMapper.Net4.dll + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + Designer + PreserveNewest + + + Designer + PreserveNewest + + + MSBuild:Compile + Designer + PreserveNewest + + + PreserveNewest + + + Designer + PreserveNewest + + + Designer + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + Designer + PreserveNewest + + + PreserveNewest + + + Designer + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + Designer + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + Designer + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + Designer + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + Designer + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + DataServicesCoreClientGenerator + Reference.cs + + + Designer + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + Designer + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + Designer + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + PreserveNewest + + + + + + + + datasvcmap + + + + + PublicResXFileCodeGenerator + Designer + Resources.Designer.cs + + + + + {65c3a86a-716d-4e7d-ab67-1db00b3bf72d} + Commands.Common.Storage + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + {c60342b1-47d3-4a0e-8081-9b97ce60b7af} + Commands.Profile + + + + + + powershell.exe -ExecutionPolicy Unrestricted -File "$(ProjectDir)\PostBuild.ps1" "$(TargetDir)\" + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/AzureBlob.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/AzureBlob.cs new file mode 100644 index 000000000000..7ff364a90b36 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/AzureBlob.cs @@ -0,0 +1,56 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure.Management.Storage; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common +{ + public static class AzureBlob + { + private static CloudBlobUtility cloudBlobUtility = new CloudBlobUtility(); + + public static Uri UploadPackageToBlob( + StorageManagementClient storageClient, + string storageName, + string packagePath, + BlobRequestOptions blobRequestOptions) + { + return cloudBlobUtility.UploadPackageToBlob( + storageClient, + storageName, + packagePath, + blobRequestOptions); + } + + public static void DeletePackageFromBlob( + StorageManagementClient storageClient, + string storageName, + Uri packageUri) + { + cloudBlobUtility.DeletePackageFromBlob(storageClient, storageName, packageUri); + } + + public static Uri UploadFile( + string storageName, + Uri blobEndpointUri, + string storageKey, + string filePath, + BlobRequestOptions blobRequestOptions) + { + return cloudBlobUtility.UploadFile(storageName, blobEndpointUri, storageKey, filePath, blobRequestOptions); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/AzureTools/AzureTool.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/AzureTools/AzureTool.cs new file mode 100644 index 000000000000..24be5e295970 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/AzureTools/AzureTool.cs @@ -0,0 +1,125 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Diagnostics; +using System.IO; +using System.Linq; +using Microsoft.Win32; +using Microsoft.WindowsAzure.Commands.Common.Properties; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService.AzureTools +{ + public class AzureTool + { + public static void Validate() + { + // This instantiation will throw if user is running with incompatible Microsoft Azure SDK version. + GetAzureSdkBinDirectory(); + GetComputeEmulatorDirectory(); + } + + public static bool IgnoreMissingSDKError { get; set; } + + public static string GetAzureSdkVersion() + { + string versionKeyValue = GetSdkVersionRegistryValue(); + + Debug.Assert(versionKeyValue.StartsWith("v", StringComparison.OrdinalIgnoreCase), "Unexpected SDK version registry value"); + string version = versionKeyValue.Remove(0, 1); + + // Add build version if it does not exist. For example, if the version is 1.7 + // this code changes it to be 1.7.0 + if (version.Split('.').Length == 2) + { + version = version + ".0"; + } + return version; + } + + public static string GetAzureSdkBinDirectory() + { + string versionKeyValue = GetSdkVersionRegistryValue(); + string keyName = Path.Combine(Resources.AzureSdkRegistryKeyName, versionKeyValue); + string sdkDirectory = (string)Registry.GetValue(Path.Combine(Registry.LocalMachine.Name, keyName), Resources.AzureSdkInstallPathRegistryKeyValue, null); + return Path.Combine(sdkDirectory, Resources.RoleBinFolderName); + } + + public static string GetComputeEmulatorDirectory() + { + var emulatorPath = Registry.GetValue(Path.Combine(Registry.LocalMachine.Name, Resources.AzureEmulatorRegistryKey), Resources.AzureSdkInstallPathRegistryKeyValue, null); + if (emulatorPath == null) + { + throw new Exception(Resources.AzureEmulatorNotInstalledMessage); + } + return Path.Combine((string)emulatorPath, Resources.AzureEmulatorDirectory); + } + + public static string GetStorageEmulatorDirectory() + { + string installDirectory = string.Empty; + using (RegistryKey storageEmulatorKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32) + .OpenSubKey(Resources.StorageEmulatorRegistryKey)) + { + if (storageEmulatorKey != null) + { + installDirectory = (string)storageEmulatorKey.GetValue(Resources.StorageEmulatorInstallPathRegistryKeyValue, string.Empty); + } + } + return installDirectory; + } + + private static string GetSdkVersionRegistryValue() + { + string version = string.Empty; + string min = Resources.MinSupportAzureSdkVersion; + string max = Resources.MaxSupportAzureSdkVersion; + try + { + using (RegistryKey key = Registry.LocalMachine.OpenSubKey(Resources.AzureSdkRegistryKeyName)) + { + if (key == null) + { + throw new InvalidOperationException(Resources.AzureToolsNotInstalledMessage); + } + version = key.GetSubKeyNames() + .Where(n => (n.CompareTo(min) == 1 && n.CompareTo(max) == -1) || n.CompareTo(min) == 0 || n.CompareTo(max) == 0) + .Max(); + + if (string.IsNullOrEmpty(version) && key.GetSubKeyNames().Length > 0) + { + throw new InvalidOperationException(string.Format(Resources.AzureSdkVersionNotSupported, min, max)); + } + else if (string.IsNullOrEmpty(version) && key.GetSubKeyNames().Length == 0) + { + throw new InvalidOperationException(Resources.AzureToolsNotInstalledMessage); + } + } + } + catch (InvalidOperationException) + { + //temporary workaround: catch exception and fall back to v2.5 + if (IgnoreMissingSDKError) + { + version = "v2.5"; + } + else + { + throw; + } + } + return version; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/AzureTools/CsEncrypt.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/AzureTools/CsEncrypt.cs new file mode 100644 index 000000000000..098f855009a7 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/AzureTools/CsEncrypt.cs @@ -0,0 +1,57 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Diagnostics; +using System.IO; +using System.Security.Permissions; +using System.Text.RegularExpressions; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService.AzureTools +{ + public class CsEncrypt + { + private string _toolPath = null; + + public CsEncrypt(string azureSdkBinDirectory) + { + _toolPath = Path.Combine(azureSdkBinDirectory, Resources.CsEncryptExe); + } + + [PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")] + public string CreateCertificate() + { + string standardOutput = null; + string standardError = null; + Execute(Resources.CsEncryptCreateCertificateArg, out standardOutput, out standardError); + + Match match = Regex.Match(standardOutput, @"^Thumbprint\s*:\s*(.*)$", RegexOptions.Multiline); + if (!match.Success || match.Groups.Count <= 0) + { + throw new InvalidOperationException(string.Format(Resources.CsEncrypt_CreateCertificate_CreationFailed, standardError)); + } + + return match.Groups[1].Value; + } + + [PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")] + private void Execute(string arguments, out string standardOutput, out string standardError) + { + ProcessStartInfo pi = new ProcessStartInfo(_toolPath, arguments); + ProcessHelper.StartAndWaitForProcess(pi, out standardOutput, out standardError); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/AzureTools/CsPack.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/AzureTools/CsPack.cs new file mode 100644 index 000000000000..5ac3c6ec6c3d --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/AzureTools/CsPack.cs @@ -0,0 +1,203 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService.AzureTools +{ + /// + /// Package services for deployment to Azure. + /// + public class CsPack + { + //test seam + public ProcessHelper ProcessUtil { get; set; } + + /// + /// Create a .cspkg package by calling the CsPack.exe tool. + /// + /// Service definition + /// Path to the service definition + /// Deployment type + /// Standard output + /// Standard error + [PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")] + public void CreatePackage(ServiceDefinition definition, + CloudProjectPathInfo paths, + DevEnv type, + string azureSdkBinDirectory, + out string standardOutput, + out string standardError) + { + if (definition == null) + { + throw new ArgumentNullException( + "definition", + string.Format(Resources.InvalidOrEmptyArgumentMessage, "Service definition")); + } + if (string.IsNullOrEmpty(paths.RootPath)) + { + throw new ArgumentException(Resources.InvalidRootNameMessage, "rootPath"); + } + + // Track the directories that are created by GetOrCreateCleanPath + // to avoid publishing iisnode log files so we can delete the temp + // copies when we're finished packaging + Dictionary tempDirectories = new Dictionary(); + try + { + string roles = + // Get the names of all web and worker roles + Enumerable.Concat( + definition.WebRole.NonNull().Select(role => role.name), + definition.WorkerRole.NonNull().Select(role => role.name)) + // Get the name and safe path for each role (i.e., if the + // role has files that shouldn't be packaged, it'll be + // copied to a temp location without those files) + .Select(name => GetOrCreateCleanPath(paths.RolesPath, name, tempDirectories, type)) + // Format the role name and path as a role argument + .Select(nameAndPath => string.Format(Resources.RoleArgTemplate, nameAndPath.Key, nameAndPath.Value)) + // Join all the role arguments together into one + .DefaultIfEmpty(string.Empty) + .Aggregate(string.Concat); + + string sites = + // Get all of the web roles + definition.WebRole.NonNull() + // Get all the sites in each role and format them all as + // site arguments + .SelectMany(role => + // Format each site as a site argument + role.Sites.Site.Select(site => + string.Format( + Resources.SitesArgTemplate, + role.name, + site.name, + tempDirectories.GetValueOrDefault(role.name, paths.RolesPath)))) + // Join all the site arguments together into one + .DefaultIfEmpty(string.Empty) + .Aggregate(string.Concat); + + string args = string.Format( + type == DevEnv.Local ? Resources.CsPackLocalArg : Resources.CsPackCloudArg, + paths.RootPath, + roles, + sites); + + if (ProcessUtil == null) + { + ProcessUtil = new ProcessHelper(); + } + // Run CsPack to generate the package + ProcessUtil.StartAndWaitForProcess(Path.Combine(azureSdkBinDirectory, Resources.CsPackExe), args); + standardOutput = ProcessUtil.StandardOutput; + standardError = ProcessUtil.StandardError; + standardError = GetRightError(standardOutput, standardError, ProcessUtil.ExitCode); + } + finally + { + // Cleanup any temp directories + tempDirectories.Values.ForEach(dir => Directory.Delete(dir, true)); + } + } + + private static string GetRightError(string standardOutput, string standardError, int processExitCode) + { + if (processExitCode != 0 && string.IsNullOrWhiteSpace(standardError)) + { + if (!string.IsNullOrWhiteSpace(standardOutput)) + { + standardError = standardOutput; + } + else + { + standardError = Resources.CsPackExeGenericFailure; + } + } + return standardError; + } + /// + /// Get or create a path to the role. This is used to sanitize the + /// contents of a role before it's packaged if it contains files that + /// shouldn't be packaged. We copy the contents to a temp directory, + /// delete the offending files, and use the temp directory for + /// packaging. The temp directories are collected in the + /// tempDirectories list so they can be cleaned up when packaging is + /// complete. + /// + /// + /// This is a temporary workaround to prevent node logging information + /// from being packaged and deployed with production applications. + /// This method should be removed when we have a proper fix to bug + /// https://github.com/WindowsAzure/azure-sdk-tools/issues/111 + /// + /// The root path. + /// Name of the role. + /// + /// A collection of temporary directories that have been created to + /// remove files that should not be published. This will be added to + /// by GetOrCreateCleanPath if a new directory is created that should + /// be cleaned up once the package has been generated. + /// + /// + /// A pair containing the path to the role and the name of the role. + /// + private static KeyValuePair GetOrCreateCleanPath(string root, string name, Dictionary tempDirectories, DevEnv type) + { + string path = Path.Combine(root, name); + + // Check if the role has any "*.logs" directories that iisnode may + // have left during emulation + if (type == DevEnv.Local || GetLogDirectories(path).Length == 0) + { + return new KeyValuePair(name, root); + } + else + { + // Create a temporary directory + string tempPath = FileUtilities.CreateTempDirectory(); + tempDirectories[name] = tempPath; + + // Copy the role's directory to the temp directory + string newPath = Path.Combine(tempPath, name); + FileUtilities.CopyDirectory(Path.Combine(root, name), newPath); + + // Remove the offending files + GetLogDirectories(newPath) + .ForEach(dir => Directory.Delete(dir, true)); + + return new KeyValuePair(name, tempPath); + } + } + + /// + /// Get the paths for any iisnode log directories under a given path. + /// + /// The path to search. + /// Paths to any log directories. + private static string[] GetLogDirectories(string path) + { + return Directory.GetDirectories(path, "*.logs", SearchOption.AllDirectories); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/AzureTools/CsRun.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/AzureTools/CsRun.cs new file mode 100644 index 000000000000..707b0c247c0d --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/AzureTools/CsRun.cs @@ -0,0 +1,154 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService.AzureTools +{ + public class CsRun + { + private string _csrunPath; + + private string _standardOutput; + + public string RoleInformation { get; private set; } + public int DeploymentId { get; private set; } + + public CsRun(string emulatorDirectory) + { + _csrunPath = Path.Combine(emulatorDirectory, Resources.CsRunExe); + } + + // a test seam used for unit testing this class + internal ProcessHelper CommandRunner { get; set; } + /// + /// Deploys package on local machine. This method does following: + /// 1. Starts compute emulator. + /// 2. Remove all previous deployments in the emulator. + /// 3. Deploys the package on local machine. + /// + /// Path to package which will be deployed + /// Local configuration path to used with the package + /// Switch which opens browser for web roles after deployment + /// Emulator mode: Full or Express + /// Standard output of deployment + /// Standard error of deployment + /// Deployment id associated with the deployment + public int StartEmulator(string packagePath, + string configPath, + bool launch, + ComputeEmulatorMode mode) + { + RoleInformation = string.Empty; + + // Starts compute emulator. + StartComputeEmulator(mode); + + // Remove all previous deployments in the emulator. + RemoveAllDeployments(); + + // Deploys the package on local machine. + string arguments = string.Format(Resources.RunInEmulatorArguments, packagePath, configPath, (launch) ? Resources.CsRunLanuchBrowserArg : string.Empty); + StartCsRunProcess(mode, arguments); + + DeploymentId = GetDeploymentCount(_standardOutput); + RoleInformation = GetRoleInfoMessage(_standardOutput); + + return DeploymentId; + } + + public void StopComputeEmulator() + { + StartCsRunProcess(Resources.CsRunStopEmulatorArg); + } + + public void RemoveAllDeployments() + { + StartCsRunProcess(Resources.CsRunRemoveAllDeploymentsArg); + } + + private void StartComputeEmulator(ComputeEmulatorMode mode) + { + StartCsRunProcess(mode, Resources.CsRunStartComputeEmulatorArg); + } + + private void StartCsRunProcess(string arguments) + { + ProcessHelper runner = GetCommandRunner(); + runner.StartAndWaitForProcess(_csrunPath, arguments); + _standardOutput = runner.StandardOutput; + string standardError = runner.StandardError; + // If there's an error from the CsRun tool, we want to display that + // error message. + if (!string.IsNullOrEmpty(standardError)) + { + throw new InvalidOperationException(string.Format(Resources.CsRun_StartCsRunProcess_UnexpectedFailure, standardError)); + } + } + + private void StartCsRunProcess(ComputeEmulatorMode mode, string arguments) + { + if (mode == ComputeEmulatorMode.Full) + { + arguments += " " + Resources.CsRunFullEmulatorArg; + } + StartCsRunProcess(arguments); + } + + private ProcessHelper GetCommandRunner() + { + if (CommandRunner == null) + { + CommandRunner = new ProcessHelper(); + } + return CommandRunner; + } + + private int GetDeploymentCount(string text) + { + //Parse output, like 'Created: deployment23(55)', and extract the deployment ID of '55' + Regex deploymentRegex = new Regex(@"deployment\d+\((?\d+)\)", RegexOptions.Multiline); + int value = -1; + + Match match = deploymentRegex.Match(text); + + if (match.Success) + { + string digits = match.Groups["Number"].Value; + int.TryParse(digits, out value); + } + + return value; + } + + public static string GetRoleInfoMessage(string emulatorOutput) + { + var regex = new Regex(@"(?(http|tcp)://[\d.]+:\d+/?)"); + var match = regex.Match(emulatorOutput); + var builder = new StringBuilder(); + while (match.Success) + { + builder.AppendLine(string.Format(Resources.EmulatorRoleRunningMessage, match.Groups["RoleUrl"].Value)); + match = match.NextMatch(); + } + var roleInfo = builder.ToString(); + return roleInfo; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/AzureTools/StorageEmulator.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/AzureTools/StorageEmulator.cs new file mode 100644 index 000000000000..6bd820c29433 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/AzureTools/StorageEmulator.cs @@ -0,0 +1,76 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService.AzureTools +{ + public class StorageEmulator + { + private string emulatorPath = string.Empty; + private bool storageEmulatorInstalled = false; + + public StorageEmulator(string emulatorDirectory) + { + if (!string.IsNullOrEmpty(emulatorDirectory)) + { + storageEmulatorInstalled = true; + emulatorPath = Path.Combine(emulatorDirectory, Resources.StorageEmulatorExe); + } + } + + public string Error { get; private set; } + + internal ProcessHelper CommandRunner { get; set; } + + public void Start() + { + if (storageEmulatorInstalled) + { + ProcessHelper runner = GetCommandRunner(); + runner.StartAndWaitForProcess(emulatorPath, Resources.StartStorageEmulatorCommandArgument); + Error = CommandRunner.StandardError; + } + else + { + Error = Resources.WarningWhenStorageEmulatorIsMissing; + } + } + + public void Stop() + { + if (storageEmulatorInstalled) + { + ProcessHelper runner = GetCommandRunner(); + runner.StartAndWaitForProcess(emulatorPath, Resources.StopStorageEmulatorCommandArgument); + Error = CommandRunner.StandardError; + } + else + { + Error = string.Empty; + } + } + + private ProcessHelper GetCommandRunner() + { + if (CommandRunner == null) + { + CommandRunner = new ProcessHelper(); + } + return CommandRunner; + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/CloudBlobUtility.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/CloudBlobUtility.cs new file mode 100644 index 000000000000..a0f0a0d1b3b1 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/CloudBlobUtility.cs @@ -0,0 +1,95 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.IO; +using Microsoft.WindowsAzure.Management.Storage; +using Microsoft.WindowsAzure.Management.Storage.Models; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Auth; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common +{ + public class CloudBlobUtility + { + private const string BlobEndpointIdentifier = ".blob."; + private const string ContainerName = "mydeployments"; + + public virtual void DeletePackageFromBlob( + StorageManagementClient storageClient, + string storageName, + Uri packageUri) + { + StorageAccountGetKeysResponse keys = storageClient.StorageAccounts.GetKeys(storageName); + string storageKey = keys.PrimaryKey; + var storageService = storageClient.StorageAccounts.Get(storageName); + var blobStorageEndpoint = storageService.StorageAccount.Properties.Endpoints[0]; + var credentials = new StorageCredentials(storageName, storageKey); + var client = new CloudBlobClient(blobStorageEndpoint, credentials); + ICloudBlob blob = client.GetBlobReferenceFromServer(packageUri); + blob.DeleteIfExists(); + } + + public virtual Uri UploadFile( + string storageName, + Uri blobEndpointUri, + string storageKey, + string filePath, + BlobRequestOptions blobRequestOptions) + { + StorageCredentials credentials = new StorageCredentials(storageName, storageKey); + CloudBlobClient client = new CloudBlobClient(blobEndpointUri, credentials); + string blobName = string.Format( + CultureInfo.InvariantCulture, + "{0}_{1}", + DateTime.UtcNow.ToString("yyyyMMdd_HHmmss", CultureInfo.InvariantCulture), + Path.GetFileName(filePath)); + + CloudBlobContainer container = client.GetContainerReference(ContainerName); + container.CreateIfNotExists(); + CloudBlockBlob blob = container.GetBlockBlobReference(blobName); + + BlobRequestOptions uploadRequestOption = blobRequestOptions ?? new BlobRequestOptions(); + + if (!uploadRequestOption.ServerTimeout.HasValue) + { + uploadRequestOption.ServerTimeout = TimeSpan.FromMinutes(300); + } + + using (FileStream readStream = File.OpenRead(filePath)) + { + blob.UploadFromStream(readStream, AccessCondition.GenerateEmptyCondition(), uploadRequestOption); + } + + return new Uri(string.Format(CultureInfo.InvariantCulture, "{0}{1}{2}{3}", client.BaseUri, ContainerName, client.DefaultDelimiter, blobName)); + } + + public virtual Uri UploadPackageToBlob( + StorageManagementClient storageClient, + string storageName, + string packagePath, + BlobRequestOptions blobRequestOptions) + { + StorageAccountGetKeysResponse keys = storageClient.StorageAccounts.GetKeys(storageName); + string storageKey = keys.PrimaryKey; + var storageService = storageClient.StorageAccounts.Get(storageName); + Uri blobEndpointUri = storageService.StorageAccount.Properties.Endpoints[0]; + return UploadFile(storageName, + GeneralUtilities.CreateHttpsEndpoint(blobEndpointUri.ToString()), + storageKey, packagePath, blobRequestOptions); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/CloudRuntime.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/CloudRuntime.cs new file mode 100644 index 000000000000..f21e0f7f0910 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/CloudRuntime.cs @@ -0,0 +1,645 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Diagnostics; +using System.IO; +using System.Linq; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService.AzureTools; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService +{ + public abstract class CloudRuntime + { + public CloudServiceProject CloudServiceProject { get; set; } + + public string Version + { + get; + protected set; + } + + public RuntimeType Runtime + { + get; + protected set; + } + + public string FilePath + { + get; + set; + } + + public string RoleName + { + get; + set; + } + + public bool ShouldPrompt + { + get; + private set; + } + + protected CloudRuntime() + { + } + + /// + /// Gets the runtime startup task regardless of its order in the startup tasks. + /// + /// The role startup tasks + /// The runtime startup task + public static Task GetRuntimeStartupTask(Startup roleStartup) + { + if (roleStartup.Task != null) + { + return roleStartup.Task.FirstOrDefault(t => + t.commandLine.Equals(Resources.WebRoleStartupTaskCommandLine) + || t.commandLine.Equals(Resources.WorkerRoleStartupTaskCommandLine)); + } + + return null; + } + + private static CloudRuntime CreateRuntimeInternal(RuntimeType runtimeType, string roleName, string rolePath) + { + CloudRuntime runtime; + switch (runtimeType) + { + case RuntimeType.Null: + runtime = new NullCloudRuntime(); + break; + case RuntimeType.Cache: + runtime = new CacheCloudRuntime(); + break; + case RuntimeType.PHP: + runtime = new PHPCloudRuntime(); + break; + case RuntimeType.IISNode: + runtime = new IISNodeCloudRuntime(); + break; + case RuntimeType.Node: + default: + runtime = new NodeCloudRuntime(); + break; + } + + runtime.Runtime = runtimeType; + runtime.RoleName = roleName; + runtime.FilePath = rolePath; + return runtime; + } + + private static Collection GetRuntimes(Dictionary settings, + string roleName, string rolePath) + { + Collection runtimes = new Collection(new List()); + foreach (RuntimeType runtimeType in GetRuntimeTypes(settings)) + { + CloudRuntime runtime = CreateRuntimeInternal(runtimeType, roleName, rolePath); + runtime.Configure(settings); + runtimes.Add(runtime); + } + + return runtimes; + } + + public static CloudRuntime CreateCloudRuntime(string runtimeType, string runtimeVersion, string roleName, string rolePath) + { + CloudRuntime runtime = CreateRuntimeInternal(GetRuntimeByType(runtimeType), roleName, rolePath); + runtime.Version = runtimeVersion; + return runtime; + } + + public static RuntimeType GetRuntimeByType(string runtimeType) + { + if (string.Equals(runtimeType, Resources.PhpRuntimeValue, StringComparison.OrdinalIgnoreCase)) + { + return RuntimeType.PHP; + } + else if (string.Equals(runtimeType, Resources.IISNodeRuntimeValue, StringComparison.OrdinalIgnoreCase)) + { + return RuntimeType.IISNode; + } + else if (string.Equals(runtimeType, Resources.NodeRuntimeValue, StringComparison.OrdinalIgnoreCase)) + { + return RuntimeType.Node; + } + else if (string.Equals(runtimeType, Resources.CacheRuntimeValue, StringComparison.OrdinalIgnoreCase)) + { + return RuntimeType.Cache; + } + else + { + return RuntimeType.Null; + } + } + + public static Collection CreateRuntime(WebRole webRole, string rolePath) + { + return GetRuntimes(GetStartupEnvironment(webRole), webRole.name, rolePath); + } + + public static Collection CreateRuntime(WorkerRole workerRole, string rolePath) + { + return GetRuntimes(GetStartupEnvironment(workerRole), workerRole.name, rolePath); + } + + private static Collection GetRuntimeTypes(Dictionary environmentSettings) + { + Collection runtimes = new Collection(); + if (environmentSettings.ContainsKey(Resources.RuntimeOverrideKey) && !string.IsNullOrEmpty(environmentSettings[Resources.RuntimeOverrideKey])) + { + runtimes.Add(RuntimeType.Null); + } + else if (environmentSettings.ContainsKey(Resources.RuntimeTypeKey) && !string.IsNullOrEmpty(environmentSettings[Resources.RuntimeTypeKey])) + { + foreach (string runtimeSpec in environmentSettings[Resources.RuntimeTypeKey].Split(';')) + { + if (string.Equals(runtimeSpec, Resources.NodeRuntimeValue, StringComparison.OrdinalIgnoreCase)) + { + runtimes.Add(RuntimeType.Node); + } + else if (string.Equals(runtimeSpec, Resources.IISNodeRuntimeValue, StringComparison.OrdinalIgnoreCase)) + { + runtimes.Add(RuntimeType.IISNode); + } + else if (string.Equals(runtimeSpec, Resources.PhpRuntimeValue, StringComparison.OrdinalIgnoreCase)) + { + runtimes.Add(RuntimeType.PHP); + } + else if (string.Equals(runtimeSpec, Resources.CacheRuntimeValue, StringComparison.OrdinalIgnoreCase)) + { + runtimes.Add(RuntimeType.Cache); + } + } + } + + return runtimes; + } + + private static Dictionary GetStartupEnvironment(WebRole webRole) + { + Dictionary settings = new Dictionary(); + foreach (Variable variable in GetRuntimeStartupTask(webRole.Startup).Environment) + { + settings[variable.name] = variable.value; + } + + return settings; + } + + private static Dictionary GetStartupEnvironment(WorkerRole workerRole) + { + Dictionary settings = new Dictionary(); + foreach (Variable variable in GetRuntimeStartupTask(workerRole.Startup).Environment) + { + settings[variable.name] = variable.value; + } + + return settings; + } + + /// + /// Determine if this is a variable that should be set directly or should be merged with the new value + /// + /// + /// True if the variable should be merged, false if the value should be replaced instead + private static bool ShouldMerge(Variable variableToCheck) + { + return string.Equals(variableToCheck.name, Resources.RuntimeTypeKey, + StringComparison.OrdinalIgnoreCase) || string.Equals(variableToCheck.name, + Resources.RuntimeUrlKey, StringComparison.OrdinalIgnoreCase); + } + + /// + /// Set the variable value given a new value. Replace or add the value to the variable, as appropriate + /// + /// The variable to change + /// The new value to + private static void SetVariableValue(Variable inVariable, string addedValue) + { + if (!string.IsNullOrEmpty(inVariable.value) && ShouldMerge(inVariable)) + { + if (inVariable.value.IndexOf(addedValue, 0, inVariable.value.Length, StringComparison.OrdinalIgnoreCase) == -1) + { + inVariable.value = string.Concat(inVariable.value, ";", addedValue); + } + } + else + { + inVariable.value = addedValue; + } + } + + private static Variable[] ApplySettingChanges(Dictionary settings, Variable[] roleVariables) + { + int roleVariableCount = (roleVariables == null ? 0 : roleVariables.Length); + if (roleVariableCount > 0) + { + for (int j = 0; j < roleVariables.Length; ++j) + { + if (settings.ContainsKey(roleVariables[j].name)) + { + SetVariableValue(roleVariables[j], settings[roleVariables[j].name]); + settings.Remove(roleVariables[j].name); + } + } + } + + int settingsCount = (settings == null ? 0 : settings.Count); + Variable[] newSettings = new Variable[settingsCount + roleVariableCount]; + int i = 0; + foreach (string key in settings.Keys) + { + newSettings[i] = new Variable { name = key, value = settings[key] }; + ++i; + } + + for (int j = 0; j < roleVariables.Length; ++j) + { + newSettings[i + j] = roleVariables[j]; + } + + return newSettings; + } + + private static void ApplyRoleXmlChanges(Dictionary changes, WebRole webRole) + { + GetRuntimeStartupTask(webRole.Startup).Environment = ApplySettingChanges(changes, GetRuntimeStartupTask(webRole.Startup).Environment); + } + + private static void ApplyRoleXmlChanges(Dictionary changes, WorkerRole workerRole) + { + GetRuntimeStartupTask(workerRole.Startup).Environment = ApplySettingChanges(changes, GetRuntimeStartupTask(workerRole.Startup).Environment); + } + + public static void ClearRuntime(WebRole role) + { + Task startupTask = GetRuntimeStartupTask(role.Startup); + if (startupTask != null) + { + ClearEnvironmentValue(startupTask.Environment, Resources.RuntimeUrlKey); + ClearEnvironmentValue(startupTask.Environment, Resources.CacheRuntimeUrl); + } + } + + public static void ClearRuntime(WorkerRole role) + { + Task startupTask = GetRuntimeStartupTask(role.Startup); + if (startupTask != null) + { + ClearEnvironmentValue(startupTask.Environment, Resources.RuntimeUrlKey); + ClearEnvironmentValue(startupTask.Environment, Resources.CacheRuntimeUrl); + } + } + + static void ClearEnvironmentValue(Variable[] environment, string key) + { + foreach (Variable variable in environment) + { + if (string.Equals(key, variable.name, StringComparison.OrdinalIgnoreCase)) + { + variable.value = ""; + } + } + } + + public virtual void ApplyRuntime(CloudRuntimePackage package, WebRole webRole) + { + Dictionary changes; + if (this.GetChanges(package, out changes)) + { + ApplyRoleXmlChanges(changes, webRole); + } + + ApplyScaffoldingChanges(package); + } + + public virtual void ApplyRuntime(CloudRuntimePackage package, WorkerRole workerRole) + { + Dictionary changes; + if (this.GetChanges(package, out changes)) + { + ApplyRoleXmlChanges(changes, workerRole); + } + + ApplyScaffoldingChanges(package); + } + + protected virtual void ApplyScaffoldingChanges(CloudRuntimePackage package) + { + + } + + public abstract bool Match(CloudRuntimePackage runtime); + + public virtual bool ValidateMatch(CloudRuntimePackage runtime, out string warningText) + { + warningText = null; + bool result = this.Match(runtime); + if (!result) + { + warningText = this.GenerateWarningText(runtime); + } + + return result; + } + + protected abstract void Configure(Dictionary environment); + + protected abstract string GenerateWarningText(CloudRuntimePackage package); + + protected virtual bool GetChanges(CloudRuntimePackage package, out Dictionary changes) + { + changes = new Dictionary(); + changes[Resources.RuntimeTypeKey] = package.Runtime.ToString().ToLower(); + changes[Resources.RuntimeUrlKey] = package.PackageUri.ToString(); + return true; + } + + private class IISNodeCloudRuntime : JavaScriptCloudRuntime + { + + public override bool Match(CloudRuntimePackage runtime) + { + // here is where we would put in semver semantics + return string.Equals(this.Version, runtime.Version, StringComparison.OrdinalIgnoreCase); + } + + protected override string GetEngineKey() + { + return Resources.IISNodeEngineKey; + } + + protected override string GetDefaultVersion() + { + string fileVersion = Resources.DefaultFileVersion; + string iisnodePath = Path.Combine(GetProgramFilesDirectoryPathx86(), Path.Combine(Resources.IISNodePath, Resources.IISNodeDll)); + if (File.Exists(iisnodePath)) + { + fileVersion = GetFileVersion(iisnodePath); + } + + return fileVersion; + } + + protected override string GenerateWarningText(CloudRuntimePackage package) + { + return string.Format(Resources.IISNodeVersionWarningText, package.Version, + this.RoleName, this.Version); + } + } + + abstract class JavaScriptCloudRuntime : CloudRuntime + { + protected override void Configure(Dictionary environment) + { + if (string.IsNullOrEmpty(this.Version)) + { + string version; + if (!TryGetVersionFromPackageJson(GetEngineKey(), out version)) + { + version = GetDefaultVersion(); + } + + this.Version = version; + } + } + + protected abstract string GetDefaultVersion(); + protected abstract string GetEngineKey(); + + protected virtual bool TryGetVersionFromPackageJson(string engineKey, out string version) + { + version = null; + JavaScriptPackageHelpers.EnsurePackageJsonExists(this.FilePath, this.RoleName); + return JavaScriptPackageHelpers.TryGetEngineVersion(this.FilePath, engineKey, out version); + } + + public override bool Match(CloudRuntimePackage runtime) + { + // here is where we would put in semver semantics + return string.Equals(this.Version, runtime.Version, StringComparison.OrdinalIgnoreCase); + } + + protected static string GetFileVersion(string filePath) + { + return FileVersionInfo.GetVersionInfo(filePath).ProductVersion; + } + + protected static string GetProgramFilesDirectoryPathx86() + { + string returnPath = Environment.GetEnvironmentVariable("ProgramFiles(x86)"); + if (string.IsNullOrEmpty(returnPath)) + { + returnPath = GetProgramFilesDirectory(); + } + + return returnPath; + } + + protected static string GetProgramFilesDirectory() + { + return Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles); + } + + protected override void ApplyScaffoldingChanges(CloudRuntimePackage package) + { + JavaScriptPackageHelpers.EnsurePackageJsonExists(this.FilePath, this.RoleName); + JavaScriptPackageHelpers.TrySetEngineVersion(this.FilePath, GetEngineKey(), package.Version); + } + } + + private class NodeCloudRuntime : JavaScriptCloudRuntime + { + protected override string GetEngineKey() + { + return Resources.NodeEngineKey; + } + + protected override string GenerateWarningText(CloudRuntimePackage package) + { + return string.Format(Resources.NodeVersionWarningText, package.Version, + this.RoleName, this.Version); + } + + protected override string GetDefaultVersion() + { + string fileVersion = Resources.DefaultFileVersion; + string nodePath = Path.Combine(GetProgramFilesDirectoryPathx86(), Path.Combine(Resources.NodeDirectory, Resources.NodeExe)); + if (!File.Exists(nodePath)) + { + nodePath = Path.Combine(GetProgramFilesDirectory(), Path.Combine(Resources.NodeDirectory, Resources.NodeExe)); + } + if (File.Exists(nodePath)) + { + fileVersion = GetFileVersion(nodePath); + } + + return fileVersion; + } + } + + private class PHPCloudRuntime : CloudRuntime + { + protected override void Configure(Dictionary environment) + { + this.Runtime = RuntimeType.PHP; + + if (string.IsNullOrEmpty(this.Version)) + { + string version = Resources.PHPDefaultRuntimeVersion; + environment.TryGetValue(Resources.RuntimeVersionPrimaryKey, out version); + this.Version = version; + } + } + + public override bool Match(CloudRuntimePackage runtime) + { + return this.Version.Equals(runtime.Version, StringComparison.OrdinalIgnoreCase); + } + + protected override string GenerateWarningText(CloudRuntimePackage package) + { + return string.Format(Resources.PHPVersionWarningText, package.Version, this.RoleName, + this.Version); + } + + protected override bool GetChanges(CloudRuntimePackage package, out Dictionary changes) + { + bool succeed = base.GetChanges(package, out changes); + changes[Resources.RuntimeVersionPrimaryKey] = package.Version; + return succeed; + } + + protected override void ApplyScaffoldingChanges(CloudRuntimePackage package) + { + + } + } + + private class CacheCloudRuntime : CloudRuntime + { + protected override void Configure(Dictionary environment) + { + if (string.IsNullOrEmpty(this.Version)) + { + string version; + if (!environment.TryGetValue(Resources.CacheRuntimeVersionKey, out version)) + { + version = AzureTool.GetAzureSdkVersion(); + } + + this.Version = version; + } + } + + public override bool Match(CloudRuntimePackage runtime) + { + return this.Version.Equals(runtime.Version, StringComparison.OrdinalIgnoreCase); + } + + protected override string GenerateWarningText(CloudRuntimePackage package) + { + return string.Format(Resources.CacheVersionWarningText, package.Version, this.RoleName, + this.Version); + } + + protected override bool GetChanges(CloudRuntimePackage package, out Dictionary changes) + { + base.GetChanges(package, out changes); + + Debug.Assert(changes.ContainsKey(Resources.RuntimeTypeKey), "Cache runtime should be added before calling this method"); + Debug.Assert(changes.ContainsKey(Resources.RuntimeUrlKey), "Cache runtime should be added before calling this method"); + + changes[Resources.CacheRuntimeVersionKey] = package.Version; + + return true; + } + + protected override void ApplyScaffoldingChanges(CloudRuntimePackage package) + { + string rootPath = CommonUtilities.GetServiceRootPath(FilePath); + + if (CloudServiceProject.Components.StartupTaskExists(RoleName, Resources.CacheStartupCommand)) + { + CloudServiceProject.Components.SetStartupTaskVariable( + RoleName, + Resources.CacheRuntimeUrl, + package.PackageUri.ToString(), + Resources.CacheStartupCommand); + } + else + { + Variable emulated = new Variable + { + name = Resources.EmulatedKey, + RoleInstanceValue = new RoleInstanceValueElement + { + xpath = "/RoleEnvironment/Deployment/@emulated" + } + }; + Variable cacheRuntimeUrl = new Variable + { + name = Resources.CacheRuntimeUrl, + value = package.PackageUri.ToString() + }; + + CloudServiceProject.Components.AddStartupTask( + RoleName, + Resources.CacheStartupCommand, + ExecutionContext.elevated, + emulated, + cacheRuntimeUrl); + } + } + } + + private class NullCloudRuntime : CloudRuntime + { + public override bool Match(CloudRuntimePackage runtime) + { + return true; + } + + protected override void Configure(Dictionary environment) + { + } + + protected override string GenerateWarningText(CloudRuntimePackage package) + { + return null; + } + + protected override bool GetChanges(CloudRuntimePackage package, out Dictionary changes) + { + changes = null; + return false; + } + + protected override void ApplyScaffoldingChanges(CloudRuntimePackage package) + { + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/CloudRuntimeApplicator.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/CloudRuntimeApplicator.cs new file mode 100644 index 000000000000..1b468b0ca8e4 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/CloudRuntimeApplicator.cs @@ -0,0 +1,89 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService +{ + /// + /// Used to delay application of runtime until the user has acknowledged she wants the change + /// + public class CloudRuntimeApplicator + { + CloudRuntime Runtime { get; set; } + + CloudRuntimePackage Package { get; set; } + + WebRole WebRole { get; set; } + + WorkerRole WorkerRole { get; set; } + + private CloudRuntimeApplicator() + { + } + + /// + /// Create a cloud runtime application, essentialy this is a tuple of runtime X package X role + /// + /// The runtime in the tuple + /// The package in the tuple + /// The role to apply the package to + /// The tuple, use the apply method to apply the runtime as specified + public static CloudRuntimeApplicator CreateCloudRuntimeApplicator(CloudRuntime cloudRuntime, CloudRuntimePackage cloudRuntimePackage, WebRole role) + { + CloudRuntimeApplicator applicator = new CloudRuntimeApplicator + { + Runtime = cloudRuntime, + Package = cloudRuntimePackage, + WebRole = role + }; + + return applicator; + } + + /// + /// Create a cloud runtime application, essentialy this is a tuple of runtime X package X role + /// + /// The runtime in the tuple + /// The package in the tuple + /// The role to apply the package to + /// The tuple, use the apply method to apply the runtime as specified + public static CloudRuntimeApplicator CreateCloudRuntimeApplicator(CloudRuntime cloudRuntime, CloudRuntimePackage cloudRuntimePackage, WorkerRole role) + { + CloudRuntimeApplicator applicator = new CloudRuntimeApplicator + { + Runtime = cloudRuntime, + Package = cloudRuntimePackage, + WorkerRole = role + }; + + return applicator; + } + + /// + /// Apply the cloud runtime to the package as specified when creating the applicator + /// + public void Apply() + { + if (this.WorkerRole != null) + { + this.Runtime.ApplyRuntime(this.Package, this.WorkerRole); + } + else if (this.WebRole != null) + { + this.Runtime.ApplyRuntime(this.Package, this.WebRole); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/CloudRuntimeCollection.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/CloudRuntimeCollection.cs new file mode 100644 index 000000000000..6a192a0ff497 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/CloudRuntimeCollection.cs @@ -0,0 +1,275 @@ +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Xml; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService +{ + public class CloudRuntimeCollection : Collection, IDisposable + { + Dictionary> packages = new Dictionary>(); + Dictionary defaults = new Dictionary(); + private XmlReader documentReader; + private MemoryStream documentStream; + private bool disposed; + + private CloudRuntimeCollection() + { + foreach (RuntimeType runtime in Enum.GetValues(typeof(RuntimeType))) + { + packages[runtime] = new List(); + } + } + + public static bool CreateCloudRuntimeCollection(out CloudRuntimeCollection runtimes, string manifestFile = null) + { + runtimes = new CloudRuntimeCollection(); + XmlDocument manifest = runtimes.GetManifest(manifestFile); + string baseUri; + Collection runtimePackages; + bool success = TryGetBlobUriFromManifest(manifest, out baseUri); + success &= TryGetRuntimePackages(manifest, baseUri, out runtimePackages); + foreach (CloudRuntimePackage package in runtimePackages) + { + runtimes.Add(package); + } + + return success; + } + + public bool TryFindMatch(CloudRuntime runtime, out CloudRuntimePackage matchingPackage) + { + matchingPackage = packages[runtime.Runtime].OrderByDescending(p => p.Version, new VersionComparer()).FirstOrDefault(crp => runtime.Match(crp)); + if (matchingPackage != null) + { + return true; + } + + if (defaults.ContainsKey(runtime.Runtime)) + { + matchingPackage = defaults[runtime.Runtime]; + } + + return false; + } + + protected override void ClearItems() + { + foreach (RuntimeType runtime in this.packages.Keys) + { + this.packages[runtime].Clear(); + } + + foreach (RuntimeType runtime in this.defaults.Keys) + { + this.defaults.Remove(runtime); + } + + base.ClearItems(); + } + + protected override void InsertItem(int index, CloudRuntimePackage item) + { + base.InsertItem(index, item); + this.AddPackage(item); + } + + protected override void RemoveItem(int index) + { + this.RemovePackage(base[index]); + base.RemoveItem(index); + } + + protected override void SetItem(int index, CloudRuntimePackage item) + { + if (index < this.Count) + { + this.RemovePackage(base[index]); + } + + this.AddPackage(item); + base.SetItem(index, item); + } + + private static bool TryGetBlobUriFromManifest(XmlDocument manifest, out string baseUri) + { + Debug.Assert(manifest != null); + bool found = false; + baseUri = null; + XmlNode node = manifest.SelectSingleNode(Resources.ManifestBaseUriQuery); + if (node != null) + { + found = true; + XmlAttribute blobUriAttribute = node.Attributes[Resources.ManifestBlobUriKey]; + if (null == blobUriAttribute || null == blobUriAttribute.Value) + { + throw new ArgumentException(Resources.InvalidManifestError); + } + + baseUri = blobUriAttribute.Value; + } + + return found; + } + + private XmlDocument GetManifest(string filePath = null) + { + if (filePath != null) + { + byte[] buffer = File.ReadAllBytes(filePath); + this.documentStream = new MemoryStream(buffer); + this.documentReader = XmlReader.Create(documentStream); + } + else + { + this.documentReader = XmlReader.Create(Resources.ManifestUri); + } + + XmlDocument document = new XmlDocument(); + document.Load(documentReader); + return document; + } + + private static bool TryGetRuntimePackages(XmlDocument manifest, string baseUri, + out Collection packages) + { + bool retrieved = false; + packages = new Collection(); + XmlNodeList nodes = manifest.SelectNodes(Resources.RuntimeQuery); + if (nodes != null) + { + retrieved = true; + foreach (XmlNode node in nodes) + { + packages.Add(new CloudRuntimePackage(node, baseUri)); + } + } + + return retrieved; + } + + private void AddPackage(CloudRuntimePackage package) + { + if (package.IsDefault) + { + this.defaults[package.Runtime] = package; + } + + this.packages[package.Runtime].Add(package); + } + + private void RemovePackage(CloudRuntimePackage package) + { + if (package.IsDefault) + { + this.defaults.Remove(package.Runtime); + } + + this.packages[package.Runtime].Remove(package); + } + + + public void Dispose() + { + this.Dispose(!this.disposed); + this.disposed = true; + } + + protected virtual void Dispose(bool disposing) + { + if (disposing) + { + if (this.documentReader != null) + { + this.documentReader.Close(); + } + if (this.documentStream != null) + { + this.documentStream.Close(); + } + } + } + + public static string GetRuntimeUrl(string runtimeType, string runtimeVersion, string manifest = null) + { + CloudRuntimeCollection collection; + CloudRuntimeCollection.CreateCloudRuntimeCollection(out collection, manifest); + CloudRuntime desiredRuntime = CloudRuntime.CreateCloudRuntime(runtimeType, runtimeVersion, null, null); + CloudRuntimePackage foundPackage; + bool found = collection.TryFindMatch(desiredRuntime, out foundPackage); + + return found ? foundPackage.PackageUri.AbsoluteUri : null; + } + } + + class VersionComparer : IComparer + { + public int Compare(string x, string y) + { + string[] xVersions = x.Split('.'); + string[] yVersions = y.Split('.'); + if (xVersions == null || xVersions.Length == 0) + { + return -1; + } + if (yVersions == null || yVersions.Length == 0) + { + return 1; + } + int limit = Math.Min(xVersions.Length, yVersions.Length); + + for (int i = 0; i < limit; ++i) + { + int xVersion = 0; + int yVersion = 0; + if (!int.TryParse(xVersions[i], out xVersion)) + { + return -1; + } + + if (!int.TryParse(yVersions[i], out yVersion)) + { + return 1; + } + + if (xVersion < yVersion) + { + return -1; + } + + if (xVersion > yVersion) + { + return 1; + } + } + + if (xVersions.Length > limit) + { + return 1; + } + + if (yVersions.Length > limit) + { + return -1; + } + + return 0; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/CloudRuntimePackage.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/CloudRuntimePackage.cs new file mode 100644 index 000000000000..d4aca37d73a4 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/CloudRuntimePackage.cs @@ -0,0 +1,86 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Diagnostics; +using System.Xml; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService +{ + public class CloudRuntimePackage + { + public const string VersionKey = "version"; + public const string FileKey = "filepath"; + public const string DefaultKey = "default"; + public const string RuntimeKey = "type"; + + public CloudRuntimePackage(XmlNode versionNode, string baseUri) + { + this.Version = versionNode.Attributes[CloudRuntimePackage.VersionKey].Value; + string filePath = versionNode.Attributes[CloudRuntimePackage.FileKey].Value; + this.PackageUri = GetUri(baseUri, filePath); + this.Runtime = GetRuntimeType(versionNode.Attributes[CloudRuntimePackage.RuntimeKey].Value); + XmlAttribute defaultAttribute = versionNode.Attributes[CloudRuntimePackage.DefaultKey]; + this.IsDefault = defaultAttribute != null && bool.Parse(defaultAttribute.Value); + } + + public RuntimeType Runtime + { + get; + private set; + } + + public string Version + { + get; + private set; + } + + public Uri PackageUri + { + get; + private set; + } + + public bool IsDefault + { + get; + private set; + } + + private static Uri GetUri(string baseUri, string filePath) + { + UriBuilder baseBuilder = new UriBuilder(baseUri); + baseBuilder.Path = filePath; + return baseBuilder.Uri; + } + + private static RuntimeType GetRuntimeType(string typeValue) + { + Debug.Assert(typeValue != null); + foreach (RuntimeType runtime in Enum.GetValues(typeof(RuntimeType))) + { + string comparisonValue = Enum.GetName(typeof(RuntimeType), runtime); + if (string.Equals(typeValue, comparisonValue, StringComparison.OrdinalIgnoreCase)) + { + return runtime; + } + } + + throw new ArgumentException(string.Format(Resources.InvalidRuntimeError, typeValue)); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/CloudServicePathInfo.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/CloudServicePathInfo.cs new file mode 100644 index 000000000000..ad7c9c27ff49 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/CloudServicePathInfo.cs @@ -0,0 +1,46 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService +{ + public abstract class CloudProjectPathInfo + { + public string Definition { get; protected set; } + + public string CloudConfiguration { get; protected set; } + + public string LocalConfiguration { get; protected set; } + + public string Settings { get; protected set; } + + public string CloudPackage { get; protected set; } + + public string LocalPackage { get; protected set; } + + public string RootPath { get; protected set; } + + public string RolesPath { get; protected set; } + + public CloudProjectPathInfo(string rootPath) + { + Validate.ValidateStringIsNullOrEmpty(rootPath, "rootPath"); + Validate.ValidatePathName(rootPath, Resources.InvalidRootNameMessage); + + RootPath = rootPath; + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/CloudServiceProject.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/CloudServiceProject.cs new file mode 100644 index 000000000000..3a14d0c9c888 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/CloudServiceProject.cs @@ -0,0 +1,539 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Security.AccessControl; +using System.Security.Permissions; +using System.Security.Principal; +using System.Text; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService.AzureTools; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService.Scaffolding; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema; +using Microsoft.WindowsAzure.Commands.Utilities; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService +{ + /// + /// Class that encapsulates all of the info about a service, to which we can add roles. This is all in memory, so no disk operations occur. + /// + public class CloudServiceProject + { + public CloudProjectPathInfo Paths { get; private set; } + + public ServiceComponents Components { get; private set; } + + private string scaffoldingFolderPath; + + public string ServiceName + { + get + { + if (Components.Definition != null) + { + return this.Components.Definition.name; + } + else + { + return this.Components.CloudConfig.serviceName; + } + } + } + + + public CloudServiceProject(string rootPath, string name, string scaffoldingPath) + : this() + { + Validate.ValidateDirectoryFull(rootPath, Resources.ServiceParentDirectory); + Validate.ValidateStringIsNullOrEmpty(name, "Name"); + Validate.ValidateFileName(name, string.Format(Resources.InvalidFileName, "Name")); + Validate.ValidateDnsName(name, "Name"); + + string newServicePath = Path.Combine(rootPath, name); + if (Directory.Exists(newServicePath)) + { + throw new ArgumentException(string.Format(Resources.ServiceAlreadyExistsOnDisk, name, newServicePath)); + } + + SetScaffolding(scaffoldingPath); + Paths = new PowerShellProjectPathInfo(newServicePath); + CreateNewService(Paths.RootPath, name); + Components = new ServiceComponents(Paths); + ConfigureNewService(Components, Paths, name); + } + + //for stopping the emulator none of the path info is required + public CloudServiceProject() + { + } + + public CloudServiceProject(string cloudConfigurationFullPath) + { + Components = new ServiceComponents(cloudConfigurationFullPath); + //since we are deploying from a prebuilt package, it doesn't matter whether + //it comes from visual studio or powershell tools. + //Here we just go with powershell one, because it is simple. + Paths = new PowerShellProjectPathInfo(Path.GetDirectoryName(cloudConfigurationFullPath)); + } + + public CloudServiceProject(string rootPath, string scaffoldingPath) + { + SetScaffolding(scaffoldingPath); + + if (!VisualStudioProjectPathInfo.IsVisualStudioProject(rootPath)) + { + Paths = new PowerShellProjectPathInfo(rootPath); + } + else + { + Paths = new VisualStudioProjectPathInfo(rootPath); + } + + Components = new ServiceComponents(Paths); + } + + private void SetScaffolding(string scaffoldingFolderDirectory) + { + if (string.IsNullOrEmpty(scaffoldingFolderDirectory)) + { + scaffoldingFolderPath = FileUtilities.GetAssemblyDirectory(); + } + else + { + Validate.ValidateDirectoryExists(scaffoldingFolderDirectory); + + scaffoldingFolderPath = scaffoldingFolderDirectory; + } + } + + private void ConfigureNewService(ServiceComponents components, CloudProjectPathInfo paths, string serviceName) + { + Components.Definition.name = serviceName; + Components.CloudConfig.serviceName = serviceName; + Components.LocalConfig.serviceName = serviceName; + Components.Save(paths); + } + + private void CreateNewService(string serviceRootPath, string serviceName) + { + Dictionary parameters = new Dictionary(); + parameters[ScaffoldParams.Slot] = string.Empty; + parameters[ScaffoldParams.Subscription] = string.Empty; + parameters[ScaffoldParams.Location] = string.Empty; + parameters[ScaffoldParams.StorageAccountName] = string.Empty; + parameters[ScaffoldParams.ServiceName] = serviceName; + + Scaffold.GenerateScaffolding(Path.Combine(scaffoldingFolderPath, Resources.GeneralScaffolding), serviceRootPath, parameters); + } + + /// + /// Generates scaffolding for role. + /// + /// The relative scaffolding source path + /// The role name + /// The rule parameters + public void GenerateScaffolding(string scaffolding, string roleName, Dictionary parameters) + { + string scaffoldPath = Path.Combine(scaffoldingFolderPath, scaffolding); + Scaffold.GenerateScaffolding(scaffoldPath, Path.Combine(Paths.RootPath, roleName), parameters); + } + + /// + /// Creates a role name, ensuring it doesn't already exist. If null is passed in, a number will be appended to the defaultRoleName. + /// + /// + /// + /// + /// + private string GetRoleName(string name, string defaultName, IEnumerable existingNames) + { + if (!string.IsNullOrEmpty(name)) + { + if (existingNames.Contains(name.ToLower())) + { + // Role does exist, user should pick a unique name + // + throw new ArgumentException(string.Format(Resources.AddRoleMessageRoleExists, name)); + } + + if (!ServiceComponents.ValidRoleName(name)) + { + // The provided name is invalid role name + // + throw new ArgumentException(string.Format(Resources.InvalidRoleNameMessage, name)); + } + } + + if (name == null) + { + name = defaultName; + } + else + { + return name; + } + + int index = 1; + string curName = name + index.ToString(); + while (existingNames.Contains(curName.ToLower())) + { + curName = name + (++index).ToString(); + } + return curName; + } + + /// + /// Adds the given role to both config files and the service def. + /// + private void AddRoleCore(string scaffolding, RoleInfo role) + { + Dictionary parameters = CreateDefaultParameters(role); + parameters[ScaffoldParams.NodeModules] = GeneralUtilities.GetNodeModulesPath(); + parameters[ScaffoldParams.NodeJsProgramFilesX86] = FileUtilities.GetWithProgramFilesPath(Resources.NodeProgramFilesFolderName, false); + + GenerateScaffolding(scaffolding, role.Name, parameters); + } + + private Dictionary CreateDefaultParameters(RoleInfo role) + { + Dictionary parameters = new Dictionary(); + parameters[ScaffoldParams.Role] = role; + parameters[ScaffoldParams.Components] = Components; + parameters[ScaffoldParams.RoleName] = role.Name; + parameters[ScaffoldParams.InstancesCount] = role.InstanceCount; + parameters[ScaffoldParams.Port] = Components.GetNextPort(); + parameters[ScaffoldParams.Paths] = Paths; + return parameters; + } + + public RoleInfo AddWebRole( + string scaffolding, + string name = null, + int instanceCount = 1) + { + name = GetRoleName(name, Resources.WebRole, Components.Definition.WebRole == null ? + new string[0] : + Components.Definition.WebRole.Select(wr => wr.name.ToLower())); + + WebRoleInfo role = new WebRoleInfo(name, instanceCount); + + AddRoleCore(scaffolding, role); + + return role; + } + + public RoleInfo AddWorkerRole( + string scaffolding, + string name = null, + int instanceCount = 1) + { + name = GetRoleName(name, Resources.WorkerRole, Components.Definition.WorkerRole == null ? + new string[0] : + Components.Definition.WorkerRole.Select(wr => wr.name.ToLower())); + + WorkerRoleInfo role = new WorkerRoleInfo(name, instanceCount); + + AddRoleCore(scaffolding, role); + + return role; + } + + /// + /// Adds the given role to both config files and the service def. + /// + /// + /// + private void AddPythonRoleCore(RoleInfo role, RoleType type) + { + Dictionary parameters = CreateDefaultParameters(role); + + string scaffoldPath = Path.Combine(Path.Combine(scaffoldingFolderPath, Resources.PythonScaffolding), type.ToString()); + Scaffold.GenerateScaffolding(scaffoldPath, Path.Combine(Paths.RootPath, role.Name), parameters); + } + + public RoleInfo AddDjangoWebRole(string name = null, int instanceCount = 1) + { + name = GetRoleName(name, Resources.WebRole, Components.Definition.WebRole == null ? new string[0] : Components.Definition.WebRole.Select(wr => wr.name.ToLower())); + WebRoleInfo role = new WebRoleInfo(name, instanceCount); + AddPythonRoleCore(role, RoleType.WebRole); + + return role; + } + + public void ChangeRolePermissions(RoleInfo role) + { + string rolePath = Path.Combine(Paths.RootPath, role.Name); + DirectoryInfo directoryInfo = new DirectoryInfo(rolePath); + DirectorySecurity directoryAccess = directoryInfo.GetAccessControl(AccessControlSections.All); + directoryAccess.AddAccessRule(new FileSystemAccessRule(new SecurityIdentifier(WellKnownSidType.NetworkServiceSid, null), + FileSystemRights.ReadAndExecute | FileSystemRights.Write, InheritanceFlags.ContainerInherit | InheritanceFlags.ObjectInherit, PropagationFlags.None, AccessControlType.Allow)); + directoryInfo.SetAccessControl(directoryAccess); + } + + [PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")] + public void CreatePackage(DevEnv type) + { + string standardOutput, standardError; + VerifyCloudServiceProjectComponents(); + CsPack packageTool = new CsPack(); + packageTool.CreatePackage(Components.Definition, Paths, type, AzureTool.GetAzureSdkBinDirectory(), out standardOutput, out standardError); + if (!string.IsNullOrWhiteSpace(standardError)) + { + //The error of invalid xpath expression about endpoint in the configuration file is expected. Hence, we do not throw. + if (!standardError.Contains("/RoleEnvironment/CurrentInstance/Endpoints/Endpoint[@name='HttpIn']/@port")) + { + throw new InvalidOperationException(string.Format(Properties.Resources.FailedToCreatePackage, standardError)); + } + } + } + + private void VerifyCloudServiceProjectComponents() + { + const string CacheVersion = "2.5.0"; + + // Verify caching version is 2.2 + foreach (string roleName in Components.GetRoles()) + { + string value = Components.GetStartupTaskVariable( + roleName, + Resources.CacheRuntimeVersionKey, + Resources.WebRoleStartupTaskCommandLine, + Resources.WorkerRoleStartupTaskCommandLine); + + if (!string.IsNullOrEmpty(value) && !string.Equals(value, CacheVersion, StringComparison.OrdinalIgnoreCase)) + { + throw new Exception(string.Format(Resources.CacheMismatchMessage, roleName, CacheVersion)); + } + } + } + + /// + /// Starts azure emulator for this service. + /// + /// This methods removes all deployments already in the emulator. + /// Switch to control opening a browser for web roles. + /// + /// + /// + public void StartEmulators(bool launchBrowser, ComputeEmulatorMode mode , out string roleInformation, out string warning) + { + var runTool = new CsRun(AzureTool.GetComputeEmulatorDirectory()); + runTool.StartEmulator(Paths.LocalPackage, Paths.LocalConfiguration, launchBrowser, mode); + + roleInformation = runTool.RoleInformation; + + var storageEmulator = new StorageEmulator(AzureTool.GetStorageEmulatorDirectory()); + storageEmulator.Start(); + + //for now, errors related with storage emulator are treated as non-fatal + warning = storageEmulator.Error; + } + + public void StopEmulators(out string warning) + { + var runTool = new CsRun(AzureTool.GetComputeEmulatorDirectory()); + runTool.StopComputeEmulator(); + + var storageEmulator = new StorageEmulator(AzureTool.GetStorageEmulatorDirectory()); + storageEmulator.Stop(); + //for now, errors related with storage emulator are treated as non-fatal + warning = storageEmulator.Error; + } + + public void ChangeServiceName(string newName, CloudProjectPathInfo paths) + { + Validate.ValidateDnsName(newName, "service name"); + + Components.Definition.name = newName; + Components.CloudConfig.serviceName = newName; + Components.LocalConfig.serviceName = newName; + Components.Save(paths); + } + + /// + /// Sets the role instance count + /// + /// The service paths + /// The name of the role to change its instance count + /// + public void SetRoleInstances(CloudProjectPathInfo paths, string roleName, int instances) + { + Components.SetRoleInstances(roleName, instances); + Components.Save(paths); + } + + /// + /// Sets the role VMSize + /// + /// The service paths + /// The name of the role to change its vm size + /// The new role vm size + public void SetRoleVMSize(CloudProjectPathInfo paths, string roleName, string VMSize) + { + Components.SetRoleVMSize(roleName, VMSize); + Components.Save(paths); + } + + /// + /// Retrieve currently available cloud runtimes + /// + /// service path info + /// The manifest to use to get current runtime info - default is the cloud manifest + /// + public CloudRuntimeCollection GetCloudRuntimes(CloudProjectPathInfo paths, string manifest) + { + CloudRuntimeCollection collection; + CloudRuntimeCollection.CreateCloudRuntimeCollection(out collection, manifest); + return collection; + } + + /// + /// Add the specified runtime to a role, checking that the runtime and version are currently available int he cloud + /// + /// service path info + /// Name of the role to change + /// The runtime identifier + /// The runtime version + /// Location fo the manifest file, default is the cloud manifest + public void AddRoleRuntime( + CloudProjectPathInfo paths, + string roleName, + string runtimeType, + string runtimeVersion, + string manifest = null) + { + if (this.Components.RoleExists(roleName)) + { + CloudRuntimeCollection collection; + CloudRuntimeCollection.CreateCloudRuntimeCollection(out collection, manifest); + CloudRuntime desiredRuntime = CloudRuntime.CreateCloudRuntime(runtimeType, runtimeVersion, roleName, Path.Combine(paths.RootPath, roleName)); + CloudRuntimePackage foundPackage; + if (collection.TryFindMatch(desiredRuntime, out foundPackage)) + { + WorkerRole worker = (this.Components.Definition.WorkerRole == null ? null : + this.Components.Definition.WorkerRole.FirstOrDefault(r => string.Equals(r.name, roleName, + StringComparison.OrdinalIgnoreCase))); + WebRole web = (this.Components.Definition.WebRole == null ? null : + this.Components.Definition.WebRole.FirstOrDefault(r => string.Equals(r.name, roleName, + StringComparison.OrdinalIgnoreCase))); + desiredRuntime.CloudServiceProject = this; + if (worker != null) + { + desiredRuntime.ApplyRuntime(foundPackage, worker); + } + else if (web != null) + { + desiredRuntime.ApplyRuntime(foundPackage, web); + } + + this.Components.Save(this.Paths); + } + } + } + + /// + /// Resolves the service runtimes into downloadable URLs. + /// + /// The custom manifest file + /// Warning text if any + public string ResolveRuntimePackageUrls(string manifest = null) + { + ServiceSettings settings = ServiceSettings.Load(Paths.Settings); + + CloudRuntimeCollection availableRuntimePackages; + + if (!CloudRuntimeCollection.CreateCloudRuntimeCollection(out availableRuntimePackages, manifest)) + { + throw new ArgumentException( + string.Format(Resources.ErrorRetrievingRuntimesForLocation, + settings.Location)); + } + + ServiceDefinition definition = this.Components.Definition; + StringBuilder warningText = new StringBuilder(); + List applicators = new List(); + if (definition.WebRole != null) + { + foreach (WebRole role in + definition.WebRole.Where(role => role.Startup != null && + CloudRuntime.GetRuntimeStartupTask(role.Startup) != null)) + { + CloudRuntime.ClearRuntime(role); + string rolePath = Path.Combine(this.Paths.RootPath, role.name); + foreach (CloudRuntime runtime in CloudRuntime.CreateRuntime(role, rolePath)) + { + CloudRuntimePackage package; + runtime.CloudServiceProject = this; + if (!availableRuntimePackages.TryFindMatch(runtime, out package)) + { + string warning; + if (!runtime.ValidateMatch(package, out warning)) + { + warningText.AppendFormat("{0}\r\n", warning); + } + } + + applicators.Add(CloudRuntimeApplicator.CreateCloudRuntimeApplicator( + runtime, + package, + role)); + } + } + } + + if (definition.WorkerRole != null) + { + foreach (WorkerRole role in + definition.WorkerRole.Where(role => role.Startup != null && + CloudRuntime.GetRuntimeStartupTask(role.Startup) != null)) + { + string rolePath = Path.Combine(this.Paths.RootPath, role.name); + CloudRuntime.ClearRuntime(role); + foreach (CloudRuntime runtime in CloudRuntime.CreateRuntime(role, rolePath)) + { + CloudRuntimePackage package; + runtime.CloudServiceProject = this; + if (!availableRuntimePackages.TryFindMatch(runtime, out package)) + { + string warning; + if (!runtime.ValidateMatch(package, out warning)) + { + warningText.AppendFormat(warning + Environment.NewLine); + } + } + applicators.Add(CloudRuntimeApplicator.CreateCloudRuntimeApplicator(runtime, + package, role)); + } + } + } + + applicators.ForEach(a => a.Apply()); + this.Components.Save(this.Paths); + + return warningText.ToString(); + } + + /// + /// Reloads the cloud service project configuration from the disk. + /// + public void Reload() + { + Components = new ServiceComponents(Paths); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/CommonUtilities.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/CommonUtilities.cs new file mode 100644 index 000000000000..40e59f90c5ac --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/CommonUtilities.cs @@ -0,0 +1,154 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common +{ + public class CommonUtilities + { + private static string FindServiceRootDirectory(string path) + { + if (FileUtilities.DataStore.GetFiles(path, Resources.ServiceDefinitionFileName, SearchOption.TopDirectoryOnly).Length == 1) + { + return path; + } + else if (FileUtilities.DataStore.GetFiles(path, "*.sln", SearchOption.TopDirectoryOnly).Length == 1) + { + foreach (string dirName in FileUtilities.DataStore.GetDirectories(path)) + { + if (FileUtilities.DataStore.GetFiles(dirName, Resources.ServiceDefinitionFileName, SearchOption.TopDirectoryOnly).Length == 1) + { + return dirName; + } + } + } + + // Find the last slash + int slash = path.LastIndexOf('\\'); + if (slash > 0) + { + // Slash found trim off the last path + path = path.Substring(0, slash); + + // Recurse + return FindServiceRootDirectory(path); + } + + // Couldn't locate the service root, exit + return null; + } + + public static ServiceSettings GetDefaultSettings( + string rootPath, + string inServiceName, + string slot, + string location, + string affinityGroup, + string storageName, + string subscription, + out string serviceName) + { + ServiceSettings serviceSettings; + + if (string.IsNullOrEmpty(rootPath)) + { + serviceSettings = ServiceSettings.LoadDefault(null, slot, location, affinityGroup, subscription, storageName, inServiceName, null, out serviceName); + } + else + { + serviceSettings = ServiceSettings.LoadDefault( + new CloudServiceProject(rootPath, null).Paths.Settings, + slot, + location, + affinityGroup, + subscription, + storageName, + inServiceName, + new CloudServiceProject(rootPath, null).ServiceName, + out serviceName); + } + + return serviceSettings; + } + + /// + /// Gets role name for the current pathif exists. + /// + /// The role name + public static string GetRoleName(string rootPath, string currentPath) + { + bool found = false; + string roleName = null; + + if (!(rootPath.Length >= currentPath.Length)) + { + string difference = currentPath.Replace(rootPath, string.Empty); + roleName = difference.Split(new char[] { Path.DirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries).GetValue(0).ToString(); + CloudServiceProject service = new CloudServiceProject(rootPath, null); + found = service.Components.RoleExists(roleName); + } + + if (!found) + { + throw new ArgumentException(string.Format(Resources.CannotFindRole, currentPath)); + } + + return roleName; + } + + public static string GetServiceRootPath(string currentPath) + { + // Get the service path + string servicePath = FindServiceRootDirectory(currentPath); + + // Was the service path found? + if (servicePath == null) + { + throw new InvalidOperationException(Resources.CannotFindServiceRoot); + } + + CloudServiceProject service = new CloudServiceProject(servicePath, null); + if (service.Components.CloudConfig.Role != null) + { + foreach (RoleSettings role in service.Components.CloudConfig.Role) + { + string roleDirectory = Path.Combine(service.Paths.RolesPath, role.name); + + if (!FileUtilities.DataStore.DirectoryExists(roleDirectory)) + { + throw new InvalidOperationException(Resources.CannotFindServiceRoot); + } + } + } + + return servicePath; + } + + /// + /// Tries to get service path, if not return null. + /// + /// The current path + /// The service root path + public static string TryGetServiceRootPath(string currentPath) + { + try { return GetServiceRootPath(currentPath); } + catch (Exception) { return null; } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/ComputeEmulatorMode.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/ComputeEmulatorMode.cs new file mode 100644 index 000000000000..1a13083aecfd --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/ComputeEmulatorMode.cs @@ -0,0 +1,22 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService +{ + public enum ComputeEmulatorMode + { + Express, + Full + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/JavaScriptPackageHelpers.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/JavaScriptPackageHelpers.cs new file mode 100644 index 000000000000..c6d1b7f10d3e --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/JavaScriptPackageHelpers.cs @@ -0,0 +1,237 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Web.Script.Serialization; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService +{ + internal static class JavaScriptPackageHelpers + { + /// + /// Ensure that a package.json file is available in the given directory, if not create it. + /// + /// fully qualified path to the directory to search + /// + /// True if package.json exists and is readable, false otherwise + internal static bool EnsurePackageJsonExists(string directoryPath, string applicationName = "") + { + string fileName = Path.Combine(directoryPath, Resources.PackageJsonFileName); + if (!File.Exists(fileName)) + { + FileUtilities.DataStore.WriteFile(fileName, string.Format(Resources.PackageJsonDefaultFile, applicationName)); + } + + return FileUtilities.DataStore.FileExists(fileName); + } + + /// + /// Get the version specifiction for the given engine, if any + /// + /// fully qualified path to the directory to search + /// The name of the engine to specify + /// The version specified in package.json, if any, or null otherwise + /// True if we retrieved a valid engine version, false otherwise + internal static bool TryGetEngineVersion(string directoryPath, string engineName, out string version) + { + version = null; + Dictionary contents; + if (TryGetContents(directoryPath, out contents)) + { + return TryGetEngineVersionFromJson(contents, engineName, out version); + } + + return false; + } + + /// + /// Get the version specifiction for the given engine, if any + /// + /// fully qualified path to the directory to search + /// The name of the engine to specify + /// The version to set in package.json. + /// True if we successfully set the engine version, false otherwise + internal static bool TrySetEngineVersion(string directoryPath, string engineName, string version) + { + Dictionary contents; + if (TryGetContents(directoryPath, out contents)) + { + SetEngineVersionInJson(contents, engineName, version); + SetContents(directoryPath, contents); + return true; + } + + return false; + } + + /// + /// Deserialize the contents of package.json in the given directory + /// + /// fully qualified path to the directory to search + /// The contents of the file, represented as a dictionary + /// True if we successfully read the file, false otherwise + private static bool TryGetContents(string directoryPath, out Dictionary contents) + { + contents = null; + string fileName = Path.Combine(directoryPath, Resources.PackageJsonFileName); + try + { + using (StreamReader reader = new StreamReader(fileName)) + { + string jsonString = reader.ReadToEnd(); + JavaScriptSerializer js = new JavaScriptSerializer(); + contents = js.Deserialize>(jsonString); + } + + return true; + } + catch (Exception) + { + return false; + } + } + + /// + /// Write the given JavaScript object in dictionaroy representation out to package.json + /// + /// + /// The JavaScript object in dictionary representation + static void SetContents(string directoryPath, Dictionary contents) + { + string fileName = Path.Combine(directoryPath, Resources.PackageJsonFileName); + using (StreamWriter writer = new StreamWriter(fileName, false)) + { + JavaScriptSerializer serializer = new JavaScriptSerializer(); + writer.Write(serializer.Serialize(contents)); + writer.Flush(); + } + } + + /// + /// Try to get the value of a property from a JavaScript object represented as a dictionary + /// use case-insensitive matching and coerce the return type as appropriate + /// + /// The JavaScript object in dictionary representation + /// The property name to find + /// The out variable to return the value stored in the object + /// True if the property is successfully found, false otherwise + static bool TryGetValue(Dictionary store, string searchKey, out T value) where T : class + { + value = null; + foreach (string key in store.Keys) + { + if (string.Equals(key, searchKey, StringComparison.OrdinalIgnoreCase)) + { + value = store[key] as T; + return value != null; + } + } + + return false; + } + + /// + /// Try to set the value of a property in a JavaScript object represented as a dictionary + /// use case-insensitive matching + /// + /// The JavaScript object in dictionary representation + /// The property name to find + /// The out variable to return the value stored in the object + /// True if the property is successfully found, false otherwise + static void SetValue(Dictionary store, string searchKey, T value) where T : class + { + foreach (string key in store.Keys) + { + if (string.Equals(key, searchKey, StringComparison.OrdinalIgnoreCase)) + { + store[key] = value; + return; + } + } + + store[searchKey] = value; + } + + /// + /// Try to get the engines section from a package.json object + /// use case-insensitive matching and coerce the return type as appropriate + /// + /// The JavaScript object in dictionary representation + /// The out variable to return the engines section as a dictionary + /// True if the property is successfully found, false otherwise + private static bool TryGetEnginesSection(Dictionary store, out Dictionary engines) + { + return TryGetValue>(store, Resources.JsonEnginesSectionName, out engines); + } + + /// + /// Try to get the engine version specification from the given package.json object (represented + /// as a dictionary) + /// + /// The JavaScript object in dictionary representation + /// The property name of the engine version to find + /// The out variable to return the value stored in the object + /// True if the property is successfully found, false otherwise + static bool TryGetEngineVersionFromJson(Dictionary store, string engineKey, out string engineVersion) + { + engineVersion = null; + Dictionary engines; + if (TryGetEnginesSection(store, out engines)) + { + return TryGetValue(engines, engineKey, out engineVersion) && ISValidVersion(engineVersion); + } + + return false; + } + + /// + /// Determine if the version contained in a package.json is a real version value + /// + /// The version to check + /// true if a valid 3-part version, otherwise false + static bool ISValidVersion(string version) + { + if (!string.IsNullOrEmpty(version)) + { + string[] versions = version.Split('.'); + return versions != null && versions.Length == 3; + } + + return false; + } + /// + /// Try to get the engine version specification from the given package.json object (represented + /// as a dictionary) + /// + /// The JavaScript object in dictionary representation + /// The property name of the engine version to find + /// The version value to store in the object for the engine given + /// True if the property is successfully set, false otherwise + static void SetEngineVersionInJson(Dictionary store, string engineKey, string engineVersion) + { + Dictionary engines; + if (!TryGetEnginesSection(store, out engines)) + { + engines = new Dictionary(); + store[Resources.JsonEnginesSectionName] = engines; + } + + SetValue(engines, engineKey, engineVersion); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/ObjectDeltaMapper.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/ObjectDeltaMapper.cs new file mode 100644 index 000000000000..86fe2f8fd663 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/ObjectDeltaMapper.cs @@ -0,0 +1,122 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common +{ + /// + /// A utility class that will go through a series of properties, + /// compare the values of the properties against a reference + /// object, and if different will copy the source property to + /// a destination object. Useful for set-azureX style cmdlets. + /// + public class ObjectDeltaMapper + { + private static readonly object[] noArgs = new object[0]; + private static readonly BindingFlags publicProperties = BindingFlags.Public | BindingFlags.Instance; + + /// + /// Compare a reference data object with a current source, and populate a third + /// object with the properties in source that are different from the reference. + /// The three objects don't have to be of the same type, this method matches + /// them up by property names. + /// + /// Type of source object. + /// Type of reference object. + /// Type of destination object. + /// Object containing the current settings that is being compared against. + /// Object containing potentially new settings. + /// Object that gets populated with the property values that have changed. + /// Properties that should be explicitly ignored when comparing source and reference. + /// true if there are any changes, false if not. + public static bool Map(TSource source, TReference reference, TDest dest, params string[] excludedProperties) + { + bool changed = false; + var propertiesToCopy = GetPropertiesToUpdate(excludedProperties); + foreach (var property in propertiesToCopy) + { + changed = UpdateProperty(property, source, reference, dest) || changed; + } + return changed; + } + + private class PropertyNameComparer: IEqualityComparer + { + public bool Equals(PropertyInfo x, PropertyInfo y) + { + return string.Compare(x.Name, y.Name, StringComparison.InvariantCulture) == 0; + } + + public int GetHashCode(PropertyInfo obj) + { + return obj.Name.GetHashCode(); + } + } + + private static IEnumerable GetPropertiesToUpdate(string[] excludedProperties) + { + return PropertiesOf().Where(pi => NotExcluded(pi, excludedProperties)) + .Intersect(PropertiesOf(), new PropertyNameComparer()) + .Intersect(PropertiesOf(), new PropertyNameComparer()); + } + + private static IEnumerable PropertiesOf() + { + return typeof (T).GetProperties(publicProperties); + } + + private static bool NotExcluded(PropertyInfo property, string[] excludedProperties) + { + return excludedProperties.All(s => s != property.Name); + } + + private static bool UpdateProperty(PropertyInfo property, TSource source, + TReference reference, TDest dest) + { + object sourceValue = GetSourceValue(property, source); + if (sourceValue != null && !sourceValue.Equals(GetReferenceValue(property, reference))) + { + SetDestProperty(property, sourceValue, dest); + return true; + } + return false; + } + + private static object GetSourceValue(PropertyInfo property, object source) + { + return property.GetGetMethod().Invoke(source, noArgs); + } + + private static PropertyInfo MatchingPropertyOf(PropertyInfo sourceProperty) + { + return typeof (T).GetProperty(sourceProperty.Name, publicProperties); + } + + private static object GetReferenceValue(PropertyInfo property, TReference reference) + { + PropertyInfo referenceProperty = MatchingPropertyOf(property); + return referenceProperty.GetGetMethod().Invoke(reference, noArgs); + } + + private static void SetDestProperty(PropertyInfo sourceProperty, object sourceValue, TDest dest) + { + PropertyInfo destProperty = MatchingPropertyOf(sourceProperty); + destProperty.GetSetMethod().Invoke(dest, new[] {sourceValue}); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/PowerShellProjectPathInfo.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/PowerShellProjectPathInfo.cs new file mode 100644 index 000000000000..b4b537b09864 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/PowerShellProjectPathInfo.cs @@ -0,0 +1,33 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using Microsoft.WindowsAzure.Commands.Common.Properties; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService +{ + public class PowerShellProjectPathInfo : CloudProjectPathInfo + { + public PowerShellProjectPathInfo(string rootPath) : base(rootPath) + { + Definition = Path.Combine(rootPath, Resources.ServiceDefinitionFileName); + CloudConfiguration = Path.Combine(rootPath, Resources.CloudServiceConfigurationFileName); + LocalConfiguration = Path.Combine(rootPath, Resources.LocalServiceConfigurationFileName); + Settings = Path.Combine(rootPath, Resources.SettingsFileName); + CloudPackage = Path.Combine(rootPath, Resources.CloudPackageFileName); + LocalPackage = Path.Combine(rootPath, Resources.LocalPackageFileName); + RolesPath = RootPath; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/PublishContext.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/PublishContext.cs new file mode 100644 index 000000000000..136cc8de3401 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/PublishContext.cs @@ -0,0 +1,113 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Linq; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService +{ + public class PublishContext + { + public ServiceSettings ServiceSettings { get; private set; } + + public string PackagePath { get; set; } + + public string CloudConfigPath { get; private set; } + + public string RootPath { get; private set; } + + public string ServiceName { get; private set; } + + public string DeploymentName { get; private set; } + + public string SubscriptionId { get; private set; } + + public CloudServiceProject ServiceProject { get; set; } + + public bool PackageIsFromStorageAccount { get; set; } + + public PublishContext( + ServiceSettings settings, + string packagePath, + string cloudConfigPath, + string serviceName, + string deploymentName, + string rootPath) + { + Validate.ValidateNullArgument(settings, Resources.InvalidServiceSettingMessage); + Validate.ValidateStringIsNullOrEmpty(packagePath, "packagePath"); + Validate.ValidateFileFull(cloudConfigPath, Resources.ServiceConfiguration); + Validate.ValidateStringIsNullOrEmpty(serviceName, "serviceName"); + + this.ServiceSettings = settings; + this.PackagePath = packagePath; + this.CloudConfigPath = cloudConfigPath; + this.RootPath = rootPath; + this.ServiceName = serviceName; + this.DeploymentName = string.IsNullOrEmpty(deploymentName) ? + char.ToLower(ServiceSettings.Slot[0]) + DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss-ffff") + : deploymentName; + + if (!string.IsNullOrEmpty(settings.Subscription)) + { + try + { + ProfileClient client = new ProfileClient(); + SubscriptionId = + client.Profile.Subscriptions.Values.Where(s => s.Name == settings.Subscription) + .Select(s => s.Id.ToString()) + .First(); + } + catch (Exception) + { + throw new ArgumentException(string.Format(Resources.SubscriptionIdNotFoundMessage, settings.Subscription), "settings.Subscription"); + } + } + else + { + throw new ArgumentNullException("settings.Subscription", Resources.InvalidSubscriptionNameMessage); + } + } + + public void ConfigPackageSettings(string package, string workingDirectory) + { + PackagePath = package; + PackageIsFromStorageAccount = IsStorageAccountUrl(package); + if (!PackageIsFromStorageAccount) + { + if (!Path.IsPathRooted(package)) + { + PackagePath = Path.Combine(workingDirectory, package); + } + } + } + + private bool IsStorageAccountUrl(string packagePath) + { + bool result = false; + try + { + Uri uri = new Uri(packagePath); + return uri.Scheme.Equals("http", StringComparison.OrdinalIgnoreCase) && + uri.Host.EndsWith("blob.core.windows.net", StringComparison.OrdinalIgnoreCase); + } + catch { } + return result; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/RoleInfo.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/RoleInfo.cs new file mode 100644 index 000000000000..60b8ea583165 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/RoleInfo.cs @@ -0,0 +1,89 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService +{ + /// + /// Base class for describing roles that we will create. + /// + public abstract class RoleInfo + { + public int InstanceCount { get; private set; } + public string Name { get; private set; } + + public RoleInfo(string name, int instanceCount) + { + Name = name; + InstanceCount = instanceCount; + } + + internal virtual void AddRoleToDefinition(ServiceDefinition serviceDefinition, object template) + { + Validate.ValidateNullArgument(template, string.Format(Resources.NullRoleSettingsMessage, "service definition")); + Validate.ValidateNullArgument(serviceDefinition, Resources.NullServiceDefinitionMessage); + } + + /// + /// Checks for equality between provided object and this object + /// + /// This object can be type of RoleInfo, WebRoleInfo, WorkerRoleInfo, WebRole or WorkerRole + /// True if they are equals, false if not + public override bool Equals(object obj) + { + Validate.ValidateNullArgument(obj, string.Empty); + bool equals; + RoleInfo roleInfo = obj as RoleInfo; + WebRole webRole = obj as WebRole; + WorkerRole workerRole = obj as WorkerRole; + RoleSettings role = obj as RoleSettings; + + if (roleInfo != null) + { + equals = this.InstanceCount.Equals(roleInfo.InstanceCount) && + this.Name.Equals(roleInfo.Name); + } + else if (webRole != null) + { + equals = this.Name.Equals(webRole.name); + } + else if (workerRole != null) + { + equals = this.Name.Equals(workerRole.name); + } + else if (role != null) + { + equals = this.Name.Equals(role.name) && + this.InstanceCount.Equals(role.Instances.count); + } + else + { + equals = false; + } + + return equals; + } + + public override int GetHashCode() + { + return + InstanceCount.GetHashCode() ^ + Name.GetHashCode(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/Scaffolding/NodeRules.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/Scaffolding/NodeRules.cs new file mode 100644 index 000000000000..5116a9d19305 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/Scaffolding/NodeRules.cs @@ -0,0 +1,59 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System.Collections.Generic; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService.Scaffolding +{ + public static class NodeRules + { + public static void AddRoleToConfig(string path, Dictionary parameters) + { + RoleInfo role = parameters["Role"] as RoleInfo; + ServiceComponents components = parameters["Components"] as ServiceComponents; + PowerShellProjectPathInfo paths = parameters["Paths"] as PowerShellProjectPathInfo; + RoleSettings settings = XmlUtilities.DeserializeXmlFile(path).Role[0]; + + components.AddRoleToConfiguration(settings, DevEnv.Cloud); + components.AddRoleToConfiguration(settings, DevEnv.Local); + components.Save(paths); + } + + public static void AddWebRoleToDef(string path, Dictionary parameters) + { + RoleInfo role = parameters["Role"] as RoleInfo; + ServiceComponents components = parameters["Components"] as ServiceComponents; + PowerShellProjectPathInfo paths = parameters["Paths"] as PowerShellProjectPathInfo; + WebRole webRole = XmlUtilities.DeserializeXmlFile(path).WebRole[0]; + + role.AddRoleToDefinition(components.Definition, webRole); + components.Save(paths); + } + + public static void AddWorkerRoleToDef(string path, Dictionary parameters) + { + RoleInfo role = parameters["Role"] as RoleInfo; + ServiceComponents components = parameters["Components"] as ServiceComponents; + PowerShellProjectPathInfo paths = parameters["Paths"] as PowerShellProjectPathInfo; + WorkerRole workerRole = XmlUtilities.DeserializeXmlFile(path).WorkerRole[0]; + + role.AddRoleToDefinition(components.Definition, workerRole); + components.Save(paths); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/Scaffolding/PHPRules.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/Scaffolding/PHPRules.cs new file mode 100644 index 000000000000..98a087815da9 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/Scaffolding/PHPRules.cs @@ -0,0 +1,59 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System.Collections.Generic; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService.Scaffolding +{ + public static class PHPRules + { + public static void AddRoleToConfig(string path, Dictionary parameters) + { + RoleInfo role = parameters["Role"] as RoleInfo; + ServiceComponents components = parameters["Components"] as ServiceComponents; + PowerShellProjectPathInfo paths = parameters["Paths"] as PowerShellProjectPathInfo; + RoleSettings settings = XmlUtilities.DeserializeXmlFile(path).Role[0]; + + components.AddRoleToConfiguration(settings, DevEnv.Cloud); + components.AddRoleToConfiguration(settings, DevEnv.Local); + components.Save(paths); + } + + public static void AddWebRoleToDef(string path, Dictionary parameters) + { + RoleInfo role = parameters["Role"] as RoleInfo; + ServiceComponents components = parameters["Components"] as ServiceComponents; + PowerShellProjectPathInfo paths = parameters["Paths"] as PowerShellProjectPathInfo; + WebRole webRole = XmlUtilities.DeserializeXmlFile(path).WebRole[0]; + + role.AddRoleToDefinition(components.Definition, webRole); + components.Save(paths); + } + + public static void AddWorkerRoleToDef(string path, Dictionary parameters) + { + RoleInfo role = parameters["Role"] as RoleInfo; + ServiceComponents components = parameters["Components"] as ServiceComponents; + PowerShellProjectPathInfo paths = parameters["Paths"] as PowerShellProjectPathInfo; + WorkerRole workerRole = XmlUtilities.DeserializeXmlFile(path).WorkerRole[0]; + + role.AddRoleToDefinition(components.Definition, workerRole); + components.Save(paths); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/Scaffolding/PythonRules.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/Scaffolding/PythonRules.cs new file mode 100644 index 000000000000..df0e6b8021f0 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/Scaffolding/PythonRules.cs @@ -0,0 +1,56 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System.Collections.Generic; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService.Scaffolding +{ + public static class PythonRules + { + public static void AddRoleToConfig(string path, Dictionary parameters) { + RoleInfo role = parameters["Role"] as RoleInfo; + ServiceComponents components = parameters["Components"] as ServiceComponents; + PowerShellProjectPathInfo paths = parameters["Paths"] as PowerShellProjectPathInfo; + RoleSettings settings = XmlUtilities.DeserializeXmlFile(path).Role[0]; + + components.AddRoleToConfiguration(settings, DevEnv.Cloud); + components.AddRoleToConfiguration(settings, DevEnv.Local); + components.Save(paths); + } + + public static void AddWebRoleToDef(string path, Dictionary parameters) { + RoleInfo role = parameters["Role"] as RoleInfo; + ServiceComponents components = parameters["Components"] as ServiceComponents; + PowerShellProjectPathInfo paths = parameters["Paths"] as PowerShellProjectPathInfo; + WebRole webRole = XmlUtilities.DeserializeXmlFile(path).WebRole[0]; + + role.AddRoleToDefinition(components.Definition, webRole); + components.Save(paths); + } + + public static void AddWorkerRoleToDef(string path, Dictionary parameters) { + RoleInfo role = parameters["Role"] as RoleInfo; + ServiceComponents components = parameters["Components"] as ServiceComponents; + PowerShellProjectPathInfo paths = parameters["Paths"] as PowerShellProjectPathInfo; + WorkerRole workerRole = XmlUtilities.DeserializeXmlFile(path).WorkerRole[0]; + + role.AddRoleToDefinition(components.Definition, workerRole); + components.Save(paths); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/Scaffolding/Scaffold.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/Scaffolding/Scaffold.cs new file mode 100644 index 000000000000..a1cd70481fc8 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/Scaffolding/Scaffold.cs @@ -0,0 +1,183 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using System.Text.RegularExpressions; +using System.Xml.Linq; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService.Scaffolding +{ + public class Scaffold + { + public List Files { get; private set; } + + public Scaffold() + { + Files = new List(); + } + + public static void ReplaceParameterRule(string path, Dictionary parameters) + { + string contents = FileUtilities.DataStore.ReadFileAsText(path); + + contents = ReplaceParameter(contents, parameters); + + FileUtilities.DataStore.WriteFile(path, contents); + } + + public static string ReplaceParameter(string text, Dictionary parameters) + { + foreach (KeyValuePair pair in parameters) + { + text = text.Replace(string.Format("${0}$", pair.Key), pair.Value.ToString()); + } + return text; + } + + public static void GenerateScaffolding(string sourcePath, string destPath, Dictionary parameters) + { + sourcePath = Path.GetFullPath(sourcePath); + Scaffold scaffold = Parse(Path.Combine(sourcePath, Resources.ScaffoldXml)); + + foreach (ScaffoldFile file in scaffold.Files) + { + string sourceDirectory; + if(string.IsNullOrEmpty(file.SourceDirectory) || + !parameters.ContainsKey(file.SourceDirectory)) + { + sourceDirectory = sourcePath; + } else { + sourceDirectory = (string) parameters[file.SourceDirectory]; + } + + + foreach (string path in GetPaths(sourceDirectory, file)) + { + string tempPath; + + if (string.IsNullOrEmpty(file.PathExpression)) + { + tempPath = !string.IsNullOrEmpty(file.TargetPath) ? file.TargetPath : GetRelativePath(sourceDirectory, path); + } + else + { + if (string.IsNullOrEmpty(file.TargetPath)) + { + tempPath = GetRelativePath(sourceDirectory, path); + } + else + { + tempPath = GetRelativePath(sourceDirectory, path); + string t1 = tempPath.Substring(tempPath.IndexOf('\\') + 1); + tempPath = Path.Combine(file.TargetPath, t1); + } + } + + tempPath = Path.Combine(destPath, tempPath); + FileUtilities.DataStore.CreateDirectory(Path.GetDirectoryName(tempPath)); + + FileUtilities.DataStore.CopyFile(path, tempPath); + + foreach (ScaffoldRule rule in file.Rules) + { + rule(tempPath, parameters); + } + + if (!file.Copy) + { + FileUtilities.DataStore.DeleteFile(tempPath); + } + } + } + } + + private static List GetPaths(string sourcePath, ScaffoldFile file) + { + List paths = new List(); + if (!string.IsNullOrEmpty(file.PathExpression)) + { + foreach (string fullPath in FileUtilities.DataStore.GetFiles(sourcePath, "*", SearchOption.AllDirectories)) + { + string relativePath = GetRelativePath(sourcePath, fullPath); + if (Regex.IsMatch(relativePath, file.PathExpression)) + { + paths.Add(fullPath); + } + } + } + else + { + paths.Add(Path.Combine(sourcePath, file.Path)); + } + + return paths; + } + + internal static string GetRelativePath(string sourcePath, string fullPath) + { + string relativePath = fullPath.Substring(sourcePath.Length, fullPath.Length - sourcePath.Length).TrimStart('\\'); + return relativePath; + } + + public static Scaffold Parse(string path) + { + XDocument document = XDocument.Parse(FileUtilities.DataStore.ReadFileAsText(path)); + Scaffold scaffold = new Scaffold(); + + foreach (XElement fileElement in document.Root.Elements(XName.Get("ScaffoldFile"))) + { + ScaffoldFile scaffoldFile = new ScaffoldFile(); + scaffoldFile.Path = GetAttribute(fileElement, "Path"); + scaffoldFile.Copy = bool.Parse(GetAttribute(fileElement, "Copy") ?? "true"); + scaffoldFile.TargetPath = GetAttribute(fileElement, "TargetPath"); + scaffoldFile.PathExpression = GetAttribute(fileElement, "PathExpression"); + scaffoldFile.SourceDirectory = GetAttribute(fileElement, "SourceDirectory"); + + foreach (XElement ruleElement in fileElement.Elements()) + { + string[] names = ruleElement.Name.LocalName.Split('.'); + string className = string.Format("{0}.{1}", typeof(Scaffold).Namespace, names[0]); + string methodName = names[1]; + Type type = typeof(Scaffold).Assembly.GetType(className); + MethodInfo ruleInfo = type.GetMethod(methodName, BindingFlags.Static | BindingFlags.InvokeMethod | BindingFlags.Public); + ScaffoldRule rule = Delegate.CreateDelegate(typeof(ScaffoldRule), ruleInfo) as ScaffoldRule; + scaffoldFile.Rules.Add(rule); + } + + scaffold.Files.Add(scaffoldFile); + } + + return scaffold; + } + + private static string GetAttribute(XElement fileElement, string attributeName) + { + string value = null; + XAttribute attribute = fileElement.Attribute(XName.Get(attributeName)); + if (attribute != null) + { + value = attribute.Value; + } + + return value; + } + } + + public delegate void ScaffoldRule(string path, Dictionary parameters); +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/Scaffolding/ScaffoldFile.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/Scaffolding/ScaffoldFile.cs new file mode 100644 index 000000000000..60e2029dd776 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/Scaffolding/ScaffoldFile.cs @@ -0,0 +1,83 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService.Scaffolding +{ + /// + /// Represents an individual scaffolding file to copy and/or transform. + /// + public class ScaffoldFile + { + /// + /// Gets or sets the relative path to the scaffold file. + /// + public string Path { get; set; } + + /// + /// Gets or sets an optional directory to use when resolving the + /// relative Path. + /// + /// + /// The value of the SourceDirectory is currently expected to be a + /// string value in the parameters dictionary passed in for the + /// generation of scaffolding. We would like to change this at some + /// point in the future. + /// + public string SourceDirectory { get; set; } + + /// + /// Gets or sets a .NET regular expression that will be matched against + /// every file in the directory to determine a set of files to act + /// upon. + /// + /// + /// If a PathExpression is provided, it will be used instead of any + /// provided Path. + /// + public string PathExpression { get; set; } + + /// + /// Gets or sets the relative target path of the file. This is useful + /// if you want to change the name of a file when copying it. + /// + public string TargetPath { get; set; } + + /// + /// Gets or sets a value indicating whether or not the file should be + /// copied. + /// + /// + /// The default value is true. It's only useful to turn this off when + /// combined with custom rules. + /// + public bool Copy { get; set; } + + /// + /// Gets a collection of rules to apply to the file. The rules are + /// applied in sequence. + /// + public List Rules { get; private set; } + + /// + /// Initializes a new instance of the ScaffoldFile class. + /// + public ScaffoldFile() + { + Copy = true; + Rules = new List(); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/Scaffolding/ScaffoldParams.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/Scaffolding/ScaffoldParams.cs new file mode 100644 index 000000000000..ab4da4b16778 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/Scaffolding/ScaffoldParams.cs @@ -0,0 +1,33 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService.Scaffolding +{ + public static class ScaffoldParams + { + public const string Role = "Role"; + public const string Components = "Components"; + public const string RoleName = "RoleName"; + public const string InstancesCount = "InstancesCount"; + public const string Port = "Port"; + public const string Paths = "Paths"; + public const string Slot = "Slot"; + public const string Subscription = "Subscription"; + public const string Location = "Location"; + public const string StorageAccountName = "StorageAccountName"; + public const string ServiceName = "ServiceName"; + public const string NodeModules = "NodeModules"; + public const string NodeJsProgramFilesX86 = "NodeJsProgramFilesX86"; + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/ServiceComponents.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/ServiceComponents.cs new file mode 100644 index 000000000000..59c0b53c06e4 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/ServiceComponents.cs @@ -0,0 +1,485 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService +{ + public class ServiceComponents + { + public ServiceDefinition Definition { get; private set; } + public ServiceConfiguration CloudConfig { get; private set; } + public ServiceConfiguration LocalConfig { get; private set; } + public ServiceSettings Settings { get; private set; } + + public ServiceComponents(CloudProjectPathInfo paths) + { + LoadComponents(paths); + } + + public ServiceComponents(string cloudConfiguration) + { + Validate.ValidateFileFull(cloudConfiguration, Resources.ServiceConfiguration); + CloudConfig = XmlUtilities.DeserializeXmlFile(cloudConfiguration); + } + + private void LoadComponents(CloudProjectPathInfo paths) + { + Validate.ValidateNullArgument(paths, string.Format(Resources.NullObjectMessage, "paths")); + Validate.ValidateFileFull(paths.CloudConfiguration, Resources.ServiceConfiguration); + Validate.ValidateFileFull(paths.LocalConfiguration, Resources.ServiceConfiguration); + Validate.ValidateFileFull(paths.Definition, Resources.ServiceDefinition); + + try + { + Validate.ValidateFileFull(paths.Settings, Resources.ServiceSettings); + } + catch (FileNotFoundException) + { + // Try recreating the settings file + FileUtilities.DataStore.WriteFile(paths.Settings, Resources.SettingsFileEmptyContent); + } + + Definition = XmlUtilities.DeserializeXmlFile(paths.Definition); + CloudConfig = XmlUtilities.DeserializeXmlFile(paths.CloudConfiguration); + LocalConfig = XmlUtilities.DeserializeXmlFile(paths.LocalConfiguration); + Settings = ServiceSettings.Load(paths.Settings); + } + + public void Save(CloudProjectPathInfo paths) + { + // Validate directory exists and it's valid + if (paths == null) throw new ArgumentNullException("paths"); + + XmlUtilities.SerializeXmlFile(Definition, paths.Definition); + XmlUtilities.SerializeXmlFile(CloudConfig, paths.CloudConfiguration); + XmlUtilities.SerializeXmlFile(LocalConfig, paths.LocalConfiguration); + Settings.Save(paths.Settings); + } + + public void SetRoleInstances(string roleName, int instances) + { + Validate.ValidateStringIsNullOrEmpty(roleName, Resources.RoleName); + if (instances <= 0 || instances > int.Parse(Resources.RoleMaxInstances)) + { + throw new ArgumentException(string.Format(Resources.InvalidInstancesCount, roleName)); + } + + if (!RoleExists(roleName)) + { + throw new ArgumentException(string.Format(Resources.RoleNotFoundMessage, roleName)); + } + + CloudConfig.Role.First(r => r.name.Equals(roleName, StringComparison.OrdinalIgnoreCase)).Instances.count = instances; + LocalConfig.Role.First(r => r.name.Equals(roleName, StringComparison.OrdinalIgnoreCase)).Instances.count = instances; + } + + /// + /// Sets the VM size of a role + /// + /// The role name + /// The VM size + public void SetRoleVMSize(string roleName, string vmSize) + { + Validate.ValidateStringIsNullOrEmpty(roleName, Resources.RoleName); + + if (!RoleExists(roleName)) + { + throw new ArgumentException(string.Format(Resources.RoleNotFoundMessage, roleName)); + } + + WebRole webRole = GetWebRole(roleName); + + if (webRole != null) + { + webRole.vmsize = vmSize; + } + else + { + WorkerRole workerRole = GetWorkerRole(roleName); + workerRole.vmsize = vmSize; + } + } + + /// + /// Gets the worker role if exists otherwise return null. + /// + /// The worker role name + /// The worker role object from service definition + public WorkerRole GetWorkerRole(string name) + { + if (Definition.WorkerRole != null) + { + return Definition.WorkerRole.FirstOrDefault(r => r.name.Equals(name, StringComparison.OrdinalIgnoreCase)); + } + + return null; + } + + /// + /// Gets the web role if exists otherwise return null. + /// + /// The web role name + /// The web role object from service definition + public WebRole GetWebRole(string name) + { + if (Definition.WebRole != null) + { + return Definition.WebRole.FirstOrDefault(r => r.name.Equals(name, StringComparison.OrdinalIgnoreCase)); + } + + return null; + } + + /// + /// Gets the role if exists otherwise return null. + /// + /// The role name + /// The role object from cloud configuration + public RoleSettings GetCloudConfigRole(string name) + { + if (CloudConfig.Role != null) + { + return CloudConfig.Role.FirstOrDefault(r => r.name.Equals(name, StringComparison.OrdinalIgnoreCase)); + } + + return null; + } + + /// + /// Gets the role if exists otherwise return null. + /// + /// The role name + /// The role object from local configuration + public RoleSettings GetLocalConfigRole(string name) + { + if (LocalConfig.Role != null) + { + return LocalConfig.Role.FirstOrDefault(r => r.name.Equals(name, StringComparison.OrdinalIgnoreCase)); + } + + return null; + } + + /// + /// Gets all role settings that matches the given name. + /// + /// Role names collection + /// Matched items + public IEnumerable GetRoles(IEnumerable roleNames) + { + if (CloudConfig.Role != null) + { + return Array.FindAll(CloudConfig.Role, r => Array.Exists( + roleNames.ToArray(), s => s.Equals(r.name, StringComparison.OrdinalIgnoreCase))); + } + + return Enumerable.Empty(); + } + + /// + /// Gets all existing role names. + /// + /// All roles in the cloud service project + public IEnumerable GetRoles() + { + if (CloudConfig.Role != null) + { + return CloudConfig.Role.Select(r => r.name); + } + + return Enumerable.Empty(); + } + + /// + /// Gets all worker roles that matches given predicate. + /// + /// The matching predicate + /// Matched items + public IEnumerable GetWorkerRoles(Predicate predicate) + { + return Array.FindAll(Definition.WorkerRole, predicate); + } + + /// + /// Applied given action to all matching + /// + /// + /// + public void ForEachRoleSettings(Func predicate, Action action) + { + if (CloudConfig.Role != null) + { + IEnumerable matchedRoles = CloudConfig.Role.Where(predicate); + matchedRoles.ForEach(action); + } + } + + /// + /// Gets the next available port, starts from 80. + /// + /// The port number + public int GetNextPort() + { + if (Definition.WebRole == null && Definition.WorkerRole == null) + { + // First role will have port #80 + // + return int.Parse(Resources.DefaultWebPort); + } + else + { + int maxWeb = 0; + int maxWorker = 0; + + maxWeb = Definition.WebRole.MaxOrDefault(wr => (wr.Endpoints?? new Endpoints()).InputEndpoint.MaxOrDefault(ie => ie.port, 0), 0); + maxWorker = Definition.WorkerRole.MaxOrDefault(wr => (wr.Endpoints ?? new Endpoints()).InputEndpoint.MaxOrDefault(ie => ie.port, 0), 0); + int maxPort = Math.Max(maxWeb, maxWorker); + + if (maxPort == 0) + { + // If this is first external endpoint, use default web role port + return int.Parse(Resources.DefaultWebPort); + } + else if (maxPort == int.Parse(Resources.DefaultWebPort)) + { + // This is second role to be added + return int.Parse(Resources.DefaultPort); + } + else + { + // Increase max port and return it + return (maxPort + 1); + } + } + } + + /// + /// Adds the given role settings to the specified configuration file. + /// + /// The role settings instance + /// The environment + public void AddRoleToConfiguration(RoleSettings role, DevEnv env) + { + Validate.ValidateNullArgument(role, string.Format(Resources.NullRoleSettingsMessage, "ServiceConfiguration")); + + ServiceConfiguration config = (env == DevEnv.Cloud) ? CloudConfig : LocalConfig; + + if (config.Role == null) + { + config.Role = new RoleSettings[] { role }; + } + else + { + config.Role = config.Role.Concat(new RoleSettings[] { role }).ToArray(); + } + } + + /// + /// Determines if a specified role exists in service components (*.csdef, local and cloud *cscfg) or not. + /// + /// Role name + /// bool value indicating whether this role is found or not + public bool RoleExists(string roleName) + { + // If any one of these fields doesn't have elements then this means no roles added at all or + // there's inconsistency between service components. + // + if ((Definition.WebRole == null && Definition.WorkerRole == null) || CloudConfig.Role == null || LocalConfig.Role == null) + return false; + else + { + return (GetWebRole(roleName) != null || GetWorkerRole(roleName) != null) && // exists in csdef + GetCloudConfigRole(roleName) != null && GetLocalConfigRole(roleName) != null; // exists in local/cloud cscfg + } + } + + /// + /// Validates if given role name is valid or not + /// + /// Role name to be checked + /// + /// This method doesn't check if the role exists in service components or not. To check for role existence use RoleExists + public static bool ValidRoleName(string roleName) + { + try + { + Validate.ValidateFileName(roleName); + Validate.HasWhiteCharacter(roleName); + + return true; + } + catch + { + return false; + } + } + + /// + /// Gets role startup. + /// + /// The role name + /// The role startup + public Startup GetRoleStartup(string roleName) + { + if (!RoleExists(roleName)) + { + throw new ArgumentException(string.Format(Resources.RoleNotFoundMessage, roleName)); + } + + WebRole webRole = GetWebRole(roleName); + WorkerRole workerRole = GetWorkerRole(roleName); + Startup startup = webRole != null ? webRole.Startup : workerRole.Startup; + + return startup; + } + + /// + /// Decides if the given role is web or worker role. + /// + /// The role name + /// Boolean flag indicates if the role is web or not + public bool IsWebRole(string roleName) + { + WebRole webRole = GetWebRole(roleName); + return webRole != null ? true : false; + } + + /// + /// Checks if a startup task exists with specified command line. + /// + /// The role name + /// The possible command line for the task + /// True if exists, false otherwise + public bool StartupTaskExists(string roleName, params string[] commandLines) + { + return GetStartupTask(roleName, commandLines) != null; + } + + /// + /// Adds new startup task to the given role. + /// + /// The role name + /// The startup task command line + /// The execution context + /// The environment variables + public void AddStartupTask( + string roleName, + string commandLine, + ExecutionContext context, + params Variable[] variables) + { + Startup roleStartup = GetRoleStartup(roleName) ?? new Startup(); + Task newTask = new Task + { + Environment = variables, + commandLine = commandLine, + executionContext = context + }; + + roleStartup.Task = GeneralUtilities.ExtendArray(roleStartup.Task, newTask); + } + + /// + /// Searches for a startup task that matches one of the given command lines for the specified role. + /// + /// The role name + /// The command line to match + /// The startup task object + public Task GetStartupTask(string roleName, params string[] commandLines) + { + Startup startup = GetRoleStartup(roleName); + + foreach (string commandLine in commandLines) + { + if (startup != null) + { + Task task = startup.Task.FirstOrDefault(t => t.commandLine.Equals(commandLine)); + + if (task != null) + { + return task; + } + } + } + + return null; + } + + /// + /// Sets a startup task environment variable. + /// + /// The role name + /// The environment variable name + /// The environment variable value + /// The command line to match task. + public void SetStartupTaskVariable(string roleName, string name, string value, params string[] commandLines) + { + Task task = GetStartupTask(roleName, commandLines); + bool found = false; + + if (task != null && task.Environment != null) + { + for (int i = 0; i < task.Environment.Length; i++) + { + if (task.Environment[i].name.Equals(name, StringComparison.OrdinalIgnoreCase)) + { + task.Environment[i].value = value; + found = true; + break; + } + } + + if (!found) + { + Variable var = new Variable() { name = name, value = value }; + task.Environment = GeneralUtilities.ExtendArray(task.Environment, var); + } + } + } + + /// + /// Gets startup task variable with the specified name. + /// + /// The role name + /// The variable name + /// The startup task command line arguments + /// + public string GetStartupTaskVariable(string roleName, string name, params string[] commandLines) + { + Task task = GetStartupTask(roleName, commandLines); + Variable variable = null; + + if (task != null && task.Environment != null) + { + variable = task.Environment.FirstOrDefault(v => v.name.Equals(name, StringComparison.OrdinalIgnoreCase)); + } + + if (variable != null) + { + return variable.value; + } + + return null; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/ServiceManagementBaseCmdlet.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/ServiceManagementBaseCmdlet.cs new file mode 100644 index 000000000000..204253015b96 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/ServiceManagementBaseCmdlet.cs @@ -0,0 +1,275 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Management.Automation; +using System.Management.Automation.Runspaces; +using System.ServiceModel; +using System.ServiceModel.Dispatcher; +using AutoMapper; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Management; +using Microsoft.WindowsAzure.Management.Compute; +using Microsoft.WindowsAzure.Management.Network; +using Microsoft.WindowsAzure.Management.Storage; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common +{ + public abstract class ServiceManagementBaseCmdlet : CloudBaseCmdlet + { + private Lazy runspace; + + protected ServiceManagementBaseCmdlet() + { + runspace = new Lazy(() => { + var localRunspace = RunspaceFactory.CreateRunspace(this.Host); + localRunspace.Open(); + return localRunspace; + }); + client = new Lazy(CreateClient); + computeClient = new Lazy(CreateComputeClient); + storageClient = new Lazy(CreateStorageClient); + networkClient = new Lazy(CreateNetworkClient); + } + + public ManagementClient CreateClient() + { + return AzureSession.ClientFactory.CreateClient(CurrentContext.Subscription, AzureEnvironment.Endpoint.ServiceManagement); + } + + public ComputeManagementClient CreateComputeClient() + { + return AzureSession.ClientFactory.CreateClient(CurrentContext.Subscription, AzureEnvironment.Endpoint.ServiceManagement); + } + + public StorageManagementClient CreateStorageClient() + { + return AzureSession.ClientFactory.CreateClient(CurrentContext.Subscription, AzureEnvironment.Endpoint.ServiceManagement); + } + + public NetworkManagementClient CreateNetworkClient() + { + return AzureSession.ClientFactory.CreateClient(CurrentContext.Subscription, AzureEnvironment.Endpoint.ServiceManagement); + } + + private Lazy client; + public ManagementClient ManagementClient + { + get { return client.Value; } + } + + private Lazy computeClient; + public ComputeManagementClient ComputeClient + { + get { return computeClient.Value; } + } + + private Lazy storageClient; + public StorageManagementClient StorageClient + { + get { return storageClient.Value; } + } + + private Lazy networkClient; + public NetworkManagementClient NetworkClient + { + get { return networkClient.Value; } + } + + protected override void InitChannelCurrentSubscription(bool force) + { + } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "Disposing the client would also dispose the channel we are returning.")] + protected override IServiceManagement CreateChannel() + { + // If ShareChannel is set by a unit test, use the same channel that + // was passed into out constructor. This allows the test to submit + // a mock that we use for all network calls. + if (ShareChannel) + { + return Channel; + } + + var messageInspectors = new List + { + new ServiceManagementClientOutputMessageInspector(), + new HttpRestMessageInspector(this.WriteDebug) + }; + + /* + var clientOptions = new ServiceManagementClientOptions(null, null, null, 0, RetryPolicy.NoRetryPolicy, ServiceManagementClientOptions.DefaultOptions.WaitTimeForOperationToComplete, messageInspectors); + var smClient = new ServiceManagementClient(new Uri(this.ServiceEndpoint), CurrentContext.Subscription.SubscriptionId, CurrentContext.Subscription.Certificate, clientOptions); + + Type serviceManagementClientType = typeof(ServiceManagementClient); + PropertyInfo propertyInfo = serviceManagementClientType.GetProperty("SyncService", BindingFlags.Instance | BindingFlags.NonPublic); + var syncService = (IServiceManagement)propertyInfo.GetValue(smClient, null); + + return syncService; + */ + return null; + } + + /// + /// Invoke the given operation within an OperationContextScope if the + /// channel supports it. + /// + /// The action to invoke. + protected override void InvokeInOperationContext(Action action) + { + IContextChannel contextChannel = ToContextChannel(); + if (contextChannel != null) + { + using (new OperationContextScope(contextChannel)) + { + action(); + } + } + else + { + action(); + } + } + + protected virtual IContextChannel ToContextChannel() + { + try + { + //return Channel.ToContextChannel(); + return null; + } + catch (Exception) + { + return null; + } + } + + protected virtual void WriteExceptionDetails(Exception exception) + { + if (CommandRuntime != null) + { + WriteError(new ErrorRecord(exception, string.Empty, ErrorCategory.CloseError, null)); + } + } + + protected OperationStatusResponse GetOperationStatusNewSM(string operationId) + { + OperationStatusResponse response = this.ManagementClient.GetOperationStatus(operationId); + return response; + } + + protected OperationStatusResponse GetOperationNewSM(string operationId) + { + OperationStatusResponse operation = null; + + try + { + operation = GetOperationStatusNewSM(operationId); + + if (operation.Status == OperationStatus.Failed) + { + var errorMessage = string.Format(CultureInfo.InvariantCulture, "{0}: {1}", operation.Status, operation.Error.Message); + var exception = new Exception(errorMessage); + WriteError(new ErrorRecord(exception, string.Empty, ErrorCategory.CloseError, null)); + } + } + catch (AggregateException ex) + { + WriteExceptionDetails(ex); + } + + return operation; + } + + //TODO: Input argument is not used and should probably be removed. + protected void ExecuteClientActionNewSM(object input, string operationDescription, Func action, Func contextFactory) where TResult : OperationResponse + { + ExecuteClientActionNewSM(input, operationDescription, action, null, contextFactory); + } + + protected void ExecuteClientActionNewSM(object input, string operationDescription, Func action, Func waitOperation, Func contextFactory) where TResult : OperationResponse + { + TResult result = null; + OperationStatusResponse operation = null; + WriteVerboseWithTimestamp(string.Format(Resources.ServiceManagementExecuteClientActionInOCSBeginOperation, operationDescription)); + try + { + try + { + result = action(); + } + catch (CloudException ex) + { + WriteExceptionDetails(ex); + } + + if (result is OperationStatusResponse) + { + operation = result as OperationStatusResponse; + } + else + { + if (waitOperation == null) + { + operation = result == null ? null : GetOperationNewSM(result.RequestId); + } + else + { + operation = result == null ? null : waitOperation(result.RequestId, operationDescription); + } + } + } + catch (AggregateException ex) + { + if (ex.InnerException is CloudException) + { + WriteExceptionDetails(ex.InnerException); + } + else + { + WriteExceptionDetails(ex); + } + } + + WriteVerboseWithTimestamp(string.Format(Resources.ServiceManagementExecuteClientActionInOCSCompletedOperation, operationDescription)); + + if (result != null) + { + var context = contextFactory(operation, result); + if (context != null) + { + WriteObject(context, true); + } + } + } + + protected void ExecuteClientActionNewSM(object input, string operationDescription, Func action) where TResult : OperationResponse + { + this.ExecuteClientActionNewSM(input, operationDescription, action, (s, response) => this.ContextFactory(response, s)); + } + + protected T2 ContextFactory(T1 source, OperationStatusResponse response) where T2 : ManagementOperationContext + { + var context = Mapper.Map(source); + context = Mapper.Map(response, context); + context.OperationDescription = CommandRuntime.ToString(); + return context; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/ServiceSettings.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/ServiceSettings.cs new file mode 100644 index 000000000000..30d06f454e59 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/ServiceSettings.cs @@ -0,0 +1,384 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Text; +using System.Web.Script.Serialization; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService +{ + public class ServiceSettings + { + /// + /// Minimum length of a valid storage account name. + /// http://msdn.microsoft.com/en-us/library/windowsazure/hh264518.aspx + /// + private const int MinimumStorageAccountNameLength = 3; + + /// + /// Maximum length of a valid storage account name. + /// http://msdn.microsoft.com/en-us/library/windowsazure/hh264518.aspx + /// + private const int MaximumStorageAccountNameLength = 24; + + // Flag indicating whether the ServiceSettings have already been loaded + // and should begin validating any properties (which is used to allow + // the deserializer to set empty values without tripping validation) + private bool _shouldValidate = false; + + public string Slot + { + get { return _slot; } + set + { + if (_shouldValidate) + { + Validate.ValidateStringIsNullOrEmpty(value, "Slot"); + if (!DeploymentSlotType.Production.Equals(value, StringComparison.OrdinalIgnoreCase) && + !DeploymentSlotType.Staging.Equals(value, StringComparison.OrdinalIgnoreCase)) + { + throw new ArgumentException(string.Format(Resources.InvalidServiceSettingElement, "Slot")); + } + } + + _slot = value ?? string.Empty; + } + } + private string _slot = null; + + public string Location + { + get { return _location; } + set + { + if (_shouldValidate) + { + Validate.ValidateStringIsNullOrEmpty(value, "Location"); + } + + _location = value ?? string.Empty; + } + } + private string _location = null; + + public string Subscription + { + get { return _subscription; } + set + { + if (_shouldValidate) + { + Validate.ValidateStringIsNullOrEmpty(value, "Subscription"); + } + _subscription = value ?? string.Empty; + } + } + private string _subscription = null; + + public string StorageServiceName + { + get { return _storageAccountName; } + set + { + if (_shouldValidate) + { + Validate.ValidateStringIsNullOrEmpty(value, "StorageAccountName"); + } + _storageAccountName = value ?? string.Empty; + } + } + private string _storageAccountName = null; + + public string AffinityGroup + { + get { return _affinityGroup; } + set + { + if (_shouldValidate) + { + Validate.ValidateStringIsNullOrEmpty(value, "AffinityGroup"); + } + + _affinityGroup = value ?? string.Empty; + } + } + private string _affinityGroup = null; + + public static string DefaultLocation { get; set; } + + public ServiceSettings() + { + _slot = string.Empty; + _location = string.Empty; + _affinityGroup = string.Empty; + _subscription = string.Empty; + _storageAccountName = string.Empty; + } + + public static ServiceSettings Load(string path) + { + Validate.ValidateFileFull(path, Resources.ServiceSettings); + + string text = FileUtilities.DataStore.ReadFileAsText(path); + ServiceSettings settings = new JavaScriptSerializer().Deserialize(text); + settings._shouldValidate = true; + + return settings; + } + + public static ServiceSettings LoadDefault( + string path, + string slot, + string location, + string affinityGroup, + string subscription, + string storageAccountName, + string suppliedServiceName, + string serviceDefinitionName, + out string serviceName) + { + ServiceSettings local; + ServiceSettings defaultServiceSettings = new ServiceSettings(); + + if (string.IsNullOrEmpty(path) || !File.Exists(path)) + { + local = new ServiceSettings(); + } + else + { + Validate.ValidateFileFull(path, Resources.ServiceSettings); + local = Load(path); + } + + defaultServiceSettings._slot = GetDefaultSlot(local.Slot, null, slot); + defaultServiceSettings._location = GetDefaultLocation(local.Location, location); + defaultServiceSettings._subscription = GetDefaultSubscription(local.Subscription, subscription); + serviceName = GetServiceName(suppliedServiceName, serviceDefinitionName); + defaultServiceSettings._storageAccountName = GetDefaultStorageName(local.StorageServiceName, null, storageAccountName, serviceName).ToLower(); + defaultServiceSettings._affinityGroup = affinityGroup; + + return defaultServiceSettings; + } + + private static string GetServiceName(string suppliedServiceName, string serviceDefinitionName) + { + // If user supplied value as parameter then return it + // + if (!string.IsNullOrEmpty(suppliedServiceName)) + { + return suppliedServiceName; + } + + // Check to see if you have service name from *csdef + // + if (string.IsNullOrEmpty(serviceDefinitionName)) + { + // This line will be touched only if the cmd running doesn't require service name + // + return string.Empty; + } + + return serviceDefinitionName; + } + + private static string GetDefaultStorageName(string localStorageName, string globalStorageAccountName, string storageAccountName, string serviceName) + { + Debug.Assert(serviceName != null, "serviceName cannot be null."); + + string name = serviceName; + + // If user supplied value as parameter then return it + if (!string.IsNullOrEmpty(storageAccountName)) + { + name = storageAccountName; + } + // User already has value in local service settings + else if (!string.IsNullOrEmpty(localStorageName)) + { + name = localStorageName; + } + // User already has value in global service settings + else if (!string.IsNullOrEmpty(globalStorageAccountName)) + { + name = globalStorageAccountName; + } + // If none of previous succeed, use service name as storage account name + else if (!string.IsNullOrEmpty(serviceName)) + { + name = SanitizeStorageAccountName(serviceName); + } + + name = name.ToLower(); + ValidateStorageAccountName(name); + + return name; + } + + /// + /// Sanitize a name for use as a storage account name. + /// + /// The potential storage account name. + /// The sanitized storage account name. + private static string SanitizeStorageAccountName(string name) + { + // Replace any non-letters or non-digits with their hex equivalent + StringBuilder builder = new StringBuilder(name.Length); + foreach (char ch in name) + { + if (char.IsLetter(ch) || char.IsDigit(ch)) + { + builder.Append(ch); + } + else + { + builder.AppendFormat("x{0:X}", (ushort)ch); + } + } + + // Trim the sanitized name to at most 24 characters. + name = builder.ToString( + 0, + Math.Min(builder.Length, MaximumStorageAccountNameLength)); + + return name; + } + + /// + /// Validate that the storage account name contains only lower case + /// letters or numbers and is between 3 and 24 characters in length + /// (per http://msdn.microsoft.com/en-us/library/windowsazure/hh264518.aspx) + /// unless the string is empty (which can happen if it wasn't provided + /// or generated). + /// + /// The storage account name. + private static void ValidateStorageAccountName(string name) + { + if (!string.IsNullOrEmpty(name) && + (!name.All(c => char.IsLower(c) || char.IsDigit(c)) || + name.Length < MinimumStorageAccountNameLength || + name.Length > MaximumStorageAccountNameLength)) + { + throw new ArgumentException(string.Format(Resources.ServiceSettings_ValidateStorageAccountName_InvalidName, name)); + } + } + + private static string GetDefaultSubscription(string localSubscription, string subscription) + { + // If user supplied value as parameter then return it + // + if (!string.IsNullOrEmpty(subscription)) + { + return subscription; + } + + // User already has value in local service settings + // + if (!string.IsNullOrEmpty(localSubscription)) + { + return localSubscription; + } + + return null; + } + + private static string GetDefaultLocation(string localLocation, string location) + { + // If user supplied value as parameter then return it + // + if (!string.IsNullOrEmpty(location)) + { + return location.ToLower(); + } + + // User already has value in local service settings + // + if (!string.IsNullOrEmpty(localLocation)) + { + return localLocation.ToLower(); + } + + // If none of previous succeed, get the default environment location. + // + return DefaultLocation; + } + + private static string GetDefaultSlot(string localSlot, string globalSlot, string slot) + { + // If user supplied value as parameter then return it + // + if (!string.IsNullOrEmpty(slot)) + { + if (DeploymentSlotType.Production.Equals(slot, StringComparison.OrdinalIgnoreCase) || + DeploymentSlotType.Staging.Equals(slot, StringComparison.OrdinalIgnoreCase)) + { + return slot.ToLower(); + } + + throw new ArgumentException(string.Format(Resources.InvalidServiceSettingElement, "Slot")); + } + + // User already has value in local service settings + // + if (!string.IsNullOrEmpty(localSlot)) + { + return localSlot.ToLower(); + } + + // User already has value in global service settings + // + if (!string.IsNullOrEmpty(globalSlot)) + { + return globalSlot.ToLower(); + } + + // If none of previous succeed, use Production as default slot + // + return DeploymentSlotType.Production; + } + + public void Save(string path) + { + Validate.ValidateStringIsNullOrEmpty(path, Resources.ServiceSettings); + Validate.ValidateDirectoryFull(Path.GetDirectoryName(path), Resources.ServiceSettings); + + FileUtilities.DataStore.WriteFile(path, new JavaScriptSerializer().Serialize(this)); + } + + public override bool Equals(object obj) + { + ServiceSettings other = (ServiceSettings)obj; + + return + Location.Equals(other.Location) && + Slot.Equals(other.Slot) && + StorageServiceName.Equals(other.StorageServiceName) && + Subscription.Equals(other.Subscription); + } + + public override int GetHashCode() + { + return + Location.GetHashCode() ^ + Slot.GetHashCode() ^ + StorageServiceName.GetHashCode() ^ + Subscription.GetHashCode(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/VisualStudioProjectPathInfo.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/VisualStudioProjectPathInfo.cs new file mode 100644 index 000000000000..4752db0a553c --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/VisualStudioProjectPathInfo.cs @@ -0,0 +1,43 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using System.Linq; +using Microsoft.WindowsAzure.Commands.Common.Properties; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService +{ + public class VisualStudioProjectPathInfo : CloudProjectPathInfo + { + public static bool IsVisualStudioProject(string rootPath) + { + return Directory.GetFiles( + Directory.GetParent(rootPath).FullName, + "*.sln", + SearchOption.TopDirectoryOnly).Count() == 1; + } + + public VisualStudioProjectPathInfo(string rootPath) + : base(rootPath) + { + Definition = Path.Combine(rootPath, Resources.ServiceDefinitionFileName); + CloudConfiguration = Path.Combine(rootPath, Resources.CloudServiceConfigurationFileName); + LocalConfiguration = Path.Combine(rootPath, Resources.LocalServiceConfigurationFileName); + Settings = Path.Combine(rootPath, Resources.SettingsFileName); + CloudPackage = Path.Combine(rootPath, Resources.CloudPackageFileName); + LocalPackage = Path.Combine(rootPath, Resources.LocalPackageFileName); + RolesPath = Directory.GetParent(RootPath).FullName; + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/WebRoleInfo.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/WebRoleInfo.cs new file mode 100644 index 000000000000..6ac8f7978557 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/WebRoleInfo.cs @@ -0,0 +1,42 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService +{ + /// + /// RoleInfo implementation for WebRole + /// + public class WebRoleInfo : RoleInfo + { + public WebRoleInfo(string name, int instanceCount) : base(name, instanceCount) { } + + internal override void AddRoleToDefinition(ServiceDefinition def, object template) + { + WebRole webRole = template as WebRole; + var toAdd = new WebRole[] { webRole }; + + if (def.WebRole != null) + { + def.WebRole = def.WebRole.Concat(toAdd).ToArray(); + } + else + { + def.WebRole = toAdd; + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/WorkerRoleInfo.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/WorkerRoleInfo.cs new file mode 100644 index 000000000000..20c1f980b966 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/WorkerRoleInfo.cs @@ -0,0 +1,43 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema; + +namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService +{ + /// + /// Role Info for a worker role + /// + public class WorkerRoleInfo : RoleInfo + { + public WorkerRoleInfo(string name, int instanceCount = 1) : base(name, instanceCount) { } + + internal override void AddRoleToDefinition(ServiceDefinition def, object template) + { + base.AddRoleToDefinition(def, template); + WorkerRole workerRole = template as WorkerRole; + var toAdd = new WorkerRole[] { workerRole }; + + if (def.WorkerRole != null) + { + def.WorkerRole = def.WorkerRole.Concat(toAdd).ToArray(); + } + else + { + def.WorkerRole = toAdd; + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/MSSharedLibKey.snk b/src/ServiceManagement/Services/Commands.Utilities/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ServiceManagement/Services/Commands.Utilities/MSSharedLibKey.snk differ diff --git a/src/ServiceManagement/Services/Commands.Utilities/MediaServices/IMediaServicesClient.cs b/src/ServiceManagement/Services/Commands.Utilities/MediaServices/IMediaServicesClient.cs new file mode 100644 index 000000000000..fbb895ab247c --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/MediaServices/IMediaServicesClient.cs @@ -0,0 +1,74 @@ +// ---------------------------------------------------------------------------------- +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Management.MediaServices.Models; +using Microsoft.WindowsAzure.Management.Storage.Models; + +namespace Microsoft.WindowsAzure.Commands.Utilities.MediaServices +{ + /// + /// Defines interface to communicate with Azure Media Services REST API + /// + public interface IMediaServicesClient + { + /// + /// Gets the media service accounts async. + /// + /// + Task GetMediaServiceAccountsAsync(); + + /// + /// Gets the media service account details async. + /// + /// The name. + /// + Task GetMediaServiceAsync(string name); + + /// + /// Create new azure media service async. + /// + /// The request. + /// + Task CreateNewAzureMediaServiceAsync(MediaServicesAccountCreateParameters request); + + /// + /// Deletes azure media service account async. + /// + /// The name. + /// + Task DeleteAzureMediaServiceAccountAsync(string name); + + /// + /// Regenerates azure media service account key async. + /// + /// The name. + /// Key Type + /// + Task RegenerateMediaServicesAccountAsync(string name, MediaServicesKeyType keyType); + + /// + /// Gets the storage service keys. + /// + /// Name of the storage account. + /// + Task GetStorageServiceKeysAsync(string storageAccountName); + + /// + /// Gets the storage service properties. + /// + /// Name of the storage account. + /// + Task GetStorageServicePropertiesAsync(string storageAccountName); + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/MediaServices/MediaServicesClient.cs b/src/ServiceManagement/Services/Commands.Utilities/MediaServices/MediaServicesClient.cs new file mode 100644 index 000000000000..9886c252fd42 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/MediaServices/MediaServicesClient.cs @@ -0,0 +1,249 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Net; +using System.Net.Http; +using System.Runtime.Serialization; +using System.Text; +using System.Threading.Tasks; +using System.Xml; +using System.Xml.Serialization; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.ServiceManagement.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services; +using Microsoft.WindowsAzure.Management.MediaServices; +using Microsoft.WindowsAzure.Management.MediaServices.Models; +using Microsoft.WindowsAzure.Management.Storage; +using Microsoft.WindowsAzure.Management.Storage.Models; +using Newtonsoft.Json; + +namespace Microsoft.WindowsAzure.Commands.Utilities.MediaServices +{ + /// + /// Implements IMediaServicesClient to use HttpClient for communication + /// + public class MediaServicesClient : IMediaServicesClient + { + public const string MediaServiceVersion = "2013-03-01"; + private readonly IStorageManagementClient _storageClient; + public IMediaServicesManagementClient _mediaServicesManagementClient; + + /// + /// Creates new MediaServicesClient. + /// + /// The logger action + /// + /// + public MediaServicesClient(Action logger, IMediaServicesManagementClient mediaServicesManagementClient, IStorageManagementClient storageClient) + { + + Logger = logger; + _storageClient = storageClient; + _mediaServicesManagementClient = mediaServicesManagementClient; + + } + + /// + /// Creates new MediaServicesClient. + /// + /// The Microsoft Azure subscription data object + /// The logger action + public MediaServicesClient(AzureSubscription subscription, Action logger) + : this(logger, AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement), AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement)) + { + } + + + + + /// + /// Gets or sets the subscription. + /// + /// + /// The subscription. + /// + public AzureSubscription Subscription { get; set; } + + /// + /// Gets or sets the logger + /// + /// + /// The logger. + /// + public Action Logger { get; set; } + + + /// + /// Gets the media service accounts async. + /// + /// + public Task GetMediaServiceAccountsAsync() + { + return _mediaServicesManagementClient.Accounts.ListAsync(); + } + + + /// + /// Gets the storage service key. + /// + /// Name of the storage account. + /// + public Task GetStorageServiceKeysAsync(string storageAccountName) + { + return _storageClient.StorageAccounts.GetKeysAsync(storageAccountName); + } + + /// + /// Gets the storage service properties. + /// + /// Name of the storage account. + /// + public Task GetStorageServicePropertiesAsync(string storageAccountName) + { + return _storageClient.StorageAccounts.GetAsync(storageAccountName); + } + + /// + /// Gets the media service account details async. + /// + /// The name. + /// + public Task GetMediaServiceAsync(string name) + { + + return _mediaServicesManagementClient.Accounts.GetAsync(name); + } + + /// + /// Create new azure media service async. + /// + /// The request. + /// + public Task CreateNewAzureMediaServiceAsync(MediaServicesAccountCreateParameters request) + { + return _mediaServicesManagementClient.Accounts.CreateAsync(request); + } + + /// + /// Deletes azure media service account async. + /// + /// + public Task DeleteAzureMediaServiceAccountAsync(string name) + { + return _mediaServicesManagementClient.Accounts.DeleteAsync(name); + } + + /// + /// Deletes azure media service account async. + /// + public Task RegenerateMediaServicesAccountAsync(string name, MediaServicesKeyType keyType) + { + return _mediaServicesManagementClient.Accounts.RegenerateKeyAsync(name, keyType); + } + + /// + /// Processes the response and handle error cases. + /// + /// + /// The response message. + /// + private static T ProcessJsonResponse(Task responseMessage) + { + HttpResponseMessage message = responseMessage.Result; + if (typeof (T) == typeof (bool) && message.IsSuccessStatusCode) + { + return (T) (object) true; + } + + string content = message.Content.ReadAsStringAsync().Result; + + if (message.IsSuccessStatusCode) + { + return (T) JsonConvert.DeserializeObject(content, typeof (T)); + } + + throw CreateExceptionFromJson(message.StatusCode, content); + } + + private static T ProcessXmlResponse(Task responseMessage) + { + HttpResponseMessage message = responseMessage.Result; + string content = message.Content.ReadAsStringAsync().Result; + Encoding encoding = GetEncodingFromResponseMessage(message); + + if (message.IsSuccessStatusCode) + { + var ser = new DataContractSerializer(typeof (T)); + using (var stream = new MemoryStream(encoding.GetBytes(content))) + { + stream.Position = 0; + XmlDictionaryReader reader = XmlDictionaryReader.CreateTextReader(stream, new XmlDictionaryReaderQuotas()); + return (T) ser.ReadObject(reader, true); + } + } + + throw CreateExceptionFromXml(content, message); + } + + private static Encoding GetEncodingFromResponseMessage(HttpResponseMessage message) + { + string encodingString = message.Content.Headers.ContentType.CharSet; + Encoding encoding = Encoding.GetEncoding(encodingString); + return encoding; + } + + private static ServiceManagementClientException CreateExceptionFromXml(string content, HttpResponseMessage message) + { + Encoding encoding = GetEncodingFromResponseMessage(message); + + using (var stream = new MemoryStream(encoding.GetBytes(content))) + { + stream.Position = 0; + var serializer = new XmlSerializer(typeof (ServiceError)); + var serviceError = (ServiceError) serializer.Deserialize(stream); + return new ServiceManagementClientException(message.StatusCode, + new ServiceManagementError + { + Code = message.StatusCode.ToString(), + Message = serviceError.Message + }, + string.Empty); + } + } + + /// + /// Unwraps error message and creates ServiceManagementClientException. + /// + private static ServiceManagementClientException CreateExceptionFromJson(HttpStatusCode statusCode, string content) + { + var doc = new XmlDocument(); + doc.LoadXml(content); + content = doc.InnerText; + var serviceError = JsonConvert.DeserializeObject(content, typeof (ServiceError)) as ServiceError; + var exception = new ServiceManagementClientException(statusCode, + new ServiceManagementError + { + Code = statusCode.ToString(), + Message = serviceError.Message + }, + string.Empty); + return exception; + } + + + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/MediaServices/MediaServicesUriElements.cs b/src/ServiceManagement/Services/Commands.Utilities/MediaServices/MediaServicesUriElements.cs new file mode 100644 index 000000000000..3fade7f776c7 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/MediaServices/MediaServicesUriElements.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Utilities.MediaServices +{ + /// + /// Contains URI fragments and namespaces used by Azure Media Services cmdlets + /// + public class MediaServicesUriElements + { + //Namespaces + public const string AccountDetailsNamespace = "http://schemas.datacontract.org/2004/07/Microsoft.Cloud.Media.Management.ResourceProvider.Models"; + public const string ServiceNamespace = "http://schemas.microsoft.com/windowsazure"; + // Service resources + public const string MediaServiceRoot = "{subscriptionId}/services/mediaservices/Accounts"; + public const string MediaServiceAccountDetails = "{subscriptionId}/services/mediaservices/Accounts/{name}"; + public const string Accounts = "Accounts"; + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/MediaServices/Services/Entities/AccountCreationRequest.cs b/src/ServiceManagement/Services/Commands.Utilities/MediaServices/Services/Entities/AccountCreationRequest.cs new file mode 100644 index 000000000000..4b65960fd830 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/MediaServices/Services/Entities/AccountCreationRequest.cs @@ -0,0 +1,69 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Runtime.Serialization; +using Newtonsoft.Json; + +namespace Microsoft.WindowsAzure.Commands.Utilities.MediaServices.Services.Entities +{ + [DataContract] + [JsonObject(Title = "AccountCreationRequest")] + public class AccountCreationRequest + { + /// + /// Gets or sets the name of the account. + /// + /// + /// The name of the account. + /// + [DataMember] + public string AccountName { get; set; } + + /// + /// Gets or sets the BLOB storage endpoint URI. + /// + /// + /// The BLOB storage endpoint URI. + /// + [DataMember] + public string BlobStorageEndpointUri { get; set; } + + /// + /// Gets or sets the region. + /// + /// + /// The region. + /// + [DataMember] + public string Region { get; set; } + + /// + /// Gets or sets the storage account key. + /// + /// + /// The storage account key. + /// + [DataMember] + public string StorageAccountKey { get; set; } + + /// + /// Gets or sets the name of the storage account. + /// + /// + /// The name of the storage account. + /// + [DataMember] + public string StorageAccountName { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/MediaServices/Services/Entities/AccountCreationResult.cs b/src/ServiceManagement/Services/Commands.Utilities/MediaServices/Services/Entities/AccountCreationResult.cs new file mode 100644 index 000000000000..23ff9668250c --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/MediaServices/Services/Entities/AccountCreationResult.cs @@ -0,0 +1,58 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Runtime.Serialization; +using Microsoft.WindowsAzure.Management.MediaServices.Models; +using Newtonsoft.Json; + +namespace Microsoft.WindowsAzure.Commands.Utilities.MediaServices.Services.Entities +{ + [DataContract] + [JsonObject(Title = "AccountCreationResult")] + public sealed class AccountCreationResult + { + + public AccountCreationResult(MediaServicesAccountCreateResponse response) + { + this.AccountId = response.Account.AccountId; + this.Name = response.Account.AccountName; + this.Subscription = response.Account.SubscriptionId; + } + + /// + /// Gets or sets the account id. + /// + /// + /// The account id. + /// + public string AccountId { get; set; } + + /// + /// Gets or sets the name of the account. + /// + /// + /// The name of the account. + /// + [JsonProperty(PropertyName = "AccountName")] + public string Name { get; set; } + + /// + /// Gets or sets the subscription. + /// + /// + /// The subscription. + /// + public string Subscription { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/MediaServices/Services/Entities/AccountKeys.cs b/src/ServiceManagement/Services/Commands.Utilities/MediaServices/Services/Entities/AccountKeys.cs new file mode 100644 index 000000000000..62092e23ddf3 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/MediaServices/Services/Entities/AccountKeys.cs @@ -0,0 +1,40 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.MediaServices.Services.Entities +{ + [DataContract(Namespace = MediaServicesUriElements.AccountDetailsNamespace)] + public class AccountKeys + { + /// + /// Gets or sets the primary account key. + /// + /// + /// The primary. + /// + [DataMember] + public string Primary { get; set; } + + /// + /// Gets or sets the secondary account key. + /// + /// + /// The secondary. + /// + [DataMember] + public string Secondary { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/MediaServices/Services/Entities/MediaServiceAccount.cs b/src/ServiceManagement/Services/Commands.Utilities/MediaServices/Services/Entities/MediaServiceAccount.cs new file mode 100644 index 000000000000..3d06a5eca4dd --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/MediaServices/Services/Entities/MediaServiceAccount.cs @@ -0,0 +1,43 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Runtime.Serialization; +using Microsoft.WindowsAzure.Management.MediaServices.Models; +using Newtonsoft.Json; + +namespace Microsoft.WindowsAzure.Commands.Utilities.MediaServices.Services.Entities +{ + [DataContract(Namespace = MediaServicesUriElements.ServiceNamespace, Name = "ServiceResource")] + [JsonObject(Title = "ServiceResource")] + public class MediaServiceAccount + { + + public MediaServiceAccount(MediaServicesAccountListResponse.MediaServiceAccount response) + { + this.AccountId = Guid.Parse(response.AccountId); + this.Name = response.Name; + this.State = response.State; + } + + [DataMember(EmitDefaultValue = false, Order = 5)] + public Guid AccountId { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 0)] + public string Name { get; set; } + + [DataMember(EmitDefaultValue = false, Order = 2)] + public string State { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/MediaServices/Services/Entities/MediaServiceAccountDetails.cs b/src/ServiceManagement/Services/Commands.Utilities/MediaServices/Services/Entities/MediaServiceAccountDetails.cs new file mode 100644 index 000000000000..7c55fb2370d8 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/MediaServices/Services/Entities/MediaServiceAccountDetails.cs @@ -0,0 +1,59 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Runtime.Serialization; +using Microsoft.WindowsAzure.Management.MediaServices.Models; +using Newtonsoft.Json; + +namespace Microsoft.WindowsAzure.Commands.Utilities.MediaServices.Services.Entities +{ + [JsonObject(Title = "AccountDetails")] + [DataContract(Namespace = MediaServicesUriElements.AccountDetailsNamespace, Name = "AccountDetails")] + public class MediaServiceAccountDetails + { + public MediaServiceAccountDetails(MediaServicesAccountGetResponse response) + { + this.AccountKeys = response.Account.StorageAccountKeys; + this.Location = response.Account.AccountRegion; + this.StorageAccountName = response.Account.StorageAccountName; + this.Name = response.Account.AccountName; + } + [DataMember] + internal string AccountKey { get; set; } + + [DataMember] + internal MediaServicesAccount.AccountKeys AccountKeys { get; set; } + + [DataMember] + [JsonProperty(PropertyName = "AccountName")] + public string Name { get; set; } + + [DataMember] + [JsonProperty(PropertyName = "AccountRegion")] + public string Location { get; set; } + + [DataMember] + public string StorageAccountName { get; set; } + + public string MediaServicesPrimaryAccountKey + { + get { return AccountKeys.Primary; } + } + + public string MediaServicesSecondaryAccountKey + { + get { return AccountKeys.Secondary; } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/MediaServices/Services/Entities/PagedSites.cs b/src/ServiceManagement/Services/Commands.Utilities/MediaServices/Services/Entities/PagedSites.cs new file mode 100644 index 000000000000..5d933518e53f --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/MediaServices/Services/Entities/PagedSites.cs @@ -0,0 +1,13 @@ +using System.Runtime.Serialization; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; + +namespace Microsoft.WindowsAzure.Commands.Utilities.MediaServices.Services.Entities +{ + /// + /// Paged collection of sites + /// + [DataContract(Namespace = MediaServicesUriElements.ServiceNamespace)] + public class PagedSites : PagedSet + { + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Microsoft.WindowsAzure.Commands.CloudService.format.ps1xml b/src/ServiceManagement/Services/Commands.Utilities/Microsoft.WindowsAzure.Commands.CloudService.format.ps1xml new file mode 100644 index 000000000000..e6ea400fbead --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Microsoft.WindowsAzure.Commands.CloudService.format.ps1xml @@ -0,0 +1,193 @@ + + + + + Microsoft.WindowsAzure.Commands.Utilities.Common.CloudService.Model.Deployment + + Microsoft.WindowsAzure.Commands.Utilities.Common.CloudService.Model.Deployment + + + + + + + + Name + + + + DeploymentSlot + + + + PrivateID + + + + Status + + + + Url + + + + RoleInstanceList + + + + UpgradeStatus + + + + RoleList + + + + SdkVersion + + + + Locked + + + + RollbackAllowed + + + + CreatedTime + + + + LastModifiedTime + + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.CloudService.AzureService + + Microsoft.WindowsAzure.Commands.Utilities.CloudService.AzureService + + + + + + + + ServiceName + + + + RootPath + + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema.WorkerRole + + Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema.WorkerRole + + + + + + + + CacheWorkerRoleName + + + + Instances + + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.CloudService.ServiceSettings + + Microsoft.WindowsAzure.Commands.Utilities.CloudService.ServiceSettings + + + + + + + + Slot + + + + Location + + + + Subscription + + + + StorageAccountName + + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.CloudService.CloudRuntimePackage + + Microsoft.WindowsAzure.Commands.Utilities.CloudService.CloudRuntimePackage + + + + + + + + Runtime + + + + Version + + + + PackageUri + + + + IsDefault + + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema.RoleSettings + + Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema.RoleSettings + + + + + + + + RoleName + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Microsoft.WindowsAzure.Commands.Scheduler.format.ps1xml b/src/ServiceManagement/Services/Commands.Utilities/Microsoft.WindowsAzure.Commands.Scheduler.format.ps1xml new file mode 100644 index 000000000000..9c449126a410 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Microsoft.WindowsAzure.Commands.Scheduler.format.ps1xml @@ -0,0 +1,136 @@ + + + + + Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Model.PSJobHistory + + Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Model.PSJobHistory + + + + + + + + JobName + + + + Status + + + + Retry + + + + Occurence + + + + StartTime + + + + EndTime + + + + + "ActionType: " + $_.Details.ActionType + if ($_.Details.HostName -ne $null) + { + "HostName: " + $_.Details.HostName + "Response: " + $_.Details.Response + "ResponseBody: " + $_.Details.ResponseBody + } + elseif ($_.Details.StorageAccountName -ne $null) + { + "Storage Account: " + $_.Details.StorageAccountName + "Storage Queue: " + $_.Details.StorageQueueName + "Response Status: " + $_.Details.ResponseStatus + "Queue Message: " + $_.Details.ResponseBody + } + + + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Model.PSJobHistoryDetail + + Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Model.PSJobHistoryDetail + + + + + + + + ActionType + + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Model.PSJobHistoryHttpDetail + + Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Model.PSJobHistoryHttpDetail + + + + + + + + HostName + + + + Response + + + + ResponseBody + + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Model.PSJobHistoryStorageDetail + + Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Model.PSJobHistoryStorageDetail + + + + + + + + StorageAccountName + + + + StorageQueueName + + + + ResponseStatus + + + + ResponseBody + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Microsoft.WindowsAzure.Commands.ServiceBus.format.ps1xml b/src/ServiceManagement/Services/Commands.Utilities/Microsoft.WindowsAzure.Commands.ServiceBus.format.ps1xml new file mode 100644 index 000000000000..a6ce3c8c8fd9 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Microsoft.WindowsAzure.Commands.ServiceBus.format.ps1xml @@ -0,0 +1,28 @@ + + + + + Microsoft.WindowsAzure.Commands.Utilities.ServiceBus.ResourceModel.ServiceBusRegion + + Microsoft.WindowsAzure.Commands.Utilities.ServiceBus.ResourceModel.ServiceBusRegion + + + + + + 20 + + + + + + + Code + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Microsoft.WindowsAzure.Commands.Store.format.ps1xml b/src/ServiceManagement/Services/Commands.Utilities/Microsoft.WindowsAzure.Commands.Store.format.ps1xml new file mode 100644 index 000000000000..83418a218ca3 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Microsoft.WindowsAzure.Commands.Store.format.ps1xml @@ -0,0 +1,154 @@ + + + + + Microsoft.WindowsAzure.Commands.Utilities.Store.WindowsAzureOffer + + Microsoft.WindowsAzure.Commands.Utilities.Store.WindowsAzureOffer + + + + + + 30 + + + + 25 + + + + + + + + + + + + + + $_.AddOn + + + $_.Provider + + + + $locations = @() + foreach ($location in $_.Locations) + { + $locations += $location.Trim() + } + $string = $locations -join ', ' + $string + + + + + $plans = @() + foreach ($plan in $_.Plans) + { + $plans += $plan.PlanIdentifier.Trim() + } + $string = $plans -join ', ' + $string + + + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.Store.WindowsAzureAddOn + + Microsoft.WindowsAzure.Commands.Utilities.Store.WindowsAzureAddOn + + + + + + + + Name + + + + Type + + + + AddOn + + + + Plan + + + + Location + + + + SchemaVersion + + + + State + + + + + $format = "{0}{2, -7}: {3}{0}{4, -7}: {5}" + $objects = @("`r`n", "`t", "Type", $_.LastOperationStatus.Type, "Result", $_.LastOperationStatus.Result) + if ($_.LastOperationStatus.Error -ne $null) + { + $format += "{0}{6, -7}:{0}{1}{7, -9}: {8}{0}{1}{9, -9}: {10}" + $objects += @("Error", "HttpCode", $_.LastOperationStatus.Error.HttpCode, "Message", $_.LastOperationStatus.Error.Message) + } + [string]::Format($format, $objects) + + + + + + $format = "" + $objects = @("`r`n") + $max = 0 + foreach ($outputItem in $_.OutputItems) + { + if ($outputItem.Key.Length -gt $max) + { + $max = $outputItem.Key.Length + } + } + + $max++ + + foreach ($outputItem in $_.OutputItems) + { + # Add key + $format += "{0}{" + $objects.Count + ",-" + $max + "}" + $objects += $outputItem.Key + + # Add value + $format += ": {" + $objects.Count + "}" + $value = $outputItem.Value + if ($value.Length -gt 80) + { + $value = $value.Substring(0, 80) + $value += "..." + } + $objects += $value + } + [string]::Format($format, $objects) + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Microsoft.WindowsAzure.Commands.WebSites.Types.ps1xml b/src/ServiceManagement/Services/Commands.Utilities/Microsoft.WindowsAzure.Commands.WebSites.Types.ps1xml new file mode 100644 index 000000000000..079e262e902c --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Microsoft.WindowsAzure.Commands.WebSites.Types.ps1xml @@ -0,0 +1,19 @@ + + + + Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities.Site + + + PSStandardMembers + + + DefaultDisplayPropertySet + + Name + + + + + + + diff --git a/src/ServiceManagement/Services/Commands.Utilities/Microsoft.WindowsAzure.Commands.WebSites.format.ps1xml b/src/ServiceManagement/Services/Commands.Utilities/Microsoft.WindowsAzure.Commands.WebSites.format.ps1xml new file mode 100644 index 000000000000..e20129f3c0b3 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Microsoft.WindowsAzure.Commands.WebSites.format.ps1xml @@ -0,0 +1,31 @@ + + + + + Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities.Site + + Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities.Site + + + + + + + + Name + + + + State + + + + HostNames + + + + + + + + diff --git a/src/ServiceManagement/Services/Commands.Utilities/Microsoft.WindowsAzure.Commands.dll-Help.xml b/src/ServiceManagement/Services/Commands.Utilities/Microsoft.WindowsAzure.Commands.dll-Help.xml new file mode 100644 index 000000000000..e9c58c344e82 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Microsoft.WindowsAzure.Commands.dll-Help.xml @@ -0,0 +1,28116 @@ + + + + + Add-AzureAccount + + Adds the Azure account to Windows PowerShell + + + + + Add + AzureAccount + + + + The Add-AzureAccount cmdlet makes your Azure account and its subscriptions available in Windows PowerShell. It's like logging into your Azure account in Windows PowerShell. To log out of the account, use the Remove-AzureAccount cmdlet. + Add-AzureAccount downloads information about your Azure account and saves it in a subscription data file in your roaming user profile. It also gets an access token that allows Windows PowerShell to access your Azure account on your behalf. When the command completes, you can manage your Azure account in Windows PowerShell. + + There are two different ways to make your Azure account available to Windows PowerShell. You can use the Add-AzureAccount cmdlet, which uses Azure Active Directory (Azure AD) authentication access tokens, or Import-AzurePublishSettingsFile, which uses a management certificate. For guidance on which method to use, see " + How to: Connect to your subscription + + " (http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/#Connect). + + When you run Add-AzureAccount, it displays an interactive window that prompts you to sign into your Azure account. This sign-in is valid until the access token expires. When it expires, cmdlets that require access to your account prompt you to run Add-AzureAccount again. + If you have a Microsoft Organizational account, you can use the -Credential parameter to add the subscriptions associated with your account to Windows PowerShell without an interactive dialog. + This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version. + + + + Add-AzureAccount + + Credential + + The username and password account credentials used to authenticate with Azure Active Directory. The credentials must be for a Microsoft Organizational account and not another kind of Microsoft account. + + PSCredential + + + Environment + + Specifies an Azure environment for the user account. This parameter is optional. The default is the AzureCloud environment. + + An Azure environment an independent deployment of Microsoft Azure, such as AzureCloud for global Azure and AzureChinaCloud for Azure operated by 21Vianet in China. You can also create on-premises Azure environments by using Azure Pack and the WAPack cmdlets. For more information, see + Azure Pack + + . + + To get the available Azure environments, use the Get-AzureEnvironment cmdlet. To add an environment, use the Add-AzureEnvironment cmdlet. + + String + + + SubscriptionDataFile + + Specifies an alternate location for the subscription data file. This parameter is optional. By default, the subscription data file is saved in your roaming user profile. + If you use this parameter to specify an alternate location for the subscription data file, be sure to use the SubscriptionDataFile parameters of cmdlets that access your account. Otherwise, the cmdlets look for your account data in the default location. + + String + + + + + + Credential + + The username and password account credentials used to authenticate with Azure Active Directory. The credentials must be for a Microsoft Organizational account and not another kind of Microsoft account. + + PSCredential + + PSCredential + + + + + + + Environment + + Specifies an Azure environment for the user account. This parameter is optional. The default is the AzureCloud environment. + + An Azure environment an independent deployment of Microsoft Azure, such as AzureCloud for global Azure and AzureChinaCloud for Azure operated by 21Vianet in China. You can also create on-premises Azure environments by using Azure Pack and the WAPack cmdlets. For more information, see + Azure Pack + + . + + To get the available Azure environments, use the Get-AzureEnvironment cmdlet. To add an environment, use the Add-AzureEnvironment cmdlet. + + String + + String + + + + + + + SubscriptionDataFile + + Specifies an alternate location for the subscription data file. This parameter is optional. By default, the subscription data file is saved in your roaming user profile. + If you use this parameter to specify an alternate location for the subscription data file, be sure to use the SubscriptionDataFile parameters of cmdlets that access your account. Otherwise, the cmdlets look for your account data in the default location. + + String + + String + + + + + + + + + + None + + + + + + + + You cannot pipe input to this cmdlet + + + + + + + None + + + + + + + + This cmdlet does not return any output. + + + + + + + + + Add-AzureAccount (and the Azure AD authentication method) takes precedence over Import-AzurePublishSettings (and the management certificate method). If you use Add-AzureAccount even once on your account, the Azure AD authentication method is used and the management certificate is ignored. To remove the Azure AD token and restore the management certificate method, use the Remove-AzureAccount cmdlet. For more information, type: Get-Help Remove-AzureAccount. + + + The error, "Your credentials have expired. Please use Add-AzureAccount to log in again." indicates that your access token is expired and Windows PowerShell cannot access your Azure account. To restore access to your account, run Add-AzureAccount again. + + + The Azure PowerShell account and subscription cmdlets get their data from the subscription data file, not from the live Azure account. If you change your account or subscriptions outside of Windows PowerShell, such as by using the Azure Management Portal, run Add-AzureAccount again to refresh the subscription data file. + + + + + ---------- Example 1: Add an account ---------- + + + + + + PS C:\>Add-AzureAccount + + + + This command adds an Azure account to Windows PowerShell. When you run the command, a windows pops up to request the user name and password of the account. + + + + + + + + + ---------- Example 2: Use an alternate subscription data file ---------- + + + + + + PS C:\>Add-AzureAccount -SubscriptionDataFile C:\Testing\SDF.xml + + + This command uses the SubscriptionDataFile parameter to direct Add-AzureAccount to store the account data in the C:\Testing\SDF.xml file, instead of the default file. + + + + + + + + + ---------- Example 3: Add a Microsoft Organizational account using -Credential ---------- + + + + + + PS C:\>$credential = Get-Credential + PS C:\>Add-AzureAccount -Credential $credential + + + This command uses the Credential parameter to provide AAD authentication information on the command line, rather than using the pop-up dialog for AAD authentication. + + + + + + + + + ---------- Example 4: Add an account in Azure China ---------- + + + + + + PS C:\>Add-AzureAccount -Environment AzureChinaCloud + + + This command uses the Environment parameter to add an Azure China account to Windows PowerShell. When you run the command, a windows pops up to request the user name and password of the account. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=397618 + + + Add-AzureEnvironment + + + + Get-AzureEnvironment + + + + Import-AzurePublishSettingsFile + + + + Get-AzureAccount + + + + Remove-AzureAccount + + + + + + + Get-AzureAccount + + Gets Azure accounts that are available to Azure PowerShell. + + + + + Get + AzureAccount + + + + The Get-AzureAccount cmdlet gets the Azure accounts that are available to Windows PowerShell. To make your accounts available to Windows PowerShell, run the Add-AzureAccount or Import-PublishSettingsFile cmdlets. + The Get-AzureEnvironment cmdlet gets environments from your subscription data file, not from Azure. If the subscription data file is outdated, run the Add-AzureAccount or Import-PublishSettingsFile cmdlets to refresh it.This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version. + + + + Get-AzureAccount + + Name + + Gets only the specified account. Type the account name. The Name value is case-sensitive. Wildcards are not permitted. The default is all accounts that are available to Windows PowerShell. + + String + + + SubscriptionDataFile + + Specifies the path and filename of an alternate subscription data file. This parameter is optional. By default, Get-AzureAccount gets account and subscription information from the default subscription data file in your roaming user profile. Use this parameter if you used the SubscriptionDataFile parameter in Add-AzureAccount or Import-AzurePublishSettingsFile to specify an alternate (non-default) file. + + String + + + + + + Name + + Gets only the specified account. Type the account name. The Name value is case-sensitive. Wildcards are not permitted. The default is all accounts that are available to Windows PowerShell. + + String + + String + + + + + + + SubscriptionDataFile + + Specifies the path and filename of an alternate subscription data file. This parameter is optional. By default, Get-AzureAccount gets account and subscription information from the default subscription data file in your roaming user profile. Use this parameter if you used the SubscriptionDataFile parameter in Add-AzureAccount or Import-AzurePublishSettingsFile to specify an alternate (non-default) file. + + String + + String + + + + + + + + + + None + + + + + + + + You cannot pipe input to this cmdlet + + + + + + + None + + + + + + + + This cmdlet does not return any output. + + + + + + + + Example 1: Get all accounts + + + + + + PS C:\>Get-AzureAccount + Name ActiveDirectories + ---- ----------------- + contosoadmin@outlook.com {{ ActiveDirectoryTenantId = abcde5cd-bcc3-441a-bd86-e6a... + contosotest1@outlook.com {{ ActiveDirectoryTenantId = aaeabcde-386c-4466-bf70-794... + + + + This command gets all accounts associated with the specified user. + + + + + + + + + Example 2: Get an account by name + + + + + + PS C:\>Get-AzureAccount -Name contosoadmin@outlook.com + Name ActiveDirectories + ---- ----------------- + contosoadmin@outlook.com {{ ActiveDirectoryTenantId = abcde5cd-bcc3-441a-bd86-e6a... + + + This command gets the ContosoAdmin account. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=397620 + + + Add-AzureAccount + + + + Remove-AzureAccount + + + + Get-AzurePublishSettingsFile + + + + Import-AzurePublishSettingsFile + + + + + + + Remove-AzureAccount + + Deletes an Azure account from Windows PowerShell. + + + + + Remove + AzureAccount + + + + The Remove-AzureAccount cmdlet deletes an Azure account from your subscription data file and deletes the management certificate or access token that allows Windows PowerShell to access your account on your behalf. This cmdlet does not delete the account from Microsoft Azure, or change the actual account in any way. + Using this cmdlet is a lot like logging out of your Azure account. And, if you want to log into the account again, use the Add-AzureAccount or Import-AzurePublishSettingsFile to add the account to Windows PowerShell again. + You can also use Remove-AzureAccount cmdlet to change the way the Azure PowerShell cmdlets sign into your Azure account. If your account has both a management certificate from Import-AzurePublishSettingsFile and an access token from Add-AzureAccount, the Azure PowerShell cmdlets use only the access token; they ignore the management certificate. To use the management certificate, run Remove-AzureAccount. When Remove-AzureAccount finds both a management certificate and an access token, it deletes only the access token, instead of deleting the account. The management certificate is still there, so account is still available to Windows PowerShell. + This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version. + + + + Remove-AzureAccount + + Name + + Specifies the name of the account to remove. The parameter value is case-sensitive. Wildcard characters are not supported. + + String + + + Force + + Suppresses the confirmation prompt. By default, Remove-AzureAccount prompts you before deleting the account from Windows PowerShell. + + + + PassThru + + Returns True ($true) if the operation succeeded and False ($false) if it failed. By default, the cmdlet does not return any output. + + + + SubscriptionDataFile + + Specifies the path and filename of an alternate subscription data file. This parameter is optional. By default, Get-AzureAccount gets account and subscription information from the default subscription data file in your roaming user profile. Use this parameter if you used the SubscriptionDataFile parameter in Add-AzureAccount or Import-AzurePublishSettingsFile to specify an alternate (non-default) file. + + String + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + + + + + Force + + Suppresses the confirmation prompt. By default, Remove-AzureAccount prompts you before deleting the account from Windows PowerShell. + + SwitchParameter + + SwitchParameter + + + + + + + Name + + Specifies the name of the account to remove. The parameter value is case-sensitive. Wildcard characters are not supported. + + String + + String + + + + + + + PassThru + + Returns True ($true) if the operation succeeded and False ($false) if it failed. By default, the cmdlet does not return any output. + + SwitchParameter + + SwitchParameter + + + + + + + SubscriptionDataFile + + Specifies the path and filename of an alternate subscription data file. This parameter is optional. By default, Get-AzureAccount gets account and subscription information from the default subscription data file in your roaming user profile. Use this parameter if you used the SubscriptionDataFile parameter in Add-AzureAccount or Import-AzurePublishSettingsFile to specify an alternate (non-default) file. + + String + + String + + + + + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + SwitchParameter + + + false + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + SwitchParameter + + + false + + + + + + None + + + + + + + + You can pipe input to this cmdlet by property name, but not by value. + + + + + + + None or System.Boolean + + + + + + + + If you use the PassThru parameter, this cmdlet returns a Boolean value. Otherwise, it does not return any output. + + + + + + + + Example 1: Delete an account + + + + + + PS C:\>Remove-AzureAccount -Name admin@contoso.com + + + + This command deletes the admin@contoso.com from your subscription data file. When the command completes, the account is no longer available to Windows PowerShell. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=397625 + + + Add-AzureAccount + + + + Get-AzureAccount + + + + + + + Get-AzureEnvironment + + Gets Azure environments + + + + + Get + AzureEnvironment + + + + The Get-AzureEnvironment cmdlet gets the Azure environments that are available to Windows PowerShell. + + An Azure environment an independent deployment of Microsoft Azure, such as AzureCloud for global Azure and AzureChinaCloud for Azure operated by 21Vianet in China. You can also create on-premises Azure environments by using Azure Pack and the WAPack cmdlets. For more information, see + Azure Pack + + (http://www.microsoft.com/en-us/server-cloud/products/windows-azure-pack/default.aspx). + + The Get-AzureEnvironment cmdlet gets environments from your subscription data file, not from Azure. If the subscription data file is outdated, run the Add-AzureAccount or Import-PublishSettingsFile cmdlet to refresh it. + This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version. + + + + Get-AzureEnvironment + + Name + + Gets only the specified environment. Type the environment name. The parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + + + + + Name + + Gets only the specified environment. Type the environment name. The parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + String + + + + + + + + + + None + + + + + + + + You can pipe input to this cmdlet by property name, but not by value. + + + + + + + System.Management.Automation.PSCustomObject + + + + + + + + By default, Get-AzureEnvironment returns a custom object. + + + + + Microsoft.WindowsAzure.Commands.Utilities.Common.WindowsAzureEnvironment + + + + + + + + When you run Get-AzureEnvironment with the Name parameter, it returns a WindowsAzureEnvironment object. + + + + + + + + Example 1: Get all environments + + + + + + PS C:\>Get-AzureEnvironment + EnvironmentName ServiceEndpoint ResourceManagerEndpoint PublishSettingsFileUrl + --------------- --------------- ----------------------- ---------------------- + + AzureCloud https://management.core.wi... https://management.azure.com/ http://go.microsoft.com/fw... + AzureChinaCloud https://management.core.ch... https://not-supported-serv... http://go.microsoft.com/fw... + + + This command gets all environments that are available to Windows PowerShell. + + + + + + + + + Example 2: Get an environment by name + + + + + + PS C:\>Get-AzureEnvironment -Name AzureCloud + Name : AzureCloud + + PublishSettingsFileUrl : http://go.microsoft.com/fwlink/?LinkID=301775 + + ServiceEndpoint : https://management.core.windows.net/ + + ResourceManagerEndpoint : https://management.azure.com/ + + ManagementPortalUrl : http://go.microsoft.com/fwlink/?LinkId=254433 + + ActiveDirectoryEndpoint : https://login.windows.net/ + + ActiveDirectoryCommonTenantId : common + + StorageEndpointSuffix : core.windows.net + + StorageBlobEndpointFormat : {0}://{1}.blob.core.windows.net/ + + StorageQueueEndpointFormat : {0}://{1}.queue.core.windows.net/ + + StorageTableEndpointFormat : {0}://{1}.table.core.windows.net/ + + GalleryEndpoint : https://gallery.azure.com/ + + + + This example gets the AzureCloud environment. + + + + + + + + + Example 3: Get all properties of all environments + + + + + + PS C:\>Get-AzureEnvironment | ForEach-Object {Get-AzureEnvironment -Name $_.EnvironmentName} + + + + This command gets all properties of all environments. + The command uses the Get-AzureEnvironment cmdlet to get all Azure environments for this account. Then, it uses the Foreach-Object cmdlet to run a Get-AzureEnvironment command with the Name parameter on each environment. The value of the Name parameter is the EnvironmentName property of each environment. + Without parameters, Get-AzureEnvironment gets only selected properties of an environment. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=397621 + + + Add-AzureAccount + + + + Add-AzureEnvironment + + + + Get-AzurePublishSettingsFile + + + + Import-AzurePublishSettingsFile + + + + Remove-AzureEnvironment + + + + Set-AzureEnvironment + + + + + + + Add-AzureEnvironment + + Creates an Azure environment + + + + + Add + AzureEnvironment + + + + The Add-AzureEnvironment cmdlet creates a new custom Azure account environment and saves it in your roaming user profile. The cmdlet returns an object that represents the new environment. When the command completes, you can use the environment in Windows PowerShell. + + An Azure environment an independent deployment of Microsoft Azure, such as AzureCloud for global Azure and AzureChinaCloud for Azure operated by 21Vianet in China. You can also create on-premises Azure environments by using Azure Pack and the WAPack cmdlets. For more information, see + Azure Pack + + (http://www.microsoft.com/en-us/server-cloud/products/windows-azure-pack/default.aspx). + + Only the Name parameter of this cmdlet is mandatory. If you omit a parameter, its value is null ($null), and the service that uses that endpoint might not function properly. To add or change the value of an environment property, use the Set-AzureEnvironment cmdlet. + NOTE: Changing your environment can cause your account to fail. Typically, environments are added only for testing or troubleshooting. + This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version. + + + + Add-AzureEnvironment + + Name + + Specifies a name for the environment. This parameter is required. Do not use the names of the default environments, AzureCloud and AzureChinaCloud. + + String + + + PublishSettingsFileUrl + + Specifies the URL of the publish settings files for your account. An Azure publish settings file is an XML file that contains information about your account and a management certificate that allows Windows PowerShell to sign into your Azure account on your behalf. + + String + + + ServiceEndpoint + + Specifies the URL of the Azure service endpoint. The Azure service endpoint determines whether your application is managed by the global Azure platform, Azure operated by 21Vianet in China, or a private Azure installation. + + String + + + ManagementPortalUrl + + Specifies the URL of the Azure Management Portal in the new environment. + + String + + + StorageEndpoint + + Specifies the default endpoint of storage services in the new environment. + + String + + + ActiveDirectoryEndpoint + + Specifies the endpoint for Azure Active Directory authentication in the new environment. + + String + + + ResourceManagerEndpoint + + + Specifies the endpoint for Azure Resource Manager data, including data about resource groups associated with the account. For more information about Azure Resource Manager, see + Azure Resource Manager Cmdlets + + (http://go.microsoft.com/fwlink/?LinkID=394765) and + Using Windows PowerShell with Resource Manager + + (http://go.microsoft.com/fwlink/?LinkID=394767). + + + String + + + GalleryEndpoint + + + Specifies the endpoint for the Azure Resource Manager gallery, which stores resource group gallery templates. For more information about Azure resource groups and gallery templates, see the help topic for + Get-AzureResourceGroupGalleryTemplate + + . + + + String + + + + + + ActiveDirectoryEndpoint + + Specifies the endpoint for Azure Active Directory authentication in the new environment. + + String + + String + + + + + + + GalleryEndpoint + + + Specifies the endpoint for the Azure Resource Manager gallery, which stores resource group gallery templates. For more information about Azure resource groups and gallery templates, see the help topic for + Get-AzureResourceGroupGalleryTemplate + + . + + + String + + String + + + + + + + ManagementPortalUrl + + Specifies the URL of the Azure Management Portal in the new environment. + + String + + String + + + + + + + Name + + Specifies a name for the environment. This parameter is required. Do not use the names of the default environments, AzureCloud and AzureChinaCloud. + + String + + String + + + + + + + PublishSettingsFileUrl + + Specifies the URL of the publish settings files for your account. An Azure publish settings file is an XML file that contains information about your account and a management certificate that allows Windows PowerShell to sign into your Azure account on your behalf. + + String + + String + + + + + + + ResourceManagerEndpoint + + + Specifies the endpoint for Azure Resource Manager data, including data about resource groups associated with the account. For more information about Azure Resource Manager, see + Azure Resource Manager Cmdlets + + (http://go.microsoft.com/fwlink/?LinkID=394765) and + Using Windows PowerShell with Resource Manager + + (http://go.microsoft.com/fwlink/?LinkID=394767). + + + String + + String + + + + + + + ServiceEndpoint + + Specifies the URL of the Azure service endpoint. The Azure service endpoint determines whether your application is managed by the global Azure platform, Azure operated by 21Vianet in China, or a private Azure installation. + + String + + String + + + + + + + StorageEndpoint + + Specifies the default endpoint of storage services in the new environment. + + String + + String + + + + + + + + + + None + + + + + + + + You can pipe input to this cmdlet by property name, but not by value. + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.Common.WindowsAzureEnvironment + + + + + + + + + + + + + + + + + Example 1: Add an Azure environment + + + + + + PS C:\>Add-AzureEnvironment -Name ContosoEnv -PublishSettingsFileUrl https://contoso.com/fwlink/?LinkID=101 -ServiceEndpoint https://contoso.com/fwlink/?LinkID=102 + Name : ContosoEnv + + PublishSettingsFileUrl : https://contoso.com/fwlink/?LinkID=101 + + ServiceEndpoint : https://contoso.com/fwlink/?LinkID=102 + + ResourceManagerEndpoint : + + ManagementPortalUrl : + + ActiveDirectoryEndpoint : + + ActiveDirectoryCommonTenantId : + + StorageEndpointSuffix : + + StorageBlobEndpointFormat : + + StorageQueueEndpointFormat : + + StorageTableEndpointFormat : + + GalleryEndpoint : + + + This command creates the ContosoEnv Azure environment. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=397619 + + + Get-AzureEnvironment + + + + Remove-AzureEnvironment + + + + Set-AzureEnvironment + + + + + + + Set-AzureEnvironment + + Changes the properties of an Azure environment + + + + + Set + AzureEnvironment + + + + The Set-AzureEnvironment cmdlet changes the properties of an Azure environment. It returns an object that represents the environment with its new property values. Use the Name parameter to identify the environment and the other parameters to change property values. You cannot use Set-AzureEnvironment to change the name of an Azure environment. + + An Azure environment an independent deployment of Microsoft Azure, such as AzureCloud for global Azure and AzureChinaCloud for Azure operated by 21Vianet in China. You can also create on-premises Azure environments by using Azure Pack and the WAPack cmdlets. For more information, see + Azure Pack + + (http://www.microsoft.com/en-us/server-cloud/products/windows-azure-pack/default.aspx). + + NOTE: Do not change the properties of the AzureCloud or AzureChinaCloud environments. Use this cmdlet to change the values of private environments that you create. + + + + Set-AzureEnvironment + + Name + + Identifies the environment that is being changed. This parameter is required. The parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + + PublishSettingsFileUrl + + Changes the URL for publish settings files in the specified environment. An Azure publish settings file is an XML file that contains information about your account and a management certificate that allows Windows PowerShell to sign into your Azure account on your behalf. + + String + + + ServiceEndpoint + + Changes the URL of the Azure service endpoint in the specified environment. The Azure service endpoint determines whether your application is managed by the global Azure platform, Azure operated by 21Vianet in China, or a private Azure installation. + + String + + + ManagementPortalUrl + + Changes the URL of the Azure Management Portal to the specified value. + + String + + + StorageEndpoint + + Changes the default endpoint of storage services in the specified environment. + + String + + + ActiveDirectoryEndpoint + + Changes the endpoint for Azure Active Directory authentication to the specified value. + + String + + + ResourceManagerEndpoint + + + Changes the endpoint for Azure Resource Manager data, including data about resource groups associated with the account. For more information about Azure Resource Manager, see + Azure Resource Manager Cmdlets + + (http://go.microsoft.com/fwlink/?LinkID=394765) and + Using Windows PowerShell with Resource Manager + + (http://go.microsoft.com/fwlink/?LinkID=394767). + + + String + + + GalleryEndpoint + + + Changes the endpoint for the Azure Resource Manager gallery to the specified value. The gallery endpoint is the location for resource group gallery templates. For more information about Azure resource groups and gallery templates, see the help topic for + Get-AzureResourceGroupGalleryTemplate + + . + + + String + + + + + + ActiveDirectoryEndpoint + + Changes the endpoint for Azure Active Directory authentication to the specified value. + + String + + String + + + + + + + GalleryEndpoint + + + Changes the endpoint for the Azure Resource Manager gallery to the specified value. The gallery endpoint is the location for resource group gallery templates. For more information about Azure resource groups and gallery templates, see the help topic for + Get-AzureResourceGroupGalleryTemplate + + . + + + String + + String + + + + + + + ManagementPortalUrl + + Changes the URL of the Azure Management Portal to the specified value. + + String + + String + + + + + + + Name + + Identifies the environment that is being changed. This parameter is required. The parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + String + + + + + + + PublishSettingsFileUrl + + Changes the URL for publish settings files in the specified environment. An Azure publish settings file is an XML file that contains information about your account and a management certificate that allows Windows PowerShell to sign into your Azure account on your behalf. + + String + + String + + + + + + + ResourceManagerEndpoint + + + Changes the endpoint for Azure Resource Manager data, including data about resource groups associated with the account. For more information about Azure Resource Manager, see + Azure Resource Manager Cmdlets + + (http://go.microsoft.com/fwlink/?LinkID=394765) and + Using Windows PowerShell with Resource Manager + + (http://go.microsoft.com/fwlink/?LinkID=394767). + + + String + + String + + + + + + + ServiceEndpoint + + Changes the URL of the Azure service endpoint in the specified environment. The Azure service endpoint determines whether your application is managed by the global Azure platform, Azure operated by 21Vianet in China, or a private Azure installation. + + String + + String + + + + + + + StorageEndpoint + + Changes the default endpoint of storage services in the specified environment. + + String + + String + + + + + + + + + + None + + + + + + + + You can pipe input to this cmdlet by property name, but not by value. + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.Common.WindowsAzureEnvironment + + + + + + + + + + + + + + + + + Example 1: Change environment properties + + + + + + PS C:\>Set-AzureEnvironment -Name ContosoEnv -PublishSettingsFileUrl "https://contoso.com" -StorageEndpoint "contoso.com" + + + + This command changes the values of the PublishSettingsFileUrl and StorageEndpoint properties of the ContosoEnv environment. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=397629 + + + Add-AzureEnvironment + + + + Get-AzureEnvironment + + + + Remove-AzureEnvironment + + + + + + + Remove-AzureEnvironment + + Deletes an Azure environment from Windows PowerShell + + + + + Remove + AzureEnvironment + + + + The Remove-AzureEnvironment cmdlet deletes an Azure environment from your roaming profile so Windows PowerShell can't find it. This cmdlet does not delete the environment from Microsoft Azure, or change the actual environment in any way. + + An Azure environment an independent deployment of Microsoft Azure, such as AzureCloud for global Azure and AzureChinaCloud for Azure operated by 21Vianet in China. You can also create on-premises Azure environments by using Azure Pack and the WAPack cmdlets. For more information, see + Azure Pack + + (http://www.microsoft.com/en-us/server-cloud/products/windows-azure-pack/default.aspx). + + + + + Remove-AzureEnvironment + + Name + + Specifies the name of the environment to remove. This parameter is required. This parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + + PassThru + + Returns True ($true) if the command succeeds and False ($false) if it fails. By default, this cmdlet does not return any output. + + String + + + + + + Name + + Specifies the name of the environment to remove. This parameter is required. This parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + String + + + + + + + PassThru + + Returns True ($true) if the command succeeds and False ($false) if it fails. By default, this cmdlet does not return any output. + + String + + String + + + + + + + + + + None + + + + + + + + You can pipe input to this cmdlet by property name, but not by value. + + + + + + + None or System.Boolean + + + + + + + + If you use the PassThru parameter, this cmdlet returns a Boolean value. Otherwise, it does not return any output. + + + + + + + + Example 1: Delete an environment + + + + + + PS C:\>Remove-AzureEnvironment -Name ContosoEnv + + + + This command deletes the ContosoEnv environment from Windows PowerShell. + + + + + + + + + Example 2: Delete multiple environments + + + + + + PS C:\>Get-AzureEnvironment | Where-Object EnvironmentName -like "Contoso*" | ForEach-Object {Remove-AzureEnvironment -Name $_.EnvironmentName } + + + + This command deletes environments whose names begin with "Contoso" from Windows PowerShell. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=397626 + + + Add-AzureEnvironment + + + + Get-AzureEnvironment + + + + Set-AzureEnvironment + + + + + + + Get-AzurePublishSettingsFile + + Downloads the publish-settings file for a Microsoft Azure subscription + + + + + Get + AzurePublishSettingsFile + + + + + The Get-AzurePublishSettingsFile cmdlet opens your default browser, logs onto your Microsoft Azure account, and automatically downloads a .publishsettings file that contains information and a certificate for your Microsoft Azure subscription. This file is used by the Import-AzureSubscription cmdlet and is an XML file with a ".publishsettings" extension. + + Security Note: The file downloaded contains an encoded management certificate that serves as the credentials to administer your Microsoft Azure subscriptions and services. Store this file in a secure location or delete after use. + + + + Get-AzurePublishSettingsFile + + Realm + + The organization ID to use for federated authentication when displaying the Microsoft Azure Portal + + String + + + Environment + + The Microsoft Azure environment name to be used. Example AzureCloud + + String + + + + + + Realm + + The organization ID to use for federated authentication when displaying the Microsoft Azure Portal + + String + + + Environment + + The Microsoft Azure environment name to be used. Example AzureCloud + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-dev, php-dev, python-dev + + + + + + -------------- Example 1 -------------- + + + + + + + PS C:\> Get-AzurePublishSettingsFile + + + This example launches your default browser, connects to your Microsoft Azure account, and then automatically downloads the .publishsettings file for your account. + + + + + + + + + + + Import-AzurePublishSettingsFile + + + + + + + Get-AzureSubscription + + Gets Azure subscriptions in the user accounts. + + + + + Get + AzureSubscription + + + + The Get-AzureSubscription cmdlet gets the subscriptions in your Azure accounts. You can use this cmdlet to get information about the subscription and to pipe the subscription to other cmdlets. + Get-AzureSubscription requires access to your Azure accounts. Before you run Get-AzureSubscription, you must run the Add-AzureAccount cmdlet or the cmdlets that download and install a publish settings file (Get-AzurePublishSettingsFile, Import-AzurePublishSettingsFile. + This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version. + + + + Get-AzureSubscription + + SubscriptionName + + Gets only the specified subscription. Enter the subscription name. The value is case-sensitive. Wildcard characters are not supported. By default, Get-AzureSubscription gets all subscriptions in your Azure accounts. + + String + + + ExtendedDetails + + Returns quota properties of the subscription, in addition to the standard properties. + + + + SubscriptionDataFile + + Gets a subscription from an alternate subscription data file. Use this parameter if you used the SubscriptionDataFile parameter of Add-AzureAccount or Import-PublishSettingsFile to specify an alternate location for the subscription data file. By default, your subscription data file is saved in your roaming user profile. + + String + + + + Get-AzureSubscription + + Current + + Gets only the current subscription. By default, Get-AzureSubscription gets all subscriptions in your Azure accounts. + You can designate "current" and "default" subscriptions. The "current subscription" is used by default in the current Windows PowerShell session. The "default subscription" is used by default for all Windows PowerShell sessions. The "current subscription" label lets you specify a subscription to be used by default for the current session without changing the "default subscription" for all other sessions. + To designate subscriptions as "current" and "default," use the Select-AzureSubscription cmdlet. + + + + ExtendedDetails + + Returns quota properties of the subscription, in addition to the standard properties. + + + + SubscriptionDataFile + + Gets a subscription from an alternate subscription data file. Use this parameter if you used the SubscriptionDataFile parameter of Add-AzureAccount or Import-PublishSettingsFile to specify an alternate location for the subscription data file. By default, your subscription data file is saved in your roaming user profile. + + String + + + + Get-AzureSubscription + + Default + + Gets only the default subscription. By default, Get-AzureSubscription gets all subscriptions in your Azure accounts. + The "default subscription" is the subscription that is used by default for all Windows PowerShell sessions. To use a different subscription as the default only for the current session, set a subscription to "Current". To designate subscriptions as "current" and "default," use the Select-AzureSubscription cmdlet. + + + + ExtendedDetails + + Returns quota properties of the subscription, in addition to the standard properties. + + + + SubscriptionDataFile + + Gets a subscription from an alternate subscription data file. Use this parameter if you used the SubscriptionDataFile parameter of Add-AzureAccount or Import-PublishSettingsFile to specify an alternate location for the subscription data file. By default, your subscription data file is saved in your roaming user profile. + + String + + + + + + Current + + Gets only the current subscription. By default, Get-AzureSubscription gets all subscriptions in your Azure accounts. + You can designate "current" and "default" subscriptions. The "current subscription" is used by default in the current Windows PowerShell session. The "default subscription" is used by default for all Windows PowerShell sessions. The "current subscription" label lets you specify a subscription to be used by default for the current session without changing the "default subscription" for all other sessions. + To designate subscriptions as "current" and "default," use the Select-AzureSubscription cmdlet. + + SwitchParameter + + SwitchParameter + + + + + + + Default + + Gets only the default subscription. By default, Get-AzureSubscription gets all subscriptions in your Azure accounts. + The "default subscription" is the subscription that is used by default for all Windows PowerShell sessions. To use a different subscription as the default only for the current session, set a subscription to "Current". To designate subscriptions as "current" and "default," use the Select-AzureSubscription cmdlet. + + SwitchParameter + + SwitchParameter + + + + + + + ExtendedDetails + + Returns quota properties of the subscription, in addition to the standard properties. + + SwitchParameter + + SwitchParameter + + + + + + + SubscriptionDataFile + + Gets a subscription from an alternate subscription data file. Use this parameter if you used the SubscriptionDataFile parameter of Add-AzureAccount or Import-PublishSettingsFile to specify an alternate location for the subscription data file. By default, your subscription data file is saved in your roaming user profile. + + String + + String + + + + + + + SubscriptionName + + Gets only the specified subscription. Enter the subscription name. The value is case-sensitive. Wildcard characters are not supported. By default, Get-AzureSubscription gets all subscriptions in your Azure accounts. + + String + + String + + + + + + + + + + None + + + + + + + + You can pipe input to this cmdlet by property name, but not by value. + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.Common.AzureSubscription + + + + + + + + By default, Get-AzureSubscription returns a AzureSubscription object. + + + + + Microsoft.WindowsAzure.Commands.Utilities.Common.SubscriptionDataExtended + + + + + + + + When you use the ExtendedDetails parameter, Get-AzureSubscription returns a SubscriptionDataExtended object. + + + + + + + + Example 1: Get all subscriptions + + + + + + C:\PS>Get-AzureSubscription + + + This command gets all subscriptions that are available to Windows PowerShell. + + + + + + + + + Example 2: Get a subscription by name + + + + + + C:\PS>Get-AzureSubscription ???SubscriptionName MyProdSubscription + + + This command gets only the "MyProdSubsciption" subscription. + + + + + + + + + Example 3: Get the default subscription + + + + + + C:\PS>(Get-AzureSubscription -Default).SubscriptionName + ContosoEngineering + + + This command gets the name of the default subscription. The command first gets the subscription and then uses the dot method to get the SubscriptionName property of the subscription. + + + + + + + + + Example 4: Get the current subscription + + + + + + C:\PS>Get-AzureSubscription -Current | Format-List -Property SubscriptionName, Certificate + + + + This command returns a list with the name and certificate of the current subscription. It uses a Get-AzureSubscription command to get the current subscription. Then it pipes the subscription to a Format-List command that displays the selected properties in a list. + + + + + + + + + Example 5: Get quota properties + + + + + + C:\PS>Get-AzureSubscription -SubscriptionDataFile "C:\Temp\MySubscriptions.xml" -ExtendedDetails + + + This command gets all properties, included quota properties, of the subscriptions in the C:\Temp\MySubscriptions.xml subscription data file. Use the SubscriptionDataFile parameter if you specified an alternate subscription data file when you ran the Add-AzureAccount or Import-PublishSettingsFile cmdlets. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=397623 + + + Add-AzureAccount + + + + Get-AzurePublishSettingsFile + + + + Import-AzurePublishSettingsFile + + + + Remove-AzureSubscription + + + + Select-AzureSubscription + + + + Set-AzureSubscription + + + + + + + Import-AzurePublishSettingsFile + + Imports a publish-settings file with a certificate to connect to your Microsoft Azure account. + + + + + Import + AzurePublishSettingsFile + + + + The Import-AzurePublishSettingsFile cmdlet imports a .publishsettings file downloaded using the Get-AzurePublishSettingsFile cmdlet. This file contains settings and an encoded certificate that is used to provide management credentials for the Microsoft Azure account. + Security Note: The file downloaded contains an encoded management certificate that serves as the credentials to administer Microsoft Azure subscriptions and services. Store this file in a secure location or delete after use. + + + + Import-AzurePublishSettingsFile + + PublishSettingsFile + + Specifies the full path and filename for the .publishsettings file for the Microsoft Azure account. + + String + + + SubscriptionDataFile + + Specifies the path to a file where the subscription data is stored. This parameter is optional. If it is not provided, the subscription data is imported into a default file in the user's profile.. + + String + + + + + + PublishSettingsFile + + Specifies the full path and filename for the .publishsettings file for the Microsoft Azure account. + + String + + String + + + + + + + SubscriptionDataFile + + Specifies the path to a file where the subscription data is stored. This parameter is optional. If it is not provided, the subscription data is imported into a default file in the user's profile.. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-dev, php-dev, python-dev + + + + + + -------------- Example 1 -------------- + + + + + + + PS C:\> Import-AzurePublishSettingsFile –PublishSettingsFile "C:\Temp\MyAccountName-date-credentials.publishsettings" + + + This example imports the "C:\Temp\MyAccountName-date-credentials.publishsettings" file for a Microsoft Azure account, including the encoded certificate used for management of the account. + + + + + + + + + + -------------- Example 2 -------------- + + + + + + + PS C:\> Import-AzurePublishSettingsFile –PublishSettingsFile "C:\Temp\MyAccountName-date-credentials.publishsettings" –SubscriptionDataFile c:\Subs\Subscriptions.xml" + + + This example imports the "C:\Temp\MyAccountName-date-credentials.publishsettings" file for a Microsoft Azure account, including the encoded certificate used for management of the account. + + + + + + + + + + + Get-AzureSubscription + + + + Remove-AzureSubscription + + + + Select-AzureSubscription + + + + Set-AzureSubscription + + + + + + + Remove-AzureSubscription + + Deletes an Azure subscription from Windows PowerShell. + + + + + Remove + AzureSubscription + + + + The Remove-AzureSubscription cmdlet deletes an Azure subscription from your subscription data file so Windows PowerShell can't find it. This cmdlet does not delete the subscription from Microsoft Azure, or change the actual subscription in any way. + This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version. + + + + Remove-AzureSubscription + + SubscriptionName + + Specifies the subscription name. This parameter is required. The parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + + Force + + Suppresses the confirmation prompt. By default, Remove-AzureSubscription prompts you before deleting the subscription. + + + + PassThru + + Returns True ($true) if the command succeeds and False ($false) if it fails. By default, this cmdlet does not return any output. + + + + SubscriptionDataFile + + Deletes the subscription from an alternate subscription data file. Use this parameter if you used the SubscriptionDataFile parameter of Add-AzureAccount or Import-PublishSettingsFile to specify an alternate location for the subscription data file. By default, your subscription data file is saved in your roaming user profile. + + String + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + + + + + Force + + Suppresses the confirmation prompt. By default, Remove-AzureSubscription prompts you before deleting the subscription. + + SwitchParameter + + SwitchParameter + + + + + + + PassThru + + Returns True ($true) if the command succeeds and False ($false) if it fails. By default, this cmdlet does not return any output. + + SwitchParameter + + SwitchParameter + + + + + + + SubscriptionDataFile + + Deletes the subscription from an alternate subscription data file. Use this parameter if you used the SubscriptionDataFile parameter of Add-AzureAccount or Import-PublishSettingsFile to specify an alternate location for the subscription data file. By default, your subscription data file is saved in your roaming user profile. + + String + + String + + + + + + + SubscriptionName + + Specifies the subscription name. This parameter is required. The parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + String + + + + + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + SwitchParameter + + + false + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + SwitchParameter + + + false + + + + + + None + + + + + + + + You can pipe input to this cmdlet by property name, but not by value. + + + + + + + None or System.Boolean + + + + + + + + If you use the PassThru parameter, this cmdlet returns a Boolean value. Otherwise, it does not return any output. + + + + + + + + Example 1: Delete a subscription + + + + + + C:\PS> Remove-AzureSubscription -SubscriptionName Test + + Confirm + Are you sure you want to perform this action? + [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): + + + This command deletes the "Test" subscription from the default subscription data file. + + + + + + + + + Example 2: Delete from an alternate subscription data file + + + + + + C:\PS> Remove-AzureSubscription -SubscriptionName Test -SubscriptionDataFile C:\Subs\MySubscriptions.xml -Force + + + This command deletes the Test subscription from the MySubscriptions.xml subscription data file. The command uses the Force parameter to suppress the confirmation prompt. + + + + + + + + + Example 3: Delete a subscription in a script + + + + + + C:\PS> ...if (Remove-AzureSubscription -SubscriptionName Test -PassThru) {...} + + + This command uses the Remove-AzureSubscription command in an If statement. It uses the PassThru parameter, which returns a Boolean value, to determine whether the script block in the If statement is executed. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=397627 + + + Get-AzureSubscription + + + + Select-AzureSubscription + + + + Set-AzureSubscription + + + + + + + Select-AzureSubscription + + Changes the current and default Azure subscriptions + + + + + Select + AzureSubscription + + + + The Select-AzureSubscription cmdlet sets and clears the current and default Azure subscriptions. + The "current subscription" is the subscription that is used by default in the current Windows PowerShell session. The "default subscription" is used by default in all Windows PowerShell sessions. The "current subscription" label lets you specify a different subscription to be used by default for the current session without changing the "default subscription" for all other sessions. + The "default" subscription designation is saved in your subscription data file. The session-specific "current" designation is not saved. + This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version. + + + + Select-AzureSubscription + + SubscriptionName + + Specifies the subscription to change. Enter the subscription name. This parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + + Current + + Sets the "current" subscription. Use the SubscriptionName parameter to identify the subscription. + The "current subscription" is the subscription that is used by default in the current Windows PowerShell session. + + + + PassThru + + Returns True ($true) when the operation succeeds and False ($false) when it fails. By default, this cmdlet does not return any output. + + + + SubscriptionDataFile + + Specifies an alternate subscription data file. Use this parameter if you used the SubscriptionDataFile parameter of Add-AzureAccount or Import-PublishSettingsFile to specify an alternate location for the subscription data file. By default, your subscription data file is saved in your roaming user profile. + + String + + + + Select-AzureSubscription + + SubscriptionName + + Specifies the subscription to change. Enter the subscription name. This parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + + PassThru + + Returns True ($true) when the operation succeeds and False ($false) when it fails. By default, this cmdlet does not return any output. + + + + SubscriptionDataFile + + Specifies an alternate subscription data file. Use this parameter if you used the SubscriptionDataFile parameter of Add-AzureAccount or Import-PublishSettingsFile to specify an alternate location for the subscription data file. By default, your subscription data file is saved in your roaming user profile. + + String + + + Default + + Sets the "default" subscription. Use the SubscriptionName parameter to identify the subscription. + The "default subscription" is the subscription that is used by default in the all Windows PowerShell sessions, unless a different subscription is set to "current". + + + + + Select-AzureSubscription + + PassThru + + Returns True ($true) when the operation succeeds and False ($false) when it fails. By default, this cmdlet does not return any output. + + + + SubscriptionDataFile + + Specifies an alternate subscription data file. Use this parameter if you used the SubscriptionDataFile parameter of Add-AzureAccount or Import-PublishSettingsFile to specify an alternate location for the subscription data file. By default, your subscription data file is saved in your roaming user profile. + + String + + + NoCurrent + + Clears the "current" subscription setting. When no subscription is set to "current," the Azure PowerShell cmdlets use the default subscription. + + + + + Select-AzureSubscription + + PassThru + + Returns True ($true) when the operation succeeds and False ($false) when it fails. By default, this cmdlet does not return any output. + + + + SubscriptionDataFile + + Specifies an alternate subscription data file. Use this parameter if you used the SubscriptionDataFile parameter of Add-AzureAccount or Import-PublishSettingsFile to specify an alternate location for the subscription data file. By default, your subscription data file is saved in your roaming user profile. + + String + + + NoDefault + + Clears the "default" subscription setting. If there is no "default subscription," the "current subscription" is used by default. When there is no current or default subscription, and you do not identify a subscription, commands that require a subscription fail. + + + + + + + Current + + Sets the "current" subscription. Use the SubscriptionName parameter to identify the subscription. + The "current subscription" is the subscription that is used by default in the current Windows PowerShell session. + + SwitchParameter + + SwitchParameter + + + + + + + Default + + Sets the "default" subscription. Use the SubscriptionName parameter to identify the subscription. + The "default subscription" is the subscription that is used by default in the all Windows PowerShell sessions, unless a different subscription is set to "current". + + SwitchParameter + + SwitchParameter + + + + + + + NoCurrent + + Clears the "current" subscription setting. When no subscription is set to "current," the Azure PowerShell cmdlets use the default subscription. + + SwitchParameter + + SwitchParameter + + + + + + + NoDefault + + Clears the "default" subscription setting. If there is no "default subscription," the "current subscription" is used by default. When there is no current or default subscription, and you do not identify a subscription, commands that require a subscription fail. + + SwitchParameter + + SwitchParameter + + + + + + + PassThru + + Returns True ($true) when the operation succeeds and False ($false) when it fails. By default, this cmdlet does not return any output. + + SwitchParameter + + SwitchParameter + + + + + + + SubscriptionDataFile + + Specifies an alternate subscription data file. Use this parameter if you used the SubscriptionDataFile parameter of Add-AzureAccount or Import-PublishSettingsFile to specify an alternate location for the subscription data file. By default, your subscription data file is saved in your roaming user profile. + + String + + String + + + + + + + SubscriptionName + + Specifies the subscription to change. Enter the subscription name. This parameter value is case-sensitive. Wildcard characters are not permitted. + + String + + String + + + + + + + + + + None + + + + + + + + You can pipe input to this cmdlet by property name, but not by value. + + + + + + + None or System.Boolean + + + + + + + + If you use the PassThru parameter, this cmdlet returns a Boolean value. By default, it does not generate any output. + + + + + + + + Example 1: Set the current subscription + + + + + + C:\PS> Select-AzureSubscription -SubscriptionName ContosoEngineering -Current + + + This command makes "ContosoEngineering" the current subscription. + + + + + + + + + Example 2: Set the default description + + + + + + C:\PS> Select-AzureSubscription -SubscriptionName ContosoFinance -SubscriptionDataFile "C:\subs\MySubscriptions.xml" + + + This command changes the default subscription to "ContosoFinance." It saves the setting in the Subscriptions.xml subscription data file. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=397628 + + + Get-AzureSubscription + + + + Remove-AzureSubscription + + + + Set-AzureSubscription + + + + + + + Set-AzureSubscription + + Creates or changes an Azure subscription + + + + + Set + AzureSubscription + + + + The Set-AzureSubscription cmdlet establishes and changes the properties of an Azure subscription. You can use this cmdlet to create a new subscription or change the properties of an existing subscription. + To create a new subscription, select a unique name for the value of the SubscriptionName parameter. To change an existing subscription, use the SubscriptionName parameter to identify the subscription. + This cmdlet changes the data in the subscription data file that you create when you use the Add-AzureAccount or Import-AzurePublishSettingsFile cmdlet to add an Azure account to Windows PowerShell. + This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version. + + + + Set-AzureSubscription + + SubscriptionName + + Specifies the subscription name. If an Azure subscription with this name does not exist, this parameter creates a new subscription with the specified name. If the subscription exists, this parameter identifies the subscription and uses the other property values to change it. + To get the names of existing Azure subscriptions, use the Get-AzureSubscription cmdlet. + + String + + + Certificate + + Specifies a management certificate for the subscription. Management certificates are X.509 certificates that are saved as .cer files and uploaded to the Azure Management Portal. The certificate, including its private key, must be installed on the local computer, either in the current user's personal certificate store, or the local machine???s personal certificate store. + + X509Certificate2 + + + CurrentStorageAccountName + + Designates the specified storage account as the "current" storage account for the subscription. Enter the storage account name. The parameter value is case-sensitive. Wildcard characters are not permitted. + This parameter does not create a storage account; it just associates the storage account with the subscription. To create a storage account, use the New-AzureStorageAccount cmdlet. + + String + + + PassThru + + Returns True ($true) if the operation succeeds and False ($false) if it fails. By default, this cmdlet does not return any output. + + + + ResourceManagerEndpoint + + Sets or changes the endpoint for Azure Resource Manager data to the specified value. + + For more information about Azure Resource Manager, see + Azure Resource Manager Cmdlets + + (http://go.microsoft.com/fwlink/?LinkID=394765) and + Using Windows PowerShell with Resource Manager + + (http://go.microsoft.com/fwlink/?LinkID=394767). + + + String + + + ServiceEndpoint + + Sets or changes the custom service endpoint for the management service to the specified value. + The service endpoint is the Azure management API endpoint in the Azure environment. You can create custom service endpoints and set a different service endpoint for each subscription. + + String + + + SubscriptionDataFile + + Specifies the path and filename of an alternate subscription data file. This parameter is optional. By default, Set-AzureSubscription gets and changes data in the default subscription data file in your roaming user profile. Use this parameter if you used the SubscriptionDataFile parameter in Add-AzureAccount or Import-AzurePublishSettingsFile to specify an alternate (non-default) location for this file. + + String + + + SubscriptionId + + Specifies the ID of the subscription. To get the subscription ID of an existing Azure subscription, use the Get-AzureSubscription cmdlet. + + String + + + + Set-AzureSubscription + + SubscriptionName + + Specifies the subscription name. If an Azure subscription with this name does not exist, this parameter creates a new subscription with the specified name. If the subscription exists, this parameter identifies the subscription and uses the other property values to change it. + To get the names of existing Azure subscriptions, use the Get-AzureSubscription cmdlet. + + String + + + PassThru + + Returns True ($true) if the operation succeeds and False ($false) if it fails. By default, this cmdlet does not return any output. + + + + SubscriptionDataFile + + Specifies the path and filename of an alternate subscription data file. This parameter is optional. By default, Set-AzureSubscription gets and changes data in the default subscription data file in your roaming user profile. Use this parameter if you used the SubscriptionDataFile parameter in Add-AzureAccount or Import-AzurePublishSettingsFile to specify an alternate (non-default) location for this file. + + String + + + + + + Certificate + + Specifies a management certificate for the subscription. Management certificates are X.509 certificates that are saved as .cer files and uploaded to the Azure Management Portal. The certificate, including its private key, must be installed on the local computer, either in the current user's personal certificate store, or the local machine???s personal certificate store. + + X509Certificate2 + + X509Certificate2 + + + + + + + CurrentStorageAccountName + + Designates the specified storage account as the "current" storage account for the subscription. Enter the storage account name. The parameter value is case-sensitive. Wildcard characters are not permitted. + This parameter does not create a storage account; it just associates the storage account with the subscription. To create a storage account, use the New-AzureStorageAccount cmdlet. + + String + + String + + + + + + + PassThru + + Returns True ($true) if the operation succeeds and False ($false) if it fails. By default, this cmdlet does not return any output. + + SwitchParameter + + SwitchParameter + + + + + + + ResourceManagerEndpoint + + Sets or changes the endpoint for Azure Resource Manager data to the specified value. + + For more information about Azure Resource Manager, see + Azure Resource Manager Cmdlets + + (http://go.microsoft.com/fwlink/?LinkID=394765) and + Using Windows PowerShell with Resource Manager + + (http://go.microsoft.com/fwlink/?LinkID=394767). + + + String + + String + + + + + + + ServiceEndpoint + + Sets or changes the custom service endpoint for the management service to the specified value. + The service endpoint is the Azure management API endpoint in the Azure environment. You can create custom service endpoints and set a different service endpoint for each subscription. + + String + + String + + + + + + + SubscriptionDataFile + + Specifies the path and filename of an alternate subscription data file. This parameter is optional. By default, Set-AzureSubscription gets and changes data in the default subscription data file in your roaming user profile. Use this parameter if you used the SubscriptionDataFile parameter in Add-AzureAccount or Import-AzurePublishSettingsFile to specify an alternate (non-default) location for this file. + + String + + String + + + + + + + SubscriptionId + + Specifies the ID of the subscription. To get the subscription ID of an existing Azure subscription, use the Get-AzureSubscription cmdlet. + + String + + String + + + + + + + SubscriptionName + + Specifies the subscription name. If an Azure subscription with this name does not exist, this parameter creates a new subscription with the specified name. If the subscription exists, this parameter identifies the subscription and uses the other property values to change it. + To get the names of existing Azure subscriptions, use the Get-AzureSubscription cmdlet. + + String + + String + + + + + + + + + + None + + + + + + + + You can pipe input to this cmdlet by property name, but not by value. + + + + + + + None or System.Boolean + + + + + + + + When you use the PassThru parameter, this cmdlet returns a Boolean value. By default, this cmdlet does not return any output. + + + + + + + + Example 1: Create a new subscription + + + + + + PS C:\>$thumbprint = <Certificate Thumbprint> + PS C:\>$myCert = Get-Item cert:\\CurrentUser\My\$thumbprint + PS C:\>Set-AzureSubscription -SubscriptionName ContosotTest -Certificate $myCert -SubscriptionID 12345 + + + + These commands create the ContosoTest subscription in the default subscription data file. The commands add a management certificate and subscription ID for the new subscription. + When you run the Set-AzureSubscription command, the cmdlet looks for a subscription with the name "ContosoTest". If it doesn't find one, it creates a new subscription with the specified values. + + + + + + + + + Example 2: Change an existing subscription + + + + + + C:\PS> $thumbprint = <Thumbprint-2> + C:\PS> $differentCert = Get-Item cert:\\CurrentUser\My\$thumbprint + C:\PS> Set-AzureSubscription ???SubscriptionName ContosoEngineering -Certificate $differentCert + + + These commands are very similar to the commands in Example 1. However, because the SubscriptionName parameter now identifies an existing subscription, Set-AzureSubscription uses the remaining parameters to change the values of the existing subscription rather than creating a new subscription + + + + + + + + + Example 2: Change the service endpoint + + + + + + C:\PS> Set-AzureSubscription ???SubscriptionName ContosoEngineering -ServiceEndpoint "https://management.core.contoso.com" + + + This command adds or changes a custom service endpoint for the ContosoEngineering subscription. + + + + + + + + + Example 3: Clear property values + + + + + + C:\PS> Set-AzureSubscription ???SubscriptionName ContosoEngineering ???Certificate $null -ResourceManagerEndpoint $null + + + This command sets the values of the Certificate and ResourceManagerEndpoint properties to null ($null). This clears the values of those properties without changing other settings. + + + + + + + + + Example 4: Use an alternate subscription data file + + + + + + C:\PS> Set-AzureSubscription -SubscriptionName ContosoFinance -SubscriptionDataFile = C:\Azure\SubscriptionData.xml - CurrentStorageAccount ContosoStorage01 + + + This command changes the current storage account of the ContosoFinance subscription to ContosoStorage01. The command uses the SubscriptionDataFile parameter to change the data in the C:\Azure\SubscriptionData.xml subscription data file. By default, Set-AzureSubscription uses the default subscription data file in your roaming user profile. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=397630 + + + Add-AzureAccount + + + + Get-AzureSubscription + + + + Import-AzurePublishSettingsFile + + + + Remove-AzureSubscription + + + + Select-AzureSubscription + + + + + + + + Add-AzureCacheWorkerRole + + Add a dedicated cache worker role to the current service + + + + + + Add + AzureCacheWorkerRole + + + + + + Add a dedicated cache worker role to the current service + + + + Add-AzureCacheWorkerRole + + Name + + The name of the cache worker role + + String + + + Instances + + The number of worker role instances to devote to the cache worker role + + Int32 + + + + + + Name + + The name of the cache worker role + + String + + String + + + + + + + Instances + + The number of worker role instances to devote to the cache worker role + + Int32 + + Int32 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-dev, php-dev, python-dev + + + + + + -------------- Basic -------------- + + + C:\PS> + C:\PS> + + Add-AzureCacheWorkerRole + + Adds a cache role to the current service + + + + + + + + + + + + + + + + + + + + Enable-AzureMemcacheRole + + + + Add-AzureNodeWebRole + + + + Add-AzurePHPWebRole + + + + + + + + Add-AzureDjangoWebRole + + Creates scaffolding for a Python Django application which will be hosted in the cloud via IIS + + + + + + Add + AzureDjangoWebRole + + + + + + Creates scaffolding for a Python Django application which will be hosted in the cloud via IIS + + + + Add-AzureDjangoWebRole + + Name + + The name of the web role, determines the name of the directory containing the scaffolding for the Python Django application that will be hosted in the web role, default is WebRole# Where # is the number of web roles in the service + + String + + + Instances + + The number of role instances for this web role, default is 1 + + Int32 + + + + + + Name + + The name of the web role, determines the name of the directory containing the scaffolding for the Python Django application that will be hosted in the web role, default is WebRole# Where # is the number of web roles in the service + + String + + String + + + WebRole1 + + + Instances + + The number of role instances for this web role, default is 1 + + Int32 + + Int32 + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + python-dev + + + + + + -------------- Default -------------- + + + C:\PS> + C:\PS> + + Add-AzureDjangoWebRole + + Adds a Microsoft Azure web role with the default configuration (Name = "WebRole1", Instances = 1) + + + + + + + + + + + + + + + + + + + -------------- Single Instance Web Role -------------- + + + C:\PS> + C:\PS> + + Add-AzureDjangoWebRole -Name MyWebRole + + Adds scaffolding for a single web role named "MyWebRole" to the current application + + + + + + + + + + + + + + + + + + + -------------- Multiple Instance Web Role -------------- + + + C:\PS> + C:\PS> + + Add-AzureDjangoWebRole MyWebRole -I 2 + + Adds scaffolding for a new web role named "MyWebRole" to the current application, with a role instance count of 2 + + + + + + + + + + + + + + + + + + + + New-AzureServiceProject + + + + + + + + Add-AzureNodeWebRole + + Creates scaffolding for a Node.js application which will be hosted in the cloud via IIS + + + + + + Add + AzureNodeWebRole + + + + + + Creates scaffolding for a Node.js application which will be hosted in the cloud via IIS + + + + Add-AzureNodeWebRole + + Name + + The name of the web role, determines the name of the directory containing the scaffolding for the node.js application that will be hosted in the web role, default is WebRole# Where # is the number of web roles in the service + + String + + + Instances + + The number of role instances for this web role, default is 1 + + Int32 + + + + + + Name + + The name of the web role, determines the name of the directory containing the scaffolding for the node.js application that will be hosted in the web role, default is WebRole# Where # is the number of web roles in the service + + String + + String + + + WebRole1 + + + Instances + + The number of role instances for this web role, default is 1 + + Int32 + + Int32 + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-dev + + + + + + -------------- Default -------------- + + + C:\PS> + C:\PS> + + Add-AzureNodeWebRole + + Adds a Microsoft Azure web role with the default configuration (Name = "Webole1", Instances = 1) + + + + + + + + + + + + + + + + + + + -------------- Single Instance Web Role -------------- + + + C:\PS> + C:\PS> + + Add-AzureNodeWebRole -Name MyWebRole + + Adds scaffolding for a single web role named "MyWebRole" to the current application + + + + + + + + + + + + + + + + + + + -------------- Multiple Instance Web Role -------------- + + + C:\PS> + C:\PS> + + Add-AzureNodeWebRole MyWebRole -I 2 + + Adds scaffolding for a new web role named "MyWebRole" to the current application, with a role instance count of 2 + + + + + + + + + + + + + + + + + + + + New-AzureServiceProject + + + + Add-AzureNodeWorkerRole + + + + + + + + Add-AzureNodeWorkerRole + + Creates scaffolding for a Node.js application which will be hosted in the cloud via node.exe + + + + + + Add + AzureNodeWorkerRole + + + + + + Creates scaffolding for a Node.js application which will be hosted in the cloud via node.exe + + + + Add-AzureNodeWorkerRole + + Name + + The name of the worker role, determines the folder name that will contain the scaffolding for the node.js service hosted in the worker role + + String + + + Instances + + The number of role instances for this worker role, default is 1 + + Int32 + + + + + + Name + + The name of the worker role, determines the folder name that will contain the scaffolding for the node.js service hosted in the worker role + + String + + String + + + WorkerRole1 + + + Instances + + The number of role instances for this worker role, default is 1 + + Int32 + + Int32 + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-dev + + + + + + -------------- Default -------------- + + + C:\PS> + C:\PS> + + Add-AzureNodeWorkerRole + + Adds a Microsoft Azure Worker role with the default configuration (Name = "WorkerRole1", Instances = 1) + + + + + + + + + + + + + + + + + + + -------------- Single Instance Worker Role -------------- + + + C:\PS> + C:\PS> + + Add-AzureNodeWorkerRole MyWorkerRole + + Adds scaffolding for a single worker role named "MyWorkerRole" to the current application + + + + + + + + + + + + + + + + + + + -------------- Multiple Instance Worker Role -------------- + + + C:\PS> + C:\PS> + + Add-AzureNodeWorkerRole MyWorkerRole -I 2 + + Adds scaffolding for a new worker role named "MyWorkerRole" to the current application, with a role instance count of 2 + + + + + + + + + + + + + + + + + + + + New-AzureServiceProject + + + + Add-AzureNodeWebRole + + + + + + + + Add-AzurePHPWebRole + + Creates scaffolding for a PHP application which will be hosted in the cloud via IIS + + + + + + Add + AzurePHPWebRole + + + + + + Creates scaffolding for a PHP application which will be hosted in the cloud via IIS + + + + Add-AzurePHPWebRole + + Name + + The name of the web role, determines the name of the directory containing the scaffolding for the PHP application that will be hosted in the web role, default is WebRole# Where # is the number of web roles in the service + + String + + + Instances + + The number of role instances for this web role, default is 1 + + Int32 + + + + + + Name + + The name of the web role, determines the name of the directory containing the scaffolding for the PHP application that will be hosted in the web role, default is WebRole# Where # is the number of web roles in the service + + String + + String + + + WebRole1 + + + Instances + + The number of role instances for this web role, default is 1 + + Int32 + + Int32 + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + php-dev + + + + + + -------------- Default -------------- + + + C:\PS> + C:\PS> + + Add-AzurePHPWebRole + + Adds a Microsoft Azure web role with the default configuration (Name = "Webole1", Instances = 1) + + + + + + + + + + + + + + + + + + + -------------- Single Instance Web Role -------------- + + + C:\PS> + C:\PS> + + Add-AzurePHPWebRole -Name MyWebRole + + Adds scaffolding for a single web role named "MyWebRole" to the current application + + + + + + + + + + + + + + + + + + + -------------- Multiple Instance Web Role -------------- + + + C:\PS> + C:\PS> + + Add-AzurePHPWebRole MyWebRole -I 2 + + Adds scaffolding for a new web role named "MyWebRole" to the current application, with a role instance count of 2 + + + + + + + + + + + + + + + + + + + + New-AzureServiceProject + + + + Add-AzurePHPWorkerRole + + + + + + + + Add-AzurePHPWorkerRole + + Creates scaffolding for a PHP application which will be hosted in the cloud via php.exe + + + + + + Add + AzurePHPWorkerRole + + + + + + Creates scaffolding for a PHP application which will be hosted in the cloud via php.exe + + + + Add-AzurePHPWorkerRole + + Name + + The name of the worker role, determines the folder name that will contain the scaffolding for the PHP service hosted in the worker role + + String + + + Instances + + The number of role instances for this worker role, default is 1 + + Int32 + + + + + + Name + + The name of the worker role, determines the folder name that will contain the scaffolding for the PHP service hosted in the worker role + + String + + String + + + WorkerRole1 + + + Instances + + The number of role instances for this worker role, default is 1 + + Int32 + + Int32 + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + php-dev + + + + + + -------------- Default -------------- + + + C:\PS> + C:\PS> + + Add-AzurePHPWorkerRole + + Adds a Microsoft Azure Worker role with the default configuration (Name = "WorkerRole1", Instances = 1) + + + + + + + + + + + + + + + + + + + -------------- Single Instance Worker Role -------------- + + + C:\PS> + C:\PS> + + Add-AzurePHPWorkerRole MyWorkerRole + + Adds scaffolding for a single worker role named "MyWorkerRole" to the current application + + + + + + + + + + + + + + + + + + + -------------- Multiple Instance Worker Role -------------- + + + C:\PS> + C:\PS> + + Add-AzurePHPWorkerRole MyWorkerRole -I 2 + + Adds scaffolding for a new worker role named "MyWorkerRole" to the current application, with a role instance count of 2 + + + + + + + + + + + + + + + + + + + + New-AzureServiceProject + + + + Add-AzurePHPWebRole + + + + + + + + Disable-AzureServiceProjectRemoteDesktop + + Disables remote desktop access to a hosted service + + + + + + Disable + AzureServiceProjectRemoteDesktop + + + + + + Disables remote desktop access to a hosted service. You must publish the service using the Publish-AzureServiceProject cmdlet after disabling remote desktop access for the change to take effect. + + + + Disable-AzureServiceProjectRemoteDesktop + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-dev, php-dev, python-dev + + + + + + + Enable-AzureServiceProjectRemoteDesktop + + + + Publish-AzureServicProjecte + + + + + + + + Enable-AzureMemcacheRole + + Enable memcached for the specified web role, configured to communicate with the specified dedicated cache role + + + + + + Enable + AzureMemcacheRole + + + + + + Enable memcached for the specified web role, configured to communicate with the specified dedicated cache role + + + + Enable-AzureMemcacheRole + + RoleName + + The name of the web role that will use the cache + + String + + + CacheWorkerRoleName + + The name of the dedicated cache worker role, created with Add-AzureCacheWorkerRole + + String + + + CacheRuntimeVersion + + The cache runtime version + + String + + + + + + RoleName + + The name of the web role that will use the cache + + String + + String + + + + + + + CacheWorkerRoleName + + The name of the dedicated cache worker role, created with Add-AzureCacheWorkerRole + + String + + String + + + + + + + CacheRuntimeVersion + + The cache runtime version + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Enable Caching in web role -------------- + + + C:\PS> + C:\PS> + + Enable-AzureMemcacheRole WebRole1 WorkerRole1 + + Enables memcached in web role WebRole1, using dedicated caching role WorkerRole1 + + + + + + + + + + + + + + + + + + + -------------- Enable Caching in worker role -------------- + + + C:\PS> + C:\PS> + + Enable-AzureMemcacheRole WorkerRole1 CacheWorkerRole + + Enables memcached in worker role WorkerRole1, using dedicated caching role CacheWorkerRole + + + + + + + + + + + + + + + + + + + -------------- Enable Caching in web role with runtime version specified -------------- + + + C:\PS> + C:\PS> + + Enable-AzureMemcacheRole WebRole1 WorkerRole1 1.8.0 + + Enables memcached with runtime version 1.8.0 in web role WebRole1, using dedicated caching role WorkerRole1 + + + + + + + + + + + + + + + + + + + + Add-AzureCacheWorkerRole + + + + Add-AzureNodeWebRole + + + + Add-AzurePHPWebRole + + + + + + + + Enable-AzureServiceProjectRemoteDesktop + + Enables remote desktop access to a hosted service + + + + + + Enable + AzureServiceProjectRemoteDesktop + + + + + + Enables remote desktop access to a hosted service. You must publish the service using the Publish-AzureServiceProject cmdlet after enabling remote desktop access for the change to take effect. + + + + Enable-AzureServiceProjectRemoteDesktop + + Username + + The username credential you will use when connecting to the azure role instance via RDP. The cmdlet will prompt you for a password. + + String + + + Password + + + + + SecureString + + + + + + Username + + The username credential you will use when connecting to the azure role instance via RDP. The cmdlet will prompt you for a password. + + String + + String + + + None + + + Password + + + + + SecureString + + SecureString + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-dev, php-dev, python-dev + + + + + + + Disable-AzureServiceProjectRemoteDesktop + + + + Publish-AzureServiceProject + + + + + + + + Get-AzureServiceProjectRoleRuntime + + Get the runtimes available to install in a role + + + + + + Get + AzureServiceProjectRoleRuntime + + + + + + Gets the runtimes available to install in a role. + + + + Get-AzureServiceProjectRoleRuntime + + Runtime + + + The name of the runtime. If a runtime specified, only the specific versions of that runtime + available to install in your role in Azure will be returned. + + + String + + + + + + Runtime + + + The name of the runtime. If a runtime specified, only the specific versions of that runtime + available to install in your role in Azure will be returned. + + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-dev, php-dev, python + + + + + + + Add-AzureNodeWebRole + + + + Add-AzureNodeWorkerRole + + + + Set-AzureServiceProjectRole + + + + Set-AzureServiceProject + + + + + + + + New-AzureServiceProject + + Creates scaffolding for a new service + + + + + + New + AzureServiceProject + + + + + + Creates the necessary files and configuration for a new Microsoft Azure service in the current directory + + + + New-AzureServiceProject + + ServiceName + + The name of the service - determines the leftmost portion of the hostname for your service (i.e. <Name>.cloudapp.net), and the directory that will contain your service. Must contain only letters, digits, and the dash character (-). + + String + + + + + + ServiceName + + The name of the service - determines the leftmost portion of the hostname for your service (i.e. <Name>.cloudapp.net), and the directory that will contain your service. Must contain only letters, digits, and the dash character (-). + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-dev, php-dev, python-dev + + + + + + -------------- Default -------------- + + + C:\PS> + C:\PS> + + New-AzureServiceProject "MyService1" + + Create scaffolding for a new Microsoft Azure service named "MyService1" in the current directory. + + + + + + + + + + + + + + + + + + + + Add-AzureNodeWebRole + + + + Add-AzureNodeWorkerRole + + + + Set-AzureServiceProject + + + + Set-AzureServiceProjectRole + + + + + + + + Publish-AzureServiceProject + + Publish the current service to the cloud + + + + + + Publish + AzureServiceProject + + + + + + Publish the current service to the cloud. Publishing configuration (Subscription, StorageAccountName, Location, Slot) can be specified on the command line, or in local settings via the Set-AzureServiceProject commands. + + + + Publish-AzureServiceProject + + ServiceName + + The name to be used for the service when publishing to the cloud. The name determines the subdomain label in the cloudapp.net subdomain that will be used to address the service when hosted in Azure (that is, <Name>.cloudapp.net). Any name specified while publishing the service will override the name given when creating the service (see the New-AzureServiceProject commandlet). + + String + + + Package + + The package file to deploy. Possible value are either a local .cspkg file or a blob uri containing the package. When you use this option, you don't need to specify 'ServiceName' parameter. + + String + + + Configuration + + The service configuration file. This value is used together with the 'Package' parameter. + + String + + + StorageAccountName + + The Microsoft Azure storage account name to be used while publishing the service to the cloud. This value is not used until the service is published to the cloud. If no storage account name is provided, the storage account specified by the last call to Set-AzureServiceProject will be used. If no storage account was ever specified, a storage account matching the name of the service will be used. If no such storage account exists, the commandlet will attempt to create a new one - this may fail if a storage account matching the service name exists in another subscription. + + String + + + Location + + The region in which the application will be hosted. Possible values are: Anywhere Asia, Anywhere Europe, Anywhere US, East Asia, East US, North Central US, North Europe, South Central US, Southeast Asia, West Europe, West US. If no Location is specified, the location specified in the last call to Set-AzureServiceProject will be used. If no Location was ever specified, the Location will be randomly chosen from 'North Central US' and 'South Central US' locations. + + String + + + Slot + + The deployment slot to be used for this service. Possible values are 'Staging' and 'Production'. If no slot is specified, the slot provided in the last call to Set-AzureDeploymentSlot will be used. If no slot was ever specified, the 'Production' slot will be used. + + String + + + Launch + + If specified, launch a browser window to view the application after it is deployed to Azure + + + + AffinityGroup + + The affinity group name + + String + + + DeploymentName + + The deployment name + + String + + + + + + ServiceName + + The name to be used for the service when publishing to the cloud. The name determines the subdomain label in the cloudapp.net subdomain that will be used to address the service when hosted in Azure (that is, <Name>.cloudapp.net). Any name specified while publishing the service will override the name given when creating the service (see the New-AzureServiceProject commandlet). + + String + + String + + + + + + + Package + + The package file to deploy. Possible value are either a local .cspkg file or a blob uri containing the package. When you use this option, you don't need to specify 'ServiceName' parameter. + + String + + String + + + + + + + Configuration + + The service configuration file. This value is used together with the 'Package' parameter. + + String + + String + + + + + + + StorageAccountName + + The Microsoft Azure storage account name to be used while publishing the service to the cloud. This value is not used until the service is published to the cloud. If no storage account name is provided, the storage account specified by the last call to Set-AzureServiceProject will be used. If no storage account was ever specified, a storage account matching the name of the service will be used. If no such storage account exists, the commandlet will attempt to create a new one - this may fail if a storage account matching the service name exists in another subscription. + + String + + String + + + Value taken from the current service settings or the current publish profile + + + Location + + The region in which the application will be hosted. Possible values are: Anywhere Asia, Anywhere Europe, Anywhere US, East Asia, East US, North Central US, North Europe, South Central US, Southeast Asia, West Europe, West US. If no Location is specified, the location specified in the last call to Set-AzureServiceProject will be used. If no Location was ever specified, the Location will be randomly chosen from 'North Central US' and 'South Central US' locations. + + String + + String + + + value from current service settings + + + Slot + + The deployment slot to be used for this service. Possible values are 'Staging' and 'Production'. If no slot is specified, the slot provided in the last call to Set-AzureDeploymentSlot will be used. If no slot was ever specified, the 'Production' slot will be used. + + String + + String + + + Value from current service settings + + + Launch + + If specified, launch a browser window to view the application after it is deployed to Azure + + + SwitchParameter + + + Off + + + AffinityGroup + + The affinity group name + + String + + + DeploymentName + + The deployment name + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-dev, php-dev, python-dev + + + + + + -------------- Default -------------- + + + C:\PS> + C:\PS> + + Publish-AzureServiceProject + + Publishes the current service, using the current service settings and the current Azure publish profile + + + + + + + + + + + + + + + + + + + + Import-AzurePublishSettingsFile + + + + New-AzureServiceProject + + + + Set-AzureServiceProject + + + + Set-AzureServiceProjectRole + + + + + + + + Remove-AzureService + + Removes the current hosted service + + + + + + Remove + AzureService + + + + + + Stops and removes the current hosted service, or the service matching the specified service and subscription name. + + + + Remove-AzureService + + ServiceName + + The name of the service to be removed. If the command is run from a service directory and no name is specified, uses the current service name. + + String + + + Subscription + + The subscription name that was used to host the service. If no subscription is specified, uses the subscription specified in the last call to Set-AzureDeploymentSubscription. If no subscription was ever specified, uses the first subscription in the current Azure publish profile. + + String + + + Force + + Remove service without confirmation prompts + + + + + + + ServiceName + + The name of the service to be removed. If the command is run from a service directory and no name is specified, uses the current service name. + + String + + String + + + + + + + Subscription + + The subscription name that was used to host the service. If no subscription is specified, uses the subscription specified in the last call to Set-AzureDeploymentSubscription. If no subscription was ever specified, uses the first subscription in the current Azure publish profile. + + String + + String + + + + + + + Force + + Remove service without confirmation prompts + + + SwitchParameter + + + + + + + DeleteAll + + Specify to remove the service and the underlying disk blob(s). + + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-dev, php-dev, python-dev + + + + + + + Publish-AzureServiceProject + + + + Stop-AzureService + + + + Start-AzureService + + + + + + + + Set-AzureServiceProject + + Sets default location, subscription, slot, and storage account for the current service + + + + + + Set + AzureServiceProject + + + + + + Sets the deployment location, slot, storage account, and subscription for the current service. These values are used whenever the service is published to the cloud. + + + + Set-AzureServiceProject + + Location + + The region in which the service will be hosted. This value is used whenever the service is published to the cloud. Possible values are: Anywhere Asia, Anywhere Europe, Anywhere US, East Asia, East US, North Central US, North Europe, South Central US, Southeast Asia, West Europe, West US. + + String + + + Slot + + The slot (production or staging) in which the service will be hosted. This value is used whenever the service is published to the cloud. Possible values are: Production, Staging. + + String + + + Storage + + The storage account to be used when uploading the service package to the cloud. If the storage account doesn't exist, it will be created when the service is published to the cloud. + + String + + + Subscription + + The subscription that will host the service in the cloud. This value is used whenever the service is published to the cloud. You will need to register credentials for this subscription by using the Import-AzurePublishSettingsFile commandlet. + + String + + + + + + Location + + The region in which the service will be hosted. This value is used whenever the service is published to the cloud. Possible values are: Anywhere Asia, Anywhere Europe, Anywhere US, East Asia, East US, North Central US, North Europe, South Central US, Southeast Asia, West Europe, West US. + + String + + String + + + + + + + Slot + + The slot (production or staging) in which the service will be hosted. This value is used whenever the service is published to the cloud. Possible values are: Production, Staging. + + String + + String + + + + + + + Storage + + The storage account to be used when uploading the service package to the cloud. If the storage account doesn't exist, it will be created when the service is published to the cloud. + + String + + String + + + + + + + Subscription + + The subscription that will host the service in the cloud. This value is used whenever the service is published to the cloud. You will need to register credentials for this subscription by using the Import-AzurePublishSettingsFile commandlet. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-dev, php-dev, python-dev + + + + + + -------------- Basic Settings -------------- + + + C:\PS> + C:\PS> + + Set-AzureServiceProject -Location "North Central US" -Slot Production -Storage myStorageAccount -Subscription myAzureSubscription + + + Sets the deployment location for the service to the North Central US region. Sets the deloyment slot to Production. + Sets the storage account ahat will be used to stage the service definition to 'myStorageAccount'. Sets the subscription + that will host the service to 'mySubscription'. Whenever the service is published to the cloud, it will be hosted in a + data center in the North Central US region, it will update the deployment slot, and it will use the specified subscription + and storage account. + + + + + + + + + + + + + + + + + + + + + New-AzureServiceProject + + + + Import-AzurePublishSettingsFile + + + + Publish-AzureServiceProject + + + + Set-AzureServiceProjectRole + + + + + + + + Set-AzureServiceProjectRole + + Set the number of instances, vm size or the runtime version of a role + + + + + + Set + AzureServiceProjectRole + + + + + + Sets the number of role instances for the specified role. + + + + Set-AzureServiceProjectRole + + RoleName + + The name of the web or worker role that is changing + + String + + + Instances + + The number of role instances for the specified web or worker role + + Int32 + + + + Set-AzureServiceProjectRole + + RoleName + + The name of the web or worker role that is changing + + String + + + Runtime + + The runtime to add to the specified role + + String + + + Version + + The runtime version to add to the specified role + + String + + + + Set-AzureServiceProjectRole + + RoleName + + The name of the web or worker role that is changing + + String + + + VMSize + + The vm size of the role + + String + + + + + + RoleName + + The name of the web or worker role that is changing + + String + + String + + + + + + + Instances + + The number of role instances for the specified web or worker role + + Int32 + + Int32 + + + + + + + VMSize + + The vm size of the role + + String + + String + + + + + + + Runtime + + The runtime to add to the specified role + + String + + String + + + + + + + Version + + The runtime version to add to the specified role + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-dev, php-dev, python + + + + + + -------------- Web Role -------------- + + + C:\PS> + C:\PS> + + Set-AzureServiceProjectRole "MyWebRole" 2 + + Sets the number of instances for the web role named 'MyWebRole1' to 2 + + + + + + + + + + + + + + + + + + + -------------- Worker Role -------------- + + + C:\PS> + C:\PS> + + Set-AzureServiceProjectRole "MyWorkerRole1" 2 + + Sets the role instance count for the worker role named "WorkerRole1" to 2 + + + + + + + + + + + + + + + + + + + -------------- Add Node Runtime -------------- + + + C:\PS> + C:\PS> + + Set-AzureServiceProjectRole MyRole1 node 0.6.20 + + Sets the node.exe runtime version for role "MyRole1" to 0.6.20. + + + + + + + + + + + + + + + + + + + -------------- Change Web Role VM Size to ExtraLarge-------------- + + + C:\PS> + C:\PS> + + Set-AzureServiceProjectRole "MyWebRole" -VMSize ExtraLarge + + Sets VMSize for the web role named 'MyWebRole1' to ExtraLarge + + + + + + + + + + + + + + + + + + + + Add-AzureNodeWebRole + + + + Add-AzureNodeWorkerRole + + + + Set-AzureServiceProject + + + + Get-AzureServiceProjectRoleRuntime + + + + + + + + Start-AzureEmulator + + Starts both the compute and storage emulators and hosts the current service in the compute emulator + + + + + Start + AzureEmulator + + + + + Starts both the compute and storage emulators and executes the service + + + + Start-AzureEmulator + + Launch + + Open a new browser window on the service after hosting it in the emulator + + SwitchParameter + + + Mode + + Emulator mode. Valid values are 'Full' and 'Express'. Default value is 'Express' + + String + + + + + + Launch + + Open a new browser window on the service after hosting it in the emulator + + SwitchParameter + + SwitchParameter + + + + + + + Mode + + Emulator mode. Valid values are 'Full' and 'Express'. Default value is 'Express' + + String + + String + + + Express + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-dev, php-dev, python-dev + + + + + -------------- Launch -------------- + + + + + PS C:\> Start-AzureEmulator -L + + Executes the service in the Azure emulator and launches a new browser window on the emulated service + + + + + + + + + + + + New-AzureServiceProject + + + + + Publish-AzureServiceProject + + + + + Stop-AzureEmulator + + + + + + + + + Start-AzureService + + Starts the specified hosted service in Azure + + + + + + Start + AzureService + + + + + + Starts the specified hosted service in the cloud, if the service is in the stopped state. Note that the Publish-AzureServiceProject command will attempt to automatically start the service + + + + Start-AzureService + + ServiceName + + The name of the hosted service to start. If no name is specified, starts the current hosted service. + + String + + + Slot + + The deployment slot (Staging, Production) to start the service in + + String + + + Subscription + + The subscription to use when starting the specified service + + String + + + + + + ServiceName + + The name of the hosted service to start. If no name is specified, starts the current hosted service. + + String + + String + + + + + + + Slot + + The deployment slot (Staging, Production) to start the service in + + String + + String + + + + + + + Subscription + + The subscription to use when starting the specified service + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-dev, php-dev, python-dev + + + + + + + Publish-AzureServiceProject + + + + Remove-AzureService + + + + Stop-AzureService + + + + + + + + Stop-AzureEmulator + + Stops the compute emulator + + + + + + Stop + AzureEmulator + + + + + + Stops the Microsoft Azure compute emulator. Any services currently executing in the emulator will be removed. + + + + Stop-AzureEmulator + + Launch + + + + + + + + + + Launch + + + + + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-dev, php-dev, python-dev + + + + + + + Start-AzureEmulator + + + + + + + + Stop-AzureService + + Stops the current hosted service + + + + + + Stop + AzureService + + + + + + Stops the current hosted service in the specified slot in Microsoft Azure. If no slot is specified, stops the service in the Production slot + + + + Stop-AzureService + + ServiceName + + The name of the hosted service to stop. If no name is specified, stops the current hosted service. + + String + + + Slot + + The slot where the service is hosted. If no slot is specified, 'Production' is assumed. + + String + + + Subscription + + The subscription to use when stopping the specified service. + + String + + + + + + ServiceName + + The name of the hosted service to stop. If no name is specified, stops the current hosted service. + + String + + String + + + + + + + Slot + + The slot where the service is hosted. If no slot is specified, 'Production' is assumed. + + String + + String + + + + + + + Subscription + + The subscription to use when stopping the specified service. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-dev, php-dev, python-dev + + + + + + + Remove-AzureService + + + + Start-AzureService + + + + + + + Test-AzureName + + Tests whether a Microsoft Azure cloud service name, storage service name or service bus namespace name exists or not. + + + + + Test + AzureName + + + + If the name exists, the cmdlet returns $True. If the name does not exist, it returns $False. + + + + Test-AzureName + + Service + + Specifies to test for an existing cloud service. + + SwitchParameter + + + Name + + Specifies the name of the cloud service to test. + + String + + + + Test-AzureName + + Storage + + Specifies to test for an existing storage service. + + SwitchParameter + + + Name + + Specifies the name of the storage account to test. + + String + + + + Test-AzureName + + ServiceBusNamespace + + Specifies to test for an existing service bus namespace. + + SwitchParameter + + + Name + + Specifies the name of the service bus namespace to test. + + String + + + + Test-AzureName + + Website + + Specifies to test for an existing website. + + SwitchParameter + + + Name + + Specifies the name of the service bus namespace to test. + + String + + + + + + Name + + Specifies the name of the service or storage account to test. + + String + + String + + + + + + + Service + + Specifies to test for an existing service account. + + SwitchParameter + + SwitchParameter + + + + + + + Storage + + Specifies to test for an existing storage account. + + SwitchParameter + + SwitchParameter + + + + + + + ServiceBusNamespace + + Specifies to test for an existing service bus namespace. + + SwitchParameter + + + Website + + Specifies to test for an existing website. + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-dev, php-dev, python-dev + + + + + + -------------- Example 1 -------------- + + + + + + + C:\PS>Test-AzureName –Service "MyNameService1" + + + This command tests to see if the "MyNameService1" is an existing Microsoft Azure cloud service name. + + + + + + + + + + -------------- Example 2 -------------- + + + + + + + C:\PS>Test-AzureName –Storage "mystorename1" + + + This command tests to see if the "mystorename1" is an existing Microsoft Azure storage service name. + + + + + + + + + + -------------- Example 3 -------------- + + + + + + + C:\PS>Test-AzureName –ServiceBusNamespace "mynamespace" + + + This command tests to see if the "mynamespace" is an existing Microsoft Azure service bus namespace name. + + + + + + + + + + + + + + Save-AzureServiceProjectPackage + + Packages the service project into Microsoft Azure cloud package (*.cspkg). + + + + + Save + AzureServiceProjectPackage + + + + Packages the service project into Microsoft Azure cloud package (*.cspkg). + + + + Save-AzureServiceProjectPackage + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-dev, php-dev, python-dev + + + + + + -------------- Example 1 -------------- + + + + + + + C:\PS\MyAzureServiceProject>Save-AzureServiceProjectPackage + + + This command Creates *.cspgk for MyAzureServiceProject service project. + + + + + + + + + + + + + + + Add-AzureWebRole + + Creates scaffolding for a custom web role + + + + + + Add + AzureWebRole + + + + + + Creates scaffolding for a custom web role + + + + Add-AzureWebRole + + Name + + The name of the web role, determines the name of the directory containing the scaffolding for the custom application that will be hosted in the web role, default is WebRole# Where # is the number of web roles in the service + + String + + + Instances + + The number of role instances for this web role, default is 1 + + Int32 + + + TemplateFolder + + The web role scaffolding template folder to use + + String + + + + + + Name + + The name of the web role, determines the name of the directory containing the scaffolding for the custom application that will be hosted in the web role, default is WebRole# Where # is the number of web roles in the service + + String + + String + + + WebRole1 + + + Instances + + The number of role instances for this web role, default is 1 + + Int32 + + Int32 + + + 1 + + + TemplateFolder + + The web role scaffolding template folder to use + + String + + String + + + WebRole1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-dev, php-dev, python-dev + + + + + + -------------- Default -------------- + + + C:\PS> + C:\PS> + + Add-AzureWebRole + + Adds a Microsoft Azure web role with the default configuration (Name = "Webole1", Instances = 1) + + + + + + + + + + + + + + + + + + + -------------- Single Instance Web Role -------------- + + + C:\PS> + C:\PS> + + Add-AzureWebRole -Name MyWebRole + + Adds scaffolding for a single web role named "MyWebRole" to the current application + + + + + + + + + + + + + + + + + + + -------------- Multiple Instance Web Role -------------- + + + C:\PS> + C:\PS> + + Add-AzureWebRole MyWebRole -I 2 + + Adds scaffolding for a new web role named "MyWebRole" to the current application, with a role instance count of 2 + + + + + + + + + + + + + + + + + + + -------------- Create web role with custom scaffolding -------------- + + + C:\PS> + C:\PS> + + Add-AzureWebRole MyWebRole -TemplateFolder .\MyWebTemplateFolder + + Adds scaffolding for a new web role named "MyWebRole" to the current application with MyWebTemplateFolder as scaffolding template + + + + + + + + + + + + + + + + + + + + New-AzureServiceProject + + + + Add-AzureWorkerRole + + + + + + + + Add-AzureWorkerRole + + Creates scaffolding for a custom worker role + + + + + + Add + AzureWorkerRole + + + + + + Creates scaffolding for a custom worker role + + + + Add-AzureWorkerRole + + Name + + The name of the worker role, determines the name of the directory containing the scaffolding for the custom application that will be hosted in the worker role, default is WorkerRole# Where # is the number of Worker roles in the service + + String + + + Instances + + The number of role instances for this worker role, default is 1 + + Int32 + + + TemplateFolder + + The scaffolding template folder used to create the worker role + + String + + + + + + Name + + The name of the worker role, determines the name of the directory containing the scaffolding for the custom application that will be hosted in the worker role, default is WorkerRole# Where # is the number of Worker roles in the service + + String + + String + + + WorkerRole1 + + + Instances + + The number of role instances for this worker role, default is 1 + + Int32 + + Int32 + + + 1 + + + TemplateFolder + + The scaffolding template folder used to create the worker role + + String + + String + + + WorkerRole1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-dev, php-dev, python-dev + + + + + + -------------- Default -------------- + + + C:\PS> + C:\PS> + + Add-AzureWorkerRole + + Adds a Microsoft Azure worker role with the default configuration (Name = "Workerole1", Instances = 1) + + + + + + + + + + + + + + + + + + + -------------- Single Instance Worker Role -------------- + + + C:\PS> + C:\PS> + + Add-AzureWorkerRole -Name MyWorkerRole + + Adds scaffolding for a single worker role named "MyWorkerRole" to the current application + + + + + + + + + + + + + + + + + + + -------------- Multiple Instance Worker Role -------------- + + + C:\PS> + C:\PS> + + Add-AzureWorkerRole MyWorkerRole -I 2 + + Adds scaffolding for a new worker role named "MyWorkerRole" to the current application, with a role instance count of 2 + + + + + + + + + + + + + + + + + + + -------------- Create worker role with custom scaffolding -------------- + + + C:\PS> + C:\PS> + + Add-AzureWorkerRole MyWorkerRole -TemplateFoldr .\MyWorkerRoleTemplate + + Adds scaffolding for a new worker role named "MyWorkerRole" to the current application, with custom scaffolding .\MyWorkerRoleTemplate + + + + + + + + + + + + + + + + + + + + New-AzureServiceProject + + + + Add-AzureWorkerRole + + + + + + + + New-AzureRoleTemplate + + Creates azure web and worker role template + + + + + + New + AzureRoleTemplate + + + + + + Creates azure web and worker role template + + + + New-AzureRoleTemplate + + Web + + Indicates that cmdlet should create web role template folder + + + + Worker + + Indicates that cmdlet should create worker role template folder + + + + Output + + The output path of generated template + + String + + + + + + Web + + Indicates that cmdlet should create web role template folder + + SwitchParameter + + SwitchParameter + + + + + Worker + + Indicates that cmdlet should create web role template folder + + SwitchParameter + + SwitchParameter + + + + + Output + + The output path of generated template + + String + + String + + + .\[Web][Worker]RoleTemplate + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + node-dev, php-dev, python-dev + + + + + + -------------- Add web role template -------------- + + + C:\PS> + C:\PS> + + New-AzureRoleTemplate -Web + + Create new azure web role template in folder called WebRoleTemplate in the current directory + + + + + + + + + + + + + + + + + + + -------------- Add worker role template -------------- + + + C:\PS> + C:\PS> + + New-AzureRoleTemplate -Worker + + Create new azure worker role template in folder called WorkerRoleTemplate in the current directory + + + + + + + + + + + + + + + + + + + -------------- Add Web role template in output folder-------------- + + + C:\PS> + C:\PS> + + New-AzureRoleTemplate -Web -Output C:\MyWebRoleTemplate + + Create new azure web role template in in MyWebRoleTemplate + + + + + + + + + + + + + + + + + + + + New-AzureServiceProject + + + + Add-AzureWorkerRole + + + + Add-AzureWebRole + + + + + + + + Get-AzureSBLocation + + Get the Microsoft Azure regions that may be used to create new Microsoft Azure ServiceBus namespaces + + + + + + Get + AzureSBLocation + + + + + + Get the Microsoft Azure regions that may be used to create new Microsoft Azure ServiceBus namespaces + + + + Get-AzureSBLocation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureSBNamespace + + + + New-AzureSBNamespace + + + + Remove-AzureSBNamespace + + + + + + + + Get-AzureSBNamespace + + Get information about existing Microsoft Azure ServiceBus namespaces + + + + + + Get + AzureSBNamespace + + + + + + List current Microsoft Azure Namespaces or get details about a particular Microsoft Azure ServiceBus namespace + + + + Get-AzureSBNamespace + + Name + + The name of the ServiceBus namespace + + String + + + + + + Name + + The name of the ServiceBus namespace + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- List namespaces -------------- + + + C:\PS> + C:\PS> + + Get-AzureSBNamespace + + List all current Microsoft Azure ServiceBus namespaces + + + + + + + + + + + + + + + + + + + -------------- Get ServiceBus namespace detail -------------- + + + C:\PS> + C:\PS> + + Get-AzureSBNamespace myNamespace + + Get details information about the Microsoft Azure ServiceBus namespace 'myNamespace' + + + + + + + + + + + + + + + + + + + + Get-AzureSBLocation + + + + New-AzureSBNamespace + + + + Remove-AzureSBNamespace + + + + + + + + New-AzureSBNamespace + + Create a new Microsoft Azure ServiceBus namespace + + + + + + New + AzureSBNamespace + + + + + + Create a new Microsoft Azure ServiceBus namespace + + + + New-AzureSBNamespace + + Name + + The name of the namespace to create + + String + + + Location + + The location to create the namespace in + + String + + + CreateACSNamespace + + Create assosciated ACS namespace as well + + Boolean + + + NamespaceType + + Choose if the Namespace will be used for Messaging or Notification Hubs + + NamespaceType + + + + + + Name + + The name of the namespace to create + + String + + String + + + + + + + Location + + The location to create the namespace in + + String + + String + + + + + + + CreateACSNamespace + + Create assosciated ACS namespace as well + + Boolean + + Boolean + + + + + + + NamespaceType + + Choose if the Namespace will be used for Messaging or Notification Hubs + + NamespaceType + + NamespaceType + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureSBLocation + + + + Get-AzureSBNamespace + + + + New-AzureSBNamespace + + + + + + + + Remove-AzureSBNamespace + + Delete a WindowsAzure ServiceBus namespace and all associated objects + + + + + + Remove + AzureSBNamespace + + + + + + Delete a WindowsAzure ServiceBus namespace and all associated objects + + + + Remove-AzureSBNamespace + + Name + + The name of the Microsoft Azure ServiceBus namespace to remove + + String + + + + + + Name + + The name of the Microsoft Azure ServiceBus namespace to remove + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get-AzureSBLocation + + + + Get-Azure-SBNamespace + + + + New-AzureSBNamespace + + + + + + + + New-AzureSBAuthorizationRule + + Creates new Service Bus authorization rule + + + + + + New + AzureSBAuthorizationRule + + + + + + Creates new Service Bus authorization rule + + + + New-AzureSBAuthorizationRule + + Name + + The unique authorization rule name + + String + + + Permission + + The authorization permissions (Send, Manage, Listen) + + AccessRights[] + + + Namespace + + The namespace name to apply the authorization rule. If no EntityName provided the rule will be on the namespace level + + String + + + EntityName + + The entity name to apply rule at. + + String + + + EntityType + + The entity type (Queue, Topic, Relay, NotificationHub). + + ServiceBusEntityType + + + PrimaryKey + + The Shared Access Signature primary key. Will be generated if not provided + + String + + + SecondaryKey + + The Shared Access Signature secondary key + + String + + + + + + Name + + The unique authorization rule name + + String + + + Permission + + The authorization permissions (Send, Manage, Listen) + + AccessRights[] + + + Namespace + + The namespace name to apply the authorization rule. If no EntityName provided the rule will be on the namespace level + + String + + + EntityName + + The entity name to apply rule at. + + String + + + EntityType + + The entity type (Queue, Topic, Relay, NotificationHub). + + ServiceBusEntityType + + + PrimaryKey + + The Shared Access Signature primary key. Will be generated if not provided + + String + + + SecondaryKey + + The Shared Access Signature secondary key + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Creates new authorization rule with generated primary key -------------- + + + C:\PS> + C:\PS> + + New-AzureSBAuthorizationRule -Name MyRule -Namespace MyNamespace -Permission $("Send") + + Creates new authorization rule on namespace level with Send permission + + + + + + + + + + + -------------- Creates new authorization rule providing primary key -------------- + + + C:\PS> + C:\PS> + + New-AzureSBAuthorizationRule -Name MyRule -Namespace MyNamespace -Permission $("Manage", "Listen", "Send") -EntityName MyEntity -EntityType Queue -PrimaryKey P+lL/Mnd2Z9sj5hwMrRyAxQDdX8RHfbdqU2eIAqs1rc= + + Creates new authorization rule on MyEntity Queue level with all permissions + + + + + + + + + + + + Get-AzureSBAuthorizationRule + + + + Set-AzureSBAuthorizationRule + + + + Remove-AzureSBAuthorizationRule + + + + + + + + Set-AzureSBAuthorizationRule + + Updates existing Service Bus authorization rule + + + + + + Set + AzureSBAuthorizationRule + + + + + + Updates existing Service Bus authorization rule + + + + Set-AzureSBAuthorizationRule + + Name + + The unique authorization rule name + + String + + + Permission + + The authorization permissions (Send, Manage, Listen) + + AccessRights[] + + + Namespace + + The namespace name to apply the authorization rule. If no EntityName provided the rule will be on the namespace level + + String + + + EntityName + + The entity name to apply rule at. + + String + + + EntityType + + The entity type (Queue, Topic, Relay, NotificationHub). + + ServiceBusEntityType + + + PrimaryKey + + The Shared Access Signature primary key. Will be generated if not provided + + String + + + SecondaryKey + + The Shared Access Signature secondary key + + String + + + + + + Name + + The unique authorization rule name + + String + + + Permission + + The authorization permissions (Send, Manage, Listen) + + AccessRights[] + + + Namespace + + The namespace name to apply the authorization rule. If no EntityName provided the rule will be on the namespace level + + String + + + EntityName + + The entity name to apply rule at. + + String + + + EntityType + + The entity type (Queue, Topic, Relay, NotificationHub). + + ServiceBusEntityType + + + PrimaryKey + + The Shared Access Signature primary key. Will be generated if not provided + + String + + + SecondaryKey + + The Shared Access Signature secondary key + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Renew primary key for authorization rule at namespace level -------------- + + + C:\PS> + C:\PS> + + Set-AzureSBAuthorizationRule -Name MyRule -Namespace MyNamespace -Permission $("Send") + + The primary key is renewed + + + + + + + + + + + -------------- Update authorization rule permission -------------- + + + C:\PS> + C:\PS> + + Set-AzureSBAuthorizationRule -Name MyRule -Namespace MyNamespace -Permission $("Listen", "Send") -EntityName MyEntity -EntityType Queue + + Updates the permissions + + + + + + + + + + + + Get-AzureSBAuthorizationRule + + + + New-AzureSBAuthorizationRule + + + + Remove-AzureSBAuthorizationRule + + + + + + + + Remove-AzureSBAuthorizationRule + + Removes existing Service Bus authorization rule + + + + + + Remove + AzureSBAuthorizationRule + + + + + + Removes existing Service Bus authorization rule + + + + Remove-AzureSBAuthorizationRule + + Name + + The unique authorization rule name + + String + + + Namespace + + The namespace name to apply the authorization rule. If no EntityName provided the rule will be on the namespace level + + String + + + EntityName + + The entity name to apply rule at. + + String + + + EntityType + + The entity type (Queue, Topic, Relay, NotificationHub). + + ServiceBusEntityType + + + + + + Name + + The unique authorization rule name + + String + + + Namespace + + The namespace name to apply the authorization rule. If no EntityName provided the rule will be on the namespace level + + String + + + EntityName + + The entity name to apply rule at. + + String + + + EntityType + + The entity type (Queue, Topic, Relay, NotificationHub). + + ServiceBusEntityType + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Remove authorization rule at namespace level -------------- + + + C:\PS> + C:\PS> + + Remove-AzureSBAuthorizationRule -Name MyRule -Namespace MyNamespace + + Removes authorization rule MyRule from MyNamespace + + + + + + + + + + + -------------- Remove authorization rule for a Queue -------------- + + + C:\PS> + C:\PS> + + Remove-AzureSBAuthorizationRule -Name MyRule -Namespace MyNamespace -EntityName MyEntity -EntityType Queue + + Removes authorization rule called MyRule for a MyEntity Queue on MyNamespace + + + + + + + + + + + + Get-AzureSBAuthorizationRule + + + + New-AzureSBAuthorizationRule + + + + Set-AzureSBAuthorizationRule + + + + + + + + Get-AzureSBAuthorizationRule + + Gets Service bus authorization rules + + + + + + Get + AzureSBAuthorizationRule + + + + + + Gets Service bus authorization rules + + + + Get-AzureSBAuthorizationRule + + Name + + The unique authorization rule name + + String + + + Namespace + + The namespace name to apply the authorization rule. If no EntityName provided the search will be on the namespace level + + String + + + EntityName + + The entity name to search for rule at. + + String + + + EntityType + + The entity type (Queue, Topic, Relay, NotificationHub). + + ServiceBusEntityType + + + Permission + + The authorization permissions to filter (Send, Manage, Listen). This uses exact match + + AccessRights[] + + + + Get-AzureSBAuthorizationRule + + Name + + The unique authorization rule name + + String + + + Namespace + + The namespace name to apply the authorization rule. If no EntityName provided the search will be on the namespace level + + String + + + Permission + + The authorization permissions to filter (Send, Manage, Listen). This uses exact match + + AccessRights[] + + + + + + Name + + The unique authorization rule name + + String + + + Namespace + + The namespace name to apply the authorization rule. If no EntityName provided the rule will be on the namespace level + + String + + + EntityName + + The entity name to apply rule at. + + String + + + EntityType + + The entity type (Queue, Topic, Relay, NotificationHub). + + ServiceBusEntityType + + + Permission + + The authorization permissions to filter (Send, Manage, Listen). This uses exact match + + AccessRights[] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Get authorization rule at namespace level -------------- + + + C:\PS> + C:\PS> + + Get-AzureSBAuthorizationRule -Namespace MyNamespace + + Gets all available authorization rules at MyNamespace + + + + + + + + + + + -------------- Get authorization rule for a Queue -------------- + + + C:\PS> + C:\PS> + + Get-AzureSBAuthorizationRule -Namespace MyNamespace -EntityName MyEntity -EntityType Queue + + Gets all available authorization rules a MyEntity Queue on MyNamespace + + + + + + + + + + + -------------- Get authorization rule by name -------------- + + + C:\PS> + C:\PS> + + Get-AzureSBAuthorizationRule -Name MyRule -Namespace MyNamespace + + Gets an authorization rule called MyRule on MyNamespace level + + + + + + + + + + + -------------- Get authorization rule by permisssion -------------- + + + C:\PS> + C:\PS> + + Get-AzureSBAuthorizationRule -Namespace MyNamespace -Permission $("Send") + + Gets all authorization rules that have send permission on namespace level + + + + + + + + + + + + Remove-AzureSBAuthorizationRule + + + + New-AzureSBAuthorizationRule + + + + Set-AzureSBAuthorizationRule + + + + + + + + Get-AzureStoreAddOn + + Gets all the available Microsoft Azure Store Add-Ons for purchasing or the existing add-on instances on the current subscription + + + + + + Get + AzureStoreAddOn + + + + + + Gets all the available Microsoft Azure Store Add-Ons for purchasing or the existing add-on instances on the current subscription + + + + Get-AzureStoreAddOn + + ListAvailable + + If specified, the cmdlet will get available Microsoft Azure Store Add-Ons for purchasing. + + Switch + + + Country + + If specified, only return the Microsoft Azure Store add-on instances available in that Country. Default is "US" + + String + + + Name + + If specified, returns the add-on instance that matches this name + + String + + + + + + ListAvailable + + If specified, the cmdlet will return all the available Microsoft Azure Store Add-Ons for purchasing. + + String + + String + + + + + + + Country + + If specified, only return the Azure Store add-on instances available in that Country. Default is "US" + + String + + String + + + + + + + Name + + If specified, returns the add-on instance that matches this name + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Get available Microsoft Azure Store Add-Ons for purchasing -------------- + + + C:\PS> + C:\PS> + + Get-AzureStoreAddOn -ListAvailable + + Get all the available Microsoft Azure Store Add-Ons for purchasing in US + + + + + + + + + + + + + + + + + + + -------------- Get available Microsoft Azure Store Add-Ons in CH -------------- + + + C:\PS> + C:\PS> + + Get-AzureStoreAddOn -ListAvailable -Country CH + + Get all the available Microsoft Azure Store Add-Ons for purchasing in CH + + + + + + + + + + + + + + + + + + + -------------- Get all purchased add-on instances on current subscription -------------- + + + C:\PS> + C:\PS> + + Get-AzureStoreAddOn + + Get all the purchased add-on instances on the current subscription + + + + + + + + + + + + + + + + + + + -------------- Get MyAddOn from the purcahsed add-on instance in current subscription -------------- + + + C:\PS> + C:\PS> + + Get-AzureStoreAddOn -Name MyAddOn + + Get MyAddOn from the current subscription + + + + + + + + + + + + + + + + + + + + + + New-AzureStoreAddOn + + Purchases a new add-on instance from Microsoft Azure Store + + + + + + New + AzureStoreAddOn + + + + + + Purchases a new add-on instance from Microsoft Azure Store + + + + New-AzureStoreAddOn + + Name + + The name of the add-on instance + + String + + + Addon + + The addon id + + String + + + Plan + + The plan id + + String + + + Location + + The add-on instance location + + String + + + PromotionCode + + The promotion code + + String + + + + + + Name + + The name of the add-on instance + + String + + + Addon + + The addon id + + String + + + Plan + + The plan id + + String + + + Location + + The add-on instance location + + String + + + PromotionCode + + The promotion code + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Purchase an add-on instance -------------- + + + C:\PS> + C:\PS> + + New-AzureStoreAddOn MyAddOn AddonId PlanId "West US" + + Purchases AddOnId and call it MyAddOn with plan PlanId in West US location + + + + + + + + + + + + + + + + + + + -------------- Purchase an add-on instance with promotion code-------------- + + + C:\PS> + C:\PS> + + New-AzureStoreAddOn MyAddOn AddonId PlanId "West US" MyPromoCode + + Purchases AddOnId and call it MyAddOn with plan PlanId and promotion code MyPromoCode in West US location + + + + + + + + + + + + + + + + + + + + + + Set-AzureStoreAddOn + + Updates an existing add-on instance from current subscription + + + + + + Set + AzureStoreAddOn + + + + + + Updates an existing add-on instance from current subscription + + + + Set-AzureStoreAddOn + + Name + + The name of the add-on instance + + String + + + Plan + + The plan id + + String + + + PromotionCode + + The promotion code + + String + + + PassThru + + If specified, the cmdlet return true is succeed and false in failure. + + Boolean + + + + + + Name + + The name of the add-on instance + + String + + + Plan + + The plan id + + String + + + PromotionCode + + The promotion code + + String + + + PassThru + + If specified, the cmdlet return true is succeed and false in failure. + + Boolean + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Update MyAddOn add-on instance -------------- + + + C:\PS> + C:\PS> + + Set-AzureStoreAddOn MyAddOn NewPlanId + + Updated MyAddOn with plan NewPlanId + + + + + + + + + + + + + + + + + + + -------------- Update an add-on instance with promotion code-------------- + + + C:\PS> + C:\PS> + + Set-AzureStoreAddOn MyAddOn NewPlanId MyPromoCode + + Updates MyAddOn with plan NewPlanId and promotion code MyPromoCode + + + + + + + + + + + + + + + + + + + + + + Remove-AzureStoreAddOn + + Removes an existing add-on instance + + + + + + Remove + AzureStoreAddOn + + + + + + Removes an existing add-on instance + + + + Remove-AzureStoreAddOn + + Name + + The name of the add-on instance + + String + + + + + + Name + + The name of the add-on instance + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Remove MyAddOn add-on instance -------------- + + + C:\PS> + C:\PS> + + Remove-AzureStoreAddOn MyAddOn + + Removes MyAddOn add-on instance from current subscription + + + + + + + + + + + + + + + + + + + + + Get-AzureWebsite + + Gets Azure websites in the current subscription. + + + + + Get + AzureWebsite + + + + The Get-AzureWebsite cmdlet gets information about Azure websites in the current subscription. + By default, Get-AzureWebsite gets all Azure websites in the current subscription and returns an object that provides basic information about the sites. When you use the Name parameter, Get-AzureWebsite returns an object with extensive information, including configuration details. + + The current subscription is the subscription that is designated as "current." To find the current subscription, use the Current parameter of the + Get-AzureSubscription + + cmdlet. To change the current subscription, use the + Select-AzureSubscription + + cmdlet. + + + + + Get-AzureWebsite + + Name + + Gets detailed configuration information about the specified website. Enter the name of one website in the subscription. By default, Get-AzureWebsite gets all websites in the current subscription. The Name value does not support wildcard characters. + + String + + + Slot + + + Gets the specified deployment slot of the website. Enter the slot name, such as "Staging" or "Production". For more information about deployment slots, see + Staged Deployment on Microsoft Azure Web Sites + + . To add a deployment slot to an existing Azure website, use the Set-AzureWebsite cmdlet. + + + String + + + + + + Name + + Gets detailed configuration information about the specified website. Enter the name of one website in the subscription. By default, Get-AzureWebsite gets all websites in the current subscription. The Name value does not support wildcard characters. + + String + + String + + + + + + + Slot + + + Gets the specified deployment slot of the website. Enter the slot name, such as "Staging" or "Production". For more information about deployment slots, see + Staged Deployment on Microsoft Azure Web Sites + + . To add a deployment slot to an existing Azure website, use the Set-AzureWebsite cmdlet. + + + String + + String + + + + + + + + + + None + + + + + + + + You can pipe input to this cmdlet by property name, but not by value. + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities.Site + + + + + + + + By default, Get-AzureWebsite returns an array of Site objects. + + + + + Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities.SiteWithConfig + + + + + + + + When you use the Name parameter, Get-AzureWebsite returns a SiteWithConfig object. + + + + + + + + Example 1: Get all websites in the subscription + + + + + + PS C:\>Get-AzureWebsite + + + + This command gets all Azure websites in the current subscription. + + + + + + + + + Example 2: Get a website by name + + + + + + PS C:\>Get-AzureWebsite -Name ContosoWeb + + + + This command gets detailed information about the ContosoWeb Azure website, including configuration information. When you use the Name parameter, Get-AzureWebsite returns a SiteWithConfig object with extended information about the website. + + + + + + + + + Example 3: Get detailed information about all websites + + + + + + PS C:\>Get-AzureWebsite | ForEach-Object {Get-AzureWebsite -Name $_.Name} + + + + This command gets detailed information about all websites in the subscription. It uses a Get-AzureWebsite command to get all websites and then uses the ForEach-Object cmdlet to get each website by name. + + + + + + + + + Example 4: Get information about a deployment slot + + + + + + PS C:\>Get-AzureWebsite -Name ContosoWeb -Slot Staging + + + + This command gets the Staging deployment slot of the ContosoWeb website. Deployment slots let you test different versions of your Azure website without releasing them to the public. + + + + + + + + + Example 5: Get website instances + + + + + + PS C:\>(Get-AzureWebsite -Name ContosoWeb).Instances + + InstanceId + ---------- + 2d8e712fb8f85d061c30fd793a534e6700a175f9a9ab12ca55cb3b0edfcc10ee + 5834916b8cef49249b18187708223a33fbbc4352d33b48369f3166644bdd3445 + + PS C:\>(Get-AzureWebsite -Name ContosoWeb).Instances.Count + 2 + + + + The commands in this example use the Instances property of an Azure website to get information about currently running website instances. + The first command gets the instance IDs of all currently running instances of a website. The second command gets the number of running instances of the website. (You can use the Count property on any array.) + + + + + + + + + + + Online Version: + + + + + New-AzureWebsite + + + + Remove-AzureWebsite + + + + Start-AzureWebsite + + + + Stop-AzureWebsite + + + + Show-AzureWebsite + + + + + + + Get-AzureWebsiteMetric + + Gets metrics for Azure website in the current subscription. + + + + + Get + AzureWebsiteMetricMetric + + + + The Get-AzureWebsiteMetric cmdlet gets information about metrics on Azure web hosting plans in subscription. + + + + Get-AzureWebsiteMetricMetric + + Name + + Enter the name of one web site in the subscription. The Name value does not support wildcard characters. + + String + + + MetricNames + + List of metrics to return. If empty returns all + + String[] + + + StartDate + + Start time from which to returns metrics. + + DateTime + + + EndDate + + End time from which to returns metrics. + + DateTime + + + TimeGrain + + Time grain at which to return metrics. Supported values are Minute(PT1M), Hour(PT1H) - default, Day(P1D). + + string + + + InstanceDetails + + Include details per instance level. If the web hosting plan runs on two or more machines returns details metrics for each machine. + + switch + + + SlotView + + Represent the metrics for the hostnames that receive the traffic at the current slot. If swap occured in the middle of the period mereics will be merged. + + switch + + + + + + + None + + + + + + + + You can pipe input to this cmdlet by property name, but not by value. + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities.MetricResponse + + + + + + + + By default, Get-AzureWebsiteMetric returns an array of MetricResponse objects. + + + + + + + + Example 1: Gets metrics for last 3 hours on per instance level for a site + + + + + + PS C:\>$metrics = Get-AzureWebsiteMetric -Name webSiteName -StartDate (get-date).AddHours(-3) -MetricNames "Requests" -InstanceDetails -SlotView -TimeGrain "PT1M" + $metrics[1].Data + + + Name : Requests + Unit : Count + StartTime : 8/11/2014 7:05:00 AM + EndTime : 8/11/2014 5:06:01 PM + TimeGrain : PT1M + PrimaryAggregationType : Instance + Values : {Time:8/11/2014 7:05:00 AM, Total:4, Min:, Max:, Time:8/11/2014 7:06:00 AM, Total:3, Min:, Max:, Time:8/11/2014 7:07:00 AM, Total:3, Min:, Max:, Time:8/11/2014 + 7:08:00 AM, Total:12, Min:, Max:...} + + $metrics[1].Data.Values | ft + + TimeCreated Total Minimum Maximum Count InstanceName + ----------- ----- ------- ------- ----- ------------ + 8/11/2014 7:05:00 AM 4 1 RD00155DC24599 + 8/11/2014 7:06:00 AM 3 1 RD00155DC24599 + 8/11/2014 7:07:00 AM 3 1 RD00155DC24599 + 8/11/2014 7:08:00 AM 12 1 RD00155DC24599 + 8/11/2014 7:09:00 AM 37 1 RD00155DC24599 + 8/11/2014 7:10:00 AM 9 1 RD00155DC24599 + + + This command gets metrics for last 3 hours on per instance level for a site. + + + + + + + + + + + + Get-AzureWebHostingPlan + + Gets Azure web hosting plan in the current subscription. + + + + + Get + AzureWebHostingPlan + + + + The Get-AzureWebHostingPlan cmdlet gets information about Azure web hosting plans in subscription. + By default, Get-AzureWebHostingPlan gets all Azure hosting plans in the current subscription and returns an object that provides basic information about the plans. When you use the WebSpace and Name parameters, Get-AzureWebHostingPlan returns a specific object. + + The current subscription is the subscription that is designated as "current." To find the current subscription, use the Current parameter of the + Get-AzureSubscription + + cmdlet. To change the current subscription, use the + Select-AzureSubscription + + cmdlet. + + This topic describes the cmdlet in the 0.8.2 version of the Microsoft Azure PowerShell module. To find the version of the module you're using, in the Azure PowerShell console, type (Get-Module -Name Azure).Version. + + + + Get-AzureWebHostingPlan + + WebSpaceName + + Enter the name of one webspaces in the subscription. By default, Get-AzureWebHostingPlan gets all plans in the current subscription. The WebSpaceName value does not support wildcard characters. + + String + + + Name + + Enter the name of one plan in the subscription. By default, Get-AzureWebHostingPlan gets all websites in the specified web space. The Name value does not support wildcard characters. + + String + + + + + + + + None + + + + + + + + You can pipe input to this cmdlet by property name, but not by value. + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities.WebHostingPlan + + + + + + + + By default, Get-AzureWebHostingPlan returns an array of WebHostingPlan objects. + + + + + + + + Example 1: Get all web hosting plans in the subscription + + + + + + PS C:\>Get-AzureWebHostingPlan + Name : Default1 + SKU : Basic + WorkerSize : Small + NumberOfWorkers : 1 + CurrentWorkerSize : Small + CurrentNumberOfWorkers : 1 + Status : Ready + WebSpace : eastuswebspace + + Name : Default0 + SKU : Free + WorkerSize : Small + NumberOfWorkers : 0 + CurrentWorkerSize : Small + CurrentNumberOfWorkers : 0 + Status : Ready + + + This command gets all Azure web hosting plans in the current subscription. + + + + + + + + + Example 2: Get a specific web hosting plans in the subscription + + + + + + PS C:\>Get-AzureWebHostingPlan westeuropewebspace Default0 + + Name : Default0 + SKU : Free + WorkerSize : Small + NumberOfWorkers : 0 + CurrentWorkerSize : Small + CurrentNumberOfWorkers : 0 + Status : Ready + WebSpace : westeuropewebspace + + + + This command gets single Azure web hosting plans in the current subscription. + + + + + + + + + + + + + Get-AzureWebHostingPlanMetric + + Gets metrics for web hsoting plan. + + + + + Get + AzureWebHostingPlanMetricMetric + + + + The Get-AzureWebHostingPlanMetric cmdlet gets information about metrics on Azure web hosting plans in subscription. + + + + Get-AzureWebHostingPlanMetricMetric + + WebSpaceName + + Enter the name of one webspaces in the subscription. By default, Get-AzureWebHostingPlanMetric gets all plans in the current subscription. The WebSpaceName value does not support wildcard characters. + + String + + + Name + + Enter the name of one plan in the subscription. By default, Get-AzureWebHostingPlanMetric gets all websites in the current subscription. The Name value does not support wildcard characters. + + String + + + MetricNames + + List of metrics to return. If empty returns all + + String[] + + + StartDate + + Start time from which to returns metrics. + + DateTime + + + EndDate + + End time from which to returns metrics. + + DateTime + + + TimeGrain + + Time grain at which to return metrics. Supported values are Minute(PT1M), Hour(PT1H) - default, Day(P1D). + + string + + + InstanceDetails + + Include details per instance level. If the web hosting plan runs on two or more machines returns details metrics for each machine. + + switch + + + + + + + None + + + + + + + + You can pipe input to this cmdlet by property name, but not by value. + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities.MetricResponse + + + + + + + + By default, Get-AzureWebHostingPlanMetric returns an array of MetricResponse objects. + + + + + + + + Example 1: Get metrics for last 3 hours at hourly level. + + + + + + PS C:\>$metrics = Get-AzureWebHostingPlanMetric eastuswebspace default1 -StartDate (get-date).AddHours(-3) -InstanceDetails + $metrics[1].Data + + + Name : CpuPercentage + Unit : Percent + StartTime : 8/11/2014 7:00:00 AM + EndTime : 8/11/2014 5:00:23 PM + TimeGrain : PT1H + PrimaryAggregationType : Instance + Values : {Time:8/11/2014 7:00:00 AM, Total:2, Min:9, Max:0, Time:8/11/2014 8:00:00 AM, Total:2, Min:9, Max:0, Time:8/11/2014 9:00:00 AM, Total:2, Min:9, Max:0, + Time:8/11/2014 10:00:00 AM, Total:2, Min:8, Max:0...} + + $metrics[1].Data.Values | ft + + TimeCreated Total Minimum Maximum Count InstanceName + ----------- ----- ------- ------- ----- ------------ + 8/11/2014 7:00:00 AM 2 9 0 1 RD00155DC24599 + 8/11/2014 8:00:00 AM 2 9 0 1 RD00155DC24599 + 8/11/2014 9:00:00 AM 2 9 0 1 RD00155DC24599 + 8/11/2014 10:00:00 AM 2 8 0 1 RD00155DC24599 + 8/11/2014 11:00:00 AM 2 9 0 1 RD00155DC24599 + 8/11/2014 12:00:00 PM 2 6 0 1 RD00155DC24599 + 8/11/2014 1:00:00 PM 2 15 0 1 RD00155DC24599 + 8/11/2014 2:00:00 PM 3 21 0 1 RD00155DC24599 + 8/11/2014 3:00:00 PM 2 13 0 1 RD00155DC24599 + 8/11/2014 4:00:00 PM 2 14 0 1 RD00155DC24599 + + + This command gets metrics for last 3 hours on per instance level. + + + + + + + + + + + + + + Get-AzureWebsiteDeployment + + List the deployments for an Azure website + + + + + + Get + AzureWebsiteDeployment + + + + + + List the deployments for an Azure website + + + + Get-AzureWebsiteDeployment + + CommitId + + The unique identifier for the deployment + + String + + + MaxResults + + The largest number of results to return + + Int32 + + + Details + + Show detailed information about the deployment(s) + + + + Name + + The name of the Azure website to get deployment information about + + String + + + Slot + + The slot name + + String + + + + + + CommitId + + The unique identifier for the deployment + + String + + String + + + + + + + MaxResults + + The largest number of results to return + + Int32 + + Int32 + + + + + + + Details + + Show detailed information about the deployment(s) + + + SwitchParameter + + + + + + + Name + + The name of the Azure website to get deployment information about + + String + + String + + + + + + + Slot + + The slot name + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- List Deployments -------------- + + + C:\PS> + C:\PS> + + Get-AzureWebsiteDeployment -Name mySite + + List all deployments for the Azure website named 'mySite' + + + + + + + + + + + + + + + + + + + -------------- Get Deployment Detail -------------- + + + C:\PS> + C:\PS> + + Get-AzureWebsiteDeployment -Name mySite -CommitId f87654321 -Details + + Get details information about deployment 'f87654321' for Azure website 'mySite' + + + + + + + + + + + + + + + + + + + + Restore-AzureWebsiteDeployment + + + + Save-AzureWebsiteLog + + + + + + + + Get-AzureWebsiteLocation + + Get the website locations available to the current subscription + + + + + + Get + AzureWebsiteLocation + + + + + + Get the website locations available to the current subscription + + + + Get-AzureWebsiteLocation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Get Locations -------------- + + + C:\PS> + C:\PS> + + Get-AzureWebsiteLocations + + List all available locations for the current subscription + + + + + + North Central US + South Central US + East US + West US + + + + + + + + + + + + + + + New-AzureWebsite + + + + + + + + New-AzureWebsite + + Create an Azure website + + + + + + New + AzureWebsite + + + + + + Create an Azure website and prepare for website deployment via Git + + + + New-AzureWebsite + + Location + + The data center where the website should be deployed + + String + + + Hostname + + An alternative hostname for the new azure website. + + String + + + PublishingUsername + + The username you have specified in the Microsoft Azure Portal for Git deployment + + String + + + Git + + Set up a local git repository and link it to the website. If specified, this will set up a git repository in the local directory and add a remote named 'azure' that links to the website in Microsoft Azure. + + + + GitHub + + If enabled, link this website with an existing Github repository. Commits to the Giuthub repository will be pushed to the website in Microsoft Azure. + + + + GithubCredentials + + The username and password credentials used to connect to Github + + PSCredential + + + GithubRepository + + The full name of the Github repository to link to this website. For example, myaccount/myrepo + + String + + + Name + + The name of the website + + String + + + Slot + + The slot name + + String + + + + + + Location + + The data center where the website should be deployed + + String + + String + + + + + + + Hostname + + An alternative hostname for the new azure website. + + String + + String + + + + + + + PublishingUsername + + The username you have specified in the Microsoft Azure Portal for Git deployment + + String + + String + + + + + + + Git + + Set up a local git repository and link it to the website. If specified, this will set up a git repository in the local directory and add a remote named 'azure' that links to the website in Microsoft Azure. + + + SwitchParameter + + + + + + + GitHub + + If enabled, link this website with an existing Github repository. Commits to the Giuthub repository will be pushed to the website in Microsoft Azure. + + + SwitchParameter + + + + + + + GithubCredentials + + The username and password credentials used to connect to Github + + PSCredential + + PSCredential + + + + + + + GithubRepository + + The full name of the Github repository to link to this website. For example, myaccount/myrepo + + String + + String + + + + + + + Name + + The name of the website + + String + + String + + + + + + + Slot + + The slot name + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Create New Website With Git -------------- + + + C:\PS> + C:\PS> + + New-AzureWebsite mySite -Git + + Create a new azure website and a local git repository to use for deploying files to the new website + + + + + + + + + + + + + + + + + + + -------------- Create website with Github integration -------------- + + + C:\PS> + C:\PS> + + New-AzureWebsite mysite -Github -GithubRepository myaccount/myrepo + + Create a new website linked to the Github repository myaccount/myrepo. Commits to the Github repository will be pushed to the website in Microsoft Azure + + + + + + + + + + + + + + + + + + + + + + + + Remove-AzureWebsite + + Remove the specified azure website + + + + + + Remove + AzureWebsite + + + + + + Remove the specified azure website + + + + Remove-AzureWebsite + + Force + + If specified, bypass confirmation prompts and delete the specified website + + + + Name + + The name of the website to delete + + String + + + Slot + + The website slot name + + String + + String + + + + + + + + + + Force + + If specified, bypass confirmation prompts and delete the specified website + + + SwitchParameter + + + + + + + Name + + The name of the website to delete + + String + + String + + + + + + + Slot + + The website slot name + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Remove Current Website -------------- + + + C:\PS> + C:\PS> + + Remove-AzureWebsite + + Remove the azure website associated with the current directory + + + + + + + + + + + + + + + + + + + -------------- Remove Website Silently -------------- + + + C:\PS> + C:\PS> + + Remove-AzureWebsite -Name mySite -Force + + Delete the Azure website named 'mySite' without prompting for confirmation + + + + + + + + + + + + + + + + + + + -------------- Remove Website Slot -------------- + + + C:\PS> + C:\PS> + + Remove-AzureWebsite -Name MyWebsite -Slot staging + + Remove the azure website slot with name staging for website MyWebsite + + + + + + + + + + + + + + + + + + + + New-AzureWebsite + + + + Get-AzureWebsite + + + + Start-AzureWebsite + + + + Stop-AzureWebsite + + + + + + + + Switch-AzureWebsiteSlot + + Swaps the production slot for a website with another slot. This works on websites with two slots only + + + + + + Switch + AzureWebsiteSlot + + + + + + Swaps the production slot for a website with another slot. This works on websites with two slots only + + + + Switch-AzureWebsiteSlot + + Name + + The name of the website + + String + + + Force + + Do not confirm the swap operation. + + SwitchParameter + + + + + + Name + + The name of the website + + String + + String + + + + + + + Force + + Do not confirm the swap operation. + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Switch Website Slot -------------- + + + C:\PS> + C:\PS> + + Switch-AzureWebsiteSlot -Name MyWebsite + + Switch the azure website MyWebsite backup slot with production slot + + + + + + + + + + + + + + + + + + + + New-AzureWebsite + + + + Get-AzureWebsite + + + + Start-AzureWebsite + + + + Stop-AzureWebsite + + + + + + + + Update-AzureWebsiteRepository + + Update the remote repositories of a local git repository for all the slots + + + + + + Update + AzureWebsiteRepository + + + + + + Update the remote repositories of a local git repository for all the slots + + + + Update-AzureWebsiteRepository + + Name + + The name of the website + + String + + + PublishingUsername + + The username you have specified in the Microsoft Azure Portal for Git deployment + + String + + + + + + Name + + The name of the website + + String + + String + + + + + + + PublishingUsername + + The username you have specified in the Microsoft Azure Portal for Git deployment + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Update Website Remote Repositories -------------- + + + C:\PS> + C:\PS> + + Update-AzureWebsiteRepository -Name MyWebsite + + Updates the remote repositories of a local git repository for all the slots for website MyWebsite + + + + + + + + + + + + + + + + + + + + New-AzureWebsite + + + + Get-AzureWebsite + + + + Start-AzureWebsite + + + + Stop-AzureWebsite + + + + + + + + Restart-AzureWebsite + + Stop and then restart the specified Azure website + + + + + + Restart + AzureWebsite + + + + + + Stop and then restart the specified Azure website + + + + Restart-AzureWebsite + + Name + + The name of the Azure website to restart + + String + + + Slot + + The slot name of the Azure website + + String + + + + + + Name + + The name of the Azure website to restart + + String + + String + + + + + + + Slot + + The slot name of the Azure website + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + New-AzureWebsite + + + + Get-AzureWebsite + + + + Start-AzureWebsite + + + + Remove-AzureWebsite + + + + + + + + Restore-AzureWebsiteDeployment + + Redeploy a previous deployment for an Azure website + + + + + + Restore + AzureWebsiteDeployment + + + + + + Redeploy a previous deployment for an Azure website. This replaces the current deployment with the selected deployment. + + + + Restore-AzureWebsiteDeployment + + CommitId + + The identifier of the deployment to redeploy + + String + + + Force + + Skip any confirmation prompts + + + + Name + + The name of the website to redeploy + + String + + + WhatIf + + + + + + + Confirm + + + + + + + Slot + + The slot name + + String + + + + + + CommitId + + The identifier of the deployment to redeploy + + String + + String + + + + + + + Force + + Skip any confirmation prompts + + + SwitchParameter + + + + + + + Name + + The name of the website to redeploy + + String + + String + + + + + + + Slot + + The slot name + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Redeploy -------------- + + + C:\PS> + C:\PS> + + Restore-AzureWebsiteDeployment mySite -CommitId f876543210 + + Redeploy the deployment with id "f876543210" for the website named "mySite" + + + + + + + + + + + + + + + + + + + + Get-AzureWebsiteDeployment + + + + + + + + Save-AzureWebsiteLog + + Download logs for the specified website + + + + + + Save + AzureWebsiteLog + + + + + + Download logs for the specified website + + + + Save-AzureWebsiteLog + + Output + + The path to the log download file + + String + + + Name + + The name of the Azure website + + String + + + Slot + + The slot name + + String + + + + + + Output + + The path to the log download file + + String + + String + + + + + + + Name + + The name of the Azure website + + String + + String + + + + + + + Slot + + The slot name + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Get Logs -------------- + + + C:\PS> + C:\PS> + + Save-AzureWebsiteLogs -Name mySite -Output .\logs.zip + + Download runtime and deployment logs for webaite 'mySite' to the file 'logs.zip' in the current directory + + + + + + + + + + + + + + + + + + + + Get-AzureWebsiteDeployment + + + + Restore-AzureWebsiteDeployment + + + + + + + + Set-AzureWebsite + + Configure a Microsoft Azure website + + + + + + Set + AzureWebsite + + + + + + Configure a Microsoft Azure website + + + + Set-AzureWebsite + + NumberOfWorkers + + The number of worker processes executing the website + + Int32 + + + DefaultDocuments + + The documents that are automatically displayed when browsing the website + + String[] + + + NetFrameworkVersion + + The version of the .Net Framework required by the website + + String + + + PhpVersion + + The PHP version required by the website + + String + + + RequestTracingEnabled + + Determines whether request tracing is enabled for the website + + Boolean + + + HttpLoggingEnabled + + Determines whether http logging is enabled for the website + + Boolean + + + DetailedErrorLoggingEnabled + + Determines whether detailed iis errors are logged for the website + + Boolean + + + HostNames + + The fully qualified hostnames that can be used to access the website + + String[] + + + AppSettings + + The environment variables that will be used by the website + + Hashtable + + + Metadata + + The Metadata for the website + + NameValuePair + + + ConnectionStrings + + The connection strings used by the website + + ConnStringPropertyBag + + + HandlerMappings + + The Handler Mappings used by the website + + HandlerMapping[] + + + SiteWithConfig + + The configuration used by the website + + SiteWithConfig + + + Name + + The name of the website + + String + + + PassThru + + When specified, a boolean value is returned + + Switch + + + ManagedPipelineMode + + The managed pipeline mode + + String + + + WebSocketsEnabled + + Flag to enable/disable websockets + + String + + + Slot + + The slot name + + String + + + RoutingRules + + Routing rules used for testing in production + + Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities.RampUpRule + + + Use32BitWorkerProcess + + Indicates if 32-bit mode is enabled. + + Boolean + + + + + + NumberOfWorkers + + The number of worker processes executing the website + + Int32 + + Int32 + + + + + + + DefaultDocuments + + The documents that are automatically displayed when browsing the website + + String[] + + String[] + + + + + + + NetFrameworkVersion + + The version of the .Net Framework required by the website + + String + + String + + + + + + + PhpVersion + + The PHP version required by the website + + String + + String + + + + + + + RequestTracingEnabled + + Determines whether request tracing is enabled for the website + + Boolean + + Boolean + + + + + + + HttpLoggingEnabled + + Determines whether http logging is enabled for the website + + Boolean + + Boolean + + + + + + + DetailedErrorLoggingEnabled + + Determines whether detailed iis errors are logged for the website + + Boolean + + Boolean + + + + + + + HostNames + + The fully qualified hostnames that can be used to access the website + + String[] + + String[] + + + + + + + AppSettings + + The environment variables that will be used by the website + + Hashtable + + Hashtable + + + + + + + Metadata + + The Metadata for the website + + NameValuePair + + NameValuePair + + + + + + + ConnectionStrings + + The connection strings used by the website + + ConnStringPropertyBag + + ConnStringPropertyBag + + + + + + + HandlerMappings + + The Handler Mappings used by the website + + HandlerMapping[] + + HandlerMapping[] + + + + + + + SiteWithConfig + + The configuration used by the website + + SiteWithConfig + + SiteWithConfig + + + + + + + PassThru + + When specified, a boolean value is returned + + Switch + + + Name + + The name of the website + + String + + String + + + + + + + ManagedPipelineMode + + The managed pipeline mode + + String + + + WebSocketsEnabled + + Flag to enable/disable websockets + + String + + + Slot + + The slot name + + String + + + RoutingRules + + Routing rules used for testing in production + + Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities.RampUpRule + + + Use32BitWorkerProcess + + Indicates if 32-bit mode is enabled. + + Boolean + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Enable HTTP Logging -------------- + + + C:\PS> + C:\PS> + + Set-AzureWebsite -HttpLoggingEnabled 1 + + Enable http logging + + + + + + + + + + + + + + + + + + + -------------- Set storage credentials -------------- + + + C:\PS> + C:\PS> + + + $settings = New-Object Hashtable + $settings["AZURE_STORAGE_ACCOUNT"] = myaccountname + $settings["AZURE_STORAGE_ACCESS_KEY"] = myaccesskey + Set-AzureWebsite -AppSettings $settings myWebsite + + + Sets up environment variables for AZURE_STORAGE_ACCOUNT and AZURE_STORAGE_ACCESS_KEY in the website myWebsite + + + + + + + + + + + + + + + + + + + -------------- Enable Drive Logging -------------- + + + C:\PS> + C:\PS> + + + Set-AzureWebsite -AzureDriveTraceEnabled $true + + + Enable drive logging for the specified website + + + + + + + + + + + -------------- Set routing rules for testing in production -------------- + + + C:\PS> + + + $rule = New-Object Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities.RampUpRule + $rule.ActionHostName = "mysite-staging.azurewebsites.net" + $rule.ReroutePercentage = 10; + $rule.Name = "rule1" + + Set-AzureWebsite mysite -RoutingRules $rule + + + Sets up a routing for 10 percent of the traffic to staging slot. + + + + + + + + + + + + + + + + + + + + New-AzureWebsite + + + + Get-AzureWebsite + + + + + + + + Show-AzurePortal + + Show the Azure management portal + + + + + + Show + AzurePortal + + + + + + Show the Azure management portal + + + + Show-AzurePortal + + Name + + The name of the website to show in the portal + + String + + + Realm + + The organization ID to use for federated authentication when displaying the Microsoft Azure Portal + + String + + + Environment + + The Microsoft Azure environment name to use + + String + + + + + + Name + + The name of the website to show in the portal + + String + + String + + + + + + + Realm + + The organization ID to use for federated authentication when displaying the Microsoft Azure Portal + + String + + String + + + + + + + Environment + + The Microsoft Azure environment name to use + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + websites, website + + + + + + -------------- Show Site -------------- + + + C:\PS> + C:\PS> + + Show-AzurePortal -Name mySite + + Open a browser on the Microsoft Azure portal, showing information about website 'mySite' + + + + + + + + + + + + + + + + + + + + Show-AzureWebsite + + + + + + + + Show-AzureWebsite + + Open a browser on the website + + + + + + Show + AzureWebsite + + + + + + Open a browser on the website + + + + Show-AzureWebsite + + Name + + The name of the site to open in the browser + + String + + + Slot + + The slot name + + String + + + + + + Name + + The name of the site to open in the browser + + String + + String + + + + + + + Slot + + The slot name + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Show-AzurePortal + + + + + + + + Start-AzureWebsite + + Start the specified Azure website + + + + + + Start + AzureWebsite + + + + + + Start the specified Azure website + + + + Start-AzureWebsite + + Name + + The name of the website to start + + String + + + Slot + + The slot name + + String + + + + + + Name + + The name of the website to start + + String + + String + + + + + + + Slot + + The slot name + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + New-AzureWebsite + + + + Get-AzureWebsite + + + + Stop-AzureWebsite + + + + Restart-AzureWebsite + + + + Remove-AzureWebsite + + + + + + + + Stop-AzureWebsite + + Stop the specified Azure website + + + + + + Stop + AzureWebsite + + + + + + Stop the specified Azure website + + + + Stop-AzureWebsite + + Name + + The name of the Azure website to stop + + String + + + Slot + + The slot name + + String + + + + + + Name + + The name of the Azure website to stop + + String + + String + + + + + + + Slot + + The slot name + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + New-AzureWebsite + + + + Get-AzureWebsite + + + + Start-AzureWebsite + + + + Remove-AzureWebsite + + + + Restart-AzureWebsite + + + + + + + + Restart-AzureWebsite + + Stop and then restart the specified Azure website + + + + + + Restart + AzureWebsite + + + + + + Stop and then restart the specified Azure website + + + + Restart-AzureWebsite + + Name + + The name of the Azure website to restart + + String + + + + Slot + + The slot name + + String + + + + + Name + + The name of the Azure website to restart + + String + + String + + + + + + + Slot + + The slot name + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + New-AzureWebsite + + + + Get-AzureWebsite + + + + Start-AzureWebsite + + + + Remove-AzureWebsite + + + + + + + + Get-AzureWebsiteLog + + Gets log for the specified website + + + + + + Get + AzureWebsiteLog + + + + + + Gets log for the specified website + + + + Get-AzureWebsiteLog + + Name + + The name of the Azure website + + String + + + Path + + The path from which the log will be retrieved. By default it is Root which means include all the paths. + + String + + + Message + + A string which will be used to filter the log message. Only logs which contains this string will be retrieved. + + String + + + Tail + + Log streaming switch parameter + + SwitchParameter + + + ListPath + + List log paths switch parameter + + SwitchParameter + + + Slot + + The slot name + + String + + + + + + Name + + The name of the Azure website + + String + + + Path + + The path from which the log will be retrieved. By default it is Root which means include all the paths. + + String + + + Message + + A string which will be used to filter the log message. Only logs which contains this string will be retrieved. + + String + + + Tail + + Log streaming switch parameter + + SwitchParameter + + + ListPath + + List log paths switch parameter + + SwitchParameter + + + Slot + + The slot name + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Start log streaming -------------- + + + C:\PS> + C:\PS> + + Get-AzureWebsiteLog -Tail + + Starts log streaming for all application logs + + + + + + + + + + + + + + + + + + + -------------- Start log streaming for http-------------- + + + C:\PS> + C:\PS> + + Get-AzureWebsiteLog -Tail -Path http + + Starts log streaming for http logs + + + + + + + + + + + + + + + + + + + -------------- Start log streaming for Errors -------------- + + + C:\PS> + C:\PS> + + Get-AzureWebsiteLog -Tail -Message Error + + Starts log streaming and show error logs only + + + + + + + + + + + + + + + + + + + -------------- List available log paths -------------- + + + C:\PS> + C:\PS> + + Get-AzureWebsiteLog -Name MyWebsite -ListPath + + Lists all available log paths in the website + + + + + + + + + + + + + + + + + + + + New-AzureWebsite + + + + Get-AzureWebsite + + + + Start-AzureWebsite + + + + Remove-AzureWebsite + + + + + + + + Enable-AzureWebsiteApplicationDiagnostic + + Enables the website's application diagnostics + + + + + + Enable + AzureWebsiteApplicationDiagnostic + + + + + + Enables the website's application diagnostics on file system or on Microsoft Azure Storage + + + + Enable-AzureWebsiteApplicationDiagnostic + + Name + + The name of the Azure website + + String + + + File + + Indicates using file system to store the log files + + SwitchParameter + + + Storage + + Indicates using Microsoft Azure Storage to store the log files + + String + + + StorageAccountName + + The storage account to use for storing the logs. If not specified, the CurrentStorageAccountName will be used + + String + + + LogLevel + + The log level to store + + String + + + PassThru + + Flag to return true if succeeded + + SwitchParameter + + + Slot + + The slot name + + String + + + + + + Name + + The name of the Azure website + + String + + + File + + Indicates using file system to store the log files + + SwitchParameter + + + Storage + + Indicates using Microsoft Azure Storage to store the log files + + String + + + StorageAccountName + + The storage account to use for storing the logs. If not specified, the CurrentStorageAccountName will be used + + String + + + LogLevel + + The log level to store + + String + + + PassThru + + Flag to return true if succeeded + + SwitchParameter + + + Slot + + The slot name + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Enable diagnostics using file system -------------- + + + C:\PS> + C:\PS> + + Enable-AzureWebsiteApplicationDiagnostic -Name MyWebsite -File -LogLevel Verbose + + Enables application logging on file system with verbose level + + + + + + + + + + + + + + + + + + + -------------- Enable logging using Microsoft Azure Storage -------------- + + + C:\PS> + C:\PS> + + Enable-AzureWebsiteApplicationDiagnostic -Name MyWebsite -Storage -LogLevel Information -StorageAccountName myaccount + + Enables application logging using storage account myaccount with logging level set to information + + + + + + + + + + + + + + + + + + + + New-AzureWebsite + + + + Get-AzureWebsite + + + + Start-AzureWebsite + + + + Remove-AzureWebsite + + + + Disable-AzureWebsiteApplicationDiagnostic + + + + + + + + Disable-AzureWebsiteApplicationDiagnostic + + Disables the website's application diagnostics + + + + + + Disable + AzureWebsiteApplicationDiagnostic + + + + + + Disables the website's application diagnostics on file system or on Microsoft Azure Storage + + + + Disable-AzureWebsiteApplicationDiagnostic + + Name + + The name of the Azure website + + String + + + File + + Indicates using file system to store the log files + + SwitchParameter + + + Storage + + Indicates using Microsoft Azure Storage to store the log files + + SwitchParameter + + + PassThru + + Flag to return true if succeeded + + SwitchParameter + + + Slot + + The slot name + + String + + + + + + Name + + The name of the Azure website + + String + + + File + + Indicates using file system to store the log files + + SwitchParameter + + + Storage + + Indicates using Microsoft Azure Storage to store the log files + + String + + + PassThru + + Flag to return true if succeeded + + SwitchParameter + + + Slot + + The slot name + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Disable diagnostics using file system -------------- + + + C:\PS> + C:\PS> + + Disable-AzureWebsiteApplicationDiagnostic -Name MyWebsite -File + + Disables application logging on file system + + + + + + + + + + + + + + + + + + + -------------- Disable logging using Microsoft Azure Storage -------------- + + + C:\PS> + C:\PS> + + Disable-AzureWebsiteApplicationDiagnostic -Name MyWebsite -Storage + + Disables application logging using storage + + + + + + + + + + + + + + + + + + + + New-AzureWebsite + + + + Get-AzureWebsite + + + + Start-AzureWebsite + + + + Remove-AzureWebsite + + + + Enable-AzureWebsiteApplicationDiagnostic + + + + + + + + Enable-AzureWebsiteDebug + + Enables the website's debug + + + + + + Enable + AzureWebsiteDebug + + + + + + Enables the website's debug feature in Visual Studio + + + + Enable-AzureWebsiteDebug + + Name + + The name of the Azure website + + String + + + Slot + + The slot name of the Azure website + + String + + + Version + + The Visual Studio version + + String + + + PassThru + + Flag to return true if succeeded + + SwitchParameter + + + + + + Name + + The name of the Azure website + + String + + + Slot + + The slot name of the Azure website + + String + + + Version + + The Visual Studio version + + String + + + PassThru + + Flag to return true if succeeded + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Enable debugging of Visual Studio 2013 -------------- + + + C:\PS> + C:\PS> + + Enable-AzureWebsiteDebug -Name MyWebsite -Version VS2013 + + Enables debugging on VS 2013 + + + + + + + + + + + + + + + + + + + + New-AzureWebsite + + + + Get-AzureWebsite + + + + Start-AzureWebsite + + + + Remove-AzureWebsite + + + + Disable-AzureWebsiteDebug + + + + + + + + Disable-AzureWebsiteDebug + + Disables the website's debugging + + + + + + Disable + AzureWebsiteDebug + + + + + + Disables the website's debugging in Visual Studio + + + + Disable-AzureWebsiteDebug + + Name + + The name of the Azure website + + String + + + Slot + + The slot name of the Azure website + + String + + + PassThru + + Flag to return true if succeeded + + SwitchParameter + + + + + + Name + + The name of the Azure website + + String + + + Slot + + The slot name of the Azure website + + String + + + PassThru + + Flag to return true if succeeded + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Disable website debugging -------------- + + + C:\PS> + C:\PS> + + Disable-AzureWebsiteDebug -Name MyWebsite + + Disables website debugging on website MyWebsite + + + + + + + + + + + + + + + + + + + + New-AzureWebsite + + + + Get-AzureWebsite + + + + Start-AzureWebsite + + + + Remove-AzureWebsite + + + + Enable-AzureWebsiteDebug + + + + + + + + Get-AzureWebsiteJob + + Gets the web jobs associated with a website + + + + + + Get + AzureWebsiteJob + + + + + + Gets the web jobs associated with a website + + + + Get-AzureWebsiteJob + + Name + + The name of the Azure website + + String + + + Slot + + The slot name of the Azure website + + String + + + JobName + + The web job name + + String + + + JobType + + The web job type. Can be 'triggered' or 'continuous' + + String + + + + + + Name + + The name of the Azure website + + String + + + Slot + + The slot name of the Azure website + + String + + + JobName + + The web job name + + String + + + JobType + + The web job type. Can be 'triggered' or 'continuous' + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Get specific web job info -------------- + + + C:\PS> + C:\PS> + + Get-AzureWebsiteJob -Name MyWebsite -JobName MyWebJob + + Gets a web job called MyWebJob from MyWebsite production slot + + + + + + + + + + + + + + + + + + + -------------- Get all web jobs for a website -------------- + + + C:\PS> + C:\PS> + + Get-AzureWebsiteJob -Name MyWebsite + + Gets all web jobs associated with MyWebsite production slot + + + + + + + + + + + + + + + + + + + -------------- Get all triggered web jobs -------------- + + + C:\PS> + C:\PS> + + Get-AzureWebsiteJob -Name MyWebsite -Slot staging -Type Triggered + + Gets all triggered web jobs from staging slot of MyWebsite + + + + + + + + + + + + + + + + + + + + New-AzureWebsiteJob + + + + Get-AzureWebsite + + + + Start-AzureWebsiteJob + + + + Remove-AzureWebsiteJob + + + + Stop-AzureWebsiteJob + + + + + + + New-AzureWebsiteJob + + Creates new web job for a website + + + + + New + AzureWebsiteJob + + + + Creates new web job for a website + + + + New-AzureWebsiteJob + + Name + + The name of the Azure website + + String + + + Slot + + The slot name of the Azure website + + String + + + JobName + + The web job name + + String + + + JobType + + The web job type. Can be 'triggered' or 'continuous' + + String + + + JobFile + + The web job file + + String + + + + + + Name + + The name of the Azure website + + String + + + Slot + + The slot name of the Azure website + + String + + + JobName + + The web job name + + String + + + JobType + + The web job type. Can be 'triggered' or 'continuous' + + String + + + JobFile + + The web job file + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Create new web job for a website -------------- + + + C:\PS> + C:\PS> + + New-AzureWebsiteJob -Name MyWebsite -JobName MyWebJob -JobType Continuous -JobFile job.bat + + Creates a continuous job to call job.bat on website MyWebsite + + + + + + + + + + + + + + + + + + + + Get-AzureWebsiteJob + + + + New-AzureWebsite + + + + Start-AzureWebsiteJob + + + + Remove-AzureWebsiteJob + + + + Stop-AzureWebsiteJob + + + + + + + Remove-AzureWebsiteJob + + Removes an existing web job for a website + + + + + Remove + AzureWebsiteJob + + + + Removes an existing web job for a website + + + + Remove-AzureWebsiteJob + + Name + + The name of the Azure website + + String + + + Slot + + The slot name of the Azure website + + String + + + JobName + + The web job name + + String + + + JobType + + The web job type. Can be 'triggered' or 'continuous' + + String + + + + + + Name + + The name of the Azure website + + String + + + Slot + + The slot name of the Azure website + + String + + + JobName + + The web job name + + String + + + JobType + + The web job type. Can be 'triggered' or 'continuous' + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Remove an existing web job for a website -------------- + + + C:\PS> + C:\PS> + + Remove-AzureWebsiteJob -Name MyWebsite -JobName MyWebJob -JobType Continuous + + Removes a web job called MyWebJob for MyWebSite + + + + + + + + + + + + + + + + + + + + Get-AzureWebsiteJob + + + + Remove-AzureWebsite + + + + Start-AzureWebsiteJob + + + + New-AzureWebsiteJob + + + + Stop-AzureWebsiteJob + + + + + + + Stop-AzureWebsiteJob + + Stops a web job for a website + + + + + Stop + AzureWebsiteJob + + + + Stops a web job for a website + + + + Stop-AzureWebsiteJob + + Name + + The name of the Azure website + + String + + + Slot + + The slot name of the Azure website + + String + + + JobName + + The web job name + + String + + + PassThru + + Returns a boolean value indicating that the job stopped successfully. By default, this cmdlet does not return any output. + + SwitchParameter + + + + + + Name + + The name of the Azure website + + String + + + Slot + + The slot name of the Azure website + + String + + + JobName + + The web job name + + String + + + PassThru + + Returns a boolean value indicating that the job stopped successfully. By default, this cmdlet does not return any output. + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Stop a web job for a website -------------- + + + C:\PS> + C:\PS> + + Stop-AzureWebsiteJob -Name MyWebsite -JobName MyWebJob -JobType Continuous + + Stops a web job called MyWebJob for MyWebSite + + + + + + + + + + + + + + + + + + + + Get-AzureWebsiteJob + + + + Stop-AzureWebsite + + + + Start-AzureWebsiteJob + + + + New-AzureWebsiteJob + + + + Remove-AzureWebsiteJob + + + + + + + Start-AzureWebsiteJob + + Starts a web job for a website + + + + + Start + AzureWebsiteJob + + + + Starts a web job for a website + + + + Start-AzureWebsiteJob + + Name + + The name of the Azure website + + String + + + Slot + + The slot name of the Azure website + + String + + + JobName + + The web job name + + String + + + JobType + + The web job type. Can be 'triggered' or 'continuous' + + String + + + PassThru + + Returns a boolean value indicating that the job started successfully. By default, this cmdlet does not return any output. + + SwitchParameter + + + + + + Name + + The name of the Azure website + + String + + + Slot + + The slot name of the Azure website + + String + + + JobName + + The web job name + + String + + + JobType + + The web job type. Can be 'triggered' or 'continuous' + + String + + + PassThru + + Returns a boolean value indicating that the job started successfully. By default, this cmdlet does not return any output. + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Start a web job for a website -------------- + + + C:\PS> + C:\PS> + + Start-AzureWebsiteJob -Name MyWebsite -JobName MyWebJob -JobType Continuous + + Starts a web job called MyWebJob for MyWebSite + + + + + + + + + + + + + + + + + + + + Get-AzureWebsiteJob + + + + Start-AzureWebsite + + + + Start-AzureWebsiteJob + + + + New-AzureWebsiteJob + + + + Remove-AzureWebsiteJob + + + + + + + Get-AzureWebsiteJobHistory + + Gets a web job history + + + + + Get + AzureWebsiteJobHistory + + + + Gets a web job history + + + + Get-AzureWebsiteJobHistory + + Name + + The name of the Azure website + + String + + + Slot + + The slot name of the Azure website + + String + + + JobName + + The web job name + + String + + + RunId + + The id of the run history you want to see + + String + + + Latest + + If specified, return the latest run history. + + SwitchParameter + + + + + + Name + + The name of the Azure website + + String + + + Slot + + The slot name of the Azure website + + String + + + JobName + + The web job name + + String + + + RunId + + The id of the run history you want to see + + String + + + Latest + + If specified, return the latest run history. + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Get complete history for a web job -------------- + + + C:\PS> + C:\PS> + + Get-AzureWebsiteJobHistory -Name MyWebsite -JobName MyWebJob + + Gets complete history for MyWebJob + + + + + + + + + + + + + + + + + + + -------------- Get latest run for a web job -------------- + + + C:\PS> + C:\PS> + + Get-AzureWebsiteJobHistory -Name MyWebsite -JobName MyWebJob -Latest + + Gets latest run info for MyWebJob + + + + + + + + + + + + + + + + + + + -------------- Get specific run for a web job -------------- + + + C:\PS> + C:\PS> + + Get-AzureWebsiteJobHistory -Name MyWebsite -JobName MyWebJob -RunId 10 + + Gets all info about run with id 10 for MyWebJob + + + + + + + + + + + + + + + + + + + + Get-AzureWebsite + + + + New-AzureWebsite + + + + Get-AzureWebsiteJob + + + + New-AzureWebsiteJob + + + + Remove-AzureWebsiteJob + + + + + + + Get-AzureMediaServicesAccount + + Gets an Azure Media Services account. + + + + + Get + AzureMediaServicesAccount + + + + Gets an Azure Media Services account. + + + + Get-AzureMediaServicesAccount + + Name + + The media service account name. + + String + + + + + + Name + + The media service account name. + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Example 1 -------------- + + + + PS C:\> Get-AzureMediaServicesAccount + + This example lists all available Media Services accounts. + + + + + + + + + -------------- Example 2 -------------- + + + + PS C:\> Get-AzureMediaServicesAccount -Name myaccount + + This example displays properties of a Media Services account. + + + + + + + + + + + + + + + + + + New-AzureMediaServicesAccount + + Creates new Azure Media Services account. + + + + + New + AzureMediaServicesAccount + + + + Creates new Azure Media Services account. + + + + New-AzureMediaServicesAccount + + Name + + The media service account name. + + String + + + Location + + The media service location. + + String + + + StorageAccountName + + Storage account name + + String + + + + + + Name + + The media service account name. + + String + + + Location + + The media service location. + + String + + + StorageAccountName + + Storage account name + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Example 1 -------------- + + + + PS C:\> New-AzureMediaServicesAccount -Name myaccount -Location "West US" -StorageAccountName mystorageaccount + + + + + + + + + + + + + + + + + + + + New-AzureMediaServicesKey + + Resets an Azure Media Services key. + + + + + New + AzureMediaServicesKey + + + + Resets an Azure Media Services key. + + + + New-AzureMediaServicesKey + + Name + + The media services account name. + + String + + + KeyType + + The media services key type <Primary|Secondary>. + + KeyType + + + Force + + Do not confirm regeneration of the key. + + SwitchParameter + + + + + + Name + + The media services account name. + + String + + + KeyType + + The media services key type <Primary|Secondary>. + + KeyType + + + Force + + Do not confirm regeneration of the key. + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Example 1 -------------- + + + + PS C:\> New-AzureMediaServicesKey -Name myaccount -KeyType Primary + + + + + + + + + + + + + + + + + + + + Remove-AzureMediaServicesAccount + + Removes an Azure Media Services account. + + + + + Remove + AzureMediaServicesAccount + + + + Removes an Azure Media Services account. + + + + Remove-AzureMediaServicesAccount + + Name + + The media services account name. + + String + + + Force + + Do not confirm deletion of account. + + SwitchParameter + + + + + + Name + + The media services account name. + + String + + + Force + + Do not confirm deletion of account. + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Example 1 -------------- + + + + PS C:\> Remove-AzureMediaServicesAccount -Name myaccount + + + + + + + + + + + + + + + + + + + + + Publish-AzureWebsiteProject + + + Publish a Visual Studio web project to a Microsoft Azure web site using WebDeploy. + + + + + + Publish + AzureWebsiteProject + + + + + Publish a Visual Studio web project to a Microsoft Azure web site using WebDeploy. It can either take a WebDeploy package and publish directly, or take a Visual Studio web project, build the project and publish. It can also replace the connection strings in the Web.config during publish. + + + + + Publish-AzureWebsiteProject + + Name + + The web site name. + + string + + + Package + + The WebDeploy package folder for zip file of the Visual Studio web application project to be published. + + string + + + ConnectionString + + The connection strings to use for the deployment. + + Hashtable + + + Slot + + The web site slot name. + + string + + + + Publish-AzureWebsiteProject + + Name + + The web site name. + + string + + + ProjectFile + + The Visual Studio web application project to be published. + + string + + + Configuration + + The configuration used to build the Visual Studio web application project. + + string + + + ConnectionString + + The connection strings to use for the deployment. + + Hashtable + + + Slot + + The web site slot name. + + string + + + + + + + Name + + The web site name. + + string + + string + + + + + + + Slot + + The web site slot name. + + string + + string + + + + + + + ProjectFile + + The Visual Studio web application project to be published. + + string + + string + + + + + + + Configuration + + The configuration used to build the Visual Studio web application project. + + string + + string + + + Release + + + Package + + The WebDeploy package folder for zip file of the Visual Studio web application project to be published. + + string + + string + + + + + + + ConnectionString + + The connection strings to use for the deployment. + + Hashtable + + Hashtable + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + C:\PS> + + + Publish-AzureWebsiteProject -Name site1 -ProjectFile .\WebApplication1.csproj -Configuration Debug + + + Description + ----------- + Build a Visual Studio web project with "Debug" configuration (meaning use Web.Debug.config) and publish to a Microsoft Azure Web Site using WebDeploy. + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + C:\PS> + + + Publish-AzureWebsiteProject -Name site1 -Package .\WebApplication1.zip + + + Description + ----------- + Publish a WebDeploy Pacakge .zip file to a Microsoft Azure Web Site using WebDeploy. + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 3 -------------------------- + + + C:\PS> + + + Publish-AzureWebsiteProject -Name site1 -Package .\WebApplication1 + + + Description + ----------- + Publish a WebDeploy Pacakge folder to a Microsoft Azure Web Site using WebDeploy. + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 4 -------------------------- + + + C:\PS> + + + Publish-AzureWebsiteProject -Name site1 -ProjectFile .\WebApplication1.csproj -ConnectionString @{ DefaultConnection = "my connection string" } + + + Description + ----------- + Build a Visual Studio web project, overwrite the "DefaultConnection" connection string in Web.config and publish to a Microsoft Azure Web Site using WebDeploy. + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 5 -------------------------- + + + C:\PS> + + + Publish-AzureWebsiteProject -Name site1 -ProjectFile .\WebApplication1.csproj -DefaultConnection "my connection string" + + + Description + ----------- + Build a Visual Studio web project, overwrite the "DefaultConnection" connection string in Web.config and publish to a Microsoft Azure Web Site using WebDeploy. Notice that -DefaultConnection is a dynamic parameter which gets added by parsing Web.config. + + + + + + + + + + + + + + + + + + + + + New-AzureWebsite + + + + Get-AzureWebsite + + + + Set-AzureWebsite + + + + Remove-AzureWebsite + + + + + + + Get-AzureSchedulerLocation + + Get available scheduler locations + + + + + + Get + AzureSchedulerLocation + + + + + + Get available scheduler locations + + + + Get-AzureSchedulerLocation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Get Azure Scheduler Location -------------- + + + C:\PS> + C:\PS> + + Get-AzureSchedulerLocation + + Get available scheduler locations + + + + + + + + + + + + + + + + + + + + + Get-AzureSchedulerJobCollection + + Get a list of scheduler job collections or a particular scheduler job collection + + + + + + Get + AzureSchedulerJobCollection + + + + + + Get a list of scheduler job collections or a particular scheduler job collection + + + + Get-AzureSchedulerJobCollection + + Location + + The location name. + + string + + + Job Collection Name + + The name of scheduler job collection. + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Example 1 -------------- + + + C:\PS> + C:\PS> + + Get-AzureSchedulerJobCollection + + Get all scheduler job collections across all locations in the current subscription + + + + + + + + + + + + + + + + + + + -------------- Example 2 -------------- + + + C:\PS> + C:\PS> + + Get-AzureSchedulerJobCollection -Location "North Central US" + + Get all scheduler job collections under location North Central US + + + + + + + + + + + + + + + + + + + -------------- Example 3 -------------- + + + C:\PS> + C:\PS> + + Get-AzureSchedulerJobCollection -Location "North Central US" -JobCollectionName jobCollection1 + + Get details of jobCollection1 + + + + + + + + + + + + + + + + + + + + + Get-AzureSchedulerJob + + Get a list of scheduler jobs or a particular scheduler job under a job collection and location + + + + + + Get + AzureSchedulerJob + + + + + + Get a list of scheduler jobs or a particular scheduler job under a job collection and location + + + + Get-AzureSchedulerJob + + Location + + The location name. + + string + + + Job Collection Name + + The name of scheduler job collection. + + string + + + Job Name + + The name of scheduler job. + + string + + + Job State + + The scheduler job state. + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Example 1 -------------- + + + C:\PS> + C:\PS> + + Get-AzureSchedulerJob -Location "North Central US" -JobCollectionName jobCollection1 + + Get scheduler jobs under jobCollection1 + + + + + + + + + + + + + + + + + + + -------------- Example 2 -------------- + + + C:\PS> + C:\PS> + + Get-AzureSchedulerJob -Location "North Central US" -JobCollectionName jobCollection1 -JobName job1 + + Get details of job1 under jobCollection1 + + + + + + + + + + + + + + + + + + + -------------- Example 3 -------------- + + + C:\PS> + C:\PS> + + Get-AzureSchedulerJobCollection -Location "North Central US" -JobCollectionName jobCollection1 -JobState Disabled + + Get all disabled scheduler jobs under jobCollection1 + + + + + + + + + + + + + + + + + + + + + Get-AzureSchedulerJobHistory + + Get history for a scheduler job + + + + + + Get + AzureSchedulerJobHistory + + + + + + Get history for a scheduler job + + + + Get-AzureSchedulerJobHistory + + Location + + The location name. + + string + + + Job Collection Name + + The name of scheduler job collection. + + string + + + Job Name + + The name of scheduler job. + + string + + + Job Status + + The scheduler job status. + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Example 1 -------------- + + + C:\PS> + C:\PS> + + Get-AzureSchedulerJobHistory -Location "North Central US" -JobCollectionName jobCollection1 -JobName job1 + + Get history of job1 + + + + + + + + + + + + + + + + + + + -------------- Example 2 -------------- + + + C:\PS> + C:\PS> + + Get-AzureSchedulerJobHistory -Location "North Central US" -JobCollectionName jobCollection1 -JobName job1 -JobStatus Failed + + Get history of job1 with Failed status + + + + + + + + + + + + + + + + + + + + + Remove-AzureSchedulerJobCollection + + Deletes a scheduler job collection and the job(s) under it + + + + + + Remove + AzureSchedulerJobCollection + + + + + + Deletes a scheduler job collection and the job(s) under it + + + + Remove-AzureSchedulerJobCollection + + Location + + The location name. + + string + + + Job Collection Name + + The name of scheduler job collection to be deleted. + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Example 1 -------------- + + + C:\PS> + C:\PS> + + Remove-AzureSchedulerJobCollection -Location "North Central US" -JobCollectionName jobCollection1 + + Deletes jobCollection1 and the job(s) under it + + + + + + + + + + + + + + + + + + + -------------- Example 2 -------------- + + + C:\PS> + C:\PS> + + Remove-AzureSchedulerJobCollection -JobCollectionName jobCollection1 + + Deletes jobCollection1 and the job(s) under it + + + + + + + + + + + + + + + + + + + + + Remove-AzureSchedulerJob + + Deletes a scheduler job + + + + + + Remove + AzureSchedulerJob + + + + + + Deletes a scheduler job + + + + Remove-AzureSchedulerJob + + Location + + The location name. + + string + + + Job Collection Name + + The name of scheduler job collection containing the scheduler job to be deleted. + + string + + + Job Name + + The name of scheduler job to be deleted. + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Example 1 -------------- + + + C:\PS> + C:\PS> + + Remove-AzureSchedulerJob -Location "North Central US" -JobCollectionName jobCollection1 -JobName job1 + + Deletes job1 + + + + + + + + + + + + + + + + + + + + + New-AzureSchedulerStorageQueueJob + + Create a scheduler job with a storage action + + + + + + New + AzureSchedulerStorageQueueJob + + + + + + Create a scheduler job with a storage action + + + + New-AzureSchedulerStorageQueueJob + + Location + + The location name. + + string + + + Job Collection Name + + The name of scheduler job collection. + + string + + + Job Name + + The name of scheduler job. + + string + + + StorageQueueAccount + + The Storage account name. + + string + + + StorageQueueName + + The Storage Queue name. + + string + + + SASToken + + The SAS token for storage queue. + + string + + + StorageQueueMessage + + The queue message for storage job. + + string + + + StartTime + + The Start time. + + DateTime + + + Interval + + Interval of the recurrence at the given frequency. + + integer + + + Frequency + + The frequency of recurrence. + + string + + + ExecutionCount + + Count of occurrences that will execute. Optional. Default will recur infinitely. + + integer + + + EndTime + + The End time. + + DateTime + + + JobState + + The scheduler job state. + + string + + + Headers + + The header collection. + + HashTable + + + ErrorActionMethod + + The Method for Http and Https Action types (GET, PUT, POST, HEAD or DELETE). + + string + + + ErrorActionURI + + The Uri for error job action. + + Uri + + + ErrorActionRequestBody + + The Body for PUT and POST job actions. + + string + + + ErrorActionHeaders + + The header collection. + + HashTable + + + ErrorActionStorageAccount + + The Storage account name. + + string + + + ErrorActionStorageQueue + + The Storage queue name. + + string + + + ErrorActionSASToken + + The Sas token for storage queue. + + string + + + ErrorActionQueueMessageBody + + The body for storage job acitons. + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Example 1 -------------- + + + C:\PS> + C:\PS> + + New-AzureSchedulerStorageQueueJob -Location "North Central US" -JobCollectionName jobCollection1 -JobName job1 -StorageQueueAccount myStorageAccount -StorageQueueName myStorageQueue -SASToken "?sv=2012-02-12&si=samplePolicy%2F30%2F2014%206%3A37%3A36%20PM&sig=vLQEbSfZbTFh7q3YrzlxBeL%2BjiYKp0gE6lMJ0a5Nb4M%3D" + + Create a new scheduler storage job under jobCollection1 with the provided storage credentials (storage account, queue name, sas token). The job's schedule will be default - runs once immediately + + + + + + + + + + + + + + + + + + + -------------- Example 2 -------------- + + + C:\PS> + C:\PS> + + New-AzureSchedulerStorageQueueJob -Location "North Central US" -JobCollectionName jobCollection1 -JobName job1 -StorageQueueAccount myStorageAccount -StorageQueueName myStorageQueue -SASToken "?sv=2012-02-12&si=samplePolicy%2F30%2F2014%206%3A37%3A36%20PM&sig=vLQEbSfZbTFh7q3YrzlxBeL%2BjiYKp0gE6lMJ0a5Nb4M%3D" -ExecutionCount 20 -Frequency Hour -Interval 2 + + Create a new scheduler storage job under jobCollection1 with the provided storage credentials (storage account, queue name, sas token). The job will execute 20 times in total, twice every hour + + + + + + + + + + + + + + + + + + + + + New-AzureSchedulerHttpJob + + Create a scheduler job with an Http action + + + + + + New + AzureSchedulerHttpJob + + + + + + Create a scheduler job with an Http action + + + + New-AzureSchedulerHttpJob + + Location + + The location name. + + string + + + Job Collection Name + + The name of scheduler job collection. + + string + + + Job Name + + The name of scheduler job. + + string + + + Method + + The Method for Http and Https Action types (GET, PUT, POST, HEAD or DELETE). + + string + + + URI + + The Uri for job action. + + Uri + + + RequestBody + + The Body for PUT and POST job actions. + + string + + + StartTime + + The Start time. + + DateTime + + + Interval + + Interval of the recurrence at the given frequency. + + integer + + + Frequency + + The frequency of recurrence. + + string + + + ExecutionCount + + Count of occurrences that will execute. Optional. Default will recur infinitely. + + integer + + + EndTime + + The End time. + + DateTime + + + JobState + + The scheduler job state. + + string + + + Headers + + The header collection. + + HashTable + + + ErrorActionMethod + + The Method for Http and Https Action types (GET, PUT, POST, HEAD or DELETE). + + string + + + ErrorActionURI + + The Uri for error job action. + + Uri + + + ErrorActionRequestBody + + The Body for PUT and POST job actions. + + string + + + ErrorActionHeaders + + The header collection. + + HashTable + + + ErrorActionStorageAccount + + The Storage account name. + + string + + + ErrorActionStorageQueue + + The Storage queue name. + + string + + + ErrorActionSASToken + + The Sas token for storage queue. + + string + + + ErrorActionQueueMessageBody + + The body for storage job acitons. + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Example 1 -------------- + + + C:\PS> + C:\PS> + + New-AzureSchedulerHttpJob -Location "North Central US" -JobCollectionName jobCollection1 -JobName job1 -Method GET -URI http://www.bing.com + + Create a new scheduler http job under jobCollection1. The method is GET and Uri is http://www.bing.com. The job's schedule will be default - runs once immediately + + + + + + + + + + + + + + + + + + + -------------- Example 2 -------------- + + + C:\PS> + C:\PS> + + New-AzureSchedulerHttpJob -Location "North Central US" -JobCollectionName jobCollection1 -JobName job1 -Method GET -URI http://www.bing.com -ExecutionCount 20 + + Create a new scheduler http job under jobCollection1. The method is GET and Uri is http://www.bing.com. The job will execute 20 times with default schedule + + + + + + + + + + + + + + + + + + + + + New-AzureSchedulerJobCollection + + Create a scheduler job collection + + + + + + New + AzureSchedulerJobCollection + + + + + + Create a scheduler job collection with the specified plan, max job count and max recurrence. If no plan is specified, Standard job collection will be created + + + + New-AzureSchedulerJobCollection + + Location + + The location name. + + string + + + Job Collection Name + + The name of scheduler job collection. + + string + + + Plan + + The scheduler job collection plan. + + string + + + MaxJobCount + + The maximum number of jobs that can be created in the scheduler job collection. + + int + + + Frequency + + The maximum frequency that can be specified on any job in this scheduler job collection. + + string + + + Interval + + The interval of recurrence at given frequency. + + int + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Example 1 -------------- + + + C:\PS> + C:\PS> + + New-AzureSchedulerJobCollection -Location "North Central US" -JobCollectionName jobCollection1 -Plan Standard + + Create a new Standard scheduler job collection jobCollection1 with default job count and max recurrence values for a Standard scheduler job collection + + + + + + + + + + + + + + + + + + + -------------- Example 2 -------------- + + + C:\PS> + C:\PS> + + New-AzureSchedulerJobCollection -Location "North Central US" -JobCollectionName jobCollection1 -Plan Standard -MaxJobCount 30 -Frequency Hour -Interval 12 + + Create a new Standard scheduler job collection jobCollection1 with max job count set to 30, and max recurrence set to 12 per hour + + + + + + + + + + + + + + + + + + + + + Set-AzureSchedulerJobCollection + + Update a scheduler job collection + + + + + + Set + AzureSchedulerJobCollection + + + + + + Update a scheduler job collection with specified parameters + + + + Set-AzureSchedulerJobCollection + + Location + + The location name. + + string + + + Job Collection Name + + The name of scheduler job collection. + + string + + + Plan + + The scheduler job collection plan. + + string + + + MaxJobCount + + The maximum number of jobs that can be created in the scheduler job collection. + + int + + + Frequency + + The maximum frequency that can be specified on any job in this scheduler job collection. + + string + + + Interval + + The interval of recurrence at given frequency. + + int + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Example 1 -------------- + + + C:\PS> + C:\PS> + + Set-AzureSchedulerJobCollection -Location "North Central US" -JobCollectionName jobCollection1 -MaxJobCount 30 + + Sets the max job count to 30 on existing scheduler job collection, jobcollection1 + + + + + + + + + + + + + + + + + + + + + Set-AzureSchedulerHttpJob + + Update a scheduler job with an Http action + + + + + + Set + AzureSchedulerHttpJob + + + + + + Update a scheduler job with an Http action + + + + Set-AzureSchedulerHttpJob + + Location + + The location name. + + string + + + Job Collection Name + + The name of scheduler job collection. + + string + + + Job Name + + The name of scheduler job. + + string + + + Method + + The Method for Http and Https Action types (GET, PUT, POST, HEAD or DELETE). + + string + + + URI + + The Uri for job action. + + Uri + + + RequestBody + + The Body for PUT and POST job actions. + + string + + + StartTime + + The Start time. + + DateTime + + + Interval + + Interval of the recurrence at the given frequency. + + integer + + + Frequency + + The frequency of recurrence. + + string + + + ExecutionCount + + Count of occurrences that will execute. Optional. Default will recur infinitely. + + integer + + + EndTime + + The End time. + + DateTime + + + JobState + + The scheduler job state. + + string + + + Headers + + The header collection. + + HashTable + + + ErrorActionMethod + + The Method for Http and Https Action types (GET, PUT, POST, HEAD or DELETE). + + string + + + ErrorActionURI + + The Uri for error job action. + + Uri + + + ErrorActionRequestBody + + The Body for PUT and POST job actions. + + string + + + ErrorActionHeaders + + The header collection. + + HashTable + + + ErrorActionStorageAccount + + The Storage account name. + + string + + + ErrorActionStorageQueue + + The Storage queue name. + + string + + + ErrorActionSASToken + + The Sas token for storage queue. + + string + + + ErrorActionQueueMessageBody + + The body for storage job actions. + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Example 1 -------------- + + + C:\PS> + C:\PS> + + Set-AzureSchedulerHttpJob -Location "North Central US" -JobCollectionName jobCollection1 -JobName job1 -JobState Disabled + + Set job1 state to disabled + + + + + + + + + + + + + + + + + + + -------------- Example 2 -------------- + + + C:\PS> + C:\PS> + + Set-AzureSchedulerHttpJob -Location "North Central US" -JobCollectionName jobCollection1 -JobName job1 -URI http://www.bing.com + + Update job1 Uri to http://www.bing.com + + + + + + + + + + + + + + + + + + + + + Set-AzureSchedulerStorageQueueJob + + Update a scheduler job with a storage action + + + + + + Set + AzureSchedulerStorageQueueJob + + + + + + Update a scheduler job with a storage action + + + + Set-AzureSchedulerStorageQueueJob + + Location + + The location name. + + string + + + Job Collection Name + + The name of scheduler job collection. + + string + + + Job Name + + The name of scheduler job. + + string + + + StorageQueueAccount + + The Storage account name. + + string + + + StorageQueueName + + The Storage Queue name. + + string + + + SASToken + + The SAS token for storage queue. + + string + + + StorageQueueMessage + + The queue message for storage job. + + string + + + StartTime + + The Start time. + + DateTime + + + Interval + + Interval of the recurrence at the given frequency. + + integer + + + Frequency + + The frequency of recurrence. + + string + + + ExecutionCount + + Count of occurrences that will execute. Optional. Default will recur infinitely. + + integer + + + EndTime + + The End time. + + DateTime + + + JobState + + The scheduler job state. + + string + + + Headers + + The header collection. + + HashTable + + + ErrorActionMethod + + The Method for Http and Https Action types (GET, PUT, POST, HEAD or DELETE). + + string + + + ErrorActionURI + + The Uri for error job action. + + Uri + + + ErrorActionRequestBody + + The Body for PUT and POST job actions. + + string + + + ErrorActionHeaders + + The header collection. + + HashTable + + + ErrorActionStorageAccount + + The Storage account name. + + string + + + ErrorActionStorageQueue + + The Storage queue name. + + string + + + ErrorActionSASToken + + The Sas token for storage queue. + + string + + + ErrorActionQueueMessageBody + + The body for storage job actions. + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------- Example 1 -------------- + + + C:\PS> + C:\PS> + + Set-AzureSchedulerStorageQueueJob -Location "North Central US" -JobCollectionName jobCollection1 -JobName job1 -StorageQueueMessage "Updated message" + + Update queue message for storage job job1 + + + + + + + + + + + + + + + + + + + -------------- Example 2 -------------- + + + C:\PS> + C:\PS> + + Set-AzureSchedulerStorageQueueJob -Location "North Central US" -JobCollectionName jobCollection1 -JobName job1 -JobState Enabled + + Enable job1 + + + + + + + + + + + + + + + + + + + + + Get-WAPackVM + + Gets virtual machine objects. + + + + + Get + WAPackVM + + + + The Get-WAPackVM cmdlet gets virtual machine objects. + + + + Get-WAPackVM + + ID + + Specifies the unique ID of a virtual machine. + + Guid + + + + Get-WAPackVM + + Name + + Specifies the name of a virtual machine. + + String + + + + + + ID + + Specifies the unique ID of a virtual machine. + + Guid + + Guid + + + + + + + Name + + Specifies the name of a virtual machine. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Get a virtual machine by using a name + + + + + + PS C:\>Get-WAPackVM -Name "ContosoV126" + + + This command gets the virtual machine named ContosoV126. + + + + + + + + + Example 2: Get a virtual machine by using an ID + + + + + + PS C:\>Get-WAPackVM -Id 66242D17-189F-480D-87CF-8E1D749998C8 + + + This command gets the virtual machine that has the specified ID. + + + + + + + + + Example 3: Get all virtual machines + + + + + + PS C:\>Get-WAPackVM + + + + This command gets all virtual machines. + + + + + + + + + + + + New-WAPackVM + + + + Remove-WAPackVM + + + + Restart-WAPackVM + + + + Resume-WAPackVM + + + + Set-WAPackVM + + + + Start-WAPackVM + + + + Stop-WAPackVM + + + + Suspend-WAPackVM + + + + Get-WAPackVMOSDisk + + + + + + + Get-WAPackVMOSDisk + + Gets operating system disk objects for virtual machines. + + + + + Get + WAPackVMOSDisk + + + + The Get-WAPackVMOSDisk cmdlet gets operating system disk objects for virtual machines. + + + + Get-WAPackVMOSDisk + + ID + + Specifies the unique ID of an operating system disk. + + Guid + + + + Get-WAPackVMOSDisk + + Name + + Specifies the name of an operating system disk. + + String + + + + + + ID + + Specifies the unique ID of an operating system disk. + + Guid + + Guid + + + + + + + Name + + Specifies the name of an operating system disk. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Get an operating system disk by using a name + + + + + + PS C:\>Get-WAPackVMOSDisk -Name "ContosoOSDisk" + + + This command gets an operating system disk named ContosoOSDisk. + + + + + + + + + Example 2: Get an operating system disk by using an ID + + + + + + PS C:\>Get-WAPackVMOSDisk -Id 66242D17-189F-480D-87CF-8E1D749998C8 + + + + This command gets the operating system disk that has the specified ID. + + + + + + + + + Example 3: Get all operating system disks + + + + + + PS C:\>Get-WAPackVMOSDisk + + + This command gets all operating system disks. + + + + + + + + + + + Get-WAPackVM + + + + + + + Get-WAPackVMSizeProfile + + Gets size profile objects. + + + + + Get + WAPackVMSizeProfile + + + + The Get-WAPackVMSizeProfile cmdlet gets size profile objects for virtual machines. + + + + Get-WAPackVMSizeProfile + + ID + + Specifies the unique ID of a size profile. + + Guid + + + + Get-WAPackVMSizeProfile + + Name + + Specifies the name of a size profile. + + String + + + + + + ID + + Specifies the unique ID of a size profile. + + Guid + + Guid + + + + + + + Name + + Specifies the name of a size profile. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Get a size profile by using a name + + + + + + PS C:\>Get-WAPackVMSizeProfile -Name "ContosoSizeProfile07" + + + This command gets the size profile named ContosoSizeProfile07. + + + + + + + + + Example 2: Get a size profile by using an ID + + + + + + PS C:\>Get-WAPackVMSizeProfile -ID 66242D17-189F-480D-87CF-8E1D749998C8 + + + This command gets the size profile that has the specified ID. + + + + + + + + + Example 3: Get all size profiles + + + + + + PS C:\>Get-WAPackVMSizeProfile + + + This command gets all the size profiles. + + + + + + + + + + + Get-WAPackVM + + + + + + + Get-WAPackVMTemplate + + Gets virtual machine templates. + + + + + Get + WAPackVMTemplate + + + + The Get-WAPackVMTemplate cmdlet gets virtual machine templates. + + + + Get-WAPackVMTemplate + + ID + + Specifies the unique ID of a template. + + Guid + + + + Get-WAPackVMTemplate + + Name + + Specifies the name of a template. + + String + + + + + + ID + + Specifies the unique ID of a template. + + Guid + + Guid + + + + + + + Name + + Specifies the name of a template. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Get a virtual machine template by using a name + + + + + + PS C:\>Get-WAPackVMTemplate -Name "ContosoTemplate04" + + + This command gets the virtual machine template named ContosoTemplate04. + + + + + + + + + Example 2: Get a virtual machine template by using an ID + + + + + + PS C:\>Get-WAPackVMTemplate -Id 66242D17-189F-480D-87CF-8E1D749998C8 + + + This command gets the virtual machine template that has the specified ID. + + + + + + + + + Example 3: Get all virtual machine templates + + + + + + PS C:\>Get-WAPackVMTemplate + + + This command gets all the virtual machine templates. + + + + + + + + + + + Get-WAPackVM + + + + + + + Get-WAPackVNet + + Gets virtual networks. + + + + + Get + WAPackVNet + + + + The Get-WAPackVNet cmdlet gets virtual networks. + + + + Get-WAPackVNet + + ID + + Specifies the unique ID of a virtual network. + + Guid + + + + Get-WAPackVNet + + Name + + Specifies the name of a virtual network. + + String + + + + + + ID + + Specifies the unique ID of a virtual network. + + Guid + + Guid + + + + + + + Name + + Specifies the name of a virtual network. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Get all virtual networks + + + + + + PS C:\>Get-WAPackVNet + + + This command gets all virtual networks. + + + + + + + + + Example 2: Get a virtual network by using an ID + + + + + + PS C:\>Get-WAPackVNet -ID 66242D17-189F-480D-87CF-8E1D749998C8 + + + This command gets the virtual network that has the specified ID. + + + + + + + + + Example 3: Get a virtual network by using a name + + + + + + PS C:\> Get-WAPackVNet -Name "ContosoVNet08" + + + This command gets the virtual network named ContosoVNet08. + + + + + + + + + + + Get-WAPackVM + + + + + + + New-WAPackQuickVM + + Creates a virtual machine based on a template. + + + + + New + WAPackQuickVM + + + + The New-WAPackQuickVM cmdlet creates a virtual machine based on a template. + + + + New-WAPackQuickVM + + Name + + Specifies a name for the virtual machine. + + String + + + Template + + Specifies a template. The cmdlet creates a virtual machine based on the template that you specify. To obtain a template object, use the Get-WAPackVMTemplate cmdlet. + + VMTemplate + + + VMCredential + + Specifies the credential for the local Administrator account. To obtain a PSCredential object, use the Get-Credential cmdlet. For more information, type Get-Help Get-Credential. + + PSCredential + + + + + + Name + + Specifies a name for the virtual machine. + + String + + String + + + + + + + Template + + Specifies a template. The cmdlet creates a virtual machine based on the template that you specify. To obtain a template object, use the Get-WAPackVMTemplate cmdlet. + + VMTemplate + + VMTemplate + + + + + + + VMCredential + + Specifies the credential for the local Administrator account. To obtain a PSCredential object, use the Get-Credential cmdlet. For more information, type Get-Help Get-Credential. + + PSCredential + + PSCredential + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Create a virtual machine based on a template + + + + + + PS C:\>$Credentials = Get-Credential + PS C:\> $TemplateId = Get-WAPackVMTemplate -Id 66242D17-189F-480D-87CF-8E1D749998C8 + PS C:\> New-WAPackQuickVM -Name "VirtualMachine023" -Template $TemplateId -VMCredential $Credentials + + + + The first command creates a PSCredential object, and then stores it in the $Credentials variable. The cmdlet prompts you for an account and password. For more information, type Get-Help Get-Credential. + The second command gets a template by using the Get-WAPackVMTemplate cmdlet. The command specifies the ID of a template. The command stores the template object in the $TemplateID variable. + The final command creates a virtual machine named VirtualMachine023. The command bases the virtual machine on the template stored in $TemplateId. + + + + + + + + + + + Online Version: + + + + + New-WAPackVM + + + + Get-WAPackVMTemplate + + + + + + + New-WAPackVM + + Creates a virtual machine. + + + + + New + WAPackVM + + + + The New-WAPackVM cmdlet creates a virtual machine. + + + + New-WAPackVM + + ProductKey + + Specifies a product key. The product key is a 25 digit number that identifies the product license. Use a product key for an operating system that you plan to install on a virtual machine or host. + + String + + + VNet + + Specifies a virtual network. The cmdlet connects the virtual machine to the virtual network that you specify. To obtain a virtual network, use the Get-WAPackVNet cmdlet. + + VMNetwork + + + Name + + Specifies a name for the virtual machine. + + String + + + Template + + Specifies a template. The cmdlet creates a virtual machine based on the template that you specify. To obtain a template object, use the Get-WAPackVMTemplate cmdlet. + + VMTemplate + + + VMCredential + + Specifies the credential for the local Administrator account. To obtain a PSCredential object, use the Get-Credential cmdlet. For more information, type Get-Help Get-Credential. + + PSCredential + + + Windows + + Indicates that the cmdlet creates a virtual machine to run the Windows operating system. + + + + + New-WAPackVM + + AdministratorSSHKey + + Specifies the Secure Shell (SSH) key for the Administrator account. + + String + + + VNet + + Specifies a virtual network. The cmdlet connects the virtual machine to the virtual network that you specify. To obtain a virtual network, use the Get-WAPackVNet cmdlet. + + VMNetwork + + + Linux + + Indicates that the cmdlet creates a virtual machine to run the Linux operating system. + + + + Name + + Specifies a name for the virtual machine. + + String + + + Template + + Specifies a template. The cmdlet creates a virtual machine based on the template that you specify. To obtain a template object, use the Get-WAPackVMTemplate cmdlet. + + VMTemplate + + + VMCredential + + Specifies the credential for the local Administrator account. To obtain a PSCredential object, use the Get-Credential cmdlet. For more information, type Get-Help Get-Credential. + + PSCredential + + + + New-WAPackVM + + VNet + + Specifies a virtual network. The cmdlet connects the virtual machine to the virtual network that you specify. To obtain a virtual network, use the Get-WAPackVNet cmdlet. + + VMNetwork + + + Name + + Specifies a name for the virtual machine. + + String + + + OSDisk + + Specifies an operating system disk as a VirtualHardDisk object. To obtain an operating system disk, use the Get-WAPackVMOSDisk cmdlet. + + VirtualHardDisk + + + VMSizeProfile + + Specifies a size profile for a virtual machine as a HardwareProfile object. To obtain a size profile, use the Get-WAPackVMSizeProfile cmdlet. + + HardwareProfile + + + + + + AdministratorSSHKey + + Specifies the Secure Shell (SSH) key for the Administrator account. + + String + + String + + + + + + + Linux + + Indicates that the cmdlet creates a virtual machine to run the Linux operating system. + + SwitchParameter + + SwitchParameter + + + + + + + Name + + Specifies a name for the virtual machine. + + String + + String + + + + + + + OSDisk + + Specifies an operating system disk as a VirtualHardDisk object. To obtain an operating system disk, use the Get-WAPackVMOSDisk cmdlet. + + VirtualHardDisk + + VirtualHardDisk + + + + + + + ProductKey + + Specifies a product key. The product key is a 25 digit number that identifies the product license. Use a product key for an operating system that you plan to install on a virtual machine or host. + + String + + String + + + + + + + Template + + Specifies a template. The cmdlet creates a virtual machine based on the template that you specify. To obtain a template object, use the Get-WAPackVMTemplate cmdlet. + + VMTemplate + + VMTemplate + + + + + + + VMCredential + + Specifies the credential for the local Administrator account. To obtain a PSCredential object, use the Get-Credential cmdlet. For more information, type Get-Help Get-Credential. + + PSCredential + + PSCredential + + + + + + + VMSizeProfile + + Specifies a size profile for a virtual machine as a HardwareProfile object. To obtain a size profile, use the Get-WAPackVMSizeProfile cmdlet. + + HardwareProfile + + HardwareProfile + + + + + + + VNet + + Specifies a virtual network. The cmdlet connects the virtual machine to the virtual network that you specify. To obtain a virtual network, use the Get-WAPackVNet cmdlet. + + VMNetwork + + VMNetwork + + + + + + + Windows + + Indicates that the cmdlet creates a virtual machine to run the Windows operating system. + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Create a virtual machine for the Windows operating system by using a template + + + + + + PS C:\>$Credentials = Get-Credential + PS C:\> $Template = Get-WAPackVMTemplate -Name "ContosoTemplate04" + PS C:\> New-WAPackVM -Name "ContosoV023" -Template $Template -VMCredential $Credentials -Windows + + + The first command creates a PSCredential object, and then stores it in the $Credentials variable. The cmdlet prompts you for an account and password. For more information, type Get-Help Get-Credential. + The second command gets the virtual machine template named ContosoTemplate04 by using the Get-WAPackVMTemplate cmdlet, and then stores it in the $Template variable. + The final command creates a virtual machine named ContosoV023, based on the template stored in the $Template variable. The command specifies the Windows parameter, and, therefore, the virtual machine must run a version of the Windows operating system. + + + + + + + + + Example 2: Create a virtual machine for the Linux operating system by using a template + + + + + + PS C:\>$Credentials = Get-Credential + PS C:\> $Template = Get-WAPackVMTemplate -Name "ContosoTemplate19" + PS C:\> New-WAPackVM -Linux -Name "ContosoV028" -Template $Template -VMCredential $Credentials + + + The first command creates a PSCredential object, and then stores it in the $Credentials variable. + The second command gets the virtual machine template named ContosoTemplate19 by using the Get-WAPackVMTemplate cmdlet, and then stores it in the $Template variable. + The final command creates a virtual machine named ContosoV028, based on the template stored in the $Template variable. The command specifies the Linux parameter, and, therefore, the virtual machine must run a version of the Linux operating system. + + + + + + + + + Example 3: Create a virtual machine from an operating system disk and size profile + + + + + + PS C:\>$OSDisk = Get-WAPackVMOSDisk -Name "ContosoDiskOS" + PS C:\> $SizeProfile = Get-WAPackVMSizeProfile -Name "MediumSizeVM" + PS C:\> New-WAPackVM -Name "ContosoV073" -OSDisk $OSDisk -VMSizeProfile $SizeProfile + + + The first command gets an operating system disk named ContosoDiskOS by using the Get-WAPackVMOSDisk cmdlet, and then stores it in the $OSDisk variable. + The second command gets the size profile named MediumSizeVM by using the Get-WAPackVMSizeProfile cmdlet, and then stores it in the $SizeProfile variable. + The final command creates a virtual machine named ContosoV073 from the operating system disk stored in $OSDisk and the size profile stored in $SizeProfile. + + + + + + + + + + + Get-WAPackVM + + + + Remove-WAPackVM + + + + Restart-WAPackVM + + + + Resume-WAPackVM + + + + Set-WAPackVM + + + + Start-WAPackVM + + + + Stop-WAPackVM + + + + Suspend-WAPackVM + + + + Get-WAPackVMSizeProfile + + + + Get-WAPackVMTemplate + + + + Get-WAPackVMOSDisk + + + + Get-WAPackVNet + + + + + + + Remove-WAPackVM + + Removes virtual machine objects. + + + + + Remove + WAPackVM + + + + The Remove-WAPackVM cmdlet removes virtual machine objects. + + + + Remove-WAPackVM + + VM + + Specifies a virtual machine. To obtain a virtual machine, use the Get-WAPackVM cmdlet. + + VirtualMachine + + + PassThru + + Indicates that the cmdlet returns a Boolean value. If the operation succeeds, the cmdlet returns a value of $True. Otherwise, it returns a value of $False. By default, this cmdlet does not generate any output. + + + + Force + + Indicates that the cmdlet removes a virtual machine without prompting you for confirmation. + + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + + + + + Force + + Indicates that the cmdlet removes a virtual machine without prompting you for confirmation. + + SwitchParameter + + SwitchParameter + + + + + + + PassThru + + Indicates that the cmdlet returns a Boolean value. If the operation succeeds, the cmdlet returns a value of $True. Otherwise, it returns a value of $False. By default, this cmdlet does not generate any output. + + SwitchParameter + + SwitchParameter + + + + + + + VM + + Specifies a virtual machine. To obtain a virtual machine, use the Get-WAPackVM cmdlet. + + VirtualMachine + + VirtualMachine + + + + + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + SwitchParameter + + + false + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + SwitchParameter + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Remove a virtual machine + + + + + + PS C:\>$VirtualMachine = Get-WAPackVM -Name "ContosoV126" + PS C:\> Remove-WAPackVM -VM $VirtualMachine + + + The first command gets the virtual machine named ContosoV126 by using the Get-WAPackVM cmdlet, and then stores that object in the $VirtualMachine variable. + The second command removes the virtual machine stored in $VirtualMachine. The command prompts you for confirmation. + + + + + + + + + Example 2: Remove a virtual machine without confirmation + + + + + + PS C:\>$VirtualMachine = Get-WAPackVM -Name "ContosoV126" + PS C:\> Remove-WAPackVM -VM $VirtualMachine -Force + + + The first command gets the virtual machine named ContosoV126 by using the Get-WAPackVM cmdlet, and then stores that object in the $VirtualMachine variable. + The second command removes the virtual machine stored in $VirtualMachine. This command includes the Force parameter. The command does not prompt you for confirmation. + + + + + + + + + + + Get-WAPackVM + + + + New-WAPackVM + + + + Restart-WAPackVM + + + + Resume-WAPackVM + + + + Set-WAPackVM + + + + Start-WAPackVM + + + + Stop-WAPackVM + + + + Suspend-WAPackVM + + + + + + + Restart-WAPackVM + + Restarts virtual machines. + + + + + Restart + WAPackVM + + + + The Restart-WAPackVM cmdlet restarts virtual machines. + + + + Restart-WAPackVM + + VM + + Specifies a virtual machine. To obtain a virtual machine, use the Get-WAPackVM cmdlet. + + VirtualMachine + + + PassThru + + Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output. + + + + + + + PassThru + + Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output. + + SwitchParameter + + SwitchParameter + + + + + + + VM + + Specifies a virtual machine. To obtain a virtual machine, use the Get-WAPackVM cmdlet. + + VirtualMachine + + VirtualMachine + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Restart a virtual machine + + + + + + PS C:\>$VirtualMachine = Get-WAPackVM -Name "ContosoV126"PS C:\> Restart-WAPackVM -VM $VirtualMachine + + + The first command gets the virtual machine named ContosoV126 by using the Get-WAPackVM cmdlet, and then stores that object in the $VirtualMachine variable. + The second command restarts the virtual machine stored in $VirtualMachine. + + + + + + + + + + + Get-WAPackVM + + + + New-WAPackVM + + + + Remove-WAPackVM + + + + Resume-WAPackVM + + + + Set-WAPackVM + + + + Start-WAPackVM + + + + Stop-WAPackVM + + + + Suspend-WAPackVM + + + + + + + Resume-WAPackVM + + Resumes paused virtual machines. + + + + + Resume + WAPackVM + + + + The Resume-WAPackVM cmdlet resumes paused virtual machines. + + + + Resume-WAPackVM + + VM + + Specifies a virtual machine. To obtain a virtual machine, use the Get-WAPackVM cmdlet. + + VirtualMachine + + + PassThru + + Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output. + + + + + + + PassThru + + Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output. + + SwitchParameter + + SwitchParameter + + + + + + + VM + + Specifies a virtual machine. To obtain a virtual machine, use the Get-WAPackVM cmdlet. + + VirtualMachine + + VirtualMachine + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Resume a virtual machine + + + + + + PS C:\>$VirtualMachine = Get-WAPackVM -Name "ContosoV126"PS C:\> Resume-WAPackVM -VM $VirtualMachine + + + The first command gets the virtual machine named ContosoV126 by using the Get-WAPackVM cmdlet, and then stores that object in the $VirtualMachine variable. + The second command resumes the virtual machine stored in $VirtualMachine. + + + + + + + + + + + Get-WAPackVM + + + + New-WAPackVM + + + + Remove-WAPackVM + + + + Restart-WAPackVM + + + + Set-WAPackVM + + + + Start-WAPackVM + + + + Stop-WAPackVM + + + + Suspend-WAPackVM + + + + + + + Set-WAPackVM + + Changes the size properties of a virtual machine. + + + + + Set + WAPackVM + + + + The Set-WAPackVM cmdlet changes the size properties of a virtual machine. + + + + Set-WAPackVM + + VM + + Specifies a virtual machine. To obtain a virtual machine, use the Get-WAPackVM cmdlet. + + VirtualMachine + + + VMSizeProfile + + Specifies a size profile for a virtual machine as a HardwareProfile object. To obtain a size profile, use the Get-WAPackVMSizeProfile cmdlet. + + HardwareProfile + + + PassThru + + Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output. + + + + + + + PassThru + + Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output. + + SwitchParameter + + SwitchParameter + + + + + + + VM + + Specifies a virtual machine. To obtain a virtual machine, use the Get-WAPackVM cmdlet. + + VirtualMachine + + VirtualMachine + + + + + + + VMSizeProfile + + Specifies a size profile for a virtual machine as a HardwareProfile object. To obtain a size profile, use the Get-WAPackVMSizeProfile cmdlet. + + HardwareProfile + + HardwareProfile + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Specify the size for a virtual machine + + + + + + PS C:\>$VirtualMachine = Get-WAPackVM -Name "ContosoV126"PS C:\> $SizeProfile = Get-WAPackVMSizeProfile -Name "MediumSizeVM"PS C:\> Set-WAPackVM -VM $VirtualMachine -VMSizeProfile $SizeProfile + + + The first command gets the virtual machine named ContosoV126 by using the Get-WAPackVM cmdlet, and then stores that object in the $VirtualMachine variable. + The second command gets the size profile named MediumSizeVM by using the Get-WAPackVMSizeProfile cmdlet, and then stores that object in the $SizeProfile variable. + The final command assigns the size profile stored in $SizeProfile to the virtual machine stored in $VirtualMachine. + + + + + + + + + + + Get-WAPackVM + + + + New-WAPackVM + + + + Remove-WAPackVM + + + + Restart-WAPackVM + + + + Resume-WAPackVM + + + + Start-WAPackVM + + + + Stop-WAPackVM + + + + Suspend-WAPackVM + + + + Get-WAPackVMSizeProfile + + + + + + + Start-WAPackVM + + Starts a virtual machine. + + + + + Start + WAPackVM + + + + The Start-WAPackVM cmdlet starts a virtual machine. + + + + Start-WAPackVM + + VM + + Specifies a virtual machine. To obtain a virtual machine, use the Get-WAPackVM cmdlet. + + VirtualMachine + + + PassThru + + Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output. + + + + + + + PassThru + + Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output. + + SwitchParameter + + SwitchParameter + + + + + + + VM + + Specifies a virtual machine. To obtain a virtual machine, use the Get-WAPackVM cmdlet. + + VirtualMachine + + VirtualMachine + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Start a virtual machine + + + + + + PS C:\>$VirtualMachine = Get-WAPackVM -Name "ContosoV126"PS C:\> Start-WAPackVM -VM $VirtualMachine + + + The first command gets the virtual machine named ContosoV126 by using the Get-WAPackVM cmdlet, and then stores that object in the $VirtualMachine variable. + The second command starts the virtual machine stored in $VirtualMachine. + + + + + + + + + + + Get-WAPackVM + + + + New-WAPackVM + + + + Remove-WAPackVM + + + + Restart-WAPackVM + + + + Resume-WAPackVM + + + + Set-WAPackVM + + + + Stop-WAPackVM + + + + Suspend-WAPackVM + + + + + + + Stop-WAPackVM + + Stops a virtual machine. + + + + + Stop + WAPackVM + + + + The Stop-WAPackVM cmdlet stops a virtual machine. + + + + Stop-WAPackVM + + VM + + Specifies a virtual machine. To obtain a virtual machine, use the Get-WAPackVM cmdlet. + + VirtualMachine + + + PassThru + + Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output. + + + + Shutdown + + Indicates that the cmdlet shuts down the operating system of the virtual machine. + + + + + + + PassThru + + Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output. + + SwitchParameter + + SwitchParameter + + + + + + + Shutdown + + Indicates that the cmdlet shuts down the operating system of the virtual machine. + + SwitchParameter + + SwitchParameter + + + + + + + VM + + Specifies a virtual machine. To obtain a virtual machine, use the Get-WAPackVM cmdlet. + + VirtualMachine + + VirtualMachine + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Stop a virtual machine + + + + + + PS C:\>$VirtualMachine = Get-WAPackVM -Name "ContosoV126"PS C:\> Stop-WAPackVM -VM $VirtualMachine + + + + The first command gets the virtual machine named ContosoV126 by using the Get-WAPackVM cmdlet, and then stores that object in the $VirtualMachine variable. + The second command stops the virtual machine stored in $VirtualMachine. + + + + + + + + + + + Online Version: + + + + + Get-WAPackVM + + + + New-WAPackVM + + + + Remove-WAPackVM + + + + Restart-WAPackVM + + + + Resume-WAPackVM + + + + Set-WAPackVM + + + + Start-WAPackVM + + + + Suspend-WAPackVM + + + + + + + Suspend-WAPackVM + + Suspends a virtual machine. + + + + + Suspend + WAPackVM + + + + The Suspend-WAPackVM cmdlet suspends a virtual machine. + + + + Suspend-WAPackVM + + VM + + Specifies a virtual machine. To obtain a virtual machine, use the Get-WAPackVM cmdlet. + + VirtualMachine + + + PassThru + + Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output. + + + + + + + PassThru + + Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output. + + SwitchParameter + + SwitchParameter + + + + + + + VM + + Specifies a virtual machine. To obtain a virtual machine, use the Get-WAPackVM cmdlet. + + VirtualMachine + + VirtualMachine + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Suspend a virtual machine + + + + + + PS C:\>$VirtualMachine = Get-WAPackVM -Name "ContosoV126"PS C:\> Suspend-WAPackVM -VM $VirtualMachine + + + + The first command gets the virtual machine named ContosoV126 by using the Get-WAPackVM cmdlet, and then stores that object in the $VirtualMachine variable. + The second command suspends the virtual machine stored in $VirtualMachine. + + + + + + + + + + + Online Version: + + + + + Get-WAPackVM + + + + New-WAPackVM + + + + Remove-WAPackVM + + + + Restart-WAPackVM + + + + Resume-WAPackVM + + + + Set-WAPackVM + + + + Start-WAPackVM + + + + Stop-WAPackVM + + + + + + + Get-WAPackLogicalNetwork + + Gets logical network objects. + + + + + Get + WAPackLogicalNetwork + + + + The Get-WAPackLogicalNetwork cmdlet gets logical network objects. + + + + Get-WAPackLogicalNetwork + + Name + + Specifies the name of a logical network. + + String + + + + + + Name + + Specifies the name of a logical networks. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Get a logical network by using a name + + + + + + PS C:\>Get-WAPackLogicalNetwork -Name "ContosoLogicalNetwork01" + + + This command gets a logical network named ContosoLogicalNetwork01. + + + + + + + + + Example 2: Get all logical networks + + + + + + PS C:\>Get-WAPackLogicalNetwork + + + This command gets all logical networks. + + + + + + + + + + + New-WAPackVNet + + + + + + + Get-WAPackStaticIPAddressPool + + Gets static ip address pool objects. + + + + + Get + WAPackStaticIPAddressPool + + + + The Get-WAPackStaticIPAddressPool cmdlet gets static ip address pool objects. + + + + Get-WAPackStaticIPAddressPool + + VMSubnet + + Specifies the VMSubnet object associated to the static ip address pool. + + VMSubnet + + + + Get-WAPackStaticIPAddressPool + + Name + + Specifies the name of a static ip address pool. + + String + + + + + + VMSubnet + + Specifies the VMSubnet object associated to the static ip address pool. + + VMSubnet + + VMSubnet + + + + + + + Name + + Specifies the name of a static ip address pool. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Get a static ip address pool from a given VMSubnet + + + + + + PS C:\>$Subnet = Get-WAPackVMSubet –Name “ContosoVMSubnet01”PS C:\>Get-WAPackStaticIPAddressPool –VMSubnet $Subnet -Name "ContosoStaticIPAddressPool01" + + + This command gets the static ip address pool named “ContosoStaticIPAddressPool01” from a given VMSubnet. + + + + + + + + + Example 2: Get all static ip address pool from a given VMSubnet + + + + + + PS C:\>$Subnet = Get-WAPackVMSubet –Name “ContosoVMSubnet01”PS C:\>Get-WAPackStaticIPAddressPool –VMSubnet $Subnet + + + This command gets all the static ip pool from a given VMSubet. + + + + + + + + + + + New-WAPackStaticIPAddressPool + + + + Remove-WAPackStaticIPAddressPool + + + + + + + Get-WAPackVMSubnet + + Gets virtual machine subnet objects. + + + + + Get + WAPackVMSubnet + + + + The Get-WAPackVMSubnet cmdlet gets virtual machine subnet objects. + + + + Get-WAPackVMSubnet + + VNet + + Specifies the VNet associated with a virtual machine subnet. + + VNet + + + + Get-WAPackVMSubnet + + ID + + Specifies the unique ID of a virtual machine subnet. + + Guid + + + + Get-WAPackVMSubnet + + Name + + Specifies the name of a virtual machine subnet. + + String + + + + + + VNet + + Specifies the VNet associated with a virtual machine subnet. + + VNet + + VNet + + + + + + + ID + + Specifies the unique ID of a virtual machine subnet. + + Guid + + Guid + + + + + + + Name + + Specifies the name of a virtual machine subnet. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Get a virtual machine subnet by using a name + + + + + + PS C:\>$VNet = Get-WAPackVNet -Name “ContosoVNet01”PS C:\>Get-WAPackVMTemplate –VNet $VNet -Name "ContosoSubnet01" + + + This command gets the virtual machine subnet named “ContosoSubnet01”. + + + + + + + + + Example 2: Get a virtual machine subnet by using an ID + + + + + + PS C:\>$VNet = Get- WAPackVNet -Name “ContosoVNet01”PS C:\>Get-WAPackVMSubnet –VNet $VNet -Id 66242D17-189F-480D-87CF-8E1D749998C8 + + + This command gets the virtual machine subnet that has the specified ID. + + + + + + + + + Example 3: Get all virtual machine subnets from a given virtualized network + + + + + + PS C:\>$VNet = Get-WAPackVNet -Name “ContosoVNet01”PS C:\>Get-WAPackVMSubnet –VNet $VNet + + + + This command gets all the virtual machine subnets from a given virtualized network. + + + + + + + + + + + + New-WAPackVMSubnet + + + + Remove-WAPackVMSubnet + + + + + + + Get-WAPackCloudService + + Gets cloud service objects. + + + + + Get + WAPackCloudService + + + + The Get-WAPackCloudService cmdlet gets cloud service objects. + + + + Get-WAPackCloudService + + Name + + Specifies the name of a cloud service. + + String + + + + + + Name + + Specifies the name of a cloud service. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Get a cloud services by using a name + + + + + + PS C:\>Get-WAPackCloudService -Name "ContosoCloudService01" + + + This command gets the cloud service named “ContosoCloudService01”. + + + + + + + + + Example 2: Get all cloud services + + + + + + PS C:\>Get-WAPackCloudService + + + This command gets all cloud services. + + + + + + + + + + + New-WAPackCloudService + + + + Remove-WAPackCloudService + + + + + + + Get-WAPackVMRole + + Gets virtual machine role objects. + + + + + Get + WAPackVMRole + + + + The Get-WAPackVMRole cmdlet gets virtual machine role objects. + + + + Get-WAPackVMRole + + Name + + Specifies the name of a virtual machine role. + + String + + + + Get-WAPackVMRole + + CloudServiceName + + Specifies the cloud service name of virtual machine role. + + String + + + + + + Name + + Specifies the name of a virtual machine role. + + String + + String + + + + + + + CloudServiceName + + Specifies the cloud service name of virtual machine role. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Get a virtual machine role (created through the portal) + + + + + + PS C:\>Get-WAPackVMRole –Name “ContosoVMRole01” + + + This command gets a virtual machine role which has been created through the portal named “ContosoVMRole01”. + + + + + + + + + Example 2: Get a virtual machine role by using a name and a cloud service name + + + + + + PS C:\>Get-WAPackVMRole –CloudServiceName “ContosoCloudService01” -Name "ContosoVMRole02" + + + This command gets a virtual machine role named ContosoVMRole02 which stand on a cloud service named ContosoCloudService01. + + + + + + + + + Example 3: Get all virtual machine role + + + + + + PS C:\>Get-WAPackVMRole + + + + This command gets all existing virtual machine role. + + + + + + + + + + + + New-WAPackVMRole + + + + Remove-WAPackVMRole + + + + Set-WAPackVMRole + + + + + + + New-WAPackStaticIPAddressPool + + Creates a static ip address pool. + + + + + New + WAPackStaticIPAddressPool + + + + The New-WAPackStaticIPAddressPool cmdlet creates a static ip address pool. + + + + New-WAPackStaticIPAddressPool + + VMSubnet + + Specifies a VMSubnet associated with the static ip address pool. + + VMSubnet + + + Name + + Specifies a name for the static ip address pool. + + String + + + IPAddressRangeStart + + Specifies a ip address range start for the static ip address pool. + + String + + + IPAddressRangeEnd + + Specifies a ip address range end for the static ip address pool. + + String + + + + + + VMSubnet + + Specifies a VMSubnet associated with the static ip address pool. + + VMSubnet + + VMSubnet + + + + + + + Name + + Specifies a name for the static ip address pool. + + String + + String + + + + + + + IPAddressRangeStart + + Specifies a ip address range start for the static ip address pool. + + String + + String + + + + + + + IPAddressRangeEnd + + Specifies a ip address range end for the static ip address pool. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Create a static ip address pool + + + + + + PS C:\>$VNet = Get-WAPackVNet -Name "ContosoVNet01" + PS C:\>$VMSubnet = Get-WAPackVMSubnet –VNet $VNet -Name "ContosoVMSubnet01" + PS C:\>New-WAPackStaticIpAddressPool –VMSubnet $VMSubnet -Name "ContosoStaticIpAddressPool01" -IPAddressRangeStart “192.168.1.0” –IPAddressRangeEnd “192.168.1.10” + + + The first command first retrieves the virtual machine network to which we want to add the static ip address pool. This virtual machine network is named “ContosoVNet01”. + The second command uses the previously retrieved virtual machine network to get the virtual machine subnet named “ContosoVMSubnet01” to which we want to add the static ip address pool. + The third and last command creates a new static ip address pool with a name “ContosoStaticIpAddressPool01” and a range start “192.168.1.0” and a range end “192.168.1.10”. + + + + + + + + + + + Get-WAPackStaticIPAddressPool + + + + Remove-WAPackStaticIPAddressPool + + + + + + + New-WAPackVMSubnet + + Creates a virtual machine subnet. + + + + + New + WAPackVMSubnet + + + + The New-WAPackVMSubnet cmdlet creates a virtual machine subnet. + + + + New-WAPackVMSubnet + + VNet + + Specifies a VNet associated with the virtual machine subnet. + + VNet + + + Name + + Specifies a name for the virtual machine subnet. + + String + + + Subnet + + Specifies a subnet for the virtual machine subnet. + + String + + + + + + VNet + + Specifies a VNet associated with the virtual machine subnet. + + VNet + + VNet + + + + + + + Name + + Specifies a name for the virtual machine subnet. + + String + + String + + + + + + + Subnet + + Specifies a subnet for the virtual machine subnet. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Create a virtual machine subnet + + + + + + PS C:\>$VNet = Get-WAPackVNet -Name "ContosoVNet01" + PS C:\>New-WAPackVMSubnet –VNet $VNet -Name "ContosoVMSubnet01" –Subnet “192.168.1.0/24” + + + The first command first retrieves the virtual machine network to which we want to add a new virtual machine subnet. This virtual machine network is named “ContosoVNet01”. + The second and last command creates a virtual machine subnet using the previously retrieve virtual machine network, a name “ContosoVMSubnet01” and a subnet “192.168.1.0/24”. + + + + + + + + + + + Get-WAPackVMSubnet + + + + Remove-WAPackVMSubnet + + + + + + + New-WAPackVNet + + Creates a virtualized network. + + + + + New + WAPackVNet + + + + The New-WAPackVNet cmdlet creates a virtualized network. + + + + New-WAPackVNet + + LogicalNetwork + + Specifies a LogicalNetwork associated with the virtualized network. + + LogicalNetwork + + + Name + + Specifies a name for the virtualized network. + + String + + + Description + + Specifies a description for the virtualized network. + + String + + + + + + LogicalNetwork + + Specifies a LogicalNetwork associated with the virtualized network. + + LogicalNetwork + + LogicalNetwork + + + + + + + Name + + Specifies a name for the virtualized network. + + String + + String + + + + + + + Description + + Specifies a description for the virtualized network. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Create a virtualized network + + + + + + PS C:\>$LogicalNetwork = Get-WAPackLogicalNetwork -Name "ContosoLogicalNetwork01" + PS C:\>New-WAPackVNet –LogicalNetwork $LogicalNetwork -Name "ContosoVNett01" –Description “A description” + + + The first command first retrieves the logical network to which we want to add a new virtualized network. This logical network is named “ContosoLogicalNetwork01”. + The second and last command creates a virtualized network using the previously retrieve logical network, a name “ContosoVNett01” and a description “A description”. + + + + + + + + + + + Get-WAPackVNet + + + + Remove-WAPackVNet + + + + + + + New-WAPackCloudService + + Creates a cloud service. + + + + + New + WAPackCloudService + + + + The New-WAPackCloudService cmdlet creates a cloud service. + + + + New-WAPackCloudService + + Name + + Specifies a name for the cloudservice. + + String + + + Label + + Specifies a label for the cloud service. + + String + + + + + + Name + + Specifies a name for the cloud service. + + String + + String + + + + + + + Label + + Specifies a ip address range start for the static ip address pool. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Create a cloud service + + + + + + PS C:\>New-WAPackCloudService -Name "ContosoCloudService01" -Label “A label” + + + The command creates a cloud service named “ContosoCloudService01” with a label. + + + + + + + + + + + Get-WAPackCloudService + + + + Remove-WAPackCloudService + + + + + + + New-WAPackVMRole + + Creates a virtual machine role. + + + + + New + WAPackVMRole + + + + The New-WAPackVMRole cmdlet creates a virtual machine role. + + + + New-WAPackVMRole + + ResourceDefinition + + Specifies a resource definition for the virtual machine role. + + ResourceDefinition + + + Name + + Specifies a name for the virtual machine role. + + String + + + Label + + Specifies a label for the virtual machine role. + + String + + + CloudService + + Specifies a cloud service for the virtual machine role. + + CloudService + + + + + + ResourceDefinition + + Specifies a resource definition for the virtual machine role. + + ResourceDefinition + + ResourceDefinition + + + + + + + Name + + Specifies a name for the virtual machine role. + + String + + String + + + + + + + Label + + Specifies a label for the virtual machine role. + + String + + String + + + + + + + CloudService + + Specifies a cloud service for the virtual machine role. + + CloudService + + CloudService + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Create a virtual machine role (emulating WAP behavior) + + + + + + PS C:\>New-WAPackVMRole –Name “ContosoVMRole01” -Label "ContosoVMRoleLabel01" –ResourceDefinition $resdef + + + Since we do not specify any cloud service (emulating WAP behavior), the command will create a cloud service for us which will have the same name as the virtual machine role. In this case, the following command will create a virtual machine role with the name “ContosoVMRole01”, label “ContosoVMRoleLabel01”. Note that the resource definition being used here has to be manually created though PowerShell. + + + + + + + + + + + Get-WAPackVMRole + + + + Remove-WAPackVMRole + + + + Set-WAPackVMRole + + + + + + + Remove-WAPackStaticIPAddressPool + + Removes static ip address pool objects. + + + + + Remove + WAPackStaticIPAddressPool + + + + The Remove-WAPackStaticIPAddressPool cmdlet removes static ip address pool objects. + + + + Remove-WAPackStaticIPAddressPool + + StaticIPAddressPool + + Specifies a StaticIPAddressPool. To obtain a static ip address pool, use the Get-WAPackStaticIPAddressPool cmdlet. + + StaticIPAddressPool + + + PassThru + + Indicates that the cmdlet returns a Boolean value. If the operation succeeds, the cmdlet returns a value of $True. Otherwise, it returns a value of $False. By default, this cmdlet does not generate any output. + + + + Force + + Indicates that the cmdlet removes a virtual machine without prompting you for confirmation. + + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + + + + + Force + + Indicates that the cmdlet removes a virtual machine without prompting you for confirmation. + + SwitchParameter + + SwitchParameter + + + + + + + PassThru + + Indicates that the cmdlet returns a Boolean value. If the operation succeeds, the cmdlet returns a value of $True. Otherwise, it returns a value of $False. By default, this cmdlet does not generate any output. + + SwitchParameter + + SwitchParameter + + + + + + + StaticIPAddressPool + + Specifies a static ip address pool. To obtain a static ip address pool, use the Get-WAPackStaticIPAddressPool cmdlet. + + StaticIPAddressPool + + StaticIPAddressPool + + + + + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + SwitchParameter + + + false + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + SwitchParameter + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Remove a static ip address pool + + + + + + PS C:\>$StaticIPAddressPool = Get-WAPackStaticIPAddressPool -Name “ContosoStaticIPAddressPool01” + PS C:\>Remove-WAPackStaticIPAddressPool -StaticIPAddressPool $StaticIPAddressPool + + + The first command gets the static ip address pool named ContosoStaticIPAddressPool01 by using the Get-WAPackStaticIPAddressPool cmdlet, and then stores that object in the $StaticIPAddressPool variable. + The second command removes the static ip address pool stored in $StaticIPAddressPool. The command prompts you for confirmation. + + + + + + + + + Example 2: Remove a static ip address pool without confirmation + + + + + + PS C:\>$StaticIPAddressPool = Get-WAPackStaticIPAddressPool -Name "ContosoStaticIPAddressPool02" + PS C:\>Remove-WAPackStaticIPAddressPool -StaticIPAddressPool $StaticIPAddressPool -Force + + + The first command gets the static ip address pool named ContosoStaticIPAddressPool02 by using the Get- WAPackStaticIPAddressPool cmdlet, and then stores that object in the $ StaticIPAddressPool variable. + The second command removes the static ip address pool stored in $StaticIPAddressPool. This command includes the Force parameter. The command does not prompt you for confirmation. + + + + + + + + + + + Get-WAPackStaticIPAddressPool + + + + New-WAPackStaticIPAddressPool + + + + + + + Remove-WAPackVMSubnet + + Removes virtual machine subnet objects. + + + + + Remove + WAPackVMSubnet + + + + The Remove-WAPackVMSubnet cmdlet removes virtual machine subnet objects. + + + + Remove-WAPackVMSubnet + + VMSubnet + + Specifies a virtual machine subnet. To obtain a virtual machine subnet, use the Get-WAPackVMSubnet cmdlet. + + VMSubnet + + + PassThru + + Indicates that the cmdlet returns a Boolean value. If the operation succeeds, the cmdlet returns a value of $True. Otherwise, it returns a value of $False. By default, this cmdlet does not generate any output. + + + + Force + + Indicates that the cmdlet removes a virtual machine without prompting you for confirmation. + + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + + + + + Force + + Indicates that the cmdlet removes a virtual machine without prompting you for confirmation. + + SwitchParameter + + SwitchParameter + + + + + + + PassThru + + Indicates that the cmdlet returns a Boolean value. If the operation succeeds, the cmdlet returns a value of $True. Otherwise, it returns a value of $False. By default, this cmdlet does not generate any output. + + SwitchParameter + + SwitchParameter + + + + + + + VMSubnet + + Specifies a virtual machine subnet. To obtain a virtual machine subnet, use the Get-WAPackVMSubnet cmdlet. + + VMSubnet + + VMSubnet + + + + + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + SwitchParameter + + + false + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + SwitchParameter + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Remove a virtual machine subnet + + + + + + PS C:\>$VMSubnet = Get-WAPackVMSubnet -Name “ContosoVMSubnet01” + PS C:\>Remove-WAPackVMSubnet -VMSubnet $VMSubnet + + + The first command gets the virtual machine subnet named ContosoVMSubnet01 by using the Get-WAPackVMSubnet cmdlet, and then stores that object in the $VMSubnet variable. + The second command removes the virtual machine subnet stored in $VMSubnet. The command prompts you for confirmation. + + + + + + + + + Example 2: Remove a virtual machine without confirmation + + + + + + PS C:\>$VMSubnet = Get-WAPackVMSubnet -Name "ContosoVMSubnet02" + PS C:\>Remove-WAPackVMSubnet -VMSubnet $VMSubnet -Force + + + The first command gets the cloud service named ContosoVMSubnet02 by using the Get- WAPackVMSubnet cmdlet, and then stores that object in the $VMSubnet variable. + The second command removes the virtual machine subnet stored in $VMSubnet. This command includes the Force parameter. The command does not prompt you for confirmation. + + + + + + + + + + + Get-WAPackVMSubnet + + + + New-WAPackVMSubnet + + + + + + + Remove-WAPackVNet + + Removes virtualized network. + + + + + Remove + WAPackVNet + + + + The Remove-WAPackVNet cmdlet removes virtualized network objects. + + + + Remove-WAPackVNet + + VNet + + Specifies a virtualized network. To obtain a virtualized network, use the Get-WAPackVNet cmdlet. + + VNet + + + PassThru + + Indicates that the cmdlet returns a Boolean value. If the operation succeeds, the cmdlet returns a value of $True. Otherwise, it returns a value of $False. By default, this cmdlet does not generate any output. + + + + Force + + Indicates that the cmdlet removes a virtual machine without prompting you for confirmation. + + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + + + + + Force + + Indicates that the cmdlet removes a virtual machine without prompting you for confirmation. + + SwitchParameter + + SwitchParameter + + + + + + + PassThru + + Indicates that the cmdlet returns a Boolean value. If the operation succeeds, the cmdlet returns a value of $True. Otherwise, it returns a value of $False. By default, this cmdlet does not generate any output. + + SwitchParameter + + SwitchParameter + + + + + + + VNet + + Specifies a virtualized network. To obtain a virtualized network, use the Get-WAPackVNet cmdlet. + + VNet + + VNet + + + + + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + SwitchParameter + + + false + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + SwitchParameter + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Remove a virtualized network + + + + + + PS C:\>$VNet = Get-WAPackVNet -Name “ContosoVNet01” + PS C:\>Remove-WAPackVM -VNet $VNet + + + The first command gets the virtualized network named ContosoVNet01 by using the Get-WAPackVNet cmdlet, and then stores that object in the $VNet variable. + The second command removes the virtualized network stored in $VNet. The command prompts you for confirmation. + + + + + + + + + Example 2: Remove a virtualized network without confirmation + + + + + + PS C:\>$VNet = Get-WAPackVNet -Name "ContosoVNet02" + PS C:\>Remove-WAPackVNet -VNet $VNet -Force + + + The first command gets the cloud service named ContosoVNet02 by using the Get-WAPackVNet cmdlet, and then stores that object in the $VNet variable. + The second command removes the virtualized network stored in $VNet. This command includes the Force parameter. The command does not prompt you for confirmation. + + + + + + + + + + + Get-WAPackVNet + + + + New-WAPackVNet + + + + + + + Remove-WAPackCloudService + + Removes cloud service objects. + + + + + Remove + WAPackCloudService + + + + The Remove-WAPackCloudService cmdlet removes cloud service objects. + + + + Remove-WAPackCloudService + + CloudService + + Specifies a cloud service. To obtain a cloud service, use the Get-WAPackCloudService cmdlet. + + CloudService + + + PassThru + + Indicates that the cmdlet returns a Boolean value. If the operation succeeds, the cmdlet returns a value of $True. Otherwise, it returns a value of $False. By default, this cmdlet does not generate any output. + + + + Force + + Indicates that the cmdlet removes a virtual machine without prompting you for confirmation. + + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + + + + + Force + + Indicates that the cmdlet removes a virtual machine without prompting you for confirmation. + + SwitchParameter + + SwitchParameter + + + + + + + PassThru + + Indicates that the cmdlet returns a Boolean value. If the operation succeeds, the cmdlet returns a value of $True. Otherwise, it returns a value of $False. By default, this cmdlet does not generate any output. + + SwitchParameter + + SwitchParameter + + + + + + + CloudService + + Specifies a cloud service. To obtain a cloud service, use the Get-WAPackCloudService cmdlet. + + CloudService + + CloudService + + + + + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + SwitchParameter + + + false + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + SwitchParameter + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Remove a cloud service + + + + + + PS C:\>$CloudService = Get-WAPackCloudService -Name “ContosoCloudService01” + PS C:\>Remove-WAPackVM -VM $CloudService + + + The first command gets the cloud service named ContosoCloudService01 by using the Get-WAPackCloudService cmdlet, and then stores that object in the $CloudService variable. + The second command removes the cloudservice stored in $CloudService. The command prompts you for confirmation. + + + + + + + + + Example 2: Remove a cloud service without confirmation + + + + + + PS C:\>$CloudService = Get-WAPackCloudService -Name "ContosoCloudService02" + PS C:\>Remove-WAPackCloudService -VM $CloudService -Force + + + The first command gets the cloud service named ContosoCloudService02 by using the Get-WAPackCloudService cmdlet, and then stores that object in the $CloudService variable. + The second command removes the cloud service stored in $CloudService. This command includes the Force parameter. The command does not prompt you for confirmation. + + + + + + + + + + + Get-WAPackCloudService + + + + New-WAPackCloudService + + + + + + + Remove-WAPackVMRole + + Removes virtual machine role objects. + + + + + Remove + WAPackVMRole + + + + The Remove-WAPackVMRole cmdlet removes virtual machine role objects. + + + + Remove-WAPackVMRole + + VMRole + + Specifies a virtual machine role. To obtain a virtual machine role, use the Get-WAPackVMRole cmdlet. + + VMRole + + + PassThru + + Indicates that the cmdlet returns a Boolean value. If the operation succeeds, the cmdlet returns a value of $True. Otherwise, it returns a value of $False. By default, this cmdlet does not generate any output. + + + + Force + + Indicates that the cmdlet removes a virtual machine without prompting you for confirmation. + + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + + + + + Force + + Indicates that the cmdlet removes a virtual machine without prompting you for confirmation. + + SwitchParameter + + SwitchParameter + + + + + + + PassThru + + Indicates that the cmdlet returns a Boolean value. If the operation succeeds, the cmdlet returns a value of $True. Otherwise, it returns a value of $False. By default, this cmdlet does not generate any output. + + SwitchParameter + + SwitchParameter + + + + + + + VMRole + + Specifies a virtual machine role. To obtain a virtual machine role, use the Get-WAPackVMRole cmdlet. + + VMRole + + VMRole + + + + + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + SwitchParameter + + + false + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + SwitchParameter + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Remove a virtual machine role (which was created using the WAP portal) + + + + + + PS C:\>$VMRole = Get-WAPackVMRole -Name “ContosoVMRole01” + PS C:\>Remove-WAPackVMRole -VMRole $VMRole + + + The first command gets the virtual machine role named ContosoVMRole01 by using the Get-WAPackVMRole cmdlet, and then stores that object in the $VMRole variable. + The second command removes the virtual machine role stored in $VMRole. The command prompts you for confirmation. + Assuming this virtual machine role was created using the WAP portal, there’s no need to specify the cloud service name. + + + + + + + + + Example 2: Remove a virtual machine role which was created after manually creating a cloud service + + + + + + PS C:\>$VMRole = Get-WAPackVMRole -Name “ContosoVMRole02” + PS C:\>Remove-WAPackVMRole -VMRole $VMRole –CloudServiceName “ContosoCloudService02” + + + The first command gets the virtual machine role named "ContosoVMRole02" by using the Get-WAPackVMRole cmdlet, and then stores that object in the $VMRole variable. + The second command removes the virtual machine role stored in $VMRole. The command prompts you for confirmation. + Assuming this virtual machine role was not created using the portal, the user needs to specify the cloud service name. In this case named "ContosoCloudService02". + + + + + + + + + Example 3: Remove a virtual machine role without confirmation + + + + + + PS C:\>$VMRole = Get-WAPackVMRole -Name "ContosoVMRole03" + PS C:\>Remove-WAPackVMRole -VMRole $VMRole -Force + + + The first command gets the cloud service named ContosoVMRole03 by using the Get-WAPackVMRole cmdlet, and then stores that object in the $VMRole variable. + The second command removes the virtual machine role stored in $VMRole. This command includes the Force parameter. The command does not prompt you for confirmation. + + + + + + + + + + + Get-WAPackVMRole + + + + New-WAPackVMRole + + + + Set-WAPackVMRole + + + + + + + Set-WAPackVMRole + + Changes the instance count property of a virtual machine role. + + + + + Set + WAPackVMRole + + + + The Set-WAPackVMRole cmdlet changes the instance count property of a virtual machine role. + + + + Set-WAPackVMRole + + VMRole + + Specifies a virtual machine role. To obtain a virtual machine role, use the Get-WAPackVMRole cmdlet. + + VMRole + + + InstanceCount + + Specifies the instance count for a virtual machinerole. + + Int + + + + + + VMRole + + Specifies a virtual machine role. To obtain a virtual machine role, use the Get-WAPackVMRole cmdlet. + + VMRole + + VMRole + + + + + + + InstanceCount + + Specifies the instance count for a virtual machine role. + + Int + + InstanceCount + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Specify the instance count for a virtual machine role + + + + + + PS C:\>$VMRole = Get-WAPackVMRole -Name "ContosoVMRole01" + PS C:\>Set-WAPackVMRole -VMRole $VMRole -InstanceCount 3 + + + The first command gets the virtual machine role named ContosoVMRole01 by using the Get-WAPackVMRole cmdlet, and then stores that object in the $VMRole variable. + The second and final command sets the new instance count of the virtual machine role stored in $VMRole to 3. + + + + + + + + + + + Get-WAPackVMRole + + + + New-WAPackVMRole + + + + Remove-WAPackVMRole + + + + + + + Invoke-AzureHDInsightHiveJob + + Submits Hive queries to the HDInsight cluster, shows progress of the query execution, and retrieves query results in one operation. + + + + + Invoke + AzureHDInsightHiveJob + + + + Submits Hive queries to the HDInsight cluster, shows progress of the query execution, and retrieves query results in one operation. The Use-AzureHDInsightCluster cmdlet needs to be used before calling Invoke-Hive to specify which HDInsight cluster the query will be submitted to. + This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version. + + + + Invoke-AzureHDInsightHiveJob + + Query + + The Hive query to be executed. + + String + + + Arguments + + Arguments of the Hadoop job. The arguments will be passed as command line arguments to each task. + + String[] + + + Defines + + Hadoop configuration values to be set during the job execution. + + Hashtable + + + File + + The wasb path to a file in Azure Blob Storage that contains the query to be executed. Use this File parameter in place of a query parameter. + + String + + + Files + + A collection of files required for the Hive job to execute. + + String[] + + + JobName + + The name of the Hive job being defined. If the name is not specified, it is "Hive: <first 100 characters of Query>" by default. + + String + + + StatusFolder + + Location of the status folder where the standard and error outputs of the job will be stored, including its exit code and task logs. + + String + + + + + + Arguments + + Arguments of the Hadoop job. The arguments will be passed as command line arguments to each task. + + String[] + + String[] + + + + + + + Defines + + Hadoop configuration values to be set during the job execution. + + Hashtable + + Hashtable + + + + + + + File + + The wasb path to a file in Azure Blob Storage that contains the query to be executed. Use this File parameter in place of a query parameter. + + String + + String + + + + + + + Files + + A collection of files required for the Hive job to execute. + + String[] + + String[] + + + + + + + JobName + + The name of the Hive job being defined. If the name is not specified, it is "Hive: <first 100 characters of Query>" by default. + + String + + String + + + + + + + Query + + The Hive query to be executed. + + String + + String + + + + + + + StatusFolder + + Location of the status folder where the standard and error outputs of the job will be stored, including its exit code and task logs. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Submit a Hive query + + + + + + PS C:\>Use-AzureHDInsightCluster yourcluster -Subscription (Get-AzureSubscription -Current).SubscriptionId + Invoke-Hive "select * from hivesampletable limit 10" + + + + Submit a Hive queries to the HDInsight cluster. + + + + + + + + + + + Online Version: + + + + + + + + New-AzureHDInsightSqoopJobDefinition + + Defines a new Sqoop job. + + + + + New + AzureHDInsightSqoopJobDefinition + + + + Defines a Sqoop job to be run on an HDInsight cluster. + This topic describes the cmdlet in the .7.2 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version. + + + + New-AzureHDInsightSqoopJobDefinition + + Command + + + + Specifies a Sqoop command and its arguments. + + String + + + File + + The path to a script file that contains the commands to be executed. The script file must be located on wasb. + + String + + + Files + + The collection of files required for the execution of the job. Use wasb file references here. + + String[] + + + StatusFolder + + Location of the status folder where the standard and error outputs of the Sqoop job will be stored, including its exit code and task logs. + + String + + + + + + Command + + + + Specifies a Sqoop command and its arguments. + + String + + String + + + + + + + File + + The path to a script file that contains the commands to be executed. The script file must be located on wasb. + + String + + String + + + + + + + Files + + The collection of files required for the execution of the job. Use wasb file references here. + + String[] + + String[] + + + + + + + StatusFolder + + Location of the status folder where the standard and error outputs of the Sqoop job will be stored, including its exit code and task logs. + + String + + String + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Sqoop is a tool designed to transfer data between Hadoop clusters and relational databases. You can use Sqoop to import data from a SQL database into an Hadoop Distributed File System (HDFS), transform the data with Hadoop MapReduce, and then export the data from the HDFS back into the SQL database. + + + + + Import data + + + + + + PS C:\>$sqoopJobDef = New-AzureHDInsightSqoopJobDefinition -Command "import --connect jdbc:sqlserver://<SQLDatabaseServerName>.database.windows.net:1433;username=<SQLDatabasUsername>@<SQLDatabaseServerName>; password=<SQLDatabasePassword>; database=<SQLDatabaseDatabaseName> --table <TableName> --target-dir wasb://<ContainerName>@<WindowsAzureStorageAccountName>.blob.core.windows.net/<Path>" + + + + Define a Sqoop job that that imports??all the rows of a table from a Windows Azure SQL Database to an HDInsight cluster. + + + + + + + + + + + Online Version: + + + + + + + + Get-AzureAutomationAccount + + Gets Azure Automation accounts. + + + + + Get + AzureAutomationAccount + + + + The Get-AzureAutomationAccount cmdlet gets the Microsoft Azure Automation accounts for your subscription. An Automation account is a container for Automation resources that is isolated from the resources of other Automation accounts. Automation resources include runbooks, jobs, and assets. + + + + Get-AzureAutomationAccount + + Name + + Specifies the name of an Azure Automation account. + + String + + + Location + + Specifies an Azure location associated with Automation accounts. + + String + + + + + + Location + + Specifies an Azure location associated with Automation accounts. + + String + + String + + + none + + + Name + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Get an Automation account + + + + + + PS C:\>Get-AzureAutomationAccount -Name "Contoso17" + + + This command gets the Automation account named Contoso17. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397902 + + + + + + Get-AzureAutomationJob + + Gets one or more Azure Automation runbook jobs. + + + + + Get + AzureAutomationJob + + + + The Get-AzureAutomationJob cmdlet gets one or more runbook jobs in Microsoft Azure Automation. + + + + Get-AzureAutomationJob + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + EndTime + + Specifies the end time for a job as a DateTime object. This cmdlet gets jobs that have an end time at or before the value that this parameter specifies. To obtain a DateTime object, use the Get-Date cmdlet. For more information, type Get-Help Get-Date. + + DateTime + + + StartTime + + Specifies the start time of a job as a DateTime object. This cmdlet gets jobs that have a start time at or after the value that this parameter specifies. To obtain a DateTime object, use the Get-Date cmdlet. + + DateTime + + + + Get-AzureAutomationJob + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + Id + + Specifies the ID of a job. + + Guid + + + + Get-AzureAutomationJob + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + EndTime + + Specifies the end time for a job as a DateTime object. This cmdlet gets jobs that have an end time at or before the value that this parameter specifies. To obtain a DateTime object, use the Get-Date cmdlet. For more information, type Get-Help Get-Date. + + DateTime + + + StartTime + + Specifies the start time of a job as a DateTime object. This cmdlet gets jobs that have a start time at or after the value that this parameter specifies. To obtain a DateTime object, use the Get-Date cmdlet. + + DateTime + + + RunbookId + + Specifies the ID of a runbook. + + Guid + + + + Get-AzureAutomationJob + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + EndTime + + Specifies the end time for a job as a DateTime object. This cmdlet gets jobs that have an end time at or before the value that this parameter specifies. To obtain a DateTime object, use the Get-Date cmdlet. For more information, type Get-Help Get-Date. + + DateTime + + + StartTime + + Specifies the start time of a job as a DateTime object. This cmdlet gets jobs that have a start time at or after the value that this parameter specifies. To obtain a DateTime object, use the Get-Date cmdlet. + + DateTime + + + RunbookName + + Specifies the name of a runbook. + + String + + + + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + EndTime + + Specifies the end time for a job as a DateTime object. This cmdlet gets jobs that have an end time at or before the value that this parameter specifies. To obtain a DateTime object, use the Get-Date cmdlet. For more information, type Get-Help Get-Date. + + DateTime + + DateTime + + + none + + + Id + + Specifies the ID of a job. + + Guid + + Guid + + + none + + + RunbookId + + Specifies the ID of a runbook. + + Guid + + Guid + + + none + + + RunbookName + + Specifies the name of a runbook. + + String + + String + + + none + + + StartTime + + Specifies the start time of a job as a DateTime object. This cmdlet gets jobs that have a start time at or after the value that this parameter specifies. To obtain a DateTime object, use the Get-Date cmdlet. + + DateTime + + DateTime + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Get a runbook job + + + + + + PS C:\>Get-AzureAutomationJob -AutomationAccountName "Contoso17" -Id 2989b069-24fe-40b9-b3bd-cb7e5eac4b647 + + + This command gets the job that has the specified GUID. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397903 + + + Resume-AzureAutomationJob + + + + Stop-AzureAutomationJob + + + + Suspend-AzureAutomationJob + + + + + + + Get-AzureAutomationJobOutput + + Gets the output of an Azure Automation job. + + + + + Get + AzureAutomationJobOutput + + + + The Get-AzureAutomationJobOutput cmdlet gets the output of a Microsoft Azure Automation job. + + + + Get-AzureAutomationJobOutput + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + Id + + Specifies the ID of a job. + + Guid + + + StartTime + + Specifies a start time as a DateTime object. The cmdlet retrieves output created after this time. To obtain a DateTime object, use the Get-Date cmdlet. For more information, type Get-Help Get-Date. + + DateTime + + + Stream + + + Specifies the type of output. Valid values are: + + -- Any + -- Debug + -- Error + -- Output + -- Progress + -- Verbose + -- Warning + + + String + + + + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + Id + + Specifies the ID of a job. + + Guid + + Guid + + + none + + + StartTime + + Specifies a start time as a DateTime object. The cmdlet retrieves output created after this time. To obtain a DateTime object, use the Get-Date cmdlet. For more information, type Get-Help Get-Date. + + DateTime + + DateTime + + + none + + + Stream + + + Specifies the type of output. Valid values are: + + -- Any + -- Debug + -- Error + -- Output + -- Progress + -- Verbose + -- Warning + + + String + + String + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Get the output of an Azure Automation job + + + + + + PS C:\>Get-AzureAutomationJobOutput -AutomationAccountName "Contoso17" -Id 2989b069-24fe-40b9-b3bd-cb7e5eac4b64 -Stream "Any" + + + This command gets all of the output of the job that has the specified ID. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397904 + + + Get-AzureAutomationJob + + + + Resume-AzureAutomationJob + + + + Stop-AzureAutomationJob + + + + Suspend-AzureAutomationJob + + + + + + + Get-AzureAutomationRunbook + + Gets a runbook. + + + + + Get + AzureAutomationRunbook + + + + The Get-AzureAutomationRunbook cmdlet gets one or more Microsoft Azure Automation runbooks. By default, all runbooks are returned. To get a specific runbook, specify its name or ID. To get all runbooks linked to a specific schedule, specify the schedule name. + + + + Get-AzureAutomationRunbook + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + Get-AzureAutomationRunbook + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + Id + + Specifies the ID of a runbook. + + Guid + + + + Get-AzureAutomationRunbook + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + Name + + Specifies the name of a runbook. + + String + + + + Get-AzureAutomationRunbook + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + ScheduleName + + Specifies the name of a schedule. + + String + + + + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + Id + + Specifies the ID of a runbook. + + Guid + + Guid + + + none + + + Name + + Specifies the name of a runbook. + + String + + String + + + none + + + ScheduleName + + Specifies the name of a schedule. + + String + + String + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Get all runbooks + + + + + + PS C:\>Get-AzureAutomationRunbook -AutomationAccountName "Contoso17" + + + + This command gets all runbooks in the Azure Automation account named Contoso17. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397905 + + + New-AzureAutomationRunbook + + + + Publish-AzureAutomationRunbook + + + + Remove-AzureAutomationRunbook + + + + Set-AzureAutomationRunbook + + + + Start-AzureAutomationRunbook + + + + + + + Get-AzureAutomationRunbookDefinition + + Gets a runbook definition. + + + + + Get + AzureAutomationRunbookDefinition + + + + The Get-AzureAutomationRunbookDefinition cmdlet gets the draft definition, the published definition, or both definitions of an Azure Automation runbook. By default, both runbook definitions are returned. + + + + Get-AzureAutomationRunbookDefinition + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + Slot + + + Specifies a runbook definition type. Valid values are: + + -- Published + -- Draft + + + String + + + Name + + Specifies the name of a runbook. + + String + + + + Get-AzureAutomationRunbookDefinition + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + Slot + + + Specifies a runbook definition type. Valid values are: + + -- Published + -- Draft + + + String + + + Id + + Specifies the ID of a runbook. + + Guid + + + + Get-AzureAutomationRunbookDefinition + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + Slot + + + Specifies a runbook definition type. Valid values are: + + -- Published + -- Draft + + + String + + + VersionId + + Specifies the ID of a runbook version. + + Guid + + + + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + Id + + Specifies the ID of a runbook. + + Guid + + Guid + + + none + + + Name + + Specifies the name of a runbook. + + String + + String + + + none + + + Slot + + + Specifies a runbook definition type. Valid values are: + + -- Published + -- Draft + + + String + + String + + + none + + + VersionId + + Specifies the ID of a runbook version. + + Guid + + Guid + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Get a runbook definition + + + + + + PS C:\>Get-AzureAutomationRunbookDefinition -AutomationAccountName "Contoso17" -Name "RunbookDef01" -Slot "Published" + + + This command gets the published runbook definition of the runbook named RunbookDef01 in the Azure Automation account named Contoso17. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397906 + + + Set-AzureAutomationRunbookDefinition + + + + + + + Get-AzureAutomationSchedule + + Gets an Azure Automation schedule. + + + + + Get + AzureAutomationSchedule + + + + The Get-AzureAutomationSchedule cmdlet gets a Microsoft Azure Automation schedule. + + + + Get-AzureAutomationSchedule + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + + Get-AzureAutomationSchedule + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + Id + + Specifies the ID of a schedule. + + Guid + + + + Get-AzureAutomationSchedule + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + Name + + Specifies the name of a schedule. + + String + + + + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + Id + + Specifies the ID of a schedule. + + Guid + + Guid + + + none + + + Name + + Specifies the name of a schedule. + + String + + String + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Get a schedule + + + + + + PS C:\>Get-AzureAutomationSchedule -AutomationAccountName "Contoso17" -Name "DailySchedule08" + + + This command gets the schedule named DailySchedule08. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId= 397907 + + + New-AzureAutomationSchedule + + + + Remove-AzureAutomationSchedule + + + + Set-AzureAutomationSchedule + + + + + + + New-AzureAutomationRunbook + + Creates a new runbook. + + + + + New + AzureAutomationRunbook + + + + The New-AzureAutomationRunbook cmdlet creates a new, empty Microsoft Azure Automation runbook. Specify a name to create a new runbook. + You can also specify the path to a Windows PowerShell? script (.ps1 ) file to import a runbook. The script to import must contain a single Windows PowerShell? Workflow definition. The name of this Windows PowerShell Workflow becomes the name of the runbook. + + + + New-AzureAutomationRunbook + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + Description + + Specifies a description for the runbook. + + String + + + Tags + + Specifies one or more runbook tags. + + String[] + + + Name + + Specifies the name for the runbook. + + String + + + + New-AzureAutomationRunbook + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + Description + + Specifies a description for the runbook. + + String + + + Tags + + Specifies one or more runbook tags. + + String[] + + + Path + + Specifies the path to a runbook to import. + + String + + + + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + Description + + Specifies a description for the runbook. + + String + + String + + + none + + + Name + + Specifies the name for the runbook. + + String + + String + + + none + + + Path + + Specifies the path to a runbook to import. + + String + + String + + + none + + + Tags + + Specifies one or more runbook tags. + + String[] + + String[] + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Create a runbook + + + + + + PS C:\>New-AzureAutomationRunbook -AutomationAccountName "Contoso17" -Name "Runbook02" + + + This command creates a new runbook named Runbook02 in the Azure Automation account named Contoso17. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397908 + + + Get-AzureAutomationRunbook + + + + Publish-AzureAutomationRunbook + + + + Remove-AzureAutomationRunbook + + + + Set-AzureAutomationRunbook + + + + Start-AzureAutomationRunbook + + + + + + + New-AzureAutomationSchedule + + Creates an Azure Automation schedule. + + + + + New + AzureAutomationSchedule + + + + The New-AzureAutomationSchedule cmdlet creates a schedule in Microsoft Azure Automation. + + + + New-AzureAutomationSchedule + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + Name + + Specifies a name for the schedule. + + String + + + StartTime + + Specifies the start time of a schedule as a DateTime object. To obtain a DateTime object, use the Get-Date cmdlet. + + DateTime + + + Description + + Specifies a description. + + String + + + ExpiryTime + + Specifies the expiry time of a schedule as a DateTime object. To obtain a DateTime object, use the Get-Date cmdlet. For more information, type Get-Help Get-Date. + + DateTime + + + DayInterval + + Specifies an interval for the schedule in days. If you do not specify this parameter, and you do not specify the OneTime parameter, then the day interval of the schedule is 1. + + Int32 + + + + New-AzureAutomationSchedule + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + Name + + Specifies a name for the schedule. + + String + + + StartTime + + Specifies the start time of a schedule as a DateTime object. To obtain a DateTime object, use the Get-Date cmdlet. + + DateTime + + + Description + + Specifies a description. + + String + + + OneTime + + Specifies that the cmdlet creates a one-time schedule. + + + + + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + DayInterval + + Specifies an interval for the schedule in days. If you do not specify this parameter, and you do not specify the OneTime parameter, then the day interval of the schedule is 1. + + Int32 + + Int32 + + + none + + + Description + + Specifies a description. + + String + + String + + + none + + + ExpiryTime + + Specifies the expiry time of a schedule as a DateTime object. To obtain a DateTime object, use the Get-Date cmdlet. For more information, type Get-Help Get-Date. + + DateTime + + DateTime + + + none + + + Name + + Specifies a name for the schedule. + + String + + String + + + none + + + OneTime + + Specifies that the cmdlet creates a one-time schedule. + + SwitchParameter + + SwitchParameter + + + none + + + StartTime + + Specifies the start time of a schedule as a DateTime object. To obtain a DateTime object, use the Get-Date cmdlet. + + DateTime + + DateTime + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Create a schedule + + + + + + PS C:\>$StartDate = Get-Date -Day 12 -Month 6 -Year 2016 + PS C:\> $EndDate = Get-Date -Day 12 -Month 6 -Year 2023 + PS C:\> New-AzureAutomationSchedule -AutomationAccountName "Contoso17" -Name "Schedule01" -StartTime $StartDate -ExpiryTime $EndDate + + + The first command creates a date object by using the Get-Date cmdlet, and then stores the object in the $StartDate variable. Specify a time that is at least five minutes in the future. For more information, type Get-Help Get-Date. + The second command creates a date object by using the Get-Date cmdlet, and then stores the object in the $EndDate variable. The command specifies a future time. + The final command creates a daily schedule named Schedule01 to begin at the time stored in $StartDate and expire at the time stored in $EndDate. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397909 + + + Get-AzureAutomationSchedule + + + + Remove-AzureAutomationSchedule + + + + Set-AzureAutomationSchedule + + + + + + + Publish-AzureAutomationRunbook + + Publishes a runbook. + + + + + Publish + AzureAutomationRunbook + + + + The Publish-AzureAutomationRunbook cmdlet publishes a runbook for use in the production environment of Microsoft Azure Automation. + + + + Publish-AzureAutomationRunbook + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + Name + + Specifies the name of a runbook. + + String + + + + Publish-AzureAutomationRunbook + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + Id + + Specifies the ID of a runbook. + + Guid + + + + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + Id + + Specifies the ID of a runbook. + + Guid + + Guid + + + none + + + Name + + Specifies the name of a runbook. + + String + + String + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Publish a runbook + + + + + + PS C:\>Publish-AzureAutomationRunbook -AutomationAccountName "Contoso17" -Name "Runbk01" + + + This command publishes the runbook named Runbk01 in the Azure Automation account named Contoso17. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397910 + + + Get-AzureAutomationRunbook + + + + New-AzureAutomationRunbook + + + + Remove-AzureAutomationRunbook + + + + Set-AzureAutomationRunbook + + + + Start-AzureAutomationRunbook + + + + + + + Register-AzureAutomationScheduledRunbook + + Associates a runbook with a schedule. + + + + + Register + AzureAutomationScheduledRunbook + + + + The Register-AzureAutomationScheduleRunbook cmdlet associates a runbook with a schedule. The runbook starts based on the schedule you specify using the ScheduleName parameter. + + + + Register-AzureAutomationScheduledRunbook + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + Parameters + + Specifies a hash table of key/value pairs. The keys in the hash table are the runbook parameter names. The values in the hash table are the runbook parameter values. When the runbook starts in response to when the associated schedule fires, these parameters are passed to the runbook. + + IDictionary + + + Name + + Specifies the name of a runbook. + + String + + + ScheduleName + + Specifies the name of a schedule. To create a schedule in Azure Automation, use the New-AzureAutomationSchedule cmdlet. + + String + + + + Register-AzureAutomationScheduledRunbook + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + Parameters + + Specifies a hash table of key/value pairs. The keys in the hash table are the runbook parameter names. The values in the hash table are the runbook parameter values. When the runbook starts in response to when the associated schedule fires, these parameters are passed to the runbook. + + IDictionary + + + Id + + Specifies the ID of a runbook. + + Guid + + + ScheduleName + + Specifies the name of a schedule. To create a schedule in Azure Automation, use the New-AzureAutomationSchedule cmdlet. + + String + + + + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + Id + + Specifies the ID of a runbook. + + Guid + + Guid + + + none + + + Name + + Specifies the name of a runbook. + + String + + String + + + none + + + Parameters + + Specifies a hash table of key/value pairs. The keys in the hash table are the runbook parameter names. The values in the hash table are the runbook parameter values. When the runbook starts in response to when the associated schedule fires, these parameters are passed to the runbook. + + IDictionary + + IDictionary + + + none + + + ScheduleName + + Specifies the name of a schedule. To create a schedule in Azure Automation, use the New-AzureAutomationSchedule cmdlet. + + String + + String + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Associate a runbook with a schedule + + + + + + PS C:\>Register-AzureAutomationScheduledRunbook -AutomationAccountName "Contoso17" -Name "Runbk01" -ScheduleName "Sched01" + + + This command associates the runbook named Runbk01 with the schedule named Sched01 in the Azure Automation account named Contoso17. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397911 + + + New-AzureAutomationSchedule + + + + Unregister-AzureAutomationScheduledRunbook + + + + + + + Remove-AzureAutomationRunbook + + Removes a runbook. + + + + + Remove + AzureAutomationRunbook + + + + The Remove-AzureAutomationRunbook cmdlet removes a runbook from Microsoft Azure Automation. + + + + Remove-AzureAutomationRunbook + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + Force + + Forces the command to run without asking for user confirmation. + + + + Name + + Specifies the name of a runbook. + + String + + + Confirm + + Prompts you for confirmation before running the cmdlet.Prompts you for confirmation before running the cmdlet. + + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + + + Remove-AzureAutomationRunbook + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + Force + + Forces the command to run without asking for user confirmation. + + + + Id + + Specifies the ID of a runbook. + + Guid + + + Confirm + + Prompts you for confirmation before running the cmdlet.Prompts you for confirmation before running the cmdlet. + + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + + + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + Force + + Forces the command to run without asking for user confirmation. + + SwitchParameter + + SwitchParameter + + + none + + + Id + + Specifies the ID of a runbook. + + Guid + + Guid + + + none + + + Name + + Specifies the name of a runbook. + + String + + String + + + none + + + Confirm + + Prompts you for confirmation before running the cmdlet.Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + SwitchParameter + + + false + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + SwitchParameter + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Remove a runbook + + + + + + PS C:\>Remove-AzureAutomationRunbook -AutomationAccountName "Contoso17" -Name "MyRunbook" + + + This command removes the runbook named MyRunbook in the Azure Automation account named Contoso17. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397912 + + + Get-AzureAutomationRunbook + + + + New-AzureAutomationRunbook + + + + Publish-AzureAutomationRunbook + + + + Set-AzureAutomationRunbook + + + + Start-AzureAutomationRunbook + + + + + + + Remove-AzureAutomationSchedule + + Deletes an Azure Automation schedule. + + + + + Remove + AzureAutomationSchedule + + + + The Remove-AzureAutomationSchedule cmdlet deletes a schedule from Microsoft Azure Automation. + + + + Remove-AzureAutomationSchedule + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + Name + + Specifies the name of a schedule. + + String + + + Force + + Forces the command to run without asking for user confirmation. + + + + Confirm + + Prompts you for confirmation before running the cmdlet.Prompts you for confirmation before running the cmdlet. + + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + + + Remove-AzureAutomationSchedule + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + Id + + Specifies the ID of a schedule. + + Guid + + + Force + + Forces the command to run without asking for user confirmation. + + + + Confirm + + Prompts you for confirmation before running the cmdlet.Prompts you for confirmation before running the cmdlet. + + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + + + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + Force + + Forces the command to run without asking for user confirmation. + + SwitchParameter + + SwitchParameter + + + none + + + Id + + Specifies the ID of a schedule. + + Guid + + Guid + + + none + + + Name + + Specifies the name of a schedule. + + String + + String + + + none + + + Confirm + + Prompts you for confirmation before running the cmdlet.Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + SwitchParameter + + + false + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + SwitchParameter + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Remove a schedule + + + + + + PS C:\>Remove-AzureAutomationSchedule -AutomationAccountName "Contoso17" -Name "MySchedule" + + + This command removes the schedule named MySchedule. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397913 + + + Get-AzureAutomationSchedule + + + + New-AzureAutomationSchedule + + + + Set-AzureAutomationSchedule + + + + + + + Resume-AzureAutomationJob + + Resumes a suspended Azure Automation job. + + + + + Resume + AzureAutomationJob + + + + The Resume-AzureAutomationJob cmdlet resumes a suspended Microsoft Azure Automation job. Specify the suspended job. + To suspend a job, use the Suspend-AzureAutomationJob cmdlet. + + + + Resume-AzureAutomationJob + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + Id + + Specifies the ID of a job. + + Guid + + + + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + Id + + Specifies the ID of a job. + + Guid + + Guid + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Resume a suspended job + + + + + + PS C:\>Resume-AzureAutomationJob -AutomationAccountName "Contoso17" -Id 2989b069-24fe-40b9-b3bd-cb7e5eac4b64 + + + This command resumes the job that has the specified ID. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397914 + + + Get-AzureAutomationJob + + + + Stop-AzureAutomationJob + + + + Suspend-AzureAutomationJob + + + + + + + Set-AzureAutomationRunbook + + Modifies the configuration of a runbook. + + + + + Set + AzureAutomationRunbook + + + + The Set-AzureAutomationRunbook cmdlet modifies the configuration of a Microsoft Azure Automation runbook. + + + + Set-AzureAutomationRunbook + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + Description + + Specifies a description for the runbook. + + String + + + LogDebug + + Indicates whether debug output is logged for jobs of this runbook. + + Boolean + + + LogProgress + + Indicates whether progress output is logged for jobs of this runbook. + + Boolean + + + LogVerbose + + Indicates whether verbose output is logged for jobs of this runbook. + + Boolean + + + Tags + + Specifies one or more runbook tags. + + String[] + + + Name + + Specifies the name of a runbook. + + String + + + + Set-AzureAutomationRunbook + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + Description + + Specifies a description for the runbook. + + String + + + LogDebug + + Indicates whether debug output is logged for jobs of this runbook. + + Boolean + + + LogProgress + + Indicates whether progress output is logged for jobs of this runbook. + + Boolean + + + LogVerbose + + Indicates whether verbose output is logged for jobs of this runbook. + + Boolean + + + Tags + + Specifies one or more runbook tags. + + String[] + + + Id + + Specifies the ID of a runbook. + + Guid + + + + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + Description + + Specifies a description for the runbook. + + String + + String + + + none + + + Id + + Specifies the ID of a runbook. + + Guid + + Guid + + + none + + + LogDebug + + Indicates whether debug output is logged for jobs of this runbook. + + Boolean + + Boolean + + + none + + + LogProgress + + Indicates whether progress output is logged for jobs of this runbook. + + Boolean + + Boolean + + + none + + + LogVerbose + + Indicates whether verbose output is logged for jobs of this runbook. + + Boolean + + Boolean + + + none + + + Name + + Specifies the name of a runbook. + + String + + String + + + none + + + Tags + + Specifies one or more runbook tags. + + String[] + + String[] + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Enable verbose logging for a runbook + + + + + + PS C:\>Set-AzureAutomationRunbook -AutomationAccountName "Contoso17" -Name "MyRunbook" -LogVerbose $True + + + This command enables verbose logging for the jobs of the specified runbook in the Azure Automation account named Contoso17. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397915 + + + Get-AzureAutomationRunbook + + + + New-AzureAutomationRunbook + + + + Publish-AzureAutomationRunbook + + + + Remove-AzureAutomationRunbook + + + + Start-AzureAutomationRunbook + + + + + + + Set-AzureAutomationRunbookDefinition + + Updates the draft definition of a runbook. + + + + + Set + AzureAutomationRunbookDefinition + + + + The Set-AzureAutomationRunbookDefinition cmdlet updates the draft definition of a Microsoft Azure Automation runbook. Provide a Windows PowerShell? script (.ps1) file that contains a runbook which becomes the draft runbook. If a draft already exists, use the Overwrite parameter to force the cmdlet to overwrite the existing draft. + + + + Set-AzureAutomationRunbookDefinition + + AutomationAccountName + + Specifies the name of an automation account. + + String + + + Overwrite + + Indicates that the new draft runbook overwrites the existing draft, if one exists. + + + + Name + + Specifies the name of a runbook. + + String + + + Path + + Specifies the path to the new draft runbook. + + String + + + + Set-AzureAutomationRunbookDefinition + + AutomationAccountName + + Specifies the name of an automation account. + + String + + + Overwrite + + Indicates that the new draft runbook overwrites the existing draft, if one exists. + + + + Id + + Specifies the ID of a runbook. + + Guid + + + Path + + Specifies the path to the new draft runbook. + + String + + + + + + AutomationAccountName + + Specifies the name of an automation account. + + String + + String + + + none + + + Id + + Specifies the ID of a runbook. + + Guid + + Guid + + + none + + + Name + + Specifies the name of a runbook. + + String + + String + + + none + + + Overwrite + + Indicates that the new draft runbook overwrites the existing draft, if one exists. + + SwitchParameter + + SwitchParameter + + + none + + + Path + + Specifies the path to the new draft runbook. + + String + + String + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Overwrite an existing draft definition of a runbook + + + + + + PS C:\>Set-AzureAutomationRunbookDefinition -AutomationAccountName "Contoso17" -Name "Runbk01" -Path App01.ps1 -Overwrite + + + This command overwrites the existing draft definition of a runbook. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397916 + + + Get-AzureAutomationRunbookDefinition + + + + + + + Set-AzureAutomationSchedule + + Modifies an Azure Automation schedule. + + + + + Set + AzureAutomationSchedule + + + + The Set-AzureAutomationSchedule cmdlet modifies a schedule in Microsoft Azure Automation. + + + + Set-AzureAutomationSchedule + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + Name + + Specifies the name of a schedule. + + String + + + Description + + Specifies a description. + + String + + + + Set-AzureAutomationSchedule + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + Id + + Specifies the ID of a schedule. + + Guid + + + Description + + Specifies a description. + + String + + + + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + Description + + Specifies a description. + + String + + String + + + none + + + Id + + Specifies the ID of a schedule. + + Guid + + Guid + + + none + + + Name + + Specifies the name of a schedule. + + String + + String + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Modify a schedule + + + + + + PS C:\>Set-AzureAutomationSchedule -AutomationAccountName "Contoso17" -Name "Schedule01" -Description "Automation Schedule" + + + This command modifies the description of the schedule named Schedule01. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397917 + + + Get-AzureAutomationSchedule + + + + New-AzureAutomationSchedule + + + + Remove-AzureAutomationSchedule + + + + + + + Start-AzureAutomationRunbook + + Starts a runbook job. + + + + + Start + AzureAutomationRunbook + + + + The Start-AzureAutomationRunbook cmdlet starts a Microsoft Azure Automation runbook job. Specify the ID or name of a runbook. + + + + Start-AzureAutomationRunbook + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + Parameters + + Specifies a hash table of key/value pairs. The keys in the hash table are the runbook parameter names. The values in the hash table are the runbook parameter values. + + IDictionary + + + Name + + Specifies the name of a runbook. + + String + + + + Start-AzureAutomationRunbook + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + Parameters + + Specifies a hash table of key/value pairs. The keys in the hash table are the runbook parameter names. The values in the hash table are the runbook parameter values. + + IDictionary + + + Id + + Specifies the ID of a runbook. + + Guid + + + + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + Id + + Specifies the ID of a runbook. + + Guid + + Guid + + + none + + + Name + + Specifies the name of a runbook. + + String + + String + + + none + + + Parameters + + Specifies a hash table of key/value pairs. The keys in the hash table are the runbook parameter names. The values in the hash table are the runbook parameter values. + + IDictionary + + IDictionary + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Start a runbook job + + + + + + PS C:\>Start-AzureAutomationRunbook -AutomationAccountName "Contoso17" -Name "Runbk01" + + + This command starts a runbook job for the runbook named Runbk01 in the Azure Automation account named Contoso17. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397918 + + + Get-AzureAutomationRunbook + + + + New-AzureAutomationRunbook + + + + Publish-AzureAutomationRunbook + + + + Remove-AzureAutomationRunbook + + + + Set-AzureAutomationRunbook + + + + + + + Stop-AzureAutomationJob + + Stops an Azure Automation job. + + + + + Stop + AzureAutomationJob + + + + The Stop-AzureAutomationJob cmdlet stops a Microsoft Azure Automation job. Specify a running automation job. + + + + Stop-AzureAutomationJob + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + Id + + Specifies the ID of a job. + + Guid + + + + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + Id + + Specifies the ID of a job. + + Guid + + Guid + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Stop a job + + + + + + PS C:\>Stop-AzureAutomationJob -AutomationAccountName "Contoso17" -Id 2989b069-24fe-40b9-b3bd-cb7e5eac4b64 + + + This command stops the job that has the specified ID. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397919 + + + Get-AzureAutomationJob + + + + Resume-AzureAutomationJob + + + + Suspend-AzureAutomationJob + + + + + + + Suspend-AzureAutomationJob + + Suspends an Azure Automation job. + + + + + Suspend + AzureAutomationJob + + + + The Suspend-AzureAutomationJob cmdlet suspends a Microsoft Azure Automation job. Specify a running Automation job. + To resume a suspended job, use the Resume-AzureAutomationJob cmdlet. + + + + Suspend-AzureAutomationJob + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + Id + + Specifies the ID of a job. + + Guid + + + + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + Id + + Specifies the ID of a job. + + Guid + + Guid + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Suspend a job + + + + + + PS C:\>Suspend-AzureAutomationJob -AutomationAccountName "Contoso17" -Id 2989b069-24fe-40b9-b3bd-cb7e5eac4b64 + + + This command suspends the job that has the specified ID. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397920 + + + Get-AzureAutomationJob + + + + Resume-AzureAutomationJob + + + + Stop-AzureAutomationJob + + + + + + + Unregister-AzureAutomationScheduledRunbook + + Removes an association between a runbook and a schedule. + + + + + Unregister + AzureAutomationScheduledRunbook + + + + The Unregister-AzureAutomationScheduledRunbook cmdlet removes the association between a Microsoft Azure Automation runbook and a schedule, which stops the runbook from starting when the schedule fires. + + + + Unregister-AzureAutomationScheduledRunbook + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + Name + + Specifies the name of a runbook. + + String + + + ScheduleName + + Specifies the name of a schedule. + + String + + + + Unregister-AzureAutomationScheduledRunbook + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + + Id + + Specifies the ID of a runbook. + + Guid + + + ScheduleName + + Specifies the name of a schedule. + + String + + + + + + AutomationAccountName + + Specifies the name of an Azure Automation account. + + String + + String + + + none + + + Id + + Specifies the ID of a runbook. + + Guid + + Guid + + + none + + + Name + + Specifies the name of a runbook. + + String + + String + + + none + + + ScheduleName + + Specifies the name of a schedule. + + String + + String + + + none + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example 1: Remove the association between a runbook and a schedule + + + + + + PS C:\>Unregister-AzureAutomationScheduledRunbook -AutomationAccountName "Contoso17" -Name "Runbk01" -ScheduleName "Runbk01Sched" + + + This command removes the association between the runbook named Runbk01 and the schedule named Runbk01Sched. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkId=397921 + + + Register-AzureAutomationScheduledRunbook + + + + + diff --git a/src/ServiceManagement/Services/Commands.Utilities/PostBuild.ps1 b/src/ServiceManagement/Services/Commands.Utilities/PostBuild.ps1 new file mode 100644 index 000000000000..e296f4f9fc43 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/PostBuild.ps1 @@ -0,0 +1,25 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +$sourceDir = $args[0] +Write-Output $sourceDir + +$sourcePath = $sourceDir + "Azure.psd1" +$destDir = $(Split-Path $sourceDir) + +Write-Output "Copying '$sourcePath' to directory '$destDir'" +Copy-Item $sourcePath $destDir + +Write-Output "Removing $sourcePath" +Remove-Item $sourcePath -Force \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Properties/AssemblyInfo.cs b/src/ServiceManagement/Services/Commands.Utilities/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..0d4debc734e4 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Properties/AssemblyInfo.cs @@ -0,0 +1,54 @@ +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft Azure Powershell")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("a0e441e8-4052-4d03-8386-6328ae2909eb")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] +[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] +#if SIGN +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.Profile, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.Test.Utilities, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.HDInsight.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.ScenarioTest, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.WAPackIaaS.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.WAPackIaaS.FunctionalTest, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +#else +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.Profile")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.Test.Utilities")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.Test")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.HDInsight.Test")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.ScenarioTest")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.WAPackIaaS.Test")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.WAPackIaaS.FunctionalTest")] +#endif + +[assembly: CLSCompliant(false)] diff --git a/src/ServiceManagement/Services/Commands.Utilities/Properties/Resources.Designer.cs b/src/ServiceManagement/Services/Commands.Utilities/Properties/Resources.Designer.cs new file mode 100644 index 000000000000..95d14b36cc62 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Properties/Resources.Designer.cs @@ -0,0 +1,4354 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.WindowsAzure.Commands.Utilities.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.WindowsAzure.Commands.Utilities.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to The remote server returned an error: (401) Unauthorized.. + /// + public static string AccessDeniedExceptionMessage { + get { + return ResourceManager.GetString("AccessDeniedExceptionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account "{0}" has been added.. + /// + public static string AddAccountAdded { + get { + return ResourceManager.GetString("AddAccountAdded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to To switch to a different subscription, please use Select-AzureSubscription.. + /// + public static string AddAccountChangeSubscription { + get { + return ResourceManager.GetString("AddAccountChangeSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Subscription "{0}" is selected as the default subscription.. + /// + public static string AddAccountShowDefaultSubscription { + get { + return ResourceManager.GetString("AddAccountShowDefaultSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to To view all the subscriptions, please use Get-AzureSubscription.. + /// + public static string AddAccountViewSubscriptions { + get { + return ResourceManager.GetString("AddAccountViewSubscriptions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-On {0} is created successfully.. + /// + public static string AddOnCreatedMessage { + get { + return ResourceManager.GetString("AddOnCreatedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-on name {0} is already used.. + /// + public static string AddOnNameAlreadyUsed { + get { + return ResourceManager.GetString("AddOnNameAlreadyUsed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-On {0} not found.. + /// + public static string AddOnNotFound { + get { + return ResourceManager.GetString("AddOnNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-on {0} is removed successfully.. + /// + public static string AddOnRemovedMessage { + get { + return ResourceManager.GetString("AddOnRemovedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-On {0} is updated successfully.. + /// + public static string AddOnUpdatedMessage { + get { + return ResourceManager.GetString("AddOnUpdatedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to http://www.windowsazure.com/en-us/store/service/?id={0}. + /// + public static string AddOnUrl { + get { + return ResourceManager.GetString("AddOnUrl", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role has been created at {0}\{1}.. + /// + public static string AddRoleMessageCreate { + get { + return ResourceManager.GetString("AddRoleMessageCreate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for Node.js by running ‘npm install azure’.. + /// + public static string AddRoleMessageCreateNode { + get { + return ResourceManager.GetString("AddRoleMessageCreateNode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for PHP by running "pear WindowsAzure/WindowsAzure".. + /// + public static string AddRoleMessageCreatePHP { + get { + return ResourceManager.GetString("AddRoleMessageCreatePHP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for Python by running "pip windowsazure".. + /// + public static string AddRoleMessageCreatePython { + get { + return ResourceManager.GetString("AddRoleMessageCreatePython", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to set role permissions. Please give the 'Network Service' user 'Read & execute' and 'Modify' permissions to the role folder, or run PowerShell as an Administrator. + /// + public static string AddRoleMessageInsufficientPermissions { + get { + return ResourceManager.GetString("AddRoleMessageInsufficientPermissions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A role name '{0}' already exists. + /// + public static string AddRoleMessageRoleExists { + get { + return ResourceManager.GetString("AddRoleMessageRoleExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please provide webspace name as well.. + /// + public static string Argument_WebSpaceMissing { + get { + return ResourceManager.GetString("Argument_WebSpaceMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Windows Azure Powershell\. + /// + public static string AzureDirectory { + get { + return ResourceManager.GetString("AzureDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Windows Azure Powershell. + /// + public static string AzureDirectoryName { + get { + return ResourceManager.GetString("AzureDirectoryName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Emulator. + /// + public static string AzureEmulatorDirectory { + get { + return ResourceManager.GetString("AzureEmulatorDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure Emulator is not installed and is required. + /// + public static string AzureEmulatorNotInstalledMessage { + get { + return ResourceManager.GetString("AzureEmulatorNotInstalledMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You must run PowerShell from an elevated PowerShell window to use the Azure Emulator. Please restart your PowerShell window as an administrator.. + /// + public static string AzureEmulatorNotRunningElevetaed { + get { + return ResourceManager.GetString("AzureEmulatorNotRunningElevetaed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure Emulator\emulator. + /// + public static string AzureEmulatorPathPortion { + get { + return ResourceManager.GetString("AzureEmulatorPathPortion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SOFTWARE\Microsoft\Windows Azure Emulator. + /// + public static string AzureEmulatorRegistryKey { + get { + return ResourceManager.GetString("AzureEmulatorRegistryKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure service management error + ///{0}. + /// + public static string AzureException_WrapExistingError_DetailedErrorFormat { + get { + return ResourceManager.GetString("AzureException_WrapExistingError_DetailedErrorFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to https://manage.windowsazure.com. + /// + public static string AzurePortalUrl { + get { + return ResourceManager.GetString("AzurePortalUrl", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AZURE_PORTAL_URL. + /// + public static string AzurePortalUrlEnv { + get { + return ResourceManager.GetString("AzurePortalUrlEnv", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure SDK\{0}\. + /// + public static string AzureSdkDirectory { + get { + return ResourceManager.GetString("AzureSdkDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure SDK Deployment Cmdlets. + /// + public static string AzureSdkDirectoryName { + get { + return ResourceManager.GetString("AzureSdkDirectoryName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to InstallPath. + /// + public static string AzureSdkInstallPathRegistryKeyValue { + get { + return ResourceManager.GetString("AzureSdkInstallPathRegistryKeyValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SOFTWARE\Microsoft\Microsoft SDKs\ServiceHosting. + /// + public static string AzureSdkRegistryKeyName { + get { + return ResourceManager.GetString("AzureSdkRegistryKeyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The installed Azure SDK version is not supported. Make sure you version is between {0} and {1} inclusive. + /// + public static string AzureSdkVersionNotSupported { + get { + return ResourceManager.GetString("AzureSdkVersionNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure Authoring Tools are not installed and are required. + /// + public static string AzureToolsNotInstalledMessage { + get { + return ResourceManager.GetString("AzureToolsNotInstalledMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Base Uri was empty.. + /// + public static string BaseUriEmpty { + get { + return ResourceManager.GetString("BaseUriEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} begin processing without ParameterSet.. + /// + public static string BeginProcessingWithoutParameterSetLog { + get { + return ResourceManager.GetString("BeginProcessingWithoutParameterSetLog", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} begin processing with ParameterSet '{1}'.. + /// + public static string BeginProcessingWithParameterSetLog { + get { + return ResourceManager.GetString("BeginProcessingWithParameterSetLog", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Blob with the name {0} already exists in the account.. + /// + public static string BlobAlreadyExistsInTheAccount { + get { + return ResourceManager.GetString("BlobAlreadyExistsInTheAccount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to https://{0}.blob.core.windows.net/. + /// + public static string BlobEndpointUri { + get { + return ResourceManager.GetString("BlobEndpointUri", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AZURE_BLOBSTORAGE_TEMPLATE. + /// + public static string BlobEndpointUriEnv { + get { + return ResourceManager.GetString("BlobEndpointUriEnv", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Memcache is already enabled for role '{0}'.. + /// + public static string CacheAlreadyEnabledMessage { + get { + return ResourceManager.GetString("CacheAlreadyEnabledMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <configuration> + /// <configSections> + /// <section name="dataCacheClients" type="Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core" allowLocation="true" allowDefinition="Everywhere" /> + /// </configSections> + /// <dataCacheClients> + /// <tracing sinkType="DiagnosticSink" traceLevel="Error" /> + /// <dataCacheClient name="DefaultShimConfig" useLegacyProtocol="false"> + /// <autoDiscover isEnabled="true" identifier="$RoleName$" /> + /// </dataCacheClient> + /// </da [rest of string was truncated]";. + /// + public static string CacheAutoDiscoveryConfig { + get { + return ResourceManager.GetString("CacheAutoDiscoveryConfig", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Plugins.Caching.ClientDiagnosticLevel. + /// + public static string CacheClientDiagnosticLevelAssemblyName { + get { + return ResourceManager.GetString("CacheClientDiagnosticLevelAssemblyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to DiagnosticStore. + /// + public static string CacheDiagnosticStoreName { + get { + return ResourceManager.GetString("CacheDiagnosticStoreName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please upgrade the cache runtime of role '{0}' to '{1}' using Set-AzureServiceProjectRole -RoleName {0} -Runtime Cache -Version {1}. + /// + public static string CacheMismatchMessage { + get { + return ResourceManager.GetString("CacheMismatchMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to CACHERUNTIMEURL. + /// + public static string CacheRuntimeUrl { + get { + return ResourceManager.GetString("CacheRuntimeUrl", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to cache. + /// + public static string CacheRuntimeValue { + get { + return ResourceManager.GetString("CacheRuntimeValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to CacheRuntimeVersion. + /// + public static string CacheRuntimeVersionKey { + get { + return ResourceManager.GetString("CacheRuntimeVersionKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resources\Scaffolding\Cache. + /// + public static string CacheScaffolding { + get { + return ResourceManager.GetString("CacheScaffolding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to setup_cache.cmd > cache_log.txt. + /// + public static string CacheStartupCommand { + get { + return ResourceManager.GetString("CacheStartupCommand", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installing caching version {0} for Role '{1}' (the caching version locally installed is: {2}). + /// + public static string CacheVersionWarningText { + get { + return ResourceManager.GetString("CacheVersionWarningText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Plugins.Caching.CacheSizePercentage. + /// + public static string CachingCacheSizePercentageSettingName { + get { + return ResourceManager.GetString("CachingCacheSizePercentageSettingName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Plugins.Caching.ConfigStoreConnectionString. + /// + public static string CachingConfigStoreConnectionStringSettingName { + get { + return ResourceManager.GetString("CachingConfigStoreConnectionStringSettingName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to DefaultEndpointsProtocol=https;AccountName={0};AccountKey={1}. + /// + public static string CachingConfigStoreConnectionStringSettingValue { + get { + return ResourceManager.GetString("CachingConfigStoreConnectionStringSettingValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Caching. + /// + public static string CachingModuleName { + get { + return ResourceManager.GetString("CachingModuleName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find {0} with name {1}.. + /// + public static string CannotFind { + get { + return ResourceManager.GetString("CannotFind", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deployment for service {0} with {1} slot doesn't exist. + /// + public static string CannotFindDeployment { + get { + return ResourceManager.GetString("CannotFindDeployment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Can't find valid Microsoft Azure role in current directory {0}. + /// + public static string CannotFindRole { + get { + return ResourceManager.GetString("CannotFindRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service {0} configuration file (ServiceConfiguration.Cloud.cscfg) is either null or doesn't exist. + /// + public static string CannotFindServiceConfigurationFile { + get { + return ResourceManager.GetString("CannotFindServiceConfigurationFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid service path! Cannot locate ServiceDefinition.csdef in current folder or parent folders.. + /// + public static string CannotFindServiceRoot { + get { + return ResourceManager.GetString("CannotFindServiceRoot", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription named {0} with id {1} is not currently imported. You must import this subscription before it can be updated.. + /// + public static string CannotUpdateUnknownSubscription { + get { + return ResourceManager.GetString("CannotUpdateUnknownSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ManagementCertificate. + /// + public static string CertificateElementName { + get { + return ResourceManager.GetString("CertificateElementName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to certificate.pfx. + /// + public static string CertificateFileName { + get { + return ResourceManager.GetString("CertificateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Certificate imported into CurrentUser\My\{0}. + /// + public static string CertificateImportedMessage { + get { + return ResourceManager.GetString("CertificateImportedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No certificate was found in the certificate store with thumbprint {0}. + /// + public static string CertificateNotFoundInStore { + get { + return ResourceManager.GetString("CertificateNotFoundInStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No certificate was found in the certificate store with thumbprint {0}. + /// + public static string CertificateNotFoundInStore1 { + get { + return ResourceManager.GetString("CertificateNotFoundInStore1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Your account does not have access to the private key for certificate {0}. + /// + public static string CertificatePrivateKeyAccessError { + get { + return ResourceManager.GetString("CertificatePrivateKeyAccessError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} {1} deployment for {2} service. + /// + public static string ChangeDeploymentStateWaitMessage { + get { + return ResourceManager.GetString("ChangeDeploymentStateWaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cloud service {0} is in {1} state.. + /// + public static string ChangeDeploymentStatusCompleteMessage { + get { + return ResourceManager.GetString("ChangeDeploymentStatusCompleteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Changing/Removing public environment '{0}' is not allowed.. + /// + public static string ChangePublicEnvironmentMessage { + get { + return ResourceManager.GetString("ChangePublicEnvironmentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service {0} is set to value {1}. + /// + public static string ChangeSettingsElementMessage { + get { + return ResourceManager.GetString("ChangeSettingsElementMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Choose which publish settings file to use:. + /// + public static string ChoosePublishSettingsFile { + get { + return ResourceManager.GetString("ChoosePublishSettingsFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Plugins.Caching.ClientDiagnosticLevel. + /// + public static string ClientDiagnosticLevelName { + get { + return ResourceManager.GetString("ClientDiagnosticLevelName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 1. + /// + public static string ClientDiagnosticLevelValue { + get { + return ResourceManager.GetString("ClientDiagnosticLevelValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to cloud_package.cspkg. + /// + public static string CloudPackageFileName { + get { + return ResourceManager.GetString("CloudPackageFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceConfiguration.Cloud.cscfg. + /// + public static string CloudServiceConfigurationFileName { + get { + return ResourceManager.GetString("CloudServiceConfigurationFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-ons for {0}. + /// + public static string CloudServiceDescription { + get { + return ResourceManager.GetString("CloudServiceDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Communication could not be established. This could be due to an invalid subscription ID. Note that subscription IDs are case sensitive.. + /// + public static string CommunicationCouldNotBeEstablished { + get { + return ResourceManager.GetString("CommunicationCouldNotBeEstablished", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Complete. + /// + public static string CompleteMessage { + get { + return ResourceManager.GetString("CompleteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Complete. + /// + public static string CompleteMessage1 { + get { + return ResourceManager.GetString("CompleteMessage1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to config.json. + /// + public static string ConfigurationFileName { + get { + return ResourceManager.GetString("ConfigurationFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to VirtualMachine creation failed.. + /// + public static string CreateFailedErrorMessage { + get { + return ResourceManager.GetString("CreateFailedErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creating the website failed. If this is the first website for this subscription, please create it using the management portal instead.. + /// + public static string CreateWebsiteFailed { + get { + return ResourceManager.GetString("CreateWebsiteFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creating {0} package.... + /// + public static string CreatingPackageMessage { + get { + return ResourceManager.GetString("CreatingPackageMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to CsEncrypt.exe failed to generate a certificate ({0}). + /// + public static string CsEncrypt_CreateCertificate_CreationFailed { + get { + return ResourceManager.GetString("CsEncrypt_CreateCertificate_CreationFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to New-PasswordEncryptionCertificate -FriendlyName "Microsoft Azure Certificate". + /// + public static string CsEncryptCreateCertificateArg { + get { + return ResourceManager.GetString("CsEncryptCreateCertificateArg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to csencrypt.exe. + /// + public static string CsEncryptExe { + get { + return ResourceManager.GetString("CsEncryptExe", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to "{0}\ServiceDefinition.csdef" /out:"{0}\cloud_package.cspkg" {1} {2}. + /// + public static string CsPackCloudArg { + get { + return ResourceManager.GetString("CsPackCloudArg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to cspack.exe. + /// + public static string CsPackExe { + get { + return ResourceManager.GetString("CsPackExe", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to cspack.exe failed with no detail error information.. + /// + public static string CsPackExeGenericFailure { + get { + return ResourceManager.GetString("CsPackExeGenericFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to "{0}\ServiceDefinition.csdef" /out:"{0}\local_package.csx" {1} {2} /copyOnly. + /// + public static string CsPackLocalArg { + get { + return ResourceManager.GetString("CsPackLocalArg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An unexpected failure occurred. Details: + ///{0}. + /// + public static string CsRun_StartCsRunProcess_UnexpectedFailure { + get { + return ResourceManager.GetString("CsRun_StartCsRunProcess_UnexpectedFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to csrun.exe. + /// + public static string CsRunExe { + get { + return ResourceManager.GetString("CsRunExe", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /usefullemulator. + /// + public static string CsRunFullEmulatorArg { + get { + return ResourceManager.GetString("CsRunFullEmulatorArg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /launchbrowser. + /// + public static string CsRunLanuchBrowserArg { + get { + return ResourceManager.GetString("CsRunLanuchBrowserArg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /removeall. + /// + public static string CsRunRemoveAllDeploymentsArg { + get { + return ResourceManager.GetString("CsRunRemoveAllDeploymentsArg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /remove:{0}. + /// + public static string CsRunRemoveDeploymentArg { + get { + return ResourceManager.GetString("CsRunRemoveDeploymentArg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /devfabric. + /// + public static string CsRunStartComputeEmulatorArg { + get { + return ResourceManager.GetString("CsRunStartComputeEmulatorArg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /devstore. + /// + public static string CsRunStartStorageEmulatorArg { + get { + return ResourceManager.GetString("CsRunStartStorageEmulatorArg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /devfabric:shutdown. + /// + public static string CsRunStopEmulatorArg { + get { + return ResourceManager.GetString("CsRunStopEmulatorArg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /update:{0};{1}. + /// + public static string CsRunUpdateDeploymentArg { + get { + return ResourceManager.GetString("CsRunUpdateDeploymentArg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core. + /// + public static string DataCacheClientsType { + get { + return ResourceManager.GetString("DataCacheClientsType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to //blobcontainer[@datacenter='{0}']. + /// + public static string DatacenterBlobQuery { + get { + return ResourceManager.GetString("DatacenterBlobQuery", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Setting: {0} as the default and current subscription. To view other subscriptions use Get-AzureSubscription. + /// + public static string DefaultAndCurrentContext_Subscription { + get { + return ResourceManager.GetString("DefaultAndCurrentContext.Subscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to none. + /// + public static string DefaultFileVersion { + get { + return ResourceManager.GetString("DefaultFileVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There are no hostnames which could be used for validation.. + /// + public static string DefaultHostnamesValidation { + get { + return ResourceManager.GetString("DefaultHostnamesValidation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 8080. + /// + public static string DefaultPort { + get { + return ResourceManager.GetString("DefaultPort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 1000. + /// + public static string DefaultRoleCachingInMB { + get { + return ResourceManager.GetString("DefaultRoleCachingInMB", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Auto. + /// + public static string DefaultUpgradeMode { + get { + return ResourceManager.GetString("DefaultUpgradeMode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 80. + /// + public static string DefaultWebPort { + get { + return ResourceManager.GetString("DefaultWebPort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Delete. + /// + public static string Delete { + get { + return ResourceManager.GetString("Delete", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The {0} slot for service {1} is already in {2} state. + /// + public static string DeploymentAlreadyInState { + get { + return ResourceManager.GetString("DeploymentAlreadyInState", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The deployment in {0} slot for service {1} is removed. + /// + public static string DeploymentRemovedMessage { + get { + return ResourceManager.GetString("DeploymentRemovedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Plugins.Caching.DiagnosticLevel. + /// + public static string DiagnosticLevelName { + get { + return ResourceManager.GetString("DiagnosticLevelName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 1. + /// + public static string DiagnosticLevelValue { + get { + return ResourceManager.GetString("DiagnosticLevelValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The key to add already exists in the dictionary.. + /// + public static string DictionaryAddAlreadyContainsKey { + get { + return ResourceManager.GetString("DictionaryAddAlreadyContainsKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The array index cannot be less than zero.. + /// + public static string DictionaryCopyToArrayIndexLessThanZero { + get { + return ResourceManager.GetString("DictionaryCopyToArrayIndexLessThanZero", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The supplied array does not have enough room to contain the copied elements.. + /// + public static string DictionaryCopyToArrayTooShort { + get { + return ResourceManager.GetString("DictionaryCopyToArrayTooShort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided dns {0} doesn't exist. + /// + public static string DnsDoesNotExist { + get { + return ResourceManager.GetString("DnsDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to EMULATED. + /// + public static string EmulatedKey { + get { + return ResourceManager.GetString("EmulatedKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to UseDevelopmentStorage=true. + /// + public static string EmulatorConnectionString { + get { + return ResourceManager.GetString("EmulatorConnectionString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ((http|tcp)://[0-9.:/]*). + /// + public static string EmulatorOutputSitesRegex { + get { + return ResourceManager.GetString("EmulatorOutputSitesRegex", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role is running at {0}. + /// + public static string EmulatorRoleRunningMessage { + get { + return ResourceManager.GetString("EmulatorRoleRunningMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot enable Remote Desktop because there are no roles. + /// + public static string EnableAzureRemoteDesktop_Enable_NoRoles { + get { + return ResourceManager.GetString("EnableAzureRemoteDesktop_Enable_NoRoles", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Password is not complex enough. The password should include at least three different kinds of characters (uppercase, lowercase, digits, and other symbols) and be at least six characters long.. + /// + public static string EnableAzureRemoteDesktopCommand_Enable_NeedComplexPassword { + get { + return ResourceManager.GetString("EnableAzureRemoteDesktopCommand_Enable_NeedComplexPassword", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Memcache is enabled for role '{0}' using cache role '{1}' to connect use server name 'localhost_{0}' with port {2}.. + /// + public static string EnableMemcacheMessage { + get { + return ResourceManager.GetString("EnableMemcacheMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft Azure Certificate. + /// + public static string EnableRemoteDesktop_FriendlyCertificateName { + get { + return ResourceManager.GetString("EnableRemoteDesktop_FriendlyCertificateName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Endpoint can't be retrieved for storage account. + /// + public static string EndPointNotFoundForBlobStorage { + get { + return ResourceManager.GetString("EndPointNotFoundForBlobStorage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} end processing.. + /// + public static string EndProcessingLog { + get { + return ResourceManager.GetString("EndProcessingLog", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The environment '{0}' already exists.. + /// + public static string EnvironmentExists { + get { + return ResourceManager.GetString("EnvironmentExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The environment name '{0}' is not found.. + /// + public static string EnvironmentNotFound { + get { + return ResourceManager.GetString("EnvironmentNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to environments.xml. + /// + public static string EnvironmentsFileName { + get { + return ResourceManager.GetString("EnvironmentsFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error creating CloudService. + /// + public static string ErrorCreatingCloudService { + get { + return ResourceManager.GetString("ErrorCreatingCloudService", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error creating StaticIPAddressPool. + /// + public static string ErrorCreatingStaticIPAddressPool { + get { + return ResourceManager.GetString("ErrorCreatingStaticIPAddressPool", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error creating VirtualMachine. + /// + public static string ErrorCreatingVirtualMachine { + get { + return ResourceManager.GetString("ErrorCreatingVirtualMachine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error creating VMNetwork. + /// + public static string ErrorCreatingVMNetwork { + get { + return ResourceManager.GetString("ErrorCreatingVMNetwork", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error creating VMRole. + /// + public static string ErrorCreatingVMRole { + get { + return ResourceManager.GetString("ErrorCreatingVMRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error creating VMSubnet. + /// + public static string ErrorCreatingVMSubnet { + get { + return ResourceManager.GetString("ErrorCreatingVMSubnet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to download available runtimes for location '{0}'. + /// + public static string ErrorRetrievingRuntimesForLocation { + get { + return ResourceManager.GetString("ErrorRetrievingRuntimesForLocation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error updating VirtualMachine. + /// + public static string ErrorUpdatingVirtualMachine { + get { + return ResourceManager.GetString("ErrorUpdatingVirtualMachine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Your Microsoft Azure credential in the Windows PowerShell session has expired. Please use Add-AzureAccount to login again.. + /// + public static string ExpiredRefreshToken { + get { + return ResourceManager.GetString("ExpiredRefreshToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Job Id {0} failed. Error: {1}, ExceptionDetails: {2}. + /// + public static string FailedJobErrorMessage { + get { + return ResourceManager.GetString("FailedJobErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not delete emulator package '{0}' for the service. Please ensure that no files or folders in the package are open in other programs. + /// + public static string FailedToCleanUpLocalPackage { + get { + return ResourceManager.GetString("FailedToCleanUpLocalPackage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to generate package. Error: {0}.". + /// + public static string FailedToCreatePackage { + get { + return ResourceManager.GetString("FailedToCreatePackage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The HTTP request was forbidden with client authentication scheme 'Anonymous'.. + /// + public static string FirstPurchaseErrorMessage { + get { + return ResourceManager.GetString("FirstPurchaseErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This add-on requires you to purchase the first instance through the Microsoft Azure Portal. Subsequent purchases can be performed through PowerShell.. + /// + public static string FirstPurchaseMessage { + get { + return ResourceManager.GetString("FirstPurchaseMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation Status:. + /// + public static string GatewayOperationStatus { + get { + return ResourceManager.GetString("GatewayOperationStatus", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resources\Scaffolding\General. + /// + public static string GeneralScaffolding { + get { + return ResourceManager.GetString("GeneralScaffolding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Getting all available Microsoft Azure Add-Ons, this may take few minutes.... + /// + public static string GetAllAddOnsWaitMessage { + get { + return ResourceManager.GetString("GetAllAddOnsWaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Name{0}Primary Key{0}Seconday Key. + /// + public static string GetStorageKeysHeader { + get { + return ResourceManager.GetString("GetStorageKeysHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Git not found. Please install git and place it in your command line path.. + /// + public static string GitNotFound { + get { + return ResourceManager.GetString("GitNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not find publish settings. Please run Import-AzurePublishSettingsFile.. + /// + public static string GlobalSettingsManager_Load_PublishSettingsNotFound { + get { + return ResourceManager.GetString("GlobalSettingsManager_Load_PublishSettingsNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not find publish settings. Please run Import-AzurePublishSettingsFile.. + /// + public static string GlobalSettingsManager_Load_PublishSettingsNotFound1 { + get { + return ResourceManager.GetString("GlobalSettingsManager_Load_PublishSettingsNotFound1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to iisnode.dll. + /// + public static string IISNodeDll { + get { + return ResourceManager.GetString("IISNodeDll", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to iisnode. + /// + public static string IISNodeEngineKey { + get { + return ResourceManager.GetString("IISNodeEngineKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to iisnode-dev\\release\\x64. + /// + public static string IISNodePath { + get { + return ResourceManager.GetString("IISNodePath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to iisnode. + /// + public static string IISNodeRuntimeValue { + get { + return ResourceManager.GetString("IISNodeRuntimeValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installing IISNode version {0} in Azure for WebRole '{1}' (the version locally installed is: {2}). + /// + public static string IISNodeVersionWarningText { + get { + return ResourceManager.GetString("IISNodeVersionWarningText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Illegal characters in path.. + /// + public static string IllegalPath { + get { + return ResourceManager.GetString("IllegalPath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Illegal characters in path.. + /// + public static string IllegalPath1 { + get { + return ResourceManager.GetString("IllegalPath1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Server Error. + /// + public static string InternalServerErrorMessage { + get { + return ResourceManager.GetString("InternalServerErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot enable memcach protocol on a cache worker role {0}.. + /// + public static string InvalidCacheRoleName { + get { + return ResourceManager.GetString("InvalidCacheRoleName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid certificate format. Publish settings may be corrupted. Use Get-AzurePublishSettingsFile to download updated settings. + /// + public static string InvalidCertificate { + get { + return ResourceManager.GetString("InvalidCertificate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid certificate format. Publish settings may be corrupted. Use Get-AzurePublishSettingsFile to download updated settings. + /// + public static string InvalidCertificate1 { + get { + return ResourceManager.GetString("InvalidCertificate1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid certificate format.. + /// + public static string InvalidCertificateSingle { + get { + return ResourceManager.GetString("InvalidCertificateSingle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided configuration path is invalid or doesn't exist. + /// + public static string InvalidConfigPath { + get { + return ResourceManager.GetString("InvalidConfigPath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The country name is invalid, please use a valid two character country code, as described in ISO 3166-1 alpha-2.. + /// + public static string InvalidCountryNameMessage { + get { + return ResourceManager.GetString("InvalidCountryNameMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The management certificate of the current subscription is invalid. Use Set-AzureSubscription to fix the management certificate or use Select-AzureSubscription to use a different subscription.. + /// + public static string InvalidCurrentSuscriptionCertificate { + get { + return ResourceManager.GetString("InvalidCurrentSuscriptionCertificate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No default subscription has been designated. Use Select-AzureSubscription -Default <subscriptionName> to set the default subscription.. + /// + public static string InvalidDefaultSubscription { + get { + return ResourceManager.GetString("InvalidDefaultSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deployment with {0} does not exist. + /// + public static string InvalidDeployment { + get { + return ResourceManager.GetString("InvalidDeployment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The deployment slot name {0} is invalid. Slot name must be either "Staging" or "Production".. + /// + public static string InvalidDeploymentSlot { + get { + return ResourceManager.GetString("InvalidDeploymentSlot", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to "{0}" is an invalid DNS name for {1}. + /// + public static string InvalidDnsName { + get { + return ResourceManager.GetString("InvalidDnsName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid service endpoint.. + /// + public static string InvalidEndpoint { + get { + return ResourceManager.GetString("InvalidEndpoint", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided file in {0} must be have {1} extension. + /// + public static string InvalidFileExtension { + get { + return ResourceManager.GetString("InvalidFileExtension", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File {0} has invalid characters. + /// + public static string InvalidFileName { + get { + return ResourceManager.GetString("InvalidFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You must create your git publishing credentials using the Microsoft Azure portal. + ///Please follow these steps in the portal: + ///1. On the left side open "Web Sites" + ///2. Click on any website + ///3. Choose "Setup Git Publishing" or "Reset deployment credentials" + ///4. Back in the PowerShell window, rerun this command by typing "New-AzureWebSite {site name} -Git -PublishingUsername {username}. + /// + public static string InvalidGitCredentials { + get { + return ResourceManager.GetString("InvalidGitCredentials", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The value {0} provided is not a valid GUID. Please provide a valid GUID.. + /// + public static string InvalidGuid { + get { + return ResourceManager.GetString("InvalidGuid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified hostname does not exist. Please specify a valid hostname for the site.. + /// + public static string InvalidHostnameValidation { + get { + return ResourceManager.GetString("InvalidHostnameValidation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role {0} instances must be greater than or equal 0 and less than or equal 20. + /// + public static string InvalidInstancesCount { + get { + return ResourceManager.GetString("InvalidInstancesCount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There was an error creating your webjob. Please make sure that the script is in the root folder of the zip file.. + /// + public static string InvalidJobFile { + get { + return ResourceManager.GetString("InvalidJobFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot create instance of management client type {0}. It does not have the expected constructor.. + /// + public static string InvalidManagementClientType { + get { + return ResourceManager.GetString("InvalidManagementClientType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not download a valid runtime manifest, Please check your internet connection and try again.. + /// + public static string InvalidManifestError { + get { + return ResourceManager.GetString("InvalidManifestError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The account {0} was not found. Please specify a valid account name.. + /// + public static string InvalidMediaServicesAccount { + get { + return ResourceManager.GetString("InvalidMediaServicesAccount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided name "{0}" does not match the service bus namespace naming rules.. + /// + public static string InvalidNamespaceName { + get { + return ResourceManager.GetString("InvalidNamespaceName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Value cannot be null. Parameter name: '{0}'. + /// + public static string InvalidNullArgument { + get { + return ResourceManager.GetString("InvalidNullArgument", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} is invalid or empty. + /// + public static string InvalidOrEmptyArgumentMessage { + get { + return ResourceManager.GetString("InvalidOrEmptyArgumentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided package path is invalid or doesn't exist. + /// + public static string InvalidPackagePath { + get { + return ResourceManager.GetString("InvalidPackagePath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' is an invalid parameter set name.. + /// + public static string InvalidParameterSetName { + get { + return ResourceManager.GetString("InvalidParameterSetName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} doesn't exist in {1} or you've not passed valid value for it. + /// + public static string InvalidPath { + get { + return ResourceManager.GetString("InvalidPath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path {0} has invalid characters. + /// + public static string InvalidPathName { + get { + return ResourceManager.GetString("InvalidPathName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided publish settings file {0} has invalid content. Please get valid by running cmdlet Get-AzurePublishSettingsFile. + /// + public static string InvalidPublishSettingsSchema { + get { + return ResourceManager.GetString("InvalidPublishSettingsSchema", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided publish settings file {0} has invalid content. Please get valid by running cmdlet Get-AzurePublishSettingsFile. + /// + public static string InvalidPublishSettingsSchema1 { + get { + return ResourceManager.GetString("InvalidPublishSettingsSchema1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided role name "{0}" has invalid characters. + /// + public static string InvalidRoleNameMessage { + get { + return ResourceManager.GetString("InvalidRoleNameMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A valid name for the service root folder is required. + /// + public static string InvalidRootNameMessage { + get { + return ResourceManager.GetString("InvalidRootNameMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} is not a recognized runtime type. + /// + public static string InvalidRuntimeError { + get { + return ResourceManager.GetString("InvalidRuntimeError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A valid language is required. + /// + public static string InvalidScaffoldingLanguageArg { + get { + return ResourceManager.GetString("InvalidScaffoldingLanguageArg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No subscription is currently selected. Use Select-Subscription to activate a subscription.. + /// + public static string InvalidSelectedSubscription { + get { + return ResourceManager.GetString("InvalidSelectedSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided location "{0}" does not exist in the available locations use Get-AzureSBLocation for listing available locations.. + /// + public static string InvalidServiceBusLocation { + get { + return ResourceManager.GetString("InvalidServiceBusLocation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please provide a service name or run this command from inside a service project directory.. + /// + public static string InvalidServiceName { + get { + return ResourceManager.GetString("InvalidServiceName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You must provide valid value for {0}. + /// + public static string InvalidServiceSettingElement { + get { + return ResourceManager.GetString("InvalidServiceSettingElement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You must provide valid value for {0}. + /// + public static string InvalidServiceSettingElement1 { + get { + return ResourceManager.GetString("InvalidServiceSettingElement1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to settings.json is invalid or doesn't exist. + /// + public static string InvalidServiceSettingMessage { + get { + return ResourceManager.GetString("InvalidServiceSettingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription named '{0}' cannot be found. Use Set-AzureSubscription to initialize the subscription data.. + /// + public static string InvalidSubscription { + get { + return ResourceManager.GetString("InvalidSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided subscription if {0} is not valid. + /// + public static string InvalidSubscriptionId { + get { + return ResourceManager.GetString("InvalidSubscriptionId", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Must specify a non-null subscription name.. + /// + public static string InvalidSubscriptionName { + get { + return ResourceManager.GetString("InvalidSubscriptionName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A valid subscription name is required. This can be provided using the -Subscription parameter or by setting the subscription via the Set-AzureSubscription cmdlet. + /// + public static string InvalidSubscriptionNameMessage { + get { + return ResourceManager.GetString("InvalidSubscriptionNameMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided subscriptions file {0} has invalid content.. + /// + public static string InvalidSubscriptionsDataSchema { + get { + return ResourceManager.GetString("InvalidSubscriptionsDataSchema", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please run Add-AzureAccount to finish setting up the subscription.. + /// + public static string InvalidSubscriptionState { + get { + return ResourceManager.GetString("InvalidSubscriptionState", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role {0} VM size should be ExtraSmall, Small, Medium, Large or ExtraLarge.. + /// + public static string InvalidVMSize { + get { + return ResourceManager.GetString("InvalidVMSize", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The web job file must have *.zip extension. + /// + public static string InvalidWebJobFile { + get { + return ResourceManager.GetString("InvalidWebJobFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Singleton option works for continuous jobs only.. + /// + public static string InvalidWebJobSingleton { + get { + return ResourceManager.GetString("InvalidWebJobSingleton", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The website {0} was not found. Please specify a valid website name.. + /// + public static string InvalidWebsite { + get { + return ResourceManager.GetString("InvalidWebsite", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No job for id: {0} was found.. + /// + public static string JobNotFound { + get { + return ResourceManager.GetString("JobNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to engines. + /// + public static string JsonEnginesSectionName { + get { + return ResourceManager.GetString("JsonEnginesSectionName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Scaffolding for this language is not yet supported. + /// + public static string LanguageScaffoldingIsNotSupported { + get { + return ResourceManager.GetString("LanguageScaffoldingIsNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Link already established. + /// + public static string LinkAlreadyEstablished { + get { + return ResourceManager.GetString("LinkAlreadyEstablished", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to local_package.csx. + /// + public static string LocalPackageFileName { + get { + return ResourceManager.GetString("LocalPackageFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceConfiguration.Local.cscfg. + /// + public static string LocalServiceConfigurationFileName { + get { + return ResourceManager.GetString("LocalServiceConfigurationFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Looking for {0} deployment for {1} cloud service.... + /// + public static string LookingForDeploymentMessage { + get { + return ResourceManager.GetString("LookingForDeploymentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Looking for cloud service {0}.... + /// + public static string LookingForServiceMessage { + get { + return ResourceManager.GetString("LookingForServiceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to managementCertificate.pem. + /// + public static string ManagementCertificateFileName { + get { + return ResourceManager.GetString("ManagementCertificateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ?whr={0}. + /// + public static string ManagementPortalRealmFormat { + get { + return ResourceManager.GetString("ManagementPortalRealmFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to //baseuri. + /// + public static string ManifestBaseUriQuery { + get { + return ResourceManager.GetString("ManifestBaseUriQuery", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to uri. + /// + public static string ManifestBlobUriKey { + get { + return ResourceManager.GetString("ManifestBlobUriKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to http://api.datamarket.azure.com/CatalogService.svc. + /// + public static string MarketplaceEndpoint { + get { + return ResourceManager.GetString("MarketplaceEndpoint", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to v2.5. + /// + public static string MaxSupportAzureSdkVersion { + get { + return ResourceManager.GetString("MaxSupportAzureSdkVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to memcache_default. + /// + public static string MemcacheEndpointName { + get { + return ResourceManager.GetString("MemcacheEndpointName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 11211. + /// + public static string MemcacheEndpointPort { + get { + return ResourceManager.GetString("MemcacheEndpointPort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to v2.5. + /// + public static string MinSupportAzureSdkVersion { + get { + return ResourceManager.GetString("MinSupportAzureSdkVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Python 2.7 is not installed. Please install it as well as Django 1.4.. + /// + public static string MissingPythonPreReq { + get { + return ResourceManager.GetString("MissingPythonPreReq", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Multiple Add-Ons found holding name {0}. + /// + public static string MultipleAddOnsFoundMessage { + get { + return ResourceManager.GetString("MultipleAddOnsFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Multiple possible publishing users. Please go to the Portal and use the listed deployment user, or click 'set/reset deployment credentials' to set up a new user account, then reurn this cmdlet and specify PublishingUsername.. + /// + public static string MultiplePublishingUsernames { + get { + return ResourceManager.GetString("MultiplePublishingUsernames", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The first publish settings file "{0}" is used. If you want to use another file specify the file name.. + /// + public static string MultiplePublishSettingsFilesFoundMessage { + get { + return ResourceManager.GetString("MultiplePublishSettingsFilesFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Plugins.Caching.NamedCaches. + /// + public static string NamedCacheSettingName { + get { + return ResourceManager.GetString("NamedCacheSettingName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {"caches":[{"name":"default","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":10,"isExpirable":true,"type":1},"serverNotification":{"isEnabled":false}},"secondaries":0}]}. + /// + public static string NamedCacheSettingValue { + get { + return ResourceManager.GetString("NamedCacheSettingValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A publishing username is required. Please specify one using the argument PublishingUsername.. + /// + public static string NeedPublishingUsernames { + get { + return ResourceManager.GetString("NeedPublishingUsernames", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to New Add-On Confirmation. + /// + public static string NewAddOnConformation { + get { + return ResourceManager.GetString("NewAddOnConformation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis + ///for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) + ///agree to the {2}'s terms of user and privacy statement at {0} and (c) agree to sharing my + ///contact information with {2}.. + /// + public static string NewMicrosoftAddOnMessage { + get { + return ResourceManager.GetString("NewMicrosoftAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Server Error. This could happen because the namespace name is already used or due to an incorrect location name. Use Get-AzureSBLocation cmdlet to list valid names.. + /// + public static string NewNamespaceErrorMessage { + get { + return ResourceManager.GetString("NewNamespaceErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis + ///for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) + ///acknowledge the offering is provided by {2}, not Microsoft, and agree to {2}'s terms of + ///use and privacy statement at {0} and (c) agree to sharing my contact information with {2}.. + /// + public static string NewNonMicrosoftAddOnMessage { + get { + return ResourceManager.GetString("NewNonMicrosoftAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service has been created at {0}. + /// + public static string NewServiceCreatedMessage { + get { + return ResourceManager.GetString("NewServiceCreatedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No. + /// + public static string No { + get { + return ResourceManager.GetString("No", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no access token cached for subscription {0}, user id {1}. Use the Add-AzureAccount cmdlet to log in again and get a token for this subscription.. + /// + public static string NoCachedToken { + get { + return ResourceManager.GetString("NoCachedToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service does not have any cache worker roles, add one first by running cmdlet Add-AzureCacheWorkerRole.. + /// + public static string NoCacheWorkerRoles { + get { + return ResourceManager.GetString("NoCacheWorkerRoles", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No clouds available. + /// + public static string NoCloudsAvailable { + get { + return ResourceManager.GetString("NoCloudsAvailable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to nodejs. + /// + public static string NodeDirectory { + get { + return ResourceManager.GetString("NodeDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to node. + /// + public static string NodeEngineKey { + get { + return ResourceManager.GetString("NodeEngineKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to node.exe. + /// + public static string NodeExe { + get { + return ResourceManager.GetString("NodeExe", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no default subscription set, please set a default subscription by running Set-AzureSubscription -Default <subscription name>. + /// + public static string NoDefaultSubscriptionMessage { + get { + return ResourceManager.GetString("NoDefaultSubscriptionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft SDKs\Azure\Nodejs\Nov2011. + /// + public static string NodeModulesPath { + get { + return ResourceManager.GetString("NodeModulesPath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to nodejs. + /// + public static string NodeProgramFilesFolderName { + get { + return ResourceManager.GetString("NodeProgramFilesFolderName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to node. + /// + public static string NodeRuntimeValue { + get { + return ResourceManager.GetString("NodeRuntimeValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resources\Scaffolding\Node. + /// + public static string NodeScaffolding { + get { + return ResourceManager.GetString("NodeScaffolding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Commands.CloudService.ScaffoldingResources.Node. + /// + public static string NodeScaffoldingResources { + get { + return ResourceManager.GetString("NodeScaffoldingResources", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installing Node version {0} in Azure for Role '{1}' (the Node version locally installed is: {2}). + /// + public static string NodeVersionWarningText { + get { + return ResourceManager.GetString("NodeVersionWarningText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No, I do not agree. + /// + public static string NoHint { + get { + return ResourceManager.GetString("NoHint", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please connect to internet before executing this cmdlet. + /// + public static string NoInternetConnection { + get { + return ResourceManager.GetString("NoInternetConnection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please connect to internet before executing this cmdlet. + /// + public static string NoInternetConnection1 { + get { + return ResourceManager.GetString("NoInternetConnection1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No publish settings files with extension *.publishsettings are found in the directory "{0}".. + /// + public static string NoPublishSettingsFilesFoundMessage { + get { + return ResourceManager.GetString("NoPublishSettingsFilesFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' must be a cache worker role. Verify that it has proper cache worker role configuration.. + /// + public static string NotCacheWorkerRole { + get { + return ResourceManager.GetString("NotCacheWorkerRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Certificate can't be null.. + /// + public static string NullCertificateMessage { + get { + return ResourceManager.GetString("NullCertificateMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} could not be null or empty. + /// + public static string NullObjectMessage { + get { + return ResourceManager.GetString("NullObjectMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to add a null RoleSettings to {0}. + /// + public static string NullRoleSettingsMessage { + get { + return ResourceManager.GetString("NullRoleSettingsMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to add new role to null service definition. + /// + public static string NullServiceDefinitionMessage { + get { + return ResourceManager.GetString("NullServiceDefinitionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The request offer '{0}' is not found.. + /// + public static string OfferNotFoundMessage { + get { + return ResourceManager.GetString("OfferNotFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation "{0}" failed on VM with ID: {1}. + /// + public static string OperationFailedErrorMessage { + get { + return ResourceManager.GetString("OperationFailedErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The REST operation failed with message '{0}' and error code '{1}'. + /// + public static string OperationFailedMessage { + get { + return ResourceManager.GetString("OperationFailedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Job Id {0} did not complete within expected time or it is in Failed/Canceled/Invalid state.. + /// + public static string OperationTimedOutOrError { + get { + return ResourceManager.GetString("OperationTimedOutOrError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to package. + /// + public static string Package { + get { + return ResourceManager.GetString("Package", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Package is created at service root path {0}.. + /// + public static string PackageCreated { + get { + return ResourceManager.GetString("PackageCreated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {{ + /// "author": "", + /// + /// "name": "{0}", + /// "version": "0.0.0", + /// "dependencies":{{}}, + /// "devDependencies":{{}}, + /// "optionalDependencies": {{}}, + /// "engines": {{ + /// "node": "*", + /// "iisnode": "*" + /// }} + /// + ///}} + ///. + /// + public static string PackageJsonDefaultFile { + get { + return ResourceManager.GetString("PackageJsonDefaultFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to package.json. + /// + public static string PackageJsonFileName { + get { + return ResourceManager.GetString("PackageJsonFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path {0} doesn't exist.. + /// + public static string PathDoesNotExist { + get { + return ResourceManager.GetString("PathDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path for {0} doesn't exist in {1}.. + /// + public static string PathDoesNotExistForElement { + get { + return ResourceManager.GetString("PathDoesNotExistForElement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 5.4.0. + /// + public static string PHPDefaultRuntimeVersion { + get { + return ResourceManager.GetString("PHPDefaultRuntimeVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to php. + /// + public static string PhpRuntimeValue { + get { + return ResourceManager.GetString("PhpRuntimeValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resources\Scaffolding\PHP. + /// + public static string PHPScaffolding { + get { + return ResourceManager.GetString("PHPScaffolding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Commands.CloudService.ScaffoldingResources.PHP. + /// + public static string PHPScaffoldingResources { + get { + return ResourceManager.GetString("PHPScaffoldingResources", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installing PHP version {0} for Role '{1}' (the PHP version locally installed is: {2}). + /// + public static string PHPVersionWarningText { + get { + return ResourceManager.GetString("PHPVersionWarningText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You must create your first web site using the Microsoft Azure portal. + ///Please follow these steps in the portal: + ///1. At the bottom of the page, click on New > Web Site > Quick Create + ///2. Type {0} in the URL field + ///3. Click on "Create Web Site" + ///4. Once the site has been created, click on the site name + ///5. Click on "Set up Git publishing" or "Reset deployment credentials" and setup a publishing username and password. Use those credentials for all new websites you create.. + /// + public static string PortalInstructions { + get { + return ResourceManager.GetString("PortalInstructions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 6. Back in the console window, rerun this command by typing "New-AzureWebsite <site name> -Git". + /// + public static string PortalInstructionsGit { + get { + return ResourceManager.GetString("PortalInstructionsGit", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Promotion code can be used only when updating to a new plan.. + /// + public static string PromotionCodeWithCurrentPlanMessage { + get { + return ResourceManager.GetString("PromotionCodeWithCurrentPlanMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service not published at user request.. + /// + public static string PublishAbortedAtUserRequest { + get { + return ResourceManager.GetString("PublishAbortedAtUserRequest", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Complete.. + /// + public static string PublishCompleteMessage { + get { + return ResourceManager.GetString("PublishCompleteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Connecting.... + /// + public static string PublishConnectingMessage { + get { + return ResourceManager.GetString("PublishConnectingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Created Deployment ID: {0}.. + /// + public static string PublishCreatedDeploymentMessage { + get { + return ResourceManager.GetString("PublishCreatedDeploymentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Created hosted service '{0}'.. + /// + public static string PublishCreatedServiceMessage { + get { + return ResourceManager.GetString("PublishCreatedServiceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Created Website URL: {0}.. + /// + public static string PublishCreatedWebsiteMessage { + get { + return ResourceManager.GetString("PublishCreatedWebsiteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creating.... + /// + public static string PublishCreatingServiceMessage { + get { + return ResourceManager.GetString("PublishCreatingServiceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Initializing.... + /// + public static string PublishInitializingMessage { + get { + return ResourceManager.GetString("PublishInitializingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to busy. + /// + public static string PublishInstanceStatusBusy { + get { + return ResourceManager.GetString("PublishInstanceStatusBusy", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to creating the virtual machine. + /// + public static string PublishInstanceStatusCreating { + get { + return ResourceManager.GetString("PublishInstanceStatusCreating", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Instance {0} of role {1} is {2}.. + /// + public static string PublishInstanceStatusMessage { + get { + return ResourceManager.GetString("PublishInstanceStatusMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ready. + /// + public static string PublishInstanceStatusReady { + get { + return ResourceManager.GetString("PublishInstanceStatusReady", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Preparing deployment for {0} with Subscription ID: {1}.... + /// + public static string PublishPreparingDeploymentMessage { + get { + return ResourceManager.GetString("PublishPreparingDeploymentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Publishing {0} to Microsoft Azure. This may take several minutes.... + /// + public static string PublishServiceStartMessage { + get { + return ResourceManager.GetString("PublishServiceStartMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to publish settings. + /// + public static string PublishSettings { + get { + return ResourceManager.GetString("PublishSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure. + /// + public static string PublishSettingsElementName { + get { + return ResourceManager.GetString("PublishSettingsElementName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to .PublishSettings. + /// + public static string PublishSettingsFileExtention { + get { + return ResourceManager.GetString("PublishSettingsFileExtention", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to publishSettings.xml. + /// + public static string PublishSettingsFileName { + get { + return ResourceManager.GetString("PublishSettingsFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to &whr={0}. + /// + public static string PublishSettingsFileRealmFormat { + get { + return ResourceManager.GetString("PublishSettingsFileRealmFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Publish settings imported. + /// + public static string PublishSettingsSetSuccessfully { + get { + return ResourceManager.GetString("PublishSettingsSetSuccessfully", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AZURE_PUBLISHINGPROFILE_URL. + /// + public static string PublishSettingsUrlEnv { + get { + return ResourceManager.GetString("PublishSettingsUrlEnv", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Starting.... + /// + public static string PublishStartingMessage { + get { + return ResourceManager.GetString("PublishStartingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Upgrading.... + /// + public static string PublishUpgradingMessage { + get { + return ResourceManager.GetString("PublishUpgradingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Uploading Package to storage service {0}.... + /// + public static string PublishUploadingPackageMessage { + get { + return ResourceManager.GetString("PublishUploadingPackageMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Verifying storage account '{0}'.... + /// + public static string PublishVerifyingStorageMessage { + get { + return ResourceManager.GetString("PublishVerifyingStorageMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resources\Scaffolding\Python. + /// + public static string PythonScaffolding { + get { + return ResourceManager.GetString("PythonScaffolding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Replace current deployment with '{0}' Id ?. + /// + public static string RedeployCommit { + get { + return ResourceManager.GetString("RedeployCommit", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to regenerate key?. + /// + public static string RegenerateKeyWarning { + get { + return ResourceManager.GetString("RegenerateKeyWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Generate new key.. + /// + public static string RegenerateKeyWhatIfMessage { + get { + return ResourceManager.GetString("RegenerateKeyWhatIfMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove account '{0}'?. + /// + public static string RemoveAccountConfirmation { + get { + return ResourceManager.GetString("RemoveAccountConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing account. + /// + public static string RemoveAccountMessage { + get { + return ResourceManager.GetString("RemoveAccountMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove Add-On Confirmation. + /// + public static string RemoveAddOnConformation { + get { + return ResourceManager.GetString("RemoveAddOnConformation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to If you delete this add-on, your data may be deleted and the operation may not be undone. You may have to purchase it again from the Microsoft Azure Store to use it. The price of the add-on may not be refunded. Are you sure you want to delete this add-on? Enter “Yes” to confirm.. + /// + public static string RemoveAddOnMessage { + get { + return ResourceManager.GetString("RemoveAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing cloud service {0}.... + /// + public static string RemoveAzureServiceWaitMessage { + get { + return ResourceManager.GetString("RemoveAzureServiceWaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to delete the CloudService '{0}'?. + /// + public static string RemoveCloudServiceConfirmationMessage { + get { + return ResourceManager.GetString("RemoveCloudServiceConfirmationMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deleting CloudService.. + /// + public static string RemoveCloudServiceMessage { + get { + return ResourceManager.GetString("RemoveCloudServiceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The current subscription is being removed. Use Select-Subscription <subscriptionName> to select a new current subscription.. + /// + public static string RemoveCurrentContext_Subscription { + get { + return ResourceManager.GetString("RemoveCurrentContext.Subscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The default subscription is being removed. Use Select-Subscription <subscriptionName> to select a new default subscription.. + /// + public static string RemoveDefaultSubscription { + get { + return ResourceManager.GetString("RemoveDefaultSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing {0} deployment for {1} service. + /// + public static string RemoveDeploymentWaitMessage { + get { + return ResourceManager.GetString("RemoveDeploymentWaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing job collection. + /// + public static string RemoveJobCollectionMessage { + get { + return ResourceManager.GetString("RemoveJobCollectionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the job collection "{0}". + /// + public static string RemoveJobCollectionWarning { + get { + return ResourceManager.GetString("RemoveJobCollectionWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing job. + /// + public static string RemoveJobMessage { + get { + return ResourceManager.GetString("RemoveJobMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the job "{0}". + /// + public static string RemoveJobWarning { + get { + return ResourceManager.GetString("RemoveJobWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the account?. + /// + public static string RemoveMediaAccountWarning { + get { + return ResourceManager.GetString("RemoveMediaAccountWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account removed.. + /// + public static string RemoveMediaAccountWhatIfMessage { + get { + return ResourceManager.GetString("RemoveMediaAccountWhatIfMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Server Error. This could happen because the namespace does not exist or it does not exist under your subscription.. + /// + public static string RemoveNamespaceErrorMessage { + get { + return ResourceManager.GetString("RemoveNamespaceErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing old package {0}.... + /// + public static string RemovePackage { + get { + return ResourceManager.GetString("RemovePackage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to delete the namespace '{0}'?. + /// + public static string RemoveServiceBusNamespaceConfirmation { + get { + return ResourceManager.GetString("RemoveServiceBusNamespaceConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove cloud service?. + /// + public static string RemoveServiceWarning { + get { + return ResourceManager.GetString("RemoveServiceWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove cloud service and all it's deployments. + /// + public static string RemoveServiceWhatIfMessage { + get { + return ResourceManager.GetString("RemoveServiceWhatIfMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to delete the StaticIPAddressPool '{0}'?. + /// + public static string RemoveStaticIPAddressPoolConfirmationMessage { + get { + return ResourceManager.GetString("RemoveStaticIPAddressPoolConfirmationMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deleting StaticIPAddressPool.. + /// + public static string RemoveStaticIPAddressPoolMessage { + get { + return ResourceManager.GetString("RemoveStaticIPAddressPoolMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove subscription '{0}'?. + /// + public static string RemoveSubscriptionConfirmation { + get { + return ResourceManager.GetString("RemoveSubscriptionConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing subscription. + /// + public static string RemoveSubscriptionMessage { + get { + return ResourceManager.GetString("RemoveSubscriptionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to delete the VM '{0}'?. + /// + public static string RemoveVMConfirmationMessage { + get { + return ResourceManager.GetString("RemoveVMConfirmationMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deleting VM.. + /// + public static string RemoveVMMessage { + get { + return ResourceManager.GetString("RemoveVMMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to delete the VMNetwork '{0}'?. + /// + public static string RemoveVMNetworkConfirmationMessage { + get { + return ResourceManager.GetString("RemoveVMNetworkConfirmationMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deleting VMNetwork. + /// + public static string RemoveVMNetworkMessage { + get { + return ResourceManager.GetString("RemoveVMNetworkMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to delete the VMRole '{0}'?. + /// + public static string RemoveVMRoleConfirmationMessage { + get { + return ResourceManager.GetString("RemoveVMRoleConfirmationMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deleting VMRole.. + /// + public static string RemoveVMRoleMessage { + get { + return ResourceManager.GetString("RemoveVMRoleMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the VMSubnet '{0}'?. + /// + public static string RemoveVMSubnetConfirmationMessage { + get { + return ResourceManager.GetString("RemoveVMSubnetConfirmationMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deleting VMSubnet.. + /// + public static string RemoveVMSubnetMessage { + get { + return ResourceManager.GetString("RemoveVMSubnetMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing WebJob.... + /// + public static string RemoveWebJobMessage { + get { + return ResourceManager.GetString("RemoveWebJobMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove job '{0}'?. + /// + public static string RemoveWebJobWarning { + get { + return ResourceManager.GetString("RemoveWebJobWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing website. + /// + public static string RemoveWebsiteMessage { + get { + return ResourceManager.GetString("RemoveWebsiteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the website "{0}". + /// + public static string RemoveWebsiteWarning { + get { + return ResourceManager.GetString("RemoveWebsiteWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deleting namespace. + /// + public static string RemovingNamespaceMessage { + get { + return ResourceManager.GetString("RemovingNamespaceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Repository is not setup. You need to pass a valid site name.. + /// + public static string RepositoryNotSetup { + get { + return ResourceManager.GetString("RepositoryNotSetup", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reserved IP with the Name:'{0}' will no longer be in use after the deployment is deleted, and it is still reserved for later use.. + /// + public static string ReservedIPNameNoLongerInUseButStillBeingReserved { + get { + return ResourceManager.GetString("ReservedIPNameNoLongerInUseButStillBeingReserved", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resource with ID : {0} does not exist.. + /// + public static string ResourceNotFound { + get { + return ResourceManager.GetString("ResourceNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Restart. + /// + public static string Restart { + get { + return ResourceManager.GetString("Restart", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resume. + /// + public static string Resume { + get { + return ResourceManager.GetString("Resume", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /role:{0};"{1}/{0}" . + /// + public static string RoleArgTemplate { + get { + return ResourceManager.GetString("RoleArgTemplate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to bin. + /// + public static string RoleBinFolderName { + get { + return ResourceManager.GetString("RoleBinFolderName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role {0} is {1}. + /// + public static string RoleInstanceWaitMsg { + get { + return ResourceManager.GetString("RoleInstanceWaitMsg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 20. + /// + public static string RoleMaxInstances { + get { + return ResourceManager.GetString("RoleMaxInstances", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to role name. + /// + public static string RoleName { + get { + return ResourceManager.GetString("RoleName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided role name {0} doesn't exist. + /// + public static string RoleNotFoundMessage { + get { + return ResourceManager.GetString("RoleNotFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RoleSettings.xml. + /// + public static string RoleSettingsTemplateFileName { + get { + return ResourceManager.GetString("RoleSettingsTemplateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role type {0} doesn't exist. + /// + public static string RoleTypeDoesNotExist { + get { + return ResourceManager.GetString("RoleTypeDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /run:"{0}";"{1}" {2} /useiisexpress. + /// + public static string RunInEmulatorArguments { + get { + return ResourceManager.GetString("RunInEmulatorArguments", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to public static Dictionary<string, Location> ReverseLocations { get; private set; }. + /// + public static string RuntimeDeploymentLocationError { + get { + return ResourceManager.GetString("RuntimeDeploymentLocationError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Preparing runtime deployment for service '{0}'. + /// + public static string RuntimeDeploymentStart { + get { + return ResourceManager.GetString("RuntimeDeploymentStart", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WARNING Runtime Mismatch: Are you sure that you want to publish service '{0}' using an Azure runtime version that does not match your local runtime version?. + /// + public static string RuntimeMismatchWarning { + get { + return ResourceManager.GetString("RuntimeMismatchWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RUNTIMEOVERRIDEURL. + /// + public static string RuntimeOverrideKey { + get { + return ResourceManager.GetString("RuntimeOverrideKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /runtimemanifest/runtimes/runtime. + /// + public static string RuntimeQuery { + get { + return ResourceManager.GetString("RuntimeQuery", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RUNTIMEID. + /// + public static string RuntimeTypeKey { + get { + return ResourceManager.GetString("RuntimeTypeKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RUNTIMEURL. + /// + public static string RuntimeUrlKey { + get { + return ResourceManager.GetString("RuntimeUrlKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RUNTIMEVERSIONPRIMARYKEY. + /// + public static string RuntimeVersionPrimaryKey { + get { + return ResourceManager.GetString("RuntimeVersionPrimaryKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to scaffold.xml. + /// + public static string ScaffoldXml { + get { + return ResourceManager.GetString("ScaffoldXml", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A job collection with name "{0}" already exists in {1}. Please specify a different name.. + /// + public static string SchedulerExistingJobCollection { + get { + return ResourceManager.GetString("SchedulerExistingJobCollection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A valid value for ClientCertificatePfx and ClientCertificatePassword parameters are required for Http scheduler jobs with ClientCertificate authentication type.. + /// + public static string SchedulerInvalidClientCertAuthRequest { + get { + return ResourceManager.GetString("SchedulerInvalidClientCertAuthRequest", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid location entered. Pick one of the locations from Get-AzureSchedulerLocation. + /// + public static string SchedulerInvalidLocation { + get { + return ResourceManager.GetString("SchedulerInvalidLocation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to For None authentication type, both ClientCertificatePfx and ClientCertificatePassword parameters should be null. + /// + public static string SchedulerInvalidNoneAuthRequest { + get { + return ResourceManager.GetString("SchedulerInvalidNoneAuthRequest", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription already has a free job collection. Only one free job collection can be created per subscription.. + /// + public static string SchedulerNoMoreFreeJobCollection { + get { + return ResourceManager.GetString("SchedulerNoMoreFreeJobCollection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service {0} already exists on disk in location {1}. + /// + public static string ServiceAlreadyExistsOnDisk { + get { + return ResourceManager.GetString("ServiceAlreadyExistsOnDisk", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No ServiceBus authorization rule with the given characteristics was found. + /// + public static string ServiceBusAuthorizationRuleNotFound { + get { + return ResourceManager.GetString("ServiceBusAuthorizationRuleNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service bus entity '{0}' is not found.. + /// + public static string ServiceBusEntityTypeNotFound { + get { + return ResourceManager.GetString("ServiceBusEntityTypeNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Server Error. This could happen due to an incorrect/missing namespace. + /// + public static string ServiceBusNamespaceMissingMessage { + get { + return ResourceManager.GetString("ServiceBusNamespaceMissingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service configuration. + /// + public static string ServiceConfiguration { + get { + return ResourceManager.GetString("ServiceConfiguration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service definition. + /// + public static string ServiceDefinition { + get { + return ResourceManager.GetString("ServiceDefinition", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceDefinition.csdef. + /// + public static string ServiceDefinitionFileName { + get { + return ResourceManager.GetString("ServiceDefinitionFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceDefinition.csdef. + /// + public static string ServiceDefinitionFileName1 { + get { + return ResourceManager.GetString("ServiceDefinitionFileName1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}Deploy. + /// + public static string ServiceDeploymentName { + get { + return ResourceManager.GetString("ServiceDeploymentName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified cloud service "{0}" does not exist.. + /// + public static string ServiceDoesNotExist { + get { + return ResourceManager.GetString("ServiceDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} slot for service {1} is in {2} state, please wait until it finish and update it's status. + /// + public static string ServiceIsInTransitionState { + get { + return ResourceManager.GetString("ServiceIsInTransitionState", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Begin Operation: {0}. + /// + public static string ServiceManagementExecuteClientActionBeginOperation { + get { + return ResourceManager.GetString("ServiceManagementExecuteClientActionBeginOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Completed Operation: {0}. + /// + public static string ServiceManagementExecuteClientActionCompletedOperation { + get { + return ResourceManager.GetString("ServiceManagementExecuteClientActionCompletedOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Begin Operation: {0}. + /// + public static string ServiceManagementExecuteClientActionInOCSBeginOperation { + get { + return ResourceManager.GetString("ServiceManagementExecuteClientActionInOCSBeginOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Completed Operation: {0}. + /// + public static string ServiceManagementExecuteClientActionInOCSCompletedOperation { + get { + return ResourceManager.GetString("ServiceManagementExecuteClientActionInOCSCompletedOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service name. + /// + public static string ServiceName { + get { + return ResourceManager.GetString("ServiceName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided service name {0} already exists, please pick another name. + /// + public static string ServiceNameExists { + get { + return ResourceManager.GetString("ServiceNameExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided service name {0} already exists, please pick another name. + /// + public static string ServiceNameExists1 { + get { + return ResourceManager.GetString("ServiceNameExists1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please provide name for the hosted service. + /// + public static string ServiceNameMissingMessage { + get { + return ResourceManager.GetString("ServiceNameMissingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service parent directory. + /// + public static string ServiceParentDirectory { + get { + return ResourceManager.GetString("ServiceParentDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service {0} removed successfully. + /// + public static string ServiceRemovedMessage { + get { + return ResourceManager.GetString("ServiceRemovedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service directory. + /// + public static string ServiceRoot { + get { + return ResourceManager.GetString("ServiceRoot", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service settings. + /// + public static string ServiceSettings { + get { + return ResourceManager.GetString("ServiceSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The storage account name '{0}' is invalid. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.. + /// + public static string ServiceSettings_ValidateStorageAccountName_InvalidName { + get { + return ResourceManager.GetString("ServiceSettings_ValidateStorageAccountName_InvalidName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The storage account name '{0}' is invalid. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.. + /// + public static string ServiceSettings_ValidateStorageAccountName_InvalidName1 { + get { + return ResourceManager.GetString("ServiceSettings_ValidateStorageAccountName_InvalidName1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service settings. + /// + public static string ServiceSettings1 { + get { + return ResourceManager.GetString("ServiceSettings1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The {0} slot for cloud service {1} doesn't exist.. + /// + public static string ServiceSlotDoesNotExist { + get { + return ResourceManager.GetString("ServiceSlotDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} slot for service {1} is {2}. + /// + public static string ServiceStatusChanged { + get { + return ResourceManager.GetString("ServiceStatusChanged", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Set Add-On Confirmation. + /// + public static string SetAddOnConformation { + get { + return ResourceManager.GetString("SetAddOnConformation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note - You will be charged the amount for the new plan, without being refunded for time remaining + ///in the existing plan. + ///By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis + ///for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) + ///agree to the {2}'s terms of user and privacy statement at {0} and (c) agree to sharing my + ///contact information with {2}.. + /// + public static string SetMicrosoftAddOnMessage { + get { + return ResourceManager.GetString("SetMicrosoftAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note - You will be charged the amount for the new plan, without being refunded for time remaining + ///in the existing plan. + ///By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis + ///for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) + ///acknowledge the offering is provided by {2}, not Microsoft, and agree to {2}'s terms of + ///use and privacy statement at <url> and (c) agree to sharing my contact information with {2}.. + /// + public static string SetNonMicrosoftAddOnMessage { + get { + return ResourceManager.GetString("SetNonMicrosoftAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role {0} instances are set to {1}. + /// + public static string SetRoleInstancesMessage { + get { + return ResourceManager.GetString("SetRoleInstancesMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {"Slot":"","Location":"","Subscription":"","StorageAccountName":""}. + /// + public static string SettingsFileEmptyContent { + get { + return ResourceManager.GetString("SettingsFileEmptyContent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to deploymentSettings.json. + /// + public static string SettingsFileName { + get { + return ResourceManager.GetString("SettingsFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to deploymentSettings.json. + /// + public static string SettingsFileName1 { + get { + return ResourceManager.GetString("SettingsFileName1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Confirm. + /// + public static string ShouldProcessCaption { + get { + return ResourceManager.GetString("ShouldProcessCaption", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Confirm. + /// + public static string ShouldProcessCaption1 { + get { + return ResourceManager.GetString("ShouldProcessCaption1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Shutdown. + /// + public static string Shutdown { + get { + return ResourceManager.GetString("Shutdown", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /sites:{0};{1};"{2}/{0}" . + /// + public static string SitesArgTemplate { + get { + return ResourceManager.GetString("SitesArgTemplate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please specify CreateACSNamespace as true or false for better future compatibility.. + /// + public static string SpecifyCreateACSNamespace { + get { + return ResourceManager.GetString("SpecifyCreateACSNamespace", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 1000. + /// + public static string StandardRetryDelayInMs { + get { + return ResourceManager.GetString("StandardRetryDelayInMs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Start. + /// + public static string Start { + get { + return ResourceManager.GetString("Start", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Started. + /// + public static string StartedEmulator { + get { + return ResourceManager.GetString("StartedEmulator", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Starting Emulator.... + /// + public static string StartingEmulator { + get { + return ResourceManager.GetString("StartingEmulator", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to start. + /// + public static string StartStorageEmulatorCommandArgument { + get { + return ResourceManager.GetString("StartStorageEmulatorCommandArgument", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Stop. + /// + public static string Stop { + get { + return ResourceManager.GetString("Stop", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Stopping emulator.... + /// + public static string StopEmulatorMessage { + get { + return ResourceManager.GetString("StopEmulatorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Stopped. + /// + public static string StoppedEmulatorMessage { + get { + return ResourceManager.GetString("StoppedEmulatorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to stop. + /// + public static string StopStorageEmulatorCommandArgument { + get { + return ResourceManager.GetString("StopStorageEmulatorCommandArgument", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account Name:. + /// + public static string StorageAccountName { + get { + return ResourceManager.GetString("StorageAccountName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find storage account '{0}' please type the name of an existing storage account.. + /// + public static string StorageAccountNotFound { + get { + return ResourceManager.GetString("StorageAccountNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WAStorageEmulator.exe. + /// + public static string StorageEmulatorExe { + get { + return ResourceManager.GetString("StorageEmulatorExe", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to InstallPath. + /// + public static string StorageEmulatorInstallPathRegistryKeyValue { + get { + return ResourceManager.GetString("StorageEmulatorInstallPathRegistryKeyValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SOFTWARE\Microsoft\Windows Azure Storage Emulator. + /// + public static string StorageEmulatorRegistryKey { + get { + return ResourceManager.GetString("StorageEmulatorRegistryKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Primary Key:. + /// + public static string StoragePrimaryKey { + get { + return ResourceManager.GetString("StoragePrimaryKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Secondary Key:. + /// + public static string StorageSecondaryKey { + get { + return ResourceManager.GetString("StorageSecondaryKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription named {0} already exists.. + /// + public static string SubscriptionAlreadyExists { + get { + return ResourceManager.GetString("SubscriptionAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to DefaultSubscriptionData.xml. + /// + public static string SubscriptionDataFileName { + get { + return ResourceManager.GetString("SubscriptionDataFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription data file {0} does not exist.. + /// + public static string SubscriptionDataFileNotFound { + get { + return ResourceManager.GetString("SubscriptionDataFileNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided subscription name doesn't exist in the imported publish profile. If subscriptions have changed for the hosted service, retrieve an updated profile by using Get-AzurePublishSettingsFile then import the profile using Import-AzurePublishSettingsFile. + /// + public static string SubscriptionIdNotFoundMessage { + get { + return ResourceManager.GetString("SubscriptionIdNotFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided subscription name doesn't exist in the imported publish profile. If subscriptions have changed for the hosted service, retrieve an updated profile by using Get-AzurePublishSettingsFile then import the profile using Import-AzurePublishSettingsFile. + /// + public static string SubscriptionIdNotFoundMessage1 { + get { + return ResourceManager.GetString("SubscriptionIdNotFoundMessage1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Subscription must not be null. + /// + public static string SubscriptionMustNotBeNull { + get { + return ResourceManager.GetString("SubscriptionMustNotBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Suspend. + /// + public static string Suspend { + get { + return ResourceManager.GetString("Suspend", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Swapping website production slot .... + /// + public static string SwappingWebsite { + get { + return ResourceManager.GetString("SwappingWebsite", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The website does not contain a slot named: {0}. + /// + public static string SwapWebsiteSlotInvalidSlotWarning { + get { + return ResourceManager.GetString("SwapWebsiteSlotInvalidSlotWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The website must have at least two slots to apply swap. + /// + public static string SwapWebsiteSlotRequire2SlotsWarning { + get { + return ResourceManager.GetString("SwapWebsiteSlotRequire2SlotsWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The website has more than 2 slots you must specify which ones to swap. + /// + public static string SwapWebsiteSlotSpecifySlotsWarning { + get { + return ResourceManager.GetString("SwapWebsiteSlotSpecifySlotsWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to swap the website '{0}' slot '{1}' with slot '{2}'?. + /// + public static string SwapWebsiteSlotWarning { + get { + return ResourceManager.GetString("SwapWebsiteSlotWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to create Django application: {0}. + /// + public static string UnableToCreateDjangoApp { + get { + return ResourceManager.GetString("UnableToCreateDjangoApp", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Make sure you have Python 2.7 installed along with Django installed to site-packages.. + /// + public static string UnableToCreateDjangoAppFix { + get { + return ResourceManager.GetString("UnableToCreateDjangoAppFix", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to update mismatching Json structured: {0} {1}.. + /// + public static string UnableToPatchJson { + get { + return ResourceManager.GetString("UnableToPatchJson", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provider {0} is unknown.. + /// + public static string UnknownProviderMessage { + get { + return ResourceManager.GetString("UnknownProviderMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Update. + /// + public static string Update { + get { + return ResourceManager.GetString("Update", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Updated settings for subscription '{0}'. Current subscription is '{1}'.. + /// + public static string UpdatedSettings { + get { + return ResourceManager.GetString("UpdatedSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please wait.... + /// + public static string WaitMessage { + get { + return ResourceManager.GetString("WaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The azure storage emulator is not installed, skip launching.... + /// + public static string WarningWhenStorageEmulatorIsMissing { + get { + return ResourceManager.GetString("WarningWhenStorageEmulatorIsMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Web.cloud.config. + /// + public static string WebCloudConfig { + get { + return ResourceManager.GetString("WebCloudConfig", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to web.config. + /// + public static string WebConfigTemplateFileName { + get { + return ResourceManager.GetString("WebConfigTemplateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MSDeploy. + /// + public static string WebDeployKeywordInWebSitePublishProfile { + get { + return ResourceManager.GetString("WebDeployKeywordInWebSitePublishProfile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot build the project successfully. Please see logs in {0}.. + /// + public static string WebProjectBuildFailTemplate { + get { + return ResourceManager.GetString("WebProjectBuildFailTemplate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WebRole. + /// + public static string WebRole { + get { + return ResourceManager.GetString("WebRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to setup_web.cmd > log.txt. + /// + public static string WebRoleStartupTaskCommandLine { + get { + return ResourceManager.GetString("WebRoleStartupTaskCommandLine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WebRole.xml. + /// + public static string WebRoleTemplateFileName { + get { + return ResourceManager.GetString("WebRoleTemplateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WebSite with given name {0} already exists in the specified Subscription and Webspace.. + /// + public static string WebsiteAlreadyExists { + get { + return ResourceManager.GetString("WebsiteAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WebSite with given name {0} already exists in the specified Subscription and Location.. + /// + public static string WebsiteAlreadyExistsReplacement { + get { + return ResourceManager.GetString("WebsiteAlreadyExistsReplacement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Site {0} already has repository created for it.. + /// + public static string WebsiteRepositoryAlreadyExists { + get { + return ResourceManager.GetString("WebsiteRepositoryAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Workspaces/WebsiteExtension/Website/{0}/dashboard/. + /// + public static string WebsiteSufixUrl { + get { + return ResourceManager.GetString("WebsiteSufixUrl", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to https://{0}/msdeploy.axd?site={1}. + /// + public static string WebSiteWebDeployUriTemplate { + get { + return ResourceManager.GetString("WebSiteWebDeployUriTemplate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WorkerRole. + /// + public static string WorkerRole { + get { + return ResourceManager.GetString("WorkerRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to setup_worker.cmd > log.txt. + /// + public static string WorkerRoleStartupTaskCommandLine { + get { + return ResourceManager.GetString("WorkerRoleStartupTaskCommandLine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WorkerRole.xml. + /// + public static string WorkerRoleTemplateFileName { + get { + return ResourceManager.GetString("WorkerRoleTemplateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to (x86). + /// + public static string x86InProgramFiles { + get { + return ResourceManager.GetString("x86InProgramFiles", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Yes. + /// + public static string Yes { + get { + return ResourceManager.GetString("Yes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Yes, I agree. + /// + public static string YesHint { + get { + return ResourceManager.GetString("YesHint", resourceCulture); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Properties/Resources.resx b/src/ServiceManagement/Services/Commands.Utilities/Properties/Resources.resx new file mode 100644 index 000000000000..39a13875d20d --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Properties/Resources.resx @@ -0,0 +1,1607 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + The remote server returned an error: (401) Unauthorized. + + + Account "{0}" has been added. + + + To switch to a different subscription, please use Select-AzureSubscription. + + + Subscription "{0}" is selected as the default subscription. + + + To view all the subscriptions, please use Get-AzureSubscription. + + + Add-On {0} is created successfully. + + + Add-on name {0} is already used. + + + Add-On {0} not found. + + + Add-on {0} is removed successfully. + + + Add-On {0} is updated successfully. + + + http://www.windowsazure.com/en-us/store/service/?id={0} + + + Role has been created at {0}\{1}. + + + Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for Node.js by running ‘npm install azure’. + + + Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for PHP by running "pear WindowsAzure/WindowsAzure". + + + Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for Python by running "pip windowsazure". + + + Unable to set role permissions. Please give the 'Network Service' user 'Read & execute' and 'Modify' permissions to the role folder, or run PowerShell as an Administrator + + + A role name '{0}' already exists + + + Windows Azure Powershell\ + + + Windows Azure Powershell + + + Emulator + + + Azure Emulator is not installed and is required + + + You must run PowerShell from an elevated PowerShell window to use the Azure Emulator. Please restart your PowerShell window as an administrator. + + + Azure Emulator\emulator + + + SOFTWARE\Microsoft\Windows Azure Emulator + + + https://manage.windowsazure.com + + + AZURE_PORTAL_URL + + + Azure SDK\{0}\ + + + Azure SDK Deployment Cmdlets + + + InstallPath + + + SOFTWARE\Microsoft\Microsoft SDKs\ServiceHosting + + + The installed Azure SDK version is not supported. Make sure you version is between {0} and {1} inclusive + + + Azure service management error +{0} + + + Azure Authoring Tools are not installed and are required + + + Base Uri was empty. + WAPackIaaS + + + {0} begin processing without ParameterSet. + + + {0} begin processing with ParameterSet '{1}'. + + + Blob with the name {0} already exists in the account. + + + https://{0}.blob.core.windows.net/ + + + AZURE_BLOBSTORAGE_TEMPLATE + + + Memcache is already enabled for role '{0}'. + + + <configuration> + <configSections> + <section name="dataCacheClients" type="Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core" allowLocation="true" allowDefinition="Everywhere" /> + </configSections> + <dataCacheClients> + <tracing sinkType="DiagnosticSink" traceLevel="Error" /> + <dataCacheClient name="DefaultShimConfig" useLegacyProtocol="false"> + <autoDiscover isEnabled="true" identifier="$RoleName$" /> + </dataCacheClient> + </dataCacheClients> +</configuration> + + + Microsoft.WindowsAzure.Plugins.Caching.ClientDiagnosticLevel + + + DiagnosticStore + + + Please upgrade the cache runtime of role '{0}' to '{1}' using Set-AzureServiceProjectRole -RoleName {0} -Runtime Cache -Version {1} + + + CACHERUNTIMEURL + + + cache + + + CacheRuntimeVersion + + + Resources\Scaffolding\Cache + + + setup_cache.cmd > cache_log.txt + + + Installing caching version {0} for Role '{1}' (the caching version locally installed is: {2}) + + + Microsoft.WindowsAzure.Plugins.Caching.CacheSizePercentage + + + Microsoft.WindowsAzure.Plugins.Caching.ConfigStoreConnectionString + + + DefaultEndpointsProtocol=https;AccountName={0};AccountKey={1} + + + Caching + + + Cannot find {0} with name {1}. + + + Deployment for service {0} with {1} slot doesn't exist + + + Can't find valid Microsoft Azure role in current directory {0} + + + service {0} configuration file (ServiceConfiguration.Cloud.cscfg) is either null or doesn't exist + + + Invalid service path! Cannot locate ServiceDefinition.csdef in current folder or parent folders. + + + The subscription named {0} with id {1} is not currently imported. You must import this subscription before it can be updated. + + + ManagementCertificate + + + certificate.pfx + + + Certificate imported into CurrentUser\My\{0} + + + No certificate was found in the certificate store with thumbprint {0} + + + No certificate was found in the certificate store with thumbprint {0} + + + Your account does not have access to the private key for certificate {0} + + + {0} {1} deployment for {2} service + + + Cloud service {0} is in {1} state. + + + Changing/Removing public environment '{0}' is not allowed. + + + Service {0} is set to value {1} + + + Choose which publish settings file to use: + + + Microsoft.WindowsAzure.Plugins.Caching.ClientDiagnosticLevel + + + 1 + + + cloud_package.cspkg + + + ServiceConfiguration.Cloud.cscfg + + + Add-ons for {0} + + + Communication could not be established. This could be due to an invalid subscription ID. Note that subscription IDs are case sensitive. + + + Complete + + + Complete + + + config.json + + + VirtualMachine creation failed. + WAPackIaaS + + + Creating the website failed. If this is the first website for this subscription, please create it using the management portal instead. + + + Creating {0} package... + + + CsEncrypt.exe failed to generate a certificate ({0}) + + + New-PasswordEncryptionCertificate -FriendlyName "Microsoft Azure Certificate" + + + csencrypt.exe + + + "{0}\ServiceDefinition.csdef" /out:"{0}\cloud_package.cspkg" {1} {2} + + + cspack.exe + + + cspack.exe failed with no detail error information. + + + "{0}\ServiceDefinition.csdef" /out:"{0}\local_package.csx" {1} {2} /copyOnly + + + An unexpected failure occurred. Details: +{0} + + + /usefullemulator + + + csrun.exe + + + /launchbrowser + + + /removeall + + + /remove:{0} + + + /devfabric + + + /devstore + + + /devfabric:shutdown + + + /update:{0};{1} + + + Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core + + + //blobcontainer[@datacenter='{0}'] + + + Setting: {0} as the default and current subscription. To view other subscriptions use Get-AzureSubscription + + + none + + + There are no hostnames which could be used for validation. + + + 8080 + + + 1000 + + + Auto + + + 80 + + + Delete + WAPackIaaS + + + The {0} slot for service {1} is already in {2} state + + + The deployment in {0} slot for service {1} is removed + + + Microsoft.WindowsAzure.Plugins.Caching.DiagnosticLevel + + + 1 + + + The key to add already exists in the dictionary. + + + The array index cannot be less than zero. + + + The supplied array does not have enough room to contain the copied elements. + + + The provided dns {0} doesn't exist + + + EMULATED + + + UseDevelopmentStorage=true + + + ((http|tcp)://[0-9.:/]*) + + + Role is running at {0} + + + Cannot enable Remote Desktop because there are no roles + + + Password is not complex enough. The password should include at least three different kinds of characters (uppercase, lowercase, digits, and other symbols) and be at least six characters long. + + + Memcache is enabled for role '{0}' using cache role '{1}' to connect use server name 'localhost_{0}' with port {2}. + + + Microsoft Azure Certificate + + + Endpoint can't be retrieved for storage account + + + {0} end processing. + + + The environment '{0}' already exists. + + + The environment name '{0}' is not found. + + + environments.xml + + + Error creating VirtualMachine + WAPackIaaS + + + Unable to download available runtimes for location '{0}' + + + Error updating VirtualMachine + WAPackIaaS + + + Your Microsoft Azure credential in the Windows PowerShell session has expired. Please use Add-AzureAccount to login again. + + + Job Id {0} failed. Error: {1}, ExceptionDetails: {2} + WAPackIaaS + + + The HTTP request was forbidden with client authentication scheme 'Anonymous'. + + + This add-on requires you to purchase the first instance through the Microsoft Azure Portal. Subsequent purchases can be performed through PowerShell. + + + Operation Status: + + + Resources\Scaffolding\General + + + Getting all available Microsoft Azure Add-Ons, this may take few minutes... + + + Name{0}Primary Key{0}Seconday Key + + + Git not found. Please install git and place it in your command line path. + + + Could not find publish settings. Please run Import-AzurePublishSettingsFile. + + + Could not find publish settings. Please run Import-AzurePublishSettingsFile. + + + iisnode.dll + + + iisnode + + + iisnode-dev\\release\\x64 + + + iisnode + + + Installing IISNode version {0} in Azure for WebRole '{1}' (the version locally installed is: {2}) + + + Illegal characters in path. + + + Illegal characters in path. + + + Internal Server Error + + + Cannot enable memcach protocol on a cache worker role {0}. + + + Invalid certificate format. Publish settings may be corrupted. Use Get-AzurePublishSettingsFile to download updated settings + + + Invalid certificate format. Publish settings may be corrupted. Use Get-AzurePublishSettingsFile to download updated settings + + + Invalid certificate format. + + + The provided configuration path is invalid or doesn't exist + + + The country name is invalid, please use a valid two character country code, as described in ISO 3166-1 alpha-2. + + + The management certificate of the current subscription is invalid. Use Set-AzureSubscription to fix the management certificate or use Select-AzureSubscription to use a different subscription. + + + No default subscription has been designated. Use Select-AzureSubscription -Default <subscriptionName> to set the default subscription. + + + Deployment with {0} does not exist + + + The deployment slot name {0} is invalid. Slot name must be either "Staging" or "Production". + + + "{0}" is an invalid DNS name for {1} + + + Invalid service endpoint. + + + The provided file in {0} must be have {1} extension + + + File {0} has invalid characters + + + You must create your git publishing credentials using the Microsoft Azure portal. +Please follow these steps in the portal: +1. On the left side open "Web Sites" +2. Click on any website +3. Choose "Setup Git Publishing" or "Reset deployment credentials" +4. Back in the PowerShell window, rerun this command by typing "New-AzureWebSite {site name} -Git -PublishingUsername {username} + + + The value {0} provided is not a valid GUID. Please provide a valid GUID. + + + The specified hostname does not exist. Please specify a valid hostname for the site. + + + Role {0} instances must be greater than or equal 0 and less than or equal 20 + + + There was an error creating your webjob. Please make sure that the script is in the root folder of the zip file. + + + Cannot create instance of management client type {0}. It does not have the expected constructor. + + + Could not download a valid runtime manifest, Please check your internet connection and try again. + + + The account {0} was not found. Please specify a valid account name. + + + The provided name "{0}" does not match the service bus namespace naming rules. + + + Value cannot be null. Parameter name: '{0}' + + + {0} is invalid or empty + + + The provided package path is invalid or doesn't exist + + + '{0}' is an invalid parameter set name. + + + {0} doesn't exist in {1} or you've not passed valid value for it + + + Path {0} has invalid characters + + + The provided publish settings file {0} has invalid content. Please get valid by running cmdlet Get-AzurePublishSettingsFile + + + The provided publish settings file {0} has invalid content. Please get valid by running cmdlet Get-AzurePublishSettingsFile + + + The provided role name "{0}" has invalid characters + + + A valid name for the service root folder is required + + + {0} is not a recognized runtime type + + + A valid language is required + + + No subscription is currently selected. Use Select-Subscription to activate a subscription. + + + The provided location "{0}" does not exist in the available locations use Get-AzureSBLocation for listing available locations. + + + Please provide a service name or run this command from inside a service project directory. + + + You must provide valid value for {0} + + + You must provide valid value for {0} + + + settings.json is invalid or doesn't exist + + + The subscription named '{0}' cannot be found. Use Set-AzureSubscription to initialize the subscription data. + + + The provided subscription if {0} is not valid + + + Must specify a non-null subscription name. + + + A valid subscription name is required. This can be provided using the -Subscription parameter or by setting the subscription via the Set-AzureSubscription cmdlet + + + The provided subscriptions file {0} has invalid content. + + + Please run Add-AzureAccount to finish setting up the subscription. + + + Role {0} VM size should be ExtraSmall, Small, Medium, Large or ExtraLarge. + + + The web job file must have *.zip extension + + + Singleton option works for continuous jobs only. + + + The website {0} was not found. Please specify a valid website name. + + + No job for id: {0} was found. + WAPackIaaS + + + engines + + + Scaffolding for this language is not yet supported + + + Link already established + + + local_package.csx + + + ServiceConfiguration.Local.cscfg + + + Looking for {0} deployment for {1} cloud service... + + + Looking for cloud service {0}... + + + managementCertificate.pem + + + ?whr={0} + + + //baseuri + + + uri + + + http://api.datamarket.azure.com/CatalogService.svc + + + v2.5 + + + memcache_default + + + 11211 + + + v2.5 + + + Python 2.7 is not installed. Please install it as well as Django 1.4. + + + Multiple Add-Ons found holding name {0} + + + Multiple possible publishing users. Please go to the Portal and use the listed deployment user, or click 'set/reset deployment credentials' to set up a new user account, then reurn this cmdlet and specify PublishingUsername. + + + The first publish settings file "{0}" is used. If you want to use another file specify the file name. + + + Microsoft.WindowsAzure.Plugins.Caching.NamedCaches + + + {"caches":[{"name":"default","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":10,"isExpirable":true,"type":1},"serverNotification":{"isEnabled":false}},"secondaries":0}]} + + + A publishing username is required. Please specify one using the argument PublishingUsername. + + + New Add-On Confirmation + + + By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis +for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) +agree to the {2}'s terms of user and privacy statement at {0} and (c) agree to sharing my +contact information with {2}. + + + Internal Server Error. This could happen because the namespace name is already used or due to an incorrect location name. Use Get-AzureSBLocation cmdlet to list valid names. + + + By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis +for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) +acknowledge the offering is provided by {2}, not Microsoft, and agree to {2}'s terms of +use and privacy statement at {0} and (c) agree to sharing my contact information with {2}. + + + Service has been created at {0} + + + No + + + There is no access token cached for subscription {0}, user id {1}. Use the Add-AzureAccount cmdlet to log in again and get a token for this subscription. + + + The service does not have any cache worker roles, add one first by running cmdlet Add-AzureCacheWorkerRole. + + + No clouds available + WAPackIaaS + + + nodejs + + + node + + + node.exe + + + There is no default subscription set, please set a default subscription by running Set-AzureSubscription -Default <subscription name> + + + Microsoft SDKs\Azure\Nodejs\Nov2011 + + + nodejs + + + node + + + Resources\Scaffolding\Node + + + Microsoft.WindowsAzure.Commands.CloudService.ScaffoldingResources.Node + + + Installing Node version {0} in Azure for Role '{1}' (the Node version locally installed is: {2}) + + + No, I do not agree + + + Please connect to internet before executing this cmdlet + + + Please connect to internet before executing this cmdlet + + + No publish settings files with extension *.publishsettings are found in the directory "{0}". + + + '{0}' must be a cache worker role. Verify that it has proper cache worker role configuration. + + + Certificate can't be null. + + + {0} could not be null or empty + + + Unable to add a null RoleSettings to {0} + + + Unable to add new role to null service definition + + + The request offer '{0}' is not found. + + + Operation "{0}" failed on VM with ID: {1} + WAPackIaaS + + + The REST operation failed with message '{0}' and error code '{1}' + + + Job Id {0} did not complete within expected time or it is in Failed/Canceled/Invalid state. + WAPackIaaS + + + package + + + Package is created at service root path {0}. + + + {{ + "author": "", + + "name": "{0}", + "version": "0.0.0", + "dependencies":{{}}, + "devDependencies":{{}}, + "optionalDependencies": {{}}, + "engines": {{ + "node": "*", + "iisnode": "*" + }} + +}} + + + + package.json + + + Path {0} doesn't exist. + + + Path for {0} doesn't exist in {1}. + + + 5.4.0 + + + php + + + Resources\Scaffolding\PHP + + + Microsoft.WindowsAzure.Commands.CloudService.ScaffoldingResources.PHP + + + Installing PHP version {0} for Role '{1}' (the PHP version locally installed is: {2}) + + + You must create your first web site using the Microsoft Azure portal. +Please follow these steps in the portal: +1. At the bottom of the page, click on New > Web Site > Quick Create +2. Type {0} in the URL field +3. Click on "Create Web Site" +4. Once the site has been created, click on the site name +5. Click on "Set up Git publishing" or "Reset deployment credentials" and setup a publishing username and password. Use those credentials for all new websites you create. + + + 6. Back in the console window, rerun this command by typing "New-AzureWebsite <site name> -Git" + + + Promotion code can be used only when updating to a new plan. + + + Service not published at user request. + + + Complete. + + + Connecting... + + + Created Deployment ID: {0}. + + + Created hosted service '{0}'. + + + Created Website URL: {0}. + + + Creating... + + + Initializing... + + + busy + + + creating the virtual machine + + + Instance {0} of role {1} is {2}. + + + ready + + + Preparing deployment for {0} with Subscription ID: {1}... + + + Publishing {0} to Microsoft Azure. This may take several minutes... + + + publish settings + + + Azure + + + .PublishSettings + + + publishSettings.xml + + + &whr={0} + + + Publish settings imported + + + AZURE_PUBLISHINGPROFILE_URL + + + Starting... + + + Upgrading... + + + Uploading Package to storage service {0}... + + + Verifying storage account '{0}'... + + + Resources\Scaffolding\Python + + + Replace current deployment with '{0}' Id ? + + + Are you sure you want to regenerate key? + + + Generate new key. + + + Are you sure you want to remove account '{0}'? + + + Removing account + + + Remove Add-On Confirmation + + + If you delete this add-on, your data may be deleted and the operation may not be undone. You may have to purchase it again from the Microsoft Azure Store to use it. The price of the add-on may not be refunded. Are you sure you want to delete this add-on? Enter “Yes” to confirm. + + + Removing cloud service {0}... + + + The current subscription is being removed. Use Select-Subscription <subscriptionName> to select a new current subscription. + + + The default subscription is being removed. Use Select-Subscription <subscriptionName> to select a new default subscription. + + + Removing {0} deployment for {1} service + + + Removing job collection + + + Are you sure you want to remove the job collection "{0}" + + + Removing job + + + Are you sure you want to remove the job "{0}" + + + Are you sure you want to remove the account? + + + Account removed. + + + Internal Server Error. This could happen because the namespace does not exist or it does not exist under your subscription. + + + Removing old package {0}... + + + Are you sure you want to delete the namespace '{0}'? + + + Are you sure you want to remove cloud service? + + + Remove cloud service and all it's deployments + + + Are you sure you want to remove subscription '{0}'? + + + Removing subscription + + + Are you sure you want to delete the VM '{0}'? + + + Deleting VM. + + + Removing WebJob... + + + Are you sure you want to remove job '{0}'? + + + Removing website + + + Are you sure you want to remove the website "{0}" + + + Deleting namespace + + + Repository is not setup. You need to pass a valid site name. + + + Reserved IP with the Name:'{0}' will no longer be in use after the deployment is deleted, and it is still reserved for later use. + + + Resource with ID : {0} does not exist. + WAPackIaaS + + + Restart + WAPackIaaS + + + Resume + WAPackIaaS + + + /role:{0};"{1}/{0}" + + + bin + + + Role {0} is {1} + + + 20 + + + role name + + + The provided role name {0} doesn't exist + + + RoleSettings.xml + + + Role type {0} doesn't exist + + + /run:"{0}";"{1}" {2} /useiisexpress + + + public static Dictionary<string, Location> ReverseLocations { get; private set; } + + + Preparing runtime deployment for service '{0}' + + + WARNING Runtime Mismatch: Are you sure that you want to publish service '{0}' using an Azure runtime version that does not match your local runtime version? + + + RUNTIMEOVERRIDEURL + + + /runtimemanifest/runtimes/runtime + + + RUNTIMEID + + + RUNTIMEURL + + + RUNTIMEVERSIONPRIMARYKEY + + + scaffold.xml + + + Invalid location entered. Pick one of the locations from Get-AzureSchedulerLocation + + + Service {0} already exists on disk in location {1} + + + No ServiceBus authorization rule with the given characteristics was found + + + The service bus entity '{0}' is not found. + + + Internal Server Error. This could happen due to an incorrect/missing namespace + + + service configuration + + + service definition + + + ServiceDefinition.csdef + + + ServiceDefinition.csdef + + + {0}Deploy + + + The specified cloud service "{0}" does not exist. + + + {0} slot for service {1} is in {2} state, please wait until it finish and update it's status + + + Begin Operation: {0} + + + Completed Operation: {0} + + + Begin Operation: {0} + + + Completed Operation: {0} + + + service name + + + The provided service name {0} already exists, please pick another name + + + The provided service name {0} already exists, please pick another name + + + Please provide name for the hosted service + + + service parent directory + + + Service {0} removed successfully + + + service directory + + + service settings + + + The storage account name '{0}' is invalid. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + + + The storage account name '{0}' is invalid. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + + + service settings + + + The {0} slot for cloud service {1} doesn't exist. + + + {0} slot for service {1} is {2} + + + Set Add-On Confirmation + + + Note - You will be charged the amount for the new plan, without being refunded for time remaining +in the existing plan. +By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis +for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) +agree to the {2}'s terms of user and privacy statement at {0} and (c) agree to sharing my +contact information with {2}. + + + Note - You will be charged the amount for the new plan, without being refunded for time remaining +in the existing plan. +By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis +for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) +acknowledge the offering is provided by {2}, not Microsoft, and agree to {2}'s terms of +use and privacy statement at <url> and (c) agree to sharing my contact information with {2}. + + + Role {0} instances are set to {1} + + + {"Slot":"","Location":"","Subscription":"","StorageAccountName":""} + + + deploymentSettings.json + + + deploymentSettings.json + + + Confirm + + + Confirm + + + Shutdown + WAPackIaaS + + + /sites:{0};{1};"{2}/{0}" + + + 1000 + + + Start + WAPackIaaS + + + Started + + + Starting Emulator... + + + start + + + Stop + WAPackIaaS + + + Stopping emulator... + + + Stopped + + + Could not delete emulator package '{0}' for the service. Please ensure that no files or folders in the package are open in other programs + + + Failed to generate package. Error: {0}." + + + stop + + + Account Name: + + + Cannot find storage account '{0}' please type the name of an existing storage account. + + + WAStorageEmulator.exe + + + InstallPath + + + SOFTWARE\Microsoft\Windows Azure Storage Emulator + + + Primary Key: + + + Secondary Key: + + + The subscription named {0} already exists. + + + DefaultSubscriptionData.xml + + + The subscription data file {0} does not exist. + + + The provided subscription name doesn't exist in the imported publish profile. If subscriptions have changed for the hosted service, retrieve an updated profile by using Get-AzurePublishSettingsFile then import the profile using Import-AzurePublishSettingsFile + + + The provided subscription name doesn't exist in the imported publish profile. If subscriptions have changed for the hosted service, retrieve an updated profile by using Get-AzurePublishSettingsFile then import the profile using Import-AzurePublishSettingsFile + + + Subscription must not be null + WAPackIaaS + + + Suspend + WAPackIaaS + + + Swapping website production slot ... + + + Are you sure you want to swap the website '{0}' slot '{1}' with slot '{2}'? + + + Unable to create Django application: {0} + + + Make sure you have Python 2.7 installed along with Django installed to site-packages. + + + Unable to update mismatching Json structured: {0} {1}. + + + The provider {0} is unknown. + + + Update + WAPackIaaS + + + Updated settings for subscription '{0}'. Current subscription is '{1}'. + + + Please wait... + + + The azure storage emulator is not installed, skip launching... + + + Web.cloud.config + + + web.config + + + MSDeploy + + + Cannot build the project successfully. Please see logs in {0}. + + + WebRole + + + setup_web.cmd > log.txt + + + WebRole.xml + + + WebSite with given name {0} already exists in the specified Subscription and Webspace. + + + WebSite with given name {0} already exists in the specified Subscription and Location. + + + Site {0} already has repository created for it. + + + Workspaces/WebsiteExtension/Website/{0}/dashboard/ + + + https://{0}/msdeploy.axd?site={1} + + + WorkerRole + + + setup_worker.cmd > log.txt + + + WorkerRole.xml + + + (x86) + + + Yes + + + Yes, I agree + + + The website does not contain a slot named: {0} + + + The website must have at least two slots to apply swap + + + The website has more than 2 slots you must specify which ones to swap + + + A job collection with name "{0}" already exists in {1}. Please specify a different name. + + + The subscription already has a free job collection. Only one free job collection can be created per subscription. + + + Error creating CloudService + WAPackIaaS + + + Error creating VMRole + WAPackIaaS + + + Are you sure you want to delete the CloudService '{0}'? + + + Deleting CloudService. + + + Are you sure you want to delete the VMRole '{0}'? + + + Deleting VMRole. + + + Are you sure you want to delete the VMNetwork '{0}'? + + + Deleting VMNetwork + + + Are you sure you want to remove the VMSubnet '{0}'? + + + Deleting VMSubnet. + + + Are you sure you want to delete the StaticIPAddressPool '{0}'? + + + Deleting StaticIPAddressPool. + + + Error creating StaticIPAddressPool + + + Error creating VMSubnet + + + Error creating VMNetwork + + + Please specify CreateACSNamespace as true or false for better future compatibility. + + + Please provide webspace name as well. + + + A valid value for ClientCertificatePfx and ClientCertificatePassword parameters are required for Http scheduler jobs with ClientCertificate authentication type. + + + For None authentication type, both ClientCertificatePfx and ClientCertificatePassword parameters should be null + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WebRole/Scaffold.xml b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WebRole/Scaffold.xml new file mode 100644 index 000000000000..53e4d35bd023 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WebRole/Scaffold.xml @@ -0,0 +1,3 @@ + + + diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WebRole/bin/setup_cache.cmd b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WebRole/bin/setup_cache.cmd new file mode 100644 index 000000000000..07556ecc6eab --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WebRole/bin/setup_cache.cmd @@ -0,0 +1,23 @@ +@echo on +cd /d "%~dp0" + +if "%EMULATED%"=="true" goto setup_emulator + +:start_cache +WindowsAzure.Caching.MemcacheShim\ClientPerfCountersInstaller.exe install +WindowsAzure.Caching.MemcacheShim\MemcacheShimInstaller.exe +if %ERRORLEVEL% neq 0 goto error + +echo SUCCESS +exit /b 0 + +:setup_emulator +echo Downloading and installing cache runtime +powershell .\download.ps1 '%CACHERUNTIMEURL%' +if %ERRORLEVEL% neq 0 goto error + +goto start_cache + +:error +echo FAILED +exit /b -1 \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WorkerRole/Scaffold.xml b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WorkerRole/Scaffold.xml new file mode 100644 index 000000000000..c0f813bbfd65 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WorkerRole/Scaffold.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WorkerRole/setup_cache.cmd b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WorkerRole/setup_cache.cmd new file mode 100644 index 000000000000..37685c2df2e8 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WorkerRole/setup_cache.cmd @@ -0,0 +1,23 @@ +@echo on +cd /d "%~dp0" + +if "%EMULATED%"=="true" goto setup_emulator + +:start_cache +bin\WindowsAzure.Caching.MemcacheShim\ClientPerfCountersInstaller.exe install +bin\WindowsAzure.Caching.MemcacheShim\MemcacheShimInstaller.exe +if %ERRORLEVEL% neq 0 goto error + +echo SUCCESS +exit /b 0 + +:setup_emulator +echo Downloading and installing cache runtime +powershell .\download.ps1 '%CACHERUNTIMEURL%' +if %ERRORLEVEL% neq 0 goto error + +goto start_cache + +:error +echo FAILED +exit /b -1 \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WorkerRole/web.config b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WorkerRole/web.config new file mode 100644 index 000000000000..1d39964e6d65 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WorkerRole/web.config @@ -0,0 +1,23 @@ + + + +
+ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/Scaffold.xml b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/Scaffold.xml new file mode 100644 index 000000000000..b3274e31b8c3 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/Scaffold.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/ServiceConfiguration.Cloud.cscfg b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/ServiceConfiguration.Cloud.cscfg new file mode 100644 index 000000000000..66675a0def78 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/ServiceConfiguration.Cloud.cscfg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/ServiceConfiguration.Local.cscfg b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/ServiceConfiguration.Local.cscfg new file mode 100644 index 000000000000..66675a0def78 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/ServiceConfiguration.Local.cscfg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/ServiceDefinition.csdef b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/ServiceDefinition.csdef new file mode 100644 index 000000000000..e13629f4ac0f --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/ServiceDefinition.csdef @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WebRole/RoleSettings.xml b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WebRole/RoleSettings.xml new file mode 100644 index 000000000000..a802a5b5ff66 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WebRole/RoleSettings.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WebRole/Scaffold.xml b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WebRole/Scaffold.xml new file mode 100644 index 000000000000..bfc4b828eeea --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WebRole/Scaffold.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WebRole/Web.cloud.config b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WebRole/Web.cloud.config new file mode 100644 index 000000000000..7a884624bb14 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WebRole/Web.cloud.config @@ -0,0 +1,16 @@ + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WebRole/Web.config b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WebRole/Web.config new file mode 100644 index 000000000000..158bfedb9cde --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WebRole/Web.config @@ -0,0 +1,17 @@ + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WebRole/WebRole.xml b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WebRole/WebRole.xml new file mode 100644 index 000000000000..f8c33da13c58 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WebRole/WebRole.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WebRole/bin/download.ps1 b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WebRole/bin/download.ps1 new file mode 100644 index 000000000000..ee72caeda75b --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WebRole/bin/download.ps1 @@ -0,0 +1,94 @@ +$runtimeUrl = $args[0] +$overrideUrl = $args[1] +$current = [string] (Get-Location -PSProvider FileSystem) +$client = New-Object System.Net.WebClient + +# For a custom role, it may not use runtime download, if that's the case, skip. +if (!$runtimeUrl -and !$overrideUrl) { Write-Host "No runtimes to download"; exit; } + +# If runtimeUrl and overrideUrl are set, fail. +if ($runtimeUrl -and $overrideUrl) { throw "Both RUNTIMEURL and RUNTIMEOVERRIDEURL values are set in the service definition for this role, please set RUNTIMEOVERRIDEURL and leave RUNTIMEURL empty if this role is installing a custom runtime package" } + +function downloadWithRetry { + param([string]$url, [string]$dest, [int]$retry) + Write-Host + Write-Host "Attempt: $retry" + Write-Host + trap { + Write-Host $_.Exception.ToString() + if ($retry -lt 5) { + $retry=$retry+1 + Write-Host + Write-Host "Waiting 5 seconds and retrying" + Write-Host + Start-Sleep -s 5 + downloadWithRetry $url $dest $retry $client + } + else { + Write-Host "Download failed" + throw "Max number of retries downloading [5] exceeded" + } + } + $client.downloadfile($url, $dest) +} + +function download($url, $dest) { + Write-Host "Downloading $url" + downloadWithRetry $url $dest 1 +} + +function copyOnVerify($file, $output) { + Write-Host "Verifying $file" + $verify = Get-AuthenticodeSignature $file + Out-Host -InputObject $verify + # Verify when $runtimeUrl is set + if (!$overrideUrl -and ($verify.Status -ne "Valid")) { + throw "Invalid signature for runtime package $file" + } + else { + mv $file $output + } +} + +if ($overrideUrl) { + Write-Host "Using override url: $overrideUrl" + $url = $overrideUrl +} +else { + $url = $runtimeUrl +} + +foreach($singleUrl in $url -split ";") +{ + $suffix = Get-Random + $downloaddir = $current + "\sandbox" + $suffix + mkdir $downloaddir + $dest = $downloaddir + "\sandbox.exe" + download $singleUrl $dest + $final = $downloaddir + "\runtime.exe" + copyOnVerify $dest $final + if (Test-Path -LiteralPath $final) + { + cd $downloaddir + if ($host.Version.Major -eq 3) + { + .\runtime.exe -y | Out-Null + .\setup.cmd + } + else + { + Start-Process -FilePath $final -ArgumentList -y -Wait + $cmd = $downloaddir + "\setup.cmd" + Start-Process -FilePath $cmd -Wait + } + } + else + { + throw "Unable to verify package" + } + cd $current + if (Test-Path -LiteralPath $downloaddir) + { + Remove-Item -LiteralPath $downloaddir -Force -Recurse + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WebRole/bin/setup_web.cmd b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WebRole/bin/setup_web.cmd new file mode 100644 index 000000000000..9d4ae06dd71d --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WebRole/bin/setup_web.cmd @@ -0,0 +1,29 @@ +@echo on + +cd /d "%~dp0" + +if "%EMULATED%"== "true" exit /b 0 + +echo Granting permissions for Network Service to the web root directory... +icacls ..\ /grant "Network Service":(OI)(CI)W +if %ERRORLEVEL% neq 0 goto error +echo OK + +echo Configuring powershell permissions +powershell -c "set-executionpolicy unrestricted" + +echo Copying web.cloud.config to web.config... +copy /y ..\Web.cloud.config ..\Web.config +if %ERRORLEVEL% neq 0 goto error +echo OK + +echo Downloading and installing runtime components +powershell .\download.ps1 '%RUNTIMEURL%' '%RUNTIMEURLOVERRIDE%' +if %ERRORLEVEL% neq 0 goto error + +echo SUCCESS +exit /b 0 + +:error +echo FAILED +exit /b -1 \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WebRole/startup.cmd b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WebRole/startup.cmd new file mode 100644 index 000000000000..0f8428ff751f --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WebRole/startup.cmd @@ -0,0 +1,4 @@ +:: Placeholder for role startup + +echo SUCCESS +exit /b 0 \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WorkerRole/RoleSettings.xml b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WorkerRole/RoleSettings.xml new file mode 100644 index 000000000000..a802a5b5ff66 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WorkerRole/RoleSettings.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WorkerRole/Scaffold.xml b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WorkerRole/Scaffold.xml new file mode 100644 index 000000000000..e42252853218 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WorkerRole/Scaffold.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WorkerRole/WorkerRole.xml b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WorkerRole/WorkerRole.xml new file mode 100644 index 000000000000..184e48660957 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WorkerRole/WorkerRole.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WorkerRole/download.ps1 b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WorkerRole/download.ps1 new file mode 100644 index 000000000000..ee72caeda75b --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WorkerRole/download.ps1 @@ -0,0 +1,94 @@ +$runtimeUrl = $args[0] +$overrideUrl = $args[1] +$current = [string] (Get-Location -PSProvider FileSystem) +$client = New-Object System.Net.WebClient + +# For a custom role, it may not use runtime download, if that's the case, skip. +if (!$runtimeUrl -and !$overrideUrl) { Write-Host "No runtimes to download"; exit; } + +# If runtimeUrl and overrideUrl are set, fail. +if ($runtimeUrl -and $overrideUrl) { throw "Both RUNTIMEURL and RUNTIMEOVERRIDEURL values are set in the service definition for this role, please set RUNTIMEOVERRIDEURL and leave RUNTIMEURL empty if this role is installing a custom runtime package" } + +function downloadWithRetry { + param([string]$url, [string]$dest, [int]$retry) + Write-Host + Write-Host "Attempt: $retry" + Write-Host + trap { + Write-Host $_.Exception.ToString() + if ($retry -lt 5) { + $retry=$retry+1 + Write-Host + Write-Host "Waiting 5 seconds and retrying" + Write-Host + Start-Sleep -s 5 + downloadWithRetry $url $dest $retry $client + } + else { + Write-Host "Download failed" + throw "Max number of retries downloading [5] exceeded" + } + } + $client.downloadfile($url, $dest) +} + +function download($url, $dest) { + Write-Host "Downloading $url" + downloadWithRetry $url $dest 1 +} + +function copyOnVerify($file, $output) { + Write-Host "Verifying $file" + $verify = Get-AuthenticodeSignature $file + Out-Host -InputObject $verify + # Verify when $runtimeUrl is set + if (!$overrideUrl -and ($verify.Status -ne "Valid")) { + throw "Invalid signature for runtime package $file" + } + else { + mv $file $output + } +} + +if ($overrideUrl) { + Write-Host "Using override url: $overrideUrl" + $url = $overrideUrl +} +else { + $url = $runtimeUrl +} + +foreach($singleUrl in $url -split ";") +{ + $suffix = Get-Random + $downloaddir = $current + "\sandbox" + $suffix + mkdir $downloaddir + $dest = $downloaddir + "\sandbox.exe" + download $singleUrl $dest + $final = $downloaddir + "\runtime.exe" + copyOnVerify $dest $final + if (Test-Path -LiteralPath $final) + { + cd $downloaddir + if ($host.Version.Major -eq 3) + { + .\runtime.exe -y | Out-Null + .\setup.cmd + } + else + { + Start-Process -FilePath $final -ArgumentList -y -Wait + $cmd = $downloaddir + "\setup.cmd" + Start-Process -FilePath $cmd -Wait + } + } + else + { + throw "Unable to verify package" + } + cd $current + if (Test-Path -LiteralPath $downloaddir) + { + Remove-Item -LiteralPath $downloaddir -Force -Recurse + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WorkerRole/setup_worker.cmd b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WorkerRole/setup_worker.cmd new file mode 100644 index 000000000000..46cdeef9c201 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WorkerRole/setup_worker.cmd @@ -0,0 +1,23 @@ +@echo off + +echo Granting permissions for Network Service to the deployment directory... +icacls . /grant "Users":(OI)(CI)F +if %ERRORLEVEL% neq 0 goto error +echo OK + +if "%EMULATED%"=="true" exit /b 0 + +echo Configuring powershell permissions +powershell -c "set-executionpolicy unrestricted" + +echo Downloading runtime components +powershell .\download.ps1 '%RUNTIMEURL%' '%RUNTIMEURLOVERRIDE%' +if %ERRORLEVEL% neq 0 goto error + +echo SUCCESS +exit /b 0 + +:error + +echo FAILED +exit /b -1 \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WorkerRole/startup.cmd b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WorkerRole/startup.cmd new file mode 100644 index 000000000000..0f8428ff751f --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WorkerRole/startup.cmd @@ -0,0 +1,4 @@ +:: Placeholder for role startup + +echo SUCCESS +exit /b 0 \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WorkerRole/worker.cmd b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WorkerRole/worker.cmd new file mode 100644 index 000000000000..2b4f86c94c1f --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/WorkerRole/worker.cmd @@ -0,0 +1,6 @@ +:workerLoop + +:: Do work +ping 123.45.67.89 -n 1 -w 1000000 > nul + +goto workerLoop \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/deploymentSettings.json b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/deploymentSettings.json new file mode 100644 index 000000000000..adb56f4a606d --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/General/deploymentSettings.json @@ -0,0 +1 @@ +{"Slot":"$Slot$","Location":"$Location$","Subscription":"$Subscription$","StorageAccountName":"$StorageAccountName$"} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WebRole/RoleSettings.xml b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WebRole/RoleSettings.xml new file mode 100644 index 000000000000..a802a5b5ff66 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WebRole/RoleSettings.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WebRole/Scaffold.xml b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WebRole/Scaffold.xml new file mode 100644 index 000000000000..db64ab8f32e2 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WebRole/Scaffold.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WebRole/Web.config b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WebRole/Web.config new file mode 100644 index 000000000000..48ee6e09a2ff --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WebRole/Web.config @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WebRole/WebRole.xml b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WebRole/WebRole.xml new file mode 100644 index 000000000000..9ed5c1b3f87e --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WebRole/WebRole.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WebRole/bin/ChangeConfig.ps1 b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WebRole/bin/ChangeConfig.ps1 new file mode 100644 index 000000000000..044634574c79 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WebRole/bin/ChangeConfig.ps1 @@ -0,0 +1,15 @@ +$configFile = $args[0] + +Write-Host "Adding iisnode section to config file '$configFile'" +$config = New-Object System.Xml.XmlDocument +$config.load($configFile) +$xpath = $config.CreateNavigator() +$parentElement = $xpath.SelectSingleNode("//configuration/configSections/sectionGroup[@name='system.webServer']") +$iisnodeElement = $parentElement.SelectSingleNode("//section[@name='iisnode']") +if ($iisnodeElement) { + Write-Host "Removing existing iisnode section from config file '$configFile'" + $iisnodeElement.DeleteSelf() +} + +$parentElement.AppendChild("
") +$config.Save($configFile) diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WebRole/bin/download.ps1 b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WebRole/bin/download.ps1 new file mode 100644 index 000000000000..9e46b09adf1f --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WebRole/bin/download.ps1 @@ -0,0 +1,87 @@ +$runtimeUrl = $args[0] +$overrideUrl = $args[1] +$current = [string] (Get-Location -PSProvider FileSystem) +$client = New-Object System.Net.WebClient + +function downloadWithRetry { + param([string]$url, [string]$dest, [int]$retry) + Write-Host + Write-Host "Attempt: $retry" + Write-Host + trap { + Write-Host $_.Exception.ToString() + if ($retry -lt 5) { + $retry=$retry+1 + Write-Host + Write-Host "Waiting 5 seconds and retrying" + Write-Host + Start-Sleep -s 5 + downloadWithRetry $url $dest $retry $client + } + else { + Write-Host "Download failed" + throw "Max number of retries downloading [5] exceeded" + } + } + $client.downloadfile($url, $dest) +} + +function download($url, $dest) { + Write-Host "Downloading $url" + downloadWithRetry $url $dest 1 +} + +function copyOnVerify($file, $output) { + Write-Host "Verifying $file" + $verify = Get-AuthenticodeSignature $file + Out-Host -InputObject $verify + if ($verify.Status -ne "Valid") { + throw "Invalid signature for runtime package $file" + } + else { + mv $file $output + } +} + +if ($overrideUrl) { + Write-Host "Using override url: $overrideUrl" + $url = $overrideUrl +} +else { + $url = $runtimeUrl +} + +foreach($singleUrl in $url -split ";") +{ + $suffix = Get-Random + $downloaddir = $current + "\sandbox" + $suffix + mkdir $downloaddir + $dest = $downloaddir + "\sandbox.exe" + download $singleUrl $dest + $final = $downloaddir + "\runtime.exe" + copyOnVerify $dest $final + if (Test-Path -LiteralPath $final) + { + cd $downloaddir + if ($host.Version.Major -eq 3) + { + .\runtime.exe -y | Out-Null + .\setup.cmd + } + else + { + Start-Process -FilePath $final -ArgumentList -y -Wait + $cmd = $downloaddir + "\setup.cmd" + Start-Process -FilePath $cmd -Wait + } + } + else + { + throw "Unable to verify package" + } + cd $current + if (Test-Path -LiteralPath $downloaddir) + { + Remove-Item -LiteralPath $downloaddir -Force -Recurse + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WebRole/bin/node.cmd b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WebRole/bin/node.cmd new file mode 100644 index 000000000000..c69a72af9b8b --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WebRole/bin/node.cmd @@ -0,0 +1 @@ +node.exe %1 %2 %3 \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WebRole/bin/setup_web.cmd b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WebRole/bin/setup_web.cmd new file mode 100644 index 000000000000..0a39dbc5ef69 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WebRole/bin/setup_web.cmd @@ -0,0 +1,62 @@ +@echo on + +cd /d "%~dp0" + +if "%EMULATED%"=="true" if DEFINED APPCMD goto emulator_setup +if "%EMULATED%"== "true" exit /b 0 + +echo Granting permissions for Network Service to the web root directory... +icacls ..\ /grant "Network Service":(OI)(CI)W +if %ERRORLEVEL% neq 0 goto error +echo OK + +echo Configuring powershell permissions +powershell -c "set-executionpolicy unrestricted" + +echo Copying web.cloud.config to web.config... +copy /y ..\Web.cloud.config ..\Web.config +if %ERRORLEVEL% neq 0 goto error +echo OK + +echo Downloading and installing runtime components +powershell .\download.ps1 '%RUNTIMEURL%' '%RUNTIMEURLOVERRIDE%' +if %ERRORLEVEL% neq 0 goto error + +echo SUCCESS +exit /b 0 + +:error +echo FAILED +exit /b -1 + +:emulator_setup +echo Running in emulator adding iisnode to application host config +FOR /F "tokens=1,2 delims=/" %%a in ("%APPCMD%") DO set FN=%%a&set OPN=%%b +if "%OPN%"=="%OPN:apphostconfig:=%" ( + echo "Could not parse appcmd '%appcmd% for configuration file, exiting" + goto error +) + +set IISNODE_BINARY_DIRECTORY=%programfiles(x86)%\iisnode-dev\release\x64 +set IISNODE_SCHEMA=%programfiles(x86)%\iisnode-dev\release\x64\iisnode_schema.xml + +if "%PROCESSOR_ARCHITECTURE%"=="AMD64" goto start +set IISNODE_BINARY_DIRECTORY=%programfiles%\iisnode-dev\release\x86 +set IISNODE_SCHEMA=%programfiles%\iisnode-dev\release\x86\iisnode_schema_x86.xml + + +:start +set + +echo Using iisnode binaries location '%IISNODE_BINARY_DIRECTORY%' +echo installing iisnode module using AppCMD alias %appcmd% +%appcmd% install module /name:"iisnode" /image:"%IISNODE_BINARY_DIRECTORY%\iisnode.dll" + +set apphostconfigfile=%OPN:apphostconfig:=% +powershell -c "set-executionpolicy unrestricted" +powershell .\ChangeConfig.ps1 %apphostconfigfile% +if %ERRORLEVEL% neq 0 goto error + +copy /y "%IISNODE_SCHEMA%" "%programfiles%\IIS Express\config\schema\iisnode_schema.xml" +if %ERRORLEVEL% neq 0 goto error +exit /b 0 diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WebRole/server.js b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WebRole/server.js new file mode 100644 index 000000000000..ed72a038da01 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WebRole/server.js @@ -0,0 +1,6 @@ +var http = require('http'); +var port = process.env.port || 1337; +http.createServer(function (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }); + res.end('Hello World\n'); +}).listen(port); \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WebRole/startup.js b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WebRole/startup.js new file mode 100644 index 000000000000..1278d51aa9af --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WebRole/startup.js @@ -0,0 +1 @@ +/** Placeholder for role startup **/ \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WebRole/web.cloud.config b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WebRole/web.cloud.config new file mode 100644 index 000000000000..ae56f427b482 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WebRole/web.cloud.config @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/Website/.gitignore b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/Website/.gitignore new file mode 100644 index 000000000000..2386c90611f6 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/Website/.gitignore @@ -0,0 +1,2 @@ +node_modules +azure_error \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/Website/iisnode.yml b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/Website/iisnode.yml new file mode 100644 index 000000000000..ee256ffc596c --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/Website/iisnode.yml @@ -0,0 +1,32 @@ +# For security reasons, logging, dev errors, and debugging +# should be disabled in production deployments: + +loggingEnabled: false +debuggingEnabled: false +devErrorsEnabled: false +node_env: production + +# Other settings with their default values follow. +# For documentation see https://github.com/tjanczuk/iisnode/blob/master/src/samples/configuration/iisnode.yml + +# nodeProcessCountPerApplication: 1 +# maxConcurrentRequestsPerProcess: 1024 +# maxNamedPipeConnectionRetry: 24 +# namedPipeConnectionRetryDelay: 250 +# maxNamedPipeConnectionPoolSize: 512 +# maxNamedPipePooledConnectionAge: 30000 +# asyncCompletionThreadCount: 0 +# initialRequestBufferSize: 4096 +# maxRequestBufferSize: 65536 +# watchedFiles: *.js;iisnode.yml;node_modules\* +# uncFileChangesPollingInterval: 5000 +# gracefulShutdownTimeout: 60000 +# logDirectoryNameSuffix: logs +# debuggerPortRange: 5058-6058 +# debuggerPathSegment: debug +# maxLogFileSizeInKB: 128 +# appendToExistingLog: false +# logFileFlushInterval: 5000 +# flushResponse: false +# enableXFF: false +# promoteServerVars: \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WorkerRole/RoleSettings.xml b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WorkerRole/RoleSettings.xml new file mode 100644 index 000000000000..a802a5b5ff66 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WorkerRole/RoleSettings.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WorkerRole/Scaffold.xml b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WorkerRole/Scaffold.xml new file mode 100644 index 000000000000..185500deb4a5 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WorkerRole/Scaffold.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WorkerRole/WorkerRole.xml b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WorkerRole/WorkerRole.xml new file mode 100644 index 000000000000..0ecef59b15c3 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WorkerRole/WorkerRole.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WorkerRole/download.ps1 b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WorkerRole/download.ps1 new file mode 100644 index 000000000000..adc8fb370eff --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WorkerRole/download.ps1 @@ -0,0 +1,87 @@ +$runtimeUrl = $args[0] +$overrideUrl = $args[1] +$current = [string] (Get-Location -PSProvider FileSystem) +$client = New-Object System.Net.WebClient + +function downloadWithRetry { + param([string]$url, [string]$dest, [int]$retry) + Write-Host + Write-Host "Attempt: $retry" + Write-Host + trap { + Write-Host $_.Exception.ToString() + if ($retry -lt 5) { + $retry=$retry+1 + Write-Host + Write-Host "Waiting 5 seconds and retrying" + Write-Host + Start-Sleep -s 5 + downloadWithRetry $url $dest $retry $client + } + else { + Write-Host "Download failed" + throw "Max number of retries downloading [5] exceeded" + } + } + $client.downloadfile($url, $dest) +} + +function download($url, $dest) { + Write-Host "Downloading $url" + downloadWithRetry $url $dest 1 +} + +function copyOnVerify($file, $output) { + Write-Host "Verifying $file" + $verify = Get-AuthenticodeSignature $file + Out-Host -InputObject $verify + if ($verify.Status -ne "Valid") { + throw "Invalid signature for runtime package $file" + } + else { + mv $file $output + } +} + +if ($overrideUrl) { + Write-Host "Using override url: $overrideUrl" + $url = $overrideUrl +} +else { + $url = $runtimeUrl +} + +foreach($singleUrl in $url -split ";") +{ + $suffix = Get-Random + $downloaddir = $current + "\sandbox" + $suffix + mkdir $downloaddir + $dest = $downloaddir + "\sandbox.exe" + download $singleUrl $dest + $final = $downloaddir + "\runtime.exe" + copyOnVerify $dest $final + if (Test-Path -LiteralPath $final) + { + cd $downloaddir + if ($host.Version.Major -eq 3) + { + .\runtime.exe -y | Out-Null + .\setup.cmd + } + else + { + Start-Process -FilePath $final -ArgumentList -y -Wait + $cmd = $downloaddir + "\setup.cmd" + Start-Process -FilePath $cmd -Wait + } + } + else + { + throw "Unable to verify package" + } + cd $current + if (Test-Path -LiteralPath $downloaddir) + { + Remove-Item -LiteralPath $downloaddir -Force -Recurse + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WorkerRole/node.cmd b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WorkerRole/node.cmd new file mode 100644 index 000000000000..c69a72af9b8b --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WorkerRole/node.cmd @@ -0,0 +1 @@ +node.exe %1 %2 %3 \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WorkerRole/server.js b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WorkerRole/server.js new file mode 100644 index 000000000000..ed72a038da01 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WorkerRole/server.js @@ -0,0 +1,6 @@ +var http = require('http'); +var port = process.env.port || 1337; +http.createServer(function (req, res) { + res.writeHead(200, { 'Content-Type': 'text/plain' }); + res.end('Hello World\n'); +}).listen(port); \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WorkerRole/setup_worker.cmd b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WorkerRole/setup_worker.cmd new file mode 100644 index 000000000000..46cdeef9c201 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WorkerRole/setup_worker.cmd @@ -0,0 +1,23 @@ +@echo off + +echo Granting permissions for Network Service to the deployment directory... +icacls . /grant "Users":(OI)(CI)F +if %ERRORLEVEL% neq 0 goto error +echo OK + +if "%EMULATED%"=="true" exit /b 0 + +echo Configuring powershell permissions +powershell -c "set-executionpolicy unrestricted" + +echo Downloading runtime components +powershell .\download.ps1 '%RUNTIMEURL%' '%RUNTIMEURLOVERRIDE%' +if %ERRORLEVEL% neq 0 goto error + +echo SUCCESS +exit /b 0 + +:error + +echo FAILED +exit /b -1 \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WorkerRole/startup.js b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WorkerRole/startup.js new file mode 100644 index 000000000000..1278d51aa9af --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Node/WorkerRole/startup.js @@ -0,0 +1 @@ +/** Placeholder for role startup **/ \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/RoleSettings.xml b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/RoleSettings.xml new file mode 100644 index 000000000000..d30a872326df --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/RoleSettings.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/Scaffold.xml b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/Scaffold.xml new file mode 100644 index 000000000000..1d5453ccebd2 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/Scaffold.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/Web.config b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/Web.config new file mode 100644 index 000000000000..ba225fd83c15 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/Web.config @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/WebRole.xml b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/WebRole.xml new file mode 100644 index 000000000000..0fef9095f046 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/WebRole.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/bin/Microsoft.Web.Deployment.dll b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/bin/Microsoft.Web.Deployment.dll new file mode 100644 index 000000000000..08d70d2bf799 Binary files /dev/null and b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/bin/Microsoft.Web.Deployment.dll differ diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/bin/Microsoft.Web.PlatformInstaller.UI.dll b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/bin/Microsoft.Web.PlatformInstaller.UI.dll new file mode 100644 index 000000000000..75ed7176cccb Binary files /dev/null and b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/bin/Microsoft.Web.PlatformInstaller.UI.dll differ diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/bin/Microsoft.Web.PlatformInstaller.dll b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/bin/Microsoft.Web.PlatformInstaller.dll new file mode 100644 index 000000000000..a94eef6f1abb Binary files /dev/null and b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/bin/Microsoft.Web.PlatformInstaller.dll differ diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/bin/WebpiCmdLine.exe b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/bin/WebpiCmdLine.exe new file mode 100644 index 000000000000..11d5157319e4 Binary files /dev/null and b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/bin/WebpiCmdLine.exe differ diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/bin/download.ps1 b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/bin/download.ps1 new file mode 100644 index 000000000000..504abccaf8ea --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/bin/download.ps1 @@ -0,0 +1,92 @@ +$runtimeUrl = $args[0] +$overrideUrl = $args[1] +$current = [string] (Get-Location -PSProvider FileSystem) +$client = New-Object System.Net.WebClient + +function downloadWithRetry { + param([string]$url, [string]$dest, [int]$retry) + Write-Host + Write-Host "Attempt: $retry" + Write-Host + trap { + Write-Host $_.Exception.ToString() + if ($retry -lt 5) { + $retry=$retry+1 + Write-Host + Write-Host "Waiting 5 seconds and retrying" + Write-Host + Start-Sleep -s 5 + downloadWithRetry $url $dest $retry $client + } + else { + Write-Host "Download failed" + throw "Max number of retries downloading [5] exceeded" + } + } + $client.downloadfile($url, $dest) +} + +function download($url, $dest) { + Write-Host "Downloading $url" + downloadWithRetry $url $dest 1 +} + +function copyWithoutVerify($file, $output) { + Write-Host "Just copying $file" + mv $file $output +} + +function copyOnVerify($file, $output) { + Write-Host "Verifying $file" + $verify = Get-AuthenticodeSignature $file + Out-Host -InputObject $verify + if ($verify.Status -ne "Valid") { + throw "Invalid signature for runtime package $file" + } + else { + mv $file $output + } +} + +if ($overrideUrl) { + Write-Host "Using override url: $overrideUrl" + $url = $overrideUrl +} +else { + $url = $runtimeUrl +} + +foreach($singleUrl in $url -split ";") +{ + $suffix = Get-Random + $downloaddir = $current + "\sandbox" + $suffix + mkdir $downloaddir + $dest = $downloaddir + "\sandbox.exe" + download $singleUrl $dest + $final = $downloaddir + "\runtime.exe" + copyOnVerify $dest $final + if (Test-Path -LiteralPath $final) + { + cd $downloaddir + if ($host.Version.Major -eq 3) + { + .\runtime.exe -y | Out-Null + .\setup.cmd + } + else + { + Start-Process -FilePath $final -ArgumentList -y -Wait + $cmd = $downloaddir + "\setup.cmd" + Start-Process -FilePath $cmd -Wait + } + } + else + { + throw "Unable to verify package" + } + cd $current + if (Test-Path -LiteralPath $downloaddir) + { + Remove-Item -LiteralPath $downloaddir -Force -Recurse + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/bin/php_entry.cmd b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/bin/php_entry.cmd new file mode 100644 index 000000000000..5beaea12447e --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/bin/php_entry.cmd @@ -0,0 +1 @@ +php %1 \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/bin/setup.cmd b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/bin/setup.cmd new file mode 100644 index 000000000000..ffaf54e038b4 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/bin/setup.cmd @@ -0,0 +1,31 @@ +if "%EMULATED%"=="true" goto :EOF + +::Install PHP Runtime + +cd "%~dp0" + +md "%~dp0appdata" +cd "%~dp0appdata" +cd "%~dp0" + +reg add "hku\.default\software\microsoft\windows\currentversion\explorer\user shell folders" /v "Local AppData" /t REG_EXPAND_SZ /d "%~dp0appdata" /f + +".\webpicmdline" /Products:PHP53,SQLDriverPHP53IIS,PHPManager /AcceptEula >> ..\startup-tasks-log.txt 2>>..\startup-tasks-error-log.txt + +reg add "hku\.default\software\microsoft\windows\currentversion\explorer\user shell folders" /v "Local AppData" /t REG_EXPAND_SZ /d %%USERPROFILE%%\AppData\Local /f + +::Path, php.ini handling + +powershell.exe Set-ExecutionPolicy Unrestricted +powershell.exe .\setup.ps1 + +::IIS regs + +icacls %RoleRoot%\approot /grant "Everyone":F /T +if "%WORKER%"=="false" ( +%WINDIR%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi /-"[fullPath='%ProgramFiles(x86)%\PHP\v5.3\php-cgi.exe'].environmentVariables.[name='RoleRoot']" /commit:apphost +%WINDIR%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi /+"[fullPath='%ProgramFiles(x86)%\PHP\v5.3\php-cgi.exe'].environmentVariables.[name='RoleRoot',value='%RoleRoot%']" /commit:apphost +%WINDIR%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi /+"[fullPath='%ProgramFiles(x86)%\PHP\v5.3\php-cgi.exe'].environmentVariables.[name='PATH',value='%PATH%;%RoleRoot%\base\x86']" /commit:apphost +) + +SET ERRORLEVEL=0 \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/bin/setup.ps1 b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/bin/setup.ps1 new file mode 100644 index 000000000000..507658d6b19b --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/bin/setup.ps1 @@ -0,0 +1,32 @@ +[Reflection.Assembly]::LoadWithPartialName("Microsoft.WindowsAzure.ServiceRuntime") + +Add-PsSnapin PHPManagerSnapin +$phpConfiguration = Get-PHPConfiguration +$phpExecutable = Get-ChildItem $phpConfiguration.ScriptProcessor +$phpExtensionsPath = $phpExecutable.DirectoryName + "\ext" +$phpIniFile = $phpConfiguration.PHPIniFilePath + +# Set global path +[Environment]::SetEnvironmentVariable('Path', [Environment]::GetEnvironmentVariable('Path', 'Machine') + ";" + $phpExecutable.DirectoryName, 'Machine') + +# Get PHP installation override details +$myExtensionsPath = ".\php\ext" +$myExtensions = Get-ChildItem $myExtensionsPath | where {$_.Name.ToLower().EndsWith(".dll")} +$myPhpIniFile = ".\php\php.ini" + +# Append PHP.ini directives +if ((Test-Path $myPhpIniFile) -eq 'True') { + $additionalPhpIniDirectives = Get-Content $myPhpIniFile + $additionalPhpIniDirectives = $additionalPhpIniDirectives.Replace("%EXT%", $phpExtensionsPath) + + Add-Content $phpIniFile "`r`n" + Add-Content $phpIniFile $additionalPhpIniDirectives +} + +# Copy and register extensions +if ($myExtensions -ne $null) { + foreach ($myExtension in $myExtensions) { + Copy-Item $myExtension.FullName $phpExtensionsPath + Set-PHPExtension -Name $myExtension.Name -Status enabled + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/bin/setup_web.cmd b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/bin/setup_web.cmd new file mode 100644 index 000000000000..b9dc1a6c0b1f --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/bin/setup_web.cmd @@ -0,0 +1,47 @@ +@echo on +cd /d "%~dp0" + +if "%EMULATED%"=="true" goto emulator + +echo Granting permissions for Network Service to the web root directory... +icacls ..\ /grant "Network Service":(OI)(CI)W +if %ERRORLEVEL% neq 0 goto error +echo OK + +echo Configuring powershell permissions +powershell -c "set-executionpolicy unrestricted" + +echo Copying web.cloud.config to web.config... +copy /y ..\Web.cloud.config ..\Web.config +if %ERRORLEVEL% neq 0 goto error +echo OK + +echo Downloading and installing runtime components +powershell .\download.ps1 '%RUNTIMEURL%' '%RUNTIMEURLOVERRIDE%' +if %ERRORLEVEL% neq 0 goto error + +echo SUCCESS +exit /b 0 + +:emulator + +icacls %RoleRoot%\approot /grant "Everyone":F /T + +:: Detect PHP Runtime Path +where php-cgi.exe > tmpFile +set /p phprt= < tmpFile +del tmpFile +if DEFINED phprt goto setup_iis +SET phprt=%ProgramFiles%\PHP\v5.3\php-cgi.exe +if DEFINED ProgramFiles(x86) SET phprt=%ProgramFiles(x86)%\PHP\v5.3\php-cgi.exe + +:setup_iis +%appcmd% set config -section:system.webServer/fastCgi /+"[fullPath='%phprt%',arguments='',maxInstances='4',idleTimeout='300',activityTimeout='30',requestTimeout='90',queueLength='1000',instanceMaxRequests='200',protocol='NamedPipe',flushNamedPipe='False',rapidFailsPerMinute='10']" /commit:apphost +%appcmd% set config -section:system.webServer/handlers /+"[name='PHP-FastCGI',path='*.php',modules='FastCgiModule',verb='*', scriptProcessor='%phprt%']" /commit:apphost + +exit /b 0 + +:error + +echo FAILED +exit /b -1 \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/index.php b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/index.php new file mode 100644 index 000000000000..968c8df7909f --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/index.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/web.cloud.config b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/web.cloud.config new file mode 100644 index 000000000000..09fc893fda38 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WebRole/web.cloud.config @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/Microsoft.Web.Deployment.dll b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/Microsoft.Web.Deployment.dll new file mode 100644 index 000000000000..08d70d2bf799 Binary files /dev/null and b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/Microsoft.Web.Deployment.dll differ diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/Microsoft.Web.PlatformInstaller.UI.dll b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/Microsoft.Web.PlatformInstaller.UI.dll new file mode 100644 index 000000000000..75ed7176cccb Binary files /dev/null and b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/Microsoft.Web.PlatformInstaller.UI.dll differ diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/Microsoft.Web.PlatformInstaller.dll b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/Microsoft.Web.PlatformInstaller.dll new file mode 100644 index 000000000000..a94eef6f1abb Binary files /dev/null and b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/Microsoft.Web.PlatformInstaller.dll differ diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/RoleSettings.xml b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/RoleSettings.xml new file mode 100644 index 000000000000..d30a872326df --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/RoleSettings.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/Scaffold.xml b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/Scaffold.xml new file mode 100644 index 000000000000..afb7bc83e064 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/Scaffold.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/WebpiCmdLine.exe b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/WebpiCmdLine.exe new file mode 100644 index 000000000000..11d5157319e4 Binary files /dev/null and b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/WebpiCmdLine.exe differ diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/WorkerRole.xml b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/WorkerRole.xml new file mode 100644 index 000000000000..0c9341c56f30 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/WorkerRole.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/download.ps1 b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/download.ps1 new file mode 100644 index 000000000000..504abccaf8ea --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/download.ps1 @@ -0,0 +1,92 @@ +$runtimeUrl = $args[0] +$overrideUrl = $args[1] +$current = [string] (Get-Location -PSProvider FileSystem) +$client = New-Object System.Net.WebClient + +function downloadWithRetry { + param([string]$url, [string]$dest, [int]$retry) + Write-Host + Write-Host "Attempt: $retry" + Write-Host + trap { + Write-Host $_.Exception.ToString() + if ($retry -lt 5) { + $retry=$retry+1 + Write-Host + Write-Host "Waiting 5 seconds and retrying" + Write-Host + Start-Sleep -s 5 + downloadWithRetry $url $dest $retry $client + } + else { + Write-Host "Download failed" + throw "Max number of retries downloading [5] exceeded" + } + } + $client.downloadfile($url, $dest) +} + +function download($url, $dest) { + Write-Host "Downloading $url" + downloadWithRetry $url $dest 1 +} + +function copyWithoutVerify($file, $output) { + Write-Host "Just copying $file" + mv $file $output +} + +function copyOnVerify($file, $output) { + Write-Host "Verifying $file" + $verify = Get-AuthenticodeSignature $file + Out-Host -InputObject $verify + if ($verify.Status -ne "Valid") { + throw "Invalid signature for runtime package $file" + } + else { + mv $file $output + } +} + +if ($overrideUrl) { + Write-Host "Using override url: $overrideUrl" + $url = $overrideUrl +} +else { + $url = $runtimeUrl +} + +foreach($singleUrl in $url -split ";") +{ + $suffix = Get-Random + $downloaddir = $current + "\sandbox" + $suffix + mkdir $downloaddir + $dest = $downloaddir + "\sandbox.exe" + download $singleUrl $dest + $final = $downloaddir + "\runtime.exe" + copyOnVerify $dest $final + if (Test-Path -LiteralPath $final) + { + cd $downloaddir + if ($host.Version.Major -eq 3) + { + .\runtime.exe -y | Out-Null + .\setup.cmd + } + else + { + Start-Process -FilePath $final -ArgumentList -y -Wait + $cmd = $downloaddir + "\setup.cmd" + Start-Process -FilePath $cmd -Wait + } + } + else + { + throw "Unable to verify package" + } + cd $current + if (Test-Path -LiteralPath $downloaddir) + { + Remove-Item -LiteralPath $downloaddir -Force -Recurse + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/index.php b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/index.php new file mode 100644 index 000000000000..8fc4e66fdb4f --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/index.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/php_entry.cmd b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/php_entry.cmd new file mode 100644 index 000000000000..5beaea12447e --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/php_entry.cmd @@ -0,0 +1 @@ +php %1 \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/setup.cmd b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/setup.cmd new file mode 100644 index 000000000000..ffaf54e038b4 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/setup.cmd @@ -0,0 +1,31 @@ +if "%EMULATED%"=="true" goto :EOF + +::Install PHP Runtime + +cd "%~dp0" + +md "%~dp0appdata" +cd "%~dp0appdata" +cd "%~dp0" + +reg add "hku\.default\software\microsoft\windows\currentversion\explorer\user shell folders" /v "Local AppData" /t REG_EXPAND_SZ /d "%~dp0appdata" /f + +".\webpicmdline" /Products:PHP53,SQLDriverPHP53IIS,PHPManager /AcceptEula >> ..\startup-tasks-log.txt 2>>..\startup-tasks-error-log.txt + +reg add "hku\.default\software\microsoft\windows\currentversion\explorer\user shell folders" /v "Local AppData" /t REG_EXPAND_SZ /d %%USERPROFILE%%\AppData\Local /f + +::Path, php.ini handling + +powershell.exe Set-ExecutionPolicy Unrestricted +powershell.exe .\setup.ps1 + +::IIS regs + +icacls %RoleRoot%\approot /grant "Everyone":F /T +if "%WORKER%"=="false" ( +%WINDIR%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi /-"[fullPath='%ProgramFiles(x86)%\PHP\v5.3\php-cgi.exe'].environmentVariables.[name='RoleRoot']" /commit:apphost +%WINDIR%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi /+"[fullPath='%ProgramFiles(x86)%\PHP\v5.3\php-cgi.exe'].environmentVariables.[name='RoleRoot',value='%RoleRoot%']" /commit:apphost +%WINDIR%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi /+"[fullPath='%ProgramFiles(x86)%\PHP\v5.3\php-cgi.exe'].environmentVariables.[name='PATH',value='%PATH%;%RoleRoot%\base\x86']" /commit:apphost +) + +SET ERRORLEVEL=0 \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/setup.ps1 b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/setup.ps1 new file mode 100644 index 000000000000..507658d6b19b --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/setup.ps1 @@ -0,0 +1,32 @@ +[Reflection.Assembly]::LoadWithPartialName("Microsoft.WindowsAzure.ServiceRuntime") + +Add-PsSnapin PHPManagerSnapin +$phpConfiguration = Get-PHPConfiguration +$phpExecutable = Get-ChildItem $phpConfiguration.ScriptProcessor +$phpExtensionsPath = $phpExecutable.DirectoryName + "\ext" +$phpIniFile = $phpConfiguration.PHPIniFilePath + +# Set global path +[Environment]::SetEnvironmentVariable('Path', [Environment]::GetEnvironmentVariable('Path', 'Machine') + ";" + $phpExecutable.DirectoryName, 'Machine') + +# Get PHP installation override details +$myExtensionsPath = ".\php\ext" +$myExtensions = Get-ChildItem $myExtensionsPath | where {$_.Name.ToLower().EndsWith(".dll")} +$myPhpIniFile = ".\php\php.ini" + +# Append PHP.ini directives +if ((Test-Path $myPhpIniFile) -eq 'True') { + $additionalPhpIniDirectives = Get-Content $myPhpIniFile + $additionalPhpIniDirectives = $additionalPhpIniDirectives.Replace("%EXT%", $phpExtensionsPath) + + Add-Content $phpIniFile "`r`n" + Add-Content $phpIniFile $additionalPhpIniDirectives +} + +# Copy and register extensions +if ($myExtensions -ne $null) { + foreach ($myExtension in $myExtensions) { + Copy-Item $myExtension.FullName $phpExtensionsPath + Set-PHPExtension -Name $myExtension.Name -Status enabled + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/setup_worker.cmd b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/setup_worker.cmd new file mode 100644 index 000000000000..bd1637d5f6ee --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/PHP/WorkerRole/setup_worker.cmd @@ -0,0 +1,24 @@ +@echo on +cd /d "%~dp0" + +echo Granting permissions for Network Service to the web root directory... +icacls ..\ /grant "Network Service":(OI)(CI)W +if %ERRORLEVEL% neq 0 goto error +echo OK + +if "%EMULATED%"=="true" exit /b 0 + +echo Configuring powershell permissions +powershell -c "set-executionpolicy unrestricted" + +echo Downloading and installing runtime components +powershell .\download.ps1 '%RUNTIMEURL%' '%RUNTIMEURLOVERRIDE%' +if %ERRORLEVEL% neq 0 goto error + +echo SUCCESS +exit /b 0 + +:error + +echo FAILED +exit /b -1 \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/AzureSetup.cfg b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/AzureSetup.cfg new file mode 100644 index 000000000000..2cd6f220d778 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/AzureSetup.cfg @@ -0,0 +1,4 @@ +settings_module=$RoleName$.settings +python_path=%RootDir%\$RoleName$ +interpreter_path=%SystemDrive%\Python27\python.exe +webpi_install=https://www.microsoft.com/web/webpi/4.0/toolsproductlist.xml;Django \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/Microsoft.PythonTools.AzureSetup.exe.config b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/Microsoft.PythonTools.AzureSetup.exe.config new file mode 100644 index 000000000000..203242733d88 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/Microsoft.PythonTools.AzureSetup.exe.config @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/Microsoft.PythonTools.AzureSetup.exe.content b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/Microsoft.PythonTools.AzureSetup.exe.content new file mode 100644 index 000000000000..822d0337ab26 Binary files /dev/null and b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/Microsoft.PythonTools.AzureSetup.exe.content differ diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/Microsoft.PythonTools.WebRole.dll.content b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/Microsoft.PythonTools.WebRole.dll.content new file mode 100644 index 000000000000..41336c3f6c5e Binary files /dev/null and b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/Microsoft.PythonTools.WebRole.dll.content differ diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/Microsoft.Web.Deployment.dll.content b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/Microsoft.Web.Deployment.dll.content new file mode 100644 index 000000000000..08d70d2bf799 Binary files /dev/null and b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/Microsoft.Web.Deployment.dll.content differ diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/Microsoft.Web.PlatformInstaller.UI.dll.content b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/Microsoft.Web.PlatformInstaller.UI.dll.content new file mode 100644 index 000000000000..75ed7176cccb Binary files /dev/null and b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/Microsoft.Web.PlatformInstaller.UI.dll.content differ diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/Microsoft.Web.PlatformInstaller.dll.content b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/Microsoft.Web.PlatformInstaller.dll.content new file mode 100644 index 000000000000..a94eef6f1abb Binary files /dev/null and b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/Microsoft.Web.PlatformInstaller.dll.content differ diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/RoleSettings.xml b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/RoleSettings.xml new file mode 100644 index 000000000000..a802a5b5ff66 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/RoleSettings.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/Scaffold.xml b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/Scaffold.xml new file mode 100644 index 000000000000..e6548f7fe7cf --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/Scaffold.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/Web.config b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/Web.config new file mode 100644 index 000000000000..c19b4d83f2df --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/Web.config @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/WebPICmdLine.exe.content b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/WebPICmdLine.exe.content new file mode 100644 index 000000000000..11d5157319e4 Binary files /dev/null and b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/WebPICmdLine.exe.content differ diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/WebRole.xml b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/WebRole.xml new file mode 100644 index 000000000000..53907685c812 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/WebRole.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/web.cloud.config b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/web.cloud.config new file mode 100644 index 000000000000..b31b6625ce42 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/web.cloud.config @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/wfastcgi.py b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/wfastcgi.py new file mode 100644 index 000000000000..182dd82506c1 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Python/WebRole/wfastcgi.py @@ -0,0 +1,572 @@ + # ############################################################################ + # + # Copyright (c) Microsoft Corporation. + # + # This source code is subject to terms and conditions of the Apache License, Version 2.0. A + # copy of the license can be found in the License.html file at the root of this distribution. If + # you cannot locate the Apache License, Version 2.0, please send an email to + # vspython@microsoft.com. By using this source code in any fashion, you are agreeing to be bound + # by the terms of the Apache License, Version 2.0. + # + # You must not remove this notice, or any other, from this software. + # + # ########################################################################### + +import sys +import struct +import cStringIO +import os +import traceback +import ctypes +from os import path +from xml.dom import minidom +import re +import datetime +import thread + +__version__ = '2.0.0' + +# http://www.fastcgi.com/devkit/doc/fcgi-spec.html#S3 + +FCGI_VERSION_1 = 1 +FCGI_HEADER_LEN = 8 + +FCGI_BEGIN_REQUEST = 1 +FCGI_ABORT_REQUEST = 2 +FCGI_END_REQUEST = 3 +FCGI_PARAMS = 4 +FCGI_STDIN = 5 +FCGI_STDOUT = 6 +FCGI_STDERR = 7 +FCGI_DATA = 8 +FCGI_GET_VALUES = 9 +FCGI_GET_VALUES_RESULT = 10 +FCGI_UNKNOWN_TYPE = 11 +FCGI_MAXTYPE = FCGI_UNKNOWN_TYPE + +FCGI_NULL_REQUEST_ID = 0 + +FCGI_KEEP_CONN = 1 + +FCGI_RESPONDER = 1 +FCGI_AUTHORIZER = 2 +FCGI_FILTER = 3 + +FCGI_REQUEST_COMPLETE = 0 +FCGI_CANT_MPX_CONN = 1 +FCGI_OVERLOADED = 2 +FCGI_UNKNOWN_ROLE = 3 + +FCGI_MAX_CONNS = "FCGI_MAX_CONNS" +FCGI_MAX_REQS = "FCGI_MAX_REQS" +FCGI_MPXS_CONNS = "FCGI_MPXS_CONNS" + +class FastCgiRecord(object): + """Represents a FastCgiRecord. Encapulates the type, role, flags. Holds +onto the params which we will receive and update later.""" + def __init__(self, type, req_id, role, flags): + self.type = type + self.req_id = req_id + self.role = role + self.flags = flags + self.params = {} + + def __repr__(self): + return '' % (self.type, + self.req_id, + self.role, + self.flags) + +#typedef struct { +# unsigned char version; +# unsigned char type; +# unsigned char requestIdB1; +# unsigned char requestIdB0; +# unsigned char contentLengthB1; +# unsigned char contentLengthB0; +# unsigned char paddingLength; +# unsigned char reserved; +# unsigned char contentData[contentLength]; +# unsigned char paddingData[paddingLength]; +#} FCGI_Record; + +class _ExitException(Exception): + pass + +def read_fastcgi_record(input): + """reads the main fast cgi record""" + data = input.read(8) # read record + if not data: + # no more data, our other process must have died... + raise _ExitException() + + content_size = ord(data[4]) << 8 | ord(data[5]) + + content = input.read(content_size) # read content + input.read(ord(data[6])) # read padding + + if ord(data[0]) != FCGI_VERSION_1: + raise Exception('Unknown fastcgi version ' + str(data[0])) + + req_id = (ord(data[2]) << 8) | ord(data[3]) + + reqtype = ord(data[1]) + processor = REQUEST_PROCESSORS.get(reqtype) + if processor is None: + # unknown type requested, send response + send_response(req_id, FCGI_UNKNOWN_TYPE, data[1] + '\0' * 7) + return None + + return processor(req_id, content) + + +def read_fastcgi_begin_request(req_id, content): + """reads the begin request body and updates our +_REQUESTS table to include the new request""" + # typedef struct { + # unsigned char roleB1; + # unsigned char roleB0; + # unsigned char flags; + # unsigned char reserved[5]; + # } FCGI_BeginRequestBody; + + # TODO: Ignore request if it exists + res = FastCgiRecord( + FCGI_BEGIN_REQUEST, + req_id, + (ord(content[0]) << 8) | ord(content[1]), # role + ord(content[2]), # flags + ) + _REQUESTS[req_id] = res + + +def read_fastcgi_keyvalue_pairs(content, offset): + """Reads a FastCGI key/value pair stream""" + + name_len = ord(content[offset]) + + if (name_len & 0x80) != 0: + name_full_len = chr(name_len & ~0x80) + content[offset + 1:offset+4] + name_len = int_struct.unpack(name_full_len)[0] + offset += 4 + else: + offset += 1 + + value_len = ord(content[offset]) + + if (value_len & 0x80) != 0: + value_full_len = chr(value_len & ~0x80) + content[offset+1:offset+4] + value_len = int_struct.unpack(value_full_len)[0] + offset += 4 + else: + offset += 1 + + name = content[offset:offset+name_len] + offset += name_len + + value = content[offset:offset+value_len] + offset += value_len + + return offset, name, value + + +def write_name_len(io, name): + """Writes the length of a single name for a key or value in +a key/value stream""" + if len(name) <= 0x7f: + io.write(chr(len(name))) + else: + io.write(int_struct.pack(len(name))) + + +def write_fastcgi_keyvalue_pairs(pairs): + """creates a FastCGI key/value stream and returns it as a string""" + res = cStringIO.StringIO() + for key, value in pairs.iteritems(): + write_name_len(res, key) + write_name_len(res, value) + + res.write(key) + res.write(value) + + return res.getvalue() + + +def read_fastcgi_params(req_id, content): + if not content: + return None + + offset = 0 + res = _REQUESTS[req_id].params + while offset < len(content): + offset, name, value = read_fastcgi_keyvalue_pairs(content, offset) + res[name] = value + + +def read_fastcgi_input(req_id, content): + """reads FastCGI std-in and stores it in wsgi.input passed in the +wsgi environment array""" + res = _REQUESTS[req_id].params + if 'wsgi.input' not in res: + res['wsgi.input'] = content + else: + res['wsgi.input'] += content + + if not content: + # we've hit the end of the input stream, time to process input... + return _REQUESTS[req_id] + + +def read_fastcgi_data(req_id, content): + """reads FastCGI data stream and publishes it as wsgi.data""" + res = _REQUESTS[req_id].params + if 'wsgi.data' not in res: + res['wsgi.data'] = content + else: + res['wsgi.data'] += content + + +def read_fastcgi_abort_request(req_id, content): + """reads the wsgi abort request, which we ignore, we'll send the +finish execution request anyway...""" + pass + + +def read_fastcgi_get_values(req_id, content): + """reads the fastcgi request to get parameter values, and immediately +responds""" + offset = 0 + request = {} + while offset < len(content): + offset, name, value = read_fastcgi_keyvalue_pairs(content, offset) + request[name] = value + + response = {} + if FCGI_MAX_CONNS in request: + response[FCGI_MAX_CONNS] = '1' + + if FCGI_MAX_REQS in request: + response[FCGI_MAX_REQS] = '1' + + if FCGI_MPXS_CONNS in request: + response[FCGI_MPXS_CONNS] = '0' + + send_response(req_id, FCGI_GET_VALUES_RESULT, + write_fastcgi_keyvalue_pairs(response)) + + +# Formatting of 4-byte ints in network order +int_struct = struct.Struct('!i') + +# Our request processors for different FastCGI protocol requests. Only +# the requests which we receive are defined here. +REQUEST_PROCESSORS = { + FCGI_BEGIN_REQUEST : read_fastcgi_begin_request, + FCGI_ABORT_REQUEST : read_fastcgi_abort_request, + FCGI_PARAMS : read_fastcgi_params, + FCGI_STDIN : read_fastcgi_input, + FCGI_DATA : read_fastcgi_data, + FCGI_GET_VALUES : read_fastcgi_get_values +} + +def log(txt): + """Logs fatal errors to a log file if WSGI_LOG env var is defined""" + log_file = os.environ.get('WSGI_LOG') + if log_file: + f = file(log_file, 'a+') + try: + f.write(str(datetime.datetime.now())) + f.write(': ') + f.write(txt) + finally: + f.close() + + +def send_response(id, resp_type, content, streaming = True): + """sends a response w/ the given id, type, and content to the server. +If the content is streaming then an empty record is sent at the end to +terminate the stream""" + offset = 0 + while 1: + if id < 256: + id_0 = 0 + id_1 = id + else: + id_0 = id >> 8 + id_1 = id & 0xff + + # content len, padding len, content + len_remaining = len(content) - offset + if len_remaining > 65535: + len_0 = 0xff + len_1 = 0xff + content_str = content[offset:offset+65535] + offset += 65535 + else: + len_0 = len_remaining >> 8 + len_1 = len_remaining & 0xff + content_str = content[offset:] + offset += len_remaining + + data = '%c%c%c%c%c%c%c%c%s' % ( + FCGI_VERSION_1, # version + resp_type, # type + id_0, # requestIdB1 + id_1, # requestIdB0 + len_0, # contentLengthB1 + len_1, # contentLengthB0 + 0, # paddingLength + 0, # reserved + content_str) + + os.write(stdout, data) + if len_remaining == 0 or not streaming: + break + sys.stdin.flush() + +def get_environment(dir): + web_config = path.join(dir, 'Web.config') + + d = {} + + if os.path.exists(web_config): + try: + wc = file(web_config) + try: + doc = minidom.parse(wc) + config = doc.getElementsByTagName('configuration') + for configSection in config: + appSettings = configSection.getElementsByTagName('appSettings') + for appSettingsSection in appSettings: + values = appSettingsSection.getElementsByTagName('add') + for curAdd in values: + key = curAdd.getAttribute('key') + value = curAdd.getAttribute('value') + if key and value is not None: + d[key] = value + finally: + wc.close() + except: + # unable to read file + log(traceback.format_exc()) + pass + return d + +ReadDirectoryChangesW = ctypes.WinDLL('kernel32').ReadDirectoryChangesW +ReadDirectoryChangesW.restype = ctypes.c_bool +ReadDirectoryChangesW.argtypes = [ctypes.c_void_p, # HANDLE hDirectory + ctypes.c_void_p, # LPVOID lpBuffer + ctypes.c_uint32, # DWORD nBufferLength + ctypes.c_bool, # BOOL bWatchSubtree + ctypes.c_uint32, # DWORD dwNotifyFilter + ctypes.POINTER(ctypes.c_uint32), # LPDWORD lpBytesReturned + ctypes.c_void_p, # LPOVERLAPPED lpOverlapped + ctypes.c_void_p # LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine + ] + +CreateFile = ctypes.WinDLL('kernel32').CreateFileW +CreateFile.restype = ctypes.c_void_p +CreateFile.argtypes = [ctypes.c_wchar_p, # lpFilename + ctypes.c_uint32, # dwDesiredAccess + ctypes.c_uint32, # dwShareMode + ctypes.c_voidp, # LPSECURITY_ATTRIBUTES, + ctypes.c_uint32, # dwCreationDisposition, + ctypes.c_uint32, # dwFlagsAndAttributes, + ctypes.c_void_p # hTemplateFile + ] + +ExitProcess = ctypes.WinDLL('kernel32').ExitProcess +ExitProcess.restype = ctypes.c_void_p +ExitProcess.argtypes = [ctypes.c_uint32] + +FILE_LIST_DIRECTORY = 1 +FILE_SHARE_READ = 0x00000001 +FILE_SHARE_WRITE = 0x00000002 +FILE_SHARE_DELETE = 0x00000004 +OPEN_EXISTING = 3 +FILE_FLAG_BACKUP_SEMANTICS = 0x02000000 +MAX_PATH = 260 +FILE_NOTIFY_CHANGE_LAST_WRITE = 0x10 + +class FILE_NOTIFY_INFORMATION(ctypes.Structure): + _fields_ = [('NextEntryOffset', ctypes.c_uint32), + ('Action', ctypes.c_uint32), + ('FileNameLength', ctypes.c_uint32), + ('Filename', ctypes.c_wchar)] + +def start_file_watcher(path, restartRegex): + if restartRegex is None: + restartRegex = ".*((\\.py)|(\\.config))$" + elif not restartRegex: + # restart regex set to empty string, no restart behavior + return + + log('wfastcgi.py will restart when files in ' + path + ' are changed: ' + restartRegex + '\n') + restart = re.compile(restartRegex) + def watcher(path, restart): + the_dir = CreateFile(path, + FILE_LIST_DIRECTORY, + FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, + None, + OPEN_EXISTING, + FILE_FLAG_BACKUP_SEMANTICS, + None + ) + + buffer = ctypes.create_string_buffer(32 * 1024) + bytes_ret = ctypes.c_uint32() + + while ReadDirectoryChangesW(the_dir, + buffer, + ctypes.sizeof(buffer), + True, + FILE_NOTIFY_CHANGE_LAST_WRITE, + ctypes.byref(bytes_ret), + None, + None): + cur_pointer = ctypes.addressof(buffer) + while True: + fni = ctypes.cast(cur_pointer, ctypes.POINTER(FILE_NOTIFY_INFORMATION)) + filename = ctypes.wstring_at(cur_pointer + 12) + if restart.match(filename): + log('wfastcgi.py exiting because ' + filename + ' has changed, matching ' + restartRegex + '\n') + # we call ExitProcess directly to quickly shutdown the whole process + # because sys.exit(0) won't have an effect on the main thread. + ExitProcess(0) + if fni.contents.NextEntryOffset == 0: + break + cur_pointer = cur_pointer + fni.contents.NextEntryOffset + + thread.start_new_thread(watcher, (path, restart)) + +def get_wsgi_handler(handler_name): + if not handler_name: + raise Exception('WSGI_HANDLER env var must be set') + + module, _, callable = handler_name.rpartition('.') + if not module: + raise Exception('WSGI_HANDLER must be set to module_name.wsgi_handler, got %s' % handler_name) + + if isinstance(callable, unicode): + callable = callable.encode('ascii') + + if callable.endswith('()'): + callable = callable.rstrip('()') + handler = getattr(__import__(module, fromlist=[callable]), callable)() + else: + handler = getattr(__import__(module, fromlist=[callable]), callable) + + if handler is None: + raise Exception('WSGI_HANDLER "' + handler_name + '" was set to None') + + return handler + +def read_wsgi_handler(physical_path): + env = get_environment(physical_path) + os.environ.update(env) + for env_name in env: + if env_name.lower() == 'pythonpath': + # expand any environment variables in the path... + path = env[env_name] + for var in os.environ: + pat = re.compile(re.escape('%' + var + '%'), re.IGNORECASE) + path = pat.sub(lambda _:os.environ[var], path) + + + for path_location in path.split(';'): + sys.path.append(path_location) + break + + handler_ex = None + try: + handler_name = os.getenv('WSGI_HANDLER') + handler = get_wsgi_handler(handler_name) + except: + handler = None + handler_ex = sys.exc_info() + + + return env, handler, handler_ex + +if __name__ == '__main__': + stdout = sys.stdin.fileno() + try: + import msvcrt + msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY) + except ImportError: + pass + + _REQUESTS = {} + + initialized = False + fatal_error = False + log('wfastcgi.py ' + __version__ + ' started\n') + while fatal_error is False: + try: + record = read_fastcgi_record(sys.stdin) + if record: + record.params['wsgi.input'] = cStringIO.StringIO(record.params['wsgi.input']) + record.params['wsgi.version'] = (1,0) + record.params['wsgi.url_scheme'] = 'https' if record.params.has_key('HTTPS') and record.params['HTTPS'].lower() == 'on' else 'http' + record.params['wsgi.multiprocess'] = True + record.params['wsgi.multithread'] = False + record.params['wsgi.run_once'] = False + + physical_path = record.params.get('DOCUMENT_ROOT', path.dirname(__file__)) + + errors = sys.stderr = sys.__stderr__ = record.params['wsgi.errors'] = cStringIO.StringIO() + output = sys.stdout = sys.__stdout__ = cStringIO.StringIO() + + if not initialized: + os.chdir(physical_path) + + env, handler, handler_ex = read_wsgi_handler(physical_path) + + start_file_watcher(physical_path, env.get('WSGI_RESTART_FILE_REGEX')) + + log('wfastcgi.py ' + __version__ + ' initialized\n') + initialized = True + + def start_response(status, headers, exc_info = None): + status = 'Status: ' + status + '\r\n' + headers = ''.join('%s: %s\r\n' % (name, value) for name, value in headers) + send_response(record.req_id, FCGI_STDOUT, status + headers + '\r\n') + + os.environ.update(env) + if 'HTTP_X_ORIGINAL_URL' in record.params: + # We've been re-written for shared FastCGI hosting, send the original URL as the PATH_INFO. + record.params['PATH_INFO'] = record.params['HTTP_X_ORIGINAL_URL'] + + # PATH_INFO is not supposed to include the query parameters, so remove them + record.params['PATH_INFO'] = record.params['PATH_INFO'].partition('?')[0] + + # SCRIPT_NAME + PATH_INFO is supposed to be the full path http://www.python.org/dev/peps/pep-0333/ + # but by default (http://msdn.microsoft.com/en-us/library/ms525840(v=vs.90).aspx) IIS is sending us + # the full URL in PATH_INFO, so we need to clear the script name here + if 'AllowPathInfoForScriptMappings' not in os.environ: + record.params['SCRIPT_NAME'] = '' + + if handler is None: + fatal_error = True + error_msg = ('Error while importing WSGI_HANDLER:\n\n' + + ''.join(traceback.format_exception(*handler_ex)) + '\n\n' + + 'StdOut: ' + output.getvalue() + '\n\n' + 'StdErr: ' + errors.getvalue() + '\n\n') + log(error_msg) + send_response(record.req_id, FCGI_STDERR, error_msg) + else: + try: + for part in handler(record.params, start_response): + if part: + send_response(record.req_id, FCGI_STDOUT, part) + except: + log('Exception from handler: ' + traceback.format_exc()) + send_response(record.req_id, FCGI_STDERR, errors.getvalue() + '\n\n' + traceback.format_exc()) + + send_response(record.req_id, FCGI_END_REQUEST, '\x00\x00\x00\x00\x00\x00\x00\x00', streaming=False) + del _REQUESTS[record.req_id] + except _ExitException: + break + except: + log('Unhandled exception in wfastcgi.py: ' + traceback.format_exc()) + diff --git a/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Common/Constants.cs b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Common/Constants.cs new file mode 100644 index 000000000000..5706dd9f412d --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Common/Constants.cs @@ -0,0 +1,25 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Common +{ + public static class Constants + { + public const string JobCollectionResource = "JobCollection"; + public const string JobCollectionResourceURL = "/resources/scheduler/~/JobCollections/"; + public const string SchedulerRPNameProvider = "scheduler"; + public const string CloudServiceNameFirst = "cs-"; + public const string CloudServiceNameSecond = "-scheduler"; + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Common/ExtensionMethods.cs b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Common/ExtensionMethods.cs new file mode 100644 index 000000000000..ad8afce3cab6 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Common/ExtensionMethods.cs @@ -0,0 +1,107 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Model; +using Microsoft.WindowsAzure.Management.Scheduler.Models; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Common +{ + public static class ExtensionMethods + { + public static string ToCloudServiceName(this string region) + { + return Constants.CloudServiceNameFirst + region.Trim().Replace(" ", string.Empty) + Constants.CloudServiceNameSecond; + } + + public static Dictionary ToDictionary(this Hashtable hashTable) + { + return hashTable.Cast().ToDictionary(kvp => kvp.Key.ToString(), kvp => kvp.Value.ToString()); + } + + public static PSJobHistoryError ToJobHistoryError(this PSJobHistory history) + { + return new PSJobHistoryError + { + JobName = history.JobName, + Status = history.Status, + Details = history.Details, + EndTime = history.EndTime, + Occurence = history.Occurence, + StartTime = history.StartTime, + Retry = history.Retry + }; + } + + public static bool IsErrorActionSet(this PSCreateJobParams jobRequest) + { + return (!string.IsNullOrEmpty(jobRequest.ErrorActionBody) || + !string.IsNullOrEmpty(jobRequest.ErrorActionMethod) || + jobRequest.ErrorActionUri != null || + jobRequest.ErrorActionHeaders != null || + !string.IsNullOrEmpty(jobRequest.ErrorActionQueueBody) || + !string.IsNullOrEmpty(jobRequest.ErrorActionQueueName) || + !string.IsNullOrEmpty(jobRequest.ErrorActionSasToken) || + !string.IsNullOrEmpty(jobRequest.ErrorActionStorageAccount)); + } + + public static bool IsRecurrenceSet(this PSCreateJobParams jobRequest) + { + return (!string.IsNullOrEmpty(jobRequest.Frequency) || + jobRequest.Interval != null || + jobRequest.ExecutionCount != null || + jobRequest.EndTime != null); + } + + public static bool IsActionSet(this PSCreateJobParams jobRequest) + { + return (!string.IsNullOrEmpty(jobRequest.Method) || + jobRequest.Uri != null || + !string.IsNullOrEmpty(jobRequest.Body) || + jobRequest.Headers != null || + jobRequest.HttpAuthType != null); + } + + public static bool IsStorageActionSet(this PSCreateJobParams jobRequest) + { + return (!string.IsNullOrEmpty(jobRequest.StorageAccount) || + !string.IsNullOrEmpty(jobRequest.QueueName) || + !string.IsNullOrEmpty(jobRequest.SasToken) || + !string.IsNullOrEmpty(jobRequest.StorageQueueMessage)); + } + + public static JobCollectionRecurrenceFrequency GetFrequency(this TimeSpan timespan) + { + JobCollectionRecurrenceFrequency frequency = JobCollectionRecurrenceFrequency.Hour; + if (timespan.Hours > 0) + frequency = JobCollectionRecurrenceFrequency.Hour; + else if (timespan.Minutes > 0) + frequency = JobCollectionRecurrenceFrequency.Minute; + return frequency; + } + + public static int GetInterval(this TimeSpan timespan) + { + int interval = 1; + if (timespan.Hours > 0) + interval = timespan.Hours; + else if (timespan.Minutes > 0) + interval = timespan.Minutes; + return interval; + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Common/SchedulerUtils.cs b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Common/SchedulerUtils.cs new file mode 100644 index 000000000000..52c066a29efb --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Common/SchedulerUtils.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Security.Cryptography.X509Certificates; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Common +{ + public static class SchedulerUtils + { + public static string GetCertData(string pfxPath, string password) + { + if (!string.IsNullOrEmpty(pfxPath)) + { + var cert = new X509Certificate2(); + cert.Import(pfxPath, password, X509KeyStorageFlags.Exportable); + return cert.HasPrivateKey + ? Convert.ToBase64String(cert.Export(X509ContentType.Pfx, password)) + : Convert.ToBase64String(cert.Export(X509ContentType.Pkcs12)); + } + return null; + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSCreateJobCollectionParams.cs b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSCreateJobCollectionParams.cs new file mode 100644 index 000000000000..057b6f4f1982 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSCreateJobCollectionParams.cs @@ -0,0 +1,34 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Model +{ + + public class PSCreateJobCollectionParams + { + public string Region { get; set; } + + public string JobCollectionName { get; set; } + + public string JobCollectionPlan { get; set; } + + public int? MaxJobCount { get; set; } + + public int? MaxJobInterval { get; set; } + + public string MaxJobFrequency { get; set; } + + + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSCreateJobParams.cs b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSCreateJobParams.cs new file mode 100644 index 000000000000..71e9cf75daa3 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSCreateJobParams.cs @@ -0,0 +1,78 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Model +{ + public class PSCreateJobParams + { + public string Region { get; set; } + + public string JobCollectionName { get; set; } + + public string JobName { get; set; } + + public string Method { get; set; } + + public Uri Uri { get; set; } + + public string StorageAccount { get; set; } + + public string QueueName { get; set; } + + public string SasToken { get; set; } + + public string StorageQueueMessage { get; set; } + + public string Body { get; set; } + + public DateTime? StartTime { get; set; } + + public int? Interval { get; set; } + + public string Frequency { get; set; } + + public DateTime? EndTime { get; set; } + + public int? ExecutionCount { get; set; } + + public string JobState { get; set; } + + public Hashtable Headers { get; set; } + + public string ErrorActionMethod { get; set; } + + public Uri ErrorActionUri { get; set; } + + public string ErrorActionBody { get; set; } + + public Hashtable ErrorActionHeaders { get; set; } + + public string ErrorActionStorageAccount { get; set; } + + public string ErrorActionQueueName { get; set; } + + public string ErrorActionSasToken { get; set; } + + public string ErrorActionQueueBody { get; set; } + + public string HttpAuthType { get; set; } + + public string ClientCertPfx { get; set; } + + public string ClientCertPassword { get; set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSHttpJobDetail.cs b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSHttpJobDetail.cs new file mode 100644 index 000000000000..0d7f548083f4 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSHttpJobDetail.cs @@ -0,0 +1,36 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Model +{ + public class PSHttpJobDetail : PSJobDetail + { + public string Method { get; internal set; } + + public Uri Uri { get; internal set; } + + public string Body { get; internal set; } + + public IDictionary Headers { get; internal set; } + + public string ClientCertSubjectName { get; internal set; } + + public string ClientCertThumbprint { get; internal set; } + + public string ClientCertExpiryDate { get; internal set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSJobCollection.cs b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSJobCollection.cs new file mode 100644 index 000000000000..ed46fe838b26 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSJobCollection.cs @@ -0,0 +1,36 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Model +{ + public class PSJobCollection + { + public string CloudServiceName { get; internal set; } + + public string Location { get; internal set; } + + public string JobCollectionName { get; internal set; } + + public string Plan { get; internal set; } + + public string State { get; internal set; } + + public string MaxJobCount { get; internal set; } + + public string MaxRecurrence { get; internal set; } + + public string Uri { get; internal set; } + } +} + diff --git a/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSJobDetail.cs b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSJobDetail.cs new file mode 100644 index 000000000000..5947a0730eb3 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSJobDetail.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Model +{ + public class PSJobDetail: PSSchedulerJob + { + public string CloudService { get; internal set; } + + public string ActionType { get; internal set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSJobHistory.cs b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSJobHistory.cs new file mode 100644 index 000000000000..2841c3d65b44 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSJobHistory.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Model +{ + public class PSJobHistory + { + public string JobName { get; internal set; } + + public string Status { get; internal set; } + + public int? Retry { get; internal set; } + + public int? Occurence { get; internal set; } + + public DateTime? StartTime { get; internal set; } + + public DateTime? EndTime { get; internal set; } + + public PSJobHistoryDetail Details { get; internal set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSJobHistoryDetail.cs b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSJobHistoryDetail.cs new file mode 100644 index 000000000000..42adbd27ae9e --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSJobHistoryDetail.cs @@ -0,0 +1,21 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Model +{ + public class PSJobHistoryDetail + { + public string ActionType { get; internal set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSJobHistoryError.cs b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSJobHistoryError.cs new file mode 100644 index 000000000000..aedad61e5bf9 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSJobHistoryError.cs @@ -0,0 +1,21 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Model +{ + public class PSJobHistoryError: PSJobHistory + { + public string ErrorAction { get; internal set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSJobHistoryHttpDetail.cs b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSJobHistoryHttpDetail.cs new file mode 100644 index 000000000000..9a106b1d00d5 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSJobHistoryHttpDetail.cs @@ -0,0 +1,25 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Model +{ + public class PSJobHistoryHttpDetail: PSJobHistoryDetail + { + public string HostName { get; internal set; } + + public string Response { get; internal set; } + + public string ResponseBody { get; internal set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSJobHistoryStorageDetail.cs b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSJobHistoryStorageDetail.cs new file mode 100644 index 000000000000..d19a8441b018 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSJobHistoryStorageDetail.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Model +{ + public class PSJobHistoryStorageDetail: PSJobHistoryDetail + { + public string StorageAccountName { get; internal set; } + + public string StorageQueueName { get; internal set; } + + public string ResponseStatus { get; internal set; } + + public string ResponseBody { get; internal set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSSchedulerJob.cs b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSSchedulerJob.cs new file mode 100644 index 000000000000..4c6007e8ab89 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSSchedulerJob.cs @@ -0,0 +1,44 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Model +{ + public class PSSchedulerJob + { + public string JobCollectionName { get; internal set; } + + public string JobName { get; internal set; } + + public DateTime? Lastrun { get; internal set; } + + public DateTime? Nextrun { get; internal set; } + + public DateTime? StartTime { get; internal set; } + + public string Status { get; internal set; } + + public string Recurrence { get; internal set; } + + public int? Failures { get; internal set; } + + public int? Faults { get; internal set; } + + public int? Executions { get; internal set; } + + public string EndSchedule { get; internal set; } + + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSStorageQueueJobDetail.cs b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSStorageQueueJobDetail.cs new file mode 100644 index 000000000000..bf24258c5533 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/Model/PSStorageQueueJobDetail.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Model +{ + public class PSStorageQueueJobDetail: PSJobDetail + { + public string QueueMessage { get; internal set; } + + public string StorageAccountName { get; internal set; } + + public string StorageQueueName { get; internal set; } + + public string SasToken { get; internal set; } + + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Scheduler/SchedulerBaseCmdlet.cs b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/SchedulerBaseCmdlet.cs new file mode 100644 index 000000000000..f344e69c5b60 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/SchedulerBaseCmdlet.cs @@ -0,0 +1,36 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Scheduler +{ + public abstract class SchedulerBaseCmdlet : AzurePSCmdlet + { + private SchedulerMgmntClient schedulerMgmntClient; + + public SchedulerMgmntClient SMClient + { + get + { + if (schedulerMgmntClient == null) + { + schedulerMgmntClient = new SchedulerMgmntClient(CurrentContext.Subscription); + } + return schedulerMgmntClient; + } + set { } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Scheduler/SchedulerMgmntClient.CreateJobCollection.cs b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/SchedulerMgmntClient.CreateJobCollection.cs new file mode 100644 index 000000000000..048ca8092e2a --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/SchedulerMgmntClient.CreateJobCollection.cs @@ -0,0 +1,304 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Model; +using Microsoft.WindowsAzure.Management.Scheduler.Models; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Scheduler +{ + public partial class SchedulerMgmntClient + { + /// + /// Creates a new Scheduler Job Collection + /// + /// Request values + /// Status of create action + /// Created Scheduler Job Collection + public PSJobCollection CreateJobCollection(PSCreateJobCollectionParams jobCollectionRequest, out string status) + { + if (!this.AvailableRegions.Contains(jobCollectionRequest.Region, StringComparer.OrdinalIgnoreCase)) + throw new Exception(Resources.SchedulerInvalidLocation); + + //Only one free job collection can exist in a subscription + if (this.HasFreeJobCollections(jobCollectionRequest.Region) && !string.IsNullOrEmpty(jobCollectionRequest.JobCollectionPlan) && jobCollectionRequest.JobCollectionPlan.Equals("Free")) + throw new Exception(Resources.SchedulerNoMoreFreeJobCollection); + + //Job collection name should be unique in a region + if (this.HasJobCollection(jobCollectionRequest.Region, jobCollectionRequest.JobCollectionName)) + throw new Exception(string.Format(Resources.SchedulerExistingJobCollection, jobCollectionRequest.JobCollectionName, jobCollectionRequest.Region)); + + //Create cloud service, if not available + if (!IsCloudServiceCreated(jobCollectionRequest.Region)) + { + csmClient.CloudServices.Create( + cloudServiceName: jobCollectionRequest.Region.ToCloudServiceName(), + parameters: new CloudServiceCreateParameters + { + Description = "Cloud service created by scheduler powershell", + GeoRegion = jobCollectionRequest.Region, + Label = "Cloud service created by scheduler powershell" + }); + } + + JobCollectionCreateParameters jobCollectionCreateParams = new JobCollectionCreateParameters + { + IntrinsicSettings = new JobCollectionIntrinsicSettings + { + Plan = !string.IsNullOrWhiteSpace(jobCollectionRequest.JobCollectionPlan) ? + (JobCollectionPlan)Enum.Parse(typeof(JobCollectionPlan), jobCollectionRequest.JobCollectionPlan) : JobCollectionPlan.Standard + } + }; + + switch (jobCollectionCreateParams.IntrinsicSettings.Plan) + { + case JobCollectionPlan.Free: + jobCollectionCreateParams.IntrinsicSettings.Quota = new JobCollectionQuota + { + MaxJobCount = jobCollectionRequest.MaxJobCount.HasValue ? jobCollectionRequest.MaxJobCount : this.FreeMaxJobCountValue, + MaxRecurrence = new JobCollectionMaxRecurrence + { + Interval = jobCollectionRequest.MaxJobInterval.HasValue ? jobCollectionRequest.MaxJobInterval.Value : this.FreeMinRecurrenceValue.GetInterval(), + Frequency = !string.IsNullOrWhiteSpace(jobCollectionRequest.MaxJobFrequency) + ? (JobCollectionRecurrenceFrequency)Enum.Parse(typeof(JobCollectionRecurrenceFrequency), jobCollectionRequest.MaxJobFrequency) + : this.FreeMinRecurrenceValue.GetFrequency() + } + }; + break; + + case JobCollectionPlan.Standard: + default: + jobCollectionCreateParams.IntrinsicSettings.Quota = new JobCollectionQuota + { + MaxJobCount = jobCollectionRequest.MaxJobCount.HasValue ? jobCollectionRequest.MaxJobCount : this.StandardMaxJobCountValue, + MaxRecurrence = new JobCollectionMaxRecurrence + { + Interval = jobCollectionRequest.MaxJobInterval.HasValue ? jobCollectionRequest.MaxJobInterval.Value : this.StandardMinRecurrenceValue.GetInterval(), + Frequency = !string.IsNullOrWhiteSpace(jobCollectionRequest.MaxJobFrequency) + ? (JobCollectionRecurrenceFrequency)Enum.Parse(typeof(JobCollectionRecurrenceFrequency), jobCollectionRequest.MaxJobFrequency) + : this.StandardMinRecurrenceValue.GetFrequency() + } + }; + break; + + case JobCollectionPlan.Premium: + jobCollectionCreateParams.IntrinsicSettings.Quota = new JobCollectionQuota + { + MaxJobCount = jobCollectionRequest.MaxJobCount.HasValue ? jobCollectionRequest.MaxJobCount : this.PremiumMaxJobCountValue, + MaxRecurrence = new JobCollectionMaxRecurrence + { + Interval = jobCollectionRequest.MaxJobInterval.HasValue ? jobCollectionRequest.MaxJobInterval.Value : this.PremiumMinRecurrenceValue.GetInterval(), + Frequency = !string.IsNullOrWhiteSpace(jobCollectionRequest.MaxJobFrequency) + ? (JobCollectionRecurrenceFrequency)Enum.Parse(typeof(JobCollectionRecurrenceFrequency), jobCollectionRequest.MaxJobFrequency) + : this.PremiumMinRecurrenceValue.GetFrequency() + } + }; + break; + } + + SchedulerOperationStatusResponse jobCollectionCreateResponse = schedulerManagementClient.JobCollections.Create( + cloudServiceName: jobCollectionRequest.Region.ToCloudServiceName(), + jobCollectionName: jobCollectionRequest.JobCollectionName, + parameters: jobCollectionCreateParams); + + status = jobCollectionCreateResponse.StatusCode.ToString().Equals("OK") ? "Job Collection has been created" : jobCollectionCreateResponse.StatusCode.ToString(); + + return GetJobCollection(jobCollectionRequest.Region, jobCollectionRequest.JobCollectionName).FirstOrDefault(); + } + + /// + /// Returns true if subscription has a free job collection + /// + /// Region name + /// true, if subscription has a free job collection + internal bool HasFreeJobCollections(string region) + { + bool isPresent = false; + string cloudService = region.ToCloudServiceName(); + foreach (CloudServiceListResponse.CloudService cs in csmClient.CloudServices.List().CloudServices) + { + if (cs.Name.Equals(cloudService, StringComparison.OrdinalIgnoreCase)) + { + foreach (CloudServiceGetResponse.Resource csRes in csmClient.CloudServices.Get(cs.Name).Resources) + { + if (csRes.Type.Contains(Constants.JobCollectionResource) && !csRes.State.Equals("Unknown")) + { + JobCollectionGetResponse jcGetResponse = schedulerManagementClient.JobCollections.Get(cs.Name, csRes.Name); + if (jcGetResponse.IntrinsicSettings != null && jcGetResponse.IntrinsicSettings.Plan.Equals(JobCollectionPlan.Free)) + { + isPresent = true; + break; + } + } + } + } + } + return isPresent; + } + + /// + /// Returns true if subscription already has a job collection with the given name in the region + /// + /// The job collection name + /// true, if job collection with given name already exists + internal bool HasJobCollection(string region, string jobCollectionName) + { + bool isPresent = false; + string cloudService = region.ToCloudServiceName(); + foreach (CloudServiceListResponse.CloudService cs in csmClient.CloudServices.List().CloudServices) + { + if (cs.Name.Equals(cloudService, StringComparison.OrdinalIgnoreCase)) + { + foreach (CloudServiceGetResponse.Resource csRes in csmClient.CloudServices.Get(cs.Name).Resources) + { + if (csRes.Type.Contains(Constants.JobCollectionResource) && csRes.Name.Equals(jobCollectionName, StringComparison.OrdinalIgnoreCase)) + { + isPresent = true; + break; + } + } + } + } + return isPresent; + } + + /// + /// Verifies if cloud service is already created + /// + /// location to look under + /// true, if already created + internal bool IsCloudServiceCreated(string region) + { + bool created = false; + foreach (CloudServiceListResponse.CloudService cs in csmClient.CloudServices.List()) + { + if (cs.Name.Equals(region.ToCloudServiceName(), StringComparison.OrdinalIgnoreCase)) + { + created = true; + break; + } + } + return created; + } + + /// + /// Updates a job collection + /// + /// The job collection request + /// Status of update operation + /// The updated job collection + public PSJobCollection UpdateJobCollection(PSCreateJobCollectionParams jobCollectionRequest, out string status) + { + if (!this.AvailableRegions.Contains(jobCollectionRequest.Region, StringComparer.OrdinalIgnoreCase)) + throw new Exception(Resources.SchedulerInvalidLocation); + + //Get existing job collection + JobCollectionGetResponse jcGetResponse = schedulerManagementClient.JobCollections.Get( + cloudServiceName: jobCollectionRequest.Region.ToCloudServiceName(), + jobCollectionName: jobCollectionRequest.JobCollectionName); + + JobCollectionUpdateParameters jcUpdateParams = new JobCollectionUpdateParameters + { + IntrinsicSettings = jcGetResponse.IntrinsicSettings, + ETag = jcGetResponse.ETag, + Label = jcGetResponse.Label + }; + + if (!string.IsNullOrWhiteSpace(jobCollectionRequest.JobCollectionPlan)) + { + jcUpdateParams.IntrinsicSettings.Plan = (JobCollectionPlan)Enum.Parse(typeof(JobCollectionPlan), jobCollectionRequest.JobCollectionPlan); + } + + if (jobCollectionRequest.MaxJobCount.HasValue) + { + if (jcUpdateParams.IntrinsicSettings.Quota != null) + { + jcUpdateParams.IntrinsicSettings.Quota.MaxJobCount = jobCollectionRequest.MaxJobCount; + } + else + { + jcUpdateParams.IntrinsicSettings.Quota = new JobCollectionQuota { MaxJobCount = jobCollectionRequest.MaxJobCount }; + } + } + + if (jobCollectionRequest.MaxJobInterval.HasValue) + { + if (jcUpdateParams.IntrinsicSettings.Quota != null) + { + if (jcUpdateParams.IntrinsicSettings.Quota.MaxRecurrence != null) + { + jcUpdateParams.IntrinsicSettings.Quota.MaxRecurrence.Interval = jobCollectionRequest.MaxJobInterval.Value; + } + else + { + jcUpdateParams.IntrinsicSettings.Quota.MaxRecurrence = new JobCollectionMaxRecurrence + { + Interval = jobCollectionRequest.MaxJobInterval.Value + }; + } + } + else + { + jcUpdateParams.IntrinsicSettings.Quota = new JobCollectionQuota + { + MaxRecurrence = new JobCollectionMaxRecurrence + { + Interval = jobCollectionRequest.MaxJobInterval.Value + } + }; + } + } + + if (!string.IsNullOrWhiteSpace(jobCollectionRequest.MaxJobFrequency)) + { + if (jcUpdateParams.IntrinsicSettings.Quota != null) + { + if (jcUpdateParams.IntrinsicSettings.Quota.MaxRecurrence != null) + { + jcUpdateParams.IntrinsicSettings.Quota.MaxRecurrence.Frequency = (JobCollectionRecurrenceFrequency)Enum.Parse(typeof(JobCollectionRecurrenceFrequency), jobCollectionRequest.MaxJobFrequency); + } + else + { + jcUpdateParams.IntrinsicSettings.Quota.MaxRecurrence = new JobCollectionMaxRecurrence + { + Frequency = (JobCollectionRecurrenceFrequency)Enum.Parse(typeof(JobCollectionRecurrenceFrequency), jobCollectionRequest.MaxJobFrequency) + }; + } + } + else + { + jcUpdateParams.IntrinsicSettings.Quota = new JobCollectionQuota + { + MaxRecurrence = new JobCollectionMaxRecurrence + { + Frequency = (JobCollectionRecurrenceFrequency)Enum.Parse(typeof(JobCollectionRecurrenceFrequency), jobCollectionRequest.MaxJobFrequency) + } + }; + } + } + + SchedulerOperationStatusResponse response = schedulerManagementClient.JobCollections.Update( + cloudServiceName: jobCollectionRequest.Region.ToCloudServiceName(), + jobCollectionName: jobCollectionRequest.JobCollectionName, + parameters: jcUpdateParams); + + status = response.StatusCode.ToString().Equals("OK") ? "Job Collection has been updated" : response.StatusCode.ToString(); + + return GetJobCollection(jobCollectionRequest.Region, jobCollectionRequest.JobCollectionName).FirstOrDefault(); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Scheduler/SchedulerMgmntClient.CreateJobs.cs b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/SchedulerMgmntClient.CreateJobs.cs new file mode 100644 index 000000000000..9fc671dac66a --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/SchedulerMgmntClient.CreateJobs.cs @@ -0,0 +1,536 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Model; +using Microsoft.WindowsAzure.Scheduler; +using Microsoft.WindowsAzure.Scheduler.Models; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Scheduler +{ + public partial class SchedulerMgmntClient + { + #region Create Jobs + + /// + /// Populates ErrorAction values from the request + /// + /// Request values + /// Populated JobErrorAction object + private JobErrorAction PopulateErrorAction(PSCreateJobParams jobRequest) + { + if (!string.IsNullOrEmpty(jobRequest.ErrorActionMethod) && jobRequest.ErrorActionUri != null) + { + JobErrorAction errorAction = new JobErrorAction + { + Request = new JobHttpRequest + { + Uri = jobRequest.ErrorActionUri, + Method = jobRequest.ErrorActionMethod + } + }; + + if (jobRequest.ErrorActionHeaders != null) + { + errorAction.Request.Headers = jobRequest.ErrorActionHeaders.ToDictionary(); + } + + if (jobRequest.ErrorActionMethod.Equals("PUT", StringComparison.OrdinalIgnoreCase) || jobRequest.ErrorActionMethod.Equals("POST", StringComparison.OrdinalIgnoreCase)) + errorAction.Request.Body = jobRequest.ErrorActionBody; + return errorAction; + } + + if (!string.IsNullOrEmpty(jobRequest.ErrorActionSasToken) && !string.IsNullOrEmpty(jobRequest.ErrorActionStorageAccount) && !string.IsNullOrEmpty(jobRequest.ErrorActionQueueName)) + { + return new JobErrorAction + { + QueueMessage = new JobQueueMessage + { + QueueName = jobRequest.ErrorActionQueueName, + StorageAccountName = jobRequest.ErrorActionStorageAccount, + SasToken = jobRequest.ErrorActionSasToken, + Message = jobRequest.ErrorActionQueueBody ?? "" + } + }; + } + return null; + } + + /// + /// Creates a new Http Scheduler job + /// + /// Request values + /// Status of create action + /// Created Http Scheduler job + public PSJobDetail CreateHttpJob(PSCreateJobParams jobRequest, out string status) + { + if (!this.AvailableRegions.Contains(jobRequest.Region, StringComparer.OrdinalIgnoreCase)) + throw new Exception(Resources.SchedulerInvalidLocation); + + SchedulerClient schedulerClient = AzureSession.ClientFactory.CreateCustomClient(jobRequest.Region.ToCloudServiceName(), jobRequest.JobCollectionName, csmClient.Credentials, schedulerManagementClient.BaseUri); + + JobCreateOrUpdateParameters jobCreateParams = new JobCreateOrUpdateParameters + { + Action = new JobAction + { + Request = new JobHttpRequest + { + Uri = jobRequest.Uri, + Method = jobRequest.Method + }, + } + }; + + if (jobRequest.Headers != null) + { + jobCreateParams.Action.Request.Headers = jobRequest.Headers.ToDictionary(); + } + + if (jobRequest.HttpAuthType.Equals("ClientCertificate", StringComparison.OrdinalIgnoreCase)) + { + if (jobRequest.ClientCertPfx != null && jobRequest.ClientCertPassword != null) + { + jobCreateParams.Action.Request.Authentication = new ClientCertAuthentication + { + Type = HttpAuthenticationType.ClientCertificate, + Password = jobRequest.ClientCertPassword, + Pfx = jobRequest.ClientCertPfx + }; + } + else + { + throw new InvalidOperationException(Resources.SchedulerInvalidClientCertAuthRequest); + } + } + + if (jobRequest.HttpAuthType.Equals("None", StringComparison.OrdinalIgnoreCase)) + { + if (!string.IsNullOrEmpty(jobRequest.ClientCertPfx) || !string.IsNullOrEmpty(jobRequest.ClientCertPassword)) + { + throw new InvalidOperationException(Resources.SchedulerInvalidNoneAuthRequest); + } + } + + if (jobRequest.Method.Equals("PUT", StringComparison.OrdinalIgnoreCase) || jobRequest.Method.Equals("POST", StringComparison.OrdinalIgnoreCase)) + jobCreateParams.Action.Request.Body = jobRequest.Body; + + //Populate job error action + jobCreateParams.Action.ErrorAction = PopulateErrorAction(jobRequest); + + jobCreateParams.StartTime = jobRequest.StartTime ?? default(DateTime?); + + if (jobRequest.Interval != null || jobRequest.ExecutionCount != null || !string.IsNullOrEmpty(jobRequest.Frequency) || jobRequest.EndTime != null) + { + jobCreateParams.Recurrence = new JobRecurrence(); + jobCreateParams.Recurrence.Count = jobRequest.ExecutionCount ?? default(int?); + + if (!string.IsNullOrEmpty(jobRequest.Frequency)) + jobCreateParams.Recurrence.Frequency = (JobRecurrenceFrequency)Enum.Parse(typeof(JobRecurrenceFrequency), jobRequest.Frequency); + + jobCreateParams.Recurrence.Interval = jobRequest.Interval ?? default(int?); + + jobCreateParams.Recurrence.EndTime = jobRequest.EndTime ?? default(DateTime?); + } + + JobCreateOrUpdateResponse jobCreateResponse = schedulerClient.Jobs.CreateOrUpdate(jobRequest.JobName, jobCreateParams); + + if (!string.IsNullOrEmpty(jobRequest.JobState) && jobRequest.JobState.Equals("DISABLED", StringComparison.OrdinalIgnoreCase)) + schedulerClient.Jobs.UpdateState(jobRequest.JobName, new JobUpdateStateParameters { State = JobState.Disabled }); + + status = jobCreateResponse.StatusCode.ToString().Equals("OK") ? "Job has been updated" : jobCreateResponse.StatusCode.ToString(); + + return GetJobDetail(jobRequest.JobCollectionName, jobRequest.JobName, jobRequest.Region.ToCloudServiceName()); + } + + /// + /// Creates a Storage Queue Scheduler job + /// + /// Request values + /// Status of create action + /// Created Storage Queue Scheduler job + public PSJobDetail CreateStorageJob(PSCreateJobParams jobRequest, out string status) + { + if (!this.AvailableRegions.Contains(jobRequest.Region, StringComparer.OrdinalIgnoreCase)) + throw new Exception(Resources.SchedulerInvalidLocation); + + SchedulerClient schedulerClient = AzureSession.ClientFactory.CreateCustomClient(jobRequest.Region.ToCloudServiceName(), jobRequest.JobCollectionName, csmClient.Credentials, schedulerManagementClient.BaseUri); + + JobCreateOrUpdateParameters jobCreateParams = new JobCreateOrUpdateParameters + { + Action = new JobAction + { + Type = JobActionType.StorageQueue, + QueueMessage = new JobQueueMessage + { + Message = jobRequest.Body ?? string.Empty, + StorageAccountName = jobRequest.StorageAccount, + QueueName = jobRequest.QueueName, + SasToken = jobRequest.SasToken + }, + } + }; + + //Populate job error action + jobCreateParams.Action.ErrorAction = PopulateErrorAction(jobRequest); + + jobCreateParams.StartTime = jobRequest.StartTime ?? default(DateTime?); + + if (jobRequest.Interval != null || jobRequest.ExecutionCount != null || !string.IsNullOrEmpty(jobRequest.Frequency) || jobRequest.EndTime != null) + { + jobCreateParams.Recurrence = new JobRecurrence(); + jobCreateParams.Recurrence.Count = jobRequest.ExecutionCount ?? default(int?); + + if (!string.IsNullOrEmpty(jobRequest.Frequency)) + jobCreateParams.Recurrence.Frequency = (JobRecurrenceFrequency)Enum.Parse(typeof(JobRecurrenceFrequency), jobRequest.Frequency); + + jobCreateParams.Recurrence.Interval = jobRequest.Interval ?? default(int?); + + jobCreateParams.Recurrence.EndTime = jobRequest.EndTime ?? default(DateTime?); + } + + JobCreateOrUpdateResponse jobCreateResponse = schedulerClient.Jobs.CreateOrUpdate(jobRequest.JobName, jobCreateParams); + + if (!string.IsNullOrEmpty(jobRequest.JobState) && jobRequest.JobState.Equals("DISABLED", StringComparison.OrdinalIgnoreCase)) + schedulerClient.Jobs.UpdateState(jobRequest.JobName, new JobUpdateStateParameters { State = JobState.Disabled }); + + status = jobCreateResponse.StatusCode.ToString().Equals("OK") ? "Job has been updated" : jobCreateResponse.StatusCode.ToString(); + + return GetJobDetail(jobRequest.JobCollectionName, jobRequest.JobName, jobRequest.Region.ToCloudServiceName()); + } + + #endregion + + /// + /// Updates given Http Scheduler job + /// + /// Request values + /// Status of uodate operation + /// Updated Http Scheduler job + public PSJobDetail PatchHttpJob(PSCreateJobParams jobRequest, out string status) + { + if (!this.AvailableRegions.Contains(jobRequest.Region, StringComparer.OrdinalIgnoreCase)) + throw new Exception(Resources.SchedulerInvalidLocation); + + SchedulerClient schedulerClient = AzureSession.ClientFactory.CreateCustomClient(jobRequest.Region.ToCloudServiceName(), jobRequest.JobCollectionName, csmClient.Credentials, schedulerManagementClient.BaseUri); + + //Get Existing job + Job job = schedulerClient.Jobs.Get(jobRequest.JobName).Job; + + JobCreateOrUpdateParameters jobUpdateParams = PopulateExistingJobParams(job, jobRequest, job.Action.Type); + + JobCreateOrUpdateResponse jobUpdateResponse = schedulerClient.Jobs.CreateOrUpdate(jobRequest.JobName, jobUpdateParams); + + if (!string.IsNullOrEmpty(jobRequest.JobState)) + schedulerClient.Jobs.UpdateState(jobRequest.JobName, new JobUpdateStateParameters + { + State = jobRequest.JobState.Equals("Enabled", StringComparison.OrdinalIgnoreCase) ? JobState.Enabled + : JobState.Disabled + }); + + status = jobUpdateResponse.StatusCode.ToString().Equals("OK") ? "Job has been updated" : jobUpdateResponse.StatusCode.ToString(); + + return GetJobDetail(jobRequest.JobCollectionName, jobRequest.JobName, jobRequest.Region.ToCloudServiceName()); + } + + /// + /// If a scheduler job already exists, this will merge the existing job config values with the request + /// + /// Existing Scheduler job + /// Request values + /// Http or Storage + /// JobCreateOrUpdateParameters object to use when updating Scheduler job + private JobCreateOrUpdateParameters PopulateExistingJobParams(Job job, PSCreateJobParams jobRequest, JobActionType type) + { + JobCreateOrUpdateParameters jobUpdateParams = new JobCreateOrUpdateParameters(); + + if (type.Equals(JobActionType.StorageQueue)) + { + if (jobRequest.IsStorageActionSet()) + { + jobUpdateParams.Action = new JobAction(); + jobUpdateParams.Action.QueueMessage = new JobQueueMessage(); + if (job.Action != null) + { + jobUpdateParams.Action.Type = job.Action.Type; + if (job.Action.QueueMessage != null) + { + jobUpdateParams.Action.QueueMessage.Message = string.IsNullOrEmpty(jobRequest.StorageQueueMessage) ? job.Action.QueueMessage.Message : jobRequest.StorageQueueMessage; + jobUpdateParams.Action.QueueMessage.QueueName = jobRequest.QueueName ?? job.Action.QueueMessage.QueueName; + jobUpdateParams.Action.QueueMessage.SasToken = jobRequest.SasToken ?? job.Action.QueueMessage.SasToken; + jobUpdateParams.Action.QueueMessage.StorageAccountName = job.Action.QueueMessage.StorageAccountName; + } + else if (job.Action.QueueMessage == null) + { + jobUpdateParams.Action.QueueMessage.Message = string.IsNullOrEmpty(jobRequest.StorageQueueMessage) ? string.Empty : jobRequest.StorageQueueMessage; + jobUpdateParams.Action.QueueMessage.QueueName = jobRequest.QueueName; + jobUpdateParams.Action.QueueMessage.SasToken = jobRequest.SasToken; + jobUpdateParams.Action.QueueMessage.StorageAccountName = jobRequest.StorageAccount; + } + } + else + { + jobUpdateParams.Action.QueueMessage.Message = string.IsNullOrEmpty(jobRequest.StorageQueueMessage) ? string.Empty : jobRequest.StorageQueueMessage; + jobUpdateParams.Action.QueueMessage.QueueName = jobRequest.QueueName; + jobUpdateParams.Action.QueueMessage.SasToken = jobRequest.SasToken; + jobUpdateParams.Action.QueueMessage.StorageAccountName = jobRequest.StorageAccount; + } + } + else + { + jobUpdateParams.Action = job.Action; + } + } + + else //If it is a HTTP job action type + { + if (jobRequest.IsActionSet()) + { + jobUpdateParams.Action = new JobAction(); + jobUpdateParams.Action.Request = new JobHttpRequest(); + if (job.Action != null) + { + jobUpdateParams.Action.Type = job.Action.Type; + if (job.Action.Request != null) + { + jobUpdateParams.Action.Request.Uri = jobRequest.Uri ?? job.Action.Request.Uri; + jobUpdateParams.Action.Request.Method = jobRequest.Method ?? job.Action.Request.Method; + jobUpdateParams.Action.Request.Headers = jobRequest.Headers == null ? job.Action.Request.Headers : jobRequest.Headers.ToDictionary(); + jobUpdateParams.Action.Request.Body = jobRequest.Body ?? job.Action.Request.Body; + + //Job has existing authentication + if (job.Action.Request.Authentication != null) + { + if (jobRequest.HttpAuthType.Equals("ClientCertificate", StringComparison.OrdinalIgnoreCase)) + { + jobUpdateParams.Action.Request.Authentication = SetClientCertAuthentication(jobRequest, jobUpdateParams); + } + else if (jobRequest.HttpAuthType.Equals("None", StringComparison.OrdinalIgnoreCase)) + { + if (!string.IsNullOrEmpty(jobRequest.ClientCertPfx) || !string.IsNullOrEmpty(jobRequest.ClientCertPassword)) + { + throw new InvalidOperationException(Resources.SchedulerInvalidNoneAuthRequest); + } + else + { + jobUpdateParams.Action.Request.Authentication = null; + } + } + else + { + jobUpdateParams.Action.Request.Authentication = job.Action.Request.Authentication; + } + } + else if (job.Action.Request.Authentication == null && jobRequest.HttpAuthType.Equals("ClientCertificate", StringComparison.OrdinalIgnoreCase)) + { + jobUpdateParams.Action.Request.Authentication = SetClientCertAuthentication(jobRequest, jobUpdateParams); + } + } + else if (job.Action.Request == null) + { + jobUpdateParams.Action.Request.Uri = jobRequest.Uri; + jobUpdateParams.Action.Request.Method = jobRequest.Method; + jobUpdateParams.Action.Request.Headers = jobRequest.Headers.ToDictionary(); + jobUpdateParams.Action.Request.Body = jobRequest.Body; + if (jobRequest.HttpAuthType.Equals("ClientCertificate", StringComparison.OrdinalIgnoreCase)) + { + jobUpdateParams.Action.Request.Authentication = SetClientCertAuthentication(jobRequest, jobUpdateParams); + } + } + } + else + { + jobUpdateParams.Action.Request.Uri = jobRequest.Uri; + jobUpdateParams.Action.Request.Method = jobRequest.Method; + jobUpdateParams.Action.Request.Headers = jobRequest.Headers.ToDictionary(); + jobUpdateParams.Action.Request.Body = jobRequest.Body; + if (jobRequest.HttpAuthType.Equals("ClientCertificate", StringComparison.OrdinalIgnoreCase)) + { + jobUpdateParams.Action.Request.Authentication = SetClientCertAuthentication(jobRequest, jobUpdateParams); + } + } + } + else + { + jobUpdateParams.Action = job.Action; + } + } + + if (jobRequest.IsErrorActionSet()) + { + jobUpdateParams.Action.ErrorAction = new JobErrorAction(); + jobUpdateParams.Action.ErrorAction.Request = new JobHttpRequest(); + jobUpdateParams.Action.ErrorAction.QueueMessage = new JobQueueMessage(); + + if (job.Action.ErrorAction != null) + { + if (job.Action.ErrorAction.Request != null) + { + jobUpdateParams.Action.ErrorAction.Request.Uri = jobRequest.ErrorActionUri ?? job.Action.ErrorAction.Request.Uri; + jobUpdateParams.Action.ErrorAction.Request.Method = jobRequest.ErrorActionMethod ?? job.Action.ErrorAction.Request.Method; + jobUpdateParams.Action.ErrorAction.Request.Headers = jobRequest.ErrorActionHeaders == null ? job.Action.ErrorAction.Request.Headers : jobRequest.Headers.ToDictionary(); + jobUpdateParams.Action.ErrorAction.Request.Body = jobRequest.ErrorActionBody ?? job.Action.ErrorAction.Request.Body; + } + else if (job.Action.ErrorAction.Request == null) + { + jobUpdateParams.Action.ErrorAction.Request.Uri = jobRequest.ErrorActionUri; + jobUpdateParams.Action.ErrorAction.Request.Method = jobRequest.ErrorActionMethod; + jobUpdateParams.Action.ErrorAction.Request.Headers = jobRequest.ErrorActionHeaders.ToDictionary(); + jobUpdateParams.Action.ErrorAction.Request.Body = jobRequest.ErrorActionBody; + } + if (job.Action.ErrorAction.QueueMessage != null) + { + jobUpdateParams.Action.ErrorAction.QueueMessage.Message = jobRequest.ErrorActionQueueBody ?? job.Action.ErrorAction.QueueMessage.Message; + jobUpdateParams.Action.ErrorAction.QueueMessage.QueueName = jobRequest.ErrorActionQueueName ?? job.Action.ErrorAction.QueueMessage.QueueName; + jobUpdateParams.Action.ErrorAction.QueueMessage.SasToken = jobRequest.ErrorActionSasToken ?? job.Action.ErrorAction.QueueMessage.SasToken; + jobUpdateParams.Action.ErrorAction.QueueMessage.StorageAccountName = jobRequest.ErrorActionStorageAccount ?? job.Action.ErrorAction.QueueMessage.StorageAccountName; + } + else if (job.Action.ErrorAction.QueueMessage == null) + { + jobUpdateParams.Action.ErrorAction.QueueMessage.Message = jobRequest.ErrorActionQueueBody; + jobUpdateParams.Action.ErrorAction.QueueMessage.QueueName = jobRequest.ErrorActionQueueName; + jobUpdateParams.Action.ErrorAction.QueueMessage.SasToken = jobRequest.ErrorActionSasToken; + jobUpdateParams.Action.ErrorAction.QueueMessage.StorageAccountName = jobRequest.ErrorActionStorageAccount; + } + } + else if (job.Action.ErrorAction == null) + { + jobUpdateParams.Action.ErrorAction.Request.Uri = jobRequest.ErrorActionUri; + jobUpdateParams.Action.ErrorAction.Request.Method = jobRequest.ErrorActionMethod; + jobUpdateParams.Action.ErrorAction.Request.Headers = jobRequest.ErrorActionHeaders.ToDictionary(); + jobUpdateParams.Action.ErrorAction.Request.Body = jobRequest.ErrorActionBody; + jobUpdateParams.Action.ErrorAction.QueueMessage.Message = jobRequest.ErrorActionQueueBody; + jobUpdateParams.Action.ErrorAction.QueueMessage.QueueName = jobRequest.ErrorActionQueueName; + jobUpdateParams.Action.ErrorAction.QueueMessage.SasToken = jobRequest.ErrorActionSasToken; + jobUpdateParams.Action.ErrorAction.QueueMessage.StorageAccountName = jobRequest.ErrorActionStorageAccount; + } + } + else + { + jobUpdateParams.Action.ErrorAction = job.Action.ErrorAction; + } + + if (jobRequest.IsRecurrenceSet()) + { + jobUpdateParams.Recurrence = new JobRecurrence(); + if (job.Recurrence != null) + { + jobUpdateParams.Recurrence.Count = jobRequest.ExecutionCount ?? job.Recurrence.Count; + jobUpdateParams.Recurrence.EndTime = jobRequest.EndTime ?? job.Recurrence.EndTime; + jobUpdateParams.Recurrence.Frequency = string.IsNullOrEmpty(jobRequest.Frequency) ? job.Recurrence.Frequency : (JobRecurrenceFrequency)Enum.Parse(typeof(JobRecurrenceFrequency), jobRequest.Frequency); + jobUpdateParams.Recurrence.Interval = jobRequest.Interval ?? job.Recurrence.Interval; + jobUpdateParams.Recurrence.Schedule = SetRecurrenceSchedule(job.Recurrence.Schedule); + } + else if (job.Recurrence == null) + { + jobUpdateParams.Recurrence.Count = jobRequest.ExecutionCount; + jobUpdateParams.Recurrence.EndTime = jobRequest.EndTime; + jobUpdateParams.Recurrence.Frequency = string.IsNullOrEmpty(jobRequest.Frequency) ? default(JobRecurrenceFrequency) : (JobRecurrenceFrequency)Enum.Parse(typeof(JobRecurrenceFrequency), jobRequest.Frequency); + jobUpdateParams.Recurrence.Interval = jobRequest.Interval; + jobUpdateParams.Recurrence.Schedule = null; + } + } + else + { + jobUpdateParams.Recurrence = job.Recurrence; + if (jobUpdateParams.Recurrence != null) + { + jobUpdateParams.Recurrence.Schedule = SetRecurrenceSchedule(job.Recurrence.Schedule); + } + } + + jobUpdateParams.Action.RetryPolicy = job.Action.RetryPolicy; + + jobUpdateParams.StartTime = jobRequest.StartTime ?? job.StartTime; + + return jobUpdateParams; + } + + private HttpAuthentication SetClientCertAuthentication(PSCreateJobParams jobRequest, JobCreateOrUpdateParameters jobUpdateParams) + { + if (jobRequest.ClientCertPfx != null && jobRequest.ClientCertPassword != null) + { + return new ClientCertAuthentication + { + Type = HttpAuthenticationType.ClientCertificate, + Password = jobRequest.ClientCertPassword, + Pfx = jobRequest.ClientCertPfx + }; + } + else + { + throw new InvalidOperationException(Resources.SchedulerInvalidClientCertAuthRequest); + } + } + + /// + /// Existing bug in SDK where recurrence counts are set to 0 instead of null + /// + /// The JobRecurrenceSchedule + /// The JobRecurrenceSchedule + private JobRecurrenceSchedule SetRecurrenceSchedule(JobRecurrenceSchedule jobRecurrenceSchedule) + { + if (jobRecurrenceSchedule != null) + { + JobRecurrenceSchedule schedule = new JobRecurrenceSchedule(); + schedule.Days = jobRecurrenceSchedule.Days.Count == 0 ? null : jobRecurrenceSchedule.Days; + schedule.Hours = jobRecurrenceSchedule.Hours.Count == 0 ? null : jobRecurrenceSchedule.Hours; + schedule.Minutes = jobRecurrenceSchedule.Minutes.Count == 0 ? null : jobRecurrenceSchedule.Minutes; + schedule.MonthDays = jobRecurrenceSchedule.MonthDays.Count == 0 ? null : jobRecurrenceSchedule.MonthDays; + schedule.MonthlyOccurrences = jobRecurrenceSchedule.MonthlyOccurrences.Count == 0 ? null : jobRecurrenceSchedule.MonthlyOccurrences; + schedule.Months = jobRecurrenceSchedule.Months.Count == 0 ? null : jobRecurrenceSchedule.Months; + return schedule; + } + else + { + return null; + } + } + + /// + /// Updates given Storage Queue Scheduler job + /// + /// Request values + /// Status of uodate operation + /// Updated Storage Queue Scheduler job + public PSJobDetail PatchStorageJob(PSCreateJobParams jobRequest, out string status) + { + if (!this.AvailableRegions.Contains(jobRequest.Region, StringComparer.OrdinalIgnoreCase)) + throw new Exception(Resources.SchedulerInvalidLocation); + + SchedulerClient schedulerClient = AzureSession.ClientFactory.CreateCustomClient(jobRequest.Region.ToCloudServiceName(), jobRequest.JobCollectionName, csmClient.Credentials, schedulerManagementClient.BaseUri); + + //Get Existing job + Job job = schedulerClient.Jobs.Get(jobRequest.JobName).Job; + + JobCreateOrUpdateParameters jobUpdateParams = PopulateExistingJobParams(job, jobRequest, job.Action.Type); + + JobCreateOrUpdateResponse jobUpdateResponse = schedulerClient.Jobs.CreateOrUpdate(jobRequest.JobName, jobUpdateParams); + + if (!string.IsNullOrEmpty(jobRequest.JobState)) + schedulerClient.Jobs.UpdateState(jobRequest.JobName, new JobUpdateStateParameters + { + State = jobRequest.JobState.Equals("Enabled", StringComparison.OrdinalIgnoreCase) ? JobState.Enabled + : JobState.Disabled + }); + + status = jobUpdateResponse.StatusCode.ToString().Equals("OK") ? "Job has been updated" : jobUpdateResponse.StatusCode.ToString(); + + return GetJobDetail(jobRequest.JobCollectionName, jobRequest.JobName, jobRequest.Region.ToCloudServiceName()); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Scheduler/SchedulerMgmntClient.cs b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/SchedulerMgmntClient.cs new file mode 100644 index 000000000000..5c17f4a926c5 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Scheduler/SchedulerMgmntClient.cs @@ -0,0 +1,548 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Model; +using Microsoft.WindowsAzure.Management.Scheduler; +using Microsoft.WindowsAzure.Management.Scheduler.Models; +using Microsoft.WindowsAzure.Scheduler; +using Microsoft.WindowsAzure.Scheduler.Models; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Scheduler +{ + public partial class SchedulerMgmntClient + { + private SchedulerManagementClient schedulerManagementClient; + private CloudServiceManagementClient csmClient; + private AzureSubscription currentSubscription; + + private const string SupportedRegionsKey = "SupportedGeoRegions"; + private const string FreeMaxJobCountKey = "PlanDetail:Free:Quota:MaxJobCount"; + private const string FreeMinRecurrenceKey = "PlanDetail:Free:Quota:MinRecurrence"; + private const string StandardMaxJobCountKey = "PlanDetail:Standard:Quota:MaxJobCount"; + private const string StandardMinRecurrenceKey = "PlanDetail:Standard:Quota:MinRecurrence"; + private const string PremiumMaxJobCountKey = "PlanDetail:Premium:Quota:MaxJobCount"; + private const string PremiumMinRecurrenceKey = "PlanDetail:Premium:Quota:MinRecurrence"; + + private int FreeMaxJobCountValue { get; set; } + private TimeSpan FreeMinRecurrenceValue { get; set; } + private int StandardMaxJobCountValue { get; set; } + private TimeSpan StandardMinRecurrenceValue { get; set; } + private int PremiumMaxJobCountValue { get; set; } + private TimeSpan PremiumMinRecurrenceValue { get; set; } + private List AvailableRegions { get; set; } + + /// + /// Creates new Scheduler Management Convenience Client + /// + /// Subscription containing websites to manipulate + public SchedulerMgmntClient(AzureSubscription subscription) + { + currentSubscription = subscription; + csmClient = AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement); + schedulerManagementClient = AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement); + + //Get RP properties + IDictionary dict = schedulerManagementClient.GetResourceProviderProperties().Properties; + + //Get available regions + string val = string.Empty; + if (dict.TryGetValue(SupportedRegionsKey, out val)) + { + AvailableRegions = new List(); + val.Split(',').ToList().ForEach(s => AvailableRegions.Add(s)); + } + + //Store global counts for max jobs and min recurrence for each plan + if (dict.TryGetValue(FreeMaxJobCountKey, out val)) + FreeMaxJobCountValue = Convert.ToInt32(dict[FreeMaxJobCountKey]); + + if (dict.TryGetValue(FreeMinRecurrenceKey, out val)) + FreeMinRecurrenceValue = TimeSpan.Parse(dict[FreeMinRecurrenceKey]); + + if (dict.TryGetValue(StandardMaxJobCountKey, out val)) + StandardMaxJobCountValue = Convert.ToInt32(dict[StandardMaxJobCountKey]); + + if (dict.TryGetValue(StandardMinRecurrenceKey, out val)) + StandardMinRecurrenceValue = TimeSpan.Parse(dict[StandardMinRecurrenceKey]); + + if (dict.TryGetValue(PremiumMaxJobCountKey, out val)) + PremiumMaxJobCountValue = Convert.ToInt32(dict[PremiumMaxJobCountKey]); + + if (dict.TryGetValue(PremiumMinRecurrenceKey, out val)) + PremiumMinRecurrenceValue = TimeSpan.Parse(dict[PremiumMinRecurrenceKey]); + } + + #region Get Available Regions + public List GetAvailableRegions() + { + return AvailableRegions; + } + #endregion + + #region Job Collections + public List GetJobCollection(string region = "", string jobCollection = "") + { + List lstSchedulerJobCollection = new List(); + CloudServiceListResponse csList = csmClient.CloudServices.List(); + + if (!string.IsNullOrEmpty(region)) + { + if (!this.AvailableRegions.Contains(region, StringComparer.OrdinalIgnoreCase)) + throw new Exception(Resources.SchedulerInvalidLocation); + + string cloudService = region.ToCloudServiceName(); + foreach (CloudServiceListResponse.CloudService cs in csList.CloudServices) + { + if (cs.Name.Equals(cloudService, StringComparison.OrdinalIgnoreCase)) + { + GetSchedulerJobCollection(cs, jobCollection).ForEach(x => lstSchedulerJobCollection.Add(x)); + //If job collection parameter was passed and we found a matching job collection already, exit out of the loop and return the job collection + if (!string.IsNullOrEmpty(jobCollection) && lstSchedulerJobCollection.Count > 0) + return lstSchedulerJobCollection; + } + } + } + else if (string.IsNullOrEmpty(region)) + { + foreach (CloudServiceListResponse.CloudService cs in csList.CloudServices) + { + if (cs.Name.Equals(Constants.CloudServiceNameFirst + cs.GeoRegion.Replace(" ", string.Empty) + Constants.CloudServiceNameSecond, StringComparison.OrdinalIgnoreCase)) + { + GetSchedulerJobCollection(cs, jobCollection).ForEach(x => lstSchedulerJobCollection.Add(x)); + //If job collection parameter was passed and we found a matching job collection already, exit out of the loop and return the job collection + if (!string.IsNullOrEmpty(jobCollection) && lstSchedulerJobCollection.Count > 0) + return lstSchedulerJobCollection; + } + } + } + return lstSchedulerJobCollection; + } + + private List GetSchedulerJobCollection(CloudServiceListResponse.CloudService cloudService, string jobCollection) + { + List lstSchedulerJobCollection = new List(); + + foreach (CloudServiceGetResponse.Resource csRes in csmClient.CloudServices.Get(cloudService.Name).Resources) + { + if (csRes.Type.Contains(Constants.JobCollectionResource)) + { + JobCollectionGetResponse jcGetResponse = schedulerManagementClient.JobCollections.Get(cloudService.Name, csRes.Name); + if (string.IsNullOrEmpty(jobCollection) || (!string.IsNullOrEmpty(jobCollection) && jcGetResponse.Name.Equals(jobCollection, StringComparison.OrdinalIgnoreCase))) + { + PSJobCollection jc = new PSJobCollection + { + CloudServiceName = cloudService.Name, + JobCollectionName = jcGetResponse.Name, + State = Enum.GetName(typeof(JobCollectionState), jcGetResponse.State), + Location = cloudService.GeoRegion, + Uri = csmClient.BaseUri.AbsoluteUri + csmClient.Credentials.SubscriptionId + "cloudservices/" + cloudService.Name + Constants.JobCollectionResourceURL + jcGetResponse.Name + }; + + if (jcGetResponse.IntrinsicSettings != null) + { + jc.Plan = Enum.GetName(typeof(JobCollectionPlan), jcGetResponse.IntrinsicSettings.Plan); + if (jcGetResponse.IntrinsicSettings.Quota != null) + { + jc.MaxJobCount = jcGetResponse.IntrinsicSettings.Quota.MaxJobCount == null ? string.Empty : jcGetResponse.IntrinsicSettings.Quota.MaxJobCount.ToString(); + jc.MaxRecurrence = jcGetResponse.IntrinsicSettings.Quota.MaxRecurrence == null ? string.Empty : jcGetResponse.IntrinsicSettings.Quota.MaxRecurrence.Interval.ToString() + " per " + + jcGetResponse.IntrinsicSettings.Quota.MaxRecurrence.Frequency.ToString(); + } + } + lstSchedulerJobCollection.Add(jc); + } + } + } + + return lstSchedulerJobCollection; + } + + #endregion + + #region Scheduler Jobs + + public List GetJob(string region, string jobCollection, string job = "", string state = "") + { + if (!this.AvailableRegions.Contains(region, StringComparer.OrdinalIgnoreCase)) + throw new Exception(Resources.SchedulerInvalidLocation); + + List lstJob = new List(); + + string cloudService = region.ToCloudServiceName(); + if (!string.IsNullOrEmpty(job)) + { + PSJobDetail jobDetail = GetJobDetail(jobCollection, job, cloudService); + if (string.IsNullOrEmpty(state) || (!string.IsNullOrEmpty(state) && jobDetail.Status.Equals(state, StringComparison.OrdinalIgnoreCase))) + { + lstJob.Add(jobDetail); + return lstJob; + } + } + else if (string.IsNullOrEmpty(job)) + { + GetSchedulerJobs(cloudService, jobCollection).ForEach(x => + { + if (string.IsNullOrEmpty(state) || (!string.IsNullOrEmpty(state) && x.Status.Equals(state, StringComparison.OrdinalIgnoreCase))) + { + lstJob.Add(x); + } + }); + } + return lstJob; + } + + private List GetSchedulerJobs(string cloudService, string jobCollection) + { + List lstJobs = new List(); + CloudServiceGetResponse csDetails = csmClient.CloudServices.Get(cloudService); + foreach (CloudServiceGetResponse.Resource csRes in csDetails.Resources) + { + if (csRes.ResourceProviderNamespace.Equals(Constants.SchedulerRPNameProvider, StringComparison.OrdinalIgnoreCase) && csRes.Name.Equals(jobCollection, StringComparison.OrdinalIgnoreCase)) + { + SchedulerClient schedClient = AzureSession.ClientFactory.CreateCustomClient(cloudService, jobCollection, csmClient.Credentials, schedulerManagementClient.BaseUri); + + JobListResponse jobs = schedClient.Jobs.List(new JobListParameters + { + Skip = 0, + }); + foreach (Job job in jobs) + { + lstJobs.Add(new PSSchedulerJob + { + JobName = job.Id, + Lastrun = job.Status == null ? null : job.Status.LastExecutionTime, + Nextrun = job.Status == null ? null : job.Status.NextExecutionTime, + Status = job.State.ToString(), + StartTime = job.StartTime, + Recurrence = job.Recurrence == null ? string.Empty : job.Recurrence.Interval.ToString() + " per " + job.Recurrence.Frequency.ToString(), + Failures = job.Status == null ? default(int?) : job.Status.FailureCount, + Faults = job.Status == null ? default(int?) : job.Status.FaultedCount, + Executions = job.Status == null ? default(int?) : job.Status.ExecutionCount, + EndSchedule = GetEndTime(job), + JobCollectionName = jobCollection + }); + } + } + } + return lstJobs; + } + + private string GetEndTime(Job job) + { + if (job.Recurrence == null) + return "Run once"; + else if (job.Recurrence != null) + { + if (job.Recurrence.Count == null) + return "None"; + if (job.Recurrence.Count != null) + return "Until " + job.Recurrence.Count + " executions"; + else + return job.Recurrence.Interval + " executions every " + job.Recurrence.Frequency.ToString(); + } + return null; + } + + #endregion + + #region Job History + public List GetJobHistory(string jobCollection, string job, string region, string jobStatus = "") + { + if (!this.AvailableRegions.Contains(region, StringComparer.OrdinalIgnoreCase)) + throw new Exception(Resources.SchedulerInvalidLocation); + + List lstPSJobHistory = new List(); + string cloudService = region.ToCloudServiceName(); + CloudServiceGetResponse csDetails = csmClient.CloudServices.Get(cloudService); + foreach (CloudServiceGetResponse.Resource csRes in csDetails.Resources) + { + if (csRes.ResourceProviderNamespace.Equals(Constants.SchedulerRPNameProvider, StringComparison.InvariantCultureIgnoreCase) && csRes.Name.Equals(jobCollection, StringComparison.OrdinalIgnoreCase)) + { + SchedulerClient schedClient = AzureSession.ClientFactory.CreateCustomClient(cloudService, jobCollection.Trim(), csmClient.Credentials, schedulerManagementClient.BaseUri); + + List lstHistory = new List(); + int currentTop = 100; + + if (string.IsNullOrEmpty(jobStatus)) + { + JobGetHistoryResponse history = schedClient.Jobs.GetHistory(job.Trim(), new JobGetHistoryParameters { Top = 100 }); + lstHistory.AddRange(history.JobHistory); + while (history.JobHistory.Count > 99) + { + history = schedClient.Jobs.GetHistory(job.Trim(), new JobGetHistoryParameters { Top = 100, Skip = currentTop }); + currentTop += 100; + lstHistory.AddRange(history.JobHistory); + } + } + else if (!string.IsNullOrEmpty(jobStatus)) + { + JobHistoryStatus status = jobStatus.Equals("Completed") ? JobHistoryStatus.Completed : JobHistoryStatus.Failed; + JobGetHistoryResponse history = schedClient.Jobs.GetHistoryWithFilter(job.Trim(), new JobGetHistoryWithFilterParameters { Top = 100, Status = status }); + lstHistory.AddRange(history.JobHistory); + while (history.JobHistory.Count > 99) + { + history = schedClient.Jobs.GetHistoryWithFilter(job.Trim(), new JobGetHistoryWithFilterParameters { Top = 100, Skip = currentTop }); + currentTop += 100; + lstHistory.AddRange(history.JobHistory); + } + } + foreach (JobGetHistoryResponse.JobHistoryEntry entry in lstHistory) + { + PSJobHistory historyObj = new PSJobHistory(); + historyObj.Status = entry.Status.ToString(); + historyObj.StartTime = entry.StartTime; + historyObj.EndTime = entry.EndTime; + historyObj.JobName = entry.Id; + historyObj.Details = GetHistoryDetails(entry.Message); + historyObj.Retry = entry.RetryCount; + historyObj.Occurence = entry.RepeatCount; + if (JobHistoryActionName.ErrorAction == entry.ActionName) + { + PSJobHistoryError errorObj = historyObj.ToJobHistoryError(); + errorObj.ErrorAction = JobHistoryActionName.ErrorAction.ToString(); + lstPSJobHistory.Add(errorObj); + } + else + lstPSJobHistory.Add(historyObj); + } + } + } + return lstPSJobHistory; + } + + private PSJobHistoryDetail GetHistoryDetails(string message) + { + PSJobHistoryDetail detail = new PSJobHistoryDetail(); + if (message.Contains("Http Action -")) + { + PSJobHistoryHttpDetail details = new PSJobHistoryHttpDetail { ActionType = "http" }; + if (message.Contains("Request to host") && message.Contains("failed:")) + { + int firstIndex = message.IndexOf("'"); + int secondIndex = message.IndexOf("'", firstIndex + 1); + details.HostName = message.Substring(firstIndex + 1, secondIndex - (firstIndex + 1)); + details.Response = "Failed"; + details.ResponseBody = message; + } + else + { + int firstIndex = message.IndexOf("'"); + int secondIndex = message.IndexOf("'", firstIndex + 1); + int thirdIndex = message.IndexOf("'", secondIndex + 1); + int fourthIndex = message.IndexOf("'", thirdIndex + 1); + details.HostName = message.Substring(firstIndex + 1, secondIndex - (firstIndex + 1)); + details.Response = message.Substring(thirdIndex + 1, fourthIndex - (thirdIndex + 1)); + int bodyIndex = message.IndexOf("Body: "); + details.ResponseBody = message.Substring(bodyIndex + 6); + } + return details; + + } + else if (message.Contains("StorageQueue Action -")) + { + PSJobHistoryStorageDetail details = new PSJobHistoryStorageDetail { ActionType = "Storage" }; + if (message.Contains("does not exist")) + { + int firstIndex = message.IndexOf("'"); + int secondIndex = message.IndexOf("'", firstIndex + 1); + details.StorageAccountName = string.Empty; + details.StorageQueueName = message.Substring(firstIndex + 1, secondIndex - (firstIndex + 1)); + details.ResponseBody = message; + details.ResponseStatus = "Failed"; + } + else + { + int firstIndex = message.IndexOf("'"); + int secondIndex = message.IndexOf("'", firstIndex + 1); + int thirdIndex = message.IndexOf("'", secondIndex + 1); + int fourthIndex = message.IndexOf("'", thirdIndex + 1); + details.StorageAccountName = message.Substring(firstIndex + 1, secondIndex - (firstIndex + 1)); + details.StorageQueueName = message.Substring(thirdIndex + 1, fourthIndex - (thirdIndex + 1)); + details.ResponseStatus = message.Substring(fourthIndex + 2); + details.ResponseBody = message; + } + return details; + } + return detail; + } + #endregion + + #region Get Job Details + public PSJobDetail GetJobDetail(string jobCollection, string job, string cloudService) + { + CloudServiceGetResponse csDetails = csmClient.CloudServices.Get(cloudService); + foreach (CloudServiceGetResponse.Resource csRes in csDetails.Resources) + { + if (csRes.ResourceProviderNamespace.Equals(Constants.SchedulerRPNameProvider, StringComparison.OrdinalIgnoreCase) && csRes.Name.Equals(jobCollection, StringComparison.OrdinalIgnoreCase)) + { + SchedulerClient schedClient = AzureSession.ClientFactory.CreateCustomClient(cloudService, jobCollection, csmClient.Credentials, schedulerManagementClient.BaseUri); + + JobListResponse jobs = schedClient.Jobs.List(new JobListParameters + { + Skip = 0, + }); + foreach (Job j in jobs) + { + if (j.Id.ToLower().Equals(job.ToLower())) + { + if (Enum.GetName(typeof(JobActionType), j.Action.Type).Contains("Http")) + { + PSHttpJobDetail jobDetail = new PSHttpJobDetail(); + jobDetail.JobName = j.Id; + jobDetail.JobCollectionName = jobCollection; + jobDetail.CloudService = cloudService; + jobDetail.ActionType = Enum.GetName(typeof(JobActionType), j.Action.Type); + jobDetail.Uri = j.Action.Request.Uri; + jobDetail.Method = j.Action.Request.Method; + jobDetail.Body = j.Action.Request.Body; + jobDetail.Headers = j.Action.Request.Headers; + jobDetail.Status = j.State.ToString(); + jobDetail.StartTime = j.StartTime; + jobDetail.EndSchedule = GetEndTime(j); + jobDetail.Recurrence = j.Recurrence == null ? string.Empty : j.Recurrence.Interval.ToString() + " (" + j.Recurrence.Frequency.ToString() + "s)"; + if (j.Status != null) + { + jobDetail.Failures = j.Status.FailureCount; + jobDetail.Faults = j.Status.FaultedCount; + jobDetail.Executions = j.Status.ExecutionCount; + jobDetail.Lastrun = j.Status.LastExecutionTime; + jobDetail.Nextrun = j.Status.NextExecutionTime; + } + if (j.Action.Request.Authentication != null && j.Action.Request.Authentication.Type == HttpAuthenticationType.ClientCertificate) + { + jobDetail.ClientCertThumbprint = ((j.Action.Request.Authentication) as ClientCertAuthentication).CertificateThumbprint; + jobDetail.ClientCertExpiryDate = ((j.Action.Request.Authentication) as ClientCertAuthentication).CertificateExpiration.ToString(); + jobDetail.ClientCertSubjectName = ((j.Action.Request.Authentication) as ClientCertAuthentication).CertificateSubjectName; + } + return jobDetail; + } + else + { + return new PSStorageQueueJobDetail + { + JobName = j.Id, + JobCollectionName = jobCollection, + CloudService = cloudService, + ActionType = Enum.GetName(typeof(JobActionType), j.Action.Type), + StorageAccountName = j.Action.QueueMessage.StorageAccountName, + StorageQueueName = j.Action.QueueMessage.QueueName, + SasToken = j.Action.QueueMessage.SasToken, + QueueMessage = j.Action.QueueMessage.Message, + Status = j.State.ToString(), + EndSchedule = GetEndTime(j), + StartTime = j.StartTime, + Recurrence = j.Recurrence == null ? string.Empty : j.Recurrence.Interval.ToString() + " (" + j.Recurrence.Frequency.ToString() + "s)", + Failures = j.Status == null ? default(int?) : j.Status.FailureCount, + Faults = j.Status == null ? default(int?) : j.Status.FaultedCount, + Executions = j.Status == null ? default(int?) : j.Status.ExecutionCount, + Lastrun = j.Status == null ? null : j.Status.LastExecutionTime, + Nextrun = j.Status == null ? null : j.Status.NextExecutionTime + }; + } + } + } + } + } + return null; + } + #endregion + + #region Delete Jobs + + public bool DeleteJob(string jobCollection, string jobName, string region = "") + { + if (!string.IsNullOrEmpty(region)) + { + if (!this.AvailableRegions.Contains(region, StringComparer.OrdinalIgnoreCase)) + throw new Exception(Resources.SchedulerInvalidLocation); + + SchedulerClient schedClient = AzureSession.ClientFactory.CreateCustomClient(region.ToCloudServiceName(), jobCollection, csmClient.Credentials, schedulerManagementClient.BaseUri); + + OperationResponse response = schedClient.Jobs.Delete(jobName); + return response.StatusCode == System.Net.HttpStatusCode.OK ? true : false; + } + else if (string.IsNullOrEmpty(region)) + { + CloudServiceListResponse csList = csmClient.CloudServices.List(); + foreach (CloudServiceListResponse.CloudService cs in csList.CloudServices) + { + foreach (CloudServiceGetResponse.Resource csRes in csmClient.CloudServices.Get(cs.Name).Resources) + { + if (csRes.Type.Contains(Constants.JobCollectionResource)) + { + JobCollectionGetResponse jcGetResponse = schedulerManagementClient.JobCollections.Get(cs.Name, csRes.Name); + if (jcGetResponse.Name.Equals(jobCollection, StringComparison.OrdinalIgnoreCase)) + { + foreach (PSSchedulerJob job in GetSchedulerJobs(cs.Name, jobCollection)) + { + if (job.JobName.Equals(jobName, StringComparison.OrdinalIgnoreCase)) + { + SchedulerClient schedClient = AzureSession.ClientFactory.CreateCustomClient(cs.Name, jobCollection, csmClient.Credentials, schedulerManagementClient.BaseUri); + + OperationResponse response = schedClient.Jobs.Delete(jobName); + return response.StatusCode == System.Net.HttpStatusCode.OK ? true : false; + } + } + } + } + } + } + } + return false; + } + #endregion + + #region Delete Job Collection + + public bool DeleteJobCollection(string jobCollection, string region = "") + { + if (!string.IsNullOrEmpty(region)) + { + if (!this.AvailableRegions.Contains(region, StringComparer.OrdinalIgnoreCase)) + throw new Exception(Resources.SchedulerInvalidLocation); + + SchedulerOperationStatusResponse response = schedulerManagementClient.JobCollections.Delete(region.ToCloudServiceName(), jobCollection); + return response.StatusCode == System.Net.HttpStatusCode.OK ? true : false; + } + else if (string.IsNullOrEmpty(region)) + { + CloudServiceListResponse csList = csmClient.CloudServices.List(); + foreach (CloudServiceListResponse.CloudService cs in csList.CloudServices) + { + foreach (CloudServiceGetResponse.Resource csRes in csmClient.CloudServices.Get(cs.Name).Resources) + { + if (csRes.Type.Contains(Constants.JobCollectionResource)) + { + JobCollectionGetResponse jcGetResponse = schedulerManagementClient.JobCollections.Get(cs.Name, csRes.Name); + if (jcGetResponse.Name.Equals(jobCollection, StringComparison.OrdinalIgnoreCase)) + { + SchedulerOperationStatusResponse response = schedulerManagementClient.JobCollections.Delete(region.ToCloudServiceName(), jobCollection); + return response.StatusCode == System.Net.HttpStatusCode.OK ? true : false; + } + } + } + } + } + return false; + } + + #endregion + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Service References/MarketplaceServiceReference/Reference.cs b/src/ServiceManagement/Services/Commands.Utilities/Service References/MarketplaceServiceReference/Reference.cs new file mode 100644 index 000000000000..16d04cd0a79d --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Service References/MarketplaceServiceReference/Reference.cs @@ -0,0 +1,2061 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.33440 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// Original file name: +// Generation date: 10/11/2013 9:19:45 AM +namespace Microsoft.WindowsAzure.Commands.Utilities.MarketplaceServiceReference +{ + + /// + /// There are no comments for CatalogServiceReadOnlyDbContext in the schema. + /// + public partial class CatalogServiceReadOnlyDbContext : global::System.Data.Services.Client.DataServiceContext + { + /// + /// Initialize a new CatalogServiceReadOnlyDbContext object. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public CatalogServiceReadOnlyDbContext(global::System.Uri serviceRoot) : + base(serviceRoot, global::System.Data.Services.Common.DataServiceProtocolVersion.V3) + { + this.ResolveName = new global::System.Func(this.ResolveNameFromType); + this.ResolveType = new global::System.Func(this.ResolveTypeFromName); + this.OnContextCreated(); + } + partial void OnContextCreated(); + /// + /// Since the namespace configured for this service reference + /// in Visual Studio is different from the one indicated in the + /// server schema, use type-mappers to map between the two. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected global::System.Type ResolveTypeFromName(string typeName) + { + if (typeName.StartsWith("Microsoft.DataMarket.CatalogService.Model", global::System.StringComparison.Ordinal)) + { + return this.GetType().Assembly.GetType(string.Concat("Microsoft.WindowsAzure.Commands.Utilities.MarketplaceServiceReference", typeName.Substring(41)), false); + } + return null; + } + /// + /// Since the namespace configured for this service reference + /// in Visual Studio is different from the one indicated in the + /// server schema, use type-mappers to map between the two. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected string ResolveNameFromType(global::System.Type clientType) + { + if (clientType.Namespace.Equals("Microsoft.WindowsAzure.Commands.Utilities.MarketplaceServiceReference", global::System.StringComparison.Ordinal)) + { + return string.Concat("Microsoft.DataMarket.CatalogService.Model.", clientType.Name); + } + return clientType.FullName; + } + /// + /// There are no comments for Offers in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceQuery Offers + { + get + { + if ((this._Offers == null)) + { + this._Offers = base.CreateQuery("Offers"); + } + return this._Offers; + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceQuery _Offers; + /// + /// There are no comments for OfferLinks in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceQuery OfferLinks + { + get + { + if ((this._OfferLinks == null)) + { + this._OfferLinks = base.CreateQuery("OfferLinks"); + } + return this._OfferLinks; + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceQuery _OfferLinks; + /// + /// There are no comments for VisualizationImages in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceQuery VisualizationImages + { + get + { + if ((this._VisualizationImages == null)) + { + this._VisualizationImages = base.CreateQuery("VisualizationImages"); + } + return this._VisualizationImages; + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceQuery _VisualizationImages; + /// + /// There are no comments for Categories in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceQuery Categories + { + get + { + if ((this._Categories == null)) + { + this._Categories = base.CreateQuery("Categories"); + } + return this._Categories; + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceQuery _Categories; + /// + /// There are no comments for Plans in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceQuery Plans + { + get + { + if ((this._Plans == null)) + { + this._Plans = base.CreateQuery("Plans"); + } + return this._Plans; + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceQuery _Plans; + /// + /// There are no comments for Markets in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceQuery Markets + { + get + { + if ((this._Markets == null)) + { + this._Markets = base.CreateQuery("Markets"); + } + return this._Markets; + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceQuery _Markets; + /// + /// There are no comments for MarketLanguages in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceQuery MarketLanguages + { + get + { + if ((this._MarketLanguages == null)) + { + this._MarketLanguages = base.CreateQuery("MarketLanguages"); + } + return this._MarketLanguages; + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceQuery _MarketLanguages; + /// + /// There are no comments for Offers in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public void AddToOffers(Offer offer) + { + base.AddObject("Offers", offer); + } + /// + /// There are no comments for OfferLinks in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public void AddToOfferLinks(OfferLink offerLink) + { + base.AddObject("OfferLinks", offerLink); + } + /// + /// There are no comments for VisualizationImages in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public void AddToVisualizationImages(VisualizationImage visualizationImage) + { + base.AddObject("VisualizationImages", visualizationImage); + } + /// + /// There are no comments for Categories in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public void AddToCategories(Category category) + { + base.AddObject("Categories", category); + } + /// + /// There are no comments for Plans in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public void AddToPlans(Plan plan) + { + base.AddObject("Plans", plan); + } + /// + /// There are no comments for Markets in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public void AddToMarkets(Market market) + { + base.AddObject("Markets", market); + } + /// + /// There are no comments for MarketLanguages in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public void AddToMarketLanguages(MarketLanguage marketLanguage) + { + base.AddObject("MarketLanguages", marketLanguage); + } + } + /// + /// There are no comments for Microsoft.DataMarket.CatalogService.Model.Offer in the schema. + /// + /// + /// Id + /// + [global::System.Data.Services.Common.EntitySetAttribute("Offers")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("Id")] + public partial class Offer : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new Offer object. + /// + /// Initial value of Id. + /// Initial value of Name. + /// Initial value of PublishDate. + /// Initial value of ProviderId. + /// Initial value of IsAvailableInAzureStores. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static Offer CreateOffer(global::System.Guid ID, string name, global::System.DateTime publishDate, global::System.Guid providerId, bool isAvailableInAzureStores) + { + Offer offer = new Offer(); + offer.Id = ID; + offer.Name = name; + offer.PublishDate = publishDate; + offer.ProviderId = providerId; + offer.IsAvailableInAzureStores = isAvailableInAzureStores; + return offer; + } + /// + /// There are no comments for Property Id in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid Id + { + get + { + return this._Id; + } + set + { + this.OnIdChanging(value); + this._Id = value; + this.OnIdChanged(); + this.OnPropertyChanged("Id"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _Id; + partial void OnIdChanging(global::System.Guid value); + partial void OnIdChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property ShortDescription in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ShortDescription + { + get + { + return this._ShortDescription; + } + set + { + this.OnShortDescriptionChanging(value); + this._ShortDescription = value; + this.OnShortDescriptionChanged(); + this.OnPropertyChanged("ShortDescription"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ShortDescription; + partial void OnShortDescriptionChanging(string value); + partial void OnShortDescriptionChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property PublishDate in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.DateTime PublishDate + { + get + { + return this._PublishDate; + } + set + { + this.OnPublishDateChanging(value); + this._PublishDate = value; + this.OnPublishDateChanged(); + this.OnPropertyChanged("PublishDate"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.DateTime _PublishDate; + partial void OnPublishDateChanging(global::System.DateTime value); + partial void OnPublishDateChanged(); + /// + /// There are no comments for Property IconUrl in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string IconUrl + { + get + { + return this._IconUrl; + } + set + { + this.OnIconUrlChanging(value); + this._IconUrl = value; + this.OnIconUrlChanged(); + this.OnPropertyChanged("IconUrl"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _IconUrl; + partial void OnIconUrlChanging(string value); + partial void OnIconUrlChanged(); + /// + /// There are no comments for Property MarketplaceDetailUrl in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string MarketplaceDetailUrl + { + get + { + return this._MarketplaceDetailUrl; + } + set + { + this.OnMarketplaceDetailUrlChanging(value); + this._MarketplaceDetailUrl = value; + this.OnMarketplaceDetailUrlChanged(); + this.OnPropertyChanged("MarketplaceDetailUrl"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _MarketplaceDetailUrl; + partial void OnMarketplaceDetailUrlChanging(string value); + partial void OnMarketplaceDetailUrlChanged(); + /// + /// There are no comments for Property OfferType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string OfferType + { + get + { + return this._OfferType; + } + set + { + this.OnOfferTypeChanging(value); + this._OfferType = value; + this.OnOfferTypeChanged(); + this.OnPropertyChanged("OfferType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _OfferType; + partial void OnOfferTypeChanging(string value); + partial void OnOfferTypeChanged(); + /// + /// There are no comments for Property ProviderName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ProviderName + { + get + { + return this._ProviderName; + } + set + { + this.OnProviderNameChanging(value); + this._ProviderName = value; + this.OnProviderNameChanged(); + this.OnPropertyChanged("ProviderName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ProviderName; + partial void OnProviderNameChanging(string value); + partial void OnProviderNameChanged(); + /// + /// There are no comments for Property ProviderDescription in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ProviderDescription + { + get + { + return this._ProviderDescription; + } + set + { + this.OnProviderDescriptionChanging(value); + this._ProviderDescription = value; + this.OnProviderDescriptionChanged(); + this.OnPropertyChanged("ProviderDescription"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ProviderDescription; + partial void OnProviderDescriptionChanging(string value); + partial void OnProviderDescriptionChanged(); + /// + /// There are no comments for Property ProviderId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ProviderId + { + get + { + return this._ProviderId; + } + set + { + this.OnProviderIdChanging(value); + this._ProviderId = value; + this.OnProviderIdChanged(); + this.OnPropertyChanged("ProviderId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ProviderId; + partial void OnProviderIdChanging(global::System.Guid value); + partial void OnProviderIdChanged(); + /// + /// There are no comments for Property Country in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Country + { + get + { + return this._Country; + } + set + { + this.OnCountryChanging(value); + this._Country = value; + this.OnCountryChanged(); + this.OnPropertyChanged("Country"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Country; + partial void OnCountryChanging(string value); + partial void OnCountryChanged(); + /// + /// There are no comments for Property WebsiteUrl in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string WebsiteUrl + { + get + { + return this._WebsiteUrl; + } + set + { + this.OnWebsiteUrlChanging(value); + this._WebsiteUrl = value; + this.OnWebsiteUrlChanged(); + this.OnPropertyChanged("WebsiteUrl"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _WebsiteUrl; + partial void OnWebsiteUrlChanging(string value); + partial void OnWebsiteUrlChanged(); + /// + /// There are no comments for Property EulaUrl in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string EulaUrl + { + get + { + return this._EulaUrl; + } + set + { + this.OnEulaUrlChanging(value); + this._EulaUrl = value; + this.OnEulaUrlChanged(); + this.OnPropertyChanged("EulaUrl"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _EulaUrl; + partial void OnEulaUrlChanging(string value); + partial void OnEulaUrlChanged(); + /// + /// There are no comments for Property PrivacyPolicyUrl in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string PrivacyPolicyUrl + { + get + { + return this._PrivacyPolicyUrl; + } + set + { + this.OnPrivacyPolicyUrlChanging(value); + this._PrivacyPolicyUrl = value; + this.OnPrivacyPolicyUrlChanged(); + this.OnPropertyChanged("PrivacyPolicyUrl"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _PrivacyPolicyUrl; + partial void OnPrivacyPolicyUrlChanging(string value); + partial void OnPrivacyPolicyUrlChanged(); + /// + /// There are no comments for Property ProviderIdentifier in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ProviderIdentifier + { + get + { + return this._ProviderIdentifier; + } + set + { + this.OnProviderIdentifierChanging(value); + this._ProviderIdentifier = value; + this.OnProviderIdentifierChanged(); + this.OnPropertyChanged("ProviderIdentifier"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ProviderIdentifier; + partial void OnProviderIdentifierChanging(string value); + partial void OnProviderIdentifierChanged(); + /// + /// There are no comments for Property OfferIdentifier in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string OfferIdentifier + { + get + { + return this._OfferIdentifier; + } + set + { + this.OnOfferIdentifierChanging(value); + this._OfferIdentifier = value; + this.OnOfferIdentifierChanged(); + this.OnPropertyChanged("OfferIdentifier"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _OfferIdentifier; + partial void OnOfferIdentifierChanging(string value); + partial void OnOfferIdentifierChanged(); + /// + /// There are no comments for Property IsAvailableInAzureStores in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public bool IsAvailableInAzureStores + { + get + { + return this._IsAvailableInAzureStores; + } + set + { + this.OnIsAvailableInAzureStoresChanging(value); + this._IsAvailableInAzureStores = value; + this.OnIsAvailableInAzureStoresChanged(); + this.OnPropertyChanged("IsAvailableInAzureStores"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _IsAvailableInAzureStores; + partial void OnIsAvailableInAzureStoresChanging(bool value); + partial void OnIsAvailableInAzureStoresChanged(); + /// + /// There are no comments for Links in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection Links + { + get + { + return this._Links; + } + set + { + this._Links = value; + this.OnPropertyChanged("Links"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _Links = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + /// + /// There are no comments for VisualizationImages in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection VisualizationImages + { + get + { + return this._VisualizationImages; + } + set + { + this._VisualizationImages = value; + this.OnPropertyChanged("VisualizationImages"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _VisualizationImages = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + /// + /// There are no comments for Categories in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection Categories + { + get + { + return this._Categories; + } + set + { + this._Categories = value; + this.OnPropertyChanged("Categories"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _Categories = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + /// + /// There are no comments for Plans in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection Plans + { + get + { + return this._Plans; + } + set + { + this._Plans = value; + this.OnPropertyChanged("Plans"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _Plans = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + /// + /// There are no comments for Markets in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection Markets + { + get + { + return this._Markets; + } + set + { + this._Markets = value; + this.OnPropertyChanged("Markets"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _Markets = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for Microsoft.DataMarket.CatalogService.Model.CommercialAppOffer in the schema. + /// + /// + /// Id + /// + [global::System.Data.Services.Common.DataServiceKeyAttribute("Id")] + public partial class CommercialAppOffer : Offer + { + /// + /// Create a new CommercialAppOffer object. + /// + /// Initial value of Id. + /// Initial value of Name. + /// Initial value of PublishDate. + /// Initial value of ProviderId. + /// Initial value of IsAvailableInAzureStores. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static CommercialAppOffer CreateCommercialAppOffer(global::System.Guid ID, string name, global::System.DateTime publishDate, global::System.Guid providerId, bool isAvailableInAzureStores) + { + CommercialAppOffer commercialAppOffer = new CommercialAppOffer(); + commercialAppOffer.Id = ID; + commercialAppOffer.Name = name; + commercialAppOffer.PublishDate = publishDate; + commercialAppOffer.ProviderId = providerId; + commercialAppOffer.IsAvailableInAzureStores = isAvailableInAzureStores; + return commercialAppOffer; + } + } + /// + /// There are no comments for Microsoft.DataMarket.CatalogService.Model.AzureDevServiceOffer in the schema. + /// + /// + /// Id + /// + [global::System.Data.Services.Common.DataServiceKeyAttribute("Id")] + public partial class AzureDevServiceOffer : Offer + { + /// + /// Create a new AzureDevServiceOffer object. + /// + /// Initial value of Id. + /// Initial value of Name. + /// Initial value of PublishDate. + /// Initial value of ProviderId. + /// Initial value of IsAvailableInAzureStores. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static AzureDevServiceOffer CreateAzureDevServiceOffer(global::System.Guid ID, string name, global::System.DateTime publishDate, global::System.Guid providerId, bool isAvailableInAzureStores) + { + AzureDevServiceOffer azureDevServiceOffer = new AzureDevServiceOffer(); + azureDevServiceOffer.Id = ID; + azureDevServiceOffer.Name = name; + azureDevServiceOffer.PublishDate = publishDate; + azureDevServiceOffer.ProviderId = providerId; + azureDevServiceOffer.IsAvailableInAzureStores = isAvailableInAzureStores; + return azureDevServiceOffer; + } + } + /// + /// There are no comments for Microsoft.DataMarket.CatalogService.Model.AzureVMOffer in the schema. + /// + /// + /// Id + /// + [global::System.Data.Services.Common.DataServiceKeyAttribute("Id")] + public partial class AzureVMOffer : Offer + { + /// + /// Create a new AzureVMOffer object. + /// + /// Initial value of Id. + /// Initial value of Name. + /// Initial value of PublishDate. + /// Initial value of ProviderId. + /// Initial value of IsAvailableInAzureStores. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static AzureVMOffer CreateAzureVMOffer(global::System.Guid ID, string name, global::System.DateTime publishDate, global::System.Guid providerId, bool isAvailableInAzureStores) + { + AzureVMOffer azureVMOffer = new AzureVMOffer(); + azureVMOffer.Id = ID; + azureVMOffer.Name = name; + azureVMOffer.PublishDate = publishDate; + azureVMOffer.ProviderId = providerId; + azureVMOffer.IsAvailableInAzureStores = isAvailableInAzureStores; + return azureVMOffer; + } + } + /// + /// There are no comments for Microsoft.DataMarket.CatalogService.Model.ListingOnlyAppOffer in the schema. + /// + /// + /// Id + /// + [global::System.Data.Services.Common.DataServiceKeyAttribute("Id")] + public partial class ListingOnlyAppOffer : Offer + { + /// + /// Create a new ListingOnlyAppOffer object. + /// + /// Initial value of Id. + /// Initial value of Name. + /// Initial value of PublishDate. + /// Initial value of ProviderId. + /// Initial value of IsAvailableInAzureStores. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static ListingOnlyAppOffer CreateListingOnlyAppOffer(global::System.Guid ID, string name, global::System.DateTime publishDate, global::System.Guid providerId, bool isAvailableInAzureStores) + { + ListingOnlyAppOffer listingOnlyAppOffer = new ListingOnlyAppOffer(); + listingOnlyAppOffer.Id = ID; + listingOnlyAppOffer.Name = name; + listingOnlyAppOffer.PublishDate = publishDate; + listingOnlyAppOffer.ProviderId = providerId; + listingOnlyAppOffer.IsAvailableInAzureStores = isAvailableInAzureStores; + return listingOnlyAppOffer; + } + } + /// + /// There are no comments for Microsoft.DataMarket.CatalogService.Model.DataOffer in the schema. + /// + /// + /// Id + /// + [global::System.Data.Services.Common.DataServiceKeyAttribute("Id")] + public partial class DataOffer : Offer + { + /// + /// Create a new DataOffer object. + /// + /// Initial value of Id. + /// Initial value of Name. + /// Initial value of PublishDate. + /// Initial value of ProviderId. + /// Initial value of IsAvailableInAzureStores. + /// Initial value of IsAnonymousAccessAllowed. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static DataOffer CreateDataOffer(global::System.Guid ID, string name, global::System.DateTime publishDate, global::System.Guid providerId, bool isAvailableInAzureStores, bool isAnonymousAccessAllowed) + { + DataOffer dataOffer = new DataOffer(); + dataOffer.Id = ID; + dataOffer.Name = name; + dataOffer.PublishDate = publishDate; + dataOffer.ProviderId = providerId; + dataOffer.IsAvailableInAzureStores = isAvailableInAzureStores; + dataOffer.IsAnonymousAccessAllowed = isAnonymousAccessAllowed; + return dataOffer; + } + /// + /// There are no comments for Property ServiceEntryPointUrl in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ServiceEntryPointUrl + { + get + { + return this._ServiceEntryPointUrl; + } + set + { + this.OnServiceEntryPointUrlChanging(value); + this._ServiceEntryPointUrl = value; + this.OnServiceEntryPointUrlChanged(); + this.OnPropertyChanged("ServiceEntryPointUrl"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ServiceEntryPointUrl; + partial void OnServiceEntryPointUrlChanging(string value); + partial void OnServiceEntryPointUrlChanged(); + /// + /// There are no comments for Property IsAnonymousAccessAllowed in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public bool IsAnonymousAccessAllowed + { + get + { + return this._IsAnonymousAccessAllowed; + } + set + { + this.OnIsAnonymousAccessAllowedChanging(value); + this._IsAnonymousAccessAllowed = value; + this.OnIsAnonymousAccessAllowedChanged(); + this.OnPropertyChanged("IsAnonymousAccessAllowed"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _IsAnonymousAccessAllowed; + partial void OnIsAnonymousAccessAllowedChanging(bool value); + partial void OnIsAnonymousAccessAllowedChanged(); + } + /// + /// There are no comments for Microsoft.DataMarket.CatalogService.Model.OfferLink in the schema. + /// + /// + /// Id + /// + [global::System.Data.Services.Common.EntitySetAttribute("OfferLinks")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("Id")] + public partial class OfferLink : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new OfferLink object. + /// + /// Initial value of Id. + /// Initial value of Title. + /// Initial value of Url. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static OfferLink CreateOfferLink(global::System.Guid ID, string title, string url) + { + OfferLink offerLink = new OfferLink(); + offerLink.Id = ID; + offerLink.Title = title; + offerLink.Url = url; + return offerLink; + } + /// + /// There are no comments for Property Id in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid Id + { + get + { + return this._Id; + } + set + { + this.OnIdChanging(value); + this._Id = value; + this.OnIdChanged(); + this.OnPropertyChanged("Id"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _Id; + partial void OnIdChanging(global::System.Guid value); + partial void OnIdChanged(); + /// + /// There are no comments for Property Title in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Title + { + get + { + return this._Title; + } + set + { + this.OnTitleChanging(value); + this._Title = value; + this.OnTitleChanged(); + this.OnPropertyChanged("Title"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Title; + partial void OnTitleChanging(string value); + partial void OnTitleChanged(); + /// + /// There are no comments for Property Url in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Url + { + get + { + return this._Url; + } + set + { + this.OnUrlChanging(value); + this._Url = value; + this.OnUrlChanged(); + this.OnPropertyChanged("Url"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Url; + partial void OnUrlChanging(string value); + partial void OnUrlChanged(); + /// + /// There are no comments for Property LinkType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string LinkType + { + get + { + return this._LinkType; + } + set + { + this.OnLinkTypeChanging(value); + this._LinkType = value; + this.OnLinkTypeChanged(); + this.OnPropertyChanged("LinkType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _LinkType; + partial void OnLinkTypeChanging(string value); + partial void OnLinkTypeChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Offer in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public Offer Offer + { + get + { + return this._Offer; + } + set + { + this._Offer = value; + this.OnPropertyChanged("Offer"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private Offer _Offer; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for Microsoft.DataMarket.CatalogService.Model.VisualizationImage in the schema. + /// + /// + /// Id + /// + [global::System.Data.Services.Common.EntitySetAttribute("VisualizationImages")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("Id")] + public partial class VisualizationImage : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new VisualizationImage object. + /// + /// Initial value of Id. + /// Initial value of Width. + /// Initial value of Height. + /// Initial value of Type. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static VisualizationImage CreateVisualizationImage(global::System.Guid ID, short width, short height, int type) + { + VisualizationImage visualizationImage = new VisualizationImage(); + visualizationImage.Id = ID; + visualizationImage.Width = width; + visualizationImage.Height = height; + visualizationImage.Type = type; + return visualizationImage; + } + /// + /// There are no comments for Property Id in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid Id + { + get + { + return this._Id; + } + set + { + this.OnIdChanging(value); + this._Id = value; + this.OnIdChanged(); + this.OnPropertyChanged("Id"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _Id; + partial void OnIdChanging(global::System.Guid value); + partial void OnIdChanged(); + /// + /// There are no comments for Property Title in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Title + { + get + { + return this._Title; + } + set + { + this.OnTitleChanging(value); + this._Title = value; + this.OnTitleChanged(); + this.OnPropertyChanged("Title"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Title; + partial void OnTitleChanging(string value); + partial void OnTitleChanged(); + /// + /// There are no comments for Property Url in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Url + { + get + { + return this._Url; + } + set + { + this.OnUrlChanging(value); + this._Url = value; + this.OnUrlChanged(); + this.OnPropertyChanged("Url"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Url; + partial void OnUrlChanging(string value); + partial void OnUrlChanged(); + /// + /// There are no comments for Property Width in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public short Width + { + get + { + return this._Width; + } + set + { + this.OnWidthChanging(value); + this._Width = value; + this.OnWidthChanged(); + this.OnPropertyChanged("Width"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private short _Width; + partial void OnWidthChanging(short value); + partial void OnWidthChanged(); + /// + /// There are no comments for Property Height in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public short Height + { + get + { + return this._Height; + } + set + { + this.OnHeightChanging(value); + this._Height = value; + this.OnHeightChanged(); + this.OnPropertyChanged("Height"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private short _Height; + partial void OnHeightChanging(short value); + partial void OnHeightChanged(); + /// + /// There are no comments for Property Type in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public int Type + { + get + { + return this._Type; + } + set + { + this.OnTypeChanging(value); + this._Type = value; + this.OnTypeChanged(); + this.OnPropertyChanged("Type"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private int _Type; + partial void OnTypeChanging(int value); + partial void OnTypeChanged(); + /// + /// There are no comments for Offer in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public Offer Offer + { + get + { + return this._Offer; + } + set + { + this._Offer = value; + this.OnPropertyChanged("Offer"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private Offer _Offer; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for Microsoft.DataMarket.CatalogService.Model.Category in the schema. + /// + /// + /// Id + /// + [global::System.Data.Services.Common.EntitySetAttribute("Categories")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("Id")] + public partial class Category : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new Category object. + /// + /// Initial value of Id. + /// Initial value of Name. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static Category CreateCategory(global::System.Guid ID, string name) + { + Category category = new Category(); + category.Id = ID; + category.Name = name; + return category; + } + /// + /// There are no comments for Property Id in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid Id + { + get + { + return this._Id; + } + set + { + this.OnIdChanging(value); + this._Id = value; + this.OnIdChanged(); + this.OnPropertyChanged("Id"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _Id; + partial void OnIdChanging(global::System.Guid value); + partial void OnIdChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property ReferenceName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ReferenceName + { + get + { + return this._ReferenceName; + } + set + { + this.OnReferenceNameChanging(value); + this._ReferenceName = value; + this.OnReferenceNameChanged(); + this.OnPropertyChanged("ReferenceName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ReferenceName; + partial void OnReferenceNameChanging(string value); + partial void OnReferenceNameChanged(); + /// + /// There are no comments for ParentCategory in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public Category ParentCategory + { + get + { + return this._ParentCategory; + } + set + { + this._ParentCategory = value; + this.OnPropertyChanged("ParentCategory"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private Category _ParentCategory; + /// + /// There are no comments for Subcategories in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection Subcategories + { + get + { + return this._Subcategories; + } + set + { + this._Subcategories = value; + this.OnPropertyChanged("Subcategories"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _Subcategories = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + /// + /// There are no comments for Offers in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection Offers + { + get + { + return this._Offers; + } + set + { + this._Offers = value; + this.OnPropertyChanged("Offers"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _Offers = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for Microsoft.DataMarket.CatalogService.Model.Plan in the schema. + /// + /// + /// Id + /// + [global::System.Data.Services.Common.EntitySetAttribute("Plans")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("Id")] + public partial class Plan : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new Plan object. + /// + /// Initial value of Id. + /// Initial value of TransactionLimit. + /// Initial value of Price. + /// Initial value of IsPromoCodeRequired. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static Plan CreatePlan(global::System.Guid ID, long transactionLimit, decimal price, bool isPromoCodeRequired) + { + Plan plan = new Plan(); + plan.Id = ID; + plan.TransactionLimit = transactionLimit; + plan.Price = price; + plan.IsPromoCodeRequired = isPromoCodeRequired; + return plan; + } + /// + /// There are no comments for Property Id in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid Id + { + get + { + return this._Id; + } + set + { + this.OnIdChanging(value); + this._Id = value; + this.OnIdChanged(); + this.OnPropertyChanged("Id"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _Id; + partial void OnIdChanging(global::System.Guid value); + partial void OnIdChanged(); + /// + /// There are no comments for Property PlanName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string PlanName + { + get + { + return this._PlanName; + } + set + { + this.OnPlanNameChanging(value); + this._PlanName = value; + this.OnPlanNameChanged(); + this.OnPropertyChanged("PlanName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _PlanName; + partial void OnPlanNameChanging(string value); + partial void OnPlanNameChanged(); + /// + /// There are no comments for Property PlanType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string PlanType + { + get + { + return this._PlanType; + } + set + { + this.OnPlanTypeChanging(value); + this._PlanType = value; + this.OnPlanTypeChanged(); + this.OnPropertyChanged("PlanType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _PlanType; + partial void OnPlanTypeChanging(string value); + partial void OnPlanTypeChanged(); + /// + /// There are no comments for Property TransactionLimit in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public long TransactionLimit + { + get + { + return this._TransactionLimit; + } + set + { + this.OnTransactionLimitChanging(value); + this._TransactionLimit = value; + this.OnTransactionLimitChanged(); + this.OnPropertyChanged("TransactionLimit"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private long _TransactionLimit; + partial void OnTransactionLimitChanging(long value); + partial void OnTransactionLimitChanged(); + /// + /// There are no comments for Property TransactionUnit in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string TransactionUnit + { + get + { + return this._TransactionUnit; + } + set + { + this.OnTransactionUnitChanging(value); + this._TransactionUnit = value; + this.OnTransactionUnitChanged(); + this.OnPropertyChanged("TransactionUnit"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _TransactionUnit; + partial void OnTransactionUnitChanging(string value); + partial void OnTransactionUnitChanged(); + /// + /// There are no comments for Property Price in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public decimal Price + { + get + { + return this._Price; + } + set + { + this.OnPriceChanging(value); + this._Price = value; + this.OnPriceChanged(); + this.OnPropertyChanged("Price"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private decimal _Price; + partial void OnPriceChanging(decimal value); + partial void OnPriceChanged(); + /// + /// There are no comments for Property MarketName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string MarketName + { + get + { + return this._MarketName; + } + set + { + this.OnMarketNameChanging(value); + this._MarketName = value; + this.OnMarketNameChanged(); + this.OnPropertyChanged("MarketName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _MarketName; + partial void OnMarketNameChanging(string value); + partial void OnMarketNameChanged(); + /// + /// There are no comments for Property CountryCode in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string CountryCode + { + get + { + return this._CountryCode; + } + set + { + this.OnCountryCodeChanging(value); + this._CountryCode = value; + this.OnCountryCodeChanged(); + this.OnPropertyChanged("CountryCode"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _CountryCode; + partial void OnCountryCodeChanging(string value); + partial void OnCountryCodeChanged(); + /// + /// There are no comments for Property CurrencyCode in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string CurrencyCode + { + get + { + return this._CurrencyCode; + } + set + { + this.OnCurrencyCodeChanging(value); + this._CurrencyCode = value; + this.OnCurrencyCodeChanged(); + this.OnPropertyChanged("CurrencyCode"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _CurrencyCode; + partial void OnCurrencyCodeChanging(string value); + partial void OnCurrencyCodeChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property PlanIdentifier in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string PlanIdentifier + { + get + { + return this._PlanIdentifier; + } + set + { + this.OnPlanIdentifierChanging(value); + this._PlanIdentifier = value; + this.OnPlanIdentifierChanged(); + this.OnPropertyChanged("PlanIdentifier"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _PlanIdentifier; + partial void OnPlanIdentifierChanging(string value); + partial void OnPlanIdentifierChanged(); + /// + /// There are no comments for Property TrialDurationCycles in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable TrialDurationCycles + { + get + { + return this._TrialDurationCycles; + } + set + { + this.OnTrialDurationCyclesChanging(value); + this._TrialDurationCycles = value; + this.OnTrialDurationCyclesChanged(); + this.OnPropertyChanged("TrialDurationCycles"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _TrialDurationCycles; + partial void OnTrialDurationCyclesChanging(global::System.Nullable value); + partial void OnTrialDurationCyclesChanged(); + /// + /// There are no comments for Property IsPromoCodeRequired in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public bool IsPromoCodeRequired + { + get + { + return this._IsPromoCodeRequired; + } + set + { + this.OnIsPromoCodeRequiredChanging(value); + this._IsPromoCodeRequired = value; + this.OnIsPromoCodeRequiredChanged(); + this.OnPropertyChanged("IsPromoCodeRequired"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _IsPromoCodeRequired; + partial void OnIsPromoCodeRequiredChanging(bool value); + partial void OnIsPromoCodeRequiredChanged(); + /// + /// There are no comments for Offer in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public Offer Offer + { + get + { + return this._Offer; + } + set + { + this._Offer = value; + this.OnPropertyChanged("Offer"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private Offer _Offer; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for Microsoft.DataMarket.CatalogService.Model.Market in the schema. + /// + /// + /// Id + /// + [global::System.Data.Services.Common.EntitySetAttribute("Markets")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("Id")] + public partial class Market : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new Market object. + /// + /// Initial value of Id. + /// Initial value of MarketName. + /// Initial value of CountryCode. + /// Initial value of CurrencyCode. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static Market CreateMarket(global::System.Guid ID, string marketName, string countryCode, string currencyCode) + { + Market market = new Market(); + market.Id = ID; + market.MarketName = marketName; + market.CountryCode = countryCode; + market.CurrencyCode = currencyCode; + return market; + } + /// + /// There are no comments for Property Id in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid Id + { + get + { + return this._Id; + } + set + { + this.OnIdChanging(value); + this._Id = value; + this.OnIdChanged(); + this.OnPropertyChanged("Id"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _Id; + partial void OnIdChanging(global::System.Guid value); + partial void OnIdChanged(); + /// + /// There are no comments for Property MarketName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string MarketName + { + get + { + return this._MarketName; + } + set + { + this.OnMarketNameChanging(value); + this._MarketName = value; + this.OnMarketNameChanged(); + this.OnPropertyChanged("MarketName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _MarketName; + partial void OnMarketNameChanging(string value); + partial void OnMarketNameChanged(); + /// + /// There are no comments for Property CountryCode in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string CountryCode + { + get + { + return this._CountryCode; + } + set + { + this.OnCountryCodeChanging(value); + this._CountryCode = value; + this.OnCountryCodeChanged(); + this.OnPropertyChanged("CountryCode"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _CountryCode; + partial void OnCountryCodeChanging(string value); + partial void OnCountryCodeChanged(); + /// + /// There are no comments for Property CurrencyCode in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string CurrencyCode + { + get + { + return this._CurrencyCode; + } + set + { + this.OnCurrencyCodeChanging(value); + this._CurrencyCode = value; + this.OnCurrencyCodeChanged(); + this.OnPropertyChanged("CurrencyCode"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _CurrencyCode; + partial void OnCurrencyCodeChanging(string value); + partial void OnCurrencyCodeChanged(); + /// + /// There are no comments for Languages in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection Languages + { + get + { + return this._Languages; + } + set + { + this._Languages = value; + this.OnPropertyChanged("Languages"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _Languages = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + /// + /// There are no comments for Offers in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection Offers + { + get + { + return this._Offers; + } + set + { + this._Offers = value; + this.OnPropertyChanged("Offers"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _Offers = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for Microsoft.DataMarket.CatalogService.Model.MarketLanguage in the schema. + /// + /// + /// MarketId + /// CultureCode + /// + [global::System.Data.Services.Common.EntitySetAttribute("MarketLanguages")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("MarketId", "CultureCode")] + public partial class MarketLanguage : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new MarketLanguage object. + /// + /// Initial value of MarketId. + /// Initial value of CultureCode. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static MarketLanguage CreateMarketLanguage(global::System.Guid marketId, string cultureCode) + { + MarketLanguage marketLanguage = new MarketLanguage(); + marketLanguage.MarketId = marketId; + marketLanguage.CultureCode = cultureCode; + return marketLanguage; + } + /// + /// There are no comments for Property MarketId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid MarketId + { + get + { + return this._MarketId; + } + set + { + this.OnMarketIdChanging(value); + this._MarketId = value; + this.OnMarketIdChanged(); + this.OnPropertyChanged("MarketId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _MarketId; + partial void OnMarketIdChanging(global::System.Guid value); + partial void OnMarketIdChanged(); + /// + /// There are no comments for Property CultureCode in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string CultureCode + { + get + { + return this._CultureCode; + } + set + { + this.OnCultureCodeChanging(value); + this._CultureCode = value; + this.OnCultureCodeChanged(); + this.OnPropertyChanged("CultureCode"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _CultureCode; + partial void OnCultureCodeChanging(string value); + partial void OnCultureCodeChanged(); + /// + /// There are no comments for Market in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public Market Market + { + get + { + return this._Market; + } + set + { + this._Market = value; + this.OnPropertyChanged("Market"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private Market _Market; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Service References/MarketplaceServiceReference/Reference.datasvcmap b/src/ServiceManagement/Services/Commands.Utilities/Service References/MarketplaceServiceReference/Reference.datasvcmap new file mode 100644 index 000000000000..ddd84e612abb --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Service References/MarketplaceServiceReference/Reference.datasvcmap @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Service References/MarketplaceServiceReference/service.edmx b/src/ServiceManagement/Services/Commands.Utilities/Service References/MarketplaceServiceReference/service.edmx new file mode 100644 index 000000000000..c3cfc6ec0560 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Service References/MarketplaceServiceReference/service.edmx @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/ServiceBus/AuthorizationRuleFilterOption.cs b/src/ServiceManagement/Services/Commands.Utilities/ServiceBus/AuthorizationRuleFilterOption.cs new file mode 100644 index 000000000000..a93af0f7272d --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/ServiceBus/AuthorizationRuleFilterOption.cs @@ -0,0 +1,65 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Microsoft.ServiceBus.Messaging; + +namespace Microsoft.WindowsAzure.Commands.Utilities.ServiceBus +{ + public class AuthorizationRuleFilterOption + { + #region Filtering Level + + /// + /// Must be specified. This option restricts the search on namespace level. + /// + public string Namespace { get; set; } + + /// + /// Must specified along with EntityType. This option restricts the search on this entity level. + /// + public string EntityName { get; set; } + + /// + /// Must specified along with EntityName. This option restricts the search on this entity level. + /// + public ServiceBusEntityType EntityType { get; set; } + + #endregion + + #region Filtering options + + /// + /// If specified gets the rule that matches this name. + /// + public string Name { get; set; } + + /// + /// If specified the filter will get all authorization rules with the provided permission + /// + public List Permission { get; set; } + + /// + /// If specified the filter will get all authorization rules for the specified entity types. + /// + public List EntityTypes { get; set; } + + /// + /// If specified the filter will get all authorization rules for the specified authorization types. + /// + public List AuthorizationType { get; set; } + + #endregion + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/ServiceBus/ExtendedAuthorizationRule.cs b/src/ServiceManagement/Services/Commands.Utilities/ServiceBus/ExtendedAuthorizationRule.cs new file mode 100644 index 000000000000..d747aac9d257 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/ServiceBus/ExtendedAuthorizationRule.cs @@ -0,0 +1,36 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Microsoft.ServiceBus.Messaging; + +namespace Microsoft.WindowsAzure.Commands.Utilities.ServiceBus +{ + public class ExtendedAuthorizationRule + { + public AuthorizationRule Rule { get; set; } + + public string Name { get; set; } + + public string ConnectionString { get; set; } + + public string Namespace { get; set; } + + public string EntityName { get; set; } + + public ServiceBusEntityType EntityType { get; set; } + + public List Permission { get; set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/ServiceBus/ExtendedServiceBusNamespace.cs b/src/ServiceManagement/Services/Commands.Utilities/ServiceBus/ExtendedServiceBusNamespace.cs new file mode 100644 index 000000000000..06e6377eaf1d --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/ServiceBus/ExtendedServiceBusNamespace.cs @@ -0,0 +1,118 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.RegularExpressions; +using Microsoft.WindowsAzure.Management.ServiceBus.Models; + +namespace Microsoft.WindowsAzure.Commands.Utilities.ServiceBus +{ + public class ExtendedServiceBusNamespace + { + public ExtendedServiceBusNamespace() + { + + } + + public ExtendedServiceBusNamespace( + ServiceBusNamespace serviceBusNamespace, + IList descriptions) + { + Name = serviceBusNamespace.Name; + + Region = serviceBusNamespace.Region; + + Status = serviceBusNamespace.Status; + + CreatedAt = serviceBusNamespace.CreatedAt; + + NamespaceType = serviceBusNamespace.NamespaceType; + + AcsManagementEndpoint = serviceBusNamespace.AcsManagementEndpoint != null ? serviceBusNamespace.AcsManagementEndpoint.ToString() : string.Empty; + + ServiceBusEndpoint = serviceBusNamespace.ServiceBusEndpoint != null ? serviceBusNamespace.ServiceBusEndpoint.ToString() : string.Empty; + + if (descriptions != null && descriptions.Count != 0) + { + NamespaceDescription desc = descriptions.FirstOrDefault(); + DefaultKey = this.GetKeyFromConnectionString(desc.ConnectionString); + ConnectionString = desc.ConnectionString; + } + else + { + DefaultKey = string.Empty; + ConnectionString = string.Empty; + } + + } + + public string Name { get; set; } + + public string Region { get; set; } + + public string DefaultKey { get; set; } + + public string Status { get; set; } + + public DateTime CreatedAt { get; set; } + + public string AcsManagementEndpoint { get; set; } + + public string ServiceBusEndpoint { get; set; } + + public string ConnectionString { get; set; } + + public NamespaceType NamespaceType { get; set; } + + public override bool Equals(object obj) + { + ExtendedServiceBusNamespace lhs = obj as ExtendedServiceBusNamespace; + + if (string.IsNullOrEmpty(Name)) + { + return false; + } + + return this.Name.Equals(lhs.Name) && this.Region.Equals(lhs.Region) && this.NamespaceType.Equals(lhs.NamespaceType); + } + + public override int GetHashCode() + { + if (string.IsNullOrEmpty(Name)) + { + return base.GetHashCode(); + } + else + { + return this.Name.GetHashCode() ^ this.Region.GetHashCode(); + } + } + + private string GetKeyFromConnectionString(string connectionString) + { + string regexPattern = "^Endpoint=sb://.*;SharedSecretIssuer=owner;SharedSecretValue=(.+)$"; + Match match = Regex.Match(connectionString, regexPattern); + if (match.Success) + { + return match.Groups[1].Value; + } + else + { + return string.Empty; + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/ServiceBus/ServiceBusClientExtensions.cs b/src/ServiceManagement/Services/Commands.Utilities/ServiceBus/ServiceBusClientExtensions.cs new file mode 100644 index 000000000000..dd353879c61f --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/ServiceBus/ServiceBusClientExtensions.cs @@ -0,0 +1,950 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text.RegularExpressions; +using System.Threading; +using Microsoft.ServiceBus; +using Microsoft.ServiceBus.Messaging; +using Microsoft.ServiceBus.Notifications; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Management.ServiceBus; +using Microsoft.WindowsAzure.Management.ServiceBus.Models; + +namespace Microsoft.WindowsAzure.Commands.Utilities.ServiceBus +{ + using ServiceBusNamespaceDescription = Management.ServiceBus.Models.NamespaceDescription; + + public class ServiceBusClientExtensions + { + private string subscriptionId; + + public AzureSubscription Subscription { get; set; } + + public ServiceBusManagementClient ServiceBusClient { get; internal set; } + + public const string NamespaceACSConnectionStringKeyName = "ACSOwnerKey"; + + public const string NamespaceSASConnectionStringKeyName = "RootManageSharedAccessKey"; + + public const int SleepDuration = 5000; + + private ServiceBusNamespace TryGetNamespace(string name) + { + try + { + return ServiceBusClient.Namespaces.Get(name).Namespace; + } + catch (CloudException) + { + // The namespace does not exist. + return null; + } + } + + private ExtendedServiceBusNamespace GetExtendedServiceBusNamespace(string name) + { + ServiceBusNamespace sbNamespace = TryGetNamespace(name); + + if (sbNamespace != null && + sbNamespace.Status.Equals("Active", StringComparison.OrdinalIgnoreCase)) + { + IList descriptions = ServiceBusClient.Namespaces + .GetNamespaceDescription(name) + .NamespaceDescriptions; + + return new ExtendedServiceBusNamespace(sbNamespace, descriptions); + } + + return null; + } + + private NamespaceManager CreateNamespaceManager(string namespaceName) + { + return NamespaceManager.CreateFromConnectionString(GetConnectionString( + namespaceName, + NamespaceACSConnectionStringKeyName)); + } + + private ExtendedAuthorizationRule CreateExtendedAuthorizationRule( + AuthorizationRule rule, + string namespaceName) + { + string connectionString = string.Empty; + + if (IsActiveNamespace(namespaceName)) + { + connectionString = GetConnectionString(namespaceName, rule.KeyName); + } + + return new ExtendedAuthorizationRule() + { + Rule = rule, + Name = rule.KeyName, + Namespace = namespaceName, + Permission = rule.Rights.ToList(), + ConnectionString = connectionString + }; + } + + private bool IsActiveNamespace(string name) + { + return ServiceBusClient.Namespaces.Get(name).Namespace.Status + .Equals("Active", StringComparison.OrdinalIgnoreCase); + } + + private ExtendedAuthorizationRule CreateExtendedAuthorizationRule( + AuthorizationRule rule, + string namespaceName, + string entityName, + ServiceBusEntityType entityType) + { + return new ExtendedAuthorizationRule() + { + Rule = rule, + Name = rule.KeyName, + Permission = rule.Rights.ToList(), + ConnectionString = GetConnectionString(namespaceName, entityName, entityType, rule.KeyName), + Namespace = namespaceName, + EntityName = entityName, + EntityType = entityType + }; + } + + private List FilterAuthorizationRules(AuthorizationRuleFilterOption options) + { + List rules = GetAuthorizationRulesToFilter(options); + List result = new List(); + + if (!string.IsNullOrEmpty(options.Name)) + { + result.Add(rules.FirstOrDefault(r => r.Name.Equals(options.Name,StringComparison.OrdinalIgnoreCase))); + } + else + { + List permissionMatch = new List(); + List ruleTypeMatch = new List(); + + if (options.Permission != null && options.Permission.Count > 0) + { + permissionMatch + .AddRange( + rules.FindAll(r => r.Permission.OrderBy(a => a).SequenceEqual(options.Permission.OrderBy(a => a)))); + } + + if (options.AuthorizationType != null && options.AuthorizationType.Count > 0) + { + ruleTypeMatch.AddRange( + rules.FindAll(r => r.Rule.ClaimType.Any(t => options.AuthorizationType.Any(m => m.Equals(t))))); + } + + result = permissionMatch.Count > 0 ? permissionMatch : rules; + result = ruleTypeMatch.Count> 0 ? result.Union(ruleTypeMatch).ToList() : result; + } + + return result == null ? new List() : result; + } + + private List GetAuthorizationRulesToFilter(AuthorizationRuleFilterOption options) + { + if (!string.IsNullOrEmpty(options.EntityName)) + { + return GetAuthorizationRuleCore( + options.Namespace, + options.EntityName, + options.EntityType, + r => true); + } + else if (options.EntityTypes != null && options.EntityTypes.Count > 0) + { + NamespaceManager namespaceManager = CreateNamespaceManager(options.Namespace); + List rules = new List(); + options.EntityTypes = options.EntityTypes.Distinct().ToList(); + + foreach (ServiceBusEntityType type in options.EntityTypes) + { + switch (type) + { + case ServiceBusEntityType.Queue: + rules.AddRange(namespaceManager.GetQueues() + .SelectMany(e => e.Authorization + .Select(r => CreateExtendedAuthorizationRule( + r, + options.Namespace, + e.Path, + ServiceBusEntityType.Queue)))); + break; + + case ServiceBusEntityType.Topic: + rules.AddRange(namespaceManager.GetTopics() + .SelectMany(e => e.Authorization + .Select(r => CreateExtendedAuthorizationRule( + r, + options.Namespace, + e.Path, + ServiceBusEntityType.Topic)))); + break; + + case ServiceBusEntityType.Relay: + rules.AddRange(namespaceManager.GetRelaysAsync().Result + .SelectMany(e => e.Authorization + .Select(r => CreateExtendedAuthorizationRule( + r, + options.Namespace, + e.Path, + ServiceBusEntityType.Relay)))); + break; + + case ServiceBusEntityType.NotificationHub: + rules.AddRange(namespaceManager.GetNotificationHubs() + .SelectMany(e => e.Authorization + .Select(r => CreateExtendedAuthorizationRule( + r, + options.Namespace, + e.Path, + ServiceBusEntityType.NotificationHub)))); + break; + + default: throw new InvalidOperationException(); + } + } + + return rules; + } + else + { + return ServiceBusClient.Namespaces.ListAuthorizationRules(options.Namespace) + .AuthorizationRules + .Select(ar => ar.ToSharedAccessAuthorizationRule()) + .Select(r => CreateExtendedAuthorizationRule(r, options.Namespace)) + .ToList(); + } + } + + private List GetAuthorizationRuleCore( + string namespaceName, + string entityName, + ServiceBusEntityType entityType, + Predicate match) + { + NamespaceManager namespaceManager = CreateNamespaceManager(namespaceName); + List rules = null; + + switch (entityType) + { + case ServiceBusEntityType.Queue: + rules = namespaceManager.GetQueue(entityName).Authorization.GetRules(match); + break; + + case ServiceBusEntityType.Topic: + rules = namespaceManager.GetTopic(entityName).Authorization.GetRules(match); + break; + + case ServiceBusEntityType.Relay: + rules = namespaceManager.GetRelayAsync(entityName).Result.Authorization.GetRules(match); + break; + + case ServiceBusEntityType.NotificationHub: + rules = namespaceManager.GetNotificationHub(entityName).Authorization.GetRules(match); + break; + + default: + throw new InvalidOperationException(); + } + + return rules.Select(r => CreateExtendedAuthorizationRule( + r, + namespaceName, + entityName, + entityType)).ToList(); + } + + /// + /// Parameterless constructs for mocking framework. + /// + public ServiceBusClientExtensions() + { + + } + + /// + /// Creates new instance from ServiceBusClientExtensions + /// + /// + public ServiceBusClientExtensions(AzureSubscription subscription) + { + subscriptionId = subscription.Id.ToString(); + Subscription = subscription; + ServiceBusClient = AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement); + } + + /// + /// Gets the connection string with the given name. + /// + /// The namespace name + /// The connection string key name + /// The connection string value + public virtual string GetConnectionString(string namespaceName, string keyName) + { + List connectionStrings = GetConnectionString(namespaceName); + ServiceBusConnectionDetail connectionString = connectionStrings.Find(c => c.KeyName.Equals( + keyName, + StringComparison.OrdinalIgnoreCase)); + + return connectionString.ConnectionString; + } + + /// + /// Gets the connection string with the given name for the entity. + /// + /// The namespace name + /// + /// The connection string key name + /// + /// The connection string value + public virtual string GetConnectionString( + string namespaceName, + string entityName, + ServiceBusEntityType entityType, + string keyName) + { + List connectionStrings = GetConnectionString(namespaceName, entityName, entityType); + ServiceBusConnectionDetail connectionString = connectionStrings.Find(c => c.KeyName.Equals( + keyName, + StringComparison.OrdinalIgnoreCase)); + + return connectionString.ConnectionString; + } + + /// + /// Gets available connection strings for the specified entity. + /// + /// The namespace name + /// The entity name + /// The entity type + /// List of all available connection strings + public virtual List GetConnectionString( + string namespaceName, + string entityName, + ServiceBusEntityType entityType) + { + switch (entityType) + { + case ServiceBusEntityType.Queue: + return ServiceBusClient.Queues.GetConnectionDetails(namespaceName, entityName).ConnectionDetails + .ToList(); + + case ServiceBusEntityType.Topic: + return ServiceBusClient.Topics.GetConnectionDetails(namespaceName, entityName).ConnectionDetails + .ToList(); + + case ServiceBusEntityType.Relay: + return ServiceBusClient.Relays.GetConnectionDetails(namespaceName, entityName).ConnectionDetails + .ToList(); + + case ServiceBusEntityType.NotificationHub: + return ServiceBusClient.NotificationHubs.GetConnectionDetails(namespaceName, entityName) + .ConnectionDetails + .ToList(); + + default: + throw new Exception(string.Format(Resources.ServiceBusEntityTypeNotFound, entityType.ToString())); + } + + } + + /// + /// Gets all the available connection strings for given namespace. + /// + /// The namespace name + /// List of connection strings + public virtual List GetConnectionString(string namespaceName) + { + return ServiceBusClient.Namespaces.GetNamespaceDescription(namespaceName).NamespaceDescriptions + .Select(d => d.ToServiceBusConnectionDetail()) + .ToList(); + + } + + /// + /// Creates shared access signature authorization for the service bus namespace. This authorization works on + /// public Microsoft Azure environments and Windows Azure Pack on prim as well. + /// + /// The service bus namespace name + /// The SAS authorization rule name + /// The SAS primary key. It'll be generated if empty + /// The SAS secondary key + /// Set of permissions given to the rule + /// The created Shared Access Signature authorization rule + public virtual ExtendedAuthorizationRule CreateSharedAccessAuthorization( + string namespaceName, + string ruleName, + string primaryKey, + string secondaryKey, + params AccessRights[] permissions) + { + SharedAccessAuthorizationRule rule = new SharedAccessAuthorizationRule( + ruleName, + string.IsNullOrEmpty(primaryKey) ? SharedAccessAuthorizationRule.GenerateRandomKey() : primaryKey, + secondaryKey, + permissions); + + rule = ServiceBusClient.Namespaces.CreateAuthorizationRule( + namespaceName, + rule.ToServiceBusSharedAccessAuthorizationRule()) + .AuthorizationRule.ToSharedAccessAuthorizationRule(); + + return CreateExtendedAuthorizationRule(rule, namespaceName); + } + + /// + /// Creates shared access signature authorization for the service bus entity. This authorization works on + /// public Microsoft Azure environments and Windows Azure Pack on prim as well. + /// + /// The service bus namespace name + /// The fully qualified service bus entity name + /// The service bus entity type (e.g. Queue) + /// The SAS authorization rule name + /// The SAS primary key. It'll be generated if empty + /// The SAS secondary key + /// Set of permissions given to the rule + /// The created Shared Access Signature authorization rule + public virtual ExtendedAuthorizationRule CreateSharedAccessAuthorization( + string namespaceName, + string entityName, + ServiceBusEntityType entityType, + string ruleName, + string primaryKey, + string secondaryKey, + params AccessRights[] permissions) + { + // Create the SAS authorization rule + SharedAccessAuthorizationRule rule = new SharedAccessAuthorizationRule( + ruleName, + string.IsNullOrEmpty(primaryKey) ? SharedAccessAuthorizationRule.GenerateRandomKey() : primaryKey, + secondaryKey, + permissions); + + // Create namespace manager + NamespaceManager namespaceManager = CreateNamespaceManager(namespaceName); + + // Add the SAS rule and update the entity + switch (entityType) + { + case ServiceBusEntityType.Queue: + QueueDescription queue = namespaceManager.GetQueue(entityName); + queue.Authorization.Add(rule); + namespaceManager.UpdateQueue(queue); + break; + + case ServiceBusEntityType.Topic: + TopicDescription topic = namespaceManager.GetTopic(entityName); + topic.Authorization.Add(rule); + namespaceManager.UpdateTopic(topic); + break; + + case ServiceBusEntityType.Relay: + RelayDescription relay = namespaceManager.GetRelayAsync(entityName).Result; + relay.Authorization.Add(rule); + namespaceManager.UpdateRelayAsync(relay).Wait(); + break; + + case ServiceBusEntityType.NotificationHub: + NotificationHubDescription notificationHub = namespaceManager.GetNotificationHub(entityName); + notificationHub.Authorization.Add(rule); + namespaceManager.UpdateNotificationHub(notificationHub); + break; + + default: + throw new Exception(string.Format(Resources.ServiceBusEntityTypeNotFound, entityType.ToString())); + } + + return CreateExtendedAuthorizationRule(rule, namespaceName, entityName, entityType); + } + + /// + /// Creates new service bus queue in the given name. + /// + /// The namespace name + /// The queue name + /// The queue description object + public virtual QueueDescription CreateQueue(string namespaceName, string name) + { + return CreateNamespaceManager(namespaceName).CreateQueue(name); + } + + /// + /// Creates new service bus topic in the given name. + /// + /// The namespace name + /// The topic name + /// The topic description object + public virtual TopicDescription CreateTopic(string namespaceName, string name) + { + return CreateNamespaceManager(namespaceName).CreateTopic(name); + } + + /// + /// Creates new service bus relay in the given name. + /// + /// The namespace name + /// The relay name + /// The relay type + /// The relay description object + public virtual RelayDescription CreateRelay(string namespaceName, string name, RelayType type) + { + return CreateNamespaceManager(namespaceName).CreateRelayAsync(name, type).Result; + } + + /// + /// Creates new service bus notification hub in the given name. + /// + /// The namespace name + /// The notification hub name + /// The notification hub description object + public virtual NotificationHubDescription CreateNotificationHub(string namespaceName, string name) + { + NotificationHubDescription description = new NotificationHubDescription(name); + return CreateNamespaceManager(namespaceName).CreateNotificationHub(description); + } + + /// + /// Updates shared access signature authorization for the service bus namespace. This authorization works on + /// public Microsoft Azure environments and Windows Azure Pack on prim as well. + /// + /// The service bus namespace name + /// The SAS authorization rule name + /// The SAS primary key. It'll be generated if empty + /// The SAS secondary key + /// Set of permissions given to the rule + /// The created Shared Access Signature authorization rule + public virtual ExtendedAuthorizationRule UpdateSharedAccessAuthorization( + string namespaceName, + string ruleName, + string primaryKey, + string secondaryKey, + params AccessRights[] permissions) + { + ExtendedAuthorizationRule oldRule = GetAuthorizationRule(namespaceName, ruleName); + if (null == oldRule) + { + throw new ArgumentException(Resources.ServiceBusAuthorizationRuleNotFound); + } + + SharedAccessAuthorizationRule rule = (SharedAccessAuthorizationRule)oldRule.Rule; + + // Update the rule + rule.Rights = permissions ?? rule.Rights; + rule.PrimaryKey = string.IsNullOrEmpty(primaryKey) ? rule.PrimaryKey : primaryKey; + rule.SecondaryKey = string.IsNullOrEmpty(secondaryKey) ? rule.SecondaryKey : secondaryKey; + + // In case that there's nothing to update then assume user asks for primary key renewal + if (permissions == null && string.IsNullOrEmpty(secondaryKey) && string.IsNullOrEmpty(primaryKey)) + { + rule.PrimaryKey = SharedAccessAuthorizationRule.GenerateRandomKey(); + } + + rule = ServiceBusClient.Namespaces.UpdateAuthorizationRule( + namespaceName, + rule.ToServiceBusSharedAccessAuthorizationRule()) + .AuthorizationRule.ToSharedAccessAuthorizationRule(); + + return CreateExtendedAuthorizationRule(rule, namespaceName); + } + + /// + /// Updates shared access signature authorization for the service bus entity. This authorization works on + /// public Microsoft Azure environments and Windows Azure Pack on prim as well. + /// + /// The service bus namespace name + /// The fully qualified service bus entity name + /// The service bus entity type (e.g. Queue) + /// The SAS authorization rule name + /// The SAS primary key. It'll be generated if empty + /// The SAS secondary key + /// Set of permissions given to the rule + /// The created Shared Access Signature authorization rule + public virtual ExtendedAuthorizationRule UpdateSharedAccessAuthorization( + string namespaceName, + string entityName, + ServiceBusEntityType entityType, + string ruleName, + string primaryKey, + string secondaryKey, + params AccessRights[] permissions) + { + bool removed = false; + ExtendedAuthorizationRule rule = GetAuthorizationRule( namespaceName, entityName, entityType, ruleName); + if (null == rule) + { + throw new ArgumentException(Resources.ServiceBusAuthorizationRuleNotFound); + } + + SharedAccessAuthorizationRule oldRule = (SharedAccessAuthorizationRule)rule.Rule; + + SharedAccessAuthorizationRule newRule = new SharedAccessAuthorizationRule( + ruleName, + string.IsNullOrEmpty(primaryKey) ? SharedAccessAuthorizationRule.GenerateRandomKey() : primaryKey, + secondaryKey, + permissions ?? oldRule.Rights); + + // Create namespace manager + NamespaceManager namespaceManager = CreateNamespaceManager(namespaceName); + + // Add the SAS rule and update the entity + switch (entityType) + { + case ServiceBusEntityType.Queue: + QueueDescription queue = namespaceManager.GetQueue(entityName); + removed = queue.Authorization.Remove(oldRule); + Debug.Assert(removed); + queue.Authorization.Add(newRule); + namespaceManager.UpdateQueue(queue); + break; + + case ServiceBusEntityType.Topic: + TopicDescription topic = namespaceManager.GetTopic(entityName); + removed = topic.Authorization.Remove(oldRule); + Debug.Assert(removed); + topic.Authorization.Add(newRule); + namespaceManager.UpdateTopic(topic); + break; + + case ServiceBusEntityType.Relay: + RelayDescription relay = namespaceManager.GetRelayAsync(entityName).Result; + removed = relay.Authorization.Remove(oldRule); + Debug.Assert(removed); + relay.Authorization.Add(newRule); + namespaceManager.UpdateRelayAsync(relay).Wait(); + break; + + case ServiceBusEntityType.NotificationHub: + NotificationHubDescription notificationHub = namespaceManager.GetNotificationHub(entityName); + removed = notificationHub.Authorization.Remove(oldRule); + Debug.Assert(removed); + notificationHub.Authorization.Add(newRule); + namespaceManager.UpdateNotificationHub(notificationHub); + break; + + default: + throw new Exception(string.Format(Resources.ServiceBusEntityTypeNotFound, entityType.ToString())); + } + + return CreateExtendedAuthorizationRule(newRule, namespaceName, entityName, entityType); + } + + /// + /// Removes set of authorization rules that matches filter options. + /// + /// The filter options + public virtual void RemoveAuthorizationRule(AuthorizationRuleFilterOption options) + { + List rules = GetAuthorizationRule(options); + + foreach (ExtendedAuthorizationRule rule in rules) + { + if (null == rule) + { + throw new ArgumentException(Resources.ServiceBusAuthorizationRuleNotFound); + } + else if (!string.IsNullOrEmpty(rule.EntityName)) + { + RemoveAuthorizationRule(rule.Namespace, rule.EntityName, rule.EntityType, rule.Name); + } + else + { + RemoveAuthorizationRule(rule.Namespace, rule.Name); + } + } + } + + /// + /// Removes shared access signature authorization for the service bus namespace. + /// + /// The service bus namespace name + /// The SAS authorization rule name + public virtual void RemoveAuthorizationRule(string namespaceName, string ruleName) + { + ServiceBusClient.Namespaces.DeleteAuthorizationRule(namespaceName, ruleName); + } + + /// + /// Removed shared access signature authorization for the service bus entity. + /// + /// The service bus namespace name + /// The fully qualified service bus entity name + /// The service bus entity type (e.g. Queue) + /// The SAS authorization rule name + public virtual void RemoveAuthorizationRule( + string namespaceName, + string entityName, + ServiceBusEntityType entityType, + string ruleName) + { + bool removed = false; + SharedAccessAuthorizationRule rule = (SharedAccessAuthorizationRule)GetAuthorizationRule( + namespaceName, + entityName, + entityType, + ruleName).Rule; + + // Create namespace manager + NamespaceManager namespaceManager = CreateNamespaceManager(namespaceName); + + // Add the SAS rule and update the entity + switch (entityType) + { + case ServiceBusEntityType.Queue: + QueueDescription queue = namespaceManager.GetQueue(entityName); + removed = queue.Authorization.Remove(rule); + Debug.Assert(removed); + namespaceManager.UpdateQueue(queue); + break; + + case ServiceBusEntityType.Topic: + TopicDescription topic = namespaceManager.GetTopic(entityName); + removed = topic.Authorization.Remove(rule); + Debug.Assert(removed); + namespaceManager.UpdateTopic(topic); + break; + + case ServiceBusEntityType.Relay: + RelayDescription relay = namespaceManager.GetRelayAsync(entityName).Result; + removed = relay.Authorization.Remove(rule); + Debug.Assert(removed); + namespaceManager.UpdateRelayAsync(relay).Wait(); + break; + + case ServiceBusEntityType.NotificationHub: + NotificationHubDescription notificationHub = namespaceManager.GetNotificationHub(entityName); + removed = notificationHub.Authorization.Remove(rule); + Debug.Assert(removed); + namespaceManager.UpdateNotificationHub(notificationHub); + break; + + default: + throw new Exception(string.Format(Resources.ServiceBusEntityTypeNotFound, entityType.ToString())); + } + } + + /// + /// Gets authorization rules based on the passed filter options. + /// + /// The filter options + /// The filtered authorization rules + public List GetAuthorizationRule(AuthorizationRuleFilterOption filterOptions) + { + return FilterAuthorizationRules(filterOptions); + } + + /// + /// Gets the authorization rule with the specified name in the namespace level. + /// + /// The namespace name + /// The rule name + /// The authorization rule that matches the specified name + public virtual ExtendedAuthorizationRule GetAuthorizationRule( + string namespaceName, + string ruleName) + { + AuthorizationRuleFilterOption options = new AuthorizationRuleFilterOption() + { + Namespace = namespaceName, + Name = ruleName + }; + + return FilterAuthorizationRules(options).FirstOrDefault(); + } + + /// + /// Gets the authorization rule with the specified name in the entity level. + /// + /// The namespace name + /// The entity name + /// The entity type + /// The rule name + /// The authorization rule that matches the specified name + public virtual ExtendedAuthorizationRule GetAuthorizationRule( + string namespaceName, + string entityName, + ServiceBusEntityType entityType, + string ruleName) + { + AuthorizationRuleFilterOption options = new AuthorizationRuleFilterOption() + { + Namespace = namespaceName, + Name = ruleName, + EntityName = entityName, + EntityType = entityType + }; + + return FilterAuthorizationRules(options).FirstOrDefault(); + } + + public virtual List GetServiceBusRegions() + { + return ServiceBusClient.GetServiceBusRegions().Regions.ToList(); + } + + public virtual ExtendedServiceBusNamespace GetNamespace(string name) + { + if (!Regex.IsMatch(name, ServiceBusConstants.NamespaceNamePattern)) + { + throw new ArgumentException(string.Format(Resources.InvalidNamespaceName, name), "Name"); + } + + return GetExtendedServiceBusNamespace(name); + } + + public virtual List GetNamespace() + { + return ServiceBusClient.Namespaces.List().Namespaces. + Select(s => GetExtendedServiceBusNamespace(s.Name)) + .Where(s => s != null) + .ToList(); + } + + public virtual bool IsAvailableNamespace(string name) + { + return ServiceBusClient.Namespaces.CheckAvailability(name).IsAvailable; + } + + public virtual string GetDefaultLocation() + { + return ServiceBusClient.GetServiceBusRegions().Regions.First().Code; + } + + public virtual bool NamespaceExists(string name) + { + return GetNamespace().Exists(ns => ns.Name.Equals(name, StringComparison.OrdinalIgnoreCase)); + } + + public virtual ExtendedServiceBusNamespace CreateNamespace(string name, string location, NamespaceType type, bool createACSNamespace = true) + { + location = string.IsNullOrEmpty(location) ? GetDefaultLocation() : location; + + if (!Regex.IsMatch(name, ServiceBusConstants.NamespaceNamePattern)) + { + throw new ArgumentException(string.Format(Resources.InvalidNamespaceName, name), "Name"); + } + + ServiceBusClient.Namespaces.CreateNamespace(name, new ServiceBusNamespaceCreateParameters { Region = location, CreateACSNamespace = createACSNamespace, NamespaceType = type}); + + // Wait until the namespace is activated + while (!IsActiveNamespace(name)) + { + Thread.Sleep(SleepDuration); + } + + return GetExtendedServiceBusNamespace(name); + } + + public virtual bool RemoveNamespace(string name) + { + ServiceBusClient.Namespaces.Delete(name); + + return true; + } + } + + public enum ServiceBusEntityType + { + Queue, + Topic, + Relay, + NotificationHub + } + + public enum AuthorizationType + { + SharedAccessAuthorization, + WindowsAuthorization + } + + static public class ServiceBusClientExtensionMethods + { + static public ServiceBusSharedAccessAuthorizationRule ToServiceBusSharedAccessAuthorizationRule( + this SharedAccessAuthorizationRule rule) + { + List rights = new List(); + + if (rule.Rights.Contains(AccessRights.Listen)) + { + rights.Add(AccessRight.Listen); + } + + if (rule.Rights.Contains(AccessRights.Manage)) + { + rights.Add(AccessRight.Manage); + } + + if (rule.Rights.Contains(AccessRights.Send)) + { + rights.Add(AccessRight.Send); + } + + return new ServiceBusSharedAccessAuthorizationRule() + { + ClaimType = rule.ClaimType, + ClaimValue = rule.ClaimValue, + CreatedTime = rule.CreatedTime, + KeyName = rule.KeyName, + ModifiedTime = rule.ModifiedTime, + PrimaryKey = rule.PrimaryKey, + Revision = (int)rule.Revision, + Rights = rights, + SecondaryKey = rule.SecondaryKey + }; + } + + static public SharedAccessAuthorizationRule ToSharedAccessAuthorizationRule( + this ServiceBusSharedAccessAuthorizationRule sbRule) + { + List rights = new List(); + + if (sbRule.Rights.Contains(AccessRight.Listen)) + { + rights.Add(AccessRights.Listen); + } + + if (sbRule.Rights.Contains(AccessRight.Manage)) + { + rights.Add(AccessRights.Manage); + } + + if (sbRule.Rights.Contains(AccessRight.Send)) + { + rights.Add(AccessRights.Send); + } + + return new SharedAccessAuthorizationRule(sbRule.KeyName, sbRule.PrimaryKey, sbRule.SecondaryKey, rights); + } + + static public ServiceBusConnectionDetail ToServiceBusConnectionDetail(this ServiceBusNamespaceDescription namespaceDesc) + { + return new ServiceBusConnectionDetail() + { + AuthorizationType = namespaceDesc.AuthorizationType, + ConnectionString = namespaceDesc.ConnectionString, + KeyName = namespaceDesc.KeyName, + Rights = namespaceDesc.Rights + }; + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/ServiceBus/ServiceBusHelper.cs b/src/ServiceManagement/Services/Commands.Utilities/ServiceBus/ServiceBusHelper.cs new file mode 100644 index 000000000000..93358c9d1d76 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/ServiceBus/ServiceBusHelper.cs @@ -0,0 +1,165 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using System.ServiceModel.Channels; +using System.ServiceModel.Description; +using System.ServiceModel.Dispatcher; +using System.Xml; +using System.Xml.Linq; +using System.Xml.Serialization; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.Utilities.ServiceBus +{ + public class ServiceBusConstants + { + public const string ServiceBusXNamespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect"; + public const string AtomNamespaceName = "http://www.w3.org/2005/Atom"; + public const string NamespaceNamePattern = "^[a-zA-Z][a-zA-Z0-9-]*$"; + } + + public class CustomBodyWriter : BodyWriter + { + string body; + + public CustomBodyWriter(string body) + : base(true) + { + this.body = body; + } + + protected override void OnWriteBodyContents(XmlDictionaryWriter writer) + { + XmlReader r = XmlReader.Create(new StringReader(body)); + writer.WriteNode(r, false); + } + } + + public class ServiceBusFormatter : IClientMessageFormatter where T : class, new() + { + private IClientMessageFormatter originalFormatter; + + public ServiceBusFormatter(IClientMessageFormatter originalFormatter) + { + this.originalFormatter = originalFormatter; + } + + public object DeserializeReply(Message message, object[] parameters) + { + XDocument response = XDocument.Parse(GeneralUtilities.ReadMessageBody(ref message)); + List results = new List(); + IEnumerable contents = response.Descendants(XName.Get("content", ServiceBusConstants.AtomNamespaceName)); + XmlSerializer serializer = new XmlSerializer(typeof(T)); + + foreach (XElement content in contents) + { + XElement data = content.Elements().First(); + results.Add((T)serializer.Deserialize(new StringReader(data.ToString()))); + } + + if (response.Root.Name == XName.Get("feed", ServiceBusConstants.AtomNamespaceName)) + { + List collection = new List(); + collection.AddRange(results); + return collection; + } + else + { + return results[0]; + } + } + + public Message SerializeRequest(MessageVersion messageVersion, object[] parameters) + { + T data = null; + string body = string.Empty; + XmlSerializer serializer = new XmlSerializer(typeof(T)); + Message originalMessage = originalFormatter.SerializeRequest(messageVersion, parameters); + + foreach (object parameter in parameters) + { + if (parameter is T) + { + data = parameter as T; + break; + } + } + + if (data == null) + { + return originalMessage; + } + + using (StringWriter bodyWriter = new StringWriter()) + { + serializer.Serialize(bodyWriter, data); + body = bodyWriter.ToString(); + } + + body = new XDocument( + new XElement(XName.Get("entry", ServiceBusConstants.AtomNamespaceName), + new XElement(XName.Get("content", ServiceBusConstants.AtomNamespaceName), + new XAttribute("type", "application/xml"), + XDocument.Parse(body).Root))).ToString(); + Message finalMessage = Message.CreateMessage(messageVersion, null, new CustomBodyWriter(body)); + finalMessage.Headers.CopyHeadersFrom(originalMessage); + finalMessage.Properties.CopyProperties(originalMessage.Properties); + HttpRequestMessageProperty property = finalMessage.Properties[HttpRequestMessageProperty.Name] as HttpRequestMessageProperty; + property.Headers.Add("content-type", "application/xml"); + property.Headers.Add("type", "entry"); + property.Headers.Add("charset", "utf-8"); + + return finalMessage; + } + } + + public class ServiceBusBehaviorAttribute : Attribute, IOperationBehavior + { + private Type dataContractType; + + public ServiceBusBehaviorAttribute(Type formatterType) + { + this.dataContractType = formatterType; + } + + public void AddBindingParameters(OperationDescription operationDescription, BindingParameterCollection bindingParameters) + { + // Do nothing. + } + + public void ApplyClientBehavior(OperationDescription operationDescription, ClientOperation clientOperation) + { + Type genericFormatterType = typeof(ServiceBusFormatter<>); + Type formatterType = genericFormatterType.MakeGenericType(new Type[] { dataContractType }); + ConstructorInfo ctor = formatterType.GetConstructor(new Type[] { typeof(IClientMessageFormatter) }); + IClientMessageFormatter newFormatter = ctor.Invoke(new object[] { clientOperation.Formatter }) as IClientMessageFormatter; + clientOperation.Formatter = newFormatter; + } + + public void ApplyDispatchBehavior(OperationDescription operationDescription, DispatchOperation dispatchOperation) + { + throw new NotImplementedException(); + } + + public void Validate(OperationDescription operationDescription) + { + + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/ServiceBus/ServiceBusPowerShellUtility.cs b/src/ServiceManagement/Services/Commands.Utilities/ServiceBus/ServiceBusPowerShellUtility.cs new file mode 100644 index 000000000000..2e343388ad6c --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/ServiceBus/ServiceBusPowerShellUtility.cs @@ -0,0 +1,38 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.Utilities.ServiceBus +{ + public static class ServiceBusPowerShellUtility + { + public static PSObject GetNamespacePSObject(ExtendedAuthorizationRule rule) + { + return (null == rule? null : PowerShellUtilities.ConstructPSObject( + typeof(ExtendedAuthorizationRule).FullName, + "Namespace", rule.Namespace, + "Name", rule.Name, + "ConnectionString", rule.ConnectionString, + "Permission", rule.Permission, + "Rule", rule.Rule)); + } + + public static PSObject GetEntityPSObject(ExtendedAuthorizationRule rule) + { + return (null == rule? null : new PSObject(rule)); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/ServiceManagementStartup.ps1 b/src/ServiceManagement/Services/Commands.Utilities/ServiceManagementStartup.ps1 new file mode 100644 index 000000000000..b353d440e1cd --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/ServiceManagementStartup.ps1 @@ -0,0 +1,66 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +$aliases = @{ + # Profile aliases + "Get-WAPackPublishSettingsFile" = "Get-AzurePublishSettingsFile"; + "Get-WAPackSubscription" = "Get-AzureSubscription"; + "Import-WAPackPublishSettingsFile" = "Import-AzurePublishSettingsFile"; + "Remove-WAPackSubscription" = "Remove-AzureSubscription"; + "Select-WAPackSubscription" = "Select-AzureSubscription"; + "Set-WAPackSubscription" = "Set-AzureSubscription"; + "Show-WAPackPortal" = "Show-AzurePortal"; + "Test-WAPackName" = "Test-AzureName"; + "Get-WAPackEnvironment" = "Get-AzureEnvironment"; + "Add-WAPackEnvironment" = "Add-AzureEnvironment"; + "Set-WAPackEnvironment" = "Set-AzureEnvironment"; + "Remove-WAPackEnvironment" = "Remove-AzureEnvironment"; + + # Websites aliases + "New-WAPackWebsite" = "New-AzureWebsite"; + "Get-WAPackWebsite" = "Get-AzureWebsite"; + "Set-WAPackWebsite" = "Set-AzureWebsite"; + "Remove-WAPackWebsite" = "Remove-AzureWebsite"; + "Start-WAPackWebsite" = "Start-AzureWebsite"; + "Stop-WAPackWebsite" = "Stop-AzureWebsite"; + "Restart-WAPackWebsite" = "Restart-AzureWebsite"; + "Show-WAPackWebsite" = "Show-AzureWebsite"; + "Get-WAPackWebsiteLog" = "Get-AzureWebsiteLog"; + "Save-WAPackWebsiteLog" = "Save-AzureWebsiteLog"; + "Get-WAPackWebsiteLocation" = "Get-AzureWebsiteLocation"; + "Get-WAPackWebsiteDeployment" = "Get-AzureWebsiteDeployment"; + "Restore-WAPackWebsiteDeployment" = "Restore-AzureWebsiteDeployment"; + "Enable-WAPackWebsiteApplicationDiagnositc" = "Enable-AzureWebsiteApplicationDiagnostic"; + "Disable-WAPackWebsiteApplicationDiagnostic" = "Disable-AzureWebsiteApplicationDiagnostic"; + + # Service Bus aliases + "Get-WAPackSBLocation" = "Get-AzureSBLocation"; + "Get-WAPackSBNamespace" = "Get-AzureSBNamespace"; + "New-WAPackSBNamespace" = "New-AzureSBNamespace"; + "Remove-WAPackSBNamespace" = "Remove-AzureSBNamespace"; + + # Storage aliases + "Get-AzureStorageContainerAcl" = "Get-AzureStorageContainer"; + "Start-CopyAzureStorageBlob" = "Start-AzureStorageBlobCopy"; + "Stop-CopyAzureStorageBlob" = "Stop-AzureStorageBlobCopy"; + + # Compute aliases + "New-AzureDns" = "New-AzureDnsConfig"; + + # HDInsight aliases + "Invoke-Hive" = "Invoke-AzureHDInsightHiveJob"; + "hive" = "Invoke-AzureHDInsightHiveJob" +} + +$aliases.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | New-Alias -Description "AzureAlias" \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/ShortcutStartup.ps1 b/src/ServiceManagement/Services/Commands.Utilities/ShortcutStartup.ps1 new file mode 100644 index 000000000000..ce0b178deac8 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/ShortcutStartup.ps1 @@ -0,0 +1,39 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +function Get-ScriptDirectory +{ + $Invocation = (Get-Variable MyInvocation -Scope 1).Value + Split-Path $Invocation.MyCommand.Path +} + +$modulePath = Join-Path $(Split-Path (Get-ScriptDirectory)) "Azure.psd1" +Import-Module $modulePath +cd c:\ +$welcomeMessage = @" +For a list of all Azure cmdlets type 'help azure'. +For a list of Windows Azure Pack cmdlets type 'Get-Command *wapack*'. +For Node.js cmdlets type 'help node-dev'. +For PHP cmdlets type 'help php-dev'. +For Python cmdlets type 'help python-dev'. +"@ +Write-Output $welcomeMessage + +Set-ExecutionPolicy -Scope Process Undefined -Force +if ($(Get-ExecutionPolicy) -eq "Restricted") +{ + Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned -Force +} + +$VerbosePreference="Continue" \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Store/AddOnSearchOptions.cs b/src/ServiceManagement/Services/Commands.Utilities/Store/AddOnSearchOptions.cs new file mode 100644 index 000000000000..7a05544c0d2a --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Store/AddOnSearchOptions.cs @@ -0,0 +1,64 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Store +{ + /// + /// Search options for getting Microsoft Azure add on. + /// + public class AddOnSearchOptions + { + /// + /// Creates new instance from AddOnSearchOptions + /// + /// The add on name + /// The add on provider + /// The add on region + public AddOnSearchOptions(string name = null, string provider = null, string geoRegion = null) + { + Name = name; + + Provider = provider; + + GeoRegion = geoRegion; + } + + public string Name { get; set; } + + public string Provider { get; set; } + + public string GeoRegion { get; set; } + + public override bool Equals(object obj) + { + AddOnSearchOptions rhs = obj as AddOnSearchOptions; + if (rhs == null) { return false; } + + return + GeneralUtilities.TryEquals(this.Name, rhs.Name) && + GeneralUtilities.TryEquals(this.Provider, rhs.Provider) && + GeneralUtilities.TryEquals(this.GeoRegion, rhs.GeoRegion); + } + + public override int GetHashCode() + { + return + (Name ?? string.Empty).GetHashCode() ^ + (Provider ?? string.Empty).GetHashCode() ^ + (GeoRegion ?? string.Empty).GetHashCode(); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Store/Constants.cs b/src/ServiceManagement/Services/Commands.Utilities/Store/Constants.cs new file mode 100644 index 000000000000..6ebea267f62a --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Store/Constants.cs @@ -0,0 +1,76 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Store +{ + public class StoreConstants + { + // + // Non-Microsoft Providers + // + public static HashSet NonMicrosoftProviderIds = new HashSet() { + new Guid("e110fba1-0c8a-45a4-b64e-0bebb3fcb85e"), + new Guid("e768350e-c209-49a9-8bb8-ae17fb5c385c"), + new Guid("b5e616d3-34f4-4ebe-a02d-c56a62a4a2f2"), + new Guid("059afc24-07de-4126-b004-4e42a51816fe"), + new Guid("92a1dc5a-1115-4a2c-b56d-19653801105d"), + new Guid("5443b7fb-4b02-4735-b71e-193621b50f9a"), + new Guid("059afc24-07de-4126-b004-4e42a51816fe"), + new Guid("e6660c79-4b33-45f9-9254-1d7f7d2b6000"), + new Guid("1a3087ba-2878-4315-a4fd-e63d4d24d2a2"), + new Guid("0eea7a6a-7c54-421e-aed9-46a3ffffead1"), + new Guid("03a65029-6919-46d7-a899-d0e40cfe575e"), + new Guid("d7c05a21-94e6-4a05-939c-bfd0f5499e6e"), + new Guid("2ccb99d2-1c71-46e3-9d81-f5465b0ccbea"), + new Guid("723138c2-0676-4bf6-80d4-0af31479dac4"), + new Guid("2f4108db-8ecb-473c-833e-589f5a1c234b"), + new Guid("1a3087ba-2878-4315-a4fd-e63d4d24d2a2"), + new Guid("1c1fc291-5f02-463a-9967-8591442ab653"), + new Guid("e6660c79-4b33-45f9-9254-1d7f7d2b6000"), + new Guid("1441f7f7-33a1-4dcf-aeea-8ed8bc1b2e3d"), + new Guid("4880c467-1dfd-4e16-bd09-ebea6924cd29"), + new Guid("c1cad069-086c-42e4-9e01-de8a1eab75e2"), + new Guid("3a9a3dff-5d25-4a4e-850f-559f0bc8f706"), + new Guid("385dbf8e-3c0c-4b62-b425-7f01b19c9764"), + new Guid("95dc44c2-7516-480b-9246-a636fcdb9bb5"), + new Guid("d79f5602-33a6-4538-9376-d1ca9c2b4521"), + new Guid("da8888b8-2418-499b-9c0e-38d328f9a0b2"), + new Guid("d653a682-cba2-456a-87b2-e9f01db09078"), + new Guid("7fdf958a-4bec-4904-aa89-42d678ebfc38") + }; + + // + // Microsoft Providers + // + public static HashSet MicrosoftProviderIds = new HashSet() { + // Bing + new Guid("f8ede0df-591f-4722-b646-e5eb86f0ae52"), + + // Microsoft + new Guid("43e059fd-14ba-4297-939f-d428bbc74d0a"), + + // Microsoft Research + new Guid("b5e616d3-34f4-4ebe-a02d-c56a62a4a2f2"), + + // Microsoft Translator + new Guid("059afc24-07de-4126-b004-4e42a51816fe"), + + // MetricsHub + new Guid("2f4108db-8ecb-473c-833e-589f5a1c234b") + }; + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Store/MarketplaceClient.cs b/src/ServiceManagement/Services/Commands.Utilities/Store/MarketplaceClient.cs new file mode 100644 index 000000000000..59ef26af52bc --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Store/MarketplaceClient.cs @@ -0,0 +1,128 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Data.Services.Client; +using System.Linq; +using Microsoft.WindowsAzure.Commands.Utilities.MarketplaceServiceReference; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Store +{ + public class MarketplaceClient + { + public List SubscriptionLocations { get; private set; } + + /// + /// Parameterless constructor added for mocking framework. + /// + public MarketplaceClient() + { + + } + + public MarketplaceClient(IEnumerable subscriptionLocations) + { + SubscriptionLocations = new List(subscriptionLocations); + } + + /// + /// Gets available Microsoft Azure offers from the Marketplace. + /// + /// The country two character code. Uses 'US' by default + /// The list of offers + public virtual List GetAvailableWindowsAzureOffers(string countryCode) + { + countryCode = string.IsNullOrEmpty(countryCode) ? "US" : countryCode; + List result = new List(); + List windowsAzureOffers = new List(); + CatalogServiceReadOnlyDbContext context = new CatalogServiceReadOnlyDbContext(new Uri(Resources.MarketplaceEndpoint)); + DataServiceQueryContinuation nextOfferLink = null; + + do + { + DataServiceQuery query = context.Offers + .AddQueryOption("$filter", "IsAvailableInAzureStores") + .Expand("Plans, Categories"); + QueryOperationResponse offerResponse = query.Execute() as QueryOperationResponse; + foreach (Offer offer in offerResponse) + { + List allPlans = new List(offer.Plans); + DataServiceQueryContinuation nextPlanLink = null; + + do + { + QueryOperationResponse planResponse = context.LoadProperty( + offer, + "Plans", + nextPlanLink) as QueryOperationResponse; + nextPlanLink = planResponse.GetContinuation(); + allPlans.AddRange(offer.Plans); + } while (nextPlanLink != null); + + IEnumerable validPlans = offer.Plans.Where(p => p.CountryCode == countryCode); + IEnumerable offerLocations = offer.Categories.Select(c => c.Name) + .Intersect(SubscriptionLocations); + if (validPlans.Count() > 0) + { + result.Add(new WindowsAzureOffer( + offer, + validPlans, + offerLocations.Count() == 0 ? SubscriptionLocations : offerLocations)); + } + } + + nextOfferLink = offerResponse.GetContinuation(); + } while (nextOfferLink != null); + + return result; + } + + /// + /// Gets instance of an offer. + /// + /// The offer identifier + /// The offer instance + public virtual Offer GetOffer(string offerId) + { + CatalogServiceReadOnlyDbContext context = new CatalogServiceReadOnlyDbContext(new Uri(Resources.MarketplaceEndpoint)); + var offers = from o in context.Offers where o.OfferIdentifier == offerId select o; + + return offers.FirstOrDefault(); + } + + /// + /// Checks if the given provider id is known provider or not. + /// + /// The provider id + /// True if known, false otherwise. + public virtual bool IsKnownProvider(Guid providerId) + { + return + StoreConstants.MicrosoftProviderIds.Contains(providerId) || + StoreConstants.NonMicrosoftProviderIds.Contains(providerId); + } + + /// + /// Detects if the given offer is Microsoft offer or not. + /// + /// The offer instance + /// True if Microsoft offer, false otherwise + public virtual bool IsMicrosoftOffer(Offer offer) + { + return StoreConstants.MicrosoftProviderIds.Contains(offer.ProviderId); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Store/Parameter.cs b/src/ServiceManagement/Services/Commands.Utilities/Store/Parameter.cs new file mode 100644 index 000000000000..52ef303c39d6 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Store/Parameter.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Utilities.Store +{ + class Parameter + { + public const string Provider = "Provider"; + + public const string Name = "Name"; + + public const string Plan = "Plan"; + + public const string Location = "Location"; + + public const string AddOn = "AddOn"; + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Store/PowerShellCustomConfirmation.cs b/src/ServiceManagement/Services/Commands.Utilities/Store/PowerShellCustomConfirmation.cs new file mode 100644 index 000000000000..fb7fa9c28db3 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Store/PowerShellCustomConfirmation.cs @@ -0,0 +1,64 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Management.Automation.Host; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Store +{ + public class PowerShellCustomConfirmation + { + public const int Yes = 0; + + public const int No = 1; + + private PSHost host; + + /// + /// Parameterless constructor for mock framework + /// + public PowerShellCustomConfirmation() + { + + } + + public PowerShellCustomConfirmation(PSHost host) + { + this.host = host; + } + + /// + /// Asks user for confirming the given action. + /// + /// The confirmation caption + /// The confirmation message + /// True if user entered Yes, otherwise false + public virtual bool ShouldProcess(string caption, string message) + { + int userChoice = host.UI.PromptForChoice( + caption, + message, + new Collection( + new List(2) + { + new ChoiceDescription(Resources.Yes, Resources.YesHint), + new ChoiceDescription(Resources.No, Resources.NoHint) + }), No); + + return userChoice == Yes; + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Store/StoreClient.cs b/src/ServiceManagement/Services/Commands.Utilities/Store/StoreClient.cs new file mode 100644 index 000000000000..47655197556f --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Store/StoreClient.cs @@ -0,0 +1,391 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Security.Cryptography; +using System.Text; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.MarketplaceServiceReference; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Management; +using Microsoft.WindowsAzure.Management.Compute; +using Microsoft.WindowsAzure.Management.Models; +using Microsoft.WindowsAzure.Management.Store; +using Microsoft.WindowsAzure.Management.Store.Models; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Store +{ + using Resource = Management.Store.Models.CloudServiceListResponse.CloudService.AddOnResource; + + public class StoreClient + { + private const string DataMarketResourceProviderNamespace = "DataMarket"; + + private const string AppService = "AzureDevService"; + + private const string StoreServicePrefix = "Azure-Stores"; + + private StoreManagementClient storeClient; + + private ComputeManagementClient computeClient { get; set; } + + private ManagementClient managementClient { get; set; } + + private string subscriptionId; + + private List GetStoreCloudServices() + { + List cloudServices = new List(storeClient.CloudServices.List().CloudServices); + List storeServices = cloudServices.FindAll( + c => CultureInfo.CurrentCulture.CompareInfo.IsPrefix(c.Name, StoreServicePrefix)); + + return storeServices; + } + + private string GetCloudServiceName(string subscriptionId, string region) + { + string hashedSubId = string.Empty; + using (SHA256 sha256 = SHA256Managed.Create()) + { + hashedSubId = Base32NoPaddingEncode(sha256.ComputeHash(UTF8Encoding.UTF8.GetBytes(subscriptionId))); + } + + return string.Format(CultureInfo.InvariantCulture, "{0}-{1}-{2}", StoreServicePrefix, hashedSubId, region.Replace(' ', '-')); + } + + private string Base32NoPaddingEncode(byte[] data) + { + const string base32StandardAlphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"; + + StringBuilder result = new StringBuilder(Math.Max((int)Math.Ceiling(data.Length * 8 / 5.0), 1)); + + byte[] emptyBuffer = new byte[] { 0, 0, 0, 0, 0, 0, 0, 0 }; + byte[] workingBuffer = new byte[8]; + + // Process input 5 bytes at a time + for (int i = 0; i < data.Length; i += 5) + { + int bytes = Math.Min(data.Length - i, 5); + Array.Copy(emptyBuffer, workingBuffer, emptyBuffer.Length); + Array.Copy(data, i, workingBuffer, workingBuffer.Length - (bytes + 1), bytes); + Array.Reverse(workingBuffer); + ulong val = BitConverter.ToUInt64(workingBuffer, 0); + + for (int bitOffset = ((bytes + 1) * 8) - 5; bitOffset > 3; bitOffset -= 5) + { + result.Append(base32StandardAlphabet[(int)((val >> bitOffset) & 0x1f)]); + } + } + + return result.ToString(); + } + + private string CreateCloudServiceIfNotExists(string location) + { + string cloudServiceName = GetCloudServiceName(subscriptionId, location); + CloudServiceCreateParameters cloudService = new CloudServiceCreateParameters() + { + Name = cloudServiceName, + Label = cloudServiceName, + Description = string.Format(Resources.CloudServiceDescription, location), + GeoRegion = location + }; + try + { + storeClient.CloudServices.Create(cloudService); + } + catch (Exception) + { + // The CloudService is already created, ignore exception. + } + + return cloudServiceName; + } + + private bool IsDataService(string type) + { + return type.Equals(WindowsAzureAddOn.DataType, StringComparison.OrdinalIgnoreCase); + } + + public MarketplaceClient MarketplaceClient { get; set; } + + /// + /// Parameterless constructor added for mocking framework. + /// + public StoreClient() + { + + } + + /// + /// Creates new instance from the store client. + /// + /// The Microsoft Azure subscription + public StoreClient(AzureSubscription subscription) + : this( + subscription, + AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement), + AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement), + new MarketplaceClient(), + AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement)) { } + + public StoreClient( + AzureSubscription subscription, + ComputeManagementClient compute, + StoreManagementClient store, + MarketplaceClient marketplace, + ManagementClient management) + { + this.subscriptionId = subscription.Id.ToString(); + + computeClient = compute; + storeClient = store; + MarketplaceClient = marketplace; + managementClient = management; + } + + /// + /// Gets add ons based on the passed filter. + /// + /// The add on search options + /// The list of filtered add ons + public virtual List GetAddOn(AddOnSearchOptions searchOptions = null) + { + List addOns = new List(); + List storeServices = GetStoreCloudServices(); + + foreach (CloudServiceListResponse.CloudService storeService in storeServices) + { + if (GeneralUtilities.TryEquals(searchOptions.GeoRegion, storeService.GeoRegion)) + { + foreach (Resource resource in storeService.Resources) + { + if (GeneralUtilities.TryEquals(searchOptions.Name, resource.Name) && + GeneralUtilities.TryEquals(searchOptions.Provider, resource.Namespace)) + { + addOns.Add(new WindowsAzureAddOn(resource, storeService.GeoRegion, storeService.Name)); + } + } + } + } + + return addOns; + } + + /// + /// Removes given Add-On + /// + /// The add-on name + public virtual void RemoveAddOn(string name) + { + List addOns = GetAddOn(new AddOnSearchOptions(name, null, null)); + + if (addOns.Count != 1) + { + throw new Exception(string.Format(Resources.AddOnNotFound, name)); + } + + WindowsAzureAddOn addon = addOns[0]; + string type; + string cloudService; + string addonId; + addonId = GetResourceInformation(addon.AddOn, addon.Location, out type, out cloudService); + + storeClient.AddOns.Delete(cloudService, type, addonId, name); + } + + public virtual void NewAddOn( + string name, + string addon, + string plan, + string location, + string promotionCode) + { + string type; + string cloudServiceName; + addon = GetResourceInformation(addon, location, out type, out cloudServiceName); + + AddOnCreateParameters parameters = new AddOnCreateParameters() + { + Plan = plan, + Type = type, + PromotionCode = promotionCode + }; + try + { + storeClient.AddOns.Create(cloudServiceName, addon, name, parameters); + } + catch (Exception ex) + { + if (ex.Message.Equals(Resources.FirstPurchaseErrorMessage, StringComparison.OrdinalIgnoreCase)) + { + throw new Exception(Resources.FirstPurchaseMessage); + } + } + } + + private string GetResourceInformation(string addon, string location, out string type, out string cloudService) + { + Offer offer = MarketplaceClient.GetOffer(addon); + type = offer.OfferType; + string provider = offer.ProviderIdentifier; + cloudService = CreateCloudServiceIfNotExists(location); + type = IsDataService(type) ? DataMarketResourceProviderNamespace : provider; + + if (type.Equals(DataMarketResourceProviderNamespace, StringComparison.OrdinalIgnoreCase)) + { + addon = string.Format("{0}-{1}", provider, addon); + } + return addon; + } + + /// + /// Gets confirmation message for the given operation. + /// + /// The operation type + /// The add-on id + /// The plan id + /// The confirmation message + public virtual string GetConfirmationMessage(OperationType operation, string addon = null, string plan = null) + { + Offer offer = null; + bool microsoftOffer = false; + string addOnUrl = null; + string message = null; + + if (!string.IsNullOrEmpty(plan)) + { + offer = MarketplaceClient.GetOffer(addon); + + if (offer == null) + { + throw new Exception(string.Format(Resources.AddOnNotFound, addon)); + } + + if (!MarketplaceClient.IsKnownProvider(offer.ProviderId)) + { + throw new Exception(string.Format(Resources.UnknownProviderMessage, offer.ProviderId)); + } + + microsoftOffer = MarketplaceClient.IsMicrosoftOffer(offer); + addOnUrl = string.Format(Resources.AddOnUrl, offer.Id); + } + + switch (operation) + { + case OperationType.New: + message = microsoftOffer ? Resources.NewMicrosoftAddOnMessage : + Resources.NewNonMicrosoftAddOnMessage; + break; + case OperationType.Set: + message = microsoftOffer ? Resources.SetMicrosoftAddOnMessage : + Resources.SetNonMicrosoftAddOnMessage; + break; + case OperationType.Remove: + message = Resources.RemoveAddOnMessage; + break; + default: + throw new Exception(); + } + + if (!string.IsNullOrEmpty(addOnUrl) && !string.IsNullOrEmpty(plan) && offer != null) + { + return string.Format(message, addOnUrl, plan, offer.ProviderIdentifier); + } + + return message; + } + + /// + /// Tries to get an add-on using it's name. + /// + /// The add-on name + /// The add-on instance. Will be null if not found + /// Boolean if the add-on is found, false otherwise + public virtual bool TryGetAddOn(string name, out WindowsAzureAddOn addon) + { + List addons = GetAddOn(new AddOnSearchOptions(name, null, null)); + + if (addons.Count == 1) + { + addon = addons[0]; + return true; + } + + addon = null; + return false; + } + + /// + /// Updates an add-on plan. + /// + /// The add-on name + /// The add-on new plan id + /// The plan promotion code + public virtual void UpdateAddOn(string name, string plan, string promotionCode) + { + List addons = GetAddOn(new AddOnSearchOptions(name)); + if (addons.Count != 1) + { + throw new Exception(string.Format(Resources.AddOnNotFound, name)); + } + + WindowsAzureAddOn addon = addons[0]; + + if (!string.IsNullOrEmpty(promotionCode) && addon.Plan.Equals(plan, StringComparison.OrdinalIgnoreCase)) + { + throw new Exception(Resources.PromotionCodeWithCurrentPlanMessage); + } + + string type; + string cloudServiceName; + addon.AddOn = GetResourceInformation(addon.AddOn, addon.Location, out type, out cloudServiceName); + + AddOnUpdateParameters parameters = new AddOnUpdateParameters() + { + Plan = plan, + Type = type, + PromotionCode = promotionCode + }; + try + { + storeClient.AddOns.Update(cloudServiceName, addon.AddOn, name, parameters); + } + catch (Exception ex) + { + if (ex.Message.Equals(Resources.FirstPurchaseErrorMessage, StringComparison.OrdinalIgnoreCase)) + { + throw new Exception(Resources.FirstPurchaseMessage); + } + } + } + + public virtual List GetLocations() + { + return managementClient.Locations.List().Locations.ToList(); + } + } + + public enum OperationType + { + New, + Set, + Remove + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Store/ValidateCountryLengthAttribute.cs b/src/ServiceManagement/Services/Commands.Utilities/Store/ValidateCountryLengthAttribute.cs new file mode 100644 index 000000000000..6f1beaf59024 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Store/ValidateCountryLengthAttribute.cs @@ -0,0 +1,38 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Store +{ + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] + public sealed class ValidateCountryLengthAttribute : ValidateEnumeratedArgumentsAttribute + { + const int MaxLength = 2; + + const int MinLength = 2; + + protected override void ValidateElement(object element) + { + string country = (string)element; + + if (country.Length > MaxLength || country.Length < MinLength) + { + throw new ArgumentException(Resources.InvalidCountryNameMessage); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Store/WindowsAzureAddOn.cs b/src/ServiceManagement/Services/Commands.Utilities/Store/WindowsAzureAddOn.cs new file mode 100644 index 000000000000..f4782ec7afe7 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Store/WindowsAzureAddOn.cs @@ -0,0 +1,87 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Store +{ + using Resource = Management.Store.Models.CloudServiceListResponse.CloudService.AddOnResource; + + public class WindowsAzureAddOn + { + public const string DataSetType = "DataMarket"; + + public const string DataType = "Data"; + + public const string AppServiceType = "App Service"; + + public string Type { get; set; } + + public string AddOn { get; set; } + + public string Name { get; set; } + + public string Plan { get; set; } + + public string SchemaVersion { get; set; } + + public string ETag { get; set; } + + public string State { get; set; } + + public List UsageMeters { get; set; } + + public Dictionary OutputItems { get; set; } + + public Resource.OperationStatus LastOperationStatus { get; set; } + + public string Location { get; set; } + + public string CloudService { get; set; } + + /// + /// Creates new instance from AddOn + /// + /// The add on details + /// The add on region + public WindowsAzureAddOn(Resource resource, string geoRegion, string cloudService) + { + Type = resource.Namespace == DataSetType ? DataType : AppServiceType; + + AddOn = resource.Type; + + Name = resource.Name; + + Plan = resource.Plan; + + SchemaVersion = resource.SchemaVersion; + + ETag = resource.ETag; + + State = resource.State; + + UsageMeters = resource.UsageLimits.ToList(); + + OutputItems = (Type == AppServiceType) ? new Dictionary(resource.OutputItems) : + new Dictionary(); + + LastOperationStatus = resource.Status; + + Location = geoRegion; + + CloudService = cloudService; + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Store/WindowsAzureOffer.cs b/src/ServiceManagement/Services/Commands.Utilities/Store/WindowsAzureOffer.cs new file mode 100644 index 000000000000..428c05338dfa --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Store/WindowsAzureOffer.cs @@ -0,0 +1,107 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Microsoft.WindowsAzure.Commands.Utilities.MarketplaceServiceReference; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Store +{ + public class WindowsAzureOffer + { + public Guid Id { get; set; } + + public string Name { get; set; } + + public string ShortDescription { get; set; } + + public string Description { get; set; } + + public DateTime PublishDate { get; set; } + + public string IconUrl { get; set; } + + public string MarketplaceDetailUrl { get; set; } + + public string OfferType { get; set; } + + public string ProviderName { get; set; } + + public Guid ProviderId { get; set; } + + public string WebsiteUrl { get; set; } + + public string Country { get; set; } + + public string EulaUrl { get; set; } + + public string PrivacyPolicyUrl { get; set; } + + public string Provider { get; set; } + + public string AddOn { get; set; } + + public bool IsAvailableInAzureStores { get; set; } + + public List Plans { get; set; } + + public List Locations { get; set; } + + /// + /// Creates new instance from WindowsAzureOffer + /// + /// The offer details + /// The offer plans + public WindowsAzureOffer(Offer offer, IEnumerable plans, IEnumerable locations) + { + Id = offer.Id; + + Name = offer.Name; + + ShortDescription = offer.ShortDescription; + + Description = offer.Description; + + PublishDate = offer.PublishDate; + + IconUrl = offer.IconUrl; + + MarketplaceDetailUrl = offer.MarketplaceDetailUrl; + + OfferType = offer.OfferType; + + ProviderName = offer.ProviderName; + + ProviderId = offer.ProviderId; + + WebsiteUrl = offer.WebsiteUrl; + + Country = offer.Country; + + EulaUrl = offer.EulaUrl; + + PrivacyPolicyUrl = offer.PrivacyPolicyUrl; + + Provider = offer.ProviderIdentifier; + + AddOn = offer.OfferIdentifier; + + IsAvailableInAzureStores = offer.IsAvailableInAzureStores; + + Plans = new List(plans); + + Locations = new List(locations); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/DataContract/proxy.cs b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/DataContract/proxy.cs new file mode 100644 index 000000000000..86cda69a7b24 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/DataContract/proxy.cs @@ -0,0 +1,30613 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.18051 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// Original file name: proxy.cs +// Generation date: 8/2/2013 12:41:19 PM +namespace Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract +{ + /// + /// There are no comments for VMM.VirtualDiskDrive in the schema. + /// + /// + /// ID + /// StampId + /// + [global::System.Data.Services.Common.EntitySetAttribute("VirtualDiskDrives")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ID", "StampId")] + public partial class VirtualDiskDrive : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new VirtualDiskDrive object. + /// + /// Initial value of StampId. + /// Initial value of ID. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static VirtualDiskDrive CreateVirtualDiskDrive(global::System.Guid stampId, global::System.Guid ID) + { + VirtualDiskDrive virtualDiskDrive = new VirtualDiskDrive(); + virtualDiskDrive.StampId = stampId; + virtualDiskDrive.ID = ID; + return virtualDiskDrive; + } + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this._ID = value; + this.OnIDChanged(); + this.OnPropertyChanged("ID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ID; + partial void OnIDChanging(global::System.Guid value); + partial void OnIDChanged(); + /// + /// There are no comments for Property Bus in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Bus + { + get + { + return this._Bus; + } + set + { + this.OnBusChanging(value); + this._Bus = value; + this.OnBusChanged(); + this.OnPropertyChanged("Bus"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Bus; + partial void OnBusChanging(global::System.Nullable value); + partial void OnBusChanged(); + /// + /// There are no comments for Property BusType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string BusType + { + get + { + return this._BusType; + } + set + { + this.OnBusTypeChanging(value); + this._BusType = value; + this.OnBusTypeChanged(); + this.OnPropertyChanged("BusType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _BusType; + partial void OnBusTypeChanging(string value); + partial void OnBusTypeChanged(); + /// + /// There are no comments for Property IsVHD in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsVHD + { + get + { + return this._IsVHD; + } + set + { + this.OnIsVHDChanging(value); + this._IsVHD = value; + this.OnIsVHDChanged(); + this.OnPropertyChanged("IsVHD"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsVHD; + partial void OnIsVHDChanging(global::System.Nullable value); + partial void OnIsVHDChanged(); + /// + /// There are no comments for Property LUN in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable LUN + { + get + { + return this._LUN; + } + set + { + this.OnLUNChanging(value); + this._LUN = value; + this.OnLUNChanged(); + this.OnPropertyChanged("LUN"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _LUN; + partial void OnLUNChanging(global::System.Nullable value); + partial void OnLUNChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property VMId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VMId + { + get + { + return this._VMId; + } + set + { + this.OnVMIdChanging(value); + this._VMId = value; + this.OnVMIdChanged(); + this.OnPropertyChanged("VMId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VMId; + partial void OnVMIdChanging(global::System.Nullable value); + partial void OnVMIdChanged(); + /// + /// There are no comments for Property TemplateId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable TemplateId + { + get + { + return this._TemplateId; + } + set + { + this.OnTemplateIdChanging(value); + this._TemplateId = value; + this.OnTemplateIdChanged(); + this.OnPropertyChanged("TemplateId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _TemplateId; + partial void OnTemplateIdChanging(global::System.Nullable value); + partial void OnTemplateIdChanged(); + /// + /// There are no comments for Property ISOId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ISOId + { + get + { + return this._ISOId; + } + set + { + this.OnISOIdChanging(value); + this._ISOId = value; + this.OnISOIdChanged(); + this.OnPropertyChanged("ISOId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ISOId; + partial void OnISOIdChanging(global::System.Nullable value); + partial void OnISOIdChanged(); + /// + /// There are no comments for Property HostDrive in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string HostDrive + { + get + { + return this._HostDrive; + } + set + { + this.OnHostDriveChanging(value); + this._HostDrive = value; + this.OnHostDriveChanged(); + this.OnPropertyChanged("HostDrive"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _HostDrive; + partial void OnHostDriveChanging(string value); + partial void OnHostDriveChanged(); + /// + /// There are no comments for Property ISOLinked in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ISOLinked + { + get + { + return this._ISOLinked; + } + set + { + this.OnISOLinkedChanging(value); + this._ISOLinked = value; + this.OnISOLinkedChanged(); + this.OnPropertyChanged("ISOLinked"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ISOLinked; + partial void OnISOLinkedChanging(global::System.Nullable value); + partial void OnISOLinkedChanged(); + /// + /// There are no comments for Property Accessibility in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Accessibility + { + get + { + return this._Accessibility; + } + set + { + this.OnAccessibilityChanging(value); + this._Accessibility = value; + this.OnAccessibilityChanged(); + this.OnPropertyChanged("Accessibility"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Accessibility; + partial void OnAccessibilityChanging(string value); + partial void OnAccessibilityChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property AddedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable AddedTime + { + get + { + return this._AddedTime; + } + set + { + this.OnAddedTimeChanging(value); + this._AddedTime = value; + this.OnAddedTimeChanged(); + this.OnPropertyChanged("AddedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _AddedTime; + partial void OnAddedTimeChanging(global::System.Nullable value); + partial void OnAddedTimeChanged(); + /// + /// There are no comments for Property ModifiedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ModifiedTime + { + get + { + return this._ModifiedTime; + } + set + { + this.OnModifiedTimeChanging(value); + this._ModifiedTime = value; + this.OnModifiedTimeChanged(); + this.OnPropertyChanged("ModifiedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ModifiedTime; + partial void OnModifiedTimeChanging(global::System.Nullable value); + partial void OnModifiedTimeChanged(); + /// + /// There are no comments for Property Enabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Enabled + { + get + { + return this._Enabled; + } + set + { + this.OnEnabledChanging(value); + this._Enabled = value; + this.OnEnabledChanged(); + this.OnPropertyChanged("Enabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Enabled; + partial void OnEnabledChanging(global::System.Nullable value); + partial void OnEnabledChanged(); + /// + /// There are no comments for Property VirtualHardDiskId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VirtualHardDiskId + { + get + { + return this._VirtualHardDiskId; + } + set + { + this.OnVirtualHardDiskIdChanging(value); + this._VirtualHardDiskId = value; + this.OnVirtualHardDiskIdChanged(); + this.OnPropertyChanged("VirtualHardDiskId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VirtualHardDiskId; + partial void OnVirtualHardDiskIdChanging(global::System.Nullable value); + partial void OnVirtualHardDiskIdChanged(); + /// + /// There are no comments for Property VolumeType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string VolumeType + { + get + { + return this._VolumeType; + } + set + { + this.OnVolumeTypeChanging(value); + this._VolumeType = value; + this.OnVolumeTypeChanged(); + this.OnPropertyChanged("VolumeType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _VolumeType; + partial void OnVolumeTypeChanging(string value); + partial void OnVolumeTypeChanged(); + /// + /// There are no comments for Property IDE in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IDE + { + get + { + return this._IDE; + } + set + { + this.OnIDEChanging(value); + this._IDE = value; + this.OnIDEChanged(); + this.OnPropertyChanged("IDE"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IDE; + partial void OnIDEChanging(global::System.Nullable value); + partial void OnIDEChanged(); + /// + /// There are no comments for Property SCSI in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable SCSI + { + get + { + return this._SCSI; + } + set + { + this.OnSCSIChanging(value); + this._SCSI = value; + this.OnSCSIChanged(); + this.OnPropertyChanged("SCSI"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _SCSI; + partial void OnSCSIChanging(global::System.Nullable value); + partial void OnSCSIChanged(); + /// + /// There are no comments for Property FileName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string FileName + { + get + { + return this._FileName; + } + set + { + this.OnFileNameChanging(value); + this._FileName = value; + this.OnFileNameChanged(); + this.OnPropertyChanged("FileName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _FileName; + partial void OnFileNameChanging(string value); + partial void OnFileNameChanged(); + /// + /// There are no comments for Property Path in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Path + { + get + { + return this._Path; + } + set + { + this.OnPathChanging(value); + this._Path = value; + this.OnPathChanged(); + this.OnPropertyChanged("Path"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Path; + partial void OnPathChanging(string value); + partial void OnPathChanged(); + /// + /// There are no comments for Property Size in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Size + { + get + { + return this._Size; + } + set + { + this.OnSizeChanging(value); + this._Size = value; + this.OnSizeChanged(); + this.OnPropertyChanged("Size"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Size; + partial void OnSizeChanging(global::System.Nullable value); + partial void OnSizeChanged(); + /// + /// There are no comments for VirtualHardDisk in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public VirtualHardDisk VirtualHardDisk + { + get + { + return this._VirtualHardDisk; + } + set + { + this._VirtualHardDisk = value; + this.OnPropertyChanged("VirtualHardDisk"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private VirtualHardDisk _VirtualHardDisk; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.VPNConnection in the schema. + /// + /// + /// ID + /// StampId + /// + [global::System.Data.Services.Common.EntitySetAttribute("VPNConnections")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ID", "StampId")] + public partial class VPNConnection : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new VPNConnection object. + /// + /// Initial value of StampId. + /// Initial value of ID. + /// Initial value of CloudVPNIPAddresses. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static VPNConnection CreateVPNConnection(global::System.Guid stampId, global::System.Guid ID, global::System.Collections.ObjectModel.ObservableCollection cloudVPNIPAddresses) + { + VPNConnection vPNConnection = new VPNConnection(); + vPNConnection.StampId = stampId; + vPNConnection.ID = ID; + if ((cloudVPNIPAddresses == null)) + { + throw new global::System.ArgumentNullException("cloudVPNIPAddresses"); + } + vPNConnection.CloudVPNIPAddresses = cloudVPNIPAddresses; + return vPNConnection; + } + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this._ID = value; + this.OnIDChanged(); + this.OnPropertyChanged("ID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ID; + partial void OnIDChanging(global::System.Guid value); + partial void OnIDChanged(); + /// + /// There are no comments for Property VMNetworkGatewayId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VMNetworkGatewayId + { + get + { + return this._VMNetworkGatewayId; + } + set + { + this.OnVMNetworkGatewayIdChanging(value); + this._VMNetworkGatewayId = value; + this.OnVMNetworkGatewayIdChanged(); + this.OnPropertyChanged("VMNetworkGatewayId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VMNetworkGatewayId; + partial void OnVMNetworkGatewayIdChanging(global::System.Nullable value); + partial void OnVMNetworkGatewayIdChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property TargetVPNIPv4Address in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string TargetVPNIPv4Address + { + get + { + return this._TargetVPNIPv4Address; + } + set + { + this.OnTargetVPNIPv4AddressChanging(value); + this._TargetVPNIPv4Address = value; + this.OnTargetVPNIPv4AddressChanged(); + this.OnPropertyChanged("TargetVPNIPv4Address"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _TargetVPNIPv4Address; + partial void OnTargetVPNIPv4AddressChanging(string value); + partial void OnTargetVPNIPv4AddressChanged(); + /// + /// There are no comments for Property TargetVPNIPv6Address in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string TargetVPNIPv6Address + { + get + { + return this._TargetVPNIPv6Address; + } + set + { + this.OnTargetVPNIPv6AddressChanging(value); + this._TargetVPNIPv6Address = value; + this.OnTargetVPNIPv6AddressChanged(); + this.OnPropertyChanged("TargetVPNIPv6Address"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _TargetVPNIPv6Address; + partial void OnTargetVPNIPv6AddressChanging(string value); + partial void OnTargetVPNIPv6AddressChanged(); + /// + /// There are no comments for Property CloudVPNIPAddresses in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection CloudVPNIPAddresses + { + get + { + return this._CloudVPNIPAddresses; + } + set + { + this.OnCloudVPNIPAddressesChanging(value); + this._CloudVPNIPAddresses = value; + this.OnCloudVPNIPAddressesChanged(); + this.OnPropertyChanged("CloudVPNIPAddresses"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _CloudVPNIPAddresses = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnCloudVPNIPAddressesChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnCloudVPNIPAddressesChanged(); + /// + /// There are no comments for Property AuthenticationMethod in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string AuthenticationMethod + { + get + { + return this._AuthenticationMethod; + } + set + { + this.OnAuthenticationMethodChanging(value); + this._AuthenticationMethod = value; + this.OnAuthenticationMethodChanged(); + this.OnPropertyChanged("AuthenticationMethod"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _AuthenticationMethod; + partial void OnAuthenticationMethodChanging(string value); + partial void OnAuthenticationMethodChanged(); + /// + /// There are no comments for Property RunAsAccountId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable RunAsAccountId + { + get + { + return this._RunAsAccountId; + } + set + { + this.OnRunAsAccountIdChanging(value); + this._RunAsAccountId = value; + this.OnRunAsAccountIdChanged(); + this.OnPropertyChanged("RunAsAccountId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _RunAsAccountId; + partial void OnRunAsAccountIdChanging(global::System.Nullable value); + partial void OnRunAsAccountIdChanged(); + /// + /// There are no comments for Property Status in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Status + { + get + { + return this._Status; + } + set + { + this.OnStatusChanging(value); + this._Status = value; + this.OnStatusChanged(); + this.OnPropertyChanged("Status"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Status; + partial void OnStatusChanging(string value); + partial void OnStatusChanged(); + /// + /// There are no comments for Property LastConnectionError in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string LastConnectionError + { + get + { + return this._LastConnectionError; + } + set + { + this.OnLastConnectionErrorChanging(value); + this._LastConnectionError = value; + this.OnLastConnectionErrorChanged(); + this.OnPropertyChanged("LastConnectionError"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _LastConnectionError; + partial void OnLastConnectionErrorChanging(string value); + partial void OnLastConnectionErrorChanged(); + /// + /// There are no comments for Property LastConnectionErrorCode in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable LastConnectionErrorCode + { + get + { + return this._LastConnectionErrorCode; + } + set + { + this.OnLastConnectionErrorCodeChanging(value); + this._LastConnectionErrorCode = value; + this.OnLastConnectionErrorCodeChanged(); + this.OnPropertyChanged("LastConnectionErrorCode"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _LastConnectionErrorCode; + partial void OnLastConnectionErrorCodeChanging(global::System.Nullable value); + partial void OnLastConnectionErrorCodeChanged(); + /// + /// There are no comments for Property MaximumBandwidthInboundKbps in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MaximumBandwidthInboundKbps + { + get + { + return this._MaximumBandwidthInboundKbps; + } + set + { + this.OnMaximumBandwidthInboundKbpsChanging(value); + this._MaximumBandwidthInboundKbps = value; + this.OnMaximumBandwidthInboundKbpsChanged(); + this.OnPropertyChanged("MaximumBandwidthInboundKbps"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MaximumBandwidthInboundKbps; + partial void OnMaximumBandwidthInboundKbpsChanging(global::System.Nullable value); + partial void OnMaximumBandwidthInboundKbpsChanged(); + /// + /// There are no comments for Property MaximumBandwidthOutboundKbps in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MaximumBandwidthOutboundKbps + { + get + { + return this._MaximumBandwidthOutboundKbps; + } + set + { + this.OnMaximumBandwidthOutboundKbpsChanging(value); + this._MaximumBandwidthOutboundKbps = value; + this.OnMaximumBandwidthOutboundKbpsChanged(); + this.OnPropertyChanged("MaximumBandwidthOutboundKbps"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MaximumBandwidthOutboundKbps; + partial void OnMaximumBandwidthOutboundKbpsChanging(global::System.Nullable value); + partial void OnMaximumBandwidthOutboundKbpsChanged(); + /// + /// There are no comments for Property LastRead in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable LastRead + { + get + { + return this._LastRead; + } + set + { + this.OnLastReadChanging(value); + this._LastRead = value; + this.OnLastReadChanged(); + this.OnPropertyChanged("LastRead"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _LastRead; + partial void OnLastReadChanging(global::System.Nullable value); + partial void OnLastReadChanged(); + /// + /// There are no comments for NetworkRoutes in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection NetworkRoutes + { + get + { + return this._NetworkRoutes; + } + set + { + this._NetworkRoutes = value; + this.OnPropertyChanged("NetworkRoutes"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _NetworkRoutes = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.PerformanceData in the schema. + /// + /// + /// PerformanceCounter + /// StampId + /// TimeFrame + /// VMId + /// + [global::System.Data.Services.Common.EntitySetAttribute("PerformanceData")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("PerformanceCounter", "StampId", "TimeFrame", "VMId")] + public partial class PerformanceData : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new PerformanceData object. + /// + /// Initial value of PerformanceHistory. + /// Initial value of TimeSamples. + /// Initial value of TimeFrame. + /// Initial value of PerformanceCounter. + /// Initial value of VMId. + /// Initial value of StampId. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static PerformanceData CreatePerformanceData(global::System.Collections.ObjectModel.ObservableCollection performanceHistory, global::System.Collections.ObjectModel.ObservableCollection timeSamples, string timeFrame, string performanceCounter, global::System.Guid vMId, global::System.Guid stampId) + { + PerformanceData performanceData = new PerformanceData(); + if ((performanceHistory == null)) + { + throw new global::System.ArgumentNullException("performanceHistory"); + } + performanceData.PerformanceHistory = performanceHistory; + if ((timeSamples == null)) + { + throw new global::System.ArgumentNullException("timeSamples"); + } + performanceData.TimeSamples = timeSamples; + performanceData.TimeFrame = timeFrame; + performanceData.PerformanceCounter = performanceCounter; + performanceData.VMId = vMId; + performanceData.StampId = stampId; + return performanceData; + } + /// + /// There are no comments for Property PerformanceHistory in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection PerformanceHistory + { + get + { + return this._PerformanceHistory; + } + set + { + this.OnPerformanceHistoryChanging(value); + this._PerformanceHistory = value; + this.OnPerformanceHistoryChanged(); + this.OnPropertyChanged("PerformanceHistory"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _PerformanceHistory = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnPerformanceHistoryChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnPerformanceHistoryChanged(); + /// + /// There are no comments for Property TimeSamples in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection TimeSamples + { + get + { + return this._TimeSamples; + } + set + { + this.OnTimeSamplesChanging(value); + this._TimeSamples = value; + this.OnTimeSamplesChanged(); + this.OnPropertyChanged("TimeSamples"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _TimeSamples = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnTimeSamplesChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnTimeSamplesChanged(); + /// + /// There are no comments for Property TimeFrame in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string TimeFrame + { + get + { + return this._TimeFrame; + } + set + { + this.OnTimeFrameChanging(value); + this._TimeFrame = value; + this.OnTimeFrameChanged(); + this.OnPropertyChanged("TimeFrame"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _TimeFrame; + partial void OnTimeFrameChanging(string value); + partial void OnTimeFrameChanged(); + /// + /// There are no comments for Property PerformanceCounter in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string PerformanceCounter + { + get + { + return this._PerformanceCounter; + } + set + { + this.OnPerformanceCounterChanging(value); + this._PerformanceCounter = value; + this.OnPerformanceCounterChanged(); + this.OnPropertyChanged("PerformanceCounter"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _PerformanceCounter; + partial void OnPerformanceCounterChanging(string value); + partial void OnPerformanceCounterChanged(); + /// + /// There are no comments for Property VMId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid VMId + { + get + { + return this._VMId; + } + set + { + this.OnVMIdChanging(value); + this._VMId = value; + this.OnVMIdChanged(); + this.OnPropertyChanged("VMId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _VMId; + partial void OnVMIdChanging(global::System.Guid value); + partial void OnVMIdChanged(); + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.GuestInfo in the schema. + /// + /// + /// StampId + /// VMId + /// + [global::System.Data.Services.Common.EntitySetAttribute("GuestInfos")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("StampId", "VMId")] + public partial class GuestInfo : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new GuestInfo object. + /// + /// Initial value of VMId. + /// Initial value of StampId. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static GuestInfo CreateGuestInfo(global::System.Guid vMId, global::System.Guid stampId) + { + GuestInfo guestInfo = new GuestInfo(); + guestInfo.VMId = vMId; + guestInfo.StampId = stampId; + return guestInfo; + } + /// + /// There are no comments for Property IPv4Addresses in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string IPv4Addresses + { + get + { + return this._IPv4Addresses; + } + set + { + this.OnIPv4AddressesChanging(value); + this._IPv4Addresses = value; + this.OnIPv4AddressesChanged(); + this.OnPropertyChanged("IPv4Addresses"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _IPv4Addresses; + partial void OnIPv4AddressesChanging(string value); + partial void OnIPv4AddressesChanged(); + /// + /// There are no comments for Property IPv6Addresses in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string IPv6Addresses + { + get + { + return this._IPv6Addresses; + } + set + { + this.OnIPv6AddressesChanging(value); + this._IPv6Addresses = value; + this.OnIPv6AddressesChanged(); + this.OnPropertyChanged("IPv6Addresses"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _IPv6Addresses; + partial void OnIPv6AddressesChanging(string value); + partial void OnIPv6AddressesChanged(); + /// + /// There are no comments for Property VMId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid VMId + { + get + { + return this._VMId; + } + set + { + this.OnVMIdChanging(value); + this._VMId = value; + this.OnVMIdChanged(); + this.OnPropertyChanged("VMId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _VMId; + partial void OnVMIdChanging(global::System.Guid value); + partial void OnVMIdChanged(); + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType VMM.UserRoleResource in the schema. + /// + public partial class UserRoleResource : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// There are no comments for Property Resource in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Resource + { + get + { + return this._Resource; + } + set + { + this.OnResourceChanging(value); + this._Resource = value; + this.OnResourceChanged(); + this.OnPropertyChanged("Resource"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Resource; + partial void OnResourceChanging(global::System.Nullable value); + partial void OnResourceChanged(); + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StampId; + partial void OnStampIdChanging(global::System.Nullable value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property ResourceType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ResourceType + { + get + { + return this._ResourceType; + } + set + { + this.OnResourceTypeChanging(value); + this._ResourceType = value; + this.OnResourceTypeChanged(); + this.OnPropertyChanged("ResourceType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ResourceType; + partial void OnResourceTypeChanging(string value); + partial void OnResourceTypeChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType VMM.UserRoleScope in the schema. + /// + public partial class UserRoleScope : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// There are no comments for Property Scope in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Scope + { + get + { + return this._Scope; + } + set + { + this.OnScopeChanging(value); + this._Scope = value; + this.OnScopeChanged(); + this.OnPropertyChanged("Scope"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Scope; + partial void OnScopeChanging(global::System.Nullable value); + partial void OnScopeChanged(); + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StampId; + partial void OnStampIdChanging(global::System.Nullable value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property ScopeType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ScopeType + { + get + { + return this._ScopeType; + } + set + { + this.OnScopeTypeChanging(value); + this._ScopeType = value; + this.OnScopeTypeChanged(); + this.OnPropertyChanged("ScopeType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ScopeType; + partial void OnScopeTypeChanging(string value); + partial void OnScopeTypeChanged(); + /// + /// There are no comments for Property RoleCPUCount in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable RoleCPUCount + { + get + { + return this._RoleCPUCount; + } + set + { + this.OnRoleCPUCountChanging(value); + this._RoleCPUCount = value; + this.OnRoleCPUCountChanged(); + this.OnPropertyChanged("RoleCPUCount"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _RoleCPUCount; + partial void OnRoleCPUCountChanging(global::System.Nullable value); + partial void OnRoleCPUCountChanged(); + /// + /// There are no comments for Property RoleMemoryMB in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable RoleMemoryMB + { + get + { + return this._RoleMemoryMB; + } + set + { + this.OnRoleMemoryMBChanging(value); + this._RoleMemoryMB = value; + this.OnRoleMemoryMBChanged(); + this.OnPropertyChanged("RoleMemoryMB"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _RoleMemoryMB; + partial void OnRoleMemoryMBChanging(global::System.Nullable value); + partial void OnRoleMemoryMBChanged(); + /// + /// There are no comments for Property RoleStorageGB in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable RoleStorageGB + { + get + { + return this._RoleStorageGB; + } + set + { + this.OnRoleStorageGBChanging(value); + this._RoleStorageGB = value; + this.OnRoleStorageGBChanged(); + this.OnPropertyChanged("RoleStorageGB"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _RoleStorageGB; + partial void OnRoleStorageGBChanging(global::System.Nullable value); + partial void OnRoleStorageGBChanged(); + /// + /// There are no comments for Property RoleCustomQuotaCount in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable RoleCustomQuotaCount + { + get + { + return this._RoleCustomQuotaCount; + } + set + { + this.OnRoleCustomQuotaCountChanging(value); + this._RoleCustomQuotaCount = value; + this.OnRoleCustomQuotaCountChanged(); + this.OnPropertyChanged("RoleCustomQuotaCount"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _RoleCustomQuotaCount; + partial void OnRoleCustomQuotaCountChanging(global::System.Nullable value); + partial void OnRoleCustomQuotaCountChanged(); + /// + /// There are no comments for Property RoleVMCount in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable RoleVMCount + { + get + { + return this._RoleVMCount; + } + set + { + this.OnRoleVMCountChanging(value); + this._RoleVMCount = value; + this.OnRoleVMCountChanged(); + this.OnPropertyChanged("RoleVMCount"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _RoleVMCount; + partial void OnRoleVMCountChanging(global::System.Nullable value); + partial void OnRoleVMCountChanged(); + /// + /// There are no comments for Property MemberCPUCount in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MemberCPUCount + { + get + { + return this._MemberCPUCount; + } + set + { + this.OnMemberCPUCountChanging(value); + this._MemberCPUCount = value; + this.OnMemberCPUCountChanged(); + this.OnPropertyChanged("MemberCPUCount"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MemberCPUCount; + partial void OnMemberCPUCountChanging(global::System.Nullable value); + partial void OnMemberCPUCountChanged(); + /// + /// There are no comments for Property MemberMemoryMB in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MemberMemoryMB + { + get + { + return this._MemberMemoryMB; + } + set + { + this.OnMemberMemoryMBChanging(value); + this._MemberMemoryMB = value; + this.OnMemberMemoryMBChanged(); + this.OnPropertyChanged("MemberMemoryMB"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MemberMemoryMB; + partial void OnMemberMemoryMBChanging(global::System.Nullable value); + partial void OnMemberMemoryMBChanged(); + /// + /// There are no comments for Property MemberStorageGB in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MemberStorageGB + { + get + { + return this._MemberStorageGB; + } + set + { + this.OnMemberStorageGBChanging(value); + this._MemberStorageGB = value; + this.OnMemberStorageGBChanged(); + this.OnPropertyChanged("MemberStorageGB"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MemberStorageGB; + partial void OnMemberStorageGBChanging(global::System.Nullable value); + partial void OnMemberStorageGBChanged(); + /// + /// There are no comments for Property MemberCustomQuotaCount in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MemberCustomQuotaCount + { + get + { + return this._MemberCustomQuotaCount; + } + set + { + this.OnMemberCustomQuotaCountChanging(value); + this._MemberCustomQuotaCount = value; + this.OnMemberCustomQuotaCountChanged(); + this.OnPropertyChanged("MemberCustomQuotaCount"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MemberCustomQuotaCount; + partial void OnMemberCustomQuotaCountChanging(global::System.Nullable value); + partial void OnMemberCustomQuotaCountChanged(); + /// + /// There are no comments for Property MemberVMCount in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MemberVMCount + { + get + { + return this._MemberVMCount; + } + set + { + this.OnMemberVMCountChanging(value); + this._MemberVMCount = value; + this.OnMemberVMCountChanged(); + this.OnPropertyChanged("MemberVMCount"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MemberVMCount; + partial void OnMemberVMCountChanging(global::System.Nullable value); + partial void OnMemberVMCountChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType VMM.UserRoleCloudResourceExtension in the schema. + /// + public partial class UserRoleCloudResourceExtension : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property Version in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Version + { + get + { + return this._Version; + } + set + { + this.OnVersionChanging(value); + this._Version = value; + this.OnVersionChanged(); + this.OnPropertyChanged("Version"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Version; + partial void OnVersionChanging(string value); + partial void OnVersionChanged(); + /// + /// There are no comments for Property Publisher in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Publisher + { + get + { + return this._Publisher; + } + set + { + this.OnPublisherChanging(value); + this._Publisher = value; + this.OnPublisherChanged(); + this.OnPropertyChanged("Publisher"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Publisher; + partial void OnPublisherChanging(string value); + partial void OnPublisherChanged(); + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StampId; + partial void OnStampIdChanging(global::System.Nullable value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property ResourceType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ResourceType + { + get + { + return this._ResourceType; + } + set + { + this.OnResourceTypeChanging(value); + this._ResourceType = value; + this.OnResourceTypeChanged(); + this.OnPropertyChanged("ResourceType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ResourceType; + partial void OnResourceTypeChanging(string value); + partial void OnResourceTypeChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType VMM.UserRoleCloudPermission in the schema. + /// + public partial class UserRoleCloudPermission : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new UserRoleCloudPermission object. + /// + /// Initial value of ExplicitPermission. + /// Initial value of EffectivePermission. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static UserRoleCloudPermission CreateUserRoleCloudPermission(global::System.Collections.ObjectModel.ObservableCollection explicitPermission, global::System.Collections.ObjectModel.ObservableCollection effectivePermission) + { + UserRoleCloudPermission userRoleCloudPermission = new UserRoleCloudPermission(); + if ((explicitPermission == null)) + { + throw new global::System.ArgumentNullException("explicitPermission"); + } + userRoleCloudPermission.ExplicitPermission = explicitPermission; + if ((effectivePermission == null)) + { + throw new global::System.ArgumentNullException("effectivePermission"); + } + userRoleCloudPermission.EffectivePermission = effectivePermission; + return userRoleCloudPermission; + } + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StampId; + partial void OnStampIdChanging(global::System.Nullable value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property CloudId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CloudId + { + get + { + return this._CloudId; + } + set + { + this.OnCloudIdChanging(value); + this._CloudId = value; + this.OnCloudIdChanged(); + this.OnPropertyChanged("CloudId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CloudId; + partial void OnCloudIdChanging(global::System.Nullable value); + partial void OnCloudIdChanged(); + /// + /// There are no comments for Property ExplicitPermission in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection ExplicitPermission + { + get + { + return this._ExplicitPermission; + } + set + { + this.OnExplicitPermissionChanging(value); + this._ExplicitPermission = value; + this.OnExplicitPermissionChanged(); + this.OnPropertyChanged("ExplicitPermission"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _ExplicitPermission = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnExplicitPermissionChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnExplicitPermissionChanged(); + /// + /// There are no comments for Property EffectivePermission in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection EffectivePermission + { + get + { + return this._EffectivePermission; + } + set + { + this.OnEffectivePermissionChanging(value); + this._EffectivePermission = value; + this.OnEffectivePermissionChanged(); + this.OnPropertyChanged("EffectivePermission"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _EffectivePermission = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnEffectivePermissionChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnEffectivePermissionChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType VMM.UserRolePermission in the schema. + /// + public partial class UserRolePermission : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new UserRolePermission object. + /// + /// Initial value of Permission. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static UserRolePermission CreateUserRolePermission(global::System.Collections.ObjectModel.ObservableCollection permission) + { + UserRolePermission userRolePermission = new UserRolePermission(); + if ((permission == null)) + { + throw new global::System.ArgumentNullException("permission"); + } + userRolePermission.Permission = permission; + return userRolePermission; + } + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StampId; + partial void OnStampIdChanging(global::System.Nullable value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property Permission in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection Permission + { + get + { + return this._Permission; + } + set + { + this.OnPermissionChanging(value); + this._Permission = value; + this.OnPermissionChanged(); + this.OnPropertyChanged("Permission"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _Permission = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnPermissionChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnPermissionChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType VMM.UserRoleCloudPermissionInput in the schema. + /// + public partial class UserRoleCloudPermissionInput : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new UserRoleCloudPermissionInput object. + /// + /// Initial value of ExplicitPermission. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static UserRoleCloudPermissionInput CreateUserRoleCloudPermissionInput(global::System.Collections.ObjectModel.ObservableCollection explicitPermission) + { + UserRoleCloudPermissionInput userRoleCloudPermissionInput = new UserRoleCloudPermissionInput(); + if ((explicitPermission == null)) + { + throw new global::System.ArgumentNullException("explicitPermission"); + } + userRoleCloudPermissionInput.ExplicitPermission = explicitPermission; + return userRoleCloudPermissionInput; + } + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StampId; + partial void OnStampIdChanging(global::System.Nullable value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property CloudId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CloudId + { + get + { + return this._CloudId; + } + set + { + this.OnCloudIdChanging(value); + this._CloudId = value; + this.OnCloudIdChanged(); + this.OnPropertyChanged("CloudId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CloudId; + partial void OnCloudIdChanging(global::System.Nullable value); + partial void OnCloudIdChanged(); + /// + /// There are no comments for Property ExplicitPermission in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection ExplicitPermission + { + get + { + return this._ExplicitPermission; + } + set + { + this.OnExplicitPermissionChanging(value); + this._ExplicitPermission = value; + this.OnExplicitPermissionChanged(); + this.OnPropertyChanged("ExplicitPermission"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _ExplicitPermission = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnExplicitPermissionChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnExplicitPermissionChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType VMM.UserRoleDataPath in the schema. + /// + public partial class UserRoleDataPath : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StampId; + partial void OnStampIdChanging(global::System.Nullable value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property DataPath in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DataPath + { + get + { + return this._DataPath; + } + set + { + this.OnDataPathChanging(value); + this._DataPath = value; + this.OnDataPathChanged(); + this.OnPropertyChanged("DataPath"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DataPath; + partial void OnDataPathChanging(string value); + partial void OnDataPathChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType VMM.VMNetworkQuota in the schema. + /// + public partial class VMNetworkQuota : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StampId; + partial void OnStampIdChanging(global::System.Nullable value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property VMNetworkMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VMNetworkMaximum + { + get + { + return this._VMNetworkMaximum; + } + set + { + this.OnVMNetworkMaximumChanging(value); + this._VMNetworkMaximum = value; + this.OnVMNetworkMaximumChanged(); + this.OnPropertyChanged("VMNetworkMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VMNetworkMaximum; + partial void OnVMNetworkMaximumChanging(global::System.Nullable value); + partial void OnVMNetworkMaximumChanged(); + /// + /// There are no comments for Property VMNetworkMaximumPerUser in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VMNetworkMaximumPerUser + { + get + { + return this._VMNetworkMaximumPerUser; + } + set + { + this.OnVMNetworkMaximumPerUserChanging(value); + this._VMNetworkMaximumPerUser = value; + this.OnVMNetworkMaximumPerUserChanged(); + this.OnPropertyChanged("VMNetworkMaximumPerUser"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VMNetworkMaximumPerUser; + partial void OnVMNetworkMaximumPerUserChanging(global::System.Nullable value); + partial void OnVMNetworkMaximumPerUserChanged(); + /// + /// There are no comments for Property VPNConnectionMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VPNConnectionMaximum + { + get + { + return this._VPNConnectionMaximum; + } + set + { + this.OnVPNConnectionMaximumChanging(value); + this._VPNConnectionMaximum = value; + this.OnVPNConnectionMaximumChanged(); + this.OnPropertyChanged("VPNConnectionMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VPNConnectionMaximum; + partial void OnVPNConnectionMaximumChanging(global::System.Nullable value); + partial void OnVPNConnectionMaximumChanged(); + /// + /// There are no comments for Property VPNConnectionMaximumPerUser in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VPNConnectionMaximumPerUser + { + get + { + return this._VPNConnectionMaximumPerUser; + } + set + { + this.OnVPNConnectionMaximumPerUserChanging(value); + this._VPNConnectionMaximumPerUser = value; + this.OnVPNConnectionMaximumPerUserChanged(); + this.OnPropertyChanged("VPNConnectionMaximumPerUser"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VPNConnectionMaximumPerUser; + partial void OnVPNConnectionMaximumPerUserChanging(global::System.Nullable value); + partial void OnVPNConnectionMaximumPerUserChanged(); + /// + /// There are no comments for Property VMNetworkVPNMaximumBandwidthInKbps in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VMNetworkVPNMaximumBandwidthInKbps + { + get + { + return this._VMNetworkVPNMaximumBandwidthInKbps; + } + set + { + this.OnVMNetworkVPNMaximumBandwidthInKbpsChanging(value); + this._VMNetworkVPNMaximumBandwidthInKbps = value; + this.OnVMNetworkVPNMaximumBandwidthInKbpsChanged(); + this.OnPropertyChanged("VMNetworkVPNMaximumBandwidthInKbps"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VMNetworkVPNMaximumBandwidthInKbps; + partial void OnVMNetworkVPNMaximumBandwidthInKbpsChanging(global::System.Nullable value); + partial void OnVMNetworkVPNMaximumBandwidthInKbpsChanged(); + /// + /// There are no comments for Property VMNetworkVPNMaximumBandwidthOutKbps in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VMNetworkVPNMaximumBandwidthOutKbps + { + get + { + return this._VMNetworkVPNMaximumBandwidthOutKbps; + } + set + { + this.OnVMNetworkVPNMaximumBandwidthOutKbpsChanging(value); + this._VMNetworkVPNMaximumBandwidthOutKbps = value; + this.OnVMNetworkVPNMaximumBandwidthOutKbpsChanged(); + this.OnPropertyChanged("VMNetworkVPNMaximumBandwidthOutKbps"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VMNetworkVPNMaximumBandwidthOutKbps; + partial void OnVMNetworkVPNMaximumBandwidthOutKbpsChanging(global::System.Nullable value); + partial void OnVMNetworkVPNMaximumBandwidthOutKbpsChanged(); + /// + /// There are no comments for Property RemoveVMNetworkMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable RemoveVMNetworkMaximum + { + get + { + return this._RemoveVMNetworkMaximum; + } + set + { + this.OnRemoveVMNetworkMaximumChanging(value); + this._RemoveVMNetworkMaximum = value; + this.OnRemoveVMNetworkMaximumChanged(); + this.OnPropertyChanged("RemoveVMNetworkMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _RemoveVMNetworkMaximum; + partial void OnRemoveVMNetworkMaximumChanging(global::System.Nullable value); + partial void OnRemoveVMNetworkMaximumChanged(); + /// + /// There are no comments for Property RemoveVMNetworkMaximumPerUser in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable RemoveVMNetworkMaximumPerUser + { + get + { + return this._RemoveVMNetworkMaximumPerUser; + } + set + { + this.OnRemoveVMNetworkMaximumPerUserChanging(value); + this._RemoveVMNetworkMaximumPerUser = value; + this.OnRemoveVMNetworkMaximumPerUserChanged(); + this.OnPropertyChanged("RemoveVMNetworkMaximumPerUser"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _RemoveVMNetworkMaximumPerUser; + partial void OnRemoveVMNetworkMaximumPerUserChanging(global::System.Nullable value); + partial void OnRemoveVMNetworkMaximumPerUserChanged(); + /// + /// There are no comments for Property RemoveVPNConnectionMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable RemoveVPNConnectionMaximum + { + get + { + return this._RemoveVPNConnectionMaximum; + } + set + { + this.OnRemoveVPNConnectionMaximumChanging(value); + this._RemoveVPNConnectionMaximum = value; + this.OnRemoveVPNConnectionMaximumChanged(); + this.OnPropertyChanged("RemoveVPNConnectionMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _RemoveVPNConnectionMaximum; + partial void OnRemoveVPNConnectionMaximumChanging(global::System.Nullable value); + partial void OnRemoveVPNConnectionMaximumChanged(); + /// + /// There are no comments for Property RemoveVPNConnectionMaximumPerUser in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable RemoveVPNConnectionMaximumPerUser + { + get + { + return this._RemoveVPNConnectionMaximumPerUser; + } + set + { + this.OnRemoveVPNConnectionMaximumPerUserChanging(value); + this._RemoveVPNConnectionMaximumPerUser = value; + this.OnRemoveVPNConnectionMaximumPerUserChanged(); + this.OnPropertyChanged("RemoveVPNConnectionMaximumPerUser"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _RemoveVPNConnectionMaximumPerUser; + partial void OnRemoveVPNConnectionMaximumPerUserChanging(global::System.Nullable value); + partial void OnRemoveVPNConnectionMaximumPerUserChanged(); + /// + /// There are no comments for Property RemoveVMNetworkVPNMaximumBandwidthIn in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable RemoveVMNetworkVPNMaximumBandwidthIn + { + get + { + return this._RemoveVMNetworkVPNMaximumBandwidthIn; + } + set + { + this.OnRemoveVMNetworkVPNMaximumBandwidthInChanging(value); + this._RemoveVMNetworkVPNMaximumBandwidthIn = value; + this.OnRemoveVMNetworkVPNMaximumBandwidthInChanged(); + this.OnPropertyChanged("RemoveVMNetworkVPNMaximumBandwidthIn"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _RemoveVMNetworkVPNMaximumBandwidthIn; + partial void OnRemoveVMNetworkVPNMaximumBandwidthInChanging(global::System.Nullable value); + partial void OnRemoveVMNetworkVPNMaximumBandwidthInChanged(); + /// + /// There are no comments for Property RemoveVMNetworkVPNMaximumBandwidthOut in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable RemoveVMNetworkVPNMaximumBandwidthOut + { + get + { + return this._RemoveVMNetworkVPNMaximumBandwidthOut; + } + set + { + this.OnRemoveVMNetworkVPNMaximumBandwidthOutChanging(value); + this._RemoveVMNetworkVPNMaximumBandwidthOut = value; + this.OnRemoveVMNetworkVPNMaximumBandwidthOutChanged(); + this.OnPropertyChanged("RemoveVMNetworkVPNMaximumBandwidthOut"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _RemoveVMNetworkVPNMaximumBandwidthOut; + partial void OnRemoveVMNetworkVPNMaximumBandwidthOutChanging(global::System.Nullable value); + partial void OnRemoveVMNetworkVPNMaximumBandwidthOutChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.UserRole in the schema. + /// + /// + /// ID + /// + [global::System.Data.Services.Common.EntitySetAttribute("UserRoles")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ID")] + public partial class UserRole : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new UserRole object. + /// + /// Initial value of AddMember. + /// Initial value of AddResource. + /// Initial value of AddScope. + /// Initial value of AddCloudResourceExtension. + /// Initial value of ID. + /// Initial value of Members. + /// Initial value of Permission. + /// Initial value of CloudPermission. + /// Initial value of Quotas. + /// Initial value of RemoveMember. + /// Initial value of PermissionInput. + /// Initial value of CloudPermissionInput. + /// Initial value of RemoveResource. + /// Initial value of RemoveScope. + /// Initial value of RemoveCloudResourceExtension. + /// Initial value of UserRoleDataPath. + /// Initial value of VMNetworkQuota. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static UserRole CreateUserRole( + global::System.Collections.ObjectModel.ObservableCollection addMember, + global::System.Collections.ObjectModel.ObservableCollection addResource, + global::System.Collections.ObjectModel.ObservableCollection addScope, + global::System.Collections.ObjectModel.ObservableCollection addCloudResourceExtension, + global::System.Guid ID, + global::System.Collections.ObjectModel.ObservableCollection members, + global::System.Collections.ObjectModel.ObservableCollection permission, + global::System.Collections.ObjectModel.ObservableCollection cloudPermission, + global::System.Collections.ObjectModel.ObservableCollection quotas, + global::System.Collections.ObjectModel.ObservableCollection removeMember, + global::System.Collections.ObjectModel.ObservableCollection permissionInput, + global::System.Collections.ObjectModel.ObservableCollection cloudPermissionInput, + global::System.Collections.ObjectModel.ObservableCollection removeResource, + global::System.Collections.ObjectModel.ObservableCollection removeScope, + global::System.Collections.ObjectModel.ObservableCollection removeCloudResourceExtension, + global::System.Collections.ObjectModel.ObservableCollection userRoleDataPath, + global::System.Collections.ObjectModel.ObservableCollection vMNetworkQuota) + { + UserRole userRole = new UserRole(); + if ((addMember == null)) + { + throw new global::System.ArgumentNullException("addMember"); + } + userRole.AddMember = addMember; + if ((addResource == null)) + { + throw new global::System.ArgumentNullException("addResource"); + } + userRole.AddResource = addResource; + if ((addScope == null)) + { + throw new global::System.ArgumentNullException("addScope"); + } + userRole.AddScope = addScope; + if ((addCloudResourceExtension == null)) + { + throw new global::System.ArgumentNullException("addCloudResourceExtension"); + } + userRole.AddCloudResourceExtension = addCloudResourceExtension; + userRole.ID = ID; + if ((members == null)) + { + throw new global::System.ArgumentNullException("members"); + } + userRole.Members = members; + if ((permission == null)) + { + throw new global::System.ArgumentNullException("permission"); + } + userRole.Permission = permission; + if ((cloudPermission == null)) + { + throw new global::System.ArgumentNullException("cloudPermission"); + } + userRole.CloudPermission = cloudPermission; + if ((quotas == null)) + { + throw new global::System.ArgumentNullException("quotas"); + } + userRole.Quotas = quotas; + if ((removeMember == null)) + { + throw new global::System.ArgumentNullException("removeMember"); + } + userRole.RemoveMember = removeMember; + if ((permissionInput == null)) + { + throw new global::System.ArgumentNullException("permissionInput"); + } + userRole.PermissionInput = permissionInput; + if ((cloudPermissionInput == null)) + { + throw new global::System.ArgumentNullException("cloudPermissionInput"); + } + userRole.CloudPermissionInput = cloudPermissionInput; + if ((removeResource == null)) + { + throw new global::System.ArgumentNullException("removeResource"); + } + userRole.RemoveResource = removeResource; + if ((removeScope == null)) + { + throw new global::System.ArgumentNullException("removeScope"); + } + userRole.RemoveScope = removeScope; + if ((removeCloudResourceExtension == null)) + { + throw new global::System.ArgumentNullException("removeCloudResourceExtension"); + } + userRole.RemoveCloudResourceExtension = removeCloudResourceExtension; + if ((userRoleDataPath == null)) + { + throw new global::System.ArgumentNullException("userRoleDataPath"); + } + userRole.UserRoleDataPath = userRoleDataPath; + if ((vMNetworkQuota == null)) + { + throw new global::System.ArgumentNullException("vMNetworkQuota"); + } + userRole.VMNetworkQuota = vMNetworkQuota; + return userRole; + } + /// + /// There are no comments for Property AddMember in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection AddMember + { + get + { + return this._AddMember; + } + set + { + this.OnAddMemberChanging(value); + this._AddMember = value; + this.OnAddMemberChanged(); + this.OnPropertyChanged("AddMember"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _AddMember = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnAddMemberChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnAddMemberChanged(); + /// + /// There are no comments for Property AddResource in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection AddResource + { + get + { + return this._AddResource; + } + set + { + this.OnAddResourceChanging(value); + this._AddResource = value; + this.OnAddResourceChanged(); + this.OnPropertyChanged("AddResource"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _AddResource = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnAddResourceChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnAddResourceChanged(); + /// + /// There are no comments for Property AddScope in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection AddScope + { + get + { + return this._AddScope; + } + set + { + this.OnAddScopeChanging(value); + this._AddScope = value; + this.OnAddScopeChanged(); + this.OnPropertyChanged("AddScope"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _AddScope = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnAddScopeChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnAddScopeChanged(); + /// + /// There are no comments for Property AddCloudResourceExtension in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection AddCloudResourceExtension + { + get + { + return this._AddCloudResourceExtension; + } + set + { + this.OnAddCloudResourceExtensionChanging(value); + this._AddCloudResourceExtension = value; + this.OnAddCloudResourceExtensionChanged(); + this.OnPropertyChanged("AddCloudResourceExtension"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _AddCloudResourceExtension = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnAddCloudResourceExtensionChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnAddCloudResourceExtensionChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this._ID = value; + this.OnIDChanged(); + this.OnPropertyChanged("ID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ID; + partial void OnIDChanging(global::System.Guid value); + partial void OnIDChanged(); + /// + /// There are no comments for Property Members in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection Members + { + get + { + return this._Members; + } + set + { + this.OnMembersChanging(value); + this._Members = value; + this.OnMembersChanged(); + this.OnPropertyChanged("Members"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _Members = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnMembersChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnMembersChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property ParentUserRoleId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ParentUserRoleId + { + get + { + return this._ParentUserRoleId; + } + set + { + this.OnParentUserRoleIdChanging(value); + this._ParentUserRoleId = value; + this.OnParentUserRoleIdChanged(); + this.OnPropertyChanged("ParentUserRoleId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ParentUserRoleId; + partial void OnParentUserRoleIdChanging(global::System.Nullable value); + partial void OnParentUserRoleIdChanged(); + /// + /// There are no comments for Property Permission in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection Permission + { + get + { + return this._Permission; + } + set + { + this.OnPermissionChanging(value); + this._Permission = value; + this.OnPermissionChanged(); + this.OnPropertyChanged("Permission"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _Permission = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnPermissionChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnPermissionChanged(); + /// + /// There are no comments for Property CloudPermission in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection CloudPermission + { + get + { + return this._CloudPermission; + } + set + { + this.OnCloudPermissionChanging(value); + this._CloudPermission = value; + this.OnCloudPermissionChanged(); + this.OnPropertyChanged("CloudPermission"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _CloudPermission = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnCloudPermissionChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnCloudPermissionChanged(); + /// + /// There are no comments for Property Profile in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Profile + { + get + { + return this._Profile; + } + set + { + this.OnProfileChanging(value); + this._Profile = value; + this.OnProfileChanged(); + this.OnPropertyChanged("Profile"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Profile; + partial void OnProfileChanging(string value); + partial void OnProfileChanged(); + /// + /// There are no comments for Property Quotas in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection Quotas + { + get + { + return this._Quotas; + } + set + { + this.OnQuotasChanging(value); + this._Quotas = value; + this.OnQuotasChanged(); + this.OnPropertyChanged("Quotas"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _Quotas = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnQuotasChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnQuotasChanged(); + /// + /// There are no comments for Property RemoveMember in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection RemoveMember + { + get + { + return this._RemoveMember; + } + set + { + this.OnRemoveMemberChanging(value); + this._RemoveMember = value; + this.OnRemoveMemberChanged(); + this.OnPropertyChanged("RemoveMember"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _RemoveMember = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnRemoveMemberChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnRemoveMemberChanged(); + /// + /// There are no comments for Property UserRoleProfile in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string UserRoleProfile + { + get + { + return this._UserRoleProfile; + } + set + { + this.OnUserRoleProfileChanging(value); + this._UserRoleProfile = value; + this.OnUserRoleProfileChanged(); + this.OnPropertyChanged("UserRoleProfile"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _UserRoleProfile; + partial void OnUserRoleProfileChanging(string value); + partial void OnUserRoleProfileChanged(); + /// + /// There are no comments for Property PermissionInput in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection PermissionInput + { + get + { + return this._PermissionInput; + } + set + { + this.OnPermissionInputChanging(value); + this._PermissionInput = value; + this.OnPermissionInputChanged(); + this.OnPropertyChanged("PermissionInput"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _PermissionInput = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnPermissionInputChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnPermissionInputChanged(); + /// + /// There are no comments for Property CloudPermissionInput in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection CloudPermissionInput + { + get + { + return this._CloudPermissionInput; + } + set + { + this.OnCloudPermissionInputChanging(value); + this._CloudPermissionInput = value; + this.OnCloudPermissionInputChanged(); + this.OnPropertyChanged("CloudPermissionInput"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _CloudPermissionInput = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnCloudPermissionInputChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnCloudPermissionInputChanged(); + /// + /// There are no comments for Property RemoveResource in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection RemoveResource + { + get + { + return this._RemoveResource; + } + set + { + this.OnRemoveResourceChanging(value); + this._RemoveResource = value; + this.OnRemoveResourceChanged(); + this.OnPropertyChanged("RemoveResource"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _RemoveResource = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnRemoveResourceChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnRemoveResourceChanged(); + /// + /// There are no comments for Property RemoveScope in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection RemoveScope + { + get + { + return this._RemoveScope; + } + set + { + this.OnRemoveScopeChanging(value); + this._RemoveScope = value; + this.OnRemoveScopeChanged(); + this.OnPropertyChanged("RemoveScope"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _RemoveScope = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnRemoveScopeChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnRemoveScopeChanged(); + /// + /// There are no comments for Property RemoveCloudResourceExtension in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection RemoveCloudResourceExtension + { + get + { + return this._RemoveCloudResourceExtension; + } + set + { + this.OnRemoveCloudResourceExtensionChanging(value); + this._RemoveCloudResourceExtension = value; + this.OnRemoveCloudResourceExtensionChanged(); + this.OnPropertyChanged("RemoveCloudResourceExtension"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _RemoveCloudResourceExtension = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnRemoveCloudResourceExtensionChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnRemoveCloudResourceExtensionChanged(); + /// + /// There are no comments for Property VMId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VMId + { + get + { + return this._VMId; + } + set + { + this.OnVMIdChanging(value); + this._VMId = value; + this.OnVMIdChanged(); + this.OnPropertyChanged("VMId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VMId; + partial void OnVMIdChanging(global::System.Nullable value); + partial void OnVMIdChanged(); + /// + /// There are no comments for Property VMTemplateId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VMTemplateId + { + get + { + return this._VMTemplateId; + } + set + { + this.OnVMTemplateIdChanging(value); + this._VMTemplateId = value; + this.OnVMTemplateIdChanged(); + this.OnPropertyChanged("VMTemplateId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VMTemplateId; + partial void OnVMTemplateIdChanging(global::System.Nullable value); + partial void OnVMTemplateIdChanged(); + /// + /// There are no comments for Property UserRoleDataPath in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection UserRoleDataPath + { + get + { + return this._UserRoleDataPath; + } + set + { + this.OnUserRoleDataPathChanging(value); + this._UserRoleDataPath = value; + this.OnUserRoleDataPathChanged(); + this.OnPropertyChanged("UserRoleDataPath"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _UserRoleDataPath = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnUserRoleDataPathChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnUserRoleDataPathChanged(); + /// + /// There are no comments for Property VMNetworkQuota in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection VMNetworkQuota + { + get + { + return this._VMNetworkQuota; + } + set + { + this.OnVMNetworkQuotaChanging(value); + this._VMNetworkQuota = value; + this.OnVMNetworkQuotaChanged(); + this.OnPropertyChanged("VMNetworkQuota"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _VMNetworkQuota = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnVMNetworkQuotaChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnVMNetworkQuotaChanged(); + /// + /// There are no comments for Clouds in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection Clouds + { + get + { + return this._Clouds; + } + set + { + this._Clouds = value; + this.OnPropertyChanged("Clouds"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _Clouds = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType VMM.VMNetworkAssignment in the schema. + /// + public partial class VMNetworkAssignment : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// There are no comments for Property VirtualNetworkAdapterID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VirtualNetworkAdapterID + { + get + { + return this._VirtualNetworkAdapterID; + } + set + { + this.OnVirtualNetworkAdapterIDChanging(value); + this._VirtualNetworkAdapterID = value; + this.OnVirtualNetworkAdapterIDChanged(); + this.OnPropertyChanged("VirtualNetworkAdapterID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VirtualNetworkAdapterID; + partial void OnVirtualNetworkAdapterIDChanging(global::System.Nullable value); + partial void OnVirtualNetworkAdapterIDChanged(); + /// + /// There are no comments for Property VMNetworkName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string VMNetworkName + { + get + { + return this._VMNetworkName; + } + set + { + this.OnVMNetworkNameChanging(value); + this._VMNetworkName = value; + this.OnVMNetworkNameChanged(); + this.OnPropertyChanged("VMNetworkName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _VMNetworkName; + partial void OnVMNetworkNameChanging(string value); + partial void OnVMNetworkNameChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType VMM.OperatingSystem in the schema. + /// + public partial class OperatingSystem : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property Version in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Version + { + get + { + return this._Version; + } + set + { + this.OnVersionChanging(value); + this._Version = value; + this.OnVersionChanged(); + this.OnPropertyChanged("Version"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Version; + partial void OnVersionChanging(string value); + partial void OnVersionChanged(); + /// + /// There are no comments for Property Architecture in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Architecture + { + get + { + return this._Architecture; + } + set + { + this.OnArchitectureChanging(value); + this._Architecture = value; + this.OnArchitectureChanged(); + this.OnPropertyChanged("Architecture"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Architecture; + partial void OnArchitectureChanging(string value); + partial void OnArchitectureChanged(); + /// + /// There are no comments for Property Edition in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Edition + { + get + { + return this._Edition; + } + set + { + this.OnEditionChanging(value); + this._Edition = value; + this.OnEditionChanged(); + this.OnPropertyChanged("Edition"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Edition; + partial void OnEditionChanging(string value); + partial void OnEditionChanged(); + /// + /// There are no comments for Property OSType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string OSType + { + get + { + return this._OSType; + } + set + { + this.OnOSTypeChanging(value); + this._OSType = value; + this.OnOSTypeChanged(); + this.OnPropertyChanged("OSType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _OSType; + partial void OnOSTypeChanging(string value); + partial void OnOSTypeChanged(); + /// + /// There are no comments for Property ProductType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ProductType + { + get + { + return this._ProductType; + } + set + { + this.OnProductTypeChanging(value); + this._ProductType = value; + this.OnProductTypeChanged(); + this.OnPropertyChanged("ProductType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ProductType; + partial void OnProductTypeChanging(string value); + partial void OnProductTypeChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType VMM.UserAndRole in the schema. + /// + public partial class UserAndRole : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// There are no comments for Property UserName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string UserName + { + get + { + return this._UserName; + } + set + { + this.OnUserNameChanging(value); + this._UserName = value; + this.OnUserNameChanged(); + this.OnPropertyChanged("UserName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _UserName; + partial void OnUserNameChanging(string value); + partial void OnUserNameChanged(); + /// + /// There are no comments for Property RoleName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string RoleName + { + get + { + return this._RoleName; + } + set + { + this.OnRoleNameChanging(value); + this._RoleName = value; + this.OnRoleNameChanged(); + this.OnPropertyChanged("RoleName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _RoleName; + partial void OnRoleNameChanging(string value); + partial void OnRoleNameChanged(); + /// + /// There are no comments for Property RoleID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable RoleID + { + get + { + return this._RoleID; + } + set + { + this.OnRoleIDChanging(value); + this._RoleID = value; + this.OnRoleIDChanged(); + this.OnPropertyChanged("RoleID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _RoleID; + partial void OnRoleIDChanging(global::System.Nullable value); + partial void OnRoleIDChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType VMM.ErrorInfo in the schema. + /// + public partial class ErrorInfo : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// There are no comments for Property CloudProblem in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string CloudProblem + { + get + { + return this._CloudProblem; + } + set + { + this.OnCloudProblemChanging(value); + this._CloudProblem = value; + this.OnCloudProblemChanged(); + this.OnPropertyChanged("CloudProblem"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _CloudProblem; + partial void OnCloudProblemChanging(string value); + partial void OnCloudProblemChanged(); + /// + /// There are no comments for Property Code in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Code + { + get + { + return this._Code; + } + set + { + this.OnCodeChanging(value); + this._Code = value; + this.OnCodeChanged(); + this.OnPropertyChanged("Code"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Code; + partial void OnCodeChanging(string value); + partial void OnCodeChanged(); + /// + /// There are no comments for Property DetailedCode in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable DetailedCode + { + get + { + return this._DetailedCode; + } + set + { + this.OnDetailedCodeChanging(value); + this._DetailedCode = value; + this.OnDetailedCodeChanged(); + this.OnPropertyChanged("DetailedCode"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _DetailedCode; + partial void OnDetailedCodeChanging(global::System.Nullable value); + partial void OnDetailedCodeChanged(); + /// + /// There are no comments for Property DetailedErrorCode in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DetailedErrorCode + { + get + { + return this._DetailedErrorCode; + } + set + { + this.OnDetailedErrorCodeChanging(value); + this._DetailedErrorCode = value; + this.OnDetailedErrorCodeChanged(); + this.OnPropertyChanged("DetailedErrorCode"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DetailedErrorCode; + partial void OnDetailedErrorCodeChanging(string value); + partial void OnDetailedErrorCodeChanged(); + /// + /// There are no comments for Property DetailedSource in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DetailedSource + { + get + { + return this._DetailedSource; + } + set + { + this.OnDetailedSourceChanging(value); + this._DetailedSource = value; + this.OnDetailedSourceChanged(); + this.OnPropertyChanged("DetailedSource"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DetailedSource; + partial void OnDetailedSourceChanging(string value); + partial void OnDetailedSourceChanged(); + /// + /// There are no comments for Property DisplayableErrorCode in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable DisplayableErrorCode + { + get + { + return this._DisplayableErrorCode; + } + set + { + this.OnDisplayableErrorCodeChanging(value); + this._DisplayableErrorCode = value; + this.OnDisplayableErrorCodeChanged(); + this.OnPropertyChanged("DisplayableErrorCode"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _DisplayableErrorCode; + partial void OnDisplayableErrorCodeChanging(global::System.Nullable value); + partial void OnDisplayableErrorCodeChanged(); + /// + /// There are no comments for Property ErrorCodeString in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ErrorCodeString + { + get + { + return this._ErrorCodeString; + } + set + { + this.OnErrorCodeStringChanging(value); + this._ErrorCodeString = value; + this.OnErrorCodeStringChanged(); + this.OnPropertyChanged("ErrorCodeString"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ErrorCodeString; + partial void OnErrorCodeStringChanging(string value); + partial void OnErrorCodeStringChanged(); + /// + /// There are no comments for Property ErrorType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ErrorType + { + get + { + return this._ErrorType; + } + set + { + this.OnErrorTypeChanging(value); + this._ErrorType = value; + this.OnErrorTypeChanged(); + this.OnPropertyChanged("ErrorType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ErrorType; + partial void OnErrorTypeChanging(string value); + partial void OnErrorTypeChanged(); + /// + /// There are no comments for Property ExceptionDetails in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ExceptionDetails + { + get + { + return this._ExceptionDetails; + } + set + { + this.OnExceptionDetailsChanging(value); + this._ExceptionDetails = value; + this.OnExceptionDetailsChanged(); + this.OnPropertyChanged("ExceptionDetails"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ExceptionDetails; + partial void OnExceptionDetailsChanging(string value); + partial void OnExceptionDetailsChanged(); + /// + /// There are no comments for Property IsConditionallyTerminating in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsConditionallyTerminating + { + get + { + return this._IsConditionallyTerminating; + } + set + { + this.OnIsConditionallyTerminatingChanging(value); + this._IsConditionallyTerminating = value; + this.OnIsConditionallyTerminatingChanged(); + this.OnPropertyChanged("IsConditionallyTerminating"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsConditionallyTerminating; + partial void OnIsConditionallyTerminatingChanging(global::System.Nullable value); + partial void OnIsConditionallyTerminatingChanged(); + /// + /// There are no comments for Property IsDeploymentBlocker in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsDeploymentBlocker + { + get + { + return this._IsDeploymentBlocker; + } + set + { + this.OnIsDeploymentBlockerChanging(value); + this._IsDeploymentBlocker = value; + this.OnIsDeploymentBlockerChanged(); + this.OnPropertyChanged("IsDeploymentBlocker"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsDeploymentBlocker; + partial void OnIsDeploymentBlockerChanging(global::System.Nullable value); + partial void OnIsDeploymentBlockerChanged(); + /// + /// There are no comments for Property IsMomAlert in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsMomAlert + { + get + { + return this._IsMomAlert; + } + set + { + this.OnIsMomAlertChanging(value); + this._IsMomAlert = value; + this.OnIsMomAlertChanged(); + this.OnPropertyChanged("IsMomAlert"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsMomAlert; + partial void OnIsMomAlertChanging(global::System.Nullable value); + partial void OnIsMomAlertChanged(); + /// + /// There are no comments for Property IsSuccess in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsSuccess + { + get + { + return this._IsSuccess; + } + set + { + this.OnIsSuccessChanging(value); + this._IsSuccess = value; + this.OnIsSuccessChanged(); + this.OnPropertyChanged("IsSuccess"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsSuccess; + partial void OnIsSuccessChanging(global::System.Nullable value); + partial void OnIsSuccessChanged(); + /// + /// There are no comments for Property IsTerminating in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsTerminating + { + get + { + return this._IsTerminating; + } + set + { + this.OnIsTerminatingChanging(value); + this._IsTerminating = value; + this.OnIsTerminatingChanged(); + this.OnPropertyChanged("IsTerminating"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsTerminating; + partial void OnIsTerminatingChanging(global::System.Nullable value); + partial void OnIsTerminatingChanged(); + /// + /// There are no comments for Property MessageParameters in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string MessageParameters + { + get + { + return this._MessageParameters; + } + set + { + this.OnMessageParametersChanging(value); + this._MessageParameters = value; + this.OnMessageParametersChanged(); + this.OnPropertyChanged("MessageParameters"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _MessageParameters; + partial void OnMessageParametersChanging(string value); + partial void OnMessageParametersChanged(); + /// + /// There are no comments for Property MomAlertSeverity in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string MomAlertSeverity + { + get + { + return this._MomAlertSeverity; + } + set + { + this.OnMomAlertSeverityChanging(value); + this._MomAlertSeverity = value; + this.OnMomAlertSeverityChanged(); + this.OnPropertyChanged("MomAlertSeverity"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _MomAlertSeverity; + partial void OnMomAlertSeverityChanging(string value); + partial void OnMomAlertSeverityChanged(); + /// + /// There are no comments for Property Problem in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Problem + { + get + { + return this._Problem; + } + set + { + this.OnProblemChanging(value); + this._Problem = value; + this.OnProblemChanged(); + this.OnPropertyChanged("Problem"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Problem; + partial void OnProblemChanging(string value); + partial void OnProblemChanged(); + /// + /// There are no comments for Property RecommendedAction in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string RecommendedAction + { + get + { + return this._RecommendedAction; + } + set + { + this.OnRecommendedActionChanging(value); + this._RecommendedAction = value; + this.OnRecommendedActionChanged(); + this.OnPropertyChanged("RecommendedAction"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _RecommendedAction; + partial void OnRecommendedActionChanging(string value); + partial void OnRecommendedActionChanged(); + /// + /// There are no comments for Property RecommendedActionCLI in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string RecommendedActionCLI + { + get + { + return this._RecommendedActionCLI; + } + set + { + this.OnRecommendedActionCLIChanging(value); + this._RecommendedActionCLI = value; + this.OnRecommendedActionCLIChanged(); + this.OnPropertyChanged("RecommendedActionCLI"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _RecommendedActionCLI; + partial void OnRecommendedActionCLIChanging(string value); + partial void OnRecommendedActionCLIChanged(); + /// + /// There are no comments for Property ShowDetailedError in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ShowDetailedError + { + get + { + return this._ShowDetailedError; + } + set + { + this.OnShowDetailedErrorChanging(value); + this._ShowDetailedError = value; + this.OnShowDetailedErrorChanged(); + this.OnPropertyChanged("ShowDetailedError"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ShowDetailedError; + partial void OnShowDetailedErrorChanging(global::System.Nullable value); + partial void OnShowDetailedErrorChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType VMM.NewVMVirtualNetworkAdapterInput in the schema. + /// + public partial class NewVMVirtualNetworkAdapterInput : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// There are no comments for Property VMNetworkName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string VMNetworkName + { + get + { + return this._VMNetworkName; + } + set + { + this.OnVMNetworkNameChanging(value); + this._VMNetworkName = value; + this.OnVMNetworkNameChanged(); + this.OnPropertyChanged("VMNetworkName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _VMNetworkName; + partial void OnVMNetworkNameChanging(string value); + partial void OnVMNetworkNameChanged(); + /// + /// There are no comments for Property MACAddressType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string MACAddressType + { + get + { + return this._MACAddressType; + } + set + { + this.OnMACAddressTypeChanging(value); + this._MACAddressType = value; + this.OnMACAddressTypeChanged(); + this.OnPropertyChanged("MACAddressType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _MACAddressType; + partial void OnMACAddressTypeChanging(string value); + partial void OnMACAddressTypeChanged(); + /// + /// There are no comments for Property MACAddress in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string MACAddress + { + get + { + return this._MACAddress; + } + set + { + this.OnMACAddressChanging(value); + this._MACAddress = value; + this.OnMACAddressChanged(); + this.OnPropertyChanged("MACAddress"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _MACAddress; + partial void OnMACAddressChanging(string value); + partial void OnMACAddressChanged(); + /// + /// There are no comments for Property IPv4AddressType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string IPv4AddressType + { + get + { + return this._IPv4AddressType; + } + set + { + this.OnIPv4AddressTypeChanging(value); + this._IPv4AddressType = value; + this.OnIPv4AddressTypeChanged(); + this.OnPropertyChanged("IPv4AddressType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _IPv4AddressType; + partial void OnIPv4AddressTypeChanging(string value); + partial void OnIPv4AddressTypeChanged(); + /// + /// There are no comments for Property IPv6AddressType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string IPv6AddressType + { + get + { + return this._IPv6AddressType; + } + set + { + this.OnIPv6AddressTypeChanging(value); + this._IPv6AddressType = value; + this.OnIPv6AddressTypeChanged(); + this.OnPropertyChanged("IPv6AddressType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _IPv6AddressType; + partial void OnIPv6AddressTypeChanging(string value); + partial void OnIPv6AddressTypeChanged(); + /// + /// There are no comments for Property VLanEnabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VLanEnabled + { + get + { + return this._VLanEnabled; + } + set + { + this.OnVLanEnabledChanging(value); + this._VLanEnabled = value; + this.OnVLanEnabledChanged(); + this.OnPropertyChanged("VLanEnabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VLanEnabled; + partial void OnVLanEnabledChanging(global::System.Nullable value); + partial void OnVLanEnabledChanged(); + /// + /// There are no comments for Property VLanId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VLanId + { + get + { + return this._VLanId; + } + set + { + this.OnVLanIdChanging(value); + this._VLanId = value; + this.OnVLanIdChanged(); + this.OnPropertyChanged("VLanId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VLanId; + partial void OnVLanIdChanging(global::System.Nullable value); + partial void OnVLanIdChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.VirtualMachine in the schema. + /// + /// + /// ID + /// StampId + /// + [global::System.Data.Services.Common.EntitySetAttribute("VirtualMachines")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ID", "StampId")] + public partial class VirtualMachine : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// There are no comments for Property AddedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable AddedTime + { + get + { + return this._AddedTime; + } + set + { + this.OnAddedTimeChanging(value); + this._AddedTime = value; + this.OnAddedTimeChanged(); + this.OnPropertyChanged("AddedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _AddedTime; + partial void OnAddedTimeChanging(global::System.Nullable value); + partial void OnAddedTimeChanged(); + /// + /// There are no comments for Property Agent in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Agent + { + get + { + return this._Agent; + } + set + { + this.OnAgentChanging(value); + this._Agent = value; + this.OnAgentChanged(); + this.OnPropertyChanged("Agent"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Agent; + partial void OnAgentChanging(global::System.Nullable value); + partial void OnAgentChanged(); + /// + /// There are no comments for Property AllocatedGPU in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string AllocatedGPU + { + get + { + return this._AllocatedGPU; + } + set + { + this.OnAllocatedGPUChanging(value); + this._AllocatedGPU = value; + this.OnAllocatedGPUChanged(); + this.OnPropertyChanged("AllocatedGPU"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _AllocatedGPU; + partial void OnAllocatedGPUChanging(string value); + partial void OnAllocatedGPUChanged(); + /// + /// There are no comments for Property BackupEnabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable BackupEnabled + { + get + { + return this._BackupEnabled; + } + set + { + this.OnBackupEnabledChanging(value); + this._BackupEnabled = value; + this.OnBackupEnabledChanged(); + this.OnPropertyChanged("BackupEnabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _BackupEnabled; + partial void OnBackupEnabledChanging(global::System.Nullable value); + partial void OnBackupEnabledChanged(); + /// + /// There are no comments for Property BlockLiveMigrationIfHostBusy in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable BlockLiveMigrationIfHostBusy + { + get + { + return this._BlockLiveMigrationIfHostBusy; + } + set + { + this.OnBlockLiveMigrationIfHostBusyChanging(value); + this._BlockLiveMigrationIfHostBusy = value; + this.OnBlockLiveMigrationIfHostBusyChanged(); + this.OnPropertyChanged("BlockLiveMigrationIfHostBusy"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _BlockLiveMigrationIfHostBusy; + partial void OnBlockLiveMigrationIfHostBusyChanging(global::System.Nullable value); + partial void OnBlockLiveMigrationIfHostBusyChanged(); + /// + /// There are no comments for Property CanVMConnect in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CanVMConnect + { + get + { + return this._CanVMConnect; + } + set + { + this.OnCanVMConnectChanging(value); + this._CanVMConnect = value; + this.OnCanVMConnectChanged(); + this.OnPropertyChanged("CanVMConnect"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CanVMConnect; + partial void OnCanVMConnectChanging(global::System.Nullable value); + partial void OnCanVMConnectChanged(); + /// + /// There are no comments for Property CheckpointLocation in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string CheckpointLocation + { + get + { + return this._CheckpointLocation; + } + set + { + this.OnCheckpointLocationChanging(value); + this._CheckpointLocation = value; + this.OnCheckpointLocationChanged(); + this.OnPropertyChanged("CheckpointLocation"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _CheckpointLocation; + partial void OnCheckpointLocationChanging(string value); + partial void OnCheckpointLocationChanged(); + /// + /// There are no comments for Property CloudId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CloudId + { + get + { + return this._CloudId; + } + set + { + this.OnCloudIdChanging(value); + this._CloudId = value; + this.OnCloudIdChanged(); + this.OnPropertyChanged("CloudId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CloudId; + partial void OnCloudIdChanging(global::System.Nullable value); + partial void OnCloudIdChanged(); + /// + /// There are no comments for Property ComputerName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ComputerName + { + get + { + return this._ComputerName; + } + set + { + this.OnComputerNameChanging(value); + this._ComputerName = value; + this.OnComputerNameChanged(); + this.OnPropertyChanged("ComputerName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ComputerName; + partial void OnComputerNameChanging(string value); + partial void OnComputerNameChanged(); + /// + /// There are no comments for Property ComputerTierId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ComputerTierId + { + get + { + return this._ComputerTierId; + } + set + { + this.OnComputerTierIdChanging(value); + this._ComputerTierId = value; + this.OnComputerTierIdChanged(); + this.OnPropertyChanged("ComputerTierId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ComputerTierId; + partial void OnComputerTierIdChanging(global::System.Nullable value); + partial void OnComputerTierIdChanged(); + /// + /// There are no comments for Property CostCenter in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string CostCenter + { + get + { + return this._CostCenter; + } + set + { + this.OnCostCenterChanging(value); + this._CostCenter = value; + this.OnCostCenterChanged(); + this.OnPropertyChanged("CostCenter"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _CostCenter; + partial void OnCostCenterChanging(string value); + partial void OnCostCenterChanged(); + /// + /// There are no comments for Property CPUCount in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CPUCount + { + get + { + return this._CPUCount; + } + set + { + this.OnCPUCountChanging(value); + this._CPUCount = value; + this.OnCPUCountChanged(); + this.OnPropertyChanged("CPUCount"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CPUCount; + partial void OnCPUCountChanging(global::System.Nullable value); + partial void OnCPUCountChanged(); + /// + /// There are no comments for Property CPUMax in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CPUMax + { + get + { + return this._CPUMax; + } + set + { + this.OnCPUMaxChanging(value); + this._CPUMax = value; + this.OnCPUMaxChanged(); + this.OnPropertyChanged("CPUMax"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CPUMax; + partial void OnCPUMaxChanging(global::System.Nullable value); + partial void OnCPUMaxChanged(); + /// + /// There are no comments for Property CPUReserve in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CPUReserve + { + get + { + return this._CPUReserve; + } + set + { + this.OnCPUReserveChanging(value); + this._CPUReserve = value; + this.OnCPUReserveChanged(); + this.OnPropertyChanged("CPUReserve"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CPUReserve; + partial void OnCPUReserveChanging(global::System.Nullable value); + partial void OnCPUReserveChanged(); + /// + /// There are no comments for Property CPUType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string CPUType + { + get + { + return this._CPUType; + } + set + { + this.OnCPUTypeChanging(value); + this._CPUType = value; + this.OnCPUTypeChanged(); + this.OnPropertyChanged("CPUType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _CPUType; + partial void OnCPUTypeChanging(string value); + partial void OnCPUTypeChanged(); + /// + /// There are no comments for Property CPUUtilization in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CPUUtilization + { + get + { + return this._CPUUtilization; + } + set + { + this.OnCPUUtilizationChanging(value); + this._CPUUtilization = value; + this.OnCPUUtilizationChanged(); + this.OnPropertyChanged("CPUUtilization"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CPUUtilization; + partial void OnCPUUtilizationChanging(global::System.Nullable value); + partial void OnCPUUtilizationChanged(); + /// + /// There are no comments for Property CreationSource in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string CreationSource + { + get + { + return this._CreationSource; + } + set + { + this.OnCreationSourceChanging(value); + this._CreationSource = value; + this.OnCreationSourceChanged(); + this.OnPropertyChanged("CreationSource"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _CreationSource; + partial void OnCreationSourceChanging(string value); + partial void OnCreationSourceChanged(); + /// + /// There are no comments for Property CreationTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CreationTime + { + get + { + return this._CreationTime; + } + set + { + this.OnCreationTimeChanging(value); + this._CreationTime = value; + this.OnCreationTimeChanged(); + this.OnPropertyChanged("CreationTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CreationTime; + partial void OnCreationTimeChanging(global::System.Nullable value); + partial void OnCreationTimeChanged(); + /// + /// There are no comments for Property DataExchangeEnabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable DataExchangeEnabled + { + get + { + return this._DataExchangeEnabled; + } + set + { + this.OnDataExchangeEnabledChanging(value); + this._DataExchangeEnabled = value; + this.OnDataExchangeEnabledChanged(); + this.OnPropertyChanged("DataExchangeEnabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _DataExchangeEnabled; + partial void OnDataExchangeEnabledChanging(global::System.Nullable value); + partial void OnDataExchangeEnabledChanged(); + /// + /// There are no comments for Property DelayStart in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable DelayStart + { + get + { + return this._DelayStart; + } + set + { + this.OnDelayStartChanging(value); + this._DelayStart = value; + this.OnDelayStartChanged(); + this.OnPropertyChanged("DelayStart"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _DelayStart; + partial void OnDelayStartChanging(global::System.Nullable value); + partial void OnDelayStartChanged(); + /// + /// There are no comments for Property DeployPath in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DeployPath + { + get + { + return this._DeployPath; + } + set + { + this.OnDeployPathChanging(value); + this._DeployPath = value; + this.OnDeployPathChanged(); + this.OnPropertyChanged("DeployPath"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DeployPath; + partial void OnDeployPathChanging(string value); + partial void OnDeployPathChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property DiskIO in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable DiskIO + { + get + { + return this._DiskIO; + } + set + { + this.OnDiskIOChanging(value); + this._DiskIO = value; + this.OnDiskIOChanged(); + this.OnPropertyChanged("DiskIO"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _DiskIO; + partial void OnDiskIOChanging(global::System.Nullable value); + partial void OnDiskIOChanged(); + /// + /// There are no comments for Property Dismiss in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Dismiss + { + get + { + return this._Dismiss; + } + set + { + this.OnDismissChanging(value); + this._Dismiss = value; + this.OnDismissChanged(); + this.OnPropertyChanged("Dismiss"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Dismiss; + partial void OnDismissChanging(global::System.Nullable value); + partial void OnDismissChanged(); + /// + /// There are no comments for Property DynamicMemoryDemandMB in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable DynamicMemoryDemandMB + { + get + { + return this._DynamicMemoryDemandMB; + } + set + { + this.OnDynamicMemoryDemandMBChanging(value); + this._DynamicMemoryDemandMB = value; + this.OnDynamicMemoryDemandMBChanged(); + this.OnPropertyChanged("DynamicMemoryDemandMB"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _DynamicMemoryDemandMB; + partial void OnDynamicMemoryDemandMBChanging(global::System.Nullable value); + partial void OnDynamicMemoryDemandMBChanged(); + /// + /// There are no comments for Property Enabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Enabled + { + get + { + return this._Enabled; + } + set + { + this.OnEnabledChanging(value); + this._Enabled = value; + this.OnEnabledChanged(); + this.OnPropertyChanged("Enabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Enabled; + partial void OnEnabledChanging(global::System.Nullable value); + partial void OnEnabledChanged(); + /// + /// There are no comments for Property ExcludeFromPRO in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ExcludeFromPRO + { + get + { + return this._ExcludeFromPRO; + } + set + { + this.OnExcludeFromPROChanging(value); + this._ExcludeFromPRO = value; + this.OnExcludeFromPROChanged(); + this.OnPropertyChanged("ExcludeFromPRO"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ExcludeFromPRO; + partial void OnExcludeFromPROChanging(global::System.Nullable value); + partial void OnExcludeFromPROChanged(); + /// + /// There are no comments for Property ExpectedCPUUtilization in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ExpectedCPUUtilization + { + get + { + return this._ExpectedCPUUtilization; + } + set + { + this.OnExpectedCPUUtilizationChanging(value); + this._ExpectedCPUUtilization = value; + this.OnExpectedCPUUtilizationChanged(); + this.OnPropertyChanged("ExpectedCPUUtilization"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ExpectedCPUUtilization; + partial void OnExpectedCPUUtilizationChanging(global::System.Nullable value); + partial void OnExpectedCPUUtilizationChanged(); + /// + /// There are no comments for Property FailedJobID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable FailedJobID + { + get + { + return this._FailedJobID; + } + set + { + this.OnFailedJobIDChanging(value); + this._FailedJobID = value; + this.OnFailedJobIDChanged(); + this.OnPropertyChanged("FailedJobID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _FailedJobID; + partial void OnFailedJobIDChanging(global::System.Nullable value); + partial void OnFailedJobIDChanged(); + /// + /// There are no comments for Property HasPassthroughDisk in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable HasPassthroughDisk + { + get + { + return this._HasPassthroughDisk; + } + set + { + this.OnHasPassthroughDiskChanging(value); + this._HasPassthroughDisk = value; + this.OnHasPassthroughDiskChanged(); + this.OnPropertyChanged("HasPassthroughDisk"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _HasPassthroughDisk; + partial void OnHasPassthroughDiskChanging(global::System.Nullable value); + partial void OnHasPassthroughDiskChanged(); + /// + /// There are no comments for Property HasSavedState in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable HasSavedState + { + get + { + return this._HasSavedState; + } + set + { + this.OnHasSavedStateChanging(value); + this._HasSavedState = value; + this.OnHasSavedStateChanged(); + this.OnPropertyChanged("HasSavedState"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _HasSavedState; + partial void OnHasSavedStateChanging(global::System.Nullable value); + partial void OnHasSavedStateChanged(); + /// + /// There are no comments for Property HasVMAdditions in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable HasVMAdditions + { + get + { + return this._HasVMAdditions; + } + set + { + this.OnHasVMAdditionsChanging(value); + this._HasVMAdditions = value; + this.OnHasVMAdditionsChanged(); + this.OnPropertyChanged("HasVMAdditions"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _HasVMAdditions; + partial void OnHasVMAdditionsChanging(global::System.Nullable value); + partial void OnHasVMAdditionsChanged(); + /// + /// There are no comments for Property HeartbeatEnabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable HeartbeatEnabled + { + get + { + return this._HeartbeatEnabled; + } + set + { + this.OnHeartbeatEnabledChanging(value); + this._HeartbeatEnabled = value; + this.OnHeartbeatEnabledChanged(); + this.OnPropertyChanged("HeartbeatEnabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _HeartbeatEnabled; + partial void OnHeartbeatEnabledChanging(global::System.Nullable value); + partial void OnHeartbeatEnabledChanged(); + /// + /// There are no comments for Property HighlyAvailable in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable HighlyAvailable + { + get + { + return this._HighlyAvailable; + } + set + { + this.OnHighlyAvailableChanging(value); + this._HighlyAvailable = value; + this.OnHighlyAvailableChanged(); + this.OnPropertyChanged("HighlyAvailable"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _HighlyAvailable; + partial void OnHighlyAvailableChanging(global::System.Nullable value); + partial void OnHighlyAvailableChanged(); + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this._ID = value; + this.OnIDChanged(); + this.OnPropertyChanged("ID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ID; + partial void OnIDChanging(global::System.Guid value); + partial void OnIDChanged(); + /// + /// There are no comments for Property IsFaultTolerant in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsFaultTolerant + { + get + { + return this._IsFaultTolerant; + } + set + { + this.OnIsFaultTolerantChanging(value); + this._IsFaultTolerant = value; + this.OnIsFaultTolerantChanged(); + this.OnPropertyChanged("IsFaultTolerant"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsFaultTolerant; + partial void OnIsFaultTolerantChanging(global::System.Nullable value); + partial void OnIsFaultTolerantChanged(); + /// + /// There are no comments for Property IsHighlyAvailable in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsHighlyAvailable + { + get + { + return this._IsHighlyAvailable; + } + set + { + this.OnIsHighlyAvailableChanging(value); + this._IsHighlyAvailable = value; + this.OnIsHighlyAvailableChanged(); + this.OnPropertyChanged("IsHighlyAvailable"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsHighlyAvailable; + partial void OnIsHighlyAvailableChanging(global::System.Nullable value); + partial void OnIsHighlyAvailableChanged(); + /// + /// There are no comments for Property IsUndergoingLiveMigration in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsUndergoingLiveMigration + { + get + { + return this._IsUndergoingLiveMigration; + } + set + { + this.OnIsUndergoingLiveMigrationChanging(value); + this._IsUndergoingLiveMigration = value; + this.OnIsUndergoingLiveMigrationChanged(); + this.OnPropertyChanged("IsUndergoingLiveMigration"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsUndergoingLiveMigration; + partial void OnIsUndergoingLiveMigrationChanging(global::System.Nullable value); + partial void OnIsUndergoingLiveMigrationChanged(); + /// + /// There are no comments for Property LastRestoredCheckpointId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable LastRestoredCheckpointId + { + get + { + return this._LastRestoredCheckpointId; + } + set + { + this.OnLastRestoredCheckpointIdChanging(value); + this._LastRestoredCheckpointId = value; + this.OnLastRestoredCheckpointIdChanged(); + this.OnPropertyChanged("LastRestoredCheckpointId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _LastRestoredCheckpointId; + partial void OnLastRestoredCheckpointIdChanging(global::System.Nullable value); + partial void OnLastRestoredCheckpointIdChanged(); + /// + /// There are no comments for Property LibraryGroup in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string LibraryGroup + { + get + { + return this._LibraryGroup; + } + set + { + this.OnLibraryGroupChanging(value); + this._LibraryGroup = value; + this.OnLibraryGroupChanged(); + this.OnPropertyChanged("LibraryGroup"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _LibraryGroup; + partial void OnLibraryGroupChanging(string value); + partial void OnLibraryGroupChanged(); + /// + /// There are no comments for Property LimitCPUForMigration in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable LimitCPUForMigration + { + get + { + return this._LimitCPUForMigration; + } + set + { + this.OnLimitCPUForMigrationChanging(value); + this._LimitCPUForMigration = value; + this.OnLimitCPUForMigrationChanged(); + this.OnPropertyChanged("LimitCPUForMigration"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _LimitCPUForMigration; + partial void OnLimitCPUForMigrationChanging(global::System.Nullable value); + partial void OnLimitCPUForMigrationChanged(); + /// + /// There are no comments for Property LimitCPUFunctionality in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable LimitCPUFunctionality + { + get + { + return this._LimitCPUFunctionality; + } + set + { + this.OnLimitCPUFunctionalityChanging(value); + this._LimitCPUFunctionality = value; + this.OnLimitCPUFunctionalityChanged(); + this.OnPropertyChanged("LimitCPUFunctionality"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _LimitCPUFunctionality; + partial void OnLimitCPUFunctionalityChanging(global::System.Nullable value); + partial void OnLimitCPUFunctionalityChanged(); + /// + /// There are no comments for Property VMNetworkAssignments in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection VMNetworkAssignments + { + get + { + return this._VMNetworkAssignments; + } + set + { + this.OnVMNetworkAssignmentsChanging(value); + this._VMNetworkAssignments = value; + this.OnVMNetworkAssignmentsChanged(); + this.OnPropertyChanged("VMNetworkAssignments"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _VMNetworkAssignments = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnVMNetworkAssignmentsChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnVMNetworkAssignmentsChanged(); + /// + /// There are no comments for Property Location in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Location + { + get + { + return this._Location; + } + set + { + this.OnLocationChanging(value); + this._Location = value; + this.OnLocationChanged(); + this.OnPropertyChanged("Location"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Location; + partial void OnLocationChanging(string value); + partial void OnLocationChanged(); + /// + /// There are no comments for Property MarkedAsTemplate in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MarkedAsTemplate + { + get + { + return this._MarkedAsTemplate; + } + set + { + this.OnMarkedAsTemplateChanging(value); + this._MarkedAsTemplate = value; + this.OnMarkedAsTemplateChanged(); + this.OnPropertyChanged("MarkedAsTemplate"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MarkedAsTemplate; + partial void OnMarkedAsTemplateChanging(global::System.Nullable value); + partial void OnMarkedAsTemplateChanged(); + /// + /// There are no comments for Property Memory in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Memory + { + get + { + return this._Memory; + } + set + { + this.OnMemoryChanging(value); + this._Memory = value; + this.OnMemoryChanged(); + this.OnPropertyChanged("Memory"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Memory; + partial void OnMemoryChanging(global::System.Nullable value); + partial void OnMemoryChanged(); + /// + /// There are no comments for Property MemoryAssignedMB in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MemoryAssignedMB + { + get + { + return this._MemoryAssignedMB; + } + set + { + this.OnMemoryAssignedMBChanging(value); + this._MemoryAssignedMB = value; + this.OnMemoryAssignedMBChanged(); + this.OnPropertyChanged("MemoryAssignedMB"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MemoryAssignedMB; + partial void OnMemoryAssignedMBChanging(global::System.Nullable value); + partial void OnMemoryAssignedMBChanged(); + /// + /// There are no comments for Property MemoryAvailablePercentage in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MemoryAvailablePercentage + { + get + { + return this._MemoryAvailablePercentage; + } + set + { + this.OnMemoryAvailablePercentageChanging(value); + this._MemoryAvailablePercentage = value; + this.OnMemoryAvailablePercentageChanged(); + this.OnPropertyChanged("MemoryAvailablePercentage"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MemoryAvailablePercentage; + partial void OnMemoryAvailablePercentageChanging(global::System.Nullable value); + partial void OnMemoryAvailablePercentageChanged(); + /// + /// There are no comments for Property ModifiedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ModifiedTime + { + get + { + return this._ModifiedTime; + } + set + { + this.OnModifiedTimeChanging(value); + this._ModifiedTime = value; + this.OnModifiedTimeChanged(); + this.OnPropertyChanged("ModifiedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ModifiedTime; + partial void OnModifiedTimeChanging(global::System.Nullable value); + partial void OnModifiedTimeChanged(); + /// + /// There are no comments for Property MostRecentTaskId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MostRecentTaskId + { + get + { + return this._MostRecentTaskId; + } + set + { + this.OnMostRecentTaskIdChanging(value); + this._MostRecentTaskId = value; + this.OnMostRecentTaskIdChanged(); + this.OnPropertyChanged("MostRecentTaskId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MostRecentTaskId; + partial void OnMostRecentTaskIdChanging(global::System.Nullable value); + partial void OnMostRecentTaskIdChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property NetworkUtilization in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable NetworkUtilization + { + get + { + return this._NetworkUtilization; + } + set + { + this.OnNetworkUtilizationChanging(value); + this._NetworkUtilization = value; + this.OnNetworkUtilizationChanged(); + this.OnPropertyChanged("NetworkUtilization"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _NetworkUtilization; + partial void OnNetworkUtilizationChanging(global::System.Nullable value); + partial void OnNetworkUtilizationChanged(); + /// + /// There are no comments for Property NumLock in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable NumLock + { + get + { + return this._NumLock; + } + set + { + this.OnNumLockChanging(value); + this._NumLock = value; + this.OnNumLockChanged(); + this.OnPropertyChanged("NumLock"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _NumLock; + partial void OnNumLockChanging(global::System.Nullable value); + partial void OnNumLockChanged(); + /// + /// There are no comments for Property OperatingSystem in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string OperatingSystem + { + get + { + return this._OperatingSystem; + } + set + { + this.OnOperatingSystemChanging(value); + this._OperatingSystem = value; + this.OnOperatingSystemChanged(); + this.OnPropertyChanged("OperatingSystem"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _OperatingSystem; + partial void OnOperatingSystemChanging(string value); + partial void OnOperatingSystemChanged(); + /// + /// There are no comments for Property OperatingSystemInstance in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public OperatingSystem OperatingSystemInstance + { + get + { + if (((this._OperatingSystemInstance == null) + && (this._OperatingSystemInstanceInitialized != true))) + { + this._OperatingSystemInstance = new OperatingSystem(); + this._OperatingSystemInstanceInitialized = true; + } + return this._OperatingSystemInstance; + } + set + { + this.OnOperatingSystemInstanceChanging(value); + this._OperatingSystemInstance = value; + this._OperatingSystemInstanceInitialized = true; + this.OnOperatingSystemInstanceChanged(); + this.OnPropertyChanged("OperatingSystemInstance"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private OperatingSystem _OperatingSystemInstance; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _OperatingSystemInstanceInitialized; + partial void OnOperatingSystemInstanceChanging(OperatingSystem value); + partial void OnOperatingSystemInstanceChanged(); + /// + /// There are no comments for Property OperatingSystemShutdownEnabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable OperatingSystemShutdownEnabled + { + get + { + return this._OperatingSystemShutdownEnabled; + } + set + { + this.OnOperatingSystemShutdownEnabledChanging(value); + this._OperatingSystemShutdownEnabled = value; + this.OnOperatingSystemShutdownEnabledChanged(); + this.OnPropertyChanged("OperatingSystemShutdownEnabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _OperatingSystemShutdownEnabled; + partial void OnOperatingSystemShutdownEnabledChanging(global::System.Nullable value); + partial void OnOperatingSystemShutdownEnabledChanged(); + /// + /// There are no comments for Property Operation in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Operation + { + get + { + return this._Operation; + } + set + { + this.OnOperationChanging(value); + this._Operation = value; + this.OnOperationChanged(); + this.OnPropertyChanged("Operation"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Operation; + partial void OnOperationChanging(string value); + partial void OnOperationChanged(); + /// + /// There are no comments for Property Owner in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public UserAndRole Owner + { + get + { + if (((this._Owner == null) + && (this._OwnerInitialized != true))) + { + this._Owner = new UserAndRole(); + this._OwnerInitialized = true; + } + return this._Owner; + } + set + { + this.OnOwnerChanging(value); + this._Owner = value; + this._OwnerInitialized = true; + this.OnOwnerChanged(); + this.OnPropertyChanged("Owner"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private UserAndRole _Owner; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _OwnerInitialized; + partial void OnOwnerChanging(UserAndRole value); + partial void OnOwnerChanged(); + /// + /// There are no comments for Property GrantedToList in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection GrantedToList + { + get + { + return this._GrantedToList; + } + set + { + this.OnGrantedToListChanging(value); + this._GrantedToList = value; + this.OnGrantedToListChanged(); + this.OnPropertyChanged("GrantedToList"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _GrantedToList = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnGrantedToListChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnGrantedToListChanged(); + /// + /// There are no comments for Property Path in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Path + { + get + { + return this._Path; + } + set + { + this.OnPathChanging(value); + this._Path = value; + this.OnPathChanged(); + this.OnPropertyChanged("Path"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Path; + partial void OnPathChanging(string value); + partial void OnPathChanged(); + /// + /// There are no comments for Property PerfCPUUtilization in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable PerfCPUUtilization + { + get + { + return this._PerfCPUUtilization; + } + set + { + this.OnPerfCPUUtilizationChanging(value); + this._PerfCPUUtilization = value; + this.OnPerfCPUUtilizationChanged(); + this.OnPropertyChanged("PerfCPUUtilization"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _PerfCPUUtilization; + partial void OnPerfCPUUtilizationChanging(global::System.Nullable value); + partial void OnPerfCPUUtilizationChanged(); + /// + /// There are no comments for Property PerfDiskBytesRead in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable PerfDiskBytesRead + { + get + { + return this._PerfDiskBytesRead; + } + set + { + this.OnPerfDiskBytesReadChanging(value); + this._PerfDiskBytesRead = value; + this.OnPerfDiskBytesReadChanged(); + this.OnPropertyChanged("PerfDiskBytesRead"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _PerfDiskBytesRead; + partial void OnPerfDiskBytesReadChanging(global::System.Nullable value); + partial void OnPerfDiskBytesReadChanged(); + /// + /// There are no comments for Property PerfDiskBytesWrite in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable PerfDiskBytesWrite + { + get + { + return this._PerfDiskBytesWrite; + } + set + { + this.OnPerfDiskBytesWriteChanging(value); + this._PerfDiskBytesWrite = value; + this.OnPerfDiskBytesWriteChanged(); + this.OnPropertyChanged("PerfDiskBytesWrite"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _PerfDiskBytesWrite; + partial void OnPerfDiskBytesWriteChanging(global::System.Nullable value); + partial void OnPerfDiskBytesWriteChanged(); + /// + /// There are no comments for Property PerfNetworkBytesRead in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable PerfNetworkBytesRead + { + get + { + return this._PerfNetworkBytesRead; + } + set + { + this.OnPerfNetworkBytesReadChanging(value); + this._PerfNetworkBytesRead = value; + this.OnPerfNetworkBytesReadChanged(); + this.OnPropertyChanged("PerfNetworkBytesRead"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _PerfNetworkBytesRead; + partial void OnPerfNetworkBytesReadChanging(global::System.Nullable value); + partial void OnPerfNetworkBytesReadChanged(); + /// + /// There are no comments for Property PerfNetworkBytesWrite in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable PerfNetworkBytesWrite + { + get + { + return this._PerfNetworkBytesWrite; + } + set + { + this.OnPerfNetworkBytesWriteChanging(value); + this._PerfNetworkBytesWrite = value; + this.OnPerfNetworkBytesWriteChanged(); + this.OnPropertyChanged("PerfNetworkBytesWrite"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _PerfNetworkBytesWrite; + partial void OnPerfNetworkBytesWriteChanging(global::System.Nullable value); + partial void OnPerfNetworkBytesWriteChanged(); + /// + /// There are no comments for Property CPURelativeWeight in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CPURelativeWeight + { + get + { + return this._CPURelativeWeight; + } + set + { + this.OnCPURelativeWeightChanging(value); + this._CPURelativeWeight = value; + this.OnCPURelativeWeightChanged(); + this.OnPropertyChanged("CPURelativeWeight"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CPURelativeWeight; + partial void OnCPURelativeWeightChanging(global::System.Nullable value); + partial void OnCPURelativeWeightChanged(); + /// + /// There are no comments for Property Retry in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Retry + { + get + { + return this._Retry; + } + set + { + this.OnRetryChanging(value); + this._Retry = value; + this.OnRetryChanged(); + this.OnPropertyChanged("Retry"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Retry; + partial void OnRetryChanging(global::System.Nullable value); + partial void OnRetryChanged(); + /// + /// There are no comments for Property RunGuestAccount in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string RunGuestAccount + { + get + { + return this._RunGuestAccount; + } + set + { + this.OnRunGuestAccountChanging(value); + this._RunGuestAccount = value; + this.OnRunGuestAccountChanged(); + this.OnPropertyChanged("RunGuestAccount"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _RunGuestAccount; + partial void OnRunGuestAccountChanging(string value); + partial void OnRunGuestAccountChanged(); + /// + /// There are no comments for Property ServiceDeploymentErrorMessage in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ServiceDeploymentErrorMessage + { + get + { + return this._ServiceDeploymentErrorMessage; + } + set + { + this.OnServiceDeploymentErrorMessageChanging(value); + this._ServiceDeploymentErrorMessage = value; + this.OnServiceDeploymentErrorMessageChanged(); + this.OnPropertyChanged("ServiceDeploymentErrorMessage"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ServiceDeploymentErrorMessage; + partial void OnServiceDeploymentErrorMessageChanging(string value); + partial void OnServiceDeploymentErrorMessageChanged(); + /// + /// There are no comments for Property ServiceId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ServiceId + { + get + { + return this._ServiceId; + } + set + { + this.OnServiceIdChanging(value); + this._ServiceId = value; + this.OnServiceIdChanged(); + this.OnPropertyChanged("ServiceId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ServiceId; + partial void OnServiceIdChanging(global::System.Nullable value); + partial void OnServiceIdChanged(); + /// + /// There are no comments for Property SharePath in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string SharePath + { + get + { + return this._SharePath; + } + set + { + this.OnSharePathChanging(value); + this._SharePath = value; + this.OnSharePathChanged(); + this.OnPropertyChanged("SharePath"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _SharePath; + partial void OnSharePathChanging(string value); + partial void OnSharePathChanged(); + /// + /// There are no comments for Property SourceObjectType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string SourceObjectType + { + get + { + return this._SourceObjectType; + } + set + { + this.OnSourceObjectTypeChanging(value); + this._SourceObjectType = value; + this.OnSourceObjectTypeChanged(); + this.OnPropertyChanged("SourceObjectType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _SourceObjectType; + partial void OnSourceObjectTypeChanging(string value); + partial void OnSourceObjectTypeChanged(); + /// + /// There are no comments for Property StartAction in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string StartAction + { + get + { + return this._StartAction; + } + set + { + this.OnStartActionChanging(value); + this._StartAction = value; + this.OnStartActionChanged(); + this.OnPropertyChanged("StartAction"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _StartAction; + partial void OnStartActionChanging(string value); + partial void OnStartActionChanged(); + /// + /// There are no comments for Property StartVM in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StartVM + { + get + { + return this._StartVM; + } + set + { + this.OnStartVMChanging(value); + this._StartVM = value; + this.OnStartVMChanged(); + this.OnPropertyChanged("StartVM"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StartVM; + partial void OnStartVMChanging(global::System.Nullable value); + partial void OnStartVMChanged(); + /// + /// There are no comments for Property Status in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Status + { + get + { + return this._Status; + } + set + { + this.OnStatusChanging(value); + this._Status = value; + this.OnStatusChanged(); + this.OnPropertyChanged("Status"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Status; + partial void OnStatusChanging(string value); + partial void OnStatusChanged(); + /// + /// There are no comments for Property StatusString in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string StatusString + { + get + { + return this._StatusString; + } + set + { + this.OnStatusStringChanging(value); + this._StatusString = value; + this.OnStatusStringChanged(); + this.OnPropertyChanged("StatusString"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _StatusString; + partial void OnStatusStringChanging(string value); + partial void OnStatusStringChanged(); + /// + /// There are no comments for Property StopAction in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string StopAction + { + get + { + return this._StopAction; + } + set + { + this.OnStopActionChanging(value); + this._StopAction = value; + this.OnStopActionChanged(); + this.OnPropertyChanged("StopAction"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _StopAction; + partial void OnStopActionChanging(string value); + partial void OnStopActionChanged(); + /// + /// There are no comments for Property Tag in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Tag + { + get + { + return this._Tag; + } + set + { + this.OnTagChanging(value); + this._Tag = value; + this.OnTagChanged(); + this.OnPropertyChanged("Tag"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Tag; + partial void OnTagChanging(string value); + partial void OnTagChanged(); + /// + /// There are no comments for Property TimeSynchronizationEnabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable TimeSynchronizationEnabled + { + get + { + return this._TimeSynchronizationEnabled; + } + set + { + this.OnTimeSynchronizationEnabledChanging(value); + this._TimeSynchronizationEnabled = value; + this.OnTimeSynchronizationEnabledChanged(); + this.OnPropertyChanged("TimeSynchronizationEnabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _TimeSynchronizationEnabled; + partial void OnTimeSynchronizationEnabledChanging(global::System.Nullable value); + partial void OnTimeSynchronizationEnabledChanged(); + /// + /// There are no comments for Property TotalSize in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable TotalSize + { + get + { + return this._TotalSize; + } + set + { + this.OnTotalSizeChanging(value); + this._TotalSize = value; + this.OnTotalSizeChanged(); + this.OnPropertyChanged("TotalSize"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _TotalSize; + partial void OnTotalSizeChanging(global::System.Nullable value); + partial void OnTotalSizeChanged(); + /// + /// There are no comments for Property Undo in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Undo + { + get + { + return this._Undo; + } + set + { + this.OnUndoChanging(value); + this._Undo = value; + this.OnUndoChanged(); + this.OnPropertyChanged("Undo"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Undo; + partial void OnUndoChanging(global::System.Nullable value); + partial void OnUndoChanged(); + /// + /// There are no comments for Property UndoDisksEnabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UndoDisksEnabled + { + get + { + return this._UndoDisksEnabled; + } + set + { + this.OnUndoDisksEnabledChanging(value); + this._UndoDisksEnabled = value; + this.OnUndoDisksEnabledChanged(); + this.OnPropertyChanged("UndoDisksEnabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UndoDisksEnabled; + partial void OnUndoDisksEnabledChanging(global::System.Nullable value); + partial void OnUndoDisksEnabledChanged(); + /// + /// There are no comments for Property UpgradeDomain in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UpgradeDomain + { + get + { + return this._UpgradeDomain; + } + set + { + this.OnUpgradeDomainChanging(value); + this._UpgradeDomain = value; + this.OnUpgradeDomainChanged(); + this.OnPropertyChanged("UpgradeDomain"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UpgradeDomain; + partial void OnUpgradeDomainChanging(global::System.Nullable value); + partial void OnUpgradeDomainChanged(); + /// + /// There are no comments for Property UseCluster in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseCluster + { + get + { + return this._UseCluster; + } + set + { + this.OnUseClusterChanging(value); + this._UseCluster = value; + this.OnUseClusterChanged(); + this.OnPropertyChanged("UseCluster"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseCluster; + partial void OnUseClusterChanging(global::System.Nullable value); + partial void OnUseClusterChanged(); + /// + /// There are no comments for Property UseLAN in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseLAN + { + get + { + return this._UseLAN; + } + set + { + this.OnUseLANChanging(value); + this._UseLAN = value; + this.OnUseLANChanged(); + this.OnPropertyChanged("UseLAN"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseLAN; + partial void OnUseLANChanging(global::System.Nullable value); + partial void OnUseLANChanged(); + /// + /// There are no comments for Property VirtualHardDiskId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VirtualHardDiskId + { + get + { + return this._VirtualHardDiskId; + } + set + { + this.OnVirtualHardDiskIdChanging(value); + this._VirtualHardDiskId = value; + this.OnVirtualHardDiskIdChanged(); + this.OnPropertyChanged("VirtualHardDiskId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VirtualHardDiskId; + partial void OnVirtualHardDiskIdChanging(global::System.Nullable value); + partial void OnVirtualHardDiskIdChanged(); + /// + /// There are no comments for Property VirtualizationPlatform in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string VirtualizationPlatform + { + get + { + return this._VirtualizationPlatform; + } + set + { + this.OnVirtualizationPlatformChanging(value); + this._VirtualizationPlatform = value; + this.OnVirtualizationPlatformChanged(); + this.OnPropertyChanged("VirtualizationPlatform"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _VirtualizationPlatform; + partial void OnVirtualizationPlatformChanging(string value); + partial void OnVirtualizationPlatformChanged(); + /// + /// There are no comments for Property CapabilityProfile in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string CapabilityProfile + { + get + { + return this._CapabilityProfile; + } + set + { + this.OnCapabilityProfileChanging(value); + this._CapabilityProfile = value; + this.OnCapabilityProfileChanged(); + this.OnPropertyChanged("CapabilityProfile"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _CapabilityProfile; + partial void OnCapabilityProfileChanging(string value); + partial void OnCapabilityProfileChanged(); + /// + /// There are no comments for Property VMBaseConfigurationId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VMBaseConfigurationId + { + get + { + return this._VMBaseConfigurationId; + } + set + { + this.OnVMBaseConfigurationIdChanging(value); + this._VMBaseConfigurationId = value; + this.OnVMBaseConfigurationIdChanged(); + this.OnPropertyChanged("VMBaseConfigurationId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VMBaseConfigurationId; + partial void OnVMBaseConfigurationIdChanging(global::System.Nullable value); + partial void OnVMBaseConfigurationIdChanged(); + /// + /// There are no comments for Property VMConfigResource in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string VMConfigResource + { + get + { + return this._VMConfigResource; + } + set + { + this.OnVMConfigResourceChanging(value); + this._VMConfigResource = value; + this.OnVMConfigResourceChanged(); + this.OnPropertyChanged("VMConfigResource"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _VMConfigResource; + partial void OnVMConfigResourceChanging(string value); + partial void OnVMConfigResourceChanged(); + /// + /// There are no comments for Property VMCPath in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string VMCPath + { + get + { + return this._VMCPath; + } + set + { + this.OnVMCPathChanging(value); + this._VMCPath = value; + this.OnVMCPathChanged(); + this.OnPropertyChanged("VMCPath"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _VMCPath; + partial void OnVMCPathChanging(string value); + partial void OnVMCPathChanged(); + /// + /// There are no comments for Property VMHostName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string VMHostName + { + get + { + return this._VMHostName; + } + set + { + this.OnVMHostNameChanging(value); + this._VMHostName = value; + this.OnVMHostNameChanged(); + this.OnPropertyChanged("VMHostName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _VMHostName; + partial void OnVMHostNameChanging(string value); + partial void OnVMHostNameChanged(); + /// + /// There are no comments for Property VMId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VMId + { + get + { + return this._VMId; + } + set + { + this.OnVMIdChanging(value); + this._VMId = value; + this.OnVMIdChanged(); + this.OnPropertyChanged("VMId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VMId; + partial void OnVMIdChanging(global::System.Nullable value); + partial void OnVMIdChanged(); + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property VMResource in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string VMResource + { + get + { + return this._VMResource; + } + set + { + this.OnVMResourceChanging(value); + this._VMResource = value; + this.OnVMResourceChanged(); + this.OnPropertyChanged("VMResource"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _VMResource; + partial void OnVMResourceChanging(string value); + partial void OnVMResourceChanged(); + /// + /// There are no comments for Property VMResourceGroup in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string VMResourceGroup + { + get + { + return this._VMResourceGroup; + } + set + { + this.OnVMResourceGroupChanging(value); + this._VMResourceGroup = value; + this.OnVMResourceGroupChanged(); + this.OnPropertyChanged("VMResourceGroup"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _VMResourceGroup; + partial void OnVMResourceGroupChanging(string value); + partial void OnVMResourceGroupChanged(); + /// + /// There are no comments for Property VirtualMachineState in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string VirtualMachineState + { + get + { + return this._VirtualMachineState; + } + set + { + this.OnVirtualMachineStateChanging(value); + this._VirtualMachineState = value; + this.OnVirtualMachineStateChanged(); + this.OnPropertyChanged("VirtualMachineState"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _VirtualMachineState; + partial void OnVirtualMachineStateChanging(string value); + partial void OnVirtualMachineStateChanged(); + /// + /// There are no comments for Property VMTemplateId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VMTemplateId + { + get + { + return this._VMTemplateId; + } + set + { + this.OnVMTemplateIdChanging(value); + this._VMTemplateId = value; + this.OnVMTemplateIdChanged(); + this.OnPropertyChanged("VMTemplateId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VMTemplateId; + partial void OnVMTemplateIdChanging(global::System.Nullable value); + partial void OnVMTemplateIdChanged(); + /// + /// There are no comments for Property HardwareProfileId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable HardwareProfileId + { + get + { + return this._HardwareProfileId; + } + set + { + this.OnHardwareProfileIdChanging(value); + this._HardwareProfileId = value; + this.OnHardwareProfileIdChanged(); + this.OnPropertyChanged("HardwareProfileId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _HardwareProfileId; + partial void OnHardwareProfileIdChanging(global::System.Nullable value); + partial void OnHardwareProfileIdChanged(); + /// + /// There are no comments for Property BlockDynamicOptimization in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable BlockDynamicOptimization + { + get + { + return this._BlockDynamicOptimization; + } + set + { + this.OnBlockDynamicOptimizationChanging(value); + this._BlockDynamicOptimization = value; + this.OnBlockDynamicOptimizationChanged(); + this.OnPropertyChanged("BlockDynamicOptimization"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _BlockDynamicOptimization; + partial void OnBlockDynamicOptimizationChanging(global::System.Nullable value); + partial void OnBlockDynamicOptimizationChanged(); + /// + /// There are no comments for Property CPULimitForMigration in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CPULimitForMigration + { + get + { + return this._CPULimitForMigration; + } + set + { + this.OnCPULimitForMigrationChanging(value); + this._CPULimitForMigration = value; + this.OnCPULimitForMigrationChanged(); + this.OnPropertyChanged("CPULimitForMigration"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CPULimitForMigration; + partial void OnCPULimitForMigrationChanging(global::System.Nullable value); + partial void OnCPULimitForMigrationChanged(); + /// + /// There are no comments for Property CPULimitFunctionality in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CPULimitFunctionality + { + get + { + return this._CPULimitFunctionality; + } + set + { + this.OnCPULimitFunctionalityChanging(value); + this._CPULimitFunctionality = value; + this.OnCPULimitFunctionalityChanged(); + this.OnPropertyChanged("CPULimitFunctionality"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CPULimitFunctionality; + partial void OnCPULimitFunctionalityChanging(global::System.Nullable value); + partial void OnCPULimitFunctionalityChanged(); + /// + /// There are no comments for Property Domain in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Domain + { + get + { + return this._Domain; + } + set + { + this.OnDomainChanging(value); + this._Domain = value; + this.OnDomainChanged(); + this.OnPropertyChanged("Domain"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Domain; + partial void OnDomainChanging(string value); + partial void OnDomainChanged(); + /// + /// There are no comments for Property DynamicMemoryBufferPercentage in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable DynamicMemoryBufferPercentage + { + get + { + return this._DynamicMemoryBufferPercentage; + } + set + { + this.OnDynamicMemoryBufferPercentageChanging(value); + this._DynamicMemoryBufferPercentage = value; + this.OnDynamicMemoryBufferPercentageChanged(); + this.OnPropertyChanged("DynamicMemoryBufferPercentage"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _DynamicMemoryBufferPercentage; + partial void OnDynamicMemoryBufferPercentageChanging(global::System.Nullable value); + partial void OnDynamicMemoryBufferPercentageChanged(); + /// + /// There are no comments for Property DynamicMemoryEnabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable DynamicMemoryEnabled + { + get + { + return this._DynamicMemoryEnabled; + } + set + { + this.OnDynamicMemoryEnabledChanging(value); + this._DynamicMemoryEnabled = value; + this.OnDynamicMemoryEnabledChanged(); + this.OnPropertyChanged("DynamicMemoryEnabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _DynamicMemoryEnabled; + partial void OnDynamicMemoryEnabledChanging(global::System.Nullable value); + partial void OnDynamicMemoryEnabledChanged(); + /// + /// There are no comments for Property DynamicMemoryMaximumMB in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable DynamicMemoryMaximumMB + { + get + { + return this._DynamicMemoryMaximumMB; + } + set + { + this.OnDynamicMemoryMaximumMBChanging(value); + this._DynamicMemoryMaximumMB = value; + this.OnDynamicMemoryMaximumMBChanged(); + this.OnPropertyChanged("DynamicMemoryMaximumMB"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _DynamicMemoryMaximumMB; + partial void OnDynamicMemoryMaximumMBChanging(global::System.Nullable value); + partial void OnDynamicMemoryMaximumMBChanged(); + /// + /// There are no comments for Property FullName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string FullName + { + get + { + return this._FullName; + } + set + { + this.OnFullNameChanging(value); + this._FullName = value; + this.OnFullNameChanged(); + this.OnPropertyChanged("FullName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _FullName; + partial void OnFullNameChanging(string value); + partial void OnFullNameChanged(); + /// + /// There are no comments for Property MemoryWeight in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MemoryWeight + { + get + { + return this._MemoryWeight; + } + set + { + this.OnMemoryWeightChanging(value); + this._MemoryWeight = value; + this.OnMemoryWeightChanged(); + this.OnPropertyChanged("MemoryWeight"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MemoryWeight; + partial void OnMemoryWeightChanging(global::System.Nullable value); + partial void OnMemoryWeightChanged(); + /// + /// There are no comments for Property OrganizationName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string OrganizationName + { + get + { + return this._OrganizationName; + } + set + { + this.OnOrganizationNameChanging(value); + this._OrganizationName = value; + this.OnOrganizationNameChanged(); + this.OnPropertyChanged("OrganizationName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _OrganizationName; + partial void OnOrganizationNameChanging(string value); + partial void OnOrganizationNameChanged(); + /// + /// There are no comments for Property DelayStartSeconds in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable DelayStartSeconds + { + get + { + return this._DelayStartSeconds; + } + set + { + this.OnDelayStartSecondsChanging(value); + this._DelayStartSeconds = value; + this.OnDelayStartSecondsChanged(); + this.OnPropertyChanged("DelayStartSeconds"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _DelayStartSeconds; + partial void OnDelayStartSecondsChanging(global::System.Nullable value); + partial void OnDelayStartSecondsChanged(); + /// + /// There are no comments for Property ProductKey in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ProductKey + { + get + { + return this._ProductKey; + } + set + { + this.OnProductKeyChanging(value); + this._ProductKey = value; + this.OnProductKeyChanged(); + this.OnPropertyChanged("ProductKey"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ProductKey; + partial void OnProductKeyChanging(string value); + partial void OnProductKeyChanged(); + /// + /// There are no comments for Property WorkGroup in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string WorkGroup + { + get + { + return this._WorkGroup; + } + set + { + this.OnWorkGroupChanging(value); + this._WorkGroup = value; + this.OnWorkGroupChanged(); + this.OnPropertyChanged("WorkGroup"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _WorkGroup; + partial void OnWorkGroupChanging(string value); + partial void OnWorkGroupChanged(); + /// + /// There are no comments for Property TimeZone in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable TimeZone + { + get + { + return this._TimeZone; + } + set + { + this.OnTimeZoneChanging(value); + this._TimeZone = value; + this.OnTimeZoneChanged(); + this.OnPropertyChanged("TimeZone"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _TimeZone; + partial void OnTimeZoneChanging(global::System.Nullable value); + partial void OnTimeZoneChanged(); + /// + /// There are no comments for Property RunAsAccountUserName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string RunAsAccountUserName + { + get + { + return this._RunAsAccountUserName; + } + set + { + this.OnRunAsAccountUserNameChanging(value); + this._RunAsAccountUserName = value; + this.OnRunAsAccountUserNameChanged(); + this.OnPropertyChanged("RunAsAccountUserName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _RunAsAccountUserName; + partial void OnRunAsAccountUserNameChanging(string value); + partial void OnRunAsAccountUserNameChanged(); + /// + /// There are no comments for Property UserName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string UserName + { + get + { + return this._UserName; + } + set + { + this.OnUserNameChanging(value); + this._UserName = value; + this.OnUserNameChanged(); + this.OnPropertyChanged("UserName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _UserName; + partial void OnUserNameChanging(string value); + partial void OnUserNameChanged(); + /// + /// There are no comments for Property Password in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Password + { + get + { + return this._Password; + } + set + { + this.OnPasswordChanging(value); + this._Password = value; + this.OnPasswordChanged(); + this.OnPropertyChanged("Password"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Password; + partial void OnPasswordChanging(string value); + partial void OnPasswordChanged(); + /// + /// There are no comments for Property LocalAdminRunAsAccountName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string LocalAdminRunAsAccountName + { + get + { + return this._LocalAdminRunAsAccountName; + } + set + { + this.OnLocalAdminRunAsAccountNameChanging(value); + this._LocalAdminRunAsAccountName = value; + this.OnLocalAdminRunAsAccountNameChanged(); + this.OnPropertyChanged("LocalAdminRunAsAccountName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _LocalAdminRunAsAccountName; + partial void OnLocalAdminRunAsAccountNameChanging(string value); + partial void OnLocalAdminRunAsAccountNameChanged(); + /// + /// There are no comments for Property LocalAdminUserName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string LocalAdminUserName + { + get + { + return this._LocalAdminUserName; + } + set + { + this.OnLocalAdminUserNameChanging(value); + this._LocalAdminUserName = value; + this.OnLocalAdminUserNameChanged(); + this.OnPropertyChanged("LocalAdminUserName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _LocalAdminUserName; + partial void OnLocalAdminUserNameChanging(string value); + partial void OnLocalAdminUserNameChanged(); + /// + /// There are no comments for Property LocalAdminPassword in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string LocalAdminPassword + { + get + { + return this._LocalAdminPassword; + } + set + { + this.OnLocalAdminPasswordChanging(value); + this._LocalAdminPassword = value; + this.OnLocalAdminPasswordChanged(); + this.OnPropertyChanged("LocalAdminPassword"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _LocalAdminPassword; + partial void OnLocalAdminPasswordChanging(string value); + partial void OnLocalAdminPasswordChanged(); + /// + /// There are no comments for Property LinuxDomainName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string LinuxDomainName + { + get + { + return this._LinuxDomainName; + } + set + { + this.OnLinuxDomainNameChanging(value); + this._LinuxDomainName = value; + this.OnLinuxDomainNameChanged(); + this.OnPropertyChanged("LinuxDomainName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _LinuxDomainName; + partial void OnLinuxDomainNameChanging(string value); + partial void OnLinuxDomainNameChanged(); + /// + /// There are no comments for Property LinuxAdministratorSSHKey in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string LinuxAdministratorSSHKey + { + get + { + return this._LinuxAdministratorSSHKey; + } + set + { + this.OnLinuxAdministratorSSHKeyChanging(value); + this._LinuxAdministratorSSHKey = value; + this.OnLinuxAdministratorSSHKeyChanged(); + this.OnPropertyChanged("LinuxAdministratorSSHKey"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _LinuxAdministratorSSHKey; + partial void OnLinuxAdministratorSSHKeyChanging(string value); + partial void OnLinuxAdministratorSSHKeyChanged(); + /// + /// There are no comments for Property LinuxAdministratorSSHKeyString in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string LinuxAdministratorSSHKeyString + { + get + { + return this._LinuxAdministratorSSHKeyString; + } + set + { + this.OnLinuxAdministratorSSHKeyStringChanging(value); + this._LinuxAdministratorSSHKeyString = value; + this.OnLinuxAdministratorSSHKeyStringChanged(); + this.OnPropertyChanged("LinuxAdministratorSSHKeyString"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _LinuxAdministratorSSHKeyString; + partial void OnLinuxAdministratorSSHKeyStringChanging(string value); + partial void OnLinuxAdministratorSSHKeyStringChanged(); + /// + /// There are no comments for Property CloudVMRoleName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string CloudVMRoleName + { + get + { + return this._CloudVMRoleName; + } + set + { + this.OnCloudVMRoleNameChanging(value); + this._CloudVMRoleName = value; + this.OnCloudVMRoleNameChanged(); + this.OnPropertyChanged("CloudVMRoleName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _CloudVMRoleName; + partial void OnCloudVMRoleNameChanging(string value); + partial void OnCloudVMRoleNameChanged(); + /// + /// There are no comments for Property Generation in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Generation + { + get + { + return this._Generation; + } + set + { + this.OnGenerationChanging(value); + this._Generation = value; + this.OnGenerationChanged(); + this.OnPropertyChanged("Generation"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Generation; + partial void OnGenerationChanging(global::System.Nullable value); + partial void OnGenerationChanged(); + /// + /// There are no comments for Property DeploymentErrorInfo in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public ErrorInfo DeploymentErrorInfo + { + get + { + if (((this._DeploymentErrorInfo == null) + && (this._DeploymentErrorInfoInitialized != true))) + { + this._DeploymentErrorInfo = new ErrorInfo(); + this._DeploymentErrorInfoInitialized = true; + } + return this._DeploymentErrorInfo; + } + set + { + this.OnDeploymentErrorInfoChanging(value); + this._DeploymentErrorInfo = value; + this._DeploymentErrorInfoInitialized = true; + this.OnDeploymentErrorInfoChanged(); + this.OnPropertyChanged("DeploymentErrorInfo"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private ErrorInfo _DeploymentErrorInfo; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _DeploymentErrorInfoInitialized; + partial void OnDeploymentErrorInfoChanging(ErrorInfo value); + partial void OnDeploymentErrorInfoChanged(); + /// + /// There are no comments for Property NewVirtualNetworkAdapterInput in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection NewVirtualNetworkAdapterInput + { + get + { + return this._NewVirtualNetworkAdapterInput; + } + set + { + this.OnNewVirtualNetworkAdapterInputChanging(value); + this._NewVirtualNetworkAdapterInput = value; + this.OnNewVirtualNetworkAdapterInputChanged(); + this.OnPropertyChanged("NewVirtualNetworkAdapterInput"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _NewVirtualNetworkAdapterInput = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnNewVirtualNetworkAdapterInputChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnNewVirtualNetworkAdapterInputChanged(); + /// + /// There are no comments for Property IsRecoveryVM in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsRecoveryVM + { + get + { + return this._IsRecoveryVM; + } + set + { + this.OnIsRecoveryVMChanging(value); + this._IsRecoveryVM = value; + this.OnIsRecoveryVMChanged(); + this.OnPropertyChanged("IsRecoveryVM"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsRecoveryVM; + partial void OnIsRecoveryVMChanging(global::System.Nullable value); + partial void OnIsRecoveryVMChanged(); + /// + /// There are no comments for Cloud in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public Cloud Cloud + { + get + { + return this._Cloud; + } + set + { + this._Cloud = value; + this.OnPropertyChanged("Cloud"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private Cloud _Cloud; + /// + /// There are no comments for MostRecentTask in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public Job MostRecentTask + { + get + { + return this._MostRecentTask; + } + set + { + this._MostRecentTask = value; + this.OnPropertyChanged("MostRecentTask"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private Job _MostRecentTask; + /// + /// There are no comments for FailedJob in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public Job FailedJob + { + get + { + return this._FailedJob; + } + set + { + this._FailedJob = value; + this.OnPropertyChanged("FailedJob"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private Job _FailedJob; + /// + /// There are no comments for VirtualNetworkAdapters in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection VirtualNetworkAdapters + { + get + { + return this._VirtualNetworkAdapters; + } + set + { + this._VirtualNetworkAdapters = value; + this.OnPropertyChanged("VirtualNetworkAdapters"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _VirtualNetworkAdapters = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + /// + /// There are no comments for VMCheckpoints in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection VMCheckpoints + { + get + { + return this._VMCheckpoints; + } + set + { + this._VMCheckpoints = value; + this.OnPropertyChanged("VMCheckpoints"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _VMCheckpoints = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + /// + /// There are no comments for VirtualSCSIAdapters in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection VirtualSCSIAdapters + { + get + { + return this._VirtualSCSIAdapters; + } + set + { + this._VirtualSCSIAdapters = value; + this.OnPropertyChanged("VirtualSCSIAdapters"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _VirtualSCSIAdapters = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + /// + /// There are no comments for VirtualHardDisks in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection VirtualHardDisks + { + get + { + return this._VirtualHardDisks; + } + set + { + this._VirtualHardDisks = value; + this.OnPropertyChanged("VirtualHardDisks"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _VirtualHardDisks = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + /// + /// There are no comments for VirtualDVDDrives in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection VirtualDVDDrives + { + get + { + return this._VirtualDVDDrives; + } + set + { + this._VirtualDVDDrives = value; + this.OnPropertyChanged("VirtualDVDDrives"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _VirtualDVDDrives = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + /// + /// There are no comments for VirtualDiskDrives in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection VirtualDiskDrives + { + get + { + return this._VirtualDiskDrives; + } + set + { + this._VirtualDiskDrives = value; + this.OnPropertyChanged("VirtualDiskDrives"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _VirtualDiskDrives = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.VirtualDVDDrive in the schema. + /// + /// + /// ID + /// StampId + /// + [global::System.Data.Services.Common.EntitySetAttribute("VirtualDVDDrives")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ID", "StampId")] + public partial class VirtualDVDDrive : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new VirtualDVDDrive object. + /// + /// Initial value of ID. + /// Initial value of StampId. + /// Initial value of ChildObjectIDs. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static VirtualDVDDrive CreateVirtualDVDDrive(global::System.Guid ID, global::System.Guid stampId, global::System.Collections.ObjectModel.ObservableCollection childObjectIDs) + { + VirtualDVDDrive virtualDVDDrive = new VirtualDVDDrive(); + virtualDVDDrive.ID = ID; + virtualDVDDrive.StampId = stampId; + if ((childObjectIDs == null)) + { + throw new global::System.ArgumentNullException("childObjectIDs"); + } + virtualDVDDrive.ChildObjectIDs = childObjectIDs; + return virtualDVDDrive; + } + /// + /// There are no comments for Property Accessibility in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Accessibility + { + get + { + return this._Accessibility; + } + set + { + this.OnAccessibilityChanging(value); + this._Accessibility = value; + this.OnAccessibilityChanged(); + this.OnPropertyChanged("Accessibility"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Accessibility; + partial void OnAccessibilityChanging(string value); + partial void OnAccessibilityChanged(); + /// + /// There are no comments for Property AddedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable AddedTime + { + get + { + return this._AddedTime; + } + set + { + this.OnAddedTimeChanging(value); + this._AddedTime = value; + this.OnAddedTimeChanged(); + this.OnPropertyChanged("AddedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _AddedTime; + partial void OnAddedTimeChanging(global::System.Nullable value); + partial void OnAddedTimeChanged(); + /// + /// There are no comments for Property Bus in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Bus + { + get + { + return this._Bus; + } + set + { + this.OnBusChanging(value); + this._Bus = value; + this.OnBusChanged(); + this.OnPropertyChanged("Bus"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Bus; + partial void OnBusChanging(global::System.Nullable value); + partial void OnBusChanged(); + /// + /// There are no comments for Property BusType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string BusType + { + get + { + return this._BusType; + } + set + { + this.OnBusTypeChanging(value); + this._BusType = value; + this.OnBusTypeChanged(); + this.OnPropertyChanged("BusType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _BusType; + partial void OnBusTypeChanging(string value); + partial void OnBusTypeChanged(); + /// + /// There are no comments for Property Enabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Enabled + { + get + { + return this._Enabled; + } + set + { + this.OnEnabledChanging(value); + this._Enabled = value; + this.OnEnabledChanged(); + this.OnPropertyChanged("Enabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Enabled; + partial void OnEnabledChanging(global::System.Nullable value); + partial void OnEnabledChanged(); + /// + /// There are no comments for Property HostDrive in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string HostDrive + { + get + { + return this._HostDrive; + } + set + { + this.OnHostDriveChanging(value); + this._HostDrive = value; + this.OnHostDriveChanged(); + this.OnPropertyChanged("HostDrive"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _HostDrive; + partial void OnHostDriveChanging(string value); + partial void OnHostDriveChanged(); + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this._ID = value; + this.OnIDChanged(); + this.OnPropertyChanged("ID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ID; + partial void OnIDChanging(global::System.Guid value); + partial void OnIDChanged(); + /// + /// There are no comments for Property ISOId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ISOId + { + get + { + return this._ISOId; + } + set + { + this.OnISOIdChanging(value); + this._ISOId = value; + this.OnISOIdChanged(); + this.OnPropertyChanged("ISOId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ISOId; + partial void OnISOIdChanging(global::System.Nullable value); + partial void OnISOIdChanged(); + /// + /// There are no comments for Property ISOLinked in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ISOLinked + { + get + { + return this._ISOLinked; + } + set + { + this.OnISOLinkedChanging(value); + this._ISOLinked = value; + this.OnISOLinkedChanged(); + this.OnPropertyChanged("ISOLinked"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ISOLinked; + partial void OnISOLinkedChanging(global::System.Nullable value); + partial void OnISOLinkedChanged(); + /// + /// There are no comments for Property JobGroupId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable JobGroupId + { + get + { + return this._JobGroupId; + } + set + { + this.OnJobGroupIdChanging(value); + this._JobGroupId = value; + this.OnJobGroupIdChanged(); + this.OnPropertyChanged("JobGroupId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _JobGroupId; + partial void OnJobGroupIdChanging(global::System.Nullable value); + partial void OnJobGroupIdChanged(); + /// + /// There are no comments for Property LUN in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable LUN + { + get + { + return this._LUN; + } + set + { + this.OnLUNChanging(value); + this._LUN = value; + this.OnLUNChanged(); + this.OnPropertyChanged("LUN"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _LUN; + partial void OnLUNChanging(global::System.Nullable value); + partial void OnLUNChanged(); + /// + /// There are no comments for Property ModifiedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ModifiedTime + { + get + { + return this._ModifiedTime; + } + set + { + this.OnModifiedTimeChanging(value); + this._ModifiedTime = value; + this.OnModifiedTimeChanged(); + this.OnPropertyChanged("ModifiedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ModifiedTime; + partial void OnModifiedTimeChanging(global::System.Nullable value); + partial void OnModifiedTimeChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property Size in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Size + { + get + { + return this._Size; + } + set + { + this.OnSizeChanging(value); + this._Size = value; + this.OnSizeChanged(); + this.OnPropertyChanged("Size"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Size; + partial void OnSizeChanging(global::System.Nullable value); + partial void OnSizeChanged(); + /// + /// There are no comments for Property TemplateId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable TemplateId + { + get + { + return this._TemplateId; + } + set + { + this.OnTemplateIdChanging(value); + this._TemplateId = value; + this.OnTemplateIdChanged(); + this.OnPropertyChanged("TemplateId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _TemplateId; + partial void OnTemplateIdChanging(global::System.Nullable value); + partial void OnTemplateIdChanged(); + /// + /// There are no comments for Property VMId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VMId + { + get + { + return this._VMId; + } + set + { + this.OnVMIdChanging(value); + this._VMId = value; + this.OnVMIdChanged(); + this.OnPropertyChanged("VMId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VMId; + partial void OnVMIdChanging(global::System.Nullable value); + partial void OnVMIdChanged(); + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property ChildObjectIDs in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection ChildObjectIDs + { + get + { + return this._ChildObjectIDs; + } + set + { + this.OnChildObjectIDsChanging(value); + this._ChildObjectIDs = value; + this.OnChildObjectIDsChanged(); + this.OnPropertyChanged("ChildObjectIDs"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _ChildObjectIDs = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnChildObjectIDsChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnChildObjectIDsChanged(); + /// + /// There are no comments for Property Connection in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Connection + { + get + { + return this._Connection; + } + set + { + this.OnConnectionChanging(value); + this._Connection = value; + this.OnConnectionChanged(); + this.OnPropertyChanged("Connection"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Connection; + partial void OnConnectionChanging(string value); + partial void OnConnectionChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for ISO in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public ISO ISO + { + get + { + return this._ISO; + } + set + { + this._ISO = value; + this.OnPropertyChanged("ISO"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private ISO _ISO; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.VirtualHardDisk in the schema. + /// + /// + /// ID + /// StampId + /// + [global::System.Data.Services.Common.EntitySetAttribute("VirtualHardDisks")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ID", "StampId")] + public partial class VirtualHardDisk : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new VirtualHardDisk object. + /// + /// Initial value of ID. + /// Initial value of StampId. + /// Initial value of Tag. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static VirtualHardDisk CreateVirtualHardDisk(global::System.Guid ID, global::System.Guid stampId, global::System.Collections.ObjectModel.ObservableCollection tag) + { + VirtualHardDisk virtualHardDisk = new VirtualHardDisk(); + virtualHardDisk.ID = ID; + virtualHardDisk.StampId = stampId; + if ((tag == null)) + { + throw new global::System.ArgumentNullException("tag"); + } + virtualHardDisk.Tag = tag; + return virtualHardDisk; + } + /// + /// There are no comments for Property Accessibility in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Accessibility + { + get + { + return this._Accessibility; + } + set + { + this.OnAccessibilityChanging(value); + this._Accessibility = value; + this.OnAccessibilityChanged(); + this.OnPropertyChanged("Accessibility"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Accessibility; + partial void OnAccessibilityChanging(string value); + partial void OnAccessibilityChanged(); + /// + /// There are no comments for Property AddedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable AddedTime + { + get + { + return this._AddedTime; + } + set + { + this.OnAddedTimeChanging(value); + this._AddedTime = value; + this.OnAddedTimeChanged(); + this.OnPropertyChanged("AddedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _AddedTime; + partial void OnAddedTimeChanging(global::System.Nullable value); + partial void OnAddedTimeChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property Directory in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Directory + { + get + { + return this._Directory; + } + set + { + this.OnDirectoryChanging(value); + this._Directory = value; + this.OnDirectoryChanged(); + this.OnPropertyChanged("Directory"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Directory; + partial void OnDirectoryChanging(string value); + partial void OnDirectoryChanged(); + /// + /// There are no comments for Property Enabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Enabled + { + get + { + return this._Enabled; + } + set + { + this.OnEnabledChanging(value); + this._Enabled = value; + this.OnEnabledChanged(); + this.OnPropertyChanged("Enabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Enabled; + partial void OnEnabledChanging(global::System.Nullable value); + partial void OnEnabledChanged(); + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this._ID = value; + this.OnIDChanged(); + this.OnPropertyChanged("ID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ID; + partial void OnIDChanging(global::System.Guid value); + partial void OnIDChanged(); + /// + /// There are no comments for Property JobGroupId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable JobGroupId + { + get + { + return this._JobGroupId; + } + set + { + this.OnJobGroupIdChanging(value); + this._JobGroupId = value; + this.OnJobGroupIdChanged(); + this.OnPropertyChanged("JobGroupId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _JobGroupId; + partial void OnJobGroupIdChanging(global::System.Nullable value); + partial void OnJobGroupIdChanged(); + /// + /// There are no comments for Property MaximumSize in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MaximumSize + { + get + { + return this._MaximumSize; + } + set + { + this.OnMaximumSizeChanging(value); + this._MaximumSize = value; + this.OnMaximumSizeChanged(); + this.OnPropertyChanged("MaximumSize"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MaximumSize; + partial void OnMaximumSizeChanging(global::System.Nullable value); + partial void OnMaximumSizeChanged(); + /// + /// There are no comments for Property ModifiedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ModifiedTime + { + get + { + return this._ModifiedTime; + } + set + { + this.OnModifiedTimeChanging(value); + this._ModifiedTime = value; + this.OnModifiedTimeChanged(); + this.OnPropertyChanged("ModifiedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ModifiedTime; + partial void OnModifiedTimeChanging(global::System.Nullable value); + partial void OnModifiedTimeChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property Owner in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public UserAndRole Owner + { + get + { + if (((this._Owner == null) + && (this._OwnerInitialized != true))) + { + this._Owner = new UserAndRole(); + this._OwnerInitialized = true; + } + return this._Owner; + } + set + { + this.OnOwnerChanging(value); + this._Owner = value; + this._OwnerInitialized = true; + this.OnOwnerChanged(); + this.OnPropertyChanged("Owner"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private UserAndRole _Owner; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _OwnerInitialized; + partial void OnOwnerChanging(UserAndRole value); + partial void OnOwnerChanged(); + /// + /// There are no comments for Property OwnerSid in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string OwnerSid + { + get + { + return this._OwnerSid; + } + set + { + this.OnOwnerSidChanging(value); + this._OwnerSid = value; + this.OnOwnerSidChanged(); + this.OnPropertyChanged("OwnerSid"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _OwnerSid; + partial void OnOwnerSidChanging(string value); + partial void OnOwnerSidChanged(); + /// + /// There are no comments for Property ParentDiskId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ParentDiskId + { + get + { + return this._ParentDiskId; + } + set + { + this.OnParentDiskIdChanging(value); + this._ParentDiskId = value; + this.OnParentDiskIdChanged(); + this.OnPropertyChanged("ParentDiskId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ParentDiskId; + partial void OnParentDiskIdChanging(global::System.Nullable value); + partial void OnParentDiskIdChanged(); + /// + /// There are no comments for Property SharePath in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string SharePath + { + get + { + return this._SharePath; + } + set + { + this.OnSharePathChanging(value); + this._SharePath = value; + this.OnSharePathChanged(); + this.OnPropertyChanged("SharePath"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _SharePath; + partial void OnSharePathChanging(string value); + partial void OnSharePathChanged(); + /// + /// There are no comments for Property Size in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Size + { + get + { + return this._Size; + } + set + { + this.OnSizeChanging(value); + this._Size = value; + this.OnSizeChanged(); + this.OnPropertyChanged("Size"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Size; + partial void OnSizeChanging(global::System.Nullable value); + partial void OnSizeChanged(); + /// + /// There are no comments for Property State in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string State + { + get + { + return this._State; + } + set + { + this.OnStateChanging(value); + this._State = value; + this.OnStateChanged(); + this.OnPropertyChanged("State"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _State; + partial void OnStateChanging(string value); + partial void OnStateChanged(); + /// + /// There are no comments for Property VHDType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string VHDType + { + get + { + return this._VHDType; + } + set + { + this.OnVHDTypeChanging(value); + this._VHDType = value; + this.OnVHDTypeChanged(); + this.OnPropertyChanged("VHDType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _VHDType; + partial void OnVHDTypeChanging(string value); + partial void OnVHDTypeChanged(); + /// + /// There are no comments for Property VMId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VMId + { + get + { + return this._VMId; + } + set + { + this.OnVMIdChanging(value); + this._VMId = value; + this.OnVMIdChanged(); + this.OnPropertyChanged("VMId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VMId; + partial void OnVMIdChanging(global::System.Nullable value); + partial void OnVMIdChanged(); + /// + /// There are no comments for Property TemplateId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable TemplateId + { + get + { + return this._TemplateId; + } + set + { + this.OnTemplateIdChanging(value); + this._TemplateId = value; + this.OnTemplateIdChanged(); + this.OnPropertyChanged("TemplateId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _TemplateId; + partial void OnTemplateIdChanging(global::System.Nullable value); + partial void OnTemplateIdChanged(); + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property FamilyName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string FamilyName + { + get + { + return this._FamilyName; + } + set + { + this.OnFamilyNameChanging(value); + this._FamilyName = value; + this.OnFamilyNameChanged(); + this.OnPropertyChanged("FamilyName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _FamilyName; + partial void OnFamilyNameChanging(string value); + partial void OnFamilyNameChanged(); + /// + /// There are no comments for Property Release in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Release + { + get + { + return this._Release; + } + set + { + this.OnReleaseChanging(value); + this._Release = value; + this.OnReleaseChanged(); + this.OnPropertyChanged("Release"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Release; + partial void OnReleaseChanging(string value); + partial void OnReleaseChanged(); + /// + /// There are no comments for Property CloudId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CloudId + { + get + { + return this._CloudId; + } + set + { + this.OnCloudIdChanging(value); + this._CloudId = value; + this.OnCloudIdChanged(); + this.OnPropertyChanged("CloudId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CloudId; + partial void OnCloudIdChanging(global::System.Nullable value); + partial void OnCloudIdChanged(); + /// + /// There are no comments for Property HostVolumeId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable HostVolumeId + { + get + { + return this._HostVolumeId; + } + set + { + this.OnHostVolumeIdChanging(value); + this._HostVolumeId = value; + this.OnHostVolumeIdChanged(); + this.OnPropertyChanged("HostVolumeId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _HostVolumeId; + partial void OnHostVolumeIdChanging(global::System.Nullable value); + partial void OnHostVolumeIdChanged(); + /// + /// There are no comments for Property IsOrphaned in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsOrphaned + { + get + { + return this._IsOrphaned; + } + set + { + this.OnIsOrphanedChanging(value); + this._IsOrphaned = value; + this.OnIsOrphanedChanged(); + this.OnPropertyChanged("IsOrphaned"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsOrphaned; + partial void OnIsOrphanedChanging(global::System.Nullable value); + partial void OnIsOrphanedChanged(); + /// + /// There are no comments for Property IsResourceGroup in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsResourceGroup + { + get + { + return this._IsResourceGroup; + } + set + { + this.OnIsResourceGroupChanging(value); + this._IsResourceGroup = value; + this.OnIsResourceGroupChanged(); + this.OnPropertyChanged("IsResourceGroup"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsResourceGroup; + partial void OnIsResourceGroupChanging(global::System.Nullable value); + partial void OnIsResourceGroupChanged(); + /// + /// There are no comments for Property LibraryGroup in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string LibraryGroup + { + get + { + return this._LibraryGroup; + } + set + { + this.OnLibraryGroupChanging(value); + this._LibraryGroup = value; + this.OnLibraryGroupChanged(); + this.OnPropertyChanged("LibraryGroup"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _LibraryGroup; + partial void OnLibraryGroupChanging(string value); + partial void OnLibraryGroupChanged(); + /// + /// There are no comments for Property LibraryShareId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable LibraryShareId + { + get + { + return this._LibraryShareId; + } + set + { + this.OnLibraryShareIdChanging(value); + this._LibraryShareId = value; + this.OnLibraryShareIdChanged(); + this.OnPropertyChanged("LibraryShareId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _LibraryShareId; + partial void OnLibraryShareIdChanging(global::System.Nullable value); + partial void OnLibraryShareIdChanged(); + /// + /// There are no comments for Property Location in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Location + { + get + { + return this._Location; + } + set + { + this.OnLocationChanging(value); + this._Location = value; + this.OnLocationChanged(); + this.OnPropertyChanged("Location"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Location; + partial void OnLocationChanging(string value); + partial void OnLocationChanged(); + /// + /// There are no comments for Property Namespace in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Namespace + { + get + { + return this._Namespace; + } + set + { + this.OnNamespaceChanging(value); + this._Namespace = value; + this.OnNamespaceChanged(); + this.OnPropertyChanged("Namespace"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Namespace; + partial void OnNamespaceChanging(string value); + partial void OnNamespaceChanged(); + /// + /// There are no comments for Property ReleaseTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ReleaseTime + { + get + { + return this._ReleaseTime; + } + set + { + this.OnReleaseTimeChanging(value); + this._ReleaseTime = value; + this.OnReleaseTimeChanged(); + this.OnPropertyChanged("ReleaseTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ReleaseTime; + partial void OnReleaseTimeChanging(global::System.Nullable value); + partial void OnReleaseTimeChanged(); + /// + /// There are no comments for Property SANCopyCapable in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable SANCopyCapable + { + get + { + return this._SANCopyCapable; + } + set + { + this.OnSANCopyCapableChanging(value); + this._SANCopyCapable = value; + this.OnSANCopyCapableChanged(); + this.OnPropertyChanged("SANCopyCapable"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _SANCopyCapable; + partial void OnSANCopyCapableChanging(global::System.Nullable value); + partial void OnSANCopyCapableChanged(); + /// + /// There are no comments for Property Type in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Type + { + get + { + return this._Type; + } + set + { + this.OnTypeChanging(value); + this._Type = value; + this.OnTypeChanged(); + this.OnPropertyChanged("Type"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Type; + partial void OnTypeChanging(string value); + partial void OnTypeChanged(); + /// + /// There are no comments for Property VirtualizationPlatform in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string VirtualizationPlatform + { + get + { + return this._VirtualizationPlatform; + } + set + { + this.OnVirtualizationPlatformChanging(value); + this._VirtualizationPlatform = value; + this.OnVirtualizationPlatformChanged(); + this.OnPropertyChanged("VirtualizationPlatform"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _VirtualizationPlatform; + partial void OnVirtualizationPlatformChanging(string value); + partial void OnVirtualizationPlatformChanged(); + /// + /// There are no comments for Property OperatingSystem in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string OperatingSystem + { + get + { + return this._OperatingSystem; + } + set + { + this.OnOperatingSystemChanging(value); + this._OperatingSystem = value; + this.OnOperatingSystemChanged(); + this.OnPropertyChanged("OperatingSystem"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _OperatingSystem; + partial void OnOperatingSystemChanging(string value); + partial void OnOperatingSystemChanged(); + /// + /// There are no comments for Property OperatingSystemInstance in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public OperatingSystem OperatingSystemInstance + { + get + { + if (((this._OperatingSystemInstance == null) + && (this._OperatingSystemInstanceInitialized != true))) + { + this._OperatingSystemInstance = new OperatingSystem(); + this._OperatingSystemInstanceInitialized = true; + } + return this._OperatingSystemInstance; + } + set + { + this.OnOperatingSystemInstanceChanging(value); + this._OperatingSystemInstance = value; + this._OperatingSystemInstanceInitialized = true; + this.OnOperatingSystemInstanceChanged(); + this.OnPropertyChanged("OperatingSystemInstance"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private OperatingSystem _OperatingSystemInstance; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _OperatingSystemInstanceInitialized; + partial void OnOperatingSystemInstanceChanging(OperatingSystem value); + partial void OnOperatingSystemInstanceChanged(); + /// + /// There are no comments for Property OperatingSystemId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable OperatingSystemId + { + get + { + return this._OperatingSystemId; + } + set + { + this.OnOperatingSystemIdChanging(value); + this._OperatingSystemId = value; + this.OnOperatingSystemIdChanged(); + this.OnPropertyChanged("OperatingSystemId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _OperatingSystemId; + partial void OnOperatingSystemIdChanging(global::System.Nullable value); + partial void OnOperatingSystemIdChanged(); + /// + /// There are no comments for Property Tag in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection Tag + { + get + { + return this._Tag; + } + set + { + this.OnTagChanging(value); + this._Tag = value; + this.OnTagChanged(); + this.OnPropertyChanged("Tag"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _Tag = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnTagChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnTagChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.VMTemplate in the schema. + /// + /// + /// ID + /// StampId + /// + [global::System.Data.Services.Common.EntitySetAttribute("VMTemplates")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ID", "StampId")] + public partial class VMTemplate : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new VMTemplate object. + /// + /// Initial value of StampId. + /// Initial value of ID. + /// Initial value of GrantedToList. + /// Initial value of BootOrder. + /// Initial value of CustomProperties. + /// Initial value of GuiRunOnceCommands. + /// Initial value of ServerFeatures. + /// Initial value of SANStatus. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static VMTemplate CreateVMTemplate(global::System.Guid stampId, global::System.Guid ID, global::System.Collections.ObjectModel.ObservableCollection grantedToList, global::System.Collections.ObjectModel.ObservableCollection bootOrder, global::System.Collections.ObjectModel.ObservableCollection customProperties, global::System.Collections.ObjectModel.ObservableCollection guiRunOnceCommands, global::System.Collections.ObjectModel.ObservableCollection serverFeatures, global::System.Collections.ObjectModel.ObservableCollection sANStatus) + { + VMTemplate vMTemplate = new VMTemplate(); + vMTemplate.StampId = stampId; + vMTemplate.ID = ID; + if ((grantedToList == null)) + { + throw new global::System.ArgumentNullException("grantedToList"); + } + vMTemplate.GrantedToList = grantedToList; + if ((bootOrder == null)) + { + throw new global::System.ArgumentNullException("bootOrder"); + } + vMTemplate.BootOrder = bootOrder; + if ((customProperties == null)) + { + throw new global::System.ArgumentNullException("customProperties"); + } + vMTemplate.CustomProperties = customProperties; + if ((guiRunOnceCommands == null)) + { + throw new global::System.ArgumentNullException("guiRunOnceCommands"); + } + vMTemplate.GuiRunOnceCommands = guiRunOnceCommands; + if ((serverFeatures == null)) + { + throw new global::System.ArgumentNullException("serverFeatures"); + } + vMTemplate.ServerFeatures = serverFeatures; + if ((sANStatus == null)) + { + throw new global::System.ArgumentNullException("sANStatus"); + } + vMTemplate.SANStatus = sANStatus; + return vMTemplate; + } + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this._ID = value; + this.OnIDChanged(); + this.OnPropertyChanged("ID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ID; + partial void OnIDChanging(global::System.Guid value); + partial void OnIDChanged(); + /// + /// There are no comments for Property AccessedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable AccessedTime + { + get + { + return this._AccessedTime; + } + set + { + this.OnAccessedTimeChanging(value); + this._AccessedTime = value; + this.OnAccessedTimeChanged(); + this.OnPropertyChanged("AccessedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _AccessedTime; + partial void OnAccessedTimeChanging(global::System.Nullable value); + partial void OnAccessedTimeChanged(); + /// + /// There are no comments for Property AddedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable AddedTime + { + get + { + return this._AddedTime; + } + set + { + this.OnAddedTimeChanging(value); + this._AddedTime = value; + this.OnAddedTimeChanged(); + this.OnPropertyChanged("AddedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _AddedTime; + partial void OnAddedTimeChanging(global::System.Nullable value); + partial void OnAddedTimeChanged(); + /// + /// There are no comments for Property Admin in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Admin + { + get + { + return this._Admin; + } + set + { + this.OnAdminChanging(value); + this._Admin = value; + this.OnAdminChanged(); + this.OnPropertyChanged("Admin"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Admin; + partial void OnAdminChanging(string value); + partial void OnAdminChanged(); + /// + /// There are no comments for Property AdminPasswordHasValue in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable AdminPasswordHasValue + { + get + { + return this._AdminPasswordHasValue; + } + set + { + this.OnAdminPasswordHasValueChanging(value); + this._AdminPasswordHasValue = value; + this.OnAdminPasswordHasValueChanged(); + this.OnPropertyChanged("AdminPasswordHasValue"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _AdminPasswordHasValue; + partial void OnAdminPasswordHasValueChanging(global::System.Nullable value); + partial void OnAdminPasswordHasValueChanged(); + /// + /// There are no comments for Property ComputerName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ComputerName + { + get + { + return this._ComputerName; + } + set + { + this.OnComputerNameChanging(value); + this._ComputerName = value; + this.OnComputerNameChanged(); + this.OnPropertyChanged("ComputerName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ComputerName; + partial void OnComputerNameChanging(string value); + partial void OnComputerNameChanged(); + /// + /// There are no comments for Property CPUCount in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CPUCount + { + get + { + return this._CPUCount; + } + set + { + this.OnCPUCountChanging(value); + this._CPUCount = value; + this.OnCPUCountChanged(); + this.OnPropertyChanged("CPUCount"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CPUCount; + partial void OnCPUCountChanging(global::System.Nullable value); + partial void OnCPUCountChanged(); + /// + /// There are no comments for Property CPUMax in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CPUMax + { + get + { + return this._CPUMax; + } + set + { + this.OnCPUMaxChanging(value); + this._CPUMax = value; + this.OnCPUMaxChanged(); + this.OnPropertyChanged("CPUMax"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CPUMax; + partial void OnCPUMaxChanging(global::System.Nullable value); + partial void OnCPUMaxChanged(); + /// + /// There are no comments for Property CPUReserve in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CPUReserve + { + get + { + return this._CPUReserve; + } + set + { + this.OnCPUReserveChanging(value); + this._CPUReserve = value; + this.OnCPUReserveChanged(); + this.OnPropertyChanged("CPUReserve"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CPUReserve; + partial void OnCPUReserveChanging(global::System.Nullable value); + partial void OnCPUReserveChanged(); + /// + /// There are no comments for Property CPUType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string CPUType + { + get + { + return this._CPUType; + } + set + { + this.OnCPUTypeChanging(value); + this._CPUType = value; + this.OnCPUTypeChanged(); + this.OnPropertyChanged("CPUType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _CPUType; + partial void OnCPUTypeChanging(string value); + partial void OnCPUTypeChanged(); + /// + /// There are no comments for Property CreationTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CreationTime + { + get + { + return this._CreationTime; + } + set + { + this.OnCreationTimeChanging(value); + this._CreationTime = value; + this.OnCreationTimeChanged(); + this.OnPropertyChanged("CreationTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CreationTime; + partial void OnCreationTimeChanging(global::System.Nullable value); + partial void OnCreationTimeChanged(); + /// + /// There are no comments for Property DiskIO in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable DiskIO + { + get + { + return this._DiskIO; + } + set + { + this.OnDiskIOChanging(value); + this._DiskIO = value; + this.OnDiskIOChanged(); + this.OnPropertyChanged("DiskIO"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _DiskIO; + partial void OnDiskIOChanging(global::System.Nullable value); + partial void OnDiskIOChanged(); + /// + /// There are no comments for Property DomainAdmin in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DomainAdmin + { + get + { + return this._DomainAdmin; + } + set + { + this.OnDomainAdminChanging(value); + this._DomainAdmin = value; + this.OnDomainAdminChanged(); + this.OnPropertyChanged("DomainAdmin"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DomainAdmin; + partial void OnDomainAdminChanging(string value); + partial void OnDomainAdminChanged(); + /// + /// There are no comments for Property DomainAdminPasswordHasValue in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable DomainAdminPasswordHasValue + { + get + { + return this._DomainAdminPasswordHasValue; + } + set + { + this.OnDomainAdminPasswordHasValueChanging(value); + this._DomainAdminPasswordHasValue = value; + this.OnDomainAdminPasswordHasValueChanged(); + this.OnPropertyChanged("DomainAdminPasswordHasValue"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _DomainAdminPasswordHasValue; + partial void OnDomainAdminPasswordHasValueChanging(global::System.Nullable value); + partial void OnDomainAdminPasswordHasValueChanged(); + /// + /// There are no comments for Property ExpectedCPUUtilization in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ExpectedCPUUtilization + { + get + { + return this._ExpectedCPUUtilization; + } + set + { + this.OnExpectedCPUUtilizationChanging(value); + this._ExpectedCPUUtilization = value; + this.OnExpectedCPUUtilizationChanged(); + this.OnPropertyChanged("ExpectedCPUUtilization"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ExpectedCPUUtilization; + partial void OnExpectedCPUUtilizationChanging(global::System.Nullable value); + partial void OnExpectedCPUUtilizationChanged(); + /// + /// There are no comments for Property Enabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Enabled + { + get + { + return this._Enabled; + } + set + { + this.OnEnabledChanging(value); + this._Enabled = value; + this.OnEnabledChanged(); + this.OnPropertyChanged("Enabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Enabled; + partial void OnEnabledChanging(global::System.Nullable value); + partial void OnEnabledChanged(); + /// + /// There are no comments for Property FullName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string FullName + { + get + { + return this._FullName; + } + set + { + this.OnFullNameChanging(value); + this._FullName = value; + this.OnFullNameChanged(); + this.OnPropertyChanged("FullName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _FullName; + partial void OnFullNameChanging(string value); + partial void OnFullNameChanged(); + /// + /// There are no comments for Property HasVMAdditions in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable HasVMAdditions + { + get + { + return this._HasVMAdditions; + } + set + { + this.OnHasVMAdditionsChanging(value); + this._HasVMAdditions = value; + this.OnHasVMAdditionsChanged(); + this.OnPropertyChanged("HasVMAdditions"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _HasVMAdditions; + partial void OnHasVMAdditionsChanging(global::System.Nullable value); + partial void OnHasVMAdditionsChanged(); + /// + /// There are no comments for Property IsHighlyAvailable in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsHighlyAvailable + { + get + { + return this._IsHighlyAvailable; + } + set + { + this.OnIsHighlyAvailableChanging(value); + this._IsHighlyAvailable = value; + this.OnIsHighlyAvailableChanged(); + this.OnPropertyChanged("IsHighlyAvailable"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsHighlyAvailable; + partial void OnIsHighlyAvailableChanging(global::System.Nullable value); + partial void OnIsHighlyAvailableChanged(); + /// + /// There are no comments for Property JoinDomain in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string JoinDomain + { + get + { + return this._JoinDomain; + } + set + { + this.OnJoinDomainChanging(value); + this._JoinDomain = value; + this.OnJoinDomainChanged(); + this.OnPropertyChanged("JoinDomain"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _JoinDomain; + partial void OnJoinDomainChanging(string value); + partial void OnJoinDomainChanged(); + /// + /// There are no comments for Property JoinWorkgroup in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string JoinWorkgroup + { + get + { + return this._JoinWorkgroup; + } + set + { + this.OnJoinWorkgroupChanging(value); + this._JoinWorkgroup = value; + this.OnJoinWorkgroupChanged(); + this.OnPropertyChanged("JoinWorkgroup"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _JoinWorkgroup; + partial void OnJoinWorkgroupChanging(string value); + partial void OnJoinWorkgroupChanged(); + /// + /// There are no comments for Property LibraryGroup in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string LibraryGroup + { + get + { + return this._LibraryGroup; + } + set + { + this.OnLibraryGroupChanging(value); + this._LibraryGroup = value; + this.OnLibraryGroupChanged(); + this.OnPropertyChanged("LibraryGroup"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _LibraryGroup; + partial void OnLibraryGroupChanging(string value); + partial void OnLibraryGroupChanged(); + /// + /// There are no comments for Property LimitCPUForMigration in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable LimitCPUForMigration + { + get + { + return this._LimitCPUForMigration; + } + set + { + this.OnLimitCPUForMigrationChanging(value); + this._LimitCPUForMigration = value; + this.OnLimitCPUForMigrationChanged(); + this.OnPropertyChanged("LimitCPUForMigration"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _LimitCPUForMigration; + partial void OnLimitCPUForMigrationChanging(global::System.Nullable value); + partial void OnLimitCPUForMigrationChanged(); + /// + /// There are no comments for Property LimitCPUFunctionality in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable LimitCPUFunctionality + { + get + { + return this._LimitCPUFunctionality; + } + set + { + this.OnLimitCPUFunctionalityChanging(value); + this._LimitCPUFunctionality = value; + this.OnLimitCPUFunctionalityChanged(); + this.OnPropertyChanged("LimitCPUFunctionality"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _LimitCPUFunctionality; + partial void OnLimitCPUFunctionalityChanging(global::System.Nullable value); + partial void OnLimitCPUFunctionalityChanged(); + /// + /// There are no comments for Property Location in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Location + { + get + { + return this._Location; + } + set + { + this.OnLocationChanging(value); + this._Location = value; + this.OnLocationChanged(); + this.OnPropertyChanged("Location"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Location; + partial void OnLocationChanging(string value); + partial void OnLocationChanged(); + /// + /// There are no comments for Property Memory in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Memory + { + get + { + return this._Memory; + } + set + { + this.OnMemoryChanging(value); + this._Memory = value; + this.OnMemoryChanged(); + this.OnPropertyChanged("Memory"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Memory; + partial void OnMemoryChanging(global::System.Nullable value); + partial void OnMemoryChanged(); + /// + /// There are no comments for Property MergeAnswerFile in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MergeAnswerFile + { + get + { + return this._MergeAnswerFile; + } + set + { + this.OnMergeAnswerFileChanging(value); + this._MergeAnswerFile = value; + this.OnMergeAnswerFileChanged(); + this.OnPropertyChanged("MergeAnswerFile"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MergeAnswerFile; + partial void OnMergeAnswerFileChanging(global::System.Nullable value); + partial void OnMergeAnswerFileChanged(); + /// + /// There are no comments for Property ModifiedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ModifiedTime + { + get + { + return this._ModifiedTime; + } + set + { + this.OnModifiedTimeChanging(value); + this._ModifiedTime = value; + this.OnModifiedTimeChanged(); + this.OnPropertyChanged("ModifiedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ModifiedTime; + partial void OnModifiedTimeChanging(global::System.Nullable value); + partial void OnModifiedTimeChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property NetworkUtilization in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable NetworkUtilization + { + get + { + return this._NetworkUtilization; + } + set + { + this.OnNetworkUtilizationChanging(value); + this._NetworkUtilization = value; + this.OnNetworkUtilizationChanged(); + this.OnPropertyChanged("NetworkUtilization"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _NetworkUtilization; + partial void OnNetworkUtilizationChanging(global::System.Nullable value); + partial void OnNetworkUtilizationChanged(); + /// + /// There are no comments for Property OperatingSystem in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string OperatingSystem + { + get + { + return this._OperatingSystem; + } + set + { + this.OnOperatingSystemChanging(value); + this._OperatingSystem = value; + this.OnOperatingSystemChanged(); + this.OnPropertyChanged("OperatingSystem"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _OperatingSystem; + partial void OnOperatingSystemChanging(string value); + partial void OnOperatingSystemChanged(); + /// + /// There are no comments for Property OperatingSystemInstance in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public OperatingSystem OperatingSystemInstance + { + get + { + if (((this._OperatingSystemInstance == null) + && (this._OperatingSystemInstanceInitialized != true))) + { + this._OperatingSystemInstance = new OperatingSystem(); + this._OperatingSystemInstanceInitialized = true; + } + return this._OperatingSystemInstance; + } + set + { + this.OnOperatingSystemInstanceChanging(value); + this._OperatingSystemInstance = value; + this._OperatingSystemInstanceInitialized = true; + this.OnOperatingSystemInstanceChanged(); + this.OnPropertyChanged("OperatingSystemInstance"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private OperatingSystem _OperatingSystemInstance; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _OperatingSystemInstanceInitialized; + partial void OnOperatingSystemInstanceChanging(OperatingSystem value); + partial void OnOperatingSystemInstanceChanged(); + /// + /// There are no comments for Property OSType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string OSType + { + get + { + return this._OSType; + } + set + { + this.OnOSTypeChanging(value); + this._OSType = value; + this.OnOSTypeChanged(); + this.OnPropertyChanged("OSType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _OSType; + partial void OnOSTypeChanging(string value); + partial void OnOSTypeChanged(); + /// + /// There are no comments for Property OrgName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string OrgName + { + get + { + return this._OrgName; + } + set + { + this.OnOrgNameChanging(value); + this._OrgName = value; + this.OnOrgNameChanged(); + this.OnPropertyChanged("OrgName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _OrgName; + partial void OnOrgNameChanging(string value); + partial void OnOrgNameChanged(); + /// + /// There are no comments for Property Owner in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public UserAndRole Owner + { + get + { + if (((this._Owner == null) + && (this._OwnerInitialized != true))) + { + this._Owner = new UserAndRole(); + this._OwnerInitialized = true; + } + return this._Owner; + } + set + { + this.OnOwnerChanging(value); + this._Owner = value; + this._OwnerInitialized = true; + this.OnOwnerChanged(); + this.OnPropertyChanged("Owner"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private UserAndRole _Owner; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _OwnerInitialized; + partial void OnOwnerChanging(UserAndRole value); + partial void OnOwnerChanged(); + /// + /// There are no comments for Property GrantedToList in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection GrantedToList + { + get + { + return this._GrantedToList; + } + set + { + this.OnGrantedToListChanging(value); + this._GrantedToList = value; + this.OnGrantedToListChanged(); + this.OnPropertyChanged("GrantedToList"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _GrantedToList = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnGrantedToListChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnGrantedToListChanged(); + /// + /// There are no comments for Property QuotaPoint in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable QuotaPoint + { + get + { + return this._QuotaPoint; + } + set + { + this.OnQuotaPointChanging(value); + this._QuotaPoint = value; + this.OnQuotaPointChanged(); + this.OnPropertyChanged("QuotaPoint"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _QuotaPoint; + partial void OnQuotaPointChanging(global::System.Nullable value); + partial void OnQuotaPointChanged(); + /// + /// There are no comments for Property ProductKeyHasValue in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ProductKeyHasValue + { + get + { + return this._ProductKeyHasValue; + } + set + { + this.OnProductKeyHasValueChanging(value); + this._ProductKeyHasValue = value; + this.OnProductKeyHasValueChanged(); + this.OnPropertyChanged("ProductKeyHasValue"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ProductKeyHasValue; + partial void OnProductKeyHasValueChanging(global::System.Nullable value); + partial void OnProductKeyHasValueChanged(); + /// + /// There are no comments for Property RelativeWeight in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable RelativeWeight + { + get + { + return this._RelativeWeight; + } + set + { + this.OnRelativeWeightChanging(value); + this._RelativeWeight = value; + this.OnRelativeWeightChanged(); + this.OnPropertyChanged("RelativeWeight"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _RelativeWeight; + partial void OnRelativeWeightChanging(global::System.Nullable value); + partial void OnRelativeWeightChanged(); + /// + /// There are no comments for Property ShareSCSIBus in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ShareSCSIBus + { + get + { + return this._ShareSCSIBus; + } + set + { + this.OnShareSCSIBusChanging(value); + this._ShareSCSIBus = value; + this.OnShareSCSIBusChanged(); + this.OnPropertyChanged("ShareSCSIBus"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ShareSCSIBus; + partial void OnShareSCSIBusChanging(global::System.Nullable value); + partial void OnShareSCSIBusChanged(); + /// + /// There are no comments for Property Tag in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Tag + { + get + { + return this._Tag; + } + set + { + this.OnTagChanging(value); + this._Tag = value; + this.OnTagChanged(); + this.OnPropertyChanged("Tag"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Tag; + partial void OnTagChanging(string value); + partial void OnTagChanged(); + /// + /// There are no comments for Property TimeZone in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable TimeZone + { + get + { + return this._TimeZone; + } + set + { + this.OnTimeZoneChanging(value); + this._TimeZone = value; + this.OnTimeZoneChanged(); + this.OnPropertyChanged("TimeZone"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _TimeZone; + partial void OnTimeZoneChanging(global::System.Nullable value); + partial void OnTimeZoneChanged(); + /// + /// There are no comments for Property TotalVHDCapacity in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable TotalVHDCapacity + { + get + { + return this._TotalVHDCapacity; + } + set + { + this.OnTotalVHDCapacityChanging(value); + this._TotalVHDCapacity = value; + this.OnTotalVHDCapacityChanged(); + this.OnPropertyChanged("TotalVHDCapacity"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _TotalVHDCapacity; + partial void OnTotalVHDCapacityChanging(global::System.Nullable value); + partial void OnTotalVHDCapacityChanged(); + /// + /// There are no comments for Property UndoDisksEnabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UndoDisksEnabled + { + get + { + return this._UndoDisksEnabled; + } + set + { + this.OnUndoDisksEnabledChanging(value); + this._UndoDisksEnabled = value; + this.OnUndoDisksEnabledChanged(); + this.OnPropertyChanged("UndoDisksEnabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UndoDisksEnabled; + partial void OnUndoDisksEnabledChanging(global::System.Nullable value); + partial void OnUndoDisksEnabledChanged(); + /// + /// There are no comments for Property UseHardwareAssistedVirtualization in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseHardwareAssistedVirtualization + { + get + { + return this._UseHardwareAssistedVirtualization; + } + set + { + this.OnUseHardwareAssistedVirtualizationChanging(value); + this._UseHardwareAssistedVirtualization = value; + this.OnUseHardwareAssistedVirtualizationChanged(); + this.OnPropertyChanged("UseHardwareAssistedVirtualization"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseHardwareAssistedVirtualization; + partial void OnUseHardwareAssistedVirtualizationChanging(global::System.Nullable value); + partial void OnUseHardwareAssistedVirtualizationChanged(); + /// + /// There are no comments for Property Accessibility in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Accessibility + { + get + { + return this._Accessibility; + } + set + { + this.OnAccessibilityChanging(value); + this._Accessibility = value; + this.OnAccessibilityChanged(); + this.OnPropertyChanged("Accessibility"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Accessibility; + partial void OnAccessibilityChanging(string value); + partial void OnAccessibilityChanged(); + /// + /// There are no comments for Property CostCenter in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string CostCenter + { + get + { + return this._CostCenter; + } + set + { + this.OnCostCenterChanging(value); + this._CostCenter = value; + this.OnCostCenterChanged(); + this.OnPropertyChanged("CostCenter"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _CostCenter; + partial void OnCostCenterChanging(string value); + partial void OnCostCenterChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property IsTagEmpty in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsTagEmpty + { + get + { + return this._IsTagEmpty; + } + set + { + this.OnIsTagEmptyChanging(value); + this._IsTagEmpty = value; + this.OnIsTagEmptyChanged(); + this.OnPropertyChanged("IsTagEmpty"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsTagEmpty; + partial void OnIsTagEmptyChanging(global::System.Nullable value); + partial void OnIsTagEmptyChanged(); + /// + /// There are no comments for Property NicCount in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable NicCount + { + get + { + return this._NicCount; + } + set + { + this.OnNicCountChanging(value); + this._NicCount = value; + this.OnNicCountChanged(); + this.OnPropertyChanged("NicCount"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _NicCount; + partial void OnNicCountChanging(global::System.Nullable value); + partial void OnNicCountChanged(); + /// + /// There are no comments for Property NumLockEnabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable NumLockEnabled + { + get + { + return this._NumLockEnabled; + } + set + { + this.OnNumLockEnabledChanging(value); + this._NumLockEnabled = value; + this.OnNumLockEnabledChanged(); + this.OnPropertyChanged("NumLockEnabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _NumLockEnabled; + partial void OnNumLockEnabledChanging(global::System.Nullable value); + partial void OnNumLockEnabledChanged(); + /// + /// There are no comments for Property VMAddition in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string VMAddition + { + get + { + return this._VMAddition; + } + set + { + this.OnVMAdditionChanging(value); + this._VMAddition = value; + this.OnVMAdditionChanged(); + this.OnPropertyChanged("VMAddition"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _VMAddition; + partial void OnVMAdditionChanging(string value); + partial void OnVMAdditionChanged(); + /// + /// There are no comments for Property IsCustomizable in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsCustomizable + { + get + { + return this._IsCustomizable; + } + set + { + this.OnIsCustomizableChanging(value); + this._IsCustomizable = value; + this.OnIsCustomizableChanged(); + this.OnPropertyChanged("IsCustomizable"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsCustomizable; + partial void OnIsCustomizableChanging(global::System.Nullable value); + partial void OnIsCustomizableChanged(); + /// + /// There are no comments for Property DomainAdminPasswordIsServiceSetting in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable DomainAdminPasswordIsServiceSetting + { + get + { + return this._DomainAdminPasswordIsServiceSetting; + } + set + { + this.OnDomainAdminPasswordIsServiceSettingChanging(value); + this._DomainAdminPasswordIsServiceSetting = value; + this.OnDomainAdminPasswordIsServiceSettingChanged(); + this.OnPropertyChanged("DomainAdminPasswordIsServiceSetting"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _DomainAdminPasswordIsServiceSetting; + partial void OnDomainAdminPasswordIsServiceSettingChanging(global::System.Nullable value); + partial void OnDomainAdminPasswordIsServiceSettingChanged(); + /// + /// There are no comments for Property SANCopyCapable in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable SANCopyCapable + { + get + { + return this._SANCopyCapable; + } + set + { + this.OnSANCopyCapableChanging(value); + this._SANCopyCapable = value; + this.OnSANCopyCapableChanged(); + this.OnPropertyChanged("SANCopyCapable"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _SANCopyCapable; + partial void OnSANCopyCapableChanging(global::System.Nullable value); + partial void OnSANCopyCapableChanged(); + /// + /// There are no comments for Property IsTemporaryTemplate in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsTemporaryTemplate + { + get + { + return this._IsTemporaryTemplate; + } + set + { + this.OnIsTemporaryTemplateChanging(value); + this._IsTemporaryTemplate = value; + this.OnIsTemporaryTemplateChanged(); + this.OnPropertyChanged("IsTemporaryTemplate"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsTemporaryTemplate; + partial void OnIsTemporaryTemplateChanging(global::System.Nullable value); + partial void OnIsTemporaryTemplateChanged(); + /// + /// There are no comments for Property VMTemplateId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VMTemplateId + { + get + { + return this._VMTemplateId; + } + set + { + this.OnVMTemplateIdChanging(value); + this._VMTemplateId = value; + this.OnVMTemplateIdChanged(); + this.OnPropertyChanged("VMTemplateId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VMTemplateId; + partial void OnVMTemplateIdChanging(global::System.Nullable value); + partial void OnVMTemplateIdChanged(); + /// + /// There are no comments for Property VirtualHardDiskId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VirtualHardDiskId + { + get + { + return this._VirtualHardDiskId; + } + set + { + this.OnVirtualHardDiskIdChanging(value); + this._VirtualHardDiskId = value; + this.OnVirtualHardDiskIdChanged(); + this.OnPropertyChanged("VirtualHardDiskId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VirtualHardDiskId; + partial void OnVirtualHardDiskIdChanging(global::System.Nullable value); + partial void OnVirtualHardDiskIdChanged(); + /// + /// There are no comments for Property VMId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VMId + { + get + { + return this._VMId; + } + set + { + this.OnVMIdChanging(value); + this._VMId = value; + this.OnVMIdChanged(); + this.OnPropertyChanged("VMId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VMId; + partial void OnVMIdChanging(global::System.Nullable value); + partial void OnVMIdChanged(); + /// + /// There are no comments for Property SharePath in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string SharePath + { + get + { + return this._SharePath; + } + set + { + this.OnSharePathChanging(value); + this._SharePath = value; + this.OnSharePathChanged(); + this.OnPropertyChanged("SharePath"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _SharePath; + partial void OnSharePathChanging(string value); + partial void OnSharePathChanged(); + /// + /// There are no comments for Property ApplicationProfileId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ApplicationProfileId + { + get + { + return this._ApplicationProfileId; + } + set + { + this.OnApplicationProfileIdChanging(value); + this._ApplicationProfileId = value; + this.OnApplicationProfileIdChanged(); + this.OnPropertyChanged("ApplicationProfileId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ApplicationProfileId; + partial void OnApplicationProfileIdChanging(global::System.Nullable value); + partial void OnApplicationProfileIdChanged(); + /// + /// There are no comments for Property CloudID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CloudID + { + get + { + return this._CloudID; + } + set + { + this.OnCloudIDChanging(value); + this._CloudID = value; + this.OnCloudIDChanged(); + this.OnPropertyChanged("CloudID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CloudID; + partial void OnCloudIDChanging(global::System.Nullable value); + partial void OnCloudIDChanged(); + /// + /// There are no comments for Property DynamicMemoryBufferPercentage in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable DynamicMemoryBufferPercentage + { + get + { + return this._DynamicMemoryBufferPercentage; + } + set + { + this.OnDynamicMemoryBufferPercentageChanging(value); + this._DynamicMemoryBufferPercentage = value; + this.OnDynamicMemoryBufferPercentageChanged(); + this.OnPropertyChanged("DynamicMemoryBufferPercentage"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _DynamicMemoryBufferPercentage; + partial void OnDynamicMemoryBufferPercentageChanging(global::System.Nullable value); + partial void OnDynamicMemoryBufferPercentageChanged(); + /// + /// There are no comments for Property DynamicMemoryEnabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable DynamicMemoryEnabled + { + get + { + return this._DynamicMemoryEnabled; + } + set + { + this.OnDynamicMemoryEnabledChanging(value); + this._DynamicMemoryEnabled = value; + this.OnDynamicMemoryEnabledChanged(); + this.OnPropertyChanged("DynamicMemoryEnabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _DynamicMemoryEnabled; + partial void OnDynamicMemoryEnabledChanging(global::System.Nullable value); + partial void OnDynamicMemoryEnabledChanged(); + /// + /// There are no comments for Property DynamicMemoryMaximumMB in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable DynamicMemoryMaximumMB + { + get + { + return this._DynamicMemoryMaximumMB; + } + set + { + this.OnDynamicMemoryMaximumMBChanging(value); + this._DynamicMemoryMaximumMB = value; + this.OnDynamicMemoryMaximumMBChanged(); + this.OnPropertyChanged("DynamicMemoryMaximumMB"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _DynamicMemoryMaximumMB; + partial void OnDynamicMemoryMaximumMBChanging(global::System.Nullable value); + partial void OnDynamicMemoryMaximumMBChanged(); + /// + /// There are no comments for Property MemoryWeight in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MemoryWeight + { + get + { + return this._MemoryWeight; + } + set + { + this.OnMemoryWeightChanging(value); + this._MemoryWeight = value; + this.OnMemoryWeightChanged(); + this.OnPropertyChanged("MemoryWeight"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MemoryWeight; + partial void OnMemoryWeightChanging(global::System.Nullable value); + partial void OnMemoryWeightChanged(); + /// + /// There are no comments for Property DynamicMemoryPreferredBufferPercentage in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable DynamicMemoryPreferredBufferPercentage + { + get + { + return this._DynamicMemoryPreferredBufferPercentage; + } + set + { + this.OnDynamicMemoryPreferredBufferPercentageChanging(value); + this._DynamicMemoryPreferredBufferPercentage = value; + this.OnDynamicMemoryPreferredBufferPercentageChanged(); + this.OnPropertyChanged("DynamicMemoryPreferredBufferPercentage"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _DynamicMemoryPreferredBufferPercentage; + partial void OnDynamicMemoryPreferredBufferPercentageChanging(global::System.Nullable value); + partial void OnDynamicMemoryPreferredBufferPercentageChanged(); + /// + /// There are no comments for Property SQLProfileId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable SQLProfileId + { + get + { + return this._SQLProfileId; + } + set + { + this.OnSQLProfileIdChanging(value); + this._SQLProfileId = value; + this.OnSQLProfileIdChanged(); + this.OnPropertyChanged("SQLProfileId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _SQLProfileId; + partial void OnSQLProfileIdChanging(global::System.Nullable value); + partial void OnSQLProfileIdChanged(); + /// + /// There are no comments for Property VirtualFloppyDriveId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VirtualFloppyDriveId + { + get + { + return this._VirtualFloppyDriveId; + } + set + { + this.OnVirtualFloppyDriveIdChanging(value); + this._VirtualFloppyDriveId = value; + this.OnVirtualFloppyDriveIdChanged(); + this.OnPropertyChanged("VirtualFloppyDriveId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VirtualFloppyDriveId; + partial void OnVirtualFloppyDriveIdChanging(global::System.Nullable value); + partial void OnVirtualFloppyDriveIdChanged(); + /// + /// There are no comments for Property BootOrder in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection BootOrder + { + get + { + return this._BootOrder; + } + set + { + this.OnBootOrderChanging(value); + this._BootOrder = value; + this.OnBootOrderChanged(); + this.OnPropertyChanged("BootOrder"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _BootOrder = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnBootOrderChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnBootOrderChanged(); + /// + /// There are no comments for Property CustomProperties in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection CustomProperties + { + get + { + return this._CustomProperties; + } + set + { + this.OnCustomPropertiesChanging(value); + this._CustomProperties = value; + this.OnCustomPropertiesChanged(); + this.OnPropertyChanged("CustomProperties"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _CustomProperties = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnCustomPropertiesChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnCustomPropertiesChanged(); + /// + /// There are no comments for Property GuiRunOnceCommands in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection GuiRunOnceCommands + { + get + { + return this._GuiRunOnceCommands; + } + set + { + this.OnGuiRunOnceCommandsChanging(value); + this._GuiRunOnceCommands = value; + this.OnGuiRunOnceCommandsChanged(); + this.OnPropertyChanged("GuiRunOnceCommands"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _GuiRunOnceCommands = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnGuiRunOnceCommandsChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnGuiRunOnceCommandsChanged(); + /// + /// There are no comments for Property ServerFeatures in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection ServerFeatures + { + get + { + return this._ServerFeatures; + } + set + { + this.OnServerFeaturesChanging(value); + this._ServerFeatures = value; + this.OnServerFeaturesChanged(); + this.OnPropertyChanged("ServerFeatures"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _ServerFeatures = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnServerFeaturesChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnServerFeaturesChanged(); + /// + /// There are no comments for Property Status in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Status + { + get + { + return this._Status; + } + set + { + this.OnStatusChanging(value); + this._Status = value; + this.OnStatusChanged(); + this.OnPropertyChanged("Status"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Status; + partial void OnStatusChanging(string value); + partial void OnStatusChanged(); + /// + /// There are no comments for Property VirtualizationPlatform in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string VirtualizationPlatform + { + get + { + return this._VirtualizationPlatform; + } + set + { + this.OnVirtualizationPlatformChanging(value); + this._VirtualizationPlatform = value; + this.OnVirtualizationPlatformChanged(); + this.OnPropertyChanged("VirtualizationPlatform"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _VirtualizationPlatform; + partial void OnVirtualizationPlatformChanging(string value); + partial void OnVirtualizationPlatformChanged(); + /// + /// There are no comments for Property CapabilityProfile in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string CapabilityProfile + { + get + { + return this._CapabilityProfile; + } + set + { + this.OnCapabilityProfileChanging(value); + this._CapabilityProfile = value; + this.OnCapabilityProfileChanged(); + this.OnPropertyChanged("CapabilityProfile"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _CapabilityProfile; + partial void OnCapabilityProfileChanging(string value); + partial void OnCapabilityProfileChanged(); + /// + /// There are no comments for Property AutoLogonCount in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable AutoLogonCount + { + get + { + return this._AutoLogonCount; + } + set + { + this.OnAutoLogonCountChanging(value); + this._AutoLogonCount = value; + this.OnAutoLogonCountChanged(); + this.OnPropertyChanged("AutoLogonCount"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _AutoLogonCount; + partial void OnAutoLogonCountChanging(global::System.Nullable value); + partial void OnAutoLogonCountChanged(); + /// + /// There are no comments for Property DomainJoinOrganizationalUnit in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DomainJoinOrganizationalUnit + { + get + { + return this._DomainJoinOrganizationalUnit; + } + set + { + this.OnDomainJoinOrganizationalUnitChanging(value); + this._DomainJoinOrganizationalUnit = value; + this.OnDomainJoinOrganizationalUnitChanged(); + this.OnPropertyChanged("DomainJoinOrganizationalUnit"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DomainJoinOrganizationalUnit; + partial void OnDomainJoinOrganizationalUnitChanging(string value); + partial void OnDomainJoinOrganizationalUnitChanged(); + /// + /// There are no comments for Property SANStatus in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection SANStatus + { + get + { + return this._SANStatus; + } + set + { + this.OnSANStatusChanging(value); + this._SANStatus = value; + this.OnSANStatusChanged(); + this.OnPropertyChanged("SANStatus"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _SANStatus = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnSANStatusChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnSANStatusChanged(); + /// + /// There are no comments for Property Generation in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Generation + { + get + { + return this._Generation; + } + set + { + this.OnGenerationChanging(value); + this._Generation = value; + this.OnGenerationChanged(); + this.OnPropertyChanged("Generation"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Generation; + partial void OnGenerationChanging(global::System.Nullable value); + partial void OnGenerationChanged(); + /// + /// There are no comments for VirtualNetworkAdapters in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection VirtualNetworkAdapters + { + get + { + return this._VirtualNetworkAdapters; + } + set + { + this._VirtualNetworkAdapters = value; + this.OnPropertyChanged("VirtualNetworkAdapters"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _VirtualNetworkAdapters = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + /// + /// There are no comments for VirtualSCSIAdapters in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection VirtualSCSIAdapters + { + get + { + return this._VirtualSCSIAdapters; + } + set + { + this._VirtualSCSIAdapters = value; + this.OnPropertyChanged("VirtualSCSIAdapters"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _VirtualSCSIAdapters = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + /// + /// There are no comments for VirtualHardDisks in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection VirtualHardDisks + { + get + { + return this._VirtualHardDisks; + } + set + { + this._VirtualHardDisks = value; + this.OnPropertyChanged("VirtualHardDisks"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _VirtualHardDisks = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + /// + /// There are no comments for VirtualDVDDrives in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection VirtualDVDDrives + { + get + { + return this._VirtualDVDDrives; + } + set + { + this._VirtualDVDDrives = value; + this.OnPropertyChanged("VirtualDVDDrives"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _VirtualDVDDrives = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + /// + /// There are no comments for VirtualDiskDrives in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection VirtualDiskDrives + { + get + { + return this._VirtualDiskDrives; + } + set + { + this._VirtualDiskDrives = value; + this.OnPropertyChanged("VirtualDiskDrives"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _VirtualDiskDrives = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.VirtualNetworkAdapter in the schema. + /// + /// + /// ID + /// StampId + /// + [global::System.Data.Services.Common.EntitySetAttribute("VirtualNetworkAdapters")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ID", "StampId")] + public partial class VirtualNetworkAdapter : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new VirtualNetworkAdapter object. + /// + /// Initial value of ID. + /// Initial value of StampId. + /// Initial value of ChildObjectIDs. + /// Initial value of IPv4Addresses. + /// Initial value of IPv6Addresses. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static VirtualNetworkAdapter CreateVirtualNetworkAdapter(global::System.Guid ID, global::System.Guid stampId, global::System.Collections.ObjectModel.ObservableCollection childObjectIDs, global::System.Collections.ObjectModel.ObservableCollection iPv4Addresses, global::System.Collections.ObjectModel.ObservableCollection iPv6Addresses) + { + VirtualNetworkAdapter virtualNetworkAdapter = new VirtualNetworkAdapter(); + virtualNetworkAdapter.ID = ID; + virtualNetworkAdapter.StampId = stampId; + if ((childObjectIDs == null)) + { + throw new global::System.ArgumentNullException("childObjectIDs"); + } + virtualNetworkAdapter.ChildObjectIDs = childObjectIDs; + if ((iPv4Addresses == null)) + { + throw new global::System.ArgumentNullException("iPv4Addresses"); + } + virtualNetworkAdapter.IPv4Addresses = iPv4Addresses; + if ((iPv6Addresses == null)) + { + throw new global::System.ArgumentNullException("iPv6Addresses"); + } + virtualNetworkAdapter.IPv6Addresses = iPv6Addresses; + return virtualNetworkAdapter; + } + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this._ID = value; + this.OnIDChanged(); + this.OnPropertyChanged("ID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ID; + partial void OnIDChanging(global::System.Guid value); + partial void OnIDChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property VMwarePortGroup in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string VMwarePortGroup + { + get + { + return this._VMwarePortGroup; + } + set + { + this.OnVMwarePortGroupChanging(value); + this._VMwarePortGroup = value; + this.OnVMwarePortGroupChanged(); + this.OnPropertyChanged("VMwarePortGroup"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _VMwarePortGroup; + partial void OnVMwarePortGroupChanging(string value); + partial void OnVMwarePortGroupChanged(); + /// + /// There are no comments for Property EthernetAddressType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string EthernetAddressType + { + get + { + return this._EthernetAddressType; + } + set + { + this.OnEthernetAddressTypeChanging(value); + this._EthernetAddressType = value; + this.OnEthernetAddressTypeChanged(); + this.OnPropertyChanged("EthernetAddressType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _EthernetAddressType; + partial void OnEthernetAddressTypeChanging(string value); + partial void OnEthernetAddressTypeChanged(); + /// + /// There are no comments for Property PhysicalAddressType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string PhysicalAddressType + { + get + { + return this._PhysicalAddressType; + } + set + { + this.OnPhysicalAddressTypeChanging(value); + this._PhysicalAddressType = value; + this.OnPhysicalAddressTypeChanged(); + this.OnPropertyChanged("PhysicalAddressType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _PhysicalAddressType; + partial void OnPhysicalAddressTypeChanging(string value); + partial void OnPhysicalAddressTypeChanged(); + /// + /// There are no comments for Property EthernetAddress in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string EthernetAddress + { + get + { + return this._EthernetAddress; + } + set + { + this.OnEthernetAddressChanging(value); + this._EthernetAddress = value; + this.OnEthernetAddressChanged(); + this.OnPropertyChanged("EthernetAddress"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _EthernetAddress; + partial void OnEthernetAddressChanging(string value); + partial void OnEthernetAddressChanged(); + /// + /// There are no comments for Property PhysicalAddress in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string PhysicalAddress + { + get + { + return this._PhysicalAddress; + } + set + { + this.OnPhysicalAddressChanging(value); + this._PhysicalAddress = value; + this.OnPhysicalAddressChanged(); + this.OnPropertyChanged("PhysicalAddress"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _PhysicalAddress; + partial void OnPhysicalAddressChanging(string value); + partial void OnPhysicalAddressChanged(); + /// + /// There are no comments for Property VirtualNetworkAdapterType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string VirtualNetworkAdapterType + { + get + { + return this._VirtualNetworkAdapterType; + } + set + { + this.OnVirtualNetworkAdapterTypeChanging(value); + this._VirtualNetworkAdapterType = value; + this.OnVirtualNetworkAdapterTypeChanged(); + this.OnPropertyChanged("VirtualNetworkAdapterType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _VirtualNetworkAdapterType; + partial void OnVirtualNetworkAdapterTypeChanging(string value); + partial void OnVirtualNetworkAdapterTypeChanged(); + /// + /// There are no comments for Property Location in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Location + { + get + { + return this._Location; + } + set + { + this.OnLocationChanging(value); + this._Location = value; + this.OnLocationChanged(); + this.OnPropertyChanged("Location"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Location; + partial void OnLocationChanging(string value); + partial void OnLocationChanged(); + /// + /// There are no comments for Property Tag in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Tag + { + get + { + return this._Tag; + } + set + { + this.OnTagChanging(value); + this._Tag = value; + this.OnTagChanged(); + this.OnPropertyChanged("Tag"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Tag; + partial void OnTagChanging(string value); + partial void OnTagChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property VMNetworkId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VMNetworkId + { + get + { + return this._VMNetworkId; + } + set + { + this.OnVMNetworkIdChanging(value); + this._VMNetworkId = value; + this.OnVMNetworkIdChanged(); + this.OnPropertyChanged("VMNetworkId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VMNetworkId; + partial void OnVMNetworkIdChanging(global::System.Nullable value); + partial void OnVMNetworkIdChanged(); + /// + /// There are no comments for Property VMNetworkName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string VMNetworkName + { + get + { + return this._VMNetworkName; + } + set + { + this.OnVMNetworkNameChanging(value); + this._VMNetworkName = value; + this.OnVMNetworkNameChanged(); + this.OnPropertyChanged("VMNetworkName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _VMNetworkName; + partial void OnVMNetworkNameChanging(string value); + partial void OnVMNetworkNameChanged(); + /// + /// There are no comments for Property VMSubnetId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VMSubnetId + { + get + { + return this._VMSubnetId; + } + set + { + this.OnVMSubnetIdChanging(value); + this._VMSubnetId = value; + this.OnVMSubnetIdChanged(); + this.OnPropertyChanged("VMSubnetId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VMSubnetId; + partial void OnVMSubnetIdChanging(global::System.Nullable value); + partial void OnVMSubnetIdChanged(); + /// + /// There are no comments for Property TemplateId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable TemplateId + { + get + { + return this._TemplateId; + } + set + { + this.OnTemplateIdChanging(value); + this._TemplateId = value; + this.OnTemplateIdChanged(); + this.OnPropertyChanged("TemplateId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _TemplateId; + partial void OnTemplateIdChanging(global::System.Nullable value); + partial void OnTemplateIdChanged(); + /// + /// There are no comments for Property VMId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VMId + { + get + { + return this._VMId; + } + set + { + this.OnVMIdChanging(value); + this._VMId = value; + this.OnVMIdChanged(); + this.OnPropertyChanged("VMId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VMId; + partial void OnVMIdChanging(global::System.Nullable value); + partial void OnVMIdChanged(); + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property MACAddressesSpoofingEnabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MACAddressesSpoofingEnabled + { + get + { + return this._MACAddressesSpoofingEnabled; + } + set + { + this.OnMACAddressesSpoofingEnabledChanging(value); + this._MACAddressesSpoofingEnabled = value; + this.OnMACAddressesSpoofingEnabledChanged(); + this.OnPropertyChanged("MACAddressesSpoofingEnabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MACAddressesSpoofingEnabled; + partial void OnMACAddressesSpoofingEnabledChanging(global::System.Nullable value); + partial void OnMACAddressesSpoofingEnabledChanged(); + /// + /// There are no comments for Property SlotId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable SlotId + { + get + { + return this._SlotId; + } + set + { + this.OnSlotIdChanging(value); + this._SlotId = value; + this.OnSlotIdChanged(); + this.OnPropertyChanged("SlotId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _SlotId; + partial void OnSlotIdChanging(global::System.Nullable value); + partial void OnSlotIdChanged(); + /// + /// There are no comments for Property VLanEnabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VLanEnabled + { + get + { + return this._VLanEnabled; + } + set + { + this.OnVLanEnabledChanging(value); + this._VLanEnabled = value; + this.OnVLanEnabledChanged(); + this.OnPropertyChanged("VLanEnabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VLanEnabled; + partial void OnVLanEnabledChanging(global::System.Nullable value); + partial void OnVLanEnabledChanged(); + /// + /// There are no comments for Property VLanId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VLanId + { + get + { + return this._VLanId; + } + set + { + this.OnVLanIdChanging(value); + this._VLanId = value; + this.OnVLanIdChanged(); + this.OnPropertyChanged("VLanId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VLanId; + partial void OnVLanIdChanging(global::System.Nullable value); + partial void OnVLanIdChanged(); + /// + /// There are no comments for Property VMNetworkOptimizationEnabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VMNetworkOptimizationEnabled + { + get + { + return this._VMNetworkOptimizationEnabled; + } + set + { + this.OnVMNetworkOptimizationEnabledChanging(value); + this._VMNetworkOptimizationEnabled = value; + this.OnVMNetworkOptimizationEnabledChanged(); + this.OnPropertyChanged("VMNetworkOptimizationEnabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VMNetworkOptimizationEnabled; + partial void OnVMNetworkOptimizationEnabledChanging(global::System.Nullable value); + partial void OnVMNetworkOptimizationEnabledChanged(); + /// + /// There are no comments for Property VmwAdapterIndex in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VmwAdapterIndex + { + get + { + return this._VmwAdapterIndex; + } + set + { + this.OnVmwAdapterIndexChanging(value); + this._VmwAdapterIndex = value; + this.OnVmwAdapterIndexChanged(); + this.OnPropertyChanged("VmwAdapterIndex"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VmwAdapterIndex; + partial void OnVmwAdapterIndexChanging(global::System.Nullable value); + partial void OnVmwAdapterIndexChanged(); + /// + /// There are no comments for Property Accessibility in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Accessibility + { + get + { + return this._Accessibility; + } + set + { + this.OnAccessibilityChanging(value); + this._Accessibility = value; + this.OnAccessibilityChanged(); + this.OnPropertyChanged("Accessibility"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Accessibility; + partial void OnAccessibilityChanging(string value); + partial void OnAccessibilityChanged(); + /// + /// There are no comments for Property AddedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable AddedTime + { + get + { + return this._AddedTime; + } + set + { + this.OnAddedTimeChanging(value); + this._AddedTime = value; + this.OnAddedTimeChanged(); + this.OnPropertyChanged("AddedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _AddedTime; + partial void OnAddedTimeChanging(global::System.Nullable value); + partial void OnAddedTimeChanged(); + /// + /// There are no comments for Property ChildObjectIDs in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection ChildObjectIDs + { + get + { + return this._ChildObjectIDs; + } + set + { + this.OnChildObjectIDsChanging(value); + this._ChildObjectIDs = value; + this.OnChildObjectIDsChanged(); + this.OnPropertyChanged("ChildObjectIDs"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _ChildObjectIDs = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnChildObjectIDsChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnChildObjectIDsChanged(); + /// + /// There are no comments for Property Enabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Enabled + { + get + { + return this._Enabled; + } + set + { + this.OnEnabledChanging(value); + this._Enabled = value; + this.OnEnabledChanged(); + this.OnPropertyChanged("Enabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Enabled; + partial void OnEnabledChanging(global::System.Nullable value); + partial void OnEnabledChanged(); + /// + /// There are no comments for Property IPv4AddressType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string IPv4AddressType + { + get + { + return this._IPv4AddressType; + } + set + { + this.OnIPv4AddressTypeChanging(value); + this._IPv4AddressType = value; + this.OnIPv4AddressTypeChanged(); + this.OnPropertyChanged("IPv4AddressType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _IPv4AddressType; + partial void OnIPv4AddressTypeChanging(string value); + partial void OnIPv4AddressTypeChanged(); + /// + /// There are no comments for Property IPv6AddressType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string IPv6AddressType + { + get + { + return this._IPv6AddressType; + } + set + { + this.OnIPv6AddressTypeChanging(value); + this._IPv6AddressType = value; + this.OnIPv6AddressTypeChanged(); + this.OnPropertyChanged("IPv6AddressType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _IPv6AddressType; + partial void OnIPv6AddressTypeChanging(string value); + partial void OnIPv6AddressTypeChanged(); + /// + /// There are no comments for Property IPv4Addresses in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection IPv4Addresses + { + get + { + return this._IPv4Addresses; + } + set + { + this.OnIPv4AddressesChanging(value); + this._IPv4Addresses = value; + this.OnIPv4AddressesChanged(); + this.OnPropertyChanged("IPv4Addresses"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _IPv4Addresses = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnIPv4AddressesChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnIPv4AddressesChanged(); + /// + /// There are no comments for Property IPv6Addresses in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection IPv6Addresses + { + get + { + return this._IPv6Addresses; + } + set + { + this.OnIPv6AddressesChanging(value); + this._IPv6Addresses = value; + this.OnIPv6AddressesChanged(); + this.OnPropertyChanged("IPv6Addresses"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _IPv6Addresses = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnIPv6AddressesChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnIPv6AddressesChanged(); + /// + /// There are no comments for Property MACAddress in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string MACAddress + { + get + { + return this._MACAddress; + } + set + { + this.OnMACAddressChanging(value); + this._MACAddress = value; + this.OnMACAddressChanged(); + this.OnPropertyChanged("MACAddress"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _MACAddress; + partial void OnMACAddressChanging(string value); + partial void OnMACAddressChanged(); + /// + /// There are no comments for Property MACAddressesSpoolingEnabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MACAddressesSpoolingEnabled + { + get + { + return this._MACAddressesSpoolingEnabled; + } + set + { + this.OnMACAddressesSpoolingEnabledChanging(value); + this._MACAddressesSpoolingEnabled = value; + this.OnMACAddressesSpoolingEnabledChanged(); + this.OnPropertyChanged("MACAddressesSpoolingEnabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MACAddressesSpoolingEnabled; + partial void OnMACAddressesSpoolingEnabledChanging(global::System.Nullable value); + partial void OnMACAddressesSpoolingEnabledChanged(); + /// + /// There are no comments for Property MACAddressSpoofingEnabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MACAddressSpoofingEnabled + { + get + { + return this._MACAddressSpoofingEnabled; + } + set + { + this.OnMACAddressSpoofingEnabledChanging(value); + this._MACAddressSpoofingEnabled = value; + this.OnMACAddressSpoofingEnabledChanged(); + this.OnPropertyChanged("MACAddressSpoofingEnabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MACAddressSpoofingEnabled; + partial void OnMACAddressSpoofingEnabledChanging(global::System.Nullable value); + partial void OnMACAddressSpoofingEnabledChanged(); + /// + /// There are no comments for Property EnableMACAddressSpoofing in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable EnableMACAddressSpoofing + { + get + { + return this._EnableMACAddressSpoofing; + } + set + { + this.OnEnableMACAddressSpoofingChanging(value); + this._EnableMACAddressSpoofing = value; + this.OnEnableMACAddressSpoofingChanged(); + this.OnPropertyChanged("EnableMACAddressSpoofing"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _EnableMACAddressSpoofing; + partial void OnEnableMACAddressSpoofingChanging(global::System.Nullable value); + partial void OnEnableMACAddressSpoofingChanged(); + /// + /// There are no comments for Property MACAddressType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string MACAddressType + { + get + { + return this._MACAddressType; + } + set + { + this.OnMACAddressTypeChanging(value); + this._MACAddressType = value; + this.OnMACAddressTypeChanged(); + this.OnPropertyChanged("MACAddressType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _MACAddressType; + partial void OnMACAddressTypeChanging(string value); + partial void OnMACAddressTypeChanged(); + /// + /// There are no comments for Property ModifiedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ModifiedTime + { + get + { + return this._ModifiedTime; + } + set + { + this.OnModifiedTimeChanging(value); + this._ModifiedTime = value; + this.OnModifiedTimeChanged(); + this.OnPropertyChanged("ModifiedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ModifiedTime; + partial void OnModifiedTimeChanging(global::System.Nullable value); + partial void OnModifiedTimeChanged(); + /// + /// There are no comments for Property ParentId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ParentId + { + get + { + return this._ParentId; + } + set + { + this.OnParentIdChanging(value); + this._ParentId = value; + this.OnParentIdChanged(); + this.OnPropertyChanged("ParentId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ParentId; + partial void OnParentIdChanging(global::System.Nullable value); + partial void OnParentIdChanged(); + /// + /// There are no comments for Property RequiredBandwidth in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string RequiredBandwidth + { + get + { + return this._RequiredBandwidth; + } + set + { + this.OnRequiredBandwidthChanging(value); + this._RequiredBandwidth = value; + this.OnRequiredBandwidthChanged(); + this.OnPropertyChanged("RequiredBandwidth"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _RequiredBandwidth; + partial void OnRequiredBandwidthChanging(string value); + partial void OnRequiredBandwidthChanged(); + /// + /// There are no comments for Property IsSynthetic in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsSynthetic + { + get + { + return this._IsSynthetic; + } + set + { + this.OnIsSyntheticChanging(value); + this._IsSynthetic = value; + this.OnIsSyntheticChanged(); + this.OnPropertyChanged("IsSynthetic"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsSynthetic; + partial void OnIsSyntheticChanging(global::System.Nullable value); + partial void OnIsSyntheticChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.VirtualSCSIAdapter in the schema. + /// + /// + /// ID + /// StampId + /// + [global::System.Data.Services.Common.EntitySetAttribute("VirtualSCSIAdapters")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ID", "StampId")] + public partial class VirtualSCSIAdapter : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new VirtualSCSIAdapter object. + /// + /// Initial value of ID. + /// Initial value of StampId. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static VirtualSCSIAdapter CreateVirtualSCSIAdapter(global::System.Guid ID, global::System.Guid stampId) + { + VirtualSCSIAdapter virtualSCSIAdapter = new VirtualSCSIAdapter(); + virtualSCSIAdapter.ID = ID; + virtualSCSIAdapter.StampId = stampId; + return virtualSCSIAdapter; + } + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this._ID = value; + this.OnIDChanged(); + this.OnPropertyChanged("ID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ID; + partial void OnIDChanging(global::System.Guid value); + partial void OnIDChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property AdapterID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable AdapterID + { + get + { + return this._AdapterID; + } + set + { + this.OnAdapterIDChanging(value); + this._AdapterID = value; + this.OnAdapterIDChanged(); + this.OnPropertyChanged("AdapterID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _AdapterID; + partial void OnAdapterIDChanging(global::System.Nullable value); + partial void OnAdapterIDChanged(); + /// + /// There are no comments for Property Bus in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Bus + { + get + { + return this._Bus; + } + set + { + this.OnBusChanging(value); + this._Bus = value; + this.OnBusChanged(); + this.OnPropertyChanged("Bus"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Bus; + partial void OnBusChanging(global::System.Nullable value); + partial void OnBusChanged(); + /// + /// There are no comments for Property Shared in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Shared + { + get + { + return this._Shared; + } + set + { + this.OnSharedChanging(value); + this._Shared = value; + this.OnSharedChanged(); + this.OnPropertyChanged("Shared"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Shared; + partial void OnSharedChanging(global::System.Nullable value); + partial void OnSharedChanged(); + /// + /// There are no comments for Property TemplateId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable TemplateId + { + get + { + return this._TemplateId; + } + set + { + this.OnTemplateIdChanging(value); + this._TemplateId = value; + this.OnTemplateIdChanged(); + this.OnPropertyChanged("TemplateId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _TemplateId; + partial void OnTemplateIdChanging(global::System.Nullable value); + partial void OnTemplateIdChanged(); + /// + /// There are no comments for Property VMId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VMId + { + get + { + return this._VMId; + } + set + { + this.OnVMIdChanging(value); + this._VMId = value; + this.OnVMIdChanged(); + this.OnPropertyChanged("VMId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VMId; + partial void OnVMIdChanging(global::System.Nullable value); + partial void OnVMIdChanged(); + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property SCSIControllerType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string SCSIControllerType + { + get + { + return this._SCSIControllerType; + } + set + { + this.OnSCSIControllerTypeChanging(value); + this._SCSIControllerType = value; + this.OnSCSIControllerTypeChanged(); + this.OnPropertyChanged("SCSIControllerType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _SCSIControllerType; + partial void OnSCSIControllerTypeChanging(string value); + partial void OnSCSIControllerTypeChanged(); + /// + /// There are no comments for Property Accessibility in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Accessibility + { + get + { + return this._Accessibility; + } + set + { + this.OnAccessibilityChanging(value); + this._Accessibility = value; + this.OnAccessibilityChanged(); + this.OnPropertyChanged("Accessibility"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Accessibility; + partial void OnAccessibilityChanging(string value); + partial void OnAccessibilityChanged(); + /// + /// There are no comments for Property AddedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable AddedTime + { + get + { + return this._AddedTime; + } + set + { + this.OnAddedTimeChanging(value); + this._AddedTime = value; + this.OnAddedTimeChanged(); + this.OnPropertyChanged("AddedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _AddedTime; + partial void OnAddedTimeChanging(global::System.Nullable value); + partial void OnAddedTimeChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property Enabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Enabled + { + get + { + return this._Enabled; + } + set + { + this.OnEnabledChanging(value); + this._Enabled = value; + this.OnEnabledChanged(); + this.OnPropertyChanged("Enabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Enabled; + partial void OnEnabledChanging(global::System.Nullable value); + partial void OnEnabledChanged(); + /// + /// There are no comments for Property ModifiedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ModifiedTime + { + get + { + return this._ModifiedTime; + } + set + { + this.OnModifiedTimeChanging(value); + this._ModifiedTime = value; + this.OnModifiedTimeChanged(); + this.OnPropertyChanged("ModifiedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ModifiedTime; + partial void OnModifiedTimeChanging(global::System.Nullable value); + partial void OnModifiedTimeChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.ISO in the schema. + /// + /// + /// ID + /// StampId + /// + [global::System.Data.Services.Common.EntitySetAttribute("ISOs")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ID", "StampId")] + public partial class ISO : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new ISO object. + /// + /// Initial value of ID. + /// Initial value of StampId. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static ISO CreateISO(global::System.Guid ID, global::System.Guid stampId) + { + ISO iSO = new ISO(); + iSO.ID = ID; + iSO.StampId = stampId; + return iSO; + } + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this._ID = value; + this.OnIDChanged(); + this.OnPropertyChanged("ID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ID; + partial void OnIDChanging(global::System.Guid value); + partial void OnIDChanged(); + /// + /// There are no comments for Property State in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string State + { + get + { + return this._State; + } + set + { + this.OnStateChanging(value); + this._State = value; + this.OnStateChanged(); + this.OnPropertyChanged("State"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _State; + partial void OnStateChanging(string value); + partial void OnStateChanged(); + /// + /// There are no comments for Property SharePath in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string SharePath + { + get + { + return this._SharePath; + } + set + { + this.OnSharePathChanging(value); + this._SharePath = value; + this.OnSharePathChanged(); + this.OnPropertyChanged("SharePath"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _SharePath; + partial void OnSharePathChanging(string value); + partial void OnSharePathChanged(); + /// + /// There are no comments for Property Directory in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Directory + { + get + { + return this._Directory; + } + set + { + this.OnDirectoryChanging(value); + this._Directory = value; + this.OnDirectoryChanged(); + this.OnPropertyChanged("Directory"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Directory; + partial void OnDirectoryChanging(string value); + partial void OnDirectoryChanged(); + /// + /// There are no comments for Property Size in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Size + { + get + { + return this._Size; + } + set + { + this.OnSizeChanging(value); + this._Size = value; + this.OnSizeChanged(); + this.OnPropertyChanged("Size"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Size; + partial void OnSizeChanging(global::System.Nullable value); + partial void OnSizeChanged(); + /// + /// There are no comments for Property LibraryGroup in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string LibraryGroup + { + get + { + return this._LibraryGroup; + } + set + { + this.OnLibraryGroupChanging(value); + this._LibraryGroup = value; + this.OnLibraryGroupChanged(); + this.OnPropertyChanged("LibraryGroup"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _LibraryGroup; + partial void OnLibraryGroupChanging(string value); + partial void OnLibraryGroupChanged(); + /// + /// There are no comments for Property Owner in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public UserAndRole Owner + { + get + { + if (((this._Owner == null) + && (this._OwnerInitialized != true))) + { + this._Owner = new UserAndRole(); + this._OwnerInitialized = true; + } + return this._Owner; + } + set + { + this.OnOwnerChanging(value); + this._Owner = value; + this._OwnerInitialized = true; + this.OnOwnerChanged(); + this.OnPropertyChanged("Owner"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private UserAndRole _Owner; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _OwnerInitialized; + partial void OnOwnerChanging(UserAndRole value); + partial void OnOwnerChanged(); + /// + /// There are no comments for Property OwnerSid in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string OwnerSid + { + get + { + return this._OwnerSid; + } + set + { + this.OnOwnerSidChanging(value); + this._OwnerSid = value; + this.OnOwnerSidChanged(); + this.OnPropertyChanged("OwnerSid"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _OwnerSid; + partial void OnOwnerSidChanging(string value); + partial void OnOwnerSidChanged(); + /// + /// There are no comments for Property Accessibility in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Accessibility + { + get + { + return this._Accessibility; + } + set + { + this.OnAccessibilityChanging(value); + this._Accessibility = value; + this.OnAccessibilityChanged(); + this.OnPropertyChanged("Accessibility"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Accessibility; + partial void OnAccessibilityChanging(string value); + partial void OnAccessibilityChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property AddedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable AddedTime + { + get + { + return this._AddedTime; + } + set + { + this.OnAddedTimeChanging(value); + this._AddedTime = value; + this.OnAddedTimeChanged(); + this.OnPropertyChanged("AddedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _AddedTime; + partial void OnAddedTimeChanging(global::System.Nullable value); + partial void OnAddedTimeChanged(); + /// + /// There are no comments for Property ModifiedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ModifiedTime + { + get + { + return this._ModifiedTime; + } + set + { + this.OnModifiedTimeChanging(value); + this._ModifiedTime = value; + this.OnModifiedTimeChanged(); + this.OnPropertyChanged("ModifiedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ModifiedTime; + partial void OnModifiedTimeChanging(global::System.Nullable value); + partial void OnModifiedTimeChanged(); + /// + /// There are no comments for Property Enabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Enabled + { + get + { + return this._Enabled; + } + set + { + this.OnEnabledChanging(value); + this._Enabled = value; + this.OnEnabledChanged(); + this.OnPropertyChanged("Enabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Enabled; + partial void OnEnabledChanging(global::System.Nullable value); + partial void OnEnabledChanged(); + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property FamilyName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string FamilyName + { + get + { + return this._FamilyName; + } + set + { + this.OnFamilyNameChanging(value); + this._FamilyName = value; + this.OnFamilyNameChanged(); + this.OnPropertyChanged("FamilyName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _FamilyName; + partial void OnFamilyNameChanging(string value); + partial void OnFamilyNameChanged(); + /// + /// There are no comments for Property HostVolumeId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable HostVolumeId + { + get + { + return this._HostVolumeId; + } + set + { + this.OnHostVolumeIdChanging(value); + this._HostVolumeId = value; + this.OnHostVolumeIdChanged(); + this.OnPropertyChanged("HostVolumeId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _HostVolumeId; + partial void OnHostVolumeIdChanging(global::System.Nullable value); + partial void OnHostVolumeIdChanged(); + /// + /// There are no comments for Property IsOrphaned in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsOrphaned + { + get + { + return this._IsOrphaned; + } + set + { + this.OnIsOrphanedChanging(value); + this._IsOrphaned = value; + this.OnIsOrphanedChanged(); + this.OnPropertyChanged("IsOrphaned"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsOrphaned; + partial void OnIsOrphanedChanging(global::System.Nullable value); + partial void OnIsOrphanedChanged(); + /// + /// There are no comments for Property LibraryShareId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable LibraryShareId + { + get + { + return this._LibraryShareId; + } + set + { + this.OnLibraryShareIdChanging(value); + this._LibraryShareId = value; + this.OnLibraryShareIdChanged(); + this.OnPropertyChanged("LibraryShareId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _LibraryShareId; + partial void OnLibraryShareIdChanging(global::System.Nullable value); + partial void OnLibraryShareIdChanged(); + /// + /// There are no comments for Property Namespace in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Namespace + { + get + { + return this._Namespace; + } + set + { + this.OnNamespaceChanging(value); + this._Namespace = value; + this.OnNamespaceChanged(); + this.OnPropertyChanged("Namespace"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Namespace; + partial void OnNamespaceChanging(string value); + partial void OnNamespaceChanged(); + /// + /// There are no comments for Property CloudId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CloudId + { + get + { + return this._CloudId; + } + set + { + this.OnCloudIdChanging(value); + this._CloudId = value; + this.OnCloudIdChanged(); + this.OnPropertyChanged("CloudId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CloudId; + partial void OnCloudIdChanging(global::System.Nullable value); + partial void OnCloudIdChanged(); + /// + /// There are no comments for Property Release in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Release + { + get + { + return this._Release; + } + set + { + this.OnReleaseChanging(value); + this._Release = value; + this.OnReleaseChanged(); + this.OnPropertyChanged("Release"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Release; + partial void OnReleaseChanging(string value); + partial void OnReleaseChanged(); + /// + /// There are no comments for LibraryShare in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public LibraryShare LibraryShare + { + get + { + return this._LibraryShare; + } + set + { + this._LibraryShare = value; + this.OnPropertyChanged("LibraryShare"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private LibraryShare _LibraryShare; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.LogicalNetwork in the schema. + /// + /// + /// ID + /// StampId + /// + [global::System.Data.Services.Common.EntitySetAttribute("LogicalNetworks")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ID", "StampId")] + public partial class LogicalNetwork : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new LogicalNetwork object. + /// + /// Initial value of ID. + /// Initial value of StampId. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static LogicalNetwork CreateLogicalNetwork(global::System.Guid ID, global::System.Guid stampId) + { + LogicalNetwork logicalNetwork = new LogicalNetwork(); + logicalNetwork.ID = ID; + logicalNetwork.StampId = stampId; + return logicalNetwork; + } + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this._ID = value; + this.OnIDChanged(); + this.OnPropertyChanged("ID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ID; + partial void OnIDChanging(global::System.Guid value); + partial void OnIDChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property NetworkVirtualizationEnabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable NetworkVirtualizationEnabled + { + get + { + return this._NetworkVirtualizationEnabled; + } + set + { + this.OnNetworkVirtualizationEnabledChanging(value); + this._NetworkVirtualizationEnabled = value; + this.OnNetworkVirtualizationEnabledChanged(); + this.OnPropertyChanged("NetworkVirtualizationEnabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _NetworkVirtualizationEnabled; + partial void OnNetworkVirtualizationEnabledChanging(global::System.Nullable value); + partial void OnNetworkVirtualizationEnabledChanged(); + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property CloudId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CloudId + { + get + { + return this._CloudId; + } + set + { + this.OnCloudIdChanging(value); + this._CloudId = value; + this.OnCloudIdChanged(); + this.OnPropertyChanged("CloudId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CloudId; + partial void OnCloudIdChanging(global::System.Nullable value); + partial void OnCloudIdChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType VMM.JobDescription in the schema. + /// + public partial class JobDescription : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// There are no comments for Property CanSkipLastFailedStep in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CanSkipLastFailedStep + { + get + { + return this._CanSkipLastFailedStep; + } + set + { + this.OnCanSkipLastFailedStepChanging(value); + this._CanSkipLastFailedStep = value; + this.OnCanSkipLastFailedStepChanged(); + this.OnPropertyChanged("CanSkipLastFailedStep"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CanSkipLastFailedStep; + partial void OnCanSkipLastFailedStepChanging(global::System.Nullable value); + partial void OnCanSkipLastFailedStepChanged(); + /// + /// There are no comments for Property Code in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Code + { + get + { + return this._Code; + } + set + { + this.OnCodeChanging(value); + this._Code = value; + this.OnCodeChanged(); + this.OnPropertyChanged("Code"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Code; + partial void OnCodeChanging(string value); + partial void OnCodeChanged(); + /// + /// There are no comments for Property DescriptionCodeString in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DescriptionCodeString + { + get + { + return this._DescriptionCodeString; + } + set + { + this.OnDescriptionCodeStringChanging(value); + this._DescriptionCodeString = value; + this.OnDescriptionCodeStringChanged(); + this.OnPropertyChanged("DescriptionCodeString"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DescriptionCodeString; + partial void OnDescriptionCodeStringChanging(string value); + partial void OnDescriptionCodeStringChanged(); + /// + /// There are no comments for Property IsRestartable in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsRestartable + { + get + { + return this._IsRestartable; + } + set + { + this.OnIsRestartableChanging(value); + this._IsRestartable = value; + this.OnIsRestartableChanged(); + this.OnPropertyChanged("IsRestartable"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsRestartable; + partial void OnIsRestartableChanging(global::System.Nullable value); + partial void OnIsRestartableChanged(); + /// + /// There are no comments for Property IsStoppable in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsStoppable + { + get + { + return this._IsStoppable; + } + set + { + this.OnIsStoppableChanging(value); + this._IsStoppable = value; + this.OnIsStoppableChanged(); + this.OnPropertyChanged("IsStoppable"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsStoppable; + partial void OnIsStoppableChanging(global::System.Nullable value); + partial void OnIsStoppableChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property RequiresCredentialsForRestart in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable RequiresCredentialsForRestart + { + get + { + return this._RequiresCredentialsForRestart; + } + set + { + this.OnRequiresCredentialsForRestartChanging(value); + this._RequiresCredentialsForRestart = value; + this.OnRequiresCredentialsForRestartChanged(); + this.OnPropertyChanged("RequiresCredentialsForRestart"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _RequiresCredentialsForRestart; + partial void OnRequiresCredentialsForRestartChanging(global::System.Nullable value); + partial void OnRequiresCredentialsForRestartChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.Job in the schema. + /// + /// + /// ID + /// StampId + /// + [global::System.Data.Services.Common.EntitySetAttribute("Jobs")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ID", "StampId")] + public partial class Job : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new Job object. + /// + /// Initial value of ID. + /// Initial value of StampId. + /// Initial value of AdditionalMessages. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static Job CreateJob(global::System.Guid ID, global::System.Guid stampId, global::System.Collections.ObjectModel.ObservableCollection additionalMessages) + { + Job job = new Job(); + job.ID = ID; + job.StampId = stampId; + if ((additionalMessages == null)) + { + throw new global::System.ArgumentNullException("additionalMessages"); + } + job.AdditionalMessages = additionalMessages; + return job; + } + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this._ID = value; + this.OnIDChanged(); + this.OnPropertyChanged("ID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ID; + partial void OnIDChanging(global::System.Guid value); + partial void OnIDChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property CurrentStepId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CurrentStepId + { + get + { + return this._CurrentStepId; + } + set + { + this.OnCurrentStepIdChanging(value); + this._CurrentStepId = value; + this.OnCurrentStepIdChanged(); + this.OnPropertyChanged("CurrentStepId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CurrentStepId; + partial void OnCurrentStepIdChanging(global::System.Nullable value); + partial void OnCurrentStepIdChanged(); + /// + /// There are no comments for Property RootStepId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable RootStepId + { + get + { + return this._RootStepId; + } + set + { + this.OnRootStepIdChanging(value); + this._RootStepId = value; + this.OnRootStepIdChanged(); + this.OnPropertyChanged("RootStepId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _RootStepId; + partial void OnRootStepIdChanging(global::System.Nullable value); + partial void OnRootStepIdChanged(); + /// + /// There are no comments for Property CmdletName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string CmdletName + { + get + { + return this._CmdletName; + } + set + { + this.OnCmdletNameChanging(value); + this._CmdletName = value; + this.OnCmdletNameChanged(); + this.OnPropertyChanged("CmdletName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _CmdletName; + partial void OnCmdletNameChanging(string value); + partial void OnCmdletNameChanged(); + /// + /// There are no comments for Property EndTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable EndTime + { + get + { + return this._EndTime; + } + set + { + this.OnEndTimeChanging(value); + this._EndTime = value; + this.OnEndTimeChanged(); + this.OnPropertyChanged("EndTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _EndTime; + partial void OnEndTimeChanging(global::System.Nullable value); + partial void OnEndTimeChanged(); + /// + /// There are no comments for Property IsCompleted in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsCompleted + { + get + { + return this._IsCompleted; + } + set + { + this.OnIsCompletedChanging(value); + this._IsCompleted = value; + this.OnIsCompletedChanged(); + this.OnPropertyChanged("IsCompleted"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsCompleted; + partial void OnIsCompletedChanging(global::System.Nullable value); + partial void OnIsCompletedChanged(); + /// + /// There are no comments for Property IsRestartable in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsRestartable + { + get + { + return this._IsRestartable; + } + set + { + this.OnIsRestartableChanging(value); + this._IsRestartable = value; + this.OnIsRestartableChanged(); + this.OnPropertyChanged("IsRestartable"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsRestartable; + partial void OnIsRestartableChanging(global::System.Nullable value); + partial void OnIsRestartableChanged(); + /// + /// There are no comments for Property IsStoppable in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsStoppable + { + get + { + return this._IsStoppable; + } + set + { + this.OnIsStoppableChanging(value); + this._IsStoppable = value; + this.OnIsStoppableChanged(); + this.OnPropertyChanged("IsStoppable"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsStoppable; + partial void OnIsStoppableChanging(global::System.Nullable value); + partial void OnIsStoppableChanged(); + /// + /// There are no comments for Property IsVisible in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsVisible + { + get + { + return this._IsVisible; + } + set + { + this.OnIsVisibleChanging(value); + this._IsVisible = value; + this.OnIsVisibleChanged(); + this.OnPropertyChanged("IsVisible"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsVisible; + partial void OnIsVisibleChanging(global::System.Nullable value); + partial void OnIsVisibleChanged(); + /// + /// There are no comments for Property Owner in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Owner + { + get + { + return this._Owner; + } + set + { + this.OnOwnerChanging(value); + this._Owner = value; + this.OnOwnerChanged(); + this.OnPropertyChanged("Owner"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Owner; + partial void OnOwnerChanging(string value); + partial void OnOwnerChanged(); + /// + /// There are no comments for Property OwnerSID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string OwnerSID + { + get + { + return this._OwnerSID; + } + set + { + this.OnOwnerSIDChanging(value); + this._OwnerSID = value; + this.OnOwnerSIDChanged(); + this.OnPropertyChanged("OwnerSID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _OwnerSID; + partial void OnOwnerSIDChanging(string value); + partial void OnOwnerSIDChanged(); + /// + /// There are no comments for Property ProgressValue in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ProgressValue + { + get + { + return this._ProgressValue; + } + set + { + this.OnProgressValueChanging(value); + this._ProgressValue = value; + this.OnProgressValueChanged(); + this.OnPropertyChanged("ProgressValue"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ProgressValue; + partial void OnProgressValueChanging(global::System.Nullable value); + partial void OnProgressValueChanged(); + /// + /// There are no comments for Property Progress in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Progress + { + get + { + return this._Progress; + } + set + { + this.OnProgressChanging(value); + this._Progress = value; + this.OnProgressChanged(); + this.OnPropertyChanged("Progress"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Progress; + partial void OnProgressChanging(string value); + partial void OnProgressChanged(); + /// + /// There are no comments for Property ResultObjectTypeName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ResultObjectTypeName + { + get + { + return this._ResultObjectTypeName; + } + set + { + this.OnResultObjectTypeNameChanging(value); + this._ResultObjectTypeName = value; + this.OnResultObjectTypeNameChanged(); + this.OnPropertyChanged("ResultObjectTypeName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ResultObjectTypeName; + partial void OnResultObjectTypeNameChanging(string value); + partial void OnResultObjectTypeNameChanged(); + /// + /// There are no comments for Property ResultName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ResultName + { + get + { + return this._ResultName; + } + set + { + this.OnResultNameChanging(value); + this._ResultName = value; + this.OnResultNameChanged(); + this.OnPropertyChanged("ResultName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ResultName; + partial void OnResultNameChanging(string value); + partial void OnResultNameChanged(); + /// + /// There are no comments for Property Source in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Source + { + get + { + return this._Source; + } + set + { + this.OnSourceChanging(value); + this._Source = value; + this.OnSourceChanged(); + this.OnPropertyChanged("Source"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Source; + partial void OnSourceChanging(string value); + partial void OnSourceChanged(); + /// + /// There are no comments for Property StartTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StartTime + { + get + { + return this._StartTime; + } + set + { + this.OnStartTimeChanging(value); + this._StartTime = value; + this.OnStartTimeChanged(); + this.OnPropertyChanged("StartTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StartTime; + partial void OnStartTimeChanging(global::System.Nullable value); + partial void OnStartTimeChanged(); + /// + /// There are no comments for Property Status in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Status + { + get + { + return this._Status; + } + set + { + this.OnStatusChanging(value); + this._Status = value; + this.OnStatusChanged(); + this.OnPropertyChanged("Status"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Status; + partial void OnStatusChanging(string value); + partial void OnStatusChanged(); + /// + /// There are no comments for Property StatusString in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string StatusString + { + get + { + return this._StatusString; + } + set + { + this.OnStatusStringChanging(value); + this._StatusString = value; + this.OnStatusStringChanged(); + this.OnPropertyChanged("StatusString"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _StatusString; + partial void OnStatusStringChanging(string value); + partial void OnStatusStringChanged(); + /// + /// There are no comments for Property Target in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Target + { + get + { + return this._Target; + } + set + { + this.OnTargetChanging(value); + this._Target = value; + this.OnTargetChanged(); + this.OnPropertyChanged("Target"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Target; + partial void OnTargetChanging(string value); + partial void OnTargetChanged(); + /// + /// There are no comments for Property TargetObjectID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable TargetObjectID + { + get + { + return this._TargetObjectID; + } + set + { + this.OnTargetObjectIDChanging(value); + this._TargetObjectID = value; + this.OnTargetObjectIDChanged(); + this.OnPropertyChanged("TargetObjectID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _TargetObjectID; + partial void OnTargetObjectIDChanging(global::System.Nullable value); + partial void OnTargetObjectIDChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public JobDescription Description + { + get + { + if (((this._Description == null) + && (this._DescriptionInitialized != true))) + { + this._Description = new JobDescription(); + this._DescriptionInitialized = true; + } + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this._DescriptionInitialized = true; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private JobDescription _Description; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _DescriptionInitialized; + partial void OnDescriptionChanging(JobDescription value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property WasNotifiedOfCancel in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable WasNotifiedOfCancel + { + get + { + return this._WasNotifiedOfCancel; + } + set + { + this.OnWasNotifiedOfCancelChanging(value); + this._WasNotifiedOfCancel = value; + this.OnWasNotifiedOfCancelChanged(); + this.OnPropertyChanged("WasNotifiedOfCancel"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _WasNotifiedOfCancel; + partial void OnWasNotifiedOfCancelChanging(global::System.Nullable value); + partial void OnWasNotifiedOfCancelChanged(); + /// + /// There are no comments for Property PROTipID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable PROTipID + { + get + { + return this._PROTipID; + } + set + { + this.OnPROTipIDChanging(value); + this._PROTipID = value; + this.OnPROTipIDChanged(); + this.OnPropertyChanged("PROTipID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _PROTipID; + partial void OnPROTipIDChanging(global::System.Nullable value); + partial void OnPROTipIDChanged(); + /// + /// There are no comments for Property ResultObjectID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ResultObjectID + { + get + { + return this._ResultObjectID; + } + set + { + this.OnResultObjectIDChanging(value); + this._ResultObjectID = value; + this.OnResultObjectIDChanged(); + this.OnPropertyChanged("ResultObjectID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ResultObjectID; + partial void OnResultObjectIDChanging(global::System.Nullable value); + partial void OnResultObjectIDChanged(); + /// + /// There are no comments for Property TargetObjectType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string TargetObjectType + { + get + { + return this._TargetObjectType; + } + set + { + this.OnTargetObjectTypeChanging(value); + this._TargetObjectType = value; + this.OnTargetObjectTypeChanged(); + this.OnPropertyChanged("TargetObjectType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _TargetObjectType; + partial void OnTargetObjectTypeChanging(string value); + partial void OnTargetObjectTypeChanged(); + /// + /// There are no comments for Property AreAuditRecordsAvailable in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable AreAuditRecordsAvailable + { + get + { + return this._AreAuditRecordsAvailable; + } + set + { + this.OnAreAuditRecordsAvailableChanging(value); + this._AreAuditRecordsAvailable = value; + this.OnAreAuditRecordsAvailableChanged(); + this.OnPropertyChanged("AreAuditRecordsAvailable"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _AreAuditRecordsAvailable; + partial void OnAreAuditRecordsAvailableChanging(global::System.Nullable value); + partial void OnAreAuditRecordsAvailableChanged(); + /// + /// There are no comments for Property ResultObjectType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ResultObjectType + { + get + { + return this._ResultObjectType; + } + set + { + this.OnResultObjectTypeChanging(value); + this._ResultObjectType = value; + this.OnResultObjectTypeChanged(); + this.OnPropertyChanged("ResultObjectType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ResultObjectType; + partial void OnResultObjectTypeChanging(string value); + partial void OnResultObjectTypeChanged(); + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property StepsLoaded in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StepsLoaded + { + get + { + return this._StepsLoaded; + } + set + { + this.OnStepsLoadedChanging(value); + this._StepsLoaded = value; + this.OnStepsLoadedChanged(); + this.OnPropertyChanged("StepsLoaded"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StepsLoaded; + partial void OnStepsLoadedChanging(global::System.Nullable value); + partial void OnStepsLoadedChanged(); + /// + /// There are no comments for Property UserName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string UserName + { + get + { + return this._UserName; + } + set + { + this.OnUserNameChanging(value); + this._UserName = value; + this.OnUserNameChanged(); + this.OnPropertyChanged("UserName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _UserName; + partial void OnUserNameChanging(string value); + partial void OnUserNameChanged(); + /// + /// There are no comments for Property Password in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Password + { + get + { + return this._Password; + } + set + { + this.OnPasswordChanging(value); + this._Password = value; + this.OnPasswordChanged(); + this.OnPropertyChanged("Password"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Password; + partial void OnPasswordChanging(string value); + partial void OnPasswordChanged(); + /// + /// There are no comments for Property SkipLastFailedStep in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable SkipLastFailedStep + { + get + { + return this._SkipLastFailedStep; + } + set + { + this.OnSkipLastFailedStepChanging(value); + this._SkipLastFailedStep = value; + this.OnSkipLastFailedStepChanged(); + this.OnPropertyChanged("SkipLastFailedStep"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _SkipLastFailedStep; + partial void OnSkipLastFailedStepChanging(global::System.Nullable value); + partial void OnSkipLastFailedStepChanged(); + /// + /// There are no comments for Property ErrorInfo in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public ErrorInfo ErrorInfo + { + get + { + if (((this._ErrorInfo == null) + && (this._ErrorInfoInitialized != true))) + { + this._ErrorInfo = new ErrorInfo(); + this._ErrorInfoInitialized = true; + } + return this._ErrorInfo; + } + set + { + this.OnErrorInfoChanging(value); + this._ErrorInfo = value; + this._ErrorInfoInitialized = true; + this.OnErrorInfoChanged(); + this.OnPropertyChanged("ErrorInfo"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private ErrorInfo _ErrorInfo; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _ErrorInfoInitialized; + partial void OnErrorInfoChanging(ErrorInfo value); + partial void OnErrorInfoChanged(); + /// + /// There are no comments for Property AdditionalMessages in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection AdditionalMessages + { + get + { + return this._AdditionalMessages; + } + set + { + this.OnAdditionalMessagesChanging(value); + this._AdditionalMessages = value; + this.OnAdditionalMessagesChanged(); + this.OnPropertyChanged("AdditionalMessages"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _AdditionalMessages = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnAdditionalMessagesChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnAdditionalMessagesChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.CapabilityProfile in the schema. + /// + /// + /// ID + /// StampId + /// + [global::System.Data.Services.Common.EntitySetAttribute("CapabilityProfiles")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ID", "StampId")] + public partial class CapabilityProfile : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new CapabilityProfile object. + /// + /// Initial value of ID. + /// Initial value of StampId. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static CapabilityProfile CreateCapabilityProfile(global::System.Guid ID, global::System.Guid stampId) + { + CapabilityProfile capabilityProfile = new CapabilityProfile(); + capabilityProfile.ID = ID; + capabilityProfile.StampId = stampId; + return capabilityProfile; + } + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this._ID = value; + this.OnIDChanged(); + this.OnPropertyChanged("ID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ID; + partial void OnIDChanging(global::System.Guid value); + partial void OnIDChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property COM1PipeNameInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string COM1PipeNameInitial + { + get + { + return this._COM1PipeNameInitial; + } + set + { + this.OnCOM1PipeNameInitialChanging(value); + this._COM1PipeNameInitial = value; + this.OnCOM1PipeNameInitialChanged(); + this.OnPropertyChanged("COM1PipeNameInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _COM1PipeNameInitial; + partial void OnCOM1PipeNameInitialChanging(string value); + partial void OnCOM1PipeNameInitialChanged(); + /// + /// There are no comments for Property COM1TextFileName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string COM1TextFileName + { + get + { + return this._COM1TextFileName; + } + set + { + this.OnCOM1TextFileNameChanging(value); + this._COM1TextFileName = value; + this.OnCOM1TextFileNameChanged(); + this.OnPropertyChanged("COM1TextFileName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _COM1TextFileName; + partial void OnCOM1TextFileNameChanging(string value); + partial void OnCOM1TextFileNameChanged(); + /// + /// There are no comments for Property COM2PipeNameInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string COM2PipeNameInitial + { + get + { + return this._COM2PipeNameInitial; + } + set + { + this.OnCOM2PipeNameInitialChanging(value); + this._COM2PipeNameInitial = value; + this.OnCOM2PipeNameInitialChanged(); + this.OnPropertyChanged("COM2PipeNameInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _COM2PipeNameInitial; + partial void OnCOM2PipeNameInitialChanging(string value); + partial void OnCOM2PipeNameInitialChanged(); + /// + /// There are no comments for Property COM2TextFileNameInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string COM2TextFileNameInitial + { + get + { + return this._COM2TextFileNameInitial; + } + set + { + this.OnCOM2TextFileNameInitialChanging(value); + this._COM2TextFileNameInitial = value; + this.OnCOM2TextFileNameInitialChanged(); + this.OnPropertyChanged("COM2TextFileNameInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _COM2TextFileNameInitial; + partial void OnCOM2TextFileNameInitialChanging(string value); + partial void OnCOM2TextFileNameInitialChanged(); + /// + /// There are no comments for Property CPUCompatibilityModeValue in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CPUCompatibilityModeValue + { + get + { + return this._CPUCompatibilityModeValue; + } + set + { + this.OnCPUCompatibilityModeValueChanging(value); + this._CPUCompatibilityModeValue = value; + this.OnCPUCompatibilityModeValueChanged(); + this.OnPropertyChanged("CPUCompatibilityModeValue"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CPUCompatibilityModeValue; + partial void OnCPUCompatibilityModeValueChanging(global::System.Nullable value); + partial void OnCPUCompatibilityModeValueChanged(); + /// + /// There are no comments for Property CPUCompatibilityModeValueCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CPUCompatibilityModeValueCanChange + { + get + { + return this._CPUCompatibilityModeValueCanChange; + } + set + { + this.OnCPUCompatibilityModeValueCanChangeChanging(value); + this._CPUCompatibilityModeValueCanChange = value; + this.OnCPUCompatibilityModeValueCanChangeChanged(); + this.OnPropertyChanged("CPUCompatibilityModeValueCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CPUCompatibilityModeValueCanChange; + partial void OnCPUCompatibilityModeValueCanChangeChanging(global::System.Nullable value); + partial void OnCPUCompatibilityModeValueCanChangeChanged(); + /// + /// There are no comments for Property CPUCountInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CPUCountInitial + { + get + { + return this._CPUCountInitial; + } + set + { + this.OnCPUCountInitialChanging(value); + this._CPUCountInitial = value; + this.OnCPUCountInitialChanged(); + this.OnPropertyChanged("CPUCountInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CPUCountInitial; + partial void OnCPUCountInitialChanging(global::System.Nullable value); + partial void OnCPUCountInitialChanged(); + /// + /// There are no comments for Property CPUCountMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CPUCountMaximum + { + get + { + return this._CPUCountMaximum; + } + set + { + this.OnCPUCountMaximumChanging(value); + this._CPUCountMaximum = value; + this.OnCPUCountMaximumChanged(); + this.OnPropertyChanged("CPUCountMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CPUCountMaximum; + partial void OnCPUCountMaximumChanging(global::System.Nullable value); + partial void OnCPUCountMaximumChanged(); + /// + /// There are no comments for Property CPUCountMinimum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CPUCountMinimum + { + get + { + return this._CPUCountMinimum; + } + set + { + this.OnCPUCountMinimumChanging(value); + this._CPUCountMinimum = value; + this.OnCPUCountMinimumChanged(); + this.OnPropertyChanged("CPUCountMinimum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CPUCountMinimum; + partial void OnCPUCountMinimumChanging(global::System.Nullable value); + partial void OnCPUCountMinimumChanged(); + /// + /// There are no comments for Property CPUPriorityCustomInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CPUPriorityCustomInitial + { + get + { + return this._CPUPriorityCustomInitial; + } + set + { + this.OnCPUPriorityCustomInitialChanging(value); + this._CPUPriorityCustomInitial = value; + this.OnCPUPriorityCustomInitialChanged(); + this.OnPropertyChanged("CPUPriorityCustomInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CPUPriorityCustomInitial; + partial void OnCPUPriorityCustomInitialChanging(global::System.Nullable value); + partial void OnCPUPriorityCustomInitialChanged(); + /// + /// There are no comments for Property CPUPriorityCustomMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CPUPriorityCustomMaximum + { + get + { + return this._CPUPriorityCustomMaximum; + } + set + { + this.OnCPUPriorityCustomMaximumChanging(value); + this._CPUPriorityCustomMaximum = value; + this.OnCPUPriorityCustomMaximumChanged(); + this.OnPropertyChanged("CPUPriorityCustomMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CPUPriorityCustomMaximum; + partial void OnCPUPriorityCustomMaximumChanging(global::System.Nullable value); + partial void OnCPUPriorityCustomMaximumChanged(); + /// + /// There are no comments for Property CPUPriorityCustomMinimum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CPUPriorityCustomMinimum + { + get + { + return this._CPUPriorityCustomMinimum; + } + set + { + this.OnCPUPriorityCustomMinimumChanging(value); + this._CPUPriorityCustomMinimum = value; + this.OnCPUPriorityCustomMinimumChanged(); + this.OnPropertyChanged("CPUPriorityCustomMinimum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CPUPriorityCustomMinimum; + partial void OnCPUPriorityCustomMinimumChanging(global::System.Nullable value); + partial void OnCPUPriorityCustomMinimumChanged(); + /// + /// There are no comments for Property CPUPriorityHighInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CPUPriorityHighInitial + { + get + { + return this._CPUPriorityHighInitial; + } + set + { + this.OnCPUPriorityHighInitialChanging(value); + this._CPUPriorityHighInitial = value; + this.OnCPUPriorityHighInitialChanged(); + this.OnPropertyChanged("CPUPriorityHighInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CPUPriorityHighInitial; + partial void OnCPUPriorityHighInitialChanging(global::System.Nullable value); + partial void OnCPUPriorityHighInitialChanged(); + /// + /// There are no comments for Property CPUPriorityHighMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CPUPriorityHighMaximum + { + get + { + return this._CPUPriorityHighMaximum; + } + set + { + this.OnCPUPriorityHighMaximumChanging(value); + this._CPUPriorityHighMaximum = value; + this.OnCPUPriorityHighMaximumChanged(); + this.OnPropertyChanged("CPUPriorityHighMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CPUPriorityHighMaximum; + partial void OnCPUPriorityHighMaximumChanging(global::System.Nullable value); + partial void OnCPUPriorityHighMaximumChanged(); + /// + /// There are no comments for Property CPUPriorityHighMinimum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CPUPriorityHighMinimum + { + get + { + return this._CPUPriorityHighMinimum; + } + set + { + this.OnCPUPriorityHighMinimumChanging(value); + this._CPUPriorityHighMinimum = value; + this.OnCPUPriorityHighMinimumChanged(); + this.OnPropertyChanged("CPUPriorityHighMinimum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CPUPriorityHighMinimum; + partial void OnCPUPriorityHighMinimumChanging(global::System.Nullable value); + partial void OnCPUPriorityHighMinimumChanged(); + /// + /// There are no comments for Property CPUPriorityLowInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CPUPriorityLowInitial + { + get + { + return this._CPUPriorityLowInitial; + } + set + { + this.OnCPUPriorityLowInitialChanging(value); + this._CPUPriorityLowInitial = value; + this.OnCPUPriorityLowInitialChanged(); + this.OnPropertyChanged("CPUPriorityLowInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CPUPriorityLowInitial; + partial void OnCPUPriorityLowInitialChanging(global::System.Nullable value); + partial void OnCPUPriorityLowInitialChanged(); + /// + /// There are no comments for Property CPUPriorityLowMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CPUPriorityLowMaximum + { + get + { + return this._CPUPriorityLowMaximum; + } + set + { + this.OnCPUPriorityLowMaximumChanging(value); + this._CPUPriorityLowMaximum = value; + this.OnCPUPriorityLowMaximumChanged(); + this.OnPropertyChanged("CPUPriorityLowMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CPUPriorityLowMaximum; + partial void OnCPUPriorityLowMaximumChanging(global::System.Nullable value); + partial void OnCPUPriorityLowMaximumChanged(); + /// + /// There are no comments for Property CPUPriorityLowMinimum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CPUPriorityLowMinimum + { + get + { + return this._CPUPriorityLowMinimum; + } + set + { + this.OnCPUPriorityLowMinimumChanging(value); + this._CPUPriorityLowMinimum = value; + this.OnCPUPriorityLowMinimumChanged(); + this.OnPropertyChanged("CPUPriorityLowMinimum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CPUPriorityLowMinimum; + partial void OnCPUPriorityLowMinimumChanging(global::System.Nullable value); + partial void OnCPUPriorityLowMinimumChanged(); + /// + /// There are no comments for Property CPUPriorityNormalInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CPUPriorityNormalInitial + { + get + { + return this._CPUPriorityNormalInitial; + } + set + { + this.OnCPUPriorityNormalInitialChanging(value); + this._CPUPriorityNormalInitial = value; + this.OnCPUPriorityNormalInitialChanged(); + this.OnPropertyChanged("CPUPriorityNormalInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CPUPriorityNormalInitial; + partial void OnCPUPriorityNormalInitialChanging(global::System.Nullable value); + partial void OnCPUPriorityNormalInitialChanged(); + /// + /// There are no comments for Property CPUPriorityNormalMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CPUPriorityNormalMaximum + { + get + { + return this._CPUPriorityNormalMaximum; + } + set + { + this.OnCPUPriorityNormalMaximumChanging(value); + this._CPUPriorityNormalMaximum = value; + this.OnCPUPriorityNormalMaximumChanged(); + this.OnPropertyChanged("CPUPriorityNormalMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CPUPriorityNormalMaximum; + partial void OnCPUPriorityNormalMaximumChanging(global::System.Nullable value); + partial void OnCPUPriorityNormalMaximumChanged(); + /// + /// There are no comments for Property CPUPriorityNormalMinimum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CPUPriorityNormalMinimum + { + get + { + return this._CPUPriorityNormalMinimum; + } + set + { + this.OnCPUPriorityNormalMinimumChanging(value); + this._CPUPriorityNormalMinimum = value; + this.OnCPUPriorityNormalMinimumChanged(); + this.OnPropertyChanged("CPUPriorityNormalMinimum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CPUPriorityNormalMinimum; + partial void OnCPUPriorityNormalMinimumChanging(global::System.Nullable value); + partial void OnCPUPriorityNormalMinimumChanged(); + /// + /// There are no comments for Property CreateNewDiskCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CreateNewDiskCanChange + { + get + { + return this._CreateNewDiskCanChange; + } + set + { + this.OnCreateNewDiskCanChangeChanging(value); + this._CreateNewDiskCanChange = value; + this.OnCreateNewDiskCanChangeChanged(); + this.OnPropertyChanged("CreateNewDiskCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CreateNewDiskCanChange; + partial void OnCreateNewDiskCanChangeChanging(global::System.Nullable value); + partial void OnCreateNewDiskCanChangeChanged(); + /// + /// There are no comments for Property CreateNewDiskInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CreateNewDiskInitial + { + get + { + return this._CreateNewDiskInitial; + } + set + { + this.OnCreateNewDiskInitialChanging(value); + this._CreateNewDiskInitial = value; + this.OnCreateNewDiskInitialChanged(); + this.OnPropertyChanged("CreateNewDiskInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CreateNewDiskInitial; + partial void OnCreateNewDiskInitialChanging(global::System.Nullable value); + partial void OnCreateNewDiskInitialChanged(); + /// + /// There are no comments for Property DifferencingVirtualHardDiskValue in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable DifferencingVirtualHardDiskValue + { + get + { + return this._DifferencingVirtualHardDiskValue; + } + set + { + this.OnDifferencingVirtualHardDiskValueChanging(value); + this._DifferencingVirtualHardDiskValue = value; + this.OnDifferencingVirtualHardDiskValueChanged(); + this.OnPropertyChanged("DifferencingVirtualHardDiskValue"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _DifferencingVirtualHardDiskValue; + partial void OnDifferencingVirtualHardDiskValueChanging(global::System.Nullable value); + partial void OnDifferencingVirtualHardDiskValueChanged(); + /// + /// There are no comments for Property DifferencingVirtualHardDiskValueCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable DifferencingVirtualHardDiskValueCanChange + { + get + { + return this._DifferencingVirtualHardDiskValueCanChange; + } + set + { + this.OnDifferencingVirtualHardDiskValueCanChangeChanging(value); + this._DifferencingVirtualHardDiskValueCanChange = value; + this.OnDifferencingVirtualHardDiskValueCanChangeChanged(); + this.OnPropertyChanged("DifferencingVirtualHardDiskValueCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _DifferencingVirtualHardDiskValueCanChange; + partial void OnDifferencingVirtualHardDiskValueCanChangeChanging(global::System.Nullable value); + partial void OnDifferencingVirtualHardDiskValueCanChangeChanged(); + /// + /// There are no comments for Property DVDDriveChannelInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable DVDDriveChannelInitial + { + get + { + return this._DVDDriveChannelInitial; + } + set + { + this.OnDVDDriveChannelInitialChanging(value); + this._DVDDriveChannelInitial = value; + this.OnDVDDriveChannelInitialChanged(); + this.OnPropertyChanged("DVDDriveChannelInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _DVDDriveChannelInitial; + partial void OnDVDDriveChannelInitialChanging(global::System.Nullable value); + partial void OnDVDDriveChannelInitialChanged(); + /// + /// There are no comments for Property DVDDriveChannelMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable DVDDriveChannelMaximum + { + get + { + return this._DVDDriveChannelMaximum; + } + set + { + this.OnDVDDriveChannelMaximumChanging(value); + this._DVDDriveChannelMaximum = value; + this.OnDVDDriveChannelMaximumChanged(); + this.OnPropertyChanged("DVDDriveChannelMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _DVDDriveChannelMaximum; + partial void OnDVDDriveChannelMaximumChanging(global::System.Nullable value); + partial void OnDVDDriveChannelMaximumChanged(); + /// + /// There are no comments for Property DVDDriveChannelMinimum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable DVDDriveChannelMinimum + { + get + { + return this._DVDDriveChannelMinimum; + } + set + { + this.OnDVDDriveChannelMinimumChanging(value); + this._DVDDriveChannelMinimum = value; + this.OnDVDDriveChannelMinimumChanged(); + this.OnPropertyChanged("DVDDriveChannelMinimum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _DVDDriveChannelMinimum; + partial void OnDVDDriveChannelMinimumChanging(global::System.Nullable value); + partial void OnDVDDriveChannelMinimumChanged(); + /// + /// There are no comments for Property DVDImageFileInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable DVDImageFileInitial + { + get + { + return this._DVDImageFileInitial; + } + set + { + this.OnDVDImageFileInitialChanging(value); + this._DVDImageFileInitial = value; + this.OnDVDImageFileInitialChanged(); + this.OnPropertyChanged("DVDImageFileInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _DVDImageFileInitial; + partial void OnDVDImageFileInitialChanging(global::System.Nullable value); + partial void OnDVDImageFileInitialChanged(); + /// + /// There are no comments for Property DynamicMemoryValue in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable DynamicMemoryValue + { + get + { + return this._DynamicMemoryValue; + } + set + { + this.OnDynamicMemoryValueChanging(value); + this._DynamicMemoryValue = value; + this.OnDynamicMemoryValueChanged(); + this.OnPropertyChanged("DynamicMemoryValue"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _DynamicMemoryValue; + partial void OnDynamicMemoryValueChanging(global::System.Nullable value); + partial void OnDynamicMemoryValueChanged(); + /// + /// There are no comments for Property DynamicMemoryValueCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable DynamicMemoryValueCanChange + { + get + { + return this._DynamicMemoryValueCanChange; + } + set + { + this.OnDynamicMemoryValueCanChangeChanging(value); + this._DynamicMemoryValueCanChange = value; + this.OnDynamicMemoryValueCanChangeChanged(); + this.OnPropertyChanged("DynamicMemoryValueCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _DynamicMemoryValueCanChange; + partial void OnDynamicMemoryValueCanChangeChanging(global::System.Nullable value); + partial void OnDynamicMemoryValueCanChangeChanged(); + /// + /// There are no comments for Property DynamicVirtualHardDiskValue in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable DynamicVirtualHardDiskValue + { + get + { + return this._DynamicVirtualHardDiskValue; + } + set + { + this.OnDynamicVirtualHardDiskValueChanging(value); + this._DynamicVirtualHardDiskValue = value; + this.OnDynamicVirtualHardDiskValueChanged(); + this.OnPropertyChanged("DynamicVirtualHardDiskValue"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _DynamicVirtualHardDiskValue; + partial void OnDynamicVirtualHardDiskValueChanging(global::System.Nullable value); + partial void OnDynamicVirtualHardDiskValueChanged(); + /// + /// There are no comments for Property DynamicVirtualHardDiskValueCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable DynamicVirtualHardDiskValueCanChange + { + get + { + return this._DynamicVirtualHardDiskValueCanChange; + } + set + { + this.OnDynamicVirtualHardDiskValueCanChangeChanging(value); + this._DynamicVirtualHardDiskValueCanChange = value; + this.OnDynamicVirtualHardDiskValueCanChangeChanged(); + this.OnPropertyChanged("DynamicVirtualHardDiskValueCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _DynamicVirtualHardDiskValueCanChange; + partial void OnDynamicVirtualHardDiskValueCanChangeChanging(global::System.Nullable value); + partial void OnDynamicVirtualHardDiskValueCanChangeChanged(); + /// + /// There are no comments for Property EnableNumLockCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable EnableNumLockCanChange + { + get + { + return this._EnableNumLockCanChange; + } + set + { + this.OnEnableNumLockCanChangeChanging(value); + this._EnableNumLockCanChange = value; + this.OnEnableNumLockCanChangeChanged(); + this.OnPropertyChanged("EnableNumLockCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _EnableNumLockCanChange; + partial void OnEnableNumLockCanChangeChanging(global::System.Nullable value); + partial void OnEnableNumLockCanChangeChanged(); + /// + /// There are no comments for Property EnableNumLockInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable EnableNumLockInitial + { + get + { + return this._EnableNumLockInitial; + } + set + { + this.OnEnableNumLockInitialChanging(value); + this._EnableNumLockInitial = value; + this.OnEnableNumLockInitialChanged(); + this.OnPropertyChanged("EnableNumLockInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _EnableNumLockInitial; + partial void OnEnableNumLockInitialChanging(global::System.Nullable value); + partial void OnEnableNumLockInitialChanged(); + /// + /// There are no comments for Property ExistDiskStorageClassificationValue in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ExistDiskStorageClassificationValue + { + get + { + return this._ExistDiskStorageClassificationValue; + } + set + { + this.OnExistDiskStorageClassificationValueChanging(value); + this._ExistDiskStorageClassificationValue = value; + this.OnExistDiskStorageClassificationValueChanged(); + this.OnPropertyChanged("ExistDiskStorageClassificationValue"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ExistDiskStorageClassificationValue; + partial void OnExistDiskStorageClassificationValueChanging(global::System.Nullable value); + partial void OnExistDiskStorageClassificationValueChanged(); + /// + /// There are no comments for Property ExistingDiskChannelInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ExistingDiskChannelInitial + { + get + { + return this._ExistingDiskChannelInitial; + } + set + { + this.OnExistingDiskChannelInitialChanging(value); + this._ExistingDiskChannelInitial = value; + this.OnExistingDiskChannelInitialChanged(); + this.OnPropertyChanged("ExistingDiskChannelInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ExistingDiskChannelInitial; + partial void OnExistingDiskChannelInitialChanging(global::System.Nullable value); + partial void OnExistingDiskChannelInitialChanged(); + /// + /// There are no comments for Property ExistingDiskChannelMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ExistingDiskChannelMaximum + { + get + { + return this._ExistingDiskChannelMaximum; + } + set + { + this.OnExistingDiskChannelMaximumChanging(value); + this._ExistingDiskChannelMaximum = value; + this.OnExistingDiskChannelMaximumChanged(); + this.OnPropertyChanged("ExistingDiskChannelMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ExistingDiskChannelMaximum; + partial void OnExistingDiskChannelMaximumChanging(global::System.Nullable value); + partial void OnExistingDiskChannelMaximumChanged(); + /// + /// There are no comments for Property ExistingDiskChannelMinimum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ExistingDiskChannelMinimum + { + get + { + return this._ExistingDiskChannelMinimum; + } + set + { + this.OnExistingDiskChannelMinimumChanging(value); + this._ExistingDiskChannelMinimum = value; + this.OnExistingDiskChannelMinimumChanged(); + this.OnPropertyChanged("ExistingDiskChannelMinimum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ExistingDiskChannelMinimum; + partial void OnExistingDiskChannelMinimumChanging(global::System.Nullable value); + partial void OnExistingDiskChannelMinimumChanged(); + /// + /// There are no comments for Property ExpectedCPUUtilizationInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ExpectedCPUUtilizationInitial + { + get + { + return this._ExpectedCPUUtilizationInitial; + } + set + { + this.OnExpectedCPUUtilizationInitialChanging(value); + this._ExpectedCPUUtilizationInitial = value; + this.OnExpectedCPUUtilizationInitialChanged(); + this.OnPropertyChanged("ExpectedCPUUtilizationInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ExpectedCPUUtilizationInitial; + partial void OnExpectedCPUUtilizationInitialChanging(global::System.Nullable value); + partial void OnExpectedCPUUtilizationInitialChanged(); + /// + /// There are no comments for Property ExpectedCPUUtilizationMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ExpectedCPUUtilizationMaximum + { + get + { + return this._ExpectedCPUUtilizationMaximum; + } + set + { + this.OnExpectedCPUUtilizationMaximumChanging(value); + this._ExpectedCPUUtilizationMaximum = value; + this.OnExpectedCPUUtilizationMaximumChanged(); + this.OnPropertyChanged("ExpectedCPUUtilizationMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ExpectedCPUUtilizationMaximum; + partial void OnExpectedCPUUtilizationMaximumChanging(global::System.Nullable value); + partial void OnExpectedCPUUtilizationMaximumChanged(); + /// + /// There are no comments for Property ExpectedCPUUtilizationMinimum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ExpectedCPUUtilizationMinimum + { + get + { + return this._ExpectedCPUUtilizationMinimum; + } + set + { + this.OnExpectedCPUUtilizationMinimumChanging(value); + this._ExpectedCPUUtilizationMinimum = value; + this.OnExpectedCPUUtilizationMinimumChanged(); + this.OnPropertyChanged("ExpectedCPUUtilizationMinimum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ExpectedCPUUtilizationMinimum; + partial void OnExpectedCPUUtilizationMinimumChanging(global::System.Nullable value); + partial void OnExpectedCPUUtilizationMinimumChanged(); + /// + /// There are no comments for Property FabricCapabilityType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string FabricCapabilityType + { + get + { + return this._FabricCapabilityType; + } + set + { + this.OnFabricCapabilityTypeChanging(value); + this._FabricCapabilityType = value; + this.OnFabricCapabilityTypeChanged(); + this.OnPropertyChanged("FabricCapabilityType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _FabricCapabilityType; + partial void OnFabricCapabilityTypeChanging(string value); + partial void OnFabricCapabilityTypeChanged(); + /// + /// There are no comments for Property FixedVirtualHardDiskValue in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable FixedVirtualHardDiskValue + { + get + { + return this._FixedVirtualHardDiskValue; + } + set + { + this.OnFixedVirtualHardDiskValueChanging(value); + this._FixedVirtualHardDiskValue = value; + this.OnFixedVirtualHardDiskValueChanged(); + this.OnPropertyChanged("FixedVirtualHardDiskValue"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _FixedVirtualHardDiskValue; + partial void OnFixedVirtualHardDiskValueChanging(global::System.Nullable value); + partial void OnFixedVirtualHardDiskValueChanged(); + /// + /// There are no comments for Property FixedVirtualHardDiskValueCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable FixedVirtualHardDiskValueCanChange + { + get + { + return this._FixedVirtualHardDiskValueCanChange; + } + set + { + this.OnFixedVirtualHardDiskValueCanChangeChanging(value); + this._FixedVirtualHardDiskValueCanChange = value; + this.OnFixedVirtualHardDiskValueCanChangeChanged(); + this.OnPropertyChanged("FixedVirtualHardDiskValueCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _FixedVirtualHardDiskValueCanChange; + partial void OnFixedVirtualHardDiskValueCanChangeChanging(global::System.Nullable value); + partial void OnFixedVirtualHardDiskValueCanChangeChanged(); + /// + /// There are no comments for Property FloppyImageFileInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable FloppyImageFileInitial + { + get + { + return this._FloppyImageFileInitial; + } + set + { + this.OnFloppyImageFileInitialChanging(value); + this._FloppyImageFileInitial = value; + this.OnFloppyImageFileInitialChanged(); + this.OnPropertyChanged("FloppyImageFileInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _FloppyImageFileInitial; + partial void OnFloppyImageFileInitialChanging(global::System.Nullable value); + partial void OnFloppyImageFileInitialChanged(); + /// + /// There are no comments for Property LogicalNetworkValue in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable LogicalNetworkValue + { + get + { + return this._LogicalNetworkValue; + } + set + { + this.OnLogicalNetworkValueChanging(value); + this._LogicalNetworkValue = value; + this.OnLogicalNetworkValueChanged(); + this.OnPropertyChanged("LogicalNetworkValue"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _LogicalNetworkValue; + partial void OnLogicalNetworkValueChanging(global::System.Nullable value); + partial void OnLogicalNetworkValueChanged(); + /// + /// There are no comments for Property MaximumHorizontalMonitorResolutionInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MaximumHorizontalMonitorResolutionInitial + { + get + { + return this._MaximumHorizontalMonitorResolutionInitial; + } + set + { + this.OnMaximumHorizontalMonitorResolutionInitialChanging(value); + this._MaximumHorizontalMonitorResolutionInitial = value; + this.OnMaximumHorizontalMonitorResolutionInitialChanged(); + this.OnPropertyChanged("MaximumHorizontalMonitorResolutionInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MaximumHorizontalMonitorResolutionInitial; + partial void OnMaximumHorizontalMonitorResolutionInitialChanging(global::System.Nullable value); + partial void OnMaximumHorizontalMonitorResolutionInitialChanged(); + /// + /// There are no comments for Property MaximumHorizontalMonitorResolutionMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MaximumHorizontalMonitorResolutionMaximum + { + get + { + return this._MaximumHorizontalMonitorResolutionMaximum; + } + set + { + this.OnMaximumHorizontalMonitorResolutionMaximumChanging(value); + this._MaximumHorizontalMonitorResolutionMaximum = value; + this.OnMaximumHorizontalMonitorResolutionMaximumChanged(); + this.OnPropertyChanged("MaximumHorizontalMonitorResolutionMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MaximumHorizontalMonitorResolutionMaximum; + partial void OnMaximumHorizontalMonitorResolutionMaximumChanging(global::System.Nullable value); + partial void OnMaximumHorizontalMonitorResolutionMaximumChanged(); + /// + /// There are no comments for Property MaximumHorizontalMonitorResolutionMinimum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MaximumHorizontalMonitorResolutionMinimum + { + get + { + return this._MaximumHorizontalMonitorResolutionMinimum; + } + set + { + this.OnMaximumHorizontalMonitorResolutionMinimumChanging(value); + this._MaximumHorizontalMonitorResolutionMinimum = value; + this.OnMaximumHorizontalMonitorResolutionMinimumChanged(); + this.OnPropertyChanged("MaximumHorizontalMonitorResolutionMinimum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MaximumHorizontalMonitorResolutionMinimum; + partial void OnMaximumHorizontalMonitorResolutionMinimumChanging(global::System.Nullable value); + partial void OnMaximumHorizontalMonitorResolutionMinimumChanged(); + /// + /// There are no comments for Property MaximumMemoryMBInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MaximumMemoryMBInitial + { + get + { + return this._MaximumMemoryMBInitial; + } + set + { + this.OnMaximumMemoryMBInitialChanging(value); + this._MaximumMemoryMBInitial = value; + this.OnMaximumMemoryMBInitialChanged(); + this.OnPropertyChanged("MaximumMemoryMBInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MaximumMemoryMBInitial; + partial void OnMaximumMemoryMBInitialChanging(global::System.Nullable value); + partial void OnMaximumMemoryMBInitialChanged(); + /// + /// There are no comments for Property MaximumMemoryMBMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MaximumMemoryMBMaximum + { + get + { + return this._MaximumMemoryMBMaximum; + } + set + { + this.OnMaximumMemoryMBMaximumChanging(value); + this._MaximumMemoryMBMaximum = value; + this.OnMaximumMemoryMBMaximumChanged(); + this.OnPropertyChanged("MaximumMemoryMBMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MaximumMemoryMBMaximum; + partial void OnMaximumMemoryMBMaximumChanging(global::System.Nullable value); + partial void OnMaximumMemoryMBMaximumChanged(); + /// + /// There are no comments for Property MaximumMemoryMBMinimum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MaximumMemoryMBMinimum + { + get + { + return this._MaximumMemoryMBMinimum; + } + set + { + this.OnMaximumMemoryMBMinimumChanging(value); + this._MaximumMemoryMBMinimum = value; + this.OnMaximumMemoryMBMinimumChanged(); + this.OnPropertyChanged("MaximumMemoryMBMinimum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MaximumMemoryMBMinimum; + partial void OnMaximumMemoryMBMinimumChanging(global::System.Nullable value); + partial void OnMaximumMemoryMBMinimumChanged(); + /// + /// There are no comments for Property MaximumMonitorCountInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MaximumMonitorCountInitial + { + get + { + return this._MaximumMonitorCountInitial; + } + set + { + this.OnMaximumMonitorCountInitialChanging(value); + this._MaximumMonitorCountInitial = value; + this.OnMaximumMonitorCountInitialChanged(); + this.OnPropertyChanged("MaximumMonitorCountInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MaximumMonitorCountInitial; + partial void OnMaximumMonitorCountInitialChanging(global::System.Nullable value); + partial void OnMaximumMonitorCountInitialChanged(); + /// + /// There are no comments for Property MaximumMonitorCountMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MaximumMonitorCountMaximum + { + get + { + return this._MaximumMonitorCountMaximum; + } + set + { + this.OnMaximumMonitorCountMaximumChanging(value); + this._MaximumMonitorCountMaximum = value; + this.OnMaximumMonitorCountMaximumChanged(); + this.OnPropertyChanged("MaximumMonitorCountMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MaximumMonitorCountMaximum; + partial void OnMaximumMonitorCountMaximumChanging(global::System.Nullable value); + partial void OnMaximumMonitorCountMaximumChanged(); + /// + /// There are no comments for Property MaximumMonitorCountMinimum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MaximumMonitorCountMinimum + { + get + { + return this._MaximumMonitorCountMinimum; + } + set + { + this.OnMaximumMonitorCountMinimumChanging(value); + this._MaximumMonitorCountMinimum = value; + this.OnMaximumMonitorCountMinimumChanged(); + this.OnPropertyChanged("MaximumMonitorCountMinimum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MaximumMonitorCountMinimum; + partial void OnMaximumMonitorCountMinimumChanging(global::System.Nullable value); + partial void OnMaximumMonitorCountMinimumChanged(); + /// + /// There are no comments for Property MaximumVerticalMonitorResolutionInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MaximumVerticalMonitorResolutionInitial + { + get + { + return this._MaximumVerticalMonitorResolutionInitial; + } + set + { + this.OnMaximumVerticalMonitorResolutionInitialChanging(value); + this._MaximumVerticalMonitorResolutionInitial = value; + this.OnMaximumVerticalMonitorResolutionInitialChanged(); + this.OnPropertyChanged("MaximumVerticalMonitorResolutionInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MaximumVerticalMonitorResolutionInitial; + partial void OnMaximumVerticalMonitorResolutionInitialChanging(global::System.Nullable value); + partial void OnMaximumVerticalMonitorResolutionInitialChanged(); + /// + /// There are no comments for Property MaximumVerticalMonitorResolutionMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MaximumVerticalMonitorResolutionMaximum + { + get + { + return this._MaximumVerticalMonitorResolutionMaximum; + } + set + { + this.OnMaximumVerticalMonitorResolutionMaximumChanging(value); + this._MaximumVerticalMonitorResolutionMaximum = value; + this.OnMaximumVerticalMonitorResolutionMaximumChanged(); + this.OnPropertyChanged("MaximumVerticalMonitorResolutionMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MaximumVerticalMonitorResolutionMaximum; + partial void OnMaximumVerticalMonitorResolutionMaximumChanging(global::System.Nullable value); + partial void OnMaximumVerticalMonitorResolutionMaximumChanged(); + /// + /// There are no comments for Property MaximumVerticalMonitorResolutionMinimum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MaximumVerticalMonitorResolutionMinimum + { + get + { + return this._MaximumVerticalMonitorResolutionMinimum; + } + set + { + this.OnMaximumVerticalMonitorResolutionMinimumChanging(value); + this._MaximumVerticalMonitorResolutionMinimum = value; + this.OnMaximumVerticalMonitorResolutionMinimumChanged(); + this.OnPropertyChanged("MaximumVerticalMonitorResolutionMinimum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MaximumVerticalMonitorResolutionMinimum; + partial void OnMaximumVerticalMonitorResolutionMinimumChanging(global::System.Nullable value); + partial void OnMaximumVerticalMonitorResolutionMinimumChanged(); + /// + /// There are no comments for Property MemoryAmountInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MemoryAmountInitial + { + get + { + return this._MemoryAmountInitial; + } + set + { + this.OnMemoryAmountInitialChanging(value); + this._MemoryAmountInitial = value; + this.OnMemoryAmountInitialChanged(); + this.OnPropertyChanged("MemoryAmountInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MemoryAmountInitial; + partial void OnMemoryAmountInitialChanging(global::System.Nullable value); + partial void OnMemoryAmountInitialChanged(); + /// + /// There are no comments for Property MemoryAmountMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MemoryAmountMaximum + { + get + { + return this._MemoryAmountMaximum; + } + set + { + this.OnMemoryAmountMaximumChanging(value); + this._MemoryAmountMaximum = value; + this.OnMemoryAmountMaximumChanged(); + this.OnPropertyChanged("MemoryAmountMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MemoryAmountMaximum; + partial void OnMemoryAmountMaximumChanging(global::System.Nullable value); + partial void OnMemoryAmountMaximumChanged(); + /// + /// There are no comments for Property MemoryAmountMinimum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MemoryAmountMinimum + { + get + { + return this._MemoryAmountMinimum; + } + set + { + this.OnMemoryAmountMinimumChanging(value); + this._MemoryAmountMinimum = value; + this.OnMemoryAmountMinimumChanged(); + this.OnPropertyChanged("MemoryAmountMinimum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MemoryAmountMinimum; + partial void OnMemoryAmountMinimumChanging(global::System.Nullable value); + partial void OnMemoryAmountMinimumChanged(); + /// + /// There are no comments for Property MemoryMBInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MemoryMBInitial + { + get + { + return this._MemoryMBInitial; + } + set + { + this.OnMemoryMBInitialChanging(value); + this._MemoryMBInitial = value; + this.OnMemoryMBInitialChanged(); + this.OnPropertyChanged("MemoryMBInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MemoryMBInitial; + partial void OnMemoryMBInitialChanging(global::System.Nullable value); + partial void OnMemoryMBInitialChanged(); + /// + /// There are no comments for Property MemoryMBMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MemoryMBMaximum + { + get + { + return this._MemoryMBMaximum; + } + set + { + this.OnMemoryMBMaximumChanging(value); + this._MemoryMBMaximum = value; + this.OnMemoryMBMaximumChanged(); + this.OnPropertyChanged("MemoryMBMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MemoryMBMaximum; + partial void OnMemoryMBMaximumChanging(global::System.Nullable value); + partial void OnMemoryMBMaximumChanged(); + /// + /// There are no comments for Property MemoryMBMinimum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MemoryMBMinimum + { + get + { + return this._MemoryMBMinimum; + } + set + { + this.OnMemoryMBMinimumChanging(value); + this._MemoryMBMinimum = value; + this.OnMemoryMBMinimumChanged(); + this.OnPropertyChanged("MemoryMBMinimum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MemoryMBMinimum; + partial void OnMemoryMBMinimumChanging(global::System.Nullable value); + partial void OnMemoryMBMinimumChanged(); + /// + /// There are no comments for Property MemoryPriorityCustomInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MemoryPriorityCustomInitial + { + get + { + return this._MemoryPriorityCustomInitial; + } + set + { + this.OnMemoryPriorityCustomInitialChanging(value); + this._MemoryPriorityCustomInitial = value; + this.OnMemoryPriorityCustomInitialChanged(); + this.OnPropertyChanged("MemoryPriorityCustomInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MemoryPriorityCustomInitial; + partial void OnMemoryPriorityCustomInitialChanging(global::System.Nullable value); + partial void OnMemoryPriorityCustomInitialChanged(); + /// + /// There are no comments for Property MemoryPriorityCustomMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MemoryPriorityCustomMaximum + { + get + { + return this._MemoryPriorityCustomMaximum; + } + set + { + this.OnMemoryPriorityCustomMaximumChanging(value); + this._MemoryPriorityCustomMaximum = value; + this.OnMemoryPriorityCustomMaximumChanged(); + this.OnPropertyChanged("MemoryPriorityCustomMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MemoryPriorityCustomMaximum; + partial void OnMemoryPriorityCustomMaximumChanging(global::System.Nullable value); + partial void OnMemoryPriorityCustomMaximumChanged(); + /// + /// There are no comments for Property MemoryPriorityCustomMinimum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MemoryPriorityCustomMinimum + { + get + { + return this._MemoryPriorityCustomMinimum; + } + set + { + this.OnMemoryPriorityCustomMinimumChanging(value); + this._MemoryPriorityCustomMinimum = value; + this.OnMemoryPriorityCustomMinimumChanged(); + this.OnPropertyChanged("MemoryPriorityCustomMinimum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MemoryPriorityCustomMinimum; + partial void OnMemoryPriorityCustomMinimumChanging(global::System.Nullable value); + partial void OnMemoryPriorityCustomMinimumChanged(); + /// + /// There are no comments for Property MemoryPriorityHighInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MemoryPriorityHighInitial + { + get + { + return this._MemoryPriorityHighInitial; + } + set + { + this.OnMemoryPriorityHighInitialChanging(value); + this._MemoryPriorityHighInitial = value; + this.OnMemoryPriorityHighInitialChanged(); + this.OnPropertyChanged("MemoryPriorityHighInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MemoryPriorityHighInitial; + partial void OnMemoryPriorityHighInitialChanging(global::System.Nullable value); + partial void OnMemoryPriorityHighInitialChanged(); + /// + /// There are no comments for Property MemoryPriorityHighMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MemoryPriorityHighMaximum + { + get + { + return this._MemoryPriorityHighMaximum; + } + set + { + this.OnMemoryPriorityHighMaximumChanging(value); + this._MemoryPriorityHighMaximum = value; + this.OnMemoryPriorityHighMaximumChanged(); + this.OnPropertyChanged("MemoryPriorityHighMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MemoryPriorityHighMaximum; + partial void OnMemoryPriorityHighMaximumChanging(global::System.Nullable value); + partial void OnMemoryPriorityHighMaximumChanged(); + /// + /// There are no comments for Property MemoryPriorityHighMinimum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MemoryPriorityHighMinimum + { + get + { + return this._MemoryPriorityHighMinimum; + } + set + { + this.OnMemoryPriorityHighMinimumChanging(value); + this._MemoryPriorityHighMinimum = value; + this.OnMemoryPriorityHighMinimumChanged(); + this.OnPropertyChanged("MemoryPriorityHighMinimum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MemoryPriorityHighMinimum; + partial void OnMemoryPriorityHighMinimumChanging(global::System.Nullable value); + partial void OnMemoryPriorityHighMinimumChanged(); + /// + /// There are no comments for Property MemoryPriorityLowInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MemoryPriorityLowInitial + { + get + { + return this._MemoryPriorityLowInitial; + } + set + { + this.OnMemoryPriorityLowInitialChanging(value); + this._MemoryPriorityLowInitial = value; + this.OnMemoryPriorityLowInitialChanged(); + this.OnPropertyChanged("MemoryPriorityLowInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MemoryPriorityLowInitial; + partial void OnMemoryPriorityLowInitialChanging(global::System.Nullable value); + partial void OnMemoryPriorityLowInitialChanged(); + /// + /// There are no comments for Property MemoryPriorityLowMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MemoryPriorityLowMaximum + { + get + { + return this._MemoryPriorityLowMaximum; + } + set + { + this.OnMemoryPriorityLowMaximumChanging(value); + this._MemoryPriorityLowMaximum = value; + this.OnMemoryPriorityLowMaximumChanged(); + this.OnPropertyChanged("MemoryPriorityLowMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MemoryPriorityLowMaximum; + partial void OnMemoryPriorityLowMaximumChanging(global::System.Nullable value); + partial void OnMemoryPriorityLowMaximumChanged(); + /// + /// There are no comments for Property MemoryPriorityLowMinimum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MemoryPriorityLowMinimum + { + get + { + return this._MemoryPriorityLowMinimum; + } + set + { + this.OnMemoryPriorityLowMinimumChanging(value); + this._MemoryPriorityLowMinimum = value; + this.OnMemoryPriorityLowMinimumChanged(); + this.OnPropertyChanged("MemoryPriorityLowMinimum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MemoryPriorityLowMinimum; + partial void OnMemoryPriorityLowMinimumChanging(global::System.Nullable value); + partial void OnMemoryPriorityLowMinimumChanged(); + /// + /// There are no comments for Property MemoryPriorityNormalInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MemoryPriorityNormalInitial + { + get + { + return this._MemoryPriorityNormalInitial; + } + set + { + this.OnMemoryPriorityNormalInitialChanging(value); + this._MemoryPriorityNormalInitial = value; + this.OnMemoryPriorityNormalInitialChanged(); + this.OnPropertyChanged("MemoryPriorityNormalInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MemoryPriorityNormalInitial; + partial void OnMemoryPriorityNormalInitialChanging(global::System.Nullable value); + partial void OnMemoryPriorityNormalInitialChanged(); + /// + /// There are no comments for Property MemoryPriorityNormalMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MemoryPriorityNormalMaximum + { + get + { + return this._MemoryPriorityNormalMaximum; + } + set + { + this.OnMemoryPriorityNormalMaximumChanging(value); + this._MemoryPriorityNormalMaximum = value; + this.OnMemoryPriorityNormalMaximumChanged(); + this.OnPropertyChanged("MemoryPriorityNormalMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MemoryPriorityNormalMaximum; + partial void OnMemoryPriorityNormalMaximumChanging(global::System.Nullable value); + partial void OnMemoryPriorityNormalMaximumChanged(); + /// + /// There are no comments for Property MemoryPriorityNormalMinimum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MemoryPriorityNormalMinimum + { + get + { + return this._MemoryPriorityNormalMinimum; + } + set + { + this.OnMemoryPriorityNormalMinimumChanging(value); + this._MemoryPriorityNormalMinimum = value; + this.OnMemoryPriorityNormalMinimumChanged(); + this.OnPropertyChanged("MemoryPriorityNormalMinimum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MemoryPriorityNormalMinimum; + partial void OnMemoryPriorityNormalMinimumChanging(global::System.Nullable value); + partial void OnMemoryPriorityNormalMinimumChanged(); + /// + /// There are no comments for Property NetworkAdapterNameInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string NetworkAdapterNameInitial + { + get + { + return this._NetworkAdapterNameInitial; + } + set + { + this.OnNetworkAdapterNameInitialChanging(value); + this._NetworkAdapterNameInitial = value; + this.OnNetworkAdapterNameInitialChanged(); + this.OnPropertyChanged("NetworkAdapterNameInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _NetworkAdapterNameInitial; + partial void OnNetworkAdapterNameInitialChanging(string value); + partial void OnNetworkAdapterNameInitialChanged(); + /// + /// There are no comments for Property NetworkOptimizationValue in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable NetworkOptimizationValue + { + get + { + return this._NetworkOptimizationValue; + } + set + { + this.OnNetworkOptimizationValueChanging(value); + this._NetworkOptimizationValue = value; + this.OnNetworkOptimizationValueChanged(); + this.OnPropertyChanged("NetworkOptimizationValue"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _NetworkOptimizationValue; + partial void OnNetworkOptimizationValueChanging(global::System.Nullable value); + partial void OnNetworkOptimizationValueChanged(); + /// + /// There are no comments for Property NetworkOptimizationValueCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable NetworkOptimizationValueCanChange + { + get + { + return this._NetworkOptimizationValueCanChange; + } + set + { + this.OnNetworkOptimizationValueCanChangeChanging(value); + this._NetworkOptimizationValueCanChange = value; + this.OnNetworkOptimizationValueCanChangeChanged(); + this.OnPropertyChanged("NetworkOptimizationValueCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _NetworkOptimizationValueCanChange; + partial void OnNetworkOptimizationValueCanChangeChanging(global::System.Nullable value); + partial void OnNetworkOptimizationValueCanChangeChanged(); + /// + /// There are no comments for Property NewDiskDriveChannelInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable NewDiskDriveChannelInitial + { + get + { + return this._NewDiskDriveChannelInitial; + } + set + { + this.OnNewDiskDriveChannelInitialChanging(value); + this._NewDiskDriveChannelInitial = value; + this.OnNewDiskDriveChannelInitialChanged(); + this.OnPropertyChanged("NewDiskDriveChannelInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _NewDiskDriveChannelInitial; + partial void OnNewDiskDriveChannelInitialChanging(global::System.Nullable value); + partial void OnNewDiskDriveChannelInitialChanged(); + /// + /// There are no comments for Property NewDiskDriveChannelMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable NewDiskDriveChannelMaximum + { + get + { + return this._NewDiskDriveChannelMaximum; + } + set + { + this.OnNewDiskDriveChannelMaximumChanging(value); + this._NewDiskDriveChannelMaximum = value; + this.OnNewDiskDriveChannelMaximumChanged(); + this.OnPropertyChanged("NewDiskDriveChannelMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _NewDiskDriveChannelMaximum; + partial void OnNewDiskDriveChannelMaximumChanging(global::System.Nullable value); + partial void OnNewDiskDriveChannelMaximumChanged(); + /// + /// There are no comments for Property NewDiskDriveChannelMinimum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable NewDiskDriveChannelMinimum + { + get + { + return this._NewDiskDriveChannelMinimum; + } + set + { + this.OnNewDiskDriveChannelMinimumChanging(value); + this._NewDiskDriveChannelMinimum = value; + this.OnNewDiskDriveChannelMinimumChanged(); + this.OnPropertyChanged("NewDiskDriveChannelMinimum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _NewDiskDriveChannelMinimum; + partial void OnNewDiskDriveChannelMinimumChanging(global::System.Nullable value); + partial void OnNewDiskDriveChannelMinimumChanged(); + /// + /// There are no comments for Property NewDiskFileNameInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string NewDiskFileNameInitial + { + get + { + return this._NewDiskFileNameInitial; + } + set + { + this.OnNewDiskFileNameInitialChanging(value); + this._NewDiskFileNameInitial = value; + this.OnNewDiskFileNameInitialChanged(); + this.OnPropertyChanged("NewDiskFileNameInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _NewDiskFileNameInitial; + partial void OnNewDiskFileNameInitialChanging(string value); + partial void OnNewDiskFileNameInitialChanged(); + /// + /// There are no comments for Property NewDiskImageFileInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable NewDiskImageFileInitial + { + get + { + return this._NewDiskImageFileInitial; + } + set + { + this.OnNewDiskImageFileInitialChanging(value); + this._NewDiskImageFileInitial = value; + this.OnNewDiskImageFileInitialChanged(); + this.OnPropertyChanged("NewDiskImageFileInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _NewDiskImageFileInitial; + partial void OnNewDiskImageFileInitialChanging(global::System.Nullable value); + partial void OnNewDiskImageFileInitialChanged(); + /// + /// There are no comments for Property NewDiskStorageClassificationValue in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable NewDiskStorageClassificationValue + { + get + { + return this._NewDiskStorageClassificationValue; + } + set + { + this.OnNewDiskStorageClassificationValueChanging(value); + this._NewDiskStorageClassificationValue = value; + this.OnNewDiskStorageClassificationValueChanged(); + this.OnPropertyChanged("NewDiskStorageClassificationValue"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _NewDiskStorageClassificationValue; + partial void OnNewDiskStorageClassificationValueChanging(global::System.Nullable value); + partial void OnNewDiskStorageClassificationValueChanged(); + /// + /// There are no comments for Property OSCompatibilityModeValue in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable OSCompatibilityModeValue + { + get + { + return this._OSCompatibilityModeValue; + } + set + { + this.OnOSCompatibilityModeValueChanging(value); + this._OSCompatibilityModeValue = value; + this.OnOSCompatibilityModeValueChanged(); + this.OnPropertyChanged("OSCompatibilityModeValue"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _OSCompatibilityModeValue; + partial void OnOSCompatibilityModeValueChanging(global::System.Nullable value); + partial void OnOSCompatibilityModeValueChanged(); + /// + /// There are no comments for Property OSCompatibilityModeValueCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable OSCompatibilityModeValueCanChange + { + get + { + return this._OSCompatibilityModeValueCanChange; + } + set + { + this.OnOSCompatibilityModeValueCanChangeChanging(value); + this._OSCompatibilityModeValueCanChange = value; + this.OnOSCompatibilityModeValueCanChangeChanged(); + this.OnPropertyChanged("OSCompatibilityModeValueCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _OSCompatibilityModeValueCanChange; + partial void OnOSCompatibilityModeValueCanChangeChanging(global::System.Nullable value); + partial void OnOSCompatibilityModeValueCanChangeChanged(); + /// + /// There are no comments for Property ReadOnly in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ReadOnly + { + get + { + return this._ReadOnly; + } + set + { + this.OnReadOnlyChanging(value); + this._ReadOnly = value; + this.OnReadOnlyChanged(); + this.OnPropertyChanged("ReadOnly"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ReadOnly; + partial void OnReadOnlyChanging(global::System.Nullable value); + partial void OnReadOnlyChanged(); + /// + /// There are no comments for Property SCSIAdapterCountInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable SCSIAdapterCountInitial + { + get + { + return this._SCSIAdapterCountInitial; + } + set + { + this.OnSCSIAdapterCountInitialChanging(value); + this._SCSIAdapterCountInitial = value; + this.OnSCSIAdapterCountInitialChanged(); + this.OnPropertyChanged("SCSIAdapterCountInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _SCSIAdapterCountInitial; + partial void OnSCSIAdapterCountInitialChanging(global::System.Nullable value); + partial void OnSCSIAdapterCountInitialChanged(); + /// + /// There are no comments for Property SCSIAdapterCountMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable SCSIAdapterCountMaximum + { + get + { + return this._SCSIAdapterCountMaximum; + } + set + { + this.OnSCSIAdapterCountMaximumChanging(value); + this._SCSIAdapterCountMaximum = value; + this.OnSCSIAdapterCountMaximumChanged(); + this.OnPropertyChanged("SCSIAdapterCountMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _SCSIAdapterCountMaximum; + partial void OnSCSIAdapterCountMaximumChanging(global::System.Nullable value); + partial void OnSCSIAdapterCountMaximumChanged(); + /// + /// There are no comments for Property SCSIAdapterCountMinimum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable SCSIAdapterCountMinimum + { + get + { + return this._SCSIAdapterCountMinimum; + } + set + { + this.OnSCSIAdapterCountMinimumChanging(value); + this._SCSIAdapterCountMinimum = value; + this.OnSCSIAdapterCountMinimumChanged(); + this.OnPropertyChanged("SCSIAdapterCountMinimum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _SCSIAdapterCountMinimum; + partial void OnSCSIAdapterCountMinimumChanging(global::System.Nullable value); + partial void OnSCSIAdapterCountMinimumChanged(); + /// + /// There are no comments for Property SharedDVDImageFileValue in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable SharedDVDImageFileValue + { + get + { + return this._SharedDVDImageFileValue; + } + set + { + this.OnSharedDVDImageFileValueChanging(value); + this._SharedDVDImageFileValue = value; + this.OnSharedDVDImageFileValueChanged(); + this.OnPropertyChanged("SharedDVDImageFileValue"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _SharedDVDImageFileValue; + partial void OnSharedDVDImageFileValueChanging(global::System.Nullable value); + partial void OnSharedDVDImageFileValueChanged(); + /// + /// There are no comments for Property SharedDVDImageFileValueCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable SharedDVDImageFileValueCanChange + { + get + { + return this._SharedDVDImageFileValueCanChange; + } + set + { + this.OnSharedDVDImageFileValueCanChangeChanging(value); + this._SharedDVDImageFileValueCanChange = value; + this.OnSharedDVDImageFileValueCanChangeChanged(); + this.OnPropertyChanged("SharedDVDImageFileValueCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _SharedDVDImageFileValueCanChange; + partial void OnSharedDVDImageFileValueCanChangeChanging(global::System.Nullable value); + partial void OnSharedDVDImageFileValueCanChangeChanged(); + /// + /// There are no comments for Property StartActionAlwaysStartCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StartActionAlwaysStartCanChange + { + get + { + return this._StartActionAlwaysStartCanChange; + } + set + { + this.OnStartActionAlwaysStartCanChangeChanging(value); + this._StartActionAlwaysStartCanChange = value; + this.OnStartActionAlwaysStartCanChangeChanged(); + this.OnPropertyChanged("StartActionAlwaysStartCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StartActionAlwaysStartCanChange; + partial void OnStartActionAlwaysStartCanChangeChanging(global::System.Nullable value); + partial void OnStartActionAlwaysStartCanChangeChanged(); + /// + /// There are no comments for Property StartActionAlwaysStartInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StartActionAlwaysStartInitial + { + get + { + return this._StartActionAlwaysStartInitial; + } + set + { + this.OnStartActionAlwaysStartInitialChanging(value); + this._StartActionAlwaysStartInitial = value; + this.OnStartActionAlwaysStartInitialChanged(); + this.OnPropertyChanged("StartActionAlwaysStartInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StartActionAlwaysStartInitial; + partial void OnStartActionAlwaysStartInitialChanging(global::System.Nullable value); + partial void OnStartActionAlwaysStartInitialChanged(); + /// + /// There are no comments for Property StartActionAutomaticallyStartIfRunningCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StartActionAutomaticallyStartIfRunningCanChange + { + get + { + return this._StartActionAutomaticallyStartIfRunningCanChange; + } + set + { + this.OnStartActionAutomaticallyStartIfRunningCanChangeChanging(value); + this._StartActionAutomaticallyStartIfRunningCanChange = value; + this.OnStartActionAutomaticallyStartIfRunningCanChangeChanged(); + this.OnPropertyChanged("StartActionAutomaticallyStartIfRunningCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StartActionAutomaticallyStartIfRunningCanChange; + partial void OnStartActionAutomaticallyStartIfRunningCanChangeChanging(global::System.Nullable value); + partial void OnStartActionAutomaticallyStartIfRunningCanChangeChanged(); + /// + /// There are no comments for Property StartActionAutomaticallyStartIfRunningInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StartActionAutomaticallyStartIfRunningInitial + { + get + { + return this._StartActionAutomaticallyStartIfRunningInitial; + } + set + { + this.OnStartActionAutomaticallyStartIfRunningInitialChanging(value); + this._StartActionAutomaticallyStartIfRunningInitial = value; + this.OnStartActionAutomaticallyStartIfRunningInitialChanged(); + this.OnPropertyChanged("StartActionAutomaticallyStartIfRunningInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StartActionAutomaticallyStartIfRunningInitial; + partial void OnStartActionAutomaticallyStartIfRunningInitialChanging(global::System.Nullable value); + partial void OnStartActionAutomaticallyStartIfRunningInitialChanged(); + /// + /// There are no comments for Property StartActionDoNothingCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StartActionDoNothingCanChange + { + get + { + return this._StartActionDoNothingCanChange; + } + set + { + this.OnStartActionDoNothingCanChangeChanging(value); + this._StartActionDoNothingCanChange = value; + this.OnStartActionDoNothingCanChangeChanged(); + this.OnPropertyChanged("StartActionDoNothingCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StartActionDoNothingCanChange; + partial void OnStartActionDoNothingCanChangeChanging(global::System.Nullable value); + partial void OnStartActionDoNothingCanChangeChanged(); + /// + /// There are no comments for Property StartActionDoNothingInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StartActionDoNothingInitial + { + get + { + return this._StartActionDoNothingInitial; + } + set + { + this.OnStartActionDoNothingInitialChanging(value); + this._StartActionDoNothingInitial = value; + this.OnStartActionDoNothingInitialChanged(); + this.OnPropertyChanged("StartActionDoNothingInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StartActionDoNothingInitial; + partial void OnStartActionDoNothingInitialChanging(global::System.Nullable value); + partial void OnStartActionDoNothingInitialChanged(); + /// + /// There are no comments for Property StartupDelaySecondsInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StartupDelaySecondsInitial + { + get + { + return this._StartupDelaySecondsInitial; + } + set + { + this.OnStartupDelaySecondsInitialChanging(value); + this._StartupDelaySecondsInitial = value; + this.OnStartupDelaySecondsInitialChanged(); + this.OnPropertyChanged("StartupDelaySecondsInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StartupDelaySecondsInitial; + partial void OnStartupDelaySecondsInitialChanging(global::System.Nullable value); + partial void OnStartupDelaySecondsInitialChanged(); + /// + /// There are no comments for Property StartupDelaySecondsMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StartupDelaySecondsMaximum + { + get + { + return this._StartupDelaySecondsMaximum; + } + set + { + this.OnStartupDelaySecondsMaximumChanging(value); + this._StartupDelaySecondsMaximum = value; + this.OnStartupDelaySecondsMaximumChanged(); + this.OnPropertyChanged("StartupDelaySecondsMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StartupDelaySecondsMaximum; + partial void OnStartupDelaySecondsMaximumChanging(global::System.Nullable value); + partial void OnStartupDelaySecondsMaximumChanged(); + /// + /// There are no comments for Property StartupDelaySecondsMinimum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StartupDelaySecondsMinimum + { + get + { + return this._StartupDelaySecondsMinimum; + } + set + { + this.OnStartupDelaySecondsMinimumChanging(value); + this._StartupDelaySecondsMinimum = value; + this.OnStartupDelaySecondsMinimumChanged(); + this.OnPropertyChanged("StartupDelaySecondsMinimum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StartupDelaySecondsMinimum; + partial void OnStartupDelaySecondsMinimumChanging(global::System.Nullable value); + partial void OnStartupDelaySecondsMinimumChanged(); + /// + /// There are no comments for Property StartupMemoryMBInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StartupMemoryMBInitial + { + get + { + return this._StartupMemoryMBInitial; + } + set + { + this.OnStartupMemoryMBInitialChanging(value); + this._StartupMemoryMBInitial = value; + this.OnStartupMemoryMBInitialChanged(); + this.OnPropertyChanged("StartupMemoryMBInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StartupMemoryMBInitial; + partial void OnStartupMemoryMBInitialChanging(global::System.Nullable value); + partial void OnStartupMemoryMBInitialChanged(); + /// + /// There are no comments for Property StartupMemoryMBMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StartupMemoryMBMaximum + { + get + { + return this._StartupMemoryMBMaximum; + } + set + { + this.OnStartupMemoryMBMaximumChanging(value); + this._StartupMemoryMBMaximum = value; + this.OnStartupMemoryMBMaximumChanged(); + this.OnPropertyChanged("StartupMemoryMBMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StartupMemoryMBMaximum; + partial void OnStartupMemoryMBMaximumChanging(global::System.Nullable value); + partial void OnStartupMemoryMBMaximumChanged(); + /// + /// There are no comments for Property StartupMemoryMBMinimum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StartupMemoryMBMinimum + { + get + { + return this._StartupMemoryMBMinimum; + } + set + { + this.OnStartupMemoryMBMinimumChanging(value); + this._StartupMemoryMBMinimum = value; + this.OnStartupMemoryMBMinimumChanged(); + this.OnPropertyChanged("StartupMemoryMBMinimum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StartupMemoryMBMinimum; + partial void OnStartupMemoryMBMinimumChanging(global::System.Nullable value); + partial void OnStartupMemoryMBMinimumChanged(); + /// + /// There are no comments for Property StaticMACAddressInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string StaticMACAddressInitial + { + get + { + return this._StaticMACAddressInitial; + } + set + { + this.OnStaticMACAddressInitialChanging(value); + this._StaticMACAddressInitial = value; + this.OnStaticMACAddressInitialChanged(); + this.OnPropertyChanged("StaticMACAddressInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _StaticMACAddressInitial; + partial void OnStaticMACAddressInitialChanging(string value); + partial void OnStaticMACAddressInitialChanged(); + /// + /// There are no comments for Property StaticMemoryCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StaticMemoryCanChange + { + get + { + return this._StaticMemoryCanChange; + } + set + { + this.OnStaticMemoryCanChangeChanging(value); + this._StaticMemoryCanChange = value; + this.OnStaticMemoryCanChangeChanged(); + this.OnPropertyChanged("StaticMemoryCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StaticMemoryCanChange; + partial void OnStaticMemoryCanChangeChanging(global::System.Nullable value); + partial void OnStaticMemoryCanChangeChanged(); + /// + /// There are no comments for Property StaticMemoryInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StaticMemoryInitial + { + get + { + return this._StaticMemoryInitial; + } + set + { + this.OnStaticMemoryInitialChanging(value); + this._StaticMemoryInitial = value; + this.OnStaticMemoryInitialChanged(); + this.OnPropertyChanged("StaticMemoryInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StaticMemoryInitial; + partial void OnStaticMemoryInitialChanging(global::System.Nullable value); + partial void OnStaticMemoryInitialChanged(); + /// + /// There are no comments for Property StopActionDoNothingCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StopActionDoNothingCanChange + { + get + { + return this._StopActionDoNothingCanChange; + } + set + { + this.OnStopActionDoNothingCanChangeChanging(value); + this._StopActionDoNothingCanChange = value; + this.OnStopActionDoNothingCanChangeChanged(); + this.OnPropertyChanged("StopActionDoNothingCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StopActionDoNothingCanChange; + partial void OnStopActionDoNothingCanChangeChanging(global::System.Nullable value); + partial void OnStopActionDoNothingCanChangeChanged(); + /// + /// There are no comments for Property StopActionDoNothingInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StopActionDoNothingInitial + { + get + { + return this._StopActionDoNothingInitial; + } + set + { + this.OnStopActionDoNothingInitialChanging(value); + this._StopActionDoNothingInitial = value; + this.OnStopActionDoNothingInitialChanged(); + this.OnPropertyChanged("StopActionDoNothingInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StopActionDoNothingInitial; + partial void OnStopActionDoNothingInitialChanging(global::System.Nullable value); + partial void OnStopActionDoNothingInitialChanged(); + /// + /// There are no comments for Property StopActionSaveStateVMCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StopActionSaveStateVMCanChange + { + get + { + return this._StopActionSaveStateVMCanChange; + } + set + { + this.OnStopActionSaveStateVMCanChangeChanging(value); + this._StopActionSaveStateVMCanChange = value; + this.OnStopActionSaveStateVMCanChangeChanged(); + this.OnPropertyChanged("StopActionSaveStateVMCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StopActionSaveStateVMCanChange; + partial void OnStopActionSaveStateVMCanChangeChanging(global::System.Nullable value); + partial void OnStopActionSaveStateVMCanChangeChanged(); + /// + /// There are no comments for Property StopActionSaveStateVMInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StopActionSaveStateVMInitial + { + get + { + return this._StopActionSaveStateVMInitial; + } + set + { + this.OnStopActionSaveStateVMInitialChanging(value); + this._StopActionSaveStateVMInitial = value; + this.OnStopActionSaveStateVMInitialChanged(); + this.OnPropertyChanged("StopActionSaveStateVMInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StopActionSaveStateVMInitial; + partial void OnStopActionSaveStateVMInitialChanging(global::System.Nullable value); + partial void OnStopActionSaveStateVMInitialChanged(); + /// + /// There are no comments for Property StopActionShutdownVMCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StopActionShutdownVMCanChange + { + get + { + return this._StopActionShutdownVMCanChange; + } + set + { + this.OnStopActionShutdownVMCanChangeChanging(value); + this._StopActionShutdownVMCanChange = value; + this.OnStopActionShutdownVMCanChangeChanged(); + this.OnPropertyChanged("StopActionShutdownVMCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StopActionShutdownVMCanChange; + partial void OnStopActionShutdownVMCanChangeChanging(global::System.Nullable value); + partial void OnStopActionShutdownVMCanChangeChanged(); + /// + /// There are no comments for Property StopActionShutdownVMInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StopActionShutdownVMInitial + { + get + { + return this._StopActionShutdownVMInitial; + } + set + { + this.OnStopActionShutdownVMInitialChanging(value); + this._StopActionShutdownVMInitial = value; + this.OnStopActionShutdownVMInitialChanged(); + this.OnPropertyChanged("StopActionShutdownVMInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StopActionShutdownVMInitial; + partial void OnStopActionShutdownVMInitialChanging(global::System.Nullable value); + partial void OnStopActionShutdownVMInitialChanged(); + /// + /// There are no comments for Property StopActionTurnOffVMCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StopActionTurnOffVMCanChange + { + get + { + return this._StopActionTurnOffVMCanChange; + } + set + { + this.OnStopActionTurnOffVMCanChangeChanging(value); + this._StopActionTurnOffVMCanChange = value; + this.OnStopActionTurnOffVMCanChangeChanged(); + this.OnPropertyChanged("StopActionTurnOffVMCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StopActionTurnOffVMCanChange; + partial void OnStopActionTurnOffVMCanChangeChanging(global::System.Nullable value); + partial void OnStopActionTurnOffVMCanChangeChanged(); + /// + /// There are no comments for Property StopActionTurnOffVMInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StopActionTurnOffVMInitial + { + get + { + return this._StopActionTurnOffVMInitial; + } + set + { + this.OnStopActionTurnOffVMInitialChanging(value); + this._StopActionTurnOffVMInitial = value; + this.OnStopActionTurnOffVMInitialChanged(); + this.OnPropertyChanged("StopActionTurnOffVMInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StopActionTurnOffVMInitial; + partial void OnStopActionTurnOffVMInitialChanging(global::System.Nullable value); + partial void OnStopActionTurnOffVMInitialChanged(); + /// + /// There are no comments for Property TargetMemoryBufferPercentInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable TargetMemoryBufferPercentInitial + { + get + { + return this._TargetMemoryBufferPercentInitial; + } + set + { + this.OnTargetMemoryBufferPercentInitialChanging(value); + this._TargetMemoryBufferPercentInitial = value; + this.OnTargetMemoryBufferPercentInitialChanged(); + this.OnPropertyChanged("TargetMemoryBufferPercentInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _TargetMemoryBufferPercentInitial; + partial void OnTargetMemoryBufferPercentInitialChanging(global::System.Nullable value); + partial void OnTargetMemoryBufferPercentInitialChanged(); + /// + /// There are no comments for Property TargetMemoryBufferPercentMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable TargetMemoryBufferPercentMaximum + { + get + { + return this._TargetMemoryBufferPercentMaximum; + } + set + { + this.OnTargetMemoryBufferPercentMaximumChanging(value); + this._TargetMemoryBufferPercentMaximum = value; + this.OnTargetMemoryBufferPercentMaximumChanged(); + this.OnPropertyChanged("TargetMemoryBufferPercentMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _TargetMemoryBufferPercentMaximum; + partial void OnTargetMemoryBufferPercentMaximumChanging(global::System.Nullable value); + partial void OnTargetMemoryBufferPercentMaximumChanged(); + /// + /// There are no comments for Property TargetMemoryBufferPercentMinimum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable TargetMemoryBufferPercentMinimum + { + get + { + return this._TargetMemoryBufferPercentMinimum; + } + set + { + this.OnTargetMemoryBufferPercentMinimumChanging(value); + this._TargetMemoryBufferPercentMinimum = value; + this.OnTargetMemoryBufferPercentMinimumChanged(); + this.OnPropertyChanged("TargetMemoryBufferPercentMinimum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _TargetMemoryBufferPercentMinimum; + partial void OnTargetMemoryBufferPercentMinimumChanging(global::System.Nullable value); + partial void OnTargetMemoryBufferPercentMinimumChanged(); + /// + /// There are no comments for Property UseBusLogicParallelSCSICanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseBusLogicParallelSCSICanChange + { + get + { + return this._UseBusLogicParallelSCSICanChange; + } + set + { + this.OnUseBusLogicParallelSCSICanChangeChanging(value); + this._UseBusLogicParallelSCSICanChange = value; + this.OnUseBusLogicParallelSCSICanChangeChanged(); + this.OnPropertyChanged("UseBusLogicParallelSCSICanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseBusLogicParallelSCSICanChange; + partial void OnUseBusLogicParallelSCSICanChangeChanging(global::System.Nullable value); + partial void OnUseBusLogicParallelSCSICanChangeChanged(); + /// + /// There are no comments for Property UseBusLogicParallelSCSIInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseBusLogicParallelSCSIInitial + { + get + { + return this._UseBusLogicParallelSCSIInitial; + } + set + { + this.OnUseBusLogicParallelSCSIInitialChanging(value); + this._UseBusLogicParallelSCSIInitial = value; + this.OnUseBusLogicParallelSCSIInitialChanged(); + this.OnPropertyChanged("UseBusLogicParallelSCSIInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseBusLogicParallelSCSIInitial; + partial void OnUseBusLogicParallelSCSIInitialChanging(global::System.Nullable value); + partial void OnUseBusLogicParallelSCSIInitialChanged(); + /// + /// There are no comments for Property UseCOM1CanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseCOM1CanChange + { + get + { + return this._UseCOM1CanChange; + } + set + { + this.OnUseCOM1CanChangeChanging(value); + this._UseCOM1CanChange = value; + this.OnUseCOM1CanChangeChanged(); + this.OnPropertyChanged("UseCOM1CanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseCOM1CanChange; + partial void OnUseCOM1CanChangeChanging(global::System.Nullable value); + partial void OnUseCOM1CanChangeChanged(); + /// + /// There are no comments for Property UseCOM1Initial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseCOM1Initial + { + get + { + return this._UseCOM1Initial; + } + set + { + this.OnUseCOM1InitialChanging(value); + this._UseCOM1Initial = value; + this.OnUseCOM1InitialChanged(); + this.OnPropertyChanged("UseCOM1Initial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseCOM1Initial; + partial void OnUseCOM1InitialChanging(global::System.Nullable value); + partial void OnUseCOM1InitialChanged(); + /// + /// There are no comments for Property UseCOM1NamedPipeCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseCOM1NamedPipeCanChange + { + get + { + return this._UseCOM1NamedPipeCanChange; + } + set + { + this.OnUseCOM1NamedPipeCanChangeChanging(value); + this._UseCOM1NamedPipeCanChange = value; + this.OnUseCOM1NamedPipeCanChangeChanged(); + this.OnPropertyChanged("UseCOM1NamedPipeCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseCOM1NamedPipeCanChange; + partial void OnUseCOM1NamedPipeCanChangeChanging(global::System.Nullable value); + partial void OnUseCOM1NamedPipeCanChangeChanged(); + /// + /// There are no comments for Property UseCOM1NamedPipeInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseCOM1NamedPipeInitial + { + get + { + return this._UseCOM1NamedPipeInitial; + } + set + { + this.OnUseCOM1NamedPipeInitialChanging(value); + this._UseCOM1NamedPipeInitial = value; + this.OnUseCOM1NamedPipeInitialChanged(); + this.OnPropertyChanged("UseCOM1NamedPipeInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseCOM1NamedPipeInitial; + partial void OnUseCOM1NamedPipeInitialChanging(global::System.Nullable value); + partial void OnUseCOM1NamedPipeInitialChanged(); + /// + /// There are no comments for Property UseCOM1TextFileCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseCOM1TextFileCanChange + { + get + { + return this._UseCOM1TextFileCanChange; + } + set + { + this.OnUseCOM1TextFileCanChangeChanging(value); + this._UseCOM1TextFileCanChange = value; + this.OnUseCOM1TextFileCanChangeChanged(); + this.OnPropertyChanged("UseCOM1TextFileCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseCOM1TextFileCanChange; + partial void OnUseCOM1TextFileCanChangeChanging(global::System.Nullable value); + partial void OnUseCOM1TextFileCanChangeChanged(); + /// + /// There are no comments for Property UseCOM1TextFileInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseCOM1TextFileInitial + { + get + { + return this._UseCOM1TextFileInitial; + } + set + { + this.OnUseCOM1TextFileInitialChanging(value); + this._UseCOM1TextFileInitial = value; + this.OnUseCOM1TextFileInitialChanged(); + this.OnPropertyChanged("UseCOM1TextFileInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseCOM1TextFileInitial; + partial void OnUseCOM1TextFileInitialChanging(global::System.Nullable value); + partial void OnUseCOM1TextFileInitialChanged(); + /// + /// There are no comments for Property UseCOM2CanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseCOM2CanChange + { + get + { + return this._UseCOM2CanChange; + } + set + { + this.OnUseCOM2CanChangeChanging(value); + this._UseCOM2CanChange = value; + this.OnUseCOM2CanChangeChanged(); + this.OnPropertyChanged("UseCOM2CanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseCOM2CanChange; + partial void OnUseCOM2CanChangeChanging(global::System.Nullable value); + partial void OnUseCOM2CanChangeChanged(); + /// + /// There are no comments for Property UseCOM2Initial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseCOM2Initial + { + get + { + return this._UseCOM2Initial; + } + set + { + this.OnUseCOM2InitialChanging(value); + this._UseCOM2Initial = value; + this.OnUseCOM2InitialChanged(); + this.OnPropertyChanged("UseCOM2Initial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseCOM2Initial; + partial void OnUseCOM2InitialChanging(global::System.Nullable value); + partial void OnUseCOM2InitialChanged(); + /// + /// There are no comments for Property UseCOM2NamedPipeCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseCOM2NamedPipeCanChange + { + get + { + return this._UseCOM2NamedPipeCanChange; + } + set + { + this.OnUseCOM2NamedPipeCanChangeChanging(value); + this._UseCOM2NamedPipeCanChange = value; + this.OnUseCOM2NamedPipeCanChangeChanged(); + this.OnPropertyChanged("UseCOM2NamedPipeCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseCOM2NamedPipeCanChange; + partial void OnUseCOM2NamedPipeCanChangeChanging(global::System.Nullable value); + partial void OnUseCOM2NamedPipeCanChangeChanged(); + /// + /// There are no comments for Property UseCOM2NamedPipeInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseCOM2NamedPipeInitial + { + get + { + return this._UseCOM2NamedPipeInitial; + } + set + { + this.OnUseCOM2NamedPipeInitialChanging(value); + this._UseCOM2NamedPipeInitial = value; + this.OnUseCOM2NamedPipeInitialChanged(); + this.OnPropertyChanged("UseCOM2NamedPipeInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseCOM2NamedPipeInitial; + partial void OnUseCOM2NamedPipeInitialChanging(global::System.Nullable value); + partial void OnUseCOM2NamedPipeInitialChanged(); + /// + /// There are no comments for Property UseCOM2TextFileCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseCOM2TextFileCanChange + { + get + { + return this._UseCOM2TextFileCanChange; + } + set + { + this.OnUseCOM2TextFileCanChangeChanging(value); + this._UseCOM2TextFileCanChange = value; + this.OnUseCOM2TextFileCanChangeChanged(); + this.OnPropertyChanged("UseCOM2TextFileCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseCOM2TextFileCanChange; + partial void OnUseCOM2TextFileCanChangeChanging(global::System.Nullable value); + partial void OnUseCOM2TextFileCanChangeChanged(); + /// + /// There are no comments for Property UseCOM2TextFileInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseCOM2TextFileInitial + { + get + { + return this._UseCOM2TextFileInitial; + } + set + { + this.OnUseCOM2TextFileInitialChanging(value); + this._UseCOM2TextFileInitial = value; + this.OnUseCOM2TextFileInitialChanged(); + this.OnPropertyChanged("UseCOM2TextFileInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseCOM2TextFileInitial; + partial void OnUseCOM2TextFileInitialChanging(global::System.Nullable value); + partial void OnUseCOM2TextFileInitialChanged(); + /// + /// There are no comments for Property UseDynamicIPv4CanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseDynamicIPv4CanChange + { + get + { + return this._UseDynamicIPv4CanChange; + } + set + { + this.OnUseDynamicIPv4CanChangeChanging(value); + this._UseDynamicIPv4CanChange = value; + this.OnUseDynamicIPv4CanChangeChanged(); + this.OnPropertyChanged("UseDynamicIPv4CanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseDynamicIPv4CanChange; + partial void OnUseDynamicIPv4CanChangeChanging(global::System.Nullable value); + partial void OnUseDynamicIPv4CanChangeChanged(); + /// + /// There are no comments for Property UseDynamicIPv4Initial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseDynamicIPv4Initial + { + get + { + return this._UseDynamicIPv4Initial; + } + set + { + this.OnUseDynamicIPv4InitialChanging(value); + this._UseDynamicIPv4Initial = value; + this.OnUseDynamicIPv4InitialChanged(); + this.OnPropertyChanged("UseDynamicIPv4Initial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseDynamicIPv4Initial; + partial void OnUseDynamicIPv4InitialChanging(global::System.Nullable value); + partial void OnUseDynamicIPv4InitialChanged(); + /// + /// There are no comments for Property UseDynamicIPv6CanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseDynamicIPv6CanChange + { + get + { + return this._UseDynamicIPv6CanChange; + } + set + { + this.OnUseDynamicIPv6CanChangeChanging(value); + this._UseDynamicIPv6CanChange = value; + this.OnUseDynamicIPv6CanChangeChanged(); + this.OnPropertyChanged("UseDynamicIPv6CanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseDynamicIPv6CanChange; + partial void OnUseDynamicIPv6CanChangeChanging(global::System.Nullable value); + partial void OnUseDynamicIPv6CanChangeChanged(); + /// + /// There are no comments for Property UseDynamicIPv6Initial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseDynamicIPv6Initial + { + get + { + return this._UseDynamicIPv6Initial; + } + set + { + this.OnUseDynamicIPv6InitialChanging(value); + this._UseDynamicIPv6Initial = value; + this.OnUseDynamicIPv6InitialChanged(); + this.OnPropertyChanged("UseDynamicIPv6Initial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseDynamicIPv6Initial; + partial void OnUseDynamicIPv6InitialChanging(global::System.Nullable value); + partial void OnUseDynamicIPv6InitialChanged(); + /// + /// There are no comments for Property UseEmulatedNetworkAdapterCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseEmulatedNetworkAdapterCanChange + { + get + { + return this._UseEmulatedNetworkAdapterCanChange; + } + set + { + this.OnUseEmulatedNetworkAdapterCanChangeChanging(value); + this._UseEmulatedNetworkAdapterCanChange = value; + this.OnUseEmulatedNetworkAdapterCanChangeChanged(); + this.OnPropertyChanged("UseEmulatedNetworkAdapterCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseEmulatedNetworkAdapterCanChange; + partial void OnUseEmulatedNetworkAdapterCanChangeChanging(global::System.Nullable value); + partial void OnUseEmulatedNetworkAdapterCanChangeChanged(); + /// + /// There are no comments for Property UseEmulatedNetworkAdapterInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseEmulatedNetworkAdapterInitial + { + get + { + return this._UseEmulatedNetworkAdapterInitial; + } + set + { + this.OnUseEmulatedNetworkAdapterInitialChanging(value); + this._UseEmulatedNetworkAdapterInitial = value; + this.OnUseEmulatedNetworkAdapterInitialChanged(); + this.OnPropertyChanged("UseEmulatedNetworkAdapterInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseEmulatedNetworkAdapterInitial; + partial void OnUseEmulatedNetworkAdapterInitialChanging(global::System.Nullable value); + partial void OnUseEmulatedNetworkAdapterInitialChanged(); + /// + /// There are no comments for Property UseExistingDiskForOperatingSystemCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseExistingDiskForOperatingSystemCanChange + { + get + { + return this._UseExistingDiskForOperatingSystemCanChange; + } + set + { + this.OnUseExistingDiskForOperatingSystemCanChangeChanging(value); + this._UseExistingDiskForOperatingSystemCanChange = value; + this.OnUseExistingDiskForOperatingSystemCanChangeChanged(); + this.OnPropertyChanged("UseExistingDiskForOperatingSystemCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseExistingDiskForOperatingSystemCanChange; + partial void OnUseExistingDiskForOperatingSystemCanChangeChanging(global::System.Nullable value); + partial void OnUseExistingDiskForOperatingSystemCanChangeChanged(); + /// + /// There are no comments for Property UseExistingDiskForOperatingSystemInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseExistingDiskForOperatingSystemInitial + { + get + { + return this._UseExistingDiskForOperatingSystemInitial; + } + set + { + this.OnUseExistingDiskForOperatingSystemInitialChanging(value); + this._UseExistingDiskForOperatingSystemInitial = value; + this.OnUseExistingDiskForOperatingSystemInitialChanged(); + this.OnPropertyChanged("UseExistingDiskForOperatingSystemInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseExistingDiskForOperatingSystemInitial; + partial void OnUseExistingDiskForOperatingSystemInitialChanging(global::System.Nullable value); + partial void OnUseExistingDiskForOperatingSystemInitialChanged(); + /// + /// There are no comments for Property UseExistingDiskImageFileCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseExistingDiskImageFileCanChange + { + get + { + return this._UseExistingDiskImageFileCanChange; + } + set + { + this.OnUseExistingDiskImageFileCanChangeChanging(value); + this._UseExistingDiskImageFileCanChange = value; + this.OnUseExistingDiskImageFileCanChangeChanged(); + this.OnPropertyChanged("UseExistingDiskImageFileCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseExistingDiskImageFileCanChange; + partial void OnUseExistingDiskImageFileCanChangeChanging(global::System.Nullable value); + partial void OnUseExistingDiskImageFileCanChangeChanged(); + /// + /// There are no comments for Property UseExistingDiskImageFileInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseExistingDiskImageFileInitial + { + get + { + return this._UseExistingDiskImageFileInitial; + } + set + { + this.OnUseExistingDiskImageFileInitialChanging(value); + this._UseExistingDiskImageFileInitial = value; + this.OnUseExistingDiskImageFileInitialChanged(); + this.OnPropertyChanged("UseExistingDiskImageFileInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseExistingDiskImageFileInitial; + partial void OnUseExistingDiskImageFileInitialChanging(global::System.Nullable value); + partial void OnUseExistingDiskImageFileInitialChanged(); + /// + /// There are no comments for Property UseExistingDVDImageFileCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseExistingDVDImageFileCanChange + { + get + { + return this._UseExistingDVDImageFileCanChange; + } + set + { + this.OnUseExistingDVDImageFileCanChangeChanging(value); + this._UseExistingDVDImageFileCanChange = value; + this.OnUseExistingDVDImageFileCanChangeChanged(); + this.OnPropertyChanged("UseExistingDVDImageFileCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseExistingDVDImageFileCanChange; + partial void OnUseExistingDVDImageFileCanChangeChanging(global::System.Nullable value); + partial void OnUseExistingDVDImageFileCanChangeChanged(); + /// + /// There are no comments for Property UseExistingDVDImageFileInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseExistingDVDImageFileInitial + { + get + { + return this._UseExistingDVDImageFileInitial; + } + set + { + this.OnUseExistingDVDImageFileInitialChanging(value); + this._UseExistingDVDImageFileInitial = value; + this.OnUseExistingDVDImageFileInitialChanged(); + this.OnPropertyChanged("UseExistingDVDImageFileInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseExistingDVDImageFileInitial; + partial void OnUseExistingDVDImageFileInitialChanging(global::System.Nullable value); + partial void OnUseExistingDVDImageFileInitialChanged(); + /// + /// There are no comments for Property UseExistingFloppyDriveCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseExistingFloppyDriveCanChange + { + get + { + return this._UseExistingFloppyDriveCanChange; + } + set + { + this.OnUseExistingFloppyDriveCanChangeChanging(value); + this._UseExistingFloppyDriveCanChange = value; + this.OnUseExistingFloppyDriveCanChangeChanged(); + this.OnPropertyChanged("UseExistingFloppyDriveCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseExistingFloppyDriveCanChange; + partial void OnUseExistingFloppyDriveCanChangeChanging(global::System.Nullable value); + partial void OnUseExistingFloppyDriveCanChangeChanged(); + /// + /// There are no comments for Property UseExistingFloppyDriveInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseExistingFloppyDriveInitial + { + get + { + return this._UseExistingFloppyDriveInitial; + } + set + { + this.OnUseExistingFloppyDriveInitialChanging(value); + this._UseExistingFloppyDriveInitial = value; + this.OnUseExistingFloppyDriveInitialChanged(); + this.OnPropertyChanged("UseExistingFloppyDriveInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseExistingFloppyDriveInitial; + partial void OnUseExistingFloppyDriveInitialChanging(global::System.Nullable value); + partial void OnUseExistingFloppyDriveInitialChanged(); + /// + /// There are no comments for Property UseExistingFloppyImageFileCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseExistingFloppyImageFileCanChange + { + get + { + return this._UseExistingFloppyImageFileCanChange; + } + set + { + this.OnUseExistingFloppyImageFileCanChangeChanging(value); + this._UseExistingFloppyImageFileCanChange = value; + this.OnUseExistingFloppyImageFileCanChangeChanged(); + this.OnPropertyChanged("UseExistingFloppyImageFileCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseExistingFloppyImageFileCanChange; + partial void OnUseExistingFloppyImageFileCanChangeChanging(global::System.Nullable value); + partial void OnUseExistingFloppyImageFileCanChangeChanged(); + /// + /// There are no comments for Property UseExistingFloppyImageFileInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseExistingFloppyImageFileInitial + { + get + { + return this._UseExistingFloppyImageFileInitial; + } + set + { + this.OnUseExistingFloppyImageFileInitialChanging(value); + this._UseExistingFloppyImageFileInitial = value; + this.OnUseExistingFloppyImageFileInitialChanged(); + this.OnPropertyChanged("UseExistingFloppyImageFileInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseExistingFloppyImageFileInitial; + partial void OnUseExistingFloppyImageFileInitialChanging(global::System.Nullable value); + partial void OnUseExistingFloppyImageFileInitialChanged(); + /// + /// There are no comments for Property UseExistingOrFirstAvailableDiskDriveChannelCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseExistingOrFirstAvailableDiskDriveChannelCanChange + { + get + { + return this._UseExistingOrFirstAvailableDiskDriveChannelCanChange; + } + set + { + this.OnUseExistingOrFirstAvailableDiskDriveChannelCanChangeChanging(value); + this._UseExistingOrFirstAvailableDiskDriveChannelCanChange = value; + this.OnUseExistingOrFirstAvailableDiskDriveChannelCanChangeChanged(); + this.OnPropertyChanged("UseExistingOrFirstAvailableDiskDriveChannelCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseExistingOrFirstAvailableDiskDriveChannelCanChange; + partial void OnUseExistingOrFirstAvailableDiskDriveChannelCanChangeChanging(global::System.Nullable value); + partial void OnUseExistingOrFirstAvailableDiskDriveChannelCanChangeChanged(); + /// + /// There are no comments for Property UseExistingOrFirstAvailableDiskDriveChannelInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseExistingOrFirstAvailableDiskDriveChannelInitial + { + get + { + return this._UseExistingOrFirstAvailableDiskDriveChannelInitial; + } + set + { + this.OnUseExistingOrFirstAvailableDiskDriveChannelInitialChanging(value); + this._UseExistingOrFirstAvailableDiskDriveChannelInitial = value; + this.OnUseExistingOrFirstAvailableDiskDriveChannelInitialChanged(); + this.OnPropertyChanged("UseExistingOrFirstAvailableDiskDriveChannelInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseExistingOrFirstAvailableDiskDriveChannelInitial; + partial void OnUseExistingOrFirstAvailableDiskDriveChannelInitialChanging(global::System.Nullable value); + partial void OnUseExistingOrFirstAvailableDiskDriveChannelInitialChanged(); + /// + /// There are no comments for Property UseExistingOrFirstAvailableDVDDriveChannelCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseExistingOrFirstAvailableDVDDriveChannelCanChange + { + get + { + return this._UseExistingOrFirstAvailableDVDDriveChannelCanChange; + } + set + { + this.OnUseExistingOrFirstAvailableDVDDriveChannelCanChangeChanging(value); + this._UseExistingOrFirstAvailableDVDDriveChannelCanChange = value; + this.OnUseExistingOrFirstAvailableDVDDriveChannelCanChangeChanged(); + this.OnPropertyChanged("UseExistingOrFirstAvailableDVDDriveChannelCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseExistingOrFirstAvailableDVDDriveChannelCanChange; + partial void OnUseExistingOrFirstAvailableDVDDriveChannelCanChangeChanging(global::System.Nullable value); + partial void OnUseExistingOrFirstAvailableDVDDriveChannelCanChangeChanged(); + /// + /// There are no comments for Property UseExistingOrFirstAvailableDVDDriveChannelInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseExistingOrFirstAvailableDVDDriveChannelInitial + { + get + { + return this._UseExistingOrFirstAvailableDVDDriveChannelInitial; + } + set + { + this.OnUseExistingOrFirstAvailableDVDDriveChannelInitialChanging(value); + this._UseExistingOrFirstAvailableDVDDriveChannelInitial = value; + this.OnUseExistingOrFirstAvailableDVDDriveChannelInitialChanged(); + this.OnPropertyChanged("UseExistingOrFirstAvailableDVDDriveChannelInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseExistingOrFirstAvailableDVDDriveChannelInitial; + partial void OnUseExistingOrFirstAvailableDVDDriveChannelInitialChanging(global::System.Nullable value); + partial void OnUseExistingOrFirstAvailableDVDDriveChannelInitialChanged(); + /// + /// There are no comments for Property UseFirstAvailableChannelForNewDiskCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseFirstAvailableChannelForNewDiskCanChange + { + get + { + return this._UseFirstAvailableChannelForNewDiskCanChange; + } + set + { + this.OnUseFirstAvailableChannelForNewDiskCanChangeChanging(value); + this._UseFirstAvailableChannelForNewDiskCanChange = value; + this.OnUseFirstAvailableChannelForNewDiskCanChangeChanged(); + this.OnPropertyChanged("UseFirstAvailableChannelForNewDiskCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseFirstAvailableChannelForNewDiskCanChange; + partial void OnUseFirstAvailableChannelForNewDiskCanChangeChanging(global::System.Nullable value); + partial void OnUseFirstAvailableChannelForNewDiskCanChangeChanged(); + /// + /// There are no comments for Property UseFirstAvailableChannelForNewDiskInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseFirstAvailableChannelForNewDiskInitial + { + get + { + return this._UseFirstAvailableChannelForNewDiskInitial; + } + set + { + this.OnUseFirstAvailableChannelForNewDiskInitialChanging(value); + this._UseFirstAvailableChannelForNewDiskInitial = value; + this.OnUseFirstAvailableChannelForNewDiskInitialChanged(); + this.OnPropertyChanged("UseFirstAvailableChannelForNewDiskInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseFirstAvailableChannelForNewDiskInitial; + partial void OnUseFirstAvailableChannelForNewDiskInitialChanging(global::System.Nullable value); + partial void OnUseFirstAvailableChannelForNewDiskInitialChanged(); + /// + /// There are no comments for Property UseForOperatingSystemCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseForOperatingSystemCanChange + { + get + { + return this._UseForOperatingSystemCanChange; + } + set + { + this.OnUseForOperatingSystemCanChangeChanging(value); + this._UseForOperatingSystemCanChange = value; + this.OnUseForOperatingSystemCanChangeChanged(); + this.OnPropertyChanged("UseForOperatingSystemCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseForOperatingSystemCanChange; + partial void OnUseForOperatingSystemCanChangeChanging(global::System.Nullable value); + partial void OnUseForOperatingSystemCanChangeChanged(); + /// + /// There are no comments for Property UseForOperatingSystemInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseForOperatingSystemInitial + { + get + { + return this._UseForOperatingSystemInitial; + } + set + { + this.OnUseForOperatingSystemInitialChanging(value); + this._UseForOperatingSystemInitial = value; + this.OnUseForOperatingSystemInitialChanged(); + this.OnPropertyChanged("UseForOperatingSystemInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseForOperatingSystemInitial; + partial void OnUseForOperatingSystemInitialChanging(global::System.Nullable value); + partial void OnUseForOperatingSystemInitialChanged(); + /// + /// There are no comments for Property UseLSILogicParallelSCSICanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseLSILogicParallelSCSICanChange + { + get + { + return this._UseLSILogicParallelSCSICanChange; + } + set + { + this.OnUseLSILogicParallelSCSICanChangeChanging(value); + this._UseLSILogicParallelSCSICanChange = value; + this.OnUseLSILogicParallelSCSICanChangeChanged(); + this.OnPropertyChanged("UseLSILogicParallelSCSICanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseLSILogicParallelSCSICanChange; + partial void OnUseLSILogicParallelSCSICanChangeChanging(global::System.Nullable value); + partial void OnUseLSILogicParallelSCSICanChangeChanged(); + /// + /// There are no comments for Property UseLSILogicParallelSCSIInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseLSILogicParallelSCSIInitial + { + get + { + return this._UseLSILogicParallelSCSIInitial; + } + set + { + this.OnUseLSILogicParallelSCSIInitialChanging(value); + this._UseLSILogicParallelSCSIInitial = value; + this.OnUseLSILogicParallelSCSIInitialChanged(); + this.OnPropertyChanged("UseLSILogicParallelSCSIInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseLSILogicParallelSCSIInitial; + partial void OnUseLSILogicParallelSCSIInitialChanging(global::System.Nullable value); + partial void OnUseLSILogicParallelSCSIInitialChanged(); + /// + /// There are no comments for Property UseLSILogicSASSCSICanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseLSILogicSASSCSICanChange + { + get + { + return this._UseLSILogicSASSCSICanChange; + } + set + { + this.OnUseLSILogicSASSCSICanChangeChanging(value); + this._UseLSILogicSASSCSICanChange = value; + this.OnUseLSILogicSASSCSICanChangeChanged(); + this.OnPropertyChanged("UseLSILogicSASSCSICanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseLSILogicSASSCSICanChange; + partial void OnUseLSILogicSASSCSICanChangeChanging(global::System.Nullable value); + partial void OnUseLSILogicSASSCSICanChangeChanged(); + /// + /// There are no comments for Property UseLSILogicSASSCSIInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseLSILogicSASSCSIInitial + { + get + { + return this._UseLSILogicSASSCSIInitial; + } + set + { + this.OnUseLSILogicSASSCSIInitialChanging(value); + this._UseLSILogicSASSCSIInitial = value; + this.OnUseLSILogicSASSCSIInitialChanged(); + this.OnPropertyChanged("UseLSILogicSASSCSIInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseLSILogicSASSCSIInitial; + partial void OnUseLSILogicSASSCSIInitialChanging(global::System.Nullable value); + partial void OnUseLSILogicSASSCSIInitialChanged(); + /// + /// There are no comments for Property UseMACSpoofingCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseMACSpoofingCanChange + { + get + { + return this._UseMACSpoofingCanChange; + } + set + { + this.OnUseMACSpoofingCanChangeChanging(value); + this._UseMACSpoofingCanChange = value; + this.OnUseMACSpoofingCanChangeChanged(); + this.OnPropertyChanged("UseMACSpoofingCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseMACSpoofingCanChange; + partial void OnUseMACSpoofingCanChangeChanging(global::System.Nullable value); + partial void OnUseMACSpoofingCanChangeChanged(); + /// + /// There are no comments for Property UseMACSpoofingInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseMACSpoofingInitial + { + get + { + return this._UseMACSpoofingInitial; + } + set + { + this.OnUseMACSpoofingInitialChanging(value); + this._UseMACSpoofingInitial = value; + this.OnUseMACSpoofingInitialChanged(); + this.OnPropertyChanged("UseMACSpoofingInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseMACSpoofingInitial; + partial void OnUseMACSpoofingInitialChanging(global::System.Nullable value); + partial void OnUseMACSpoofingInitialChanged(); + /// + /// There are no comments for Property UseNoMediaDVDDriveCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseNoMediaDVDDriveCanChange + { + get + { + return this._UseNoMediaDVDDriveCanChange; + } + set + { + this.OnUseNoMediaDVDDriveCanChangeChanging(value); + this._UseNoMediaDVDDriveCanChange = value; + this.OnUseNoMediaDVDDriveCanChangeChanged(); + this.OnPropertyChanged("UseNoMediaDVDDriveCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseNoMediaDVDDriveCanChange; + partial void OnUseNoMediaDVDDriveCanChangeChanging(global::System.Nullable value); + partial void OnUseNoMediaDVDDriveCanChangeChanged(); + /// + /// There are no comments for Property UseNoMediaDVDDriveInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseNoMediaDVDDriveInitial + { + get + { + return this._UseNoMediaDVDDriveInitial; + } + set + { + this.OnUseNoMediaDVDDriveInitialChanging(value); + this._UseNoMediaDVDDriveInitial = value; + this.OnUseNoMediaDVDDriveInitialChanged(); + this.OnPropertyChanged("UseNoMediaDVDDriveInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseNoMediaDVDDriveInitial; + partial void OnUseNoMediaDVDDriveInitialChanging(global::System.Nullable value); + partial void OnUseNoMediaDVDDriveInitialChanged(); + /// + /// There are no comments for Property UseNoMediaFloppyDriveCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseNoMediaFloppyDriveCanChange + { + get + { + return this._UseNoMediaFloppyDriveCanChange; + } + set + { + this.OnUseNoMediaFloppyDriveCanChangeChanging(value); + this._UseNoMediaFloppyDriveCanChange = value; + this.OnUseNoMediaFloppyDriveCanChangeChanged(); + this.OnPropertyChanged("UseNoMediaFloppyDriveCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseNoMediaFloppyDriveCanChange; + partial void OnUseNoMediaFloppyDriveCanChangeChanging(global::System.Nullable value); + partial void OnUseNoMediaFloppyDriveCanChangeChanged(); + /// + /// There are no comments for Property UseNoMediaFloppyDriveInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseNoMediaFloppyDriveInitial + { + get + { + return this._UseNoMediaFloppyDriveInitial; + } + set + { + this.OnUseNoMediaFloppyDriveInitialChanging(value); + this._UseNoMediaFloppyDriveInitial = value; + this.OnUseNoMediaFloppyDriveInitialChanged(); + this.OnPropertyChanged("UseNoMediaFloppyDriveInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseNoMediaFloppyDriveInitial; + partial void OnUseNoMediaFloppyDriveInitialChanging(global::System.Nullable value); + partial void OnUseNoMediaFloppyDriveInitialChanged(); + /// + /// There are no comments for Property UsePassthroughDiskCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UsePassthroughDiskCanChange + { + get + { + return this._UsePassthroughDiskCanChange; + } + set + { + this.OnUsePassthroughDiskCanChangeChanging(value); + this._UsePassthroughDiskCanChange = value; + this.OnUsePassthroughDiskCanChangeChanged(); + this.OnPropertyChanged("UsePassthroughDiskCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UsePassthroughDiskCanChange; + partial void OnUsePassthroughDiskCanChangeChanging(global::System.Nullable value); + partial void OnUsePassthroughDiskCanChangeChanged(); + /// + /// There are no comments for Property UsePassthroughDiskInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UsePassthroughDiskInitial + { + get + { + return this._UsePassthroughDiskInitial; + } + set + { + this.OnUsePassthroughDiskInitialChanging(value); + this._UsePassthroughDiskInitial = value; + this.OnUsePassthroughDiskInitialChanged(); + this.OnPropertyChanged("UsePassthroughDiskInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UsePassthroughDiskInitial; + partial void OnUsePassthroughDiskInitialChanging(global::System.Nullable value); + partial void OnUsePassthroughDiskInitialChanged(); + /// + /// There are no comments for Property UsePhysicalDVDDriveCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UsePhysicalDVDDriveCanChange + { + get + { + return this._UsePhysicalDVDDriveCanChange; + } + set + { + this.OnUsePhysicalDVDDriveCanChangeChanging(value); + this._UsePhysicalDVDDriveCanChange = value; + this.OnUsePhysicalDVDDriveCanChangeChanged(); + this.OnPropertyChanged("UsePhysicalDVDDriveCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UsePhysicalDVDDriveCanChange; + partial void OnUsePhysicalDVDDriveCanChangeChanging(global::System.Nullable value); + partial void OnUsePhysicalDVDDriveCanChangeChanged(); + /// + /// There are no comments for Property UsePhysicalDVDDriveInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UsePhysicalDVDDriveInitial + { + get + { + return this._UsePhysicalDVDDriveInitial; + } + set + { + this.OnUsePhysicalDVDDriveInitialChanging(value); + this._UsePhysicalDVDDriveInitial = value; + this.OnUsePhysicalDVDDriveInitialChanged(); + this.OnPropertyChanged("UsePhysicalDVDDriveInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UsePhysicalDVDDriveInitial; + partial void OnUsePhysicalDVDDriveInitialChanging(global::System.Nullable value); + partial void OnUsePhysicalDVDDriveInitialChanged(); + /// + /// There are no comments for Property UseStaticIPv4CanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseStaticIPv4CanChange + { + get + { + return this._UseStaticIPv4CanChange; + } + set + { + this.OnUseStaticIPv4CanChangeChanging(value); + this._UseStaticIPv4CanChange = value; + this.OnUseStaticIPv4CanChangeChanged(); + this.OnPropertyChanged("UseStaticIPv4CanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseStaticIPv4CanChange; + partial void OnUseStaticIPv4CanChangeChanging(global::System.Nullable value); + partial void OnUseStaticIPv4CanChangeChanged(); + /// + /// There are no comments for Property UseStaticIPv4Initial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseStaticIPv4Initial + { + get + { + return this._UseStaticIPv4Initial; + } + set + { + this.OnUseStaticIPv4InitialChanging(value); + this._UseStaticIPv4Initial = value; + this.OnUseStaticIPv4InitialChanged(); + this.OnPropertyChanged("UseStaticIPv4Initial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseStaticIPv4Initial; + partial void OnUseStaticIPv4InitialChanging(global::System.Nullable value); + partial void OnUseStaticIPv4InitialChanged(); + /// + /// There are no comments for Property UseStaticIPv6CanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseStaticIPv6CanChange + { + get + { + return this._UseStaticIPv6CanChange; + } + set + { + this.OnUseStaticIPv6CanChangeChanging(value); + this._UseStaticIPv6CanChange = value; + this.OnUseStaticIPv6CanChangeChanged(); + this.OnPropertyChanged("UseStaticIPv6CanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseStaticIPv6CanChange; + partial void OnUseStaticIPv6CanChangeChanging(global::System.Nullable value); + partial void OnUseStaticIPv6CanChangeChanged(); + /// + /// There are no comments for Property UseStaticIPv6Initial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseStaticIPv6Initial + { + get + { + return this._UseStaticIPv6Initial; + } + set + { + this.OnUseStaticIPv6InitialChanging(value); + this._UseStaticIPv6Initial = value; + this.OnUseStaticIPv6InitialChanged(); + this.OnPropertyChanged("UseStaticIPv6Initial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseStaticIPv6Initial; + partial void OnUseStaticIPv6InitialChanging(global::System.Nullable value); + partial void OnUseStaticIPv6InitialChanged(); + /// + /// There are no comments for Property UseStaticMACAddressCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseStaticMACAddressCanChange + { + get + { + return this._UseStaticMACAddressCanChange; + } + set + { + this.OnUseStaticMACAddressCanChangeChanging(value); + this._UseStaticMACAddressCanChange = value; + this.OnUseStaticMACAddressCanChangeChanged(); + this.OnPropertyChanged("UseStaticMACAddressCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseStaticMACAddressCanChange; + partial void OnUseStaticMACAddressCanChangeChanging(global::System.Nullable value); + partial void OnUseStaticMACAddressCanChangeChanged(); + /// + /// There are no comments for Property UseStaticMACAddressInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseStaticMACAddressInitial + { + get + { + return this._UseStaticMACAddressInitial; + } + set + { + this.OnUseStaticMACAddressInitialChanging(value); + this._UseStaticMACAddressInitial = value; + this.OnUseStaticMACAddressInitialChanged(); + this.OnPropertyChanged("UseStaticMACAddressInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseStaticMACAddressInitial; + partial void OnUseStaticMACAddressInitialChanging(global::System.Nullable value); + partial void OnUseStaticMACAddressInitialChanged(); + /// + /// There are no comments for Property UseSyntheticNetworkAdapterCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseSyntheticNetworkAdapterCanChange + { + get + { + return this._UseSyntheticNetworkAdapterCanChange; + } + set + { + this.OnUseSyntheticNetworkAdapterCanChangeChanging(value); + this._UseSyntheticNetworkAdapterCanChange = value; + this.OnUseSyntheticNetworkAdapterCanChangeChanged(); + this.OnPropertyChanged("UseSyntheticNetworkAdapterCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseSyntheticNetworkAdapterCanChange; + partial void OnUseSyntheticNetworkAdapterCanChangeChanging(global::System.Nullable value); + partial void OnUseSyntheticNetworkAdapterCanChangeChanged(); + /// + /// There are no comments for Property UseSyntheticNetworkAdapterInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseSyntheticNetworkAdapterInitial + { + get + { + return this._UseSyntheticNetworkAdapterInitial; + } + set + { + this.OnUseSyntheticNetworkAdapterInitialChanging(value); + this._UseSyntheticNetworkAdapterInitial = value; + this.OnUseSyntheticNetworkAdapterInitialChanged(); + this.OnPropertyChanged("UseSyntheticNetworkAdapterInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseSyntheticNetworkAdapterInitial; + partial void OnUseSyntheticNetworkAdapterInitialChanging(global::System.Nullable value); + partial void OnUseSyntheticNetworkAdapterInitialChanged(); + /// + /// There are no comments for Property UseVMWareParavirtualSCSICanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseVMWareParavirtualSCSICanChange + { + get + { + return this._UseVMWareParavirtualSCSICanChange; + } + set + { + this.OnUseVMWareParavirtualSCSICanChangeChanging(value); + this._UseVMWareParavirtualSCSICanChange = value; + this.OnUseVMWareParavirtualSCSICanChangeChanged(); + this.OnPropertyChanged("UseVMWareParavirtualSCSICanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseVMWareParavirtualSCSICanChange; + partial void OnUseVMWareParavirtualSCSICanChangeChanging(global::System.Nullable value); + partial void OnUseVMWareParavirtualSCSICanChangeChanged(); + /// + /// There are no comments for Property UseVMWareParavirtualSCSIInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseVMWareParavirtualSCSIInitial + { + get + { + return this._UseVMWareParavirtualSCSIInitial; + } + set + { + this.OnUseVMWareParavirtualSCSIInitialChanging(value); + this._UseVMWareParavirtualSCSIInitial = value; + this.OnUseVMWareParavirtualSCSIInitialChanged(); + this.OnPropertyChanged("UseVMWareParavirtualSCSIInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseVMWareParavirtualSCSIInitial; + partial void OnUseVMWareParavirtualSCSIInitialChanging(global::System.Nullable value); + partial void OnUseVMWareParavirtualSCSIInitialChanged(); + /// + /// There are no comments for Property VirtualDVDDriveCountInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VirtualDVDDriveCountInitial + { + get + { + return this._VirtualDVDDriveCountInitial; + } + set + { + this.OnVirtualDVDDriveCountInitialChanging(value); + this._VirtualDVDDriveCountInitial = value; + this.OnVirtualDVDDriveCountInitialChanged(); + this.OnPropertyChanged("VirtualDVDDriveCountInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VirtualDVDDriveCountInitial; + partial void OnVirtualDVDDriveCountInitialChanging(global::System.Nullable value); + partial void OnVirtualDVDDriveCountInitialChanged(); + /// + /// There are no comments for Property VirtualDVDDriveCountMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VirtualDVDDriveCountMaximum + { + get + { + return this._VirtualDVDDriveCountMaximum; + } + set + { + this.OnVirtualDVDDriveCountMaximumChanging(value); + this._VirtualDVDDriveCountMaximum = value; + this.OnVirtualDVDDriveCountMaximumChanged(); + this.OnPropertyChanged("VirtualDVDDriveCountMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VirtualDVDDriveCountMaximum; + partial void OnVirtualDVDDriveCountMaximumChanging(global::System.Nullable value); + partial void OnVirtualDVDDriveCountMaximumChanged(); + /// + /// There are no comments for Property VirtualDVDDriveCountMinimum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VirtualDVDDriveCountMinimum + { + get + { + return this._VirtualDVDDriveCountMinimum; + } + set + { + this.OnVirtualDVDDriveCountMinimumChanging(value); + this._VirtualDVDDriveCountMinimum = value; + this.OnVirtualDVDDriveCountMinimumChanged(); + this.OnPropertyChanged("VirtualDVDDriveCountMinimum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VirtualDVDDriveCountMinimum; + partial void OnVirtualDVDDriveCountMinimumChanging(global::System.Nullable value); + partial void OnVirtualDVDDriveCountMinimumChanged(); + /// + /// There are no comments for Property VirtualHardDiskCountInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VirtualHardDiskCountInitial + { + get + { + return this._VirtualHardDiskCountInitial; + } + set + { + this.OnVirtualHardDiskCountInitialChanging(value); + this._VirtualHardDiskCountInitial = value; + this.OnVirtualHardDiskCountInitialChanged(); + this.OnPropertyChanged("VirtualHardDiskCountInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VirtualHardDiskCountInitial; + partial void OnVirtualHardDiskCountInitialChanging(global::System.Nullable value); + partial void OnVirtualHardDiskCountInitialChanged(); + /// + /// There are no comments for Property VirtualHardDiskCountMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VirtualHardDiskCountMaximum + { + get + { + return this._VirtualHardDiskCountMaximum; + } + set + { + this.OnVirtualHardDiskCountMaximumChanging(value); + this._VirtualHardDiskCountMaximum = value; + this.OnVirtualHardDiskCountMaximumChanged(); + this.OnPropertyChanged("VirtualHardDiskCountMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VirtualHardDiskCountMaximum; + partial void OnVirtualHardDiskCountMaximumChanging(global::System.Nullable value); + partial void OnVirtualHardDiskCountMaximumChanged(); + /// + /// There are no comments for Property VirtualHardDiskCountMinimum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VirtualHardDiskCountMinimum + { + get + { + return this._VirtualHardDiskCountMinimum; + } + set + { + this.OnVirtualHardDiskCountMinimumChanging(value); + this._VirtualHardDiskCountMinimum = value; + this.OnVirtualHardDiskCountMinimumChanged(); + this.OnPropertyChanged("VirtualHardDiskCountMinimum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VirtualHardDiskCountMinimum; + partial void OnVirtualHardDiskCountMinimumChanging(global::System.Nullable value); + partial void OnVirtualHardDiskCountMinimumChanged(); + /// + /// There are no comments for Property VirtualHardDiskSizeMBInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VirtualHardDiskSizeMBInitial + { + get + { + return this._VirtualHardDiskSizeMBInitial; + } + set + { + this.OnVirtualHardDiskSizeMBInitialChanging(value); + this._VirtualHardDiskSizeMBInitial = value; + this.OnVirtualHardDiskSizeMBInitialChanged(); + this.OnPropertyChanged("VirtualHardDiskSizeMBInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VirtualHardDiskSizeMBInitial; + partial void OnVirtualHardDiskSizeMBInitialChanging(global::System.Nullable value); + partial void OnVirtualHardDiskSizeMBInitialChanged(); + /// + /// There are no comments for Property VirtualHardDiskSizeMBMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VirtualHardDiskSizeMBMaximum + { + get + { + return this._VirtualHardDiskSizeMBMaximum; + } + set + { + this.OnVirtualHardDiskSizeMBMaximumChanging(value); + this._VirtualHardDiskSizeMBMaximum = value; + this.OnVirtualHardDiskSizeMBMaximumChanged(); + this.OnPropertyChanged("VirtualHardDiskSizeMBMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VirtualHardDiskSizeMBMaximum; + partial void OnVirtualHardDiskSizeMBMaximumChanging(global::System.Nullable value); + partial void OnVirtualHardDiskSizeMBMaximumChanged(); + /// + /// There are no comments for Property VirtualHardDiskSizeMBMinimum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VirtualHardDiskSizeMBMinimum + { + get + { + return this._VirtualHardDiskSizeMBMinimum; + } + set + { + this.OnVirtualHardDiskSizeMBMinimumChanging(value); + this._VirtualHardDiskSizeMBMinimum = value; + this.OnVirtualHardDiskSizeMBMinimumChanged(); + this.OnPropertyChanged("VirtualHardDiskSizeMBMinimum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VirtualHardDiskSizeMBMinimum; + partial void OnVirtualHardDiskSizeMBMinimumChanging(global::System.Nullable value); + partial void OnVirtualHardDiskSizeMBMinimumChanged(); + /// + /// There are no comments for Property VirtualNetworkAdapterCountInitial in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VirtualNetworkAdapterCountInitial + { + get + { + return this._VirtualNetworkAdapterCountInitial; + } + set + { + this.OnVirtualNetworkAdapterCountInitialChanging(value); + this._VirtualNetworkAdapterCountInitial = value; + this.OnVirtualNetworkAdapterCountInitialChanged(); + this.OnPropertyChanged("VirtualNetworkAdapterCountInitial"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VirtualNetworkAdapterCountInitial; + partial void OnVirtualNetworkAdapterCountInitialChanging(global::System.Nullable value); + partial void OnVirtualNetworkAdapterCountInitialChanged(); + /// + /// There are no comments for Property VirtualNetworkAdapterCountMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VirtualNetworkAdapterCountMaximum + { + get + { + return this._VirtualNetworkAdapterCountMaximum; + } + set + { + this.OnVirtualNetworkAdapterCountMaximumChanging(value); + this._VirtualNetworkAdapterCountMaximum = value; + this.OnVirtualNetworkAdapterCountMaximumChanged(); + this.OnPropertyChanged("VirtualNetworkAdapterCountMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VirtualNetworkAdapterCountMaximum; + partial void OnVirtualNetworkAdapterCountMaximumChanging(global::System.Nullable value); + partial void OnVirtualNetworkAdapterCountMaximumChanged(); + /// + /// There are no comments for Property VirtualNetworkAdapterCountMinimum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VirtualNetworkAdapterCountMinimum + { + get + { + return this._VirtualNetworkAdapterCountMinimum; + } + set + { + this.OnVirtualNetworkAdapterCountMinimumChanging(value); + this._VirtualNetworkAdapterCountMinimum = value; + this.OnVirtualNetworkAdapterCountMinimumChanged(); + this.OnPropertyChanged("VirtualNetworkAdapterCountMinimum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VirtualNetworkAdapterCountMinimum; + partial void OnVirtualNetworkAdapterCountMinimumChanging(global::System.Nullable value); + partial void OnVirtualNetworkAdapterCountMinimumChanged(); + /// + /// There are no comments for Property VMHighlyAvailableValue in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VMHighlyAvailableValue + { + get + { + return this._VMHighlyAvailableValue; + } + set + { + this.OnVMHighlyAvailableValueChanging(value); + this._VMHighlyAvailableValue = value; + this.OnVMHighlyAvailableValueChanged(); + this.OnPropertyChanged("VMHighlyAvailableValue"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VMHighlyAvailableValue; + partial void OnVMHighlyAvailableValueChanging(global::System.Nullable value); + partial void OnVMHighlyAvailableValueChanged(); + /// + /// There are no comments for Property VMHighlyAvailableValueCanChange in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VMHighlyAvailableValueCanChange + { + get + { + return this._VMHighlyAvailableValueCanChange; + } + set + { + this.OnVMHighlyAvailableValueCanChangeChanging(value); + this._VMHighlyAvailableValueCanChange = value; + this.OnVMHighlyAvailableValueCanChangeChanged(); + this.OnPropertyChanged("VMHighlyAvailableValueCanChange"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VMHighlyAvailableValueCanChange; + partial void OnVMHighlyAvailableValueCanChangeChanging(global::System.Nullable value); + partial void OnVMHighlyAvailableValueCanChangeChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.Cloud in the schema. + /// + /// + /// ID + /// StampId + /// + [global::System.Data.Services.Common.EntitySetAttribute("Clouds")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ID", "StampId")] + public partial class Cloud : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new Cloud object. + /// + /// Initial value of ID. + /// Initial value of StampId. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static Cloud CreateCloud(global::System.Guid ID, global::System.Guid stampId) + { + Cloud cloud = new Cloud(); + cloud.ID = ID; + cloud.StampId = stampId; + return cloud; + } + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this._ID = value; + this.OnIDChanged(); + this.OnPropertyChanged("ID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ID; + partial void OnIDChanging(global::System.Guid value); + partial void OnIDChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property LastModifiedDate in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable LastModifiedDate + { + get + { + return this._LastModifiedDate; + } + set + { + this.OnLastModifiedDateChanging(value); + this._LastModifiedDate = value; + this.OnLastModifiedDateChanged(); + this.OnPropertyChanged("LastModifiedDate"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _LastModifiedDate; + partial void OnLastModifiedDateChanging(global::System.Nullable value); + partial void OnLastModifiedDateChanged(); + /// + /// There are no comments for Property WritableLibraryPath in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string WritableLibraryPath + { + get + { + return this._WritableLibraryPath; + } + set + { + this.OnWritableLibraryPathChanging(value); + this._WritableLibraryPath = value; + this.OnWritableLibraryPathChanged(); + this.OnPropertyChanged("WritableLibraryPath"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _WritableLibraryPath; + partial void OnWritableLibraryPathChanging(string value); + partial void OnWritableLibraryPathChanged(); + /// + /// There are no comments for Property UserRoleID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UserRoleID + { + get + { + return this._UserRoleID; + } + set + { + this.OnUserRoleIDChanging(value); + this._UserRoleID = value; + this.OnUserRoleIDChanged(); + this.OnPropertyChanged("UserRoleID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UserRoleID; + partial void OnUserRoleIDChanging(global::System.Nullable value); + partial void OnUserRoleIDChanged(); + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Capacity in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection Capacity + { + get + { + return this._Capacity; + } + set + { + this._Capacity = value; + this.OnPropertyChanged("Capacity"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _Capacity = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + /// + /// There are no comments for LogicalNetworks in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection LogicalNetworks + { + get + { + return this._LogicalNetworks; + } + set + { + this._LogicalNetworks = value; + this.OnPropertyChanged("LogicalNetworks"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _LogicalNetworks = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + /// + /// There are no comments for CapabilityProfiles in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection CapabilityProfiles + { + get + { + return this._CapabilityProfiles; + } + set + { + this._CapabilityProfiles = value; + this.OnPropertyChanged("CapabilityProfiles"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _CapabilityProfiles = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + /// + /// There are no comments for LibraryShares in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection LibraryShares + { + get + { + return this._LibraryShares; + } + set + { + this._LibraryShares = value; + this.OnPropertyChanged("LibraryShares"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _LibraryShares = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + /// + /// There are no comments for QuotaAndUsageComponents in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection QuotaAndUsageComponents + { + get + { + return this._QuotaAndUsageComponents; + } + set + { + this._QuotaAndUsageComponents = value; + this.OnPropertyChanged("QuotaAndUsageComponents"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _QuotaAndUsageComponents = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.VMCheckPoint in the schema. + /// + /// + /// ID + /// StampId + /// + [global::System.Data.Services.Common.EntitySetAttribute("VMCheckPoints")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ID", "StampId")] + public partial class VMCheckPoint : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new VMCheckPoint object. + /// + /// Initial value of ID. + /// Initial value of StampId. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static VMCheckPoint CreateVMCheckPoint(global::System.Guid ID, global::System.Guid stampId) + { + VMCheckPoint vMCheckPoint = new VMCheckPoint(); + vMCheckPoint.ID = ID; + vMCheckPoint.StampId = stampId; + return vMCheckPoint; + } + /// + /// There are no comments for Property Accessibility in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Accessibility + { + get + { + return this._Accessibility; + } + set + { + this.OnAccessibilityChanging(value); + this._Accessibility = value; + this.OnAccessibilityChanged(); + this.OnPropertyChanged("Accessibility"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Accessibility; + partial void OnAccessibilityChanging(string value); + partial void OnAccessibilityChanged(); + /// + /// There are no comments for Property CheckpointID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CheckpointID + { + get + { + return this._CheckpointID; + } + set + { + this.OnCheckpointIDChanging(value); + this._CheckpointID = value; + this.OnCheckpointIDChanged(); + this.OnPropertyChanged("CheckpointID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CheckpointID; + partial void OnCheckpointIDChanging(global::System.Nullable value); + partial void OnCheckpointIDChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property Enabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Enabled + { + get + { + return this._Enabled; + } + set + { + this.OnEnabledChanging(value); + this._Enabled = value; + this.OnEnabledChanged(); + this.OnPropertyChanged("Enabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Enabled; + partial void OnEnabledChanging(global::System.Nullable value); + partial void OnEnabledChanged(); + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this._ID = value; + this.OnIDChanged(); + this.OnPropertyChanged("ID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ID; + partial void OnIDChanging(global::System.Guid value); + partial void OnIDChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property ParentCheckpointID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ParentCheckpointID + { + get + { + return this._ParentCheckpointID; + } + set + { + this.OnParentCheckpointIDChanging(value); + this._ParentCheckpointID = value; + this.OnParentCheckpointIDChanged(); + this.OnPropertyChanged("ParentCheckpointID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ParentCheckpointID; + partial void OnParentCheckpointIDChanging(global::System.Nullable value); + partial void OnParentCheckpointIDChanged(); + /// + /// There are no comments for Property VMId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VMId + { + get + { + return this._VMId; + } + set + { + this.OnVMIdChanging(value); + this._VMId = value; + this.OnVMIdChanged(); + this.OnPropertyChanged("VMId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VMId; + partial void OnVMIdChanging(global::System.Nullable value); + partial void OnVMIdChanged(); + /// + /// There are no comments for Property AddedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable AddedTime + { + get + { + return this._AddedTime; + } + set + { + this.OnAddedTimeChanging(value); + this._AddedTime = value; + this.OnAddedTimeChanged(); + this.OnPropertyChanged("AddedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _AddedTime; + partial void OnAddedTimeChanging(global::System.Nullable value); + partial void OnAddedTimeChanged(); + /// + /// There are no comments for Property ModifiedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ModifiedTime + { + get + { + return this._ModifiedTime; + } + set + { + this.OnModifiedTimeChanging(value); + this._ModifiedTime = value; + this.OnModifiedTimeChanged(); + this.OnPropertyChanged("ModifiedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ModifiedTime; + partial void OnModifiedTimeChanging(global::System.Nullable value); + partial void OnModifiedTimeChanged(); + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property VMCheckPointAction in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string VMCheckPointAction + { + get + { + return this._VMCheckPointAction; + } + set + { + this.OnVMCheckPointActionChanging(value); + this._VMCheckPointAction = value; + this.OnVMCheckPointActionChanged(); + this.OnPropertyChanged("VMCheckPointAction"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _VMCheckPointAction; + partial void OnVMCheckPointActionChanging(string value); + partial void OnVMCheckPointActionChanged(); + /// + /// There are no comments for Property Confirm in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Confirm + { + get + { + return this._Confirm; + } + set + { + this.OnConfirmChanging(value); + this._Confirm = value; + this.OnConfirmChanged(); + this.OnPropertyChanged("Confirm"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Confirm; + partial void OnConfirmChanging(global::System.Nullable value); + partial void OnConfirmChanged(); + /// + /// There are no comments for Property RunAsynchronously in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable RunAsynchronously + { + get + { + return this._RunAsynchronously; + } + set + { + this.OnRunAsynchronouslyChanging(value); + this._RunAsynchronously = value; + this.OnRunAsynchronouslyChanged(); + this.OnPropertyChanged("RunAsynchronously"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _RunAsynchronously; + partial void OnRunAsynchronouslyChanging(global::System.Nullable value); + partial void OnRunAsynchronouslyChanged(); + /// + /// There are no comments for ParentCheckPoint in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public VMCheckPoint ParentCheckPoint + { + get + { + return this._ParentCheckPoint; + } + set + { + this._ParentCheckPoint = value; + this.OnPropertyChanged("ParentCheckPoint"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private VMCheckPoint _ParentCheckPoint; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType VMM.ServiceSetting in the schema. + /// + public partial class ServiceSetting : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property Value in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Value + { + get + { + return this._Value; + } + set + { + this.OnValueChanging(value); + this._Value = value; + this.OnValueChanged(); + this.OnPropertyChanged("Value"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Value; + partial void OnValueChanging(string value); + partial void OnValueChanged(); + /// + /// There are no comments for Property Mandatory in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Mandatory + { + get + { + return this._Mandatory; + } + set + { + this.OnMandatoryChanging(value); + this._Mandatory = value; + this.OnMandatoryChanged(); + this.OnPropertyChanged("Mandatory"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Mandatory; + partial void OnMandatoryChanging(global::System.Nullable value); + partial void OnMandatoryChanged(); + /// + /// There are no comments for Property HasEncryptedValue in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable HasEncryptedValue + { + get + { + return this._HasEncryptedValue; + } + set + { + this.OnHasEncryptedValueChanging(value); + this._HasEncryptedValue = value; + this.OnHasEncryptedValueChanged(); + this.OnPropertyChanged("HasEncryptedValue"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _HasEncryptedValue; + partial void OnHasEncryptedValueChanging(global::System.Nullable value); + partial void OnHasEncryptedValueChanged(); + /// + /// There are no comments for Property IsSecure in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsSecure + { + get + { + return this._IsSecure; + } + set + { + this.OnIsSecureChanging(value); + this._IsSecure = value; + this.OnIsSecureChanged(); + this.OnPropertyChanged("IsSecure"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsSecure; + partial void OnIsSecureChanging(global::System.Nullable value); + partial void OnIsSecureChanged(); + /// + /// There are no comments for Property GlobalSettingType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string GlobalSettingType + { + get + { + return this._GlobalSettingType; + } + set + { + this.OnGlobalSettingTypeChanging(value); + this._GlobalSettingType = value; + this.OnGlobalSettingTypeChanged(); + this.OnPropertyChanged("GlobalSettingType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _GlobalSettingType; + partial void OnGlobalSettingTypeChanging(string value); + partial void OnGlobalSettingTypeChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType VMM.CustomProperty in the schema. + /// + public partial class CustomProperty : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property Value in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Value + { + get + { + return this._Value; + } + set + { + this.OnValueChanging(value); + this._Value = value; + this.OnValueChanged(); + this.OnPropertyChanged("Value"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Value; + partial void OnValueChanging(string value); + partial void OnValueChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.ServiceTemplate in the schema. + /// + /// + /// ID + /// StampId + /// + [global::System.Data.Services.Common.EntitySetAttribute("ServiceTemplates")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ID", "StampId")] + public partial class ServiceTemplate : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new ServiceTemplate object. + /// + /// Initial value of ID. + /// Initial value of StampId. + /// Initial value of GrantedToList. + /// Initial value of ServiceSettings. + /// Initial value of CustomProperty. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static ServiceTemplate CreateServiceTemplate(global::System.Guid ID, global::System.Guid stampId, global::System.Collections.ObjectModel.ObservableCollection grantedToList, global::System.Collections.ObjectModel.ObservableCollection serviceSettings, global::System.Collections.ObjectModel.ObservableCollection customProperty) + { + ServiceTemplate serviceTemplate = new ServiceTemplate(); + serviceTemplate.ID = ID; + serviceTemplate.StampId = stampId; + if ((grantedToList == null)) + { + throw new global::System.ArgumentNullException("grantedToList"); + } + serviceTemplate.GrantedToList = grantedToList; + if ((serviceSettings == null)) + { + throw new global::System.ArgumentNullException("serviceSettings"); + } + serviceTemplate.ServiceSettings = serviceSettings; + if ((customProperty == null)) + { + throw new global::System.ArgumentNullException("customProperty"); + } + serviceTemplate.CustomProperty = customProperty; + return serviceTemplate; + } + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this._ID = value; + this.OnIDChanged(); + this.OnPropertyChanged("ID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ID; + partial void OnIDChanging(global::System.Guid value); + partial void OnIDChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property Namespace in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Namespace + { + get + { + return this._Namespace; + } + set + { + this.OnNamespaceChanging(value); + this._Namespace = value; + this.OnNamespaceChanged(); + this.OnPropertyChanged("Namespace"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Namespace; + partial void OnNamespaceChanging(string value); + partial void OnNamespaceChanged(); + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property Release in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Release + { + get + { + return this._Release; + } + set + { + this.OnReleaseChanging(value); + this._Release = value; + this.OnReleaseChanged(); + this.OnPropertyChanged("Release"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Release; + partial void OnReleaseChanging(string value); + partial void OnReleaseChanged(); + /// + /// There are no comments for Property ServicePriority in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ServicePriority + { + get + { + return this._ServicePriority; + } + set + { + this.OnServicePriorityChanging(value); + this._ServicePriority = value; + this.OnServicePriorityChanged(); + this.OnPropertyChanged("ServicePriority"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ServicePriority; + partial void OnServicePriorityChanging(string value); + partial void OnServicePriorityChanged(); + /// + /// There are no comments for Property ServiceTemplateState in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ServiceTemplateState + { + get + { + return this._ServiceTemplateState; + } + set + { + this.OnServiceTemplateStateChanging(value); + this._ServiceTemplateState = value; + this.OnServiceTemplateStateChanged(); + this.OnPropertyChanged("ServiceTemplateState"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ServiceTemplateState; + partial void OnServiceTemplateStateChanging(string value); + partial void OnServiceTemplateStateChanged(); + /// + /// There are no comments for Property IsPublished in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsPublished + { + get + { + return this._IsPublished; + } + set + { + this.OnIsPublishedChanging(value); + this._IsPublished = value; + this.OnIsPublishedChanged(); + this.OnPropertyChanged("IsPublished"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsPublished; + partial void OnIsPublishedChanging(global::System.Nullable value); + partial void OnIsPublishedChanged(); + /// + /// There are no comments for Property PublishedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable PublishedTime + { + get + { + return this._PublishedTime; + } + set + { + this.OnPublishedTimeChanging(value); + this._PublishedTime = value; + this.OnPublishedTimeChanged(); + this.OnPropertyChanged("PublishedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _PublishedTime; + partial void OnPublishedTimeChanging(global::System.Nullable value); + partial void OnPublishedTimeChanged(); + /// + /// There are no comments for Property Owner in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public UserAndRole Owner + { + get + { + if (((this._Owner == null) + && (this._OwnerInitialized != true))) + { + this._Owner = new UserAndRole(); + this._OwnerInitialized = true; + } + return this._Owner; + } + set + { + this.OnOwnerChanging(value); + this._Owner = value; + this._OwnerInitialized = true; + this.OnOwnerChanged(); + this.OnPropertyChanged("Owner"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private UserAndRole _Owner; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _OwnerInitialized; + partial void OnOwnerChanging(UserAndRole value); + partial void OnOwnerChanged(); + /// + /// There are no comments for Property GrantedToList in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection GrantedToList + { + get + { + return this._GrantedToList; + } + set + { + this.OnGrantedToListChanging(value); + this._GrantedToList = value; + this.OnGrantedToListChanged(); + this.OnPropertyChanged("GrantedToList"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _GrantedToList = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnGrantedToListChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnGrantedToListChanged(); + /// + /// There are no comments for Property AddedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable AddedTime + { + get + { + return this._AddedTime; + } + set + { + this.OnAddedTimeChanging(value); + this._AddedTime = value; + this.OnAddedTimeChanged(); + this.OnPropertyChanged("AddedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _AddedTime; + partial void OnAddedTimeChanging(global::System.Nullable value); + partial void OnAddedTimeChanged(); + /// + /// There are no comments for Property ModifiedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ModifiedTime + { + get + { + return this._ModifiedTime; + } + set + { + this.OnModifiedTimeChanging(value); + this._ModifiedTime = value; + this.OnModifiedTimeChanged(); + this.OnPropertyChanged("ModifiedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ModifiedTime; + partial void OnModifiedTimeChanging(global::System.Nullable value); + partial void OnModifiedTimeChanged(); + /// + /// There are no comments for Property Enabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Enabled + { + get + { + return this._Enabled; + } + set + { + this.OnEnabledChanging(value); + this._Enabled = value; + this.OnEnabledChanged(); + this.OnPropertyChanged("Enabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Enabled; + partial void OnEnabledChanging(global::System.Nullable value); + partial void OnEnabledChanged(); + /// + /// There are no comments for Property NotificationsAvailable in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable NotificationsAvailable + { + get + { + return this._NotificationsAvailable; + } + set + { + this.OnNotificationsAvailableChanging(value); + this._NotificationsAvailable = value; + this.OnNotificationsAvailableChanged(); + this.OnPropertyChanged("NotificationsAvailable"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _NotificationsAvailable; + partial void OnNotificationsAvailableChanging(global::System.Nullable value); + partial void OnNotificationsAvailableChanged(); + /// + /// There are no comments for Property UseAsDefaultRelease in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseAsDefaultRelease + { + get + { + return this._UseAsDefaultRelease; + } + set + { + this.OnUseAsDefaultReleaseChanging(value); + this._UseAsDefaultRelease = value; + this.OnUseAsDefaultReleaseChanged(); + this.OnPropertyChanged("UseAsDefaultRelease"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseAsDefaultRelease; + partial void OnUseAsDefaultReleaseChanging(global::System.Nullable value); + partial void OnUseAsDefaultReleaseChanged(); + /// + /// There are no comments for Property UseAsPattern in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseAsPattern + { + get + { + return this._UseAsPattern; + } + set + { + this.OnUseAsPatternChanging(value); + this._UseAsPattern = value; + this.OnUseAsPatternChanged(); + this.OnPropertyChanged("UseAsPattern"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseAsPattern; + partial void OnUseAsPatternChanging(global::System.Nullable value); + partial void OnUseAsPatternChanged(); + /// + /// There are no comments for Property Accessibility in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Accessibility + { + get + { + return this._Accessibility; + } + set + { + this.OnAccessibilityChanging(value); + this._Accessibility = value; + this.OnAccessibilityChanged(); + this.OnPropertyChanged("Accessibility"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Accessibility; + partial void OnAccessibilityChanging(string value); + partial void OnAccessibilityChanged(); + /// + /// There are no comments for Property ServiceSettings in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection ServiceSettings + { + get + { + return this._ServiceSettings; + } + set + { + this.OnServiceSettingsChanging(value); + this._ServiceSettings = value; + this.OnServiceSettingsChanged(); + this.OnPropertyChanged("ServiceSettings"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _ServiceSettings = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnServiceSettingsChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnServiceSettingsChanged(); + /// + /// There are no comments for Property CustomProperty in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection CustomProperty + { + get + { + return this._CustomProperty; + } + set + { + this.OnCustomPropertyChanging(value); + this._CustomProperty = value; + this.OnCustomPropertyChanged(); + this.OnPropertyChanged("CustomProperty"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _CustomProperty = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnCustomPropertyChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnCustomPropertyChanged(); + /// + /// There are no comments for ComputerTierTemplates in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection ComputerTierTemplates + { + get + { + return this._ComputerTierTemplates; + } + set + { + this._ComputerTierTemplates = value; + this.OnPropertyChanged("ComputerTierTemplates"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _ComputerTierTemplates = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + /// + /// There are no comments for ApplicationHostTemplates in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection ApplicationHostTemplates + { + get + { + return this._ApplicationHostTemplates; + } + set + { + this._ApplicationHostTemplates = value; + this.OnPropertyChanged("ApplicationHostTemplates"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _ApplicationHostTemplates = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType VMM.NewServiceDeployment in the schema. + /// + public partial class NewServiceDeployment : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new NewServiceDeployment object. + /// + /// Initial value of TierConfigurations. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static NewServiceDeployment CreateNewServiceDeployment(global::System.Collections.ObjectModel.ObservableCollection tierConfigurations) + { + NewServiceDeployment newServiceDeployment = new NewServiceDeployment(); + if ((tierConfigurations == null)) + { + throw new global::System.ArgumentNullException("tierConfigurations"); + } + newServiceDeployment.TierConfigurations = tierConfigurations; + return newServiceDeployment; + } + /// + /// There are no comments for Property ServiceConfiguration in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public ServiceDeploymentConfiguration ServiceConfiguration + { + get + { + if (((this._ServiceConfiguration == null) + && (this._ServiceConfigurationInitialized != true))) + { + this._ServiceConfiguration = new ServiceDeploymentConfiguration(); + this._ServiceConfigurationInitialized = true; + } + return this._ServiceConfiguration; + } + set + { + this.OnServiceConfigurationChanging(value); + this._ServiceConfiguration = value; + this._ServiceConfigurationInitialized = true; + this.OnServiceConfigurationChanged(); + this.OnPropertyChanged("ServiceConfiguration"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private ServiceDeploymentConfiguration _ServiceConfiguration; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _ServiceConfigurationInitialized; + partial void OnServiceConfigurationChanging(ServiceDeploymentConfiguration value); + partial void OnServiceConfigurationChanged(); + /// + /// There are no comments for Property TierConfigurations in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection TierConfigurations + { + get + { + return this._TierConfigurations; + } + set + { + this.OnTierConfigurationsChanging(value); + this._TierConfigurations = value; + this.OnTierConfigurationsChanged(); + this.OnPropertyChanged("TierConfigurations"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _TierConfigurations = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnTierConfigurationsChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnTierConfigurationsChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType VMM.ServiceDeploymentConfiguration in the schema. + /// + public partial class ServiceDeploymentConfiguration : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new ServiceDeploymentConfiguration object. + /// + /// Initial value of ServiceSettings. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static ServiceDeploymentConfiguration CreateServiceDeploymentConfiguration(global::System.Collections.ObjectModel.ObservableCollection serviceSettings) + { + ServiceDeploymentConfiguration serviceDeploymentConfiguration = new ServiceDeploymentConfiguration(); + if ((serviceSettings == null)) + { + throw new global::System.ArgumentNullException("serviceSettings"); + } + serviceDeploymentConfiguration.ServiceSettings = serviceSettings; + return serviceDeploymentConfiguration; + } + /// + /// There are no comments for Property ServiceSettings in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection ServiceSettings + { + get + { + return this._ServiceSettings; + } + set + { + this.OnServiceSettingsChanging(value); + this._ServiceSettings = value; + this.OnServiceSettingsChanged(); + this.OnPropertyChanged("ServiceSettings"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _ServiceSettings = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnServiceSettingsChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnServiceSettingsChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property CostCenter in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string CostCenter + { + get + { + return this._CostCenter; + } + set + { + this.OnCostCenterChanging(value); + this._CostCenter = value; + this.OnCostCenterChanged(); + this.OnPropertyChanged("CostCenter"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _CostCenter; + partial void OnCostCenterChanging(string value); + partial void OnCostCenterChanged(); + /// + /// There are no comments for Property Tag in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Tag + { + get + { + return this._Tag; + } + set + { + this.OnTagChanging(value); + this._Tag = value; + this.OnTagChanged(); + this.OnPropertyChanged("Tag"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Tag; + partial void OnTagChanging(string value); + partial void OnTagChanged(); + /// + /// There are no comments for Property Priority in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Priority + { + get + { + return this._Priority; + } + set + { + this.OnPriorityChanging(value); + this._Priority = value; + this.OnPriorityChanged(); + this.OnPropertyChanged("Priority"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Priority; + partial void OnPriorityChanging(string value); + partial void OnPriorityChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType VMM.ServiceSettingsInput in the schema. + /// + public partial class ServiceSettingsInput : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property Value in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Value + { + get + { + return this._Value; + } + set + { + this.OnValueChanging(value); + this._Value = value; + this.OnValueChanged(); + this.OnPropertyChanged("Value"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Value; + partial void OnValueChanging(string value); + partial void OnValueChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property IsRequired in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsRequired + { + get + { + return this._IsRequired; + } + set + { + this.OnIsRequiredChanging(value); + this._IsRequired = value; + this.OnIsRequiredChanged(); + this.OnPropertyChanged("IsRequired"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsRequired; + partial void OnIsRequiredChanging(global::System.Nullable value); + partial void OnIsRequiredChanged(); + /// + /// There are no comments for Property IsEncrypted in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsEncrypted + { + get + { + return this._IsEncrypted; + } + set + { + this.OnIsEncryptedChanging(value); + this._IsEncrypted = value; + this.OnIsEncryptedChanged(); + this.OnPropertyChanged("IsEncrypted"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsEncrypted; + partial void OnIsEncryptedChanging(global::System.Nullable value); + partial void OnIsEncryptedChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType VMM.ServiceTierAndVMConfiguration in the schema. + /// + public partial class ServiceTierAndVMConfiguration : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new ServiceTierAndVMConfiguration object. + /// + /// Initial value of VMConfigurations. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static ServiceTierAndVMConfiguration CreateServiceTierAndVMConfiguration(global::System.Collections.ObjectModel.ObservableCollection vMConfigurations) + { + ServiceTierAndVMConfiguration serviceTierAndVMConfiguration = new ServiceTierAndVMConfiguration(); + if ((vMConfigurations == null)) + { + throw new global::System.ArgumentNullException("vMConfigurations"); + } + serviceTierAndVMConfiguration.VMConfigurations = vMConfigurations; + return serviceTierAndVMConfiguration; + } + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property VMConfigurations in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection VMConfigurations + { + get + { + return this._VMConfigurations; + } + set + { + this.OnVMConfigurationsChanging(value); + this._VMConfigurations = value; + this.OnVMConfigurationsChanged(); + this.OnPropertyChanged("VMConfigurations"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _VMConfigurations = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnVMConfigurationsChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnVMConfigurationsChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType VMM.VMConfiguration in the schema. + /// + public partial class VMConfiguration : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// There are no comments for Property VMName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string VMName + { + get + { + return this._VMName; + } + set + { + this.OnVMNameChanging(value); + this._VMName = value; + this.OnVMNameChanged(); + this.OnPropertyChanged("VMName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _VMName; + partial void OnVMNameChanging(string value); + partial void OnVMNameChanged(); + /// + /// There are no comments for Property ComputerName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ComputerName + { + get + { + return this._ComputerName; + } + set + { + this.OnComputerNameChanging(value); + this._ComputerName = value; + this.OnComputerNameChanged(); + this.OnPropertyChanged("ComputerName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ComputerName; + partial void OnComputerNameChanging(string value); + partial void OnComputerNameChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property CostCenter in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string CostCenter + { + get + { + return this._CostCenter; + } + set + { + this.OnCostCenterChanging(value); + this._CostCenter = value; + this.OnCostCenterChanged(); + this.OnPropertyChanged("CostCenter"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _CostCenter; + partial void OnCostCenterChanging(string value); + partial void OnCostCenterChanged(); + /// + /// There are no comments for Property Tag in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Tag + { + get + { + return this._Tag; + } + set + { + this.OnTagChanging(value); + this._Tag = value; + this.OnTagChanged(); + this.OnPropertyChanged("Tag"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Tag; + partial void OnTagChanging(string value); + partial void OnTagChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType VMM.ServicingWindow in the schema. + /// + public partial class ServicingWindow : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// There are no comments for Property Category in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Category + { + get + { + return this._Category; + } + set + { + this.OnCategoryChanging(value); + this._Category = value; + this.OnCategoryChanged(); + this.OnPropertyChanged("Category"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Category; + partial void OnCategoryChanging(string value); + partial void OnCategoryChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property Owner in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Owner + { + get + { + return this._Owner; + } + set + { + this.OnOwnerChanging(value); + this._Owner = value; + this.OnOwnerChanged(); + this.OnPropertyChanged("Owner"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Owner; + partial void OnOwnerChanging(string value); + partial void OnOwnerChanged(); + /// + /// There are no comments for Property TimeZone in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable TimeZone + { + get + { + return this._TimeZone; + } + set + { + this.OnTimeZoneChanging(value); + this._TimeZone = value; + this.OnTimeZoneChanged(); + this.OnPropertyChanged("TimeZone"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _TimeZone; + partial void OnTimeZoneChanging(global::System.Nullable value); + partial void OnTimeZoneChanged(); + /// + /// There are no comments for Property StartDate in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StartDate + { + get + { + return this._StartDate; + } + set + { + this.OnStartDateChanging(value); + this._StartDate = value; + this.OnStartDateChanged(); + this.OnPropertyChanged("StartDate"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StartDate; + partial void OnStartDateChanging(global::System.Nullable value); + partial void OnStartDateChanged(); + /// + /// There are no comments for Property StartTimeOfDay in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string StartTimeOfDay + { + get + { + return this._StartTimeOfDay; + } + set + { + this.OnStartTimeOfDayChanging(value); + this._StartTimeOfDay = value; + this.OnStartTimeOfDayChanged(); + this.OnPropertyChanged("StartTimeOfDay"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _StartTimeOfDay; + partial void OnStartTimeOfDayChanging(string value); + partial void OnStartTimeOfDayChanged(); + /// + /// There are no comments for Property WeeklyScheduleDayOfWeek in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string WeeklyScheduleDayOfWeek + { + get + { + return this._WeeklyScheduleDayOfWeek; + } + set + { + this.OnWeeklyScheduleDayOfWeekChanging(value); + this._WeeklyScheduleDayOfWeek = value; + this.OnWeeklyScheduleDayOfWeekChanged(); + this.OnPropertyChanged("WeeklyScheduleDayOfWeek"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _WeeklyScheduleDayOfWeek; + partial void OnWeeklyScheduleDayOfWeekChanging(string value); + partial void OnWeeklyScheduleDayOfWeekChanged(); + /// + /// There are no comments for Property MonthlyScheduleDayOfWeek in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string MonthlyScheduleDayOfWeek + { + get + { + return this._MonthlyScheduleDayOfWeek; + } + set + { + this.OnMonthlyScheduleDayOfWeekChanging(value); + this._MonthlyScheduleDayOfWeek = value; + this.OnMonthlyScheduleDayOfWeekChanged(); + this.OnPropertyChanged("MonthlyScheduleDayOfWeek"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _MonthlyScheduleDayOfWeek; + partial void OnMonthlyScheduleDayOfWeekChanging(string value); + partial void OnMonthlyScheduleDayOfWeekChanged(); + /// + /// There are no comments for Property DayOfMonth in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DayOfMonth + { + get + { + return this._DayOfMonth; + } + set + { + this.OnDayOfMonthChanging(value); + this._DayOfMonth = value; + this.OnDayOfMonthChanged(); + this.OnPropertyChanged("DayOfMonth"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DayOfMonth; + partial void OnDayOfMonthChanging(string value); + partial void OnDayOfMonthChanged(); + /// + /// There are no comments for Property WeekOfMonth in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string WeekOfMonth + { + get + { + return this._WeekOfMonth; + } + set + { + this.OnWeekOfMonthChanging(value); + this._WeekOfMonth = value; + this.OnWeekOfMonthChanged(); + this.OnPropertyChanged("WeekOfMonth"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _WeekOfMonth; + partial void OnWeekOfMonthChanging(string value); + partial void OnWeekOfMonthChanged(); + /// + /// There are no comments for Property DaysToRecur in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable DaysToRecur + { + get + { + return this._DaysToRecur; + } + set + { + this.OnDaysToRecurChanging(value); + this._DaysToRecur = value; + this.OnDaysToRecurChanged(); + this.OnPropertyChanged("DaysToRecur"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _DaysToRecur; + partial void OnDaysToRecurChanging(global::System.Nullable value); + partial void OnDaysToRecurChanged(); + /// + /// There are no comments for Property MonthsToRecur in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MonthsToRecur + { + get + { + return this._MonthsToRecur; + } + set + { + this.OnMonthsToRecurChanging(value); + this._MonthsToRecur = value; + this.OnMonthsToRecurChanged(); + this.OnPropertyChanged("MonthsToRecur"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MonthsToRecur; + partial void OnMonthsToRecurChanging(global::System.Nullable value); + partial void OnMonthsToRecurChanged(); + /// + /// There are no comments for Property WeeksToRecur in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable WeeksToRecur + { + get + { + return this._WeeksToRecur; + } + set + { + this.OnWeeksToRecurChanging(value); + this._WeeksToRecur = value; + this.OnWeeksToRecurChanged(); + this.OnPropertyChanged("WeeksToRecur"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _WeeksToRecur; + partial void OnWeeksToRecurChanging(global::System.Nullable value); + partial void OnWeeksToRecurChanged(); + /// + /// There are no comments for Property MinutesDuration in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MinutesDuration + { + get + { + return this._MinutesDuration; + } + set + { + this.OnMinutesDurationChanging(value); + this._MinutesDuration = value; + this.OnMinutesDurationChanged(); + this.OnPropertyChanged("MinutesDuration"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MinutesDuration; + partial void OnMinutesDurationChanging(global::System.Nullable value); + partial void OnMinutesDurationChanged(); + /// + /// There are no comments for Property ScheduleType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ScheduleType + { + get + { + return this._ScheduleType; + } + set + { + this.OnScheduleTypeChanging(value); + this._ScheduleType = value; + this.OnScheduleTypeChanged(); + this.OnPropertyChanged("ScheduleType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ScheduleType; + partial void OnScheduleTypeChanging(string value); + partial void OnScheduleTypeChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.Service in the schema. + /// + /// + /// ID + /// StampId + /// + [global::System.Data.Services.Common.EntitySetAttribute("Services")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ID", "StampId")] + public partial class Service : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new Service object. + /// + /// Initial value of ID. + /// Initial value of StampId. + /// Initial value of GrantedToList. + /// Initial value of CustomProperty. + /// Initial value of PendingServiceSettings. + /// Initial value of ServiceSettings. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static Service CreateService(global::System.Guid ID, global::System.Guid stampId, global::System.Collections.ObjectModel.ObservableCollection grantedToList, global::System.Collections.ObjectModel.ObservableCollection customProperty, global::System.Collections.ObjectModel.ObservableCollection pendingServiceSettings, global::System.Collections.ObjectModel.ObservableCollection serviceSettings) + { + Service service = new Service(); + service.ID = ID; + service.StampId = stampId; + if ((grantedToList == null)) + { + throw new global::System.ArgumentNullException("grantedToList"); + } + service.GrantedToList = grantedToList; + if ((customProperty == null)) + { + throw new global::System.ArgumentNullException("customProperty"); + } + service.CustomProperty = customProperty; + if ((pendingServiceSettings == null)) + { + throw new global::System.ArgumentNullException("pendingServiceSettings"); + } + service.PendingServiceSettings = pendingServiceSettings; + if ((serviceSettings == null)) + { + throw new global::System.ArgumentNullException("serviceSettings"); + } + service.ServiceSettings = serviceSettings; + return service; + } + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this._ID = value; + this.OnIDChanged(); + this.OnPropertyChanged("ID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ID; + partial void OnIDChanging(global::System.Guid value); + partial void OnIDChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property NewServiceDeployment in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public NewServiceDeployment NewServiceDeployment + { + get + { + if (((this._NewServiceDeployment == null) + && (this._NewServiceDeploymentInitialized != true))) + { + this._NewServiceDeployment = new NewServiceDeployment(); + this._NewServiceDeploymentInitialized = true; + } + return this._NewServiceDeployment; + } + set + { + this.OnNewServiceDeploymentChanging(value); + this._NewServiceDeployment = value; + this._NewServiceDeploymentInitialized = true; + this.OnNewServiceDeploymentChanged(); + this.OnPropertyChanged("NewServiceDeployment"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private NewServiceDeployment _NewServiceDeployment; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _NewServiceDeploymentInitialized; + partial void OnNewServiceDeploymentChanging(NewServiceDeployment value); + partial void OnNewServiceDeploymentChanged(); + /// + /// There are no comments for Property Owner in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public UserAndRole Owner + { + get + { + if (((this._Owner == null) + && (this._OwnerInitialized != true))) + { + this._Owner = new UserAndRole(); + this._OwnerInitialized = true; + } + return this._Owner; + } + set + { + this.OnOwnerChanging(value); + this._Owner = value; + this._OwnerInitialized = true; + this.OnOwnerChanged(); + this.OnPropertyChanged("Owner"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private UserAndRole _Owner; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _OwnerInitialized; + partial void OnOwnerChanging(UserAndRole value); + partial void OnOwnerChanged(); + /// + /// There are no comments for Property GrantedToList in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection GrantedToList + { + get + { + return this._GrantedToList; + } + set + { + this.OnGrantedToListChanging(value); + this._GrantedToList = value; + this.OnGrantedToListChanged(); + this.OnPropertyChanged("GrantedToList"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _GrantedToList = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnGrantedToListChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnGrantedToListChanged(); + /// + /// There are no comments for Property AllVMsAccessible in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable AllVMsAccessible + { + get + { + return this._AllVMsAccessible; + } + set + { + this.OnAllVMsAccessibleChanging(value); + this._AllVMsAccessible = value; + this.OnAllVMsAccessibleChanged(); + this.OnPropertyChanged("AllVMsAccessible"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _AllVMsAccessible; + partial void OnAllVMsAccessibleChanging(global::System.Nullable value); + partial void OnAllVMsAccessibleChanged(); + /// + /// There are no comments for Property CostCenter in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string CostCenter + { + get + { + return this._CostCenter; + } + set + { + this.OnCostCenterChanging(value); + this._CostCenter = value; + this.OnCostCenterChanged(); + this.OnPropertyChanged("CostCenter"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _CostCenter; + partial void OnCostCenterChanging(string value); + partial void OnCostCenterChanged(); + /// + /// There are no comments for Property DeploymentState in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DeploymentState + { + get + { + return this._DeploymentState; + } + set + { + this.OnDeploymentStateChanging(value); + this._DeploymentState = value; + this.OnDeploymentStateChanged(); + this.OnPropertyChanged("DeploymentState"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DeploymentState; + partial void OnDeploymentStateChanging(string value); + partial void OnDeploymentStateChanged(); + /// + /// There are no comments for Property DeployedTo in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DeployedTo + { + get + { + return this._DeployedTo; + } + set + { + this.OnDeployedToChanging(value); + this._DeployedTo = value; + this.OnDeployedToChanged(); + this.OnPropertyChanged("DeployedTo"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DeployedTo; + partial void OnDeployedToChanging(string value); + partial void OnDeployedToChanged(); + /// + /// There are no comments for Property InServicingMode in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable InServicingMode + { + get + { + return this._InServicingMode; + } + set + { + this.OnInServicingModeChanging(value); + this._InServicingMode = value; + this.OnInServicingModeChanged(); + this.OnPropertyChanged("InServicingMode"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _InServicingMode; + partial void OnInServicingModeChanging(global::System.Nullable value); + partial void OnInServicingModeChanged(); + /// + /// There are no comments for Property OverallStatus in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string OverallStatus + { + get + { + return this._OverallStatus; + } + set + { + this.OnOverallStatusChanging(value); + this._OverallStatus = value; + this.OnOverallStatusChanged(); + this.OnPropertyChanged("OverallStatus"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _OverallStatus; + partial void OnOverallStatusChanging(string value); + partial void OnOverallStatusChanged(); + /// + /// There are no comments for Property PendingServiceTemplatePresent in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable PendingServiceTemplatePresent + { + get + { + return this._PendingServiceTemplatePresent; + } + set + { + this.OnPendingServiceTemplatePresentChanging(value); + this._PendingServiceTemplatePresent = value; + this.OnPendingServiceTemplatePresentChanged(); + this.OnPropertyChanged("PendingServiceTemplatePresent"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _PendingServiceTemplatePresent; + partial void OnPendingServiceTemplatePresentChanging(global::System.Nullable value); + partial void OnPendingServiceTemplatePresentChanged(); + /// + /// There are no comments for Property PendingServiceTemplateRelease in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string PendingServiceTemplateRelease + { + get + { + return this._PendingServiceTemplateRelease; + } + set + { + this.OnPendingServiceTemplateReleaseChanging(value); + this._PendingServiceTemplateRelease = value; + this.OnPendingServiceTemplateReleaseChanged(); + this.OnPropertyChanged("PendingServiceTemplateRelease"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _PendingServiceTemplateRelease; + partial void OnPendingServiceTemplateReleaseChanging(string value); + partial void OnPendingServiceTemplateReleaseChanged(); + /// + /// There are no comments for Property ServicePriority in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ServicePriority + { + get + { + return this._ServicePriority; + } + set + { + this.OnServicePriorityChanging(value); + this._ServicePriority = value; + this.OnServicePriorityChanged(); + this.OnPropertyChanged("ServicePriority"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ServicePriority; + partial void OnServicePriorityChanging(string value); + partial void OnServicePriorityChanged(); + /// + /// There are no comments for Property ServiceTemplateRelease in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ServiceTemplateRelease + { + get + { + return this._ServiceTemplateRelease; + } + set + { + this.OnServiceTemplateReleaseChanging(value); + this._ServiceTemplateRelease = value; + this.OnServiceTemplateReleaseChanged(); + this.OnPropertyChanged("ServiceTemplateRelease"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ServiceTemplateRelease; + partial void OnServiceTemplateReleaseChanging(string value); + partial void OnServiceTemplateReleaseChanged(); + /// + /// There are no comments for Property ServiceStatus in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ServiceStatus + { + get + { + return this._ServiceStatus; + } + set + { + this.OnServiceStatusChanging(value); + this._ServiceStatus = value; + this.OnServiceStatusChanged(); + this.OnPropertyChanged("ServiceStatus"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ServiceStatus; + partial void OnServiceStatusChanging(string value); + partial void OnServiceStatusChanged(); + /// + /// There are no comments for Property VMHostGroup in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string VMHostGroup + { + get + { + return this._VMHostGroup; + } + set + { + this.OnVMHostGroupChanging(value); + this._VMHostGroup = value; + this.OnVMHostGroupChanged(); + this.OnPropertyChanged("VMHostGroup"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _VMHostGroup; + partial void OnVMHostGroupChanging(string value); + partial void OnVMHostGroupChanged(); + /// + /// There are no comments for Property Enabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Enabled + { + get + { + return this._Enabled; + } + set + { + this.OnEnabledChanging(value); + this._Enabled = value; + this.OnEnabledChanged(); + this.OnPropertyChanged("Enabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Enabled; + partial void OnEnabledChanging(global::System.Nullable value); + partial void OnEnabledChanged(); + /// + /// There are no comments for Property AddedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable AddedTime + { + get + { + return this._AddedTime; + } + set + { + this.OnAddedTimeChanging(value); + this._AddedTime = value; + this.OnAddedTimeChanged(); + this.OnPropertyChanged("AddedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _AddedTime; + partial void OnAddedTimeChanging(global::System.Nullable value); + partial void OnAddedTimeChanged(); + /// + /// There are no comments for Property ModifiedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ModifiedTime + { + get + { + return this._ModifiedTime; + } + set + { + this.OnModifiedTimeChanging(value); + this._ModifiedTime = value; + this.OnModifiedTimeChanged(); + this.OnPropertyChanged("ModifiedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ModifiedTime; + partial void OnModifiedTimeChanging(global::System.Nullable value); + partial void OnModifiedTimeChanged(); + /// + /// There are no comments for Property NotificationsAvailable in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable NotificationsAvailable + { + get + { + return this._NotificationsAvailable; + } + set + { + this.OnNotificationsAvailableChanging(value); + this._NotificationsAvailable = value; + this.OnNotificationsAvailableChanged(); + this.OnPropertyChanged("NotificationsAvailable"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _NotificationsAvailable; + partial void OnNotificationsAvailableChanging(global::System.Nullable value); + partial void OnNotificationsAvailableChanged(); + /// + /// There are no comments for Property Accessibility in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Accessibility + { + get + { + return this._Accessibility; + } + set + { + this.OnAccessibilityChanging(value); + this._Accessibility = value; + this.OnAccessibilityChanged(); + this.OnPropertyChanged("Accessibility"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Accessibility; + partial void OnAccessibilityChanging(string value); + partial void OnAccessibilityChanged(); + /// + /// There are no comments for Property Operation in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Operation + { + get + { + return this._Operation; + } + set + { + this.OnOperationChanging(value); + this._Operation = value; + this.OnOperationChanged(); + this.OnPropertyChanged("Operation"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Operation; + partial void OnOperationChanging(string value); + partial void OnOperationChanged(); + /// + /// There are no comments for Property IgnorePlacementErrors in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IgnorePlacementErrors + { + get + { + return this._IgnorePlacementErrors; + } + set + { + this.OnIgnorePlacementErrorsChanging(value); + this._IgnorePlacementErrors = value; + this.OnIgnorePlacementErrorsChanged(); + this.OnPropertyChanged("IgnorePlacementErrors"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IgnorePlacementErrors; + partial void OnIgnorePlacementErrorsChanging(global::System.Nullable value); + partial void OnIgnorePlacementErrorsChanged(); + /// + /// There are no comments for Property FailedJobID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable FailedJobID + { + get + { + return this._FailedJobID; + } + set + { + this.OnFailedJobIDChanging(value); + this._FailedJobID = value; + this.OnFailedJobIDChanged(); + this.OnPropertyChanged("FailedJobID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _FailedJobID; + partial void OnFailedJobIDChanging(global::System.Nullable value); + partial void OnFailedJobIDChanged(); + /// + /// There are no comments for Property CloudId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CloudId + { + get + { + return this._CloudId; + } + set + { + this.OnCloudIdChanging(value); + this._CloudId = value; + this.OnCloudIdChanged(); + this.OnPropertyChanged("CloudId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CloudId; + partial void OnCloudIdChanging(global::System.Nullable value); + partial void OnCloudIdChanged(); + /// + /// There are no comments for Property ServiceTemplateId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ServiceTemplateId + { + get + { + return this._ServiceTemplateId; + } + set + { + this.OnServiceTemplateIdChanging(value); + this._ServiceTemplateId = value; + this.OnServiceTemplateIdChanged(); + this.OnPropertyChanged("ServiceTemplateId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ServiceTemplateId; + partial void OnServiceTemplateIdChanging(global::System.Nullable value); + partial void OnServiceTemplateIdChanged(); + /// + /// There are no comments for Property CustomProperty in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection CustomProperty + { + get + { + return this._CustomProperty; + } + set + { + this.OnCustomPropertyChanging(value); + this._CustomProperty = value; + this.OnCustomPropertyChanged(); + this.OnPropertyChanged("CustomProperty"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _CustomProperty = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnCustomPropertyChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnCustomPropertyChanged(); + /// + /// There are no comments for Property PendingServiceSettings in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection PendingServiceSettings + { + get + { + return this._PendingServiceSettings; + } + set + { + this.OnPendingServiceSettingsChanging(value); + this._PendingServiceSettings = value; + this.OnPendingServiceSettingsChanged(); + this.OnPropertyChanged("PendingServiceSettings"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _PendingServiceSettings = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnPendingServiceSettingsChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnPendingServiceSettingsChanged(); + /// + /// There are no comments for Property ServiceSettings in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection ServiceSettings + { + get + { + return this._ServiceSettings; + } + set + { + this.OnServiceSettingsChanging(value); + this._ServiceSettings = value; + this.OnServiceSettingsChanged(); + this.OnPropertyChanged("ServiceSettings"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _ServiceSettings = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnServiceSettingsChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnServiceSettingsChanged(); + /// + /// There are no comments for Property ServicingWindow in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public ServicingWindow ServicingWindow + { + get + { + if (((this._ServicingWindow == null) + && (this._ServicingWindowInitialized != true))) + { + this._ServicingWindow = new ServicingWindow(); + this._ServicingWindowInitialized = true; + } + return this._ServicingWindow; + } + set + { + this.OnServicingWindowChanging(value); + this._ServicingWindow = value; + this._ServicingWindowInitialized = true; + this.OnServicingWindowChanged(); + this.OnPropertyChanged("ServicingWindow"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private ServicingWindow _ServicingWindow; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _ServicingWindowInitialized; + partial void OnServicingWindowChanging(ServicingWindow value); + partial void OnServicingWindowChanged(); + /// + /// There are no comments for FailedJob in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public Job FailedJob + { + get + { + return this._FailedJob; + } + set + { + this._FailedJob = value; + this.OnPropertyChanged("FailedJob"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private Job _FailedJob; + /// + /// There are no comments for PendingServiceTemplate in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public ServiceTemplate PendingServiceTemplate + { + get + { + return this._PendingServiceTemplate; + } + set + { + this._PendingServiceTemplate = value; + this.OnPropertyChanged("PendingServiceTemplate"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private ServiceTemplate _PendingServiceTemplate; + /// + /// There are no comments for ServiceTemplate in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public ServiceTemplate ServiceTemplate + { + get + { + return this._ServiceTemplate; + } + set + { + this._ServiceTemplate = value; + this.OnPropertyChanged("ServiceTemplate"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private ServiceTemplate _ServiceTemplate; + /// + /// There are no comments for Cloud in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public Cloud Cloud + { + get + { + return this._Cloud; + } + set + { + this._Cloud = value; + this.OnPropertyChanged("Cloud"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private Cloud _Cloud; + /// + /// There are no comments for ComputerTiers in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection ComputerTiers + { + get + { + return this._ComputerTiers; + } + set + { + this._ComputerTiers = value; + this.OnPropertyChanged("ComputerTiers"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _ComputerTiers = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + /// + /// There are no comments for MostRecentTask in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public Job MostRecentTask + { + get + { + return this._MostRecentTask; + } + set + { + this._MostRecentTask = value; + this.OnPropertyChanged("MostRecentTask"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private Job _MostRecentTask; + /// + /// There are no comments for ApplicationHosts in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection ApplicationHosts + { + get + { + return this._ApplicationHosts; + } + set + { + this._ApplicationHosts = value; + this.OnPropertyChanged("ApplicationHosts"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _ApplicationHosts = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.ComputerTierTemplate in the schema. + /// + /// + /// ID + /// StampId + /// + [global::System.Data.Services.Common.EntitySetAttribute("ComputerTierTemplates")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ID", "StampId")] + public partial class ComputerTierTemplate : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new ComputerTierTemplate object. + /// + /// Initial value of ID. + /// Initial value of StampId. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static ComputerTierTemplate CreateComputerTierTemplate(global::System.Guid ID, global::System.Guid stampId) + { + ComputerTierTemplate computerTierTemplate = new ComputerTierTemplate(); + computerTierTemplate.ID = ID; + computerTierTemplate.StampId = stampId; + return computerTierTemplate; + } + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this._ID = value; + this.OnIDChanged(); + this.OnPropertyChanged("ID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ID; + partial void OnIDChanging(global::System.Guid value); + partial void OnIDChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property AddedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable AddedTime + { + get + { + return this._AddedTime; + } + set + { + this.OnAddedTimeChanging(value); + this._AddedTime = value; + this.OnAddedTimeChanged(); + this.OnPropertyChanged("AddedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _AddedTime; + partial void OnAddedTimeChanging(global::System.Nullable value); + partial void OnAddedTimeChanged(); + /// + /// There are no comments for Property ModifiedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ModifiedTime + { + get + { + return this._ModifiedTime; + } + set + { + this.OnModifiedTimeChanging(value); + this._ModifiedTime = value; + this.OnModifiedTimeChanged(); + this.OnPropertyChanged("ModifiedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ModifiedTime; + partial void OnModifiedTimeChanging(global::System.Nullable value); + partial void OnModifiedTimeChanged(); + /// + /// There are no comments for Property BlockAutomaticMigration in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable BlockAutomaticMigration + { + get + { + return this._BlockAutomaticMigration; + } + set + { + this.OnBlockAutomaticMigrationChanging(value); + this._BlockAutomaticMigration = value; + this.OnBlockAutomaticMigrationChanged(); + this.OnPropertyChanged("BlockAutomaticMigration"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _BlockAutomaticMigration; + partial void OnBlockAutomaticMigrationChanging(global::System.Nullable value); + partial void OnBlockAutomaticMigrationChanged(); + /// + /// There are no comments for Property DefaultInstanceCount in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable DefaultInstanceCount + { + get + { + return this._DefaultInstanceCount; + } + set + { + this.OnDefaultInstanceCountChanging(value); + this._DefaultInstanceCount = value; + this.OnDefaultInstanceCountChanged(); + this.OnPropertyChanged("DefaultInstanceCount"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _DefaultInstanceCount; + partial void OnDefaultInstanceCountChanging(global::System.Nullable value); + partial void OnDefaultInstanceCountChanged(); + /// + /// There are no comments for Property DeploymentOrder in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable DeploymentOrder + { + get + { + return this._DeploymentOrder; + } + set + { + this.OnDeploymentOrderChanging(value); + this._DeploymentOrder = value; + this.OnDeploymentOrderChanged(); + this.OnPropertyChanged("DeploymentOrder"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _DeploymentOrder; + partial void OnDeploymentOrderChanging(global::System.Nullable value); + partial void OnDeploymentOrderChanged(); + /// + /// There are no comments for Property InstanceMaximumCount in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable InstanceMaximumCount + { + get + { + return this._InstanceMaximumCount; + } + set + { + this.OnInstanceMaximumCountChanging(value); + this._InstanceMaximumCount = value; + this.OnInstanceMaximumCountChanged(); + this.OnPropertyChanged("InstanceMaximumCount"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _InstanceMaximumCount; + partial void OnInstanceMaximumCountChanging(global::System.Nullable value); + partial void OnInstanceMaximumCountChanged(); + /// + /// There are no comments for Property InstanceMinimumCount in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable InstanceMinimumCount + { + get + { + return this._InstanceMinimumCount; + } + set + { + this.OnInstanceMinimumCountChanging(value); + this._InstanceMinimumCount = value; + this.OnInstanceMinimumCountChanged(); + this.OnPropertyChanged("InstanceMinimumCount"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _InstanceMinimumCount; + partial void OnInstanceMinimumCountChanging(global::System.Nullable value); + partial void OnInstanceMinimumCountChanged(); + /// + /// There are no comments for Property NumberOfUpgradeDomains in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable NumberOfUpgradeDomains + { + get + { + return this._NumberOfUpgradeDomains; + } + set + { + this.OnNumberOfUpgradeDomainsChanging(value); + this._NumberOfUpgradeDomains = value; + this.OnNumberOfUpgradeDomainsChanged(); + this.OnPropertyChanged("NumberOfUpgradeDomains"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _NumberOfUpgradeDomains; + partial void OnNumberOfUpgradeDomainsChanging(global::System.Nullable value); + partial void OnNumberOfUpgradeDomainsChanged(); + /// + /// There are no comments for Property ServicingOrder in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ServicingOrder + { + get + { + return this._ServicingOrder; + } + set + { + this.OnServicingOrderChanging(value); + this._ServicingOrder = value; + this.OnServicingOrderChanged(); + this.OnPropertyChanged("ServicingOrder"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ServicingOrder; + partial void OnServicingOrderChanging(global::System.Nullable value); + partial void OnServicingOrderChanged(); + /// + /// There are no comments for Property Tag in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Tag + { + get + { + return this._Tag; + } + set + { + this.OnTagChanging(value); + this._Tag = value; + this.OnTagChanged(); + this.OnPropertyChanged("Tag"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Tag; + partial void OnTagChanging(string value); + partial void OnTagChanged(); + /// + /// There are no comments for Property Enabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Enabled + { + get + { + return this._Enabled; + } + set + { + this.OnEnabledChanging(value); + this._Enabled = value; + this.OnEnabledChanged(); + this.OnPropertyChanged("Enabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Enabled; + partial void OnEnabledChanging(global::System.Nullable value); + partial void OnEnabledChanged(); + /// + /// There are no comments for Property Accessibility in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Accessibility + { + get + { + return this._Accessibility; + } + set + { + this.OnAccessibilityChanging(value); + this._Accessibility = value; + this.OnAccessibilityChanged(); + this.OnPropertyChanged("Accessibility"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Accessibility; + partial void OnAccessibilityChanging(string value); + partial void OnAccessibilityChanged(); + /// + /// There are no comments for Property ServiceTemplateId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ServiceTemplateId + { + get + { + return this._ServiceTemplateId; + } + set + { + this.OnServiceTemplateIdChanging(value); + this._ServiceTemplateId = value; + this.OnServiceTemplateIdChanged(); + this.OnPropertyChanged("ServiceTemplateId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ServiceTemplateId; + partial void OnServiceTemplateIdChanging(global::System.Nullable value); + partial void OnServiceTemplateIdChanged(); + /// + /// There are no comments for VMTemplate in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public VMTemplate VMTemplate + { + get + { + return this._VMTemplate; + } + set + { + this._VMTemplate = value; + this.OnPropertyChanged("VMTemplate"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private VMTemplate _VMTemplate; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.ComputerTier in the schema. + /// + /// + /// ID + /// StampId + /// + [global::System.Data.Services.Common.EntitySetAttribute("ComputerTiers")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ID", "StampId")] + public partial class ComputerTier : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new ComputerTier object. + /// + /// Initial value of ID. + /// Initial value of StampId. + /// Initial value of CustomProperty. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static ComputerTier CreateComputerTier(global::System.Guid ID, global::System.Guid stampId, global::System.Collections.ObjectModel.ObservableCollection customProperty) + { + ComputerTier computerTier = new ComputerTier(); + computerTier.ID = ID; + computerTier.StampId = stampId; + if ((customProperty == null)) + { + throw new global::System.ArgumentNullException("customProperty"); + } + computerTier.CustomProperty = customProperty; + return computerTier; + } + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this._ID = value; + this.OnIDChanged(); + this.OnPropertyChanged("ID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ID; + partial void OnIDChanging(global::System.Guid value); + partial void OnIDChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property AllVMsAccessible in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable AllVMsAccessible + { + get + { + return this._AllVMsAccessible; + } + set + { + this.OnAllVMsAccessibleChanging(value); + this._AllVMsAccessible = value; + this.OnAllVMsAccessibleChanged(); + this.OnPropertyChanged("AllVMsAccessible"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _AllVMsAccessible; + partial void OnAllVMsAccessibleChanging(global::System.Nullable value); + partial void OnAllVMsAccessibleChanged(); + /// + /// There are no comments for Property ComputerTierStatus in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ComputerTierStatus + { + get + { + return this._ComputerTierStatus; + } + set + { + this.OnComputerTierStatusChanging(value); + this._ComputerTierStatus = value; + this.OnComputerTierStatusChanged(); + this.OnPropertyChanged("ComputerTierStatus"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ComputerTierStatus; + partial void OnComputerTierStatusChanging(string value); + partial void OnComputerTierStatusChanged(); + /// + /// There are no comments for Property InstanceMaximumCount in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable InstanceMaximumCount + { + get + { + return this._InstanceMaximumCount; + } + set + { + this.OnInstanceMaximumCountChanging(value); + this._InstanceMaximumCount = value; + this.OnInstanceMaximumCountChanged(); + this.OnPropertyChanged("InstanceMaximumCount"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _InstanceMaximumCount; + partial void OnInstanceMaximumCountChanging(global::System.Nullable value); + partial void OnInstanceMaximumCountChanged(); + /// + /// There are no comments for Property InstanceMinimumCount in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable InstanceMinimumCount + { + get + { + return this._InstanceMinimumCount; + } + set + { + this.OnInstanceMinimumCountChanging(value); + this._InstanceMinimumCount = value; + this.OnInstanceMinimumCountChanged(); + this.OnPropertyChanged("InstanceMinimumCount"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _InstanceMinimumCount; + partial void OnInstanceMinimumCountChanging(global::System.Nullable value); + partial void OnInstanceMinimumCountChanged(); + /// + /// There are no comments for Property OverallStatus in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string OverallStatus + { + get + { + return this._OverallStatus; + } + set + { + this.OnOverallStatusChanging(value); + this._OverallStatus = value; + this.OnOverallStatusChanged(); + this.OnPropertyChanged("OverallStatus"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _OverallStatus; + partial void OnOverallStatusChanging(string value); + partial void OnOverallStatusChanged(); + /// + /// There are no comments for Property ServicingType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ServicingType + { + get + { + return this._ServicingType; + } + set + { + this.OnServicingTypeChanging(value); + this._ServicingType = value; + this.OnServicingTypeChanged(); + this.OnPropertyChanged("ServicingType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ServicingType; + partial void OnServicingTypeChanging(string value); + partial void OnServicingTypeChanged(); + /// + /// There are no comments for Property DeploymentState in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DeploymentState + { + get + { + return this._DeploymentState; + } + set + { + this.OnDeploymentStateChanging(value); + this._DeploymentState = value; + this.OnDeploymentStateChanged(); + this.OnPropertyChanged("DeploymentState"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DeploymentState; + partial void OnDeploymentStateChanging(string value); + partial void OnDeploymentStateChanged(); + /// + /// There are no comments for Property Enabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Enabled + { + get + { + return this._Enabled; + } + set + { + this.OnEnabledChanging(value); + this._Enabled = value; + this.OnEnabledChanged(); + this.OnPropertyChanged("Enabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Enabled; + partial void OnEnabledChanging(global::System.Nullable value); + partial void OnEnabledChanged(); + /// + /// There are no comments for Property AddedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable AddedTime + { + get + { + return this._AddedTime; + } + set + { + this.OnAddedTimeChanging(value); + this._AddedTime = value; + this.OnAddedTimeChanged(); + this.OnPropertyChanged("AddedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _AddedTime; + partial void OnAddedTimeChanging(global::System.Nullable value); + partial void OnAddedTimeChanged(); + /// + /// There are no comments for Property ModifiedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ModifiedTime + { + get + { + return this._ModifiedTime; + } + set + { + this.OnModifiedTimeChanging(value); + this._ModifiedTime = value; + this.OnModifiedTimeChanged(); + this.OnPropertyChanged("ModifiedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ModifiedTime; + partial void OnModifiedTimeChanging(global::System.Nullable value); + partial void OnModifiedTimeChanged(); + /// + /// There are no comments for Property Accessibility in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Accessibility + { + get + { + return this._Accessibility; + } + set + { + this.OnAccessibilityChanging(value); + this._Accessibility = value; + this.OnAccessibilityChanged(); + this.OnPropertyChanged("Accessibility"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Accessibility; + partial void OnAccessibilityChanging(string value); + partial void OnAccessibilityChanged(); + /// + /// There are no comments for Property ServiceId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ServiceId + { + get + { + return this._ServiceId; + } + set + { + this.OnServiceIdChanging(value); + this._ServiceId = value; + this.OnServiceIdChanged(); + this.OnPropertyChanged("ServiceId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ServiceId; + partial void OnServiceIdChanging(global::System.Nullable value); + partial void OnServiceIdChanged(); + /// + /// There are no comments for Property FailedJobID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable FailedJobID + { + get + { + return this._FailedJobID; + } + set + { + this.OnFailedJobIDChanging(value); + this._FailedJobID = value; + this.OnFailedJobIDChanged(); + this.OnPropertyChanged("FailedJobID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _FailedJobID; + partial void OnFailedJobIDChanging(global::System.Nullable value); + partial void OnFailedJobIDChanged(); + /// + /// There are no comments for Property TierTemplateId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable TierTemplateId + { + get + { + return this._TierTemplateId; + } + set + { + this.OnTierTemplateIdChanging(value); + this._TierTemplateId = value; + this.OnTierTemplateIdChanged(); + this.OnPropertyChanged("TierTemplateId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _TierTemplateId; + partial void OnTierTemplateIdChanging(global::System.Nullable value); + partial void OnTierTemplateIdChanged(); + /// + /// There are no comments for Property CustomProperty in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection CustomProperty + { + get + { + return this._CustomProperty; + } + set + { + this.OnCustomPropertyChanging(value); + this._CustomProperty = value; + this.OnCustomPropertyChanged(); + this.OnPropertyChanged("CustomProperty"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _CustomProperty = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnCustomPropertyChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnCustomPropertyChanged(); + /// + /// There are no comments for ComputerTierTemplate in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public ComputerTierTemplate ComputerTierTemplate + { + get + { + return this._ComputerTierTemplate; + } + set + { + this._ComputerTierTemplate = value; + this.OnPropertyChanged("ComputerTierTemplate"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private ComputerTierTemplate _ComputerTierTemplate; + /// + /// There are no comments for VMs in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection VMs + { + get + { + return this._VMs; + } + set + { + this._VMs = value; + this.OnPropertyChanged("VMs"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _VMs = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + /// + /// There are no comments for MostRecentTask in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public Job MostRecentTask + { + get + { + return this._MostRecentTask; + } + set + { + this._MostRecentTask = value; + this.OnPropertyChanged("MostRecentTask"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private Job _MostRecentTask; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.LibraryShare in the schema. + /// + /// + /// ID + /// StampId + /// + [global::System.Data.Services.Common.EntitySetAttribute("LibraryShares")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ID", "StampId")] + public partial class LibraryShare : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new LibraryShare object. + /// + /// Initial value of ID. + /// Initial value of StampId. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static LibraryShare CreateLibraryShare(global::System.Guid ID, global::System.Guid stampId) + { + LibraryShare libraryShare = new LibraryShare(); + libraryShare.ID = ID; + libraryShare.StampId = stampId; + return libraryShare; + } + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this._ID = value; + this.OnIDChanged(); + this.OnPropertyChanged("ID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ID; + partial void OnIDChanging(global::System.Guid value); + partial void OnIDChanged(); + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property Path in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Path + { + get + { + return this._Path; + } + set + { + this.OnPathChanging(value); + this._Path = value; + this.OnPathChanged(); + this.OnPropertyChanged("Path"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Path; + partial void OnPathChanging(string value); + partial void OnPathChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.ApplicationHost in the schema. + /// + /// + /// ID + /// StampId + /// + [global::System.Data.Services.Common.EntitySetAttribute("ApplicationHosts")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ID", "StampId")] + public partial class ApplicationHost : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new ApplicationHost object. + /// + /// Initial value of ID. + /// Initial value of StampId. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static ApplicationHost CreateApplicationHost(global::System.Guid ID, global::System.Guid stampId) + { + ApplicationHost applicationHost = new ApplicationHost(); + applicationHost.ID = ID; + applicationHost.StampId = stampId; + return applicationHost; + } + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this._ID = value; + this.OnIDChanged(); + this.OnPropertyChanged("ID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ID; + partial void OnIDChanging(global::System.Guid value); + partial void OnIDChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property AddedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable AddedTime + { + get + { + return this._AddedTime; + } + set + { + this.OnAddedTimeChanging(value); + this._AddedTime = value; + this.OnAddedTimeChanged(); + this.OnPropertyChanged("AddedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _AddedTime; + partial void OnAddedTimeChanging(global::System.Nullable value); + partial void OnAddedTimeChanged(); + /// + /// There are no comments for Property ModifiedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ModifiedTime + { + get + { + return this._ModifiedTime; + } + set + { + this.OnModifiedTimeChanging(value); + this._ModifiedTime = value; + this.OnModifiedTimeChanged(); + this.OnPropertyChanged("ModifiedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ModifiedTime; + partial void OnModifiedTimeChanging(global::System.Nullable value); + partial void OnModifiedTimeChanged(); + /// + /// There are no comments for Property Owner in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Owner + { + get + { + return this._Owner; + } + set + { + this.OnOwnerChanging(value); + this._Owner = value; + this.OnOwnerChanged(); + this.OnPropertyChanged("Owner"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Owner; + partial void OnOwnerChanging(string value); + partial void OnOwnerChanged(); + /// + /// There are no comments for Property ComputerName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ComputerName + { + get + { + return this._ComputerName; + } + set + { + this.OnComputerNameChanging(value); + this._ComputerName = value; + this.OnComputerNameChanged(); + this.OnPropertyChanged("ComputerName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ComputerName; + partial void OnComputerNameChanging(string value); + partial void OnComputerNameChanged(); + /// + /// There are no comments for Property DeploymentState in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DeploymentState + { + get + { + return this._DeploymentState; + } + set + { + this.OnDeploymentStateChanging(value); + this._DeploymentState = value; + this.OnDeploymentStateChanged(); + this.OnPropertyChanged("DeploymentState"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DeploymentState; + partial void OnDeploymentStateChanging(string value); + partial void OnDeploymentStateChanged(); + /// + /// There are no comments for Property ServiceId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ServiceId + { + get + { + return this._ServiceId; + } + set + { + this.OnServiceIdChanging(value); + this._ServiceId = value; + this.OnServiceIdChanged(); + this.OnPropertyChanged("ServiceId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ServiceId; + partial void OnServiceIdChanging(global::System.Nullable value); + partial void OnServiceIdChanged(); + /// + /// There are no comments for Property FailedJobID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable FailedJobID + { + get + { + return this._FailedJobID; + } + set + { + this.OnFailedJobIDChanging(value); + this._FailedJobID = value; + this.OnFailedJobIDChanged(); + this.OnPropertyChanged("FailedJobID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _FailedJobID; + partial void OnFailedJobIDChanging(global::System.Nullable value); + partial void OnFailedJobIDChanged(); + /// + /// There are no comments for ApplicationHostTemplate in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public ApplicationHostTemplate ApplicationHostTemplate + { + get + { + return this._ApplicationHostTemplate; + } + set + { + this._ApplicationHostTemplate = value; + this.OnPropertyChanged("ApplicationHostTemplate"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private ApplicationHostTemplate _ApplicationHostTemplate; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.ApplicationHostTemplate in the schema. + /// + /// + /// ID + /// StampId + /// + [global::System.Data.Services.Common.EntitySetAttribute("ApplicationHostTemplates")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ID", "StampId")] + public partial class ApplicationHostTemplate : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new ApplicationHostTemplate object. + /// + /// Initial value of ID. + /// Initial value of StampId. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static ApplicationHostTemplate CreateApplicationHostTemplate(global::System.Guid ID, global::System.Guid stampId) + { + ApplicationHostTemplate applicationHostTemplate = new ApplicationHostTemplate(); + applicationHostTemplate.ID = ID; + applicationHostTemplate.StampId = stampId; + return applicationHostTemplate; + } + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this._ID = value; + this.OnIDChanged(); + this.OnPropertyChanged("ID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ID; + partial void OnIDChanging(global::System.Guid value); + partial void OnIDChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property AddedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable AddedTime + { + get + { + return this._AddedTime; + } + set + { + this.OnAddedTimeChanging(value); + this._AddedTime = value; + this.OnAddedTimeChanged(); + this.OnPropertyChanged("AddedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _AddedTime; + partial void OnAddedTimeChanging(global::System.Nullable value); + partial void OnAddedTimeChanged(); + /// + /// There are no comments for Property ModifiedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ModifiedTime + { + get + { + return this._ModifiedTime; + } + set + { + this.OnModifiedTimeChanging(value); + this._ModifiedTime = value; + this.OnModifiedTimeChanged(); + this.OnPropertyChanged("ModifiedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ModifiedTime; + partial void OnModifiedTimeChanging(global::System.Nullable value); + partial void OnModifiedTimeChanged(); + /// + /// There are no comments for Property DeploymentOrder in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable DeploymentOrder + { + get + { + return this._DeploymentOrder; + } + set + { + this.OnDeploymentOrderChanging(value); + this._DeploymentOrder = value; + this.OnDeploymentOrderChanged(); + this.OnPropertyChanged("DeploymentOrder"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _DeploymentOrder; + partial void OnDeploymentOrderChanging(global::System.Nullable value); + partial void OnDeploymentOrderChanged(); + /// + /// There are no comments for Property ComputerName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ComputerName + { + get + { + return this._ComputerName; + } + set + { + this.OnComputerNameChanging(value); + this._ComputerName = value; + this.OnComputerNameChanged(); + this.OnPropertyChanged("ComputerName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ComputerName; + partial void OnComputerNameChanging(string value); + partial void OnComputerNameChanged(); + /// + /// There are no comments for Property ServicingOrder in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ServicingOrder + { + get + { + return this._ServicingOrder; + } + set + { + this.OnServicingOrderChanging(value); + this._ServicingOrder = value; + this.OnServicingOrderChanged(); + this.OnPropertyChanged("ServicingOrder"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ServicingOrder; + partial void OnServicingOrderChanging(global::System.Nullable value); + partial void OnServicingOrderChanged(); + /// + /// There are no comments for Property Tag in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Tag + { + get + { + return this._Tag; + } + set + { + this.OnTagChanging(value); + this._Tag = value; + this.OnTagChanged(); + this.OnPropertyChanged("Tag"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Tag; + partial void OnTagChanging(string value); + partial void OnTagChanged(); + /// + /// There are no comments for Property ServiceTemplateId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ServiceTemplateId + { + get + { + return this._ServiceTemplateId; + } + set + { + this.OnServiceTemplateIdChanging(value); + this._ServiceTemplateId = value; + this.OnServiceTemplateIdChanged(); + this.OnPropertyChanged("ServiceTemplateId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ServiceTemplateId; + partial void OnServiceTemplateIdChanging(global::System.Nullable value); + partial void OnServiceTemplateIdChanged(); + /// + /// There are no comments for Property FailedJobID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable FailedJobID + { + get + { + return this._FailedJobID; + } + set + { + this.OnFailedJobIDChanging(value); + this._FailedJobID = value; + this.OnFailedJobIDChanged(); + this.OnPropertyChanged("FailedJobID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _FailedJobID; + partial void OnFailedJobIDChanging(global::System.Nullable value); + partial void OnFailedJobIDChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.VMNetwork in the schema. + /// + /// + /// ID + /// StampId + /// + [global::System.Data.Services.Common.EntitySetAttribute("VMNetworks")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ID", "StampId")] + public partial class VMNetwork : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new VMNetwork object. + /// + /// Initial value of StampId. + /// Initial value of ID. + /// Initial value of GrantedToList. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static VMNetwork CreateVMNetwork(global::System.Guid stampId, global::System.Guid ID, global::System.Collections.ObjectModel.ObservableCollection grantedToList) + { + VMNetwork vMNetwork = new VMNetwork(); + vMNetwork.StampId = stampId; + vMNetwork.ID = ID; + if ((grantedToList == null)) + { + throw new global::System.ArgumentNullException("grantedToList"); + } + vMNetwork.GrantedToList = grantedToList; + return vMNetwork; + } + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this._ID = value; + this.OnIDChanged(); + this.OnPropertyChanged("ID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ID; + partial void OnIDChanging(global::System.Guid value); + partial void OnIDChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property ExternalName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ExternalName + { + get + { + return this._ExternalName; + } + set + { + this.OnExternalNameChanging(value); + this._ExternalName = value; + this.OnExternalNameChanged(); + this.OnPropertyChanged("ExternalName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ExternalName; + partial void OnExternalNameChanging(string value); + partial void OnExternalNameChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property IsolationType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string IsolationType + { + get + { + return this._IsolationType; + } + set + { + this.OnIsolationTypeChanging(value); + this._IsolationType = value; + this.OnIsolationTypeChanged(); + this.OnPropertyChanged("IsolationType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _IsolationType; + partial void OnIsolationTypeChanging(string value); + partial void OnIsolationTypeChanged(); + /// + /// There are no comments for Property PAIPAddressPoolType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string PAIPAddressPoolType + { + get + { + return this._PAIPAddressPoolType; + } + set + { + this.OnPAIPAddressPoolTypeChanging(value); + this._PAIPAddressPoolType = value; + this.OnPAIPAddressPoolTypeChanged(); + this.OnPropertyChanged("PAIPAddressPoolType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _PAIPAddressPoolType; + partial void OnPAIPAddressPoolTypeChanging(string value); + partial void OnPAIPAddressPoolTypeChanged(); + /// + /// There are no comments for Property CAIPAddressPoolType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string CAIPAddressPoolType + { + get + { + return this._CAIPAddressPoolType; + } + set + { + this.OnCAIPAddressPoolTypeChanging(value); + this._CAIPAddressPoolType = value; + this.OnCAIPAddressPoolTypeChanged(); + this.OnPropertyChanged("CAIPAddressPoolType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _CAIPAddressPoolType; + partial void OnCAIPAddressPoolTypeChanging(string value); + partial void OnCAIPAddressPoolTypeChanged(); + /// + /// There are no comments for Property Owner in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public UserAndRole Owner + { + get + { + if (((this._Owner == null) + && (this._OwnerInitialized != true))) + { + this._Owner = new UserAndRole(); + this._OwnerInitialized = true; + } + return this._Owner; + } + set + { + this.OnOwnerChanging(value); + this._Owner = value; + this._OwnerInitialized = true; + this.OnOwnerChanged(); + this.OnPropertyChanged("Owner"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private UserAndRole _Owner; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _OwnerInitialized; + partial void OnOwnerChanging(UserAndRole value); + partial void OnOwnerChanged(); + /// + /// There are no comments for Property GrantedToList in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection GrantedToList + { + get + { + return this._GrantedToList; + } + set + { + this.OnGrantedToListChanging(value); + this._GrantedToList = value; + this.OnGrantedToListChanged(); + this.OnPropertyChanged("GrantedToList"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _GrantedToList = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnGrantedToListChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnGrantedToListChanged(); + /// + /// There are no comments for Property LogicalNetworkId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable LogicalNetworkId + { + get + { + return this._LogicalNetworkId; + } + set + { + this.OnLogicalNetworkIdChanging(value); + this._LogicalNetworkId = value; + this.OnLogicalNetworkIdChanged(); + this.OnPropertyChanged("LogicalNetworkId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _LogicalNetworkId; + partial void OnLogicalNetworkIdChanging(global::System.Nullable value); + partial void OnLogicalNetworkIdChanged(); + /// + /// There are no comments for Property LogicalNetworkName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string LogicalNetworkName + { + get + { + return this._LogicalNetworkName; + } + set + { + this.OnLogicalNetworkNameChanging(value); + this._LogicalNetworkName = value; + this.OnLogicalNetworkNameChanged(); + this.OnPropertyChanged("LogicalNetworkName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _LogicalNetworkName; + partial void OnLogicalNetworkNameChanging(string value); + partial void OnLogicalNetworkNameChanged(); + /// + /// There are no comments for Property AutoCreateSubnet in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable AutoCreateSubnet + { + get + { + return this._AutoCreateSubnet; + } + set + { + this.OnAutoCreateSubnetChanging(value); + this._AutoCreateSubnet = value; + this.OnAutoCreateSubnetChanged(); + this.OnPropertyChanged("AutoCreateSubnet"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _AutoCreateSubnet; + partial void OnAutoCreateSubnetChanging(global::System.Nullable value); + partial void OnAutoCreateSubnetChanged(); + /// + /// There are no comments for Property IsAssigned in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsAssigned + { + get + { + return this._IsAssigned; + } + set + { + this.OnIsAssignedChanging(value); + this._IsAssigned = value; + this.OnIsAssignedChanged(); + this.OnPropertyChanged("IsAssigned"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsAssigned; + partial void OnIsAssignedChanging(global::System.Nullable value); + partial void OnIsAssignedChanged(); + /// + /// There are no comments for Property Enabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Enabled + { + get + { + return this._Enabled; + } + set + { + this.OnEnabledChanging(value); + this._Enabled = value; + this.OnEnabledChanged(); + this.OnPropertyChanged("Enabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Enabled; + partial void OnEnabledChanging(global::System.Nullable value); + partial void OnEnabledChanged(); + /// + /// There are no comments for Property AddedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable AddedTime + { + get + { + return this._AddedTime; + } + set + { + this.OnAddedTimeChanging(value); + this._AddedTime = value; + this.OnAddedTimeChanged(); + this.OnPropertyChanged("AddedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _AddedTime; + partial void OnAddedTimeChanging(global::System.Nullable value); + partial void OnAddedTimeChanged(); + /// + /// There are no comments for Property ModifiedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ModifiedTime + { + get + { + return this._ModifiedTime; + } + set + { + this.OnModifiedTimeChanging(value); + this._ModifiedTime = value; + this.OnModifiedTimeChanged(); + this.OnPropertyChanged("ModifiedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ModifiedTime; + partial void OnModifiedTimeChanging(global::System.Nullable value); + partial void OnModifiedTimeChanged(); + /// + /// There are no comments for Property PROTipID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable PROTipID + { + get + { + return this._PROTipID; + } + set + { + this.OnPROTipIDChanging(value); + this._PROTipID = value; + this.OnPROTipIDChanged(); + this.OnPropertyChanged("PROTipID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _PROTipID; + partial void OnPROTipIDChanging(global::System.Nullable value); + partial void OnPROTipIDChanged(); + /// + /// There are no comments for Property RoutingDomainId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable RoutingDomainId + { + get + { + return this._RoutingDomainId; + } + set + { + this.OnRoutingDomainIdChanging(value); + this._RoutingDomainId = value; + this.OnRoutingDomainIdChanged(); + this.OnPropertyChanged("RoutingDomainId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _RoutingDomainId; + partial void OnRoutingDomainIdChanging(global::System.Nullable value); + partial void OnRoutingDomainIdChanged(); + /// + /// There are no comments for MostRecentTask in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public Job MostRecentTask + { + get + { + return this._MostRecentTask; + } + set + { + this._MostRecentTask = value; + this.OnPropertyChanged("MostRecentTask"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private Job _MostRecentTask; + /// + /// There are no comments for VMNetworkGateways in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection VMNetworkGateways + { + get + { + return this._VMNetworkGateways; + } + set + { + this._VMNetworkGateways = value; + this.OnPropertyChanged("VMNetworkGateways"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _VMNetworkGateways = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.QuotaAndUsageComponent in the schema. + /// + /// + /// ID + /// QuotaDimension + /// StampId + /// + [global::System.Data.Services.Common.EntitySetAttribute("QuotaAndUsageComponents")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ID", "QuotaDimension", "StampId")] + public partial class QuotaAndUsageComponent : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new QuotaAndUsageComponent object. + /// + /// Initial value of StampId. + /// Initial value of ID. + /// Initial value of QuotaDimension. + /// Initial value of UserRoleUsage. + /// Initial value of UserUsage. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static QuotaAndUsageComponent CreateQuotaAndUsageComponent(global::System.Guid stampId, global::System.Guid ID, string quotaDimension, int userRoleUsage, int userUsage) + { + QuotaAndUsageComponent quotaAndUsageComponent = new QuotaAndUsageComponent(); + quotaAndUsageComponent.StampId = stampId; + quotaAndUsageComponent.ID = ID; + quotaAndUsageComponent.QuotaDimension = quotaDimension; + quotaAndUsageComponent.UserRoleUsage = userRoleUsage; + quotaAndUsageComponent.UserUsage = userUsage; + return quotaAndUsageComponent; + } + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this._ID = value; + this.OnIDChanged(); + this.OnPropertyChanged("ID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ID; + partial void OnIDChanging(global::System.Guid value); + partial void OnIDChanged(); + /// + /// There are no comments for Property UserRoleID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UserRoleID + { + get + { + return this._UserRoleID; + } + set + { + this.OnUserRoleIDChanging(value); + this._UserRoleID = value; + this.OnUserRoleIDChanged(); + this.OnPropertyChanged("UserRoleID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UserRoleID; + partial void OnUserRoleIDChanging(global::System.Nullable value); + partial void OnUserRoleIDChanged(); + /// + /// There are no comments for Property QuotaDimension in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string QuotaDimension + { + get + { + return this._QuotaDimension; + } + set + { + this.OnQuotaDimensionChanging(value); + this._QuotaDimension = value; + this.OnQuotaDimensionChanged(); + this.OnPropertyChanged("QuotaDimension"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _QuotaDimension; + partial void OnQuotaDimensionChanging(string value); + partial void OnQuotaDimensionChanged(); + /// + /// There are no comments for Property UserRoleQuota in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UserRoleQuota + { + get + { + return this._UserRoleQuota; + } + set + { + this.OnUserRoleQuotaChanging(value); + this._UserRoleQuota = value; + this.OnUserRoleQuotaChanged(); + this.OnPropertyChanged("UserRoleQuota"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UserRoleQuota; + partial void OnUserRoleQuotaChanging(global::System.Nullable value); + partial void OnUserRoleQuotaChanged(); + /// + /// There are no comments for Property UserRoleUsage in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public int UserRoleUsage + { + get + { + return this._UserRoleUsage; + } + set + { + this.OnUserRoleUsageChanging(value); + this._UserRoleUsage = value; + this.OnUserRoleUsageChanged(); + this.OnPropertyChanged("UserRoleUsage"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private int _UserRoleUsage; + partial void OnUserRoleUsageChanging(int value); + partial void OnUserRoleUsageChanged(); + /// + /// There are no comments for Property UserQuota in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UserQuota + { + get + { + return this._UserQuota; + } + set + { + this.OnUserQuotaChanging(value); + this._UserQuota = value; + this.OnUserQuotaChanged(); + this.OnPropertyChanged("UserQuota"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UserQuota; + partial void OnUserQuotaChanging(global::System.Nullable value); + partial void OnUserQuotaChanged(); + /// + /// There are no comments for Property UserUsage in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public int UserUsage + { + get + { + return this._UserUsage; + } + set + { + this.OnUserUsageChanging(value); + this._UserUsage = value; + this.OnUserUsageChanged(); + this.OnPropertyChanged("UserUsage"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private int _UserUsage; + partial void OnUserUsageChanging(int value); + partial void OnUserUsageChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.StaticIPAddressPool in the schema. + /// + /// + /// ID + /// StampId + /// + [global::System.Data.Services.Common.EntitySetAttribute("StaticIPAddressPools")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ID", "StampId")] + public partial class StaticIPAddressPool : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new StaticIPAddressPool object. + /// + /// Initial value of DNSSearchSuffixes. + /// Initial value of DNSServers. + /// Initial value of WINSServers. + /// Initial value of DefaultGatewayIPAddresses. + /// Initial value of StampId. + /// Initial value of ID. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static StaticIPAddressPool CreateStaticIPAddressPool(global::System.Collections.ObjectModel.ObservableCollection dNSSearchSuffixes, global::System.Collections.ObjectModel.ObservableCollection dNSServers, global::System.Collections.ObjectModel.ObservableCollection wINSServers, global::System.Collections.ObjectModel.ObservableCollection defaultGatewayIPAddresses, global::System.Guid stampId, global::System.Guid ID) + { + StaticIPAddressPool staticIPAddressPool = new StaticIPAddressPool(); + if ((dNSSearchSuffixes == null)) + { + throw new global::System.ArgumentNullException("dNSSearchSuffixes"); + } + staticIPAddressPool.DNSSearchSuffixes = dNSSearchSuffixes; + if ((dNSServers == null)) + { + throw new global::System.ArgumentNullException("dNSServers"); + } + staticIPAddressPool.DNSServers = dNSServers; + if ((wINSServers == null)) + { + throw new global::System.ArgumentNullException("wINSServers"); + } + staticIPAddressPool.WINSServers = wINSServers; + if ((defaultGatewayIPAddresses == null)) + { + throw new global::System.ArgumentNullException("defaultGatewayIPAddresses"); + } + staticIPAddressPool.DefaultGatewayIPAddresses = defaultGatewayIPAddresses; + staticIPAddressPool.StampId = stampId; + staticIPAddressPool.ID = ID; + return staticIPAddressPool; + } + /// + /// There are no comments for Property EnableNetBIOS in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable EnableNetBIOS + { + get + { + return this._EnableNetBIOS; + } + set + { + this.OnEnableNetBIOSChanging(value); + this._EnableNetBIOS = value; + this.OnEnableNetBIOSChanged(); + this.OnPropertyChanged("EnableNetBIOS"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _EnableNetBIOS; + partial void OnEnableNetBIOSChanging(global::System.Nullable value); + partial void OnEnableNetBIOSChanged(); + /// + /// There are no comments for Property IsFullyCached in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsFullyCached + { + get + { + return this._IsFullyCached; + } + set + { + this.OnIsFullyCachedChanging(value); + this._IsFullyCached = value; + this.OnIsFullyCachedChanged(); + this.OnPropertyChanged("IsFullyCached"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsFullyCached; + partial void OnIsFullyCachedChanging(global::System.Nullable value); + partial void OnIsFullyCachedChanged(); + /// + /// There are no comments for Property IsIPv4 in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsIPv4 + { + get + { + return this._IsIPv4; + } + set + { + this.OnIsIPv4Changing(value); + this._IsIPv4 = value; + this.OnIsIPv4Changed(); + this.OnPropertyChanged("IsIPv4"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsIPv4; + partial void OnIsIPv4Changing(global::System.Nullable value); + partial void OnIsIPv4Changed(); + /// + /// There are no comments for Property IsMulticastPool in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsMulticastPool + { + get + { + return this._IsMulticastPool; + } + set + { + this.OnIsMulticastPoolChanging(value); + this._IsMulticastPool = value; + this.OnIsMulticastPoolChanged(); + this.OnPropertyChanged("IsMulticastPool"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsMulticastPool; + partial void OnIsMulticastPoolChanging(global::System.Nullable value); + partial void OnIsMulticastPoolChanged(); + /// + /// There are no comments for Property IsViewOnly in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsViewOnly + { + get + { + return this._IsViewOnly; + } + set + { + this.OnIsViewOnlyChanging(value); + this._IsViewOnly = value; + this.OnIsViewOnlyChanged(); + this.OnPropertyChanged("IsViewOnly"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsViewOnly; + partial void OnIsViewOnlyChanging(global::System.Nullable value); + partial void OnIsViewOnlyChanged(); + /// + /// There are no comments for Property MarkedForDeletion in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MarkedForDeletion + { + get + { + return this._MarkedForDeletion; + } + set + { + this.OnMarkedForDeletionChanging(value); + this._MarkedForDeletion = value; + this.OnMarkedForDeletionChanged(); + this.OnPropertyChanged("MarkedForDeletion"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MarkedForDeletion; + partial void OnMarkedForDeletionChanging(global::System.Nullable value); + partial void OnMarkedForDeletionChanged(); + /// + /// There are no comments for Property ExternalSyncTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ExternalSyncTime + { + get + { + return this._ExternalSyncTime; + } + set + { + this.OnExternalSyncTimeChanging(value); + this._ExternalSyncTime = value; + this.OnExternalSyncTimeChanged(); + this.OnPropertyChanged("ExternalSyncTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ExternalSyncTime; + partial void OnExternalSyncTimeChanging(global::System.Nullable value); + partial void OnExternalSyncTimeChanged(); + /// + /// There are no comments for Property VLanID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VLanID + { + get + { + return this._VLanID; + } + set + { + this.OnVLanIDChanging(value); + this._VLanID = value; + this.OnVLanIDChanged(); + this.OnPropertyChanged("VLanID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VLanID; + partial void OnVLanIDChanging(global::System.Nullable value); + partial void OnVLanIDChanged(); + /// + /// There are no comments for Property AvailableAddresses in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable AvailableAddresses + { + get + { + return this._AvailableAddresses; + } + set + { + this.OnAvailableAddressesChanging(value); + this._AvailableAddresses = value; + this.OnAvailableAddressesChanged(); + this.OnPropertyChanged("AvailableAddresses"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _AvailableAddresses; + partial void OnAvailableAddressesChanging(global::System.Nullable value); + partial void OnAvailableAddressesChanged(); + /// + /// There are no comments for Property AvailableDIPAddresses in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable AvailableDIPAddresses + { + get + { + return this._AvailableDIPAddresses; + } + set + { + this.OnAvailableDIPAddressesChanging(value); + this._AvailableDIPAddresses = value; + this.OnAvailableDIPAddressesChanged(); + this.OnPropertyChanged("AvailableDIPAddresses"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _AvailableDIPAddresses; + partial void OnAvailableDIPAddressesChanging(global::System.Nullable value); + partial void OnAvailableDIPAddressesChanged(); + /// + /// There are no comments for Property AvailableVIPAddresses in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable AvailableVIPAddresses + { + get + { + return this._AvailableVIPAddresses; + } + set + { + this.OnAvailableVIPAddressesChanging(value); + this._AvailableVIPAddresses = value; + this.OnAvailableVIPAddressesChanged(); + this.OnPropertyChanged("AvailableVIPAddresses"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _AvailableVIPAddresses; + partial void OnAvailableVIPAddressesChanging(global::System.Nullable value); + partial void OnAvailableVIPAddressesChanged(); + /// + /// There are no comments for Property ReservedAddresses in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ReservedAddresses + { + get + { + return this._ReservedAddresses; + } + set + { + this.OnReservedAddressesChanging(value); + this._ReservedAddresses = value; + this.OnReservedAddressesChanged(); + this.OnPropertyChanged("ReservedAddresses"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ReservedAddresses; + partial void OnReservedAddressesChanging(global::System.Nullable value); + partial void OnReservedAddressesChanged(); + /// + /// There are no comments for Property TotalAddresses in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable TotalAddresses + { + get + { + return this._TotalAddresses; + } + set + { + this.OnTotalAddressesChanging(value); + this._TotalAddresses = value; + this.OnTotalAddressesChanged(); + this.OnPropertyChanged("TotalAddresses"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _TotalAddresses; + partial void OnTotalAddressesChanging(global::System.Nullable value); + partial void OnTotalAddressesChanged(); + /// + /// There are no comments for Property TotalDIPAddresses in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable TotalDIPAddresses + { + get + { + return this._TotalDIPAddresses; + } + set + { + this.OnTotalDIPAddressesChanging(value); + this._TotalDIPAddresses = value; + this.OnTotalDIPAddressesChanged(); + this.OnPropertyChanged("TotalDIPAddresses"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _TotalDIPAddresses; + partial void OnTotalDIPAddressesChanging(global::System.Nullable value); + partial void OnTotalDIPAddressesChanged(); + /// + /// There are no comments for Property TotalVIPAddresses in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable TotalVIPAddresses + { + get + { + return this._TotalVIPAddresses; + } + set + { + this.OnTotalVIPAddressesChanging(value); + this._TotalVIPAddresses = value; + this.OnTotalVIPAddressesChanged(); + this.OnPropertyChanged("TotalVIPAddresses"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _TotalVIPAddresses; + partial void OnTotalVIPAddressesChanging(global::System.Nullable value); + partial void OnTotalVIPAddressesChanged(); + /// + /// There are no comments for Property UnassignedAddresses in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UnassignedAddresses + { + get + { + return this._UnassignedAddresses; + } + set + { + this.OnUnassignedAddressesChanging(value); + this._UnassignedAddresses = value; + this.OnUnassignedAddressesChanged(); + this.OnPropertyChanged("UnassignedAddresses"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UnassignedAddresses; + partial void OnUnassignedAddressesChanging(global::System.Nullable value); + partial void OnUnassignedAddressesChanged(); + /// + /// There are no comments for Property UnassignedDIPAddresses in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UnassignedDIPAddresses + { + get + { + return this._UnassignedDIPAddresses; + } + set + { + this.OnUnassignedDIPAddressesChanging(value); + this._UnassignedDIPAddresses = value; + this.OnUnassignedDIPAddressesChanged(); + this.OnPropertyChanged("UnassignedDIPAddresses"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UnassignedDIPAddresses; + partial void OnUnassignedDIPAddressesChanging(global::System.Nullable value); + partial void OnUnassignedDIPAddressesChanged(); + /// + /// There are no comments for Property UnassignedVIPAddresses in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UnassignedVIPAddresses + { + get + { + return this._UnassignedVIPAddresses; + } + set + { + this.OnUnassignedVIPAddressesChanging(value); + this._UnassignedVIPAddresses = value; + this.OnUnassignedVIPAddressesChanged(); + this.OnPropertyChanged("UnassignedVIPAddresses"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UnassignedVIPAddresses; + partial void OnUnassignedVIPAddressesChanging(global::System.Nullable value); + partial void OnUnassignedVIPAddressesChanged(); + /// + /// There are no comments for Property AddressFamily in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string AddressFamily + { + get + { + return this._AddressFamily; + } + set + { + this.OnAddressFamilyChanging(value); + this._AddressFamily = value; + this.OnAddressFamilyChanged(); + this.OnPropertyChanged("AddressFamily"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _AddressFamily; + partial void OnAddressFamilyChanging(string value); + partial void OnAddressFamilyChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property DNSSuffix in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DNSSuffix + { + get + { + return this._DNSSuffix; + } + set + { + this.OnDNSSuffixChanging(value); + this._DNSSuffix = value; + this.OnDNSSuffixChanged(); + this.OnPropertyChanged("DNSSuffix"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DNSSuffix; + partial void OnDNSSuffixChanging(string value); + partial void OnDNSSuffixChanged(); + /// + /// There are no comments for Property IPAddressRangeEnd in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string IPAddressRangeEnd + { + get + { + return this._IPAddressRangeEnd; + } + set + { + this.OnIPAddressRangeEndChanging(value); + this._IPAddressRangeEnd = value; + this.OnIPAddressRangeEndChanged(); + this.OnPropertyChanged("IPAddressRangeEnd"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _IPAddressRangeEnd; + partial void OnIPAddressRangeEndChanging(string value); + partial void OnIPAddressRangeEndChanged(); + /// + /// There are no comments for Property IPAddressRangeStart in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string IPAddressRangeStart + { + get + { + return this._IPAddressRangeStart; + } + set + { + this.OnIPAddressRangeStartChanging(value); + this._IPAddressRangeStart = value; + this.OnIPAddressRangeStartChanged(); + this.OnPropertyChanged("IPAddressRangeStart"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _IPAddressRangeStart; + partial void OnIPAddressRangeStartChanging(string value); + partial void OnIPAddressRangeStartChanged(); + /// + /// There are no comments for Property IPAddressReservedSet in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string IPAddressReservedSet + { + get + { + return this._IPAddressReservedSet; + } + set + { + this.OnIPAddressReservedSetChanging(value); + this._IPAddressReservedSet = value; + this.OnIPAddressReservedSetChanged(); + this.OnPropertyChanged("IPAddressReservedSet"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _IPAddressReservedSet; + partial void OnIPAddressReservedSetChanging(string value); + partial void OnIPAddressReservedSetChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property Subnet in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Subnet + { + get + { + return this._Subnet; + } + set + { + this.OnSubnetChanging(value); + this._Subnet = value; + this.OnSubnetChanged(); + this.OnPropertyChanged("Subnet"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Subnet; + partial void OnSubnetChanging(string value); + partial void OnSubnetChanged(); + /// + /// There are no comments for Property VIPAddressSet in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string VIPAddressSet + { + get + { + return this._VIPAddressSet; + } + set + { + this.OnVIPAddressSetChanging(value); + this._VIPAddressSet = value; + this.OnVIPAddressSetChanged(); + this.OnPropertyChanged("VIPAddressSet"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _VIPAddressSet; + partial void OnVIPAddressSetChanging(string value); + partial void OnVIPAddressSetChanged(); + /// + /// There are no comments for Property NetworkEntityAccessType in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string NetworkEntityAccessType + { + get + { + return this._NetworkEntityAccessType; + } + set + { + this.OnNetworkEntityAccessTypeChanging(value); + this._NetworkEntityAccessType = value; + this.OnNetworkEntityAccessTypeChanged(); + this.OnPropertyChanged("NetworkEntityAccessType"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _NetworkEntityAccessType; + partial void OnNetworkEntityAccessTypeChanging(string value); + partial void OnNetworkEntityAccessTypeChanged(); + /// + /// There are no comments for Property DNSSearchSuffixes in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection DNSSearchSuffixes + { + get + { + return this._DNSSearchSuffixes; + } + set + { + this.OnDNSSearchSuffixesChanging(value); + this._DNSSearchSuffixes = value; + this.OnDNSSearchSuffixesChanged(); + this.OnPropertyChanged("DNSSearchSuffixes"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _DNSSearchSuffixes = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnDNSSearchSuffixesChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnDNSSearchSuffixesChanged(); + /// + /// There are no comments for Property DNSServers in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection DNSServers + { + get + { + return this._DNSServers; + } + set + { + this.OnDNSServersChanging(value); + this._DNSServers = value; + this.OnDNSServersChanged(); + this.OnPropertyChanged("DNSServers"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _DNSServers = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnDNSServersChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnDNSServersChanged(); + /// + /// There are no comments for Property WINSServers in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection WINSServers + { + get + { + return this._WINSServers; + } + set + { + this.OnWINSServersChanging(value); + this._WINSServers = value; + this.OnWINSServersChanged(); + this.OnPropertyChanged("WINSServers"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _WINSServers = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnWINSServersChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnWINSServersChanged(); + /// + /// There are no comments for Property DefaultGatewayIPAddresses in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection DefaultGatewayIPAddresses + { + get + { + return this._DefaultGatewayIPAddresses; + } + set + { + this.OnDefaultGatewayIPAddressesChanging(value); + this._DefaultGatewayIPAddresses = value; + this.OnDefaultGatewayIPAddressesChanged(); + this.OnPropertyChanged("DefaultGatewayIPAddresses"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _DefaultGatewayIPAddresses = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnDefaultGatewayIPAddressesChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnDefaultGatewayIPAddressesChanged(); + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this._ID = value; + this.OnIDChanged(); + this.OnPropertyChanged("ID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ID; + partial void OnIDChanging(global::System.Guid value); + partial void OnIDChanged(); + /// + /// There are no comments for Property ExternalId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ExternalId + { + get + { + return this._ExternalId; + } + set + { + this.OnExternalIdChanging(value); + this._ExternalId = value; + this.OnExternalIdChanged(); + this.OnPropertyChanged("ExternalId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ExternalId; + partial void OnExternalIdChanging(global::System.Nullable value); + partial void OnExternalIdChanged(); + /// + /// There are no comments for Property VMSubnetId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VMSubnetId + { + get + { + return this._VMSubnetId; + } + set + { + this.OnVMSubnetIdChanging(value); + this._VMSubnetId = value; + this.OnVMSubnetIdChanged(); + this.OnPropertyChanged("VMSubnetId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VMSubnetId; + partial void OnVMSubnetIdChanging(global::System.Nullable value); + partial void OnVMSubnetIdChanged(); + /// + /// There are no comments for Property LogicalNetworkDefinitionId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable LogicalNetworkDefinitionId + { + get + { + return this._LogicalNetworkDefinitionId; + } + set + { + this.OnLogicalNetworkDefinitionIdChanging(value); + this._LogicalNetworkDefinitionId = value; + this.OnLogicalNetworkDefinitionIdChanged(); + this.OnPropertyChanged("LogicalNetworkDefinitionId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _LogicalNetworkDefinitionId; + partial void OnLogicalNetworkDefinitionIdChanging(global::System.Nullable value); + partial void OnLogicalNetworkDefinitionIdChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.VMSubnet in the schema. + /// + /// + /// ID + /// StampId + /// + [global::System.Data.Services.Common.EntitySetAttribute("VMSubnets")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ID", "StampId")] + public partial class VMSubnet : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new VMSubnet object. + /// + /// Initial value of StampId. + /// Initial value of ID. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static VMSubnet CreateVMSubnet(global::System.Guid stampId, global::System.Guid ID) + { + VMSubnet vMSubnet = new VMSubnet(); + vMSubnet.StampId = stampId; + vMSubnet.ID = ID; + return vMSubnet; + } + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property Subnet in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Subnet + { + get + { + return this._Subnet; + } + set + { + this.OnSubnetChanging(value); + this._Subnet = value; + this.OnSubnetChanged(); + this.OnPropertyChanged("Subnet"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Subnet; + partial void OnSubnetChanging(string value); + partial void OnSubnetChanged(); + /// + /// There are no comments for Property VMNetworkName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string VMNetworkName + { + get + { + return this._VMNetworkName; + } + set + { + this.OnVMNetworkNameChanging(value); + this._VMNetworkName = value; + this.OnVMNetworkNameChanged(); + this.OnPropertyChanged("VMNetworkName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _VMNetworkName; + partial void OnVMNetworkNameChanging(string value); + partial void OnVMNetworkNameChanged(); + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this._ID = value; + this.OnIDChanged(); + this.OnPropertyChanged("ID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ID; + partial void OnIDChanging(global::System.Guid value); + partial void OnIDChanged(); + /// + /// There are no comments for Property VMNetworkId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VMNetworkId + { + get + { + return this._VMNetworkId; + } + set + { + this.OnVMNetworkIdChanging(value); + this._VMNetworkId = value; + this.OnVMNetworkIdChanged(); + this.OnPropertyChanged("VMNetworkId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VMNetworkId; + partial void OnVMNetworkIdChanging(global::System.Nullable value); + partial void OnVMNetworkIdChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.HardwareProfile in the schema. + /// + /// + /// ID + /// StampId + /// + [global::System.Data.Services.Common.EntitySetAttribute("HardwareProfiles")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ID", "StampId")] + public partial class HardwareProfile : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new HardwareProfile object. + /// + /// Initial value of StampId. + /// Initial value of ID. + /// Initial value of GrantedToList. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static HardwareProfile CreateHardwareProfile(global::System.Guid stampId, global::System.Guid ID, global::System.Collections.ObjectModel.ObservableCollection grantedToList) + { + HardwareProfile hardwareProfile = new HardwareProfile(); + hardwareProfile.StampId = stampId; + hardwareProfile.ID = ID; + if ((grantedToList == null)) + { + throw new global::System.ArgumentNullException("grantedToList"); + } + hardwareProfile.GrantedToList = grantedToList; + return hardwareProfile; + } + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this._ID = value; + this.OnIDChanged(); + this.OnPropertyChanged("ID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ID; + partial void OnIDChanging(global::System.Guid value); + partial void OnIDChanged(); + /// + /// There are no comments for Property AccessedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable AccessedTime + { + get + { + return this._AccessedTime; + } + set + { + this.OnAccessedTimeChanging(value); + this._AccessedTime = value; + this.OnAccessedTimeChanged(); + this.OnPropertyChanged("AccessedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _AccessedTime; + partial void OnAccessedTimeChanging(global::System.Nullable value); + partial void OnAccessedTimeChanged(); + /// + /// There are no comments for Property AddedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable AddedTime + { + get + { + return this._AddedTime; + } + set + { + this.OnAddedTimeChanging(value); + this._AddedTime = value; + this.OnAddedTimeChanged(); + this.OnPropertyChanged("AddedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _AddedTime; + partial void OnAddedTimeChanging(global::System.Nullable value); + partial void OnAddedTimeChanged(); + /// + /// There are no comments for Property CPUCount in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CPUCount + { + get + { + return this._CPUCount; + } + set + { + this.OnCPUCountChanging(value); + this._CPUCount = value; + this.OnCPUCountChanged(); + this.OnPropertyChanged("CPUCount"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CPUCount; + partial void OnCPUCountChanging(global::System.Nullable value); + partial void OnCPUCountChanged(); + /// + /// There are no comments for Property CPUMax in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CPUMax + { + get + { + return this._CPUMax; + } + set + { + this.OnCPUMaxChanging(value); + this._CPUMax = value; + this.OnCPUMaxChanged(); + this.OnPropertyChanged("CPUMax"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CPUMax; + partial void OnCPUMaxChanging(global::System.Nullable value); + partial void OnCPUMaxChanged(); + /// + /// There are no comments for Property CPUReserve in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CPUReserve + { + get + { + return this._CPUReserve; + } + set + { + this.OnCPUReserveChanging(value); + this._CPUReserve = value; + this.OnCPUReserveChanged(); + this.OnPropertyChanged("CPUReserve"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CPUReserve; + partial void OnCPUReserveChanging(global::System.Nullable value); + partial void OnCPUReserveChanged(); + /// + /// There are no comments for Property CreationTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CreationTime + { + get + { + return this._CreationTime; + } + set + { + this.OnCreationTimeChanging(value); + this._CreationTime = value; + this.OnCreationTimeChanged(); + this.OnPropertyChanged("CreationTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CreationTime; + partial void OnCreationTimeChanging(global::System.Nullable value); + partial void OnCreationTimeChanged(); + /// + /// There are no comments for Property DiskIO in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable DiskIO + { + get + { + return this._DiskIO; + } + set + { + this.OnDiskIOChanging(value); + this._DiskIO = value; + this.OnDiskIOChanged(); + this.OnPropertyChanged("DiskIO"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _DiskIO; + partial void OnDiskIOChanging(global::System.Nullable value); + partial void OnDiskIOChanged(); + /// + /// There are no comments for Property ExpectedCPUUtilization in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ExpectedCPUUtilization + { + get + { + return this._ExpectedCPUUtilization; + } + set + { + this.OnExpectedCPUUtilizationChanging(value); + this._ExpectedCPUUtilization = value; + this.OnExpectedCPUUtilizationChanged(); + this.OnPropertyChanged("ExpectedCPUUtilization"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ExpectedCPUUtilization; + partial void OnExpectedCPUUtilizationChanging(global::System.Nullable value); + partial void OnExpectedCPUUtilizationChanged(); + /// + /// There are no comments for Property Enabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Enabled + { + get + { + return this._Enabled; + } + set + { + this.OnEnabledChanging(value); + this._Enabled = value; + this.OnEnabledChanged(); + this.OnPropertyChanged("Enabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Enabled; + partial void OnEnabledChanging(global::System.Nullable value); + partial void OnEnabledChanged(); + /// + /// There are no comments for Property LimitCPUForMigration in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable LimitCPUForMigration + { + get + { + return this._LimitCPUForMigration; + } + set + { + this.OnLimitCPUForMigrationChanging(value); + this._LimitCPUForMigration = value; + this.OnLimitCPUForMigrationChanged(); + this.OnPropertyChanged("LimitCPUForMigration"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _LimitCPUForMigration; + partial void OnLimitCPUForMigrationChanging(global::System.Nullable value); + partial void OnLimitCPUForMigrationChanged(); + /// + /// There are no comments for Property LimitCPUFunctionality in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable LimitCPUFunctionality + { + get + { + return this._LimitCPUFunctionality; + } + set + { + this.OnLimitCPUFunctionalityChanging(value); + this._LimitCPUFunctionality = value; + this.OnLimitCPUFunctionalityChanged(); + this.OnPropertyChanged("LimitCPUFunctionality"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _LimitCPUFunctionality; + partial void OnLimitCPUFunctionalityChanging(global::System.Nullable value); + partial void OnLimitCPUFunctionalityChanged(); + /// + /// There are no comments for Property Memory in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Memory + { + get + { + return this._Memory; + } + set + { + this.OnMemoryChanging(value); + this._Memory = value; + this.OnMemoryChanged(); + this.OnPropertyChanged("Memory"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Memory; + partial void OnMemoryChanging(global::System.Nullable value); + partial void OnMemoryChanged(); + /// + /// There are no comments for Property ModifiedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ModifiedTime + { + get + { + return this._ModifiedTime; + } + set + { + this.OnModifiedTimeChanging(value); + this._ModifiedTime = value; + this.OnModifiedTimeChanged(); + this.OnPropertyChanged("ModifiedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ModifiedTime; + partial void OnModifiedTimeChanging(global::System.Nullable value); + partial void OnModifiedTimeChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property NetworkUtilization in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable NetworkUtilization + { + get + { + return this._NetworkUtilization; + } + set + { + this.OnNetworkUtilizationChanging(value); + this._NetworkUtilization = value; + this.OnNetworkUtilizationChanged(); + this.OnPropertyChanged("NetworkUtilization"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _NetworkUtilization; + partial void OnNetworkUtilizationChanging(global::System.Nullable value); + partial void OnNetworkUtilizationChanged(); + /// + /// There are no comments for Property Owner in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public UserAndRole Owner + { + get + { + if (((this._Owner == null) + && (this._OwnerInitialized != true))) + { + this._Owner = new UserAndRole(); + this._OwnerInitialized = true; + } + return this._Owner; + } + set + { + this.OnOwnerChanging(value); + this._Owner = value; + this._OwnerInitialized = true; + this.OnOwnerChanged(); + this.OnPropertyChanged("Owner"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private UserAndRole _Owner; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _OwnerInitialized; + partial void OnOwnerChanging(UserAndRole value); + partial void OnOwnerChanged(); + /// + /// There are no comments for Property GrantedToList in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection GrantedToList + { + get + { + return this._GrantedToList; + } + set + { + this.OnGrantedToListChanging(value); + this._GrantedToList = value; + this.OnGrantedToListChanged(); + this.OnPropertyChanged("GrantedToList"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _GrantedToList = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnGrantedToListChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnGrantedToListChanged(); + /// + /// There are no comments for Property RelativeWeight in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable RelativeWeight + { + get + { + return this._RelativeWeight; + } + set + { + this.OnRelativeWeightChanging(value); + this._RelativeWeight = value; + this.OnRelativeWeightChanged(); + this.OnPropertyChanged("RelativeWeight"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _RelativeWeight; + partial void OnRelativeWeightChanging(global::System.Nullable value); + partial void OnRelativeWeightChanged(); + /// + /// There are no comments for Property ShareSCSIBus in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ShareSCSIBus + { + get + { + return this._ShareSCSIBus; + } + set + { + this.OnShareSCSIBusChanging(value); + this._ShareSCSIBus = value; + this.OnShareSCSIBusChanged(); + this.OnPropertyChanged("ShareSCSIBus"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ShareSCSIBus; + partial void OnShareSCSIBusChanging(global::System.Nullable value); + partial void OnShareSCSIBusChanged(); + /// + /// There are no comments for Property TotalVHDCapacity in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable TotalVHDCapacity + { + get + { + return this._TotalVHDCapacity; + } + set + { + this.OnTotalVHDCapacityChanging(value); + this._TotalVHDCapacity = value; + this.OnTotalVHDCapacityChanged(); + this.OnPropertyChanged("TotalVHDCapacity"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _TotalVHDCapacity; + partial void OnTotalVHDCapacityChanging(global::System.Nullable value); + partial void OnTotalVHDCapacityChanged(); + /// + /// There are no comments for Property UndoDisksEnabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UndoDisksEnabled + { + get + { + return this._UndoDisksEnabled; + } + set + { + this.OnUndoDisksEnabledChanging(value); + this._UndoDisksEnabled = value; + this.OnUndoDisksEnabledChanged(); + this.OnPropertyChanged("UndoDisksEnabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UndoDisksEnabled; + partial void OnUndoDisksEnabledChanging(global::System.Nullable value); + partial void OnUndoDisksEnabledChanged(); + /// + /// There are no comments for Property Accessibility in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Accessibility + { + get + { + return this._Accessibility; + } + set + { + this.OnAccessibilityChanging(value); + this._Accessibility = value; + this.OnAccessibilityChanged(); + this.OnPropertyChanged("Accessibility"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Accessibility; + partial void OnAccessibilityChanging(string value); + partial void OnAccessibilityChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property NumLockEnabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable NumLockEnabled + { + get + { + return this._NumLockEnabled; + } + set + { + this.OnNumLockEnabledChanging(value); + this._NumLockEnabled = value; + this.OnNumLockEnabledChanged(); + this.OnPropertyChanged("NumLockEnabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _NumLockEnabled; + partial void OnNumLockEnabledChanging(global::System.Nullable value); + partial void OnNumLockEnabledChanged(); + /// + /// There are no comments for Property Generation in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Generation + { + get + { + return this._Generation; + } + set + { + this.OnGenerationChanging(value); + this._Generation = value; + this.OnGenerationChanged(); + this.OnPropertyChanged("Generation"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Generation; + partial void OnGenerationChanging(global::System.Nullable value); + partial void OnGenerationChanged(); + /// + /// There are no comments for VirtualNetworkAdapters in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection VirtualNetworkAdapters + { + get + { + return this._VirtualNetworkAdapters; + } + set + { + this._VirtualNetworkAdapters = value; + this.OnPropertyChanged("VirtualNetworkAdapters"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _VirtualNetworkAdapters = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + /// + /// There are no comments for VirtualSCSIAdapters in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection VirtualSCSIAdapters + { + get + { + return this._VirtualSCSIAdapters; + } + set + { + this._VirtualSCSIAdapters = value; + this.OnPropertyChanged("VirtualSCSIAdapters"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _VirtualSCSIAdapters = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + /// + /// There are no comments for VirtualDVDDrives in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection VirtualDVDDrives + { + get + { + return this._VirtualDVDDrives; + } + set + { + this._VirtualDVDDrives = value; + this.OnPropertyChanged("VirtualDVDDrives"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _VirtualDVDDrives = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.RunAsAccount in the schema. + /// + /// + /// ID + /// StampId + /// + [global::System.Data.Services.Common.EntitySetAttribute("RunAsAccounts")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ID", "StampId")] + public partial class RunAsAccount : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new RunAsAccount object. + /// + /// Initial value of ID. + /// Initial value of StampId. + /// Initial value of GrantedToList. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static RunAsAccount CreateRunAsAccount(global::System.Guid ID, global::System.Guid stampId, global::System.Collections.ObjectModel.ObservableCollection grantedToList) + { + RunAsAccount runAsAccount = new RunAsAccount(); + runAsAccount.ID = ID; + runAsAccount.StampId = stampId; + if ((grantedToList == null)) + { + throw new global::System.ArgumentNullException("grantedToList"); + } + runAsAccount.GrantedToList = grantedToList; + return runAsAccount; + } + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this._ID = value; + this.OnIDChanged(); + this.OnPropertyChanged("ID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ID; + partial void OnIDChanging(global::System.Guid value); + partial void OnIDChanged(); + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property UserName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string UserName + { + get + { + return this._UserName; + } + set + { + this.OnUserNameChanging(value); + this._UserName = value; + this.OnUserNameChanged(); + this.OnPropertyChanged("UserName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _UserName; + partial void OnUserNameChanging(string value); + partial void OnUserNameChanged(); + /// + /// There are no comments for Property Password in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Password + { + get + { + return this._Password; + } + set + { + this.OnPasswordChanging(value); + this._Password = value; + this.OnPasswordChanged(); + this.OnPropertyChanged("Password"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Password; + partial void OnPasswordChanging(string value); + partial void OnPasswordChanged(); + /// + /// There are no comments for Property Domain in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Domain + { + get + { + return this._Domain; + } + set + { + this.OnDomainChanging(value); + this._Domain = value; + this.OnDomainChanged(); + this.OnPropertyChanged("Domain"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Domain; + partial void OnDomainChanging(string value); + partial void OnDomainChanged(); + /// + /// There are no comments for Property Enabled in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Enabled + { + get + { + return this._Enabled; + } + set + { + this.OnEnabledChanging(value); + this._Enabled = value; + this.OnEnabledChanged(); + this.OnPropertyChanged("Enabled"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Enabled; + partial void OnEnabledChanging(global::System.Nullable value); + partial void OnEnabledChanged(); + /// + /// There are no comments for Property GrantedToList in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection GrantedToList + { + get + { + return this._GrantedToList; + } + set + { + this.OnGrantedToListChanging(value); + this._GrantedToList = value; + this.OnGrantedToListChanged(); + this.OnPropertyChanged("GrantedToList"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _GrantedToList = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnGrantedToListChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnGrantedToListChanged(); + /// + /// There are no comments for Property Owner in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public UserAndRole Owner + { + get + { + if (((this._Owner == null) + && (this._OwnerInitialized != true))) + { + this._Owner = new UserAndRole(); + this._OwnerInitialized = true; + } + return this._Owner; + } + set + { + this.OnOwnerChanging(value); + this._Owner = value; + this._OwnerInitialized = true; + this.OnOwnerChanged(); + this.OnPropertyChanged("Owner"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private UserAndRole _Owner; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _OwnerInitialized; + partial void OnOwnerChanging(UserAndRole value); + partial void OnOwnerChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property NoValidation in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable NoValidation + { + get + { + return this._NoValidation; + } + set + { + this.OnNoValidationChanging(value); + this._NoValidation = value; + this.OnNoValidationChanged(); + this.OnPropertyChanged("NoValidation"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _NoValidation; + partial void OnNoValidationChanging(global::System.Nullable value); + partial void OnNoValidationChanged(); + /// + /// There are no comments for Property AddedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable AddedTime + { + get + { + return this._AddedTime; + } + set + { + this.OnAddedTimeChanging(value); + this._AddedTime = value; + this.OnAddedTimeChanged(); + this.OnPropertyChanged("AddedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _AddedTime; + partial void OnAddedTimeChanging(global::System.Nullable value); + partial void OnAddedTimeChanged(); + /// + /// There are no comments for Property ModifiedTime in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ModifiedTime + { + get + { + return this._ModifiedTime; + } + set + { + this.OnModifiedTimeChanging(value); + this._ModifiedTime = value; + this.OnModifiedTimeChanged(); + this.OnPropertyChanged("ModifiedTime"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ModifiedTime; + partial void OnModifiedTimeChanging(global::System.Nullable value); + partial void OnModifiedTimeChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.BasicStatistics in the schema. + /// + /// + /// ID + /// + [global::System.Data.Services.Common.EntitySetAttribute("BasicStatistics")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ID")] + public partial class BasicStatistics : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new BasicStatistics object. + /// + /// Initial value of ID. + /// Initial value of Clouds. + /// Initial value of ServiceDeployments. + /// Initial value of ServiceDeploymentsNotRunning. + /// Initial value of ServiceDeploymentsRequiringAttention. + /// Initial value of ServiceVMs. + /// Initial value of StandaloneVMs. + /// Initial value of VMsNotRunning. + /// Initial value of VMsRequiringAttention. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static BasicStatistics CreateBasicStatistics(global::System.Guid ID, int clouds, int serviceDeployments, int serviceDeploymentsNotRunning, int serviceDeploymentsRequiringAttention, int serviceVMs, int standaloneVMs, int vMsNotRunning, int vMsRequiringAttention) + { + BasicStatistics basicStatistics = new BasicStatistics(); + basicStatistics.ID = ID; + basicStatistics.Clouds = clouds; + basicStatistics.ServiceDeployments = serviceDeployments; + basicStatistics.ServiceDeploymentsNotRunning = serviceDeploymentsNotRunning; + basicStatistics.ServiceDeploymentsRequiringAttention = serviceDeploymentsRequiringAttention; + basicStatistics.ServiceVMs = serviceVMs; + basicStatistics.StandaloneVMs = standaloneVMs; + basicStatistics.VMsNotRunning = vMsNotRunning; + basicStatistics.VMsRequiringAttention = vMsRequiringAttention; + return basicStatistics; + } + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this._ID = value; + this.OnIDChanged(); + this.OnPropertyChanged("ID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ID; + partial void OnIDChanging(global::System.Guid value); + partial void OnIDChanged(); + /// + /// There are no comments for Property Clouds in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public int Clouds + { + get + { + return this._Clouds; + } + set + { + this.OnCloudsChanging(value); + this._Clouds = value; + this.OnCloudsChanged(); + this.OnPropertyChanged("Clouds"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private int _Clouds; + partial void OnCloudsChanging(int value); + partial void OnCloudsChanged(); + /// + /// There are no comments for Property ServiceDeployments in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public int ServiceDeployments + { + get + { + return this._ServiceDeployments; + } + set + { + this.OnServiceDeploymentsChanging(value); + this._ServiceDeployments = value; + this.OnServiceDeploymentsChanged(); + this.OnPropertyChanged("ServiceDeployments"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private int _ServiceDeployments; + partial void OnServiceDeploymentsChanging(int value); + partial void OnServiceDeploymentsChanged(); + /// + /// There are no comments for Property ServiceDeploymentsNotRunning in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public int ServiceDeploymentsNotRunning + { + get + { + return this._ServiceDeploymentsNotRunning; + } + set + { + this.OnServiceDeploymentsNotRunningChanging(value); + this._ServiceDeploymentsNotRunning = value; + this.OnServiceDeploymentsNotRunningChanged(); + this.OnPropertyChanged("ServiceDeploymentsNotRunning"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private int _ServiceDeploymentsNotRunning; + partial void OnServiceDeploymentsNotRunningChanging(int value); + partial void OnServiceDeploymentsNotRunningChanged(); + /// + /// There are no comments for Property ServiceDeploymentsRequiringAttention in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public int ServiceDeploymentsRequiringAttention + { + get + { + return this._ServiceDeploymentsRequiringAttention; + } + set + { + this.OnServiceDeploymentsRequiringAttentionChanging(value); + this._ServiceDeploymentsRequiringAttention = value; + this.OnServiceDeploymentsRequiringAttentionChanged(); + this.OnPropertyChanged("ServiceDeploymentsRequiringAttention"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private int _ServiceDeploymentsRequiringAttention; + partial void OnServiceDeploymentsRequiringAttentionChanging(int value); + partial void OnServiceDeploymentsRequiringAttentionChanged(); + /// + /// There are no comments for Property ServiceVMs in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public int ServiceVMs + { + get + { + return this._ServiceVMs; + } + set + { + this.OnServiceVMsChanging(value); + this._ServiceVMs = value; + this.OnServiceVMsChanged(); + this.OnPropertyChanged("ServiceVMs"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private int _ServiceVMs; + partial void OnServiceVMsChanging(int value); + partial void OnServiceVMsChanged(); + /// + /// There are no comments for Property StandaloneVMs in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public int StandaloneVMs + { + get + { + return this._StandaloneVMs; + } + set + { + this.OnStandaloneVMsChanging(value); + this._StandaloneVMs = value; + this.OnStandaloneVMsChanged(); + this.OnPropertyChanged("StandaloneVMs"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private int _StandaloneVMs; + partial void OnStandaloneVMsChanging(int value); + partial void OnStandaloneVMsChanged(); + /// + /// There are no comments for Property VMsNotRunning in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public int VMsNotRunning + { + get + { + return this._VMsNotRunning; + } + set + { + this.OnVMsNotRunningChanging(value); + this._VMsNotRunning = value; + this.OnVMsNotRunningChanged(); + this.OnPropertyChanged("VMsNotRunning"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private int _VMsNotRunning; + partial void OnVMsNotRunningChanging(int value); + partial void OnVMsNotRunningChanged(); + /// + /// There are no comments for Property VMsRequiringAttention in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public int VMsRequiringAttention + { + get + { + return this._VMsRequiringAttention; + } + set + { + this.OnVMsRequiringAttentionChanging(value); + this._VMsRequiringAttention = value; + this.OnVMsRequiringAttentionChanged(); + this.OnPropertyChanged("VMsRequiringAttention"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private int _VMsRequiringAttention; + partial void OnVMsRequiringAttentionChanging(int value); + partial void OnVMsRequiringAttentionChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.CloudCapacity in the schema. + /// + /// + /// CloudId + /// StampId + /// + [global::System.Data.Services.Common.EntitySetAttribute("CloudCapacities")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("CloudId", "StampId")] + public partial class CloudCapacity : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new CloudCapacity object. + /// + /// Initial value of StampId. + /// Initial value of CloudId. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static CloudCapacity CreateCloudCapacity(global::System.Guid stampId, global::System.Guid cloudId) + { + CloudCapacity cloudCapacity = new CloudCapacity(); + cloudCapacity.StampId = stampId; + cloudCapacity.CloudId = cloudId; + return cloudCapacity; + } + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property CloudId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid CloudId + { + get + { + return this._CloudId; + } + set + { + this.OnCloudIdChanging(value); + this._CloudId = value; + this.OnCloudIdChanged(); + this.OnPropertyChanged("CloudId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _CloudId; + partial void OnCloudIdChanging(global::System.Guid value); + partial void OnCloudIdChanged(); + /// + /// There are no comments for Property CPUCount in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CPUCount + { + get + { + return this._CPUCount; + } + set + { + this.OnCPUCountChanging(value); + this._CPUCount = value; + this.OnCPUCountChanged(); + this.OnPropertyChanged("CPUCount"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CPUCount; + partial void OnCPUCountChanging(global::System.Nullable value); + partial void OnCPUCountChanged(); + /// + /// There are no comments for Property UseCPUCountMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseCPUCountMaximum + { + get + { + return this._UseCPUCountMaximum; + } + set + { + this.OnUseCPUCountMaximumChanging(value); + this._UseCPUCountMaximum = value; + this.OnUseCPUCountMaximumChanged(); + this.OnPropertyChanged("UseCPUCountMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseCPUCountMaximum; + partial void OnUseCPUCountMaximumChanging(global::System.Nullable value); + partial void OnUseCPUCountMaximumChanged(); + /// + /// There are no comments for Property CustomQuotaCount in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CustomQuotaCount + { + get + { + return this._CustomQuotaCount; + } + set + { + this.OnCustomQuotaCountChanging(value); + this._CustomQuotaCount = value; + this.OnCustomQuotaCountChanged(); + this.OnPropertyChanged("CustomQuotaCount"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CustomQuotaCount; + partial void OnCustomQuotaCountChanging(global::System.Nullable value); + partial void OnCustomQuotaCountChanged(); + /// + /// There are no comments for Property UseCustomQuotaCountMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseCustomQuotaCountMaximum + { + get + { + return this._UseCustomQuotaCountMaximum; + } + set + { + this.OnUseCustomQuotaCountMaximumChanging(value); + this._UseCustomQuotaCountMaximum = value; + this.OnUseCustomQuotaCountMaximumChanged(); + this.OnPropertyChanged("UseCustomQuotaCountMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseCustomQuotaCountMaximum; + partial void OnUseCustomQuotaCountMaximumChanging(global::System.Nullable value); + partial void OnUseCustomQuotaCountMaximumChanged(); + /// + /// There are no comments for Property MemoryMB in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MemoryMB + { + get + { + return this._MemoryMB; + } + set + { + this.OnMemoryMBChanging(value); + this._MemoryMB = value; + this.OnMemoryMBChanged(); + this.OnPropertyChanged("MemoryMB"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MemoryMB; + partial void OnMemoryMBChanging(global::System.Nullable value); + partial void OnMemoryMBChanged(); + /// + /// There are no comments for Property UseMemoryMBMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseMemoryMBMaximum + { + get + { + return this._UseMemoryMBMaximum; + } + set + { + this.OnUseMemoryMBMaximumChanging(value); + this._UseMemoryMBMaximum = value; + this.OnUseMemoryMBMaximumChanged(); + this.OnPropertyChanged("UseMemoryMBMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseMemoryMBMaximum; + partial void OnUseMemoryMBMaximumChanging(global::System.Nullable value); + partial void OnUseMemoryMBMaximumChanged(); + /// + /// There are no comments for Property StorageGB in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable StorageGB + { + get + { + return this._StorageGB; + } + set + { + this.OnStorageGBChanging(value); + this._StorageGB = value; + this.OnStorageGBChanged(); + this.OnPropertyChanged("StorageGB"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _StorageGB; + partial void OnStorageGBChanging(global::System.Nullable value); + partial void OnStorageGBChanged(); + /// + /// There are no comments for Property UseStorageGBMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseStorageGBMaximum + { + get + { + return this._UseStorageGBMaximum; + } + set + { + this.OnUseStorageGBMaximumChanging(value); + this._UseStorageGBMaximum = value; + this.OnUseStorageGBMaximumChanged(); + this.OnPropertyChanged("UseStorageGBMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseStorageGBMaximum; + partial void OnUseStorageGBMaximumChanging(global::System.Nullable value); + partial void OnUseStorageGBMaximumChanged(); + /// + /// There are no comments for Property VMCount in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VMCount + { + get + { + return this._VMCount; + } + set + { + this.OnVMCountChanging(value); + this._VMCount = value; + this.OnVMCountChanged(); + this.OnPropertyChanged("VMCount"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VMCount; + partial void OnVMCountChanging(global::System.Nullable value); + partial void OnVMCountChanged(); + /// + /// There are no comments for Property UseVMCountMaximum in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable UseVMCountMaximum + { + get + { + return this._UseVMCountMaximum; + } + set + { + this.OnUseVMCountMaximumChanging(value); + this._UseVMCountMaximum = value; + this.OnUseVMCountMaximumChanged(); + this.OnPropertyChanged("UseVMCountMaximum"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _UseVMCountMaximum; + partial void OnUseVMCountMaximumChanging(global::System.Nullable value); + partial void OnUseVMCountMaximumChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.VMNetworkGateway in the schema. + /// + /// + /// ID + /// StampId + /// + [global::System.Data.Services.Common.EntitySetAttribute("VMNetworkGateways")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ID", "StampId")] + public partial class VMNetworkGateway : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new VMNetworkGateway object. + /// + /// Initial value of StampId. + /// Initial value of ID. + /// Initial value of IPSubnets. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static VMNetworkGateway CreateVMNetworkGateway(global::System.Guid stampId, global::System.Guid ID, global::System.Collections.ObjectModel.ObservableCollection iPSubnets) + { + VMNetworkGateway vMNetworkGateway = new VMNetworkGateway(); + vMNetworkGateway.StampId = stampId; + vMNetworkGateway.ID = ID; + if ((iPSubnets == null)) + { + throw new global::System.ArgumentNullException("iPSubnets"); + } + vMNetworkGateway.IPSubnets = iPSubnets; + return vMNetworkGateway; + } + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this._ID = value; + this.OnIDChanged(); + this.OnPropertyChanged("ID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ID; + partial void OnIDChanging(global::System.Guid value); + partial void OnIDChanged(); + /// + /// There are no comments for Property VMNetworkId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VMNetworkId + { + get + { + return this._VMNetworkId; + } + set + { + this.OnVMNetworkIdChanging(value); + this._VMNetworkId = value; + this.OnVMNetworkIdChanged(); + this.OnPropertyChanged("VMNetworkId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VMNetworkId; + partial void OnVMNetworkIdChanging(global::System.Nullable value); + partial void OnVMNetworkIdChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property IPSubnets in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection IPSubnets + { + get + { + return this._IPSubnets; + } + set + { + this.OnIPSubnetsChanging(value); + this._IPSubnets = value; + this.OnIPSubnetsChanged(); + this.OnPropertyChanged("IPSubnets"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _IPSubnets = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnIPSubnetsChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnIPSubnetsChanged(); + /// + /// There are no comments for Property RequiresVPN in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable RequiresVPN + { + get + { + return this._RequiresVPN; + } + set + { + this.OnRequiresVPNChanging(value); + this._RequiresVPN = value; + this.OnRequiresVPNChanged(); + this.OnPropertyChanged("RequiresVPN"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _RequiresVPN; + partial void OnRequiresVPNChanging(global::System.Nullable value); + partial void OnRequiresVPNChanged(); + /// + /// There are no comments for Property RequiresNAT in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable RequiresNAT + { + get + { + return this._RequiresNAT; + } + set + { + this.OnRequiresNATChanging(value); + this._RequiresNAT = value; + this.OnRequiresNATChanged(); + this.OnPropertyChanged("RequiresNAT"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _RequiresNAT; + partial void OnRequiresNATChanging(global::System.Nullable value); + partial void OnRequiresNATChanged(); + /// + /// There are no comments for Property EnableBGP in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable EnableBGP + { + get + { + return this._EnableBGP; + } + set + { + this.OnEnableBGPChanging(value); + this._EnableBGP = value; + this.OnEnableBGPChanged(); + this.OnPropertyChanged("EnableBGP"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _EnableBGP; + partial void OnEnableBGPChanging(global::System.Nullable value); + partial void OnEnableBGPChanged(); + /// + /// There are no comments for Property AutonomousSystemNumber in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable AutonomousSystemNumber + { + get + { + return this._AutonomousSystemNumber; + } + set + { + this.OnAutonomousSystemNumberChanging(value); + this._AutonomousSystemNumber = value; + this.OnAutonomousSystemNumberChanged(); + this.OnPropertyChanged("AutonomousSystemNumber"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _AutonomousSystemNumber; + partial void OnAutonomousSystemNumberChanging(global::System.Nullable value); + partial void OnAutonomousSystemNumberChanged(); + /// + /// There are no comments for BGPPeers in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection BGPPeers + { + get + { + return this._BGPPeers; + } + set + { + this._BGPPeers = value; + this.OnPropertyChanged("BGPPeers"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _BGPPeers = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + /// + /// There are no comments for NATConnections in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection NATConnections + { + get + { + return this._NATConnections; + } + set + { + this._NATConnections = value; + this.OnPropertyChanged("NATConnections"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _NATConnections = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + /// + /// There are no comments for VPNConnections in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection VPNConnections + { + get + { + return this._VPNConnections; + } + set + { + this._VPNConnections = value; + this.OnPropertyChanged("VPNConnections"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _VPNConnections = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.NATConnection in the schema. + /// + /// + /// ID + /// StampId + /// + [global::System.Data.Services.Common.EntitySetAttribute("NATConnections")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ID", "StampId")] + public partial class NATConnection : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new NATConnection object. + /// + /// Initial value of StampId. + /// Initial value of ID. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static NATConnection CreateNATConnection(global::System.Guid stampId, global::System.Guid ID) + { + NATConnection nATConnection = new NATConnection(); + nATConnection.StampId = stampId; + nATConnection.ID = ID; + return nATConnection; + } + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this._ID = value; + this.OnIDChanged(); + this.OnPropertyChanged("ID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ID; + partial void OnIDChanging(global::System.Guid value); + partial void OnIDChanged(); + /// + /// There are no comments for Property VMNetworkGatewayId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VMNetworkGatewayId + { + get + { + return this._VMNetworkGatewayId; + } + set + { + this.OnVMNetworkGatewayIdChanging(value); + this._VMNetworkGatewayId = value; + this.OnVMNetworkGatewayIdChanged(); + this.OnPropertyChanged("VMNetworkGatewayId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VMNetworkGatewayId; + partial void OnVMNetworkGatewayIdChanging(global::System.Nullable value); + partial void OnVMNetworkGatewayIdChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property Status in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Status + { + get + { + return this._Status; + } + set + { + this.OnStatusChanging(value); + this._Status = value; + this.OnStatusChanged(); + this.OnPropertyChanged("Status"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Status; + partial void OnStatusChanging(string value); + partial void OnStatusChanged(); + /// + /// There are no comments for Property MaximumBandwidthInboundKbps in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MaximumBandwidthInboundKbps + { + get + { + return this._MaximumBandwidthInboundKbps; + } + set + { + this.OnMaximumBandwidthInboundKbpsChanging(value); + this._MaximumBandwidthInboundKbps = value; + this.OnMaximumBandwidthInboundKbpsChanged(); + this.OnPropertyChanged("MaximumBandwidthInboundKbps"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MaximumBandwidthInboundKbps; + partial void OnMaximumBandwidthInboundKbpsChanging(global::System.Nullable value); + partial void OnMaximumBandwidthInboundKbpsChanged(); + /// + /// There are no comments for Property MaximumBandwidthOutboundKbps in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MaximumBandwidthOutboundKbps + { + get + { + return this._MaximumBandwidthOutboundKbps; + } + set + { + this.OnMaximumBandwidthOutboundKbpsChanging(value); + this._MaximumBandwidthOutboundKbps = value; + this.OnMaximumBandwidthOutboundKbpsChanged(); + this.OnPropertyChanged("MaximumBandwidthOutboundKbps"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MaximumBandwidthOutboundKbps; + partial void OnMaximumBandwidthOutboundKbpsChanging(global::System.Nullable value); + partial void OnMaximumBandwidthOutboundKbpsChanged(); + /// + /// There are no comments for Rules in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection Rules + { + get + { + return this._Rules; + } + set + { + this._Rules = value; + this.OnPropertyChanged("Rules"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _Rules = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.NATRule in the schema. + /// + /// + /// ID + /// StampId + /// + [global::System.Data.Services.Common.EntitySetAttribute("NATRules")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ID", "StampId")] + public partial class NATRule : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new NATRule object. + /// + /// Initial value of StampId. + /// Initial value of ID. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static NATRule CreateNATRule(global::System.Guid stampId, global::System.Guid ID) + { + NATRule nATRule = new NATRule(); + nATRule.StampId = stampId; + nATRule.ID = ID; + return nATRule; + } + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this._ID = value; + this.OnIDChanged(); + this.OnPropertyChanged("ID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ID; + partial void OnIDChanging(global::System.Guid value); + partial void OnIDChanged(); + /// + /// There are no comments for Property NATConnectionId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable NATConnectionId + { + get + { + return this._NATConnectionId; + } + set + { + this.OnNATConnectionIdChanging(value); + this._NATConnectionId = value; + this.OnNATConnectionIdChanged(); + this.OnPropertyChanged("NATConnectionId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _NATConnectionId; + partial void OnNATConnectionIdChanging(global::System.Nullable value); + partial void OnNATConnectionIdChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property ExternalIPAddress in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ExternalIPAddress + { + get + { + return this._ExternalIPAddress; + } + set + { + this.OnExternalIPAddressChanging(value); + this._ExternalIPAddress = value; + this.OnExternalIPAddressChanged(); + this.OnPropertyChanged("ExternalIPAddress"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ExternalIPAddress; + partial void OnExternalIPAddressChanging(string value); + partial void OnExternalIPAddressChanged(); + /// + /// There are no comments for Property ExternalPort in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ExternalPort + { + get + { + return this._ExternalPort; + } + set + { + this.OnExternalPortChanging(value); + this._ExternalPort = value; + this.OnExternalPortChanged(); + this.OnPropertyChanged("ExternalPort"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ExternalPort; + partial void OnExternalPortChanging(global::System.Nullable value); + partial void OnExternalPortChanged(); + /// + /// There are no comments for Property InternalIPAddress in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string InternalIPAddress + { + get + { + return this._InternalIPAddress; + } + set + { + this.OnInternalIPAddressChanging(value); + this._InternalIPAddress = value; + this.OnInternalIPAddressChanged(); + this.OnPropertyChanged("InternalIPAddress"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _InternalIPAddress; + partial void OnInternalIPAddressChanging(string value); + partial void OnInternalIPAddressChanged(); + /// + /// There are no comments for Property InternalPort in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable InternalPort + { + get + { + return this._InternalPort; + } + set + { + this.OnInternalPortChanging(value); + this._InternalPort = value; + this.OnInternalPortChanged(); + this.OnPropertyChanged("InternalPort"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _InternalPort; + partial void OnInternalPortChanging(global::System.Nullable value); + partial void OnInternalPortChanged(); + /// + /// There are no comments for Property Protocol in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Protocol + { + get + { + return this._Protocol; + } + set + { + this.OnProtocolChanging(value); + this._Protocol = value; + this.OnProtocolChanged(); + this.OnPropertyChanged("Protocol"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Protocol; + partial void OnProtocolChanging(string value); + partial void OnProtocolChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.BGPPeer in the schema. + /// + /// + /// ID + /// StampId + /// + [global::System.Data.Services.Common.EntitySetAttribute("BGPPeers")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ID", "StampId")] + public partial class BGPPeer : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new BGPPeer object. + /// + /// Initial value of StampId. + /// Initial value of ID. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static BGPPeer CreateBGPPeer(global::System.Guid stampId, global::System.Guid ID) + { + BGPPeer bGPPeer = new BGPPeer(); + bGPPeer.StampId = stampId; + bGPPeer.ID = ID; + return bGPPeer; + } + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this._ID = value; + this.OnIDChanged(); + this.OnPropertyChanged("ID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ID; + partial void OnIDChanging(global::System.Guid value); + partial void OnIDChanged(); + /// + /// There are no comments for Property VMNetworkGatewayId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VMNetworkGatewayId + { + get + { + return this._VMNetworkGatewayId; + } + set + { + this.OnVMNetworkGatewayIdChanging(value); + this._VMNetworkGatewayId = value; + this.OnVMNetworkGatewayIdChanged(); + this.OnPropertyChanged("VMNetworkGatewayId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VMNetworkGatewayId; + partial void OnVMNetworkGatewayIdChanging(global::System.Nullable value); + partial void OnVMNetworkGatewayIdChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property PeerIPAddress in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string PeerIPAddress + { + get + { + return this._PeerIPAddress; + } + set + { + this.OnPeerIPAddressChanging(value); + this._PeerIPAddress = value; + this.OnPeerIPAddressChanged(); + this.OnPropertyChanged("PeerIPAddress"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _PeerIPAddress; + partial void OnPeerIPAddressChanging(string value); + partial void OnPeerIPAddressChanged(); + /// + /// There are no comments for Property PeerASN in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable PeerASN + { + get + { + return this._PeerASN; + } + set + { + this.OnPeerASNChanging(value); + this._PeerASN = value; + this.OnPeerASNChanged(); + this.OnPropertyChanged("PeerASN"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _PeerASN; + partial void OnPeerASNChanging(global::System.Nullable value); + partial void OnPeerASNChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.VPNNetworkRoute in the schema. + /// + /// + /// ID + /// StampId + /// + [global::System.Data.Services.Common.EntitySetAttribute("VPNNetworkRoutes")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ID", "StampId")] + public partial class VPNNetworkRoute : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new VPNNetworkRoute object. + /// + /// Initial value of StampId. + /// Initial value of ID. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static VPNNetworkRoute CreateVPNNetworkRoute(global::System.Guid stampId, global::System.Guid ID) + { + VPNNetworkRoute vPNNetworkRoute = new VPNNetworkRoute(); + vPNNetworkRoute.StampId = stampId; + vPNNetworkRoute.ID = ID; + return vPNNetworkRoute; + } + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property ID in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid ID + { + get + { + return this._ID; + } + set + { + this.OnIDChanging(value); + this._ID = value; + this.OnIDChanged(); + this.OnPropertyChanged("ID"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _ID; + partial void OnIDChanging(global::System.Guid value); + partial void OnIDChanged(); + /// + /// There are no comments for Property VPNConnectionId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VPNConnectionId + { + get + { + return this._VPNConnectionId; + } + set + { + this.OnVPNConnectionIdChanging(value); + this._VPNConnectionId = value; + this.OnVPNConnectionIdChanged(); + this.OnPropertyChanged("VPNConnectionId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VPNConnectionId; + partial void OnVPNConnectionIdChanging(global::System.Nullable value); + partial void OnVPNConnectionIdChanged(); + /// + /// There are no comments for Property IPSubnet in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string IPSubnet + { + get + { + return this._IPSubnet; + } + set + { + this.OnIPSubnetChanging(value); + this._IPSubnet = value; + this.OnIPSubnetChanged(); + this.OnPropertyChanged("IPSubnet"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _IPSubnet; + partial void OnIPSubnetChanging(string value); + partial void OnIPSubnetChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for VMM.VMRoleSizeProfile in the schema. + /// + /// + /// Name + /// StampId + /// + [global::System.Data.Services.Common.EntitySetAttribute("VMRoleSizeProfiles")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("Name", "StampId")] + public partial class VMRoleSizeProfile : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new VMRoleSizeProfile object. + /// + /// Initial value of StampId. + /// Initial value of Name. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static VMRoleSizeProfile CreateVMRoleSizeProfile(global::System.Guid stampId, string name) + { + VMRoleSizeProfile vMRoleSizeProfile = new VMRoleSizeProfile(); + vMRoleSizeProfile.StampId = stampId; + vMRoleSizeProfile.Name = name; + return vMRoleSizeProfile; + } + /// + /// There are no comments for Property StampId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid StampId + { + get + { + return this._StampId; + } + set + { + this.OnStampIdChanging(value); + this._StampId = value; + this.OnStampIdChanged(); + this.OnPropertyChanged("StampId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _StampId; + partial void OnStampIdChanging(global::System.Guid value); + partial void OnStampIdChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property CpuCount in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable CpuCount + { + get + { + return this._CpuCount; + } + set + { + this.OnCpuCountChanging(value); + this._CpuCount = value; + this.OnCpuCountChanged(); + this.OnPropertyChanged("CpuCount"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _CpuCount; + partial void OnCpuCountChanging(global::System.Nullable value); + partial void OnCpuCountChanged(); + /// + /// There are no comments for Property MemoryInMB in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MemoryInMB + { + get + { + return this._MemoryInMB; + } + set + { + this.OnMemoryInMBChanging(value); + this._MemoryInMB = value; + this.OnMemoryInMBChanged(); + this.OnPropertyChanged("MemoryInMB"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MemoryInMB; + partial void OnMemoryInMBChanging(global::System.Nullable value); + partial void OnMemoryInMBChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } +} +// Original file name: proxy.cs +// Generation date: 8/2/2013 12:41:19 PM +namespace Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract +{ + + /// + /// There are no comments for MicrosoftCompute.CloudService in the schema. + /// + /// + /// Name + /// + [global::System.Data.Services.Common.EntitySetAttribute("CloudServices")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("Name")] + public partial class CloudService : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new CloudService object. + /// + /// Initial value of Name. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static CloudService CreateCloudService(string name) + { + CloudService cloudService = new CloudService(); + cloudService.Name = name; + return cloudService; + } + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property Label in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Label + { + get + { + return this._Label; + } + set + { + this.OnLabelChanging(value); + this._Label = value; + this.OnLabelChanged(); + this.OnPropertyChanged("Label"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Label; + partial void OnLabelChanging(string value); + partial void OnLabelChanged(); + /// + /// There are no comments for Property ProvisioningState in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ProvisioningState + { + get + { + return this._ProvisioningState; + } + set + { + this.OnProvisioningStateChanging(value); + this._ProvisioningState = value; + this.OnProvisioningStateChanged(); + this.OnPropertyChanged("ProvisioningState"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ProvisioningState; + partial void OnProvisioningStateChanging(string value); + partial void OnProvisioningStateChanged(); + /// + /// There are no comments for Resources in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection Resources + { + get + { + return this._Resources; + } + set + { + this._Resources = value; + this.OnPropertyChanged("Resources"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _Resources = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for MicrosoftCompute.CloudResource in the schema. + /// + /// + /// ResourceProviderNamespace + /// + [global::System.Data.Services.Common.EntitySetAttribute("CloudResource")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("ResourceProviderNamespace")] + public partial class CloudResource : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new CloudResource object. + /// + /// Initial value of ResourceProviderNamespace. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static CloudResource CreateCloudResource(string resourceProviderNamespace) + { + CloudResource cloudResource = new CloudResource(); + cloudResource.ResourceProviderNamespace = resourceProviderNamespace; + return cloudResource; + } + /// + /// There are no comments for Property ResourceProviderNamespace in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ResourceProviderNamespace + { + get + { + return this._ResourceProviderNamespace; + } + set + { + this.OnResourceProviderNamespaceChanging(value); + this._ResourceProviderNamespace = value; + this.OnResourceProviderNamespaceChanged(); + this.OnPropertyChanged("ResourceProviderNamespace"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ResourceProviderNamespace; + partial void OnResourceProviderNamespaceChanging(string value); + partial void OnResourceProviderNamespaceChanged(); + /// + /// There are no comments for VMRoles in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection VMRoles + { + get + { + return this._VMRoles; + } + set + { + this._VMRoles = value; + this.OnPropertyChanged("VMRoles"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _VMRoles = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType MicrosoftCompute.VMRoleResourceDefinition in the schema. + /// + public partial class VMRoleResourceDefinition : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new VMRoleResourceDefinition object. + /// + /// Initial value of ResourceParameters. + /// Initial value of ResourceExtensionReferences. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static VMRoleResourceDefinition CreateVMRoleResourceDefinition(global::System.Collections.ObjectModel.ObservableCollection resourceParameters, global::System.Collections.ObjectModel.ObservableCollection resourceExtensionReferences) + { + VMRoleResourceDefinition vMRoleResourceDefinition = new VMRoleResourceDefinition(); + if ((resourceParameters == null)) + { + throw new global::System.ArgumentNullException("resourceParameters"); + } + vMRoleResourceDefinition.ResourceParameters = resourceParameters; + if ((resourceExtensionReferences == null)) + { + throw new global::System.ArgumentNullException("resourceExtensionReferences"); + } + vMRoleResourceDefinition.ResourceExtensionReferences = resourceExtensionReferences; + return vMRoleResourceDefinition; + } + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property Version in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Version + { + get + { + return this._Version; + } + set + { + this.OnVersionChanging(value); + this._Version = value; + this.OnVersionChanged(); + this.OnPropertyChanged("Version"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Version; + partial void OnVersionChanging(string value); + partial void OnVersionChanged(); + /// + /// There are no comments for Property Publisher in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Publisher + { + get + { + return this._Publisher; + } + set + { + this.OnPublisherChanging(value); + this._Publisher = value; + this.OnPublisherChanged(); + this.OnPropertyChanged("Publisher"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Publisher; + partial void OnPublisherChanging(string value); + partial void OnPublisherChanged(); + /// + /// There are no comments for Property SchemaVersion in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string SchemaVersion + { + get + { + return this._SchemaVersion; + } + set + { + this.OnSchemaVersionChanging(value); + this._SchemaVersion = value; + this.OnSchemaVersionChanged(); + this.OnPropertyChanged("SchemaVersion"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _SchemaVersion; + partial void OnSchemaVersionChanging(string value); + partial void OnSchemaVersionChanged(); + /// + /// There are no comments for Property Type in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Type + { + get + { + return this._Type; + } + set + { + this.OnTypeChanging(value); + this._Type = value; + this.OnTypeChanged(); + this.OnPropertyChanged("Type"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Type; + partial void OnTypeChanging(string value); + partial void OnTypeChanged(); + /// + /// There are no comments for Property ResourceParameters in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection ResourceParameters + { + get + { + return this._ResourceParameters; + } + set + { + this.OnResourceParametersChanging(value); + this._ResourceParameters = value; + this.OnResourceParametersChanged(); + this.OnPropertyChanged("ResourceParameters"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _ResourceParameters = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnResourceParametersChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnResourceParametersChanged(); + /// + /// There are no comments for Property ResourceExtensionReferences in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection ResourceExtensionReferences + { + get + { + return this._ResourceExtensionReferences; + } + set + { + this.OnResourceExtensionReferencesChanging(value); + this._ResourceExtensionReferences = value; + this.OnResourceExtensionReferencesChanged(); + this.OnPropertyChanged("ResourceExtensionReferences"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _ResourceExtensionReferences = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnResourceExtensionReferencesChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnResourceExtensionReferencesChanged(); + /// + /// There are no comments for Property IntrinsicSettings in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public IntrinsicSettings IntrinsicSettings + { + get + { + if (((this._IntrinsicSettings == null) + && (this._IntrinsicSettingsInitialized != true))) + { + this._IntrinsicSettings = new IntrinsicSettings(); + this._IntrinsicSettingsInitialized = true; + } + return this._IntrinsicSettings; + } + set + { + this.OnIntrinsicSettingsChanging(value); + this._IntrinsicSettings = value; + this._IntrinsicSettingsInitialized = true; + this.OnIntrinsicSettingsChanged(); + this.OnPropertyChanged("IntrinsicSettings"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private IntrinsicSettings _IntrinsicSettings; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _IntrinsicSettingsInitialized; + partial void OnIntrinsicSettingsChanging(IntrinsicSettings value); + partial void OnIntrinsicSettingsChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType MicrosoftCompute.ResourceParameter in the schema. + /// + public partial class ResourceParameter : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property Type in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Type + { + get + { + return this._Type; + } + set + { + this.OnTypeChanging(value); + this._Type = value; + this.OnTypeChanged(); + this.OnPropertyChanged("Type"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Type; + partial void OnTypeChanging(string value); + partial void OnTypeChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + this.OnPropertyChanged("Description"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType MicrosoftCompute.ResourceExtensionReference in the schema. + /// + public partial class ResourceExtensionReference : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// There are no comments for Property ReferenceName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ReferenceName + { + get + { + return this._ReferenceName; + } + set + { + this.OnReferenceNameChanging(value); + this._ReferenceName = value; + this.OnReferenceNameChanged(); + this.OnPropertyChanged("ReferenceName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ReferenceName; + partial void OnReferenceNameChanging(string value); + partial void OnReferenceNameChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property Version in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Version + { + get + { + return this._Version; + } + set + { + this.OnVersionChanging(value); + this._Version = value; + this.OnVersionChanged(); + this.OnPropertyChanged("Version"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Version; + partial void OnVersionChanging(string value); + partial void OnVersionChanged(); + /// + /// There are no comments for Property Publisher in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Publisher + { + get + { + return this._Publisher; + } + set + { + this.OnPublisherChanging(value); + this._Publisher = value; + this.OnPublisherChanged(); + this.OnPropertyChanged("Publisher"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Publisher; + partial void OnPublisherChanging(string value); + partial void OnPublisherChanged(); + /// + /// There are no comments for Property ResourceExtensionParameterValues in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ResourceExtensionParameterValues + { + get + { + return this._ResourceExtensionParameterValues; + } + set + { + this.OnResourceExtensionParameterValuesChanging(value); + this._ResourceExtensionParameterValues = value; + this.OnResourceExtensionParameterValuesChanged(); + this.OnPropertyChanged("ResourceExtensionParameterValues"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ResourceExtensionParameterValues; + partial void OnResourceExtensionParameterValuesChanging(string value); + partial void OnResourceExtensionParameterValuesChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType MicrosoftCompute.IntrinsicSettings in the schema. + /// + public partial class IntrinsicSettings : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// There are no comments for Property ScaleOutSettings in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public ScaleOutSetting ScaleOutSettings + { + get + { + if (((this._ScaleOutSettings == null) + && (this._ScaleOutSettingsInitialized != true))) + { + this._ScaleOutSettings = new ScaleOutSetting(); + this._ScaleOutSettingsInitialized = true; + } + return this._ScaleOutSettings; + } + set + { + this.OnScaleOutSettingsChanging(value); + this._ScaleOutSettings = value; + this._ScaleOutSettingsInitialized = true; + this.OnScaleOutSettingsChanged(); + this.OnPropertyChanged("ScaleOutSettings"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private ScaleOutSetting _ScaleOutSettings; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _ScaleOutSettingsInitialized; + partial void OnScaleOutSettingsChanging(ScaleOutSetting value); + partial void OnScaleOutSettingsChanged(); + /// + /// There are no comments for Property HardwareProfile in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public ResDefHardwareProfile HardwareProfile + { + get + { + if (((this._HardwareProfile == null) + && (this._HardwareProfileInitialized != true))) + { + this._HardwareProfile = new ResDefHardwareProfile(); + this._HardwareProfileInitialized = true; + } + return this._HardwareProfile; + } + set + { + this.OnHardwareProfileChanging(value); + this._HardwareProfile = value; + this._HardwareProfileInitialized = true; + this.OnHardwareProfileChanged(); + this.OnPropertyChanged("HardwareProfile"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private ResDefHardwareProfile _HardwareProfile; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _HardwareProfileInitialized; + partial void OnHardwareProfileChanging(ResDefHardwareProfile value); + partial void OnHardwareProfileChanged(); + /// + /// There are no comments for Property StorageProfile in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public StorageProfile StorageProfile + { + get + { + if (((this._StorageProfile == null) + && (this._StorageProfileInitialized != true))) + { + this._StorageProfile = new StorageProfile(); + this._StorageProfileInitialized = true; + } + return this._StorageProfile; + } + set + { + this.OnStorageProfileChanging(value); + this._StorageProfile = value; + this._StorageProfileInitialized = true; + this.OnStorageProfileChanged(); + this.OnPropertyChanged("StorageProfile"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private StorageProfile _StorageProfile; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _StorageProfileInitialized; + partial void OnStorageProfileChanging(StorageProfile value); + partial void OnStorageProfileChanged(); + /// + /// There are no comments for Property OperatingSystemProfile in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public OSProfile OperatingSystemProfile + { + get + { + if (((this._OperatingSystemProfile == null) + && (this._OperatingSystemProfileInitialized != true))) + { + this._OperatingSystemProfile = new OSProfile(); + this._OperatingSystemProfileInitialized = true; + } + return this._OperatingSystemProfile; + } + set + { + this.OnOperatingSystemProfileChanging(value); + this._OperatingSystemProfile = value; + this._OperatingSystemProfileInitialized = true; + this.OnOperatingSystemProfileChanged(); + this.OnPropertyChanged("OperatingSystemProfile"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private OSProfile _OperatingSystemProfile; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _OperatingSystemProfileInitialized; + partial void OnOperatingSystemProfileChanging(OSProfile value); + partial void OnOperatingSystemProfileChanged(); + /// + /// There are no comments for Property NetworkProfile in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public NetworkProfile NetworkProfile + { + get + { + if (((this._NetworkProfile == null) + && (this._NetworkProfileInitialized != true))) + { + this._NetworkProfile = new NetworkProfile(); + this._NetworkProfileInitialized = true; + } + return this._NetworkProfile; + } + set + { + this.OnNetworkProfileChanging(value); + this._NetworkProfile = value; + this._NetworkProfileInitialized = true; + this.OnNetworkProfileChanged(); + this.OnPropertyChanged("NetworkProfile"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private NetworkProfile _NetworkProfile; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _NetworkProfileInitialized; + partial void OnNetworkProfileChanging(NetworkProfile value); + partial void OnNetworkProfileChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType MicrosoftCompute.ScaleOutSetting in the schema. + /// + public partial class ScaleOutSetting : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// There are no comments for Property InitialInstanceCount in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string InitialInstanceCount + { + get + { + return this._InitialInstanceCount; + } + set + { + this.OnInitialInstanceCountChanging(value); + this._InitialInstanceCount = value; + this.OnInitialInstanceCountChanged(); + this.OnPropertyChanged("InitialInstanceCount"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _InitialInstanceCount; + partial void OnInitialInstanceCountChanging(string value); + partial void OnInitialInstanceCountChanged(); + /// + /// There are no comments for Property MaximumInstanceCount in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string MaximumInstanceCount + { + get + { + return this._MaximumInstanceCount; + } + set + { + this.OnMaximumInstanceCountChanging(value); + this._MaximumInstanceCount = value; + this.OnMaximumInstanceCountChanged(); + this.OnPropertyChanged("MaximumInstanceCount"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _MaximumInstanceCount; + partial void OnMaximumInstanceCountChanging(string value); + partial void OnMaximumInstanceCountChanged(); + /// + /// There are no comments for Property MinimumInstanceCount in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string MinimumInstanceCount + { + get + { + return this._MinimumInstanceCount; + } + set + { + this.OnMinimumInstanceCountChanging(value); + this._MinimumInstanceCount = value; + this.OnMinimumInstanceCountChanged(); + this.OnPropertyChanged("MinimumInstanceCount"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _MinimumInstanceCount; + partial void OnMinimumInstanceCountChanging(string value); + partial void OnMinimumInstanceCountChanged(); + /// + /// There are no comments for Property UpgradeDomainCount in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string UpgradeDomainCount + { + get + { + return this._UpgradeDomainCount; + } + set + { + this.OnUpgradeDomainCountChanging(value); + this._UpgradeDomainCount = value; + this.OnUpgradeDomainCountChanged(); + this.OnPropertyChanged("UpgradeDomainCount"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _UpgradeDomainCount; + partial void OnUpgradeDomainCountChanging(string value); + partial void OnUpgradeDomainCountChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType MicrosoftCompute.ResDefHardwareProfile in the schema. + /// + public partial class ResDefHardwareProfile : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// There are no comments for Property VMSize in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string VMSize + { + get + { + return this._VMSize; + } + set + { + this.OnVMSizeChanging(value); + this._VMSize = value; + this.OnVMSizeChanged(); + this.OnPropertyChanged("VMSize"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _VMSize; + partial void OnVMSizeChanging(string value); + partial void OnVMSizeChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType MicrosoftCompute.StorageProfile in the schema. + /// + public partial class StorageProfile : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new StorageProfile object. + /// + /// Initial value of DataVirtualHardDisks. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static StorageProfile CreateStorageProfile(global::System.Collections.ObjectModel.ObservableCollection dataVirtualHardDisks) + { + StorageProfile storageProfile = new StorageProfile(); + if ((dataVirtualHardDisks == null)) + { + throw new global::System.ArgumentNullException("dataVirtualHardDisks"); + } + storageProfile.DataVirtualHardDisks = dataVirtualHardDisks; + return storageProfile; + } + /// + /// There are no comments for Property OSVirtualHardDiskImage in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string OSVirtualHardDiskImage + { + get + { + return this._OSVirtualHardDiskImage; + } + set + { + this.OnOSVirtualHardDiskImageChanging(value); + this._OSVirtualHardDiskImage = value; + this.OnOSVirtualHardDiskImageChanged(); + this.OnPropertyChanged("OSVirtualHardDiskImage"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _OSVirtualHardDiskImage; + partial void OnOSVirtualHardDiskImageChanging(string value); + partial void OnOSVirtualHardDiskImageChanged(); + /// + /// There are no comments for Property DataVirtualHardDisks in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection DataVirtualHardDisks + { + get + { + return this._DataVirtualHardDisks; + } + set + { + this.OnDataVirtualHardDisksChanging(value); + this._DataVirtualHardDisks = value; + this.OnDataVirtualHardDisksChanged(); + this.OnPropertyChanged("DataVirtualHardDisks"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _DataVirtualHardDisks = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnDataVirtualHardDisksChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnDataVirtualHardDisksChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType MicrosoftCompute.DataVirtualHardDisk in the schema. + /// + public partial class DataVirtualHardDisk : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// There are no comments for Property DataVirtualHardDiskImage in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DataVirtualHardDiskImage + { + get + { + return this._DataVirtualHardDiskImage; + } + set + { + this.OnDataVirtualHardDiskImageChanging(value); + this._DataVirtualHardDiskImage = value; + this.OnDataVirtualHardDiskImageChanged(); + this.OnPropertyChanged("DataVirtualHardDiskImage"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DataVirtualHardDiskImage; + partial void OnDataVirtualHardDiskImageChanging(string value); + partial void OnDataVirtualHardDiskImageChanged(); + /// + /// There are no comments for Property Lun in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Lun + { + get + { + return this._Lun; + } + set + { + this.OnLunChanging(value); + this._Lun = value; + this.OnLunChanged(); + this.OnPropertyChanged("Lun"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Lun; + partial void OnLunChanging(string value); + partial void OnLunChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType MicrosoftCompute.OSProfile in the schema. + /// + public partial class OSProfile : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// There are no comments for Property ComputerNamePattern in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ComputerNamePattern + { + get + { + return this._ComputerNamePattern; + } + set + { + this.OnComputerNamePatternChanging(value); + this._ComputerNamePattern = value; + this.OnComputerNamePatternChanged(); + this.OnPropertyChanged("ComputerNamePattern"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ComputerNamePattern; + partial void OnComputerNamePatternChanging(string value); + partial void OnComputerNamePatternChanged(); + /// + /// There are no comments for Property TimeZone in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string TimeZone + { + get + { + return this._TimeZone; + } + set + { + this.OnTimeZoneChanging(value); + this._TimeZone = value; + this.OnTimeZoneChanged(); + this.OnPropertyChanged("TimeZone"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _TimeZone; + partial void OnTimeZoneChanging(string value); + partial void OnTimeZoneChanged(); + /// + /// There are no comments for Property AdminCredential in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string AdminCredential + { + get + { + return this._AdminCredential; + } + set + { + this.OnAdminCredentialChanging(value); + this._AdminCredential = value; + this.OnAdminCredentialChanged(); + this.OnPropertyChanged("AdminCredential"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _AdminCredential; + partial void OnAdminCredentialChanging(string value); + partial void OnAdminCredentialChanged(); + /// + /// There are no comments for Property WindowsOperatingSystemProfile in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public WindowsOperatingSystemProfile WindowsOperatingSystemProfile + { + get + { + if (((this._WindowsOperatingSystemProfile == null) + && (this._WindowsOperatingSystemProfileInitialized != true))) + { + this._WindowsOperatingSystemProfile = new WindowsOperatingSystemProfile(); + this._WindowsOperatingSystemProfileInitialized = true; + } + return this._WindowsOperatingSystemProfile; + } + set + { + this.OnWindowsOperatingSystemProfileChanging(value); + this._WindowsOperatingSystemProfile = value; + this._WindowsOperatingSystemProfileInitialized = true; + this.OnWindowsOperatingSystemProfileChanged(); + this.OnPropertyChanged("WindowsOperatingSystemProfile"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private WindowsOperatingSystemProfile _WindowsOperatingSystemProfile; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _WindowsOperatingSystemProfileInitialized; + partial void OnWindowsOperatingSystemProfileChanging(WindowsOperatingSystemProfile value); + partial void OnWindowsOperatingSystemProfileChanged(); + /// + /// There are no comments for Property LinuxOperatingSystemProfile in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public LinuxOperatingSystemProfile LinuxOperatingSystemProfile + { + get + { + if (((this._LinuxOperatingSystemProfile == null) + && (this._LinuxOperatingSystemProfileInitialized != true))) + { + this._LinuxOperatingSystemProfile = new LinuxOperatingSystemProfile(); + this._LinuxOperatingSystemProfileInitialized = true; + } + return this._LinuxOperatingSystemProfile; + } + set + { + this.OnLinuxOperatingSystemProfileChanging(value); + this._LinuxOperatingSystemProfile = value; + this._LinuxOperatingSystemProfileInitialized = true; + this.OnLinuxOperatingSystemProfileChanged(); + this.OnPropertyChanged("LinuxOperatingSystemProfile"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private LinuxOperatingSystemProfile _LinuxOperatingSystemProfile; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _LinuxOperatingSystemProfileInitialized; + partial void OnLinuxOperatingSystemProfileChanging(LinuxOperatingSystemProfile value); + partial void OnLinuxOperatingSystemProfileChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType MicrosoftCompute.WindowsOperatingSystemProfile in the schema. + /// + public partial class WindowsOperatingSystemProfile : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// There are no comments for Property WorkgroupName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string WorkgroupName + { + get + { + return this._WorkgroupName; + } + set + { + this.OnWorkgroupNameChanging(value); + this._WorkgroupName = value; + this.OnWorkgroupNameChanged(); + this.OnPropertyChanged("WorkgroupName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _WorkgroupName; + partial void OnWorkgroupNameChanging(string value); + partial void OnWorkgroupNameChanged(); + /// + /// There are no comments for Property DomainJoin in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public DomainJoin DomainJoin + { + get + { + if (((this._DomainJoin == null) + && (this._DomainJoinInitialized != true))) + { + this._DomainJoin = new DomainJoin(); + this._DomainJoinInitialized = true; + } + return this._DomainJoin; + } + set + { + this.OnDomainJoinChanging(value); + this._DomainJoin = value; + this._DomainJoinInitialized = true; + this.OnDomainJoinChanged(); + this.OnPropertyChanged("DomainJoin"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private DomainJoin _DomainJoin; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _DomainJoinInitialized; + partial void OnDomainJoinChanging(DomainJoin value); + partial void OnDomainJoinChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType MicrosoftCompute.DomainJoin in the schema. + /// + public partial class DomainJoin : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// There are no comments for Property DomainToJoin in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DomainToJoin + { + get + { + return this._DomainToJoin; + } + set + { + this.OnDomainToJoinChanging(value); + this._DomainToJoin = value; + this.OnDomainToJoinChanged(); + this.OnPropertyChanged("DomainToJoin"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DomainToJoin; + partial void OnDomainToJoinChanging(string value); + partial void OnDomainToJoinChanged(); + /// + /// There are no comments for Property DomainJoinCredentials in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DomainJoinCredentials + { + get + { + return this._DomainJoinCredentials; + } + set + { + this.OnDomainJoinCredentialsChanging(value); + this._DomainJoinCredentials = value; + this.OnDomainJoinCredentialsChanged(); + this.OnPropertyChanged("DomainJoinCredentials"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DomainJoinCredentials; + partial void OnDomainJoinCredentialsChanging(string value); + partial void OnDomainJoinCredentialsChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType MicrosoftCompute.LinuxOperatingSystemProfile in the schema. + /// + public partial class LinuxOperatingSystemProfile : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// There are no comments for Property DNSDomainName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DNSDomainName + { + get + { + return this._DNSDomainName; + } + set + { + this.OnDNSDomainNameChanging(value); + this._DNSDomainName = value; + this.OnDNSDomainNameChanged(); + this.OnPropertyChanged("DNSDomainName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DNSDomainName; + partial void OnDNSDomainNameChanging(string value); + partial void OnDNSDomainNameChanged(); + /// + /// There are no comments for Property SSHPublicKey in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string SSHPublicKey + { + get + { + return this._SSHPublicKey; + } + set + { + this.OnSSHPublicKeyChanging(value); + this._SSHPublicKey = value; + this.OnSSHPublicKeyChanged(); + this.OnPropertyChanged("SSHPublicKey"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _SSHPublicKey; + partial void OnSSHPublicKeyChanging(string value); + partial void OnSSHPublicKeyChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType MicrosoftCompute.NetworkProfile in the schema. + /// + public partial class NetworkProfile : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new NetworkProfile object. + /// + /// Initial value of NetworkAdapters. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static NetworkProfile CreateNetworkProfile(global::System.Collections.ObjectModel.ObservableCollection networkAdapters) + { + NetworkProfile networkProfile = new NetworkProfile(); + if ((networkAdapters == null)) + { + throw new global::System.ArgumentNullException("networkAdapters"); + } + networkProfile.NetworkAdapters = networkAdapters; + return networkProfile; + } + /// + /// There are no comments for Property NetworkAdapters in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection NetworkAdapters + { + get + { + return this._NetworkAdapters; + } + set + { + this.OnNetworkAdaptersChanging(value); + this._NetworkAdapters = value; + this.OnNetworkAdaptersChanged(); + this.OnPropertyChanged("NetworkAdapters"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _NetworkAdapters = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnNetworkAdaptersChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnNetworkAdaptersChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType MicrosoftCompute.NetworkAdapter in the schema. + /// + public partial class NetworkAdapter : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new NetworkAdapter object. + /// + /// Initial value of IPAddresses. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static NetworkAdapter CreateNetworkAdapter(global::System.Collections.ObjectModel.ObservableCollection iPAddresses) + { + NetworkAdapter networkAdapter = new NetworkAdapter(); + if ((iPAddresses == null)) + { + throw new global::System.ArgumentNullException("iPAddresses"); + } + networkAdapter.IPAddresses = iPAddresses; + return networkAdapter; + } + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property NetworkRef in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string NetworkRef + { + get + { + return this._NetworkRef; + } + set + { + this.OnNetworkRefChanging(value); + this._NetworkRef = value; + this.OnNetworkRefChanged(); + this.OnPropertyChanged("NetworkRef"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _NetworkRef; + partial void OnNetworkRefChanging(string value); + partial void OnNetworkRefChanged(); + /// + /// There are no comments for Property IPAddresses in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection IPAddresses + { + get + { + return this._IPAddresses; + } + set + { + this.OnIPAddressesChanging(value); + this._IPAddresses = value; + this.OnIPAddressesChanged(); + this.OnPropertyChanged("IPAddresses"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _IPAddresses = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnIPAddressesChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnIPAddressesChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType MicrosoftCompute.IPAddress in the schema. + /// + public partial class IPAddress : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new IPAddress object. + /// + /// Initial value of LoadBalancerConfigurations. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static IPAddress CreateIPAddress(global::System.Collections.ObjectModel.ObservableCollection loadBalancerConfigurations) + { + IPAddress iPAddress = new IPAddress(); + if ((loadBalancerConfigurations == null)) + { + throw new global::System.ArgumentNullException("loadBalancerConfigurations"); + } + iPAddress.LoadBalancerConfigurations = loadBalancerConfigurations; + return iPAddress; + } + /// + /// There are no comments for Property AllocationMethod in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string AllocationMethod + { + get + { + return this._AllocationMethod; + } + set + { + this.OnAllocationMethodChanging(value); + this._AllocationMethod = value; + this.OnAllocationMethodChanged(); + this.OnPropertyChanged("AllocationMethod"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _AllocationMethod; + partial void OnAllocationMethodChanging(string value); + partial void OnAllocationMethodChanged(); + /// + /// There are no comments for Property Type in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Type + { + get + { + return this._Type; + } + set + { + this.OnTypeChanging(value); + this._Type = value; + this.OnTypeChanged(); + this.OnPropertyChanged("Type"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Type; + partial void OnTypeChanging(string value); + partial void OnTypeChanged(); + /// + /// There are no comments for Property ConfigurationName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ConfigurationName + { + get + { + return this._ConfigurationName; + } + set + { + this.OnConfigurationNameChanging(value); + this._ConfigurationName = value; + this.OnConfigurationNameChanged(); + this.OnPropertyChanged("ConfigurationName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ConfigurationName; + partial void OnConfigurationNameChanging(string value); + partial void OnConfigurationNameChanged(); + /// + /// There are no comments for Property LoadBalancerConfigurations in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection LoadBalancerConfigurations + { + get + { + return this._LoadBalancerConfigurations; + } + set + { + this.OnLoadBalancerConfigurationsChanging(value); + this._LoadBalancerConfigurations = value; + this.OnLoadBalancerConfigurationsChanged(); + this.OnPropertyChanged("LoadBalancerConfigurations"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _LoadBalancerConfigurations = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnLoadBalancerConfigurationsChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnLoadBalancerConfigurationsChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType MicrosoftCompute.LoadBalancerConfiguration in the schema. + /// + public partial class LoadBalancerConfiguration : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// There are no comments for Property ConfigurationName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ConfigurationName + { + get + { + return this._ConfigurationName; + } + set + { + this.OnConfigurationNameChanging(value); + this._ConfigurationName = value; + this.OnConfigurationNameChanged(); + this.OnPropertyChanged("ConfigurationName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ConfigurationName; + partial void OnConfigurationNameChanging(string value); + partial void OnConfigurationNameChanged(); + /// + /// There are no comments for Property FrontEndNetwork in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string FrontEndNetwork + { + get + { + return this._FrontEndNetwork; + } + set + { + this.OnFrontEndNetworkChanging(value); + this._FrontEndNetwork = value; + this.OnFrontEndNetworkChanged(); + this.OnPropertyChanged("FrontEndNetwork"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _FrontEndNetwork; + partial void OnFrontEndNetworkChanging(string value); + partial void OnFrontEndNetworkChanged(); + /// + /// There are no comments for Property PortConfig in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public PortConfiguration PortConfig + { + get + { + if (((this._PortConfig == null) + && (this._PortConfigInitialized != true))) + { + this._PortConfig = new PortConfiguration(); + this._PortConfigInitialized = true; + } + return this._PortConfig; + } + set + { + this.OnPortConfigChanging(value); + this._PortConfig = value; + this._PortConfigInitialized = true; + this.OnPortConfigChanged(); + this.OnPropertyChanged("PortConfig"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private PortConfiguration _PortConfig; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _PortConfigInitialized; + partial void OnPortConfigChanging(PortConfiguration value); + partial void OnPortConfigChanged(); + /// + /// There are no comments for Property Probe in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public Probe Probe + { + get + { + if (((this._Probe == null) + && (this._ProbeInitialized != true))) + { + this._Probe = new Probe(); + this._ProbeInitialized = true; + } + return this._Probe; + } + set + { + this.OnProbeChanging(value); + this._Probe = value; + this._ProbeInitialized = true; + this.OnProbeChanged(); + this.OnPropertyChanged("Probe"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private Probe _Probe; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _ProbeInitialized; + partial void OnProbeChanging(Probe value); + partial void OnProbeChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType MicrosoftCompute.PortConfiguration in the schema. + /// + public partial class PortConfiguration : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property Protocol in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Protocol + { + get + { + return this._Protocol; + } + set + { + this.OnProtocolChanging(value); + this._Protocol = value; + this.OnProtocolChanged(); + this.OnPropertyChanged("Protocol"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Protocol; + partial void OnProtocolChanging(string value); + partial void OnProtocolChanged(); + /// + /// There are no comments for Property FrontEndPort in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string FrontEndPort + { + get + { + return this._FrontEndPort; + } + set + { + this.OnFrontEndPortChanging(value); + this._FrontEndPort = value; + this.OnFrontEndPortChanged(); + this.OnPropertyChanged("FrontEndPort"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _FrontEndPort; + partial void OnFrontEndPortChanging(string value); + partial void OnFrontEndPortChanged(); + /// + /// There are no comments for Property BackEndPort in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string BackEndPort + { + get + { + return this._BackEndPort; + } + set + { + this.OnBackEndPortChanging(value); + this._BackEndPort = value; + this.OnBackEndPortChanged(); + this.OnPropertyChanged("BackEndPort"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _BackEndPort; + partial void OnBackEndPortChanging(string value); + partial void OnBackEndPortChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType MicrosoftCompute.Probe in the schema. + /// + public partial class Probe : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// There are no comments for Property ProbeIntervalInSeconds in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ProbeIntervalInSeconds + { + get + { + return this._ProbeIntervalInSeconds; + } + set + { + this.OnProbeIntervalInSecondsChanging(value); + this._ProbeIntervalInSeconds = value; + this.OnProbeIntervalInSecondsChanged(); + this.OnPropertyChanged("ProbeIntervalInSeconds"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ProbeIntervalInSeconds; + partial void OnProbeIntervalInSecondsChanging(string value); + partial void OnProbeIntervalInSecondsChanged(); + /// + /// There are no comments for Property Protocol in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Protocol + { + get + { + return this._Protocol; + } + set + { + this.OnProtocolChanging(value); + this._Protocol = value; + this.OnProtocolChanged(); + this.OnPropertyChanged("Protocol"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Protocol; + partial void OnProtocolChanging(string value); + partial void OnProtocolChanged(); + /// + /// There are no comments for Property Port in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Port + { + get + { + return this._Port; + } + set + { + this.OnPortChanging(value); + this._Port = value; + this.OnPortChanged(); + this.OnPropertyChanged("Port"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Port; + partial void OnPortChanging(string value); + partial void OnPortChanged(); + /// + /// There are no comments for Property MaxRetryCount in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string MaxRetryCount + { + get + { + return this._MaxRetryCount; + } + set + { + this.OnMaxRetryCountChanging(value); + this._MaxRetryCount = value; + this.OnMaxRetryCountChanged(); + this.OnPropertyChanged("MaxRetryCount"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _MaxRetryCount; + partial void OnMaxRetryCountChanging(string value); + partial void OnMaxRetryCountChanged(); + /// + /// There are no comments for Property RequestPath in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string RequestPath + { + get + { + return this._RequestPath; + } + set + { + this.OnRequestPathChanging(value); + this._RequestPath = value; + this.OnRequestPathChanged(); + this.OnPropertyChanged("RequestPath"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _RequestPath; + partial void OnRequestPathChanging(string value); + partial void OnRequestPathChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType MicrosoftCompute.ResourceConfiguration in the schema. + /// + public partial class ResourceConfiguration : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// There are no comments for Property Version in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Version + { + get + { + return this._Version; + } + set + { + this.OnVersionChanging(value); + this._Version = value; + this.OnVersionChanged(); + this.OnPropertyChanged("Version"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Version; + partial void OnVersionChanging(string value); + partial void OnVersionChanged(); + /// + /// There are no comments for Property ParameterValues in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ParameterValues + { + get + { + return this._ParameterValues; + } + set + { + this.OnParameterValuesChanging(value); + this._ParameterValues = value; + this.OnParameterValuesChanged(); + this.OnPropertyChanged("ParameterValues"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ParameterValues; + partial void OnParameterValuesChanging(string value); + partial void OnParameterValuesChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType MicrosoftCompute.Substate in the schema. + /// + public partial class Substate : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new Substate object. + /// + /// Initial value of VMRoleMessages. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static Substate CreateSubstate(global::System.Collections.ObjectModel.ObservableCollection vMRoleMessages) + { + Substate substate = new Substate(); + if ((vMRoleMessages == null)) + { + throw new global::System.ArgumentNullException("vMRoleMessages"); + } + substate.VMRoleMessages = vMRoleMessages; + return substate; + } + /// + /// There are no comments for Property VMRoleMessages in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection VMRoleMessages + { + get + { + return this._VMRoleMessages; + } + set + { + this.OnVMRoleMessagesChanging(value); + this._VMRoleMessages = value; + this.OnVMRoleMessagesChanged(); + this.OnPropertyChanged("VMRoleMessages"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _VMRoleMessages = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnVMRoleMessagesChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnVMRoleMessagesChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType MicrosoftCompute.VMRoleMessage in the schema. + /// + public partial class VMRoleMessage : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// There are no comments for Property VMId in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable VMId + { + get + { + return this._VMId; + } + set + { + this.OnVMIdChanging(value); + this._VMId = value; + this.OnVMIdChanged(); + this.OnPropertyChanged("VMId"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _VMId; + partial void OnVMIdChanging(global::System.Nullable value); + partial void OnVMIdChanged(); + /// + /// There are no comments for Property MessageQualifier in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string MessageQualifier + { + get + { + return this._MessageQualifier; + } + set + { + this.OnMessageQualifierChanging(value); + this._MessageQualifier = value; + this.OnMessageQualifierChanged(); + this.OnPropertyChanged("MessageQualifier"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _MessageQualifier; + partial void OnMessageQualifierChanging(string value); + partial void OnMessageQualifierChanged(); + /// + /// There are no comments for Property Message in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Message + { + get + { + return this._Message; + } + set + { + this.OnMessageChanging(value); + this._Message = value; + this.OnMessageChanged(); + this.OnPropertyChanged("Message"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Message; + partial void OnMessageChanging(string value); + partial void OnMessageChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType MicrosoftCompute.InstanceView in the schema. + /// + public partial class InstanceView : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new InstanceView object. + /// + /// Initial value of VIPs. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static InstanceView CreateInstanceView(global::System.Collections.ObjectModel.ObservableCollection vIPs) + { + InstanceView instanceView = new InstanceView(); + if ((vIPs == null)) + { + throw new global::System.ArgumentNullException("vIPs"); + } + instanceView.VIPs = vIPs; + return instanceView; + } + /// + /// There are no comments for Property VIPs in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection VIPs + { + get + { + return this._VIPs; + } + set + { + this.OnVIPsChanging(value); + this._VIPs = value; + this.OnVIPsChanged(); + this.OnPropertyChanged("VIPs"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _VIPs = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnVIPsChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnVIPsChanged(); + /// + /// There are no comments for Property InstanceCount in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable InstanceCount + { + get + { + return this._InstanceCount; + } + set + { + this.OnInstanceCountChanging(value); + this._InstanceCount = value; + this.OnInstanceCountChanged(); + this.OnPropertyChanged("InstanceCount"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _InstanceCount; + partial void OnInstanceCountChanging(global::System.Nullable value); + partial void OnInstanceCountChanged(); + /// + /// There are no comments for Property ResolvedResourceDefinition in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public VMRoleResourceDefinition ResolvedResourceDefinition + { + get + { + if (((this._ResolvedResourceDefinition == null) + && (this._ResolvedResourceDefinitionInitialized != true))) + { + this._ResolvedResourceDefinition = new VMRoleResourceDefinition(); + this._ResolvedResourceDefinitionInitialized = true; + } + return this._ResolvedResourceDefinition; + } + set + { + this.OnResolvedResourceDefinitionChanging(value); + this._ResolvedResourceDefinition = value; + this._ResolvedResourceDefinitionInitialized = true; + this.OnResolvedResourceDefinitionChanged(); + this.OnPropertyChanged("ResolvedResourceDefinition"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private VMRoleResourceDefinition _ResolvedResourceDefinition; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _ResolvedResourceDefinitionInitialized; + partial void OnResolvedResourceDefinitionChanging(VMRoleResourceDefinition value); + partial void OnResolvedResourceDefinitionChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType MicrosoftCompute.VMRoleVIP in the schema. + /// + public partial class VMRoleVIP : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// There are no comments for Property NetworkAdapterName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string NetworkAdapterName + { + get + { + return this._NetworkAdapterName; + } + set + { + this.OnNetworkAdapterNameChanging(value); + this._NetworkAdapterName = value; + this.OnNetworkAdapterNameChanged(); + this.OnPropertyChanged("NetworkAdapterName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _NetworkAdapterName; + partial void OnNetworkAdapterNameChanging(string value); + partial void OnNetworkAdapterNameChanged(); + /// + /// There are no comments for Property LoadbalancerConfigurationName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string LoadbalancerConfigurationName + { + get + { + return this._LoadbalancerConfigurationName; + } + set + { + this.OnLoadbalancerConfigurationNameChanging(value); + this._LoadbalancerConfigurationName = value; + this.OnLoadbalancerConfigurationNameChanged(); + this.OnPropertyChanged("LoadbalancerConfigurationName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _LoadbalancerConfigurationName; + partial void OnLoadbalancerConfigurationNameChanging(string value); + partial void OnLoadbalancerConfigurationNameChanged(); + /// + /// There are no comments for Property VIP in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string VIP + { + get + { + return this._VIP; + } + set + { + this.OnVIPChanging(value); + this._VIP = value; + this.OnVIPChanged(); + this.OnPropertyChanged("VIP"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _VIP; + partial void OnVIPChanging(string value); + partial void OnVIPChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for MicrosoftCompute.VMRole in the schema. + /// + /// + /// Name + /// + [global::System.Data.Services.Common.EntitySetAttribute("VMRole")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("Name")] + public partial class VMRole : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new VMRole object. + /// + /// Initial value of Name. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static VMRole CreateVMRole(string name) + { + VMRole vMRole = new VMRole(); + vMRole.Name = name; + return vMRole; + } + /// + /// There are no comments for Property Name in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + this.OnPropertyChanged("Name"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property Label in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Label + { + get + { + return this._Label; + } + set + { + this.OnLabelChanging(value); + this._Label = value; + this.OnLabelChanged(); + this.OnPropertyChanged("Label"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Label; + partial void OnLabelChanging(string value); + partial void OnLabelChanged(); + /// + /// There are no comments for Property ResourceDefinition in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public VMRoleResourceDefinition ResourceDefinition + { + get + { + if (((this._ResourceDefinition == null) + && (this._ResourceDefinitionInitialized != true))) + { + this._ResourceDefinition = new VMRoleResourceDefinition(); + this._ResourceDefinitionInitialized = true; + } + return this._ResourceDefinition; + } + set + { + this.OnResourceDefinitionChanging(value); + this._ResourceDefinition = value; + this._ResourceDefinitionInitialized = true; + this.OnResourceDefinitionChanged(); + this.OnPropertyChanged("ResourceDefinition"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private VMRoleResourceDefinition _ResourceDefinition; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _ResourceDefinitionInitialized; + partial void OnResourceDefinitionChanging(VMRoleResourceDefinition value); + partial void OnResourceDefinitionChanged(); + /// + /// There are no comments for Property ResourceConfiguration in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public ResourceConfiguration ResourceConfiguration + { + get + { + if (((this._ResourceConfiguration == null) + && (this._ResourceConfigurationInitialized != true))) + { + this._ResourceConfiguration = new ResourceConfiguration(); + this._ResourceConfigurationInitialized = true; + } + return this._ResourceConfiguration; + } + set + { + this.OnResourceConfigurationChanging(value); + this._ResourceConfiguration = value; + this._ResourceConfigurationInitialized = true; + this.OnResourceConfigurationChanged(); + this.OnPropertyChanged("ResourceConfiguration"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private ResourceConfiguration _ResourceConfiguration; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _ResourceConfigurationInitialized; + partial void OnResourceConfigurationChanging(ResourceConfiguration value); + partial void OnResourceConfigurationChanged(); + /// + /// There are no comments for Property ProvisioningState in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ProvisioningState + { + get + { + return this._ProvisioningState; + } + set + { + this.OnProvisioningStateChanging(value); + this._ProvisioningState = value; + this.OnProvisioningStateChanged(); + this.OnPropertyChanged("ProvisioningState"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ProvisioningState; + partial void OnProvisioningStateChanging(string value); + partial void OnProvisioningStateChanged(); + /// + /// There are no comments for Property Substate in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public Substate Substate + { + get + { + if (((this._Substate == null) + && (this._SubstateInitialized != true))) + { + this._Substate = new Substate(); + this._SubstateInitialized = true; + } + return this._Substate; + } + set + { + this.OnSubstateChanging(value); + this._Substate = value; + this._SubstateInitialized = true; + this.OnSubstateChanged(); + this.OnPropertyChanged("Substate"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private Substate _Substate; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _SubstateInitialized; + partial void OnSubstateChanging(Substate value); + partial void OnSubstateChanged(); + /// + /// There are no comments for Property InstanceView in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public InstanceView InstanceView + { + get + { + if (((this._InstanceView == null) + && (this._InstanceViewInitialized != true))) + { + this._InstanceView = new InstanceView(); + this._InstanceViewInitialized = true; + } + return this._InstanceView; + } + set + { + this.OnInstanceViewChanging(value); + this._InstanceView = value; + this._InstanceViewInitialized = true; + this.OnInstanceViewChanged(); + this.OnPropertyChanged("InstanceView"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private InstanceView _InstanceView; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _InstanceViewInitialized; + partial void OnInstanceViewChanging(InstanceView value); + partial void OnInstanceViewChanged(); + /// + /// There are no comments for VMs in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection VMs + { + get + { + return this._VMs; + } + set + { + this._VMs = value; + this.OnPropertyChanged("VMs"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _VMs = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for ComplexType MicrosoftCompute.ConnectToAddress in the schema. + /// + public partial class ConnectToAddress : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// There are no comments for Property IPAddress in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string IPAddress + { + get + { + return this._IPAddress; + } + set + { + this.OnIPAddressChanging(value); + this._IPAddress = value; + this.OnIPAddressChanged(); + this.OnPropertyChanged("IPAddress"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _IPAddress; + partial void OnIPAddressChanging(string value); + partial void OnIPAddressChanged(); + /// + /// There are no comments for Property NetworkName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string NetworkName + { + get + { + return this._NetworkName; + } + set + { + this.OnNetworkNameChanging(value); + this._NetworkName = value; + this.OnNetworkNameChanged(); + this.OnPropertyChanged("NetworkName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _NetworkName; + partial void OnNetworkNameChanging(string value); + partial void OnNetworkNameChanged(); + /// + /// There are no comments for Property Port in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Port + { + get + { + return this._Port; + } + set + { + this.OnPortChanging(value); + this._Port = value; + this.OnPortChanged(); + this.OnPropertyChanged("Port"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Port; + partial void OnPortChanging(global::System.Nullable value); + partial void OnPortChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for MicrosoftCompute.VM in the schema. + /// + /// + /// Id + /// + [global::System.Data.Services.Common.EntitySetAttribute("VM")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("Id")] + public partial class VM : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new VM object. + /// + /// Initial value of Id. + /// Initial value of ConnectToAddresses. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static VM CreateVM(global::System.Guid ID, global::System.Collections.ObjectModel.ObservableCollection connectToAddresses) + { + VM vM = new VM(); + vM.Id = ID; + if ((connectToAddresses == null)) + { + throw new global::System.ArgumentNullException("connectToAddresses"); + } + vM.ConnectToAddresses = connectToAddresses; + return vM; + } + /// + /// There are no comments for Property Id in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid Id + { + get + { + return this._Id; + } + set + { + this.OnIdChanging(value); + this._Id = value; + this.OnIdChanged(); + this.OnPropertyChanged("Id"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _Id; + partial void OnIdChanging(global::System.Guid value); + partial void OnIdChanged(); + /// + /// There are no comments for Property ComputerName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ComputerName + { + get + { + return this._ComputerName; + } + set + { + this.OnComputerNameChanging(value); + this._ComputerName = value; + this.OnComputerNameChanged(); + this.OnPropertyChanged("ComputerName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ComputerName; + partial void OnComputerNameChanging(string value); + partial void OnComputerNameChanged(); + /// + /// There are no comments for Property RuntimeState in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string RuntimeState + { + get + { + return this._RuntimeState; + } + set + { + this.OnRuntimeStateChanging(value); + this._RuntimeState = value; + this.OnRuntimeStateChanged(); + this.OnPropertyChanged("RuntimeState"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _RuntimeState; + partial void OnRuntimeStateChanging(string value); + partial void OnRuntimeStateChanged(); + /// + /// There are no comments for Property ConnectToAddresses in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection ConnectToAddresses + { + get + { + return this._ConnectToAddresses; + } + set + { + this.OnConnectToAddressesChanging(value); + this._ConnectToAddresses = value; + this.OnConnectToAddressesChanged(); + this.OnPropertyChanged("ConnectToAddresses"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _ConnectToAddresses = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnConnectToAddressesChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnConnectToAddressesChanged(); + /// + /// There are no comments for Disks in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection Disks + { + get + { + return this._Disks; + } + set + { + this._Disks = value; + this.OnPropertyChanged("Disks"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _Disks = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + /// + /// There are no comments for Nics in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceCollection Nics + { + get + { + return this._Nics; + } + set + { + this._Nics = value; + this.OnPropertyChanged("Nics"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceCollection _Nics = new global::System.Data.Services.Client.DataServiceCollection(null, global::System.Data.Services.Client.TrackingMode.None); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for MicrosoftCompute.VMRoleVMDisk in the schema. + /// + /// + /// Id + /// + [global::System.Data.Services.Common.EntitySetAttribute("VMRoleVMDisk")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("Id")] + public partial class VMRoleVMDisk : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new VMRoleVMDisk object. + /// + /// Initial value of Id. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static VMRoleVMDisk CreateVMRoleVMDisk(global::System.Guid ID) + { + VMRoleVMDisk vMRoleVMDisk = new VMRoleVMDisk(); + vMRoleVMDisk.Id = ID; + return vMRoleVMDisk; + } + /// + /// There are no comments for Property Id in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid Id + { + get + { + return this._Id; + } + set + { + this.OnIdChanging(value); + this._Id = value; + this.OnIdChanged(); + this.OnPropertyChanged("Id"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _Id; + partial void OnIdChanging(global::System.Guid value); + partial void OnIdChanged(); + /// + /// There are no comments for Property DataVirtualHardDiskImage in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DataVirtualHardDiskImage + { + get + { + return this._DataVirtualHardDiskImage; + } + set + { + this.OnDataVirtualHardDiskImageChanging(value); + this._DataVirtualHardDiskImage = value; + this.OnDataVirtualHardDiskImageChanged(); + this.OnPropertyChanged("DataVirtualHardDiskImage"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DataVirtualHardDiskImage; + partial void OnDataVirtualHardDiskImageChanging(string value); + partial void OnDataVirtualHardDiskImageChanged(); + /// + /// There are no comments for Property DiskLun in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable DiskLun + { + get + { + return this._DiskLun; + } + set + { + this.OnDiskLunChanging(value); + this._DiskLun = value; + this.OnDiskLunChanged(); + this.OnPropertyChanged("DiskLun"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _DiskLun; + partial void OnDiskLunChanging(global::System.Nullable value); + partial void OnDiskLunChanged(); + /// + /// There are no comments for Property DiskDataFile in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DiskDataFile + { + get + { + return this._DiskDataFile; + } + set + { + this.OnDiskDataFileChanging(value); + this._DiskDataFile = value; + this.OnDiskDataFileChanged(); + this.OnPropertyChanged("DiskDataFile"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DiskDataFile; + partial void OnDiskDataFileChanging(string value); + partial void OnDiskDataFileChanged(); + /// + /// There are no comments for Property DiskSize in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable DiskSize + { + get + { + return this._DiskSize; + } + set + { + this.OnDiskSizeChanging(value); + this._DiskSize = value; + this.OnDiskSizeChanged(); + this.OnPropertyChanged("DiskSize"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _DiskSize; + partial void OnDiskSizeChanging(global::System.Nullable value); + partial void OnDiskSizeChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } + /// + /// There are no comments for MicrosoftCompute.VMRoleVMNic in the schema. + /// + /// + /// Id + /// + [global::System.Data.Services.Common.EntitySetAttribute("VMRoleVMNic")] + [global::System.Data.Services.Common.DataServiceKeyAttribute("Id")] + public partial class VMRoleVMNic : global::System.ComponentModel.INotifyPropertyChanged + { + /// + /// Create a new VMRoleVMNic object. + /// + /// Initial value of Id. + /// Initial value of CurrentIpAddresses. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static VMRoleVMNic CreateVMRoleVMNic(global::System.Guid ID, global::System.Collections.ObjectModel.ObservableCollection currentIpAddresses) + { + VMRoleVMNic vMRoleVMNic = new VMRoleVMNic(); + vMRoleVMNic.Id = ID; + if ((currentIpAddresses == null)) + { + throw new global::System.ArgumentNullException("currentIpAddresses"); + } + vMRoleVMNic.CurrentIpAddresses = currentIpAddresses; + return vMRoleVMNic; + } + /// + /// There are no comments for Property Id in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid Id + { + get + { + return this._Id; + } + set + { + this.OnIdChanging(value); + this._Id = value; + this.OnIdChanged(); + this.OnPropertyChanged("Id"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _Id; + partial void OnIdChanging(global::System.Guid value); + partial void OnIdChanged(); + /// + /// There are no comments for Property NetworkAdapterName in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string NetworkAdapterName + { + get + { + return this._NetworkAdapterName; + } + set + { + this.OnNetworkAdapterNameChanging(value); + this._NetworkAdapterName = value; + this.OnNetworkAdapterNameChanged(); + this.OnPropertyChanged("NetworkAdapterName"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _NetworkAdapterName; + partial void OnNetworkAdapterNameChanging(string value); + partial void OnNetworkAdapterNameChanged(); + /// + /// There are no comments for Property CurrentIpAddresses in the schema. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.ObservableCollection CurrentIpAddresses + { + get + { + return this._CurrentIpAddresses; + } + set + { + this.OnCurrentIpAddressesChanging(value); + this._CurrentIpAddresses = value; + this.OnCurrentIpAddressesChanged(); + this.OnPropertyChanged("CurrentIpAddresses"); + } + } + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.ObservableCollection _CurrentIpAddresses = new global::System.Collections.ObjectModel.ObservableCollection(); + partial void OnCurrentIpAddressesChanging(global::System.Collections.ObjectModel.ObservableCollection value); + partial void OnCurrentIpAddressesChanged(); + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public event global::System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + protected virtual void OnPropertyChanged(string property) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new global::System.ComponentModel.PropertyChangedEventArgs(property)); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Exceptions/WAPackOperationException.cs b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Exceptions/WAPackOperationException.cs new file mode 100644 index 000000000000..aa5c8b46396c --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Exceptions/WAPackOperationException.cs @@ -0,0 +1,32 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Exceptions +{ + [Serializable] + public class WAPackOperationException : Exception + { + public WAPackOperationException(string message) + : base(message) + { + } + + public WAPackOperationException(string message, Exception exception) + : base(message, exception) + { + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Exceptions/WAPackWebException.cs b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Exceptions/WAPackWebException.cs new file mode 100644 index 000000000000..5d685a27ebbc --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Exceptions/WAPackWebException.cs @@ -0,0 +1,55 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Net; +using System.Runtime.Serialization; +using System.Security.Permissions; + +namespace Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Exceptions +{ + [Serializable] + public class WAPackWebException : Exception + { + public HttpStatusCode StatusCode { get; private set; } + private const string StatusCodeName = "StatusCode"; + + public WAPackWebException(HttpStatusCode statusCode, string message) + : base(message) + { + this.StatusCode = statusCode; + } + + public WAPackWebException(HttpStatusCode statusCode, string message, Exception exception) + : base(message, exception) + { + this.StatusCode = statusCode; + } + + public WAPackWebException(SerializationInfo info, StreamingContext context) + : base(info, context) + { + this.StatusCode = (HttpStatusCode)info.GetValue(WAPackWebException.StatusCodeName, + typeof(HttpStatusCode)); + } + + [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] + public override void GetObjectData(SerializationInfo info, StreamingContext context) + { + base.GetObjectData(info, context); + + info.AddValue(WAPackWebException.StatusCodeName, this.StatusCode); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/ILogger.cs b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/ILogger.cs new file mode 100644 index 000000000000..6aa5b80ae205 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/ILogger.cs @@ -0,0 +1,32 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS +{ + public enum LogLevel + { + Off = 0, + Info, + Debug, + Verbose, + Error + }; + + public interface ILogger + { + void Log(LogLevel logLevel, String message); + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/JobInfo.cs b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/JobInfo.cs new file mode 100644 index 000000000000..92706ea5ad80 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/JobInfo.cs @@ -0,0 +1,38 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS +{ + + public enum JobStatusEnum + { + CompletedSuccessfully = 0, + Failed, + JobNotFound, + OperationTimedOut + } + + internal class JobInfo + { + public JobStatusEnum jobStatus; + + public string errorMessage; + + public JobInfo(JobStatusEnum jobStatus, string errorMessage) + { + this.errorMessage = errorMessage; + this.jobStatus = jobStatus; + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/CloudOperations.cs b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/CloudOperations.cs new file mode 100644 index 000000000000..e5757e29e068 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/CloudOperations.cs @@ -0,0 +1,46 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Exceptions; + +namespace Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations +{ + internal class CloudOperations : OperationsBase + { + public CloudOperations(WebClientFactory webClientFactory) + : base(webClientFactory, "/Clouds") + { + } + + /// + /// Reads the list of clouds and returns the first one. + /// This is a helper function for other operations classes which sometimes need cloudId and/or stampId to do their jos. + /// It is okay to blindly take the first cloud because WAP subscriptions are currently limited to one cloud and one stamp. + /// i.e., there should only be one cloud available anyway. + /// + /// + public static Cloud ReadFirstCloud(WebClientFactory webClientFactory) + { + var ops = new CloudOperations(webClientFactory); + var cloudList = ops.Read(); + + if (cloudList.Count <= 0) + throw new WAPackOperationException(Resources.NoCloudsAvailable); + + return cloudList[0]; + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/CloudServiceOperations.cs b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/CloudServiceOperations.cs new file mode 100644 index 000000000000..e59191251adf --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/CloudServiceOperations.cs @@ -0,0 +1,96 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Net; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Exceptions; + +namespace Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations +{ + internal class CloudServiceOperations : OperationsBase + { + private const string genericBaseUri = "/CloudServices?api-version=2013-03"; + private const string specificBaseUri = "/CloudServices/{0}?api-version=2013-03"; + private const string cloudResourceUri = "/CloudServices/{0}/Resources?api-version=2013-03"; + + public CloudServiceOperations(WebClientFactory webClientFactory) + : base(webClientFactory, genericBaseUri) + { + } + + public override DataContract.CloudService Create(DataContract.CloudService cloudServiceToCreate, out Guid? jobId) + { + var client = this.webClientFactory.CreateClient(genericBaseUri); + WebHeaderCollection outHeaders; + var resultList = client.Create(cloudServiceToCreate, out outHeaders); + + if (resultList.Count <= 0) + throw new WAPackOperationException(Resources.ErrorCreatingCloudService); + + jobId = TryGetJobIdFromHeaders(outHeaders); + + return resultList[0]; + } + + public override List Read() + { + var client = this.webClientFactory.CreateClient(genericBaseUri); + + WebHeaderCollection outHeaders; + var cloudServices = client.Get(out outHeaders); + + foreach (var cloudService in cloudServices) + { + client = this.webClientFactory.CreateClient(String.Format(cloudResourceUri, cloudService.Name)); + var cloudResource = client.Get(out outHeaders); + + VMRoleOperations vmRoleOperations = new VMRoleOperations(this.webClientFactory); + cloudResource[0].VMRoles.Load(vmRoleOperations.Read(cloudService.Name)); + cloudService.Resources.Load(cloudResource); + } + + return cloudServices; + } + + public DataContract.CloudService Read(string cloudServiceName) + { + var client = this.webClientFactory.CreateClient(String.Format(specificBaseUri, cloudServiceName)); + + WebHeaderCollection outHeaders; + var cloudService = client.Get(out outHeaders)[0]; + + client = this.webClientFactory.CreateClient(String.Format(cloudResourceUri, cloudServiceName)); + var cloudResource = client.Get(out outHeaders)[0]; + + VMRoleOperations vmRoleOperations = new VMRoleOperations(this.webClientFactory); + cloudResource.VMRoles.Load(vmRoleOperations.Read(cloudServiceName)); + cloudService.Resources.Load(cloudResource); + + return cloudService; + } + + public void Delete(string cloudServiceName, out Guid? jobId) + { + var client = this.webClientFactory.CreateClient(String.Format(specificBaseUri, cloudServiceName)); + + WebHeaderCollection outHeaders; + client.Delete(out outHeaders); + + jobId = TryGetJobIdFromHeaders(outHeaders); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/HardwareProfileOperations.cs b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/HardwareProfileOperations.cs new file mode 100644 index 000000000000..883d1a9317ab --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/HardwareProfileOperations.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; + +namespace Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations +{ + internal class HardwareProfileOperations : OperationsBase + { + public HardwareProfileOperations(WebClientFactory webClientFactory) + : base(webClientFactory, "/HardwareProfiles") + { + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/JobOperations.cs b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/JobOperations.cs new file mode 100644 index 000000000000..11f23f3fbc0d --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/JobOperations.cs @@ -0,0 +1,87 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Exceptions; + +namespace Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations +{ + internal class JobOperations : OperationsBase + { + public JobOperations(WebClientFactory webClientFactory) + : base(webClientFactory, "/Jobs") + { + } + + /// + /// Waits until the job with the given ID is completed, then returns the job object. + /// Default timeout (-1) is unlimited, but can be limited by specifying a value in milliseconds. + /// If timeout is reached before the job is finished, the latest version of the job object is returned. + /// If timeout is a possibility, caller must check the returned job object to determine whether the job finished or timeout occurred. + /// + /// GUID of the job to wait on + /// Duration of time, in milliseconds, to wait for the job before returning. -1 means unlimited. + /// Job object + public JobInfo WaitOnJob(Guid jobId, long timeout = -1) + { + var errorMessage = String.Format(CultureInfo.InvariantCulture, Resources.OperationTimedOutOrError, jobId); + var startTime = DateTime.Now; + + Job job = null; + do + { + try + { + job = this.Read(jobId); + } + catch (WAPackOperationException) + { + break; + } + + if (job.IsCompleted == true) + break; + System.Threading.Thread.Sleep(3000); + } + while ((DateTime.Now - startTime).TotalMilliseconds < timeout || timeout < 0); + + if (job != null) + { + if ((String.Compare(job.Status, "Completed", StringComparison.InvariantCultureIgnoreCase) == 0) || + (String.Compare(job.Status, "SucceedWithInfo", StringComparison.InvariantCultureIgnoreCase) == 0)) + { + return new JobInfo(JobStatusEnum.CompletedSuccessfully, null); + } + else + if ((String.Compare(job.Status, "Invalid", StringComparison.InvariantCultureIgnoreCase) == 0) || + (String.Compare(job.Status, "Failed", StringComparison.InvariantCultureIgnoreCase) == 0) || + (String.Compare(job.Status, "Canceled", StringComparison.InvariantCultureIgnoreCase) == 0)) + { + errorMessage = string.Format(CultureInfo.InvariantCulture, Resources.FailedJobErrorMessage, jobId, job.ErrorInfo.ErrorCodeString, job.ErrorInfo.ExceptionDetails); + return new JobInfo(JobStatusEnum.Failed, errorMessage); + } + } + else + { + errorMessage = String.Format(CultureInfo.InvariantCulture, Resources.JobNotFound, jobId); + return new JobInfo(JobStatusEnum.JobNotFound, errorMessage); + } + + return new JobInfo(JobStatusEnum.OperationTimedOut, errorMessage); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/LogicalNetworkOperations.cs b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/LogicalNetworkOperations.cs new file mode 100644 index 000000000000..825ac27ecc73 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/LogicalNetworkOperations.cs @@ -0,0 +1,38 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; + +namespace Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations +{ + internal class LogicalNetworkOperations : OperationsBase + { + public LogicalNetworkOperations(WebClientFactory webClientFactory) + : base(webClientFactory, "/LogicalNetworks") + { + } + + public List Read(string logicalNetworkName) + { + var filter = new Dictionary + { + {"Name", logicalNetworkName} + }; + + var resultList = Read(filter); + return resultList; + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/OperationsBase.cs b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/OperationsBase.cs new file mode 100644 index 000000000000..59b8555a2e51 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/OperationsBase.cs @@ -0,0 +1,160 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Net; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Exceptions; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.WebClient; + +namespace Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations +{ + internal abstract class OperationsBase where T : class + { + protected readonly WebClientFactory webClientFactory; + protected readonly string uriSuffix; + + /// + /// The constructor for the base object of all operations classes. + /// Requires a WebClientFactory, which knows how to produce new web clients. + /// Also requires uri suffix of the resource. e.g., "/VirtualMachines". This is to provide a common way for operations classes to avoid hardcoding the suffixes. + /// + /// + /// + protected OperationsBase(WebClientFactory webClientFactory, string uriSuffix) + { + this.webClientFactory = webClientFactory; + this.uriSuffix = uriSuffix; + } + + /// + /// Submits request for creating object of type T. Returns "temporary" or "future" object if request is submitted successfully. + /// Caller must wait on jobId to track the status of the operation. + /// + /// + /// + /// + public virtual T Create(T vmToCreate, out Guid? jobId) + { + throw new NotImplementedException(); + } + + /// + /// Retrieves a resource by ID. + /// + /// Unique GUID of the resource to be returned + /// Resouce object (e.g., VirtualMachine, VirtualHardDisk, etc.) + /// TODO: CloudServices and VMRoles don't have GUID ID properties. Will need refactoring or changes + public virtual T Read(Guid id) + { + var filterDict = new Dictionary + { + {"ID", id.ToString()} + }; + + var resultList = this.Read(filterDict); + + if (resultList.Count <= 0) + throw new WAPackOperationException(string.Format(Resources.ResourceNotFound, id)); + + return resultList[0]; + } + + /// + /// Retrieves a list of all resources of type T. + /// + /// + public virtual List Read() + { + var resultList = this.Read(new Dictionary()); + return resultList; + } + + /// + /// Retrieves a list of all resources of type T which satisfy the complete set of key=value + /// filters passed as an argument. + /// + /// A dictionary of key=value filters that must be true for all returned objects + /// + internal List Read(IDictionary equalityFilters) + { + var client = this.webClientFactory.CreateClient(this.uriSuffix); + + foreach (var filter in equalityFilters) + client.AddHttpFilter(filter.Key, WebFilterOptions.eq, filter.Value); + + WebHeaderCollection outHeaders; + var resultList = client.Get(out outHeaders); + + return resultList; + } + + /// + /// Retrieves is the list of navigation property by expanding it on the parent resource. + /// + /// A dictionary of key=value filters that must be true for all returned objects + /// The navigation property to expand. + /// + internal List Read(IDictionary equalityFilters, string navigationProperty) + { + var client = this.webClientFactory.CreateClient(this.uriSuffix); + + foreach (var filter in equalityFilters) + client.AddHttpFilter(filter.Key, WebFilterOptions.eq, filter.Value); + + client.AddQueryParameters("$expand", navigationProperty); + WebHeaderCollection outHeaders; + var resultList = client.Get(out outHeaders); + + return resultList; + } + + /// + /// Submits request for updating a resource (arguments's ID must match the existing resource's ID). + /// Returns the temp object. + /// Caller must wait on jobId to track the status of the operation. + /// + /// + /// + /// + public virtual T Update(T toUpdate, out Guid? jobId) + { + throw new NotImplementedException(); + } + + /// + /// Submits request for deleting resource with given Id. + /// Caller must wait on jobId to track the status of the operation. + /// + /// + /// + /// + public virtual void Delete(Guid id, out Guid? jobId) + { + throw new NotImplementedException(); + } + + protected static Guid? TryGetJobIdFromHeaders(WebHeaderCollection headers) + { + var value = headers.Get("x-ms-request-id"); + + Guid toReturn; + + if (Guid.TryParse(value, out toReturn)) + return toReturn; + return null; + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/StaticIPAddressPoolOperations.cs b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/StaticIPAddressPoolOperations.cs new file mode 100644 index 000000000000..7ba9dba4398c --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/StaticIPAddressPoolOperations.cs @@ -0,0 +1,71 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Net; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Exceptions; + +namespace Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations +{ + internal class StaticIPAddressPoolOperations : OperationsBase + { + public StaticIPAddressPoolOperations(WebClientFactory webClientFactory) + : base(webClientFactory, "/StaticIPAddressPools") + { + } + + public override StaticIPAddressPool Create(StaticIPAddressPool staticIPAddressPool, out Guid? jobId) + { + var client = this.webClientFactory.CreateClient(this.uriSuffix); + + WebHeaderCollection outHeaders; + var resultList = client.Create(staticIPAddressPool, out outHeaders); + + if (resultList.Count <= 0) + throw new WAPackOperationException(Resources.ErrorCreatingStaticIPAddressPool); + + jobId = TryGetJobIdFromHeaders(outHeaders); + + return resultList[0]; + } + + public List Read(VMSubnet vmSubnet) + { + var filter = new Dictionary + { + {"StampId", vmSubnet.StampId.ToString()}, + {"VMSubnetId ", vmSubnet.ID.ToString()} + }; + + var resultList = Read(filter); + return resultList; + } + + public override void Delete(Guid id, out Guid? jobId) + { + var cloud = CloudOperations.ReadFirstCloud(this.webClientFactory); + Guid stampId = cloud.StampId; + + var client = this.webClientFactory.CreateClient(this.uriSuffix + String.Format("(ID=guid'{0}',StampId=guid'{1}')", id, stampId)); + + WebHeaderCollection outHeaders; + client.Delete(out outHeaders); + + jobId = TryGetJobIdFromHeaders(outHeaders); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/VMNetworkOperations.cs b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/VMNetworkOperations.cs new file mode 100644 index 000000000000..340a034891a6 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/VMNetworkOperations.cs @@ -0,0 +1,58 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Net; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Exceptions; + +namespace Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations +{ + internal class VMNetworkOperations : OperationsBase + { + public VMNetworkOperations(WebClientFactory webClientFactory) + : base(webClientFactory, "/VMNetworks") + { + } + + public override VMNetwork Create(VMNetwork vmNetwork, out Guid? jobId) + { + var client = this.webClientFactory.CreateClient(this.uriSuffix); + + WebHeaderCollection outHeaders; + var resultList = client.Create(vmNetwork, out outHeaders); + + if (resultList.Count <= 0) + throw new WAPackOperationException(Resources.ErrorCreatingVMNetwork); + + jobId = TryGetJobIdFromHeaders(outHeaders); + + return resultList[0]; + } + + public override void Delete(Guid id, out Guid? jobId) + { + var cloud = CloudOperations.ReadFirstCloud(this.webClientFactory); + Guid stampId = cloud.StampId; + + var client = this.webClientFactory.CreateClient(this.uriSuffix + String.Format("(ID=guid'{0}',StampId=guid'{1}')", id, stampId)); + + WebHeaderCollection outHeaders; + client.Delete(out outHeaders); + + jobId = TryGetJobIdFromHeaders(outHeaders); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/VMSubnetOperations.cs b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/VMSubnetOperations.cs new file mode 100644 index 000000000000..fe74924f0c83 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/VMSubnetOperations.cs @@ -0,0 +1,71 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Net; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Exceptions; + +namespace Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations +{ + internal class VMSubnetOperations : OperationsBase + { + public VMSubnetOperations(WebClientFactory webClientFactory) + : base(webClientFactory, "/VMSubnets") + { + } + + public override VMSubnet Create(VMSubnet vmSubnet, out Guid? jobId) + { + var client = this.webClientFactory.CreateClient(this.uriSuffix); + + WebHeaderCollection outHeaders; + var resultList = client.Create(vmSubnet, out outHeaders); + + if (resultList.Count <= 0) + throw new WAPackOperationException(Resources.ErrorCreatingVMSubnet); + + jobId = TryGetJobIdFromHeaders(outHeaders); + + return resultList[0]; + } + + public List Read(VMNetwork vmNetwork) + { + var filter = new Dictionary + { + {"StampId", vmNetwork.StampId.ToString()}, + {"VMNetworkId ", vmNetwork.ID.ToString()} + }; + + var resultList = Read(filter); + return resultList; + } + + public override void Delete(Guid id, out Guid? jobId) + { + var cloud = CloudOperations.ReadFirstCloud(this.webClientFactory); + Guid stampId = cloud.StampId; + + var client = this.webClientFactory.CreateClient(this.uriSuffix + String.Format("(ID=guid'{0}',StampId=guid'{1}')", id, stampId)); + + WebHeaderCollection outHeaders; + client.Delete(out outHeaders); + + jobId = TryGetJobIdFromHeaders(outHeaders); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/VMTemplateOperations.cs b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/VMTemplateOperations.cs new file mode 100644 index 000000000000..83fda0a590bd --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/VMTemplateOperations.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; + +namespace Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations +{ + internal class VMTemplateOperations : OperationsBase + { + public VMTemplateOperations(WebClientFactory webClientFactory) + : base(webClientFactory, "/VMTemplates") + { + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/VirtualHardDiskOperations.cs b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/VirtualHardDiskOperations.cs new file mode 100644 index 000000000000..e1bb8346a4ae --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/VirtualHardDiskOperations.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; + +namespace Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations +{ + internal class VirtualHardDiskOperations : OperationsBase + { + public VirtualHardDiskOperations(WebClientFactory webClientFactory) + : base(webClientFactory, "/VirtualHardDisks") + { + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/VirtualMachineOperations.cs b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/VirtualMachineOperations.cs new file mode 100644 index 000000000000..72c2f94d4d5b --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/VirtualMachineOperations.cs @@ -0,0 +1,132 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Net; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Exceptions; + +namespace Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations +{ + internal class VirtualMachineOperations : OperationsBase + { + public VirtualMachineOperations(WebClientFactory webClientFactory) + : base(webClientFactory, "/VirtualMachines") + { + } + + public override VirtualMachine Create(VirtualMachine vmToCreate, out Guid? jobId) + { + // CloudId and StampId are required parameters. Since we are assumed to be working with a WAP subscription, + // we can just take the first cloud and its StampId. WAP subscriptions are associated with only ONE cloud and only ONE stamp. + var cloud = CloudOperations.ReadFirstCloud(this.webClientFactory); + + vmToCreate.CloudId = cloud.ID; + vmToCreate.StampId = cloud.StampId; + + var client = this.webClientFactory.CreateClient(this.uriSuffix); + + WebHeaderCollection outHeaders; + var resultList = client.Create(vmToCreate, out outHeaders); + + if (resultList.Count <= 0) + throw new WAPackOperationException(Resources.ErrorCreatingVirtualMachine); + + jobId = TryGetJobIdFromHeaders(outHeaders); + + return resultList[0]; + } + + public List Read(string vmName) + { + var filterDict = new Dictionary + { + {"Name", vmName} + }; + + var resultList = this.Read(filterDict); + return resultList; + } + + public override VirtualMachine Update(VirtualMachine toUpdate, out Guid? jobId) + { + var client = this.webClientFactory.CreateClient(this.uriSuffix + String.Format("(ID=guid'{0}',StampId=guid'{1}')", toUpdate.ID, toUpdate.StampId)); + + WebHeaderCollection outHeaders; + var resultList = client.Update(toUpdate, out outHeaders); + + if (resultList.Count <= 0) + throw new WAPackOperationException(Resources.ErrorUpdatingVirtualMachine); + + jobId = TryGetJobIdFromHeaders(outHeaders); + + return resultList[0]; + } + + public override void Delete(Guid id, out Guid? jobId) + { + var cloud = CloudOperations.ReadFirstCloud(this.webClientFactory); + Guid stampId = cloud.StampId; + + var client = this.webClientFactory.CreateClient(this.uriSuffix + String.Format("(ID=guid'{0}',StampId=guid'{1}')", id, stampId)); + + WebHeaderCollection outHeaders; + client.Delete(out outHeaders); + + jobId = TryGetJobIdFromHeaders(outHeaders); + } + + private VirtualMachine DoOperation(string operation, Guid id, out Guid? jobId) + { + var cloud = CloudOperations.ReadFirstCloud(this.webClientFactory); + var stampId = cloud.StampId; + + var vm = new VirtualMachine {ID = id, StampId = stampId, Operation = operation}; + + return this.Update(vm, out jobId); + } + + public VirtualMachine Start(Guid id, out Guid? jobId) + { + return this.DoOperation("Start", id, out jobId); + } + + public VirtualMachine Stop(Guid id, out Guid? jobId) + { + return this.DoOperation("Stop", id, out jobId); + } + + public VirtualMachine Shutdown(Guid id, out Guid? jobId) + { + return this.DoOperation("Shutdown", id, out jobId); + } + + public VirtualMachine Restart(Guid id, out Guid? jobId) + { + return this.DoOperation("Reset", id, out jobId); + } + + public VirtualMachine Suspend(Guid id, out Guid? jobId) + { + return this.DoOperation("Suspend", id, out jobId); + } + + public VirtualMachine Resume(Guid id, out Guid? jobId) + { + return this.DoOperation("Resume", id, out jobId); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/VmRoleOperations.cs b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/VmRoleOperations.cs new file mode 100644 index 000000000000..e52183e87bdc --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/Operations/VmRoleOperations.cs @@ -0,0 +1,112 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Net; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Exceptions; + +namespace Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations +{ + internal class VMRoleOperations : OperationsBase + { + private const string genericBaseUri = "/CloudServices/{0}/Resources/MicrosoftCompute/VMRoles?api-version=2013-03"; + private const string specificBaseUri = "/CloudServices/{0}/Resources/MicrosoftCompute/VMRoles/{1}?api-version=2013-03"; + private const string vmsUri = "/CloudServices/{0}/Resources/MicrosoftCompute/VMRoles/{1}/VMs?api-version=2013-03"; + private const string scaleUri = "/CloudServices/{0}/Resources/MicrosoftCompute/VMRoles/{1}/Scale?api-version=2013-03"; + + public VMRoleOperations(WebClientFactory webClientFactory) + : base(webClientFactory, genericBaseUri) + { + } + + public VMRole Create(string cloudServiceName, VMRole vmRoleToCreate, out Guid? jobId) + { + var client = this.webClientFactory.CreateClient(String.Format(genericBaseUri, cloudServiceName)); + + WebHeaderCollection outHeaders; + var resultList = client.Create(vmRoleToCreate, out outHeaders); + + if (resultList.Count <= 0) + throw new WAPackOperationException(Resources.ErrorCreatingVMRole); + + jobId = TryGetJobIdFromHeaders(outHeaders); + + return resultList[0]; + } + + public List Read(string cloudServiceName) + { + var client = this.webClientFactory.CreateClient(String.Format(genericBaseUri, cloudServiceName)); + + WebHeaderCollection outHeaders; + var results = client.Get(out outHeaders); + + foreach (var vmRole in results) + { + var vmList = this.GetVMs(cloudServiceName, vmRole); + vmRole.VMs.Load(vmList); + } + + return results; + } + + public VMRole Read(string cloudServiceName, string vmRoleName) + { + var client = this.webClientFactory.CreateClient(String.Format(specificBaseUri, cloudServiceName, vmRoleName)); + + WebHeaderCollection outHeaders; + var result = client.Get(out outHeaders)[0]; + + var vmList = this.GetVMs(cloudServiceName, result); + result.VMs.Load(vmList); + + return result; + } + + public void Delete(string cloudServiceName, string vmRoleName, out Guid? jobId) + { + WebHeaderCollection outHeaders; + var client = this.webClientFactory.CreateClient(String.Format(specificBaseUri, cloudServiceName, vmRoleName)); + + client.Delete(out outHeaders); + jobId = TryGetJobIdFromHeaders(outHeaders); + } + + public List GetVMs(string cloudServiceName, VMRole vmRole) + { + WebHeaderCollection outHeaders; + var client = this.webClientFactory.CreateClient(String.Format(vmsUri, cloudServiceName, vmRole.Name)); + + var resultList = client.Get(out outHeaders); + return resultList; + } + + public void SetInstanceCount(string cloudServiceName, VMRole vmRole, int count, out Guid? jobId) + { + var client = this.webClientFactory.CreateClient(String.Format(scaleUri, cloudServiceName, vmRole.Name)); + + var properties = new Dictionary() + { + {"InstanceCount", count} + }; + + WebHeaderCollection outHeaders; + client.Create(properties, out outHeaders); + jobId = TryGetJobIdFromHeaders(outHeaders); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/WebClient/HttpFilters.cs b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/WebClient/HttpFilters.cs new file mode 100644 index 000000000000..4b348fb0eba3 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/WebClient/HttpFilters.cs @@ -0,0 +1,77 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Text; + +namespace Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.WebClient +{ + internal enum WebFilterOptions + { + eq = 0, + ne = 1, + lt = 2, + gt = 3, + le = 4, + ge = 5 + }; + + + internal class HttpFilters + { + private List> filters; + + internal HttpFilters() + { + filters = new List>(); + } + + internal void Add(string filterName, WebFilterOptions filterOption, string filterValue) + { + var tuple = new Tuple(filterName, filterOption, filterValue); + + filters.Add(tuple); + } + + public override string ToString() + { + var filterString = new StringBuilder(); + + foreach (var filter in this.filters) + { + String appendFormat; + + Guid guid; + int intValue; + + if (Guid.TryParse(filter.Item3, out guid)) + appendFormat = "{0} {1} guid'{2}'"; + else if (int.TryParse(filter.Item3, out intValue)) + appendFormat = "{0} {1} {2}"; + else + appendFormat = "{0} {1} '{2}'"; + + if (filterString.Length == 0) + filterString.Append("$filter="); + else + filterString.Append(" and "); + + filterString.AppendFormat(appendFormat, filter.Item1, filter.Item2.ToString(), filter.Item3); + } + + return filterString.ToString(); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/WebClient/HttpQueryParameters.cs b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/WebClient/HttpQueryParameters.cs new file mode 100644 index 000000000000..474cf848ed15 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/WebClient/HttpQueryParameters.cs @@ -0,0 +1,68 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; + +namespace Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.WebClient +{ + internal class HttpQueryParameters + { + private Dictionary queryParams; + + internal HttpQueryParameters() + { + queryParams = new Dictionary(); + } + + internal void Add(string name, string value) + { + if (queryParams.ContainsKey(name)) + { + queryParams[name] = value; + } + else + { + queryParams.Add(name, value); + } + } + + //TODO: Use StringBuilder + public override string ToString() + { + string queryString = String.Empty; + + if (this.queryParams != null && this.queryParams.Count != 0) + { + foreach (var query in this.queryParams) + { + string currentQuery = query.Key + "=" + query.Value; + + if (queryString == String.Empty) + { + queryString = currentQuery; + } + else + { + queryString += "&" + currentQuery; + } + } + } + + return queryString; + } + + + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/WebClient/HttpWebRequestExtensions.cs b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/WebClient/HttpWebRequestExtensions.cs new file mode 100644 index 000000000000..4e66132e7666 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/WebClient/HttpWebRequestExtensions.cs @@ -0,0 +1,44 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Net; + +namespace Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.WebClient +{ + internal static class HttpWebResponseExtensions + { + [SuppressMessage("Microsoft.Usage", "CA2202:Do not dispose objects multiple times")] + internal static String ResponseToString(this WebResponse response) + { + //check for null + if (response == null) + return null; + + //Read the response body of the request + using (Stream responseStream = response.GetResponseStream()) + { + using (var responseStreamReader = new StreamReader(responseStream, true)) + { + //return the response body as a string + var responseString = responseStreamReader.ReadToEnd(); + return responseString; + } + } + + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/WebClient/IRequestChannel.cs b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/WebClient/IRequestChannel.cs new file mode 100644 index 000000000000..5060c07c72e8 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/WebClient/IRequestChannel.cs @@ -0,0 +1,24 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Net; + +namespace Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.WebClient +{ + internal interface IRequestChannel + { + List IssueRequestAndGetResponse(HttpWebRequest request, out WebHeaderCollection responseHeaders, string payload = null); + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/WebClient/JsonHelpers.cs b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/WebClient/JsonHelpers.cs new file mode 100644 index 000000000000..a284b29501df --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/WebClient/JsonHelpers.cs @@ -0,0 +1,76 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Text; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; + +namespace Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.WebClient +{ + internal class JsonHelpers + { + internal String Serialize(object obj) + { + var settings = new JsonSerializerSettings(); + settings.Converters.Add(new JsonNumericConverter()); + string json = JsonConvert.SerializeObject(obj, Formatting.Indented, settings); + + return json; + } + + [SuppressMessage("Microsoft.Usage", "CA2202:Do not dispose objects multiple times")] + internal List Deserialize(string json) + { + var returnList = new List(); + + if (String.IsNullOrEmpty(json)) + { + return returnList; + } + + + byte[] byteArray = Encoding.UTF8.GetBytes(json); + using (var stream = new MemoryStream(byteArray)) + { + using (var reader = new StreamReader(stream)) + { + var jObject = JObject.Parse(reader.ReadToEnd()); + var settings = new JsonSerializerSettings {MissingMemberHandling = MissingMemberHandling.Ignore}; + + JToken value; + + if (jObject.TryGetValue("value", out value)) + { + foreach (var obj in jObject["value"]) + { + var result = JsonConvert.DeserializeObject(obj.ToString()); + returnList.Add(result); + } + } + else + { + var results = JsonConvert.DeserializeObject(jObject.ToString(), settings); + returnList.Add(results); + } + } + } + return returnList; + } + + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/WebClient/JsonNumericConverter.cs b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/WebClient/JsonNumericConverter.cs new file mode 100644 index 000000000000..066dc45ab72d --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/WebClient/JsonNumericConverter.cs @@ -0,0 +1,50 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Newtonsoft.Json; + +namespace Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.WebClient +{ + internal class JsonNumericConverter : JsonConverter + { + //We use this converter only for writing longs properly, not for reading them back + public override bool CanRead + { + get { return false; } + } + + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + if (value != null) + writer.WriteValue(value.ToString()); // adds quotes around the number + else + writer.WriteNull(); + } + + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, + JsonSerializer serializer) + { + throw new NotImplementedException(); + } + + public override bool CanConvert(Type objectType) + { + return (objectType == typeof(long) || objectType == typeof(long?) + || objectType == typeof(ulong) || objectType == typeof(ulong?) + || objectType == typeof(float) || objectType == typeof(float?) + || objectType == typeof(double) || objectType == typeof(double?)); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/WebClient/Subscription.cs b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/WebClient/Subscription.cs new file mode 100644 index 000000000000..f33e2b1afa0d --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/WebClient/Subscription.cs @@ -0,0 +1,87 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Net; +using System.Security; +using System.Security.Cryptography.X509Certificates; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.WebClient +{ + internal enum CredentialType + { + None = 0, + UseCertificate = 1, + DefaultCredentials = 2, + DefaultNetworkCredentials = 3, + NetworkCredential = 4, + } + + internal class Subscription + { + internal string SubscriptionName { get; set; } + internal string SubscriptionId { get; set; } + internal Uri ServiceEndpoint { get; set; } + internal X509Certificate2 Certificate { get; set; } + + internal CredentialType CredentialType { get; set; } + private string userName; + private SecureString password; + + internal Subscription() + { + this.SubscriptionName = String.Empty; + this.SubscriptionId = String.Empty; + this.ServiceEndpoint = new Uri("http://127.0.0.1:8090"); + this.Certificate = new X509Certificate2(); + } + + internal Subscription(AzureSubscription azureSubscription) + { + if (azureSubscription == null) + { + throw new ArgumentNullException(); + } + + ProfileClient client = new ProfileClient(); + var environment = client.GetEnvironmentOrDefault(azureSubscription.Environment); + + this.SubscriptionName = azureSubscription.Name; + this.SubscriptionId = azureSubscription.Id.ToString(); + this.ServiceEndpoint = new Uri(String.Format("{0}/{1}/services/systemcenter/vmm", environment.GetEndpoint(AzureEnvironment.Endpoint.ServiceManagement).TrimEnd(new[] { '/' }), SubscriptionId)); + this.Certificate = FileUtilities.DataStore.GetCertificate(azureSubscription.Account); + this.CredentialType = CredentialType.UseCertificate; + } + + internal void SetNetworkCredentials(string userName, SecureString password) + { + this.CredentialType = CredentialType.NetworkCredential; + this.userName = userName; + this.password = password; + } + + internal NetworkCredential GetNetworkCredentials() + { + if (String.IsNullOrWhiteSpace(userName) || this.password == null) + { + return null; + } + + return new NetworkCredential(this.userName, this.password); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/WebClient/WAPackIaaSClient.cs b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/WebClient/WAPackIaaSClient.cs new file mode 100644 index 000000000000..cfc766a8e902 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/WebClient/WAPackIaaSClient.cs @@ -0,0 +1,220 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Net; +using System.Net.Http; +using System.Text; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.WebClient +{ + internal class WAPackIaaSClient + { + private IRequestChannel requestChannel = new WAPackIaaSRequestChannel(); + + private Subscription subscription; + + private HttpQueryParameters queryParameters; + + private HttpFilters httpFilters; + + private String uriSuffix; + + private Dictionary headers; + + private const string JsonContentType = @"application/json"; + + private void Initialize() + { + this.queryParameters = new HttpQueryParameters(); + this.httpFilters = new HttpFilters(); + this.uriSuffix = String.Empty; + this.headers = new Dictionary(); + } + + internal WAPackIaaSClient(Subscription wapSubscription, IRequestChannel channel = null) + { + if (wapSubscription == null) + { + throw new ArgumentNullException(Resources.SubscriptionMustNotBeNull); + } + + this.requestChannel = channel ?? new WAPackIaaSRequestChannel(); + + this.subscription = wapSubscription; + Initialize(); + } + + internal void AddQueryParameters(string name, string value) + { + this.queryParameters.Add(name, value); + } + + internal void AddHttpFilter(string filterName, WebFilterOptions filterOption, string filterValue) + { + this.httpFilters.Add(filterName, filterOption, filterValue); + } + + internal void SetUriSuffix(string uriSuffix) + { + this.uriSuffix = uriSuffix; + } + + internal string GetUriSuffix() + { + return this.uriSuffix; + } + + internal void AddHeaders(string name, string value) + { + if (this.headers.ContainsKey(name)) + { + this.headers[name] = value; + } + else + { + this.headers.Add(name, value); + } + } + + internal List Create(object payload, out WebHeaderCollection responseHeaders) + { + string payloadString; + var webRequest = this.CreateWebRequestObject(HttpMethod.Post, payload, out payloadString); + return this.requestChannel.IssueRequestAndGetResponse(webRequest, out responseHeaders, payloadString); + } + + internal List Get(out WebHeaderCollection responseHeaders) + { + var webRequest = this.CreateWebRequestObject(HttpMethod.Get); + return this.requestChannel.IssueRequestAndGetResponse(webRequest, out responseHeaders); + } + + internal void Delete(out WebHeaderCollection responseHeaders) + { + var webRequest = this.CreateWebRequestObject(HttpMethod.Delete); + this.requestChannel.IssueRequestAndGetResponse(webRequest, out responseHeaders); + } + + internal List Update(object payload, out WebHeaderCollection responseHeaders) + { + string payloadString; + var webRequest = this.CreateWebRequestObject(HttpMethod.Put, payload, out payloadString); + return this.requestChannel.IssueRequestAndGetResponse(webRequest, out responseHeaders, payloadString); + } + + private HttpWebRequest CreateWebRequestObject(HttpMethod method, object payload, out string payloadString) + { + if (payload != null && (method != HttpMethod.Get || method != HttpMethod.Delete)) + { + var jsonHelper = new JsonHelpers(); + string json = jsonHelper.Serialize(payload); + + payloadString = json; + } + else + { + payloadString = null; + } + + + return CreateWebRequestObject(method); + } + + private HttpWebRequest CreateWebRequestObject(HttpMethod method) + { + var webRequest = (HttpWebRequest)WebRequest.Create(this.GetAbsoluteUri()); + + webRequest.Method = method.ToString(); + webRequest.Accept = JsonContentType; + webRequest.ContentType = JsonContentType; + + SetCredentialsOnWebRequest(webRequest); + + if (this.headers.Count > 0) + { + foreach (var header in this.headers) + { + webRequest.Headers.Add(header.Key, header.Value); + } + } + + if (method == HttpMethod.Put) + { + webRequest.Headers.Add("Prefer", "return-content"); + } + + if (method == HttpMethod.Get || method == HttpMethod.Delete) + { + webRequest.ContentLength = 0; + } + + return webRequest; + } + + internal string GetAbsoluteUri() + { + var uri = new StringBuilder(); + + var baseUri = this.subscription.ServiceEndpoint.AbsoluteUri; + + uri.Append(baseUri); + + if (!String.IsNullOrEmpty(this.uriSuffix)) + uri.Append(uriSuffix); + + var queryString = this.queryParameters.ToString(); + var filterString = this.httpFilters.ToString(); + + if (!String.IsNullOrWhiteSpace(queryString) && !String.IsNullOrWhiteSpace(filterString)) + { + uri.AppendFormat("?{0}&{1}", queryString, filterString); + } + else + { + if (!String.IsNullOrWhiteSpace(queryString)) + uri.AppendFormat("?{0}", queryString); + else if (!String.IsNullOrWhiteSpace(filterString)) + uri.AppendFormat("?{0}", filterString); + } + + return uri.ToString(); + } + + private void SetCredentialsOnWebRequest(HttpWebRequest webRequest) + { + switch (this.subscription.CredentialType) + { + case CredentialType.None: + return; + case CredentialType.DefaultCredentials: + webRequest.Credentials = CredentialCache.DefaultCredentials; + break; + case CredentialType.DefaultNetworkCredentials: + webRequest.Credentials = CredentialCache.DefaultNetworkCredentials; + break; + case CredentialType.NetworkCredential: + webRequest.Credentials = this.subscription.GetNetworkCredentials(); + break; + case CredentialType.UseCertificate: + webRequest.ClientCertificates.Add(this.subscription.Certificate); + break; + } + + } + } +} + diff --git a/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/WebClient/WAPackIaaSRequestChannel.cs b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/WebClient/WAPackIaaSRequestChannel.cs new file mode 100644 index 000000000000..a27d6fc3c496 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/WebClient/WAPackIaaSRequestChannel.cs @@ -0,0 +1,68 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Net; +using System.Net.Http; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Exceptions; + +namespace Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.WebClient +{ + internal class WAPackIaaSRequestChannel : IRequestChannel + { + private readonly ILogger logger; + + public WAPackIaaSRequestChannel(ILogger logger = null) + { + this.logger = logger; + } + + public List IssueRequestAndGetResponse(HttpWebRequest request, out WebHeaderCollection responseHeaders, string payload = null) + { + var jsonHelper = new JsonHelpers(); + + if (!String.IsNullOrWhiteSpace(payload)) + { + var writer = new StreamWriter(request.GetRequestStream()); + writer.Write(payload); + writer.Close(); + } + + try + { + string responseString; + + using (var response = request.GetResponse()) + { + responseHeaders = response.Headers; + responseString = response.ResponseToString(); + + if (logger != null) + logger.Log(LogLevel.Debug, request.Method + " " + request.RequestUri + " " + ((HttpWebResponse)response).StatusCode); + } + + return request.Method == HttpMethod.Delete.ToString() ? new List() : jsonHelper.Deserialize(responseString); + } + catch (WebException ex) + { + HttpStatusCode statusCode = ex.Response != null + ? ((HttpWebResponse)ex.Response).StatusCode + : HttpStatusCode.Unused; + throw new WAPackWebException(statusCode, ex.Message, ex); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/WebClientFactory.cs b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/WebClientFactory.cs new file mode 100644 index 000000000000..47028310b6e0 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/WAPackIaaS/WebClientFactory.cs @@ -0,0 +1,41 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.WebClient; + +namespace Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS +{ + /// + /// An object that knows how to create SPFWebClients with the appropriate + /// channel type and subscription. + /// + internal class WebClientFactory + { + private readonly Subscription subscription; + private readonly IRequestChannel channel; + + public WebClientFactory(Subscription subscription, IRequestChannel channel) + { + this.subscription = subscription; + this.channel = channel; + } + + public WAPackIaaSClient CreateClient(string uriSuffix) + { + var client = new WAPackIaaSClient(subscription, channel); + client.SetUriSuffix(uriSuffix); + return client; + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Common/DeploymentBaseCmdlet.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Common/DeploymentBaseCmdlet.cs new file mode 100644 index 000000000000..428ef7b458b0 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Common/DeploymentBaseCmdlet.cs @@ -0,0 +1,93 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.ServiceModel; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Common +{ + public abstract class DeploymentBaseCmdlet : WebsiteContextBaseCmdlet + { + protected IDeploymentServiceManagement DeploymentChannel { get; set; } + + protected Repository Repository { get; private set; } + + private Repository GetRepository(string websiteName) + { + Site site = WebsitesClient.GetWebsite(websiteName, Slot); + if (site != null) + { + return new Repository(site); + } + + return null; + } + + public bool ShareChannel { get; set; } + + public override void ExecuteCmdlet() + { + Repository repository = GetRepository(Name); + if (repository == null) + { + throw new Exception(Resources.RepositoryNotSetup); + } + + this.Repository = repository; + DeploymentChannel = CreateDeploymentChannel(repository); + } + + protected IDeploymentServiceManagement CreateDeploymentChannel(Repository repository) + { + // If ShareChannel is set by a unit test, use the same channel that + // was passed into out constructor. This allows the test to submit + // a mock that we use for all network calls. + if (ShareChannel) + { + return DeploymentChannel; + } + + return ChannelHelper.CreateServiceManagementChannel( + new Uri(repository.RepositoryUri), + repository.PublishingUsername, + repository.PublishingPassword, + new HttpRestMessageInspector(WriteDebug)); + } + + /// + /// Invoke the given operation within an OperationContextScope if the + /// channel supports it. + /// + /// The action to invoke. + protected void InvokeInDeploymentOperationContext(Action action) + { + IContextChannel contextChannel = DeploymentChannel as IContextChannel; + if (contextChannel != null) + { + using (new OperationContextScope(contextChannel)) + { + action(); + } + } + else + { + action(); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Common/IGithubCmdlet.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Common/IGithubCmdlet.cs new file mode 100644 index 000000000000..1d14790a366c --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Common/IGithubCmdlet.cs @@ -0,0 +1,34 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Management.Automation.Host; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.Github; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Common +{ + public interface IGithubCmdlet + { + IGithubServiceManagement GithubChannel { get; set; } + + bool ShareChannel { get; set; } + + InvocationInfo MyInvocation { get; } + + PSHost Host { get; } + + Action GetLogger(); + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Common/WebHostingPlanContextBaseCmdlet.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Common/WebHostingPlanContextBaseCmdlet.cs new file mode 100644 index 000000000000..7a5f480141e6 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Common/WebHostingPlanContextBaseCmdlet.cs @@ -0,0 +1,41 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Common +{ + public abstract class WebHostingPlanContextBaseCmdlet : WebsiteBaseCmdlet + { + [Alias("WebSpace")] + [Parameter(Position = 0, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The web space name where hosting plan belongs.")] + [ValidateNotNullOrEmpty] + public string WebSpaceName { get; set; } + + [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The web hosting plan name.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + public override void ExecuteCmdlet() + { + base.ExecuteCmdlet(); + + if (!string.IsNullOrEmpty(Name) && string.IsNullOrEmpty(WebSpaceName)) + { + throw new ArgumentNullException("WebSpace", Properties.Resources.Argument_WebSpaceMissing); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Common/WebsiteBaseCmdlet.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Common/WebsiteBaseCmdlet.cs new file mode 100644 index 000000000000..1f20281e182d --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Common/WebsiteBaseCmdlet.cs @@ -0,0 +1,37 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Common +{ + public abstract class WebsiteBaseCmdlet : AzurePSCmdlet + { + private IWebsitesClient websitesClient; + + public IWebsitesClient WebsitesClient + { + get + { + if (websitesClient == null) + { + websitesClient = new WebsitesClient(CurrentContext.Subscription, WriteDebug); + } + return websitesClient; + } + + set { websitesClient = value; } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Common/WebsiteContextBaseCmdlet.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Common/WebsiteContextBaseCmdlet.cs new file mode 100644 index 000000000000..7169e528b975 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Common/WebsiteContextBaseCmdlet.cs @@ -0,0 +1,89 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Common +{ + public abstract class WebsiteContextBaseCmdlet : WebsiteBaseCmdlet + { + protected bool websiteNameDiscovery; + + private string name; + private string slot; + + public WebsiteContextBaseCmdlet() + { + websiteNameDiscovery = true; + } + + [Parameter(Position = 0, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The web site name.")] + [ValidateNotNullOrEmpty] + public string Name + { + get + { + return name; + } + set + { + // Convert to Unicode if necessary. + name = IdnHelper.GetUnicode(value); + } + } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The web site slot name.")] + [ValidateNotNullOrEmpty] + public string Slot + { + get + { + return slot; + } + set + { + // Convert to Unicode if necessary. + slot = IdnHelper.GetUnicode(value); + } + } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public override void ExecuteCmdlet() + { + try + { + if (string.IsNullOrEmpty(Name) && websiteNameDiscovery) + { + // If the website name was not specified as a parameter try to infer it + Name = GitWebsite.ReadConfiguration().Name; + } + Slot = string.IsNullOrEmpty(Slot) ? WebsitesClient.GetSlotName(Name) : Slot; + } + catch (Exception ex) + { + WriteExceptionError(ex); + } + } + + protected override void EndProcessing() + { + base.EndProcessing(); + Slot = null; + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/IWebsitesClient.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/IWebsitesClient.cs new file mode 100644 index 000000000000..ba7825168851 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/IWebsitesClient.cs @@ -0,0 +1,624 @@ +// ---------------------------------------------------------------------------------- +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Collections.Generic; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.DeploymentEntities; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebJobs; +using Microsoft.WindowsAzure.Commands.Websites.WebJobs; +using Microsoft.WindowsAzure.Management.WebSites.Models; +using Microsoft.WindowsAzure.WebSitesExtensions.Models; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites +{ + using Utilities = Services.WebEntities; + + public interface IWebsitesClient + { + /// + /// Starts log streaming for the given website. + /// + /// The website name + /// The log path, by default root + /// The substring message + /// Predicate to end streaming + /// The fetch wait interval + /// The log line + IEnumerable StartLogStreaming( + string name, + string path, + string message, + Predicate endStreaming, + int waitInternal); + + /// + /// Starts log streaming for the given website. + /// + /// The website name + /// The website slot name + /// The log path, by default root + /// The substring message + /// Predicate to end streaming + /// The fetch wait interval + /// The log line + IEnumerable StartLogStreaming( + string name, + string slot, + string path, + string message, + Predicate endStreaming, + int waitInternal); + + /// + /// List log paths for a given website. + /// + /// The website name + /// The website slot name + /// The list of log paths + List ListLogPaths(string name, string slot); + + /// + /// List log paths for a given website. + /// + /// The website name + /// The list of log paths + List ListLogPaths(string name); + + /// + /// Gets the application diagnostics settings + /// + /// The website name + /// The website application diagnostics settings + DiagnosticsSettings GetApplicationDiagnosticsSettings(string name); + + /// + /// Gets the application diagnostics settings + /// + /// The website name + /// The website slot name + /// The website application diagnostics settings + DiagnosticsSettings GetApplicationDiagnosticsSettings(string name, string slot); + + /// + /// Restarts a website. + /// + /// The website name + void RestartWebsite(string name); + + /// + /// Starts a website. + /// + /// The website name + void StartWebsite(string name); + + /// + /// Stops a website. + /// + /// The website name + void StopWebsite(string name); + + /// + /// Gets a website instance. + /// + /// The website name + /// The website instance + Utilities.Site GetWebsite(string name); + + /// + /// Create a new website in a given slot. + /// + /// Web space to create site in. + /// Flag to control cloning the website configuration. + /// Details about the site to create. + /// The slot name. + /// The created site object + Utilities.Site CreateWebsite(string webspaceName, Utilities.SiteWithWebSpace siteToCreate, string slot); + + /// + /// Update the set of host names for a website. + /// + /// The website name. + /// The new host names. + void UpdateWebsiteHostNames(Utilities.Site site, IEnumerable hostNames); + + /// + /// Update the set of host names for a website slot. + /// + /// The website name. + /// The new host names. + /// The website slot name. + void UpdateWebsiteHostNames(Utilities.Site site, IEnumerable hostNames, string slot); + + /// + /// Gets the website configuration. + /// + /// The website name + /// The website configuration object + Utilities.SiteConfig GetWebsiteConfiguration(string name); + + /// + /// Create a git repository for the web site. + /// + /// Webspace that site is in. + /// The site name. + void CreateWebsiteRepository(string webspaceName, string websiteName); + + /// + /// Update the website configuration + /// + /// The website name + /// The website configuration object containing updates. + void UpdateWebsiteConfiguration(string name, Utilities.SiteConfig newConfiguration); + + /// + /// Update the website slot configuration + /// + /// The website name + /// The website configuration object containing updates. + /// The website slot name + void UpdateWebsiteConfiguration(string name, Utilities.SiteConfig newConfiguration, string slot); + + /// + /// Delete a website. + /// + /// webspace the site is in. + /// website name. + /// pass true to delete stored metrics as part of removing site. + /// Pass true to delete server farm is this was the last website in it. + void DeleteWebsite(string webspaceName, string websiteName, bool deleteMetrics = false, bool deleteEmptyServerFarm = false); + + /// + /// Delete a website slot. + /// + /// webspace the site is in. + /// website name. + /// The website slot name + void DeleteWebsite(string webspaceName, string websiteName, string slot); + + /// + /// Get the WebSpaces. + /// + /// Collection of WebSpace objects + IList ListWebSpaces(); + + /// + /// Get the sites in the given webspace + /// + /// Name of webspace + /// The sites + IList ListSitesInWebSpace(string spaceName); + + /// + /// Get a list of the user names configured to publish to the space. + /// + /// The list of user names. + IList ListPublishingUserNames(); + + /// + /// Get a list of historic metrics for the site. + /// + /// The website name + /// List of metrics names to retrieve. See metric definitions for supported names + /// Slot name + /// Start date of the requested period + /// End date of the requested period + /// Time grains for the metrics. + /// Include details for the server instances in which the site is running. + /// Represent the metrics for the hostnames that receive the traffic at the current slot. + /// If swap occured in the middle of the period mereics will be merged + /// The list of site metrics for the specified period. + IList GetHistoricalUsageMetrics(string siteName, string slot, IList metricNames, DateTime? starTime, + DateTime? endTime, string timeGrain, bool instanceDetails, bool slotView); + + /// + /// Enables site diagnostic. + /// + /// The website name + /// Flag for webServerLogging + /// Flag for detailedErrorMessages + /// Flag for failedRequestTracing + void EnableSiteDiagnostic( + string name, + bool webServerLogging, + bool detailedErrorMessages, + bool failedRequestTracing); + + /// + /// Disables site diagnostic. + /// + /// The website name + /// Flag for webServerLogging + /// Flag for detailedErrorMessages + /// Flag for failedRequestTracing + void DisableSiteDiagnostic( + string name, + bool webServerLogging, + bool detailedErrorMessages, + bool failedRequestTracing); + + /// + /// Enables application diagnostic. + /// + /// The website name + /// The application log output, FileSystem or StorageTable + /// The diagnostic setting properties + void EnableApplicationDiagnostic( + string name, + WebsiteDiagnosticOutput output, + Dictionary properties); + + /// + /// Disables application diagnostic. + /// + /// The website name + /// The application log output, FileSystem or StorageTable + void DisableApplicationDiagnostic(string name, WebsiteDiagnosticOutput output); + + /// + /// Sets an AppSetting of a website. + /// + /// The website name + /// The app setting name + /// The app setting value + void SetAppSetting(string name, string key, string value); + + /// + /// Sets a connection string for a website. + /// + /// Name of the website. + /// Connection string key. + /// Value for the connection string. + /// Type of connection string. + void SetConnectionString(string name, string key, string value, Utilities.DatabaseType connectionStringType); + + /// + /// Lists available website locations. + /// + /// List of location names + List ListAvailableLocations(); + + /// + /// Gets the default website DNS suffix for the current environment. + /// + /// The website DNS suffix + string GetWebsiteDnsSuffix(); + + /// + /// Gets the default location for websites. + /// + /// The default location name. + string GetDefaultLocation(); + + /// + /// Checks if a website exists. + /// + /// The website name. + /// True if exists, false otherwise. + bool WebsiteExists(string name); + + /// + /// Checks if a website exists. + /// + /// The website name. + /// The website slot name. + /// True if exists, false otherwise. + bool WebsiteExists(string name, string slot); + + /// + /// Updates a website compute mode. + /// + /// The website to update + void UpdateWebsiteComputeMode(Utilities.Site websiteToUpdate); + + /// + /// Gets a website slot DNS name. + /// + /// The website name + /// The slot name + /// the slot DNS name + string GetSlotDnsName(string name, string slot); + + /// + /// Gets a website slot. + /// + /// The website name + /// The website slot name + /// The website slot object + Utilities.Site GetWebsite(string name, string slot); + + /// + /// Gets all slots for a website + /// + /// The website name + /// The website slots list + List GetWebsiteSlots(string name); + + /// + /// Lists all websites under the current subscription + /// + /// List of websites + List ListWebsites(); + + /// + /// Lists all websites with the provided slot name. + /// + /// The slot name + /// The list if websites + List ListWebsites(string slot); + + /// + /// Gets a website slot configuration + /// + /// The website name + /// The website slot name + /// The website cobfiguration object + Utilities.SiteConfig GetWebsiteConfiguration(string name, string slot); + + /// + /// Enables application diagnostic on website slot. + /// + /// The website name + /// The application log output, FileSystem or StorageTable + /// The diagnostic setting properties + /// The website slot name + void EnableApplicationDiagnostic( + string name, + WebsiteDiagnosticOutput output, + Dictionary properties, + string slot); + + /// + /// Disables application diagnostic. + /// + /// The website name + /// The application log output, FileSystem or StorageTable + /// The website slot name + void DisableApplicationDiagnostic(string name, WebsiteDiagnosticOutput output, string slot); + + /// + /// Restarts a website. + /// + /// The website name + /// The website slot name + void RestartWebsite(string name, string slot); + + /// + /// Starts a website. + /// + /// The website name + /// The website slot name + void StartWebsite(string name, string slot); + + /// + /// Stops a website. + /// + /// The website name + /// The website slot name + void StopWebsite(string name, string slot); + + /// + /// Switches the given website slot with the production slot + /// + /// The webspace name + /// The website name + /// The website's first slot name + /// The website's second slot name + void SwitchSlots(string webspaceName, string websiteName, string slot1, string slot2); + + /// + /// Gets the slot name from the website name + /// + /// The website name + /// The slot name + string GetSlotName(string name); + + /// + /// Build a Visual Studio web project and generate a WebDeploy package. + /// + /// The project file. + /// The configuration of the build, like Release or Debug. + /// The build log file if there is any error. + /// The full path of the generated WebDeploy package. + string BuildWebProject(string projectFile, string configuration, string logFile); + + /// + /// Gets the website WebDeploy publish profile. + /// + /// Website name. + /// Slot name. By default is null. + /// The publish profile. + WebSiteGetPublishProfileResponse.PublishProfile GetWebDeployPublishProfile(string websiteName, string slot = null); + + /// + /// Publish a WebDeploy package folder to a web site. + /// + /// The name of the web site. + /// The name of the slot. + /// The WebDeploy package. + /// The connection strings to overwrite the ones in the Web.config file. + /// Skip app data + /// Do not delete files at destination + void PublishWebProject(string websiteName, string slot, string package, Hashtable connectionStrings, bool skipAppData, bool doNotDelete); + + /// + /// Parse the Web.config files to get the connection string names. + /// + /// The default Web.config file. + /// The additional Web.config file for the specificed configuration, like Web.Release.Config file. + /// An array of connection string names from the Web.config files. + string[] ParseConnectionStringNamesFromWebConfig(string defaultWebConfigFile, string overwriteWebConfigFile); + + /// + /// Gets the website name without slot part + /// + /// The website full name which may include slot name + /// The website name + string GetWebsiteNameFromFullName(string name); + + /// Filters the web jobs. + /// + /// The web job filter options + /// The filtered web jobs list + List FilterWebJobs(WebJobFilterOptions options); + + /// + /// Creates new web job for a website + /// + /// The website name + /// The website slot name + /// The web job name + /// The web job type + /// The web job file name + /// The created web job instance + IPSWebJob CreateWebJob(string name, string slot, string jobName, WebJobType jobType, string jobFile); + + /// + /// Deletes a web job for a website. + /// + /// The website name + /// The slot name + /// The web job name + /// The web job type + void DeleteWebJob(string name, string slot, string jobName, WebJobType jobType); + + /// + /// Starts a web job in a website. + /// + /// The website name + /// The slot name + /// The web job name + /// The web job type + void StartWebJob(string name, string slot, string jobName, WebJobType jobType); + + /// + /// Stops a web job in a website. + /// + /// The website name + /// The slot name + /// The web job name + /// The web job type + void StopWebJob(string name, string slot, string jobName, WebJobType jobType); + + /// + /// Filters a web job history. + /// + /// The web job filter options + /// The filtered web jobs run list + List FilterWebJobHistory(WebJobHistoryFilterOptions options); + + /// + /// Saves a web job logs to file. + /// + /// The website name + /// The slot name + /// The web job name + /// The web job type + void SaveWebJobLog(string name, string slot, string jobName, WebJobType jobType); + + /// + /// Saves a web job logs to file. + /// + /// The website name + /// The slot name + /// The web job name + /// The web job type + /// The output file name + /// The job run id + void SaveWebJobLog(string name, string slot, string jobName, WebJobType jobType, string output, string runId); + + /// + /// Gets the hostname of the website + /// + /// The website name + /// The website slot name + /// The hostname + string GetHostName(string name, string slot); + + /// + /// Checks whether a website name is available or not. + /// + /// The website name + /// True means available, false otherwise + bool CheckWebsiteNameAvailability(string name); + + WebsiteInstance[] ListWebsiteInstances(string webSpace, string fullName); + + /// + /// Return web hosting plans in the subscription + /// + /// web hosting plans + List ListWebHostingPlans(); + + /// + /// Return web hosting plans in the subscription + /// + /// web hosting plans + List ListWebHostingPlans(string webspaceName); + + /// + /// Get web hosting plan by name + /// + /// web space name where plan belongs + /// web hosting plan name + /// web hosting plan object + Utilities.WebHostingPlan GetWebHostingPlan(string webSpaceName, string planName); + + /// + /// Get a list of historic metrics for the web hostin plan. + /// + /// web space name where plan belongs + /// The web hosting plan name + /// List of metrics names to retrieve. See metric definitions for supported names + /// Start date of the requested period + /// End date of the requested period + /// Time grains for the metrics. + /// Include details for the server instances in which the site is running. + /// The list of site metrics for the specified period. + IList GetPlanHistoricalUsageMetrics(string webSpaceName, string planName, IList metricNames, + DateTime? starTime, DateTime? endTime, string timeGrain, bool instanceDetails); + } + + public enum WebsiteState + { + Running, + Stopped + } + + public enum WebsiteDiagnosticType + { + Site, + Application + } + + public enum WebsiteDiagnosticOutput + { + FileSystem, + StorageTable, + StorageBlob + } + + public enum DiagnosticProperties + { + StorageAccountName, + LogLevel, + StorageTableName, + StorageBlobContainerName + } + + public enum WebsiteSlotName + { + Production, + Staging + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/KuduRemoteClientBase.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/KuduRemoteClientBase.cs new file mode 100644 index 000000000000..6443c16e7204 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/KuduRemoteClientBase.cs @@ -0,0 +1,63 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Net; +using System.Net.Http; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Factories; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites +{ + public abstract class KuduRemoteClientBase + { + /// + /// Parameterless constructor for mocking + /// + protected KuduRemoteClientBase() + { + + } + + protected KuduRemoteClientBase( + string serviceUrl, + ICredentials credentials = null, + HttpMessageHandler handler = null) + { + if (serviceUrl == null) + { + throw new ArgumentNullException("serviceUrl"); + } + + ServiceUrl = GeneralUtilities.EnsureTrailingSlash(serviceUrl); + Credentials = credentials; + + if (credentials != null) + { + Client = AzureSession.ClientFactory.CreateHttpClient(serviceUrl, ClientFactory.CreateHttpClientHandler(serviceUrl, credentials)); + } + else + { + Client = AzureSession.ClientFactory.CreateHttpClient(serviceUrl, handler); + } + } + + public string ServiceUrl { get; private set; } + + public ICredentials Credentials { get; private set; } + + public HttpClient Client { get; private set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/LogStreamWaitHandle.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/LogStreamWaitHandle.cs new file mode 100644 index 000000000000..d7eb0d86bc0d --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/LogStreamWaitHandle.cs @@ -0,0 +1,128 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Threading; +using System.Threading.Tasks; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites +{ + public class LogStreamWaitHandle : IDisposable + { + private const int WaitInterval = 1000; + Stream stream; + List lines; + Semaphore sem; + ManualResetEvent readCompleted = new ManualResetEvent(false); + + /// + /// Parameterless constructor for mocking. + /// + public LogStreamWaitHandle() + { + + } + + public LogStreamWaitHandle(Stream stream) + { + this.stream = stream; + this.lines = new List(); + this.sem = new Semaphore(0, Int32.MaxValue); + object thisLock = new Object(); + Task.Factory.StartNew(() => + { + try + { + using (StreamReader reader = new StreamReader(stream)) + { + bool initial = true; + while (!reader.EndOfStream) + { + string line = reader.ReadLine(); + if (line != null) + { + if (initial) + { + // accommodate for gap between first welcome and event hookup + Thread.Sleep(WaitInterval); + initial = false; + } + + lock (thisLock) + { + lines.Add(line); + this.sem.Release(); + } + } + } + } + } + catch + { + } + finally + { + lock (thisLock) + { + lines.Add(null); + this.sem.Release(); + } + + readCompleted.Set(); + } + }); + } + + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) + { + if (disposing) + { + this.stream.Close(); + this.readCompleted.WaitOne(WaitInterval); + this.readCompleted.Dispose(); + this.sem.Dispose(); + } + } + + public virtual string WaitNextLine(int millisecs) + { + try + { + if (this.sem.WaitOne(millisecs)) + { + lock (lines) + { + string result = lines[0]; + lines.RemoveAt(0); + return result; + } + } + } + catch (ObjectDisposedException) + { + // This handle in case we are racing with Dispose call + } + + return null; + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/PIIValueAttribute.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/PIIValueAttribute.cs new file mode 100644 index 000000000000..cf1e9ba42c5c --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/PIIValueAttribute.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites +{ + /// + /// Marks a field as PII, so it won't be traced down to the logs + /// + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] + public class PIIValueAttribute : Attribute + { + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/PSContinuousWebJob.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/PSContinuousWebJob.cs new file mode 100644 index 000000000000..8ca651d2925d --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/PSContinuousWebJob.cs @@ -0,0 +1,54 @@ +using System; +using Microsoft.WindowsAzure.WebSitesExtensions.Models; + +namespace Microsoft.WindowsAzure.Commands.Websites.WebJobs +{ + public class PSContinuousWebJob : PSWebJob + { + public PSContinuousWebJob(ContinuousWebJob webJob) + : base(webJob) + { + } + + public PSContinuousWebJob() + : this(new ContinuousWebJob()) + { + } + + public string DetailedStatus + { + get + { + return WebJob.DetailedStatus != null ? WebJob.DetailedStatus.Trim() : null; + } + set + { + WebJob.DetailedStatus = value; + } + } + + public Uri LogUrl + { + get + { + return WebJob.LogUrl; + } + set + { + WebJob.LogUrl = value; + } + } + + public string Status + { + get + { + return WebJob.Status; + } + set + { + WebJob.Status = value; + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/PSTriggeredWebJob.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/PSTriggeredWebJob.cs new file mode 100644 index 000000000000..ee147b771fab --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/PSTriggeredWebJob.cs @@ -0,0 +1,33 @@ +using Microsoft.WindowsAzure.WebSitesExtensions.Models; + +namespace Microsoft.WindowsAzure.Commands.Websites.WebJobs +{ + /// + /// The purpose of the wrapping is to surface a Web Job's "Name" property as "JobName", + /// and "Type" as "JobType". This is needed for PowerShell pipeline. + /// + public class PSTriggeredWebJob : PSWebJob + { + public PSTriggeredWebJob(TriggeredWebJob webJob) + : base(webJob) + { + } + + public PSTriggeredWebJob() + : this(new TriggeredWebJob()) + { + } + + public string HistoryUrl + { + get { return WebJob.HistoryUrl; } + set { WebJob.HistoryUrl = value; } + } + + public TriggeredWebJobRun LatestRun + { + get { return new PSTriggeredWebJobRun(WebJob.LatestRun); } + set { WebJob.LatestRun = value; } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/PSTriggeredWebJobRun.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/PSTriggeredWebJobRun.cs new file mode 100644 index 000000000000..bec120a48d18 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/PSTriggeredWebJobRun.cs @@ -0,0 +1,26 @@ +using System; +using System.Globalization; +using Microsoft.WindowsAzure.WebSitesExtensions.Models; + +namespace Microsoft.WindowsAzure.Commands.Websites.WebJobs +{ + public class PSTriggeredWebJobRun : TriggeredWebJobRun + { + public PSTriggeredWebJobRun(TriggeredWebJobRun triggeredWebJobRun) + { + Duration = triggeredWebJobRun.Duration; + EndTime = triggeredWebJobRun.EndTime; + Id = triggeredWebJobRun.Id; + JobName = triggeredWebJobRun.JobName; + OutputUrl = triggeredWebJobRun.OutputUrl; + StartTime = triggeredWebJobRun.StartTime; + Status = triggeredWebJobRun.Status; + Url = triggeredWebJobRun.Url; + } + + public override string ToString() + { + return String.Format(CultureInfo.CurrentCulture, "Started: {0}, Ended: {1}, Duration: {2}", StartTime, EndTime, Duration); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/PSWebJob.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/PSWebJob.cs new file mode 100644 index 000000000000..0788407fd158 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/PSWebJob.cs @@ -0,0 +1,110 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure.WebSitesExtensions.Models; + +namespace Microsoft.WindowsAzure.Commands.Websites.WebJobs +{ + public interface IPSWebJob + { + string JobName { get; set; } + + WebJobType JobType { get; set; } + + string ExtraInfoUrl { get; set; } + + string RunCommand { get; set; } + + Uri Url { get; set; } + + bool UsingSdk { get; set; } + } + + public class PSWebJob : IPSWebJob where TWebJob : WebJobBase + { + protected TWebJob WebJob { get; private set; } + + protected PSWebJob(TWebJob webJob) + { + WebJob = webJob; + } + + public string JobName + { + get + { + return WebJob.Name; + } + set + { + WebJob.Name = value; + } + } + + public WebJobType JobType + { + get + { + return WebJob.Type; + } + set + { + WebJob.Type = value; + } + } + + public string ExtraInfoUrl + { + get + { + return WebJob.ExtraInfoUrl; + } + set + { + WebJob.ExtraInfoUrl = value; + } + } + + public string RunCommand + { + get + { + return WebJob.RunCommand; + } + set + { + WebJob.RunCommand = value; + } + } + + public Uri Url + { + get + { + return WebJob.Url; + } + set + { + WebJob.Url = value; + } + } + + public bool UsingSdk + { + get { return WebJob.UsingSdk; } + set { WebJob.UsingSdk = value; } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/RemoteLogStreamManager.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/RemoteLogStreamManager.cs new file mode 100644 index 000000000000..72e84b42ff81 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/RemoteLogStreamManager.cs @@ -0,0 +1,196 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Net; +using System.Text; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites +{ + public class RemoteLogStreamManager : KuduRemoteClientBase + { + public Action Logger { get; set; } + + /// + /// Parameterless constructor for mocking + /// + public RemoteLogStreamManager() + { + + } + + public RemoteLogStreamManager( + string serviceUrl, + string path, + string filter, + ICredentials credentials, + Action logger = null) + : base(GetServiceUrl(serviceUrl, path, filter), credentials) + { + Logger = logger; + } + + private static string GetServiceUrl(string serviceUrl, string path, string filter) + { + return string.Format( + "{0}/logstream/{1}{2}", + serviceUrl, + path, + string.IsNullOrEmpty(filter) ? string.Empty : "?filter=" + filter); + } + + public virtual Task GetStream() + { + HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(ServiceUrl); + request.UserAgent = ApiConstants.UserAgentHeaderValue; + TaskCompletionSource tcs = new TaskCompletionSource(); + RequestState state = new RequestState { Manager = this, TaskCompletionSource = tcs, Request = request }; + + if (Credentials != null) + { + NetworkCredential networkCred = Credentials.GetCredential( + Client.BaseAddress, + ApiConstants.BasicAuthorization); + string credParameter = Convert.ToBase64String(Encoding.ASCII.GetBytes(networkCred.UserName + ":" + networkCred.Password)); + request.Headers[ApiConstants.AuthorizationHeaderName] = string.Format( + "{0} {1}", + ApiConstants.BasicAuthorization, credParameter); + } + + LogRequest(request); + IAsyncResult result = request.BeginGetResponse(RemoteLogStreamManager.OnGetResponse, state); + + if (result.CompletedSynchronously) + { + state.Response = (HttpWebResponse)request.EndGetResponse(result); + OnGetResponse(state); + } + + return tcs.Task; + } + + private static void OnGetResponse(IAsyncResult result) + { + RequestState state = (RequestState)result.AsyncState; + try + { + state.Response = (HttpWebResponse)state.Request.EndGetResponse(result); + state.Manager.OnGetResponse(state); + } + catch (Exception ex) + { + state.TaskCompletionSource.TrySetException(ex); + } + } + + private void OnGetResponse(RequestState state) + { + state.TaskCompletionSource.TrySetResult(new DelegatingStream(state.Response.GetResponseStream(), state)); + } + + private void LogRequest(HttpWebRequest request) + { + if (Logger != null) + { + Logger(GeneralUtilities.GetHttpRequestLog( + request.Method, + request.RequestUri.ToString(), + request.Headers, + string.Empty)); + } + } + + class RequestState + { + public RemoteLogStreamManager Manager { get; set; } + public TaskCompletionSource TaskCompletionSource { get; set; } + public HttpWebRequest Request { get; set; } + public HttpWebResponse Response { get; set; } + } + + class DelegatingStream : Stream + { + Stream inner; + RequestState state; + + public DelegatingStream(Stream inner, RequestState state) + { + this.inner = inner; + this.state = state; + } + + public override void Close() + { + // To avoid hanging! + this.state.Request.Abort(); + + this.inner.Close(); + } + + public override bool CanRead + { + get { return this.inner.CanRead; } + } + + public override bool CanSeek + { + get { return this.inner.CanSeek; } + } + + public override bool CanWrite + { + get { return this.inner.CanWrite; } + } + + public override void Flush() + { + this.inner.Flush(); + } + + public override long Length + { + get { return this.inner.Length; } + } + + public override long Position + { + get { return this.inner.Position; } + set { this.inner.Position = value; } + } + + public override int Read(byte[] buffer, int offset, int count) + { + return this.inner.Read(buffer, offset, count); + } + + public override long Seek(long offset, SeekOrigin origin) + { + return this.inner.Seek(offset, origin); + } + + public override void SetLength(long value) + { + this.inner.SetLength(value); + } + + public override void Write(byte[] buffer, int offset, int count) + { + this.inner.Write(buffer, offset, count); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/Cache.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/Cache.cs new file mode 100644 index 000000000000..74cf334bcdee --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/Cache.cs @@ -0,0 +1,106 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Web.Script.Serialization; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; +using Microsoft.WindowsAzure.Commands.Common; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services +{ + public static class Cache + { + public static void AddSite(string subscriptionId, Site site) + { + Sites sites = GetSites(subscriptionId); + if (sites == null) + { + sites = new Sites(); + } + + sites.Add(site); + SaveSites(subscriptionId, sites); + } + + public static void RemoveSite(string subscriptionId, Site site) + { + Sites sites = GetSites(subscriptionId); + if (sites == null) + { + return; + } + + sites.RemoveAll(s => s.Name.Equals(site.Name)); + SaveSites(subscriptionId, sites); + } + + public static Site GetSite(string subscriptionId, string website, string propertiesToInclude) + { + return GetSite(subscriptionId, website); + } + + public static Site GetSite(string subscriptionId, string website) + { + Sites sites = GetSites(subscriptionId); + if (sites != null) + { + return sites.FirstOrDefault(s => s.Name.Equals(website, System.StringComparison.InvariantCultureIgnoreCase)); + } + + return null; + } + + public static Sites GetSites(string subscriptionId) + { + try + { + string sitesFile = Path.Combine(AzurePowerShell.ProfileDirectory, + string.Format("sites.{0}.json", subscriptionId)); + if (!File.Exists(sitesFile)) + { + return null; + } + + JavaScriptSerializer javaScriptSerializer = new JavaScriptSerializer(); + List sites = javaScriptSerializer.Deserialize>(FileUtilities.DataStore.ReadFileAsText(sitesFile)); + return new Sites(sites); + } + catch + { + return null; + } + } + + public static void SaveSites(string subscriptionId, Sites sites) + { + try + { + string sitesFile = Path.Combine(AzurePowerShell.ProfileDirectory, + string.Format("sites.{0}.json", subscriptionId)); + JavaScriptSerializer javaScriptSerializer = new JavaScriptSerializer(); + + // Make sure path exists + Directory.CreateDirectory(AzurePowerShell.ProfileDirectory); + FileUtilities.DataStore.WriteFile(sitesFile, javaScriptSerializer.Serialize(sites)); + } + catch + { + // Do nothing. Caching is optional. + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/DeploymentEntities/DeployResult.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/DeploymentEntities/DeployResult.cs new file mode 100644 index 000000000000..87dd9a0ae119 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/DeploymentEntities/DeployResult.cs @@ -0,0 +1,77 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.DeploymentEntities +{ + /// + /// Deployment. + /// + [DebuggerDisplay("{Id} {Status}")] + [DataContract] + public class DeployResult + { + [DataMember(Name = "id")] + public string Id { get; set; } + + [DataMember(Name = "status")] + public DeployStatus Status { get; set; } + + [DataMember(Name = "status_text")] + public string StatusText { get; set; } + + [DataMember(Name = "author_email")] + public string AuthorEmail { get; set; } + + [DataMember(Name = "author")] + public string Author { get; set; } + + [DataMember(Name = "deployer")] + public string Deployer { get; set; } + + [DataMember(Name = "message")] + public string Message { get; set; } + + [DataMember(Name = "received_time")] + public string ReceivedTime { get; set; } + + [DataMember(Name = "start_time")] + public string StartTime { get; set; } + + [DataMember(Name = "end_time")] + public string EndTime { get; set; } + + [DataMember(Name = "last_success_end_time")] + public string LastSuccessEndTime { get; set; } + + [DataMember(Name = "complete")] + public bool Complete { get; set; } + + [DataMember(Name = "active")] + public bool Current { get; set; } + + [DataMember(Name = "url")] + public Uri Url { get; set; } + + [DataMember(Name = "log_url")] + public Uri LogUrl { get; set; } + + [IgnoreDataMember] + public List Logs { get; set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/DeploymentEntities/DeployStatus.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/DeploymentEntities/DeployStatus.cs new file mode 100644 index 000000000000..2015ecb0c98c --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/DeploymentEntities/DeployStatus.cs @@ -0,0 +1,25 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.DeploymentEntities +{ + public enum DeployStatus + { + Pending, + Building, + Deploying, + Failed, + Success + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/DeploymentEntities/DiagnosticsSettings.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/DeploymentEntities/DiagnosticsSettings.cs new file mode 100644 index 000000000000..7f0d21f0be35 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/DeploymentEntities/DiagnosticsSettings.cs @@ -0,0 +1,42 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Newtonsoft.Json; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.DeploymentEntities +{ + /// + /// Diagnostics settings. + /// + public class DiagnosticsSettings + { + [JsonProperty(PropertyName = "AzureDriveEnabled")] + public bool? AzureDriveTraceEnabled { get; set; } + + [JsonProperty] + public LogEntryType AzureDriveTraceLevel { get; set; } + + [JsonProperty(PropertyName = "AzureTableEnabled")] + public bool? AzureTableTraceEnabled { get; set; } + + [JsonProperty] + public LogEntryType AzureTableTraceLevel { get; set; } + + [JsonProperty(PropertyName = "AzureBlobEnabled")] + public bool? AzureBlobTraceEnabled { get; set; } + + [JsonProperty] + public LogEntryType AzureBlobTraceLevel { get; set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/DeploymentEntities/LogEntry.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/DeploymentEntities/LogEntry.cs new file mode 100644 index 000000000000..73c442d100fd --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/DeploymentEntities/LogEntry.cs @@ -0,0 +1,55 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.DeploymentEntities +{ + /// + /// Log. + /// + [DataContract] + public class LogEntry + { + [DataMember(Name = "log_time")] + public DateTime LogTime { get; set; } + + [DataMember(Name = "id")] + public string Id { get; set; } + + [DataMember(Name = "message")] + public string Message { get; set; } + + [DataMember(Name = "type")] + public LogEntryType Type { get; set; } + + [DataMember(Name = "details_url")] + public Uri DetailsUrl { get; set; } + + public bool HasDetails { get; set; } + + public LogEntry() + { + } + + public LogEntry(DateTime logTime, string id, string message, LogEntryType type) + { + LogTime = logTime; + Id = id; + Message = message; + Type = type; + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/DeploymentEntities/LogEntryType.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/DeploymentEntities/LogEntryType.cs new file mode 100644 index 000000000000..73f51940f83a --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/DeploymentEntities/LogEntryType.cs @@ -0,0 +1,24 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.DeploymentEntities +{ + public enum LogEntryType + { + Error, + Warning, + Information, + Verbose + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/DeploymentEntities/LogPath.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/DeploymentEntities/LogPath.cs new file mode 100644 index 000000000000..40ff2473ee79 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/DeploymentEntities/LogPath.cs @@ -0,0 +1,40 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Newtonsoft.Json; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.DeploymentEntities +{ + /// + /// LogPath. + /// + public class LogPath + { + [JsonProperty] + public string Name { get; set; } + + [JsonProperty] + public int Size { get; set; } + + [JsonProperty] + public string MTime { get; set; } + + [JsonProperty] + public string Mime { get; set; } + + [JsonProperty] + public Uri Href { get; set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/DeploymentsExtensionMethods.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/DeploymentsExtensionMethods.cs new file mode 100644 index 000000000000..f40a76118347 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/DeploymentsExtensionMethods.cs @@ -0,0 +1,48 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.IO; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.DeploymentEntities; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services +{ + public static class DeploymentsExtensionMethods + { + public static List GetDeployments(this IDeploymentServiceManagement proxy, int maxItems) + { + return proxy.EndGetDeployments(proxy.BeginGetDeployments(maxItems, null, null)); + } + + public static LogEntry GetDeploymentLog(this IDeploymentServiceManagement proxy, string commitId, string logId) + { + return proxy.EndGetDeploymentLog(proxy.BeginGetDeploymentLog(commitId, logId, null, null)); + } + + public static List GetDeploymentLogs(this IDeploymentServiceManagement proxy, string commitId) + { + return proxy.EndGetDeploymentLogs(proxy.BeginGetDeploymentLogs(commitId, null, null)); + } + + public static void Deploy(this IDeploymentServiceManagement proxy, string commitId) + { + proxy.EndDeploy(proxy.BeginDeploy(commitId, null, null)); + } + + public static Stream DownloadLogs(this IDeploymentServiceManagement proxy) + { + return proxy.EndDownloadLogs(proxy.BeginDownloadLogs(null, null)); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/GeoEntities/GeoLocation.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/GeoEntities/GeoLocation.cs new file mode 100644 index 000000000000..636ae512971c --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/GeoEntities/GeoLocation.cs @@ -0,0 +1,46 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.GeoEntities +{ + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class GeoLocation + { + [DataMember] + public string Name { get; set; } + + [DataMember] + public string Description { get; set; } + + } + + [CollectionDataContract(Namespace = UriElements.ServiceNamespace)] + public class GeoLocations : List + { + + /// + /// Empty collection + /// + public GeoLocations() { } + + /// + /// Initialize from list + /// + /// + public GeoLocations(List locations) : base(locations) { } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/GeoEntities/GeoRegion.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/GeoEntities/GeoRegion.cs new file mode 100644 index 000000000000..497db7c1abe1 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/GeoEntities/GeoRegion.cs @@ -0,0 +1,51 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Runtime.Serialization; +using System.Xml.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.GeoEntities +{ + [DataContract] + [XmlRoot("GeoRegion", Namespace = UriElements.ServiceNamespace)] + public class GeoRegion + { + [DataMember] + public string Name { get; set; } + + [DataMember] + public string Description { get; set; } + + [DataMember] + public int? SortOrder { get; set; } + } + + [CollectionDataContract(Namespace = UriElements.ServiceNamespace)] + [XmlRoot("GeoRegions", Namespace = UriElements.ServiceNamespace)] + public class GeoRegions : List + { + + /// + /// Empty collection + /// + public GeoRegions() { } + + /// + /// Initialize from list + /// + /// + public GeoRegions(List regions) : base(regions) { } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/GeoEntities/Stamp.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/GeoEntities/Stamp.cs new file mode 100644 index 000000000000..dda989ae285b --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/GeoEntities/Stamp.cs @@ -0,0 +1,73 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Runtime.Serialization; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.GeoEntities +{ + [DataContract(Name = "StampState", Namespace = UriElements.ServiceNamespace)] + public enum StampState + { + [EnumMember] + Online = 0, + [EnumMember] + Full = 1, + [EnumMember] + Unhealthy = 2, + [EnumMember] + Preparing = 3, + } + + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class Stamp + { + + [DataMember] + public string Name { get; set; } + + [DataMember] + public string GeoLocation { get; set; } + + [DataMember] + public string Description { get; set; } + + [DataMember] + public string ServiceAddress { get; set; } + + [DataMember] + public StampState State { get; set; } + + [DataMember] + public StampCapacities Capacities { get; set; } + } + + [CollectionDataContract(Namespace = UriElements.ServiceNamespace)] + public class Stamps : List + { + + /// + /// Empty collection + /// + public Stamps() { } + + /// + /// Initialize from list + /// + /// + public Stamps(List stamps) : base(stamps) { } + } +} + diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/Git.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/Git.cs new file mode 100644 index 000000000000..314174c1d1fb --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/Git.cs @@ -0,0 +1,148 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services +{ + public static class Git + { + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public static string GetConfigurationValue(string name) + { + return ExecuteGitProcess(string.Format("config --get {0}", name)).Split('\n').FirstOrDefault(); + } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public static void SetConfigurationValue(string name, string value) + { + ExecuteGitProcess(string.Format("config {0} {1}", name, value)); + } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public static void ClearConfigurationValue(string name) + { + ExecuteGitProcess(string.Format("config --unset {0}", name)); + } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public static IList GetRemoteRepositories() + { + return ExecuteGitProcess("remote").Split('\n'); + } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public static void AddRemoteRepository(string name, string url) + { + ExecuteGitProcess(string.Format("remote add {0} {1}", name, url)); + } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public static void RemoveRemoteRepository(string name) + { + ExecuteGitProcess(string.Format("remote rm {0}", name)); + } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public static void InitRepository() + { + ExecuteGitProcess("init"); + } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public static IList GetWorkingTree() + { + return ExecuteGitProcess("rev-parse --git-dir").Split('\n'); + } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public static IList GetRemoteUris() + { + var remoteUrisLines = ExecuteGitProcess("remote -v").Split('\n'); + List remoteUris = new List(); + + foreach (string remoteUriLine in remoteUrisLines) + { + if (remoteUriLine.Length > 0) + { + string uri = remoteUriLine.Split('\t')[1].Split(' ')[0]; + remoteUris.Add(uri); + } + } + + return remoteUris.Distinct().ToList(); + } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public static string GetUri(string repositoryUri, string siteName, string auth) + { + UriBuilder uriBuilder = new UriBuilder(repositoryUri) + { + Path = siteName + ".git", + UserName = auth + }; + + return uriBuilder.Uri.ToString(); + } + + public static bool IsGitRepository() + { + var sessionState = new SessionState(); + return Directory.Exists(Path.Combine(sessionState.Path.CurrentFileSystemLocation.Path, ".git")); + } + + private static string ExecuteGitProcess(string arguments) + { + try + { + using (var process = new Process()) + { + process.StartInfo.UseShellExecute = false; + + try + { + SessionState sessionState = new SessionState(); + process.StartInfo.WorkingDirectory = sessionState.Path.CurrentFileSystemLocation.Path; + } + catch (Exception) + { + // Do nothing + } + + process.StartInfo.RedirectStandardOutput = true; + process.StartInfo.FileName = "git"; + process.StartInfo.Arguments = arguments; + process.Start(); + + // Read the output stream first and then wait. + string output = process.StandardOutput.ReadToEnd(); + process.WaitForExit(); + return output; + } + } + catch (Win32Exception) + { + throw new Exception(Resources.GitNotFound); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/GitClient.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/GitClient.cs new file mode 100644 index 000000000000..0870f6fa4cf7 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/GitClient.cs @@ -0,0 +1,46 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services +{ + public class GitClient : LinkedRevisionControl + { + public GitClient(PSCmdlet pscmdlet) + { + InvocationPath = pscmdlet.MyInvocation.MyCommand.Module.Path; + } + + public override void Init() + { + if (!IsGitWorkingTree()) + { + // Init git in current directory + InitGitOnCurrentDirectory(); + } + } + + public override void Deploy(Site website) + { + // Do nothing + } + + protected override void Dispose(bool disposing) + { + // Do nothing + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/GitWebSite.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/GitWebSite.cs new file mode 100644 index 000000000000..1ad2124df1ab --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/GitWebSite.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Security.Permissions; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services +{ + public class GitWebsite + { + public string Name { get; set; } + public string Webspace { get; set; } + + public GitWebsite(string name, string webspace) + { + Name = name; + Webspace = webspace; + } + + [EnvironmentPermission(SecurityAction.LinkDemand, Unrestricted = true)] + public void WriteConfiguration() + { + Git.SetConfigurationValue("azure.site.name", Name); + Git.SetConfigurationValue("azure.site.webspace", Webspace); + } + + [EnvironmentPermission(SecurityAction.LinkDemand, Unrestricted = true)] + public static GitWebsite ReadConfiguration() + { + return new GitWebsite( + Git.GetConfigurationValue("azure.site.name"), + Git.GetConfigurationValue("azure.site.webspace")); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/Github/Entities/GithubAuthorization.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/Github/Entities/GithubAuthorization.cs new file mode 100644 index 000000000000..0cdeb0f32d2f --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/Github/Entities/GithubAuthorization.cs @@ -0,0 +1,60 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// --------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.Github.Entities +{ + [DataContract] + public class GithubApp + { + [DataMember(Name = "url", IsRequired = false)] + public string Url { get; set; } + + [DataMember(Name = "name", IsRequired = false)] + public string Name { get; set; } + } + + [DataContract] + public class GithubAuthorization + { + [DataMember(Name = "id", IsRequired = false)] + public string Id { get; set; } + + [DataMember(Name = "url", IsRequired = false)] + public string Url { get; set; } + + [DataMember(Name = "scopes", IsRequired = false)] + public IList Scopes { get; set; } + + [DataMember(Name = "token", IsRequired = false)] + public string Token { get; set; } + + [DataMember(Name = "app", IsRequired = false)] + public GithubApp App { get; set; } + + [DataMember(Name = "note", IsRequired = false)] + public string Note { get; set; } + + [DataMember(Name = "note_url", IsRequired = false)] + public string NoteUrl { get; set; } + + [DataMember(Name = "created_at", IsRequired = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "updated_at", IsRequired = false)] + public string UpdatedAt { get; set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/Github/Entities/GithubAuthorizationRequest.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/Github/Entities/GithubAuthorizationRequest.cs new file mode 100644 index 000000000000..2574770c1464 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/Github/Entities/GithubAuthorizationRequest.cs @@ -0,0 +1,32 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// --------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.Github.Entities +{ + [DataContract] + public class GithubAuthorizationRequest + { + [DataMember(Name = "scopes", IsRequired = false, EmitDefaultValue = false)] + public IList Scopes { get; set; } + + [DataMember(Name = "note", IsRequired = false, EmitDefaultValue = false)] + public string Note { get; set; } + + [DataMember(Name = "note_url", IsRequired = false, EmitDefaultValue = false)] + public string NoteUrl { get; set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/Github/Entities/GithubOrganization.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/Github/Entities/GithubOrganization.cs new file mode 100644 index 000000000000..cc38fa2f4bbe --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/Github/Entities/GithubOrganization.cs @@ -0,0 +1,37 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// --------------------------------------------------------------------------------- + +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.Github.Entities +{ + [DataContract] + public class GithubOrganization + { + [DataMember(Name = "url", IsRequired = false)] + public string Url { get; set; } + + [DataMember(Name = "login", IsRequired = false)] + public string Login { get; set; } + + [DataMember(Name = "avatar_url", IsRequired = false)] + public string AvatarUrl { get; set; } + + [DataMember(Name = "gravatar_id", IsRequired = false)] + public string GravatarId { get; set; } + + [DataMember(Name = "id", IsRequired = false)] + public string Id { get; set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/Github/Entities/GithubRepository.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/Github/Entities/GithubRepository.cs new file mode 100644 index 000000000000..d6a2b444617d --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/Github/Entities/GithubRepository.cs @@ -0,0 +1,131 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.Github.Entities +{ + [DataContract] + public class GithubPermissions + { + [DataMember(Name = "admin")] + public bool Admin { get; set; } + + [DataMember(Name = "pull")] + public bool Pull { get; set; } + + [DataMember(Name = "push")] + public bool Push { get; set; } + } + + [DataContract] + public class GithubRepository : IComparable + { + [DataMember(Name = "clone_url", IsRequired = false)] + public string CloneUrl { get; set; } + + [DataMember(Name = "forks_count", IsRequired = false)] + public int ForksCount { get; set; } + + [DataMember(Name = "url", IsRequired = false)] + public string Url { get; set; } + + [DataMember(Name = "watchers", IsRequired = false)] + public int Watchers { get; set; } + + [DataMember(Name = "has_issues", IsRequired = false)] + public bool HasIssues { get; set; } + + [DataMember(Name = "open_issues_count", IsRequired = false)] + public int OpenIssuesCount { get; set; } + + [DataMember(Name = "owner", IsRequired = false)] + public GithubOrganization Owner { get; set; } + + [DataMember(Name = "full_name", IsRequired = false)] + public string FullName { get; set; } + + [DataMember(Name = "has_wiki", IsRequired = false)] + public bool HasWiki { get; set; } + + [DataMember(Name = "mirror_url", IsRequired = false)] + public string MirrorUrl { get; set; } + + [DataMember(Name = "permissions", IsRequired = false)] + public GithubPermissions Permissions { get; set; } + + [DataMember(Name = "created_at", IsRequired = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "homepage", IsRequired = false)] + public string Homepage { get; set; } + + [DataMember(Name = "svn_url", IsRequired = false)] + public string SvnUrl { get; set; } + + [DataMember(Name = "open_issues", IsRequired = false)] + public string OpenIssues { get; set; } + + [DataMember(Name = "pushed_at", IsRequired = false)] + public string PushedAt { get; set; } + + [DataMember(Name = "forks", IsRequired = false)] + public int Forks { get; set; } + + [DataMember(Name = "description", IsRequired = false)] + public string Description { get; set; } + + [DataMember(Name = "ssh_url", IsRequired = false)] + public string SshUrl { get; set; } + + [DataMember(Name = "size", IsRequired = false)] + public int Size { get; set; } + + [DataMember(Name = "fork", IsRequired = false)] + public bool Fork { get; set; } + + [DataMember(Name = "updated_at", IsRequired = false)] + public string UpdatedAt { get; set; } + + [DataMember(Name = "git_url", IsRequired = false)] + public string GitUrl { get; set; } + + [DataMember(Name = "name", IsRequired = false)] + public string Name { get; set; } + + [DataMember(Name = "has_downloads", IsRequired = false)] + public string HasDownloads { get; set; } + + [DataMember(Name = "private", IsRequired = false)] + public bool Private { get; set; } + + [DataMember(Name = "id", IsRequired = false)] + public string Id { get; set; } + + [DataMember(Name = "watchers_count", IsRequired = false)] + public string WatchersCount { get; set; } + + [DataMember(Name = "language", IsRequired = false)] + public string Language { get; set; } + + [DataMember(Name = "html_url", IsRequired = false)] + public string HtmlUrl { get; set; } + + public int CompareTo(object obj) + { + return string.Compare(Name, ((GithubRepository) obj).Name, StringComparison.InvariantCultureIgnoreCase); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/Github/Entities/GithubRepositoryHook.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/Github/Entities/GithubRepositoryHook.cs new file mode 100644 index 000000000000..0f74ebff9ca8 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/Github/Entities/GithubRepositoryHook.cs @@ -0,0 +1,60 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// --------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.Github.Entities +{ + [DataContract] + public class GithubRepositoryHookConfig + { + [DataMember(Name = "url")] + public string Url { get; set; } + + [DataMember(Name = "insure_ssl")] + public string InsecureSsl { get; set; } + + [DataMember(Name = "content_type")] + public string ContentType { get; set; } + } + + [DataContract] + public class GithubRepositoryHook + { + [DataMember(Name = "url", IsRequired = false, EmitDefaultValue = false)] + public string Url { get; set; } + + [DataMember(Name = "updated_at", IsRequired = false, EmitDefaultValue = false)] + public string UpdatedAt { get; set; } + + [DataMember(Name = "created_at", IsRequired = false, EmitDefaultValue = false)] + public string CreatedAt { get; set; } + + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string Name { get; set; } + + [DataMember(Name = "events", IsRequired = false, EmitDefaultValue = false)] + public IList Events { get; set; } + + [DataMember(Name = "active", IsRequired = false, EmitDefaultValue = false)] + public bool Active { get; set; } + + [DataMember(Name = "config", IsRequired = false, EmitDefaultValue = false)] + public GithubRepositoryHookConfig Config { get; set; } + + [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] + public string Id { get; set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/Github/GithubAuthHeaderInserter.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/Github/GithubAuthHeaderInserter.cs new file mode 100644 index 000000000000..10d57981c1f6 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/Github/GithubAuthHeaderInserter.cs @@ -0,0 +1,89 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.ServiceModel.Channels; +using System.ServiceModel.Description; +using System.ServiceModel.Dispatcher; +using System.Text; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.Github +{ + public class GithubAutHeaderInserter : IClientMessageInspector, IEndpointBehavior + { + public string Username + { + get; + set; + } + + public string Password + { + get; + set; + } + + #region IClientMessageInspector Members + + public void AfterReceiveReply(ref System.ServiceModel.Channels.Message reply, object correlationState) + { + + } + + //All our requests need to have the custom authorization headers + public object BeforeSendRequest(ref System.ServiceModel.Channels.Message request, System.ServiceModel.IClientChannel channel) + { + //Get the HttpRequestMessage property from the message + var httpreq = request.Properties[HttpRequestMessageProperty.Name] as HttpRequestMessageProperty; + string username = GetLogin(Username); + byte[] authbytes = Encoding.ASCII.GetBytes(string.Concat(username, ":", Password)); + string base64 = Convert.ToBase64String(authbytes); + string authorization = string.Concat("Basic ", base64); + + if (httpreq == null) + { + httpreq = new HttpRequestMessageProperty(); + request.Properties.Add(HttpRequestMessageProperty.Name, httpreq); + } + + httpreq.Headers["authorization"] = authorization; + + return null; + } + + public static string GetLogin(string username) + { + string s = username; + int stop = s.IndexOf("\\"); + return (stop > -1) ? s.Substring(stop + 1, s.Length - stop - 1) : username; + } + + #endregion + + #region IEndpointBehavior Members + + public void AddBindingParameters(ServiceEndpoint endpoint, BindingParameterCollection bindingParameters) { } + + public void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime) + { + clientRuntime.MessageInspectors.Add(this); + } + + public void ApplyDispatchBehavior(ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher) { } + + public void Validate(ServiceEndpoint endpoint) { } + + #endregion + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/Github/GithubExtensionMethods.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/Github/GithubExtensionMethods.cs new file mode 100644 index 000000000000..fd25ceb23ad9 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/Github/GithubExtensionMethods.cs @@ -0,0 +1,72 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.Github.Entities; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.Github +{ + public static class GithubExtensionMethods + { + public static GithubAuthorization CreateAuthorizationToken(this IGithubServiceManagement proxy, GithubAuthorizationRequest request) + { + return proxy.EndCreateAuthorizationToken(proxy.BeginCreateAuthorizationToken(request, null, null)); + } + + public static List GetOrganizations(this IGithubServiceManagement proxy) + { + return proxy.EndGetOrganizations(proxy.BeginGetOrganizations(null, null)); + } + + public static List GetOrganizationsFromUser(this IGithubServiceManagement proxy, string user) + { + return proxy.EndGetOrganizationsFromUser(proxy.BeginGetOrganizationsFromUser(user, null, null)); + } + + public static List GetRepositories(this IGithubServiceManagement proxy) + { + return proxy.EndGetRepositories(proxy.BeginGetRepositories(null, null)); + } + + public static List GetRepositoriesFromUser(this IGithubServiceManagement proxy, string user) + { + return proxy.EndGetRepositoriesFromUser(proxy.BeginGetRepositoriesFromUser(user, null, null)); + } + + public static List GetRepositoriesFromOrg(this IGithubServiceManagement proxy, string organization) + { + return proxy.EndGetRepositoriesFromOrg(proxy.BeginGetRepositoriesFromOrg(organization, null, null)); + } + + public static List GetRepositoryHooks(this IGithubServiceManagement proxy, string owner, string repository) + { + return proxy.EndGetRepositoryHooks(proxy.BeginGetRepositoryHooks(owner, repository, null, null)); + } + + public static GithubRepositoryHook CreateRepositoryHook(this IGithubServiceManagement proxy, string owner, string repository, GithubRepositoryHook hook) + { + return proxy.EndCreateRepositoryHook(proxy.BeginCreateRepositoryHook(owner, repository, hook, null, null)); + } + + public static GithubRepositoryHook UpdateRepositoryHook(this IGithubServiceManagement proxy, string owner, string repository, string id, GithubRepositoryHook hook) + { + return proxy.EndUpdateRepositoryHook(proxy.BeginUpdateRepositoryHook(owner, repository, id, hook, null, null)); + } + + public static void TestRepositoryHook(this IGithubServiceManagement proxy, string owner, string repository, string id) + { + proxy.EndTestRepositoryHook(proxy.BeginTestRepositoryHook(owner, repository, id, null, null)); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/Github/IGithubServiceManagement.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/Github/IGithubServiceManagement.cs new file mode 100644 index 000000000000..43230bdc1b15 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/Github/IGithubServiceManagement.cs @@ -0,0 +1,90 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.ServiceModel; +using System.ServiceModel.Web; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.Github.Entities; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.Github +{ + /// + /// Provides the Github Api. + /// + [ServiceContract] + public interface IGithubServiceManagement + { + [Description("Creates a new authorization")] + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "POST", UriTemplate = "/authorizations", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)] + IAsyncResult BeginCreateAuthorizationToken(GithubAuthorizationRequest request, AsyncCallback callback, object state); + GithubAuthorization EndCreateAuthorizationToken(IAsyncResult asyncResult); + + [Description("Gets the organizations for the authenticated user")] + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "GET", UriTemplate = "/user/orgs", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)] + IAsyncResult BeginGetOrganizations(AsyncCallback callback, object state); + List EndGetOrganizations(IAsyncResult asyncResult); + + [Description("Gets the organizations for an user")] + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "GET", UriTemplate = "/users/{user}/orgs", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)] + IAsyncResult BeginGetOrganizationsFromUser(string user, AsyncCallback callback, object state); + List EndGetOrganizationsFromUser(IAsyncResult asyncResult); + + [Description("Gets the repositories for the authenticated user")] + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "GET", UriTemplate = "/user/repos", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)] + IAsyncResult BeginGetRepositories(AsyncCallback callback, object state); + List EndGetRepositories(IAsyncResult asyncResult); + + [Description("Gets the repositories for an user")] + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "GET", UriTemplate = "/users/{user}/repos", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)] + IAsyncResult BeginGetRepositoriesFromUser(string user, AsyncCallback callback, object state); + List EndGetRepositoriesFromUser(IAsyncResult asyncResult); + + [Description("Gets the repositories for an organization")] + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "GET", UriTemplate = "/orgs/{organization}/repos?sort=updated&desc=desc", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)] + IAsyncResult BeginGetRepositoriesFromOrg(string organization, AsyncCallback callback, object state); + List EndGetRepositoriesFromOrg(IAsyncResult asyncResult); + + [Description("Gets the repository hooks")] + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "GET", UriTemplate = "/repos/{owner}/{repository}/hooks", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)] + IAsyncResult BeginGetRepositoryHooks(string owner, string repository, AsyncCallback callback, object state); + List EndGetRepositoryHooks(IAsyncResult asyncResult); + + [Description("Creates a repository hook")] + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "POST", UriTemplate = "/repos/{owner}/{repository}/hooks", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)] + IAsyncResult BeginCreateRepositoryHook(string owner, string repository, GithubRepositoryHook hook, AsyncCallback callback, object state); + GithubRepositoryHook EndCreateRepositoryHook(IAsyncResult asyncResult); + + [Description("Updates a repository hook")] + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "PATCH", UriTemplate = "/repos/{owner}/{repository}/hooks/{id}", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)] + IAsyncResult BeginUpdateRepositoryHook(string owner, string repository, string id, GithubRepositoryHook hook, AsyncCallback callback, object state); + GithubRepositoryHook EndUpdateRepositoryHook(IAsyncResult asyncResult); + + [Description("Tests a repository hook")] + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "POST", UriTemplate = "/repos/{owner}/{repository}/hooks/{id}/test", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)] + IAsyncResult BeginTestRepositoryHook(string owner, string repository, string id, AsyncCallback callback, object state); + void EndTestRepositoryHook(IAsyncResult asyncResult); + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/GithubClient.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/GithubClient.cs new file mode 100644 index 000000000000..cabb5dcae91e --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/GithubClient.cs @@ -0,0 +1,331 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Management.Automation; +using System.Management.Automation.Host; +using System.Runtime.InteropServices; +using System.Security; +using System.Security.Permissions; +using System.ServiceModel; +using System.ServiceModel.Web; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.Github; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.Github.Entities; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services +{ + public static class SecureStringExtensionMethods + { + [SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)] + public static string ConvertToUnsecureString(this SecureString securePassword) + { + if (securePassword == null) + throw new ArgumentNullException("securePassword"); + + IntPtr unmanagedString = IntPtr.Zero; + try + { + unmanagedString = Marshal.SecureStringToGlobalAllocUnicode(securePassword); + return Marshal.PtrToStringUni(unmanagedString); + } + finally + { + Marshal.ZeroFreeGlobalAllocUnicode(unmanagedString); + } + } + } + + public class GithubClient : LinkedRevisionControl + { + private static Dictionary> _factories = + new Dictionary>(); + + public const string GithubEndpoint = "https://api.github.com"; + + protected GithubRepository LinkedRepository; + protected PSCredential Credentials; + protected string RepositoryFullName; + protected IGithubCmdlet PSCmdlet; + + public GithubClient( + IGithubCmdlet pscmdlet, + PSCredential credentials, + string githubRepository) + { + _factories = new Dictionary>(); + PSCmdlet = pscmdlet; + if (PSCmdlet.MyInvocation != null) + { + InvocationPath = PSCmdlet.MyInvocation.MyCommand.Module.Path; + } + + Credentials = credentials; + RepositoryFullName = githubRepository; + } + + private void Authenticate() + { + EnsureCredentials(); + + PSCmdlet.GithubChannel = CreateGithubChannel(); + } + + private void EnsureCredentials() + { + // Ensure credentials + if (Credentials == null) + { + Credentials = PSCmdlet.Host.UI.PromptForCredential("Enter username/password", + "", "", ""); + if (Credentials == null || string.IsNullOrEmpty(Credentials.UserName) || Credentials.Password == null) + { + throw new Exception("Invalid credentials"); + } + } + } + + protected IList GetRepositories() + { + List repositories = null; + InvokeInGithubOperationContext(() => { repositories = PSCmdlet.GithubChannel.GetRepositories(); }); + + List organizations = null; + InvokeInGithubOperationContext(() => { organizations = PSCmdlet.GithubChannel.GetOrganizations(); }); + + List orgRepositories = new List(); + foreach (var organization in organizations) + { + List currentOrgRepositories = null; + InvokeInGithubOperationContext(() => { currentOrgRepositories = PSCmdlet.GithubChannel.GetRepositoriesFromOrg(organization.Login); }); + orgRepositories.AddRange(currentOrgRepositories); + } + + repositories.Sort(); + orgRepositories.Sort(); + repositories.AddRange(orgRepositories); + return repositories.Where(r => r.Private == false).ToList(); + } + + protected void CreateOrUpdateHook(string owner, string repository, Site website) + { + string baseUri = website.GetProperty("repositoryuri"); + string publishingUsername = website.GetProperty("publishingusername"); + string publishingPassword = website.GetProperty("publishingpassword"); + UriBuilder newUri = new UriBuilder(baseUri); + newUri.UserName = publishingUsername; + newUri.Password = publishingPassword; + newUri.Path = "/deploy"; + + string deployUri = newUri.ToString(); + + List repositoryHooks = new List(); + InvokeInGithubOperationContext(() => { repositoryHooks = PSCmdlet.GithubChannel.GetRepositoryHooks(owner, repository); }); + + var existingHook = repositoryHooks.FirstOrDefault(h => h.Name.Equals("web") && new Uri(h.Config.Url).Host.Equals(new Uri(deployUri).Host)); + if (existingHook != null) + { + if (!existingHook.Config.Url.Equals(newUri.ToString(), StringComparison.InvariantCultureIgnoreCase)) + { + existingHook.Config.Url = deployUri; + InvokeInGithubOperationContext(() => PSCmdlet.GithubChannel.UpdateRepositoryHook(owner, repository, existingHook.Id, existingHook)); + InvokeInGithubOperationContext(() => PSCmdlet.GithubChannel.TestRepositoryHook(owner, repository, existingHook.Id)); + } + else + { + throw new Exception(Resources.LinkAlreadyEstablished); + } + } + else + { + GithubRepositoryHook githubRepositoryHook = new GithubRepositoryHook() + { + Name = "web", + Active = true, + Events = new List { "push" }, + Config = new GithubRepositoryHookConfig + { + Url = deployUri, + InsecureSsl = "1", + ContentType = "form" + } + }; + + InvokeInGithubOperationContext(() => { githubRepositoryHook = PSCmdlet.GithubChannel.CreateRepositoryHook(owner, repository, githubRepositoryHook); }); + InvokeInGithubOperationContext(() => PSCmdlet.GithubChannel.TestRepositoryHook(owner, repository, githubRepositoryHook.Id)); + } + } + + private bool RepositoryMatchUri(GithubRepository githubRepository, string remoteUri) + { + string cleanUri; + try + { + UriBuilder uri = new UriBuilder(remoteUri) {UserName = null, Password = null}; + cleanUri = uri.ToString(); + } + catch + { + // Fail gracefully to handle ssh scenario + cleanUri = remoteUri; + } + + return new UriBuilder(githubRepository.CloneUrl).ToString().Equals(cleanUri, StringComparison.InvariantCultureIgnoreCase) + || new UriBuilder(githubRepository.HtmlUrl).ToString().Equals(cleanUri, StringComparison.InvariantCultureIgnoreCase) + || new UriBuilder(githubRepository.GitUrl).ToString().Equals(cleanUri, StringComparison.InvariantCultureIgnoreCase) + || githubRepository.SshUrl.Equals(cleanUri, StringComparison.InvariantCultureIgnoreCase); + } + + public override void Init() + { + Authenticate(); + + if (!IsGitWorkingTree()) + { + // Init git in current directory + InitGitOnCurrentDirectory(); + } + + IList repositories = GetRepositories(); + if (!string.IsNullOrEmpty(RepositoryFullName)) + { + LinkedRepository = repositories.FirstOrDefault(r => r.FullName.Equals(RepositoryFullName, StringComparison.InvariantCultureIgnoreCase)); + } + else + { + var remoteUris = Git.GetRemoteUris(); + if (remoteUris.Count == 1) + { + LinkedRepository = repositories.FirstOrDefault(r => RepositoryMatchUri(r, remoteUris.First())); + } + else if (remoteUris.Count > 0) + { + // filter repositories to reduce prompt options + repositories = repositories.Where(r => remoteUris.Any(u => RepositoryMatchUri(r, u))).ToList(); + } + } + + if (LinkedRepository == null) + { + Collection choices = new Collection(repositories.Select(item => new ChoiceDescription(item.FullName)).ToList()); + var choice = ((PSCmdlet)PSCmdlet).Host.UI.PromptForChoice( + "Choose a repository", + "", + choices, + 0 + ); + + LinkedRepository = repositories.FirstOrDefault(r => r.FullName.Equals(choices[choice].Label)); + } + } + + public override void Deploy(Site website) + { + CreateOrUpdateHook(LinkedRepository.Owner.Login, LinkedRepository.Name, website); + } + + protected IGithubServiceManagement CreateGithubChannel() + { + // If ShareChannel is set by a unit test, use the same channel that + // was passed into out constructor. This allows the test to submit + // a mock that we use for all network calls. + if (PSCmdlet.ShareChannel) + { + return PSCmdlet.GithubChannel; + } + + return CreateServiceManagementChannel( + new Uri(GithubEndpoint), + Credentials.UserName, + Credentials.Password.ConvertToUnsecureString(), + PSCmdlet.GetLogger()); + } + + public static IGithubServiceManagement CreateServiceManagementChannel( + Uri remoteUri, + string username, + string password, + Action logger) + { + WebChannelFactory factory; + if (_factories.ContainsKey(remoteUri.ToString())) + { + factory = _factories[remoteUri.ToString()]; + } + else + { + factory = new WebChannelFactory(remoteUri); + factory.Endpoint.Behaviors.Add(new GithubAutHeaderInserter {Username = username, Password = password}); + factory.Endpoint.Behaviors.Add(new ServiceManagementClientOutputMessageInspector()); + factory.Endpoint.Behaviors.Add(new HttpRestMessageInspector(logger)); + + WebHttpBinding wb = factory.Endpoint.Binding as WebHttpBinding; + wb.Security.Transport.ClientCredentialType = HttpClientCredentialType.Basic; + wb.Security.Mode = WebHttpSecurityMode.Transport; + wb.MaxReceivedMessageSize = 10000000; + + if (!string.IsNullOrEmpty(username)) + { + factory.Credentials.UserName.UserName = username; + } + if (!string.IsNullOrEmpty(password)) + { + factory.Credentials.UserName.Password = password; + } + + _factories[remoteUri.ToString()] = factory; + } + + return factory.CreateChannel(); + } + + /// + /// Invoke the given operation within an OperationContextScope if the + /// channel supports it. + /// + /// The action to invoke. + protected void InvokeInGithubOperationContext(Action action) + { + IContextChannel contextChannel = PSCmdlet.GithubChannel as IContextChannel; + if (contextChannel != null) + { + using (new OperationContextScope(contextChannel)) + { + action(); + } + } + else + { + action(); + } + } + + protected override void Dispose(bool disposing) + { + if (disposing) + { + foreach (var factory in _factories.Values) + { + factory.Close(); + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/IDeploymentServiceManagement.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/IDeploymentServiceManagement.cs new file mode 100644 index 000000000000..8e92d088b5ca --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/IDeploymentServiceManagement.cs @@ -0,0 +1,62 @@ + +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.IO; +using System.ServiceModel; +using System.ServiceModel.Web; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.DeploymentEntities; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services +{ + /// + /// Provides the Microsoft Azure Service Management Api for Microsoft Azure Websites Deployment. + /// + [ServiceContract] + public interface IDeploymentServiceManagement + { + [Description("Gets all deployments for a given repository")] + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "GET", UriTemplate = "deployments?%24orderby=ReceivedTime%20desc&%24top={maxItems}")] + IAsyncResult BeginGetDeployments(int maxItems, AsyncCallback callback, object state); + List EndGetDeployments(IAsyncResult asyncResult); + + [Description("Gets all deployment logs for a given commit")] + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "GET", UriTemplate = "deployments/{commitId}/log")] + IAsyncResult BeginGetDeploymentLogs(string commitId, AsyncCallback callback, object state); + List EndGetDeploymentLogs(IAsyncResult asyncResult); + + [Description("Gets a deployment log for a given commit")] + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "GET", UriTemplate = "deployments/{commitId}/log/{logId}")] + IAsyncResult BeginGetDeploymentLog(string commitId, string logId, AsyncCallback callback, object state); + LogEntry EndGetDeploymentLog(IAsyncResult asyncResult); + + [Description("Redeploys a specific commit")] + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "PUT", UriTemplate = "deployments/{commitId}")] + IAsyncResult BeginDeploy(string commitId, AsyncCallback callback, object state); + void EndDeploy(IAsyncResult asyncResult); + + [Description("Downloads the website logs")] + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "GET", UriTemplate = "dump")] + IAsyncResult BeginDownloadLogs(AsyncCallback callback, object state); + Stream EndDownloadLogs(IAsyncResult asyncResult); + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/IWebsitesServiceManagement.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/IWebsitesServiceManagement.cs new file mode 100644 index 000000000000..bdc630c73d4c --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/IWebsitesServiceManagement.cs @@ -0,0 +1,194 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.ServiceModel; +using System.ServiceModel.Web; +using System.Xml.Serialization; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.GeoEntities; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services +{ + [XmlRoot(ElementName = "Error", Namespace = UriElements.ServiceNamespace)] + public class ServiceError + { + public string Code { get; set; } + public string Message { get; set; } + public string ExtendedCode { get; set; } + public string MessageTemplate { get; set; } + + [XmlArray("Parameters")] + [XmlArrayItem(typeof(string), Namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays")] + public List Parameters { get; set; } + } + + /// + /// Provides the Microsoft Azure Service Management Api for Microsoft Azure Websites. + /// + [ServiceContract(Namespace = UriElements.ServiceNamespace)] + [ServiceKnownType(typeof(SiteWithWebSpace))] + public interface IWebsitesServiceManagement + { + [Description("Gets all webspaces for subscription")] + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "GET", UriTemplate = UriElements.WebSpacesRoot + "/")] + IAsyncResult BeginGetWebSpaces(string subscriptionName, AsyncCallback callback, object state); + WebSpaces EndGetWebSpaces(IAsyncResult asyncResult); + + [Description("Gets all webspaces for subscription")] + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "GET", UriTemplate = UriElements.WebSpacesRoot + UriElements.NameTemplateParameter)] + IAsyncResult BeginGetWebSpace(string subscriptionName, string name, AsyncCallback callback, object state); + WebSpace EndGetWebSpace(IAsyncResult asyncResult); + + [Description("Creates a new webspace")] + [OperationContract(AsyncPattern = true)] + [WebInvoke(UriTemplate = UriElements.WebSpacesRoot + UriElements.AllowPendingStateParameter, Method = "POST")] + IAsyncResult BeginCreateWebSpace(string subscriptionName, bool allowPendingState, WebSpace webSpace, AsyncCallback callback, object state); + WebSpace EndCreateWebSpace(IAsyncResult asyncResult); + + [Description("Updates an existing webspace")] + [OperationContract(AsyncPattern = true)] + [WebInvoke(UriTemplate = UriElements.WebSpacesRoot + UriElements.NameTemplateParameter + UriElements.AllowPendingStateParameter, Method = "PUT")] + IAsyncResult BeginUpdateWebSpace(string subscriptionName, string name, bool allowPendingState, WebSpace webSpace, AsyncCallback callback, object state); + WebSpace EndUpdateWebSpace(IAsyncResult asyncResult); + + [Description("Deletes a webspace")] + [OperationContract(AsyncPattern = true)] + [WebInvoke(UriTemplate = UriElements.WebSpacesRoot + UriElements.NameTemplateParameter, Method = "DELETE")] + IAsyncResult BeginDeleteWebSpace(string subscriptionName, string name, AsyncCallback callback, object state); + void EndDeleteWebSpace(IAsyncResult asyncResult); + + [Description("Gets all publishing users for subscription")] + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "GET", UriTemplate = UriElements.SubscriptionPublishingUsers)] + IAsyncResult BeginGetSubscriptionPublishingUsers(string subscriptionName, AsyncCallback callback, object state); + string[] EndGetSubscriptionPublishingUsers(IAsyncResult asyncResult); + + #region Site CRUD + + [Description("Returns all the sites for a given subscription and webspace.")] + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "GET", UriTemplate = UriElements.WebSitesRoot + UriElements.PropertiesToIncludeParameter)] + IAsyncResult BeginGetSites(string subscriptionName, string webspaceName, string propertiesToInclude, AsyncCallback callback, object state); + Sites EndGetSites(IAsyncResult asyncResult); + + [Description("Returns the details of a particular site.")] + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "GET", UriTemplate = UriElements.WebSitesRoot + UriElements.NameTemplateParameter + UriElements.PropertiesToIncludeParameter)] + IAsyncResult BeginGetSite(string subscriptionName, string webspaceName, string name, string propertiesToInclude, AsyncCallback callback, object state); + Site EndGetSite(IAsyncResult asyncResult); + + [Description("Adds a new site")] + [OperationContract(AsyncPattern = true)] + [WebInvoke(UriTemplate = UriElements.WebSitesRoot, Method = "POST")] + IAsyncResult BeginCreateSite(string subscriptionName, string webspaceName, Site site, AsyncCallback callback, object state); + Site EndCreateSite(IAsyncResult asyncResult); + + [Description("Updates an existing site")] + [OperationContract(AsyncPattern = true)] + [WebInvoke(UriTemplate = UriElements.WebSitesRoot + UriElements.NameTemplateParameter, Method = "PUT")] + IAsyncResult BeginUpdateSite(string subscriptionName, string webspaceName, string name, Site site, AsyncCallback callback, object state); + void EndUpdateSite(IAsyncResult asyncResult); + + [Description("Deletes an existing site.")] + [OperationContract(AsyncPattern = true)] + [WebInvoke(UriTemplate = UriElements.WebSitesRoot + UriElements.NameTemplateParameter + UriElements.DeleteMetricsParameter, Method = "DELETE")] + IAsyncResult BeginDeleteSite(string subscriptionName, string webspaceName, string name, string deleteMetrics, AsyncCallback callback, object state); + void EndDeleteSite(IAsyncResult asyncResult); + + #endregion + + #region Site configuration settings + + [Description("Gets site's configuration settings")] + [WebInvoke(Method = "GET", UriTemplate = UriElements.WebSiteConfig)] + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginGetSiteConfig(string subscriptionName, string webspaceName, string name, AsyncCallback callback, object state); + SiteConfig EndGetSiteConfig(IAsyncResult asyncResult); + + [Description("Updates site's configuration settings")] + [OperationContract(AsyncPattern = true)] + [WebInvoke(UriTemplate = UriElements.WebSiteConfig, Method = "PUT")] + IAsyncResult BeginUpdateSiteConfig(string subscriptionName, string webspaceName, string name, SiteConfig siteConfig, AsyncCallback callback, object state); + void EndUpdateSiteConfig(IAsyncResult asyncResult); + + #endregion + + #region Repository methods + + [Description("Creates a repository for a site")] + [OperationContract(AsyncPattern = true)] + [WebInvoke(UriTemplate = UriElements.WebSiteRepository, Method = "POST")] + IAsyncResult BeginCreateSiteRepository(string subscriptionName, string webspaceName, string name, AsyncCallback callback, object state); + void EndCreateSiteRepository(IAsyncResult asyncResult); + + [Description("Gets a site's repository URI")] + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "GET", UriTemplate = UriElements.WebSiteRepository)] + IAsyncResult BeginGetSiteRepositoryUri(string subscriptionName, string webspaceName, string name, AsyncCallback callback, object state); + Uri EndGetSiteRepositoryUri(IAsyncResult asyncResult); + + [Description("Deletes a site's repository")] + [OperationContract(AsyncPattern = true)] + [WebInvoke(UriTemplate = UriElements.WebSiteRepository, Method = "DELETE")] + IAsyncResult BeginDeleteSiteRepository(string subscriptionName, string webspaceName, string name, AsyncCallback callback, object state); + void EndDeleteSiteRepository(IAsyncResult asyncResult); + + [Description("Creates a development site in a site's repository")] + [OperationContract(AsyncPattern = true)] + [WebInvoke(UriTemplate = UriElements.WebSiteRepositoryDev, Method = "POST")] + IAsyncResult BeginCreateDevSite(string subscriptionName, string webspaceName, string name, AsyncCallback callback, object state); + void EndCreateDevSite(IAsyncResult asyncResult); + + [Description("Gets a development site in a site's repository")] + [OperationContract(AsyncPattern = true)] + [WebInvoke(Method = "GET", UriTemplate = UriElements.WebSiteRepositoryDev)] + IAsyncResult BeginGetDevSite(string subscriptionName, string webspaceName, string name, AsyncCallback callback, object state); + SiteRepositoryDev EndGetDevSite(IAsyncResult asyncResult); + + [Description("Updates a development site in a site's repository")] + [OperationContract(AsyncPattern = true)] + [WebInvoke(UriTemplate = UriElements.WebSiteRepositoryDev, Method = "PUT")] + IAsyncResult BeginUpdateDevSite(string subscriptionName, string webspaceName, string name, SiteRepositoryDev repositoryDevSite, AsyncCallback callback, object state); + void EndUpdateDevSite(IAsyncResult asyncResult); + + [Description("Deletes a development site in a site's repository")] + [OperationContract(AsyncPattern = true)] + [WebInvoke(UriTemplate = UriElements.WebSiteRepositoryDev, Method = "DELETE")] + IAsyncResult BeginDeleteDevSite(string subscriptionName, string webspaceName, string name, AsyncCallback callback, object state); + void EndDeleteDevSite(IAsyncResult asyncResult); + + #endregion + + #region Region methods + + [Description("Returns all the geo regions.")] + [OperationContract(AsyncPattern = true)] + [WebGet(UriTemplate = UriElements.GeoRegionsRoot + UriElements.ListOnlyOnlineStampsParameter)] + IAsyncResult BeginGetRegions(bool listOnlyOnline, AsyncCallback callback, object state); + GeoRegions EndGetRegions(IAsyncResult asyncResult); + + [Description("Returns all the geo locations.")] + [OperationContract(AsyncPattern = true)] + [WebGet(UriTemplate = UriElements.GeoLocationsRoot)] + IAsyncResult BeginGetLocations(string regionName, AsyncCallback callback, object state); + GeoLocations EndGetLocations(IAsyncResult asyncResult); + + #endregion + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/LinkedRevisionControl.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/LinkedRevisionControl.cs new file mode 100644 index 000000000000..6895ef105b6c --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/LinkedRevisionControl.cs @@ -0,0 +1,68 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Linq; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services +{ + public abstract class LinkedRevisionControl : IDisposable + { + protected string InvocationPath; + public abstract void Init(); + public abstract void Deploy(Site siteData); + + internal bool IsGitWorkingTree() + { + try + { + if (!Git.IsGitRepository()) + { + return false; + } + } + catch + { + // Ignore failure and continue + } + + return Git.GetWorkingTree().Any(line => line.Equals(".git")); + } + + internal void InitGitOnCurrentDirectory() + { + Git.InitRepository(); + + if (!File.Exists(".gitignore")) + { + // Scaffold gitignore + string cmdletPath = FileUtilities.GetAssemblyDirectory(); + File.Copy(Path.Combine(cmdletPath, "Resources/Scaffolding/Node/Website/.gitignore"), ".gitignore"); + } + } + + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) + { + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/Repository.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/Repository.cs new file mode 100644 index 000000000000..c82955ad34e5 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/Repository.cs @@ -0,0 +1,50 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services +{ + public class Repository + { + public string PublishingUsername { get; set; } + public string PublishingPassword { get; set; } + public string PublishingAuth + { + get { return string.Format("{0}:{1}", PublishingUsername, PublishingPassword); } + } + + public string RepositoryUri { get; set; } + + public Repository(Site site) + { + string uriString = site.SiteProperties.Properties.Where(p => p.Name.Equals("RepositoryUri", StringComparison.OrdinalIgnoreCase)).Select(p => p.Value).FirstOrDefault(); + if (uriString != null && !uriString.EndsWith("/")) + { + uriString += "/"; + } + + // The host name portion of the Uri can contain IDN characters derived from the site name so we need to convert it to Punycode. + UriBuilder uri = new UriBuilder(uriString); + uri.Host = IdnHelper.GetAscii(uri.Host); + RepositoryUri = uri.ToString(); + + PublishingUsername = site.SiteProperties.Properties.Where(p => p.Name.Equals("PublishingUsername", StringComparison.OrdinalIgnoreCase)).Select(p => p.Value).FirstOrDefault(); + PublishingPassword = site.SiteProperties.Properties.Where(p => p.Name.Equals("PublishingPassword", StringComparison.OrdinalIgnoreCase)).Select(p => p.Value).FirstOrDefault(); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/AccessControlEntry.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/AccessControlEntry.cs new file mode 100644 index 000000000000..d56dc46f7d44 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/AccessControlEntry.cs @@ -0,0 +1,54 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + [DataContract(Name = "AccessControlEntry", Namespace = UriElements.ServiceNamespace)] + public class AccessControlEntry + { + [DataMember(IsRequired = true)] + public string EntityName { get; set; } + + [DataMember(IsRequired = true)] + public string UserName { get; set; } + + [DataMember(IsRequired = true)] + public string RoleName { get; set; } + + [DataMember(IsRequired = false)] + public string Description { get; set; } + } + + /// + /// Collection of AccessControlEntries + /// + [CollectionDataContract(Namespace = UriElements.ServiceNamespace)] + public class AccessControlList : List + { + + /// + /// Empty collection + /// + public AccessControlList() { } + + /// + /// Initialize collection + /// + /// + public AccessControlList(List entries) : base(entries) { } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/AuditLog.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/AuditLog.cs new file mode 100644 index 000000000000..f954973a5207 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/AuditLog.cs @@ -0,0 +1,74 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class AuditLog + { + [DataMember(IsRequired = false)] + public int Id { get; set; } + + [DataMember(IsRequired = false)] + public string User { get; set; } + + [DataMember(IsRequired = false)] + [PIIValue] + public string UserAddress { get; set; } + + [DataMember(IsRequired = false)] + public DateTime Logged { get; set; } + + [DataMember(IsRequired = false)] + public string Protocol { get; set; } + + [DataMember(IsRequired = false)] + public int Level { get; set; } + + [DataMember(IsRequired = false)] + public string Source { get; set; } + + [DataMember(IsRequired = false)] + public string MessageIdentifier { get; set; } + + [DataMember(IsRequired = false)] + public string Message { get; set; } + + [DataMember(IsRequired = false)] + public string Details { get; set; } + } + + /// + /// Collection of audit logs + /// + [CollectionDataContract] + public class AuditLogs : List + { + + /// + /// Empty collection + /// + public AuditLogs() { } + + /// + /// Initialize collection + /// + /// + public AuditLogs(List auditLogs) : base(auditLogs) { } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/Certificate.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/Certificate.cs new file mode 100644 index 000000000000..756006a4dfb1 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/Certificate.cs @@ -0,0 +1,60 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class Certificate + { + [DataMember(IsRequired = false)] + public string FriendlyName { get; set; } + + [DataMember(IsRequired = false)] + public string SubjectName { get; set; } + + [DataMember(IsRequired = false)] + public string HostName { get; set; } + + [DataMember(IsRequired = false)] + [PIIValue] + public byte[] PfxBlob { get; set; } + + [DataMember(IsRequired = false)] + public string SiteName { get; set; } + + [DataMember(IsRequired = false)] + public Uri SelfLink { get; set; } + + [DataMember(IsRequired = false)] + public string Issuer { get; set; } + + [DataMember(IsRequired = false)] + public DateTime IssueDate { get; set; } + + [DataMember(IsRequired = false)] + public DateTime ExpirationDate { get; set; } + + [DataMember(IsRequired = false)] + public string Password { get; set; } + + [DataMember(IsRequired = false)] + public string Thumbprint { get; set; } + + [DataMember(IsRequired = false)] + public bool? Valid { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/ConfigurationSettings.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/ConfigurationSettings.cs new file mode 100644 index 000000000000..7ebc8dd71f64 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/ConfigurationSettings.cs @@ -0,0 +1,41 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class ConfigurationSettings + { + [DataMember(IsRequired = false)] + public int? ChangeNotificationPollingTime { get; set; } + + [DataMember(IsRequired = false)] + [PIIValue] + public string AuthenticationConnectionString { get; set; } + + [DataMember(IsRequired = false)] + public bool? PublishingAuditLogEnabled { get; set; } + + [DataMember(IsRequired = false)] + public Certificate DefaultDomainCertificate { get; set; } + + [DataMember(IsRequired = false)] + public Certificate WebDeployCertificate { get; set; } + + [DataMember(IsRequired = false)] + public Certificate FtpCertificate { get; set; } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/ConnStringInfo.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/ConnStringInfo.cs new file mode 100644 index 000000000000..42d5733fcb84 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/ConnStringInfo.cs @@ -0,0 +1,61 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class ConnStringInfo + { + + [DataMember(IsRequired = true)] + public string Name { get; set; } + + [DataMember(IsRequired = true)] + [PIIValue] + public string ConnectionString { get; set; } + + [DataMember(IsRequired = true)] + public DatabaseType Type { get; set; } + } + + [DataContract(Namespace = UriElements.ServiceNamespace)] + public enum DatabaseType + { + [EnumMember] + MySql, + [EnumMember] + SQLServer, + [EnumMember] + SQLAzure, + [EnumMember] + Custom + } + + [CollectionDataContract(Namespace = UriElements.ServiceNamespace)] + public class ConnStringPropertyBag : List + { + + public ConnStringPropertyBag() + { + } + + public ConnStringPropertyBag(List connections) + : base(connections) + { + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/ConnectionString.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/ConnectionString.cs new file mode 100644 index 000000000000..7d47230baef9 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/ConnectionString.cs @@ -0,0 +1,59 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + /// + /// Class that represents a connection string. + /// + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class ConnectionString + { + /// + /// Name for the database + /// + [DataMember] + public string Name { get; set; } + + /// + /// Connection string + /// + [DataMember] + [PIIValue] + public string Value { get; set; } + + } + + /// + /// Collection of connection strings + /// + [CollectionDataContract(Namespace = UriElements.ServiceNamespace)] + public class ConnectionStrings : List + { + + /// + /// Empty collection + /// + public ConnectionStrings() { } + + /// + /// Initialize from list + /// + /// + public ConnectionStrings(List list) : base(list) { } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/Database.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/Database.cs new file mode 100644 index 000000000000..3ca042a86abc --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/Database.cs @@ -0,0 +1,65 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + /// + /// Database resource + /// + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class Database + { + /// + /// The name of the database + /// + [DataMember] + public string Name { get; set; } + + /// + /// Database password + /// + [DataMember] + [PIIValue] + public string Password { get; set; } + + /// + /// Database connection string + /// + [DataMember] + [PIIValue] + public string ConnectionString { get; set; } + } + + /// + /// Collection of MySqlDatabases + /// + [CollectionDataContract(Namespace = UriElements.ServiceNamespace)] + public class Databases : List + { + + /// + /// Empty collection + /// + public Databases() { } + + /// + /// Initialize collection + /// + /// + public Databases(List databases) : base(databases) { } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/ErrorEntity.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/ErrorEntity.cs new file mode 100644 index 000000000000..a7e3a5b27c6b --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/ErrorEntity.cs @@ -0,0 +1,56 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + /// + /// Body of the error response returned from the API. + /// + [DataContract(Namespace = UriElements.ServiceNamespace, Name = "Error")] + public class ErrorEntity + { + /// + /// Basic error code + /// + [DataMember(Order = 1)] + public string Code { get; set; } + + /// + /// Any details of the error + /// + [DataMember(Order = 2)] + public string Message { get; set; } + + /// + /// Type of error + /// + [DataMember(Order = 3)] + public string ExtendedCode { get; set; } + + /// + /// Message template + /// + [DataMember(Order = 4)] + public string MessageTemplate { get; set; } + + /// + /// Parameters for the template + /// + [DataMember(Order = 5)] + public List Parameters { get; set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/HandlerMapping.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/HandlerMapping.cs new file mode 100644 index 000000000000..34639895cfe9 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/HandlerMapping.cs @@ -0,0 +1,41 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class HandlerMapping + { + /// + /// Requests with this extension will be handled using the specified FastCGI application. + /// + [DataMember(IsRequired = true)] + public string Extension { get; set; } + + /// + /// The path to the FastCGI application. + /// + // TODO: Relative or Absolute? + [DataMember(IsRequired = true)] + public string ScriptProcessor { get; set; } + + /// + /// Command-line arguments to be passed to the script processor. + /// + [DataMember(IsRequired = false)] + public string Arguments { get; set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/HostNameSslState.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/HostNameSslState.cs new file mode 100644 index 000000000000..f197c44aa571 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/HostNameSslState.cs @@ -0,0 +1,70 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + /// + /// Class that represents a SSL-enabled host name. + /// + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class HostNameSslState + { + + /// + /// Host name + /// + [DataMember] + public string Name { get; set; } + + /// + /// SSL type + /// + [DataMember] + public SslState SslState { get; set; } + + } + + [DataContract(Namespace = UriElements.ServiceNamespace)] + public enum SslState + { + [EnumMember] + Disabled = 0, + [EnumMember] + SniEnabled = 1, + [EnumMember] + IpBasedEnabled = 2 + } + + /// + /// Collection of SSL-enabled host names + /// + [CollectionDataContract(Namespace = UriElements.ServiceNamespace)] + public class HostNameSslStates : List + { + + /// + /// Empty collection + /// + public HostNameSslStates() { } + + /// + /// Initialize collection + /// + /// + public HostNameSslStates(List list) : base(list) { } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/HostingCredential.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/HostingCredential.cs new file mode 100644 index 000000000000..6fe96cd451bd --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/HostingCredential.cs @@ -0,0 +1,54 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + /// + /// Class that represents a system credential. + /// + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class HostingCredential + { + /// + /// Username + /// + [DataMember] + public string CredentialName { get; set; } + + /// + /// Username + /// + [DataMember] + public string UserName { get; set; } + + /// + /// Password for the account + /// + [DataMember] + [PIIValue] + public string Password { get; set; } + } + + /// + /// Collection of servers + /// + [CollectionDataContract(Namespace = UriElements.ServiceNamespace)] + public class HostingCredentials : List + { + + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/MetricDefinition.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/MetricDefinition.cs new file mode 100644 index 000000000000..19dc19804932 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/MetricDefinition.cs @@ -0,0 +1,86 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class MetricDefinition + { + + [DataMember] + public string Name { get; set; } + + [DataMember] + public string Unit { get; set; } + + [DataMember] + public string PrimaryAggregationType { get; set; } + + [DataMember] + public List MetricAvailabilities { get; set; } + + public MetricDefinition() + { + MetricAvailabilities = new List(); + } + + public MetricDefinition(string name, string unit, string primaryAggregationType) + : this() + { + Name = name; + Unit = unit; + PrimaryAggregationType = primaryAggregationType; + } + } + + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class MetricAvailabilily + { + + [DataMember] + public TimeSpan TimeGrain { get; set; } + + [DataMember] + public TimeSpan Retention { get; set; } + + public MetricAvailabilily() + { + } + + public MetricAvailabilily(TimeSpan timeGrain, TimeSpan retention) + { + TimeGrain = timeGrain; + Retention = retention; + } + } + + [CollectionDataContract(Namespace = UriElements.ServiceNamespace)] + public class MetricDefinitions : List + { + + public MetricDefinitions() + { + } + + public MetricDefinitions(List metricDefinitions) + : base(metricDefinitions) + { + } + } + +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/MetricResponse.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/MetricResponse.cs new file mode 100644 index 000000000000..47ae3388bc91 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/MetricResponse.cs @@ -0,0 +1,58 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class MetricResponse + { + /// + /// Gets or sets the response code. + /// + [DataMember] + public string Code { get; set; } + + /// + /// Gets or sets the message. + /// + [DataMember] + public string Message { get; set; } + + /// + /// Gets or sets the metrics. + /// + [DataMember] + public MetricSet Data { get; set; } + } + + /// + /// Collection of ResourceMetricResponses + /// + [CollectionDataContract(Namespace = UriElements.ServiceNamespace)] + public class MetricResponses : List + { + public MetricResponses() + { + } + + public MetricResponses(IList list) + : base(list) + { + } + } + +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/MetricSet.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/MetricSet.cs new file mode 100644 index 000000000000..a9dafde0571d --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/MetricSet.cs @@ -0,0 +1,114 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class MetricSet + { + [DataMember] + public string Name { get; set; } + + [DataMember] + public string Unit { get; set; } + + [DataMember] + public DateTime StartTime { get; set; } + + [DataMember] + public DateTime EndTime { get; set; } + + [DataMember] + public string TimeGrain { get; set; } + + [DataMember] + public string PrimaryAggregationType { get; set; } + + [DataMember] + public List Values { get; set; } + + public MetricSet() + { + Values = new List(); + } + + public MetricSet(string name, string units, DateTime startTime, DateTime endTime, string timeGrain, string primaryAggregationType) + : this() + { + Name = name; + Unit = units; + StartTime = startTime; + EndTime = endTime; + TimeGrain = timeGrain; + PrimaryAggregationType = primaryAggregationType; + } + + } + + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class MetricSample + { + + [DataMember] + public DateTime TimeCreated { get; set; } + + [DataMember] + public long? Total { get; set; } + + [DataMember] + public long? Minimum { get; set; } + + [DataMember] + public long? Maximum { get; set; } + + [DataMember] + public long? Count { get; set; } + + [DataMember] + public string InstanceName { get; set; } + + public MetricSample() + { + } + + public MetricSample(long total, DateTime timeCreated) + { + Total = total; + TimeCreated = timeCreated; + Count = 1; + } + + public override string ToString() + { + return string.Format("Time:{0}, Total:{1}, Min:{2}, Max:{3}", TimeCreated, Total, Minimum, Maximum); + } + } + + [CollectionDataContract(Namespace = UriElements.ServiceNamespace)] + public class MetricSets : List + { + public MetricSets() + { + } + + public MetricSets(List metricSets) + : base(metricSets) + { + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/NameValuePair.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/NameValuePair.cs new file mode 100644 index 000000000000..dc738b30a260 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/NameValuePair.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class NameValuePair + { + [DataMember(IsRequired = true)] + public string Name { get; set; } + + [DataMember(IsRequired = true)] + [PIIValue] + public string Value { get; set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/Offer.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/Offer.cs new file mode 100644 index 000000000000..f559f7b76666 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/Offer.cs @@ -0,0 +1,105 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + /// + /// Offer Contract (has to be implemented by all resource providers called by the RDFE) + /// + /// Note: Need to keep this data contract in sync with RDFE + [DataContract(Name = "ServiceOffer", Namespace = UriElements.ServiceNamespace)] + public class Offer + { + /// + /// Gets or sets the name. + /// + /// + /// The name. + /// + [DataMember] + public string OfferName { get; set; } + + /// + /// Gets or sets the offer settings. + /// + /// + /// The offer settings. + /// + [DataMember] + public IList ServiceOfferSettings { get; set; } + + /// + /// Initializes a new instance of the class. + /// + public Offer() + { + ServiceOfferSettings = new List(); + } + + /// + /// Initializes a new instance of the class. + /// + /// Name of the offer. + /// Existing quota settings. + public Offer(string offerName, IList serviceOfferSettings) + { + OfferName = offerName; + ServiceOfferSettings = serviceOfferSettings; + } + } + + [DataContract(Name = "ServiceOfferSetting", Namespace = UriElements.ServiceNamespace)] + public class OfferSetting + { + /// + /// Gets or sets the name. + /// + /// + /// The name. + /// + [DataMember] + public string Key { get; set; } + + /// + /// Gets or sets the value. + /// + /// + /// The name. + /// + [DataMember] + public string Value { get; set; } + } + + /// + /// Collection of offers + /// + [CollectionDataContract(Namespace = UriElements.ServiceNamespace)] + public class Offers : List + { + + /// + /// Empty collection + /// + public Offers() { } + + /// + /// Initialize from list + /// + /// + public Offers(List offers) : base(offers) { } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/PagedSet.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/PagedSet.cs new file mode 100644 index 000000000000..d9897c0bcabb --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/PagedSet.cs @@ -0,0 +1,44 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class PagedSet + { + + [DataMember] + public string Filter { get; set; } + + [DataMember] + public int PageNumber { get; set; } + + [DataMember] + public int PageSize { get; set; } + + [DataMember] + public int TotalRecords { get; set; } + + [DataMember] + public List Values { get; set; } + + public PagedSet() + { + Values = new List(); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/Permission.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/Permission.cs new file mode 100644 index 000000000000..4055e34ee38d --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/Permission.cs @@ -0,0 +1,40 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + [DataContract(Name = "Permission", Namespace = UriElements.ServiceNamespace)] + public enum Permission + { + [EnumMember] + Create = 0, // Can create an entity. Usually used in conjunction with All/InheritOnly scope to create children. + + [EnumMember] + Read = 1, // Can read an entity + + [EnumMember] + Update = 2, // Can update an entity + + [EnumMember] + Delete = 3, // Can delete an entity + + [EnumMember] + Publish = 4, // Can publish content an entity. Applicable to websites only + + [EnumMember] + Admin = 5 // Create, Read, Update, Delete and Publish + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/PermissionScope.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/PermissionScope.cs new file mode 100644 index 000000000000..a24268172ce9 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/PermissionScope.cs @@ -0,0 +1,31 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + [DataContract(Name = "PermissionScope", Namespace = UriElements.ServiceNamespace)] + public enum PermissionScope + { + [EnumMember] + Current = 0, // Permission applies to Current entity only and not to the sub-trees. + + [EnumMember] + InheritOnly = 1, // Permission applies to sub-trees only and Not to the current entity. + + [EnumMember] + All = 3 // Current and Inherit Only + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/PermissionScopePair.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/PermissionScopePair.cs new file mode 100644 index 000000000000..50abc4579d07 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/PermissionScopePair.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class PermissionScopePair + { + + [DataMember(IsRequired = true)] + public Permission Permission { get; set; } + + [DataMember(IsRequired = true)] + [PIIValue] + public PermissionScope Scope { get; set; } + } + + [CollectionDataContract(Namespace = UriElements.ServiceNamespace)] + public class PermissionScopePairs : List + { + + public PermissionScopePairs() + { + } + + public PermissionScopePairs(List nameValuePairs) + : base(nameValuePairs) + { + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/Plan.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/Plan.cs new file mode 100644 index 000000000000..47fed2f8f005 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/Plan.cs @@ -0,0 +1,63 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + /// + /// Class that represents a hosting Plan. + /// + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class Plan + { + /// + /// Name for the plan + /// + [DataMember] + public string Name { get; set; } + + /// + /// The description for the plan + /// + [DataMember] + public string Description { get; set; } + + /// + /// Is the plan active + /// + [DataMember] + public bool? Active { get; set; } + } + + /// + /// Collection of plans + /// + [CollectionDataContract(Namespace = UriElements.ServiceNamespace)] + public class Plans : List + { + + /// + /// Empty collection + /// + public Plans() { } + + /// + /// Initialize from list + /// + /// + public Plans(List plans) : base(plans) { } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/Policy.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/Policy.cs new file mode 100644 index 000000000000..8bec5869cea8 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/Policy.cs @@ -0,0 +1,120 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + /// + /// Class that represents a Web Plan's policy. + /// + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class Policy + { + /// + /// Name for the plan + /// + [DataMember(Order = 0)] + public string PlanName { get; set; } + + [DataMember(Order = 1)] + public ComputeModeOptions ComputeMode { get; set; } + + [DataMember(Order = 2)] + public string SiteMode { get; set; } + + [DataMember(Order = 3)] + public SiteProcessSettings SiteProcessSettings { get; set; } + + [DataMember(Order = 4)] + public Features Features { get; set; } + } + + /// + /// Collection of policies + /// + [CollectionDataContract(Namespace = UriElements.ServiceNamespace)] + public class Policies : List + { + + /// + /// Empty collection + /// + public Policies() { } + + /// + /// Initialize from list + /// + /// + public Policies(List policies) : base(policies) { } + } + + + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class Features + { + [DataMember] + public bool CustomDomainsEnabled { get; set; } + + [DataMember] + public bool SniBasedSslEnabled { get; set; } + + [DataMember] + public bool IpBasedSslEnabled { get; set; } + } + + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class SiteProcessSettings + { + [DataMember] + public double CpuLimitPercentage { get; set; } + + [DataMember] + public int CpuLimitPeriodInMinutes { get; set; } + + [DataMember] + public int CpuLimitAction { get; set; } + + [DataMember] + public int MemoryLimitInMB { get; set; } + + [DataMember] + public int MemoryLimitWorkingSetInMB { get; set; } + + [DataMember] + public int FailProtectionLimit { get; set; } + + [DataMember] + public int FailProtectionPeriodInSeconds { get; set; } + + [DataMember] + public int FailProtectionPenaltyPeriodInSeconds { get; set; } + + [DataMember] + public int IdleTimeoutInMinutes { get; set; } + + [DataMember] + public int IdlePriority { get; set; } + + [DataMember] + public int WorkerProcessLimit { get; set; } + + [DataMember] + public int FastCgiProcessLimit { get; set; } + + [DataMember] + public int HttpQueueLength { get; set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/PublishingCredential.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/PublishingCredential.cs new file mode 100644 index 000000000000..98d8bd853a3b --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/PublishingCredential.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class PublishingCredential + { + [DataMember(IsRequired = true)] + public string UserName { get; set; } + + [DataMember(IsRequired = true)] + [PIIValue] + public string Password { get; set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/Role.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/Role.cs new file mode 100644 index 000000000000..d1250ac8b246 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/Role.cs @@ -0,0 +1,52 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + // Role is a user friendly way of grouping together a set of permissions and their scopes + [DataContract(Name = "Role", Namespace = UriElements.ServiceNamespace)] + public class Role + { + [DataMember(IsRequired = true)] + public string Name { get; set; } + + [DataMember(IsRequired = false)] + public string Description { get; set; } + + [DataMember(IsRequired = false)] + public PermissionScopePairs Permissions { get; set; } + } + + /// + /// Collection of Roles + /// + [CollectionDataContract(Namespace = UriElements.ServiceNamespace)] + public class Roles : List + { + + /// + /// Empty collection + /// + public Roles(){ } + + /// + /// Initialize collection + /// + /// + public Roles(List roles) : base(roles) { } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/RoutingRule.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/RoutingRule.cs new file mode 100644 index 000000000000..0606be1da2e8 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/RoutingRule.cs @@ -0,0 +1,56 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + /// + /// Routing rules for TiP + /// + [DataContract(Namespace = UriElements.ServiceNamespace)] + [KnownType(typeof(RampUpRule))] + public class RoutingRule + { + [DataMember] + public string Name { get; set; } + } + + /// + /// Routing rules for ramp up testing + /// + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class RampUpRule : RoutingRule + { + [DataMember] + public string ActionHostName { get; set; } + [DataMember] + public double ReroutePercentage { get; set; } + [DataMember] + public double? ChangeStep { get; set; } + [DataMember] + public int? ChangeIntervalInMinutes { get; set; } + [DataMember] + public double? MinReroutePercentage { get; set; } + [DataMember] + public double? MaxReroutePercentage { get; set; } + [DataMember] + public string ChangeDecisionCallbackUrl { get; set; } + + public override string ToString() + { + return string.Format("Type:RampUpRule, Name:{0}, ActionHostName:{1}, ReroutePercentage:{2}", Name, ActionHostName, ReroutePercentage); + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/Server.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/Server.cs new file mode 100644 index 000000000000..8f1bf1a749e8 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/Server.cs @@ -0,0 +1,161 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + [DataContract(Namespace = UriElements.ServiceNamespace)] + public enum ServerStates + { + [EnumMember] + NotReady = 0, + [EnumMember] + Offline = 1, + [EnumMember] + Installing = 2, + [EnumMember] + Ready = 3, + } + + /// + /// Class that represents a Server. + /// + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class Server + { + + /// + /// Name of the server + /// + [DataMember] + public string Name { get; set; } + + /// + /// Current status + /// + [DataMember] + public string Status { get; set; } + + /// + /// Last line of the log + /// + [DataMember] + public string StatusMessage { get; set; } + + /// + /// Server state + /// + [DataMember] + public ServerStates ServerState { get; set; } + + /// + /// Current cpu utilization + /// + [DataMember] + public int CpuPercentage { get; set; } + + /// + /// Current memory utilization + /// + [DataMember] + public int MemoryPercentage { get; set; } + + /// + /// Number of running sites + /// + [DataMember] + public int RunningSitesNumber { get; set; } + + [DataMember(IsRequired = false)] + public string[] SslBindings { get; set; } + + /// + /// Compute mode + /// + [DataMember(IsRequired = false)] + public ComputeModeOptions? ComputeMode { get; set; } + + /// + /// Worker size + /// + [DataMember(IsRequired = false)] + public WorkerSizeOptions? WorkerSize { get; set; } + } + + /// + /// Collection of servers + /// + [CollectionDataContract(Namespace = UriElements.ServiceNamespace)] + public class Servers : List + { + + /// + /// Empty collection + /// + public Servers() { } + + /// + /// Initialize collection + /// + /// + public Servers(List list) : base(list) { } + } + + /// + /// Class that represents a SSL binding. + /// + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class ServerSslBinding + { + /// + /// IPAddress of the binding + /// + [DataMember] + public string IPAddress { get; set; } + + /// + /// Current memory utilization + /// + [DataMember] + public int Port { get; set; } + + /// + /// Current memory utilization + /// + [DataMember(IsRequired = false)] + public string HostName { get; set; } + } + + /// + /// Collection of servers + /// + [CollectionDataContract(Namespace = UriElements.ServiceNamespace)] + public class ServerSslBindings : List + { + /// + /// Empty collection + /// + public ServerSslBindings() { } + + /// + /// Initialize collection + /// + /// + public ServerSslBindings(List list) : base(list) { } + + public ServerSslBindings(IEnumerable list) : base(list) { } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/Site.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/Site.cs new file mode 100644 index 000000000000..11312a27c027 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/Site.cs @@ -0,0 +1,173 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Serialization; +using Microsoft.WindowsAzure.Management.WebSites.Models; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + [DataContract(Name = "UsageState", Namespace = UriElements.ServiceNamespace)] + public enum UsageState + { + [EnumMember] + Normal = 0, + [EnumMember] + Exceeded = 1, + } + + [DataContract(Name = "SiteAvailabilityState", Namespace = UriElements.ServiceNamespace)] + public enum SiteAvailabilityState + { + [EnumMember] + Normal = 0, + [EnumMember] + Limited = 1, + } + + public interface ISite + { + string Name { get; set; } + string State { get; set; } + string[] HostNames { get; set; } + string WebSpace { get; set; } + Uri SelfLink { get; set; } + string RepositorySiteName { get; set; } + UsageState UsageState { get; set; } + bool? Enabled { get; set; } + bool? AdminEnabled { get; set; } + string[] EnabledHostNames { get; set; } + SiteProperties SiteProperties { get; set; } + SiteAvailabilityState AvailabilityState { get; set; } + HostNameSslStates HostNameSslStates { get; set; } + SkuOptions? Sku { get; set; } + } + + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class Site : ISite + { + [DataMember(IsRequired = false)] + public string Name { get; set; } + + [DataMember(IsRequired = false)] + public string State { get; set; } + + [DataMember(IsRequired = false)] + public string[] HostNames { get; set; } + + [DataMember(IsRequired = false)] + public string WebSpace { get; set; } + + [DataMember(IsRequired = false)] + public Uri SelfLink { get; set; } + + [DataMember(IsRequired = false)] + public string RepositorySiteName { get; set; } + + [DataMember(IsRequired = false)] + public string Owner { get; set; } + + [DataMember(IsRequired = false)] + public UsageState UsageState { get; set; } + + [DataMember(IsRequired = false)] + public bool? Enabled { get; set; } + + [DataMember(IsRequired = false)] + public bool? AdminEnabled { get; set; } + + [DataMember(IsRequired = false)] + public string[] EnabledHostNames { get; set; } + + [DataMember(IsRequired = false)] + public SiteProperties SiteProperties { get; set; } + + [DataMember(IsRequired = false)] + public SiteAvailabilityState AvailabilityState { get; set; } + + [DataMember(IsRequired = false)] + public Certificate[] SSLCertificates { get; set; } + + [DataMember(IsRequired = false)] + public HostNameSslStates HostNameSslStates { get; set; } + + [DataMember(IsRequired = false)] + public SkuOptions? Sku { get; set; } + + internal string GetProperty(string property) + { + if (SiteProperties.Properties.Any(kvp => kvp.Name.Equals(property, StringComparison.InvariantCultureIgnoreCase))) + { + return SiteProperties.Properties.First(kvp => kvp.Name.Equals(property, StringComparison.InvariantCultureIgnoreCase)).Value; + } + + return null; + } + } + + [DataContract(Namespace = UriElements.ServiceNamespace, Name = "Site")] + public class SiteWithWebSpace : Site + { + [DataMember(IsRequired = false)] + public WebSpace WebSpaceToCreate { get; set; } + + [DataMember(IsRequired = false)] + public bool DisableClone { get; set; } + } + + [DataContract(Namespace = UriElements.ServiceNamespace, Name = "Site")] + public class SiteWithDetails : Site + { + [DataMember(IsRequired = false)] + public string UNCPath { get; set; } + + [DataMember(IsRequired = false)] + public int? NumberOfWorkers { get; set; } + + [DataMember(IsRequired = false)] + public Servers RunningWorkers { get; set; } + + [DataMember(IsRequired = false)] + public string Subscription { get; set; } + } + + /// + /// Collection of sites + /// + [CollectionDataContract(Namespace = UriElements.ServiceNamespace)] + public class Sites : List + { + + /// + /// Empty collection + /// + public Sites() { } + + /// + /// Initialize collection + /// + /// + public Sites(List sites) : base(sites) { } + } + + /// + /// Paged collection of sites + /// + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class PagedSites : PagedSet + { + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/SiteConfig.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/SiteConfig.cs new file mode 100644 index 000000000000..a9c93428bc69 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/SiteConfig.cs @@ -0,0 +1,460 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Runtime.Serialization; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.DeploymentEntities; +using Microsoft.WindowsAzure.Management.WebSites.Models; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + public interface ISiteConfig + { + int? NumberOfWorkers { get; set; } + + string[] DefaultDocuments { get; set; } + + string NetFrameworkVersion { get; set; } + + string PhpVersion { get; set; } + + bool? RequestTracingEnabled { get; set; } + + bool? HttpLoggingEnabled { get; set; } + + bool? DetailedErrorLoggingEnabled { get; set; } + + Hashtable AppSettings { get; set; } + + List Metadata { get; set; } + + ConnStringPropertyBag ConnectionStrings { get; set; } + + HandlerMapping[] HandlerMappings { get; set; } + + bool? AzureDriveTraceEnabled { get; set; } + + LogEntryType AzureDriveTraceLevel { get; set; } + + bool? AzureTableTraceEnabled { get; set; } + + LogEntryType AzureTableTraceLevel { get; set; } + + bool? AzureBlobTraceEnabled { get; set; } + + LogEntryType AzureBlobTraceLevel { get; set; } + + ManagedPipelineMode? ManagedPipelineMode { get; set; } + + bool? WebSocketsEnabled { get; set; } + + bool? RemoteDebuggingEnabled { get; set; } + + RemoteDebuggingVersion RemoteDebuggingVersion { get; set; } + + List RoutingRules { get; set; } + + bool? Use32BitWorkerProcess { get; set; } + + string AutoSwapSlotName { get; set; } + } + + public class SiteWithConfig : ISite, ISiteConfig + { + private Site Site { get; set; } + + private SiteConfig SiteConfig { get; set; } + + private DiagnosticsSettings DiagnosticsSettings { get; set; } + + public WebsiteInstance[] Instances { get; set; } + + public SiteWithConfig() + { + Site = new Site(); + SiteConfig = new SiteConfig(); + AppSettings = new Hashtable(); + DiagnosticsSettings = new DiagnosticsSettings(); + Instances = new WebsiteInstance[0]; + } + + public SiteWithConfig(Site site, SiteConfig siteConfig) + { + Site = site; + SiteConfig = siteConfig; + AppSettings = new Hashtable(); + DiagnosticsSettings = new DiagnosticsSettings(); + Instances = new WebsiteInstance[0]; + + if (SiteConfig.AppSettings != null) + { + foreach (var setting in SiteConfig.AppSettings) + { + AppSettings[setting.Name] = setting.Value; + } + } + } + + public SiteWithConfig(Site site, SiteConfig siteConfig, DiagnosticsSettings diagnosticsSettings, WebsiteInstance[] instances) : + this(site, siteConfig) + { + DiagnosticsSettings = diagnosticsSettings; + Instances = instances; + } + + public SiteConfig GetSiteConfig() + { + if (AppSettings != null) + { + SiteConfig.AppSettings = new List(); + foreach (var setting in AppSettings.Keys) + { + SiteConfig.AppSettings.Add(new NameValuePair + { + Name = (string)setting, + Value = (string)AppSettings[setting] + }); + } + } + + return SiteConfig; + } + + public Site GetSite() + { + return Site; + } + + public int? NumberOfWorkers + { + get { return SiteConfig.NumberOfWorkers; } + set { SiteConfig.NumberOfWorkers = value; } + } + + public string[] DefaultDocuments + { + get { return SiteConfig.DefaultDocuments; } + set { SiteConfig.DefaultDocuments = value; } + } + + public string NetFrameworkVersion + { + get { return SiteConfig.NetFrameworkVersion; } + set { SiteConfig.NetFrameworkVersion = value; } + } + + public string PhpVersion + { + get { return SiteConfig.PhpVersion; } + set { SiteConfig.PhpVersion = value; } + } + + public bool? RequestTracingEnabled + { + get { return SiteConfig.RequestTracingEnabled; } + set { SiteConfig.RequestTracingEnabled = value; } + } + + public bool? HttpLoggingEnabled + { + get { return SiteConfig.HttpLoggingEnabled; } + set { SiteConfig.HttpLoggingEnabled = value; } + } + + public bool? DetailedErrorLoggingEnabled + { + get { return SiteConfig.DetailedErrorLoggingEnabled; } + set { SiteConfig.DetailedErrorLoggingEnabled = value; } + } + + public string PublishingUsername + { + get { return SiteConfig.PublishingUsername; } + set { SiteConfig.PublishingUsername = value; } + } + + public string PublishingPassword + { + get { return SiteConfig.PublishingPassword; } + set { SiteConfig.PublishingPassword = value; } + } + + public Hashtable AppSettings { get; set; } + + public List Metadata + { + get { return SiteConfig.Metadata; } + set { SiteConfig.Metadata = value; } + } + + public ConnStringPropertyBag ConnectionStrings + { + get { return SiteConfig.ConnectionStrings; } + set { SiteConfig.ConnectionStrings = value; } + } + + public HandlerMapping[] HandlerMappings + { + get { return SiteConfig.HandlerMappings; } + set { SiteConfig.HandlerMappings = value; } + } + + public string Name + { + get { return Site.Name; } + set { Site.Name = value; } + } + + public string State + { + get { return Site.State; } + set { Site.State = value; } + } + + public string[] HostNames + { + get { return Site.HostNames; } + set { Site.HostNames = value; } + } + + public string WebSpace + { + get { return Site.WebSpace; } + set { Site.WebSpace = value; } + } + + public Uri SelfLink + { + get { return Site.SelfLink; } + set { Site.SelfLink = value; } + } + + public string RepositorySiteName + { + get { return Site.RepositorySiteName; } + set { Site.RepositorySiteName = value; } + } + + public SkuOptions? Sku + { + get { return Site.Sku; } + set { Site.Sku = value; } + } + + public UsageState UsageState + { + get { return Site.UsageState; } + set { Site.UsageState = value; } + } + + public bool? Enabled + { + get { return Site.Enabled; } + set { Site.Enabled = value; } + } + + public bool? AdminEnabled + { + get { return Site.AdminEnabled; } + set { Site.AdminEnabled = value; } + } + + public string[] EnabledHostNames + { + get { return Site.EnabledHostNames; } + set { Site.EnabledHostNames = value; } + } + + public SiteProperties SiteProperties + { + get { return Site.SiteProperties; } + set { Site.SiteProperties = value; } + } + + public SiteAvailabilityState AvailabilityState + { + get { return Site.AvailabilityState; } + set { Site.AvailabilityState = value; } + } + + public HostNameSslStates HostNameSslStates + { + get { return Site.HostNameSslStates; } + set { Site.HostNameSslStates = value; } + } + + public bool? AzureDriveTraceEnabled + { + get { return DiagnosticsSettings.AzureDriveTraceEnabled; } + set { DiagnosticsSettings.AzureDriveTraceEnabled = value; } + } + + public LogEntryType AzureDriveTraceLevel + { + get { return DiagnosticsSettings.AzureDriveTraceLevel; } + set { DiagnosticsSettings.AzureDriveTraceLevel = value; } + } + + public bool? AzureTableTraceEnabled + { + get { return DiagnosticsSettings.AzureTableTraceEnabled; } + set { DiagnosticsSettings.AzureTableTraceEnabled = value; } + } + + public LogEntryType AzureTableTraceLevel + { + get { return DiagnosticsSettings.AzureTableTraceLevel; } + set { DiagnosticsSettings.AzureTableTraceLevel = value; } + } + + public bool? AzureBlobTraceEnabled + { + get { return DiagnosticsSettings.AzureBlobTraceEnabled; } + set { DiagnosticsSettings.AzureBlobTraceEnabled = value; } + } + + public LogEntryType AzureBlobTraceLevel + { + get { return DiagnosticsSettings.AzureBlobTraceLevel; } + set { DiagnosticsSettings.AzureBlobTraceLevel = value; } + } + + public ManagedPipelineMode? ManagedPipelineMode + { + get { return SiteConfig.ManagedPipelineMode; } + set { SiteConfig.ManagedPipelineMode = value; } + } + + public bool? WebSocketsEnabled + { + get { return SiteConfig.WebSocketsEnabled; } + set { SiteConfig.WebSocketsEnabled = value; } + } + + public bool? RemoteDebuggingEnabled + { + get { return SiteConfig.RemoteDebuggingEnabled; } + set { SiteConfig.RemoteDebuggingEnabled = value; } + } + + public RemoteDebuggingVersion RemoteDebuggingVersion + { + get { return SiteConfig.RemoteDebuggingVersion; } + set { SiteConfig.RemoteDebuggingVersion = value; } + } + + public List RoutingRules + { + get { return SiteConfig.RoutingRules; } + set { SiteConfig.RoutingRules = value; } + } + + public bool? Use32BitWorkerProcess + { + get { return SiteConfig.Use32BitWorkerProcess; } + set { SiteConfig.Use32BitWorkerProcess = value; } + } + + public string AutoSwapSlotName + { + get { return SiteConfig.AutoSwapSlotName; } + set { SiteConfig.AutoSwapSlotName = value; } + } + + public IList SlotStickyAppSettingNames + { + get { return SiteConfig.SlotStickyAppSettingNames; } + set { SiteConfig.SlotStickyAppSettingNames = value; } + } + + public IList SlotStickyConnectionStringNames + { + get { return SiteConfig.SlotStickyConnectionStringNames; } + set { SiteConfig.SlotStickyConnectionStringNames = value; } + } + } + + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class SiteConfig + { + [DataMember(IsRequired = false)] + public int? NumberOfWorkers { get; set; } + + [DataMember(IsRequired = false)] + public string[] DefaultDocuments { get; set; } + + [DataMember(IsRequired = false)] + public string NetFrameworkVersion { get; set; } + + [DataMember(IsRequired = false)] + public string PhpVersion { get; set; } + + [DataMember(IsRequired = false)] + public bool? RequestTracingEnabled { get; set; } + + [DataMember(IsRequired = false)] + public bool? HttpLoggingEnabled { get; set; } + + [DataMember(IsRequired = false)] + public bool? DetailedErrorLoggingEnabled { get; set; } + + [DataMember(IsRequired = false)] + public string PublishingUsername { get; set; } + + [DataMember(IsRequired = false)] + [PIIValue] + public string PublishingPassword { get; set; } + + [DataMember(IsRequired = false)] + public List AppSettings { get; set; } + + [DataMember(IsRequired = false)] + public List Metadata { get; set; } + + [DataMember(IsRequired = false)] + public ConnStringPropertyBag ConnectionStrings { get; set; } + + [DataMember(IsRequired = false)] + public HandlerMapping[] HandlerMappings { get; set; } + + [DataMember(IsRequired = false)] + public ManagedPipelineMode? ManagedPipelineMode { get; set; } + + [DataMember(IsRequired = false)] + public bool? WebSocketsEnabled { get; set; } + + [DataMember(IsRequired = false)] + public bool? RemoteDebuggingEnabled { get; set; } + + [DataMember(IsRequired = false)] + public RemoteDebuggingVersion RemoteDebuggingVersion { get; set; } + + [DataMember(IsRequired = false)] + public List RoutingRules { get; set; } + + [DataMember(IsRequired = false)] + public bool? Use32BitWorkerProcess { get; set; } + + [DataMember(IsRequired = false)] + public string AutoSwapSlotName { get; set; } + + [DataMember(IsRequired = false)] + public IList SlotStickyAppSettingNames { get; set; } + + [DataMember(IsRequired = false)] + public IList SlotStickyConnectionStringNames { get; set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/SiteProperties.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/SiteProperties.cs new file mode 100644 index 000000000000..bd6a29f57a50 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/SiteProperties.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class SiteProperties + { + [DataMember(IsRequired = true)] + public List Properties { get; set; } + + [DataMember(IsRequired = true)] + public List Metadata { get; set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/SiteRepositoryDev.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/SiteRepositoryDev.cs new file mode 100644 index 000000000000..ec6b2d711ef6 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/SiteRepositoryDev.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class SiteRepositoryDev + { + + [DataMember(IsRequired = false)] + public string WebRootSubPath { get; set; } + + [DataMember(IsRequired = false)] + public Uri SiteUri { get; set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/StampCapacity.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/StampCapacity.cs new file mode 100644 index 000000000000..ca7183719a2f --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/StampCapacity.cs @@ -0,0 +1,80 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class StampCapacity + { + + [DataMember] + public string Name { get; set; } + + [DataMember] + public long AvailableCapacity { get; set; } + + [DataMember] + public long TotalCapacity { get; set; } + + [DataMember] + public string Unit { get; set; } + + [DataMember(IsRequired = false)] + public ComputeModeOptions? ComputeMode { get; set; } + + [DataMember(IsRequired = false)] + public WorkerSizeOptions? WorkerSize { get; set; } + + [DataMember(IsRequired = false)] + public bool ExcludeFromCapacityAllocation { get; set; } + + + [DataMember] + public bool IsApplicableForAllComputeModes { get; set; } + + [DataMember(IsRequired = false)] + public string SiteMode { get; set; } + + public StampCapacity() + { + } + + public StampCapacity(string name, string unit, long available, long total) + : this() + { + Name = name; + AvailableCapacity = available; + TotalCapacity = total; + Unit = unit; + } + } + + [CollectionDataContract(Namespace = UriElements.ServiceNamespace)] + public class StampCapacities : List + { + + public StampCapacities() + { + } + + public StampCapacities(List capacities) + : base(capacities) + { + } + } + +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/Subscription.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/Subscription.cs new file mode 100644 index 000000000000..8a2d04822de8 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/Subscription.cs @@ -0,0 +1,73 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.ComponentModel; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + /// + /// Class that represents a subscription. + /// + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class Subscription + { + /// + /// Name of the subscription + /// + [DataMember] + [Description("Subscription Name")] + public string Name { get; set; } + + /// + /// Description of the subscription + /// + [DataMember] + [Description("Subscription Description")] + public string Description { get; set; } + + /// + /// Suspended + /// + [DataMember] + public bool? Suspended { get; set; } + + /// + /// Name of the user who is owner of the Subscription + /// + [DataMember] + [PIIValue] + public string OwnerUserName { get; set; } + } + + /// + /// Collection of subscriptions + /// + [CollectionDataContract(Namespace = UriElements.ServiceNamespace)] + public class Subscriptions : List + { + + /// + /// Empty collection + /// + public Subscriptions() { } + + /// + /// Initialize collection + /// + /// + public Subscriptions(List subscriptions) : base(subscriptions) { } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/TraceMessage.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/TraceMessage.cs new file mode 100644 index 000000000000..09f2b6875f91 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/TraceMessage.cs @@ -0,0 +1,59 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class TraceMessage + { + [DataMember(IsRequired = false)] + public string Message { get; set; } + + [DataMember(IsRequired = false)] + public int MessageId { get; set; } + + [DataMember(IsRequired = false)] + public string ServerName { get; set; } + + [DataMember(IsRequired = false)] + public DateTime TimeStamp { get; set; } + + [DataMember(IsRequired = false)] + public int TraceLevel { get; set; } + + } + + /// + /// Collection of trace messages + /// + [CollectionDataContract(Namespace = UriElements.ServiceNamespace)] + public class TraceMessages : List + { + + /// + /// Empty collection + /// + public TraceMessages() { } + + /// + /// Initialize collection + /// + /// + public TraceMessages(List traceMessages) : base(traceMessages) { } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/Usage.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/Usage.cs new file mode 100644 index 000000000000..06597e1e06dc --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/Usage.cs @@ -0,0 +1,95 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + /// + /// Class that represents usage of the quota resource. + /// + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class Usage + { + /// + /// Name of the quota + /// + [DataMember] + public string Name { get; set; } + + /// + /// Name of the quota resource + /// + [DataMember] + public string ResourceName { get; set; } + + /// + /// Units of measurement for the quota resource + /// + [DataMember] + public string Unit { get; set; } + + /// + /// The current value of the resource counter + /// + [DataMember] + public long CurrentValue { get; set; } + + /// + /// The resource limit + /// + [DataMember] + public long Limit { get; set; } + + /// + /// Next reset time for the resource counter + /// + [DataMember] + public DateTime NextResetTime { get; set; } + + /// + /// ComputeMode used for this usage + /// + [DataMember] + public ComputeModeOptions? ComputeMode { get; set; } + + /// + /// SiteMode used for this usage + /// + [DataMember] + public string SiteMode { get; set; } + + } + + /// + /// Collection of usage + /// + [CollectionDataContract(Namespace = UriElements.ServiceNamespace)] + public class Usages : List + { + + /// + /// Empty collection + /// + public Usages() { } + + /// + /// Initialize from list + /// + /// + public Usages(List usages) : base(usages) { } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/UsageMetric.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/UsageMetric.cs new file mode 100644 index 000000000000..315f1b906bc6 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/UsageMetric.cs @@ -0,0 +1,69 @@ +//------------------------------------------------------------------------------ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +//------------------------------------------------------------------------------ + +using System.Collections.Generic; +using System.Runtime.Serialization; +using System; + +namespace Microsoft.Web.Hosting.Administration +{ + + /// + /// Class that represents usage activity of the web site. + /// + [DataContract] + public class UsageMetric + { + /// + /// Timestamp of the activity + /// + [DataMember] + public DateTime Timestamp { get; set; } + + /// + /// Number of requests + /// + [DataMember] + public long Requests { get; set; } + + /// + /// Bytes sent + /// + [DataMember] + public long OutboundBandwidth { get; set; } + + /// + /// Bytes received + /// + [DataMember] + public long InboundBandwidth { get; set; } + + /// + /// Processor time in milliseconds + /// + [DataMember] + public long CpuTime { get; set; } + } + + /// + /// Collection of usage metrics + /// + [CollectionDataContract] + public class UsageMetrics : List + { + + /// + /// Empty collection + /// + public UsageMetrics() { } + + /// + /// Initialize from list + /// + /// + public UsageMetrics(List usageMetrics) : base(usageMetrics) { } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/User.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/User.cs new file mode 100644 index 000000000000..f95bc0346b24 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/User.cs @@ -0,0 +1,54 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class User + { + + [DataMember(IsRequired = false)] + [PIIValue] + public string Name { get; set; } + + [DataMember(IsRequired = false)] + public string PublishingUserName { get; set; } + + [DataMember(IsRequired = false)] + [PIIValue] + public string PublishingPassword { get; set; } + } + + /// + /// Collection of users + /// + [CollectionDataContract(Namespace = UriElements.ServiceNamespace)] + public class Users : List + { + + /// + /// Empty collection + /// + public Users() { } + + /// + /// Initialize collection + /// + /// + public Users(List users) : base(users) { } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/WebHostingPlan.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/WebHostingPlan.cs new file mode 100644 index 000000000000..f2f5a4bafe0c --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/WebHostingPlan.cs @@ -0,0 +1,46 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + /// + /// Class that represents a Web Hosting Plan. + /// + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class WebHostingPlan + { + [DataMember(IsRequired = false)] + public string Name { get; set; } + + [DataMember(IsRequired = false)] + public string SKU { get; set; } + + [DataMember(IsRequired = false)] + public WorkerSizeOptions? WorkerSize { get; set; } + + [DataMember(IsRequired = false)] + public int? NumberOfWorkers { get; set; } + + [DataMember(IsRequired = false)] + public WorkerSizeOptions? CurrentWorkerSize { get; set; } + + [DataMember(IsRequired = false)] + public int? CurrentNumberOfWorkers { get; set; } + + [DataMember(IsRequired = false)] + public string WebSpace { get; set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/WebPlan.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/WebPlan.cs new file mode 100644 index 000000000000..45ccf041f576 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/WebPlan.cs @@ -0,0 +1,34 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + /// + /// Class that represents a Web Plan. + /// + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class WebPlan + { + /// + /// Name for the web system + /// + [DataMember] + public string WebSystem { get; set; } + + [DataMember] + public bool? VirtualDedicatedEnabled { get; set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/WebQuota.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/WebQuota.cs new file mode 100644 index 000000000000..cfc6526e3309 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/WebQuota.cs @@ -0,0 +1,114 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + [DataContract(Namespace = UriElements.ServiceNamespace)] + public enum TimeUnits + { + [EnumMember] + Days = 0, + [EnumMember] + Minutes = 1, + [EnumMember] + Hours = 2, + [EnumMember] + Months = 3 + } + + [DataContract(Namespace = UriElements.ServiceNamespace, Name = "ExceededAction")] + public enum ExceededAction + { + [EnumMember] + None = 0, + [EnumMember] + Stop = 1, + [EnumMember] + RunLimited = 2, + [EnumMember] + Redirect = 3 + } + + [DataContract(Namespace = UriElements.ServiceNamespace, Name = "EnforcementScope")] + public enum EnforcementScope + { + [EnumMember] + WebSpace = 0, + [EnumMember] + Site = 1 + } + + /// + /// Class that represents a Web Quota. + /// + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class WebQuota + { + [DataMember(IsRequired = false)] + public string WebPlan { get; set; } + + [DataMember(IsRequired = false)] + public ComputeModeOptions ComputeMode { get; set; } + + [DataMember(IsRequired = false)] + public string QuotaName { get; set; } + + [DataMember(IsRequired = false)] + public string ResourceName { get; set; } + + [DataMember(IsRequired = false)] + public long? Limit { get; set; } + + [DataMember(IsRequired = false)] + public TimeUnits? Unit { get; set; } + + [DataMember(IsRequired = false)] + public int? Period { get; set; } + + [DataMember(IsRequired = false)] + public ExceededAction? ExceededAction { get; set; } + + [DataMember(IsRequired = false)] + public string CustomActionName { get; set; } + + [DataMember(IsRequired = false)] + public string SiteMode { get; set; } + + [DataMember(IsRequired = false)] + public EnforcementScope EnforcementScope { get; set; } + } + + + /// + /// Collection of webquotas + /// + [CollectionDataContract(Namespace = UriElements.ServiceNamespace)] + public class WebQuotas : List + { + + /// + /// Empty collection + /// + public WebQuotas() { } + + /// + /// Initialize collection + /// + /// + public WebQuotas(List webquotas) : base(webquotas) { } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/WebSpace.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/WebSpace.cs new file mode 100644 index 000000000000..6cdc0dae9432 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/WebSpace.cs @@ -0,0 +1,120 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + [DataContract(Name = "Status", Namespace = UriElements.ServiceNamespace)] + public enum StatusOptions + { + [EnumMember] + Ready = 0, + [EnumMember] + Pending = 1, + } + + + [DataContract(Name = "ComputeMode", Namespace = UriElements.ServiceNamespace)] + public enum ComputeModeOptions + { + [EnumMember] + Shared = 0, + [EnumMember] + Dedicated = 1 + } + + [DataContract(Name = "WorkerSize", Namespace = UriElements.ServiceNamespace)] + public enum WorkerSizeOptions + { + [EnumMember] + Small = 0, + [EnumMember] + Medium = 1, + [EnumMember] + Large = 2 + } + + [DataContract(Name = "WebSpaceAvailabilityState", Namespace = UriElements.ServiceNamespace)] + public enum WebSpaceAvailabilityState + { + [EnumMember] + Normal = 0, + [EnumMember] + Limited = 1, + } + + /// + /// WebSpace + /// + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class WebSpace + { + [DataMember(IsRequired = false)] + public string Name { get; set; } + + [DataMember(IsRequired = false)] + public string Plan { get; set; } + + [DataMember(IsRequired = false)] + public string Subscription { get; set; } + + [DataMember(IsRequired = false)] + public string GeoLocation { get; set; } + + [DataMember(IsRequired = false)] + public string GeoRegion { get; set; } + + [DataMember(IsRequired = false)] + public ComputeModeOptions? ComputeMode { get; set; } + + [DataMember(IsRequired = false)] + public WorkerSizeOptions? WorkerSize { get; set; } + + [DataMember(IsRequired = false)] + public int? NumberOfWorkers { get; set; } + + [DataMember(IsRequired = false)] + public WorkerSizeOptions? CurrentWorkerSize { get; set; } + + [DataMember(IsRequired = false)] + public int? CurrentNumberOfWorkers { get; set; } + + [DataMember(IsRequired = false)] + public StatusOptions Status { get; set; } + + [DataMember(IsRequired = false)] + public WebSpaceAvailabilityState AvailabilityState { get; set; } + } + + /// + /// Collection of webspaces + /// + [CollectionDataContract(Namespace = UriElements.ServiceNamespace)] + public class WebSpaces : List + { + + /// + /// Empty collection + /// + public WebSpaces() { } + + /// + /// Initialize collection + /// + /// + public WebSpaces(List webspaces) : base(webspaces) { } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/WebSystem.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/WebSystem.cs new file mode 100644 index 000000000000..e153919fc2ec --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/WebSystem.cs @@ -0,0 +1,113 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + /// + /// Class that represents a Web System. + /// + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class WebSystem + { + /// + /// Name for the web system + /// + [DataMember] + public string Name { get; set; } + + /// + /// Administrator account + /// + [DataMember] + public string Username { get; set; } + + /// + /// PAssword for the administrator account + /// + [DataMember] + [PIIValue] + public string Password { get; set; } + + /// + /// File share for content storage + /// + [DataMember] + public string FileShare { get; set; } + + /// + /// Publishing DNS + /// + [DataMember] + public string PublishingDns { get; set; } + + /// + /// Ftp DNS + /// + [DataMember] + public string FtpDns { get; set; } + + + /// + /// Parking page name + /// + [DataMember] + public string ParkingPage { get; set; } + + /// + /// Parking page content + /// + [DataMember] + public string ParkingPageContent { get; set; } + + /// + /// Storage domain + /// + [DataMember] + public string StorageDomain { get; set; } + + /// + /// Databases + /// + [DataMember] + public ConnectionStrings ConnectionStrings { get; set; } + + /// + /// Link to a page that displays the Control Panel for the Web System. + /// + [DataMember] + public string ControlPanelUrl { get; set; } + } + + /// + /// Collection of web systems + /// + [CollectionDataContract(Namespace = UriElements.ServiceNamespace)] + public class WebSystems : List + { + + /// + /// Empty collection + /// + public WebSystems() { } + + /// + /// Initialize from list + /// + /// + public WebSystems(List list) : base(list) { } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/WebSystemSummary.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/WebSystemSummary.cs new file mode 100644 index 000000000000..b1629a4d606e --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebEntities/WebSystemSummary.cs @@ -0,0 +1,56 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities +{ + /// + /// Class that represents a Web System summary. + /// + [DataContract(Namespace = UriElements.ServiceNamespace)] + public class WebSystemSummary + { + /// + /// Number of web workers + /// + [DataMember] + public int NumberOfWebWorkers { get; set; } + + /// + /// Number of publishers + /// + [DataMember] + public int NumberOfPublishers { get; set; } + + /// + /// Number of load balancers + /// + [DataMember] + public int NumberOfLoadBalancers { get; set; } + + /// + /// Number of controllers + /// + [DataMember] + public int NumberOfControllers { get; set; } + + /// + /// Number of active websites + /// + [DataMember] + public int NumberOfActiveWebsites { get; set; } + + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebJobs/WebJobFilterOptions.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebJobs/WebJobFilterOptions.cs new file mode 100644 index 000000000000..3b9173a66fb0 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebJobs/WebJobFilterOptions.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebJobs +{ + public class WebJobFilterOptions + { + public string Name { get; set; } + + public string Slot { get; set; } + + public string JobName { get; set; } + + public string JobType { get; set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebJobs/WebJobHistoryFilterOptions.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebJobs/WebJobHistoryFilterOptions.cs new file mode 100644 index 000000000000..20c72398b2f0 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebJobs/WebJobHistoryFilterOptions.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebJobs +{ + public class WebJobHistoryFilterOptions + { + public string Name { get; set; } + + public string Slot { get; set; } + + public string JobName { get; set; } + + public string RunId { get; set; } + + public bool Latest { get; set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebSitesManagementExtensionMethods.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebSitesManagementExtensionMethods.cs new file mode 100644 index 000000000000..4dfd360edaaa --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebSitesManagementExtensionMethods.cs @@ -0,0 +1,502 @@ + +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.WebSites; +using Microsoft.WindowsAzure.Management.WebSites.Models; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services +{ + using Utilities = WebEntities; + + /// + /// Extension methods for converting return values from the websites + /// management clients from "get" methods into corresponding + /// other types so that we can easily send updates or return to callers. + /// + internal static class WebSitesManagementConversionMethods + { + internal static WebSiteUpdateConfigurationParameters ToUpdate(this WebSiteGetConfigurationResponse getConfigResponse) + { + var update = new WebSiteUpdateConfigurationParameters + { + DetailedErrorLoggingEnabled = getConfigResponse.DetailedErrorLoggingEnabled, + HttpLoggingEnabled = getConfigResponse.HttpLoggingEnabled, + NetFrameworkVersion = getConfigResponse.NetFrameworkVersion, + NumberOfWorkers = getConfigResponse.NumberOfWorkers, + PhpVersion = getConfigResponse.PhpVersion, + RequestTracingEnabled = getConfigResponse.RequestTracingEnabled, + RequestTracingExpirationTime = getConfigResponse.RequestTracingExpirationTime, + ScmType = getConfigResponse.ScmType, + Use32BitWorkerProcess = getConfigResponse.Use32BitWorkerProcess, + ManagedPipelineMode = getConfigResponse.ManagedPipelineMode, + WebSocketsEnabled = getConfigResponse.WebSocketsEnabled, + RemoteDebuggingEnabled = getConfigResponse.RemoteDebuggingEnabled, + RemoteDebuggingVersion = getConfigResponse.RemoteDebuggingVersion.GetValueOrDefault(), + }; + + getConfigResponse.AppSettings.ForEach(kvp => update.AppSettings.Add(kvp.Key, kvp.Value)); + getConfigResponse.ConnectionStrings.ForEach(cs => update.ConnectionStrings.Add(new WebSiteUpdateConfigurationParameters.ConnectionStringInfo + { + ConnectionString = cs.ConnectionString, + Name = cs.Name, + Type = cs.Type + })); + getConfigResponse.DefaultDocuments.ForEach(dd => update.DefaultDocuments.Add(dd)); + getConfigResponse.HandlerMappings.ForEach(hm => update.HandlerMappings.Add(new WebSiteUpdateConfigurationParameters.HandlerMapping + { + Arguments = hm.Arguments, + Extension = hm.Extension, + ScriptProcessor = hm.ScriptProcessor + })); + getConfigResponse.Metadata.ForEach(kvp => update.Metadata.Add(kvp.Key, kvp.Value)); + + return update; + } + + internal static Utilities.SiteConfig ToSiteConfig(this WebSiteGetConfigurationResponse getConfigResponse) + { + var config = new Utilities.SiteConfig + { + NumberOfWorkers = getConfigResponse.NumberOfWorkers, + DefaultDocuments = getConfigResponse.DefaultDocuments.ToArray(), + NetFrameworkVersion = getConfigResponse.NetFrameworkVersion, + PhpVersion = getConfigResponse.PhpVersion, + RequestTracingEnabled = getConfigResponse.RequestTracingEnabled, + HttpLoggingEnabled = getConfigResponse.HttpLoggingEnabled, + DetailedErrorLoggingEnabled = getConfigResponse.DetailedErrorLoggingEnabled, + PublishingUsername = getConfigResponse.PublishingUserName, + PublishingPassword = getConfigResponse.PublishingPassword, + AppSettings = getConfigResponse.AppSettings.Select(ToNameValuePair).ToList(), + Metadata = getConfigResponse.Metadata.Select(ToNameValuePair).ToList(), + ConnectionStrings = new Utilities.ConnStringPropertyBag( + getConfigResponse.ConnectionStrings.Select(cs => new Utilities.ConnStringInfo + { + ConnectionString = cs.ConnectionString, + Name = cs.Name, + Type = (Utilities.DatabaseType)Enum.Parse(typeof(Utilities.DatabaseType), cs.Type.ToString(), ignoreCase: true) + }).ToList()), + HandlerMappings = getConfigResponse.HandlerMappings.Select(hm => new Utilities.HandlerMapping + { + Arguments = hm.Arguments, + Extension = hm.Extension, + ScriptProcessor = hm.ScriptProcessor + }).ToArray(), + ManagedPipelineMode = getConfigResponse.ManagedPipelineMode, + WebSocketsEnabled = getConfigResponse.WebSocketsEnabled, + RemoteDebuggingEnabled = getConfigResponse.RemoteDebuggingEnabled, + RemoteDebuggingVersion = getConfigResponse.RemoteDebuggingVersion.GetValueOrDefault(), + RoutingRules = getConfigResponse.RoutingRules.Select(r => r.ToRoutingRule()).ToList(), + Use32BitWorkerProcess = getConfigResponse.Use32BitWorkerProcess, + AutoSwapSlotName = getConfigResponse.AutoSwapSlotName, + }; + return config; + } + + internal static Utilities.RoutingRule ToRoutingRule(this Management.WebSites.Models.RoutingRule rule) + { + Utilities.RoutingRule result = null; + if (rule is Management.WebSites.Models.RampUpRule) + { + Management.WebSites.Models.RampUpRule rampupRule = rule as Management.WebSites.Models.RampUpRule; + result = new Utilities.RampUpRule() + { + ReroutePercentage = rampupRule.ReroutePercentage, + ActionHostName = rampupRule.ActionHostName, + MinReroutePercentage = rampupRule.MinReroutePercentage, + MaxReroutePercentage = rampupRule.MaxReroutePercentage, + ChangeDecisionCallbackUrl = rampupRule.ChangeDecisionCallbackUrl, + ChangeIntervalInMinutes = rampupRule.ChangeIntervalInMinutes, + ChangeStep = rampupRule.ChangeStep, + }; + } + + if (result != null) + { + // base class properties + result.Name = rule.Name; + } + + return result; + } + + internal static Utilities.Site ToSite(this WebSiteGetResponse response) + { + return new Utilities.Site + { + Name = response.WebSite.Name, + State = response.WebSite.State.ToString(), + HostNames = response.WebSite.HostNames.ToArray(), + WebSpace = response.WebSite.WebSpace, + SelfLink = response.WebSite.Uri, + RepositorySiteName = response.WebSite.RepositorySiteName, + UsageState = (Utilities.UsageState)(int)response.WebSite.UsageState, + Enabled = response.WebSite.Enabled, + AdminEnabled = response.WebSite.AdminEnabled, + EnabledHostNames = response.WebSite.EnabledHostNames.ToArray(), + SiteProperties = new Utilities.SiteProperties + { + Metadata = response.WebSite.SiteProperties.Metadata.Select(ToNameValuePair).ToList(), + Properties = response.WebSite.SiteProperties.Properties.Select(ToNameValuePair).ToList() + }, + AvailabilityState = (Utilities.SiteAvailabilityState)(int)response.WebSite.AvailabilityState, + // SSLCertificates = response.WebSite.SslCertificates.Select(ToCertificate).ToArray(), + HostNameSslStates = new Utilities.HostNameSslStates(response.WebSite.HostNameSslStates.Select(ToNameSslState).ToList()), + Sku = response.WebSite.Sku + }; + } + + internal static Utilities.Site ToSite(this WebSite site) + { + return new Utilities.Site + { + Name = site.Name, + State = site.State.ToString(), + HostNames = site.HostNames.ToArray(), + WebSpace = site.WebSpace, + SelfLink = site.Uri, + RepositorySiteName = site.RepositorySiteName, + UsageState = (Utilities.UsageState)(int)site.UsageState, + Enabled = site.Enabled, + AdminEnabled = site.AdminEnabled, + EnabledHostNames = site.EnabledHostNames.ToArray(), + SiteProperties = new Utilities.SiteProperties + { + Metadata = site.SiteProperties.Metadata.Select(ToNameValuePair).ToList(), + Properties = site.SiteProperties.Properties.Select(ToNameValuePair).ToList() + }, + AvailabilityState = (Utilities.SiteAvailabilityState)(int)site.AvailabilityState, + // SSLCertificates = site.SslCertificates.Select(ToCertificate).ToArray(), + HostNameSslStates = new Utilities.HostNameSslStates(site.HostNameSslStates.Select(ToNameSslState).ToList()), + Sku = site.Sku + }; + } + + private static Utilities.NameValuePair ToNameValuePair(KeyValuePair kvp) + { + return new Utilities.NameValuePair + { + Name = kvp.Key, + Value = kvp.Value + }; + } + + private static KeyValuePair ToKeyValuePair(Utilities.NameValuePair nvp) + { + return new KeyValuePair(nvp.Name, nvp.Value); + } + internal static IList ToMetricResponses(this WebSiteGetHistoricalUsageMetricsResponse metricsResponse) + { + var result = new List(); + if (metricsResponse == null || metricsResponse.UsageMetrics == null) + { + return result; + } + + foreach (var response in metricsResponse.UsageMetrics) + { + var metrics = response.Data.ToMetricSet(); + var rsp = new Utilities.MetricResponse + { + Code = response.Code, + Message = response.Message, + Data = metrics + }; + result.Add(rsp); + } + + return result; + } + + internal static IList ToMetricResponses(this WebHostingPlanGetHistoricalUsageMetricsResponse metricsResponse) + { + var result = new List(); + if (metricsResponse == null || metricsResponse.UsageMetrics == null) + { + return result; + } + + foreach (var response in metricsResponse.UsageMetrics) + { + var metrics = response.Data.ToMetricSet(); + var rsp = new Utilities.MetricResponse + { + Code = response.Code, + Message = response.Message, + Data = metrics + }; + result.Add(rsp); + } + + return result; + } + + internal static Utilities.MetricSet ToMetricSet(this HistoricalUsageMetricData data) + { + var metrics = new Utilities.MetricSet + { + Name = data.Name, + PrimaryAggregationType = data.PrimaryAggregationType, + TimeGrain = data.TimeGrain, + StartTime = data.StartTime, + EndTime = data.EndTime, + Unit = data.Unit, + Values = data.Values.ToMetricSamples().ToList(), + }; + + return metrics; + } + + internal static IList ToMetricSamples(this IList samples) + { + var result = new List(); + + foreach (var s in samples) + { + var converted = new Utilities.MetricSample() + { + Count = s.Count, + TimeCreated = s.TimeCreated, + InstanceName = s.InstanceName, + }; + long val = 0; + + if (!string.IsNullOrEmpty(s.Minimum)) + { + long.TryParse(s.Minimum, out val); + converted.Minimum = val; + } + + if (!string.IsNullOrEmpty(s.Maximum)) + { + long.TryParse(s.Maximum, out val); + converted.Maximum = val; + } + + if (!string.IsNullOrEmpty(s.Total)) + { + long.TryParse(s.Total, out val); + converted.Total = val; + } + + result.Add(converted); + } + + return result; + } + + private static Utilities.HostNameSslState ToNameSslState(WebSite.WebSiteHostNameSslState state) + { + return new Utilities.HostNameSslState + { + Name = state.Name, + SslState = (Utilities.SslState)(int)state.SslState + }; + } + + internal static Utilities.WebSpace ToWebSpace(this WebSpacesListResponse.WebSpace webspace) + { + return new Utilities.WebSpace + { + Name = webspace.Name, + Plan = webspace.Plan, + Subscription = webspace.Subscription, + GeoLocation = webspace.GeoLocation, + GeoRegion = webspace.GeoRegion, + ComputeMode = null, // TODO: Update + WorkerSize = + webspace.WorkerSize.HasValue + ? new Utilities.WorkerSizeOptions?((Utilities.WorkerSizeOptions)(int)webspace.WorkerSize.Value) + : null, + NumberOfWorkers = webspace.CurrentNumberOfWorkers, + Status = (Utilities.StatusOptions)(int)webspace.Status, + AvailabilityState = (WebEntities.WebSpaceAvailabilityState)(int)webspace.AvailabilityState + }; + } + + internal static WebSiteUpdateConfigurationParameters ToConfigUpdateParameters(this Utilities.SiteConfig config) + { + var parameters = new WebSiteUpdateConfigurationParameters + { + DetailedErrorLoggingEnabled = config.DetailedErrorLoggingEnabled, + HttpLoggingEnabled = config.HttpLoggingEnabled, + NetFrameworkVersion = config.NetFrameworkVersion, + NumberOfWorkers = config.NumberOfWorkers, + PhpVersion = config.PhpVersion, + RequestTracingEnabled = config.RequestTracingEnabled, + ManagedPipelineMode = config.ManagedPipelineMode, + WebSocketsEnabled = config.WebSocketsEnabled, + RemoteDebuggingEnabled = config.RemoteDebuggingEnabled, + RemoteDebuggingVersion = config.RemoteDebuggingVersion, + RoutingRules = config.RoutingRules.Select(r => r.ToRoutingRule()).ToArray(), + Use32BitWorkerProcess = config.Use32BitWorkerProcess, + AutoSwapSlotName = config.AutoSwapSlotName, + }; + if (config.AppSettings != null) + config.AppSettings.ForEach(nvp => parameters.AppSettings.Add(ToKeyValuePair(nvp))); + + if (config.ConnectionStrings != null) + config.ConnectionStrings.ForEach( + csi => parameters.ConnectionStrings.Add(new WebSiteUpdateConfigurationParameters.ConnectionStringInfo + { + Name = csi.Name, + ConnectionString = csi.ConnectionString, + Type = (Management.WebSites.Models.ConnectionStringType)Enum.Parse(typeof(Management.WebSites.Models.ConnectionStringType), csi.Type.ToString(), ignoreCase: true) + })); + + if (config.DefaultDocuments != null) + config.DefaultDocuments.ForEach(d => parameters.DefaultDocuments.Add(d)); + + if (config.HandlerMappings != null) + config.HandlerMappings.ForEach( + hm => parameters.HandlerMappings.Add(new WebSiteUpdateConfigurationParameters.HandlerMapping + { + Arguments = hm.Arguments, + Extension = hm.Extension, + ScriptProcessor = hm.ScriptProcessor + })); + + if (config.Metadata != null) + config.Metadata.ForEach(nvp => parameters.Metadata.Add(ToKeyValuePair(nvp))); + + return parameters; + } + + internal static Management.WebSites.Models.RoutingRule ToRoutingRule(this Utilities.RoutingRule rule) + { + Management.WebSites.Models.RoutingRule result = null; + if (rule is Utilities.RampUpRule) + { + var rampupRule = rule as Utilities.RampUpRule; + result = new Management.WebSites.Models.RampUpRule() + { + ReroutePercentage = rampupRule.ReroutePercentage, + ActionHostName = rampupRule.ActionHostName, + MinReroutePercentage = rampupRule.MinReroutePercentage, + MaxReroutePercentage = rampupRule.MaxReroutePercentage, + ChangeDecisionCallbackUrl = rampupRule.ChangeDecisionCallbackUrl, + ChangeIntervalInMinutes = rampupRule.ChangeIntervalInMinutes, + ChangeStep = rampupRule.ChangeStep, + }; + } + + if (result != null) + { + // base class properties + result.Name = rule.Name; + } + + return result; + } + + internal static SlotConfigNamesUpdate ToSlotConfigNamesUpdate(this Utilities.SiteConfig config) + { + return new SlotConfigNamesUpdate + { + AppSettingNames = config.SlotStickyAppSettingNames, + ConnectionStringNames = config.SlotStickyConnectionStringNames + }; + } + + internal static Utilities.WebHostingPlan ToWebHostingPlan(this Management.WebSites.Models.WebHostingPlan plan, string webSpace) + { + return new Utilities.WebHostingPlan + { + Name = plan.Name, + CurrentNumberOfWorkers = plan.NumberOfWorkers, + CurrentWorkerSize = plan.WorkerSize.HasValue + ? new Utilities.WorkerSizeOptions?((Utilities.WorkerSizeOptions)(int)plan.WorkerSize.Value) + : null, + WorkerSize = plan.WorkerSize.HasValue + ? new Utilities.WorkerSizeOptions?((Utilities.WorkerSizeOptions)(int)plan.WorkerSize.Value) + : null, + NumberOfWorkers = plan.NumberOfWorkers, + SKU = plan.SKU.ToString(), + WebSpace = webSpace, + }; + } + + internal static Utilities.WebHostingPlan ToWebHostingPlan(this Management.WebSites.Models.WebHostingPlanGetResponse plan) + { + return ToWebHostingPlan(plan.WebHostingPlan, webSpace: null); + } + } + + /// + /// General extension methods on the various web site management operations + /// + public static class WebSitesManagementExtensionMethods + { + public static Utilities.Site GetSiteWithCache( + this IWebSiteManagementClient client, + string website) + { + return GetFromCache(client, website) ?? GetFromAzure(client, website); + } + + private static Utilities.Site GetFromCache(IWebSiteManagementClient client, + string website) + { + Utilities.Site site = Cache.GetSite(client.Credentials.SubscriptionId, website); + if (site != null) + { + // Verify site still exists + try + { + WebSiteGetParameters input = new WebSiteGetParameters(); + input.PropertiesToInclude.Add("repositoryuri"); + input.PropertiesToInclude.Add("publishingpassword"); + input.PropertiesToInclude.Add("publishingusername"); + + return client.WebSites.Get(site.WebSpace, site.Name, input).ToSite(); + } + catch + { + // Website is removed or webspace changed, remove from cache + Cache.RemoveSite(client.Credentials.SubscriptionId, site); + throw; + } + } + return null; + } + + private static Utilities.Site GetFromAzure(IWebSiteManagementClient client, + string website) + { + // Get all available webspace using REST API + var spaces = client.WebSpaces.List(); + foreach (var space in spaces.WebSpaces) + { + WebSiteListParameters input = new WebSiteListParameters(); + input.PropertiesToInclude.Add("repositoryuri"); + input.PropertiesToInclude.Add("publishingpassword"); + input.PropertiesToInclude.Add("publishingusername"); + var sites = client.WebSpaces.ListWebSites(space.Name, input); + var site = sites.WebSites.FirstOrDefault( + ws => ws.Name.Equals(website, StringComparison.InvariantCultureIgnoreCase)); + if (site != null) + { + return site.ToSite(); + } + } + + // The website does not exist. + return null; + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebsitesExtensionMethods.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebsitesExtensionMethods.cs new file mode 100644 index 000000000000..5b53a18f2640 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/Services/WebsitesExtensionMethods.cs @@ -0,0 +1,143 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.GeoEntities; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Services +{ + public static class WebsitesExtensionMethods + { + public static WebSpaces GetWebSpaces(this IWebsitesServiceManagement proxy, string subscriptionId) + { + return proxy.EndGetWebSpaces(proxy.BeginGetWebSpaces(subscriptionId, null, null)); + } + + public static WebSpace GetWebSpace(this IWebsitesServiceManagement proxy, string subscriptionId, string name) + { + return proxy.EndGetWebSpace(proxy.BeginGetWebSpace(subscriptionId, name, null, null)); + } + + public static WebSpace CreateWebSpace(this IWebsitesServiceManagement proxy, string subscriptionId, bool allowPendingState, WebSpace webSpace) + { + return proxy.EndCreateWebSpace(proxy.BeginCreateWebSpace(subscriptionId, allowPendingState, webSpace, null, null)); + } + + public static WebSpace UpdateWebSpace(this IWebsitesServiceManagement proxy, string subscriptionId, string name, bool allowPendingState, WebSpace webSpace) + { + return proxy.EndUpdateWebSpace(proxy.BeginUpdateWebSpace(subscriptionId, name, allowPendingState, webSpace, null, null)); + } + + public static void DeleteWebSpace(this IWebsitesServiceManagement proxy, string subscriptionId, string name) + { + proxy.EndDeleteWebSpace(proxy.BeginDeleteWebSpace(subscriptionId, name, null, null)); + } + + public static string[] GetSubscriptionPublishingUsers(this IWebsitesServiceManagement proxy, string subscriptionId) + { + return proxy.EndGetSubscriptionPublishingUsers(proxy.BeginGetSubscriptionPublishingUsers(subscriptionId, null, null)); + } + + public static Sites GetSites(this IWebsitesServiceManagement proxy, string subscriptionId, string webspaceName, string propertiesToInclude) + { + return proxy.EndGetSites(proxy.BeginGetSites(subscriptionId, webspaceName, propertiesToInclude, null, null)); + } + + public static Site GetSite(this IWebsitesServiceManagement proxy, string subscriptionId, string webspaceName, string name, string propertiesToInclude) + { + return proxy.EndGetSite(proxy.BeginGetSite(subscriptionId, webspaceName, name, propertiesToInclude, null, null)); + } + + public static Site CreateSite(this IWebsitesServiceManagement proxy, string subscriptionId, string webspaceName, Site site) + { + return proxy.EndCreateSite(proxy.BeginCreateSite(subscriptionId, webspaceName, site, null, null)); + } + + public static void UpdateSite(this IWebsitesServiceManagement proxy, string subscriptionId, string webspaceName, string name, Site site) + { + proxy.EndUpdateSite(proxy.BeginUpdateSite(subscriptionId, webspaceName, name, site, null, null)); + } + + public static void DeleteSite(this IWebsitesServiceManagement proxy, string subscriptionId, string webspaceName, string name, string deleteMetrics) + { + proxy.EndDeleteSite(proxy.BeginDeleteSite(subscriptionId, webspaceName, name, deleteMetrics, null, null)); + } + + public static SiteConfig GetSiteConfig(this IWebsitesServiceManagement proxy, string subscriptionId, string webspaceName, string name) + { + return proxy.EndGetSiteConfig(proxy.BeginGetSiteConfig(subscriptionId, webspaceName, name, null, null)); + } + + public static void UpdateSiteConfig(this IWebsitesServiceManagement proxy, string subscriptionId, string webspaceName, string name, SiteConfig siteConfig) + { + proxy.EndUpdateSiteConfig(proxy.BeginUpdateSiteConfig(subscriptionId, webspaceName, name, siteConfig, null, null)); + } + + public static void CreateSiteRepository(this IWebsitesServiceManagement proxy, string subscriptionId, string webspaceName, string name) + { + proxy.EndCreateSiteRepository(proxy.BeginCreateSiteRepository(subscriptionId, webspaceName, name, null, null)); + } + + public static GeoRegions GetRegions(this IWebsitesServiceManagement proxy, bool listOnlyOnline) + { + return proxy.EndGetRegions(proxy.BeginGetRegions(listOnlyOnline, null, null)); + } + + public static GeoLocations GetLocations(this IWebsitesServiceManagement proxy, string regionName) + { + return proxy.EndGetLocations(proxy.BeginGetLocations(regionName, null, null)); + } + + public static Site GetSiteWithCache( + this IWebsitesServiceManagement proxy, + string subscriptionId, + string website, + string propertiesToInclude) + { + // Try to get the website's webspace from the cache + Site site = Cache.GetSite(subscriptionId, website, propertiesToInclude); + if (site != null) + { + try + { + return proxy.GetSite(subscriptionId, site.WebSpace, site.Name, propertiesToInclude); + } + catch + { + // The website is removed or it's webspace changed. + Cache.RemoveSite(subscriptionId, site); + throw; + } + } + + // Get all available webspace using REST API + WebSpaces webspaces = proxy.GetWebSpaces(subscriptionId); + + // Iterate over all the webspaces until finding the website. + foreach (WebSpace webspace in webspaces) + { + Sites websites = proxy.GetSites(subscriptionId, webspace.Name, propertiesToInclude); + var matchWebsite = websites.FirstOrDefault(w => w.Name.Equals(website, System.StringComparison.InvariantCultureIgnoreCase)); + if (matchWebsite != null) + { + return matchWebsite; + } + } + + // The website does not exist. + return null; + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/SiteNameParser.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/SiteNameParser.cs new file mode 100644 index 000000000000..4bb1776f0a75 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/SiteNameParser.cs @@ -0,0 +1,40 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Text.RegularExpressions; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites +{ + public static class SiteNameParser + { + public const string ProductionSlot = "production"; + private static readonly Regex SiteWithSlotNameRegexp = + new Regex(@"^(?[^\(]+)\((?[^\)]+)\)$"); + + public static void ParseSiteWithSlotName(string siteWithSlotName, out string siteName, out string slotName) + { + var match = SiteWithSlotNameRegexp.Match(siteWithSlotName); + if (match.Success) + { + siteName = match.Groups["siteName"].Value; + slotName = match.Groups["slotName"].Value; + } + else + { + siteName = siteWithSlotName; + slotName = ProductionSlot; + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/UriElements.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/UriElements.cs new file mode 100644 index 000000000000..7a197d063e2f --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/UriElements.cs @@ -0,0 +1,170 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites +{ + + public class UriElements + { + public const string ServiceNamespace = "http://schemas.microsoft.com/windowsazure"; + + public const string Plans = "plans"; + public const string Subscriptions = "subscriptions"; + public const string Web = "web"; + public const string WebAdmin = "webadmin"; + public const string MySql = "mysql"; + public const string SqlServer = "sqlserver"; + public const string SqlAzure = "sqlAzure"; + public const string Users = "users"; + public const string ResourceProvider = "resourceprovider"; + public const string MetricDefinitions = "metricdefinitions"; + public const string Authentication = "authentication"; + public const string GeoAdmin = "geoadmin"; + public const string AccessControl = "accesscontrol"; + public const string Capacity = "capacities"; + public const string Offers = "offers"; + + // Parameters + public const string NameTemplateParameter = "/{name}"; + public const string UserNameTemplateParameter = "/{userName}"; + public const string CommandTemplateParameter = "?comp=command"; + public const string UsersPublishAuthN = "?publishauthenticated&source={source}&protocol={protocol}&userAddress={userAddress}"; + public const string UsersPublishAuthZ = "?publishauthorized&userName={publishingUserName}&authorizedSite={siteName}&repository={isrepository}&source={source}&protocol={protocol}&userAddress={userAddress}"; + public const string DeleteMetricsParameter = "?deleteMetrics={deleteMetrics}"; + public const string ExistsParameter = "/exists"; + public const string MetricsParameters = "?names={metrics}&startTime={startTime}&endTime={endTime}"; + public const string ComputeMode = "?computeMode={computeMode}&siteMode={siteMode}&enforcementScope={enforcementScope}"; + public const string PolicyParameters = "?computeMode={computeMode}&siteMode={siteMode}"; + public const string SkipValidationParameter = "?skipValidation={skipValidation}"; + public const string PaginationParameters = "?pageNumber={pageNumber}&pageSize={pageSize}&filter={filter}"; + public const string ContinuationParameters = "?marker={marker}&recordCount={recordCount}"; + public const string AllowPendingStateParameter = "?allowPendingState={allowPendingState}"; + public const string PropertiesToIncludeParameter = "?propertiesToInclude={propertiesToInclude}"; + public const string ListOnlyOnlineStampsParameter = "?listOnlyOnline={listOnlyOnline}"; + public const string BindingsParameter = "?bindings={bindings}"; + public const string BindingParameter = "/{ip}/{port}"; + + public const string RepositoryUriProperty = "RepositoryUri"; + public const string PublishingUsernameProperty = "PublishingUsername"; + public const string PublishingPasswordProperty = "PublishingPassword"; + public const string MetadataProperty = "Metadata"; + + // Service resources + public const string Root = ""; + public const string RolesRoot = "roles"; + public const string EntitiesRoot = "entities"; + public const string UserRoles = "/userRoles"; + public const string CloudEntityRoot = EntitiesRoot + UserRoles; + public const string SubscriptionEntitiesRoot = EntitiesRoot + "{subscriptionName}" + UserRoles; + public const string WebSpaceEntitiesRoot = EntitiesRoot + "{subscriptionName}/services/webspaces/{webspaceName}" + UserRoles; + public const string WebSiteEntitiesRoot = EntitiesRoot + "{subscriptionName}/services/webspaces/{webspaceName}/sites/{siteName}" + UserRoles; + public const string GeoRegionsRoot = "regions/"; + public const string GeoLocationsRoot = "regions/{regionName}/locations"; + public const string StampsRoot = "locations/{locationName}/stamps"; + public const string StampsCommand = "?Command={command}"; + public const string WebSitesRoot = "{subscriptionName}/services/webspaces/{webspaceName}/sites"; + public const string SqlDatabasesRoot = "{subscriptionName}/services/webspaces/{webspaceName}/sqldbs"; + public const string MySqlDatabaseRoot = "{subscriptionName}/services/webspaces/{webspaceName}/mysqldbs"; + public const string SqlAzureDatabasesRoot = "{subscriptionName}/services/webspaces/{webspaceName}/sqlazuredbs"; + public const string WebSpacesRoot = "{subscriptionName}/services/webspaces"; + public const string WebSpaceUsagesRoot = "{subscriptionName}/services/webspaces/{webspaceName}/usages?names={usages}&computeMode={computeMode}&siteMode={siteMode}"; + public const string WebSiteUsagesRoot = "{subscriptionName}/services/webspaces/{webspaceName}/sites/{name}/usages?names={usages}&computeMode={computeMode}&siteMode={siteMode}"; + public const string WebSiteMetricsRoot = "{subscriptionName}/services/webspaces/{webspaceName}/sites/{name}/metrics"; + public const string WebSiteMetricDefinitions = "{subscriptionName}/services/webspaces/{webspaceName}/sites/{name}/metricdefinitions"; + public const string WebSiteConfig = "{subscriptionName}/services/webspaces/{webspaceName}/sites/{name}/config"; + public const string WebSiteRepository = "{subscriptionName}/services/webspaces/{webspaceName}/sites/{name}/repository"; + public const string WebSiteRepositoryDev = "{subscriptionName}/services/webspaces/{webspaceName}/sites/{name}/repository/dev"; + public const string WebSiteAuditLogs = "{subscriptionName}/services/webspaces/{webspaceName}/sites/{name}/auditlogs?startTime={startTime}&endTime={endTime}"; + public const string WebSiteGetLastAuditLog = "{subscriptionName}/services/webspaces/{webspaceName}/sites/{name}/lastauditlog"; + public const string WebSiteSwap = "{subscriptionName}/services/webspaces/{webspaceName}/sites/{name}?Command={command}&OtherSiteName={otherSiteName}"; + public const string WebSiteRestart = "{subscriptionName}/services/webspaces/{webspaceName}/sites/{name}/restart"; + public const string WebSiteIsValidCustomDomain = "{subscriptionName}/services/webspaces/{webspaceName}/sites/{name}/isvalidcustomdomain?hostName={hostName}&type={recordType}"; + + public const string HostNameAvailability = "ishostnameavailable/{subDomain}"; + + public const string HostNameReservedOrNotAllowed = "ishostnamereservedornotallowed/{subDomain}"; + + public const string WebSitesPerSubscription = "subscriptions/{subscriptionName}/sites"; + public const string SqlDatabasesPerSubscription = "subscriptions/{subscriptionName}/sqldbs"; + public const string MySqlDatabasesPerSubscription = "subscriptions/{subscriptionName}/mysqldbs"; + + public const string SubscriptionPublishingUsers = "{subscriptionName}/services/webspaces/?properties=publishingUsers"; + + public const string WebSitePublishingProfile = "subscriptions/{subscriptionName}/webspaces/{webspaceName}/sites/{name}/publishxml"; + + public const string RDFENotification = "notification"; + + public const string Systems = "systems"; + public const string WebWorkers = "systems/{webSystemName}/webworkers"; + public const string LoadBalancers = "systems/{webSystemName}/loadbalancers"; + public const string LoadBalancerSslBindings = "systems/{webSystemName}/loadbalancers/{name}/sslbindings"; + public const string Publishers = "systems/{webSystemName}/publishers"; + public const string Controllers = "systems/{webSystemName}/controllers"; + public const string FileServers = "systems/{webSystemName}/fileservers"; + public const string ManagementServers = "systems/{webSystemName}/managementservers"; + public const string WebPlan = "/{name}/web"; + public const string WebQuotas = "/{planName}/web/quotas"; + public const string Policies = "/{planName}/web/policies"; + public const string SystemSites = "systems/{name}/sites?filter={filter}&pageNumber={pageNumber}&pageSize={pageSize}&details={details}&orderBy={orderBy}"; + public const string Credentials = "systems/{webSystemName}/credentials"; + + public const string SystemMetrics = "systems/{name}/metrics"; + public const string WebWorkerMetrics = "systems/{webSystemName}/webworkers/{name}/metrics"; + public const string LoadBalancerMetrics = "systems/{webSystemName}/loadbalancers/{name}/metrics"; + public const string PublisherMetrics = "systems/{webSystemName}/publishers/{name}/metrics"; + public const string ControllerMetrics = "systems/{webSystemName}/controllers/{name}/metrics"; + public const string FileServerMetrics = "systems/{webSystemName}/fileservers/{name}/metrics"; + public const string ManagementServerMetrics = "systems/{webSystemName}/managementservers/{name}/metrics"; + + public const string WorkerSites = "systems/{webSystemName}/webworkers/{name}/sites?filter={filter}&pageNumber={pageNumber}&pageSize={pageSize}&details={details}&orderBy={orderBy}"; + + public const string SystemSettings = "systems/{name}/config"; + public const string SystemLog = "systems/{name}/log"; + public const string SystemSummary = "systems/{name}/summary"; + + public const string WebWorkerRole = "webworkers"; + public const string LoadBalancerRole = "loadbalancers"; + public const string PublisherRole = "publishers"; + public const string ControllerRole = "controllers"; + public const string FileServerRole = "fileservers"; + public const string ManagementServerRole = "managementservers"; + + public const string CleanAuditLogs = "auditlogs?timestamp={timestamp}"; + + // This is for checking that the URL using {role} parameter is valid according to the specification + public static readonly string[] AvailableRoles = new[] { WebWorkerRole, LoadBalancerRole, PublisherRole, ControllerRole }; + + public const string PutMachineOffline = "systems/{webSystemName}/{role}/{name}/offline"; + public const string PutMachineOnline = "systems/{webSystemName}/{role}/{name}/online"; + public const string RebootMachine = "systems/{webSystemName}/{role}/{name}/reboot"; + public const string RepairMachine = "systems/{webSystemName}/{role}/{name}/repair"; + public const string MachineLog = "systems/{webSystemName}/{role}/{name}/log"; + public const string IsMachineValid = "systems/{webSystemName}/{role}/{name}/valid"; + + public const string DatabaseCheckAvailability = "databases/{name}?CheckAvailability"; + public const string WebSiteCheckAvailability = "sites/{name}?CheckAvailability"; + + public const string AzureDriveTraceEnabled = "AzureDriveEnabled"; + public const string AzureDriveTraceLevel = "AzureDriveTraceLevel"; + public const string AzureTableTraceEnabled = "AzureTableEnabled"; + public const string AzureTableTraceLevel = "AzureTableTraceLevel"; + public const string AzureBlobTraceEnabled = "AzureBlobEnabled"; + public const string AzureBlobTraceLevel = "AzureBlobTraceLevel"; + + public const string LogPaths = "vfs/LogFiles"; + public const string DiagnosticsSettings = "diagnostics/settings"; + public const string WebSpacesGeoRegionsRoot = "webspaces/?properties=georegions"; + public const string DnsSuffix = "webspaces/?properties=dnssuffix"; + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/WebsiteInstance.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/WebsiteInstance.cs new file mode 100644 index 000000000000..b98557a14282 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/WebsiteInstance.cs @@ -0,0 +1,20 @@ +// ---------------------------------------------------------------------------------- +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites +{ + public class WebsiteInstance + { + public string InstanceId { get; set; } + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Websites/WebsitesClient.cs b/src/ServiceManagement/Services/Commands.Utilities/Websites/WebsitesClient.cs new file mode 100644 index 000000000000..a11fc02974d4 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Websites/WebsitesClient.cs @@ -0,0 +1,1733 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Web; +using System.Xml.Linq; +using Microsoft.Build.Evaluation; +using Microsoft.Build.Framework; +using Microsoft.Build.Logging; +using Microsoft.Web.Deployment; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.DeploymentEntities; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebJobs; +using Microsoft.WindowsAzure.Commands.Websites.WebJobs; +using Microsoft.WindowsAzure.Management.WebSites; +using Microsoft.WindowsAzure.Management.WebSites.Models; +using Microsoft.WindowsAzure.Storage.Blob; +using Microsoft.WindowsAzure.Storage.Table; +using Microsoft.WindowsAzure.WebSitesExtensions; +using Microsoft.WindowsAzure.WebSitesExtensions.Models; +using Newtonsoft.Json.Linq; + +namespace Microsoft.WindowsAzure.Commands.Utilities.Websites +{ + using Utilities = Services.WebEntities; + + public class WebsitesClient : IWebsitesClient + { + private const int UploadJobWaitTime = 2000; + + private readonly CloudServiceClient cloudServiceClient; + + private readonly AzureSubscription subscription; + + public static string SlotFormat = "{0}({1})"; + + public IWebSiteManagementClient WebsiteManagementClient { get; internal set; } + + public Action Logger { get; set; } + + /// + /// Creates new WebsitesClient + /// + /// Subscription containing websites to manipulate + /// The logger action + public WebsitesClient(AzureSubscription subscription, Action logger) + { + Logger = logger; + cloudServiceClient = new CloudServiceClient(subscription, debugStream: logger); + WebsiteManagementClient = AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement); + this.subscription = subscription; + } + + /// + /// Gets website name in the current directory. + /// + /// + private string GetWebsiteFromCurrentDirectory() + { + return GitWebsite.ReadConfiguration().Name; + } + + private Repository GetRepository(string websiteName) + { + Utilities.Site site = WebsiteManagementClient.GetSiteWithCache(websiteName); + + if (site != null) + { + return new Repository(site); + } + + throw new Exception(Resources.RepositoryNotSetup); + } + + private HttpClient CreateDeploymentHttpClient(string websiteName) + { + Repository repository; + ICredentials credentials; + GetWebsiteDeploymentHttpConfiguration(websiteName, out repository, out credentials); + return AzureSession.ClientFactory.CreateHttpClient(repository.RepositoryUri, credentials); + } + + private string GetWebsiteDeploymentHttpConfiguration( + string name, + out Repository repository, + out ICredentials credentials) + { + name = SetWebsiteName(name, null); + repository = GetRepository(name); + credentials = new NetworkCredential( + repository.PublishingUsername, + repository.PublishingPassword); + return name; + } + + private string GetWebsiteName(string name) + { + return string.IsNullOrEmpty(name) ? GetWebsiteFromCurrentDirectory() : name; + } + + private void ChangeWebsiteState(string name, string webspace, WebsiteState state) + { + WebsiteManagementClient.WebSites.Update(webspace, name, new WebSiteUpdateParameters + { + State = state.ToString(), + // Set the following 3 collection properties to null since by default they are empty lists, + // which will clear the corresponding settings of the web site, thus results in a 404 when browsing the web site. + HostNames = null, + HostNameSslStates = null, + }); + } + + private void SetApplicationDiagnosticsSettings( + string name, + WebsiteDiagnosticOutput output, + bool setFlag, + Dictionary properties = null) + { + Utilities.Site website = GetWebsite(name); + + using (HttpClient client = CreateDeploymentHttpClient(website.Name)) + { + DiagnosticsSettings diagnosticsSettings = GetApplicationDiagnosticsSettings(website.Name); + switch (output) + { + case WebsiteDiagnosticOutput.FileSystem: + diagnosticsSettings.AzureDriveTraceEnabled = setFlag; + diagnosticsSettings.AzureDriveTraceLevel = setFlag ? + (Services.DeploymentEntities.LogEntryType)properties[DiagnosticProperties.LogLevel] : + diagnosticsSettings.AzureDriveTraceLevel; + break; + + case WebsiteDiagnosticOutput.StorageTable: + diagnosticsSettings.AzureTableTraceEnabled = setFlag; + if (setFlag) + { + string storageAccountName = (string)properties[DiagnosticProperties.StorageAccountName]; + string storageTableName = (string)properties[DiagnosticProperties.StorageTableName]; + string connectionString = cloudServiceClient.GetStorageServiceConnectionString(storageAccountName); + + string tableStorageSasUrl = + StorageUtilities.GenerateTableStorageSasUrl( + connectionString, + storageTableName, + DateTime.Now.AddYears(1000), + SharedAccessTablePermissions.Add | SharedAccessTablePermissions.Query | SharedAccessTablePermissions.Delete | SharedAccessTablePermissions.Update); + + SetAppSetting(name, "DIAGNOSTICS_AZURETABLESASURL", tableStorageSasUrl); + + diagnosticsSettings.AzureTableTraceLevel = setFlag ? + (Services.DeploymentEntities.LogEntryType)properties[DiagnosticProperties.LogLevel] : + diagnosticsSettings.AzureTableTraceLevel; + } + break; + + case WebsiteDiagnosticOutput.StorageBlob: + diagnosticsSettings.AzureBlobTraceEnabled = setFlag; + if (setFlag) + { + string storageAccountName = (string)properties[DiagnosticProperties.StorageAccountName]; + string storageBlobContainerName = (string)properties[DiagnosticProperties.StorageBlobContainerName]; + string connectionString = cloudServiceClient.GetStorageServiceConnectionString(storageAccountName); + + string blobStorageSasUrl = + StorageUtilities.GenerateBlobStorageSasUrl( + connectionString, + storageBlobContainerName, + DateTime.Now.AddYears(1000), + SharedAccessBlobPermissions.Delete | SharedAccessBlobPermissions.List | SharedAccessBlobPermissions.Read | SharedAccessBlobPermissions.Write); + + SetAppSetting(name, "DIAGNOSTICS_AZUREBLOBCONTAINERSASURL", blobStorageSasUrl); + + diagnosticsSettings.AzureBlobTraceLevel = setFlag ? + (Services.DeploymentEntities.LogEntryType)properties[DiagnosticProperties.LogLevel] : + diagnosticsSettings.AzureBlobTraceLevel; + } + break; + + default: + throw new ArgumentException(); + } + + // Check if there is null fields for diagnostics settings. If there is, default to false. (Same as defaulted on portal) + diagnosticsSettings.AzureDriveTraceEnabled = diagnosticsSettings.AzureDriveTraceEnabled ?? false; + diagnosticsSettings.AzureTableTraceEnabled = diagnosticsSettings.AzureTableTraceEnabled ?? false; + diagnosticsSettings.AzureBlobTraceEnabled = diagnosticsSettings.AzureBlobTraceEnabled ?? false; + + JObject json = new JObject( + new JProperty(UriElements.AzureDriveTraceEnabled, diagnosticsSettings.AzureDriveTraceEnabled), + new JProperty(UriElements.AzureDriveTraceLevel, diagnosticsSettings.AzureDriveTraceLevel.ToString()), + new JProperty(UriElements.AzureTableTraceEnabled, diagnosticsSettings.AzureTableTraceEnabled), + new JProperty(UriElements.AzureTableTraceLevel, diagnosticsSettings.AzureTableTraceLevel.ToString()), + new JProperty(UriElements.AzureBlobTraceEnabled, diagnosticsSettings.AzureBlobTraceEnabled), + new JProperty(UriElements.AzureBlobTraceLevel, diagnosticsSettings.AzureBlobTraceLevel.ToString())); + client.PostJson(UriElements.DiagnosticsSettings, json, Logger); + } + } + + private void SetSiteDiagnosticsSettings( + string name, + bool webServerLogging, + bool detailedErrorMessages, + bool failedRequestTracing, + bool setFlag) + { + Utilities.Site website = GetWebsite(name); + + var update = WebsiteManagementClient.WebSites.GetConfiguration(website.WebSpace, website.Name).ToUpdate(); + update.HttpLoggingEnabled = webServerLogging ? setFlag : update.HttpLoggingEnabled; + update.DetailedErrorLoggingEnabled = detailedErrorMessages ? setFlag : update.DetailedErrorLoggingEnabled; + update.RequestTracingEnabled = failedRequestTracing ? setFlag : update.RequestTracingEnabled; + + WebsiteManagementClient.WebSites.UpdateConfiguration(website.WebSpace, website.Name, update); + } + + private bool IsProductionSlot(string slot) + { + return (!string.IsNullOrEmpty(slot)) && + (slot.Equals(WebsiteSlotName.Production.ToString(), StringComparison.OrdinalIgnoreCase)); + } + + private IWebSiteExtensionsClient GetWebSiteExtensionsClient(string websiteName) + { + Utilities.Site website = GetWebsite(websiteName); + Uri endpointUrl = new Uri("https://" + website.EnabledHostNames.First(url => url.Contains(".scm."))); + return AzureSession.ClientFactory.CreateCustomClient(new object[] { websiteName, + GetWebSiteExtensionsCredentials(websiteName), endpointUrl }); + } + + private BasicAuthenticationCloudCredentials GetWebSiteExtensionsCredentials(string name) + { + name = SetWebsiteName(name, null); + Repository repository = GetRepository(name); + return new BasicAuthenticationCloudCredentials() + { + Username = repository.PublishingUsername, + Password = repository.PublishingPassword + }; + } + + /// + /// Starts log streaming for the given website. + /// + /// The website name + /// The website slot name + /// The log path, by default root + /// The substring message + /// Predicate to end streaming + /// The fetch wait interval + /// The log line + public IEnumerable StartLogStreaming( + string name, + string slot, + string path, + string message, + Predicate endStreaming, + int waitInternal) + { + name = SetWebsiteName(name, slot); + return StartLogStreaming(name, path, message, endStreaming, waitInternal); + } + + /// + /// List log paths for a given website. + /// + /// The website name + /// The website slot name + /// The list of log paths + public List ListLogPaths(string name, string slot) + { + name = SetWebsiteName(name, slot); + return ListLogPaths(name); + } + + /// + /// Starts log streaming for the given website. + /// + /// The website name + /// The log path, by default root + /// The substring message + /// Predicate to end streaming + /// The fetch wait interval + /// The log line + public IEnumerable StartLogStreaming( + string name, + string path, + string message, + Predicate endStreaming, + int waitInterval) + { + Repository repository; + ICredentials credentials; + name = GetWebsiteDeploymentHttpConfiguration(name, out repository, out credentials); + path = HttpUtility.UrlEncode(path); + message = HttpUtility.UrlEncode(message); + + RemoteLogStreamManager manager = new RemoteLogStreamManager( + repository.RepositoryUri, + path, + message, + credentials, + Logger); + + using (LogStreamWaitHandle logHandler = new LogStreamWaitHandle(manager.GetStream().Result)) + { + bool doStreaming = true; + + while (doStreaming) + { + string line = logHandler.WaitNextLine(waitInterval); + + if (line != null) + { + yield return line; + } + + doStreaming = endStreaming == null || endStreaming(line); + } + } + } + + /// + /// List log paths for a given website. + /// + /// + /// + public List ListLogPaths(string name) + { + using (HttpClient client = CreateDeploymentHttpClient(name)) + { + return client.GetJson>(UriElements.LogPaths, Logger); + } + } + + /// + /// Gets the application diagnostics settings + /// + /// The website name + /// The website application diagnostics settings + public DiagnosticsSettings GetApplicationDiagnosticsSettings(string name) + { + using (HttpClient client = CreateDeploymentHttpClient(name)) + { + return client.GetJson(UriElements.DiagnosticsSettings, Logger); + } + } + + /// + /// Gets the application diagnostics settings + /// + /// The website name + /// The website slot name + /// The website application diagnostics settings + public DiagnosticsSettings GetApplicationDiagnosticsSettings(string name, string slot) + { + name = SetWebsiteName(name, slot); + return GetApplicationDiagnosticsSettings(name); + } + + /// + /// Restarts a website. + /// + /// The website name + public void RestartWebsite(string name) + { + Utilities.Site website = GetWebsite(name); + ChangeWebsiteState(website.Name, website.WebSpace, WebsiteState.Stopped); + ChangeWebsiteState(website.Name, website.WebSpace, WebsiteState.Running); + } + + /// + /// Starts a website. + /// + /// The website name + public void StartWebsite(string name) + { + Utilities.Site website = GetWebsite(name); + ChangeWebsiteState(website.Name, website.WebSpace, WebsiteState.Running); + } + + /// + /// Stops a website. + /// + /// The website name + public void StopWebsite(string name) + { + Utilities.Site website = GetWebsite(name); + ChangeWebsiteState(website.Name, website.WebSpace, WebsiteState.Stopped); + } + + /// + /// Restarts a website. + /// + /// The website name + /// The website slot name + public void RestartWebsite(string name, string slot) + { + Utilities.Site website = GetWebsite(name, slot); + ChangeWebsiteState(website.Name, website.WebSpace, WebsiteState.Stopped); + ChangeWebsiteState(website.Name, website.WebSpace, WebsiteState.Running); + } + + /// + /// Starts a website. + /// + /// The website name + /// The website slot name + public void StartWebsite(string name, string slot) + { + Utilities.Site website = GetWebsite(name, slot); + ChangeWebsiteState(website.Name, website.WebSpace, WebsiteState.Running); + } + + /// + /// Stops a website. + /// + /// The website name + /// The website slot name + public void StopWebsite(string name, string slot) + { + Utilities.Site website = GetWebsite(name, slot); + ChangeWebsiteState(website.Name, website.WebSpace, WebsiteState.Stopped); + } + + public WebsiteInstance[] ListWebsiteInstances(string webSpace, string fullName) + { + IList instanceIds = WebsiteManagementClient.WebSites.GetInstanceIds(webSpace, fullName).InstanceIds; + return instanceIds.Select(s => new WebsiteInstance { InstanceId = s }).ToArray(); + } + + /// + /// Gets a website slot instance. + /// + /// The website name + /// The slot name + /// The website instance + public Utilities.Site GetWebsite(string name, string slot) + { + name = SetWebsiteName(name, slot); + return GetWebsite(name); + } + + /// + /// Gets a website instance. + /// + /// The website name + /// The website instance + public Utilities.Site GetWebsite(string name) + { + name = SetWebsiteName(name, null); + + Utilities.Site website = WebsiteManagementClient.GetSiteWithCache(name); + + if (website == null) + { + throw new CloudException(string.Format(Resources.InvalidWebsite, name)); + } + + return website; + } + + /// + /// Gets all slots for a website + /// + /// The website name + /// The website slots list + public List GetWebsiteSlots(string name) + { + name = SetWebsiteName(name, null); + return ListWebsites() + .Where(s => + s.Name.IndexOf(string.Format("{0}(", name), StringComparison.OrdinalIgnoreCase) >= 0 || + s.Name.Equals(name, StringComparison.OrdinalIgnoreCase)) + .ToList(); + } + + /// + /// Lists all websites under the current subscription + /// + /// List of websites + public List ListWebsites() + { + return ListWebSpaces().SelectMany(space => ListSitesInWebSpace(space.Name)).ToList(); + } + + /// + /// Lists all websites with the provided slot name. + /// + /// The slot name + /// The list if websites + public List ListWebsites(string slot) + { + return ListWebsites().Where(s => s.Name.Contains(string.Format("({0})", slot))).ToList(); + } + + /// + /// Gets the hostname of the website + /// + /// The website name + /// The website slot name + /// The hostname + public string GetHostName(string name, string slot) + { + slot = string.IsNullOrEmpty(slot) ? GetSlotName(name) : slot; + name = SetWebsiteName(name, slot); + string hostname = null; + string dnsSuffix = GetWebsiteDnsSuffix(); + + if (!string.IsNullOrEmpty(slot) && + !slot.Equals(WebsiteSlotName.Production.ToString(), StringComparison.OrdinalIgnoreCase)) + { + hostname = string.Format("{0}-{1}.{2}", GetWebsiteNameFromFullName(name), slot, dnsSuffix); + } + else + { + hostname = string.Format("{0}.{1}", name, dnsSuffix); + } + + return hostname; + } + + /// + /// Create a new website. + /// + /// Web space to create site in. + /// Details about the site to create. + /// The slot name. + /// The created site object + public Utilities.Site CreateWebsite(string webspaceName, Utilities.SiteWithWebSpace siteToCreate, string slot) + { + siteToCreate.Name = SetWebsiteName(siteToCreate.Name, slot); + string[] hostNames = { GetHostName(siteToCreate.Name, slot) }; + siteToCreate.HostNames = hostNames; + return CreateWebsite(webspaceName, siteToCreate); + } + + /// + /// Create a new website in production. + /// + /// Web space to create site in. + /// Details about the site to create. + /// The created site object + private Utilities.Site CreateWebsite(string webspaceName, Utilities.SiteWithWebSpace siteToCreate) + { + var options = new WebSiteCreateParameters + { + Name = siteToCreate.Name, + WebSpace = new WebSiteCreateParameters.WebSpaceDetails + { + GeoRegion = siteToCreate.WebSpaceToCreate.GeoRegion, + Name = siteToCreate.WebSpaceToCreate.Name, + Plan = siteToCreate.WebSpaceToCreate.Plan + }, + ServerFarm = string.Empty + }; + + var response = WebsiteManagementClient.WebSites.Create(webspaceName, options); + return response.WebSite.ToSite(); + } + + /// + /// Update the set of host names for a website. + /// + /// The site name. + /// The new host names. + public void UpdateWebsiteHostNames(Utilities.Site site, IEnumerable hostNames) + { + var update = new WebSiteUpdateParameters(); + foreach (var name in hostNames) + { + update.HostNames.Add(name); + } + + WebsiteManagementClient.WebSites.Update(site.WebSpace, site.Name, update); + } + + /// + /// Update the set of host names for a website slot. + /// + /// The website name. + /// The new host names. + /// The website slot name. + public void UpdateWebsiteHostNames(Utilities.Site site, IEnumerable hostNames, string slot) + { + site.Name = SetWebsiteName(site.Name, slot); + + UpdateWebsiteHostNames(site, hostNames); + } + + /// + /// Gets the website configuration. + /// + /// The website name + /// The website configuration object + public Utilities.SiteConfig GetWebsiteConfiguration(string name) + { + Utilities.Site website = GetWebsite(name); + Utilities.SiteConfig configuration = + WebsiteManagementClient.WebSites.GetConfiguration(website.WebSpace, website.Name).ToSiteConfig(); + + string siteName, slotName; + SiteNameParser.ParseSiteWithSlotName(name, out siteName, out slotName); + + // get slot config only for production + if (slotName.Equals(SiteNameParser.ProductionSlot, StringComparison.InvariantCultureIgnoreCase)) + { + var config = WebsiteManagementClient.WebSites.GetSlotConfigNames(website.WebSpace, name); + configuration.SlotStickyAppSettingNames = config.AppSettingNames; + configuration.SlotStickyConnectionStringNames = config.ConnectionStringNames; + } + + return configuration; + } + + /// + /// Gets a website slot configuration + /// + /// The website name + /// The website slot name + /// The website cobfiguration object + public Utilities.SiteConfig GetWebsiteConfiguration(string name, string slot) + { + Utilities.Site website = GetWebsite(name); + website.Name = SetWebsiteName(website.Name, slot); + return GetWebsiteConfiguration(website.Name); + } + + /// + /// Get the real website name. + /// + /// The website name from the -Name parameter. + /// The website name from the -Slot parameter. + /// The real website name. + private string SetWebsiteName(string name, string slot) + { + name = GetWebsiteName(name); + slot = slot ?? GetSlotName(name); + + if (string.IsNullOrEmpty(slot) || + slot.Equals(WebsiteSlotName.Production.ToString(), StringComparison.OrdinalIgnoreCase)) + { + return GetWebsiteNameFromFullName(name); + } + else if (name.Contains('(') && name.Contains(')')) + { + string currentSlot = GetSlotName(name); + if (currentSlot.Equals(WebsiteSlotName.Production.ToString(), StringComparison.OrdinalIgnoreCase)) + { + return GetWebsiteNameFromFullName(name); + } + + return name; + } + else + { + return GetSlotDnsName(name, slot); + } + } + + private string SetWebsiteNameForWebDeploy(string name, string slot) + { + return SetWebsiteName(name, slot).Replace("(", "__").Replace(")", string.Empty); + } + + /// + /// Gets the website name without slot part + /// + /// The website full name which may include slot name + /// The website name + public string GetWebsiteNameFromFullName(string name) + { + if (!string.IsNullOrEmpty(GetSlotName(name))) + { + name = name.Split('(')[0]; + } + + return name; + } + + /// + /// Update the website configuration + /// + /// The website name + /// The website configuration object containing updates. + public void UpdateWebsiteConfiguration(string name, Utilities.SiteConfig newConfiguration) + { + Utilities.Site website = GetWebsite(name); + WebsiteManagementClient.WebSites.UpdateConfiguration(website.WebSpace, name, + newConfiguration.ToConfigUpdateParameters()); + + if (newConfiguration.SlotStickyAppSettingNames != null + || newConfiguration.SlotStickyConnectionStringNames != null) + { + WebsiteManagementClient.WebSites.UpdateSlotConfigNames(website.WebSpace, name, + newConfiguration.ToSlotConfigNamesUpdate()); + } + } + + /// + /// Update the website slot configuration + /// + /// The website name + /// The website configuration object containing updates. + /// The website slot name + public void UpdateWebsiteConfiguration(string name, Utilities.SiteConfig newConfiguration, string slot) + { + name = SetWebsiteName(name, slot); + UpdateWebsiteConfiguration(name, newConfiguration); + } + + /// + /// Create a git repository for the web site. + /// + /// Webspace that site is in. + /// The site name. + public void CreateWebsiteRepository(string webspaceName, string websiteName) + { + WebsiteManagementClient.WebSites.CreateRepository(webspaceName, websiteName); + } + + /// + /// Delete a website. + /// + /// webspace the site is in. + /// website name. + /// pass true to delete stored metrics as part of removing site. + /// Pass true to delete server farm is this was the last website in it. + public void DeleteWebsite(string webspaceName, string websiteName, bool deleteMetrics = false, bool deleteEmptyServerFarm = false) + { + WebSiteDeleteParameters input = new WebSiteDeleteParameters() + { + DeleteAllSlots = true, + DeleteEmptyServerFarm = deleteEmptyServerFarm, + DeleteMetrics = deleteMetrics + }; + WebsiteManagementClient.WebSites.Delete(webspaceName, websiteName, input); + } + + /// + /// Delete a website slot. + /// + /// webspace the site is in. + /// website name. + /// The website slot name + public void DeleteWebsite(string webspaceName, string websiteName, string slot) + { + slot = slot ?? GetSlotName(websiteName) ?? WebsiteSlotName.Production.ToString(); + websiteName = SetWebsiteName(websiteName, slot); + WebSiteDeleteParameters input = new WebSiteDeleteParameters() + { + /** + * DeleteAllSlots is set to true in case that: + * 1) We are trying to delete a production slot and, + * 2) The website has more than one slot. + */ + DeleteAllSlots = IsProductionSlot(slot) && GetWebsiteSlots(websiteName).Count != 1, + DeleteEmptyServerFarm = false, + DeleteMetrics = false + }; + WebsiteManagementClient.WebSites.Delete(webspaceName, websiteName, input); + } + + /// + /// Get the WebSpaces. + /// + /// Collection of WebSpace objects + public IList ListWebSpaces() + { + return WebsiteManagementClient.WebSpaces.List().WebSpaces.Select(ws => ws.ToWebSpace()).ToList(); + } + + /// + /// Get the sites in the given webspace + /// + /// Name of webspace + /// The sites + public IList ListSitesInWebSpace(string spaceName) + { + WebSiteListParameters input = new WebSiteListParameters(); + input.PropertiesToInclude.Add("repositoryuri"); + input.PropertiesToInclude.Add("publishingpassword"); + input.PropertiesToInclude.Add("publishingusername"); + return WebsiteManagementClient.WebSpaces.ListWebSites(spaceName, input).WebSites.Select(s => s.ToSite()).ToList(); + } + + /// + /// Sets an AppSetting of a website. + /// + /// The website name + /// The app setting name + /// The app setting value + public void SetAppSetting(string name, string key, string value) + { + Utilities.Site website = GetWebsite(name); + var update = WebsiteManagementClient.WebSites.GetConfiguration(website.WebSpace, website.Name).ToUpdate(); + + update.AppSettings[key] = value; + + WebsiteManagementClient.WebSites.UpdateConfiguration(website.WebSpace, website.Name, update); + } + + /// + /// Sets a connection string for a website. + /// + /// Name of the website. + /// Connection string key. + /// Value for the connection string. + /// Type of connection string. + public void SetConnectionString(string name, string key, string value, Utilities.DatabaseType connectionStringType) + { + Utilities.Site website = GetWebsite(name); + + var update = WebsiteManagementClient.WebSites.GetConfiguration(website.WebSpace, website.Name).ToUpdate(); + + var csToUpdate = update.ConnectionStrings.FirstOrDefault(cs => cs.Name.Equals(key, StringComparison.OrdinalIgnoreCase)); + if (csToUpdate == null) + { + csToUpdate = new WebSiteUpdateConfigurationParameters.ConnectionStringInfo + { + ConnectionString = value, + Name = key, + Type = (ConnectionStringType)Enum.Parse(typeof(ConnectionStringType), connectionStringType.ToString(), ignoreCase: true), + }; + update.ConnectionStrings.Add(csToUpdate); + } + else + { + csToUpdate.ConnectionString = value; + csToUpdate.Type = (ConnectionStringType)Enum.Parse(typeof(ConnectionStringType), connectionStringType.ToString(), ignoreCase: true); + } + + WebsiteManagementClient.WebSites.UpdateConfiguration(website.WebSpace, website.Name, update); + } + + /// + /// Enables website diagnostic. + /// + /// The website name + /// Flag for webServerLogging + /// Flag for detailedErrorMessages + /// Flag for failedRequestTracing + public void EnableSiteDiagnostic( + string name, + bool webServerLogging, + bool detailedErrorMessages, + bool failedRequestTracing) + { + SetSiteDiagnosticsSettings(name, webServerLogging, detailedErrorMessages, failedRequestTracing, true); + } + + /// + /// Disables site diagnostic. + /// + /// The website name + /// Flag for webServerLogging + /// Flag for detailedErrorMessages + /// Flag for failedRequestTracing + public void DisableSiteDiagnostic( + string name, + bool webServerLogging, + bool detailedErrorMessages, + bool failedRequestTracing) + { + SetSiteDiagnosticsSettings(name, webServerLogging, detailedErrorMessages, failedRequestTracing, false); + } + + /// + /// Enables application diagnostic on website slot. + /// + /// The website name + /// The application log output, FileSystem or StorageTable + /// The diagnostic setting properties + /// The website slot name + public void EnableApplicationDiagnostic( + string name, + WebsiteDiagnosticOutput output, + Dictionary properties, + string slot) + { + SetApplicationDiagnosticsSettings(SetWebsiteName(name, slot), output, true, properties); + } + + /// + /// Disables application diagnostic. + /// + /// The website name + /// The application log output, FileSystem or StorageTable + /// The website slot name + public void DisableApplicationDiagnostic(string name, WebsiteDiagnosticOutput output, string slot) + { + SetApplicationDiagnosticsSettings(SetWebsiteName(name, slot), output, false); + } + + /// + /// Enables application diagnostic on website slot. + /// + /// The website name + /// The application log output, FileSystem or StorageTable + /// The diagnostic setting properties + public void EnableApplicationDiagnostic( + string name, + WebsiteDiagnosticOutput output, + Dictionary properties) + { + SetApplicationDiagnosticsSettings(name, output, true, properties); + } + + /// + /// Disables application diagnostic. + /// + /// The website name + /// The application log output, FileSystem or StorageTable + public void DisableApplicationDiagnostic(string name, WebsiteDiagnosticOutput output) + { + SetApplicationDiagnosticsSettings(name, output, false); + } + + /// + /// Lists available website locations. + /// + /// List of location names + public List ListAvailableLocations() + { + var webspacesGeoRegions = WebsiteManagementClient.WebSpaces.List() + .WebSpaces.Select(w => w.GeoRegion); + + var availableRegionsResponse = WebsiteManagementClient.WebSpaces.ListGeoRegions(); + + return availableRegionsResponse.GeoRegions.Select(r => r.Name).Union(webspacesGeoRegions).ToList(); + } + + /// + /// Gets the default website DNS suffix for the current environment. + /// + /// The website DNS suffix + public string GetWebsiteDnsSuffix() + { + return WebsiteManagementClient.WebSpaces.GetDnsSuffix().DnsSuffix; + } + + /// + /// Gets the default location for websites. + /// + /// The default location name. + public string GetDefaultLocation() + { + return ListAvailableLocations().First(); + } + + /// + /// Get a list of the user names configured to publish to the space. + /// + /// The list of user names. + public IList ListPublishingUserNames() + { + return WebsiteManagementClient.WebSpaces.ListPublishingUsers() + .Users.Select(u => u.Name).Where(n => !string.IsNullOrEmpty(n)).ToList(); + } + + /// + /// Get a list of historic metrics for the site. + /// + /// The website name + /// List of metrics names to retrieve. See metric definitions for supported names + /// Slot name + /// Start date of the requested period + /// End date of the requested period + /// Time grains for the metrics. + /// Include details for the server instances in which the site is running. + /// Represent the metrics for the hostnames that receive the traffic at the current slot. + /// If swap occured in the middle of the period mereics will be merged + /// The list of site metrics for the specified period. + public IList GetHistoricalUsageMetrics(string siteName, string slot, IList metricNames, + DateTime? starTime, DateTime? endTime, string timeGrain, bool instanceDetails, bool slotView) + { + Utilities.Site website = null; + + if (!string.IsNullOrEmpty(slot)) + { + website = GetWebsite(siteName, slot); + } + else + { + website = GetWebsite(siteName); + } + + return WebsiteManagementClient.WebSites.GetHistoricalUsageMetrics(website.WebSpace, website.Name, + new WebSiteGetHistoricalUsageMetricsParameters() + { + StartTime = starTime, + EndTime = endTime, + MetricNames = metricNames, + TimeGrain = timeGrain, + IncludeInstanceBreakdown = instanceDetails, + SlotView = slotView + }).ToMetricResponses(); + } + + /// + /// Checks if a website exists or not. + /// + /// The website name + /// True if exists, false otherwise + public bool WebsiteExists(string name) + { + Utilities.Site website = null; + + try + { + website = GetWebsite(name); + } + catch + { + // Ignore exception. + } + + return website != null; + } + + /// + /// Checks if a website slot exists or not. + /// + /// The website name + /// The website slot name + /// True if exists, false otherwise + public bool WebsiteExists(string name, string slot) + { + Utilities.Site website = null; + + try + { + website = GetWebsite(name, slot); + } + catch + { + // Ignore exception. + } + + return website != null; + } + + /// + /// Updates a website compute mode. + /// + /// The website to update + public void UpdateWebsiteComputeMode(Utilities.Site websiteToUpdate) + { + WebsiteManagementClient.WebSites.Update( + websiteToUpdate.WebSpace, + websiteToUpdate.Name, + new WebSiteUpdateParameters + { + // Set the following 3 collection properties to null since by default they are empty lists, + // which will clear the corresponding settings of the web site, thus results in a 404 when browsing the web site. + HostNames = null, + HostNameSslStates = null, + ServerFarm = null + }); + } + + /// + /// Gets a website slot DNS name. + /// + /// The website name + /// The slot name + /// the slot DNS name + public string GetSlotDnsName(string name, string slot) + { + return string.Format(SlotFormat, name, slot); + } + + /// + /// Switches the given website slot with the production slot + /// + /// The webspace name + /// The website name + /// The website's first slot name + /// The website's second slot name + public void SwitchSlots(string webspaceName, string websiteName, string slot1, string slot2) + { + Debug.Assert(!string.IsNullOrEmpty(slot1)); + Debug.Assert(!string.IsNullOrEmpty(slot2)); + + WebsiteManagementClient.WebSites.SwapSlots(webspaceName, websiteName, slot1, slot2); + } + + /// + /// Gets the slot name from the website name. + /// + /// The website name + /// The slot name + public string GetSlotName(string name) + { + string slotName = null; + if (!string.IsNullOrEmpty(name)) + { + if (name.Contains('(') && name.Contains(')')) + { + string[] split = name.Split('('); + slotName = split[1].TrimEnd(')').ToLower(); + } + } + + return slotName; + } + + /// + /// Checks whether a website name is available or not. + /// + /// The website name + /// True means available, false otherwise + public bool CheckWebsiteNameAvailability(string name) + { + return WebsiteManagementClient.WebSites.IsHostnameAvailable(name).IsAvailable; + } + + #region WebDeploy + + /// + /// Build a Visual Studio web project and generate a WebDeploy package. + /// + /// The project file. + /// The configuration of the build, like Release or Debug. + /// The build log file if there is any error. + /// The full path of the generated WebDeploy package. + public string BuildWebProject(string projectFile, string configuration, string logFile) + { + ProjectCollection pc = new ProjectCollection(); + Project project = pc.LoadProject(projectFile); + + // Use a file logger to store detailed build info. + FileLogger fileLogger = new FileLogger(); + fileLogger.Parameters = string.Format("logfile={0}", logFile); + fileLogger.Verbosity = LoggerVerbosity.Diagnostic; + + // Set the configuration used by MSBuild. + project.SetProperty("Configuration", configuration); + + // Set this property use "managedRuntimeVersion=v4.0". + // Otherwise, WebDeploy will fail becasue Azure Web Site is expecting v4.0. + project.SetProperty("VisualStudioVersion", "11.0"); + + // Build the project. + var buildSucceed = project.Build("Package", new ILogger[] { fileLogger }); + + if (buildSucceed) + { + // If build succeeds, delete the build.log file since there is no use of it. + File.Delete(logFile); + return Path.Combine(Path.GetDirectoryName(projectFile), "obj", configuration, "Package", Path.GetFileNameWithoutExtension(projectFile) + ".zip"); + } + else + { + // If build fails, tell the user to look at the build.log file. + throw new Exception(string.Format(Resources.WebProjectBuildFailTemplate, logFile)); + } + } + + /// + /// Gets the website WebDeploy publish profile. + /// + /// Website name. + /// Slot name. By default is null. + /// The publish profile. + public WebSiteGetPublishProfileResponse.PublishProfile GetWebDeployPublishProfile(string websiteName, string slot = null) + { + var site = this.GetWebsite(websiteName); + + var response = WebsiteManagementClient.WebSites.GetPublishProfile(site.WebSpace, SetWebsiteName(websiteName, slot)); + + foreach (var profile in response) + { + if (string.Compare(profile.PublishMethod, Resources.WebDeployKeywordInWebSitePublishProfile) == 0) + { + return profile; + } + } + + return null; + } + + /// + /// Publish a WebDeploy package folder to a web site. + /// + /// The name of the web site. + /// The name of the slot. + /// The WebDeploy package. + /// The connection strings to overwrite the ones in the Web.config file. + /// Skip app data + /// Do not delete files at destination + public void PublishWebProject(string websiteName, string slot, string package, Hashtable connectionStrings, bool skipAppData, bool doNotDelete) + { + if (File.GetAttributes(package).HasFlag(FileAttributes.Directory)) + { + PublishWebProjectFromPackagePath(websiteName, slot, package, connectionStrings, skipAppData, doNotDelete); + } + else + { + PublishWebProjectFromPackageFile(websiteName, slot, package, connectionStrings, skipAppData, doNotDelete); + } + } + + /// + /// Publish a WebDeploy package zip file to a web site. + /// + /// The name of the web site. + /// The name of the slot. + /// The WebDeploy package zip file. + /// The connection strings to overwrite the ones in the Web.config file. + /// Skip app data + /// Do not delete files at destination + private void PublishWebProjectFromPackageFile(string websiteName, string slot, string package, Hashtable connectionStrings, bool skipAppData, bool doNotDelete) + { + DeploymentBaseOptions remoteBaseOptions = CreateRemoteDeploymentBaseOptions(websiteName, slot); + DeploymentBaseOptions localBaseOptions = new DeploymentBaseOptions(); + + SetWebDeployToSkipAppData(skipAppData, localBaseOptions, remoteBaseOptions); + + DeploymentProviderOptions remoteProviderOptions = new DeploymentProviderOptions(DeploymentWellKnownProvider.Auto); + + using (var deployment = DeploymentManager.CreateObject(DeploymentWellKnownProvider.Package, package, localBaseOptions)) + { + DeploymentSyncParameter providerPathParameter = new DeploymentSyncParameter( + "Provider Path Parameter", + "Provider Path Parameter", + SetWebsiteNameForWebDeploy(websiteName, slot), + null); + DeploymentSyncParameterEntry iisAppEntry = new DeploymentSyncParameterEntry( + DeploymentSyncParameterEntryKind.ProviderPath, + DeploymentWellKnownProvider.IisApp.ToString(), + ".*", + null); + DeploymentSyncParameterEntry setAclEntry = new DeploymentSyncParameterEntry( + DeploymentSyncParameterEntryKind.ProviderPath, + DeploymentWellKnownProvider.SetAcl.ToString(), + ".*", + null); + providerPathParameter.Add(iisAppEntry); + providerPathParameter.Add(setAclEntry); + deployment.SyncParameters.Add(providerPathParameter); + + // Replace the connection strings in Web.config with the ones user specifies from the cmdlet. + ReplaceConnectionStrings(deployment, connectionStrings); + + DeploymentSyncOptions syncOptions = new DeploymentSyncOptions + { + DoNotDelete = doNotDelete + }; + + deployment.SyncTo(remoteProviderOptions, remoteBaseOptions, syncOptions); + } + } + + /// + /// Publish a WebDeploy package zip file to a web site. + /// + /// The name of the web site. + /// The name of the slot. + /// The WebDeploy package zip file. + /// The connection strings to overwrite the ones in the Web.config file. + /// Skip app data + /// Do not delete files at destination + private void PublishWebProjectFromPackagePath(string websiteName, string slot, string package, Hashtable connectionStrings, bool skipAppData, bool doNotDelete) + { + DeploymentBaseOptions remoteBaseOptions = CreateRemoteDeploymentBaseOptions(websiteName, slot); + DeploymentBaseOptions localBaseOptions = new DeploymentBaseOptions(); + + SetWebDeployToSkipAppData(skipAppData, localBaseOptions, remoteBaseOptions); + + using (var deployment = DeploymentManager.CreateObject(DeploymentWellKnownProvider.ContentPath, package, localBaseOptions)) + { + ReplaceConnectionStrings(deployment, connectionStrings); + DeploymentSyncOptions syncOptions = new DeploymentSyncOptions + { + DoNotDelete = doNotDelete + }; + deployment.SyncTo(DeploymentWellKnownProvider.ContentPath, SetWebsiteNameForWebDeploy(websiteName, slot), remoteBaseOptions, syncOptions); + } + } + + private static void SetWebDeployToSkipAppData(bool skipAppData, DeploymentBaseOptions localBaseOptions, DeploymentBaseOptions remoteBaseOptions) + { + if (skipAppData) + { + var skipAppDataDirective = new DeploymentSkipDirective("skipAppData", @"objectName=dirPath,absolutePath=.*app_data", true); + localBaseOptions.SkipDirectives.Add(skipAppDataDirective); + remoteBaseOptions.SkipDirectives.Add(skipAppDataDirective); + } + } + + /// + /// Parse the Web.config files to get the connection string names. + /// + /// The default Web.config file. + /// The additional Web.config file for the specificed configuration, like Web.Release.Config file. + /// An array of connection string names from the Web.config files. + public string[] ParseConnectionStringNamesFromWebConfig(string defaultWebConfigFile, string overwriteWebConfigFile) + { + var names = new List(); + var webConfigFiles = new string[] { defaultWebConfigFile, overwriteWebConfigFile }; + + foreach (var file in webConfigFiles) + { + XDocument xdoc = XDocument.Load(file); + names.AddRange(xdoc.Descendants("connectionStrings").SelectMany(css => css.Descendants("add")).Select(add => add.Attribute("name").Value)); + } + + return names.Distinct().ToArray(); + } + + /// + /// Create remote deployment base options using the web site publish profile. + /// + /// The remote deployment base options. + private DeploymentBaseOptions CreateRemoteDeploymentBaseOptions(string websiteName, string slot) + { + // Get the web site publish profile. + var publishProfile = GetWebDeployPublishProfile(websiteName, slot); + + DeploymentBaseOptions remoteBaseOptions = new DeploymentBaseOptions() + { + UserName = publishProfile.UserName, + Password = publishProfile.UserPassword, + ComputerName = string.Format(Resources.WebSiteWebDeployUriTemplate, publishProfile.PublishUrl, SetWebsiteNameForWebDeploy(websiteName, slot)), + AuthenticationType = "Basic", + TempAgent = false + }; + + return remoteBaseOptions; + } + + /// + /// Replace all the connection strings in the deployment. + /// + /// The deployment object. + /// Connection strings. + private void ReplaceConnectionStrings(DeploymentObject deployment, Hashtable connectionStrings) + { + if (connectionStrings != null) + { + foreach (var key in connectionStrings.Keys) + { + AddConnectionString(deployment, key.ToString(), connectionStrings[key].ToString()); + } + } + } + + /// + /// Add a connection string parameter to the deployment. + /// + /// The deployment object. + /// Connection string name. + /// Connection string value. + private void AddConnectionString(DeploymentObject deployment, string name, string value) + { + var deploymentSyncParameterName = string.Format("Connection String {0} Parameter", name); + DeploymentSyncParameter connectionStringParameter = new DeploymentSyncParameter( + deploymentSyncParameterName, + deploymentSyncParameterName, + value, + null); + DeploymentSyncParameterEntry connectionStringEntry = new DeploymentSyncParameterEntry( + DeploymentSyncParameterEntryKind.XmlFile, + @"\\web.config$", + string.Format(@"//connectionStrings/add[@name='{0}']/@connectionString", name), + null); + connectionStringParameter.Add(connectionStringEntry); + deployment.SyncParameters.Add(connectionStringParameter); + } + + #endregion WebDeploy + + #region WebJobs + + /// + /// Filters the web jobs. + /// + /// The web job filter options + /// The filtered web jobs list + public List FilterWebJobs(WebJobFilterOptions options) + { + //GetWebsite(options.Name, options.Slot); + + options.Name = SetWebsiteName(options.Name, options.Slot); + + IWebSiteExtensionsClient client = GetWebSiteExtensionsClient(options.Name); + List jobList = new List(); + bool isContinuousJobs = false; + bool isTriggeredJobs = false; + + if (string.IsNullOrEmpty(options.JobType)) + { + isContinuousJobs = true; + isTriggeredJobs = true; + } + else + { + if (string.Compare(options.JobType, WebJobType.Continuous.ToString(), StringComparison.CurrentCultureIgnoreCase) == 0) + { + isContinuousJobs = true; + } + else if (string.Compare(options.JobType, WebJobType.Triggered.ToString(), StringComparison.CurrentCultureIgnoreCase) == 0) + { + isTriggeredJobs = true; + } + else + { + throw new ArgumentOutOfRangeException("JobType"); + } + } + + if (!string.IsNullOrEmpty(options.JobName)) + { + if (isContinuousJobs && isTriggeredJobs) + { + throw new ArgumentOutOfRangeException("JobType"); + } + + WebJobBase webJob = + isContinuousJobs + ? (WebJobBase)client.ContinuousWebJobs.Get(options.JobName).ContinuousWebJob + : (WebJobBase)client.TriggeredWebJobs.Get(options.JobName).TriggeredWebJob; + + if (webJob == null) + { + throw new ArgumentOutOfRangeException("JobName"); + } + + jobList.Add(webJob); + } + else + { + if (isContinuousJobs) + { + jobList.AddRange(client.ContinuousWebJobs.List().ContinuousWebJobs); + } + + if (isTriggeredJobs) + { + jobList.AddRange(client.TriggeredWebJobs.List().TriggeredWebJobs); + } + } + + return jobList.Select(webJob => + webJob is ContinuousWebJob ? + (IPSWebJob)new PSContinuousWebJob(webJob as ContinuousWebJob) : + (IPSWebJob)new PSTriggeredWebJob(webJob as TriggeredWebJob)).ToList(); + } + + /// + /// Creates new web job for a website + /// + /// The website name + /// The website slot name + /// The web job name + /// The web job type + /// The web job file name + /// The created web job instance + public IPSWebJob CreateWebJob(string name, string slot, string jobName, WebJobType jobType, string jobFile) + { + name = SetWebsiteName(name, slot); + IWebSiteExtensionsClient client = GetWebSiteExtensionsClient(name); + + string fileName = Path.GetFileName(jobFile); + bool isZipFile = Path.GetExtension(jobFile).ToLower() == ".zip"; + + switch (jobType) + { + case WebJobType.Continuous: + if (isZipFile) + { + client.ContinuousWebJobs.UploadZip(jobName, fileName, File.OpenRead(jobFile)); + } + else + { + client.ContinuousWebJobs.UploadFile(jobName, fileName, File.OpenRead(jobFile)); + } + break; + + case WebJobType.Triggered: + if (isZipFile) + { + client.TriggeredWebJobs.UploadZip(jobName, fileName, File.OpenRead(jobFile)); + } + else + { + client.TriggeredWebJobs.UploadFile(jobName, fileName, File.OpenRead(jobFile)); + } + break; + + default: + break; + } + + //Thread.Sleep(UploadJobWaitTime); + + var options = new WebJobFilterOptions() { Name = name, Slot = slot, JobName = jobName, JobType = jobType.ToString() }; + + try + { + return FilterWebJobs(options).FirstOrDefault(); + } + catch (CloudException e) + { + if (e.Response.StatusCode == HttpStatusCode.NotFound) + { + throw new ArgumentException(Resources.InvalidJobFile); + } + + throw; + } + } + + /// + /// Deletes a web job for a website. + /// + /// The website name + /// The slot name + /// The web job name + /// The web job type + public void DeleteWebJob(string name, string slot, string jobName, WebJobType jobType) + { + name = SetWebsiteName(name, slot); + IWebSiteExtensionsClient client = GetWebSiteExtensionsClient(name); + + if (jobType == WebJobType.Continuous) + { + client.ContinuousWebJobs.Delete(jobName); + } + else if (jobType == WebJobType.Triggered) + { + client.TriggeredWebJobs.Delete(jobName); + } + else + { + throw new ArgumentException("jobType"); + } + } + + /// + /// Starts a web job in a website. + /// + /// The website name + /// The slot name + /// The web job name + /// The web job type + public void StartWebJob(string name, string slot, string jobName, WebJobType jobType) + { + name = SetWebsiteName(name, slot); + IWebSiteExtensionsClient client = GetWebSiteExtensionsClient(name); + + if (jobType == WebJobType.Continuous) + { + client.ContinuousWebJobs.Start(jobName); + } + else + { + client.TriggeredWebJobs.Run(jobName); + } + } + + /// + /// Stops a web job in a website. + /// + /// The website name + /// The slot name + /// The web job name + /// The web job type + public void StopWebJob(string name, string slot, string jobName, WebJobType jobType) + { + name = SetWebsiteName(name, slot); + IWebSiteExtensionsClient client = GetWebSiteExtensionsClient(name); + + if (jobType == WebJobType.Continuous) + { + client.ContinuousWebJobs.Stop(jobName); + } + else + { + throw new InvalidOperationException(); + } + } + + /// + /// Filters a web job history. + /// + /// The web job filter options + /// The filtered web jobs run list + public List FilterWebJobHistory(WebJobHistoryFilterOptions options) + { + options.Name = SetWebsiteName(options.Name, options.Slot); + IWebSiteExtensionsClient client = GetWebSiteExtensionsClient(options.Name); + var result = new List(); + + if (options.Latest) + { + result.Add(client.TriggeredWebJobs.Get(options.JobName).TriggeredWebJob.LatestRun); + } + else if (!string.IsNullOrEmpty(options.RunId)) + { + result.Add(client.TriggeredWebJobs.GetRun(options.JobName, options.RunId).TriggeredJobRun); + } + else + { + result.AddRange(client.TriggeredWebJobs.ListRuns(options.JobName)); + } + + return result; + } + + /// + /// Saves a web job logs to file. + /// + /// The website name + /// The slot name + /// The web job name + /// The web job type + /// The output file name + /// The job run id + public void SaveWebJobLog(string name, string slot, string jobName, WebJobType jobType, string output, string runId) + { + if (jobType == WebJobType.Continuous && !string.IsNullOrEmpty(runId)) + { + throw new InvalidOperationException(); + } + name = SetWebsiteName(name, slot); + IWebSiteExtensionsClient client = GetWebSiteExtensionsClient(name); + + throw new NotImplementedException(); + } + + /// + /// Saves a web job logs to file. + /// + /// The website name + /// The slot name + /// The web job name + /// The web job type + public void SaveWebJobLog(string name, string slot, string jobName, WebJobType jobType) + { + const string defaultLogFile = ".\\jobLog.zip"; + SaveWebJobLog(name, slot, jobName, jobType, defaultLogFile, null); + } + + #endregion WebJobs + + #region WebHosting Plans + + /// + /// Return web hosting plans in the subscription + /// + /// web hosting plans + public List ListWebHostingPlans() + { + return ListWebSpaces().SelectMany(space => ListWebHostingPlans(space.Name)).ToList(); + } + + /// + /// Return web hosting plans in the subscription + /// + /// web hosting plans + public List ListWebHostingPlans(string webSpaceName) + { + return WebsiteManagementClient.WebHostingPlans.List(webSpaceName).WebHostingPlans.Select(p => p.ToWebHostingPlan(webSpaceName)).ToList(); + } + + /// + /// Get web hosting plan by name + /// + /// web space name where plan belongs + /// web hosting plan name + /// web hosting plan object + public Utilities.WebHostingPlan GetWebHostingPlan(string webSpaceName, string planName) + { + // TODO use cache + var allPlans = ListWebHostingPlans(webSpaceName); + return allPlans.FirstOrDefault(p => p.Name.Equals(planName, StringComparison.InvariantCultureIgnoreCase)); + } + + /// + /// Get a list of historic metrics for the web hostin plan. + /// + /// web space name where plan belongs + /// The web hosting plan name + /// List of metrics names to retrieve. See metric definitions for supported names + /// Start date of the requested period + /// End date of the requested period + /// Time grains for the metrics. + /// Include details for the server instances in which the site is running. + /// The list of site metrics for the specified period. + public IList GetPlanHistoricalUsageMetrics(string webSpaceName, string planName, IList metricNames, + DateTime? starTime, DateTime? endTime, string timeGrain, bool instanceDetails) + { + Utilities.WebHostingPlan plan = GetWebHostingPlan(webSpaceName, planName); + + return WebsiteManagementClient.WebHostingPlans.GetHistoricalUsageMetrics(plan.WebSpace, planName, + new WebHostingPlanGetHistoricalUsageMetricsParameters + { + StartTime = starTime, + EndTime = endTime, + MetricNames = metricNames, + TimeGrain = timeGrain, + IncludeInstanceBreakdown = instanceDetails, + }).ToMetricResponses(); + } + + #endregion WebHosting Plans + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/packages.config b/src/ServiceManagement/Services/Commands.Utilities/packages.config new file mode 100644 index 000000000000..bb5d0a608aa4 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/packages.config @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ServiceManagement/Services/Commands/CloudService/Development/DisableAzureRemoteDesktop.cs b/src/ServiceManagement/Services/Commands/CloudService/Development/DisableAzureRemoteDesktop.cs new file mode 100644 index 000000000000..54afb4426cd1 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/CloudService/Development/DisableAzureRemoteDesktop.cs @@ -0,0 +1,120 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService.AzureTools; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema; +using ConfigurationSetting = Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema.ConfigurationSetting; + +namespace Microsoft.WindowsAzure.Commands.CloudService.Development +{ + /// + /// Enable Remote Desktop by adding appropriate imports and settings to + /// ServiceDefinition.csdef and ServiceConfiguration.*.cscfg + /// + [Cmdlet(VerbsLifecycle.Disable, "AzureServiceProjectRemoteDesktop"), OutputType(typeof(bool))] + public class DisableAzureServiceProjectRemoteDesktopCommand : AzurePSCmdlet + { + [Parameter(Position = 0, Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + AzureTool.Validate(); + + DisableRemoteDesktop(); + } + + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public void DisableRemoteDesktop() + { + CloudServiceProject service = new CloudServiceProject(CommonUtilities.GetServiceRootPath(CurrentPath()), null); + WebRole[] webRoles = service.Components.Definition.WebRole ?? new WebRole[0]; + WorkerRole[] workerRoles = service.Components.Definition.WorkerRole ?? new WorkerRole[0]; + + string forwarderName = GetForwarderName(webRoles, workerRoles); + if (forwarderName != null) + { + UpdateServiceConfigurations(service, forwarderName); + service.Components.Save(service.Paths); + } + + if (PassThru) + { + WriteObject(true); + } + } + + private static string GetForwarderName(WebRole[] webRoles, WorkerRole[] workerRoles) + { + string forwarderName = null; + WorkerRole workerForwarder = workerRoles.FirstOrDefault(r => r.Imports != null && + r.Imports.Any(i => i.moduleName == "RemoteForwarder")); + if (workerForwarder != null) + { + // a worker role has the forwarder + forwarderName = workerForwarder.name; + } + else + { + WebRole webForwarder = webRoles.FirstOrDefault(r => r.Imports != null && + r.Imports.Any(i => i.moduleName == "RemoteForwarder")); + if (webForwarder != null) + { + // a web role has the forwarder + forwarderName = webForwarder.name; + } + } + + return forwarderName; + } + + private void UpdateServiceConfigurations(CloudServiceProject service, string forwarderName) + { + foreach (ServiceConfiguration config in new[] { service.Components.LocalConfig, service.Components.CloudConfig }) + { + foreach (RoleSettings role in config.Role) + { + if (role.ConfigurationSettings != null) + { + ConfigurationSetting setting = role.ConfigurationSettings. + FirstOrDefault(t => t.name.Equals( + "Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled")); + if (setting != null) + { + setting.value = "false"; + } + + if (role.name == forwarderName) + { + ConfigurationSetting forwarderSetting = role.ConfigurationSettings. + FirstOrDefault(t => t.name.Equals( + "Microsoft.WindowsAzure.Plugins.RemoteForwarder.Enabled")); + if (forwarderSetting != null) + { + forwarderSetting.value = "false"; + } + } + } + } + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands/CloudService/Development/EnableAzureMemcacheRole.cs b/src/ServiceManagement/Services/Commands/CloudService/Development/EnableAzureMemcacheRole.cs new file mode 100644 index 000000000000..e28a437e4eb0 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/CloudService/Development/EnableAzureMemcacheRole.cs @@ -0,0 +1,403 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Security.Permissions; +using System.Xml.Linq; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService.AzureTools; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService.Scaffolding; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.CloudService.Development +{ + using ConfigConfigurationSetting = Utilities.Common.XmlSchema.ServiceConfigurationSchema.ConfigurationSetting; + using DefinitionConfigurationSetting = Utilities.Common.XmlSchema.ServiceDefinitionSchema.ConfigurationSetting; + + /// + /// Enables memcache for specific role. + /// + [Cmdlet(VerbsLifecycle.Enable, "AzureMemcacheRole"), OutputType(typeof(bool))] + public class EnableAzureMemcacheRoleCommand : AzurePSCmdlet + { + /// + /// The role name to edit. + /// + [Parameter(Position = 0, Mandatory = false, ValueFromPipelineByPropertyName = true)] + [Alias("rn")] + [ValidateNotNullOrEmpty] + public string RoleName { get; set; } + + /// + /// The dedicated caching worker role name. + /// + [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true)] + [Alias("cn")] + [ValidateNotNullOrEmpty] + public string CacheWorkerRoleName { get; set; } + + [Parameter(Position = 2, Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + /// + /// Cache runtime version + /// + [Parameter(Position = 3, Mandatory = false, ValueFromPipelineByPropertyName = true)] + [Alias("cv")] + public string CacheRuntimeVersion { get; set; } + + public EnableAzureMemcacheRoleCommand() + { + CacheRuntimeVersion = AzureTool.GetAzureSdkVersion(); + } + + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + string rootPath = CommonUtilities.GetServiceRootPath(CurrentPath()); + RoleName = string.IsNullOrEmpty(RoleName) ? CommonUtilities.GetRoleName(rootPath, CurrentPath()) : RoleName; + + EnableAzureMemcacheRoleProcess(this.RoleName, this.CacheWorkerRoleName, CommonUtilities.GetServiceRootPath(CurrentPath())); + } + + /// + /// Process for enabling memcache for web roles. + /// + /// The web role name + /// The cache worker role name + /// The root path of the services + /// The resulted message + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public WebRole EnableAzureMemcacheRoleProcess(string roleName, string cacheWorkerRoleName, string rootPath) + { + CloudServiceProject cloudServiceProject = new CloudServiceProject(rootPath, null); + + if (string.IsNullOrEmpty(cacheWorkerRoleName)) + { + WorkerRole defaultCache = cloudServiceProject.Components.Definition.WorkerRole.FirstOrDefault( + w => w.Imports != null && w.Imports.Any(i => i.moduleName.Equals(Resources.CachingModuleName))); + + if (defaultCache == null) + { + throw new Exception(Resources.NoCacheWorkerRoles); + } + + cacheWorkerRoleName = defaultCache.name; + } + + // Verify cache worker role exists + if (!cloudServiceProject.Components.RoleExists(cacheWorkerRoleName)) + { + throw new Exception(string.Format(Resources.RoleNotFoundMessage, cacheWorkerRoleName)); + } + + WorkerRole cacheWorkerRole = cloudServiceProject.Components.GetWorkerRole(cacheWorkerRoleName); + + // Verify that the cache worker role has proper caching configuration. + if (!IsCacheWorkerRole(cacheWorkerRole)) + { + throw new Exception(string.Format(Resources.NotCacheWorkerRole, cacheWorkerRoleName)); + } + + // Verify that user is not trying to enable cache on a cache worker role. + if (roleName.Equals(cacheWorkerRole)) + { + throw new Exception(string.Format(Resources.InvalidCacheRoleName, roleName)); + } + + // Verify role to enable cache on exists + if (!cloudServiceProject.Components.RoleExists(roleName)) + { + throw new Exception(string.Format(Resources.RoleNotFoundMessage, roleName)); + } + + // Verify that caching is not enabled for the role + if (IsCacheEnabled(cloudServiceProject.Components.GetRoleStartup(roleName))) + { + throw new Exception(string.Format(Resources.CacheAlreadyEnabledMessage, roleName)); + } + + // All validations passed, enable caching. + //EnableMemcache(roleName, cacheWorkerRoleName, ref message, ref cloudServiceProject); + var applyConfiguration = CacheConfigurationFactory.GetClientRoleConfigurationAction(CacheRuntimeVersion); + applyConfiguration(cloudServiceProject, roleName, cacheWorkerRoleName); + string message = string.Format( + Resources.EnableMemcacheMessage, + roleName, + cacheWorkerRoleName, + Resources.MemcacheEndpointPort); + + WriteVerbose(message); + + if (PassThru) + { + SafeWriteOutputPSObject(typeof(RoleSettings).FullName, Parameters.RoleName, roleName); + } + + return cloudServiceProject.Components.GetWebRole(roleName); + } + + /// + /// Main entry for enabling memcache. + /// + /// The web role name + /// The cache worker role name + /// The service root path + /// The resulted message + /// The azure service instance + /// The web role to enable caching one + private void EnableMemcache(string roleName, string cacheWorkerRoleName, ref string message, ref CloudServiceProject cloudServiceProject) + { + // Add MemcacheShim runtime installation. + cloudServiceProject.AddRoleRuntime(cloudServiceProject.Paths, roleName, Resources.CacheRuntimeValue, CacheRuntimeVersion); + + // Fetch web role information. + Startup startup = cloudServiceProject.Components.GetRoleStartup(roleName); + + // Assert that cache runtime is added to the runtime startup. + Debug.Assert(Array.Exists(CloudRuntime.GetRuntimeStartupTask(startup).Environment, + v => v.name.Equals(Resources.RuntimeTypeKey) && v.value.Contains(Resources.CacheRuntimeValue))); + + if (cloudServiceProject.Components.IsWebRole(roleName)) + { + WebRole webRole = cloudServiceProject.Components.GetWebRole(roleName); + webRole.LocalResources = GeneralUtilities.InitializeIfNull(webRole.LocalResources); + DefinitionConfigurationSetting[] configurationSettings = webRole.ConfigurationSettings; + + CachingConfigurationFactoryMethod( + cloudServiceProject, + roleName, + true, + cacheWorkerRoleName, + webRole.Startup, + webRole.Endpoints, + webRole.LocalResources, + ref configurationSettings, + CacheRuntimeVersion); + webRole.ConfigurationSettings = configurationSettings; + } + else + { + WorkerRole workerRole = cloudServiceProject.Components.GetWorkerRole(roleName); + workerRole.LocalResources = GeneralUtilities.InitializeIfNull(workerRole.LocalResources); + DefinitionConfigurationSetting[] configurationSettings = workerRole.ConfigurationSettings; + + CachingConfigurationFactoryMethod( + cloudServiceProject, + roleName, + false, + cacheWorkerRoleName, + workerRole.Startup, + workerRole.Endpoints, + workerRole.LocalResources, + ref configurationSettings, + CacheRuntimeVersion); + workerRole.ConfigurationSettings = configurationSettings; + } + + // Save changes + cloudServiceProject.Components.Save(cloudServiceProject.Paths); + + message = string.Format(Resources.EnableMemcacheMessage, roleName, cacheWorkerRoleName, Resources.MemcacheEndpointPort); + } + + /// + /// Factory method to apply memcache required configuration based on the installed SDK version. + /// + /// The azure service instance + /// The web role to enable caching on + /// Flag indicating if the provided role is web or not + /// The memcache worker role name + /// The role startup + /// The role endpoints + /// The role local resources + /// The role configuration settings + /// The current SDK version + private void CachingConfigurationFactoryMethod( + CloudServiceProject cloudServiceProject, + string roleName, + bool isWebRole, + string cacheWorkerRole, + Startup startup, + Endpoints endpoints, + LocalResources localResources, + ref DefinitionConfigurationSetting[] configurationSettings, + string sdkVersion) + { + switch (sdkVersion) + { + case SDKVersion.Version180: + Version180Configuration( + cloudServiceProject, + roleName, + isWebRole, + cacheWorkerRole, + startup, + endpoints, + localResources, + ref configurationSettings); + break; + + default: + throw new Exception(string.Format(Resources.AzureSdkVersionNotSupported, + Resources.MinSupportAzureSdkVersion, Resources.MaxSupportAzureSdkVersion)); + } + } + + /// + /// Applies required configuration for enabling cache in SDK 1.8.0 version by: + /// * Add MemcacheShim runtime installation. + /// * Add startup task to install memcache shim on the client side. + /// * Add default memcache internal endpoint. + /// * Add cache diagnostic to local resources. + /// * Add ClientDiagnosticLevel setting to service configuration. + /// * Adjust web.config to enable auto discovery for the caching role. + /// + /// The azure service instance + /// The web role to enable caching on + /// Flag indicating if the provided role is web or not + /// The memcache worker role name + /// The role startup + /// The role endpoints + /// The role local resources + /// The role configuration settings + private void Version180Configuration( + CloudServiceProject cloudServiceProject, + string roleName, + bool isWebRole, + string cacheWorkerRole, + Startup startup, + Endpoints endpoints, + LocalResources localResources, + ref DefinitionConfigurationSetting[] configurationSettings) + { + if (isWebRole) + { + // Generate cache scaffolding for web role + cloudServiceProject.GenerateScaffolding(Path.Combine(Resources.CacheScaffolding, RoleType.WebRole.ToString()), + roleName, new Dictionary()); + + // Adjust web.config to enable auto discovery for the caching role. + string webCloudConfigPath = Path.Combine(cloudServiceProject.Paths.RootPath, roleName, Resources.WebCloudConfig); + string webConfigPath = Path.Combine(cloudServiceProject.Paths.RootPath, roleName, Resources.WebConfigTemplateFileName); + + UpdateWebConfig(roleName, cacheWorkerRole, webCloudConfigPath); + UpdateWebConfig(roleName, cacheWorkerRole, webConfigPath); + } + else + { + // Generate cache scaffolding for worker role + Dictionary parameters = new Dictionary(); + parameters[ScaffoldParams.RoleName] = cacheWorkerRole; + + cloudServiceProject.GenerateScaffolding(Path.Combine(Resources.CacheScaffolding, RoleType.WorkerRole.ToString()), + roleName, parameters); + } + + // Add default memcache internal endpoint. + InternalEndpoint memcacheEndpoint = new InternalEndpoint + { + name = Resources.MemcacheEndpointName, + protocol = InternalProtocol.tcp, + port = Resources.MemcacheEndpointPort + }; + endpoints.InternalEndpoint = GeneralUtilities.ExtendArray(endpoints.InternalEndpoint, memcacheEndpoint); + + // Enable cache diagnostic + LocalStore localStore = new LocalStore + { + name = Resources.CacheDiagnosticStoreName, + cleanOnRoleRecycle = false + }; + localResources.LocalStorage = GeneralUtilities.ExtendArray(localResources.LocalStorage, localStore); + + DefinitionConfigurationSetting diagnosticLevel = new DefinitionConfigurationSetting { name = Resources.CacheClientDiagnosticLevelAssemblyName }; + configurationSettings = GeneralUtilities.ExtendArray(configurationSettings, diagnosticLevel); + + // Add ClientDiagnosticLevel setting to service configuration. + AddClientDiagnosticLevelToConfig(cloudServiceProject.Components.GetCloudConfigRole(roleName)); + AddClientDiagnosticLevelToConfig(cloudServiceProject.Components.GetLocalConfigRole(roleName)); + } + + private static void AddClientDiagnosticLevelToConfig(RoleSettings roleSettings) + { + ConfigConfigurationSetting clientDiagnosticLevel = new ConfigConfigurationSetting { name = Resources.ClientDiagnosticLevelName, value = Resources.ClientDiagnosticLevelValue }; + roleSettings.ConfigurationSettings = GeneralUtilities.ExtendArray(roleSettings.ConfigurationSettings, clientDiagnosticLevel); + } + + /// + /// Updates the web.cloud.config with to auto-discover the cache role. + /// + /// The role name + /// The cache worker role name + /// The azure service instance for the role + private void UpdateWebConfig(string roleName, string cacheWorkerRoleName, string webConfigPath) + { + XDocument webConfig = XDocument.Load(webConfigPath); + + Dictionary parameters = new Dictionary(); + parameters[ScaffoldParams.RoleName] = cacheWorkerRoleName; + string autoDiscoveryConfig = Scaffold.ReplaceParameter(Resources.CacheAutoDiscoveryConfig, parameters); + + // Adding the auto-discovery is sensetive to the placement of the nodes. The first node which is + // must be added at the first and the last node which is dataCacheClients must be added as last element. + XElement autoDiscoverXElement = XElement.Parse(autoDiscoveryConfig); + webConfig.Element("configuration").AddFirst(autoDiscoverXElement.FirstNode); + webConfig.Element("configuration").Add(autoDiscoverXElement.LastNode); + Debug.Assert(webConfig.Element("configuration").FirstNode.Ancestors("section").Attributes("name") != null); + Debug.Assert(webConfig.Element("configuration").LastNode.Ancestors("tracing").Attributes("sinkType") != null); + webConfig.Save(webConfigPath); + } + + /// + /// Checks if memcache is already enabled or not for the given role startup. + /// It does this by checking the role startup task. + /// + /// The role startup + /// Either enabled or not + private bool IsCacheEnabled(Startup startup) + { + if (startup.Task != null) + { + return Array.Exists(CloudRuntime.GetRuntimeStartupTask(startup).Environment, + v => v.name.Equals(Resources.RuntimeTypeKey) && v.value.Contains(Resources.CacheRuntimeValue)); + } + + return false; + } + + /// + /// Checks if the worker role is configured as caching worker role. + /// + /// The worker role object + /// True if its caching worker role, false if not + private bool IsCacheWorkerRole(WorkerRole workerRole) + { + if (workerRole.Imports != null) + { + return Array.Exists(workerRole.Imports, i => i.moduleName == Resources.CachingModuleName); + } + + return false; + } + } +} diff --git a/src/ServiceManagement/Services/Commands/CloudService/Development/EnableAzureRemoteDesktop.cs b/src/ServiceManagement/Services/Commands/CloudService/Development/EnableAzureRemoteDesktop.cs new file mode 100644 index 000000000000..2f7d9865e3c9 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/CloudService/Development/EnableAzureRemoteDesktop.cs @@ -0,0 +1,287 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Runtime.InteropServices; +using System.Security; +using System.Security.Cryptography.Pkcs; +using System.Security.Cryptography.X509Certificates; +using System.Security.Permissions; +using System.Text; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService.AzureTools; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Certificate = Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema.Certificate; +using ConfigurationSetting = Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema.ConfigurationSetting; + +namespace Microsoft.WindowsAzure.Commands.CloudService.Development +{ + /// + /// Enable Remote Desktop by adding appropriate imports and settings to + /// ServiceDefinition.csdef and ServiceConfiguration.*.cscfg + /// + [Cmdlet(VerbsLifecycle.Enable, "AzureServiceProjectRemoteDesktop"), OutputType(typeof(bool))] + public class EnableAzureServiceProjectRemoteDesktopCommand : AzurePSCmdlet + { + [Parameter(Position = 0, Mandatory = true)] + [Alias("user")] + public string Username { get; set; } + + [Parameter(Position = 1, Mandatory = true)] + [Alias("pwd")] + public SecureString Password { get; set; } + + [Parameter(Position = 2, Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + AzureTool.Validate(); + + EnableRemoteDesktop(); + } + + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public void EnableRemoteDesktop() + { + Validate.ValidateStringIsNullOrEmpty(Username, "Username"); + if (Password == null) + { + throw new ArgumentNullException("Password"); + } + + string plainPassword = GetPlainPassword(); + if (!IsPasswordComplex(plainPassword)) + { + throw new ArgumentException(Resources.EnableAzureRemoteDesktopCommand_Enable_NeedComplexPassword); + } + + CloudServiceProject service = new CloudServiceProject(CommonUtilities.GetServiceRootPath(CurrentPath()), null); + WebRole[] webRoles = service.Components.Definition.WebRole ?? new WebRole[0]; + WorkerRole[] workerRoles = service.Components.Definition.WorkerRole ?? new WorkerRole[0]; + + string forwarderName = GetForwarderName(webRoles, workerRoles); + RemoveOtherRemoteForwarders(webRoles, workerRoles, forwarderName); + AddRemoteAccess(webRoles, workerRoles); + + X509Certificate2 cert = ChooseCertificate(); + Certificate certElement = new Certificate + { + name = "Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption", + thumbprintAlgorithm = ThumbprintAlgorithmTypes.sha1, + thumbprint = cert.Thumbprint + }; + string encryptedPassword = Encrypt(plainPassword, cert); + + UpdateServiceConfigurations(service, forwarderName, certElement, encryptedPassword); + service.Components.Save(service.Paths); + + if (PassThru) + { + WriteObject(true); + } + } + + private X509Certificate2 FindCertificate() + { + X509Store store = new X509Store(StoreName.My, System.Security.Cryptography.X509Certificates.StoreLocation.CurrentUser); + store.Open(OpenFlags.ReadOnly | OpenFlags.OpenExistingOnly); + return + store + .Certificates + .Cast() + .Where(c => c.FriendlyName == Resources.EnableRemoteDesktop_FriendlyCertificateName) + .FirstOrDefault(); + } + + private X509Certificate2 ChooseCertificate() + { + X509Certificate2 cert = FindCertificate(); + if (cert == null) + { + CsEncrypt csEncrypt = new CsEncrypt(AzureTool.GetAzureSdkBinDirectory()); + csEncrypt.CreateCertificate(); + cert = FindCertificate(); + } + return cert; + } + + private static bool IsPasswordComplex(string password) + { + const int ASCIIMax = 255; + + return (Convert.ToInt32(password.Any(char.IsUpper)) + + Convert.ToInt32(password.Any(char.IsLower)) + + Convert.ToInt32(password.Any(char.IsDigit)) + + Convert.ToInt32(password.Any(c => ((int)c) > ASCIIMax)) + + Convert.ToInt32(password.Any(char.IsLetterOrDigit)) >= 3) + && password.Length >= 6; + } + + private string Encrypt(string password, X509Certificate2 cert) + { + byte[] bytes = Encoding.UTF8.GetBytes(password); + EnvelopedCms envelopedCms = new EnvelopedCms(new ContentInfo(bytes)); + envelopedCms.Encrypt(new CmsRecipient(cert)); + return Convert.ToBase64String(envelopedCms.Encode()); + } + + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + private string GetPlainPassword() + { + IntPtr ptr = IntPtr.Zero; + string plainPassword = null; + try + { + ptr = Marshal.SecureStringToBSTR(Password); + plainPassword = Marshal.PtrToStringBSTR(ptr); + } + finally + { + Marshal.ZeroFreeBSTR(ptr); + } + + return plainPassword; + } + + private static string GetForwarderName(WebRole[] webRoles, WorkerRole[] workerRoles) + { + string forwarderName = null; + WorkerRole workerForwarder = workerRoles.FirstOrDefault(r => r.Imports != null && r.Imports.Any(i => i.moduleName == "RemoteForwarder")); + if (workerForwarder != null) + { + // a worker role has the forwarder + forwarderName = workerForwarder.name; + } + else + { + WebRole webForwarder = webRoles.FirstOrDefault(r => r.Imports != null && r.Imports.Any(i => i.moduleName == "RemoteForwarder")); + if (webForwarder != null) + { + // a web role has the forwarder + forwarderName = webForwarder.name; + } + else + { + // no role has the forwarder yet + WorkerRole firstWorkerRole = workerRoles.FirstOrDefault(); + if (firstWorkerRole != null) + { + firstWorkerRole.Imports = GeneralUtilities.Append(firstWorkerRole.Imports, new Import { moduleName = "RemoteForwarder" }); + forwarderName = firstWorkerRole.name; + } + else // no worker role, use a web role + { + WebRole firstWebRole = webRoles.FirstOrDefault(); + if (firstWebRole != null) + { + firstWebRole.Imports = GeneralUtilities.Append(firstWebRole.Imports, new Import { moduleName = "RemoteForwarder" }); + forwarderName = firstWebRole.name; + } + else + { + throw new InvalidOperationException(Resources.EnableAzureRemoteDesktop_Enable_NoRoles); + } + } + } + } + return forwarderName; + } + + private static void RemoveOtherRemoteForwarders(WebRole[] webRoles, WorkerRole[] workerRoles, string forwarderName) + { + // Remove RemoteForwarder from all but the chosen role + foreach (WebRole webRole in webRoles) + { + if (webRole.name != forwarderName && + webRole.Imports != null && + webRole.Imports.Any(i => i.moduleName == "RemoteForwarder")) + { + webRole.Imports = webRole.Imports.Where(i => i.moduleName != "RemoteForwarder").ToArray(); + } + } + foreach (WorkerRole workerRole in workerRoles) + { + if (workerRole.name != forwarderName && + workerRole.Imports != null && + workerRole.Imports.Any(i => i.moduleName == "RemoteForwarder")) + { + workerRole.Imports = workerRole.Imports.Where(i => i.moduleName != "RemoteForwarder").ToArray(); + } + } + } + + private static void AddRemoteAccess(WebRole[] webRoles, WorkerRole[] workerRoles) + { + // Add RemoteAccess to all roles + foreach (WebRole webRole in webRoles.Where(r => r.Imports == null || !r.Imports.Any(i => i.moduleName == "RemoteAccess"))) + { + webRole.Imports = GeneralUtilities.Append(webRole.Imports, new Import { moduleName = "RemoteAccess" }); + } + foreach (WorkerRole workerRole in workerRoles.Where(r => r.Imports == null || !r.Imports.Any(i => i.moduleName == "RemoteAccess"))) + { + workerRole.Imports = GeneralUtilities.Append(workerRole.Imports, new Import { moduleName = "RemoteAccess" }); + } + } + + private void UpdateServiceConfigurations(CloudServiceProject service, string forwarderName, Certificate certElement, string encryptedPassword) + { + foreach (ServiceConfiguration config in new[] { service.Components.LocalConfig, service.Components.CloudConfig }) + { + foreach (RoleSettings role in config.Role) + { + if (role.Certificates == null) + { + role.Certificates = new Certificate[0]; + } + + Certificate existingCert = role.Certificates.FirstOrDefault(c => c.name == certElement.name); + if (existingCert != null) + { + // ensure we're referencing the right cert + existingCert.thumbprint = certElement.thumbprint; + } + else + { + role.Certificates = role.Certificates.Concat(new[] { certElement }).ToArray(); + } + + Dictionary settings = new Dictionary(); + foreach (ConfigurationSetting setting in role.ConfigurationSettings) + { + settings[setting.name] = setting.value; + } + settings["Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled"] = "true"; + settings["Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername"] = Username; + settings["Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword"] = encryptedPassword; + settings["Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration"] = (DateTime.Now + TimeSpan.FromDays(365)).ToString("o"); + + if (role.name == forwarderName) + { + settings["Microsoft.WindowsAzure.Plugins.RemoteForwarder.Enabled"] = "true"; + } + + role.ConfigurationSettings = settings.Select(pair => new ConfigurationSetting { name = pair.Key, value = pair.Value }).ToArray(); + } + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands/CloudService/Development/GetAzureServiceProjectRoleRuntime.cs b/src/ServiceManagement/Services/Commands/CloudService/Development/GetAzureServiceProjectRoleRuntime.cs new file mode 100644 index 000000000000..9ec8be051c4a --- /dev/null +++ b/src/ServiceManagement/Services/Commands/CloudService/Development/GetAzureServiceProjectRoleRuntime.cs @@ -0,0 +1,56 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.CloudService.Development +{ + /// + /// Retrieve a list of role runtimes available in the cloud + /// + [Cmdlet(VerbsCommon.Get, "AzureServiceProjectRoleRuntime"), OutputType(typeof(List))] + public class GetAzureServiceProjectRoleRuntimeCommand : AzurePSCmdlet + { + [Parameter(Position = 0, Mandatory = false, ValueFromPipelineByPropertyName = true)] + public string Runtime { get; set; } + + /// + /// Retrieve the runtimes from the given manifest, or from the default cloud location, if none given. + /// The manifest parameter is mainly a testing hook. + /// + /// The runtime type to filter by + /// The path to the service in question + /// The path to the manifest file, if null, the default cloud manifest is used (test hook) + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public void GetAzureRuntimesProcess(string runtimeType, string manifest = null) + { + CloudRuntimeCollection runtimes; + CloudRuntimeCollection.CreateCloudRuntimeCollection(out runtimes, manifest); + WriteObject(runtimes.Where(p => string.IsNullOrEmpty(runtimeType) || + p.Runtime == CloudRuntime.GetRuntimeByType(runtimeType)).ToList(), true); + } + + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + base.ExecuteCmdlet(); + this.GetAzureRuntimesProcess(Runtime); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/CloudService/Development/SaveAzureServiceProjectPackage.cs b/src/ServiceManagement/Services/Commands/CloudService/Development/SaveAzureServiceProjectPackage.cs new file mode 100644 index 000000000000..9b87d6cdbcfd --- /dev/null +++ b/src/ServiceManagement/Services/Commands/CloudService/Development/SaveAzureServiceProjectPackage.cs @@ -0,0 +1,60 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService.AzureTools; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.CloudService.Development +{ + /// + /// Packages the service project into cloud or local package. + /// + [Cmdlet(VerbsData.Save, "AzureServiceProjectPackage"), OutputType(typeof(PSObject))] + public class SaveAzureServiceProjectPackageCommand : AzurePSCmdlet + { + [Parameter(Mandatory = false)] + [Alias("l")] + public SwitchParameter Local { get; set; } + + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + AzureTool.Validate(); + string rootPath = CommonUtilities.GetServiceRootPath(CurrentPath()); + string packagePath; + + CloudServiceProject service = new CloudServiceProject(rootPath, null); + + if (!Local.IsPresent) + { + service.CreatePackage(DevEnv.Cloud); + packagePath = Path.Combine(rootPath, Resources.CloudPackageFileName); + } + else + { + service.CreatePackage(DevEnv.Local); + packagePath = Path.Combine(rootPath, Resources.LocalPackageFileName); + } + + + WriteVerbose(string.Format(Resources.PackageCreated, packagePath)); + SafeWriteOutputPSObject(typeof(PSObject).FullName, Parameters.PackagePath, packagePath); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/CloudService/Development/Scaffolding/AddAzureCacheWorkerRole.cs b/src/ServiceManagement/Services/Commands/CloudService/Development/Scaffolding/AddAzureCacheWorkerRole.cs new file mode 100644 index 000000000000..e9194c082ca0 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/CloudService/Development/Scaffolding/AddAzureCacheWorkerRole.cs @@ -0,0 +1,92 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService.AzureTools; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding +{ + /// + /// Adds dedicated caching node worker role. + /// + [Cmdlet(VerbsCommon.Add, "AzureCacheWorkerRole"), OutputType(typeof(WorkerRole))] + public class AddAzureCacheWorkerRoleCommand : AzurePSCmdlet + { + [Parameter(Position = 0, HelpMessage = "Role name")] + [Alias("n")] + public string Name { get; set; } + + [Parameter(Position = 1, HelpMessage = "Instances count")] + [Alias("i")] + public int Instances { get; set; } + + /// + /// Creates new instance from AddAzureCacheWorkerRoleCommand + /// + public AddAzureCacheWorkerRoleCommand() + { + Instances = 1; + } + + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + AddAzureCacheWorkerRoleProcess(Name, Instances, CommonUtilities.GetServiceRootPath(CurrentPath())); + } + + /// + /// Process for creating caching worker role. + /// + /// The cache worker role name + /// The instance count + /// The service root path + /// The added cache worker role + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public WorkerRole AddAzureCacheWorkerRoleProcess(string workerRoleName, int instances, string rootPath) + { + // Create cache worker role. + Action cacheWorkerRoleAction = CacheConfigurationFactory.GetCacheRoleConfigurationAction( + AzureTool.GetAzureSdkVersion()); + + CloudServiceProject cloudServiceProject = new CloudServiceProject(rootPath, null); + + RoleInfo genericWorkerRole = cloudServiceProject.AddWorkerRole( + Path.Combine(Resources.GeneralScaffolding, RoleType.WorkerRole.ToString()), + workerRoleName, + instances); + + // Dedicate the worker role for caching. + cacheWorkerRoleAction(cloudServiceProject.Paths.RootPath, genericWorkerRole); + + cloudServiceProject.Reload(); + WorkerRole cacheWorkerRole = cloudServiceProject.Components.GetWorkerRole(genericWorkerRole.Name); + + // Write output + SafeWriteOutputPSObject( + cacheWorkerRole.GetType().FullName, + Parameters.CacheWorkerRoleName, genericWorkerRole.Name, + Parameters.Instances, genericWorkerRole.InstanceCount + ); + + return cloudServiceProject.Components.GetWorkerRole(workerRoleName); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/CloudService/Development/Scaffolding/AddAzureDjangoWebRole.cs b/src/ServiceManagement/Services/Commands/CloudService/Development/Scaffolding/AddAzureDjangoWebRole.cs new file mode 100644 index 000000000000..e23145fdf384 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/CloudService/Development/Scaffolding/AddAzureDjangoWebRole.cs @@ -0,0 +1,108 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Diagnostics; +using System.IO; +using System.Management.Automation; +using Microsoft.Win32; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding +{ + /// + /// Create scaffolding for a new Python Django web role, change cscfg file and csdef to include the added web role + /// + [Cmdlet(VerbsCommon.Add, "AzureDjangoWebRole"), OutputType(typeof(RoleSettings))] + public class AddAzureDjangoWebRoleCommand : AddRole + { + const string PythonCorePath = "SOFTWARE\\Python\\PythonCore"; + const string SupportedPythonVersion = "2.7"; + const string InstallPathSubKey = "InstallPath"; + const string PythonInterpreterExe = "python.exe"; + const string DjangoStartProjectCommand = "-m django.bin.django-admin startproject {0}"; + + public AddAzureDjangoWebRoleCommand() : + base(Path.Combine(Resources.PythonScaffolding, RoleType.WebRole.ToString()), Resources.AddRoleMessageCreatePython, true) + { + + } + + protected override void OnProcessing(RoleInfo roleInfo) + { + var interpPath = FindPythonInterpreterPath(); + if (interpPath != null) + { + string stdOut, stdErr; + + string originalDir = Directory.GetCurrentDirectory(); + Directory.SetCurrentDirectory(Path.Combine(RootPath, roleInfo.Name)); + + try + { + ProcessHelper.StartAndWaitForProcess( + new ProcessStartInfo( + Path.Combine(interpPath, PythonInterpreterExe), + string.Format(DjangoStartProjectCommand, roleInfo.Name) + ), + out stdOut, + out stdErr); + } + finally + { + Directory.SetCurrentDirectory(originalDir); + } + + if (!string.IsNullOrEmpty(stdErr)) + { + WriteWarning(string.Format(Resources.UnableToCreateDjangoApp, stdErr)); + WriteWarning(Resources.UnableToCreateDjangoAppFix); + } + } + else + { + WriteWarning(Resources.MissingPythonPreReq); + } + } + + internal static string FindPythonInterpreterPath() + { + foreach (var baseKey in new[] { RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, + RegistryView.Registry32), Registry.CurrentUser }) + { + using (var python = baseKey.OpenSubKey(PythonCorePath)) + { + if (python != null) + { + foreach (var key in python.GetSubKeyNames()) + { + if (key == SupportedPythonVersion) + { + var value = python.OpenSubKey(key + "\\" + InstallPathSubKey); + if (value != null) + { + return value.GetValue("") as string; + } + } + } + } + } + } + + return null; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/CloudService/Development/Scaffolding/AddAzureNodeWebRole.cs b/src/ServiceManagement/Services/Commands/CloudService/Development/Scaffolding/AddAzureNodeWebRole.cs new file mode 100644 index 000000000000..14bff8bd55a2 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/CloudService/Development/Scaffolding/AddAzureNodeWebRole.cs @@ -0,0 +1,36 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding +{ + /// + /// Create scaffolding for a new node web role, change cscfg file and csdef to include the added web role + /// + [Cmdlet(VerbsCommon.Add, "AzureNodeWebRole"), OutputType(typeof(RoleSettings))] + public class AddAzureNodeWebRoleCommand : AddRole + { + public AddAzureNodeWebRoleCommand() : + base(Path.Combine(Resources.NodeScaffolding, RoleType.WebRole.ToString()), Resources.AddRoleMessageCreateNode, true) + { + + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/CloudService/Development/Scaffolding/AddAzureNodeWorkerRole.cs b/src/ServiceManagement/Services/Commands/CloudService/Development/Scaffolding/AddAzureNodeWorkerRole.cs new file mode 100644 index 000000000000..ff6cf0b50a7d --- /dev/null +++ b/src/ServiceManagement/Services/Commands/CloudService/Development/Scaffolding/AddAzureNodeWorkerRole.cs @@ -0,0 +1,36 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding +{ + /// + /// Create scaffolding for a new node worker role, change cscfg file and csdef to include the added worker role + /// + [Cmdlet(VerbsCommon.Add, "AzureNodeWorkerRole"), OutputType(typeof(RoleSettings))] + public class AddAzureNodeWorkerRoleCommand : AddRole + { + public AddAzureNodeWorkerRoleCommand() : + base(Path.Combine(Resources.NodeScaffolding, RoleType.WorkerRole.ToString()), Resources.AddRoleMessageCreateNode, false) + { + + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/CloudService/Development/Scaffolding/AddAzurePHPWebRole.cs b/src/ServiceManagement/Services/Commands/CloudService/Development/Scaffolding/AddAzurePHPWebRole.cs new file mode 100644 index 000000000000..1ad9bdc7e4bf --- /dev/null +++ b/src/ServiceManagement/Services/Commands/CloudService/Development/Scaffolding/AddAzurePHPWebRole.cs @@ -0,0 +1,36 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding +{ + /// + /// Create scaffolding for a new php web role, change cscfg file and csdef to include the added web role + /// + [Cmdlet(VerbsCommon.Add, "AzurePHPWebRole"), OutputType(typeof(RoleSettings))] + public class AddAzurePHPWebRoleCommand : AddRole + { + public AddAzurePHPWebRoleCommand() : + base(Path.Combine(Resources.PHPScaffolding, RoleType.WebRole.ToString()), Resources.AddRoleMessageCreatePHP, true) + { + + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/CloudService/Development/Scaffolding/AddAzurePHPWorkerRole.cs b/src/ServiceManagement/Services/Commands/CloudService/Development/Scaffolding/AddAzurePHPWorkerRole.cs new file mode 100644 index 000000000000..d68c2f8b9a3f --- /dev/null +++ b/src/ServiceManagement/Services/Commands/CloudService/Development/Scaffolding/AddAzurePHPWorkerRole.cs @@ -0,0 +1,36 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding +{ + /// + /// Create scaffolding for a new php worker role, change cscfg file and csdef to include the added worker role + /// + [Cmdlet(VerbsCommon.Add, "AzurePHPWorkerRole"), OutputType(typeof(RoleSettings))] + public class AddAzurePHPWorkerRoleCommand : AddRole + { + public AddAzurePHPWorkerRoleCommand() : + base(Path.Combine(Resources.PHPScaffolding, RoleType.WorkerRole.ToString()), Resources.AddRoleMessageCreatePHP, false) + { + + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/CloudService/Development/Scaffolding/AddAzureWebRole.cs b/src/ServiceManagement/Services/Commands/CloudService/Development/Scaffolding/AddAzureWebRole.cs new file mode 100644 index 000000000000..ae68a1ddabbe --- /dev/null +++ b/src/ServiceManagement/Services/Commands/CloudService/Development/Scaffolding/AddAzureWebRole.cs @@ -0,0 +1,51 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System.IO; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding +{ + /// + /// Create scaffolding for a new web role, change cscfg file and csdef to include the added web role + /// + [Cmdlet(VerbsCommon.Add, "AzureWebRole"), OutputType(typeof(RoleSettings))] + public class AddAzureWebRoleCommand : AddRole + { + [Parameter(Position = 2, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Role scaffolding template folder")] + [ValidateNotNullOrEmpty] + public string TemplateFolder { get; set; } + + public AddAzureWebRoleCommand() : + base(Path.Combine(Resources.GeneralScaffolding, RoleType.WebRole.ToString()), Resources.AddRoleMessageCreate, true) + { + + } + + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + // Set scaffolding to use the provided template if it's set. + Scaffolding = string.IsNullOrEmpty(TemplateFolder) ? Scaffolding : this.ResolvePath(TemplateFolder); + + base.ExecuteCmdlet(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/CloudService/Development/Scaffolding/AddAzureWorkerRole.cs b/src/ServiceManagement/Services/Commands/CloudService/Development/Scaffolding/AddAzureWorkerRole.cs new file mode 100644 index 000000000000..0dfd9eba9228 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/CloudService/Development/Scaffolding/AddAzureWorkerRole.cs @@ -0,0 +1,50 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding +{ + /// + /// Create scaffolding for a new worker role, change cscfg file and csdef to include the added worker role + /// + [Cmdlet(VerbsCommon.Add, "AzureWorkerRole"), OutputType(typeof(RoleSettings))] + public class AddAzureWorkerRoleCommand : AddRole + { + [Parameter(Position = 2, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Role scaffolding template folder")] + [ValidateNotNullOrEmpty] + public string TemplateFolder { get; set; } + + public AddAzureWorkerRoleCommand() : + base(Path.Combine(Resources.GeneralScaffolding, RoleType.WorkerRole.ToString()), Resources.AddRoleMessageCreate, false) + { + + } + + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + // Set scaffolding to use the provided template if it's set. + Scaffolding = string.IsNullOrEmpty(TemplateFolder) ? Scaffolding : this.ResolvePath(TemplateFolder); + + base.ExecuteCmdlet(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/CloudService/Development/Scaffolding/NewAzureRoleTemplate.cs b/src/ServiceManagement/Services/Commands/CloudService/Development/Scaffolding/NewAzureRoleTemplate.cs new file mode 100644 index 000000000000..0b3616e50565 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/CloudService/Development/Scaffolding/NewAzureRoleTemplate.cs @@ -0,0 +1,58 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System.IO; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding +{ + /// + /// Creates new azure template for web/worker role. + /// + [Cmdlet(VerbsCommon.New, "AzureRoleTemplate"), OutputType(typeof(PSObject))] + public class NewAzureRoleTemplateCommand : AzurePSCmdlet + { + const string DefaultWebRoleTemplate = "WebRoleTemplate"; + + const string DefaultWorkerRoleTemplate = "WorkerRoleTemplate"; + + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = "WebRole", HelpMessage = "Specifies that the generated template should be for web role")] + public SwitchParameter Web { get; set; } + + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = "WorkerRole", HelpMessage = "Specifies that the generated template should be for worker role")] + public SwitchParameter Worker { get; set; } + + [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Output path for the generated template")] + public string Output { get; set; } + + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + string output = !string.IsNullOrEmpty(Output) ? this.TryResolvePath(Output) : + Web.IsPresent ? + Path.Combine(CurrentPath(), DefaultWebRoleTemplate) : + Path.Combine(CurrentPath(), DefaultWorkerRoleTemplate); + string source = Web.IsPresent ? Path.Combine(Resources.GeneralScaffolding, Resources.WebRole) : Path.Combine(Resources.GeneralScaffolding, Resources.WorkerRole); + + FileUtilities.DirectoryCopy(FileUtilities.GetContentFilePath(source), output, true); + + SafeWriteOutputPSObject(null, Parameters.Path, output); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/CloudService/Development/Scaffolding/NewAzureServiceProject.cs b/src/ServiceManagement/Services/Commands/CloudService/Development/Scaffolding/NewAzureServiceProject.cs new file mode 100644 index 000000000000..95d1c8e09809 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/CloudService/Development/Scaffolding/NewAzureServiceProject.cs @@ -0,0 +1,61 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding +{ + /// + /// Create scaffolding for a new hosted service. Generates a basic folder structure, + /// default cscfg file which wires up node/iisnode at startup in Azure as well as startup.js. + /// + [Cmdlet(VerbsCommon.New, "AzureServiceProject"), OutputType(typeof(CloudServiceProject))] + public class NewAzureServiceProjectCommand : AzurePSCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the cloud project")] + [ValidateNotNullOrEmpty] + public string ServiceName { get; set; } + + internal CloudServiceProject NewAzureServiceProcess(string parentDirectory, string serviceName) + { + // Create scaffolding structure + // + CloudServiceProject newService = new CloudServiceProject(parentDirectory, serviceName, null); + + SafeWriteOutputPSObject( + newService.GetType().FullName, + Parameters.ServiceName, newService.ServiceName, + Parameters.RootPath, newService.Paths.RootPath + ); + + WriteVerbose(string.Format(Resources.NewServiceCreatedMessage, newService.Paths.RootPath)); + + return newService; + } + + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + base.ExecuteCmdlet(); + + NewAzureServiceProcess(CurrentPath(), ServiceName); + SessionState.Path.SetLocation(Path.Combine(CurrentPath(), ServiceName)); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/CloudService/Development/SetAzureServiceProject.cs b/src/ServiceManagement/Services/Commands/CloudService/Development/SetAzureServiceProject.cs new file mode 100644 index 000000000000..0475c531d4e5 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/CloudService/Development/SetAzureServiceProject.cs @@ -0,0 +1,82 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; + +namespace Microsoft.WindowsAzure.Commands.CloudService.Development +{ + /// + /// Adjusts the service configuration. + /// + [Cmdlet(VerbsCommon.Set, "AzureServiceProject"), OutputType(typeof(ServiceSettings))] + public class SetAzureServiceProjectCommand : SetSettings + { + [Parameter(Position = 0, Mandatory = false, ValueFromPipelineByPropertyName = true)] + public string Location { get; set; } + + [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true)] + public string Slot { set; get; } + + [Parameter(Position = 2, Mandatory = false, ValueFromPipelineByPropertyName = true)] + public string Storage { get; set; } + + [Parameter(Position = 4, Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public ServiceSettings SetAzureServiceProjectProcess(string newLocation, string newSlot, string newStorage, string settingsPath) + { + ServiceSettings settings = ServiceSettings.Load(settingsPath); + if (newLocation != null) + { + settings.Location = newLocation; + } + + if (newSlot != null) + { + settings.Slot = newSlot; + } + + if (newStorage != null) + { + settings.StorageServiceName = newStorage; + } + + if (newLocation != null || newSlot != null || newStorage != null) + { + settings.Save(settingsPath); + } + + if (PassThru) + { + WriteObject(settings); + } + + return settings; + } + + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + base.ExecuteCmdlet(); + this.SetAzureServiceProjectProcess( + Location, + Slot, + Storage, + base.GetServiceSettingsPath(false)); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/CloudService/Development/SetAzureServiceProjectRole.cs b/src/ServiceManagement/Services/Commands/CloudService/Development/SetAzureServiceProjectRole.cs new file mode 100644 index 000000000000..841ec75c82b9 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/CloudService/Development/SetAzureServiceProjectRole.cs @@ -0,0 +1,158 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema; + +namespace Microsoft.WindowsAzure.Commands.CloudService.Development +{ + /// + /// Configure the number of instances or installed runtimes for a web/worker role. Updates the cscfg with the number of instances + /// + [Cmdlet(VerbsCommon.Set, "AzureServiceProjectRole"), OutputType(typeof(RoleSettings))] + public class SetAzureServiceProjectRoleCommand : AzurePSCmdlet + { + const string InstancesParameterSet = "Instances"; + + const string RuntimeParameterSet = "Runtime"; + + const string VMSizeParameterSet = "VMSize"; + + /// + /// The role name to edit + /// + [Parameter(Position = 0, Mandatory = false, ValueFromPipelineByPropertyName = true)] + public string RoleName { get; set; } + + /// + /// The number of instances for the role - parameter set for instances contains role name and instances only + /// + [Parameter(Position = 1, Mandatory = true, ParameterSetName = InstancesParameterSet, ValueFromPipelineByPropertyName = true)] + public int Instances { get; set; } + + /// + /// Runtime identifier for the runtime to add. The Runtime parameter set takes rolename, runtime, and version + /// + [Parameter(Position = 1, Mandatory = true, ParameterSetName = RuntimeParameterSet, ValueFromPipelineByPropertyName = true)] + public string Runtime { get; set; } + + /// + /// The version of the runtime to install + /// + [Parameter(Position = 2, Mandatory = true, ParameterSetName = RuntimeParameterSet, ValueFromPipelineByPropertyName = true)] + public string Version { get; set; } + + [Parameter(Position = 3, Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + /// + /// The size of the role - parameter set for instances contains role name and instance size only. + /// + [Parameter(Mandatory = true, ParameterSetName = VMSizeParameterSet, ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public string VMSize { get; set; } + + /// + /// The code to run if setting azure instances + /// + /// The name of the role to update + /// The new number of instances for the role + /// The root path to the service containing the role + /// Role after updating instance count + public RoleSettings SetAzureInstancesProcess(string roleName, int instances, string rootPath) + { + CloudServiceProject service = new CloudServiceProject(rootPath, null); + service.SetRoleInstances(service.Paths, roleName, instances); + + if (PassThru) + { + SafeWriteOutputPSObject(typeof(RoleSettings).FullName, Parameters.RoleName, roleName); + } + + return service.Components.GetCloudConfigRole(roleName); + } + + /// + /// Sets the VM size of the role. + /// + /// The role name + /// The vm size + /// The service root path + /// Role after updating VM size + public RoleSettings SetAzureVMSizeProcess(string roleName, string vmSize, string rootPath) + { + CloudServiceProject service = new CloudServiceProject(rootPath, null); + service.SetRoleVMSize(service.Paths, roleName, vmSize); + + if (PassThru) + { + SafeWriteOutputPSObject(typeof(RoleSettings).FullName, Parameters.RoleName, roleName); + } + + return service.Components.GetCloudConfigRole(roleName); + } + + /// + /// The function to run if setting the runtime for a role + /// + /// The name of the role to modify + /// The type f role runtiem to configure + /// The version of the runtime + /// The path to the service containing the role + /// The manifest containing available runtimes, defaults to the cloud manifest + /// mainly used a s a test hook + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public RoleSettings SetAzureRuntimesProcess( + string roleName, + string runtimeType, + string runtimeVersion, + string rootPath, + string manifest = null) + { + CloudServiceProject service = new CloudServiceProject(rootPath, null); + service.AddRoleRuntime(service.Paths, roleName, runtimeType, runtimeVersion, manifest); + + if (PassThru) + { + SafeWriteOutputPSObject(typeof(RoleSettings).FullName, Parameters.RoleName, roleName); + } + + return service.Components.GetCloudConfigRole(roleName); + } + + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + string rootPath = CommonUtilities.GetServiceRootPath(CurrentPath()); + RoleName = string.IsNullOrEmpty(RoleName) ? CommonUtilities.GetRoleName(rootPath, CurrentPath()) : RoleName; + + if (string.Equals(this.ParameterSetName, InstancesParameterSet, StringComparison.OrdinalIgnoreCase)) + { + this.SetAzureInstancesProcess(RoleName, Instances, rootPath); + } + else if (string.Equals(this.ParameterSetName, VMSizeParameterSet, StringComparison.OrdinalIgnoreCase)) + { + this.SetAzureVMSizeProcess(RoleName, VMSize, rootPath); + } + else + { + this.SetAzureRuntimesProcess(RoleName, Runtime, Version, rootPath); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/CloudService/Development/StartAzureEmulator.cs b/src/ServiceManagement/Services/Commands/CloudService/Development/StartAzureEmulator.cs new file mode 100644 index 000000000000..c30480f3a02c --- /dev/null +++ b/src/ServiceManagement/Services/Commands/CloudService/Development/StartAzureEmulator.cs @@ -0,0 +1,108 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Management.Automation; +using System.Security.Principal; +using System.Text; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService.AzureTools; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.CloudService.Development +{ + /// + /// Runs the service in the emulator + /// + [Cmdlet(VerbsLifecycle.Start, "AzureEmulator"), OutputType(typeof(CloudServiceProject))] + public class StartAzureEmulatorCommand : AzurePSCmdlet + { + [Parameter(Mandatory = false)] + [Alias("ln")] + public SwitchParameter Launch { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "The emulator type")] + public ComputeEmulatorMode Mode { get; set; } + + public CloudServiceProject StartAzureEmulatorProcess(string rootPath) + { + string warning; + string roleInformation; + + StringBuilder message = new StringBuilder(); + CloudServiceProject cloudServiceProject = new CloudServiceProject(rootPath, null); + + if (Directory.Exists(cloudServiceProject.Paths.LocalPackage)) + { + WriteVerbose(Resources.StopEmulatorMessage); + cloudServiceProject.StopEmulators(out warning); + if (!string.IsNullOrEmpty(warning)) + { + WriteWarning(warning); + } + WriteVerbose(Resources.StoppedEmulatorMessage); + string packagePath = cloudServiceProject.Paths.LocalPackage; + WriteVerbose(string.Format(Resources.RemovePackage, packagePath)); + try + { + Directory.Delete(packagePath, true); + } + catch (IOException) + { + throw new InvalidOperationException(string.Format(Resources.FailedToCleanUpLocalPackage, packagePath)); + } + } + + WriteVerbose(string.Format(Resources.CreatingPackageMessage, "local")); + cloudServiceProject.CreatePackage(DevEnv.Local); + + WriteVerbose(Resources.StartingEmulator); + cloudServiceProject.ResolveRuntimePackageUrls(); + cloudServiceProject.StartEmulators(Launch.ToBool(), Mode, out roleInformation, out warning); + WriteVerbose(roleInformation); + if (!string.IsNullOrEmpty(warning)) + { + WriteWarning(warning); + } + + WriteVerbose(Resources.StartedEmulator); + SafeWriteOutputPSObject( + cloudServiceProject.GetType().FullName, + Parameters.ServiceName, cloudServiceProject.ServiceName, + Parameters.RootPath, cloudServiceProject.Paths.RootPath); + + return cloudServiceProject; + } + + public override void ExecuteCmdlet() + { + AzureTool.Validate(); + if (!IsRunningElevated()) + { + throw new PSArgumentException(Resources.AzureEmulatorNotRunningElevetaed); + } + base.ExecuteCmdlet(); + StartAzureEmulatorProcess(CommonUtilities.GetServiceRootPath(CurrentPath())); + } + + private bool IsRunningElevated() + { + WindowsIdentity identity = WindowsIdentity.GetCurrent(); + WindowsPrincipal principal = new WindowsPrincipal(identity); + return principal.IsInRole(WindowsBuiltInRole.Administrator); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/CloudService/Development/StopAzureEmulator.cs b/src/ServiceManagement/Services/Commands/CloudService/Development/StopAzureEmulator.cs new file mode 100644 index 000000000000..0a28e029f959 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/CloudService/Development/StopAzureEmulator.cs @@ -0,0 +1,61 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService.AzureTools; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.CloudService.Development +{ + /// + /// Runs the service in the emulator + /// + [Cmdlet(VerbsLifecycle.Stop, "AzureEmulator"), OutputType(typeof(bool))] + public class StopAzureEmulatorCommand : AzurePSCmdlet + { + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + [PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")] + public void StopAzureEmulatorProcess() + { + CloudServiceProject service = new CloudServiceProject(); + WriteVerbose(Resources.StopEmulatorMessage); + + string warning; + service.StopEmulators(out warning); + if (!string.IsNullOrEmpty(warning)) + { + WriteWarning(warning); + } + + WriteVerbose(Resources.StoppedEmulatorMessage); + + if (PassThru.IsPresent) + { + WriteObject(true); + } + } + + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + AzureTool.Validate(); + StopAzureEmulatorProcess(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/CloudService/PublishAzureServiceProject.cs b/src/ServiceManagement/Services/Commands/CloudService/PublishAzureServiceProject.cs new file mode 100644 index 000000000000..6864ee103316 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/CloudService/PublishAzureServiceProject.cs @@ -0,0 +1,118 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService.Model; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.CloudService +{ + /// + /// Create a new deployment. Note that there shouldn't be a deployment + /// of the same name or in the same slot when executing this command. + /// + [Cmdlet(VerbsData.Publish, "AzureServiceProject", DefaultParameterSetName = ServicePublishParamSet), OutputType(typeof(Deployment))] + public class PublishAzureServiceProjectCommand : AzurePSCmdlet + { + private const string ServicePublishParamSet = "PublishFromServiceDefinition"; + private const string PackagePublishParamSet = "PublishFromPackage"; + public ICloudServiceClient CloudServiceClient { get; set; } + + [Parameter(Mandatory = false, Position = 0, ParameterSetName = ServicePublishParamSet, ValueFromPipelineByPropertyName = true)] + [Alias("sv")] + public string ServiceName { get; set; } + + [Parameter(Mandatory = false, Position = 0, ParameterSetName = PackagePublishParamSet, ValueFromPipelineByPropertyName = true)] + [Alias("sp")] + public string Package { get; set; } + + [Parameter(Mandatory = true, Position = 1, ParameterSetName = PackagePublishParamSet, ValueFromPipelineByPropertyName = true)] + [Alias("cc")] + public string Configuration { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true)] + [Alias("st")] + public string StorageAccountName { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true)] + [Alias("l")] + public string Location { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true)] + [Alias("sl")] + public string Slot { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true)] + [Alias("ln")] + public SwitchParameter Launch { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true)] + [Alias("ag")] + public string AffinityGroup { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true)] + [Alias("dn")] + public string DeploymentName { get; set; } + + [Parameter(Mandatory = false)] + [Alias("f")] + public SwitchParameter ForceUpgrade { get; set; } + + /// + /// Execute the command. + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + CloudServiceClient = CloudServiceClient ?? new CloudServiceClient( + CurrentContext.Subscription, + SessionState.Path.CurrentLocation.Path, + WriteDebug, + WriteVerbose, + WriteWarning); + + Deployment deployment; + + if (!string.IsNullOrEmpty(Package)) + { + deployment = CloudServiceClient.PublishCloudService( + Package, + Configuration, + Slot, + Location, + AffinityGroup, + StorageAccountName, + DeploymentName, + Launch, + ForceUpgrade); + } + else + { + deployment = CloudServiceClient.PublishCloudService( + ServiceName, + Slot, + Location, + AffinityGroup, + StorageAccountName, + DeploymentName, + Launch, + ForceUpgrade); + } + + WriteObject(deployment); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/CloudService/RemoveAzureService.cs b/src/ServiceManagement/Services/Commands/CloudService/RemoveAzureService.cs new file mode 100644 index 000000000000..8a687e3a63f8 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/CloudService/RemoveAzureService.cs @@ -0,0 +1,67 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.CloudService +{ + /// + /// Deletes the specified hosted service from Microsoft Azure. + /// + [Cmdlet(VerbsCommon.Remove, "AzureService", SupportsShouldProcess = true), OutputType(typeof(bool))] + public class RemoveAzureServiceCommand : AzurePSCmdlet + { + public ICloudServiceClient CloudServiceClient { get; set; } + + [Parameter(Position = 0, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "name of the hosted service")] + public string ServiceName { get; set; } + + [Parameter(Position = 1, HelpMessage = "Do not confirm deletion of deployment")] + public SwitchParameter Force { get; set; } + + [Parameter(Position = 2, Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + [Parameter(Position = 3, Mandatory = false, HelpMessage = "Specify to remove the service and the underlying disk blob(s).")] + public SwitchParameter DeleteAll { get; set; } + + public override void ExecuteCmdlet() + { + ConfirmAction( + Force.IsPresent, + string.Format(Resources.RemoveServiceWarning), + Resources.RemoveServiceWhatIfMessage, + string.Empty, + () => + { + CloudServiceClient = CloudServiceClient ?? new CloudServiceClient( + CurrentContext.Subscription, + SessionState.Path.CurrentLocation.Path, + WriteDebug, + WriteVerbose, + WriteWarning); + + CloudServiceClient.RemoveCloudService(ServiceName, DeleteAll.IsPresent); + + if (PassThru) + { + WriteObject(true); + } + }); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/CloudService/StartAzureService.cs b/src/ServiceManagement/Services/Commands/CloudService/StartAzureService.cs new file mode 100644 index 000000000000..78ae43020ec4 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/CloudService/StartAzureService.cs @@ -0,0 +1,55 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.CloudService +{ + /// + /// Starts the deployment of specified slot in the azure service + /// + [Cmdlet(VerbsLifecycle.Start, "AzureService"), OutputType(typeof(bool))] + public class StartAzureServiceCommand : AzurePSCmdlet + { + public ICloudServiceClient CloudServiceClient { get; set; } + + [Parameter(Position = 0, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Service name.")] + public string ServiceName { get; set; } + + [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Deployment slot. Staging | Production")] + public string Slot { get; set; } + + [Parameter(Position = 2, Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + CloudServiceClient = CloudServiceClient ?? new CloudServiceClient( + CurrentContext.Subscription, + SessionState.Path.CurrentLocation.Path, + WriteDebug, + WriteVerbose, + WriteWarning); + + CloudServiceClient.StartCloudService(ServiceName, Slot); + + if (PassThru) + { + WriteObject(true); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/CloudService/StopAzureService.cs b/src/ServiceManagement/Services/Commands/CloudService/StopAzureService.cs new file mode 100644 index 000000000000..aeb03bb8f8aa --- /dev/null +++ b/src/ServiceManagement/Services/Commands/CloudService/StopAzureService.cs @@ -0,0 +1,55 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.CloudService +{ + /// + /// Stops the deployment of specified slot in the azure service + /// + [Cmdlet(VerbsLifecycle.Stop, "AzureService"), OutputType(typeof(bool))] + public class StopAzureServiceCommand : AzurePSCmdlet + { + public ICloudServiceClient CloudServiceClient { get; set; } + + [Parameter(Position = 0, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Service name.")] + public string ServiceName { get; set; } + + [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Deployment slot. Staging | Production")] + public string Slot { get; set; } + + [Parameter(Position = 2, Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + CloudServiceClient = CloudServiceClient ?? new CloudServiceClient( + CurrentContext.Subscription, + SessionState.Path.CurrentLocation.Path, + WriteDebug, + WriteVerbose, + WriteWarning); + + CloudServiceClient.StopCloudService(ServiceName, Slot); + + if (PassThru) + { + WriteObject(true); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands/CloudService/TestAzureName.cs b/src/ServiceManagement/Services/Commands/CloudService/TestAzureName.cs new file mode 100644 index 000000000000..9d9a8c088b56 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/CloudService/TestAzureName.cs @@ -0,0 +1,125 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Utilities.CloudService; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.ServiceBus; +using Microsoft.WindowsAzure.Commands.Utilities.Websites; + +namespace Microsoft.WindowsAzure.Commands.CloudService +{ + [Cmdlet(VerbsDiagnostic.Test, "AzureName"), OutputType(typeof(bool))] + public class TestAzureNameCommand : AzurePSCmdlet, IModuleAssemblyInitializer + { + internal ServiceBusClientExtensions ServiceBusClient { get; set; } + internal ICloudServiceClient CloudServiceClient { get; set; } + internal IWebsitesClient WebsitesClient { get; set; } + + [Parameter(Position = 0, Mandatory = true, ParameterSetName = "Service", HelpMessage = "Test for a cloud service name.")] + public SwitchParameter Service { get; set; } + + [Parameter(Position = 0, Mandatory = true, ParameterSetName = "Storage", HelpMessage = "Test for a storage account name.")] + public SwitchParameter Storage { get; set; } + + [Parameter(Position = 0, Mandatory = true, ParameterSetName = "ServiceBusNamespace", HelpMessage = "Test for a service bus namespace name.")] + public SwitchParameter ServiceBusNamespace { get; set; } + + [Parameter(Position = 0, Mandatory = true, ParameterSetName = "Website", HelpMessage = "Test for a website name.")] + public SwitchParameter Website { get; set; } + + [Parameter(Position = 1, ParameterSetName = "Service", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Cloud service name.")] + [Parameter(Position = 1, ParameterSetName = "Storage", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Storage account name.")] + [Parameter(Position = 1, ParameterSetName = "ServiceBusNamespace", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Service bus namespace name.")] + [Parameter(Position = 1, ParameterSetName = "Website", Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Website name.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + public bool IsDNSAvailable(AzureSubscription subscription, string name) + { + EnsureCloudServiceClientInitialized(subscription); + bool available = this.CloudServiceClient.CheckHostedServiceNameAvailability(name); + WriteObject(!available); + return available; + } + + public bool IsStorageServiceAvailable(AzureSubscription subscription, string name) + { + EnsureCloudServiceClientInitialized(subscription); + bool available = this.CloudServiceClient.CheckStorageServiceAvailability(name); + WriteObject(!available); + return available; + } + + public bool IsServiceBusNamespaceAvailable(string subscriptionId, string name) + { + bool result = ServiceBusClient.IsAvailableNamespace(name); + + WriteObject(!result); + + return result; + } + + private void EnsureCloudServiceClientInitialized(AzureSubscription subscription) + { + this.CloudServiceClient = this.CloudServiceClient ?? new CloudServiceClient( + subscription, + SessionState.Path.CurrentLocation.Path, + WriteDebug, + WriteVerbose, + WriteWarning); + } + + public bool IsWebsiteAvailable(string name) + { + bool available = this.WebsitesClient.CheckWebsiteNameAvailability(name); + WriteObject(!available); + return available; + } + + public override void ExecuteCmdlet() + { + base.ExecuteCmdlet(); + + if (Service.IsPresent) + { + IsDNSAvailable(CurrentContext.Subscription, Name); + } + else if (Storage.IsPresent) + { + IsStorageServiceAvailable(CurrentContext.Subscription, Name); + } + else if (Website.IsPresent) + { + WebsitesClient = WebsitesClient ?? new WebsitesClient(CurrentContext.Subscription, WriteDebug); + IsWebsiteAvailable(Name); + } + else + { + ServiceBusClient = ServiceBusClient ?? new ServiceBusClientExtensions(CurrentContext.Subscription); + IsServiceBusNamespaceAvailable(CurrentContext.Subscription.Id.ToString(), Name); + } + } + + public void OnImport() + { + System.Management.Automation.PowerShell invoker = null; + invoker = System.Management.Automation.PowerShell.Create(RunspaceMode.CurrentRunspace); + invoker.AddScript(File.ReadAllText(FileUtilities.GetContentFilePath("ServiceManagementStartup.ps1"))); + invoker.Invoke(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/Commands.csproj b/src/ServiceManagement/Services/Commands/Commands.csproj new file mode 100644 index 000000000000..4a835410fcac --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Commands.csproj @@ -0,0 +1,362 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {CD5AA507-F5EF-473D-855B-84B91A1ABE54} + Library + Properties + Microsoft.WindowsAzure.Commands + Microsoft.WindowsAzure.Commands + v4.5 + 512 + ..\..\..\ + true + + + true + full + false + ..\..\..\Package\Debug\ServiceManagement\Azure\Services + DEBUG;TRACE + prompt + 4 + true + true + false + + + OnBuildSuccess + + + ..\..\..\Package\Release\ServiceManagement\Azure\Services + TRACE;SIGN + true + pdbonly + AnyCPU + bin\Release\Management.dll.CodeAnalysisLog.xml + true + GlobalSuppressions.cs + prompt + MinimumRecommendedRules.ruleset + ;$(ProgramFiles)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\Rule Sets + ;$(ProgramFiles)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\FxCop\Rules + true + true + MSSharedLibKey.snk + true + false + + + + False + ..\..\..\packages\AutoMapper.3.1.1\lib\net40\AutoMapper.dll + + + + + ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll + + + ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll + + + ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll + + + False + ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll + + + False + ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.11.10918.1222\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll + + + ..\..\..\packages\WindowsAzure.ServiceBus.2.3.2.0\lib\net40-full\Microsoft.ServiceBus.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + False + ..\..\..\lib\Microsoft.Web.Deployment.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.2.1.0\lib\net40\Microsoft.WindowsAzure.Management.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.6.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.MediaServices.1.2.0\lib\net40\Microsoft.WindowsAzure.Management.MediaServices.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Network.4.0.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Scheduler.3.0.2\lib\net40\Microsoft.WindowsAzure.Management.Scheduler.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.Management.ServiceBus.0.15.0-preview\lib\net40\Microsoft.WindowsAzure.Management.ServiceBus.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.3.1.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Store.0.11.0-preview\lib\net40\Microsoft.WindowsAzure.Management.Store.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.TrafficManager.0.11.0-preview\lib\net40\Microsoft.WindowsAzure.Management.TrafficManager.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.VirtualNetworks.0.9.9-preview\lib\net40\Microsoft.WindowsAzure.Management.VirtualNetworks.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.WebSites.4.0.1-prerelease\lib\net40\Microsoft.WindowsAzure.Management.WebSites.dll + + + False + ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll + + + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + True + + + + + + + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + + + + ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + True + Resources.resx + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + + + + + + + + {4900ec4e-8deb-4412-9108-0bc52f81d457} + Commands.Utilities + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/MSSharedLibKey.snk b/src/ServiceManagement/Services/Commands/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ServiceManagement/Services/Commands/MSSharedLibKey.snk differ diff --git a/src/ServiceManagement/Services/Commands/MediaServices/AzureMediaServicesHttpClientCommandBase.cs b/src/ServiceManagement/Services/Commands/MediaServices/AzureMediaServicesHttpClientCommandBase.cs new file mode 100644 index 000000000000..de42618d3072 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/MediaServices/AzureMediaServicesHttpClientCommandBase.cs @@ -0,0 +1,59 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.MediaServices +{ + public class AzureMediaServicesHttpClientCommandBase : AzurePSCmdlet + { + protected virtual void OnProcessRecord() + { + // Intentionally left blank + } + protected override void ProcessRecord() + { + try + { + Validate.ValidateInternetConnection(); + ExecuteCmdlet(); + OnProcessRecord(); + } + catch (Exception ex) + { + WriteExceptionError(ex); + } + } + protected static void CatchAggregatedExceptionFlattenAndRethrow(Action c) + { + try + { + c(); + } + catch (AggregateException ex) + { + var flat = ex.Flatten(); + if (flat.InnerExceptions.Count == 1) + { + throw flat.InnerException; + } + else + { + throw flat; + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/MediaServices/GetAzureMediaServiceCommand.cs b/src/ServiceManagement/Services/Commands/MediaServices/GetAzureMediaServiceCommand.cs new file mode 100644 index 000000000000..77094d3226c1 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/MediaServices/GetAzureMediaServiceCommand.cs @@ -0,0 +1,71 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.MediaServices; +using Microsoft.WindowsAzure.Commands.Utilities.MediaServices.Services.Entities; + +namespace Microsoft.WindowsAzure.Commands.MediaServices +{ + /// + /// Gets an Azure Media Services account. + /// + [Cmdlet(VerbsCommon.Get, "AzureMediaServicesAccount"), OutputType(typeof(MediaServiceAccountDetails), typeof(IEnumerable))] + public class GetAzureMediaServiceCommand : AzureMediaServicesHttpClientCommandBase + { + [Parameter(Position = 0, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The media service account name.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + /// + /// Gets or sets the media services client. + /// + /// + /// The media services client. + /// + public IMediaServicesClient MediaServicesClient { get; set; } + + protected virtual void WriteMediaAccounts(IEnumerable mediaServiceAccounts) + { + WriteObject(mediaServiceAccounts, true); + } + + /// + /// Executes the cmdlet. + /// + public override void ExecuteCmdlet() + { + MediaServicesClient = MediaServicesClient ?? new MediaServicesClient(CurrentContext.Subscription, WriteDebug); + + if (!string.IsNullOrEmpty(Name)) + { + MediaServiceAccountDetails account = null; + CatchAggregatedExceptionFlattenAndRethrow(() => { account = new MediaServiceAccountDetails(MediaServicesClient.GetMediaServiceAsync(Name).Result); }); + WriteObject(account, false); + } + else + { + var accounts = new List(); + accounts.AddRange(MediaServicesClient.GetMediaServiceAccountsAsync().Result.Accounts.Select(c=>new MediaServiceAccount(c))); + // Output results + WriteMediaAccounts(accounts); + } + } + + + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/MediaServices/NewAzureMediaServiceCommand.cs b/src/ServiceManagement/Services/Commands/MediaServices/NewAzureMediaServiceCommand.cs new file mode 100644 index 000000000000..32f8dac91a4d --- /dev/null +++ b/src/ServiceManagement/Services/Commands/MediaServices/NewAzureMediaServiceCommand.cs @@ -0,0 +1,81 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.MediaServices; +using Microsoft.WindowsAzure.Commands.Utilities.MediaServices.Services.Entities; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Management.MediaServices.Models; +using Microsoft.WindowsAzure.Management.Storage.Models; + +namespace Microsoft.WindowsAzure.Commands.MediaServices +{ + /// + /// Creates new Azure Media Services account. + /// + [Cmdlet(VerbsCommon.New, "AzureMediaServicesAccount"), OutputType(typeof(AccountCreationResult))] + public class NewAzureMediaServiceCommand : AzureMediaServicesHttpClientCommandBase + { + public IMediaServicesClient MediaServicesClient { get; set; } + + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The media service account name.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The media service location.")] + [ValidateNotNullOrEmpty] + public string Location { get; set; } + + [Parameter(Position = 3, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Storage account name")] + [ValidateNotNullOrEmpty] + public string StorageAccountName { get; set; } + + public override void ExecuteCmdlet() + { + MediaServicesClient = MediaServicesClient ?? new MediaServicesClient(CurrentContext.Subscription, WriteDebug); + + StorageAccountGetKeysResponse storageKeysResponse = null; + Uri storageEndPoint = null; + string storageAccountKey = null; + + CatchAggregatedExceptionFlattenAndRethrow(() => { storageKeysResponse = MediaServicesClient.GetStorageServiceKeysAsync(StorageAccountName).Result; }); + storageAccountKey = storageKeysResponse.PrimaryKey; + + StorageAccountGetResponse storageGetResponse = null; + CatchAggregatedExceptionFlattenAndRethrow(() => { storageGetResponse = MediaServicesClient.GetStorageServicePropertiesAsync(StorageAccountName).Result; }); + + if (storageGetResponse.StorageAccount.Properties != null && storageGetResponse.StorageAccount.Properties.Endpoints.Count > 0) + { + storageEndPoint = storageGetResponse.StorageAccount.Properties.Endpoints[0]; + } + else + { + throw new Exception(string.Format(Resources.EndPointNotFoundForBlobStorage, Name)); + } + + AccountCreationResult result = null; + var request = new MediaServicesAccountCreateParameters() + { + AccountName = Name, + BlobStorageEndpointUri = storageEndPoint, + Region = Location, + StorageAccountKey = storageAccountKey, + StorageAccountName = StorageAccountName + }; + CatchAggregatedExceptionFlattenAndRethrow(() => { result = new AccountCreationResult(MediaServicesClient.CreateNewAzureMediaServiceAsync(request).Result); }); + WriteObject(result, false); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/MediaServices/NewAzureMediaServiceKeyCommand.cs b/src/ServiceManagement/Services/Commands/MediaServices/NewAzureMediaServiceKeyCommand.cs new file mode 100644 index 000000000000..8385976bd1bc --- /dev/null +++ b/src/ServiceManagement/Services/Commands/MediaServices/NewAzureMediaServiceKeyCommand.cs @@ -0,0 +1,76 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.MediaServices; +using Microsoft.WindowsAzure.Commands.Utilities.MediaServices.Services.Entities; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Management.MediaServices.Models; + +namespace Microsoft.WindowsAzure.Commands.MediaServices +{ + public enum KeyType + { + Primary, + Secondary + } + + /// + /// Resets an Azure Media Services key. + /// + [Cmdlet(VerbsCommon.New, "AzureMediaServicesKey", SupportsShouldProcess = true), OutputType(typeof(string))] + public class NewAzureMediaServiceKeyCommand : AzureMediaServicesHttpClientCommandBase + { + /// + /// The media services account name. + /// + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The media services account name.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + /// + /// The media services key type Primary|Secondary. + /// + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The media services key type .")] + [ValidateNotNullOrEmpty] + public MediaServicesKeyType KeyType { get; set; } + + [Parameter(Position = 2, HelpMessage = "Do not confirm regeneration of the key.")] + public SwitchParameter Force { get; set; } + + public IMediaServicesClient MediaServicesClient { get; set; } + + public override void ExecuteCmdlet() + { + ConfirmAction(Force.IsPresent, + string.Format(Resources.RegenerateKeyWarning), + Resources.RegenerateKeyWhatIfMessage, + string.Empty, + () => + { + MediaServicesClient = MediaServicesClient ?? new MediaServicesClient(CurrentContext.Subscription, WriteDebug); + + + OperationResponse result =null; + CatchAggregatedExceptionFlattenAndRethrow(() => { result = MediaServicesClient.RegenerateMediaServicesAccountAsync(Name, KeyType).Result; }); + + MediaServiceAccountDetails account = null; + CatchAggregatedExceptionFlattenAndRethrow(() => { account = new MediaServiceAccountDetails(MediaServicesClient.GetMediaServiceAsync(Name).Result); }); + string newKey = KeyType == MediaServicesKeyType.Primary ? account.AccountKeys.Primary : account.AccountKeys.Secondary; + + WriteObject(newKey); + }); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/MediaServices/RemoveAzureMediaServiceCommand.cs b/src/ServiceManagement/Services/Commands/MediaServices/RemoveAzureMediaServiceCommand.cs new file mode 100644 index 000000000000..46c69bd9d31a --- /dev/null +++ b/src/ServiceManagement/Services/Commands/MediaServices/RemoveAzureMediaServiceCommand.cs @@ -0,0 +1,55 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using System.Net; +using Microsoft.WindowsAzure.Commands.Utilities.MediaServices; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.MediaServices +{ + /// + /// Removes an Azure Media Services account. + /// + [Cmdlet(VerbsCommon.Remove, "AzureMediaServicesAccount", SupportsShouldProcess = true), OutputType(typeof(bool))] + public class RemoveAzureMediaServiceCommand : AzureMediaServicesHttpClientCommandBase + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The media services account name.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Position = 1, HelpMessage = "Do not confirm deletion of account.")] + public SwitchParameter Force { get; set; } + + public IMediaServicesClient MediaServicesClient { get; set; } + + public override void ExecuteCmdlet() + { + ConfirmAction(Force.IsPresent, + string.Format(Resources.RemoveMediaAccountWarning), + Resources.RemoveMediaAccountWhatIfMessage, + string.Empty, + () => + { + MediaServicesClient = MediaServicesClient ?? new MediaServicesClient(CurrentContext.Subscription, WriteDebug); + + OperationResponse result = null; + + CatchAggregatedExceptionFlattenAndRethrow(() => { result = MediaServicesClient.DeleteAzureMediaServiceAccountAsync(Name).Result; }); + + WriteObject(result.StatusCode == HttpStatusCode.NoContent); + }); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/Properties/AssemblyInfo.cs b/src/ServiceManagement/Services/Commands/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..5d990696d836 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Properties/AssemblyInfo.cs @@ -0,0 +1,57 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft Azure Powershell")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("03519c3b-67ba-4972-8054-f3cc3279d603")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] +[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] +#if SIGN +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.CloudService.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.SqlDatabase.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +#else +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.Test")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.CloudService.Test")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.SqlDatabase.Test")] +#endif +[assembly: CLSCompliant(false)] diff --git a/src/ServiceManagement/Services/Commands/Properties/Resources.Designer.cs b/src/ServiceManagement/Services/Commands/Properties/Resources.Designer.cs new file mode 100644 index 000000000000..9af464f01c6a --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Properties/Resources.Designer.cs @@ -0,0 +1,108 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34003 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.WindowsAzure.Commands.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.WindowsAzure.Commands.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to [Complete] Building project {0}. + /// + internal static string CompleteBuildingProjectTemplate { + get { + return ResourceManager.GetString("CompleteBuildingProjectTemplate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [Complete] Publishing package {0}. + /// + internal static string CompletePublishingProjectTemplate { + get { + return ResourceManager.GetString("CompletePublishingProjectTemplate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [Fail] Publishing package {0}. + /// + internal static string FailPublishingProjectTemplate { + get { + return ResourceManager.GetString("FailPublishingProjectTemplate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [Start] Building project {0}. + /// + internal static string StartBuildingProjectTemplate { + get { + return ResourceManager.GetString("StartBuildingProjectTemplate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [Start] Publishing package {0}. + /// + internal static string StartPublishingProjectTemplate { + get { + return ResourceManager.GetString("StartPublishingProjectTemplate", resourceCulture); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Properties/Resources.resx b/src/ServiceManagement/Services/Commands/Properties/Resources.resx new file mode 100644 index 000000000000..7928039b13a9 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Properties/Resources.resx @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + [Complete] Building project {0} + + + [Complete] Publishing package {0} + + + [Fail] Publishing package {0} + + + [Start] Building project {0} + + + [Start] Publishing package {0} + + \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/Scheduler/GetSchedulerJobCollectionCommand.cs b/src/ServiceManagement/Services/Commands/Scheduler/GetSchedulerJobCollectionCommand.cs new file mode 100644 index 000000000000..0ce4d21c72b0 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Scheduler/GetSchedulerJobCollectionCommand.cs @@ -0,0 +1,40 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Scheduler; +using Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Model; + +namespace Microsoft.WindowsAzure.Commands.Scheduler +{ + /// + /// Cmdlet to list job collections across all regions or a specific region + /// + [Cmdlet(VerbsCommon.Get, "AzureSchedulerJobCollection"), OutputType(typeof(PSJobCollection))] + public class GetSchedulerJobCollectionCommand : SchedulerBaseCmdlet + { + [Parameter(Position = 0, Mandatory = false, HelpMessage = "The location name.")] + [ValidateNotNullOrEmpty] + public string Location { get; set; } + + [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The job collection name.")] + [ValidateNotNullOrEmpty] + public string JobCollectionName { get; set; } + + public override void ExecuteCmdlet() + { + WriteObject(SMClient.GetJobCollection(region:Location, jobCollection:JobCollectionName), true); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Scheduler/GetSchedulerJobCommand.cs b/src/ServiceManagement/Services/Commands/Scheduler/GetSchedulerJobCommand.cs new file mode 100644 index 000000000000..367801c8dab8 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Scheduler/GetSchedulerJobCommand.cs @@ -0,0 +1,48 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Scheduler; + +namespace Microsoft.WindowsAzure.Commands.Scheduler +{ + /// + /// Cmdlet to list jobs in a job collection + /// + [Cmdlet(VerbsCommon.Get, "AzureSchedulerJob"), OutputType(typeof(Job))] + public class GetSchedulerJobCommand : SchedulerBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The location name.")] + [ValidateNotNullOrEmpty] + public string Location { get; set; } + + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The job collection name.")] + [ValidateNotNullOrEmpty] + public string JobCollectionName { get; set; } + + [Parameter(Position = 2, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The job name.")] + [ValidateNotNullOrEmpty] + public string JobName { get; set; } + + [Parameter(Position = 3, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The job state.")] + [ValidateSet("Enabled", "Disabled", "Faulted", "Completed", IgnoreCase = true)] + public string JobState { get; set; } + + public override void ExecuteCmdlet() + { + WriteObject(SMClient.GetJob(region: Location, jobCollection: JobCollectionName, job: JobName, state: JobState), true); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Scheduler/GetSchedulerJobHistoryCommand.cs b/src/ServiceManagement/Services/Commands/Scheduler/GetSchedulerJobHistoryCommand.cs new file mode 100644 index 000000000000..4e561c7c1698 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Scheduler/GetSchedulerJobHistoryCommand.cs @@ -0,0 +1,48 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Scheduler; + +namespace Microsoft.WindowsAzure.Commands.Scheduler +{ + /// + /// Cmdlet to get history of job executions + /// + [Cmdlet(VerbsCommon.Get, "AzureSchedulerJobHistory", SupportsPaging=true), OutputType(typeof(ICollection))] + public class GetSchedulerJobHistoryCommand : SchedulerBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The location name.")] + [ValidateNotNullOrEmpty] + public string Location { get; set; } + + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The job collection name.")] + [ValidateNotNullOrEmpty] + public string JobCollectionName { get; set; } + + [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The job name.")] + [ValidateNotNullOrEmpty] + public string JobName { get; set; } + + [Parameter(Position = 3, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The job state.")] + [ValidateSet("Completed", "Failed", IgnoreCase = true)] + public string JobStatus { get; set; } + + public override void ExecuteCmdlet() + { + WriteObject(SMClient.GetJobHistory(jobCollection: JobCollectionName, job: JobName, region: Location, jobStatus: JobStatus), true); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Scheduler/GetSchedulerLocationCommand.cs b/src/ServiceManagement/Services/Commands/Scheduler/GetSchedulerLocationCommand.cs new file mode 100644 index 000000000000..1fd8f2a09420 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Scheduler/GetSchedulerLocationCommand.cs @@ -0,0 +1,32 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Scheduler; + +namespace Microsoft.WindowsAzure.Commands.Scheduler +{ + /// + /// Cmdlet to list available regions + /// + [Cmdlet(VerbsCommon.Get, "AzureSchedulerLocation"), OutputType(typeof(IList))] + public class GetSchedulerLocationCommand : SchedulerBaseCmdlet + { + public override void ExecuteCmdlet() + { + WriteObject(SMClient.GetAvailableRegions(), true); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Scheduler/NewSchedulerHttpJobCommand.cs b/src/ServiceManagement/Services/Commands/Scheduler/NewSchedulerHttpJobCommand.cs new file mode 100644 index 000000000000..f785941fdcaa --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Scheduler/NewSchedulerHttpJobCommand.cs @@ -0,0 +1,169 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Scheduler; +using Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Model; + +namespace Microsoft.WindowsAzure.Commands.Scheduler +{ + /// + /// Cmdlet to create a new HTTP/HTTPS job + /// + [Cmdlet(VerbsCommon.New, "AzureSchedulerHttpJob"), OutputType(typeof(PSHttpJobDetail))] + public class NewSchedulerHttpJobCommand : SchedulerBaseCmdlet + { + const string RequiredParamSet = "Required"; + const string PutPostParamSet = "PutPost"; + const string RecurringParamSet = "Recurring"; + const string AuthParamSet = "Authentication"; + + [Parameter(Mandatory = true, ParameterSetName = RequiredParamSet, HelpMessage = "The location name.")] + [ValidateNotNullOrEmpty] + public string Location { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = RequiredParamSet, HelpMessage = "The job collection name.")] + [ValidateNotNullOrEmpty] + public string JobCollectionName { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = RequiredParamSet, HelpMessage = "The job name.")] + [ValidateNotNullOrEmpty] + public string JobName { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The Method for Http and Https Action types (GET, PUT, POST, HEAD or DELETE).")] + [ValidateSet("GET", "PUT", "POST", "HEAD", "DELETE", IgnoreCase = true)] + public string Method { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The Uri for job action.")] + public Uri URI { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = PutPostParamSet, HelpMessage = "The Body for PUT and POST job actions.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The Body for PUT and POST job actions.")] + [ValidateNotNullOrEmpty] + public string RequestBody { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The Start Time")] + [ValidateNotNullOrEmpty] + public DateTime? StartTime { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RecurringParamSet, HelpMessage = "Interval of the recurrence at the given frequency")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "Interval of the recurrence at the given frequency")] + [ValidateNotNullOrEmpty] + public int? Interval { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RecurringParamSet, HelpMessage = "The frequency of recurrence")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The frequency of recurrence")] + [ValidateSet("Minute", "Hour", "Day", "Week", "Month", "Year", IgnoreCase = true)] + public string Frequency { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RecurringParamSet, HelpMessage = "Count of occurrences that will execute. Optional. Default will recur infinitely")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "Count of occurrences that will execute. Optional. Default will recur infinitely")] + public int? ExecutionCount { get; set; } + + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RecurringParamSet, HelpMessage = "The End Time")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The End Time")] + [ValidateNotNullOrEmpty] + public DateTime? EndTime { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The job state.")] + [ValidateSet("Enabled", "Disabled", IgnoreCase = true)] + public string JobState { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The header collection.")] + public Hashtable Headers { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The Method for Http and Https Action types (GET, PUT, POST, HEAD or DELETE).")] + [ValidateSet("GET", "PUT", "POST", "HEAD", "DELETE", IgnoreCase = true)] + public string ErrorActionMethod { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The Uri for error job action.")] + public Uri ErrorActionURI { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The Body for PUT and POST job actions.")] + [ValidateNotNullOrEmpty] + public string ErrorActionRequestBody { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The header collection.")] + public Hashtable ErrorActionHeaders { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = RequiredParamSet, HelpMessage = "The Storage account name.")] + [ValidateNotNullOrEmpty] + public string ErrorActionStorageAccount { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = RequiredParamSet, HelpMessage = "The Storage Queue name.")] + [ValidateNotNullOrEmpty] + public string ErrorActionStorageQueue { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = RequiredParamSet, HelpMessage = "The SAS token for storage queue.")] + [ValidateNotNullOrEmpty] + public string ErrorActionSASToken { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The Body for Storage job actions.")] + [ValidateNotNullOrEmpty] + public string ErrorActionQueueMessageBody { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = false, ParameterSetName = AuthParamSet, HelpMessage = "The Http Authentication type (None or ClientCertificate).")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The Http Authentication type (None or ClientCertificate).")] + [ValidateSet("None", "ClientCertificate", IgnoreCase = true)] + public string HttpAuthenticationType { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = AuthParamSet, HelpMessage = "The pfx of client certificate.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The pfx of client certificate.")] + [ValidateNotNullOrEmpty] + public object ClientCertificatePfx { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = AuthParamSet, HelpMessage = "The password for the pfx.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The password for the pfx.")] + [ValidateNotNullOrEmpty] + public string ClientCertificatePassword { get; set; } + + public override void ExecuteCmdlet() + { + string status = string.Empty; + WriteObject(SMClient.CreateHttpJob(new PSCreateJobParams + { + Region = Location, + JobCollectionName = JobCollectionName, + JobName = JobName, + Method = Method, + Headers = Headers, + Uri = URI, + Body = RequestBody, + StartTime = StartTime, + Interval = Interval, + Frequency = Frequency, + EndTime = EndTime, + ExecutionCount = ExecutionCount, + JobState = JobState, + ErrorActionMethod = ErrorActionMethod, + ErrorActionBody = ErrorActionRequestBody, + ErrorActionHeaders = ErrorActionHeaders, + ErrorActionUri = ErrorActionURI, + ErrorActionStorageAccount = ErrorActionStorageAccount, + ErrorActionQueueName = ErrorActionStorageQueue, + ErrorActionQueueBody = ErrorActionQueueMessageBody, + ErrorActionSasToken = ErrorActionSASToken, + HttpAuthType = HttpAuthenticationType ?? string.Empty, + ClientCertPfx = ClientCertificatePfx == null ? null : SchedulerUtils.GetCertData(this.ResolvePath(ClientCertificatePfx.ToString()), ClientCertificatePassword), + ClientCertPassword = ClientCertificatePassword + }, out status), true); + WriteObject(status); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Scheduler/NewSchedulerJobCollectionCommand.cs b/src/ServiceManagement/Services/Commands/Scheduler/NewSchedulerJobCollectionCommand.cs new file mode 100644 index 000000000000..7d67d3d79247 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Scheduler/NewSchedulerJobCollectionCommand.cs @@ -0,0 +1,64 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Scheduler; +using Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Model; + +namespace Microsoft.WindowsAzure.Commands.Scheduler +{ + /// + /// Cmdlet to create a new scheduler job collection + /// + [Cmdlet(VerbsCommon.New, "AzureSchedulerJobCollection"), OutputType(typeof(PSJobCollection))] + public class NewSchedulerJobCollectionCommand : SchedulerBaseCmdlet + { + [Parameter(Mandatory = true, HelpMessage = "The location name.")] + [ValidateNotNullOrEmpty] + public string Location { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The job collection name.")] + [ValidateNotNullOrEmpty] + public string JobCollectionName { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The job collection plan.")] + [ValidateSet("Free", "Standard", "Premium", IgnoreCase = true)] + public string Plan { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, HelpMessage = "Maximum number of jobs that can be created in this job collection. Maximum value is dependent on the Plan.")] + public int? MaxJobCount { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, HelpMessage = "Maximum frequency that can be specified on any job in this job collection.")] + [ValidateSet("Minute", "Hour", "Day", "Week", "Month", "Year", IgnoreCase = true)] + public string Frequency { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, HelpMessage = "Interval of the recurrence at the given frequency.")] + public int? Interval { get; set; } + + public override void ExecuteCmdlet() + { + string status = string.Empty; + WriteObject(SMClient.CreateJobCollection(new PSCreateJobCollectionParams + { + Region = Location, + JobCollectionName = JobCollectionName, + JobCollectionPlan = Plan, + MaxJobCount = MaxJobCount, + MaxJobFrequency = Frequency, + MaxJobInterval = Interval + }, out status), true); + WriteObject(status); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Scheduler/NewSchedulerStorageQueueJobCommand.cs b/src/ServiceManagement/Services/Commands/Scheduler/NewSchedulerStorageQueueJobCommand.cs new file mode 100644 index 000000000000..a1c593059f90 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Scheduler/NewSchedulerStorageQueueJobCommand.cs @@ -0,0 +1,146 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Scheduler; +using Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Model; + +namespace Microsoft.WindowsAzure.Commands.Scheduler +{ + /// + /// Cmdlet to create a new storage job + /// + [Cmdlet(VerbsCommon.New, "AzureSchedulerStorageQueueJob"), OutputType(typeof(PSStorageQueueJobDetail))] + public class NewSchedulerStorageQueueJobCommand : SchedulerBaseCmdlet + { + const string RequiredParamSet = "Required"; + const string RecurringParamSet = "Recurring"; + + [Parameter(Mandatory = true, ParameterSetName = RequiredParamSet, HelpMessage = "The location name.")] + [ValidateNotNullOrEmpty] + public string Location { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = RequiredParamSet, HelpMessage = "The job collection name.")] + [ValidateNotNullOrEmpty] + public string JobCollectionName { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = RequiredParamSet, HelpMessage = "The job name.")] + [ValidateNotNullOrEmpty] + public string JobName { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = RequiredParamSet, HelpMessage = "The Storage account name.")] + [ValidateNotNullOrEmpty] + public string StorageQueueAccount { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = RequiredParamSet, HelpMessage = "The Storage Queue name.")] + [ValidateNotNullOrEmpty] + public string StorageQueueName { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = RequiredParamSet, HelpMessage = "The SAS token for storage queue.")] + [ValidateNotNullOrEmpty] + public string SASToken { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, HelpMessage = "The queue message for storage job.")] + [ValidateNotNullOrEmpty] + public string StorageQueueMessage { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The Start Time")] + [ValidateNotNullOrEmpty] + public DateTime? StartTime { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The frequency count for recurring schedule")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RecurringParamSet, HelpMessage = "The frequency count for recurring schedule")] + [ValidateNotNullOrEmpty] + public int? Interval { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The interval for recurring schedule")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RecurringParamSet, HelpMessage = "The interval for recurring schedule")] + [ValidateSet("Minute", "Hour", "Day", "Week", "Month", "Year", IgnoreCase = true)] + public string Frequency { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The End Time")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RecurringParamSet, HelpMessage = "The End Time")] + [ValidateNotNullOrEmpty] + public DateTime? EndTime { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RecurringParamSet, HelpMessage = "Count of occurrences that will execute. Optional. Default will recur infinitely")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "Count of occurrences that will execute. Optional. Default will recur infinitely")] + public int? ExecutionCount { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The job state.")] + [ValidateSet("Enabled", "Disabled", IgnoreCase = true)] + public string JobState { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The Method for Http and Https Action types (GET, PUT, POST, HEAD or DELETE).")] + [ValidateSet("GET", "PUT", "POST", "HEAD", "DELETE", IgnoreCase = true)] + public string ErrorActionMethod { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The Uri for error job action.")] + public Uri ErrorActionURI { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The Body for PUT and POST job actions.")] + [ValidateNotNullOrEmpty] + public string ErrorActionRequestBody { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The header collection.")] + public Hashtable ErrorActionHeaders { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = RequiredParamSet, HelpMessage = "The Storage account name.")] + [ValidateNotNullOrEmpty] + public string ErrorActionStorageAccount { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = RequiredParamSet, HelpMessage = "The Storage Queue name.")] + [ValidateNotNullOrEmpty] + public string ErrorActionStorageQueue { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = RequiredParamSet, HelpMessage = "The SAS token for storage queue.")] + [ValidateNotNullOrEmpty] + public string ErrorActionSASToken { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The Body for Storage job actions.")] + [ValidateNotNullOrEmpty] + public string ErrorActionQueueMessageBody { get; set; } + + public override void ExecuteCmdlet() + { + string status = string.Empty; + WriteObject(SMClient.CreateStorageJob(new PSCreateJobParams + { + Region = Location, + JobCollectionName = JobCollectionName, + JobName = JobName, + StorageAccount = StorageQueueAccount, + QueueName = StorageQueueName, + SasToken = SASToken, + StorageQueueMessage = StorageQueueMessage, + StartTime = StartTime, + Interval = Interval, + Frequency = Frequency, + EndTime = EndTime, + ExecutionCount = ExecutionCount, + JobState = JobState, + ErrorActionMethod = ErrorActionMethod, + ErrorActionBody = ErrorActionRequestBody, + ErrorActionHeaders = ErrorActionHeaders, + ErrorActionUri = ErrorActionURI, + ErrorActionStorageAccount = ErrorActionStorageAccount, + ErrorActionQueueName = ErrorActionStorageQueue, + ErrorActionQueueBody = ErrorActionQueueMessageBody, + ErrorActionSasToken = ErrorActionSASToken + }, out status), true); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Scheduler/RemoveSchedulerJobCollectionCommand.cs b/src/ServiceManagement/Services/Commands/Scheduler/RemoveSchedulerJobCollectionCommand.cs new file mode 100644 index 000000000000..719d06ef27d4 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Scheduler/RemoveSchedulerJobCollectionCommand.cs @@ -0,0 +1,51 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Scheduler; + +namespace Microsoft.WindowsAzure.Commands.Scheduler +{ + /// + /// Cmdlet to remove a job + /// + [Cmdlet(VerbsCommon.Remove, "AzureSchedulerJobCollection"), OutputType(typeof(bool))] + public class RemoveSchedulerJobCollectionCommand : SchedulerBaseCmdlet + { + [Parameter(Mandatory = false, HelpMessage = "Do not confirm job collection deletion")] + public SwitchParameter Force { get; set; } + + [Parameter(Position = 0, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The location name.")] + [ValidateNotNullOrEmpty] + public string Location { get; set; } + + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The job collection name.")] + [ValidateNotNullOrEmpty] + public string JobCollectionName { get; set; } + + public override void ExecuteCmdlet() + { + ConfirmAction( + Force.IsPresent, + string.Format(Resources.RemoveJobCollectionWarning, JobCollectionName), + Resources.RemoveJobCollectionMessage, + JobCollectionName, + () => + { + WriteObject(SMClient.DeleteJobCollection(region: Location, jobCollection: JobCollectionName), true); + }); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Scheduler/RemoveSchedulerJobCommand.cs b/src/ServiceManagement/Services/Commands/Scheduler/RemoveSchedulerJobCommand.cs new file mode 100644 index 000000000000..cd2b0cbdc541 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Scheduler/RemoveSchedulerJobCommand.cs @@ -0,0 +1,55 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Scheduler; + +namespace Microsoft.WindowsAzure.Commands.Scheduler +{ + /// + /// Cmdlet to remove a job + /// + [Cmdlet(VerbsCommon.Remove, "AzureSchedulerJob"), OutputType(typeof(bool))] + public class RemoveSchedulerJobCommand : SchedulerBaseCmdlet + { + [Parameter(Mandatory = false, HelpMessage = "Do not confirm job deletion")] + public SwitchParameter Force { get; set; } + + [Parameter(Position = 0, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The location name.")] + [ValidateNotNullOrEmpty] + public string Location { get; set; } + + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The job collection name.")] + [ValidateNotNullOrEmpty] + public string JobCollectionName { get; set; } + + [Parameter(Position = 3, Mandatory = true, ValueFromPipelineByPropertyName = true,HelpMessage = "The job name.")] + [ValidateNotNullOrEmpty] + public string JobName { get; set; } + + public override void ExecuteCmdlet() + { + ConfirmAction( + Force.IsPresent, + string.Format(Resources.RemoveJobWarning, JobName), + Resources.RemoveJobMessage, + JobName, + () => + { + WriteObject(SMClient.DeleteJob(region: Location, jobCollection: JobCollectionName, jobName: JobName), true); + }); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Scheduler/SetSchedulerHttpJobCommand.cs b/src/ServiceManagement/Services/Commands/Scheduler/SetSchedulerHttpJobCommand.cs new file mode 100644 index 000000000000..2fca2bb05dfd --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Scheduler/SetSchedulerHttpJobCommand.cs @@ -0,0 +1,205 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Scheduler; +using Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Model; + +namespace Microsoft.WindowsAzure.Commands.Scheduler +{ + /// + /// Cmdlet to patch HttpJob + /// + [Cmdlet(VerbsCommon.Set, "AzureSchedulerHttpJob"), OutputType(typeof(string))] + public class SetSchedulerHttpJobCommand : SchedulerBaseCmdlet + { + const string RequiredParamSet = "Required"; + const string PutPostParamSet = "PutPost"; + const string RecurringParamSet = "Recurring"; + const string AuthParamSet = "Authentication"; + + [Parameter(Mandatory = true, ParameterSetName = RequiredParamSet, HelpMessage = "The location name.")] + [ValidateNotNullOrEmpty] + public string Location { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = RequiredParamSet, HelpMessage = "The job collection name.")] + [ValidateNotNullOrEmpty] + public string JobCollectionName { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = RequiredParamSet, HelpMessage = "The job name.")] + [ValidateNotNullOrEmpty] + public string JobName { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The Method for Http and Https Action types (GET, PUT, POST, HEAD or DELETE).")] + [ValidateSet("GET", "PUT", "POST", "HEAD", "DELETE", IgnoreCase = true)] + public string Method { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The Uri for job action.")] + public Uri URI { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = PutPostParamSet, HelpMessage = "The Body for PUT and POST job actions.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The Body for PUT and POST job actions.")] + [ValidateNotNullOrEmpty] + public string RequestBody { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The Start Time")] + [ValidateNotNullOrEmpty] + public DateTime? StartTime { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RecurringParamSet, HelpMessage = "Interval of the recurrence at the given frequency")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "Interval of the recurrence at the given frequency")] + [ValidateNotNullOrEmpty] + public int? Interval { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RecurringParamSet, HelpMessage = "The frequency of recurrence")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The frequency of recurrence")] + [ValidateSet("Minute", "Hour", "Day", "Week", "Month", "Year", IgnoreCase = true)] + public string Frequency { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RecurringParamSet, HelpMessage = "Count of occurrences that will execute. Optional. Default will recur infinitely")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "Count of occurrences that will execute. Optional. Default will recur infinitely")] + public int? ExecutionCount { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RecurringParamSet, HelpMessage = "The End Time")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The End Time")] + [ValidateNotNullOrEmpty] + public DateTime? EndTime { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The job state.")] + [ValidateSet("Enabled", "Disabled", IgnoreCase = true)] + public string JobState { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The header collection.")] + public Hashtable Headers { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The Method for Http and Https Action types (GET, PUT, POST, HEAD or DELETE).")] + [ValidateSet("GET", "PUT", "POST", "HEAD", "DELETE", IgnoreCase = true)] + public string ErrorActionMethod { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The Uri for error job action.")] + public Uri ErrorActionURI { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The Body for PUT and POST job actions.")] + [ValidateNotNullOrEmpty] + public string ErrorActionRequestBody { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The header collection.")] + public Hashtable ErrorActionHeaders { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = RequiredParamSet, HelpMessage = "The Storage account name.")] + [ValidateNotNullOrEmpty] + public string ErrorActionStorageAccount { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = RequiredParamSet, HelpMessage = "The Storage Queue name.")] + [ValidateNotNullOrEmpty] + public string ErrorActionStorageQueue { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = RequiredParamSet, HelpMessage = "The SAS token for storage queue.")] + [ValidateNotNullOrEmpty] + public string ErrorActionSASToken { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The Body for Storage job actions.")] + [ValidateNotNullOrEmpty] + public string ErrorActionQueueMessageBody { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = false, ParameterSetName = AuthParamSet, HelpMessage = "The Http Authentication type (None or ClientCertificate).")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The Http Authentication type (None or ClientCertificate).")] + [ValidateSet("None", "ClientCertificate", IgnoreCase = true)] + public string HttpAuthenticationType { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = AuthParamSet, HelpMessage = "The pfx of client certificate.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The pfx of client certificate.")] + [ValidateNotNullOrEmpty] + public object ClientCertificatePfx { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = AuthParamSet, HelpMessage = "The password for the pfx.")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The password for the pfx.")] + [ValidateNotNullOrEmpty] + public string ClientCertificatePassword { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + string status = string.Empty; + if (PassThru.IsPresent) + { + WriteObject(SMClient.PatchHttpJob(new PSCreateJobParams + { + Region = Location, + JobCollectionName = JobCollectionName, + JobName = JobName, + Method = Method, + Headers = Headers, + Uri = URI, + Body = RequestBody, + StartTime = StartTime, + Interval = Interval, + Frequency = Frequency, + EndTime = EndTime, + ExecutionCount = ExecutionCount, + JobState = JobState, + ErrorActionMethod = ErrorActionMethod, + ErrorActionBody = ErrorActionRequestBody, + ErrorActionHeaders = ErrorActionHeaders, + ErrorActionUri = ErrorActionURI, + ErrorActionStorageAccount = ErrorActionStorageAccount, + ErrorActionQueueName = ErrorActionStorageQueue, + ErrorActionQueueBody = ErrorActionQueueMessageBody, + ErrorActionSasToken = ErrorActionSASToken, + HttpAuthType = HttpAuthenticationType ?? string.Empty, + ClientCertPfx = ClientCertificatePfx == null ? null : SchedulerUtils.GetCertData(this.ResolvePath(ClientCertificatePfx.ToString()), ClientCertificatePassword), + ClientCertPassword = ClientCertificatePassword + }, out status), true); + WriteObject(status); + } + else + { + SMClient.PatchHttpJob(new PSCreateJobParams + { + Region = Location, + JobCollectionName = JobCollectionName, + JobName = JobName, + Method = Method, + Headers = Headers, + Uri = URI, + Body = RequestBody, + StartTime = StartTime, + Interval = Interval, + Frequency = Frequency, + EndTime = EndTime, + ExecutionCount = ExecutionCount, + JobState = JobState, + ErrorActionMethod = ErrorActionMethod, + ErrorActionBody = ErrorActionRequestBody, + ErrorActionHeaders = ErrorActionHeaders, + ErrorActionUri = ErrorActionURI, + ErrorActionStorageAccount = ErrorActionStorageAccount, + ErrorActionQueueName = ErrorActionStorageQueue, + ErrorActionQueueBody = ErrorActionQueueMessageBody, + ErrorActionSasToken = ErrorActionSASToken, + HttpAuthType = HttpAuthenticationType ?? string.Empty, + ClientCertPfx = ClientCertificatePfx == null ? null : SchedulerUtils.GetCertData(this.ResolvePath(ClientCertificatePfx.ToString()), ClientCertificatePassword), + ClientCertPassword = ClientCertificatePassword + }, out status); + WriteDebug(status); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Scheduler/SetSchedulerJobCollectionCommand.cs b/src/ServiceManagement/Services/Commands/Scheduler/SetSchedulerJobCollectionCommand.cs new file mode 100644 index 000000000000..e84e9abbfcd2 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Scheduler/SetSchedulerJobCollectionCommand.cs @@ -0,0 +1,83 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Scheduler; +using Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Model; + +namespace Microsoft.WindowsAzure.Commands.Scheduler +{ + /// + /// Cmdlet to update Job collection + /// + [Cmdlet(VerbsCommon.Set, "AzureSchedulerJobCollection"), OutputType(typeof(string))] + public class SetSchedulerJobCollectionCommand : SchedulerBaseCmdlet + { + [Parameter(Mandatory = true, HelpMessage = "The location name.")] + [ValidateNotNullOrEmpty] + public string Location { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The job collection name.")] + [ValidateNotNullOrEmpty] + public string JobCollectionName { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The job collection plan.")] + [ValidateSet("Free", "Standard", "Premium", IgnoreCase = true)] + public string Plan { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, HelpMessage = "Maximum number of jobs that can be created in this job collection. Maximum value is dependent on the Plan.")] + public int? MaxJobCount { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, HelpMessage = "Maximum frequency that can be specified on any job in this job collection.")] + [ValidateSet("Minute", "Hour", "Day", "Week", "Month", "Year", IgnoreCase = true)] + public string Frequency { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = false, HelpMessage = "Interval of the recurrence at the given frequency.")] + public int? Interval { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + string status = string.Empty; + if (PassThru.IsPresent) + { + WriteObject(SMClient.UpdateJobCollection(new PSCreateJobCollectionParams + { + Region = Location, + JobCollectionName = JobCollectionName, + JobCollectionPlan = Plan, + MaxJobCount = MaxJobCount, + MaxJobFrequency = Frequency, + MaxJobInterval = Interval + }, out status), true); + WriteObject(status); + } + else + { + SMClient.UpdateJobCollection(new PSCreateJobCollectionParams + { + Region = Location, + JobCollectionName = JobCollectionName, + JobCollectionPlan = Plan, + MaxJobCount = MaxJobCount, + MaxJobFrequency = Frequency, + MaxJobInterval = Interval + }, out status); + WriteDebug(status); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Scheduler/SetSchedulerStorageQueueJobCommand.cs b/src/ServiceManagement/Services/Commands/Scheduler/SetSchedulerStorageQueueJobCommand.cs new file mode 100644 index 000000000000..1ea0990cb10d --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Scheduler/SetSchedulerStorageQueueJobCommand.cs @@ -0,0 +1,181 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Scheduler; +using Microsoft.WindowsAzure.Commands.Utilities.Scheduler.Model; + +namespace Microsoft.WindowsAzure.Commands.Scheduler +{ + /// + /// Cmdlet to patch HttpJob + /// + [Cmdlet(VerbsCommon.Set, "AzureSchedulerStorageQueueJob"), OutputType(typeof(string))] + public class SetSchedulerStorageQueueJobCommand : SchedulerBaseCmdlet + { + const string RequiredParamSet = "Required"; + const string RecurringParamSet = "Recurring"; + + [Parameter(Position = 0, Mandatory = true, ParameterSetName = RequiredParamSet, HelpMessage = "The location name.")] + [ValidateNotNullOrEmpty] + public string Location { get; set; } + + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = RequiredParamSet, HelpMessage = "The job collection name.")] + [ValidateNotNullOrEmpty] + public string JobCollectionName { get; set; } + + [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = RequiredParamSet, HelpMessage = "The job name.")] + [ValidateNotNullOrEmpty] + public string JobName { get; set; } + + [Parameter(Position = 3, Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = RequiredParamSet, HelpMessage = "The Storage account name.")] + [ValidateNotNullOrEmpty] + public string StorageQueueAccount { get; set; } + + [Parameter(Position = 4, Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = RequiredParamSet, HelpMessage = "The Storage Queue name.")] + [ValidateNotNullOrEmpty] + public string StorageQueueName { get; set; } + + [Parameter(Position = 5, Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = RequiredParamSet, HelpMessage = "The SAS token for storage queue.")] + [ValidateNotNullOrEmpty] + public string SASToken { get; set; } + + [Parameter(Position = 6, Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The Body for PUT, POST and Storage job actions.")] + [ValidateNotNullOrEmpty] + public string StorageQueueMessage { get; set; } + + [Parameter(Position = 8, Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The Start Time")] + [ValidateNotNullOrEmpty] + public DateTime? StartTime { get; set; } + + [Parameter(Position = 9, Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The frequency count for recurring schedule")] + [Parameter(Position = 9, Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RecurringParamSet, HelpMessage = "The frequency count for recurring schedule")] + [ValidateNotNullOrEmpty] + public int? Interval { get; set; } + + [Parameter(Position = 10, Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The interval for recurring schedule")] + [Parameter(Position = 10, Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RecurringParamSet, HelpMessage = "The interval for recurring schedule")] + [ValidateSet("Minute", "Hour", "Day", "Week", "Month", "Year", IgnoreCase = true)] + public string Frequency { get; set; } + + [Parameter(Position = 11, Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The End Time")] + [Parameter(Position = 11, Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RecurringParamSet, HelpMessage = "The End Time")] + [ValidateNotNullOrEmpty] + public DateTime? EndTime { get; set; } + + [Parameter(Position = 12, Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RecurringParamSet, HelpMessage = "Count of occurrences that will execute. Optional. Default will recur infinitely")] + [Parameter(Position = 12, Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "Count of occurrences that will execute. Optional. Default will recur infinitely")] + public int? ExecutionCount { get; set; } + + [Parameter(Position = 13, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The job state.")] + [ValidateSet("Enabled", "Disabled", IgnoreCase = true)] + public string JobState { get; set; } + + [Parameter(Position = 14, Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The Method for Http and Https Action types (GET, PUT, POST, HEAD or DELETE).")] + [ValidateSet("GET", "PUT", "POST", "HEAD", "DELETE", IgnoreCase = true)] + public string ErrorActionMethod { get; set; } + + [Parameter(Position = 15, Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The Uri for error job action.")] + public Uri ErrorActionURI { get; set; } + + [Parameter(Position = 16, Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The Body for PUT and POST job actions.")] + [ValidateNotNullOrEmpty] + public string ErrorActionRequestBody { get; set; } + + [Parameter(Position = 17, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The header collection.")] + public Hashtable ErrorActionHeaders { get; set; } + + [Parameter(Position = 18, Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = RequiredParamSet, HelpMessage = "The Storage account name.")] + [ValidateNotNullOrEmpty] + public string ErrorActionStorageAccount { get; set; } + + [Parameter(Position = 19, Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = RequiredParamSet, HelpMessage = "The Storage Queue name.")] + [ValidateNotNullOrEmpty] + public string ErrorActionStorageQueue { get; set; } + + [Parameter(Position = 20, Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = RequiredParamSet, HelpMessage = "The SAS token for storage queue.")] + [ValidateNotNullOrEmpty] + public string ErrorActionSASToken { get; set; } + + [Parameter(Position = 21, Mandatory = false, ValueFromPipelineByPropertyName = false, ParameterSetName = RequiredParamSet, HelpMessage = "The Body for Storage job actions.")] + [ValidateNotNullOrEmpty] + public string ErrorActionQueueMessageBody { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + string status = string.Empty; + if (PassThru.IsPresent) + { + WriteObject(SMClient.PatchStorageJob(new PSCreateJobParams + { + Region = Location, + JobCollectionName = JobCollectionName, + JobName = JobName, + StorageAccount = StorageQueueAccount, + QueueName = StorageQueueName, + SasToken = SASToken, + StorageQueueMessage = StorageQueueMessage, + StartTime = StartTime, + Interval = Interval, + Frequency = Frequency, + EndTime = EndTime, + ExecutionCount = ExecutionCount, + JobState = JobState, + ErrorActionMethod = ErrorActionMethod, + ErrorActionBody = ErrorActionRequestBody, + ErrorActionHeaders = ErrorActionHeaders, + ErrorActionUri = ErrorActionURI, + ErrorActionStorageAccount = ErrorActionStorageAccount, + ErrorActionQueueName = ErrorActionStorageQueue, + ErrorActionQueueBody = ErrorActionQueueMessageBody, + ErrorActionSasToken = ErrorActionSASToken + }, out status), true); + WriteObject(status); + } + else + { + SMClient.PatchStorageJob(new PSCreateJobParams + { + Region = Location, + JobCollectionName = JobCollectionName, + JobName = JobName, + StorageAccount = StorageQueueAccount, + QueueName = StorageQueueName, + SasToken = SASToken, + StorageQueueMessage = StorageQueueMessage, + StartTime = StartTime, + Interval = Interval, + Frequency = Frequency, + EndTime = EndTime, + ExecutionCount = ExecutionCount, + JobState = JobState, + ErrorActionMethod = ErrorActionMethod, + ErrorActionBody = ErrorActionRequestBody, + ErrorActionHeaders = ErrorActionHeaders, + ErrorActionUri = ErrorActionURI, + ErrorActionStorageAccount = ErrorActionStorageAccount, + ErrorActionQueueName = ErrorActionStorageQueue, + ErrorActionQueueBody = ErrorActionQueueMessageBody, + ErrorActionSasToken = ErrorActionSASToken + }, out status); + WriteDebug(status); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands/ServiceBus/GetAzureSBAuthorizationRule.cs b/src/ServiceManagement/Services/Commands/ServiceBus/GetAzureSBAuthorizationRule.cs new file mode 100644 index 000000000000..5be43294c85f --- /dev/null +++ b/src/ServiceManagement/Services/Commands/ServiceBus/GetAzureSBAuthorizationRule.cs @@ -0,0 +1,103 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.ServiceBus; + +namespace Microsoft.WindowsAzure.Commands.ServiceBus +{ + /// + /// Creates new service bus authorization rule. + /// + [Cmdlet(VerbsCommon.Get, "AzureSBAuthorizationRule"), OutputType(typeof(ExtendedAuthorizationRule), typeof(List))] + public class GetAzureSBAuthorizationRuleCommand : AzurePSCmdlet + { + public const string EntitySASParameterSet = "EntitySAS"; + + public const string NamespaceSASParameterSet = "NamespaceSAS"; + + public ServiceBusClientExtensions Client { get; set; } + + [Parameter(Position = 0, Mandatory = false, ParameterSetName = EntitySASParameterSet, + ValueFromPipelineByPropertyName = true, HelpMessage = "The rule name")] + [Parameter(Position = 0, Mandatory = false, ParameterSetName = NamespaceSASParameterSet, + ValueFromPipelineByPropertyName = true, HelpMessage = "The rule name")] + public string Name { get; set; } + + [Parameter(Position = 1, Mandatory = false, ParameterSetName = EntitySASParameterSet, + ValueFromPipelineByPropertyName = true, HelpMessage = "The access permission")] + [Parameter(Position = 1, Mandatory = false, ParameterSetName = NamespaceSASParameterSet, + ValueFromPipelineByPropertyName = true, HelpMessage = "The access permission")] + public Microsoft.ServiceBus.Messaging.AccessRights[] Permission { get; set; } + + [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, + ParameterSetName = EntitySASParameterSet, HelpMessage = "The namespace name")] + [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, + ParameterSetName = NamespaceSASParameterSet, HelpMessage = "The namespace name")] + public string Namespace { get; set; } + + [Parameter(Position = 3, Mandatory = true, ParameterSetName = EntitySASParameterSet, + ValueFromPipelineByPropertyName = true, HelpMessage = "The entity name")] + public string EntityName { get; set; } + + [Parameter(Position = 4, Mandatory = true, ParameterSetName = EntitySASParameterSet, + ValueFromPipelineByPropertyName = true, HelpMessage = "The entity type")] + public ServiceBusEntityType EntityType { get; set; } + + public override void ExecuteCmdlet() + { + Client = Client ?? new ServiceBusClientExtensions(CurrentContext.Subscription); + List rules = null; + List output = new List(); + AuthorizationRuleFilterOption options = new AuthorizationRuleFilterOption() + { + EntityName = EntityName, + EntityType = EntityType, + Name = Name, + Namespace = Namespace, + Permission = Permission != null ? Permission.ToList() : null + }; + + switch (ParameterSetName) + { + case NamespaceSASParameterSet: + rules = Client.GetAuthorizationRule(options); + rules.ForEach(r => output.Add(ServiceBusPowerShellUtility.GetNamespacePSObject(r))); + break; + + case EntitySASParameterSet: + rules = Client.GetAuthorizationRule(options); + rules.ForEach(r => output.Add(ServiceBusPowerShellUtility.GetEntityPSObject(r))); + break; + + default: + throw new ArgumentException(string.Format(Resources.InvalidParameterSetName, ParameterSetName)); + } + + if (output.Count == 1) + { + WriteObject(output[0]); + } + else + { + WriteObject(output, true); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/ServiceBus/GetAzureSBLocation.cs b/src/ServiceManagement/Services/Commands/ServiceBus/GetAzureSBLocation.cs new file mode 100644 index 000000000000..e53ae17c3712 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/ServiceBus/GetAzureSBLocation.cs @@ -0,0 +1,40 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.ServiceBus; +using Microsoft.WindowsAzure.Management.ServiceBus.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceBus +{ + /// + /// Lists all service bus locations available for a subscription. + /// + [Cmdlet(VerbsCommon.Get, "AzureSBLocation"), OutputType(typeof(List))] + public class GetAzureSBLocationCommand : AzurePSCmdlet + { + internal ServiceBusClientExtensions Client { get; set; } + + /// + /// Gets list of service bus regions on the given subscription. + /// + public override void ExecuteCmdlet() + { + Client = Client ?? new ServiceBusClientExtensions(CurrentContext.Subscription); + WriteObject(Client.GetServiceBusRegions(), true); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/ServiceBus/GetAzureSBNamespace.cs b/src/ServiceManagement/Services/Commands/ServiceBus/GetAzureSBNamespace.cs new file mode 100644 index 000000000000..e42970fb03c7 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/ServiceBus/GetAzureSBNamespace.cs @@ -0,0 +1,50 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.ServiceBus; + +namespace Microsoft.WindowsAzure.Commands.ServiceBus +{ + /// + /// Lists all service bus namespaces associated with a subscription + /// + [Cmdlet(VerbsCommon.Get, "AzureSBNamespace"), OutputType(typeof(List), typeof(ExtendedServiceBusNamespace))] + public class GetAzureSBNamespaceCommand : AzurePSCmdlet + { + internal ServiceBusClientExtensions Client { get; set; } + + [Parameter(Position = 0, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Namespace name")] + public string Name { get; set; } + + /// + /// Executes the cmdlet. + /// + public override void ExecuteCmdlet() + { + Client = Client ?? new ServiceBusClientExtensions(CurrentContext.Subscription); + + if (string.IsNullOrEmpty(Name)) + { + WriteObject(Client.GetNamespace(), true); + } + else + { + WriteObject(Client.GetNamespace(Name)); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/ServiceBus/NewAzureSBAuthorizationRule.cs b/src/ServiceManagement/Services/Commands/ServiceBus/NewAzureSBAuthorizationRule.cs new file mode 100644 index 000000000000..261ccab7e55d --- /dev/null +++ b/src/ServiceManagement/Services/Commands/ServiceBus/NewAzureSBAuthorizationRule.cs @@ -0,0 +1,95 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.ServiceBus; + +namespace Microsoft.WindowsAzure.Commands.ServiceBus +{ + /// + /// Creates new service bus authorization rule. + /// + [Cmdlet(VerbsCommon.New, "AzureSBAuthorizationRule"), OutputType(typeof(ExtendedAuthorizationRule))] + public class NewAzureSBAuthorizationRuleCommand : AzurePSCmdlet + { + public const string EntitySASParameterSet = "EntitySAS"; + + public const string NamespaceSASParameterSet = "NamespaceSAS"; + + public ServiceBusClientExtensions Client { get; set; } + + [Parameter(Position = 0, Mandatory = true, ParameterSetName = EntitySASParameterSet, HelpMessage = "The rule name")] + [Parameter(Position = 0, Mandatory = true, ParameterSetName = NamespaceSASParameterSet, HelpMessage = "The rule name")] + public string Name { get; set; } + + [Parameter(Position = 1, Mandatory = false, ParameterSetName = EntitySASParameterSet, HelpMessage = "The access permission")] + [Parameter(Position = 1, Mandatory = false, ParameterSetName = NamespaceSASParameterSet, HelpMessage = "The access permission")] + public Microsoft.ServiceBus.Messaging.AccessRights[] Permission { get; set; } + + [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, + ParameterSetName = EntitySASParameterSet, HelpMessage = "The namespace name")] + [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, + ParameterSetName = NamespaceSASParameterSet, HelpMessage = "The namespace name")] + public string Namespace { get; set; } + + [Parameter(Position = 3, Mandatory = true, ParameterSetName = EntitySASParameterSet, HelpMessage = "The entity name")] + public string EntityName { get; set; } + + [Parameter(Position = 4, Mandatory = true, ParameterSetName = EntitySASParameterSet, HelpMessage = "The entity type")] + public ServiceBusEntityType EntityType { get; set; } + + [Parameter(Position = 5, Mandatory = false, ParameterSetName = NamespaceSASParameterSet, HelpMessage = "The primary key")] + [Parameter(Position = 5, Mandatory = false, ParameterSetName = EntitySASParameterSet, HelpMessage = "The primary key")] + public string PrimaryKey { get; set; } + + [Parameter(Position = 6, Mandatory = false, ParameterSetName = NamespaceSASParameterSet, HelpMessage = "The secondary key")] + [Parameter(Position = 6, Mandatory = false, ParameterSetName = EntitySASParameterSet, HelpMessage = "The secondary key")] + public string SecondaryKey { get; set; } + + public override void ExecuteCmdlet() + { + Client = Client ?? new ServiceBusClientExtensions(CurrentContext.Subscription); + ExtendedAuthorizationRule rule = null; + PSObject output = null; + + switch (ParameterSetName) + { + case NamespaceSASParameterSet: + rule = Client.CreateSharedAccessAuthorization(Namespace, Name, PrimaryKey, SecondaryKey, Permission); + output = ServiceBusPowerShellUtility.GetNamespacePSObject(rule); + break; + + case EntitySASParameterSet: + rule = Client.CreateSharedAccessAuthorization( + Namespace, + EntityName, + EntityType, + Name, + PrimaryKey, + SecondaryKey, + Permission); + output = ServiceBusPowerShellUtility.GetEntityPSObject(rule); + break; + + default: + throw new ArgumentException(string.Format(Resources.InvalidParameterSetName, ParameterSetName)); + } + + WriteObject(output); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/ServiceBus/NewAzureSBNamespace.cs b/src/ServiceManagement/Services/Commands/ServiceBus/NewAzureSBNamespace.cs new file mode 100644 index 000000000000..c5bbe1e1acc3 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/ServiceBus/NewAzureSBNamespace.cs @@ -0,0 +1,60 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.ServiceBus; +using Microsoft.WindowsAzure.Management.ServiceBus.Models; + +namespace Microsoft.WindowsAzure.Commands.ServiceBus +{ + /// + /// Creates new service bus namespace. + /// + [Cmdlet(VerbsCommon.New, "AzureSBNamespace"), OutputType(typeof(ServiceBusNamespace))] + public class NewAzureSBNamespaceCommand : AzurePSCmdlet + { + internal ServiceBusClientExtensions Client { get; set; } + + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Namespace name")] + public string Name { get; set; } + + [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Namespace location")] + public string Location { get; set; } + + [Parameter(Position = 2, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Create assosciated ACS namespace as well.")] + public bool? CreateACSNamespace { get; set; } + + [Parameter(Position = 3, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Namespace Type")] + public NamespaceType NamespaceType { get; set; } + + /// + /// Creates a new service bus namespace. + /// + public override void ExecuteCmdlet() + { + Client = Client ?? new ServiceBusClientExtensions(CurrentContext.Subscription); + if (CreateACSNamespace.HasValue) + { + WriteObject(Client.CreateNamespace(Name, Location, NamespaceType, CreateACSNamespace.Value)); + } + else + { + WriteWarning(Resources.SpecifyCreateACSNamespace); + WriteObject(Client.CreateNamespace(Name, Location, NamespaceType, true)); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/ServiceBus/RemoveAzureSBAuthorizationRule.cs b/src/ServiceManagement/Services/Commands/ServiceBus/RemoveAzureSBAuthorizationRule.cs new file mode 100644 index 000000000000..30d6a024011a --- /dev/null +++ b/src/ServiceManagement/Services/Commands/ServiceBus/RemoveAzureSBAuthorizationRule.cs @@ -0,0 +1,76 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.ServiceBus; + +namespace Microsoft.WindowsAzure.Commands.ServiceBus +{ + /// + /// Removes new service bus authorization rule. + /// + [Cmdlet(VerbsCommon.Remove, "AzureSBAuthorizationRule"), OutputType(typeof(bool))] + public class RemoveAzureSBAuthorizationRuleCommand : AzurePSCmdlet + { + public const string EntitySASParameterSet = "EntitySAS"; + + public const string NamespaceSASParameterSet = "NamespaceSAS"; + + public ServiceBusClientExtensions Client { get; set; } + + [Parameter(Position = 0, Mandatory = true, ParameterSetName = EntitySASParameterSet, + ValueFromPipelineByPropertyName = true, HelpMessage = "The rule name")] + [Parameter(Position = 0, Mandatory = true, ParameterSetName = NamespaceSASParameterSet, + ValueFromPipelineByPropertyName = true, HelpMessage = "The rule name")] + public string Name { get; set; } + + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + ParameterSetName = EntitySASParameterSet, HelpMessage = "The namespace name")] + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + ParameterSetName = NamespaceSASParameterSet, HelpMessage = "The namespace name")] + public string Namespace { get; set; } + + [Parameter(Position = 2, Mandatory = true, ParameterSetName = EntitySASParameterSet, + ValueFromPipelineByPropertyName = true, HelpMessage = "The entity name")] + public string EntityName { get; set; } + + [Parameter(Position = 3, Mandatory = true, ParameterSetName = EntitySASParameterSet, + ValueFromPipelineByPropertyName = true, HelpMessage = "The entity type")] + public ServiceBusEntityType EntityType { get; set; } + + [Parameter(Mandatory = false, ParameterSetName = NamespaceSASParameterSet)] + [Parameter(Mandatory = false, ParameterSetName = EntitySASParameterSet)] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + Client = Client ?? new ServiceBusClientExtensions(CurrentContext.Subscription); + AuthorizationRuleFilterOption options = new AuthorizationRuleFilterOption() + { + Namespace = Namespace, + EntityName = EntityName, + EntityType = EntityType, + Name = Name + }; + + Client.RemoveAuthorizationRule(options); + + if (PassThru) + { + WriteObject(true); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/ServiceBus/RemoveAzureSBNamespace.cs b/src/ServiceManagement/Services/Commands/ServiceBus/RemoveAzureSBNamespace.cs new file mode 100644 index 000000000000..8611fe921e07 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/ServiceBus/RemoveAzureSBNamespace.cs @@ -0,0 +1,61 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.ServiceBus; + +namespace Microsoft.WindowsAzure.Commands.ServiceBus +{ + /// + /// Creates new service bus namespace. + /// + [Cmdlet(VerbsCommon.Remove, "AzureSBNamespace", SupportsShouldProcess = true), OutputType(typeof(bool))] + public class RemoveAzureSBNamespaceCommand : AzurePSCmdlet + { + public ServiceBusClientExtensions Client { get; set; } + + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Namespace name")] + public string Name { get; set; } + + [Parameter(Position = 2, Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + [Parameter(Position = 3, HelpMessage = "Do not confirm the removal of the namespace")] + public SwitchParameter Force { get; set; } + + /// + /// Removes a service bus namespace. + /// + public override void ExecuteCmdlet() + { + ConfirmAction( + Force.IsPresent, + string.Format(Resources.RemoveServiceBusNamespaceConfirmation, Name), + string.Format(Resources.RemovingNamespaceMessage), + Name, + () => + { + Client = Client ?? new ServiceBusClientExtensions(CurrentContext.Subscription); + Client.RemoveNamespace(Name); + + if (PassThru) + { + WriteObject(true); + } + }); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/ServiceBus/SetAzureSBAuthorizationRule.cs b/src/ServiceManagement/Services/Commands/ServiceBus/SetAzureSBAuthorizationRule.cs new file mode 100644 index 000000000000..7dea9d882656 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/ServiceBus/SetAzureSBAuthorizationRule.cs @@ -0,0 +1,99 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.ServiceBus; + +namespace Microsoft.WindowsAzure.Commands.ServiceBus +{ + /// + /// Updates new service bus authorization rule. + /// + [Cmdlet(VerbsCommon.Set, "AzureSBAuthorizationRule"), OutputType(typeof(ExtendedAuthorizationRule))] + public class SetAzureSBAuthorizationRuleCommand : AzurePSCmdlet + { + public const string EntitySASParameterSet = "EntitySAS"; + + public const string NamespaceSASParameterSet = "NamespaceSAS"; + + public ServiceBusClientExtensions Client { get; set; } + + [Parameter(Position = 0, Mandatory = true, ParameterSetName = EntitySASParameterSet, + ValueFromPipelineByPropertyName = true, HelpMessage = "The rule name")] + [Parameter(Position = 0, Mandatory = true, ParameterSetName = NamespaceSASParameterSet, + ValueFromPipelineByPropertyName = true, HelpMessage = "The rule name")] + public string Name { get; set; } + + [Parameter(Position = 1, Mandatory = false, ParameterSetName = EntitySASParameterSet, HelpMessage = "The access permission")] + [Parameter(Position = 1, Mandatory = false, ParameterSetName = NamespaceSASParameterSet, HelpMessage = "The access permission")] + public Microsoft.ServiceBus.Messaging.AccessRights[] Permission { get; set; } + + [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, + ParameterSetName = EntitySASParameterSet, HelpMessage = "The namespace name")] + [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, + ParameterSetName = NamespaceSASParameterSet, HelpMessage = "The namespace name")] + public string Namespace { get; set; } + + [Parameter(Position = 3, Mandatory = true, ParameterSetName = EntitySASParameterSet, + ValueFromPipelineByPropertyName = true, HelpMessage = "The entity name")] + public string EntityName { get; set; } + + [Parameter(Position = 4, Mandatory = true, ParameterSetName = EntitySASParameterSet, + ValueFromPipelineByPropertyName = true, HelpMessage = "The entity type")] + public ServiceBusEntityType EntityType { get; set; } + + [Parameter(Position = 5, Mandatory = false, ParameterSetName = NamespaceSASParameterSet, HelpMessage = "The primary key")] + [Parameter(Position = 5, Mandatory = false, ParameterSetName = EntitySASParameterSet, HelpMessage = "The primary key")] + public string PrimaryKey { get; set; } + + [Parameter(Position = 6, Mandatory = false, ParameterSetName = NamespaceSASParameterSet, HelpMessage = "The secondary key")] + [Parameter(Position = 6, Mandatory = false, ParameterSetName = EntitySASParameterSet, HelpMessage = "The secondary key")] + public string SecondaryKey { get; set; } + + public override void ExecuteCmdlet() + { + Client = Client ?? new ServiceBusClientExtensions(CurrentContext.Subscription); + ExtendedAuthorizationRule rule = null; + PSObject output = null; + + switch (ParameterSetName) + { + case NamespaceSASParameterSet: + rule = Client.UpdateSharedAccessAuthorization(Namespace, Name, PrimaryKey, SecondaryKey, Permission); + output = ServiceBusPowerShellUtility.GetNamespacePSObject(rule); + break; + + case EntitySASParameterSet: + rule = Client.UpdateSharedAccessAuthorization( + Namespace, + EntityName, + EntityType, + Name, + PrimaryKey, + SecondaryKey, + Permission); + output = ServiceBusPowerShellUtility.GetEntityPSObject(rule); + break; + + default: + throw new ArgumentException(string.Format(Resources.InvalidParameterSetName, ParameterSetName)); + } + + WriteObject(output); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/Store/GetAzureStoreAddOn.cs b/src/ServiceManagement/Services/Commands/Store/GetAzureStoreAddOn.cs new file mode 100644 index 000000000000..1aa91436bf9f --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Store/GetAzureStoreAddOn.cs @@ -0,0 +1,85 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Store; + +namespace Microsoft.WindowsAzure.Commands.Store +{ + /// + /// Gets all available Microsoft Azure add-ons from Marketplace and gets user purchased add-ons. + /// + [Cmdlet(VerbsCommon.Get, "AzureStoreAddOn"), OutputType(typeof(List), typeof(List))] + public class GetAzureStoreAddOnCommand : ServiceManagementBaseCmdlet + { + const string ListAvailableParameterSet = "ListAvailable"; + + const string GetAddOnParameterSet = "GetAddOn"; + + public StoreClient StoreClient { get; set; } + + public MarketplaceClient MarketplaceClient { get; set; } + + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + ParameterSetName = ListAvailableParameterSet, HelpMessage = "List available add-ons")] + public SwitchParameter ListAvailable { get; set; } + + [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true, + ParameterSetName = ListAvailableParameterSet, HelpMessage = "Country code")] + [ValidateCountryLength()] + public string Country { get; set; } + + [Parameter(Position = 0, Mandatory = false, ValueFromPipelineByPropertyName = true, + ParameterSetName = GetAddOnParameterSet, HelpMessage = "Add-On name")] + public string Name { get; set; } + + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + if (ListAvailable.IsPresent) + { + ListAvailableAddOns(); + } + else + { + GetAddOn(); + } + } + + private void GetAddOn() + { + StoreClient = StoreClient ?? new StoreClient(CurrentContext.Subscription); + List addOns = StoreClient.GetAddOn(new AddOnSearchOptions(Name, null, null)); + WriteObject(addOns, true); + } + + private void ListAvailableAddOns() + { + StoreClient = StoreClient ?? new StoreClient(CurrentContext.Subscription); + MarketplaceClient = MarketplaceClient ?? + new MarketplaceClient(StoreClient.GetLocations().Select(l => l.Name)); + + WriteVerbose(Resources.GetAllAddOnsWaitMessage); + List result = MarketplaceClient.GetAvailableWindowsAzureOffers(Country); + List knownProviders = result.Where( + o => MarketplaceClient.IsKnownProvider(o.ProviderId)).ToList(); + WriteObject(knownProviders, true); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/Store/NewAzureStoreAddOn.cs b/src/ServiceManagement/Services/Commands/Store/NewAzureStoreAddOn.cs new file mode 100644 index 000000000000..648f0dec7030 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Store/NewAzureStoreAddOn.cs @@ -0,0 +1,74 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Store; + +namespace Microsoft.WindowsAzure.Commands.Store +{ + /// + /// Purchase a new Add-On from Microsoft Azure Store. + /// + [Cmdlet(VerbsCommon.New, "AzureStoreAddOn"), OutputType(typeof(bool))] + public class NewAzureStoreAddOnCommand : ServiceManagementBaseCmdlet + { + public StoreClient StoreClient { get; set; } + + public PowerShellCustomConfirmation CustomConfirmation; + + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Add-On name")] + public string Name { get; set; } + + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Add-On id")] + public string AddOn { get; set; } + + [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Add-On plan id")] + public string Plan { get; set; } + + [Parameter(Position = 3, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Add-On location")] + public string Location { get; set; } + + [Parameter(Position = 4, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Add-On promotion code")] + public string PromotionCode { get; set; } + + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + StoreClient = StoreClient ?? new StoreClient(CurrentContext.Subscription); + WindowsAzureAddOn addon; + CustomConfirmation = CustomConfirmation ?? new PowerShellCustomConfirmation(Host); + + if (!StoreClient.TryGetAddOn(Name, out addon)) + { + string message = StoreClient.GetConfirmationMessage(OperationType.New, AddOn, Plan); + bool purchase = CustomConfirmation.ShouldProcess(Resources.NewAddOnConformation, message); + + if (purchase) + { + StoreClient.NewAddOn(Name, AddOn, Plan, Location, PromotionCode); + WriteVerbose(string.Format(Resources.AddOnCreatedMessage, Name)); + WriteObject(true); + } + } + else + { + throw new Exception(string.Format(Resources.AddOnNameAlreadyUsed, Name)); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/Store/RemoveAzureStoreAddOn.cs b/src/ServiceManagement/Services/Commands/Store/RemoveAzureStoreAddOn.cs new file mode 100644 index 000000000000..4934c86409f4 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Store/RemoveAzureStoreAddOn.cs @@ -0,0 +1,59 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Store; + +namespace Microsoft.WindowsAzure.Commands.Store +{ + /// + /// Removes all purchased Add-Ons or specific Add-On + /// + [Cmdlet(VerbsCommon.Remove, "AzureStoreAddOn"), OutputType(typeof(List))] + public class RemoveAzureStoreAddOnCommand : ServiceManagementBaseCmdlet + { + public StoreClient StoreClient { get; set; } + + public PowerShellCustomConfirmation CustomConfirmation; + + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Add-On name")] + public string Name { get; set; } + + [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Get result of the cmdlet")] + public SwitchParameter PassThru { get; set; } + + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + StoreClient = StoreClient ?? new StoreClient(CurrentContext.Subscription); + CustomConfirmation = CustomConfirmation ?? new PowerShellCustomConfirmation(Host); + + string message = StoreClient.GetConfirmationMessage(OperationType.Remove); + bool remove = CustomConfirmation.ShouldProcess(Resources.RemoveAddOnConformation, message); + if (remove) + { + StoreClient.RemoveAddOn(Name); + WriteVerbose(string.Format(Resources.AddOnRemovedMessage, Name)); + if (PassThru.IsPresent) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/Store/SetAzureStoreAddOn.cs b/src/ServiceManagement/Services/Commands/Store/SetAzureStoreAddOn.cs new file mode 100644 index 000000000000..99649e45a533 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Store/SetAzureStoreAddOn.cs @@ -0,0 +1,70 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Store; + +namespace Microsoft.WindowsAzure.Commands.Store +{ + /// + /// Purchase a new Add-On from Microsoft Azure Store. + /// + [Cmdlet(VerbsCommon.Set, "AzureStoreAddOn"), OutputType(typeof(bool))] + public class SetAzureStoreAddOnCommand : ServiceManagementBaseCmdlet + { + public StoreClient StoreClient { get; set; } + + public PowerShellCustomConfirmation CustomConfirmation; + + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Add-On name")] + public string Name { get; set; } + + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Add-On plan id")] + public string Plan { get; set; } + + [Parameter(Position = 2, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Add-On promotion code")] + public string PromotionCode { get; set; } + + [Parameter(Position = 3, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Pass output")] + public SwitchParameter PassThru { get; set; } + + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + StoreClient = StoreClient ?? new StoreClient(CurrentContext.Subscription); + CustomConfirmation = CustomConfirmation ?? new PowerShellCustomConfirmation(Host); + WindowsAzureAddOn addon; + + if (StoreClient.TryGetAddOn(Name, out addon)) + { + string message = StoreClient.GetConfirmationMessage(OperationType.Set, addon.AddOn, Plan); + bool purchase = CustomConfirmation.ShouldProcess(Resources.SetAddOnConformation, message); + + if (purchase) + { + StoreClient.UpdateAddOn(Name, Plan, PromotionCode); + WriteVerbose(string.Format(Resources.AddOnUpdatedMessage, Name)); + + if (PassThru.IsPresent) + { + WriteObject(true); + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/WAPackIaaS/CloudService/GetWAPackCloudService.cs b/src/ServiceManagement/Services/Commands/WAPackIaaS/CloudService/GetWAPackCloudService.cs new file mode 100644 index 000000000000..da600a8e881c --- /dev/null +++ b/src/ServiceManagement/Services/Commands/WAPackIaaS/CloudService/GetWAPackCloudService.cs @@ -0,0 +1,51 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; + +namespace Microsoft.WindowsAzure.Commands.WAPackIaaS.CloudService +{ + [Cmdlet(VerbsCommon.Get, "WAPackCloudService", DefaultParameterSetName = WAPackCmdletParameterSets.Empty)] + public class GetWAPackCloudService : IaaSCmdletBase + { + [Parameter(Position = 0, ParameterSetName = WAPackCmdletParameterSets.FromName, ValueFromPipelineByPropertyName = true, HelpMessage = "CloudService Name.")] + [ValidateNotNullOrEmpty] + public string Name + { + get; + set; + } + + public override void ExecuteCmdlet() + { + IEnumerable results = null; + var vmRoleOperations = new VMRoleOperations(this.WebClientFactory); + var cloudServiceOperations = new CloudServiceOperations(this.WebClientFactory); + + if (this.ParameterSetName == WAPackCmdletParameterSets.FromName) + { + var cloudService = cloudServiceOperations.Read(this.Name); + results = new List() { cloudService }; + } + else if (this.ParameterSetName == WAPackCmdletParameterSets.Empty) + { + results = cloudServiceOperations.Read(); + } + + this.GenerateCmdletOutput(results); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/WAPackIaaS/CloudService/GetWAPackVMRole.cs b/src/ServiceManagement/Services/Commands/WAPackIaaS/CloudService/GetWAPackVMRole.cs new file mode 100644 index 000000000000..f5eb2074fc3b --- /dev/null +++ b/src/ServiceManagement/Services/Commands/WAPackIaaS/CloudService/GetWAPackVMRole.cs @@ -0,0 +1,75 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; + +namespace Microsoft.WindowsAzure.Commands.WAPackIaaS.CloudService +{ + [Cmdlet(VerbsCommon.Get, "WAPackVMRole", DefaultParameterSetName = WAPackCmdletParameterSets.Empty)] + public class GetWAPackVMRole : IaaSCmdletBase + { + [Parameter(Position = 0, Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.FromName, ValueFromPipelineByPropertyName = true, HelpMessage = "VMRole Name.")] + [Parameter(Position = 0, Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.FromCloudService, ValueFromPipelineByPropertyName = true, HelpMessage = "VMRole Name.")] + [ValidateNotNullOrEmpty] + public string Name + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.FromCloudService, ValueFromPipelineByPropertyName = true, HelpMessage = "VMRole CloudService Name.")] + [ValidateNotNullOrEmpty] + public string CloudServiceName + { + get; + set; + } + + public override void ExecuteCmdlet() + { + IEnumerable results = null; + var vmRoleOperations = new VMRoleOperations(this.WebClientFactory); + + if (this.ParameterSetName == WAPackCmdletParameterSets.FromName) + { + var vmRole = vmRoleOperations.Read(this.Name, this.Name); + results = new List() { vmRole }; + } + else if (this.ParameterSetName == WAPackCmdletParameterSets.FromCloudService) + { + var vmRole = vmRoleOperations.Read(this.CloudServiceName, this.Name); + results = new List() { vmRole }; + } + else if (this.ParameterSetName == WAPackCmdletParameterSets.Empty) + { + IEnumerable cloudServiceResults = null; + var vmRoles = new List(); + + var cloudServiceOperations = new CloudServiceOperations(this.WebClientFactory); + cloudServiceResults = cloudServiceOperations.Read(); + + foreach (var cloudService in cloudServiceResults) + { + vmRoles.AddRange(vmRoleOperations.Read(cloudService.Name)); + } + results = vmRoles; + } + + this.GenerateCmdletOutput(results); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/WAPackIaaS/CloudService/NewWAPackCloudService.cs b/src/ServiceManagement/Services/Commands/WAPackIaaS/CloudService/NewWAPackCloudService.cs new file mode 100644 index 000000000000..f7c7f1c34a21 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/WAPackIaaS/CloudService/NewWAPackCloudService.cs @@ -0,0 +1,59 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; + +namespace Microsoft.WindowsAzure.Commands.WAPackIaaS.CloudService +{ + [Cmdlet(VerbsCommon.New, "WAPackCloudService")] + public class NewWAPackCloudService : IaaSCmdletBase + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "CloudService Name.")] + [ValidateNotNullOrEmpty] + public string Name + { + get; + set; + } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "CloudService Label.")] + [ValidateNotNullOrEmpty] + public string Label + { + get; + set; + } + + public override void ExecuteCmdlet() + { + var cloudService = new Utilities.WAPackIaaS.DataContract.CloudService() + { + Name = this.Name, + Label = this.Label + }; + + Guid? cloudServiceJobId = Guid.Empty; + var cloudServiceOperations = new CloudServiceOperations(this.WebClientFactory); + cloudServiceOperations.Create(cloudService, out cloudServiceJobId); + WaitForJobCompletion(cloudServiceJobId); + + var createdCloudService = cloudServiceOperations.Read(this.Name); + var results = new List() { createdCloudService }; + this.GenerateCmdletOutput(results); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/WAPackIaaS/CloudService/NewWAPackVMRole.cs b/src/ServiceManagement/Services/Commands/WAPackIaaS/CloudService/NewWAPackVMRole.cs new file mode 100644 index 000000000000..d1628188b054 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/WAPackIaaS/CloudService/NewWAPackVMRole.cs @@ -0,0 +1,119 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; + +namespace Microsoft.WindowsAzure.Commands.WAPackIaaS.CloudService +{ + [Cmdlet(VerbsCommon.New, "WAPackVMRole", DefaultParameterSetName = WAPackCmdletParameterSets.QuickCreate)] + public class NewWAPackVMRole : IaaSCmdletBase + { + [Parameter(Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.QuickCreate, ValueFromPipelineByPropertyName = true, HelpMessage = "VMRole Name.")] + [Parameter(Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.FromCloudService, ValueFromPipelineByPropertyName = true, HelpMessage = "VMRole Name.")] + [ValidateNotNullOrEmpty] + public string Name + { + get; + set; + } + + [Parameter(Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.QuickCreate, ValueFromPipelineByPropertyName = true, HelpMessage = "VMRole Label.")] + [Parameter(Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.FromCloudService, ValueFromPipelineByPropertyName = true, HelpMessage = "VMRole Label.")] + [ValidateNotNullOrEmpty] + public string Label + { + get; + set; + } + + [Parameter(Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.QuickCreate, ValueFromPipelineByPropertyName = true, HelpMessage = "VMRole ResourceDefinition.")] + [Parameter(Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.FromCloudService, ValueFromPipelineByPropertyName = true, HelpMessage = "VMRole ResourceDefinition.")] + [ValidateNotNullOrEmpty] + public VMRoleResourceDefinition ResourceDefinition + { + get; + set; + } + + [Parameter(Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.FromCloudService, ValueFromPipelineByPropertyName = true, HelpMessage = "VMRole CloudService.")] + [ValidateNotNullOrEmpty] + public Utilities.WAPackIaaS.DataContract.CloudService CloudService + { + get; + set; + } + + public override void ExecuteCmdlet() + { + Guid? vmRolejobId = Guid.Empty; + VMRole createdVmRole = null; + IEnumerable results = null; + + var vmRoleOperations = new VMRoleOperations(this.WebClientFactory); + var newVMRole = new VMRole() + { + Name = this.Name, + Label = this.Label, + ResourceDefinition = this.ResourceDefinition, + InstanceView = null, + ResourceConfiguration = null, + ProvisioningState = null, + Substate = null, + }; + + if (this.ParameterSetName == WAPackCmdletParameterSets.QuickCreate) + { + var cloudService = new Utilities.WAPackIaaS.DataContract.CloudService() + { + Name = this.Name, + Label = this.Label + }; + + Guid? cloudServiceJobId = Guid.Empty; + var cloudServiceOperations = new CloudServiceOperations(this.WebClientFactory); + cloudServiceOperations.Create(cloudService, out cloudServiceJobId); + WaitForJobCompletion(cloudServiceJobId); + + try + { + createdVmRole = vmRoleOperations.Create(this.Name, newVMRole, out vmRolejobId); + WaitForJobCompletion(vmRolejobId); + + var vmRole = vmRoleOperations.Read(this.Name, this.Name); + results = new List() { vmRole }; + } + catch (Exception) + { + cloudServiceOperations.Delete(this.Name, out cloudServiceJobId); + WaitForJobCompletion(cloudServiceJobId); + throw; + } + } + else if (this.ParameterSetName == WAPackCmdletParameterSets.FromCloudService) + { + createdVmRole = vmRoleOperations.Create(this.CloudService.Name, newVMRole, out vmRolejobId); + WaitForJobCompletion(vmRolejobId); + + var vmRole = vmRoleOperations.Read(this.CloudService.Name, this.Name); + results = new List() { vmRole }; + } + + this.GenerateCmdletOutput(results); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/WAPackIaaS/CloudService/RemoveWAPackCloudService.cs b/src/ServiceManagement/Services/Commands/WAPackIaaS/CloudService/RemoveWAPackCloudService.cs new file mode 100644 index 000000000000..336cdf6adc05 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/WAPackIaaS/CloudService/RemoveWAPackCloudService.cs @@ -0,0 +1,63 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; + +namespace Microsoft.WindowsAzure.Commands.WAPackIaaS.CloudService +{ + [Cmdlet(VerbsCommon.Remove, "WAPackCloudService", DefaultParameterSetName = WAPackCmdletParameterSets.FromCloudServiceObject, SupportsShouldProcess = true)] + public class RemoveWAPackCloudService : IaaSCmdletBase + { + [Parameter(Position = 0, Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.FromCloudServiceObject, ValueFromPipeline = true, HelpMessage = "Existing CloudService Object.")] + [ValidateNotNullOrEmpty] + public Utilities.WAPackIaaS.DataContract.CloudService CloudService + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + [Parameter(Position = 2, HelpMessage = "Confirm the removal of the CloudService.")] + public SwitchParameter Force { get; set; } + + public override void ExecuteCmdlet() + { + ConfirmAction( + Force.IsPresent, + string.Format(Resources.RemoveCloudServiceConfirmationMessage, CloudService.Name), + string.Format(Resources.RemoveCloudServiceMessage), + CloudService.Name, + () => + { + Guid? cloudServiceJobId = null; + var cloudServiceOperations = new CloudServiceOperations(this.WebClientFactory); + + var deletedCloudService = cloudServiceOperations.Read(CloudService.Name); + cloudServiceOperations.Delete(CloudService.Name, out cloudServiceJobId); + var jobInfo = WaitForJobCompletion(cloudServiceJobId); + + if (this.PassThru) + { + WriteObject(jobInfo.jobStatus != JobStatusEnum.Failed); + } + }); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/WAPackIaaS/CloudService/RemoveWAPackVMRole.cs b/src/ServiceManagement/Services/Commands/WAPackIaaS/CloudService/RemoveWAPackVMRole.cs new file mode 100644 index 000000000000..520c03128852 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/WAPackIaaS/CloudService/RemoveWAPackVMRole.cs @@ -0,0 +1,88 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; + +namespace Microsoft.WindowsAzure.Commands.WAPackIaaS.CloudService +{ + [Cmdlet(VerbsCommon.Remove, "WAPackVMRole", DefaultParameterSetName = WAPackCmdletParameterSets.FromVMRoleObject, SupportsShouldProcess = true)] + public class RemoveWAPackVMRole : IaaSCmdletBase + { + [Parameter(Position = 0, Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.FromVMRoleObject, ValueFromPipeline = true, HelpMessage = "Existing VMRole Object.")] + [Parameter(Position = 0, Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.FromCloudService, ValueFromPipeline = true, HelpMessage = "Existing VMRole Object.")] + [ValidateNotNullOrEmpty] + public VMRole VMRole + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.FromCloudService, HelpMessage = "VMRole CloudServiceName.")] + [ValidateNotNullOrEmpty] + public string CloudServiceName + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + [Parameter(Position = 2, HelpMessage = "Confirm the removal of the VMRole.")] + public SwitchParameter Force { get; set; } + + public override void ExecuteCmdlet() + { + ConfirmAction( + Force.IsPresent, + string.Format(Resources.RemoveVMRoleConfirmationMessage, VMRole.Name), + string.Format(Resources.RemoveVMRoleMessage), + VMRole.Name, + () => + { + JobInfo jobInfo = null; + Guid? vmRoleJobId = null; + Guid? cloudJobId = null; + var vmRoleOperations = new VMRoleOperations(this.WebClientFactory); + + if (this.ParameterSetName == WAPackCmdletParameterSets.FromVMRoleObject) + { + vmRoleOperations.Delete(VMRole.Name, VMRole.Name, out vmRoleJobId); + jobInfo = WaitForJobCompletion(vmRoleJobId); + + // If no CloudService name is given, we assume the VMRole was created using WAP + // in which case the CloudService name is the same as the VMRole name + var cloudServiceOperations = new CloudServiceOperations(this.WebClientFactory); + cloudServiceOperations.Delete(VMRole.Name, out cloudJobId); + WaitForJobCompletion(vmRoleJobId); + } + else if (this.ParameterSetName == WAPackCmdletParameterSets.FromCloudService) + { + vmRoleOperations.Delete(this.CloudServiceName, VMRole.Name, out vmRoleJobId); + jobInfo = WaitForJobCompletion(vmRoleJobId); + } + + if (this.PassThru) + { + WriteObject(jobInfo.jobStatus != JobStatusEnum.Failed); + } + }); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/WAPackIaaS/CloudService/SetWAPackVMRole.cs b/src/ServiceManagement/Services/Commands/WAPackIaaS/CloudService/SetWAPackVMRole.cs new file mode 100644 index 000000000000..7f05dd68de7c --- /dev/null +++ b/src/ServiceManagement/Services/Commands/WAPackIaaS/CloudService/SetWAPackVMRole.cs @@ -0,0 +1,58 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; + +namespace Microsoft.WindowsAzure.Commands.WAPackIaaS.CloudService +{ + [Cmdlet(VerbsCommon.Set, "WAPackVMRole", DefaultParameterSetName = WAPackCmdletParameterSets.FromVMRoleObject)] + public class SetWAPackVMRole : IaaSCmdletBase + { + [Parameter(Position = 0, Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.FromVMRoleObject, ValueFromPipeline = true, HelpMessage = "Existing VMRole Object.")] + [ValidateNotNullOrEmpty] + public VMRole VMRole + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.FromVMRoleObject, HelpMessage = "New VMRole Instance Count.")] + [ValidateNotNullOrEmpty] + public int InstanceCount + { + get; + set; + } + + [Parameter(Position = 2, Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + Guid? jobId = null; + var vmRoleOperations = new VMRoleOperations(this.WebClientFactory); + vmRoleOperations.SetInstanceCount(this.VMRole.Name, this.VMRole, this.InstanceCount, out jobId); + var jobInfo = WaitForJobCompletion(jobId); + + if (this.PassThru) + { + WriteObject(jobInfo.jobStatus != JobStatusEnum.Failed); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands/WAPackIaaS/IaaSCmdletBase.cs b/src/ServiceManagement/Services/Commands/WAPackIaaS/IaaSCmdletBase.cs new file mode 100644 index 000000000000..cb85e4269cdf --- /dev/null +++ b/src/ServiceManagement/Services/Commands/WAPackIaaS/IaaSCmdletBase.cs @@ -0,0 +1,144 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using System.Runtime.InteropServices; +using System.Security; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.WebClient; + +namespace Microsoft.WindowsAzure.Commands.WAPackIaaS +{ + public abstract class IaaSCmdletBase : AzurePSCmdlet, ILogger + { + private IRequestChannel requestChannel; + + private WebClientFactory webClientFactory; + + private Subscription subscription; + + internal WebClientFactory WebClientFactory + { + get + { + if (this.webClientFactory == null) + { + this.webClientFactory = new WebClientFactory(this.Subscription, this.RequestChannel); + } + + return this.webClientFactory; + } + } + + internal IRequestChannel RequestChannel + { + get + { + if (this.requestChannel == null) + { + this.requestChannel = new WAPackIaaSRequestChannel(this); + } + + return this.requestChannel; + } + } + + internal Subscription Subscription + { + get + { + if (subscription == null) + { + if (CurrentContext.Subscription != null) + { + subscription = new Subscription(CurrentContext.Subscription); + } + } + + return subscription; + } + } + + protected virtual void WriteErrorDetails(Exception exception) + { + WriteError(new ErrorRecord(exception, string.Empty, ErrorCategory.CloseError, null)); + } + + protected virtual bool GenerateCmdletOutput(IEnumerable results) + { + var ret = true; + foreach (var result in results) + { + try + { + WriteObject(result); + } + catch (PipelineStoppedException) + { + ret = false; + } + } + + return ret; + } + + public void Log(LogLevel logLevel, string message) + { + switch (logLevel) + { + case LogLevel.Verbose: + WriteVerbose(message); + break; + + case LogLevel.Debug: + WriteDebug(message); + break; + + default: + WriteDebug(String.Format("Logging level {0} not supported.", logLevel)); + break; + } + } + + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + protected static String ExtractSecureString(SecureString secureString) + { + var pointer = IntPtr.Zero; + try + { + pointer = Marshal.SecureStringToGlobalAllocUnicode(secureString); + return Marshal.PtrToStringUni(pointer); + } + finally + { + Marshal.ZeroFreeGlobalAllocUnicode(pointer); + } + } + + internal JobInfo WaitForJobCompletion(Guid? job) + { + JobInfo jobInfo = new JobOperations(this.WebClientFactory).WaitOnJob(job.Value); + if (jobInfo.jobStatus != JobStatusEnum.CompletedSuccessfully) + { + this.WriteErrorDetails(new Exception(jobInfo.errorMessage)); + } + return jobInfo; + } + } +} diff --git a/src/ServiceManagement/Services/Commands/WAPackIaaS/Networking/GetWAPackLogicalNetwork.cs b/src/ServiceManagement/Services/Commands/WAPackIaaS/Networking/GetWAPackLogicalNetwork.cs new file mode 100644 index 000000000000..8a218a55bc28 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/WAPackIaaS/Networking/GetWAPackLogicalNetwork.cs @@ -0,0 +1,50 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; + +namespace Microsoft.WindowsAzure.Commands.WAPackIaaS.Networking +{ + [Cmdlet(VerbsCommon.Get, "WAPackLogicalNetwork", DefaultParameterSetName = WAPackCmdletParameterSets.Empty)] + public class GetWAPackLogicalNetwork : IaaSCmdletBase + { + [Parameter(Position = 0, Mandatory = false, ParameterSetName = WAPackCmdletParameterSets.FromName, ValueFromPipelineByPropertyName = true, HelpMessage = "LogicalNetwork Name.")] + [ValidateNotNullOrEmpty] + public string Name + { + get; + set; + } + + public override void ExecuteCmdlet() + { + IEnumerable results = null; + var logicalNetworkOperations = new LogicalNetworkOperations(this.WebClientFactory); + + if (this.ParameterSetName == WAPackCmdletParameterSets.Empty) + { + results = logicalNetworkOperations.Read(); + } + else if (this.ParameterSetName == WAPackCmdletParameterSets.FromName) + { + results = logicalNetworkOperations.Read(Name); + } + + this.GenerateCmdletOutput(results); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/WAPackIaaS/Networking/GetWAPackStaticIPAddressPool.cs b/src/ServiceManagement/Services/Commands/WAPackIaaS/Networking/GetWAPackStaticIPAddressPool.cs new file mode 100644 index 000000000000..8e8c61faa1f2 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/WAPackIaaS/Networking/GetWAPackStaticIPAddressPool.cs @@ -0,0 +1,65 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; + +namespace Microsoft.WindowsAzure.Commands.WAPackIaaS.Networking +{ + [Cmdlet(VerbsCommon.Get, "WAPackStaticIPAddressPool", DefaultParameterSetName = WAPackCmdletParameterSets.FromVMSubnetObject)] + public class GetWAPackStaticIPAddressPool : IaaSCmdletBase + { + [Parameter(Position = 0, Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.FromVMSubnetObject, ValueFromPipeline = true, HelpMessage = "StaticIPAddressPool VMSubnet.")] + [Parameter(Position = 0, Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.FromName, ValueFromPipeline = true, HelpMessage = "StaticIPAddressPool VMSubnet.")] + [ValidateNotNullOrEmpty] + public VMSubnet VMSubnet + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.FromName, HelpMessage = "StaticIPAddressPool Name.")] + [ValidateNotNullOrEmpty] + public string Name + { + get; + set; + } + + public override void ExecuteCmdlet() + { + IEnumerable results = null; + var staticIPAddressPoolOperations = new StaticIPAddressPoolOperations(this.WebClientFactory); + + if (this.ParameterSetName == WAPackCmdletParameterSets.FromVMSubnetObject) + { + results = staticIPAddressPoolOperations.Read(this.VMSubnet); + } + else if (this.ParameterSetName == WAPackCmdletParameterSets.FromName) + { + var filter = new Dictionary() + { + {"StampId", this.VMSubnet.StampId.ToString()}, + {"VMSubnetId", this.VMSubnet.ID.ToString()}, + {"Name", this.Name} + }; + results = staticIPAddressPoolOperations.Read(filter); + } + + this.GenerateCmdletOutput(results); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/WAPackIaaS/Networking/GetWAPackVMSubnet.cs b/src/ServiceManagement/Services/Commands/WAPackIaaS/Networking/GetWAPackVMSubnet.cs new file mode 100644 index 000000000000..3710e26aa012 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/WAPackIaaS/Networking/GetWAPackVMSubnet.cs @@ -0,0 +1,87 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; + +namespace Microsoft.WindowsAzure.Commands.WAPackIaaS.Networking +{ + [Cmdlet(VerbsCommon.Get, "WAPackVMSubnet", DefaultParameterSetName = WAPackCmdletParameterSets.FromVMNetworkObject)] + public class GetWAPackVMSubnet : IaaSCmdletBase + { + [Parameter(Position = 0, Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.FromVMNetworkObject, ValueFromPipeline = true, HelpMessage = "VMSubnet VMNetwork.")] + [Parameter(Position = 0, Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.FromName, ValueFromPipeline = true, HelpMessage = "VMSubnet VMNetwork.")] + [Parameter(Position = 0, Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.FromId, ValueFromPipeline = true, HelpMessage = "VMSubnet VMNetwork.")] + [ValidateNotNullOrEmpty] + public VMNetwork VNet + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.FromId, HelpMessage = "VMSubnet ID.")] + [ValidateNotNullOrEmpty] + public Guid ID + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.FromName, HelpMessage = "VMSubnet Name.")] + [ValidateNotNullOrEmpty] + public string Name + { + get; + set; + } + + public override void ExecuteCmdlet() + { + IEnumerable results = null; + Guid? jobId = Guid.Empty; + + var vmSubnetOperations = new VMSubnetOperations(this.WebClientFactory); + + if (this.ParameterSetName == WAPackCmdletParameterSets.FromVMNetworkObject) + { + results = vmSubnetOperations.Read(this.VNet); + } + else if (this.ParameterSetName == WAPackCmdletParameterSets.FromName) + { + var filter = new Dictionary() + { + {"VMNetworkId", this.VNet.ID.ToString()}, + {"StampId", this.VNet.StampId.ToString()}, + {"Name", this.Name} + }; + results = vmSubnetOperations.Read(filter); + } + else if (this.ParameterSetName == WAPackCmdletParameterSets.FromId) + { + var filter = new Dictionary() + { + {"VMNetworkId", this.VNet.ID.ToString()}, + {"StampId", this.VNet.StampId.ToString()}, + {"ID", this.ID.ToString()} + }; + results = vmSubnetOperations.Read(filter); + } + + this.GenerateCmdletOutput(results); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/WAPackIaaS/Networking/GetWAPackVNet.cs b/src/ServiceManagement/Services/Commands/WAPackIaaS/Networking/GetWAPackVNet.cs new file mode 100644 index 000000000000..7619c50ed02d --- /dev/null +++ b/src/ServiceManagement/Services/Commands/WAPackIaaS/Networking/GetWAPackVNet.cs @@ -0,0 +1,68 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; + +namespace Microsoft.WindowsAzure.Commands.WAPackIaaS.Networking +{ + [Cmdlet(VerbsCommon.Get, "WAPackVNet", DefaultParameterSetName = WAPackCmdletParameterSets.Empty)] + public class GetWAPackVNet : IaaSCmdletBase + { + [Parameter(Position = 0, Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.FromId, ValueFromPipelineByPropertyName = true, HelpMessage = "VNet ID.")] + [ValidateNotNullOrEmpty] + public Guid ID + { + get; + set; + } + + [Parameter(Position = 0, Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.FromName, ValueFromPipelineByPropertyName = true, HelpMessage = "VNet Name.")] + [ValidateNotNullOrEmpty] + public string Name + { + get; + set; + } + + public override void ExecuteCmdlet() + { + IEnumerable results = null; + var vmNetworkOperations = new VMNetworkOperations(this.WebClientFactory); + + if (this.ParameterSetName == WAPackCmdletParameterSets.Empty) + { + results = vmNetworkOperations.Read(); + } + else if (this.ParameterSetName == WAPackCmdletParameterSets.FromId) + { + var vmNetwork = vmNetworkOperations.Read(ID); + results = new List() { vmNetwork }; + } + else if (this.ParameterSetName == WAPackCmdletParameterSets.FromName) + { + var filter = new Dictionary() + { + {"Name", Name} + }; + results = vmNetworkOperations.Read(filter); + } + + this.GenerateCmdletOutput(results); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/WAPackIaaS/Networking/NewWAPackStaticIPAddressPool.cs b/src/ServiceManagement/Services/Commands/WAPackIaaS/Networking/NewWAPackStaticIPAddressPool.cs new file mode 100644 index 000000000000..7e5cd34a4fdb --- /dev/null +++ b/src/ServiceManagement/Services/Commands/WAPackIaaS/Networking/NewWAPackStaticIPAddressPool.cs @@ -0,0 +1,84 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; + +namespace Microsoft.WindowsAzure.Commands.WAPackIaaS.Networking +{ + [Cmdlet(VerbsCommon.New, "WAPackStaticIPAddressPool")] + public class NewWAPackStaticIPAddressPool : IaaSCmdletBase + { + [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = "StaticIPAddressPool VMSubnet.")] + [ValidateNotNullOrEmpty] + public VMSubnet VMSubnet + { + get; + set; + } + + [Parameter(Mandatory = true, HelpMessage = "StaticIPAddressPool Name.")] + [ValidateNotNullOrEmpty] + public string Name + { + get; + set; + } + + [Parameter(Mandatory = true, HelpMessage = "StaticIPAddressPool IPAddressRangeStart.")] + [ValidateNotNullOrEmpty] + public string IPAddressRangeStart + { + get; + set; + } + + [Parameter(Mandatory = true, HelpMessage = "StaticIPAddressPool IPAddressRangeEnd.")] + [ValidateNotNullOrEmpty] + public string IPAddressRangeEnd + { + get; + set; + } + + public override void ExecuteCmdlet() + { + var staticIPAddressPool = new StaticIPAddressPool() + { + Name = this.Name, + VMSubnetId = this.VMSubnet.ID, + Subnet = this.VMSubnet.Subnet, + IPAddressRangeStart = this.IPAddressRangeStart, + IPAddressRangeEnd = this.IPAddressRangeEnd, + StampId = this.VMSubnet.StampId + }; + + Guid? jobId = Guid.Empty; + var staticIPAddressPoolOperations = new StaticIPAddressPoolOperations(this.WebClientFactory); + var createdStaticIPAddressPool = staticIPAddressPoolOperations.Create(staticIPAddressPool, out jobId); + WaitForJobCompletion(jobId); + + var filter = new Dictionary + { + {"ID", createdStaticIPAddressPool.ID.ToString()}, + {"StampId ", createdStaticIPAddressPool.StampId.ToString()} + }; + var results = staticIPAddressPoolOperations.Read(filter); + this.GenerateCmdletOutput(results); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/WAPackIaaS/Networking/NewWAPackVMSubnet.cs b/src/ServiceManagement/Services/Commands/WAPackIaaS/Networking/NewWAPackVMSubnet.cs new file mode 100644 index 000000000000..bf887105139e --- /dev/null +++ b/src/ServiceManagement/Services/Commands/WAPackIaaS/Networking/NewWAPackVMSubnet.cs @@ -0,0 +1,75 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; + +namespace Microsoft.WindowsAzure.Commands.WAPackIaaS.Networking +{ + [Cmdlet(VerbsCommon.New, "WAPackVMSubnet")] + public class NewWAPackVMSubnet : IaaSCmdletBase + { + [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = "VMSubnet VMNetwork.")] + [ValidateNotNullOrEmpty] + public VMNetwork VNet + { + get; + set; + } + + [Parameter(Mandatory = true, HelpMessage = "VMSubnet Name.")] + [ValidateNotNullOrEmpty] + public string Name + { + get; + set; + } + + [Parameter(Mandatory = true, HelpMessage = "VMSubnet Subnet.")] + [ValidateNotNullOrEmpty] + public string Subnet + { + get; + set; + } + + public override void ExecuteCmdlet() + { + var vmSubnet = new VMSubnet() + { + Name = this.Name, + VMNetworkName = this.VNet.Name, + VMNetworkId = this.VNet.ID, + Subnet = this.Subnet, + StampId = this.VNet.StampId, + }; + + Guid? jobId = Guid.Empty; + var vmSubnetOperations = new VMSubnetOperations(this.WebClientFactory); + var createdVMSubnet = vmSubnetOperations.Create(vmSubnet, out jobId); + WaitForJobCompletion(jobId); + + var filter = new Dictionary + { + {"ID", createdVMSubnet.ID.ToString()}, + {"StampId ", createdVMSubnet.StampId.ToString()} + }; + var results = vmSubnetOperations.Read(filter); + this.GenerateCmdletOutput(results); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/WAPackIaaS/Networking/NewWAPackVNet.cs b/src/ServiceManagement/Services/Commands/WAPackIaaS/Networking/NewWAPackVNet.cs new file mode 100644 index 000000000000..a28ff68a9605 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/WAPackIaaS/Networking/NewWAPackVNet.cs @@ -0,0 +1,70 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; + +namespace Microsoft.WindowsAzure.Commands.WAPackIaaS.Networking +{ + [Cmdlet(VerbsCommon.New, "WAPackVNet")] + public class NewWAPackVNet : IaaSCmdletBase + { + [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = "VNet LogicalNetwork.")] + [ValidateNotNullOrEmpty] + public LogicalNetwork LogicalNetwork + { + get; + set; + } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "VNet Name.")] + [ValidateNotNullOrEmpty] + public string Name + { + get; + set; + } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "VNet Description.")] + [ValidateNotNullOrEmpty] + public string Description + { + get; + set; + } + + public override void ExecuteCmdlet() + { + var vmNetwork = new VMNetwork() + { + Name = this.Name, + Description = this.Description, + LogicalNetworkId = this.LogicalNetwork.ID, + StampId = this.LogicalNetwork.StampId, + }; + + Guid? jobId = Guid.Empty; + var vmNetworkOperations = new VMNetworkOperations(this.WebClientFactory); + var createdVmNetwork = vmNetworkOperations.Create(vmNetwork, out jobId); + WaitForJobCompletion(jobId); + + createdVmNetwork = vmNetworkOperations.Read(createdVmNetwork.ID); + var results = new List() { createdVmNetwork }; + this.GenerateCmdletOutput(results); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/WAPackIaaS/Networking/RemoveWAPackStaticIPAddressPool.cs b/src/ServiceManagement/Services/Commands/WAPackIaaS/Networking/RemoveWAPackStaticIPAddressPool.cs new file mode 100644 index 000000000000..8113e2fa7616 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/WAPackIaaS/Networking/RemoveWAPackStaticIPAddressPool.cs @@ -0,0 +1,69 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; + +namespace Microsoft.WindowsAzure.Commands.WAPackIaaS.Networking +{ + [Cmdlet(VerbsCommon.Remove, "WAPackStaticIPAddressPool")] + public class RemoveWAPackStaticIPAddressPool : IaaSCmdletBase + { + [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = "Existing StaticIPAddressPool Object.")] + [ValidateNotNullOrEmpty] + public StaticIPAddressPool StaticIPAddressPool + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + [Parameter(Position = 2, HelpMessage = "Confirm the removal of the StaticIPAddressPool.")] + public SwitchParameter Force { get; set; } + + public override void ExecuteCmdlet() + { + ConfirmAction( + Force.IsPresent, + string.Format(Resources.RemoveStaticIPAddressPoolConfirmationMessage, StaticIPAddressPool.Name), + string.Format(Resources.RemoveStaticIPAddressPoolMessage), StaticIPAddressPool.Name, + () => + { + Guid? jobId = Guid.Empty; + var staticIPAddressPoolOperations = new StaticIPAddressPoolOperations(this.WebClientFactory); + + var filter = new Dictionary + { + {"StampId", StaticIPAddressPool.StampId.ToString()}, + {"ID ", StaticIPAddressPool.ID.ToString()} + }; + var deletedSstaticIPAddressPool = staticIPAddressPoolOperations.Read(filter)[0]; + staticIPAddressPoolOperations.Delete(deletedSstaticIPAddressPool.ID, out jobId); + var jobInfo = WaitForJobCompletion(jobId); + + if (this.PassThru) + { + WriteObject(jobInfo.jobStatus != JobStatusEnum.Failed); + } + }); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/WAPackIaaS/Networking/RemoveWAPackVMSubnet.cs b/src/ServiceManagement/Services/Commands/WAPackIaaS/Networking/RemoveWAPackVMSubnet.cs new file mode 100644 index 000000000000..9227a658620f --- /dev/null +++ b/src/ServiceManagement/Services/Commands/WAPackIaaS/Networking/RemoveWAPackVMSubnet.cs @@ -0,0 +1,79 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; + +namespace Microsoft.WindowsAzure.Commands.WAPackIaaS.Networking +{ + [Cmdlet(VerbsCommon.Remove, "WAPackVMSubnet")] + public class RemoveWAPackVMSubnet : IaaSCmdletBase + { + [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = "Existing VMSubnet Object.")] + [ValidateNotNullOrEmpty] + public VMSubnet VMSubnet + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + [Parameter(Position = 2, HelpMessage = "Confirm the removal of the VMSubnet.")] + public SwitchParameter Force { get; set; } + + public override void ExecuteCmdlet() + { + ConfirmAction( + Force.IsPresent, + string.Format(Resources.RemoveVMSubnetConfirmationMessage, VMSubnet.Name), + string.Format(Resources.RemoveVMSubnetMessage), VMSubnet.Name, + () => + { + var vmSubnetOperations = new VMSubnetOperations(this.WebClientFactory); + var staticIPAddressPoolOperations = new StaticIPAddressPoolOperations(this.WebClientFactory); + + var filter = new Dictionary + { + {"StampId", VMSubnet.StampId.ToString()}, + {"ID ", VMSubnet.ID.ToString()} + }; + var deletedSubnet = vmSubnetOperations.Read(filter)[0]; + + var deletedIpPool = staticIPAddressPoolOperations.Read(deletedSubnet); + foreach (var ipPool in deletedIpPool) + { + Guid? ipPoolJobId = Guid.Empty; + staticIPAddressPoolOperations.Delete(ipPool.ID, out ipPoolJobId); + WaitForJobCompletion(ipPoolJobId); + } + + Guid? subnetJobId = Guid.Empty; + vmSubnetOperations.Delete(deletedSubnet.ID, out subnetJobId); + var jobInfo = WaitForJobCompletion(subnetJobId); + + if (this.PassThru) + { + WriteObject(jobInfo.jobStatus != JobStatusEnum.Failed); + } + }); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/WAPackIaaS/Networking/RemoveWAPackVNet.cs b/src/ServiceManagement/Services/Commands/WAPackIaaS/Networking/RemoveWAPackVNet.cs new file mode 100644 index 000000000000..3f523561e898 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/WAPackIaaS/Networking/RemoveWAPackVNet.cs @@ -0,0 +1,84 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; + +namespace Microsoft.WindowsAzure.Commands.WAPackIaaS.Networking +{ + [Cmdlet(VerbsCommon.Remove, "WAPackVNet")] + public class RemoveWAPackVNet : IaaSCmdletBase + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipeline = true, HelpMessage = "Existing VNet Object.")] + [ValidateNotNullOrEmpty] + public VMNetwork VNet + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + [Parameter(Position = 2, HelpMessage = "Confirm the removal of the VNet.")] + public SwitchParameter Force { get; set; } + + public override void ExecuteCmdlet() + { + ConfirmAction( + Force.IsPresent, + string.Format(Resources.RemoveVMNetworkConfirmationMessage, VNet.Name), + string.Format(Resources.RemoveVMNetworkMessage), VNet.Name, + () => + { + Guid? vmNetworkJobId = Guid.Empty; + var vmNetworkOperations = new VMNetworkOperations(this.WebClientFactory); + var vmSubnetOperations = new VMSubnetOperations(this.WebClientFactory); + var staticIPAddressPoolOperations = new StaticIPAddressPoolOperations(this.WebClientFactory); + + var deletedVMNetwork = vmNetworkOperations.Read(VNet.ID); + var deletedSubnet = vmSubnetOperations.Read(VNet); + + foreach (var subnet in deletedSubnet) + { + var deletedIpPool = staticIPAddressPoolOperations.Read(subnet); + foreach (var ipPool in deletedIpPool) + { + Guid? ipPoolJobId = Guid.Empty; + staticIPAddressPoolOperations.Delete(ipPool.ID, out ipPoolJobId); + WaitForJobCompletion(ipPoolJobId); + } + } + + foreach (var subnet in deletedSubnet) + { + Guid? subnetJobId = Guid.Empty; + vmSubnetOperations.Delete(subnet.ID, out subnetJobId); + WaitForJobCompletion(subnetJobId); + } + vmNetworkOperations.Delete(VNet.ID, out vmNetworkJobId); + var jobInfo = WaitForJobCompletion(vmNetworkJobId); + + if (this.PassThru) + { + WriteObject(jobInfo.jobStatus != JobStatusEnum.Failed); + } + }); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/WAPackIaaS/VMOperationsEnum.cs b/src/ServiceManagement/Services/Commands/WAPackIaaS/VMOperationsEnum.cs new file mode 100644 index 000000000000..e30efd6d30cc --- /dev/null +++ b/src/ServiceManagement/Services/Commands/WAPackIaaS/VMOperationsEnum.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.WAPackIaaS +{ + public enum VMOperationsEnum + { + Start = 0, + Stop, + Restart, + Shutdown, + Suspend, + Resume + } +} diff --git a/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/GetWAPackVM.cs b/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/GetWAPackVM.cs new file mode 100644 index 000000000000..218b573e1d0c --- /dev/null +++ b/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/GetWAPackVM.cs @@ -0,0 +1,64 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; + +namespace Microsoft.WindowsAzure.Commands.WAPackIaaS.VirtualMachine +{ + [Cmdlet(VerbsCommon.Get, "WAPackVM", DefaultParameterSetName = WAPackCmdletParameterSets.Empty)] + public class GetWAPackVM : IaaSCmdletBase + { + [Parameter(Position = 0, Mandatory = false, ParameterSetName = WAPackCmdletParameterSets.FromName, ValueFromPipelineByPropertyName = true, HelpMessage = "VirtualMachine Name.")] + [ValidateNotNullOrEmpty] + public string Name + { + get; + set; + } + + [Parameter(Position = 0, Mandatory = false, ParameterSetName = WAPackCmdletParameterSets.FromId, ValueFromPipelineByPropertyName = true, HelpMessage = "VirtualMachine ID.")] + [ValidateNotNullOrEmpty] + public Guid ID + { + get; + set; + } + + public override void ExecuteCmdlet() + { + IEnumerable results = null; + var virtualMachineOperations = new VirtualMachineOperations(this.WebClientFactory); + + if (this.ParameterSetName == WAPackCmdletParameterSets.Empty) + { + results = virtualMachineOperations.Read(); + } + else if (this.ParameterSetName == WAPackCmdletParameterSets.FromId) + { + Utilities.WAPackIaaS.DataContract.VirtualMachine vm = null; + vm = virtualMachineOperations.Read(ID); + results = new List() { vm }; + } + else if (this.ParameterSetName == WAPackCmdletParameterSets.FromName) + { + results = virtualMachineOperations.Read(Name); + } + + this.GenerateCmdletOutput(results); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/GetWAPackVMOSDisk.cs b/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/GetWAPackVMOSDisk.cs new file mode 100644 index 000000000000..3eac68ac042e --- /dev/null +++ b/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/GetWAPackVMOSDisk.cs @@ -0,0 +1,68 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; + +namespace Microsoft.WindowsAzure.Commands.WAPackIaaS.VirtualMachine +{ + [Cmdlet(VerbsCommon.Get, "WAPackVMOSDisk", DefaultParameterSetName = WAPackCmdletParameterSets.Empty)] + public class GetWAPackVMOSDisk : IaaSCmdletBase + { + [Parameter(Position = 0, Mandatory = false, ParameterSetName = WAPackCmdletParameterSets.FromId, ValueFromPipelineByPropertyName = true, HelpMessage = "OSDisk ID.")] + [ValidateNotNullOrEmpty] + public Guid ID + { + get; + set; + } + + [Parameter(Position = 0, Mandatory = false, ParameterSetName = WAPackCmdletParameterSets.FromName, ValueFromPipelineByPropertyName = true, HelpMessage = "OSDisk Name.")] + [ValidateNotNullOrEmpty] + public string Name + { + get; + set; + } + + public override void ExecuteCmdlet() + { + IEnumerable results = null; + var virtualHardDiskOperations = new VirtualHardDiskOperations(this.WebClientFactory); + + if (this.ParameterSetName == WAPackCmdletParameterSets.Empty) + { + results = virtualHardDiskOperations.Read(); + } + else if (this.ParameterSetName == WAPackCmdletParameterSets.FromId) + { + VirtualHardDisk virtualHardDisk = null; + virtualHardDisk = virtualHardDiskOperations.Read(ID); + results = new List() { virtualHardDisk }; + } + else if (this.ParameterSetName == WAPackCmdletParameterSets.FromName) + { + results = virtualHardDiskOperations.Read(new Dictionary() + { + {"Name", Name} + }); + } + + this.GenerateCmdletOutput(results); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/GetWAPackVMSizeProfile.cs b/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/GetWAPackVMSizeProfile.cs new file mode 100644 index 000000000000..79fa627e571b --- /dev/null +++ b/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/GetWAPackVMSizeProfile.cs @@ -0,0 +1,68 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; + +namespace Microsoft.WindowsAzure.Commands.WAPackIaaS.VirtualMachine +{ + [Cmdlet(VerbsCommon.Get, "WAPackVMSizeProfile", DefaultParameterSetName = WAPackCmdletParameterSets.Empty)] + public class GetWAPackVMSizeProfile : IaaSCmdletBase + { + [Parameter(Position = 0, Mandatory = false, ParameterSetName = WAPackCmdletParameterSets.FromId, ValueFromPipelineByPropertyName = true, HelpMessage = "VMSizeProfile ID.")] + [ValidateNotNullOrEmpty] + public Guid ID + { + get; + set; + } + + [Parameter(Position = 0, Mandatory = false, ParameterSetName = WAPackCmdletParameterSets.FromName, ValueFromPipelineByPropertyName = true, HelpMessage = "VMSizeProfile Name.")] + [ValidateNotNullOrEmpty] + public string Name + { + get; + set; + } + + public override void ExecuteCmdlet() + { + IEnumerable results = null; + var hardwareProfileOperations = new HardwareProfileOperations(this.WebClientFactory); + + if (this.ParameterSetName == WAPackCmdletParameterSets.Empty) + { + results = hardwareProfileOperations.Read(); + } + else if (this.ParameterSetName == WAPackCmdletParameterSets.FromId) + { + HardwareProfile hardwareProfile = null; + hardwareProfile = hardwareProfileOperations.Read(ID); + results = new List() { hardwareProfile }; + } + else if (this.ParameterSetName == WAPackCmdletParameterSets.FromName) + { + results = hardwareProfileOperations.Read(new Dictionary() + { + {"Name", Name} + }); + } + + this.GenerateCmdletOutput(results); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/GetWAPackVMTemplate.cs b/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/GetWAPackVMTemplate.cs new file mode 100644 index 000000000000..1860bb006da6 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/GetWAPackVMTemplate.cs @@ -0,0 +1,68 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; + +namespace Microsoft.WindowsAzure.Commands.WAPackIaaS.VirtualMachine +{ + [Cmdlet(VerbsCommon.Get, "WAPackVMTemplate", DefaultParameterSetName = WAPackCmdletParameterSets.Empty)] + public class GetWAPackVMTemplate : IaaSCmdletBase + { + [Parameter(Position = 0, Mandatory = false, ParameterSetName = WAPackCmdletParameterSets.FromId, ValueFromPipelineByPropertyName = true, HelpMessage = "VMTemplate ID.")] + [ValidateNotNullOrEmpty] + public Guid ID + { + get; + set; + } + + [Parameter(Position = 0, Mandatory = false, ParameterSetName = WAPackCmdletParameterSets.FromName, ValueFromPipelineByPropertyName = true, HelpMessage = "VMTemplate Name.")] + [ValidateNotNullOrEmpty] + public string Name + { + get; + set; + } + + public override void ExecuteCmdlet() + { + IEnumerable results = null; + var vmTemplateOperations = new VMTemplateOperations(this.WebClientFactory); + + if (this.ParameterSetName == WAPackCmdletParameterSets.Empty) + { + results = vmTemplateOperations.Read(); + } + else if (this.ParameterSetName == WAPackCmdletParameterSets.FromId) + { + VMTemplate vmTemplate = null; + vmTemplate = vmTemplateOperations.Read(ID); + results = new List() { vmTemplate }; + } + else if (this.ParameterSetName == WAPackCmdletParameterSets.FromName) + { + results = vmTemplateOperations.Read(new Dictionary() + { + {"Name", Name} + }); + } + + this.GenerateCmdletOutput(results); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/NewWAPackQuickVM.cs b/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/NewWAPackQuickVM.cs new file mode 100644 index 000000000000..fb130df31ca0 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/NewWAPackQuickVM.cs @@ -0,0 +1,78 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Exceptions; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; + +namespace Microsoft.WindowsAzure.Commands.WAPackIaaS.VirtualMachine +{ + [Cmdlet(VerbsCommon.New, "WAPackQuickVM")] + public class NewWAPackQuickVM : IaaSCmdletBase + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "VirtualMachine Name.")] + [ValidateNotNullOrEmpty] + public string Name + { + get; + set; + } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "VMTemplate to be used in VM creation.")] + [ValidateNotNullOrEmpty] + public VMTemplate Template + { + get; + set; + } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Credentials for the localuser.")] + [ValidateNotNullOrEmpty] + public PSCredential VMCredential + { + get; + set; + } + + public override void ExecuteCmdlet() + { + Utilities.WAPackIaaS.DataContract.VirtualMachine pendingVirtualMachine = null; + var virtualMachineOperations = new VirtualMachineOperations(this.WebClientFactory); + Guid? jobId = Guid.Empty; + + var newVirtualMachine = new Utilities.WAPackIaaS.DataContract.VirtualMachine() + { + Name = Name, + VMTemplateId = Template.ID, + LocalAdminUserName = VMCredential.UserName, + LocalAdminPassword = ExtractSecureString(VMCredential.Password), + }; + + pendingVirtualMachine = virtualMachineOperations.Create(newVirtualMachine, out jobId); + + if (!jobId.HasValue) + { + throw new WAPackOperationException(Resources.CreateFailedErrorMessage); + } + WaitForJobCompletion(jobId); + + var createdVM = virtualMachineOperations.Read(pendingVirtualMachine.ID); + + WriteObject(createdVM); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/NewWAPackVM.cs b/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/NewWAPackVM.cs new file mode 100644 index 000000000000..d426d078b6c0 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/NewWAPackVM.cs @@ -0,0 +1,220 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Exceptions; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; + +namespace Microsoft.WindowsAzure.Commands.WAPackIaaS.VirtualMachine +{ + [Cmdlet(VerbsCommon.New, "WAPackVM", DefaultParameterSetName = WAPackCmdletParameterSets.CreateWindowsVMFromTemplate)] + public class NewWAPackVM : IaaSCmdletBase + { + [Parameter(Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.CreateLinuxVMFromTemplate, ValueFromPipelineByPropertyName = true, HelpMessage = "VirtualMachine Name.")] + [Parameter(Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.CreateWindowsVMFromTemplate, ValueFromPipelineByPropertyName = true, HelpMessage = "VirtualMachine Name.")] + [Parameter(Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.CreateVMFromOSDisks, ValueFromPipelineByPropertyName = true, HelpMessage = "VirtualMachine Name.")] + [ValidateNotNullOrEmpty] + public string Name + { + get; + set; + } + + [Parameter(Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.CreateLinuxVMFromTemplate, ValueFromPipelineByPropertyName = true, HelpMessage = "VMTemplate to be used in VM creation.")] + [Parameter(Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.CreateWindowsVMFromTemplate, ValueFromPipelineByPropertyName = true, HelpMessage = "VMTemplate to be used in VM creation.")] + [ValidateNotNullOrEmpty] + public VMTemplate Template + { + get; + set; + } + + [Parameter(Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.CreateLinuxVMFromTemplate, ValueFromPipelineByPropertyName = true, HelpMessage = "Credentials for Admistrator account for Linux VM")] + [Parameter(Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.CreateWindowsVMFromTemplate, ValueFromPipelineByPropertyName = true, HelpMessage = "Credentials for the localuser for Windows VM.")] + [ValidateNotNullOrEmpty] + public PSCredential VMCredential + { + get; + set; + } + + [Parameter(Mandatory = false, ParameterSetName = WAPackCmdletParameterSets.CreateLinuxVMFromTemplate, ValueFromPipelineByPropertyName = true, HelpMessage = "The Vnetwork to which the VirtualMachine should be connected.")] + [Parameter(Mandatory = false, ParameterSetName = WAPackCmdletParameterSets.CreateWindowsVMFromTemplate, ValueFromPipelineByPropertyName = true, HelpMessage = "The Vnetwork to which the VirtualMachine should be connected.")] + [Parameter(Mandatory = false, ParameterSetName = WAPackCmdletParameterSets.CreateVMFromOSDisks, ValueFromPipelineByPropertyName = true, HelpMessage = "The Vnetwork to which the VirtualMachine should be connected.")] + [ValidateNotNullOrEmpty] + public VMNetwork VNet + { + get; + set; + } + + [Parameter(Mandatory = false, ParameterSetName = WAPackCmdletParameterSets.CreateWindowsVMFromTemplate, ValueFromPipelineByPropertyName = true, HelpMessage = "ProductKey for the OS used on the template.")] + [ValidateNotNullOrEmpty] + public string ProductKey + { + get; + set; + } + + [Parameter(Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.CreateVMFromOSDisks, ValueFromPipelineByPropertyName = true, HelpMessage = "OSDisk(Win 2012, Win 2008 R2, etc) to be used in VM creation.")] + [ValidateNotNullOrEmpty] + public VirtualHardDisk OSDisk + { + get; + set; + } + + [Parameter(Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.CreateVMFromOSDisks, ValueFromPipelineByPropertyName = true, HelpMessage = "VMSizeProfile(small, large, etc) to be used in VM creation.")] + [ValidateNotNullOrEmpty] + public HardwareProfile VMSizeProfile + { + get; + set; + } + + [Parameter(Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.CreateWindowsVMFromTemplate, ValueFromPipelineByPropertyName = true, HelpMessage = "Creates a Windows VM.")] + [ValidateNotNullOrEmpty] + public SwitchParameter Windows + { + get; + set; + } + + [Parameter(Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.CreateLinuxVMFromTemplate, ValueFromPipelineByPropertyName = true, HelpMessage = "Creates a Linux VM.")] + [ValidateNotNullOrEmpty] + public SwitchParameter Linux + { + get; + set; + } + + [Parameter(Mandatory = false, ParameterSetName = WAPackCmdletParameterSets.CreateLinuxVMFromTemplate, ValueFromPipelineByPropertyName = true, HelpMessage = "The administrator SSH key for Linux VM.")] + [ValidateNotNullOrEmpty] + public string AdministratorSSHKey + { + get; + set; + } + + public override void ExecuteCmdlet() + { + Utilities.WAPackIaaS.DataContract.VirtualMachine newVirtualMachine = null; + var virtualMachineOperations = new VirtualMachineOperations(this.WebClientFactory); + Guid? jobId = Guid.Empty; + + var virtualNetworkAdaptersWithVNet = this.CustomizeVnaInput(); + + if (this.ParameterSetName == WAPackCmdletParameterSets.CreateWindowsVMFromTemplate) + { + newVirtualMachine = new Utilities.WAPackIaaS.DataContract.VirtualMachine() + { + Name = Name, + VMTemplateId = Template.ID, + LocalAdminUserName = VMCredential.UserName, + LocalAdminPassword = ExtractSecureString(VMCredential.Password), + NewVirtualNetworkAdapterInput = virtualNetworkAdaptersWithVNet, + ProductKey = ProductKey, + }; + } + else if (this.ParameterSetName == WAPackCmdletParameterSets.CreateLinuxVMFromTemplate) + { + newVirtualMachine = new Utilities.WAPackIaaS.DataContract.VirtualMachine() + { + Name = Name, + VMTemplateId = Template.ID, + LocalAdminUserName = VMCredential.UserName, + LocalAdminPassword = ExtractSecureString(VMCredential.Password), + NewVirtualNetworkAdapterInput = virtualNetworkAdaptersWithVNet, + LinuxAdministratorSSHKeyString = AdministratorSSHKey + }; + } + else if (this.ParameterSetName == WAPackCmdletParameterSets.CreateVMFromOSDisks) + { + newVirtualMachine = new Utilities.WAPackIaaS.DataContract.VirtualMachine() + { + Name = Name, + HardwareProfileId = VMSizeProfile.ID, + VirtualHardDiskId = OSDisk.ID, + NewVirtualNetworkAdapterInput = virtualNetworkAdaptersWithVNet + }; + } + + var createdVirtualMachine = virtualMachineOperations.Create(newVirtualMachine, out jobId); + + if (!jobId.HasValue) + { + throw new WAPackOperationException(Resources.CreateFailedErrorMessage); + } + WaitForJobCompletion(jobId); + + createdVirtualMachine = virtualMachineOperations.Read(createdVirtualMachine.ID); + WriteObject(createdVirtualMachine); + } + + private ObservableCollection CustomizeVnaInput() + { + if (VNet == null) + { + return new ObservableCollection(); + } + else + { + if (this.ParameterSetName == WAPackCmdletParameterSets.CreateLinuxVMFromTemplate || + this.ParameterSetName == WAPackCmdletParameterSets.CreateWindowsVMFromTemplate) + { + return CustomizeVnaOnTemplate(); + } + else if (this.ParameterSetName == WAPackCmdletParameterSets.CreateVMFromOSDisks) + { + var adapterInput = new NewVMVirtualNetworkAdapterInput() + { + VMNetworkName = VNet.Name + }; + + return new ObservableCollection(){adapterInput}; + } + + return new ObservableCollection(); + } + } + + private ObservableCollection CustomizeVnaOnTemplate() + { + var templateOps = new VMTemplateOperations(this.WebClientFactory); + List templateWithVnas = templateOps.Read(new Dictionary() { { "ID", this.Template.ID.ToString() } }, "VirtualNetworkAdapters"); + + if (templateWithVnas != null && templateWithVnas.Count < 0) + { + return new ObservableCollection(); + } + else + { + var adapterInputs = new ObservableCollection(); + for (var i = 0; i < templateWithVnas[0].VirtualNetworkAdapters.Count; i++) + { + adapterInputs.Add(new NewVMVirtualNetworkAdapterInput()); + } + + adapterInputs[0].VMNetworkName = VNet.Name; + + return adapterInputs; + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/RemoveWAPackVM.cs b/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/RemoveWAPackVM.cs new file mode 100644 index 000000000000..5d1235fafe25 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/RemoveWAPackVM.cs @@ -0,0 +1,68 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Exceptions; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; + +namespace Microsoft.WindowsAzure.Commands.WAPackIaaS.VirtualMachine +{ + [Cmdlet(VerbsCommon.Remove, "WAPackVM", DefaultParameterSetName = WAPackCmdletParameterSets.FromVirtualMachineObject, SupportsShouldProcess = true)] + public class RemoveWAPackVM : IaaSCmdletBase + { + [Parameter(Position = 0, Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.FromVirtualMachineObject, ValueFromPipeline = true, HelpMessage = "Existing VirtualMachine Object.")] + [ValidateNotNullOrEmpty] + public Utilities.WAPackIaaS.DataContract.VirtualMachine VM + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + [Parameter(Position = 2, HelpMessage = "Confirm the removal of the VM")] + public SwitchParameter Force { get; set; } + + public override void ExecuteCmdlet() + { + var virtualMachineOperations = new VirtualMachineOperations(this.WebClientFactory); + Guid? jobId = null; + + ConfirmAction( + Force.IsPresent, + string.Format(Resources.RemoveVMConfirmationMessage, VM.Name), + string.Format(Resources.RemoveVMMessage), + VM.Name, + () => + { + virtualMachineOperations.Delete(VM.ID, out jobId); + + if (!jobId.HasValue) + { + throw new WAPackOperationException(String.Format(Resources.OperationFailedErrorMessage, Resources.Delete, VM.ID)); + } + var jobInfo = WaitForJobCompletion(jobId); + + if (PassThru) + { + WriteObject(jobInfo.jobStatus != JobStatusEnum.Failed); + } + }); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/RestartWAPackVM.cs b/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/RestartWAPackVM.cs new file mode 100644 index 000000000000..9185dcff2c48 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/RestartWAPackVM.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; + +namespace Microsoft.WindowsAzure.Commands.WAPackIaaS.VirtualMachine +{ + [Cmdlet(VerbsLifecycle.Restart, "WAPackVM", DefaultParameterSetName = WAPackCmdletParameterSets.FromVirtualMachineObject)] + public class RestartWAPackVM : VMOperationsCmdlet + { + public override void ExecuteCmdlet() + { + this.ExecuteVMOperation(VMOperationsEnum.Restart); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/ResumeWAPackVM.cs b/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/ResumeWAPackVM.cs new file mode 100644 index 000000000000..c2c87fd05f6d --- /dev/null +++ b/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/ResumeWAPackVM.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; + +namespace Microsoft.WindowsAzure.Commands.WAPackIaaS.VirtualMachine +{ + [Cmdlet(VerbsLifecycle.Resume, "WAPackVM", DefaultParameterSetName = WAPackCmdletParameterSets.FromVirtualMachineObject)] + public class ResumeWAPackVM : VMOperationsCmdlet + { + public override void ExecuteCmdlet() + { + this.ExecuteVMOperation(VMOperationsEnum.Resume); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/SetWAPackVM.cs b/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/SetWAPackVM.cs new file mode 100644 index 000000000000..1a0aacd93693 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/SetWAPackVM.cs @@ -0,0 +1,75 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.DataContract; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Exceptions; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; + +namespace Microsoft.WindowsAzure.Commands.WAPackIaaS.VirtualMachine +{ + [Cmdlet(VerbsCommon.Set, "WAPackVM", DefaultParameterSetName = WAPackCmdletParameterSets.UpdateVMSizeProfile)] + public class SetWAPackVM : IaaSCmdletBase + { + [Parameter(Position = 0, Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.UpdateVMSizeProfile, ValueFromPipeline = true, HelpMessage = "Existing VirtualMachine Object.")] + [ValidateNotNullOrEmpty] + public Utilities.WAPackIaaS.DataContract.VirtualMachine VM + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.UpdateVMSizeProfile, HelpMessage = "Existing VMSizeProfile Object.")] + [ValidateNotNullOrEmpty] + public HardwareProfile VMSizeProfile + { + get; + set; + } + + [Parameter(Position = 2, Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + var virtualMachineOperations = new VirtualMachineOperations(this.WebClientFactory); + Guid? jobId = Guid.Empty; + + var vmToUpdate = virtualMachineOperations.Read(VM.ID); + + this.SetSizeProfile(vmToUpdate); + var updatedVirtualMachine = virtualMachineOperations.Update(vmToUpdate, out jobId); + + if (!jobId.HasValue) + { + throw new WAPackOperationException(String.Format(Resources.OperationFailedErrorMessage, Resources.Update, VM.ID)); + } + WaitForJobCompletion(jobId); + + if (PassThru) + { + updatedVirtualMachine = virtualMachineOperations.Read(updatedVirtualMachine.ID); + WriteObject(updatedVirtualMachine); + } + } + + private void SetSizeProfile(Utilities.WAPackIaaS.DataContract.VirtualMachine vm) + { + vm.CPUCount = VMSizeProfile.CPUCount; + vm.Memory = VMSizeProfile.Memory; + } + } +} diff --git a/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/StartWAPackVM.cs b/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/StartWAPackVM.cs new file mode 100644 index 000000000000..1ea880c14c1f --- /dev/null +++ b/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/StartWAPackVM.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; + +namespace Microsoft.WindowsAzure.Commands.WAPackIaaS.VirtualMachine +{ + [Cmdlet(VerbsLifecycle.Start, "WAPackVM", DefaultParameterSetName = WAPackCmdletParameterSets.FromVirtualMachineObject)] + public class StartWAPackVM : VMOperationsCmdlet + { + public override void ExecuteCmdlet() + { + this.ExecuteVMOperation(VMOperationsEnum.Start); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/StopWAPackVM.cs b/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/StopWAPackVM.cs new file mode 100644 index 000000000000..db74a34f8c34 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/StopWAPackVM.cs @@ -0,0 +1,42 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; + +namespace Microsoft.WindowsAzure.Commands.WAPackIaaS.VirtualMachine +{ + [Cmdlet(VerbsLifecycle.Stop, "WAPackVM", DefaultParameterSetName = WAPackCmdletParameterSets.FromVirtualMachineObject)] + public class StopWAPackVM : VMOperationsCmdlet + { + [Parameter(Mandatory = false, ParameterSetName = WAPackCmdletParameterSets.FromVirtualMachineObject, HelpMessage = "Shutdown an existing VirtualMachine.")] + [ValidateNotNullOrEmpty] + public SwitchParameter Shutdown + { + get; + set; + } + + public override void ExecuteCmdlet() + { + if (Shutdown.IsPresent) + { + this.ExecuteVMOperation(VMOperationsEnum.Shutdown); + } + else + { + this.ExecuteVMOperation(VMOperationsEnum.Stop); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/SuspendWAPackVM.cs b/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/SuspendWAPackVM.cs new file mode 100644 index 000000000000..85fbe7cd2c4d --- /dev/null +++ b/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/SuspendWAPackVM.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; + +namespace Microsoft.WindowsAzure.Commands.WAPackIaaS.VirtualMachine +{ + [Cmdlet(VerbsLifecycle.Suspend, "WAPackVM", DefaultParameterSetName = WAPackCmdletParameterSets.FromVirtualMachineObject)] + public class SuspendWAPackVM : VMOperationsCmdlet + { + public override void ExecuteCmdlet() + { + this.ExecuteVMOperation(VMOperationsEnum.Suspend); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/VMOperationsCmdlet.cs b/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/VMOperationsCmdlet.cs new file mode 100644 index 000000000000..3c15dac5167f --- /dev/null +++ b/src/ServiceManagement/Services/Commands/WAPackIaaS/VirtualMachine/VMOperationsCmdlet.cs @@ -0,0 +1,88 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Exceptions; +using Microsoft.WindowsAzure.Commands.Utilities.WAPackIaaS.Operations; + +namespace Microsoft.WindowsAzure.Commands.WAPackIaaS.VirtualMachine +{ + public class VMOperationsCmdlet : IaaSCmdletBase + { + [Parameter(Position = 0, Mandatory = true, ParameterSetName = WAPackCmdletParameterSets.FromVirtualMachineObject, ValueFromPipeline = true, HelpMessage = "Existing VirtualMachine Object.")] + [ValidateNotNullOrEmpty] + public Utilities.WAPackIaaS.DataContract.VirtualMachine VM + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + protected void ExecuteVMOperation(VMOperationsEnum operation) + { + var virtualMachineOperations = new VirtualMachineOperations(this.WebClientFactory); + Guid? job = null; + Utilities.WAPackIaaS.DataContract.VirtualMachine virtualMachine = null; + + switch (operation) + { + case VMOperationsEnum.Start: + virtualMachine = virtualMachineOperations.Start(VM.ID, out job); + break; + + case VMOperationsEnum.Stop: + virtualMachine = virtualMachineOperations.Stop(VM.ID, out job); + break; + + case VMOperationsEnum.Restart: + virtualMachine = virtualMachineOperations.Restart(VM.ID, out job); + break; + + case VMOperationsEnum.Shutdown: + virtualMachine = virtualMachineOperations.Shutdown(VM.ID, out job); + break; + + case VMOperationsEnum.Suspend: + virtualMachine = virtualMachineOperations.Suspend(VM.ID, out job); + break; + + case VMOperationsEnum.Resume: + virtualMachine = virtualMachineOperations.Resume(VM.ID, out job); + break; + } + + if (!job.HasValue) + { + throw new WAPackOperationException(String.Format(Resources.OperationFailedErrorMessage, operation, VM.ID)); + } + WaitForJobCompletion(job); + + if (PassThru) + { + var updatedVMObject = virtualMachineOperations.Read(virtualMachine.ID); + WriteObject(updatedVMObject); + } + } + + public override void ExecuteCmdlet() + { + // no-op + } + + } +} diff --git a/src/ServiceManagement/Services/Commands/WAPackIaaS/WAPackCmdletParameterSets.cs b/src/ServiceManagement/Services/Commands/WAPackIaaS/WAPackCmdletParameterSets.cs new file mode 100644 index 000000000000..25ed3c39aa30 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/WAPackIaaS/WAPackCmdletParameterSets.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.WAPackIaaS +{ + internal static class WAPackCmdletParameterSets + { + internal const string Empty = "Empty"; + internal const string FromName = "FromName"; + internal const string FromId = "FromId"; + internal const string QuickCreate = "QuickCreate"; + internal const string CreateWindowsVMFromTemplate = "CreateVMFromTemplate"; + internal const string CreateVMFromOSDisks = "CreateVMFromOSDisk"; + internal const string FromVirtualMachineObject = "FromVirtualMachineObject"; + internal const string FromVMRoleObject = "FromVMRoleObject"; + internal const string FromCloudService = "FromCloudService"; + internal const string FromCloudServiceObject = "FromCloudServiceObject"; + internal const string FromVMNetworkObject = "FromVMNetworkObject"; + internal const string FromVMSubnetObject = "FromVMSubnetObject"; + internal const string UpdateVMSizeProfile = "UpdateVMSizeProfile"; + internal const string GetRDPFile = "GetRDPFile"; + internal const string CreateLinuxVMFromTemplate = "CreateLinuxVMFromTemplate"; + } +} diff --git a/src/ServiceManagement/Services/Commands/Websites/DisableAzureWebsiteDebug.cs b/src/ServiceManagement/Services/Commands/Websites/DisableAzureWebsiteDebug.cs new file mode 100644 index 000000000000..4d426e6f5a7c --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Websites/DisableAzureWebsiteDebug.cs @@ -0,0 +1,50 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; + +namespace Microsoft.WindowsAzure.Commands.Websites +{ + [Cmdlet(VerbsLifecycle.Disable, "AzureWebsiteDebug"), OutputType(typeof(bool))] + public class DisableAzureWebsiteDebugCommand : WebsiteContextBaseCmdlet + { + private Site website; + + private SiteConfig siteConfig; + + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + // Get current config + website = WebsitesClient.GetWebsite(Name, Slot); + siteConfig = WebsitesClient.GetWebsiteConfiguration(Name, Slot); + + // Update the configuration + if (siteConfig.RemoteDebuggingEnabled.Value) + { + siteConfig.RemoteDebuggingEnabled = false; + WebsitesClient.UpdateWebsiteConfiguration(Name, siteConfig, Slot); + } + + if (PassThru.IsPresent) + { + WriteObject(true); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Websites/DisableAzureWebsiteDiagnostic.cs b/src/ServiceManagement/Services/Commands/Websites/DisableAzureWebsiteDiagnostic.cs new file mode 100644 index 000000000000..397189d7ba3f --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Websites/DisableAzureWebsiteDiagnostic.cs @@ -0,0 +1,68 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Common; + +namespace Microsoft.WindowsAzure.Commands.Websites +{ + [Cmdlet(VerbsLifecycle.Disable, "AzureWebsiteApplicationDiagnostic"), OutputType(typeof(bool))] + public class DisableAzureWebsiteApplicationDiagnosticCommand : WebsiteContextBaseCmdlet + { + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "File switch.")] + public SwitchParameter File { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Table storage switch.")] + public SwitchParameter TableStorage { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Blob storage switch.")] + public SwitchParameter BlobStorage { get; set; } + + public override void ExecuteCmdlet() + { + if (!File.IsPresent && !TableStorage.IsPresent && !BlobStorage.IsPresent) + { + WebsitesClient.DisableApplicationDiagnostic(Name, WebsiteDiagnosticOutput.FileSystem); + WebsitesClient.DisableApplicationDiagnostic(Name, WebsiteDiagnosticOutput.StorageTable); + WebsitesClient.DisableApplicationDiagnostic(Name, WebsiteDiagnosticOutput.StorageBlob); + } + else + { + if (File.IsPresent) + { + WebsitesClient.DisableApplicationDiagnostic(Name, WebsiteDiagnosticOutput.FileSystem, Slot); + } + + if (TableStorage.IsPresent) + { + WebsitesClient.DisableApplicationDiagnostic(Name, WebsiteDiagnosticOutput.StorageTable, Slot); + } + + if (BlobStorage.IsPresent) + { + WebsitesClient.DisableApplicationDiagnostic(Name, WebsiteDiagnosticOutput.StorageBlob, Slot); + } + } + + if (PassThru.IsPresent) + { + WriteObject(true); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Websites/EnableAzureWebsiteDebug.cs b/src/ServiceManagement/Services/Commands/Websites/EnableAzureWebsiteDebug.cs new file mode 100644 index 000000000000..2a1e873cd991 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Websites/EnableAzureWebsiteDebug.cs @@ -0,0 +1,55 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; +using Microsoft.WindowsAzure.Management.WebSites.Models; + +namespace Microsoft.WindowsAzure.Commands.Websites +{ + [Cmdlet(VerbsLifecycle.Enable, "AzureWebsiteDebug"), OutputType(typeof(bool))] + public class EnableAzureWebsiteDebugCommand : WebsiteContextBaseCmdlet + { + private Site website; + + private SiteConfig siteConfig; + + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The visual studio version.")] + public RemoteDebuggingVersion Version { get; set; } + + public override void ExecuteCmdlet() + { + // Get current config + website = WebsitesClient.GetWebsite(Name, Slot); + siteConfig = WebsitesClient.GetWebsiteConfiguration(Name, Slot); + + // Update the configuration + if (!siteConfig.RemoteDebuggingEnabled.Value) + { + siteConfig.RemoteDebuggingEnabled = true; + siteConfig.RemoteDebuggingVersion = Version; + WebsitesClient.UpdateWebsiteConfiguration(Name, siteConfig, Slot); + } + + if (PassThru.IsPresent) + { + WriteObject(true); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Websites/EnableAzureWebsiteDiagnostic.cs b/src/ServiceManagement/Services/Commands/Websites/EnableAzureWebsiteDiagnostic.cs new file mode 100644 index 000000000000..105ddd37a2c2 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Websites/EnableAzureWebsiteDiagnostic.cs @@ -0,0 +1,102 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.DeploymentEntities; + +namespace Microsoft.WindowsAzure.Commands.Websites +{ + [Cmdlet(VerbsLifecycle.Enable, "AzureWebsiteApplicationDiagnostic"), OutputType(typeof(bool))] + public class EnableAzureWebsiteApplicationDiagnosticCommand : WebsiteContextBaseCmdlet + { + private const string FileParameterSetName = "FileParameterSet"; + + private const string TableStorageParameterSetName = "TableStorageParameterSet"; + + private const string BlobStorageParameterSetName = "BlobStorageParameterSet"; + + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = FileParameterSetName)] + public SwitchParameter File { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = TableStorageParameterSetName)] + public SwitchParameter TableStorage { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = BlobStorageParameterSetName)] + public SwitchParameter BlobStorage { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = FileParameterSetName)] + [Parameter(Mandatory = true, ParameterSetName = TableStorageParameterSetName)] + [Parameter(Mandatory = true, ParameterSetName = BlobStorageParameterSetName)] + public LogEntryType LogLevel { get; set; } + + [Parameter(Mandatory = false, ParameterSetName = TableStorageParameterSetName)] + [Parameter(Mandatory = false, ParameterSetName = BlobStorageParameterSetName)] + public string StorageAccountName { get; set; } + + [Parameter(Mandatory = false, ParameterSetName = TableStorageParameterSetName)] + public string StorageTableName { get; set; } + + [Parameter(Mandatory = false, ParameterSetName = BlobStorageParameterSetName)] + public string StorageBlobContainerName { get; set; } + + public override void ExecuteCmdlet() + { + var properties = new Dictionary(); + properties[DiagnosticProperties.LogLevel] = LogLevel; + + if (File.IsPresent) + { + WebsitesClient.EnableApplicationDiagnostic(Name, WebsiteDiagnosticOutput.FileSystem, properties, Slot); + } + else if (TableStorage.IsPresent || BlobStorage.IsPresent) + { + properties[DiagnosticProperties.StorageAccountName] = string.IsNullOrEmpty(StorageAccountName) ? + CurrentContext.Subscription.GetProperty(AzureSubscription.Property.StorageAccount) : StorageAccountName; + + if (TableStorage.IsPresent) + { + properties[DiagnosticProperties.StorageTableName] = string.IsNullOrEmpty(StorageTableName) + ? "websitesapplogs" + Name.ToLowerInvariant() : StorageTableName.ToLowerInvariant(); + + WebsitesClient.EnableApplicationDiagnostic(Name, WebsiteDiagnosticOutput.StorageTable, properties, Slot); + } + else + { + // Blob storage + + properties[DiagnosticProperties.StorageBlobContainerName] = string.IsNullOrEmpty(StorageBlobContainerName) + ? "websitesapplogs-" + Name.ToLowerInvariant() : StorageBlobContainerName.ToLowerInvariant(); + + WebsitesClient.EnableApplicationDiagnostic(Name, WebsiteDiagnosticOutput.StorageBlob, properties, Slot); + } + } + else + { + throw new PSArgumentException(); + } + + if (PassThru.IsPresent) + { + WriteObject(true); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Websites/GetAzureWebSite.cs b/src/ServiceManagement/Services/Commands/Websites/GetAzureWebSite.cs new file mode 100644 index 000000000000..212410c9c50a --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Websites/GetAzureWebSite.cs @@ -0,0 +1,150 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.DeploymentEntities; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; + +namespace Microsoft.WindowsAzure.Commands.Websites +{ + /// + /// Gets an azure website. + /// + [Cmdlet(VerbsCommon.Get, "AzureWebsite"), OutputType(typeof(SiteWithConfig), typeof(IEnumerable))] + public class GetAzureWebsiteCommand : WebsiteContextBaseCmdlet + { + public GetAzureWebsiteCommand() + { + websiteNameDiscovery = false; + } + + protected virtual void WriteWebsites(IEnumerable websites) + { + WriteObject(websites, true); + } + + public override void ExecuteCmdlet() + { + if (!string.IsNullOrEmpty(Name)) + { + GetByName(); + } + else + { + GetNoName(); + } + } + + private void GetByName() + { + Do(() => + { + if (string.IsNullOrEmpty(Slot)) + { + List websites = WebsitesClient.GetWebsiteSlots(Name); + Cache.SaveSites(CurrentContext.Subscription.Id.ToString(), new Sites(websites)); + + if (websites.Count > 1) + { + WriteWebsites(websites); + } + else if (websites.Count == 1) + { + Site websiteObject = websites[0]; + WriteWebsite(websiteObject); + } + } + else + { + Site websiteObject = WebsitesClient.GetWebsite(Name, Slot); + WriteWebsite(websiteObject); + } + }); + } + + private void WriteWebsite(Site websiteObject) + { + SiteConfig config = WebsitesClient.GetWebsiteConfiguration(websiteObject.Name); + + var diagnosticSettings = new DiagnosticsSettings(); + try + { + diagnosticSettings = WebsitesClient.GetApplicationDiagnosticsSettings(websiteObject.Name); + } + catch + { + // Ignore exception and use default values + } + + WebsiteInstance[] instanceIds; + try + { + instanceIds = WebsitesClient.ListWebsiteInstances(websiteObject.WebSpace, websiteObject.Name); + } + catch + { + // TODO: Temporary workaround for issue where slots are not supported with this API (yet). + instanceIds = new WebsiteInstance[0]; + } + + WriteObject(new SiteWithConfig(websiteObject, config, diagnosticSettings, instanceIds), false); + } + + private void GetNoName() + { + Do(() => + { + List websites; + if (string.IsNullOrEmpty(Slot)) + { + websites = WebsitesClient.ListWebsites(); + } + else + { + websites = WebsitesClient.ListWebsites(Slot); + } + + Cache.SaveSites(CurrentContext.Subscription.Id.ToString(), new Sites(websites)); + WriteWebsites(websites); + }); + } + + private void Do(Action call) + { + try + { + call(); + } + catch (CloudException ex) + { + if (ex.Response.StatusCode == System.Net.HttpStatusCode.Forbidden) + { + WriteError(new ErrorRecord(new Exception(Resources.CommunicationCouldNotBeEstablished, ex), string.Empty, ErrorCategory.InvalidData, null)); + throw; + } + if (ex.Response.StatusCode == System.Net.HttpStatusCode.NotFound) + { + throw new Exception(string.Format(Resources.InvalidWebsite, Name)); + } + throw; + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Websites/GetAzureWebsiteDeployment.cs b/src/ServiceManagement/Services/Commands/Websites/GetAzureWebsiteDeployment.cs new file mode 100644 index 000000000000..20864e24fd1d --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Websites/GetAzureWebsiteDeployment.cs @@ -0,0 +1,116 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.DeploymentEntities; + +namespace Microsoft.WindowsAzure.Commands.Websites +{ + /// + /// Gets the git deployments. + /// + [Cmdlet(VerbsCommon.Get, "AzureWebsiteDeployment"), OutputType(typeof(List))] + public class GetAzureWebsiteDeploymentCommand : DeploymentBaseCmdlet + { + internal const int DefaultMaxResults = 20; + + [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The maximum number of results to display.")] + [ValidateNotNullOrEmpty] + public string CommitId + { + get; + set; + } + + [Parameter(Position = 2, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The maximum number of results to display.")] + [ValidateNotNullOrEmpty] + public int? MaxResults + { + get; + set; + } + + [Parameter(HelpMessage = "show deployment details")] + public SwitchParameter Details + { + get; + set; + } + + /// + /// Initializes a new instance of the GetAzureWebsiteDeploymentCommand class. + /// + public GetAzureWebsiteDeploymentCommand() + : this(null) + { + } + + /// + /// Initializes a new instance of the GetAzureWebsiteDeploymentCommand class. + /// + /// + /// Channel used for communication with the git repository. + /// + public GetAzureWebsiteDeploymentCommand(IDeploymentServiceManagement deploymentChannel) + { + DeploymentChannel = deploymentChannel; + } + + internal void SetDetails(DeployResult deployResult) + { + InvokeInDeploymentOperationContext(() => { deployResult.Logs = DeploymentChannel.GetDeploymentLogs(deployResult.Id); }); + } + + public override void ExecuteCmdlet() + { + base.ExecuteCmdlet(); + + InvokeInDeploymentOperationContext(() => + { + List deployments = DeploymentChannel.GetDeployments(MaxResults ?? DefaultMaxResults); + + if (CommitId != null) + { + DeployResult deployment = deployments.FirstOrDefault(d => d.Id.Equals(CommitId)); + if (deployment == null) + { + throw new Exception(string.Format(Resources.InvalidDeployment, CommitId)); + } + + if (Details) + { + SetDetails(deployment); + } + + deployments.Add(deployment); + } + else if (Details) + { + foreach (DeployResult deployResult in deployments) + { + SetDetails(deployResult); + } + } + + WriteObject(deployments, true); + }); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Websites/GetAzureWebsiteLocation.cs b/src/ServiceManagement/Services/Commands/Websites/GetAzureWebsiteLocation.cs new file mode 100644 index 000000000000..2782775a1d49 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Websites/GetAzureWebsiteLocation.cs @@ -0,0 +1,32 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Common; + +namespace Microsoft.WindowsAzure.Commands.Websites +{ + /// + /// Gets an azure website. + /// + [Cmdlet(VerbsCommon.Get, "AzureWebsiteLocation"), OutputType(typeof(ICollection))] + public class GetAzureWebsiteLocationCommand : WebsiteBaseCmdlet + { + public override void ExecuteCmdlet() + { + WriteObject(WebsitesClient.ListAvailableLocations(), true); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Websites/GetAzureWebsiteLog.cs b/src/ServiceManagement/Services/Commands/Websites/GetAzureWebsiteLog.cs new file mode 100644 index 000000000000..94947c5b5514 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Websites/GetAzureWebsiteLog.cs @@ -0,0 +1,98 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services; + +namespace Microsoft.WindowsAzure.Commands.Websites +{ + /// + /// Gets an azure website. + /// + [Cmdlet(VerbsCommon.Get, "AzureWebsiteLog"), OutputType(typeof(string))] + public class GetAzureWebsiteLogCommand : DeploymentBaseCmdlet + { + private const string TailParameterSet = "Tail"; + + private const string ListPathParameterSet = "ListPath"; + + public Predicate StopCondition; + + public const int WaitInterval = 10000; + + [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true, + ParameterSetName = TailParameterSet, HelpMessage = "The log path.")] + [ValidateNotNullOrEmpty] + public string Path { get; set; } + + [Parameter(Position = 2, Mandatory = false, ValueFromPipelineByPropertyName = true, + ParameterSetName = TailParameterSet, HelpMessage = "The search subsrting.")] + [ValidateNotNullOrEmpty] + public string Message { get; set; } + + [Parameter(Position = 3, Mandatory = true, ValueFromPipelineByPropertyName = true, + ParameterSetName = TailParameterSet, HelpMessage = "The log streaming switch.")] + public SwitchParameter Tail { get; set; } + + [Parameter(Position = 3, Mandatory = true, ValueFromPipelineByPropertyName = true, + ParameterSetName = ListPathParameterSet, HelpMessage = "List the available paths")] + public SwitchParameter ListPath { get; set; } + + /// + /// Initializes a new instance of the GetAzureWebsiteLogCommand class. + /// + public GetAzureWebsiteLogCommand() + : this(null) + { + } + + /// + /// Initializes a new instance of the GetAzureWebsiteLogCommand class. + /// + /// + /// Channel used for communication with the git repository. + /// + public GetAzureWebsiteLogCommand( + IDeploymentServiceManagement deploymentChannel) + { + DeploymentChannel = deploymentChannel; + } + + public override void ExecuteCmdlet() + { + base.ExecuteCmdlet(); + + if (Tail.IsPresent) + { + foreach (string logLine in WebsitesClient.StartLogStreaming( + Name, + Slot, + Path, + Message, + StopCondition, + WaitInterval)) + { + WriteObject(logLine); + } + } + else if (ListPath.IsPresent) + { + WriteObject(WebsitesClient.ListLogPaths(Name, Slot).Select(i => i.Name), true); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Websites/GetAzureWebsiteMetric.cs b/src/ServiceManagement/Services/Commands/Websites/GetAzureWebsiteMetric.cs new file mode 100644 index 000000000000..f1f603f1ab94 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Websites/GetAzureWebsiteMetric.cs @@ -0,0 +1,75 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; + +namespace Microsoft.WindowsAzure.Commands.Websites +{ + /// + /// Gets an azure website. + /// + [Cmdlet(VerbsCommon.Get, "AzureWebsiteMetric"), OutputType(typeof(IList))] + public class GetAzureWebsiteMetricCommand : WebsiteContextBaseCmdlet + { + [Parameter(Position = 2, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "List of metrics names to retrieve.")] + [ValidateNotNullOrEmpty] + public string[] MetricNames { get; set; } + + [Parameter(Position = 3, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The start time.")] + [ValidateNotNullOrEmpty] + public DateTime? StartDate { get; set; } + + [Parameter(Position = 4, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The end time.")] + public DateTime? EndDate { get; set; } + + [Parameter(Position = 5, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "Time grain for the metrics. Supported values are PT1M (per minute), PT1H (per hour), P1D (per day).")] + public string TimeGrain { get; set; } + + [Parameter(Position = 6, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "Include details for the server instances in which the site is running.")] + public SwitchParameter InstanceDetails { get; set; } + + [Parameter(Position = 7, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "Flag which specifies if the metrics returned should reflect slot swaps. " + + "Let's take for example following case: if production slot has hostname www.contos.com and take traffic for 12 hours " + + "and later is swapped with staging slot. Getting metrics with SlotView=false will reflect the swap - e.g. there will be " + + "a increase on the staging slot metrics after it goes to production." + + "If SlotView=true is used it will show the metrics for the www.contoso.com regardless which slot was serving at the moment.")] + public SwitchParameter SlotView { get; set; } + + public GetAzureWebsiteMetricCommand() + { + websiteNameDiscovery = false; + } + + public override void ExecuteCmdlet() + { + base.ExecuteCmdlet(); + + var response = WebsitesClient.GetHistoricalUsageMetrics(Name, Slot, MetricNames, StartDate, EndDate, TimeGrain, InstanceDetails, SlotView); + foreach (var metricResponse in response) + { + WriteObject(metricResponse, true); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Websites/NewAzureWebSite.cs b/src/ServiceManagement/Services/Commands/Websites/NewAzureWebSite.cs new file mode 100644 index 000000000000..12c7b2baee7e --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Websites/NewAzureWebSite.cs @@ -0,0 +1,460 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Net; +using System.Security.Permissions; +using System.ServiceModel; +using System.Text.RegularExpressions; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.Github; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; +using Microsoft.WindowsAzure.Management.WebSites.Models; + +namespace Microsoft.WindowsAzure.Commands.Websites +{ + using GitClass = Utilities.Websites.Services.Git; + + /// + /// Creates a new azure website. + /// + [Cmdlet(VerbsCommon.New, "AzureWebsite"), OutputType(typeof(SiteWithConfig))] + public class NewAzureWebsiteCommand : WebsiteContextBaseCmdlet, IGithubCmdlet + { + private string hostName; + private string publishingUsername; + + [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The geographic region to create the website.")] + [ValidateNotNullOrEmpty] + public string Location + { + get; + set; + } + + [Parameter(Position = 2, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Custom host name to use.")] + [ValidateNotNullOrEmpty] + public string Hostname + { + get + { + return hostName; + } + set + { + // Convert to Unicode if necessary. + hostName = IdnHelper.GetUnicode(value); + } + } + + [Parameter(Position = 3, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The publishing user name.")] + [ValidateNotNullOrEmpty] + public string PublishingUsername + { + get + { + return publishingUsername; + } + set + { + // Convert to Unicode if necessary. + publishingUsername = IdnHelper.GetUnicodeForUserName(value); + } + } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Configure git on the web site and local folder.")] + public SwitchParameter Git + { + get; + set; + } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Configure github on the web site.")] + public SwitchParameter GitHub + { + get; + set; + } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The github credentials.")] + [ValidateNotNullOrEmpty] + public PSCredential GithubCredentials + { + get; + set; + } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The github repository.")] + [ValidateNotNullOrEmpty] + public string GithubRepository + { + get; + set; + } + + public bool ShareChannel { get; set; } + + public IGithubServiceManagement GithubChannel { get; set; } + + /// + /// Initializes a new instance of the NewAzureWebsiteCommand class. + /// + public NewAzureWebsiteCommand() + : this(null) + { + } + + /// + /// Initializes a new instance of the NewAzureWebsiteCommand class. + /// + /// + /// Channel used for communication with the github APIs. + /// + public NewAzureWebsiteCommand(IGithubServiceManagement githubChannel) + { + GithubChannel = githubChannel; + } + + internal void CopyIisNodeWhenServerJsPresent() + { + if (!File.Exists("iisnode.yml") && (File.Exists("server.js") || File.Exists("app.js"))) + { + string cmdletPath = FileUtilities.GetAssemblyDirectory(); + File.Copy(Path.Combine(cmdletPath, "Resources/Scaffolding/Node/Website/iisnode.yml"), "iisnode.yml"); + } + } + + internal void UpdateLocalConfigWithSiteName(string websiteName, string webspace) + { + GitWebsite gitWebsite = new GitWebsite(websiteName, webspace); + gitWebsite.WriteConfiguration(); + } + + internal string GetPublishingUser() + { + if (!string.IsNullOrEmpty(PublishingUsername)) + { + return PublishingUsername; + } + + // Get publishing users + IList users = null; + try + { + users = WebsitesClient.ListPublishingUserNames(); + } + catch + { + throw new Exception(Resources.NeedPublishingUsernames); + } + + if (users.Count == 0) + { + throw new ArgumentException(Resources.InvalidGitCredentials); + } + + if (users.Count != 1) + { + throw new Exception(Resources.MultiplePublishingUsernames); + } + + return users.First(); + } + + internal void InitializeRemoteRepo(string webspace, string websiteName) + { + try + { + // Create website repository + WebsitesClient.CreateWebsiteRepository(webspace, websiteName); + } + catch (Exception ex) + { + if (SiteRepositoryAlreadyExists(ex)) + { + WriteWarning(ex.Message); + } + else + { + WriteExceptionError(ex); + } + } + } + + internal void AddRemoteToLocalGitRepo(Site website) + { + // Get remote repos + IList remoteRepositories = GitClass.GetRemoteRepositories(); + string repositoryUri = website.GetProperty("RepositoryUri"); + string uri = GitClass.GetUri( + repositoryUri, + website.RepositorySiteName, + PublishingUsername); + + string remoteName; + + if (string.IsNullOrEmpty(Slot)) + { + remoteName = "azure"; + } + else + { + remoteName = "azure-" + Slot; + } + + foreach (string name in remoteRepositories) + { + if (name.Equals(remoteName)) + { + GitClass.RemoveRemoteRepository(remoteName); + break; + } + } + + GitClass.AddRemoteRepository(remoteName, uri); + } + + [EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)] + public override void ExecuteCmdlet() + { + string suffix = WebsitesClient.GetWebsiteDnsSuffix(); + + if (Git && GitHub) + { + throw new Exception("Please run the command with either -Git or -GitHub options. Not both."); + } + + if (Git) + { + PublishingUsername = GetPublishingUser(); + } + + Site createdWebsite = CreateNewSite(suffix); + if (Git || GitHub) + { + UpdateSourceControlPublishing(createdWebsite); + } + } + + private void UpdateSourceControlPublishing(Site createdWebsite) + { + try + { + Directory.SetCurrentDirectory(SessionState.Path.CurrentFileSystemLocation.Path); + } + catch (Exception) + { + // Do nothing if session state is not present + } + + using (LinkedRevisionControl linkedRevisionControl = CreateLinkedRevisionControl()) + { + linkedRevisionControl.Init(); + + CopyIisNodeWhenServerJsPresent(); + UpdateLocalConfigWithSiteName(createdWebsite.Name, createdWebsite.WebSpace); + + InitializeRemoteRepo(createdWebsite.WebSpace, createdWebsite.Name); + + Site updatedWebsite = WebsitesClient.GetWebsite(createdWebsite.Name); + + if (Git) + { + AddRemoteToLocalGitRepo(updatedWebsite); + } + + linkedRevisionControl.Deploy(updatedWebsite); + } + } + + private LinkedRevisionControl CreateLinkedRevisionControl() + { + if (Git) + { + return new GitClient(this); + } + return new GithubClient(this, GithubCredentials, GithubRepository); + } + + private Site CreateNewSite(string suffix) + { + var webspaceList = WebsitesClient.ListWebSpaces(); + if (Git && webspaceList.Count == 0) + { + string error = string.Format(Resources.PortalInstructions, Name); + throw new Exception(string.Format("{0}\n{1}", error, Resources.PortalInstructionsGit)); + } + + WebSpace webspace = FindWebSpace(webspaceList); + + var website = new SiteWithWebSpace + { + Name = Name, + WebSpace = webspace.Name, + WebSpaceToCreate = webspace + }; + Site result; + + try + { + result = CreateSite(webspace, website); + } + catch (EndpointNotFoundException) + { + // Create webspace with VirtualPlan failed, try with subscription id + // This supports Windows Azure Pack + webspace.Plan = CurrentContext.Subscription.Id.ToString(); + result = CreateSite(webspace, website); + } + return result; + } + + private WebSpace FindWebSpace(IList webspaceList) + { + if (string.IsNullOrEmpty(Location)) + { + return GetDefaultWebSpace(webspaceList); + } + return GetNamedWebSpace(webspaceList); + } + + private WebSpace GetDefaultWebSpace(IList webspaceList) + { + WebSpace webspace = webspaceList.FirstOrDefault(); + if (webspace == null) + { + try + { + string defaultLocation = WebsitesClient.GetDefaultLocation(); + webspace = WebSpaceForLocation(defaultLocation); + } + catch + { + throw new Exception(Resources.CreateWebsiteFailed); + } + } + return webspace; + } + + private WebSpace GetNamedWebSpace(IList webspaceList) + { + // Find the webspace that corresponds to the georegion + return webspaceList.FirstOrDefault(w => w.GeoRegion.Equals(Location, StringComparison.OrdinalIgnoreCase)) ?? + WebSpaceForLocation(Location); + } + + private WebSpace WebSpaceForLocation(string location) + { + return new WebSpace + { + Name = Regex.Replace(location.ToLower(), " ", "") + "webspace", + GeoRegion = location, + Subscription = CurrentContext.Subscription.Id.ToString(), + Plan = "VirtualDedicatedPlan" + }; + } + + private Site CreateSite(WebSpace webspace, SiteWithWebSpace website) + { + Site createdWebsite = null; + + try + { + if (WebsitesClient.WebsiteExists(website.Name) && !string.IsNullOrEmpty(Slot)) + { + createdWebsite = WebsitesClient.GetWebsite(website.Name); + + // API makes sure site is in Standard mode + WebsitesClient.CreateWebsite(createdWebsite.WebSpace, website, Slot); + } + else + { + WebsitesClient.CreateWebsite(webspace.Name, website, null); + } + + createdWebsite = WebsitesClient.GetWebsite(website.Name); + + Cache.AddSite(CurrentContext.Subscription.Id.ToString(), createdWebsite); + SiteConfig websiteConfiguration = WebsitesClient.GetWebsiteConfiguration(createdWebsite.Name, Slot); + WriteObject(new SiteWithConfig(createdWebsite, websiteConfiguration)); + } + catch (CloudException ex) + { + if (SiteAlreadyExists(ex) && (Git || GitHub)) + { + // Handle conflict - it's ok to attempt to use cmdlet on an + // existing website if you're updating the source control stuff. + WriteWarning(ex.Message); + createdWebsite = WebsitesClient.GetWebsite(website.Name, null); + } + else if (HostNameValidationFailed(ex)) + { + WriteExceptionError(new Exception(Resources.InvalidHostnameValidation)); + } + else if (BadPlan(ex)) + { + throw new EndpointNotFoundException(); + } + else + { + WriteExceptionError(new Exception(ex.Message)); + } + } + + return createdWebsite; + } + + public Action GetLogger() + { + return WriteDebug; + } + + private bool SiteAlreadyExists(CloudException ex) + { + // TODO: Verify this is the right error code/detection logic + return ex.Response.StatusCode == HttpStatusCode.Conflict; + } + + private bool HostNameValidationFailed(CloudException ex) + { + // TODO: Verify this is the right error code/detection logic + return ex.Response.StatusCode == HttpStatusCode.BadRequest; + } + + // Calling Windows Azure Pack, will fail due to plan string + private bool BadPlan(CloudException ex) + { + // TODO: Verify this is the right error code/detection logic + return ex.Response.StatusCode == HttpStatusCode.NotFound; + } + + private bool SiteRepositoryAlreadyExists(Exception ex) + { + var cex = ex as CloudException; + if (cex != null) + { + // TODO: Verify this is the right error code/detection logic + return cex.Response.StatusCode == HttpStatusCode.BadRequest; + } + return false; + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Websites/PublishAzureWebsiteProject.cs b/src/ServiceManagement/Services/Commands/Websites/PublishAzureWebsiteProject.cs new file mode 100644 index 000000000000..3d2bb7b52e21 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Websites/PublishAzureWebsiteProject.cs @@ -0,0 +1,149 @@ +using System; +using System.Collections; +using System.IO; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Common; + +namespace Microsoft.WindowsAzure.Commands.Websites +{ + [Cmdlet(VerbsData.Publish, "AzureWebsiteProject")] + public class PublishAzureWebsiteProject : WebsiteContextBaseCmdlet, IDynamicParameters + { + [Parameter(ParameterSetName = "ProjectFile", Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The Visual Studio web application project to be published.")] + [ValidateNotNullOrEmpty] + public string ProjectFile { get; set; } + + [Parameter(ParameterSetName = "ProjectFile", Position = 2, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The configuration used to build the Visual Studio web application project.")] + [ValidateNotNullOrEmpty] + public string Configuration { get; set; } + + [Parameter(ParameterSetName = "Package", Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The WebDeploy package folder for zip file of the Visual Studio web application project to be published.")] + [ValidateNotNullOrEmpty] + public string Package { get; set; } + + [Parameter(ParameterSetName = "ProjectFile", Position = 3, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The connection strings to use for the deployment.")] + [Parameter(ParameterSetName = "Package", Position = 2, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The connection strings to use for the deployment.")] + [ValidateNotNullOrEmpty] + public Hashtable ConnectionString { get; set; } + + [Parameter(Mandatory = false, ParameterSetName = "ProjectFile")] + [Parameter(Mandatory = false, ParameterSetName = "Package")] + public SwitchParameter SkipAppData { get; set; } + + [Parameter(Mandatory = false, ParameterSetName = "ProjectFile")] + [Parameter(Mandatory = false, ParameterSetName = "Package")] + public SwitchParameter DoNotDelete { get; set; } + + private string fullProjectFile; + private string fullWebConfigFileWithConfiguration; + private string fullWebConfigFile; + private string fullPackage; + private string configuration; + + private RuntimeDefinedParameterDictionary dynamicParameters; + + public override void ExecuteCmdlet() + { + PrepareFileFullPaths(); + + // If a project file is specified, use MSBuild to build the package zip file. + if (!string.IsNullOrEmpty(ProjectFile)) + { + WriteVerbose(string.Format(Resources.StartBuildingProjectTemplate, fullProjectFile)); + fullPackage = WebsitesClient.BuildWebProject(fullProjectFile, configuration, Path.Combine(CurrentPath(), "build.log")); + WriteVerbose(string.Format(Resources.CompleteBuildingProjectTemplate, fullProjectFile)); + } + + // Resolve the full path of the package file or folder when the "Package" parameter set is used. + fullPackage = string.IsNullOrEmpty(fullPackage) ? this.TryResolvePath(Package) : fullPackage; + WriteVerbose(string.Format(Resources.StartPublishingProjectTemplate, fullPackage)); + + // Convert dynamic parameters to a connection string hash table. + var connectionStrings = ConnectionString; + if (connectionStrings == null) + { + connectionStrings = new Hashtable(); + if (dynamicParameters != null) + { + foreach (var dp in dynamicParameters) + { + if (MyInvocation.BoundParameters.ContainsKey(dp.Key)) + { + connectionStrings[dp.Value.Name.ToString()] = dp.Value.Value.ToString(); + } + } + } + } + + try + { + // Publish the package. + WebsitesClient.PublishWebProject(Name, Slot, fullPackage, connectionStrings, SkipAppData.IsPresent, DoNotDelete.IsPresent); + WriteVerbose(string.Format(Resources.CompletePublishingProjectTemplate, fullPackage)); + } + catch (Exception) + { + WriteVerbose(string.Format(Resources.FailPublishingProjectTemplate, fullPackage)); + throw; + } + } + + /// + /// Generate dynamic parameters based on the connection strings in the Web.config. + /// It will look at 2 Web.config files: + /// 1. Web.config + /// 2. Web..config (like Web.Release.config) + /// This only works when -ProjectFile is used and -ConnectionString is not used. + /// + /// The dynamic parameters. + public object GetDynamicParameters() + { + if (!string.IsNullOrEmpty(ProjectFile) && ConnectionString == null) + { + // Get the 2 Web.config files. + PrepareFileFullPaths(); + + dynamicParameters = new RuntimeDefinedParameterDictionary(); + if (string.Compare("ProjectFile", ParameterSetName) == 0) + { + // Parse the connection strings from the Web.config files. + var names = WebsitesClient.ParseConnectionStringNamesFromWebConfig(fullWebConfigFile, fullWebConfigFileWithConfiguration); + + // Create a dynmaic parameter for each connection string using the same name. + foreach (var name in names) + { + var parameter = new RuntimeDefinedParameter(); + parameter.Name = name; + parameter.ParameterType = typeof(string); + parameter.Attributes.Add(new ParameterAttribute() + { + ParameterSetName = "ProjectFile", + Mandatory = false, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Connection string from Web.config." + } + ); + dynamicParameters.Add(name, parameter); + } + } + } + return dynamicParameters; + } + + /// + /// Prepare the full path of the project file and Web.config files. + /// + private void PrepareFileFullPaths() + { + if (!string.IsNullOrEmpty(ProjectFile)) + { + fullProjectFile = this.TryResolvePath(ProjectFile).Trim(new char[] { '"' }); + fullWebConfigFile = Path.Combine(Path.GetDirectoryName(fullProjectFile), "Web.config"); + configuration = string.IsNullOrEmpty(Configuration) ? "Release" : Configuration; + fullWebConfigFileWithConfiguration = Path.Combine(Path.GetDirectoryName(fullProjectFile), string.Format("Web.{0}.config", configuration)); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Websites/RemoveAzureWebSite.cs b/src/ServiceManagement/Services/Commands/Websites/RemoveAzureWebSite.cs new file mode 100644 index 000000000000..762a9f5be112 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Websites/RemoveAzureWebSite.cs @@ -0,0 +1,59 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; + +namespace Microsoft.WindowsAzure.Commands.Websites +{ + /// + /// Removes an azure website. + /// + [Cmdlet(VerbsCommon.Remove, "AzureWebsite", SupportsShouldProcess = true), OutputType(typeof(Site))] + public class RemoveAzureWebsiteCommand : WebsiteContextBaseCmdlet + { + [Parameter(Mandatory = false, HelpMessage = "Do not confirm web site deletion")] + public SwitchParameter Force { get; set; } + + protected virtual void WriteWebsite(Site website) + { + WriteObject(website, true); + } + + public override void ExecuteCmdlet() + { + ConfirmAction( + Force.IsPresent, + string.Format(Resources.RemoveWebsiteWarning, Name), + Resources.RemoveWebsiteMessage, + Name, + () => + { + try + { + Site websiteObject = WebsitesClient.GetWebsite(Name, Slot); + WebsitesClient.DeleteWebsite(websiteObject.WebSpace, Name, Slot); + Cache.RemoveSite(CurrentContext.Subscription.Id.ToString(), websiteObject); + } + catch (CloudException) + { + // Ignore exception the website slot was deleted when deleting the production. + } + }); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Websites/RestartAzureWebsite.cs b/src/ServiceManagement/Services/Commands/Websites/RestartAzureWebsite.cs new file mode 100644 index 000000000000..ef2cd82b5ae3 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Websites/RestartAzureWebsite.cs @@ -0,0 +1,36 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Common; + +namespace Microsoft.WindowsAzure.Commands.Websites +{ + [Cmdlet(VerbsLifecycle.Restart, "AzureWebsite"), OutputType(typeof(bool))] + public class RestartAzureWebsiteCommand : WebsiteContextBaseCmdlet + { + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + WebsitesClient.RestartWebsite(Name, Slot); + + if (PassThru.IsPresent) + { + WriteObject(true); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Websites/RestoreAzureWebsiteDeployment.cs b/src/ServiceManagement/Services/Commands/Websites/RestoreAzureWebsiteDeployment.cs new file mode 100644 index 000000000000..9572e2224c1a --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Websites/RestoreAzureWebsiteDeployment.cs @@ -0,0 +1,85 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.DeploymentEntities; + +namespace Microsoft.WindowsAzure.Commands.Websites +{ + /// + /// Gets the git deployments. + /// + [Cmdlet(VerbsData.Restore, "AzureWebsiteDeployment", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High), OutputType(typeof(List))] + public class RestoreAzureWebsiteDeploymentCommand : DeploymentBaseCmdlet + { + [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The maximum number of results to display.")] + [ValidateNotNullOrEmpty] + public string CommitId + { + get; + set; + } + + [Parameter(HelpMessage = "Do not confirm redeploy")] + public SwitchParameter Force + { + get; + set; + } + + /// + /// Initializes a new instance of the RestoreAzureWebsiteDeploymentCommand class. + /// + public RestoreAzureWebsiteDeploymentCommand() + : this(null) + { + } + + /// + /// Initializes a new instance of the RestoreAzureWebsiteDeploymentCommand class. + /// + /// + /// Channel used for communication with the git repository. + /// + public RestoreAzureWebsiteDeploymentCommand(IDeploymentServiceManagement deploymentChannel) + { + DeploymentChannel = deploymentChannel; + } + + public override void ExecuteCmdlet() + { + base.ExecuteCmdlet(); + + if (!Force.IsPresent && + !ShouldProcess("", string.Format(Resources.RedeployCommit, CommitId), + Resources.ShouldProcessCaption)) + { + return; + } + + InvokeInDeploymentOperationContext(() => DeploymentChannel.Deploy(CommitId)); + + // List new deployments + InvokeInDeploymentOperationContext(() => + { + List deployments = DeploymentChannel.GetDeployments(GetAzureWebsiteDeploymentCommand.DefaultMaxResults); + WriteObject(deployments, true); + }); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/Websites/SaveAzureWebsiteLog.cs b/src/ServiceManagement/Services/Commands/Websites/SaveAzureWebsiteLog.cs new file mode 100644 index 000000000000..3872d8643964 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Websites/SaveAzureWebsiteLog.cs @@ -0,0 +1,111 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services; + +namespace Microsoft.WindowsAzure.Commands.Websites +{ + /// + /// Gets the azure logs. + /// + [Cmdlet(VerbsData.Save, "AzureWebsiteLog"), OutputType(typeof(bool))] + public class SaveAzureWebsiteLogCommand : DeploymentBaseCmdlet + { + internal const string DefaultOutput = "./logs.zip"; + + [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The logs output file.")] + public string Output + { + get; + set; + } + + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + /// + /// Initializes a new instance of the SaveAzureWebsiteLogCommand class. + /// + public SaveAzureWebsiteLogCommand() + : this(null) + { + } + + /// + /// Initializes a new instance of the SaveAzureWebsiteLogCommand class. + /// + /// + /// Channel used for communication with the git repository. + /// + public SaveAzureWebsiteLogCommand(IDeploymentServiceManagement deploymentChannel) + { + DeploymentChannel = deploymentChannel; + } + + internal string DefaultCurrentPath = null; + internal string GetCurrentPath() + { + return SessionState != null ? + SessionState.Path.CurrentFileSystemLocation.Path : + DefaultCurrentPath; + } + + public override void ExecuteCmdlet() + { + if (string.IsNullOrEmpty(Output)) + { + Output = Path.Combine(GetCurrentPath(), DefaultOutput); + } + else + { + // Set the file extension to .zip + Output = Path.ChangeExtension(Output, "zip"); + } + + base.ExecuteCmdlet(); + + // List new deployments + Stream websiteLogs = null; + InvokeInDeploymentOperationContext(() => { websiteLogs = DeploymentChannel.DownloadLogs(); }); + + using (Stream file = File.OpenWrite(Output)) + { + CopyStream(websiteLogs, file); + } + + websiteLogs.Dispose(); + + if (PassThru.IsPresent) + { + WriteObject(true); + } + } + + /// + /// Copies the contents of input to output. Doesn't close either stream. + /// + internal static void CopyStream(Stream input, Stream output) + { + byte[] buffer = new byte[8 * 1024]; + int len; + while ((len = input.Read(buffer, 0, buffer.Length)) > 0) + { + output.Write(buffer, 0, len); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Websites/SetAzureWebsite.cs b/src/ServiceManagement/Services/Commands/Websites/SetAzureWebsite.cs new file mode 100644 index 000000000000..8f67f6088f36 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Websites/SetAzureWebsite.cs @@ -0,0 +1,183 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; +using Microsoft.WindowsAzure.Management.WebSites.Models; + +namespace Microsoft.WindowsAzure.Commands.Websites +{ + /// + /// Sets an azure website properties. + /// + [Cmdlet(VerbsCommon.Set, "AzureWebsite"), OutputType(typeof(bool))] + public class SetAzureWebsiteCommand : WebsiteContextBaseCmdlet + { + private string[] hostNames; + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Number of workers.")] + [ValidateNotNullOrEmpty] + public int? NumberOfWorkers { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Default Documents.")] + public string[] DefaultDocuments { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = ".NET framework version.")] + [ValidateNotNullOrEmpty] + public string NetFrameworkVersion { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "PHP Version.")] + [ValidateNotNullOrEmpty] + public string PhpVersion { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Request tracing enabled.")] + [ValidateNotNullOrEmpty] + public bool? RequestTracingEnabled { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "HTTP Logging enabled.")] + [ValidateNotNullOrEmpty] + public bool? HttpLoggingEnabled { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Detailed Error Logging enabled.")] + [ValidateNotNullOrEmpty] + public bool? DetailedErrorLoggingEnabled { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Hostnames.")] + [ValidateNotNullOrEmpty] + public string[] HostNames + { + get + { + return hostNames; + } + set + { + hostNames = value; + + // Convert each host name to Unicode if necessary. + if (hostNames != null) + { + for (int i = 0; i < hostNames.Length; i++) + { + hostNames[i] = IdnHelper.GetUnicode(hostNames[i]); + } + } + } + } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "A string for the App Settings.")] + public Hashtable AppSettings { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The Metadata.")] + public List Metadata { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The Connection Strings.")] + public ConnStringPropertyBag ConnectionStrings { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The Handler Mappings.")] + public HandlerMapping[] HandlerMappings { get; set; } + + [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "A previous site configuration.")] + public SiteWithConfig SiteWithConfig { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The managed pipeline mode of a website.")] + public ManagedPipelineMode? ManagedPipelineMode { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The web sockets flag.")] + public bool? WebSocketsEnabled { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The list of routing rules for testing in production.")] + public List RoutingRules { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Indicates if 32-bit mode is enabled.")] + public bool? Use32BitWorkerProcess { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Sets the slot name to swap with after successful deployment. To remove set to null or empty string.")] + public string AutoSwapSlotName { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Sets the list of application setting names to be bound to slot and not swapped on swap operation.")] + public List SlotStickyAppSettingNames { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Sets the list of connection string names to be bound to slot and not swapped on swap operation.")] + public List SlotStickyConnectionStringNames { get; set; } + + private Site website; + private SiteConfig currentSiteConfig; + + public override void ExecuteCmdlet() + { + GetCurrentSiteState(); + UpdateConfig(); + UpdateHostNames(); + Slot = null; + + if (PassThru.IsPresent) + { + WriteObject(true); + } + } + + private void GetCurrentSiteState() + { + website = WebsitesClient.GetWebsite(Name, Slot); + currentSiteConfig = WebsitesClient.GetWebsiteConfiguration(Name, Slot); + } + + private void UpdateConfig() + { + bool changes = false; + var websiteConfigUpdate = new SiteWithConfig(website, currentSiteConfig); + if (SiteWithConfig != null) + { + websiteConfigUpdate = SiteWithConfig; + changes = true; + } + + changes = changes || ObjectDeltaMapper.Map(this, currentSiteConfig, websiteConfigUpdate, "HostNames", "SiteWithConfig", "PassThru"); + + if (changes) + { + WebsitesClient.UpdateWebsiteConfiguration(Name, websiteConfigUpdate.GetSiteConfig(), Slot); + } + } + + private void UpdateHostNames() + { + if (HostNames != null) + { + string hostname = WebsitesClient.GetHostName(Name, Slot); + List newHostNames = new List(); + if (!HostNames.Contains(hostname)) + { + newHostNames.Add(hostname); + newHostNames.AddRange(HostNames); + } + + if (newHostNames.Count > 0) + { + WebsitesClient.UpdateWebsiteHostNames(website, newHostNames, Slot); + } + } + + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Websites/ShowAzurePortal.cs b/src/ServiceManagement/Services/Commands/Websites/ShowAzurePortal.cs new file mode 100644 index 000000000000..0f05ce9d378b --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Websites/ShowAzurePortal.cs @@ -0,0 +1,80 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; + +namespace Microsoft.WindowsAzure.Commands.Websites +{ + /// + /// Opens the azure portal. + /// + [Cmdlet(VerbsCommon.Show, "AzurePortal")] + public class ShowAzurePortalCommand : AzurePSCmdlet + { + private string name; + + [Parameter(Position = 0, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the website.")] + [ValidateNotNullOrEmpty] + public string Name + { + get + { + return name; + } + set + { + // Convert to Unicode if necessary. + name = IdnHelper.GetUnicode(value); + } + } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Realm of the account.")] + [ValidateNotNullOrEmpty] + public string Realm { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The environment name.")] + public string Environment { get; set; } + + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + AzureEnvironment environment; + if (string.IsNullOrEmpty(Environment)) + { + environment = AzureSession.CurrentContext.Environment; + } + else + { + environment = DefaultProfileClient.Profile.Environments[Environment]; + } + + string managementPortalUrl = environment.GetManagementPortalUrlWithRealm(Realm); + + if (!string.IsNullOrEmpty(Name)) + { + managementPortalUrl = string.Format( + "{0}#{1}", + managementPortalUrl, + string.Format(Resources.WebsiteSufixUrl, Name)); + } + + GeneralUtilities.LaunchWebPage(managementPortalUrl); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands/Websites/ShowAzureWebsite.cs b/src/ServiceManagement/Services/Commands/Websites/ShowAzureWebsite.cs new file mode 100644 index 000000000000..ad64f596c954 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Websites/ShowAzureWebsite.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; + +namespace Microsoft.WindowsAzure.Commands.Websites +{ + /// + /// Shows an azure website. + /// + [Cmdlet(VerbsCommon.Show, "AzureWebsite")] + public class ShowAzureWebsiteCommand : WebsiteContextBaseCmdlet + { + public override void ExecuteCmdlet() + { + Site websiteObject = WebsitesClient.GetWebsite(Name, Slot); + GeneralUtilities.LaunchWebPage("http://" + websiteObject.HostNames.First()); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Websites/StartAzureWebSite.cs b/src/ServiceManagement/Services/Commands/Websites/StartAzureWebSite.cs new file mode 100644 index 000000000000..b9fc0214a568 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Websites/StartAzureWebSite.cs @@ -0,0 +1,39 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Common; + +namespace Microsoft.WindowsAzure.Commands.Websites +{ + /// + /// Starts an azure website. + /// + [Cmdlet(VerbsLifecycle.Start, "AzureWebsite"), OutputType(typeof(bool))] + public class StartAzureWebsiteCommand : WebsiteContextBaseCmdlet + { + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + WebsitesClient.StartWebsite(Name, Slot); + + if (PassThru.IsPresent) + { + WriteObject(true); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Websites/StopAzureWebSite.cs b/src/ServiceManagement/Services/Commands/Websites/StopAzureWebSite.cs new file mode 100644 index 000000000000..73f1b4343c11 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Websites/StopAzureWebSite.cs @@ -0,0 +1,39 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Common; + +namespace Microsoft.WindowsAzure.Commands.Websites +{ + /// + /// Stops an azure website. + /// + [Cmdlet(VerbsLifecycle.Stop, "AzureWebsite"), OutputType(typeof(bool))] + public class StopAzureWebsiteCommand : WebsiteContextBaseCmdlet + { + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + WebsitesClient.StopWebsite(Name, Slot); + + if (PassThru.IsPresent) + { + WriteObject(true); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Websites/SwitchAzureWebSiteSlot.cs b/src/ServiceManagement/Services/Commands/Websites/SwitchAzureWebSiteSlot.cs new file mode 100644 index 000000000000..489a06b411e7 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Websites/SwitchAzureWebSiteSlot.cs @@ -0,0 +1,165 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; + +namespace Microsoft.WindowsAzure.Commands.Websites +{ + /// + /// Switches the existing slot with the production one. + /// + [Cmdlet(VerbsCommon.Switch, "AzureWebsiteSlot", SupportsShouldProcess = true)] + public class SwitchAzureWebsiteSlotCommand : WebsiteBaseCmdlet + { + private string name; + private string slot1; + private string slot2; + + [Parameter(Position = 0, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The web site name.")] + [ValidateNotNullOrEmpty] + public string Name + { + get + { + return name; + } + set + { + // Convert to Unicode if necessary. + name = IdnHelper.GetUnicode(value); + } + } + + [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The first slot to swap.")] + [ValidateNotNullOrEmpty] + public string Slot1 + { + get + { + return slot1; + } + set + { + // Convert to Unicode if necessary. + slot1 = IdnHelper.GetUnicode(value); + } + } + + [Parameter(Position = 2, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The second slot to swap (production by default).")] + [ValidateNotNullOrEmpty] + public string Slot2 + { + get + { + return slot2; + } + set + { + // Convert to Unicode if necessary. + slot2 = IdnHelper.GetUnicode(value); + } + } + + [Parameter(Mandatory = false, HelpMessage = "Do not confirm web site swap")] + public SwitchParameter Force { get; set; } + + public override void ExecuteCmdlet() + { + if (string.IsNullOrEmpty(Name)) + { + // If the website name was not specified as a parameter try to infer it + Name = GitWebsite.ReadConfiguration().Name; + } + + Name = WebsitesClient.GetWebsiteNameFromFullName(Name); + List sites = WebsitesClient.GetWebsiteSlots(Name); + if (sites.Count < 2) + { + throw new PSInvalidOperationException(Resources.SwapWebsiteSlotRequire2SlotsWarning); + } + + string slot1 = Slot1; + string slot2 = Slot2; + + string[] slots = sites.Select(site => WebsitesClient.GetSlotName(site.Name) ?? WebsiteSlotName.Production.ToString()).ToArray(); + + if (slot1 == null && slot2 == null) + { + // If slots not specified make sure there are only 2 slots and use them + if (slots.Length == 2) + { + slot1 = slots[0]; + slot2 = slots[1]; + } + else + { + throw new PSInvalidOperationException(Resources.SwapWebsiteSlotSpecifySlotsWarning); + } + } + else if (slot1 != null && slot2 != null) + { + // If both slots specified make sure they exist and use them + VerifySlotExists(slots, slot1); + VerifySlotExists(slots, slot2); + } + else + { + // If only one slot is specified make sure it exists and that there are only 2 slots + if (slots.Length == 2) + { + if (slot1 != null) + { + VerifySlotExists(slots, slot1); + } + if (slot2 != null) + { + VerifySlotExists(slots, slot2); + } + + slot1 = slots[0]; + slot2 = slots[1]; + } + else + { + throw new PSInvalidOperationException(Resources.SwapWebsiteSlotSpecifySlotsWarning); + } + } + + ConfirmAction( + Force.IsPresent, + string.Format(Resources.SwapWebsiteSlotWarning, Name, slot1, slot2), + Resources.SwappingWebsite, + Name, + () => WebsitesClient.SwitchSlots(sites.First().WebSpace, Name, slot1, slot2)); + } + + private static void VerifySlotExists(string[] slots, string slotToCheck) + { + if (!slots.Any(slot => String.Equals(slotToCheck, slot, StringComparison.OrdinalIgnoreCase))) + { + throw new PSInvalidOperationException(String.Format(CultureInfo.CurrentCulture, Resources.SwapWebsiteSlotInvalidSlotWarning, slotToCheck)); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Websites/UpdateAzureWebsiteRepository.cs b/src/ServiceManagement/Services/Commands/Websites/UpdateAzureWebsiteRepository.cs new file mode 100644 index 000000000000..1f6f8053b791 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Websites/UpdateAzureWebsiteRepository.cs @@ -0,0 +1,102 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; + +namespace Microsoft.WindowsAzure.Commands.Websites +{ + /// + /// Updates a website git remote config to include slots + /// + [Cmdlet(VerbsData.Update, "AzureWebsiteRepository", SupportsShouldProcess = true)] + public class UpdateAzureWebsiteRepositoryCommand : WebsiteBaseCmdlet + { + private string name; + private string publishingUsername; + + [Parameter(Position = 0, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The web site name.")] + [ValidateNotNullOrEmpty] + public string Name + { + get + { + return name; + } + set + { + // Convert to Unicode if necessary. + name = IdnHelper.GetUnicode(value); + } + } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The publishing user name.")] + [ValidateNotNullOrEmpty] + public string PublishingUsername + { + get + { + return publishingUsername; + } + set + { + // Convert to Unicode if necessary. + publishingUsername = IdnHelper.GetUnicodeForUserName(value); + } + } + + public override void ExecuteCmdlet() + { + if (string.IsNullOrEmpty(Name)) + { + // If the website name was not specified as a parameter try to infer it + Name = GitWebsite.ReadConfiguration().Name; + } + + List sites = WebsitesClient.GetWebsiteSlots(Name); + IList remoteRepositories = Git.GetRemoteRepositories(); + + // Clear all existing remotes that are created by us + foreach (string remoteName in remoteRepositories) + { + if (remoteName.StartsWith("azure")) + { + Git.RemoveRemoteRepository(remoteName); + } + } + + foreach (Site website in sites) + { + string repositoryUri = website.GetProperty("RepositoryUri"); + string publishingUsername = PublishingUsername; + string uri = Git.GetUri(repositoryUri, website.RepositorySiteName, publishingUsername); + string slot = WebsitesClient.GetSlotName(website.Name); + string remoteName = string.Empty; + + if (!string.IsNullOrEmpty(slot) && !slot.Equals(WebsiteSlotName.Production.ToString(), StringComparison.OrdinalIgnoreCase)) + { + remoteName = "-" + slot; + } + + Git.AddRemoteRepository(string.Format("azure{0}", remoteName), uri); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Websites/WebHostingPlan/GetAzureWebHostingPlan.cs b/src/ServiceManagement/Services/Commands/Websites/WebHostingPlan/GetAzureWebHostingPlan.cs new file mode 100644 index 000000000000..9b69f76e141e --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Websites/WebHostingPlan/GetAzureWebHostingPlan.cs @@ -0,0 +1,94 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; + +namespace Microsoft.WindowsAzure.Commands.Websites.WebHostingPlan +{ + /// + /// Gets an azure website. + /// + [Cmdlet(VerbsCommon.Get, "AzureWebHostingPlan"), OutputType(typeof(SiteWithConfig), typeof(IEnumerable))] + public class GetAzureWebHostingPlanCommand : WebHostingPlanContextBaseCmdlet + { + public override void ExecuteCmdlet() + { + if (!string.IsNullOrEmpty(Name) && !string.IsNullOrEmpty(WebSpaceName)) + { + GetByName(); + } + else if (!string.IsNullOrEmpty(WebSpaceName)) + { + GetByWebSpace(); + } + else + { + GetNoName(); + } + } + + private void GetByName() + { + Do(() => + { + var plan = WebsitesClient.GetWebHostingPlan(WebSpaceName, Name); + WriteObject(plan, true); + }); + } + + private void GetByWebSpace() + { + Do(() => + { + var plan = WebsitesClient.ListWebHostingPlans(WebSpaceName); + WriteObject(plan, true); + }); + } + + private void GetNoName() + { + Do(() => + { + List plans = WebsitesClient.ListWebHostingPlans(); + WriteObject(plans, true); + }); + } + + private void Do(Action call) + { + try + { + call(); + } + catch (CloudException ex) + { + if (ex.Response.StatusCode == System.Net.HttpStatusCode.Forbidden) + { + WriteError(new ErrorRecord(new Exception(Resources.CommunicationCouldNotBeEstablished, ex), string.Empty, ErrorCategory.InvalidData, null)); + throw; + } + if (ex.Response.StatusCode == System.Net.HttpStatusCode.NotFound) + { + throw new Exception(string.Format(Resources.InvalidWebsite, Name)); + } + throw; + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Websites/WebHostingPlan/GetAzureWebHostingPlanMetric.cs b/src/ServiceManagement/Services/Commands/Websites/WebHostingPlan/GetAzureWebHostingPlanMetric.cs new file mode 100644 index 000000000000..cf79ebcbc3d7 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Websites/WebHostingPlan/GetAzureWebHostingPlanMetric.cs @@ -0,0 +1,62 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities; + +namespace Microsoft.WindowsAzure.Commands.Websites.WebHostingPlan +{ + /// + /// Gets an azure website. + /// + [Cmdlet(VerbsCommon.Get, "AzureWebHostingPlanMetric"), OutputType(typeof(IList))] + public class GetAzureWebHostingPlanMetricCommand : WebHostingPlanContextBaseCmdlet + { + [Parameter(Position = 2, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "List of metrics names to retrieve.")] + [ValidateNotNullOrEmpty] + public string[] MetricNames { get; set; } + + [Parameter(Position = 3, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The start time.")] + [ValidateNotNullOrEmpty] + public DateTime? StartDate { get; set; } + + [Parameter(Position = 4, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "The end time.")] + public DateTime? EndDate { get; set; } + + [Parameter(Position = 5, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "Time grain for the metrics. Supported values are PT1M (per minute), PT1H (per hour), P1D (per day).")] + public string TimeGrain { get; set; } + + [Parameter(Position = 6, Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "Include details for each server instance in the web hosting plan.")] + public SwitchParameter InstanceDetails { get; set; } + + public override void ExecuteCmdlet() + { + base.ExecuteCmdlet(); + + var response = WebsitesClient.GetPlanHistoricalUsageMetrics(WebSpaceName, Name, MetricNames, StartDate, EndDate, TimeGrain, InstanceDetails); + foreach (var metricResponse in response) + { + WriteObject(metricResponse, true); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Websites/WebJobs/GetAzureWebsiteJob.cs b/src/ServiceManagement/Services/Commands/Websites/WebJobs/GetAzureWebsiteJob.cs new file mode 100644 index 000000000000..19bc57637486 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Websites/WebJobs/GetAzureWebsiteJob.cs @@ -0,0 +1,40 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebJobs; + +namespace Microsoft.WindowsAzure.Commands.Websites.WebJobs +{ + [Cmdlet(VerbsCommon.Get, "AzureWebsiteJob"), OutputType(typeof(List))] + public class GetAzureWebsiteJobCommand : WebsiteContextBaseCmdlet + { + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The web job name.")] + public string JobName { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The web job type.")] + [ValidateSet(new string[] { "Triggered", "Continuous" }, IgnoreCase = true)] + public string JobType { get; set; } + + public override void ExecuteCmdlet() + { + var options = new WebJobFilterOptions() { Name = Name, Slot = Slot, JobName = JobName, JobType = JobType }; + List jobs = WebsitesClient.FilterWebJobs(options); + + WriteObject(jobs, true); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Websites/WebJobs/GetAzureWebsiteJobHistory.cs b/src/ServiceManagement/Services/Commands/Websites/WebJobs/GetAzureWebsiteJobHistory.cs new file mode 100644 index 000000000000..1e3ea58bd103 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Websites/WebJobs/GetAzureWebsiteJobHistory.cs @@ -0,0 +1,56 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebJobs; +using Microsoft.WindowsAzure.WebSitesExtensions.Models; + +namespace Microsoft.WindowsAzure.Commands.Websites.WebJobs +{ + [Cmdlet(VerbsCommon.Get, "AzureWebsiteJobHistory"), OutputType(typeof(List))] + public class GetAzureWebsiteJobHistoryCommand : WebsiteContextBaseCmdlet + { + private const string RunIdParameterSetName = "RunIdParameterSetName"; + + private const string HistoryParameterSetName = "HistoryParameterSetName"; + + private const string LatestParameterSetName = "LatestParameterSetName"; + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The web job name.", ParameterSetName = HistoryParameterSetName)] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The web job name.", ParameterSetName = RunIdParameterSetName)] + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The web job name.", ParameterSetName = LatestParameterSetName)] + public string JobName { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The id of the run history you want to see.", ParameterSetName = RunIdParameterSetName)] + public string RunId { get; set; } + + [Parameter(Mandatory = true, HelpMessage = "If specified, return the latest run history.", ParameterSetName = LatestParameterSetName)] + public SwitchParameter Latest { get; set; } + + public override void ExecuteCmdlet() + { + WebJobHistoryFilterOptions options = new WebJobHistoryFilterOptions() + { + Name = Name, + Slot = Slot, + JobName = JobName, + Latest = Latest, + RunId = RunId + }; + WriteObject(WebsitesClient.FilterWebJobHistory(options), true); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Websites/WebJobs/NewAzureWebsiteJob.cs b/src/ServiceManagement/Services/Commands/Websites/WebJobs/NewAzureWebsiteJob.cs new file mode 100644 index 000000000000..53521afa216a --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Websites/WebJobs/NewAzureWebsiteJob.cs @@ -0,0 +1,39 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Common; +using Microsoft.WindowsAzure.WebSitesExtensions.Models; + +namespace Microsoft.WindowsAzure.Commands.Websites.WebJobs +{ + [Cmdlet(VerbsCommon.New, "AzureWebsiteJob")] + public class NewAzureWebsiteJobCommand : WebsiteContextBaseCmdlet + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The web job name.")] + public string JobName { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The web job type.")] + public WebJobType JobType { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The web job file.")] + public string JobFile { get; set; } + + public override void ExecuteCmdlet() + { + WriteObject(WebsitesClient.CreateWebJob(Name, Slot, JobName, JobType, this.ResolvePath(JobFile))); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Websites/WebJobs/RemoveAzureWebsiteJob.cs b/src/ServiceManagement/Services/Commands/Websites/WebJobs/RemoveAzureWebsiteJob.cs new file mode 100644 index 000000000000..b2fd582a43a1 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Websites/WebJobs/RemoveAzureWebsiteJob.cs @@ -0,0 +1,49 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Common; +using Microsoft.WindowsAzure.WebSitesExtensions.Models; + +namespace Microsoft.WindowsAzure.Commands.Websites.WebJobs +{ + /// + /// Removes a web job. + /// + [Cmdlet(VerbsCommon.Remove, "AzureWebsiteJob"), OutputType(typeof(bool))] + public class RemoveAzureWebsiteJobCommand : WebsiteContextBaseCmdlet + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The web job name.")] + public string JobName { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The web job type.")] + public WebJobType JobType { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Don't ask for confirmation.")] + public SwitchParameter Force { get; set; } + + public override void ExecuteCmdlet() + { + ConfirmAction( + Force.IsPresent, + string.Format(Resources.RemoveWebJobWarning, JobName), + Resources.RemoveWebsiteMessage, + JobName, + () => WebsitesClient.DeleteWebJob(Name, Slot, JobName, JobType)); + + WriteObject(true); + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Websites/WebJobs/SaveAzureWebsiteJobLog.cs b/src/ServiceManagement/Services/Commands/Websites/WebJobs/SaveAzureWebsiteJobLog.cs new file mode 100644 index 000000000000..f69366238532 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Websites/WebJobs/SaveAzureWebsiteJobLog.cs @@ -0,0 +1,48 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Common; +using Microsoft.WindowsAzure.WebSitesExtensions.Models; + +namespace Microsoft.WindowsAzure.Commands.Websites.WebJobs +{ + public class SaveAzureWebsiteJobLogCommand : WebsiteContextBaseCmdlet + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The web job name.")] + public string JobName { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The web job type.")] + public WebJobType JobType { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The logs output file.")] + public string Output { get; set; } + + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, + HelpMessage = "If the given job is a triggered job. Users can use the parameter to specify the run history whose log they want to download. If not give, download the latest run history log.")] + public string RunId { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Returns a boolean value indicating that the log saved successfully. By default, this cmdlet does not return any output.")] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + WebsitesClient.SaveWebJobLog(Name, Slot, JobName, JobType, Output, RunId); + if (PassThru) + { + WriteObject(true); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Websites/WebJobs/StartAzureWebsiteJob.cs b/src/ServiceManagement/Services/Commands/Websites/WebJobs/StartAzureWebsiteJob.cs new file mode 100644 index 000000000000..ea312dda816c --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Websites/WebJobs/StartAzureWebsiteJob.cs @@ -0,0 +1,44 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Common; +using Microsoft.WindowsAzure.WebSitesExtensions.Models; + +namespace Microsoft.WindowsAzure.Commands.Websites.WebJobs +{ + [Cmdlet(VerbsLifecycle.Start, "AzureWebsiteJob"), OutputType(typeof(bool))] + public class StartAzureWebsiteJobCommand : WebsiteContextBaseCmdlet + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The web job name.")] + public string JobName { get; set; } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The web job type.")] + [ValidateSet(new string[] { "Triggered", "Continuous" }, IgnoreCase = true)] + public WebJobType JobType { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Returns a boolean value indicating that the job started successfully. By default, this cmdlet does not return any output.")] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + WebsitesClient.StartWebJob(Name, Slot, JobName, JobType); + + if (PassThru) + { + WriteObject(true); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands/Websites/WebJobs/StopAzureWebsiteJob.cs b/src/ServiceManagement/Services/Commands/Websites/WebJobs/StopAzureWebsiteJob.cs new file mode 100644 index 000000000000..8f3f42aaea26 --- /dev/null +++ b/src/ServiceManagement/Services/Commands/Websites/WebJobs/StopAzureWebsiteJob.cs @@ -0,0 +1,40 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Utilities.Websites.Common; +using Microsoft.WindowsAzure.WebSitesExtensions.Models; + +namespace Microsoft.WindowsAzure.Commands.Websites.WebJobs +{ + [Cmdlet(VerbsLifecycle.Stop, "AzureWebsiteJob"), OutputType(typeof(bool))] + public class StopAzureWebsiteJobCommand : WebsiteContextBaseCmdlet + { + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The web job name.")] + public string JobName { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Returns a boolean value indicating that the job stopped successfully. By default, this cmdlet does not return any output.")] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + WebsitesClient.StopWebJob(Name, Slot, JobName, WebJobType.Continuous); + + if (PassThru) + { + WriteObject(true); + } + } + } +} diff --git a/src/ServiceManagement/Services/Commands/packages.config b/src/ServiceManagement/Services/Commands/packages.config new file mode 100644 index 000000000000..225068cf1eaa --- /dev/null +++ b/src/ServiceManagement/Services/Commands/packages.config @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Commands.SqlDatabase.Test.csproj b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Commands.SqlDatabase.Test.csproj new file mode 100644 index 000000000000..fdcae8c60965 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Commands.SqlDatabase.Test.csproj @@ -0,0 +1,242 @@ + + + + Debug + AnyCPU + + + 2.0 + {37455286-D8A7-4E0C-8B4D-C517D20C641A} + Library + Properties + Microsoft.WindowsAzure.Commands.SqlDatabase.Test + Microsoft.WindowsAzure.Commands.SqlDatabase.Test + v4.5 + 512 + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + ..\..\..\ + true + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + OnBuildSuccess + + + bin\Release\ + TRACE;SIGN + true + pdbonly + AnyCPU + prompt + false + + + true + MSSharedLibKey.snk + true + true + false + + + + ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll + + + ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll + + + ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Sql.2.0.0\lib\net40\Microsoft.WindowsAzure.Management.Sql.dll + + + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + True + + + + 3.5 + + + + False + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + + ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll + + + + + + + False + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {DDF5D225-C9C5-42B7-BDB5-2C3646E479AA} + Commands.SqlDatabase + + + {bc420543-c04e-4bf3-96e1-cd81b823bdd7} + Commands.Test.Utilities + + + {4900ec4e-8deb-4412-9108-0bc52f81d457} + Commands.Utilities + + + {CD5AA507-F5EF-473D-855B-84B91A1ABE54} + Commands + + + {3b48a77b-5956-4a62-9081-92ba04b02b27} + Commands.Common.Test + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + + + PowershellTestSSLCert.pfx + + + PowershellTestClientCert.pfx + + + + PreserveNewest + Designer + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/FunctionalTests/DatabaseTest.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/FunctionalTests/DatabaseTest.cs new file mode 100644 index 000000000000..9636b4b059af --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/FunctionalTests/DatabaseTest.cs @@ -0,0 +1,213 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.IO; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.Utilities; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.FunctionalTests +{ + /// + /// Functional tests for Database CRUD operations + /// + [TestClass] + public class DatabaseTest + { + #region Test Script Locations + + /// + /// Scripts for doing context creation tests + /// + private const string CreateContextScript = @"Database\CreateContext.ps1"; + + /// + /// Script for doing Create and Get database tests with SQL authentication + /// + private const string CreateScript = @"Database\CreateAndGetDatabase.ps1"; + + /// + /// Scripts for doing database update tests + /// + private const string UpdateScript = @"Database\UpdateDatabase.ps1"; + + /// + /// Scripts for doing delete database tests + /// + private const string DeleteScript = @"Database\DeleteDatabase.ps1"; + + /// + /// Tests for doing format validation tests + /// + private const string FormatValidationScript = @"Database\FormatValidation.ps1"; + + /// + /// Tests for doing import export tests + /// + private const string ImportExportScript = @"Database\ImportExportDatabase.ps1"; + + #endregion + + /// + /// The end point to use for the tests + /// + private const string LocalRdfeEndpoint = @"https://management.dev.mscds.com:12346/"; + + /// + /// Tests context creation + /// + [TestMethod] + [TestCategory("Functional")] + public void CreateContext() + { + string arguments = string.Format( + CultureInfo.InvariantCulture, + "-ManageUrl \"{0}\" -UserName \"{1}\" -Password \"{2}\" " + + "-SubscriptionId \"{3}\" -SerializedCert \"{4}\" ", + SqlDatabaseTestSettings.Instance.ManageUrl, + SqlDatabaseTestSettings.Instance.UserName, + SqlDatabaseTestSettings.Instance.Password, + SqlDatabaseTestSettings.Instance.SubscriptionId, + SqlDatabaseTestSettings.Instance.SerializedCert); + bool testResult = PSScriptExecutor.ExecuteScript( + DatabaseTest.CreateContextScript, + arguments); + Assert.IsTrue(testResult); + } + + /// + /// Tests creating a database using SQL authentication + /// + [TestMethod] + [TestCategory("Functional")] + public void CreateAndGetDatabase() + { + string arguments = string.Format( + CultureInfo.InvariantCulture, + "-Name \"{0}\" -ManageUrl \"{1}\" -UserName \"{2}\" -Password \"{3}\" " + + "-ServerName \"{4}\" -SubscriptionID \"{5}\" -SerializedCert \"{6}\" " + + "-Endpoint \"{7}\"", + "testcreatedbfromcmdlet", + SqlDatabaseTestSettings.Instance.ManageUrl, + SqlDatabaseTestSettings.Instance.UserName, + SqlDatabaseTestSettings.Instance.Password, + SqlDatabaseTestSettings.Instance.ServerName, + SqlDatabaseTestSettings.Instance.SubscriptionId, + SqlDatabaseTestSettings.Instance.SerializedCert, + LocalRdfeEndpoint); + bool testResult = PSScriptExecutor.ExecuteScript(DatabaseTest.CreateScript, arguments); + Assert.IsTrue(testResult); + } + + /// + /// Tests updating a database using SQL authentication + /// + [TestMethod] + [TestCategory("Functional")] + public void UpdateDatabase() + { + string arguments = string.Format( + CultureInfo.InvariantCulture, + "-Name \"{0}\" -ManageUrl \"{1}\" -UserName \"{2}\" -Password \"{3}\" " + + "-ServerName \"{4}\" -SubscriptionID \"{5}\" -SerializedCert \"{6}\" " + + "-Endpoint \"{7}\"", + "testupdatedbfromcmdlet", + SqlDatabaseTestSettings.Instance.ManageUrl, + SqlDatabaseTestSettings.Instance.UserName, + SqlDatabaseTestSettings.Instance.Password, + SqlDatabaseTestSettings.Instance.ServerName, + SqlDatabaseTestSettings.Instance.SubscriptionId, + SqlDatabaseTestSettings.Instance.SerializedCert, + LocalRdfeEndpoint); + bool testResult = PSScriptExecutor.ExecuteScript(DatabaseTest.UpdateScript, arguments); + Assert.IsTrue(testResult); + } + + /// + /// Tests removing a database using SQL authentication + /// + [TestMethod] + [TestCategory("Functional")] + public void DeleteDatabase() + { + string arguments = string.Format( + CultureInfo.InvariantCulture, + "-Name \"{0}\" -ManageUrl \"{1}\" -UserName \"{2}\" -Password \"{3}\" " + + "-ServerName \"{4}\" -SubscriptionID \"{5}\" -SerializedCert \"{6}\" " + + "-Endpoint \"{7}\"", + "testDeletedbfromcmdlet", + SqlDatabaseTestSettings.Instance.ManageUrl, + SqlDatabaseTestSettings.Instance.UserName, + SqlDatabaseTestSettings.Instance.Password, + SqlDatabaseTestSettings.Instance.ServerName, + SqlDatabaseTestSettings.Instance.SubscriptionId, + SqlDatabaseTestSettings.Instance.SerializedCert, + LocalRdfeEndpoint); + bool testResult = PSScriptExecutor.ExecuteScript(DatabaseTest.DeleteScript, arguments); + Assert.IsTrue(testResult); + } + + /// + /// Validates the object output format + /// + [TestMethod] + [TestCategory("Functional")] + public void OutputObjectFormatValidation() + { + string outputFile = Path.Combine(Directory.GetCurrentDirectory(), Guid.NewGuid() + ".txt"); + string arguments = string.Format( + CultureInfo.InvariantCulture, + "-Name \"{0}\" -ManageUrl \"{1}\" -UserName \"{2}\" -Password \"{3}\" -OutputFile \"{4}\"", + "testFormatdbfromcmdlet", + SqlDatabaseTestSettings.Instance.ManageUrl, + SqlDatabaseTestSettings.Instance.UserName, + SqlDatabaseTestSettings.Instance.Password, + outputFile); + bool testResult = PSScriptExecutor.ExecuteScript(DatabaseTest.FormatValidationScript, arguments); + Assert.IsTrue(testResult); + + OutputFormatValidator.ValidateOutputFormat(outputFile, @"Database\ExpectedFormat.txt"); + } + + /// + /// Runs the script to test the import and export functionality + /// + [TestMethod] + [TestCategory("Functional")] + public void ImportExportDatabase() + { + string outputFile = Path.Combine(Directory.GetCurrentDirectory(), Guid.NewGuid() + ".txt"); + + string cmdlineArgs = + "-UserName \"{0}\" -Password \"{1}\" -SubscriptionId \"{2}\" -SerializedCert \"{3}\" " + + "-ContainerName \"{4}\" -StorageName \"{5}\" -StorageAccessKey \"{6}\" " + + "-ServerLocation \"{7}\""; + + string arguments = string.Format( + CultureInfo.InvariantCulture, + cmdlineArgs, + SqlDatabaseTestSettings.Instance.UserName, + SqlDatabaseTestSettings.Instance.Password, + SqlDatabaseTestSettings.Instance.SubscriptionId, + SqlDatabaseTestSettings.Instance.SerializedCert, + SqlDatabaseTestSettings.Instance.ContainerName, + SqlDatabaseTestSettings.Instance.StorageName, + SqlDatabaseTestSettings.Instance.AccessKey, + SqlDatabaseTestSettings.Instance.ServerLocation); + bool testResult = PSScriptExecutor.ExecuteScript(DatabaseTest.ImportExportScript, arguments); + Assert.IsTrue(testResult); + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/FunctionalTests/OutputFormatValidator.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/FunctionalTests/OutputFormatValidator.cs new file mode 100644 index 000000000000..361a3282f3c4 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/FunctionalTests/OutputFormatValidator.cs @@ -0,0 +1,48 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.FunctionalTests +{ + public class OutputFormatValidator + { + public static void ValidateOutputFormat(string actualFileName, string expectedFileName) + { + string actualFormat = GetMaskedData(actualFileName); + Console.WriteLine(actualFormat); + string expectedFormat = GetMaskedData(expectedFileName); + Assert.AreEqual(expectedFormat, actualFormat, "Format of output object didn't match"); + } + + private static string GetMaskedData(string fileName) + { + string mask = "xxxxxxxxxx"; + // The code expects the first line of the file contains the list of dynamic data (such as servername#operation id) separated by #. + // These dynamic data will be replaced with xxxxxxxxxx. + string dynamicContentLine = File.ReadAllLines(fileName)[0]; + string[] dynamicContents = dynamicContentLine.Split('#'); + string data = FileUtilities.DataStore.ReadFileAsText(fileName); + + foreach (string dynamicContent in dynamicContents) + { + data = data.Replace(dynamicContent, mask); + } + return data; + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/FunctionalTests/Readme.txt b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/FunctionalTests/Readme.txt new file mode 100644 index 000000000000..18f1eb7e8470 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/FunctionalTests/Readme.txt @@ -0,0 +1,24 @@ +The functional tests in this folder covers 'Azure Sql Database Server' cmdlets. +These tests exercise the cmdlets from End to End with no mocking in +any of the layers. + +Dependencies +------------ +These tests require an active subscription in which a sql database server will +be created. It also needs to know the location/region where the server should +be created. + +Functional test reads the following information +1. Subscription information from +'src\Management.Test\Resources\Azure.publishsettings'. +It uses the first subscription id from this file. + +2. Server location from +'src\Management.SqlDatabase.Test\Resources\SqlDatabaseSettings.xml'. + +Running functional tests +------------------------ +These functional tests are not part of the unit tests executed by the target + "Test" in build.proj. +In order to run these test, it has to be executed manually from Visual +Studio like any other unit test. \ No newline at end of file diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/FunctionalTests/ServerTest.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/FunctionalTests/ServerTest.cs new file mode 100644 index 000000000000..eed9622963ae --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/FunctionalTests/ServerTest.cs @@ -0,0 +1,143 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Xml.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.Utilities; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.FunctionalTests +{ + [TestClass] + public class ServerTest + { + private string subscriptionID; + private string serializedCert; + private string serverLocation; + private string manageUrl; + private string serverName; + private string username; + private string password; + + private const string ServerTestScript = @"Server\CreateGetDeleteServer.ps1"; + private const string FirewallTestScript = @"Server\CreateGetDropFirewall.ps1"; + private const string ResetPasswordScript = @"Server\ResetPassword.ps1"; + private const string FormatValidationScript = @"Server\FormatValidation.ps1"; + + /// + /// The path to the script for testing get server quota + /// + private const string GetQuotaScript = @"Server\GetServerQuota.ps1"; + + /// + /// The end point to use for the tests + /// + private const string LocalRdfeEndpoint = @"https://management.dev.mscds.com:12346/"; + + [TestInitialize] + public void Setup() + { + XElement root = XElement.Load("SqlDatabaseSettings.xml"); + this.subscriptionID = root.Element("SubscriptionId").Value; + this.serializedCert = root.Element("SerializedCert").Value; + this.serverLocation = root.Element("ServerLocation").Value; + this.manageUrl = root.Element("ManageUrl").Value; + this.username = root.Element("SqlAuthUserName").Value; + this.password = root.Element("SqlAuthPassword").Value; + this.serverName = new Uri(this.manageUrl).Host.Split('.')[0]; + } + + [TestMethod] + [TestCategory("Functional")] + public void CreateGetDeleteServerTest() + { + string arguments = string.Format( + "-subscriptionID \"{0}\" -serializedCert \"{1}\" -serverLocation \"{2}\" -Endpoint \"{3}\"", + this.subscriptionID, + this.serializedCert, + this.serverLocation, + LocalRdfeEndpoint); + bool testResult = PSScriptExecutor.ExecuteScript(ServerTest.ServerTestScript, arguments); + Assert.IsTrue(testResult); + } + + [TestMethod] + [TestCategory("Functional")] + public void FirewallTest() + { + string arguments = string.Format( + "-subscriptionID \"{0}\" -serializedCert \"{1}\" -serverLocation \"{2}\" -Endpoint \"{3}\"", + this.subscriptionID, + this.serializedCert, + this.serverLocation, + LocalRdfeEndpoint); + bool testResult = PSScriptExecutor.ExecuteScript(ServerTest.FirewallTestScript, arguments); + Assert.IsTrue(testResult); + } + + [TestMethod] + [TestCategory("Functional")] + public void ResetServerPassword() + { + string arguments = string.Format( + "-subscriptionID \"{0}\" -serializedCert \"{1}\" -serverLocation \"{2}\"", + this.subscriptionID, + this.serializedCert, + this.serverLocation); + bool testResult = + PSScriptExecutor.ExecuteScript(ServerTest.ResetPasswordScript, arguments); + Assert.IsTrue(testResult); + } + + [TestMethod] + [TestCategory("Functional")] + [Ignore] + public void OutputObjectFormatValidation() + { + string outputFile = Path.Combine(Directory.GetCurrentDirectory(), Guid.NewGuid() + ".txt"); + string arguments = string.Format( + "-subscriptionID \"{0}\" -serializedCert \"{1}\" -serverLocation \"{2}\" -OutputFile \"{3}\"", + this.subscriptionID, + this.serializedCert, + this.serverLocation, outputFile); + bool testResult = + PSScriptExecutor.ExecuteScript(ServerTest.FormatValidationScript, arguments); + Assert.IsTrue(testResult); + + OutputFormatValidator.ValidateOutputFormat(outputFile, @"Server\ExpectedFormat.txt"); + } + + /// + /// Test for getting a servers quota + /// + [TestMethod] + [TestCategory("Functional")] + public void GetServerQuotaTest() + { + string arguments = string.Format( + "-SloManageUrl \"{0}\" -subscriptionID \"{1}\" -serializedCert \"{2}\" -serverLocation \"{3}\" " + + " -Endpoint \"{4}\" -Username \"{5}\" -Password \"{6}\"", + this.manageUrl, + this.subscriptionID, + this.serializedCert, + this.serverLocation, + LocalRdfeEndpoint, + this.username, + this.password); + bool testResult = PSScriptExecutor.ExecuteScript(ServerTest.GetQuotaScript, arguments); + Assert.IsTrue(testResult); + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/MSSharedLibKey.snk b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/MSSharedLibKey.snk differ diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Properties/AssemblyInfo.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..0f5848692cc8 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Properties/AssemblyInfo.cs @@ -0,0 +1,44 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft.WindowsAzure.Commands.SqlDatabase.Test")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("bb47a170-9a42-4fbf-ac30-66548f38e17d")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] +[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Resources/MockSessions.xml b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Resources/MockSessions.xml new file mode 100644 index 000000000000..adb7014fefcc --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Resources/MockSessions.xml @@ -0,0 +1,35677 @@ + + + + UnitTests.NewAzureSqlDatabaseServerContextWithSqlAuthDerivedName + + + 0 + + http://localhost:12345/v1/ManagementService.svc/GetAccessToken + GET + WindowsAzurePowershell/v0.8.3 + +
+ sqlauthorization + Basic dGVzdHVzZXI6dGVzdHBAc3Mx +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 1cc905b8-8ce3-81b4-9836-ccaad43fd49a +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 19:53:25 GMT +
+
+ Set-Cookie + .SQLSERVERMANAGEMENT=BwO/j1tGo6WtvlYalOLBdw==; path=/v1/ManagementService.svc; expires=03-Jul-2014 00:53:25 GMT; domain=.dev.mscds.com; httponly; secure +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + + .SQLSERVERMANAGEMENT + BwO/j1tGo6WtvlYalOLBdw== + v1/ManagementService.svc + + + <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">Fal4CFfJHV3VvqKm0I4qgp0YU8FimlX99vpqZCLtaRB8hMFbG90xOQo7hQjhhgOy+MXI82SOkXLhzGTLYie1KT6YWY5j9nXzapYve3kNXZpaHcUTMnsmv3o7mwbsRpvIYgvSCdU7zzjeNvFaQJOHQj8KDRpJCSqoC0ymjQX6Zu9kr52MVnSIGe7QB0fe2kGYqktFRk6TPA5yMD3mqfx0fzCVVvew+V8mFSrCY9dPioNFZs542WQXhJZ9r/TIJHB9CoTLRKSTCjG8VQQzprCVgitVIg9IJ3pHMkDRpJUu9YweZKB9pzId+zrFfzijix3ffUY+VxSfruq9BxQg+4bkTg/Ad3RvqkINk1okl2a1BddzYpnPWz7umK4Iqf+n1sVu6qHS+Bxzs7DB6Dp1tqEQYnNIZmXchAtEReUXSIbfo6wynq1x6eXDotjCVK6gNISZaAJfnPTfYvdj0GnYOLS/RlnUKvGL1P9UQHP+F4XBfNLXz0Tgcahpk7h59RtGQZWlk8AmSpkoBmvnVxpUfb+u2Z5eQtomffWS6Z4yZX7QfDVnyUrkZYrY9C0xAsMkZhMlxqFzF1VNZB4dpirPanJdxxb37J4KeUCyCReCROvtuXKSthVpZgLw1zN8US37epBTVJihIaSPVf12N3ebVI2Jv8FqNvf7ZejWesL4ntFMEAcIQpu8w1VYfR3oQLaHKEPgFpDmUgPU3F+bJoVLZ1Q4Wd/lNKKJDTVOeloL02wNliGP+dXXiIuQ/56quDjXOlTOQvLCtoo/fpd0BRrSP+BfRQ==</string> +
+
+ + 1 + + http://localhost:12345/v1/ManagementService.svc/Server2('localhost')/Servers()?$top=1 + GET + WindowsAzurePowershell/v0.8.3 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + Fal4CFfJHV3VvqKm0I4qgp0YU8FimlX99vpqZCLtaRB8hMFbG90xOQo7hQjhhgOy+MXI82SOkXLhzGTLYie1KT6YWY5j9nXzapYve3kNXZpaHcUTMnsmv3o7mwbsRpvIYgvSCdU7zzjeNvFaQJOHQj8KDRpJCSqoC0ymjQX6Zu9kr52MVnSIGe7QB0fe2kGYqktFRk6TPA5yMD3mqfx0fzCVVvew+V8mFSrCY9dPioNFZs542WQXhJZ9r/TIJHB9CoTLRKSTCjG8VQQzprCVgitVIg9IJ3pHMkDRpJUu9YweZKB9pzId+zrFfzijix3ffUY+VxSfruq9BxQg+4bkTg/Ad3RvqkINk1okl2a1BddzYpnPWz7umK4Iqf+n1sVu6qHS+Bxzs7DB6Dp1tqEQYnNIZmXchAtEReUXSIbfo6wynq1x6eXDotjCVK6gNISZaAJfnPTfYvdj0GnYOLS/RlnUKvGL1P9UQHP+F4XBfNLXz0Tgcahpk7h59RtGQZWlk8AmSpkoBmvnVxpUfb+u2Z5eQtomffWS6Z4yZX7QfDVnyUrkZYrY9C0xAsMkZhMlxqFzF1VNZB4dpirPanJdxxb37J4KeUCyCReCROvtuXKSthVpZgLw1zN8US37epBTVJihIaSPVf12N3ebVI2Jv8FqNvf7ZejWesL4ntFMEAcIQpu8w1VYfR3oQLaHKEPgFpDmUgPU3F+bJoVLZ1Q4Wd/lNKKJDTVOeloL02wNliGP+dXXiIuQ/56quDjXOlTOQvLCtoo/fpd0BRrSP+BfRQ== +
+
+ x-ms-client-session-id + a4b50bae-54b6-4dae-8c5e-cac585e3a22d-2014-07-02 19:53:02Z +
+
+ x-ms-client-request-id + 36663be7-bde9-46c6-9d5a-e9db4e9b4e48-2014-07-02 19:53:25Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=BwO/j1tGo6WtvlYalOLBdw== +
+
+ + + .SQLSERVERMANAGEMENT + BwO/j1tGo6WtvlYalOLBdw== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 1cc905b8-8ce3-81b4-9836-ccaad43fd49a +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 19:53:25 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="https://myserver01.dev.mscds.com/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>https://myserver01.dev.mscds.com/v1/ManagementService.svc/Server2('myserver01')/Servers</id><title type="text">Servers</title><updated>2014-07-02T19:53:26Z</updated><link rel="self" title="Servers" href="Servers" /><entry><id>https://myserver01.dev.mscds.com/v1/ManagementService.svc/Server2('myserver01')/Servers('myserver01')</id><category term="Microsoft.SqlServer.Management.Server.Domain.Server" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Server" href="Servers('myserver01')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Databases" type="application/atom+xml;type=feed" title="Databases" href="Servers('myserver01')/Databases" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServerMetrics" type="application/atom+xml;type=entry" title="ServerMetrics" href="Servers('myserver01')/ServerMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServerQuotas" type="application/atom+xml;type=feed" title="ServerQuotas" href="Servers('myserver01')/ServerQuotas" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseOperations" type="application/atom+xml;type=feed" title="DatabaseOperations" href="Servers('myserver01')/DatabaseOperations" /><title /><updated>2014-07-02T19:53:26Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Name>myserver01</d:Name><d:SubscriptionId m:type="Edm.Guid">00000000-0000-0000-0001-000000000001</d:SubscriptionId><d:Version>2.0</d:Version></m:properties></content></entry></feed> +
+
+ + 2 + + http://localhost:12345/v1/ManagementService.svc/Server2('localhost')/$metadata + GET + WindowsAzurePowershell/v0.8.3 + +
+ AccessToken + Fal4CFfJHV3VvqKm0I4qgp0YU8FimlX99vpqZCLtaRB8hMFbG90xOQo7hQjhhgOy+MXI82SOkXLhzGTLYie1KT6YWY5j9nXzapYve3kNXZpaHcUTMnsmv3o7mwbsRpvIYgvSCdU7zzjeNvFaQJOHQj8KDRpJCSqoC0ymjQX6Zu9kr52MVnSIGe7QB0fe2kGYqktFRk6TPA5yMD3mqfx0fzCVVvew+V8mFSrCY9dPioNFZs542WQXhJZ9r/TIJHB9CoTLRKSTCjG8VQQzprCVgitVIg9IJ3pHMkDRpJUu9YweZKB9pzId+zrFfzijix3ffUY+VxSfruq9BxQg+4bkTg/Ad3RvqkINk1okl2a1BddzYpnPWz7umK4Iqf+n1sVu6qHS+Bxzs7DB6Dp1tqEQYnNIZmXchAtEReUXSIbfo6wynq1x6eXDotjCVK6gNISZaAJfnPTfYvdj0GnYOLS/RlnUKvGL1P9UQHP+F4XBfNLXz0Tgcahpk7h59RtGQZWlk8AmSpkoBmvnVxpUfb+u2Z5eQtomffWS6Z4yZX7QfDVnyUrkZYrY9C0xAsMkZhMlxqFzF1VNZB4dpirPanJdxxb37J4KeUCyCReCROvtuXKSthVpZgLw1zN8US37epBTVJihIaSPVf12N3ebVI2Jv8FqNvf7ZejWesL4ntFMEAcIQpu8w1VYfR3oQLaHKEPgFpDmUgPU3F+bJoVLZ1Q4Wd/lNKKJDTVOeloL02wNliGP+dXXiIuQ/56quDjXOlTOQvLCtoo/fpd0BRrSP+BfRQ== +
+
+ x-ms-client-session-id + a4b50bae-54b6-4dae-8c5e-cac585e3a22d-2014-07-02 19:53:02Z +
+
+ x-ms-client-request-id + 256ef16c-83e9-4393-8334-8ec99d48a7cc-2014-07-02 19:53:26Z +
+
+ Cookie + .SQLSERVERMANAGEMENT=BwO/j1tGo6WtvlYalOLBdw== +
+
+ + + .SQLSERVERMANAGEMENT + BwO/j1tGo6WtvlYalOLBdw== + + + + + + +
+ + OK + +
+ x-ms-request-id + 1cc905b8-8ce3-81b4-9836-ccaad43fd49a +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 3.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml;charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 19:53:27 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx"><edmx:DataServices m:DataServiceVersion="3.0" m:MaxDataServiceVersion="3.0" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><Schema Namespace="Microsoft.SqlServer.Management.Server.Domain" xmlns="http://schemas.microsoft.com/ado/2009/11/edm"><EntityType Name="Server" OpenType="true"><Key><PropertyRef Name="Name" /></Key><Property Name="Name" Type="Edm.String" Nullable="false" /><Property Name="SubscriptionId" Type="Edm.Guid" /><Property Name="Version" Type="Edm.String" /><NavigationProperty Name="Databases" Relationship="Microsoft.SqlServer.Management.Server.Domain.Server_Databases_Database_Server" ToRole="Database_Server" FromRole="Server_Databases" /><NavigationProperty Name="ServerMetrics" Relationship="Microsoft.SqlServer.Management.Server.Domain.Server_ServerMetrics_ServerMetrics_Server" ToRole="ServerMetrics_Server" FromRole="Server_ServerMetrics" /><NavigationProperty Name="ServerQuotas" Relationship="Microsoft.SqlServer.Management.Server.Domain.Server_ServerQuotas_ServerQuota_Server" ToRole="ServerQuota_Server" FromRole="Server_ServerQuotas" /><NavigationProperty Name="DatabaseOperations" Relationship="Microsoft.SqlServer.Management.Server.Domain.Server_DatabaseOperations_DatabaseOperation_Server" ToRole="DatabaseOperation_Server" FromRole="Server_DatabaseOperations" /></EntityType><EntityType Name="Database" OpenType="true"><Key><PropertyRef Name="Id" /></Key><Property Name="Id" Type="Edm.Int32" Nullable="false" /><Property Name="Name" Type="Edm.String" /><Property Name="ServiceObjectiveId" Type="Edm.Guid" /><Property Name="AssignedServiceObjectiveId" Type="Edm.Guid" /><Property Name="ServiceObjectiveAssignmentState" Type="Edm.Byte" /><Property Name="ServiceObjectiveAssignmentStateDescription" Type="Edm.String" /><Property Name="ServiceObjectiveAssignmentErrorCode" Type="Edm.Int32" /><Property Name="ServiceObjectiveAssignmentErrorDescription" Type="Edm.String" /><Property Name="ServiceObjectiveAssignmentSuccessDate" Type="Edm.DateTime" /><Property Name="Edition" Type="Edm.String" /><Property Name="MaxSizeGB" Type="Edm.Int32" /><Property Name="MaxSizeBytes" Type="Edm.Int64" /><Property Name="CollationName" Type="Edm.String" /><Property Name="CreationDate" Type="Edm.DateTime" Nullable="false" /><Property Name="RecoveryPeriodStartDate" Type="Edm.DateTime" /><Property Name="IsSystemObject" Type="Edm.Boolean" Nullable="false" /><Property Name="Status" Type="Edm.Int32" Nullable="false" /><Property Name="IsFederationRoot" Type="Edm.Boolean" /><Property Name="SizeMB" Type="Edm.Decimal" Nullable="false" /><Property Name="IsRecursiveTriggersOn" Type="Edm.Boolean" /><Property Name="IsReadOnly" Type="Edm.Boolean" Nullable="false" /><Property Name="IsFederationMember" Type="Edm.Boolean" Nullable="false" /><Property Name="IsQueryStoreOn" Type="Edm.Boolean" Nullable="false" /><Property Name="IsQueryStoreReadOnly" Type="Edm.Boolean" /><Property Name="QueryStoreMaxSizeMB" Type="Edm.Int32" /><Property Name="QueryStoreFlushPeriodSeconds" Type="Edm.Int32" /><Property Name="QueryStoreIntervalLengthMinutes" Type="Edm.Int32" /><Property Name="QueryStoreClearAll" Type="Edm.Boolean" /><Property Name="QueryStoreStaleQueryThresholdDays" Type="Edm.Int32" /><Property Name="IsSuspended" Type="Edm.Boolean" /><NavigationProperty Name="Server" Relationship="Microsoft.SqlServer.Management.Server.Domain.Server_Databases_Database_Server" ToRole="Server_Databases" FromRole="Database_Server" /><NavigationProperty Name="ServiceObjective" Relationship="Microsoft.SqlServer.Management.Server.Domain.Database_ServiceObjective" ToRole="ServiceObjective" FromRole="Database" /><NavigationProperty Name="DatabaseMetrics" Relationship="Microsoft.SqlServer.Management.Server.Domain.Database_DatabaseMetrics_DatabaseMetrics_Database" ToRole="DatabaseMetrics_Database" FromRole="Database_DatabaseMetrics" /><NavigationProperty Name="DatabaseCopies" Relationship="Microsoft.SqlServer.Management.Server.Domain.Database_DatabaseCopies_DatabaseCopy_Database" ToRole="DatabaseCopy_Database" FromRole="Database_DatabaseCopies" /></EntityType><EntityType Name="RecoverableDatabase" OpenType="true"><Key><PropertyRef Name="EntityId" /></Key><Property Name="EntityId" Type="Edm.String" Nullable="false" /><Property Name="Name" Type="Edm.String" /><Property Name="ServerName" Type="Edm.String" /><Property Name="Edition" Type="Edm.String" /><Property Name="LastAvailableBackupDate" Type="Edm.DateTime" Nullable="false" /></EntityType><EntityType Name="RestorableDroppedDatabase" OpenType="true"><Key><PropertyRef Name="EntityId" /></Key><Property Name="EntityId" Type="Edm.String" Nullable="false" /><Property Name="Name" Type="Edm.String" /><Property Name="ServerName" Type="Edm.String" /><Property Name="Edition" Type="Edm.String" /><Property Name="MaxSizeBytes" Type="Edm.Int64" Nullable="false" /><Property Name="CreationDate" Type="Edm.DateTime" Nullable="false" /><Property Name="DeletionDate" Type="Edm.DateTime" Nullable="false" /><Property Name="RecoveryPeriodStartDate" Type="Edm.DateTime" /></EntityType><EntityType Name="DimensionSetting" OpenType="true"><Key><PropertyRef Name="Id" /></Key><Property Name="Id" Type="Edm.Guid" Nullable="false" /><Property Name="Name" Type="Edm.String" /><Property Name="Description" Type="Edm.String" /><Property Name="Ordinal" Type="Edm.Byte" Nullable="false" /><Property Name="IsDefault" Type="Edm.Boolean" Nullable="false" /></EntityType><EntityType Name="ServiceObjective" OpenType="true"><Key><PropertyRef Name="Id" /></Key><Property Name="Id" Type="Edm.Guid" Nullable="false" /><Property Name="Name" Type="Edm.String" /><Property Name="Description" Type="Edm.String" /><Property Name="IsDefault" Type="Edm.Boolean" Nullable="false" /><Property Name="IsSystem" Type="Edm.Boolean" Nullable="false" /><Property Name="Enabled" Type="Edm.Boolean" Nullable="false" /><NavigationProperty Name="DimensionSettings" Relationship="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective_DimensionSettings" ToRole="DimensionSettings" FromRole="ServiceObjective" /></EntityType><EntityType Name="Operation" OpenType="true"><Key><PropertyRef Name="ActionId" /></Key><Property Name="ActionTypeName" Type="Edm.String" /><Property Name="ActionStatusName" Type="Edm.String" /><Property Name="DacDatabaseName" Type="Edm.String" /><Property Name="CreatedBy" Type="Edm.String" /><Property Name="DateCreated" Type="Edm.DateTime" Nullable="false" /><Property Name="DateModified" Type="Edm.DateTime" Nullable="false" /><Property Name="Comments" Type="Edm.String" /><Property Name="Error" Type="Edm.String" /><Property Name="ActionId" Type="Edm.Int32" Nullable="false" /><Property Name="CompletedSteps" Type="Edm.Int32" Nullable="false" /><Property Name="TotalSteps" Type="Edm.Int32" Nullable="false" /><Property Name="DacObjectTypeName" Type="Edm.String" /><NavigationProperty Name="OperationDetails" Relationship="Microsoft.SqlServer.Management.Server.Domain.Operation_OperationDetails_OperationDetail_Operation" ToRole="OperationDetail_Operation" FromRole="Operation_OperationDetails" /></EntityType><EntityType Name="OperationDetail" OpenType="true"><Key><PropertyRef Name="EntityId" /></Key><Property Name="ActionTypeName" Type="Edm.String" /><Property Name="ActionStatusName" Type="Edm.String" /><Property Name="DacDatabaseName" Type="Edm.String" /><Property Name="CreatedBy" Type="Edm.String" /><Property Name="DateCreated" Type="Edm.DateTime" Nullable="false" /><Property Name="DateModified" Type="Edm.DateTime" Nullable="false" /><Property Name="Comments" Type="Edm.String" /><Property Name="Error" Type="Edm.String" /><Property Name="SequenceId" Type="Edm.Int32" Nullable="false" /><Property Name="EntityId" Type="Edm.String" Nullable="false" /><Property Name="ActionId" Type="Edm.Int32" Nullable="false" /><Property Name="DacObjectTypeName" Type="Edm.String" /><NavigationProperty Name="Operation" Relationship="Microsoft.SqlServer.Management.Server.Domain.Operation_OperationDetails_OperationDetail_Operation" ToRole="Operation_OperationDetails" FromRole="OperationDetail_Operation" /></EntityType><EntityType Name="CreateDatabaseFromDacPacOperation" OpenType="true"><Key><PropertyRef Name="OperationGuid" /></Key><Property Name="OperationGuid" Type="Edm.Guid" Nullable="false" /><Property Name="DatabaseName" Type="Edm.String" /><Property Name="Edition" Type="Edm.String" /><Property Name="MaxSizeGB" Type="Edm.Int32" /><Property Name="OperationId" Type="Edm.Int32" Nullable="false" /><Property Name="DacPac" Type="Edm.Binary" /></EntityType><EntityType Name="ExtractDacPacOperation" OpenType="true"><Key><PropertyRef Name="OperationGuid" /></Key><Property Name="OperationGuid" Type="Edm.Guid" Nullable="false" /><Property Name="DatabaseName" Type="Edm.String" /><Property Name="DacTypeName" Type="Edm.String" /><Property Name="Version" Type="Edm.String" /><Property Name="Description" Type="Edm.String" /><Property Name="DacPac" Type="Edm.Binary" /></EntityType><EntityType Name="UpgradeDatabaseFromDacPacOperation" OpenType="true"><Key><PropertyRef Name="OperationGuid" /></Key><Property Name="OperationGuid" Type="Edm.Guid" Nullable="false" /><Property Name="DatabaseName" Type="Edm.String" /><Property Name="DacPac" Type="Edm.Binary" /><Property Name="RollbackOnFailure" Type="Edm.Boolean" /><Property Name="OperationId" Type="Edm.Int32" Nullable="false" /></EntityType><EntityType Name="ViewDatabaseChangesOperation" OpenType="true"><Key><PropertyRef Name="OperationGuid" /></Key><Property Name="OperationGuid" Type="Edm.Guid" Nullable="false" /><Property Name="DatabaseName" Type="Edm.String" /><Property Name="ChangeResult" Type="Edm.String" /><Property Name="IsRegisteredDac" Type="Edm.Boolean" Nullable="false" /></EntityType><EntityType Name="ViewUpgradePlanOperation" OpenType="true"><Key><PropertyRef Name="OperationGuid" /></Key><Property Name="OperationGuid" Type="Edm.Guid" Nullable="false" /><Property Name="DatabaseName" Type="Edm.String" /><Property Name="DacPac" Type="Edm.Binary" /><Property Name="RollbackOnFailure" Type="Edm.Boolean" /><Property Name="UpgradePlan" Type="Edm.String" /><Property Name="UpgradeScript" Type="Edm.String" /></EntityType><EntityType Name="DatabaseRestoreStatus" OpenType="true"><Key><PropertyRef Name="RequestID" /></Key><Property Name="RequestID" Type="Edm.Guid" Nullable="false" /><Property Name="SourceServerName" Type="Edm.String" /><Property Name="SourceDatabaseName" Type="Edm.String" /><Property Name="SourceDatabaseDeletionDate" Type="Edm.DateTime" /><Property Name="TargetServerName" Type="Edm.String" /><Property Name="TargetDatabaseName" Type="Edm.String" /><Property Name="TargetUtcPointInTime" Type="Edm.DateTime" /><Property Name="State" Type="Edm.String" /><Property Name="Error" Type="Edm.String" /><Property Name="IsCancelled" Type="Edm.Boolean" Nullable="false" /><Property Name="CreatedBy" Type="Edm.String" /><Property Name="CreatedDate" Type="Edm.DateTime" Nullable="false" /></EntityType><EntityType Name="RestoreDatabaseOperation" OpenType="true"><Key><PropertyRef Name="RequestID" /></Key><Property Name="RequestID" Type="Edm.Guid" Nullable="false" /><Property Name="SourceDatabaseName" Type="Edm.String" /><Property Name="SourceDatabaseDeletionDate" Type="Edm.DateTime" /><Property Name="TargetServerName" Type="Edm.String" /><Property Name="TargetDatabaseName" Type="Edm.String" /><Property Name="TargetUtcPointInTime" Type="Edm.DateTime" /></EntityType><EntityType Name="RecoverDatabaseOperation" OpenType="true"><Key><PropertyRef Name="RequestID" /></Key><Property Name="RequestID" Type="Edm.Guid" Nullable="false" /><Property Name="SourceDatabaseName" Type="Edm.String" /><Property Name="TargetServerName" Type="Edm.String" /><Property Name="TargetDatabaseName" Type="Edm.String" /></EntityType><EntityType Name="DatabaseCopy" OpenType="true"><Key><PropertyRef Name="EntityId" /></Key><Property Name="LocalDatabaseId" Type="Edm.Int32" Nullable="false" /><Property Name="DestinationServerName" Type="Edm.String" /><Property Name="DestinationDatabaseName" Type="Edm.String" /><Property Name="SourceServerName" Type="Edm.String" /><Property Name="SourceDatabaseName" Type="Edm.String" /><Property Name="IsContinuous" Type="Edm.Boolean" Nullable="false" /><Property Name="TextStartDate" Type="Edm.String" /><Property Name="TextModifyDate" Type="Edm.String" /><Property Name="PercentComplete" Type="Edm.Single" /><Property Name="IsLocalDatabaseReplicationTarget" Type="Edm.Boolean" Nullable="false" /><Property Name="ReplicationState" Type="Edm.Byte" Nullable="false" /><Property Name="ReplicationStateDescription" Type="Edm.String" /><Property Name="IsInterlinkConnected" Type="Edm.Boolean" Nullable="false" /><Property Name="IsForcedTerminate" Type="Edm.Boolean" /><Property Name="MaximumLag" Type="Edm.Int32" /><Property Name="EntityId" Type="Edm.Guid" Nullable="false" /><Property Name="IsOfflineSecondary" Type="Edm.Boolean" Nullable="false" /><Property Name="IsTerminationAllowed" Type="Edm.Boolean" Nullable="false" /><NavigationProperty Name="Database" Relationship="Microsoft.SqlServer.Management.Server.Domain.Database_DatabaseCopies_DatabaseCopy_Database" ToRole="Database_DatabaseCopies" FromRole="DatabaseCopy_Database" /></EntityType><EntityType Name="DatabaseCopyValidationOperation" OpenType="true"><Key><PropertyRef Name="DatabaseName" /></Key><Property Name="DatabaseName" Type="Edm.String" Nullable="false" /><Property Name="Action" Type="Edm.Int32" Nullable="false" /><Property Name="LoginSid" Type="Edm.String" /></EntityType><EntityType Name="FirewallRule" OpenType="true"><Key><PropertyRef Name="Name" /></Key><Property Name="Name" Type="Edm.String" Nullable="false" /><Property Name="StartIPAddress" Type="Edm.String" /><Property Name="EndIPAddress" Type="Edm.String" /><Property Name="CreateDate" Type="Edm.DateTime" Nullable="false" /><Property Name="ModifyDate" Type="Edm.DateTime" Nullable="false" /></EntityType><EntityType Name="DatabaseMetrics" OpenType="true"><Key><PropertyRef Name="DatabaseId" /></Key><Property Name="DatabaseId" Type="Edm.Int32" Nullable="false" /><Property Name="DatabaseName" Type="Edm.String" /><Property Name="NumberOfLoginSuccessEvents" Type="Edm.Int64" Nullable="false" /><Property Name="NumberOfLoginFailureEvents" Type="Edm.Int64" Nullable="false" /><NavigationProperty Name="Database" Relationship="Microsoft.SqlServer.Management.Server.Domain.Database_DatabaseMetrics_DatabaseMetrics_Database" ToRole="Database_DatabaseMetrics" FromRole="DatabaseMetrics_Database" /></EntityType><EntityType Name="ServerMetrics" OpenType="true"><Key><PropertyRef Name="ServerName" /></Key><Property Name="ServerName" Type="Edm.String" Nullable="false" /><Property Name="NumberOfFailedEvents" Type="Edm.Int64" Nullable="false" /><Property Name="NumberOfLoginSuccessEvents" Type="Edm.Int64" Nullable="false" /><Property Name="NumberOfLoginFailureEvents" Type="Edm.Int64" Nullable="false" /><Property Name="NumberOfTerminatedConnectionEvents" Type="Edm.Int64" Nullable="false" /><Property Name="NumberOfThrottledEvents" Type="Edm.Int64" Nullable="false" /><Property Name="NumberOfDeadlockEvents" Type="Edm.Int64" Nullable="false" /><Property Name="NumberOfReconfiguredEvents" Type="Edm.Int64" Nullable="false" /><NavigationProperty Name="Server" Relationship="Microsoft.SqlServer.Management.Server.Domain.Server_ServerMetrics_ServerMetrics_Server" ToRole="Server_ServerMetrics" FromRole="ServerMetrics_Server" /></EntityType><EntityType Name="EventLog" OpenType="true"><Key><PropertyRef Name="EntityId" /></Key><Property Name="EntityId" Type="Edm.String" Nullable="false" /><Property Name="DatabaseName" Type="Edm.String" /><Property Name="StartTimeUtc" Type="Edm.DateTime" Nullable="false" /><Property Name="IntervalSizeInMinutes" Type="Edm.Int32" Nullable="false" /><Property Name="EventCategory" Type="Edm.String" /><Property Name="EventType" Type="Edm.String" /><Property Name="EventSubtype" Type="Edm.Int32" Nullable="false" /><Property Name="EventSubtypeDescription" Type="Edm.String" /><Property Name="Severity" Type="Edm.Int32" /><Property Name="NumberOfEvents" Type="Edm.Int64" /><Property Name="Description" Type="Edm.String" /><Property Name="AdditionalData" Type="Edm.String" /></EntityType><EntityType Name="ServerQuota" OpenType="true"><Key><PropertyRef Name="Name" /></Key><Property Name="Name" Type="Edm.String" Nullable="false" /><Property Name="Value" Type="Edm.Int32" Nullable="false" /><NavigationProperty Name="Server" Relationship="Microsoft.SqlServer.Management.Server.Domain.Server_ServerQuotas_ServerQuota_Server" ToRole="Server_ServerQuotas" FromRole="ServerQuota_Server" /></EntityType><EntityType Name="DatabaseOperation" OpenType="true"><Key><PropertyRef Name="Id" /></Key><Property Name="Id" Type="Edm.Guid" Nullable="false" /><Property Name="Name" Type="Edm.String" /><Property Name="State" Type="Edm.String" /><Property Name="StateId" Type="Edm.Int32" Nullable="false" /><Property Name="SessionActivityId" Type="Edm.Guid" Nullable="false" /><Property Name="DatabaseName" Type="Edm.String" /><Property Name="PercentComplete" Type="Edm.Int32" Nullable="false" /><Property Name="ErrorCode" Type="Edm.Int32" /><Property Name="Error" Type="Edm.String" /><Property Name="ErrorSeverity" Type="Edm.Int32" /><Property Name="ErrorState" Type="Edm.Int32" /><Property Name="StartTime" Type="Edm.DateTime" Nullable="false" /><Property Name="LastModifyTime" Type="Edm.DateTime" Nullable="false" /><NavigationProperty Name="Server" Relationship="Microsoft.SqlServer.Management.Server.Domain.Server_DatabaseOperations_DatabaseOperation_Server" ToRole="Server_DatabaseOperations" FromRole="DatabaseOperation_Server" /></EntityType><Association Name="Server_Databases_Database_Server"><End Type="Microsoft.SqlServer.Management.Server.Domain.Database" Role="Database_Server" Multiplicity="*" /><End Type="Microsoft.SqlServer.Management.Server.Domain.Server" Role="Server_Databases" Multiplicity="0..1" /></Association><Association Name="Server_ServerMetrics_ServerMetrics_Server"><End Type="Microsoft.SqlServer.Management.Server.Domain.ServerMetrics" Role="ServerMetrics_Server" Multiplicity="0..1" /><End Type="Microsoft.SqlServer.Management.Server.Domain.Server" Role="Server_ServerMetrics" Multiplicity="0..1" /></Association><Association Name="Server_ServerQuotas_ServerQuota_Server"><End Type="Microsoft.SqlServer.Management.Server.Domain.ServerQuota" Role="ServerQuota_Server" Multiplicity="*" /><End Type="Microsoft.SqlServer.Management.Server.Domain.Server" Role="Server_ServerQuotas" Multiplicity="0..1" /></Association><Association Name="Server_DatabaseOperations_DatabaseOperation_Server"><End Type="Microsoft.SqlServer.Management.Server.Domain.DatabaseOperation" Role="DatabaseOperation_Server" Multiplicity="*" /><End Type="Microsoft.SqlServer.Management.Server.Domain.Server" Role="Server_DatabaseOperations" Multiplicity="0..1" /></Association><Association Name="Database_ServiceObjective"><End Type="Microsoft.SqlServer.Management.Server.Domain.Database" Role="Database" Multiplicity="*" /><End Type="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" Role="ServiceObjective" Multiplicity="0..1" /></Association><Association Name="Database_DatabaseMetrics_DatabaseMetrics_Database"><End Type="Microsoft.SqlServer.Management.Server.Domain.DatabaseMetrics" Role="DatabaseMetrics_Database" Multiplicity="0..1" /><End Type="Microsoft.SqlServer.Management.Server.Domain.Database" Role="Database_DatabaseMetrics" Multiplicity="0..1" /></Association><Association Name="Database_DatabaseCopies_DatabaseCopy_Database"><End Type="Microsoft.SqlServer.Management.Server.Domain.DatabaseCopy" Role="DatabaseCopy_Database" Multiplicity="*" /><End Type="Microsoft.SqlServer.Management.Server.Domain.Database" Role="Database_DatabaseCopies" Multiplicity="0..1" /></Association><Association Name="ServiceObjective_DimensionSettings"><End Type="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" Role="ServiceObjective" Multiplicity="*" /><End Type="Microsoft.SqlServer.Management.Server.Domain.DimensionSetting" Role="DimensionSettings" Multiplicity="*" /></Association><Association Name="Operation_OperationDetails_OperationDetail_Operation"><End Type="Microsoft.SqlServer.Management.Server.Domain.OperationDetail" Role="OperationDetail_Operation" Multiplicity="*" /><End Type="Microsoft.SqlServer.Management.Server.Domain.Operation" Role="Operation_OperationDetails" Multiplicity="0..1" /></Association><EntityContainer Name="ServerContextInternal" m:IsDefaultEntityContainer="true"><EntitySet Name="Servers" EntityType="Microsoft.SqlServer.Management.Server.Domain.Server" /><EntitySet Name="Databases" EntityType="Microsoft.SqlServer.Management.Server.Domain.Database" /><EntitySet Name="RecoverableDatabases" EntityType="Microsoft.SqlServer.Management.Server.Domain.RecoverableDatabase" /><EntitySet Name="RestorableDroppedDatabases" EntityType="Microsoft.SqlServer.Management.Server.Domain.RestorableDroppedDatabase" /><EntitySet Name="DimensionSettings" EntityType="Microsoft.SqlServer.Management.Server.Domain.DimensionSetting" /><EntitySet Name="ServiceObjectives" EntityType="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" /><EntitySet Name="Operations" EntityType="Microsoft.SqlServer.Management.Server.Domain.Operation" /><EntitySet Name="OperationDetails" EntityType="Microsoft.SqlServer.Management.Server.Domain.OperationDetail" /><EntitySet Name="CreateDatabaseFromDacPacOperations" EntityType="Microsoft.SqlServer.Management.Server.Domain.CreateDatabaseFromDacPacOperation" /><EntitySet Name="ExtractDacPacOperations" EntityType="Microsoft.SqlServer.Management.Server.Domain.ExtractDacPacOperation" /><EntitySet Name="UpgradeDatabaseFromDacPacOperations" EntityType="Microsoft.SqlServer.Management.Server.Domain.UpgradeDatabaseFromDacPacOperation" /><EntitySet Name="ViewDatabaseChangesOperations" EntityType="Microsoft.SqlServer.Management.Server.Domain.ViewDatabaseChangesOperation" /><EntitySet Name="ViewUpgradePlanOperations" EntityType="Microsoft.SqlServer.Management.Server.Domain.ViewUpgradePlanOperation" /><EntitySet Name="DatabaseRestoreStatus" EntityType="Microsoft.SqlServer.Management.Server.Domain.DatabaseRestoreStatus" /><EntitySet Name="RestoreDatabaseOperations" EntityType="Microsoft.SqlServer.Management.Server.Domain.RestoreDatabaseOperation" /><EntitySet Name="RecoverDatabaseOperations" EntityType="Microsoft.SqlServer.Management.Server.Domain.RecoverDatabaseOperation" /><EntitySet Name="DatabaseCopies" EntityType="Microsoft.SqlServer.Management.Server.Domain.DatabaseCopy" /><EntitySet Name="DatabaseCopyValidationOperations" EntityType="Microsoft.SqlServer.Management.Server.Domain.DatabaseCopyValidationOperation" /><EntitySet Name="FirewallRules" EntityType="Microsoft.SqlServer.Management.Server.Domain.FirewallRule" /><EntitySet Name="DatabaseMetrics" EntityType="Microsoft.SqlServer.Management.Server.Domain.DatabaseMetrics" /><EntitySet Name="ServerMetrics" EntityType="Microsoft.SqlServer.Management.Server.Domain.ServerMetrics" /><EntitySet Name="EventLogs" EntityType="Microsoft.SqlServer.Management.Server.Domain.EventLog" /><EntitySet Name="ServerQuotas" EntityType="Microsoft.SqlServer.Management.Server.Domain.ServerQuota" /><EntitySet Name="DatabaseOperations" EntityType="Microsoft.SqlServer.Management.Server.Domain.DatabaseOperation" /><AssociationSet Name="ServerDatabase" Association="Microsoft.SqlServer.Management.Server.Domain.Server_Databases_Database_Server"><End Role="Server_Databases" EntitySet="Servers" /><End Role="Database_Server" EntitySet="Databases" /></AssociationSet><AssociationSet Name="ServerServerMetrics" Association="Microsoft.SqlServer.Management.Server.Domain.Server_ServerMetrics_ServerMetrics_Server"><End Role="Server_ServerMetrics" EntitySet="Servers" /><End Role="ServerMetrics_Server" EntitySet="ServerMetrics" /></AssociationSet><AssociationSet Name="ServerServerQuota" Association="Microsoft.SqlServer.Management.Server.Domain.Server_ServerQuotas_ServerQuota_Server"><End Role="Server_ServerQuotas" EntitySet="Servers" /><End Role="ServerQuota_Server" EntitySet="ServerQuotas" /></AssociationSet><AssociationSet Name="ServerDatabaseOperation" Association="Microsoft.SqlServer.Management.Server.Domain.Server_DatabaseOperations_DatabaseOperation_Server"><End Role="Server_DatabaseOperations" EntitySet="Servers" /><End Role="DatabaseOperation_Server" EntitySet="DatabaseOperations" /></AssociationSet><AssociationSet Name="fk_slo_database_objective_selections_objective_id" Association="Microsoft.SqlServer.Management.Server.Domain.Database_ServiceObjective"><End Role="Database" EntitySet="Databases" /><End Role="ServiceObjective" EntitySet="ServiceObjectives" /></AssociationSet><AssociationSet Name="DatabaseDatabaseMetrics" Association="Microsoft.SqlServer.Management.Server.Domain.Database_DatabaseMetrics_DatabaseMetrics_Database"><End Role="Database_DatabaseMetrics" EntitySet="Databases" /><End Role="DatabaseMetrics_Database" EntitySet="DatabaseMetrics" /></AssociationSet><AssociationSet Name="DatabaseDatabaseCopy" Association="Microsoft.SqlServer.Management.Server.Domain.Database_DatabaseCopies_DatabaseCopy_Database"><End Role="Database_DatabaseCopies" EntitySet="Databases" /><End Role="DatabaseCopy_Database" EntitySet="DatabaseCopies" /></AssociationSet><AssociationSet Name="slo_objective_setting_selections" Association="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective_DimensionSettings"><End Role="ServiceObjective" EntitySet="ServiceObjectives" /><End Role="DimensionSettings" EntitySet="DimensionSettings" /></AssociationSet><AssociationSet Name="OperationOperationDetail" Association="Microsoft.SqlServer.Management.Server.Domain.Operation_OperationDetails_OperationDetail_Operation"><End Role="Operation_OperationDetails" EntitySet="Operations" /><End Role="OperationDetail_Operation" EntitySet="OperationDetails" /></AssociationSet></EntityContainer><Annotations Target="Microsoft.SqlServer.Management.Server.Domain.ServerContextInternal"><ValueAnnotation Term="Com.Microsoft.Data.Services.Conventions.V1.UrlConventions" String="KeyAsSegment" /></Annotations></Schema></edmx:DataServices></edmx:Edmx> +
+
+
+
+ + UnitTests.NewAzureSqlDatabaseServerContextWithSqlAuthNegativeCases + + + 0 + + http://localhost:12345/v1/ManagementService.svc/GetAccessToken + GET + WindowsAzurePowershell/v0.7.3.1 + + + + + + + + OK + +
+ x-ms-request-id + a08c9398-48e3-f162-8d74-626e474f632a +
+
+ + + .SQLSERVERMANAGEMENT + +lG9vYlwJpWNWx8pL6ITBA== + v1/ManagementService.svc + + + <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">gsyhRreSxwBE4g+znGKqrfxFdPdAcX/0LuwVXDdvZ3q5HrsuIQhZTtQqmUudAnI1r44ctL0MRRrXvKbtSTtIo45Wkfvht5bCYyTMGn+eBUYsa7/8E1YPzL+TR+9dO6ATl4xHT3/x6RrIMI8zsV4f1Lt/f+zd24NEbLf/I6h4K2RGL47HyI6zB3/M+o37GGppDL6uX8ZEJ2bJPWIq1yYrVfBE6h00LrBO5DfZEaSNTS/WEHJqe0SKHWIxobZxU1ipBOr2cOcjmXHvR3QOC2QIBtSJNQCeqewxx0wVMbuV4gbNmyjy5857sccaVtp2oEFvIZguT2BePE9hgHGPzcpGsXiG9FR015orAUH+u8r9UgQEB8OKUILsBq6XnI7zkMmnRubsZQ+rrBT1I8dk2C6QmuOmzz4TwJGDdOMBemzayqjdAUclIb5ejI9c9lfWN5feqRTtDqvytutmEwm7h3StyNjxkFYof03z5dpfBlY6PIpxxW6qF3RLPGY9ovgeJDtSD/MHTtYVjnE0YA/N2C6RsBYutO9kzsYoJV9VP2Z8RnbZngPfvbCRyhOvfLzBGvjWpqQXnsm0EpZjlVBDqQo7AjspucuySSrkbASZniTHg5Y6xCyubri+ez2z1MGuF7cPJpkHK6HX5EuA7DhA3CcmTOyz5VAAJ2vp7OSj+HtsoVORzSZSxqJSv1/wx8s+YOawZAkjTOeavIVKQDLx/CO9gLw5RWcPlfGB5INPzjUXfOW98UGLgRVcDfK+7rnAV+jjsas6L7wcoBhFrpVO/rLuJw==</string> +
+
+ + 1 + + http://localhost:12345/v1/ManagementService.svc/Server2('localhost')/Servers()?$top=1 + GET + WindowsAzurePowershell/v0.7.3.1 + +
+ AccessToken + gsyhRreSxwBE4g+znGKqrfxFdPdAcX/0LuwVXDdvZ3q5HrsuIQhZTtQqmUudAnI1r44ctL0MRRrXvKbtSTtIo45Wkfvht5bCYyTMGn+eBUYsa7/8E1YPzL+TR+9dO6ATl4xHT3/x6RrIMI8zsV4f1Lt/f+zd24NEbLf/I6h4K2RGL47HyI6zB3/M+o37GGppDL6uX8ZEJ2bJPWIq1yYrVfBE6h00LrBO5DfZEaSNTS/WEHJqe0SKHWIxobZxU1ipBOr2cOcjmXHvR3QOC2QIBtSJNQCeqewxx0wVMbuV4gbNmyjy5857sccaVtp2oEFvIZguT2BePE9hgHGPzcpGsXiG9FR015orAUH+u8r9UgQEB8OKUILsBq6XnI7zkMmnRubsZQ+rrBT1I8dk2C6QmuOmzz4TwJGDdOMBemzayqjdAUclIb5ejI9c9lfWN5feqRTtDqvytutmEwm7h3StyNjxkFYof03z5dpfBlY6PIpxxW6qF3RLPGY9ovgeJDtSD/MHTtYVjnE0YA/N2C6RsBYutO9kzsYoJV9VP2Z8RnbZngPfvbCRyhOvfLzBGvjWpqQXnsm0EpZjlVBDqQo7AjspucuySSrkbASZniTHg5Y6xCyubri+ez2z1MGuF7cPJpkHK6HX5EuA7DhA3CcmTOyz5VAAJ2vp7OSj+HtsoVORzSZSxqJSv1/wx8s+YOawZAkjTOeavIVKQDLx/CO9gLw5RWcPlfGB5INPzjUXfOW98UGLgRVcDfK+7rnAV+jjsas6L7wcoBhFrpVO/rLuJw== +
+
+ x-ms-client-session-id + cb80886e-74f4-40a5-aea9-d25cb0676de5-2012-09-25 18:11:33Z +
+
+ x-ms-client-request-id + acfa8829-75b7-4e2a-b694-6d25c7fae75d-2012-09-25 18:11:33Z +
+
+ + + .SQLSERVERMANAGEMENT + +lG9vYlwJpWNWx8pL6ITBA== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + cb80886e-74f4-40a5-aea9-d25cb0676de5 +
+
+ DataServiceVersion + 1.0; +
+
+ Content-Type + application/atom+xml;charset=utf-8 +
+
+ + + <?xml version="1.0" encoding="utf-8" standalone="yes"?> + <feed xml:base="https://myserver01.database.windows.net/v1/ManagementService.svc/Server2('myserver01')/" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom"> + <title type="text">Servers</title> + <id>https://myserver01.database.windows.net/v1/ManagementService.svc/Server2('myserver01')/Servers</id> + <updated>2012-09-25T18:11:32Z</updated> + <link rel="self" title="Servers" href="Servers" /> + <entry> + <id>https://myserver01.database.windows.net/v1/ManagementService.svc/Server2('myserver01')/Servers('myserver01')</id> + <title type="text"></title> + <updated>2012-09-25T18:11:32Z</updated> + <author> + <name /> + </author> + <link rel="edit" title="Server" href="Servers('myserver01')" /> + <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Databases" type="application/atom+xml;type=feed" title="Databases" href="Servers('myserver01')/Databases" /> + <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServerMetrics" type="application/atom+xml;type=entry" title="ServerMetrics" href="Servers('myserver01')/ServerMetrics" /> + <category term="Microsoft.SqlServer.Management.Server.Domain.Server" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /> + <content type="application/xml"> + <m:properties> + <d:Name>myserver01</d:Name> + </m:properties> + </content> + </entry> + </feed> + +
+
+ + 2 + + http://localhost:12345/v1/ManagementService.svc/Server2('localhost')/$metadata + GET + WindowsAzurePowershell/v0.7.3.1 + + + + + + + + OK + + + <metadata /> + + + + 3 + + http://localhost:12345/v1/ManagementService.svc/GetAccessToken + GET + WindowsAzurePowershell/v0.7.3.1 + + + + + + + + OK + +
+ x-ms-request-id + a08c9398-48e3-f162-8d74-626e474f632a +
+
+ + + .SQLSERVERMANAGEMENT + +lG9vYlwJpWNWx8pL6ITBA== + v1/ManagementService.svc + + + <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">gsyhRreSxwBE4g+znGKqrfxFdPdAcX/0LuwVXDdvZ3q5HrsuIQhZTtQqmUudAnI1r44ctL0MRRrXvKbtSTtIo45Wkfvht5bCYyTMGn+eBUYsa7/8E1YPzL+TR+9dO6ATl4xHT3/x6RrIMI8zsV4f1Lt/f+zd24NEbLf/I6h4K2RGL47HyI6zB3/M+o37GGppDL6uX8ZEJ2bJPWIq1yYrVfBE6h00LrBO5DfZEaSNTS/WEHJqe0SKHWIxobZxU1ipBOr2cOcjmXHvR3QOC2QIBtSJNQCeqewxx0wVMbuV4gbNmyjy5857sccaVtp2oEFvIZguT2BePE9hgHGPzcpGsXiG9FR015orAUH+u8r9UgQEB8OKUILsBq6XnI7zkMmnRubsZQ+rrBT1I8dk2C6QmuOmzz4TwJGDdOMBemzayqjdAUclIb5ejI9c9lfWN5feqRTtDqvytutmEwm7h3StyNjxkFYof03z5dpfBlY6PIpxxW6qF3RLPGY9ovgeJDtSD/MHTtYVjnE0YA/N2C6RsBYutO9kzsYoJV9VP2Z8RnbZngPfvbCRyhOvfLzBGvjWpqQXnsm0EpZjlVBDqQo7AjspucuySSrkbASZniTHg5Y6xCyubri+ez2z1MGuF7cPJpkHK6HX5EuA7DhA3CcmTOyz5VAAJ2vp7OSj+HtsoVORzSZSxqJSv1/wx8s+YOawZAkjTOeavIVKQDLx/CO9gLw5RWcPlfGB5INPzjUXfOW98UGLgRVcDfK+7rnAV+jjsas6L7wcoBhFrpVO/rLuJw==</string> +
+
+ + 4 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Servers()?$top=1 + GET + WindowsAzurePowershell/v0.7.3.1 + +
+ AccessToken + gsyhRreSxwBE4g+znGKqrfxFdPdAcX/0LuwVXDdvZ3q5HrsuIQhZTtQqmUudAnI1r44ctL0MRRrXvKbtSTtIo45Wkfvht5bCYyTMGn+eBUYsa7/8E1YPzL+TR+9dO6ATl4xHT3/x6RrIMI8zsV4f1Lt/f+zd24NEbLf/I6h4K2RGL47HyI6zB3/M+o37GGppDL6uX8ZEJ2bJPWIq1yYrVfBE6h00LrBO5DfZEaSNTS/WEHJqe0SKHWIxobZxU1ipBOr2cOcjmXHvR3QOC2QIBtSJNQCeqewxx0wVMbuV4gbNmyjy5857sccaVtp2oEFvIZguT2BePE9hgHGPzcpGsXiG9FR015orAUH+u8r9UgQEB8OKUILsBq6XnI7zkMmnRubsZQ+rrBT1I8dk2C6QmuOmzz4TwJGDdOMBemzayqjdAUclIb5ejI9c9lfWN5feqRTtDqvytutmEwm7h3StyNjxkFYof03z5dpfBlY6PIpxxW6qF3RLPGY9ovgeJDtSD/MHTtYVjnE0YA/N2C6RsBYutO9kzsYoJV9VP2Z8RnbZngPfvbCRyhOvfLzBGvjWpqQXnsm0EpZjlVBDqQo7AjspucuySSrkbASZniTHg5Y6xCyubri+ez2z1MGuF7cPJpkHK6HX5EuA7DhA3CcmTOyz5VAAJ2vp7OSj+HtsoVORzSZSxqJSv1/wx8s+YOawZAkjTOeavIVKQDLx/CO9gLw5RWcPlfGB5INPzjUXfOW98UGLgRVcDfK+7rnAV+jjsas6L7wcoBhFrpVO/rLuJw== +
+
+ x-ms-client-session-id + cb80886e-74f4-40a5-aea9-d25cb0676de5-2012-09-25 18:11:33Z +
+
+ x-ms-client-request-id + acfa8829-75b7-4e2a-b694-6d25c7fae75d-2012-09-25 18:11:33Z +
+
+ + + .SQLSERVERMANAGEMENT + +lG9vYlwJpWNWx8pL6ITBA== + + + + + + application/atom+xml,application/xml +
+ + Forbidden + + + <Error xmlns="Microsoft.SqlServer.Management.Framework.Web.Services" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Message>Test error message</Message><InnerError i:nil="true"/></Error> + +
+
+
+ + UnitTests.GetAzureSqlDatabaseWithSqlAuth + + + 0 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + TtCN3gkpbRKhkeEfN+U1EpV0PjUHRAbeWEisC9yF7y08LPrb+AD2NJRNnUay4SMr4Y0MxGyeY0d9C1mSYVRx0Fpgl4wL1id/QcMRJ3ykbUuXrgDiJacq1rtxWGRFJGugaeGFdld0tBGR9z1RML7ZeMmzu9bu9dnbj+a2MEQBMo4Asup7lkPlvV4vsUPiRCEVXUI8yCa17p2O10jO56O+OYlN5alahqRqvaJiLDzlysS0aKrm6rvfKw+Z3zOH6gg81w6ePvg8mUXkfZ0nZnRnjxqSX3QAlCNOrAyuATgS/pJg8pFpPrpP064D4w1sQQ3Y6bdyBuiGoHA26rHjVpbufG1eUgZvZ1yxo4ohMVOHSBsJXriPM/5egJY9m7isyucPNIRbBzrn0v3a0RO0WNjBHqLd6m1OFm2xK0r4Qu1HxtSon84TfCBx5GKrPdoyvsww6VQ2m6qVOL95KRsJrR8wzgYPxcOE9id/LUyIWAvGG8rmYiS9ZESLGccH3xkl0ieaRkDdOB9+uRgWKncIZeXJeCRwrzpuFWDFjpj5oWFf+YhUUwroNKnGzsPn6Bv2Ou7opgc57OT0OqJ/rGBIZSgE8PMn/5Jc+5lRMIeNNY8UK80v28TZyVCUw2TPE5491lbeQsjuIqK30YwqIDasN9TYqdWCWCqI+FVoZGatImSvkSlURhVUtHgo0RsJx8TS6xCkvKhmxZ0YFANeMmZGIT1MRFSTOeYZWPyWvHCsXvltkqyo+3rGcXRYEaGPHEJYh+CX1DtrIEwmrk+wjOgxtC7nZw== +
+
+ x-ms-client-session-id + 37d9d020-eba7-4d29-a99b-990dcfae0ad7-2014-03-27 21:01:39Z +
+
+ x-ms-client-request-id + 75d1fee2-c402-4a11-a7de-ad0dac2e1c47-2014-03-27 21:02:03Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=lYe3q1IT21s+U3DcSXsQ6g== +
+
+ + + .SQLSERVERMANAGEMENT + lYe3q1IT21s+U3DcSXsQ6g== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + dd0aa36b-d81f-72ff-01bb-eab96f930257 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Thu, 27 Mar 2014 21:02:03 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2014-03-27T21:02:03Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(1)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(1)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(1)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(1)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(1)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(1)/DatabaseCopies" /><title /><updated>2014-03-27T21:02:03Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">1</d:Id><d:Name>master</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">26e021db-f1f9-4c98-84c6-92af8ef433d7</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">26e021db-f1f9-4c98-84c6-92af8ef433d7</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2014-03-26T20:35:16.2</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>System</d:Edition><d:MaxSizeGB m:type="Edm.Int32">5</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">5368709120</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2014-03-26T13:34:55.96</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime" m:null="true" /><d:IsSystemObject m:type="Edm.Boolean">true</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(4)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(4)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(4)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(4)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(4)/DatabaseCopies" /><title /><updated>2014-03-27T21:02:03Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">4</d:Id><d:Name>testdb1</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2014-03-27T21:01:43.037</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">1</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">1073741824</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2014-03-27T14:01:40.517</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-03-27T21:02:40.07Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">2.44</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(5)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(5)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(5)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(5)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(5)/DatabaseCopies" /><title /><updated>2014-03-27T21:02:03Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">5</d:Id><d:Name>testdb2</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2014-03-27T21:01:54.303</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">5</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">5368709120</d:MaxSizeBytes><d:CollationName>Japanese_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2014-03-27T14:01:46.477</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-03-27T21:02:44.99Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">2.50</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(6)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(6)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(6)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(6)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(6)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(6)/DatabaseCopies" /><title /><updated>2014-03-27T21:02:03Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">6</d:Id><d:Name>testdb3</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2014-03-27T21:02:01.303</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">0</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">104857600</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2014-03-27T14:01:58.89</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-03-27T21:02:58.147Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">2.50</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry></feed> +
+
+ + 1 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(1)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + TtCN3gkpbRKhkeEfN+U1EpV0PjUHRAbeWEisC9yF7y08LPrb+AD2NJRNnUay4SMr4Y0MxGyeY0d9C1mSYVRx0Fpgl4wL1id/QcMRJ3ykbUuXrgDiJacq1rtxWGRFJGugaeGFdld0tBGR9z1RML7ZeMmzu9bu9dnbj+a2MEQBMo4Asup7lkPlvV4vsUPiRCEVXUI8yCa17p2O10jO56O+OYlN5alahqRqvaJiLDzlysS0aKrm6rvfKw+Z3zOH6gg81w6ePvg8mUXkfZ0nZnRnjxqSX3QAlCNOrAyuATgS/pJg8pFpPrpP064D4w1sQQ3Y6bdyBuiGoHA26rHjVpbufG1eUgZvZ1yxo4ohMVOHSBsJXriPM/5egJY9m7isyucPNIRbBzrn0v3a0RO0WNjBHqLd6m1OFm2xK0r4Qu1HxtSon84TfCBx5GKrPdoyvsww6VQ2m6qVOL95KRsJrR8wzgYPxcOE9id/LUyIWAvGG8rmYiS9ZESLGccH3xkl0ieaRkDdOB9+uRgWKncIZeXJeCRwrzpuFWDFjpj5oWFf+YhUUwroNKnGzsPn6Bv2Ou7opgc57OT0OqJ/rGBIZSgE8PMn/5Jc+5lRMIeNNY8UK80v28TZyVCUw2TPE5491lbeQsjuIqK30YwqIDasN9TYqdWCWCqI+FVoZGatImSvkSlURhVUtHgo0RsJx8TS6xCkvKhmxZ0YFANeMmZGIT1MRFSTOeYZWPyWvHCsXvltkqyo+3rGcXRYEaGPHEJYh+CX1DtrIEwmrk+wjOgxtC7nZw== +
+
+ x-ms-client-session-id + 37d9d020-eba7-4d29-a99b-990dcfae0ad7-2014-03-27 21:01:39Z +
+
+ x-ms-client-request-id + 75d1fee2-c402-4a11-a7de-ad0dac2e1c47-2014-03-27 21:02:03Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=lYe3q1IT21s+U3DcSXsQ6g== +
+
+ + + .SQLSERVERMANAGEMENT + lYe3q1IT21s+U3DcSXsQ6g== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + dd0aa36b-d81f-72ff-01bb-eab96f930257 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Thu, 27 Mar 2014 21:02:03 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'26e021db-f1f9-4c98-84c6-92af8ef433d7')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'26e021db-f1f9-4c98-84c6-92af8ef433d7')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'26e021db-f1f9-4c98-84c6-92af8ef433d7')/DimensionSettings" /><title /><updated>2014-03-27T21:02:04Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">26e021db-f1f9-4c98-84c6-92af8ef433d7</d:Id><d:Name>System</d:Name><d:Description>Used for master database only.</d:Description><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault><d:IsSystem m:type="Edm.Boolean">true</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 2 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + TtCN3gkpbRKhkeEfN+U1EpV0PjUHRAbeWEisC9yF7y08LPrb+AD2NJRNnUay4SMr4Y0MxGyeY0d9C1mSYVRx0Fpgl4wL1id/QcMRJ3ykbUuXrgDiJacq1rtxWGRFJGugaeGFdld0tBGR9z1RML7ZeMmzu9bu9dnbj+a2MEQBMo4Asup7lkPlvV4vsUPiRCEVXUI8yCa17p2O10jO56O+OYlN5alahqRqvaJiLDzlysS0aKrm6rvfKw+Z3zOH6gg81w6ePvg8mUXkfZ0nZnRnjxqSX3QAlCNOrAyuATgS/pJg8pFpPrpP064D4w1sQQ3Y6bdyBuiGoHA26rHjVpbufG1eUgZvZ1yxo4ohMVOHSBsJXriPM/5egJY9m7isyucPNIRbBzrn0v3a0RO0WNjBHqLd6m1OFm2xK0r4Qu1HxtSon84TfCBx5GKrPdoyvsww6VQ2m6qVOL95KRsJrR8wzgYPxcOE9id/LUyIWAvGG8rmYiS9ZESLGccH3xkl0ieaRkDdOB9+uRgWKncIZeXJeCRwrzpuFWDFjpj5oWFf+YhUUwroNKnGzsPn6Bv2Ou7opgc57OT0OqJ/rGBIZSgE8PMn/5Jc+5lRMIeNNY8UK80v28TZyVCUw2TPE5491lbeQsjuIqK30YwqIDasN9TYqdWCWCqI+FVoZGatImSvkSlURhVUtHgo0RsJx8TS6xCkvKhmxZ0YFANeMmZGIT1MRFSTOeYZWPyWvHCsXvltkqyo+3rGcXRYEaGPHEJYh+CX1DtrIEwmrk+wjOgxtC7nZw== +
+
+ x-ms-client-session-id + 37d9d020-eba7-4d29-a99b-990dcfae0ad7-2014-03-27 21:01:39Z +
+
+ x-ms-client-request-id + 75d1fee2-c402-4a11-a7de-ad0dac2e1c47-2014-03-27 21:02:03Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=lYe3q1IT21s+U3DcSXsQ6g== +
+
+ + + .SQLSERVERMANAGEMENT + lYe3q1IT21s+U3DcSXsQ6g== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + dd0aa36b-d81f-72ff-01bb-eab96f930257 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Thu, 27 Mar 2014 21:02:03 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2014-03-27T21:02:04Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Shared resource allocation.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 3 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + TtCN3gkpbRKhkeEfN+U1EpV0PjUHRAbeWEisC9yF7y08LPrb+AD2NJRNnUay4SMr4Y0MxGyeY0d9C1mSYVRx0Fpgl4wL1id/QcMRJ3ykbUuXrgDiJacq1rtxWGRFJGugaeGFdld0tBGR9z1RML7ZeMmzu9bu9dnbj+a2MEQBMo4Asup7lkPlvV4vsUPiRCEVXUI8yCa17p2O10jO56O+OYlN5alahqRqvaJiLDzlysS0aKrm6rvfKw+Z3zOH6gg81w6ePvg8mUXkfZ0nZnRnjxqSX3QAlCNOrAyuATgS/pJg8pFpPrpP064D4w1sQQ3Y6bdyBuiGoHA26rHjVpbufG1eUgZvZ1yxo4ohMVOHSBsJXriPM/5egJY9m7isyucPNIRbBzrn0v3a0RO0WNjBHqLd6m1OFm2xK0r4Qu1HxtSon84TfCBx5GKrPdoyvsww6VQ2m6qVOL95KRsJrR8wzgYPxcOE9id/LUyIWAvGG8rmYiS9ZESLGccH3xkl0ieaRkDdOB9+uRgWKncIZeXJeCRwrzpuFWDFjpj5oWFf+YhUUwroNKnGzsPn6Bv2Ou7opgc57OT0OqJ/rGBIZSgE8PMn/5Jc+5lRMIeNNY8UK80v28TZyVCUw2TPE5491lbeQsjuIqK30YwqIDasN9TYqdWCWCqI+FVoZGatImSvkSlURhVUtHgo0RsJx8TS6xCkvKhmxZ0YFANeMmZGIT1MRFSTOeYZWPyWvHCsXvltkqyo+3rGcXRYEaGPHEJYh+CX1DtrIEwmrk+wjOgxtC7nZw== +
+
+ x-ms-client-session-id + 37d9d020-eba7-4d29-a99b-990dcfae0ad7-2014-03-27 21:01:39Z +
+
+ x-ms-client-request-id + 75d1fee2-c402-4a11-a7de-ad0dac2e1c47-2014-03-27 21:02:03Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=lYe3q1IT21s+U3DcSXsQ6g== +
+
+ + + .SQLSERVERMANAGEMENT + lYe3q1IT21s+U3DcSXsQ6g== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + dd0aa36b-d81f-72ff-01bb-eab96f930257 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Thu, 27 Mar 2014 21:02:03 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2014-03-27T21:02:04Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Shared resource allocation.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 4 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(6)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + TtCN3gkpbRKhkeEfN+U1EpV0PjUHRAbeWEisC9yF7y08LPrb+AD2NJRNnUay4SMr4Y0MxGyeY0d9C1mSYVRx0Fpgl4wL1id/QcMRJ3ykbUuXrgDiJacq1rtxWGRFJGugaeGFdld0tBGR9z1RML7ZeMmzu9bu9dnbj+a2MEQBMo4Asup7lkPlvV4vsUPiRCEVXUI8yCa17p2O10jO56O+OYlN5alahqRqvaJiLDzlysS0aKrm6rvfKw+Z3zOH6gg81w6ePvg8mUXkfZ0nZnRnjxqSX3QAlCNOrAyuATgS/pJg8pFpPrpP064D4w1sQQ3Y6bdyBuiGoHA26rHjVpbufG1eUgZvZ1yxo4ohMVOHSBsJXriPM/5egJY9m7isyucPNIRbBzrn0v3a0RO0WNjBHqLd6m1OFm2xK0r4Qu1HxtSon84TfCBx5GKrPdoyvsww6VQ2m6qVOL95KRsJrR8wzgYPxcOE9id/LUyIWAvGG8rmYiS9ZESLGccH3xkl0ieaRkDdOB9+uRgWKncIZeXJeCRwrzpuFWDFjpj5oWFf+YhUUwroNKnGzsPn6Bv2Ou7opgc57OT0OqJ/rGBIZSgE8PMn/5Jc+5lRMIeNNY8UK80v28TZyVCUw2TPE5491lbeQsjuIqK30YwqIDasN9TYqdWCWCqI+FVoZGatImSvkSlURhVUtHgo0RsJx8TS6xCkvKhmxZ0YFANeMmZGIT1MRFSTOeYZWPyWvHCsXvltkqyo+3rGcXRYEaGPHEJYh+CX1DtrIEwmrk+wjOgxtC7nZw== +
+
+ x-ms-client-session-id + 37d9d020-eba7-4d29-a99b-990dcfae0ad7-2014-03-27 21:01:39Z +
+
+ x-ms-client-request-id + 75d1fee2-c402-4a11-a7de-ad0dac2e1c47-2014-03-27 21:02:03Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=lYe3q1IT21s+U3DcSXsQ6g== +
+
+ + + .SQLSERVERMANAGEMENT + lYe3q1IT21s+U3DcSXsQ6g== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + dd0aa36b-d81f-72ff-01bb-eab96f930257 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Thu, 27 Mar 2014 21:02:03 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2014-03-27T21:02:04Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Shared resource allocation.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 5 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases()?$filter=Name%20eq%20'testdb1'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + TtCN3gkpbRKhkeEfN+U1EpV0PjUHRAbeWEisC9yF7y08LPrb+AD2NJRNnUay4SMr4Y0MxGyeY0d9C1mSYVRx0Fpgl4wL1id/QcMRJ3ykbUuXrgDiJacq1rtxWGRFJGugaeGFdld0tBGR9z1RML7ZeMmzu9bu9dnbj+a2MEQBMo4Asup7lkPlvV4vsUPiRCEVXUI8yCa17p2O10jO56O+OYlN5alahqRqvaJiLDzlysS0aKrm6rvfKw+Z3zOH6gg81w6ePvg8mUXkfZ0nZnRnjxqSX3QAlCNOrAyuATgS/pJg8pFpPrpP064D4w1sQQ3Y6bdyBuiGoHA26rHjVpbufG1eUgZvZ1yxo4ohMVOHSBsJXriPM/5egJY9m7isyucPNIRbBzrn0v3a0RO0WNjBHqLd6m1OFm2xK0r4Qu1HxtSon84TfCBx5GKrPdoyvsww6VQ2m6qVOL95KRsJrR8wzgYPxcOE9id/LUyIWAvGG8rmYiS9ZESLGccH3xkl0ieaRkDdOB9+uRgWKncIZeXJeCRwrzpuFWDFjpj5oWFf+YhUUwroNKnGzsPn6Bv2Ou7opgc57OT0OqJ/rGBIZSgE8PMn/5Jc+5lRMIeNNY8UK80v28TZyVCUw2TPE5491lbeQsjuIqK30YwqIDasN9TYqdWCWCqI+FVoZGatImSvkSlURhVUtHgo0RsJx8TS6xCkvKhmxZ0YFANeMmZGIT1MRFSTOeYZWPyWvHCsXvltkqyo+3rGcXRYEaGPHEJYh+CX1DtrIEwmrk+wjOgxtC7nZw== +
+
+ x-ms-client-session-id + 37d9d020-eba7-4d29-a99b-990dcfae0ad7-2014-03-27 21:01:39Z +
+
+ x-ms-client-request-id + 75d1fee2-c402-4a11-a7de-ad0dac2e1c47-2014-03-27 21:02:03Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=lYe3q1IT21s+U3DcSXsQ6g== +
+
+ + + .SQLSERVERMANAGEMENT + lYe3q1IT21s+U3DcSXsQ6g== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + dd0aa36b-d81f-72ff-01bb-eab96f930257 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Thu, 27 Mar 2014 21:02:03 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2014-03-27T21:02:04Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(4)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(4)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(4)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(4)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(4)/DatabaseCopies" /><title /><updated>2014-03-27T21:02:04Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">4</d:Id><d:Name>testdb1</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2014-03-27T21:01:43.037</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">1</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">1073741824</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2014-03-27T14:01:40.517</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-03-27T21:02:40.07Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">2.44</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry></feed> +
+
+ + 6 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + TtCN3gkpbRKhkeEfN+U1EpV0PjUHRAbeWEisC9yF7y08LPrb+AD2NJRNnUay4SMr4Y0MxGyeY0d9C1mSYVRx0Fpgl4wL1id/QcMRJ3ykbUuXrgDiJacq1rtxWGRFJGugaeGFdld0tBGR9z1RML7ZeMmzu9bu9dnbj+a2MEQBMo4Asup7lkPlvV4vsUPiRCEVXUI8yCa17p2O10jO56O+OYlN5alahqRqvaJiLDzlysS0aKrm6rvfKw+Z3zOH6gg81w6ePvg8mUXkfZ0nZnRnjxqSX3QAlCNOrAyuATgS/pJg8pFpPrpP064D4w1sQQ3Y6bdyBuiGoHA26rHjVpbufG1eUgZvZ1yxo4ohMVOHSBsJXriPM/5egJY9m7isyucPNIRbBzrn0v3a0RO0WNjBHqLd6m1OFm2xK0r4Qu1HxtSon84TfCBx5GKrPdoyvsww6VQ2m6qVOL95KRsJrR8wzgYPxcOE9id/LUyIWAvGG8rmYiS9ZESLGccH3xkl0ieaRkDdOB9+uRgWKncIZeXJeCRwrzpuFWDFjpj5oWFf+YhUUwroNKnGzsPn6Bv2Ou7opgc57OT0OqJ/rGBIZSgE8PMn/5Jc+5lRMIeNNY8UK80v28TZyVCUw2TPE5491lbeQsjuIqK30YwqIDasN9TYqdWCWCqI+FVoZGatImSvkSlURhVUtHgo0RsJx8TS6xCkvKhmxZ0YFANeMmZGIT1MRFSTOeYZWPyWvHCsXvltkqyo+3rGcXRYEaGPHEJYh+CX1DtrIEwmrk+wjOgxtC7nZw== +
+
+ x-ms-client-session-id + 37d9d020-eba7-4d29-a99b-990dcfae0ad7-2014-03-27 21:01:39Z +
+
+ x-ms-client-request-id + 75d1fee2-c402-4a11-a7de-ad0dac2e1c47-2014-03-27 21:02:03Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=lYe3q1IT21s+U3DcSXsQ6g== +
+
+ + + .SQLSERVERMANAGEMENT + lYe3q1IT21s+U3DcSXsQ6g== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + dd0aa36b-d81f-72ff-01bb-eab96f930257 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Thu, 27 Mar 2014 21:02:03 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2014-03-27T21:02:04Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Shared resource allocation.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 7 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases()?$filter=Name%20eq%20'testdb2'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + TtCN3gkpbRKhkeEfN+U1EpV0PjUHRAbeWEisC9yF7y08LPrb+AD2NJRNnUay4SMr4Y0MxGyeY0d9C1mSYVRx0Fpgl4wL1id/QcMRJ3ykbUuXrgDiJacq1rtxWGRFJGugaeGFdld0tBGR9z1RML7ZeMmzu9bu9dnbj+a2MEQBMo4Asup7lkPlvV4vsUPiRCEVXUI8yCa17p2O10jO56O+OYlN5alahqRqvaJiLDzlysS0aKrm6rvfKw+Z3zOH6gg81w6ePvg8mUXkfZ0nZnRnjxqSX3QAlCNOrAyuATgS/pJg8pFpPrpP064D4w1sQQ3Y6bdyBuiGoHA26rHjVpbufG1eUgZvZ1yxo4ohMVOHSBsJXriPM/5egJY9m7isyucPNIRbBzrn0v3a0RO0WNjBHqLd6m1OFm2xK0r4Qu1HxtSon84TfCBx5GKrPdoyvsww6VQ2m6qVOL95KRsJrR8wzgYPxcOE9id/LUyIWAvGG8rmYiS9ZESLGccH3xkl0ieaRkDdOB9+uRgWKncIZeXJeCRwrzpuFWDFjpj5oWFf+YhUUwroNKnGzsPn6Bv2Ou7opgc57OT0OqJ/rGBIZSgE8PMn/5Jc+5lRMIeNNY8UK80v28TZyVCUw2TPE5491lbeQsjuIqK30YwqIDasN9TYqdWCWCqI+FVoZGatImSvkSlURhVUtHgo0RsJx8TS6xCkvKhmxZ0YFANeMmZGIT1MRFSTOeYZWPyWvHCsXvltkqyo+3rGcXRYEaGPHEJYh+CX1DtrIEwmrk+wjOgxtC7nZw== +
+
+ x-ms-client-session-id + 37d9d020-eba7-4d29-a99b-990dcfae0ad7-2014-03-27 21:01:39Z +
+
+ x-ms-client-request-id + 75d1fee2-c402-4a11-a7de-ad0dac2e1c47-2014-03-27 21:02:03Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=lYe3q1IT21s+U3DcSXsQ6g== +
+
+ + + .SQLSERVERMANAGEMENT + lYe3q1IT21s+U3DcSXsQ6g== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + dd0aa36b-d81f-72ff-01bb-eab96f930257 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Thu, 27 Mar 2014 21:02:03 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2014-03-27T21:02:04Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(5)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(5)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(5)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(5)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(5)/DatabaseCopies" /><title /><updated>2014-03-27T21:02:04Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">5</d:Id><d:Name>testdb2</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2014-03-27T21:01:54.303</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">5</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">5368709120</d:MaxSizeBytes><d:CollationName>Japanese_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2014-03-27T14:01:46.477</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-03-27T21:02:44.99Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">2.50</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry></feed> +
+
+ + 8 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + TtCN3gkpbRKhkeEfN+U1EpV0PjUHRAbeWEisC9yF7y08LPrb+AD2NJRNnUay4SMr4Y0MxGyeY0d9C1mSYVRx0Fpgl4wL1id/QcMRJ3ykbUuXrgDiJacq1rtxWGRFJGugaeGFdld0tBGR9z1RML7ZeMmzu9bu9dnbj+a2MEQBMo4Asup7lkPlvV4vsUPiRCEVXUI8yCa17p2O10jO56O+OYlN5alahqRqvaJiLDzlysS0aKrm6rvfKw+Z3zOH6gg81w6ePvg8mUXkfZ0nZnRnjxqSX3QAlCNOrAyuATgS/pJg8pFpPrpP064D4w1sQQ3Y6bdyBuiGoHA26rHjVpbufG1eUgZvZ1yxo4ohMVOHSBsJXriPM/5egJY9m7isyucPNIRbBzrn0v3a0RO0WNjBHqLd6m1OFm2xK0r4Qu1HxtSon84TfCBx5GKrPdoyvsww6VQ2m6qVOL95KRsJrR8wzgYPxcOE9id/LUyIWAvGG8rmYiS9ZESLGccH3xkl0ieaRkDdOB9+uRgWKncIZeXJeCRwrzpuFWDFjpj5oWFf+YhUUwroNKnGzsPn6Bv2Ou7opgc57OT0OqJ/rGBIZSgE8PMn/5Jc+5lRMIeNNY8UK80v28TZyVCUw2TPE5491lbeQsjuIqK30YwqIDasN9TYqdWCWCqI+FVoZGatImSvkSlURhVUtHgo0RsJx8TS6xCkvKhmxZ0YFANeMmZGIT1MRFSTOeYZWPyWvHCsXvltkqyo+3rGcXRYEaGPHEJYh+CX1DtrIEwmrk+wjOgxtC7nZw== +
+
+ x-ms-client-session-id + 37d9d020-eba7-4d29-a99b-990dcfae0ad7-2014-03-27 21:01:39Z +
+
+ x-ms-client-request-id + 75d1fee2-c402-4a11-a7de-ad0dac2e1c47-2014-03-27 21:02:03Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=lYe3q1IT21s+U3DcSXsQ6g== +
+
+ + + .SQLSERVERMANAGEMENT + lYe3q1IT21s+U3DcSXsQ6g== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + dd0aa36b-d81f-72ff-01bb-eab96f930257 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Thu, 27 Mar 2014 21:02:05 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2014-03-27T21:02:05Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Shared resource allocation.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 9 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases()?$filter=Name%20eq%20'testdb3'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + TtCN3gkpbRKhkeEfN+U1EpV0PjUHRAbeWEisC9yF7y08LPrb+AD2NJRNnUay4SMr4Y0MxGyeY0d9C1mSYVRx0Fpgl4wL1id/QcMRJ3ykbUuXrgDiJacq1rtxWGRFJGugaeGFdld0tBGR9z1RML7ZeMmzu9bu9dnbj+a2MEQBMo4Asup7lkPlvV4vsUPiRCEVXUI8yCa17p2O10jO56O+OYlN5alahqRqvaJiLDzlysS0aKrm6rvfKw+Z3zOH6gg81w6ePvg8mUXkfZ0nZnRnjxqSX3QAlCNOrAyuATgS/pJg8pFpPrpP064D4w1sQQ3Y6bdyBuiGoHA26rHjVpbufG1eUgZvZ1yxo4ohMVOHSBsJXriPM/5egJY9m7isyucPNIRbBzrn0v3a0RO0WNjBHqLd6m1OFm2xK0r4Qu1HxtSon84TfCBx5GKrPdoyvsww6VQ2m6qVOL95KRsJrR8wzgYPxcOE9id/LUyIWAvGG8rmYiS9ZESLGccH3xkl0ieaRkDdOB9+uRgWKncIZeXJeCRwrzpuFWDFjpj5oWFf+YhUUwroNKnGzsPn6Bv2Ou7opgc57OT0OqJ/rGBIZSgE8PMn/5Jc+5lRMIeNNY8UK80v28TZyVCUw2TPE5491lbeQsjuIqK30YwqIDasN9TYqdWCWCqI+FVoZGatImSvkSlURhVUtHgo0RsJx8TS6xCkvKhmxZ0YFANeMmZGIT1MRFSTOeYZWPyWvHCsXvltkqyo+3rGcXRYEaGPHEJYh+CX1DtrIEwmrk+wjOgxtC7nZw== +
+
+ x-ms-client-session-id + 37d9d020-eba7-4d29-a99b-990dcfae0ad7-2014-03-27 21:01:39Z +
+
+ x-ms-client-request-id + 75d1fee2-c402-4a11-a7de-ad0dac2e1c47-2014-03-27 21:02:03Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=lYe3q1IT21s+U3DcSXsQ6g== +
+
+ + + .SQLSERVERMANAGEMENT + lYe3q1IT21s+U3DcSXsQ6g== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + dd0aa36b-d81f-72ff-01bb-eab96f930257 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Thu, 27 Mar 2014 21:02:05 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2014-03-27T21:02:05Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(6)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(6)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(6)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(6)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(6)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(6)/DatabaseCopies" /><title /><updated>2014-03-27T21:02:05Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">6</d:Id><d:Name>testdb3</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2014-03-27T21:02:01.303</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">0</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">104857600</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2014-03-27T14:01:58.89</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-03-27T21:02:58.147Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">2.50</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry></feed> +
+
+ + 10 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(6)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + TtCN3gkpbRKhkeEfN+U1EpV0PjUHRAbeWEisC9yF7y08LPrb+AD2NJRNnUay4SMr4Y0MxGyeY0d9C1mSYVRx0Fpgl4wL1id/QcMRJ3ykbUuXrgDiJacq1rtxWGRFJGugaeGFdld0tBGR9z1RML7ZeMmzu9bu9dnbj+a2MEQBMo4Asup7lkPlvV4vsUPiRCEVXUI8yCa17p2O10jO56O+OYlN5alahqRqvaJiLDzlysS0aKrm6rvfKw+Z3zOH6gg81w6ePvg8mUXkfZ0nZnRnjxqSX3QAlCNOrAyuATgS/pJg8pFpPrpP064D4w1sQQ3Y6bdyBuiGoHA26rHjVpbufG1eUgZvZ1yxo4ohMVOHSBsJXriPM/5egJY9m7isyucPNIRbBzrn0v3a0RO0WNjBHqLd6m1OFm2xK0r4Qu1HxtSon84TfCBx5GKrPdoyvsww6VQ2m6qVOL95KRsJrR8wzgYPxcOE9id/LUyIWAvGG8rmYiS9ZESLGccH3xkl0ieaRkDdOB9+uRgWKncIZeXJeCRwrzpuFWDFjpj5oWFf+YhUUwroNKnGzsPn6Bv2Ou7opgc57OT0OqJ/rGBIZSgE8PMn/5Jc+5lRMIeNNY8UK80v28TZyVCUw2TPE5491lbeQsjuIqK30YwqIDasN9TYqdWCWCqI+FVoZGatImSvkSlURhVUtHgo0RsJx8TS6xCkvKhmxZ0YFANeMmZGIT1MRFSTOeYZWPyWvHCsXvltkqyo+3rGcXRYEaGPHEJYh+CX1DtrIEwmrk+wjOgxtC7nZw== +
+
+ x-ms-client-session-id + 37d9d020-eba7-4d29-a99b-990dcfae0ad7-2014-03-27 21:01:39Z +
+
+ x-ms-client-request-id + 75d1fee2-c402-4a11-a7de-ad0dac2e1c47-2014-03-27 21:02:03Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=lYe3q1IT21s+U3DcSXsQ6g== +
+
+ + + .SQLSERVERMANAGEMENT + lYe3q1IT21s+U3DcSXsQ6g== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + dd0aa36b-d81f-72ff-01bb-eab96f930257 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Thu, 27 Mar 2014 21:02:05 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2014-03-27T21:02:05Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Shared resource allocation.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+
+
+ + UnitTest.Common.NewAzureSqlDatabaseServerContextWithSqlAuth + + + 0 + + http://localhost:12345/v1/ManagementService.svc/GetAccessToken + GET + AzurePowershell/v0.8.11 + +
+ sqlauthorization + Basic dGVzdHVzZXI6dGVzdHBAc3Mx +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 2d9d764b-25e6-afd5-0c6f-cf197fb37284 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 16 Jul 2014 17:19:59 GMT +
+
+ Set-Cookie + .SQLSERVERMANAGEMENT=LTursKkmgxCbAjpLub/ZOQ==; path=/v1/ManagementService.svc; expires=16-Jul-2014 22:20:00 GMT; domain=.dev.mscds.com; httponly; secure +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + + .SQLSERVERMANAGEMENT + LTursKkmgxCbAjpLub/ZOQ== + v1/ManagementService.svc + + + <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">Pl48rNQ0Q0LolzYn6C70ExCjy+xRhQxHoZzm+UVg5+zYdNkSdy4DvkCPbQVk93j+cJ1VctG4DVOp649IBqpQX5S8A+e28gVgAsPFUGukzxTWts4OEnasXNR5OQ8yW8taZZgRCIvQcIMidqaMJblLurhqOHi2lCrle2HJ2Mqa6nqX9WmOzC1naAMXprGa6d771dOB2WBYbf3Vr10616HRaogEIdRZkHDOtCRcBJCuO9mTqrlwkNkuPCInIiovtcofwfzJpy2VWh4j/jMxv+jsSqGeVW6F0ZZ8843EarQjKzdeZ9HBfANUFijFTVhAOSpy6aNbGUIVWnzj8GYTiflZmHMT5ts5+6Y3mwWR6fbxfiT2Cp5b4mvDba1tFrSXfb1xRSsE/WqF/+5WURT8qui/+JKs5oyZHvosu3AdcCliGqvAErkNk/Gf23H5cx+cSs+uSN0cLc2Xw9xdd+xK5t+xiGod1TwaEZfgH0w6FYQwjRE7MiTaWFv/376hNpOkDGgALmv/Xjk7FH559yjBDcxxN4sHw6Bloof6ZaCKF9xr9EBvKIk8EMwFdX9jDnoNvnXGFadc/p3rfvX+KEna1NslgSU9Jc1X+7kVaSZsJVZpp3wNHVGulzCWWY0LdBvLRG1DicUNMDBecmp3j6ZpiAmP73HxjuYX67djlSB0FxpyeaUnLyomDykObUw/oXWYuIW+Sbs5eW7lAM65zKNL5+6rLmjAI3Hbzdi7ZIdTmoAymTd4+rqcwsWAnYpVNAvCxI57f9jTHy5eBWGIwBLMMp5Iqg==</string> +
+
+ + 1 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Servers()?$top=1 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + Pl48rNQ0Q0LolzYn6C70ExCjy+xRhQxHoZzm+UVg5+zYdNkSdy4DvkCPbQVk93j+cJ1VctG4DVOp649IBqpQX5S8A+e28gVgAsPFUGukzxTWts4OEnasXNR5OQ8yW8taZZgRCIvQcIMidqaMJblLurhqOHi2lCrle2HJ2Mqa6nqX9WmOzC1naAMXprGa6d771dOB2WBYbf3Vr10616HRaogEIdRZkHDOtCRcBJCuO9mTqrlwkNkuPCInIiovtcofwfzJpy2VWh4j/jMxv+jsSqGeVW6F0ZZ8843EarQjKzdeZ9HBfANUFijFTVhAOSpy6aNbGUIVWnzj8GYTiflZmHMT5ts5+6Y3mwWR6fbxfiT2Cp5b4mvDba1tFrSXfb1xRSsE/WqF/+5WURT8qui/+JKs5oyZHvosu3AdcCliGqvAErkNk/Gf23H5cx+cSs+uSN0cLc2Xw9xdd+xK5t+xiGod1TwaEZfgH0w6FYQwjRE7MiTaWFv/376hNpOkDGgALmv/Xjk7FH559yjBDcxxN4sHw6Bloof6ZaCKF9xr9EBvKIk8EMwFdX9jDnoNvnXGFadc/p3rfvX+KEna1NslgSU9Jc1X+7kVaSZsJVZpp3wNHVGulzCWWY0LdBvLRG1DicUNMDBecmp3j6ZpiAmP73HxjuYX67djlSB0FxpyeaUnLyomDykObUw/oXWYuIW+Sbs5eW7lAM65zKNL5+6rLmjAI3Hbzdi7ZIdTmoAymTd4+rqcwsWAnYpVNAvCxI57f9jTHy5eBWGIwBLMMp5Iqg== +
+
+ x-ms-client-session-id + 412c953f-d104-44b3-936b-95e24d8a7259-2014-07-16 17:19:50Z +
+
+ x-ms-client-request-id + d310b152-63d5-4a21-9ab8-30b987cdebf2-2014-07-16 17:20:00Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=LTursKkmgxCbAjpLub/ZOQ== +
+
+ + + .SQLSERVERMANAGEMENT + LTursKkmgxCbAjpLub/ZOQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 2d9d764b-25e6-afd5-0c6f-cf197fb37284 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Wed, 16 Jul 2014 17:19:59 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Servers</id><title type="text">Servers</title><updated>2014-07-16T17:20:00Z</updated><link rel="self" title="Servers" href="Servers" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Servers('myserver01')</id><category term="Microsoft.SqlServer.Management.Server.Domain.Server" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Server" href="Servers('myserver01')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Databases" type="application/atom+xml;type=feed" title="Databases" href="Servers('myserver01')/Databases" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServerMetrics" type="application/atom+xml;type=entry" title="ServerMetrics" href="Servers('myserver01')/ServerMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServerQuotas" type="application/atom+xml;type=feed" title="ServerQuotas" href="Servers('myserver01')/ServerQuotas" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseOperations" type="application/atom+xml;type=feed" title="DatabaseOperations" href="Servers('myserver01')/DatabaseOperations" /><title /><updated>2014-07-16T17:20:00Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Name>myserver01</d:Name><d:SubscriptionId m:type="Edm.Guid">00000000-0000-0000-0001-000000000001</d:SubscriptionId><d:Version>2.0</d:Version></m:properties></content></entry></feed> +
+
+ + 2 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/$metadata + GET + AzurePowershell/v0.8.11 + +
+ AccessToken + Pl48rNQ0Q0LolzYn6C70ExCjy+xRhQxHoZzm+UVg5+zYdNkSdy4DvkCPbQVk93j+cJ1VctG4DVOp649IBqpQX5S8A+e28gVgAsPFUGukzxTWts4OEnasXNR5OQ8yW8taZZgRCIvQcIMidqaMJblLurhqOHi2lCrle2HJ2Mqa6nqX9WmOzC1naAMXprGa6d771dOB2WBYbf3Vr10616HRaogEIdRZkHDOtCRcBJCuO9mTqrlwkNkuPCInIiovtcofwfzJpy2VWh4j/jMxv+jsSqGeVW6F0ZZ8843EarQjKzdeZ9HBfANUFijFTVhAOSpy6aNbGUIVWnzj8GYTiflZmHMT5ts5+6Y3mwWR6fbxfiT2Cp5b4mvDba1tFrSXfb1xRSsE/WqF/+5WURT8qui/+JKs5oyZHvosu3AdcCliGqvAErkNk/Gf23H5cx+cSs+uSN0cLc2Xw9xdd+xK5t+xiGod1TwaEZfgH0w6FYQwjRE7MiTaWFv/376hNpOkDGgALmv/Xjk7FH559yjBDcxxN4sHw6Bloof6ZaCKF9xr9EBvKIk8EMwFdX9jDnoNvnXGFadc/p3rfvX+KEna1NslgSU9Jc1X+7kVaSZsJVZpp3wNHVGulzCWWY0LdBvLRG1DicUNMDBecmp3j6ZpiAmP73HxjuYX67djlSB0FxpyeaUnLyomDykObUw/oXWYuIW+Sbs5eW7lAM65zKNL5+6rLmjAI3Hbzdi7ZIdTmoAymTd4+rqcwsWAnYpVNAvCxI57f9jTHy5eBWGIwBLMMp5Iqg== +
+
+ x-ms-client-session-id + 412c953f-d104-44b3-936b-95e24d8a7259-2014-07-16 17:19:50Z +
+
+ x-ms-client-request-id + dc4d642c-e6c1-4b55-97e8-81770e1e8bb4-2014-07-16 17:20:00Z +
+
+ Cookie + .SQLSERVERMANAGEMENT=LTursKkmgxCbAjpLub/ZOQ== +
+
+ + + .SQLSERVERMANAGEMENT + LTursKkmgxCbAjpLub/ZOQ== + + + + + + +
+ + OK + +
+ x-ms-request-id + 2d9d764b-25e6-afd5-0c6f-cf197fb37284 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 3.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml;charset=utf-8 +
+
+ Date + Wed, 16 Jul 2014 17:19:59 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx"><edmx:DataServices m:DataServiceVersion="3.0" m:MaxDataServiceVersion="3.0" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><Schema Namespace="Microsoft.SqlServer.Management.Server.Domain" xmlns="http://schemas.microsoft.com/ado/2009/11/edm"><EntityType Name="Server" OpenType="true"><Key><PropertyRef Name="Name" /></Key><Property Name="Name" Type="Edm.String" Nullable="false" /><Property Name="SubscriptionId" Type="Edm.Guid" /><Property Name="Version" Type="Edm.String" /><NavigationProperty Name="Databases" Relationship="Microsoft.SqlServer.Management.Server.Domain.Server_Databases_Database_Server" ToRole="Database_Server" FromRole="Server_Databases" /><NavigationProperty Name="ServerMetrics" Relationship="Microsoft.SqlServer.Management.Server.Domain.Server_ServerMetrics_ServerMetrics_Server" ToRole="ServerMetrics_Server" FromRole="Server_ServerMetrics" /><NavigationProperty Name="ServerQuotas" Relationship="Microsoft.SqlServer.Management.Server.Domain.Server_ServerQuotas_ServerQuota_Server" ToRole="ServerQuota_Server" FromRole="Server_ServerQuotas" /><NavigationProperty Name="DatabaseOperations" Relationship="Microsoft.SqlServer.Management.Server.Domain.Server_DatabaseOperations_DatabaseOperation_Server" ToRole="DatabaseOperation_Server" FromRole="Server_DatabaseOperations" /></EntityType><EntityType Name="Database" OpenType="true"><Key><PropertyRef Name="Id" /></Key><Property Name="Id" Type="Edm.Int32" Nullable="false" /><Property Name="Name" Type="Edm.String" /><Property Name="ServiceObjectiveId" Type="Edm.Guid" /><Property Name="AssignedServiceObjectiveId" Type="Edm.Guid" /><Property Name="ServiceObjectiveAssignmentState" Type="Edm.Byte" /><Property Name="ServiceObjectiveAssignmentStateDescription" Type="Edm.String" /><Property Name="ServiceObjectiveAssignmentErrorCode" Type="Edm.Int32" /><Property Name="ServiceObjectiveAssignmentErrorDescription" Type="Edm.String" /><Property Name="ServiceObjectiveAssignmentSuccessDate" Type="Edm.DateTime" /><Property Name="Edition" Type="Edm.String" /><Property Name="MaxSizeGB" Type="Edm.Int32" /><Property Name="MaxSizeBytes" Type="Edm.Int64" /><Property Name="CollationName" Type="Edm.String" /><Property Name="CreationDate" Type="Edm.DateTime" Nullable="false" /><Property Name="RecoveryPeriodStartDate" Type="Edm.DateTime" /><Property Name="IsSystemObject" Type="Edm.Boolean" Nullable="false" /><Property Name="Status" Type="Edm.Int32" Nullable="false" /><Property Name="IsFederationRoot" Type="Edm.Boolean" /><Property Name="SizeMB" Type="Edm.Decimal" Nullable="false" /><Property Name="IsRecursiveTriggersOn" Type="Edm.Boolean" /><Property Name="IsReadOnly" Type="Edm.Boolean" Nullable="false" /><Property Name="IsFederationMember" Type="Edm.Boolean" Nullable="false" /><Property Name="IsQueryStoreOn" Type="Edm.Boolean" Nullable="false" /><Property Name="IsQueryStoreReadOnly" Type="Edm.Boolean" /><Property Name="QueryStoreMaxSizeMB" Type="Edm.Int32" /><Property Name="QueryStoreFlushPeriodSeconds" Type="Edm.Int32" /><Property Name="QueryStoreIntervalLengthMinutes" Type="Edm.Int32" /><Property Name="QueryStoreClearAll" Type="Edm.Boolean" /><Property Name="QueryStoreStaleQueryThresholdDays" Type="Edm.Int32" /><Property Name="IsSuspended" Type="Edm.Boolean" /><NavigationProperty Name="Server" Relationship="Microsoft.SqlServer.Management.Server.Domain.Server_Databases_Database_Server" ToRole="Server_Databases" FromRole="Database_Server" /><NavigationProperty Name="ServiceObjective" Relationship="Microsoft.SqlServer.Management.Server.Domain.Database_ServiceObjective" ToRole="ServiceObjective" FromRole="Database" /><NavigationProperty Name="DatabaseMetrics" Relationship="Microsoft.SqlServer.Management.Server.Domain.Database_DatabaseMetrics_DatabaseMetrics_Database" ToRole="DatabaseMetrics_Database" FromRole="Database_DatabaseMetrics" /><NavigationProperty Name="DatabaseCopies" Relationship="Microsoft.SqlServer.Management.Server.Domain.Database_DatabaseCopies_DatabaseCopy_Database" ToRole="DatabaseCopy_Database" FromRole="Database_DatabaseCopies" /></EntityType><EntityType Name="RecoverableDatabase" OpenType="true"><Key><PropertyRef Name="EntityId" /></Key><Property Name="EntityId" Type="Edm.String" Nullable="false" /><Property Name="Name" Type="Edm.String" /><Property Name="ServerName" Type="Edm.String" /><Property Name="Edition" Type="Edm.String" /><Property Name="LastAvailableBackupDate" Type="Edm.DateTime" Nullable="false" /></EntityType><EntityType Name="RestorableDroppedDatabase" OpenType="true"><Key><PropertyRef Name="EntityId" /></Key><Property Name="EntityId" Type="Edm.String" Nullable="false" /><Property Name="Name" Type="Edm.String" /><Property Name="ServerName" Type="Edm.String" /><Property Name="Edition" Type="Edm.String" /><Property Name="MaxSizeBytes" Type="Edm.Int64" Nullable="false" /><Property Name="CreationDate" Type="Edm.DateTime" Nullable="false" /><Property Name="DeletionDate" Type="Edm.DateTime" Nullable="false" /><Property Name="RecoveryPeriodStartDate" Type="Edm.DateTime" /></EntityType><EntityType Name="DimensionSetting" OpenType="true"><Key><PropertyRef Name="Id" /></Key><Property Name="Id" Type="Edm.Guid" Nullable="false" /><Property Name="Name" Type="Edm.String" /><Property Name="Description" Type="Edm.String" /><Property Name="Ordinal" Type="Edm.Byte" Nullable="false" /><Property Name="IsDefault" Type="Edm.Boolean" Nullable="false" /></EntityType><EntityType Name="ServiceObjective" OpenType="true"><Key><PropertyRef Name="Id" /></Key><Property Name="Id" Type="Edm.Guid" Nullable="false" /><Property Name="Name" Type="Edm.String" /><Property Name="Description" Type="Edm.String" /><Property Name="IsDefault" Type="Edm.Boolean" Nullable="false" /><Property Name="IsSystem" Type="Edm.Boolean" Nullable="false" /><Property Name="Enabled" Type="Edm.Boolean" Nullable="false" /><NavigationProperty Name="DimensionSettings" Relationship="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective_DimensionSettings" ToRole="DimensionSettings" FromRole="ServiceObjective" /></EntityType><EntityType Name="Operation" OpenType="true"><Key><PropertyRef Name="ActionId" /></Key><Property Name="ActionTypeName" Type="Edm.String" /><Property Name="ActionStatusName" Type="Edm.String" /><Property Name="DacDatabaseName" Type="Edm.String" /><Property Name="CreatedBy" Type="Edm.String" /><Property Name="DateCreated" Type="Edm.DateTime" Nullable="false" /><Property Name="DateModified" Type="Edm.DateTime" Nullable="false" /><Property Name="Comments" Type="Edm.String" /><Property Name="Error" Type="Edm.String" /><Property Name="ActionId" Type="Edm.Int32" Nullable="false" /><Property Name="CompletedSteps" Type="Edm.Int32" Nullable="false" /><Property Name="TotalSteps" Type="Edm.Int32" Nullable="false" /><Property Name="DacObjectTypeName" Type="Edm.String" /><NavigationProperty Name="OperationDetails" Relationship="Microsoft.SqlServer.Management.Server.Domain.Operation_OperationDetails_OperationDetail_Operation" ToRole="OperationDetail_Operation" FromRole="Operation_OperationDetails" /></EntityType><EntityType Name="OperationDetail" OpenType="true"><Key><PropertyRef Name="EntityId" /></Key><Property Name="ActionTypeName" Type="Edm.String" /><Property Name="ActionStatusName" Type="Edm.String" /><Property Name="DacDatabaseName" Type="Edm.String" /><Property Name="CreatedBy" Type="Edm.String" /><Property Name="DateCreated" Type="Edm.DateTime" Nullable="false" /><Property Name="DateModified" Type="Edm.DateTime" Nullable="false" /><Property Name="Comments" Type="Edm.String" /><Property Name="Error" Type="Edm.String" /><Property Name="SequenceId" Type="Edm.Int32" Nullable="false" /><Property Name="EntityId" Type="Edm.String" Nullable="false" /><Property Name="ActionId" Type="Edm.Int32" Nullable="false" /><Property Name="DacObjectTypeName" Type="Edm.String" /><NavigationProperty Name="Operation" Relationship="Microsoft.SqlServer.Management.Server.Domain.Operation_OperationDetails_OperationDetail_Operation" ToRole="Operation_OperationDetails" FromRole="OperationDetail_Operation" /></EntityType><EntityType Name="CreateDatabaseFromDacPacOperation" OpenType="true"><Key><PropertyRef Name="OperationGuid" /></Key><Property Name="OperationGuid" Type="Edm.Guid" Nullable="false" /><Property Name="DatabaseName" Type="Edm.String" /><Property Name="Edition" Type="Edm.String" /><Property Name="MaxSizeGB" Type="Edm.Int32" /><Property Name="OperationId" Type="Edm.Int32" Nullable="false" /><Property Name="DacPac" Type="Edm.Binary" /></EntityType><EntityType Name="ExtractDacPacOperation" OpenType="true"><Key><PropertyRef Name="OperationGuid" /></Key><Property Name="OperationGuid" Type="Edm.Guid" Nullable="false" /><Property Name="DatabaseName" Type="Edm.String" /><Property Name="DacTypeName" Type="Edm.String" /><Property Name="Version" Type="Edm.String" /><Property Name="Description" Type="Edm.String" /><Property Name="DacPac" Type="Edm.Binary" /></EntityType><EntityType Name="UpgradeDatabaseFromDacPacOperation" OpenType="true"><Key><PropertyRef Name="OperationGuid" /></Key><Property Name="OperationGuid" Type="Edm.Guid" Nullable="false" /><Property Name="DatabaseName" Type="Edm.String" /><Property Name="DacPac" Type="Edm.Binary" /><Property Name="RollbackOnFailure" Type="Edm.Boolean" /><Property Name="OperationId" Type="Edm.Int32" Nullable="false" /></EntityType><EntityType Name="ViewDatabaseChangesOperation" OpenType="true"><Key><PropertyRef Name="OperationGuid" /></Key><Property Name="OperationGuid" Type="Edm.Guid" Nullable="false" /><Property Name="DatabaseName" Type="Edm.String" /><Property Name="ChangeResult" Type="Edm.String" /><Property Name="IsRegisteredDac" Type="Edm.Boolean" Nullable="false" /></EntityType><EntityType Name="ViewUpgradePlanOperation" OpenType="true"><Key><PropertyRef Name="OperationGuid" /></Key><Property Name="OperationGuid" Type="Edm.Guid" Nullable="false" /><Property Name="DatabaseName" Type="Edm.String" /><Property Name="DacPac" Type="Edm.Binary" /><Property Name="RollbackOnFailure" Type="Edm.Boolean" /><Property Name="UpgradePlan" Type="Edm.String" /><Property Name="UpgradeScript" Type="Edm.String" /></EntityType><EntityType Name="DatabaseRestoreStatus" OpenType="true"><Key><PropertyRef Name="RequestID" /></Key><Property Name="RequestID" Type="Edm.Guid" Nullable="false" /><Property Name="SourceServerName" Type="Edm.String" /><Property Name="SourceDatabaseName" Type="Edm.String" /><Property Name="SourceDatabaseDeletionDate" Type="Edm.DateTime" /><Property Name="TargetServerName" Type="Edm.String" /><Property Name="TargetDatabaseName" Type="Edm.String" /><Property Name="TargetUtcPointInTime" Type="Edm.DateTime" /><Property Name="State" Type="Edm.String" /><Property Name="Error" Type="Edm.String" /><Property Name="IsCancelled" Type="Edm.Boolean" Nullable="false" /><Property Name="CreatedBy" Type="Edm.String" /><Property Name="CreatedDate" Type="Edm.DateTime" Nullable="false" /></EntityType><EntityType Name="RestoreDatabaseOperation" OpenType="true"><Key><PropertyRef Name="RequestID" /></Key><Property Name="RequestID" Type="Edm.Guid" Nullable="false" /><Property Name="SourceDatabaseName" Type="Edm.String" /><Property Name="SourceDatabaseDeletionDate" Type="Edm.DateTime" /><Property Name="TargetServerName" Type="Edm.String" /><Property Name="TargetDatabaseName" Type="Edm.String" /><Property Name="TargetUtcPointInTime" Type="Edm.DateTime" /></EntityType><EntityType Name="RecoverDatabaseOperation" OpenType="true"><Key><PropertyRef Name="RequestID" /></Key><Property Name="RequestID" Type="Edm.Guid" Nullable="false" /><Property Name="SourceDatabaseName" Type="Edm.String" /><Property Name="TargetServerName" Type="Edm.String" /><Property Name="TargetDatabaseName" Type="Edm.String" /></EntityType><EntityType Name="DatabaseCopy" OpenType="true"><Key><PropertyRef Name="EntityId" /></Key><Property Name="LocalDatabaseId" Type="Edm.Int32" Nullable="false" /><Property Name="DestinationServerName" Type="Edm.String" /><Property Name="DestinationDatabaseName" Type="Edm.String" /><Property Name="SourceServerName" Type="Edm.String" /><Property Name="SourceDatabaseName" Type="Edm.String" /><Property Name="IsContinuous" Type="Edm.Boolean" Nullable="false" /><Property Name="TextStartDate" Type="Edm.String" /><Property Name="TextModifyDate" Type="Edm.String" /><Property Name="PercentComplete" Type="Edm.Single" /><Property Name="IsLocalDatabaseReplicationTarget" Type="Edm.Boolean" Nullable="false" /><Property Name="ReplicationState" Type="Edm.Byte" Nullable="false" /><Property Name="ReplicationStateDescription" Type="Edm.String" /><Property Name="IsInterlinkConnected" Type="Edm.Boolean" Nullable="false" /><Property Name="IsForcedTerminate" Type="Edm.Boolean" /><Property Name="MaximumLag" Type="Edm.Int32" /><Property Name="EntityId" Type="Edm.Guid" Nullable="false" /><Property Name="IsOfflineSecondary" Type="Edm.Boolean" Nullable="false" /><Property Name="IsTerminationAllowed" Type="Edm.Boolean" Nullable="false" /><NavigationProperty Name="Database" Relationship="Microsoft.SqlServer.Management.Server.Domain.Database_DatabaseCopies_DatabaseCopy_Database" ToRole="Database_DatabaseCopies" FromRole="DatabaseCopy_Database" /></EntityType><EntityType Name="DatabaseCopyValidationOperation" OpenType="true"><Key><PropertyRef Name="DatabaseName" /></Key><Property Name="DatabaseName" Type="Edm.String" Nullable="false" /><Property Name="Action" Type="Edm.Int32" Nullable="false" /><Property Name="LoginSid" Type="Edm.String" /></EntityType><EntityType Name="FirewallRule" OpenType="true"><Key><PropertyRef Name="Name" /></Key><Property Name="Name" Type="Edm.String" Nullable="false" /><Property Name="StartIPAddress" Type="Edm.String" /><Property Name="EndIPAddress" Type="Edm.String" /><Property Name="CreateDate" Type="Edm.DateTime" Nullable="false" /><Property Name="ModifyDate" Type="Edm.DateTime" Nullable="false" /></EntityType><EntityType Name="DatabaseMetrics" OpenType="true"><Key><PropertyRef Name="DatabaseId" /></Key><Property Name="DatabaseId" Type="Edm.Int32" Nullable="false" /><Property Name="DatabaseName" Type="Edm.String" /><Property Name="NumberOfLoginSuccessEvents" Type="Edm.Int64" Nullable="false" /><Property Name="NumberOfLoginFailureEvents" Type="Edm.Int64" Nullable="false" /><NavigationProperty Name="Database" Relationship="Microsoft.SqlServer.Management.Server.Domain.Database_DatabaseMetrics_DatabaseMetrics_Database" ToRole="Database_DatabaseMetrics" FromRole="DatabaseMetrics_Database" /></EntityType><EntityType Name="ServerMetrics" OpenType="true"><Key><PropertyRef Name="ServerName" /></Key><Property Name="ServerName" Type="Edm.String" Nullable="false" /><Property Name="NumberOfFailedEvents" Type="Edm.Int64" Nullable="false" /><Property Name="NumberOfLoginSuccessEvents" Type="Edm.Int64" Nullable="false" /><Property Name="NumberOfLoginFailureEvents" Type="Edm.Int64" Nullable="false" /><Property Name="NumberOfTerminatedConnectionEvents" Type="Edm.Int64" Nullable="false" /><Property Name="NumberOfThrottledEvents" Type="Edm.Int64" Nullable="false" /><Property Name="NumberOfDeadlockEvents" Type="Edm.Int64" Nullable="false" /><Property Name="NumberOfReconfiguredEvents" Type="Edm.Int64" Nullable="false" /><NavigationProperty Name="Server" Relationship="Microsoft.SqlServer.Management.Server.Domain.Server_ServerMetrics_ServerMetrics_Server" ToRole="Server_ServerMetrics" FromRole="ServerMetrics_Server" /></EntityType><EntityType Name="EventLog" OpenType="true"><Key><PropertyRef Name="EntityId" /></Key><Property Name="EntityId" Type="Edm.String" Nullable="false" /><Property Name="DatabaseName" Type="Edm.String" /><Property Name="StartTimeUtc" Type="Edm.DateTime" Nullable="false" /><Property Name="IntervalSizeInMinutes" Type="Edm.Int32" Nullable="false" /><Property Name="EventCategory" Type="Edm.String" /><Property Name="EventType" Type="Edm.String" /><Property Name="EventSubtype" Type="Edm.Int32" Nullable="false" /><Property Name="EventSubtypeDescription" Type="Edm.String" /><Property Name="Severity" Type="Edm.Int32" /><Property Name="NumberOfEvents" Type="Edm.Int64" /><Property Name="Description" Type="Edm.String" /><Property Name="AdditionalData" Type="Edm.String" /></EntityType><EntityType Name="ServerQuota" OpenType="true"><Key><PropertyRef Name="Name" /></Key><Property Name="Name" Type="Edm.String" Nullable="false" /><Property Name="Value" Type="Edm.Int32" Nullable="false" /><NavigationProperty Name="Server" Relationship="Microsoft.SqlServer.Management.Server.Domain.Server_ServerQuotas_ServerQuota_Server" ToRole="Server_ServerQuotas" FromRole="ServerQuota_Server" /></EntityType><EntityType Name="DatabaseOperation" OpenType="true"><Key><PropertyRef Name="Id" /></Key><Property Name="Id" Type="Edm.Guid" Nullable="false" /><Property Name="Name" Type="Edm.String" /><Property Name="State" Type="Edm.String" /><Property Name="StateId" Type="Edm.Int32" Nullable="false" /><Property Name="SessionActivityId" Type="Edm.Guid" Nullable="false" /><Property Name="DatabaseName" Type="Edm.String" /><Property Name="PercentComplete" Type="Edm.Int32" Nullable="false" /><Property Name="ErrorCode" Type="Edm.Int32" /><Property Name="Error" Type="Edm.String" /><Property Name="ErrorSeverity" Type="Edm.Int32" /><Property Name="ErrorState" Type="Edm.Int32" /><Property Name="StartTime" Type="Edm.DateTime" Nullable="false" /><Property Name="LastModifyTime" Type="Edm.DateTime" Nullable="false" /><NavigationProperty Name="Server" Relationship="Microsoft.SqlServer.Management.Server.Domain.Server_DatabaseOperations_DatabaseOperation_Server" ToRole="Server_DatabaseOperations" FromRole="DatabaseOperation_Server" /></EntityType><Association Name="Server_Databases_Database_Server"><End Type="Microsoft.SqlServer.Management.Server.Domain.Database" Role="Database_Server" Multiplicity="*" /><End Type="Microsoft.SqlServer.Management.Server.Domain.Server" Role="Server_Databases" Multiplicity="0..1" /></Association><Association Name="Server_ServerMetrics_ServerMetrics_Server"><End Type="Microsoft.SqlServer.Management.Server.Domain.ServerMetrics" Role="ServerMetrics_Server" Multiplicity="0..1" /><End Type="Microsoft.SqlServer.Management.Server.Domain.Server" Role="Server_ServerMetrics" Multiplicity="0..1" /></Association><Association Name="Server_ServerQuotas_ServerQuota_Server"><End Type="Microsoft.SqlServer.Management.Server.Domain.ServerQuota" Role="ServerQuota_Server" Multiplicity="*" /><End Type="Microsoft.SqlServer.Management.Server.Domain.Server" Role="Server_ServerQuotas" Multiplicity="0..1" /></Association><Association Name="Server_DatabaseOperations_DatabaseOperation_Server"><End Type="Microsoft.SqlServer.Management.Server.Domain.DatabaseOperation" Role="DatabaseOperation_Server" Multiplicity="*" /><End Type="Microsoft.SqlServer.Management.Server.Domain.Server" Role="Server_DatabaseOperations" Multiplicity="0..1" /></Association><Association Name="Database_ServiceObjective"><End Type="Microsoft.SqlServer.Management.Server.Domain.Database" Role="Database" Multiplicity="*" /><End Type="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" Role="ServiceObjective" Multiplicity="0..1" /></Association><Association Name="Database_DatabaseMetrics_DatabaseMetrics_Database"><End Type="Microsoft.SqlServer.Management.Server.Domain.DatabaseMetrics" Role="DatabaseMetrics_Database" Multiplicity="0..1" /><End Type="Microsoft.SqlServer.Management.Server.Domain.Database" Role="Database_DatabaseMetrics" Multiplicity="0..1" /></Association><Association Name="Database_DatabaseCopies_DatabaseCopy_Database"><End Type="Microsoft.SqlServer.Management.Server.Domain.DatabaseCopy" Role="DatabaseCopy_Database" Multiplicity="*" /><End Type="Microsoft.SqlServer.Management.Server.Domain.Database" Role="Database_DatabaseCopies" Multiplicity="0..1" /></Association><Association Name="ServiceObjective_DimensionSettings"><End Type="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" Role="ServiceObjective" Multiplicity="*" /><End Type="Microsoft.SqlServer.Management.Server.Domain.DimensionSetting" Role="DimensionSettings" Multiplicity="*" /></Association><Association Name="Operation_OperationDetails_OperationDetail_Operation"><End Type="Microsoft.SqlServer.Management.Server.Domain.OperationDetail" Role="OperationDetail_Operation" Multiplicity="*" /><End Type="Microsoft.SqlServer.Management.Server.Domain.Operation" Role="Operation_OperationDetails" Multiplicity="0..1" /></Association><EntityContainer Name="ServerContextInternal" m:IsDefaultEntityContainer="true"><EntitySet Name="Servers" EntityType="Microsoft.SqlServer.Management.Server.Domain.Server" /><EntitySet Name="Databases" EntityType="Microsoft.SqlServer.Management.Server.Domain.Database" /><EntitySet Name="RecoverableDatabases" EntityType="Microsoft.SqlServer.Management.Server.Domain.RecoverableDatabase" /><EntitySet Name="RestorableDroppedDatabases" EntityType="Microsoft.SqlServer.Management.Server.Domain.RestorableDroppedDatabase" /><EntitySet Name="DimensionSettings" EntityType="Microsoft.SqlServer.Management.Server.Domain.DimensionSetting" /><EntitySet Name="ServiceObjectives" EntityType="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" /><EntitySet Name="Operations" EntityType="Microsoft.SqlServer.Management.Server.Domain.Operation" /><EntitySet Name="OperationDetails" EntityType="Microsoft.SqlServer.Management.Server.Domain.OperationDetail" /><EntitySet Name="CreateDatabaseFromDacPacOperations" EntityType="Microsoft.SqlServer.Management.Server.Domain.CreateDatabaseFromDacPacOperation" /><EntitySet Name="ExtractDacPacOperations" EntityType="Microsoft.SqlServer.Management.Server.Domain.ExtractDacPacOperation" /><EntitySet Name="UpgradeDatabaseFromDacPacOperations" EntityType="Microsoft.SqlServer.Management.Server.Domain.UpgradeDatabaseFromDacPacOperation" /><EntitySet Name="ViewDatabaseChangesOperations" EntityType="Microsoft.SqlServer.Management.Server.Domain.ViewDatabaseChangesOperation" /><EntitySet Name="ViewUpgradePlanOperations" EntityType="Microsoft.SqlServer.Management.Server.Domain.ViewUpgradePlanOperation" /><EntitySet Name="DatabaseRestoreStatus" EntityType="Microsoft.SqlServer.Management.Server.Domain.DatabaseRestoreStatus" /><EntitySet Name="RestoreDatabaseOperations" EntityType="Microsoft.SqlServer.Management.Server.Domain.RestoreDatabaseOperation" /><EntitySet Name="RecoverDatabaseOperations" EntityType="Microsoft.SqlServer.Management.Server.Domain.RecoverDatabaseOperation" /><EntitySet Name="DatabaseCopies" EntityType="Microsoft.SqlServer.Management.Server.Domain.DatabaseCopy" /><EntitySet Name="DatabaseCopyValidationOperations" EntityType="Microsoft.SqlServer.Management.Server.Domain.DatabaseCopyValidationOperation" /><EntitySet Name="FirewallRules" EntityType="Microsoft.SqlServer.Management.Server.Domain.FirewallRule" /><EntitySet Name="DatabaseMetrics" EntityType="Microsoft.SqlServer.Management.Server.Domain.DatabaseMetrics" /><EntitySet Name="ServerMetrics" EntityType="Microsoft.SqlServer.Management.Server.Domain.ServerMetrics" /><EntitySet Name="EventLogs" EntityType="Microsoft.SqlServer.Management.Server.Domain.EventLog" /><EntitySet Name="ServerQuotas" EntityType="Microsoft.SqlServer.Management.Server.Domain.ServerQuota" /><EntitySet Name="DatabaseOperations" EntityType="Microsoft.SqlServer.Management.Server.Domain.DatabaseOperation" /><AssociationSet Name="ServerDatabase" Association="Microsoft.SqlServer.Management.Server.Domain.Server_Databases_Database_Server"><End Role="Server_Databases" EntitySet="Servers" /><End Role="Database_Server" EntitySet="Databases" /></AssociationSet><AssociationSet Name="ServerServerMetrics" Association="Microsoft.SqlServer.Management.Server.Domain.Server_ServerMetrics_ServerMetrics_Server"><End Role="Server_ServerMetrics" EntitySet="Servers" /><End Role="ServerMetrics_Server" EntitySet="ServerMetrics" /></AssociationSet><AssociationSet Name="ServerServerQuota" Association="Microsoft.SqlServer.Management.Server.Domain.Server_ServerQuotas_ServerQuota_Server"><End Role="Server_ServerQuotas" EntitySet="Servers" /><End Role="ServerQuota_Server" EntitySet="ServerQuotas" /></AssociationSet><AssociationSet Name="ServerDatabaseOperation" Association="Microsoft.SqlServer.Management.Server.Domain.Server_DatabaseOperations_DatabaseOperation_Server"><End Role="Server_DatabaseOperations" EntitySet="Servers" /><End Role="DatabaseOperation_Server" EntitySet="DatabaseOperations" /></AssociationSet><AssociationSet Name="fk_slo_database_objective_selections_objective_id" Association="Microsoft.SqlServer.Management.Server.Domain.Database_ServiceObjective"><End Role="Database" EntitySet="Databases" /><End Role="ServiceObjective" EntitySet="ServiceObjectives" /></AssociationSet><AssociationSet Name="DatabaseDatabaseMetrics" Association="Microsoft.SqlServer.Management.Server.Domain.Database_DatabaseMetrics_DatabaseMetrics_Database"><End Role="Database_DatabaseMetrics" EntitySet="Databases" /><End Role="DatabaseMetrics_Database" EntitySet="DatabaseMetrics" /></AssociationSet><AssociationSet Name="DatabaseDatabaseCopy" Association="Microsoft.SqlServer.Management.Server.Domain.Database_DatabaseCopies_DatabaseCopy_Database"><End Role="Database_DatabaseCopies" EntitySet="Databases" /><End Role="DatabaseCopy_Database" EntitySet="DatabaseCopies" /></AssociationSet><AssociationSet Name="slo_objective_setting_selections" Association="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective_DimensionSettings"><End Role="ServiceObjective" EntitySet="ServiceObjectives" /><End Role="DimensionSettings" EntitySet="DimensionSettings" /></AssociationSet><AssociationSet Name="OperationOperationDetail" Association="Microsoft.SqlServer.Management.Server.Domain.Operation_OperationDetails_OperationDetail_Operation"><End Role="Operation_OperationDetails" EntitySet="Operations" /><End Role="OperationDetail_Operation" EntitySet="OperationDetails" /></AssociationSet></EntityContainer><Annotations Target="Microsoft.SqlServer.Management.Server.Domain.ServerContextInternal"><ValueAnnotation Term="Com.Microsoft.Data.Services.Conventions.V1.UrlConventions" String="KeyAsSegment" /></Annotations></Schema></edmx:DataServices></edmx:Edmx> +
+
+
+
+ + UnitTest.Common.CreateTestDatabasesWithSqlAuth + + + 0 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases + POST + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + aR5toehk3AGKejPfrqWvgJaBIsSI5UXB4IbYkDlQwXjz+Bu0q9IpYLrbC8cl5JmjCdkk2sXTtBWJJ+LP1Y0x6krJuxPvvupavqaL8tzaDXwJ8Gqlw21Zb7XIOokP6s+guW/CJ6H3myPyyinm74bz9NKR4trVFpgrVzdnneZ9zZ/OAAh61B+Ul+GuEzv0abOpgJ2Mhz7LaXkZDrG1RhXb/IZvWnunL6NHpvJo/AHu8uZ7e8/W9Afm2sSv5PyPBlQ0RfJUx9QvjmoWICOIV5ddHmDUD3wQyK8tpgloM3iYiOjCw2hOWL62RWBZlzHIAmlj/J81gQ3R3GiF/grYeZzTmSZNXKbHWdNHozVCKn7EgCFbU++BZoLyWmc0Kf1sv7eIgI6zU2eCJjMkPlWoD/HCWtcbuG3CKHY30uLTAbxqyYOjncKFJ2seEzElQWI0L1ceveDIvxhaXgBL1TM+KnZP6zc8co6R3vgCSkIIl+AJ+qe2XJ71fhPL+HzFzxNdIUHqYNuGj4CtwTiRVSJJksyRu8zF6NDO8D+uUH853VICsuQzRZfvJ1+iy0TOVjfYscINTdpE5r/Vnr2/UU8F2dWernYXyUh1N/hSO19IR4lXac5RoeU0c1pqwnAP5p+/rWHEEK4dIoLIgIqAxjaKdsJ8F8Shgi9Fo8BH4u9ykWYlJ+mzpGFX0yiW38520Z4KVqfCMGN/d62HVFQSfsO9g2hIONAZhmFnX66ijL//0lCRftq2GK6unKlyDGAJQg7vo5OWMqT4aZMU1VY8b+Tb3maCRA== +
+
+ x-ms-client-session-id + 01e9f74d-9912-406b-a2fd-b26a8a8ce478-2014-03-27 19:01:53Z +
+
+ x-ms-client-request-id + a091ad54-601d-4dcc-afeb-4e95aea4a6a7-2014-03-27 19:02:01Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=7uHfDkcH0SEktgpETGwB2g== +
+
+ + + .SQLSERVERMANAGEMENT + 7uHfDkcH0SEktgpETGwB2g== + + + + + <?xml version="1.0" encoding="utf-8" standalone="yes"?> + <entry xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom"> + <title /> + <author> + <name /> + </author> + <updated>2014-03-27T19:02:01.3072468Z</updated> + <id /> + <content type="application/xml"> + <m:properties> + <d:AssignedServiceObjectiveId m:type="Edm.Guid" m:null="true" /> + <d:CollationName m:null="true" /> + <d:CreationDate m:type="Edm.DateTime">0001-01-01T00:00:00</d:CreationDate> + <d:Edition m:null="true" /> + <d:Id m:type="Edm.Int32">0</d:Id> + <d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember> + <d:IsFederationRoot m:type="Edm.Boolean" m:null="true" /> + <d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn> + <d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /> + <d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly> + <d:IsRecursiveTriggersOn m:type="Edm.Boolean" m:null="true" /> + <d:IsSuspended m:type="Edm.Boolean" m:null="true" /> + <d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject> + <d:MaxSizeBytes m:type="Edm.Int64" m:null="true" /> + <d:MaxSizeGB m:type="Edm.Int32" m:null="true" /> + <d:Name>testdb1</d:Name> + <d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /> + <d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /> + <d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /> + <d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /> + <d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /> + <d:RecoveryPeriodStartDate m:type="Edm.DateTime" m:null="true" /> + <d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32" m:null="true" /> + <d:ServiceObjectiveAssignmentErrorDescription m:null="true" /> + <d:ServiceObjectiveAssignmentState m:type="Edm.Byte" m:null="true" /> + <d:ServiceObjectiveAssignmentStateDescription m:null="true" /> + <d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime" m:null="true" /> + <d:ServiceObjectiveId m:type="Edm.Guid" m:null="true" /> + <d:SizeMB m:type="Edm.Decimal">0</d:SizeMB> + <d:Status m:type="Edm.Int32">0</d:Status> + </m:properties> + </content> + </entry> + + application/atom+xml + application/atom+xml,application/xml +
+ + Created + +
+ x-ms-request-id + 6709cf22-201f-92b3-d9c9-abc8788a29ca +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Thu, 27 Mar 2014 19:02:13 GMT +
+
+ Location + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4) +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(4)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(4)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(4)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(4)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(4)/DatabaseCopies" /><title /><updated>2014-03-27T19:02:13Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">4</d:Id><d:Name>testdb1</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2014-03-27T19:02:11.33</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">1</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">1073741824</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2014-03-27T12:02:03.123</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-03-27T19:03:01.89Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean" m:null="true" /><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry> +
+
+ + 1 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4) + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + aR5toehk3AGKejPfrqWvgJaBIsSI5UXB4IbYkDlQwXjz+Bu0q9IpYLrbC8cl5JmjCdkk2sXTtBWJJ+LP1Y0x6krJuxPvvupavqaL8tzaDXwJ8Gqlw21Zb7XIOokP6s+guW/CJ6H3myPyyinm74bz9NKR4trVFpgrVzdnneZ9zZ/OAAh61B+Ul+GuEzv0abOpgJ2Mhz7LaXkZDrG1RhXb/IZvWnunL6NHpvJo/AHu8uZ7e8/W9Afm2sSv5PyPBlQ0RfJUx9QvjmoWICOIV5ddHmDUD3wQyK8tpgloM3iYiOjCw2hOWL62RWBZlzHIAmlj/J81gQ3R3GiF/grYeZzTmSZNXKbHWdNHozVCKn7EgCFbU++BZoLyWmc0Kf1sv7eIgI6zU2eCJjMkPlWoD/HCWtcbuG3CKHY30uLTAbxqyYOjncKFJ2seEzElQWI0L1ceveDIvxhaXgBL1TM+KnZP6zc8co6R3vgCSkIIl+AJ+qe2XJ71fhPL+HzFzxNdIUHqYNuGj4CtwTiRVSJJksyRu8zF6NDO8D+uUH853VICsuQzRZfvJ1+iy0TOVjfYscINTdpE5r/Vnr2/UU8F2dWernYXyUh1N/hSO19IR4lXac5RoeU0c1pqwnAP5p+/rWHEEK4dIoLIgIqAxjaKdsJ8F8Shgi9Fo8BH4u9ykWYlJ+mzpGFX0yiW38520Z4KVqfCMGN/d62HVFQSfsO9g2hIONAZhmFnX66ijL//0lCRftq2GK6unKlyDGAJQg7vo5OWMqT4aZMU1VY8b+Tb3maCRA== +
+
+ x-ms-client-session-id + 01e9f74d-9912-406b-a2fd-b26a8a8ce478-2014-03-27 19:01:53Z +
+
+ x-ms-client-request-id + a091ad54-601d-4dcc-afeb-4e95aea4a6a7-2014-03-27 19:02:01Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=7uHfDkcH0SEktgpETGwB2g== +
+
+ + + .SQLSERVERMANAGEMENT + 7uHfDkcH0SEktgpETGwB2g== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 6709cf22-201f-92b3-d9c9-abc8788a29ca +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Thu, 27 Mar 2014 19:02:13 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(4)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(4)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(4)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(4)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(4)/DatabaseCopies" /><title /><updated>2014-03-27T19:02:13Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">4</d:Id><d:Name>testdb1</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2014-03-27T19:02:11.33</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">1</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">1073741824</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2014-03-27T12:02:03.123</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-03-27T19:03:01.89Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">2.44</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry> +
+
+ + 2 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + aR5toehk3AGKejPfrqWvgJaBIsSI5UXB4IbYkDlQwXjz+Bu0q9IpYLrbC8cl5JmjCdkk2sXTtBWJJ+LP1Y0x6krJuxPvvupavqaL8tzaDXwJ8Gqlw21Zb7XIOokP6s+guW/CJ6H3myPyyinm74bz9NKR4trVFpgrVzdnneZ9zZ/OAAh61B+Ul+GuEzv0abOpgJ2Mhz7LaXkZDrG1RhXb/IZvWnunL6NHpvJo/AHu8uZ7e8/W9Afm2sSv5PyPBlQ0RfJUx9QvjmoWICOIV5ddHmDUD3wQyK8tpgloM3iYiOjCw2hOWL62RWBZlzHIAmlj/J81gQ3R3GiF/grYeZzTmSZNXKbHWdNHozVCKn7EgCFbU++BZoLyWmc0Kf1sv7eIgI6zU2eCJjMkPlWoD/HCWtcbuG3CKHY30uLTAbxqyYOjncKFJ2seEzElQWI0L1ceveDIvxhaXgBL1TM+KnZP6zc8co6R3vgCSkIIl+AJ+qe2XJ71fhPL+HzFzxNdIUHqYNuGj4CtwTiRVSJJksyRu8zF6NDO8D+uUH853VICsuQzRZfvJ1+iy0TOVjfYscINTdpE5r/Vnr2/UU8F2dWernYXyUh1N/hSO19IR4lXac5RoeU0c1pqwnAP5p+/rWHEEK4dIoLIgIqAxjaKdsJ8F8Shgi9Fo8BH4u9ykWYlJ+mzpGFX0yiW38520Z4KVqfCMGN/d62HVFQSfsO9g2hIONAZhmFnX66ijL//0lCRftq2GK6unKlyDGAJQg7vo5OWMqT4aZMU1VY8b+Tb3maCRA== +
+
+ x-ms-client-session-id + 01e9f74d-9912-406b-a2fd-b26a8a8ce478-2014-03-27 19:01:53Z +
+
+ x-ms-client-request-id + a091ad54-601d-4dcc-afeb-4e95aea4a6a7-2014-03-27 19:02:01Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=7uHfDkcH0SEktgpETGwB2g== +
+
+ + + .SQLSERVERMANAGEMENT + 7uHfDkcH0SEktgpETGwB2g== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 6709cf22-201f-92b3-d9c9-abc8788a29ca +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Thu, 27 Mar 2014 19:02:14 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2014-03-27T19:02:14Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Shared resource allocation.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 3 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases + POST + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + aR5toehk3AGKejPfrqWvgJaBIsSI5UXB4IbYkDlQwXjz+Bu0q9IpYLrbC8cl5JmjCdkk2sXTtBWJJ+LP1Y0x6krJuxPvvupavqaL8tzaDXwJ8Gqlw21Zb7XIOokP6s+guW/CJ6H3myPyyinm74bz9NKR4trVFpgrVzdnneZ9zZ/OAAh61B+Ul+GuEzv0abOpgJ2Mhz7LaXkZDrG1RhXb/IZvWnunL6NHpvJo/AHu8uZ7e8/W9Afm2sSv5PyPBlQ0RfJUx9QvjmoWICOIV5ddHmDUD3wQyK8tpgloM3iYiOjCw2hOWL62RWBZlzHIAmlj/J81gQ3R3GiF/grYeZzTmSZNXKbHWdNHozVCKn7EgCFbU++BZoLyWmc0Kf1sv7eIgI6zU2eCJjMkPlWoD/HCWtcbuG3CKHY30uLTAbxqyYOjncKFJ2seEzElQWI0L1ceveDIvxhaXgBL1TM+KnZP6zc8co6R3vgCSkIIl+AJ+qe2XJ71fhPL+HzFzxNdIUHqYNuGj4CtwTiRVSJJksyRu8zF6NDO8D+uUH853VICsuQzRZfvJ1+iy0TOVjfYscINTdpE5r/Vnr2/UU8F2dWernYXyUh1N/hSO19IR4lXac5RoeU0c1pqwnAP5p+/rWHEEK4dIoLIgIqAxjaKdsJ8F8Shgi9Fo8BH4u9ykWYlJ+mzpGFX0yiW38520Z4KVqfCMGN/d62HVFQSfsO9g2hIONAZhmFnX66ijL//0lCRftq2GK6unKlyDGAJQg7vo5OWMqT4aZMU1VY8b+Tb3maCRA== +
+
+ x-ms-client-session-id + 01e9f74d-9912-406b-a2fd-b26a8a8ce478-2014-03-27 19:01:53Z +
+
+ x-ms-client-request-id + 2041c6aa-a8b4-4e8c-b668-ce9667cb502f-2014-03-27 19:02:14Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=7uHfDkcH0SEktgpETGwB2g== +
+
+ + + .SQLSERVERMANAGEMENT + 7uHfDkcH0SEktgpETGwB2g== + + + + + <?xml version="1.0" encoding="utf-8" standalone="yes"?> + <entry xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom"> + <title /> + <author> + <name /> + </author> + <updated>2014-03-27T19:02:14.624497Z</updated> + <id /> + <content type="application/xml"> + <m:properties> + <d:AssignedServiceObjectiveId m:type="Edm.Guid" m:null="true" /> + <d:CollationName>Japanese_CI_AS</d:CollationName> + <d:CreationDate m:type="Edm.DateTime">0001-01-01T00:00:00</d:CreationDate> + <d:Edition>Web</d:Edition> + <d:Id m:type="Edm.Int32">0</d:Id> + <d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember> + <d:IsFederationRoot m:type="Edm.Boolean" m:null="true" /> + <d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn> + <d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /> + <d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly> + <d:IsRecursiveTriggersOn m:type="Edm.Boolean" m:null="true" /> + <d:IsSuspended m:type="Edm.Boolean" m:null="true" /> + <d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject> + <d:MaxSizeBytes m:type="Edm.Int64" m:null="true" /> + <d:MaxSizeGB m:type="Edm.Int32">5</d:MaxSizeGB> + <d:Name>testdb2</d:Name> + <d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /> + <d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /> + <d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /> + <d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /> + <d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /> + <d:RecoveryPeriodStartDate m:type="Edm.DateTime" m:null="true" /> + <d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32" m:null="true" /> + <d:ServiceObjectiveAssignmentErrorDescription m:null="true" /> + <d:ServiceObjectiveAssignmentState m:type="Edm.Byte" m:null="true" /> + <d:ServiceObjectiveAssignmentStateDescription m:null="true" /> + <d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime" m:null="true" /> + <d:ServiceObjectiveId m:type="Edm.Guid" m:null="true" /> + <d:SizeMB m:type="Edm.Decimal">0</d:SizeMB> + <d:Status m:type="Edm.Int32">0</d:Status> + </m:properties> + </content> + </entry> + + application/atom+xml + application/atom+xml,application/xml +
+ + Created + +
+ x-ms-request-id + 6709cf22-201f-92b3-d9c9-abc8788a29ca +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Thu, 27 Mar 2014 19:02:20 GMT +
+
+ Location + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5) +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(5)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(5)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(5)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(5)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(5)/DatabaseCopies" /><title /><updated>2014-03-27T19:02:20Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">5</d:Id><d:Name>testdb2</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2014-03-27T19:02:18.673</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">5</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">5368709120</d:MaxSizeBytes><d:CollationName>Japanese_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2014-03-27T12:02:15.88</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-03-27T19:03:15.11Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean" m:null="true" /><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry> +
+
+ + 4 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5) + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + aR5toehk3AGKejPfrqWvgJaBIsSI5UXB4IbYkDlQwXjz+Bu0q9IpYLrbC8cl5JmjCdkk2sXTtBWJJ+LP1Y0x6krJuxPvvupavqaL8tzaDXwJ8Gqlw21Zb7XIOokP6s+guW/CJ6H3myPyyinm74bz9NKR4trVFpgrVzdnneZ9zZ/OAAh61B+Ul+GuEzv0abOpgJ2Mhz7LaXkZDrG1RhXb/IZvWnunL6NHpvJo/AHu8uZ7e8/W9Afm2sSv5PyPBlQ0RfJUx9QvjmoWICOIV5ddHmDUD3wQyK8tpgloM3iYiOjCw2hOWL62RWBZlzHIAmlj/J81gQ3R3GiF/grYeZzTmSZNXKbHWdNHozVCKn7EgCFbU++BZoLyWmc0Kf1sv7eIgI6zU2eCJjMkPlWoD/HCWtcbuG3CKHY30uLTAbxqyYOjncKFJ2seEzElQWI0L1ceveDIvxhaXgBL1TM+KnZP6zc8co6R3vgCSkIIl+AJ+qe2XJ71fhPL+HzFzxNdIUHqYNuGj4CtwTiRVSJJksyRu8zF6NDO8D+uUH853VICsuQzRZfvJ1+iy0TOVjfYscINTdpE5r/Vnr2/UU8F2dWernYXyUh1N/hSO19IR4lXac5RoeU0c1pqwnAP5p+/rWHEEK4dIoLIgIqAxjaKdsJ8F8Shgi9Fo8BH4u9ykWYlJ+mzpGFX0yiW38520Z4KVqfCMGN/d62HVFQSfsO9g2hIONAZhmFnX66ijL//0lCRftq2GK6unKlyDGAJQg7vo5OWMqT4aZMU1VY8b+Tb3maCRA== +
+
+ x-ms-client-session-id + 01e9f74d-9912-406b-a2fd-b26a8a8ce478-2014-03-27 19:01:53Z +
+
+ x-ms-client-request-id + 2041c6aa-a8b4-4e8c-b668-ce9667cb502f-2014-03-27 19:02:14Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=7uHfDkcH0SEktgpETGwB2g== +
+
+ + + .SQLSERVERMANAGEMENT + 7uHfDkcH0SEktgpETGwB2g== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 6709cf22-201f-92b3-d9c9-abc8788a29ca +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Thu, 27 Mar 2014 19:02:20 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(5)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(5)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(5)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(5)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(5)/DatabaseCopies" /><title /><updated>2014-03-27T19:02:20Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">5</d:Id><d:Name>testdb2</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2014-03-27T19:02:18.673</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">5</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">5368709120</d:MaxSizeBytes><d:CollationName>Japanese_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2014-03-27T12:02:15.88</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-03-27T19:03:15.11Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">2.50</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry> +
+
+ + 5 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + aR5toehk3AGKejPfrqWvgJaBIsSI5UXB4IbYkDlQwXjz+Bu0q9IpYLrbC8cl5JmjCdkk2sXTtBWJJ+LP1Y0x6krJuxPvvupavqaL8tzaDXwJ8Gqlw21Zb7XIOokP6s+guW/CJ6H3myPyyinm74bz9NKR4trVFpgrVzdnneZ9zZ/OAAh61B+Ul+GuEzv0abOpgJ2Mhz7LaXkZDrG1RhXb/IZvWnunL6NHpvJo/AHu8uZ7e8/W9Afm2sSv5PyPBlQ0RfJUx9QvjmoWICOIV5ddHmDUD3wQyK8tpgloM3iYiOjCw2hOWL62RWBZlzHIAmlj/J81gQ3R3GiF/grYeZzTmSZNXKbHWdNHozVCKn7EgCFbU++BZoLyWmc0Kf1sv7eIgI6zU2eCJjMkPlWoD/HCWtcbuG3CKHY30uLTAbxqyYOjncKFJ2seEzElQWI0L1ceveDIvxhaXgBL1TM+KnZP6zc8co6R3vgCSkIIl+AJ+qe2XJ71fhPL+HzFzxNdIUHqYNuGj4CtwTiRVSJJksyRu8zF6NDO8D+uUH853VICsuQzRZfvJ1+iy0TOVjfYscINTdpE5r/Vnr2/UU8F2dWernYXyUh1N/hSO19IR4lXac5RoeU0c1pqwnAP5p+/rWHEEK4dIoLIgIqAxjaKdsJ8F8Shgi9Fo8BH4u9ykWYlJ+mzpGFX0yiW38520Z4KVqfCMGN/d62HVFQSfsO9g2hIONAZhmFnX66ijL//0lCRftq2GK6unKlyDGAJQg7vo5OWMqT4aZMU1VY8b+Tb3maCRA== +
+
+ x-ms-client-session-id + 01e9f74d-9912-406b-a2fd-b26a8a8ce478-2014-03-27 19:01:53Z +
+
+ x-ms-client-request-id + 2041c6aa-a8b4-4e8c-b668-ce9667cb502f-2014-03-27 19:02:14Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=7uHfDkcH0SEktgpETGwB2g== +
+
+ + + .SQLSERVERMANAGEMENT + 7uHfDkcH0SEktgpETGwB2g== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 6709cf22-201f-92b3-d9c9-abc8788a29ca +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Thu, 27 Mar 2014 19:02:23 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2014-03-27T19:02:23Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Shared resource allocation.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 6 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases + POST + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + aR5toehk3AGKejPfrqWvgJaBIsSI5UXB4IbYkDlQwXjz+Bu0q9IpYLrbC8cl5JmjCdkk2sXTtBWJJ+LP1Y0x6krJuxPvvupavqaL8tzaDXwJ8Gqlw21Zb7XIOokP6s+guW/CJ6H3myPyyinm74bz9NKR4trVFpgrVzdnneZ9zZ/OAAh61B+Ul+GuEzv0abOpgJ2Mhz7LaXkZDrG1RhXb/IZvWnunL6NHpvJo/AHu8uZ7e8/W9Afm2sSv5PyPBlQ0RfJUx9QvjmoWICOIV5ddHmDUD3wQyK8tpgloM3iYiOjCw2hOWL62RWBZlzHIAmlj/J81gQ3R3GiF/grYeZzTmSZNXKbHWdNHozVCKn7EgCFbU++BZoLyWmc0Kf1sv7eIgI6zU2eCJjMkPlWoD/HCWtcbuG3CKHY30uLTAbxqyYOjncKFJ2seEzElQWI0L1ceveDIvxhaXgBL1TM+KnZP6zc8co6R3vgCSkIIl+AJ+qe2XJ71fhPL+HzFzxNdIUHqYNuGj4CtwTiRVSJJksyRu8zF6NDO8D+uUH853VICsuQzRZfvJ1+iy0TOVjfYscINTdpE5r/Vnr2/UU8F2dWernYXyUh1N/hSO19IR4lXac5RoeU0c1pqwnAP5p+/rWHEEK4dIoLIgIqAxjaKdsJ8F8Shgi9Fo8BH4u9ykWYlJ+mzpGFX0yiW38520Z4KVqfCMGN/d62HVFQSfsO9g2hIONAZhmFnX66ijL//0lCRftq2GK6unKlyDGAJQg7vo5OWMqT4aZMU1VY8b+Tb3maCRA== +
+
+ x-ms-client-session-id + 01e9f74d-9912-406b-a2fd-b26a8a8ce478-2014-03-27 19:01:53Z +
+
+ x-ms-client-request-id + 35d34093-5e2f-43b4-b877-077151cd48c5-2014-03-27 19:02:23Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=7uHfDkcH0SEktgpETGwB2g== +
+
+ + + .SQLSERVERMANAGEMENT + 7uHfDkcH0SEktgpETGwB2g== + + + + + <?xml version="1.0" encoding="utf-8" standalone="yes"?> + <entry xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom"> + <title /> + <author> + <name /> + </author> + <updated>2014-03-27T19:02:23.4893107Z</updated> + <id /> + <content type="application/xml"> + <m:properties> + <d:AssignedServiceObjectiveId m:type="Edm.Guid" m:null="true" /> + <d:CollationName m:null="true" /> + <d:CreationDate m:type="Edm.DateTime">0001-01-01T00:00:00</d:CreationDate> + <d:Edition m:null="true" /> + <d:Id m:type="Edm.Int32">0</d:Id> + <d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember> + <d:IsFederationRoot m:type="Edm.Boolean" m:null="true" /> + <d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn> + <d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /> + <d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly> + <d:IsRecursiveTriggersOn m:type="Edm.Boolean" m:null="true" /> + <d:IsSuspended m:type="Edm.Boolean" m:null="true" /> + <d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject> + <d:MaxSizeBytes m:type="Edm.Int64">104857600</d:MaxSizeBytes> + <d:MaxSizeGB m:type="Edm.Int32" m:null="true" /> + <d:Name>testdb3</d:Name> + <d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /> + <d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /> + <d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /> + <d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /> + <d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /> + <d:RecoveryPeriodStartDate m:type="Edm.DateTime" m:null="true" /> + <d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32" m:null="true" /> + <d:ServiceObjectiveAssignmentErrorDescription m:null="true" /> + <d:ServiceObjectiveAssignmentState m:type="Edm.Byte" m:null="true" /> + <d:ServiceObjectiveAssignmentStateDescription m:null="true" /> + <d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime" m:null="true" /> + <d:ServiceObjectiveId m:type="Edm.Guid" m:null="true" /> + <d:SizeMB m:type="Edm.Decimal">0</d:SizeMB> + <d:Status m:type="Edm.Int32">0</d:Status> + </m:properties> + </content> + </entry> + + application/atom+xml + application/atom+xml,application/xml +
+ + Created + +
+ x-ms-request-id + 6709cf22-201f-92b3-d9c9-abc8788a29ca +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Thu, 27 Mar 2014 19:02:35 GMT +
+
+ Location + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(6) +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(6)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(6)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(6)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(6)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(6)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(6)/DatabaseCopies" /><title /><updated>2014-03-27T19:02:35Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">6</d:Id><d:Name>testdb3</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2014-03-27T19:02:29.687</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">0</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">104857600</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2014-03-27T12:02:25.577</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-03-27T19:03:24.593Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean" m:null="true" /><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry> +
+
+ + 7 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(6) + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + aR5toehk3AGKejPfrqWvgJaBIsSI5UXB4IbYkDlQwXjz+Bu0q9IpYLrbC8cl5JmjCdkk2sXTtBWJJ+LP1Y0x6krJuxPvvupavqaL8tzaDXwJ8Gqlw21Zb7XIOokP6s+guW/CJ6H3myPyyinm74bz9NKR4trVFpgrVzdnneZ9zZ/OAAh61B+Ul+GuEzv0abOpgJ2Mhz7LaXkZDrG1RhXb/IZvWnunL6NHpvJo/AHu8uZ7e8/W9Afm2sSv5PyPBlQ0RfJUx9QvjmoWICOIV5ddHmDUD3wQyK8tpgloM3iYiOjCw2hOWL62RWBZlzHIAmlj/J81gQ3R3GiF/grYeZzTmSZNXKbHWdNHozVCKn7EgCFbU++BZoLyWmc0Kf1sv7eIgI6zU2eCJjMkPlWoD/HCWtcbuG3CKHY30uLTAbxqyYOjncKFJ2seEzElQWI0L1ceveDIvxhaXgBL1TM+KnZP6zc8co6R3vgCSkIIl+AJ+qe2XJ71fhPL+HzFzxNdIUHqYNuGj4CtwTiRVSJJksyRu8zF6NDO8D+uUH853VICsuQzRZfvJ1+iy0TOVjfYscINTdpE5r/Vnr2/UU8F2dWernYXyUh1N/hSO19IR4lXac5RoeU0c1pqwnAP5p+/rWHEEK4dIoLIgIqAxjaKdsJ8F8Shgi9Fo8BH4u9ykWYlJ+mzpGFX0yiW38520Z4KVqfCMGN/d62HVFQSfsO9g2hIONAZhmFnX66ijL//0lCRftq2GK6unKlyDGAJQg7vo5OWMqT4aZMU1VY8b+Tb3maCRA== +
+
+ x-ms-client-session-id + 01e9f74d-9912-406b-a2fd-b26a8a8ce478-2014-03-27 19:01:53Z +
+
+ x-ms-client-request-id + 35d34093-5e2f-43b4-b877-077151cd48c5-2014-03-27 19:02:23Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=7uHfDkcH0SEktgpETGwB2g== +
+
+ + + .SQLSERVERMANAGEMENT + 7uHfDkcH0SEktgpETGwB2g== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 6709cf22-201f-92b3-d9c9-abc8788a29ca +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Thu, 27 Mar 2014 19:02:36 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(6)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(6)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(6)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(6)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(6)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(6)/DatabaseCopies" /><title /><updated>2014-03-27T19:02:36Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">6</d:Id><d:Name>testdb3</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2014-03-27T19:02:29.687</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">0</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">104857600</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2014-03-27T12:02:25.577</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-03-27T19:03:24.593Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">2.50</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry> +
+
+ + 8 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(6)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + aR5toehk3AGKejPfrqWvgJaBIsSI5UXB4IbYkDlQwXjz+Bu0q9IpYLrbC8cl5JmjCdkk2sXTtBWJJ+LP1Y0x6krJuxPvvupavqaL8tzaDXwJ8Gqlw21Zb7XIOokP6s+guW/CJ6H3myPyyinm74bz9NKR4trVFpgrVzdnneZ9zZ/OAAh61B+Ul+GuEzv0abOpgJ2Mhz7LaXkZDrG1RhXb/IZvWnunL6NHpvJo/AHu8uZ7e8/W9Afm2sSv5PyPBlQ0RfJUx9QvjmoWICOIV5ddHmDUD3wQyK8tpgloM3iYiOjCw2hOWL62RWBZlzHIAmlj/J81gQ3R3GiF/grYeZzTmSZNXKbHWdNHozVCKn7EgCFbU++BZoLyWmc0Kf1sv7eIgI6zU2eCJjMkPlWoD/HCWtcbuG3CKHY30uLTAbxqyYOjncKFJ2seEzElQWI0L1ceveDIvxhaXgBL1TM+KnZP6zc8co6R3vgCSkIIl+AJ+qe2XJ71fhPL+HzFzxNdIUHqYNuGj4CtwTiRVSJJksyRu8zF6NDO8D+uUH853VICsuQzRZfvJ1+iy0TOVjfYscINTdpE5r/Vnr2/UU8F2dWernYXyUh1N/hSO19IR4lXac5RoeU0c1pqwnAP5p+/rWHEEK4dIoLIgIqAxjaKdsJ8F8Shgi9Fo8BH4u9ykWYlJ+mzpGFX0yiW38520Z4KVqfCMGN/d62HVFQSfsO9g2hIONAZhmFnX66ijL//0lCRftq2GK6unKlyDGAJQg7vo5OWMqT4aZMU1VY8b+Tb3maCRA== +
+
+ x-ms-client-session-id + 01e9f74d-9912-406b-a2fd-b26a8a8ce478-2014-03-27 19:01:53Z +
+
+ x-ms-client-request-id + 35d34093-5e2f-43b4-b877-077151cd48c5-2014-03-27 19:02:23Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=7uHfDkcH0SEktgpETGwB2g== +
+
+ + + .SQLSERVERMANAGEMENT + 7uHfDkcH0SEktgpETGwB2g== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 6709cf22-201f-92b3-d9c9-abc8788a29ca +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Thu, 27 Mar 2014 19:02:36 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2014-03-27T19:02:36Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Shared resource allocation.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+
+
+ + UnitTests.SetAzureSqlDatabaseSizeWithSqlAuth + + + 0 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases()?$filter=Name%20eq%20'testdb1'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + cKCGkC9gQd0lbuJSLFzOYqTRsN03tjWgiAT7xNL5fBg1OjqlDE/Y/e7QeGH0VTb4axc5INHivlRk8xvRJFYnJAZMTJ28CsMFqlEfQWKP4eDxiHLYQr0rK+HC/GnGrKulHDSmf2WmQTGk4GDJb4CM/xMCrNIMvQeeZ/yv5Vkk6OiKlsCpGhWkpytvz/HG0v/Krrg4hpbxuqjezota5i1igma35teNHwHiUEHWgN/DeyKbUPekk9Vn5IfBdG05JMbb4xrwgHOKCucwsSvTQK+SJP0TB7kDgnzm70mfbbkzuwvm7uxuzCJR0mFAAyn08j4Fv3ToraLpDPy9lxWV/2TN7H92yX1WvPek94Q7JC2ISujJGeUfeq+MFOrceERWhWu68zQEkrakxbV2CHRLLugP5t7XGhjjZzE2pTFaMTU5Fmn/JGqAN3VqfofR+VRjvF2MvpTr8MKmuP0nmAxNcdevUuMQfItBTceGicAZjSEUjhSO8tNmqCftcAxf7dCchMEm9Rqi9jnalF4Rm2az7V/1G3xvWRKEJ6kU8IpfrwMelZF1MvbWzl7fmWA1jrQTnpLCBTjQKhDR5qg/YrisZH1MFlY7IM9JDwrQdwh0s0iVIJAQUutiqblZMOtWt17RB95F+defmn4KLg18n6gSQmoAJQZnmojVzgoPcbzu6Ojx9sV6D1L8cYwfUnqP/DtYGGXQAFJtWdbsV/tZCqkdaMeALb6HNYt5UG9Nvj4p2F7uKU0qrSx7ngFtGQof21HAFR1oKlDFv7xIsCQ6i07mL57viA== +
+
+ x-ms-client-session-id + 0480d9d6-fba5-499c-9101-be615831a763-2014-03-27 21:23:12Z +
+
+ x-ms-client-request-id + db490dac-66ae-4f62-a901-7f5b91956474-2014-03-27 21:23:35Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=Fw7SF+NlDq3BRiGsRB0z0w== +
+
+ + + .SQLSERVERMANAGEMENT + Fw7SF+NlDq3BRiGsRB0z0w== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 58cb6722-dd9a-22e3-bf73-573b4bab14ca +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Thu, 27 Mar 2014 21:23:37 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2014-03-27T21:23:36Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(4)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(4)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(4)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(4)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(4)/DatabaseCopies" /><title /><updated>2014-03-27T21:23:36Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">4</d:Id><d:Name>testdb1</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2014-03-27T21:23:15.523</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">1</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">1073741824</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2014-03-27T14:23:13.1</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-03-27T21:24:12.85Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">2.44</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry></feed> +
+
+ + 1 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + cKCGkC9gQd0lbuJSLFzOYqTRsN03tjWgiAT7xNL5fBg1OjqlDE/Y/e7QeGH0VTb4axc5INHivlRk8xvRJFYnJAZMTJ28CsMFqlEfQWKP4eDxiHLYQr0rK+HC/GnGrKulHDSmf2WmQTGk4GDJb4CM/xMCrNIMvQeeZ/yv5Vkk6OiKlsCpGhWkpytvz/HG0v/Krrg4hpbxuqjezota5i1igma35teNHwHiUEHWgN/DeyKbUPekk9Vn5IfBdG05JMbb4xrwgHOKCucwsSvTQK+SJP0TB7kDgnzm70mfbbkzuwvm7uxuzCJR0mFAAyn08j4Fv3ToraLpDPy9lxWV/2TN7H92yX1WvPek94Q7JC2ISujJGeUfeq+MFOrceERWhWu68zQEkrakxbV2CHRLLugP5t7XGhjjZzE2pTFaMTU5Fmn/JGqAN3VqfofR+VRjvF2MvpTr8MKmuP0nmAxNcdevUuMQfItBTceGicAZjSEUjhSO8tNmqCftcAxf7dCchMEm9Rqi9jnalF4Rm2az7V/1G3xvWRKEJ6kU8IpfrwMelZF1MvbWzl7fmWA1jrQTnpLCBTjQKhDR5qg/YrisZH1MFlY7IM9JDwrQdwh0s0iVIJAQUutiqblZMOtWt17RB95F+defmn4KLg18n6gSQmoAJQZnmojVzgoPcbzu6Ojx9sV6D1L8cYwfUnqP/DtYGGXQAFJtWdbsV/tZCqkdaMeALb6HNYt5UG9Nvj4p2F7uKU0qrSx7ngFtGQof21HAFR1oKlDFv7xIsCQ6i07mL57viA== +
+
+ x-ms-client-session-id + 0480d9d6-fba5-499c-9101-be615831a763-2014-03-27 21:23:12Z +
+
+ x-ms-client-request-id + db490dac-66ae-4f62-a901-7f5b91956474-2014-03-27 21:23:35Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=Fw7SF+NlDq3BRiGsRB0z0w== +
+
+ + + .SQLSERVERMANAGEMENT + Fw7SF+NlDq3BRiGsRB0z0w== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 58cb6722-dd9a-22e3-bf73-573b4bab14ca +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Thu, 27 Mar 2014 21:23:38 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2014-03-27T21:23:38Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Shared resource allocation.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 2 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4) + MERGE + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + cKCGkC9gQd0lbuJSLFzOYqTRsN03tjWgiAT7xNL5fBg1OjqlDE/Y/e7QeGH0VTb4axc5INHivlRk8xvRJFYnJAZMTJ28CsMFqlEfQWKP4eDxiHLYQr0rK+HC/GnGrKulHDSmf2WmQTGk4GDJb4CM/xMCrNIMvQeeZ/yv5Vkk6OiKlsCpGhWkpytvz/HG0v/Krrg4hpbxuqjezota5i1igma35teNHwHiUEHWgN/DeyKbUPekk9Vn5IfBdG05JMbb4xrwgHOKCucwsSvTQK+SJP0TB7kDgnzm70mfbbkzuwvm7uxuzCJR0mFAAyn08j4Fv3ToraLpDPy9lxWV/2TN7H92yX1WvPek94Q7JC2ISujJGeUfeq+MFOrceERWhWu68zQEkrakxbV2CHRLLugP5t7XGhjjZzE2pTFaMTU5Fmn/JGqAN3VqfofR+VRjvF2MvpTr8MKmuP0nmAxNcdevUuMQfItBTceGicAZjSEUjhSO8tNmqCftcAxf7dCchMEm9Rqi9jnalF4Rm2az7V/1G3xvWRKEJ6kU8IpfrwMelZF1MvbWzl7fmWA1jrQTnpLCBTjQKhDR5qg/YrisZH1MFlY7IM9JDwrQdwh0s0iVIJAQUutiqblZMOtWt17RB95F+defmn4KLg18n6gSQmoAJQZnmojVzgoPcbzu6Ojx9sV6D1L8cYwfUnqP/DtYGGXQAFJtWdbsV/tZCqkdaMeALb6HNYt5UG9Nvj4p2F7uKU0qrSx7ngFtGQof21HAFR1oKlDFv7xIsCQ6i07mL57viA== +
+
+ x-ms-client-session-id + 0480d9d6-fba5-499c-9101-be615831a763-2014-03-27 21:23:12Z +
+
+ x-ms-client-request-id + db490dac-66ae-4f62-a901-7f5b91956474-2014-03-27 21:23:35Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=Fw7SF+NlDq3BRiGsRB0z0w== +
+
+ + + .SQLSERVERMANAGEMENT + Fw7SF+NlDq3BRiGsRB0z0w== + + + + + <?xml version="1.0" encoding="utf-8" standalone="yes"?> + <entry xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom"> + <category scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" term="Microsoft.SqlServer.Management.Server.Domain.Database" /> + <title /> + <author> + <name /> + </author> + <updated>2014-03-27T21:23:38.6506355Z</updated> + <id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)</id> + <content type="application/xml"> + <m:properties> + <d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId> + <d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName> + <d:CreationDate m:type="Edm.DateTime">2014-03-27T14:23:13.1</d:CreationDate> + <d:Edition m:null="true" /> + <d:Id m:type="Edm.Int32">4</d:Id> + <d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember> + <d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot> + <d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn> + <d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /> + <d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly> + <d:IsRecursiveTriggersOn m:type="Edm.Boolean" m:null="true" /> + <d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended> + <d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject> + <d:MaxSizeBytes m:type="Edm.Int64">1073741824</d:MaxSizeBytes> + <d:MaxSizeGB m:type="Edm.Int32">5</d:MaxSizeGB> + <d:Name>testdb1</d:Name> + <d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /> + <d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /> + <d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /> + <d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /> + <d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /> + <d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-03-27T21:24:12.85Z</d:RecoveryPeriodStartDate> + <d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode> + <d:ServiceObjectiveAssignmentErrorDescription m:null="true" /> + <d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState> + <d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription> + <d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2014-03-27T21:23:15.523</d:ServiceObjectiveAssignmentSuccessDate> + <d:ServiceObjectiveId m:type="Edm.Guid" m:null="true" /> + <d:SizeMB m:type="Edm.Decimal">2.44</d:SizeMB> + <d:Status m:type="Edm.Int32">1</d:Status> + </m:properties> + </content> + </entry> + + application/atom+xml + application/atom+xml,application/xml +
+ + NoContent + +
+ x-ms-request-id + 58cb6722-dd9a-22e3-bf73-573b4bab14ca +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 1.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Thu, 27 Mar 2014 21:23:45 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 3 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases()?$filter=Name%20eq%20'testdb1'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + cKCGkC9gQd0lbuJSLFzOYqTRsN03tjWgiAT7xNL5fBg1OjqlDE/Y/e7QeGH0VTb4axc5INHivlRk8xvRJFYnJAZMTJ28CsMFqlEfQWKP4eDxiHLYQr0rK+HC/GnGrKulHDSmf2WmQTGk4GDJb4CM/xMCrNIMvQeeZ/yv5Vkk6OiKlsCpGhWkpytvz/HG0v/Krrg4hpbxuqjezota5i1igma35teNHwHiUEHWgN/DeyKbUPekk9Vn5IfBdG05JMbb4xrwgHOKCucwsSvTQK+SJP0TB7kDgnzm70mfbbkzuwvm7uxuzCJR0mFAAyn08j4Fv3ToraLpDPy9lxWV/2TN7H92yX1WvPek94Q7JC2ISujJGeUfeq+MFOrceERWhWu68zQEkrakxbV2CHRLLugP5t7XGhjjZzE2pTFaMTU5Fmn/JGqAN3VqfofR+VRjvF2MvpTr8MKmuP0nmAxNcdevUuMQfItBTceGicAZjSEUjhSO8tNmqCftcAxf7dCchMEm9Rqi9jnalF4Rm2az7V/1G3xvWRKEJ6kU8IpfrwMelZF1MvbWzl7fmWA1jrQTnpLCBTjQKhDR5qg/YrisZH1MFlY7IM9JDwrQdwh0s0iVIJAQUutiqblZMOtWt17RB95F+defmn4KLg18n6gSQmoAJQZnmojVzgoPcbzu6Ojx9sV6D1L8cYwfUnqP/DtYGGXQAFJtWdbsV/tZCqkdaMeALb6HNYt5UG9Nvj4p2F7uKU0qrSx7ngFtGQof21HAFR1oKlDFv7xIsCQ6i07mL57viA== +
+
+ x-ms-client-session-id + 0480d9d6-fba5-499c-9101-be615831a763-2014-03-27 21:23:12Z +
+
+ x-ms-client-request-id + db490dac-66ae-4f62-a901-7f5b91956474-2014-03-27 21:23:35Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=Fw7SF+NlDq3BRiGsRB0z0w== +
+
+ + + .SQLSERVERMANAGEMENT + Fw7SF+NlDq3BRiGsRB0z0w== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 58cb6722-dd9a-22e3-bf73-573b4bab14ca +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Thu, 27 Mar 2014 21:23:45 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2014-03-27T21:23:45Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(4)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(4)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(4)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(4)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(4)/DatabaseCopies" /><title /><updated>2014-03-27T21:23:45Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">4</d:Id><d:Name>testdb1</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2014-03-27T21:23:15.523</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">5</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">5368709120</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2014-03-27T14:23:13.1</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-03-27T21:24:12.85Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">2.44</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry></feed> +
+
+ + 4 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + cKCGkC9gQd0lbuJSLFzOYqTRsN03tjWgiAT7xNL5fBg1OjqlDE/Y/e7QeGH0VTb4axc5INHivlRk8xvRJFYnJAZMTJ28CsMFqlEfQWKP4eDxiHLYQr0rK+HC/GnGrKulHDSmf2WmQTGk4GDJb4CM/xMCrNIMvQeeZ/yv5Vkk6OiKlsCpGhWkpytvz/HG0v/Krrg4hpbxuqjezota5i1igma35teNHwHiUEHWgN/DeyKbUPekk9Vn5IfBdG05JMbb4xrwgHOKCucwsSvTQK+SJP0TB7kDgnzm70mfbbkzuwvm7uxuzCJR0mFAAyn08j4Fv3ToraLpDPy9lxWV/2TN7H92yX1WvPek94Q7JC2ISujJGeUfeq+MFOrceERWhWu68zQEkrakxbV2CHRLLugP5t7XGhjjZzE2pTFaMTU5Fmn/JGqAN3VqfofR+VRjvF2MvpTr8MKmuP0nmAxNcdevUuMQfItBTceGicAZjSEUjhSO8tNmqCftcAxf7dCchMEm9Rqi9jnalF4Rm2az7V/1G3xvWRKEJ6kU8IpfrwMelZF1MvbWzl7fmWA1jrQTnpLCBTjQKhDR5qg/YrisZH1MFlY7IM9JDwrQdwh0s0iVIJAQUutiqblZMOtWt17RB95F+defmn4KLg18n6gSQmoAJQZnmojVzgoPcbzu6Ojx9sV6D1L8cYwfUnqP/DtYGGXQAFJtWdbsV/tZCqkdaMeALb6HNYt5UG9Nvj4p2F7uKU0qrSx7ngFtGQof21HAFR1oKlDFv7xIsCQ6i07mL57viA== +
+
+ x-ms-client-session-id + 0480d9d6-fba5-499c-9101-be615831a763-2014-03-27 21:23:12Z +
+
+ x-ms-client-request-id + db490dac-66ae-4f62-a901-7f5b91956474-2014-03-27 21:23:35Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=Fw7SF+NlDq3BRiGsRB0z0w== +
+
+ + + .SQLSERVERMANAGEMENT + Fw7SF+NlDq3BRiGsRB0z0w== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 58cb6722-dd9a-22e3-bf73-573b4bab14ca +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Thu, 27 Mar 2014 21:23:45 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2014-03-27T21:23:46Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Shared resource allocation.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 5 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases()?$filter=Name%20eq%20'testdb2'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + cKCGkC9gQd0lbuJSLFzOYqTRsN03tjWgiAT7xNL5fBg1OjqlDE/Y/e7QeGH0VTb4axc5INHivlRk8xvRJFYnJAZMTJ28CsMFqlEfQWKP4eDxiHLYQr0rK+HC/GnGrKulHDSmf2WmQTGk4GDJb4CM/xMCrNIMvQeeZ/yv5Vkk6OiKlsCpGhWkpytvz/HG0v/Krrg4hpbxuqjezota5i1igma35teNHwHiUEHWgN/DeyKbUPekk9Vn5IfBdG05JMbb4xrwgHOKCucwsSvTQK+SJP0TB7kDgnzm70mfbbkzuwvm7uxuzCJR0mFAAyn08j4Fv3ToraLpDPy9lxWV/2TN7H92yX1WvPek94Q7JC2ISujJGeUfeq+MFOrceERWhWu68zQEkrakxbV2CHRLLugP5t7XGhjjZzE2pTFaMTU5Fmn/JGqAN3VqfofR+VRjvF2MvpTr8MKmuP0nmAxNcdevUuMQfItBTceGicAZjSEUjhSO8tNmqCftcAxf7dCchMEm9Rqi9jnalF4Rm2az7V/1G3xvWRKEJ6kU8IpfrwMelZF1MvbWzl7fmWA1jrQTnpLCBTjQKhDR5qg/YrisZH1MFlY7IM9JDwrQdwh0s0iVIJAQUutiqblZMOtWt17RB95F+defmn4KLg18n6gSQmoAJQZnmojVzgoPcbzu6Ojx9sV6D1L8cYwfUnqP/DtYGGXQAFJtWdbsV/tZCqkdaMeALb6HNYt5UG9Nvj4p2F7uKU0qrSx7ngFtGQof21HAFR1oKlDFv7xIsCQ6i07mL57viA== +
+
+ x-ms-client-session-id + 0480d9d6-fba5-499c-9101-be615831a763-2014-03-27 21:23:12Z +
+
+ x-ms-client-request-id + db490dac-66ae-4f62-a901-7f5b91956474-2014-03-27 21:23:35Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=Fw7SF+NlDq3BRiGsRB0z0w== +
+
+ + + .SQLSERVERMANAGEMENT + Fw7SF+NlDq3BRiGsRB0z0w== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 58cb6722-dd9a-22e3-bf73-573b4bab14ca +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Thu, 27 Mar 2014 21:23:46 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2014-03-27T21:23:46Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(5)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(5)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(5)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(5)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(5)/DatabaseCopies" /><title /><updated>2014-03-27T21:23:46Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">5</d:Id><d:Name>testdb2</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2014-03-27T21:23:22.663</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">5</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">5368709120</d:MaxSizeBytes><d:CollationName>Japanese_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2014-03-27T14:23:18.993</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-03-27T21:24:18.163Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">2.50</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry></feed> +
+
+ + 6 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + cKCGkC9gQd0lbuJSLFzOYqTRsN03tjWgiAT7xNL5fBg1OjqlDE/Y/e7QeGH0VTb4axc5INHivlRk8xvRJFYnJAZMTJ28CsMFqlEfQWKP4eDxiHLYQr0rK+HC/GnGrKulHDSmf2WmQTGk4GDJb4CM/xMCrNIMvQeeZ/yv5Vkk6OiKlsCpGhWkpytvz/HG0v/Krrg4hpbxuqjezota5i1igma35teNHwHiUEHWgN/DeyKbUPekk9Vn5IfBdG05JMbb4xrwgHOKCucwsSvTQK+SJP0TB7kDgnzm70mfbbkzuwvm7uxuzCJR0mFAAyn08j4Fv3ToraLpDPy9lxWV/2TN7H92yX1WvPek94Q7JC2ISujJGeUfeq+MFOrceERWhWu68zQEkrakxbV2CHRLLugP5t7XGhjjZzE2pTFaMTU5Fmn/JGqAN3VqfofR+VRjvF2MvpTr8MKmuP0nmAxNcdevUuMQfItBTceGicAZjSEUjhSO8tNmqCftcAxf7dCchMEm9Rqi9jnalF4Rm2az7V/1G3xvWRKEJ6kU8IpfrwMelZF1MvbWzl7fmWA1jrQTnpLCBTjQKhDR5qg/YrisZH1MFlY7IM9JDwrQdwh0s0iVIJAQUutiqblZMOtWt17RB95F+defmn4KLg18n6gSQmoAJQZnmojVzgoPcbzu6Ojx9sV6D1L8cYwfUnqP/DtYGGXQAFJtWdbsV/tZCqkdaMeALb6HNYt5UG9Nvj4p2F7uKU0qrSx7ngFtGQof21HAFR1oKlDFv7xIsCQ6i07mL57viA== +
+
+ x-ms-client-session-id + 0480d9d6-fba5-499c-9101-be615831a763-2014-03-27 21:23:12Z +
+
+ x-ms-client-request-id + db490dac-66ae-4f62-a901-7f5b91956474-2014-03-27 21:23:35Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=Fw7SF+NlDq3BRiGsRB0z0w== +
+
+ + + .SQLSERVERMANAGEMENT + Fw7SF+NlDq3BRiGsRB0z0w== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 58cb6722-dd9a-22e3-bf73-573b4bab14ca +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Thu, 27 Mar 2014 21:23:46 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2014-03-27T21:23:47Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Shared resource allocation.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 7 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5) + MERGE + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + cKCGkC9gQd0lbuJSLFzOYqTRsN03tjWgiAT7xNL5fBg1OjqlDE/Y/e7QeGH0VTb4axc5INHivlRk8xvRJFYnJAZMTJ28CsMFqlEfQWKP4eDxiHLYQr0rK+HC/GnGrKulHDSmf2WmQTGk4GDJb4CM/xMCrNIMvQeeZ/yv5Vkk6OiKlsCpGhWkpytvz/HG0v/Krrg4hpbxuqjezota5i1igma35teNHwHiUEHWgN/DeyKbUPekk9Vn5IfBdG05JMbb4xrwgHOKCucwsSvTQK+SJP0TB7kDgnzm70mfbbkzuwvm7uxuzCJR0mFAAyn08j4Fv3ToraLpDPy9lxWV/2TN7H92yX1WvPek94Q7JC2ISujJGeUfeq+MFOrceERWhWu68zQEkrakxbV2CHRLLugP5t7XGhjjZzE2pTFaMTU5Fmn/JGqAN3VqfofR+VRjvF2MvpTr8MKmuP0nmAxNcdevUuMQfItBTceGicAZjSEUjhSO8tNmqCftcAxf7dCchMEm9Rqi9jnalF4Rm2az7V/1G3xvWRKEJ6kU8IpfrwMelZF1MvbWzl7fmWA1jrQTnpLCBTjQKhDR5qg/YrisZH1MFlY7IM9JDwrQdwh0s0iVIJAQUutiqblZMOtWt17RB95F+defmn4KLg18n6gSQmoAJQZnmojVzgoPcbzu6Ojx9sV6D1L8cYwfUnqP/DtYGGXQAFJtWdbsV/tZCqkdaMeALb6HNYt5UG9Nvj4p2F7uKU0qrSx7ngFtGQof21HAFR1oKlDFv7xIsCQ6i07mL57viA== +
+
+ x-ms-client-session-id + 0480d9d6-fba5-499c-9101-be615831a763-2014-03-27 21:23:12Z +
+
+ x-ms-client-request-id + db490dac-66ae-4f62-a901-7f5b91956474-2014-03-27 21:23:35Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=Fw7SF+NlDq3BRiGsRB0z0w== +
+
+ + + .SQLSERVERMANAGEMENT + Fw7SF+NlDq3BRiGsRB0z0w== + + + + + <?xml version="1.0" encoding="utf-8" standalone="yes"?> + <entry xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom"> + <category scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" term="Microsoft.SqlServer.Management.Server.Domain.Database" /> + <title /> + <author> + <name /> + </author> + <updated>2014-03-27T21:23:47.2086351Z</updated> + <id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)</id> + <content type="application/xml"> + <m:properties> + <d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId> + <d:CollationName>Japanese_CI_AS</d:CollationName> + <d:CreationDate m:type="Edm.DateTime">2014-03-27T14:23:18.993</d:CreationDate> + <d:Edition m:null="true" /> + <d:Id m:type="Edm.Int32">5</d:Id> + <d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember> + <d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot> + <d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn> + <d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /> + <d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly> + <d:IsRecursiveTriggersOn m:type="Edm.Boolean" m:null="true" /> + <d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended> + <d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject> + <d:MaxSizeBytes m:type="Edm.Int64">104857600</d:MaxSizeBytes> + <d:MaxSizeGB m:type="Edm.Int32">5</d:MaxSizeGB> + <d:Name>testdb2</d:Name> + <d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /> + <d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /> + <d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /> + <d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /> + <d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /> + <d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-03-27T21:24:18.163Z</d:RecoveryPeriodStartDate> + <d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode> + <d:ServiceObjectiveAssignmentErrorDescription m:null="true" /> + <d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState> + <d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription> + <d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2014-03-27T21:23:22.663</d:ServiceObjectiveAssignmentSuccessDate> + <d:ServiceObjectiveId m:type="Edm.Guid" m:null="true" /> + <d:SizeMB m:type="Edm.Decimal">2.50</d:SizeMB> + <d:Status m:type="Edm.Int32">1</d:Status> + </m:properties> + </content> + </entry> + + application/atom+xml + application/atom+xml,application/xml +
+ + NoContent + +
+ x-ms-request-id + 58cb6722-dd9a-22e3-bf73-573b4bab14ca +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 1.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Thu, 27 Mar 2014 21:23:54 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 8 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases()?$filter=Name%20eq%20'testdb2'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + cKCGkC9gQd0lbuJSLFzOYqTRsN03tjWgiAT7xNL5fBg1OjqlDE/Y/e7QeGH0VTb4axc5INHivlRk8xvRJFYnJAZMTJ28CsMFqlEfQWKP4eDxiHLYQr0rK+HC/GnGrKulHDSmf2WmQTGk4GDJb4CM/xMCrNIMvQeeZ/yv5Vkk6OiKlsCpGhWkpytvz/HG0v/Krrg4hpbxuqjezota5i1igma35teNHwHiUEHWgN/DeyKbUPekk9Vn5IfBdG05JMbb4xrwgHOKCucwsSvTQK+SJP0TB7kDgnzm70mfbbkzuwvm7uxuzCJR0mFAAyn08j4Fv3ToraLpDPy9lxWV/2TN7H92yX1WvPek94Q7JC2ISujJGeUfeq+MFOrceERWhWu68zQEkrakxbV2CHRLLugP5t7XGhjjZzE2pTFaMTU5Fmn/JGqAN3VqfofR+VRjvF2MvpTr8MKmuP0nmAxNcdevUuMQfItBTceGicAZjSEUjhSO8tNmqCftcAxf7dCchMEm9Rqi9jnalF4Rm2az7V/1G3xvWRKEJ6kU8IpfrwMelZF1MvbWzl7fmWA1jrQTnpLCBTjQKhDR5qg/YrisZH1MFlY7IM9JDwrQdwh0s0iVIJAQUutiqblZMOtWt17RB95F+defmn4KLg18n6gSQmoAJQZnmojVzgoPcbzu6Ojx9sV6D1L8cYwfUnqP/DtYGGXQAFJtWdbsV/tZCqkdaMeALb6HNYt5UG9Nvj4p2F7uKU0qrSx7ngFtGQof21HAFR1oKlDFv7xIsCQ6i07mL57viA== +
+
+ x-ms-client-session-id + 0480d9d6-fba5-499c-9101-be615831a763-2014-03-27 21:23:12Z +
+
+ x-ms-client-request-id + db490dac-66ae-4f62-a901-7f5b91956474-2014-03-27 21:23:35Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=Fw7SF+NlDq3BRiGsRB0z0w== +
+
+ + + .SQLSERVERMANAGEMENT + Fw7SF+NlDq3BRiGsRB0z0w== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 58cb6722-dd9a-22e3-bf73-573b4bab14ca +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Thu, 27 Mar 2014 21:23:54 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2014-03-27T21:23:54Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(5)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(5)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(5)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(5)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(5)/DatabaseCopies" /><title /><updated>2014-03-27T21:23:54Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">5</d:Id><d:Name>testdb2</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2014-03-27T21:23:22.663</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">0</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">104857600</d:MaxSizeBytes><d:CollationName>Japanese_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2014-03-27T14:23:18.993</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-03-27T21:24:18.163Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">2.50</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry></feed> +
+
+ + 9 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + cKCGkC9gQd0lbuJSLFzOYqTRsN03tjWgiAT7xNL5fBg1OjqlDE/Y/e7QeGH0VTb4axc5INHivlRk8xvRJFYnJAZMTJ28CsMFqlEfQWKP4eDxiHLYQr0rK+HC/GnGrKulHDSmf2WmQTGk4GDJb4CM/xMCrNIMvQeeZ/yv5Vkk6OiKlsCpGhWkpytvz/HG0v/Krrg4hpbxuqjezota5i1igma35teNHwHiUEHWgN/DeyKbUPekk9Vn5IfBdG05JMbb4xrwgHOKCucwsSvTQK+SJP0TB7kDgnzm70mfbbkzuwvm7uxuzCJR0mFAAyn08j4Fv3ToraLpDPy9lxWV/2TN7H92yX1WvPek94Q7JC2ISujJGeUfeq+MFOrceERWhWu68zQEkrakxbV2CHRLLugP5t7XGhjjZzE2pTFaMTU5Fmn/JGqAN3VqfofR+VRjvF2MvpTr8MKmuP0nmAxNcdevUuMQfItBTceGicAZjSEUjhSO8tNmqCftcAxf7dCchMEm9Rqi9jnalF4Rm2az7V/1G3xvWRKEJ6kU8IpfrwMelZF1MvbWzl7fmWA1jrQTnpLCBTjQKhDR5qg/YrisZH1MFlY7IM9JDwrQdwh0s0iVIJAQUutiqblZMOtWt17RB95F+defmn4KLg18n6gSQmoAJQZnmojVzgoPcbzu6Ojx9sV6D1L8cYwfUnqP/DtYGGXQAFJtWdbsV/tZCqkdaMeALb6HNYt5UG9Nvj4p2F7uKU0qrSx7ngFtGQof21HAFR1oKlDFv7xIsCQ6i07mL57viA== +
+
+ x-ms-client-session-id + 0480d9d6-fba5-499c-9101-be615831a763-2014-03-27 21:23:12Z +
+
+ x-ms-client-request-id + db490dac-66ae-4f62-a901-7f5b91956474-2014-03-27 21:23:35Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=Fw7SF+NlDq3BRiGsRB0z0w== +
+
+ + + .SQLSERVERMANAGEMENT + Fw7SF+NlDq3BRiGsRB0z0w== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 58cb6722-dd9a-22e3-bf73-573b4bab14ca +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Thu, 27 Mar 2014 21:23:54 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2014-03-27T21:23:54Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Shared resource allocation.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+
+
+ + UnitTests.SetAzureSqlDatabaseNameWithSqlAuth + + + 0 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases()?$filter=Name%20eq%20'testdb1'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + KLox6UWR9iql/fIOujWeYIY+MPBFMa7C7DohGQR5iVdPjW58gHqa0HRj5JgYB6cK1RQVrTjf2E7rglM6qE7Q2bGqfzcJfjuYBsgPX/Cwuodyd280OfhWrNQ8KBke399/g7tSL+9FjudZXge2UA7QDaXNs4uovwWPClUtkHb0jgSkdZ8ldrPNcpKK770iXmMBaJaWyX21fy8oatuiyddYjk7FL81n81OUppcrzz0X+7PAL4pMNBbDHR8pEMPV1zcTHyyPTLkiJhfLzYCRayANADNoPKllIO+OXx/aphMU4fYWuDiobwqUV7m13gGFjHBcCYZYj0SLi2DlJFtXD5KTkBoaHYtevvZ5dDfszn6hntHmiC4QSouSGQprjb1fLjlm9r7PpFMrv0+5+8kwRVNNHWE1/Wd0uI+q3qrjHMA3UC3nuUxrmJg7HJssfTNzBRCqSM1WUwm+oY/Qb9sebMosbWEdCZX2MBC93sRE1kp9OZqCrWAGEoaK1UQbRkgR7mcH8h9Jrm3s5W08CjSygiBr4tnm4OIF0BjhbJQ8kAG1BKsvbCFksfpOyzSBvIxDuAbYM3Tv2ZjjI9ieeBcR8XyMSN48m9MpY5Q3hy2vBYqpUQO9VR1qZA37C1vmwzER8zrKR6XzVD8I6AIUtv50w7BfFBPdVT4OaTHEG0oplU/Ssr6TiZoW6vbz3ORTP/dTQNM2HFOzVvqR5AJ6GPiQ3Ya0O+fKgnu0IkCZYleTW9cjFZ3hFaTCYEAz8VIbHcAyhwTvFMD7gGjSjpJ1YRsIBZqNAw== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + c96db22f-63c6-4c50-a83f-40ed539e3a8f-2013-06-28 18:55:02Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=FDEv0iqmxXLWrQEJgZoDNQ== +
+
+ + + .SQLSERVERMANAGEMENT + FDEv0iqmxXLWrQEJgZoDNQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 408dcf77-68d3-de2d-47de-4b2b891b9f6e +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:55:02 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2013-06-28T18:55:02Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(4)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(4)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(4)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(4)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(4)/DatabaseCopies" /><title /><updated>2013-06-28T18:55:02Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">4</d:Id><d:Name>testdb1</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2013-06-28T18:55:01.64</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">1</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">1073741824</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2013-06-28T11:55:01.143</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2013-06-28T18:55:01.143Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /></m:properties></content></entry></feed> +
+
+ + 1 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + KLox6UWR9iql/fIOujWeYIY+MPBFMa7C7DohGQR5iVdPjW58gHqa0HRj5JgYB6cK1RQVrTjf2E7rglM6qE7Q2bGqfzcJfjuYBsgPX/Cwuodyd280OfhWrNQ8KBke399/g7tSL+9FjudZXge2UA7QDaXNs4uovwWPClUtkHb0jgSkdZ8ldrPNcpKK770iXmMBaJaWyX21fy8oatuiyddYjk7FL81n81OUppcrzz0X+7PAL4pMNBbDHR8pEMPV1zcTHyyPTLkiJhfLzYCRayANADNoPKllIO+OXx/aphMU4fYWuDiobwqUV7m13gGFjHBcCYZYj0SLi2DlJFtXD5KTkBoaHYtevvZ5dDfszn6hntHmiC4QSouSGQprjb1fLjlm9r7PpFMrv0+5+8kwRVNNHWE1/Wd0uI+q3qrjHMA3UC3nuUxrmJg7HJssfTNzBRCqSM1WUwm+oY/Qb9sebMosbWEdCZX2MBC93sRE1kp9OZqCrWAGEoaK1UQbRkgR7mcH8h9Jrm3s5W08CjSygiBr4tnm4OIF0BjhbJQ8kAG1BKsvbCFksfpOyzSBvIxDuAbYM3Tv2ZjjI9ieeBcR8XyMSN48m9MpY5Q3hy2vBYqpUQO9VR1qZA37C1vmwzER8zrKR6XzVD8I6AIUtv50w7BfFBPdVT4OaTHEG0oplU/Ssr6TiZoW6vbz3ORTP/dTQNM2HFOzVvqR5AJ6GPiQ3Ya0O+fKgnu0IkCZYleTW9cjFZ3hFaTCYEAz8VIbHcAyhwTvFMD7gGjSjpJ1YRsIBZqNAw== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + c96db22f-63c6-4c50-a83f-40ed539e3a8f-2013-06-28 18:55:02Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=FDEv0iqmxXLWrQEJgZoDNQ== +
+
+ + + .SQLSERVERMANAGEMENT + FDEv0iqmxXLWrQEJgZoDNQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 408dcf77-68d3-de2d-47de-4b2b891b9f6e +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:55:02 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2013-06-28T18:55:02Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Resource capacity is not reserved.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 2 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4) + MERGE + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + KLox6UWR9iql/fIOujWeYIY+MPBFMa7C7DohGQR5iVdPjW58gHqa0HRj5JgYB6cK1RQVrTjf2E7rglM6qE7Q2bGqfzcJfjuYBsgPX/Cwuodyd280OfhWrNQ8KBke399/g7tSL+9FjudZXge2UA7QDaXNs4uovwWPClUtkHb0jgSkdZ8ldrPNcpKK770iXmMBaJaWyX21fy8oatuiyddYjk7FL81n81OUppcrzz0X+7PAL4pMNBbDHR8pEMPV1zcTHyyPTLkiJhfLzYCRayANADNoPKllIO+OXx/aphMU4fYWuDiobwqUV7m13gGFjHBcCYZYj0SLi2DlJFtXD5KTkBoaHYtevvZ5dDfszn6hntHmiC4QSouSGQprjb1fLjlm9r7PpFMrv0+5+8kwRVNNHWE1/Wd0uI+q3qrjHMA3UC3nuUxrmJg7HJssfTNzBRCqSM1WUwm+oY/Qb9sebMosbWEdCZX2MBC93sRE1kp9OZqCrWAGEoaK1UQbRkgR7mcH8h9Jrm3s5W08CjSygiBr4tnm4OIF0BjhbJQ8kAG1BKsvbCFksfpOyzSBvIxDuAbYM3Tv2ZjjI9ieeBcR8XyMSN48m9MpY5Q3hy2vBYqpUQO9VR1qZA37C1vmwzER8zrKR6XzVD8I6AIUtv50w7BfFBPdVT4OaTHEG0oplU/Ssr6TiZoW6vbz3ORTP/dTQNM2HFOzVvqR5AJ6GPiQ3Ya0O+fKgnu0IkCZYleTW9cjFZ3hFaTCYEAz8VIbHcAyhwTvFMD7gGjSjpJ1YRsIBZqNAw== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + c96db22f-63c6-4c50-a83f-40ed539e3a8f-2013-06-28 18:55:02Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=FDEv0iqmxXLWrQEJgZoDNQ== +
+
+ + + .SQLSERVERMANAGEMENT + FDEv0iqmxXLWrQEJgZoDNQ== + + + + + <?xml version="1.0" encoding="utf-8" standalone="yes"?> + <entry xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom"> + <category scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" term="Microsoft.SqlServer.Management.Server.Domain.Database" /> + <title /> + <author> + <name /> + </author> + <updated>2013-06-28T18:55:02.489444Z</updated> + <id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)</id> + <content type="application/xml"> + <m:properties> + <d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId> + <d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName> + <d:CreationDate m:type="Edm.DateTime">2013-06-28T11:55:01.143</d:CreationDate> + <d:Edition m:null="true" /> + <d:Id m:type="Edm.Int32">4</d:Id> + <d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember> + <d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot> + <d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn> + <d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /> + <d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly> + <d:IsRecursiveTriggersOn m:type="Edm.Boolean" m:null="true" /> + <d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject> + <d:MaxSizeBytes m:type="Edm.Int64">1073741824</d:MaxSizeBytes> + <d:MaxSizeGB m:type="Edm.Int32" m:null="true" /> + <d:Name>new_testdb1</d:Name> + <d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /> + <d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /> + <d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /> + <d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /> + <d:RecoveryPeriodStartDate m:type="Edm.DateTime">2013-06-28T18:55:01.143Z</d:RecoveryPeriodStartDate> + <d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode> + <d:ServiceObjectiveAssignmentErrorDescription m:null="true" /> + <d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState> + <d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription> + <d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2013-06-28T18:55:01.64</d:ServiceObjectiveAssignmentSuccessDate> + <d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId> + <d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB> + <d:Status m:type="Edm.Int32">1</d:Status> + </m:properties> + </content> + </entry> + + application/atom+xml + application/atom+xml,application/xml +
+ + NoContent + +
+ x-ms-request-id + 408dcf77-68d3-de2d-47de-4b2b891b9f6e +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 1.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Fri, 28 Jun 2013 18:55:02 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 3 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases()?$filter=Name%20eq%20'new_testdb1'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + KLox6UWR9iql/fIOujWeYIY+MPBFMa7C7DohGQR5iVdPjW58gHqa0HRj5JgYB6cK1RQVrTjf2E7rglM6qE7Q2bGqfzcJfjuYBsgPX/Cwuodyd280OfhWrNQ8KBke399/g7tSL+9FjudZXge2UA7QDaXNs4uovwWPClUtkHb0jgSkdZ8ldrPNcpKK770iXmMBaJaWyX21fy8oatuiyddYjk7FL81n81OUppcrzz0X+7PAL4pMNBbDHR8pEMPV1zcTHyyPTLkiJhfLzYCRayANADNoPKllIO+OXx/aphMU4fYWuDiobwqUV7m13gGFjHBcCYZYj0SLi2DlJFtXD5KTkBoaHYtevvZ5dDfszn6hntHmiC4QSouSGQprjb1fLjlm9r7PpFMrv0+5+8kwRVNNHWE1/Wd0uI+q3qrjHMA3UC3nuUxrmJg7HJssfTNzBRCqSM1WUwm+oY/Qb9sebMosbWEdCZX2MBC93sRE1kp9OZqCrWAGEoaK1UQbRkgR7mcH8h9Jrm3s5W08CjSygiBr4tnm4OIF0BjhbJQ8kAG1BKsvbCFksfpOyzSBvIxDuAbYM3Tv2ZjjI9ieeBcR8XyMSN48m9MpY5Q3hy2vBYqpUQO9VR1qZA37C1vmwzER8zrKR6XzVD8I6AIUtv50w7BfFBPdVT4OaTHEG0oplU/Ssr6TiZoW6vbz3ORTP/dTQNM2HFOzVvqR5AJ6GPiQ3Ya0O+fKgnu0IkCZYleTW9cjFZ3hFaTCYEAz8VIbHcAyhwTvFMD7gGjSjpJ1YRsIBZqNAw== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + c96db22f-63c6-4c50-a83f-40ed539e3a8f-2013-06-28 18:55:02Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=FDEv0iqmxXLWrQEJgZoDNQ== +
+
+ + + .SQLSERVERMANAGEMENT + FDEv0iqmxXLWrQEJgZoDNQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 408dcf77-68d3-de2d-47de-4b2b891b9f6e +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:55:02 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2013-06-28T18:55:02Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(4)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(4)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(4)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(4)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(4)/DatabaseCopies" /><title /><updated>2013-06-28T18:55:02Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">4</d:Id><d:Name>new_testdb1</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2013-06-28T18:55:01.64</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">1</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">1073741824</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2013-06-28T11:55:02.643</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2013-06-28T18:55:02.643Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /></m:properties></content></entry></feed> +
+
+ + 4 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + KLox6UWR9iql/fIOujWeYIY+MPBFMa7C7DohGQR5iVdPjW58gHqa0HRj5JgYB6cK1RQVrTjf2E7rglM6qE7Q2bGqfzcJfjuYBsgPX/Cwuodyd280OfhWrNQ8KBke399/g7tSL+9FjudZXge2UA7QDaXNs4uovwWPClUtkHb0jgSkdZ8ldrPNcpKK770iXmMBaJaWyX21fy8oatuiyddYjk7FL81n81OUppcrzz0X+7PAL4pMNBbDHR8pEMPV1zcTHyyPTLkiJhfLzYCRayANADNoPKllIO+OXx/aphMU4fYWuDiobwqUV7m13gGFjHBcCYZYj0SLi2DlJFtXD5KTkBoaHYtevvZ5dDfszn6hntHmiC4QSouSGQprjb1fLjlm9r7PpFMrv0+5+8kwRVNNHWE1/Wd0uI+q3qrjHMA3UC3nuUxrmJg7HJssfTNzBRCqSM1WUwm+oY/Qb9sebMosbWEdCZX2MBC93sRE1kp9OZqCrWAGEoaK1UQbRkgR7mcH8h9Jrm3s5W08CjSygiBr4tnm4OIF0BjhbJQ8kAG1BKsvbCFksfpOyzSBvIxDuAbYM3Tv2ZjjI9ieeBcR8XyMSN48m9MpY5Q3hy2vBYqpUQO9VR1qZA37C1vmwzER8zrKR6XzVD8I6AIUtv50w7BfFBPdVT4OaTHEG0oplU/Ssr6TiZoW6vbz3ORTP/dTQNM2HFOzVvqR5AJ6GPiQ3Ya0O+fKgnu0IkCZYleTW9cjFZ3hFaTCYEAz8VIbHcAyhwTvFMD7gGjSjpJ1YRsIBZqNAw== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + c96db22f-63c6-4c50-a83f-40ed539e3a8f-2013-06-28 18:55:02Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=FDEv0iqmxXLWrQEJgZoDNQ== +
+
+ + + .SQLSERVERMANAGEMENT + FDEv0iqmxXLWrQEJgZoDNQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 408dcf77-68d3-de2d-47de-4b2b891b9f6e +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:55:02 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2013-06-28T18:55:02Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Resource capacity is not reserved.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 5 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases()?$filter=Name%20eq%20'new_testdb1'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + JyMfK+nzI2q03zqE/oKTJEb2QPL4/mELcifZnsXyAGWkGiyG3ZQxF1iGSzXVvLsKOolFFRNdkYEO7fJ6vuqJo9yrew0kZMxgtcjVxoW9dwPMlTejgUzNuAL8fNNC19yCipQ/0Xb2eT5OdzqNVUOs2rUDQm43/8liyyaE5uzDVBc3c19CM/S2M2NXrYYq0kxaTiXf0fh0i0C9yA/EiZPWtxFuMSw1XxN8ntqe90tihhAafpErvVWnmCgQ7L1UeVbsiAI5yuo6I0ZMjyS3AREJ2mGzhki4KuJcYpOhRXleZdhinbRHNr2o679N60zyHbax0kpMXhnsBhebZl8FYy6JfltwHrF7a67X11nOqqcrNsQgCXVexhsOJwsTe/nvt8pGrJqP2NFcMIlEevYv3WdYc21/G/YFkVuzvuXYdVsEE8esLNhRfBBwvO0cCe3ZA1IMfSJloj4Bdssa58I8QA+r44m0jlicqgH3m2k1YFnNUGh1Dhao7Le7WtVWUxUfFi/8UTFL0FQO77uUKJIIxuh5gA7+R0zFR8u0SR+VISw9OE16qeOEz7UP/RAoZpqI1jB05jm6K/osc1232CLQAttbc2b9593Dlo/fzDbcag1uL78SH9WoPGlN4Rhe6SppEMpjigUKTinawtdKZhqM6MEQf/O+Wjoj/CfgIYZynLCl6J7+Uc8InvAQ2hmDD1825UX+y7ssrWCihIQX3FhClbKtVJ6I0b39Byk6Tab+5hxkrhUGB9FwfHrJKvKri/MJOtk/TA+GjzwHcccm6mAnpUstkA== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + b9e398ab-ad83-4d31-a533-34286fac15a3-2013-06-28 18:55:02Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=AwuH5hPdp9QrcBsNHivNyg== +
+
+ + + .SQLSERVERMANAGEMENT + AwuH5hPdp9QrcBsNHivNyg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 7eac5e7b-62ce-7154-551e-be65439cd5dd +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:55:02 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2013-06-28T18:55:02Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(4)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(4)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(4)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(4)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(4)/DatabaseCopies" /><title /><updated>2013-06-28T18:55:02Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">4</d:Id><d:Name>new_testdb1</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2013-06-28T18:55:01.64</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">1</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">1073741824</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2013-06-28T11:55:02.643</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2013-06-28T18:55:02.643Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /></m:properties></content></entry></feed> +
+
+ + 6 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + JyMfK+nzI2q03zqE/oKTJEb2QPL4/mELcifZnsXyAGWkGiyG3ZQxF1iGSzXVvLsKOolFFRNdkYEO7fJ6vuqJo9yrew0kZMxgtcjVxoW9dwPMlTejgUzNuAL8fNNC19yCipQ/0Xb2eT5OdzqNVUOs2rUDQm43/8liyyaE5uzDVBc3c19CM/S2M2NXrYYq0kxaTiXf0fh0i0C9yA/EiZPWtxFuMSw1XxN8ntqe90tihhAafpErvVWnmCgQ7L1UeVbsiAI5yuo6I0ZMjyS3AREJ2mGzhki4KuJcYpOhRXleZdhinbRHNr2o679N60zyHbax0kpMXhnsBhebZl8FYy6JfltwHrF7a67X11nOqqcrNsQgCXVexhsOJwsTe/nvt8pGrJqP2NFcMIlEevYv3WdYc21/G/YFkVuzvuXYdVsEE8esLNhRfBBwvO0cCe3ZA1IMfSJloj4Bdssa58I8QA+r44m0jlicqgH3m2k1YFnNUGh1Dhao7Le7WtVWUxUfFi/8UTFL0FQO77uUKJIIxuh5gA7+R0zFR8u0SR+VISw9OE16qeOEz7UP/RAoZpqI1jB05jm6K/osc1232CLQAttbc2b9593Dlo/fzDbcag1uL78SH9WoPGlN4Rhe6SppEMpjigUKTinawtdKZhqM6MEQf/O+Wjoj/CfgIYZynLCl6J7+Uc8InvAQ2hmDD1825UX+y7ssrWCihIQX3FhClbKtVJ6I0b39Byk6Tab+5hxkrhUGB9FwfHrJKvKri/MJOtk/TA+GjzwHcccm6mAnpUstkA== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + b9e398ab-ad83-4d31-a533-34286fac15a3-2013-06-28 18:55:02Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=AwuH5hPdp9QrcBsNHivNyg== +
+
+ + + .SQLSERVERMANAGEMENT + AwuH5hPdp9QrcBsNHivNyg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 7eac5e7b-62ce-7154-551e-be65439cd5dd +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:55:02 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2013-06-28T18:55:02Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Resource capacity is not reserved.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 7 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4) + MERGE + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + JyMfK+nzI2q03zqE/oKTJEb2QPL4/mELcifZnsXyAGWkGiyG3ZQxF1iGSzXVvLsKOolFFRNdkYEO7fJ6vuqJo9yrew0kZMxgtcjVxoW9dwPMlTejgUzNuAL8fNNC19yCipQ/0Xb2eT5OdzqNVUOs2rUDQm43/8liyyaE5uzDVBc3c19CM/S2M2NXrYYq0kxaTiXf0fh0i0C9yA/EiZPWtxFuMSw1XxN8ntqe90tihhAafpErvVWnmCgQ7L1UeVbsiAI5yuo6I0ZMjyS3AREJ2mGzhki4KuJcYpOhRXleZdhinbRHNr2o679N60zyHbax0kpMXhnsBhebZl8FYy6JfltwHrF7a67X11nOqqcrNsQgCXVexhsOJwsTe/nvt8pGrJqP2NFcMIlEevYv3WdYc21/G/YFkVuzvuXYdVsEE8esLNhRfBBwvO0cCe3ZA1IMfSJloj4Bdssa58I8QA+r44m0jlicqgH3m2k1YFnNUGh1Dhao7Le7WtVWUxUfFi/8UTFL0FQO77uUKJIIxuh5gA7+R0zFR8u0SR+VISw9OE16qeOEz7UP/RAoZpqI1jB05jm6K/osc1232CLQAttbc2b9593Dlo/fzDbcag1uL78SH9WoPGlN4Rhe6SppEMpjigUKTinawtdKZhqM6MEQf/O+Wjoj/CfgIYZynLCl6J7+Uc8InvAQ2hmDD1825UX+y7ssrWCihIQX3FhClbKtVJ6I0b39Byk6Tab+5hxkrhUGB9FwfHrJKvKri/MJOtk/TA+GjzwHcccm6mAnpUstkA== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + b9e398ab-ad83-4d31-a533-34286fac15a3-2013-06-28 18:55:02Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=AwuH5hPdp9QrcBsNHivNyg== +
+
+ + + .SQLSERVERMANAGEMENT + AwuH5hPdp9QrcBsNHivNyg== + + + + + <?xml version="1.0" encoding="utf-8" standalone="yes"?> + <entry xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom"> + <category scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" term="Microsoft.SqlServer.Management.Server.Domain.Database" /> + <title /> + <author> + <name /> + </author> + <updated>2013-06-28T18:55:02.7664717Z</updated> + <id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)</id> + <content type="application/xml"> + <m:properties> + <d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId> + <d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName> + <d:CreationDate m:type="Edm.DateTime">2013-06-28T11:55:02.643</d:CreationDate> + <d:Edition m:null="true" /> + <d:Id m:type="Edm.Int32">4</d:Id> + <d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember> + <d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot> + <d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn> + <d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /> + <d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly> + <d:IsRecursiveTriggersOn m:type="Edm.Boolean" m:null="true" /> + <d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject> + <d:MaxSizeBytes m:type="Edm.Int64">1073741824</d:MaxSizeBytes> + <d:MaxSizeGB m:type="Edm.Int32" m:null="true" /> + <d:Name>testdb1</d:Name> + <d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /> + <d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /> + <d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /> + <d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /> + <d:RecoveryPeriodStartDate m:type="Edm.DateTime">2013-06-28T18:55:02.643Z</d:RecoveryPeriodStartDate> + <d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode> + <d:ServiceObjectiveAssignmentErrorDescription m:null="true" /> + <d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState> + <d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription> + <d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2013-06-28T18:55:01.64</d:ServiceObjectiveAssignmentSuccessDate> + <d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId> + <d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB> + <d:Status m:type="Edm.Int32">1</d:Status> + </m:properties> + </content> + </entry> + + application/atom+xml + application/atom+xml,application/xml +
+ + NoContent + +
+ x-ms-request-id + 7eac5e7b-62ce-7154-551e-be65439cd5dd +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 1.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Fri, 28 Jun 2013 18:55:02 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 8 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases()?$filter=Name%20eq%20'testdb1'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + JyMfK+nzI2q03zqE/oKTJEb2QPL4/mELcifZnsXyAGWkGiyG3ZQxF1iGSzXVvLsKOolFFRNdkYEO7fJ6vuqJo9yrew0kZMxgtcjVxoW9dwPMlTejgUzNuAL8fNNC19yCipQ/0Xb2eT5OdzqNVUOs2rUDQm43/8liyyaE5uzDVBc3c19CM/S2M2NXrYYq0kxaTiXf0fh0i0C9yA/EiZPWtxFuMSw1XxN8ntqe90tihhAafpErvVWnmCgQ7L1UeVbsiAI5yuo6I0ZMjyS3AREJ2mGzhki4KuJcYpOhRXleZdhinbRHNr2o679N60zyHbax0kpMXhnsBhebZl8FYy6JfltwHrF7a67X11nOqqcrNsQgCXVexhsOJwsTe/nvt8pGrJqP2NFcMIlEevYv3WdYc21/G/YFkVuzvuXYdVsEE8esLNhRfBBwvO0cCe3ZA1IMfSJloj4Bdssa58I8QA+r44m0jlicqgH3m2k1YFnNUGh1Dhao7Le7WtVWUxUfFi/8UTFL0FQO77uUKJIIxuh5gA7+R0zFR8u0SR+VISw9OE16qeOEz7UP/RAoZpqI1jB05jm6K/osc1232CLQAttbc2b9593Dlo/fzDbcag1uL78SH9WoPGlN4Rhe6SppEMpjigUKTinawtdKZhqM6MEQf/O+Wjoj/CfgIYZynLCl6J7+Uc8InvAQ2hmDD1825UX+y7ssrWCihIQX3FhClbKtVJ6I0b39Byk6Tab+5hxkrhUGB9FwfHrJKvKri/MJOtk/TA+GjzwHcccm6mAnpUstkA== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + b9e398ab-ad83-4d31-a533-34286fac15a3-2013-06-28 18:55:02Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=AwuH5hPdp9QrcBsNHivNyg== +
+
+ + + .SQLSERVERMANAGEMENT + AwuH5hPdp9QrcBsNHivNyg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 7eac5e7b-62ce-7154-551e-be65439cd5dd +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:55:02 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2013-06-28T18:55:03Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(4)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(4)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(4)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(4)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(4)/DatabaseCopies" /><title /><updated>2013-06-28T18:55:03Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">4</d:Id><d:Name>testdb1</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2013-06-28T18:55:01.64</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">1</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">1073741824</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2013-06-28T11:55:03.02</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2013-06-28T18:55:03.02Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /></m:properties></content></entry></feed> +
+
+ + 9 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + JyMfK+nzI2q03zqE/oKTJEb2QPL4/mELcifZnsXyAGWkGiyG3ZQxF1iGSzXVvLsKOolFFRNdkYEO7fJ6vuqJo9yrew0kZMxgtcjVxoW9dwPMlTejgUzNuAL8fNNC19yCipQ/0Xb2eT5OdzqNVUOs2rUDQm43/8liyyaE5uzDVBc3c19CM/S2M2NXrYYq0kxaTiXf0fh0i0C9yA/EiZPWtxFuMSw1XxN8ntqe90tihhAafpErvVWnmCgQ7L1UeVbsiAI5yuo6I0ZMjyS3AREJ2mGzhki4KuJcYpOhRXleZdhinbRHNr2o679N60zyHbax0kpMXhnsBhebZl8FYy6JfltwHrF7a67X11nOqqcrNsQgCXVexhsOJwsTe/nvt8pGrJqP2NFcMIlEevYv3WdYc21/G/YFkVuzvuXYdVsEE8esLNhRfBBwvO0cCe3ZA1IMfSJloj4Bdssa58I8QA+r44m0jlicqgH3m2k1YFnNUGh1Dhao7Le7WtVWUxUfFi/8UTFL0FQO77uUKJIIxuh5gA7+R0zFR8u0SR+VISw9OE16qeOEz7UP/RAoZpqI1jB05jm6K/osc1232CLQAttbc2b9593Dlo/fzDbcag1uL78SH9WoPGlN4Rhe6SppEMpjigUKTinawtdKZhqM6MEQf/O+Wjoj/CfgIYZynLCl6J7+Uc8InvAQ2hmDD1825UX+y7ssrWCihIQX3FhClbKtVJ6I0b39Byk6Tab+5hxkrhUGB9FwfHrJKvKri/MJOtk/TA+GjzwHcccm6mAnpUstkA== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + b9e398ab-ad83-4d31-a533-34286fac15a3-2013-06-28 18:55:02Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=AwuH5hPdp9QrcBsNHivNyg== +
+
+ + + .SQLSERVERMANAGEMENT + AwuH5hPdp9QrcBsNHivNyg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 7eac5e7b-62ce-7154-551e-be65439cd5dd +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:55:02 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2013-06-28T18:55:03Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Resource capacity is not reserved.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+
+
+ + UnitTests.RemoveAzureSqlDatabaseWithSqlAuth + + + 0 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases()?$filter=Name%20eq%20'testdb1'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + fQGMxP5SDnErxNovYtnMDo8chncReUKubGa0/kxD81Z7orj3z+e3KBeYofUmW+jB2VLqEfGlB3xp7neyJcvDv5JVrrpnfdCS3CQMNlh+nbbETLh9AixFkq1p3Zgp3ISn3riFaEFrEbONMIZOtXmWzK7u4F6rniX3oMQuAjhKfIpItO951184bPazRs81q0FspcSrylZVdYzFEszfxD02qzTeYhaVgMRr7BlRa+12Bo6KqRVw8AYDxXsS9TvlIqxjCBEBDJk96NMF8/hZ0ups75p2cXtCacqIW5NfsvxgOD7SswZzSdw1pGQ3s3MxcX+mp1bs/L4hkEt7hHfUfzqremcE4Lu56BPYshXCRetsPg0/Gu0zVl5rDT/PMX+qgLJV4+tBQ6vMi46zJTobBCZ4c1AjWugquvTTSoz8v1iseOOpEB1pPaeuU7SULhBfPF4c5ZLkbY3Mh2QnVh/wQZpRMlyuMpsj1rUUz00ICiI9jR/i/1pjMVcy0CoFZ+/zGWDLtZNUEwnoKULUv7PPOq0RKMZVxJll0A1uWUaJaVkAbMhiT1Ad4W0D4rWOU5u+ATYQ3GyMIDjn2KXCkKFvgj65TZuqqkHVozkwG3wVPsgNr1YM+R0E9c5Y7iSn33d9GWuifo4akZK8az8EfaEXagcR5JN8fF+RdNxaoFFgXU7Jj3eCyzaCeOTT39ocbAsGidunfD8DMVw8C2sPeO1zhqzTV+tnOUNr9vWpJKEs5PXPZMmzLrajenrDdG0qCLDIG5ZvZ0szU8Vws5tmwAkILci18Q== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 6438cb8d-624c-4c36-8c37-c678975d8796-2013-06-28 18:54:42Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=gOO9h7z/3hTTirlRTLLSLQ== +
+
+ + + .SQLSERVERMANAGEMENT + gOO9h7z/3hTTirlRTLLSLQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + b82136a9-9358-ffeb-2894-7ac5fda435d7 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:42 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2013-06-28T18:54:42Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(4)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(4)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(4)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(4)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(4)/DatabaseCopies" /><title /><updated>2013-06-28T18:54:42Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">4</d:Id><d:Name>testdb1</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2013-06-28T18:54:42.32</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">1</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">1073741824</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2013-06-28T11:54:41.81</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2013-06-28T18:54:41.81Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /></m:properties></content></entry></feed> +
+
+ + 1 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + fQGMxP5SDnErxNovYtnMDo8chncReUKubGa0/kxD81Z7orj3z+e3KBeYofUmW+jB2VLqEfGlB3xp7neyJcvDv5JVrrpnfdCS3CQMNlh+nbbETLh9AixFkq1p3Zgp3ISn3riFaEFrEbONMIZOtXmWzK7u4F6rniX3oMQuAjhKfIpItO951184bPazRs81q0FspcSrylZVdYzFEszfxD02qzTeYhaVgMRr7BlRa+12Bo6KqRVw8AYDxXsS9TvlIqxjCBEBDJk96NMF8/hZ0ups75p2cXtCacqIW5NfsvxgOD7SswZzSdw1pGQ3s3MxcX+mp1bs/L4hkEt7hHfUfzqremcE4Lu56BPYshXCRetsPg0/Gu0zVl5rDT/PMX+qgLJV4+tBQ6vMi46zJTobBCZ4c1AjWugquvTTSoz8v1iseOOpEB1pPaeuU7SULhBfPF4c5ZLkbY3Mh2QnVh/wQZpRMlyuMpsj1rUUz00ICiI9jR/i/1pjMVcy0CoFZ+/zGWDLtZNUEwnoKULUv7PPOq0RKMZVxJll0A1uWUaJaVkAbMhiT1Ad4W0D4rWOU5u+ATYQ3GyMIDjn2KXCkKFvgj65TZuqqkHVozkwG3wVPsgNr1YM+R0E9c5Y7iSn33d9GWuifo4akZK8az8EfaEXagcR5JN8fF+RdNxaoFFgXU7Jj3eCyzaCeOTT39ocbAsGidunfD8DMVw8C2sPeO1zhqzTV+tnOUNr9vWpJKEs5PXPZMmzLrajenrDdG0qCLDIG5ZvZ0szU8Vws5tmwAkILci18Q== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 6438cb8d-624c-4c36-8c37-c678975d8796-2013-06-28 18:54:42Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=gOO9h7z/3hTTirlRTLLSLQ== +
+
+ + + .SQLSERVERMANAGEMENT + gOO9h7z/3hTTirlRTLLSLQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + b82136a9-9358-ffeb-2894-7ac5fda435d7 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:42 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2013-06-28T18:54:42Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Resource capacity is not reserved.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 2 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4) + DELETE + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + fQGMxP5SDnErxNovYtnMDo8chncReUKubGa0/kxD81Z7orj3z+e3KBeYofUmW+jB2VLqEfGlB3xp7neyJcvDv5JVrrpnfdCS3CQMNlh+nbbETLh9AixFkq1p3Zgp3ISn3riFaEFrEbONMIZOtXmWzK7u4F6rniX3oMQuAjhKfIpItO951184bPazRs81q0FspcSrylZVdYzFEszfxD02qzTeYhaVgMRr7BlRa+12Bo6KqRVw8AYDxXsS9TvlIqxjCBEBDJk96NMF8/hZ0ups75p2cXtCacqIW5NfsvxgOD7SswZzSdw1pGQ3s3MxcX+mp1bs/L4hkEt7hHfUfzqremcE4Lu56BPYshXCRetsPg0/Gu0zVl5rDT/PMX+qgLJV4+tBQ6vMi46zJTobBCZ4c1AjWugquvTTSoz8v1iseOOpEB1pPaeuU7SULhBfPF4c5ZLkbY3Mh2QnVh/wQZpRMlyuMpsj1rUUz00ICiI9jR/i/1pjMVcy0CoFZ+/zGWDLtZNUEwnoKULUv7PPOq0RKMZVxJll0A1uWUaJaVkAbMhiT1Ad4W0D4rWOU5u+ATYQ3GyMIDjn2KXCkKFvgj65TZuqqkHVozkwG3wVPsgNr1YM+R0E9c5Y7iSn33d9GWuifo4akZK8az8EfaEXagcR5JN8fF+RdNxaoFFgXU7Jj3eCyzaCeOTT39ocbAsGidunfD8DMVw8C2sPeO1zhqzTV+tnOUNr9vWpJKEs5PXPZMmzLrajenrDdG0qCLDIG5ZvZ0szU8Vws5tmwAkILci18Q== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 6438cb8d-624c-4c36-8c37-c678975d8796-2013-06-28 18:54:42Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=gOO9h7z/3hTTirlRTLLSLQ== +
+
+ + + .SQLSERVERMANAGEMENT + gOO9h7z/3hTTirlRTLLSLQ== + + + + + application/atom+xml + application/atom+xml,application/xml +
+ + NoContent + +
+ x-ms-request-id + b82136a9-9358-ffeb-2894-7ac5fda435d7 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 1.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Fri, 28 Jun 2013 18:54:42 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 3 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases()?$filter=Name%20eq%20'testdb2'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + fQGMxP5SDnErxNovYtnMDo8chncReUKubGa0/kxD81Z7orj3z+e3KBeYofUmW+jB2VLqEfGlB3xp7neyJcvDv5JVrrpnfdCS3CQMNlh+nbbETLh9AixFkq1p3Zgp3ISn3riFaEFrEbONMIZOtXmWzK7u4F6rniX3oMQuAjhKfIpItO951184bPazRs81q0FspcSrylZVdYzFEszfxD02qzTeYhaVgMRr7BlRa+12Bo6KqRVw8AYDxXsS9TvlIqxjCBEBDJk96NMF8/hZ0ups75p2cXtCacqIW5NfsvxgOD7SswZzSdw1pGQ3s3MxcX+mp1bs/L4hkEt7hHfUfzqremcE4Lu56BPYshXCRetsPg0/Gu0zVl5rDT/PMX+qgLJV4+tBQ6vMi46zJTobBCZ4c1AjWugquvTTSoz8v1iseOOpEB1pPaeuU7SULhBfPF4c5ZLkbY3Mh2QnVh/wQZpRMlyuMpsj1rUUz00ICiI9jR/i/1pjMVcy0CoFZ+/zGWDLtZNUEwnoKULUv7PPOq0RKMZVxJll0A1uWUaJaVkAbMhiT1Ad4W0D4rWOU5u+ATYQ3GyMIDjn2KXCkKFvgj65TZuqqkHVozkwG3wVPsgNr1YM+R0E9c5Y7iSn33d9GWuifo4akZK8az8EfaEXagcR5JN8fF+RdNxaoFFgXU7Jj3eCyzaCeOTT39ocbAsGidunfD8DMVw8C2sPeO1zhqzTV+tnOUNr9vWpJKEs5PXPZMmzLrajenrDdG0qCLDIG5ZvZ0szU8Vws5tmwAkILci18Q== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 6438cb8d-624c-4c36-8c37-c678975d8796-2013-06-28 18:54:42Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=gOO9h7z/3hTTirlRTLLSLQ== +
+
+ + + .SQLSERVERMANAGEMENT + gOO9h7z/3hTTirlRTLLSLQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + b82136a9-9358-ffeb-2894-7ac5fda435d7 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:42 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2013-06-28T18:54:43Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(5)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(5)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(5)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(5)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(5)/DatabaseCopies" /><title /><updated>2013-06-28T18:54:43Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">5</d:Id><d:Name>testdb2</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2013-06-28T18:54:42.887</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">5</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">5368709120</d:MaxSizeBytes><d:CollationName>Japanese_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2013-06-28T11:54:42.497</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2013-06-28T18:54:42.497Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /></m:properties></content></entry></feed> +
+
+ + 4 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + fQGMxP5SDnErxNovYtnMDo8chncReUKubGa0/kxD81Z7orj3z+e3KBeYofUmW+jB2VLqEfGlB3xp7neyJcvDv5JVrrpnfdCS3CQMNlh+nbbETLh9AixFkq1p3Zgp3ISn3riFaEFrEbONMIZOtXmWzK7u4F6rniX3oMQuAjhKfIpItO951184bPazRs81q0FspcSrylZVdYzFEszfxD02qzTeYhaVgMRr7BlRa+12Bo6KqRVw8AYDxXsS9TvlIqxjCBEBDJk96NMF8/hZ0ups75p2cXtCacqIW5NfsvxgOD7SswZzSdw1pGQ3s3MxcX+mp1bs/L4hkEt7hHfUfzqremcE4Lu56BPYshXCRetsPg0/Gu0zVl5rDT/PMX+qgLJV4+tBQ6vMi46zJTobBCZ4c1AjWugquvTTSoz8v1iseOOpEB1pPaeuU7SULhBfPF4c5ZLkbY3Mh2QnVh/wQZpRMlyuMpsj1rUUz00ICiI9jR/i/1pjMVcy0CoFZ+/zGWDLtZNUEwnoKULUv7PPOq0RKMZVxJll0A1uWUaJaVkAbMhiT1Ad4W0D4rWOU5u+ATYQ3GyMIDjn2KXCkKFvgj65TZuqqkHVozkwG3wVPsgNr1YM+R0E9c5Y7iSn33d9GWuifo4akZK8az8EfaEXagcR5JN8fF+RdNxaoFFgXU7Jj3eCyzaCeOTT39ocbAsGidunfD8DMVw8C2sPeO1zhqzTV+tnOUNr9vWpJKEs5PXPZMmzLrajenrDdG0qCLDIG5ZvZ0szU8Vws5tmwAkILci18Q== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 6438cb8d-624c-4c36-8c37-c678975d8796-2013-06-28 18:54:42Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=gOO9h7z/3hTTirlRTLLSLQ== +
+
+ + + .SQLSERVERMANAGEMENT + gOO9h7z/3hTTirlRTLLSLQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + b82136a9-9358-ffeb-2894-7ac5fda435d7 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:42 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2013-06-28T18:54:43Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Resource capacity is not reserved.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 5 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5) + DELETE + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + fQGMxP5SDnErxNovYtnMDo8chncReUKubGa0/kxD81Z7orj3z+e3KBeYofUmW+jB2VLqEfGlB3xp7neyJcvDv5JVrrpnfdCS3CQMNlh+nbbETLh9AixFkq1p3Zgp3ISn3riFaEFrEbONMIZOtXmWzK7u4F6rniX3oMQuAjhKfIpItO951184bPazRs81q0FspcSrylZVdYzFEszfxD02qzTeYhaVgMRr7BlRa+12Bo6KqRVw8AYDxXsS9TvlIqxjCBEBDJk96NMF8/hZ0ups75p2cXtCacqIW5NfsvxgOD7SswZzSdw1pGQ3s3MxcX+mp1bs/L4hkEt7hHfUfzqremcE4Lu56BPYshXCRetsPg0/Gu0zVl5rDT/PMX+qgLJV4+tBQ6vMi46zJTobBCZ4c1AjWugquvTTSoz8v1iseOOpEB1pPaeuU7SULhBfPF4c5ZLkbY3Mh2QnVh/wQZpRMlyuMpsj1rUUz00ICiI9jR/i/1pjMVcy0CoFZ+/zGWDLtZNUEwnoKULUv7PPOq0RKMZVxJll0A1uWUaJaVkAbMhiT1Ad4W0D4rWOU5u+ATYQ3GyMIDjn2KXCkKFvgj65TZuqqkHVozkwG3wVPsgNr1YM+R0E9c5Y7iSn33d9GWuifo4akZK8az8EfaEXagcR5JN8fF+RdNxaoFFgXU7Jj3eCyzaCeOTT39ocbAsGidunfD8DMVw8C2sPeO1zhqzTV+tnOUNr9vWpJKEs5PXPZMmzLrajenrDdG0qCLDIG5ZvZ0szU8Vws5tmwAkILci18Q== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 6438cb8d-624c-4c36-8c37-c678975d8796-2013-06-28 18:54:42Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=gOO9h7z/3hTTirlRTLLSLQ== +
+
+ + + .SQLSERVERMANAGEMENT + gOO9h7z/3hTTirlRTLLSLQ== + + + + + application/atom+xml + application/atom+xml,application/xml +
+ + NoContent + +
+ x-ms-request-id + b82136a9-9358-ffeb-2894-7ac5fda435d7 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 1.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Fri, 28 Jun 2013 18:54:42 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 6 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + fQGMxP5SDnErxNovYtnMDo8chncReUKubGa0/kxD81Z7orj3z+e3KBeYofUmW+jB2VLqEfGlB3xp7neyJcvDv5JVrrpnfdCS3CQMNlh+nbbETLh9AixFkq1p3Zgp3ISn3riFaEFrEbONMIZOtXmWzK7u4F6rniX3oMQuAjhKfIpItO951184bPazRs81q0FspcSrylZVdYzFEszfxD02qzTeYhaVgMRr7BlRa+12Bo6KqRVw8AYDxXsS9TvlIqxjCBEBDJk96NMF8/hZ0ups75p2cXtCacqIW5NfsvxgOD7SswZzSdw1pGQ3s3MxcX+mp1bs/L4hkEt7hHfUfzqremcE4Lu56BPYshXCRetsPg0/Gu0zVl5rDT/PMX+qgLJV4+tBQ6vMi46zJTobBCZ4c1AjWugquvTTSoz8v1iseOOpEB1pPaeuU7SULhBfPF4c5ZLkbY3Mh2QnVh/wQZpRMlyuMpsj1rUUz00ICiI9jR/i/1pjMVcy0CoFZ+/zGWDLtZNUEwnoKULUv7PPOq0RKMZVxJll0A1uWUaJaVkAbMhiT1Ad4W0D4rWOU5u+ATYQ3GyMIDjn2KXCkKFvgj65TZuqqkHVozkwG3wVPsgNr1YM+R0E9c5Y7iSn33d9GWuifo4akZK8az8EfaEXagcR5JN8fF+RdNxaoFFgXU7Jj3eCyzaCeOTT39ocbAsGidunfD8DMVw8C2sPeO1zhqzTV+tnOUNr9vWpJKEs5PXPZMmzLrajenrDdG0qCLDIG5ZvZ0szU8Vws5tmwAkILci18Q== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 6438cb8d-624c-4c36-8c37-c678975d8796-2013-06-28 18:54:42Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=gOO9h7z/3hTTirlRTLLSLQ== +
+
+ + + .SQLSERVERMANAGEMENT + gOO9h7z/3hTTirlRTLLSLQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + b82136a9-9358-ffeb-2894-7ac5fda435d7 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:42 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2013-06-28T18:54:43Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(1)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(1)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(1)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(1)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(1)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(1)/DatabaseCopies" /><title /><updated>2013-06-28T18:54:43Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">1</d:Id><d:Name>master</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">a45fea0c-e63c-4bf0-9f81-9964c86b7d2a</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">a45fea0c-e63c-4bf0-9f81-9964c86b7d2a</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2013-06-28T18:38:34.18</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">5</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">5368709120</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2013-06-28T11:38:32.23</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2013-06-28T18:38:32.23Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">true</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /></m:properties></content></entry></feed> +
+
+ + 7 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(1)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + fQGMxP5SDnErxNovYtnMDo8chncReUKubGa0/kxD81Z7orj3z+e3KBeYofUmW+jB2VLqEfGlB3xp7neyJcvDv5JVrrpnfdCS3CQMNlh+nbbETLh9AixFkq1p3Zgp3ISn3riFaEFrEbONMIZOtXmWzK7u4F6rniX3oMQuAjhKfIpItO951184bPazRs81q0FspcSrylZVdYzFEszfxD02qzTeYhaVgMRr7BlRa+12Bo6KqRVw8AYDxXsS9TvlIqxjCBEBDJk96NMF8/hZ0ups75p2cXtCacqIW5NfsvxgOD7SswZzSdw1pGQ3s3MxcX+mp1bs/L4hkEt7hHfUfzqremcE4Lu56BPYshXCRetsPg0/Gu0zVl5rDT/PMX+qgLJV4+tBQ6vMi46zJTobBCZ4c1AjWugquvTTSoz8v1iseOOpEB1pPaeuU7SULhBfPF4c5ZLkbY3Mh2QnVh/wQZpRMlyuMpsj1rUUz00ICiI9jR/i/1pjMVcy0CoFZ+/zGWDLtZNUEwnoKULUv7PPOq0RKMZVxJll0A1uWUaJaVkAbMhiT1Ad4W0D4rWOU5u+ATYQ3GyMIDjn2KXCkKFvgj65TZuqqkHVozkwG3wVPsgNr1YM+R0E9c5Y7iSn33d9GWuifo4akZK8az8EfaEXagcR5JN8fF+RdNxaoFFgXU7Jj3eCyzaCeOTT39ocbAsGidunfD8DMVw8C2sPeO1zhqzTV+tnOUNr9vWpJKEs5PXPZMmzLrajenrDdG0qCLDIG5ZvZ0szU8Vws5tmwAkILci18Q== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 6438cb8d-624c-4c36-8c37-c678975d8796-2013-06-28 18:54:42Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=gOO9h7z/3hTTirlRTLLSLQ== +
+
+ + + .SQLSERVERMANAGEMENT + gOO9h7z/3hTTirlRTLLSLQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + b82136a9-9358-ffeb-2894-7ac5fda435d7 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:42 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'a45fea0c-e63c-4bf0-9f81-9964c86b7d2a')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'a45fea0c-e63c-4bf0-9f81-9964c86b7d2a')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'a45fea0c-e63c-4bf0-9f81-9964c86b7d2a')/DimensionSettings" /><title /><updated>2013-06-28T18:54:43Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">a45fea0c-e63c-4bf0-9f81-9964c86b7d2a</d:Id><d:Name>System Standard</d:Name><d:Description>Used for master database only.</d:Description><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault><d:IsSystem m:type="Edm.Boolean">true</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+
+
+ + UnitTest.NewAzureSqlDatabaseWithSqlAuthDuplicateName + + + 0 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases + POST + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + ey3pQF8wAhDkJfIoxRUY4I6zDxANM1ft9hjc9mHZuN3boa3GasoRdJ3U9oZiu84es+KwQuQROG92vtyWYb67wPYmmU0X+RM66eh9j+CWRiuXZwDDwa7/EhiAyUqEJw5IjVzP/B0f8d7qgE54H24+M+FEquPXiSApj53S0cdFgdrr+GFxnL4ODVarGnvfq0kAJOwrp2kLkSwiFnPxPE4nN7Ko2+3jIWMW9pWEN/54Rr91QO6k5bob+IgcaZa+gjKKCIu8G+oLEuWUp96K0RD7H7LcpXimVOHqdp71E6qq3tiFOwiA8hBsS7zpq/YJEOxNoVLShnsiAUFI/WSGR8DSkgj0J4NDjKrmyDb4i44WeCaSFMaBDx2rKmbQGK1PX9X49Rxscdg6h4/CYVzyms3htMYOumNjVJaMGLBOZcOZs4N/6j0qYXzWKrDw0JWT713E4i+DcHrtsbOYFR0HcLerUav5y1iUtUnmX93pBv0FGjKAwAjoaA+D7UVTT7zZSO3mpLOCFUEOpp6hGVi/Di/cVvYijK5WMBBeyr+Dmh1eKAf5NkRUFRtqSpsEYAHTam4VigBGblWqLBxT79e38rT95jaM4234Fgyhuu862PNKDTPoyDQIzEm5y1sK8ljyNc2jrvHj7vTUl/Org5MBYglG0UNJ8Nk51uP/sOFb2DyqKkC/X4HXPZwYgomuH9FADrd+5r/G325Tm8OWkhAin66wal7hivfHNB+SE2EnD0Nk6VOKS0cL2KOK6mN1WiEv9+o6Z4So4e56/948N0/CzSjMJQ== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + f7ed848a-e12e-4114-9e45-a844acc9285e-2013-06-28 18:54:48Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=8VRcnXhAD7kxrKFy+gDIag== +
+
+ + + .SQLSERVERMANAGEMENT + 8VRcnXhAD7kxrKFy+gDIag== + + + + + <?xml version="1.0" encoding="utf-8" standalone="yes"?> + <entry xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom"> + <title /> + <author> + <name /> + </author> + <updated>2013-06-28T18:54:48.3790331Z</updated> + <id /> + <content type="application/xml"> + <m:properties> + <d:AssignedServiceObjectiveId m:type="Edm.Guid" m:null="true" /> + <d:CollationName m:null="true" /> + <d:CreationDate m:type="Edm.DateTime">0001-01-01T00:00:00</d:CreationDate> + <d:Edition m:null="true" /> + <d:Id m:type="Edm.Int32">0</d:Id> + <d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember> + <d:IsFederationRoot m:type="Edm.Boolean" m:null="true" /> + <d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn> + <d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /> + <d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly> + <d:IsRecursiveTriggersOn m:type="Edm.Boolean" m:null="true" /> + <d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject> + <d:MaxSizeBytes m:type="Edm.Int64" m:null="true" /> + <d:MaxSizeGB m:type="Edm.Int32" m:null="true" /> + <d:Name>testdb1</d:Name> + <d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /> + <d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /> + <d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /> + <d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /> + <d:RecoveryPeriodStartDate m:type="Edm.DateTime" m:null="true" /> + <d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32" m:null="true" /> + <d:ServiceObjectiveAssignmentErrorDescription m:null="true" /> + <d:ServiceObjectiveAssignmentState m:type="Edm.Byte" m:null="true" /> + <d:ServiceObjectiveAssignmentStateDescription m:null="true" /> + <d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime" m:null="true" /> + <d:ServiceObjectiveId m:type="Edm.Guid" m:null="true" /> + <d:SizeMB m:type="Edm.Decimal">0</d:SizeMB> + <d:Status m:type="Edm.Int32">0</d:Status> + </m:properties> + </content> + </entry> + + application/atom+xml + application/atom+xml,application/xml +
+ + Conflict + +
+ x-ms-request-id + 7fe211db-7d68-bbeb-4a6c-859edabe1273 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 1.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:48 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><m:code>Conflict:7fe211db-7d68-bbeb-4a6c-859edabe1273[Microsoft.SqlServer.MessageId=1801,Microsoft.SqlServer.MessageSeverity=16,Microsoft.SqlServer.MessageText=Database 'testdb1' already exists. Choose a different database name.]</m:code><m:message xml:lang="en-US">Database 'testdb1' already exists. Choose a different database name.</m:message></m:error> +
+
+
+
+ + UnitTests.GetAzureSqlDatabaseWithSqlAuthNonExistentDb + + + 0 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases()?$filter=Name%20eq%20'testdb3'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + gBKeUK9OhB/OTn4owTKjEvLM2ILDQKMKekH2q/CV8/bihefU1LGiOvFkJvljeL1gl8LDIMp0UmKInhTNh+iRJh8bG1UPqmE6Wq00kUcaDfWg8o2Y2w8c40rHOkuCnIecggvwaxKBVPgMgYyDh3frYmc0qN3BIrircuBCepCg8OGvX46pPPQJR1fNHtbGQWE3ScACzti4T65LtDpw5I4Si0nazFLfxvMNI+fa8pYVFyG+ediH2uYDw76wKoody22JEZOGbguTWIOUSOq3pJWJcnmnNyyDUe1ydt9K/fe6a5y82WC0A1/GAn3Ylgp3kDQJ+c5ZnYWOxbfyt/ZD6Su/JyGrh3BZj45VxUs5b/WJLSWBzTQCAMa/V4RwMCW9wlMahTKa6DYpa9OCftMkPuEaowq65espv1oZZIvR5VHFui2+a/Iij411lcH1Zpft3u4usG4by+1Qnerbhv/QoNSVmLF+U8KNqtpTW/NHG0j+sUvOy7PQf/1+VbNvFzAR/G9uRNy52XerJ1N45BtUfwPlSwQ0dYJNkWnjm/wG2V90iXhTyITTE5TbIIddHD95T9iWrR9F5S5ap7zz83Vcj4xFELC/eE6phEN+C2ouxR1PVu4JtPWakcl8NRVVSLWuGeTAh5GTL8fhEieDABojX+R0IEKbJJjiiYeEeqFPdYzVZtipInPxYhiuz1d9P23QIYpA/Y9isPqSPm3B0UUDj/a/TvX0ORi2cvT99s9MqgcPZiVMgKerg3XbJnPFTVWY2N9aS7lWIvDQ0Jw8DrJZ3pia2Q== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + d766f0ed-ffe5-48b8-9cff-dda69be170e6-2013-06-28 18:54:40Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=2WQlqJsr+Q/q7pKGuJqoQg== +
+
+ + + .SQLSERVERMANAGEMENT + 2WQlqJsr+Q/q7pKGuJqoQg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + a84d32f0-0f93-427e-175b-8d7edfdd5e94 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:40 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="https://testserver1.dev.mscds.com/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>https://testserver1.dev.mscds.com/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2013-06-28T18:54:40Z</updated><link rel="self" title="Databases" href="Databases" /><author><name /></author></feed> +
+
+
+
+ + UnitTests.GetAzureSqlServiceObjectiveWithSqlAuth + + + 0 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + bsh2xHj/svPg+H6qkPor+SkBiYLrfqqPfKyPcuwScWtanaaR94mNoaXP5kZARsPIdkkhHuC1wTsJ0xNhJ1+TwzD751NMWOCU/263gQwPTT6/7fw2czwO36YorK3DMsQA+SP4WwD5qg6qQRH/ARtmdBZLVIfAWs8QgtCY+TN0NxmrT74qjhfNO8T6zD4qASpL5lOQ5JcU2GA8+zZMCwGIYOEca5mQ3acLs63sB6EqYFJedJACZ3xAOTPBkU6XkhmoHp6oak3SxQ/JFmyJv4FBdaoXv9nlhcdYjheqNKdHcQtYUJNIWchhVIwX9YObsH3rjhF0G6Y6LYZ7/QpjMaqlDyB8H/eT5SdjKtF1Sf3N7Y65V70oADEBcp4DSMcAY89rjNGpcmvRk+kX73fIPdsMXDdYrnetT3hi4InZFY4P6egLkIdAlwrCOq931clRwYsEEp56AtwfDyQVLypH9MuHyzHN+nbHh3nOX8DzBPzSMLwUcXIor7H3VFgXaWEAkPaNyy03r70x9A6tvxcJ4E8BxTBlnUpnL809uf3++bDyvT5pgOBF/YAnAJ1C+RIFbnW3r/+tVXSbrnZ+hdKnPZR80NnUtPeAlXx3xAIC0omXedbtC5AvVMjPq3CX71EtSuM2A14p9rltp3fFX2dPwVR5xreZVcSUfWHzm02OJr+1XIKKr5XQH6kfAYZPhGx8frgHzkbcie5eFpUYsP+cF/AR1LetGIKyBQTECaaQMyust8G9O/B7wYrygtK6H9DMzaIaQh0t8yFm/hTZC/+ah7csbg== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 721d5e10-fe9b-4c41-8884-739800fe8f9c-2013-06-28 18:54:57Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=hbyEYBXa4/yw96bdDluXBg== +
+
+ + + .SQLSERVERMANAGEMENT + hbyEYBXa4/yw96bdDluXBg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 5ef9edeb-4878-6709-f88e-f30f8f2b6668 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:57 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives</id><title type="text">ServiceObjectives</title><updated>2013-06-28T18:54:57Z</updated><link rel="self" title="ServiceObjectives" href="ServiceObjectives" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')/DimensionSettings" /><title /><updated>2013-06-28T18:54:57Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:Id><d:Name>P1</d:Name><d:Description>Resource capacity is reserved.</d:Description><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0')/DimensionSettings" /><title /><updated>2013-06-28T18:54:57Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</d:Id><d:Name>P2</d:Name><d:Description>Resource capacity is reserved.</d:Description><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">false</d:Enabled></m:properties></content></entry><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'e210706e-cd95-4f72-b5e5-885f8a1406e8')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'e210706e-cd95-4f72-b5e5-885f8a1406e8')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'e210706e-cd95-4f72-b5e5-885f8a1406e8')/DimensionSettings" /><title /><updated>2013-06-28T18:54:57Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">e210706e-cd95-4f72-b5e5-885f8a1406e8</d:Id><d:Name>P3</d:Name><d:Description>Resource capacity is reserved.</d:Description><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">false</d:Enabled></m:properties></content></entry><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'a7c4c615-cfb1-464b-b252-925be0a19446')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'a7c4c615-cfb1-464b-b252-925be0a19446')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'a7c4c615-cfb1-464b-b252-925be0a19446')/DimensionSettings" /><title /><updated>2013-06-28T18:54:57Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">a7c4c615-cfb1-464b-b252-925be0a19446</d:Id><d:Name>Reserved P4</d:Name><d:Description>Resource capacity is reserved.</d:Description><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">false</d:Enabled></m:properties></content></entry><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'a45fea0c-e63c-4bf0-9f81-9964c86b7d2a')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'a45fea0c-e63c-4bf0-9f81-9964c86b7d2a')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'a45fea0c-e63c-4bf0-9f81-9964c86b7d2a')/DimensionSettings" /><title /><updated>2013-06-28T18:54:57Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">a45fea0c-e63c-4bf0-9f81-9964c86b7d2a</d:Id><d:Name>System Standard</d:Name><d:Description>Used for master database only.</d:Description><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault><d:IsSystem m:type="Edm.Boolean">true</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2013-06-28T18:54:57Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Resource capacity is not reserved.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry></feed> +
+
+ + 1 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')/DimensionSettings + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + bsh2xHj/svPg+H6qkPor+SkBiYLrfqqPfKyPcuwScWtanaaR94mNoaXP5kZARsPIdkkhHuC1wTsJ0xNhJ1+TwzD751NMWOCU/263gQwPTT6/7fw2czwO36YorK3DMsQA+SP4WwD5qg6qQRH/ARtmdBZLVIfAWs8QgtCY+TN0NxmrT74qjhfNO8T6zD4qASpL5lOQ5JcU2GA8+zZMCwGIYOEca5mQ3acLs63sB6EqYFJedJACZ3xAOTPBkU6XkhmoHp6oak3SxQ/JFmyJv4FBdaoXv9nlhcdYjheqNKdHcQtYUJNIWchhVIwX9YObsH3rjhF0G6Y6LYZ7/QpjMaqlDyB8H/eT5SdjKtF1Sf3N7Y65V70oADEBcp4DSMcAY89rjNGpcmvRk+kX73fIPdsMXDdYrnetT3hi4InZFY4P6egLkIdAlwrCOq931clRwYsEEp56AtwfDyQVLypH9MuHyzHN+nbHh3nOX8DzBPzSMLwUcXIor7H3VFgXaWEAkPaNyy03r70x9A6tvxcJ4E8BxTBlnUpnL809uf3++bDyvT5pgOBF/YAnAJ1C+RIFbnW3r/+tVXSbrnZ+hdKnPZR80NnUtPeAlXx3xAIC0omXedbtC5AvVMjPq3CX71EtSuM2A14p9rltp3fFX2dPwVR5xreZVcSUfWHzm02OJr+1XIKKr5XQH6kfAYZPhGx8frgHzkbcie5eFpUYsP+cF/AR1LetGIKyBQTECaaQMyust8G9O/B7wYrygtK6H9DMzaIaQh0t8yFm/hTZC/+ah7csbg== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 721d5e10-fe9b-4c41-8884-739800fe8f9c-2013-06-28 18:54:57Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=hbyEYBXa4/yw96bdDluXBg== +
+
+ + + .SQLSERVERMANAGEMENT + hbyEYBXa4/yw96bdDluXBg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 5ef9edeb-4878-6709-f88e-f30f8f2b6668 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:57 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')/DimensionSettings</id><title type="text">DimensionSettings</title><updated>2013-06-28T18:54:57Z</updated><link rel="self" title="DimensionSettings" href="DimensionSettings" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/DimensionSettings(guid'765fbda3-73c9-4fad-996e-7c0e4e219f68')</id><category term="Microsoft.SqlServer.Management.Server.Domain.DimensionSetting" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="DimensionSetting" href="DimensionSettings(guid'765fbda3-73c9-4fad-996e-7c0e4e219f68')" /><title /><updated>2013-06-28T18:54:57Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">765fbda3-73c9-4fad-996e-7c0e4e219f68</d:Id><d:Name>P1</d:Name><d:Description>Resource capacity is reserved.</d:Description><d:Ordinal m:type="Edm.Byte">3</d:Ordinal><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault></m:properties></content></entry></feed> +
+
+ + 2 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0')/DimensionSettings + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + bsh2xHj/svPg+H6qkPor+SkBiYLrfqqPfKyPcuwScWtanaaR94mNoaXP5kZARsPIdkkhHuC1wTsJ0xNhJ1+TwzD751NMWOCU/263gQwPTT6/7fw2czwO36YorK3DMsQA+SP4WwD5qg6qQRH/ARtmdBZLVIfAWs8QgtCY+TN0NxmrT74qjhfNO8T6zD4qASpL5lOQ5JcU2GA8+zZMCwGIYOEca5mQ3acLs63sB6EqYFJedJACZ3xAOTPBkU6XkhmoHp6oak3SxQ/JFmyJv4FBdaoXv9nlhcdYjheqNKdHcQtYUJNIWchhVIwX9YObsH3rjhF0G6Y6LYZ7/QpjMaqlDyB8H/eT5SdjKtF1Sf3N7Y65V70oADEBcp4DSMcAY89rjNGpcmvRk+kX73fIPdsMXDdYrnetT3hi4InZFY4P6egLkIdAlwrCOq931clRwYsEEp56AtwfDyQVLypH9MuHyzHN+nbHh3nOX8DzBPzSMLwUcXIor7H3VFgXaWEAkPaNyy03r70x9A6tvxcJ4E8BxTBlnUpnL809uf3++bDyvT5pgOBF/YAnAJ1C+RIFbnW3r/+tVXSbrnZ+hdKnPZR80NnUtPeAlXx3xAIC0omXedbtC5AvVMjPq3CX71EtSuM2A14p9rltp3fFX2dPwVR5xreZVcSUfWHzm02OJr+1XIKKr5XQH6kfAYZPhGx8frgHzkbcie5eFpUYsP+cF/AR1LetGIKyBQTECaaQMyust8G9O/B7wYrygtK6H9DMzaIaQh0t8yFm/hTZC/+ah7csbg== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 721d5e10-fe9b-4c41-8884-739800fe8f9c-2013-06-28 18:54:57Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=hbyEYBXa4/yw96bdDluXBg== +
+
+ + + .SQLSERVERMANAGEMENT + hbyEYBXa4/yw96bdDluXBg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 5ef9edeb-4878-6709-f88e-f30f8f2b6668 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:57 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0')/DimensionSettings</id><title type="text">DimensionSettings</title><updated>2013-06-28T18:54:57Z</updated><link rel="self" title="DimensionSettings" href="DimensionSettings" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/DimensionSettings(guid'b15e89f1-02b5-4618-b44d-75d37261b94b')</id><category term="Microsoft.SqlServer.Management.Server.Domain.DimensionSetting" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="DimensionSetting" href="DimensionSettings(guid'b15e89f1-02b5-4618-b44d-75d37261b94b')" /><title /><updated>2013-06-28T18:54:57Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">b15e89f1-02b5-4618-b44d-75d37261b94b</d:Id><d:Name>P2</d:Name><d:Description>Resource capacity is reserved.</d:Description><d:Ordinal m:type="Edm.Byte">4</d:Ordinal><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault></m:properties></content></entry></feed> +
+
+ + 3 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'e210706e-cd95-4f72-b5e5-885f8a1406e8')/DimensionSettings + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + bsh2xHj/svPg+H6qkPor+SkBiYLrfqqPfKyPcuwScWtanaaR94mNoaXP5kZARsPIdkkhHuC1wTsJ0xNhJ1+TwzD751NMWOCU/263gQwPTT6/7fw2czwO36YorK3DMsQA+SP4WwD5qg6qQRH/ARtmdBZLVIfAWs8QgtCY+TN0NxmrT74qjhfNO8T6zD4qASpL5lOQ5JcU2GA8+zZMCwGIYOEca5mQ3acLs63sB6EqYFJedJACZ3xAOTPBkU6XkhmoHp6oak3SxQ/JFmyJv4FBdaoXv9nlhcdYjheqNKdHcQtYUJNIWchhVIwX9YObsH3rjhF0G6Y6LYZ7/QpjMaqlDyB8H/eT5SdjKtF1Sf3N7Y65V70oADEBcp4DSMcAY89rjNGpcmvRk+kX73fIPdsMXDdYrnetT3hi4InZFY4P6egLkIdAlwrCOq931clRwYsEEp56AtwfDyQVLypH9MuHyzHN+nbHh3nOX8DzBPzSMLwUcXIor7H3VFgXaWEAkPaNyy03r70x9A6tvxcJ4E8BxTBlnUpnL809uf3++bDyvT5pgOBF/YAnAJ1C+RIFbnW3r/+tVXSbrnZ+hdKnPZR80NnUtPeAlXx3xAIC0omXedbtC5AvVMjPq3CX71EtSuM2A14p9rltp3fFX2dPwVR5xreZVcSUfWHzm02OJr+1XIKKr5XQH6kfAYZPhGx8frgHzkbcie5eFpUYsP+cF/AR1LetGIKyBQTECaaQMyust8G9O/B7wYrygtK6H9DMzaIaQh0t8yFm/hTZC/+ah7csbg== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 721d5e10-fe9b-4c41-8884-739800fe8f9c-2013-06-28 18:54:57Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=hbyEYBXa4/yw96bdDluXBg== +
+
+ + + .SQLSERVERMANAGEMENT + hbyEYBXa4/yw96bdDluXBg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 5ef9edeb-4878-6709-f88e-f30f8f2b6668 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:57 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'e210706e-cd95-4f72-b5e5-885f8a1406e8')/DimensionSettings</id><title type="text">DimensionSettings</title><updated>2013-06-28T18:54:57Z</updated><link rel="self" title="DimensionSettings" href="DimensionSettings" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/DimensionSettings(guid'8efe7983-8e31-4ddb-82d2-5c00e4f48631')</id><category term="Microsoft.SqlServer.Management.Server.Domain.DimensionSetting" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="DimensionSetting" href="DimensionSettings(guid'8efe7983-8e31-4ddb-82d2-5c00e4f48631')" /><title /><updated>2013-06-28T18:54:57Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">8efe7983-8e31-4ddb-82d2-5c00e4f48631</d:Id><d:Name>P3</d:Name><d:Description>Resource capacity is reserved.</d:Description><d:Ordinal m:type="Edm.Byte">5</d:Ordinal><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault></m:properties></content></entry></feed> +
+
+ + 4 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'a7c4c615-cfb1-464b-b252-925be0a19446')/DimensionSettings + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + bsh2xHj/svPg+H6qkPor+SkBiYLrfqqPfKyPcuwScWtanaaR94mNoaXP5kZARsPIdkkhHuC1wTsJ0xNhJ1+TwzD751NMWOCU/263gQwPTT6/7fw2czwO36YorK3DMsQA+SP4WwD5qg6qQRH/ARtmdBZLVIfAWs8QgtCY+TN0NxmrT74qjhfNO8T6zD4qASpL5lOQ5JcU2GA8+zZMCwGIYOEca5mQ3acLs63sB6EqYFJedJACZ3xAOTPBkU6XkhmoHp6oak3SxQ/JFmyJv4FBdaoXv9nlhcdYjheqNKdHcQtYUJNIWchhVIwX9YObsH3rjhF0G6Y6LYZ7/QpjMaqlDyB8H/eT5SdjKtF1Sf3N7Y65V70oADEBcp4DSMcAY89rjNGpcmvRk+kX73fIPdsMXDdYrnetT3hi4InZFY4P6egLkIdAlwrCOq931clRwYsEEp56AtwfDyQVLypH9MuHyzHN+nbHh3nOX8DzBPzSMLwUcXIor7H3VFgXaWEAkPaNyy03r70x9A6tvxcJ4E8BxTBlnUpnL809uf3++bDyvT5pgOBF/YAnAJ1C+RIFbnW3r/+tVXSbrnZ+hdKnPZR80NnUtPeAlXx3xAIC0omXedbtC5AvVMjPq3CX71EtSuM2A14p9rltp3fFX2dPwVR5xreZVcSUfWHzm02OJr+1XIKKr5XQH6kfAYZPhGx8frgHzkbcie5eFpUYsP+cF/AR1LetGIKyBQTECaaQMyust8G9O/B7wYrygtK6H9DMzaIaQh0t8yFm/hTZC/+ah7csbg== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 721d5e10-fe9b-4c41-8884-739800fe8f9c-2013-06-28 18:54:57Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=hbyEYBXa4/yw96bdDluXBg== +
+
+ + + .SQLSERVERMANAGEMENT + hbyEYBXa4/yw96bdDluXBg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 5ef9edeb-4878-6709-f88e-f30f8f2b6668 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:57 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'a7c4c615-cfb1-464b-b252-925be0a19446')/DimensionSettings</id><title type="text">DimensionSettings</title><updated>2013-06-28T18:54:57Z</updated><link rel="self" title="DimensionSettings" href="DimensionSettings" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/DimensionSettings(guid'c4da00a1-df48-4f87-930e-dbc170fe1cef')</id><category term="Microsoft.SqlServer.Management.Server.Domain.DimensionSetting" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="DimensionSetting" href="DimensionSettings(guid'c4da00a1-df48-4f87-930e-dbc170fe1cef')" /><title /><updated>2013-06-28T18:54:57Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">c4da00a1-df48-4f87-930e-dbc170fe1cef</d:Id><d:Name>P4</d:Name><d:Description>Resource capacity is reserved.</d:Description><d:Ordinal m:type="Edm.Byte">6</d:Ordinal><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault></m:properties></content></entry></feed> +
+
+ + 5 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'a45fea0c-e63c-4bf0-9f81-9964c86b7d2a')/DimensionSettings + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + bsh2xHj/svPg+H6qkPor+SkBiYLrfqqPfKyPcuwScWtanaaR94mNoaXP5kZARsPIdkkhHuC1wTsJ0xNhJ1+TwzD751NMWOCU/263gQwPTT6/7fw2czwO36YorK3DMsQA+SP4WwD5qg6qQRH/ARtmdBZLVIfAWs8QgtCY+TN0NxmrT74qjhfNO8T6zD4qASpL5lOQ5JcU2GA8+zZMCwGIYOEca5mQ3acLs63sB6EqYFJedJACZ3xAOTPBkU6XkhmoHp6oak3SxQ/JFmyJv4FBdaoXv9nlhcdYjheqNKdHcQtYUJNIWchhVIwX9YObsH3rjhF0G6Y6LYZ7/QpjMaqlDyB8H/eT5SdjKtF1Sf3N7Y65V70oADEBcp4DSMcAY89rjNGpcmvRk+kX73fIPdsMXDdYrnetT3hi4InZFY4P6egLkIdAlwrCOq931clRwYsEEp56AtwfDyQVLypH9MuHyzHN+nbHh3nOX8DzBPzSMLwUcXIor7H3VFgXaWEAkPaNyy03r70x9A6tvxcJ4E8BxTBlnUpnL809uf3++bDyvT5pgOBF/YAnAJ1C+RIFbnW3r/+tVXSbrnZ+hdKnPZR80NnUtPeAlXx3xAIC0omXedbtC5AvVMjPq3CX71EtSuM2A14p9rltp3fFX2dPwVR5xreZVcSUfWHzm02OJr+1XIKKr5XQH6kfAYZPhGx8frgHzkbcie5eFpUYsP+cF/AR1LetGIKyBQTECaaQMyust8G9O/B7wYrygtK6H9DMzaIaQh0t8yFm/hTZC/+ah7csbg== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 721d5e10-fe9b-4c41-8884-739800fe8f9c-2013-06-28 18:54:57Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=hbyEYBXa4/yw96bdDluXBg== +
+
+ + + .SQLSERVERMANAGEMENT + hbyEYBXa4/yw96bdDluXBg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 5ef9edeb-4878-6709-f88e-f30f8f2b6668 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:57 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'a45fea0c-e63c-4bf0-9f81-9964c86b7d2a')/DimensionSettings</id><title type="text">DimensionSettings</title><updated>2013-06-28T18:54:57Z</updated><link rel="self" title="DimensionSettings" href="DimensionSettings" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/DimensionSettings(guid'22467ff6-6823-4d18-a169-913150e7714f')</id><category term="Microsoft.SqlServer.Management.Server.Domain.DimensionSetting" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="DimensionSetting" href="DimensionSettings(guid'22467ff6-6823-4d18-a169-913150e7714f')" /><title /><updated>2013-06-28T18:54:57Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">22467ff6-6823-4d18-a169-913150e7714f</d:Id><d:Name>Shared</d:Name><d:Description>Resource capacity is not reserved.</d:Description><d:Ordinal m:type="Edm.Byte">1</d:Ordinal><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault></m:properties></content></entry></feed> +
+
+ + 6 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + bsh2xHj/svPg+H6qkPor+SkBiYLrfqqPfKyPcuwScWtanaaR94mNoaXP5kZARsPIdkkhHuC1wTsJ0xNhJ1+TwzD751NMWOCU/263gQwPTT6/7fw2czwO36YorK3DMsQA+SP4WwD5qg6qQRH/ARtmdBZLVIfAWs8QgtCY+TN0NxmrT74qjhfNO8T6zD4qASpL5lOQ5JcU2GA8+zZMCwGIYOEca5mQ3acLs63sB6EqYFJedJACZ3xAOTPBkU6XkhmoHp6oak3SxQ/JFmyJv4FBdaoXv9nlhcdYjheqNKdHcQtYUJNIWchhVIwX9YObsH3rjhF0G6Y6LYZ7/QpjMaqlDyB8H/eT5SdjKtF1Sf3N7Y65V70oADEBcp4DSMcAY89rjNGpcmvRk+kX73fIPdsMXDdYrnetT3hi4InZFY4P6egLkIdAlwrCOq931clRwYsEEp56AtwfDyQVLypH9MuHyzHN+nbHh3nOX8DzBPzSMLwUcXIor7H3VFgXaWEAkPaNyy03r70x9A6tvxcJ4E8BxTBlnUpnL809uf3++bDyvT5pgOBF/YAnAJ1C+RIFbnW3r/+tVXSbrnZ+hdKnPZR80NnUtPeAlXx3xAIC0omXedbtC5AvVMjPq3CX71EtSuM2A14p9rltp3fFX2dPwVR5xreZVcSUfWHzm02OJr+1XIKKr5XQH6kfAYZPhGx8frgHzkbcie5eFpUYsP+cF/AR1LetGIKyBQTECaaQMyust8G9O/B7wYrygtK6H9DMzaIaQh0t8yFm/hTZC/+ah7csbg== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 721d5e10-fe9b-4c41-8884-739800fe8f9c-2013-06-28 18:54:57Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=hbyEYBXa4/yw96bdDluXBg== +
+
+ + + .SQLSERVERMANAGEMENT + hbyEYBXa4/yw96bdDluXBg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 5ef9edeb-4878-6709-f88e-f30f8f2b6668 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:57 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings</id><title type="text">DimensionSettings</title><updated>2013-06-28T18:54:57Z</updated><link rel="self" title="DimensionSettings" href="DimensionSettings" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/DimensionSettings(guid'22467ff6-6823-4d18-a169-913150e7714f')</id><category term="Microsoft.SqlServer.Management.Server.Domain.DimensionSetting" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="DimensionSetting" href="DimensionSettings(guid'22467ff6-6823-4d18-a169-913150e7714f')" /><title /><updated>2013-06-28T18:54:57Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">22467ff6-6823-4d18-a169-913150e7714f</d:Id><d:Name>Shared</d:Name><d:Description>Resource capacity is not reserved.</d:Description><d:Ordinal m:type="Edm.Byte">1</d:Ordinal><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault></m:properties></content></entry></feed> +
+
+ + 7 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives()?$filter=Name%20eq%20'P1'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + bsh2xHj/svPg+H6qkPor+SkBiYLrfqqPfKyPcuwScWtanaaR94mNoaXP5kZARsPIdkkhHuC1wTsJ0xNhJ1+TwzD751NMWOCU/263gQwPTT6/7fw2czwO36YorK3DMsQA+SP4WwD5qg6qQRH/ARtmdBZLVIfAWs8QgtCY+TN0NxmrT74qjhfNO8T6zD4qASpL5lOQ5JcU2GA8+zZMCwGIYOEca5mQ3acLs63sB6EqYFJedJACZ3xAOTPBkU6XkhmoHp6oak3SxQ/JFmyJv4FBdaoXv9nlhcdYjheqNKdHcQtYUJNIWchhVIwX9YObsH3rjhF0G6Y6LYZ7/QpjMaqlDyB8H/eT5SdjKtF1Sf3N7Y65V70oADEBcp4DSMcAY89rjNGpcmvRk+kX73fIPdsMXDdYrnetT3hi4InZFY4P6egLkIdAlwrCOq931clRwYsEEp56AtwfDyQVLypH9MuHyzHN+nbHh3nOX8DzBPzSMLwUcXIor7H3VFgXaWEAkPaNyy03r70x9A6tvxcJ4E8BxTBlnUpnL809uf3++bDyvT5pgOBF/YAnAJ1C+RIFbnW3r/+tVXSbrnZ+hdKnPZR80NnUtPeAlXx3xAIC0omXedbtC5AvVMjPq3CX71EtSuM2A14p9rltp3fFX2dPwVR5xreZVcSUfWHzm02OJr+1XIKKr5XQH6kfAYZPhGx8frgHzkbcie5eFpUYsP+cF/AR1LetGIKyBQTECaaQMyust8G9O/B7wYrygtK6H9DMzaIaQh0t8yFm/hTZC/+ah7csbg== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 721d5e10-fe9b-4c41-8884-739800fe8f9c-2013-06-28 18:54:57Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=hbyEYBXa4/yw96bdDluXBg== +
+
+ + + .SQLSERVERMANAGEMENT + hbyEYBXa4/yw96bdDluXBg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 5ef9edeb-4878-6709-f88e-f30f8f2b6668 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:57 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives</id><title type="text">ServiceObjectives</title><updated>2013-06-28T18:54:57Z</updated><link rel="self" title="ServiceObjectives" href="ServiceObjectives" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')/DimensionSettings" /><title /><updated>2013-06-28T18:54:57Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:Id><d:Name>P1</d:Name><d:Description>Resource capacity is reserved.</d:Description><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry></feed> +
+
+ + 8 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')/DimensionSettings + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + bsh2xHj/svPg+H6qkPor+SkBiYLrfqqPfKyPcuwScWtanaaR94mNoaXP5kZARsPIdkkhHuC1wTsJ0xNhJ1+TwzD751NMWOCU/263gQwPTT6/7fw2czwO36YorK3DMsQA+SP4WwD5qg6qQRH/ARtmdBZLVIfAWs8QgtCY+TN0NxmrT74qjhfNO8T6zD4qASpL5lOQ5JcU2GA8+zZMCwGIYOEca5mQ3acLs63sB6EqYFJedJACZ3xAOTPBkU6XkhmoHp6oak3SxQ/JFmyJv4FBdaoXv9nlhcdYjheqNKdHcQtYUJNIWchhVIwX9YObsH3rjhF0G6Y6LYZ7/QpjMaqlDyB8H/eT5SdjKtF1Sf3N7Y65V70oADEBcp4DSMcAY89rjNGpcmvRk+kX73fIPdsMXDdYrnetT3hi4InZFY4P6egLkIdAlwrCOq931clRwYsEEp56AtwfDyQVLypH9MuHyzHN+nbHh3nOX8DzBPzSMLwUcXIor7H3VFgXaWEAkPaNyy03r70x9A6tvxcJ4E8BxTBlnUpnL809uf3++bDyvT5pgOBF/YAnAJ1C+RIFbnW3r/+tVXSbrnZ+hdKnPZR80NnUtPeAlXx3xAIC0omXedbtC5AvVMjPq3CX71EtSuM2A14p9rltp3fFX2dPwVR5xreZVcSUfWHzm02OJr+1XIKKr5XQH6kfAYZPhGx8frgHzkbcie5eFpUYsP+cF/AR1LetGIKyBQTECaaQMyust8G9O/B7wYrygtK6H9DMzaIaQh0t8yFm/hTZC/+ah7csbg== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 721d5e10-fe9b-4c41-8884-739800fe8f9c-2013-06-28 18:54:57Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=hbyEYBXa4/yw96bdDluXBg== +
+
+ + + .SQLSERVERMANAGEMENT + hbyEYBXa4/yw96bdDluXBg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 5ef9edeb-4878-6709-f88e-f30f8f2b6668 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:57 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')/DimensionSettings</id><title type="text">DimensionSettings</title><updated>2013-06-28T18:54:57Z</updated><link rel="self" title="DimensionSettings" href="DimensionSettings" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/DimensionSettings(guid'765fbda3-73c9-4fad-996e-7c0e4e219f68')</id><category term="Microsoft.SqlServer.Management.Server.Domain.DimensionSetting" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="DimensionSetting" href="DimensionSettings(guid'765fbda3-73c9-4fad-996e-7c0e4e219f68')" /><title /><updated>2013-06-28T18:54:57Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">765fbda3-73c9-4fad-996e-7c0e4e219f68</d:Id><d:Name>P1</d:Name><d:Description>Resource capacity is reserved.</d:Description><d:Ordinal m:type="Edm.Byte">3</d:Ordinal><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault></m:properties></content></entry></feed> +
+
+
+
+ + UnitTests.SetAzureSqlPremiumDatabaseServiceObjectiveWithSqlAuth + + + 0 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives()?$filter=Name%20eq%20'P1'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + ZaCZxXOimwHcuubcjShanWHU4sH0swtbTJ+zOVSNJ6yjtf0JVGnU6xenmMY2a4bvJ8axUFScTUvN8xT53tjNPiSJV/h8dypejHls+oI5iHFWKHYedHJr6GxwhPZtIv+UaDg1FXWxx8z4Gu6u0BUsLq9fFNVo+P8i5j88BObQFt8uRyiLB0FgAKzbV6pTdYvJp4niXkpfSK5C3yu6RQBdpZkCdSa6EdyTubFxhOim1YF8WlNuuqK+IY9+u0fT3VIw2NBabQZdPFqZp2ucDXILmiQW1Qt5t3tV3KPvIKKN53JS5H9MX9ZnXUc/QA8AsR9yYK8+073L4q/xTnHDKbFZnSxfYF4BCG0yoK56tn8cGkrZzB53RkG3djxo1xQm6WXcAbGP2piB0u7gAWId0ECgh4wCrspoPNSYZqhKMfTk/ruyLMpTfOo20Yz96yYaUy9SiuG35IwtfFDarQon/y0abB7At/fY2ouBCreZh1lQmfMEvz4y9dQKtl2JUlocXptc7nfZ3Ee5HLHM7I3+9+FvapRxX9tMMlxhS4qEFBvSxmQ9eUKsyVySDNtDCiEisLBCuIGT60R5Tfqcmlt1AEozz/gZ26Tsjzjj868kolS8z7zoEvBCQcvHtKJ75KGSkqeT8L1ltENKGbJULuwuTpt2yjUzOWF0q6Ucb3N+iiVl4xq/OXiS4Zl425y6eWD216O3Rl6C4qTW6ijL0XQCNTUfQkNuHrauAgi34iSYFodpb9WpZ2NRz1Jlq0qqrdoooKRTArL31R4X5iQaE5y84M2yFg== +
+
+ x-ms-client-session-id + 594c1cc9-13f1-490f-9edc-621aeef5d79f-2013-11-12 02:37:07Z +
+
+ x-ms-client-request-id + e836ff07-81b2-4bd6-905b-65224386a0d3-2013-11-12 02:37:22Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=uMJuQZcONSmS2N1P2s17lA== +
+
+ + + .SQLSERVERMANAGEMENT + uMJuQZcONSmS2N1P2s17lA== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 59085a12-4dec-45dc-8e99-ad68ccaddf09 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Tue, 12 Nov 2013 02:37:19 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives</id><title type="text">ServiceObjectives</title><updated>2013-11-12T02:37:20Z</updated><link rel="self" title="ServiceObjectives" href="ServiceObjectives" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')/DimensionSettings" /><title /><updated>2013-11-12T02:37:20Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:Id><d:Name>P1</d:Name><d:Description>Resource capacity is reserved.</d:Description><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry></feed> +
+
+ + 1 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')/DimensionSettings + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + ZaCZxXOimwHcuubcjShanWHU4sH0swtbTJ+zOVSNJ6yjtf0JVGnU6xenmMY2a4bvJ8axUFScTUvN8xT53tjNPiSJV/h8dypejHls+oI5iHFWKHYedHJr6GxwhPZtIv+UaDg1FXWxx8z4Gu6u0BUsLq9fFNVo+P8i5j88BObQFt8uRyiLB0FgAKzbV6pTdYvJp4niXkpfSK5C3yu6RQBdpZkCdSa6EdyTubFxhOim1YF8WlNuuqK+IY9+u0fT3VIw2NBabQZdPFqZp2ucDXILmiQW1Qt5t3tV3KPvIKKN53JS5H9MX9ZnXUc/QA8AsR9yYK8+073L4q/xTnHDKbFZnSxfYF4BCG0yoK56tn8cGkrZzB53RkG3djxo1xQm6WXcAbGP2piB0u7gAWId0ECgh4wCrspoPNSYZqhKMfTk/ruyLMpTfOo20Yz96yYaUy9SiuG35IwtfFDarQon/y0abB7At/fY2ouBCreZh1lQmfMEvz4y9dQKtl2JUlocXptc7nfZ3Ee5HLHM7I3+9+FvapRxX9tMMlxhS4qEFBvSxmQ9eUKsyVySDNtDCiEisLBCuIGT60R5Tfqcmlt1AEozz/gZ26Tsjzjj868kolS8z7zoEvBCQcvHtKJ75KGSkqeT8L1ltENKGbJULuwuTpt2yjUzOWF0q6Ucb3N+iiVl4xq/OXiS4Zl425y6eWD216O3Rl6C4qTW6ijL0XQCNTUfQkNuHrauAgi34iSYFodpb9WpZ2NRz1Jlq0qqrdoooKRTArL31R4X5iQaE5y84M2yFg== +
+
+ x-ms-client-session-id + 594c1cc9-13f1-490f-9edc-621aeef5d79f-2013-11-12 02:37:07Z +
+
+ x-ms-client-request-id + e836ff07-81b2-4bd6-905b-65224386a0d3-2013-11-12 02:37:22Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=uMJuQZcONSmS2N1P2s17lA== +
+
+ + + .SQLSERVERMANAGEMENT + uMJuQZcONSmS2N1P2s17lA== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 59085a12-4dec-45dc-8e99-ad68ccaddf09 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Tue, 12 Nov 2013 02:37:19 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')/DimensionSettings</id><title type="text">DimensionSettings</title><updated>2013-11-12T02:37:20Z</updated><link rel="self" title="DimensionSettings" href="DimensionSettings" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/DimensionSettings(guid'765fbda3-73c9-4fad-996e-7c0e4e219f68')</id><category term="Microsoft.SqlServer.Management.Server.Domain.DimensionSetting" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="DimensionSetting" href="DimensionSettings(guid'765fbda3-73c9-4fad-996e-7c0e4e219f68')" /><title /><updated>2013-11-12T02:37:20Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">765fbda3-73c9-4fad-996e-7c0e4e219f68</d:Id><d:Name>P1</d:Name><d:Description>Resource capacity is reserved.</d:Description><d:Ordinal m:type="Edm.Byte">3</d:Ordinal><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault></m:properties></content></entry></feed> +
+
+ + 2 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases + POST + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + ZaCZxXOimwHcuubcjShanWHU4sH0swtbTJ+zOVSNJ6yjtf0JVGnU6xenmMY2a4bvJ8axUFScTUvN8xT53tjNPiSJV/h8dypejHls+oI5iHFWKHYedHJr6GxwhPZtIv+UaDg1FXWxx8z4Gu6u0BUsLq9fFNVo+P8i5j88BObQFt8uRyiLB0FgAKzbV6pTdYvJp4niXkpfSK5C3yu6RQBdpZkCdSa6EdyTubFxhOim1YF8WlNuuqK+IY9+u0fT3VIw2NBabQZdPFqZp2ucDXILmiQW1Qt5t3tV3KPvIKKN53JS5H9MX9ZnXUc/QA8AsR9yYK8+073L4q/xTnHDKbFZnSxfYF4BCG0yoK56tn8cGkrZzB53RkG3djxo1xQm6WXcAbGP2piB0u7gAWId0ECgh4wCrspoPNSYZqhKMfTk/ruyLMpTfOo20Yz96yYaUy9SiuG35IwtfFDarQon/y0abB7At/fY2ouBCreZh1lQmfMEvz4y9dQKtl2JUlocXptc7nfZ3Ee5HLHM7I3+9+FvapRxX9tMMlxhS4qEFBvSxmQ9eUKsyVySDNtDCiEisLBCuIGT60R5Tfqcmlt1AEozz/gZ26Tsjzjj868kolS8z7zoEvBCQcvHtKJ75KGSkqeT8L1ltENKGbJULuwuTpt2yjUzOWF0q6Ucb3N+iiVl4xq/OXiS4Zl425y6eWD216O3Rl6C4qTW6ijL0XQCNTUfQkNuHrauAgi34iSYFodpb9WpZ2NRz1Jlq0qqrdoooKRTArL31R4X5iQaE5y84M2yFg== +
+
+ x-ms-client-session-id + 594c1cc9-13f1-490f-9edc-621aeef5d79f-2013-11-12 02:37:07Z +
+
+ x-ms-client-request-id + be98e2ff-3799-4174-8147-12bb83e10ecf-2013-11-12 02:37:22Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=uMJuQZcONSmS2N1P2s17lA== +
+
+ + + .SQLSERVERMANAGEMENT + uMJuQZcONSmS2N1P2s17lA== + + + + + <?xml version="1.0" encoding="utf-8" standalone="yes"?> + <entry xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom"> + <title /> + <author> + <name /> + </author> + <updated>2013-11-12T02:37:22.2915251Z</updated> + <id /> + <content type="application/xml"> + <m:properties> + <d:AssignedServiceObjectiveId m:type="Edm.Guid" m:null="true" /> + <d:CollationName m:null="true" /> + <d:CreationDate m:type="Edm.DateTime">0001-01-01T00:00:00</d:CreationDate> + <d:Edition>Premium</d:Edition> + <d:Id m:type="Edm.Int32">0</d:Id> + <d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember> + <d:IsFederationRoot m:type="Edm.Boolean" m:null="true" /> + <d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn> + <d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /> + <d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly> + <d:IsRecursiveTriggersOn m:type="Edm.Boolean" m:null="true" /> + <d:IsSuspended m:type="Edm.Boolean" m:null="true" /> + <d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject> + <d:MaxSizeBytes m:type="Edm.Int64" m:null="true" /> + <d:MaxSizeGB m:type="Edm.Int32" m:null="true" /> + <d:Name>SetAzureSqlPremiumDatabaseTests_P1</d:Name> + <d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /> + <d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /> + <d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /> + <d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /> + <d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /> + <d:RecoveryPeriodStartDate m:type="Edm.DateTime" m:null="true" /> + <d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32" m:null="true" /> + <d:ServiceObjectiveAssignmentErrorDescription m:null="true" /> + <d:ServiceObjectiveAssignmentState m:type="Edm.Byte" m:null="true" /> + <d:ServiceObjectiveAssignmentStateDescription m:null="true" /> + <d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime" m:null="true" /> + <d:ServiceObjectiveId m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:ServiceObjectiveId> + <d:SizeMB m:type="Edm.Decimal">0</d:SizeMB> + <d:Status m:type="Edm.Int32">0</d:Status> + </m:properties> + </content> + </entry> + + application/atom+xml + application/atom+xml,application/xml +
+ + Created + +
+ x-ms-request-id + 59085a12-4dec-45dc-8e99-ad68ccaddf09 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Tue, 12 Nov 2013 02:37:21 GMT +
+
+ Location + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(6) +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(6)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(6)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(6)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(6)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(6)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(6)/DatabaseCopies" /><title /><updated>2013-11-12T02:37:21Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">6</d:Id><d:Name>SetAzureSqlPremiumDatabaseTests_P1</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">0</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Pending</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2013-11-12T02:29:52.22</d:ServiceObjectiveAssignmentSuccessDate><d:Edition></d:Edition><d:MaxSizeGB m:type="Edm.Int32">-1</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">-1</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2013-11-11T18:37:21.47</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime" m:null="true" /><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">2048</d:Status><d:IsFederationRoot m:type="Edm.Boolean" m:null="true" /><d:SizeMB m:type="Edm.Decimal">-1</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean" m:null="true" /><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry> +
+
+ + 3 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(6) + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + ZaCZxXOimwHcuubcjShanWHU4sH0swtbTJ+zOVSNJ6yjtf0JVGnU6xenmMY2a4bvJ8axUFScTUvN8xT53tjNPiSJV/h8dypejHls+oI5iHFWKHYedHJr6GxwhPZtIv+UaDg1FXWxx8z4Gu6u0BUsLq9fFNVo+P8i5j88BObQFt8uRyiLB0FgAKzbV6pTdYvJp4niXkpfSK5C3yu6RQBdpZkCdSa6EdyTubFxhOim1YF8WlNuuqK+IY9+u0fT3VIw2NBabQZdPFqZp2ucDXILmiQW1Qt5t3tV3KPvIKKN53JS5H9MX9ZnXUc/QA8AsR9yYK8+073L4q/xTnHDKbFZnSxfYF4BCG0yoK56tn8cGkrZzB53RkG3djxo1xQm6WXcAbGP2piB0u7gAWId0ECgh4wCrspoPNSYZqhKMfTk/ruyLMpTfOo20Yz96yYaUy9SiuG35IwtfFDarQon/y0abB7At/fY2ouBCreZh1lQmfMEvz4y9dQKtl2JUlocXptc7nfZ3Ee5HLHM7I3+9+FvapRxX9tMMlxhS4qEFBvSxmQ9eUKsyVySDNtDCiEisLBCuIGT60R5Tfqcmlt1AEozz/gZ26Tsjzjj868kolS8z7zoEvBCQcvHtKJ75KGSkqeT8L1ltENKGbJULuwuTpt2yjUzOWF0q6Ucb3N+iiVl4xq/OXiS4Zl425y6eWD216O3Rl6C4qTW6ijL0XQCNTUfQkNuHrauAgi34iSYFodpb9WpZ2NRz1Jlq0qqrdoooKRTArL31R4X5iQaE5y84M2yFg== +
+
+ x-ms-client-session-id + 594c1cc9-13f1-490f-9edc-621aeef5d79f-2013-11-12 02:37:07Z +
+
+ x-ms-client-request-id + be98e2ff-3799-4174-8147-12bb83e10ecf-2013-11-12 02:37:22Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=uMJuQZcONSmS2N1P2s17lA== +
+
+ + + .SQLSERVERMANAGEMENT + uMJuQZcONSmS2N1P2s17lA== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 59085a12-4dec-45dc-8e99-ad68ccaddf09 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Tue, 12 Nov 2013 02:37:21 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(6)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(6)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(6)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(6)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(6)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(6)/DatabaseCopies" /><title /><updated>2013-11-12T02:37:22Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">6</d:Id><d:Name>SetAzureSqlPremiumDatabaseTests_P1</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">0</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Pending</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2013-11-12T02:29:52.22</d:ServiceObjectiveAssignmentSuccessDate><d:Edition></d:Edition><d:MaxSizeGB m:type="Edm.Int32">-1</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">-1</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2013-11-11T18:37:21.47</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime" m:null="true" /><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">2048</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry> +
+
+ + 4 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(6)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + ZaCZxXOimwHcuubcjShanWHU4sH0swtbTJ+zOVSNJ6yjtf0JVGnU6xenmMY2a4bvJ8axUFScTUvN8xT53tjNPiSJV/h8dypejHls+oI5iHFWKHYedHJr6GxwhPZtIv+UaDg1FXWxx8z4Gu6u0BUsLq9fFNVo+P8i5j88BObQFt8uRyiLB0FgAKzbV6pTdYvJp4niXkpfSK5C3yu6RQBdpZkCdSa6EdyTubFxhOim1YF8WlNuuqK+IY9+u0fT3VIw2NBabQZdPFqZp2ucDXILmiQW1Qt5t3tV3KPvIKKN53JS5H9MX9ZnXUc/QA8AsR9yYK8+073L4q/xTnHDKbFZnSxfYF4BCG0yoK56tn8cGkrZzB53RkG3djxo1xQm6WXcAbGP2piB0u7gAWId0ECgh4wCrspoPNSYZqhKMfTk/ruyLMpTfOo20Yz96yYaUy9SiuG35IwtfFDarQon/y0abB7At/fY2ouBCreZh1lQmfMEvz4y9dQKtl2JUlocXptc7nfZ3Ee5HLHM7I3+9+FvapRxX9tMMlxhS4qEFBvSxmQ9eUKsyVySDNtDCiEisLBCuIGT60R5Tfqcmlt1AEozz/gZ26Tsjzjj868kolS8z7zoEvBCQcvHtKJ75KGSkqeT8L1ltENKGbJULuwuTpt2yjUzOWF0q6Ucb3N+iiVl4xq/OXiS4Zl425y6eWD216O3Rl6C4qTW6ijL0XQCNTUfQkNuHrauAgi34iSYFodpb9WpZ2NRz1Jlq0qqrdoooKRTArL31R4X5iQaE5y84M2yFg== +
+
+ x-ms-client-session-id + 594c1cc9-13f1-490f-9edc-621aeef5d79f-2013-11-12 02:37:07Z +
+
+ x-ms-client-request-id + be98e2ff-3799-4174-8147-12bb83e10ecf-2013-11-12 02:37:22Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=uMJuQZcONSmS2N1P2s17lA== +
+
+ + + .SQLSERVERMANAGEMENT + uMJuQZcONSmS2N1P2s17lA== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 59085a12-4dec-45dc-8e99-ad68ccaddf09 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Tue, 12 Nov 2013 02:37:21 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')/DimensionSettings" /><title /><updated>2013-11-12T02:37:22Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:Id><d:Name>P1</d:Name><d:Description>Resource capacity is reserved.</d:Description><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 5 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases()?$filter=Name%20eq%20'SetAzureSqlPremiumDatabaseTests_P1'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + ZaCZxXOimwHcuubcjShanWHU4sH0swtbTJ+zOVSNJ6yjtf0JVGnU6xenmMY2a4bvJ8axUFScTUvN8xT53tjNPiSJV/h8dypejHls+oI5iHFWKHYedHJr6GxwhPZtIv+UaDg1FXWxx8z4Gu6u0BUsLq9fFNVo+P8i5j88BObQFt8uRyiLB0FgAKzbV6pTdYvJp4niXkpfSK5C3yu6RQBdpZkCdSa6EdyTubFxhOim1YF8WlNuuqK+IY9+u0fT3VIw2NBabQZdPFqZp2ucDXILmiQW1Qt5t3tV3KPvIKKN53JS5H9MX9ZnXUc/QA8AsR9yYK8+073L4q/xTnHDKbFZnSxfYF4BCG0yoK56tn8cGkrZzB53RkG3djxo1xQm6WXcAbGP2piB0u7gAWId0ECgh4wCrspoPNSYZqhKMfTk/ruyLMpTfOo20Yz96yYaUy9SiuG35IwtfFDarQon/y0abB7At/fY2ouBCreZh1lQmfMEvz4y9dQKtl2JUlocXptc7nfZ3Ee5HLHM7I3+9+FvapRxX9tMMlxhS4qEFBvSxmQ9eUKsyVySDNtDCiEisLBCuIGT60R5Tfqcmlt1AEozz/gZ26Tsjzjj868kolS8z7zoEvBCQcvHtKJ75KGSkqeT8L1ltENKGbJULuwuTpt2yjUzOWF0q6Ucb3N+iiVl4xq/OXiS4Zl425y6eWD216O3Rl6C4qTW6ijL0XQCNTUfQkNuHrauAgi34iSYFodpb9WpZ2NRz1Jlq0qqrdoooKRTArL31R4X5iQaE5y84M2yFg== +
+
+ x-ms-client-session-id + 594c1cc9-13f1-490f-9edc-621aeef5d79f-2013-11-12 02:37:07Z +
+
+ x-ms-client-request-id + be98e2ff-3799-4174-8147-12bb83e10ecf-2013-11-12 02:37:22Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=uMJuQZcONSmS2N1P2s17lA== +
+
+ + + .SQLSERVERMANAGEMENT + uMJuQZcONSmS2N1P2s17lA== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 59085a12-4dec-45dc-8e99-ad68ccaddf09 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Tue, 12 Nov 2013 02:37:33 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2013-11-12T02:37:33Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(6)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(6)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(6)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(6)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(6)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(6)/DatabaseCopies" /><title /><updated>2013-11-12T02:37:33Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">6</d:Id><d:Name>SetAzureSqlPremiumDatabaseTests_P1</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2013-11-12T02:37:25.777</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Premium</d:Edition><d:MaxSizeGB m:type="Edm.Int32">10</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">10737418240</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2013-11-11T18:37:21.47</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2013-11-12T02:38:20.81Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry></feed> +
+
+ + 6 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(6)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + ZaCZxXOimwHcuubcjShanWHU4sH0swtbTJ+zOVSNJ6yjtf0JVGnU6xenmMY2a4bvJ8axUFScTUvN8xT53tjNPiSJV/h8dypejHls+oI5iHFWKHYedHJr6GxwhPZtIv+UaDg1FXWxx8z4Gu6u0BUsLq9fFNVo+P8i5j88BObQFt8uRyiLB0FgAKzbV6pTdYvJp4niXkpfSK5C3yu6RQBdpZkCdSa6EdyTubFxhOim1YF8WlNuuqK+IY9+u0fT3VIw2NBabQZdPFqZp2ucDXILmiQW1Qt5t3tV3KPvIKKN53JS5H9MX9ZnXUc/QA8AsR9yYK8+073L4q/xTnHDKbFZnSxfYF4BCG0yoK56tn8cGkrZzB53RkG3djxo1xQm6WXcAbGP2piB0u7gAWId0ECgh4wCrspoPNSYZqhKMfTk/ruyLMpTfOo20Yz96yYaUy9SiuG35IwtfFDarQon/y0abB7At/fY2ouBCreZh1lQmfMEvz4y9dQKtl2JUlocXptc7nfZ3Ee5HLHM7I3+9+FvapRxX9tMMlxhS4qEFBvSxmQ9eUKsyVySDNtDCiEisLBCuIGT60R5Tfqcmlt1AEozz/gZ26Tsjzjj868kolS8z7zoEvBCQcvHtKJ75KGSkqeT8L1ltENKGbJULuwuTpt2yjUzOWF0q6Ucb3N+iiVl4xq/OXiS4Zl425y6eWD216O3Rl6C4qTW6ijL0XQCNTUfQkNuHrauAgi34iSYFodpb9WpZ2NRz1Jlq0qqrdoooKRTArL31R4X5iQaE5y84M2yFg== +
+
+ x-ms-client-session-id + 594c1cc9-13f1-490f-9edc-621aeef5d79f-2013-11-12 02:37:07Z +
+
+ x-ms-client-request-id + be98e2ff-3799-4174-8147-12bb83e10ecf-2013-11-12 02:37:22Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=uMJuQZcONSmS2N1P2s17lA== +
+
+ + + .SQLSERVERMANAGEMENT + uMJuQZcONSmS2N1P2s17lA== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 59085a12-4dec-45dc-8e99-ad68ccaddf09 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Tue, 12 Nov 2013 02:37:33 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')/DimensionSettings" /><title /><updated>2013-11-12T02:37:33Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:Id><d:Name>P1</d:Name><d:Description>Resource capacity is reserved.</d:Description><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 7 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(6) + MERGE + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + ZaCZxXOimwHcuubcjShanWHU4sH0swtbTJ+zOVSNJ6yjtf0JVGnU6xenmMY2a4bvJ8axUFScTUvN8xT53tjNPiSJV/h8dypejHls+oI5iHFWKHYedHJr6GxwhPZtIv+UaDg1FXWxx8z4Gu6u0BUsLq9fFNVo+P8i5j88BObQFt8uRyiLB0FgAKzbV6pTdYvJp4niXkpfSK5C3yu6RQBdpZkCdSa6EdyTubFxhOim1YF8WlNuuqK+IY9+u0fT3VIw2NBabQZdPFqZp2ucDXILmiQW1Qt5t3tV3KPvIKKN53JS5H9MX9ZnXUc/QA8AsR9yYK8+073L4q/xTnHDKbFZnSxfYF4BCG0yoK56tn8cGkrZzB53RkG3djxo1xQm6WXcAbGP2piB0u7gAWId0ECgh4wCrspoPNSYZqhKMfTk/ruyLMpTfOo20Yz96yYaUy9SiuG35IwtfFDarQon/y0abB7At/fY2ouBCreZh1lQmfMEvz4y9dQKtl2JUlocXptc7nfZ3Ee5HLHM7I3+9+FvapRxX9tMMlxhS4qEFBvSxmQ9eUKsyVySDNtDCiEisLBCuIGT60R5Tfqcmlt1AEozz/gZ26Tsjzjj868kolS8z7zoEvBCQcvHtKJ75KGSkqeT8L1ltENKGbJULuwuTpt2yjUzOWF0q6Ucb3N+iiVl4xq/OXiS4Zl425y6eWD216O3Rl6C4qTW6ijL0XQCNTUfQkNuHrauAgi34iSYFodpb9WpZ2NRz1Jlq0qqrdoooKRTArL31R4X5iQaE5y84M2yFg== +
+
+ x-ms-client-session-id + 594c1cc9-13f1-490f-9edc-621aeef5d79f-2013-11-12 02:37:07Z +
+
+ x-ms-client-request-id + be98e2ff-3799-4174-8147-12bb83e10ecf-2013-11-12 02:37:22Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=uMJuQZcONSmS2N1P2s17lA== +
+
+ + + .SQLSERVERMANAGEMENT + uMJuQZcONSmS2N1P2s17lA== + + + + + <?xml version="1.0" encoding="utf-8" standalone="yes"?> + <entry xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom"> + <category scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" term="Microsoft.SqlServer.Management.Server.Domain.Database" /> + <title /> + <author> + <name /> + </author> + <updated>2013-11-12T02:37:35.1438102Z</updated> + <id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(6)</id> + <content type="application/xml"> + <m:properties> + <d:AssignedServiceObjectiveId m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:AssignedServiceObjectiveId> + <d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName> + <d:CreationDate m:type="Edm.DateTime">2013-11-11T18:37:21.47</d:CreationDate> + <d:Edition>Business</d:Edition> + <d:Id m:type="Edm.Int32">6</d:Id> + <d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember> + <d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot> + <d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn> + <d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /> + <d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly> + <d:IsRecursiveTriggersOn m:type="Edm.Boolean" m:null="true" /> + <d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended> + <d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject> + <d:MaxSizeBytes m:type="Edm.Int64">10737418240</d:MaxSizeBytes> + <d:MaxSizeGB m:type="Edm.Int32" m:null="true" /> + <d:Name>SetAzureSqlPremiumDatabaseTests_P1</d:Name> + <d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /> + <d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /> + <d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /> + <d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /> + <d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /> + <d:RecoveryPeriodStartDate m:type="Edm.DateTime">2013-11-12T02:38:20.81Z</d:RecoveryPeriodStartDate> + <d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode> + <d:ServiceObjectiveAssignmentErrorDescription m:null="true" /> + <d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState> + <d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription> + <d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2013-11-12T02:37:25.777</d:ServiceObjectiveAssignmentSuccessDate> + <d:ServiceObjectiveId m:type="Edm.Guid" m:null="true" /> + <d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB> + <d:Status m:type="Edm.Int32">1</d:Status> + </m:properties> + </content> + </entry> + + application/atom+xml + application/atom+xml,application/xml +
+ + NoContent + +
+ x-ms-request-id + 59085a12-4dec-45dc-8e99-ad68ccaddf09 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 1.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Tue, 12 Nov 2013 02:37:35 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 8 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases()?$filter=Name%20eq%20'SetAzureSqlPremiumDatabaseTests_P1'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + ZaCZxXOimwHcuubcjShanWHU4sH0swtbTJ+zOVSNJ6yjtf0JVGnU6xenmMY2a4bvJ8axUFScTUvN8xT53tjNPiSJV/h8dypejHls+oI5iHFWKHYedHJr6GxwhPZtIv+UaDg1FXWxx8z4Gu6u0BUsLq9fFNVo+P8i5j88BObQFt8uRyiLB0FgAKzbV6pTdYvJp4niXkpfSK5C3yu6RQBdpZkCdSa6EdyTubFxhOim1YF8WlNuuqK+IY9+u0fT3VIw2NBabQZdPFqZp2ucDXILmiQW1Qt5t3tV3KPvIKKN53JS5H9MX9ZnXUc/QA8AsR9yYK8+073L4q/xTnHDKbFZnSxfYF4BCG0yoK56tn8cGkrZzB53RkG3djxo1xQm6WXcAbGP2piB0u7gAWId0ECgh4wCrspoPNSYZqhKMfTk/ruyLMpTfOo20Yz96yYaUy9SiuG35IwtfFDarQon/y0abB7At/fY2ouBCreZh1lQmfMEvz4y9dQKtl2JUlocXptc7nfZ3Ee5HLHM7I3+9+FvapRxX9tMMlxhS4qEFBvSxmQ9eUKsyVySDNtDCiEisLBCuIGT60R5Tfqcmlt1AEozz/gZ26Tsjzjj868kolS8z7zoEvBCQcvHtKJ75KGSkqeT8L1ltENKGbJULuwuTpt2yjUzOWF0q6Ucb3N+iiVl4xq/OXiS4Zl425y6eWD216O3Rl6C4qTW6ijL0XQCNTUfQkNuHrauAgi34iSYFodpb9WpZ2NRz1Jlq0qqrdoooKRTArL31R4X5iQaE5y84M2yFg== +
+
+ x-ms-client-session-id + 594c1cc9-13f1-490f-9edc-621aeef5d79f-2013-11-12 02:37:07Z +
+
+ x-ms-client-request-id + be98e2ff-3799-4174-8147-12bb83e10ecf-2013-11-12 02:37:22Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=uMJuQZcONSmS2N1P2s17lA== +
+
+ + + .SQLSERVERMANAGEMENT + uMJuQZcONSmS2N1P2s17lA== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 59085a12-4dec-45dc-8e99-ad68ccaddf09 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Tue, 12 Nov 2013 02:37:35 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2013-11-12T02:37:36Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(6)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(6)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(6)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(6)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(6)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(6)/DatabaseCopies" /><title /><updated>2013-11-12T02:37:36Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">6</d:Id><d:Name>SetAzureSqlPremiumDatabaseTests_P1</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2013-11-12T02:37:25.777</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Business</d:Edition><d:MaxSizeGB m:type="Edm.Int32">10</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">10737418240</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2013-11-11T18:37:21.47</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2013-11-12T02:38:20.81Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry></feed> +
+
+ + 9 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(6)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + ZaCZxXOimwHcuubcjShanWHU4sH0swtbTJ+zOVSNJ6yjtf0JVGnU6xenmMY2a4bvJ8axUFScTUvN8xT53tjNPiSJV/h8dypejHls+oI5iHFWKHYedHJr6GxwhPZtIv+UaDg1FXWxx8z4Gu6u0BUsLq9fFNVo+P8i5j88BObQFt8uRyiLB0FgAKzbV6pTdYvJp4niXkpfSK5C3yu6RQBdpZkCdSa6EdyTubFxhOim1YF8WlNuuqK+IY9+u0fT3VIw2NBabQZdPFqZp2ucDXILmiQW1Qt5t3tV3KPvIKKN53JS5H9MX9ZnXUc/QA8AsR9yYK8+073L4q/xTnHDKbFZnSxfYF4BCG0yoK56tn8cGkrZzB53RkG3djxo1xQm6WXcAbGP2piB0u7gAWId0ECgh4wCrspoPNSYZqhKMfTk/ruyLMpTfOo20Yz96yYaUy9SiuG35IwtfFDarQon/y0abB7At/fY2ouBCreZh1lQmfMEvz4y9dQKtl2JUlocXptc7nfZ3Ee5HLHM7I3+9+FvapRxX9tMMlxhS4qEFBvSxmQ9eUKsyVySDNtDCiEisLBCuIGT60R5Tfqcmlt1AEozz/gZ26Tsjzjj868kolS8z7zoEvBCQcvHtKJ75KGSkqeT8L1ltENKGbJULuwuTpt2yjUzOWF0q6Ucb3N+iiVl4xq/OXiS4Zl425y6eWD216O3Rl6C4qTW6ijL0XQCNTUfQkNuHrauAgi34iSYFodpb9WpZ2NRz1Jlq0qqrdoooKRTArL31R4X5iQaE5y84M2yFg== +
+
+ x-ms-client-session-id + 594c1cc9-13f1-490f-9edc-621aeef5d79f-2013-11-12 02:37:07Z +
+
+ x-ms-client-request-id + be98e2ff-3799-4174-8147-12bb83e10ecf-2013-11-12 02:37:22Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=uMJuQZcONSmS2N1P2s17lA== +
+
+ + + .SQLSERVERMANAGEMENT + uMJuQZcONSmS2N1P2s17lA== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 59085a12-4dec-45dc-8e99-ad68ccaddf09 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Tue, 12 Nov 2013 02:37:36 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')/DimensionSettings" /><title /><updated>2013-11-12T02:37:36Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:Id><d:Name>P1</d:Name><d:Description>Resource capacity is reserved.</d:Description><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 10 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases()?$filter=Name%20eq%20'SetAzureSqlPremiumDatabaseTests_P1'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + ZaCZxXOimwHcuubcjShanWHU4sH0swtbTJ+zOVSNJ6yjtf0JVGnU6xenmMY2a4bvJ8axUFScTUvN8xT53tjNPiSJV/h8dypejHls+oI5iHFWKHYedHJr6GxwhPZtIv+UaDg1FXWxx8z4Gu6u0BUsLq9fFNVo+P8i5j88BObQFt8uRyiLB0FgAKzbV6pTdYvJp4niXkpfSK5C3yu6RQBdpZkCdSa6EdyTubFxhOim1YF8WlNuuqK+IY9+u0fT3VIw2NBabQZdPFqZp2ucDXILmiQW1Qt5t3tV3KPvIKKN53JS5H9MX9ZnXUc/QA8AsR9yYK8+073L4q/xTnHDKbFZnSxfYF4BCG0yoK56tn8cGkrZzB53RkG3djxo1xQm6WXcAbGP2piB0u7gAWId0ECgh4wCrspoPNSYZqhKMfTk/ruyLMpTfOo20Yz96yYaUy9SiuG35IwtfFDarQon/y0abB7At/fY2ouBCreZh1lQmfMEvz4y9dQKtl2JUlocXptc7nfZ3Ee5HLHM7I3+9+FvapRxX9tMMlxhS4qEFBvSxmQ9eUKsyVySDNtDCiEisLBCuIGT60R5Tfqcmlt1AEozz/gZ26Tsjzjj868kolS8z7zoEvBCQcvHtKJ75KGSkqeT8L1ltENKGbJULuwuTpt2yjUzOWF0q6Ucb3N+iiVl4xq/OXiS4Zl425y6eWD216O3Rl6C4qTW6ijL0XQCNTUfQkNuHrauAgi34iSYFodpb9WpZ2NRz1Jlq0qqrdoooKRTArL31R4X5iQaE5y84M2yFg== +
+
+ x-ms-client-session-id + 594c1cc9-13f1-490f-9edc-621aeef5d79f-2013-11-12 02:37:07Z +
+
+ x-ms-client-request-id + be98e2ff-3799-4174-8147-12bb83e10ecf-2013-11-12 02:37:22Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=uMJuQZcONSmS2N1P2s17lA== +
+
+ + + .SQLSERVERMANAGEMENT + uMJuQZcONSmS2N1P2s17lA== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 59085a12-4dec-45dc-8e99-ad68ccaddf09 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Tue, 12 Nov 2013 02:37:36 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2013-11-12T02:37:36Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(6)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(6)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(6)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(6)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(6)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(6)/DatabaseCopies" /><title /><updated>2013-11-12T02:37:36Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">6</d:Id><d:Name>SetAzureSqlPremiumDatabaseTests_P1</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2013-11-12T02:37:25.777</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Business</d:Edition><d:MaxSizeGB m:type="Edm.Int32">10</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">10737418240</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2013-11-11T18:37:21.47</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2013-11-12T02:38:20.81Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry></feed> +
+
+ + 11 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(6)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + ZaCZxXOimwHcuubcjShanWHU4sH0swtbTJ+zOVSNJ6yjtf0JVGnU6xenmMY2a4bvJ8axUFScTUvN8xT53tjNPiSJV/h8dypejHls+oI5iHFWKHYedHJr6GxwhPZtIv+UaDg1FXWxx8z4Gu6u0BUsLq9fFNVo+P8i5j88BObQFt8uRyiLB0FgAKzbV6pTdYvJp4niXkpfSK5C3yu6RQBdpZkCdSa6EdyTubFxhOim1YF8WlNuuqK+IY9+u0fT3VIw2NBabQZdPFqZp2ucDXILmiQW1Qt5t3tV3KPvIKKN53JS5H9MX9ZnXUc/QA8AsR9yYK8+073L4q/xTnHDKbFZnSxfYF4BCG0yoK56tn8cGkrZzB53RkG3djxo1xQm6WXcAbGP2piB0u7gAWId0ECgh4wCrspoPNSYZqhKMfTk/ruyLMpTfOo20Yz96yYaUy9SiuG35IwtfFDarQon/y0abB7At/fY2ouBCreZh1lQmfMEvz4y9dQKtl2JUlocXptc7nfZ3Ee5HLHM7I3+9+FvapRxX9tMMlxhS4qEFBvSxmQ9eUKsyVySDNtDCiEisLBCuIGT60R5Tfqcmlt1AEozz/gZ26Tsjzjj868kolS8z7zoEvBCQcvHtKJ75KGSkqeT8L1ltENKGbJULuwuTpt2yjUzOWF0q6Ucb3N+iiVl4xq/OXiS4Zl425y6eWD216O3Rl6C4qTW6ijL0XQCNTUfQkNuHrauAgi34iSYFodpb9WpZ2NRz1Jlq0qqrdoooKRTArL31R4X5iQaE5y84M2yFg== +
+
+ x-ms-client-session-id + 594c1cc9-13f1-490f-9edc-621aeef5d79f-2013-11-12 02:37:07Z +
+
+ x-ms-client-request-id + be98e2ff-3799-4174-8147-12bb83e10ecf-2013-11-12 02:37:22Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=uMJuQZcONSmS2N1P2s17lA== +
+
+ + + .SQLSERVERMANAGEMENT + uMJuQZcONSmS2N1P2s17lA== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 59085a12-4dec-45dc-8e99-ad68ccaddf09 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Tue, 12 Nov 2013 02:37:36 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')/DimensionSettings" /><title /><updated>2013-11-12T02:37:36Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:Id><d:Name>Shared</d:Name><d:Description>Resource capacity is reserved.</d:Description><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 12 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(6) + DELETE + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + ZaCZxXOimwHcuubcjShanWHU4sH0swtbTJ+zOVSNJ6yjtf0JVGnU6xenmMY2a4bvJ8axUFScTUvN8xT53tjNPiSJV/h8dypejHls+oI5iHFWKHYedHJr6GxwhPZtIv+UaDg1FXWxx8z4Gu6u0BUsLq9fFNVo+P8i5j88BObQFt8uRyiLB0FgAKzbV6pTdYvJp4niXkpfSK5C3yu6RQBdpZkCdSa6EdyTubFxhOim1YF8WlNuuqK+IY9+u0fT3VIw2NBabQZdPFqZp2ucDXILmiQW1Qt5t3tV3KPvIKKN53JS5H9MX9ZnXUc/QA8AsR9yYK8+073L4q/xTnHDKbFZnSxfYF4BCG0yoK56tn8cGkrZzB53RkG3djxo1xQm6WXcAbGP2piB0u7gAWId0ECgh4wCrspoPNSYZqhKMfTk/ruyLMpTfOo20Yz96yYaUy9SiuG35IwtfFDarQon/y0abB7At/fY2ouBCreZh1lQmfMEvz4y9dQKtl2JUlocXptc7nfZ3Ee5HLHM7I3+9+FvapRxX9tMMlxhS4qEFBvSxmQ9eUKsyVySDNtDCiEisLBCuIGT60R5Tfqcmlt1AEozz/gZ26Tsjzjj868kolS8z7zoEvBCQcvHtKJ75KGSkqeT8L1ltENKGbJULuwuTpt2yjUzOWF0q6Ucb3N+iiVl4xq/OXiS4Zl425y6eWD216O3Rl6C4qTW6ijL0XQCNTUfQkNuHrauAgi34iSYFodpb9WpZ2NRz1Jlq0qqrdoooKRTArL31R4X5iQaE5y84M2yFg== +
+
+ x-ms-client-session-id + 594c1cc9-13f1-490f-9edc-621aeef5d79f-2013-11-12 02:37:07Z +
+
+ x-ms-client-request-id + be98e2ff-3799-4174-8147-12bb83e10ecf-2013-11-12 02:37:22Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=uMJuQZcONSmS2N1P2s17lA== +
+
+ + + .SQLSERVERMANAGEMENT + uMJuQZcONSmS2N1P2s17lA== + + + + + application/atom+xml + application/atom+xml,application/xml +
+ + NoContent + +
+ x-ms-request-id + 59085a12-4dec-45dc-8e99-ad68ccaddf09 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 1.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Tue, 12 Nov 2013 02:37:41 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+
+
+ + UnitTest.Common.RemoveTestDatabasesWithSqlAuth + + + 9 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5) + DELETE + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + BKe6iy11sMx/2vtAf8pUkKhy5muwfbvU1BTdAYIROcdGu7J+HF0KSGJ35GMvg3sgv+P1lPDQiTqbsv4Ce9++SmidX+tTnfJgGFEKjqUzkybIQ/8hTjPGufj+0QNp4cGbwBoeAvlbcwHCkGqitofVOrQ4urCU4hKE9miY4o4iRqHFios5LJGj9hogVIcdud6beLis4AAhfiE5GTnuD9zwpiK9Lzew7wc0Yqyc4MZTb7Vu6UYD6937w3cNvLsuRWxiqRJLp/1cqxFYSmaJ1LcglWdyWegkqcrcKRQ6yE9hPzEmbwzuSo5tmt38wB1s9C3qO8lPpv2jZZa17/OrxSpcXUcgzu4PoWpPGnwHuJu7UsPENEpXwH7mIbfDqJqQOkbFbWYWND6U0JKL8anUr5v5ewfWB1l8AjvCLlNP4HMEH8btMkF19FW87LqHao8WR4FQF0uYkDZhOHLteLBCGdioRgEbcCR2gK+BetOi19GDz1EECIGLjK2GJnE1BHVYajtfevoTv11+AKPhySHfYL79J94ei5/mfycrCYZoDFO3DAMdOldoYftuzoC/ybqrbJ8/rWbVefOmLDVi/NofMEHEuiLbgiqBqjLoRMEbTcFIcIE4ClvhsKIBWtqCRfT9Nj0OPTEHNjNDt+a0N/Ry8ZOiWNNgZ4UE3qmrLiw3aMyetmG8XuQMRElVGv77DpgyyaQjrKQqc3E1YiAWHv68/1E6d0tZkA2KUQceD/LUqJPwCF3gfuX1wHInSm2Y7x+fAAs+VkrV67NGazGhvKdAcriEew== +
+
+ x-ms-client-session-id + ba34f458-2e31-40af-afb8-12a4e37b45af-2013-11-12 01:34:09Z +
+
+ x-ms-client-request-id + f3a71319-c5c0-4cab-9e6e-77cfeb990682-2013-11-12 01:37:52Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=aPGEIZsk1Su2M45BF6lB0w== +
+
+ + + .SQLSERVERMANAGEMENT + aPGEIZsk1Su2M45BF6lB0w== + + + + + application/atom+xml + application/atom+xml,application/xml +
+ + NoContent + +
+ x-ms-request-id + b02f4de3-401b-b13d-ea2d-b1922eb32785 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 1.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Tue, 12 Nov 2013 01:38:00 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 0 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases()?$filter=Name%20eq%20'testdb1'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + XzVRSta3pPjtT+ZnqMO3eVgEixVNm9FLqm7Yv0pTfdgXz6vu2k/SSGbSg78QarxNfv1h/R7UdLw/3n+YSGvLkkNHCqRUGaia0Km/61BFykpBAdwkQFBBTCGY/0lXZdPsgju8aRNKhWDzL2lBgz8Hgj7Ihpx0ktgOv44GBqJMUTe1X7RfKIt81Oe4TGDKRTGCVHlQGI+O/EnIcSs63IKAGtLxumiw3aT2k+T91liK25Q8gxsrf/k4ITygJBRjKIy4nyHjMciIoKAv9TfSKANS63Y7W7h4voSChroTTaPmSiYR9d1XR5pTueX/Ups6M2xi3S4SLfO0tk68c9Cci10EpCdLBxw6FeVa76ob7ZLqz3lxZeS0JeuEuIcrl2vaeLRWEzZlNLONT5dFS+bxKXSKT84+gUkqUNNFZ0QZ+4ubW403dakJchZ0lcDA8Uy+owEvauQ2sCQXoEeE6DWgOyMgVlqtTuI3hhArW2IDUCOU3c08y39FNZWLm8aUGwYyBZ3B1x+AP5x7ipLa/UJP9s9VZSnqXPz1QJP4WK48Zesc2szm0o65cZsnd3XbFxjvpxIFmzuu1eMD3d1HPiZd3BKLOEL8y/h+MKsbrwny6uDOZWpgxE9v7pIpuAoqv21vo9hxTF+4a4eSSGfKI3Ncvm2PwR0uNySvDD71AroYkrOwvjw7kVAGLoQ84dYdtv4wCt6yb2JeG4gZfdclEQiiIIr0haUrWWJXolCwVBNEAesGt+/bJAoRuTJ1lUphfcfueZntpIdwhFKpn6MQMRe4wcD1bw== +
+
+ x-ms-client-session-id + 01e9f74d-9912-406b-a2fd-b26a8a8ce478-2014-03-27 19:01:53Z +
+
+ x-ms-client-request-id + 6c4a7521-02ea-4aaf-888b-6a47ebfe864b-2014-03-27 19:03:01Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=/7bi9diWZoKVEfZf/spaVA== +
+
+ + + .SQLSERVERMANAGEMENT + /7bi9diWZoKVEfZf/spaVA== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 419210b3-8ccd-aa09-9ae1-80f8654bc57c +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Thu, 27 Mar 2014 19:03:06 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2014-03-27T19:03:06Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(4)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(4)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(4)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(4)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(4)/DatabaseCopies" /><title /><updated>2014-03-27T19:03:06Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">4</d:Id><d:Name>testdb1</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2014-03-27T19:02:11.33</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">1</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">1073741824</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2014-03-27T12:02:03.123</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-03-27T19:03:01.89Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">2.44</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry></feed> +
+
+ + 1 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + XzVRSta3pPjtT+ZnqMO3eVgEixVNm9FLqm7Yv0pTfdgXz6vu2k/SSGbSg78QarxNfv1h/R7UdLw/3n+YSGvLkkNHCqRUGaia0Km/61BFykpBAdwkQFBBTCGY/0lXZdPsgju8aRNKhWDzL2lBgz8Hgj7Ihpx0ktgOv44GBqJMUTe1X7RfKIt81Oe4TGDKRTGCVHlQGI+O/EnIcSs63IKAGtLxumiw3aT2k+T91liK25Q8gxsrf/k4ITygJBRjKIy4nyHjMciIoKAv9TfSKANS63Y7W7h4voSChroTTaPmSiYR9d1XR5pTueX/Ups6M2xi3S4SLfO0tk68c9Cci10EpCdLBxw6FeVa76ob7ZLqz3lxZeS0JeuEuIcrl2vaeLRWEzZlNLONT5dFS+bxKXSKT84+gUkqUNNFZ0QZ+4ubW403dakJchZ0lcDA8Uy+owEvauQ2sCQXoEeE6DWgOyMgVlqtTuI3hhArW2IDUCOU3c08y39FNZWLm8aUGwYyBZ3B1x+AP5x7ipLa/UJP9s9VZSnqXPz1QJP4WK48Zesc2szm0o65cZsnd3XbFxjvpxIFmzuu1eMD3d1HPiZd3BKLOEL8y/h+MKsbrwny6uDOZWpgxE9v7pIpuAoqv21vo9hxTF+4a4eSSGfKI3Ncvm2PwR0uNySvDD71AroYkrOwvjw7kVAGLoQ84dYdtv4wCt6yb2JeG4gZfdclEQiiIIr0haUrWWJXolCwVBNEAesGt+/bJAoRuTJ1lUphfcfueZntpIdwhFKpn6MQMRe4wcD1bw== +
+
+ x-ms-client-session-id + 01e9f74d-9912-406b-a2fd-b26a8a8ce478-2014-03-27 19:01:53Z +
+
+ x-ms-client-request-id + 6c4a7521-02ea-4aaf-888b-6a47ebfe864b-2014-03-27 19:03:01Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=/7bi9diWZoKVEfZf/spaVA== +
+
+ + + .SQLSERVERMANAGEMENT + /7bi9diWZoKVEfZf/spaVA== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 419210b3-8ccd-aa09-9ae1-80f8654bc57c +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Thu, 27 Mar 2014 19:03:06 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2014-03-27T19:03:06Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Shared resource allocation.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 2 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4) + DELETE + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + XzVRSta3pPjtT+ZnqMO3eVgEixVNm9FLqm7Yv0pTfdgXz6vu2k/SSGbSg78QarxNfv1h/R7UdLw/3n+YSGvLkkNHCqRUGaia0Km/61BFykpBAdwkQFBBTCGY/0lXZdPsgju8aRNKhWDzL2lBgz8Hgj7Ihpx0ktgOv44GBqJMUTe1X7RfKIt81Oe4TGDKRTGCVHlQGI+O/EnIcSs63IKAGtLxumiw3aT2k+T91liK25Q8gxsrf/k4ITygJBRjKIy4nyHjMciIoKAv9TfSKANS63Y7W7h4voSChroTTaPmSiYR9d1XR5pTueX/Ups6M2xi3S4SLfO0tk68c9Cci10EpCdLBxw6FeVa76ob7ZLqz3lxZeS0JeuEuIcrl2vaeLRWEzZlNLONT5dFS+bxKXSKT84+gUkqUNNFZ0QZ+4ubW403dakJchZ0lcDA8Uy+owEvauQ2sCQXoEeE6DWgOyMgVlqtTuI3hhArW2IDUCOU3c08y39FNZWLm8aUGwYyBZ3B1x+AP5x7ipLa/UJP9s9VZSnqXPz1QJP4WK48Zesc2szm0o65cZsnd3XbFxjvpxIFmzuu1eMD3d1HPiZd3BKLOEL8y/h+MKsbrwny6uDOZWpgxE9v7pIpuAoqv21vo9hxTF+4a4eSSGfKI3Ncvm2PwR0uNySvDD71AroYkrOwvjw7kVAGLoQ84dYdtv4wCt6yb2JeG4gZfdclEQiiIIr0haUrWWJXolCwVBNEAesGt+/bJAoRuTJ1lUphfcfueZntpIdwhFKpn6MQMRe4wcD1bw== +
+
+ x-ms-client-session-id + 01e9f74d-9912-406b-a2fd-b26a8a8ce478-2014-03-27 19:01:53Z +
+
+ x-ms-client-request-id + 6c4a7521-02ea-4aaf-888b-6a47ebfe864b-2014-03-27 19:03:01Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=/7bi9diWZoKVEfZf/spaVA== +
+
+ + + .SQLSERVERMANAGEMENT + /7bi9diWZoKVEfZf/spaVA== + + + + + application/atom+xml + application/atom+xml,application/xml +
+ + NoContent + +
+ x-ms-request-id + 419210b3-8ccd-aa09-9ae1-80f8654bc57c +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 1.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Thu, 27 Mar 2014 19:03:20 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 3 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases()?$filter=Name%20eq%20'testdb2'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + XzVRSta3pPjtT+ZnqMO3eVgEixVNm9FLqm7Yv0pTfdgXz6vu2k/SSGbSg78QarxNfv1h/R7UdLw/3n+YSGvLkkNHCqRUGaia0Km/61BFykpBAdwkQFBBTCGY/0lXZdPsgju8aRNKhWDzL2lBgz8Hgj7Ihpx0ktgOv44GBqJMUTe1X7RfKIt81Oe4TGDKRTGCVHlQGI+O/EnIcSs63IKAGtLxumiw3aT2k+T91liK25Q8gxsrf/k4ITygJBRjKIy4nyHjMciIoKAv9TfSKANS63Y7W7h4voSChroTTaPmSiYR9d1XR5pTueX/Ups6M2xi3S4SLfO0tk68c9Cci10EpCdLBxw6FeVa76ob7ZLqz3lxZeS0JeuEuIcrl2vaeLRWEzZlNLONT5dFS+bxKXSKT84+gUkqUNNFZ0QZ+4ubW403dakJchZ0lcDA8Uy+owEvauQ2sCQXoEeE6DWgOyMgVlqtTuI3hhArW2IDUCOU3c08y39FNZWLm8aUGwYyBZ3B1x+AP5x7ipLa/UJP9s9VZSnqXPz1QJP4WK48Zesc2szm0o65cZsnd3XbFxjvpxIFmzuu1eMD3d1HPiZd3BKLOEL8y/h+MKsbrwny6uDOZWpgxE9v7pIpuAoqv21vo9hxTF+4a4eSSGfKI3Ncvm2PwR0uNySvDD71AroYkrOwvjw7kVAGLoQ84dYdtv4wCt6yb2JeG4gZfdclEQiiIIr0haUrWWJXolCwVBNEAesGt+/bJAoRuTJ1lUphfcfueZntpIdwhFKpn6MQMRe4wcD1bw== +
+
+ x-ms-client-session-id + 01e9f74d-9912-406b-a2fd-b26a8a8ce478-2014-03-27 19:01:53Z +
+
+ x-ms-client-request-id + 6c4a7521-02ea-4aaf-888b-6a47ebfe864b-2014-03-27 19:03:01Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=/7bi9diWZoKVEfZf/spaVA== +
+
+ + + .SQLSERVERMANAGEMENT + /7bi9diWZoKVEfZf/spaVA== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 419210b3-8ccd-aa09-9ae1-80f8654bc57c +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Thu, 27 Mar 2014 19:03:20 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2014-03-27T19:03:20Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(5)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(5)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(5)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(5)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(5)/DatabaseCopies" /><title /><updated>2014-03-27T19:03:20Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">5</d:Id><d:Name>testdb2</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2014-03-27T19:02:18.673</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">5</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">5368709120</d:MaxSizeBytes><d:CollationName>Japanese_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2014-03-27T12:02:15.88</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-03-27T19:03:15.11Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">2.50</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry></feed> +
+
+ + 4 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + XzVRSta3pPjtT+ZnqMO3eVgEixVNm9FLqm7Yv0pTfdgXz6vu2k/SSGbSg78QarxNfv1h/R7UdLw/3n+YSGvLkkNHCqRUGaia0Km/61BFykpBAdwkQFBBTCGY/0lXZdPsgju8aRNKhWDzL2lBgz8Hgj7Ihpx0ktgOv44GBqJMUTe1X7RfKIt81Oe4TGDKRTGCVHlQGI+O/EnIcSs63IKAGtLxumiw3aT2k+T91liK25Q8gxsrf/k4ITygJBRjKIy4nyHjMciIoKAv9TfSKANS63Y7W7h4voSChroTTaPmSiYR9d1XR5pTueX/Ups6M2xi3S4SLfO0tk68c9Cci10EpCdLBxw6FeVa76ob7ZLqz3lxZeS0JeuEuIcrl2vaeLRWEzZlNLONT5dFS+bxKXSKT84+gUkqUNNFZ0QZ+4ubW403dakJchZ0lcDA8Uy+owEvauQ2sCQXoEeE6DWgOyMgVlqtTuI3hhArW2IDUCOU3c08y39FNZWLm8aUGwYyBZ3B1x+AP5x7ipLa/UJP9s9VZSnqXPz1QJP4WK48Zesc2szm0o65cZsnd3XbFxjvpxIFmzuu1eMD3d1HPiZd3BKLOEL8y/h+MKsbrwny6uDOZWpgxE9v7pIpuAoqv21vo9hxTF+4a4eSSGfKI3Ncvm2PwR0uNySvDD71AroYkrOwvjw7kVAGLoQ84dYdtv4wCt6yb2JeG4gZfdclEQiiIIr0haUrWWJXolCwVBNEAesGt+/bJAoRuTJ1lUphfcfueZntpIdwhFKpn6MQMRe4wcD1bw== +
+
+ x-ms-client-session-id + 01e9f74d-9912-406b-a2fd-b26a8a8ce478-2014-03-27 19:01:53Z +
+
+ x-ms-client-request-id + 6c4a7521-02ea-4aaf-888b-6a47ebfe864b-2014-03-27 19:03:01Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=/7bi9diWZoKVEfZf/spaVA== +
+
+ + + .SQLSERVERMANAGEMENT + /7bi9diWZoKVEfZf/spaVA== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 419210b3-8ccd-aa09-9ae1-80f8654bc57c +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Thu, 27 Mar 2014 19:03:20 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2014-03-27T19:03:20Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Shared resource allocation.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 5 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5) + DELETE + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + XzVRSta3pPjtT+ZnqMO3eVgEixVNm9FLqm7Yv0pTfdgXz6vu2k/SSGbSg78QarxNfv1h/R7UdLw/3n+YSGvLkkNHCqRUGaia0Km/61BFykpBAdwkQFBBTCGY/0lXZdPsgju8aRNKhWDzL2lBgz8Hgj7Ihpx0ktgOv44GBqJMUTe1X7RfKIt81Oe4TGDKRTGCVHlQGI+O/EnIcSs63IKAGtLxumiw3aT2k+T91liK25Q8gxsrf/k4ITygJBRjKIy4nyHjMciIoKAv9TfSKANS63Y7W7h4voSChroTTaPmSiYR9d1XR5pTueX/Ups6M2xi3S4SLfO0tk68c9Cci10EpCdLBxw6FeVa76ob7ZLqz3lxZeS0JeuEuIcrl2vaeLRWEzZlNLONT5dFS+bxKXSKT84+gUkqUNNFZ0QZ+4ubW403dakJchZ0lcDA8Uy+owEvauQ2sCQXoEeE6DWgOyMgVlqtTuI3hhArW2IDUCOU3c08y39FNZWLm8aUGwYyBZ3B1x+AP5x7ipLa/UJP9s9VZSnqXPz1QJP4WK48Zesc2szm0o65cZsnd3XbFxjvpxIFmzuu1eMD3d1HPiZd3BKLOEL8y/h+MKsbrwny6uDOZWpgxE9v7pIpuAoqv21vo9hxTF+4a4eSSGfKI3Ncvm2PwR0uNySvDD71AroYkrOwvjw7kVAGLoQ84dYdtv4wCt6yb2JeG4gZfdclEQiiIIr0haUrWWJXolCwVBNEAesGt+/bJAoRuTJ1lUphfcfueZntpIdwhFKpn6MQMRe4wcD1bw== +
+
+ x-ms-client-session-id + 01e9f74d-9912-406b-a2fd-b26a8a8ce478-2014-03-27 19:01:53Z +
+
+ x-ms-client-request-id + 6c4a7521-02ea-4aaf-888b-6a47ebfe864b-2014-03-27 19:03:01Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=/7bi9diWZoKVEfZf/spaVA== +
+
+ + + .SQLSERVERMANAGEMENT + /7bi9diWZoKVEfZf/spaVA== + + + + + application/atom+xml + application/atom+xml,application/xml +
+ + NoContent + +
+ x-ms-request-id + 419210b3-8ccd-aa09-9ae1-80f8654bc57c +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 1.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Thu, 27 Mar 2014 19:03:30 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 6 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases()?$filter=Name%20eq%20'testdb3'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + XzVRSta3pPjtT+ZnqMO3eVgEixVNm9FLqm7Yv0pTfdgXz6vu2k/SSGbSg78QarxNfv1h/R7UdLw/3n+YSGvLkkNHCqRUGaia0Km/61BFykpBAdwkQFBBTCGY/0lXZdPsgju8aRNKhWDzL2lBgz8Hgj7Ihpx0ktgOv44GBqJMUTe1X7RfKIt81Oe4TGDKRTGCVHlQGI+O/EnIcSs63IKAGtLxumiw3aT2k+T91liK25Q8gxsrf/k4ITygJBRjKIy4nyHjMciIoKAv9TfSKANS63Y7W7h4voSChroTTaPmSiYR9d1XR5pTueX/Ups6M2xi3S4SLfO0tk68c9Cci10EpCdLBxw6FeVa76ob7ZLqz3lxZeS0JeuEuIcrl2vaeLRWEzZlNLONT5dFS+bxKXSKT84+gUkqUNNFZ0QZ+4ubW403dakJchZ0lcDA8Uy+owEvauQ2sCQXoEeE6DWgOyMgVlqtTuI3hhArW2IDUCOU3c08y39FNZWLm8aUGwYyBZ3B1x+AP5x7ipLa/UJP9s9VZSnqXPz1QJP4WK48Zesc2szm0o65cZsnd3XbFxjvpxIFmzuu1eMD3d1HPiZd3BKLOEL8y/h+MKsbrwny6uDOZWpgxE9v7pIpuAoqv21vo9hxTF+4a4eSSGfKI3Ncvm2PwR0uNySvDD71AroYkrOwvjw7kVAGLoQ84dYdtv4wCt6yb2JeG4gZfdclEQiiIIr0haUrWWJXolCwVBNEAesGt+/bJAoRuTJ1lUphfcfueZntpIdwhFKpn6MQMRe4wcD1bw== +
+
+ x-ms-client-session-id + 01e9f74d-9912-406b-a2fd-b26a8a8ce478-2014-03-27 19:01:53Z +
+
+ x-ms-client-request-id + 6c4a7521-02ea-4aaf-888b-6a47ebfe864b-2014-03-27 19:03:01Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=/7bi9diWZoKVEfZf/spaVA== +
+
+ + + .SQLSERVERMANAGEMENT + /7bi9diWZoKVEfZf/spaVA== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 419210b3-8ccd-aa09-9ae1-80f8654bc57c +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Thu, 27 Mar 2014 19:03:31 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2014-03-27T19:03:31Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(6)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(6)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(6)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(6)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(6)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(6)/DatabaseCopies" /><title /><updated>2014-03-27T19:03:31Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">6</d:Id><d:Name>testdb3</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2014-03-27T19:02:29.687</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">0</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">104857600</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2014-03-27T12:02:25.577</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-03-27T19:03:24.593Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">2.50</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry></feed> +
+
+ + 7 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(6)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + XzVRSta3pPjtT+ZnqMO3eVgEixVNm9FLqm7Yv0pTfdgXz6vu2k/SSGbSg78QarxNfv1h/R7UdLw/3n+YSGvLkkNHCqRUGaia0Km/61BFykpBAdwkQFBBTCGY/0lXZdPsgju8aRNKhWDzL2lBgz8Hgj7Ihpx0ktgOv44GBqJMUTe1X7RfKIt81Oe4TGDKRTGCVHlQGI+O/EnIcSs63IKAGtLxumiw3aT2k+T91liK25Q8gxsrf/k4ITygJBRjKIy4nyHjMciIoKAv9TfSKANS63Y7W7h4voSChroTTaPmSiYR9d1XR5pTueX/Ups6M2xi3S4SLfO0tk68c9Cci10EpCdLBxw6FeVa76ob7ZLqz3lxZeS0JeuEuIcrl2vaeLRWEzZlNLONT5dFS+bxKXSKT84+gUkqUNNFZ0QZ+4ubW403dakJchZ0lcDA8Uy+owEvauQ2sCQXoEeE6DWgOyMgVlqtTuI3hhArW2IDUCOU3c08y39FNZWLm8aUGwYyBZ3B1x+AP5x7ipLa/UJP9s9VZSnqXPz1QJP4WK48Zesc2szm0o65cZsnd3XbFxjvpxIFmzuu1eMD3d1HPiZd3BKLOEL8y/h+MKsbrwny6uDOZWpgxE9v7pIpuAoqv21vo9hxTF+4a4eSSGfKI3Ncvm2PwR0uNySvDD71AroYkrOwvjw7kVAGLoQ84dYdtv4wCt6yb2JeG4gZfdclEQiiIIr0haUrWWJXolCwVBNEAesGt+/bJAoRuTJ1lUphfcfueZntpIdwhFKpn6MQMRe4wcD1bw== +
+
+ x-ms-client-session-id + 01e9f74d-9912-406b-a2fd-b26a8a8ce478-2014-03-27 19:01:53Z +
+
+ x-ms-client-request-id + 6c4a7521-02ea-4aaf-888b-6a47ebfe864b-2014-03-27 19:03:01Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=/7bi9diWZoKVEfZf/spaVA== +
+
+ + + .SQLSERVERMANAGEMENT + /7bi9diWZoKVEfZf/spaVA== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 419210b3-8ccd-aa09-9ae1-80f8654bc57c +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Thu, 27 Mar 2014 19:03:31 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2014-03-27T19:03:31Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Shared resource allocation.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 8 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(6) + DELETE + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + XzVRSta3pPjtT+ZnqMO3eVgEixVNm9FLqm7Yv0pTfdgXz6vu2k/SSGbSg78QarxNfv1h/R7UdLw/3n+YSGvLkkNHCqRUGaia0Km/61BFykpBAdwkQFBBTCGY/0lXZdPsgju8aRNKhWDzL2lBgz8Hgj7Ihpx0ktgOv44GBqJMUTe1X7RfKIt81Oe4TGDKRTGCVHlQGI+O/EnIcSs63IKAGtLxumiw3aT2k+T91liK25Q8gxsrf/k4ITygJBRjKIy4nyHjMciIoKAv9TfSKANS63Y7W7h4voSChroTTaPmSiYR9d1XR5pTueX/Ups6M2xi3S4SLfO0tk68c9Cci10EpCdLBxw6FeVa76ob7ZLqz3lxZeS0JeuEuIcrl2vaeLRWEzZlNLONT5dFS+bxKXSKT84+gUkqUNNFZ0QZ+4ubW403dakJchZ0lcDA8Uy+owEvauQ2sCQXoEeE6DWgOyMgVlqtTuI3hhArW2IDUCOU3c08y39FNZWLm8aUGwYyBZ3B1x+AP5x7ipLa/UJP9s9VZSnqXPz1QJP4WK48Zesc2szm0o65cZsnd3XbFxjvpxIFmzuu1eMD3d1HPiZd3BKLOEL8y/h+MKsbrwny6uDOZWpgxE9v7pIpuAoqv21vo9hxTF+4a4eSSGfKI3Ncvm2PwR0uNySvDD71AroYkrOwvjw7kVAGLoQ84dYdtv4wCt6yb2JeG4gZfdclEQiiIIr0haUrWWJXolCwVBNEAesGt+/bJAoRuTJ1lUphfcfueZntpIdwhFKpn6MQMRe4wcD1bw== +
+
+ x-ms-client-session-id + 01e9f74d-9912-406b-a2fd-b26a8a8ce478-2014-03-27 19:01:53Z +
+
+ x-ms-client-request-id + 6c4a7521-02ea-4aaf-888b-6a47ebfe864b-2014-03-27 19:03:01Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=/7bi9diWZoKVEfZf/spaVA== +
+
+ + + .SQLSERVERMANAGEMENT + /7bi9diWZoKVEfZf/spaVA== + + + + + application/atom+xml + application/atom+xml,application/xml +
+ + NoContent + +
+ x-ms-request-id + 419210b3-8ccd-aa09-9ae1-80f8654bc57c +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 1.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Thu, 27 Mar 2014 19:03:39 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+
+
+ + UnitTests.GetAzureSqlDatabaseWithSqlAuthByPipe + + + 0 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + cp4BM58k0tc56rQoVF61MaPfJWlj/tKcNiEmJxPashEAxaV8V2sURm4bX0vz9rMJrKavgpNXPI3rrQVG8VOxYaYxOAgA9GSmksGFrP5LebhGZAUGzlO7mtkPTjUPTL6HaIsJavpysBGW0zgbji5giYu1nP99KfAhWMbfcid+RYonaY5VKT47oPk0J24sO6Cstkod3ZoMEFGY3Xd7wx2oi2LwttKXod3b30MzIbyAD6oJaGDIUXqEp+D5GSH65N1Rn6aQefu9gSbZcpE0TZwTWro10g1B8/iI/9HqviuVxfvisEoEtJBAO4pikh+BEcGw1FEBnCQo+Qps19sfOdddXTvC29gbUg2Z9fBpAhemuweRsRkLWzM5/cRZ/cIecAbcmQfJvchGKNMPNhW2nkqPuoBzR/gFrIo7d+R9XmTyclJ3Y5QZWUsjxUfUtlcoDogbZGYlnvAK+k5J2X5LBT1Lr8PSQxlYj3sTQdLUxx+tyQFzEJhDiKXaaA6o5HVGB0uinR4xbpI0peutEAPeOeIQ/u2NmjfBltnXN5GSJ0xhGhAKCSOB3SVVZLCOfRxUXN9c+mxAUVIxLQ248eaTXrIwD0ZcIifTXuhknbZ2fzwlAT0YvIuKtakO+ul5sXU6cFjBT16NdZLXVvjio8RYYqWhzfptOH152uyXk/GFlQoFBQUYsU2RnxCLiAiRvdb70+TmTWBhL49sDYpJXQMRzIPehOIMR8LQcidyT1kRhNri5klvTgDa4OggcnjskJC0v8KX/ZT91/GI1gqosx01KDdQDQ== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 30367776-7fd0-45d0-a30a-878968eaa8a4-2013-06-28 18:54:56Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=pTNxwIq7e+faUV+taLb2EQ== +
+
+ + + .SQLSERVERMANAGEMENT + pTNxwIq7e+faUV+taLb2EQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 89ab14ab-3c1f-4555-8074-264b323658fc +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:56 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2013-06-28T18:54:56Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(1)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(1)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(1)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(1)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(1)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(1)/DatabaseCopies" /><title /><updated>2013-06-28T18:54:56Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">1</d:Id><d:Name>master</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">a45fea0c-e63c-4bf0-9f81-9964c86b7d2a</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">a45fea0c-e63c-4bf0-9f81-9964c86b7d2a</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2013-06-28T18:38:34.18</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">5</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">5368709120</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2013-06-28T11:38:32.23</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2013-06-28T18:38:32.23Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">true</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /></m:properties></content></entry><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(4)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(4)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(4)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(4)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(4)/DatabaseCopies" /><title /><updated>2013-06-28T18:54:56Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">4</d:Id><d:Name>testdb1</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2013-06-28T18:54:54.77</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">1</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">1073741824</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2013-06-28T11:54:54</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2013-06-28T18:54:54Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /></m:properties></content></entry><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(5)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(5)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(5)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(5)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(5)/DatabaseCopies" /><title /><updated>2013-06-28T18:54:56Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">5</d:Id><d:Name>testdb2</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2013-06-28T18:54:56.007</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">5</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">5368709120</d:MaxSizeBytes><d:CollationName>Japanese_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2013-06-28T11:54:54.993</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2013-06-28T18:54:54.993Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /></m:properties></content></entry></feed> +
+
+ + 1 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(1)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + cp4BM58k0tc56rQoVF61MaPfJWlj/tKcNiEmJxPashEAxaV8V2sURm4bX0vz9rMJrKavgpNXPI3rrQVG8VOxYaYxOAgA9GSmksGFrP5LebhGZAUGzlO7mtkPTjUPTL6HaIsJavpysBGW0zgbji5giYu1nP99KfAhWMbfcid+RYonaY5VKT47oPk0J24sO6Cstkod3ZoMEFGY3Xd7wx2oi2LwttKXod3b30MzIbyAD6oJaGDIUXqEp+D5GSH65N1Rn6aQefu9gSbZcpE0TZwTWro10g1B8/iI/9HqviuVxfvisEoEtJBAO4pikh+BEcGw1FEBnCQo+Qps19sfOdddXTvC29gbUg2Z9fBpAhemuweRsRkLWzM5/cRZ/cIecAbcmQfJvchGKNMPNhW2nkqPuoBzR/gFrIo7d+R9XmTyclJ3Y5QZWUsjxUfUtlcoDogbZGYlnvAK+k5J2X5LBT1Lr8PSQxlYj3sTQdLUxx+tyQFzEJhDiKXaaA6o5HVGB0uinR4xbpI0peutEAPeOeIQ/u2NmjfBltnXN5GSJ0xhGhAKCSOB3SVVZLCOfRxUXN9c+mxAUVIxLQ248eaTXrIwD0ZcIifTXuhknbZ2fzwlAT0YvIuKtakO+ul5sXU6cFjBT16NdZLXVvjio8RYYqWhzfptOH152uyXk/GFlQoFBQUYsU2RnxCLiAiRvdb70+TmTWBhL49sDYpJXQMRzIPehOIMR8LQcidyT1kRhNri5klvTgDa4OggcnjskJC0v8KX/ZT91/GI1gqosx01KDdQDQ== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 30367776-7fd0-45d0-a30a-878968eaa8a4-2013-06-28 18:54:56Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=pTNxwIq7e+faUV+taLb2EQ== +
+
+ + + .SQLSERVERMANAGEMENT + pTNxwIq7e+faUV+taLb2EQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 89ab14ab-3c1f-4555-8074-264b323658fc +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:56 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'a45fea0c-e63c-4bf0-9f81-9964c86b7d2a')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'a45fea0c-e63c-4bf0-9f81-9964c86b7d2a')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'a45fea0c-e63c-4bf0-9f81-9964c86b7d2a')/DimensionSettings" /><title /><updated>2013-06-28T18:54:56Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">a45fea0c-e63c-4bf0-9f81-9964c86b7d2a</d:Id><d:Name>System Standard</d:Name><d:Description>Used for master database only.</d:Description><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault><d:IsSystem m:type="Edm.Boolean">true</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 2 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + cp4BM58k0tc56rQoVF61MaPfJWlj/tKcNiEmJxPashEAxaV8V2sURm4bX0vz9rMJrKavgpNXPI3rrQVG8VOxYaYxOAgA9GSmksGFrP5LebhGZAUGzlO7mtkPTjUPTL6HaIsJavpysBGW0zgbji5giYu1nP99KfAhWMbfcid+RYonaY5VKT47oPk0J24sO6Cstkod3ZoMEFGY3Xd7wx2oi2LwttKXod3b30MzIbyAD6oJaGDIUXqEp+D5GSH65N1Rn6aQefu9gSbZcpE0TZwTWro10g1B8/iI/9HqviuVxfvisEoEtJBAO4pikh+BEcGw1FEBnCQo+Qps19sfOdddXTvC29gbUg2Z9fBpAhemuweRsRkLWzM5/cRZ/cIecAbcmQfJvchGKNMPNhW2nkqPuoBzR/gFrIo7d+R9XmTyclJ3Y5QZWUsjxUfUtlcoDogbZGYlnvAK+k5J2X5LBT1Lr8PSQxlYj3sTQdLUxx+tyQFzEJhDiKXaaA6o5HVGB0uinR4xbpI0peutEAPeOeIQ/u2NmjfBltnXN5GSJ0xhGhAKCSOB3SVVZLCOfRxUXN9c+mxAUVIxLQ248eaTXrIwD0ZcIifTXuhknbZ2fzwlAT0YvIuKtakO+ul5sXU6cFjBT16NdZLXVvjio8RYYqWhzfptOH152uyXk/GFlQoFBQUYsU2RnxCLiAiRvdb70+TmTWBhL49sDYpJXQMRzIPehOIMR8LQcidyT1kRhNri5klvTgDa4OggcnjskJC0v8KX/ZT91/GI1gqosx01KDdQDQ== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 30367776-7fd0-45d0-a30a-878968eaa8a4-2013-06-28 18:54:56Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=pTNxwIq7e+faUV+taLb2EQ== +
+
+ + + .SQLSERVERMANAGEMENT + pTNxwIq7e+faUV+taLb2EQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 89ab14ab-3c1f-4555-8074-264b323658fc +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:56 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2013-06-28T18:54:56Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Resource capacity is not reserved.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 3 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + cp4BM58k0tc56rQoVF61MaPfJWlj/tKcNiEmJxPashEAxaV8V2sURm4bX0vz9rMJrKavgpNXPI3rrQVG8VOxYaYxOAgA9GSmksGFrP5LebhGZAUGzlO7mtkPTjUPTL6HaIsJavpysBGW0zgbji5giYu1nP99KfAhWMbfcid+RYonaY5VKT47oPk0J24sO6Cstkod3ZoMEFGY3Xd7wx2oi2LwttKXod3b30MzIbyAD6oJaGDIUXqEp+D5GSH65N1Rn6aQefu9gSbZcpE0TZwTWro10g1B8/iI/9HqviuVxfvisEoEtJBAO4pikh+BEcGw1FEBnCQo+Qps19sfOdddXTvC29gbUg2Z9fBpAhemuweRsRkLWzM5/cRZ/cIecAbcmQfJvchGKNMPNhW2nkqPuoBzR/gFrIo7d+R9XmTyclJ3Y5QZWUsjxUfUtlcoDogbZGYlnvAK+k5J2X5LBT1Lr8PSQxlYj3sTQdLUxx+tyQFzEJhDiKXaaA6o5HVGB0uinR4xbpI0peutEAPeOeIQ/u2NmjfBltnXN5GSJ0xhGhAKCSOB3SVVZLCOfRxUXN9c+mxAUVIxLQ248eaTXrIwD0ZcIifTXuhknbZ2fzwlAT0YvIuKtakO+ul5sXU6cFjBT16NdZLXVvjio8RYYqWhzfptOH152uyXk/GFlQoFBQUYsU2RnxCLiAiRvdb70+TmTWBhL49sDYpJXQMRzIPehOIMR8LQcidyT1kRhNri5klvTgDa4OggcnjskJC0v8KX/ZT91/GI1gqosx01KDdQDQ== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 30367776-7fd0-45d0-a30a-878968eaa8a4-2013-06-28 18:54:56Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=pTNxwIq7e+faUV+taLb2EQ== +
+
+ + + .SQLSERVERMANAGEMENT + pTNxwIq7e+faUV+taLb2EQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 89ab14ab-3c1f-4555-8074-264b323658fc +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:56 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2013-06-28T18:54:56Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Resource capacity is not reserved.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 4 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases()?$filter=Name%20eq%20'testdb1'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + cp4BM58k0tc56rQoVF61MaPfJWlj/tKcNiEmJxPashEAxaV8V2sURm4bX0vz9rMJrKavgpNXPI3rrQVG8VOxYaYxOAgA9GSmksGFrP5LebhGZAUGzlO7mtkPTjUPTL6HaIsJavpysBGW0zgbji5giYu1nP99KfAhWMbfcid+RYonaY5VKT47oPk0J24sO6Cstkod3ZoMEFGY3Xd7wx2oi2LwttKXod3b30MzIbyAD6oJaGDIUXqEp+D5GSH65N1Rn6aQefu9gSbZcpE0TZwTWro10g1B8/iI/9HqviuVxfvisEoEtJBAO4pikh+BEcGw1FEBnCQo+Qps19sfOdddXTvC29gbUg2Z9fBpAhemuweRsRkLWzM5/cRZ/cIecAbcmQfJvchGKNMPNhW2nkqPuoBzR/gFrIo7d+R9XmTyclJ3Y5QZWUsjxUfUtlcoDogbZGYlnvAK+k5J2X5LBT1Lr8PSQxlYj3sTQdLUxx+tyQFzEJhDiKXaaA6o5HVGB0uinR4xbpI0peutEAPeOeIQ/u2NmjfBltnXN5GSJ0xhGhAKCSOB3SVVZLCOfRxUXN9c+mxAUVIxLQ248eaTXrIwD0ZcIifTXuhknbZ2fzwlAT0YvIuKtakO+ul5sXU6cFjBT16NdZLXVvjio8RYYqWhzfptOH152uyXk/GFlQoFBQUYsU2RnxCLiAiRvdb70+TmTWBhL49sDYpJXQMRzIPehOIMR8LQcidyT1kRhNri5klvTgDa4OggcnjskJC0v8KX/ZT91/GI1gqosx01KDdQDQ== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 30367776-7fd0-45d0-a30a-878968eaa8a4-2013-06-28 18:54:56Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=pTNxwIq7e+faUV+taLb2EQ== +
+
+ + + .SQLSERVERMANAGEMENT + pTNxwIq7e+faUV+taLb2EQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 89ab14ab-3c1f-4555-8074-264b323658fc +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:56 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2013-06-28T18:54:56Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(4)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(4)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(4)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(4)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(4)/DatabaseCopies" /><title /><updated>2013-06-28T18:54:56Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">4</d:Id><d:Name>testdb1</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2013-06-28T18:54:54.77</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">1</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">1073741824</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2013-06-28T11:54:54</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2013-06-28T18:54:54Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /></m:properties></content></entry></feed> +
+
+ + 5 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + cp4BM58k0tc56rQoVF61MaPfJWlj/tKcNiEmJxPashEAxaV8V2sURm4bX0vz9rMJrKavgpNXPI3rrQVG8VOxYaYxOAgA9GSmksGFrP5LebhGZAUGzlO7mtkPTjUPTL6HaIsJavpysBGW0zgbji5giYu1nP99KfAhWMbfcid+RYonaY5VKT47oPk0J24sO6Cstkod3ZoMEFGY3Xd7wx2oi2LwttKXod3b30MzIbyAD6oJaGDIUXqEp+D5GSH65N1Rn6aQefu9gSbZcpE0TZwTWro10g1B8/iI/9HqviuVxfvisEoEtJBAO4pikh+BEcGw1FEBnCQo+Qps19sfOdddXTvC29gbUg2Z9fBpAhemuweRsRkLWzM5/cRZ/cIecAbcmQfJvchGKNMPNhW2nkqPuoBzR/gFrIo7d+R9XmTyclJ3Y5QZWUsjxUfUtlcoDogbZGYlnvAK+k5J2X5LBT1Lr8PSQxlYj3sTQdLUxx+tyQFzEJhDiKXaaA6o5HVGB0uinR4xbpI0peutEAPeOeIQ/u2NmjfBltnXN5GSJ0xhGhAKCSOB3SVVZLCOfRxUXN9c+mxAUVIxLQ248eaTXrIwD0ZcIifTXuhknbZ2fzwlAT0YvIuKtakO+ul5sXU6cFjBT16NdZLXVvjio8RYYqWhzfptOH152uyXk/GFlQoFBQUYsU2RnxCLiAiRvdb70+TmTWBhL49sDYpJXQMRzIPehOIMR8LQcidyT1kRhNri5klvTgDa4OggcnjskJC0v8KX/ZT91/GI1gqosx01KDdQDQ== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 30367776-7fd0-45d0-a30a-878968eaa8a4-2013-06-28 18:54:56Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=pTNxwIq7e+faUV+taLb2EQ== +
+
+ + + .SQLSERVERMANAGEMENT + pTNxwIq7e+faUV+taLb2EQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 89ab14ab-3c1f-4555-8074-264b323658fc +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:56 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2013-06-28T18:54:56Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Resource capacity is not reserved.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 6 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases()?$filter=Name%20eq%20'testdb2'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + cp4BM58k0tc56rQoVF61MaPfJWlj/tKcNiEmJxPashEAxaV8V2sURm4bX0vz9rMJrKavgpNXPI3rrQVG8VOxYaYxOAgA9GSmksGFrP5LebhGZAUGzlO7mtkPTjUPTL6HaIsJavpysBGW0zgbji5giYu1nP99KfAhWMbfcid+RYonaY5VKT47oPk0J24sO6Cstkod3ZoMEFGY3Xd7wx2oi2LwttKXod3b30MzIbyAD6oJaGDIUXqEp+D5GSH65N1Rn6aQefu9gSbZcpE0TZwTWro10g1B8/iI/9HqviuVxfvisEoEtJBAO4pikh+BEcGw1FEBnCQo+Qps19sfOdddXTvC29gbUg2Z9fBpAhemuweRsRkLWzM5/cRZ/cIecAbcmQfJvchGKNMPNhW2nkqPuoBzR/gFrIo7d+R9XmTyclJ3Y5QZWUsjxUfUtlcoDogbZGYlnvAK+k5J2X5LBT1Lr8PSQxlYj3sTQdLUxx+tyQFzEJhDiKXaaA6o5HVGB0uinR4xbpI0peutEAPeOeIQ/u2NmjfBltnXN5GSJ0xhGhAKCSOB3SVVZLCOfRxUXN9c+mxAUVIxLQ248eaTXrIwD0ZcIifTXuhknbZ2fzwlAT0YvIuKtakO+ul5sXU6cFjBT16NdZLXVvjio8RYYqWhzfptOH152uyXk/GFlQoFBQUYsU2RnxCLiAiRvdb70+TmTWBhL49sDYpJXQMRzIPehOIMR8LQcidyT1kRhNri5klvTgDa4OggcnjskJC0v8KX/ZT91/GI1gqosx01KDdQDQ== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 30367776-7fd0-45d0-a30a-878968eaa8a4-2013-06-28 18:54:56Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=pTNxwIq7e+faUV+taLb2EQ== +
+
+ + + .SQLSERVERMANAGEMENT + pTNxwIq7e+faUV+taLb2EQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 89ab14ab-3c1f-4555-8074-264b323658fc +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:56 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2013-06-28T18:54:56Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(5)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(5)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(5)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(5)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(5)/DatabaseCopies" /><title /><updated>2013-06-28T18:54:56Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">5</d:Id><d:Name>testdb2</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2013-06-28T18:54:56.007</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">5</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">5368709120</d:MaxSizeBytes><d:CollationName>Japanese_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2013-06-28T11:54:54.993</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2013-06-28T18:54:54.993Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /></m:properties></content></entry></feed> +
+
+ + 7 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + cp4BM58k0tc56rQoVF61MaPfJWlj/tKcNiEmJxPashEAxaV8V2sURm4bX0vz9rMJrKavgpNXPI3rrQVG8VOxYaYxOAgA9GSmksGFrP5LebhGZAUGzlO7mtkPTjUPTL6HaIsJavpysBGW0zgbji5giYu1nP99KfAhWMbfcid+RYonaY5VKT47oPk0J24sO6Cstkod3ZoMEFGY3Xd7wx2oi2LwttKXod3b30MzIbyAD6oJaGDIUXqEp+D5GSH65N1Rn6aQefu9gSbZcpE0TZwTWro10g1B8/iI/9HqviuVxfvisEoEtJBAO4pikh+BEcGw1FEBnCQo+Qps19sfOdddXTvC29gbUg2Z9fBpAhemuweRsRkLWzM5/cRZ/cIecAbcmQfJvchGKNMPNhW2nkqPuoBzR/gFrIo7d+R9XmTyclJ3Y5QZWUsjxUfUtlcoDogbZGYlnvAK+k5J2X5LBT1Lr8PSQxlYj3sTQdLUxx+tyQFzEJhDiKXaaA6o5HVGB0uinR4xbpI0peutEAPeOeIQ/u2NmjfBltnXN5GSJ0xhGhAKCSOB3SVVZLCOfRxUXN9c+mxAUVIxLQ248eaTXrIwD0ZcIifTXuhknbZ2fzwlAT0YvIuKtakO+ul5sXU6cFjBT16NdZLXVvjio8RYYqWhzfptOH152uyXk/GFlQoFBQUYsU2RnxCLiAiRvdb70+TmTWBhL49sDYpJXQMRzIPehOIMR8LQcidyT1kRhNri5klvTgDa4OggcnjskJC0v8KX/ZT91/GI1gqosx01KDdQDQ== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 30367776-7fd0-45d0-a30a-878968eaa8a4-2013-06-28 18:54:56Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=pTNxwIq7e+faUV+taLb2EQ== +
+
+ + + .SQLSERVERMANAGEMENT + pTNxwIq7e+faUV+taLb2EQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 89ab14ab-3c1f-4555-8074-264b323658fc +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:56 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2013-06-28T18:54:56Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Resource capacity is not reserved.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 8 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases()?$filter=Name%20eq%20'testdb1'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + cp4BM58k0tc56rQoVF61MaPfJWlj/tKcNiEmJxPashEAxaV8V2sURm4bX0vz9rMJrKavgpNXPI3rrQVG8VOxYaYxOAgA9GSmksGFrP5LebhGZAUGzlO7mtkPTjUPTL6HaIsJavpysBGW0zgbji5giYu1nP99KfAhWMbfcid+RYonaY5VKT47oPk0J24sO6Cstkod3ZoMEFGY3Xd7wx2oi2LwttKXod3b30MzIbyAD6oJaGDIUXqEp+D5GSH65N1Rn6aQefu9gSbZcpE0TZwTWro10g1B8/iI/9HqviuVxfvisEoEtJBAO4pikh+BEcGw1FEBnCQo+Qps19sfOdddXTvC29gbUg2Z9fBpAhemuweRsRkLWzM5/cRZ/cIecAbcmQfJvchGKNMPNhW2nkqPuoBzR/gFrIo7d+R9XmTyclJ3Y5QZWUsjxUfUtlcoDogbZGYlnvAK+k5J2X5LBT1Lr8PSQxlYj3sTQdLUxx+tyQFzEJhDiKXaaA6o5HVGB0uinR4xbpI0peutEAPeOeIQ/u2NmjfBltnXN5GSJ0xhGhAKCSOB3SVVZLCOfRxUXN9c+mxAUVIxLQ248eaTXrIwD0ZcIifTXuhknbZ2fzwlAT0YvIuKtakO+ul5sXU6cFjBT16NdZLXVvjio8RYYqWhzfptOH152uyXk/GFlQoFBQUYsU2RnxCLiAiRvdb70+TmTWBhL49sDYpJXQMRzIPehOIMR8LQcidyT1kRhNri5klvTgDa4OggcnjskJC0v8KX/ZT91/GI1gqosx01KDdQDQ== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 30367776-7fd0-45d0-a30a-878968eaa8a4-2013-06-28 18:54:56Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=pTNxwIq7e+faUV+taLb2EQ== +
+
+ + + .SQLSERVERMANAGEMENT + pTNxwIq7e+faUV+taLb2EQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 89ab14ab-3c1f-4555-8074-264b323658fc +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:56 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2013-06-28T18:54:56Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(4)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(4)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(4)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(4)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(4)/DatabaseCopies" /><title /><updated>2013-06-28T18:54:56Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">4</d:Id><d:Name>testdb1</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2013-06-28T18:54:54.77</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">1</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">1073741824</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2013-06-28T11:54:54</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2013-06-28T18:54:54Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /></m:properties></content></entry></feed> +
+
+ + 9 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + cp4BM58k0tc56rQoVF61MaPfJWlj/tKcNiEmJxPashEAxaV8V2sURm4bX0vz9rMJrKavgpNXPI3rrQVG8VOxYaYxOAgA9GSmksGFrP5LebhGZAUGzlO7mtkPTjUPTL6HaIsJavpysBGW0zgbji5giYu1nP99KfAhWMbfcid+RYonaY5VKT47oPk0J24sO6Cstkod3ZoMEFGY3Xd7wx2oi2LwttKXod3b30MzIbyAD6oJaGDIUXqEp+D5GSH65N1Rn6aQefu9gSbZcpE0TZwTWro10g1B8/iI/9HqviuVxfvisEoEtJBAO4pikh+BEcGw1FEBnCQo+Qps19sfOdddXTvC29gbUg2Z9fBpAhemuweRsRkLWzM5/cRZ/cIecAbcmQfJvchGKNMPNhW2nkqPuoBzR/gFrIo7d+R9XmTyclJ3Y5QZWUsjxUfUtlcoDogbZGYlnvAK+k5J2X5LBT1Lr8PSQxlYj3sTQdLUxx+tyQFzEJhDiKXaaA6o5HVGB0uinR4xbpI0peutEAPeOeIQ/u2NmjfBltnXN5GSJ0xhGhAKCSOB3SVVZLCOfRxUXN9c+mxAUVIxLQ248eaTXrIwD0ZcIifTXuhknbZ2fzwlAT0YvIuKtakO+ul5sXU6cFjBT16NdZLXVvjio8RYYqWhzfptOH152uyXk/GFlQoFBQUYsU2RnxCLiAiRvdb70+TmTWBhL49sDYpJXQMRzIPehOIMR8LQcidyT1kRhNri5klvTgDa4OggcnjskJC0v8KX/ZT91/GI1gqosx01KDdQDQ== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 30367776-7fd0-45d0-a30a-878968eaa8a4-2013-06-28 18:54:56Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=pTNxwIq7e+faUV+taLb2EQ== +
+
+ + + .SQLSERVERMANAGEMENT + pTNxwIq7e+faUV+taLb2EQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 89ab14ab-3c1f-4555-8074-264b323658fc +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:56 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2013-06-28T18:54:56Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Resource capacity is not reserved.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 10 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases()?$filter=Name%20eq%20'testdb2'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + cp4BM58k0tc56rQoVF61MaPfJWlj/tKcNiEmJxPashEAxaV8V2sURm4bX0vz9rMJrKavgpNXPI3rrQVG8VOxYaYxOAgA9GSmksGFrP5LebhGZAUGzlO7mtkPTjUPTL6HaIsJavpysBGW0zgbji5giYu1nP99KfAhWMbfcid+RYonaY5VKT47oPk0J24sO6Cstkod3ZoMEFGY3Xd7wx2oi2LwttKXod3b30MzIbyAD6oJaGDIUXqEp+D5GSH65N1Rn6aQefu9gSbZcpE0TZwTWro10g1B8/iI/9HqviuVxfvisEoEtJBAO4pikh+BEcGw1FEBnCQo+Qps19sfOdddXTvC29gbUg2Z9fBpAhemuweRsRkLWzM5/cRZ/cIecAbcmQfJvchGKNMPNhW2nkqPuoBzR/gFrIo7d+R9XmTyclJ3Y5QZWUsjxUfUtlcoDogbZGYlnvAK+k5J2X5LBT1Lr8PSQxlYj3sTQdLUxx+tyQFzEJhDiKXaaA6o5HVGB0uinR4xbpI0peutEAPeOeIQ/u2NmjfBltnXN5GSJ0xhGhAKCSOB3SVVZLCOfRxUXN9c+mxAUVIxLQ248eaTXrIwD0ZcIifTXuhknbZ2fzwlAT0YvIuKtakO+ul5sXU6cFjBT16NdZLXVvjio8RYYqWhzfptOH152uyXk/GFlQoFBQUYsU2RnxCLiAiRvdb70+TmTWBhL49sDYpJXQMRzIPehOIMR8LQcidyT1kRhNri5klvTgDa4OggcnjskJC0v8KX/ZT91/GI1gqosx01KDdQDQ== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 30367776-7fd0-45d0-a30a-878968eaa8a4-2013-06-28 18:54:56Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=pTNxwIq7e+faUV+taLb2EQ== +
+
+ + + .SQLSERVERMANAGEMENT + pTNxwIq7e+faUV+taLb2EQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 89ab14ab-3c1f-4555-8074-264b323658fc +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:56 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2013-06-28T18:54:56Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(5)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(5)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(5)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(5)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(5)/DatabaseCopies" /><title /><updated>2013-06-28T18:54:56Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">5</d:Id><d:Name>testdb2</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2013-06-28T18:54:56.007</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">5</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">5368709120</d:MaxSizeBytes><d:CollationName>Japanese_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2013-06-28T11:54:54.993</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2013-06-28T18:54:54.993Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /></m:properties></content></entry></feed> +
+
+ + 11 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + cp4BM58k0tc56rQoVF61MaPfJWlj/tKcNiEmJxPashEAxaV8V2sURm4bX0vz9rMJrKavgpNXPI3rrQVG8VOxYaYxOAgA9GSmksGFrP5LebhGZAUGzlO7mtkPTjUPTL6HaIsJavpysBGW0zgbji5giYu1nP99KfAhWMbfcid+RYonaY5VKT47oPk0J24sO6Cstkod3ZoMEFGY3Xd7wx2oi2LwttKXod3b30MzIbyAD6oJaGDIUXqEp+D5GSH65N1Rn6aQefu9gSbZcpE0TZwTWro10g1B8/iI/9HqviuVxfvisEoEtJBAO4pikh+BEcGw1FEBnCQo+Qps19sfOdddXTvC29gbUg2Z9fBpAhemuweRsRkLWzM5/cRZ/cIecAbcmQfJvchGKNMPNhW2nkqPuoBzR/gFrIo7d+R9XmTyclJ3Y5QZWUsjxUfUtlcoDogbZGYlnvAK+k5J2X5LBT1Lr8PSQxlYj3sTQdLUxx+tyQFzEJhDiKXaaA6o5HVGB0uinR4xbpI0peutEAPeOeIQ/u2NmjfBltnXN5GSJ0xhGhAKCSOB3SVVZLCOfRxUXN9c+mxAUVIxLQ248eaTXrIwD0ZcIifTXuhknbZ2fzwlAT0YvIuKtakO+ul5sXU6cFjBT16NdZLXVvjio8RYYqWhzfptOH152uyXk/GFlQoFBQUYsU2RnxCLiAiRvdb70+TmTWBhL49sDYpJXQMRzIPehOIMR8LQcidyT1kRhNri5klvTgDa4OggcnjskJC0v8KX/ZT91/GI1gqosx01KDdQDQ== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 30367776-7fd0-45d0-a30a-878968eaa8a4-2013-06-28 18:54:56Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=pTNxwIq7e+faUV+taLb2EQ== +
+
+ + + .SQLSERVERMANAGEMENT + pTNxwIq7e+faUV+taLb2EQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 89ab14ab-3c1f-4555-8074-264b323658fc +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:56 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2013-06-28T18:54:56Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Resource capacity is not reserved.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+
+
+ + UnitTest.GetAzureSqlDatabaseServerQuotaSqlAuthTest + + + 0 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServerQuotas + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + ci/FY0TPOQObSQE2NfMcK9K5mDAJ02HMmmva4rBpRNJ9MVqBSr1UH9gEdSgXX28+Wbq5lJ0KTyF5wNwv3sUGeA3Qu+RvFaPW+CYF2g5oENd9mmVgIR/YuBVEE27Z4zqIvhOmRJDLoX5mOO6vthYwrQ6lJbUAFR1eYO2TO8hwwrvtEVwI5E8o5DDV5pIHYAJAmfEVvmP0I36HvLZtno3gfIPXha+QRkLh+EaTThpG1JjHQUlQDRExZx4GJM+xEQWu9vVXPhxpYPZtXY1KfYWSFoEEAWH9Ll3X5A3Pr8U9uRmSAO9UBLWn6g0junrxjCPOjJ0XWvYTWLRNd4si/RxZT20VWIM5GqLJ57djQA5HBUBNBUzEzFulNTxhz8EHBAUOjDzJMXIoyJ5dH3UMNXwLf7+a+5J8c1Up/xjJVuSoLBP12OyihuzJiYwhU6EQO6GuEnRScAij2hGy+zK5yVTC7VLSpuZQfq94fBrLWk0fDAV795uSj4A27U80F0iz8GgAeFmoAUJK5CXflI5dG8KLoQ/CAh2bf0+NDJoXXjtIz2GxVflh/R+p1KDh6qGVJTgjgKsXlVr1E/Lbv6yO4sqirJxJN/1w6l+rVghNdBHAS5pOI30hk/M+PC0a+esseLCr0Am2PrYrUOU6v5DOIrunyfuYrcLM9VI+gqG+0GIXSPMKcBv3lB99nbM3ADquOPLjGE4E3KXFfbNVDDMwia1l+IUGd3qMu2Y9obtB6BmIgrS8ckV1/UGcLZPWnI94FlsNouyrQldUmC6/OOk1JgQQFw== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + de108ef9-45cd-451e-92cb-6e2e48ce3128-2013-06-28 18:54:57Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=Va/KSaWS7tDiYc0OjyizaA== +
+
+ + + .SQLSERVERMANAGEMENT + Va/KSaWS7tDiYc0OjyizaA== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 9f8409aa-859a-7d98-9ecc-e8670b301c91 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:57 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServerQuotas</id><title type="text">ServerQuotas</title><updated>2013-06-28T18:54:57Z</updated><link rel="self" title="ServerQuotas" href="ServerQuotas" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServerQuotas('premium_databases')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServerQuota" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServerQuota" href="ServerQuotas('premium_databases')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="ServerQuotas('premium_databases')/Server" /><title /><updated>2013-06-28T18:54:57Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Name>premium_databases</d:Name><d:Value m:type="Edm.Int32">100</d:Value></m:properties></content></entry></feed> +
+
+ + 1 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServerQuotas('Premium_Databases') + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + ci/FY0TPOQObSQE2NfMcK9K5mDAJ02HMmmva4rBpRNJ9MVqBSr1UH9gEdSgXX28+Wbq5lJ0KTyF5wNwv3sUGeA3Qu+RvFaPW+CYF2g5oENd9mmVgIR/YuBVEE27Z4zqIvhOmRJDLoX5mOO6vthYwrQ6lJbUAFR1eYO2TO8hwwrvtEVwI5E8o5DDV5pIHYAJAmfEVvmP0I36HvLZtno3gfIPXha+QRkLh+EaTThpG1JjHQUlQDRExZx4GJM+xEQWu9vVXPhxpYPZtXY1KfYWSFoEEAWH9Ll3X5A3Pr8U9uRmSAO9UBLWn6g0junrxjCPOjJ0XWvYTWLRNd4si/RxZT20VWIM5GqLJ57djQA5HBUBNBUzEzFulNTxhz8EHBAUOjDzJMXIoyJ5dH3UMNXwLf7+a+5J8c1Up/xjJVuSoLBP12OyihuzJiYwhU6EQO6GuEnRScAij2hGy+zK5yVTC7VLSpuZQfq94fBrLWk0fDAV795uSj4A27U80F0iz8GgAeFmoAUJK5CXflI5dG8KLoQ/CAh2bf0+NDJoXXjtIz2GxVflh/R+p1KDh6qGVJTgjgKsXlVr1E/Lbv6yO4sqirJxJN/1w6l+rVghNdBHAS5pOI30hk/M+PC0a+esseLCr0Am2PrYrUOU6v5DOIrunyfuYrcLM9VI+gqG+0GIXSPMKcBv3lB99nbM3ADquOPLjGE4E3KXFfbNVDDMwia1l+IUGd3qMu2Y9obtB6BmIgrS8ckV1/UGcLZPWnI94FlsNouyrQldUmC6/OOk1JgQQFw== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + de108ef9-45cd-451e-92cb-6e2e48ce3128-2013-06-28 18:54:57Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=Va/KSaWS7tDiYc0OjyizaA== +
+
+ + + .SQLSERVERMANAGEMENT + Va/KSaWS7tDiYc0OjyizaA== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 9f8409aa-859a-7d98-9ecc-e8670b301c91 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:57 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServerQuotas('premium_databases')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServerQuota" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServerQuota" href="ServerQuotas('premium_databases')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="ServerQuotas('premium_databases')/Server" /><title /><updated>2013-06-28T18:54:57Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Name>premium_databases</d:Name><d:Value m:type="Edm.Int32">100</d:Value></m:properties></content></entry> +
+
+
+
+ + UnitTest.AzureSqlDatabaseServerTests + + + 0 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/2.0.0.0 AzurePowershell/v0.8.8 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + c0f8aa73-8d4d-4e89-b965-76c086de4059-2014-09-08 18:28:02Z +
+
+ x-ms-client-request-id + d6cd9ade-423c-4041-9931-cdea5b20bad4-2014-09-08 18:28:02Z +
+
+ + <Server xmlns="http://schemas.microsoft.com/sqlazure/2010/12/"> + <AdministratorLogin>mylogin</AdministratorLogin> + <AdministratorLoginPassword>Pa$$w0rd!</AdministratorLoginPassword> + <Location>East Asia</Location> +</Server> + application/xml; charset=utf-8 + +
+ + Created + +
+ x-ms-request-id + 0d0606fa-dd66-4ed5-acdd-4b261b1e7e9e +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Mon, 08 Sep 2014 18:28:45 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServerName FullyQualifiedDomainName="y2nzad0rse.database.windows.net" xmlns="http://schemas.microsoft.com/sqlazure/2010/12/">y2nzad0rse</ServerName> +
+
+ + 1 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/2.0.0.0 AzurePowershell/v0.8.8 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + c0f8aa73-8d4d-4e89-b965-76c086de4059-2014-09-08 18:28:02Z +
+
+ x-ms-client-request-id + cd50a7a6-9194-4d5f-80d0-4a9924f962f5-2014-09-08 18:28:46Z +
+
+ + <Server xmlns="http://schemas.microsoft.com/sqlazure/2010/12/"> + <AdministratorLogin>mylogin</AdministratorLogin> + <AdministratorLoginPassword>Pa$$w0rd</AdministratorLoginPassword> + <Location>East Asia</Location> +</Server> + application/xml; charset=utf-8 + +
+ + Created + +
+ x-ms-request-id + 675c1ce8-4714-4de6-bb20-73b3f85c0a65 +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Mon, 08 Sep 2014 18:29:57 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServerName FullyQualifiedDomainName="zd1yhph61u.database.windows.net" xmlns="http://schemas.microsoft.com/sqlazure/2010/12/">zd1yhph61u</ServerName> +
+
+ + 2 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/2.0.0.0 AzurePowershell/v0.8.8 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + c0f8aa73-8d4d-4e89-b965-76c086de4059-2014-09-08 18:28:02Z +
+
+ x-ms-client-request-id + 8b26d502-96a5-46c6-8527-9ff6aa5c68f8-2014-09-08 18:29:57Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 5b134439-eb63-43d6-bcf8-e34d4e99d33c +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Mon, 08 Sep 2014 18:29:57 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <Servers xmlns="http://schemas.microsoft.com/sqlazure/2010/12/"> + + <Server> + <Name>y2nzad0rse</Name> + <AdministratorLogin>mylogin</AdministratorLogin> + <Location>East Asia</Location> + <FullyQualifiedDomainName>y2nzad0rse.database.windows.net</FullyQualifiedDomainName> + <Version>2.0</Version> + <State>Ready</State> + </Server> + <Server> + <Name>zd1yhph61u</Name> + <AdministratorLogin>mylogin</AdministratorLogin> + <Location>East Asia</Location> + <FullyQualifiedDomainName>zd1yhph61u.database.windows.net</FullyQualifiedDomainName> + <Version>2.0</Version> + <State>Ready</State> + </Server> +</Servers> +
+
+ + 3 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/y2nzad0rse?op=ResetPassword + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/2.0.0.0 AzurePowershell/v0.8.8 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + c0f8aa73-8d4d-4e89-b965-76c086de4059-2014-09-08 18:28:02Z +
+
+ x-ms-client-request-id + 08bf5358-6ce4-48e6-8b06-857157744bef-2014-09-08 18:29:57Z +
+
+ + <AdministratorLoginPassword xmlns="http://schemas.microsoft.com/sqlazure/2010/12/">Pa$$w0rd2</AdministratorLoginPassword> + application/xml; charset=utf-8 + +
+ + OK + +
+ x-ms-request-id + 3b524b54-6183-4272-ab93-f6b0b6cb9faa +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Mon, 08 Sep 2014 18:30:00 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 4 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/2.0.0.0 AzurePowershell/v0.8.8 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + c0f8aa73-8d4d-4e89-b965-76c086de4059-2014-09-08 18:28:02Z +
+
+ x-ms-client-request-id + ac0d4028-1cab-406f-8dd6-2a622b136238-2014-09-08 18:30:01Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 82f873ba-f7f1-4c64-aa12-b8971612d80d +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Mon, 08 Sep 2014 18:30:00 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <Servers xmlns="http://schemas.microsoft.com/sqlazure/2010/12/"> + + <Server> + <Name>y2nzad0rse</Name> + <AdministratorLogin>mylogin</AdministratorLogin> + <Location>East Asia</Location> + <FullyQualifiedDomainName>y2nzad0rse.database.windows.net</FullyQualifiedDomainName> + <Version>2.0</Version> + <State>Ready</State> + </Server> + <Server> + <Name>zd1yhph61u</Name> + <AdministratorLogin>mylogin</AdministratorLogin> + <Location>East Asia</Location> + <FullyQualifiedDomainName>zd1yhph61u.database.windows.net</FullyQualifiedDomainName> + <Version>2.0</Version> + <State>Ready</State> + </Server> +</Servers> +
+
+ + 5 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/zd1yhph61u?op=ResetPassword + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/2.0.0.0 AzurePowershell/v0.8.8 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + c0f8aa73-8d4d-4e89-b965-76c086de4059-2014-09-08 18:28:02Z +
+
+ x-ms-client-request-id + a3154ad7-ad19-4fdb-8d7b-09b881bb5052-2014-09-08 18:30:01Z +
+
+ + <AdministratorLoginPassword xmlns="http://schemas.microsoft.com/sqlazure/2010/12/">Pa$$w0rd2</AdministratorLoginPassword> + application/xml; charset=utf-8 + +
+ + OK + +
+ x-ms-request-id + e0318802-2d82-41f6-acde-fa07d382d8f2 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Mon, 08 Sep 2014 18:30:00 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 6 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/2.0.0.0 AzurePowershell/v0.8.8 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + c0f8aa73-8d4d-4e89-b965-76c086de4059-2014-09-08 18:28:02Z +
+
+ x-ms-client-request-id + 85714a9e-dd1f-4918-8c00-df04766e55f7-2014-09-08 18:30:01Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + ff914e03-79e4-4394-950f-72fa4ffa86ef +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Mon, 08 Sep 2014 18:30:01 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <Servers xmlns="http://schemas.microsoft.com/sqlazure/2010/12/"> + + <Server> + <Name>y2nzad0rse</Name> + <AdministratorLogin>mylogin</AdministratorLogin> + <Location>East Asia</Location> + <FullyQualifiedDomainName>y2nzad0rse.database.windows.net</FullyQualifiedDomainName> + <Version>2.0</Version> + <State>Ready</State> + </Server> + <Server> + <Name>zd1yhph61u</Name> + <AdministratorLogin>mylogin</AdministratorLogin> + <Location>East Asia</Location> + <FullyQualifiedDomainName>zd1yhph61u.database.windows.net</FullyQualifiedDomainName> + <Version>2.0</Version> + <State>Ready</State> + </Server> +</Servers> +
+
+ + 7 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/y2nzad0rse + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/2.0.0.0 AzurePowershell/v0.8.8 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + c0f8aa73-8d4d-4e89-b965-76c086de4059-2014-09-08 18:28:02Z +
+
+ x-ms-client-request-id + 3e41040f-82bd-4202-b63a-f5e4e0ddeec3-2014-09-08 18:30:01Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 4ee18dbe-b61a-44ea-ab5c-2a49425a829e +
+
+ Date + Mon, 08 Sep 2014 18:30:01 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 8 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/2.0.0.0 AzurePowershell/v0.8.8 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + c0f8aa73-8d4d-4e89-b965-76c086de4059-2014-09-08 18:28:02Z +
+
+ x-ms-client-request-id + 52ae2e86-5d2f-4061-aa45-d5a7e0a3dedc-2014-09-08 18:30:02Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 979289ea-09bf-43c8-8165-4b4c24340e2f +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Mon, 08 Sep 2014 18:30:02 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <Servers xmlns="http://schemas.microsoft.com/sqlazure/2010/12/"> + + <Server> + <Name>zd1yhph61u</Name> + <AdministratorLogin>mylogin</AdministratorLogin> + <Location>East Asia</Location> + <FullyQualifiedDomainName>zd1yhph61u.database.windows.net</FullyQualifiedDomainName> + <Version>2.0</Version> + <State>Ready</State> + </Server> +</Servers> +
+
+ + 9 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/zd1yhph61u + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/2.0.0.0 AzurePowershell/v0.8.8 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + c0f8aa73-8d4d-4e89-b965-76c086de4059-2014-09-08 18:28:02Z +
+
+ x-ms-client-request-id + 37df4c06-72d7-44c7-8743-e54e60f13976-2014-09-08 18:30:02Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 814b376d-7a7e-4473-a0e5-bd5f6511ac58 +
+
+ Date + Mon, 08 Sep 2014 18:30:02 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 10 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/2.0.0.0 AzurePowershell/v0.8.8 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + c0f8aa73-8d4d-4e89-b965-76c086de4059-2014-09-08 18:28:02Z +
+
+ x-ms-client-request-id + a73eb2b2-ec85-453e-a804-5f09d8da8b03-2014-09-08 18:30:03Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 181d132e-aa23-4a7f-b7db-7a7bcfd6ccca +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Mon, 08 Sep 2014 18:30:02 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <Servers xmlns="http://schemas.microsoft.com/sqlazure/2010/12/"> +</Servers> +
+
+
+
+ + UnitTest.AzureSqlDatabaseServerFirewallTests + + + 0 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/firewallrules + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + f79d51c9-337e-457e-b5ac-f1f427231277-2014-07-01 20:54:29Z +
+
+ x-ms-client-request-id + f82b3d86-efa5-430d-9c37-6fdbc508df54-2014-07-01 20:54:29Z +
+
+ + + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <Name>Rule1</Name> + <StartIPAddress>0.0.0.0</StartIPAddress> + <EndIPAddress>1.1.1.1</EndIPAddress> + </ServiceResource> + + application/xml + +
+ + Created + +
+ x-ms-request-id + 6934644d-d956-4202-9db7-e32fbd67fbb9 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 20:54:30 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Rule1</Name><Type>Microsoft.SqlAzure.FirewallRule</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/firewallrules/Rule1</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><StartIPAddress>0.0.0.0</StartIPAddress><EndIPAddress>1.1.1.1</EndIPAddress></ServiceResource> +
+
+ + 1 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/firewallrules + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + f79d51c9-337e-457e-b5ac-f1f427231277-2014-07-01 20:54:29Z +
+
+ x-ms-client-request-id + 25d312ba-649b-4c81-9a9a-7a222d5c2225-2014-07-01 20:54:30Z +
+
+ + + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <Name>Rule2</Name> + <StartIPAddress>1.1.1.1</StartIPAddress> + <EndIPAddress>2.2.2.2</EndIPAddress> + </ServiceResource> + + application/xml + +
+ + Created + +
+ x-ms-request-id + a7844028-4bee-48ed-9ede-abfefdb52771 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 20:54:30 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Rule2</Name><Type>Microsoft.SqlAzure.FirewallRule</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/firewallrules/Rule2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><StartIPAddress>1.1.1.1</StartIPAddress><EndIPAddress>2.2.2.2</EndIPAddress></ServiceResource> +
+
+ + 2 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/firewallrules + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + f79d51c9-337e-457e-b5ac-f1f427231277-2014-07-01 20:54:29Z +
+
+ x-ms-client-request-id + db9d31d7-1564-4c1e-a930-a917178c4fd2-2014-07-01 20:54:30Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 7cff0c8d-644e-4a90-b6ac-5d379c48a90e +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 20:54:30 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>Rule1</Name><Type>Microsoft.SqlAzure.FirewallRule</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/firewallrules/Rule1</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><StartIPAddress>0.0.0.0</StartIPAddress><EndIPAddress>1.1.1.1</EndIPAddress></ServiceResource><ServiceResource><Name>Rule2</Name><Type>Microsoft.SqlAzure.FirewallRule</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/firewallrules/Rule2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><StartIPAddress>1.1.1.1</StartIPAddress><EndIPAddress>2.2.2.2</EndIPAddress></ServiceResource></ServiceResources> +
+
+ + 3 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/firewallrules/Rule1 + PUT + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + f79d51c9-337e-457e-b5ac-f1f427231277-2014-07-01 20:54:29Z +
+
+ x-ms-client-request-id + 6cb9c433-14a1-4106-a9d4-7adb36c736e6-2014-07-01 20:54:30Z +
+
+ + + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <Name>Rule1</Name> + <StartIPAddress>2.2.2.2</StartIPAddress> + <EndIPAddress>3.3.3.3</EndIPAddress> + </ServiceResource> + + application/xml + +
+ + OK + +
+ x-ms-request-id + 34d1d0e9-b90c-4192-bde2-13237f1d8155 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 20:54:30 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Rule1</Name><Type>Microsoft.SqlAzure.FirewallRule</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/firewallrules/Rule1</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><StartIPAddress>2.2.2.2</StartIPAddress><EndIPAddress>3.3.3.3</EndIPAddress></ServiceResource> +
+
+ + 4 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/firewallrules + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + f79d51c9-337e-457e-b5ac-f1f427231277-2014-07-01 20:54:29Z +
+
+ x-ms-client-request-id + ab1393fb-88cd-4dfa-97fb-febfbe570613-2014-07-01 20:54:30Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + bb8e919a-06bb-435f-8f36-c691ba37d426 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 20:54:30 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>Rule1</Name><Type>Microsoft.SqlAzure.FirewallRule</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/firewallrules/Rule1</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><StartIPAddress>2.2.2.2</StartIPAddress><EndIPAddress>3.3.3.3</EndIPAddress></ServiceResource><ServiceResource><Name>Rule2</Name><Type>Microsoft.SqlAzure.FirewallRule</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/firewallrules/Rule2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><StartIPAddress>1.1.1.1</StartIPAddress><EndIPAddress>2.2.2.2</EndIPAddress></ServiceResource></ServiceResources> +
+
+ + 5 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/firewallrules/Rule1 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + f79d51c9-337e-457e-b5ac-f1f427231277-2014-07-01 20:54:29Z +
+
+ x-ms-client-request-id + cf03a007-e666-478a-bd6b-5e95e6e5d13f-2014-07-01 20:54:30Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 85e0b13c-f8c0-4aa0-8aa4-1a525ee56c18 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Tue, 01 Jul 2014 20:54:30 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 6 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/firewallrules/Rule2 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + f79d51c9-337e-457e-b5ac-f1f427231277-2014-07-01 20:54:29Z +
+
+ x-ms-client-request-id + cf03a007-e666-478a-bd6b-5e95e6e5d13f-2014-07-01 20:54:30Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + aafd15d8-edc0-467f-b7f1-376840407765 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Tue, 01 Jul 2014 20:54:30 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 7 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/firewallrules + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + f79d51c9-337e-457e-b5ac-f1f427231277-2014-07-01 20:54:29Z +
+
+ x-ms-client-request-id + 08010995-624e-4ec4-bdc4-56d4039e6606-2014-07-01 20:54:31Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 2e69495b-6048-4de8-af82-d931e032cf59 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 20:54:31 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/> +
+
+
+
+ + UnitTest.ImportExportAzureSqlDatabaseTests + + + 0 + + http://localhost:12345/v1/ManagementService.svc/GetAccessToken + GET + AzurePowershell/v0.8.11 + +
+ sqlauthorization + Basic bXlsb2dpbjpQYSQkdzByZCE= +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + c150c926-00a0-175c-17fe-3b30bc609909 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Mon, 14 Oct 2013 20:00:20 GMT +
+
+ Set-Cookie + .SQLSERVERMANAGEMENT=CmFQXQpT3rwmPNrE6CAGdA==; path=/v1/ManagementService.svc; expires=15-Oct-2013 01:00:20 GMT; domain=.database.windows.net; httponly; secure +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + + .SQLSERVERMANAGEMENT + CmFQXQpT3rwmPNrE6CAGdA== + v1/ManagementService.svc + + + <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">X+sKmMw1DHJ1L8NjCpVHrK+IV4+zjdEDauR8RgUw4mTLTGtZR6F0ttzZF5c7hFbu9Vif4+/d//9tgpyzER489aQqQCXlLUVaWQLUC09NbwqgsV8zjPBh0ucNJZkWV1kfL3VGzvX9eXzRhcxcSMg9PoCBG+x+lBWqbv2ElMODDeQ85YoMvFLE4W4H/Qf5eix2M6RUUmTBpNcXMIsr2eieHgRTcVL3fOVQ0n7POLROa+MuSDZtaIg2AlDFZINo5BcP3A+HKu4Abv2aMnsYEgEkSxo7xz+N+j6uz97l9NQvHD9DmJmgumDk+1088FlN5sfaLHUpPqMAnDw9uVEyShYjBTjAVtNsPp/Z1CoU3hECGbFGfVIrvpjNCXqJdZ3IGn7QwpM1c4sMn/JYy0RFolQCl8OpVQpnsGS49+S/n4yl+Sso25GaXRCqnCpJEPXqJySV8h7iUdXmQZK4Mv2GyG6CGIgWhhREp1XduLc5AbNgUgvIdnH3hXm44m6uJGqnKXH43BawVHJCFNGgevwjvvCcTO0ezURg5chBOTRx6dTNJK0ws5ws7n4Pps/NKJ149rSb8T//8dJlPMSEtzXJwIu/9hVzl+3AEboYbhRno4AmJgWZ9BUqiTb7UzpZV6ncR+vgjDGGemCBY+1vhEmCF51zR7Rbe85bPy5yRlXy/unFyYmnt/7QXwwu0xwlB/AtabaW5jajV+LAXF47o+a04Qjeoql8VF0ucO0Y/AnAMpJGYDhvL7yK/pPEdD7mRWaUzYiicpZ9mOsTKZ93XrxkT8HR/Q==</string> +
+
+ + 1 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Servers()?$top=1 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + X+sKmMw1DHJ1L8NjCpVHrK+IV4+zjdEDauR8RgUw4mTLTGtZR6F0ttzZF5c7hFbu9Vif4+/d//9tgpyzER489aQqQCXlLUVaWQLUC09NbwqgsV8zjPBh0ucNJZkWV1kfL3VGzvX9eXzRhcxcSMg9PoCBG+x+lBWqbv2ElMODDeQ85YoMvFLE4W4H/Qf5eix2M6RUUmTBpNcXMIsr2eieHgRTcVL3fOVQ0n7POLROa+MuSDZtaIg2AlDFZINo5BcP3A+HKu4Abv2aMnsYEgEkSxo7xz+N+j6uz97l9NQvHD9DmJmgumDk+1088FlN5sfaLHUpPqMAnDw9uVEyShYjBTjAVtNsPp/Z1CoU3hECGbFGfVIrvpjNCXqJdZ3IGn7QwpM1c4sMn/JYy0RFolQCl8OpVQpnsGS49+S/n4yl+Sso25GaXRCqnCpJEPXqJySV8h7iUdXmQZK4Mv2GyG6CGIgWhhREp1XduLc5AbNgUgvIdnH3hXm44m6uJGqnKXH43BawVHJCFNGgevwjvvCcTO0ezURg5chBOTRx6dTNJK0ws5ws7n4Pps/NKJ149rSb8T//8dJlPMSEtzXJwIu/9hVzl+3AEboYbhRno4AmJgWZ9BUqiTb7UzpZV6ncR+vgjDGGemCBY+1vhEmCF51zR7Rbe85bPy5yRlXy/unFyYmnt/7QXwwu0xwlB/AtabaW5jajV+LAXF47o+a04Qjeoql8VF0ucO0Y/AnAMpJGYDhvL7yK/pPEdD7mRWaUzYiicpZ9mOsTKZ93XrxkT8HR/Q== +
+
+ x-ms-client-session-id + 86036ca9-fa61-426c-b1dc-612fd1ac7287-2013-10-14 20:00:17Z +
+
+ x-ms-client-request-id + 471b1752-14be-4f4d-9237-36d335cea935-2013-10-14 20:00:17Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=CmFQXQpT3rwmPNrE6CAGdA== +
+
+ + + .SQLSERVERMANAGEMENT + CmFQXQpT3rwmPNrE6CAGdA== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + c150c926-00a0-175c-17fe-3b30bc609909 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Mon, 14 Oct 2013 20:00:20 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="https://myserver01.database.windows.net/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>https://myserver01.database.windows.net/v1/ManagementService.svc/Server2('myserver01')/Servers</id><title type="text">Servers</title><updated>2013-10-14T20:00:20Z</updated><link rel="self" title="Servers" href="Servers" /><entry><id>https://myserver01.database.windows.net/v1/ManagementService.svc/Server2('myserver01')/Servers('myserver01')</id><category term="Microsoft.SqlServer.Management.Server.Domain.Server" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Server" href="Servers('myserver01')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Databases" type="application/atom+xml;type=feed" title="Databases" href="Servers('myserver01')/Databases" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServerMetrics" type="application/atom+xml;type=entry" title="ServerMetrics" href="Servers('myserver01')/ServerMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServerQuotas" type="application/atom+xml;type=feed" title="ServerQuotas" href="Servers('myserver01')/ServerQuotas" /><title /><updated>2013-10-14T20:00:20Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Name>myserver01</d:Name></m:properties></content></entry></feed> +
+
+ + 2 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/$metadata + GET + AzurePowershell/v0.8.11 + +
+ AccessToken + X+sKmMw1DHJ1L8NjCpVHrK+IV4+zjdEDauR8RgUw4mTLTGtZR6F0ttzZF5c7hFbu9Vif4+/d//9tgpyzER489aQqQCXlLUVaWQLUC09NbwqgsV8zjPBh0ucNJZkWV1kfL3VGzvX9eXzRhcxcSMg9PoCBG+x+lBWqbv2ElMODDeQ85YoMvFLE4W4H/Qf5eix2M6RUUmTBpNcXMIsr2eieHgRTcVL3fOVQ0n7POLROa+MuSDZtaIg2AlDFZINo5BcP3A+HKu4Abv2aMnsYEgEkSxo7xz+N+j6uz97l9NQvHD9DmJmgumDk+1088FlN5sfaLHUpPqMAnDw9uVEyShYjBTjAVtNsPp/Z1CoU3hECGbFGfVIrvpjNCXqJdZ3IGn7QwpM1c4sMn/JYy0RFolQCl8OpVQpnsGS49+S/n4yl+Sso25GaXRCqnCpJEPXqJySV8h7iUdXmQZK4Mv2GyG6CGIgWhhREp1XduLc5AbNgUgvIdnH3hXm44m6uJGqnKXH43BawVHJCFNGgevwjvvCcTO0ezURg5chBOTRx6dTNJK0ws5ws7n4Pps/NKJ149rSb8T//8dJlPMSEtzXJwIu/9hVzl+3AEboYbhRno4AmJgWZ9BUqiTb7UzpZV6ncR+vgjDGGemCBY+1vhEmCF51zR7Rbe85bPy5yRlXy/unFyYmnt/7QXwwu0xwlB/AtabaW5jajV+LAXF47o+a04Qjeoql8VF0ucO0Y/AnAMpJGYDhvL7yK/pPEdD7mRWaUzYiicpZ9mOsTKZ93XrxkT8HR/Q== +
+
+ x-ms-client-session-id + 86036ca9-fa61-426c-b1dc-612fd1ac7287-2013-10-14 20:00:17Z +
+
+ x-ms-client-request-id + 2faca58d-6e1a-4961-a598-9b38865d2f44-2013-10-14 20:00:18Z +
+
+ Cookie + .SQLSERVERMANAGEMENT=CmFQXQpT3rwmPNrE6CAGdA== +
+
+ + + .SQLSERVERMANAGEMENT + CmFQXQpT3rwmPNrE6CAGdA== + + + + + + +
+ + OK + +
+ x-ms-request-id + c150c926-00a0-175c-17fe-3b30bc609909 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 1.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml;charset=utf-8 +
+
+ Date + Mon, 14 Oct 2013 20:00:20 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx"><edmx:DataServices m:DataServiceVersion="1.0" m:MaxDataServiceVersion="3.0" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><Schema Namespace="Microsoft.SqlServer.Management.Server.Domain" xmlns="http://schemas.microsoft.com/ado/2008/01/edm"><EntityType Name="Server" OpenType="true"><Key><PropertyRef Name="Name" /></Key><Property Name="Name" Type="Edm.String" Nullable="false" /><NavigationProperty Name="Databases" Relationship="Microsoft.SqlServer.Management.Server.Domain.Server_Databases_Database_Server" ToRole="Database_Server" FromRole="Server_Databases" /><NavigationProperty Name="ServerMetrics" Relationship="Microsoft.SqlServer.Management.Server.Domain.Server_ServerMetrics_ServerMetrics_Server" ToRole="ServerMetrics_Server" FromRole="Server_ServerMetrics" /><NavigationProperty Name="ServerQuotas" Relationship="Microsoft.SqlServer.Management.Server.Domain.Server_ServerQuotas_ServerQuota_Server" ToRole="ServerQuota_Server" FromRole="Server_ServerQuotas" /></EntityType><EntityType Name="Database" OpenType="true"><Key><PropertyRef Name="Id" /></Key><Property Name="Id" Type="Edm.Int32" Nullable="false" /><Property Name="Name" Type="Edm.String" /><Property Name="ServiceObjectiveId" Type="Edm.Guid" /><Property Name="AssignedServiceObjectiveId" Type="Edm.Guid" /><Property Name="ServiceObjectiveAssignmentState" Type="Edm.Byte" /><Property Name="ServiceObjectiveAssignmentStateDescription" Type="Edm.String" /><Property Name="ServiceObjectiveAssignmentErrorCode" Type="Edm.Int32" /><Property Name="ServiceObjectiveAssignmentErrorDescription" Type="Edm.String" /><Property Name="ServiceObjectiveAssignmentSuccessDate" Type="Edm.DateTime" /><Property Name="Edition" Type="Edm.String" /><Property Name="MaxSizeGB" Type="Edm.Int32" /><Property Name="MaxSizeBytes" Type="Edm.Int64" /><Property Name="CollationName" Type="Edm.String" /><Property Name="CreationDate" Type="Edm.DateTime" Nullable="false" /><Property Name="RecoveryPeriodStartDate" Type="Edm.DateTime" /><Property Name="IsSystemObject" Type="Edm.Boolean" Nullable="false" /><Property Name="Status" Type="Edm.Int32" Nullable="false" /><Property Name="IsFederationRoot" Type="Edm.Boolean" /><Property Name="SizeMB" Type="Edm.Decimal" Nullable="false" /><Property Name="IsRecursiveTriggersOn" Type="Edm.Boolean" /><Property Name="IsReadOnly" Type="Edm.Boolean" Nullable="false" /><Property Name="IsFederationMember" Type="Edm.Boolean" Nullable="false" /><Property Name="IsQueryStoreOn" Type="Edm.Boolean" Nullable="false" /><Property Name="IsQueryStoreReadOnly" Type="Edm.Boolean" /><Property Name="QueryStoreMaxSizeMB" Type="Edm.Int32" /><Property Name="QueryStoreFlushPeriodSeconds" Type="Edm.Int32" /><Property Name="QueryStoreIntervalLengthMinutes" Type="Edm.Int32" /><Property Name="QueryStoreClearAll" Type="Edm.Boolean" /><Property Name="QueryStoreStaleQueryThresholdDays" Type="Edm.Int32" /><NavigationProperty Name="Server" Relationship="Microsoft.SqlServer.Management.Server.Domain.Server_Databases_Database_Server" ToRole="Server_Databases" FromRole="Database_Server" /><NavigationProperty Name="ServiceObjective" Relationship="Microsoft.SqlServer.Management.Server.Domain.Database_ServiceObjective" ToRole="ServiceObjective" FromRole="Database" /><NavigationProperty Name="DatabaseMetrics" Relationship="Microsoft.SqlServer.Management.Server.Domain.Database_DatabaseMetrics_DatabaseMetrics_Database" ToRole="DatabaseMetrics_Database" FromRole="Database_DatabaseMetrics" /><NavigationProperty Name="DatabaseCopies" Relationship="Microsoft.SqlServer.Management.Server.Domain.Database_DatabaseCopies_DatabaseCopy_Database" ToRole="DatabaseCopy_Database" FromRole="Database_DatabaseCopies" /></EntityType><EntityType Name="RestorableDroppedDatabase" OpenType="true"><Key><PropertyRef Name="EntityId" /></Key><Property Name="EntityId" Type="Edm.String" Nullable="false" /><Property Name="Name" Type="Edm.String" /><Property Name="ServerName" Type="Edm.String" /><Property Name="Edition" Type="Edm.String" /><Property Name="MaxSizeBytes" Type="Edm.Int64" Nullable="false" /><Property Name="CreationDate" Type="Edm.DateTime" Nullable="false" /><Property Name="DeletionDate" Type="Edm.DateTime" Nullable="false" /><Property Name="RecoveryPeriodStartDate" Type="Edm.DateTime" /></EntityType><EntityType Name="DimensionSetting" OpenType="true"><Key><PropertyRef Name="Id" /></Key><Property Name="Id" Type="Edm.Guid" Nullable="false" /><Property Name="Name" Type="Edm.String" /><Property Name="Description" Type="Edm.String" /><Property Name="Ordinal" Type="Edm.Byte" Nullable="false" /><Property Name="IsDefault" Type="Edm.Boolean" Nullable="false" /></EntityType><EntityType Name="ServiceObjective" OpenType="true"><Key><PropertyRef Name="Id" /></Key><Property Name="Id" Type="Edm.Guid" Nullable="false" /><Property Name="Name" Type="Edm.String" /><Property Name="Description" Type="Edm.String" /><Property Name="IsDefault" Type="Edm.Boolean" Nullable="false" /><Property Name="IsSystem" Type="Edm.Boolean" Nullable="false" /><Property Name="Enabled" Type="Edm.Boolean" Nullable="false" /><NavigationProperty Name="DimensionSettings" Relationship="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective_DimensionSettings" ToRole="DimensionSettings" FromRole="ServiceObjective" /></EntityType><EntityType Name="Operation" OpenType="true"><Key><PropertyRef Name="ActionId" /></Key><Property Name="ActionTypeName" Type="Edm.String" /><Property Name="ActionStatusName" Type="Edm.String" /><Property Name="DacDatabaseName" Type="Edm.String" /><Property Name="CreatedBy" Type="Edm.String" /><Property Name="DateCreated" Type="Edm.DateTime" Nullable="false" /><Property Name="DateModified" Type="Edm.DateTime" Nullable="false" /><Property Name="Comments" Type="Edm.String" /><Property Name="Error" Type="Edm.String" /><Property Name="ActionId" Type="Edm.Int32" Nullable="false" /><Property Name="CompletedSteps" Type="Edm.Int32" Nullable="false" /><Property Name="TotalSteps" Type="Edm.Int32" Nullable="false" /><Property Name="DacObjectTypeName" Type="Edm.String" /><NavigationProperty Name="OperationDetails" Relationship="Microsoft.SqlServer.Management.Server.Domain.Operation_OperationDetails_OperationDetail_Operation" ToRole="OperationDetail_Operation" FromRole="Operation_OperationDetails" /></EntityType><EntityType Name="OperationDetail" OpenType="true"><Key><PropertyRef Name="EntityId" /></Key><Property Name="ActionTypeName" Type="Edm.String" /><Property Name="ActionStatusName" Type="Edm.String" /><Property Name="DacDatabaseName" Type="Edm.String" /><Property Name="CreatedBy" Type="Edm.String" /><Property Name="DateCreated" Type="Edm.DateTime" Nullable="false" /><Property Name="DateModified" Type="Edm.DateTime" Nullable="false" /><Property Name="Comments" Type="Edm.String" /><Property Name="Error" Type="Edm.String" /><Property Name="SequenceId" Type="Edm.Int32" Nullable="false" /><Property Name="EntityId" Type="Edm.String" Nullable="false" /><Property Name="ActionId" Type="Edm.Int32" Nullable="false" /><Property Name="DacObjectTypeName" Type="Edm.String" /><NavigationProperty Name="Operation" Relationship="Microsoft.SqlServer.Management.Server.Domain.Operation_OperationDetails_OperationDetail_Operation" ToRole="Operation_OperationDetails" FromRole="OperationDetail_Operation" /></EntityType><EntityType Name="CreateDatabaseFromDacPacOperation" OpenType="true"><Key><PropertyRef Name="OperationGuid" /></Key><Property Name="OperationGuid" Type="Edm.Guid" Nullable="false" /><Property Name="DatabaseName" Type="Edm.String" /><Property Name="Edition" Type="Edm.String" /><Property Name="MaxSizeGB" Type="Edm.Int32" /><Property Name="OperationId" Type="Edm.Int32" Nullable="false" /><Property Name="DacPac" Type="Edm.Binary" /></EntityType><EntityType Name="ExtractDacPacOperation" OpenType="true"><Key><PropertyRef Name="OperationGuid" /></Key><Property Name="OperationGuid" Type="Edm.Guid" Nullable="false" /><Property Name="DatabaseName" Type="Edm.String" /><Property Name="DacTypeName" Type="Edm.String" /><Property Name="Version" Type="Edm.String" /><Property Name="Description" Type="Edm.String" /><Property Name="DacPac" Type="Edm.Binary" /></EntityType><EntityType Name="UpgradeDatabaseFromDacPacOperation" OpenType="true"><Key><PropertyRef Name="OperationGuid" /></Key><Property Name="OperationGuid" Type="Edm.Guid" Nullable="false" /><Property Name="DatabaseName" Type="Edm.String" /><Property Name="DacPac" Type="Edm.Binary" /><Property Name="RollbackOnFailure" Type="Edm.Boolean" /><Property Name="OperationId" Type="Edm.Int32" Nullable="false" /></EntityType><EntityType Name="ViewDatabaseChangesOperation" OpenType="true"><Key><PropertyRef Name="OperationGuid" /></Key><Property Name="OperationGuid" Type="Edm.Guid" Nullable="false" /><Property Name="DatabaseName" Type="Edm.String" /><Property Name="ChangeResult" Type="Edm.String" /><Property Name="IsRegisteredDac" Type="Edm.Boolean" Nullable="false" /></EntityType><EntityType Name="ViewUpgradePlanOperation" OpenType="true"><Key><PropertyRef Name="OperationGuid" /></Key><Property Name="OperationGuid" Type="Edm.Guid" Nullable="false" /><Property Name="DatabaseName" Type="Edm.String" /><Property Name="DacPac" Type="Edm.Binary" /><Property Name="RollbackOnFailure" Type="Edm.Boolean" /><Property Name="UpgradePlan" Type="Edm.String" /><Property Name="UpgradeScript" Type="Edm.String" /></EntityType><EntityType Name="DatabaseRestoreStatus" OpenType="true"><Key><PropertyRef Name="RequestID" /></Key><Property Name="RequestID" Type="Edm.Guid" Nullable="false" /><Property Name="SourceServerName" Type="Edm.String" /><Property Name="SourceDatabaseName" Type="Edm.String" /><Property Name="SourceDatabaseDeletionDate" Type="Edm.DateTime" /><Property Name="TargetServerName" Type="Edm.String" /><Property Name="TargetDatabaseName" Type="Edm.String" /><Property Name="TargetUtcPointInTime" Type="Edm.DateTime" /><Property Name="State" Type="Edm.String" /><Property Name="Error" Type="Edm.String" /><Property Name="IsCancelled" Type="Edm.Boolean" Nullable="false" /><Property Name="CreatedBy" Type="Edm.String" /><Property Name="CreatedDate" Type="Edm.DateTime" Nullable="false" /></EntityType><EntityType Name="RestoreDatabaseOperation" OpenType="true"><Key><PropertyRef Name="RequestID" /></Key><Property Name="RequestID" Type="Edm.Guid" Nullable="false" /><Property Name="SourceDatabaseName" Type="Edm.String" /><Property Name="SourceDatabaseDeletionDate" Type="Edm.DateTime" /><Property Name="TargetServerName" Type="Edm.String" /><Property Name="TargetDatabaseName" Type="Edm.String" /><Property Name="TargetUtcPointInTime" Type="Edm.DateTime" /></EntityType><EntityType Name="DatabaseCopy" OpenType="true"><Key><PropertyRef Name="EntityId" /></Key><Property Name="LocalDatabaseId" Type="Edm.Int32" Nullable="false" /><Property Name="DestinationServerName" Type="Edm.String" /><Property Name="DestinationDatabaseName" Type="Edm.String" /><Property Name="SourceServerName" Type="Edm.String" /><Property Name="SourceDatabaseName" Type="Edm.String" /><Property Name="IsContinuous" Type="Edm.Boolean" Nullable="false" /><Property Name="TextStartDate" Type="Edm.String" /><Property Name="TextModifyDate" Type="Edm.String" /><Property Name="PercentComplete" Type="Edm.Single" /><Property Name="IsLocalDatabaseReplicationTarget" Type="Edm.Boolean" Nullable="false" /><Property Name="ReplicationState" Type="Edm.Byte" Nullable="false" /><Property Name="ReplicationStateDescription" Type="Edm.String" /><Property Name="IsInterlinkConnected" Type="Edm.Boolean" Nullable="false" /><Property Name="IsForcedTerminate" Type="Edm.Boolean" /><Property Name="MaximumLag" Type="Edm.Int32" /><Property Name="EntityId" Type="Edm.Guid" Nullable="false" /><NavigationProperty Name="Database" Relationship="Microsoft.SqlServer.Management.Server.Domain.Database_DatabaseCopies_DatabaseCopy_Database" ToRole="Database_DatabaseCopies" FromRole="DatabaseCopy_Database" /></EntityType><EntityType Name="DatabaseCopyValidationOperation" OpenType="true"><Key><PropertyRef Name="DatabaseName" /></Key><Property Name="DatabaseName" Type="Edm.String" Nullable="false" /><Property Name="Action" Type="Edm.Int32" Nullable="false" /><Property Name="LoginSid" Type="Edm.String" /></EntityType><EntityType Name="FirewallRule" OpenType="true"><Key><PropertyRef Name="Name" /></Key><Property Name="Name" Type="Edm.String" Nullable="false" /><Property Name="StartIPAddress" Type="Edm.String" /><Property Name="EndIPAddress" Type="Edm.String" /><Property Name="CreateDate" Type="Edm.DateTime" Nullable="false" /><Property Name="ModifyDate" Type="Edm.DateTime" Nullable="false" /></EntityType><EntityType Name="DatabaseMetrics" OpenType="true"><Key><PropertyRef Name="DatabaseId" /></Key><Property Name="DatabaseId" Type="Edm.Int32" Nullable="false" /><Property Name="DatabaseName" Type="Edm.String" /><Property Name="NumberOfLoginSuccessEvents" Type="Edm.Int64" Nullable="false" /><Property Name="NumberOfLoginFailureEvents" Type="Edm.Int64" Nullable="false" /><NavigationProperty Name="Database" Relationship="Microsoft.SqlServer.Management.Server.Domain.Database_DatabaseMetrics_DatabaseMetrics_Database" ToRole="Database_DatabaseMetrics" FromRole="DatabaseMetrics_Database" /></EntityType><EntityType Name="ServerMetrics" OpenType="true"><Key><PropertyRef Name="ServerName" /></Key><Property Name="ServerName" Type="Edm.String" Nullable="false" /><Property Name="NumberOfFailedEvents" Type="Edm.Int64" Nullable="false" /><Property Name="NumberOfLoginSuccessEvents" Type="Edm.Int64" Nullable="false" /><Property Name="NumberOfLoginFailureEvents" Type="Edm.Int64" Nullable="false" /><Property Name="NumberOfTerminatedConnectionEvents" Type="Edm.Int64" Nullable="false" /><Property Name="NumberOfThrottledEvents" Type="Edm.Int64" Nullable="false" /><Property Name="NumberOfDeadlockEvents" Type="Edm.Int64" Nullable="false" /><Property Name="NumberOfReconfiguredEvents" Type="Edm.Int64" Nullable="false" /><NavigationProperty Name="Server" Relationship="Microsoft.SqlServer.Management.Server.Domain.Server_ServerMetrics_ServerMetrics_Server" ToRole="Server_ServerMetrics" FromRole="ServerMetrics_Server" /></EntityType><EntityType Name="EventLog" OpenType="true"><Key><PropertyRef Name="EntityId" /></Key><Property Name="EntityId" Type="Edm.String" Nullable="false" /><Property Name="DatabaseName" Type="Edm.String" /><Property Name="StartTimeUtc" Type="Edm.DateTime" Nullable="false" /><Property Name="IntervalSizeInMinutes" Type="Edm.Int32" Nullable="false" /><Property Name="EventCategory" Type="Edm.String" /><Property Name="EventType" Type="Edm.String" /><Property Name="EventSubtype" Type="Edm.Int32" Nullable="false" /><Property Name="EventSubtypeDescription" Type="Edm.String" /><Property Name="Severity" Type="Edm.Int32" /><Property Name="NumberOfEvents" Type="Edm.Int64" /><Property Name="Description" Type="Edm.String" /><Property Name="AdditionalData" Type="Edm.String" /></EntityType><EntityType Name="ServerQuota" OpenType="true"><Key><PropertyRef Name="Name" /></Key><Property Name="Name" Type="Edm.String" Nullable="false" /><Property Name="Value" Type="Edm.Int32" Nullable="false" /><NavigationProperty Name="Server" Relationship="Microsoft.SqlServer.Management.Server.Domain.Server_ServerQuotas_ServerQuota_Server" ToRole="Server_ServerQuotas" FromRole="ServerQuota_Server" /></EntityType><Association Name="Server_Databases_Database_Server"><End Type="Microsoft.SqlServer.Management.Server.Domain.Database" Role="Database_Server" Multiplicity="*" /><End Type="Microsoft.SqlServer.Management.Server.Domain.Server" Role="Server_Databases" Multiplicity="0..1" /></Association><Association Name="Server_ServerMetrics_ServerMetrics_Server"><End Type="Microsoft.SqlServer.Management.Server.Domain.ServerMetrics" Role="ServerMetrics_Server" Multiplicity="0..1" /><End Type="Microsoft.SqlServer.Management.Server.Domain.Server" Role="Server_ServerMetrics" Multiplicity="0..1" /></Association><Association Name="Server_ServerQuotas_ServerQuota_Server"><End Type="Microsoft.SqlServer.Management.Server.Domain.ServerQuota" Role="ServerQuota_Server" Multiplicity="*" /><End Type="Microsoft.SqlServer.Management.Server.Domain.Server" Role="Server_ServerQuotas" Multiplicity="0..1" /></Association><Association Name="Database_ServiceObjective"><End Type="Microsoft.SqlServer.Management.Server.Domain.Database" Role="Database" Multiplicity="*" /><End Type="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" Role="ServiceObjective" Multiplicity="0..1" /></Association><Association Name="Database_DatabaseMetrics_DatabaseMetrics_Database"><End Type="Microsoft.SqlServer.Management.Server.Domain.DatabaseMetrics" Role="DatabaseMetrics_Database" Multiplicity="0..1" /><End Type="Microsoft.SqlServer.Management.Server.Domain.Database" Role="Database_DatabaseMetrics" Multiplicity="0..1" /></Association><Association Name="Database_DatabaseCopies_DatabaseCopy_Database"><End Type="Microsoft.SqlServer.Management.Server.Domain.DatabaseCopy" Role="DatabaseCopy_Database" Multiplicity="*" /><End Type="Microsoft.SqlServer.Management.Server.Domain.Database" Role="Database_DatabaseCopies" Multiplicity="0..1" /></Association><Association Name="ServiceObjective_DimensionSettings"><End Type="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" Role="ServiceObjective" Multiplicity="*" /><End Type="Microsoft.SqlServer.Management.Server.Domain.DimensionSetting" Role="DimensionSettings" Multiplicity="*" /></Association><Association Name="Operation_OperationDetails_OperationDetail_Operation"><End Type="Microsoft.SqlServer.Management.Server.Domain.OperationDetail" Role="OperationDetail_Operation" Multiplicity="*" /><End Type="Microsoft.SqlServer.Management.Server.Domain.Operation" Role="Operation_OperationDetails" Multiplicity="0..1" /></Association><EntityContainer Name="ServerContextInternal" m:IsDefaultEntityContainer="true"><EntitySet Name="Servers" EntityType="Microsoft.SqlServer.Management.Server.Domain.Server" /><EntitySet Name="Databases" EntityType="Microsoft.SqlServer.Management.Server.Domain.Database" /><EntitySet Name="RestorableDroppedDatabases" EntityType="Microsoft.SqlServer.Management.Server.Domain.RestorableDroppedDatabase" /><EntitySet Name="DimensionSettings" EntityType="Microsoft.SqlServer.Management.Server.Domain.DimensionSetting" /><EntitySet Name="ServiceObjectives" EntityType="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" /><EntitySet Name="Operations" EntityType="Microsoft.SqlServer.Management.Server.Domain.Operation" /><EntitySet Name="OperationDetails" EntityType="Microsoft.SqlServer.Management.Server.Domain.OperationDetail" /><EntitySet Name="CreateDatabaseFromDacPacOperations" EntityType="Microsoft.SqlServer.Management.Server.Domain.CreateDatabaseFromDacPacOperation" /><EntitySet Name="ExtractDacPacOperations" EntityType="Microsoft.SqlServer.Management.Server.Domain.ExtractDacPacOperation" /><EntitySet Name="UpgradeDatabaseFromDacPacOperations" EntityType="Microsoft.SqlServer.Management.Server.Domain.UpgradeDatabaseFromDacPacOperation" /><EntitySet Name="ViewDatabaseChangesOperations" EntityType="Microsoft.SqlServer.Management.Server.Domain.ViewDatabaseChangesOperation" /><EntitySet Name="ViewUpgradePlanOperations" EntityType="Microsoft.SqlServer.Management.Server.Domain.ViewUpgradePlanOperation" /><EntitySet Name="DatabaseRestoreStatus" EntityType="Microsoft.SqlServer.Management.Server.Domain.DatabaseRestoreStatus" /><EntitySet Name="RestoreDatabaseOperations" EntityType="Microsoft.SqlServer.Management.Server.Domain.RestoreDatabaseOperation" /><EntitySet Name="DatabaseCopies" EntityType="Microsoft.SqlServer.Management.Server.Domain.DatabaseCopy" /><EntitySet Name="DatabaseCopyValidationOperations" EntityType="Microsoft.SqlServer.Management.Server.Domain.DatabaseCopyValidationOperation" /><EntitySet Name="FirewallRules" EntityType="Microsoft.SqlServer.Management.Server.Domain.FirewallRule" /><EntitySet Name="DatabaseMetrics" EntityType="Microsoft.SqlServer.Management.Server.Domain.DatabaseMetrics" /><EntitySet Name="ServerMetrics" EntityType="Microsoft.SqlServer.Management.Server.Domain.ServerMetrics" /><EntitySet Name="EventLogs" EntityType="Microsoft.SqlServer.Management.Server.Domain.EventLog" /><EntitySet Name="ServerQuotas" EntityType="Microsoft.SqlServer.Management.Server.Domain.ServerQuota" /><AssociationSet Name="ServerDatabase" Association="Microsoft.SqlServer.Management.Server.Domain.Server_Databases_Database_Server"><End Role="Server_Databases" EntitySet="Servers" /><End Role="Database_Server" EntitySet="Databases" /></AssociationSet><AssociationSet Name="ServerServerMetrics" Association="Microsoft.SqlServer.Management.Server.Domain.Server_ServerMetrics_ServerMetrics_Server"><End Role="Server_ServerMetrics" EntitySet="Servers" /><End Role="ServerMetrics_Server" EntitySet="ServerMetrics" /></AssociationSet><AssociationSet Name="ServerServerQuota" Association="Microsoft.SqlServer.Management.Server.Domain.Server_ServerQuotas_ServerQuota_Server"><End Role="Server_ServerQuotas" EntitySet="Servers" /><End Role="ServerQuota_Server" EntitySet="ServerQuotas" /></AssociationSet><AssociationSet Name="fk_slo_database_objective_selections_objective_id" Association="Microsoft.SqlServer.Management.Server.Domain.Database_ServiceObjective"><End Role="Database" EntitySet="Databases" /><End Role="ServiceObjective" EntitySet="ServiceObjectives" /></AssociationSet><AssociationSet Name="DatabaseDatabaseMetrics" Association="Microsoft.SqlServer.Management.Server.Domain.Database_DatabaseMetrics_DatabaseMetrics_Database"><End Role="Database_DatabaseMetrics" EntitySet="Databases" /><End Role="DatabaseMetrics_Database" EntitySet="DatabaseMetrics" /></AssociationSet><AssociationSet Name="DatabaseDatabaseCopy" Association="Microsoft.SqlServer.Management.Server.Domain.Database_DatabaseCopies_DatabaseCopy_Database"><End Role="Database_DatabaseCopies" EntitySet="Databases" /><End Role="DatabaseCopy_Database" EntitySet="DatabaseCopies" /></AssociationSet><AssociationSet Name="slo_objective_setting_selections" Association="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective_DimensionSettings"><End Role="ServiceObjective" EntitySet="ServiceObjectives" /><End Role="DimensionSettings" EntitySet="DimensionSettings" /></AssociationSet><AssociationSet Name="OperationOperationDetail" Association="Microsoft.SqlServer.Management.Server.Domain.Operation_OperationDetails_OperationDetail_Operation"><End Role="Operation_OperationDetails" EntitySet="Operations" /><End Role="OperationDetail_Operation" EntitySet="OperationDetails" /></AssociationSet></EntityContainer></Schema></edmx:DataServices></edmx:Edmx> +
+
+ + 3 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/DacOperations/Export + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ + + <ExportInput xmlns="http://schemas.datacontract.org/2004/07/Microsoft.SqlServer.Management.Dac.ServiceTypes"> + <BlobCredentials p2:type="BlobStorageAccessKeyCredentials" xmlns:p2="http://www.w3.org/2001/XMLSchema-instance"> + <Uri>https://teststore001.blob.core.windows.net/testcontainer001/backup1</Uri> + <StorageAccessKey>MBa5B5VhKcnx/tJlPfIOB44BiAfTkFYBb1uyMVzNFJN2S7FW10dxcC0ScfoPQJKIIi3dFaeLTuc39vATKlDrLA==</StorageAccessKey> + </BlobCredentials> + <ConnectionInfo> + <DatabaseName>testdb1</DatabaseName> + <Password>Pa$$w0rd!</Password> + <ServerName>myserver01.database.windows.net</ServerName> + <UserName>mylogin</UserName> + </ConnectionInfo> + </ExportInput> + + application/xml + +
+ + OK + +
+ x-ms-servedbyregion + ussouth +
+
+ X-Content-Type-Options + nosniff +
+
+ x-ms-request-id + 53d57f9d1f7e10d990c974636e9b4403 +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Mon, 14 Oct 2013 20:00:26 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ X-Powered-By + ASP.NET +
+
+ + <guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">a0db20f9-9402-4866-bc97-6089b47218ac</guid> +
+
+ + 4 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/DacOperations/Status + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ + + <StatusInput xmlns="http://schemas.datacontract.org/2004/07/Microsoft.SqlServer.Management.Dac.ServiceTypes"> + <Password>Pa$$w0rd!</Password> + <RequestId>a0db20f9-9402-4866-bc97-6089b47218ac</RequestId> + <ServerName>myserver01.database.windows.net</ServerName> + <UserName>mylogin</UserName> + </StatusInput> + + + +
+ + OK + +
+ x-ms-servedbyregion + ussouth +
+
+ X-Content-Type-Options + nosniff +
+
+ x-ms-request-id + 5b82c182db8a1e43839e7eba409747dd +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Mon, 14 Oct 2013 20:00:28 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ X-Powered-By + ASP.NET +
+
+ + <ArrayOfStatusInfo xmlns="http://schemas.datacontract.org/2004/07/Microsoft.SqlServer.Management.Dac.ServiceTypes" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><StatusInfo><BlobUri>https://teststore001.blob.core.windows.net/testcontainer001/backup1</BlobUri><DatabaseName>testdb1</DatabaseName><ErrorMessage i:nil="true"/><LastModifiedTime>2013-10-14T20:00:26.975667Z</LastModifiedTime><QueuedTime>2013-10-14T20:00:26.975667Z</QueuedTime><RequestId>a0db20f9-9402-4866-bc97-6089b47218ac</RequestId><RequestType>Export</RequestType><ServerName>myserver01.database.windows.net</ServerName><Status>Pending</Status></StatusInfo></ArrayOfStatusInfo> +
+
+ + 5 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/DacOperations/Import + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ + + <ImportInput xmlns="http://schemas.datacontract.org/2004/07/Microsoft.SqlServer.Management.Dac.ServiceTypes"> + <AzureEdition>Business</AzureEdition> + <BlobCredentials p2:type="BlobStorageAccessKeyCredentials" xmlns:p2="http://www.w3.org/2001/XMLSchema-instance"> + <Uri>https://teststore001.blob.core.windows.net/testcontainer001/backup1</Uri> + <StorageAccessKey>MBa5B5VhKcnx/tJlPfIOB44BiAfTkFYBb1uyMVzNFJN2S7FW10dxcC0ScfoPQJKIIi3dFaeLTuc39vATKlDrLA==</StorageAccessKey> + </BlobCredentials> + <ConnectionInfo> + <DatabaseName>testdb2</DatabaseName> + <Password>Pa$$w0rd!</Password> + <ServerName>myserver01.database.windows.net</ServerName> + <UserName>mylogin</UserName> + </ConnectionInfo> + <DatabaseSizeInGB>10</DatabaseSizeInGB> + </ImportInput> + + application/xml + +
+ + OK + +
+ x-ms-servedbyregion + ussouth +
+
+ X-Content-Type-Options + nosniff +
+
+ x-ms-request-id + 66df8e085fe4107781bee75569a6beaf +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Mon, 14 Oct 2013 20:00:54 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ X-Powered-By + ASP.NET +
+
+ + <guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">ed1806ab-d5e8-44e9-a464-16ca73936dc7</guid> +
+
+ + 6 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/DacOperations/Status + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ + + <StatusInput xmlns="http://schemas.datacontract.org/2004/07/Microsoft.SqlServer.Management.Dac.ServiceTypes"> + <Password>Pa$$w0rd!</Password> + <RequestId>ed1806ab-d5e8-44e9-a464-16ca73936dc7</RequestId> + <ServerName>myserver01.database.windows.net</ServerName> + <UserName>mylogin</UserName> + </StatusInput> + + + +
+ + OK + +
+ x-ms-servedbyregion + ussouth +
+
+ X-Content-Type-Options + nosniff +
+
+ x-ms-request-id + cab0140b2e6e163eac6aac5e2feb89b3 +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Mon, 14 Oct 2013 20:01:04 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ X-Powered-By + ASP.NET +
+
+ + <ArrayOfStatusInfo xmlns="http://schemas.datacontract.org/2004/07/Microsoft.SqlServer.Management.Dac.ServiceTypes" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><StatusInfo><BlobUri>https://teststore001.blob.core.windows.net/testcontainer001/backup1</BlobUri><DatabaseName>testdb2</DatabaseName><ErrorMessage i:nil="true"/><LastModifiedTime>2013-10-14T20:00:57.5641172Z</LastModifiedTime><QueuedTime>2013-10-14T20:00:49.1482703Z</QueuedTime><RequestId>ed1806ab-d5e8-44e9-a464-16ca73936dc7</RequestId><RequestType>Import</RequestType><ServerName>myserver01.database.windows.net</ServerName><Status>Completed</Status></StatusInfo></ArrayOfStatusInfo> +
+
+
+
+ + UnitTest.AzureSqlDatabaseCertTests + + + 71 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbcertPremiumDBP2 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 27627108-5056-4884-85e4-5f7f5bb95d93-2014-07-01 18:22:32Z +
+
+ x-ms-client-request-id + 7508a03a-c8b4-4850-81eb-cc3553897b47-2014-07-01 18:23:28Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 76a05e0e-2a4a-44c8-8a19-f288082f30d3 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Tue, 01 Jul 2014 18:23:29 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 72 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases?contentview=generic + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 27627108-5056-4884-85e4-5f7f5bb95d93-2014-07-01 18:22:32Z +
+
+ x-ms-client-request-id + 59ff0d89-741e-4941-a29a-461ca8c25612-2014-07-01 18:23:30Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + d90be8f8-cd0b-4ef5-974d-4f7cde16a88a +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 18:23:31 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>master</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/master</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>1</Id><Edition>System</Edition><MaxSizeGB>5</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-01T17:51:19.7300000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>True</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>5368709120</MaxSizeBytes><ServiceObjectiveId>26e021db-f1f9-4c98-84c6-92af8ef433d7</ServiceObjectiveId><AssignedServiceObjectiveId>26e021db-f1f9-4c98-84c6-92af8ef433d7</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-01T17:51:21.6470000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate i:nil="true"/><IsSuspended>False</IsSuspended></ServiceResource></ServiceResources> +
+
+ + 73 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/26e021db-f1f9-4c98-84c6-92af8ef433d7 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 27627108-5056-4884-85e4-5f7f5bb95d93-2014-07-01 18:22:32Z +
+
+ x-ms-client-request-id + 4feac030-458f-4796-93d5-dbf74dbb7bd1-2014-07-01 18:23:31Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 9ae5179a-8ceb-4992-bb57-fef375f0ebb2 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 18:23:31 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>System</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/26e021db-f1f9-4c98-84c6-92af8ef433d7</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>26e021db-f1f9-4c98-84c6-92af8ef433d7</Id><IsDefault>False</IsDefault><IsSystem>True</IsSystem><Description>Used for master database only.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>System</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/5b1e7ca2-f1c8-4da8-bb42-7ebe94a92609</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>5b1e7ca2-f1c8-4da8-bb42-7ebe94a92609</Id><Description>Used for master database only.</Description><Ordinal>1</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 74 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 27627108-5056-4884-85e4-5f7f5bb95d93-2014-07-01 18:22:32Z +
+
+ x-ms-client-request-id + 1f0525ad-4b91-48e7-aa4f-965b396d2792-2014-07-01 18:23:32Z +
+
+ + + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <Name>testdbcertGetOperationDbName_f1abaa48-a85a-4141-9a40-6acb3ea65771</Name> + <CollationName></CollationName> + </ServiceResource> + + application/xml + +
+ + Created + +
+ x-ms-request-id + 2124fd28-a431-40a7-b042-c3a712a32062 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 18:23:33 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbcertGetOperationDbName_f1abaa48-a85a-4141-9a40-6acb3ea65771</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbcertGetOperationDbName_f1abaa48-a85a-4141-9a40-6acb3ea65771</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>4</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-01T18:23:32.6770000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-01T18:23:33.4870000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-01T18:24:32.5630000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 75 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 27627108-5056-4884-85e4-5f7f5bb95d93-2014-07-01 18:22:32Z +
+
+ x-ms-client-request-id + 38977305-3d02-440a-bd43-9d61f985bcd2-2014-07-01 18:23:33Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 5b2b38eb-331c-443d-b0dc-1bb5c357ddef +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 18:23:33 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 76 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databaseoperations?databaseName=testdbcertGetOperationDbName_f1abaa48-a85a-4141-9a40-6acb3ea65771 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 27627108-5056-4884-85e4-5f7f5bb95d93-2014-07-01 18:22:32Z +
+
+ x-ms-client-request-id + 76168c5d-5695-4c71-b5c9-f6fe5bcf71b8-2014-07-01 18:23:34Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 8257779e-3afa-4c88-a684-c5b18b3171d2 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 18:23:34 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>CREATE DATABASE</Name><Type>Microsoft.SqlAzure.DatabaseOperation</Type><State>COMPLETED</State><SelfLink>https://localhost/servers/myserver01/databaseoperations/abd31d7f-19ca-4f29-a89a-7b38910f7ca9</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>abd31d7f-19ca-4f29-a89a-7b38910f7ca9</Id><StateId>2</StateId><SessionActivityId>2124fd28-a431-40a7-b042-c3a712a32062</SessionActivityId><DatabaseName>testdbcertGetOperationDbName_f1abaa48-a85a-4141-9a40-6acb3ea65771</DatabaseName><PercentComplete>100</PercentComplete><ErrorCode>0</ErrorCode><Error/><ErrorSeverity>0</ErrorSeverity><ErrorState>0</ErrorState><StartTime>2014-07-01T18:23:32.5330000</StartTime><LastModifyTime>2014-07-01T18:23:33.5470000</LastModifyTime></ServiceResource></ServiceResources> +
+
+ + 77 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databaseoperations?databaseName=testdbcertGetOperationDbName_f1abaa48-a85a-4141-9a40-6acb3ea65771 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 27627108-5056-4884-85e4-5f7f5bb95d93-2014-07-01 18:22:32Z +
+
+ x-ms-client-request-id + 134732c5-0b00-4d95-a790-d82a0941cbff-2014-07-01 18:23:35Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + adeb0e05-51f0-4a42-9e01-a8dba063c2fd +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 18:23:34 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>CREATE DATABASE</Name><Type>Microsoft.SqlAzure.DatabaseOperation</Type><State>COMPLETED</State><SelfLink>https://localhost/servers/myserver01/databaseoperations/abd31d7f-19ca-4f29-a89a-7b38910f7ca9</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>abd31d7f-19ca-4f29-a89a-7b38910f7ca9</Id><StateId>2</StateId><SessionActivityId>2124fd28-a431-40a7-b042-c3a712a32062</SessionActivityId><DatabaseName>testdbcertGetOperationDbName_f1abaa48-a85a-4141-9a40-6acb3ea65771</DatabaseName><PercentComplete>100</PercentComplete><ErrorCode>0</ErrorCode><Error/><ErrorSeverity>0</ErrorSeverity><ErrorState>0</ErrorState><StartTime>2014-07-01T18:23:32.5330000</StartTime><LastModifyTime>2014-07-01T18:23:33.5470000</LastModifyTime></ServiceResource></ServiceResources> +
+
+ + 78 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databaseoperations/abd31d7f-19ca-4f29-a89a-7b38910f7ca9 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 27627108-5056-4884-85e4-5f7f5bb95d93-2014-07-01 18:22:32Z +
+
+ x-ms-client-request-id + 9852d4d3-ac5e-40e0-b686-6a16f227bcbc-2014-07-01 18:23:36Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + a9c2f5b5-9ad9-4c48-b34c-6f0a695e5f15 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 18:23:36 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>CREATE DATABASE</Name><Type>Microsoft.SqlAzure.DatabaseOperation</Type><State>COMPLETED</State><SelfLink>https://localhost/servers/myserver01/databaseoperations/abd31d7f-19ca-4f29-a89a-7b38910f7ca9</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>abd31d7f-19ca-4f29-a89a-7b38910f7ca9</Id><StateId>2</StateId><SessionActivityId>2124fd28-a431-40a7-b042-c3a712a32062</SessionActivityId><DatabaseName>testdbcertGetOperationDbName_f1abaa48-a85a-4141-9a40-6acb3ea65771</DatabaseName><PercentComplete>100</PercentComplete><ErrorCode>0</ErrorCode><Error/><ErrorSeverity>0</ErrorSeverity><ErrorState>0</ErrorState><StartTime>2014-07-01T18:23:32.5330000</StartTime><LastModifyTime>2014-07-01T18:23:33.5470000</LastModifyTime></ServiceResource> +
+
+ + 79 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbcertGetOperationDbName_f1abaa48-a85a-4141-9a40-6acb3ea65771 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 27627108-5056-4884-85e4-5f7f5bb95d93-2014-07-01 18:22:32Z +
+
+ x-ms-client-request-id + 69f4bd15-9ac2-48da-be02-e8761b1aad62-2014-07-01 18:23:37Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 855079e1-798f-4573-ac16-5f41968c7116 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Tue, 01 Jul 2014 18:23:37 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 80 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases?contentview=generic + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 27627108-5056-4884-85e4-5f7f5bb95d93-2014-07-01 18:22:32Z +
+
+ x-ms-client-request-id + 8dd2a8fd-d750-498b-945e-6faaf5399855-2014-07-01 18:23:38Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + f4097f94-53d8-4942-9541-6ffc26799d5f +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 18:23:39 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>master</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/master</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>1</Id><Edition>System</Edition><MaxSizeGB>5</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-01T17:51:19.7300000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>True</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>5368709120</MaxSizeBytes><ServiceObjectiveId>26e021db-f1f9-4c98-84c6-92af8ef433d7</ServiceObjectiveId><AssignedServiceObjectiveId>26e021db-f1f9-4c98-84c6-92af8ef433d7</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-01T17:51:21.6470000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate i:nil="true"/><IsSuspended>False</IsSuspended></ServiceResource></ServiceResources> +
+
+ + 81 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/26e021db-f1f9-4c98-84c6-92af8ef433d7 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 27627108-5056-4884-85e4-5f7f5bb95d93-2014-07-01 18:22:32Z +
+
+ x-ms-client-request-id + cfd34030-0060-4147-ae45-a8229e815204-2014-07-01 18:23:39Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 52c57f27-935f-464c-9d61-4360a0bcae6b +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 18:23:39 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>System</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/26e021db-f1f9-4c98-84c6-92af8ef433d7</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>26e021db-f1f9-4c98-84c6-92af8ef433d7</Id><IsDefault>False</IsDefault><IsSystem>True</IsSystem><Description>Used for master database only.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>System</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/5b1e7ca2-f1c8-4da8-bb42-7ebe94a92609</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>5b1e7ca2-f1c8-4da8-bb42-7ebe94a92609</Id><Description>Used for master database only.</Description><Ordinal>1</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 10 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 98fd52cf-24a2-4f03-af62-87bb35af25e5-2014-07-07 19:57:15Z +
+
+ x-ms-client-request-id + 4983bfad-8a7b-4dc3-970d-e95c5a9f7e06-2014-07-07 19:57:24Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + d59aeb9f-748e-4255-95d9-c9178ad4dc9f +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Mon, 07 Jul 2014 19:57:24 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 57 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 98fd52cf-24a2-4f03-af62-87bb35af25e5-2014-07-07 19:57:15Z +
+
+ x-ms-client-request-id + fd46724b-3588-415e-ab3d-d341c7d6b151-2014-07-07 19:58:01Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + c62706ca-f932-49d5-a168-15e8973424f3 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Mon, 07 Jul 2014 19:58:01 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>P2</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Premium P2 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>P2</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/b15e89f1-02b5-4618-b44d-75d37261b94b</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>b15e89f1-02b5-4618-b44d-75d37261b94b</Id><Description>Premium P2 resource allocation.</Description><Ordinal>7</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 58 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 98fd52cf-24a2-4f03-af62-87bb35af25e5-2014-07-07 19:57:15Z +
+
+ x-ms-client-request-id + eefd4a9c-3936-4b09-bc0e-d79333115150-2014-07-07 19:58:01Z +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <Name>testdbcertGetOperationDbName_76974d03-d70b-4f9b-88d0-76df0cb68f2c</Name> + <CollationName></CollationName> +</ServiceResource> + application/xml + +
+ + Created + +
+ x-ms-request-id + 3360f77a-5284-4662-9dfd-0f37b0af1ec7 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Mon, 07 Jul 2014 19:58:04 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbcertGetOperationDbName_76974d03-d70b-4f9b-88d0-76df0cb68f2c</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbcertGetOperationDbName_76974d03-d70b-4f9b-88d0-76df0cb68f2c</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>9</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-07T19:58:02.3470000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-07T19:58:03.6600000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-07T19:59:02.1470000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 59 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 98fd52cf-24a2-4f03-af62-87bb35af25e5-2014-07-07 19:57:15Z +
+
+ x-ms-client-request-id + c9362cd5-149c-40c5-824f-61afe2d28846-2014-07-07 19:58:04Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 44948804-8991-4755-9b72-6fb853d4f73e +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Mon, 07 Jul 2014 19:58:04 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 60 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databaseoperations?databaseName=testdbcertGetOperationDbName_76974d03-d70b-4f9b-88d0-76df0cb68f2c + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 98fd52cf-24a2-4f03-af62-87bb35af25e5-2014-07-07 19:57:15Z +
+
+ x-ms-client-request-id + 5ce9227f-50cd-4bf2-9504-9975a07229f0-2014-07-07 19:58:04Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 92947bcc-6c33-4570-85cb-d39c44a9b0a1 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Mon, 07 Jul 2014 19:58:04 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>CREATE DATABASE</Name><Type>Microsoft.SqlAzure.DatabaseOperation</Type><State>COMPLETED</State><SelfLink>https://localhost/servers/myserver01/databaseoperations/33623226-1f44-4ea5-a18f-b4460664f9b0</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>33623226-1f44-4ea5-a18f-b4460664f9b0</Id><StateId>2</StateId><SessionActivityId>3360f77a-5284-4662-9dfd-0f37b0af1ec7</SessionActivityId><DatabaseName>testdbcertGetOperationDbName_76974d03-d70b-4f9b-88d0-76df0cb68f2c</DatabaseName><PercentComplete>100</PercentComplete><ErrorCode>0</ErrorCode><Error/><ErrorSeverity>0</ErrorSeverity><ErrorState>0</ErrorState><StartTime>2014-07-07T19:58:02.0530000</StartTime><LastModifyTime>2014-07-07T19:58:03.7400000</LastModifyTime></ServiceResource></ServiceResources> +
+
+ + 61 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databaseoperations?databaseName=testdbcertGetOperationDbName_76974d03-d70b-4f9b-88d0-76df0cb68f2c + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 98fd52cf-24a2-4f03-af62-87bb35af25e5-2014-07-07 19:57:15Z +
+
+ x-ms-client-request-id + 5cb7dd9b-65c5-4709-86db-e3d3797ef73c-2014-07-07 19:58:04Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + cf971bd6-7c0f-4fe6-bab8-1c6d027ac2f8 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Mon, 07 Jul 2014 19:58:04 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>CREATE DATABASE</Name><Type>Microsoft.SqlAzure.DatabaseOperation</Type><State>COMPLETED</State><SelfLink>https://localhost/servers/myserver01/databaseoperations/33623226-1f44-4ea5-a18f-b4460664f9b0</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>33623226-1f44-4ea5-a18f-b4460664f9b0</Id><StateId>2</StateId><SessionActivityId>3360f77a-5284-4662-9dfd-0f37b0af1ec7</SessionActivityId><DatabaseName>testdbcertGetOperationDbName_76974d03-d70b-4f9b-88d0-76df0cb68f2c</DatabaseName><PercentComplete>100</PercentComplete><ErrorCode>0</ErrorCode><Error/><ErrorSeverity>0</ErrorSeverity><ErrorState>0</ErrorState><StartTime>2014-07-07T19:58:02.0530000</StartTime><LastModifyTime>2014-07-07T19:58:03.7400000</LastModifyTime></ServiceResource></ServiceResources> +
+
+ + 62 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databaseoperations/33623226-1f44-4ea5-a18f-b4460664f9b0 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 98fd52cf-24a2-4f03-af62-87bb35af25e5-2014-07-07 19:57:15Z +
+
+ x-ms-client-request-id + 85c7aa8c-e1cf-4641-a901-fb5cd4ea6b51-2014-07-07 19:58:04Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 05fada32-005a-4268-b7d4-70cc4a8077bc +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Mon, 07 Jul 2014 19:58:04 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>CREATE DATABASE</Name><Type>Microsoft.SqlAzure.DatabaseOperation</Type><State>COMPLETED</State><SelfLink>https://localhost/servers/myserver01/databaseoperations/33623226-1f44-4ea5-a18f-b4460664f9b0</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>33623226-1f44-4ea5-a18f-b4460664f9b0</Id><StateId>2</StateId><SessionActivityId>3360f77a-5284-4662-9dfd-0f37b0af1ec7</SessionActivityId><DatabaseName>testdbcertGetOperationDbName_76974d03-d70b-4f9b-88d0-76df0cb68f2c</DatabaseName><PercentComplete>100</PercentComplete><ErrorCode>0</ErrorCode><Error/><ErrorSeverity>0</ErrorSeverity><ErrorState>0</ErrorState><StartTime>2014-07-07T19:58:02.0530000</StartTime><LastModifyTime>2014-07-07T19:58:03.7400000</LastModifyTime></ServiceResource> +
+
+ + 63 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbcert3 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 98fd52cf-24a2-4f03-af62-87bb35af25e5-2014-07-07 19:57:15Z +
+
+ x-ms-client-request-id + 6cce9387-f9fb-4c0c-8fb7-7e014041d675-2014-07-07 19:58:05Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 015080fa-0bcf-444e-8790-017185c7d5f2 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Mon, 07 Jul 2014 19:58:08 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 64 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbcert2 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 98fd52cf-24a2-4f03-af62-87bb35af25e5-2014-07-07 19:57:15Z +
+
+ x-ms-client-request-id + d697072b-4165-4901-9af6-75e13e031bb7-2014-07-07 19:58:08Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 44ff1afe-fbf2-4936-8e10-7dd6f5e790e6 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Mon, 07 Jul 2014 19:58:10 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 65 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbcert4 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 98fd52cf-24a2-4f03-af62-87bb35af25e5-2014-07-07 19:57:15Z +
+
+ x-ms-client-request-id + 1d398ee1-c2d8-4544-a945-edfc0640b620-2014-07-07 19:58:11Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 96aab86e-ee99-477a-92b8-12696b422a55 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Mon, 07 Jul 2014 19:58:12 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 66 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbcertPremiumDBP1 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 98fd52cf-24a2-4f03-af62-87bb35af25e5-2014-07-07 19:57:15Z +
+
+ x-ms-client-request-id + a91aab26-2e82-4201-a831-3e555118f507-2014-07-07 19:58:13Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 7e36534b-4152-4d45-ace9-796dddab428f +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Mon, 07 Jul 2014 19:58:15 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 67 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbcertPremiumDBP2 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 98fd52cf-24a2-4f03-af62-87bb35af25e5-2014-07-07 19:57:15Z +
+
+ x-ms-client-request-id + 96beda62-f5ca-4561-ada6-2b11b6b71b60-2014-07-07 19:58:15Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 2bff7ff0-075c-4e9d-a595-46f222b1209f +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Mon, 07 Jul 2014 19:58:18 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 68 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbcertGetOperationDbName_76974d03-d70b-4f9b-88d0-76df0cb68f2c + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 98fd52cf-24a2-4f03-af62-87bb35af25e5-2014-07-07 19:57:15Z +
+
+ x-ms-client-request-id + c050b1b1-8e75-456c-a7b0-6c56eff8a54b-2014-07-07 19:58:18Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 51cff5b0-d757-484d-a0dd-9c9f3787a236 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Mon, 07 Jul 2014 19:58:20 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 69 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases?contentview=generic + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 98fd52cf-24a2-4f03-af62-87bb35af25e5-2014-07-07 19:57:15Z +
+
+ x-ms-client-request-id + 4a29587c-d167-44fa-a6b4-484dc1b6bc57-2014-07-07 19:58:20Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 7e4162c1-b8fd-4573-810d-cb9e1f3db310 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Mon, 07 Jul 2014 19:58:20 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>master</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/master</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>1</Id><Edition>System</Edition><MaxSizeGB>5</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-07T18:27:48.3970000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>True</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>5368709120</MaxSizeBytes><ServiceObjectiveId>26e021db-f1f9-4c98-84c6-92af8ef433d7</ServiceObjectiveId><AssignedServiceObjectiveId>26e021db-f1f9-4c98-84c6-92af8ef433d7</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-07T18:27:51.0930000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate i:nil="true"/><IsSuspended>False</IsSuspended></ServiceResource></ServiceResources> +
+
+ + 70 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/26e021db-f1f9-4c98-84c6-92af8ef433d7 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 98fd52cf-24a2-4f03-af62-87bb35af25e5-2014-07-07 19:57:15Z +
+
+ x-ms-client-request-id + 94df10a3-b218-4dab-8e6e-e35b0a96f8a7-2014-07-07 19:58:20Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + a21d4e5f-941c-4169-b369-542c9da6a5ff +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Mon, 07 Jul 2014 19:58:20 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>System</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/26e021db-f1f9-4c98-84c6-92af8ef433d7</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>26e021db-f1f9-4c98-84c6-92af8ef433d7</Id><IsDefault>False</IsDefault><IsSystem>True</IsSystem><Description>Used for master database only.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>System</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/5b1e7ca2-f1c8-4da8-bb42-7ebe94a92609</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>5b1e7ca2-f1c8-4da8-bb42-7ebe94a92609</Id><Description>Used for master database only.</Description><Ordinal>1</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 0 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + 58be934b-3b99-4ccf-8e73-2cda33c037a4-2014-07-24 18:33:34Z +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <Name>testdbcert1</Name> + <CollationName></CollationName> +</ServiceResource> + application/xml + +
+ + Created + +
+ x-ms-request-id + 38ee9978-f024-43c6-9cbd-98af1df374a6 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:33:41 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbcert1</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbcert1</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>4</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T18:33:38.6430000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T18:33:40.3830000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T18:34:38.2600000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 1 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + 3457048e-a701-4693-8b7e-5434f65582c7-2014-07-24 18:33:41Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + c66661be-ca5d-411e-9d69-4db15881ee3f +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:33:41 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 2 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + cd60783d-919c-409b-88e7-41fb05727407-2014-07-24 18:33:41Z +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <Name>testdbcert2</Name> + <Edition>Business</Edition> + <MaxSizeGB>10</MaxSizeGB> + <CollationName>Japanese_CI_AS</CollationName> +</ServiceResource> + application/xml + +
+ + Created + +
+ x-ms-request-id + 2b9ec546-df74-4295-9b3a-48ccf4dde7be +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:33:44 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbcert2</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbcert2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>5</Id><Edition>Business</Edition><MaxSizeGB>10</MaxSizeGB><CollationName>Japanese_CI_AS</CollationName><CreationDate>2014-07-24T18:33:41.7870000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>10737418240</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T18:33:43.5400000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T18:34:41.5700000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 3 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + 086531eb-167d-424f-a574-f5829a4162f6-2014-07-24 18:33:44Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 6b8a5bb9-1b9d-4fec-bf8f-d3db377e3f1b +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:33:44 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 4 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + 6f872964-7bc9-4716-8533-3b0a7c2f09c9-2014-07-24 18:33:44Z +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <Name>testdbcert4</Name> + <CollationName></CollationName> + <MaxSizeBytes>104857600</MaxSizeBytes> +</ServiceResource> + application/xml + +
+ + Created + +
+ x-ms-request-id + 7f02e598-aad0-4eec-8152-810e8a28e149 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:33:47 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbcert4</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbcert4</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>6</Id><Edition>Web</Edition><MaxSizeGB>0</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T18:33:44.7330000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>104857600</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T18:33:46.5570000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T18:34:44.4770000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 5 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + 8caeec5f-70a3-485f-94a0-f4720d89071b-2014-07-24 18:33:47Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + b7a38d30-5e11-48da-ba9c-7c04ae2f56ca +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:33:47 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 6 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases?contentview=generic + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + 3f1a1e06-43ef-41d7-8802-6a725e6ec205-2014-07-24 18:33:47Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 0a1f223f-2313-42b0-8a2e-db8f46478df6 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:33:47 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>master</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/master</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>1</Id><Edition>System</Edition><MaxSizeGB>5</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-22T17:52:25.3400000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>True</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>5368709120</MaxSizeBytes><ServiceObjectiveId>26e021db-f1f9-4c98-84c6-92af8ef433d7</ServiceObjectiveId><AssignedServiceObjectiveId>26e021db-f1f9-4c98-84c6-92af8ef433d7</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-22T17:52:27.9370000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate i:nil="true"/><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdbcert1</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbcert1</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>4</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T18:33:38.6430000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T18:33:40.3830000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T18:34:38.2600000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdbcert2</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbcert2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>5</Id><Edition>Business</Edition><MaxSizeGB>10</MaxSizeGB><CollationName>Japanese_CI_AS</CollationName><CreationDate>2014-07-24T18:33:41.7870000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>10737418240</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T18:33:43.5400000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T18:34:41.5700000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdbcert4</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbcert4</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>6</Id><Edition>Web</Edition><MaxSizeGB>0</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T18:33:44.7330000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>104857600</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T18:33:46.5570000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T18:34:44.4770000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource></ServiceResources> +
+
+ + 7 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/26e021db-f1f9-4c98-84c6-92af8ef433d7 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + 1e1329fd-d217-48c7-b644-067555953e2c-2014-07-24 18:33:47Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 51942c38-5a35-49f9-aba7-37e87bf23fe7 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:33:47 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>System</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/26e021db-f1f9-4c98-84c6-92af8ef433d7</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>26e021db-f1f9-4c98-84c6-92af8ef433d7</Id><IsDefault>False</IsDefault><IsSystem>True</IsSystem><Description>Used for master database only.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>System</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/5b1e7ca2-f1c8-4da8-bb42-7ebe94a92609</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>5b1e7ca2-f1c8-4da8-bb42-7ebe94a92609</Id><Description>Used for master database only.</Description><Ordinal>1</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 8 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + 0e293749-1188-44c5-9b7e-8a6ff6c1c2df-2014-07-24 18:33:47Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + e2a017b5-5fac-497e-8e08-7c6b073e5b8f +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:33:47 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 9 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + 4be0baa5-f437-4598-b920-0461c79936b3-2014-07-24 18:33:47Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 893bb97f-0844-47b6-909a-646cb9d39811 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:33:47 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 10 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + 89686d32-f7b6-41c2-adb6-91cd9e5cd75e-2014-07-24 18:33:48Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + eec540f1-0e27-4e3b-ac5c-2cc511fd30a0 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:33:48 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 11 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbcert1 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + 64a61701-8397-48fb-8417-2644f8056ccf-2014-07-24 18:33:48Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + e1cb24de-27b4-440a-9325-f4860b79cc5b +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:33:48 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbcert1</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbcert1</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>4</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T18:33:38.6430000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T18:33:40.3830000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T18:34:38.2600000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 12 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + 2cfa0c27-2105-4e40-9aa6-6c564ab8a623-2014-07-24 18:33:48Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 8efe489c-deac-4abd-8aab-e28874ce3409 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:33:48 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 13 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbcert4 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + e0c06d45-45da-4544-816c-cdeb27b44b79-2014-07-24 18:33:48Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + d28477f9-c3ae-4fee-a831-e9539bde9531 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:33:48 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbcert4</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbcert4</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>6</Id><Edition>Web</Edition><MaxSizeGB>0</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T18:33:44.7330000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>104857600</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T18:33:46.5570000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T18:34:44.4770000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 14 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + c21fa624-606c-4342-acc2-9d4fb07ecab4-2014-07-24 18:33:49Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 3c5fd499-421d-41cd-b52d-aca020c41b5b +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:33:48 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 15 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbcert1 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + d5cb1115-9039-4eb9-9243-c67f2edaad65-2014-07-24 18:33:49Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + e70c14ef-4d5b-4ebe-8c01-2c67b28e6a14 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:33:49 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbcert1</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbcert1</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>4</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T18:33:38.6430000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T18:33:40.3830000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T18:34:38.2600000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 16 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbcert1 + PUT + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + d5cb1115-9039-4eb9-9243-c67f2edaad65-2014-07-24 18:33:49Z +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <Name>testdbcert3</Name> + <Edition>Web</Edition> + <ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId> +</ServiceResource> + application/xml + +
+ + OK + +
+ x-ms-request-id + d6bd442f-da6f-4e45-9e40-26122730517b +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:33:51 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbcert3</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbcert3</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>4</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T18:33:51.5170000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T18:33:40.3830000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T18:34:38.2600000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 17 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + 95e53ddc-3558-4652-8d44-a32b817d449a-2014-07-24 18:33:51Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 26577677-e3c1-433c-8758-38ad376317bd +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:33:51 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 18 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbcert3 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + 523fc064-1033-428b-98f6-a46b2d270cba-2014-07-24 18:33:52Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 52d27d7c-dc4b-4187-81a9-2b47404ff466 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:33:51 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbcert3</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbcert3</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>4</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T18:33:51.5170000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T18:33:40.3830000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T18:34:38.2600000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 19 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbcert3 + PUT + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + 523fc064-1033-428b-98f6-a46b2d270cba-2014-07-24 18:33:52Z +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <Name>testdbcert3</Name> + <Edition>Web</Edition> + <MaxSizeGB>5</MaxSizeGB> + <ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId> +</ServiceResource> + application/xml + +
+ + OK + +
+ x-ms-request-id + c0d8a540-9b27-4a04-b918-d6723ba94da7 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:33:54 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbcert3</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbcert3</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>4</Id><Edition>Web</Edition><MaxSizeGB>5</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T18:33:51.5170000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>5368709120</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T18:33:40.3830000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T18:35:38.2600000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 20 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + c1e8e6df-6d02-4634-86e6-abf77d276a13-2014-07-24 18:33:54Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 4df6df75-0745-411e-a6ad-6e9501f324bd +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:33:54 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 21 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbcert4 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + 2dc8b186-fa76-4edd-b5ba-ab3c177932c0-2014-07-24 18:33:54Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 811c8801-9317-4e5c-9fa5-3ae07ba24461 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:33:54 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbcert4</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbcert4</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>6</Id><Edition>Web</Edition><MaxSizeGB>0</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T18:33:44.7330000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>104857600</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T18:33:46.5570000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T18:34:44.4770000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 22 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbcert4 + PUT + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + 2dc8b186-fa76-4edd-b5ba-ab3c177932c0-2014-07-24 18:33:54Z +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <Name>testdbcert4</Name> + <Edition>Web</Edition> + <MaxSizeBytes>1073741824</MaxSizeBytes> + <ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId> +</ServiceResource> + application/xml + +
+ + OK + +
+ x-ms-request-id + 7d37d031-5d2e-426d-9dde-fd2c1d202cd4 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:33:56 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbcert4</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbcert4</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>6</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T18:33:44.7330000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T18:33:46.5570000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T18:35:44.4770000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 23 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + d35075b7-c587-48f0-9604-0e101651a138-2014-07-24 18:33:56Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 08dc4a41-ed13-4491-a6cc-a2fef6873ebc +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:33:56 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 24 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + 3ae34902-6fc4-4fff-9867-575868d4df6c-2014-07-24 18:33:56Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 5bbced7c-ca2a-41f3-bf9b-34dc550e015e +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:33:56 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>S2</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/455330e1-00cd-488b-b5fa-177c226f28b7</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>455330e1-00cd-488b-b5fa-177c226f28b7</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Standard S2 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>S2</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/a6929526-f04f-48d2-8c46-babe799f2192</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>a6929526-f04f-48d2-8c46-babe799f2192</Id><Description>Standard S2 resource allocation.</Description><Ordinal>5</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource><ServiceResource><Name>P1</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/7203483a-c4fb-4304-9e9f-17c71c904f5d</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>7203483a-c4fb-4304-9e9f-17c71c904f5d</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Premium P1 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>P1</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/765fbda3-73c9-4fad-996e-7c0e4e219f68</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>765fbda3-73c9-4fad-996e-7c0e4e219f68</Id><Description>Premium P1 resource allocation.</Description><Ordinal>6</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource><ServiceResource><Name>P2</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Premium P2 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>P2</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/b15e89f1-02b5-4618-b44d-75d37261b94b</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>b15e89f1-02b5-4618-b44d-75d37261b94b</Id><Description>Premium P2 resource allocation.</Description><Ordinal>7</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource><ServiceResource><Name>Basic</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Basic resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Basic</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/3a2b7a50-065b-4c55-921d-c0ca49e174d3</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>3a2b7a50-065b-4c55-921d-c0ca49e174d3</Id><Description>Basic resource allocation.</Description><Ordinal>3</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource><ServiceResource><Name>S1</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/1b1ebd4d-d903-4baa-97f9-4ea675f5e928</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Standard S1 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>S1</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/2e9b7ede-a777-4244-945c-9f319b1cec02</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>2e9b7ede-a777-4244-945c-9f319b1cec02</Id><Description>Standard S1 resource allocation.</Description><Ordinal>4</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource><ServiceResource><Name>P3 deprecated</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/e210706e-cd95-4f72-b5e5-885f8a1406e8</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>e210706e-cd95-4f72-b5e5-885f8a1406e8</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Premium P3 deprecated resource allocation.</Description><Enabled>False</Enabled><DimensionSettings><ServiceResource><Name>P3 deprecated</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/8efe7983-8e31-4ddb-82d2-5c00e4f48631</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>8efe7983-8e31-4ddb-82d2-5c00e4f48631</Id><Description>Premium P3 deprecated resource allocation.</Description><Ordinal>9</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource><ServiceResource><Name>P3</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/a7c4c615-cfb1-464b-b252-925be0a19446</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>a7c4c615-cfb1-464b-b252-925be0a19446</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Premium P3 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>P3</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/c4da00a1-df48-4f87-930e-dbc170fe1cef</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>c4da00a1-df48-4f87-930e-dbc170fe1cef</Id><Description>Premium P3 resource allocation.</Description><Ordinal>8</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource><ServiceResource><Name>System</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/26e021db-f1f9-4c98-84c6-92af8ef433d7</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>26e021db-f1f9-4c98-84c6-92af8ef433d7</Id><IsDefault>False</IsDefault><IsSystem>True</IsSystem><Description>Used for master database only.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>System</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/5b1e7ca2-f1c8-4da8-bb42-7ebe94a92609</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>5b1e7ca2-f1c8-4da8-bb42-7ebe94a92609</Id><Description>Used for master database only.</Description><Ordinal>1</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource><ServiceResource><Name>System Standard</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/a45fea0c-e63c-4bf0-9f81-9964c86b7d2a</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>a45fea0c-e63c-4bf0-9f81-9964c86b7d2a</Id><IsDefault>False</IsDefault><IsSystem>True</IsSystem><Description>Used for master database only.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource></ServiceResources> +
+
+ + 25 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + d8056bd8-7cb1-4928-a31b-52e825cad5ac-2014-07-24 18:33:57Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 7722e0df-dd8e-4169-847f-8dbd3a7b07e4 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:33:56 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>S2</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/455330e1-00cd-488b-b5fa-177c226f28b7</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>455330e1-00cd-488b-b5fa-177c226f28b7</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Standard S2 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>S2</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/a6929526-f04f-48d2-8c46-babe799f2192</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>a6929526-f04f-48d2-8c46-babe799f2192</Id><Description>Standard S2 resource allocation.</Description><Ordinal>5</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource><ServiceResource><Name>P1</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/7203483a-c4fb-4304-9e9f-17c71c904f5d</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>7203483a-c4fb-4304-9e9f-17c71c904f5d</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Premium P1 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>P1</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/765fbda3-73c9-4fad-996e-7c0e4e219f68</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>765fbda3-73c9-4fad-996e-7c0e4e219f68</Id><Description>Premium P1 resource allocation.</Description><Ordinal>6</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource><ServiceResource><Name>P2</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Premium P2 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>P2</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/b15e89f1-02b5-4618-b44d-75d37261b94b</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>b15e89f1-02b5-4618-b44d-75d37261b94b</Id><Description>Premium P2 resource allocation.</Description><Ordinal>7</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource><ServiceResource><Name>Basic</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Basic resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Basic</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/3a2b7a50-065b-4c55-921d-c0ca49e174d3</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>3a2b7a50-065b-4c55-921d-c0ca49e174d3</Id><Description>Basic resource allocation.</Description><Ordinal>3</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource><ServiceResource><Name>S1</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/1b1ebd4d-d903-4baa-97f9-4ea675f5e928</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Standard S1 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>S1</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/2e9b7ede-a777-4244-945c-9f319b1cec02</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>2e9b7ede-a777-4244-945c-9f319b1cec02</Id><Description>Standard S1 resource allocation.</Description><Ordinal>4</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource><ServiceResource><Name>P3 deprecated</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/e210706e-cd95-4f72-b5e5-885f8a1406e8</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>e210706e-cd95-4f72-b5e5-885f8a1406e8</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Premium P3 deprecated resource allocation.</Description><Enabled>False</Enabled><DimensionSettings><ServiceResource><Name>P3 deprecated</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/8efe7983-8e31-4ddb-82d2-5c00e4f48631</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>8efe7983-8e31-4ddb-82d2-5c00e4f48631</Id><Description>Premium P3 deprecated resource allocation.</Description><Ordinal>9</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource><ServiceResource><Name>P3</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/a7c4c615-cfb1-464b-b252-925be0a19446</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>a7c4c615-cfb1-464b-b252-925be0a19446</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Premium P3 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>P3</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/c4da00a1-df48-4f87-930e-dbc170fe1cef</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>c4da00a1-df48-4f87-930e-dbc170fe1cef</Id><Description>Premium P3 resource allocation.</Description><Ordinal>8</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource><ServiceResource><Name>System</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/26e021db-f1f9-4c98-84c6-92af8ef433d7</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>26e021db-f1f9-4c98-84c6-92af8ef433d7</Id><IsDefault>False</IsDefault><IsSystem>True</IsSystem><Description>Used for master database only.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>System</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/5b1e7ca2-f1c8-4da8-bb42-7ebe94a92609</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>5b1e7ca2-f1c8-4da8-bb42-7ebe94a92609</Id><Description>Used for master database only.</Description><Ordinal>1</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource><ServiceResource><Name>System Standard</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/a45fea0c-e63c-4bf0-9f81-9964c86b7d2a</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>a45fea0c-e63c-4bf0-9f81-9964c86b7d2a</Id><IsDefault>False</IsDefault><IsSystem>True</IsSystem><Description>Used for master database only.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource></ServiceResources> +
+
+ + 26 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + dec8d8a1-4c84-474d-b959-19542db87944-2014-07-24 18:33:57Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 6f90d34d-444a-49c6-80cc-d2ebd7a5472e +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:33:56 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>P2</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Premium P2 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>P2</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/b15e89f1-02b5-4618-b44d-75d37261b94b</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>b15e89f1-02b5-4618-b44d-75d37261b94b</Id><Description>Premium P2 resource allocation.</Description><Ordinal>7</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 27 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbcert4 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + deb29996-6267-47c5-9c8c-6e558eb5d600-2014-07-24 18:33:57Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 87472fbd-5202-4c82-947a-954838f93048 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:33:56 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbcert4</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbcert4</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>6</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T18:33:44.7330000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T18:33:46.5570000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T18:34:44.4770000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 28 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbcert4 + PUT + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + deb29996-6267-47c5-9c8c-6e558eb5d600-2014-07-24 18:33:57Z +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <Name>testdbcert4</Name> + <Edition>Premium</Edition> + <MaxSizeGB>10</MaxSizeGB> + <ServiceObjectiveId>a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</ServiceObjectiveId> +</ServiceResource> + application/xml + +
+ + OK + +
+ x-ms-request-id + 34acc41e-724e-4996-ad01-2b5d57fe1690 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:34:00 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbcert4</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbcert4</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>6</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T18:33:44.7330000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>0</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Pending</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T18:33:46.5570000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T18:35:44.4770000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 29 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + 2893d304-137b-4b2c-9da4-45639c20b151-2014-07-24 18:34:00Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 3a076a66-be26-404a-baf6-01dc4b4e531c +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:34:00 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 30 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + 48fe16f9-4ae2-4e1d-8926-b59deb5b2970-2014-07-24 18:34:00Z +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <Name>testdbcertPremiumDBP1</Name> + <Edition>Premium</Edition> + <CollationName></CollationName> + <ServiceObjectiveId>7203483a-c4fb-4304-9e9f-17c71c904f5d</ServiceObjectiveId> +</ServiceResource> + application/xml + +
+ + Created + +
+ x-ms-request-id + b7dad5bd-16c2-49ef-92a6-789a03600d51 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:34:00 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbcertPremiumDBP1</Name><Type>Microsoft.SqlAzure.Database</Type><State>Creating</State><SelfLink>https://localhost/servers/myserver01/databases/testdbcertPremiumDBP1</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>7</Id><Edition/><MaxSizeGB>-1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T18:34:00.5700000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>-1</MaxSizeBytes><ServiceObjectiveId>7203483a-c4fb-4304-9e9f-17c71c904f5d</ServiceObjectiveId><AssignedServiceObjectiveId>7203483a-c4fb-4304-9e9f-17c71c904f5d</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>0</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Pending</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T18:16:47.9900000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate i:nil="true"/><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 31 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/7203483a-c4fb-4304-9e9f-17c71c904f5d + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + 585f570a-5ce3-4aab-a768-e4b6c400ac3f-2014-07-24 18:34:01Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 73079e30-c3c7-4ae0-97eb-1440a63d714b +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:34:01 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>P1</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/7203483a-c4fb-4304-9e9f-17c71c904f5d</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>7203483a-c4fb-4304-9e9f-17c71c904f5d</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Premium P1 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>P1</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/765fbda3-73c9-4fad-996e-7c0e4e219f68</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>765fbda3-73c9-4fad-996e-7c0e4e219f68</Id><Description>Premium P1 resource allocation.</Description><Ordinal>6</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 32 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbcertPremiumDBP1 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + 51e5b50a-df85-4d95-a3a8-fd3093c1e0ec-2014-07-24 18:34:03Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + a58d84f2-64eb-44f7-a4c1-db0f2393e031 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:34:03 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbcertPremiumDBP1</Name><Type>Microsoft.SqlAzure.Database</Type><State>Creating</State><SelfLink>https://localhost/servers/myserver01/databases/testdbcertPremiumDBP1</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>7</Id><Edition/><MaxSizeGB>-1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T18:34:00.5700000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>-1</MaxSizeBytes><ServiceObjectiveId>7203483a-c4fb-4304-9e9f-17c71c904f5d</ServiceObjectiveId><AssignedServiceObjectiveId>7203483a-c4fb-4304-9e9f-17c71c904f5d</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>0</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Pending</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T18:16:47.9900000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate i:nil="true"/><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 33 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/7203483a-c4fb-4304-9e9f-17c71c904f5d + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + 3b5ed630-9f38-4720-8511-d057b5dd27cc-2014-07-24 18:34:03Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 0f8f82d0-fad4-4dc0-a5b7-42ee222279be +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:34:03 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>P1</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/7203483a-c4fb-4304-9e9f-17c71c904f5d</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>7203483a-c4fb-4304-9e9f-17c71c904f5d</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Premium P1 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>P1</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/765fbda3-73c9-4fad-996e-7c0e4e219f68</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>765fbda3-73c9-4fad-996e-7c0e4e219f68</Id><Description>Premium P1 resource allocation.</Description><Ordinal>6</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 34 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbcertPremiumDBP1 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + aa6fb7ea-a34b-4f1c-b143-e6e413ec8073-2014-07-24 18:34:05Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 6eaa6443-c93b-4978-b5ed-952ff7707295 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:34:05 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbcertPremiumDBP1</Name><Type>Microsoft.SqlAzure.Database</Type><State>Creating</State><SelfLink>https://localhost/servers/myserver01/databases/testdbcertPremiumDBP1</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>7</Id><Edition/><MaxSizeGB>-1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T18:34:00.5700000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>-1</MaxSizeBytes><ServiceObjectiveId>7203483a-c4fb-4304-9e9f-17c71c904f5d</ServiceObjectiveId><AssignedServiceObjectiveId>7203483a-c4fb-4304-9e9f-17c71c904f5d</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>0</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Pending</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T18:16:47.9900000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate i:nil="true"/><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 35 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/7203483a-c4fb-4304-9e9f-17c71c904f5d + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + a57381fa-aa07-4fb2-9123-5616a17823a4-2014-07-24 18:34:05Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 028dd702-f2d0-4f47-99e1-7e9c5b80e9d3 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:34:05 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>P1</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/7203483a-c4fb-4304-9e9f-17c71c904f5d</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>7203483a-c4fb-4304-9e9f-17c71c904f5d</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Premium P1 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>P1</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/765fbda3-73c9-4fad-996e-7c0e4e219f68</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>765fbda3-73c9-4fad-996e-7c0e4e219f68</Id><Description>Premium P1 resource allocation.</Description><Ordinal>6</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 36 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbcertPremiumDBP1 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + afad290e-0e5f-4fb8-8d77-91928bbabbea-2014-07-24 18:34:07Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + b2d320a7-7371-4257-a13d-5fa64903395f +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:34:07 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbcertPremiumDBP1</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbcertPremiumDBP1</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>7</Id><Edition>Premium</Edition><MaxSizeGB>10</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T18:34:00.5700000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>10737418240</MaxSizeBytes><ServiceObjectiveId>7203483a-c4fb-4304-9e9f-17c71c904f5d</ServiceObjectiveId><AssignedServiceObjectiveId>7203483a-c4fb-4304-9e9f-17c71c904f5d</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T18:34:05.8830000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T18:35:00.3700000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 37 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/7203483a-c4fb-4304-9e9f-17c71c904f5d + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + 1fcbbce8-8d47-4223-91a3-c190dc34e974-2014-07-24 18:34:07Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 775c10bf-5f7f-4cf2-8182-a5d109e05aa3 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:34:07 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>P1</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/7203483a-c4fb-4304-9e9f-17c71c904f5d</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>7203483a-c4fb-4304-9e9f-17c71c904f5d</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Premium P1 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>P1</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/765fbda3-73c9-4fad-996e-7c0e4e219f68</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>765fbda3-73c9-4fad-996e-7c0e4e219f68</Id><Description>Premium P1 resource allocation.</Description><Ordinal>6</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 38 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + c2ca5ba0-994e-4385-a771-bd75449f039e-2014-07-24 18:34:08Z +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <Name>testdbcertPremiumDBP2</Name> + <Edition>Premium</Edition> + <CollationName></CollationName> + <ServiceObjectiveId>a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</ServiceObjectiveId> +</ServiceResource> + application/xml + +
+ + Created + +
+ x-ms-request-id + 5b8b30df-74a9-4ae7-b052-f3a90b9aadd0 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:34:09 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbcertPremiumDBP2</Name><Type>Microsoft.SqlAzure.Database</Type><State>Creating</State><SelfLink>https://localhost/servers/myserver01/databases/testdbcertPremiumDBP2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>8</Id><Edition/><MaxSizeGB>-1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T18:34:08.9900000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>-1</MaxSizeBytes><ServiceObjectiveId>a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</ServiceObjectiveId><AssignedServiceObjectiveId>a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>0</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Pending</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T18:16:56.4130000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate i:nil="true"/><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 39 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + 8fd024e8-c560-4aec-9f43-9e79c8fb4ab2-2014-07-24 18:34:09Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + e4aad33a-7349-4fbd-b2ac-4eace0aeb807 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:34:09 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>P2</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Premium P2 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>P2</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/b15e89f1-02b5-4618-b44d-75d37261b94b</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>b15e89f1-02b5-4618-b44d-75d37261b94b</Id><Description>Premium P2 resource allocation.</Description><Ordinal>7</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 40 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbcertPremiumDBP2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + a8bd6c77-8ebd-44d6-ab4d-1ac590ddf081-2014-07-24 18:34:11Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + d9b0d80d-8ee4-41a9-8c81-eeb4220583b3 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:34:11 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbcertPremiumDBP2</Name><Type>Microsoft.SqlAzure.Database</Type><State>Creating</State><SelfLink>https://localhost/servers/myserver01/databases/testdbcertPremiumDBP2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>8</Id><Edition/><MaxSizeGB>-1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T18:34:08.9900000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>-1</MaxSizeBytes><ServiceObjectiveId>a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</ServiceObjectiveId><AssignedServiceObjectiveId>a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>0</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Pending</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T18:16:56.4130000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate i:nil="true"/><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 41 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + d2b29ff2-e972-4c5d-ba56-22d49cb8ff70-2014-07-24 18:34:11Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + b1eebd1c-e573-47ed-8a0f-edbef5fdb47a +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:34:11 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>P2</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Premium P2 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>P2</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/b15e89f1-02b5-4618-b44d-75d37261b94b</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>b15e89f1-02b5-4618-b44d-75d37261b94b</Id><Description>Premium P2 resource allocation.</Description><Ordinal>7</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 42 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbcertPremiumDBP2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + 66b13673-7bd2-4ab7-993e-17f036389da5-2014-07-24 18:34:14Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 40bdb4e7-92c8-448f-a70a-5a19b6fa23fc +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:34:14 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbcertPremiumDBP2</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbcertPremiumDBP2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>8</Id><Edition>Premium</Edition><MaxSizeGB>20</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T18:34:08.9900000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>21474836480</MaxSizeBytes><ServiceObjectiveId>a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</ServiceObjectiveId><AssignedServiceObjectiveId>a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T18:34:12.2430000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T18:35:08.6030000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 43 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + 9cbe4427-f02f-42e9-8501-e5b13aa9a658-2014-07-24 18:34:14Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 3013f980-0b92-4e56-955a-6cebc6955389 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:34:14 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>P2</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Premium P2 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>P2</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/b15e89f1-02b5-4618-b44d-75d37261b94b</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>b15e89f1-02b5-4618-b44d-75d37261b94b</Id><Description>Premium P2 resource allocation.</Description><Ordinal>7</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 44 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + a0deb3b7-38bc-47ae-9637-b4c2c6a02fc1-2014-07-24 18:34:14Z +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <Name>testdbcertGetOperationDbName_f1abaa48-a85a-4141-9a40-6acb3ea65771</Name> + <CollationName></CollationName> +</ServiceResource> + application/xml + +
+ + Created + +
+ x-ms-request-id + 306236e8-0638-4496-abf3-4095a376c790 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:34:17 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbcertGetOperationDbName_f1abaa48-a85a-4141-9a40-6acb3ea65771</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbcertGetOperationDbName_f1abaa48-a85a-4141-9a40-6acb3ea65771</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>9</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T18:34:15.0130000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T18:34:17.0700000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T18:35:14.7600000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 45 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + c2502715-23f3-4096-a537-4aa219ef4cdd-2014-07-24 18:34:17Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 24e4abf4-8725-4a53-b5d9-cf3cd125f3f5 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:34:17 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 46 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databaseoperations?databaseName=testdbcertGetOperationDbName_f1abaa48-a85a-4141-9a40-6acb3ea65771 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + e0e92e06-17fc-4ec1-8306-b780290c8263-2014-07-24 18:34:17Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + c8b2273f-4851-4db6-8272-7b3c147f58c9 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:34:17 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>CREATE DATABASE</Name><Type>Microsoft.SqlAzure.DatabaseOperation</Type><State>COMPLETED</State><SelfLink>https://localhost/servers/myserver01/databaseoperations/2459d7eb-ffc2-45ee-b421-f645739aa5a0</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>2459d7eb-ffc2-45ee-b421-f645739aa5a0</Id><StateId>2</StateId><SessionActivityId>306236e8-0638-4496-abf3-4095a376c790</SessionActivityId><DatabaseName>testdbcertGetOperationDbName_f1abaa48-a85a-4141-9a40-6acb3ea65771</DatabaseName><PercentComplete>100</PercentComplete><ErrorCode>0</ErrorCode><Error/><ErrorSeverity>0</ErrorSeverity><ErrorState>0</ErrorState><StartTime>2014-07-24T18:34:14.3700000</StartTime><LastModifyTime>2014-07-24T18:34:17.2270000</LastModifyTime></ServiceResource></ServiceResources> +
+
+ + 47 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databaseoperations?databaseName=testdbcertGetOperationDbName_f1abaa48-a85a-4141-9a40-6acb3ea65771 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + 3b69b9ee-23de-4bca-9db8-3fba5d9e7020-2014-07-24 18:34:17Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 34d7b192-cdef-43e2-9684-5b0e7118858f +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:34:17 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>CREATE DATABASE</Name><Type>Microsoft.SqlAzure.DatabaseOperation</Type><State>COMPLETED</State><SelfLink>https://localhost/servers/myserver01/databaseoperations/2459d7eb-ffc2-45ee-b421-f645739aa5a0</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>2459d7eb-ffc2-45ee-b421-f645739aa5a0</Id><StateId>2</StateId><SessionActivityId>306236e8-0638-4496-abf3-4095a376c790</SessionActivityId><DatabaseName>testdbcertGetOperationDbName_f1abaa48-a85a-4141-9a40-6acb3ea65771</DatabaseName><PercentComplete>100</PercentComplete><ErrorCode>0</ErrorCode><Error/><ErrorSeverity>0</ErrorSeverity><ErrorState>0</ErrorState><StartTime>2014-07-24T18:34:14.3700000</StartTime><LastModifyTime>2014-07-24T18:34:17.2270000</LastModifyTime></ServiceResource></ServiceResources> +
+
+ + 48 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databaseoperations/2459d7eb-ffc2-45ee-b421-f645739aa5a0 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + 1455b4ba-eae9-4230-b11c-d624e4fb04af-2014-07-24 18:34:17Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + b84e4e08-af34-468e-a1c7-1583657008c6 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:34:17 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>CREATE DATABASE</Name><Type>Microsoft.SqlAzure.DatabaseOperation</Type><State>COMPLETED</State><SelfLink>https://localhost/servers/myserver01/databaseoperations/2459d7eb-ffc2-45ee-b421-f645739aa5a0</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>2459d7eb-ffc2-45ee-b421-f645739aa5a0</Id><StateId>2</StateId><SessionActivityId>306236e8-0638-4496-abf3-4095a376c790</SessionActivityId><DatabaseName>testdbcertGetOperationDbName_f1abaa48-a85a-4141-9a40-6acb3ea65771</DatabaseName><PercentComplete>100</PercentComplete><ErrorCode>0</ErrorCode><Error/><ErrorSeverity>0</ErrorSeverity><ErrorState>0</ErrorState><StartTime>2014-07-24T18:34:14.3700000</StartTime><LastModifyTime>2014-07-24T18:34:17.2270000</LastModifyTime></ServiceResource> +
+
+ + 49 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbcert3 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + f5e2dbbf-ca17-4a39-8dac-b827628a82ec-2014-07-24 18:34:18Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 67e9823f-b795-4733-869e-570349976d7a +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Thu, 24 Jul 2014 18:34:21 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 50 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbcert2 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + e2173350-1b0d-4666-a0b5-1294b20e43ed-2014-07-24 18:34:21Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 383563a6-9ecb-4d67-994c-6cdb6bbec756 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Thu, 24 Jul 2014 18:34:24 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 51 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbcert4 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + a870ba17-2941-4f46-bad3-0a608f53f3fc-2014-07-24 18:34:24Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 6d251055-6ab7-4fd8-b070-06cab8e15e2c +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Thu, 24 Jul 2014 18:34:26 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 52 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbcertPremiumDBP1 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + 2c1f0d60-f9ad-45ce-8dc7-f43f25d90035-2014-07-24 18:34:26Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 0a48d135-2f78-459a-9ac3-3971f7af4a35 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Thu, 24 Jul 2014 18:34:29 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 53 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbcertPremiumDBP2 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + 89bfe5df-6d0f-43b9-8e8f-2de2e3acbd9e-2014-07-24 18:34:29Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + c66b0128-0496-45a0-bbcf-063bfefe167d +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Thu, 24 Jul 2014 18:34:31 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 54 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbcertGetOperationDbName_f1abaa48-a85a-4141-9a40-6acb3ea65771 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + 3bcdc1cd-0562-45f5-835f-07e98038c1db-2014-07-24 18:34:31Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 6a0ab9a3-722f-42a9-b0f3-7758fb84869f +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Thu, 24 Jul 2014 18:34:35 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 55 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases?contentview=generic + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + 61c7faf4-0dd3-4ae7-aa5b-42d25a6c65df-2014-07-24 18:34:35Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 352e7e97-4451-4cfb-99b9-b600d938eb3d +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:34:35 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>master</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/master</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>1</Id><Edition>System</Edition><MaxSizeGB>5</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-22T17:52:25.3400000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>True</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>5368709120</MaxSizeBytes><ServiceObjectiveId>26e021db-f1f9-4c98-84c6-92af8ef433d7</ServiceObjectiveId><AssignedServiceObjectiveId>26e021db-f1f9-4c98-84c6-92af8ef433d7</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-22T17:52:27.9370000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate i:nil="true"/><IsSuspended>False</IsSuspended></ServiceResource></ServiceResources> +
+
+ + 56 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/26e021db-f1f9-4c98-84c6-92af8ef433d7 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f97c047-32e4-4bf0-a700-647b56515b82-2014-07-24 18:33:34Z +
+
+ x-ms-client-request-id + f63806e2-8801-4153-82ce-6b3d50344969-2014-07-24 18:34:35Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 9c35bfb8-c328-4fa9-a5a0-8d191e3ff2bd +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 18:34:35 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>System</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/26e021db-f1f9-4c98-84c6-92af8ef433d7</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>26e021db-f1f9-4c98-84c6-92af8ef433d7</Id><IsDefault>False</IsDefault><IsSystem>True</IsSystem><Description>Used for master database only.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>System</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/5b1e7ca2-f1c8-4da8-bb42-7ebe94a92609</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>5b1e7ca2-f1c8-4da8-bb42-7ebe94a92609</Id><Description>Used for master database only.</Description><Ordinal>1</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+
+
+ + UnitTest.Common.CreatePremiumDatabasesWithSqlAuth + + + 0 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives()?$filter=Name%20eq%20'P1'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + JQyIkIkKsErNdepg2gVT/JK/sJc1zsHwZSbXA5ddiyxUHYLTXHgjODkeImqrSBK0EG0TDHDGZP92AJ5ijtqCNhVQlC817QFmnsiKGgkFEGYSgHAz+gdiKX9C50Lqz8DWfhOwzOu4Pc0ful+zMC8C9auf8ZWcEaTd40Lh7vTI4Is1B2AkTC9wsH9/fW7CJV29Z5PIolvml93SHBJzo6+SLAj4BoE6CnpMAcqp4uyINLlObFfeJ/23IdfY/leQGN9DsmWipVpJYOmbCIVe1Mk64+8zsT58uautvekVGXorBUPQJhuouFas0YOWwiquWbdqmQ5Z2HJogNecTzXXHQdE7ErG3OiFV+ptxAec4GzEbPm43kGw/TiGr/wyFCAGmTQrFW7AfgUZBpji/+uGHqTw53CRXI6ZRkyjqyZKknJ/J12VdTT2ZIELBhZQ5X6ti/oDEW/OD67Q8/JffCAOFhXERQx8p12e6V3ojkNpWLZOgsywHkmlYmv89yaVepHorUNHEf3xtUgxPDjWdUo0MeyRGYcQJ6V/g2No5SISctxGNg01eMAl4y8t6buQXvTttfLMYKjLnZ0h8ybZR21LDPPeNG7fu+JAnKq5D9502/xcDeuauJwYtMiP7UQF1DbecFaTJHYJudH8k1J5FsEVefZkzDUq/errsW125Jc10lf3r7RxG9eKpBXOYMWoi91cx0f6QsEa7hduVMk49WFhNn2sjCaVuFX0vgkGUO4AuuasvTs9AnegkvcxN9FGtMKEjFxTANtKPeKXU2Ra+UxnQsYGYw== +
+
+ x-ms-client-session-id + 412c953f-d104-44b3-936b-95e24d8a7259-2014-07-16 17:19:50Z +
+
+ x-ms-client-request-id + ceb847c0-a813-41ed-8b2f-384ba5382cbc-2014-07-16 17:19:50Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=2YfLm3SJ30DuNMtGp+K1qg== +
+
+ + + .SQLSERVERMANAGEMENT + 2YfLm3SJ30DuNMtGp+K1qg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + a0778f5c-9d63-4664-a742-b7a367dde4cf +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Wed, 16 Jul 2014 17:19:50 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives</id><title type="text">ServiceObjectives</title><updated>2014-07-16T17:19:50Z</updated><link rel="self" title="ServiceObjectives" href="ServiceObjectives" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')/DimensionSettings" /><title /><updated>2014-07-16T17:19:50Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:Id><d:Name>P1</d:Name><d:Description>Premium P1 resource allocation.</d:Description><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry></feed> +
+
+ + 1 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')/DimensionSettings + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + JQyIkIkKsErNdepg2gVT/JK/sJc1zsHwZSbXA5ddiyxUHYLTXHgjODkeImqrSBK0EG0TDHDGZP92AJ5ijtqCNhVQlC817QFmnsiKGgkFEGYSgHAz+gdiKX9C50Lqz8DWfhOwzOu4Pc0ful+zMC8C9auf8ZWcEaTd40Lh7vTI4Is1B2AkTC9wsH9/fW7CJV29Z5PIolvml93SHBJzo6+SLAj4BoE6CnpMAcqp4uyINLlObFfeJ/23IdfY/leQGN9DsmWipVpJYOmbCIVe1Mk64+8zsT58uautvekVGXorBUPQJhuouFas0YOWwiquWbdqmQ5Z2HJogNecTzXXHQdE7ErG3OiFV+ptxAec4GzEbPm43kGw/TiGr/wyFCAGmTQrFW7AfgUZBpji/+uGHqTw53CRXI6ZRkyjqyZKknJ/J12VdTT2ZIELBhZQ5X6ti/oDEW/OD67Q8/JffCAOFhXERQx8p12e6V3ojkNpWLZOgsywHkmlYmv89yaVepHorUNHEf3xtUgxPDjWdUo0MeyRGYcQJ6V/g2No5SISctxGNg01eMAl4y8t6buQXvTttfLMYKjLnZ0h8ybZR21LDPPeNG7fu+JAnKq5D9502/xcDeuauJwYtMiP7UQF1DbecFaTJHYJudH8k1J5FsEVefZkzDUq/errsW125Jc10lf3r7RxG9eKpBXOYMWoi91cx0f6QsEa7hduVMk49WFhNn2sjCaVuFX0vgkGUO4AuuasvTs9AnegkvcxN9FGtMKEjFxTANtKPeKXU2Ra+UxnQsYGYw== +
+
+ x-ms-client-session-id + 412c953f-d104-44b3-936b-95e24d8a7259-2014-07-16 17:19:50Z +
+
+ x-ms-client-request-id + ceb847c0-a813-41ed-8b2f-384ba5382cbc-2014-07-16 17:19:50Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=2YfLm3SJ30DuNMtGp+K1qg== +
+
+ + + .SQLSERVERMANAGEMENT + 2YfLm3SJ30DuNMtGp+K1qg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + a0778f5c-9d63-4664-a742-b7a367dde4cf +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Wed, 16 Jul 2014 17:19:50 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')/DimensionSettings</id><title type="text">DimensionSettings</title><updated>2014-07-16T17:19:50Z</updated><link rel="self" title="DimensionSettings" href="DimensionSettings" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/DimensionSettings(guid'765fbda3-73c9-4fad-996e-7c0e4e219f68')</id><category term="Microsoft.SqlServer.Management.Server.Domain.DimensionSetting" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="DimensionSetting" href="DimensionSettings(guid'765fbda3-73c9-4fad-996e-7c0e4e219f68')" /><title /><updated>2014-07-16T17:19:50Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">765fbda3-73c9-4fad-996e-7c0e4e219f68</d:Id><d:Name>P1</d:Name><d:Description>Premium P1 resource allocation.</d:Description><d:Ordinal m:type="Edm.Byte">6</d:Ordinal><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault></m:properties></content></entry></feed> +
+
+ + 2 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives()?$filter=Name%20eq%20'P2'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + JQyIkIkKsErNdepg2gVT/JK/sJc1zsHwZSbXA5ddiyxUHYLTXHgjODkeImqrSBK0EG0TDHDGZP92AJ5ijtqCNhVQlC817QFmnsiKGgkFEGYSgHAz+gdiKX9C50Lqz8DWfhOwzOu4Pc0ful+zMC8C9auf8ZWcEaTd40Lh7vTI4Is1B2AkTC9wsH9/fW7CJV29Z5PIolvml93SHBJzo6+SLAj4BoE6CnpMAcqp4uyINLlObFfeJ/23IdfY/leQGN9DsmWipVpJYOmbCIVe1Mk64+8zsT58uautvekVGXorBUPQJhuouFas0YOWwiquWbdqmQ5Z2HJogNecTzXXHQdE7ErG3OiFV+ptxAec4GzEbPm43kGw/TiGr/wyFCAGmTQrFW7AfgUZBpji/+uGHqTw53CRXI6ZRkyjqyZKknJ/J12VdTT2ZIELBhZQ5X6ti/oDEW/OD67Q8/JffCAOFhXERQx8p12e6V3ojkNpWLZOgsywHkmlYmv89yaVepHorUNHEf3xtUgxPDjWdUo0MeyRGYcQJ6V/g2No5SISctxGNg01eMAl4y8t6buQXvTttfLMYKjLnZ0h8ybZR21LDPPeNG7fu+JAnKq5D9502/xcDeuauJwYtMiP7UQF1DbecFaTJHYJudH8k1J5FsEVefZkzDUq/errsW125Jc10lf3r7RxG9eKpBXOYMWoi91cx0f6QsEa7hduVMk49WFhNn2sjCaVuFX0vgkGUO4AuuasvTs9AnegkvcxN9FGtMKEjFxTANtKPeKXU2Ra+UxnQsYGYw== +
+
+ x-ms-client-session-id + 412c953f-d104-44b3-936b-95e24d8a7259-2014-07-16 17:19:50Z +
+
+ x-ms-client-request-id + ceb847c0-a813-41ed-8b2f-384ba5382cbc-2014-07-16 17:19:50Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=2YfLm3SJ30DuNMtGp+K1qg== +
+
+ + + .SQLSERVERMANAGEMENT + 2YfLm3SJ30DuNMtGp+K1qg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + a0778f5c-9d63-4664-a742-b7a367dde4cf +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Wed, 16 Jul 2014 17:19:50 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives</id><title type="text">ServiceObjectives</title><updated>2014-07-16T17:19:50Z</updated><link rel="self" title="ServiceObjectives" href="ServiceObjectives" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0')/DimensionSettings" /><title /><updated>2014-07-16T17:19:50Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</d:Id><d:Name>P2</d:Name><d:Description>Premium P2 resource allocation.</d:Description><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry></feed> +
+
+ + 3 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0')/DimensionSettings + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + JQyIkIkKsErNdepg2gVT/JK/sJc1zsHwZSbXA5ddiyxUHYLTXHgjODkeImqrSBK0EG0TDHDGZP92AJ5ijtqCNhVQlC817QFmnsiKGgkFEGYSgHAz+gdiKX9C50Lqz8DWfhOwzOu4Pc0ful+zMC8C9auf8ZWcEaTd40Lh7vTI4Is1B2AkTC9wsH9/fW7CJV29Z5PIolvml93SHBJzo6+SLAj4BoE6CnpMAcqp4uyINLlObFfeJ/23IdfY/leQGN9DsmWipVpJYOmbCIVe1Mk64+8zsT58uautvekVGXorBUPQJhuouFas0YOWwiquWbdqmQ5Z2HJogNecTzXXHQdE7ErG3OiFV+ptxAec4GzEbPm43kGw/TiGr/wyFCAGmTQrFW7AfgUZBpji/+uGHqTw53CRXI6ZRkyjqyZKknJ/J12VdTT2ZIELBhZQ5X6ti/oDEW/OD67Q8/JffCAOFhXERQx8p12e6V3ojkNpWLZOgsywHkmlYmv89yaVepHorUNHEf3xtUgxPDjWdUo0MeyRGYcQJ6V/g2No5SISctxGNg01eMAl4y8t6buQXvTttfLMYKjLnZ0h8ybZR21LDPPeNG7fu+JAnKq5D9502/xcDeuauJwYtMiP7UQF1DbecFaTJHYJudH8k1J5FsEVefZkzDUq/errsW125Jc10lf3r7RxG9eKpBXOYMWoi91cx0f6QsEa7hduVMk49WFhNn2sjCaVuFX0vgkGUO4AuuasvTs9AnegkvcxN9FGtMKEjFxTANtKPeKXU2Ra+UxnQsYGYw== +
+
+ x-ms-client-session-id + 412c953f-d104-44b3-936b-95e24d8a7259-2014-07-16 17:19:50Z +
+
+ x-ms-client-request-id + ceb847c0-a813-41ed-8b2f-384ba5382cbc-2014-07-16 17:19:50Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=2YfLm3SJ30DuNMtGp+K1qg== +
+
+ + + .SQLSERVERMANAGEMENT + 2YfLm3SJ30DuNMtGp+K1qg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + a0778f5c-9d63-4664-a742-b7a367dde4cf +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Wed, 16 Jul 2014 17:19:50 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0')/DimensionSettings</id><title type="text">DimensionSettings</title><updated>2014-07-16T17:19:50Z</updated><link rel="self" title="DimensionSettings" href="DimensionSettings" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/DimensionSettings(guid'b15e89f1-02b5-4618-b44d-75d37261b94b')</id><category term="Microsoft.SqlServer.Management.Server.Domain.DimensionSetting" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="DimensionSetting" href="DimensionSettings(guid'b15e89f1-02b5-4618-b44d-75d37261b94b')" /><title /><updated>2014-07-16T17:19:50Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">b15e89f1-02b5-4618-b44d-75d37261b94b</d:Id><d:Name>P2</d:Name><d:Description>Premium P2 resource allocation.</d:Description><d:Ordinal m:type="Edm.Byte">7</d:Ordinal><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault></m:properties></content></entry></feed> +
+
+ + 4 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases + POST + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + JQyIkIkKsErNdepg2gVT/JK/sJc1zsHwZSbXA5ddiyxUHYLTXHgjODkeImqrSBK0EG0TDHDGZP92AJ5ijtqCNhVQlC817QFmnsiKGgkFEGYSgHAz+gdiKX9C50Lqz8DWfhOwzOu4Pc0ful+zMC8C9auf8ZWcEaTd40Lh7vTI4Is1B2AkTC9wsH9/fW7CJV29Z5PIolvml93SHBJzo6+SLAj4BoE6CnpMAcqp4uyINLlObFfeJ/23IdfY/leQGN9DsmWipVpJYOmbCIVe1Mk64+8zsT58uautvekVGXorBUPQJhuouFas0YOWwiquWbdqmQ5Z2HJogNecTzXXHQdE7ErG3OiFV+ptxAec4GzEbPm43kGw/TiGr/wyFCAGmTQrFW7AfgUZBpji/+uGHqTw53CRXI6ZRkyjqyZKknJ/J12VdTT2ZIELBhZQ5X6ti/oDEW/OD67Q8/JffCAOFhXERQx8p12e6V3ojkNpWLZOgsywHkmlYmv89yaVepHorUNHEf3xtUgxPDjWdUo0MeyRGYcQJ6V/g2No5SISctxGNg01eMAl4y8t6buQXvTttfLMYKjLnZ0h8ybZR21LDPPeNG7fu+JAnKq5D9502/xcDeuauJwYtMiP7UQF1DbecFaTJHYJudH8k1J5FsEVefZkzDUq/errsW125Jc10lf3r7RxG9eKpBXOYMWoi91cx0f6QsEa7hduVMk49WFhNn2sjCaVuFX0vgkGUO4AuuasvTs9AnegkvcxN9FGtMKEjFxTANtKPeKXU2Ra+UxnQsYGYw== +
+
+ x-ms-client-session-id + 412c953f-d104-44b3-936b-95e24d8a7259-2014-07-16 17:19:50Z +
+
+ x-ms-client-request-id + a1e6c1bd-58d0-4203-a203-7b519ae0bc38-2014-07-16 17:19:50Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=2YfLm3SJ30DuNMtGp+K1qg== +
+
+ + + .SQLSERVERMANAGEMENT + 2YfLm3SJ30DuNMtGp+K1qg== + + + + <?xml version="1.0" encoding="utf-8"?><entry xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id /><title /><updated>2014-07-16T17:19:50Z</updated><author><name /></author><content type="application/xml"><m:properties><d:AssignedServiceObjectiveId m:type="Edm.Guid" m:null="true" /><d:CollationName m:null="true" /><d:CreationDate m:type="Edm.DateTime">0001-01-01T00:00:00</d:CreationDate><d:Edition>Premium</d:Edition><d:Id m:type="Edm.Int32">0</d:Id><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsFederationRoot m:type="Edm.Boolean" m:null="true" /><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsRecursiveTriggersOn m:type="Edm.Boolean" m:null="true" /><d:IsSuspended m:type="Edm.Boolean" m:null="true" /><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:MaxSizeBytes m:type="Edm.Int64" m:null="true" /><d:MaxSizeGB m:type="Edm.Int32" m:null="true" /><d:Name>NewAzureSqlPremiumDatabaseTests_P1</d:Name><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:RecoveryPeriodStartDate m:type="Edm.DateTime" m:null="true" /><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32" m:null="true" /><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentState m:type="Edm.Byte" m:null="true" /><d:ServiceObjectiveAssignmentStateDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime" m:null="true" /><d:ServiceObjectiveId m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:ServiceObjectiveId><d:SizeMB m:type="Edm.Decimal">0</d:SizeMB><d:Status m:type="Edm.Int32">0</d:Status></m:properties></content></entry> + application/atom+xml + application/atom+xml,application/xml +
+ + Created + +
+ x-ms-request-id + a0778f5c-9d63-4664-a742-b7a367dde4cf +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Wed, 16 Jul 2014 17:19:51 GMT +
+
+ Location + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4) +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(4)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(4)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(4)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(4)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(4)/DatabaseCopies" /><title /><updated>2014-07-16T17:19:51Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">4</d:Id><d:Name>NewAzureSqlPremiumDatabaseTests_P1</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">0</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Pending</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2014-07-15T21:55:35.777</d:ServiceObjectiveAssignmentSuccessDate><d:Edition></d:Edition><d:MaxSizeGB m:type="Edm.Int32">-1</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">-1</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2014-07-16T10:19:51.33</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime" m:null="true" /><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">2048</d:Status><d:IsFederationRoot m:type="Edm.Boolean" m:null="true" /><d:SizeMB m:type="Edm.Decimal">-1</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean" m:null="true" /><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry> +
+
+ + 5 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4) + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + JQyIkIkKsErNdepg2gVT/JK/sJc1zsHwZSbXA5ddiyxUHYLTXHgjODkeImqrSBK0EG0TDHDGZP92AJ5ijtqCNhVQlC817QFmnsiKGgkFEGYSgHAz+gdiKX9C50Lqz8DWfhOwzOu4Pc0ful+zMC8C9auf8ZWcEaTd40Lh7vTI4Is1B2AkTC9wsH9/fW7CJV29Z5PIolvml93SHBJzo6+SLAj4BoE6CnpMAcqp4uyINLlObFfeJ/23IdfY/leQGN9DsmWipVpJYOmbCIVe1Mk64+8zsT58uautvekVGXorBUPQJhuouFas0YOWwiquWbdqmQ5Z2HJogNecTzXXHQdE7ErG3OiFV+ptxAec4GzEbPm43kGw/TiGr/wyFCAGmTQrFW7AfgUZBpji/+uGHqTw53CRXI6ZRkyjqyZKknJ/J12VdTT2ZIELBhZQ5X6ti/oDEW/OD67Q8/JffCAOFhXERQx8p12e6V3ojkNpWLZOgsywHkmlYmv89yaVepHorUNHEf3xtUgxPDjWdUo0MeyRGYcQJ6V/g2No5SISctxGNg01eMAl4y8t6buQXvTttfLMYKjLnZ0h8ybZR21LDPPeNG7fu+JAnKq5D9502/xcDeuauJwYtMiP7UQF1DbecFaTJHYJudH8k1J5FsEVefZkzDUq/errsW125Jc10lf3r7RxG9eKpBXOYMWoi91cx0f6QsEa7hduVMk49WFhNn2sjCaVuFX0vgkGUO4AuuasvTs9AnegkvcxN9FGtMKEjFxTANtKPeKXU2Ra+UxnQsYGYw== +
+
+ x-ms-client-session-id + 412c953f-d104-44b3-936b-95e24d8a7259-2014-07-16 17:19:50Z +
+
+ x-ms-client-request-id + a1e6c1bd-58d0-4203-a203-7b519ae0bc38-2014-07-16 17:19:50Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=2YfLm3SJ30DuNMtGp+K1qg== +
+
+ + + .SQLSERVERMANAGEMENT + 2YfLm3SJ30DuNMtGp+K1qg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + a0778f5c-9d63-4664-a742-b7a367dde4cf +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Wed, 16 Jul 2014 17:19:51 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(4)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(4)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(4)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(4)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(4)/DatabaseCopies" /><title /><updated>2014-07-16T17:19:52Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">4</d:Id><d:Name>NewAzureSqlPremiumDatabaseTests_P1</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">0</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Pending</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2014-07-15T21:55:35.777</d:ServiceObjectiveAssignmentSuccessDate><d:Edition></d:Edition><d:MaxSizeGB m:type="Edm.Int32">-1</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">-1</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2014-07-16T10:19:51.33</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime" m:null="true" /><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">2048</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry> +
+
+ + 6 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + JQyIkIkKsErNdepg2gVT/JK/sJc1zsHwZSbXA5ddiyxUHYLTXHgjODkeImqrSBK0EG0TDHDGZP92AJ5ijtqCNhVQlC817QFmnsiKGgkFEGYSgHAz+gdiKX9C50Lqz8DWfhOwzOu4Pc0ful+zMC8C9auf8ZWcEaTd40Lh7vTI4Is1B2AkTC9wsH9/fW7CJV29Z5PIolvml93SHBJzo6+SLAj4BoE6CnpMAcqp4uyINLlObFfeJ/23IdfY/leQGN9DsmWipVpJYOmbCIVe1Mk64+8zsT58uautvekVGXorBUPQJhuouFas0YOWwiquWbdqmQ5Z2HJogNecTzXXHQdE7ErG3OiFV+ptxAec4GzEbPm43kGw/TiGr/wyFCAGmTQrFW7AfgUZBpji/+uGHqTw53CRXI6ZRkyjqyZKknJ/J12VdTT2ZIELBhZQ5X6ti/oDEW/OD67Q8/JffCAOFhXERQx8p12e6V3ojkNpWLZOgsywHkmlYmv89yaVepHorUNHEf3xtUgxPDjWdUo0MeyRGYcQJ6V/g2No5SISctxGNg01eMAl4y8t6buQXvTttfLMYKjLnZ0h8ybZR21LDPPeNG7fu+JAnKq5D9502/xcDeuauJwYtMiP7UQF1DbecFaTJHYJudH8k1J5FsEVefZkzDUq/errsW125Jc10lf3r7RxG9eKpBXOYMWoi91cx0f6QsEa7hduVMk49WFhNn2sjCaVuFX0vgkGUO4AuuasvTs9AnegkvcxN9FGtMKEjFxTANtKPeKXU2Ra+UxnQsYGYw== +
+
+ x-ms-client-session-id + 412c953f-d104-44b3-936b-95e24d8a7259-2014-07-16 17:19:50Z +
+
+ x-ms-client-request-id + a1e6c1bd-58d0-4203-a203-7b519ae0bc38-2014-07-16 17:19:50Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=2YfLm3SJ30DuNMtGp+K1qg== +
+
+ + + .SQLSERVERMANAGEMENT + 2YfLm3SJ30DuNMtGp+K1qg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + a0778f5c-9d63-4664-a742-b7a367dde4cf +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Wed, 16 Jul 2014 17:19:51 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')/DimensionSettings" /><title /><updated>2014-07-16T17:19:52Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:Id><d:Name>P1</d:Name><d:Description>Premium P1 resource allocation.</d:Description><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 7 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases()?$filter=Name%20eq%20'NewAzureSqlPremiumDatabaseTests_P1'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + JQyIkIkKsErNdepg2gVT/JK/sJc1zsHwZSbXA5ddiyxUHYLTXHgjODkeImqrSBK0EG0TDHDGZP92AJ5ijtqCNhVQlC817QFmnsiKGgkFEGYSgHAz+gdiKX9C50Lqz8DWfhOwzOu4Pc0ful+zMC8C9auf8ZWcEaTd40Lh7vTI4Is1B2AkTC9wsH9/fW7CJV29Z5PIolvml93SHBJzo6+SLAj4BoE6CnpMAcqp4uyINLlObFfeJ/23IdfY/leQGN9DsmWipVpJYOmbCIVe1Mk64+8zsT58uautvekVGXorBUPQJhuouFas0YOWwiquWbdqmQ5Z2HJogNecTzXXHQdE7ErG3OiFV+ptxAec4GzEbPm43kGw/TiGr/wyFCAGmTQrFW7AfgUZBpji/+uGHqTw53CRXI6ZRkyjqyZKknJ/J12VdTT2ZIELBhZQ5X6ti/oDEW/OD67Q8/JffCAOFhXERQx8p12e6V3ojkNpWLZOgsywHkmlYmv89yaVepHorUNHEf3xtUgxPDjWdUo0MeyRGYcQJ6V/g2No5SISctxGNg01eMAl4y8t6buQXvTttfLMYKjLnZ0h8ybZR21LDPPeNG7fu+JAnKq5D9502/xcDeuauJwYtMiP7UQF1DbecFaTJHYJudH8k1J5FsEVefZkzDUq/errsW125Jc10lf3r7RxG9eKpBXOYMWoi91cx0f6QsEa7hduVMk49WFhNn2sjCaVuFX0vgkGUO4AuuasvTs9AnegkvcxN9FGtMKEjFxTANtKPeKXU2Ra+UxnQsYGYw== +
+
+ x-ms-client-session-id + 412c953f-d104-44b3-936b-95e24d8a7259-2014-07-16 17:19:50Z +
+
+ x-ms-client-request-id + a1e6c1bd-58d0-4203-a203-7b519ae0bc38-2014-07-16 17:19:50Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=2YfLm3SJ30DuNMtGp+K1qg== +
+
+ + + .SQLSERVERMANAGEMENT + 2YfLm3SJ30DuNMtGp+K1qg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + a0778f5c-9d63-4664-a742-b7a367dde4cf +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Wed, 16 Jul 2014 17:19:53 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2014-07-16T17:19:54Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(4)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(4)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(4)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(4)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(4)/DatabaseCopies" /><title /><updated>2014-07-16T17:19:54Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">4</d:Id><d:Name>NewAzureSqlPremiumDatabaseTests_P1</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2014-07-16T17:19:54.297</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Premium</d:Edition><d:MaxSizeGB m:type="Edm.Int32">10</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">10737418240</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2014-07-16T10:19:51.33</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-07-16T17:20:50.983Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry></feed> +
+
+ + 8 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + JQyIkIkKsErNdepg2gVT/JK/sJc1zsHwZSbXA5ddiyxUHYLTXHgjODkeImqrSBK0EG0TDHDGZP92AJ5ijtqCNhVQlC817QFmnsiKGgkFEGYSgHAz+gdiKX9C50Lqz8DWfhOwzOu4Pc0ful+zMC8C9auf8ZWcEaTd40Lh7vTI4Is1B2AkTC9wsH9/fW7CJV29Z5PIolvml93SHBJzo6+SLAj4BoE6CnpMAcqp4uyINLlObFfeJ/23IdfY/leQGN9DsmWipVpJYOmbCIVe1Mk64+8zsT58uautvekVGXorBUPQJhuouFas0YOWwiquWbdqmQ5Z2HJogNecTzXXHQdE7ErG3OiFV+ptxAec4GzEbPm43kGw/TiGr/wyFCAGmTQrFW7AfgUZBpji/+uGHqTw53CRXI6ZRkyjqyZKknJ/J12VdTT2ZIELBhZQ5X6ti/oDEW/OD67Q8/JffCAOFhXERQx8p12e6V3ojkNpWLZOgsywHkmlYmv89yaVepHorUNHEf3xtUgxPDjWdUo0MeyRGYcQJ6V/g2No5SISctxGNg01eMAl4y8t6buQXvTttfLMYKjLnZ0h8ybZR21LDPPeNG7fu+JAnKq5D9502/xcDeuauJwYtMiP7UQF1DbecFaTJHYJudH8k1J5FsEVefZkzDUq/errsW125Jc10lf3r7RxG9eKpBXOYMWoi91cx0f6QsEa7hduVMk49WFhNn2sjCaVuFX0vgkGUO4AuuasvTs9AnegkvcxN9FGtMKEjFxTANtKPeKXU2Ra+UxnQsYGYw== +
+
+ x-ms-client-session-id + 412c953f-d104-44b3-936b-95e24d8a7259-2014-07-16 17:19:50Z +
+
+ x-ms-client-request-id + a1e6c1bd-58d0-4203-a203-7b519ae0bc38-2014-07-16 17:19:50Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=2YfLm3SJ30DuNMtGp+K1qg== +
+
+ + + .SQLSERVERMANAGEMENT + 2YfLm3SJ30DuNMtGp+K1qg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + a0778f5c-9d63-4664-a742-b7a367dde4cf +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Wed, 16 Jul 2014 17:19:53 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')/DimensionSettings" /><title /><updated>2014-07-16T17:19:54Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:Id><d:Name>P1</d:Name><d:Description>Premium P1 resource allocation.</d:Description><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 9 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases + POST + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + JQyIkIkKsErNdepg2gVT/JK/sJc1zsHwZSbXA5ddiyxUHYLTXHgjODkeImqrSBK0EG0TDHDGZP92AJ5ijtqCNhVQlC817QFmnsiKGgkFEGYSgHAz+gdiKX9C50Lqz8DWfhOwzOu4Pc0ful+zMC8C9auf8ZWcEaTd40Lh7vTI4Is1B2AkTC9wsH9/fW7CJV29Z5PIolvml93SHBJzo6+SLAj4BoE6CnpMAcqp4uyINLlObFfeJ/23IdfY/leQGN9DsmWipVpJYOmbCIVe1Mk64+8zsT58uautvekVGXorBUPQJhuouFas0YOWwiquWbdqmQ5Z2HJogNecTzXXHQdE7ErG3OiFV+ptxAec4GzEbPm43kGw/TiGr/wyFCAGmTQrFW7AfgUZBpji/+uGHqTw53CRXI6ZRkyjqyZKknJ/J12VdTT2ZIELBhZQ5X6ti/oDEW/OD67Q8/JffCAOFhXERQx8p12e6V3ojkNpWLZOgsywHkmlYmv89yaVepHorUNHEf3xtUgxPDjWdUo0MeyRGYcQJ6V/g2No5SISctxGNg01eMAl4y8t6buQXvTttfLMYKjLnZ0h8ybZR21LDPPeNG7fu+JAnKq5D9502/xcDeuauJwYtMiP7UQF1DbecFaTJHYJudH8k1J5FsEVefZkzDUq/errsW125Jc10lf3r7RxG9eKpBXOYMWoi91cx0f6QsEa7hduVMk49WFhNn2sjCaVuFX0vgkGUO4AuuasvTs9AnegkvcxN9FGtMKEjFxTANtKPeKXU2Ra+UxnQsYGYw== +
+
+ x-ms-client-session-id + 412c953f-d104-44b3-936b-95e24d8a7259-2014-07-16 17:19:50Z +
+
+ x-ms-client-request-id + 37c39e27-1f78-4ebb-8564-d5c75a36a874-2014-07-16 17:19:54Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=2YfLm3SJ30DuNMtGp+K1qg== +
+
+ + + .SQLSERVERMANAGEMENT + 2YfLm3SJ30DuNMtGp+K1qg== + + + + <?xml version="1.0" encoding="utf-8"?><entry xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id /><title /><updated>2014-07-16T17:19:54Z</updated><author><name /></author><content type="application/xml"><m:properties><d:AssignedServiceObjectiveId m:type="Edm.Guid" m:null="true" /><d:CollationName>Japanese_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">0001-01-01T00:00:00</d:CreationDate><d:Edition>Premium</d:Edition><d:Id m:type="Edm.Int32">0</d:Id><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsFederationRoot m:type="Edm.Boolean" m:null="true" /><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsRecursiveTriggersOn m:type="Edm.Boolean" m:null="true" /><d:IsSuspended m:type="Edm.Boolean" m:null="true" /><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:MaxSizeBytes m:type="Edm.Int64" m:null="true" /><d:MaxSizeGB m:type="Edm.Int32">10</d:MaxSizeGB><d:Name>NewAzureSqlPremiumDatabaseTests_P2</d:Name><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:RecoveryPeriodStartDate m:type="Edm.DateTime" m:null="true" /><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32" m:null="true" /><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentState m:type="Edm.Byte" m:null="true" /><d:ServiceObjectiveAssignmentStateDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime" m:null="true" /><d:ServiceObjectiveId m:type="Edm.Guid">a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</d:ServiceObjectiveId><d:SizeMB m:type="Edm.Decimal">0</d:SizeMB><d:Status m:type="Edm.Int32">0</d:Status></m:properties></content></entry> + application/atom+xml + application/atom+xml,application/xml +
+ + Created + +
+ x-ms-request-id + a0778f5c-9d63-4664-a742-b7a367dde4cf +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Wed, 16 Jul 2014 17:19:55 GMT +
+
+ Location + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5) +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(5)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(5)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(5)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(5)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(5)/DatabaseCopies" /><title /><updated>2014-07-16T17:19:55Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">5</d:Id><d:Name>NewAzureSqlPremiumDatabaseTests_P2</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">0</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Pending</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2014-07-16T11:03:28.48</d:ServiceObjectiveAssignmentSuccessDate><d:Edition></d:Edition><d:MaxSizeGB m:type="Edm.Int32">-1</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">-1</d:MaxSizeBytes><d:CollationName>Japanese_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2014-07-16T10:19:54.913</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime" m:null="true" /><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">2048</d:Status><d:IsFederationRoot m:type="Edm.Boolean" m:null="true" /><d:SizeMB m:type="Edm.Decimal">-1</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean" m:null="true" /><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry> +
+
+ + 10 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5) + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + JQyIkIkKsErNdepg2gVT/JK/sJc1zsHwZSbXA5ddiyxUHYLTXHgjODkeImqrSBK0EG0TDHDGZP92AJ5ijtqCNhVQlC817QFmnsiKGgkFEGYSgHAz+gdiKX9C50Lqz8DWfhOwzOu4Pc0ful+zMC8C9auf8ZWcEaTd40Lh7vTI4Is1B2AkTC9wsH9/fW7CJV29Z5PIolvml93SHBJzo6+SLAj4BoE6CnpMAcqp4uyINLlObFfeJ/23IdfY/leQGN9DsmWipVpJYOmbCIVe1Mk64+8zsT58uautvekVGXorBUPQJhuouFas0YOWwiquWbdqmQ5Z2HJogNecTzXXHQdE7ErG3OiFV+ptxAec4GzEbPm43kGw/TiGr/wyFCAGmTQrFW7AfgUZBpji/+uGHqTw53CRXI6ZRkyjqyZKknJ/J12VdTT2ZIELBhZQ5X6ti/oDEW/OD67Q8/JffCAOFhXERQx8p12e6V3ojkNpWLZOgsywHkmlYmv89yaVepHorUNHEf3xtUgxPDjWdUo0MeyRGYcQJ6V/g2No5SISctxGNg01eMAl4y8t6buQXvTttfLMYKjLnZ0h8ybZR21LDPPeNG7fu+JAnKq5D9502/xcDeuauJwYtMiP7UQF1DbecFaTJHYJudH8k1J5FsEVefZkzDUq/errsW125Jc10lf3r7RxG9eKpBXOYMWoi91cx0f6QsEa7hduVMk49WFhNn2sjCaVuFX0vgkGUO4AuuasvTs9AnegkvcxN9FGtMKEjFxTANtKPeKXU2Ra+UxnQsYGYw== +
+
+ x-ms-client-session-id + 412c953f-d104-44b3-936b-95e24d8a7259-2014-07-16 17:19:50Z +
+
+ x-ms-client-request-id + 37c39e27-1f78-4ebb-8564-d5c75a36a874-2014-07-16 17:19:54Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=2YfLm3SJ30DuNMtGp+K1qg== +
+
+ + + .SQLSERVERMANAGEMENT + 2YfLm3SJ30DuNMtGp+K1qg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + a0778f5c-9d63-4664-a742-b7a367dde4cf +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Wed, 16 Jul 2014 17:19:55 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(5)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(5)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(5)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(5)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(5)/DatabaseCopies" /><title /><updated>2014-07-16T17:19:55Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">5</d:Id><d:Name>NewAzureSqlPremiumDatabaseTests_P2</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">0</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Pending</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2014-07-16T11:03:28.48</d:ServiceObjectiveAssignmentSuccessDate><d:Edition></d:Edition><d:MaxSizeGB m:type="Edm.Int32">-1</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">-1</d:MaxSizeBytes><d:CollationName>Japanese_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2014-07-16T10:19:54.913</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime" m:null="true" /><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">2048</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry> +
+
+ + 11 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + JQyIkIkKsErNdepg2gVT/JK/sJc1zsHwZSbXA5ddiyxUHYLTXHgjODkeImqrSBK0EG0TDHDGZP92AJ5ijtqCNhVQlC817QFmnsiKGgkFEGYSgHAz+gdiKX9C50Lqz8DWfhOwzOu4Pc0ful+zMC8C9auf8ZWcEaTd40Lh7vTI4Is1B2AkTC9wsH9/fW7CJV29Z5PIolvml93SHBJzo6+SLAj4BoE6CnpMAcqp4uyINLlObFfeJ/23IdfY/leQGN9DsmWipVpJYOmbCIVe1Mk64+8zsT58uautvekVGXorBUPQJhuouFas0YOWwiquWbdqmQ5Z2HJogNecTzXXHQdE7ErG3OiFV+ptxAec4GzEbPm43kGw/TiGr/wyFCAGmTQrFW7AfgUZBpji/+uGHqTw53CRXI6ZRkyjqyZKknJ/J12VdTT2ZIELBhZQ5X6ti/oDEW/OD67Q8/JffCAOFhXERQx8p12e6V3ojkNpWLZOgsywHkmlYmv89yaVepHorUNHEf3xtUgxPDjWdUo0MeyRGYcQJ6V/g2No5SISctxGNg01eMAl4y8t6buQXvTttfLMYKjLnZ0h8ybZR21LDPPeNG7fu+JAnKq5D9502/xcDeuauJwYtMiP7UQF1DbecFaTJHYJudH8k1J5FsEVefZkzDUq/errsW125Jc10lf3r7RxG9eKpBXOYMWoi91cx0f6QsEa7hduVMk49WFhNn2sjCaVuFX0vgkGUO4AuuasvTs9AnegkvcxN9FGtMKEjFxTANtKPeKXU2Ra+UxnQsYGYw== +
+
+ x-ms-client-session-id + 412c953f-d104-44b3-936b-95e24d8a7259-2014-07-16 17:19:50Z +
+
+ x-ms-client-request-id + 37c39e27-1f78-4ebb-8564-d5c75a36a874-2014-07-16 17:19:54Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=2YfLm3SJ30DuNMtGp+K1qg== +
+
+ + + .SQLSERVERMANAGEMENT + 2YfLm3SJ30DuNMtGp+K1qg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + a0778f5c-9d63-4664-a742-b7a367dde4cf +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Wed, 16 Jul 2014 17:19:55 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0')/DimensionSettings" /><title /><updated>2014-07-16T17:19:55Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</d:Id><d:Name>P2</d:Name><d:Description>Premium P2 resource allocation.</d:Description><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 12 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases()?$filter=Name%20eq%20'NewAzureSqlPremiumDatabaseTests_P2'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + JQyIkIkKsErNdepg2gVT/JK/sJc1zsHwZSbXA5ddiyxUHYLTXHgjODkeImqrSBK0EG0TDHDGZP92AJ5ijtqCNhVQlC817QFmnsiKGgkFEGYSgHAz+gdiKX9C50Lqz8DWfhOwzOu4Pc0ful+zMC8C9auf8ZWcEaTd40Lh7vTI4Is1B2AkTC9wsH9/fW7CJV29Z5PIolvml93SHBJzo6+SLAj4BoE6CnpMAcqp4uyINLlObFfeJ/23IdfY/leQGN9DsmWipVpJYOmbCIVe1Mk64+8zsT58uautvekVGXorBUPQJhuouFas0YOWwiquWbdqmQ5Z2HJogNecTzXXHQdE7ErG3OiFV+ptxAec4GzEbPm43kGw/TiGr/wyFCAGmTQrFW7AfgUZBpji/+uGHqTw53CRXI6ZRkyjqyZKknJ/J12VdTT2ZIELBhZQ5X6ti/oDEW/OD67Q8/JffCAOFhXERQx8p12e6V3ojkNpWLZOgsywHkmlYmv89yaVepHorUNHEf3xtUgxPDjWdUo0MeyRGYcQJ6V/g2No5SISctxGNg01eMAl4y8t6buQXvTttfLMYKjLnZ0h8ybZR21LDPPeNG7fu+JAnKq5D9502/xcDeuauJwYtMiP7UQF1DbecFaTJHYJudH8k1J5FsEVefZkzDUq/errsW125Jc10lf3r7RxG9eKpBXOYMWoi91cx0f6QsEa7hduVMk49WFhNn2sjCaVuFX0vgkGUO4AuuasvTs9AnegkvcxN9FGtMKEjFxTANtKPeKXU2Ra+UxnQsYGYw== +
+
+ x-ms-client-session-id + 412c953f-d104-44b3-936b-95e24d8a7259-2014-07-16 17:19:50Z +
+
+ x-ms-client-request-id + 37c39e27-1f78-4ebb-8564-d5c75a36a874-2014-07-16 17:19:54Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=2YfLm3SJ30DuNMtGp+K1qg== +
+
+ + + .SQLSERVERMANAGEMENT + 2YfLm3SJ30DuNMtGp+K1qg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + a0778f5c-9d63-4664-a742-b7a367dde4cf +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Wed, 16 Jul 2014 17:19:57 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2014-07-16T17:19:57Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(5)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(5)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(5)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(5)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(5)/DatabaseCopies" /><title /><updated>2014-07-16T17:19:57Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">5</d:Id><d:Name>NewAzureSqlPremiumDatabaseTests_P2</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">0</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Pending</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2014-07-16T11:03:28.48</d:ServiceObjectiveAssignmentSuccessDate><d:Edition></d:Edition><d:MaxSizeGB m:type="Edm.Int32">-1</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">-1</d:MaxSizeBytes><d:CollationName>Japanese_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2014-07-16T10:19:54.913</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime" m:null="true" /><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">2048</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry></feed> +
+
+ + 13 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + JQyIkIkKsErNdepg2gVT/JK/sJc1zsHwZSbXA5ddiyxUHYLTXHgjODkeImqrSBK0EG0TDHDGZP92AJ5ijtqCNhVQlC817QFmnsiKGgkFEGYSgHAz+gdiKX9C50Lqz8DWfhOwzOu4Pc0ful+zMC8C9auf8ZWcEaTd40Lh7vTI4Is1B2AkTC9wsH9/fW7CJV29Z5PIolvml93SHBJzo6+SLAj4BoE6CnpMAcqp4uyINLlObFfeJ/23IdfY/leQGN9DsmWipVpJYOmbCIVe1Mk64+8zsT58uautvekVGXorBUPQJhuouFas0YOWwiquWbdqmQ5Z2HJogNecTzXXHQdE7ErG3OiFV+ptxAec4GzEbPm43kGw/TiGr/wyFCAGmTQrFW7AfgUZBpji/+uGHqTw53CRXI6ZRkyjqyZKknJ/J12VdTT2ZIELBhZQ5X6ti/oDEW/OD67Q8/JffCAOFhXERQx8p12e6V3ojkNpWLZOgsywHkmlYmv89yaVepHorUNHEf3xtUgxPDjWdUo0MeyRGYcQJ6V/g2No5SISctxGNg01eMAl4y8t6buQXvTttfLMYKjLnZ0h8ybZR21LDPPeNG7fu+JAnKq5D9502/xcDeuauJwYtMiP7UQF1DbecFaTJHYJudH8k1J5FsEVefZkzDUq/errsW125Jc10lf3r7RxG9eKpBXOYMWoi91cx0f6QsEa7hduVMk49WFhNn2sjCaVuFX0vgkGUO4AuuasvTs9AnegkvcxN9FGtMKEjFxTANtKPeKXU2Ra+UxnQsYGYw== +
+
+ x-ms-client-session-id + 412c953f-d104-44b3-936b-95e24d8a7259-2014-07-16 17:19:50Z +
+
+ x-ms-client-request-id + 37c39e27-1f78-4ebb-8564-d5c75a36a874-2014-07-16 17:19:54Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=2YfLm3SJ30DuNMtGp+K1qg== +
+
+ + + .SQLSERVERMANAGEMENT + 2YfLm3SJ30DuNMtGp+K1qg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + a0778f5c-9d63-4664-a742-b7a367dde4cf +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Wed, 16 Jul 2014 17:19:57 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0')/DimensionSettings" /><title /><updated>2014-07-16T17:19:57Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</d:Id><d:Name>P2</d:Name><d:Description>Premium P2 resource allocation.</d:Description><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 14 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases()?$filter=Name%20eq%20'NewAzureSqlPremiumDatabaseTests_P2'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + JQyIkIkKsErNdepg2gVT/JK/sJc1zsHwZSbXA5ddiyxUHYLTXHgjODkeImqrSBK0EG0TDHDGZP92AJ5ijtqCNhVQlC817QFmnsiKGgkFEGYSgHAz+gdiKX9C50Lqz8DWfhOwzOu4Pc0ful+zMC8C9auf8ZWcEaTd40Lh7vTI4Is1B2AkTC9wsH9/fW7CJV29Z5PIolvml93SHBJzo6+SLAj4BoE6CnpMAcqp4uyINLlObFfeJ/23IdfY/leQGN9DsmWipVpJYOmbCIVe1Mk64+8zsT58uautvekVGXorBUPQJhuouFas0YOWwiquWbdqmQ5Z2HJogNecTzXXHQdE7ErG3OiFV+ptxAec4GzEbPm43kGw/TiGr/wyFCAGmTQrFW7AfgUZBpji/+uGHqTw53CRXI6ZRkyjqyZKknJ/J12VdTT2ZIELBhZQ5X6ti/oDEW/OD67Q8/JffCAOFhXERQx8p12e6V3ojkNpWLZOgsywHkmlYmv89yaVepHorUNHEf3xtUgxPDjWdUo0MeyRGYcQJ6V/g2No5SISctxGNg01eMAl4y8t6buQXvTttfLMYKjLnZ0h8ybZR21LDPPeNG7fu+JAnKq5D9502/xcDeuauJwYtMiP7UQF1DbecFaTJHYJudH8k1J5FsEVefZkzDUq/errsW125Jc10lf3r7RxG9eKpBXOYMWoi91cx0f6QsEa7hduVMk49WFhNn2sjCaVuFX0vgkGUO4AuuasvTs9AnegkvcxN9FGtMKEjFxTANtKPeKXU2Ra+UxnQsYGYw== +
+
+ x-ms-client-session-id + 412c953f-d104-44b3-936b-95e24d8a7259-2014-07-16 17:19:50Z +
+
+ x-ms-client-request-id + 37c39e27-1f78-4ebb-8564-d5c75a36a874-2014-07-16 17:19:54Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=2YfLm3SJ30DuNMtGp+K1qg== +
+
+ + + .SQLSERVERMANAGEMENT + 2YfLm3SJ30DuNMtGp+K1qg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + a0778f5c-9d63-4664-a742-b7a367dde4cf +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Wed, 16 Jul 2014 17:19:59 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2014-07-16T17:19:59Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(5)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(5)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(5)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(5)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(5)/DatabaseCopies" /><title /><updated>2014-07-16T17:19:59Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">5</d:Id><d:Name>NewAzureSqlPremiumDatabaseTests_P2</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2014-07-16T17:19:58.127</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Premium</d:Edition><d:MaxSizeGB m:type="Edm.Int32">10</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">10737418240</d:MaxSizeBytes><d:CollationName>Japanese_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2014-07-16T10:19:54.913</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-07-16T17:20:54.737Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry></feed> +
+
+ + 15 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + JQyIkIkKsErNdepg2gVT/JK/sJc1zsHwZSbXA5ddiyxUHYLTXHgjODkeImqrSBK0EG0TDHDGZP92AJ5ijtqCNhVQlC817QFmnsiKGgkFEGYSgHAz+gdiKX9C50Lqz8DWfhOwzOu4Pc0ful+zMC8C9auf8ZWcEaTd40Lh7vTI4Is1B2AkTC9wsH9/fW7CJV29Z5PIolvml93SHBJzo6+SLAj4BoE6CnpMAcqp4uyINLlObFfeJ/23IdfY/leQGN9DsmWipVpJYOmbCIVe1Mk64+8zsT58uautvekVGXorBUPQJhuouFas0YOWwiquWbdqmQ5Z2HJogNecTzXXHQdE7ErG3OiFV+ptxAec4GzEbPm43kGw/TiGr/wyFCAGmTQrFW7AfgUZBpji/+uGHqTw53CRXI6ZRkyjqyZKknJ/J12VdTT2ZIELBhZQ5X6ti/oDEW/OD67Q8/JffCAOFhXERQx8p12e6V3ojkNpWLZOgsywHkmlYmv89yaVepHorUNHEf3xtUgxPDjWdUo0MeyRGYcQJ6V/g2No5SISctxGNg01eMAl4y8t6buQXvTttfLMYKjLnZ0h8ybZR21LDPPeNG7fu+JAnKq5D9502/xcDeuauJwYtMiP7UQF1DbecFaTJHYJudH8k1J5FsEVefZkzDUq/errsW125Jc10lf3r7RxG9eKpBXOYMWoi91cx0f6QsEa7hduVMk49WFhNn2sjCaVuFX0vgkGUO4AuuasvTs9AnegkvcxN9FGtMKEjFxTANtKPeKXU2Ra+UxnQsYGYw== +
+
+ x-ms-client-session-id + 412c953f-d104-44b3-936b-95e24d8a7259-2014-07-16 17:19:50Z +
+
+ x-ms-client-request-id + 37c39e27-1f78-4ebb-8564-d5c75a36a874-2014-07-16 17:19:54Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=2YfLm3SJ30DuNMtGp+K1qg== +
+
+ + + .SQLSERVERMANAGEMENT + 2YfLm3SJ30DuNMtGp+K1qg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + a0778f5c-9d63-4664-a742-b7a367dde4cf +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Wed, 16 Jul 2014 17:19:59 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0')/DimensionSettings" /><title /><updated>2014-07-16T17:20:00Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</d:Id><d:Name>P2</d:Name><d:Description>Premium P2 resource allocation.</d:Description><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+
+
+ + UnitTest.Common.GetAzureSqlDatabaseOperationWithSqlAuth + + + 0 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases + POST + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + WyrofbbfUPt8hxnIYsZ7ZGnk2jxMjJXAPlyR7+VN/KDgi2lk5xEomfUrI+uwFrXLdZuz91BT+XJRzzGl4JADsTTqtCWjd7IRc3vnZIDw782zlXP+bZlOTpHd3taLXGm01nti3B79+rKcov787SpH0x1KkoIQy5OekEdL/dG0G3aE2XcrQW9aKqEmyG1yJw9hqxoHYhQJl5tY4HEykFj51TEXO/u4cuY8Lo40MNgYuhMdrIwqGgIscBCYZgPeDwMzYVGk61COH5Ws9HpYx4BpTSoF9zXlhNNaSz7gsyYLOrm6qcu+1ma3frd2RY8paPF6OgtJdp+ikxPWqBEGZ2OP74KVi6D5Rmxt32nw2jG6hIsAnpG+aieXt4WR9r3/Dvs3lJ2vJJuPCbXif+zJXccwtSDeVnuDQFyw7PQitAWsxgj60x88+zYhiecNgH7J2vITAKCL6nipXDrxFGVTCVvNa7qnOpPPc4YEjdkj9K42CxwKChFxx8pn65P4GT2jm9Z/ewswDyM6tx0JiWDz15WAI9vJIWvYUxqdp+4T21kdNqEE6aEpRUrfS4Rwd7NvD3GguweYaMkgzczl64QFwPr1mH1KkyMekbK85gh+p42hhuLxw4OXuU2S7J1U3tyPuHRoigPDrbSstzZAmYmldOs6fa9h9WegL1g9riWJrYGyO3SDohyMreAERsNnBO0F+fZ1SYglMTVtSaGWfYpWstVZz2bAWrMcP3pDWjS49kBUcZUkLZt0VeEbwESni3m7Gs7pid1Lc6oW9U4G297U0VWvKQ== +
+
+ x-ms-client-session-id + fab71a0d-62cc-40f6-a716-059200f855df-2013-11-12 02:29:31Z +
+
+ x-ms-client-request-id + 8844fdbc-1e7e-47a6-b51d-f93b09f78374-2013-11-12 02:30:59Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=pYRuwnUZAKKeJjOoHwVAfA== +
+
+ + + .SQLSERVERMANAGEMENT + pYRuwnUZAKKeJjOoHwVAfA== + + + + + <?xml version="1.0" encoding="utf-8" standalone="yes"?> + <entry xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom"> + <title /> + <author> + <name /> + </author> + <updated>2013-11-12T02:30:59.4532451Z</updated> + <id /> + <content type="application/xml"> + <m:properties> + <d:AssignedServiceObjectiveId m:type="Edm.Guid" m:null="true" /> + <d:CollationName m:null="true" /> + <d:CreationDate m:type="Edm.DateTime">0001-01-01T00:00:00</d:CreationDate> + <d:Edition m:null="true" /> + <d:Id m:type="Edm.Int32">0</d:Id> + <d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember> + <d:IsFederationRoot m:type="Edm.Boolean" m:null="true" /> + <d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn> + <d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /> + <d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly> + <d:IsRecursiveTriggersOn m:type="Edm.Boolean" m:null="true" /> + <d:IsSuspended m:type="Edm.Boolean" m:null="true" /> + <d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject> + <d:MaxSizeBytes m:type="Edm.Int64" m:null="true" /> + <d:MaxSizeGB m:type="Edm.Int32" m:null="true" /> + <d:Name>getAzureSqlDatabaseOperationTestsDB_08ebd7c9-bfb7-426a-9e2f-9921999567e1</d:Name> + <d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /> + <d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /> + <d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /> + <d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /> + <d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /> + <d:RecoveryPeriodStartDate m:type="Edm.DateTime" m:null="true" /> + <d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32" m:null="true" /> + <d:ServiceObjectiveAssignmentErrorDescription m:null="true" /> + <d:ServiceObjectiveAssignmentState m:type="Edm.Byte" m:null="true" /> + <d:ServiceObjectiveAssignmentStateDescription m:null="true" /> + <d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime" m:null="true" /> + <d:ServiceObjectiveId m:type="Edm.Guid" m:null="true" /> + <d:SizeMB m:type="Edm.Decimal">0</d:SizeMB> + <d:Status m:type="Edm.Int32">0</d:Status> + </m:properties> + </content> + </entry> + + application/atom+xml + application/atom+xml,application/xml +
+ + Created + +
+ x-ms-request-id + 77726b05-5e41-4bbe-15da-cfefa4f16571 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Tue, 12 Nov 2013 02:31:04 GMT +
+
+ Location + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4) +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(4)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(4)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(4)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(4)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(4)/DatabaseCopies" /><title /><updated>2013-11-12T02:31:04Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">4</d:Id><d:Name>getAzureSqlDatabaseOperationTestsDB_08ebd7c9-bfb7-426a-9e2f-9921999567e1</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2013-11-12T02:31:03.33</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">1</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">1073741824</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2013-11-11T18:31:00.19</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2013-11-12T02:31:59.173Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean" m:null="true" /><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry> +
+
+ + 1 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4) + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + WyrofbbfUPt8hxnIYsZ7ZGnk2jxMjJXAPlyR7+VN/KDgi2lk5xEomfUrI+uwFrXLdZuz91BT+XJRzzGl4JADsTTqtCWjd7IRc3vnZIDw782zlXP+bZlOTpHd3taLXGm01nti3B79+rKcov787SpH0x1KkoIQy5OekEdL/dG0G3aE2XcrQW9aKqEmyG1yJw9hqxoHYhQJl5tY4HEykFj51TEXO/u4cuY8Lo40MNgYuhMdrIwqGgIscBCYZgPeDwMzYVGk61COH5Ws9HpYx4BpTSoF9zXlhNNaSz7gsyYLOrm6qcu+1ma3frd2RY8paPF6OgtJdp+ikxPWqBEGZ2OP74KVi6D5Rmxt32nw2jG6hIsAnpG+aieXt4WR9r3/Dvs3lJ2vJJuPCbXif+zJXccwtSDeVnuDQFyw7PQitAWsxgj60x88+zYhiecNgH7J2vITAKCL6nipXDrxFGVTCVvNa7qnOpPPc4YEjdkj9K42CxwKChFxx8pn65P4GT2jm9Z/ewswDyM6tx0JiWDz15WAI9vJIWvYUxqdp+4T21kdNqEE6aEpRUrfS4Rwd7NvD3GguweYaMkgzczl64QFwPr1mH1KkyMekbK85gh+p42hhuLxw4OXuU2S7J1U3tyPuHRoigPDrbSstzZAmYmldOs6fa9h9WegL1g9riWJrYGyO3SDohyMreAERsNnBO0F+fZ1SYglMTVtSaGWfYpWstVZz2bAWrMcP3pDWjS49kBUcZUkLZt0VeEbwESni3m7Gs7pid1Lc6oW9U4G297U0VWvKQ== +
+
+ x-ms-client-session-id + fab71a0d-62cc-40f6-a716-059200f855df-2013-11-12 02:29:31Z +
+
+ x-ms-client-request-id + 8844fdbc-1e7e-47a6-b51d-f93b09f78374-2013-11-12 02:30:59Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=pYRuwnUZAKKeJjOoHwVAfA== +
+
+ + + .SQLSERVERMANAGEMENT + pYRuwnUZAKKeJjOoHwVAfA== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 77726b05-5e41-4bbe-15da-cfefa4f16571 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Tue, 12 Nov 2013 02:31:04 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(4)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(4)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(4)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(4)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(4)/DatabaseCopies" /><title /><updated>2013-11-12T02:31:05Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">4</d:Id><d:Name>getAzureSqlDatabaseOperationTestsDB_08ebd7c9-bfb7-426a-9e2f-9921999567e1</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2013-11-12T02:31:03.33</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">1</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">1073741824</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2013-11-11T18:31:00.19</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2013-11-12T02:31:59.173Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry> +
+
+ + 2 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + WyrofbbfUPt8hxnIYsZ7ZGnk2jxMjJXAPlyR7+VN/KDgi2lk5xEomfUrI+uwFrXLdZuz91BT+XJRzzGl4JADsTTqtCWjd7IRc3vnZIDw782zlXP+bZlOTpHd3taLXGm01nti3B79+rKcov787SpH0x1KkoIQy5OekEdL/dG0G3aE2XcrQW9aKqEmyG1yJw9hqxoHYhQJl5tY4HEykFj51TEXO/u4cuY8Lo40MNgYuhMdrIwqGgIscBCYZgPeDwMzYVGk61COH5Ws9HpYx4BpTSoF9zXlhNNaSz7gsyYLOrm6qcu+1ma3frd2RY8paPF6OgtJdp+ikxPWqBEGZ2OP74KVi6D5Rmxt32nw2jG6hIsAnpG+aieXt4WR9r3/Dvs3lJ2vJJuPCbXif+zJXccwtSDeVnuDQFyw7PQitAWsxgj60x88+zYhiecNgH7J2vITAKCL6nipXDrxFGVTCVvNa7qnOpPPc4YEjdkj9K42CxwKChFxx8pn65P4GT2jm9Z/ewswDyM6tx0JiWDz15WAI9vJIWvYUxqdp+4T21kdNqEE6aEpRUrfS4Rwd7NvD3GguweYaMkgzczl64QFwPr1mH1KkyMekbK85gh+p42hhuLxw4OXuU2S7J1U3tyPuHRoigPDrbSstzZAmYmldOs6fa9h9WegL1g9riWJrYGyO3SDohyMreAERsNnBO0F+fZ1SYglMTVtSaGWfYpWstVZz2bAWrMcP3pDWjS49kBUcZUkLZt0VeEbwESni3m7Gs7pid1Lc6oW9U4G297U0VWvKQ== +
+
+ x-ms-client-session-id + fab71a0d-62cc-40f6-a716-059200f855df-2013-11-12 02:29:31Z +
+
+ x-ms-client-request-id + 8844fdbc-1e7e-47a6-b51d-f93b09f78374-2013-11-12 02:30:59Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=pYRuwnUZAKKeJjOoHwVAfA== +
+
+ + + .SQLSERVERMANAGEMENT + pYRuwnUZAKKeJjOoHwVAfA== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 77726b05-5e41-4bbe-15da-cfefa4f16571 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Tue, 12 Nov 2013 02:31:04 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2013-11-12T02:31:05Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Resource capacity is not reserved.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 3 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases()?$filter=Name%20eq%20'getAzureSqlDatabaseOperationTestsDB_08ebd7c9-bfb7-426a-9e2f-9921999567e1'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + WyrofbbfUPt8hxnIYsZ7ZGnk2jxMjJXAPlyR7+VN/KDgi2lk5xEomfUrI+uwFrXLdZuz91BT+XJRzzGl4JADsTTqtCWjd7IRc3vnZIDw782zlXP+bZlOTpHd3taLXGm01nti3B79+rKcov787SpH0x1KkoIQy5OekEdL/dG0G3aE2XcrQW9aKqEmyG1yJw9hqxoHYhQJl5tY4HEykFj51TEXO/u4cuY8Lo40MNgYuhMdrIwqGgIscBCYZgPeDwMzYVGk61COH5Ws9HpYx4BpTSoF9zXlhNNaSz7gsyYLOrm6qcu+1ma3frd2RY8paPF6OgtJdp+ikxPWqBEGZ2OP74KVi6D5Rmxt32nw2jG6hIsAnpG+aieXt4WR9r3/Dvs3lJ2vJJuPCbXif+zJXccwtSDeVnuDQFyw7PQitAWsxgj60x88+zYhiecNgH7J2vITAKCL6nipXDrxFGVTCVvNa7qnOpPPc4YEjdkj9K42CxwKChFxx8pn65P4GT2jm9Z/ewswDyM6tx0JiWDz15WAI9vJIWvYUxqdp+4T21kdNqEE6aEpRUrfS4Rwd7NvD3GguweYaMkgzczl64QFwPr1mH1KkyMekbK85gh+p42hhuLxw4OXuU2S7J1U3tyPuHRoigPDrbSstzZAmYmldOs6fa9h9WegL1g9riWJrYGyO3SDohyMreAERsNnBO0F+fZ1SYglMTVtSaGWfYpWstVZz2bAWrMcP3pDWjS49kBUcZUkLZt0VeEbwESni3m7Gs7pid1Lc6oW9U4G297U0VWvKQ== +
+
+ x-ms-client-session-id + fab71a0d-62cc-40f6-a716-059200f855df-2013-11-12 02:29:31Z +
+
+ x-ms-client-request-id + 8844fdbc-1e7e-47a6-b51d-f93b09f78374-2013-11-12 02:30:59Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=pYRuwnUZAKKeJjOoHwVAfA== +
+
+ + + .SQLSERVERMANAGEMENT + pYRuwnUZAKKeJjOoHwVAfA== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 77726b05-5e41-4bbe-15da-cfefa4f16571 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Tue, 12 Nov 2013 02:31:04 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2013-11-12T02:31:05Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(4)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(4)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(4)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(4)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(4)/DatabaseCopies" /><title /><updated>2013-11-12T02:31:05Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">4</d:Id><d:Name>getAzureSqlDatabaseOperationTestsDB_08ebd7c9-bfb7-426a-9e2f-9921999567e1</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2013-11-12T02:31:03.33</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">1</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">1073741824</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2013-11-11T18:31:00.19</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2013-11-12T02:31:59.173Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry></feed> +
+
+ + 4 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + WyrofbbfUPt8hxnIYsZ7ZGnk2jxMjJXAPlyR7+VN/KDgi2lk5xEomfUrI+uwFrXLdZuz91BT+XJRzzGl4JADsTTqtCWjd7IRc3vnZIDw782zlXP+bZlOTpHd3taLXGm01nti3B79+rKcov787SpH0x1KkoIQy5OekEdL/dG0G3aE2XcrQW9aKqEmyG1yJw9hqxoHYhQJl5tY4HEykFj51TEXO/u4cuY8Lo40MNgYuhMdrIwqGgIscBCYZgPeDwMzYVGk61COH5Ws9HpYx4BpTSoF9zXlhNNaSz7gsyYLOrm6qcu+1ma3frd2RY8paPF6OgtJdp+ikxPWqBEGZ2OP74KVi6D5Rmxt32nw2jG6hIsAnpG+aieXt4WR9r3/Dvs3lJ2vJJuPCbXif+zJXccwtSDeVnuDQFyw7PQitAWsxgj60x88+zYhiecNgH7J2vITAKCL6nipXDrxFGVTCVvNa7qnOpPPc4YEjdkj9K42CxwKChFxx8pn65P4GT2jm9Z/ewswDyM6tx0JiWDz15WAI9vJIWvYUxqdp+4T21kdNqEE6aEpRUrfS4Rwd7NvD3GguweYaMkgzczl64QFwPr1mH1KkyMekbK85gh+p42hhuLxw4OXuU2S7J1U3tyPuHRoigPDrbSstzZAmYmldOs6fa9h9WegL1g9riWJrYGyO3SDohyMreAERsNnBO0F+fZ1SYglMTVtSaGWfYpWstVZz2bAWrMcP3pDWjS49kBUcZUkLZt0VeEbwESni3m7Gs7pid1Lc6oW9U4G297U0VWvKQ== +
+
+ x-ms-client-session-id + fab71a0d-62cc-40f6-a716-059200f855df-2013-11-12 02:29:31Z +
+
+ x-ms-client-request-id + 8844fdbc-1e7e-47a6-b51d-f93b09f78374-2013-11-12 02:30:59Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=pYRuwnUZAKKeJjOoHwVAfA== +
+
+ + + .SQLSERVERMANAGEMENT + pYRuwnUZAKKeJjOoHwVAfA== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 77726b05-5e41-4bbe-15da-cfefa4f16571 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Tue, 12 Nov 2013 02:31:04 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2013-11-12T02:31:05Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Resource capacity is not reserved.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 5 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4) + DELETE + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + WyrofbbfUPt8hxnIYsZ7ZGnk2jxMjJXAPlyR7+VN/KDgi2lk5xEomfUrI+uwFrXLdZuz91BT+XJRzzGl4JADsTTqtCWjd7IRc3vnZIDw782zlXP+bZlOTpHd3taLXGm01nti3B79+rKcov787SpH0x1KkoIQy5OekEdL/dG0G3aE2XcrQW9aKqEmyG1yJw9hqxoHYhQJl5tY4HEykFj51TEXO/u4cuY8Lo40MNgYuhMdrIwqGgIscBCYZgPeDwMzYVGk61COH5Ws9HpYx4BpTSoF9zXlhNNaSz7gsyYLOrm6qcu+1ma3frd2RY8paPF6OgtJdp+ikxPWqBEGZ2OP74KVi6D5Rmxt32nw2jG6hIsAnpG+aieXt4WR9r3/Dvs3lJ2vJJuPCbXif+zJXccwtSDeVnuDQFyw7PQitAWsxgj60x88+zYhiecNgH7J2vITAKCL6nipXDrxFGVTCVvNa7qnOpPPc4YEjdkj9K42CxwKChFxx8pn65P4GT2jm9Z/ewswDyM6tx0JiWDz15WAI9vJIWvYUxqdp+4T21kdNqEE6aEpRUrfS4Rwd7NvD3GguweYaMkgzczl64QFwPr1mH1KkyMekbK85gh+p42hhuLxw4OXuU2S7J1U3tyPuHRoigPDrbSstzZAmYmldOs6fa9h9WegL1g9riWJrYGyO3SDohyMreAERsNnBO0F+fZ1SYglMTVtSaGWfYpWstVZz2bAWrMcP3pDWjS49kBUcZUkLZt0VeEbwESni3m7Gs7pid1Lc6oW9U4G297U0VWvKQ== +
+
+ x-ms-client-session-id + fab71a0d-62cc-40f6-a716-059200f855df-2013-11-12 02:29:31Z +
+
+ x-ms-client-request-id + 8844fdbc-1e7e-47a6-b51d-f93b09f78374-2013-11-12 02:30:59Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=pYRuwnUZAKKeJjOoHwVAfA== +
+
+ + + .SQLSERVERMANAGEMENT + pYRuwnUZAKKeJjOoHwVAfA== + + + + + application/atom+xml + application/atom+xml,application/xml +
+ + NoContent + +
+ x-ms-request-id + 77726b05-5e41-4bbe-15da-cfefa4f16571 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 1.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Tue, 12 Nov 2013 02:31:13 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 6 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/DatabaseOperations()?$filter=DatabaseName%20eq%20'getAzureSqlDatabaseOperationTestsDB_08ebd7c9-bfb7-426a-9e2f-9921999567e1' + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + WyrofbbfUPt8hxnIYsZ7ZGnk2jxMjJXAPlyR7+VN/KDgi2lk5xEomfUrI+uwFrXLdZuz91BT+XJRzzGl4JADsTTqtCWjd7IRc3vnZIDw782zlXP+bZlOTpHd3taLXGm01nti3B79+rKcov787SpH0x1KkoIQy5OekEdL/dG0G3aE2XcrQW9aKqEmyG1yJw9hqxoHYhQJl5tY4HEykFj51TEXO/u4cuY8Lo40MNgYuhMdrIwqGgIscBCYZgPeDwMzYVGk61COH5Ws9HpYx4BpTSoF9zXlhNNaSz7gsyYLOrm6qcu+1ma3frd2RY8paPF6OgtJdp+ikxPWqBEGZ2OP74KVi6D5Rmxt32nw2jG6hIsAnpG+aieXt4WR9r3/Dvs3lJ2vJJuPCbXif+zJXccwtSDeVnuDQFyw7PQitAWsxgj60x88+zYhiecNgH7J2vITAKCL6nipXDrxFGVTCVvNa7qnOpPPc4YEjdkj9K42CxwKChFxx8pn65P4GT2jm9Z/ewswDyM6tx0JiWDz15WAI9vJIWvYUxqdp+4T21kdNqEE6aEpRUrfS4Rwd7NvD3GguweYaMkgzczl64QFwPr1mH1KkyMekbK85gh+p42hhuLxw4OXuU2S7J1U3tyPuHRoigPDrbSstzZAmYmldOs6fa9h9WegL1g9riWJrYGyO3SDohyMreAERsNnBO0F+fZ1SYglMTVtSaGWfYpWstVZz2bAWrMcP3pDWjS49kBUcZUkLZt0VeEbwESni3m7Gs7pid1Lc6oW9U4G297U0VWvKQ== +
+
+ x-ms-client-session-id + fab71a0d-62cc-40f6-a716-059200f855df-2013-11-12 02:29:31Z +
+
+ x-ms-client-request-id + 8844fdbc-1e7e-47a6-b51d-f93b09f78374-2013-11-12 02:30:59Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=pYRuwnUZAKKeJjOoHwVAfA== +
+
+ + + .SQLSERVERMANAGEMENT + pYRuwnUZAKKeJjOoHwVAfA== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 77726b05-5e41-4bbe-15da-cfefa4f16571 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Tue, 12 Nov 2013 02:31:13 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/DatabaseOperations</id><title type="text">DatabaseOperations</title><updated>2013-11-12T02:31:13Z</updated><link rel="self" title="DatabaseOperations" href="DatabaseOperations" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/DatabaseOperations(guid'6c3afd55-7ce5-45cd-8e4c-f5ae8f8e1659')</id><category term="Microsoft.SqlServer.Management.Server.Domain.DatabaseOperation" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="DatabaseOperation" href="DatabaseOperations(guid'6c3afd55-7ce5-45cd-8e4c-f5ae8f8e1659')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="DatabaseOperations(guid'6c3afd55-7ce5-45cd-8e4c-f5ae8f8e1659')/Server" /><title /><updated>2013-11-12T02:31:13Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">6c3afd55-7ce5-45cd-8e4c-f5ae8f8e1659</d:Id><d:Name>CREATE DATABASE</d:Name><d:State>COMPLETED</d:State><d:StateId m:type="Edm.Int32">2</d:StateId><d:SessionActivityId m:type="Edm.Guid">8844fdbc-1e7e-47a6-b51d-f93b09f78374</d:SessionActivityId><d:DatabaseName>getAzureSqlDatabaseOperationTestsDB_08ebd7c9-bfb7-426a-9e2f-9921999567e1</d:DatabaseName><d:PercentComplete m:type="Edm.Int32">100</d:PercentComplete><d:ErrorCode m:type="Edm.Int32">0</d:ErrorCode><d:Error></d:Error><d:ErrorSeverity m:type="Edm.Int32">0</d:ErrorSeverity><d:ErrorState m:type="Edm.Int32">0</d:ErrorState><d:StartTime m:type="Edm.DateTime">2013-11-12T02:30:58.157</d:StartTime><d:LastModifyTime m:type="Edm.DateTime">2013-11-12T02:31:04.36</d:LastModifyTime></m:properties></content></entry></feed> +
+
+ + 7 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/DatabaseOperations()?$filter=DatabaseName%20eq%20'getAzureSqlDatabaseOperationTestsDB_08ebd7c9-bfb7-426a-9e2f-9921999567e1' + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + WyrofbbfUPt8hxnIYsZ7ZGnk2jxMjJXAPlyR7+VN/KDgi2lk5xEomfUrI+uwFrXLdZuz91BT+XJRzzGl4JADsTTqtCWjd7IRc3vnZIDw782zlXP+bZlOTpHd3taLXGm01nti3B79+rKcov787SpH0x1KkoIQy5OekEdL/dG0G3aE2XcrQW9aKqEmyG1yJw9hqxoHYhQJl5tY4HEykFj51TEXO/u4cuY8Lo40MNgYuhMdrIwqGgIscBCYZgPeDwMzYVGk61COH5Ws9HpYx4BpTSoF9zXlhNNaSz7gsyYLOrm6qcu+1ma3frd2RY8paPF6OgtJdp+ikxPWqBEGZ2OP74KVi6D5Rmxt32nw2jG6hIsAnpG+aieXt4WR9r3/Dvs3lJ2vJJuPCbXif+zJXccwtSDeVnuDQFyw7PQitAWsxgj60x88+zYhiecNgH7J2vITAKCL6nipXDrxFGVTCVvNa7qnOpPPc4YEjdkj9K42CxwKChFxx8pn65P4GT2jm9Z/ewswDyM6tx0JiWDz15WAI9vJIWvYUxqdp+4T21kdNqEE6aEpRUrfS4Rwd7NvD3GguweYaMkgzczl64QFwPr1mH1KkyMekbK85gh+p42hhuLxw4OXuU2S7J1U3tyPuHRoigPDrbSstzZAmYmldOs6fa9h9WegL1g9riWJrYGyO3SDohyMreAERsNnBO0F+fZ1SYglMTVtSaGWfYpWstVZz2bAWrMcP3pDWjS49kBUcZUkLZt0VeEbwESni3m7Gs7pid1Lc6oW9U4G297U0VWvKQ== +
+
+ x-ms-client-session-id + fab71a0d-62cc-40f6-a716-059200f855df-2013-11-12 02:29:31Z +
+
+ x-ms-client-request-id + 8844fdbc-1e7e-47a6-b51d-f93b09f78374-2013-11-12 02:30:59Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=pYRuwnUZAKKeJjOoHwVAfA== +
+
+ + + .SQLSERVERMANAGEMENT + pYRuwnUZAKKeJjOoHwVAfA== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 77726b05-5e41-4bbe-15da-cfefa4f16571 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Tue, 12 Nov 2013 02:31:13 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/DatabaseOperations</id><title type="text">DatabaseOperations</title><updated>2013-11-12T02:31:13Z</updated><link rel="self" title="DatabaseOperations" href="DatabaseOperations" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/DatabaseOperations(guid'6c3afd55-7ce5-45cd-8e4c-f5ae8f8e1659')</id><category term="Microsoft.SqlServer.Management.Server.Domain.DatabaseOperation" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="DatabaseOperation" href="DatabaseOperations(guid'6c3afd55-7ce5-45cd-8e4c-f5ae8f8e1659')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="DatabaseOperations(guid'6c3afd55-7ce5-45cd-8e4c-f5ae8f8e1659')/Server" /><title /><updated>2013-11-12T02:31:13Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">6c3afd55-7ce5-45cd-8e4c-f5ae8f8e1659</d:Id><d:Name>CREATE DATABASE</d:Name><d:State>COMPLETED</d:State><d:StateId m:type="Edm.Int32">2</d:StateId><d:SessionActivityId m:type="Edm.Guid">8844fdbc-1e7e-47a6-b51d-f93b09f78374</d:SessionActivityId><d:DatabaseName>getAzureSqlDatabaseOperationTestsDB_08ebd7c9-bfb7-426a-9e2f-9921999567e1</d:DatabaseName><d:PercentComplete m:type="Edm.Int32">100</d:PercentComplete><d:ErrorCode m:type="Edm.Int32">0</d:ErrorCode><d:Error></d:Error><d:ErrorSeverity m:type="Edm.Int32">0</d:ErrorSeverity><d:ErrorState m:type="Edm.Int32">0</d:ErrorState><d:StartTime m:type="Edm.DateTime">2013-11-12T02:30:58.157</d:StartTime><d:LastModifyTime m:type="Edm.DateTime">2013-11-12T02:31:04.36</d:LastModifyTime></m:properties></content></entry></feed> +
+
+ + 8 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/DatabaseOperations(guid'6c3afd55-7ce5-45cd-8e4c-f5ae8f8e1659') + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + WyrofbbfUPt8hxnIYsZ7ZGnk2jxMjJXAPlyR7+VN/KDgi2lk5xEomfUrI+uwFrXLdZuz91BT+XJRzzGl4JADsTTqtCWjd7IRc3vnZIDw782zlXP+bZlOTpHd3taLXGm01nti3B79+rKcov787SpH0x1KkoIQy5OekEdL/dG0G3aE2XcrQW9aKqEmyG1yJw9hqxoHYhQJl5tY4HEykFj51TEXO/u4cuY8Lo40MNgYuhMdrIwqGgIscBCYZgPeDwMzYVGk61COH5Ws9HpYx4BpTSoF9zXlhNNaSz7gsyYLOrm6qcu+1ma3frd2RY8paPF6OgtJdp+ikxPWqBEGZ2OP74KVi6D5Rmxt32nw2jG6hIsAnpG+aieXt4WR9r3/Dvs3lJ2vJJuPCbXif+zJXccwtSDeVnuDQFyw7PQitAWsxgj60x88+zYhiecNgH7J2vITAKCL6nipXDrxFGVTCVvNa7qnOpPPc4YEjdkj9K42CxwKChFxx8pn65P4GT2jm9Z/ewswDyM6tx0JiWDz15WAI9vJIWvYUxqdp+4T21kdNqEE6aEpRUrfS4Rwd7NvD3GguweYaMkgzczl64QFwPr1mH1KkyMekbK85gh+p42hhuLxw4OXuU2S7J1U3tyPuHRoigPDrbSstzZAmYmldOs6fa9h9WegL1g9riWJrYGyO3SDohyMreAERsNnBO0F+fZ1SYglMTVtSaGWfYpWstVZz2bAWrMcP3pDWjS49kBUcZUkLZt0VeEbwESni3m7Gs7pid1Lc6oW9U4G297U0VWvKQ== +
+
+ x-ms-client-session-id + fab71a0d-62cc-40f6-a716-059200f855df-2013-11-12 02:29:31Z +
+
+ x-ms-client-request-id + 8844fdbc-1e7e-47a6-b51d-f93b09f78374-2013-11-12 02:30:59Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=pYRuwnUZAKKeJjOoHwVAfA== +
+
+ + + .SQLSERVERMANAGEMENT + pYRuwnUZAKKeJjOoHwVAfA== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 77726b05-5e41-4bbe-15da-cfefa4f16571 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Tue, 12 Nov 2013 02:31:13 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/DatabaseOperations(guid'6c3afd55-7ce5-45cd-8e4c-f5ae8f8e1659')</id><category term="Microsoft.SqlServer.Management.Server.Domain.DatabaseOperation" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="DatabaseOperation" href="DatabaseOperations(guid'6c3afd55-7ce5-45cd-8e4c-f5ae8f8e1659')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="DatabaseOperations(guid'6c3afd55-7ce5-45cd-8e4c-f5ae8f8e1659')/Server" /><title /><updated>2013-11-12T02:31:13Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">6c3afd55-7ce5-45cd-8e4c-f5ae8f8e1659</d:Id><d:Name>CREATE DATABASE</d:Name><d:State>COMPLETED</d:State><d:StateId m:type="Edm.Int32">2</d:StateId><d:SessionActivityId m:type="Edm.Guid">8844fdbc-1e7e-47a6-b51d-f93b09f78374</d:SessionActivityId><d:DatabaseName>getAzureSqlDatabaseOperationTestsDB_08ebd7c9-bfb7-426a-9e2f-9921999567e1</d:DatabaseName><d:PercentComplete m:type="Edm.Int32">100</d:PercentComplete><d:ErrorCode m:type="Edm.Int32">0</d:ErrorCode><d:Error></d:Error><d:ErrorSeverity m:type="Edm.Int32">0</d:ErrorSeverity><d:ErrorState m:type="Edm.Int32">0</d:ErrorState><d:StartTime m:type="Edm.DateTime">2013-11-12T02:30:58.157</d:StartTime><d:LastModifyTime m:type="Edm.DateTime">2013-11-12T02:31:04.36</d:LastModifyTime></m:properties></content></entry> +
+
+
+
+ + UnitTest.Common.RemoveTestPremiumDatabasesWithSqlAuth + + + 0 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + Pl48rNQ0Q0LolzYn6C70ExCjy+xRhQxHoZzm+UVg5+zYdNkSdy4DvkCPbQVk93j+cJ1VctG4DVOp649IBqpQX5S8A+e28gVgAsPFUGukzxTWts4OEnasXNR5OQ8yW8taZZgRCIvQcIMidqaMJblLurhqOHi2lCrle2HJ2Mqa6nqX9WmOzC1naAMXprGa6d771dOB2WBYbf3Vr10616HRaogEIdRZkHDOtCRcBJCuO9mTqrlwkNkuPCInIiovtcofwfzJpy2VWh4j/jMxv+jsSqGeVW6F0ZZ8843EarQjKzdeZ9HBfANUFijFTVhAOSpy6aNbGUIVWnzj8GYTiflZmHMT5ts5+6Y3mwWR6fbxfiT2Cp5b4mvDba1tFrSXfb1xRSsE/WqF/+5WURT8qui/+JKs5oyZHvosu3AdcCliGqvAErkNk/Gf23H5cx+cSs+uSN0cLc2Xw9xdd+xK5t+xiGod1TwaEZfgH0w6FYQwjRE7MiTaWFv/376hNpOkDGgALmv/Xjk7FH559yjBDcxxN4sHw6Bloof6ZaCKF9xr9EBvKIk8EMwFdX9jDnoNvnXGFadc/p3rfvX+KEna1NslgSU9Jc1X+7kVaSZsJVZpp3wNHVGulzCWWY0LdBvLRG1DicUNMDBecmp3j6ZpiAmP73HxjuYX67djlSB0FxpyeaUnLyomDykObUw/oXWYuIW+Sbs5eW7lAM65zKNL5+6rLmjAI3Hbzdi7ZIdTmoAymTd4+rqcwsWAnYpVNAvCxI57f9jTHy5eBWGIwBLMMp5Iqg== +
+
+ x-ms-client-session-id + 412c953f-d104-44b3-936b-95e24d8a7259-2014-07-16 17:19:50Z +
+
+ x-ms-client-request-id + dc4d642c-e6c1-4b55-97e8-81770e1e8bb4-2014-07-16 17:20:00Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=LTursKkmgxCbAjpLub/ZOQ== +
+
+ + + .SQLSERVERMANAGEMENT + LTursKkmgxCbAjpLub/ZOQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 2d9d764b-25e6-afd5-0c6f-cf197fb37284 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Wed, 16 Jul 2014 17:20:01 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2014-07-16T17:20:01Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(1)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(1)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(1)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(1)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(1)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(1)/DatabaseCopies" /><title /><updated>2014-07-16T17:20:01Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">1</d:Id><d:Name>master</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">26e021db-f1f9-4c98-84c6-92af8ef433d7</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">26e021db-f1f9-4c98-84c6-92af8ef433d7</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2014-07-16T11:03:28.51</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>System</d:Edition><d:MaxSizeGB m:type="Edm.Int32">5</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">5368709120</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2014-07-14T08:22:42.45</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime" m:null="true" /><d:IsSystemObject m:type="Edm.Boolean">true</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(4)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(4)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(4)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(4)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(4)/DatabaseCopies" /><title /><updated>2014-07-16T17:20:01Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">4</d:Id><d:Name>NewAzureSqlPremiumDatabaseTests_P1</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2014-07-16T17:19:54.297</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Premium</d:Edition><d:MaxSizeGB m:type="Edm.Int32">10</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">10737418240</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2014-07-16T10:19:51.33</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-07-16T17:20:50.983Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(5)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(5)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(5)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(5)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(5)/DatabaseCopies" /><title /><updated>2014-07-16T17:20:01Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">5</d:Id><d:Name>NewAzureSqlPremiumDatabaseTests_P2</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2014-07-16T17:19:58.127</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Premium</d:Edition><d:MaxSizeGB m:type="Edm.Int32">10</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">10737418240</d:MaxSizeBytes><d:CollationName>Japanese_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2014-07-16T10:19:54.913</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-07-16T17:20:54.737Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry></feed> +
+
+ + 1 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(1)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + Pl48rNQ0Q0LolzYn6C70ExCjy+xRhQxHoZzm+UVg5+zYdNkSdy4DvkCPbQVk93j+cJ1VctG4DVOp649IBqpQX5S8A+e28gVgAsPFUGukzxTWts4OEnasXNR5OQ8yW8taZZgRCIvQcIMidqaMJblLurhqOHi2lCrle2HJ2Mqa6nqX9WmOzC1naAMXprGa6d771dOB2WBYbf3Vr10616HRaogEIdRZkHDOtCRcBJCuO9mTqrlwkNkuPCInIiovtcofwfzJpy2VWh4j/jMxv+jsSqGeVW6F0ZZ8843EarQjKzdeZ9HBfANUFijFTVhAOSpy6aNbGUIVWnzj8GYTiflZmHMT5ts5+6Y3mwWR6fbxfiT2Cp5b4mvDba1tFrSXfb1xRSsE/WqF/+5WURT8qui/+JKs5oyZHvosu3AdcCliGqvAErkNk/Gf23H5cx+cSs+uSN0cLc2Xw9xdd+xK5t+xiGod1TwaEZfgH0w6FYQwjRE7MiTaWFv/376hNpOkDGgALmv/Xjk7FH559yjBDcxxN4sHw6Bloof6ZaCKF9xr9EBvKIk8EMwFdX9jDnoNvnXGFadc/p3rfvX+KEna1NslgSU9Jc1X+7kVaSZsJVZpp3wNHVGulzCWWY0LdBvLRG1DicUNMDBecmp3j6ZpiAmP73HxjuYX67djlSB0FxpyeaUnLyomDykObUw/oXWYuIW+Sbs5eW7lAM65zKNL5+6rLmjAI3Hbzdi7ZIdTmoAymTd4+rqcwsWAnYpVNAvCxI57f9jTHy5eBWGIwBLMMp5Iqg== +
+
+ x-ms-client-session-id + 412c953f-d104-44b3-936b-95e24d8a7259-2014-07-16 17:19:50Z +
+
+ x-ms-client-request-id + dc4d642c-e6c1-4b55-97e8-81770e1e8bb4-2014-07-16 17:20:00Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=LTursKkmgxCbAjpLub/ZOQ== +
+
+ + + .SQLSERVERMANAGEMENT + LTursKkmgxCbAjpLub/ZOQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 2d9d764b-25e6-afd5-0c6f-cf197fb37284 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Wed, 16 Jul 2014 17:20:01 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'26e021db-f1f9-4c98-84c6-92af8ef433d7')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'26e021db-f1f9-4c98-84c6-92af8ef433d7')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'26e021db-f1f9-4c98-84c6-92af8ef433d7')/DimensionSettings" /><title /><updated>2014-07-16T17:20:01Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">26e021db-f1f9-4c98-84c6-92af8ef433d7</d:Id><d:Name>System</d:Name><d:Description>Used for master database only.</d:Description><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault><d:IsSystem m:type="Edm.Boolean">true</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 2 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + Pl48rNQ0Q0LolzYn6C70ExCjy+xRhQxHoZzm+UVg5+zYdNkSdy4DvkCPbQVk93j+cJ1VctG4DVOp649IBqpQX5S8A+e28gVgAsPFUGukzxTWts4OEnasXNR5OQ8yW8taZZgRCIvQcIMidqaMJblLurhqOHi2lCrle2HJ2Mqa6nqX9WmOzC1naAMXprGa6d771dOB2WBYbf3Vr10616HRaogEIdRZkHDOtCRcBJCuO9mTqrlwkNkuPCInIiovtcofwfzJpy2VWh4j/jMxv+jsSqGeVW6F0ZZ8843EarQjKzdeZ9HBfANUFijFTVhAOSpy6aNbGUIVWnzj8GYTiflZmHMT5ts5+6Y3mwWR6fbxfiT2Cp5b4mvDba1tFrSXfb1xRSsE/WqF/+5WURT8qui/+JKs5oyZHvosu3AdcCliGqvAErkNk/Gf23H5cx+cSs+uSN0cLc2Xw9xdd+xK5t+xiGod1TwaEZfgH0w6FYQwjRE7MiTaWFv/376hNpOkDGgALmv/Xjk7FH559yjBDcxxN4sHw6Bloof6ZaCKF9xr9EBvKIk8EMwFdX9jDnoNvnXGFadc/p3rfvX+KEna1NslgSU9Jc1X+7kVaSZsJVZpp3wNHVGulzCWWY0LdBvLRG1DicUNMDBecmp3j6ZpiAmP73HxjuYX67djlSB0FxpyeaUnLyomDykObUw/oXWYuIW+Sbs5eW7lAM65zKNL5+6rLmjAI3Hbzdi7ZIdTmoAymTd4+rqcwsWAnYpVNAvCxI57f9jTHy5eBWGIwBLMMp5Iqg== +
+
+ x-ms-client-session-id + 412c953f-d104-44b3-936b-95e24d8a7259-2014-07-16 17:19:50Z +
+
+ x-ms-client-request-id + dc4d642c-e6c1-4b55-97e8-81770e1e8bb4-2014-07-16 17:20:00Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=LTursKkmgxCbAjpLub/ZOQ== +
+
+ + + .SQLSERVERMANAGEMENT + LTursKkmgxCbAjpLub/ZOQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 2d9d764b-25e6-afd5-0c6f-cf197fb37284 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Wed, 16 Jul 2014 17:20:01 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')/DimensionSettings" /><title /><updated>2014-07-16T17:20:01Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:Id><d:Name>P1</d:Name><d:Description>Premium P1 resource allocation.</d:Description><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 3 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + Pl48rNQ0Q0LolzYn6C70ExCjy+xRhQxHoZzm+UVg5+zYdNkSdy4DvkCPbQVk93j+cJ1VctG4DVOp649IBqpQX5S8A+e28gVgAsPFUGukzxTWts4OEnasXNR5OQ8yW8taZZgRCIvQcIMidqaMJblLurhqOHi2lCrle2HJ2Mqa6nqX9WmOzC1naAMXprGa6d771dOB2WBYbf3Vr10616HRaogEIdRZkHDOtCRcBJCuO9mTqrlwkNkuPCInIiovtcofwfzJpy2VWh4j/jMxv+jsSqGeVW6F0ZZ8843EarQjKzdeZ9HBfANUFijFTVhAOSpy6aNbGUIVWnzj8GYTiflZmHMT5ts5+6Y3mwWR6fbxfiT2Cp5b4mvDba1tFrSXfb1xRSsE/WqF/+5WURT8qui/+JKs5oyZHvosu3AdcCliGqvAErkNk/Gf23H5cx+cSs+uSN0cLc2Xw9xdd+xK5t+xiGod1TwaEZfgH0w6FYQwjRE7MiTaWFv/376hNpOkDGgALmv/Xjk7FH559yjBDcxxN4sHw6Bloof6ZaCKF9xr9EBvKIk8EMwFdX9jDnoNvnXGFadc/p3rfvX+KEna1NslgSU9Jc1X+7kVaSZsJVZpp3wNHVGulzCWWY0LdBvLRG1DicUNMDBecmp3j6ZpiAmP73HxjuYX67djlSB0FxpyeaUnLyomDykObUw/oXWYuIW+Sbs5eW7lAM65zKNL5+6rLmjAI3Hbzdi7ZIdTmoAymTd4+rqcwsWAnYpVNAvCxI57f9jTHy5eBWGIwBLMMp5Iqg== +
+
+ x-ms-client-session-id + 412c953f-d104-44b3-936b-95e24d8a7259-2014-07-16 17:19:50Z +
+
+ x-ms-client-request-id + dc4d642c-e6c1-4b55-97e8-81770e1e8bb4-2014-07-16 17:20:00Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=LTursKkmgxCbAjpLub/ZOQ== +
+
+ + + .SQLSERVERMANAGEMENT + LTursKkmgxCbAjpLub/ZOQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 2d9d764b-25e6-afd5-0c6f-cf197fb37284 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Wed, 16 Jul 2014 17:20:01 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0')/DimensionSettings" /><title /><updated>2014-07-16T17:20:01Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</d:Id><d:Name>P2</d:Name><d:Description>Premium P2 resource allocation.</d:Description><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 4 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases()?$filter=Name%20eq%20'NewAzureSqlPremiumDatabaseTests_P1'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + Pl48rNQ0Q0LolzYn6C70ExCjy+xRhQxHoZzm+UVg5+zYdNkSdy4DvkCPbQVk93j+cJ1VctG4DVOp649IBqpQX5S8A+e28gVgAsPFUGukzxTWts4OEnasXNR5OQ8yW8taZZgRCIvQcIMidqaMJblLurhqOHi2lCrle2HJ2Mqa6nqX9WmOzC1naAMXprGa6d771dOB2WBYbf3Vr10616HRaogEIdRZkHDOtCRcBJCuO9mTqrlwkNkuPCInIiovtcofwfzJpy2VWh4j/jMxv+jsSqGeVW6F0ZZ8843EarQjKzdeZ9HBfANUFijFTVhAOSpy6aNbGUIVWnzj8GYTiflZmHMT5ts5+6Y3mwWR6fbxfiT2Cp5b4mvDba1tFrSXfb1xRSsE/WqF/+5WURT8qui/+JKs5oyZHvosu3AdcCliGqvAErkNk/Gf23H5cx+cSs+uSN0cLc2Xw9xdd+xK5t+xiGod1TwaEZfgH0w6FYQwjRE7MiTaWFv/376hNpOkDGgALmv/Xjk7FH559yjBDcxxN4sHw6Bloof6ZaCKF9xr9EBvKIk8EMwFdX9jDnoNvnXGFadc/p3rfvX+KEna1NslgSU9Jc1X+7kVaSZsJVZpp3wNHVGulzCWWY0LdBvLRG1DicUNMDBecmp3j6ZpiAmP73HxjuYX67djlSB0FxpyeaUnLyomDykObUw/oXWYuIW+Sbs5eW7lAM65zKNL5+6rLmjAI3Hbzdi7ZIdTmoAymTd4+rqcwsWAnYpVNAvCxI57f9jTHy5eBWGIwBLMMp5Iqg== +
+
+ x-ms-client-session-id + 412c953f-d104-44b3-936b-95e24d8a7259-2014-07-16 17:19:50Z +
+
+ x-ms-client-request-id + dc4d642c-e6c1-4b55-97e8-81770e1e8bb4-2014-07-16 17:20:00Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=LTursKkmgxCbAjpLub/ZOQ== +
+
+ + + .SQLSERVERMANAGEMENT + LTursKkmgxCbAjpLub/ZOQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 2d9d764b-25e6-afd5-0c6f-cf197fb37284 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Wed, 16 Jul 2014 17:20:01 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2014-07-16T17:20:01Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(4)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(4)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(4)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(4)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(4)/DatabaseCopies" /><title /><updated>2014-07-16T17:20:01Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">4</d:Id><d:Name>NewAzureSqlPremiumDatabaseTests_P1</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2014-07-16T17:19:54.297</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Premium</d:Edition><d:MaxSizeGB m:type="Edm.Int32">10</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">10737418240</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2014-07-16T10:19:51.33</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-07-16T17:20:50.983Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry></feed> +
+
+ + 5 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + Pl48rNQ0Q0LolzYn6C70ExCjy+xRhQxHoZzm+UVg5+zYdNkSdy4DvkCPbQVk93j+cJ1VctG4DVOp649IBqpQX5S8A+e28gVgAsPFUGukzxTWts4OEnasXNR5OQ8yW8taZZgRCIvQcIMidqaMJblLurhqOHi2lCrle2HJ2Mqa6nqX9WmOzC1naAMXprGa6d771dOB2WBYbf3Vr10616HRaogEIdRZkHDOtCRcBJCuO9mTqrlwkNkuPCInIiovtcofwfzJpy2VWh4j/jMxv+jsSqGeVW6F0ZZ8843EarQjKzdeZ9HBfANUFijFTVhAOSpy6aNbGUIVWnzj8GYTiflZmHMT5ts5+6Y3mwWR6fbxfiT2Cp5b4mvDba1tFrSXfb1xRSsE/WqF/+5WURT8qui/+JKs5oyZHvosu3AdcCliGqvAErkNk/Gf23H5cx+cSs+uSN0cLc2Xw9xdd+xK5t+xiGod1TwaEZfgH0w6FYQwjRE7MiTaWFv/376hNpOkDGgALmv/Xjk7FH559yjBDcxxN4sHw6Bloof6ZaCKF9xr9EBvKIk8EMwFdX9jDnoNvnXGFadc/p3rfvX+KEna1NslgSU9Jc1X+7kVaSZsJVZpp3wNHVGulzCWWY0LdBvLRG1DicUNMDBecmp3j6ZpiAmP73HxjuYX67djlSB0FxpyeaUnLyomDykObUw/oXWYuIW+Sbs5eW7lAM65zKNL5+6rLmjAI3Hbzdi7ZIdTmoAymTd4+rqcwsWAnYpVNAvCxI57f9jTHy5eBWGIwBLMMp5Iqg== +
+
+ x-ms-client-session-id + 412c953f-d104-44b3-936b-95e24d8a7259-2014-07-16 17:19:50Z +
+
+ x-ms-client-request-id + dc4d642c-e6c1-4b55-97e8-81770e1e8bb4-2014-07-16 17:20:00Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=LTursKkmgxCbAjpLub/ZOQ== +
+
+ + + .SQLSERVERMANAGEMENT + LTursKkmgxCbAjpLub/ZOQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 2d9d764b-25e6-afd5-0c6f-cf197fb37284 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Wed, 16 Jul 2014 17:20:01 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')/DimensionSettings" /><title /><updated>2014-07-16T17:20:01Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:Id><d:Name>P1</d:Name><d:Description>Premium P1 resource allocation.</d:Description><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 6 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4) + DELETE + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + Pl48rNQ0Q0LolzYn6C70ExCjy+xRhQxHoZzm+UVg5+zYdNkSdy4DvkCPbQVk93j+cJ1VctG4DVOp649IBqpQX5S8A+e28gVgAsPFUGukzxTWts4OEnasXNR5OQ8yW8taZZgRCIvQcIMidqaMJblLurhqOHi2lCrle2HJ2Mqa6nqX9WmOzC1naAMXprGa6d771dOB2WBYbf3Vr10616HRaogEIdRZkHDOtCRcBJCuO9mTqrlwkNkuPCInIiovtcofwfzJpy2VWh4j/jMxv+jsSqGeVW6F0ZZ8843EarQjKzdeZ9HBfANUFijFTVhAOSpy6aNbGUIVWnzj8GYTiflZmHMT5ts5+6Y3mwWR6fbxfiT2Cp5b4mvDba1tFrSXfb1xRSsE/WqF/+5WURT8qui/+JKs5oyZHvosu3AdcCliGqvAErkNk/Gf23H5cx+cSs+uSN0cLc2Xw9xdd+xK5t+xiGod1TwaEZfgH0w6FYQwjRE7MiTaWFv/376hNpOkDGgALmv/Xjk7FH559yjBDcxxN4sHw6Bloof6ZaCKF9xr9EBvKIk8EMwFdX9jDnoNvnXGFadc/p3rfvX+KEna1NslgSU9Jc1X+7kVaSZsJVZpp3wNHVGulzCWWY0LdBvLRG1DicUNMDBecmp3j6ZpiAmP73HxjuYX67djlSB0FxpyeaUnLyomDykObUw/oXWYuIW+Sbs5eW7lAM65zKNL5+6rLmjAI3Hbzdi7ZIdTmoAymTd4+rqcwsWAnYpVNAvCxI57f9jTHy5eBWGIwBLMMp5Iqg== +
+
+ x-ms-client-session-id + 412c953f-d104-44b3-936b-95e24d8a7259-2014-07-16 17:19:50Z +
+
+ x-ms-client-request-id + dc4d642c-e6c1-4b55-97e8-81770e1e8bb4-2014-07-16 17:20:00Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=LTursKkmgxCbAjpLub/ZOQ== +
+
+ + + .SQLSERVERMANAGEMENT + LTursKkmgxCbAjpLub/ZOQ== + + + + + + application/atom+xml,application/xml +
+ + NoContent + +
+ x-ms-request-id + 2d9d764b-25e6-afd5-0c6f-cf197fb37284 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 1.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Wed, 16 Jul 2014 17:20:02 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 7 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases()?$filter=Name%20eq%20'NewAzureSqlPremiumDatabaseTests_P2'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + Pl48rNQ0Q0LolzYn6C70ExCjy+xRhQxHoZzm+UVg5+zYdNkSdy4DvkCPbQVk93j+cJ1VctG4DVOp649IBqpQX5S8A+e28gVgAsPFUGukzxTWts4OEnasXNR5OQ8yW8taZZgRCIvQcIMidqaMJblLurhqOHi2lCrle2HJ2Mqa6nqX9WmOzC1naAMXprGa6d771dOB2WBYbf3Vr10616HRaogEIdRZkHDOtCRcBJCuO9mTqrlwkNkuPCInIiovtcofwfzJpy2VWh4j/jMxv+jsSqGeVW6F0ZZ8843EarQjKzdeZ9HBfANUFijFTVhAOSpy6aNbGUIVWnzj8GYTiflZmHMT5ts5+6Y3mwWR6fbxfiT2Cp5b4mvDba1tFrSXfb1xRSsE/WqF/+5WURT8qui/+JKs5oyZHvosu3AdcCliGqvAErkNk/Gf23H5cx+cSs+uSN0cLc2Xw9xdd+xK5t+xiGod1TwaEZfgH0w6FYQwjRE7MiTaWFv/376hNpOkDGgALmv/Xjk7FH559yjBDcxxN4sHw6Bloof6ZaCKF9xr9EBvKIk8EMwFdX9jDnoNvnXGFadc/p3rfvX+KEna1NslgSU9Jc1X+7kVaSZsJVZpp3wNHVGulzCWWY0LdBvLRG1DicUNMDBecmp3j6ZpiAmP73HxjuYX67djlSB0FxpyeaUnLyomDykObUw/oXWYuIW+Sbs5eW7lAM65zKNL5+6rLmjAI3Hbzdi7ZIdTmoAymTd4+rqcwsWAnYpVNAvCxI57f9jTHy5eBWGIwBLMMp5Iqg== +
+
+ x-ms-client-session-id + 412c953f-d104-44b3-936b-95e24d8a7259-2014-07-16 17:19:50Z +
+
+ x-ms-client-request-id + dc4d642c-e6c1-4b55-97e8-81770e1e8bb4-2014-07-16 17:20:00Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=LTursKkmgxCbAjpLub/ZOQ== +
+
+ + + .SQLSERVERMANAGEMENT + LTursKkmgxCbAjpLub/ZOQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 2d9d764b-25e6-afd5-0c6f-cf197fb37284 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Wed, 16 Jul 2014 17:20:02 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2014-07-16T17:20:03Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(5)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(5)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(5)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(5)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(5)/DatabaseCopies" /><title /><updated>2014-07-16T17:20:03Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">5</d:Id><d:Name>NewAzureSqlPremiumDatabaseTests_P2</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2014-07-16T17:19:58.127</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Premium</d:Edition><d:MaxSizeGB m:type="Edm.Int32">10</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">10737418240</d:MaxSizeBytes><d:CollationName>Japanese_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2014-07-16T10:19:54.913</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-07-16T17:20:54.737Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /><d:QueryStoreStaleQueryThresholdDays m:type="Edm.Int32" m:null="true" /><d:IsSuspended m:type="Edm.Boolean">false</d:IsSuspended></m:properties></content></entry></feed> +
+
+ + 8 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + Pl48rNQ0Q0LolzYn6C70ExCjy+xRhQxHoZzm+UVg5+zYdNkSdy4DvkCPbQVk93j+cJ1VctG4DVOp649IBqpQX5S8A+e28gVgAsPFUGukzxTWts4OEnasXNR5OQ8yW8taZZgRCIvQcIMidqaMJblLurhqOHi2lCrle2HJ2Mqa6nqX9WmOzC1naAMXprGa6d771dOB2WBYbf3Vr10616HRaogEIdRZkHDOtCRcBJCuO9mTqrlwkNkuPCInIiovtcofwfzJpy2VWh4j/jMxv+jsSqGeVW6F0ZZ8843EarQjKzdeZ9HBfANUFijFTVhAOSpy6aNbGUIVWnzj8GYTiflZmHMT5ts5+6Y3mwWR6fbxfiT2Cp5b4mvDba1tFrSXfb1xRSsE/WqF/+5WURT8qui/+JKs5oyZHvosu3AdcCliGqvAErkNk/Gf23H5cx+cSs+uSN0cLc2Xw9xdd+xK5t+xiGod1TwaEZfgH0w6FYQwjRE7MiTaWFv/376hNpOkDGgALmv/Xjk7FH559yjBDcxxN4sHw6Bloof6ZaCKF9xr9EBvKIk8EMwFdX9jDnoNvnXGFadc/p3rfvX+KEna1NslgSU9Jc1X+7kVaSZsJVZpp3wNHVGulzCWWY0LdBvLRG1DicUNMDBecmp3j6ZpiAmP73HxjuYX67djlSB0FxpyeaUnLyomDykObUw/oXWYuIW+Sbs5eW7lAM65zKNL5+6rLmjAI3Hbzdi7ZIdTmoAymTd4+rqcwsWAnYpVNAvCxI57f9jTHy5eBWGIwBLMMp5Iqg== +
+
+ x-ms-client-session-id + 412c953f-d104-44b3-936b-95e24d8a7259-2014-07-16 17:19:50Z +
+
+ x-ms-client-request-id + dc4d642c-e6c1-4b55-97e8-81770e1e8bb4-2014-07-16 17:20:00Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=LTursKkmgxCbAjpLub/ZOQ== +
+
+ + + .SQLSERVERMANAGEMENT + LTursKkmgxCbAjpLub/ZOQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 2d9d764b-25e6-afd5-0c6f-cf197fb37284 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Wed, 16 Jul 2014 17:20:02 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0')/DimensionSettings" /><title /><updated>2014-07-16T17:20:03Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</d:Id><d:Name>P2</d:Name><d:Description>Premium P2 resource allocation.</d:Description><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 9 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5) + DELETE + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + Pl48rNQ0Q0LolzYn6C70ExCjy+xRhQxHoZzm+UVg5+zYdNkSdy4DvkCPbQVk93j+cJ1VctG4DVOp649IBqpQX5S8A+e28gVgAsPFUGukzxTWts4OEnasXNR5OQ8yW8taZZgRCIvQcIMidqaMJblLurhqOHi2lCrle2HJ2Mqa6nqX9WmOzC1naAMXprGa6d771dOB2WBYbf3Vr10616HRaogEIdRZkHDOtCRcBJCuO9mTqrlwkNkuPCInIiovtcofwfzJpy2VWh4j/jMxv+jsSqGeVW6F0ZZ8843EarQjKzdeZ9HBfANUFijFTVhAOSpy6aNbGUIVWnzj8GYTiflZmHMT5ts5+6Y3mwWR6fbxfiT2Cp5b4mvDba1tFrSXfb1xRSsE/WqF/+5WURT8qui/+JKs5oyZHvosu3AdcCliGqvAErkNk/Gf23H5cx+cSs+uSN0cLc2Xw9xdd+xK5t+xiGod1TwaEZfgH0w6FYQwjRE7MiTaWFv/376hNpOkDGgALmv/Xjk7FH559yjBDcxxN4sHw6Bloof6ZaCKF9xr9EBvKIk8EMwFdX9jDnoNvnXGFadc/p3rfvX+KEna1NslgSU9Jc1X+7kVaSZsJVZpp3wNHVGulzCWWY0LdBvLRG1DicUNMDBecmp3j6ZpiAmP73HxjuYX67djlSB0FxpyeaUnLyomDykObUw/oXWYuIW+Sbs5eW7lAM65zKNL5+6rLmjAI3Hbzdi7ZIdTmoAymTd4+rqcwsWAnYpVNAvCxI57f9jTHy5eBWGIwBLMMp5Iqg== +
+
+ x-ms-client-session-id + 412c953f-d104-44b3-936b-95e24d8a7259-2014-07-16 17:19:50Z +
+
+ x-ms-client-request-id + dc4d642c-e6c1-4b55-97e8-81770e1e8bb4-2014-07-16 17:20:00Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=LTursKkmgxCbAjpLub/ZOQ== +
+
+ + + .SQLSERVERMANAGEMENT + LTursKkmgxCbAjpLub/ZOQ== + + + + + + application/atom+xml,application/xml +
+ + NoContent + +
+ x-ms-request-id + 2d9d764b-25e6-afd5-0c6f-cf197fb37284 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 1.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Wed, 16 Jul 2014 17:20:05 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+
+
+ + UnitTests.SetAzureSqlDatabaseServiceObjectiveWithSqlAuth + + + 7 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(7)/ServiceObjective + GET + WindowsAzurePowershell/v0.7.3.1 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + aGXjWlPHwbnEIF7xh4IAOlnzaj9fgX6ewJsAjdEykzm12qQ8ZCcEx3wRmU1gL9xAWhVSK5a+KHgqDU5MINBgIrtYzE+M+cE8UOygBdJ+B8w4ypr3YF/5b9Pnyk7C30K8Lqfj9HUEg3pZDDDSVDN3r+UN1YDAPQLZI0ylNfRzmSTmVKG2vSJHzZnORxneJyRJ0W9FQYmDbhnpno38fyM2i6q9PGgBA4uMJrZEAIUBp8c2Fo2YqLyp4xKmXukLax+DnKYQykcqUsC71ypgh7o8ZtLaRTPYtM5kCmNRWY6XA9wO3oNC3A09iJvaCuPVpPgCrj26ghTQFIhd1i2K0JzPrAhmFrrPgE2W8h9uwCoU7QtN8lVwMLqAHrEOfKRHzatsVU8Hr2JPNpcz806ecaIYFx6OkwAmfIUTcbBd+SjWwFAIDN2AxXrRnHXVN7yq6z+dfJNsB0jTQ6OPMKfYqwocenxLc3S5KZwMW6VlBucmeQsKRwi7eEfElvHm9ENthNKgLLUaCANeLwf/M15l4k6M1yDCvZ8ruwcw5ZCFXzJWVEf+HLiKXQNebMKBpLCgx/TL5z/FJFebecnHaE/luPFuWarzLFGXDg5VxI20F+7Jl8k0HrQx5kH76PCjGs7luxVAXcgyK8Kn2uD0Fll1yrPQOBMlQwTo8lyzu8W2xTV7GSyHNihZsmsWf7fG913Dr4Nft9qGykuDsqBgQ83Dh0UaYN3a7rCW+ZKHtt17OLcLX1L6+Nr/XA7bhp93isHiNS3zoi04f1qIIqVQVaYIY6i3hg== +
+
+ x-ms-client-session-id + ef1140f7-7b53-40f4-8288-24516cf8980f-2012-10-08 23:48:38Z +
+
+ x-ms-client-request-id + ed5e9fa7-ce70-48a4-a330-868f6e318f45-2013-05-08 21:18:04Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=3Y4zVOxuQwnI3U6C86ChIw== +
+
+ + + .SQLSERVERMANAGEMENT + 3Y4zVOxuQwnI3U6C86ChIw== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + c94d3c72-84f6-a9ab-a04f-dd9209855014 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Wed, 08 May 2013 21:18:07 GMT +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2013-05-08T21:18:08Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Resource capacity is not reserved.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 0 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives()?$filter=Name%20eq%20'P1'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + KGuMwKdkAEAmekvfiuEPQANSeyL/gZiYn1bXDjIRJw8wvnqmaFSKIxIDi1W4P2zazf1n2i1TsBMpAQHbicAwS71Q/lTBbO+5MuIe+tX3D6s77uElAXVmkBBf+QDcHQ6PS1XVAcPp8ylyOVCx+tCHJ5rOBvfb168OAdheGjP/PT40Rhn0ANzrNwPzAqJql4kErC2BPLM0bumlXUkH+APhyt3C2afCqtIEPul6pnJtcpzSaEZlxEkpTqOJxYXAsqVPwLux9JKnDkUasBZ+4mwCAKL5/NbN+rmbNZjGKcTT+LpCU8n/xeaqZUJ9a5Wk5vtzroAW/gO+qoForVy7/uYhrCu7YoH164g+saqBAymh6tMUanaw9wLVTdRv8CC1TpGYx02kQrTTVvk72GIkABc6Bmaz+AVxri9Ehsg/DvqEtD6qYFGnggklovAd0PvPN8BHJfLxQSG3RAjyE3xTxariJM3zQmzspFA3zP1cIC4AtQ3FxOaFQrPNbdsN36rqDmzwbjoFR+Q9u9UXVd5b3OhvnobdncqQp/wxq+aEcgtrSpBPx5/rDUpor9rktuqdti77B0703BTtXk2HQS+b8ek2kvRs/qCFbCxN5Cxqk6rJb0InbeJsEG9McLOP6FhGTblIlQSwyrgR30MGjXKqX/Nj6x41+1F856afnHvCoax4FlyleQ6vVqbaPASDZX09CjNkqttGC0KDzF34MXaYD9Db3lSHuKE/yltF0ughBxMR+SIeQnXWNd8d1fLxeAdIL991DxVRsRXwVTm68WCQaR4ShA== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 68f03aec-3f21-4c3e-897b-4c5c1c03e37f-2013-06-28 18:54:45Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=hveMZwFSfs1yjf5QsT2osQ== +
+
+ + + .SQLSERVERMANAGEMENT + hveMZwFSfs1yjf5QsT2osQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 5bb5f5c5-d9e9-d296-dcb0-a15030610d63 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:45 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives</id><title type="text">ServiceObjectives</title><updated>2013-06-28T18:54:45Z</updated><link rel="self" title="ServiceObjectives" href="ServiceObjectives" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')/DimensionSettings" /><title /><updated>2013-06-28T18:54:45Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:Id><d:Name>P1</d:Name><d:Description>Resource capacity is reserved.</d:Description><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry></feed> +
+
+ + 1 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')/DimensionSettings + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + KGuMwKdkAEAmekvfiuEPQANSeyL/gZiYn1bXDjIRJw8wvnqmaFSKIxIDi1W4P2zazf1n2i1TsBMpAQHbicAwS71Q/lTBbO+5MuIe+tX3D6s77uElAXVmkBBf+QDcHQ6PS1XVAcPp8ylyOVCx+tCHJ5rOBvfb168OAdheGjP/PT40Rhn0ANzrNwPzAqJql4kErC2BPLM0bumlXUkH+APhyt3C2afCqtIEPul6pnJtcpzSaEZlxEkpTqOJxYXAsqVPwLux9JKnDkUasBZ+4mwCAKL5/NbN+rmbNZjGKcTT+LpCU8n/xeaqZUJ9a5Wk5vtzroAW/gO+qoForVy7/uYhrCu7YoH164g+saqBAymh6tMUanaw9wLVTdRv8CC1TpGYx02kQrTTVvk72GIkABc6Bmaz+AVxri9Ehsg/DvqEtD6qYFGnggklovAd0PvPN8BHJfLxQSG3RAjyE3xTxariJM3zQmzspFA3zP1cIC4AtQ3FxOaFQrPNbdsN36rqDmzwbjoFR+Q9u9UXVd5b3OhvnobdncqQp/wxq+aEcgtrSpBPx5/rDUpor9rktuqdti77B0703BTtXk2HQS+b8ek2kvRs/qCFbCxN5Cxqk6rJb0InbeJsEG9McLOP6FhGTblIlQSwyrgR30MGjXKqX/Nj6x41+1F856afnHvCoax4FlyleQ6vVqbaPASDZX09CjNkqttGC0KDzF34MXaYD9Db3lSHuKE/yltF0ughBxMR+SIeQnXWNd8d1fLxeAdIL991DxVRsRXwVTm68WCQaR4ShA== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 68f03aec-3f21-4c3e-897b-4c5c1c03e37f-2013-06-28 18:54:45Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=hveMZwFSfs1yjf5QsT2osQ== +
+
+ + + .SQLSERVERMANAGEMENT + hveMZwFSfs1yjf5QsT2osQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 5bb5f5c5-d9e9-d296-dcb0-a15030610d63 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:45 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'7203483a-c4fb-4304-9e9f-17c71c904f5d')/DimensionSettings</id><title type="text">DimensionSettings</title><updated>2013-06-28T18:54:45Z</updated><link rel="self" title="DimensionSettings" href="DimensionSettings" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/DimensionSettings(guid'765fbda3-73c9-4fad-996e-7c0e4e219f68')</id><category term="Microsoft.SqlServer.Management.Server.Domain.DimensionSetting" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="DimensionSetting" href="DimensionSettings(guid'765fbda3-73c9-4fad-996e-7c0e4e219f68')" /><title /><updated>2013-06-28T18:54:45Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">765fbda3-73c9-4fad-996e-7c0e4e219f68</d:Id><d:Name>P1</d:Name><d:Description>Resource capacity is reserved.</d:Description><d:Ordinal m:type="Edm.Byte">3</d:Ordinal><d:IsDefault m:type="Edm.Boolean">false</d:IsDefault></m:properties></content></entry></feed> +
+
+ + 2 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases()?$filter=Name%20eq%20'testdb2'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + KGuMwKdkAEAmekvfiuEPQANSeyL/gZiYn1bXDjIRJw8wvnqmaFSKIxIDi1W4P2zazf1n2i1TsBMpAQHbicAwS71Q/lTBbO+5MuIe+tX3D6s77uElAXVmkBBf+QDcHQ6PS1XVAcPp8ylyOVCx+tCHJ5rOBvfb168OAdheGjP/PT40Rhn0ANzrNwPzAqJql4kErC2BPLM0bumlXUkH+APhyt3C2afCqtIEPul6pnJtcpzSaEZlxEkpTqOJxYXAsqVPwLux9JKnDkUasBZ+4mwCAKL5/NbN+rmbNZjGKcTT+LpCU8n/xeaqZUJ9a5Wk5vtzroAW/gO+qoForVy7/uYhrCu7YoH164g+saqBAymh6tMUanaw9wLVTdRv8CC1TpGYx02kQrTTVvk72GIkABc6Bmaz+AVxri9Ehsg/DvqEtD6qYFGnggklovAd0PvPN8BHJfLxQSG3RAjyE3xTxariJM3zQmzspFA3zP1cIC4AtQ3FxOaFQrPNbdsN36rqDmzwbjoFR+Q9u9UXVd5b3OhvnobdncqQp/wxq+aEcgtrSpBPx5/rDUpor9rktuqdti77B0703BTtXk2HQS+b8ek2kvRs/qCFbCxN5Cxqk6rJb0InbeJsEG9McLOP6FhGTblIlQSwyrgR30MGjXKqX/Nj6x41+1F856afnHvCoax4FlyleQ6vVqbaPASDZX09CjNkqttGC0KDzF34MXaYD9Db3lSHuKE/yltF0ughBxMR+SIeQnXWNd8d1fLxeAdIL991DxVRsRXwVTm68WCQaR4ShA== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 68f03aec-3f21-4c3e-897b-4c5c1c03e37f-2013-06-28 18:54:45Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=hveMZwFSfs1yjf5QsT2osQ== +
+
+ + + .SQLSERVERMANAGEMENT + hveMZwFSfs1yjf5QsT2osQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 5bb5f5c5-d9e9-d296-dcb0-a15030610d63 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:45 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2013-06-28T18:54:45Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(5)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(5)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(5)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(5)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(5)/DatabaseCopies" /><title /><updated>2013-06-28T18:54:45Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">5</d:Id><d:Name>testdb2</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2013-06-28T18:54:45.12</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">5</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">5368709120</d:MaxSizeBytes><d:CollationName>Japanese_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2013-06-28T11:54:44.697</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2013-06-28T18:54:44.697Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /></m:properties></content></entry></feed> +
+
+ + 3 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + KGuMwKdkAEAmekvfiuEPQANSeyL/gZiYn1bXDjIRJw8wvnqmaFSKIxIDi1W4P2zazf1n2i1TsBMpAQHbicAwS71Q/lTBbO+5MuIe+tX3D6s77uElAXVmkBBf+QDcHQ6PS1XVAcPp8ylyOVCx+tCHJ5rOBvfb168OAdheGjP/PT40Rhn0ANzrNwPzAqJql4kErC2BPLM0bumlXUkH+APhyt3C2afCqtIEPul6pnJtcpzSaEZlxEkpTqOJxYXAsqVPwLux9JKnDkUasBZ+4mwCAKL5/NbN+rmbNZjGKcTT+LpCU8n/xeaqZUJ9a5Wk5vtzroAW/gO+qoForVy7/uYhrCu7YoH164g+saqBAymh6tMUanaw9wLVTdRv8CC1TpGYx02kQrTTVvk72GIkABc6Bmaz+AVxri9Ehsg/DvqEtD6qYFGnggklovAd0PvPN8BHJfLxQSG3RAjyE3xTxariJM3zQmzspFA3zP1cIC4AtQ3FxOaFQrPNbdsN36rqDmzwbjoFR+Q9u9UXVd5b3OhvnobdncqQp/wxq+aEcgtrSpBPx5/rDUpor9rktuqdti77B0703BTtXk2HQS+b8ek2kvRs/qCFbCxN5Cxqk6rJb0InbeJsEG9McLOP6FhGTblIlQSwyrgR30MGjXKqX/Nj6x41+1F856afnHvCoax4FlyleQ6vVqbaPASDZX09CjNkqttGC0KDzF34MXaYD9Db3lSHuKE/yltF0ughBxMR+SIeQnXWNd8d1fLxeAdIL991DxVRsRXwVTm68WCQaR4ShA== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 68f03aec-3f21-4c3e-897b-4c5c1c03e37f-2013-06-28 18:54:45Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=hveMZwFSfs1yjf5QsT2osQ== +
+
+ + + .SQLSERVERMANAGEMENT + hveMZwFSfs1yjf5QsT2osQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 5bb5f5c5-d9e9-d296-dcb0-a15030610d63 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:45 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2013-06-28T18:54:45Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Resource capacity is not reserved.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 4 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5) + MERGE + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + KGuMwKdkAEAmekvfiuEPQANSeyL/gZiYn1bXDjIRJw8wvnqmaFSKIxIDi1W4P2zazf1n2i1TsBMpAQHbicAwS71Q/lTBbO+5MuIe+tX3D6s77uElAXVmkBBf+QDcHQ6PS1XVAcPp8ylyOVCx+tCHJ5rOBvfb168OAdheGjP/PT40Rhn0ANzrNwPzAqJql4kErC2BPLM0bumlXUkH+APhyt3C2afCqtIEPul6pnJtcpzSaEZlxEkpTqOJxYXAsqVPwLux9JKnDkUasBZ+4mwCAKL5/NbN+rmbNZjGKcTT+LpCU8n/xeaqZUJ9a5Wk5vtzroAW/gO+qoForVy7/uYhrCu7YoH164g+saqBAymh6tMUanaw9wLVTdRv8CC1TpGYx02kQrTTVvk72GIkABc6Bmaz+AVxri9Ehsg/DvqEtD6qYFGnggklovAd0PvPN8BHJfLxQSG3RAjyE3xTxariJM3zQmzspFA3zP1cIC4AtQ3FxOaFQrPNbdsN36rqDmzwbjoFR+Q9u9UXVd5b3OhvnobdncqQp/wxq+aEcgtrSpBPx5/rDUpor9rktuqdti77B0703BTtXk2HQS+b8ek2kvRs/qCFbCxN5Cxqk6rJb0InbeJsEG9McLOP6FhGTblIlQSwyrgR30MGjXKqX/Nj6x41+1F856afnHvCoax4FlyleQ6vVqbaPASDZX09CjNkqttGC0KDzF34MXaYD9Db3lSHuKE/yltF0ughBxMR+SIeQnXWNd8d1fLxeAdIL991DxVRsRXwVTm68WCQaR4ShA== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 68f03aec-3f21-4c3e-897b-4c5c1c03e37f-2013-06-28 18:54:45Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=hveMZwFSfs1yjf5QsT2osQ== +
+
+ + + .SQLSERVERMANAGEMENT + hveMZwFSfs1yjf5QsT2osQ== + + + + + <?xml version="1.0" encoding="utf-8" standalone="yes"?> + <entry xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom"> + <category scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" term="Microsoft.SqlServer.Management.Server.Domain.Database" /> + <title /> + <author> + <name /> + </author> + <updated>2013-06-28T18:54:45.5007453Z</updated> + <id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)</id> + <content type="application/xml"> + <m:properties> + <d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId> + <d:CollationName>Japanese_CI_AS</d:CollationName> + <d:CreationDate m:type="Edm.DateTime">2013-06-28T11:54:44.697</d:CreationDate> + <d:Edition m:null="true" /> + <d:Id m:type="Edm.Int32">5</d:Id> + <d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember> + <d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot> + <d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn> + <d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /> + <d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly> + <d:IsRecursiveTriggersOn m:type="Edm.Boolean" m:null="true" /> + <d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject> + <d:MaxSizeBytes m:type="Edm.Int64">5368709120</d:MaxSizeBytes> + <d:MaxSizeGB m:type="Edm.Int32" m:null="true" /> + <d:Name>testdb2</d:Name> + <d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /> + <d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /> + <d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /> + <d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /> + <d:RecoveryPeriodStartDate m:type="Edm.DateTime">2013-06-28T18:54:44.697Z</d:RecoveryPeriodStartDate> + <d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode> + <d:ServiceObjectiveAssignmentErrorDescription m:null="true" /> + <d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState> + <d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription> + <d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2013-06-28T18:54:45.12</d:ServiceObjectiveAssignmentSuccessDate> + <d:ServiceObjectiveId m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:ServiceObjectiveId> + <d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB> + <d:Status m:type="Edm.Int32">1</d:Status> + </m:properties> + </content> + </entry> + + application/atom+xml + application/atom+xml,application/xml +
+ + NoContent + +
+ x-ms-request-id + 5bb5f5c5-d9e9-d296-dcb0-a15030610d63 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 1.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Fri, 28 Jun 2013 18:54:45 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 5 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases()?$filter=Name%20eq%20'testdb2'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + KGuMwKdkAEAmekvfiuEPQANSeyL/gZiYn1bXDjIRJw8wvnqmaFSKIxIDi1W4P2zazf1n2i1TsBMpAQHbicAwS71Q/lTBbO+5MuIe+tX3D6s77uElAXVmkBBf+QDcHQ6PS1XVAcPp8ylyOVCx+tCHJ5rOBvfb168OAdheGjP/PT40Rhn0ANzrNwPzAqJql4kErC2BPLM0bumlXUkH+APhyt3C2afCqtIEPul6pnJtcpzSaEZlxEkpTqOJxYXAsqVPwLux9JKnDkUasBZ+4mwCAKL5/NbN+rmbNZjGKcTT+LpCU8n/xeaqZUJ9a5Wk5vtzroAW/gO+qoForVy7/uYhrCu7YoH164g+saqBAymh6tMUanaw9wLVTdRv8CC1TpGYx02kQrTTVvk72GIkABc6Bmaz+AVxri9Ehsg/DvqEtD6qYFGnggklovAd0PvPN8BHJfLxQSG3RAjyE3xTxariJM3zQmzspFA3zP1cIC4AtQ3FxOaFQrPNbdsN36rqDmzwbjoFR+Q9u9UXVd5b3OhvnobdncqQp/wxq+aEcgtrSpBPx5/rDUpor9rktuqdti77B0703BTtXk2HQS+b8ek2kvRs/qCFbCxN5Cxqk6rJb0InbeJsEG9McLOP6FhGTblIlQSwyrgR30MGjXKqX/Nj6x41+1F856afnHvCoax4FlyleQ6vVqbaPASDZX09CjNkqttGC0KDzF34MXaYD9Db3lSHuKE/yltF0ughBxMR+SIeQnXWNd8d1fLxeAdIL991DxVRsRXwVTm68WCQaR4ShA== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 68f03aec-3f21-4c3e-897b-4c5c1c03e37f-2013-06-28 18:54:45Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=hveMZwFSfs1yjf5QsT2osQ== +
+
+ + + .SQLSERVERMANAGEMENT + hveMZwFSfs1yjf5QsT2osQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 5bb5f5c5-d9e9-d296-dcb0-a15030610d63 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:45 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2013-06-28T18:54:45Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(5)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(5)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(5)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(5)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(5)/DatabaseCopies" /><title /><updated>2013-06-28T18:54:45Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">5</d:Id><d:Name>testdb2</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">7203483a-c4fb-4304-9e9f-17c71c904f5d</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">0</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Pending</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2013-06-28T18:54:45.12</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">5</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">5368709120</d:MaxSizeBytes><d:CollationName>Japanese_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2013-06-28T11:54:44.697</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2013-06-28T18:54:44.697Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /></m:properties></content></entry></feed> +
+
+ + 6 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + KGuMwKdkAEAmekvfiuEPQANSeyL/gZiYn1bXDjIRJw8wvnqmaFSKIxIDi1W4P2zazf1n2i1TsBMpAQHbicAwS71Q/lTBbO+5MuIe+tX3D6s77uElAXVmkBBf+QDcHQ6PS1XVAcPp8ylyOVCx+tCHJ5rOBvfb168OAdheGjP/PT40Rhn0ANzrNwPzAqJql4kErC2BPLM0bumlXUkH+APhyt3C2afCqtIEPul6pnJtcpzSaEZlxEkpTqOJxYXAsqVPwLux9JKnDkUasBZ+4mwCAKL5/NbN+rmbNZjGKcTT+LpCU8n/xeaqZUJ9a5Wk5vtzroAW/gO+qoForVy7/uYhrCu7YoH164g+saqBAymh6tMUanaw9wLVTdRv8CC1TpGYx02kQrTTVvk72GIkABc6Bmaz+AVxri9Ehsg/DvqEtD6qYFGnggklovAd0PvPN8BHJfLxQSG3RAjyE3xTxariJM3zQmzspFA3zP1cIC4AtQ3FxOaFQrPNbdsN36rqDmzwbjoFR+Q9u9UXVd5b3OhvnobdncqQp/wxq+aEcgtrSpBPx5/rDUpor9rktuqdti77B0703BTtXk2HQS+b8ek2kvRs/qCFbCxN5Cxqk6rJb0InbeJsEG9McLOP6FhGTblIlQSwyrgR30MGjXKqX/Nj6x41+1F856afnHvCoax4FlyleQ6vVqbaPASDZX09CjNkqttGC0KDzF34MXaYD9Db3lSHuKE/yltF0ughBxMR+SIeQnXWNd8d1fLxeAdIL991DxVRsRXwVTm68WCQaR4ShA== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 68f03aec-3f21-4c3e-897b-4c5c1c03e37f-2013-06-28 18:54:45Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=hveMZwFSfs1yjf5QsT2osQ== +
+
+ + + .SQLSERVERMANAGEMENT + hveMZwFSfs1yjf5QsT2osQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 5bb5f5c5-d9e9-d296-dcb0-a15030610d63 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:54:45 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2013-06-28T18:54:45Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Resource capacity is not reserved.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+
+
+ + UnitTest.Common.RemoveTestDatabasesWithSqlAuth + + + 0 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases()?$filter=Name%20eq%20'testdb1'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + QUEHI+CeF7bu0N0bUz2v1JuXPrKljYQ+mhLLC5PJeh4YX9psW8ACYgZEjgeqOGd8E7kme+QFhKrJHlnK9LKubXIQnsdDxOpXWtBXcXeV3DvaTerIQte1eFvCXhfBRhWnGN9ysNJY6d2b7zY8aIVRGO8oWPQ1L1vizlvM53Mjo2d+M+IY6s2H2KE7Oe80G74SEnsv5BLSu8mCdt+aifn4IoNl6T658QTYAv7oX2Gz4z80N8PHswynFBOmtQNW/1R0jFQCdGjUgnmodkf8Da8afyH96JTONe+cx+ve0HlPtIlC2YKr5ohJg6PTgXuJvaMtaDFaeyl0WsLymBCUqQpoz1zUDHpCPub8Vdin/TqLR7FMfixnZUF6aEoI9bH6R7+OzJQj9409xGNJx2ZdpEw0cCMazLV2HH5kIk98e3s91j2vOjYIT511ugp6dUEJ9fU2cQxEvwlVwPcivrm4FLPKuL/XoihgWdgx8zBID1lkW81saHKMfAZHF0f+riC2wiSkpIkdp/cjk8KG8xdbs1zwjAcRFRlGiMtqnX1OIOZvP5Gcdzi/MkO8njJJyTJZuKTraO/bzDtkeLyC272o+UOB+4IMCjDiDSPtCFYeblqqFZKxBmDKTYu9snoCi0CHF3b7gSOtn3EqgWCte5Fe5B5fDhN8+UT2GZ0y+6u6i6dL8bSHKLNdAMX/z4ilncQR5t0bBM9Ry77XRs/pN1tnE65mZ9oxCd/I3SpTUxFhO2ZJWb9OcTVDVnEspappAUYpYXN+qJBnzfCvcNYynfyQxdUbgA== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 9f1a8dee-d3b9-43a9-a3a5-a78ea42c9b54-2013-06-28 18:55:03Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=6wHW7S6FaCJ0zkOt7dw6PA== +
+
+ + + .SQLSERVERMANAGEMENT + 6wHW7S6FaCJ0zkOt7dw6PA== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + fbbd93c8-3d3a-8ef2-a7f2-918558547429 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:55:03 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2013-06-28T18:55:03Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(4)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(4)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(4)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(4)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(4)/DatabaseCopies" /><title /><updated>2013-06-28T18:55:03Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">4</d:Id><d:Name>testdb1</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2013-06-28T18:55:01.64</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">1</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">1073741824</d:MaxSizeBytes><d:CollationName>SQL_Latin1_General_CP1_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2013-06-28T11:55:03.02</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2013-06-28T18:55:03.02Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /></m:properties></content></entry></feed> +
+
+ + 1 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + QUEHI+CeF7bu0N0bUz2v1JuXPrKljYQ+mhLLC5PJeh4YX9psW8ACYgZEjgeqOGd8E7kme+QFhKrJHlnK9LKubXIQnsdDxOpXWtBXcXeV3DvaTerIQte1eFvCXhfBRhWnGN9ysNJY6d2b7zY8aIVRGO8oWPQ1L1vizlvM53Mjo2d+M+IY6s2H2KE7Oe80G74SEnsv5BLSu8mCdt+aifn4IoNl6T658QTYAv7oX2Gz4z80N8PHswynFBOmtQNW/1R0jFQCdGjUgnmodkf8Da8afyH96JTONe+cx+ve0HlPtIlC2YKr5ohJg6PTgXuJvaMtaDFaeyl0WsLymBCUqQpoz1zUDHpCPub8Vdin/TqLR7FMfixnZUF6aEoI9bH6R7+OzJQj9409xGNJx2ZdpEw0cCMazLV2HH5kIk98e3s91j2vOjYIT511ugp6dUEJ9fU2cQxEvwlVwPcivrm4FLPKuL/XoihgWdgx8zBID1lkW81saHKMfAZHF0f+riC2wiSkpIkdp/cjk8KG8xdbs1zwjAcRFRlGiMtqnX1OIOZvP5Gcdzi/MkO8njJJyTJZuKTraO/bzDtkeLyC272o+UOB+4IMCjDiDSPtCFYeblqqFZKxBmDKTYu9snoCi0CHF3b7gSOtn3EqgWCte5Fe5B5fDhN8+UT2GZ0y+6u6i6dL8bSHKLNdAMX/z4ilncQR5t0bBM9Ry77XRs/pN1tnE65mZ9oxCd/I3SpTUxFhO2ZJWb9OcTVDVnEspappAUYpYXN+qJBnzfCvcNYynfyQxdUbgA== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 9f1a8dee-d3b9-43a9-a3a5-a78ea42c9b54-2013-06-28 18:55:03Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=6wHW7S6FaCJ0zkOt7dw6PA== +
+
+ + + .SQLSERVERMANAGEMENT + 6wHW7S6FaCJ0zkOt7dw6PA== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + fbbd93c8-3d3a-8ef2-a7f2-918558547429 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:55:03 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2013-06-28T18:55:03Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Resource capacity is not reserved.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 2 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(4) + DELETE + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + QUEHI+CeF7bu0N0bUz2v1JuXPrKljYQ+mhLLC5PJeh4YX9psW8ACYgZEjgeqOGd8E7kme+QFhKrJHlnK9LKubXIQnsdDxOpXWtBXcXeV3DvaTerIQte1eFvCXhfBRhWnGN9ysNJY6d2b7zY8aIVRGO8oWPQ1L1vizlvM53Mjo2d+M+IY6s2H2KE7Oe80G74SEnsv5BLSu8mCdt+aifn4IoNl6T658QTYAv7oX2Gz4z80N8PHswynFBOmtQNW/1R0jFQCdGjUgnmodkf8Da8afyH96JTONe+cx+ve0HlPtIlC2YKr5ohJg6PTgXuJvaMtaDFaeyl0WsLymBCUqQpoz1zUDHpCPub8Vdin/TqLR7FMfixnZUF6aEoI9bH6R7+OzJQj9409xGNJx2ZdpEw0cCMazLV2HH5kIk98e3s91j2vOjYIT511ugp6dUEJ9fU2cQxEvwlVwPcivrm4FLPKuL/XoihgWdgx8zBID1lkW81saHKMfAZHF0f+riC2wiSkpIkdp/cjk8KG8xdbs1zwjAcRFRlGiMtqnX1OIOZvP5Gcdzi/MkO8njJJyTJZuKTraO/bzDtkeLyC272o+UOB+4IMCjDiDSPtCFYeblqqFZKxBmDKTYu9snoCi0CHF3b7gSOtn3EqgWCte5Fe5B5fDhN8+UT2GZ0y+6u6i6dL8bSHKLNdAMX/z4ilncQR5t0bBM9Ry77XRs/pN1tnE65mZ9oxCd/I3SpTUxFhO2ZJWb9OcTVDVnEspappAUYpYXN+qJBnzfCvcNYynfyQxdUbgA== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 9f1a8dee-d3b9-43a9-a3a5-a78ea42c9b54-2013-06-28 18:55:03Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=6wHW7S6FaCJ0zkOt7dw6PA== +
+
+ + + .SQLSERVERMANAGEMENT + 6wHW7S6FaCJ0zkOt7dw6PA== + + + + + application/atom+xml + application/atom+xml,application/xml +
+ + NoContent + +
+ x-ms-request-id + fbbd93c8-3d3a-8ef2-a7f2-918558547429 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 1.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Fri, 28 Jun 2013 18:55:03 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 3 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases()?$filter=Name%20eq%20'testdb2'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + QUEHI+CeF7bu0N0bUz2v1JuXPrKljYQ+mhLLC5PJeh4YX9psW8ACYgZEjgeqOGd8E7kme+QFhKrJHlnK9LKubXIQnsdDxOpXWtBXcXeV3DvaTerIQte1eFvCXhfBRhWnGN9ysNJY6d2b7zY8aIVRGO8oWPQ1L1vizlvM53Mjo2d+M+IY6s2H2KE7Oe80G74SEnsv5BLSu8mCdt+aifn4IoNl6T658QTYAv7oX2Gz4z80N8PHswynFBOmtQNW/1R0jFQCdGjUgnmodkf8Da8afyH96JTONe+cx+ve0HlPtIlC2YKr5ohJg6PTgXuJvaMtaDFaeyl0WsLymBCUqQpoz1zUDHpCPub8Vdin/TqLR7FMfixnZUF6aEoI9bH6R7+OzJQj9409xGNJx2ZdpEw0cCMazLV2HH5kIk98e3s91j2vOjYIT511ugp6dUEJ9fU2cQxEvwlVwPcivrm4FLPKuL/XoihgWdgx8zBID1lkW81saHKMfAZHF0f+riC2wiSkpIkdp/cjk8KG8xdbs1zwjAcRFRlGiMtqnX1OIOZvP5Gcdzi/MkO8njJJyTJZuKTraO/bzDtkeLyC272o+UOB+4IMCjDiDSPtCFYeblqqFZKxBmDKTYu9snoCi0CHF3b7gSOtn3EqgWCte5Fe5B5fDhN8+UT2GZ0y+6u6i6dL8bSHKLNdAMX/z4ilncQR5t0bBM9Ry77XRs/pN1tnE65mZ9oxCd/I3SpTUxFhO2ZJWb9OcTVDVnEspappAUYpYXN+qJBnzfCvcNYynfyQxdUbgA== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 9f1a8dee-d3b9-43a9-a3a5-a78ea42c9b54-2013-06-28 18:55:03Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=6wHW7S6FaCJ0zkOt7dw6PA== +
+
+ + + .SQLSERVERMANAGEMENT + 6wHW7S6FaCJ0zkOt7dw6PA== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + fbbd93c8-3d3a-8ef2-a7f2-918558547429 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:55:03 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases</id><title type="text">Databases</title><updated>2013-06-28T18:55:03Z</updated><link rel="self" title="Databases" href="Databases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)</id><category term="Microsoft.SqlServer.Management.Server.Domain.Database" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="Database" href="Databases(5)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Server" type="application/atom+xml;type=entry" title="Server" href="Databases(5)/Server" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ServiceObjective" type="application/atom+xml;type=entry" title="ServiceObjective" href="Databases(5)/ServiceObjective" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseMetrics" type="application/atom+xml;type=entry" title="DatabaseMetrics" href="Databases(5)/DatabaseMetrics" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DatabaseCopies" type="application/atom+xml;type=feed" title="DatabaseCopies" href="Databases(5)/DatabaseCopies" /><title /><updated>2013-06-28T18:55:03Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">5</d:Id><d:Name>testdb2</d:Name><d:ServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:ServiceObjectiveId><d:AssignedServiceObjectiveId m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:AssignedServiceObjectiveId><d:ServiceObjectiveAssignmentState m:type="Edm.Byte">1</d:ServiceObjectiveAssignmentState><d:ServiceObjectiveAssignmentStateDescription>Complete</d:ServiceObjectiveAssignmentStateDescription><d:ServiceObjectiveAssignmentErrorCode m:type="Edm.Int32">0</d:ServiceObjectiveAssignmentErrorCode><d:ServiceObjectiveAssignmentErrorDescription m:null="true" /><d:ServiceObjectiveAssignmentSuccessDate m:type="Edm.DateTime">2013-06-28T18:55:02.163</d:ServiceObjectiveAssignmentSuccessDate><d:Edition>Web</d:Edition><d:MaxSizeGB m:type="Edm.Int32">5</d:MaxSizeGB><d:MaxSizeBytes m:type="Edm.Int64">5368709120</d:MaxSizeBytes><d:CollationName>Japanese_CI_AS</d:CollationName><d:CreationDate m:type="Edm.DateTime">2013-06-28T11:55:01.81</d:CreationDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2013-06-28T18:55:01.81Z</d:RecoveryPeriodStartDate><d:IsSystemObject m:type="Edm.Boolean">false</d:IsSystemObject><d:Status m:type="Edm.Int32">1</d:Status><d:IsFederationRoot m:type="Edm.Boolean">false</d:IsFederationRoot><d:SizeMB m:type="Edm.Decimal">-1.00</d:SizeMB><d:IsRecursiveTriggersOn m:type="Edm.Boolean">false</d:IsRecursiveTriggersOn><d:IsReadOnly m:type="Edm.Boolean">false</d:IsReadOnly><d:IsFederationMember m:type="Edm.Boolean">false</d:IsFederationMember><d:IsQueryStoreOn m:type="Edm.Boolean">false</d:IsQueryStoreOn><d:IsQueryStoreReadOnly m:type="Edm.Boolean" m:null="true" /><d:QueryStoreMaxSizeMB m:type="Edm.Int32" m:null="true" /><d:QueryStoreFlushPeriodSeconds m:type="Edm.Int32" m:null="true" /><d:QueryStoreIntervalLengthMinutes m:type="Edm.Int32" m:null="true" /><d:QueryStoreClearAll m:type="Edm.Boolean" m:null="true" /></m:properties></content></entry></feed> +
+
+ + 4 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5)/ServiceObjective + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + QUEHI+CeF7bu0N0bUz2v1JuXPrKljYQ+mhLLC5PJeh4YX9psW8ACYgZEjgeqOGd8E7kme+QFhKrJHlnK9LKubXIQnsdDxOpXWtBXcXeV3DvaTerIQte1eFvCXhfBRhWnGN9ysNJY6d2b7zY8aIVRGO8oWPQ1L1vizlvM53Mjo2d+M+IY6s2H2KE7Oe80G74SEnsv5BLSu8mCdt+aifn4IoNl6T658QTYAv7oX2Gz4z80N8PHswynFBOmtQNW/1R0jFQCdGjUgnmodkf8Da8afyH96JTONe+cx+ve0HlPtIlC2YKr5ohJg6PTgXuJvaMtaDFaeyl0WsLymBCUqQpoz1zUDHpCPub8Vdin/TqLR7FMfixnZUF6aEoI9bH6R7+OzJQj9409xGNJx2ZdpEw0cCMazLV2HH5kIk98e3s91j2vOjYIT511ugp6dUEJ9fU2cQxEvwlVwPcivrm4FLPKuL/XoihgWdgx8zBID1lkW81saHKMfAZHF0f+riC2wiSkpIkdp/cjk8KG8xdbs1zwjAcRFRlGiMtqnX1OIOZvP5Gcdzi/MkO8njJJyTJZuKTraO/bzDtkeLyC272o+UOB+4IMCjDiDSPtCFYeblqqFZKxBmDKTYu9snoCi0CHF3b7gSOtn3EqgWCte5Fe5B5fDhN8+UT2GZ0y+6u6i6dL8bSHKLNdAMX/z4ilncQR5t0bBM9Ry77XRs/pN1tnE65mZ9oxCd/I3SpTUxFhO2ZJWb9OcTVDVnEspappAUYpYXN+qJBnzfCvcNYynfyQxdUbgA== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 9f1a8dee-d3b9-43a9-a3a5-a78ea42c9b54-2013-06-28 18:55:03Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=6wHW7S6FaCJ0zkOt7dw6PA== +
+
+ + + .SQLSERVERMANAGEMENT + 6wHW7S6FaCJ0zkOt7dw6PA== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + fbbd93c8-3d3a-8ef2-a7f2-918558547429 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=entry;charset=utf-8 +
+
+ Date + Fri, 28 Jun 2013 18:55:03 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><entry xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')</id><category term="Microsoft.SqlServer.Management.Server.Domain.ServiceObjective" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ServiceObjective" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/DimensionSettings" type="application/atom+xml;type=feed" title="DimensionSettings" href="ServiceObjectives(guid'910b4fcb-8a29-4c3e-958f-f7ba794388b2')/DimensionSettings" /><title /><updated>2013-06-28T18:55:03Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Guid">910b4fcb-8a29-4c3e-958f-f7ba794388b2</d:Id><d:Name>Shared</d:Name><d:Description>Resource capacity is not reserved.</d:Description><d:IsDefault m:type="Edm.Boolean">true</d:IsDefault><d:IsSystem m:type="Edm.Boolean">false</d:IsSystem><d:Enabled m:type="Edm.Boolean">true</d:Enabled></m:properties></content></entry> +
+
+ + 5 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/Databases(5) + DELETE + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + QUEHI+CeF7bu0N0bUz2v1JuXPrKljYQ+mhLLC5PJeh4YX9psW8ACYgZEjgeqOGd8E7kme+QFhKrJHlnK9LKubXIQnsdDxOpXWtBXcXeV3DvaTerIQte1eFvCXhfBRhWnGN9ysNJY6d2b7zY8aIVRGO8oWPQ1L1vizlvM53Mjo2d+M+IY6s2H2KE7Oe80G74SEnsv5BLSu8mCdt+aifn4IoNl6T658QTYAv7oX2Gz4z80N8PHswynFBOmtQNW/1R0jFQCdGjUgnmodkf8Da8afyH96JTONe+cx+ve0HlPtIlC2YKr5ohJg6PTgXuJvaMtaDFaeyl0WsLymBCUqQpoz1zUDHpCPub8Vdin/TqLR7FMfixnZUF6aEoI9bH6R7+OzJQj9409xGNJx2ZdpEw0cCMazLV2HH5kIk98e3s91j2vOjYIT511ugp6dUEJ9fU2cQxEvwlVwPcivrm4FLPKuL/XoihgWdgx8zBID1lkW81saHKMfAZHF0f+riC2wiSkpIkdp/cjk8KG8xdbs1zwjAcRFRlGiMtqnX1OIOZvP5Gcdzi/MkO8njJJyTJZuKTraO/bzDtkeLyC272o+UOB+4IMCjDiDSPtCFYeblqqFZKxBmDKTYu9snoCi0CHF3b7gSOtn3EqgWCte5Fe5B5fDhN8+UT2GZ0y+6u6i6dL8bSHKLNdAMX/z4ilncQR5t0bBM9Ry77XRs/pN1tnE65mZ9oxCd/I3SpTUxFhO2ZJWb9OcTVDVnEspappAUYpYXN+qJBnzfCvcNYynfyQxdUbgA== +
+
+ x-ms-client-session-id + 9773bc04-827f-4ef7-9332-fbb87ead8126-2013-06-28 18:54:39Z +
+
+ x-ms-client-request-id + 9f1a8dee-d3b9-43a9-a3a5-a78ea42c9b54-2013-06-28 18:55:03Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=6wHW7S6FaCJ0zkOt7dw6PA== +
+
+ + + .SQLSERVERMANAGEMENT + 6wHW7S6FaCJ0zkOt7dw6PA== + + + + + application/atom+xml + application/atom+xml,application/xml +
+ + NoContent + +
+ x-ms-request-id + fbbd93c8-3d3a-8ef2-a7f2-918558547429 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 1.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Fri, 28 Jun 2013 18:55:03 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+
+
+ + UnitTest.AzureSqlDatabaseServerV2Tests + + + 0 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 WindowsAzurePowershell/v0.7.3.1 + +
+ x-ms-version + 2012-03-01 +
+
+ + + <Server xmlns="http://schemas.microsoft.com/sqlazure/2010/12/"> + <AdministratorLogin>mylogin</AdministratorLogin> + <AdministratorLoginPassword>Pa$$w0rd!</AdministratorLoginPassword> + <Location>East Asia</Location> + <Version>2.0</Version> + </Server> + + application/xml + +
+ + Created + +
+ x-ms-request-id + a90a75b8-9492-43e9-8664-7a592efdc653 +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Mon, 17 Mar 2014 19:33:58 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServerName FullyQualifiedDomainName="m4mfnkbsoc.database.windows.net" xmlns="http://schemas.microsoft.com/sqlazure/2010/12/">m4mfnkbsoc</ServerName> +
+
+ + 1 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 WindowsAzurePowershell/v0.7.3.1 + +
+ x-ms-version + 2012-03-01 +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 69f2f0ae-fe41-4b2a-bbe4-136e4bd3e94f +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Mon, 17 Mar 2014 19:33:58 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + + <Servers xmlns="http://schemas.microsoft.com/sqlazure/2010/12/"> + <Server> + <Name>m4mfnkbsoc</Name> + <AdministratorLogin>mylogin</AdministratorLogin> + <Location>East Asia</Location> + <FullyQualifiedDomainName>m4mfnkbsoc.database.windows.net</FullyQualifiedDomainName> + <Version>2.0</Version> + </Server> + </Servers> + +
+
+ + 2 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/m4mfnkbsoc + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 WindowsAzurePowershell/v0.7.3.1 + +
+ x-ms-version + 2012-03-01 +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 47268585-f7ef-4caa-b671-6b01343a7c7e +
+
+ Date + Mon, 17 Mar 2014 19:34:01 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 3 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 WindowsAzurePowershell/v0.7.3.1 + +
+ x-ms-version + 2012-03-01 +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 1c962199-46ba-4c3f-b9d8-c65db05ee4df +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Mon, 17 Mar 2014 19:34:01 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <Servers xmlns="http://schemas.microsoft.com/sqlazure/2010/12/" /> +
+
+
+
+ + UnitTest.AzureSqlDatabaseEditionsTests + + + 49 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbeditions3 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + e6923fa8-1a85-43a2-b0a9-e8dc912db38f-2014-07-01 19:16:51Z +
+
+ x-ms-client-request-id + bc51eb92-1bd0-447a-bc49-9cec46602092-2014-07-01 19:17:16Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 05291e86-f492-42ce-bc56-ea419a27dd58 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 19:17:16 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbeditions3</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions3</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>6</Id><Edition>Basic</Edition><MaxSizeGB>0</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-01T19:16:57.5870000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>104857600</MaxSizeBytes><ServiceObjectiveId>dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</ServiceObjectiveId><AssignedServiceObjectiveId>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>0</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Pending</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-01T19:16:58.7430000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-01T19:17:57.5070000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 50 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/dd6d99bb-f193-4ec1-86f2-43d3bccbc49c + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + e6923fa8-1a85-43a2-b0a9-e8dc912db38f-2014-07-01 19:16:51Z +
+
+ x-ms-client-request-id + 133fe92f-024a-43d4-9052-ba377cc605f2-2014-07-01 19:17:16Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 845166ff-b714-457f-8db1-ca4ea43e50df +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 19:17:16 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Basic</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Basic resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Basic</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/3a2b7a50-065b-4c55-921d-c0ca49e174d3</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>3a2b7a50-065b-4c55-921d-c0ca49e174d3</Id><Description>Basic resource allocation.</Description><Ordinal>3</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 51 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbeditions3 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + e6923fa8-1a85-43a2-b0a9-e8dc912db38f-2014-07-01 19:16:51Z +
+
+ x-ms-client-request-id + 785314de-3f57-47dc-828a-7bf074c1ec40-2014-07-01 19:17:18Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 0c5a83e7-ed6b-499e-95ab-d2bfaaa49763 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 19:17:18 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbeditions3</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions3</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>6</Id><Edition>Basic</Edition><MaxSizeGB>0</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-01T19:16:57.5870000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>104857600</MaxSizeBytes><ServiceObjectiveId>dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</ServiceObjectiveId><AssignedServiceObjectiveId>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>0</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Pending</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-01T19:16:58.7430000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-01T19:17:57.5070000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 52 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/dd6d99bb-f193-4ec1-86f2-43d3bccbc49c + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + e6923fa8-1a85-43a2-b0a9-e8dc912db38f-2014-07-01 19:16:51Z +
+
+ x-ms-client-request-id + 84659e5b-036e-4a02-8783-4761f441fa49-2014-07-01 19:17:18Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + d8790c21-a81a-4103-92ec-ba03185baefc +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 19:17:18 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Basic</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Basic resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Basic</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/3a2b7a50-065b-4c55-921d-c0ca49e174d3</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>3a2b7a50-065b-4c55-921d-c0ca49e174d3</Id><Description>Basic resource allocation.</Description><Ordinal>3</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 53 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbeditions3 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + e6923fa8-1a85-43a2-b0a9-e8dc912db38f-2014-07-01 19:16:51Z +
+
+ x-ms-client-request-id + b27c8f65-b923-4eaa-b340-edc24000eb56-2014-07-01 19:17:19Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 7dae9bbc-c813-4ab5-8811-4a0ab11642a6 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 19:17:19 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbeditions3</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions3</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>6</Id><Edition>Basic</Edition><MaxSizeGB>0</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-01T19:16:57.5870000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>104857600</MaxSizeBytes><ServiceObjectiveId>dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</ServiceObjectiveId><AssignedServiceObjectiveId>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>0</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Pending</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-01T19:16:58.7430000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-01T19:17:57.5070000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 54 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/dd6d99bb-f193-4ec1-86f2-43d3bccbc49c + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + e6923fa8-1a85-43a2-b0a9-e8dc912db38f-2014-07-01 19:16:51Z +
+
+ x-ms-client-request-id + beacce30-e3c1-4429-8a00-86d8ef6dbb21-2014-07-01 19:17:19Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + e5f3a575-c351-44bb-8874-c38b6f991d43 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 19:17:19 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Basic</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Basic resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Basic</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/3a2b7a50-065b-4c55-921d-c0ca49e174d3</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>3a2b7a50-065b-4c55-921d-c0ca49e174d3</Id><Description>Basic resource allocation.</Description><Ordinal>3</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 55 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbeditions3 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + e6923fa8-1a85-43a2-b0a9-e8dc912db38f-2014-07-01 19:16:51Z +
+
+ x-ms-client-request-id + da8e6a57-49b3-41a6-bd5b-3269d0b6fc8a-2014-07-01 19:17:20Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + d7e4e07e-2167-45dc-96ba-dcd2b82f132f +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 19:17:20 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbeditions3</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions3</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>6</Id><Edition>Basic</Edition><MaxSizeGB>0</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-01T19:16:57.5870000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>104857600</MaxSizeBytes><ServiceObjectiveId>dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</ServiceObjectiveId><AssignedServiceObjectiveId>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>0</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Pending</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-01T19:16:58.7430000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-01T19:17:57.5070000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 56 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/dd6d99bb-f193-4ec1-86f2-43d3bccbc49c + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + e6923fa8-1a85-43a2-b0a9-e8dc912db38f-2014-07-01 19:16:51Z +
+
+ x-ms-client-request-id + b71f363b-99ba-49c7-be02-7e3bff929298-2014-07-01 19:17:20Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 92e925e5-3448-4873-bd32-4e454328cbf6 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 19:17:20 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Basic</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Basic resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Basic</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/3a2b7a50-065b-4c55-921d-c0ca49e174d3</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>3a2b7a50-065b-4c55-921d-c0ca49e174d3</Id><Description>Basic resource allocation.</Description><Ordinal>3</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 57 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbeditions3 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + e6923fa8-1a85-43a2-b0a9-e8dc912db38f-2014-07-01 19:16:51Z +
+
+ x-ms-client-request-id + 332339f0-a37c-4f52-a05a-e38c22ad06a0-2014-07-01 19:17:21Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 5303f70a-655b-425c-b8a1-4a21cf1005e1 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 19:17:21 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbeditions3</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions3</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>6</Id><Edition>Basic</Edition><MaxSizeGB>0</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-01T19:16:57.5870000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>104857600</MaxSizeBytes><ServiceObjectiveId>dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</ServiceObjectiveId><AssignedServiceObjectiveId>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>0</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Pending</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-01T19:16:58.7430000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-01T19:17:57.5070000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 58 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/dd6d99bb-f193-4ec1-86f2-43d3bccbc49c + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + e6923fa8-1a85-43a2-b0a9-e8dc912db38f-2014-07-01 19:16:51Z +
+
+ x-ms-client-request-id + 8aa53d53-c458-4766-b807-98822422e251-2014-07-01 19:17:21Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 8b2d8c32-0ffe-41f0-b517-17737254cb42 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 19:17:21 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Basic</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Basic resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Basic</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/3a2b7a50-065b-4c55-921d-c0ca49e174d3</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>3a2b7a50-065b-4c55-921d-c0ca49e174d3</Id><Description>Basic resource allocation.</Description><Ordinal>3</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 59 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbeditions3 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + e6923fa8-1a85-43a2-b0a9-e8dc912db38f-2014-07-01 19:16:51Z +
+
+ x-ms-client-request-id + 2ef3e46f-4251-4a2c-9ff2-5679629b73fa-2014-07-01 19:17:22Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + fa1ad1df-e03b-4c61-8756-fe8dabf106bb +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 19:17:22 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbeditions3</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions3</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>6</Id><Edition>Basic</Edition><MaxSizeGB>0</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-01T19:16:57.5870000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>104857600</MaxSizeBytes><ServiceObjectiveId>dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</ServiceObjectiveId><AssignedServiceObjectiveId>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>0</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Pending</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-01T19:16:58.7430000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-01T19:17:57.5070000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 60 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/dd6d99bb-f193-4ec1-86f2-43d3bccbc49c + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + e6923fa8-1a85-43a2-b0a9-e8dc912db38f-2014-07-01 19:16:51Z +
+
+ x-ms-client-request-id + 7df71c96-54d7-4150-abfd-097fc4edf39f-2014-07-01 19:17:22Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + a7e86ef1-5ee5-4774-b259-901facf8f22a +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 19:17:22 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Basic</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Basic resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Basic</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/3a2b7a50-065b-4c55-921d-c0ca49e174d3</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>3a2b7a50-065b-4c55-921d-c0ca49e174d3</Id><Description>Basic resource allocation.</Description><Ordinal>3</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 61 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbeditions3 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + e6923fa8-1a85-43a2-b0a9-e8dc912db38f-2014-07-01 19:16:51Z +
+
+ x-ms-client-request-id + 6584335f-3983-4f4d-b8bd-5139403e9338-2014-07-01 19:17:23Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 2f71b129-e7a0-45fe-93b6-58a22d788fad +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 19:17:23 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbeditions3</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions3</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>6</Id><Edition>Basic</Edition><MaxSizeGB>0</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-01T19:16:57.5870000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>104857600</MaxSizeBytes><ServiceObjectiveId>dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</ServiceObjectiveId><AssignedServiceObjectiveId>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>0</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Pending</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-01T19:16:58.7430000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-01T19:17:57.5070000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 62 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/dd6d99bb-f193-4ec1-86f2-43d3bccbc49c + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + e6923fa8-1a85-43a2-b0a9-e8dc912db38f-2014-07-01 19:16:51Z +
+
+ x-ms-client-request-id + 45b03857-7fa4-4459-af05-718fcd15b1fb-2014-07-01 19:17:23Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 67b3f8c6-18d0-445a-8be8-bc52fd79a722 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 19:17:23 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Basic</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Basic resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Basic</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/3a2b7a50-065b-4c55-921d-c0ca49e174d3</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>3a2b7a50-065b-4c55-921d-c0ca49e174d3</Id><Description>Basic resource allocation.</Description><Ordinal>3</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 63 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbeditions3 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + e6923fa8-1a85-43a2-b0a9-e8dc912db38f-2014-07-01 19:16:51Z +
+
+ x-ms-client-request-id + 0ff88cbf-0150-40ed-a138-6c903f5a3f73-2014-07-01 19:17:24Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + f36557d9-7e5c-4b33-a2f0-40e6037d15f2 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 19:17:24 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbeditions3</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions3</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>6</Id><Edition>Basic</Edition><MaxSizeGB>0</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-01T19:16:57.5870000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>104857600</MaxSizeBytes><ServiceObjectiveId>dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</ServiceObjectiveId><AssignedServiceObjectiveId>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>0</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Pending</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-01T19:16:58.7430000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-01T19:17:57.5070000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 64 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/dd6d99bb-f193-4ec1-86f2-43d3bccbc49c + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + e6923fa8-1a85-43a2-b0a9-e8dc912db38f-2014-07-01 19:16:51Z +
+
+ x-ms-client-request-id + 7a7386c7-7af3-4a43-973b-c43b8529391d-2014-07-01 19:17:24Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + abf84cf0-fd01-40af-ab51-405f6da21022 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 19:17:24 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Basic</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Basic resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Basic</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/3a2b7a50-065b-4c55-921d-c0ca49e174d3</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>3a2b7a50-065b-4c55-921d-c0ca49e174d3</Id><Description>Basic resource allocation.</Description><Ordinal>3</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 65 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbeditions3 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + e6923fa8-1a85-43a2-b0a9-e8dc912db38f-2014-07-01 19:16:51Z +
+
+ x-ms-client-request-id + 3639d3f8-2ebd-4220-8c7c-5dbaa0c801d8-2014-07-01 19:17:26Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 51c68abd-3438-4600-bf9f-0e488cde9f88 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 19:17:26 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbeditions3</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions3</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>6</Id><Edition>Basic</Edition><MaxSizeGB>0</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-01T19:16:57.5870000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>104857600</MaxSizeBytes><ServiceObjectiveId>dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</ServiceObjectiveId><AssignedServiceObjectiveId>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>0</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Pending</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-01T19:16:58.7430000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-01T19:17:57.5070000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 66 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/dd6d99bb-f193-4ec1-86f2-43d3bccbc49c + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + e6923fa8-1a85-43a2-b0a9-e8dc912db38f-2014-07-01 19:16:51Z +
+
+ x-ms-client-request-id + 8222fbb5-55ef-455b-868f-aead32ec2c41-2014-07-01 19:17:26Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + eab8f004-1d17-42de-a142-f8e738058595 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 19:17:26 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Basic</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Basic resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Basic</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/3a2b7a50-065b-4c55-921d-c0ca49e174d3</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>3a2b7a50-065b-4c55-921d-c0ca49e174d3</Id><Description>Basic resource allocation.</Description><Ordinal>3</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 67 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbeditions3 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + e6923fa8-1a85-43a2-b0a9-e8dc912db38f-2014-07-01 19:16:51Z +
+
+ x-ms-client-request-id + add9497a-c59b-4c6d-b5c9-4bdb7475094c-2014-07-01 19:17:27Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 0f9c9cdb-dfb1-4b9d-b579-7a6b7e2724d8 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 19:17:27 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbeditions3</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions3</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>6</Id><Edition>Standard</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-01T19:16:57.5870000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</ServiceObjectiveId><AssignedServiceObjectiveId>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-01T19:17:26.1630000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-01T19:17:57.5070000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 68 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/1b1ebd4d-d903-4baa-97f9-4ea675f5e928 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + e6923fa8-1a85-43a2-b0a9-e8dc912db38f-2014-07-01 19:16:51Z +
+
+ x-ms-client-request-id + 289ef4f6-ff2d-4980-8654-d6ce1830e5d4-2014-07-01 19:17:27Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + f7a405a5-69ae-4082-96f0-316715abbaaa +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 19:17:27 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>S1</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/1b1ebd4d-d903-4baa-97f9-4ea675f5e928</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Standard S1 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>S1</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/2e9b7ede-a777-4244-945c-9f319b1cec02</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>2e9b7ede-a777-4244-945c-9f319b1cec02</Id><Description>Standard S1 resource allocation.</Description><Ordinal>4</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 69 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases?contentview=generic + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + e6923fa8-1a85-43a2-b0a9-e8dc912db38f-2014-07-01 19:16:51Z +
+
+ x-ms-client-request-id + 935d07fb-c2b8-4d00-b737-f338510568b5-2014-07-01 19:17:27Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 7c0dd855-120d-4594-87a9-d181791227b7 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 19:17:27 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>master</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/master</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>1</Id><Edition>System</Edition><MaxSizeGB>5</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-01T17:51:19.7300000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>True</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>5368709120</MaxSizeBytes><ServiceObjectiveId>26e021db-f1f9-4c98-84c6-92af8ef433d7</ServiceObjectiveId><AssignedServiceObjectiveId>26e021db-f1f9-4c98-84c6-92af8ef433d7</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-01T17:51:21.6470000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate i:nil="true"/><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdbeditions1</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions1</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>4</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-01T19:16:51.6630000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-01T19:16:52.6000000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-01T19:17:51.5670000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdbeditions2</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>5</Id><Edition>Standard</Edition><MaxSizeGB>0</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-01T19:16:53.3300000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>524288000</MaxSizeBytes><ServiceObjectiveId>455330e1-00cd-488b-b5fa-177c226f28b7</ServiceObjectiveId><AssignedServiceObjectiveId>455330e1-00cd-488b-b5fa-177c226f28b7</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-01T19:17:08.8830000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-01T19:17:53.2570000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdbeditions3</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions3</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>6</Id><Edition>Standard</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-01T19:16:57.5870000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</ServiceObjectiveId><AssignedServiceObjectiveId>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-01T19:17:26.1630000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-01T19:17:57.5070000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdbeditions4</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions4</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>7</Id><Edition>Premium</Edition><MaxSizeGB>10</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-01T19:16:58.9800000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>10737418240</MaxSizeBytes><ServiceObjectiveId>7203483a-c4fb-4304-9e9f-17c71c904f5d</ServiceObjectiveId><AssignedServiceObjectiveId>7203483a-c4fb-4304-9e9f-17c71c904f5d</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-01T19:17:01.5870000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-01T19:17:58.9300000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdbeditions5</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions5</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>8</Id><Edition>Standard</Edition><MaxSizeGB>2</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-01T19:17:03.2430000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>2147483648</MaxSizeBytes><ServiceObjectiveId>455330e1-00cd-488b-b5fa-177c226f28b7</ServiceObjectiveId><AssignedServiceObjectiveId>455330e1-00cd-488b-b5fa-177c226f28b7</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-01T19:17:06.0530000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-01T19:18:03.1930000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource></ServiceResources> +
+
+ + 70 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/26e021db-f1f9-4c98-84c6-92af8ef433d7 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + e6923fa8-1a85-43a2-b0a9-e8dc912db38f-2014-07-01 19:16:51Z +
+
+ x-ms-client-request-id + a76fd7b6-29d0-4dc4-98d1-383ea4c22bb4-2014-07-01 19:17:27Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 3021fa4a-e03d-4dc8-a261-b990444e4e18 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 19:17:27 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>System</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/26e021db-f1f9-4c98-84c6-92af8ef433d7</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>26e021db-f1f9-4c98-84c6-92af8ef433d7</Id><IsDefault>False</IsDefault><IsSystem>True</IsSystem><Description>Used for master database only.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>System</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/5b1e7ca2-f1c8-4da8-bb42-7ebe94a92609</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>5b1e7ca2-f1c8-4da8-bb42-7ebe94a92609</Id><Description>Used for master database only.</Description><Ordinal>1</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 71 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + e6923fa8-1a85-43a2-b0a9-e8dc912db38f-2014-07-01 19:16:51Z +
+
+ x-ms-client-request-id + f6f022b4-e39b-4b23-8ac7-c6ee6100855d-2014-07-01 19:17:27Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 0fc28a27-b313-4caf-ba19-75105b19ea9b +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 19:17:27 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 72 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/455330e1-00cd-488b-b5fa-177c226f28b7 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + e6923fa8-1a85-43a2-b0a9-e8dc912db38f-2014-07-01 19:16:51Z +
+
+ x-ms-client-request-id + e097a9e5-80e4-47e2-b8d5-98f5af0fab65-2014-07-01 19:17:27Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + d0fade66-d526-43a8-ad50-8c22d94f1e43 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 19:17:27 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>S2</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/455330e1-00cd-488b-b5fa-177c226f28b7</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>455330e1-00cd-488b-b5fa-177c226f28b7</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Standard S2 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>S2</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/a6929526-f04f-48d2-8c46-babe799f2192</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>a6929526-f04f-48d2-8c46-babe799f2192</Id><Description>Standard S2 resource allocation.</Description><Ordinal>5</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 73 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/1b1ebd4d-d903-4baa-97f9-4ea675f5e928 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + e6923fa8-1a85-43a2-b0a9-e8dc912db38f-2014-07-01 19:16:51Z +
+
+ x-ms-client-request-id + c2cefcdf-e433-44ee-ad00-256a35d98d06-2014-07-01 19:17:27Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 9ee466ca-7768-4473-a2b9-07c942ffc15e +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 19:17:27 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>S1</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/1b1ebd4d-d903-4baa-97f9-4ea675f5e928</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Standard S1 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>S1</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/2e9b7ede-a777-4244-945c-9f319b1cec02</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>2e9b7ede-a777-4244-945c-9f319b1cec02</Id><Description>Standard S1 resource allocation.</Description><Ordinal>4</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 74 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/7203483a-c4fb-4304-9e9f-17c71c904f5d + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + e6923fa8-1a85-43a2-b0a9-e8dc912db38f-2014-07-01 19:16:51Z +
+
+ x-ms-client-request-id + 67d887b6-087e-4198-b9d7-fbb7c6c9c3fa-2014-07-01 19:17:27Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 9c2623aa-b59c-4b7d-866a-4aaa75e1f9ed +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 19:17:27 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>P1</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/7203483a-c4fb-4304-9e9f-17c71c904f5d</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>7203483a-c4fb-4304-9e9f-17c71c904f5d</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Premium P1 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>P1</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/765fbda3-73c9-4fad-996e-7c0e4e219f68</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>765fbda3-73c9-4fad-996e-7c0e4e219f68</Id><Description>Premium P1 resource allocation.</Description><Ordinal>6</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 75 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/455330e1-00cd-488b-b5fa-177c226f28b7 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + e6923fa8-1a85-43a2-b0a9-e8dc912db38f-2014-07-01 19:16:51Z +
+
+ x-ms-client-request-id + 2d497e63-9a46-4819-9f29-aa22085b2739-2014-07-01 19:17:27Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 05bb5358-dd4f-40fa-9145-4c25257dc924 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 19:17:27 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>S2</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/455330e1-00cd-488b-b5fa-177c226f28b7</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>455330e1-00cd-488b-b5fa-177c226f28b7</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Standard S2 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>S2</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/a6929526-f04f-48d2-8c46-babe799f2192</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>a6929526-f04f-48d2-8c46-babe799f2192</Id><Description>Standard S2 resource allocation.</Description><Ordinal>5</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 76 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbeditions1 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + e6923fa8-1a85-43a2-b0a9-e8dc912db38f-2014-07-01 19:16:51Z +
+
+ x-ms-client-request-id + 218a549c-8aa0-425d-9b8d-cec3af727f64-2014-07-01 19:17:27Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + a0c0e988-242c-4fd4-9e25-ee7d5be6f0ee +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Tue, 01 Jul 2014 19:17:29 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 77 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbeditions2 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + e6923fa8-1a85-43a2-b0a9-e8dc912db38f-2014-07-01 19:16:51Z +
+
+ x-ms-client-request-id + ccd0259f-1319-4180-aa74-419a3cf146aa-2014-07-01 19:17:29Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + a8a3c944-de3b-41ff-ae5b-d5982f1cd7fe +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Tue, 01 Jul 2014 19:17:31 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 78 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbeditions3 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + e6923fa8-1a85-43a2-b0a9-e8dc912db38f-2014-07-01 19:16:51Z +
+
+ x-ms-client-request-id + 3477f119-944c-4dcf-80e0-e6f935c743a2-2014-07-01 19:17:31Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 6b631805-6fea-4551-a5ea-bdf380618d73 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Tue, 01 Jul 2014 19:17:32 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 79 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbeditions4 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + e6923fa8-1a85-43a2-b0a9-e8dc912db38f-2014-07-01 19:16:51Z +
+
+ x-ms-client-request-id + 4c977d44-8899-454f-8f0e-09c8ddccbfc8-2014-07-01 19:17:32Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 663a4061-0145-47ae-8559-522736ad60d0 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Tue, 01 Jul 2014 19:17:32 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 80 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbeditions5 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + e6923fa8-1a85-43a2-b0a9-e8dc912db38f-2014-07-01 19:16:51Z +
+
+ x-ms-client-request-id + 143f69b6-99fb-4e6a-949d-0387b090192c-2014-07-01 19:17:33Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + d6d450e7-61ec-4a48-a596-15855f678e26 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Tue, 01 Jul 2014 19:17:34 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 81 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases?contentview=generic + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + e6923fa8-1a85-43a2-b0a9-e8dc912db38f-2014-07-01 19:16:51Z +
+
+ x-ms-client-request-id + 5e91b445-7186-43a9-bd5f-9ea7e4834840-2014-07-01 19:17:34Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + f68ef36b-aafb-4cd7-b4aa-b7bd9a93760d +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 19:17:34 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>master</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/master</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>1</Id><Edition>System</Edition><MaxSizeGB>5</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-01T17:51:19.7300000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>True</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>5368709120</MaxSizeBytes><ServiceObjectiveId>26e021db-f1f9-4c98-84c6-92af8ef433d7</ServiceObjectiveId><AssignedServiceObjectiveId>26e021db-f1f9-4c98-84c6-92af8ef433d7</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-01T17:51:21.6470000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate i:nil="true"/><IsSuspended>False</IsSuspended></ServiceResource></ServiceResources> +
+
+ + 82 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/26e021db-f1f9-4c98-84c6-92af8ef433d7 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + e6923fa8-1a85-43a2-b0a9-e8dc912db38f-2014-07-01 19:16:51Z +
+
+ x-ms-client-request-id + f375780c-a2a0-4494-9515-e152345d0e22-2014-07-01 19:17:34Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + b1e31763-4964-4cab-a46c-40577e1ee225 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 19:17:34 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>System</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/26e021db-f1f9-4c98-84c6-92af8ef433d7</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>26e021db-f1f9-4c98-84c6-92af8ef433d7</Id><IsDefault>False</IsDefault><IsSystem>True</IsSystem><Description>Used for master database only.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>System</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/5b1e7ca2-f1c8-4da8-bb42-7ebe94a92609</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>5b1e7ca2-f1c8-4da8-bb42-7ebe94a92609</Id><Description>Used for master database only.</Description><Ordinal>1</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 0 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + c1a80e5f-21a0-477e-bf17-022985672f88-2014-07-24 19:21:36Z +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <Name>testdbeditions1</Name> + <CollationName></CollationName> +</ServiceResource> + application/xml + +
+ + Created + +
+ x-ms-request-id + 9d5eeff5-00c3-4928-89cb-abb973cc62b5 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:21:39 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbeditions1</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions1</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>4</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T19:21:36.8800000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T19:21:38.6470000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T19:22:36.6130000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 1 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + 7100db28-32ef-4b63-a901-6ba93cee63ea-2014-07-24 19:21:39Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 30c77add-9842-449b-a2c6-0a591a6c7a1d +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:21:39 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 2 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + c1acab44-3859-45f9-a4b3-5b270beaab63-2014-07-24 19:21:39Z +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <Name>testdbeditions2</Name> + <Edition>Standard</Edition> + <CollationName></CollationName> +</ServiceResource> + application/xml + +
+ + Created + +
+ x-ms-request-id + cb69eb5e-3c83-49f6-b683-6a792b80daf6 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:21:41 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbeditions2</Name><Type>Microsoft.SqlAzure.Database</Type><State>Creating</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>5</Id><Edition/><MaxSizeGB>-1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T19:21:40.5400000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>-1</MaxSizeBytes><ServiceObjectiveId>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</ServiceObjectiveId><AssignedServiceObjectiveId>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>0</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Pending</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T19:18:50.1300000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate i:nil="true"/><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 3 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/1b1ebd4d-d903-4baa-97f9-4ea675f5e928 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + 1b3699e8-976e-4c66-bda4-276354c2af73-2014-07-24 19:21:41Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + a1923e2c-0731-4d8d-8059-3e190df05464 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:21:41 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>S1</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/1b1ebd4d-d903-4baa-97f9-4ea675f5e928</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Standard S1 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>S1</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/2e9b7ede-a777-4244-945c-9f319b1cec02</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>2e9b7ede-a777-4244-945c-9f319b1cec02</Id><Description>Standard S1 resource allocation.</Description><Ordinal>4</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 4 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbeditions2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + 592f5d99-6a1a-4a2d-8e05-334faf66c4f1-2014-07-24 19:21:43Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + d9919445-6bf2-41fb-9447-3670a66a1cd3 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:21:43 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbeditions2</Name><Type>Microsoft.SqlAzure.Database</Type><State>Creating</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>5</Id><Edition/><MaxSizeGB>-1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T19:21:40.5400000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>-1</MaxSizeBytes><ServiceObjectiveId>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</ServiceObjectiveId><AssignedServiceObjectiveId>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>0</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Pending</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T19:18:50.1300000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate i:nil="true"/><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 5 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/1b1ebd4d-d903-4baa-97f9-4ea675f5e928 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + b56b7951-c51f-4049-b7b6-5b6de1d264f9-2014-07-24 19:21:43Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 4acd27c5-2ff3-4d62-83f6-999925288efc +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:21:43 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>S1</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/1b1ebd4d-d903-4baa-97f9-4ea675f5e928</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Standard S1 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>S1</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/2e9b7ede-a777-4244-945c-9f319b1cec02</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>2e9b7ede-a777-4244-945c-9f319b1cec02</Id><Description>Standard S1 resource allocation.</Description><Ordinal>4</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 6 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbeditions2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + 2797e4ec-afe8-4e9c-b3e6-89b690aa03c6-2014-07-24 19:21:46Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + e3eae761-7a95-4e63-90f0-031b6dbcb4c5 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:21:46 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbeditions2</Name><Type>Microsoft.SqlAzure.Database</Type><State>Creating</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>5</Id><Edition>Standard</Edition><MaxSizeGB>0</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T19:21:40.5400000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>524288000</MaxSizeBytes><ServiceObjectiveId>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</ServiceObjectiveId><AssignedServiceObjectiveId>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T19:21:45.3330000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T19:22:40.2700000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 7 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/1b1ebd4d-d903-4baa-97f9-4ea675f5e928 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + ecabe765-6007-4c9c-9d8b-8704e40c7f96-2014-07-24 19:21:46Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 46dacc5c-d881-4df0-88a7-d2fd7842a947 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:21:46 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>S1</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/1b1ebd4d-d903-4baa-97f9-4ea675f5e928</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Standard S1 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>S1</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/2e9b7ede-a777-4244-945c-9f319b1cec02</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>2e9b7ede-a777-4244-945c-9f319b1cec02</Id><Description>Standard S1 resource allocation.</Description><Ordinal>4</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 8 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbeditions2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + 7cd7a0bc-a8fb-4b7b-b320-8bcdbb59cb84-2014-07-24 19:21:48Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + f76c84b1-04c7-493b-a991-b01e3a4f454b +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:21:48 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbeditions2</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>5</Id><Edition>Standard</Edition><MaxSizeGB>0</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T19:21:40.5400000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>524288000</MaxSizeBytes><ServiceObjectiveId>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</ServiceObjectiveId><AssignedServiceObjectiveId>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T19:21:45.3330000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T19:22:40.2700000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 9 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/1b1ebd4d-d903-4baa-97f9-4ea675f5e928 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + c352e94a-61b8-4a31-8041-877645ffabd0-2014-07-24 19:21:48Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 94d7e29e-5d3e-4b00-9f39-cb2f103f2d3c +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:21:48 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>S1</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/1b1ebd4d-d903-4baa-97f9-4ea675f5e928</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Standard S1 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>S1</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/2e9b7ede-a777-4244-945c-9f319b1cec02</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>2e9b7ede-a777-4244-945c-9f319b1cec02</Id><Description>Standard S1 resource allocation.</Description><Ordinal>4</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 10 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + d667807e-264b-48cf-ad13-88805a0441e3-2014-07-24 19:21:49Z +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <Name>testdbeditions3</Name> + <Edition>Basic</Edition> + <CollationName></CollationName> +</ServiceResource> + application/xml + +
+ + Created + +
+ x-ms-request-id + 4ab2b167-8c84-4265-826a-1c84bfa2dc1b +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:21:52 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbeditions3</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions3</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>6</Id><Edition>Basic</Edition><MaxSizeGB>0</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T19:21:50.0100000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>104857600</MaxSizeBytes><ServiceObjectiveId>dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</ServiceObjectiveId><AssignedServiceObjectiveId>dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T19:21:52.3670000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T19:22:49.5530000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 11 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/dd6d99bb-f193-4ec1-86f2-43d3bccbc49c + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + d56ce86d-0281-4472-843e-a424a46a7600-2014-07-24 19:21:52Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + b944777d-f8e2-4bbe-84f5-3df0969cdbb3 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:21:52 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Basic</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Basic resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Basic</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/3a2b7a50-065b-4c55-921d-c0ca49e174d3</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>3a2b7a50-065b-4c55-921d-c0ca49e174d3</Id><Description>Basic resource allocation.</Description><Ordinal>3</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 12 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + a375a45d-15e2-416d-b187-237e735040d4-2014-07-24 19:21:52Z +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <Name>testdbeditions4</Name> + <Edition>Premium</Edition> + <CollationName></CollationName> +</ServiceResource> + application/xml + +
+ + Created + +
+ x-ms-request-id + e8f1efca-ba43-4d16-925b-e010460033bb +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:21:53 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbeditions4</Name><Type>Microsoft.SqlAzure.Database</Type><State>Creating</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions4</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>7</Id><Edition/><MaxSizeGB>-1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T19:21:53.3530000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>-1</MaxSizeBytes><ServiceObjectiveId>7203483a-c4fb-4304-9e9f-17c71c904f5d</ServiceObjectiveId><AssignedServiceObjectiveId>7203483a-c4fb-4304-9e9f-17c71c904f5d</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>0</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Pending</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T19:18:33.6630000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate i:nil="true"/><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 13 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/7203483a-c4fb-4304-9e9f-17c71c904f5d + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + 11674c9f-0e55-4a48-adf7-cffc551198a0-2014-07-24 19:21:53Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 7bd9578f-c361-465f-a0f9-8bb281dbdf2f +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:21:53 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>P1</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/7203483a-c4fb-4304-9e9f-17c71c904f5d</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>7203483a-c4fb-4304-9e9f-17c71c904f5d</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Premium P1 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>P1</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/765fbda3-73c9-4fad-996e-7c0e4e219f68</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>765fbda3-73c9-4fad-996e-7c0e4e219f68</Id><Description>Premium P1 resource allocation.</Description><Ordinal>6</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 14 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbeditions4 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + 14309406-4d8e-4829-a763-45bc01bb6f8c-2014-07-24 19:21:56Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 82e527ba-092f-49dd-ad0c-bf62aa81efa2 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:21:56 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbeditions4</Name><Type>Microsoft.SqlAzure.Database</Type><State>Creating</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions4</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>7</Id><Edition/><MaxSizeGB>-1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T19:21:53.3530000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>-1</MaxSizeBytes><ServiceObjectiveId>7203483a-c4fb-4304-9e9f-17c71c904f5d</ServiceObjectiveId><AssignedServiceObjectiveId>7203483a-c4fb-4304-9e9f-17c71c904f5d</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>0</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Pending</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T19:18:33.6630000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate i:nil="true"/><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 15 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/7203483a-c4fb-4304-9e9f-17c71c904f5d + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + 48b0044e-dca2-4fb5-b449-5d7f4970ecd6-2014-07-24 19:21:56Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + b73f8ec3-8733-4ac0-8dfb-74231a9a0610 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:21:56 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>P1</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/7203483a-c4fb-4304-9e9f-17c71c904f5d</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>7203483a-c4fb-4304-9e9f-17c71c904f5d</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Premium P1 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>P1</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/765fbda3-73c9-4fad-996e-7c0e4e219f68</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>765fbda3-73c9-4fad-996e-7c0e4e219f68</Id><Description>Premium P1 resource allocation.</Description><Ordinal>6</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 16 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbeditions4 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + 415756f5-10ed-4782-8272-cbcfe574e896-2014-07-24 19:21:58Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 694ab814-7a0d-4b0e-b9bd-ab2e597d4961 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:21:58 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbeditions4</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions4</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>7</Id><Edition>Premium</Edition><MaxSizeGB>10</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T19:21:53.3530000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>10737418240</MaxSizeBytes><ServiceObjectiveId>7203483a-c4fb-4304-9e9f-17c71c904f5d</ServiceObjectiveId><AssignedServiceObjectiveId>7203483a-c4fb-4304-9e9f-17c71c904f5d</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T19:21:57.9430000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T19:22:53.0830000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 17 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/7203483a-c4fb-4304-9e9f-17c71c904f5d + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + a982d765-0d00-4f2a-9251-35284ca027f4-2014-07-24 19:21:58Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + f2f4c62e-4ff3-41bf-8e42-073b4e72ec33 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:21:58 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>P1</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/7203483a-c4fb-4304-9e9f-17c71c904f5d</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>7203483a-c4fb-4304-9e9f-17c71c904f5d</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Premium P1 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>P1</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/765fbda3-73c9-4fad-996e-7c0e4e219f68</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>765fbda3-73c9-4fad-996e-7c0e4e219f68</Id><Description>Premium P1 resource allocation.</Description><Ordinal>6</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 18 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + c22437e9-7965-42d5-89c0-f81e382611f6-2014-07-24 19:21:59Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + c03e2599-e5bc-47eb-a77f-6a945de72cc4 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:21:58 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>S2</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/455330e1-00cd-488b-b5fa-177c226f28b7</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>455330e1-00cd-488b-b5fa-177c226f28b7</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Standard S2 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>S2</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/a6929526-f04f-48d2-8c46-babe799f2192</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>a6929526-f04f-48d2-8c46-babe799f2192</Id><Description>Standard S2 resource allocation.</Description><Ordinal>5</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource><ServiceResource><Name>P1</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/7203483a-c4fb-4304-9e9f-17c71c904f5d</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>7203483a-c4fb-4304-9e9f-17c71c904f5d</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Premium P1 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>P1</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/765fbda3-73c9-4fad-996e-7c0e4e219f68</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>765fbda3-73c9-4fad-996e-7c0e4e219f68</Id><Description>Premium P1 resource allocation.</Description><Ordinal>6</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource><ServiceResource><Name>P2</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Premium P2 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>P2</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/b15e89f1-02b5-4618-b44d-75d37261b94b</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>b15e89f1-02b5-4618-b44d-75d37261b94b</Id><Description>Premium P2 resource allocation.</Description><Ordinal>7</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource><ServiceResource><Name>Basic</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Basic resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Basic</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/3a2b7a50-065b-4c55-921d-c0ca49e174d3</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>3a2b7a50-065b-4c55-921d-c0ca49e174d3</Id><Description>Basic resource allocation.</Description><Ordinal>3</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource><ServiceResource><Name>S1</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/1b1ebd4d-d903-4baa-97f9-4ea675f5e928</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Standard S1 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>S1</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/2e9b7ede-a777-4244-945c-9f319b1cec02</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>2e9b7ede-a777-4244-945c-9f319b1cec02</Id><Description>Standard S1 resource allocation.</Description><Ordinal>4</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource><ServiceResource><Name>P3 deprecated</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/e210706e-cd95-4f72-b5e5-885f8a1406e8</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>e210706e-cd95-4f72-b5e5-885f8a1406e8</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Premium P3 deprecated resource allocation.</Description><Enabled>False</Enabled><DimensionSettings><ServiceResource><Name>P3 deprecated</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/8efe7983-8e31-4ddb-82d2-5c00e4f48631</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>8efe7983-8e31-4ddb-82d2-5c00e4f48631</Id><Description>Premium P3 deprecated resource allocation.</Description><Ordinal>9</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource><ServiceResource><Name>P3</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/a7c4c615-cfb1-464b-b252-925be0a19446</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>a7c4c615-cfb1-464b-b252-925be0a19446</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Premium P3 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>P3</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/c4da00a1-df48-4f87-930e-dbc170fe1cef</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>c4da00a1-df48-4f87-930e-dbc170fe1cef</Id><Description>Premium P3 resource allocation.</Description><Ordinal>8</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource><ServiceResource><Name>System</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/26e021db-f1f9-4c98-84c6-92af8ef433d7</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>26e021db-f1f9-4c98-84c6-92af8ef433d7</Id><IsDefault>False</IsDefault><IsSystem>True</IsSystem><Description>Used for master database only.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>System</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/5b1e7ca2-f1c8-4da8-bb42-7ebe94a92609</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>5b1e7ca2-f1c8-4da8-bb42-7ebe94a92609</Id><Description>Used for master database only.</Description><Ordinal>1</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource><ServiceResource><Name>System Standard</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/a45fea0c-e63c-4bf0-9f81-9964c86b7d2a</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>a45fea0c-e63c-4bf0-9f81-9964c86b7d2a</Id><IsDefault>False</IsDefault><IsSystem>True</IsSystem><Description>Used for master database only.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource></ServiceResources> +
+
+ + 19 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + 1bb1a4dc-7a9e-4153-b11f-377c77094efb-2014-07-24 19:21:59Z +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <Name>testdbeditions5</Name> + <Edition>Standard</Edition> + <CollationName></CollationName> + <ServiceObjectiveId>455330e1-00cd-488b-b5fa-177c226f28b7</ServiceObjectiveId> +</ServiceResource> + application/xml + +
+ + Created + +
+ x-ms-request-id + 290821fe-7025-420a-856d-7bba74d9daaf +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:22:00 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbeditions5</Name><Type>Microsoft.SqlAzure.Database</Type><State>Creating</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions5</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>8</Id><Edition/><MaxSizeGB>-1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T19:21:59.8770000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>-1</MaxSizeBytes><ServiceObjectiveId>455330e1-00cd-488b-b5fa-177c226f28b7</ServiceObjectiveId><AssignedServiceObjectiveId>455330e1-00cd-488b-b5fa-177c226f28b7</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>0</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Pending</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T19:18:41.5200000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate i:nil="true"/><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 20 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/455330e1-00cd-488b-b5fa-177c226f28b7 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + fbb50462-899b-4142-b62a-f960d864ee30-2014-07-24 19:22:00Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + eecf8880-0e96-4b48-b87b-44b4090473b1 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:22:00 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>S2</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/455330e1-00cd-488b-b5fa-177c226f28b7</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>455330e1-00cd-488b-b5fa-177c226f28b7</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Standard S2 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>S2</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/a6929526-f04f-48d2-8c46-babe799f2192</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>a6929526-f04f-48d2-8c46-babe799f2192</Id><Description>Standard S2 resource allocation.</Description><Ordinal>5</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 21 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbeditions5 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + 4c760e41-a1da-4de2-aeed-1d582edc3105-2014-07-24 19:22:02Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 234e176a-7e9a-4890-9234-fc4b002ba54d +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:22:02 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbeditions5</Name><Type>Microsoft.SqlAzure.Database</Type><State>Creating</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions5</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>8</Id><Edition/><MaxSizeGB>-1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T19:21:59.8770000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>-1</MaxSizeBytes><ServiceObjectiveId>455330e1-00cd-488b-b5fa-177c226f28b7</ServiceObjectiveId><AssignedServiceObjectiveId>455330e1-00cd-488b-b5fa-177c226f28b7</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>0</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Pending</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T19:22:02.7870000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate i:nil="true"/><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 22 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/455330e1-00cd-488b-b5fa-177c226f28b7 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + 44ccc532-31a1-4bed-af2e-9ff4c0ee0a47-2014-07-24 19:22:02Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 685c96df-0233-49a0-a8eb-ff0f3ec77aae +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:22:02 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>S2</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/455330e1-00cd-488b-b5fa-177c226f28b7</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>455330e1-00cd-488b-b5fa-177c226f28b7</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Standard S2 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>S2</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/a6929526-f04f-48d2-8c46-babe799f2192</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>a6929526-f04f-48d2-8c46-babe799f2192</Id><Description>Standard S2 resource allocation.</Description><Ordinal>5</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 23 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbeditions5 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + f4556cdf-7518-47ed-a86d-fe91af9a9388-2014-07-24 19:22:05Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + ec1ef834-bf67-4409-bf14-869afb3cbe62 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:22:05 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbeditions5</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions5</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>8</Id><Edition>Standard</Edition><MaxSizeGB>2</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T19:21:59.8770000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>2147483648</MaxSizeBytes><ServiceObjectiveId>455330e1-00cd-488b-b5fa-177c226f28b7</ServiceObjectiveId><AssignedServiceObjectiveId>455330e1-00cd-488b-b5fa-177c226f28b7</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T19:22:02.7870000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T19:22:59.6770000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 24 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/455330e1-00cd-488b-b5fa-177c226f28b7 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + bcab269e-2777-4004-869b-ed00239c3630-2014-07-24 19:22:05Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 62a0e2e3-2a63-453b-acd1-6fcf2cb1c9e6 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:22:05 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>S2</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/455330e1-00cd-488b-b5fa-177c226f28b7</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>455330e1-00cd-488b-b5fa-177c226f28b7</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Standard S2 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>S2</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/a6929526-f04f-48d2-8c46-babe799f2192</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>a6929526-f04f-48d2-8c46-babe799f2192</Id><Description>Standard S2 resource allocation.</Description><Ordinal>5</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 25 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbeditions1 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + a8ae5e9d-12db-4f14-8da4-d38838c5ee0c-2014-07-24 19:22:05Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + c790f6f5-0c27-42b7-a738-9784dd79e46a +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:22:05 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbeditions1</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions1</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>4</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T19:21:36.8800000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T19:21:38.6470000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T19:22:36.6130000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 26 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + 7823f132-52d7-46ff-b82f-766aeec3aaa6-2014-07-24 19:22:05Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + e38837e4-370c-481d-98f8-b88cb1ac15fa +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:22:05 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 27 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbeditions1 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + 57c4eb9d-dd48-43d6-952f-94e638516635-2014-07-24 19:22:06Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 40937ba9-98e5-469f-9055-979380ee7d72 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:22:06 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbeditions1</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions1</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>4</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T19:21:36.8800000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T19:21:38.6470000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T19:22:36.6130000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 28 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + 75928f81-2189-411c-a409-2bf28bced167-2014-07-24 19:22:06Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 1b03d5eb-6458-437a-a841-670c6a432d07 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:22:06 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 29 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbeditions2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + 72d27029-9bc2-4f36-a894-7e6bd880a4cc-2014-07-24 19:22:06Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 56908415-40c3-4aca-845a-d978ac566a64 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:22:06 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbeditions2</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>5</Id><Edition>Standard</Edition><MaxSizeGB>0</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T19:21:40.5400000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>524288000</MaxSizeBytes><ServiceObjectiveId>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</ServiceObjectiveId><AssignedServiceObjectiveId>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T19:21:45.3330000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T19:22:40.2700000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 30 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbeditions2 + PUT + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + 72d27029-9bc2-4f36-a894-7e6bd880a4cc-2014-07-24 19:22:06Z +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <Name>testdbeditions2</Name> + <Edition>Standard</Edition> + <ServiceObjectiveId>455330e1-00cd-488b-b5fa-177c226f28b7</ServiceObjectiveId> +</ServiceResource> + application/xml + +
+ + OK + +
+ x-ms-request-id + 500ffc7e-8ed5-43cd-86ef-041af4a6c546 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:22:08 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbeditions2</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>5</Id><Edition>Standard</Edition><MaxSizeGB>0</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T19:21:40.5400000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>524288000</MaxSizeBytes><ServiceObjectiveId>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</ServiceObjectiveId><AssignedServiceObjectiveId>455330e1-00cd-488b-b5fa-177c226f28b7</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>0</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Pending</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T19:21:45.3330000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T19:23:40.2700000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 31 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/1b1ebd4d-d903-4baa-97f9-4ea675f5e928 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + 4eb56ae2-80ad-4adb-9469-f2ff48713ca2-2014-07-24 19:22:09Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + d4c75954-c474-4a83-94e0-272ed2341db1 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:22:08 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>S1</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/1b1ebd4d-d903-4baa-97f9-4ea675f5e928</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Standard S1 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>S1</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/2e9b7ede-a777-4244-945c-9f319b1cec02</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>2e9b7ede-a777-4244-945c-9f319b1cec02</Id><Description>Standard S1 resource allocation.</Description><Ordinal>4</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 32 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbeditions3 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + 53656979-317c-4144-86d5-54c1dacd57c7-2014-07-24 19:22:56Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 98b92857-bcea-44ee-8e89-786c67ab5ae9 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:22:56 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbeditions3</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions3</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>6</Id><Edition>Basic</Edition><MaxSizeGB>0</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T19:21:50.0100000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>104857600</MaxSizeBytes><ServiceObjectiveId>dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</ServiceObjectiveId><AssignedServiceObjectiveId>dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T19:21:52.3670000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T19:22:49.5530000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 33 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbeditions3 + PUT + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + 53656979-317c-4144-86d5-54c1dacd57c7-2014-07-24 19:22:56Z +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <Name>testdbeditions3</Name> + <Edition>Standard</Edition> + <MaxSizeGB>1</MaxSizeGB> + <ServiceObjectiveId>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</ServiceObjectiveId> +</ServiceResource> + application/xml + +
+ + OK + +
+ x-ms-request-id + 9304e3e4-9202-4ca0-99a9-29bca78f4f60 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:22:59 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdbeditions3</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions3</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>6</Id><Edition>Basic</Edition><MaxSizeGB>0</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T19:21:50.0100000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>104857600</MaxSizeBytes><ServiceObjectiveId>dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</ServiceObjectiveId><AssignedServiceObjectiveId>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>0</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Pending</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T19:21:52.3670000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T19:23:49.5530000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 34 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/dd6d99bb-f193-4ec1-86f2-43d3bccbc49c + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + 297d4b6a-b4cb-4237-b8fa-45e79ae0437e-2014-07-24 19:22:59Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 00b417d8-8451-4366-a5c0-fbbf921fdd66 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:22:59 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Basic</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Basic resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Basic</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/3a2b7a50-065b-4c55-921d-c0ca49e174d3</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>3a2b7a50-065b-4c55-921d-c0ca49e174d3</Id><Description>Basic resource allocation.</Description><Ordinal>3</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 35 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases?contentview=generic + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + 64f88fab-97fd-41a4-aa42-8b3bffdc8227-2014-07-24 19:22:59Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 20247ef5-fdcf-43d7-8af1-938e1845f82b +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:22:59 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>master</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/master</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>1</Id><Edition>System</Edition><MaxSizeGB>5</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-22T17:52:25.3400000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>True</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>5368709120</MaxSizeBytes><ServiceObjectiveId>26e021db-f1f9-4c98-84c6-92af8ef433d7</ServiceObjectiveId><AssignedServiceObjectiveId>26e021db-f1f9-4c98-84c6-92af8ef433d7</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-22T17:52:27.9370000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate i:nil="true"/><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdbeditions1</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions1</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>4</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T19:21:36.8800000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T19:21:38.6470000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T19:22:36.6130000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdbeditions2</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>5</Id><Edition>Standard</Edition><MaxSizeGB>0</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T19:21:40.5400000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>524288000</MaxSizeBytes><ServiceObjectiveId>455330e1-00cd-488b-b5fa-177c226f28b7</ServiceObjectiveId><AssignedServiceObjectiveId>455330e1-00cd-488b-b5fa-177c226f28b7</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T19:22:09.5830000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T19:22:40.2700000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdbeditions3</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions3</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>6</Id><Edition>Basic</Edition><MaxSizeGB>0</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T19:21:50.0100000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>104857600</MaxSizeBytes><ServiceObjectiveId>dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</ServiceObjectiveId><AssignedServiceObjectiveId>1b1ebd4d-d903-4baa-97f9-4ea675f5e928</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>0</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Pending</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T19:21:52.3670000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T19:22:49.5530000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdbeditions4</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions4</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>7</Id><Edition>Premium</Edition><MaxSizeGB>10</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T19:21:53.3530000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>10737418240</MaxSizeBytes><ServiceObjectiveId>7203483a-c4fb-4304-9e9f-17c71c904f5d</ServiceObjectiveId><AssignedServiceObjectiveId>7203483a-c4fb-4304-9e9f-17c71c904f5d</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T19:21:57.9430000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T19:22:53.0830000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdbeditions5</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdbeditions5</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>8</Id><Edition>Standard</Edition><MaxSizeGB>2</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-24T19:21:59.8770000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>2147483648</MaxSizeBytes><ServiceObjectiveId>455330e1-00cd-488b-b5fa-177c226f28b7</ServiceObjectiveId><AssignedServiceObjectiveId>455330e1-00cd-488b-b5fa-177c226f28b7</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-24T19:22:02.7870000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-24T19:22:59.6770000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource></ServiceResources> +
+
+ + 36 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/26e021db-f1f9-4c98-84c6-92af8ef433d7 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + 11f745a3-31a3-4f83-b607-d8a9dc05c49f-2014-07-24 19:22:59Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 736a3fba-1e5a-43ae-bb01-598e8917ad68 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:22:59 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>System</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/26e021db-f1f9-4c98-84c6-92af8ef433d7</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>26e021db-f1f9-4c98-84c6-92af8ef433d7</Id><IsDefault>False</IsDefault><IsSystem>True</IsSystem><Description>Used for master database only.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>System</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/5b1e7ca2-f1c8-4da8-bb42-7ebe94a92609</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>5b1e7ca2-f1c8-4da8-bb42-7ebe94a92609</Id><Description>Used for master database only.</Description><Ordinal>1</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 37 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + f1d861bb-3316-4030-ae55-4ac559cab8be-2014-07-24 19:22:59Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 452f912c-a0bf-4393-a28e-653b0ccdea3a +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:22:59 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 38 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/455330e1-00cd-488b-b5fa-177c226f28b7 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + 1c3aabf6-d5a4-49b5-bf3e-96d9b93bff39-2014-07-24 19:22:59Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 7b06d554-bc30-40fd-b210-859b6fe52ee2 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:22:59 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>S2</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/455330e1-00cd-488b-b5fa-177c226f28b7</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>455330e1-00cd-488b-b5fa-177c226f28b7</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Standard S2 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>S2</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/a6929526-f04f-48d2-8c46-babe799f2192</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>a6929526-f04f-48d2-8c46-babe799f2192</Id><Description>Standard S2 resource allocation.</Description><Ordinal>5</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 39 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/dd6d99bb-f193-4ec1-86f2-43d3bccbc49c + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + a883cc2d-317d-498c-9a7d-c47f4bd3f8c3-2014-07-24 19:23:00Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + d38ff2ee-245f-4ab6-8971-569513ee6301 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:22:59 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Basic</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>dd6d99bb-f193-4ec1-86f2-43d3bccbc49c</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Basic resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Basic</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/3a2b7a50-065b-4c55-921d-c0ca49e174d3</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>3a2b7a50-065b-4c55-921d-c0ca49e174d3</Id><Description>Basic resource allocation.</Description><Ordinal>3</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 40 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/7203483a-c4fb-4304-9e9f-17c71c904f5d + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + 1b9a3dfa-2625-43e3-8bdc-b5bcfc712182-2014-07-24 19:23:00Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + b26aa310-ccca-4850-b4b4-bed75f88a105 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:23:00 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>P1</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/7203483a-c4fb-4304-9e9f-17c71c904f5d</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>7203483a-c4fb-4304-9e9f-17c71c904f5d</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Premium P1 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>P1</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/765fbda3-73c9-4fad-996e-7c0e4e219f68</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>765fbda3-73c9-4fad-996e-7c0e4e219f68</Id><Description>Premium P1 resource allocation.</Description><Ordinal>6</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 41 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/455330e1-00cd-488b-b5fa-177c226f28b7 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + 887ba155-a736-4e60-8433-9e2417dc6f85-2014-07-24 19:23:00Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 8b38c232-e1bb-45b4-a077-1a2cb091a968 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:23:00 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>S2</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/455330e1-00cd-488b-b5fa-177c226f28b7</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>455330e1-00cd-488b-b5fa-177c226f28b7</Id><IsDefault>False</IsDefault><IsSystem>False</IsSystem><Description>Standard S2 resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>S2</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/a6929526-f04f-48d2-8c46-babe799f2192</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>a6929526-f04f-48d2-8c46-babe799f2192</Id><Description>Standard S2 resource allocation.</Description><Ordinal>5</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 42 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbeditions1 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + 58f22033-95f2-442c-9741-f0b6755ae2c8-2014-07-24 19:23:00Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 58c5b433-bcdd-4e77-a502-6cd1473dcb99 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Thu, 24 Jul 2014 19:23:04 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 43 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbeditions2 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + 73bb8dac-8933-4c60-8520-99c2d71907c9-2014-07-24 19:23:04Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 09dca60b-0ea1-4161-908c-e0c35fb054ed +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Thu, 24 Jul 2014 19:23:12 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 44 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbeditions3 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + d38031e9-d06d-4f0f-9931-a270611957e3-2014-07-24 19:23:12Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + b2ec5c22-3189-4c32-a657-bbb3431f86dc +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Thu, 24 Jul 2014 19:23:15 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 45 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbeditions4 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + e08b90d1-27bd-4dc2-b14f-f834890e5249-2014-07-24 19:23:15Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + f90c57ac-f158-48e4-a9af-5bc35358c286 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Thu, 24 Jul 2014 19:23:18 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 46 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdbeditions5 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + 18e46d85-bc4a-4eaf-b560-9e4dab925cc8-2014-07-24 19:23:18Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 3f7c38a9-1d3e-4ce4-9327-f4f49859b7d6 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Thu, 24 Jul 2014 19:23:22 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 47 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases?contentview=generic + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + 60a0b3b6-37df-45c3-af48-fa8daefdf36d-2014-07-24 19:23:22Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 192ef738-0d63-4e5d-90aa-45d1982cf417 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:23:22 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>master</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/master</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>1</Id><Edition>System</Edition><MaxSizeGB>5</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-22T17:52:25.3400000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>True</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>5368709120</MaxSizeBytes><ServiceObjectiveId>26e021db-f1f9-4c98-84c6-92af8ef433d7</ServiceObjectiveId><AssignedServiceObjectiveId>26e021db-f1f9-4c98-84c6-92af8ef433d7</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-22T17:52:27.9370000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate i:nil="true"/><IsSuspended>False</IsSuspended></ServiceResource></ServiceResources> +
+
+ + 48 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/26e021db-f1f9-4c98-84c6-92af8ef433d7 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 6c208120-4e10-48f8-8363-3788483ea4da-2014-07-24 19:21:36Z +
+
+ x-ms-client-request-id + 0e072d76-3aa0-4af8-a151-f5b4e4ef578e-2014-07-24 19:23:22Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 3e3570c0-ebee-4890-bedc-cb8fb192fd4c +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Thu, 24 Jul 2014 19:23:22 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>System</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/26e021db-f1f9-4c98-84c6-92af8ef433d7</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>26e021db-f1f9-4c98-84c6-92af8ef433d7</Id><IsDefault>False</IsDefault><IsSystem>True</IsSystem><Description>Used for master database only.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>System</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/5b1e7ca2-f1c8-4da8-bb42-7ebe94a92609</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>5b1e7ca2-f1c8-4da8-bb42-7ebe94a92609</Id><Description>Used for master database only.</Description><Ordinal>1</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+
+
+ + UnitTest.AzureSqlDatabaseServerQuotaCertAuthTest + + + 0 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serverquotas + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + ca57deb0-521c-47a9-bcf5-93b67b1f4234-2014-07-01 19:24:01Z +
+
+ x-ms-client-request-id + c2504778-e958-4bc9-926f-c753ed148097-2014-07-01 19:24:01Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 8792f912-6b2f-4a01-ac96-d64b6890192a +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 19:24:02 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>premium_databases</Name><Type>Microsoft.SqlAzure.ServerQuota</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serverquotas/premium_databases</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Value>100</Value></ServiceResource></ServiceResources> +
+
+ + 1 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serverquotas + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 WindowsAzurePowershell/v0.8.3 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + ca57deb0-521c-47a9-bcf5-93b67b1f4234-2014-07-01 19:24:01Z +
+
+ x-ms-client-request-id + 1b46fd32-cee8-4cb4-81af-87ddedcde304-2014-07-01 19:24:02Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 1d6841aa-023a-44b4-8329-99ff52f7232c +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 01 Jul 2014 19:24:02 GMT +
+
+ Server + 1.0.6198.12 (rd_rdfe_stable.131001-0757) Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>premium_databases</Name><Type>Microsoft.SqlAzure.ServerQuota</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serverquotas/premium_databases</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Value>100</Value></ServiceResource></ServiceResources> +
+
+
+
+ + UnitTest.GetAzureSqlDatabaseContinuousCopyWithSqlAuth + + + 0 + + http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/DatabaseCopies()?$filter=SourceServerName%20eq%20'myserver01' + GET + WindowsAzurePowershell/v0.7.3.1 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + l79VtJX6+2OViFSUL4OEh+nB557YUekHHOZ3oAKYkXXWvGjkxSk9KGpKm+IBtB+/Me3rxBIi9kuLfRftbmPpvB3u2p+3grAIt+6fLEfGT4Pwi0OAwyqvQ4mmYg3atXCrtNVd2ORovRU3Jj61Kk3yQBl+QulBFskAcnCGauCoMeCkvPhlYNjEPaHN3tekqOcTb3K6Q5gdcOmE6oQyeWJa5KSBpDsImtiP1NOg97sowwHT95I/q73L6Lhqz2NcT1pdeH+bF+hyVzMDg6fmQeBXMOF0ujjPssHBSO85m9ZYFl6xeHwOuYliFrVgUUqsblDfEdth/yHUJV7w6fvySg1c6yyD3pkvx1Migksd+5lJ1dtF7hdRRuzEWg2Nq97hQWRD2r9GRcPB1ZhCf2p15qU4J5vN/PypXI0+NzEnM91qWBuQisZKUxKNFARVeogSkStwO9Ehz+xOt3srrsPPZB2DtZZFaTJSa+TsblFdw9gX465/WefGJwGZJ8O3+Bp8aMxHKEDhDPp8t8QKIxx61AqbTaPf8KJoUZ0C3JYH0fmAQHGc3EODBuvizUAsY53pWkTT5vRxPyC33ypDE6zNne8F4L+VJlPOn8HTTY3+u8ycpPJT+vfCWKbzoiMH39+qMyB2EgVzHreLIyNdwXkhxxyWUzzd2esLRGZImRv8Hl4RyHcWuovHYyIJ9MERXFSWcvOVrPVArugeZevb0R2h9WpX+grtcTRGFGx0VedbeYvjFeCRVhGkm3nhVkFwg/q9uAEI7x17F9h0YRE/+u4JT0bthQ== +
+
+ x-ms-client-session-id + b224166f-fb0f-492f-9814-2209e35d8c8a-2012-10-11 19:40:05Z +
+
+ x-ms-client-request-id + 34983f19-cfdd-42ee-ba7b-2e2f1158bceb-2012-10-11 19:40:08Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=/kpY7HXYKQVFel7he62rwQ== +
+
+ + + .SQLSERVERMANAGEMENT + /kpY7HXYKQVFel7he62rwQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + b224166f-fb0f-492f-9814-2209e35d8c8a +
+
+ DataServiceVersion + 1.0; +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;charset=utf-8 +
+
+ Date + Thu, 11 Oct 2012 19:40:24 GMT +
+
+ + + <?xml version="1.0" encoding="utf-8" standalone="yes"?> + <feed xml:base="http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom"> + <title type="text">DatabaseCopies</title> + <id>http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/DatabaseCopies</id> + <updated>2012-10-11T19:40:24Z</updated> + <link rel="self" title="DatabaseCopies" href="DatabaseCopies" /> + <entry> + <id>http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/DatabaseCopies(guid'bd2822fe-13e6-4357-a835-47964b4fa1e5')</id> + <title type="text"></title> + <updated>2012-10-11T19:40:24Z</updated> + <author> + <name /> + </author> + <link rel="edit" title="DatabaseCopy" href="DatabaseCopies(guid'bd2822fe-13e6-4357-a835-47964b4fa1e5')" /> + <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Database" type="application/atom+xml;type=entry" title="Database" href="DatabaseCopies(guid'bd2822fe-13e6-4357-a835-47964b4fa1e5')/Database" /> + <category term="Microsoft.SqlServer.Management.Server.Domain.DatabaseCopy" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /> + <content type="application/xml"> + <m:properties> + <d:LocalDatabaseId m:type="Edm.Int32">4</d:LocalDatabaseId> + <d:DestinationServerName>partnersrv</d:DestinationServerName> + <d:DestinationDatabaseName>testdb1</d:DestinationDatabaseName> + <d:SourceServerName>myserver01</d:SourceServerName> + <d:SourceDatabaseName>testdb1</d:SourceDatabaseName> + <d:IsContinuous m:type="Edm.Boolean">true</d:IsContinuous> + <d:TextStartDate>2012-10-11T19:40:19.9330000Z</d:TextStartDate> + <d:TextModifyDate>2012-10-11T19:40:19.9330000Z</d:TextModifyDate> + <d:PercentComplete m:type="Edm.Single" m:null="true" /> + <d:IsLocalDatabaseReplicationTarget m:type="Edm.Boolean">false</d:IsLocalDatabaseReplicationTarget> + <d:ReplicationState m:type="Edm.Byte">0</d:ReplicationState> + <d:ReplicationStateDescription>PENDING</d:ReplicationStateDescription> + <d:IsInterlinkConnected m:type="Edm.Boolean">true</d:IsInterlinkConnected> + <d:IsForcedTerminate m:type="Edm.Boolean" m:null="true" /> + <d:MaximumLag m:type="Edm.Int32" m:null="true" /> + <d:EntityId m:type="Edm.Guid">bd2822fe-13e6-4357-a835-47964b4fa1e5</d:EntityId> + </m:properties> + </content> + </entry> + <entry> + <id>http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/DatabaseCopies(guid'55422252-8273-47da-ae66-7d3d9ca1f4e3')</id> + <title type="text"></title> + <updated>2012-10-11T19:40:24Z</updated> + <author> + <name /> + </author> + <link rel="edit" title="DatabaseCopy" href="DatabaseCopies(guid'55422252-8273-47da-ae66-7d3d9ca1f4e3')" /> + <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Database" type="application/atom+xml;type=entry" title="Database" href="DatabaseCopies(guid'55422252-8273-47da-ae66-7d3d9ca1f4e3')/Database" /> + <category term="Microsoft.SqlServer.Management.Server.Domain.DatabaseCopy" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /> + <content type="application/xml"> + <m:properties> + <d:LocalDatabaseId m:type="Edm.Int32">5</d:LocalDatabaseId> + <d:DestinationServerName>partnersrv</d:DestinationServerName> + <d:DestinationDatabaseName>testdb2</d:DestinationDatabaseName> + <d:SourceServerName>myserver01</d:SourceServerName> + <d:SourceDatabaseName>testdb2</d:SourceDatabaseName> + <d:IsContinuous m:type="Edm.Boolean">true</d:IsContinuous> + <d:TextStartDate>2012-10-11T19:40:21.7100000Z</d:TextStartDate> + <d:TextModifyDate>2012-10-11T19:40:21.7100000Z</d:TextModifyDate> + <d:PercentComplete m:type="Edm.Single" m:null="true" /> + <d:IsLocalDatabaseReplicationTarget m:type="Edm.Boolean">false</d:IsLocalDatabaseReplicationTarget> + <d:ReplicationState m:type="Edm.Byte">0</d:ReplicationState> + <d:ReplicationStateDescription>PENDING</d:ReplicationStateDescription> + <d:IsInterlinkConnected m:type="Edm.Boolean">true</d:IsInterlinkConnected> + <d:IsForcedTerminate m:type="Edm.Boolean" m:null="true" /> + <d:MaximumLag m:type="Edm.Int32" m:null="true" /> + <d:EntityId m:type="Edm.Guid">55422252-8273-47da-ae66-7d3d9ca1f4e3</d:EntityId> + </m:properties> + </content> + </entry> + </feed> + +
+
+ + 1 + + http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/DatabaseCopies()?$filter=DestinationServerName%20eq%20'myserver01' + GET + WindowsAzurePowershell/v0.7.3.1 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + l79VtJX6+2OViFSUL4OEh+nB557YUekHHOZ3oAKYkXXWvGjkxSk9KGpKm+IBtB+/Me3rxBIi9kuLfRftbmPpvB3u2p+3grAIt+6fLEfGT4Pwi0OAwyqvQ4mmYg3atXCrtNVd2ORovRU3Jj61Kk3yQBl+QulBFskAcnCGauCoMeCkvPhlYNjEPaHN3tekqOcTb3K6Q5gdcOmE6oQyeWJa5KSBpDsImtiP1NOg97sowwHT95I/q73L6Lhqz2NcT1pdeH+bF+hyVzMDg6fmQeBXMOF0ujjPssHBSO85m9ZYFl6xeHwOuYliFrVgUUqsblDfEdth/yHUJV7w6fvySg1c6yyD3pkvx1Migksd+5lJ1dtF7hdRRuzEWg2Nq97hQWRD2r9GRcPB1ZhCf2p15qU4J5vN/PypXI0+NzEnM91qWBuQisZKUxKNFARVeogSkStwO9Ehz+xOt3srrsPPZB2DtZZFaTJSa+TsblFdw9gX465/WefGJwGZJ8O3+Bp8aMxHKEDhDPp8t8QKIxx61AqbTaPf8KJoUZ0C3JYH0fmAQHGc3EODBuvizUAsY53pWkTT5vRxPyC33ypDE6zNne8F4L+VJlPOn8HTTY3+u8ycpPJT+vfCWKbzoiMH39+qMyB2EgVzHreLIyNdwXkhxxyWUzzd2esLRGZImRv8Hl4RyHcWuovHYyIJ9MERXFSWcvOVrPVArugeZevb0R2h9WpX+grtcTRGFGx0VedbeYvjFeCRVhGkm3nhVkFwg/q9uAEI7x17F9h0YRE/+u4JT0bthQ== +
+
+ x-ms-client-session-id + b224166f-fb0f-492f-9814-2209e35d8c8a-2012-10-11 19:40:05Z +
+
+ x-ms-client-request-id + 34983f19-cfdd-42ee-ba7b-2e2f1158bceb-2012-10-11 19:40:08Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=/kpY7HXYKQVFel7he62rwQ== +
+
+ + + .SQLSERVERMANAGEMENT + /kpY7HXYKQVFel7he62rwQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + b224166f-fb0f-492f-9814-2209e35d8c8a +
+
+ DataServiceVersion + 1.0; +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;charset=utf-8 +
+
+ Date + Thu, 11 Oct 2012 19:40:24 GMT +
+
+ + + <?xml version="1.0" encoding="utf-8" standalone="yes"?> + <feed xml:base="https://test1683510.abc1683510-gu.adhoc.mscds.com/v1/ManagementService.svc/Server2('test1683510')/" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom"> + <title type="text">DatabaseCopies</title> + <id>https://test1683510.abc1683510-gu.adhoc.mscds.com/v1/ManagementService.svc/Server2('test1683510')/DatabaseCopies</id> + <updated>2012-10-11T19:40:25Z</updated> + <author> + <name /> + </author> + <link rel="self" title="DatabaseCopies" href="DatabaseCopies" /> + </feed> + +
+
+ + 2 + + http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/DatabaseCopies()?$filter=(SourceServerName%20eq%20'myserver01')%20and%20(SourceDatabaseName%20eq%20'testdb1') + GET + WindowsAzurePowershell/v0.7.3.1 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + l79VtJX6+2OViFSUL4OEh+nB557YUekHHOZ3oAKYkXXWvGjkxSk9KGpKm+IBtB+/Me3rxBIi9kuLfRftbmPpvB3u2p+3grAIt+6fLEfGT4Pwi0OAwyqvQ4mmYg3atXCrtNVd2ORovRU3Jj61Kk3yQBl+QulBFskAcnCGauCoMeCkvPhlYNjEPaHN3tekqOcTb3K6Q5gdcOmE6oQyeWJa5KSBpDsImtiP1NOg97sowwHT95I/q73L6Lhqz2NcT1pdeH+bF+hyVzMDg6fmQeBXMOF0ujjPssHBSO85m9ZYFl6xeHwOuYliFrVgUUqsblDfEdth/yHUJV7w6fvySg1c6yyD3pkvx1Migksd+5lJ1dtF7hdRRuzEWg2Nq97hQWRD2r9GRcPB1ZhCf2p15qU4J5vN/PypXI0+NzEnM91qWBuQisZKUxKNFARVeogSkStwO9Ehz+xOt3srrsPPZB2DtZZFaTJSa+TsblFdw9gX465/WefGJwGZJ8O3+Bp8aMxHKEDhDPp8t8QKIxx61AqbTaPf8KJoUZ0C3JYH0fmAQHGc3EODBuvizUAsY53pWkTT5vRxPyC33ypDE6zNne8F4L+VJlPOn8HTTY3+u8ycpPJT+vfCWKbzoiMH39+qMyB2EgVzHreLIyNdwXkhxxyWUzzd2esLRGZImRv8Hl4RyHcWuovHYyIJ9MERXFSWcvOVrPVArugeZevb0R2h9WpX+grtcTRGFGx0VedbeYvjFeCRVhGkm3nhVkFwg/q9uAEI7x17F9h0YRE/+u4JT0bthQ== +
+
+ x-ms-client-session-id + b224166f-fb0f-492f-9814-2209e35d8c8a-2012-10-11 19:40:05Z +
+
+ x-ms-client-request-id + 34983f19-cfdd-42ee-ba7b-2e2f1158bceb-2012-10-11 19:40:08Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=/kpY7HXYKQVFel7he62rwQ== +
+
+ + + .SQLSERVERMANAGEMENT + /kpY7HXYKQVFel7he62rwQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + b224166f-fb0f-492f-9814-2209e35d8c8a +
+
+ DataServiceVersion + 1.0; +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;charset=utf-8 +
+
+ Date + Thu, 11 Oct 2012 19:40:24 GMT +
+
+ + + <?xml version="1.0" encoding="utf-8" standalone="yes"?> + <feed xml:base="http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom"> + <title type="text">DatabaseCopies</title> + <id>http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/DatabaseCopies</id> + <updated>2012-10-11T19:40:25Z</updated> + <link rel="self" title="DatabaseCopies" href="DatabaseCopies" /> + <entry> + <id>http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/DatabaseCopies(guid'bd2822fe-13e6-4357-a835-47964b4fa1e5')</id> + <title type="text"></title> + <updated>2012-10-11T19:40:25Z</updated> + <author> + <name /> + </author> + <link rel="edit" title="DatabaseCopy" href="DatabaseCopies(guid'bd2822fe-13e6-4357-a835-47964b4fa1e5')" /> + <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Database" type="application/atom+xml;type=entry" title="Database" href="DatabaseCopies(guid'bd2822fe-13e6-4357-a835-47964b4fa1e5')/Database" /> + <category term="Microsoft.SqlServer.Management.Server.Domain.DatabaseCopy" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /> + <content type="application/xml"> + <m:properties> + <d:LocalDatabaseId m:type="Edm.Int32">4</d:LocalDatabaseId> + <d:DestinationServerName>partnersrv</d:DestinationServerName> + <d:DestinationDatabaseName>testdb1</d:DestinationDatabaseName> + <d:SourceServerName>myserver01</d:SourceServerName> + <d:SourceDatabaseName>testdb1</d:SourceDatabaseName> + <d:IsContinuous m:type="Edm.Boolean">true</d:IsContinuous> + <d:TextStartDate>2012-10-11T19:40:19.9330000Z</d:TextStartDate> + <d:TextModifyDate>2012-10-11T19:40:19.9330000Z</d:TextModifyDate> + <d:PercentComplete m:type="Edm.Single" m:null="true" /> + <d:IsLocalDatabaseReplicationTarget m:type="Edm.Boolean">false</d:IsLocalDatabaseReplicationTarget> + <d:ReplicationState m:type="Edm.Byte">0</d:ReplicationState> + <d:ReplicationStateDescription>PENDING</d:ReplicationStateDescription> + <d:IsInterlinkConnected m:type="Edm.Boolean">true</d:IsInterlinkConnected> + <d:IsForcedTerminate m:type="Edm.Boolean" m:null="true" /> + <d:MaximumLag m:type="Edm.Int32" m:null="true" /> + <d:EntityId m:type="Edm.Guid">bd2822fe-13e6-4357-a835-47964b4fa1e5</d:EntityId> + </m:properties> + </content> + </entry> + </feed> + +
+
+ + 3 + + http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/DatabaseCopies()?$filter=(DestinationServerName%20eq%20'myserver01')%20and%20(DestinationDatabaseName%20eq%20'testdb1') + GET + WindowsAzurePowershell/v0.7.3.1 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + l79VtJX6+2OViFSUL4OEh+nB557YUekHHOZ3oAKYkXXWvGjkxSk9KGpKm+IBtB+/Me3rxBIi9kuLfRftbmPpvB3u2p+3grAIt+6fLEfGT4Pwi0OAwyqvQ4mmYg3atXCrtNVd2ORovRU3Jj61Kk3yQBl+QulBFskAcnCGauCoMeCkvPhlYNjEPaHN3tekqOcTb3K6Q5gdcOmE6oQyeWJa5KSBpDsImtiP1NOg97sowwHT95I/q73L6Lhqz2NcT1pdeH+bF+hyVzMDg6fmQeBXMOF0ujjPssHBSO85m9ZYFl6xeHwOuYliFrVgUUqsblDfEdth/yHUJV7w6fvySg1c6yyD3pkvx1Migksd+5lJ1dtF7hdRRuzEWg2Nq97hQWRD2r9GRcPB1ZhCf2p15qU4J5vN/PypXI0+NzEnM91qWBuQisZKUxKNFARVeogSkStwO9Ehz+xOt3srrsPPZB2DtZZFaTJSa+TsblFdw9gX465/WefGJwGZJ8O3+Bp8aMxHKEDhDPp8t8QKIxx61AqbTaPf8KJoUZ0C3JYH0fmAQHGc3EODBuvizUAsY53pWkTT5vRxPyC33ypDE6zNne8F4L+VJlPOn8HTTY3+u8ycpPJT+vfCWKbzoiMH39+qMyB2EgVzHreLIyNdwXkhxxyWUzzd2esLRGZImRv8Hl4RyHcWuovHYyIJ9MERXFSWcvOVrPVArugeZevb0R2h9WpX+grtcTRGFGx0VedbeYvjFeCRVhGkm3nhVkFwg/q9uAEI7x17F9h0YRE/+u4JT0bthQ== +
+
+ x-ms-client-session-id + b224166f-fb0f-492f-9814-2209e35d8c8a-2012-10-11 19:40:05Z +
+
+ x-ms-client-request-id + 34983f19-cfdd-42ee-ba7b-2e2f1158bceb-2012-10-11 19:40:08Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=/kpY7HXYKQVFel7he62rwQ== +
+
+ + + .SQLSERVERMANAGEMENT + /kpY7HXYKQVFel7he62rwQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + b224166f-fb0f-492f-9814-2209e35d8c8a +
+
+ DataServiceVersion + 1.0; +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;charset=utf-8 +
+
+ Date + Thu, 11 Oct 2012 19:40:24 GMT +
+
+ + + <?xml version="1.0" encoding="utf-8" standalone="yes"?> + <feed xml:base="https://test1683510.abc1683510-gu.adhoc.mscds.com/v1/ManagementService.svc/Server2('test1683510')/" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom"> + <title type="text">DatabaseCopies</title> + <id>https://test1683510.abc1683510-gu.adhoc.mscds.com/v1/ManagementService.svc/Server2('test1683510')/DatabaseCopies</id> + <updated>2012-10-11T19:40:25Z</updated> + <author> + <name /> + </author> + <link rel="self" title="DatabaseCopies" href="DatabaseCopies" /> + </feed> + +
+
+ + 4 + + http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/DatabaseCopies()?$filter=(SourceServerName%20eq%20'myserver01')%20and%20(SourceDatabaseName%20eq%20'testdb2') + GET + WindowsAzurePowershell/v0.7.3.1 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + l79VtJX6+2OViFSUL4OEh+nB557YUekHHOZ3oAKYkXXWvGjkxSk9KGpKm+IBtB+/Me3rxBIi9kuLfRftbmPpvB3u2p+3grAIt+6fLEfGT4Pwi0OAwyqvQ4mmYg3atXCrtNVd2ORovRU3Jj61Kk3yQBl+QulBFskAcnCGauCoMeCkvPhlYNjEPaHN3tekqOcTb3K6Q5gdcOmE6oQyeWJa5KSBpDsImtiP1NOg97sowwHT95I/q73L6Lhqz2NcT1pdeH+bF+hyVzMDg6fmQeBXMOF0ujjPssHBSO85m9ZYFl6xeHwOuYliFrVgUUqsblDfEdth/yHUJV7w6fvySg1c6yyD3pkvx1Migksd+5lJ1dtF7hdRRuzEWg2Nq97hQWRD2r9GRcPB1ZhCf2p15qU4J5vN/PypXI0+NzEnM91qWBuQisZKUxKNFARVeogSkStwO9Ehz+xOt3srrsPPZB2DtZZFaTJSa+TsblFdw9gX465/WefGJwGZJ8O3+Bp8aMxHKEDhDPp8t8QKIxx61AqbTaPf8KJoUZ0C3JYH0fmAQHGc3EODBuvizUAsY53pWkTT5vRxPyC33ypDE6zNne8F4L+VJlPOn8HTTY3+u8ycpPJT+vfCWKbzoiMH39+qMyB2EgVzHreLIyNdwXkhxxyWUzzd2esLRGZImRv8Hl4RyHcWuovHYyIJ9MERXFSWcvOVrPVArugeZevb0R2h9WpX+grtcTRGFGx0VedbeYvjFeCRVhGkm3nhVkFwg/q9uAEI7x17F9h0YRE/+u4JT0bthQ== +
+
+ x-ms-client-session-id + b224166f-fb0f-492f-9814-2209e35d8c8a-2012-10-11 19:40:05Z +
+
+ x-ms-client-request-id + 34983f19-cfdd-42ee-ba7b-2e2f1158bceb-2012-10-11 19:40:08Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=/kpY7HXYKQVFel7he62rwQ== +
+
+ + + .SQLSERVERMANAGEMENT + /kpY7HXYKQVFel7he62rwQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + b224166f-fb0f-492f-9814-2209e35d8c8a +
+
+ DataServiceVersion + 1.0; +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;charset=utf-8 +
+
+ Date + Thu, 11 Oct 2012 19:40:24 GMT +
+
+ + + <?xml version="1.0" encoding="utf-8" standalone="yes"?> + <feed xml:base="http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom"> + <title type="text">DatabaseCopies</title> + <id>http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/DatabaseCopies</id> + <updated>2012-10-11T19:40:25Z</updated> + <link rel="self" title="DatabaseCopies" href="DatabaseCopies" /> + <entry> + <id>http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/DatabaseCopies(guid'55422252-8273-47da-ae66-7d3d9ca1f4e3')</id> + <title type="text"></title> + <updated>2012-10-11T19:40:25Z</updated> + <author> + <name /> + </author> + <link rel="edit" title="DatabaseCopy" href="DatabaseCopies(guid'55422252-8273-47da-ae66-7d3d9ca1f4e3')" /> + <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Database" type="application/atom+xml;type=entry" title="Database" href="DatabaseCopies(guid'55422252-8273-47da-ae66-7d3d9ca1f4e3')/Database" /> + <category term="Microsoft.SqlServer.Management.Server.Domain.DatabaseCopy" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /> + <content type="application/xml"> + <m:properties> + <d:LocalDatabaseId m:type="Edm.Int32">5</d:LocalDatabaseId> + <d:DestinationServerName>partnersrv</d:DestinationServerName> + <d:DestinationDatabaseName>testdb2</d:DestinationDatabaseName> + <d:SourceServerName>myserver01</d:SourceServerName> + <d:SourceDatabaseName>testdb2</d:SourceDatabaseName> + <d:IsContinuous m:type="Edm.Boolean">true</d:IsContinuous> + <d:TextStartDate>2012-10-11T19:40:21.7100000Z</d:TextStartDate> + <d:TextModifyDate>2012-10-11T19:40:21.7100000Z</d:TextModifyDate> + <d:PercentComplete m:type="Edm.Single" m:null="true" /> + <d:IsLocalDatabaseReplicationTarget m:type="Edm.Boolean">false</d:IsLocalDatabaseReplicationTarget> + <d:ReplicationState m:type="Edm.Byte">0</d:ReplicationState> + <d:ReplicationStateDescription>PENDING</d:ReplicationStateDescription> + <d:IsInterlinkConnected m:type="Edm.Boolean">true</d:IsInterlinkConnected> + <d:IsForcedTerminate m:type="Edm.Boolean" m:null="true" /> + <d:MaximumLag m:type="Edm.Int32" m:null="true" /> + <d:EntityId m:type="Edm.Guid">55422252-8273-47da-ae66-7d3d9ca1f4e3</d:EntityId> + </m:properties> + </content> + </entry> + </feed> + +
+
+ + 5 + + http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/DatabaseCopies()?$filter=(DestinationServerName%20eq%20'myserver01')%20and%20(DestinationDatabaseName%20eq%20'testdb2') + GET + WindowsAzurePowershell/v0.7.3.1 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + l79VtJX6+2OViFSUL4OEh+nB557YUekHHOZ3oAKYkXXWvGjkxSk9KGpKm+IBtB+/Me3rxBIi9kuLfRftbmPpvB3u2p+3grAIt+6fLEfGT4Pwi0OAwyqvQ4mmYg3atXCrtNVd2ORovRU3Jj61Kk3yQBl+QulBFskAcnCGauCoMeCkvPhlYNjEPaHN3tekqOcTb3K6Q5gdcOmE6oQyeWJa5KSBpDsImtiP1NOg97sowwHT95I/q73L6Lhqz2NcT1pdeH+bF+hyVzMDg6fmQeBXMOF0ujjPssHBSO85m9ZYFl6xeHwOuYliFrVgUUqsblDfEdth/yHUJV7w6fvySg1c6yyD3pkvx1Migksd+5lJ1dtF7hdRRuzEWg2Nq97hQWRD2r9GRcPB1ZhCf2p15qU4J5vN/PypXI0+NzEnM91qWBuQisZKUxKNFARVeogSkStwO9Ehz+xOt3srrsPPZB2DtZZFaTJSa+TsblFdw9gX465/WefGJwGZJ8O3+Bp8aMxHKEDhDPp8t8QKIxx61AqbTaPf8KJoUZ0C3JYH0fmAQHGc3EODBuvizUAsY53pWkTT5vRxPyC33ypDE6zNne8F4L+VJlPOn8HTTY3+u8ycpPJT+vfCWKbzoiMH39+qMyB2EgVzHreLIyNdwXkhxxyWUzzd2esLRGZImRv8Hl4RyHcWuovHYyIJ9MERXFSWcvOVrPVArugeZevb0R2h9WpX+grtcTRGFGx0VedbeYvjFeCRVhGkm3nhVkFwg/q9uAEI7x17F9h0YRE/+u4JT0bthQ== +
+
+ x-ms-client-session-id + b224166f-fb0f-492f-9814-2209e35d8c8a-2012-10-11 19:40:05Z +
+
+ x-ms-client-request-id + 34983f19-cfdd-42ee-ba7b-2e2f1158bceb-2012-10-11 19:40:08Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=/kpY7HXYKQVFel7he62rwQ== +
+
+ + + .SQLSERVERMANAGEMENT + /kpY7HXYKQVFel7he62rwQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + b224166f-fb0f-492f-9814-2209e35d8c8a +
+
+ DataServiceVersion + 1.0; +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;charset=utf-8 +
+
+ Date + Thu, 11 Oct 2012 19:40:24 GMT +
+
+ + + <?xml version="1.0" encoding="utf-8" standalone="yes"?> + <feed xml:base="https://test1683510.abc1683510-gu.adhoc.mscds.com/v1/ManagementService.svc/Server2('test1683510')/" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom"> + <title type="text">DatabaseCopies</title> + <id>https://test1683510.abc1683510-gu.adhoc.mscds.com/v1/ManagementService.svc/Server2('test1683510')/DatabaseCopies</id> + <updated>2012-10-11T19:40:25Z</updated> + <author> + <name /> + </author> + <link rel="self" title="DatabaseCopies" href="DatabaseCopies" /> + </feed> + +
+
+
+
+ + UnitTest.Common.StartAzureSqlDatabaseContinuousCopyWithSqlAuth.testdb1 + + + 0 + + http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/DatabaseCopies + POST + WindowsAzurePowershell/v0.7.3.1 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + l79VtJX6+2OViFSUL4OEh+nB557YUekHHOZ3oAKYkXXWvGjkxSk9KGpKm+IBtB+/Me3rxBIi9kuLfRftbmPpvB3u2p+3grAIt+6fLEfGT4Pwi0OAwyqvQ4mmYg3atXCrtNVd2ORovRU3Jj61Kk3yQBl+QulBFskAcnCGauCoMeCkvPhlYNjEPaHN3tekqOcTb3K6Q5gdcOmE6oQyeWJa5KSBpDsImtiP1NOg97sowwHT95I/q73L6Lhqz2NcT1pdeH+bF+hyVzMDg6fmQeBXMOF0ujjPssHBSO85m9ZYFl6xeHwOuYliFrVgUUqsblDfEdth/yHUJV7w6fvySg1c6yyD3pkvx1Migksd+5lJ1dtF7hdRRuzEWg2Nq97hQWRD2r9GRcPB1ZhCf2p15qU4J5vN/PypXI0+NzEnM91qWBuQisZKUxKNFARVeogSkStwO9Ehz+xOt3srrsPPZB2DtZZFaTJSa+TsblFdw9gX465/WefGJwGZJ8O3+Bp8aMxHKEDhDPp8t8QKIxx61AqbTaPf8KJoUZ0C3JYH0fmAQHGc3EODBuvizUAsY53pWkTT5vRxPyC33ypDE6zNne8F4L+VJlPOn8HTTY3+u8ycpPJT+vfCWKbzoiMH39+qMyB2EgVzHreLIyNdwXkhxxyWUzzd2esLRGZImRv8Hl4RyHcWuovHYyIJ9MERXFSWcvOVrPVArugeZevb0R2h9WpX+grtcTRGFGx0VedbeYvjFeCRVhGkm3nhVkFwg/q9uAEI7x17F9h0YRE/+u4JT0bthQ== +
+
+ x-ms-client-session-id + b224166f-fb0f-492f-9814-2209e35d8c8a-2012-10-11 19:40:05Z +
+
+ x-ms-client-request-id + 34983f19-cfdd-42ee-ba7b-2e2f1158bceb-2012-10-11 19:40:08Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=/kpY7HXYKQVFel7he62rwQ== +
+
+ + + .SQLSERVERMANAGEMENT + /kpY7HXYKQVFel7he62rwQ== + + + + + <?xml version="1.0" encoding="utf-8" standalone="yes"?> + <entry xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom"> + <title /> + <author> + <name /> + </author> + <updated>2012-10-11T19:40:15.578556Z</updated> + <id /> + <content type="application/xml"> + <m:properties> + <d:DestinationDatabaseName>testdb1</d:DestinationDatabaseName> + <d:DestinationServerName>partnersrv</d:DestinationServerName> + <d:EntityId m:type="Edm.Guid">00000000-0000-0000-0000-000000000000</d:EntityId> + <d:IsContinuous m:type="Edm.Boolean">true</d:IsContinuous> + <d:IsForcedTerminate m:type="Edm.Boolean" m:null="true" /> + <d:IsInterlinkConnected m:type="Edm.Boolean">false</d:IsInterlinkConnected> + <d:IsLocalDatabaseReplicationTarget m:type="Edm.Boolean">false</d:IsLocalDatabaseReplicationTarget> + <d:LocalDatabaseId m:type="Edm.Int32">0</d:LocalDatabaseId> + <d:MaximumLag m:type="Edm.Int32" m:null="true" /> + <d:PercentComplete m:type="Edm.Single" m:null="true" /> + <d:ReplicationState m:type="Edm.Byte">0</d:ReplicationState> + <d:ReplicationStateDescription m:null="true" /> + <d:SourceDatabaseName>testdb1</d:SourceDatabaseName> + <d:SourceServerName>myserver01</d:SourceServerName> + <d:TextModifyDate m:null="true" /> + <d:TextStartDate m:null="true" /> + </m:properties> + </content> + </entry> + + application/atom+xml + application/atom+xml,application/xml +
+ + Created + +
+ x-ms-request-id + b224166f-fb0f-492f-9814-2209e35d8c8a +
+
+ DataServiceVersion + 1.0; +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;charset=utf-8 +
+
+ Date + Thu, 11 Oct 2012 19:40:20 GMT +
+
+ Location + https://test1683510.abc1683510-gu.adhoc.mscds.com/v1/ManagementService.svc/Server2('test1683510')/DatabaseCopies(guid'bd2822fe-13e6-4357-a835-47964b4fa1e5') +
+
+ + + <?xml version="1.0" encoding="utf-8" standalone="yes"?> + <entry xml:base="http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom"> + <id>http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/DatabaseCopies(guid'bd2822fe-13e6-4357-a835-47964b4fa1e5')</id> + <title type="text"></title> + <updated>2012-10-11T19:40:20Z</updated> + <author> + <name /> + </author> + <link rel="edit" title="DatabaseCopy" href="DatabaseCopies(guid'bd2822fe-13e6-4357-a835-47964b4fa1e5')" /> + <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Database" type="application/atom+xml;type=entry" title="Database" href="DatabaseCopies(guid'bd2822fe-13e6-4357-a835-47964b4fa1e5')/Database" /> + <category term="Microsoft.SqlServer.Management.Server.Domain.DatabaseCopy" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /> + <content type="application/xml"> + <m:properties> + <d:LocalDatabaseId m:type="Edm.Int32">0</d:LocalDatabaseId> + <d:DestinationServerName>partnersrv</d:DestinationServerName> + <d:DestinationDatabaseName>testdb1</d:DestinationDatabaseName> + <d:SourceServerName>myserver01</d:SourceServerName> + <d:SourceDatabaseName>testdb1</d:SourceDatabaseName> + <d:IsContinuous m:type="Edm.Boolean">true</d:IsContinuous> + <d:TextStartDate m:null="true" /> + <d:TextModifyDate m:null="true" /> + <d:PercentComplete m:type="Edm.Single" m:null="true" /> + <d:IsLocalDatabaseReplicationTarget m:type="Edm.Boolean">false</d:IsLocalDatabaseReplicationTarget> + <d:ReplicationState m:type="Edm.Byte">0</d:ReplicationState> + <d:ReplicationStateDescription m:null="true" /> + <d:IsInterlinkConnected m:type="Edm.Boolean">false</d:IsInterlinkConnected> + <d:IsForcedTerminate m:type="Edm.Boolean" m:null="true" /> + <d:MaximumLag m:type="Edm.Int32" m:null="true" /> + <d:EntityId m:type="Edm.Guid">bd2822fe-13e6-4357-a835-47964b4fa1e5</d:EntityId> + </m:properties> + </content> + </entry> + +
+
+ + 1 + + http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/DatabaseCopies()?$filter=(((SourceServerName%20eq%20'myserver01')%20and%20(SourceDatabaseName%20eq%20'testdb1'))%20and%20(DestinationServerName%20eq%20'partnersrv'))%20and%20(DestinationDatabaseName%20eq%20'testdb1')&$top=2 + GET + WindowsAzurePowershell/v0.7.3.1 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + l79VtJX6+2OViFSUL4OEh+nB557YUekHHOZ3oAKYkXXWvGjkxSk9KGpKm+IBtB+/Me3rxBIi9kuLfRftbmPpvB3u2p+3grAIt+6fLEfGT4Pwi0OAwyqvQ4mmYg3atXCrtNVd2ORovRU3Jj61Kk3yQBl+QulBFskAcnCGauCoMeCkvPhlYNjEPaHN3tekqOcTb3K6Q5gdcOmE6oQyeWJa5KSBpDsImtiP1NOg97sowwHT95I/q73L6Lhqz2NcT1pdeH+bF+hyVzMDg6fmQeBXMOF0ujjPssHBSO85m9ZYFl6xeHwOuYliFrVgUUqsblDfEdth/yHUJV7w6fvySg1c6yyD3pkvx1Migksd+5lJ1dtF7hdRRuzEWg2Nq97hQWRD2r9GRcPB1ZhCf2p15qU4J5vN/PypXI0+NzEnM91qWBuQisZKUxKNFARVeogSkStwO9Ehz+xOt3srrsPPZB2DtZZFaTJSa+TsblFdw9gX465/WefGJwGZJ8O3+Bp8aMxHKEDhDPp8t8QKIxx61AqbTaPf8KJoUZ0C3JYH0fmAQHGc3EODBuvizUAsY53pWkTT5vRxPyC33ypDE6zNne8F4L+VJlPOn8HTTY3+u8ycpPJT+vfCWKbzoiMH39+qMyB2EgVzHreLIyNdwXkhxxyWUzzd2esLRGZImRv8Hl4RyHcWuovHYyIJ9MERXFSWcvOVrPVArugeZevb0R2h9WpX+grtcTRGFGx0VedbeYvjFeCRVhGkm3nhVkFwg/q9uAEI7x17F9h0YRE/+u4JT0bthQ== +
+
+ x-ms-client-session-id + b224166f-fb0f-492f-9814-2209e35d8c8a-2012-10-11 19:40:05Z +
+
+ x-ms-client-request-id + 34983f19-cfdd-42ee-ba7b-2e2f1158bceb-2012-10-11 19:40:08Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=/kpY7HXYKQVFel7he62rwQ== +
+
+ + + .SQLSERVERMANAGEMENT + /kpY7HXYKQVFel7he62rwQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + b224166f-fb0f-492f-9814-2209e35d8c8a +
+
+ DataServiceVersion + 1.0; +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;charset=utf-8 +
+
+ Date + Thu, 11 Oct 2012 19:40:20 GMT +
+
+ + + <?xml version="1.0" encoding="utf-8" standalone="yes"?> + <feed xml:base="http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom"> + <title type="text">DatabaseCopies</title> + <id>http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/DatabaseCopies</id> + <updated>2012-10-11T19:40:20Z</updated> + <link rel="self" title="DatabaseCopies" href="DatabaseCopies" /> + <entry> + <id>http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/DatabaseCopies(guid'bd2822fe-13e6-4357-a835-47964b4fa1e5')</id> + <title type="text"></title> + <updated>2012-10-11T19:40:20Z</updated> + <author> + <name /> + </author> + <link rel="edit" title="DatabaseCopy" href="DatabaseCopies(guid'bd2822fe-13e6-4357-a835-47964b4fa1e5')" /> + <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Database" type="application/atom+xml;type=entry" title="Database" href="DatabaseCopies(guid'bd2822fe-13e6-4357-a835-47964b4fa1e5')/Database" /> + <category term="Microsoft.SqlServer.Management.Server.Domain.DatabaseCopy" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /> + <content type="application/xml"> + <m:properties> + <d:LocalDatabaseId m:type="Edm.Int32">4</d:LocalDatabaseId> + <d:DestinationServerName>partnersrv</d:DestinationServerName> + <d:DestinationDatabaseName>testdb1</d:DestinationDatabaseName> + <d:SourceServerName>myserver01</d:SourceServerName> + <d:SourceDatabaseName>testdb1</d:SourceDatabaseName> + <d:IsContinuous m:type="Edm.Boolean">true</d:IsContinuous> + <d:TextStartDate>2012-10-11T19:40:19.9330000Z</d:TextStartDate> + <d:TextModifyDate>2012-10-11T19:40:19.9330000Z</d:TextModifyDate> + <d:PercentComplete m:type="Edm.Single" m:null="true" /> + <d:IsLocalDatabaseReplicationTarget m:type="Edm.Boolean">false</d:IsLocalDatabaseReplicationTarget> + <d:ReplicationState m:type="Edm.Byte">0</d:ReplicationState> + <d:ReplicationStateDescription>PENDING</d:ReplicationStateDescription> + <d:IsInterlinkConnected m:type="Edm.Boolean">true</d:IsInterlinkConnected> + <d:IsForcedTerminate m:type="Edm.Boolean" m:null="true" /> + <d:MaximumLag m:type="Edm.Int32" m:null="true" /> + <d:EntityId m:type="Edm.Guid">bd2822fe-13e6-4357-a835-47964b4fa1e5</d:EntityId> + </m:properties> + </content> + </entry> + </feed> + +
+
+
+
+ + UnitTest.Common.StartAzureSqlDatabaseContinuousCopyWithSqlAuth.testdb2 + + + 0 + + http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/DatabaseCopies + POST + WindowsAzurePowershell/v0.7.3.1 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + l79VtJX6+2OViFSUL4OEh+nB557YUekHHOZ3oAKYkXXWvGjkxSk9KGpKm+IBtB+/Me3rxBIi9kuLfRftbmPpvB3u2p+3grAIt+6fLEfGT4Pwi0OAwyqvQ4mmYg3atXCrtNVd2ORovRU3Jj61Kk3yQBl+QulBFskAcnCGauCoMeCkvPhlYNjEPaHN3tekqOcTb3K6Q5gdcOmE6oQyeWJa5KSBpDsImtiP1NOg97sowwHT95I/q73L6Lhqz2NcT1pdeH+bF+hyVzMDg6fmQeBXMOF0ujjPssHBSO85m9ZYFl6xeHwOuYliFrVgUUqsblDfEdth/yHUJV7w6fvySg1c6yyD3pkvx1Migksd+5lJ1dtF7hdRRuzEWg2Nq97hQWRD2r9GRcPB1ZhCf2p15qU4J5vN/PypXI0+NzEnM91qWBuQisZKUxKNFARVeogSkStwO9Ehz+xOt3srrsPPZB2DtZZFaTJSa+TsblFdw9gX465/WefGJwGZJ8O3+Bp8aMxHKEDhDPp8t8QKIxx61AqbTaPf8KJoUZ0C3JYH0fmAQHGc3EODBuvizUAsY53pWkTT5vRxPyC33ypDE6zNne8F4L+VJlPOn8HTTY3+u8ycpPJT+vfCWKbzoiMH39+qMyB2EgVzHreLIyNdwXkhxxyWUzzd2esLRGZImRv8Hl4RyHcWuovHYyIJ9MERXFSWcvOVrPVArugeZevb0R2h9WpX+grtcTRGFGx0VedbeYvjFeCRVhGkm3nhVkFwg/q9uAEI7x17F9h0YRE/+u4JT0bthQ== +
+
+ x-ms-client-session-id + b224166f-fb0f-492f-9814-2209e35d8c8a-2012-10-11 19:40:05Z +
+
+ x-ms-client-request-id + 34983f19-cfdd-42ee-ba7b-2e2f1158bceb-2012-10-11 19:40:08Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=/kpY7HXYKQVFel7he62rwQ== +
+
+ + + .SQLSERVERMANAGEMENT + /kpY7HXYKQVFel7he62rwQ== + + + + + <?xml version="1.0" encoding="utf-8" standalone="yes"?> + <entry xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom"> + <title /> + <author> + <name /> + </author> + <updated>2012-10-11T19:40:20.5930574Z</updated> + <id /> + <content type="application/xml"> + <m:properties> + <d:DestinationDatabaseName>testdb2</d:DestinationDatabaseName> + <d:DestinationServerName>partnersrv</d:DestinationServerName> + <d:EntityId m:type="Edm.Guid">00000000-0000-0000-0000-000000000000</d:EntityId> + <d:IsContinuous m:type="Edm.Boolean">true</d:IsContinuous> + <d:IsForcedTerminate m:type="Edm.Boolean" m:null="true" /> + <d:IsInterlinkConnected m:type="Edm.Boolean">false</d:IsInterlinkConnected> + <d:IsLocalDatabaseReplicationTarget m:type="Edm.Boolean">false</d:IsLocalDatabaseReplicationTarget> + <d:LocalDatabaseId m:type="Edm.Int32">0</d:LocalDatabaseId> + <d:MaximumLag m:type="Edm.Int32" m:null="true" /> + <d:PercentComplete m:type="Edm.Single" m:null="true" /> + <d:ReplicationState m:type="Edm.Byte">0</d:ReplicationState> + <d:ReplicationStateDescription m:null="true" /> + <d:SourceDatabaseName>testdb2</d:SourceDatabaseName> + <d:SourceServerName>myserver01</d:SourceServerName> + <d:TextModifyDate m:null="true" /> + <d:TextStartDate m:null="true" /> + </m:properties> + </content> + </entry> + + application/atom+xml + application/atom+xml,application/xml +
+ + Created + +
+ x-ms-request-id + b224166f-fb0f-492f-9814-2209e35d8c8a +
+
+ DataServiceVersion + 1.0; +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;charset=utf-8 +
+
+ Date + Thu, 11 Oct 2012 19:40:23 GMT +
+
+ Location + https://test1683510.abc1683510-gu.adhoc.mscds.com/v1/ManagementService.svc/Server2('test1683510')/DatabaseCopies(guid'55422252-8273-47da-ae66-7d3d9ca1f4e3') +
+
+ + + <?xml version="1.0" encoding="utf-8" standalone="yes"?> + <entry xml:base="http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom"> + <id>http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/DatabaseCopies(guid'55422252-8273-47da-ae66-7d3d9ca1f4e3')</id> + <title type="text"></title> + <updated>2012-10-11T19:40:24Z</updated> + <author> + <name /> + </author> + <link rel="edit" title="DatabaseCopy" href="DatabaseCopies(guid'55422252-8273-47da-ae66-7d3d9ca1f4e3')" /> + <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Database" type="application/atom+xml;type=entry" title="Database" href="DatabaseCopies(guid'55422252-8273-47da-ae66-7d3d9ca1f4e3')/Database" /> + <category term="Microsoft.SqlServer.Management.Server.Domain.DatabaseCopy" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /> + <content type="application/xml"> + <m:properties> + <d:LocalDatabaseId m:type="Edm.Int32">0</d:LocalDatabaseId> + <d:DestinationServerName>partnersrv</d:DestinationServerName> + <d:DestinationDatabaseName>testdb2</d:DestinationDatabaseName> + <d:SourceServerName>myserver01</d:SourceServerName> + <d:SourceDatabaseName>testdb2</d:SourceDatabaseName> + <d:IsContinuous m:type="Edm.Boolean">true</d:IsContinuous> + <d:TextStartDate m:null="true" /> + <d:TextModifyDate m:null="true" /> + <d:PercentComplete m:type="Edm.Single" m:null="true" /> + <d:IsLocalDatabaseReplicationTarget m:type="Edm.Boolean">false</d:IsLocalDatabaseReplicationTarget> + <d:ReplicationState m:type="Edm.Byte">0</d:ReplicationState> + <d:ReplicationStateDescription m:null="true" /> + <d:IsInterlinkConnected m:type="Edm.Boolean">false</d:IsInterlinkConnected> + <d:IsForcedTerminate m:type="Edm.Boolean" m:null="true" /> + <d:MaximumLag m:type="Edm.Int32" m:null="true" /> + <d:EntityId m:type="Edm.Guid">55422252-8273-47da-ae66-7d3d9ca1f4e3</d:EntityId> + </m:properties> + </content> + </entry> + +
+
+ + 1 + + http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/DatabaseCopies()?$filter=(((SourceServerName%20eq%20'myserver01')%20and%20(SourceDatabaseName%20eq%20'testdb2'))%20and%20(DestinationServerName%20eq%20'partnersrv'))%20and%20(DestinationDatabaseName%20eq%20'testdb2')&$top=2 + GET + WindowsAzurePowershell/v0.7.3.1 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + l79VtJX6+2OViFSUL4OEh+nB557YUekHHOZ3oAKYkXXWvGjkxSk9KGpKm+IBtB+/Me3rxBIi9kuLfRftbmPpvB3u2p+3grAIt+6fLEfGT4Pwi0OAwyqvQ4mmYg3atXCrtNVd2ORovRU3Jj61Kk3yQBl+QulBFskAcnCGauCoMeCkvPhlYNjEPaHN3tekqOcTb3K6Q5gdcOmE6oQyeWJa5KSBpDsImtiP1NOg97sowwHT95I/q73L6Lhqz2NcT1pdeH+bF+hyVzMDg6fmQeBXMOF0ujjPssHBSO85m9ZYFl6xeHwOuYliFrVgUUqsblDfEdth/yHUJV7w6fvySg1c6yyD3pkvx1Migksd+5lJ1dtF7hdRRuzEWg2Nq97hQWRD2r9GRcPB1ZhCf2p15qU4J5vN/PypXI0+NzEnM91qWBuQisZKUxKNFARVeogSkStwO9Ehz+xOt3srrsPPZB2DtZZFaTJSa+TsblFdw9gX465/WefGJwGZJ8O3+Bp8aMxHKEDhDPp8t8QKIxx61AqbTaPf8KJoUZ0C3JYH0fmAQHGc3EODBuvizUAsY53pWkTT5vRxPyC33ypDE6zNne8F4L+VJlPOn8HTTY3+u8ycpPJT+vfCWKbzoiMH39+qMyB2EgVzHreLIyNdwXkhxxyWUzzd2esLRGZImRv8Hl4RyHcWuovHYyIJ9MERXFSWcvOVrPVArugeZevb0R2h9WpX+grtcTRGFGx0VedbeYvjFeCRVhGkm3nhVkFwg/q9uAEI7x17F9h0YRE/+u4JT0bthQ== +
+
+ x-ms-client-session-id + b224166f-fb0f-492f-9814-2209e35d8c8a-2012-10-11 19:40:05Z +
+
+ x-ms-client-request-id + 34983f19-cfdd-42ee-ba7b-2e2f1158bceb-2012-10-11 19:40:08Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=/kpY7HXYKQVFel7he62rwQ== +
+
+ + + .SQLSERVERMANAGEMENT + /kpY7HXYKQVFel7he62rwQ== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + b224166f-fb0f-492f-9814-2209e35d8c8a +
+
+ DataServiceVersion + 1.0; +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;charset=utf-8 +
+
+ Date + Thu, 11 Oct 2012 19:40:24 GMT +
+
+ + + <?xml version="1.0" encoding="utf-8" standalone="yes"?> + <feed xml:base="http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom"> + <title type="text">DatabaseCopies</title> + <id>http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/DatabaseCopies</id> + <updated>2012-10-11T19:40:24Z</updated> + <link rel="self" title="DatabaseCopies" href="DatabaseCopies" /> + <entry> + <id>http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/DatabaseCopies(guid'55422252-8273-47da-ae66-7d3d9ca1f4e3')</id> + <title type="text"></title> + <updated>2012-10-11T19:40:24Z</updated> + <author> + <name /> + </author> + <link rel="edit" title="DatabaseCopy" href="DatabaseCopies(guid'55422252-8273-47da-ae66-7d3d9ca1f4e3')" /> + <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Database" type="application/atom+xml;type=entry" title="Database" href="DatabaseCopies(guid'55422252-8273-47da-ae66-7d3d9ca1f4e3')/Database" /> + <category term="Microsoft.SqlServer.Management.Server.Domain.DatabaseCopy" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /> + <content type="application/xml"> + <m:properties> + <d:LocalDatabaseId m:type="Edm.Int32">5</d:LocalDatabaseId> + <d:DestinationServerName>partnersrv</d:DestinationServerName> + <d:DestinationDatabaseName>testdb2</d:DestinationDatabaseName> + <d:SourceServerName>myserver01</d:SourceServerName> + <d:SourceDatabaseName>testdb2</d:SourceDatabaseName> + <d:IsContinuous m:type="Edm.Boolean">true</d:IsContinuous> + <d:TextStartDate>2012-10-11T19:40:21.7100000Z</d:TextStartDate> + <d:TextModifyDate>2012-10-11T19:40:21.7100000Z</d:TextModifyDate> + <d:PercentComplete m:type="Edm.Single" m:null="true" /> + <d:IsLocalDatabaseReplicationTarget m:type="Edm.Boolean">false</d:IsLocalDatabaseReplicationTarget> + <d:ReplicationState m:type="Edm.Byte">0</d:ReplicationState> + <d:ReplicationStateDescription>PENDING</d:ReplicationStateDescription> + <d:IsInterlinkConnected m:type="Edm.Boolean">true</d:IsInterlinkConnected> + <d:IsForcedTerminate m:type="Edm.Boolean" m:null="true" /> + <d:MaximumLag m:type="Edm.Int32" m:null="true" /> + <d:EntityId m:type="Edm.Guid">55422252-8273-47da-ae66-7d3d9ca1f4e3</d:EntityId> + </m:properties> + </content> + </entry> + </feed> + +
+
+
+
+ + UnitTest.StopAzureSqlDatabaseContinuousCopyWithSqlAuth + + + 0 + + http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/DatabaseCopies()?$filter=(SourceServerName%20eq%20'myserver01')%20and%20(SourceDatabaseName%20eq%20'testdb1') + GET + WindowsAzurePowershell/v0.7.3.1 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + tGZmOdJ2V8jyOKzlTbnHWhPCoMTgQxjnPHlOPWMw1pfIPsxknvLQv7CnmR1ZJ34a9GQ4Kffr/wS5OYfkiN7p9s0be11grs7wfIxDCADwK7LD5aIKVv9H5Q6oD9gxlYXwscJ06hnT7xL79OYmhnDn3DWKAeFJBSz5xEnRzW+EwszELLMx0l9exdL7Ernma+2boEM9sF3uSeeglynPn26ukWszmLcaresPgfGbRLalbGQUpP24OKnNZyFg0/dEVRgdW2Tq3fHdwQNQMvmt4Hlthsdcvrc/52ldl75OhSHnGCVmMWf94w5coT4bIX8Pl/iVnZjZEPC8iYx+Q67MFjivVK7CCQJlgpHybfbt3aXsiI/KaMmvqf+PXknanp8s4HFH4ARze2V9V3VWO+Ssex1ssJWRzA7tguHf0AzXj7KvF3Yb1DYJnfpWqfUQ5JmEVX1lvqSU8HvcRS8uGrylbhwT/YeTs7bWx+0RsoC+eK0kfFP//kd7fH6VR4uKPJEk6ah0WapFxCGEnDKxT7ARbH8gGOFpKOHZA3P8XK9zNKYZpjvJZB1z2G8p/xle1liN1ZrgGQDXK75F/cJ8RSHgHXu+bYNVp4NTOp2dIJNdtAOV1ZtyMxJEMGHCHIdN2e6BZFoaQknvcoKfDFuj3CZAWY/+0e19cyNJsEqZSSwy3+NxhpsEoJ48B3BxPd/kpL5Tcipi7I44t4V/0xL7KFD4VFYZ3unX3AJWdCu3JzXTqKq7V9YBH21+kkuZlop87GJRsThAHENbdlLEV5qqgiA5EnbZDQ== +
+
+ x-ms-client-session-id + 44fc40d4-31f2-437d-9d68-41901b73a571-2012-10-11 22:26:38Z +
+
+ x-ms-client-request-id + 65493f30-5f20-41e5-8117-d4ae999326ae-2012-10-11 22:26:50Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=fpQyQWBnCdM9i77Vxv0Ilg== +
+
+ + + .SQLSERVERMANAGEMENT + fpQyQWBnCdM9i77Vxv0Ilg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 44fc40d4-31f2-437d-9d68-41901b73a571 +
+
+ DataServiceVersion + 1.0; +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;charset=utf-8 +
+
+ Date + Thu, 11 Oct 2012 22:26:59 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + + <?xml version="1.0" encoding="utf-8" standalone="yes"?> + <feed xml:base="http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom"> + <title type="text">DatabaseCopies</title> + <id>http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/DatabaseCopies</id> + <updated>2012-10-11T22:26:59Z</updated> + <link rel="self" title="DatabaseCopies" href="DatabaseCopies" /> + <entry> + <id>http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/DatabaseCopies(guid'57fcd9fd-c6ea-40d1-ac29-254d9f090888')</id> + <title type="text"></title> + <updated>2012-10-11T22:26:59Z</updated> + <author> + <name /> + </author> + <link rel="edit" title="DatabaseCopy" href="DatabaseCopies(guid'57fcd9fd-c6ea-40d1-ac29-254d9f090888')" /> + <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Database" type="application/atom+xml;type=entry" title="Database" href="DatabaseCopies(guid'57fcd9fd-c6ea-40d1-ac29-254d9f090888')/Database" /> + <category term="Microsoft.SqlServer.Management.Server.Domain.DatabaseCopy" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /> + <content type="application/xml"> + <m:properties> + <d:LocalDatabaseId m:type="Edm.Int32">4</d:LocalDatabaseId> + <d:DestinationServerName>partnersrv</d:DestinationServerName> + <d:DestinationDatabaseName>testdb1</d:DestinationDatabaseName> + <d:SourceServerName>myserver01</d:SourceServerName> + <d:SourceDatabaseName>testdb1</d:SourceDatabaseName> + <d:IsContinuous m:type="Edm.Boolean">true</d:IsContinuous> + <d:TextStartDate>2012-10-11T22:26:53.6730000Z</d:TextStartDate> + <d:TextModifyDate>2012-10-11T22:26:58.7570000Z</d:TextModifyDate> + <d:PercentComplete m:type="Edm.Single">100</d:PercentComplete> + <d:IsLocalDatabaseReplicationTarget m:type="Edm.Boolean">false</d:IsLocalDatabaseReplicationTarget> + <d:ReplicationState m:type="Edm.Byte">2</d:ReplicationState> + <d:ReplicationStateDescription>CATCH_UP</d:ReplicationStateDescription> + <d:IsInterlinkConnected m:type="Edm.Boolean">true</d:IsInterlinkConnected> + <d:IsForcedTerminate m:type="Edm.Boolean" m:null="true" /> + <d:MaximumLag m:type="Edm.Int32" m:null="true" /> + <d:EntityId m:type="Edm.Guid">57fcd9fd-c6ea-40d1-ac29-254d9f090888</d:EntityId> + </m:properties> + </content> + </entry> + </feed> + +
+
+ + 1 + + http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/DatabaseCopies()?$filter=(DestinationServerName%20eq%20'myserver01')%20and%20(DestinationDatabaseName%20eq%20'testdb1') + GET + WindowsAzurePowershell/v0.7.3.1 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + tGZmOdJ2V8jyOKzlTbnHWhPCoMTgQxjnPHlOPWMw1pfIPsxknvLQv7CnmR1ZJ34a9GQ4Kffr/wS5OYfkiN7p9s0be11grs7wfIxDCADwK7LD5aIKVv9H5Q6oD9gxlYXwscJ06hnT7xL79OYmhnDn3DWKAeFJBSz5xEnRzW+EwszELLMx0l9exdL7Ernma+2boEM9sF3uSeeglynPn26ukWszmLcaresPgfGbRLalbGQUpP24OKnNZyFg0/dEVRgdW2Tq3fHdwQNQMvmt4Hlthsdcvrc/52ldl75OhSHnGCVmMWf94w5coT4bIX8Pl/iVnZjZEPC8iYx+Q67MFjivVK7CCQJlgpHybfbt3aXsiI/KaMmvqf+PXknanp8s4HFH4ARze2V9V3VWO+Ssex1ssJWRzA7tguHf0AzXj7KvF3Yb1DYJnfpWqfUQ5JmEVX1lvqSU8HvcRS8uGrylbhwT/YeTs7bWx+0RsoC+eK0kfFP//kd7fH6VR4uKPJEk6ah0WapFxCGEnDKxT7ARbH8gGOFpKOHZA3P8XK9zNKYZpjvJZB1z2G8p/xle1liN1ZrgGQDXK75F/cJ8RSHgHXu+bYNVp4NTOp2dIJNdtAOV1ZtyMxJEMGHCHIdN2e6BZFoaQknvcoKfDFuj3CZAWY/+0e19cyNJsEqZSSwy3+NxhpsEoJ48B3BxPd/kpL5Tcipi7I44t4V/0xL7KFD4VFYZ3unX3AJWdCu3JzXTqKq7V9YBH21+kkuZlop87GJRsThAHENbdlLEV5qqgiA5EnbZDQ== +
+
+ x-ms-client-session-id + 44fc40d4-31f2-437d-9d68-41901b73a571-2012-10-11 22:26:38Z +
+
+ x-ms-client-request-id + 65493f30-5f20-41e5-8117-d4ae999326ae-2012-10-11 22:26:50Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=fpQyQWBnCdM9i77Vxv0Ilg== +
+
+ + + .SQLSERVERMANAGEMENT + fpQyQWBnCdM9i77Vxv0Ilg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 44fc40d4-31f2-437d-9d68-41901b73a571 +
+
+ DataServiceVersion + 1.0; +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;charset=utf-8 +
+
+ Date + Thu, 11 Oct 2012 22:26:59 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + + <?xml version="1.0" encoding="utf-8" standalone="yes"?> + <feed xml:base="https://test1683510.abc1683510-gu.adhoc.mscds.com/v1/ManagementService.svc/Server2('test1683510')/" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom"> + <title type="text">DatabaseCopies</title> + <id>https://test1683510.abc1683510-gu.adhoc.mscds.com/v1/ManagementService.svc/Server2('test1683510')/DatabaseCopies</id> + <updated>2012-10-11T22:26:59Z</updated> + <author> + <name /> + </author> + <link rel="self" title="DatabaseCopies" href="DatabaseCopies" /> + </feed> + +
+
+ + 2 + + http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/DatabaseCopies(guid'57fcd9fd-c6ea-40d1-ac29-254d9f090888') + MERGE + WindowsAzurePowershell/v0.7.3.1 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + tGZmOdJ2V8jyOKzlTbnHWhPCoMTgQxjnPHlOPWMw1pfIPsxknvLQv7CnmR1ZJ34a9GQ4Kffr/wS5OYfkiN7p9s0be11grs7wfIxDCADwK7LD5aIKVv9H5Q6oD9gxlYXwscJ06hnT7xL79OYmhnDn3DWKAeFJBSz5xEnRzW+EwszELLMx0l9exdL7Ernma+2boEM9sF3uSeeglynPn26ukWszmLcaresPgfGbRLalbGQUpP24OKnNZyFg0/dEVRgdW2Tq3fHdwQNQMvmt4Hlthsdcvrc/52ldl75OhSHnGCVmMWf94w5coT4bIX8Pl/iVnZjZEPC8iYx+Q67MFjivVK7CCQJlgpHybfbt3aXsiI/KaMmvqf+PXknanp8s4HFH4ARze2V9V3VWO+Ssex1ssJWRzA7tguHf0AzXj7KvF3Yb1DYJnfpWqfUQ5JmEVX1lvqSU8HvcRS8uGrylbhwT/YeTs7bWx+0RsoC+eK0kfFP//kd7fH6VR4uKPJEk6ah0WapFxCGEnDKxT7ARbH8gGOFpKOHZA3P8XK9zNKYZpjvJZB1z2G8p/xle1liN1ZrgGQDXK75F/cJ8RSHgHXu+bYNVp4NTOp2dIJNdtAOV1ZtyMxJEMGHCHIdN2e6BZFoaQknvcoKfDFuj3CZAWY/+0e19cyNJsEqZSSwy3+NxhpsEoJ48B3BxPd/kpL5Tcipi7I44t4V/0xL7KFD4VFYZ3unX3AJWdCu3JzXTqKq7V9YBH21+kkuZlop87GJRsThAHENbdlLEV5qqgiA5EnbZDQ== +
+
+ x-ms-client-session-id + 44fc40d4-31f2-437d-9d68-41901b73a571-2012-10-11 22:26:38Z +
+
+ x-ms-client-request-id + 65493f30-5f20-41e5-8117-d4ae999326ae-2012-10-11 22:26:50Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=fpQyQWBnCdM9i77Vxv0Ilg== +
+
+ + + .SQLSERVERMANAGEMENT + fpQyQWBnCdM9i77Vxv0Ilg== + + + + + <?xml version="1.0" encoding="utf-8" standalone="yes"?> + <entry xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom"> + <category scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" term="Microsoft.SqlServer.Management.Server.Domain.DatabaseCopy" /> + <title /> + <author> + <name /> + </author> + <updated>2012-10-11T22:26:59.50693Z</updated> + <id>http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/DatabaseCopies(guid'57fcd9fd-c6ea-40d1-ac29-254d9f090888')</id> + <content type="application/xml"> + <m:properties> + <d:DestinationDatabaseName>testdb1</d:DestinationDatabaseName> + <d:DestinationServerName>partnersrv</d:DestinationServerName> + <d:EntityId m:type="Edm.Guid">57fcd9fd-c6ea-40d1-ac29-254d9f090888</d:EntityId> + <d:IsContinuous m:type="Edm.Boolean">true</d:IsContinuous> + <d:IsForcedTerminate m:type="Edm.Boolean">false</d:IsForcedTerminate> + <d:IsInterlinkConnected m:type="Edm.Boolean">true</d:IsInterlinkConnected> + <d:IsLocalDatabaseReplicationTarget m:type="Edm.Boolean">false</d:IsLocalDatabaseReplicationTarget> + <d:LocalDatabaseId m:type="Edm.Int32">4</d:LocalDatabaseId> + <d:MaximumLag m:type="Edm.Int32" m:null="true" /> + <d:PercentComplete m:type="Edm.Single">100</d:PercentComplete> + <d:ReplicationState m:type="Edm.Byte">2</d:ReplicationState> + <d:ReplicationStateDescription>CATCH_UP</d:ReplicationStateDescription> + <d:SourceDatabaseName>testdb1</d:SourceDatabaseName> + <d:SourceServerName>myserver01</d:SourceServerName> + <d:TextModifyDate>2012-10-11T22:26:58.7570000Z</d:TextModifyDate> + <d:TextStartDate>2012-10-11T22:26:53.6730000Z</d:TextStartDate> + </m:properties> + </content> + </entry> + + application/atom+xml + application/atom+xml,application/xml +
+ + NoContent + +
+ x-ms-request-id + 44fc40d4-31f2-437d-9d68-41901b73a571 +
+
+ DataServiceVersion + 1.0; +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Thu, 11 Oct 2012 22:26:59 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 3 + + http://localhost:12345/MockTestServer/v1/ManagementService.svc/Server2('myserver01')/DatabaseCopies(guid'57fcd9fd-c6ea-40d1-ac29-254d9f090888') + DELETE + WindowsAzurePowershell/v0.7.3.1 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + tGZmOdJ2V8jyOKzlTbnHWhPCoMTgQxjnPHlOPWMw1pfIPsxknvLQv7CnmR1ZJ34a9GQ4Kffr/wS5OYfkiN7p9s0be11grs7wfIxDCADwK7LD5aIKVv9H5Q6oD9gxlYXwscJ06hnT7xL79OYmhnDn3DWKAeFJBSz5xEnRzW+EwszELLMx0l9exdL7Ernma+2boEM9sF3uSeeglynPn26ukWszmLcaresPgfGbRLalbGQUpP24OKnNZyFg0/dEVRgdW2Tq3fHdwQNQMvmt4Hlthsdcvrc/52ldl75OhSHnGCVmMWf94w5coT4bIX8Pl/iVnZjZEPC8iYx+Q67MFjivVK7CCQJlgpHybfbt3aXsiI/KaMmvqf+PXknanp8s4HFH4ARze2V9V3VWO+Ssex1ssJWRzA7tguHf0AzXj7KvF3Yb1DYJnfpWqfUQ5JmEVX1lvqSU8HvcRS8uGrylbhwT/YeTs7bWx+0RsoC+eK0kfFP//kd7fH6VR4uKPJEk6ah0WapFxCGEnDKxT7ARbH8gGOFpKOHZA3P8XK9zNKYZpjvJZB1z2G8p/xle1liN1ZrgGQDXK75F/cJ8RSHgHXu+bYNVp4NTOp2dIJNdtAOV1ZtyMxJEMGHCHIdN2e6BZFoaQknvcoKfDFuj3CZAWY/+0e19cyNJsEqZSSwy3+NxhpsEoJ48B3BxPd/kpL5Tcipi7I44t4V/0xL7KFD4VFYZ3unX3AJWdCu3JzXTqKq7V9YBH21+kkuZlop87GJRsThAHENbdlLEV5qqgiA5EnbZDQ== +
+
+ x-ms-client-session-id + 44fc40d4-31f2-437d-9d68-41901b73a571-2012-10-11 22:26:38Z +
+
+ x-ms-client-request-id + 65493f30-5f20-41e5-8117-d4ae999326ae-2012-10-11 22:26:50Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=fpQyQWBnCdM9i77Vxv0Ilg== +
+
+ + + .SQLSERVERMANAGEMENT + fpQyQWBnCdM9i77Vxv0Ilg== + + + + + application/atom+xml + application/atom+xml,application/xml +
+ + NoContent + +
+ x-ms-request-id + 44fc40d4-31f2-437d-9d68-41901b73a571 +
+
+ DataServiceVersion + 1.0; +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Thu, 11 Oct 2012 22:27:00 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+
+
+ + UnitTest.Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Database.Cmdlet.AzureSqlDatabaseCopyCertAuthTests.AzureSqlContinuousDatabaseCopyCertTests + + + 0 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 7a5e82d7-b4b1-440a-b5e3-a7b8f197833e-2014-07-02 18:40:43Z +
+
+ + + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <Name>testdb0</Name> + <CollationName></CollationName> + </ServiceResource> + + application/xml + +
+ + Created + +
+ x-ms-request-id + 87eeb37f-31ae-4ee5-9d05-7a10780a6f13 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:41:02 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdb0</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb0</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>4</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T18:40:51.5700000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T18:40:59.8870000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-02T18:41:50.4470000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 1 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + b4f36da3-90b3-4d3d-9c2a-e6a27d067f30-2014-07-02 18:41:02Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 74a82f71-aa3c-40be-9911-acebed4293e3 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:41:02 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 2 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + d09024f2-fe5e-40b6-b3d1-7a6c9867a6b5-2014-07-02 18:41:02Z +
+
+ + + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <Name>testdb1</Name> + <CollationName></CollationName> + </ServiceResource> + + application/xml + +
+ + Created + +
+ x-ms-request-id + 3ced8ef3-9154-4946-b4c0-02cc8e01b489 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:41:22 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdb1</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb1</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>5</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T18:41:09.3500000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T18:41:20.2470000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-02T18:42:05.8870000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 3 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + ca1795a8-8b77-4084-bbd4-f202bb21b40a-2014-07-02 18:41:23Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 0ac03c7b-b490-4bde-b909-798881fd1c5d +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:41:24 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 4 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/partnersrv/databases + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 050bea16-51fb-416c-8f22-11837665aec9-2014-07-02 18:41:24Z +
+
+ + + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <Name>testdb2</Name> + <CollationName></CollationName> + </ServiceResource> + + application/xml + +
+ + Created + +
+ x-ms-request-id + aa88957f-638c-46f5-9a9a-7597c16a212c +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:41:53 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdb2</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/databases/testdb2</SelfLink><ParentLink>https://localhost/servers/partnersrv</ParentLink><Id>4</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T18:41:28.4570000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T18:41:42.3070000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-02T18:42:27.2300000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 5 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/partnersrv/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 5004a708-0ef4-4aa6-8dba-54998fe88a05-2014-07-02 18:41:53Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 6e73ce97-fab8-40af-849d-9b6e590af935 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:41:55 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/partnersrv</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/partnersrv</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 6 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/partnersrv/databases + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + bce8153e-b9a8-48d1-94cf-44d0850cb900-2014-07-02 18:41:55Z +
+
+ + + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <Name>testdb3</Name> + <CollationName></CollationName> + </ServiceResource> + + application/xml + +
+ + Created + +
+ x-ms-request-id + 61404711-e825-4cc3-b452-cc64364b1474 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:42:31 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdb3</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/databases/testdb3</SelfLink><ParentLink>https://localhost/servers/partnersrv</ParentLink><Id>5</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T18:42:01.5100000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T18:42:25.5100000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-02T18:42:58.4630000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 7 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/partnersrv/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 9668367c-7146-4937-997b-63f33b8f9321-2014-07-02 18:42:31Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 1ee6be0a-57a3-4a17-8d02-b2ebbd99d433 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:42:31 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/partnersrv</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/partnersrv</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 8 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 020cd36d-481f-4405-99cc-f0a33fc235e5-2014-07-02 18:42:32Z +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <Name>testdb4</Name> + <CollationName></CollationName> +</ServiceResource> + application/xml + +
+ + Created + +
+ x-ms-request-id + 647f4df4-d8cf-4ae5-a7f8-5c5287bd358c +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:42:47 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdb4</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb4</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>6</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T18:42:33.3600000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T18:42:40.9800000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-02T18:43:32.8070000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 9 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + d6af970b-d518-4679-812f-475ff6ad40b7-2014-07-02 18:42:47Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 7eb43cfb-b41a-4254-937b-6d33bb2253ec +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:42:47 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 10 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb0/databasecopies + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + ac80182d-a832-4a33-aed2-ef42d3d1f829-2014-07-02 18:42:48Z +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <PartnerServer>partnersrv</PartnerServer> + <PartnerDatabase>testdb0</PartnerDatabase> + <IsContinuous>true</IsContinuous> + <IsOfflineSecondary>false</IsOfflineSecondary> +</ServiceResource> + application/xml + +
+ + Created + +
+ x-ms-request-id + 06ea4cad-6893-4673-ba42-5cb2663c6444 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:43:04 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>8df450a0-461f-4d20-975d-6737a3939c61</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb0/databasecopies/8df450a0-461f-4d20-975d-6737a3939c61</SelfLink><ParentLink>https://localhost/servers/cloud4/databases/testdb0</ParentLink><SourceServerName>cloud4</SourceServerName><SourceDatabaseName>testdb0</SourceDatabaseName><DestinationServerName>partnersrv</DestinationServerName><DestinationDatabaseName>testdb0</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:42:57.6170000Z</StartDate><ModifyDate>2014-07-02T18:42:57.6170000Z</ModifyDate><PercentComplete>0</PercentComplete><ReplicationState>0</ReplicationState><ReplicationStateDescription>PENDING</ReplicationStateDescription><LocalDatabaseId>4</LocalDatabaseId><IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>False</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource> +
+
+ + 11 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb1/databasecopies + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + ec6f6ba3-f490-4eb1-91fb-11bb6a37b78d-2014-07-02 18:43:04Z +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <PartnerServer>partnersrv</PartnerServer> + <PartnerDatabase>testdb1</PartnerDatabase> + <IsContinuous>true</IsContinuous> + <IsOfflineSecondary>false</IsOfflineSecondary> +</ServiceResource> + application/xml + +
+ + Created + +
+ x-ms-request-id + f15231c7-e8a3-4e32-87d3-5d9dd05abab7 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:43:10 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>bca19806-bf69-4369-a21f-c607d3756d89</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb1/databasecopies/bca19806-bf69-4369-a21f-c607d3756d89</SelfLink><ParentLink>https://localhost/servers/cloud4/databases/testdb1</ParentLink><SourceServerName>cloud4</SourceServerName><SourceDatabaseName>testdb1</SourceDatabaseName><DestinationServerName>partnersrv</DestinationServerName><DestinationDatabaseName>testdb1</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:43:07.3300000Z</StartDate><ModifyDate>2014-07-02T18:43:07.3300000Z</ModifyDate><PercentComplete>0</PercentComplete><ReplicationState>0</ReplicationState><ReplicationStateDescription>PENDING</ReplicationStateDescription><LocalDatabaseId>5</LocalDatabaseId><IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>False</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource> +
+
+ + 12 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/partnersrv/databases/testdb2/databasecopies + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + dc1c7f96-33d9-4df0-a127-85f9ef1290fd-2014-07-02 18:43:10Z +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <PartnerServer>cloud4</PartnerServer> + <PartnerDatabase>testdb2</PartnerDatabase> + <IsContinuous>true</IsContinuous> + <IsOfflineSecondary>false</IsOfflineSecondary> +</ServiceResource> + application/xml + +
+ + Created + +
+ x-ms-request-id + a88c3c63-f2dc-4ef9-8a06-f089cfc664cd +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:43:50 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>ae68062d-9a09-4ae3-b7d1-99eee6004d7f</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/databases/testdb2/databasecopies/ae68062d-9a09-4ae3-b7d1-99eee6004d7f</SelfLink><ParentLink>https://localhost/servers/partnersrv/databases/testdb2</ParentLink><SourceServerName>partnersrv</SourceServerName><SourceDatabaseName>testdb2</SourceDatabaseName><DestinationServerName>cloud4</DestinationServerName><DestinationDatabaseName>testdb2</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:43:24.9030000Z</StartDate><ModifyDate>2014-07-02T18:43:24.9030000Z</ModifyDate><PercentComplete>0</PercentComplete><ReplicationState>0</ReplicationState><ReplicationStateDescription>PENDING</ReplicationStateDescription><LocalDatabaseId>4</LocalDatabaseId><IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>False</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource> +
+
+ + 13 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/partnersrv/databases/testdb3/databasecopies + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + f523deeb-4069-401d-9cde-7429615eda58-2014-07-02 18:43:50Z +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <PartnerServer>cloud4</PartnerServer> + <PartnerDatabase>testdb3</PartnerDatabase> + <IsContinuous>true</IsContinuous> + <IsOfflineSecondary>false</IsOfflineSecondary> +</ServiceResource> + application/xml + +
+ + Created + +
+ x-ms-request-id + 517769ba-c989-4204-b822-901eb52c9220 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:44:23 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>47dcf839-2847-4458-9e61-584f3adbc2bc</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/databases/testdb3/databasecopies/47dcf839-2847-4458-9e61-584f3adbc2bc</SelfLink><ParentLink>https://localhost/servers/partnersrv/databases/testdb3</ParentLink><SourceServerName>partnersrv</SourceServerName><SourceDatabaseName>testdb3</SourceDatabaseName><DestinationServerName>cloud4</DestinationServerName><DestinationDatabaseName>testdb3</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:44:12.8070000Z</StartDate><ModifyDate>2014-07-02T18:44:12.8070000Z</ModifyDate><PercentComplete>0</PercentComplete><ReplicationState>0</ReplicationState><ReplicationStateDescription>PENDING</ReplicationStateDescription><LocalDatabaseId>5</LocalDatabaseId><IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>False</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource> +
+
+ + 14 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb4/databasecopies + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 8d40b54c-d325-44c6-9e4d-1d807f78f669-2014-07-02 18:44:23Z +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <PartnerServer>partnersrv</PartnerServer> + <PartnerDatabase>testdb4</PartnerDatabase> + <IsContinuous>true</IsContinuous> + <IsOfflineSecondary>true</IsOfflineSecondary> +</ServiceResource> + application/xml + +
+ + Created + +
+ x-ms-request-id + 24a6c730-1e38-425f-a9c9-9cd42b635c29 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:44:40 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>51d22086-2be9-4f4a-a569-3b3372f50d34</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb4/databasecopies/51d22086-2be9-4f4a-a569-3b3372f50d34</SelfLink><ParentLink>https://localhost/servers/cloud4/databases/testdb4</ParentLink><SourceServerName>cloud4</SourceServerName><SourceDatabaseName>testdb4</SourceDatabaseName><DestinationServerName>partnersrv</DestinationServerName><DestinationDatabaseName>testdb4</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:44:29.6930000Z</StartDate><ModifyDate>2014-07-02T18:44:29.6930000Z</ModifyDate><PercentComplete>0</PercentComplete><ReplicationState>0</ReplicationState><ReplicationStateDescription>PENDING</ReplicationStateDescription><LocalDatabaseId>6</LocalDatabaseId><IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>True</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource> +
+
+ + 15 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb0/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + acbc2739-3b4f-47c6-9436-8c076a8292cc-2014-07-02 18:44:40Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 7059efab-b08b-46d7-9f97-87481c0b7aa2 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:44:43 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>8df450a0-461f-4d20-975d-6737a3939c61</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb0/databasecopies/8df450a0-461f-4d20-975d-6737a3939c61</SelfLink><ParentLink>https://localhost/servers/cloud4/databases/testdb0</ParentLink><SourceServerName>cloud4</SourceServerName><SourceDatabaseName>testdb0</SourceDatabaseName><DestinationServerName>partnersrv</DestinationServerName><DestinationDatabaseName>testdb0</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:42:57.6170000Z</StartDate><ModifyDate>2014-07-02T18:44:10.7370000Z</ModifyDate><PercentComplete>99</PercentComplete><ReplicationState>1</ReplicationState><ReplicationStateDescription>SEEDING</ReplicationStateDescription><LocalDatabaseId>4</LocalDatabaseId><IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>False</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource></ServiceResources> +
+
+ + 16 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb0/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 60e3db3d-3a5b-4ec0-ade2-8fce200f397d-2014-07-02 18:44:53Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + ccbca58e-02c9-47ec-9014-80a27a4d7199 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:44:58 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>8df450a0-461f-4d20-975d-6737a3939c61</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb0/databasecopies/8df450a0-461f-4d20-975d-6737a3939c61</SelfLink><ParentLink>https://localhost/servers/cloud4/databases/testdb0</ParentLink><SourceServerName>cloud4</SourceServerName><SourceDatabaseName>testdb0</SourceDatabaseName><DestinationServerName>partnersrv</DestinationServerName><DestinationDatabaseName>testdb0</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:42:57.6170000Z</StartDate><ModifyDate>2014-07-02T18:44:45.3170000Z</ModifyDate><PercentComplete>99</PercentComplete><ReplicationState>1</ReplicationState><ReplicationStateDescription>SEEDING</ReplicationStateDescription><LocalDatabaseId>4</LocalDatabaseId><IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>False</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource></ServiceResources> +
+
+ + 17 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb0/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 3b2e2252-47e1-4589-9249-0c1859cb3b0e-2014-07-02 18:45:08Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 488adcc2-1a3b-4c5d-8677-122b8ab68b79 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:45:09 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>8df450a0-461f-4d20-975d-6737a3939c61</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb0/databasecopies/8df450a0-461f-4d20-975d-6737a3939c61</SelfLink><ParentLink>https://localhost/servers/cloud4/databases/testdb0</ParentLink><SourceServerName>cloud4</SourceServerName><SourceDatabaseName>testdb0</SourceDatabaseName><DestinationServerName>partnersrv</DestinationServerName><DestinationDatabaseName>testdb0</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:42:57.6170000Z</StartDate><ModifyDate>2014-07-02T18:45:01.0200000Z</ModifyDate><PercentComplete>100</PercentComplete><ReplicationState>2</ReplicationState><ReplicationStateDescription>CATCH_UP</ReplicationStateDescription><LocalDatabaseId>4</LocalDatabaseId><IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>False</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource></ServiceResources> +
+
+ + 18 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb1/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 63afbc09-5a20-466e-98ca-941cc8b09657-2014-07-02 18:45:09Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + d5efd9af-081d-4f1b-8cb1-a48156c2f2e2 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:45:09 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>bca19806-bf69-4369-a21f-c607d3756d89</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb1/databasecopies/bca19806-bf69-4369-a21f-c607d3756d89</SelfLink><ParentLink>https://localhost/servers/cloud4/databases/testdb1</ParentLink><SourceServerName>cloud4</SourceServerName><SourceDatabaseName>testdb1</SourceDatabaseName><DestinationServerName>partnersrv</DestinationServerName><DestinationDatabaseName>testdb1</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:43:07.3300000Z</StartDate><ModifyDate>2014-07-02T18:44:47.3530000Z</ModifyDate><PercentComplete>100</PercentComplete><ReplicationState>2</ReplicationState><ReplicationStateDescription>CATCH_UP</ReplicationStateDescription><LocalDatabaseId>5</LocalDatabaseId><IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>False</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource></ServiceResources> +
+
+ + 19 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/partnersrv/databases/testdb2/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + efd518de-40f9-412f-9d86-a1fec0a961ec-2014-07-02 18:45:09Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 4315827c-45d5-4acd-acea-c813d838e2f0 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:45:11 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>ae68062d-9a09-4ae3-b7d1-99eee6004d7f</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/databases/testdb2/databasecopies/ae68062d-9a09-4ae3-b7d1-99eee6004d7f</SelfLink><ParentLink>https://localhost/servers/partnersrv/databases/testdb2</ParentLink><SourceServerName>partnersrv</SourceServerName><SourceDatabaseName>testdb2</SourceDatabaseName><DestinationServerName>cloud4</DestinationServerName><DestinationDatabaseName>testdb2</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:43:24.9030000Z</StartDate><ModifyDate>2014-07-02T18:45:07.2900000Z</ModifyDate><PercentComplete>100</PercentComplete><ReplicationState>2</ReplicationState><ReplicationStateDescription>CATCH_UP</ReplicationStateDescription><LocalDatabaseId>4</LocalDatabaseId><IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>False</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource></ServiceResources> +
+
+ + 20 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/partnersrv/databases/testdb3/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + bab2d900-e986-4fd0-8928-4fa4604fd6ba-2014-07-02 18:45:11Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 1bfa57d7-0738-45c8-8152-7f8c0b767ffb +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:45:14 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>47dcf839-2847-4458-9e61-584f3adbc2bc</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/databases/testdb3/databasecopies/47dcf839-2847-4458-9e61-584f3adbc2bc</SelfLink><ParentLink>https://localhost/servers/partnersrv/databases/testdb3</ParentLink><SourceServerName>partnersrv</SourceServerName><SourceDatabaseName>testdb3</SourceDatabaseName><DestinationServerName>cloud4</DestinationServerName><DestinationDatabaseName>testdb3</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:44:12.8070000Z</StartDate><ModifyDate>2014-07-02T18:44:50.8200000Z</ModifyDate><PercentComplete>0</PercentComplete><ReplicationState>0</ReplicationState><ReplicationStateDescription>PENDING</ReplicationStateDescription><LocalDatabaseId>5</LocalDatabaseId><IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>False</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource></ServiceResources> +
+
+ + 21 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/partnersrv/databases/testdb3/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + bf4a101f-7eab-472e-b482-b05328b1b12f-2014-07-02 18:45:24Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 055a3fe0-6f44-4ee3-bab9-7f58c083d17d +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:45:24 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>47dcf839-2847-4458-9e61-584f3adbc2bc</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/databases/testdb3/databasecopies/47dcf839-2847-4458-9e61-584f3adbc2bc</SelfLink><ParentLink>https://localhost/servers/partnersrv/databases/testdb3</ParentLink><SourceServerName>partnersrv</SourceServerName><SourceDatabaseName>testdb3</SourceDatabaseName><DestinationServerName>cloud4</DestinationServerName><DestinationDatabaseName>testdb3</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:44:12.8070000Z</StartDate><ModifyDate>2014-07-02T18:45:22.6130000Z</ModifyDate><PercentComplete>0</PercentComplete><ReplicationState>0</ReplicationState><ReplicationStateDescription>PENDING</ReplicationStateDescription><LocalDatabaseId>5</LocalDatabaseId><IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>False</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource></ServiceResources> +
+
+ + 22 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/partnersrv/databases/testdb3/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + f903f5de-c541-477b-9fba-c7f74477fdd5-2014-07-02 18:45:35Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 4e15e216-b26f-4cfe-9058-10fa631154ae +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:45:35 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>47dcf839-2847-4458-9e61-584f3adbc2bc</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/databases/testdb3/databasecopies/47dcf839-2847-4458-9e61-584f3adbc2bc</SelfLink><ParentLink>https://localhost/servers/partnersrv/databases/testdb3</ParentLink><SourceServerName>partnersrv</SourceServerName><SourceDatabaseName>testdb3</SourceDatabaseName><DestinationServerName>cloud4</DestinationServerName><DestinationDatabaseName>testdb3</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:44:12.8070000Z</StartDate><ModifyDate>2014-07-02T18:45:22.6130000Z</ModifyDate><PercentComplete>0</PercentComplete><ReplicationState>0</ReplicationState><ReplicationStateDescription>PENDING</ReplicationStateDescription><LocalDatabaseId>5</LocalDatabaseId><IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>False</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource></ServiceResources> +
+
+ + 23 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/partnersrv/databases/testdb3/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + c3d7193f-41c2-46e6-b87d-fc755ba8f3d6-2014-07-02 18:45:45Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + f221df00-a9ed-48c4-b5bd-ff1d2cb6412f +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:45:45 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>47dcf839-2847-4458-9e61-584f3adbc2bc</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/databases/testdb3/databasecopies/47dcf839-2847-4458-9e61-584f3adbc2bc</SelfLink><ParentLink>https://localhost/servers/partnersrv/databases/testdb3</ParentLink><SourceServerName>partnersrv</SourceServerName><SourceDatabaseName>testdb3</SourceDatabaseName><DestinationServerName>cloud4</DestinationServerName><DestinationDatabaseName>testdb3</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:44:12.8070000Z</StartDate><ModifyDate>2014-07-02T18:45:22.6130000Z</ModifyDate><PercentComplete>0</PercentComplete><ReplicationState>0</ReplicationState><ReplicationStateDescription>PENDING</ReplicationStateDescription><LocalDatabaseId>5</LocalDatabaseId><IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>False</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource></ServiceResources> +
+
+ + 24 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/partnersrv/databases/testdb3/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 7096cde8-fba5-40c7-a8dd-1f7c65b86a2d-2014-07-02 18:45:55Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + e262972f-c0d1-4ced-a5dd-c7d0a11da4a7 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:45:56 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>47dcf839-2847-4458-9e61-584f3adbc2bc</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/databases/testdb3/databasecopies/47dcf839-2847-4458-9e61-584f3adbc2bc</SelfLink><ParentLink>https://localhost/servers/partnersrv/databases/testdb3</ParentLink><SourceServerName>partnersrv</SourceServerName><SourceDatabaseName>testdb3</SourceDatabaseName><DestinationServerName>cloud4</DestinationServerName><DestinationDatabaseName>testdb3</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:44:12.8070000Z</StartDate><ModifyDate>2014-07-02T18:45:54.9370000Z</ModifyDate><PercentComplete>100</PercentComplete><ReplicationState>2</ReplicationState><ReplicationStateDescription>CATCH_UP</ReplicationStateDescription><LocalDatabaseId>5</LocalDatabaseId><IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>False</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource></ServiceResources> +
+
+ + 25 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb4/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 6bcb1d6b-0b0d-4db8-842e-235098e6c5d3-2014-07-02 18:45:56Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + c43557bf-bd25-4f28-bc3f-f91c6cb51b7d +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:45:56 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>51d22086-2be9-4f4a-a569-3b3372f50d34</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb4/databasecopies/51d22086-2be9-4f4a-a569-3b3372f50d34</SelfLink><ParentLink>https://localhost/servers/cloud4/databases/testdb4</ParentLink><SourceServerName>cloud4</SourceServerName><SourceDatabaseName>testdb4</SourceDatabaseName><DestinationServerName>partnersrv</DestinationServerName><DestinationDatabaseName>testdb4</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:44:29.6930000Z</StartDate><ModifyDate>2014-07-02T18:45:41.6200000Z</ModifyDate><PercentComplete>100</PercentComplete><ReplicationState>2</ReplicationState><ReplicationStateDescription>CATCH_UP</ReplicationStateDescription><LocalDatabaseId>6</LocalDatabaseId><IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>True</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource></ServiceResources> +
+
+ + 26 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb0/databasecopies/8df450a0-461f-4d20-975d-6737a3939c61 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 61446509-6fbc-42aa-b83b-522b4d2cfce1-2014-07-02 18:45:56Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 85bdafff-2017-4932-9b72-32a08f510fec +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:45:56 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>8df450a0-461f-4d20-975d-6737a3939c61</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb0/databasecopies/8df450a0-461f-4d20-975d-6737a3939c61</SelfLink><ParentLink>https://localhost/servers/cloud4/databases/testdb0</ParentLink><SourceServerName>cloud4</SourceServerName><SourceDatabaseName>testdb0</SourceDatabaseName><DestinationServerName>partnersrv</DestinationServerName><DestinationDatabaseName>testdb0</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:42:57.6170000Z</StartDate><ModifyDate>2014-07-02T18:45:01.0200000Z</ModifyDate><PercentComplete>100</PercentComplete><ReplicationState>2</ReplicationState><ReplicationStateDescription>CATCH_UP</ReplicationStateDescription><LocalDatabaseId>4</LocalDatabaseId><IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>False</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource> +
+
+ + 27 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb1/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 0ecff54a-54b0-4264-9f91-15fc33b32b7d-2014-07-02 18:45:56Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + ada72baa-1b03-47ab-a2a5-7e0a17a1975a +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:45:56 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>bca19806-bf69-4369-a21f-c607d3756d89</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb1/databasecopies/bca19806-bf69-4369-a21f-c607d3756d89</SelfLink><ParentLink>https://localhost/servers/cloud4/databases/testdb1</ParentLink><SourceServerName>cloud4</SourceServerName><SourceDatabaseName>testdb1</SourceDatabaseName><DestinationServerName>partnersrv</DestinationServerName><DestinationDatabaseName>testdb1</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:43:07.3300000Z</StartDate><ModifyDate>2014-07-02T18:44:47.3530000Z</ModifyDate><PercentComplete>100</PercentComplete><ReplicationState>2</ReplicationState><ReplicationStateDescription>CATCH_UP</ReplicationStateDescription><LocalDatabaseId>5</LocalDatabaseId><IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>False</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource></ServiceResources> +
+
+ + 28 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/partnersrv/databases/testdb0/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 347567c8-89f6-4c89-acbe-ab2ef0e8d427-2014-07-02 18:45:56Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 613540ce-92ba-47b6-8698-a5009b8ef6fb +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:45:56 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>8df450a0-461f-4d20-975d-6737a3939c61</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/databases/testdb0/databasecopies/8df450a0-461f-4d20-975d-6737a3939c61</SelfLink><ParentLink>https://localhost/servers/partnersrv/databases/testdb0</ParentLink><SourceServerName>cloud4</SourceServerName><SourceDatabaseName>testdb0</SourceDatabaseName><DestinationServerName>partnersrv</DestinationServerName><DestinationDatabaseName>testdb0</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:43:05.0670000Z</StartDate><ModifyDate>2014-07-02T18:45:09.9130000Z</ModifyDate><PercentComplete>100</PercentComplete><ReplicationState>2</ReplicationState><ReplicationStateDescription>CATCH_UP</ReplicationStateDescription><LocalDatabaseId>6</LocalDatabaseId><IsLocalDatabaseReplicationTarget>True</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>False</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource></ServiceResources> +
+
+ + 29 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases?contentview=generic + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 9b9e615a-f001-4c6a-a3d0-e34e802337c2-2014-07-02 18:45:56Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + c1ccd967-d012-40b5-86d7-f4588c2544cd +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:45:58 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>master</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/master</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>1</Id><Edition>System</Edition><MaxSizeGB>5</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T17:47:03.6500000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>True</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>5368709120</MaxSizeBytes><ServiceObjectiveId>26e021db-f1f9-4c98-84c6-92af8ef433d7</ServiceObjectiveId><AssignedServiceObjectiveId>26e021db-f1f9-4c98-84c6-92af8ef433d7</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T17:47:23.9330000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate i:nil="true"/><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdb0</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb0</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>4</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T18:40:51.5700000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T18:40:59.8870000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-03T01:46:01.5730000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdb1</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb1</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>5</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T18:41:09.3500000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T18:41:20.2470000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-03T01:45:47.4800000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdb4</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb4</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>6</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T18:42:33.3600000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T18:42:40.9800000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-03T01:46:41.6830000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdb2</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb2</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>7</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T18:43:56.6670000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T18:45:17.2130000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-03T01:46:19.1370000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdb3</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb3</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>8</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T18:45:17.8630000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T18:45:55.2300000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-03T01:46:55.8400000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource></ServiceResources> +
+
+ + 30 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/master/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 9b9e615a-f001-4c6a-a3d0-e34e802337c2-2014-07-02 18:45:56Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 468d7851-8557-45dc-976d-3db566d3015b +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:45:59 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/> +
+
+ + 31 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb0/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 9b9e615a-f001-4c6a-a3d0-e34e802337c2-2014-07-02 18:45:56Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 70a0243f-f7b3-4268-a792-67c2f0e886ba +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:46:02 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>8df450a0-461f-4d20-975d-6737a3939c61</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb0/databasecopies/8df450a0-461f-4d20-975d-6737a3939c61</SelfLink><ParentLink>https://localhost/servers/cloud4/databases/testdb0</ParentLink><SourceServerName>cloud4</SourceServerName><SourceDatabaseName>testdb0</SourceDatabaseName><DestinationServerName>partnersrv</DestinationServerName><DestinationDatabaseName>testdb0</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:42:57.6170000Z</StartDate><ModifyDate>2014-07-02T18:45:01.0200000Z</ModifyDate><PercentComplete>100</PercentComplete><ReplicationState>2</ReplicationState><ReplicationStateDescription>CATCH_UP</ReplicationStateDescription><LocalDatabaseId>4</LocalDatabaseId><IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>False</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource></ServiceResources> +
+
+ + 32 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb1/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 9b9e615a-f001-4c6a-a3d0-e34e802337c2-2014-07-02 18:45:56Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + cf1b5a7b-29e6-40de-813e-100dcf8946e9 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:46:03 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>bca19806-bf69-4369-a21f-c607d3756d89</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb1/databasecopies/bca19806-bf69-4369-a21f-c607d3756d89</SelfLink><ParentLink>https://localhost/servers/cloud4/databases/testdb1</ParentLink><SourceServerName>cloud4</SourceServerName><SourceDatabaseName>testdb1</SourceDatabaseName><DestinationServerName>partnersrv</DestinationServerName><DestinationDatabaseName>testdb1</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:43:07.3300000Z</StartDate><ModifyDate>2014-07-02T18:44:47.3530000Z</ModifyDate><PercentComplete>100</PercentComplete><ReplicationState>2</ReplicationState><ReplicationStateDescription>CATCH_UP</ReplicationStateDescription><LocalDatabaseId>5</LocalDatabaseId><IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>False</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource></ServiceResources> +
+
+ + 33 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb4/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 9b9e615a-f001-4c6a-a3d0-e34e802337c2-2014-07-02 18:45:56Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 73e2bbae-38e9-4e85-a29c-67e1ef069e9d +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:46:05 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>51d22086-2be9-4f4a-a569-3b3372f50d34</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb4/databasecopies/51d22086-2be9-4f4a-a569-3b3372f50d34</SelfLink><ParentLink>https://localhost/servers/cloud4/databases/testdb4</ParentLink><SourceServerName>cloud4</SourceServerName><SourceDatabaseName>testdb4</SourceDatabaseName><DestinationServerName>partnersrv</DestinationServerName><DestinationDatabaseName>testdb4</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:44:29.6930000Z</StartDate><ModifyDate>2014-07-02T18:45:41.6200000Z</ModifyDate><PercentComplete>100</PercentComplete><ReplicationState>2</ReplicationState><ReplicationStateDescription>CATCH_UP</ReplicationStateDescription><LocalDatabaseId>6</LocalDatabaseId><IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>True</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource></ServiceResources> +
+
+ + 34 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb2/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 9b9e615a-f001-4c6a-a3d0-e34e802337c2-2014-07-02 18:45:56Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 74afea2b-d8d9-46fc-ae78-41c9da36aa3a +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:46:07 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>ae68062d-9a09-4ae3-b7d1-99eee6004d7f</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb2/databasecopies/ae68062d-9a09-4ae3-b7d1-99eee6004d7f</SelfLink><ParentLink>https://localhost/servers/cloud4/databases/testdb2</ParentLink><SourceServerName>partnersrv</SourceServerName><SourceDatabaseName>testdb2</SourceDatabaseName><DestinationServerName>cloud4</DestinationServerName><DestinationDatabaseName>testdb2</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:44:01.2900000Z</StartDate><ModifyDate>2014-07-02T18:45:18.6670000Z</ModifyDate><PercentComplete>100</PercentComplete><ReplicationState>2</ReplicationState><ReplicationStateDescription>CATCH_UP</ReplicationStateDescription><LocalDatabaseId>7</LocalDatabaseId><IsLocalDatabaseReplicationTarget>True</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>False</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource></ServiceResources> +
+
+ + 35 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb3/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 9b9e615a-f001-4c6a-a3d0-e34e802337c2-2014-07-02 18:45:56Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + a8223a20-2d75-41f0-922b-7ccc7c2045d8 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:46:07 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>47dcf839-2847-4458-9e61-584f3adbc2bc</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb3/databasecopies/47dcf839-2847-4458-9e61-584f3adbc2bc</SelfLink><ParentLink>https://localhost/servers/cloud4/databases/testdb3</ParentLink><SourceServerName>partnersrv</SourceServerName><SourceDatabaseName>testdb3</SourceDatabaseName><DestinationServerName>cloud4</DestinationServerName><DestinationDatabaseName>testdb3</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:45:24.5270000Z</StartDate><ModifyDate>2014-07-02T18:45:55.6170000Z</ModifyDate><PercentComplete>100</PercentComplete><ReplicationState>2</ReplicationState><ReplicationStateDescription>CATCH_UP</ReplicationStateDescription><LocalDatabaseId>8</LocalDatabaseId><IsLocalDatabaseReplicationTarget>True</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>False</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource></ServiceResources> +
+
+ + 36 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases?contentview=generic + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 25b2fba9-0e20-45f3-adc3-60748d2c4444-2014-07-02 18:46:07Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + a1b3627c-71af-49dc-bb92-96ba1f50fa21 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:46:10 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>master</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/master</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>1</Id><Edition>System</Edition><MaxSizeGB>5</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T17:47:03.6500000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>True</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>5368709120</MaxSizeBytes><ServiceObjectiveId>26e021db-f1f9-4c98-84c6-92af8ef433d7</ServiceObjectiveId><AssignedServiceObjectiveId>26e021db-f1f9-4c98-84c6-92af8ef433d7</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T17:47:23.9330000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate i:nil="true"/><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdb0</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb0</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>4</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T18:40:51.5700000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T18:40:59.8870000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-03T01:46:01.5730000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdb1</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb1</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>5</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T18:41:09.3500000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T18:41:20.2470000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-03T01:45:47.4800000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdb4</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb4</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>6</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T18:42:33.3600000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T18:42:40.9800000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-03T01:46:41.6830000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdb2</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb2</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>7</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T18:43:56.6670000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T18:45:17.2130000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-03T01:46:19.1370000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdb3</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb3</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>8</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T18:45:17.8630000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T18:45:55.2300000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-03T01:46:55.8400000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource></ServiceResources> +
+
+ + 37 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/master/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 25b2fba9-0e20-45f3-adc3-60748d2c4444-2014-07-02 18:46:07Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 3e4ef8b8-5dd8-4543-97f4-ff25be65b3fa +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:46:10 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/> +
+
+ + 38 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb0/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 25b2fba9-0e20-45f3-adc3-60748d2c4444-2014-07-02 18:46:07Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + bc45a36d-2a42-4deb-9210-c171faa56d24 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:46:11 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>8df450a0-461f-4d20-975d-6737a3939c61</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb0/databasecopies/8df450a0-461f-4d20-975d-6737a3939c61</SelfLink><ParentLink>https://localhost/servers/cloud4/databases/testdb0</ParentLink><SourceServerName>cloud4</SourceServerName><SourceDatabaseName>testdb0</SourceDatabaseName><DestinationServerName>partnersrv</DestinationServerName><DestinationDatabaseName>testdb0</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:42:57.6170000Z</StartDate><ModifyDate>2014-07-02T18:45:01.0200000Z</ModifyDate><PercentComplete>100</PercentComplete><ReplicationState>2</ReplicationState><ReplicationStateDescription>CATCH_UP</ReplicationStateDescription><LocalDatabaseId>4</LocalDatabaseId><IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>False</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource></ServiceResources> +
+
+ + 39 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb1/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 25b2fba9-0e20-45f3-adc3-60748d2c4444-2014-07-02 18:46:07Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 064d90b8-b8be-48d0-a66f-462ced52a212 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:46:11 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>bca19806-bf69-4369-a21f-c607d3756d89</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb1/databasecopies/bca19806-bf69-4369-a21f-c607d3756d89</SelfLink><ParentLink>https://localhost/servers/cloud4/databases/testdb1</ParentLink><SourceServerName>cloud4</SourceServerName><SourceDatabaseName>testdb1</SourceDatabaseName><DestinationServerName>partnersrv</DestinationServerName><DestinationDatabaseName>testdb1</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:43:07.3300000Z</StartDate><ModifyDate>2014-07-02T18:44:47.3530000Z</ModifyDate><PercentComplete>100</PercentComplete><ReplicationState>2</ReplicationState><ReplicationStateDescription>CATCH_UP</ReplicationStateDescription><LocalDatabaseId>5</LocalDatabaseId><IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>False</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource></ServiceResources> +
+
+ + 40 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb4/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 25b2fba9-0e20-45f3-adc3-60748d2c4444-2014-07-02 18:46:07Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 72d31b71-f532-438f-bebf-93ee4ca419c8 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:46:11 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>51d22086-2be9-4f4a-a569-3b3372f50d34</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb4/databasecopies/51d22086-2be9-4f4a-a569-3b3372f50d34</SelfLink><ParentLink>https://localhost/servers/cloud4/databases/testdb4</ParentLink><SourceServerName>cloud4</SourceServerName><SourceDatabaseName>testdb4</SourceDatabaseName><DestinationServerName>partnersrv</DestinationServerName><DestinationDatabaseName>testdb4</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:44:29.6930000Z</StartDate><ModifyDate>2014-07-02T18:45:41.6200000Z</ModifyDate><PercentComplete>100</PercentComplete><ReplicationState>2</ReplicationState><ReplicationStateDescription>CATCH_UP</ReplicationStateDescription><LocalDatabaseId>6</LocalDatabaseId><IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>True</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource></ServiceResources> +
+
+ + 41 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb2/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 25b2fba9-0e20-45f3-adc3-60748d2c4444-2014-07-02 18:46:07Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 288da756-a21c-4b5a-b0c9-bec663a7c467 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:46:11 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>ae68062d-9a09-4ae3-b7d1-99eee6004d7f</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb2/databasecopies/ae68062d-9a09-4ae3-b7d1-99eee6004d7f</SelfLink><ParentLink>https://localhost/servers/cloud4/databases/testdb2</ParentLink><SourceServerName>partnersrv</SourceServerName><SourceDatabaseName>testdb2</SourceDatabaseName><DestinationServerName>cloud4</DestinationServerName><DestinationDatabaseName>testdb2</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:44:01.2900000Z</StartDate><ModifyDate>2014-07-02T18:45:18.6670000Z</ModifyDate><PercentComplete>100</PercentComplete><ReplicationState>2</ReplicationState><ReplicationStateDescription>CATCH_UP</ReplicationStateDescription><LocalDatabaseId>7</LocalDatabaseId><IsLocalDatabaseReplicationTarget>True</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>False</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource></ServiceResources> +
+
+ + 42 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb3/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 25b2fba9-0e20-45f3-adc3-60748d2c4444-2014-07-02 18:46:07Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + a716043f-aa99-46eb-baf7-c3cd8065684d +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:46:13 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>47dcf839-2847-4458-9e61-584f3adbc2bc</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb3/databasecopies/47dcf839-2847-4458-9e61-584f3adbc2bc</SelfLink><ParentLink>https://localhost/servers/cloud4/databases/testdb3</ParentLink><SourceServerName>partnersrv</SourceServerName><SourceDatabaseName>testdb3</SourceDatabaseName><DestinationServerName>cloud4</DestinationServerName><DestinationDatabaseName>testdb3</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:45:24.5270000Z</StartDate><ModifyDate>2014-07-02T18:45:55.6170000Z</ModifyDate><PercentComplete>100</PercentComplete><ReplicationState>2</ReplicationState><ReplicationStateDescription>CATCH_UP</ReplicationStateDescription><LocalDatabaseId>8</LocalDatabaseId><IsLocalDatabaseReplicationTarget>True</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>False</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource></ServiceResources> +
+
+ + 43 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb0/databasecopies/8df450a0-461f-4d20-975d-6737a3939c61 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 9abd67c1-7f21-4bff-b381-9b9353de7271-2014-07-02 18:46:13Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + ab8f5d9b-3acf-4d21-8e67-fd8cb5ad60e7 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:46:13 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>8df450a0-461f-4d20-975d-6737a3939c61</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb0/databasecopies/8df450a0-461f-4d20-975d-6737a3939c61</SelfLink><ParentLink>https://localhost/servers/cloud4/databases/testdb0</ParentLink><SourceServerName>cloud4</SourceServerName><SourceDatabaseName>testdb0</SourceDatabaseName><DestinationServerName>partnersrv</DestinationServerName><DestinationDatabaseName>testdb0</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:42:57.6170000Z</StartDate><ModifyDate>2014-07-02T18:45:01.0200000Z</ModifyDate><PercentComplete>100</PercentComplete><ReplicationState>2</ReplicationState><ReplicationStateDescription>CATCH_UP</ReplicationStateDescription><LocalDatabaseId>4</LocalDatabaseId><IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>False</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource> +
+
+ + 44 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb0/databasecopies/8df450a0-461f-4d20-975d-6737a3939c61 + PUT + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 778a4b06-2059-42d1-8fa8-3b922268ca5c-2014-07-02 18:46:13Z +
+
+ + + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <IsForcedTerminate>false</IsForcedTerminate> + </ServiceResource> + + application/xml + +
+ + OK + +
+ x-ms-request-id + 7cf78e68-ee60-4dad-a4b7-0cd7471b0f42 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:46:17 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>8df450a0-461f-4d20-975d-6737a3939c61</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb0/databasecopies/8df450a0-461f-4d20-975d-6737a3939c61</SelfLink><ParentLink>https://localhost/servers/cloud4/databases/testdb0</ParentLink><SourceServerName>cloud4</SourceServerName><SourceDatabaseName>testdb0</SourceDatabaseName><DestinationServerName>partnersrv</DestinationServerName><DestinationDatabaseName>testdb0</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:42:57.6170000Z</StartDate><ModifyDate>2014-07-02T18:45:01.0200000Z</ModifyDate><PercentComplete>100</PercentComplete><ReplicationState>2</ReplicationState><ReplicationStateDescription>CATCH_UP</ReplicationStateDescription><LocalDatabaseId>4</LocalDatabaseId><IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>False</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource> +
+
+ + 45 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb0/databasecopies/8df450a0-461f-4d20-975d-6737a3939c61 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 778a4b06-2059-42d1-8fa8-3b922268ca5c-2014-07-02 18:46:13Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 29b7b16d-23d7-49ba-b109-ecea7c87f62a +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Wed, 02 Jul 2014 18:46:27 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 46 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb1/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 10163264-c9e3-492b-845f-c8f30e1db79e-2014-07-02 18:46:27Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + cd8a7026-37e8-4cd4-8fd8-aed0796274b8 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:46:27 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>bca19806-bf69-4369-a21f-c607d3756d89</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb1/databasecopies/bca19806-bf69-4369-a21f-c607d3756d89</SelfLink><ParentLink>https://localhost/servers/cloud4/databases/testdb1</ParentLink><SourceServerName>cloud4</SourceServerName><SourceDatabaseName>testdb1</SourceDatabaseName><DestinationServerName>partnersrv</DestinationServerName><DestinationDatabaseName>testdb1</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:43:07.3300000Z</StartDate><ModifyDate>2014-07-02T18:44:47.3530000Z</ModifyDate><PercentComplete>100</PercentComplete><ReplicationState>2</ReplicationState><ReplicationStateDescription>CATCH_UP</ReplicationStateDescription><LocalDatabaseId>5</LocalDatabaseId><IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>False</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource></ServiceResources> +
+
+ + 47 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb1/databasecopies/bca19806-bf69-4369-a21f-c607d3756d89 + PUT + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + df72b562-0d56-4ebb-941c-f8ba432aee6d-2014-07-02 18:46:27Z +
+
+ + + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <IsForcedTerminate>true</IsForcedTerminate> + </ServiceResource> + + application/xml + +
+ + OK + +
+ x-ms-request-id + 6e0e388a-22e3-4e08-8bfc-d2778b59aba1 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:46:33 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>bca19806-bf69-4369-a21f-c607d3756d89</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb1/databasecopies/bca19806-bf69-4369-a21f-c607d3756d89</SelfLink><ParentLink>https://localhost/servers/cloud4/databases/testdb1</ParentLink><SourceServerName>cloud4</SourceServerName><SourceDatabaseName>testdb1</SourceDatabaseName><DestinationServerName>partnersrv</DestinationServerName><DestinationDatabaseName>testdb1</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:43:07.3300000Z</StartDate><ModifyDate>2014-07-02T18:44:47.3530000Z</ModifyDate><PercentComplete>100</PercentComplete><ReplicationState>2</ReplicationState><ReplicationStateDescription>CATCH_UP</ReplicationStateDescription><LocalDatabaseId>5</LocalDatabaseId><IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>False</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource> +
+
+ + 48 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb1/databasecopies/bca19806-bf69-4369-a21f-c607d3756d89 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + df72b562-0d56-4ebb-941c-f8ba432aee6d-2014-07-02 18:46:27Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + aa4ffc3a-e58d-4a0d-a5fd-e4b0780dd48c +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Wed, 02 Jul 2014 18:46:38 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 49 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/partnersrv/databases/testdb2/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + c68037f5-afc3-4126-97fc-6ac9b8045bd6-2014-07-02 18:46:38Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + f30706f2-4fce-49e3-8506-d4fc8160e4fb +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:46:38 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>ae68062d-9a09-4ae3-b7d1-99eee6004d7f</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/databases/testdb2/databasecopies/ae68062d-9a09-4ae3-b7d1-99eee6004d7f</SelfLink><ParentLink>https://localhost/servers/partnersrv/databases/testdb2</ParentLink><SourceServerName>partnersrv</SourceServerName><SourceDatabaseName>testdb2</SourceDatabaseName><DestinationServerName>cloud4</DestinationServerName><DestinationDatabaseName>testdb2</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:43:24.9030000Z</StartDate><ModifyDate>2014-07-02T18:45:07.2900000Z</ModifyDate><PercentComplete>100</PercentComplete><ReplicationState>2</ReplicationState><ReplicationStateDescription>CATCH_UP</ReplicationStateDescription><LocalDatabaseId>4</LocalDatabaseId><IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>False</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource></ServiceResources> +
+
+ + 50 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/partnersrv/databases/testdb2/databasecopies/ae68062d-9a09-4ae3-b7d1-99eee6004d7f + PUT + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + e3227a31-195b-481b-8dca-19322b85db4c-2014-07-02 18:46:39Z +
+
+ + + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <IsForcedTerminate>false</IsForcedTerminate> + </ServiceResource> + + application/xml + +
+ + OK + +
+ x-ms-request-id + a4205bb6-76b9-44ab-9afd-1e4c01c0d5fb +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:46:41 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>ae68062d-9a09-4ae3-b7d1-99eee6004d7f</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/databases/testdb2/databasecopies/ae68062d-9a09-4ae3-b7d1-99eee6004d7f</SelfLink><ParentLink>https://localhost/servers/partnersrv/databases/testdb2</ParentLink><SourceServerName>partnersrv</SourceServerName><SourceDatabaseName>testdb2</SourceDatabaseName><DestinationServerName>cloud4</DestinationServerName><DestinationDatabaseName>testdb2</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:43:24.9030000Z</StartDate><ModifyDate>2014-07-02T18:45:07.2900000Z</ModifyDate><PercentComplete>100</PercentComplete><ReplicationState>2</ReplicationState><ReplicationStateDescription>CATCH_UP</ReplicationStateDescription><LocalDatabaseId>4</LocalDatabaseId><IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>False</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource> +
+
+ + 51 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/partnersrv/databases/testdb2/databasecopies/ae68062d-9a09-4ae3-b7d1-99eee6004d7f + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + e3227a31-195b-481b-8dca-19322b85db4c-2014-07-02 18:46:39Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + ed1ae6ee-b16a-4435-bba7-4117d2c0431e +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Wed, 02 Jul 2014 18:46:47 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 52 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb3/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 7a9b982a-acf4-4bd9-b7bb-785af25350bb-2014-07-02 18:46:47Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 9cba508b-04ff-4fc7-acbe-f7f4c4bff23e +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:46:51 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>47dcf839-2847-4458-9e61-584f3adbc2bc</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb3/databasecopies/47dcf839-2847-4458-9e61-584f3adbc2bc</SelfLink><ParentLink>https://localhost/servers/cloud4/databases/testdb3</ParentLink><SourceServerName>partnersrv</SourceServerName><SourceDatabaseName>testdb3</SourceDatabaseName><DestinationServerName>cloud4</DestinationServerName><DestinationDatabaseName>testdb3</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:45:24.5270000Z</StartDate><ModifyDate>2014-07-02T18:45:55.6170000Z</ModifyDate><PercentComplete>100</PercentComplete><ReplicationState>2</ReplicationState><ReplicationStateDescription>CATCH_UP</ReplicationStateDescription><LocalDatabaseId>8</LocalDatabaseId><IsLocalDatabaseReplicationTarget>True</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>False</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource></ServiceResources> +
+
+ + 53 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb3/databasecopies/47dcf839-2847-4458-9e61-584f3adbc2bc + PUT + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + f3914f9c-915c-471a-a797-86c0dcb7a397-2014-07-02 18:46:51Z +
+
+ + + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <IsForcedTerminate>true</IsForcedTerminate> + </ServiceResource> + + application/xml + +
+ + OK + +
+ x-ms-request-id + 8221f862-141b-4ace-b22b-8684637a7826 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:46:52 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>47dcf839-2847-4458-9e61-584f3adbc2bc</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb3/databasecopies/47dcf839-2847-4458-9e61-584f3adbc2bc</SelfLink><ParentLink>https://localhost/servers/cloud4/databases/testdb3</ParentLink><SourceServerName>partnersrv</SourceServerName><SourceDatabaseName>testdb3</SourceDatabaseName><DestinationServerName>cloud4</DestinationServerName><DestinationDatabaseName>testdb3</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:45:24.5270000Z</StartDate><ModifyDate>2014-07-02T18:45:55.6170000Z</ModifyDate><PercentComplete>100</PercentComplete><ReplicationState>2</ReplicationState><ReplicationStateDescription>CATCH_UP</ReplicationStateDescription><LocalDatabaseId>8</LocalDatabaseId><IsLocalDatabaseReplicationTarget>True</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>False</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource> +
+
+ + 54 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb3/databasecopies/47dcf839-2847-4458-9e61-584f3adbc2bc + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + f3914f9c-915c-471a-a797-86c0dcb7a397-2014-07-02 18:46:51Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + ad9f904e-c5c7-454b-be62-2f46080e8300 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Wed, 02 Jul 2014 18:47:06 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 55 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb4/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + f4d98c48-35f1-47c8-a8a1-3dd231ee00b1-2014-07-02 18:47:06Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + be101562-b103-4199-8623-aa8fe88f5a75 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:47:07 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>51d22086-2be9-4f4a-a569-3b3372f50d34</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb4/databasecopies/51d22086-2be9-4f4a-a569-3b3372f50d34</SelfLink><ParentLink>https://localhost/servers/cloud4/databases/testdb4</ParentLink><SourceServerName>cloud4</SourceServerName><SourceDatabaseName>testdb4</SourceDatabaseName><DestinationServerName>partnersrv</DestinationServerName><DestinationDatabaseName>testdb4</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:44:29.6930000Z</StartDate><ModifyDate>2014-07-02T18:45:41.6200000Z</ModifyDate><PercentComplete>100</PercentComplete><ReplicationState>2</ReplicationState><ReplicationStateDescription>CATCH_UP</ReplicationStateDescription><LocalDatabaseId>6</LocalDatabaseId><IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>True</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource></ServiceResources> +
+
+ + 56 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb4/databasecopies/51d22086-2be9-4f4a-a569-3b3372f50d34 + PUT + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 2da385bd-2f29-45ff-a2bb-e7bd30a6f0a8-2014-07-02 18:47:08Z +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <IsForcedTerminate>true</IsForcedTerminate> +</ServiceResource> + application/xml + +
+ + OK + +
+ x-ms-request-id + 0356b296-0598-4a6e-b2a5-50ee36f98a02 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:47:23 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>51d22086-2be9-4f4a-a569-3b3372f50d34</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb4/databasecopies/51d22086-2be9-4f4a-a569-3b3372f50d34</SelfLink><ParentLink>https://localhost/servers/cloud4/databases/testdb4</ParentLink><SourceServerName>cloud4</SourceServerName><SourceDatabaseName>testdb4</SourceDatabaseName><DestinationServerName>partnersrv</DestinationServerName><DestinationDatabaseName>testdb4</DestinationDatabaseName><IsContinuous>True</IsContinuous><StartDate>2014-07-02T18:44:29.6930000Z</StartDate><ModifyDate>2014-07-02T18:45:41.6200000Z</ModifyDate><PercentComplete>100</PercentComplete><ReplicationState>2</ReplicationState><ReplicationStateDescription>CATCH_UP</ReplicationStateDescription><LocalDatabaseId>6</LocalDatabaseId><IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected><IsOfflineSecondary>True</IsOfflineSecondary><IsTerminationAllowed>True</IsTerminationAllowed></ServiceResource> +
+
+ + 57 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb4/databasecopies/51d22086-2be9-4f4a-a569-3b3372f50d34 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 2da385bd-2f29-45ff-a2bb-e7bd30a6f0a8-2014-07-02 18:47:08Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 0ea54bb6-a187-469d-be4a-78cddb8e8607 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Wed, 02 Jul 2014 18:47:55 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 58 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb0/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 895e78a2-ba4d-4677-aa95-73f60c136f76-2014-07-02 18:47:55Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 41d4deec-c78f-4b76-86c2-f78997847342 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:48:01 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/> +
+
+ + 59 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb1/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + f59c4358-a09f-4348-9a55-622937ab3487-2014-07-02 18:48:01Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + b331a895-0c4d-45af-864b-93750d418c3b +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:48:03 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/> +
+
+ + 60 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/partnersrv/databases/testdb2/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 45d0c179-3b4f-4868-ae1d-8fae7ee2a9f5-2014-07-02 18:48:04Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + fb27c970-6e85-4884-86b0-d43061bd34a0 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:48:07 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/> +
+
+ + 61 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb3/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 7de3fd34-8161-493b-ab2a-23e508344332-2014-07-02 18:48:07Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 9e4e11bc-1d30-4b22-955f-cf8598e58dee +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:48:07 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/> +
+
+ + 62 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb4/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 50ff4911-c6cb-4396-9100-fd5e742a0c8d-2014-07-02 18:48:07Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 65b8d1ad-98a2-4815-b8d4-aa6901be8472 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:48:07 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/> +
+
+ + 63 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases?contentview=generic + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 9f07b526-ee55-44ed-879a-457edaecb486-2014-07-02 18:48:08Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + d3fb9c89-6c7a-41a7-ba88-c085d629c689 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:48:08 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>master</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/master</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>1</Id><Edition>System</Edition><MaxSizeGB>5</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T17:47:03.6500000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>True</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>5368709120</MaxSizeBytes><ServiceObjectiveId>26e021db-f1f9-4c98-84c6-92af8ef433d7</ServiceObjectiveId><AssignedServiceObjectiveId>26e021db-f1f9-4c98-84c6-92af8ef433d7</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T17:47:23.9330000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate i:nil="true"/><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdb0</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb0</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>4</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T18:40:51.5700000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T18:40:59.8870000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-03T01:46:01.5730000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdb1</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb1</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>5</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T18:41:09.3500000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T18:41:20.2470000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-03T01:45:47.4800000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdb4</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb4</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>6</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T18:42:33.3600000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T18:42:40.9800000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-03T01:46:41.6830000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdb2</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb2</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>7</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T18:43:56.6670000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T18:45:17.2130000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-03T01:46:19.1370000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdb3</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb3</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>8</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T18:45:17.8630000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T18:45:55.2300000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-03T01:46:55.8400000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource></ServiceResources> +
+
+ + 64 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/master/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 9f07b526-ee55-44ed-879a-457edaecb486-2014-07-02 18:48:08Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 553d5387-a824-4f96-9f98-5b8c886e8216 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:48:10 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/> +
+
+ + 65 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb0/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 9f07b526-ee55-44ed-879a-457edaecb486-2014-07-02 18:48:08Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 3d49e414-07b1-4823-8afa-c437a574adcb +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:48:10 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/> +
+
+ + 66 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb1/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 9f07b526-ee55-44ed-879a-457edaecb486-2014-07-02 18:48:08Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + ced2f9f2-59ff-4f88-8cfd-05d945454786 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:48:10 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/> +
+
+ + 67 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb4/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 9f07b526-ee55-44ed-879a-457edaecb486-2014-07-02 18:48:08Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 323b3672-18e4-4837-95cf-1eccf0e340e8 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:48:11 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/> +
+
+ + 68 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb2/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 9f07b526-ee55-44ed-879a-457edaecb486-2014-07-02 18:48:08Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + e9755735-33ad-41c5-b589-9d51fe62fe65 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:48:11 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/> +
+
+ + 69 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb3/databasecopies + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 9f07b526-ee55-44ed-879a-457edaecb486-2014-07-02 18:48:08Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 973aba1d-a20a-4646-92a9-14a3fe20e9aa +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:48:12 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/> +
+
+ + 70 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases?contentview=generic + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + a42e534e-7ca1-424b-be56-ecb412bea813-2014-07-02 18:48:12Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 7e305d34-665d-4918-9179-773a2e7b6b7b +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:48:14 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>master</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/master</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>1</Id><Edition>System</Edition><MaxSizeGB>5</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T17:47:03.6500000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>True</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>5368709120</MaxSizeBytes><ServiceObjectiveId>26e021db-f1f9-4c98-84c6-92af8ef433d7</ServiceObjectiveId><AssignedServiceObjectiveId>26e021db-f1f9-4c98-84c6-92af8ef433d7</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T17:47:23.9330000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate i:nil="true"/><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdb0</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb0</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>4</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T18:40:51.5700000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T18:40:59.8870000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-03T01:46:01.5730000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdb1</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb1</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>5</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T18:41:09.3500000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T18:41:20.2470000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-03T01:45:47.4800000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdb4</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb4</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>6</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T18:42:33.3600000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T18:42:40.9800000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-03T01:46:41.6830000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdb2</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb2</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>7</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T18:43:56.6670000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T18:45:17.2130000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-03T01:46:19.1370000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdb3</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb3</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>8</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T18:45:17.8630000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T18:45:55.2300000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-03T01:46:55.8400000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource></ServiceResources> +
+
+ + 71 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/serviceobjectives/26e021db-f1f9-4c98-84c6-92af8ef433d7 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 7848f16c-1f65-4e9d-8d6c-38f2ca39eb59-2014-07-02 18:48:14Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 9611db07-836c-423b-9d09-56f7d881b9e7 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:48:14 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>System</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/serviceobjectives/26e021db-f1f9-4c98-84c6-92af8ef433d7</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>26e021db-f1f9-4c98-84c6-92af8ef433d7</Id><IsDefault>False</IsDefault><IsSystem>True</IsSystem><Description>Used for master database only.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>System</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/dimensionsettings/5b1e7ca2-f1c8-4da8-bb42-7ebe94a92609</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>5b1e7ca2-f1c8-4da8-bb42-7ebe94a92609</Id><Description>Used for master database only.</Description><Ordinal>1</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 72 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + c7ccab11-3412-4c11-92fc-e88c7956db92-2014-07-02 18:48:14Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 5fb47a90-c879-495a-b280-620093900fd2 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:48:15 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 73 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 640ac858-7bcb-4fea-8583-3019c7c2648b-2014-07-02 18:48:15Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 92fc94c4-491b-436e-a618-c0690658df73 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:48:15 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 74 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 0201ba05-69e5-4304-acab-87390b0c5a62-2014-07-02 18:48:15Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 05fb2aee-a769-4b50-81d5-be875a7a7be6 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:48:15 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 75 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 743bdd27-6557-42d2-9c0d-41a36db220dc-2014-07-02 18:48:16Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + c2e7b21d-06fc-445d-832f-85cf90fc343f +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:48:16 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 76 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + bc076cdf-eacf-4993-949a-7fd6c6f3a1be-2014-07-02 18:48:16Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 548938b3-be7b-49ce-a088-847e20e8e6b5 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:48:16 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 77 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb0 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 0519f4a5-e2d9-45f9-a7fa-51f806d1f255-2014-07-02 18:48:16Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + e15b6f1f-0135-44a4-9893-8db91a3eb9ea +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Wed, 02 Jul 2014 18:48:24 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 78 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb1 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 598721c5-ee17-4db8-9843-420647d9edfc-2014-07-02 18:48:24Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 13d3fca3-7dc9-4a11-99d9-4c85c079df1a +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Wed, 02 Jul 2014 18:48:26 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 79 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb4 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + bdbfb9a6-8306-4ce4-97eb-8aa169ca06ad-2014-07-02 18:48:26Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 721805ce-c7b9-44d9-9e95-d49e35bc2167 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Wed, 02 Jul 2014 18:48:32 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 80 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb2 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 02c228e4-90ba-4fe5-8f75-d30556678b52-2014-07-02 18:48:32Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + c7001c19-95db-4dcb-9705-c76488725516 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Wed, 02 Jul 2014 18:48:38 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 81 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb3 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 9875331a-8438-4c7d-9ae1-9ad4219f68c1-2014-07-02 18:48:38Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 18fa9c5a-77dd-4efc-bb24-10b7c89c3c8c +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Wed, 02 Jul 2014 18:48:46 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 82 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/partnersrv/databases?contentview=generic + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + f4b63a46-700f-45c0-8b7a-75982136d94d-2014-07-02 18:48:46Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 294188c7-ae28-46c2-9ed4-fccc03602c6f +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:48:46 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>master</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/databases/master</SelfLink><ParentLink>https://localhost/servers/partnersrv</ParentLink><Id>1</Id><Edition>System</Edition><MaxSizeGB>5</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T17:47:46.6730000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>True</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>5368709120</MaxSizeBytes><ServiceObjectiveId>26e021db-f1f9-4c98-84c6-92af8ef433d7</ServiceObjectiveId><AssignedServiceObjectiveId>26e021db-f1f9-4c98-84c6-92af8ef433d7</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T17:48:08.9030000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate i:nil="true"/><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdb2</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/databases/testdb2</SelfLink><ParentLink>https://localhost/servers/partnersrv</ParentLink><Id>4</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T18:41:28.4570000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T18:41:42.3070000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-03T01:46:08.1200000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdb3</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/databases/testdb3</SelfLink><ParentLink>https://localhost/servers/partnersrv</ParentLink><Id>5</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T18:42:01.5100000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T18:42:25.5100000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-03T01:46:55.0730000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdb0</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/databases/testdb0</SelfLink><ParentLink>https://localhost/servers/partnersrv</ParentLink><Id>6</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T18:43:04.6530000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T18:45:05.0730000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-03T01:46:12.6970000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdb1</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/databases/testdb1</SelfLink><ParentLink>https://localhost/servers/partnersrv</ParentLink><Id>7</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T18:43:12.3600000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T18:44:52.6200000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-03T01:46:09.2770000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdb4</Name><Type>Microsoft.SqlAzure.Database</Type><State>Suspect</State><SelfLink>https://localhost/servers/partnersrv/databases/testdb4</SelfLink><ParentLink>https://localhost/servers/partnersrv</ParentLink><Id>8</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-07-02T18:44:45.5030000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-07-02T18:45:44.2600000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-07-03T01:46:47.9800000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource></ServiceResources> +
+
+ + 83 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/partnersrv/serviceobjectives/26e021db-f1f9-4c98-84c6-92af8ef433d7 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + b3d9d368-edb2-4989-a8c3-7c0872a99ca5-2014-07-02 18:48:46Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 2c63ce84-933d-49cb-9537-7093c8594fee +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:48:46 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>System</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/serviceobjectives/26e021db-f1f9-4c98-84c6-92af8ef433d7</SelfLink><ParentLink>https://localhost/servers/partnersrv</ParentLink><Id>26e021db-f1f9-4c98-84c6-92af8ef433d7</Id><IsDefault>False</IsDefault><IsSystem>True</IsSystem><Description>Used for master database only.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>System</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/dimensionsettings/5b1e7ca2-f1c8-4da8-bb42-7ebe94a92609</SelfLink><ParentLink>https://localhost/servers/partnersrv</ParentLink><Id>5b1e7ca2-f1c8-4da8-bb42-7ebe94a92609</Id><Description>Used for master database only.</Description><Ordinal>1</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 84 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/partnersrv/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 34d5fe72-51bb-4e43-a020-dd82408c713c-2014-07-02 18:48:46Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 64237926-b4ca-472a-bf47-054f4543f162 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:48:46 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/partnersrv</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/partnersrv</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 85 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/partnersrv/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 330e9f6b-c9ee-4713-8112-5ba66eec3db3-2014-07-02 18:48:46Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 8d08c5b8-13c9-436b-a247-3d72cc7b1f0a +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:48:46 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/partnersrv</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/partnersrv</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 86 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/partnersrv/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + fc0a7218-4267-4678-b73c-d54aae9f367c-2014-07-02 18:48:47Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 0a376f6c-f61a-470d-9ce6-946379318f45 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:48:47 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/partnersrv</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/partnersrv</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 87 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/partnersrv/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 63d2d975-8f4a-4a64-b2e8-6db38bd12020-2014-07-02 18:48:47Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + b9e20c4e-6068-4024-80a4-632dc32b0477 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:48:47 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/partnersrv</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/partnersrv</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 88 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/partnersrv/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + e1def5c9-f186-4385-8fbb-fdeb9a75e56d-2014-07-02 18:48:47Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 60fc52d9-9d31-4e27-9a97-b496c1ccf2dd +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Wed, 02 Jul 2014 18:48:47 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/partnersrv</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/partnersrv</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 89 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/partnersrv/databases/testdb2 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + f388f8d6-f0ef-40cf-87c4-317cedee2cfd-2014-07-02 18:48:47Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 0ff6a95c-b8f2-4a17-8b73-a2128302b22a +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Wed, 02 Jul 2014 18:49:07 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 90 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/partnersrv/databases/testdb3 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 114e6b5a-fa75-4fc4-8fd4-cd62aa90c68e-2014-07-02 18:49:07Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 5c78510c-381e-43a6-870c-355082c7b5b0 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Wed, 02 Jul 2014 18:49:48 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 91 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/partnersrv/databases/testdb0 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + 816a3fe3-e455-476c-82cb-cea759a7441a-2014-07-02 18:49:48Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 397e93df-0169-4d16-aaac-406ced1e05c2 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Wed, 02 Jul 2014 18:49:57 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 92 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/partnersrv/databases/testdb1 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + cac9a1fe-62d6-4d88-bbcf-598182315f71-2014-07-02 18:49:57Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 4100a558-dfdf-4d45-9cbe-e4feb700b435 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Wed, 02 Jul 2014 18:50:10 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 93 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/partnersrv/databases/testdb4 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/1.0.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5239bcba-a38e-4fec-8e44-0b13d907360e-2014-07-02 18:40:43Z +
+
+ x-ms-client-request-id + bf197c2c-97c5-4ff5-b2ed-344b167ab0ed-2014-07-02 18:50:10Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 9afc41f0-7a6f-419a-803f-04013a1f6ed5 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Wed, 02 Jul 2014 18:50:18 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+
+
+ + UnitTest.Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Database.Cmdlet.AzureSqlDatabaseCopyCertAuthTests.AzureSqlDatabaseCopyCertTests + + + 0 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5aacda44-1ecd-4780-9680-fde54498070b-2014-04-15 21:47:05Z +
+
+ x-ms-client-request-id + d1f80ff9-cd56-4baa-97fd-3a3109f8542f-2014-04-15 21:47:05Z +
+
+ + + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <Name>testdb0</Name> + <CollationName></CollationName> + </ServiceResource> + + application/xml + +
+ + Created + +
+ x-ms-request-id + d1f80ff9-cd56-4baa-97fd-3a3109f8542f +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 15 Apr 2014 21:47:07 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdb0</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb0</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>4</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-04-15T21:47:07.7000000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-04-15T21:47:08.3400000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-04-15T21:48:07.6100000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 1 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5aacda44-1ecd-4780-9680-fde54498070b-2014-04-15 21:47:05Z +
+
+ x-ms-client-request-id + 23cb920a-c0f9-4b04-aa76-f3c66a0d1402-2014-04-15 21:47:08Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 23cb920a-c0f9-4b04-aa76-f3c66a0d1402 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 15 Apr 2014 21:47:07 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 2 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb0/databasecopies + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5aacda44-1ecd-4780-9680-fde54498070b-2014-04-15 21:47:05Z +
+
+ x-ms-client-request-id + 819fc9cb-51d9-4a2e-b05f-fd7f5ba78f22-2014-04-15 21:47:08Z +
+
+ + + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <PartnerServer>cloud4</PartnerServer> + <PartnerDatabase>testdb0copy1</PartnerDatabase> + <IsContinuous>false</IsContinuous> + </ServiceResource> + + application/xml + +
+ + Created + +
+ x-ms-request-id + 819fc9cb-51d9-4a2e-b05f-fd7f5ba78f22 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 15 Apr 2014 21:47:10 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>fd8e9263-5e78-48d3-ac82-6380312e44d3</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb0/databasecopies/fd8e9263-5e78-48d3-ac82-6380312e44d3</SelfLink><ParentLink>https://localhost/servers/cloud4/databases/testdb0</ParentLink><SourceServerName>cloud4</SourceServerName><SourceDatabaseName>testdb0</SourceDatabaseName><DestinationServerName>cloud4</DestinationServerName><DestinationDatabaseName>testdb0copy1</DestinationDatabaseName><IsContinuous>False</IsContinuous><StartDate>2014-04-15T21:47:09.8600000Z</StartDate><ModifyDate>2014-04-15T21:47:09.8600000Z</ModifyDate><PercentComplete>0</PercentComplete><ReplicationState>0</ReplicationState><ReplicationStateDescription>PENDING</ReplicationStateDescription><LocalDatabaseId>4</LocalDatabaseId><IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected></ServiceResource> +
+
+ + 3 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb0/databasecopies + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5aacda44-1ecd-4780-9680-fde54498070b-2014-04-15 21:47:05Z +
+
+ x-ms-client-request-id + 75e57546-2ca0-4c4c-a84a-888019485367-2014-04-15 21:47:10Z +
+
+ + + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <PartnerServer>cloud4</PartnerServer> + <PartnerDatabase>testdb0copy2</PartnerDatabase> + <IsContinuous>false</IsContinuous> + </ServiceResource> + + application/xml + +
+ + Created + +
+ x-ms-request-id + 75e57546-2ca0-4c4c-a84a-888019485367 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 15 Apr 2014 21:47:12 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>da81c3fe-d3cd-4e9a-9d34-bd57d8ff3d14</Name><Type>Microsoft.SqlAzure.DatabaseCopy</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb0/databasecopies/da81c3fe-d3cd-4e9a-9d34-bd57d8ff3d14</SelfLink><ParentLink>https://localhost/servers/cloud4/databases/testdb0</ParentLink><SourceServerName>cloud4</SourceServerName><SourceDatabaseName>testdb0</SourceDatabaseName><DestinationServerName>cloud4</DestinationServerName><DestinationDatabaseName>testdb0copy2</DestinationDatabaseName><IsContinuous>False</IsContinuous><StartDate>2014-04-15T21:47:11.0630000Z</StartDate><ModifyDate>2014-04-15T21:47:11.0630000Z</ModifyDate><PercentComplete>0</PercentComplete><ReplicationState>0</ReplicationState><ReplicationStateDescription>PENDING</ReplicationStateDescription><LocalDatabaseId>4</LocalDatabaseId><IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget><IsInterlinkConnected>True</IsInterlinkConnected></ServiceResource> +
+
+ + 4 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases?contentview=generic + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5aacda44-1ecd-4780-9680-fde54498070b-2014-04-15 21:47:05Z +
+
+ x-ms-client-request-id + b5397a45-cc92-456d-a06e-87ebda0e478b-2014-04-15 21:47:13Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + b5397a45-cc92-456d-a06e-87ebda0e478b +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 15 Apr 2014 21:47:12 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>master</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/master</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>1</Id><Edition>System</Edition><MaxSizeGB>5</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-04-15T19:11:43.0800000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>True</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>5368709120</MaxSizeBytes><ServiceObjectiveId>26e021db-f1f9-4c98-84c6-92af8ef433d7</ServiceObjectiveId><AssignedServiceObjectiveId>26e021db-f1f9-4c98-84c6-92af8ef433d7</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-04-15T19:11:45.0030000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate i:nil="true"/><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdb0</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb0</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>4</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-04-15T21:47:07.7000000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-04-15T21:47:08.3400000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-04-15T21:48:07.6100000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdb0copy1</Name><Type>Microsoft.SqlAzure.Database</Type><State>Copying</State><SelfLink>https://localhost/servers/cloud4/databases/testdb0copy1</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>5</Id><Edition/><MaxSizeGB>-1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-04-15T21:47:09.8430000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>-1</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>0</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Pending</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode i:nil="true"/><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate i:nil="true"/><RecoveryPeriodStartDate i:nil="true"/><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdb0copy2</Name><Type>Microsoft.SqlAzure.Database</Type><State>Copying</State><SelfLink>https://localhost/servers/cloud4/databases/testdb0copy2</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>6</Id><Edition/><MaxSizeGB>-1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-04-15T21:47:11.0070000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>-1</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>0</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Pending</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode i:nil="true"/><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate i:nil="true"/><RecoveryPeriodStartDate i:nil="true"/><IsSuspended>False</IsSuspended></ServiceResource></ServiceResources> +
+
+ + 5 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/serviceobjectives/26e021db-f1f9-4c98-84c6-92af8ef433d7 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5aacda44-1ecd-4780-9680-fde54498070b-2014-04-15 21:47:05Z +
+
+ x-ms-client-request-id + e5307713-09ef-496e-b5f1-5b67d125bc5b-2014-04-15 21:47:13Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + e5307713-09ef-496e-b5f1-5b67d125bc5b +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 15 Apr 2014 21:47:12 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>System</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/serviceobjectives/26e021db-f1f9-4c98-84c6-92af8ef433d7</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>26e021db-f1f9-4c98-84c6-92af8ef433d7</Id><IsDefault>False</IsDefault><IsSystem>True</IsSystem><Description>Used for master database only.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>System</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/dimensionsettings/5b1e7ca2-f1c8-4da8-bb42-7ebe94a92609</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>5b1e7ca2-f1c8-4da8-bb42-7ebe94a92609</Id><Description>Used for master database only.</Description><Ordinal>1</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 6 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5aacda44-1ecd-4780-9680-fde54498070b-2014-04-15 21:47:05Z +
+
+ x-ms-client-request-id + 23fefcbd-7e3c-4e7a-a4af-7e5855bce230-2014-04-15 21:47:13Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 23fefcbd-7e3c-4e7a-a4af-7e5855bce230 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 15 Apr 2014 21:47:12 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 7 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5aacda44-1ecd-4780-9680-fde54498070b-2014-04-15 21:47:05Z +
+
+ x-ms-client-request-id + 7ec342c4-3aef-49fc-a779-a6886a4f491f-2014-04-15 21:47:13Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 7ec342c4-3aef-49fc-a779-a6886a4f491f +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 15 Apr 2014 21:47:12 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 8 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5aacda44-1ecd-4780-9680-fde54498070b-2014-04-15 21:47:05Z +
+
+ x-ms-client-request-id + 287f7b86-06a1-4b42-98af-345fec0c06cd-2014-04-15 21:47:13Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 287f7b86-06a1-4b42-98af-345fec0c06cd +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 15 Apr 2014 21:47:12 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 9 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases?contentview=generic + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5aacda44-1ecd-4780-9680-fde54498070b-2014-04-15 21:47:05Z +
+
+ x-ms-client-request-id + 0a412cf4-b8d4-4288-a4ef-b4668cadc5c9-2014-04-15 21:47:13Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 0a412cf4-b8d4-4288-a4ef-b4668cadc5c9 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 15 Apr 2014 21:47:12 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>master</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/master</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>1</Id><Edition>System</Edition><MaxSizeGB>5</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-04-15T19:11:43.0800000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>True</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>5368709120</MaxSizeBytes><ServiceObjectiveId>26e021db-f1f9-4c98-84c6-92af8ef433d7</ServiceObjectiveId><AssignedServiceObjectiveId>26e021db-f1f9-4c98-84c6-92af8ef433d7</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-04-15T19:11:45.0030000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate i:nil="true"/><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdb0</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/databases/testdb0</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>4</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-04-15T21:47:07.7000000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-04-15T21:47:08.3400000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-04-15T21:48:07.6100000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdb0copy1</Name><Type>Microsoft.SqlAzure.Database</Type><State>Copying</State><SelfLink>https://localhost/servers/cloud4/databases/testdb0copy1</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>5</Id><Edition/><MaxSizeGB>-1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-04-15T21:47:09.8430000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>-1</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>0</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Pending</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode i:nil="true"/><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate i:nil="true"/><RecoveryPeriodStartDate i:nil="true"/><IsSuspended>False</IsSuspended></ServiceResource><ServiceResource><Name>testdb0copy2</Name><Type>Microsoft.SqlAzure.Database</Type><State>Copying</State><SelfLink>https://localhost/servers/cloud4/databases/testdb0copy2</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>6</Id><Edition/><MaxSizeGB>-1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-04-15T21:47:11.0070000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>-1</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>0</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Pending</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode i:nil="true"/><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate i:nil="true"/><RecoveryPeriodStartDate i:nil="true"/><IsSuspended>False</IsSuspended></ServiceResource></ServiceResources> +
+
+ + 10 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/serviceobjectives/26e021db-f1f9-4c98-84c6-92af8ef433d7 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5aacda44-1ecd-4780-9680-fde54498070b-2014-04-15 21:47:05Z +
+
+ x-ms-client-request-id + b47678c3-a6d4-44eb-b5a0-e1f1e146ee1b-2014-04-15 21:47:13Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + b47678c3-a6d4-44eb-b5a0-e1f1e146ee1b +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 15 Apr 2014 21:47:12 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>System</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/serviceobjectives/26e021db-f1f9-4c98-84c6-92af8ef433d7</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>26e021db-f1f9-4c98-84c6-92af8ef433d7</Id><IsDefault>False</IsDefault><IsSystem>True</IsSystem><Description>Used for master database only.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>System</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/dimensionsettings/5b1e7ca2-f1c8-4da8-bb42-7ebe94a92609</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>5b1e7ca2-f1c8-4da8-bb42-7ebe94a92609</Id><Description>Used for master database only.</Description><Ordinal>1</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 11 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5aacda44-1ecd-4780-9680-fde54498070b-2014-04-15 21:47:05Z +
+
+ x-ms-client-request-id + 4b8b1918-5441-465e-b743-6c290df67b2e-2014-04-15 21:47:13Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 4b8b1918-5441-465e-b743-6c290df67b2e +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 15 Apr 2014 21:47:12 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 12 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5aacda44-1ecd-4780-9680-fde54498070b-2014-04-15 21:47:05Z +
+
+ x-ms-client-request-id + 9d9314be-a03b-4f35-80fa-26b25af17fa2-2014-04-15 21:47:13Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 9d9314be-a03b-4f35-80fa-26b25af17fa2 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 15 Apr 2014 21:47:12 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 13 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5aacda44-1ecd-4780-9680-fde54498070b-2014-04-15 21:47:05Z +
+
+ x-ms-client-request-id + bad8e3a5-e18e-4cfe-9815-a0d2655e27ed-2014-04-15 21:47:13Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + bad8e3a5-e18e-4cfe-9815-a0d2655e27ed +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 15 Apr 2014 21:47:13 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/cloud4/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/cloud4</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 14 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb0 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5aacda44-1ecd-4780-9680-fde54498070b-2014-04-15 21:47:05Z +
+
+ x-ms-client-request-id + 7ad4d817-df30-4699-b0ff-b65bd35a7e66-2014-04-15 21:47:13Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 7ad4d817-df30-4699-b0ff-b65bd35a7e66 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Tue, 15 Apr 2014 21:47:16 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 15 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb0copy1 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5aacda44-1ecd-4780-9680-fde54498070b-2014-04-15 21:47:05Z +
+
+ x-ms-client-request-id + 1672d23a-8a0e-4a2d-9371-72589a467bc3-2014-04-15 21:47:17Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 1672d23a-8a0e-4a2d-9371-72589a467bc3 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Tue, 15 Apr 2014 21:47:16 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 16 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cloud4/databases/testdb0copy2 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5aacda44-1ecd-4780-9680-fde54498070b-2014-04-15 21:47:05Z +
+
+ x-ms-client-request-id + 11e58e00-7fd2-4aa1-9226-c9cb0ae4dd03-2014-04-15 21:47:17Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 11e58e00-7fd2-4aa1-9226-c9cb0ae4dd03 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Tue, 15 Apr 2014 21:47:17 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 17 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/partnersrv/databases?contentview=generic + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5aacda44-1ecd-4780-9680-fde54498070b-2014-04-15 21:47:05Z +
+
+ x-ms-client-request-id + 2d5256ee-d06e-4801-93d0-4320f4db52be-2014-04-15 21:47:18Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 2d5256ee-d06e-4801-93d0-4320f4db52be +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 15 Apr 2014 21:47:17 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>master</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/databases/master</SelfLink><ParentLink>https://localhost/servers/partnersrv</ParentLink><Id>1</Id><Edition>System</Edition><MaxSizeGB>5</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-04-15T19:12:12.2930000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>True</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>5368709120</MaxSizeBytes><ServiceObjectiveId>26e021db-f1f9-4c98-84c6-92af8ef433d7</ServiceObjectiveId><AssignedServiceObjectiveId>26e021db-f1f9-4c98-84c6-92af8ef433d7</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-04-15T19:12:14.1130000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate i:nil="true"/><IsSuspended>False</IsSuspended></ServiceResource></ServiceResources> +
+
+ + 18 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/partnersrv/serviceobjectives/26e021db-f1f9-4c98-84c6-92af8ef433d7 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 5aacda44-1ecd-4780-9680-fde54498070b-2014-04-15 21:47:05Z +
+
+ x-ms-client-request-id + dae154da-9222-4a0b-b462-676c22335de0-2014-04-15 21:47:18Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + dae154da-9222-4a0b-b462-676c22335de0 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Tue, 15 Apr 2014 21:47:17 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>System</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/serviceobjectives/26e021db-f1f9-4c98-84c6-92af8ef433d7</SelfLink><ParentLink>https://localhost/servers/partnersrv</ParentLink><Id>26e021db-f1f9-4c98-84c6-92af8ef433d7</Id><IsDefault>False</IsDefault><IsSystem>True</IsSystem><Description>Used for master database only.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>System</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/partnersrv/dimensionsettings/5b1e7ca2-f1c8-4da8-bb42-7ebe94a92609</SelfLink><ParentLink>https://localhost/servers/partnersrv</ParentLink><Id>5b1e7ca2-f1c8-4da8-bb42-7ebe94a92609</Id><Description>Used for master database only.</Description><Ordinal>1</Ordinal><IsDefault>False</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+
+
+ + UnitTest.Common.CreateTestDatabasesWithCertAuth + + + 0 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + fea9ea40-d212-4f3b-b591-140da9b0b191-2014-04-18 03:05:34Z +
+
+ x-ms-client-request-id + 4a2cd1d5-2fae-475b-a546-708b34aaba9c-2014-04-18 03:05:34Z +
+
+ + + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <Name>testdb1</Name> + <CollationName></CollationName> + </ServiceResource> + + application/xml + +
+ + Created + +
+ x-ms-request-id + 4a2cd1d5-2fae-475b-a546-708b34aaba9c +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 03:05:41 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdb1</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdb1</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>4</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-04-18T03:05:35.5900000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-04-18T03:05:39.1670000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-04-18T03:06:35.2530000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 1 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + fea9ea40-d212-4f3b-b591-140da9b0b191-2014-04-18 03:05:34Z +
+
+ x-ms-client-request-id + 2ce60c57-304f-4cf2-a4a9-d551bf0c36cb-2014-04-18 03:05:41Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 2ce60c57-304f-4cf2-a4a9-d551bf0c36cb +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 03:05:41 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 2 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + fea9ea40-d212-4f3b-b591-140da9b0b191-2014-04-18 03:05:34Z +
+
+ x-ms-client-request-id + 5f6a696c-00c8-4c01-be82-8b56fe84d966-2014-04-18 03:05:41Z +
+
+ + + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <Name>testdb2</Name> + <Edition>Web</Edition> + <MaxSizeGB>5</MaxSizeGB> + <CollationName>Japanese_CI_AS</CollationName> + </ServiceResource> + + application/xml + +
+ + Created + +
+ x-ms-request-id + 5f6a696c-00c8-4c01-be82-8b56fe84d966 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 03:05:53 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdb2</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdb2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>5</Id><Edition>Web</Edition><MaxSizeGB>5</MaxSizeGB><CollationName>Japanese_CI_AS</CollationName><CreationDate>2014-04-18T03:05:42.4630000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>5368709120</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-04-18T03:05:48.2970000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-04-18T03:06:41.9700000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 3 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + fea9ea40-d212-4f3b-b591-140da9b0b191-2014-04-18 03:05:34Z +
+
+ x-ms-client-request-id + 77360a33-d39a-44fb-8214-62458ea278f2-2014-04-18 03:05:53Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 77360a33-d39a-44fb-8214-62458ea278f2 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 03:05:53 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 4 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + fea9ea40-d212-4f3b-b591-140da9b0b191-2014-04-18 03:05:34Z +
+
+ x-ms-client-request-id + 1365ffdb-df62-4a2d-9de9-6a345220528d-2014-04-18 03:05:53Z +
+
+ + + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <Name>testdb3</Name> + <CollationName></CollationName> + <MaxSizeBytes>104857600</MaxSizeBytes> + </ServiceResource> + + application/xml + +
+ + Created + +
+ x-ms-request-id + 1365ffdb-df62-4a2d-9de9-6a345220528d +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 03:06:18 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdb3</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdb3</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>6</Id><Edition>Web</Edition><MaxSizeGB>0</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-04-18T03:06:09.1300000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>104857600</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-04-18T03:06:12.5730000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-04-18T03:07:08.4230000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 5 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + fea9ea40-d212-4f3b-b591-140da9b0b191-2014-04-18 03:05:34Z +
+
+ x-ms-client-request-id + e91331da-06e3-4fa2-a28d-960372d9a1ea-2014-04-18 03:06:18Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + e91331da-06e3-4fa2-a28d-960372d9a1ea +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 03:06:18 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+
+
+ + UnitTest.Common.RemoveTestDatabasesWithCertAuth + + + 0 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdb1 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + fea9ea40-d212-4f3b-b591-140da9b0b191-2014-04-18 03:05:34Z +
+
+ x-ms-client-request-id + 0eb64618-ee60-4798-a53b-a4535f66202d-2014-04-18 03:08:15Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 0eb64618-ee60-4798-a53b-a4535f66202d +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Fri, 18 Apr 2014 03:08:27 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 1 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdb2 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + fea9ea40-d212-4f3b-b591-140da9b0b191-2014-04-18 03:05:34Z +
+
+ x-ms-client-request-id + f8074f88-a855-4150-9b8c-a9657d8c8c65-2014-04-18 03:08:27Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + f8074f88-a855-4150-9b8c-a9657d8c8c65 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Fri, 18 Apr 2014 03:08:31 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+ + 2 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdb3 + DELETE + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + fea9ea40-d212-4f3b-b591-140da9b0b191-2014-04-18 03:05:34Z +
+
+ x-ms-client-request-id + aa7e1cf1-541a-4bcf-a400-166d74ee834a-2014-04-18 03:08:32Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + aa7e1cf1-541a-4bcf-a400-166d74ee834a +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Date + Fri, 18 Apr 2014 03:08:47 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + +
+
+
+
+ + UnitTests.GetRestorableDroppedDatabaseWithSqlAuth + + + 0 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/RestorableDroppedDatabases + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + CKcwXamokFo+YjrsoXIZMKoasSBvd52VWP4e/Rq6u2AStja9qBdfIKSNTb4nxNtBMcYCjTeZqtPgtTqaU5VI8awGf0wFynfCaBwGfsfKNF1/ITEaDKb6tyMuRBmm8H4VTdgRS69uP6tuqB+vQN0BfsbHSbzAgkvDo1gxQO0pzTBTLenOKakTEOcsAYTQZpaZwIhmGuxulzYOGC/0g5zOguSGEbUbn83NOcyE7b7jW/jowwbkzcfco8s9xKuXryWlzjOsQX+OaRJlyVwixwcuQBqTyObvEDRNdQPPMX2RIcN9RHgIatd2KpT8PyPc/aWFVTKTAD/KCzaK5WAdGXkeOgMaKRdC2CAb1stj6YQ/K6Wv/JL8RycVg5bKb/8BjhWIdFdkLqeM6KN8zoUl0VtMJudyC5pSimSrHW9y549xf8Lfrtg2rSRG9SYi0AIRRoTulsRwYlQ2W6rkqsGSBVJXMdkPg2DgdpvelFsI6brrYYG0CnP+I9+cFcQP8PuLj7VDcdD1mPUUB62trQauQuKGuXUKV/Kcfl9qvBqNY/EpreBvku1TWq6HMV6qFMJMzvi4Z/lkNEUhZUCDqBFZJIJoho4wOI8/gExZlTjo6T8dDOBQO4aiFL0yZBPZKzwFBiwCaEBiocU4A20nrEzSUVdAQC2ZeuPVFH443hlQhA65xn3JzyBzFOmWFauU1mhnAGq+SbMDFq6lctdSNN0whna3inyax/lC3Y8emVHfam5fu86LIryI1qgklLY/beBBbmvn378SDqxbO4+5cruGHJFE+Q== +
+
+ x-ms-client-session-id + 31fa9eb8-98f0-4d43-8ff5-3cb40d184b7a-2014-04-18 02:32:58Z +
+
+ x-ms-client-request-id + b5d23218-9817-4f59-8f3c-2f253418586f-2014-04-18 02:36:03Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=HHuSumhH2VQGEonaWWhFag== +
+
+ + + .SQLSERVERMANAGEMENT + HHuSumhH2VQGEonaWWhFag== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 35021979-1329-31a5-b720-3bc69d65d68d +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 02:36:03 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/RestorableDroppedDatabases</id><title type="text">RestorableDroppedDatabases</title><updated>2014-04-18T02:36:03Z</updated><link rel="self" title="RestorableDroppedDatabases" href="RestorableDroppedDatabases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/RestorableDroppedDatabases('testdb1%2C2014-04-18T02%3A35%3A06.060Z')</id><category term="Microsoft.SqlServer.Management.Server.Domain.RestorableDroppedDatabase" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="RestorableDroppedDatabase" href="RestorableDroppedDatabases('testdb1%2C2014-04-18T02%3A35%3A06.060Z')" /><title /><updated>2014-04-18T02:36:03Z</updated><author><name /></author><content type="application/xml"><m:properties><d:EntityId>testdb1,2014-04-18T02:35:06.060Z</d:EntityId><d:Name>testdb1</d:Name><d:ServerName>myserver01</d:ServerName><d:Edition>Web</d:Edition><d:MaxSizeBytes m:type="Edm.Int64">1073741824</d:MaxSizeBytes><d:CreationDate m:type="Edm.DateTime">2014-04-18T02:33:02.01Z</d:CreationDate><d:DeletionDate m:type="Edm.DateTime">2014-04-18T02:35:06.06Z</d:DeletionDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-04-18T02:34:02.01Z</d:RecoveryPeriodStartDate></m:properties></content></entry><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/RestorableDroppedDatabases('testdb2%2C2014-04-18T02%3A35%3A12.343Z')</id><category term="Microsoft.SqlServer.Management.Server.Domain.RestorableDroppedDatabase" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="RestorableDroppedDatabase" href="RestorableDroppedDatabases('testdb2%2C2014-04-18T02%3A35%3A12.343Z')" /><title /><updated>2014-04-18T02:36:03Z</updated><author><name /></author><content type="application/xml"><m:properties><d:EntityId>testdb2,2014-04-18T02:35:12.343Z</d:EntityId><d:Name>testdb2</d:Name><d:ServerName>myserver01</d:ServerName><d:Edition>Web</d:Edition><d:MaxSizeBytes m:type="Edm.Int64">5368709120</d:MaxSizeBytes><d:CreationDate m:type="Edm.DateTime">2014-04-18T02:33:07.263Z</d:CreationDate><d:DeletionDate m:type="Edm.DateTime">2014-04-18T02:35:12.343Z</d:DeletionDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-04-18T02:34:07.263Z</d:RecoveryPeriodStartDate></m:properties></content></entry><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/RestorableDroppedDatabases('testdb3%2C2014-04-18T02%3A35%3A16.647Z')</id><category term="Microsoft.SqlServer.Management.Server.Domain.RestorableDroppedDatabase" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="RestorableDroppedDatabase" href="RestorableDroppedDatabases('testdb3%2C2014-04-18T02%3A35%3A16.647Z')" /><title /><updated>2014-04-18T02:36:03Z</updated><author><name /></author><content type="application/xml"><m:properties><d:EntityId>testdb3,2014-04-18T02:35:16.647Z</d:EntityId><d:Name>testdb3</d:Name><d:ServerName>myserver01</d:ServerName><d:Edition>Web</d:Edition><d:MaxSizeBytes m:type="Edm.Int64">104857600</d:MaxSizeBytes><d:CreationDate m:type="Edm.DateTime">2014-04-18T02:33:12.827Z</d:CreationDate><d:DeletionDate m:type="Edm.DateTime">2014-04-18T02:35:16.647Z</d:DeletionDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-04-18T02:34:12.827Z</d:RecoveryPeriodStartDate></m:properties></content></entry></feed> +
+
+ + 1 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/RestorableDroppedDatabases()?$filter=Name%20eq%20'testdb1'%20and%20DeletionDate%20eq%20datetime'2014-04-18T02%3A35%3A06.06Z'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + CKcwXamokFo+YjrsoXIZMKoasSBvd52VWP4e/Rq6u2AStja9qBdfIKSNTb4nxNtBMcYCjTeZqtPgtTqaU5VI8awGf0wFynfCaBwGfsfKNF1/ITEaDKb6tyMuRBmm8H4VTdgRS69uP6tuqB+vQN0BfsbHSbzAgkvDo1gxQO0pzTBTLenOKakTEOcsAYTQZpaZwIhmGuxulzYOGC/0g5zOguSGEbUbn83NOcyE7b7jW/jowwbkzcfco8s9xKuXryWlzjOsQX+OaRJlyVwixwcuQBqTyObvEDRNdQPPMX2RIcN9RHgIatd2KpT8PyPc/aWFVTKTAD/KCzaK5WAdGXkeOgMaKRdC2CAb1stj6YQ/K6Wv/JL8RycVg5bKb/8BjhWIdFdkLqeM6KN8zoUl0VtMJudyC5pSimSrHW9y549xf8Lfrtg2rSRG9SYi0AIRRoTulsRwYlQ2W6rkqsGSBVJXMdkPg2DgdpvelFsI6brrYYG0CnP+I9+cFcQP8PuLj7VDcdD1mPUUB62trQauQuKGuXUKV/Kcfl9qvBqNY/EpreBvku1TWq6HMV6qFMJMzvi4Z/lkNEUhZUCDqBFZJIJoho4wOI8/gExZlTjo6T8dDOBQO4aiFL0yZBPZKzwFBiwCaEBiocU4A20nrEzSUVdAQC2ZeuPVFH443hlQhA65xn3JzyBzFOmWFauU1mhnAGq+SbMDFq6lctdSNN0whna3inyax/lC3Y8emVHfam5fu86LIryI1qgklLY/beBBbmvn378SDqxbO4+5cruGHJFE+Q== +
+
+ x-ms-client-session-id + 31fa9eb8-98f0-4d43-8ff5-3cb40d184b7a-2014-04-18 02:32:58Z +
+
+ x-ms-client-request-id + b5d23218-9817-4f59-8f3c-2f253418586f-2014-04-18 02:36:03Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=HHuSumhH2VQGEonaWWhFag== +
+
+ + + .SQLSERVERMANAGEMENT + HHuSumhH2VQGEonaWWhFag== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 35021979-1329-31a5-b720-3bc69d65d68d +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 02:36:03 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/RestorableDroppedDatabases</id><title type="text">RestorableDroppedDatabases</title><updated>2014-04-18T02:36:03Z</updated><link rel="self" title="RestorableDroppedDatabases" href="RestorableDroppedDatabases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/RestorableDroppedDatabases('testdb1%2C2014-04-18T02%3A35%3A06.060Z')</id><category term="Microsoft.SqlServer.Management.Server.Domain.RestorableDroppedDatabase" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="RestorableDroppedDatabase" href="RestorableDroppedDatabases('testdb1%2C2014-04-18T02%3A35%3A06.060Z')" /><title /><updated>2014-04-18T02:36:03Z</updated><author><name /></author><content type="application/xml"><m:properties><d:EntityId>testdb1,2014-04-18T02:35:06.060Z</d:EntityId><d:Name>testdb1</d:Name><d:ServerName>myserver01</d:ServerName><d:Edition>Web</d:Edition><d:MaxSizeBytes m:type="Edm.Int64">1073741824</d:MaxSizeBytes><d:CreationDate m:type="Edm.DateTime">2014-04-18T02:33:02.01Z</d:CreationDate><d:DeletionDate m:type="Edm.DateTime">2014-04-18T02:35:06.06Z</d:DeletionDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-04-18T02:34:02.01Z</d:RecoveryPeriodStartDate></m:properties></content></entry></feed> +
+
+ + 2 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/RestorableDroppedDatabases()?$filter=Name%20eq%20'testdb2'%20and%20DeletionDate%20eq%20datetime'2014-04-18T02%3A35%3A12.343Z'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + CKcwXamokFo+YjrsoXIZMKoasSBvd52VWP4e/Rq6u2AStja9qBdfIKSNTb4nxNtBMcYCjTeZqtPgtTqaU5VI8awGf0wFynfCaBwGfsfKNF1/ITEaDKb6tyMuRBmm8H4VTdgRS69uP6tuqB+vQN0BfsbHSbzAgkvDo1gxQO0pzTBTLenOKakTEOcsAYTQZpaZwIhmGuxulzYOGC/0g5zOguSGEbUbn83NOcyE7b7jW/jowwbkzcfco8s9xKuXryWlzjOsQX+OaRJlyVwixwcuQBqTyObvEDRNdQPPMX2RIcN9RHgIatd2KpT8PyPc/aWFVTKTAD/KCzaK5WAdGXkeOgMaKRdC2CAb1stj6YQ/K6Wv/JL8RycVg5bKb/8BjhWIdFdkLqeM6KN8zoUl0VtMJudyC5pSimSrHW9y549xf8Lfrtg2rSRG9SYi0AIRRoTulsRwYlQ2W6rkqsGSBVJXMdkPg2DgdpvelFsI6brrYYG0CnP+I9+cFcQP8PuLj7VDcdD1mPUUB62trQauQuKGuXUKV/Kcfl9qvBqNY/EpreBvku1TWq6HMV6qFMJMzvi4Z/lkNEUhZUCDqBFZJIJoho4wOI8/gExZlTjo6T8dDOBQO4aiFL0yZBPZKzwFBiwCaEBiocU4A20nrEzSUVdAQC2ZeuPVFH443hlQhA65xn3JzyBzFOmWFauU1mhnAGq+SbMDFq6lctdSNN0whna3inyax/lC3Y8emVHfam5fu86LIryI1qgklLY/beBBbmvn378SDqxbO4+5cruGHJFE+Q== +
+
+ x-ms-client-session-id + 31fa9eb8-98f0-4d43-8ff5-3cb40d184b7a-2014-04-18 02:32:58Z +
+
+ x-ms-client-request-id + b5d23218-9817-4f59-8f3c-2f253418586f-2014-04-18 02:36:03Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=HHuSumhH2VQGEonaWWhFag== +
+
+ + + .SQLSERVERMANAGEMENT + HHuSumhH2VQGEonaWWhFag== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 35021979-1329-31a5-b720-3bc69d65d68d +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 02:36:03 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/RestorableDroppedDatabases</id><title type="text">RestorableDroppedDatabases</title><updated>2014-04-18T02:36:03Z</updated><link rel="self" title="RestorableDroppedDatabases" href="RestorableDroppedDatabases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/RestorableDroppedDatabases('testdb2%2C2014-04-18T02%3A35%3A12.343Z')</id><category term="Microsoft.SqlServer.Management.Server.Domain.RestorableDroppedDatabase" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="RestorableDroppedDatabase" href="RestorableDroppedDatabases('testdb2%2C2014-04-18T02%3A35%3A12.343Z')" /><title /><updated>2014-04-18T02:36:03Z</updated><author><name /></author><content type="application/xml"><m:properties><d:EntityId>testdb2,2014-04-18T02:35:12.343Z</d:EntityId><d:Name>testdb2</d:Name><d:ServerName>myserver01</d:ServerName><d:Edition>Web</d:Edition><d:MaxSizeBytes m:type="Edm.Int64">5368709120</d:MaxSizeBytes><d:CreationDate m:type="Edm.DateTime">2014-04-18T02:33:07.263Z</d:CreationDate><d:DeletionDate m:type="Edm.DateTime">2014-04-18T02:35:12.343Z</d:DeletionDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-04-18T02:34:07.263Z</d:RecoveryPeriodStartDate></m:properties></content></entry></feed> +
+
+
+
+ + UnitTests.GetRestorableDroppedDatabaseWithSqlAuthByPipe + + + 0 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/RestorableDroppedDatabases + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + LfRU4ScpbApU2twg551+0h3xwCAj4SLuxRRMW7qJlqLzx/Niu+nM0gjoFz6lVBrjMeJJualDZrttFJHaNzS3iPl0xkf8sAgKCh0Rd4Q7ezMgIZWPM96IGKhL4uJO9h1ajJzPZzTrA7Dnwh6ddrhsDADN7HOAwF9xRm6hgyY8N8TimukEWlRRDVWnOEOsdQHn1tLkvLqs0GLggzVQcm6h8Wm4c2R+nuazAuCv1X3KoZqHGCoiVU4v2kh20tyoZyM+Aq2h3agbsaUc7v/0jeeFxDQqWSuSXUjtqDwra7Vg66ru+avMO3l4JDBaCBDTyf76zvKzUEbYRkrddaxOFd2sXjj9ADSNQ9H8sMm96d0zEP2LfPXoCikzfzID2kPhGbypZdak5+whcLHOHXM8nbElNsmWmeNXgX2S7UlFV71U5CtHWfzyD2x1Si2pwYioEqhrjMp63ussosClWmHFgfTxeYpVwVgguHRoMLKxJug8jcHxJBKSvGq0GwtuQYwJsjX8RUc8Zt38BYRPOfngAMM8M+wOcWwqsnpc71hRkLgsiga+xWHYcE9WJVBQKtBvMDlcjWl/ydCqfG8tf2C6nmgFAypETiN5ecbo34JeSwf0bxNWpYixK094tnR/I9oij4D2r/SVblWsjq/0YeSwee0EAR3A6H3VZmQee2K06kUyu12qllZ9e6DIE5+jq46UTjsM+Vpqlvyrqo0m4FRkTHHJqyItMGURu7X8E9R7ran3pCsx2eVGrKDo++yWEhoPm4UGJDbmTYNc6A5J5rjZlnxhjw== +
+
+ x-ms-client-session-id + 31fa9eb8-98f0-4d43-8ff5-3cb40d184b7a-2014-04-18 02:32:58Z +
+
+ x-ms-client-request-id + dd36e27e-31b5-4e39-9121-f5887749e545-2014-04-18 02:35:19Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=AkVFooTMHYZtfGXAPl0nQg== +
+
+ + + .SQLSERVERMANAGEMENT + AkVFooTMHYZtfGXAPl0nQg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + bcba3265-63d3-7185-1bca-67d2b82f69f3 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 02:35:20 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/RestorableDroppedDatabases</id><title type="text">RestorableDroppedDatabases</title><updated>2014-04-18T02:35:20Z</updated><link rel="self" title="RestorableDroppedDatabases" href="RestorableDroppedDatabases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/RestorableDroppedDatabases('testdb1%2C2014-04-18T02%3A35%3A06.060Z')</id><category term="Microsoft.SqlServer.Management.Server.Domain.RestorableDroppedDatabase" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="RestorableDroppedDatabase" href="RestorableDroppedDatabases('testdb1%2C2014-04-18T02%3A35%3A06.060Z')" /><title /><updated>2014-04-18T02:35:20Z</updated><author><name /></author><content type="application/xml"><m:properties><d:EntityId>testdb1,2014-04-18T02:35:06.060Z</d:EntityId><d:Name>testdb1</d:Name><d:ServerName>myserver01</d:ServerName><d:Edition>Web</d:Edition><d:MaxSizeBytes m:type="Edm.Int64">1073741824</d:MaxSizeBytes><d:CreationDate m:type="Edm.DateTime">2014-04-18T02:33:02.01Z</d:CreationDate><d:DeletionDate m:type="Edm.DateTime">2014-04-18T02:35:06.06Z</d:DeletionDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-04-18T02:34:02.01Z</d:RecoveryPeriodStartDate></m:properties></content></entry><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/RestorableDroppedDatabases('testdb2%2C2014-04-18T02%3A35%3A12.343Z')</id><category term="Microsoft.SqlServer.Management.Server.Domain.RestorableDroppedDatabase" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="RestorableDroppedDatabase" href="RestorableDroppedDatabases('testdb2%2C2014-04-18T02%3A35%3A12.343Z')" /><title /><updated>2014-04-18T02:35:20Z</updated><author><name /></author><content type="application/xml"><m:properties><d:EntityId>testdb2,2014-04-18T02:35:12.343Z</d:EntityId><d:Name>testdb2</d:Name><d:ServerName>myserver01</d:ServerName><d:Edition>Web</d:Edition><d:MaxSizeBytes m:type="Edm.Int64">5368709120</d:MaxSizeBytes><d:CreationDate m:type="Edm.DateTime">2014-04-18T02:33:07.263Z</d:CreationDate><d:DeletionDate m:type="Edm.DateTime">2014-04-18T02:35:12.343Z</d:DeletionDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-04-18T02:34:07.263Z</d:RecoveryPeriodStartDate></m:properties></content></entry><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/RestorableDroppedDatabases('testdb3%2C2014-04-18T02%3A35%3A16.647Z')</id><category term="Microsoft.SqlServer.Management.Server.Domain.RestorableDroppedDatabase" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="RestorableDroppedDatabase" href="RestorableDroppedDatabases('testdb3%2C2014-04-18T02%3A35%3A16.647Z')" /><title /><updated>2014-04-18T02:35:20Z</updated><author><name /></author><content type="application/xml"><m:properties><d:EntityId>testdb3,2014-04-18T02:35:16.647Z</d:EntityId><d:Name>testdb3</d:Name><d:ServerName>myserver01</d:ServerName><d:Edition>Web</d:Edition><d:MaxSizeBytes m:type="Edm.Int64">104857600</d:MaxSizeBytes><d:CreationDate m:type="Edm.DateTime">2014-04-18T02:33:12.827Z</d:CreationDate><d:DeletionDate m:type="Edm.DateTime">2014-04-18T02:35:16.647Z</d:DeletionDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-04-18T02:34:12.827Z</d:RecoveryPeriodStartDate></m:properties></content></entry></feed> +
+
+ + 1 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/RestorableDroppedDatabases()?$filter=Name%20eq%20'testdb1'%20and%20DeletionDate%20eq%20datetime'2014-04-18T02%3A35%3A06.06Z'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + LfRU4ScpbApU2twg551+0h3xwCAj4SLuxRRMW7qJlqLzx/Niu+nM0gjoFz6lVBrjMeJJualDZrttFJHaNzS3iPl0xkf8sAgKCh0Rd4Q7ezMgIZWPM96IGKhL4uJO9h1ajJzPZzTrA7Dnwh6ddrhsDADN7HOAwF9xRm6hgyY8N8TimukEWlRRDVWnOEOsdQHn1tLkvLqs0GLggzVQcm6h8Wm4c2R+nuazAuCv1X3KoZqHGCoiVU4v2kh20tyoZyM+Aq2h3agbsaUc7v/0jeeFxDQqWSuSXUjtqDwra7Vg66ru+avMO3l4JDBaCBDTyf76zvKzUEbYRkrddaxOFd2sXjj9ADSNQ9H8sMm96d0zEP2LfPXoCikzfzID2kPhGbypZdak5+whcLHOHXM8nbElNsmWmeNXgX2S7UlFV71U5CtHWfzyD2x1Si2pwYioEqhrjMp63ussosClWmHFgfTxeYpVwVgguHRoMLKxJug8jcHxJBKSvGq0GwtuQYwJsjX8RUc8Zt38BYRPOfngAMM8M+wOcWwqsnpc71hRkLgsiga+xWHYcE9WJVBQKtBvMDlcjWl/ydCqfG8tf2C6nmgFAypETiN5ecbo34JeSwf0bxNWpYixK094tnR/I9oij4D2r/SVblWsjq/0YeSwee0EAR3A6H3VZmQee2K06kUyu12qllZ9e6DIE5+jq46UTjsM+Vpqlvyrqo0m4FRkTHHJqyItMGURu7X8E9R7ran3pCsx2eVGrKDo++yWEhoPm4UGJDbmTYNc6A5J5rjZlnxhjw== +
+
+ x-ms-client-session-id + 31fa9eb8-98f0-4d43-8ff5-3cb40d184b7a-2014-04-18 02:32:58Z +
+
+ x-ms-client-request-id + dd36e27e-31b5-4e39-9121-f5887749e545-2014-04-18 02:35:19Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=AkVFooTMHYZtfGXAPl0nQg== +
+
+ + + .SQLSERVERMANAGEMENT + AkVFooTMHYZtfGXAPl0nQg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + bcba3265-63d3-7185-1bca-67d2b82f69f3 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 02:35:20 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/RestorableDroppedDatabases</id><title type="text">RestorableDroppedDatabases</title><updated>2014-04-18T02:35:20Z</updated><link rel="self" title="RestorableDroppedDatabases" href="RestorableDroppedDatabases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/RestorableDroppedDatabases('testdb1%2C2014-04-18T02%3A35%3A06.060Z')</id><category term="Microsoft.SqlServer.Management.Server.Domain.RestorableDroppedDatabase" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="RestorableDroppedDatabase" href="RestorableDroppedDatabases('testdb1%2C2014-04-18T02%3A35%3A06.060Z')" /><title /><updated>2014-04-18T02:35:20Z</updated><author><name /></author><content type="application/xml"><m:properties><d:EntityId>testdb1,2014-04-18T02:35:06.060Z</d:EntityId><d:Name>testdb1</d:Name><d:ServerName>myserver01</d:ServerName><d:Edition>Web</d:Edition><d:MaxSizeBytes m:type="Edm.Int64">1073741824</d:MaxSizeBytes><d:CreationDate m:type="Edm.DateTime">2014-04-18T02:33:02.01Z</d:CreationDate><d:DeletionDate m:type="Edm.DateTime">2014-04-18T02:35:06.06Z</d:DeletionDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-04-18T02:34:02.01Z</d:RecoveryPeriodStartDate></m:properties></content></entry></feed> +
+
+ + 2 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/RestorableDroppedDatabases()?$filter=Name%20eq%20'testdb2'%20and%20DeletionDate%20eq%20datetime'2014-04-18T02%3A35%3A12.343Z'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + LfRU4ScpbApU2twg551+0h3xwCAj4SLuxRRMW7qJlqLzx/Niu+nM0gjoFz6lVBrjMeJJualDZrttFJHaNzS3iPl0xkf8sAgKCh0Rd4Q7ezMgIZWPM96IGKhL4uJO9h1ajJzPZzTrA7Dnwh6ddrhsDADN7HOAwF9xRm6hgyY8N8TimukEWlRRDVWnOEOsdQHn1tLkvLqs0GLggzVQcm6h8Wm4c2R+nuazAuCv1X3KoZqHGCoiVU4v2kh20tyoZyM+Aq2h3agbsaUc7v/0jeeFxDQqWSuSXUjtqDwra7Vg66ru+avMO3l4JDBaCBDTyf76zvKzUEbYRkrddaxOFd2sXjj9ADSNQ9H8sMm96d0zEP2LfPXoCikzfzID2kPhGbypZdak5+whcLHOHXM8nbElNsmWmeNXgX2S7UlFV71U5CtHWfzyD2x1Si2pwYioEqhrjMp63ussosClWmHFgfTxeYpVwVgguHRoMLKxJug8jcHxJBKSvGq0GwtuQYwJsjX8RUc8Zt38BYRPOfngAMM8M+wOcWwqsnpc71hRkLgsiga+xWHYcE9WJVBQKtBvMDlcjWl/ydCqfG8tf2C6nmgFAypETiN5ecbo34JeSwf0bxNWpYixK094tnR/I9oij4D2r/SVblWsjq/0YeSwee0EAR3A6H3VZmQee2K06kUyu12qllZ9e6DIE5+jq46UTjsM+Vpqlvyrqo0m4FRkTHHJqyItMGURu7X8E9R7ran3pCsx2eVGrKDo++yWEhoPm4UGJDbmTYNc6A5J5rjZlnxhjw== +
+
+ x-ms-client-session-id + 31fa9eb8-98f0-4d43-8ff5-3cb40d184b7a-2014-04-18 02:32:58Z +
+
+ x-ms-client-request-id + dd36e27e-31b5-4e39-9121-f5887749e545-2014-04-18 02:35:19Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=AkVFooTMHYZtfGXAPl0nQg== +
+
+ + + .SQLSERVERMANAGEMENT + AkVFooTMHYZtfGXAPl0nQg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + bcba3265-63d3-7185-1bca-67d2b82f69f3 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 02:35:20 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/RestorableDroppedDatabases</id><title type="text">RestorableDroppedDatabases</title><updated>2014-04-18T02:35:20Z</updated><link rel="self" title="RestorableDroppedDatabases" href="RestorableDroppedDatabases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/RestorableDroppedDatabases('testdb2%2C2014-04-18T02%3A35%3A12.343Z')</id><category term="Microsoft.SqlServer.Management.Server.Domain.RestorableDroppedDatabase" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="RestorableDroppedDatabase" href="RestorableDroppedDatabases('testdb2%2C2014-04-18T02%3A35%3A12.343Z')" /><title /><updated>2014-04-18T02:35:20Z</updated><author><name /></author><content type="application/xml"><m:properties><d:EntityId>testdb2,2014-04-18T02:35:12.343Z</d:EntityId><d:Name>testdb2</d:Name><d:ServerName>myserver01</d:ServerName><d:Edition>Web</d:Edition><d:MaxSizeBytes m:type="Edm.Int64">5368709120</d:MaxSizeBytes><d:CreationDate m:type="Edm.DateTime">2014-04-18T02:33:07.263Z</d:CreationDate><d:DeletionDate m:type="Edm.DateTime">2014-04-18T02:35:12.343Z</d:DeletionDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-04-18T02:34:07.263Z</d:RecoveryPeriodStartDate></m:properties></content></entry></feed> +
+
+ + 3 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/RestorableDroppedDatabases()?$filter=Name%20eq%20'testdb1'%20and%20DeletionDate%20eq%20datetime'2014-04-18T02%3A35%3A06.06Z'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + LfRU4ScpbApU2twg551+0h3xwCAj4SLuxRRMW7qJlqLzx/Niu+nM0gjoFz6lVBrjMeJJualDZrttFJHaNzS3iPl0xkf8sAgKCh0Rd4Q7ezMgIZWPM96IGKhL4uJO9h1ajJzPZzTrA7Dnwh6ddrhsDADN7HOAwF9xRm6hgyY8N8TimukEWlRRDVWnOEOsdQHn1tLkvLqs0GLggzVQcm6h8Wm4c2R+nuazAuCv1X3KoZqHGCoiVU4v2kh20tyoZyM+Aq2h3agbsaUc7v/0jeeFxDQqWSuSXUjtqDwra7Vg66ru+avMO3l4JDBaCBDTyf76zvKzUEbYRkrddaxOFd2sXjj9ADSNQ9H8sMm96d0zEP2LfPXoCikzfzID2kPhGbypZdak5+whcLHOHXM8nbElNsmWmeNXgX2S7UlFV71U5CtHWfzyD2x1Si2pwYioEqhrjMp63ussosClWmHFgfTxeYpVwVgguHRoMLKxJug8jcHxJBKSvGq0GwtuQYwJsjX8RUc8Zt38BYRPOfngAMM8M+wOcWwqsnpc71hRkLgsiga+xWHYcE9WJVBQKtBvMDlcjWl/ydCqfG8tf2C6nmgFAypETiN5ecbo34JeSwf0bxNWpYixK094tnR/I9oij4D2r/SVblWsjq/0YeSwee0EAR3A6H3VZmQee2K06kUyu12qllZ9e6DIE5+jq46UTjsM+Vpqlvyrqo0m4FRkTHHJqyItMGURu7X8E9R7ran3pCsx2eVGrKDo++yWEhoPm4UGJDbmTYNc6A5J5rjZlnxhjw== +
+
+ x-ms-client-session-id + 31fa9eb8-98f0-4d43-8ff5-3cb40d184b7a-2014-04-18 02:32:58Z +
+
+ x-ms-client-request-id + dd36e27e-31b5-4e39-9121-f5887749e545-2014-04-18 02:35:19Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=AkVFooTMHYZtfGXAPl0nQg== +
+
+ + + .SQLSERVERMANAGEMENT + AkVFooTMHYZtfGXAPl0nQg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + bcba3265-63d3-7185-1bca-67d2b82f69f3 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 02:35:20 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/RestorableDroppedDatabases</id><title type="text">RestorableDroppedDatabases</title><updated>2014-04-18T02:35:21Z</updated><link rel="self" title="RestorableDroppedDatabases" href="RestorableDroppedDatabases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/RestorableDroppedDatabases('testdb1%2C2014-04-18T02%3A35%3A06.060Z')</id><category term="Microsoft.SqlServer.Management.Server.Domain.RestorableDroppedDatabase" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="RestorableDroppedDatabase" href="RestorableDroppedDatabases('testdb1%2C2014-04-18T02%3A35%3A06.060Z')" /><title /><updated>2014-04-18T02:35:21Z</updated><author><name /></author><content type="application/xml"><m:properties><d:EntityId>testdb1,2014-04-18T02:35:06.060Z</d:EntityId><d:Name>testdb1</d:Name><d:ServerName>myserver01</d:ServerName><d:Edition>Web</d:Edition><d:MaxSizeBytes m:type="Edm.Int64">1073741824</d:MaxSizeBytes><d:CreationDate m:type="Edm.DateTime">2014-04-18T02:33:02.01Z</d:CreationDate><d:DeletionDate m:type="Edm.DateTime">2014-04-18T02:35:06.06Z</d:DeletionDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-04-18T02:34:02.01Z</d:RecoveryPeriodStartDate></m:properties></content></entry></feed> +
+
+ + 4 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/RestorableDroppedDatabases()?$filter=Name%20eq%20'testdb2'%20and%20DeletionDate%20eq%20datetime'2014-04-18T02%3A35%3A12.343Z'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + LfRU4ScpbApU2twg551+0h3xwCAj4SLuxRRMW7qJlqLzx/Niu+nM0gjoFz6lVBrjMeJJualDZrttFJHaNzS3iPl0xkf8sAgKCh0Rd4Q7ezMgIZWPM96IGKhL4uJO9h1ajJzPZzTrA7Dnwh6ddrhsDADN7HOAwF9xRm6hgyY8N8TimukEWlRRDVWnOEOsdQHn1tLkvLqs0GLggzVQcm6h8Wm4c2R+nuazAuCv1X3KoZqHGCoiVU4v2kh20tyoZyM+Aq2h3agbsaUc7v/0jeeFxDQqWSuSXUjtqDwra7Vg66ru+avMO3l4JDBaCBDTyf76zvKzUEbYRkrddaxOFd2sXjj9ADSNQ9H8sMm96d0zEP2LfPXoCikzfzID2kPhGbypZdak5+whcLHOHXM8nbElNsmWmeNXgX2S7UlFV71U5CtHWfzyD2x1Si2pwYioEqhrjMp63ussosClWmHFgfTxeYpVwVgguHRoMLKxJug8jcHxJBKSvGq0GwtuQYwJsjX8RUc8Zt38BYRPOfngAMM8M+wOcWwqsnpc71hRkLgsiga+xWHYcE9WJVBQKtBvMDlcjWl/ydCqfG8tf2C6nmgFAypETiN5ecbo34JeSwf0bxNWpYixK094tnR/I9oij4D2r/SVblWsjq/0YeSwee0EAR3A6H3VZmQee2K06kUyu12qllZ9e6DIE5+jq46UTjsM+Vpqlvyrqo0m4FRkTHHJqyItMGURu7X8E9R7ran3pCsx2eVGrKDo++yWEhoPm4UGJDbmTYNc6A5J5rjZlnxhjw== +
+
+ x-ms-client-session-id + 31fa9eb8-98f0-4d43-8ff5-3cb40d184b7a-2014-04-18 02:32:58Z +
+
+ x-ms-client-request-id + dd36e27e-31b5-4e39-9121-f5887749e545-2014-04-18 02:35:19Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=AkVFooTMHYZtfGXAPl0nQg== +
+
+ + + .SQLSERVERMANAGEMENT + AkVFooTMHYZtfGXAPl0nQg== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + bcba3265-63d3-7185-1bca-67d2b82f69f3 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 02:35:21 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/RestorableDroppedDatabases</id><title type="text">RestorableDroppedDatabases</title><updated>2014-04-18T02:35:21Z</updated><link rel="self" title="RestorableDroppedDatabases" href="RestorableDroppedDatabases" /><entry><id>http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/RestorableDroppedDatabases('testdb2%2C2014-04-18T02%3A35%3A12.343Z')</id><category term="Microsoft.SqlServer.Management.Server.Domain.RestorableDroppedDatabase" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="RestorableDroppedDatabase" href="RestorableDroppedDatabases('testdb2%2C2014-04-18T02%3A35%3A12.343Z')" /><title /><updated>2014-04-18T02:35:21Z</updated><author><name /></author><content type="application/xml"><m:properties><d:EntityId>testdb2,2014-04-18T02:35:12.343Z</d:EntityId><d:Name>testdb2</d:Name><d:ServerName>myserver01</d:ServerName><d:Edition>Web</d:Edition><d:MaxSizeBytes m:type="Edm.Int64">5368709120</d:MaxSizeBytes><d:CreationDate m:type="Edm.DateTime">2014-04-18T02:33:07.263Z</d:CreationDate><d:DeletionDate m:type="Edm.DateTime">2014-04-18T02:35:12.343Z</d:DeletionDate><d:RecoveryPeriodStartDate m:type="Edm.DateTime">2014-04-18T02:34:07.263Z</d:RecoveryPeriodStartDate></m:properties></content></entry></feed> +
+
+
+
+ + UnitTests.GetRestorableDroppedDatabaseWithSqlAuthNonExistentDb + + + 0 + + http://localhost:12345/v1/ManagementService.svc/Server2('myserver01')/RestorableDroppedDatabases()?$filter=Name%20eq%20'testdbnonexistent'%20and%20DeletionDate%20eq%20datetime'2013-10-01T00%3A00%3A00Z'&$top=2 + GET + AzurePowershell/v0.8.11 + +
+ DataServiceVersion + 1.0;NetFx +
+
+ MaxDataServiceVersion + 2.0;NetFx +
+
+ AccessToken + KMG+BTW0owMVH44sOxrYh3ebaRrbvfwYWqGpNJkWFitKERfdLf+2uKecjGRUmT2O1rSR0Evnxwl3czsWLlggA7wVMzadszaT0mFx/lvSqrI3960SU7HtGhVNSV8wa7y055OqTkH9Nh7NtFzKfdg/shr5Gg03FKHncH9cZtPi0yVk/RiWpQZL5rEfjKIM/MA4hPKXtZGh1nwoC1LCMWLESZ4aIYKMhhK55mp8D2zcMtD26qMaSlUB99J7onPWLinF2VavOs4Zgb/XR12MOMM2LORGExr0oHoD3pG45qdmmsr4Fg0k2Qe1TyNv+Ot8k9G+VhyAV5OgOpxvUpaV1Arb6iXjKL/LCB0IkRpfMsU8F6mrzvIOmOVYgJelhEPPs0BpHG0SIWaXy3m7fifredpUZMuWiqljibgE759DP/xL7a1YObbaOVR3oBGW/45pBlXfI+F6FqL8PTFvgBQ1XPBSCrD2G4P1d8DvIDfqzSkt4YBxklKW7EP7Bo8wrVhm7OmDAMipTzGMHTWdrHwVSXUEe3K99L/RR7XAlRaRpPJFTDFwNXh6/T3JWd45mFul1pjAgaVfY+RSCAs+J7CwMB9WdrDK1zSwjhGbLv/VmWavc8qDJMiT7xGi0g4OhKMAnqUMA8f0MrgegYsaJ5TOWTWW3tyd3APegeNykf77E0osof2tDAwP2fbcd315mnMHZOLolLb5v28vfPl8smzTAOHJEqmF3pDmYj3ap7QHy2IZIO9eLXEGJwQ2NjZTI18ObNoDU4SGPT4yEhfUNGAZJm+q/g== +
+
+ x-ms-client-session-id + 31fa9eb8-98f0-4d43-8ff5-3cb40d184b7a-2014-04-18 02:32:58Z +
+
+ x-ms-client-request-id + d0441397-7130-446b-afc5-372d751d8de2-2014-04-18 02:35:49Z +
+
+ Accept-Charset + UTF-8 +
+
+ Cookie + .SQLSERVERMANAGEMENT=Zif+R4B5ZtOa+EX2Qop/RA== +
+
+ + + .SQLSERVERMANAGEMENT + Zif+R4B5ZtOa+EX2Qop/RA== + + + + + + application/atom+xml,application/xml +
+ + OK + +
+ x-ms-request-id + 57402f43-5f4b-5f91-f832-1756d28f2950 +
+
+ X-Content-Type-Options + nosniff +
+
+ DataServiceVersion + 2.0; +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/atom+xml;type=feed;charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 02:35:48 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 +
+
+ + <?xml version="1.0" encoding="utf-8"?><feed xml:base="https://myserver01.dev.mscds.com/v1/ManagementService.svc/Server2('myserver01')/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><id>https://myserver01.dev.mscds.com/v1/ManagementService.svc/Server2('myserver01')/RestorableDroppedDatabases</id><title type="text">RestorableDroppedDatabases</title><updated>2014-04-18T02:35:49Z</updated><link rel="self" title="RestorableDroppedDatabases" href="RestorableDroppedDatabases" /><author><name /></author></feed> +
+
+
+
+ + UnitTest.GetRestorableDroppedDatabaseWithCertAuth + + + 0 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/restorabledroppeddatabases?contentview=generic + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + fea9ea40-d212-4f3b-b591-140da9b0b191-2014-04-18 03:05:34Z +
+
+ x-ms-client-request-id + 19b72a62-06be-43d2-a575-ad126be83d39-2014-04-18 03:08:57Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 19b72a62-06be-43d2-a575-ad126be83d39 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 03:08:59 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>testdb1</Name><Type>Microsoft.SqlAzure.RestorableDroppedDatabase</Type><State>Deleted</State><SelfLink>https://localhost/servers/myserver01/restorabledroppeddatabases/testdb1,2014-04-18T03:08:25.083Z</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><EntityId>testdb1,2014-04-18T03:08:25.083Z</EntityId><ServerName>myserver01</ServerName><Edition>Web</Edition><MaxSizeBytes>1073741824</MaxSizeBytes><CreationDate>2014-04-18T03:05:35.2530000Z</CreationDate><DeletionDate>2014-04-18T03:08:25.0830000Z</DeletionDate><RecoveryPeriodStartDate>2014-04-18T03:06:35.2530000Z</RecoveryPeriodStartDate></ServiceResource><ServiceResource><Name>testdb2</Name><Type>Microsoft.SqlAzure.RestorableDroppedDatabase</Type><State>Deleted</State><SelfLink>https://localhost/servers/myserver01/restorabledroppeddatabases/testdb2,2014-04-18T03:08:28.877Z</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><EntityId>testdb2,2014-04-18T03:08:28.877Z</EntityId><ServerName>myserver01</ServerName><Edition>Web</Edition><MaxSizeBytes>5368709120</MaxSizeBytes><CreationDate>2014-04-18T03:05:41.9700000Z</CreationDate><DeletionDate>2014-04-18T03:08:28.8770000Z</DeletionDate><RecoveryPeriodStartDate>2014-04-18T03:06:41.9700000Z</RecoveryPeriodStartDate></ServiceResource><ServiceResource><Name>testdb3</Name><Type>Microsoft.SqlAzure.RestorableDroppedDatabase</Type><State>Deleted</State><SelfLink>https://localhost/servers/myserver01/restorabledroppeddatabases/testdb3,2014-04-18T03:08:34.453Z</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><EntityId>testdb3,2014-04-18T03:08:34.453Z</EntityId><ServerName>myserver01</ServerName><Edition>Web</Edition><MaxSizeBytes>104857600</MaxSizeBytes><CreationDate>2014-04-18T03:06:08.4230000Z</CreationDate><DeletionDate>2014-04-18T03:08:34.4530000Z</DeletionDate><RecoveryPeriodStartDate>2014-04-18T03:07:08.4230000Z</RecoveryPeriodStartDate></ServiceResource></ServiceResources> +
+
+ + 1 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/restorabledroppeddatabases/testdb1,2014-04-18T03:08:25.083Z + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + fea9ea40-d212-4f3b-b591-140da9b0b191-2014-04-18 03:05:34Z +
+
+ x-ms-client-request-id + a8c11a2d-a8a0-477b-ba29-fcfd75133ab7-2014-04-18 03:08:59Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + a8c11a2d-a8a0-477b-ba29-fcfd75133ab7 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 03:08:59 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdb1</Name><Type>Microsoft.SqlAzure.RestorableDroppedDatabase</Type><State>Deleted</State><SelfLink>https://localhost/servers/myserver01/restorabledroppeddatabases/testdb1,2014-04-18T03:08:25.083Z</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><EntityId>testdb1,2014-04-18T03:08:25.083Z</EntityId><ServerName>myserver01</ServerName><Edition>Web</Edition><MaxSizeBytes>1073741824</MaxSizeBytes><CreationDate>2014-04-18T03:05:35.2530000Z</CreationDate><DeletionDate>2014-04-18T03:08:25.0830000Z</DeletionDate><RecoveryPeriodStartDate>2014-04-18T03:06:35.2530000Z</RecoveryPeriodStartDate></ServiceResource> +
+
+ + 2 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/restorabledroppeddatabases/testdb2,2014-04-18T03:08:28.877Z + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + fea9ea40-d212-4f3b-b591-140da9b0b191-2014-04-18 03:05:34Z +
+
+ x-ms-client-request-id + d89adfd5-1082-484a-883f-7b849b2d0e55-2014-04-18 03:09:00Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + d89adfd5-1082-484a-883f-7b849b2d0e55 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 03:09:00 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdb2</Name><Type>Microsoft.SqlAzure.RestorableDroppedDatabase</Type><State>Deleted</State><SelfLink>https://localhost/servers/myserver01/restorabledroppeddatabases/testdb2,2014-04-18T03:08:28.877Z</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><EntityId>testdb2,2014-04-18T03:08:28.877Z</EntityId><ServerName>myserver01</ServerName><Edition>Web</Edition><MaxSizeBytes>5368709120</MaxSizeBytes><CreationDate>2014-04-18T03:05:41.9700000Z</CreationDate><DeletionDate>2014-04-18T03:08:28.8770000Z</DeletionDate><RecoveryPeriodStartDate>2014-04-18T03:06:41.9700000Z</RecoveryPeriodStartDate></ServiceResource> +
+
+
+
+ + UnitTest.GetRestorableDroppedDatabaseWithCertAuthByPipe + + + 0 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/restorabledroppeddatabases?contentview=generic + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + fea9ea40-d212-4f3b-b591-140da9b0b191-2014-04-18 03:05:34Z +
+
+ x-ms-client-request-id + f1c4489c-cbfe-4860-b707-1db865690b9a-2014-04-18 03:09:02Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + f1c4489c-cbfe-4860-b707-1db865690b9a +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 03:09:01 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>testdb1</Name><Type>Microsoft.SqlAzure.RestorableDroppedDatabase</Type><State>Deleted</State><SelfLink>https://localhost/servers/myserver01/restorabledroppeddatabases/testdb1,2014-04-18T03:08:25.083Z</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><EntityId>testdb1,2014-04-18T03:08:25.083Z</EntityId><ServerName>myserver01</ServerName><Edition>Web</Edition><MaxSizeBytes>1073741824</MaxSizeBytes><CreationDate>2014-04-18T03:05:35.2530000Z</CreationDate><DeletionDate>2014-04-18T03:08:25.0830000Z</DeletionDate><RecoveryPeriodStartDate>2014-04-18T03:06:35.2530000Z</RecoveryPeriodStartDate></ServiceResource><ServiceResource><Name>testdb2</Name><Type>Microsoft.SqlAzure.RestorableDroppedDatabase</Type><State>Deleted</State><SelfLink>https://localhost/servers/myserver01/restorabledroppeddatabases/testdb2,2014-04-18T03:08:28.877Z</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><EntityId>testdb2,2014-04-18T03:08:28.877Z</EntityId><ServerName>myserver01</ServerName><Edition>Web</Edition><MaxSizeBytes>5368709120</MaxSizeBytes><CreationDate>2014-04-18T03:05:41.9700000Z</CreationDate><DeletionDate>2014-04-18T03:08:28.8770000Z</DeletionDate><RecoveryPeriodStartDate>2014-04-18T03:06:41.9700000Z</RecoveryPeriodStartDate></ServiceResource><ServiceResource><Name>testdb3</Name><Type>Microsoft.SqlAzure.RestorableDroppedDatabase</Type><State>Deleted</State><SelfLink>https://localhost/servers/myserver01/restorabledroppeddatabases/testdb3,2014-04-18T03:08:34.453Z</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><EntityId>testdb3,2014-04-18T03:08:34.453Z</EntityId><ServerName>myserver01</ServerName><Edition>Web</Edition><MaxSizeBytes>104857600</MaxSizeBytes><CreationDate>2014-04-18T03:06:08.4230000Z</CreationDate><DeletionDate>2014-04-18T03:08:34.4530000Z</DeletionDate><RecoveryPeriodStartDate>2014-04-18T03:07:08.4230000Z</RecoveryPeriodStartDate></ServiceResource></ServiceResources> +
+
+ + 1 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/restorabledroppeddatabases/testdb1,2014-04-18T03:08:25.083Z + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + fea9ea40-d212-4f3b-b591-140da9b0b191-2014-04-18 03:05:34Z +
+
+ x-ms-client-request-id + 569404b3-5f8f-489a-b600-f31d80a5a2b1-2014-04-18 03:09:02Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 569404b3-5f8f-489a-b600-f31d80a5a2b1 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 03:09:01 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdb1</Name><Type>Microsoft.SqlAzure.RestorableDroppedDatabase</Type><State>Deleted</State><SelfLink>https://localhost/servers/myserver01/restorabledroppeddatabases/testdb1,2014-04-18T03:08:25.083Z</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><EntityId>testdb1,2014-04-18T03:08:25.083Z</EntityId><ServerName>myserver01</ServerName><Edition>Web</Edition><MaxSizeBytes>1073741824</MaxSizeBytes><CreationDate>2014-04-18T03:05:35.2530000Z</CreationDate><DeletionDate>2014-04-18T03:08:25.0830000Z</DeletionDate><RecoveryPeriodStartDate>2014-04-18T03:06:35.2530000Z</RecoveryPeriodStartDate></ServiceResource> +
+
+ + 2 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/restorabledroppeddatabases/testdb2,2014-04-18T03:08:28.877Z + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + fea9ea40-d212-4f3b-b591-140da9b0b191-2014-04-18 03:05:34Z +
+
+ x-ms-client-request-id + 5e620120-9adb-4449-b8ab-5944accbedb7-2014-04-18 03:09:02Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 5e620120-9adb-4449-b8ab-5944accbedb7 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 03:09:02 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdb2</Name><Type>Microsoft.SqlAzure.RestorableDroppedDatabase</Type><State>Deleted</State><SelfLink>https://localhost/servers/myserver01/restorabledroppeddatabases/testdb2,2014-04-18T03:08:28.877Z</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><EntityId>testdb2,2014-04-18T03:08:28.877Z</EntityId><ServerName>myserver01</ServerName><Edition>Web</Edition><MaxSizeBytes>5368709120</MaxSizeBytes><CreationDate>2014-04-18T03:05:41.9700000Z</CreationDate><DeletionDate>2014-04-18T03:08:28.8770000Z</DeletionDate><RecoveryPeriodStartDate>2014-04-18T03:06:41.9700000Z</RecoveryPeriodStartDate></ServiceResource> +
+
+ + 3 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/restorabledroppeddatabases/testdb1,2014-04-18T03:08:25.083Z + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + fea9ea40-d212-4f3b-b591-140da9b0b191-2014-04-18 03:05:34Z +
+
+ x-ms-client-request-id + 68ccbaed-1436-4ee3-8291-4d9f105e9039-2014-04-18 03:09:02Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 68ccbaed-1436-4ee3-8291-4d9f105e9039 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 03:09:02 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdb1</Name><Type>Microsoft.SqlAzure.RestorableDroppedDatabase</Type><State>Deleted</State><SelfLink>https://localhost/servers/myserver01/restorabledroppeddatabases/testdb1,2014-04-18T03:08:25.083Z</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><EntityId>testdb1,2014-04-18T03:08:25.083Z</EntityId><ServerName>myserver01</ServerName><Edition>Web</Edition><MaxSizeBytes>1073741824</MaxSizeBytes><CreationDate>2014-04-18T03:05:35.2530000Z</CreationDate><DeletionDate>2014-04-18T03:08:25.0830000Z</DeletionDate><RecoveryPeriodStartDate>2014-04-18T03:06:35.2530000Z</RecoveryPeriodStartDate></ServiceResource> +
+
+ + 4 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/restorabledroppeddatabases/testdb2,2014-04-18T03:08:28.877Z + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + fea9ea40-d212-4f3b-b591-140da9b0b191-2014-04-18 03:05:34Z +
+
+ x-ms-client-request-id + 805a9892-4d7b-4c10-ad1b-588f43651f33-2014-04-18 03:09:02Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 805a9892-4d7b-4c10-ad1b-588f43651f33 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 03:09:02 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdb2</Name><Type>Microsoft.SqlAzure.RestorableDroppedDatabase</Type><State>Deleted</State><SelfLink>https://localhost/servers/myserver01/restorabledroppeddatabases/testdb2,2014-04-18T03:08:28.877Z</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><EntityId>testdb2,2014-04-18T03:08:28.877Z</EntityId><ServerName>myserver01</ServerName><Edition>Web</Edition><MaxSizeBytes>5368709120</MaxSizeBytes><CreationDate>2014-04-18T03:05:41.9700000Z</CreationDate><DeletionDate>2014-04-18T03:08:28.8770000Z</DeletionDate><RecoveryPeriodStartDate>2014-04-18T03:06:41.9700000Z</RecoveryPeriodStartDate></ServiceResource> +
+
+
+
+ + UnitTest.GetRestorableDroppedDatabaseWithCertAuthNonExistentDb + + + 0 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/restorabledroppeddatabases/testdbnonexistent,2013-10-01T00:00:00.000Z + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + fea9ea40-d212-4f3b-b591-140da9b0b191-2014-04-18 03:05:34Z +
+
+ x-ms-client-request-id + d866c932-6293-4923-9385-1381abe185e5-2014-04-18 03:08:47Z +
+
+ + + + +
+ + NotFound + +
+ x-ms-request-id + d866c932-6293-4923-9385-1381abe185e5 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 03:08:47 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <Error xmlns="Microsoft.SqlServer.Management.Framework.Web.Services" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Message>Resource with the name 'testdbnonexistent,2013-10-01T00:00:00.000Z' does not exist. To continue, specify a valid resource name.</Message><InnerError i:nil="true"/><SqlErrorCode i:nil="true"/><Severity i:nil="true"/></Error> +
+
+
+
+ + UnitTests.RestoreAzureSqlDatabaseWithDatabaseNameWithCertAuth + + + 0 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/restoredatabaseoperations + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3f922c5b-6fab-4a88-8bc5-2a0e190ebfdb-2014-04-18 03:32:46Z +
+
+ x-ms-client-request-id + eb927fd8-b5f9-4ccc-a1a5-7001006d237a-2014-04-18 03:35:28Z +
+
+ + + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <SourceDatabaseName>testdb1</SourceDatabaseName> + <TargetDatabaseName>testdb1-restored</TargetDatabaseName> + </ServiceResource> + + application/xml + +
+ + Created + +
+ x-ms-request-id + eb927fd8-b5f9-4ccc-a1a5-7001006d237a +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 03:35:32 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name i:nil="true"/><Type>Microsoft.SqlAzure.RestoreDatabaseOperation</Type><State>Created</State><SelfLink i:nil="true"/><ParentLink i:nil="true"/><RequestID>4e17fcf8-69e8-4c8d-9cee-f6a2d023e15b</RequestID><SourceDatabaseName>testdb1</SourceDatabaseName><SourceDatabaseDeletionDate i:nil="true"/><TargetServerName>myserver01</TargetServerName><TargetDatabaseName>testdb1-restored</TargetDatabaseName><TargetUtcPointInTime>2014-04-18T03:35:31.6535907Z</TargetUtcPointInTime></ServiceResource> +
+
+
+
+ + UnitTests.RestoreAzureSqlDatabaseWithDatabaseObjectWithCertAuth + + + 0 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/databases/testdb1 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3cca9886-0d60-456c-ba3c-b52f1aed26b4-2014-04-18 03:43:15Z +
+
+ x-ms-client-request-id + 603f40af-73c0-46c7-8982-552d5d820781-2014-04-18 03:45:40Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 603f40af-73c0-46c7-8982-552d5d820781 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 03:45:42 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdb1</Name><Type>Microsoft.SqlAzure.Database</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/databases/testdb1</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>4</Id><Edition>Web</Edition><MaxSizeGB>1</MaxSizeGB><CollationName>SQL_Latin1_General_CP1_CI_AS</CollationName><CreationDate>2014-04-18T03:43:16.7130000Z</CreationDate><IsFederationRoot>False</IsFederationRoot><IsSystemObject>False</IsSystemObject><SizeMB i:nil="true"/><MaxSizeBytes>1073741824</MaxSizeBytes><ServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</ServiceObjectiveId><AssignedServiceObjectiveId>910b4fcb-8a29-4c3e-958f-f7ba794388b2</AssignedServiceObjectiveId><ServiceObjectiveAssignmentState>1</ServiceObjectiveAssignmentState><ServiceObjectiveAssignmentStateDescription>Complete</ServiceObjectiveAssignmentStateDescription><ServiceObjectiveAssignmentErrorCode>0</ServiceObjectiveAssignmentErrorCode><ServiceObjectiveAssignmentErrorDescription i:nil="true"/><ServiceObjectiveAssignmentSuccessDate>2014-04-18T03:43:20.8200000Z</ServiceObjectiveAssignmentSuccessDate><RecoveryPeriodStartDate>2014-04-18T03:44:16.3000000Z</RecoveryPeriodStartDate><IsSuspended>False</IsSuspended></ServiceResource> +
+
+ + 1 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3cca9886-0d60-456c-ba3c-b52f1aed26b4-2014-04-18 03:43:15Z +
+
+ x-ms-client-request-id + 4d2f5739-0986-44a3-af4f-d8d8aa4dbdd7-2014-04-18 03:45:42Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 4d2f5739-0986-44a3-af4f-d8d8aa4dbdd7 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 03:45:43 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>Shared</Name><Type>Microsoft.SqlAzure.ServiceObjective</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/serviceobjectives/910b4fcb-8a29-4c3e-958f-f7ba794388b2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>910b4fcb-8a29-4c3e-958f-f7ba794388b2</Id><IsDefault>True</IsDefault><IsSystem>False</IsSystem><Description>Shared resource allocation.</Description><Enabled>True</Enabled><DimensionSettings><ServiceResource><Name>Shared</Name><Type>Microsoft.SqlAzure.DimensionSetting</Type><State>Normal</State><SelfLink>https://localhost/servers/myserver01/dimensionsettings/22467ff6-6823-4d18-a169-913150e7714f</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><Id>22467ff6-6823-4d18-a169-913150e7714f</Id><Description>Shared resource allocation.</Description><Ordinal>2</Ordinal><IsDefault>True</IsDefault></ServiceResource></DimensionSettings></ServiceResource> +
+
+ + 2 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/restoredatabaseoperations + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 3cca9886-0d60-456c-ba3c-b52f1aed26b4-2014-04-18 03:43:15Z +
+
+ x-ms-client-request-id + 4b1971ee-1b45-4f8b-81df-37f8ea7d3c92-2014-04-18 03:45:43Z +
+
+ + + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <SourceDatabaseName>testdb1</SourceDatabaseName> + <TargetDatabaseName>testdb1-restored</TargetDatabaseName> + </ServiceResource> + + application/xml + +
+ + Created + +
+ x-ms-request-id + 4b1971ee-1b45-4f8b-81df-37f8ea7d3c92 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 03:45:44 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name i:nil="true"/><Type>Microsoft.SqlAzure.RestoreDatabaseOperation</Type><State>Created</State><SelfLink i:nil="true"/><ParentLink i:nil="true"/><RequestID>d19a303a-2c06-4ec3-a7ab-4204f799f7d2</RequestID><SourceDatabaseName>testdb1</SourceDatabaseName><SourceDatabaseDeletionDate i:nil="true"/><TargetServerName>myserver01</TargetServerName><TargetDatabaseName>testdb1-restored</TargetDatabaseName><TargetUtcPointInTime>2014-04-18T03:45:44.7888981Z</TargetUtcPointInTime></ServiceResource> +
+
+
+
+ + UnitTests.RestoreAzureSqlDatabaseWithRestorableDroppedDatabaseNameWithCertAuth + + + 0 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/restorabledroppeddatabases?contentview=generic + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 9bab98dc-8290-4ba4-8a1f-04d5e68b84f8-2014-04-18 03:48:38Z +
+
+ x-ms-client-request-id + a5648394-4ac4-4b10-84d7-45cd349f1781-2014-04-18 03:52:23Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + a5648394-4ac4-4b10-84d7-45cd349f1781 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 03:52:23 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>testdb1</Name><Type>Microsoft.SqlAzure.RestorableDroppedDatabase</Type><State>Deleted</State><SelfLink>https://localhost/servers/myserver01/restorabledroppeddatabases/testdb1,2014-04-18T03:51:08.837Z</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><EntityId>testdb1,2014-04-18T03:51:08.837Z</EntityId><ServerName>myserver01</ServerName><Edition>Web</Edition><MaxSizeBytes>1073741824</MaxSizeBytes><CreationDate>2014-04-18T03:48:42.3800000Z</CreationDate><DeletionDate>2014-04-18T03:51:08.8370000Z</DeletionDate><RecoveryPeriodStartDate>2014-04-18T03:49:42.3800000Z</RecoveryPeriodStartDate></ServiceResource><ServiceResource><Name>testdb2</Name><Type>Microsoft.SqlAzure.RestorableDroppedDatabase</Type><State>Deleted</State><SelfLink>https://localhost/servers/myserver01/restorabledroppeddatabases/testdb2,2014-04-18T03:51:15.200Z</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><EntityId>testdb2,2014-04-18T03:51:15.200Z</EntityId><ServerName>myserver01</ServerName><Edition>Web</Edition><MaxSizeBytes>5368709120</MaxSizeBytes><CreationDate>2014-04-18T03:48:55.3330000Z</CreationDate><DeletionDate>2014-04-18T03:51:15.2000000Z</DeletionDate><RecoveryPeriodStartDate>2014-04-18T03:49:55.3330000Z</RecoveryPeriodStartDate></ServiceResource><ServiceResource><Name>testdb3</Name><Type>Microsoft.SqlAzure.RestorableDroppedDatabase</Type><State>Deleted</State><SelfLink>https://localhost/servers/myserver01/restorabledroppeddatabases/testdb3,2014-04-18T03:51:18.700Z</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><EntityId>testdb3,2014-04-18T03:51:18.700Z</EntityId><ServerName>myserver01</ServerName><Edition>Web</Edition><MaxSizeBytes>104857600</MaxSizeBytes><CreationDate>2014-04-18T03:49:05.3930000Z</CreationDate><DeletionDate>2014-04-18T03:51:18.7000000Z</DeletionDate><RecoveryPeriodStartDate>2014-04-18T03:50:05.3930000Z</RecoveryPeriodStartDate></ServiceResource></ServiceResources> +
+
+ + 1 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/restoredatabaseoperations + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 9bab98dc-8290-4ba4-8a1f-04d5e68b84f8-2014-04-18 03:48:38Z +
+
+ x-ms-client-request-id + 49a90c78-888c-46ad-9c44-fbaa84259cdd-2014-04-18 03:52:44Z +
+
+ + + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <SourceDatabaseName>testdb1</SourceDatabaseName> + <SourceDatabaseDeletionDate>2014-04-18T03:51:08.8370000Z</SourceDatabaseDeletionDate> + <TargetDatabaseName>testdb1-restored</TargetDatabaseName> + <TargetUtcPointInTime>2014-04-18T03:50:08.8370000Z</TargetUtcPointInTime> + </ServiceResource> + + application/xml + +
+ + Created + +
+ x-ms-request-id + 49a90c78-888c-46ad-9c44-fbaa84259cdd +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 03:52:45 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name i:nil="true"/><Type>Microsoft.SqlAzure.RestoreDatabaseOperation</Type><State>Created</State><SelfLink i:nil="true"/><ParentLink i:nil="true"/><RequestID>a14723f7-5add-4ed0-a3b5-5b477e0e5738</RequestID><SourceDatabaseName>testdb1</SourceDatabaseName><SourceDatabaseDeletionDate>2014-04-18T03:51:08.8370000Z</SourceDatabaseDeletionDate><TargetServerName>myserver01</TargetServerName><TargetDatabaseName>testdb1-restored</TargetDatabaseName><TargetUtcPointInTime>2014-04-18T03:50:08.8370000Z</TargetUtcPointInTime></ServiceResource> +
+
+
+
+ + UnitTests.RestoreAzureSqlDatabaseWithRestorableDroppedDatabaseObjectWithCertAuth + + + 0 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/restorabledroppeddatabases?contentview=generic + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 90ece0d9-ca10-4bbc-b3f3-1e6c51c5e639-2014-04-18 04:04:27Z +
+
+ x-ms-client-request-id + e0624002-cfc1-42d3-a4d9-63b966cd130f-2014-04-18 04:04:27Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + e0624002-cfc1-42d3-a4d9-63b966cd130f +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 04:04:27 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>testdb1</Name><Type>Microsoft.SqlAzure.RestorableDroppedDatabase</Type><State>Deleted</State><SelfLink>https://localhost/servers/myserver01/restorabledroppeddatabases/testdb1,2014-04-18T03:51:08.837Z</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><EntityId>testdb1,2014-04-18T03:51:08.837Z</EntityId><ServerName>myserver01</ServerName><Edition>Web</Edition><MaxSizeBytes>1073741824</MaxSizeBytes><CreationDate>2014-04-18T03:48:42.3800000Z</CreationDate><DeletionDate>2014-04-18T03:51:08.8370000Z</DeletionDate><RecoveryPeriodStartDate>2014-04-18T03:49:42.3800000Z</RecoveryPeriodStartDate></ServiceResource><ServiceResource><Name>testdb2</Name><Type>Microsoft.SqlAzure.RestorableDroppedDatabase</Type><State>Deleted</State><SelfLink>https://localhost/servers/myserver01/restorabledroppeddatabases/testdb2,2014-04-18T03:51:15.200Z</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><EntityId>testdb2,2014-04-18T03:51:15.200Z</EntityId><ServerName>myserver01</ServerName><Edition>Web</Edition><MaxSizeBytes>5368709120</MaxSizeBytes><CreationDate>2014-04-18T03:48:55.3330000Z</CreationDate><DeletionDate>2014-04-18T03:51:15.2000000Z</DeletionDate><RecoveryPeriodStartDate>2014-04-18T03:49:55.3330000Z</RecoveryPeriodStartDate></ServiceResource><ServiceResource><Name>testdb3</Name><Type>Microsoft.SqlAzure.RestorableDroppedDatabase</Type><State>Deleted</State><SelfLink>https://localhost/servers/myserver01/restorabledroppeddatabases/testdb3,2014-04-18T03:51:18.700Z</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><EntityId>testdb3,2014-04-18T03:51:18.700Z</EntityId><ServerName>myserver01</ServerName><Edition>Web</Edition><MaxSizeBytes>104857600</MaxSizeBytes><CreationDate>2014-04-18T03:49:05.3930000Z</CreationDate><DeletionDate>2014-04-18T03:51:18.7000000Z</DeletionDate><RecoveryPeriodStartDate>2014-04-18T03:50:05.3930000Z</RecoveryPeriodStartDate></ServiceResource></ServiceResources> +
+
+ + 1 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/restoredatabaseoperations + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 90ece0d9-ca10-4bbc-b3f3-1e6c51c5e639-2014-04-18 04:04:27Z +
+
+ x-ms-client-request-id + 323483dc-9495-4dee-ba2d-92d7cf858f56-2014-04-18 04:04:27Z +
+
+ + + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <SourceDatabaseName>testdb1</SourceDatabaseName> + <SourceDatabaseDeletionDate>2014-04-18T03:51:08.8370000Z</SourceDatabaseDeletionDate> + <TargetDatabaseName>testdb1-restored</TargetDatabaseName> + </ServiceResource> + + application/xml + +
+ + Created + +
+ x-ms-request-id + 323483dc-9495-4dee-ba2d-92d7cf858f56 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 04:04:28 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name i:nil="true"/><Type>Microsoft.SqlAzure.RestoreDatabaseOperation</Type><State>Created</State><SelfLink i:nil="true"/><ParentLink i:nil="true"/><RequestID>370d75a5-328e-4d77-b6d6-a9943fc6c21e</RequestID><SourceDatabaseName>testdb1</SourceDatabaseName><SourceDatabaseDeletionDate>2014-04-18T03:51:08.8370000Z</SourceDatabaseDeletionDate><TargetServerName>myserver01</TargetServerName><TargetDatabaseName>testdb1-restored</TargetDatabaseName><TargetUtcPointInTime>2014-04-18T03:51:08.8370000Z</TargetUtcPointInTime></ServiceResource> +
+
+
+
+ + UnitTest.GetRecoverableDatabase + + + 0 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/recoverabledatabases?contentview=generic + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 538ca173-7435-4609-bec2-a9c463fbea9f-2014-04-18 01:40:06Z +
+
+ x-ms-client-request-id + 08a8923e-4bac-4ef9-add8-8f59d3503811-2014-04-18 01:40:06Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 08a8923e-4bac-4ef9-add8-8f59d3503811 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 01:40:07 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>testdb1</Name><Type>Microsoft.SqlAzure.RecoverableDatabase</Type><State>Recoverable</State><SelfLink>https://localhost/servers/myserver01/recoverabledatabases/myserver01,testdb1</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><EntityId>myserver01,testdb1</EntityId><ServerName>myserver01</ServerName><Edition>Web</Edition><LastAvailableBackupDate>2014-04-17T06:00:00.4700000Z</LastAvailableBackupDate></ServiceResource><ServiceResource><Name>testdb2</Name><Type>Microsoft.SqlAzure.RecoverableDatabase</Type><State>Recoverable</State><SelfLink>https://localhost/servers/myserver01/recoverabledatabases/myserver01,testdb2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><EntityId>myserver01,testdb2</EntityId><ServerName>myserver01</ServerName><Edition>Business</Edition><LastAvailableBackupDate>2014-04-17T06:00:00.4700000Z</LastAvailableBackupDate></ServiceResource></ServiceResources> +
+
+ + 1 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/recoverabledatabases/testdb1 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 538ca173-7435-4609-bec2-a9c463fbea9f-2014-04-18 01:40:06Z +
+
+ x-ms-client-request-id + c00d8c1b-2bd7-4a14-8a89-5179e58b2909-2014-04-18 01:40:07Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + c00d8c1b-2bd7-4a14-8a89-5179e58b2909 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 01:40:07 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdb1</Name><Type>Microsoft.SqlAzure.RecoverableDatabase</Type><State>Recoverable</State><SelfLink>https://localhost/servers/myserver01/recoverabledatabases/myserver01,testdb1</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><EntityId>myserver01,testdb1</EntityId><ServerName>myserver01</ServerName><Edition>Web</Edition><LastAvailableBackupDate>2014-04-17T06:00:00.6330000Z</LastAvailableBackupDate></ServiceResource> +
+
+ + 2 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/recoverabledatabases/testdb2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + 538ca173-7435-4609-bec2-a9c463fbea9f-2014-04-18 01:40:06Z +
+
+ x-ms-client-request-id + 07d950a7-e793-4e9a-a816-7fd55f1440da-2014-04-18 01:40:07Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 07d950a7-e793-4e9a-a816-7fd55f1440da +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 01:40:07 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdb2</Name><Type>Microsoft.SqlAzure.RecoverableDatabase</Type><State>Recoverable</State><SelfLink>https://localhost/servers/myserver01/recoverabledatabases/myserver01,testdb2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><EntityId>myserver01,testdb2</EntityId><ServerName>myserver01</ServerName><Edition>Business</Edition><LastAvailableBackupDate>2014-04-17T06:00:00.0500000Z</LastAvailableBackupDate></ServiceResource> +
+
+
+
+ + UnitTest.GetRecoverableDatabaseByPipe + + + 0 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/recoverabledatabases?contentview=generic + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + cae658ac-1016-4cc9-9e74-c61467816478-2014-04-18 01:42:27Z +
+
+ x-ms-client-request-id + 3de42757-ecb0-413c-94b0-3b9d38b97f1f-2014-04-18 01:42:27Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 3de42757-ecb0-413c-94b0-3b9d38b97f1f +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 01:42:27 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResources xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ServiceResource><Name>testdb1</Name><Type>Microsoft.SqlAzure.RecoverableDatabase</Type><State>Recoverable</State><SelfLink>https://localhost/servers/myserver01/recoverabledatabases/myserver01,testdb1</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><EntityId>myserver01,testdb1</EntityId><ServerName>myserver01</ServerName><Edition>Web</Edition><LastAvailableBackupDate>2014-04-17T06:00:00.0600000Z</LastAvailableBackupDate></ServiceResource><ServiceResource><Name>testdb2</Name><Type>Microsoft.SqlAzure.RecoverableDatabase</Type><State>Recoverable</State><SelfLink>https://localhost/servers/myserver01/recoverabledatabases/myserver01,testdb2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><EntityId>myserver01,testdb2</EntityId><ServerName>myserver01</ServerName><Edition>Business</Edition><LastAvailableBackupDate>2014-04-17T06:00:00.0600000Z</LastAvailableBackupDate></ServiceResource></ServiceResources> +
+
+ + 1 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/recoverabledatabases/testdb1 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + cae658ac-1016-4cc9-9e74-c61467816478-2014-04-18 01:42:27Z +
+
+ x-ms-client-request-id + e1d3de87-4ffe-471f-9bbd-b95844a68cdc-2014-04-18 01:42:28Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + e1d3de87-4ffe-471f-9bbd-b95844a68cdc +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 01:42:27 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdb1</Name><Type>Microsoft.SqlAzure.RecoverableDatabase</Type><State>Recoverable</State><SelfLink>https://localhost/servers/myserver01/recoverabledatabases/myserver01,testdb1</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><EntityId>myserver01,testdb1</EntityId><ServerName>myserver01</ServerName><Edition>Web</Edition><LastAvailableBackupDate>2014-04-17T06:00:00.1730000Z</LastAvailableBackupDate></ServiceResource> +
+
+ + 2 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/recoverabledatabases/testdb2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + cae658ac-1016-4cc9-9e74-c61467816478-2014-04-18 01:42:27Z +
+
+ x-ms-client-request-id + cf07ee1d-2a03-46ad-b7dc-418a50688c77-2014-04-18 01:42:28Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + cf07ee1d-2a03-46ad-b7dc-418a50688c77 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 01:42:27 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdb2</Name><Type>Microsoft.SqlAzure.RecoverableDatabase</Type><State>Recoverable</State><SelfLink>https://localhost/servers/myserver01/recoverabledatabases/myserver01,testdb2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><EntityId>myserver01,testdb2</EntityId><ServerName>myserver01</ServerName><Edition>Business</Edition><LastAvailableBackupDate>2014-04-17T06:00:00.2470000Z</LastAvailableBackupDate></ServiceResource> +
+
+ + 3 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/recoverabledatabases/testdb1 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + cae658ac-1016-4cc9-9e74-c61467816478-2014-04-18 01:42:27Z +
+
+ x-ms-client-request-id + 1d0d384b-aaa1-4cd6-9602-05ac33f0dad5-2014-04-18 01:42:28Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 1d0d384b-aaa1-4cd6-9602-05ac33f0dad5 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 01:42:27 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdb1</Name><Type>Microsoft.SqlAzure.RecoverableDatabase</Type><State>Recoverable</State><SelfLink>https://localhost/servers/myserver01/recoverabledatabases/myserver01,testdb1</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><EntityId>myserver01,testdb1</EntityId><ServerName>myserver01</ServerName><Edition>Web</Edition><LastAvailableBackupDate>2014-04-17T06:00:00.5000000Z</LastAvailableBackupDate></ServiceResource> +
+
+ + 4 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/recoverabledatabases/testdb2 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + cae658ac-1016-4cc9-9e74-c61467816478-2014-04-18 01:42:27Z +
+
+ x-ms-client-request-id + cf249a07-dcee-4c23-9829-360476f264e0-2014-04-18 01:42:28Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + cf249a07-dcee-4c23-9829-360476f264e0 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 01:42:28 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdb2</Name><Type>Microsoft.SqlAzure.RecoverableDatabase</Type><State>Recoverable</State><SelfLink>https://localhost/servers/myserver01/recoverabledatabases/myserver01,testdb2</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><EntityId>myserver01,testdb2</EntityId><ServerName>myserver01</ServerName><Edition>Business</Edition><LastAvailableBackupDate>2014-04-17T06:00:00.5630000Z</LastAvailableBackupDate></ServiceResource> +
+
+
+
+ + UnitTest.GetRecoverableDatabaseNonExistentDb + + + 0 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/recoverabledatabases/testdbnonexistent + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + f6203c9b-5474-4349-971d-b2744c8a6207-2014-04-18 01:43:51Z +
+
+ x-ms-client-request-id + b9169018-441f-49be-9674-071480dab0be-2014-04-18 01:43:51Z +
+
+ + + + +
+ + NotFound + +
+ x-ms-request-id + b9169018-441f-49be-9674-071480dab0be +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 01:43:51 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <Error xmlns="Microsoft.SqlServer.Management.Framework.Web.Services" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Message>Resource with the name 'testdbnonexistent' does not exist. To continue, specify a valid resource name.</Message><InnerError i:nil="true"/><SqlErrorCode i:nil="true"/><Severity i:nil="true"/></Error> +
+
+
+
+ + UnitTests.RecoverAzureSqlDatabaseWithDatabaseName + + + 0 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/recoverdatabaseoperations + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + cf21f804-0d63-441d-bfa6-4072cb55a544-2014-04-18 01:45:42Z +
+
+ x-ms-client-request-id + 57463dba-e784-46ac-96d3-96ed6bc09dbb-2014-04-18 01:45:42Z +
+
+ + + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <SourceDatabaseName>testdb1</SourceDatabaseName> + <TargetDatabaseName>testdb1-restored</TargetDatabaseName> + </ServiceResource> + + application/xml + +
+ + Created + +
+ x-ms-request-id + 57463dba-e784-46ac-96d3-96ed6bc09dbb +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 01:45:42 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name i:nil="true"/><Type>Microsoft.SqlAzure.RecoverDatabaseOperation</Type><State>Created</State><SelfLink>https://localhost/servers/myserver01/databaserestorestatus/365e51a2-9f26-496e-9399-d62632875e9a</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><RequestID>365e51a2-9f26-496e-9399-d62632875e9a</RequestID><SourceDatabaseName>testdb1</SourceDatabaseName><TargetServerName>myserver01</TargetServerName><TargetDatabaseName>testdb1-restored</TargetDatabaseName></ServiceResource> +
+
+
+
+ + UnitTests.RecoverAzureSqlDatabaseWithDatabaseObject + + + 0 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/recoverabledatabases/testdb1 + GET + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + eb5fad10-0fbf-48bc-bf55-0cb79e61c788-2014-04-18 01:49:56Z +
+
+ x-ms-client-request-id + 260aeb75-474e-44a4-ad97-942507db0a34-2014-04-18 01:49:56Z +
+
+ + + + +
+ + OK + +
+ x-ms-request-id + 260aeb75-474e-44a4-ad97-942507db0a34 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 01:49:56 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name>testdb1</Name><Type>Microsoft.SqlAzure.RecoverableDatabase</Type><State>Recoverable</State><SelfLink>https://localhost/servers/myserver01/recoverabledatabases/myserver01,testdb1</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><EntityId>myserver01,testdb1</EntityId><ServerName>myserver01</ServerName><Edition>Web</Edition><LastAvailableBackupDate>2014-04-17T06:00:00.9930000Z</LastAvailableBackupDate></ServiceResource> +
+
+ + 1 + + https://localhost:65432/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/myserver01/recoverdatabaseoperations + POST + Microsoft.WindowsAzure.Management.Sql.SqlManagementClient/0.9.0.0 AzurePowershell/v0.8.11 + +
+ x-ms-version + 2012-03-01 +
+
+ x-ms-client-session-id + eb5fad10-0fbf-48bc-bf55-0cb79e61c788-2014-04-18 01:49:56Z +
+
+ x-ms-client-request-id + 73d7a600-a370-44ea-8316-f9bbf4487595-2014-04-18 01:49:57Z +
+
+ + + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure"> + <SourceDatabaseName>testdb1</SourceDatabaseName> + <TargetServerName>myserver01</TargetServerName> + <TargetDatabaseName>testdb1-restored</TargetDatabaseName> + </ServiceResource> + + application/xml + +
+ + Created + +
+ x-ms-request-id + 73d7a600-a370-44ea-8316-f9bbf4487595 +
+
+ X-Content-Type-Options + nosniff +
+
+ Cache-Control + no-store,no-cache +
+
+ Content-Type + application/xml; charset=utf-8 +
+
+ Date + Fri, 18 Apr 2014 01:49:58 GMT +
+
+ Server + Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 +
+
+ + <ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Name i:nil="true"/><Type>Microsoft.SqlAzure.RecoverDatabaseOperation</Type><State>Created</State><SelfLink>https://localhost/servers/myserver01/databaserestorestatus/29465541-7d5f-403a-bf83-e9e5d4dd6492</SelfLink><ParentLink>https://localhost/servers/myserver01</ParentLink><RequestID>29465541-7d5f-403a-bf83-e9e5d4dd6492</RequestID><SourceDatabaseName>testdb1</SourceDatabaseName><TargetServerName>myserver01</TargetServerName><TargetDatabaseName>testdb1-restored</TargetDatabaseName></ServiceResource> +
+
+
+
+
\ No newline at end of file diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Resources/PowershellTestClientCert.pfx b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Resources/PowershellTestClientCert.pfx new file mode 100644 index 000000000000..ffdafb4db2c5 Binary files /dev/null and b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Resources/PowershellTestClientCert.pfx differ diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Resources/PowershellTestSSLCert.pfx b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Resources/PowershellTestSSLCert.pfx new file mode 100644 index 000000000000..a58a2375fbff Binary files /dev/null and b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Resources/PowershellTestSSLCert.pfx differ diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Resources/SqlDatabaseSettings.xml b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Resources/SqlDatabaseSettings.xml new file mode 100644 index 000000000000..31871f034467 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Resources/SqlDatabaseSettings.xml @@ -0,0 +1,16 @@ + + + East Asia + f41585e6-5717-4b9b-b600-d3220c5f3d8d + + https://myserver01.windows.database.net + myserver01 + mylogin + Pa$$w0rd! + testdb1 + testdb2 + teststore001 + testcontainer001 + MBa5B5VhKcnx/tJlPfIOB44BiAfTkFYBb1uyMVzNFJN2S7FW10dxcC0ScfoPQJKIIi3dFaeLTuc39vATKlDrLA== + AgAAAAEAAAC8AAAAHAAAAGwAAAABAAAAAAAAAAAAAAAAAAAAAQAAAHsANQA2AEUARAA2ADkAMQA5AC0AQwAxADUARQAtADQARAAwADQALQBBAEEAOABFAC0AOQBEADUARgBDAEQAQQA3AEMARgA5ADgAfQAAAAAATQBpAGMAcgBvAHMAbwBmAHQAIABTAHQAcgBvAG4AZwAgAEMAcgB5AHAAdABvAGcAcgBhAHAAaABpAGMAIABQAHIAbwB2AGkAZABlAHIAAAAgAAAAAQAAABgDAAAwggMUMIICAKADAgECAhAmnynD41waqEZbF7fAcQ5vMAkGBSsOAwIdBQAwHzEdMBsGA1UEAxMUVGVzdEF6dXJlQ2VydGlmaWNhdGUwHhcNMTMwNTE1MTYzNDA3WhcNMzkxMjMxMjM1OTU5WjAfMR0wGwYDVQQDExRUZXN0QXp1cmVDZXJ0aWZpY2F0ZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL577A8CERReaiR+mslM5+1TrtOXIdRvpypcgBxBEcxh3VFvxTyWEKmd1U+we8shcarCRAEtf3jbvp+OY+nYANChKzQCZBafEIiqHP7BT4biA4RGVToxetYmu4S0NbC6yapQtQCevsGy5jaiX4mJVsZe0sQIHUMtxiazKbHWhkEXq6/GaIvx0KyVcM7pWpfefzMnJNDtqPuES9cGruaXIFsod9/W2mZf525/KV69JmatNOyW9C7uLZE8F4p8bCu0+LcVndDCjDASSPz5GQcTGUo9jncglWE4WTCl+M7cuZIhRouVg3+kousu6Gd+0d7YhfhPyac3V62TP9QGHPVEaf8CAwEAAaNUMFIwUAYDVR0BBEkwR4AQyRtCycb6fog5uWTB/AE5EaEhMB8xHTAbBgNVBAMTFFRlc3RBenVyZUNlcnRpZmljYXRlghAmnynD41waqEZbF7fAcQ5vMAkGBSsOAwIdBQADggEBAEcSu4mu16PuCW8DbUudCPaNtWDnV0T2M9xMZDZAQbL4uSphyIKL42mjFiUhblRsd7WbYJ4b9e3yuAYEMg3FhyJhxuiGrvh4Hvr0+M+tSk0VDCheGpnTpsrBIHSMY53udXctL0Pc6cOWFnga2G3MbrpSEpKtdCGH5vU+TJAARwT6eIvNBhliw8aRG30xYlfvlsUCxqm6ik4NhQJSq+HyVZjRfwu7eyY4zFEVpKAO7cCgm56fTdcfVtNwKCN2S8IaceFyN7KhsJE1LKCX9s5EKGQel58HDU06R0+ADp2Z53NZqcKVap4dsZQdB0fTPfpsLnjiAC9QeUBmZYNPzP/ISKY= + diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/CommonFunctions.ps1 b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/CommonFunctions.ps1 new file mode 100644 index 000000000000..66636c235b0d --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/CommonFunctions.ps1 @@ -0,0 +1,456 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +# Loads Microsoft.WindowsAzure.Commands module +# Selects a subscription id to be used by the test + +function Init-TestEnvironment +{ + $DebugPreference = "Continue" + $ErrorActionPreference = "Continue" + $FormatEnumerationLimit = 10000 + $ProgressPreference = "SilentlyContinue" + $VerbosePreference = "SilentlyContinue" + $WarningPreference = "Continue" + $WhatIfPreference = $false + + # Setting to continue because WA sets a bunch of aliases which ask for + # confirmation when running the functional tests. + $ConfirmPreference = "Continue" + #$moduleLoaded = Get-Module -Name "Microsoft.WindowsAzure.Commands" + if(!$moduleLoaded) + { + Import-Module .\Azure.psd1 + } + $ConfirmPreference = "Medium" +} + +function Init-AzureSubscription +{ + [CmdletBinding()] + Param + ( + [Parameter(Mandatory=$true, Position=0)] + [ValidateNotNullOrEmpty()] + [String] + $SubscriptionID, + [Parameter(Mandatory=$true, Position=1)] + [ValidateNotNullOrEmpty()] + [String] + $SerializedCert, + [Parameter(Mandatory=$false, Position=2)] + [ValidateNotNullOrEmpty()] + [String] + $ServiceEndpoint + ) + # Deserialize the input certificate given in base 64 format. + # Install it in the cert store. + $storeName = [System.Security.Cryptography.X509Certificates.StoreName] + $storeLocation = [System.Security.Cryptography.X509Certificates.StoreLocation] + $X509Certificate2 = [System.Security.Cryptography.X509Certificates.X509Certificate2] + $X509Store = [System.Security.Cryptography.X509Certificates.X509Store] + $OpenFlags = [System.Security.Cryptography.X509Certificates.OpenFlags] + + $bytes = [System.Convert]::FromBase64String($SerializedCert) + $myCert = New-Object $X509Certificate2(,$bytes) + $store = New-Object $X509Store($StoreName::My, $StoreLocation::CurrentUser) + $store.Open($OpenFlags::ReadWrite) + if($store.Certificates.Contains($myCert) -ne $true) + { + $store.Add($myCert) + } + $store.Close() + + $subName = "MySub" + $SubscriptionID + + if($ServiceEndpoint) + { + Set-AzureSubscription -SubscriptionName $subName -SubscriptionId $SubscriptionID -Certificate $myCert ` + -ServiceEndpoint $ServiceEndpoint + } + else + { + Set-AzureSubscription -SubscriptionName $subName -SubscriptionId $SubscriptionID -Certificate $myCert ` + -ServiceEndpoint "https://management.core.windows.net" + } + + Select-AzureSubscription -SubscriptionName $subName +} + +function Get-ServerContextByManageUrlWithSqlAuth +{ + [CmdletBinding()] + param + ( + [Parameter(Mandatory=$true, Position=0)] + [ValidateNotNullOrEmpty()] + [String] + $ManageUrl, + + [Parameter(Mandatory=$true, Position=1)] + [ValidateNotNullOrEmpty()] + [String] + $UserName, + + [Parameter(Mandatory=$true, Position=2)] + [ValidateNotNullOrEmpty()] + [String] + $Password + ) + $securePassword = ConvertTo-SecureString $Password -AsPlainText -Force + $credential = New-Object System.Management.Automation.PSCredential ($UserName, $securePassword) + + $context = New-AzureSqlDatabaseServerContext -ManageUrl $ManageUrl -Credential $credential + return $context +} + +function Get-ServerContextByServerNameWithCertAuth +{ + [CmdletBinding()] + param + ( + [Parameter(Mandatory=$true, Position=0)] + [ValidateNotNullOrEmpty()] + [String] + $ServerName + ) + + $context = New-AzureSqlDatabaseServerContext -ServerName $ServerName -UseSubscription + return $context +} + +function Assert +{ + #.Example + # set-content C:\test2\Documents\test2 "hi" + # C:\PS>assert { get-item C:\test2\Documents\test2 } "File wasn't created by Set-Content!" + # + [CmdletBinding()] + param( + [Parameter(Position=0,ParameterSetName="Script",Mandatory=$true)] + [ScriptBlock]$Condition + , + [Parameter(Position=0,ParameterSetName="Bool",Mandatory=$true)] + [bool]$Success + , + [Parameter(Position=1,Mandatory=$true)] + [string]$Message + ) + + $message = "ASSERT FAILED: $message" + + if($PSCmdlet.ParameterSetName -eq "Script") + { + try + { + $ErrorActionPreference = "STOP" + $success = &$condition + } + catch + { + $success = $false + $message = "$message`nEXCEPTION THROWN: $($_.Exception.GetType().FullName)" + } + } + if(!$success) + { + throw $message + } +} + +function Validate-SqlDatabaseServerOperationContext +{ + [CmdletBinding()] + Param + ( + [Parameter(Mandatory=$true, Position=0)] + [Microsoft.WindowsAzure.Commands.SqlDatabase.Model.SqlDatabaseServerOperationContext] + $Actual, + [Parameter(Mandatory=$true, Position=1)] + [ValidateNotNullOrEmpty()] + [String] + $ExpectedServerName, + [Parameter(Mandatory=$true, Position=2)] + [ValidateNotNullOrEmpty()] + [String] + $ExpectedOperationDescription + ) + + $expectedOperationStatus = "Success" + Assert {$actual} "SqlDatabaseServerOperationContext is null" + Assert {$actual.ServerName -eq $expectedServerName} "ServerName didn't match. Actual:[$($actual.ServerName)] ` + expected:[$expectedServerName]" + Assert {$actual.OperationDescription -eq $expectedOperationDescription} "OperationDescription didn't match. ` + Actual:[$($actual.OperationDescription)] expected:[$expectedOperationDescription]" + Assert {$actual.OperationStatus -eq $expectedOperationStatus} "OperationStatus didn't match. ` + Actual:[$($actual.OperationStatus)] expected:[$expectedOperationStatus]" +} + +function Validate-SqlDatabaseServerContext +{ + [CmdletBinding()] + Param + ( + [Parameter(Mandatory=$true, Position=0)] + [Microsoft.WindowsAzure.Commands.SqlDatabase.Model.SqlDatabaseServerContext] + $Actual, + [Parameter(Mandatory=$true, Position=1)] + [ValidateNotNullOrEmpty()] + [String] + $ExpectedAdministratorLogin, + [Parameter(Mandatory=$true, Position=2)] + [ValidateNotNullOrEmpty()] + [String] + $ExpectedLocation, + [Parameter(Mandatory=$true, Position=3)] + [ValidateNotNullOrEmpty()] + [String] + $ExpectedServerName, + [Parameter(Mandatory=$true, Position=4)] + [ValidateNotNullOrEmpty()] + [String] + $ExpectedOperationDescription + ) + + Assert {$actual} "SqlDatabaseServerContext is null" + Assert {$actual.AdministratorLogin -eq $ExpectedAdministratorLogin} "AdministratorLogin didn't match. ` + Actual:[$($actual.AdministratorLogin)] expected:[$ExpectedAdministratorLogin]" + Assert {$actual.Location -eq $ExpectedLocation} "Location didn't match. Actual:[$($actual.Location)] ` + expected:[$ExpectedLocation]" + Validate-SqlDatabaseServerOperationContext -Actual $actual -ExpectedServerName $ExpectedServerName ` + -ExpectedOperationDescription $ExpectedOperationDescription +} + +function Validate-SqlDatabaseServerFirewallRuleContext +{ + [CmdletBinding()] + Param + ( + [Parameter(Mandatory=$true, Position=0)] + [Microsoft.WindowsAzure.Commands.SqlDatabase.Model.SqlDatabaseServerFirewallRuleContext] + $Actual, + [Parameter(Mandatory=$true, Position=1)] + [ValidateNotNullOrEmpty()] + [String] + $ExpectedRuleName, + [Parameter(Mandatory=$true, Position=2)] + [ValidateNotNullOrEmpty()] + [String] + $ExpectedStartIpAddress, + [Parameter(Mandatory=$true, Position=3)] + [ValidateNotNullOrEmpty()] + [String] + $ExpectedEndIpAddress, + [Parameter(Mandatory=$true, Position=4)] + [ValidateNotNullOrEmpty()] + [String] + $ExpectedServerName, + [Parameter(Mandatory=$true, Position=5)] + [ValidateNotNullOrEmpty()] + [String] + $ExpectedOperationDescription + ) + + Assert {$actual} "SqlDatabaseServerContext is null" + Assert {$actual.RuleName -eq $ExpectedRuleName} "RuleName didn't match. Actual:[$($actual.RuleName)] + `expected:[$ExpectedRuleName]" + Assert {$actual.StartIpAddress -eq $ExpectedStartIpAddress} "StartIpAddress didn't match. ` + Actual:[$($actual.StartIpAddress)] expected:[$ExpectedStartIpAddress]" + Assert {$actual.EndIpAddress -eq $ExpectedEndIpAddress} "EndIpAddress didn't match. ` + Actual:[$($actual.EndIpAddress)] expected:[$ExpectedEndIpAddress]" + Validate-SqlDatabaseServerOperationContext -Actual $actual -ExpectedServerName $ExpectedServerName ` + -ExpectedOperationDescription $ExpectedOperationDescription +} + +function Validate-SqlDatabase +{ + [CmdletBinding()] + Param + ( + [Parameter(Mandatory=$true, Position=0)] + [Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.Database] + $Actual, + [Parameter(Mandatory=$true, Position=1)] + [ValidateNotNullOrEmpty()] + [String] + $ExpectedName, + [Parameter(Mandatory=$true, Position=2)] + [ValidateNotNullOrEmpty()] + [String] + $ExpectedCollationName, + [Parameter(Mandatory=$true, Position=3)] + [ValidateNotNullOrEmpty()] + [String] + $ExpectedEdition, + [Parameter(Mandatory=$true, Position=4)] + [ValidateNotNullOrEmpty()] + [String] + $ExpectedMaxSizeGB, + [Parameter(Mandatory=$true, Position=5)] + [ValidateNotNullOrEmpty()] + [bool] + $ExpectedIsReadOnly, + [Parameter(Mandatory=$true, Position=6)] + [ValidateNotNullOrEmpty()] + [bool] + $ExpectedIsFederationRoot, + [Parameter(Mandatory=$true, Position=7)] + [ValidateNotNullOrEmpty()] + [bool] + $ExpectedIsSystemObject, + [Parameter(Mandatory=$false, Position=8)] + [ValidateNotNullOrEmpty()] + [String] + $Source + ) + + Assert {$actual} "SqlDatabaseServerContext is null" + Assert {$actual.Name -eq $ExpectedName} "Database Name didn't match. Actual:[$($actual.Name)] ` + expected:[$ExpectedRuleName] | $Source" + Assert {$actual.CollationName -eq $ExpectedCollationName} "CollationName didn't match. ` + Actual:[$($actual.CollationName)] expected:[$ExpectedCollationName] | $Source" + Assert {$actual.Edition -eq $ExpectedEdition} "Edition didn't match. ` + Actual:[$($actual.Edition)] expected:[$ExpectedEdition] | $Source" + Assert {$actual.MaxSizeGB -eq $ExpectedMaxSizeGB} "MaxSizeGB didn't match. ` + Actual:[$($actual.MaxSizeGB)] expected:[$ExpectedMaxSizeGB] | $Source" + Assert {$actual.IsReadOnly -eq $ExpectedIsReadOnly} "IsReadOnly didn't match. ` + Actual:[$($actual.IsReadOnly)] expected:[$ExpectedIsReadOnly] | $Source" + Assert {$actual.IsFederationRoot -eq $ExpectedIsFederationRoot} "IsFederationRoot didn't match. ` + Actual:[$($actual.IsFederationRoot)] expected:[$ExpectedIsFederationRoot] | $Source" + Assert {$actual.IsSystemObject -eq $ExpectedIsSystemObject} "Edition didn't match. ` + Actual:[$($actual.IsSystemObject)] expected:[$ExpectedIsSystemObject] | $Source" +} + +function Drop-Server +{ + [CmdletBinding()] + Param + ( + [Parameter(Mandatory=$true, Position=0)] + [Microsoft.WindowsAzure.Commands.SqlDatabase.Model.SqlDatabaseServerOperationContext] + $Server + ) + + if($server) + { + # Drop server + Write-Output "Dropping server $($server.ServerName) ..." + Remove-AzureSqlDatabaseServer -ServerName $server.ServerName -Force + Write-Output "Dropped server $($server.ServerName)" + } +} + +function Drop-Database +{ + [CmdletBinding()] + Param + ( + [Parameter(Mandatory=$true, Position=0)] + [Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.IServerDataServiceContext] + $Context, + [Parameter(Mandatory=$true, Position=1)] + [Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.Database] + $Database + ) + + if($Database) + { + # Drop Database + Write-Output "Dropping database $($Database.Name) ..." + Remove-AzureSqlDatabase -Context $context -InputObject $Database -Force + Write-Output "Dropped database $($Database.Name)" + } +} + +function Drop-DatabaseWithServerName +{ + [CmdletBinding()] + Param + ( + [Parameter(Mandatory=$true, Position=0)] + [string] + $ServerName, + [Parameter(Mandatory=$true, Position=1)] + [Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.Database] + $Database + ) + + if($Database) + { + # Drop Database + Write-Output "Dropping database $($Database.Name) ..." + Remove-AzureSqlDatabase -ServerName $ServerName -InputObject $Database -Force + Write-Output "Dropped database $($Database.Name)" + } +} + +function Drop-Databases +{ + [CmdletBinding()] + Param + ( + [Parameter(Mandatory=$true, Position=0)] + [Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.IServerDataServiceContext] + $Context, + [Parameter(Mandatory=$true, Position=1)] + [String] + $NameStartsWith + ) + + # Drop Database + Write-Output "Dropping databases with name starts with $NameStartsWith ..." + Get-AzureSqlDatabase $context | Where-Object {$_.Name.StartsWith($NameStartsWith)} ` + | Remove-AzureSqlDatabase -Context $context -Force + Write-Output "Dropped database with name starts with $NameStartsWith" +} + +function Drop-DatabasesWithServerName +{ + [CmdletBinding()] + Param + ( + [Parameter(Mandatory=$true, Position=0)] + [string] + $ServerName, + [Parameter(Mandatory=$true, Position=1)] + [String] + $NameStartsWith + ) + + # Drop Database + Write-Output "Dropping databases with name starts with $NameStartsWith ..." + (Get-AzureSqlDatabase $ServerName) | Where-Object {$_.Name.StartsWith($NameStartsWith)} ` + | Remove-AzureSqlDatabase -Force + Write-Output "Dropped database with name starts with $NameStartsWith" +} + +function Write-TestResult +{ + [CmdletBinding()] + Param + ( + [Parameter(Mandatory=$true, Position=0)] + [bool] + $TestResult + ) + + if($IsTestPass) + { + Write-Output "PASS" + } + else + { + Write-Output "FAILED" + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/CreateAndGetDatabase-ScenarioFunctions.ps1 b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/CreateAndGetDatabase-ScenarioFunctions.ps1 new file mode 100644 index 000000000000..dcc2e3c06f6b --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/CreateAndGetDatabase-ScenarioFunctions.ps1 @@ -0,0 +1,156 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +function Scenerio1-CreateWithRequiredParameters +{ + [CmdletBinding()] + param + ( + [Parameter(Mandatory=$false, Position=0)] + [ValidateNotNullOrEmpty()] + [Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.IServerDataServiceContext] + $Context, + + [Parameter(Mandatory=$false, Position=1)] + [ValidateNotNullOrEmpty()] + [String] + $ServerName + ) + + if($Context) + { + # Create Database with only required parameters + Write-Output "Creating Database $Name ..." + $database = New-AzureSqlDatabase -Context $context -DatabaseName $Name + Write-Output "Done" + Validate-SqlDatabase -Actual $database -ExpectedName $Name -ExpectedCollationName $defaultCollation ` + -ExpectedEdition $defaultEdition -ExpectedMaxSizeGB $defaultMaxSizeGB -ExpectedIsReadOnly $defaultIsReadOnly ` + -ExpectedIsFederationRoot $defaultIsFederationRoot -ExpectedIsSystemObject $defaultIsSystemObject + + # Get Database by database name + $database = Get-AzureSqlDatabase -Context $context -DatabaseName $Name + Validate-SqlDatabase -Actual $database -ExpectedName $Name -ExpectedCollationName $defaultCollation ` + -ExpectedEdition $defaultEdition -ExpectedMaxSizeGB $defaultMaxSizeGB -ExpectedIsReadOnly $defaultIsReadOnly ` + -ExpectedIsFederationRoot $defaultIsFederationRoot -ExpectedIsSystemObject $defaultIsSystemObject + + # Get Database by database name + $database = Get-AzureSqlDatabase $context -DatabaseName $Name + Validate-SqlDatabase -Actual $database -ExpectedName $Name -ExpectedCollationName $defaultCollation ` + -ExpectedEdition $defaultEdition -ExpectedMaxSizeGB $defaultMaxSizeGB -ExpectedIsReadOnly $defaultIsReadOnly ` + -ExpectedIsFederationRoot $defaultIsFederationRoot -ExpectedIsSystemObject $defaultIsSystemObject + + # Get Database by database name + $database = Get-AzureSqlDatabase -ConnectionContext $context -DatabaseName $Name + Validate-SqlDatabase -Actual $database -ExpectedName $Name -ExpectedCollationName $defaultCollation ` + -ExpectedEdition $defaultEdition -ExpectedMaxSizeGB $defaultMaxSizeGB -ExpectedIsReadOnly $defaultIsReadOnly ` + -ExpectedIsFederationRoot $defaultIsFederationRoot -ExpectedIsSystemObject $defaultIsSystemObject + } + elseif ($ServerName) + { + # Create Database with only required parameters + Write-Output "Creating Database $Name ..." + $database = New-AzureSqlDatabase -ServerName $ServerName -DatabaseName $Name + Write-Output "Done" + + Validate-SqlDatabase -Actual $database -ExpectedName $Name -ExpectedCollationName $defaultCollation ` + -ExpectedEdition $defaultEdition -ExpectedMaxSizeGB $defaultMaxSizeGB -ExpectedIsReadOnly ` + $defaultIsReadOnly -ExpectedIsFederationRoot $defaultIsFederationRoot -ExpectedIsSystemObject ` + $defaultIsSystemObject + + # Get Database by database name + $database = Get-AzureSqlDatabase -ServerName $ServerName -DatabaseName $Name + + Validate-SqlDatabase -Actual $database -ExpectedName $Name -ExpectedCollationName $defaultCollation ` + -ExpectedEdition $defaultEdition -ExpectedMaxSizeGB $defaultMaxSizeGB -ExpectedIsReadOnly ` + $defaultIsReadOnly -ExpectedIsFederationRoot $defaultIsFederationRoot -ExpectedIsSystemObject ` + $defaultIsSystemObject + + $database = Get-AzureSqlDatabase $ServerName -DatabaseName $Name + + Validate-SqlDatabase -Actual $database -ExpectedName $Name -ExpectedCollationName $defaultCollation ` + -ExpectedMaxSizeGB $defaultMaxSizeGB -ExpectedIsReadOnly $defaultIsReadOnly ` + -ExpectedEdition $defaultEdition -ExpectedIsFederationRoot $defaultIsFederationRoot -ExpectedIsSystemObject ` + $defaultIsSystemObject + } +} + +function Scenerio2-CreateWithOptionalParameters +{ + [CmdletBinding()] + param + ( + [Parameter(Mandatory=$false, Position=0)] + [ValidateNotNullOrEmpty()] + [Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.IServerDataServiceContext] + $Context, + + [Parameter(Mandatory=$false, Position=1)] + [ValidateNotNullOrEmpty()] + [String] + $ServerName + ) + + $Name = $Name + "1" + + if($Context) + { + # Create Database with all optional parameters + Write-Output "Creating Database $Name ..." + $database2 = New-AzureSqlDatabase $context $Name -Collation $defaultCollation -Edition "Business" ` + -MaxSizeGB 20 -Force + Write-Output "Done" + + Validate-SqlDatabase -Actual $database2 -ExpectedName $Name -ExpectedCollationName $defaultCollation ` + -ExpectedEdition "Business" -ExpectedMaxSizeGB "20" -ExpectedIsReadOnly $defaultIsReadOnly ` + -ExpectedIsFederationRoot $defaultIsFederationRoot -ExpectedIsSystemObject $defaultIsSystemObject + + # Get Database by database object + $database2 = Get-AzureSqlDatabase -Context $context -Database $database2 + Validate-SqlDatabase -Actual $database2 -ExpectedName $Name -ExpectedCollationName $defaultCollation ` + -ExpectedEdition "Business" -ExpectedMaxSizeGB "20" -ExpectedIsReadOnly $defaultIsReadOnly ` + -ExpectedIsFederationRoot $defaultIsFederationRoot -ExpectedIsSystemObject $defaultIsSystemObject + + # Get Databases with no filter + $databases = Get-AzureSqlDatabase -Context $context | Where-Object {$_.Name.StartsWith($NameStartWith)} + Assert {$databases.Count -eq 2} "Get database should have returned 2 database, but returned $databases.Count" + } + elseif ($ServerName) + { + # Create Database with all optional parameters + Write-Output "Creating Database $Name ..." + $database2 = New-AzureSqlDatabase -ServerName $ServerName $Name -Collation ` + "SQL_Latin1_General_CP1_CS_AS" -Edition "Business" -MaxSizeGB 20 -Force + Write-Output "Done" + + Validate-SqlDatabase -Actual $database2 -ExpectedName $Name -ExpectedCollationName ` + "SQL_Latin1_General_CP1_CS_AS" -ExpectedEdition "Business" -ExpectedMaxSizeGB "20" ` + -ExpectedIsReadOnly $defaultIsReadOnly -ExpectedIsFederationRoot $defaultIsFederationRoot ` + -ExpectedIsSystemObject $defaultIsSystemObject + + $database2 = Get-AzureSqlDatabase -ServerName $ServerName -Database $database2 + + # Get Database by database object + Validate-SqlDatabase -Actual $database2 -ExpectedName $Name -ExpectedCollationName ` + "SQL_Latin1_General_CP1_CS_AS" -ExpectedEdition "Business" -ExpectedMaxSizeGB "20" ` + -ExpectedIsReadOnly $defaultIsReadOnly -ExpectedIsFederationRoot $defaultIsFederationRoot ` + -ExpectedIsSystemObject $defaultIsSystemObject + + # Get Databases with no filter + $databases = (Get-AzureSqlDatabase -ServerName $ServerName) | ` + Where-Object {$_.Name.StartsWith($NameStartWith)} + $count = $databases.Count + + Assert {$count -eq 2} "Get database should have returned 2 database, but returned $count" + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/CreateAndGetDatabase.ps1 b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/CreateAndGetDatabase.ps1 new file mode 100644 index 000000000000..981f94204419 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/CreateAndGetDatabase.ps1 @@ -0,0 +1,146 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +[CmdletBinding()] +Param +( + [Parameter(Mandatory=$true, Position=0)] + [ValidateNotNullOrEmpty()] + [string] + $Name, + [Parameter(Mandatory=$true, Position=1)] + [ValidateNotNullOrEmpty()] + [string] + $ManageUrl, + [Parameter(Mandatory=$true, Position=2)] + [ValidateNotNullOrEmpty()] + [string] + $UserName, + [Parameter(Mandatory=$true, Position=3)] + [ValidateNotNullOrEmpty()] + [string] + $Password, + [Parameter(Mandatory=$true, Position=1)] + [ValidateNotNullOrEmpty()] + [string] + $ServerName, + [Parameter(Mandatory=$true, Position=2)] + [ValidateNotNullOrEmpty()] + [string] + $SubscriptionID, + [Parameter(Mandatory=$true, Position=3)] + [ValidateNotNullOrEmpty()] + [string] + $SerializedCert, + [Parameter(Mandatory=$true, Position=4)] + [ValidateNotNullOrEmpty()] + [string] + $Endpoint +) + +$IsTestPass = $False + +Write-Output "`$Name=$Name" +Write-Output "`$ManageUrl=$ManageUrl" +Write-Output "`$UserName=$UserName" +Write-Output "`$Password=$Password" +Write-Output "`$ServerName=$ServerName" +Write-Output "`$SubscriptionID=$SubscriptionID" +Write-Output "`$SerializedCert=$SerializedCert" +Write-Output "`$Endpoint=$Endpoint" +$NameStartWith = $Name + +. .\Database\CreateAndGetDatabase-ScenarioFunctions.ps1 +. .\CommonFunctions.ps1 + +Try +{ + Init-TestEnvironment + + $database = $null + $database2 = $null + $defaultCollation = "SQL_Latin1_General_CP1_CI_AS" + $defaultEdition = "Web" + $defaultMaxSizeGB = "1" + $defaultIsReadOnly = $false + $defaultIsFederationRoot = $false + $defaultIsSystemObject = $false + + # Using Sql Auth + try + { + Write-Output "Test 1: Using Sql Auth" + + $context = Get-ServerContextByManageUrlWithSqlAuth -ManageUrl $ManageUrl -UserName $UserName -Password $Password + + Scenerio1-CreateWithRequiredParameters -Context $context + + Scenerio2-CreateWithOptionalParameters -Context $context + } + finally + { + # Drop Database + Drop-Databases $Context $NameStartWith + } + + # Using Cert Auth + try + { + Write-Output "Test 2: Using Cert Auth" + + Init-AzureSubscription $SubscriptionId $SerializedCert $Endpoint + $sub = Get-AzureSubscription -Current + + $context = Get-ServerContextByServerNameWithCertAuth $ServerName + Scenerio1-CreateWithRequiredParameters -Context $context + + Scenerio2-CreateWithOptionalParameters -Context $context + } + finally + { + # Drop Database + Drop-Databases $Context $NameStartWith + Remove-AzureSubscription $sub.SubscriptionName -Force + } + + # Using Cert Auth with server name + try + { + Write-Output "Test 3: Using Cert Auth with Server Name" + + Init-AzureSubscription $SubscriptionId $SerializedCert $Endpoint + $sub = Get-AzureSubscription -Current + + Scenerio1-CreateWithRequiredParameters -ServerName $ServerName + + Scenerio2-CreateWithOptionalParameters -ServerName $ServerName + + } + finally + { + # Drop Database + Drop-Databases $Context $NameStartWith + Remove-AzureSubscription $sub.SubscriptionName -Force + } + + $IsTestPass = $True +} +Finally +{ + Drop-Databases $Context $NameStartWith +} + +Write-TestResult $IsTestPass + + diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/CreateContext.ps1 b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/CreateContext.ps1 new file mode 100644 index 000000000000..365e18d7f4d4 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/CreateContext.ps1 @@ -0,0 +1,124 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +[CmdletBinding()] +Param +( + [Parameter(Mandatory=$true, Position=1)] + [ValidateNotNullOrEmpty()] + [Uri] + $ManageUrl, + [Parameter(Mandatory=$true, Position=2)] + [ValidateNotNullOrEmpty()] + [string] + $UserName, + [Parameter(Mandatory=$true, Position=3)] + [ValidateNotNullOrEmpty()] + [string] + $Password, + [Parameter(Mandatory=$true, Position=4)] + [ValidateNotNullOrEmpty()] + [string] + $SubscriptionID, + [Parameter(Mandatory=$true, Position=5)] + [ValidateNotNullOrEmpty()] + [string] + $SerializedCert +) + +# Assuming $ManageUrl is in the following format: https://servername.domainname.com/ +$FQSN = $ManageUrl.Host +$ServerName = $FQSN.Split('.')[0] + +Write-Output "`$ManageUrl=$ManageUrl" +Write-Output "`$FQSN=$FQSN" +Write-Output "`$ServerName=$ServerName" +Write-Output "`$UserName=$UserName" +Write-Output "`$Password=$Password" +. .\CommonFunctions.ps1 + +Try +{ + Init-TestEnvironment + Init-AzureSubscription $SubscriptionId $SerializedCert + $sub = Get-AzureSubscription -Current + + $IsTestPass = $False + + ############################################################################### + # Test the connection context creation using the current subscription + ############################################################################### + # Test ByManageUrlWithCertAuth with Optional Parameters + $context = New-AzureSqlDatabaseServerContext -ServerName $ServerName -UseSubscription + Assert {$context.ServerName -eq $ServerName} ` + "Server name does not match. Actual:[$($context.ServerName)] expected:[$ServerName]" + + # Test ByFullyQualifiedServerNameWithCertAuth + $context = New-AzureSqlDatabaseServerContext -FullyQualifiedServerName $FQSN -UseSubscription + Assert {$context.ServerName -eq $ServerName} ` + "Server name does not match. Actual:[$($context.ServerName)] expected:[$ServerName]" + + Remove-AzureSubscription $sub.SubscriptionName -Force + + ############################################################################### + # Test the connection context creation using subscription data + ############################################################################### + # Test ByManageUrlWithCertAuth with Optional Parameters + $context = New-AzureSqlDatabaseServerContext -ServerName $ServerName ` + -UseSubscription -SubscriptionName $sub.SubscriptionName + Assert {$context.ServerName -eq $ServerName} ` + "Server name does not match. Actual:[$($context.ServerName)] expected:[$ServerName]" + + # Test ByFullyQualifiedServerNameWithCertAuth + $context = New-AzureSqlDatabaseServerContext -FullyQualifiedServerName $FQSN ` + -UseSubscription -SubscriptionName $sub.SubscriptionName + Assert {$context.ServerName -eq $ServerName} ` + "Server name does not match. Actual:[$($context.ServerName)] expected:[$ServerName]" + + ############################################################################### + # Test the connection context creation using sql authentication + ############################################################################### + $securePassword = ConvertTo-SecureString $Password -AsPlainText -Force + $credential = New-Object System.Management.Automation.PSCredential ($UserName, $securePassword) + + # Test ByManageUrlWithSqlAuth + $context = New-AzureSqlDatabaseServerContext -ManageUrl $ManageUrl -Credential $credential + Assert {$context.ServerName -eq $ServerName} ` + "Server name does not match. Actual:[$($context.ServerName)] expected:[$ServerName]" + + # Test ByManageUrlWithSqlAuth with Optional Parameters + $context = New-AzureSqlDatabaseServerContext -ManageUrl $ManageUrl ` + -Credential $credential -ServerName $ServerName + Assert {$context.ServerName -eq $ServerName} ` + "Server name does not match. Actual:[$($context.ServerName)] expected:[$ServerName]" + + # Test ByFullyQualifiedServerNameWithSqlAuth + $context = New-AzureSqlDatabaseServerContext -FullyQualifiedServerName $FQSN -Credential $credential + Assert {$context.ServerName -eq $ServerName} ` + "Server name does not match. Actual:[$($context.ServerName)] expected:[$ServerName]" + + If ($ManageUrl.Host.EndsWith(".database.windows.net", [StringComparison]::InvariantCultureIgnoreCase)) + { + # Test ByServerNameWithSqlAuth iff the ManageUrl specified is a production server + $context = New-AzureSqlDatabaseServerContext -ServerName $ServerName -Credential $credential + Assert {$context.ServerName -eq $ServerName} ` + "Server name does not match. Actual:[$($context.ServerName)] expected:[$ServerName]" + } + + $IsTestPass = $True +} +Finally +{ + Write-TestResult $IsTestPass +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/DeleteDatabase-ScenarioFunctions.ps1 b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/DeleteDatabase-ScenarioFunctions.ps1 new file mode 100644 index 000000000000..92767e469c49 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/DeleteDatabase-ScenarioFunctions.ps1 @@ -0,0 +1,121 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +function Scenerio1-DeleteByName +{ + [CmdletBinding()] + param + ( + [Parameter(Mandatory=$false, Position=0)] + [ValidateNotNullOrEmpty()] + [Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.IServerDataServiceContext] + $Context, + + [Parameter(Mandatory=$false, Position=1)] + [ValidateNotNullOrEmpty()] + [String] + $ServerName + ) + + if($Context) + { + # Delete database by pasing database name + $database = New-AzureSqlDatabase -Context $context -DatabaseName $Name + + Write-Output "Deleting Database by passing Database Name ..." + Remove-AzureSqlDatabase $context $database.Name -Force + Write-Output "Done" + + $getDroppedDatabase = Get-AzureSqlDatabase -ConnectionContext $context ` + | Where-Object {$_.Name -eq $Name} + Assert {!$getDroppedDatabase} "Database is not dropped" + } + elseif ($ServerName) + { + $database = New-AzureSqlDatabase -ServerName $ServerName -DatabaseName $Name + + ###################################################################### + # Delete database by pasing database object + Write-Output "Deleting Database by passing Database object ..." + Remove-AzureSqlDatabase -ServerName $Servername $database -Force + Write-Output "Done" + + $getDroppedDatabase = Get-AzureSqlDatabase -ServerName $Servername | Where-Object {$_.Name -eq $Name} + Assert {!$getDroppedDatabase} "Database is not dropped" + + ###################################################################### + # Delete database without specifying -ServerName using db name + $database = New-AzureSqlDatabase -ServerName $Servername -DatabaseName $Name + Write-Output "Deleting Database by name without using -ServerName identifier ..." + Remove-AzureSqlDatabase $Servername $database.Name -Force + Write-Output "Done" + + $getDroppedDatabase = Get-AzureSqlDatabase -ServerName $Servername | Where-Object {$_.Name -eq $Name} + Assert {!$getDroppedDatabase} "Database is not dropped" + } +} + +function Scenerio2-DeleteByObject +{ + [CmdletBinding()] + param + ( + [Parameter(Mandatory=$false, Position=0)] + [ValidateNotNullOrEmpty()] + [Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.IServerDataServiceContext] + $Context, + + [Parameter(Mandatory=$false, Position=1)] + [ValidateNotNullOrEmpty()] + [String] + $ServerName + ) + + if($Context) + { + $database = New-AzureSqlDatabase -Context $context -DatabaseName $Name + + # Delete database by pasing database object + Write-Output "Deleting Database by passing Database object ..." + Remove-AzureSqlDatabase $context $database -Force + Write-Output "Done" + + $getDroppedDatabase = Get-AzureSqlDatabase -ConnectionContext $context ` + | Where-Object {$_.Name -eq $Name} + Assert {!$getDroppedDatabase} "Database is not dropped" + } + elseif ($ServerName) + { + $database = New-AzureSqlDatabase -ServerName $ServerName -DatabaseName $Name + + ###################################################################### + # Delete database by pasing database object + Write-Output "Deleting Database by passing Database object ..." + Remove-AzureSqlDatabase -ServerName $Servername $database -Force + Write-Output "Done" + + $getDroppedDatabase = Get-AzureSqlDatabase -ServerName $Servername | Where-Object {$_.Name -eq $Name} + Assert {!$getDroppedDatabase} "Database is not dropped" + + ###################################################################### + # Delete database without specifying -ServerName using db object + $database = New-AzureSqlDatabase -ServerName $Servername -DatabaseName $Name + Write-Output "Deleting Database by name without using -ServerName identifier ..." + Remove-AzureSqlDatabase $Servername $database -Force + Write-Output "Done" + + $getDroppedDatabase = Get-AzureSqlDatabase -ServerName $Servername | Where-Object {$_.Name -eq $Name} + Assert {!$getDroppedDatabase} "Database is not dropped" + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/DeleteDatabase.ps1 b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/DeleteDatabase.ps1 new file mode 100644 index 000000000000..7d8beae8a1d4 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/DeleteDatabase.ps1 @@ -0,0 +1,131 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +[CmdletBinding()] +Param +( + [Parameter(Mandatory=$true, Position=0)] + [ValidateNotNullOrEmpty()] + [string] + $Name, + [Parameter(Mandatory=$true, Position=1)] + [ValidateNotNullOrEmpty()] + [string] + $ManageUrl, + [Parameter(Mandatory=$true, Position=2)] + [ValidateNotNullOrEmpty()] + [string] + $UserName, + [Parameter(Mandatory=$true, Position=3)] + [ValidateNotNullOrEmpty()] + [string] + $Password, + [Parameter(Mandatory=$true, Position=1)] + [ValidateNotNullOrEmpty()] + [string] + $ServerName, + [Parameter(Mandatory=$true, Position=2)] + [ValidateNotNullOrEmpty()] + [string] + $SubscriptionID, + [Parameter(Mandatory=$true, Position=3)] + [ValidateNotNullOrEmpty()] + [string] + $SerializedCert, + [Parameter(Mandatory=$true, Position=4)] + [ValidateNotNullOrEmpty()] + [string] + $Endpoint +) + +$IsTestPass = $False +Write-Output "`$Name=$Name" +Write-Output "`$ManageUrl=$ManageUrl" +Write-Output "`$UserName=$UserName" +Write-Output "`$Password=$Password" +Write-Output "`$ServerName=$ServerName" +Write-Output "`$SubscriptionID=$SubscriptionID" +Write-Output "`$SerializedCert=$SerializedCert" +Write-Output "`$Endpoint=$Endpoint" + +. .\CommonFunctions.ps1 +. .\Database\DeleteDatabase-ScenarioFunctions.ps1 + +Try +{ + Init-TestEnvironment + $database = $null + + # Delete with Sql Auth + try + { + $context = Get-ServerContextByManageUrlWithSqlAuth -ManageUrl $ManageUrl ` + -UserName $UserName -Password $Password + + Scenerio1-DeleteByName -Context $context + + Scenerio2-DeleteByObject -Context $context + } + finally + { + # Drop Database + Drop-Databases $Context $Name + } + + + # Delete with Cert Auth + try + { + Init-AzureSubscription $SubscriptionId $SerializedCert $Endpoint + $sub = Get-AzureSubscription -Current + + $context = Get-ServerContextByServerNameWithCertAuth $ServerName + + Scenerio1-DeleteByName -Context $context + + Scenerio2-DeleteByObject -Context $context + } + finally + { + # Drop Database + Drop-Databases $Context $Name + Remove-AzureSubscription $sub.SubscriptionName -Force + } + + # Delete with Cert Auth With Server Name + try + { + Init-AzureSubscription $SubscriptionId $SerializedCert $Endpoint + $sub = Get-AzureSubscription -Current + + Scenerio1-DeleteByName -ServerName $ServerName + + Scenerio2-DeleteByObject -ServerName $ServerName + } + finally + { + # Drop Database + Drop-Databases $Context $Name + Remove-AzureSubscription $sub.SubscriptionName -Force + } + + + $IsTestPass = $True +} +Finally +{ + # Drop Database + Drop-Databases $Context $Name +} +Write-TestResult $IsTestPass diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/ExpectedFormat.txt b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/ExpectedFormat.txt new file mode 100644 index 000000000000..a7d327abff7d --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/ExpectedFormat.txt @@ -0,0 +1,32 @@ +##### +ServerDataServiceSqlAuth + + +ServerName : +SessionActivityId : +ClientSessionId : +ClientRequestId : +Databases : + + + +Database + +Name CollationName Edition MaxSizeGB ServiceObjectiveName ServiceObjectiveAssignmentStateDescription CreationDate +---- ------------- ------- --------- -------------------- ------------------------------------------ ------------ +testFormatdbfromcmdlet SQL_Latin1_General_CP1_CI_AS Web 1 Shared Complete + + + + + +Name : testFormatdbfromcmdlet +CollationName : SQL_Latin1_General_CP1_CI_AS +Edition : Web +MaxSizeGB : 1 +ServiceObjectiveName : Shared +ServiceObjectiveAssignmentStateDescription : Complete +CreationDate : + + + diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/ExportTests.ps1 b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/ExportTests.ps1 new file mode 100644 index 000000000000..665ceb6e2205 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/ExportTests.ps1 @@ -0,0 +1,62 @@ +# ---------------------------------------------------------------------------------- +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +function TestExportWithRequestObject +{ + #################################################### + # Export Database + + $status = $null + + ########### + # Test the first parameter set + + $BlobName = $DatabaseName1 + ".bacpac" + Write-Output "Exporting to Blob: $BlobName" + + $Request = Start-AzureSqlDatabaseExport -SqlConnectionContext $context -StorageContainer $container ` + -DatabaseName $DatabaseName1 -BlobName $BlobName + Assert {$Request} "Failed to initiate the first export operation" + $id = ($Request.RequestGuid) + Write-Output "Request Id for export1: $id" + + ############## + # Test Get IE status with request object + + GetOperationStatus $Request + + $blob = Get-AzureStorageBlob -Context $StgCtx -Container $container.Name -Blob $BlobName2 + Assert {$blob} "A blob was not created as a result of the export operation" +} + +function TestExportWithRequestId +{ + ########### + # Test the second parameter set + + $BlobName2 = $DatabaseName2 + ".bacpac" + Write-Output "Exporting to Blob: $BlobName2" + + $Request2 = Start-AzureSqlDatabaseExport -SqlConnectionContext $context -StorageContext $StgCtx ` + -StorageContainerName $ContainerName -DatabaseName $DatabaseName2 -BlobName $BlobName2 + Assert {$Request2} "Failed to initiate the second export operation" + $id = ($Request2.RequestGuid) + Write-Output "Request Id for export2: $id" + + ############## + # Test Get IE status with request id, server name, and login credentials + GetOperationStatusWithRequestId $Request2.RequestGuid $server.ServerName $Username $Password + + $blob = Get-AzureStorageBlob -Context $StgCtx -Container $container.Name -Blob $BlobName2 + Assert {$blob} "A blob was not created as a result of the export operation" +} \ No newline at end of file diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/FormatValidation.ps1 b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/FormatValidation.ps1 new file mode 100644 index 000000000000..439a656f64e1 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/FormatValidation.ps1 @@ -0,0 +1,102 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +[CmdletBinding()] +Param +( + [Parameter(Mandatory=$true, Position=0)] + [ValidateNotNullOrEmpty()] + [string] + $Name, + [Parameter(Mandatory=$true, Position=1)] + [ValidateNotNullOrEmpty()] + [string] + $ManageUrl, + [Parameter(Mandatory=$true, Position=2)] + [ValidateNotNullOrEmpty()] + [string] + $UserName, + [Parameter(Mandatory=$true, Position=3)] + [ValidateNotNullOrEmpty()] + [string] + $Password, + [Parameter(Mandatory=$true, Position=4)] + [ValidateNotNullOrEmpty()] + [String] + $OutputFile +) + +$IsTestPass = $False + +Write-Output "`$Name=$Name" +Write-Output "`$ManageUrl=$ManageUrl" +Write-Output "`$UserName=$UserName" +Write-Output "`$Password=$Password" +Write-Output "`$OutputFile=$OutputFile" +. .\CommonFunctions.ps1 + + +Try +{ + Init-TestEnvironment + $context = Get-ServerContextByManageUrlWithSqlAuth -ManageUrl $ManageUrl -UserName $UserName -Password $Password + $database = New-AzureSqlDatabase -Context $context -DatabaseName $Name + + $databases = $null + $count=0; + foreach($db in $context.Databases | select name) + { + $count=$count+1; + #format appends ... if the databases exceeds 4 + if($count -gt 4) + { + $databases = $databases + "..." + break + } + if($databases) + { + $databases = $databases + ", " + $db.Name + } + else + { + $databases = $db.Name + } + } + $databases = "{" + $databases + "}" + + # write the dynamic content in comma separated line + "$($context.ServerName)#$($context.SessionActivityId)#$($context.ClientSessionId)#$($context.ClientRequestId)#$databases#$($($database.CreationDate).ToString())" > $OutputFile + + + # write output object to output file + $context.GetType().Name >> $OutputFile + $context | fl >> $OutputFile + + $database.GetType().Name >> $OutputFile + $Database | ft -AutoSize | Out-String -Width 160 >> $OutputFile + $database | fl >> $OutputFile + + $isTestPass = $True +} +Finally +{ + if($database) + { + # Drop Database + Drop-Databases $Context $Name + } +} + +Write-TestResult $IsTestPass + diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/ImportExportDatabase.ps1 b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/ImportExportDatabase.ps1 new file mode 100644 index 000000000000..2b0d372c191b --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/ImportExportDatabase.ps1 @@ -0,0 +1,250 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +[CmdletBinding()] +Param +( + [Parameter(Mandatory=$true, Position=0)] + [ValidateNotNullOrEmpty()] + [string] + $UserName, + [Parameter(Mandatory=$true, Position=1)] + [ValidateNotNullOrEmpty()] + [string] + $Password, + [Parameter(Mandatory=$true, Position=2)] + [ValidateNotNullOrEmpty()] + [string] + $SubscriptionId, + [Parameter(Mandatory=$true, Position=3)] + [ValidateNotNullOrEmpty()] + [string] + $SerializedCert, + [Parameter(Mandatory=$true, Position=4)] + [ValidateNotNullOrEmpty()] + [Uri] + $ContainerName, + [Parameter(Mandatory=$true, Position=4)] + [ValidateNotNullOrEmpty()] + [Uri] + $StorageName, + [Parameter(Mandatory=$true, Position=5)] + [ValidateNotNullOrEmpty()] + [string] + $StorageAccessKey, + [Parameter(Mandatory=$true, Position=6)] + [ValidateNotNullOrEmpty()] + [String] + $ServerLocation +) + +$IsTestPass = $False + +Write-Output "`$UserName=$UserName" +Write-Output "`$Password=$Password" +Write-Output "`$SubscriptionId=$SubscriptionId" +Write-Output "`$SerializedCert=$SerializedCert" +Write-Output "`$ContainerName=$ContainerName" +Write-Output "`$StorageAccessKey=$StorageAccessKey" +Write-Output "`$ServerLocation=$ServerLocation" + + +. .\CommonFunctions.ps1 +. .\Database\ExportTests.ps1 +. .\Database\ImportTests.ps1 + +$ManageUrlPrefix = "https://" +$ManageUrlPostfix = ".database.windows.net/" +$DatabaseNamePrefix = "testIEDatabase" +$BlobName = $null +$BlobName2 = $null + +function GetOperationStatus +{ + [CmdletBinding()] + Param + ( + [Parameter(Mandatory=$true, Position=0)] + [ValidateNotNullOrEmpty()] + [Microsoft.WindowsAzure.Commands.SqlDatabase.Services.ImportExport.ImportExportRequest] + $Request + ) + ############## + # Test Get IE status with request object + do + { + Start-Sleep -m 1500 + $status = Get-AzureSqlDatabaseImportExportStatus $Request + Write-Output "Request Status: $($status.Status)" + if($status.Status -eq "Failed") + { + Write-Output "Error message: $($status.ErrorMessage)" + break + } + } while($status.Status -ne "Completed") +} + +function GetOperationStatusWithRequestId +{ + [CmdletBinding()] + Param + ( + [Parameter(Mandatory=$true, Position=0)] + [ValidateNotNullOrEmpty()] + [string] + $RequestId, + [Parameter(Mandatory=$true, Position=1)] + [ValidateNotNullOrEmpty()] + [string] + $ServerName, + [Parameter(Mandatory=$true, Position=2)] + [ValidateNotNullOrEmpty()] + [string] + $UserName, + [Parameter(Mandatory=$true, Position=3)] + [ValidateNotNullOrEmpty()] + [string] + $Password + ) + ############## + # Test Get IE status with request id, servername, and login credentials + do + { + Start-Sleep -m 1500 + $status = Get-AzureSqlDatabaseImportExportStatus -RequestId $RequestId ` + -ServerName $ServerName -UserName $UserName -Password $Password + + Write-Output "Request Status: $($status.Status)" + if($status.Status -eq "Failed") + { + Write-Output "Error message: $($status.ErrorMessage)" + break + } + } while($status.Status -ne "Completed") +} + +Try +{ + #################################################### + # Set up test + Init-TestEnvironment + Init-AzureSubscription -SubscriptionID $SubscriptionId -SerializedCert $SerializedCert + + ########## + # create a server to use + Write-Output "Creating server... " + $server = New-AzureSqlDatabaseServer -AdministratorLogin $UserName -AdministratorLoginPassword ` + $Password -Location $ServerLocation + Assert {$server} "Failed to create a server" + Write-Output "Server $($server.ServerName) created" + + ########## + # set the firewall rules + Write-Output "Creating server firewall rule... " + New-AzureSqlDatabaseServerFirewallRule -ServerName $server.ServerName -RuleName "AllowAll" ` + -StartIpAddress "0.0.0.0" -EndIpAddress "255.255.255.255" + + ########## + # create a context to connect to the server. + Write-Output "Creating server connection context... " + $ManageUrl = $ManageUrlPrefix + $server.ServerName + $ManageUrlPostfix + $context = Get-ServerContextByManageUrlWithSqlAuth -ManageUrl $ManageUrl -UserName $UserName ` + -Password $Password + Assert {$context} "Failed to create the connection context..." + + ########## + # Create a couple databases + $DatabaseName1 = $DatabaseNamePrefix + (get-date).Ticks + + Write-Output "Creating Database $DatabaseName1 ..." + $database = New-AzureSqlDatabase -Context $context -DatabaseName $DatabaseName1 -Edition "Web" -MaxSizeGb 1 + Assert {$database} "Failed to create a database" + Write-Output "Done" + + $DatabaseName2 = $DatabaseNamePrefix + "2" + (get-date).Ticks + + Write-Output "Creating Database $DatabaseName2 ..." + $database2 = New-AzureSqlDatabase -Context $context -DatabaseName $DatabaseName2 -Edition "Web" -MaxSizeGb 1 + Assert {$database2} "Failed to create a database" + Write-Output "Done" + + ########## + # Create the storage connection context. + $StgCtx = New-AzureStorageContext -StorageAccountName $StorageName -StorageAccountKey $StorageAccessKey + $container = Get-AzureStorageContainer -Name $ContainerName -Context $StgCtx + + #################################################### + # Test export and get-export status + try + { + TestExportWithRequestObject + + TestExportWithRequestId + } + finally + { + Drop-Databases $context $DatabaseNamePrefix + } + + #################################################### + # Import Database + $BlobName = $DatabaseName + ".bacpac" + $BlobUri = BlobContainerUri + $BlobName + $NewDatabaseName = $DatabaseNamePrefix + "2" + + #################################################### + # test import and get-import status + try + { + TestImportWithRequestObject + + TestImportWithRequestId + + TestImportWithRequestObjectAndOptionalParameters + } + finally + { + Drop-Databases $context $DatabaseNamePrefix + } + + $requestId = Import-AzureSqlDatabase -UserName $UserName -Password $Password -ServerName ` + $server.ServerName -DatabaseName $NewDatabaseName -Edition Web -MaxSizeGb 1 -BlobUri $BlobUri ` + -StorageKey $StorageAccessKey + + Assert {$requestId} "Failed to initiate the import opertaion" + Write-Output "Request Id for import: " + $requestId + + $IsTestPass = $True +} +Finally +{ + if($server) + { + Drop-Server $server + } + + if($StgCtx) + { + if($BlobName) + { + Remove-AzureStorageBlob -Container $ContainerName -Blob $BlobName -Context $StgCtx + } + if($BlobName2) + { + Remove-AzureStorageBlob -Container $ContainerName -Blob $BlobName2 -Context $StgCtx + } + } +} + +Write-TestResult $IsTestPass diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/ImportTests.ps1 b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/ImportTests.ps1 new file mode 100644 index 000000000000..a50dab7addde --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/ImportTests.ps1 @@ -0,0 +1,120 @@ +# ---------------------------------------------------------------------------------- +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +function TestImportWithRequestObject +{ + #################################################### + # Import Database + + $status = $null + + ########### + # Test the first parameter set + + $BlobName = $DatabaseName1 + ".bacpac" + $dbName = $DatabaseName1 + "-import1" + Write-Output "Importing from Blob: $BlobName" + + $Request = Start-AzureSqlDatabaseImport -SqlConnectionContext $context -StorageContainer $container ` + -DatabaseName $dbName -BlobName $BlobName + Assert {$Request} "Failed to initiate the first import opertaion" + $id = ($Request.RequestGuid) + Write-Output "Request Id for import1: $id" + + GetOperationStatus $Request + + # Make sure that the database was indeed imported + $importedDatabase = Get-AzureSqlDatabase -ConnectionContext $context -DatabaseName $dbName + Assert {$importedDatabase} "The database was not properly imported" +} + +function TestImportCommandHelper +{ + [CmdletBinding()] + Param + ( + [Parameter(Mandatory=$true, Position=0)] + [ValidateNotNullOrEmpty()] + [scriptblock] + $Command + ) + + $Request = & $Command + $Request = $Request[0] + + Assert {$Request} "Failed to initiate the import operation" + $id = ($Request.RequestGuid) + Write-Output "Request Id for import: $id" + + GetOperationStatus $Request + + # Make sure that the database was indeed imported + $importedDatabase = Get-AzureSqlDatabase -ConnectionContext $context -DatabaseName $dbName + Assert {$importedDatabase} "The database was not properly imported" +} + +function TestImportWithRequestObjectAndOptionalParameters +{ + #################################################### + # Import Database + $status = $null + + ########### + # Test Import with optional parameters + + $BlobName = $DatabaseName1 + ".bacpac" + Write-Output "Importing from Blob: $BlobName" + + Write-Output "Running test for import with optional edition parameter" + $dbName = $DatabaseName1 + "Options-edition" + Write-Output "Database name: $dbName" + TestImportCommandHelper ` + { Start-AzureSqlDatabaseImport -SqlConnectionContext $context -StorageContainer $container ` + -DatabaseName $dbName -BlobName $BlobName -Edition "Business" } + + Write-Output "Running test for import with optional size parameter" + $dbName = $DatabaseName1 + "Options-size" + Write-Output "Database name: $dbName" + TestImportCommandHelper ` + { Start-AzureSqlDatabaseImport -SqlConnectionContext $context -StorageContainer $container ` + -DatabaseName $dbName -BlobName $BlobName -DatabaseMaxSize 5 } + + Write-Output "Running test for import with optional edition and size parameter" + $dbName = $DatabaseName1 + "Options-edition" + Write-Output "Database name: $dbName" + TestImportCommandHelper ` + { Start-AzureSqlDatabaseImport -SqlConnectionContext $context -StorageContainer $container ` + -DatabaseName $dbName -BlobName $BlobName -Edition "Business" -DatabaseMaxSize 20 } +} + +function TestImportWithRequestId +{ + ########### + # Test the second parameter set + + $BlobName2 = $DatabaseName2 + ".bacpac" + $dbName = $DatabaseName2 + "-import3" + Write-Output "Importing from Blob: $BlobName2" + + $Request = Start-AzureSqlDatabaseImport -SqlConnectionContext $context -StorageContext $StgCtx ` + -StorageContainerName $ContainerName -DatabaseName $dbName -BlobName $BlobName2 + Assert {$Request} "Failed to initiate the third import opertaion" + $id = ($Request.RequestGuid) + Write-Output "Request Id for Import: $id" + + GetOperationStatusWithRequestId $Request.RequestGuid $server.ServerName $Username $Password + + # Make sure that the database was indeed imported + $importedDatabase = Get-AzureSqlDatabase -ConnectionContext $context -DatabaseName $dbName + Assert {$importedDatabase} "The database was not properly imported" +} \ No newline at end of file diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/UpdateDatabase-ScenarioFunctions.ps1 b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/UpdateDatabase-ScenarioFunctions.ps1 new file mode 100644 index 000000000000..8a17e5807c0d --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/UpdateDatabase-ScenarioFunctions.ps1 @@ -0,0 +1,165 @@ +# ---------------------------------------------------------------------------------- +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http:#www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +function Scenario1-UpdateWithObject +{ + [CmdletBinding()] + param + ( + [Parameter(Mandatory=$false, Position=0)] + [ValidateNotNullOrEmpty()] + [Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.IServerDataServiceContext] + $Context, + + [Parameter(Mandatory=$false, Position=1)] + [ValidateNotNullOrEmpty()] + [String] + $ServerName + ) + + $edition = "Business" + $maxSizeGB = "10" + + Write-Output "Starting Test Scenario 1" + + if($Context) + { + Write-Output "Updating Database $Name edition to $edition and maxSizeGB to $maxSizeGB ..." + Set-AzureSqlDatabase $context $database -Edition $edition -MaxSizeGB $maxSizeGB -Force + Write-Output "Done" + + $updatedDatabase = Get-AzureSqlDatabase $context -DatabaseName $database.Name + Validate-SqlDatabase -Actual $updatedDatabase -ExpectedName $database.Name -ExpectedCollationName ` + $database.CollationName -ExpectedEdition $edition -ExpectedMaxSizeGB $maxSizeGB -ExpectedIsReadOnly ` + $database.IsReadOnly -ExpectedIsFederationRoot $database.IsFederationRoot -ExpectedIsSystemObject ` + $database.IsSystemObject "S1-Context $context" + } + elseif ($serverName) + { + Write-Output "Updating Database $Name edition to $edition and maxSizeGB to $maxSizeGB ..." + Set-AzureSqlDatabase -ServerName $ServerName $database -Edition $edition -MaxSizeGB $maxSizeGB -Force + Write-Output "Done" + + $updatedDatabase = Get-AzureSqlDatabase -ServerName $ServerName -DatabaseName $database.Name + Validate-SqlDatabase -Actual $updatedDatabase -ExpectedName $database.Name -ExpectedCollationName ` + $database.CollationName -ExpectedEdition $edition -ExpectedMaxSizeGB $maxSizeGB -ExpectedIsReadOnly ` + $database.IsReadOnly -ExpectedIsFederationRoot $database.IsFederationRoot -ExpectedIsSystemObject ` + $database.IsSystemObject "S1-ServerName" + } +} + +function Scenario2-UpdateWithName +{ + [CmdletBinding()] + param + ( + [Parameter(Mandatory=$false, Position=0)] + [ValidateNotNullOrEmpty()] + [Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.IServerDataServiceContext] + $Context, + + [Parameter(Mandatory=$false, Position=1)] + [ValidateNotNullOrEmpty()] + [String] + $ServerName + ) + + $edition = "Web" + $maxSizeGB = "5" + + Write-Output "Starting Test Scenario 2" + + if($Context) + { + Write-Output "Updating Database $Name edition Back to $edition ..." + Set-AzureSqlDatabase $context $database.Name -Edition $edition -MaxSizeGB $maxSizeGB -Force + Write-Output "Done" + + $updatedDatabase = Get-AzureSqlDatabase $context -Database $database + Validate-SqlDatabase -Actual $updatedDatabase -ExpectedName $database.Name -ExpectedCollationName ` + $database.CollationName -ExpectedEdition $edition -ExpectedMaxSizeGB $maxSizeGB -ExpectedIsReadOnly ` + $database.IsReadOnly -ExpectedIsFederationRoot $database.IsFederationRoot -ExpectedIsSystemObject ` + $database.IsSystemObject "S2-Context $context" + } + elseif ($serverName) + { + Write-Output "Updating Database $Name edition Back to $edition ..." + Set-AzureSqlDatabase -ServerName $ServerName $database.Name -Edition $edition -MaxSizeGB $maxSizeGB -Force + Write-Output "Done" + + $updatedDatabase = Get-AzureSqlDatabase -ServerName $ServerName -Database $database + Validate-SqlDatabase -Actual $updatedDatabase -ExpectedName $database.Name -ExpectedCollationName ` + $database.CollationName -ExpectedEdition $edition -ExpectedMaxSizeGB $maxSizeGB -ExpectedIsReadOnly ` + $database.IsReadOnly -ExpectedIsFederationRoot $database.IsFederationRoot -ExpectedIsSystemObject ` + $database.IsSystemObject "S2-ServerName" + } +} + +function Scenario3-RenameDatabase +{ + [CmdletBinding()] + param + ( + [Parameter(Mandatory=$false, Position=0)] + [ValidateNotNullOrEmpty()] + [Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.IServerDataServiceContext] + $Context, + + [Parameter(Mandatory=$false, Position=1)] + [ValidateNotNullOrEmpty()] + [String] + $ServerName + ) + + Write-Output "Starting Test Scenario 3" + + $NewName = $Name + "-updated" + + if($Context) + { + Write-Output "Renaming a database from $Name to $NewName..." + $updatedDatabase = Set-AzureSqlDatabase $context $database -NewName $NewName -PassThru -Force + Write-Output "Done" + + Validate-SqlDatabase -Actual $updatedDatabase -ExpectedName $NewName -ExpectedCollationName ` + $database.CollationName -ExpectedEdition $database.Edition -ExpectedMaxSizeGB $database.MaxSizeGB ` + -ExpectedIsReadOnly $database.IsReadOnly -ExpectedIsFederationRoot $database.IsFederationRoot ` + -ExpectedIsSystemObject $database.IsSystemObject "S3-Context-1 $context" + + $updatedDatabase = Get-AzureSqlDatabase $context -DatabaseName $NewName + Validate-SqlDatabase -Actual $updatedDatabase -ExpectedName $NewName -ExpectedCollationName ` + $database.CollationName -ExpectedEdition $database.Edition -ExpectedMaxSizeGB $database.MaxSizeGB ` + -ExpectedIsReadOnly $database.IsReadOnly -ExpectedIsFederationRoot $database.IsFederationRoot ` + -ExpectedIsSystemObject $database.IsSystemObject "S3-Context-2 $context" + + $database = Get-AzureSqlDatabase $context | Where-Object {$_.Name -eq $Name} + Assert {!$getDroppedDatabase} "Database is not Renamed" + } + elseif ($serverName) + { + Write-Output "Renaming a database from $Name to $NewName..." + $updatedDatabase = Set-AzureSqlDatabase -ServerName $ServerName $database -NewName $NewName -PassThru -Force + Write-Output "Done" + + Validate-SqlDatabase -Actual $updatedDatabase -ExpectedName $NewName -ExpectedCollationName ` + $database.CollationName -ExpectedEdition $database.Edition -ExpectedMaxSizeGB $database.MaxSizeGB ` + -ExpectedIsReadOnly $database.IsReadOnly -ExpectedIsFederationRoot $database.IsFederationRoot ` + -ExpectedIsSystemObject $database.IsSystemObject "S3-ServerName-1" + + $updatedDatabase = Get-AzureSqlDatabase -ServerName $ServerName -DatabaseName $NewName + Validate-SqlDatabase -Actual $updatedDatabase -ExpectedName $NewName -ExpectedCollationName ` + $database.CollationName -ExpectedEdition $database.Edition -ExpectedMaxSizeGB $database.MaxSizeGB ` + -ExpectedIsReadOnly $database.IsReadOnly -ExpectedIsFederationRoot $database.IsFederationRoot ` + -ExpectedIsSystemObject $database.IsSystemObject "S3-ServerName-2" + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/UpdateDatabase.ps1 b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/UpdateDatabase.ps1 new file mode 100644 index 000000000000..17ae8589e049 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Database/UpdateDatabase.ps1 @@ -0,0 +1,141 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +[CmdletBinding()] +Param +( + [Parameter(Mandatory=$true, Position=0)] + [ValidateNotNullOrEmpty()] + [string] + $Name, + [Parameter(Mandatory=$true, Position=1)] + [ValidateNotNullOrEmpty()] + [string] + $ManageUrl, + [Parameter(Mandatory=$true, Position=2)] + [ValidateNotNullOrEmpty()] + [string] + $UserName, + [Parameter(Mandatory=$true, Position=3)] + [ValidateNotNullOrEmpty()] + [string] + $Password, + [Parameter(Mandatory=$true, Position=1)] + [ValidateNotNullOrEmpty()] + [string] + $ServerName, + [Parameter(Mandatory=$true, Position=2)] + [ValidateNotNullOrEmpty()] + [string] + $SubscriptionID, + [Parameter(Mandatory=$true, Position=3)] + [ValidateNotNullOrEmpty()] + [string] + $SerializedCert, + [Parameter(Mandatory=$true, Position=4)] + [ValidateNotNullOrEmpty()] + [string] + $Endpoint +) + +$IsTestPass = $False +Write-Output "`$Name=$Name" +Write-Output "`$ManageUrl=$ManageUrl" +Write-Output "`$UserName=$UserName" +Write-Output "`$Password=$Password" +Write-Output "`$ServerName=$ServerName" +Write-Output "`$SubscriptionID=$SubscriptionID" +Write-Output "`$SerializedCert=$SerializedCert" +Write-Output "`$Endpoint=$Endpoint" + +. .\CommonFunctions.ps1 +. .\Database\UpdateDatabase-ScenarioFunctions.ps1 + +Try +{ + Init-TestEnvironment + + # Update with Sql Auth + try + { + $context = Get-ServerContextByManageUrlWithSqlAuth -ManageUrl $ManageUrl -UserName $UserName ` + -Password $Password + + $database = New-AzureSqlDatabase -Context $context -DatabaseName $Name + + Scenario1-UpdateWithObject -Context $context + + Scenario2-UpdateWithName -Context $context + + Scenario3-RenameDatabase -Context $context + } + finally + { + # Drop Database + Drop-Databases $Context $Name + $context = $null + } + + # Update with Cert Auth + try + { + + Init-AzureSubscription $SubscriptionId $SerializedCert $Endpoint + $sub = Get-AzureSubscription -Current + $context = Get-ServerContextByServerNameWithCertAuth $ServerName + + $database = New-AzureSqlDatabase -Context $context -DatabaseName $Name + + Scenario1-UpdateWithObject -Context $context + + Scenario2-UpdateWithName -Context $context + + Scenario3-RenameDatabase -Context $context + } + finally + { + # Drop Database + Drop-Databases $Context $Name + $context = $null + } + + + # Update with Cert Auth with Server Name + try + { + Init-AzureSubscription $SubscriptionId $SerializedCert $Endpoint + $sub = Get-AzureSubscription -Current + + $database = New-AzureSqlDatabase -ServerName $ServerName -DatabaseName $Name + + Scenario1-UpdateWithObject -ServerName $ServerName + + Scenario2-UpdateWithName -ServerName $ServerName + + Scenario3-RenameDatabase -ServerName $ServerName + } + finally + { + # Drop Database + Drop-DatabasesWithServerName $ServerName $Name + Remove-AzureSubscription $sub.SubscriptionName -Force + } + + $IsTestPass = $True +} +finally +{ +} + +Write-TestResult $IsTestPass diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Server/CreateGetDeleteServer.ps1 b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Server/CreateGetDeleteServer.ps1 new file mode 100644 index 000000000000..39736cd1457f --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Server/CreateGetDeleteServer.ps1 @@ -0,0 +1,80 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +[CmdletBinding()] +Param +( + [Parameter(Mandatory=$true, Position=0)] + [ValidateNotNullOrEmpty()] + [string] + $subscriptionID, + [Parameter(Mandatory=$true, Position=1)] + [ValidateNotNullOrEmpty()] + [String] + $SerializedCert, + [Parameter(Mandatory=$true, Position=2)] + [ValidateNotNullOrEmpty()] + [String] + $serverLocation, + [Parameter(Mandatory=$true, Position=3)] + [ValidateNotNullOrEmpty()] + [String] + $Endpoint +) + +Write-Output "`$subscriptionID=$subscriptionID" +Write-Output "`$SerializedCert=$SerializedCert" +Write-Output "`$serverLocation=$serverLocation" +Write-Output "`$Endpoint=$Endpoint" + +. .\CommonFunctions.ps1 + +Try +{ + Init-TestEnvironment + Init-AzureSubscription $subscriptionID $SerializedCert $Endpoint + $loginName="mylogin1" + $loginPassword="Sql@zure1" + $isTestPass = $False + + # Create Server + Write-Output "Creating server" + $server = New-AzureSqlDatabaseServer -AdministratorLogin $loginName -AdministratorLoginPassword $loginPassword -Location $serverLocation + Validate-SqlDatabaseServerOperationContext -Actual $server -expectedServerName $server.ServerName -expectedOperationDescription "New-AzureSqlDatabaseServer" + Write-Output "Server $($server.ServerName) created" + + # Get Server + Write-Output "Getting server" + $getServer = Get-AzureSqlDatabaseServer | Where-Object {$_.ServerName -eq $server.ServerName} + Assert {$getServer} "Can not get server $($server.ServerName)" + Validate-SqlDatabaseServerContext -Actual $getServer -ExpectedAdministratorLogin $loginName -ExpectedLocation $serverLocation -ExpectedServerName $server.ServerName -ExpectedOperationDescription "Get-AzureSqlDatabaseServer" + Write-Output "Got server $($server.ServerName)" + + $isTestPass = $True +} +Finally +{ + if($server) + { + # Drop server + Drop-Server $server + + #Validate Drop server + Write-Output 'Validating drop' + $getDroppedServer = Get-AzureSqlDatabaseServer | Where-Object {$_.ServerName -eq $server.ServerName} + Assert {!$getDroppedServer} "Server is not dropped" + Write-Output "Validation successful" + } + Write-TestResult $IsTestPass +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Server/CreateGetDropFirewall.ps1 b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Server/CreateGetDropFirewall.ps1 new file mode 100644 index 000000000000..aff3a65ce57c --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Server/CreateGetDropFirewall.ps1 @@ -0,0 +1,166 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +[CmdletBinding()] +Param +( + [Parameter(Mandatory=$true, Position=0)] + [ValidateNotNullOrEmpty()] + [string] + $subscriptionID, + [Parameter(Mandatory=$true, Position=1)] + [ValidateNotNullOrEmpty()] + [String] + $SerializedCert, + [Parameter(Mandatory=$true, Position=2)] + [ValidateNotNullOrEmpty()] + [String] + $serverLocation, + [Parameter(Mandatory=$true, Position=4)] + [ValidateNotNullOrEmpty()] + [string] + $Endpoint +) + +Write-Output "`$subscriptionID=$subscriptionID" +Write-Output "`$SerializedCert=$SerializedCert" +Write-Output "`$serverLocation=$serverLocation" +Write-Output "`$Endpoint=$Endpoint" + +. .\CommonFunctions.ps1 + +Try +{ + Init-TestEnvironment + Init-AzureSubscription -SubscriptionID $subscriptionID -SerializedCert $SerializedCert $Endpoint + $isTestPass = $False + + # Create Server + $loginName="mylogin1" + $loginPassword="Sql@zure1" + Write-Output "Creating server" + $server = New-AzureSqlDatabaseServer -AdministratorLogin $loginName -AdministratorLoginPassword ` + $loginPassword -Location $serverLocation + Assert {$server} "Server is not created" + Write-Output "Server $($server.ServerName) created" + + ################################################################## + # Create three Firewall rules + $rule1Name="rule1" + $rule1StartIP="1.0.0.0" + $rule1EndIP="2.0.0.0" + Write-Output "Creating Firewall rule $rule1Name ..." + $rule = New-AzureSqlDatabaseServerFirewallRule -ServerName $server.ServerName -RuleName $rule1Name ` + -StartIpAddress $rule1StartIP -EndIpAddress $rule1EndIP + Validate-SqlDatabaseServerFirewallRuleContext -Actual $rule -ExpectedRuleName $rule1Name ` + -ExpectedStartIpAddress $rule1StartIP -ExpectedEndIpAddress $rule1EndIP -ExpectedServerName ` + $server.ServerName -ExpectedOperationDescription "New-AzureSqlDatabaseServerFirewallRule" + Write-Output "created" + + $rule2Name="rule2" + $rule2StartIP="2.3.4.5" + $rule2EndIP="3.4.5.6" + Write-Output "Creating Firewall rule $rule2Name ..." + $rule = New-AzureSqlDatabaseServerFirewallRule -ServerName $server.ServerName -RuleName $rule2Name -StartIpAddress $rule2StartIP -EndIpAddress $rule2EndIP + Write-Output "created" + Validate-SqlDatabaseServerFirewallRuleContext -Actual $rule -ExpectedRuleName $rule2Name -ExpectedStartIpAddress $rule2StartIP -ExpectedEndIpAddress $rule2EndIP -ExpectedServerName $server.ServerName -ExpectedOperationDescription "New-AzureSqlDatabaseServerFirewallRule" + + #allow all azure subscriptions + $rule3Name="rule3" + $rule3StartIP="0.0.0.0" + $rule3EndIP="0.0.0.0" + Write-Output "Creating Firewall rule $rule3Name ..." + $rule = New-AzureSqlDatabaseServerFirewallRule -ServerName $server.ServerName -RuleName ` + $rule3Name -AllowAllAzureServices + Write-Output "created" + Validate-SqlDatabaseServerFirewallRuleContext -Actual $rule -ExpectedRuleName $rule3Name ` + -ExpectedStartIpAddress $rule3StartIP -ExpectedEndIpAddress $rule3EndIP -ExpectedServerName ` + $server.ServerName -ExpectedOperationDescription "New-AzureSqlDatabaseServerFirewallRule" + + + #allow all azure subscriptions with default rule name + $rule4Name="AllowAllAzureServices" + $rule4StartIP="0.0.0.0" + $rule4EndIP="0.0.0.0" + Write-Output "Creating Firewall rule $rule4Name ..." + $rule = New-AzureSqlDatabaseServerFirewallRule -ServerName $server.ServerName -AllowAllAzureServices + Write-Output "created" + Validate-SqlDatabaseServerFirewallRuleContext -Actual $rule -ExpectedRuleName $rule4Name ` + -ExpectedStartIpAddress $rule4StartIP -ExpectedEndIpAddress $rule4EndIP -ExpectedServerName ` + $server.ServerName -ExpectedOperationDescription "New-AzureSqlDatabaseServerFirewallRule" + + ################################################################## + # Get Firewall rules and validate + Write-Output "Getting firewall rules..." + $rules = Get-AzureSqlDatabaseServerFirewallRule -ServerName $server.ServerName + Write-Output "Got firewall rules" + Assert {$rules} "Get firewall rule didn't return any rule" + Assert {$rules.Count -eq 4} "Get firewall rule didn't return expected number of rules 4. But returned $rule.Count" + + Write-Output "validating Firewall rule $rule1Name ..." + $rule = $rules | Where-Object {$_.RuleName -eq $rule1Name} + Validate-SqlDatabaseServerFirewallRuleContext -Actual $rule -ExpectedRuleName $rule1Name ` + -ExpectedStartIpAddress $rule1StartIP -ExpectedEndIpAddress $rule1EndIP -ExpectedServerName ` + $server.ServerName -ExpectedOperationDescription "Get-AzureSqlDatabaseServerFirewallRule" + + Write-Output "validating Firewall rule $rule2Name ..." + $rule = $rules | Where-Object {$_.RuleName -eq $rule2Name} + Validate-SqlDatabaseServerFirewallRuleContext -Actual $rule -ExpectedRuleName $rule2Name ` + -ExpectedStartIpAddress $rule2StartIP -ExpectedEndIpAddress $rule2EndIP -ExpectedServerName ` + $server.ServerName -ExpectedOperationDescription "Get-AzureSqlDatabaseServerFirewallRule" + + Write-Output "validating Firewall rule $rule3Name ..." + $rule = $rules | Where-Object {$_.RuleName -eq $rule3Name} + Validate-SqlDatabaseServerFirewallRuleContext -Actual $rule -ExpectedRuleName $rule3Name ` + -ExpectedStartIpAddress $rule3StartIP -ExpectedEndIpAddress $rule3EndIP -ExpectedServerName ` + $server.ServerName -ExpectedOperationDescription "Get-AzureSqlDatabaseServerFirewallRule" + + Write-Output "validating Firewall rule $rule4Name ..." + $rule = $rules | Where-Object {$_.RuleName -eq $rule4Name} + Validate-SqlDatabaseServerFirewallRuleContext -Actual $rule -ExpectedRuleName $rule4Name ` + -ExpectedStartIpAddress $rule4StartIP -ExpectedEndIpAddress $rule4EndIP -ExpectedServerName ` + $server.ServerName -ExpectedOperationDescription "Get-AzureSqlDatabaseServerFirewallRule" + + ################################################################## + # Update a firewall rule and validate. + $rule1StartIP = "255.255.255.254" + $rule1EndIP="255.255.255.255" + Write-Output "Updating Firewall rule $rule1Name ..." + $rule = Set-AzureSqlDatabaseServerFirewallRule $server.ServerName -RuleName $rule1Name -StartIpAddress $rule1StartIP -EndIpAddress $rule1EndIP + Validate-SqlDatabaseServerFirewallRuleContext -Actual $rule -ExpectedRuleName $rule1Name -ExpectedStartIpAddress $rule1StartIP -ExpectedEndIpAddress $rule1EndIP -ExpectedServerName $server.ServerName -ExpectedOperationDescription "Set-AzureSqlDatabaseServerFirewallRule" + Write-Output "updated" + + Write-Output "Getting firewall rules..." + $rules = Get-AzureSqlDatabaseServerFirewallRule -ServerName $server.ServerName + Write-Output "Got firewall rules" + Write-Output "validating Firewall rule $rule1Name ..." + $rule = $rules | Where-Object {$_.RuleName -eq $rule1Name} + Validate-SqlDatabaseServerFirewallRuleContext -Actual $rule -ExpectedRuleName $rule1Name -ExpectedStartIpAddress $rule1StartIP -ExpectedEndIpAddress $rule1EndIP -ExpectedServerName $server.ServerName -ExpectedOperationDescription "Get-AzureSqlDatabaseServerFirewallRule" + + ################################################################## + # Delete a Firewall rules + Write-Output "Deleting firewall rule $rule1Name ..." + Remove-AzureSqlDatabaseServerFirewallRule -ServerName $server.ServerName -RuleName $rule1Name -Force + Write-Output "Deleted" + $rules = Get-AzureSqlDatabaseServerFirewallRule -ServerName $server.ServerName | Where-Object {$_.RuleName -eq $rule1Name} + Assert {$rules -eq $null} "Firewall rule $rule1Name is not dropped" + + $isTestPass = $True +} +Finally +{ + Drop-Server $server + Write-TestResult $IsTestPass +} + diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Server/ExpectedFormat.txt b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Server/ExpectedFormat.txt new file mode 100644 index 000000000000..bb3611923f90 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Server/ExpectedFormat.txt @@ -0,0 +1,47 @@ +# +SqlDatabaseServerContext + +ServerName Location AdministratorLogin +---------- -------- ------------------ + mylogin1 + + + + +ServerName : +Location : +AdministratorLogin : mylogin1 + + + +SqlDatabaseServerContext + +ServerName Location AdministratorLogin +---------- -------- ------------------ + mylogin1 + + + + +ServerName : +Location : +AdministratorLogin : mylogin1 + + + +SqlDatabaseServerFirewallRuleContext + +RuleName StartIpAddress EndIpAddress ServerName +-------- -------------- ------------ ---------- +test 1.0.0.0 2.0.0.0 + + + + +RuleName : test +StartIpAddress : 1.0.0.0 +EndIpAddress : 2.0.0.0 +ServerName : + + + diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Server/FormatValidation.ps1 b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Server/FormatValidation.ps1 new file mode 100644 index 000000000000..fa5463e49249 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Server/FormatValidation.ps1 @@ -0,0 +1,83 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +[CmdletBinding()] +Param +( + [Parameter(Mandatory=$true, Position=0)] + [ValidateNotNullOrEmpty()] + [string] + $subscriptionID, + [Parameter(Mandatory=$true, Position=1)] + [ValidateNotNullOrEmpty()] + [String] + $SerializedCert, + [Parameter(Mandatory=$true, Position=2)] + [ValidateNotNullOrEmpty()] + [String] + $serverLocation, + [Parameter(Mandatory=$true, Position=3)] + [ValidateNotNullOrEmpty()] + [String] + $OutputFile +) +Write-Output "`$subscriptionID=$subscriptionID" +Write-Output "`$SerializedCert=$SerializedCert" +Write-Output "`$serverLocation=$serverLocation" +Write-Output "`$OutputFile=$OutputFile" + +. .\CommonFunctions.ps1 + +Try +{ + Init-TestEnvironment + Init-AzureSubscription -subscriptionID $subscriptionID -SerializedCert $SerializedCert + $isTestPass = $False + + # Get SqlDatabaseOperationContext format + $SqlDatabaseOperationContext = New-AzureSqlDatabaseServer -AdministratorLogin "mylogin1" ` + -AdministratorLoginPassword "Sql@zure1" -Location $serverLocation + $server = $SqlDatabaseOperationContext + + # Get SqlDatabaseServerContext format + $SqlDatabaseServerContext = Get-AzureSqlDatabaseServer $server.ServerName + + # Get SqlDatabaseFirewallRuleContext format + $SqlDatabaseFirewallRuleContext = New-AzureSqlDatabaseServerFirewallRule $server.ServerName ` + -RuleName "test" -StartIpAddress "1.0.0.0" -EndIpAddress "2.0.0.0" + + # write the dynamic content in comma separated line + "$ServerLocation#$($SqlDatabaseOperationContext.ServerName)" > $OutputFile + + # write output object to output file + $SqlDatabaseOperationContext.GetType().Name >> $OutputFile + $SqlDatabaseOperationContext | ft -Wrap -AutoSize >> $OutputFile + $SqlDatabaseOperationContext | fl >> $OutputFile + + $SqlDatabaseServerContext.GetType().Name >> $OutputFile + $SqlDatabaseServerContext | ft -Wrap -AutoSize >> $OutputFile + $SqlDatabaseServerContext | fl >> $OutputFile + + $SqlDatabaseFirewallRuleContext.GetType().Name >> $OutputFile + $SqlDatabaseFirewallRuleContext | ft -Wrap -AutoSize >> $OutputFile + $SqlDatabaseFirewallRuleContext | fl >> $OutputFile + + $isTestPass = $True +} +Finally +{ + Drop-Server $server + Write-TestResult $IsTestPass +} + diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Server/GetServerQuota.ps1 b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Server/GetServerQuota.ps1 new file mode 100644 index 000000000000..62904e7c80a0 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Server/GetServerQuota.ps1 @@ -0,0 +1,82 @@ +# ---------------------------------------------------------------------------------- +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http:#www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +[CmdletBinding()] +Param +( + [Parameter(Mandatory=$true, Position=0)] + [ValidateNotNullOrEmpty()] + [string] + $SloManageUrl, + [Parameter(Mandatory=$true, Position=1)] + [ValidateNotNullOrEmpty()] + [string] + $subscriptionID, + [Parameter(Mandatory=$true, Position=2)] + [ValidateNotNullOrEmpty()] + [String] + $SerializedCert, + [Parameter(Mandatory=$true, Position=3)] + [ValidateNotNullOrEmpty()] + [String] + $serverLocation, + [Parameter(Mandatory=$true, Position=4)] + [ValidateNotNullOrEmpty()] + [String] + $Endpoint, + [Parameter(Mandatory=$true, Position=5)] + [ValidateNotNullOrEmpty()] + [String] + $Username, + [Parameter(Mandatory=$true, Position=6)] + [ValidateNotNullOrEmpty()] + [String] + $Password +) + +$isTestPass = $False + +Write-Output "`$subscriptionID=$subscriptionID" +Write-Output "`$SerializedCert=$SerializedCert" +Write-Output "`$serverLocation=$serverLocation" + +. .\CommonFunctions.ps1 + +Try +{ + Init-TestEnvironment + Init-AzureSubscription $SubscriptionId $SerializedCert $Endpoint + + $securePassword = ConvertTo-SecureString $Password -AsPlainText -Force + $credential = New-Object System.Management.Automation.PSCredential ($UserName, $securePassword) + + $context = New-AzureSqlDatabaseServerContext -ManageUrl $SloManageUrl -Credential $credential + + Write-Output "Testing: Get all quotas" + $quota = $context | Get-AzureSqlDatabaseServerQuota + Assert {$quota} "Failed to get the quotas from the server" + Write-Output $quota + + + Write-Output "\nTesting: Get Premium_Databases quota" + $quota = $context | Get-AzureSqlDatabaseServerQuota -QuotaName "Premium_Databases" + Assert {$quota.Name -eq "Premium_Databases"} "Failed to get the quotas from the server" + Write-Output $quota + + $isTestPass = $True +} +Finally +{ +} + +Write-TestResult $IsTestPass diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Server/ResetPassword.ps1 b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Server/ResetPassword.ps1 new file mode 100644 index 000000000000..bd0fd9f6cf60 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/TestScripts/Server/ResetPassword.ps1 @@ -0,0 +1,80 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +[CmdletBinding()] +Param +( + [Parameter(Mandatory=$true, Position=0)] + [ValidateNotNullOrEmpty()] + [string] + $subscriptionID, + [Parameter(Mandatory=$true, Position=1)] + [ValidateNotNullOrEmpty()] + [String] + $SerializedCert, + [Parameter(Mandatory=$true, Position=2)] + [ValidateNotNullOrEmpty()] + [String] + $serverLocation +) +Write-Output "`$subscriptionID=$subscriptionID" +Write-Output "`$SerializedCert=$SerializedCert" +Write-Output "`$serverLocation=$serverLocation" + +. .\CommonFunctions.ps1 + +Try +{ + Init-TestEnvironment + Init-AzureSubscription -subscriptionID $subscriptionID -SerializedCert $SerializedCert + $isTestPass = $False + + # Create Server + $loginName="mylogin1" + $loginPassword="Sql@zure1" + Write-Output "Creating server ..." + $server = New-AzureSqlDatabaseServer -AdministratorLogin $loginName -AdministratorLoginPassword $loginPassword -Location $serverLocation + Assert {$server} "Server is not created" + Write-Output "Server $($server.ServerName) created" + + # Connect to server + Write-Output "Adding firewall rule to allow connection ..." + New-AzureSqlDatabaseServerFirewallRule -ServerName $server.ServerName -RuleName all -StartIpAddress "0.0.0.0" -EndIpAddress "255.255.255.255" + Write-Output "Connecting to server ..." + $connString = "data source=$($server.ServerName).database.windows.net;User ID=$loginName;Password=$loginPassword" + $conn = New-Object System.Data.SqlClient.SqlConnection($connString); + $conn.Open() + Write-Output "Connection success" + + # Reset Password + $newPassword="Sql@zureNew" + Write-Output "Resetting password ..." + Set-AzureSqlDatabaseServer -ServerName $server.ServerName -AdminPassword $newPassword -Force + Write-Output "Reset done" + + # Connect to server using new password + Write-Output "Connecting to server using new password ..." + $connString = "data source=$($server.ServerName).database.windows.net;User ID=$loginName;Password=$newPassword"; + $conn = New-Object System.Data.SqlClient.SqlConnection($connString); + $conn.Open() + Write-Output "Connection success" + + $isTestPass = $True +} +Finally +{ + Drop-Server $server + Write-TestResult $IsTestPass +} + diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/AzureSqlDatabaseCertAuthTests.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/AzureSqlDatabaseCertAuthTests.cs new file mode 100644 index 000000000000..3f63e1ff8b87 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/AzureSqlDatabaseCertAuthTests.cs @@ -0,0 +1,798 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Collections.ObjectModel; +using System.Globalization; +using System.Linq; +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.MockServer; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Server.Cmdlet; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.Utilities; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Database.Cmdlet +{ + [TestClass] + public class AzureSqlDatabaseTests : TestBase + { + [TestCleanup] + public void CleanupTest() + { + // Save the mock session results + MockServerHelper.SaveDefaultSessionCollection(); + } + + /// + /// Test Get/Set/Remove a database using certificate authentication. + /// + [TestMethod] + public void AzureSqlDatabaseCertTests() + { + // This test uses the https endpoint, setup the certificates. + MockHttpServer.SetupCertificates(); + + using (System.Management.Automation.PowerShell powershell = System.Management.Automation.PowerShell.Create()) + { + // Setup the subscription used for the test + AzureSubscription subscription = + UnitTestHelper.SetupUnitTestSubscription(powershell); + + powershell.Runspace.SessionStateProxy.SetVariable( + "serverName", + SqlDatabaseTestSettings.Instance.ServerName); + + // Create a new server + HttpSession testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTest.AzureSqlDatabaseCertTests"); + ServerTestHelper.SetDefaultTestSessionSettings(testSession); + + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.IsTrue( + actual.UserAgent.Contains(ApiConstants.UserAgentHeaderValue), + "Missing proper UserAgent string."); + }); + + Collection newDatabaseResult1 = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + @"New-AzureSqlDatabase" + + @" -ServerName $serverName" + + @" -DatabaseName testdbcert1"); + }); + + Collection newDatabaseResult2 = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + @"New-AzureSqlDatabase" + + @" -ServerName $serverName" + + @" -DatabaseName testdbcert2" + + @" -Edition Business" + + @" -MaxSizeGB 10" + + @" -Collation Japanese_CI_AS"); + }); + + // Create a database of size 100MB Default Edition (Web) + Collection newDatabaseResult3 = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + @"New-AzureSqlDatabase" + + @" -ServerName $serverName" + + @" -DatabaseName testdbcert4" + + @" -MaxSizeBytes 104857600"); + }); + + Collection getDatabaseResult = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + @"Get-AzureSqlDatabase" + + @" $serverName"); + }); + + Collection getSingleDatabaseResult = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + @"Get-AzureSqlDatabase" + + @" $serverName" + + @" -DatabaseName testdbcert1"); + }); + + Collection getSingleDatabaseResult2 = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + @"Get-AzureSqlDatabase" + + @" $serverName" + + @" -DatabaseName testdbcert4"); + }); + + Collection setDatabaseNameResult = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + powershell.Runspace.SessionStateProxy.SetVariable("db", newDatabaseResult1.FirstOrDefault()); + return powershell.InvokeBatchScript( + @"$db | Set-AzureSqlDatabase" + + @" -NewDatabaseName testdbcert3" + + @" -PassThru"); + }); + + Collection setDatabaseSizeResult = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + powershell.Runspace.SessionStateProxy.SetVariable("db", newDatabaseResult1.FirstOrDefault()); + return powershell.InvokeBatchScript( + @"$db | Set-AzureSqlDatabase" + + @" -MaxSizeGB 5" + + @" -PassThru"); + }); + + Collection setDatabaseSizeResult2 = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + @"Set-AzureSqlDatabase" + + @" -ServerName $serverName" + + @" -DatabaseName testdbcert4" + + @" -MaxSizeBytes 1073741824" + + @" -passthru"); + }); + + Collection P1 = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + @"$P1 = Get-AzureSqlDatabaseServiceObjective" + + @" -Server $serverName" + + @" -ServiceObjectiveName ""P1""", + @"$P1"); + }); + + Collection P2 = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + powershell.InvokeBatchScript( + @"$SLO = Get-AzureSqlDatabaseServiceObjective" + + @" -Server $serverName"); + + return powershell.InvokeBatchScript( + @"$P2 = Get-AzureSqlDatabaseServiceObjective" + + @" -Server $serverName" + + @" -ServiceObjective $SLO[2]", + @"$P2"); + }); + + + Collection setDatabaseSlo = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + @"Set-AzureSqlDatabase" + + @" -ServerName $serverName" + + @" -DatabaseName testdbcert4" + + @" -Edition Premium" + + @" -MaxSizeGb 10" + + @" -ServiceObjective $P2" + + @" -passthru" + + @" -Force"); + }); + + + Collection newPremiumP1DatabaseResult = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + @"New-AzureSqlDatabase" + + @" -ServerName $serverName" + + @" -DatabaseName ""testdbcertPremiumDBP1""" + + @" -Edition Premium" + + @" -ServiceObjective $P1"); + }); + + Collection newPremiumP2DatabaseResult = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + @"New-AzureSqlDatabase" + + @" -ServerName $serverName" + + @" -DatabaseName ""testdbcertPremiumDBP2""" + + @" -Edition Premium" + + @" -ServiceObjective $P2"); + }); + + // There is a known issue about the Get-AzureSqlDatabaseOperation that it returns all + // operations which has the required database name no matter it's been deleted and recreated. + // So when run it against the mock session, please use the hard coded testsDBName. + // Run against onebox, please use the one with NewGuid(). + // This unit test should be updated once that behavior get changed which was already been + // created as a task. + + string getOperationDbName = null; + if (testSession.ServiceBaseUri == null) + { + getOperationDbName = "testdbcertGetOperationDbName_f1abaa48-a85a-4141-9a40-6acb3ea65771"; + } + else + { + getOperationDbName = "testdbcertGetOperationDbName_" + Guid.NewGuid().ToString(); + } + + Collection newOperationDbResult = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + string.Format( + CultureInfo.InvariantCulture, + @"$getOperationDb = New-AzureSqlDatabase" + + @" -ServerName $serverName" + + @" -DatabaseName ""{0}""", + getOperationDbName), + @"$getOperationDb"); + }); + + Collection getDatabaseOperationByDbResult = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + string.Format( + CultureInfo.InvariantCulture, + @"Get-AzureSqlDatabaseOperation" + + @" -ServerName $serverName" + + @" -Database $getOperationDb")); + }); + + Collection getDatabaseOperationByNameResult = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + string.Format( + CultureInfo.InvariantCulture, + @"$getOperation = Get-AzureSqlDatabaseOperation" + + @" -ServerName $serverName" + + @" -DatabaseName ""{0}""", + getOperationDbName), + @"$getOperation"); + }); + + Collection getDatabaseOperationByIdResult = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + string.Format( + CultureInfo.InvariantCulture, + @"Get-AzureSqlDatabaseOperation" + + @" -ServerName $serverName" + + @" -OperationGuid $getOperation[0].Id")); + }); + + Collection removeDatabaseResult = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + powershell.Runspace.SessionStateProxy.SetVariable("db1", newDatabaseResult1.FirstOrDefault()); + powershell.Runspace.SessionStateProxy.SetVariable("db2", newDatabaseResult2.FirstOrDefault()); + powershell.Runspace.SessionStateProxy.SetVariable("db3", newDatabaseResult3.FirstOrDefault()); + powershell.Runspace.SessionStateProxy.SetVariable("premiumP1", newPremiumP1DatabaseResult.FirstOrDefault()); + powershell.Runspace.SessionStateProxy.SetVariable("premiumP2", newPremiumP2DatabaseResult.FirstOrDefault()); + powershell.Runspace.SessionStateProxy.SetVariable("operationDb", newOperationDbResult.FirstOrDefault()); + powershell.InvokeBatchScript(@"$db1 | Remove-AzureSqlDatabase -Force"); + powershell.InvokeBatchScript(@"$db2 | Remove-AzureSqlDatabase -Force"); + powershell.InvokeBatchScript(@"$db3 | Remove-AzureSqlDatabase -Force"); + powershell.InvokeBatchScript(@"$premiumP1 | Remove-AzureSqlDatabase -Force"); + powershell.InvokeBatchScript(@"$premiumP2 | Remove-AzureSqlDatabase -Force"); + powershell.InvokeBatchScript(@"$operationDb | Remove-AzureSqlDatabase -Force"); + return powershell.InvokeBatchScript(@"Get-AzureSqlDatabase $serverName"); + }); + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Unexpected Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Unexpected Warnings during run!"); + + // Validate New-AzureSqlDatabase + Services.Server.Database[] databases = new Services.Server.Database[] { newDatabaseResult1.Single().BaseObject as Services.Server.Database }; + Assert.AreEqual(1, databases.Length, "Expecting one database"); + Assert.IsNotNull(databases[0], "Expecting a Database object."); + // Note: Because the object is piped, this is the final state of the + // database object, after all the Set- cmdlet has run. + DatabaseTestHelper.ValidateDatabaseProperties(databases[0], "testdbcert3", "Web", 5, 5368709120L, "SQL_Latin1_General_CP1_CI_AS", "Shared", false, DatabaseTestHelper.SharedSloGuid); + + databases = new Services.Server.Database[] { newDatabaseResult2.Single().BaseObject as Services.Server.Database }; + Assert.AreEqual(1, databases.Length, "Expecting one database"); + Assert.IsNotNull(databases[0], "Expecting a Database object."); + DatabaseTestHelper.ValidateDatabaseProperties(databases[0], "testdbcert2", "Business", 10, 10737418240L, "Japanese_CI_AS", "Shared", false, DatabaseTestHelper.SharedSloGuid); + + databases = new Services.Server.Database[] { newDatabaseResult3.Single().BaseObject as Services.Server.Database }; + Assert.AreEqual(1, databases.Length, "Expecting one database"); + Assert.IsNotNull(databases[0], "Expecting a Database object."); + DatabaseTestHelper.ValidateDatabaseProperties(databases[0], "testdbcert4", "Web", 0, 104857600L, "SQL_Latin1_General_CP1_CI_AS", "Shared", false, DatabaseTestHelper.SharedSloGuid); + + // Validate Get-AzureSqlDatabase + databases = getDatabaseResult.Select(r => r.BaseObject as Services.Server.Database).ToArray(); + Assert.AreEqual(4, databases.Length, "Expecting 4 databases"); + Assert.IsNotNull(databases[0], "Expecting a Database object."); + Assert.IsNotNull(databases[1], "Expecting a Database object."); + Assert.IsNotNull(databases[2], "Expecting a Database object."); + Assert.IsNotNull(databases[3], "Expecting a Database object."); + DatabaseTestHelper.ValidateDatabaseProperties(databases[0], "master", "System", 5, 5368709120L, "SQL_Latin1_General_CP1_CI_AS", "System", true, DatabaseTestHelper.SystemSloGuid); + DatabaseTestHelper.ValidateDatabaseProperties(databases[1], "testdbcert1", "Web", 1, 1073741824L, "SQL_Latin1_General_CP1_CI_AS", "Shared", false, DatabaseTestHelper.SharedSloGuid); + DatabaseTestHelper.ValidateDatabaseProperties(databases[2], "testdbcert2", "Business", 10, 10737418240L, "Japanese_CI_AS", "Shared", false, DatabaseTestHelper.SharedSloGuid); + DatabaseTestHelper.ValidateDatabaseProperties(databases[3], "testdbcert4", "Web", 0, 104857600L, "SQL_Latin1_General_CP1_CI_AS", "Shared", false, DatabaseTestHelper.SharedSloGuid); + + databases = new Services.Server.Database[] { getSingleDatabaseResult.Single().BaseObject as Services.Server.Database }; + Assert.AreEqual(1, databases.Length, "Expecting one database"); + Assert.IsNotNull(databases[0], "Expecting a Database object."); + DatabaseTestHelper.ValidateDatabaseProperties(databases[0], "testdbcert1", "Web", 1, 1073741824L, "SQL_Latin1_General_CP1_CI_AS", "Shared", false, DatabaseTestHelper.SharedSloGuid); + + databases = new Services.Server.Database[] { getSingleDatabaseResult2.Single().BaseObject as Services.Server.Database }; + Assert.AreEqual(1, databases.Length, "Expecting one database"); + Assert.IsNotNull(databases[0], "Expecting a Database object."); + DatabaseTestHelper.ValidateDatabaseProperties(databases[0], "testdbcert4", "Web", 0, 104857600L, "SQL_Latin1_General_CP1_CI_AS", "Shared", false, DatabaseTestHelper.SharedSloGuid); + + // Validate Set-AzureSqlDatabase + databases = new Services.Server.Database[] { setDatabaseNameResult.Single().BaseObject as Services.Server.Database }; + Assert.AreEqual(1, databases.Length, "Expecting one database"); + Assert.IsNotNull(databases[0], "Expecting a Database object."); + DatabaseTestHelper.ValidateDatabaseProperties(databases[0], "testdbcert3", "Web", 1, 1073741824L, "SQL_Latin1_General_CP1_CI_AS", "Shared", false, DatabaseTestHelper.SharedSloGuid); + + databases = new Services.Server.Database[] { setDatabaseSizeResult.Single().BaseObject as Services.Server.Database }; + Assert.AreEqual(1, databases.Length, "Expecting one database"); + Assert.IsNotNull(databases[0], "Expecting a Database object."); + DatabaseTestHelper.ValidateDatabaseProperties(databases[0], "testdbcert3", "Web", 5, 5368709120L, "SQL_Latin1_General_CP1_CI_AS", "Shared", false, DatabaseTestHelper.SharedSloGuid); + + databases = new Services.Server.Database[] { setDatabaseSizeResult2.Single().BaseObject as Services.Server.Database }; + Assert.AreEqual(1, databases.Length, "Expecting one database"); + Assert.IsNotNull(databases[0], "Expecting a Database object."); + DatabaseTestHelper.ValidateDatabaseProperties(databases[0], "testdbcert4", "Web", 1, 1073741824L, "SQL_Latin1_General_CP1_CI_AS", "Shared", false, DatabaseTestHelper.SharedSloGuid); + + databases = new Services.Server.Database[] { setDatabaseSlo.Single().BaseObject as Services.Server.Database }; + Assert.AreEqual(1, databases.Length, "Expecting one database"); + Assert.IsNotNull(databases[0], "Expecting a Database object."); + DatabaseTestHelper.ValidateDatabaseProperties(databases[0], "testdbcert4", "Web", 1, 1073741824L, "SQL_Latin1_General_CP1_CI_AS", "Shared", false, DatabaseTestHelper.PremiumP2SloGuid); + + // Validate New-AzureSqlDatabase for Premium Edition Database + VerifyCreatePremiumDb(newPremiumP1DatabaseResult, "testdbcertPremiumDBP1", (P1.Single().BaseObject as ServiceObjective).Id.ToString()); + VerifyCreatePremiumDb(newPremiumP2DatabaseResult, "testdbcertPremiumDBP2", (P2.Single().BaseObject as ServiceObjective).Id.ToString()); + + // Validate Get-AzureSqlDatabaseServiceObjective + var SLOP1 = P1.Single().BaseObject as ServiceObjective; + Assert.AreEqual("P1", SLOP1.Name); + Assert.AreEqual("Premium P1 resource allocation.", SLOP1.Description); + Assert.IsNotNull(SLOP1.DimensionSettings, "Expecting some Dimension Setting objects."); + Assert.AreEqual(1, SLOP1.DimensionSettings.Count(), "Expecting 1 Dimension Setting."); + Assert.AreEqual("Premium P1 resource allocation.", SLOP1.DimensionSettings[0].Description, "Expecting Dimension Setting description as Resource capacity is reserved."); + + var SLOP2 = P2.Single().BaseObject as ServiceObjective; + Assert.AreEqual("P2", SLOP2.Name); + Assert.AreEqual(SLOP2.Description, "Premium P2 resource allocation."); + Assert.IsNotNull(SLOP2.DimensionSettings, "Expecting some Dimension Setting objects."); + Assert.AreEqual(1, SLOP2.DimensionSettings.Count(), "Expecting 1 Dimension Setting."); + Assert.AreEqual("Premium P2 resource allocation.", SLOP2.DimensionSettings[0].Description, "Expecting Dimension Setting description as Resource capacity is reserved."); + // Validate Get-AzureSqlDatabaseOperation + VerifyGetAzureSqlDatabaseOperation(getOperationDbName, getDatabaseOperationByDbResult); + VerifyGetAzureSqlDatabaseOperation(getOperationDbName, getDatabaseOperationByNameResult); + VerifyGetAzureSqlDatabaseOperation(getOperationDbName, getDatabaseOperationByIdResult); + + // Validate Remove-AzureSqlDatabase + databases = new Services.Server.Database[] { removeDatabaseResult.Single().BaseObject as Services.Server.Database }; + Assert.AreEqual(1, databases.Length, "Expecting no databases"); + Assert.IsNotNull(databases[0], "Expecting a Database object."); + DatabaseTestHelper.ValidateDatabaseProperties(databases[0], "master", "System", 5, 5368709120L, "SQL_Latin1_General_CP1_CI_AS", "System", true, DatabaseTestHelper.SystemSloGuid); + } + } + + /// + /// Test Get/Set/Remove a database using certificate authentication. + /// + [TestMethod] + public void AzureSqlDatabaseEditionsTests() + { + // This test uses the https endpoint, setup the certificates. + MockHttpServer.SetupCertificates(); + + using (System.Management.Automation.PowerShell powershell = System.Management.Automation.PowerShell.Create()) + { + // Setup the subscription used for the test + AzureSubscription subscription = + UnitTestHelper.SetupUnitTestSubscription(powershell); + + powershell.Runspace.SessionStateProxy.SetVariable( + "serverName", + SqlDatabaseTestSettings.Instance.ServerV2); + + // Create a new server + HttpSession testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTest.AzureSqlDatabaseEditionsTests"); + ServerTestHelper.SetDefaultTestSessionSettings(testSession); + + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.IsTrue( + actual.UserAgent.Contains(ApiConstants.UserAgentHeaderValue), + "Missing proper UserAgent string."); + }); + + Collection newDatabaseResult1 = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + @"($db = New-AzureSqlDatabase -ServerName $serverName -DatabaseName testdbeditions1)"); + }); + + Collection newDatabaseResult2 = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + @"New-AzureSqlDatabase" + + @" -ServerName $serverName" + + @" -DatabaseName testdbeditions2" + + @" -Edition Standard"); + }); + + Collection newDatabaseResult3 = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + @"($db3 = New-AzureSqlDatabase" + + @" -ServerName $serverName" + + @" -DatabaseName testdbeditions3" + + @" -Edition Basic)"); + }); + + Collection newDatabaseResult4 = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + @"New-AzureSqlDatabase" + + @" -ServerName $serverName" + + @" -DatabaseName testdbeditions4" + + @" -Edition Premium"); + }); + + Collection serviceObjectives = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + @"($so = Get-AzureSqlDatabaseServiceObjective -Server $serverName)"); + }); + + Collection newDatabaseResult5 = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + @"New-AzureSqlDatabase" + + @" -ServerName $serverName" + + @" -DatabaseName testdbeditions5" + + @" -Edition Standard" + + @" -ServiceObjective $so[0]"); + }); + + Collection getSingleDatabaseResult1 = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + @"Get-AzureSqlDatabase $serverName -DatabaseName testdbeditions1"); + }); + + Collection getSingleDatabaseResult2 = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + @"$db | Get-AzureSqlDatabase"); + }); + + Collection setDatabaseObjective1 = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + @"Set-AzureSqlDatabase -ServerName $serverName -DatabaseName testdbeditions2 -ServiceObjective $so[0] -Force"); + }); + + Collection setDatabaseObjective2 = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + @"Set-AzureSqlDatabase -ServerName $serverName -DatabaseName $db3.Name -Edition Standard -MaxSizeGB 1 -ServiceObjective $so[4] -Force"); + }); + + Collection getDatabaseResult = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + @"Get-AzureSqlDatabase" + + @" $serverName"); + }); + + Collection removeDatabaseResult = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + powershell.Runspace.SessionStateProxy.SetVariable("db1", newDatabaseResult1.FirstOrDefault()); + powershell.Runspace.SessionStateProxy.SetVariable("db2", newDatabaseResult2.FirstOrDefault()); + powershell.Runspace.SessionStateProxy.SetVariable("db3", newDatabaseResult3.FirstOrDefault()); + powershell.Runspace.SessionStateProxy.SetVariable("db4", newDatabaseResult4.FirstOrDefault()); + powershell.Runspace.SessionStateProxy.SetVariable("db5", newDatabaseResult5.FirstOrDefault()); + powershell.InvokeBatchScript(@"$db1 | Remove-AzureSqlDatabase -Force"); + powershell.InvokeBatchScript(@"$db2 | Remove-AzureSqlDatabase -Force"); + powershell.InvokeBatchScript(@"$db3 | Remove-AzureSqlDatabase -Force"); + powershell.InvokeBatchScript(@"$db4 | Remove-AzureSqlDatabase -Force"); + powershell.InvokeBatchScript(@"$db5 | Remove-AzureSqlDatabase -Force"); + return powershell.InvokeBatchScript( @"Get-AzureSqlDatabase $serverName"); + }); + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Unexpected Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Unexpected Warnings during run!"); + + // Validate New-AzureSqlDatabase + Services.Server.Database[] databases = new Services.Server.Database[] { newDatabaseResult1.Single().BaseObject as Services.Server.Database }; + Assert.AreEqual(1, databases.Length, "Expecting one database"); + Assert.IsNotNull(databases[0], "Expecting a Database object."); + DatabaseTestHelper.ValidateDatabaseProperties(databases[0], "testdbeditions1", "Web", 1, 1073741824L, "SQL_Latin1_General_CP1_CI_AS", "Shared", false, DatabaseTestHelper.SharedSloGuid); + + databases = new Services.Server.Database[] { newDatabaseResult2.Single().BaseObject as Services.Server.Database }; + Assert.AreEqual(1, databases.Length, "Expecting one database"); + Assert.IsNotNull(databases[0], "Expecting a Database object."); + DatabaseTestHelper.ValidateDatabaseProperties(databases[0], "testdbeditions2", "Standard", 0, 524288000, "SQL_Latin1_General_CP1_CI_AS", "S1", false, DatabaseTestHelper.StandardS1SloGuid); + + databases = new Services.Server.Database[] { newDatabaseResult3.Single().BaseObject as Services.Server.Database }; + Assert.AreEqual(1, databases.Length, "Expecting one database"); + Assert.IsNotNull(databases[0], "Expecting a Database object."); + DatabaseTestHelper.ValidateDatabaseProperties(databases[0], "testdbeditions3", "Basic", 0, 104857600L, "SQL_Latin1_General_CP1_CI_AS", "Basic", false, DatabaseTestHelper.BasicSloGuid); + + databases = new Services.Server.Database[] { newDatabaseResult4.Single().BaseObject as Services.Server.Database }; + Assert.AreEqual(1, databases.Length, "Expecting one database"); + Assert.IsNotNull(databases[0], "Expecting a Database object."); + DatabaseTestHelper.ValidateDatabaseProperties(databases[0], "testdbeditions4", "Premium", 10, 10737418240L, "SQL_Latin1_General_CP1_CI_AS", "P1", false, DatabaseTestHelper.PremiumP1SloGuid); + + databases = new Services.Server.Database[] { newDatabaseResult5.Single().BaseObject as Services.Server.Database }; + Assert.AreEqual(1, databases.Length, "Expecting one database"); + Assert.IsNotNull(databases[0], "Expecting a Database object."); + DatabaseTestHelper.ValidateDatabaseProperties(databases[0], "testdbeditions5", "Standard", 2, 2147483648L, "SQL_Latin1_General_CP1_CI_AS", "S2", false, DatabaseTestHelper.StandardS2SloGuid); + + + // Validate Get-AzureSqlDatabase + databases = getDatabaseResult.Select(r => r.BaseObject as Services.Server.Database).ToArray(); + Assert.AreEqual(6, databases.Length, "Expecting 3 databases"); + Assert.IsNotNull(databases[0], "Expecting a Database object."); + Assert.IsNotNull(databases[1], "Expecting a Database object."); + Assert.IsNotNull(databases[2], "Expecting a Database object."); + Assert.IsNotNull(databases[3], "Expecting a Database object."); + Assert.IsNotNull(databases[4], "Expecting a Database object."); + Assert.IsNotNull(databases[5], "Expecting a Database object."); + DatabaseTestHelper.ValidateDatabaseProperties(databases[0], "master", "System", 5, 5368709120L, "SQL_Latin1_General_CP1_CI_AS", "System", true, DatabaseTestHelper.SystemSloGuid); + DatabaseTestHelper.ValidateDatabaseProperties(databases[1], "testdbeditions1", "Web", 1, 1073741824L, "SQL_Latin1_General_CP1_CI_AS", "Shared", false, DatabaseTestHelper.SharedSloGuid); + DatabaseTestHelper.ValidateDatabaseProperties(databases[2], "testdbeditions2", "Standard", 0, 524288000L, "SQL_Latin1_General_CP1_CI_AS", "S2", false, DatabaseTestHelper.StandardS2SloGuid); + DatabaseTestHelper.ValidateDatabaseProperties(databases[3], "testdbeditions3", "Basic", 0, 104857600L, "SQL_Latin1_General_CP1_CI_AS", "Basic", false, DatabaseTestHelper.StandardS1SloGuid); + DatabaseTestHelper.ValidateDatabaseProperties(databases[4], "testdbeditions4", "Premium", 10, 10737418240L, "SQL_Latin1_General_CP1_CI_AS", "P1", false, DatabaseTestHelper.PremiumP1SloGuid); + DatabaseTestHelper.ValidateDatabaseProperties(databases[5], "testdbeditions5", "Standard", 2, 2147483648L, "SQL_Latin1_General_CP1_CI_AS", "S2", false, DatabaseTestHelper.StandardS2SloGuid); + + // Validate Get-AzureSqlDatabaseServiceObjective + var sos = serviceObjectives.Select(x => x.BaseObject as ServiceObjective).ToArray(); + Assert.AreEqual(10, sos.Count()); + ValidateServiceObjectiveProperties(sos[0], "S2", "Standard S2 resource allocation.", 1, "Standard S2 resource allocation."); + ValidateServiceObjectiveProperties(sos[1], "P1", "Premium P1 resource allocation.", 1, "Premium P1 resource allocation."); + ValidateServiceObjectiveProperties(sos[2], "P2", "Premium P2 resource allocation.", 1, "Premium P2 resource allocation."); + ValidateServiceObjectiveProperties(sos[3], "Basic", "Basic resource allocation.", 1, "Basic resource allocation."); + ValidateServiceObjectiveProperties(sos[4], "S1", "Standard S1 resource allocation.", 1, "Standard S1 resource allocation."); + ValidateServiceObjectiveProperties(sos[5], "P3 deprecated", "Premium P3 deprecated resource allocation.", 1, "Premium P3 deprecated resource allocation."); + ValidateServiceObjectiveProperties(sos[6], "P3", "Premium P3 resource allocation.", 1, "Premium P3 resource allocation."); + ValidateServiceObjectiveProperties(sos[7], "System", "Used for master database only.", 1, "Used for master database only."); + ValidateServiceObjectiveProperties(sos[8], "System Standard", "Used for master database only.", 1, "Shared resource allocation."); + ValidateServiceObjectiveProperties(sos[9], "Shared", "Shared resource allocation.", 1, "Shared resource allocation."); + + // Validate Remove-AzureSqlDatabase + databases = new Services.Server.Database[] { removeDatabaseResult.Single().BaseObject as Services.Server.Database }; + Assert.AreEqual(1, databases.Length, "Expecting no databases"); + Assert.IsNotNull(databases[0], "Expecting a Database object."); + DatabaseTestHelper.ValidateDatabaseProperties(databases[0], "master", "System", 5, 5368709120L, "SQL_Latin1_General_CP1_CI_AS", "System", true, DatabaseTestHelper.SystemSloGuid); + } + } + + /// + /// Verify that the Get-AzureSqlDatabseServerQuota cmdlets work using certificate authentication + /// + [TestMethod] + public void AzureSqlDatabaseServerQuotaCertAuthTest() + { + // This test uses the https endpoint, setup the certificates. + MockHttpServer.SetupCertificates(); + + using (System.Management.Automation.PowerShell powershell = System.Management.Automation.PowerShell.Create()) + { + // Setup the subscription used for the test + AzureSubscription subscription = + UnitTestHelper.SetupUnitTestSubscription(powershell); + + powershell.Runspace.SessionStateProxy.SetVariable( + "serverName", + SqlDatabaseTestSettings.Instance.ServerV2); + + // Create a new server + HttpSession testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTest.AzureSqlDatabaseServerQuotaCertAuthTest"); + ServerTestHelper.SetDefaultTestSessionSettings(testSession); + + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.IsTrue( + actual.UserAgent.Contains(ApiConstants.UserAgentHeaderValue), + "Missing proper UserAgent string."); + }); + + Collection getQuota1 = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + @"Get-AzureSqlDatabaseServerQuota -ServerName $serverName"); + }); + + Collection getQuota2 = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + @"Get-AzureSqlDatabaseServerQuota -ServerName $serverName -QuotaName premium_databases"); + }); + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Unexpected Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Unexpected Warnings during run!"); + + // Validate Get-AzureSqlDatabaseServerQuota + var quotas = getQuota1.Select(x => ((IEnumerable)x.BaseObject).Cast().Single() ).ToArray(); + Assert.AreEqual(1, quotas.Length, "Expecting one server quota"); + Assert.IsNotNull(quotas[0], "Expecting a server quota."); + Assert.AreEqual("premium_databases", quotas[0].Name); + Assert.AreEqual(SqlDatabaseTestSettings.Instance.ServerV2, quotas[0].ServerName); + Assert.AreEqual("Microsoft.SqlAzure.ServerQuota", quotas[0].Type); + Assert.AreEqual("100", quotas[0].Value); + Assert.AreEqual("Normal", quotas[0].State); + + quotas = getQuota2.Select(x => ((IEnumerable)x.BaseObject).Cast().Single()).ToArray(); + Assert.AreEqual(1, quotas.Length, "Expecting server quota"); + Assert.IsNotNull(quotas[0], "Expecting a server quota."); + Assert.AreEqual("premium_databases", quotas[0].Name); + Assert.AreEqual(SqlDatabaseTestSettings.Instance.ServerV2, quotas[0].ServerName); + Assert.AreEqual("Microsoft.SqlAzure.ServerQuota", quotas[0].Type); + Assert.AreEqual("100", quotas[0].Value); + Assert.AreEqual("Normal", quotas[0].State); + } + } + + /// + /// Validate that the service objective properties match the expected values + /// + /// The service objective object + /// The expected name for the service objective + /// The expected description for the service objective + /// The expected number of dimension settings + /// A list of the expected descriptions for each dimension setting + private static void ValidateServiceObjectiveProperties(ServiceObjective so, string name, string description, int dimSettingsCount, params string[] desc) + { + + Assert.AreEqual(name, so.Name); + Assert.AreEqual(description, so.Description); + Assert.IsNotNull(so.DimensionSettings, "Expecting some Dimension Setting objects."); + Assert.AreEqual(dimSettingsCount, so.DimensionSettings.Count(), "Expecting 1 Dimension Setting."); + for (int i = 0; i < dimSettingsCount; i++) + { + Assert.AreEqual(desc[i], so.DimensionSettings[i].Description); + } + } + + private static void VerifyGetAzureSqlDatabaseOperation(string getOperationDbName, Collection getDatabaseOperationByIdResult) + { + var operations = getDatabaseOperationByIdResult.Select(r => r.BaseObject as DatabaseOperation).ToArray(); + Assert.AreEqual(operations.Count(), 1, "Expecting 1 operation"); + Assert.AreEqual(operations[0].Name, "CREATE DATABASE", "Expecting CREATE DATABASE operation"); + Assert.AreEqual(operations[0].State, "COMPLETED", "Expecting operation COMPLETED"); + Assert.AreEqual(operations[0].DatabaseName, getOperationDbName, string.Format("Expecting Database name: {0}", getOperationDbName)); + Assert.AreEqual(operations[0].PercentComplete, 100, "Expecting operation completed 100%"); + } + + private static Services.Server.Database[] VerifyCreatePremiumDb(Collection newPremiumP1DatabaseResult, string databaseName, string serviceObjectiveId) + { + Services.Server.Database[] databases = new Services.Server.Database[] { newPremiumP1DatabaseResult.Single().BaseObject as Services.Server.Database }; + Assert.AreEqual(1, databases.Length, "Expecting one database"); + Assert.IsNotNull(databases[0], "Expecting a Database object."); + Assert.AreEqual(databases[0].Name, databaseName, string.Format("Expecting Database Name:{0}, actual is:{1}", databaseName, databases[0].Name)); + + Assert.AreEqual("Premium", databases[0].Edition); + Assert.AreEqual(databases[0].AssignedServiceObjectiveId, Guid.Parse(serviceObjectiveId), string.Format("Expecting Database Edition:{0}, actual is:{1}", serviceObjectiveId, databases[0].AssignedServiceObjectiveId)); + + Assert.AreEqual("SQL_Latin1_General_CP1_CI_AS", databases[0].CollationName); + return databases; + } + } +} + diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/AzureSqlDatabaseCopyCertAuthTests.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/AzureSqlDatabaseCopyCertAuthTests.cs new file mode 100644 index 000000000000..760d9835189b --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/AzureSqlDatabaseCopyCertAuthTests.cs @@ -0,0 +1,496 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.ObjectModel; +using System.Linq; +using System.Management.Automation; +using System.Threading; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Model; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.MockServer; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Server.Cmdlet; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Database.Cmdlet +{ + [TestClass] + public class AzureSqlDatabaseCopyCertAuthTests : TestBase + { + private DateTime TestStartTime { get; set; } + + // Change this if you wish to run against OneBox. + private bool IsRunningAgainstOneBox { get { return false; } } + + private System.Management.Automation.PowerShell PowerShell { get; set; } + + AzureSubscription Subscription { get; set; } + + private AsyncExceptionManager ExceptionManager { get; set; } + private MockHttpServer MockHttpServer { get; set; } + + private string HomeServer { get { return "cloud4"; } } + private string PartnerServer { get { return "partnersrv"; } } + + [TestInitialize] + public void InitializeTest() + { + TestStartTime = DateTime.Now; + + // This test uses the https endpoint, setup the certificates. + MockHttpServer.SetupCertificates(); + PowerShell = System.Management.Automation.PowerShell.Create(); + Subscription = UnitTestHelper.SetupUnitTestSubscription(PowerShell); + + // Set names for the servers we'll use in PowerShell. + PowerShell.Runspace.SessionStateProxy.SetVariable( + "homeServerName", HomeServer); + + PowerShell.Runspace.SessionStateProxy.SetVariable( + "partnerServerName", PartnerServer); + + // Create a new server + HttpSession testSession = MockServerHelper.DefaultSessionCollection.GetSession( + string.Format("UnitTest.{0}.{1}", TestContext.FullyQualifiedTestClassName, TestContext.TestName)); + + ServerTestHelper.SetDefaultTestSessionSettings(testSession); + + // When testing production use RDFE + // testSession.ServiceBaseUri = new Uri("https://management.core.windows.net"); + // When testing OneBox use Mock RDFE: + if (IsRunningAgainstOneBox) + { + testSession.ServiceBaseUri = new Uri("https://management.dev.mscds.com:12346/"); + } + + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.IsTrue( + actual.UserAgent.Contains(ApiConstants.UserAgentHeaderValue), + "Missing proper UserAgent string."); + }); + + ExceptionManager = new AsyncExceptionManager(); + MockHttpServer = new MockHttpServer(ExceptionManager, MockHttpServer.DefaultHttpsServerPrefixUri, + testSession); + } + + + [TestCleanup] + public void CleanupTest() + { + try + { + foreach (string server in new string[] {HomeServer, PartnerServer}) + { + PowerShell.InvokeBatchScript( + string.Format("Get-AzureSqlDatabase -ServerName {0} " + + "| where {{ $_.Name -ne 'master' }} " + + "| Remove-AzureSqlDatabase -ServerName {0} -Force", + server)); + } + } + catch (Exception ex) + { + Console.WriteLine("Error cleaning up servers: {0}", ex.Message); + } + + MockHttpServer.Dispose(); + ExceptionManager.Dispose(); + PowerShell.Dispose(); + + // Save the mock session results + MockServerHelper.SaveDefaultSessionCollection(); + } + + private void CreateDatabase(string serverName, string dbName, string dbVar = null, string dbNameVar = null) + { + + PowerShell.InvokeBatchScript( + @"$createdDb = New-AzureSqlDatabase" + + @" -ServerName " + serverName + + @" -DatabaseName " + dbName, + @"$createdDb"); + + if (dbVar != null) + { + PowerShell.InvokeBatchScript(dbVar + " = $createdDb", dbVar); + } + + if (dbNameVar != null) + { + PowerShell.InvokeBatchScript(dbNameVar + " = $createdDb.Name", dbNameVar); + } + } + + /// + /// Test starting non-continuous copies. + /// + [TestMethod] + public void AzureSqlDatabaseCopyCertTests() + { + const string srcDbName = "testdb0"; + const string tgtName1 = "testdb0copy1"; + const string tgtName2 = "testdb0copy2"; + + CreateDatabase(HomeServer, srcDbName, "$db0", "$dbName0"); + + // Try some non-continuous database copies. + Collection response = PowerShell.InvokeBatchScript( + @"$copy1 = Start-AzureSqlDatabaseCopy" + + @" -ServerName $homeServerName" + + @" -Database $db0" + + @" -PartnerServer $homeServerName" + + @" -PartnerDatabase " + tgtName1, + @"$copy1"); + + VerifyDbCopyResponse(response, HomeServer, srcDbName, tgtName1, false); + + // When unspecified, the partner server should be the local server. + response = PowerShell.InvokeBatchScript( + @"$copy2 = Start-AzureSqlDatabaseCopy" + + @" -ServerName $homeServerName" + + @" -DatabaseName $dbName0" + + @" -PartnerDatabase " + tgtName2, + @"$copy2"); + + VerifyDbCopyResponse(response, HomeServer, srcDbName, tgtName2, false); + + response = PowerShell.InvokeBatchScript("Get-AzureSqlDatabase $homeServerName"); + Assert.AreEqual(4, response.Count, "Expected a total of 4 databases with the new copies"); + + Assert.AreEqual(0, PowerShell.Streams.Error.Count, "Unexpected Errors during run!"); + Assert.AreEqual(0, PowerShell.Streams.Warning.Count, "Unexpected Warnings during run!"); + } + + /// + /// Test Start/Stop/Get a database copy using certificate authentication. + /// + [TestMethod] + public void AzureSqlContinuousDatabaseCopyCertTests() + { + // Create some databases to be used in the tests. + var dbNames = new string[] { "testdb0", "testdb1", "testdb2", "testdb3", "testdb4" }; + + CreateDatabase(HomeServer, dbNames[0], "$db0", "$dbName0"); + CreateDatabase(HomeServer, dbNames[1], "$db1", "$dbName1"); + CreateDatabase(PartnerServer, dbNames[2], "$db2", "$dbName2"); + CreateDatabase(PartnerServer, dbNames[3], "$db3", "$dbName3"); + CreateDatabase(HomeServer, dbNames[4], "$db4", "$dbName4"); + + Collection response; + + // Call Start-AzureSqlDatabaseCopy with different parameter sets. + // After each call, we wait for seeding completion before moving on. + // We test for seeding completion using Get-AzureSqlDatabaseCopy calls. + + response = PowerShell.InvokeBatchScript( + @"$copy1 = Start-AzureSqlDatabaseCopy" + + @" -ServerName $homeServerName" + + @" -PartnerServer $partnerServerName" + + @" -DatabaseName $dbName0" + + @" -ContinuousCopy", + @"$copy1"); + + VerifyCcResponse(response, HomeServer, dbNames[0], PartnerServer, false); + + response = PowerShell.InvokeBatchScript( + @"$copy2 = Start-AzureSqlDatabaseCopy" + + @" -ServerName $homeServerName" + + @" -Database $db1" + + @" -PartnerServer $partnerServerName" + + @" -PartnerDatabase $dbName1" + + @" -Force" + + @" -ContinuousCopy", + @"$copy2"); + + VerifyCcResponse(response, HomeServer, dbNames[1], PartnerServer, false); + + response = PowerShell.InvokeBatchScript( + @"$copy3 = Start-AzureSqlDatabaseCopy" + + @" -ServerName $partnerServerName" + + @" -DatabaseName $dbName2" + + @" -PartnerServer $homeServerName" + + @" -ContinuousCopy", + @"$copy3"); + + // null = no RPO (the default) + VerifyCcResponse(response, PartnerServer, dbNames[2], HomeServer, false); + + response = PowerShell.InvokeBatchScript( + @"$copy4 = Start-AzureSqlDatabaseCopy" + + @" -ServerName $partnerServerName" + + @" -Database $db3" + + @" -PartnerServer $homeServerName" + + @" -PartnerDatabase $dbName3" + + @" -Force" + + @" -ContinuousCopy", + @"$copy4"); + + VerifyCcResponse(response, PartnerServer, dbNames[3], HomeServer, false); + + // Start a passive continuous copy + response = PowerShell.InvokeBatchScript( + @"$copy5 = Start-AzureSqlDatabaseCopy" + + @" -ServerName $homeServerName" + + @" -PartnerServer $partnerServerName" + + @" -DatabaseName $dbName4" + + @" -ContinuousCopy" + + @" -OfflineSecondary", + @"$copy5"); + + VerifyCcResponse(response, HomeServer, dbNames[4], PartnerServer, false, true); + + // Wait for all of the new copies to reach catchup. + WaitForSeedingCompletion(HomeServer, dbNames[0], PartnerServer); + WaitForSeedingCompletion(HomeServer, dbNames[1], PartnerServer); + WaitForSeedingCompletion(PartnerServer, dbNames[2], HomeServer); + WaitForSeedingCompletion(PartnerServer, dbNames[3], HomeServer); + WaitForSeedingCompletion(HomeServer, dbNames[4], PartnerServer); + + // Do some Get-AzureSqlDatabaseCopy calls with different parameter sets. + + response = PowerShell.InvokeBatchScript( + @"Get-AzureSqlDatabaseCopy" + + @" -ServerName $homeServerName" + + @" -DatabaseCopy $copy1"); + + VerifyCcResponse(response, HomeServer, dbNames[0], PartnerServer, false); + + response = PowerShell.InvokeBatchScript( + @"Get-AzureSqlDatabaseCopy" + + @" -ServerName $homeServerName" + + @" -DatabaseName $dbName1" + + @" -PartnerServer $partnerServerName" + + @" -PartnerDatabase $dbName1"); + + VerifyCcResponse(response, HomeServer, dbNames[1], PartnerServer, false); + + response = PowerShell.InvokeBatchScript( + @"Get-AzureSqlDatabaseCopy" + + @" -ServerName $partnerServerName" + + @" -Database $db0"); + + VerifyCcResponse(response, HomeServer, dbNames[0], PartnerServer, true); + + response = PowerShell.InvokeBatchScript( + @"Get-AzureSqlDatabaseCopy" + + @" -ServerName $homeServerName"); + + Assert.AreEqual(5, response.Count); + DatabaseCopy[] allCopies = response.Select(obj => obj.BaseObject as DatabaseCopy).ToArray(); + foreach (var copy in allCopies) + { + Assert.IsNotNull(copy, "Expected object of type DatabaseCopy"); + } + + Array.Sort(allCopies, + (dbc1, dbc2) => string.Compare(dbc1.SourceDatabaseName, dbc2.SourceDatabaseName)); + + VerifyCopyResponse(allCopies[0], HomeServer, dbNames[0], PartnerServer, dbNames[0], false, true, false); + VerifyCopyResponse(allCopies[1], HomeServer, dbNames[1], PartnerServer, dbNames[1], false, true, false); + VerifyCopyResponse(allCopies[2], PartnerServer, dbNames[2], HomeServer, dbNames[2], true, true, false); + VerifyCopyResponse(allCopies[3], PartnerServer, dbNames[3], HomeServer, dbNames[3], true, true, false); + VerifyCopyResponse(allCopies[4], HomeServer, dbNames[4], PartnerServer, dbNames[4], false, true, true); + + response = PowerShell.InvokeBatchScript( + @"Get-AzureSqlDatabaseCopy" + + @" -ServerName $homeServerName" + + @" -PartnerServer $partnerServerName" + + @" -PartnerDatabase $dbName0"); + + VerifyCcResponse(response, HomeServer, dbNames[0], PartnerServer, false); + + // Call Stop-AzureSqlDatbaseCopy with different parameter sets. + + PowerShell.InvokeBatchScript( + @"Stop-AzureSqlDatabaseCopy" + + @" -ServerName $homeServerName" + + @" -DatabaseCopy $copy1"); + + PowerShell.InvokeBatchScript( + @"Stop-AzureSqlDatabaseCopy" + + @" -ServerName $homeServerName" + + @" -Database $db1" + + @" -ForcedTermination"); + + PowerShell.InvokeBatchScript( + @"Stop-AzureSqlDatabaseCopy" + + @" -ServerName $partnerServerName" + + @" -DatabaseName $dbName2" + + @" -PartnerServer $homeServerName" + + @" -PartnerDatabase $dbName2"); + + PowerShell.InvokeBatchScript( + @"Stop-AzureSqlDatabaseCopy" + + @" -ServerName $homeServerName" + + @" -DatabaseName $dbName3" + + @" -ForcedTermination"); + + PowerShell.InvokeBatchScript( + @"Stop-AzureSqlDatabaseCopy" + + @" -ServerName $homeServerName" + + @" -DatabaseName $dbName4" + + @" -ForcedTermination"); + + WaitForCopyTermination(HomeServer, dbNames[0], PartnerServer); + WaitForCopyTermination(HomeServer, dbNames[1], PartnerServer); + WaitForCopyTermination(PartnerServer, dbNames[2], HomeServer); + WaitForCopyTermination(HomeServer, dbNames[3], PartnerServer); + WaitForCopyTermination(HomeServer, dbNames[4], PartnerServer); + + // Make sure there are no longer any copies on the server. + response = PowerShell.InvokeBatchScript( + @"Get-AzureSqlDatabaseCopy" + + @" -ServerName $homeServerName"); + + Assert.AreEqual(0, response.Count, "Expected copies to have been terminated"); + + Assert.AreEqual(0, PowerShell.Streams.Error.Count, "Unexpected Errors during run!"); + Assert.AreEqual(0, PowerShell.Streams.Warning.Count, "Unexpected Warnings during run!"); + } + + private void WaitForSeedingCompletion(string sourceServer, string sourceDb, string destServer) + { + for (int i = 0; i < 20; i++) + { + Collection testCopyCompleteResponse = PowerShell + .InvokeBatchScript( + @"Get-AzureSqlDatabaseCopy" + + @" -ServerName " + sourceServer + + @" -DatabaseName " + sourceDb + + @" -PartnerServer " + destServer); + + VerifyCcResponse(testCopyCompleteResponse, sourceServer, sourceDb, destServer, false); + + var testCopyComplete = (DatabaseCopy)testCopyCompleteResponse.First().BaseObject; + if (testCopyComplete.ReplicationStateDescription == "CATCH_UP") + { + return; + } + + if (IsRunningAgainstOneBox) + { + Thread.Sleep(TimeSpan.FromSeconds(10)); + } + } + + Assert.Fail("Continuous copy of source database " + sourceDb + " failed to reach CATCH_UP state"); + } + + private void WaitForCopyTermination(string sourceServer, string sourceDb, string destServer) + { + for (int i = 0; i < 20; i++) + { + Collection response = PowerShell + .InvokeBatchScript( + @"Get-AzureSqlDatabaseCopy" + + @" -ServerName " + sourceServer + + @" -DatabaseName " + sourceDb + + @" -PartnerServer " + destServer); + + if (response.Count == 0) + { + return; + } + + if (IsRunningAgainstOneBox) + { + Thread.Sleep(TimeSpan.FromSeconds(10)); + } + } + + Assert.Fail("Continuous copy of source database " + sourceDb + " failed to be terminated"); + } + + private void VerifyCcResponse(Collection result, string sourceServer, string sourceDb, + string destServer, bool isLocalDatabaseReplicationTarget, bool? isOfflineSecondary = null) + { + VerifyCopyResponse(result, sourceServer, sourceDb, destServer, sourceDb, isLocalDatabaseReplicationTarget, true, isOfflineSecondary); + } + + private void VerifyDbCopyResponse(Collection result, string sourceServer, string sourceDb, + string destDb, bool isLocalDatabaseReplicationTarget) + { + VerifyCopyResponse(result, sourceServer, sourceDb, sourceServer, destDb, isLocalDatabaseReplicationTarget, false, false); + } + + private void VerifyCopyResponse(Collection result, string sourceServer, string sourceDb, + string destServer, string destDb, bool isLocalDatabaseReplicationTarget, + bool isContinuous, bool? isOfflineSecondary) + { + Assert.AreEqual(1, result.Count, "Expected exactly one result from cmdlet"); + var copy = result.First().BaseObject as DatabaseCopy; + Assert.IsNotNull(copy, "Expected object of type DatabaseCopy"); + VerifyCopyResponse(copy, sourceServer, sourceDb, destServer, destDb, isLocalDatabaseReplicationTarget, isContinuous, isOfflineSecondary); + } + + private void VerifyCopyResponse(DatabaseCopy copy, string sourceServer, string sourceDb, + string destServer, string destDb, bool isLocalDatabaseReplicationTarget, + bool isContinuous, bool? isOfflineSecondary) + { + Assert.AreEqual(sourceServer, copy.SourceServerName); + Assert.AreEqual(sourceDb, copy.SourceDatabaseName); + Assert.AreEqual(destServer, copy.DestinationServerName); + Assert.AreEqual(destDb, copy.DestinationDatabaseName); + Assert.AreEqual(isContinuous, copy.IsContinuous); + Assert.AreEqual(isLocalDatabaseReplicationTarget, copy.IsLocalDatabaseReplicationTarget); + Assert.IsTrue(copy.IsInterlinkConnected); + if (isOfflineSecondary.HasValue) + { + Assert.AreEqual(isOfflineSecondary, copy.IsOfflineSecondary); + } + + if (IsRunningAgainstOneBox) + { + Assert.IsTrue(copy.StartDate > TestStartTime); + Assert.IsTrue(copy.StartDate < DateTime.Now); + Assert.IsTrue(copy.ModifyDate > TestStartTime); + Assert.IsTrue(copy.ModifyDate < DateTime.Now); + Assert.IsTrue(copy.StartDate <= copy.ModifyDate); + } + + switch (copy.ReplicationStateDescription) + { + case "PENDING": + Assert.IsTrue((int)copy.PercentComplete == 0); + break; + + case "SEEDING": + Assert.IsTrue(copy.PercentComplete > 0 && copy.PercentComplete < 100); + break; + + case "CATCH_UP": + Assert.AreEqual(100, copy.PercentComplete); + Assert.IsTrue(copy.IsContinuous); + break; + + case "": + // After forced terminate, on the other side. + Assert.IsFalse(copy.IsInterlinkConnected); + break; + + default: + Assert.Fail("Unexpected ReplicationStateDescription: " + + copy.ReplicationStateDescription); + break; + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/DatabaseCmdletAttributionTests.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/DatabaseCmdletAttributionTests.cs new file mode 100644 index 000000000000..f7fbd5eca4e3 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/DatabaseCmdletAttributionTests.cs @@ -0,0 +1,123 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Database.Cmdlet; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Database.Cmdlet +{ + /// + /// These tests prevent regression in parameter validation attributes. + /// + [TestClass] + public class DatabaseCmdletAttributionTests : TestBase + { + [TestInitialize] + public void SetupTest() + { + } + + [TestMethod] + public void NewAzureSqlDatabaseServerContextAttributeTest() + { + Type cmdlet = typeof(NewAzureSqlDatabaseServerContext); + UnitTestHelper.CheckConfirmImpact(cmdlet, ConfirmImpact.None); + UnitTestHelper.CheckCmdletModifiesData(cmdlet, false); + } + + [TestMethod] + public void GetAzureSqlDatabaseAttributeTest() + { + Type cmdlet = typeof(GetAzureSqlDatabase); + UnitTestHelper.CheckConfirmImpact(cmdlet, ConfirmImpact.None); + UnitTestHelper.CheckCmdletModifiesData(cmdlet, false); + } + + [TestMethod] + public void NewAzureSqlDatabaseAttributeTest() + { + Type cmdlet = typeof(NewAzureSqlDatabase); + UnitTestHelper.CheckConfirmImpact(cmdlet, ConfirmImpact.Low); + UnitTestHelper.CheckCmdletModifiesData(cmdlet, true); + } + + [TestMethod] + public void RemoveAzureSqlDatabaseAttributeTest() + { + Type cmdlet = typeof(RemoveAzureSqlDatabase); + UnitTestHelper.CheckConfirmImpact(cmdlet, ConfirmImpact.High); + UnitTestHelper.CheckCmdletModifiesData(cmdlet, true); + } + + [TestMethod] + public void SetAzureSqlDatabaseAttributeTest() + { + Type cmdlet = typeof(SetAzureSqlDatabase); + UnitTestHelper.CheckConfirmImpact(cmdlet, ConfirmImpact.Medium); + UnitTestHelper.CheckCmdletModifiesData(cmdlet, true); + } + + /// + /// Tests the attributes of the Export-AzureSqlDatabase cmdlet + /// + [TestMethod] + public void ExportAzureSqlDatabaseAttributeTest() + { + Type cmdlet = typeof(StartAzureSqlDatabaseExport); + UnitTestHelper.CheckConfirmImpact(cmdlet, ConfirmImpact.Medium); + UnitTestHelper.CheckCmdletModifiesData(cmdlet, false); + } + + /// + /// Tests the attributes of the Start-AzureSqlDatabaseImport cmdlet + /// + [TestMethod] + public void ImportAzureSqlDatabaseAttributeTest() + { + Type cmdlet = typeof(StartAzureSqlDatabaseImport); + UnitTestHelper.CheckConfirmImpact(cmdlet, ConfirmImpact.Medium); + UnitTestHelper.CheckCmdletModifiesData(cmdlet, false); + } + + /// + /// Tests the attributes of the Get-AzureSqlDatabaseImportExport cmdlet + /// + [TestMethod] + public void GetAzureSqlDatabaseIEStatusAttributeTest() + { + Type cmdlet = typeof(GetAzureSqlDatabaseImportExportStatus); + UnitTestHelper.CheckConfirmImpact(cmdlet, ConfirmImpact.None); + UnitTestHelper.CheckCmdletModifiesData(cmdlet, false); + } + + /// + /// Tests the attributes of the Get-AzureSqlDatabaseServiceObjective cmdlet + /// + [TestMethod] + public void GetAzureSqlDatabaseServiceObjectiveAttributeTest() + { + Type cmdlet = typeof(GetAzureSqlDatabaseServiceObjective); + UnitTestHelper.CheckConfirmImpact(cmdlet, ConfirmImpact.None); + UnitTestHelper.CheckCmdletModifiesData(cmdlet, false); + + object[] cmdletAttributes = cmdlet.GetCustomAttributes(typeof(CmdletAttribute), true); + Assert.AreEqual(1, cmdletAttributes.Length); + CmdletAttribute attribute = (CmdletAttribute)cmdletAttributes[0]; + Assert.AreEqual("ByConnectionContext", attribute.DefaultParameterSetName); + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/DatabaseCopyCmdletAttributionTests.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/DatabaseCopyCmdletAttributionTests.cs new file mode 100644 index 000000000000..b83700fa0066 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/DatabaseCopyCmdletAttributionTests.cs @@ -0,0 +1,53 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Database.Cmdlet; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Database.Cmdlet +{ + /// + /// These tests prevent regression in parameter validation attributes. + /// + [TestClass] + public class DatabaseCopyCmdletAttributionTests : TestBase + { + [TestMethod] + public void GetAzureSqlDatabaseCopyAttributeTest() + { + Type cmdlet = typeof(GetAzureSqlDatabaseCopy); + UnitTestHelper.CheckConfirmImpact(cmdlet, ConfirmImpact.None); + UnitTestHelper.CheckCmdletModifiesData(cmdlet, false); + } + + [TestMethod] + public void StartAzureSqlDatabaseCopyAttributeTest() + { + Type cmdlet = typeof(StartAzureSqlDatabaseCopy); + UnitTestHelper.CheckConfirmImpact(cmdlet, ConfirmImpact.Low); + UnitTestHelper.CheckCmdletModifiesData(cmdlet, true); + } + + [TestMethod] + public void StopAzureSqlDatabaseCopyAttributeTest() + { + Type cmdlet = typeof(StopAzureSqlDatabaseCopy); + UnitTestHelper.CheckConfirmImpact(cmdlet, ConfirmImpact.Medium); + UnitTestHelper.CheckCmdletModifiesData(cmdlet, true); + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/DatabaseTestHelper.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/DatabaseTestHelper.cs new file mode 100644 index 000000000000..eb4ef2a0a4d0 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/DatabaseTestHelper.cs @@ -0,0 +1,230 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Common; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.MockServer; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Database.Cmdlet +{ + public static class DatabaseTestHelper + { + /// + /// The unique GUID for identifying the Shared SLO. + /// + public static readonly Guid SharedSloGuid = new Guid("910b4fcb-8a29-4c3e-958f-f7ba794388b2"); + + /// + /// The unique GUID for identifying the System SLO. + /// + public static readonly Guid SystemSloGuid = new Guid("26e021db-f1f9-4c98-84c6-92af8ef433d7"); + + /// + /// The unique GUID for identifying the Basic SLO. + /// + public static readonly Guid BasicSloGuid = new Guid("dd6d99bb-f193-4ec1-86f2-43d3bccbc49c"); + + /// + /// The unique GUID for identifying the Standard S2 SLO. + /// + public static readonly Guid StandardS2SloGuid = new Guid("455330e1-00cd-488b-b5fa-177c226f28b7"); + + /// + /// The unique GUID for identifying the Standard S1 SLO. + /// + public static readonly Guid StandardS1SloGuid = new Guid("1b1ebd4d-d903-4baa-97f9-4ea675f5e928"); + + /// + /// The unique GUID for identifying the Premium P1 SLO. + /// + public static readonly Guid PremiumP1SloGuid = new Guid("7203483a-c4fb-4304-9e9f-17c71c904f5d"); + + /// + /// The unique GUID for identifying the Premium P2 SLO. + /// + public static readonly Guid PremiumP2SloGuid = new Guid("a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0"); + + /// + /// The unique GUID for identifying the Premium P3 SLO. + /// + public static readonly Guid PremiumP3SloGuid = new Guid("a7c4c615-cfb1-464b-b252-925be0a19446"); + + + /// + /// Set the default mock session settings to modify request and responses. + /// + /// + public static void SetDefaultTestSessionSettings(HttpSession testSession) + { + testSession.ServiceBaseUri = MockServerHelper.CommonServiceBaseUri; + testSession.SessionProperties["Servername"] = "myserver01"; + testSession.SessionProperties["Username"] = "testuser"; + testSession.SessionProperties["Password"] = "testp@ss1"; + testSession.ResponseModifier = + new Action( + (message) => + { + DatabaseTestHelper.FixODataResponseUri( + message.ResponseInfo, + testSession.ServiceBaseUri, + MockHttpServer.DefaultServerPrefixUri); + }); + testSession.RequestModifier = + new Action( + (request) => + { + DatabaseTestHelper.FixODataRequestPayload( + request, + testSession.ServiceBaseUri, + MockHttpServer.DefaultServerPrefixUri); + }); + } + + /// + /// Helper function to validate headers for GetAccessToken request. + /// + public static void ValidateGetAccessTokenRequest( + HttpMessage.Request expected, + HttpMessage.Request actual) + { + Assert.IsTrue( + actual.RequestUri.AbsoluteUri.EndsWith("GetAccessToken"), + "Incorrect Uri specified for GetAccessToken"); + Assert.IsTrue( + actual.Headers.Contains("sqlauthorization"), + "sqlauthorization header does not exist in the request"); + Assert.AreEqual( + expected.Headers["sqlauthorization"], + actual.Headers["sqlauthorization"], + "sqlauthorization header does not match"); + Assert.IsNull( + actual.RequestText, + "There should be no request text for GetAccessToken"); + } + + /// + /// Helper function to validate headers for Service request. + /// + public static void ValidateHeadersForServiceRequest( + HttpMessage.Request expected, + HttpMessage.Request actual) + { + Assert.IsTrue( + actual.Headers.Contains(DataServiceConstants.AccessTokenHeader), + "AccessToken header does not exist in the request"); + Assert.IsTrue( + actual.Headers.Contains("x-ms-client-session-id"), + "session-id header does not exist in the request"); + Assert.IsTrue( + actual.Headers.Contains("x-ms-client-request-id"), + "request-id header does not exist in the request"); + Assert.IsTrue( + actual.Cookies.Contains(DataServiceConstants.AccessCookie), + "AccessCookie does not exist in the request"); + } + + /// + /// Helper function to validate headers for OData request. + /// + public static void ValidateHeadersForODataRequest( + HttpMessage.Request expected, + HttpMessage.Request actual) + { + DatabaseTestHelper.ValidateHeadersForServiceRequest(expected, actual); + Assert.IsTrue( + actual.Headers.Contains("DataServiceVersion"), + "DataServiceVersion header does not exist in the request"); + Assert.AreEqual( + expected.Headers["DataServiceVersion"], + actual.Headers["DataServiceVersion"], + "DataServiceVersion header does not match"); + } + + /// + /// Modifies the OData get responses to use the mock server's Uri. + /// + public static void FixODataResponseUri( + HttpMessage.Response response, + Uri serviceUri, + Uri mockServerUri) + { + if (serviceUri != null && + response.ResponseText.Contains("dataservices") && + response.ResponseText.Contains("")) + { + response.ResponseText = + response.ResponseText.Replace(serviceUri.ToString(), mockServerUri.ToString()); + } + + if (serviceUri != null && + response.Headers.Contains("Location")) + { + response.Headers["Location"] = response.Headers["Location"].Replace( + serviceUri.ToString(), + mockServerUri.ToString()); + } + } + + /// + /// Modifies the OData get request to use the real server's Uri. + /// + public static void FixODataRequestPayload( + HttpMessage.Request request, + Uri serviceUri, + Uri mockServerUri) + { + // Fix the $link Uris + if (serviceUri != null && + request.RequestText != null && + request.RequestText.Contains("dataservices")) + { + request.RequestText = + request.RequestText.Replace(mockServerUri.ToString(), serviceUri.ToString()); + } + } + + /// + /// Validate the properties of a database against the expected values supplied as input. + /// + /// The database object to validate + /// The expected name of the database + /// The expected edition of the database + /// The expected max size of the database in GB + /// The expected Collation of the database + /// The expected Service Objective name + /// Whether or not the database is expected to be a system object. + internal static void ValidateDatabaseProperties( + Services.Server.Database database, + string name, + string edition, + int maxSizeGb, + long maxSizeBytes, + string collation, + string sloName, + bool isSystem, + Guid? assignedServiceObjectiveId) + { + Assert.AreEqual(name, database.Name); + Assert.AreEqual(edition, database.Edition); + Assert.AreEqual(maxSizeGb, database.MaxSizeGB); + Assert.AreEqual(maxSizeBytes, database.MaxSizeBytes); + Assert.AreEqual(collation, database.CollationName); + Assert.AreEqual(sloName, database.ServiceObjective.Name); + Assert.AreEqual(isSystem, database.IsSystemObject); + Assert.AreEqual(assignedServiceObjectiveId, database.AssignedServiceObjectiveId); + } + + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetAzureSqlDatabaseOperationTests.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetAzureSqlDatabaseOperationTests.cs new file mode 100644 index 000000000000..faaad466bffa --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetAzureSqlDatabaseOperationTests.cs @@ -0,0 +1,163 @@ +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.ObjectModel; +using System.Linq; +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.MockServer; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Database.Cmdlet +{ + [TestClass] + public class GetAzureSqlDatabaseOperationTests : TestBase + { + [TestCleanup] + public void CleanupTest() + { + // Save the mock session results + MockServerHelper.SaveDefaultSessionCollection(); + } + + /// + /// Create a database on the given context then get the operations on that database. + /// + /// The powershell instance containing the context. + /// The variable name that holds the server context. + [TestMethod] + public void GetAzureSqlDatabaseOperationWithSqlAuth() + { + using (System.Management.Automation.PowerShell powershell = + System.Management.Automation.PowerShell.Create()) + { + NewAzureSqlDatabaseServerContextTests.CreateServerContextSqlAuth( + powershell, + "$context"); + HttpSession testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTest.Common.GetAzureSqlDatabaseOperationWithSqlAuth"); + DatabaseTestHelper.SetDefaultTestSessionSettings(testSession); + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + switch (expected.Index) + { + // Request 0-7: Create and Query $testdb + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + // Request 8: Delete $testdb + case 8: + // Request 9-11: Query Database Operations + case 9: + case 10: + case 11: + DatabaseTestHelper.ValidateHeadersForODataRequest( + expected.RequestInfo, + actual); + break; + default: + Assert.Fail("No more requests expected."); + break; + } + }); + + using (AsyncExceptionManager exceptionManager = new AsyncExceptionManager()) + { + // There is a known issue about the Get-AzureSqlDatabaseOperation that it returns all + // operations which has the required database name no matter it's been deleted and recreated. + // So when run it against the mock session, please use the hard coded testsDBName. + // Run against onebox, please use the one with NewGuid(). + // This unit test should be updated once that behavior get changed which was already been + // created as a task. + + // string testsDBName = string.Format("getAzureSqlDatabaseOperationTestsDB_{0}", + // Guid.NewGuid().ToString()); + string testsDBName = "getAzureSqlDatabaseOperationTestsDB_08ebd7c9-bfb7-426a-9e2f-9921999567e1"; + Collection database, operationsByName, operationsByDatabase, operationsById; + using (new MockHttpServer( + exceptionManager, + MockHttpServer.DefaultServerPrefixUri, + testSession)) + { + database = powershell.InvokeBatchScript( + string.Format( + @"$testdb = New-AzureSqlDatabase " + + @"-Context $context " + + @"-DatabaseName {0} " + + @"-Force", testsDBName), + @"$testdb"); + + powershell.InvokeBatchScript( + string.Format( + @"Remove-AzureSqlDatabase " + + @"-Context $context " + + @"-DatabaseName {0} " + + @"-Force", testsDBName)); + + operationsByName = powershell.InvokeBatchScript( + string.Format( + @"$operations = Get-AzureSqlDatabaseOperation " + + @"-ConnectionContext $context " + + @"-DatabaseName {0}", + testsDBName), + @"$operations"); + + operationsByDatabase = powershell.InvokeBatchScript( + @"Get-AzureSqlDatabaseOperation " + + @"-ConnectionContext $context " + + @"-Database $testdb"); + + operationsById = powershell.InvokeBatchScript( + @"Get-AzureSqlDatabaseOperation " + + @"-ConnectionContext $context " + + @"-OperationGuid $operations[0].Id" + ); + } + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Warnings during run!"); + powershell.Streams.ClearStreams(); + + VerifyGetOperationsResult(testsDBName, operationsByName); + VerifyGetOperationsResult(testsDBName, operationsByDatabase); + // Update this verification once Task 1615375:Adding Drop record in dm_operation_status resolved + VerifyGetOperationsResult(testsDBName, operationsById); + } + } + } + + private static void VerifyGetOperationsResult(string testsDBName, Collection operationsByName) + { + DatabaseOperation[] operations = operationsByName.Select(r => r.BaseObject as DatabaseOperation).ToArray(); ; + // Task 1615375:Adding Drop record in dm_operation_status + // There is a known issue that Drop record is not included in the DatabaseOperation log + // Once that's done We should change the assert to + // Assert.AreEqual(2, operations.Length, "Expecting one DatabaseOperation"); + Assert.AreEqual(1, operations.Length, "Expecting one DatabaseOperation."); + Assert.IsNotNull(operations[0], "Expecting a DatabaseOperation object."); + Assert.AreEqual(testsDBName, operations[0].DatabaseName, "Database name does NOT match."); + Assert.AreEqual("CREATE DATABASE", operations[0].Name, "Operation name does NOT match."); + Assert.AreEqual(100, operations[0].PercentComplete, "Operation should be 100 percent complete."); + Assert.AreEqual("COMPLETED", operations[0].State, "Operation state should be COMPLETED."); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetAzureSqlDatabaseServiceObjectiveTests.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetAzureSqlDatabaseServiceObjectiveTests.cs new file mode 100644 index 000000000000..3fb3a8549545 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetAzureSqlDatabaseServiceObjectiveTests.cs @@ -0,0 +1,120 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.ObjectModel; +using System.Linq; +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.MockServer; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Database.Cmdlet +{ + [TestClass] + public class GetAzureSqlDatabaseServiceObjectiveTests : TestBase + { + [TestCleanup] + public void CleanupTest() + { + MockServerHelper.SaveDefaultSessionCollection(); + } + + [TestMethod] + public void GetAzureSqlDatabaseServiceObjectiveWithSqlAuth() + { + using (System.Management.Automation.PowerShell powershell = + System.Management.Automation.PowerShell.Create()) + { + // Create a context + NewAzureSqlDatabaseServerContextTests.CreateServerContextSqlAuth( + powershell, + "$context"); + + HttpSession testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTests.GetAzureSqlServiceObjectiveWithSqlAuth"); + DatabaseTestHelper.SetDefaultTestSessionSettings(testSession); + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + switch (expected.Index) + { + // Request 0-6: Retrieving all (6) ServiceObjectives and DimensionSettings + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + // Request 7-8: Retrieving Reserved P1 ServiceObjectives and DimensionSettings + case 7: + case 8: + DatabaseTestHelper.ValidateHeadersForODataRequest( + expected.RequestInfo, + actual); + break; + default: + Assert.Fail("No more requests expected."); + break; + } + }); + testSession.ResponseModifier = + new Action( + (message) => + { + DatabaseTestHelper.FixODataResponseUri( + message.ResponseInfo, + testSession.ServiceBaseUri, + MockHttpServer.DefaultServerPrefixUri); + }); + + using (AsyncExceptionManager exceptionManager = new AsyncExceptionManager()) + { + Collection objectives, objective1; + using (new MockHttpServer( + exceptionManager, + MockHttpServer.DefaultServerPrefixUri, + testSession)) + { + objectives = powershell.InvokeBatchScript( + @"Get-AzureSqlDatabaseServiceObjective " + + @"-Context $context"); + + objective1 = powershell.InvokeBatchScript( + @"Get-AzureSqlDatabaseServiceObjective " + + @"-Context $context " + + @"-ServiceObjectiveName ""P1"""); + } + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Warnings during run!"); + powershell.Streams.ClearStreams(); + + Assert.AreEqual(6, objectives.Count, "Expecting 6 Objective objects"); + + Assert.IsTrue( + objective1.Single().BaseObject is Services.Server.ServiceObjective, + "Expecting a ServiceObjective object"); + Services.Server.ServiceObjective objective1Obj = + (Services.Server.ServiceObjective)objective1.Single().BaseObject; + Assert.AreEqual("P1", objective1Obj.Name, "Expected objective name to be 'Reserved P1'"); + } + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetAzureSqlDatabaseTests.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetAzureSqlDatabaseTests.cs new file mode 100644 index 000000000000..991aaed2bb6e --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetAzureSqlDatabaseTests.cs @@ -0,0 +1,272 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.ObjectModel; +using System.Linq; +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.MockServer; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Database.Cmdlet +{ + [TestClass] + public class GetAzureSqlDatabaseTests : TestBase + { + [TestInitialize] + public void InitializeTest() + { + // Create 2 test databases + NewAzureSqlDatabaseTests.CreateTestDatabasesWithSqlAuth(); + } + + [TestCleanup] + public void CleanupTest() + { + // Remove the test databases + NewAzureSqlDatabaseTests.RemoveTestDatabasesWithSqlAuth(); + + // Save the mock session results + MockServerHelper.SaveDefaultSessionCollection(); + } + + [TestMethod] + public void GetAzureSqlDatabaseWithSqlAuth() + { + using (System.Management.Automation.PowerShell powershell = + System.Management.Automation.PowerShell.Create()) + { + // Create a context + NewAzureSqlDatabaseServerContextTests.CreateServerContextSqlAuth( + powershell, + "$context"); + + // Query the created test databases + HttpSession testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTests.GetAzureSqlDatabaseWithSqlAuth"); + DatabaseTestHelper.SetDefaultTestSessionSettings(testSession); + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + // 0 - 5 + // Get all databases + ServiceObjective lookup + // 6 - 11 + // get database requests, 2 requests per get. + if(expected.Index > 11) + { + Assert.Fail("No More Requests Expected"); + } + else + { + DatabaseTestHelper.ValidateHeadersForODataRequest( + expected.RequestInfo, + actual); + } + }); + + using (AsyncExceptionManager exceptionManager = new AsyncExceptionManager()) + { + // Retrieve all databases then each individual ones + Collection databases, database1, database2, database3; + using (new MockHttpServer( + exceptionManager, + MockHttpServer.DefaultServerPrefixUri, + testSession)) + { + databases = powershell.InvokeBatchScript( + @"Get-AzureSqlDatabase " + + @"-Context $context"); + database1 = powershell.InvokeBatchScript( + @"Get-AzureSqlDatabase " + + @"-Context $context " + + @"-DatabaseName testdb1"); + database2 = powershell.InvokeBatchScript( + @"Get-AzureSqlDatabase " + + @"-Context $context " + + @"-DatabaseName testdb2"); + database3 = powershell.InvokeBatchScript( + @"Get-AzureSqlDatabase " + + @"-Context $context " + + @"-DatabaseName testdb3"); + } + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Warnings during run!"); + powershell.Streams.ClearStreams(); + + // Expecting master, testdb1, testdb2, testdb3 + Assert.AreEqual(4, databases.Count, "Expecting four Database objects"); + + Services.Server.Database database = database1.Single().BaseObject as Services.Server.Database; + Assert.IsNotNull(database, "Expecting a Database object"); + DatabaseTestHelper.ValidateDatabaseProperties(database, "testdb1", "Web", 1, 1073741824L, "SQL_Latin1_General_CP1_CI_AS", "Shared", false, DatabaseTestHelper.SharedSloGuid); + + database = database2.Single().BaseObject as Services.Server.Database; + Assert.IsTrue(database != null, "Expecting a Database object"); + DatabaseTestHelper.ValidateDatabaseProperties(database, "testdb2", "Web", 5, 5368709120L, "Japanese_CI_AS", "Shared", false, DatabaseTestHelper.SharedSloGuid); + + database = database3.Single().BaseObject as Services.Server.Database; + Assert.IsTrue(database != null, "Expecting a Database object"); + DatabaseTestHelper.ValidateDatabaseProperties(database, "testdb3", "Web", 0, 104857600L, "SQL_Latin1_General_CP1_CI_AS", "Shared", false, DatabaseTestHelper.SharedSloGuid); + } + } + } + + [TestMethod] + public void GetAzureSqlDatabaseWithSqlAuthByPipe() + { + using (System.Management.Automation.PowerShell powershell = + System.Management.Automation.PowerShell.Create()) + { + // Create a context + NewAzureSqlDatabaseServerContextTests.CreateServerContextSqlAuth( + powershell, + "$context"); + + // Query the created test databases + HttpSession testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTests.GetAzureSqlDatabaseWithSqlAuthByPipe"); + DatabaseTestHelper.SetDefaultTestSessionSettings(testSession); + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + if (expected.Index < 12) + { + // Request 0-3: Get all databases + ServiceObjectives requests + // Request 4-11: 4 Get databases, 2 requests per get call + DatabaseTestHelper.ValidateHeadersForODataRequest( + expected.RequestInfo, + actual); + } + else + { + Assert.Fail("No more requests expected."); + } + }); + + using (AsyncExceptionManager exceptionManager = new AsyncExceptionManager()) + { + Collection databases, database1, database2; + using (new MockHttpServer( + exceptionManager, + MockHttpServer.DefaultServerPrefixUri, + testSession)) + { + databases = powershell.InvokeBatchScript( + @"Get-AzureSqlDatabase " + + @"-Context $context"); + powershell.InvokeBatchScript( + @"$testdb1 = Get-AzureSqlDatabase $context -DatabaseName testdb1"); + powershell.InvokeBatchScript( + @"$testdb2 = Get-AzureSqlDatabase $context -DatabaseName testdb2"); + database1 = powershell.InvokeBatchScript( + @"$testdb1 | Get-AzureSqlDatabase"); + database2 = powershell.InvokeBatchScript( + @"$testdb2 | Get-AzureSqlDatabase"); + } + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Warnings during run!"); + powershell.Streams.ClearStreams(); + + // Expecting master, testdb1, testdb2 + Assert.AreEqual( + 3, + databases.Count, + "Expecting three Database objects"); + + Services.Server.Database database1Obj = database1.Single().BaseObject as Services.Server.Database; + Assert.IsNotNull(database1Obj, "Expecting a Database object"); + DatabaseTestHelper.ValidateDatabaseProperties(database1Obj, "testdb1", "Web", 1, 1073741824L, "SQL_Latin1_General_CP1_CI_AS", "Shared", false, DatabaseTestHelper.SharedSloGuid); + + Services.Server.Database database2Obj = database2.Single().BaseObject as Services.Server.Database; + Assert.IsNotNull(database2Obj, "Expecting a Database object"); + DatabaseTestHelper.ValidateDatabaseProperties(database2Obj, "testdb2", "Web", 5, 5368709120L, "Japanese_CI_AS", "Shared", false, DatabaseTestHelper.SharedSloGuid); + } + } + } + + [TestMethod] + public void GetAzureSqlDatabaseWithSqlAuthNonExistentDb() + { + using (System.Management.Automation.PowerShell powershell = + System.Management.Automation.PowerShell.Create()) + { + // Create a context + NewAzureSqlDatabaseServerContextTests.CreateServerContextSqlAuth( + powershell, + "$context"); + + // Query a non-existent test database + HttpSession testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTests.GetAzureSqlDatabaseWithSqlAuthNonExistentDb"); + DatabaseTestHelper.SetDefaultTestSessionSettings(testSession); + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + switch (expected.Index) + { + // Request 0-2: Get database requests + case 0: + DatabaseTestHelper.ValidateHeadersForODataRequest( + expected.RequestInfo, + actual); + break; + default: + Assert.Fail("No more requests expected."); + break; + } + }); + + using (AsyncExceptionManager exceptionManager = new AsyncExceptionManager()) + { + using (new MockHttpServer( + exceptionManager, + MockHttpServer.DefaultServerPrefixUri, + testSession)) + { + powershell.InvokeBatchScript( + @"Get-AzureSqlDatabase " + + @"-Context $context " + + @"-DatabaseName testdb3"); + } + } + + Assert.AreEqual(1, powershell.Streams.Error.Count, "Expecting errors"); + Assert.AreEqual(2, powershell.Streams.Warning.Count, "Expecting tracing IDs"); + Assert.AreEqual( + "Database 'myserver01.testdb3' not found.", + powershell.Streams.Error.First().Exception.Message, + "Unexpected error message"); + Assert.IsTrue( + powershell.Streams.Warning.Any(w => w.Message.StartsWith("Client Session Id")), + "Expecting Client Session Id"); + Assert.IsTrue( + powershell.Streams.Warning.Any(w => w.Message.StartsWith("Client Request Id")), + "Expecting Client Request Id"); + powershell.Streams.ClearStreams(); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetRecoverableDatabaseTests.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetRecoverableDatabaseTests.cs new file mode 100644 index 000000000000..5238f23ab686 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetRecoverableDatabaseTests.cs @@ -0,0 +1,281 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.ObjectModel; +using System.Globalization; +using System.Linq; +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.MockServer; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Server.Cmdlet; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.Utilities; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Sql.Models; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Database.Cmdlet +{ + [TestClass] + public class GetRecoverableDatabaseTests : TestBase + { + private static System.Management.Automation.PowerShell powershell; + + private static string serverName; + + [ClassInitialize] + public static void InitializeClass(TestContext context) + { + powershell = System.Management.Automation.PowerShell.Create(); + + MockHttpServer.SetupCertificates(); + + UnitTestHelper.SetupUnitTestSubscription(powershell); + + serverName = SqlDatabaseTestSettings.Instance.ServerName; + powershell.Runspace.SessionStateProxy.SetVariable("serverName", serverName); + } + + [TestCleanup] + public void CleanupTest() + { + powershell.Streams.ClearStreams(); + + // Save the mock session results + MockServerHelper.SaveDefaultSessionCollection(); + } + + /// + /// Test Get/Set/Remove a database using certificate authentication. + /// + [TestMethod] + public void GetRecoverableDatabase() + { + var testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTest.GetRecoverableDatabase"); + ServerTestHelper.SetDefaultTestSessionSettings(testSession); + + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.IsTrue( + actual.UserAgent.Contains(ApiConstants.UserAgentHeaderValue), + "Missing proper UserAgent string."); + }); + + using (var exceptionManager = new AsyncExceptionManager()) + { + Collection databases, database1, database2; + + using(new MockHttpServer(exceptionManager, MockHttpServer.DefaultHttpsServerPrefixUri, testSession)) + { + databases = powershell.InvokeBatchScript( + @"Get-AzureSqlRecoverableDatabase -ServerName $serverName"); + } + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Warnings during run!"); + powershell.Streams.ClearStreams(); + + // Expecting testdb1, testdb2, possibly dropped databases from previous runs + Assert.IsTrue( + databases.Count >= 2, + "Expecting at-least two RecoverableDatabase objects"); + + Assert.IsTrue( + databases[0].BaseObject is RecoverableDatabase, + "Expecting a RecoverableDatabase object"); + + Assert.IsInstanceOfType( + databases[1].BaseObject, typeof(RecoverableDatabase), + "Expecting a RecoverableDatabase object"); + + var database1Object = (RecoverableDatabase)databases[0].BaseObject; + + var database2Object = (RecoverableDatabase)databases[1].BaseObject; + + using (new MockHttpServer( + exceptionManager, MockHttpServer.DefaultHttpsServerPrefixUri, testSession)) + { + database1 = powershell.InvokeBatchScript( + @"Get-AzureSqlRecoverableDatabase " + + @"-ServerName $serverName " + + @"-DatabaseName " + database1Object.Name); + database2 = powershell.InvokeBatchScript( + @"Get-AzureSqlRecoverableDatabase " + + @"-ServerName $serverName " + + @"-DatabaseName " + database2Object.Name); + } + + Assert.IsInstanceOfType( + database1.Single().BaseObject, typeof(RecoverableDatabase), + "Expecting a RecoverableDatabase object"); + var refreshedDatabase1Object = (RecoverableDatabase)database1.Single().BaseObject; + Assert.AreEqual( + database1Object.Name, refreshedDatabase1Object.Name, + "Expected db name to be " + database1Object.Name); + + Assert.IsInstanceOfType( + database2.Single().BaseObject, typeof(RecoverableDatabase), + "Expecting a RecoverableDatabase object"); + var refreshedDatabase2Object = (RecoverableDatabase)database2.Single().BaseObject; + Assert.AreEqual( + database2Object.Name, refreshedDatabase2Object.Name, + "Expected db name to be " + database2Object.Name); + Assert.AreEqual( + database2Object.Edition, refreshedDatabase2Object.Edition, + "Expected edition to be " + database2Object.Edition); + } + } + + [TestMethod] + public void GetRecoverableDatabaseByPipe() + { + var testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTest.GetRecoverableDatabaseByPipe"); + ServerTestHelper.SetDefaultTestSessionSettings(testSession); + + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.IsTrue( + actual.UserAgent.Contains(ApiConstants.UserAgentHeaderValue), + "Missing proper UserAgent string."); + }); + + using (var exceptionManager = new AsyncExceptionManager()) + { + Collection databases, database1, database2; + using (new MockHttpServer( + exceptionManager, MockHttpServer.DefaultHttpsServerPrefixUri, testSession)) + { + databases = powershell.InvokeBatchScript( + @"Get-AzureSqlRecoverableDatabase " + + @"-ServerName $serverName"); + } + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Warnings during run!"); + powershell.Streams.ClearStreams(); + + // Expecting testdb1, testdb2, possibly dropped databases from previous runs + Assert.IsTrue( + databases.Count >= 2, + "Expecting at-least two RecoverableDatabase objects"); + + Assert.IsInstanceOfType( + databases[0].BaseObject, typeof(RecoverableDatabase), + "Expecting a RecoverableDatabase object"); + + Assert.IsInstanceOfType( + databases[1].BaseObject, typeof(RecoverableDatabase), + "Expecting a RecoverableDatabase object"); + + var database1Object = (RecoverableDatabase)databases[0].BaseObject; + + var database2Object = (RecoverableDatabase)databases[1].BaseObject; + + using (new MockHttpServer( + exceptionManager, MockHttpServer.DefaultHttpsServerPrefixUri, testSession)) + { + powershell.InvokeBatchScript( + @"$testdb1 = Get-AzureSqlRecoverableDatabase " + + @"-ServerName $serverName " + + @"-DatabaseName " + database1Object.Name); + + powershell.InvokeBatchScript( + @"$testdb2 = Get-AzureSqlRecoverableDatabase " + + @"-ServerName $serverName " + + @"-DatabaseName " + database2Object.Name); + + database1 = powershell.InvokeBatchScript( + @"$testdb1 | Get-AzureSqlRecoverableDatabase"); + + database2 = powershell.InvokeBatchScript( + @"$testdb2 | Get-AzureSqlRecoverableDatabase"); + } + + Assert.IsInstanceOfType( + database1.Single().BaseObject, typeof(RecoverableDatabase), + "Expecting a RecoverableDatabase object"); + var refreshedDatabase1Object = (RecoverableDatabase)database1.Single().BaseObject; + Assert.AreEqual( + database1Object.Name, refreshedDatabase1Object.Name, + "Expected db name to be " + database1Object.Name); + + Assert.IsInstanceOfType( + database2.Single().BaseObject, typeof(RecoverableDatabase), + "Expecting a RecoverableDatabase object"); + var refreshedDatabase2Object = (RecoverableDatabase)database2.Single().BaseObject; + Assert.AreEqual( + database2Object.Name, refreshedDatabase2Object.Name, + "Expected db name to be " + database2Object.Name); + Assert.AreEqual( + database2Object.Edition, refreshedDatabase2Object.Edition, + "Expected edition to be " + database2Object.Edition); + } + } + + [TestMethod] + public void GetRecoverableDatabaseNonExistentDb() + { + var testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTest.GetRecoverableDatabaseNonExistentDb"); + ServerTestHelper.SetDefaultTestSessionSettings(testSession); + + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.IsTrue( + actual.UserAgent.Contains(ApiConstants.UserAgentHeaderValue), + "Missing proper UserAgent string."); + }); + + using (var exceptionManager = new AsyncExceptionManager()) + { + using (new MockHttpServer( + exceptionManager, MockHttpServer.DefaultHttpsServerPrefixUri, testSession)) + { + powershell.InvokeBatchScript( + @"Get-AzureSqlRecoverableDatabase " + + @"-ServerName $serverName " + + @"-DatabaseName testdbnonexistent"); + } + + Assert.AreEqual( + 1, powershell.Streams.Error.Count, + "Expecting errors"); + Assert.AreEqual( + 1, powershell.Streams.Warning.Count, + "Expecting tracing IDs"); + Assert.AreEqual( + string.Format( + CultureInfo.InvariantCulture, + "Resource with the name '{0}' does not exist. To continue, specify a valid resource name.", + "testdbnonexistent"), + powershell.Streams.Error.First().Exception.Message, + "Unexpected error message"); + Assert.IsTrue( + powershell.Streams.Warning[0].Message.StartsWith("Request Id"), + "Expecting Client Request Id"); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetRestorableDroppedDatabaseCertAuthTests.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetRestorableDroppedDatabaseCertAuthTests.cs new file mode 100644 index 000000000000..f153fc4f99b4 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetRestorableDroppedDatabaseCertAuthTests.cs @@ -0,0 +1,308 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.ObjectModel; +using System.Globalization; +using System.Linq; +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Test.Common; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.MockServer; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Server.Cmdlet; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.Utilities; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Database.Cmdlet +{ + [TestClass] + public class GetRestorableDroppedDatabaseCertAuthTests : TestBase + { + private const string deletionDateStringFormat = "yyyy-MM-ddTHH:mm:ss.FFFZ"; + + private static System.Management.Automation.PowerShell powershell; + + private static string serverName; + + [ClassInitialize] + public static void InitializeClass(TestContext context) + { + powershell = System.Management.Automation.PowerShell.Create(); + + MockHttpServer.SetupCertificates(); + + UnitTestHelper.SetupUnitTestSubscription(powershell); + + serverName = SqlDatabaseTestSettings.Instance.ServerName; + powershell.Runspace.SessionStateProxy.SetVariable("serverName", serverName); + + // Create atleast two test databases + NewAzureSqlDatabaseTests.CreateTestDatabasesWithCertAuth(powershell); + + // Remove the test databases + NewAzureSqlDatabaseTests.RemoveTestDatabasesWithCertAuth(powershell); + } + + [TestCleanup] + public void CleanupTest() + { + powershell.Streams.ClearStreams(); + + // Save the mock session results + MockServerHelper.SaveDefaultSessionCollection(); + } + + /// + /// Test Get/Set/Remove a database using certificate authentication. + /// + [TestMethod] + public void GetRestorableDroppedDatabaseWithCertAuth() + { + var testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTest.GetRestorableDroppedDatabaseWithCertAuth"); + ServerTestHelper.SetDefaultTestSessionSettings(testSession); + + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.IsTrue( + actual.UserAgent.Contains(ApiConstants.UserAgentHeaderValue), + "Missing proper UserAgent string."); + }); + + using (var exceptionManager = new AsyncExceptionManager()) + { + Collection databases, database1, database2; + + using(new MockHttpServer(exceptionManager, MockHttpServer.DefaultHttpsServerPrefixUri, testSession)) + { + databases = powershell.InvokeBatchScript( + @"Get-AzureSqlDatabase -RestorableDropped -ServerName $serverName"); + } + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Warnings during run!"); + powershell.Streams.ClearStreams(); + + // Expecting testdb1, testdb2, possibly dropped databases from previous runs + Assert.IsTrue( + databases.Count >= 2, + "Expecting at-least two RestorableDroppedDatabase objects"); + + Assert.IsTrue( + databases[0].BaseObject is RestorableDroppedDatabase, + "Expecting a RestorableDroppedDatabase object"); + + Assert.IsTrue( + databases[1].BaseObject is RestorableDroppedDatabase, + "Expecting a RestorableDroppedDatabase object"); + + var database1Object = (RestorableDroppedDatabase)databases[0].BaseObject; + var database1DeletionDate = database1Object.DeletionDate.ToUniversalTime().ToString(deletionDateStringFormat); + + var database2Object = (RestorableDroppedDatabase)databases[1].BaseObject; + var database2DeletionDate = database2Object.DeletionDate.ToUniversalTime().ToString(deletionDateStringFormat); + + using (new MockHttpServer( + exceptionManager, MockHttpServer.DefaultHttpsServerPrefixUri, testSession)) + { + database1 = powershell.InvokeBatchScript( + @"Get-AzureSqlDatabase -RestorableDropped " + + @"-ServerName $serverName " + + @"-DatabaseName " + database1Object.Name + @" " + + @"-DatabaseDeletionDate " + database1DeletionDate); + database2 = powershell.InvokeBatchScript( + @"Get-AzureSqlDatabase -RestorableDropped " + + @"-ServerName $serverName " + + @"-DatabaseName " + database2Object.Name + @" " + + @"-DatabaseDeletionDate " + database2DeletionDate); + } + + Assert.IsTrue( + database1.Single().BaseObject is RestorableDroppedDatabase, + "Expecting a RestorableDroppedDatabase object"); + var refreshedDatabase1Object = (RestorableDroppedDatabase)database1.Single().BaseObject; + Assert.AreEqual( + database1Object.Name, refreshedDatabase1Object.Name, + "Expected db name to be " + database1Object.Name); + + Assert.IsTrue( + database2.Single().BaseObject is RestorableDroppedDatabase, + "Expecting a RestorableDroppedDatabase object"); + var refreshedDatabase2Object = (RestorableDroppedDatabase)database2.Single().BaseObject; + Assert.AreEqual( + database2Object.Name, refreshedDatabase2Object.Name, + "Expected db name to be " + database2Object.Name); + Assert.AreEqual( + database2Object.Edition, refreshedDatabase2Object.Edition, + "Expected edition to be " + database2Object.Edition); + Assert.AreEqual( + database2Object.MaxSizeBytes, refreshedDatabase2Object.MaxSizeBytes, + "Expected max size to be " + database2Object.MaxSizeBytes); + } + } + + [TestMethod] + public void GetRestorableDroppedDatabaseWithCertAuthByPipe() + { + var testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTest.GetRestorableDroppedDatabaseWithCertAuthByPipe"); + ServerTestHelper.SetDefaultTestSessionSettings(testSession); + + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.IsTrue( + actual.UserAgent.Contains(ApiConstants.UserAgentHeaderValue), + "Missing proper UserAgent string."); + }); + + using (var exceptionManager = new AsyncExceptionManager()) + { + Collection databases, database1, database2; + using (new MockHttpServer( + exceptionManager, MockHttpServer.DefaultHttpsServerPrefixUri, testSession)) + { + databases = powershell.InvokeBatchScript( + @"Get-AzureSqlDatabase -RestorableDropped " + + @"-ServerName $serverName"); + } + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Warnings during run!"); + powershell.Streams.ClearStreams(); + + // Expecting testdb1, testdb2, possibly dropped databases from previous runs + Assert.IsTrue( + databases.Count >= 2, + "Expecting at-least two RestorableDroppedDatabase objects"); + + Assert.IsTrue( + databases[0].BaseObject is RestorableDroppedDatabase, + "Expecting a RestorableDroppedDatabase object"); + + Assert.IsTrue( + databases[1].BaseObject is RestorableDroppedDatabase, + "Expecting a RestorableDroppedDatabase object"); + + var database1Object = (RestorableDroppedDatabase)databases[0].BaseObject; + var database1DeletionDate = database1Object.DeletionDate.ToUniversalTime().ToString(deletionDateStringFormat); + + var database2Object = (RestorableDroppedDatabase)databases[1].BaseObject; + var database2DeletionDate = database2Object.DeletionDate.ToUniversalTime().ToString(deletionDateStringFormat); + + using (new MockHttpServer( + exceptionManager, MockHttpServer.DefaultHttpsServerPrefixUri, testSession)) + { + powershell.InvokeBatchScript( + @"$testdb1 = Get-AzureSqlDatabase -RestorableDropped " + + @"-ServerName $serverName " + + @"-DatabaseName " + database1Object.Name + @" " + + @"-DatabaseDeletionDate " + database1DeletionDate); + + powershell.InvokeBatchScript( + @"$testdb2 = Get-AzureSqlDatabase -RestorableDropped " + + @"-ServerName $serverName " + + @"-DatabaseName " + database2Object.Name + @" " + + @"-DatabaseDeletionDate " + database2DeletionDate); + + database1 = powershell.InvokeBatchScript( + @"$testdb1 | Get-AzureSqlDatabase"); + + database2 = powershell.InvokeBatchScript( + @"$testdb2 | Get-AzureSqlDatabase"); + } + + Assert.IsTrue( + database1.Single().BaseObject is RestorableDroppedDatabase, + "Expecting a RestorableDroppedDatabase object"); + var refreshedDatabase1Object = (RestorableDroppedDatabase)database1.Single().BaseObject; + Assert.AreEqual( + database1Object.Name, refreshedDatabase1Object.Name, + "Expected db name to be " + database1Object.Name); + + Assert.IsTrue( + database2.Single().BaseObject is RestorableDroppedDatabase, + "Expecting a RestorableDroppedDatabase object"); + var refreshedDatabase2Object = (RestorableDroppedDatabase)database2.Single().BaseObject; + Assert.AreEqual( + database2Object.Name, refreshedDatabase2Object.Name, + "Expected db name to be " + database2Object.Name); + Assert.AreEqual( + database2Object.Edition, refreshedDatabase2Object.Edition, + "Expected edition to be " + database2Object.Edition); + Assert.AreEqual( + database2Object.MaxSizeBytes, refreshedDatabase2Object.MaxSizeBytes, + "Expected max size to be " + database2Object.MaxSizeBytes); + } + } + + [TestMethod] + public void GetRestorableDroppedDatabaseWithCertAuthNonExistentDb() + { + var testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTest.GetRestorableDroppedDatabaseWithCertAuthNonExistentDb"); + ServerTestHelper.SetDefaultTestSessionSettings(testSession); + + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.IsTrue( + actual.UserAgent.Contains(ApiConstants.UserAgentHeaderValue), + "Missing proper UserAgent string."); + }); + + using (var exceptionManager = new AsyncExceptionManager()) + { + using (new MockHttpServer( + exceptionManager, MockHttpServer.DefaultHttpsServerPrefixUri, testSession)) + { + powershell.InvokeBatchScript( + @"Get-AzureSqlDatabase -RestorableDropped " + + @"-ServerName $serverName " + + @"-DatabaseName testdbnonexistent " + + @"-DatabaseDeletionDate '10/01/2013 12:00:00 AM'"); + } + + Assert.AreEqual( + 1, powershell.Streams.Error.Count, + "Expecting errors"); + Assert.AreEqual( + 1, powershell.Streams.Warning.Count, + "Expecting tracing IDs"); + Assert.AreEqual( + string.Format( + CultureInfo.InvariantCulture, + "Resource with the name '{0}' does not exist. To continue, specify a valid resource name.", + "testdbnonexistent,2013-10-01T00:00:00.000Z"), + powershell.Streams.Error.First().Exception.Message, + "Unexpected error message"); + Assert.IsTrue( + powershell.Streams.Warning[0].Message.StartsWith("Request Id"), + "Expecting Client Request Id"); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetRestorableDroppedDatabaseSqlAuthTests.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetRestorableDroppedDatabaseSqlAuthTests.cs new file mode 100644 index 000000000000..0e18f3e0e4ab --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/GetRestorableDroppedDatabaseSqlAuthTests.cs @@ -0,0 +1,320 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.ObjectModel; +using System.Globalization; +using System.Linq; +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.MockServer; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Database.Cmdlet +{ + [TestClass] + public class GetRestorableDroppedDatabaseSqlAuthTests : TestBase + { + private const string deletionDateStringFormat = "yyyy-MM-ddTHH:mm:ss.FFFZ"; + + [ClassInitialize] + public static void InitializeClass(TestContext context) + { + // Create atleast two test databases + NewAzureSqlDatabaseTests.CreateTestDatabasesWithSqlAuth(); + + // Remove the test databases + NewAzureSqlDatabaseTests.RemoveTestDatabasesWithSqlAuth(); + } + + [TestCleanup] + public void CleanupTest() + { + // Save the mock session results + MockServerHelper.SaveDefaultSessionCollection(); + } + + [TestMethod] + public void GetRestorableDroppedDatabaseWithSqlAuth() + { + using (var powershell = System.Management.Automation.PowerShell.Create()) + { + // Create a context + NewAzureSqlDatabaseServerContextTests.CreateServerContextSqlAuth(powershell, "$context"); + + var testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTests.GetRestorableDroppedDatabaseWithSqlAuth"); + DatabaseTestHelper.SetDefaultTestSessionSettings(testSession); + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + if (expected.Index < 3) + { + DatabaseTestHelper.ValidateHeadersForODataRequest(expected.RequestInfo, actual); + } + else + { + Assert.Fail("No more requests expected."); + } + }); + + using (var exceptionManager = new AsyncExceptionManager()) + { + Collection databases, database1, database2; + using (new MockHttpServer(exceptionManager, MockHttpServer.DefaultServerPrefixUri, testSession)) + { + databases = powershell.InvokeBatchScript( + @"Get-AzureSqlDatabase -RestorableDropped " + + @"-Context $context"); + } + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Warnings during run!"); + powershell.Streams.ClearStreams(); + + // Expecting testdb1, testdb2, possibly dropped databases from previous runs + Assert.IsTrue( + databases.Count >= 2, + "Expecting at-least two RestorableDroppedDatabase objects"); + + Assert.IsTrue( + databases[0].BaseObject is RestorableDroppedDatabase, + "Expecting a RestorableDroppedDatabase object"); + + Assert.IsTrue( + databases[1].BaseObject is RestorableDroppedDatabase, + "Expecting a RestorableDroppedDatabase object"); + + var database1Object = (RestorableDroppedDatabase)databases[0].BaseObject; + var database1DeletionDate = database1Object.DeletionDate.ToUniversalTime().ToString(deletionDateStringFormat); + + var database2Object = (RestorableDroppedDatabase)databases[1].BaseObject; + var database2DeletionDate = database2Object.DeletionDate.ToUniversalTime().ToString(deletionDateStringFormat); + + using (new MockHttpServer( + exceptionManager, MockHttpServer.DefaultServerPrefixUri, testSession)) + { + database1 = powershell.InvokeBatchScript( + @"Get-AzureSqlDatabase -RestorableDropped " + + @"-Context $context " + + @"-DatabaseName " + database1Object.Name + @" " + + @"-DatabaseDeletionDate " + database1DeletionDate); + database2 = powershell.InvokeBatchScript( + @"Get-AzureSqlDatabase -RestorableDropped " + + @"-Context $context " + + @"-DatabaseName " + database2Object.Name + @" " + + @"-DatabaseDeletionDate " + database2DeletionDate); + } + + Assert.IsTrue( + database1.Single().BaseObject is RestorableDroppedDatabase, + "Expecting a RestorableDroppedDatabase object"); + var refreshedDatabase1Object = (RestorableDroppedDatabase)database1.Single().BaseObject; + Assert.AreEqual( + database1Object.Name, refreshedDatabase1Object.Name, + "Expected db name to be " + database1Object.Name); + + Assert.IsTrue( + database2.Single().BaseObject is RestorableDroppedDatabase, + "Expecting a RestorableDroppedDatabase object"); + var refreshedDatabase2Object = (RestorableDroppedDatabase)database2.Single().BaseObject; + Assert.AreEqual( + database2Object.Name, refreshedDatabase2Object.Name, + "Expected db name to be " + database2Object.Name); + Assert.AreEqual( + database2Object.Edition, refreshedDatabase2Object.Edition, + "Expected edition to be " + database2Object.Edition); + Assert.AreEqual( + database2Object.MaxSizeBytes, refreshedDatabase2Object.MaxSizeBytes, + "Expected max size to be " + database2Object.MaxSizeBytes); + } + } + } + + [TestMethod] + public void GetRestorableDroppedDatabaseWithSqlAuthByPipe() + { + using (var powershell = System.Management.Automation.PowerShell.Create()) + { + // Create a context + NewAzureSqlDatabaseServerContextTests.CreateServerContextSqlAuth(powershell, "$context"); + + var testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTests.GetRestorableDroppedDatabaseWithSqlAuthByPipe"); + DatabaseTestHelper.SetDefaultTestSessionSettings(testSession); + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + if (expected.Index < 5) + { + DatabaseTestHelper.ValidateHeadersForODataRequest(expected.RequestInfo, actual); + } + else + { + Assert.Fail("No more requests expected."); + } + }); + + using (var exceptionManager = new AsyncExceptionManager()) + { + Collection databases, database1, database2; + using (new MockHttpServer( + exceptionManager, MockHttpServer.DefaultServerPrefixUri, testSession)) + { + databases = powershell.InvokeBatchScript( + @"Get-AzureSqlDatabase -RestorableDropped " + + @"-Context $context"); + } + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Warnings during run!"); + powershell.Streams.ClearStreams(); + + // Expecting testdb1, testdb2, possibly dropped databases from previous runs + Assert.IsTrue( + databases.Count >= 2, + "Expecting at-least two RestorableDroppedDatabase objects"); + + Assert.IsTrue( + databases[0].BaseObject is RestorableDroppedDatabase, + "Expecting a RestorableDroppedDatabase object"); + + Assert.IsTrue( + databases[1].BaseObject is RestorableDroppedDatabase, + "Expecting a RestorableDroppedDatabase object"); + + var database1Object = (RestorableDroppedDatabase)databases[0].BaseObject; + var database1DeletionDate = database1Object.DeletionDate.ToUniversalTime().ToString(deletionDateStringFormat); + + var database2Object = (RestorableDroppedDatabase)databases[1].BaseObject; + var database2DeletionDate = database2Object.DeletionDate.ToUniversalTime().ToString(deletionDateStringFormat); + + using (new MockHttpServer( + exceptionManager, MockHttpServer.DefaultServerPrefixUri, testSession)) + { + powershell.InvokeBatchScript( + @"$testdb1 = Get-AzureSqlDatabase -RestorableDropped " + + @"-Context $context " + + @"-DatabaseName " + database1Object.Name + @" " + + @"-DatabaseDeletionDate " + database1DeletionDate); + + powershell.InvokeBatchScript( + @"$testdb2 = Get-AzureSqlDatabase -RestorableDropped " + + @"-Context $context " + + @"-DatabaseName " + database2Object.Name + @" " + + @"-DatabaseDeletionDate " + database2DeletionDate); + + database1 = powershell.InvokeBatchScript( + @"$testdb1 | Get-AzureSqlDatabase"); + + database2 = powershell.InvokeBatchScript( + @"$testdb2 | Get-AzureSqlDatabase"); + } + + Assert.IsTrue( + database1.Single().BaseObject is RestorableDroppedDatabase, + "Expecting a RestorableDroppedDatabase object"); + var refreshedDatabase1Object = (RestorableDroppedDatabase)database1.Single().BaseObject; + Assert.AreEqual( + database1Object.Name, refreshedDatabase1Object.Name, + "Expected db name to be " + database1Object.Name); + + Assert.IsTrue( + database2.Single().BaseObject is RestorableDroppedDatabase, + "Expecting a RestorableDroppedDatabase object"); + var refreshedDatabase2Object = (RestorableDroppedDatabase)database2.Single().BaseObject; + Assert.AreEqual( + database2Object.Name, refreshedDatabase2Object.Name, + "Expected db name to be " + database2Object.Name); + Assert.AreEqual( + database2Object.Edition, refreshedDatabase2Object.Edition, + "Expected edition to be " + database2Object.Edition); + Assert.AreEqual( + database2Object.MaxSizeBytes, refreshedDatabase2Object.MaxSizeBytes, + "Expected max size to be " + database2Object.MaxSizeBytes); + } + } + } + + [TestMethod] + public void GetRestorableDroppedDatabaseWithSqlAuthNonExistentDb() + { + using (var powershell = System.Management.Automation.PowerShell.Create()) + { + // Create a context + NewAzureSqlDatabaseServerContextTests.CreateServerContextSqlAuth(powershell, "$context"); + + var testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTests.GetRestorableDroppedDatabaseWithSqlAuthNonExistentDb"); + DatabaseTestHelper.SetDefaultTestSessionSettings(testSession); + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + if (expected.Index < 1) + { + DatabaseTestHelper.ValidateHeadersForODataRequest(expected.RequestInfo, actual); + } + else + { + Assert.Fail("No more requests expected."); + } + }); + + using (var exceptionManager = new AsyncExceptionManager()) + { + using (new MockHttpServer( + exceptionManager, MockHttpServer.DefaultServerPrefixUri, testSession)) + { + powershell.InvokeBatchScript( + @"Get-AzureSqlDatabase -RestorableDropped " + + @"-Context $context " + + @"-DatabaseName testdbnonexistent " + + @"-DatabaseDeletionDate '10/01/2013 12:00:00 AM'"); + } + + Assert.AreEqual( + 1, powershell.Streams.Error.Count, + "Expecting errors"); + Assert.AreEqual( + 2, powershell.Streams.Warning.Count, + "Expecting tracing IDs"); + Assert.AreEqual( + string.Format( + CultureInfo.InvariantCulture, + "Database '{0}' with deletion date '{1}' not found.", + testSession.SessionProperties["Servername"] + ".testdbnonexistent", + new DateTime(2013, 10, 01, 0, 0, 0, DateTimeKind.Utc)), + powershell.Streams.Error.First().Exception.Message, + "Unexpected error message"); + Assert.IsTrue( + powershell.Streams.Warning.Any(w => w.Message.StartsWith("Client Session Id")), + "Expecting Client Session Id"); + Assert.IsTrue( + powershell.Streams.Warning.Any(w => w.Message.StartsWith("Client Request Id")), + "Expecting Client Request Id"); + } + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/ImportExportCmdletTests.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/ImportExportCmdletTests.cs new file mode 100644 index 000000000000..2c61a4bcb0bb --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/ImportExportCmdletTests.cs @@ -0,0 +1,207 @@ +// ---------------------------------------------------------------------------------- +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.ObjectModel; +using System.Linq; +using System.Management.Automation; +using System.Text.RegularExpressions; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.MockServer; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Server.Cmdlet; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.Utilities; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Database.Cmdlet +{ + /// + /// Test class for testing the Import-/Export-AzureSqlDatabase and + /// Get-AzureSqlDatabaseImportExportStatus cmdlet. + /// + [TestClass] + public class ImportExportCmdletTests : TestBase + { + [TestCleanup] + public void CleanupTest() + { + // Save the mock session results + MockServerHelper.SaveDefaultSessionCollection(); + } + + /// + /// Tests the Import-/Export-AzureSqlDatabase and Get-AzureSqlDatabaseImportExportStatus + /// cmdlets. + /// + [TestMethod] + public void ImportExportAzureSqlDatabaseTests() + { + using (System.Management.Automation.PowerShell powershell = System.Management.Automation.PowerShell.Create()) + { + // Setup the subscription used for the test + AzureSubscription subscription = + UnitTestHelper.SetupUnitTestSubscription(powershell); + + // Set the necessary session variables + powershell.Runspace.SessionStateProxy.SetVariable( + "serverName", + SqlDatabaseTestSettings.Instance.ServerName); + powershell.Runspace.SessionStateProxy.SetVariable( + "sourceDB", + SqlDatabaseTestSettings.Instance.SourceDatabaseName); + powershell.Runspace.SessionStateProxy.SetVariable( + "targetDB", + SqlDatabaseTestSettings.Instance.TargetDatabaseName); + powershell.Runspace.SessionStateProxy.SetVariable( + "credential", + new PSCredential( + SqlDatabaseTestSettings.Instance.UserName, + SqlDatabaseTestSettings.Instance.SecurePassword)); + powershell.Runspace.SessionStateProxy.SetVariable( + "storageAccountName", + SqlDatabaseTestSettings.Instance.StorageName); + powershell.Runspace.SessionStateProxy.SetVariable( + "storageAccountKey", + SqlDatabaseTestSettings.Instance.AccessKey); + powershell.Runspace.SessionStateProxy.SetVariable( + "storageContainerName", + SqlDatabaseTestSettings.Instance.ContainerName); + + // Create a new server + HttpSession testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTest.ImportExportAzureSqlDatabaseTests"); + ServerTestHelper.SetDefaultTestSessionSettings(testSession); + //testSession.ServiceBaseUri = new Uri("https://management.core.windows.net"); + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + string expectedRequestText = RequestTextToString(expected.RequestInfo); + string actualRequestText = RequestTextToString(actual); + // When checking out from GitHub, different new line setting may lead to different char \r\n or \n + // Replace them with String.Empty before comparison + Assert.AreEqual( + Regex.Replace(expectedRequestText, @"\s+", String.Empty), + Regex.Replace(actualRequestText, @"\s+", String.Empty)); + Assert.IsTrue( + actual.UserAgent.Contains(ApiConstants.UserAgentHeaderValue), + "Missing proper UserAgent string."); + }); + + PSObject storageContext = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + @"New-AzureStorageContext" + + @" -StorageAccountName $storageAccountName" + + @" -StorageAccountKey $storageAccountKey"); + }).FirstOrDefault(); + + //testSession.ServiceBaseUri = new Uri("https://lqtqbo6kkp.database.windows.net"); + Collection databaseContext = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultServerPrefixUri, + () => + { + powershell.Runspace.SessionStateProxy.SetVariable( + "manageUrl", + MockHttpServer.DefaultServerPrefixUri.AbsoluteUri); + return powershell.InvokeBatchScript( + @"New-AzureSqlDatabaseServerContext" + + @" -ServerName $serverName" + + @" -ManageUrl $manageUrl" + + @" -Credential $credential"); + }); + + //testSession.ServiceBaseUri = new Uri("https://management.core.windows.net"); + Collection startExportResult = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + powershell.Runspace.SessionStateProxy.SetVariable("storageContext", storageContext); + powershell.Runspace.SessionStateProxy.SetVariable( + "databaseContext", + databaseContext.FirstOrDefault()); + return powershell.InvokeBatchScript( + @"Start-AzureSqlDatabaseExport" + + @" -SqlConnectionContext $databaseContext" + + @" -DatabaseName $sourceDB" + + @" -StorageContext $storageContext" + + @" -StorageContainerName $storageContainerName" + + @" -BlobName backup1"); + }); + + Collection getExportStatusResult = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + powershell.Runspace.SessionStateProxy.SetVariable( + "exportResult", + startExportResult.FirstOrDefault()); + return powershell.InvokeBatchScript( + @"Get-AzureSqlDatabaseImportExportStatus" + + @" -ServerName $serverName" + + @" -RequestId $exportResult.RequestGuid" + + @" -Username $exportResult.SqlCredentials.UserName" + + @" -Password $exportResult.SqlCredentials.Password"); + }); + + Collection startImportResult = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + @"Start-AzureSqlDatabaseImport" + + @" -SqlConnectionContext $databaseContext" + + @" -DatabaseName $targetDB" + + @" -Edition Business" + + @" -DatabaseMaxSize 10" + + @" -StorageContext $storageContext" + + @" -StorageContainerName $storageContainerName" + + @" -BlobName backup1"); + }); + + Collection getImportStatusResult = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + powershell.Runspace.SessionStateProxy.SetVariable( + "importResult", + startImportResult.FirstOrDefault()); + return powershell.InvokeBatchScript( + @"Get-AzureSqlDatabaseImportExportStatus" + + @" -ServerName $serverName" + + @" -RequestId $importResult.RequestGuid" + + @" -Username $importResult.SqlCredentials.UserName" + + @" -Password $importResult.SqlCredentials.Password"); + }); + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Unexpected Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Unexpected Warnings during run!"); + } + } + private static string RequestTextToString(HttpMessage.Request request) + { + return request.RequestText == null ? String.Empty : request.RequestText; + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/NewAzureSqlDatabaseServerContextTests.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/NewAzureSqlDatabaseServerContextTests.cs new file mode 100644 index 000000000000..90af9366441c --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/NewAzureSqlDatabaseServerContextTests.cs @@ -0,0 +1,343 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.ObjectModel; +using System.Globalization; +using System.Linq; +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Database.Cmdlet; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Properties; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Common; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.MockServer; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.Utilities; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Database.Cmdlet +{ + [TestClass] + public class NewAzureSqlDatabaseServerContextTests : TestBase + { + [TestCleanup] + public void CleanupTest() + { + MockServerHelper.SaveDefaultSessionCollection(); + } + + [TestMethod] + public void TestGetManageUrl() + { + NewAzureSqlDatabaseServerContext contextCmdlet = new NewAzureSqlDatabaseServerContext(); + + // Make sure that server name to Manage Url conversion is working + contextCmdlet.ServerName = "server0001"; + Assert.AreEqual( + new Uri("https://server0001.database.windows.net"), + UnitTestHelper.InvokePrivate( + contextCmdlet, + "GetManageUrl", + NewAzureSqlDatabaseServerContext.ServerNameWithSqlAuthParamSet)); + + // Make sure that fully qualified server name name to Manage Url conversion is working + contextCmdlet.FullyQualifiedServerName = "server0003.database.windows.net"; + Assert.AreEqual( + new Uri("https://server0003.database.windows.net"), + UnitTestHelper.InvokePrivate( + contextCmdlet, + "GetManageUrl", + NewAzureSqlDatabaseServerContext.FullyQualifiedServerNameWithSqlAuthParamSet)); + + // Make sure that Manage Url to Manage Url conversion is working properly + contextCmdlet.ManageUrl = new Uri("https://server0005.database.windows.net"); + Assert.AreEqual( + new Uri("https://server0005.database.windows.net"), + UnitTestHelper.InvokePrivate( + contextCmdlet, + "GetManageUrl", + NewAzureSqlDatabaseServerContext.ManageUrlWithSqlAuthParamSet)); + + + // Make sure that server name to Manage Url conversion is working + contextCmdlet.ServerName = "server0001"; + Assert.AreEqual( + new Uri("https://server0001.database.windows.net"), + UnitTestHelper.InvokePrivate( + contextCmdlet, + "GetManageUrl", + NewAzureSqlDatabaseServerContext.ServerNameWithCertAuthParamSet)); + + // Make sure that fully qualified server name name to Manage Url conversion is working + contextCmdlet.FullyQualifiedServerName = "server0003.database.windows.net"; + Assert.AreEqual( + new Uri("https://server0003.database.windows.net"), + UnitTestHelper.InvokePrivate( + contextCmdlet, + "GetManageUrl", + NewAzureSqlDatabaseServerContext.FullyQualifiedServerNameWithCertAuthParamSet)); + + try + { + UnitTestHelper.InvokePrivate( + contextCmdlet, + "GetManageUrl", + "InvalidParamterSet"); + Assert.Fail("GetManageUrl with invalid parameter set should not succeed."); + } + catch (InvalidOperationException ex) + { + Assert.AreEqual(Resources.UnknownParameterSet, ex.Message); + } + } + + [TestMethod] + public void NewAzureSqlDatabaseServerContextWithSqlAuth() + { + // Create standard context with both ManageUrl and ServerName overridden + using (System.Management.Automation.PowerShell powershell = + System.Management.Automation.PowerShell.Create()) + { + NewAzureSqlDatabaseServerContextTests.CreateServerContextSqlAuth( + powershell, + "$context"); + } + + // Create context with just ManageUrl and a derived servername + HttpSession testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTests.NewAzureSqlDatabaseServerContextWithSqlAuthDerivedName"); + testSession.ServiceBaseUri = MockServerHelper.CommonServiceBaseUri; + + using (System.Management.Automation.PowerShell powershell = + System.Management.Automation.PowerShell.Create()) + { + UnitTestHelper.ImportAzureModule(powershell); + UnitTestHelper.CreateTestCredential(powershell); + + using (AsyncExceptionManager exceptionManager = new AsyncExceptionManager()) + { + Collection serverContext; + using (new MockHttpServer( + exceptionManager, + MockHttpServer.DefaultServerPrefixUri, + testSession)) + { + serverContext = powershell.InvokeBatchScript( + string.Format( + CultureInfo.InvariantCulture, + @"$context = New-AzureSqlDatabaseServerContext " + + @"-ManageUrl {0} " + + @"-Credential $credential", + MockHttpServer.DefaultServerPrefixUri.AbsoluteUri), + @"$context"); + } + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Errors during run!"); + powershell.Streams.ClearStreams(); + + PSObject contextPsObject = serverContext.Single(); + Assert.IsTrue( + contextPsObject.BaseObject is ServerDataServiceSqlAuth, + "Expecting a ServerDataServiceSqlAuth object"); + } + } + } + + /// + /// Create a new server context using certificate authentication + /// + [TestMethod] + public void NewAzureSqlDatabaseServerContextWithCertAuth() + { + AzureSubscription subscription = UnitTestHelper.CreateUnitTestSubscription(); + + NewAzureSqlDatabaseServerContext serverContext = new NewAzureSqlDatabaseServerContext(); + ServerDataServiceCertAuth service = serverContext.GetServerDataServiceByCertAuth( + "testServer", + subscription); + + Assert.IsNotNull(service, "The ServerDataServiceCertAuth object returned from " + + "NewAzureSqlDatabaseServerContext.GetServerDataServiceByCertAuth is null"); + } + + [TestMethod] + public void NewAzureSqlDatabaseServerContextWithSqlAuthNegativeCases() + { + HttpSession testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTests.NewAzureSqlDatabaseServerContextWithSqlAuthNegativeCases"); + + using (System.Management.Automation.PowerShell powershell = + System.Management.Automation.PowerShell.Create()) + { + UnitTestHelper.ImportAzureModule(powershell); + UnitTestHelper.CreateTestCredential(powershell); + + powershell.Runspace.SessionStateProxy.SetVariable( + "serverName", + SqlDatabaseTestSettings.Instance.ServerName); + + using (AsyncExceptionManager exceptionManager = new AsyncExceptionManager()) + { + // Test warning when different $metadata is received. + Collection serverContext; + using (new MockHttpServer( + exceptionManager, + MockHttpServer.DefaultServerPrefixUri, + testSession)) + { + serverContext = powershell.InvokeBatchScript( + string.Format( + CultureInfo.InvariantCulture, + @"$context = New-AzureSqlDatabaseServerContext " + + @"-ServerName $servername " + + @"-ManageUrl {0} " + + @"-Credential $credential", + MockHttpServer.DefaultServerPrefixUri.AbsoluteUri), + @"$context"); + } + + Assert.AreEqual(1, powershell.Streams.Error.Count, "Errors during run!"); + Assert.AreEqual(2, powershell.Streams.Warning.Count, "Should have warning!"); + powershell.Streams.ClearStreams(); + + // Test error case + using (new MockHttpServer( + exceptionManager, + MockHttpServer.DefaultServerPrefixUri, + testSession)) + { + powershell.InvokeBatchScript( + string.Format( + CultureInfo.InvariantCulture, + @"$context = New-AzureSqlDatabaseServerContext " + + @"-ServerName $servername " + + @"-ManageUrl {0} " + + @"-Credential $credential", + MockHttpServer.DefaultServerPrefixUri.AbsoluteUri), + @"$context"); + } + + Assert.AreEqual(1, powershell.Streams.Error.Count, "Should have errors!"); + Assert.AreEqual(2, powershell.Streams.Warning.Count, "Should have warning!"); + Assert.AreEqual( + "Test error message", + powershell.Streams.Error.First().Exception.Message); + Assert.IsTrue( + powershell.Streams.Warning.Any( + (w) => w.Message.StartsWith("Client Session Id:")), + "Client session Id not written to warning"); + Assert.IsTrue( + powershell.Streams.Warning.Any( + (w) => w.Message.StartsWith("Client Request Id:")), + "Client request Id not written to warning"); + powershell.Streams.ClearStreams(); + } + } + } + + /// + /// Common helper method for other tests to create a context. + /// + /// The variable name that will hold the new context. + public static void CreateServerContextSqlAuth( + System.Management.Automation.PowerShell powershell, + string contextVariable) + { + HttpSession testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTest.Common.NewAzureSqlDatabaseServerContextWithSqlAuth"); + DatabaseTestHelper.SetDefaultTestSessionSettings(testSession); + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + switch (expected.Index) + { + // Request 0-2: Create context with both ManageUrl and ServerName overriden + case 0: + // GetAccessToken call + DatabaseTestHelper.ValidateGetAccessTokenRequest( + expected.RequestInfo, + actual); + break; + case 1: + // Get server call + DatabaseTestHelper.ValidateHeadersForODataRequest( + expected.RequestInfo, + actual); + break; + case 2: + // $metadata call + Assert.IsTrue( + actual.RequestUri.AbsoluteUri.EndsWith("$metadata"), + "Incorrect Uri specified for $metadata"); + DatabaseTestHelper.ValidateHeadersForServiceRequest( + expected.RequestInfo, + actual); + Assert.AreEqual( + expected.RequestInfo.Headers[DataServiceConstants.AccessTokenHeader], + actual.Headers[DataServiceConstants.AccessTokenHeader], + "AccessToken header does not match"); + Assert.AreEqual( + expected.RequestInfo.Cookies[DataServiceConstants.AccessCookie], + actual.Cookies[DataServiceConstants.AccessCookie], + "AccessCookie does not match"); + break; + default: + Assert.Fail("No more requests expected."); + break; + } + }); + + UnitTestHelper.ImportAzureModule(powershell); + UnitTestHelper.CreateTestCredential( + powershell, + testSession.SessionProperties["Username"], + testSession.SessionProperties["Password"]); + + Collection serverContext; + using (AsyncExceptionManager exceptionManager = new AsyncExceptionManager()) + { + using (new MockHttpServer( + exceptionManager, + MockHttpServer.DefaultServerPrefixUri, + testSession)) + { + serverContext = powershell.InvokeBatchScript( + string.Format( + CultureInfo.InvariantCulture, + @"{1} = New-AzureSqlDatabaseServerContext " + + @"-ServerName {2} " + + @"-ManageUrl {0} " + + @"-Credential $credential", + MockHttpServer.DefaultServerPrefixUri.AbsoluteUri, + contextVariable, + testSession.SessionProperties["Servername"]), + contextVariable); + } + } + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Warnings during run!"); + powershell.Streams.ClearStreams(); + + PSObject contextPsObject = serverContext.Single(); + Assert.IsTrue( + contextPsObject.BaseObject is ServerDataServiceSqlAuth, + "Expecting a ServerDataServiceSqlAuth object"); + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/NewAzureSqlDatabaseTests.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/NewAzureSqlDatabaseTests.cs new file mode 100644 index 000000000000..f8af47f323ce --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/NewAzureSqlDatabaseTests.cs @@ -0,0 +1,447 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.ObjectModel; +using System.Linq; +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.MockServer; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Server.Cmdlet; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Database.Cmdlet +{ + [TestClass] + public class NewAzureSqlDatabaseTests : TestBase + { + /// + /// Initialize the necessary environment for the tests. + /// + [TestInitialize] + public void SetupTest() + { + // Create 2 test databases + NewAzureSqlDatabaseTests.CreateTestDatabasesWithSqlAuth(); + } + + [TestCleanup] + public void CleanupTest() + { + // Remove the test databases + NewAzureSqlDatabaseTests.RemoveTestDatabasesWithSqlAuth(); + + // Save the mock session results + MockServerHelper.SaveDefaultSessionCollection(); + } + + [TestMethod] + public void NewAzureSqlDatabaseWithSqlAuth() + { + // InitializeTest will test this scenario + } + + [TestMethod] + public void NewAzureSqlDatabaseWithSqlAuthDuplicateName() + { + using (System.Management.Automation.PowerShell powershell = + System.Management.Automation.PowerShell.Create()) + { + // Create a context + NewAzureSqlDatabaseServerContextTests.CreateServerContextSqlAuth( + powershell, + "$context"); + + // Issue another create testdb1, causing a failure + HttpSession testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTest.NewAzureSqlDatabaseWithSqlAuthDuplicateName"); + DatabaseTestHelper.SetDefaultTestSessionSettings(testSession); + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + switch (expected.Index) + { + // Request 0-1: Create testdb1 + case 0: + case 1: + DatabaseTestHelper.ValidateHeadersForODataRequest( + expected.RequestInfo, + actual); + break; + default: + Assert.Fail("No more requests expected."); + break; + } + }); + + using (AsyncExceptionManager exceptionManager = new AsyncExceptionManager()) + { + Services.Server.ServerDataServiceSqlAuth context; + using (new MockHttpServer( + exceptionManager, + MockHttpServer.DefaultServerPrefixUri, + testSession)) + { + Collection ctxPsObject = powershell.InvokeBatchScript("$context"); + context = (Services.Server.ServerDataServiceSqlAuth)ctxPsObject.First().BaseObject; + powershell.InvokeBatchScript( + @"New-AzureSqlDatabase " + + @"-Context $context " + + @"-DatabaseName testdb1 " + + @"-Force"); + } + } + + Assert.AreEqual(1, powershell.Streams.Error.Count, "Expecting errors"); + Assert.AreEqual(2, powershell.Streams.Warning.Count, "Expecting tracing IDs"); + Assert.AreEqual( + "Database 'testdb1' already exists. Choose a different database name.", + powershell.Streams.Error.First().Exception.Message, + "Unexpected error message"); + Assert.IsTrue( + powershell.Streams.Warning.Any(w => w.Message.StartsWith("Client Session Id")), + "Expecting Client Session Id"); + Assert.IsTrue( + powershell.Streams.Warning.Any(w => w.Message.StartsWith("Client Request Id")), + "Expecting Client Request Id"); + powershell.Streams.ClearStreams(); + } + } + + /// + /// Create $testdb1 and $testdb2 on the given context. + /// + /// The powershell instance containing the context. + /// The variable name that holds the server context. + public static void CreateTestDatabasesWithSqlAuth( + System.Management.Automation.PowerShell powershell, + string contextVariable) + { + HttpSession testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTest.Common.CreateTestDatabasesWithSqlAuth"); + DatabaseTestHelper.SetDefaultTestSessionSettings(testSession); + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + switch (expected.Index) + { + // Request 0-2: Create testdb1 + // Request 3-5: Create testdb2 + // Request 6-8: Create testdb3 + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + DatabaseTestHelper.ValidateHeadersForODataRequest( + expected.RequestInfo, + actual); + break; + default: + Assert.Fail("No more requests expected."); + break; + } + }); + + using (AsyncExceptionManager exceptionManager = new AsyncExceptionManager()) + { + Collection database1, database2, database3; + using (new MockHttpServer( + exceptionManager, + MockHttpServer.DefaultServerPrefixUri, + testSession)) + { + database1 = powershell.InvokeBatchScript( + @"$testdb1 = New-AzureSqlDatabase " + + @"-Context $context " + + @"-DatabaseName testdb1 " + + @"-Force", + @"$testdb1"); + database2 = powershell.InvokeBatchScript( + @"$testdb2 = New-AzureSqlDatabase " + + @"-Context $context " + + @"-DatabaseName testdb2 " + + @"-Collation Japanese_CI_AS " + + @"-Edition Web " + + @"-MaxSizeGB 5 " + + @"-Force", + @"$testdb2"); + database3 = powershell.InvokeBatchScript( + @"$testdb3 = New-AzureSqlDatabase " + + @"-Context $context " + + @"-DatabaseName testdb3 " + + @"-MaxSizeBytes 104857600 " + + @"-Force", + @"$testdb3"); + } + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Warnings during run!"); + powershell.Streams.ClearStreams(); + + Services.Server.Database database = database1.Single().BaseObject as Services.Server.Database; + Assert.IsTrue(database != null, "Expecting a Database object"); + DatabaseTestHelper.ValidateDatabaseProperties(database, "testdb1", "Web", 1, 1073741824L, "SQL_Latin1_General_CP1_CI_AS", "Shared", false, DatabaseTestHelper.SharedSloGuid); + + database = database2.Single().BaseObject as Services.Server.Database; + Assert.IsTrue(database != null, "Expecting a Database object"); + DatabaseTestHelper.ValidateDatabaseProperties(database, "testdb2", "Web", 5, 5368709120L, "Japanese_CI_AS", "Shared", false, DatabaseTestHelper.SharedSloGuid); + + database = database3.Single().BaseObject as Services.Server.Database; + Assert.IsTrue(database != null, "Expecting a Database object"); + DatabaseTestHelper.ValidateDatabaseProperties(database, "testdb3", "Web", 0, 104857600L, "SQL_Latin1_General_CP1_CI_AS", "Shared", false, DatabaseTestHelper.SharedSloGuid); + + } + } + + /// + /// Removes $testdb1 and $testdb2 on the given context. + /// + /// The powershell instance containing the context. + /// The variable name that holds the server context. + public static void RemoveTestDatabasesWithSqlAuth( + System.Management.Automation.PowerShell powershell, + string contextVariable) + { + HttpSession testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTest.Common.RemoveTestDatabasesWithSqlAuth"); + DatabaseTestHelper.SetDefaultTestSessionSettings(testSession); + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + switch (expected.Index) + { + // Request 0-5: Remove database requests + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + DatabaseTestHelper.ValidateHeadersForODataRequest( + expected.RequestInfo, + actual); + break; + default: + Assert.Fail("No more requests expected."); + break; + } + }); + + using (AsyncExceptionManager exceptionManager = new AsyncExceptionManager()) + { + using (new MockHttpServer( + exceptionManager, + MockHttpServer.DefaultServerPrefixUri, + testSession)) + { + powershell.InvokeBatchScript( + @"Remove-AzureSqlDatabase " + + @"-Context $context " + + @"-DatabaseName testdb1 " + + @"-Force"); + powershell.InvokeBatchScript( + @"Remove-AzureSqlDatabase " + + @"-Context $context " + + @"-DatabaseName testdb2 " + + @"-Force"); + powershell.InvokeBatchScript( + @"Remove-AzureSqlDatabase " + + @"-Context $context " + + @"-DatabaseName testdb3 " + + @"-Force"); + } + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Warnings during run!"); + powershell.Streams.ClearStreams(); + } + } + + /// + /// Helper function to create the test databases. + /// + public static void CreateTestDatabasesWithSqlAuth() + { + using (System.Management.Automation.PowerShell powershell = + System.Management.Automation.PowerShell.Create()) + { + // Create a context + NewAzureSqlDatabaseServerContextTests.CreateServerContextSqlAuth( + powershell, + "$context"); + + // Create the 2 test databases + NewAzureSqlDatabaseTests.CreateTestDatabasesWithSqlAuth( + powershell, + "$context"); + } + } + + /// + /// Helper function to create the test databases. + /// + public static void CreateTestDatabasesWithCertAuth(System.Management.Automation.PowerShell powershell) + { + HttpSession testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTest.Common.CreateTestDatabasesWithCertAuth"); + + ServerTestHelper.SetDefaultTestSessionSettings(testSession); + + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.IsTrue( + actual.UserAgent.Contains(ApiConstants.UserAgentHeaderValue), + "Missing proper UserAgent string."); + }); + + using (AsyncExceptionManager exceptionManager = new AsyncExceptionManager()) + { + Collection database1, database2, database3; + using (new MockHttpServer( + exceptionManager, + MockHttpServer.DefaultHttpsServerPrefixUri, + testSession)) + { + database1 = powershell.InvokeBatchScript( + @"$testdb1 = New-AzureSqlDatabase " + + @"-ServerName $serverName " + + @"-DatabaseName testdb1 " + + @"-Force", + @"$testdb1"); + database2 = powershell.InvokeBatchScript( + @"$testdb2 = New-AzureSqlDatabase " + + @"-ServerName $serverName " + + @"-DatabaseName testdb2 " + + @"-Collation Japanese_CI_AS " + + @"-Edition Web " + + @"-MaxSizeGB 5 " + + @"-Force", + @"$testdb2"); + database3 = powershell.InvokeBatchScript( + @"$testdb3 = New-AzureSqlDatabase " + + @"-ServerName $serverName " + + @"-DatabaseName testdb3 " + + @"-MaxSizeBytes 104857600 " + + @"-Force", + @"$testdb3"); + } + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Warnings during run!"); + powershell.Streams.ClearStreams(); + + Services.Server.Database database = database1.Single().BaseObject as Services.Server.Database; + Assert.IsTrue(database != null, "Expecting a Database object"); + DatabaseTestHelper.ValidateDatabaseProperties(database, "testdb1", "Web", 1, 1073741824L, "SQL_Latin1_General_CP1_CI_AS", "Shared", false, DatabaseTestHelper.SharedSloGuid); + + database = database2.Single().BaseObject as Services.Server.Database; + Assert.IsTrue(database != null, "Expecting a Database object"); + DatabaseTestHelper.ValidateDatabaseProperties(database, "testdb2", "Web", 5, 5368709120L, "Japanese_CI_AS", "Shared", false, DatabaseTestHelper.SharedSloGuid); + + database = database3.Single().BaseObject as Services.Server.Database; + Assert.IsTrue(database != null, "Expecting a Database object"); + DatabaseTestHelper.ValidateDatabaseProperties(database, "testdb3", "Web", 0, 104857600L, "SQL_Latin1_General_CP1_CI_AS", "Shared", false, DatabaseTestHelper.SharedSloGuid); + } + } + + /// + /// Helper function to remove the test databases. + /// + public static void RemoveTestDatabasesWithSqlAuth() + { + using (System.Management.Automation.PowerShell powershell = + System.Management.Automation.PowerShell.Create()) + { + // Create a context + NewAzureSqlDatabaseServerContextTests.CreateServerContextSqlAuth( + powershell, + "$context"); + + // Remove the 2 test databases + NewAzureSqlDatabaseTests.RemoveTestDatabasesWithSqlAuth( + powershell, + "$context"); + } + } + + /// + /// Helper function to remove the test databases. + /// + public static void RemoveTestDatabasesWithCertAuth(System.Management.Automation.PowerShell powershell) + { + HttpSession testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTest.Common.RemoveTestDatabasesWithCertAuth"); + + ServerTestHelper.SetDefaultTestSessionSettings(testSession); + + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.IsTrue( + actual.UserAgent.Contains(ApiConstants.UserAgentHeaderValue), + "Missing proper UserAgent string."); + }); + + using (AsyncExceptionManager exceptionManager = new AsyncExceptionManager()) + { + using (new MockHttpServer( + exceptionManager, + MockHttpServer.DefaultHttpsServerPrefixUri, + testSession)) + { + powershell.InvokeBatchScript( + @"Remove-AzureSqlDatabase " + + @"-ServerName $serverName " + + @"-DatabaseName testdb1 " + + @"-Force"); + powershell.InvokeBatchScript( + @"Remove-AzureSqlDatabase " + + @"-ServerName $serverName " + + @"-DatabaseName testdb2 " + + @"-Force"); + powershell.InvokeBatchScript( + @"Remove-AzureSqlDatabase " + + @"-ServerName $serverName " + + @"-DatabaseName testdb3 " + + @"-Force"); + } + + powershell.Streams.ClearStreams(); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/NewAzureSqlPremiumDatabaseTests.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/NewAzureSqlPremiumDatabaseTests.cs new file mode 100644 index 000000000000..0f3b019194ab --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/NewAzureSqlPremiumDatabaseTests.cs @@ -0,0 +1,208 @@ +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.ObjectModel; +using System.Linq; +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.MockServer; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Database.Cmdlet +{ + [TestClass] + public class NewAzureSqlPremiumDatabaseTests : TestBase + { + [TestCleanup] + public void CleanupTest() + { + // Remove the test databases + NewAzureSqlPremiumDatabaseTests.RemoveTestDatabasesWithSqlAuth(); + + // Save the mock session results + MockServerHelper.SaveDefaultSessionCollection(); + } + + /// + /// Create $premiumDB on the given context. + /// + /// The powershell instance containing the context. + /// The variable name that holds the server context. + [TestMethod] + public void CreatePremiumDatabasesWithSqlAuth() + { + using (System.Management.Automation.PowerShell powershell = + System.Management.Automation.PowerShell.Create()) + { + NewAzureSqlDatabaseServerContextTests.CreateServerContextSqlAuth( + powershell, + "$context"); + HttpSession testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTest.Common.CreatePremiumDatabasesWithSqlAuth"); + DatabaseTestHelper.SetDefaultTestSessionSettings(testSession); + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + }); + + using (AsyncExceptionManager exceptionManager = new AsyncExceptionManager()) + { + Collection premiumDB_P1, PremiumDB_P2; + using (new MockHttpServer( + exceptionManager, + MockHttpServer.DefaultServerPrefixUri, + testSession)) + { + powershell.InvokeBatchScript( + @"$P1 = Get-AzureSqlDatabaseServiceObjective" + + @" -Context $context" + + @" -ServiceObjectiveName ""P1"""); + + powershell.InvokeBatchScript( + @"$P2 = Get-AzureSqlDatabaseServiceObjective " + + @"-Context $context" + + @" -ServiceObjectiveName ""P2"""); + + premiumDB_P1 = powershell.InvokeBatchScript( + @"$premiumDB_P1 = New-AzureSqlDatabase " + + @"-Context $context " + + @"-DatabaseName NewAzureSqlPremiumDatabaseTests_P1 " + + @"-Edition Premium " + + @"-ServiceObjective $P1 "); + premiumDB_P1 = powershell.InvokeBatchScript("$PremiumDB_P1"); + + powershell.InvokeBatchScript( + @"$PremiumDB_P2 = New-AzureSqlDatabase " + + @"-Context $context " + + @"-DatabaseName NewAzureSqlPremiumDatabaseTests_P2 " + + @"-Collation Japanese_CI_AS " + + @"-Edition Premium " + + @"-ServiceObjective $P2 " + + @"-MaxSizeGB 10 " + + @"-Force"); + PremiumDB_P2 = powershell.InvokeBatchScript("$PremiumDB_P2"); + } + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Warnings during run!"); + powershell.Streams.ClearStreams(); + + Assert.IsTrue( + premiumDB_P1.Single().BaseObject is Services.Server.Database, + "Expecting a Database object"); + Services.Server.Database databaseP1 = + (Services.Server.Database)premiumDB_P1.Single().BaseObject; + Assert.AreEqual("NewAzureSqlPremiumDatabaseTests_P1", databaseP1.Name, "Expected db name to be NewAzureSqlPremiumDatabaseTests_P1"); + + Assert.IsTrue( + PremiumDB_P2.Single().BaseObject is Services.Server.Database, + "Expecting a Database object"); + Services.Server.Database databaseP2 = + (Services.Server.Database)PremiumDB_P2.Single().BaseObject; + Assert.AreEqual("NewAzureSqlPremiumDatabaseTests_P2", databaseP2.Name, "Expected db name to be NewAzureSqlPremiumDatabaseTests_P2"); + + Assert.AreEqual( + "Japanese_CI_AS", + databaseP2.CollationName, + "Expected collation to be Japanese_CI_AS"); + Assert.AreEqual("Premium", databaseP2.Edition, "Expected edition to be Premium"); + Assert.AreEqual(10, databaseP2.MaxSizeGB, "Expected max size to be 10 GB"); + } + } + } + + /// + /// Helper function to remove the test databases. + /// + public static void RemoveTestDatabasesWithSqlAuth() + { + using (System.Management.Automation.PowerShell powershell = + System.Management.Automation.PowerShell.Create()) + { + // Create a context + NewAzureSqlDatabaseServerContextTests.CreateServerContextSqlAuth( + powershell, + "$context"); + + // Remove the 2 test databases + NewAzureSqlPremiumDatabaseTests.RemoveTestDatabasesWithSqlAuth( + powershell, + "$context"); + } + } + + /// + /// Removes all existing db which name starting with PremiumTest on the given context. + /// + /// The powershell instance containing the context. + /// The variable name that holds the server context. + public static void RemoveTestDatabasesWithSqlAuth( + System.Management.Automation.PowerShell powershell, + string contextVariable) + { + HttpSession testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTest.Common.RemoveTestPremiumDatabasesWithSqlAuth"); + DatabaseTestHelper.SetDefaultTestSessionSettings(testSession); + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + switch (expected.Index) + { + // Request 0-11: Remove database requests + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + DatabaseTestHelper.ValidateHeadersForODataRequest( + expected.RequestInfo, + actual); + break; + default: + Assert.Fail("No more requests expected."); + break; + } + }); + + using (AsyncExceptionManager exceptionManager = new AsyncExceptionManager()) + { + using (new MockHttpServer( + exceptionManager, + MockHttpServer.DefaultServerPrefixUri, + testSession)) + { + powershell.InvokeBatchScript( + @"Get-AzureSqlDatabase $context | " + + @"? {$_.Name.contains(""NewAzureSqlPremiumDatabaseTests"")} " + + @"| Remove-AzureSqlDatabase -Context $context -Force"); + } + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Warnings during run!"); + powershell.Streams.ClearStreams(); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/RecoverDatabaseTests.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/RecoverDatabaseTests.cs new file mode 100644 index 000000000000..04dbe805a74a --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/RecoverDatabaseTests.cs @@ -0,0 +1,182 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.ObjectModel; +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.MockServer; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Server.Cmdlet; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.Utilities; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Sql.Models; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Database.Cmdlet +{ + [TestClass] + public class RecoverDatabaseTests : TestBase + { + private static System.Management.Automation.PowerShell powershell; + + private static string serverName; + + /// + /// Initialize the necessary environment for the tests. + /// + [TestInitialize] + public void SetupTest() + { + powershell = System.Management.Automation.PowerShell.Create(); + + MockHttpServer.SetupCertificates(); + + UnitTestHelper.SetupUnitTestSubscription(powershell); + + serverName = SqlDatabaseTestSettings.Instance.ServerName; + powershell.Runspace.SessionStateProxy.SetVariable("serverName", serverName); + } + + [TestCleanup] + public void CleanupTest() + { + powershell.Streams.ClearStreams(); + + // Save the mock session results + MockServerHelper.SaveDefaultSessionCollection(); + } + + [TestMethod] + public void RecoverAzureSqlDatabaseWithDatabaseName() + { + var testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTests.RecoverAzureSqlDatabaseWithDatabaseName"); + ServerTestHelper.SetDefaultTestSessionSettings(testSession); + + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.IsTrue( + actual.UserAgent.Contains(ApiConstants.UserAgentHeaderValue), + "Missing proper UserAgent string."); + }); + + using (var exceptionManager = new AsyncExceptionManager()) + { + Collection operation; + using (new MockHttpServer( + exceptionManager, MockHttpServer.DefaultHttpsServerPrefixUri, testSession)) + { + operation = powershell.InvokeBatchScript( + @"Start-AzureSqlDatabaseRecovery " + + @"-SourceServerName $serverName " + + @"-SourceDatabaseName testdb1 " + + @"-TargetDatabaseName testdb1-restored"); + } + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Warnings during run!"); + powershell.Streams.ClearStreams(); + + // Expecting one operation object + Assert.AreEqual(1, operation.Count, "Expecting one operation object"); + + Assert.IsInstanceOfType( + operation[0].BaseObject, typeof(RecoverDatabaseOperation), + "Expecting a RecoverDatabaseOperation object"); + + var operationObject = (RecoverDatabaseOperation)operation[0].BaseObject; + Guid operationId; + Assert.IsTrue( + Guid.TryParse(operationObject.Id, out operationId), + "Expecting a operation ID that's a GUID"); + Assert.AreNotEqual( + Guid.Empty, operationId, + "Expecting an operation ID that's not an empty GUID"); + Assert.AreEqual( + operationObject.SourceDatabaseName, "testdb1", + "Source database name mismatch"); + Assert.AreEqual( + operationObject.TargetServerName, serverName, + "Target server name mismatch"); + Assert.AreEqual( + operationObject.TargetDatabaseName, "testdb1-restored", + "Target database name mismatch"); + } + } + + [TestMethod] + public void RecoverAzureSqlDatabaseWithDatabaseObject() + { + var testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTests.RecoverAzureSqlDatabaseWithDatabaseObject"); + ServerTestHelper.SetDefaultTestSessionSettings(testSession); + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.IsTrue( + actual.UserAgent.Contains(ApiConstants.UserAgentHeaderValue), + "Missing proper UserAgent string."); + }); + + using (var exceptionManager = new AsyncExceptionManager()) + { + Collection operation; + using (new MockHttpServer( + exceptionManager, MockHttpServer.DefaultHttpsServerPrefixUri, testSession)) + { + operation = powershell.InvokeBatchScript( + @"Get-AzureSqlRecoverableDatabase " + + @"-ServerName $serverName " + + @"-DatabaseName testdb1" + " | " + + @"Start-AzureSqlDatabaseRecovery " + + @"-TargetDatabaseName testdb1-restored"); + } + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Warnings during run!"); + powershell.Streams.ClearStreams(); + + // Expecting one operation object + Assert.AreEqual(1, operation.Count, "Expecting one operation object"); + + Assert.IsInstanceOfType( + operation[0].BaseObject, typeof(RecoverDatabaseOperation), + "Expecting a RecoverDatabaseOperation object"); + + var operationObject = (RecoverDatabaseOperation)operation[0].BaseObject; + Guid operationId; + Assert.IsTrue( + Guid.TryParse(operationObject.Id, out operationId), + "Expecting a operation ID that's a GUID"); + Assert.AreNotEqual( + Guid.Empty, operationId, + "Expecting an operation ID that's not an empty GUID"); + Assert.AreEqual( + operationObject.SourceDatabaseName, "testdb1", + "Source database name mismatch"); + Assert.AreEqual( + operationObject.TargetServerName, serverName, + "Target server name mismatch"); + Assert.AreEqual( + operationObject.TargetDatabaseName, "testdb1-restored", + "Target database name mismatch"); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/RemoveAzureSqlDatabaseTests.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/RemoveAzureSqlDatabaseTests.cs new file mode 100644 index 000000000000..f0a87fbdbcdd --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/RemoveAzureSqlDatabaseTests.cs @@ -0,0 +1,106 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.ObjectModel; +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.MockServer; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Database.Cmdlet +{ + [TestClass] + public class RemoveAzureSqlDatabaseTests : TestBase + { + [TestCleanup] + public void CleanupTest() + { + MockServerHelper.SaveDefaultSessionCollection(); + } + + [TestMethod] + public void RemoveAzureSqlDatabaseWithSqlAuth() + { + using (System.Management.Automation.PowerShell powershell = + System.Management.Automation.PowerShell.Create()) + { + // Create a context + NewAzureSqlDatabaseServerContextTests.CreateServerContextSqlAuth( + powershell, + "$context"); + + // Create 2 test databases + NewAzureSqlDatabaseTests.CreateTestDatabasesWithSqlAuth( + powershell, + "$context"); + + HttpSession testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTests.RemoveAzureSqlDatabaseWithSqlAuth"); + DatabaseTestHelper.SetDefaultTestSessionSettings(testSession); + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + if (expected.Index < 8) + { + // Request 0-5: Remove database requests + // Request 6-7: Get all database request + DatabaseTestHelper.ValidateHeadersForODataRequest( + expected.RequestInfo, + actual); + } + else + { + Assert.Fail("No more requests expected."); + } + }); + + using (AsyncExceptionManager exceptionManager = new AsyncExceptionManager()) + { + // Create context with both ManageUrl and ServerName overriden + Collection databases; + using (new MockHttpServer( + exceptionManager, + MockHttpServer.DefaultServerPrefixUri, + testSession)) + { + powershell.InvokeBatchScript( + @"Remove-AzureSqlDatabase " + + @"-Context $context " + + @"-DatabaseName testdb1 " + + @"-Force"); + powershell.InvokeBatchScript( + @"Remove-AzureSqlDatabase " + + @"-Context $context " + + @"-DatabaseName testdb2 " + + @"-Force"); + + databases = powershell.InvokeBatchScript( + @"Get-AzureSqlDatabase " + + @"-Context $context"); + } + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Warnings during run!"); + powershell.Streams.ClearStreams(); + + Assert.AreEqual(1, databases.Count, "Expecting only master database object"); + } + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/RestoreDatabaseTests.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/RestoreDatabaseTests.cs new file mode 100644 index 000000000000..e67f388989ab --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/RestoreDatabaseTests.cs @@ -0,0 +1,310 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.ObjectModel; +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.MockServer; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Server.Cmdlet; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.Utilities; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Database.Cmdlet +{ + [TestClass] + public class RestoreDatabaseTests : TestBase + { + private static System.Management.Automation.PowerShell powershell; + + private static string serverName; + + private bool databasesAlreadyDropped; + + /// + /// Initialize the necessary environment for the tests. + /// + [TestInitialize] + public void SetupTest() + { + powershell = System.Management.Automation.PowerShell.Create(); + + MockHttpServer.SetupCertificates(); + + UnitTestHelper.SetupUnitTestSubscription(powershell); + + serverName = SqlDatabaseTestSettings.Instance.ServerName; + powershell.Runspace.SessionStateProxy.SetVariable("serverName", serverName); + + // Create atleast two test databases + NewAzureSqlDatabaseTests.CreateTestDatabasesWithCertAuth(powershell); + } + + [TestCleanup] + public void CleanupTest() + { + powershell.Streams.ClearStreams(); + + if (!databasesAlreadyDropped) + { + // Remove the test databases + NewAzureSqlDatabaseTests.RemoveTestDatabasesWithCertAuth(powershell); + } + + // Save the mock session results + MockServerHelper.SaveDefaultSessionCollection(); + } + + [TestMethod] + public void RestoreAzureSqlDatabaseWithDatabaseNameWithCertAuth() + { + var testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTests.RestoreAzureSqlDatabaseWithDatabaseNameWithCertAuth"); + ServerTestHelper.SetDefaultTestSessionSettings(testSession); + + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.IsTrue( + actual.UserAgent.Contains(ApiConstants.UserAgentHeaderValue), + "Missing proper UserAgent string."); + }); + + using (var exceptionManager = new AsyncExceptionManager()) + { + Collection operation; + using (new MockHttpServer( + exceptionManager, MockHttpServer.DefaultHttpsServerPrefixUri, testSession)) + { + operation = powershell.InvokeBatchScript( + @"Start-AzureSqlDatabaseRestore " + + @"-SourceServerName $serverName " + + @"-SourceDatabaseName testdb1 " + + @"-TargetDatabaseName testdb1-restored"); + } + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Warnings during run!"); + powershell.Streams.ClearStreams(); + + // Expecting one operation object + Assert.AreEqual(1, operation.Count, "Expecting one operation object"); + + Assert.IsTrue( + operation[0].BaseObject is RestoreDatabaseOperation, + "Expecting a RestoreDatabaseOperation object"); + + var operationObject = (RestoreDatabaseOperation)operation[0].BaseObject; + Assert.IsTrue( + operationObject.RequestID != Guid.Empty, + "Expecting a non-empty operation ID"); + } + } + + [TestMethod] + public void RestoreAzureSqlDatabaseWithDatabaseObjectWithCertAuth() + { + var testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTests.RestoreAzureSqlDatabaseWithDatabaseObjectWithCertAuth"); + ServerTestHelper.SetDefaultTestSessionSettings(testSession); + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.IsTrue( + actual.UserAgent.Contains(ApiConstants.UserAgentHeaderValue), + "Missing proper UserAgent string."); + }); + + using (var exceptionManager = new AsyncExceptionManager()) + { + Collection operation; + using (new MockHttpServer( + exceptionManager, MockHttpServer.DefaultHttpsServerPrefixUri, testSession)) + { + operation = powershell.InvokeBatchScript( + @"Get-AzureSqlDatabase " + + @"-ServerName $serverName " + + @"-DatabaseName testdb1" + " | " + + @"Start-AzureSqlDatabaseRestore " + + @"-TargetDatabaseName testdb1-restored"); + } + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Warnings during run!"); + powershell.Streams.ClearStreams(); + + // Expecting one operation object + Assert.AreEqual(1, operation.Count, "Expecting one operation object"); + + Assert.IsTrue( + operation[0].BaseObject is RestoreDatabaseOperation, + "Expecting a RestoreDatabaseOperation object"); + + var operationObject = (RestoreDatabaseOperation)operation[0].BaseObject; + Assert.IsTrue( + operationObject.RequestID != Guid.Empty, + "Expecting a non-empty operation ID"); + } + } + + [TestMethod] + public void RestoreAzureSqlDatabaseWithRestorableDroppedDatabaseNameWithCertAuth() + { + DropTestDatabases(); + + var testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTests.RestoreAzureSqlDatabaseWithRestorableDroppedDatabaseNameWithCertAuth"); + ServerTestHelper.SetDefaultTestSessionSettings(testSession); + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.IsTrue( + actual.UserAgent.Contains(ApiConstants.UserAgentHeaderValue), + "Missing proper UserAgent string."); + }); + + using (var exceptionManager = new AsyncExceptionManager()) + { + Collection droppedDatabase, operation; + using (new MockHttpServer(exceptionManager, MockHttpServer.DefaultHttpsServerPrefixUri, testSession)) + { + droppedDatabase = powershell.InvokeBatchScript( + @"$(Get-AzureSqlDatabase -ServerName $serverName -RestorableDropped)[0]"); + } + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Warnings during run!"); + powershell.Streams.ClearStreams(); + + var droppedDatabaseObject = (RestorableDroppedDatabase)droppedDatabase[0].BaseObject; + var restorePoint = droppedDatabaseObject.DeletionDate - TimeSpan.FromMinutes(1); + + using (new MockHttpServer( + exceptionManager, MockHttpServer.DefaultHttpsServerPrefixUri, testSession)) + { + operation = powershell.InvokeBatchScript( + @"Start-AzureSqlDatabaseRestore " + + @"-SourceServerName $serverName " + + @"-RestorableDropped " + + @"-SourceDatabaseName '" + droppedDatabaseObject.Name + "' " + + @"-SourceDatabaseDeletionDate '" + droppedDatabaseObject.DeletionDate.ToString("O") + "' " + + @"-TargetDatabaseName testdb1-restored " + + @"-PointInTime '" + restorePoint.ToString("O") + "'"); + } + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Warnings during run!"); + powershell.Streams.ClearStreams(); + + // Expecting one operation object + Assert.AreEqual(1, operation.Count, "Expecting one operation object"); + + Assert.IsTrue( + operation[0].BaseObject is RestoreDatabaseOperation, + "Expecting a RestoreDatabaseOperation object"); + + var operationObject = (RestoreDatabaseOperation)operation[0].BaseObject; + Assert.IsTrue( + operationObject.RequestID != Guid.Empty, + "Expecting a non-empty operation ID"); + + Assert.IsTrue(operationObject.SourceDatabaseName == droppedDatabaseObject.Name); + Assert.IsTrue(operationObject.SourceDatabaseDeletionDate == droppedDatabaseObject.DeletionDate); + } + } + + [TestMethod] + public void RestoreAzureSqlDatabaseWithRestorableDroppedDatabaseObjectWithCertAuth() + { + DropTestDatabases(); + + var deletionDate = DateTime.UtcNow; + var restorePoint = deletionDate - TimeSpan.FromMinutes(1); + + var testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTests.RestoreAzureSqlDatabaseWithRestorableDroppedDatabaseObjectWithCertAuth"); + ServerTestHelper.SetDefaultTestSessionSettings(testSession); + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.IsTrue( + actual.UserAgent.Contains(ApiConstants.UserAgentHeaderValue), + "Missing proper UserAgent string."); + }); + + using (var exceptionManager = new AsyncExceptionManager()) + { + Collection droppedDatabase, operation; + using (new MockHttpServer( + exceptionManager, MockHttpServer.DefaultHttpsServerPrefixUri, testSession)) + { + droppedDatabase = powershell.InvokeBatchScript( + @"$database = $(Get-AzureSqlDatabase -ServerName $serverName -RestorableDropped)[0];" + + @"$database"); + } + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Warnings during run!"); + powershell.Streams.ClearStreams(); + + var droppedDatabaseObject = (RestorableDroppedDatabase)droppedDatabase[0].BaseObject; + + using (new MockHttpServer( + exceptionManager, MockHttpServer.DefaultHttpsServerPrefixUri, testSession)) + { + operation = powershell.InvokeBatchScript( + @"$database | Start-AzureSqlDatabaseRestore " + + @"-TargetDatabaseName testdb1-restored"); + } + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Warnings during run!"); + powershell.Streams.ClearStreams(); + + // Expecting one operation object + Assert.AreEqual(1, operation.Count, "Expecting one operation object"); + + Assert.IsTrue( + operation[0].BaseObject is RestoreDatabaseOperation, + "Expecting a RestoreDatabaseOperation object"); + + var operationObject = (RestoreDatabaseOperation)operation[0].BaseObject; + Assert.IsTrue( + operationObject.RequestID != Guid.Empty, + "Expecting a non-empty operation ID"); + + Assert.IsTrue(operationObject.SourceDatabaseName == droppedDatabaseObject.Name); + Assert.IsTrue(operationObject.SourceDatabaseDeletionDate == droppedDatabaseObject.DeletionDate); + } + } + + private void DropTestDatabases() + { + // Remove the test databases + NewAzureSqlDatabaseTests.RemoveTestDatabasesWithCertAuth(powershell); + + databasesAlreadyDropped = true; + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/SetAzureSqlDatabaseTests.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/SetAzureSqlDatabaseTests.cs new file mode 100644 index 000000000000..0313457471d1 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Database/Cmdlet/SetAzureSqlDatabaseTests.cs @@ -0,0 +1,335 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.ObjectModel; +using System.Linq; +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.MockServer; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Database.Cmdlet +{ + [TestClass] + public class SetAzureSqlDatabaseTests : TestBase + { + [TestInitialize] + public void InitializeTest() + { + // Create 2 test databases + NewAzureSqlDatabaseTests.CreateTestDatabasesWithSqlAuth(); + } + + [TestCleanup] + public void CleanupTest() + { + // Remove the test databases + NewAzureSqlDatabaseTests.RemoveTestDatabasesWithSqlAuth(); + + // Save the mock session results + MockServerHelper.SaveDefaultSessionCollection(); + } + + [TestMethod] + public void SetAzureSqlDatabaseSizeWithSqlAuth() + { + using (System.Management.Automation.PowerShell powershell = + System.Management.Automation.PowerShell.Create()) + { + // Create a context + NewAzureSqlDatabaseServerContextTests.CreateServerContextSqlAuth( + powershell, + "$context"); + + HttpSession testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTests.SetAzureSqlDatabaseSizeWithSqlAuth"); + DatabaseTestHelper.SetDefaultTestSessionSettings(testSession); + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + if (expected.Index < 10) + { + // Request 0-2: Set testdb1 with new MaxSize + // Request 3-5: Set testdb2 with new MaxSize + // Request 6-7: Get updated testdb1 + // Request 8-9: Get updated testdb2 + DatabaseTestHelper.ValidateHeadersForODataRequest( + expected.RequestInfo, + actual); + } + else + { + Assert.Fail("No more requests expected."); + } + }); + + using (AsyncExceptionManager exceptionManager = new AsyncExceptionManager()) + { + // Create context with both ManageUrl and ServerName overriden + Collection database1,database2; + using (new MockHttpServer( + exceptionManager, + MockHttpServer.DefaultServerPrefixUri, + testSession)) + { + database1 = powershell.InvokeBatchScript( + @"Set-AzureSqlDatabase " + + @"-Context $context " + + @"-DatabaseName testdb1 " + + @"-MaxSizeGB 5 " + + @"-Force " + + @"-PassThru"); + + // Set the database to 100MB + database2 = powershell.InvokeBatchScript( + @"Set-AzureSqlDatabase " + + @"-Context $context " + + @"-DatabaseName testdb2 " + + @"-MaxSizeBytes 104857600 " + + @"-Force " + + @"-PassThru"); + } + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Warnings during run!"); + powershell.Streams.ClearStreams(); + + Services.Server.Database database = database1.Single().BaseObject as Services.Server.Database; + Assert.IsTrue(database != null, "Expecting a Database object"); + DatabaseTestHelper.ValidateDatabaseProperties(database, "testdb1", "Web", 5, 5368709120L, "SQL_Latin1_General_CP1_CI_AS", "Shared", false, DatabaseTestHelper.SharedSloGuid); + + database = database2.Single().BaseObject as Services.Server.Database; + Assert.IsTrue(database != null, "Expecting a Database object"); + DatabaseTestHelper.ValidateDatabaseProperties(database, "testdb2", "Web", 0, 104857600L, "Japanese_CI_AS", "Shared", false, DatabaseTestHelper.SharedSloGuid); + } + } + } + + [TestMethod] + public void SetAzureSqlDatabaseNameWithSqlAuth() + { + using (System.Management.Automation.PowerShell powershell = + System.Management.Automation.PowerShell.Create()) + { + // Create a context + NewAzureSqlDatabaseServerContextTests.CreateServerContextSqlAuth( + powershell, + "$context"); + NewAzureSqlDatabaseServerContextTests.CreateServerContextSqlAuth( + powershell, + "$contextCleanup"); + + HttpSession testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTests.SetAzureSqlDatabaseNameWithSqlAuth"); + DatabaseTestHelper.SetDefaultTestSessionSettings(testSession); + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + if (expected.Index < 10) + { + // Request 0-4: Set testdb1 with new name of new_testdb1 + // Request 5-9: Set new_testdb1 with new name of testdb1 + DatabaseTestHelper.ValidateHeadersForODataRequest( + expected.RequestInfo, + actual); + } + else + { + Assert.Fail("No more requests expected."); + } + }); + + using (AsyncExceptionManager exceptionManager = new AsyncExceptionManager()) + { + // Create context with both ManageUrl and ServerName overriden + Collection database; + using (new MockHttpServer( + exceptionManager, + MockHttpServer.DefaultServerPrefixUri, + testSession)) + { + database = powershell.InvokeBatchScript( + @"Set-AzureSqlDatabase " + + @"-Context $context " + + @"-DatabaseName testdb1 " + + @"-NewName new_testdb1 " + + @"-Force " + + @"-PassThru"); + powershell.InvokeBatchScript( + @"Set-AzureSqlDatabase " + + @"-Context $contextCleanup " + + @"-DatabaseName new_testdb1 " + + @"-NewName testdb1 " + + @"-Force"); + } + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Warnings during run!"); + powershell.Streams.ClearStreams(); + + Services.Server.Database databaseObj = database.Single().BaseObject as Services.Server.Database; + Assert.IsNotNull(databaseObj, "Expecting a Database object"); + DatabaseTestHelper.ValidateDatabaseProperties(databaseObj, "new_testdb1", "Web", 1, 1073741824L, "SQL_Latin1_General_CP1_CI_AS", "Shared", false, DatabaseTestHelper.SharedSloGuid); + } + } + } + + [TestMethod] + public void SetAzureSqlDatabaseServiceObjectiveWithSqlAuth() + { + using (System.Management.Automation.PowerShell powershell = + System.Management.Automation.PowerShell.Create()) + { + // Create a context + NewAzureSqlDatabaseServerContextTests.CreateServerContextSqlAuth( + powershell, + "$context"); + + HttpSession testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTests.SetAzureSqlDatabaseServiceObjectiveWithSqlAuth"); + DatabaseTestHelper.SetDefaultTestSessionSettings(testSession); + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + switch (expected.Index) + { + // Request 0-1: Get Service Objective + case 0: + case 1: + // Request 2-7: Get/Update/Re-Get testdb2 + case 2: + case 3: + case 4: + case 5: + case 6: + DatabaseTestHelper.ValidateHeadersForODataRequest( + expected.RequestInfo, + actual); + break; + default: + Assert.Fail("No more requests expected."); + break; + } + }); + + using (AsyncExceptionManager exceptionManager = new AsyncExceptionManager()) + { + // Create context with both ManageUrl and ServerName overriden + Collection database; + using (new MockHttpServer( + exceptionManager, + MockHttpServer.DefaultServerPrefixUri, + testSession)) + { + powershell.InvokeBatchScript( + @"$slo = Get-AzureSqlDatabaseServiceObjective " + + @"-Context $context " + + @"-ServiceObjectiveName ""P1"""); + + database = powershell.InvokeBatchScript( + @"Set-AzureSqlDatabase " + + @"-Context $context " + + @"-DatabaseName testdb2 " + + @"-ServiceObjective $slo " + + @"-Force " + + @"-PassThru"); + } + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Warnings during run!"); + powershell.Streams.ClearStreams(); + + Services.Server.Database databaseObj = database.Single().BaseObject as Services.Server.Database; + Assert.IsNotNull(databaseObj, "Expecting a Database object"); + Assert.AreEqual("testdb2", databaseObj.Name, "Expected db name to be testdb2"); + Assert.AreEqual((byte)0, databaseObj.ServiceObjectiveAssignmentState, "Expected assignment state to be complete"); + DatabaseTestHelper.ValidateDatabaseProperties(databaseObj, "testdb2", "Web", 5, 5368709120L, "Japanese_CI_AS", "Shared", false, DatabaseTestHelper.PremiumP1SloGuid); + } + } + } + + [TestMethod] + public void SetAzureSqlPremiumDatabaseServiceObjectiveWithSqlAuth() + { + using (System.Management.Automation.PowerShell powershell = + System.Management.Automation.PowerShell.Create()) + { + // Create a context + NewAzureSqlDatabaseServerContextTests.CreateServerContextSqlAuth( + powershell, + "$context"); + HttpSession testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTests.SetAzureSqlPremiumDatabaseServiceObjectiveWithSqlAuth"); + DatabaseTestHelper.SetDefaultTestSessionSettings(testSession); + + using (AsyncExceptionManager exceptionManager = new AsyncExceptionManager()) + { + // Create context with both ManageUrl and ServerName overriden + Collection premiumDB; + using (new MockHttpServer( + exceptionManager, + MockHttpServer.DefaultServerPrefixUri, + testSession)) + { + powershell.InvokeBatchScript( + @"$P1 = Get-AzureSqlDatabaseServiceObjective" + + @" -Context $context" + + @" -ServiceObjectiveName ""P1"""); + + powershell.InvokeBatchScript( + @"$premiumDB_P1 = New-AzureSqlDatabase " + + @"-Context $context " + + @"-DatabaseName SetAzureSqlPremiumDatabaseTests_P1 " + + @"-Edition Premium " + + @"-ServiceObjective $P1 "); + + premiumDB = powershell.InvokeBatchScript( + @"Set-AzureSqlDatabase " + + @"-Context $context " + + @"-DatabaseName SetAzureSqlPremiumDatabaseTests_P1 " + + @"-Edition Business " + + @"-Force " + + @"-PassThru"); + + powershell.InvokeBatchScript( + @"Remove-AzureSqlDatabase " + + @"-Context $context " + + @"-DatabaseName SetAzureSqlPremiumDatabaseTests_P1 " + + @"-Force "); + } + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Warnings during run!"); + powershell.Streams.ClearStreams(); + + + Services.Server.Database premiumDBObj = premiumDB.Single().BaseObject as Services.Server.Database; + Assert.IsNotNull(premiumDBObj, "Expecting a Database object"); + + DatabaseTestHelper.ValidateDatabaseProperties(premiumDBObj, "SetAzureSqlPremiumDatabaseTests_P1", "Premium", 10, 10737418240L, "SQL_Latin1_General_CP1_CI_AS", "P1", false, DatabaseTestHelper.PremiumP1SloGuid); + } + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/ExceptionHandlerTests.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/ExceptionHandlerTests.cs new file mode 100644 index 000000000000..508814cb7666 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/ExceptionHandlerTests.cs @@ -0,0 +1,88 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Management.Automation; +using System.Net; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Common; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.MockServer; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Server.Cmdlet +{ + [TestClass] + public class ExceptionHandlerTests : TestBase + { + [TestMethod] + public void ServiceResourceErrorTest() + { + string serverRequestId = Guid.NewGuid().ToString(); + + string errorMessage = +@"Resource with the name 'FirewallRule1' does not exist. To continue, specify a valid resource name."; + WebException exception = MockHttpServer.CreateWebException( + HttpStatusCode.NotFound, + errorMessage, + (context) => + { + context.Response.Headers.Add(Constants.RequestIdHeaderName, serverRequestId); + }); + + string requestId; + ErrorRecord errorRecord = SqlDatabaseExceptionHandler.RetrieveExceptionDetails( + exception, + out requestId); + + Assert.AreEqual(serverRequestId, requestId); + Assert.AreEqual("Resource with the name 'FirewallRule1' does not exist. To continue, specify a valid resource name.", errorRecord.Exception.Message); + } + + [TestMethod] + public void SqlDatabaseManagementErrorTest() + { + string serverRequestId = Guid.NewGuid().ToString(); + + string errorMessage = +@" + 40647 + Subscription '00000000-1111-2222-3333-444444444444' does not have the server 'server0001'. + 16 + 1 +"; + WebException exception = MockHttpServer.CreateWebException( + HttpStatusCode.BadRequest, + errorMessage, + (context) => + { + context.Response.Headers.Add(Constants.RequestIdHeaderName, serverRequestId); + }); + + string requestId; + ErrorRecord errorRecord = SqlDatabaseExceptionHandler.RetrieveExceptionDetails( + exception, + out requestId); + + string expectedErrorDetails = string.Format( + CultureInfo.InvariantCulture, + Microsoft.WindowsAzure.Commands.SqlDatabase.Properties.Resources.DatabaseManagementErrorFormat, + 40647, + "Subscription '00000000-1111-2222-3333-444444444444' does not have the server 'server0001'."); + Assert.AreEqual(serverRequestId, requestId); + Assert.AreEqual(expectedErrorDetails, errorRecord.Exception.Message); + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Firewall/Cmdlet/FirewallCmdletAttributionTests.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Firewall/Cmdlet/FirewallCmdletAttributionTests.cs new file mode 100644 index 000000000000..c2da626e4602 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Firewall/Cmdlet/FirewallCmdletAttributionTests.cs @@ -0,0 +1,66 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Firewall.Cmdlet; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Server.Cmdlet +{ + /// + /// These tests prevent regression in parameter validation attributes. + /// + [TestClass] + public class FirewallCmdletAttributionTests : TestBase + { + [TestInitialize] + public void SetupTest() + { + } + + [TestMethod] + public void GetAzureSqlDatabaseServerFirewallRuleAttributeTest() + { + Type cmdlet = typeof(GetAzureSqlDatabaseServerFirewallRule); + UnitTestHelper.CheckConfirmImpact(cmdlet, ConfirmImpact.None); + UnitTestHelper.CheckCmdletModifiesData(cmdlet, false); + } + + [TestMethod] + public void NewAzureSqlDatabaseServerFirewallRuleAttributeTest() + { + Type cmdlet = typeof(NewAzureSqlDatabaseServerFirewallRule); + UnitTestHelper.CheckConfirmImpact(cmdlet, ConfirmImpact.Low); + UnitTestHelper.CheckCmdletModifiesData(cmdlet, true); + } + + [TestMethod] + public void SetAzureSqlDatabaseServerFirewallRuleAttributeTest() + { + Type cmdlet = typeof(SetAzureSqlDatabaseServerFirewallRule); + UnitTestHelper.CheckConfirmImpact(cmdlet, ConfirmImpact.Low); + UnitTestHelper.CheckCmdletModifiesData(cmdlet, true); + } + + [TestMethod] + public void RemoveAzureSqlDatabaseServerFirewallRuleAttributeTest() + { + Type cmdlet = typeof(RemoveAzureSqlDatabaseServerFirewallRule); + UnitTestHelper.CheckConfirmImpact(cmdlet, ConfirmImpact.Medium); + UnitTestHelper.CheckCmdletModifiesData(cmdlet, true); + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Firewall/Cmdlet/FirewallCmdletTests.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Firewall/Cmdlet/FirewallCmdletTests.cs new file mode 100644 index 000000000000..f14722b820f9 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Firewall/Cmdlet/FirewallCmdletTests.cs @@ -0,0 +1,174 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.ObjectModel; +using System.Linq; +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Model; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.MockServer; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Server.Cmdlet; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.Utilities; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Firewall.Cmdlet +{ + [TestClass] + public class FirewallCmdletTests : TestBase + { + [TestCleanup] + public void CleanupTest() + { + // Save the mock session results + MockServerHelper.SaveDefaultSessionCollection(); + } + + [TestMethod] + public void AzureSqlDatabaseServerFirewallTests() + { + // This test uses the https endpoint, setup the certificates. + MockHttpServer.SetupCertificates(); + + using (System.Management.Automation.PowerShell powershell = System.Management.Automation.PowerShell.Create()) + { + // Setup the subscription used for the test + AzureSubscription subscription = + UnitTestHelper.SetupUnitTestSubscription(powershell); + + powershell.Runspace.SessionStateProxy.SetVariable( + "serverName", + SqlDatabaseTestSettings.Instance.ServerName); + + // Create a new server + HttpSession testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTest.AzureSqlDatabaseServerFirewallTests"); + ServerTestHelper.SetDefaultTestSessionSettings(testSession); + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.IsTrue( + actual.UserAgent.Contains(ApiConstants.UserAgentHeaderValue), + "Missing proper UserAgent string."); + }); + + Collection newFirewallRuleResult1 = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + @"New-AzureSqlDatabaseServerFirewallRule" + + @" -ServerName $serverName" + + @" -RuleName Rule1" + + @" -StartIpAddress 0.0.0.0" + + @" -EndIpAddress 1.1.1.1"); + }); + + Collection newFirewallRuleResult2 = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + @"New-AzureSqlDatabaseServerFirewallRule" + + @" -ServerName $serverName" + + @" -RuleName Rule2" + + @" -StartIpAddress 1.1.1.1" + + @" -EndIpAddress 2.2.2.2"); + }); + + Collection getFirewallRuleResult = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + @"Get-AzureSqlDatabaseServerFirewallRule $serverName"); + }); + + Collection setFirewallResult = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + powershell.Runspace.SessionStateProxy.SetVariable("fw", newFirewallRuleResult1); + powershell.InvokeBatchScript( + @"$fw | Set-AzureSqlDatabaseServerFirewallRule" + + @" -StartIpAddress 2.2.2.2" + + @" -EndIpAddress 3.3.3.3"); + return powershell.InvokeBatchScript( + @"$fw | Get-AzureSqlDatabaseServerFirewallRule"); + }); + + Collection removeFirewallResult = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + powershell.Runspace.SessionStateProxy.SetVariable("rules", getFirewallRuleResult); + powershell.InvokeBatchScript( + @"$rules | Remove-AzureSqlDatabaseServerFirewallRule" + + @" -Force"); + + return powershell.InvokeBatchScript( + @"Get-AzureSqlDatabaseServerFirewallRule $serverName"); + }); + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Unexpected Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Unexpected Warnings during run!"); + + // Validate New- and Get-AzureSqlDatabaseServerFirewallRule + SqlDatabaseServerFirewallRuleContext[] firewallRules = getFirewallRuleResult + .Select(r => r.BaseObject as SqlDatabaseServerFirewallRuleContext) + .ToArray(); + Assert.AreEqual(2, firewallRules.Length, "Expecting two firewall rules"); + Assert.IsNotNull(firewallRules[0], + "Expecting a SqlDatabaseServerFirewallRuleContext object."); + Assert.IsNotNull(firewallRules[1], + "Expecting a SqlDatabaseServerFirewallRuleContext object."); + + Assert.AreEqual(SqlDatabaseTestSettings.Instance.ServerName, firewallRules[0].ServerName); + Assert.AreEqual("Rule1", firewallRules[0].RuleName); + Assert.AreEqual("0.0.0.0", firewallRules[0].StartIpAddress); + Assert.AreEqual("1.1.1.1", firewallRules[0].EndIpAddress); + Assert.AreEqual("Success", firewallRules[0].OperationStatus); + + Assert.AreEqual(SqlDatabaseTestSettings.Instance.ServerName, firewallRules[1].ServerName); + Assert.AreEqual("Rule2", firewallRules[1].RuleName); + Assert.AreEqual("1.1.1.1", firewallRules[1].StartIpAddress); + Assert.AreEqual("2.2.2.2", firewallRules[1].EndIpAddress); + Assert.AreEqual("Success", firewallRules[1].OperationStatus); + + // Validate Set-AzureSqlDatabaseServerFirewallRule + SqlDatabaseServerFirewallRuleContext firewallRule = + setFirewallResult.Single().BaseObject as SqlDatabaseServerFirewallRuleContext; + Assert.IsNotNull(firewallRule, "Expecting a SqlDatabaseServerFirewallRuleContext object"); + Assert.AreEqual(SqlDatabaseTestSettings.Instance.ServerName, firewallRule.ServerName); + Assert.AreEqual("Rule1", firewallRule.RuleName); + Assert.AreEqual("2.2.2.2", firewallRule.StartIpAddress); + Assert.AreEqual("3.3.3.3", firewallRule.EndIpAddress); + Assert.AreEqual("Success", firewallRule.OperationStatus); + + // Validate Remove-AzureSqlDatabaseServerFirewallRule + Assert.AreEqual(0, removeFirewallResult.Count, + "Expect all firewall rules are dropped."); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/MockServer/AsyncExceptionManager.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/MockServer/AsyncExceptionManager.cs new file mode 100644 index 000000000000..6cd9331fb2c4 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/MockServer/AsyncExceptionManager.cs @@ -0,0 +1,90 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests +{ + /// + /// Helper class that stores asyncronous exceptions to be thrown on the main thread. + /// + public class AsyncExceptionManager : IDisposable + { + /// + /// Stores a list of exceptions that was caught during the execution. + /// + private List exceptions; + + /// + /// Initializes a new instance of the class. + /// + public AsyncExceptionManager() + { + this.exceptions = new List(); + } + + /// + /// Execute the and stores any exception that occur. + /// + /// The action to perform. + public void CatchExceptions(Action action) + { + this.CatchExceptions(action, null); + } + + /// + /// Execute the and stores any exception that occur. + /// + /// The action to perform. + public void CatchExceptions(Action action, Action cleanup) + { + try + { + action(); + } + catch (Exception ex) + { + this.exceptions.Add(ex); + Console.Error.WriteLine(ex.ToString()); + + // Try execute the cleanup action + if (cleanup != null) + { + try + { + cleanup(); + } + catch (Exception cleanupEx) + { + this.exceptions.Add(cleanupEx); + Console.Error.WriteLine(cleanupEx.ToString()); + } + } + } + } + + /// + /// Disposes the exception manager and throws the first exception if it occurred. + /// + public void Dispose() + { + if (this.exceptions.Count > 0) + { + throw this.exceptions.First(); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/MockServer/HttpMessage.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/MockServer/HttpMessage.cs new file mode 100644 index 000000000000..dfc1cf1d0c51 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/MockServer/HttpMessage.cs @@ -0,0 +1,204 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Runtime.Serialization; +using System.Security.Cryptography.X509Certificates; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.MockServer +{ + /// + /// Stores information about a Http Web Response. + /// + [DataContract(Name = "HttpMessage")] + public class HttpMessage : IExtensibleDataObject + { + [DataMember(Order = 0)] + public int Index { get; set; } + + [DataMember(Order = 1)] + public Request RequestInfo { get; set; } + + [DataMember(Order = 2)] + public Response ResponseInfo { get; set; } + + [DataContract(Name = "RequestInfo")] + public class Request : IExtensibleDataObject + { + [DataMember(Order = 0)] + public Uri RequestUri { get; set; } + + [DataMember(Order = 1)] + public string Method { get; set; } + + [DataMember(Order = 2)] + public string UserAgent { get; set; } + + [DataMember(Order = 3)] + public HeaderCollection Headers { get; set; } + + [DataMember(Order = 4)] + public CookieCollection Cookies { get; set; } + + [DataMember(Order = 5)] + public string RequestText { get; set; } + + [DataMember(Order = 6)] + public string ContentType { get; set; } + + [DataMember(Order = 7)] + public string Accept { get; set; } + + public X509Certificate2 Certificate { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + + /// + /// Do a deep copy clone of this object. + /// + /// A clone of this object. + public Request Clone() + { + using (MemoryStream stream = new MemoryStream()) + { + DataContractSerializer serializer = new DataContractSerializer(typeof(Request)); + serializer.WriteObject(stream, this); + stream.Position = 0; + Request request = (Request)serializer.ReadObject(stream); + request.Certificate = this.Certificate; + return request; + } + } + } + + [DataContract(Name = "ResponseInfo")] + public class Response : IExtensibleDataObject + { + [DataMember(Order = 0)] + public HttpStatusCode StatusCode { get; set; } + + [DataMember(Order = 1)] + public HeaderCollection Headers { get; set; } + + [DataMember(Order = 2)] + public CookieCollection Cookies { get; set; } + + [DataMember(Order = 3)] + public string ResponseText { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + public ExtensionDataObject ExtensionData { get; set; } + + /// + /// Collection of cookies. + /// + [CollectionDataContract(Name = "Cookies", ItemName = "Cookie")] + public class CookieCollection : List + { + public CookieCollection() + { + } + + public CookieCollection(IEnumerable cookies) + : base(cookies) + { + } + + public string this[string name] + { + get + { + return this.Where((c) => c.Name == name).Single().Value; + } + } + + public bool Contains(string name) + { + return this.Where((c) => c.Name == name).Count() > 0; + } + } + + /// + /// Stores information about a cookie. + /// + [DataContract(Name = "Cookie")] + public class Cookie : IExtensibleDataObject + { + [DataMember(Order = 0)] + public string Name { get; set; } + + [DataMember(Order = 1)] + public string Value { get; set; } + + [DataMember(Order = 2)] + public Uri RelativeUri { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + + /// + /// Collection of headers. + /// + [CollectionDataContract(Name = "Headers", ItemName = "Header")] + public class HeaderCollection : List
+ { + public HeaderCollection() + { + } + + public HeaderCollection(IEnumerable
headers) + : base(headers) + { + } + + public string this[string name] + { + get + { + return this.Where((h) => h.Name == name).Single().Value; + } + set + { + this.Where((h) => h.Name == name).Single().Value = value; + } + } + + public bool Contains(string name) + { + return this.Where((c) => c.Name == name).Count() > 0; + } + } + + /// + /// Stores information about a header. + /// + [DataContract(Name = "Header")] + public class Header : IExtensibleDataObject + { + [DataMember(Order = 0)] + public string Name { get; set; } + + [DataMember(Order = 1)] + public string Value { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/MockServer/HttpMessageCollection.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/MockServer/HttpMessageCollection.cs new file mode 100644 index 000000000000..58c774fe64ac --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/MockServer/HttpMessageCollection.cs @@ -0,0 +1,133 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.MockServer +{ + /// + /// A collection of all Http messages in a session. + /// + [CollectionDataContract(Name = "HttpMessageCollection", ItemName = "HttpMessage")] + public class HttpMessageCollection : List + { + /// + /// Stores the current index for response recording. + /// + private int recordIndex; + + /// + /// Stores the current index for response playback. + /// + private int playbackIndex; + + /// + /// Initializes a new instance of the class. + /// + public HttpMessageCollection() + { + } + + /// + /// Initializes a new instance of the class with + /// pre-existing messages. + /// + /// Pre-existing responses. + public HttpMessageCollection(IEnumerable messages) + : base(messages) + { + } + + /// + /// Resets the record and playback session. + /// + public void Reset() + { + this.recordIndex = 0; + this.playbackIndex = 0; + } + + /// + /// Records the given message into the session. + /// + /// The response object associated with this request. + public void RecordMessage(HttpMessage message) + { + // Save the current index. + message.Index = this.recordIndex; + + // Remove existing item with this index. + HttpMessage itemToReplace = this + .Where((info) => info.Index == this.recordIndex) + .FirstOrDefault(); + if (itemToReplace != null) + { + this.Remove(itemToReplace); + } + + // Add the new response to the list. + this.Add(message); + + this.recordIndex++; + } + + /// + /// Retrieves a message for the given for playback. + /// + /// The request for which to retrieve the response. + /// The response object associated with this request. + public HttpMessage GetMessage(Uri requestUri) + { + HttpMessage returnVal; + + IEnumerable foundRequests = this + .Where((info) => info.RequestInfo.RequestUri == requestUri); + IEnumerable foundRequestsWithMatchingIndex = foundRequests + .Where((info) => info.Index == this.playbackIndex); + + if (foundRequestsWithMatchingIndex.Count() > 1) + { + Console.Error.WriteLine("Warning: Found more than one response with same index!"); + Console.Error.WriteLine("{0}, Uri: {1}", this.playbackIndex, requestUri); + returnVal = foundRequestsWithMatchingIndex.First(); + } + else if (foundRequestsWithMatchingIndex.Count() == 1) + { + returnVal = foundRequestsWithMatchingIndex.Single(); + } + else + { + Console.Error.WriteLine("Warning: Found no response with matching index!"); + Console.Error.WriteLine("{0}, Uri: {1}", this.playbackIndex, requestUri); + returnVal = foundRequests.FirstOrDefault(); + } + + if (returnVal == null) + { + string exceptionMessage = string.Format( + CultureInfo.InvariantCulture, + "No response found for {0}", + requestUri); + throw new Exception(exceptionMessage); + } + + this.playbackIndex++; + return returnVal; + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/MockServer/HttpSession.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/MockServer/HttpSession.cs new file mode 100644 index 000000000000..86dd858de8aa --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/MockServer/HttpSession.cs @@ -0,0 +1,60 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.MockServer +{ + /// + /// Stores information about a session of Http messages. + /// + [DataContract(Name = "HttpSession")] + public class HttpSession + { + [DataMember(Order = 0)] + public string Name { get; set; } + + [DataMember(Order = 1)] + public HttpMessageCollection Messages { get; set; } + + /// + /// Validates that the request contain the proper messages. The first param is the expected + /// request, and the second param is the actual request. + /// + public Action RequestValidator { get; set; } + + /// + /// An action that allows request to be modified prior to sending it to the server. + /// + public Action RequestModifier { get; set; } + + /// + /// An action that allows response to be modified prior to sending it to the client. + /// + public Action ResponseModifier { get; set; } + + /// + /// The real service's base Uri. If specifed the requests will be forwarded to a + /// real service. + /// + public Uri ServiceBaseUri { get; set; } + + /// + /// A dictionary to store extra session properties. + /// + public Dictionary SessionProperties { get; set; } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/MockServer/HttpSessionCollection.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/MockServer/HttpSessionCollection.cs new file mode 100644 index 000000000000..c91eefc1b799 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/MockServer/HttpSessionCollection.cs @@ -0,0 +1,118 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Xml; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.MockServer +{ + /// + /// A collection of all sessions availiable for a series of tests. + /// + [CollectionDataContract(Name = "HttpSessionCollection", ItemName = "HttpSession")] + public class HttpSessionCollection : List + { + /// + /// Initializes a new instance of the class. + /// + public HttpSessionCollection() + { + } + + /// + /// Initializes a new instance of the class with + /// pre-existing sessions. + /// + /// Pre-existing sessions. + public HttpSessionCollection(IEnumerable sessions) + : base(sessions) + { + } + + /// + /// Loads Http message sessions from a file, or create an empty collection if load fails. + /// + /// The file that stores the session information. + /// An instance of the object. + public static HttpSessionCollection Load(string filename) + { + try + { + DataContractSerializer serializer = + new DataContractSerializer(typeof(HttpSessionCollection)); + using (FileStream stream = new FileStream(filename, FileMode.Open)) + { + return (HttpSessionCollection)serializer.ReadObject(stream); + } + } + catch (Exception) + { + Console.Error.WriteLine("The session file did not load correctly."); + return new HttpSessionCollection(); + } + } + + /// + /// Stores Http message sessions to a file. + /// + /// The file that stores the session information. + public void Save(string filename) + { + DataContractSerializer serializer = + new DataContractSerializer(typeof(HttpSessionCollection)); + using (XmlWriter xmlWriter = XmlWriter.Create( + filename, + new XmlWriterSettings { Indent = true })) + { + serializer.WriteObject(xmlWriter, this); + } + } + + /// + /// Retrieves the session with the given , or an empty session + /// if it's not found. + /// + /// The name of the session to retrieve. + /// + /// The session with the given , or an empty session if it's + /// not found. + /// + public HttpSession GetSession(string sessionName) + { + HttpSession foundSession = this + .Where((session) => session.Name == sessionName) + .FirstOrDefault(); + + if (foundSession == null) + { + foundSession = new HttpSession(); + foundSession.Name = sessionName; + foundSession.Messages = new HttpMessageCollection(); + this.Add(foundSession); + } + + // Create a the new session properties dictionary + foundSession.SessionProperties = new Dictionary(); + + // Reset the messages to start at the begining + foundSession.Messages.Reset(); + + return foundSession; + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/MockServer/MockHttpServer.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/MockServer/MockHttpServer.cs new file mode 100644 index 000000000000..3f75a9aed0db --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/MockServer/MockHttpServer.cs @@ -0,0 +1,714 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Net; +using System.Security.Cryptography.X509Certificates; +using System.Text; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Test.Common; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.MockServer +{ + /// + /// A mock server implementation for capturing and replaying Http Web Requests. + /// + public class MockHttpServer : IDisposable + { + /// + /// The HTTP server prefix for tests + /// + public static readonly Uri DefaultServerPrefixUri = + new Uri("http://localhost:12345/"); + + /// + /// The HTTPS server prefix for tests which is been used in cert auth based unit tests + /// + public static readonly Uri DefaultHttpsServerPrefixUri = + new Uri("https://localhost:65432/"); + + /// + /// The app id for the https binding + /// + private static readonly Guid HttpsAppId = new Guid("C1714DD7-CAB5-4031-8622-3D3D3D2795DB"); + + private readonly Uri baseUri; + private readonly AsyncExceptionManager exceptionManager; + private readonly HttpListener listener; + private readonly Uri stopListenerUri; + + /// + /// Initializes a new instance of the class that record or + /// playback responses for requests in a session. + /// + /// + /// The exception manager that captures all async exceptions. + /// + /// The server prefix to use. + /// The object that stores request/response information. + public MockHttpServer( + AsyncExceptionManager exceptionManager, + Uri baseUri, + HttpSession session) + : this(exceptionManager, baseUri) + { + this.stopListenerUri = new Uri(baseUri, Guid.NewGuid().ToString()); + this.listener = this.CreateListener( + context => HandleMockRequest( + context, + this.baseUri, + session), + int.MaxValue); + } + + /// + /// Initializes a new instance of the class with a specified + /// server prefix. + /// + /// + /// The exception manager that captures all async exceptions. + /// + /// The server prefix to use. + private MockHttpServer(AsyncExceptionManager exceptionManager, Uri baseUri) + { + this.exceptionManager = exceptionManager; + this.baseUri = baseUri; + } + + /// + /// Create a with the specified content. + /// + /// The status code to use in the exception. + /// The exception content. + /// An action that adds extra info to the response. + /// An with the specified content. + public static WebException CreateWebException( + HttpStatusCode status, + string content, + Action contextHandler) + { + return CreateWebException( + status, + new MemoryStream(Encoding.UTF8.GetBytes(content)), + contextHandler); + } + + /// + /// Create a with the specified content. + /// + /// The status code to use in the exception. + /// A of the exception content. + /// An action that adds extra info to the response. + /// An with the specified content. + public static WebException CreateWebException( + HttpStatusCode status, + MemoryStream content, + Action contextHandler) + { + HttpListener server = null; + try + { + // Create a mock server that always returns the response code and exception stream + // specified in the parameter. + using (AsyncExceptionManager exceptionManager = new AsyncExceptionManager()) + { + MockHttpServer mockServer = new MockHttpServer( + exceptionManager, + MockHttpServer.DefaultServerPrefixUri); + server = mockServer.CreateListener( + (context) => + { + contextHandler(context); + context.Response.StatusCode = (int)status; + content.Position = 0; + content.CopyTo(context.Response.OutputStream); + context.Response.Close(); + }, + 1); + } + + WebClient client = new WebClient(); + try + { + client.OpenRead(new Uri(DefaultServerPrefixUri, "exception.htm")); + } + catch (WebException ex) + { + return ex; + } + } + finally + { + server.Stop(); + } + + return null; + } + + /// + /// Setup certificates required for the unit tests + /// + public static void SetupCertificates() + { + TestingTracingInterceptor.AddToContext(); + ProfileClient.DataStore = new MockDataStore(); + AzureSession.AuthenticationFactory = new MockTokenAuthenticationFactory(); + var newGuid = Guid.NewGuid(); + ProfileClient client = new ProfileClient(); + client.Profile.Subscriptions[newGuid] = new AzureSubscription + { + Id = newGuid, + Name = "test", + Environment = EnvironmentName.AzureCloud, + Account = "test" + }; + client.Profile.Accounts["test"] = new AzureAccount + { + Id = "test", + Type = AzureAccount.AccountType.User, + Properties = new Dictionary + { + {AzureAccount.Property.Subscriptions, newGuid.ToString()} + } + }; + client.Profile.Accounts[UnitTestHelper.GetUnitTestClientCertificate().Thumbprint] = new AzureAccount + { + Id = UnitTestHelper.GetUnitTestClientCertificate().Thumbprint, + Type = AzureAccount.AccountType.Certificate, + Properties = new Dictionary + { + {AzureAccount.Property.Subscriptions, newGuid.ToString()} + } + }; + client.Profile.Accounts[UnitTestHelper.GetUnitTestSSLCertificate().Thumbprint] = new AzureAccount + { + Id = UnitTestHelper.GetUnitTestSSLCertificate().Thumbprint, + Type = AzureAccount.AccountType.Certificate, + Properties = new Dictionary + { + {AzureAccount.Property.Subscriptions, newGuid.ToString()} + } + }; + AzureSession.SetCurrentContext(client.Profile.Subscriptions[newGuid], + null, client.Profile.Accounts["test"]); + + client.Profile.Save(); + + + // Check if the cert has been installed + Process proc = ExecuteProcess( + "netsh", + string.Format( + CultureInfo.InvariantCulture, + "http show sslcert ipport=0.0.0.0:{0}", + DefaultHttpsServerPrefixUri.Port)); + + if (proc.ExitCode != 0) + { + // Install the SSL and client certificates to the LocalMachine store + X509Store store = new X509Store(StoreName.My, StoreLocation.LocalMachine); + store.Open(OpenFlags.ReadWrite); + store.Add(UnitTestHelper.GetUnitTestSSLCertificate()); + store.Add(UnitTestHelper.GetUnitTestClientCertificate()); + store.Close(); + store = new X509Store(StoreName.Root, StoreLocation.LocalMachine); + store.Open(OpenFlags.ReadWrite); + store.Add(UnitTestHelper.GetUnitTestSSLCertificate()); + store.Add(UnitTestHelper.GetUnitTestClientCertificate()); + store.Close(); + + // Remove any existing certs on the default port + proc = ExecuteProcess( + "netsh", + string.Format( + CultureInfo.InvariantCulture, + "http delete sslcert ipport=0.0.0.0:{0}", + DefaultHttpsServerPrefixUri.Port)); + + // Install the ssl cert on the default port + proc = ExecuteProcess( + "netsh", + string.Format( + CultureInfo.InvariantCulture, + "http add sslcert ipport=0.0.0.0:{0} certhash={1} appid={2:B}", + DefaultHttpsServerPrefixUri.Port, + UnitTestHelper.GetUnitTestSSLCertificate().Thumbprint, + MockHttpServer.HttpsAppId)); + + if (proc.ExitCode != 0) + { + throw new InvalidOperationException(string.Format( + CultureInfo.InvariantCulture, + "Unable to add ssl certificate: {0}", + proc.StandardOutput.ReadToEnd())); + } + } + } + + /// + /// Stop and closes the listener. + /// + public void Dispose() + { + WebClient client = new WebClient(); + using (Stream stopStream = client.OpenRead(this.stopListenerUri)) + { + } + + this.listener.Close(); + } + + /// + /// Returns the with its prefix changed from + /// to , or if the + /// prefix is not in the , return the Uri as is. + /// + /// The original Uri. + /// The prefix in the original Uri to change. + /// The new Uri prefix. + /// The original Uri with the new prefix. + private static Uri ChangeUriBase(Uri originalUri, Uri originalUriPrefix, Uri newPrefix) + { + Uri relativeUri = originalUriPrefix.MakeRelativeUri(originalUri); + + if (relativeUri.IsAbsoluteUri) + { + return originalUri; + } + else + { + return new Uri(newPrefix, relativeUri); + } + } + + /// + /// Helper method to execute and wait for process to complete. + /// + /// An application with which to start the process. + /// Arguments passed to the application. + /// The info. + private static Process ExecuteProcess(string filename, string arguments) + { + Process proc = new Process(); + proc.StartInfo = new ProcessStartInfo(filename, arguments) + { + RedirectStandardOutput = true, + UseShellExecute = false, + CreateNoWindow = true, + }; + proc.Start(); + proc.WaitForExit(); + + return proc; + } + + #region Helper methods for response record/playback + + /// + /// Retrieves an object from a real service. + /// + /// The request to mimic on the real service. + /// The request's base Uri. + /// The real service's base Uri. + /// The object that stores request/response information. + /// An object containing the request/response. + private static HttpMessage GetResponseInfoFromService( + HttpListenerRequest request, + Uri baseUri, + Uri serviceBaseUri, + HttpSession session) + { + // Construct the request to make + HttpMessage message = new HttpMessage(); + message.RequestInfo = ConstructRequestInfo(request); + + // Clone the request and modify it for the real service + HttpMessage.Request requestToSend = message.RequestInfo.Clone(); + requestToSend.RequestUri = ChangeUriBase(request.Url, baseUri, serviceBaseUri); + if (session.RequestModifier != null) + { + session.RequestModifier(requestToSend); + } + + HttpWebResponse response = MakeServiceRequest(requestToSend); + message.ResponseInfo = ConstructResponseInfo(serviceBaseUri, response); + return message; + } + + /// + /// Create an object out of the given + /// . + /// + /// The original request to mimic. + /// An object containing the request. + private static HttpMessage.Request ConstructRequestInfo( + HttpListenerRequest originalRequest) + { + HttpMessage.Request requestInfo = new HttpMessage.Request(); + + // Copy the request Uri and Method + requestInfo.RequestUri = originalRequest.Url; + requestInfo.Method = originalRequest.HttpMethod; + + // Copy all relevant headers to the request + requestInfo.Headers = new HttpMessage.HeaderCollection(); + foreach (string headerKey in originalRequest.Headers.AllKeys) + { + if (headerKey.Equals("User-Agent", StringComparison.OrdinalIgnoreCase)) + { + requestInfo.UserAgent = originalRequest.Headers[headerKey]; + } + else if (headerKey.Equals("Content-Type", StringComparison.OrdinalIgnoreCase)) + { + requestInfo.ContentType = originalRequest.Headers[headerKey]; + } + else if (headerKey.Equals("Accept", StringComparison.OrdinalIgnoreCase)) + { + requestInfo.Accept = originalRequest.Headers[headerKey]; + } + else if (!headerKey.Equals("Connection", StringComparison.OrdinalIgnoreCase) && + !headerKey.Equals("Host", StringComparison.OrdinalIgnoreCase) && + !headerKey.Equals("Content-Length", StringComparison.OrdinalIgnoreCase) && + !headerKey.Equals("Expect", StringComparison.OrdinalIgnoreCase)) + { + requestInfo.Headers.Add(new HttpMessage.Header + { + Name = headerKey, + Value = originalRequest.Headers[headerKey] + }); + } + } + + // Copy response cookies + requestInfo.Cookies = new HttpMessage.CookieCollection(); + foreach (Cookie cookie in originalRequest.Cookies) + { + requestInfo.Cookies.Add(new HttpMessage.Cookie + { + Name = cookie.Name, + Value = cookie.Value, + }); + } + + // Copy response stream + if (originalRequest.Headers.AllKeys.Contains("Content-Length")) + { + using (StreamReader reader = new StreamReader(originalRequest.InputStream)) + { + requestInfo.RequestText = reader.ReadToEnd(); + } + } + + // Retrieve the certificate on the request if any. + requestInfo.Certificate = originalRequest.GetClientCertificate(); + + return requestInfo; + } + + /// + /// Create an object out of the response from a + /// service. + /// + /// The real service's base Uri. + /// The response from the service. + /// An object containing the response. + private static HttpMessage.Response ConstructResponseInfo( + Uri serviceBaseUri, + HttpWebResponse response) + { + HttpMessage.Response responseInfo = new HttpMessage.Response(); + + // Copy the response status code + responseInfo.StatusCode = response.StatusCode; + + // Copy all relevant headers to the response + responseInfo.Headers = new HttpMessage.HeaderCollection(); + foreach (string headerKey in response.Headers.AllKeys) + { + if (!headerKey.Equals("Transfer-Encoding", StringComparison.OrdinalIgnoreCase) && + !headerKey.Equals("Content-Length", StringComparison.OrdinalIgnoreCase)) + { + responseInfo.Headers.Add(new HttpMessage.Header() + { + Name = headerKey, + Value = response.Headers[headerKey] + }); + } + } + + // Copy response cookies + responseInfo.Cookies = new HttpMessage.CookieCollection(); + foreach (Cookie cookie in response.Cookies) + { + Uri cookieHostUri = new Uri(serviceBaseUri.Scheme + Uri.SchemeDelimiter + serviceBaseUri.Host); + Uri cookieUri = new Uri(cookieHostUri, cookie.Path); + Uri cookieRelativeUri = serviceBaseUri.MakeRelativeUri(cookieUri); + responseInfo.Cookies.Add(new HttpMessage.Cookie + { + Name = cookie.Name, + Value = cookie.Value, + RelativeUri = cookieRelativeUri + }); + } + + // Copy response stream + using (StreamReader reader = new StreamReader(response.GetResponseStream())) + { + responseInfo.ResponseText = reader.ReadToEnd(); + } + + return responseInfo; + } + + /// + /// Make an request to the real service and retrieve the response. + /// + /// The original request to mimic. + /// The Uri to make the request to. + /// The response from the service. + private static HttpWebResponse MakeServiceRequest( + HttpMessage.Request originalRequest) + { + HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create( + originalRequest.RequestUri); + + request.Method = originalRequest.Method; + + // Copy all relevant headers to the request + if (originalRequest.UserAgent != null) + { + request.UserAgent = originalRequest.UserAgent; + } + + if (originalRequest.ContentType != null) + { + request.ContentType = originalRequest.ContentType; + } + + if (originalRequest.Accept != null) + { + request.Accept = originalRequest.Accept; + } + + foreach (HttpMessage.Header header in originalRequest.Headers) + { + request.Headers.Add(header.Name, header.Value); + } + + if (originalRequest.Certificate != null) + { + request.ClientCertificates.Add(originalRequest.Certificate); + } + + // Copy all request cookies + request.CookieContainer = new CookieContainer(); + foreach (HttpMessage.Cookie cookie in originalRequest.Cookies) + { + Cookie requestCookie = new Cookie(cookie.Name, cookie.Value); + requestCookie.Domain = request.RequestUri.Host; + requestCookie.Path = request.RequestUri.LocalPath; + request.CookieContainer.Add(requestCookie); + } + + // Copy request streams + if (originalRequest.RequestText != null) + { + using (StreamWriter requestStream = new StreamWriter(request.GetRequestStream())) + { + requestStream.Write(originalRequest.RequestText); + } + } + + // Send the real request and obtain the response + HttpWebResponse response; + try + { + response = (HttpWebResponse)request.GetResponse(); + } + catch (WebException ex) + { + response = (HttpWebResponse)ex.Response; + } + + return response; + } + + /// + /// Constructs the response from the specified . + /// + /// The object that contains all info about the response. + /// The base Uri for the response. + /// The response object to construct. + private static void ConstructListenerResponse( + HttpMessage.Response responseInfo, + Uri baseUri, + HttpListenerResponse response) + { + // Set the status code + response.StatusCode = (int)responseInfo.StatusCode; + + // Copy relevant response headers + foreach (HttpMessage.Header header in responseInfo.Headers) + { + response.Headers[header.Name] = header.Value; + } + + // Copy response cookies + foreach (HttpMessage.Cookie responseCookie in responseInfo.Cookies) + { + Cookie cookie = new Cookie(responseCookie.Name, responseCookie.Value); + Uri cookieUri = responseCookie.RelativeUri; + if (!cookieUri.IsAbsoluteUri) + { + cookieUri = new Uri(baseUri, cookieUri); + } + + cookie.Domain = cookieUri.Host; + cookie.Path = cookieUri.LocalPath; + response.Cookies.Add(cookie); + } + + // Copy response stream + byte[] responseBytes = Encoding.UTF8.GetBytes(responseInfo.ResponseText); + response.ContentLength64 = responseBytes.Length; + using (BinaryWriter writer = new BinaryWriter(response.OutputStream)) + { + writer.Write(responseBytes); + } + } + + #endregion + + #region Request Handlers + + /// + /// The async delegate that handles an incoming request, passing it through to a real + /// service and record the response if was specified, + /// or plays back responses from a pre-recorded if it was not. + /// + /// The context for the incoming request. + /// The incoming request's base Uri. + /// The object that stores request/response information. + private static void HandleMockRequest( + HttpListenerContext context, + Uri baseUri, + HttpSession session) + { + if (session.ServiceBaseUri != null) + { + // Issue the request to a real service and record the response + HttpMessage message = GetResponseInfoFromService( + context.Request, + baseUri, + session.ServiceBaseUri, + session); + session.Messages.RecordMessage(message); + } + + // Construct the mock response from responses in the session. + HttpMessage recordedMessage = session.Messages.GetMessage(context.Request.Url); + if (session.RequestValidator != null) + { + HttpMessage.Request actualRequestInfo = ConstructRequestInfo(context.Request); + session.RequestValidator(recordedMessage, actualRequestInfo); + } + + if (session.ResponseModifier != null) + { + session.ResponseModifier(recordedMessage); + } + + ConstructListenerResponse(recordedMessage.ResponseInfo, baseUri, context.Response); + context.Response.Close(); + } + + /// + /// The async delegate that handles an incoming request. + /// + /// The for this request. + /// An action that constructs the response. + /// The number of requests to handle before stopping. + private void HandleRequest( + IAsyncResult ar, + Action contextHandler, + int requestsToHandle) + { + HttpListener listener = (HttpListener)ar.AsyncState; + + // Get the current context, request and response object and construct the response. + HttpListenerContext context = null; + context = listener.EndGetContext(ar); + if (context.Request.Url != this.stopListenerUri) + { + // Handle the context, by creating the response. + this.exceptionManager.CatchExceptions( + () => contextHandler(context), + () => + { + context.Response.StatusCode = (int)HttpStatusCode.InternalServerError; + context.Response.Close(); + }); + + if (requestsToHandle > 0) + { + // Setup the next context + listener.BeginGetContext( + (arNext) => this.exceptionManager.CatchExceptions( + () => this.HandleRequest( + arNext, + contextHandler, + requestsToHandle - 1)), + listener); + } + } + else + { + // We want to shutdown the server, return ok and exit. + context.Response.StatusCode = (int)HttpStatusCode.OK; + context.Response.Close(); + } + } + + #endregion + + /// + /// Create a to handles requests. + /// + /// An action that constructs the response. + /// The number of requests to handle before stopping. + /// The listener object. + private HttpListener CreateListener( + Action contextHandler, + int requestsToHandle) + { + // Create a mock http listener. + HttpListener listener = new HttpListener(); + listener.Prefixes.Add(this.baseUri.AbsoluteUri); + listener.Start(); + listener.BeginGetContext( + (ar) => this.exceptionManager.CatchExceptions( + () => this.HandleRequest(ar, contextHandler, requestsToHandle - 1)), + listener); + return listener; + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/MockServer/MockServerHelper.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/MockServer/MockServerHelper.cs new file mode 100644 index 000000000000..c0b08956c234 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/MockServer/MockServerHelper.cs @@ -0,0 +1,82 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.MockServer +{ + public class MockServerHelper + { + /// + /// The private singleton collection that stores all mock sessions + /// + private static readonly HttpSessionCollection defaultSessionCollection = + HttpSessionCollection.Load("MockSessions.xml"); + + /// + /// Defines the service base Uri to use for common functions + /// + internal static Uri CommonServiceBaseUri + { + get + { + return null; + } + } + + /// + /// The singleton collection that stores all mock sessions + /// + public static HttpSessionCollection DefaultSessionCollection + { + get + { + return defaultSessionCollection; + } + } + + /// + /// Save the default mock session collection to the test output directory. + /// + public static void SaveDefaultSessionCollection() + { + lock (defaultSessionCollection) + { + defaultSessionCollection.Save("MockSessions.xml"); + } + } + + /// + /// Execute a given function within a mock session context. + /// + /// The return type of the function. + /// The mock session information. + /// The endpoint where the Mock Server should listen on. + /// The function to execute. + /// The function output. + public static T ExecuteWithMock( + HttpSession testSession, + Uri mockServerUri, + Func func) + { + using (AsyncExceptionManager exceptionManager = new AsyncExceptionManager()) + { + using (new MockHttpServer(exceptionManager, mockServerUri, testSession)) + { + return func(); + } + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Server/Cmdlet/ServerCmdletAttributionTests.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Server/Cmdlet/ServerCmdletAttributionTests.cs new file mode 100644 index 000000000000..207c0d744ad7 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Server/Cmdlet/ServerCmdletAttributionTests.cs @@ -0,0 +1,77 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Server.Cmdlet; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Server.Cmdlet +{ + /// + /// These tests prevent regression in parameter validation attributes. + /// + [TestClass] + public class ServerCmdletAttributionTests : TestBase + { + [TestInitialize] + public void SetupTest() + { + } + + [TestMethod] + public void GetAzureSqlDatabaseServerAttributeTest() + { + Type cmdlet = typeof(GetAzureSqlDatabaseServer); + UnitTestHelper.CheckConfirmImpact(cmdlet, ConfirmImpact.None); + UnitTestHelper.CheckCmdletModifiesData(cmdlet, false); + } + + [TestMethod] + public void NewAzureSqlDatabaseServerAttributeTest() + { + Type cmdlet = typeof(NewAzureSqlDatabaseServer); + UnitTestHelper.CheckConfirmImpact(cmdlet, ConfirmImpact.Low); + UnitTestHelper.CheckCmdletModifiesData(cmdlet, true); + } + + [TestMethod] + public void RemoveAzureSqlDatabaseServerAttributeTest() + { + Type cmdlet = typeof(RemoveAzureSqlDatabaseServer); + UnitTestHelper.CheckConfirmImpact(cmdlet, ConfirmImpact.High); + UnitTestHelper.CheckCmdletModifiesData(cmdlet, true); + } + + [TestMethod] + public void SetAzureSqlDatabaseServerAttributeTest() + { + Type cmdlet = typeof(SetAzureSqlDatabaseServer); + UnitTestHelper.CheckConfirmImpact(cmdlet, ConfirmImpact.Medium); + UnitTestHelper.CheckCmdletModifiesData(cmdlet, true); + } + + /// + /// Tests the attributes of the Get-AzureSqlDatabaseServerQuota Cmdlet + /// + [TestMethod] + public void GetAzureSqlDatabaseServerQuotaAttributeTest() + { + Type cmdlet = typeof(GetAzureSqlDatabaseServerQuota); + UnitTestHelper.CheckConfirmImpact(cmdlet, ConfirmImpact.None); + UnitTestHelper.CheckCmdletModifiesData(cmdlet, false); + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Server/Cmdlet/ServerCmdletTests.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Server/Cmdlet/ServerCmdletTests.cs new file mode 100644 index 000000000000..0bea995f575e --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Server/Cmdlet/ServerCmdletTests.cs @@ -0,0 +1,415 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.ObjectModel; +using System.Linq; +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Model; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Database.Cmdlet; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.MockServer; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using System.Management.Automation.Runspaces; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.Utilities; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Server.Cmdlet +{ + [TestClass] + public class ServerCmdletTests : TestBase + { + [TestCleanup] + public void CleanupTest() + { + // Save the mock session results + MockServerHelper.SaveDefaultSessionCollection(); + } + + private static void VerifyServer(SqlDatabaseServerContext server, string adminLogin, string location) + { + Assert.AreEqual(adminLogin, server.AdministratorLogin, "Expecting server login to match."); + Assert.AreEqual(location, server.Location, "Expecting matching location."); + Assert.AreEqual(10, server.ServerName.Length, "Expecting a valid server name."); + } + + private static void VerifyServer(SqlDatabaseServerContext server, string adminLogin, string location, string version, string state) + { + VerifyServer(server, adminLogin, location); + Assert.AreEqual(version, server.Version, "Server version doesn't match"); + Assert.AreEqual(state, server.State, "Server state does not match"); + } + + [TestMethod] + public void AzureSqlDatabaseServerTests() + { + // This test uses the https endpoint, setup the certificates. + MockHttpServer.SetupCertificates(); + + SqlTestPsHost host = new SqlTestPsHost(); + SqlCustomPsHostUserInterface ui = host.UI as SqlCustomPsHostUserInterface; + + using (Runspace space = RunspaceFactory.CreateRunspace(host)) + { + space.Open(); + + using (System.Management.Automation.PowerShell powershell = System.Management.Automation.PowerShell.Create()) + { + powershell.Runspace = space; + + // Setup the subscription used for the test + AzureSubscription subscription = + UnitTestHelper.SetupUnitTestSubscription(powershell); + + // Create a new server + HttpSession testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTest.AzureSqlDatabaseServerTests"); + ServerTestHelper.SetDefaultTestSessionSettings(testSession); + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.IsTrue( + actual.UserAgent.Contains(ApiConstants.UserAgentHeaderValue), + "Missing proper UserAgent string."); + }); + + powershell.Runspace.SessionStateProxy.SetVariable("login", "mylogin"); + powershell.Runspace.SessionStateProxy.SetVariable("password", "Pa$$w0rd!"); + powershell.Runspace.SessionStateProxy.SetVariable("location", "East Asia"); + Collection newServerResult = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + @"New-AzureSqlDatabaseServer" + + @" -AdministratorLogin $login" + + @" -AdministratorLoginPassword $password" + + @" -Location $location"); + }); + + ui.PromptInputs = new PSObject[] { "mylogin", "Pa$$w0rd", "East Asia" }; + Collection newServerResult2 = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript(@"New-AzureSqlDatabaseServer"); + }); + ui.PromptInputs = null; + + Collection getServerResult = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + powershell.Runspace.SessionStateProxy.SetVariable("server", newServerResult); + return powershell.InvokeBatchScript( + @"Get-AzureSqlDatabaseServer $server.ServerName"); + }); + + Collection setServerResult = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + powershell.Runspace.SessionStateProxy.SetVariable("server", newServerResult); + powershell.Runspace.SessionStateProxy.SetVariable("password", "Pa$$w0rd2"); + powershell.InvokeBatchScript( + @"$server | Set-AzureSqlDatabaseServer" + + @" -AdminPassword $password" + + @" -Force"); + return powershell.InvokeBatchScript( + @"$server | Get-AzureSqlDatabaseServer"); + }); + + ui.PromptInputs = new PSObject[] { "Pa$$w0rd2" }; + Collection setServerResult2 = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + powershell.Runspace.SessionStateProxy.SetVariable("server", newServerResult2); + powershell.InvokeBatchScript(@"$server | Set-AzureSqlDatabaseServer"); + return powershell.InvokeBatchScript(@"$server | Get-AzureSqlDatabaseServer"); + }); + ui.PromptInputs = null; + + Collection removeServerResult = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + powershell.Runspace.SessionStateProxy.SetVariable("server", newServerResult); + powershell.InvokeBatchScript( + @"$server | Remove-AzureSqlDatabaseServer" + + @" -Force"); + + return powershell.InvokeBatchScript( + @"Get-AzureSqlDatabaseServer"); + }); + + ui.PromptInputs = new PSObject[] { ((SqlDatabaseServerContext)newServerResult2[0].BaseObject).ServerName }; + ui.PromptForChoiceInputIndex = 0; //answer yes to delete database prompt + Collection removeServerResult2 = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + powershell.InvokeBatchScript(@"Remove-AzureSqlDatabaseServer"); + + return powershell.InvokeBatchScript( + @"Get-AzureSqlDatabaseServer"); + }); + ui.PromptForChoiceInputIndex = -1; + ui.PromptInputs = null; + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Unexpected Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Unexpected Warnings during run!"); + + // Validate New-AzureSqlDatabaseServer results + SqlDatabaseServerContext server = + newServerResult.Single().BaseObject as SqlDatabaseServerContext; + Assert.IsNotNull(server, "Expecting a SqlDatabaseServerContext object"); + VerifyServer( + server, + (string)powershell.Runspace.SessionStateProxy.GetVariable("login"), + (string)powershell.Runspace.SessionStateProxy.GetVariable("location")); + + SqlDatabaseServerContext server2 = newServerResult2.Single().BaseObject as SqlDatabaseServerContext; + Assert.IsNotNull(server2, "Expecting a SqlDatabaseServerContext object"); + VerifyServer( + server, + (string)powershell.Runspace.SessionStateProxy.GetVariable("login"), + (string)powershell.Runspace.SessionStateProxy.GetVariable("location")); + + // Validate Get-AzureSqlDatabaseServer results + server = getServerResult.Single().BaseObject as SqlDatabaseServerContext; + Assert.IsNotNull(server, "Expecting a SqlDatabaseServerContext object"); + VerifyServer( + server, + (string)powershell.Runspace.SessionStateProxy.GetVariable("login"), + (string)powershell.Runspace.SessionStateProxy.GetVariable("location"), + "2.0", + "Ready"); + + server = setServerResult.Single().BaseObject as SqlDatabaseServerContext; + Assert.IsNotNull(server, "Expecting a SqlDatabaseServerContext object"); + VerifyServer( + server, + (string)powershell.Runspace.SessionStateProxy.GetVariable("login"), + (string)powershell.Runspace.SessionStateProxy.GetVariable("location"), + "2.0", + "Ready"); + + server2 = setServerResult2.Single().BaseObject as SqlDatabaseServerContext; + Assert.IsNotNull(server, "Expecting a SqlDatabaseServerContext object"); + VerifyServer( + server2, + (string)powershell.Runspace.SessionStateProxy.GetVariable("login"), + (string)powershell.Runspace.SessionStateProxy.GetVariable("location"), + "2.0", + "Ready"); + + // Validate Remove-AzureSqlDatabaseServer results + Assert.IsFalse( + removeServerResult.Any((o) => o.GetVariableValue("ServerName") == server.ServerName), + "Server should have been removed."); + + Assert.IsFalse( + removeServerResult2.Any((o) => o.GetVariableValue("ServerName") == server2.ServerName), + "Server 2 should have been removed."); + + powershell.Streams.ClearStreams(); + } + + space.Close(); + } + } + + [TestMethod] + public void AzureSqlDatabaseServerV2Tests() + { + // This test uses the https endpoint, setup the certificates. + MockHttpServer.SetupCertificates(); + + using (System.Management.Automation.PowerShell powershell = System.Management.Automation.PowerShell.Create()) + { + // Setup the subscription used for the test + AzureSubscription subscription = + UnitTestHelper.SetupUnitTestSubscription(powershell); + + // Create a new V2 server + HttpSession testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTest.AzureSqlDatabaseServerV2Tests"); + ServerTestHelper.SetDefaultTestSessionSettings(testSession); + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.IsTrue( + actual.UserAgent.Contains(ApiConstants.UserAgentHeaderValue), + "Missing proper UserAgent string."); + }); + + powershell.Runspace.SessionStateProxy.SetVariable("login", "mylogin"); + powershell.Runspace.SessionStateProxy.SetVariable("password", "Pa$$w0rd!"); + powershell.Runspace.SessionStateProxy.SetVariable("location", "East Asia"); + Collection newServerResult = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + return powershell.InvokeBatchScript( + @"New-AzureSqlDatabaseServer" + + @" -AdministratorLogin $login" + + @" -AdministratorLoginPassword $password" + + @" -Location $location" + + @" -Version 2"); + }); + + Collection getServerResult = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + powershell.Runspace.SessionStateProxy.SetVariable("server", newServerResult); + return powershell.InvokeBatchScript( + @"Get-AzureSqlDatabaseServer $server.ServerName"); + }); + + Collection removeServerResult = MockServerHelper.ExecuteWithMock( + testSession, + MockHttpServer.DefaultHttpsServerPrefixUri, + () => + { + powershell.Runspace.SessionStateProxy.SetVariable("server", newServerResult); + powershell.InvokeBatchScript( + @"$server | Remove-AzureSqlDatabaseServer" + + @" -Force"); + + return powershell.InvokeBatchScript( + @"Get-AzureSqlDatabaseServer"); + }); + + Assert.AreEqual(0, powershell.Streams.Error.Count, "Unexpected Errors during run!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "Unexpected Warnings during run!"); + + // Validate New-AzureSqlDatabaseServer results + SqlDatabaseServerContext server = + newServerResult.Single().BaseObject as SqlDatabaseServerContext; + Assert.IsNotNull(server, "Expecting a SqlDatabaseServerContext object"); + VerifyServer( + server, + (string)powershell.Runspace.SessionStateProxy.GetVariable("login"), + (string)powershell.Runspace.SessionStateProxy.GetVariable("location")); + + + // Validate Get-AzureSqlDatabaseServer results + server = getServerResult.Single().BaseObject as SqlDatabaseServerContext; + Assert.IsNotNull(server, "Expecting a SqlDatabaseServerContext object"); + VerifyServer( + server, + (string)powershell.Runspace.SessionStateProxy.GetVariable("login"), + (string)powershell.Runspace.SessionStateProxy.GetVariable("location"), + "2.0", + null); + + powershell.Streams.ClearStreams(); + } + } + + [TestMethod] + public void GetAzureSqlDatabaseServerQuotaSqlAuthTest() + { + using (System.Management.Automation.PowerShell powershell = + System.Management.Automation.PowerShell.Create()) + { + // Create a context + NewAzureSqlDatabaseServerContextTests.CreateServerContextSqlAuth( + powershell, + "$context"); + + // Issue another create testdb1, causing a failure + HttpSession testSession = MockServerHelper.DefaultSessionCollection.GetSession( + "UnitTest.GetAzureSqlDatabaseServerQuotaSqlAuthTest"); + + DatabaseTestHelper.SetDefaultTestSessionSettings(testSession); + + testSession.RequestValidator = + new Action( + (expected, actual) => + { + Assert.AreEqual(expected.RequestInfo.Method, actual.Method); + Assert.AreEqual(expected.RequestInfo.UserAgent, actual.UserAgent); + switch (expected.Index) + { + // Request 0-1: Create testdb1 + case 0: + case 1: + DatabaseTestHelper.ValidateHeadersForODataRequest( + expected.RequestInfo, + actual); + break; + default: + Assert.Fail("No more requests expected."); + break; + } + }); + + using (AsyncExceptionManager exceptionManager = new AsyncExceptionManager()) + { + Services.Server.ServerDataServiceSqlAuth context; + using (new MockHttpServer( + exceptionManager, + MockHttpServer.DefaultServerPrefixUri, + testSession)) + { + Collection ctxPsObject = powershell.InvokeBatchScript("$context"); + + context = + (Services.Server.ServerDataServiceSqlAuth)ctxPsObject.First().BaseObject; + + Collection q1, q2; + q1 = powershell.InvokeBatchScript( + @"$context | Get-AzureSqlDatabaseServerQuota"); + + q2 = powershell.InvokeBatchScript( + @"$context | Get-AzureSqlDatabaseServerQuota -QuotaName ""Premium_Databases"""); + + ServerQuota quota1 = q1.FirstOrDefault().BaseObject as ServerQuota; + ServerQuota quota2 = q2.FirstOrDefault().BaseObject as ServerQuota; + + Assert.AreEqual( + "premium_databases", + quota1.Name, + "Unexpected quota name"); + Assert.AreEqual( + "premium_databases", + quota2.Name, + "Unexpected quota name"); + } + } + + Assert.AreEqual(0, powershell.Streams.Error.Count, "There were errors while running the tests!"); + Assert.AreEqual(0, powershell.Streams.Warning.Count, "There were warnings while running the tests!"); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Server/Cmdlet/ServerTestHelper.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Server/Cmdlet/ServerTestHelper.cs new file mode 100644 index 000000000000..706094021de7 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/Server/Cmdlet/ServerTestHelper.cs @@ -0,0 +1,54 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.MockServer; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.Server.Cmdlet +{ + public static class ServerTestHelper + { + /// + /// Defines the service base Uri to use for common functions + /// + internal static Uri CommonServiceBaseUri + { + get + { + return null; + } + } + + /// + /// Set the default mock session settings to modify request and responses. + /// + /// + public static void SetDefaultTestSessionSettings(HttpSession testSession) + { + testSession.ServiceBaseUri = ServerTestHelper.CommonServiceBaseUri; + testSession.RequestModifier = + new Action( + (request) => + { + // To run the tests targetting production uncomment the below line and substitute in a valid subscription ID. + // request.RequestUri = new Uri(request.RequestUri.OriginalString.Replace("00000000-0000-0000-0001-000000000001", "")); + }); + testSession.ResponseModifier = + new Action( + (message) => + { + }); + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/UnitTestHelper.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/UnitTestHelper.cs new file mode 100644 index 000000000000..0ec0c4d6c2b1 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/UnitTests/UnitTestHelper.cs @@ -0,0 +1,349 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Reflection; +using System.Security.Cryptography.X509Certificates; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests.MockServer; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.UnitTests +{ + /// + /// Common helper functions for SqlDatabase UnitTests. + /// + public static class UnitTestHelper + { + /// + /// Manifest file for SqlDatabase Tests. + /// + private static readonly string SqlDatabaseTestManifest = @".\ServiceManagement\Azure\Azure.psd1"; + + /// + /// The subscription name used in the unit tests. + /// + private static readonly string UnitTestEnvironmentName = "SqlUnitTestEnvironment"; + + /// + /// The subscription name used in the unit tests. + /// + private static readonly string UnitTestSubscriptionName = "SqlUnitTestSubscription"; + + /// + /// The subscription Id used in the unit tests. + /// + private static readonly string UnitTestSubscriptionId = "00000000-0000-0000-0001-000000000001"; + + /// + /// The SSL certificate used in the unit tests. + /// + private static readonly string UnitTestSSLCertFile = "PowershellTestSSLCert.pfx"; + + /// + /// The password for the SSL certificate file. + /// + private static readonly string UnitTestSSLCertPassword = "=8e0l5H|~$|=(TGA_9#v"; + + /// + /// The client certificate used in the unit tests. + /// + private static readonly string UnitTestClientCertFile = "PowershellTestClientCert.pfx"; + + /// + /// The password for the client certificate file. + /// + private static readonly string UnitTestClientCertPassword = "vIFEKSeSxP?RUh`#-t,?"; + + /// + /// Verifies the ConfirmImpact level on a cmdlet. + /// + /// The cmdlet to check. + /// The expected confirm impact. + public static void CheckConfirmImpact(Type cmdlet, ConfirmImpact confirmImpact) + { + object[] cmdletAttributes = cmdlet.GetCustomAttributes(typeof(CmdletAttribute), true); + Assert.AreEqual(1, cmdletAttributes.Length); + CmdletAttribute attribute = (CmdletAttribute)cmdletAttributes[0]; + Assert.AreEqual(confirmImpact, attribute.ConfirmImpact); + } + + /// + /// Verifies if a cmdlet is suppose to modify data or not. + /// + /// The cmdlet to check. + /// Whether or not the cmdlet is expected to modify data. + public static void CheckCmdletModifiesData(Type cmdlet, bool supportsShouldProcess) + { + // If the Cmdlet modifies data, SupportsShouldProcess should be set to true. + object[] cmdletAttributes = cmdlet.GetCustomAttributes(typeof(CmdletAttribute), true); + Assert.AreEqual(1, cmdletAttributes.Length); + CmdletAttribute attribute = (CmdletAttribute)cmdletAttributes[0]; + Assert.AreEqual(supportsShouldProcess, attribute.SupportsShouldProcess); + + if (supportsShouldProcess) + { + // If the Cmdlet modifies data, there needs to be a Force property to bypass + // ShouldProcess. + Assert.AreNotEqual( + null, + cmdlet.GetProperty("Force"), + "Force property is expected for Cmdlets that modifies data."); + } + } + + public static AzureSubscription CreateUnitTestSubscription() + { + return new AzureSubscription + { + Name = "TestSubscription", + Id = new Guid("00000000-0000-0000-0000-000000000000") + }; + } + + /// + /// Retrieve the client certificate used in the unittest. + /// + /// A containing the client certificate + public static X509Certificate2 GetUnitTestClientCertificate() + { + return ReadCertificateFromResource( + UnitTestClientCertFile, + UnitTestClientCertPassword); + } + + /// + /// Retrieve the SSL certificate used in the unittest. + /// + /// A containing the SSL certificate + public static X509Certificate2 GetUnitTestSSLCertificate() + { + return ReadCertificateFromResource( + UnitTestSSLCertFile, + UnitTestSSLCertPassword); + } + + /// + /// Use reflection to invoke a private member of an object. + /// + /// The object on which to invoke the method. + /// The name of the method to invoke. + /// An array of parameters for this method. + /// The return value for the method. + public static object InvokePrivate( + object instance, + string methodName, + params object[] paramerters) + { + Type cmdletType = instance.GetType(); + MethodInfo getManageUrlMethod = cmdletType.GetMethod( + methodName, + BindingFlags.Instance | BindingFlags.NonPublic); + + try + { + return getManageUrlMethod.Invoke(instance, paramerters); + } + catch (TargetInvocationException ex) + { + throw ex.InnerException; + } + } + + public static void SetFieldValue( + Type type, + string fieldName, + object value) + { + FieldInfo field = type.GetField(fieldName); + field.SetValue(null, value); + } + + /// + /// Invokes an array of scripts using the specified powershell instance. + /// + /// The powershell instance that executes the scripts. + /// An array of script to execute. + public static Collection InvokeBatchScript( + this System.Management.Automation.PowerShell powershell, + params string[] scripts) + { + if (powershell == null) + { + throw new ArgumentNullException("powershell"); + } + + powershell.Commands.Clear(); + + foreach (string script in scripts) + { + Console.Error.WriteLine(script); + powershell.AddScript(script); + } + + Collection results = powershell.Invoke(); + powershell.DumpStreams(); + return results; + } + + /// + /// Dumps all powershell streams to the console. + /// + /// The powershell instance containing the streams. + public static void DumpStreams(this System.Management.Automation.PowerShell powershell) + { + if (powershell == null) + { + throw new ArgumentNullException("powershell"); + } + + foreach (ProgressRecord record in powershell.Streams.Progress) + { + Console.Out.WriteLine("Progress: {0}", record.ToString()); + } + + foreach (DebugRecord record in powershell.Streams.Debug) + { + Console.Out.WriteLine("Debug: {0}", record.ToString()); + } + + foreach (VerboseRecord record in powershell.Streams.Verbose) + { + Console.Out.WriteLine("Verbose: {0}", record.ToString()); + } + + foreach (WarningRecord record in powershell.Streams.Warning) + { + Console.Error.WriteLine("Warning: {0}", record.ToString()); + } + + foreach (ErrorRecord record in powershell.Streams.Error) + { + Console.Error.WriteLine("Error: {0}", record.ToString()); + } + } + + /// + /// Imports the Azure Manifest to the given instance. + /// + /// An instance of the object. + public static void ImportAzureModule(System.Management.Automation.PowerShell powershell) + { + // Import the test manifest file + powershell.InvokeBatchScript( + string.Format(@"Import-Module .\{0}", SqlDatabaseTestManifest)); + Assert.IsTrue(powershell.Streams.Error.Count == 0); + } + + /// + /// Creates the $credential object in the given instance with + /// user name "testuser" and password "testpass". + /// + /// An instance of the object. + public static void CreateTestCredential(System.Management.Automation.PowerShell powershell) + { + CreateTestCredential(powershell, "testuser", "testp@ss1"); + } + + /// + /// Creates the $credential object in the given instance with + /// the given user name and password. + /// + /// An instance of the object. + public static void CreateTestCredential(System.Management.Automation.PowerShell powershell, string username, string password) + { + // Create the test credential + powershell.InvokeBatchScript( + string.Format(@"$user = ""{0}""", username), + string.Format(@"$pass = ""{0}"" | ConvertTo-SecureString -asPlainText -Force", password), + @"$credential = New-Object System.Management.Automation.PSCredential($user, $pass)"); + Assert.IsTrue(powershell.Streams.Error.Count == 0); + } + + /// + /// Common helper method for other tests to create a unit test subscription + /// that connects to the mock server. + /// + /// The powershell instance used for the test. + public static AzureSubscription SetupUnitTestSubscription(System.Management.Automation.PowerShell powershell) + { + UnitTestHelper.ImportAzureModule(powershell); + + // Set the client certificate used in the subscription + powershell.Runspace.SessionStateProxy.SetVariable( + "clientCertificate", + UnitTestHelper.GetUnitTestClientCertificate()); + + ProfileClient client = new ProfileClient(); + client.Profile.Environments[UnitTestEnvironmentName] = new AzureEnvironment + { + Name = UnitTestEnvironmentName, + Endpoints = new Dictionary + { + {AzureEnvironment.Endpoint.ServiceManagement, MockHttpServer.DefaultHttpsServerPrefixUri.AbsoluteUri}, + {AzureEnvironment.Endpoint.SqlDatabaseDnsSuffix, ".database.windows.net"} + } + }; + + var account = new AzureAccount + { + Id = UnitTestHelper.GetUnitTestClientCertificate().Thumbprint, + Type = AzureAccount.AccountType.Certificate + }; + + var subscription = new AzureSubscription + { + Id = new Guid(UnitTestSubscriptionId), + Name = UnitTestSubscriptionName, + Environment = UnitTestEnvironmentName, + Account = account.Id + }; + + client.AddOrSetAccount(account); + client.AddOrSetSubscription(subscription); + client.SetSubscriptionAsCurrent(UnitTestSubscriptionName, account.Id); + client.Profile.Save(); + + return subscription; + } + + /// + /// Retrieve a certificate from embedded resource. + /// + /// The logical name of the embedded resource. + /// The password for the certificate. + /// A containing the specified certificate. + private static X509Certificate2 ReadCertificateFromResource( + string resourceName, + string password) + { + using (Stream certFile = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)) + using (BinaryReader certFileReader = new BinaryReader(certFile)) + { + return new X509Certificate2( + certFileReader.ReadBytes((int)certFile.Length), + password, + X509KeyStorageFlags.PersistKeySet | + X509KeyStorageFlags.MachineKeySet); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Utilities/PSScriptExecutor.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Utilities/PSScriptExecutor.cs new file mode 100644 index 000000000000..ccba4114a6cd --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Utilities/PSScriptExecutor.cs @@ -0,0 +1,100 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Diagnostics; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.Utilities +{ + /// + /// Helper class that executes a given powershell script + /// + public class PSScriptExecutor + { + private static string lastOutputLine = "FAIL"; + + /// + /// Executes the script given by the scriptFileName + /// + /// Powershell script file that needs to be executed. + /// true, if the last line of the script returns PASS. Otherwise false + public static bool ExecuteScript(string scriptFileName) + { + return PSScriptExecutor.ExecuteScript(scriptFileName, string.Empty); + } + + /// + /// Executes the script given by the scriptFileName + /// + /// Powershell script file that needs to be executed. + /// Arguments for the script file. + /// true, if the last line of the script returns PASS. Otherwise false + public static bool ExecuteScript(string scriptFileName, string argument) + { + return PSScriptExecutor.ExecuteScript(scriptFileName, argument, TimeSpan.FromMinutes(2)); + } + + /// + /// Executes the script given by the scriptFileName + /// + /// Powershell script file that needs to be executed. + /// Arguments for the script file. + /// Timeout for script execution. + /// true, if the last line of the script returns PASS. Otherwise false + public static bool ExecuteScript(string scriptFileName, string argument, TimeSpan timeout) + { + lastOutputLine = "FAIL"; // reset the previous result + + Process process = new Process(); + process.StartInfo.FileName = "powershell.exe"; + process.StartInfo.Arguments = string.Format(" -File {0} {1}", scriptFileName, argument); + process.StartInfo.UseShellExecute = false; + process.StartInfo.CreateNoWindow = true; + process.StartInfo.RedirectStandardOutput = true; + process.StartInfo.RedirectStandardError = true; + + process.OutputDataReceived += new DataReceivedEventHandler(OutputHandler); + process.ErrorDataReceived += new DataReceivedEventHandler(ErrorHandler); + process.Start(); + process.BeginOutputReadLine(); + process.BeginErrorReadLine(); + process.WaitForExit((int)timeout.TotalMilliseconds); + + return (lastOutputLine.ToUpper() == "PASS"); + } + + private static void ErrorHandler(object sendingProcess, DataReceivedEventArgs outLine) + { + if (outLine.Data != null) + { + Console.WriteLine("Error:" + outLine.Data); + } + } + + private static void OutputHandler(object sendingProcess, DataReceivedEventArgs outLine) + { + if (outLine.Data != null) + { + Console.WriteLine(outLine.Data); + + // Sometime the logging will have blank lines too. + // Save only the non empty line to validate whether the script execution is success or not + if (!string.IsNullOrEmpty(outLine.Data)) + { + lastOutputLine = outLine.Data; + } + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Utilities/SqlCustomPsHostUserInterface.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Utilities/SqlCustomPsHostUserInterface.cs new file mode 100644 index 000000000000..b5b4da724ddb --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Utilities/SqlCustomPsHostUserInterface.cs @@ -0,0 +1,206 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Management.Automation.Host; +using System.Text; +using System.Threading.Tasks; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.Utilities +{ + /// + /// Custom implementation of the PSHostUserInterface to allow handling input in tests. + /// + public class SqlCustomPsHostUserInterface : PSHostUserInterface + { + /// + /// Gets or sets an array of the inputs to supply to the prompt (in order) + /// + public PSObject[] PromptInputs { get; set; } + + /// + /// Gets or sets the index of the option to choose when the user is prompted to choose from a list of options. + /// + public int PromptForChoiceInputIndex { get; set; } + + /// + /// Default constructor. + /// + public SqlCustomPsHostUserInterface() + { + PromptForChoiceInputIndex = -1; + } + + /// + /// This is called when a parameter wasn't supplied for a cmdlet. This will be called to prompt the user for the needed value. + /// Here we use the values in PromptInputs instead of getting them from the user. + /// + /// The caption for the prompt + /// The message to show the user + /// The names of all the fields that need input + /// A dictionary containing the response from the user with the FieldDescription.Name as the key + public override Dictionary Prompt(string caption, string message, System.Collections.ObjectModel.Collection descriptions) + { + Assert.IsNotNull(PromptInputs); + Assert.AreEqual(PromptInputs.Length, descriptions.Count, "The number of Prompt inputs needs to be the same as the number of prompts"); + + Dictionary ret = new Dictionary(); + for (int i = 0; i < descriptions.Count; i++) + { + ret.Add(descriptions[i].Name, PromptInputs[i]); + } + return ret; + } + + /// + /// This is called when the user needs to select an option from a list (eg: "Are you sure you want to continue: Yes, No"). + /// Instead of getting the input from the user we get the index of the option to choose from the value of PromptForChoiceInputIndex. + /// + /// The caption for the request for input + /// The message to show + /// The list of available choices + /// The default choice. + /// The index of the choice that was selected + public override int PromptForChoice(string caption, string message, System.Collections.ObjectModel.Collection choices, int defaultChoice) + { + Assert.IsTrue(PromptForChoiceInputIndex < choices.Count, "Must provide an index within the range of choices."); + Assert.IsTrue(PromptForChoiceInputIndex >= 0, "Cannot have a negative index"); + + return PromptForChoiceInputIndex; + } + + /// + /// Not needed + /// + public override System.Management.Automation.PSCredential PromptForCredential(string caption, string message, string userName, string targetName, System.Management.Automation.PSCredentialTypes allowedCredentialTypes, System.Management.Automation.PSCredentialUIOptions options) + { + return null; + } + + /// + /// Not needed + /// + public override System.Management.Automation.PSCredential PromptForCredential(string caption, string message, string userName, string targetName) + { + return null; + } + + /// + /// Not needed + /// + public override PSHostRawUserInterface RawUI + { + get { return null; } + } + + /// + /// Reads a line from input. Not used. + /// + /// + public override string ReadLine() + { + return Console.ReadLine(); + } + + /// + /// Not needed + /// + public override System.Security.SecureString ReadLineAsSecureString() + { + throw new NotImplementedException(); + } + /// + /// Writes information to the console. + /// + /// The foreground color to use + /// The background color to use + /// What to write to the console + public override void Write(ConsoleColor foregroundColor, ConsoleColor backgroundColor, string value) + { + var fg = Console.ForegroundColor; + var bg = Console.BackgroundColor; + Console.ForegroundColor = foregroundColor; + Console.BackgroundColor = backgroundColor; + Console.Write(value); + Console.ForegroundColor = fg; + Console.BackgroundColor = bg; + } + + /// + /// Write a string to the console + /// + /// The string to display + public override void Write(string value) + { + Console.Write(value); + } + + /// + /// Write debug information to the console. + /// + /// The debug message to display + public override void WriteDebugLine(string message) + { + DebugRecord r = new DebugRecord(message); + Console.WriteLine(r); + } + + /// + /// Dispays an error to the console + /// + /// The error to display + public override void WriteErrorLine(string value) + { + Console.Error.Write(value); + } + + /// + /// Write a line to the console. + /// + /// The string to write + public override void WriteLine(string value) + { + Console.WriteLine(value); + } + + /// + /// Not needed + /// + public override void WriteProgress(long sourceId, System.Management.Automation.ProgressRecord record) + { + } + + /// + /// Write verbose message to the console + /// + /// The message to display + public override void WriteVerboseLine(string message) + { + Console.WriteLine("VERBOSE: " + message); + } + + /// + /// Write a warning to the screen + /// + /// The warning to display + public override void WriteWarningLine(string message) + { + Console.WriteLine("WARNING: " + message); + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Utilities/SqlDatabaseSettings.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Utilities/SqlDatabaseSettings.cs new file mode 100644 index 000000000000..c2b4221a4ea4 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Utilities/SqlDatabaseSettings.cs @@ -0,0 +1,129 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Security; +using System.Xml.Linq; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.Utilities +{ + public class SqlDatabaseTestSettings + { + /// + /// The singleton accessor for the test settings. + /// + public static SqlDatabaseTestSettings Instance = new SqlDatabaseTestSettings(); + + /// + /// Username to use for running the tests. + /// + public string UserName { get; private set; } + + /// + /// Password to use for running the tests. + /// + public string Password { get; private set; } + + /// + /// Password as secure string. + /// + public SecureString SecurePassword { get; private set; } + + /// + /// ManageUrl to use when running the tests. + /// + public string ManageUrl { get; private set; } + + /// + /// Subscription Id to use when running the tests. + /// + public string SubscriptionId { get; private set; } + + /// + /// Serialized Certificate to use when running the tests. + /// + public string SerializedCert { get; private set; } + + /// + /// The server name to use when running the tests. + /// + public string ServerName { get; private set; } + + /// + /// The name of the v2 server for running the tests + /// + public object ServerV2 { get; set; } + + /// + /// The database name to use when running the tests. + /// + public string SourceDatabaseName { get; private set; } + + /// + /// The database name to use when running the tests. + /// + public string TargetDatabaseName { get; private set; } + + /// + /// The location of the server. + /// + public string ServerLocation { get; private set; } + + /// + /// The name of the storage account. + /// + public string StorageName { get; private set; } + + /// + /// The access key to the storage account + /// + public string AccessKey { get; private set; } + + /// + /// The name of the storage container. + /// + public string ContainerName { get; private set; } + + private SqlDatabaseTestSettings() + { + XElement root = XElement.Load("SqlDatabaseSettings.xml"); + this.ServerLocation = root.Element("ServerLocation").Value; + this.UserName = root.Element("SqlAuthUserName").Value; + this.Password = root.Element("SqlAuthPassword").Value; + this.SecurePassword = ToSecureString(this.Password); + this.ManageUrl = root.Element("ManageUrl").Value; + this.SerializedCert = root.Element("SerializedCert").Value; + this.SubscriptionId = root.Element("SubscriptionId").Value; + this.ServerName = new Uri(this.ManageUrl).Host.Split('.').First(); + this.ServerV2 = root.Element("ServerV2").Value; + this.SourceDatabaseName = root.Element("SourceDatabaseName").Value; + this.TargetDatabaseName = root.Element("TargetDatabaseName").Value; + this.StorageName = root.Element("StorageName").Value; + this.AccessKey = root.Element("AccessKey").Value; + this.ContainerName = root.Element("ContainerName").Value; + } + + private static SecureString ToSecureString(string plaintext) + { + SecureString secure = new SecureString(); + foreach (char c in plaintext.ToCharArray()) + { + secure.AppendChar(c); + } + + return secure; + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Utilities/SqlTestPsHost.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Utilities/SqlTestPsHost.cs new file mode 100644 index 000000000000..542c61558b81 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/Utilities/SqlTestPsHost.cs @@ -0,0 +1,146 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation.Host; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Test.Utilities +{ + /// + /// Custom PSHost implementation to help testing. + /// + public class SqlTestPsHost : PSHost + { + /// + /// Custom PSHostUserInterface to help control how input is received + /// + private SqlCustomPsHostUserInterface ui; + + /// + /// ID for this PSHost + /// + private Guid id = Guid.NewGuid(); + + /// + /// Name of the PSHost + /// + private const string name = "SqlTestPsHost"; + + /// + /// PSHost version + /// + private Version version = new Version(1, 0, 0, 0); + + /// + /// Default constructor, assigns the UI. + /// + public SqlTestPsHost() + { + ui = new SqlCustomPsHostUserInterface(); + } + + /// + /// Get the current culture + /// + public override System.Globalization.CultureInfo CurrentCulture + { + get { return Thread.CurrentThread.CurrentCulture; } + } + + /// + /// Get the current culture the UI is using + /// + public override System.Globalization.CultureInfo CurrentUICulture + { + get { return Thread.CurrentThread.CurrentUICulture; } + } + + /// + /// Not needed. Used for calling legacy programs like ping.exe + /// + public override void EnterNestedPrompt() + { + throw new NotImplementedException(); + } + + /// + /// Not needed. Used for calling legacy programs like ping.exe + /// + public override void ExitNestedPrompt() + { + throw new NotImplementedException(); + } + + /// + /// Gets the ID of this instance + /// + public override Guid InstanceId + { + get { return id; } + } + + /// + /// Gets the name of the host + /// + public override string Name + { + get { return name; } + } + + /// + /// Not needed. + /// + public override void NotifyBeginApplication() + { + return; + } + + /// + /// Not needed. + /// + public override void NotifyEndApplication() + { + return; + } + + /// + /// Not needed. + /// + public override void SetShouldExit(int exitCode) + { + return; + } + + /// + /// Gets our custom user interface implementation + /// + public override PSHostUserInterface UI + { + get { return ui; } + } + + /// + /// Gets the version + /// + public override Version Version + { + get { return version; } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/packages.config b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/packages.config new file mode 100644 index 000000000000..6a1c364acc43 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase.Test/packages.config @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Commands.SqlDatabase.csproj b/src/ServiceManagement/Sql/Commands.SqlDatabase/Commands.SqlDatabase.csproj new file mode 100644 index 000000000000..75d1ed611600 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Commands.SqlDatabase.csproj @@ -0,0 +1,241 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {DDF5D225-C9C5-42B7-BDB5-2C3646E479AA} + Library + Properties + Microsoft.WindowsAzure.Commands.SqlDatabase + Microsoft.WindowsAzure.Commands.SqlDatabase + v4.5 + 512 + + ..\..\..\ + true + + + true + full + false + ..\..\..\Package\Debug\ServiceManagement\Azure\Sql + DEBUG;TRACE + prompt + 4 + true + true + false + + + OnBuildSuccess + + + true + MSSharedLibKey.snk + true + ..\..\..\Package\Release\ServiceManagement\Azure\Sql + TRACE;SIGN + true + pdbonly + AnyCPU + bin\Release\Microsoft.WindowsAzure.Management.SqlDatabase.dll.CodeAnalysisLog.xml + true + GlobalSuppressions.cs + prompt + MinimumRecommendedRules.ruleset + ;$(ProgramFiles)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\Rule Sets + ;$(ProgramFiles)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\FxCop\Rules + true + false + + + + ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll + + + ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll + + + ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.Sql.2.0.0\lib\net40\Microsoft.WindowsAzure.Management.Sql.dll + + + False + ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll + + + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + True + + + + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + + + ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll + + + + + + + False + + + + + Always + + + + + + + + + + + + + + + + + + + + + + + + True + True + Resources.resx + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Component + + + + + + + + {65c3a86a-716d-4e7d-ab67-1db00b3bf72d} + Commands.Common.Storage + + + {CD5AA507-F5EF-473D-855B-84B91A1ABE54} + Commands + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + {08cf7da7-0392-4a19-b79b-e1ff67cdb81a} + Commands.Storage + + + + + Always + + + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/CmdletCommon.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/CmdletCommon.cs new file mode 100644 index 000000000000..8b3cac1bf16c --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/CmdletCommon.cs @@ -0,0 +1,90 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Diagnostics; +using System.Management.Automation; +using System.Threading; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Database.Cmdlet +{ + internal static class CmdletCommon + { + public static DateTime NormalizeToUtc(DateTime dateTime) + { + switch (dateTime.Kind) + { + case DateTimeKind.Utc: + return dateTime; + + case DateTimeKind.Local: + return dateTime.ToUniversalTime(); + + case DateTimeKind.Unspecified: + default: + return DateTime.SpecifyKind(dateTime, DateTimeKind.Utc); + } + } + + /// + /// Queries the server until the database assignment succeeds or there is an error. + /// + /// The context upon which to perform the action + /// The database object. + /// Returns the response from the server + internal static Services.Server.Database WaitForDatabaseOperation(PSCmdlet cmdlet, IServerDataServiceContext context, Services.Server.Database response, string databaseName, bool isCreate) + { + // Duration to sleep: 2 second + TimeSpan sleepDuration = TimeSpan.FromSeconds(2.0); + + // Poll for a maximum of 10 minutes; + TimeSpan maximumPollDuration = TimeSpan.FromMinutes(10.0); + + // Text to display to the user while they wait. + string pendingText = "Pending"; + string textToDisplay = ""; + + // Start the timer + Stopwatch watch = Stopwatch.StartNew(); + + while (watch.Elapsed < maximumPollDuration) + { + if (response == null) + { + throw new Exception("An unexpected error occured. The response from the server was invalid, please try your request again."); + } + + // Check to see if the database is ready for use. + if ((isCreate && (response.Status != (int)DatabaseStatus.Creating)) || // The database is done being created + (!isCreate && (response.ServiceObjectiveAssignmentState != 0))) // The database is done with SLO upgrade + { + break; + } + + // Wait before next poll. + Thread.Sleep(sleepDuration); + + // Display that the status is pending and how long the operation has been waiting + textToDisplay = string.Format("{0}: {1}", pendingText, watch.Elapsed.ToString("%s' sec.'")); + cmdlet.WriteProgress(new ProgressRecord(0, "Waiting for database creation completion.", textToDisplay)); + + // Poll the server for the database status. + response = context.GetDatabase(databaseName); + } + + return response; + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabase.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabase.cs new file mode 100644 index 000000000000..1436c4b268d7 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabase.cs @@ -0,0 +1,285 @@ +// ---------------------------------------------------------------------------------- +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Properties; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Common; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Database.Cmdlet +{ + /// + /// Retrieves a list of Microsoft Azure SQL Databases in the given server context. + /// + [Cmdlet(VerbsCommon.Get, "AzureSqlDatabase", ConfirmImpact = ConfirmImpact.None, + DefaultParameterSetName = ByConnectionContext)] + public class GetAzureSqlDatabase : AzurePSCmdlet + { + #region Parameter Sets + + /// + /// The parameter set string for connecting with a connection context + /// + internal const string ByConnectionContext = + "ByConnectionContext"; + + /// + /// The parameter set string for connecting using azure subscription + /// + internal const string ByServerName = + "ByServerName"; + + #endregion + + #region Parameters + + /// + /// Gets or sets the server connection context. + /// + [Alias("Context")] + [Parameter(Mandatory = true, Position = 0, ValueFromPipeline = true, + ParameterSetName = ByConnectionContext, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The connection context to the specified server.")] + [ValidateNotNull] + public IServerDataServiceContext ConnectionContext { get; set; } + + /// + /// Gets or sets the server object upon which to operate + /// + [Parameter(Mandatory = true, Position = 0, + ValueFromPipelineByPropertyName = true, + ParameterSetName = ByServerName, + HelpMessage = "The name of the server to operate on")] + [ValidateNotNullOrEmpty] + public string ServerName { get; set; } + + /// + /// Gets or sets the database object to refresh. + /// + [Parameter(Mandatory = false, + ValueFromPipeline = true, HelpMessage = "The database object to refresh.")] + [ValidateNotNull] + public Services.Server.Database Database { get; set; } + + /// + /// Gets or sets the name of the database to retrieve. + /// + [Parameter(Mandatory = false, + HelpMessage = "The name of the database to retrieve.")] + [ValidateNotNullOrEmpty] + public string DatabaseName { get; set; } + + /// + /// Gets or sets whether the commandlet returns live databases or restorable dropped databases. + /// + [Parameter(Mandatory = false, + HelpMessage = "Return restorable dropped databases instead of live databases.")] + public SwitchParameter RestorableDropped { get; set; } + + /// + /// Gets or sets the restorable dropped database object to refresh. + /// + [Parameter(Mandatory = false, + ValueFromPipeline = true, HelpMessage = "The database object to refresh.")] + [ValidateNotNull] + public RestorableDroppedDatabase RestorableDroppedDatabase { get; set; } + + /// + /// Gets or sets the deletion date of the restorable dropped database to retrieve. + /// + [Parameter(Mandatory = false, + HelpMessage = "The deletion date of the restorable dropped database to retrieve.")] + [ValidateNotNullOrEmpty] + public DateTime DatabaseDeletionDate { get; set; } + + #endregion + + #region Parameter names + + private const string DatabaseParameter = "Database"; + + private const string RestorableDroppedDatabaseParameter = "RestorableDroppedDatabase"; + + private const string RestorableDroppedParameter = "RestorableDropped"; + + private const string DatabaseNameParameter = "DatabaseName"; + + private const string DatabaseDeletionDateParameter = "DatabaseDeletionDate"; + + #endregion + + /// + /// Process the command. + /// + public override void ExecuteCmdlet() + { + IServerDataServiceContext context = null; + switch (this.ParameterSetName) + { + case ByConnectionContext: + context = this.ConnectionContext; + break; + + case ByServerName: + context = ServerDataServiceCertAuth.Create(this.ServerName, AzureSession.CurrentContext.Subscription); + break; + + default: + throw new NotSupportedException("ParameterSet"); + } + + ProcessWithContext(context); + } + + /// + /// Process the request using the provided connection context + /// + /// The connection context + private void ProcessWithContext(IServerDataServiceContext context) + { + // This is to enforce the mutual exclusivity of the parameters: Database + // and DatabaseName. This can't be done with parameter sets without changing + // existing behaviour of the cmdlet. + if ( + this.MyInvocation.BoundParameters.ContainsKey(DatabaseParameter) && + this.MyInvocation.BoundParameters.ContainsKey(DatabaseNameParameter)) + { + this.WriteError(new ErrorRecord( + new PSArgumentException( + string.Format(Resources.InvalidParameterCombination, DatabaseParameter, DatabaseNameParameter)), + string.Empty, + ErrorCategory.InvalidArgument, + null)); + } + + // ... and similarly for RestorableDroppedDatabase and DatabaseName / DatabaseDeletionDate + if ( + this.MyInvocation.BoundParameters.ContainsKey(RestorableDroppedDatabaseParameter) && + this.MyInvocation.BoundParameters.ContainsKey(DatabaseNameParameter)) + { + this.WriteError(new ErrorRecord( + new PSArgumentException( + string.Format(Resources.InvalidParameterCombination, RestorableDroppedDatabaseParameter, DatabaseNameParameter)), + string.Empty, + ErrorCategory.InvalidArgument, + null)); + } + if ( + this.MyInvocation.BoundParameters.ContainsKey(RestorableDroppedDatabaseParameter) && + this.MyInvocation.BoundParameters.ContainsKey(DatabaseDeletionDateParameter)) + { + this.WriteError(new ErrorRecord( + new PSArgumentException( + string.Format(Resources.InvalidParameterCombination, RestorableDroppedDatabaseParameter, DatabaseDeletionDateParameter)), + string.Empty, + ErrorCategory.InvalidArgument, + null)); + } + + // The DatabaseDeletionDate parameter can only be used if the RestorableDropped switch is also present + if (!this.RestorableDropped.IsPresent && this.MyInvocation.BoundParameters.ContainsKey(DatabaseDeletionDateParameter)) + { + throw new PSArgumentException( + string.Format(Resources.RestorableDroppedSwitchNotSpecified, DatabaseDeletionDateParameter)); + } + + // The Database parameter can only be used if the RestorableDropped switch is not present + if (this.RestorableDropped.IsPresent && this.MyInvocation.BoundParameters.ContainsKey(DatabaseParameter)) + { + throw new PSArgumentException( + string.Format(Resources.InvalidParameterCombination, RestorableDroppedParameter, DatabaseParameter)); + } + + // If the RestorableDropped switch is present, then either both the DatabaseName and DatabaseDeletionDate parameters must be present, or neither of them should be present. + if ( + this.RestorableDropped.IsPresent && ( + (this.MyInvocation.BoundParameters.ContainsKey(DatabaseNameParameter) && !this.MyInvocation.BoundParameters.ContainsKey(DatabaseDeletionDateParameter)) || + (!this.MyInvocation.BoundParameters.ContainsKey(DatabaseNameParameter) && this.MyInvocation.BoundParameters.ContainsKey(DatabaseDeletionDateParameter)))) + { + throw new PSArgumentException(Resources.BothDatabaseNameAndDeletionDateNeedToBeSpecified); + } + + // Obtain the database name from the given parameters. + string databaseName = null; + if (this.MyInvocation.BoundParameters.ContainsKey(DatabaseParameter)) + { + databaseName = this.Database.Name; + } + else if (this.MyInvocation.BoundParameters.ContainsKey(RestorableDroppedDatabaseParameter)) + { + databaseName = this.RestorableDroppedDatabase.Name; + } + else if (this.MyInvocation.BoundParameters.ContainsKey(DatabaseNameParameter)) + { + databaseName = this.DatabaseName; + } + + DateTime databaseDeletionDate = default(DateTime); + if (this.MyInvocation.BoundParameters.ContainsKey(RestorableDroppedDatabaseParameter)) + { + databaseDeletionDate = this.RestorableDroppedDatabase.DeletionDate; + } + else if (this.MyInvocation.BoundParameters.ContainsKey(DatabaseDeletionDateParameter)) + { + databaseDeletionDate = this.DatabaseDeletionDate; + } + databaseDeletionDate = CmdletCommon.NormalizeToUtc(databaseDeletionDate); + + try + { + if (!this.RestorableDropped.IsPresent && this.RestorableDroppedDatabase == null) + { + // Live databases + + if (databaseName != null) + { + // Retrieve the database with the specified name + this.WriteObject(context.GetDatabase(databaseName), true); + } + else + { + // No name specified, retrieve all databases in the server + this.WriteObject(context.GetDatabases(), true); + } + } + + else + { + // Dropped databases + + if (databaseName != null) + { + // Retrieve the database with the specified name + this.WriteObject(context.GetRestorableDroppedDatabase(databaseName, databaseDeletionDate), true); + } + else + { + // No name specified, retrieve all databases in the server + this.WriteObject(context.GetRestorableDroppedDatabases(), true); + } + } + } + catch (Exception ex) + { + SqlDatabaseExceptionHandler.WriteErrorDetails( + this, + context.ClientRequestId, + ex); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabaseCopy.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabaseCopy.cs new file mode 100644 index 000000000000..752965e10077 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabaseCopy.cs @@ -0,0 +1,148 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Common; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Database.Cmdlet +{ + using DatabaseCopyModel = Model.DatabaseCopy; + + /// + /// Retrieves a list of all ongoing Microsoft Azure SQL Database copy operations in the given + /// server context. + /// + [Cmdlet(VerbsCommon.Get, "AzureSqlDatabaseCopy", ConfirmImpact = ConfirmImpact.None, + DefaultParameterSetName = "ByServerNameOnly")] + public class GetAzureSqlDatabaseCopy : AzurePSCmdlet + { + #region Parameter Sets + + internal const string ByInputObject = "ByInputObject"; + + internal const string ByDatabase = "ByDatabase"; + + internal const string ByServerNameOnly = "ByServerNameOnly"; + + #endregion + + #region Parameters + + /// + /// Gets or sets the server upon which to operate + /// + [Parameter(Mandatory = true, Position = 0, ValueFromPipeline = true, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The name of the server to operate on.")] + [ValidateNotNullOrEmpty] + public string ServerName { get; set; } + + /// + /// Gets or sets the sql database copy object to refresh. + /// + [Parameter(Mandatory = true, Position = 1, ParameterSetName = ByInputObject, + ValueFromPipeline = true, HelpMessage = "The database copy operation to refresh.")] + [ValidateNotNull] + public DatabaseCopyModel DatabaseCopy { get; set; } + + /// + /// Database to filter copies by. + /// + [Parameter(Mandatory = true, Position = 1, ParameterSetName = ByDatabase, + ValueFromPipeline = true, HelpMessage = "The database object for the copy operation.")] + [ValidateNotNull] + public Services.Server.Database Database { get; set; } + + /// + /// Name of a database to filter copies by. + /// + [Parameter(Mandatory = false, Position = 1, ParameterSetName = ByServerNameOnly, + HelpMessage = "The name of the database for the copy operation.")] + [ValidateNotNullOrEmpty] + public string DatabaseName { get; set; } + + /// + /// Gets or sets the name of the partner server. + /// + [Parameter(Mandatory = false, ParameterSetName = ByDatabase, + HelpMessage = "The name of the partner server")] + [Parameter(Mandatory = false, ParameterSetName = ByServerNameOnly, + HelpMessage = "The name of the partner server")] + [ValidateNotNullOrEmpty] + public string PartnerServer { get; set; } + + /// + /// Gets or sets the name of the partner database. + /// + [Parameter(Mandatory = false, ParameterSetName = ByDatabase, + HelpMessage = "The name of the partner database")] + [Parameter(Mandatory = false, ParameterSetName = ByServerNameOnly, + HelpMessage = "The name of the partner database")] + [ValidateNotNullOrEmpty] + public string PartnerDatabase { get; set; } + + #endregion + + /// + /// Execute the command. + /// + public override void ExecuteCmdlet() + { + // Obtain the database name from the given parameters. + string databaseName = null; + if (this.MyInvocation.BoundParameters.ContainsKey("Database")) + { + databaseName = this.Database.Name; + } + else if (this.MyInvocation.BoundParameters.ContainsKey("DatabaseName")) + { + databaseName = this.DatabaseName; + } + + // Use the provided ServerDataServiceContext or create one from the + // provided ServerName and the active subscription. + IServerDataServiceContext context = ServerDataServiceCertAuth.Create(this.ServerName, + AzureSession.CurrentContext.Subscription); + + try + { + if (this.MyInvocation.BoundParameters.ContainsKey("DatabaseCopy")) + { + // Refresh the specified database copy object + this.WriteObject(context.GetDatabaseCopy(this.DatabaseCopy), true); + } + else + { + // Retrieve all database copy object with matching parameters + DatabaseCopyModel[] copies = context.GetDatabaseCopy( + databaseName, + this.PartnerServer, + this.PartnerDatabase); + this.WriteObject(copies, true); + } + } + catch (Exception ex) + { + SqlDatabaseExceptionHandler.WriteErrorDetails( + this, + context.ClientRequestId, + ex); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabaseImportExportStatus.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabaseImportExportStatus.cs new file mode 100644 index 000000000000..840dad9d4162 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabaseImportExportStatus.cs @@ -0,0 +1,188 @@ +// ---------------------------------------------------------------------------------- +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.ImportExport; +using Microsoft.WindowsAzure.Management.Sql; +using Microsoft.WindowsAzure.Management.Sql.Models; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Database.Cmdlet +{ + /// + /// Exports a database from SQL Azure into blob storage. + /// + [Cmdlet(VerbsCommon.Get, "AzureSqlDatabaseImportExportStatus", ConfirmImpact = ConfirmImpact.None)] + public class GetAzureSqlDatabaseImportExportStatus : SqlDatabaseCmdletBase + { + #region Parameter sets + + /// + /// The name of the parameter set that uses a RequestObject + /// + internal const string ByRequestObjectParameterSet = + "ByRequestObject"; + + /// + /// The name of the parameter set that gets the connection information from + /// the parameters + /// + internal const string ByConnectionInfoParameterSet = + "ByConnectionInfo"; + + #endregion + + #region Parameters + + /// + /// Gets or sets the user name for connecting to the database + /// + [Parameter(Mandatory = true, Position = 0, + ParameterSetName = ByConnectionInfoParameterSet, + HelpMessage = "The user name for connecting to the database")] + [ValidateNotNullOrEmpty] + public string Username { get; set; } + + /// + /// Gets or sets the password for connecting to the database + /// + [Parameter(Mandatory = true, Position = 1, + ParameterSetName = ByConnectionInfoParameterSet, + HelpMessage = "The password for connecting to the database")] + [ValidateNotNullOrEmpty] + public string Password { get; set; } + + /// + /// Gets or sets the name of the server the database resides in + /// + [Parameter(Mandatory = true, Position = 2, + ParameterSetName = ByConnectionInfoParameterSet, + HelpMessage = "The name of the server the database is in")] + [ValidateNotNullOrEmpty] + public string ServerName { get; set; } + + /// + /// Gets or sets the request Id of the operation to get the status of + /// + [Parameter(Mandatory = true, Position = 3, + ParameterSetName = ByConnectionInfoParameterSet, + HelpMessage = "The request Id of the operation to get the status of")] + [ValidateNotNullOrEmpty] + public string RequestId { get; set; } + + /// + /// Gets or sets the request object + /// + [Parameter(Mandatory = true, Position = 0, + ParameterSetName = ByRequestObjectParameterSet, + HelpMessage = "The ImportExportRequest object returned from starting the request")] + [ValidateNotNullOrEmpty] + public ImportExportRequest Request { get; set; } + + #endregion + + /// + /// Performs the call to export database using the server data service context channel. + /// + /// The name of the server to connect to. + /// The fully qualfied name of the server to connect to. + /// The username for authentication + /// The password for authentication + /// The request Id of the operation to query + /// The status of the import/export operation + internal IEnumerable GetAzureSqlDatabaseImportExportStatusProcess( + string serverName, + string fullyQualifiedServerName, + string userName, + string password, + string requestId) + { + // Get the SQL management client for the current subscription + SqlManagementClient sqlManagementClient = GetCurrentSqlClient(); + + DacGetStatusResponse response = sqlManagementClient.Dac.GetStatusPost(serverName, new DacGetStatusParameters() + { + Password = password, + RequestId = requestId, + ServerName = fullyQualifiedServerName, + UserName = userName, + }); + + // Construct the result + IEnumerable result = response.StatusInfoList.Select(status => new Services.ImportExport.StatusInfo + { + BlobUri = status.BlobUri.ToString(), + ServerName = status.ServerName, + DatabaseName = status.DatabaseName, + Status = status.Status, + RequestId = status.RequestId, + LastModifiedTime = status.LastModifiedTime, + QueuedTime = status.QueuedTime, + RequestType = status.RequestType, + ErrorMessage = status.ErrorMessage, + }); + + return result; + } + + /// + /// Process the export request + /// + public override void ExecuteCmdlet() + { + try + { + // Parse the required information given the parameter set + string serverName = null; + string userName = null; + string password = null; + string requestId = null; + switch (this.ParameterSetName) + { + case ByRequestObjectParameterSet: + serverName = this.Request.ServerName; + userName = this.Request.SqlCredentials.UserName; + password = this.Request.SqlCredentials.Password; + requestId = this.Request.RequestGuid; + break; + + case ByConnectionInfoParameterSet: + serverName = this.ServerName; + userName = this.Username; + password = this.Password; + requestId = this.RequestId; + break; + + default: + throw new NotSupportedException("ParameterSet"); + } + + var status = this.GetAzureSqlDatabaseImportExportStatusProcess( + serverName, + serverName + AzureSession.CurrentContext.Environment.GetEndpoint(Common.Models.AzureEnvironment.Endpoint.SqlDatabaseDnsSuffix), + userName, + password, + requestId); + + this.WriteObject(status); + } + catch (Exception ex) + { + this.WriteErrorDetails(ex); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabaseOperation.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabaseOperation.cs new file mode 100644 index 000000000000..c787ece705c0 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabaseOperation.cs @@ -0,0 +1,174 @@ +// ---------------------------------------------------------------------------------- +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Properties; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Common; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Database.Cmdlet +{ + /// + /// Retrieves a list of Microsoft Azure SQL Database's Operations in the given server context. + /// + [Cmdlet(VerbsCommon.Get, "AzureSqlDatabaseOperation", ConfirmImpact = ConfirmImpact.None, + DefaultParameterSetName = ByConnectionContext)] + public class GetAzureSqlDatabaseOperation : AzurePSCmdlet + { + #region Parameter Sets + + /// + /// The parameter set string for connecting with a connection context + /// + internal const string ByConnectionContext = + "ByConnectionContext"; + + /// + /// The parameter set string for connecting using azure subscription + /// + internal const string ByServerName = + "ByServerName"; + + #endregion + + #region Parameters + + /// + /// Gets or sets the server connection context. + /// + [Alias("Context")] + [Parameter(Mandatory = true, Position = 0, ValueFromPipeline = true, + ParameterSetName = ByConnectionContext, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The connection context to the specified server.")] + [ValidateNotNull] + public IServerDataServiceContext ConnectionContext { get; set; } + + /// + /// Gets or sets the server name upon which to operate + /// + [Parameter(Mandatory = true, Position = 0, + ValueFromPipelineByPropertyName = true, + ParameterSetName = ByServerName, + HelpMessage = "The name of the server to operate on")] + [ValidateNotNullOrEmpty] + public string ServerName { get; set; } + + /// + /// Gets or sets the database object to retrieve operations. + /// + [Parameter(Mandatory = false, + ValueFromPipeline = true, + HelpMessage = "The database object to retrieve operations.")] + [ValidateNotNull] + public Services.Server.Database Database { get; set; } + + /// + /// Gets or sets the name of the database to retrieve operations. + /// + [Parameter(Mandatory = false, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The name of the database to retrieve operations.")] + [ValidateNotNullOrEmpty] + public string DatabaseName { get; set; } + + /// + /// Gets or sets the name of the database operation Guid to retrieve. + /// + [Parameter(Mandatory = false, + ValueFromPipeline = true, + HelpMessage = "The guid of the database operation to retrieve.")] + [ValidateNotNullOrEmpty] + public Guid OperationGuid { get; set; } + + #endregion + + /// + /// Process the command. + /// + public override void ExecuteCmdlet() + { + ParameterValidation(); + IServerDataServiceContext context = null; + switch (this.ParameterSetName) + { + case ByConnectionContext: + context = this.ConnectionContext; + break; + + case ByServerName: + context = ServerDataServiceCertAuth.Create(this.ServerName, AzureSession.CurrentContext.Subscription); + break; + } + ProcessWithContext(context); + } + + private void ParameterValidation() + { + // This is to enforce the mutual exclusivity of the parameters: Database + // and DatabaseName. This can't be done with parameter sets without changing + // existing behaviour of the cmdlet. + if (this.MyInvocation.BoundParameters.ContainsKey("Database") && + this.MyInvocation.BoundParameters.ContainsKey("DatabaseName")) + { + this.WriteError(new ErrorRecord( + new PSArgumentException( + String.Format(Resources.InvalidParameterCombination, "Database", "DatabaseName")), + string.Empty, + ErrorCategory.InvalidArgument, + null)); + } + } + + /// + /// Process the request using the provided connection context + /// + /// + private void ProcessWithContext(IServerDataServiceContext context) + { + try + { + if (this.DatabaseName != null) + { + // Retrieve the operations with the specified database name + this.WriteObject(context.GetDatabaseOperations(this.DatabaseName), true); + } + else if (this.Database != null) + { + // Retrieve the operations with the database name specified by the database object + this.WriteObject(context.GetDatabaseOperations(this.Database.Name), true); + } + else if (this.OperationGuid != Guid.Empty) + { + // Retrieve the operation with the operation Guid + this.WriteObject(context.GetDatabaseOperation(this.OperationGuid), true); + } + else + { + // No name specified, retrieve all database's operations in the server + this.WriteObject(context.GetDatabasesOperations(), true); + } + } + catch (Exception ex) + { + SqlDatabaseExceptionHandler.WriteErrorDetails( + this, + context.ClientRequestId, + ex); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabaseServiceObjective.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabaseServiceObjective.cs new file mode 100644 index 000000000000..244fff6c081c --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlDatabaseServiceObjective.cs @@ -0,0 +1,143 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Common; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Database.Cmdlet +{ + /// + /// Retrieves a list of Microsoft Azure SQL Databases in the given server context. + /// + [Cmdlet(VerbsCommon.Get, "AzureSqlDatabaseServiceObjective", ConfirmImpact = ConfirmImpact.None, + DefaultParameterSetName = "ByConnectionContext")] + public class GetAzureSqlDatabaseServiceObjective : AzurePSCmdlet + { + #region Parameter Sets + + /// + /// The parameter set string for connecting with a connection context + /// + internal const string ByConnectionContext = + "ByConnectionContext"; + + /// + /// The parameter set string for connecting using azure subscription + /// + internal const string ByServerName = + "ByServerName"; + + #endregion + + #region Parameters + + /// + /// Gets or sets the server connection context. + /// + [Parameter(Mandatory = true, Position = 0, ValueFromPipeline = true, + ParameterSetName = ByConnectionContext, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The connection context to the specified server.")] + [ValidateNotNull] + public IServerDataServiceContext Context { get; set; } + + /// + /// Gets or sets the server namee upon which to operate + /// + [Parameter(Mandatory = true, Position = 0, + ValueFromPipelineByPropertyName = true, + ParameterSetName = ByServerName, + HelpMessage = "The name of the server to operate on")] + [ValidateNotNullOrEmpty] + public string ServerName { get; set; } + + /// + /// Gets or sets the service objective object to refresh. + /// + [Parameter(Mandatory = false, + ValueFromPipeline = true, HelpMessage = "The Service Objective object to refresh.")] + [ValidateNotNull] + public ServiceObjective ServiceObjective { get; set; } + + /// + /// Gets or sets the name of the service objective to retrieve. + /// + [Parameter(Mandatory = false, + HelpMessage = "The name of the Service Objective to retrieve.")] + [ValidateNotNullOrEmpty] + public string ServiceObjectiveName { get; set; } + + #endregion + + /// + /// Execute the command. + /// + public override void ExecuteCmdlet() + { + IServerDataServiceContext context = null; + switch (this.ParameterSetName) + { + case ByConnectionContext: + context = this.Context; + break; + + case ByServerName: + context = ServerDataServiceCertAuth.Create(this.ServerName, AzureSession.CurrentContext.Subscription); + break; + + default: + throw new InvalidPowerShellStateException("Unrecognized parameter set name used."); + } + ProcessWithContext(context); + } + + private void ProcessWithContext(IServerDataServiceContext context) + { + if(context == null) + { + throw new ArgumentNullException("context", "The ServerDataServiceContext cannot be null."); + } + + try + { + if (this.ServiceObjectiveName != null) + { + // Retrieve the service objective with the specified name + this.WriteObject(context.GetServiceObjective(this.ServiceObjectiveName)); + } + else if (this.ServiceObjective != null) + { + // Retrieve the latest service objective with the specified service objective + this.WriteObject(context.GetServiceObjective(this.ServiceObjective)); + } + else + { + // No name specified, retrieve all service objectives in the server + this.WriteObject(context.GetServiceObjectives(), true); + } + } + catch (Exception ex) + { + SqlDatabaseExceptionHandler.WriteErrorDetails( + this, + context.ClientRequestId, + ex); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlRecoverableDatabase.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlRecoverableDatabase.cs new file mode 100644 index 000000000000..163f77d56943 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/GetAzureSqlRecoverableDatabase.cs @@ -0,0 +1,119 @@ +// ---------------------------------------------------------------------------------- +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Management.Sql; +using Microsoft.WindowsAzure.Management.Sql.Models; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Database.Cmdlet +{ + /// + /// Retrieves a list of restorable dropped Microsoft Azure SQL Databases in the given server context. + /// + [Cmdlet(VerbsCommon.Get, "AzureSqlRecoverableDatabase", ConfirmImpact = ConfirmImpact.None, DefaultParameterSetName = AllDatabasesOnGivenServer)] + public class GetAzureSqlRecoverableDatabase : SqlDatabaseCmdletBase + { + #region Parameter sets + + /// + /// The parameter set for getting all databases on the given source server. + /// + internal const string AllDatabasesOnGivenServer = "AllDatabasesOnGivenServer"; + + /// + /// The parameter set for getting the given database on the given source server. + /// + internal const string GivenDatabaseOnGivenServer = "GivenDatabaseOnGivenServer"; + + /// + /// The parameter set for refreshing the given database object. + /// + internal const string GivenDatabaseObject = "GivenDatabaseObject"; + + #endregion + + #region Parameters + + /// + /// Gets or sets the name of the server that contained the database to retrieve. If not specified, defaults to TargetServerName. + /// + [Parameter(Mandatory = true, + ParameterSetName = AllDatabasesOnGivenServer, + HelpMessage = "The name of the server on which the database was hosted.")] + [Parameter(Mandatory = true, + ParameterSetName = GivenDatabaseOnGivenServer, + HelpMessage = "The name of the server on which the database was hosted.")] + [ValidateNotNullOrEmpty] + public string ServerName { get; set; } + + /// + /// Gets or sets the name of the database to retrieve. + /// + [Parameter(Mandatory = true, + ParameterSetName = GivenDatabaseOnGivenServer, + HelpMessage = "The name of the database.")] + [ValidateNotNullOrEmpty] + public string DatabaseName { get; set; } + + /// + /// Gets or sets the RecoverableDatabase object to refresh. + /// + [Parameter(Mandatory = true, + ValueFromPipeline = true, + ParameterSetName = GivenDatabaseObject, + HelpMessage = "The RecoverableDatabase object to refresh.")] + [ValidateNotNull] + public RecoverableDatabase Database { get; set; } + + #endregion + + /// + /// Process the command. + /// + public override void ExecuteCmdlet() + { + // Obtain the source server and database name from the given parameters. + var serverName = + this.Database != null ? this.Database.ServerName : + this.ServerName; + + var databaseName = + this.Database != null ? this.Database.Name : + this.DatabaseName; + + // Get the SQL management client for the current subscription + SqlManagementClient sqlManagementClient = GetCurrentSqlClient(); + + try + { + if (databaseName != null) + { + // Retrieve the database with the specified name + RecoverableDatabaseGetResponse response = sqlManagementClient.RecoverableDatabases.Get(serverName, databaseName); + this.WriteObject(response.Database); + } + else + { + // No name specified, retrieve all databases in the server + RecoverableDatabaseListResponse response = sqlManagementClient.RecoverableDatabases.List(serverName); + this.WriteObject(response.Databases, true); + } + } + catch (Exception ex) + { + this.WriteErrorDetails(ex); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/NewAzureSqlDatabase.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/NewAzureSqlDatabase.cs new file mode 100644 index 000000000000..2c98967d706b --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/NewAzureSqlDatabase.cs @@ -0,0 +1,233 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Properties; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Common; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Database.Cmdlet +{ + /// + /// Creates a new Microsoft Azure SQL Databases in the given server context. + /// + [Cmdlet(VerbsCommon.New, "AzureSqlDatabase", SupportsShouldProcess = true, + ConfirmImpact = ConfirmImpact.Low)] + public class NewAzureSqlDatabase : AzurePSCmdlet + { + #region Parameter Sets + + /// + /// The name of the parameter set for connection with a connection context + /// + internal const string ByConnectionContext = + "ByConnectionContext"; + + /// + /// The name of the parameter set for connecting with an azure subscription + /// + internal const string ByServerName = + "ByServerName"; + + #endregion + + #region Parameters + + /// + /// Gets or sets the server connection context. + /// + [Alias("Context")] + [Parameter(Mandatory = true, Position = 0, ValueFromPipeline = true, + ParameterSetName = ByConnectionContext, + HelpMessage = "The connection context to the specified server.")] + [ValidateNotNull] + public IServerDataServiceContext ConnectionContext { get; set; } + + /// + /// Gets or sets the name of the server to connect to + /// + [Parameter(Mandatory = true, Position = 0, ValueFromPipelineByPropertyName = true, + ParameterSetName = ByServerName, + HelpMessage = "The name of the server to connect to using the current subscription")] + [ValidateNotNullOrEmpty] + public string ServerName { get; set; } + + /// + /// Gets or sets the database name. + /// + [Parameter(Mandatory = true, Position = 1, + HelpMessage = "The name of the new database.")] + [ValidateNotNullOrEmpty] + public string DatabaseName { get; set; } + + /// + /// Gets or sets the collation for the newly created database. + /// + [Parameter(Mandatory = false, + HelpMessage = "Collation for the newly created database.")] + [ValidateNotNullOrEmpty] + public string Collation { get; set; } + + /// + /// Gets or sets the edition for the newly created database. + /// + [Parameter(Mandatory = false, HelpMessage = "The edition for the database.")] + public DatabaseEdition Edition { get; set; } + + /// + /// Gets or sets the new ServiceObjective for this database. + /// + [Parameter(Mandatory = false, HelpMessage = "The new ServiceObjective for the database.")] + [ValidateNotNull] + public ServiceObjective ServiceObjective { get; set; } + + /// + /// Gets or sets the maximum size of the newly created database in GB. Not to be used + /// in conjunction with MaxSizeBytes. + /// + [Parameter(Mandatory = false, HelpMessage = "The maximum size for the database in GB. Not to " + + "be used together with MaxSizeBytes")] + public int MaxSizeGB { get; set; } + + /// + /// Gets or sets the maximum size of the newly created database in Bytes. Not to be used + /// in conjunction with MaxSizeGB + /// + [Parameter(Mandatory = false, HelpMessage = "The maximum size for the database in Bytes. Not to " + + "be used together with MaxSizeGB")] + public long MaxSizeBytes { get; set; } + + /// + /// Gets or sets the switch to not confirm on the creation of the database. + /// + [Parameter(HelpMessage = "Do not confirm on the creation of the database")] + public SwitchParameter Force { get; set; } + + #endregion + + /// + /// Process the command. + /// + public override void ExecuteCmdlet() + { + // Do nothing if force is not specified and user cancelled the operation + if (!this.Force.IsPresent && + !this.ShouldProcess( + Resources.NewAzureSqlDatabaseDescription, + Resources.NewAzureSqlDatabaseWarning, + Resources.ShouldProcessCaption)) + { + return; + } + + // Determine the max size for the Database or null + int? maxSizeGb = null; + if (this.MyInvocation.BoundParameters.ContainsKey("MaxSizeGB")) + { + maxSizeGb = this.MaxSizeGB; + } + + long? maxSizeBytes = null; + if (this.MyInvocation.BoundParameters.ContainsKey("MaxSizeBytes")) + { + maxSizeBytes = this.MaxSizeBytes; + } + + switch (this.ParameterSetName) + { + case ByConnectionContext: + this.ProcessWithConnectionContext(maxSizeGb, maxSizeBytes); + break; + case ByServerName: + this.ProcessWithServerName(maxSizeGb, maxSizeBytes); + break; + } + } + + /// + /// Process the request using the server name + /// + /// the maximum size of the database + /// + private void ProcessWithServerName(int? maxSizeGb, long? maxSizeBytes) + { + Func GetClientRequestId = () => string.Empty; + try + { + // Get the current subscription data. + AzureSubscription subscription = AzureSession.CurrentContext.Subscription; + + // Create a temporary context + ServerDataServiceCertAuth context = + ServerDataServiceCertAuth.Create(this.ServerName, subscription); + + GetClientRequestId = () => context.ClientRequestId; + + Services.Server.Database response = context.CreateNewDatabase( + this.DatabaseName, + maxSizeGb, + maxSizeBytes, + this.Collation, + this.Edition, + this.ServiceObjective); + + response = CmdletCommon.WaitForDatabaseOperation(this, context, response, this.DatabaseName, true); + + // Retrieve the database with the specified name + this.WriteObject(response); + } + catch (Exception ex) + { + SqlDatabaseExceptionHandler.WriteErrorDetails( + this, + GetClientRequestId(), + ex); + } + } + + /// + /// Process the request using the connection context. + /// + /// the maximum size for the new database + /// + private void ProcessWithConnectionContext(int? maxSizeGb, long? maxSizeBytes) + { + try + { + Services.Server.Database database = this.ConnectionContext.CreateNewDatabase( + this.DatabaseName, + maxSizeGb, + maxSizeBytes, + this.Collation, + this.Edition, + this.ServiceObjective); + + database = CmdletCommon.WaitForDatabaseOperation(this, this.ConnectionContext, database, this.DatabaseName, true); + + this.WriteObject(database, true); + } + catch (Exception ex) + { + SqlDatabaseExceptionHandler.WriteErrorDetails( + this, + this.ConnectionContext.ClientRequestId, + ex); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/NewAzureSqlDatabaseServerContext.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/NewAzureSqlDatabaseServerContext.cs new file mode 100644 index 000000000000..01dd933b10eb --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/NewAzureSqlDatabaseServerContext.cs @@ -0,0 +1,383 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Data.Services.Client; +using System.Linq; +using System.Management.Automation; +using System.Xml.Linq; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Properties; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Common; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Database.Cmdlet +{ + /// + /// A cmdlet to Connect to a SQL server administration data service. + /// + [Cmdlet(VerbsCommon.New, "AzureSqlDatabaseServerContext", ConfirmImpact = ConfirmImpact.None, + DefaultParameterSetName = ServerNameWithSqlAuthParamSet)] + public class NewAzureSqlDatabaseServerContext : AzurePSCmdlet + { + #region ParameterSet Names + + /// + /// The name of the parameter set for creating a context with SQL authentication by Server Name + /// + internal const string ServerNameWithSqlAuthParamSet = + "ByServerNameWithSqlAuth"; + + /// + /// The name of the parameter set for creating a context with SQL authentication by FQSN + /// + internal const string FullyQualifiedServerNameWithSqlAuthParamSet = + "ByFullyQualifiedServerNameWithSqlAuth"; + + /// + /// The name of the parameter set for creating a context with SQL authentication by Manage Url + /// + internal const string ManageUrlWithSqlAuthParamSet = + "ByManageUrlWithSqlAuth"; + + /// + /// The name of the parameter set for creating a context with certificate + /// authentication by Server Name + /// + internal const string ServerNameWithCertAuthParamSet = + "ByServerNameWithCertAuth"; + + /// + /// The name of the parameter set for creating a context with certificate + /// authentication by FQSN + /// + internal const string FullyQualifiedServerNameWithCertAuthParamSet = + "ByFullyQualifiedServerNameWithCertAuth"; + + #endregion + + #region Parameters + + /// + /// Gets or sets the management site data connection server name. + /// + [Parameter(Mandatory = true, Position = 0, ValueFromPipelineByPropertyName = true, + ParameterSetName = ServerNameWithSqlAuthParamSet, + HelpMessage = "The short server name")] + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, + ParameterSetName = ManageUrlWithSqlAuthParamSet, + HelpMessage = "The short server name")] + [Parameter(Mandatory = true, Position = 0, ValueFromPipelineByPropertyName = true, + ParameterSetName = ServerNameWithCertAuthParamSet, + HelpMessage = "The short server name")] + [ValidateNotNullOrEmpty] + public string ServerName { get; set; } + + /// + /// Gets or sets the management site data connection fully qualified server name. + /// + [Parameter(Mandatory = true, Position = 0, + ParameterSetName = FullyQualifiedServerNameWithSqlAuthParamSet, + HelpMessage = "The fully qualified server name")] + [Parameter(Mandatory = true, Position = 0, + ParameterSetName = FullyQualifiedServerNameWithCertAuthParamSet, + HelpMessage = "The fully qualified server name")] + [ValidateNotNull] + public string FullyQualifiedServerName { get; set; } + + /// + /// Gets or sets the management . + /// + [Parameter(Mandatory = true, Position = 0, ParameterSetName = ManageUrlWithSqlAuthParamSet, + HelpMessage = "The full management Url for the server")] + [ValidateNotNullOrEmpty] + public Uri ManageUrl { get; set; } + + /// + /// Gets or sets the server credentials + /// + [Parameter(Mandatory = true, Position = 1, + ParameterSetName = ServerNameWithSqlAuthParamSet, + HelpMessage = "The credentials for the server")] + [Parameter(Mandatory = true, Position = 1, + ParameterSetName = FullyQualifiedServerNameWithSqlAuthParamSet, + HelpMessage = "The credentials for the server")] + [Parameter(Mandatory = true, Position = 1, + ParameterSetName = ManageUrlWithSqlAuthParamSet, + HelpMessage = "The credentials for the server")] + [ValidateNotNull] + public PSCredential Credential { get; set; } + + /// + /// Gets or sets whether or not the current subscription should be used for authentication + /// + [Parameter(Mandatory = true, Position = 1, + ParameterSetName = ServerNameWithCertAuthParamSet, + HelpMessage = "Use certificate authentication")] + [Parameter(Mandatory = true, Position = 1, + ParameterSetName = FullyQualifiedServerNameWithCertAuthParamSet, + HelpMessage = "Use certificate authentication")] + public SwitchParameter UseSubscription { get; set; } + + [Parameter(Mandatory = false, Position = 2, ValueFromPipelineByPropertyName = true, + ParameterSetName = ServerNameWithCertAuthParamSet, + HelpMessage = "The subscription to use, or uses the current subscription if not specified")] + [Parameter(Mandatory = false, Position = 2, ValueFromPipelineByPropertyName = true, + ParameterSetName = FullyQualifiedServerNameWithCertAuthParamSet, + HelpMessage = "The subscription to use, or uses the current subscription if not specified")] + public string SubscriptionName { get; set; } + + #endregion + + #region Current Subscription Management + + private AzureSubscription CurrentSubscription + { + get + { + if (string.IsNullOrEmpty(SubscriptionName)) + { + return AzureSession.CurrentContext.Subscription; + } + + ProfileClient client = new ProfileClient(); + + return client.Profile.Subscriptions.Values.First( + s => SubscriptionName == s.Name); + } + } + + #endregion + + + /// + /// Connect to a Azure SQL Server with the given ManagementService Uri using + /// SQL authentication credentials. + /// + /// The server name. + /// The server's ManagementService Uri. + /// The SQL Authentication credentials for the server. + /// A new context, + /// or null if an error occurred. + internal ServerDataServiceSqlAuth GetServerDataServiceBySqlAuth( + string serverName, + Uri managementServiceUri, + SqlAuthenticationCredentials credentials) + { + ServerDataServiceSqlAuth context = null; + + Guid sessionActivityId = Guid.NewGuid(); + try + { + context = ServerDataServiceSqlAuth.Create( + managementServiceUri, + sessionActivityId, + credentials, + serverName); + + // Retrieve $metadata to verify model version compatibility + XDocument metadata = context.RetrieveMetadata(); + XDocument filteredMetadata = DataConnectionUtility.FilterMetadataDocument(metadata); + string metadataHash = DataConnectionUtility.GetDocumentHash(filteredMetadata); + if (!context.metadataHashes.Any(knownHash => metadataHash == knownHash)) + { + this.WriteWarning(Resources.WarningModelOutOfDate); + } + + context.MergeOption = MergeOption.PreserveChanges; + } + catch (Exception ex) + { + SqlDatabaseExceptionHandler.WriteErrorDetails( + this, + sessionActivityId.ToString(), + ex); + + // The context is not in an valid state because of the error, set the context + // back to null. + context = null; + } + + return context; + } + + /// + /// Connect to Azure SQL Server using certificate authentication. + /// + /// The name of the server to connect to + /// The subscription data to use for authentication + /// A new context, + /// or null if an error occurred. + internal ServerDataServiceCertAuth GetServerDataServiceByCertAuth( + string serverName, + AzureSubscription subscription) + { + ServerDataServiceCertAuth context = null; + SqlDatabaseCmdletBase.ValidateSubscription(subscription); + + try + { + context = ServerDataServiceCertAuth.Create(serverName, subscription); + } + catch (ArgumentException e) + { + SqlDatabaseExceptionHandler.WriteErrorDetails(this, string.Empty, e); + + context = null; + } + + return context; + } + + /// + /// Creates a new operation context based on the Cmdlet's parameter set and the manageUrl. + /// + /// The server name. + /// The server's ManagementService Uri. + /// A new operation context for the server. + internal IServerDataServiceContext CreateServerDataServiceContext( + string serverName, + Uri managementServiceUri) + { + switch (this.ParameterSetName) + { + case ServerNameWithSqlAuthParamSet: + case FullyQualifiedServerNameWithSqlAuthParamSet: + case ManageUrlWithSqlAuthParamSet: + // Obtain the Server DataService Context by Sql Authentication + SqlAuthenticationCredentials credentials = this.GetSqlAuthCredentials(); + return this.GetServerDataServiceBySqlAuth( + serverName, + managementServiceUri, + credentials); + + case FullyQualifiedServerNameWithCertAuthParamSet: + case ServerNameWithCertAuthParamSet: + // Get the current subscription data. + AzureSubscription subscription = CurrentSubscription; + + // Create a context using the subscription datat + return this.GetServerDataServiceByCertAuth( + serverName, + subscription); + + default: + throw new InvalidOperationException(Resources.UnknownParameterSet); + } + } + + /// + /// Process the command. + /// + public override void ExecuteCmdlet() + { + try + { + // First obtain the Management Service Uri and the ServerName + Uri manageUrl = this.GetManageUrl(this.ParameterSetName); + Uri managementServiceUri = DataConnectionUtility.GetManagementServiceUri(manageUrl); + string serverName = this.GetServerName(manageUrl); + + // Creates a new Server Data Service Context for the service + IServerDataServiceContext operationContext = + this.CreateServerDataServiceContext(serverName, managementServiceUri); + + if (operationContext != null) + { + this.WriteObject(operationContext); + } + } + catch (Exception ex) + { + this.WriteError(new ErrorRecord(ex, string.Empty, ErrorCategory.CloseError, null)); + } + } + + #region Parameter Parsing Helpers + + /// + /// Obtain the ManageUrl based on the Cmdlet's parameter set. + /// + /// The name of the invoking parameter set. + /// The ManageUrl based on the Cmdlet's parameter set. + private Uri GetManageUrl(string parameterSetName) + { + switch (parameterSetName) + { + case ServerNameWithSqlAuthParamSet: + case ServerNameWithCertAuthParamSet: + // Only the server name was specified, eg. 'server001'. Prepend the Uri schema + // and append the azure database DNS suffix. + return new Uri( + Uri.UriSchemeHttps + Uri.SchemeDelimiter + + this.ServerName + AzureSession.CurrentContext.Environment.GetEndpoint(AzureEnvironment.Endpoint.SqlDatabaseDnsSuffix)); + case FullyQualifiedServerNameWithSqlAuthParamSet: + case FullyQualifiedServerNameWithCertAuthParamSet: + // The fully qualified server name was specified, + // eg. 'server001.database.windows.net'. Prepend the Uri schema. + return new Uri( + Uri.UriSchemeHttps + Uri.SchemeDelimiter + + this.FullyQualifiedServerName); + case ManageUrlWithSqlAuthParamSet: + // The full ManageUrl was specified, + // eg. 'https://server001.database.windows.net'. Return as is. + return this.ManageUrl; + default: + // Should never get to here, this is an invalid parameter set + throw new InvalidOperationException(Resources.UnknownParameterSet); + } + } + + /// + /// Obtain the ServerName based on the Cmdlet's parameter set. + /// + /// The server's manageUrl. + /// The ServerName based on the Cmdlet's parameter set. + private string GetServerName(Uri manageUrl) + { + if (this.MyInvocation.BoundParameters.ContainsKey("ServerName")) + { + // Server name is specified, return as is. + return this.ServerName; + } + else + { + // Server name is not specified, use the first subdomain name in the manageUrl. + return manageUrl.Host.Split('.').First(); + } + } + + /// + /// Obtain the SQL Authentication Credentials based on the Cmdlet's parameter set. + /// + /// The Credentials based on the Cmdlet's parameter set. + private SqlAuthenticationCredentials GetSqlAuthCredentials() + { + if (this.MyInvocation.BoundParameters.ContainsKey("Credential")) + { + return new SqlAuthenticationCredentials( + this.Credential.UserName, + this.Credential.Password); + } + else + { + throw new ArgumentException(Resources.CredentialNotSpecified); + } + } + + #endregion + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/RemoveAzureSqlDatabase.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/RemoveAzureSqlDatabase.cs new file mode 100644 index 000000000000..9cb81fb3b67e --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/RemoveAzureSqlDatabase.cs @@ -0,0 +1,243 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Properties; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Common; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Database.Cmdlet +{ + /// + /// Update settings for an existing Microsoft Azure SQL Database in the given server context. + /// + [Cmdlet(VerbsCommon.Remove, "AzureSqlDatabase", SupportsShouldProcess = true, + ConfirmImpact = ConfirmImpact.High)] + public class RemoveAzureSqlDatabase : AzurePSCmdlet + { + #region Parameter sets + + /// + /// The name of the parameter set for removing a database by name with a connection context + /// + internal const string ByNameWithConnectionContext = + "ByNameWithConnectionContext"; + + /// + /// The name of the parameter set for removing a database by name using azure subscription + /// + internal const string ByNameWithServerName = + "ByNameWithServerName"; + + /// + /// The name of the parameter set for removing a database by input + /// object with a connection context + /// + internal const string ByObjectWithConnectionContext = + "ByObjectWithConnectionContext"; + + /// + /// The name of the parameter set for removing a database by input + /// object using azure subscription + /// + internal const string ByObjectWithServerName = + "ByObjectWithServerName"; + + #endregion + + #region Parameters + + /// + /// Gets or sets the server connection context. + /// + [Alias("Context")] + [Parameter(Mandatory = true, Position = 0, + ValueFromPipelineByPropertyName = true, + ParameterSetName = ByNameWithConnectionContext, + HelpMessage = "The connection context to the specified server.")] + [Parameter(Mandatory = true, Position = 0, + ValueFromPipelineByPropertyName = true, + ParameterSetName = ByObjectWithConnectionContext, + HelpMessage = "The connection context to the specified server.")] + [ValidateNotNull] + public IServerDataServiceContext ConnectionContext { get; set; } + + /// + /// Gets or sets the name of the server to connect to + /// + [Parameter(Mandatory = true, Position = 0, + ValueFromPipelineByPropertyName = true, + ParameterSetName = ByNameWithServerName, + HelpMessage = "The name of the server to connect to")] + [Parameter(Mandatory = true, Position = 0, + ValueFromPipelineByPropertyName = true, + ParameterSetName = ByObjectWithServerName, + HelpMessage = "The name of the server to connect to")] + [ValidateNotNullOrEmpty] + public string ServerName { get; set; } + + /// + /// Gets or sets the database. + /// + [Alias("InputObject")] + [Parameter(Mandatory = true, Position = 1, ValueFromPipeline = true, + ParameterSetName = ByObjectWithConnectionContext, + HelpMessage = "The database object you want to remove")] + [Parameter(Mandatory = true, Position = 1, ValueFromPipeline = true, + ParameterSetName = ByObjectWithServerName, + HelpMessage = "The database object you want to remove")] + [ValidateNotNull] + public Services.Server.Database Database { get; set; } + + /// + /// Gets or sets the database name. + /// + [Parameter(Mandatory = true, Position = 1, + ParameterSetName = ByNameWithConnectionContext, + HelpMessage = "The name of the database to remove")] + [Parameter(Mandatory = true, Position = 1, + ParameterSetName = ByNameWithServerName, + HelpMessage = "The name of the database to remove")] + [ValidateNotNullOrEmpty] + public string DatabaseName { get; set; } + + /// + /// Gets or sets the switch to not confirm on the removal of the database. + /// + [Parameter(HelpMessage = "Do not confirm on the removal of the database")] + public SwitchParameter Force { get; set; } + + #endregion + + /// + /// Process the command. + /// + public override void ExecuteCmdlet() + { + // Obtain the database name from the given parameters. + string databaseName = null; + if (this.MyInvocation.BoundParameters.ContainsKey("Database")) + { + databaseName = this.Database.Name; + } + else if (this.MyInvocation.BoundParameters.ContainsKey("DatabaseName")) + { + databaseName = this.DatabaseName; + } + + // Determine the name of the server we are connecting to + string serverName = null; + if (this.MyInvocation.BoundParameters.ContainsKey("ServerName")) + { + serverName = this.ServerName; + } + else + { + serverName = this.ConnectionContext.ServerName; + } + + string actionDescription = string.Format( + CultureInfo.InvariantCulture, + Resources.RemoveAzureSqlDatabaseDescription, + serverName, + databaseName); + + string actionWarning = string.Format( + CultureInfo.InvariantCulture, + Resources.RemoveAzureSqlDatabaseWarning, + serverName, + databaseName); + + this.WriteVerbose(actionDescription); + + // Do nothing if force is not specified and user cancelled the operation + if (!this.Force.IsPresent && + !this.ShouldProcess( + actionDescription, + actionWarning, + Resources.ShouldProcessCaption)) + { + return; + } + + switch (this.ParameterSetName) + { + case ByNameWithConnectionContext: + case ByObjectWithConnectionContext: + this.ProcessWithConnectionContext(databaseName); + break; + + case ByNameWithServerName: + case ByObjectWithServerName: + this.ProcessWithServerName(databaseName); + break; + } + } + + /// + /// Process the request using a temporary connection context. + /// + /// The name of the database to remove + private void ProcessWithServerName(string databaseName) + { + Func GetClientRequestId = () => string.Empty; + try + { + // Get the current subscription data. + AzureSubscription subscription = AzureSession.CurrentContext.Subscription; + + // Create a temporary context + ServerDataServiceCertAuth context = + ServerDataServiceCertAuth.Create(this.ServerName, subscription); + + GetClientRequestId = () => context.ClientRequestId; + + // Remove the database with the specified name + context.RemoveDatabase(databaseName); + } + catch (Exception ex) + { + SqlDatabaseExceptionHandler.WriteErrorDetails( + this, + GetClientRequestId(), + ex); + } + } + + /// + /// Process the request with the connection context + /// + /// The name of the database to remove + private void ProcessWithConnectionContext(string databaseName) + { + try + { + // Remove the database with the specified name + this.ConnectionContext.RemoveDatabase(databaseName); + } + catch (Exception ex) + { + SqlDatabaseExceptionHandler.WriteErrorDetails( + this, + this.ConnectionContext.ClientRequestId, + ex); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/SetAzureSqlDatabase.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/SetAzureSqlDatabase.cs new file mode 100644 index 000000000000..350125beec5b --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/SetAzureSqlDatabase.cs @@ -0,0 +1,376 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Properties; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Common; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Database.Cmdlet +{ + /// + /// Update settings for an existing Microsoft Azure SQL Database in the given server context. + /// + [Cmdlet(VerbsCommon.Set, "AzureSqlDatabase", SupportsShouldProcess = true, + ConfirmImpact = ConfirmImpact.Medium)] + public class SetAzureSqlDatabase : AzurePSCmdlet + { + #region Parameter sets + + /// + /// Parameter set name for updating by name with a connection context + /// + internal const string ByNameWithConnectionContext = + "ByNameWithConnectionContext"; + + /// + /// Parameter set name for updating by name using azure subscription + /// + internal const string ByNameWithServerName = + "ByNameWithServerName"; + + /// + /// Parameter set name for updating by input object with a connection context + /// + internal const string ByObjectWithConnectionContext = + "ByObjectWithConnectionContext"; + + /// + /// Parameter set name for updating by input object with a azure subscription + /// + internal const string ByObjectWithServerName = + "ByObjectWithServerName"; + + #endregion + + #region Parameters + + /// + /// Gets or sets the server connection context. + /// + [Alias("Context")] + [Parameter(Mandatory = true, Position = 0, + ValueFromPipelineByPropertyName = true, + ParameterSetName = ByNameWithConnectionContext, + HelpMessage = "The connection context to the specified server.")] + [Parameter(Mandatory = true, Position = 0, + ValueFromPipelineByPropertyName = true, + ParameterSetName = ByObjectWithConnectionContext, + HelpMessage = "The connection context to the specified server.")] + [ValidateNotNull] + public IServerDataServiceContext ConnectionContext { get; set; } + + /// + /// Gets or sets the name of the server to connect to + /// + [Parameter(Mandatory = true, Position = 0, + ValueFromPipelineByPropertyName = true, + ParameterSetName = ByNameWithServerName, + HelpMessage = "The name of the server to connect to")] + [Parameter(Mandatory = true, Position = 0, + ValueFromPipelineByPropertyName = true, + ParameterSetName = ByObjectWithServerName, + HelpMessage = "The name of the server to connect to")] + [ValidateNotNullOrEmpty] + public string ServerName { get; set; } + + /// + /// Gets or sets the database. + /// + [Parameter(Mandatory = true, Position = 1, + ParameterSetName = ByObjectWithConnectionContext, + ValueFromPipeline = true)] + [Parameter(Mandatory = true, Position = 1, + ParameterSetName = ByObjectWithServerName, + ValueFromPipeline = true)] + [ValidateNotNull] + public Services.Server.Database Database { get; set; } + + /// + /// Gets or sets the database name. + /// + [Parameter(Mandatory = true, Position = 1, + ParameterSetName = ByNameWithConnectionContext)] + [Parameter(Mandatory = true, Position = 1, + ParameterSetName = ByNameWithServerName)] + [ValidateNotNullOrEmpty] + public string DatabaseName { get; set; } + + /// + /// Gets or sets the new name for the database. + /// + [Alias("NewName")] + [Parameter(Mandatory = false, HelpMessage = "The new name for the database.")] + [ValidateNotNullOrEmpty] + public string NewDatabaseName { get; set; } + + /// + /// Gets or sets the new Edition value for the database. + /// + [Parameter(Mandatory = false, HelpMessage = "The new edition for the database.")] + public DatabaseEdition Edition { get; set; } + + /// + /// Gets or sets the new maximum size for the database in GB. + /// + [Parameter(Mandatory = false, HelpMessage = "The new maximum size for the database in GB." + + "This is not to be used in conjunction with MaxSizeBytes.")] + public int MaxSizeGB { get; set; } + + /// + /// Gets or sets the new maximum size for the database in bytes. + /// + [Parameter(Mandatory = false, HelpMessage = "The new maximum size for the database in Bytes." + + "This is not to be used in conjunction with MaxSizeGB.")] + public long MaxSizeBytes { get; set; } + + /// + /// Gets or sets the new ServiceObjective for this database. + /// + [Parameter(Mandatory = false, HelpMessage = "The new ServiceObjective for the database.")] + [ValidateNotNull] + public ServiceObjective ServiceObjective { get; set; } + + /// + /// Gets or sets the switch to output the target object to the pipeline. + /// + [Parameter(HelpMessage = "Pass through the input object to the output pipeline")] + public SwitchParameter PassThru { get; set; } + + /// + /// Gets or sets the switch to not confirm on the altering of the database. + /// + [Parameter(HelpMessage = "Do not confirm on the altering of the database")] + public SwitchParameter Force { get; set; } + + /// + /// Gets or sets the switch to wait for the operation to complete on the server before returning + /// + [Parameter(HelpMessage = "Wait for the update operation to complete (synchronously)")] + public SwitchParameter Sync { get; set; } + + #endregion + + /// + /// Process the command. + /// + public override void ExecuteCmdlet() + { + // Obtain the database name from the given parameters. + string databaseName = null; + if (this.MyInvocation.BoundParameters.ContainsKey("Database")) + { + databaseName = this.Database.Name; + } + else if (this.MyInvocation.BoundParameters.ContainsKey("DatabaseName")) + { + databaseName = this.DatabaseName; + } + + // Obtain the name of the server + string serverName = null; + if (this.MyInvocation.BoundParameters.ContainsKey("ServerName")) + { + serverName = this.ServerName; + } + else + { + serverName = this.ConnectionContext.ServerName; + } + + // Determine the max size of the db + int? maxSizeGb = null; + if (this.MyInvocation.BoundParameters.ContainsKey("MaxSizeGB")) + { + maxSizeGb = this.MaxSizeGB; + } + + long? maxSizeBytes = null; + if (this.MyInvocation.BoundParameters.ContainsKey("MaxSizeBytes")) + { + maxSizeBytes = this.MaxSizeBytes; + } + + // Determine the edition for the db + DatabaseEdition? edition = null; + if (this.MyInvocation.BoundParameters.ContainsKey("Edition")) + { + edition = this.Edition; + } + + string actionDescription = string.Format( + CultureInfo.InvariantCulture, + Resources.SetAzureSqlDatabaseDescription, + serverName, + databaseName); + + string actionWarning = string.Format( + CultureInfo.InvariantCulture, + Resources.SetAzureSqlDatabaseWarning, + serverName, + databaseName); + + this.WriteVerbose(actionDescription); + + // Do nothing if force is not specified and user cancelled the operation + if (!this.Force.IsPresent && + !this.ShouldProcess(actionDescription, actionWarning, Resources.ShouldProcessCaption)) + { + return; + } + + // If service objective is specified, ask the user to confirm the change + if (!this.Force.IsPresent && + this.ServiceObjective != null) + { + string serviceObjectiveWarning = string.Format( + CultureInfo.InvariantCulture, + Resources.SetAzureSqlDatabaseServiceObjectiveWarning, + serverName, + databaseName); + if (!this.ShouldContinue( + serviceObjectiveWarning, + Resources.ShouldProcessCaption)) + { + return; + } + } + + switch (this.ParameterSetName) + { + case ByNameWithConnectionContext: + case ByObjectWithConnectionContext: + this.ProcessWithConnectionContext(databaseName, maxSizeGb, maxSizeBytes, edition); + break; + + case ByNameWithServerName: + case ByObjectWithServerName: + this.ProcessWithServerName(databaseName, maxSizeGb, maxSizeBytes, edition); + break; + } + } + + /// + /// Process the request using a temporary connection context using certificate authentication + /// + /// The name of the database to update + /// the new size for the database or null + /// + /// the new edition for the database or null + private void ProcessWithServerName(string databaseName, int? maxSizeGb, long? maxSizeBytes, DatabaseEdition? edition) + { + Func GetClientRequestId = () => string.Empty; + try + { + // Get the current subscription data. + AzureSubscription subscription = AzureSession.CurrentContext.Subscription; + + // Create a temporary context + ServerDataServiceCertAuth context = + ServerDataServiceCertAuth.Create(this.ServerName, subscription); + + GetClientRequestId = () => context.ClientRequestId; + + // Remove the database with the specified name + Services.Server.Database database = context.UpdateDatabase( + databaseName, + this.NewDatabaseName, + maxSizeGb, + maxSizeBytes, + edition, + this.ServiceObjective); + + if (this.Sync.IsPresent) + { + // Wait for the operation to complete on the server. + database = CmdletCommon.WaitForDatabaseOperation(this, context, database, this.DatabaseName, false); + } + + // Update the passed in database object + if (this.MyInvocation.BoundParameters.ContainsKey("Database")) + { + this.Database.CopyFields(database); + database = this.Database; + } + + // If PassThru was specified, write back the updated object to the pipeline + if (this.PassThru.IsPresent) + { + this.WriteObject(database); + } + } + catch (Exception ex) + { + SqlDatabaseExceptionHandler.WriteErrorDetails( + this, + GetClientRequestId(), + ex); + } + } + + /// + /// process the request using the connection context. + /// + /// the name of the database to alter + /// the new maximum size for the database + /// + /// the new edition for the database + private void ProcessWithConnectionContext(string databaseName, int? maxSizeGb, long? maxSizeBytes, DatabaseEdition? edition) + { + try + { + // Update the database with the specified name + Services.Server.Database database = this.ConnectionContext.UpdateDatabase( + databaseName, + this.NewDatabaseName, + maxSizeGb, + maxSizeBytes, + edition, + this.ServiceObjective); + + if (this.Sync.IsPresent) + { + // Wait for the operation to complete on the server. + database = CmdletCommon.WaitForDatabaseOperation(this, this.ConnectionContext, database, this.DatabaseName, false); + } + + // If PassThru was specified, write back the updated object to the pipeline + if (this.PassThru.IsPresent) + { + this.WriteObject(database); + } + + if (this.ConnectionContext.GetType() == typeof(ServerDataServiceCertAuth)) + { + if (this.MyInvocation.BoundParameters.ContainsKey("Database")) + { + this.Database.CopyFields(database); + } + } + } + catch (Exception ex) + { + SqlDatabaseExceptionHandler.WriteErrorDetails( + this, + this.ConnectionContext.ClientRequestId, + ex); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseCopy.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseCopy.cs new file mode 100644 index 000000000000..1bf549c626cf --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseCopy.cs @@ -0,0 +1,213 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Properties; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Common; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Database.Cmdlet +{ + using DatabaseCopyModel = Model.DatabaseCopy; + + /// + /// Start a copy operation for a Microsoft Azure SQL Database in the given server context. + /// + [Cmdlet(VerbsLifecycle.Start, "AzureSqlDatabaseCopy", SupportsShouldProcess = true, + ConfirmImpact = ConfirmImpact.Low)] + public class StartAzureSqlDatabaseCopy : AzurePSCmdlet + { + #region ParameterSets + + internal const string ByInputObjectContinuous = "ByInputObjectContinuous"; + + internal const string ByDatabaseNameContinuous = "ByDatabaseNameContinuous"; + + internal const string ByInputObject = "ByInputObject"; + + internal const string ByDatabaseName = "ByDatabaseName"; + + #endregion + + #region Parameters + + /// + /// Gets or sets the name of the server upon which to operate + /// + [Parameter(Mandatory = true, Position = 0, ValueFromPipeline = true, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The name of the server to operate on.")] + [ValidateNotNullOrEmpty] + public string ServerName { get; set; } + + /// + /// Gets or sets the database to copy. + /// + [Parameter(Mandatory = true, Position = 1, ParameterSetName = ByInputObject, + ValueFromPipeline = true, HelpMessage = "The database object to copy.")] + [Parameter(Mandatory = true, Position = 1, ParameterSetName = ByInputObjectContinuous, + ValueFromPipeline = true, HelpMessage = "The database object to copy.")] + [ValidateNotNull] + public Services.Server.Database Database { get; set; } + + /// + /// Gets or sets the name of the database to copy. + /// + [Parameter(Mandatory = true, Position = 1, ParameterSetName = ByDatabaseName, + HelpMessage = "The name of the database to copy.")] + [Parameter(Mandatory = true, Position = 1, ParameterSetName = ByDatabaseNameContinuous, + HelpMessage = "The name of the database to copy.")] + [ValidateNotNullOrEmpty] + public string DatabaseName { get; set; } + + /// + /// Gets or sets the name of the partner server. + /// + [Parameter(Mandatory = false, ParameterSetName = ByInputObject, + HelpMessage = "The name of the partner server.")] + [Parameter(Mandatory = false, ParameterSetName = ByDatabaseName, + HelpMessage = "The name of the partner server.")] + [Parameter(Mandatory = true, ParameterSetName = ByInputObjectContinuous, + HelpMessage = "The name of the partner server.")] + [Parameter(Mandatory = true, ParameterSetName = ByDatabaseNameContinuous, + HelpMessage = "The name of the partner server.")] + [ValidateNotNullOrEmpty] + public string PartnerServer { get; set; } + + /// + /// Gets or sets the name of the partner database. + /// + [Parameter(Mandatory = true, ParameterSetName = ByInputObject, + HelpMessage = "The name of the partner database.")] + [Parameter(Mandatory = true, ParameterSetName = ByDatabaseName, + HelpMessage = "The name of the partner database.")] + [Parameter(Mandatory = false, ParameterSetName = ByInputObjectContinuous, + HelpMessage = "The name of the partner database.")] + [Parameter(Mandatory = false, ParameterSetName = ByDatabaseNameContinuous, + HelpMessage = "The name of the partner database.")] + [ValidateNotNullOrEmpty] + public string PartnerDatabase { get; set; } + + /// + /// Gets or sets a value indicating whether to make this a continuous copy. + /// + [Parameter(Mandatory = true, ParameterSetName = ByInputObjectContinuous, + HelpMessage = "Whether to make this a continuous copy.")] + [Parameter(Mandatory = true, ParameterSetName = ByDatabaseNameContinuous, + HelpMessage = "Whether to make this a continuous copy.")] + public SwitchParameter ContinuousCopy { get; set; } + + /// + /// Gets or sets a value indicating whether this is an offline secondary copy. + /// + [Parameter(Mandatory = false, ParameterSetName = ByInputObjectContinuous, + HelpMessage = "Whether this is an offline secondary copy.")] + [Parameter(Mandatory = false, ParameterSetName = ByDatabaseNameContinuous, + HelpMessage = "Whether this is an offline secondary copy.")] + public SwitchParameter OfflineSecondary { get; set; } + + /// + /// Gets or sets the switch to not confirm on the start of the database copy. + /// + [Parameter(HelpMessage = "Do not confirm on the start of the database copy.")] + public SwitchParameter Force { get; set; } + + #endregion + + /// + /// Execute the command. + /// + public override void ExecuteCmdlet() + { + // Obtain the database name from the given parameters. + string databaseName = null; + if (this.MyInvocation.BoundParameters.ContainsKey("Database")) + { + databaseName = this.Database.Name; + } + else if (this.MyInvocation.BoundParameters.ContainsKey("DatabaseName")) + { + databaseName = this.DatabaseName; + } + + string partnerServerName = this.PartnerServer; + string partnerDatabaseName = this.PartnerDatabase; + + if (this.ContinuousCopy.IsPresent) + { + // Default partnerDatabaseName to the only allowed value for continuous copies. + partnerDatabaseName = partnerDatabaseName ?? databaseName; + } + else + { + // Default partnerServerName to the only allowed value for normal copies. + partnerServerName = partnerServerName ?? this.ServerName; + } + + // Do nothing if force is not specified and user cancelled the operation + string actionDescription = string.Format( + CultureInfo.InvariantCulture, + Resources.StartAzureSqlDatabaseCopyDescription, + this.ServerName, + databaseName, + partnerServerName, + partnerDatabaseName); + string actionWarning = string.Format( + CultureInfo.InvariantCulture, + Resources.StartAzureSqlDatabaseCopyWarning, + this.ServerName, + databaseName, + partnerServerName, + partnerDatabaseName); + this.WriteVerbose(actionDescription); + if (!this.Force.IsPresent && + !this.ShouldProcess( + actionDescription, + actionWarning, + Resources.ShouldProcessCaption)) + { + return; + } + + // Use the provided ServerDataServiceContext or create one from the + // provided ServerName and the active subscription. + IServerDataServiceContext context = ServerDataServiceCertAuth.Create(this.ServerName, + AzureSession.CurrentContext.Subscription); + + try + { + // Update the database with the specified name + DatabaseCopyModel databaseCopy = context.StartDatabaseCopy( + databaseName, + partnerServerName, + partnerDatabaseName, + this.ContinuousCopy.IsPresent, + this.OfflineSecondary.IsPresent); + + this.WriteObject(databaseCopy, true); + } + catch (Exception ex) + { + SqlDatabaseExceptionHandler.WriteErrorDetails( + this, + context.ClientRequestId, + ex); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseExport.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseExport.cs new file mode 100644 index 000000000000..5522462dd9d3 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseExport.cs @@ -0,0 +1,231 @@ +// ---------------------------------------------------------------------------------- +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Common; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.ImportExport; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server; +using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; +using Microsoft.WindowsAzure.Management.Sql; +using Microsoft.WindowsAzure.Management.Sql.Models; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Database.Cmdlet +{ + /// + /// Exports a database from SQL Azure into blob storage. + /// + [Cmdlet("Start", "AzureSqlDatabaseExport", ConfirmImpact = ConfirmImpact.Medium)] + public class StartAzureSqlDatabaseExport : SqlDatabaseCmdletBase + { + #region Parameter Set names + + /// + /// The name of the parameter set that uses the Azure Storage Container object + /// + internal const string ByContainerObjectParameterSet = + "ByContainerObject"; + + /// + /// The name of the parameter set that uses the storage container name + /// + internal const string ByContainerNameParameterSet = + "ByContainerName"; + + #endregion + + #region Parameters + + /// + /// Gets or sets the context for connecting to the server + /// + [Parameter(Mandatory = true, Position = 0, + HelpMessage = "The context for connecting to the server")] + [ValidateNotNullOrEmpty] + public ServerDataServiceSqlAuth SqlConnectionContext { get; set; } + + /// + /// Gets or sets the destination storage container for the blob + /// + [Parameter(Mandatory = true, Position = 1, + ParameterSetName = ByContainerObjectParameterSet, + HelpMessage = "The Azure Storage Container to place the blob in.")] + [ValidateNotNull] + public AzureStorageContainer StorageContainer { get; set; } + + /// + /// Gets or sets the storage context + /// + [Parameter(Mandatory = true, Position = 1, + ParameterSetName = ByContainerNameParameterSet, + HelpMessage = "The storage connection context")] + [ValidateNotNull] + public AzureStorageContext StorageContext { get; set; } + + /// + /// Gets or sets the name of the storage container to use. + /// + [Parameter(Mandatory = true, Position = 2, + ParameterSetName = ByContainerNameParameterSet, + HelpMessage = "The name of the storage container to use")] + [ValidateNotNullOrEmpty] + public string StorageContainerName { get; set; } + + /// + /// Gets or sets the name of the database to export + /// + [Parameter(Mandatory = true, Position = 2, + ParameterSetName = ByContainerObjectParameterSet, + HelpMessage = "The name of the database to export")] + [Parameter(Mandatory = true, Position = 3, + ParameterSetName = ByContainerNameParameterSet, + HelpMessage = "The name of the database to export")] + [ValidateNotNullOrEmpty] + public string DatabaseName { get; set; } + + /// + /// Gets or sets name of the blob to use for the export + /// + [Parameter(Mandatory = true, Position = 3, + ParameterSetName = ByContainerObjectParameterSet, + HelpMessage = "The name of the blob to use for the export")] + [Parameter(Mandatory = true, Position = 4, + ParameterSetName = ByContainerNameParameterSet, + HelpMessage = "The name of the blob to use for the export")] + [ValidateNotNullOrEmpty] + public string BlobName { get; set; } + + #endregion + + /// + /// Performs the call to export database using the server data service context channel. + /// + /// The name of the server to connect to. + /// The storage blob Uri to export to. + /// The access key for the given storage blob. + /// The fully qualified server name. + /// The name of the database to export. + /// The credentials used to connect to the database. + /// + /// The result of export request. Upon success the + /// for the request. + /// + internal ImportExportRequest ExportSqlAzureDatabaseProcess( + string serverName, + Uri blobUri, + string storageAccessKey, + string fullyQualifiedServerName, + string databaseName, + SqlAuthenticationCredentials sqlCredentials) + { + this.WriteVerbose("BlobUri: " + blobUri); + this.WriteVerbose("ServerName: " + fullyQualifiedServerName); + this.WriteVerbose("DatabaseName: " + databaseName); + this.WriteVerbose("UserName: " + sqlCredentials.UserName); + + // Get the SQL management client for the current subscription + SqlManagementClient sqlManagementClient = GetCurrentSqlClient(); + + // Start the database export operation + DacImportExportResponse response = sqlManagementClient.Dac.Export( + serverName, + new DacExportParameters() + { + BlobCredentials = new DacExportParameters.BlobCredentialsParameter() + { + Uri = blobUri, + StorageAccessKey = storageAccessKey, + }, + ConnectionInfo = new DacExportParameters.ConnectionInfoParameter() + { + ServerName = fullyQualifiedServerName, + DatabaseName = databaseName, + UserName = sqlCredentials.UserName, + Password = sqlCredentials.Password, + } + }); + + ImportExportRequest result = new ImportExportRequest() + { + OperationStatus = Services.Constants.OperationSuccess, + OperationDescription = CommandRuntime.ToString(), + OperationId = response.RequestId, + RequestGuid = response.Guid, + ServerName = serverName, + SqlCredentials = sqlCredentials, + }; + + return result; + } + + /// + /// Process the export request + /// + public override void ExecuteCmdlet() + { + try + { + // Obtain the Blob Uri and Access Key + string blobUri = null; + string accessKey = null; + switch (this.ParameterSetName) + { + case ByContainerNameParameterSet: + accessKey = Convert.ToBase64String( + this.StorageContext.StorageAccount.Credentials.ExportKey()); + + blobUri = + this.StorageContext.BlobEndPoint + + this.StorageContainerName + "/" + + this.BlobName; + break; + + case ByContainerObjectParameterSet: + accessKey = Convert.ToBase64String( + this.StorageContainer.CloudBlobContainer.ServiceClient.Credentials.ExportKey()); + + blobUri = + this.StorageContainer.Context.BlobEndPoint + + this.StorageContainer.Name + "/" + + this.BlobName; + break; + + default: + throw new NotSupportedException("ParameterSet"); + } + + // Retrieve the fully qualified server name + string fullyQualifiedServerName = + this.SqlConnectionContext.ServerName + AzureSession.CurrentContext.Environment.GetEndpoint(AzureEnvironment.Endpoint.SqlDatabaseDnsSuffix); + + // Issue the request + ImportExportRequest context = this.ExportSqlAzureDatabaseProcess( + this.SqlConnectionContext.ServerName, + new Uri(blobUri), + accessKey, + fullyQualifiedServerName, + this.DatabaseName, + this.SqlConnectionContext.SqlCredentials); + + this.WriteObject(context); + } + catch (Exception ex) + { + this.WriteErrorDetails(ex); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseImport.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseImport.cs new file mode 100644 index 000000000000..d0c8a9f8f736 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseImport.cs @@ -0,0 +1,258 @@ +// ---------------------------------------------------------------------------------- +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Common; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.ImportExport; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server; +using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; +using Microsoft.WindowsAzure.Management.Sql; +using Microsoft.WindowsAzure.Management.Sql.Models; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Database.Cmdlet +{ + /// + /// Imports a database from blob storage into SQL Azure. + /// + [Cmdlet("Start", "AzureSqlDatabaseImport", ConfirmImpact = ConfirmImpact.Medium)] + public class StartAzureSqlDatabaseImport : SqlDatabaseCmdletBase + { + #region Parameter Set names + + /// + /// The name of the parameter set that uses the Azure Storage Container object + /// + internal const string ByContainerObjectParameterSet = + "ByContainerObject"; + + /// + /// The name of the parameter set that uses the storage container name + /// + internal const string ByContainerNameParameterSet = + "ByContainerName"; + + #endregion + + #region Parameters + + /// + /// Gets or sets the context for connecting to the server + /// + [Parameter(Mandatory = true, Position = 0, + HelpMessage = "The context for connecting to the server")] + [ValidateNotNullOrEmpty] + public ServerDataServiceSqlAuth SqlConnectionContext { get; set; } + + /// + /// Gets or sets the storage container object containing the blob + /// + [Parameter(Mandatory = true, Position = 1, + ParameterSetName = ByContainerObjectParameterSet, + HelpMessage = "The Azure Storage Container to place the blob in.")] + [ValidateNotNull] + public AzureStorageContainer StorageContainer { get; set; } + + /// + /// Gets or sets the storage context + /// + [Parameter(Mandatory = true, Position = 1, + ParameterSetName = ByContainerNameParameterSet, + HelpMessage = "The storage connection context")] + [ValidateNotNull] + public AzureStorageContext StorageContext { get; set; } + + /// + /// Gets or sets the name of the storage container to use. + /// + [Parameter(Mandatory = true, Position = 2, + ParameterSetName = ByContainerNameParameterSet, + HelpMessage = "The name of the storage container to use")] + [ValidateNotNullOrEmpty] + public string StorageContainerName { get; set; } + + /// + /// Gets or sets the name for the imported database + /// + [Parameter(Mandatory = true, Position = 2, + ParameterSetName = ByContainerObjectParameterSet, + HelpMessage = "The name for the imported database")] + [Parameter(Mandatory = true, Position = 3, + ParameterSetName = ByContainerNameParameterSet, + HelpMessage = "The name for the imported database")] + [ValidateNotNullOrEmpty] + public string DatabaseName { get; set; } + + /// + /// Gets or sets name of the blob to use for the import + /// + [Parameter(Mandatory = true, Position = 3, + ParameterSetName = ByContainerObjectParameterSet, + HelpMessage = "The name of the blob to use for the import")] + [Parameter(Mandatory = true, Position = 4, + ParameterSetName = ByContainerNameParameterSet, + HelpMessage = "The name of the blob to use for the import")] + [ValidateNotNullOrEmpty] + public string BlobName { get; set; } + + /// + /// Gets or sets the edition for the newly imported database + /// + [Parameter(Mandatory = false, + HelpMessage = "The edition for the newly imported database")] + [ValidateNotNull] + public DatabaseEdition Edition { get; set; } + + /// + /// Gets or sets the maximum size for the newly imported database + /// + [Parameter(Mandatory = false, + HelpMessage = "The maximum size for the newly imported database")] + public int DatabaseMaxSize { get; set; } + + #endregion + + /// + /// Performs the call to import database using the server data service context channel. + /// + /// The name of the server to connect to. + /// The storage blob Uri to import from. + /// The access key for the given storage blob. + /// The fully qualified server name. + /// The name of the database for import. + /// The edition of the database for import. + /// The database size for import. + /// The credentials used to connect to the database. + /// The result of the import request. Upon success the + /// for the request + internal ImportExportRequest ImportSqlAzureDatabaseProcess( + string serverName, + Uri blobUri, + string storageAccessKey, + string fullyQualifiedServerName, + string databaseName, + string edition, + int maxDatabaseSizeInGB, + SqlAuthenticationCredentials sqlCredentials) + { + this.WriteVerbose("BlobUri: " + blobUri); + this.WriteVerbose("ServerName: " + fullyQualifiedServerName); + this.WriteVerbose("DatabaseName: " + databaseName); + this.WriteVerbose("Edition: " + edition); + this.WriteVerbose("MaxDatabaseSizeInGB: " + maxDatabaseSizeInGB); + this.WriteVerbose("UserName: " + sqlCredentials.UserName); + + // Get the SQL management client for the current subscription + SqlManagementClient sqlManagementClient = GetCurrentSqlClient(); + + // Start the database export operation + DacImportExportResponse response = sqlManagementClient.Dac.Import( + serverName, + new DacImportParameters() + { + BlobCredentials = new DacImportParameters.BlobCredentialsParameter() + { + Uri = blobUri, + StorageAccessKey = storageAccessKey, + }, + ConnectionInfo = new DacImportParameters.ConnectionInfoParameter() + { + ServerName = fullyQualifiedServerName, + DatabaseName = databaseName, + UserName = sqlCredentials.UserName, + Password = sqlCredentials.Password, + }, + AzureEdition = edition, + DatabaseSizeInGB = maxDatabaseSizeInGB + }); + + ImportExportRequest result = new ImportExportRequest() + { + OperationStatus = Services.Constants.OperationSuccess, + OperationDescription = CommandRuntime.ToString(), + OperationId = response.RequestId, + RequestGuid = response.Guid, + ServerName = serverName, + SqlCredentials = sqlCredentials, + }; + + return result; + } + + /// + /// Process the import request + /// + public override void ExecuteCmdlet() + { + try + { + // Obtain the Blob Uri and Access Key + string blobUri = null; + string accessKey = null; + switch (this.ParameterSetName) + { + case ByContainerNameParameterSet: + accessKey = + System.Convert.ToBase64String( + this.StorageContext.StorageAccount.Credentials.ExportKey()); + + blobUri = + this.StorageContext.BlobEndPoint + + this.StorageContainerName + "/" + + this.BlobName; + break; + + case ByContainerObjectParameterSet: + accessKey = + System.Convert.ToBase64String( + this.StorageContainer.CloudBlobContainer.ServiceClient.Credentials.ExportKey()); + + blobUri = + this.StorageContainer.Context.BlobEndPoint + + this.StorageContainer.Name + "/" + + this.BlobName; + break; + + default: + throw new NotSupportedException("ParameterSet"); + } + + // Retrieve the fully qualified server name + string fullyQualifiedServerName = + this.SqlConnectionContext.ServerName + AzureSession.CurrentContext.Environment.GetEndpoint(AzureEnvironment.Endpoint.SqlDatabaseDnsSuffix); + + // Issue the request + ImportExportRequest context = this.ImportSqlAzureDatabaseProcess( + this.SqlConnectionContext.ServerName, + new Uri(blobUri), + accessKey, + fullyQualifiedServerName, + this.DatabaseName, + this.MyInvocation.BoundParameters.ContainsKey("Edition") ? + this.Edition.ToString() : null, + this.MyInvocation.BoundParameters.ContainsKey("DatabaseMaxSize") ? + this.DatabaseMaxSize : 0, + this.SqlConnectionContext.SqlCredentials); + + this.WriteObject(context); + } + catch (Exception ex) + { + this.WriteErrorDetails(ex); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseRecovery.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseRecovery.cs new file mode 100644 index 000000000000..42b7ac837428 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseRecovery.cs @@ -0,0 +1,130 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Management.Sql; +using Microsoft.WindowsAzure.Management.Sql.Models; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Database.Cmdlet +{ + /// + /// Issues a new recover request for the specified live or dropped Microsoft Azure SQL Database. + /// + [Cmdlet(VerbsLifecycle.Start, "AzureSqlDatabaseRecovery", ConfirmImpact = ConfirmImpact.Low)] + public class StartAzureSqlDatabaseRecovery : SqlDatabaseCmdletBase + { + #region Parameter Sets + + /// + /// The parameter set string for connecting using azure subscription and providing a source Database object + /// + internal const string BySourceDatabaseObject = + "BySourceDatabaseObject"; + + /// + /// The parameter set string for connecting using azure subscription and providing a source database name + /// + internal const string BySourceDatabaseName = + "BySourceDatabaseName"; + + #endregion + + #region Parameters + + /// + /// Gets or sets the name of the server that had the database to recover. + /// + [Parameter(Mandatory = true, + ParameterSetName = BySourceDatabaseName, + HelpMessage = "The name of the server that had the database to recover.")] + [ValidateNotNullOrEmpty] + public string SourceServerName { get; set; } + + /// + /// Gets or sets the name of the database to recover. + /// + [Parameter(Mandatory = true, + ParameterSetName = BySourceDatabaseName, + HelpMessage = "The name of the database to recover.")] + [ValidateNotNullOrEmpty] + public string SourceDatabaseName { get; set; } + + /// + /// Gets or sets the database object representing the database to recover. + /// + [Parameter(Mandatory = true, + ValueFromPipeline = true, + ParameterSetName = BySourceDatabaseObject, + HelpMessage = "The database object representing the database to recover.")] + [ValidateNotNull] + public RecoverableDatabase SourceDatabase { get; set; } + + /// + /// Gets or sets the name of the server that will host the recovered database. + /// + [Parameter(Mandatory = false, + HelpMessage = "The name of the server that will host the recovered database.")] + [ValidateNotNullOrEmpty] + public string TargetServerName { get; set; } + + /// + /// Gets or sets the name of the target database. + /// + [Parameter(Mandatory = false, + HelpMessage = "The name of the target database.")] + [ValidateNotNullOrEmpty] + public string TargetDatabaseName { get; set; } + + #endregion + + /// + /// Execute the command. + /// + public override void ExecuteCmdlet() + { + this.SourceServerName = + this.SourceDatabase != null ? this.SourceDatabase.ServerName : + this.SourceServerName; + + this.SourceDatabaseName = + this.SourceDatabase != null ? this.SourceDatabase.Name : + this.SourceDatabaseName; + + this.TargetDatabaseName = this.TargetDatabaseName ?? this.SourceDatabaseName; + + // Get the SQL management client for the current subscription + SqlManagementClient sqlManagementClient = GetCurrentSqlClient(); + + try + { + RecoverDatabaseOperationCreateResponse response = + sqlManagementClient.RecoverDatabaseOperations.Create( + this.SourceServerName, + new RecoverDatabaseOperationCreateParameters() + { + SourceDatabaseName = this.SourceDatabaseName, + TargetServerName = this.TargetServerName, + TargetDatabaseName = this.TargetDatabaseName + }); + + this.WriteObject(response.Operation); + } + catch (Exception ex) + { + this.WriteErrorDetails(ex); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseRestore.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseRestore.cs new file mode 100644 index 000000000000..3f5d52ecbc4a --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StartAzureSqlDatabaseRestore.cs @@ -0,0 +1,226 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Common; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Database.Cmdlet +{ + /// + /// Issues a new restore request for the specified live or dropped Microsoft Azure SQL Database. + /// + [Cmdlet(VerbsLifecycle.Start, "AzureSqlDatabaseRestore", ConfirmImpact = ConfirmImpact.Low)] + public class StartAzureSqlDatabaseRestore : AzurePSCmdlet + { + #region Parameter Sets + + /// + /// The parameter set string for providing a source Database object + /// + internal const string BySourceDatabaseObject = + "BySourceDatabaseObject"; + + /// + /// The parameter set string for providing a source RestorableDroppedDatabase object + /// + internal const string BySourceRestorableDroppedDatabaseObject = + "BySourceRestorableDroppedDatabaseObject"; + + /// + /// The parameter set string for providing a source database name + /// + internal const string BySourceDatabaseName = + "BySourceDatabaseName"; + + /// + /// The parameter set string for providing a source database name + /// + internal const string BySourceRestorableDroppedDatabaseName = + "BySourceRestorableDroppedDatabaseName"; + + #endregion + + #region Parameters + + /// + /// Gets or sets the name of the server where the source database is running, or the name of the server where the database was running before it was deleted. + /// + [Parameter(Mandatory = false, Position = 0, + ParameterSetName = BySourceDatabaseObject, + HelpMessage = "The name of the server where the source database is running, or the name of the server where the database was running before it was deleted.")] + [Parameter(Mandatory = false, Position = 0, + ParameterSetName = BySourceRestorableDroppedDatabaseObject, + HelpMessage = "The name of the server where the source database is running, or the name of the server where the database was running before it was deleted.")] + [Parameter(Mandatory = true, Position = 0, + ParameterSetName = BySourceDatabaseName, + HelpMessage = "The name of the server where the source database is running, or the name of the server where the database was running before it was deleted.")] + [Parameter(Mandatory = true, Position = 0, + ParameterSetName = BySourceRestorableDroppedDatabaseName, + HelpMessage = "The name of the server where the source database is running, or the name of the server where the database was running before it was deleted.")] + [ValidateNotNullOrEmpty] + public string SourceServerName { get; set; } + + /// + /// Gets or sets the database object for the database to restore. + /// + [Parameter(Mandatory = true, Position = 1, + ValueFromPipeline = true, + ParameterSetName = BySourceDatabaseObject, + HelpMessage = "The database object representing the database to restore.")] + [ValidateNotNull] + public Services.Server.Database SourceDatabase { get; set; } + + /// + /// Gets or sets the database object for the dropped database to restore. + /// + [Parameter(Mandatory = true, Position = 1, + ValueFromPipeline = true, + ParameterSetName = BySourceRestorableDroppedDatabaseObject, + HelpMessage = "The database object representing the dropped database to restore.")] + [ValidateNotNull] + public RestorableDroppedDatabase SourceRestorableDroppedDatabase { get; set; } + + /// + /// Gets or sets the name of the database to restore. + /// + [Parameter(Mandatory = true, Position = 1, + ParameterSetName = BySourceDatabaseName, + HelpMessage = "The name of the database to restore.")] + [Parameter(Mandatory = true, Position = 1, + ParameterSetName = BySourceRestorableDroppedDatabaseName, + HelpMessage = "The name of the database to restore.")] + [ValidateNotNullOrEmpty] + public string SourceDatabaseName { get; set; } + + /// + /// Gets or sets the deletion date of the source restorable dropped database. + /// + [Parameter(Mandatory = true, Position = 2, + ParameterSetName = BySourceRestorableDroppedDatabaseName, + HelpMessage = "The deletion date of the source restorable dropped database.")] + public DateTime SourceDatabaseDeletionDate { get; set; } + + /// + /// Gets or sets the name of the server that will host the restored database. If unspecified, the current server will host the restored database. + /// + [Parameter(Mandatory = false, + HelpMessage = "The name of the server that will host the restored database. If unspecified, the current server will host the restored database.")] + [ValidateNotNullOrEmpty] + public string TargetServerName { get; set; } + + /// + /// Gets or sets whether the source is a live or dropped database + /// + [Parameter(Mandatory = true, + ParameterSetName = BySourceRestorableDroppedDatabaseName, + HelpMessage = "Specify this switch to restore a restorable dropped database.")] + public SwitchParameter RestorableDropped { get; set; } + + /// + /// Gets or sets the name of the target database. + /// + [Parameter(Mandatory = true, + HelpMessage = "The name of the target database.")] + [ValidateNotNullOrEmpty] + public string TargetDatabaseName { get; set; } + + /// + /// Gets or sets the point in time to restore to. + /// + [Parameter(Mandatory = false, + HelpMessage = "The point in time to restore to.")] + public DateTime? PointInTime { get; set; } + + #endregion + + /// + /// Execute the command. + /// + public override void ExecuteCmdlet() + { + // Obtain the name of the source database / source restorable dropped database from the parameters + this.SourceDatabaseName = + this.SourceDatabase != null ? this.SourceDatabase.Name : + this.SourceRestorableDroppedDatabase != null ? this.SourceRestorableDroppedDatabase.Name : + this.SourceDatabaseName; + + // Obtain the deletion date of the source restorable dropped database from the parameters + DateTime? sourceDatabaseDeletionDate = null; + if (this.SourceRestorableDroppedDatabase != null) + { + sourceDatabaseDeletionDate = this.SourceRestorableDroppedDatabase.DeletionDate; + } + else if (this.RestorableDropped.IsPresent) + { + sourceDatabaseDeletionDate = this.SourceDatabaseDeletionDate; + } + + // Normalize the deletion date and point in time to UTC, if given + if (sourceDatabaseDeletionDate != null) + { + sourceDatabaseDeletionDate = CmdletCommon.NormalizeToUtc(sourceDatabaseDeletionDate.Value); + } + + if (this.PointInTime != null) + { + this.PointInTime = CmdletCommon.NormalizeToUtc(this.PointInTime.Value); + } + + IServerDataServiceContext connectionContext = null; + + // If a database object was piped in, use its connection context... + if (this.SourceDatabase != null) + { + connectionContext = this.SourceDatabase.Context; + } + else if (this.SourceRestorableDroppedDatabase != null) + { + connectionContext = this.SourceRestorableDroppedDatabase.Context; + } + + // ... but only if it's a cert auth context. Otherwise, create a cert auth context using this.ServerName or the server name of the SQL auth context. + if (!(connectionContext is ServerDataServiceCertAuth)) + { + string serverName = this.SourceServerName ?? connectionContext.ServerName; + + connectionContext = ServerDataServiceCertAuth.Create(serverName, AzureSession.CurrentContext.Subscription); + } + + string clientRequestId = connectionContext.ClientRequestId; + + try + { + RestoreDatabaseOperation operation = connectionContext.RestoreDatabase( + this.SourceDatabaseName, + sourceDatabaseDeletionDate, + this.TargetServerName, + this.TargetDatabaseName, + this.PointInTime); + + this.WriteObject(operation); + } + catch (Exception ex) + { + SqlDatabaseExceptionHandler.WriteErrorDetails( + this, + clientRequestId, + ex); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StopAzureSqlDatabaseCopy.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StopAzureSqlDatabaseCopy.cs new file mode 100644 index 000000000000..0b199ba31c78 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Database/Cmdlet/StopAzureSqlDatabaseCopy.cs @@ -0,0 +1,202 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Properties; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Common; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Database.Cmdlet +{ + using DatabaseCopyModel = Model.DatabaseCopy; + + /// + /// Stop an ongoing copy operation for a Microsoft Azure SQL Database in the given server context. + /// + [Cmdlet(VerbsLifecycle.Stop, "AzureSqlDatabaseCopy", SupportsShouldProcess = true, + ConfirmImpact = ConfirmImpact.Medium)] + public class StopAzureSqlDatabaseCopy : AzurePSCmdlet + { + #region ParameterSetNames + + internal const string ByInputObject = "ByInputObject"; + + internal const string ByDatabase = "ByDatabase"; + + internal const string ByDatabaseName = "ByDatabaseName"; + + #endregion + + #region Parameters + + /// + /// Gets or sets the name of the server upon which to operate + /// + [Parameter(Mandatory = true, Position = 0, ValueFromPipeline = true, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The name of the server to operate on.")] + [ValidateNotNullOrEmpty] + public string ServerName { get; set; } + + /// + /// Gets or sets the sql database copy object. + /// + [Parameter(Mandatory = true, Position = 1, ParameterSetName = ByInputObject, + ValueFromPipeline = true, HelpMessage = "The database copy operation to stop.")] + [ValidateNotNull] + public DatabaseCopyModel DatabaseCopy { get; set; } + + /// + /// Gets or sets the database object to refresh. + /// + [Parameter(Mandatory = true, Position = 1, ParameterSetName = ByDatabase, + ValueFromPipeline = true, HelpMessage = "The database object to stop a copy from or to.")] + [ValidateNotNull] + public Services.Server.Database Database { get; set; } + + /// + /// Gets or sets the name of the database to retrieve. + /// + [Parameter(Mandatory = true, Position = 1, ParameterSetName = ByDatabaseName, + HelpMessage = "The name of the database to stop copy.")] + [ValidateNotNullOrEmpty] + public string DatabaseName { get; set; } + + /// + /// Gets or sets the name of the partner server. + /// + [Parameter(Mandatory = false, ParameterSetName = ByDatabase, + HelpMessage = "The name of the partner server")] + [Parameter(Mandatory = false, ParameterSetName = ByDatabaseName, + HelpMessage = "The name of the partner server")] + [ValidateNotNullOrEmpty] + public string PartnerServer { get; set; } + + /// + /// Gets or sets the name of the partner database. + /// + [Parameter(Mandatory = false, ParameterSetName = ByDatabase, + HelpMessage = "The name of the partner database")] + [Parameter(Mandatory = false, ParameterSetName = ByDatabaseName, + HelpMessage = "The name of the partner database")] + [ValidateNotNullOrEmpty] + public string PartnerDatabase { get; set; } + + /// + /// Gets or sets a value indicating whether to forcefully terminate the copy. + /// + [Parameter(HelpMessage = "Forcefully terminate the copy operation.")] + public SwitchParameter ForcedTermination { get; set; } + + /// + /// Gets or sets the switch to not confirm on the termination of the database copy. + /// + [Parameter(HelpMessage = "Do not confirm on the termination of the database copy")] + public SwitchParameter Force { get; set; } + + #endregion + + /// + /// Execute the command. + /// + public override void ExecuteCmdlet() + { + // Obtain the database name from the given parameters. + string databaseName = null; + if (this.MyInvocation.BoundParameters.ContainsKey("Database")) + { + databaseName = this.Database.Name; + } + else if (this.MyInvocation.BoundParameters.ContainsKey("DatabaseName")) + { + databaseName = this.DatabaseName; + } + + // Use the provided ServerDataServiceContext or create one from the + // provided ServerName and the active subscription. + IServerDataServiceContext context = ServerDataServiceCertAuth.Create(this.ServerName, + AzureSession.CurrentContext.Subscription); + + DatabaseCopyModel databaseCopy; + if (this.MyInvocation.BoundParameters.ContainsKey("DatabaseCopy")) + { + // Refreshes the given copy object + databaseCopy = context.GetDatabaseCopy(this.DatabaseCopy); + } + else + { + // Retrieve all database copy object with matching parameters + DatabaseCopyModel[] copies = context.GetDatabaseCopy( + databaseName, + this.PartnerServer, + this.PartnerDatabase); + if (copies.Length == 0) + { + throw new ApplicationException(Resources.DatabaseCopyNotFoundGeneric); + } + else if (copies.Length > 1) + { + throw new ApplicationException(Resources.MoreThanOneDatabaseCopyFound); + } + + databaseCopy = copies.Single(); + } + + // Do nothing if force is not specified and user cancelled the operation + string actionDescription = string.Format( + CultureInfo.InvariantCulture, + Resources.StopAzureSqlDatabaseCopyDescription, + databaseCopy.SourceServerName, + databaseCopy.SourceDatabaseName, + databaseCopy.DestinationServerName, + databaseCopy.DestinationDatabaseName); + string actionWarning = string.Format( + CultureInfo.InvariantCulture, + Resources.StopAzureSqlDatabaseCopyWarning, + databaseCopy.SourceServerName, + databaseCopy.SourceDatabaseName, + databaseCopy.DestinationServerName, + databaseCopy.DestinationDatabaseName); + this.WriteVerbose(actionDescription); + if (!this.Force.IsPresent && + !this.ShouldProcess( + actionDescription, + actionWarning, + Resources.ShouldProcessCaption)) + { + return; + } + + try + { + // Stop the specified database copy + context.StopDatabaseCopy( + databaseCopy, + this.ForcedTermination.IsPresent); + } + catch (Exception ex) + { + SqlDatabaseExceptionHandler.WriteErrorDetails( + this, + context.ClientRequestId, + ex); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Firewall/Cmdlet/GetAzureSqlDatabaseServerFirewallRule.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Firewall/Cmdlet/GetAzureSqlDatabaseServerFirewallRule.cs new file mode 100644 index 000000000000..e15eaff262f3 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Firewall/Cmdlet/GetAzureSqlDatabaseServerFirewallRule.cs @@ -0,0 +1,119 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Model; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Properties; +using Microsoft.WindowsAzure.Management.Sql; +using Microsoft.WindowsAzure.Management.Sql.Models; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Firewall.Cmdlet +{ + /// + /// Retrieves a list of firewall rule from a Microsoft Azure SQL Database server in the selected subscription. + /// + [Cmdlet(VerbsCommon.Get, "AzureSqlDatabaseServerFirewallRule", ConfirmImpact = ConfirmImpact.None)] + public class GetAzureSqlDatabaseServerFirewallRule : SqlDatabaseCmdletBase + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "SQL Database server name.")] + [ValidateNotNullOrEmpty] + public string ServerName + { + get; + set; + } + + [Parameter(ValueFromPipelineByPropertyName = true, HelpMessage = "SQL Database server firewall rule name.")] + [ValidateNotNullOrEmpty] + public string RuleName + { + get; + set; + } + + /// + /// Retrieves one or more firewall rules on the specified server. + /// + /// The name of the server to retrieve firewall rules for. + /// + /// The specific name of the rule to retrieve, or null to + /// retrieve all rules on the specified server. + /// + /// A list of firewall rules on the server. + internal IEnumerable GetAzureSqlDatabaseServerFirewallRuleProcess( + string serverName, + string ruleName) + { + // Get the SQL management client for the current subscription + SqlManagementClient sqlManagementClient = GetCurrentSqlClient(); + + // Retrieve the list of databases + FirewallRuleListResponse response = sqlManagementClient.FirewallRules.List(serverName); + IEnumerable firewallRules = response.FirewallRules; + + if (!string.IsNullOrEmpty(ruleName)) + { + // Firewall rule name is specified, find the one + // with the specified rule name and return that. + firewallRules = firewallRules.Where(p => p.Name == ruleName); + if (!firewallRules.Any()) + { + throw new ItemNotFoundException(string.Format( + CultureInfo.InvariantCulture, + Resources.GetAzureSqlDatabaseServerFirewallRuleNotFound, + ruleName, + serverName)); + } + } + else + { + // Firewall rule name is not specified, return all + // firewall rules. + } + + IEnumerable processResult = firewallRules.Select(p => new SqlDatabaseServerFirewallRuleContext() + { + OperationDescription = CommandRuntime.ToString(), + OperationStatus = Services.Constants.OperationSuccess, + OperationId = response.RequestId, + ServerName = serverName, + RuleName = p.Name, + StartIpAddress = p.StartIPAddress, + EndIpAddress = p.EndIPAddress + }); + + return processResult; + } + + /// + /// Process the command. + /// + public override void ExecuteCmdlet() + { + try + { + var rules = this.GetAzureSqlDatabaseServerFirewallRuleProcess(this.ServerName, this.RuleName); + this.WriteObject(rules, true); + } + catch (Exception ex) + { + this.WriteErrorDetails(ex); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Firewall/Cmdlet/NewAzureSqlDatabaseServerFirewallRule.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Firewall/Cmdlet/NewAzureSqlDatabaseServerFirewallRule.cs new file mode 100644 index 000000000000..5a01676de521 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Firewall/Cmdlet/NewAzureSqlDatabaseServerFirewallRule.cs @@ -0,0 +1,239 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Model; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Properties; +using Microsoft.WindowsAzure.Management.Sql; +using Microsoft.WindowsAzure.Management.Sql.Models; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Firewall.Cmdlet +{ + /// + /// Creates a new firewall rule for a Microsoft Azure SQL Database server in the selected subscription. + /// + [Cmdlet(VerbsCommon.New, "AzureSqlDatabaseServerFirewallRule", + DefaultParameterSetName = IpRangeParameterSet, + SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Low)] + public class NewAzureSqlDatabaseServerFirewallRule : SqlDatabaseCmdletBase + { + /// + /// The default rule name for allowing all Azure services. This is used when a + /// rule name is not specified for the AllowAllAzureServicesParameterSet parameter + /// set + /// + private const string AllowAllAzureServicesRuleName = "AllowAllAzureServices"; + + /// + /// The special IP for the beginning and ending of the firewall rule that will + /// allow all azure services to connect to the server. + /// + private const string AllowAzureServicesRuleAddress = "0.0.0.0"; + + #region Parameter Sets + + /// + /// Parameter set that uses an IP Range + /// + internal const string IpRangeParameterSet = "IpRange"; + + /// + /// Parameter set for allowing all azure services + /// + internal const string AllowAllAzureServicesParameterSet = "AllowAllAzureServices"; + + #endregion + + /// + /// Gets or sets the name of the server to connect add the firewall rule to + /// + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + HelpMessage = "SQL Database server name.")] + [ValidateNotNullOrEmpty] + public string ServerName + { + get; + set; + } + + /// + /// Gets or sets the name of the fire wall rule + /// + [Parameter(Mandatory = true, ParameterSetName = IpRangeParameterSet, + HelpMessage = "SQL Database server firewall rule name.")] + [Parameter(Mandatory = false, ParameterSetName = AllowAllAzureServicesParameterSet, + HelpMessage = "SQL Database server firewall rule name.")] + [ValidateNotNullOrEmpty] + public string RuleName + { + get; + set; + } + + /// + /// Gets or sets the starting IP address for the rule + /// + [Parameter(Mandatory = true, HelpMessage = "Start of the IP Range.", + ParameterSetName = IpRangeParameterSet)] + [ValidateNotNullOrEmpty] + public string StartIpAddress + { + get; + set; + } + + /// + /// Gets or sets the ending IP address for the firewall rule + /// + [Parameter(Mandatory = true, HelpMessage = "End of the IP Range.", + ParameterSetName = IpRangeParameterSet)] + [ValidateNotNullOrEmpty] + public string EndIpAddress + { + get; + set; + } + + /// + /// Gets or sets whether or not to allow all Microsoft Azure services to connect + /// + [Parameter(Mandatory = true, HelpMessage = "Allow all Azure services access to the server.", + ParameterSetName = AllowAllAzureServicesParameterSet)] + [ValidateNotNullOrEmpty] + public SwitchParameter AllowAllAzureServices + { + get; + set; + } + + /// + /// Gets or sets whether or not to force the operation to proceed. + /// + [Parameter(HelpMessage = "Do not confirm on the creation of the firewall rule")] + public SwitchParameter Force + { + get; + set; + } + + /// + /// Creates a new firewall rule on the specified server. + /// + /// The parameter set for the command. + /// The name of the server in which to create the firewall rule. + /// The name of the new firewall rule. + /// The starting IP address for the firewall rule. + /// The ending IP address for the firewall rule. + /// The context to the newly created firewall rule. + internal SqlDatabaseServerFirewallRuleContext NewAzureSqlDatabaseServerFirewallRuleProcess( + string parameterSetName, + string serverName, + string ruleName, + string startIpAddress, + string endIpAddress) + { + // Get the SQL management client for the current subscription + SqlManagementClient sqlManagementClient = GetCurrentSqlClient(); + + // Create the firewall rule + FirewallRuleCreateResponse response = sqlManagementClient.FirewallRules.Create( + serverName, + new FirewallRuleCreateParameters() + { + Name = ruleName, + StartIPAddress = startIpAddress, + EndIPAddress = endIpAddress, + }); + + SqlDatabaseServerFirewallRuleContext operationContext = new SqlDatabaseServerFirewallRuleContext() + { + OperationDescription = CommandRuntime.ToString(), + OperationStatus = Services.Constants.OperationSuccess, + OperationId = response.RequestId, + ServerName = serverName, + RuleName = ruleName, + StartIpAddress = response.FirewallRule.StartIPAddress, + EndIpAddress = response.FirewallRule.EndIPAddress, + }; + + return operationContext; + } + + /// + /// Process the command. + /// + public override void ExecuteCmdlet() + { + // Do nothing if force is not specified and user cancelled the operation + string verboseDescription = string.Format( + CultureInfo.InvariantCulture, + Resources.NewAzureSqlDatabaseServerFirewallRuleDescription, + this.RuleName, + this.ServerName); + + string verboseWarning = string.Format( + CultureInfo.InvariantCulture, + Resources.NewAzureSqlDatabaseServerFirewallRuleWarning, + this.RuleName, + this.ServerName); + + if (!this.Force.IsPresent && + !this.ShouldProcess(verboseDescription, verboseWarning, Resources.ShouldProcessCaption)) + { + return; + } + + try + { + SqlDatabaseServerFirewallRuleContext context = null; + switch (this.ParameterSetName) + { + case IpRangeParameterSet: + context = this.NewAzureSqlDatabaseServerFirewallRuleProcess( + this.ParameterSetName, + this.ServerName, + this.RuleName, + this.StartIpAddress, + this.EndIpAddress); + break; + + case AllowAllAzureServicesParameterSet: + // Determine which rule name to use. + string ruleName = AllowAllAzureServicesRuleName; + if (this.MyInvocation.BoundParameters.ContainsKey("RuleName")) + { + ruleName = this.RuleName; + } + + // Create the rule + context = this.NewAzureSqlDatabaseServerFirewallRuleProcess( + this.ParameterSetName, + this.ServerName, + ruleName, + AllowAzureServicesRuleAddress, + AllowAzureServicesRuleAddress); + break; + } + + this.WriteObject(context, true); + } + catch (Exception ex) + { + this.WriteErrorDetails(ex); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Firewall/Cmdlet/RemoveAzureSqlDatabaseServerFirewallRule.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Firewall/Cmdlet/RemoveAzureSqlDatabaseServerFirewallRule.cs new file mode 100644 index 000000000000..fd0a7adf9e4d --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Firewall/Cmdlet/RemoveAzureSqlDatabaseServerFirewallRule.cs @@ -0,0 +1,107 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Model; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Properties; +using Microsoft.WindowsAzure.Management.Sql; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Firewall.Cmdlet +{ + /// + /// Deletes a firewall rule from a Microsoft Azure SQL Database server in the selected subscription. + /// + [Cmdlet(VerbsCommon.Remove, "AzureSqlDatabaseServerFirewallRule", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] + public class RemoveAzureSqlDatabaseServerFirewallRule : SqlDatabaseCmdletBase + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "SQL Database server name.")] + [ValidateNotNullOrEmpty] + public string ServerName + { + get; + set; + } + + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "SQL Database server firewall rule name.")] + [ValidateNotNullOrEmpty] + public string RuleName + { + get; + set; + } + + [Parameter(HelpMessage = "Do not confirm on the creation of the firewall rule")] + public SwitchParameter Force + { + get; + set; + } + + /// + /// Removes a new firewall rule on the specified server. + /// + /// + /// The name of the server containing the firewall rule. + /// + /// + /// The name of the firewall rule to remove. + /// + /// The context to this operation. + internal SqlDatabaseServerOperationContext RemoveAzureSqlDatabaseServerFirewallRuleProcess(string serverName, string ruleName) + { + // Do nothing if force is not specified and user cancelled the operation + if (!Force.IsPresent && + !ShouldProcess( + string.Format(CultureInfo.InvariantCulture, Resources.RemoveAzureSqlDatabaseServerFirewallRuleDescription, ruleName, serverName), + string.Format(CultureInfo.InvariantCulture, Resources.RemoveAzureSqlDatabaseServerFirewallRuleWarning, ruleName, serverName), + Resources.ShouldProcessCaption)) + { + return null; + } + + // Get the SQL management client for the current subscription + SqlManagementClient sqlManagementClient = GetCurrentSqlClient(); + + // Delete the specified firewall rule. + OperationResponse response = sqlManagementClient.FirewallRules.Delete(serverName, ruleName); + + SqlDatabaseServerOperationContext operationContext = new SqlDatabaseServerOperationContext() + { + OperationStatus = Services.Constants.OperationSuccess, + OperationDescription = CommandRuntime.ToString(), + OperationId = response.RequestId, + ServerName = serverName + }; + + return operationContext; + } + + /// + /// Process the command. + /// + public override void ExecuteCmdlet() + { + try + { + this.RemoveAzureSqlDatabaseServerFirewallRuleProcess(this.ServerName, this.RuleName); + } + catch (Exception ex) + { + this.WriteErrorDetails(ex); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Firewall/Cmdlet/SetAzureSqlDatabaseServerFirewallRule.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Firewall/Cmdlet/SetAzureSqlDatabaseServerFirewallRule.cs new file mode 100644 index 000000000000..240565047467 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Firewall/Cmdlet/SetAzureSqlDatabaseServerFirewallRule.cs @@ -0,0 +1,143 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Model; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Properties; +using Microsoft.WindowsAzure.Management.Sql; +using Microsoft.WindowsAzure.Management.Sql.Models; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Firewall.Cmdlet +{ + /// + /// Update an existing firewall rule for a Microsoft Azure SQL Database server in the selected subscription. + /// + [Cmdlet(VerbsCommon.Set, "AzureSqlDatabaseServerFirewallRule", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Low)] + public class SetAzureSqlDatabaseServerFirewallRule : SqlDatabaseCmdletBase + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "SQL Database server name.")] + [ValidateNotNullOrEmpty] + public string ServerName + { + get; + set; + } + + [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "SQL Database server firewall rule name.")] + [ValidateNotNullOrEmpty] + public string RuleName + { + get; + set; + } + + [Parameter(Mandatory = true, HelpMessage = "Start of the IP Range.", ParameterSetName = "IpRange")] + [ValidateNotNullOrEmpty] + public string StartIpAddress + { + get; + set; + } + + [Parameter(Mandatory = true, HelpMessage = "End of the IP Range.", ParameterSetName = "IpRange")] + [ValidateNotNullOrEmpty] + public string EndIpAddress + { + get; + set; + } + + [Parameter(HelpMessage = "Do not confirm on the creation of the firewall rule")] + public SwitchParameter Force + { + get; + set; + } + + /// + /// Updates a firewall rule on the specified server. + /// + /// The name of the server containing the firewall rule. + /// The name of the firewall rule to update. + /// The starting IP address for the firewall rule. + /// The ending IP address for the firewall rule. + /// The updated firewall rule. + internal SqlDatabaseServerFirewallRuleContext SetAzureSqlDatabaseServerFirewallRuleProcess( + string serverName, + string ruleName, + string startIpAddress, + string endIpAddress) + { + // Do nothing if force is not specified and user cancelled the operation + if (!Force.IsPresent && + !ShouldProcess( + string.Format(CultureInfo.InvariantCulture, Resources.SetAzureSqlDatabaseServerFirewallRuleDescription, ruleName, serverName), + string.Format(CultureInfo.InvariantCulture, Resources.SetAzureSqlDatabaseServerFirewallRuleWarning, ruleName, serverName), + Resources.ShouldProcessCaption)) + { + return null; + } + + // Get the SQL management client for the current subscription + SqlManagementClient sqlManagementClient = GetCurrentSqlClient(); + + // Update the specified firewall rule + FirewallRuleUpdateResponse response = sqlManagementClient.FirewallRules.Update( + serverName, + ruleName, + new FirewallRuleUpdateParameters() + { + Name = ruleName, + StartIPAddress = startIpAddress, + EndIPAddress = endIpAddress, + }); + + SqlDatabaseServerFirewallRuleContext operationContext = new SqlDatabaseServerFirewallRuleContext() + { + OperationDescription = CommandRuntime.ToString(), + OperationStatus = Services.Constants.OperationSuccess, + OperationId = response.RequestId, + ServerName = serverName, + RuleName = ruleName, + StartIpAddress = response.FirewallRule.StartIPAddress, + EndIpAddress = response.FirewallRule.EndIPAddress + }; + + return operationContext; + } + + /// + /// Process the command. + /// + public override void ExecuteCmdlet() + { + try + { + SqlDatabaseServerFirewallRuleContext context = this.SetAzureSqlDatabaseServerFirewallRuleProcess( + this.ServerName, + this.RuleName, + this.StartIpAddress, + this.EndIpAddress); + + this.WriteObject(context, true); + } + catch (Exception ex) + { + this.WriteErrorDetails(ex); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/MSSharedLibKey.snk b/src/ServiceManagement/Sql/Commands.SqlDatabase/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ServiceManagement/Sql/Commands.SqlDatabase/MSSharedLibKey.snk differ diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Microsoft.WindowsAzure.Commands.SqlDatabase.Types.ps1xml b/src/ServiceManagement/Sql/Commands.SqlDatabase/Microsoft.WindowsAzure.Commands.SqlDatabase.Types.ps1xml new file mode 100644 index 000000000000..e0b612764a37 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Microsoft.WindowsAzure.Commands.SqlDatabase.Types.ps1xml @@ -0,0 +1,268 @@ + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Model.DatabaseCopy + + + PSStandardMembers + + + DefaultDisplayPropertySet + + SourceServerName + SourceDatabaseName + DestinationServerName + DestinationDatabaseName + IsContinuous + PercentComplete + ReplicationStateDescription + IsInterlinkConnected + IsLocalDatabaseReplicationTarget + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Model.SqlDatabaseServerContext + + + PSStandardMembers + + + DefaultDisplayPropertySet + + ServerName + Location + AdministratorLogin + Version + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Model.SqlDatabaseServerQuotaContext + + + PSStandardMembers + + + DefaultDisplayPropertySet + + Name + Value + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Model.SqlDatabaseServerFirewallRuleContext + + + PSStandardMembers + + + DefaultDisplayPropertySet + + RuleName + StartIpAddress + EndIpAddress + ServerName + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.Database + + + PSStandardMembers + + + DefaultDisplayPropertySet + + Name + CollationName + Edition + MaxSizeGB + MaxSizeBytes + ServiceObjectiveName + ServiceObjectiveAssignmentStateDescription + CreationDate + RecoveryPeriodStartDate + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.DatabaseCopy + + + PSStandardMembers + + + DefaultDisplayPropertySet + + SourceServerName + SourceDatabaseName + DestinationServerName + DestinationDatabaseName + IsContinuous + PercentComplete + ReplicationStateDescription + IsInterlinkConnected + MaximumLag + IsLocalDatabaseReplicationTarget + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.RestorableDroppedDatabase + + + PSStandardMembers + + + DefaultDisplayPropertySet + + Name + ServerName + Edition + MaxSizeBytes + CreationDate + DeletionDate + RecoveryPeriodStartDate + + + + + + + + Microsoft.WindowsAzure.Management.Sql.Models.RecoverableDatabase + + + PSStandardMembers + + + DefaultDisplayPropertySet + + Name + Edition + ServerName + LastAvailableBackupDate + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.ServerDataServiceSqlAuth + + + PSStandardMembers + + + DefaultDisplayPropertySet + + ServerName + SessionActivityId + ClientSessionId + ClientRequestId + Databases + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.ServiceObjective + + + PSStandardMembers + + + DefaultDisplayPropertySet + + Name + IsDefault + IsSystem + Enabled + DimensionSettings + Description + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.ServerQuota + + + PSStandardMembers + + + DefaultDisplayPropertySet + + Name + Value + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Services.ImportExport.ImportExportRequest + + + PSStandardMembers + + + DefaultDisplayPropertySet + + ServerName + RequestGuid + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.DatabaseOperation + + + PSStandardMembers + + + DefaultDisplayPropertySet + + DatabaseName + Name + State + PercentComplete + StartTime + LastModifyTime + + + + + + + diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Microsoft.WindowsAzure.Commands.SqlDatabase.dll-Help.psd1 b/src/ServiceManagement/Sql/Commands.SqlDatabase/Microsoft.WindowsAzure.Commands.SqlDatabase.dll-Help.psd1 new file mode 100644 index 000000000000..b35e39091c8b --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Microsoft.WindowsAzure.Commands.SqlDatabase.dll-Help.psd1 @@ -0,0 +1,86 @@ +# +# Module manifest for module 'Azure' +# +# Generated by: Microsoft Corporation +# +# Generated on: 5/23/2012 +# + +@{ + +# Version number of this module. +ModuleVersion = '0.8.8' + +# ID used to uniquely identify this module +GUID = 'D48CF693-4125-4D2D-8790-1514F44CE325' + +# Author of this module +Author = 'Microsoft Corporation' + +# Company or vendor of this module +CompanyName = 'Microsoft Corporation' + +# Copyright statement for this module +Copyright = '?Microsoft Corporation. All rights reserved.' + +# Description of the functionality provided by this module +Description = '' + +# Minimum version of the Windows PowerShell engine required by this module +PowerShellVersion = '3.0' + +# Name of the Windows PowerShell host required by this module +PowerShellHostName = '' + +# Minimum version of the Windows PowerShell host required by this module +PowerShellHostVersion = '' + +# Minimum version of the .NET Framework required by this module +DotNetFrameworkVersion = '4.0' + +# Minimum version of the common language runtime (CLR) required by this module +CLRVersion='4.0' + +# Processor architecture (None, X86, Amd64, IA64) required by this module +ProcessorArchitecture = 'None' + +# Modules that must be imported into the global environment prior to importing this module +RequiredModules = @() + +# Assemblies that must be loaded prior to importing this module +RequiredAssemblies = @() + +# Script files (.ps1) that are run in the caller's environment prior to importing this module +ScriptsToProcess = @() + +# Type files (.ps1xml) to be loaded when importing this module +TypesToProcess = @() + +# Format files (.ps1xml) to be loaded when importing this module +FormatsToProcess = @() + +# Modules to import as nested modules of the module specified in ModuleToProcess +NestedModules = '..\..\..\Package\Debug\ServiceManagement\Azure\Sql\Microsoft.WindowsAzure.Commands.SqlDatabase.dll' + +# Functions to export from this module +FunctionsToExport = '*' + +# Cmdlets to export from this module +CmdletsToExport = '*' + +# Variables to export from this module +VariablesToExport = '*' + +# Aliases to export from this module +AliasesToExport = @() + +# List of all modules packaged with this module +ModuleList = @() + +# List of all files packaged with this module +FileList = @() + +# Private data to pass to the module specified in ModuleToProcess +PrivateData = '' + +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Microsoft.WindowsAzure.Commands.SqlDatabase.dll-Help.xml b/src/ServiceManagement/Sql/Commands.SqlDatabase/Microsoft.WindowsAzure.Commands.SqlDatabase.dll-Help.xml new file mode 100644 index 000000000000..daf52ffe65e3 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Microsoft.WindowsAzure.Commands.SqlDatabase.dll-Help.xml @@ -0,0 +1,6662 @@ + + + + + Get-AzureSqlDatabase + + Returns an Azure SQL Database from the specified SQL Database Server. + + + + + Get + AzureSqlDatabase + + + + + Use the Get-AzureSqlDatabase cmdlet to retrieve a SQL Database from a SQL Database Server. You can specify the server with a SQL Database Server connection context that you create using the New-AzureSqlDatabaseServerContext cmdlet. Or, if you specify the SQL Database Server name, the cmdlet uses the current Azure subscription information to authenticate the request to access the server. +You also can retrieve a restorable dropped database by specifying the RestorableDropped parameter. You can select the database to return by specifying the name and deletion date with the DatabaseDeletionDate parameter. If you specify the RestorableDropped parameter and do not specify a database name and deletion date, then all restorable dropped databases on the specified server are returned.If the database is not specified, the Get-AzureSqlDatabase cmdlet returns all SQL Databases from the specified SQL Database Server. + + + + Get-AzureSqlDatabase + + ConnectionContext + + The connection context to a SQL Database Server from which to retrieve a SQL database. + + IServerDataServiceContext + + + Database + + A database object representing the SQL Database to be retrieved. + + Database + + + DatabaseName + + The name of the SQL Database to be retrieved. + + String + + + RestorableDropped + + If specified, the Get-AzureSqlDatabase cmdlet returns RestorableDroppedDatabase objects instead of Database objects, and the DatabaseDeletionDate parameter may be used to select a specific restorable dropped database. + + SwitchParameter + + + RestorableDroppedDatabase + + The object representing the restorable dropped database to retrieve. + + RestorableDroppedDatabase + + + DatabaseDeletionDate + + If the RestorableDropped parameter is specified, then you can use this parameter to retrieve a restorable dropped database based on the deletion date. + + DateTime + + + + Get-AzureSqlDatabase + + ServerName + + The name of the SQL Database Server containing the database to be retrieved. The cmdlet uses the current Azure subscription to access the server. + + String + + + Database + + A database object representing the SQL Database to be retrieved. + + Database + + + DatabaseName + + The name of the SQL Database to be retrieved. + + String + + + RestorableDropped + + If specified, the Get-AzureSqlDatabase cmdlet returns RestorableDroppedDatabase objects instead of Database objects, and the DatabaseDeletionDate parameter may be used to select a specific restorable dropped database. + + SwitchParameter + + + RestorableDroppedDatabase + + The object representing the restorable dropped database to retrieve. + + RestorableDroppedDatabase + + + DatabaseDeletionDate + + If the RestorableDropped parameter is specified, then you can use this parameter to retrieve a restorable dropped database based on the deletion date. + + DateTime + + + + + + ConnectionContext + + The connection context to a SQL Database Server from which to retrieve a SQL database. + + IServerDataServiceContext + + IServerDataServiceContext + + + + + + Database + + A database object representing the SQL Database to be retrieved. + + Database + + Database + + + + + + DatabaseName + + The name of the SQL Database to be retrieved. + + String + + String + + + + + + RestorableDropped + + If specified, the Get-AzureSqlDatabase cmdlet returns RestorableDroppedDatabase objects instead of Database objects, and the DatabaseDeletionDate parameter may be used to select a specific restorable dropped database. + + SwitchParameter + + SwitchParameter + + + + + + RestorableDroppedDatabase + + The object representing the restorable dropped database to retrieve. + + RestorableDroppedDatabase + + RestorableDroppedDatabase + + + + + + DatabaseDeletionDate + + If the RestorableDropped parameter is specified, then you can use this parameter to retrieve a restorable dropped database based on the deletion date. + + DateTime + + DateTime + + + + + + ServerName + + The name of the SQL Database Server containing the database to be retrieved. The cmdlet uses the current Azure subscription to access the server. + + String + + String + + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.Database + + + + + + + + + + + + IEnumerable<Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.Database> + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> C:\PS>Get-AzureSqlDatabase -ServerName "lpqd0zbr8y" + + This example returns all the databases on the SQL Database Server, "lpqd0zbr8y". + + + + + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> C:\PS>Get-AzureSqlDatabase -ServerName "lpqd0zbr8y" -RestorableDropped + + This example returns all the restorable dropped databases on the SQL Database Server, "lpqd0zbr8y". + + + + + + + + + -------------------------- EXAMPLE 3 -------------------------- + + + + PS C:\> C:\PS>$database1 = Get-AzureSqlDatabase -ConnectionContext $ctx -DatabaseName "Database1" + + This example returns the database, "Database1", from the SQL Database Server specified by the connection context “$ctx”. + + + + + + + + + -------------------------- EXAMPLE 4 -------------------------- + + + + PS C:\> C:\PS>$database1 = Get-AzureSqlDatabase -ServerName "lpqd0zbr8y" -DatabaseName "Database1" + + This example returns the database, "Database1", from the SQL Database Server, "lpqd0zbr8y". + + + + + + + + + -------------------------- EXAMPLE 5 -------------------------- + + + + PS C:\> C:\PS>$droppedDB = Get-AzureSqlDatabase -ServerName "lpqd0zbr8y" -DatabaseName "Database1" -DatabaseDeletionDate "2012-11-09T22:59:43.000Z" -RestorableDropped + + This example returns the restorable dropped database, "Database1", that was deleted on 11/9/2012 from SQL Database Server, "lpqd0zbr8y". + + + + + + + + + + + New-AzureSqlDatabase + + + + New-AzureSqlDatabaseServerContext + + + + Remove-AzureSqlDatabase + + + + Set-AzureSqlDatabase + + + + + + + + Get-AzureSqlDatabaseCopy + + Checks the status of one or more copy relationships that are active on a specified server. This cmdlet is supported on both the source and target servers. + + + + + Get + AzureSqlDatabaseCopy + + + + + The Get-AzureSqlDatabaseCopy cmdlet checks for the status of one or more active copy relationships. You can check a specific copy relationship, all copy relationships, or a filtered list of copy relationships, such as all copies on a specific target server. This cmdlet is supported on a source or target server. +Get-AzureSqlDatabaseCopy is synchronous and blocks the application until it returns a status object. +-PartnerServer and -PartnerDatabase are optional. If either is omitted, Get-AzureSqlDatabaseCopy returns a table of results. If both parameters are specified, Get-AzureSqlDatabaseCopy returns the status on only the specified database on the specified target server. + + + + Get-AzureSqlDatabaseCopy + + ServerName + + The name of the SQL Database Server from which to retrieve the database copy. + + String + + + DatabaseName + + The name of the source database. + + String + + + PartnerServer + + The name of a target server. If a specified server is not found in the sys.dm_database_copies dynamic management view, an empty status object is returned. + + String + + + PartnerDatabase + + The name of a given replica database. If a specified database is not found in the sys.dm_database_copies dynamic management view, an empty status object is returned. + + String + + + + Get-AzureSqlDatabaseCopy + + ServerName + + The name of the SQL Database Server from which to retrieve the database copy. + + String + + + DatabaseCopy + + An object that represents the copy of the database whose copy status is to be returned. DatabaseCopy can accept an array that is passed using the PowerShell pipeline. + + DatabaseCopy + + + + Get-AzureSqlDatabaseCopy + + ServerName + + The name of the SQL Database Server from which to retrieve the database copy. + + String + + + Database + + A single object that represents the database whose copy status is to be returned. + + Database + + + PartnerServer + + The name of a target server. If a specified server is not found in the sys.dm_database_copies dynamic management view, an empty status object is returned. + + String + + + PartnerDatabase + + The name of a given replica database. If a specified database is not found in the sys.dm_database_copies dynamic management view, an empty status object is returned. + + String + + + + + + ServerName + + The name of the SQL Database Server from which to retrieve the database copy. + + String + + String + + + + + + DatabaseName + + The name of the source database. + + String + + String + + + + + + PartnerServer + + The name of a target server. If a specified server is not found in the sys.dm_database_copies dynamic management view, an empty status object is returned. + + String + + String + + + + + + PartnerDatabase + + The name of a given replica database. If a specified database is not found in the sys.dm_database_copies dynamic management view, an empty status object is returned. + + String + + String + + + + + + DatabaseCopy + + An object that represents the copy of the database whose copy status is to be returned. DatabaseCopy can accept an array that is passed using the PowerShell pipeline. + + DatabaseCopy + + DatabaseCopy + + + + + + Database + + A single object that represents the database whose copy status is to be returned. + + Database + + Database + + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Model.DatabaseCopy + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Model.DatabaseCopy + + + + + + + + + + + + + + Authentication: This cmdlet requires certificate-based authentication. For an example of how to use certificate-based authentication to set the current subscription, see the Get-Help topic for the New-AzureSqlDatabaseServerContext cmdlet. + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\>Get-AzureSqlDatabaseCopy -ServerName "lpqd0zbr8y" -DatabaseName "Orders" -PartnerServer "bk0b8kf658" + + This example returns the status of the database, "Orders", on the server, "lpqd0zbr8y". The optional -PartnerServer parameter restricts this command to the "bk0b8kf658" target server. + + + + + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\>$myDbCopy = Start-AzureSqlDatabaseCopy -ServerName "lpqd0zbr8y" -DatabaseName "Orders" -PartnerServer "bk0b8kf658" -ContinuousCopy +PS C:\>Get-AzureSqlDatabaseCopy -ServerName "lpqd0zbr8y" -DatabaseCopy $myDbCopy + + This example starts a continuous copy relationship on the "Orders" database, and then gets the status of the copy. + + + + + + + + + + + Start-AzureSqlDatabaseCopy + + + + Stop-AzureSqlDatabaseCopy + + + + + + + + Get-AzureSqlDatabaseImportExportStatus + + Returns the status of an import or export operation between Azure blob storage and an Azure SQL Database. + + + + + Get + AzureSqlDatabaseImportExportStatus + + + + + This cmdlet returns the status of an import or export request initiated by the Start-AzureSqlDatabaseImport or Start-AzureSqlDatabaseExport cmdlet. You can specify the request object with the Request parameter, or you can identify the request with the RequestId parameter along with the Username, Password, and ServerName parameters. + + + + Get-AzureSqlDatabaseImportExportStatus + + Username + + If RequestId is specified, the user name required to connect to the Azure SQL Database Server. + + String + + + Password + + If RequestId is specified, the password required to connect to the Azure SQL Database Server. + + String + + + ServerName + + If RequestId is specified, the name of the Azure SQL Database Server. + + String + + + RequestId + + The GUID of the import or export operation for which to return status. This parameter requires the UserName, Password, and ServerName parameters. + + String + + + + Get-AzureSqlDatabaseImportExportStatus + + Request + + The ImportExportRequest object representing the import or export request, as returned by the Start-AzureSqlDatabaseImport or Start-AzureSqlDatabaseExport cmdlet. + + ImportExportRequest + + + + + + Username + + If RequestId is specified, the user name required to connect to the Azure SQL Database Server. + + String + + String + + + + + + Password + + If RequestId is specified, the password required to connect to the Azure SQL Database Server. + + String + + String + + + + + + ServerName + + If RequestId is specified, the name of the Azure SQL Database Server. + + String + + String + + + + + + RequestId + + The GUID of the import or export operation for which to return status. This parameter requires the UserName, Password, and ServerName parameters. + + String + + String + + + + + + Request + + The ImportExportRequest object representing the import or export request, as returned by the Start-AzureSqlDatabaseImport or Start-AzureSqlDatabaseExport cmdlet. + + ImportExportRequest + + ImportExportRequest + + + + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Services.ImportExport.StatusInfo + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> C:\PS>$exportRequest = Start-AzureSqlDatabaseExport -SqlConnectionContext $SqlCtx -StorageContainer $Container -DatabaseName $DatabaseName -BlobName $blobName +C:\PS>Get-AzureSqlDatabaseImportExportStatus -Request $exportRequest + + This example returns the status of an export request + + + + + + + + + + + Start-AzureSqlDatabaseExport + + + + Start-AzureSqlDatabaseImport + + + + + + + + Get-AzureSqlDatabaseOperation + + Returns the status of database operations on the specified Azure SQL Database Server. + + + + + Get + AzureSqlDatabaseOperation + + + + + If the user specifies only a ServerName or ConnectionContext, then all the database operations for the server are returned. If the user specifies a database using Database or DatabaseName (along with ServerName or ConnectionContext), then all the operations for the specified database are returned. If the user specifies an OperationGUID (along with ServerName or ConnectionContext), then just the single database operation is returned. + + + + Get-AzureSqlDatabaseOperation + + ConnectionContext + + The connection context to a SQL Database Server. + + IServerDataServiceContext + + + Database + + A database object representing a SQL Database. If this parameter is specified then ServerName or ConnectionContext must also be specified. + + Database + + + DatabaseName + + The name of a SQL Database. If this parameter is specified then ServerName or ConnectionContext must also be specified. + + String + + + OperationGuid + + The operation ID representing a specific database operation for which you want status. You can obtain operation IDs by requesting all the database operations for a SQL Database or Server. If this parameter is specified then ServerName or ConnectionContext must also be specified. + + Guid + + + + Get-AzureSqlDatabaseOperation + + ServerName + + The name of a SQL Database Server. + + String + + + Database + + A database object representing a SQL Database. If this parameter is specified then ServerName or ConnectionContext must also be specified. + + Database + + + DatabaseName + + The name of a SQL Database. If this parameter is specified then ServerName or ConnectionContext must also be specified. + + String + + + OperationGuid + + The operation ID representing a specific database operation for which you want status. You can obtain operation IDs by requesting all the database operations for a SQL Database or Server. If this parameter is specified then ServerName or ConnectionContext must also be specified. + + Guid + + + + + + ConnectionContext + + The connection context to a SQL Database Server. + + IServerDataServiceContext + + IServerDataServiceContext + + + + + + Database + + A database object representing a SQL Database. If this parameter is specified then ServerName or ConnectionContext must also be specified. + + Database + + Database + + + + + + DatabaseName + + The name of a SQL Database. If this parameter is specified then ServerName or ConnectionContext must also be specified. + + String + + String + + + + + + OperationGuid + + The operation ID representing a specific database operation for which you want status. You can obtain operation IDs by requesting all the database operations for a SQL Database or Server. If this parameter is specified then ServerName or ConnectionContext must also be specified. + + Guid + + Guid + + + + + + ServerName + + The name of a SQL Database Server. + + String + + String + + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.Database + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.Database.DatabaseOperationResponseList[] + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> C:\PS>$operations = Get-AzureSqlDatabaseOperation -ConnectionContext $ctx -DatabaseName "Database1" + + This example returns the status of all database operations on the SQL Database, "Database1", on the SQL Database Server specified by the connection context “$ctx”. + + + + + + + + + + + Get-AzureSqlDatabase + + + + New-AzureSqlDatabaseServerContext + + + + + + + + Get-AzureSqlDatabaseServer + + Returns information about the Azure SQL Database Servers in the current subscription. + + + + + Get + AzureSqlDatabaseServer + + + + + If a SQL Database Server name is specified in the ServerName parameter, the cmdlet returns an object with information about the specific SQL Database Server. Otherwise, it returns information about all the SQL Database Servers. + + + + Get-AzureSqlDatabaseServer + + ServerName + + The name of the SQL Database Server for which you want to retrieve information. Specify only the server name, and not the fully qualified DNS name. If not specified, information about all the SQL Database Servers in the current subscription is returned. + + String + + + + + + ServerName + + The name of the SQL Database Server for which you want to retrieve information. Specify only the server name, and not the fully qualified DNS name. If not specified, information about all the SQL Database Servers in the current subscription is returned. + + String + + String + + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Model.SqlDatabaseServerContext + + + + + + + + + + + + IEnumerable<Microsoft.WindowsAzure.Commands.SqlDatabase.Model.SqlDatabaseServerContext> + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> Get-AzureSqlDatabaseServer + + This command returns information about all of the SQL Database Servers in the current subscription. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> Get-AzureSqlDatabaseServer -ServerName "lpqd0zbr8y" + + This command returns information about the “lpqd0zbr8y” server. + + + + + + + + + + + New-AzureSqlDatabaseServer + + + + Remove-AzureSqlDatabaseServer + + + + Set-AzureSqlDatabaseServer + + + + + + + + Get-AzureSqlDatabaseServerFirewallRule + + Returns firewall rules in the specified Azure SQL Database Server in the current subscription. + + + + + Get + AzureSqlDatabaseServerFirewallRule + + + + + If a firewall rule name is specified in the RuleName parameter, the cmdlet returns information about the specific firewall rule. Otherwise, information about all the firewall rules in the specified SQL Database Server is listed. + + + + Get-AzureSqlDatabaseServerFirewallRule + + ServerName + + The name of the SQL Database Server for which you want to retrieve the firewall rules. Specify only the server name, and not the fully qualified DNS name. + + String + + + RuleName + + The name of the firewall rule to retrieve. If not specified, information about all the firewall rules in the specified SQL Database Server is listed. + + String + + + + + + ServerName + + The name of the SQL Database Server for which you want to retrieve the firewall rules. Specify only the server name, and not the fully qualified DNS name. + + String + + String + + + + + + RuleName + + The name of the firewall rule to retrieve. If not specified, information about all the firewall rules in the specified SQL Database Server is listed. + + String + + String + + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Model.SqlDatabaseServerFirewallRuleContext + + + + + + + + + + + + IEnumerable<Microsoft.WindowsAzure.Commands.SqlDatabase.Model.SqlDatabaseServerFirewallRuleContext> + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> Get-AzureSqlDatabaseServerFirewallRule -ServerName "lpqd0zbr8y" + + This command returns all the firewall rules in the specified SQL Database Server (“lpqd0zbr8y”). + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> Get-AzureSqlDatabaseServerFirewallRule -ServerName "lpqd0zbr8y" -RuleName "myRule" + + This command returns the specified firewall rule (“myRule”) in the specified SQL Database Server (“lpqd0zbr8y”). + + + + + + + + + + + New-AzureSqlDatabaseServerFirewallRule + + + + Remove-AzureSqlDatabaseServerFirewallRule + + + + Set-AzureSqlDatabaseServerFirewallRule + + + + + + + + Get-AzureSqlDatabaseServerQuota + + Returns the quota information for a specified Azure SQL Database Server. + + + + + Get + AzureSqlDatabaseServerQuota + + + + + The user specifies the server by supplying a connection context or the server name. If a quota name is not specified, then all the quota information for the server is returned. + + + + Get-AzureSqlDatabaseServerQuota + + ConnectionContext + + The connection context to the specified SQL Database Server. + + IServerDataServiceContext + + + QuotaName + + The name of the quota value to be retrieved. If a quota name is not specified, then all the quota information for the server is returned. + + String + + + + Get-AzureSqlDatabaseServerQuota + + ServerName + + The name of the SQL Database Server. + + String + + + QuotaName + + The name of the quota value to be retrieved. If a quota name is not specified, then all the quota information for the server is returned. + + String + + + + + + ConnectionContext + + The connection context to the specified SQL Database Server. + + IServerDataServiceContext + + IServerDataServiceContext + + + + + + QuotaName + + The name of the quota value to be retrieved. If a quota name is not specified, then all the quota information for the server is returned. + + String + + String + + + + + + ServerName + + The name of the SQL Database Server. + + String + + String + + + + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.ServerQuota[] + + + + + + + + + + + + + + Authentication: This cmdlet can use either SQL Server authentication or certificate-based authentication. For examples of setting up authentication, see the Get-Help topic for the New-AzureSqlDatabaseServerContext cmdlet. + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> C:\PS>$quotaPremium = GetAzureSqlDatabaseServerQuota $ctx QuotaName "Premium_Databases" + + This example returns the quota, "Premium_Databases", from the Azure SQL Database Server specified by the connection $ctx. + + + + + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> C:\PS>$quotaList = GetAzureSqlDatabaseServerQuota $ctx + + This example returns a list of all quota values from the Azure SQL Database Server specified by the connection $ctx. + + + + + + + + + + + New-AzureSqlDatabaseServerContext + + + + + + + + Get-AzureSqlDatabaseServiceObjective + + Returns a service objective for the specified Azure SQL Database Server. + + + + + Get + AzureSqlDatabaseServiceObjective + + + + + If the service objective is not specified, this cmdlet returns all service objectives for the specified Azure SQL Database Server.Note: This cmdlet applies to Basic, Standard, and Premium service tiers, which are available in preview. To learn more about the preview, please see http://go.microsoft.com/fwlink/p/?LinkId=308949. + + + + Get-AzureSqlDatabaseServiceObjective + + Context + + The connection context to the specified SQL Database Server. + + IServerDataServiceContext + + + ServiceObjective + + An object representing the service objective to return. If not specified, then all the service objectives for the SQL Database Server are returned. + + ServiceObjective + + + ServiceObjectiveName + + The name of the service objective to return. If not specified, then all the service objectives for the SQL Database Server are returned. + + String + + + + Get-AzureSqlDatabaseServiceObjective + + ServerName + + + + String + + + ServiceObjective + + An object representing the service objective to return. If not specified, then all the service objectives for the SQL Database Server are returned. + + ServiceObjective + + + ServiceObjectiveName + + The name of the service objective to return. If not specified, then all the service objectives for the SQL Database Server are returned. + + String + + + + + + Context + + The connection context to the specified SQL Database Server. + + IServerDataServiceContext + + IServerDataServiceContext + + + + + + ServiceObjective + + An object representing the service objective to return. If not specified, then all the service objectives for the SQL Database Server are returned. + + ServiceObjective + + ServiceObjective + + + + + + ServiceObjectiveName + + The name of the service objective to return. If not specified, then all the service objectives for the SQL Database Server are returned. + + String + + String + + + + + + ServerName + + + + String + + String + + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.ServiceObjective + + + + + + + + + + + + IEnumerable<Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.ServiceObjective> + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> C:\PS>Get-AzureSqlDatabaseServiceObjective -Context $ctx + + This example displays all the service objectives for the SQL Database Server specified by the connection context $ctx. + + + + + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> C:\PS>Get-AzureSqlDatabaseServiceObjective -ServerName "server1" + + This example displays all the service objectives for the SQL Database Server "server1", using certificate authentication. + + + + + + + + + + + Online Version: + + + + + + + + Get-AzureSqlRecoverableDatabase + + Gets a list of databases that can be recovered. + + + + + Get + AzureSqlRecoverableDatabase + + + + + This cmdlet can be used to get a list of databases that can be recovered when the database server is no longer available. The database can be recovered to the same server as the source database or to a different server. + + + + Get-AzureSqlRecoverableDatabase + + ServerName + + The name of the server where the database is live and running, or the name of the server where the database was running before it was deleted. + + String + + + + Get-AzureSqlRecoverableDatabase + + ServerName + + The name of the server where the database is live and running, or the name of the server where the database was running before it was deleted. + + String + + + DatabaseName + + The name of the database you want to recover. + + String + + + + Get-AzureSqlRecoverableDatabase + + Database + + The database object representing the database you want to retrieve + + RecoverableDatabase + + + + + + ServerName + + The name of the server where the database is live and running, or the name of the server where the database was running before it was deleted. + + String + + String + + + + + + DatabaseName + + The name of the database you want to recover. + + String + + String + + + + + + Database + + The database object representing the database you want to retrieve + + RecoverableDatabase + + RecoverableDatabase + + + + + + + + + Microsoft.WindowsAzure.Management.Sql.Models.RecoverableDatabase + + + + + + + + + + + + Microsoft.WindowsAzure.Management.Sql.Models.RecoverableDatabase + + + + + + + + + + + + + + You must use certificate based authentication to run this cmdlet. The following commands need to be run to on the machine you are using to run the command from: +C:\PS>$subId = <Subscription ID> + +C:\PS>$thumbprint = <Certificate Thumbprint> +C:\PS>$myCert = Get-Item Cert:\CurrentUser\My\$thumbprint +C:\PS>Set-AzureSubscription -SubscriptionName "mySubscription" -SubscriptionId $subId -Certificate $myCert +C:\PS>Select-AzureSubscription -SubscriptionName "mySubscription" + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\>Get-AzureSqlRecoverableDatabase -ServerName "server1" + + This example lists all the recoverable databases on the source server. + + + + + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\>$mydb = Get-AzureSqlRecoverableDatabase -ServerName "server1" -DatabaseName "mydb" +# refresh +PS C:\>$mydb = $mydb | Get-AzureSqlRecoverableDatabase + + This example retrieves a specific database on source server. + + + + + + + + + + + Start-AzureSqlDatabaseRecovery + + + + + + + + New-AzureSqlDatabase + + Creates a new Azure SQL Database in the specified SQL Database Server. + + + + + New + AzureSqlDatabase + + + + + The New-AzureSqlDatabase cmdlet creates a new SQL Database in the specified SQL Database Server. You can specify the server with a SQL Database Server connection context that you create using the New-AzureSqlDatabaseServerContext cmdlet. Or, if you specify the SQL Database Server name, the cmdlet uses the current Azure subscription information to authenticate the request to access the server. +When you create a new database by specifying a SQL Database Server, the New-AzureSqlDatabase cmdlet creates a temporary connection context using the specified SQL Database Server name and the current Azure subscription information to perform the operation. + + + + New-AzureSqlDatabase + + ConnectionContext + + The connection context to a SQL Database Server where you want to create new SQL Database. + + IServerDataServiceContext + + + DatabaseName + + The name of the new database. + + String + + + Collation + + Collation for the newly created SQL Database. + + String + + + Edition + + The edition for the SQL Database. Acceptable values are Web, Business, Basic, Standard, and Premium. The default value is Web. +Note: The Premium value of this parameter is a feature which is currently available in preview. To learn more about the preview, please see http://go.microsoft.com/fwlink/p/?LinkId=308949. + + DatabaseEdition + + + ServiceObjective + + If specified, an object representing the new service objective for this database. This value represents the level of resources assigned to this database.Note: This parameter is a feature of the preview of Azure SQL Database Premium Edition. Only participants in the preview are able to use this parameter. To learn more about the preview, please see http://go.microsoft.com/fwlink/p/?LinkId=308949. + + ServiceObjective + + + MaxSizeGB + + The maximum size for the database in gigabytes. You can specify either this parameter or MaxSizeBytes. The acceptable values differ based on edition. +Web Edition values: 1 or 5 +Business Edition values: 10, 20, 30, 40, 50, 100, or 150 + + Int32 + + + MaxSizeBytes + + The maximum size for the database in bytes. You can specify either this parameter or MaxSizeGB. See the MaxSizeGB parameter for acceptable values based on edition. + + Int64 + + + Force + + Allows the action to complete without prompting the user for confirmation. + + SwitchParameter + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + New-AzureSqlDatabase + + ServerName + + The SQL Database Server name where you want to create new SQL Database. + + String + + + DatabaseName + + The name of the new database. + + String + + + Collation + + Collation for the newly created SQL Database. + + String + + + Edition + + The edition for the SQL Database. Acceptable values are Web, Business, Basic, Standard, and Premium. The default value is Web. +Note: The Premium value of this parameter is a feature which is currently available in preview. To learn more about the preview, please see http://go.microsoft.com/fwlink/p/?LinkId=308949. + + DatabaseEdition + + + ServiceObjective + + If specified, an object representing the new service objective for this database. This value represents the level of resources assigned to this database.Note: This parameter is a feature of the preview of Azure SQL Database Premium Edition. Only participants in the preview are able to use this parameter. To learn more about the preview, please see http://go.microsoft.com/fwlink/p/?LinkId=308949. + + ServiceObjective + + + MaxSizeGB + + The maximum size for the database in gigabytes. You can specify either this parameter or MaxSizeBytes. The acceptable values differ based on edition. +Web Edition values: 1 or 5 +Business Edition values: 10, 20, 30, 40, 50, 100, or 150 + + Int32 + + + MaxSizeBytes + + The maximum size for the database in bytes. You can specify either this parameter or MaxSizeGB. See the MaxSizeGB parameter for acceptable values based on edition. + + Int64 + + + Force + + Allows the action to complete without prompting the user for confirmation. + + SwitchParameter + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + + + ConnectionContext + + The connection context to a SQL Database Server where you want to create new SQL Database. + + IServerDataServiceContext + + IServerDataServiceContext + + + + + + DatabaseName + + The name of the new database. + + String + + String + + + + + + Collation + + Collation for the newly created SQL Database. + + String + + String + + + + + + Edition + + The edition for the SQL Database. Acceptable values are Web, Business, Basic, Standard, and Premium. The default value is Web. +Note: The Premium value of this parameter is a feature which is currently available in preview. To learn more about the preview, please see http://go.microsoft.com/fwlink/p/?LinkId=308949. + + DatabaseEdition + + DatabaseEdition + + + + + + ServiceObjective + + If specified, an object representing the new service objective for this database. This value represents the level of resources assigned to this database.Note: This parameter is a feature of the preview of Azure SQL Database Premium Edition. Only participants in the preview are able to use this parameter. To learn more about the preview, please see http://go.microsoft.com/fwlink/p/?LinkId=308949. + + ServiceObjective + + ServiceObjective + + + + + + MaxSizeGB + + The maximum size for the database in gigabytes. You can specify either this parameter or MaxSizeBytes. The acceptable values differ based on edition. +Web Edition values: 1 or 5 +Business Edition values: 10, 20, 30, 40, 50, 100, or 150 + + Int32 + + Int32 + + + + + + MaxSizeBytes + + The maximum size for the database in bytes. You can specify either this parameter or MaxSizeGB. See the MaxSizeGB parameter for acceptable values based on edition. + + Int64 + + Int64 + + + + + + Force + + Allows the action to complete without prompting the user for confirmation. + + SwitchParameter + + SwitchParameter + + + + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + SwitchParameter + + + false + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + SwitchParameter + + + false + + + ServerName + + The SQL Database Server name where you want to create new SQL Database. + + String + + String + + + + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.Database + + + + + + + + + + + + + + To delete a database that was created by New-AzureSqlDatabase, use the Remove-AzureSqlDatabase cmdlet. + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> C:\PS>$database1 = New-AzureSqlDatabase -ConnectionContext $ctx -DatabaseName "Database1" -Edition "Business" -MaxSizeGB 50 -Collation "SQL_Latin1_General_CP1_CI_AS" + + This example creates a new SQL Database with the name, "Database1", for the specified SQL Database Server connection context “$ctx”. + + + + + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> C:\PS>$database1 = New-AzureSqlDatabase -ServerName "lpqd0zbr8y" -DatabaseName "Database1" -Edition "Business" -MaxSizeGB 50 -Collation "SQL_Latin1_General_CP1_CI_AS" + + This example creates a new database with the name, "Database1", in the specified SQL Database Server "lpqd0zbr8y". The cmdlet uses the current Azure subscription information to authenticate the request to access the server. + + + + + + + + + + + Get-AzureSqlDatabase + + + + New-AzureSqlDatabaseServerContext + + + + Remove-AzureSqlDatabase + + + + Set-AzureSqlDatabase + + + + + + + + New-AzureSqlDatabaseServer + + Creates a new Azure SQL Database Server in the current subscription. + + + + + New + AzureSqlDatabaseServer + + + + + The New-AzureSqlDatabaseServer cmdlet creates a new SQL Database Server in the current subscription. + + + + New-AzureSqlDatabaseServer + + AdministratorLogin + + Administrator account name for your new SQL Database Server. + + String + + + AdministratorLoginPassword + + Administrator account password for your new SQL Database Server. You must specify a strong password. For more information, see Strong Passwords (http://go.microsoft.com/fwlink/p/?LinkId=154152). + + String + + + Location + + Region or location where the new SQL Database Server is created. The location determines which datacenter the database will reside in. For more information, see http://azure.microsoft.com/en-us/regions/#services + + String + + + Version + + Specifies the type of SQL Database Server to create. Accepts values 1.0 or 2.0. + + Single + + + Force + + Allows the action to complete without prompting you for confirmation. + + SwitchParameter + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + + + AdministratorLogin + + Administrator account name for your new SQL Database Server. + + String + + String + + + + + + AdministratorLoginPassword + + Administrator account password for your new SQL Database Server. You must specify a strong password. For more information, see Strong Passwords (http://go.microsoft.com/fwlink/p/?LinkId=154152). + + String + + String + + + + + + Location + + Region or location where the new SQL Database Server is created. The location determines which datacenter the database will reside in. For more information, see http://azure.microsoft.com/en-us/regions/#services + + String + + String + + + + + + Version + + Specifies the type of SQL Database Server to create. Accepts values 1.0 or 2.0. + + Single + + Single + + + + + + Force + + Allows the action to complete without prompting you for confirmation. + + SwitchParameter + + SwitchParameter + + + + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + SwitchParameter + + + false + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + SwitchParameter + + + false + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Model.SqlDatabaseServerContext + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\>New-AzureSqlDatabaseServer -Location "East US" -AdministratorLogin "myLogin" -AdministratorLoginPassword "myP@ssword" + + This command creates a SQL Database Server. + + + + + + + + + + + Get-AzureSqlDatabaseServer + + + + Remove-AzureSqlDatabaseServer + + + + Set-AzureSqlDatabaseServer + + + + + + + + New-AzureSqlDatabaseServerContext + + Creates a new connection context to the specified SQL Database Server by using SQL Server authentication or certificate-based authentication. + + + + + New + AzureSqlDatabaseServerContext + + + + + Use the New-AzureSqlDatabaseServerContext cmdlet with SQL Server authentication to create a new connection context to the specified SQL Database Server by using the specified credentials. The SQL Database Server may be specified by name, by the fully-qualified name, or by URL. The credential can be specified using the Get-Credential cmdlet that prompts you to specify the user name and password in a dialog box.Use the New-AzureSqlDatabaseServerContext cmdlet with certificate-based authentication to create a new connection context to the specified SQL Database Server by using the specified Azure subscription data. The SQL Database Server may be specified by name or by the fully-qualified name. The subscription data can either be specified as a parameter or it can be retrieved from the current Azure subscription (use the Select-AzureSubscription cmdlet to select the current Azure subscription). +See the examples below of both the SQL Server and certificate-based authentication methods. + + + + New-AzureSqlDatabaseServerContext + + ServerName + + The name of the SQL Database Server. + + String + + + Credential + + A credential object that provides SQL Server authentication for the user to access the server. + + PSCredential + + + + New-AzureSqlDatabaseServerContext + + ServerName + + The name of the SQL Database Server. + + String + + + UseSubscription + + Indicates that Azure subscription will be used for creating the connection context. + + SwitchParameter + + + SubscriptionName + + The Azure subscription name to be used for creating the connection context. The subscription name specified for the parameter will be used for creating the connection context. If you do not use this parameter, the cmdlet uses the current Azure subscription (set using the Select-AzureSubscription cmdlet) to create the connection context. + + String + + + + New-AzureSqlDatabaseServerContext + + ServerName + + The name of the SQL Database Server. + + String + + + ManageUrl + + The URL to access the Azure SQL Database Management Portal for the server. + + Uri + + + Credential + + A credential object that provides SQL Server authentication for the user to access the server. + + PSCredential + + + + New-AzureSqlDatabaseServerContext + + FullyQualifiedServerName + + The fully qualified domain name (FQDN) name for the SQL Database Server. For example, ServerName.database.windows.net. + + String + + + Credential + + A credential object that provides SQL Server authentication for the user to access the server. + + PSCredential + + + + New-AzureSqlDatabaseServerContext + + FullyQualifiedServerName + + The fully qualified domain name (FQDN) name for the SQL Database Server. For example, ServerName.database.windows.net. + + String + + + UseSubscription + + Indicates that Azure subscription will be used for creating the connection context. + + SwitchParameter + + + SubscriptionName + + The Azure subscription name to be used for creating the connection context. The subscription name specified for the parameter will be used for creating the connection context. If you do not use this parameter, the cmdlet uses the current Azure subscription (set using the Select-AzureSubscription cmdlet) to create the connection context. + + String + + + + + + ServerName + + The name of the SQL Database Server. + + String + + String + + + + + + Credential + + A credential object that provides SQL Server authentication for the user to access the server. + + PSCredential + + PSCredential + + + + + + UseSubscription + + Indicates that Azure subscription will be used for creating the connection context. + + SwitchParameter + + SwitchParameter + + + + + + SubscriptionName + + The Azure subscription name to be used for creating the connection context. The subscription name specified for the parameter will be used for creating the connection context. If you do not use this parameter, the cmdlet uses the current Azure subscription (set using the Select-AzureSubscription cmdlet) to create the connection context. + + String + + String + + + + + + ManageUrl + + The URL to access the Azure SQL Database Management Portal for the server. + + Uri + + Uri + + + + + + FullyQualifiedServerName + + The fully qualified domain name (FQDN) name for the SQL Database Server. For example, ServerName.database.windows.net. + + String + + String + + + + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.IServerDataServiceContext + + + + + + + + + + + + + + If you authenticated without specifying a domain, then if you are using PowerShell 2.0, the Get-Credential cmdlet returns a backslash prepended to the username, for example, "\user" (PowerShell 3.0 does not add the backslash). This backslash is not recognized by the -Credential parameter of the New-AzureSqlDatabaseServerContext cmdlet. To remove it, use code similar to the following: +C:\PS>$cred = Get-Credential + +C:\PS>$cred = New-Object -TypeName 'System.Management.Automation.PSCredential' -ArgumentList $cred.Username.Replace("\",""),$cred.Password + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> C:\PS>$cred = Get-Credential +C:\PS>$ctx = New-AzureSqlDatabaseServerContext -ServerName "lpqd0zbr8y" -credential $cred +C:\PS>$database1 = New-AzureSqlDatabase -ConnectionContext $ctx -DatabaseName "Database1" -MaxSizeGB 50 -Collation "SQL_Latin1_General_CP1_CI_AS" + + This example uses the SQL Server authentication. +It prompts the user for server administrator credentials, connects to the specified SQL Database Server, "lpqd0zbr8y", using those credentials, and creates a new database, “Database1”, on the server. + + + + + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> C:\PS>$subId = <Subscription ID> +C:\PS>$thumbprint = <Certificate Thumbprint> +C:\PS>$myCert = Get-Item Cert:\CurrentUser\My\$thumbprint +C:\PS>Set-AzureSubscription -SubscriptionName "mySubscription" -SubscriptionId $subId -Certificate $myCert +C:\PS>Select-AzureSubscription -SubscriptionName "mySubscription" +C:\PS>$ctx = New-AzureSqlDatabaseServerContext -ServerName "lpqd0zbr8y" -UseSubscription + + This example uses the certificate-based authentication. +The first two commands set common parameters including a subscription ID and certificate for the subscription "mySubscription". These four commands need to be run once per subscription per machine. +The rest of the commands select the subscription "mySubscription" to be designated as the current subscription, and then the current subscription is used to create the connection context to the specified SQL Database Server, "lpqd0zbr8y". + + + + + + + + + + + Get-AzureSqlDatabase + + + + New-AzureSqlDatabase + + + + Remove-AzureSqlDatabase + + + + Set-AzureSqlDatabase + + + + + + + + New-AzureSqlDatabaseServerFirewallRule + + Creates a new firewall rule in the specified Azure SQL Database Server in the current subscription. + + + + + New + AzureSqlDatabaseServerFirewallRule + + + + + The New-AzureSqlDatabaseServerFirewallRule cmdlet creates a new firewall rule in the specified SQL Database Server. +Use the StartIpAddress and EndIpAddress parameters to specify a range of IP addresses that are allowed to connect to the SQL Database Server. +Use the AllowAllAzureServices parameter to allow Azure connections to the SQL Database Server. A firewall rule with starting and ending IP addresses equal to 0.0.0.0 will be created. If you do not specify a firewall rule name, a firewall rule with default name “AllowAllAzureServices” will be created. + + + + New-AzureSqlDatabaseServerFirewallRule + + ServerName + + The name of the SQL Database Server where the new firewall rule is created. Specify only the server name, and not the fully qualified DNS name. + + String + + + RuleName + + New SQL Database firewall rule name. + + String + + + StartIpAddress + + Start value of the IP address range. + + String + + + EndIpAddress + + End value of the IP address range. + + String + + + Force + + Allows the action to complete without prompting you for confirmation. + + SwitchParameter + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + New-AzureSqlDatabaseServerFirewallRule + + ServerName + + The name of the SQL Database Server where the new firewall rule is created. Specify only the server name, and not the fully qualified DNS name. + + String + + + RuleName + + New SQL Database firewall rule name. + + String + + + AllowAllAzureServices + + Allows Azure connections to the SQL Database Server. + + SwitchParameter + + + Force + + Allows the action to complete without prompting you for confirmation. + + SwitchParameter + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + + + ServerName + + The name of the SQL Database Server where the new firewall rule is created. Specify only the server name, and not the fully qualified DNS name. + + String + + String + + + + + + RuleName + + New SQL Database firewall rule name. + + String + + String + + + + + + StartIpAddress + + Start value of the IP address range. + + String + + String + + + + + + EndIpAddress + + End value of the IP address range. + + String + + String + + + + + + Force + + Allows the action to complete without prompting you for confirmation. + + SwitchParameter + + SwitchParameter + + + + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + SwitchParameter + + + false + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + SwitchParameter + + + false + + + AllowAllAzureServices + + Allows Azure connections to the SQL Database Server. + + SwitchParameter + + SwitchParameter + + + + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Model.SqlDatabaseServerFirewallRuleContext + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> New-AzureSqlDatabaseServerFirewallRule -ServerName "lpqd0zbr8y" -RuleName "myRule1" -StartIpAddress 12.1.1.1 -EndIpAddress 12.1.1.2 + + This command creates a new firewall rule (“myRule1”) in the specified SQL Database Server (“lpqd0zbr8y”) with the specified IP range values. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> New-AzureSqlDatabaseServerFirewallRule -ServerName "lpqd0zbr8y" -AllowAllAzureServices -RuleName "myRule2" + + This command creates a new firewall rule (“myRule2”) in the specified SQL Database Server (“lpqd0zbr8y”) to allow Azure connections. + + + + + + + + + -------------------------- Example 3 -------------------------- + + + + PS C:\> New-AzureSqlDatabaseServerFirewallRule -ServerName "lpqd0zbr8y" -AllowAllAzureServices + + This command creates a new firewall rule with the default firewall rule name (“AllowAllAzureServices”) in the specified SQL Database Server (“lpqd0zbr8y”) to allow Azure connections. + + + + + + + + + + + Get-AzureSqlDatabaseServerFirewallRule + + + + Remove-AzureSqlDatabaseServerFirewallRule + + + + Set-AzureSqlDatabaseServerFirewallRule + + + + + + + + Remove-AzureSqlDatabase + + Deletes a Azure SQL Database from the specified SQL Database Server connection context or SQL Database Server. + + + + + Remove + AzureSqlDatabase + + + + + The Remove-AzureSqlDatabase cmdlet deletes a SQL Database from the SQL Database Server specified by connection context or server name. You can create a SQL Database Server connection context using the New-AzureSqlDatabaseServerContext cmdlet, and then use it with this cmdlet. +When you delete a database by specifying a SQL Database Server name, the Remove-AzureSqlDatabase cmdlet uses the name and the current Azure subscription information to perform the operation. + + + + Remove-AzureSqlDatabase + + ConnectionContext + + The connection context to a SQL Database Server where you want to delete a SQL Database. + + IServerDataServiceContext + + + Database + + A database object representing the database to be removed. + + Database + + + Force + + Allows the action to complete without prompting the user for confirmation. + + SwitchParameter + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + Remove-AzureSqlDatabase + + ConnectionContext + + The connection context to a SQL Database Server where you want to delete a SQL Database. + + IServerDataServiceContext + + + DatabaseName + + The name of the SQL Database to be removed. + + String + + + Force + + Allows the action to complete without prompting the user for confirmation. + + SwitchParameter + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + Remove-AzureSqlDatabase + + ServerName + + The name of SQL Database Server where you want to delete the database. + + String + + + DatabaseName + + The name of the SQL Database to be removed. + + String + + + Force + + Allows the action to complete without prompting the user for confirmation. + + SwitchParameter + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + Remove-AzureSqlDatabase + + ServerName + + The name of SQL Database Server where you want to delete the database. + + String + + + Database + + A database object representing the database to be removed. + + Database + + + Force + + Allows the action to complete without prompting the user for confirmation. + + SwitchParameter + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + + + ConnectionContext + + The connection context to a SQL Database Server where you want to delete a SQL Database. + + IServerDataServiceContext + + IServerDataServiceContext + + + + + + Database + + A database object representing the database to be removed. + + Database + + Database + + + + + + Force + + Allows the action to complete without prompting the user for confirmation. + + SwitchParameter + + SwitchParameter + + + + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + SwitchParameter + + + false + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + SwitchParameter + + + false + + + DatabaseName + + The name of the SQL Database to be removed. + + String + + String + + + + + + ServerName + + The name of SQL Database Server where you want to delete the database. + + String + + String + + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.Database + + + + + + + + + + + + + + + + + + + + + + + + + + Because of the severity of the operation, this cmdlet prompts the user for confirmation by default. This can be overridden by using the -Force parameter. + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> C:\PS>Remove-AzureSqlDatabase -ConnectionContext $ctx -DatabaseName "Database1" + + This example removes the database "Database1" from the specified SQL Database Server connection context “$ctx”. + + + + + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> C:\PS>Remove-AzureSqlDatabase -ServerName "lpqd0zbr8y" -DatabaseName "Database1" + + This example removes the database "Database1" from the specified SQL Database Server "lpqd0zbr8y". + + + + + + + + + -------------------------- EXAMPLE 3 -------------------------- + + + + PS C:\> C:\PS>$database1 | Remove-AzureSqlDatabase -ConnectionContext $ctx +C:\PS>$database1 | Remove-AzureSqlDatabase -ServerName "lpqd0zbr8y" + + This example demonstrates the alternative method of passing the database object through the pipeline. + + + + + + + + + + + Get-AzureSqlDatabase + + + + New-AzureSqlDatabase + + + + New-AzureSqlDatabaseServerContext + + + + Set-AzureSqlDatabase + + + + + + + + Remove-AzureSqlDatabaseServer + + Deletes the specified Azure SQL Database Server from the current subscription. + + + + + Remove + AzureSqlDatabaseServer + + + + + The Remove-AzureSqlDatabaseServer cmdlet removes the specified SQL Database Server from the current subscription. It also deletes all databases under the specified SQL Database Server. + + + + Remove-AzureSqlDatabaseServer + + ServerName + + The SQL Database Server name to be deleted. Specify only the server name, and not the fully qualified DNS name. + + String + + + Force + + Allows the action to complete without prompting you for confirmation. + + SwitchParameter + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + + + ServerName + + The SQL Database Server name to be deleted. Specify only the server name, and not the fully qualified DNS name. + + String + + String + + + + + + Force + + Allows the action to complete without prompting you for confirmation. + + SwitchParameter + + SwitchParameter + + + + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + SwitchParameter + + + false + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + SwitchParameter + + + false + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Model.SqlDatabaseServerContext + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> Remove-AzureSqlDatabaseServer -ServerName "lpqd0zbr8y" + + This command deletes the specified SQL Database Server (“lpqd0zbr8y”). + + + + + + + + + + + Get-AzureSqlDatabaseServer + + + + New-AzureSqlDatabaseServer + + + + Set-AzureSqlDatabaseServer + + + + + + + + Remove-AzureSqlDatabaseServerFirewallRule + + Deletes a firewall rule from the specified Azure SQL Database Server in the current subscription. + + + + + Remove + AzureSqlDatabaseServerFirewallRule + + + + + The Remove-AzureSqlDatabaseServerFirewallRule deletes a firewall rule from the specified SQL Database Server in the current subscription. + + + + Remove-AzureSqlDatabaseServerFirewallRule + + ServerName + + The SQL Database Server name from where the firewall rule is to be deleted. Specify only the server name, and not the fully qualified DNS name. + + String + + + RuleName + + The SQL Database firewall rule name to be deleted. + + String + + + Force + + Allows the action to complete without prompting you for confirmation. + + SwitchParameter + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + + + ServerName + + The SQL Database Server name from where the firewall rule is to be deleted. Specify only the server name, and not the fully qualified DNS name. + + String + + String + + + + + + RuleName + + The SQL Database firewall rule name to be deleted. + + String + + String + + + + + + Force + + Allows the action to complete without prompting you for confirmation. + + SwitchParameter + + SwitchParameter + + + + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + SwitchParameter + + + false + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + SwitchParameter + + + false + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Model.SqlDatabaseServerFirewallRuleContext + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> Remove-AzureSqlDatabaseServerFirewallRule -ServerName "lpqd0zbr8y" -RuleName "myRule" + + This command deletes a firewall rule (“myRule”) from the specified SQL Database Server (“lpqd0zbr8y”). + + + + + + + + + + + Get-AzureSqlDatabaseServerFirewallRule + + + + New-AzureSqlDatabaseServerFirewallRule + + + + Set-AzureSqlDatabaseServerFirewallRule + + + + + + + + Set-AzureSqlDatabase + + Sets properties for a specified Azure SQL Database. + + + + + Set + AzureSqlDatabase + + + + + The Set-AzureSqlDatabase cmdlet sets properties for a SQL Database in a SQL Database Server. You can specify the database by name or pass a SQL Database object through the pipeline. You can specify the SQL Database Server with a SQL Database Server connection context that you create using the New-AzureSqlDatabaseServerContext cmdlet. Or, if you specify the name of the SQL Database Server, the cmdlet uses the current Azure subscription information to authenticate the request to access the server. + + + + Set-AzureSqlDatabase + + ConnectionContext + + The connection context to a SQL Database Server where you want to modify a SQL Database. + + IServerDataServiceContext + + + Database + + A database object representing the SQL Database to modify. + + Database + + + NewDatabaseName + + If specified, the new name of the SQL Database. + + String + + + Edition + + If specified, the new edition for the SQL Database. Acceptable values are Web, Business, Basic, Standard, and Premium. + + DatabaseEdition + + + MaxSizeGB + + If specified, the new maximum size for the database in gigabytes. You can specify either this parameter or MaxSizeBytes. The acceptable values differ based on edition. +Web Edition values: 1 or 5 +Business Edition values: 10, 20, 30, 40, 50, 100, or 150 + + Int32 + + + MaxSizeBytes + + If specified, the new maximum size for the database in bytes. You can specify either this parameter or MaxSizeGB. See the MaxSizeGB parameter for acceptable values based on edition. + + Int64 + + + ServiceObjective + + If specified, an object representing the new service objective for this database. Note: This parameter is currently available in preview. To learn more about the preview, please see http://go.microsoft.com/fwlink/p/?LinkId=308949. + + ServiceObjective + + + PassThru + + Returns the updated Azure SQL Database. + + SwitchParameter + + + Force + + Allows the action to complete without prompting you for confirmation. + + SwitchParameter + + + Sync + + + + SwitchParameter + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + Set-AzureSqlDatabase + + ConnectionContext + + The connection context to a SQL Database Server where you want to modify a SQL Database. + + IServerDataServiceContext + + + DatabaseName + + The name of the SQL Database to modify. + + String + + + NewDatabaseName + + If specified, the new name of the SQL Database. + + String + + + Edition + + If specified, the new edition for the SQL Database. Acceptable values are Web, Business, Basic, Standard, and Premium. + + DatabaseEdition + + + MaxSizeGB + + If specified, the new maximum size for the database in gigabytes. You can specify either this parameter or MaxSizeBytes. The acceptable values differ based on edition. +Web Edition values: 1 or 5 +Business Edition values: 10, 20, 30, 40, 50, 100, or 150 + + Int32 + + + MaxSizeBytes + + If specified, the new maximum size for the database in bytes. You can specify either this parameter or MaxSizeGB. See the MaxSizeGB parameter for acceptable values based on edition. + + Int64 + + + ServiceObjective + + If specified, an object representing the new service objective for this database. Note: This parameter is currently available in preview. To learn more about the preview, please see http://go.microsoft.com/fwlink/p/?LinkId=308949. + + ServiceObjective + + + PassThru + + Returns the updated Azure SQL Database. + + SwitchParameter + + + Force + + Allows the action to complete without prompting you for confirmation. + + SwitchParameter + + + Sync + + + + SwitchParameter + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + Set-AzureSqlDatabase + + ServerName + + The name of the SQL Database Server where you want to modify a SQL Database. + + String + + + DatabaseName + + The name of the SQL Database to modify. + + String + + + NewDatabaseName + + If specified, the new name of the SQL Database. + + String + + + Edition + + If specified, the new edition for the SQL Database. Acceptable values are Web, Business, Basic, Standard, and Premium. + + DatabaseEdition + + + MaxSizeGB + + If specified, the new maximum size for the database in gigabytes. You can specify either this parameter or MaxSizeBytes. The acceptable values differ based on edition. +Web Edition values: 1 or 5 +Business Edition values: 10, 20, 30, 40, 50, 100, or 150 + + Int32 + + + MaxSizeBytes + + If specified, the new maximum size for the database in bytes. You can specify either this parameter or MaxSizeGB. See the MaxSizeGB parameter for acceptable values based on edition. + + Int64 + + + ServiceObjective + + If specified, an object representing the new service objective for this database. Note: This parameter is currently available in preview. To learn more about the preview, please see http://go.microsoft.com/fwlink/p/?LinkId=308949. + + ServiceObjective + + + PassThru + + Returns the updated Azure SQL Database. + + SwitchParameter + + + Force + + Allows the action to complete without prompting you for confirmation. + + SwitchParameter + + + Sync + + + + SwitchParameter + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + Set-AzureSqlDatabase + + ServerName + + The name of the SQL Database Server where you want to modify a SQL Database. + + String + + + Database + + A database object representing the SQL Database to modify. + + Database + + + NewDatabaseName + + If specified, the new name of the SQL Database. + + String + + + Edition + + If specified, the new edition for the SQL Database. Acceptable values are Web, Business, Basic, Standard, and Premium. + + DatabaseEdition + + + MaxSizeGB + + If specified, the new maximum size for the database in gigabytes. You can specify either this parameter or MaxSizeBytes. The acceptable values differ based on edition. +Web Edition values: 1 or 5 +Business Edition values: 10, 20, 30, 40, 50, 100, or 150 + + Int32 + + + MaxSizeBytes + + If specified, the new maximum size for the database in bytes. You can specify either this parameter or MaxSizeGB. See the MaxSizeGB parameter for acceptable values based on edition. + + Int64 + + + ServiceObjective + + If specified, an object representing the new service objective for this database. Note: This parameter is currently available in preview. To learn more about the preview, please see http://go.microsoft.com/fwlink/p/?LinkId=308949. + + ServiceObjective + + + PassThru + + Returns the updated Azure SQL Database. + + SwitchParameter + + + Force + + Allows the action to complete without prompting you for confirmation. + + SwitchParameter + + + Sync + + + + SwitchParameter + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + + + ConnectionContext + + The connection context to a SQL Database Server where you want to modify a SQL Database. + + IServerDataServiceContext + + IServerDataServiceContext + + + + + + Database + + A database object representing the SQL Database to modify. + + Database + + Database + + + + + + NewDatabaseName + + If specified, the new name of the SQL Database. + + String + + String + + + + + + Edition + + If specified, the new edition for the SQL Database. Acceptable values are Web, Business, Basic, Standard, and Premium. + + DatabaseEdition + + DatabaseEdition + + + + + + MaxSizeGB + + If specified, the new maximum size for the database in gigabytes. You can specify either this parameter or MaxSizeBytes. The acceptable values differ based on edition. +Web Edition values: 1 or 5 +Business Edition values: 10, 20, 30, 40, 50, 100, or 150 + + Int32 + + Int32 + + + + + + MaxSizeBytes + + If specified, the new maximum size for the database in bytes. You can specify either this parameter or MaxSizeGB. See the MaxSizeGB parameter for acceptable values based on edition. + + Int64 + + Int64 + + + + + + ServiceObjective + + If specified, an object representing the new service objective for this database. Note: This parameter is currently available in preview. To learn more about the preview, please see http://go.microsoft.com/fwlink/p/?LinkId=308949. + + ServiceObjective + + ServiceObjective + + + + + + PassThru + + Returns the updated Azure SQL Database. + + SwitchParameter + + SwitchParameter + + + + + + Force + + Allows the action to complete without prompting you for confirmation. + + SwitchParameter + + SwitchParameter + + + + + + Sync + + + + SwitchParameter + + SwitchParameter + + + + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + SwitchParameter + + + false + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + SwitchParameter + + + false + + + DatabaseName + + The name of the SQL Database to modify. + + String + + String + + + + + + ServerName + + The name of the SQL Database Server where you want to modify a SQL Database. + + String + + String + + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.Database + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.Database + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> C:\PS>$database1 = Get-AzureSqlDatabase -ConnectionContext $ctx -DatabaseName "Database1" +C:\PS>Set-AzureSqlDatabase -ConnectionContext $ctx -Database $database1 -MaxSizeGB 20 + + This example changes the current size of the database, "Database1", to 20 GB, in the specified SQL Database Server connection context “$ctx”. + + + + + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\> C:\PS>$database1 = Get-AzureSqlDatabase -ServerName "lpqd0zbr8y" -DatabaseName "Database1" +C:\PS>Set-AzureSqlDatabase -ServerName "lpqd0zbr8y" -Database $database1 -MaxSizeGB 20 + + This example changes the current size of the database, "Database1", to 20 GB, in the specified SQL Database Server "lpqd0zbr8y". + + + + + + + + + + + Get-AzureSqlDatabase + + + + New-AzureSqlDatabase + + + + Remove-AzureSqlDatabase + + + + New-AzureSqlDatabaseServerContext + + + + + + + + Set-AzureSqlDatabaseServer + + Updates the properties of the specified Azure SQL Database Server in the current subscription. + + + + + Set + AzureSqlDatabaseServer + + + + + The Set-AzureSqlDatabaseServer cmdlet updates the properties of the specified SQL Database Server. In the current release, you can only update the administrator account password for a SQL Database Server. + + + + Set-AzureSqlDatabaseServer + + ServerName + + The name of the SQL Database Server to be updated. Specify only the server name, and not the fully qualified DNS name. + + String + + + AdminPassword + + The new Administrator account password for your SQL Database Server. You must specify a strong password. For more information, see Strong Passwords (http://go.microsoft.com/fwlink/p/?LinkId=154152). + + String + + + Force + + Allows the action to complete without prompting you for confirmation. + + SwitchParameter + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + + + ServerName + + The name of the SQL Database Server to be updated. Specify only the server name, and not the fully qualified DNS name. + + String + + String + + + + + + AdminPassword + + The new Administrator account password for your SQL Database Server. You must specify a strong password. For more information, see Strong Passwords (http://go.microsoft.com/fwlink/p/?LinkId=154152). + + String + + String + + + + + + Force + + Allows the action to complete without prompting you for confirmation. + + SwitchParameter + + SwitchParameter + + + + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + SwitchParameter + + + false + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + SwitchParameter + + + false + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Model.SqlDatabaseServerContext + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\>Set-AzureSqlDatabaseServer -ServerName "lpqd0zbr8y" -AdminPassword "myNewP@ssword" + + This command updates the administrator account password for the SQL Database Server (“lpqd0zbr8y”) with the new password (“myNewP@ssword”). + + + + + + + + + + + Get-AzureSqlDatabaseServer + + + + New-AzureSqlDatabaseServer + + + + Remove-AzureSqlDatabaseServer + + + + + + + + Set-AzureSqlDatabaseServerFirewallRule + + Updates the properties of an existing firewall rule in the specified Azure SQL Database Server. + + + + + Set + AzureSqlDatabaseServerFirewallRule + + + + + The Set-AzureSqlDatabaseServerFirewallRule cmdlet updates the start IP address and end IP address values of an existing firewall rule in the specified SQL Database Server. + + + + Set-AzureSqlDatabaseServerFirewallRule + + ServerName + + Name of the SQL Database Server that contains the firewall rule to be updated. Specify only the server name, and not the fully qualified DNS name. + + String + + + RuleName + + Name of the SQL Database Server firewall rule to be updated. + + String + + + StartIpAddress + + The new start IP address value. + + String + + + EndIpAddress + + The new end IP address value. + + String + + + Force + + Allows the action to complete without prompting you for confirmation. + + SwitchParameter + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + + + ServerName + + Name of the SQL Database Server that contains the firewall rule to be updated. Specify only the server name, and not the fully qualified DNS name. + + String + + String + + + + + + RuleName + + Name of the SQL Database Server firewall rule to be updated. + + String + + String + + + + + + StartIpAddress + + The new start IP address value. + + String + + String + + + + + + EndIpAddress + + The new end IP address value. + + String + + String + + + + + + Force + + Allows the action to complete without prompting you for confirmation. + + SwitchParameter + + SwitchParameter + + + + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + SwitchParameter + + + false + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + SwitchParameter + + + false + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Model.SqlDatabaseServerFirewallRuleContext + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Model.SqlDatabaseServerFirewallRuleContext + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> Set-AzureSqlDatabaseServerFirewallRule -ServerName "lpqd0zbr8y" -RuleName "myRule" -StartIpAddress 12.1.1.2 -EndIpAddress 12.1.1.4 + + This command updates the start IP address and end IP address of the firewall rule (“myRule”) in the SQL Database Server (“lpqd0zbr8y”). + + + + + + + + + + + Get-AzureSqlDatabaseServerFirewallRule + + + + New-AzureSqlDatabaseServerFirewallRule + + + + Remove-AzureSqlDatabaseServerFirewallRule + + + + + + + + Start-AzureSqlDatabaseCopy + + Creates a one-time copy or a continuous copy (a "replica database") of a specified Azure SQL database (the "source database"). For a one-time copy, the source and partner databases must reside on the same server. For a continuous copy, the source and replica databases must reside on different servers, which typically reside in different regions. + + + + + Start + AzureSqlDatabaseCopy + + + + + The Start-AzureSqlDatabaseCopy cmdlet schedules the creation of a copy of a specified source database. A continuous copy, which is known as a replica database, is a read-only copy. All transactions from the source are asynchronously replicated to the replica. The source and replica databases must reside on different servers, which typically reside in different regions. The source and replica databases will remain connected until the application invokes an explicit command to terminate the continuous copy relationship. +Start-AzureSqlDatabaseCopy returns immediately without waiting for the completion of the creation process. Invoking Start-AzureSqlDatabaseCopy causes the system to perform the following steps: (1) create the partner database, (2) copy metadata to the partner database, and (3) seed the partner database to put it into the transactionally consistent state. + + + + Start-AzureSqlDatabaseCopy + + ServerName + + The name of the server on which the source database to be copied resides. + + String + + + Database + + An object representing the SQL database to be copied. -Database can accept an array that is passed via a pipe. + + Database + + + PartnerServer + + The name of the server that will host the partner database. If ContinuousCopy is not specified, then the partner server must be the same as the source server. + + String + + + PartnerDatabase + + Specifies name of the partner database. If ContinuousCopy is specified, this parameter is optional and, if specified, the name must match the name of the source database. If ContinuousCopy is not specified, then this parameter is not optional and it must be different from the source database name. + + String + + + Force + + Allows the action to complete without prompting you for confirmation. + + SwitchParameter + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + Start-AzureSqlDatabaseCopy + + ServerName + + The name of the server on which the source database to be copied resides. + + String + + + Database + + An object representing the SQL database to be copied. -Database can accept an array that is passed via a pipe. + + Database + + + PartnerServer + + The name of the server that will host the partner database. If ContinuousCopy is not specified, then the partner server must be the same as the source server. + + String + + + PartnerDatabase + + Specifies name of the partner database. If ContinuousCopy is specified, this parameter is optional and, if specified, the name must match the name of the source database. If ContinuousCopy is not specified, then this parameter is not optional and it must be different from the source database name. + + String + + + ContinuousCopy + + Specifies that the database copy will be a continuous-copy (a replica database). Continuous copy is not supported within the same server. If this parameter is not specified, then a one-time copy is performed. For a one-time copy, the source and partner databases must be on the same server. + + SwitchParameter + + + OfflineSecondary + + Specifies that a continuous copy is a passive copy rather than an active copy. If the source database is a Standard edition database, then this parameter is required. If this parameter is specified then ContinuousCopy must also be specified. + + SwitchParameter + + + Force + + Allows the action to complete without prompting you for confirmation. + + SwitchParameter + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + Start-AzureSqlDatabaseCopy + + ServerName + + The name of the server on which the source database to be copied resides. + + String + + + DatabaseName + + The name of the source database to be copied. + + String + + + PartnerServer + + The name of the server that will host the partner database. If ContinuousCopy is not specified, then the partner server must be the same as the source server. + + String + + + PartnerDatabase + + Specifies name of the partner database. If ContinuousCopy is specified, this parameter is optional and, if specified, the name must match the name of the source database. If ContinuousCopy is not specified, then this parameter is not optional and it must be different from the source database name. + + String + + + Force + + Allows the action to complete without prompting you for confirmation. + + SwitchParameter + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + Start-AzureSqlDatabaseCopy + + ServerName + + The name of the server on which the source database to be copied resides. + + String + + + DatabaseName + + The name of the source database to be copied. + + String + + + PartnerServer + + The name of the server that will host the partner database. If ContinuousCopy is not specified, then the partner server must be the same as the source server. + + String + + + PartnerDatabase + + Specifies name of the partner database. If ContinuousCopy is specified, this parameter is optional and, if specified, the name must match the name of the source database. If ContinuousCopy is not specified, then this parameter is not optional and it must be different from the source database name. + + String + + + ContinuousCopy + + Specifies that the database copy will be a continuous-copy (a replica database). Continuous copy is not supported within the same server. If this parameter is not specified, then a one-time copy is performed. For a one-time copy, the source and partner databases must be on the same server. + + SwitchParameter + + + OfflineSecondary + + Specifies that a continuous copy is a passive copy rather than an active copy. If the source database is a Standard edition database, then this parameter is required. If this parameter is specified then ContinuousCopy must also be specified. + + SwitchParameter + + + Force + + Allows the action to complete without prompting you for confirmation. + + SwitchParameter + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + + + ServerName + + The name of the server on which the source database to be copied resides. + + String + + String + + + + + + Database + + An object representing the SQL database to be copied. -Database can accept an array that is passed via a pipe. + + Database + + Database + + + + + + PartnerServer + + The name of the server that will host the partner database. If ContinuousCopy is not specified, then the partner server must be the same as the source server. + + String + + String + + + + + + PartnerDatabase + + Specifies name of the partner database. If ContinuousCopy is specified, this parameter is optional and, if specified, the name must match the name of the source database. If ContinuousCopy is not specified, then this parameter is not optional and it must be different from the source database name. + + String + + String + + + + + + Force + + Allows the action to complete without prompting you for confirmation. + + SwitchParameter + + SwitchParameter + + + + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + SwitchParameter + + + false + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + SwitchParameter + + + false + + + ContinuousCopy + + Specifies that the database copy will be a continuous-copy (a replica database). Continuous copy is not supported within the same server. If this parameter is not specified, then a one-time copy is performed. For a one-time copy, the source and partner databases must be on the same server. + + SwitchParameter + + SwitchParameter + + + + + + OfflineSecondary + + Specifies that a continuous copy is a passive copy rather than an active copy. If the source database is a Standard edition database, then this parameter is required. If this parameter is specified then ContinuousCopy must also be specified. + + SwitchParameter + + SwitchParameter + + + + + + DatabaseName + + The name of the source database to be copied. + + String + + String + + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.Database + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Model.DatabaseCopy + + + + + + + + + + + + + + Authentication: This cmdlet requires certificate-based authentication. For an example of how to use certificate-based authentication to set the current subscription, see the Get-Help topic for the New-AzureSqlDatabaseServerContext cmdlet. + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\>Start-AzureSqlDatabaseCopy -ServerName "lpqd0zbr8y" -DatabaseName "Orders" -PartnerServer "bk0b8kf65" -ContinuousCopy + + This example schedules a continuous copy of the database, "Orders", on the server, "lpqd0zbr8y", creating the replica database on the "bk0b8kf658" server. + + + + + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\>Start-AzureSqlDatabaseCopy -ServerName "lpqd0zbr8y" -DatabaseName "Orders" -PartnerDatabase "OrdersCopy" + + This example creates a one-time copy of the database, "Orders", on the server, "lpqd0zbr8y", creating the database copy, "OrdersCopy", on the same server. + + + + + + + + + + + + + + + Start-AzureSqlDatabaseExport + + Initiates an export operation from an Azure SQL Database to Azure Blob storage. + + + + + Start + AzureSqlDatabaseExport + + + + + Use the Start-AzureSqlDatabaseExport cmdlet to initiate an export operation from an Azure SQL Database to Blob storage. The operation requires a database server connection context. Use the Get-AzureSqlDatabaseImportExportStatus cmdlet to get status on the export operation. + + + + Start-AzureSqlDatabaseExport + + SqlConnectionContext + + The connection context to a SQL Database Server containing the SQL Database. + + ServerDataServiceSqlAuth + + + StorageContainer + + The Blob storage container object into which the data is exported. + + AzureStorageContainer + + + DatabaseName + + The name of the database from which the data is exported. + + String + + + BlobName + + The name of the Blob storage into which to export the database. + + String + + + + Start-AzureSqlDatabaseExport + + SqlConnectionContext + + The connection context to a SQL Database Server containing the SQL Database. + + ServerDataServiceSqlAuth + + + StorageContext + + The context of the Blob storage. + + AzureStorageContext + + + StorageContainerName + + The name of the storage container containing the Blob into which the data is exported. + + String + + + DatabaseName + + The name of the database from which the data is exported. + + String + + + BlobName + + The name of the Blob storage into which to export the database. + + String + + + + + + SqlConnectionContext + + The connection context to a SQL Database Server containing the SQL Database. + + ServerDataServiceSqlAuth + + ServerDataServiceSqlAuth + + + + + + StorageContainer + + The Blob storage container object into which the data is exported. + + AzureStorageContainer + + AzureStorageContainer + + + + + + DatabaseName + + The name of the database from which the data is exported. + + String + + String + + + + + + BlobName + + The name of the Blob storage into which to export the database. + + String + + String + + + + + + StorageContext + + The context of the Blob storage. + + AzureStorageContext + + AzureStorageContext + + + + + + StorageContainerName + + The name of the storage container containing the Blob into which the data is exported. + + String + + String + + + + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Services.ImportExportRequest + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> C:\PS>$credential = Get-Credential +C:\PS>$SqlCtx = New-AzureSqlDatabaseServerContext -ServerName $ServerName -Credentials $credential +C:\PS>$StorageCtx = New-AzureStorageContext -StorageAccountName $StorageName -StorageAccountKey $StorageKey +C:\PS>$Container = Get-AzureStorageContainer -Name $ContainerName -Context $StorageCtx +C:\PS>$exportRequest = Start-AzureSqlDatabaseExport -SqlConnectionContext $SqlCtx -StorageContainer $Container -DatabaseName $DatabaseName -BlobName $BlobName + + This example initiates an export process from the SQL Database, "$DatabaseName", to the Blob storage, "$BlobName". + + + + + + + + + + + Get-AzureSqlDatabaseImportExportStatus + + + + Start-AzureSqlDatabaseImport + + + + + + + + Start-AzureSqlDatabaseImport + + Initiates an import operation from Azure Blob storage to an Azure SQL Database. + + + + + Start + AzureSqlDatabaseImport + + + + + Use the Start-AzureSqlDatabaseImport cmdlet to initiate an import operation from Blob storage to an Azure SQL Database. If the database does not exist, it is created using the size and edition values specified. The operation requires a database server connection context. Use the Get-AzureSqlDatabaseImportExportStatus cmdlet to get status on the import operation. + + + + Start-AzureSqlDatabaseImport + + SqlConnectionContext + + The connection context to a SQL Database Server containing the SQL Database. + + ServerDataServiceSqlAuth + + + StorageContainer + + The name of the storage container containing the Blob from which to import. + + AzureStorageContainer + + + DatabaseName + + The name of the database into which the data is imported. If the database does not exist, it is created with this name. + + String + + + BlobName + + The name of the Blob storage from which to import the database. + + String + + + Edition + + If the database does not exist, it is created as this edition. Acceptable values are Web and Business. The default is Web. + + DatabaseEdition + + + DatabaseMaxSize + + If the database does not exist, it is created with this maximum size in gigabytes. The acceptable values differ based on edition. + + Int32 + + + + Start-AzureSqlDatabaseImport + + SqlConnectionContext + + The connection context to a SQL Database Server containing the SQL Database. + + ServerDataServiceSqlAuth + + + StorageContext + + The connection context of the Blob storage container. + + AzureStorageContext + + + StorageContainerName + + The name of the Blob storage container. + + String + + + DatabaseName + + The name of the database into which the data is imported. If the database does not exist, it is created with this name. + + String + + + BlobName + + The name of the Blob storage from which to import the database. + + String + + + Edition + + If the database does not exist, it is created as this edition. Acceptable values are Web and Business. The default is Web. + + DatabaseEdition + + + DatabaseMaxSize + + If the database does not exist, it is created with this maximum size in gigabytes. The acceptable values differ based on edition. + + Int32 + + + + + + SqlConnectionContext + + The connection context to a SQL Database Server containing the SQL Database. + + ServerDataServiceSqlAuth + + ServerDataServiceSqlAuth + + + + + + StorageContainer + + The name of the storage container containing the Blob from which to import. + + AzureStorageContainer + + AzureStorageContainer + + + + + + DatabaseName + + The name of the database into which the data is imported. If the database does not exist, it is created with this name. + + String + + String + + + + + + BlobName + + The name of the Blob storage from which to import the database. + + String + + String + + + + + + Edition + + If the database does not exist, it is created as this edition. Acceptable values are Web and Business. The default is Web. + + DatabaseEdition + + DatabaseEdition + + + + + + DatabaseMaxSize + + If the database does not exist, it is created with this maximum size in gigabytes. The acceptable values differ based on edition. + + Int32 + + Int32 + + + + + + StorageContext + + The connection context of the Blob storage container. + + AzureStorageContext + + AzureStorageContext + + + + + + StorageContainerName + + The name of the Blob storage container. + + String + + String + + + + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Services.ImportExportRequest + + + + + + + + + + + + + + + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\> C:\PS>$credential = Get-Credential +C:\PS>$SqlCtx = New-AzureSqlDatabaseServerContext -ServerName $ServerName -Credentials $credential +C:\PS>$StorageCtx = New-AzureStorageContext -StorageAccountName $StorageName -StorageAccountKey $StorageKey +C:\PS>$Container = Get-AzureStorageContainer -Name $ContainerName -Context $StorageCtx +C:\PS>$importRequest = Start-AzureSqlDatabaseImport -SqlConnectionContext $SqlCtx -StorageContainer $Container -DatabaseName $DatabaseName -BlobName $BlobName + + This example initiates an import process from the Blob storage, "$BlobName", into the SQL Database, "DatabaseName". + + + + + + + + + + + Get-AzureSqlDatabaseImportExportStatus + + + + Start-AzureSqlDatabaseExport + + + + + + + + Start-AzureSqlDatabaseRecovery + + Submits a recover database request for a live or dropped database. + + + + + Start + AzureSqlDatabaseRecovery + + + + + This cmdlet is used to submit a restore request for a live or dropped database. This cmdlet supports basic recovery using the last known available backup for the database. The recovery operation creates a new database. You must specify a different name for the new database if you are recovering a live database on the same server. If you want to do a point in time restore for a database, use Start-AzureSqlDatabaseRestore cmdlet instead. + + + + Start-AzureSqlDatabaseRecovery + + SourceServerName + + The name of the server where the source database is live and running, or the name of the server where the source database was running before it was deleted. + + String + + + SourceDatabaseName + + The name of the database you want to recover. + + String + + + TargetServerName + + The name of the server you want to restore the database to. This can be the same server as the source database or a different server name. + + String + + + TargetDatabaseName + + The name of the recovered database. This should be different from the source database if the source database is still live and you are planning to recover it to the same server as the source. + + String + + + + Start-AzureSqlDatabaseRecovery + + SourceDatabase + + The database object that represents the database you want to recover. + + RecoverableDatabase + + + TargetServerName + + The name of the server you want to restore the database to. This can be the same server as the source database or a different server name. + + String + + + TargetDatabaseName + + The name of the recovered database. This should be different from the source database if the source database is still live and you are planning to recover it to the same server as the source. + + String + + + + + + SourceServerName + + The name of the server where the source database is live and running, or the name of the server where the source database was running before it was deleted. + + String + + String + + + + + + SourceDatabaseName + + The name of the database you want to recover. + + String + + String + + + + + + TargetServerName + + The name of the server you want to restore the database to. This can be the same server as the source database or a different server name. + + String + + String + + + + + + TargetDatabaseName + + The name of the recovered database. This should be different from the source database if the source database is still live and you are planning to recover it to the same server as the source. + + String + + String + + + + + + SourceDatabase + + The database object that represents the database you want to recover. + + RecoverableDatabase + + RecoverableDatabase + + + + + + + + + Microsoft.WindowsAzure.Management.Sql.Models.RecoverableDatabase + + + + + + + + + + + + Microsoft.WindowsAzure.Management.Sql.Models.RecoverDatabaseOperation + + + + + + + + + + + + + + You must use certificate based authentication to run this cmdlet. The following commands need to be run on the machine you are using to run the cmdlet: +C:\PS>$subId = <Subscription ID> + +C:\PS>$thumbprint = <Certificate Thumbprint> +C:\PS>$myCert = Get-Item Cert:\CurrentUser\My\$thumbprint +C:\PS>Set-AzureSubscription -SubscriptionName "mySubscription" -SubscriptionId $subId -Certificate $myCert +C:\PS>Select-AzureSubscription -SubscriptionName "mySubscription" + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\>$mydb = Get-AzureSqlRecoverableDatabase -ServerName "myserver" -DatabaseName "mydatabase" +# Recover the database using database object +PS C:\>$operation = Start-AzureSqlDatabaseRecovery -SourceDatabase $mydb -TargetServerName "a234b56" -TargetDatabaseName "mydatabaserestored" + + This example recovers a database using an object representing the database. + + + + + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\>$operation = Start-AzureSqlDatabaseRecovery -SourceServerName "myserver" -SourceDatabaseName "mydatabase" -TargetServerName "a234b56" -TargetDatabaseName "mydatabaserestored" + + This example recovers a database using the database name. + + + + + + + + + + + Start-AzureSqlDatabaseRestore + + + + Get-AzureSqlRecoverableDatabase + + + + + + + + Start-AzureSqlDatabaseRestore + + Submits a restore request for a live or dropped database. + + + + + Start + AzureSqlDatabaseRestore + + + + + Use this cmdlet to do a point in time restore of a Standard or Premium database. For standard databases, the backups are retained for 7 days and for Premium databases, the backups are retained up to 35 days. The restore operation creates a new database. If you are restoring to the same server as the source database, you must specific a different name from the source database. NOTE: For this release, the source server name and the target server name should be the same. + + + + Start-AzureSqlDatabaseRestore + + SourceServerName + + The name of the server where the source database is live and running, or the name of the server where the source database was running before it was deleted. + + String + + + SourceDatabaseName + + The name of the live database you want to restore + + String + + + SourceDatabaseDeletionDate + + The date and time when the database was deleted. You must include milliseconds when specifying the time to match the actual database deletion time. + + DateTime + + + TargetServerName + + The name of the server that you want to restore the database to. This can be the same server as the source database or a different server.NOTE: For this release, the source server name and the target server name should be the same. + + String + + + RestorableDropped + + + + SwitchParameter + + + TargetDatabaseName + + The name of the new database that will be created as a result of the restore operation. + + String + + + PointInTime + + The restore point for the database to be restored to. When the restore operation has completed, the database is restored to the state it was at the specific date and time specified using this parameter. By default, for a live database this set to the current time, and for a dropped database, it is set to the time when the database was dropped. + + Nullable`1[DateTime] + + + + Start-AzureSqlDatabaseRestore + + SourceServerName + + The name of the server where the source database is live and running, or the name of the server where the source database was running before it was deleted. + + String + + + SourceDatabaseName + + The name of the live database you want to restore + + String + + + TargetServerName + + The name of the server that you want to restore the database to. This can be the same server as the source database or a different server.NOTE: For this release, the source server name and the target server name should be the same. + + String + + + TargetDatabaseName + + The name of the new database that will be created as a result of the restore operation. + + String + + + PointInTime + + The restore point for the database to be restored to. When the restore operation has completed, the database is restored to the state it was at the specific date and time specified using this parameter. By default, for a live database this set to the current time, and for a dropped database, it is set to the time when the database was dropped. + + Nullable`1[DateTime] + + + + Start-AzureSqlDatabaseRestore + + SourceServerName + + The name of the server where the source database is live and running, or the name of the server where the source database was running before it was deleted. + + String + + + SourceDatabase + + A single object that represents the live database that you want to restore. + + Database + + + TargetServerName + + The name of the server that you want to restore the database to. This can be the same server as the source database or a different server.NOTE: For this release, the source server name and the target server name should be the same. + + String + + + TargetDatabaseName + + The name of the new database that will be created as a result of the restore operation. + + String + + + PointInTime + + The restore point for the database to be restored to. When the restore operation has completed, the database is restored to the state it was at the specific date and time specified using this parameter. By default, for a live database this set to the current time, and for a dropped database, it is set to the time when the database was dropped. + + Nullable`1[DateTime] + + + + Start-AzureSqlDatabaseRestore + + SourceServerName + + The name of the server where the source database is live and running, or the name of the server where the source database was running before it was deleted. + + String + + + SourceRestorableDroppedDatabase + + The database object that represents a recoverable dropped database. You can get this object using the Get-AzureSqlDatabase cmdlet using –RestorableDropped switch parameter. + + RestorableDroppedDatabase + + + TargetServerName + + The name of the server that you want to restore the database to. This can be the same server as the source database or a different server.NOTE: For this release, the source server name and the target server name should be the same. + + String + + + TargetDatabaseName + + The name of the new database that will be created as a result of the restore operation. + + String + + + PointInTime + + The restore point for the database to be restored to. When the restore operation has completed, the database is restored to the state it was at the specific date and time specified using this parameter. By default, for a live database this set to the current time, and for a dropped database, it is set to the time when the database was dropped. + + Nullable`1[DateTime] + + + + + + SourceServerName + + The name of the server where the source database is live and running, or the name of the server where the source database was running before it was deleted. + + String + + String + + + + + + SourceDatabaseName + + The name of the live database you want to restore + + String + + String + + + + + + SourceDatabaseDeletionDate + + The date and time when the database was deleted. You must include milliseconds when specifying the time to match the actual database deletion time. + + DateTime + + DateTime + + + + + + TargetServerName + + The name of the server that you want to restore the database to. This can be the same server as the source database or a different server.NOTE: For this release, the source server name and the target server name should be the same. + + String + + String + + + + + + RestorableDropped + + + + SwitchParameter + + SwitchParameter + + + + + + TargetDatabaseName + + The name of the new database that will be created as a result of the restore operation. + + String + + String + + + + + + PointInTime + + The restore point for the database to be restored to. When the restore operation has completed, the database is restored to the state it was at the specific date and time specified using this parameter. By default, for a live database this set to the current time, and for a dropped database, it is set to the time when the database was dropped. + + Nullable`1[DateTime] + + Nullable`1[DateTime] + + + + + + SourceDatabase + + A single object that represents the live database that you want to restore. + + Database + + Database + + + + + + SourceRestorableDroppedDatabase + + The database object that represents a recoverable dropped database. You can get this object using the Get-AzureSqlDatabase cmdlet using –RestorableDropped switch parameter. + + RestorableDroppedDatabase + + RestorableDroppedDatabase + + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.RestorableDroppedDatabase; Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.Database + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.RestoreDatabaseOperation + + + + + + + + + + + + + + You must use certificate based authentication to run this cmdlet. The following commands need to be run on the machine you are using to run the cmdlet: +C:\PS>$subId = <Subscription ID> + + +C:\PS>$thumbprint = <Certificate Thumbprint> +C:\PS>$myCert = Get-Item Cert:\CurrentUser\My\$thumbprint +C:\PS>Set-AzureSubscription -SubscriptionName "mySubscription" -SubscriptionId $subId -Certificate $myCert +C:\PS>Select-AzureSubscription -SubscriptionName "mySubscription" + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\>$mydb = Get-AzureSqlDatabase -ServerName "a234b56" -DatabaseName "mydatabase" # Restore the database using database object PS C:\>$operation = Start-AzureSqlDatabaseRestore -SourceDatabase $mydb -TargetDatabaseName "mydatabaserestored" -PointInTime "2013-01-01 06:00:00" + + This example lists the databases on the server, then stores a specific database object in a variable, and restores the database to a specific point in time. + + + + + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\>$operation = Start-AzureSqlDatabaseRestore -SourceServerName "a234b56" -SourceDatabaseName "mydatabase" -TargetDatabaseName "mydatabaserestored" -PointInTime "2013-01-01 06:00:00" + + This example lists the databases on the server, specifies the database properties for a database and restores the database to a specific point in time. + + + + + + + + + -------------------------- EXAMPLE 3 -------------------------- + + + + PS C:\>$mydb = Get-AzureSqlDatabase -RestorableDropped -ServerName "server1" -DatabaseName "mydb" -DatabaseDeletionDate "2013-01-01 06:00:00"# Restore the dropped database using database object PS C:\>$operation = Start-AzureSqlDatabaseRestore -SourceRestorableDroppedDatabase $mydb -TargetDatabaseName "mydroppeddatabaserestored" + + This example restores a dropped database. + + + + + + + + + + + Online Version: + + + + + + + + Stop-AzureSqlDatabaseCopy + + Terminates a continuous copy relationship. There are two modes of termination: termination and forced termination (with possible data loss). + + + + + Stop + AzureSqlDatabaseCopy + + + + + Terminates a continuous copy relationship. The system terminates the data movement between the source and replica databases and changes the database state on the former replica database. +There are two modes of termination: termination and forced termination (with possible data loss). A termination that is not forced waits until all committed transactions on the source database at the time of the call have been replicated to the replica database. A termination that is not forced is disallowed when the replication status is PENDING. In contrast, a forced termination does not wait for replication of any outstanding committed transactions. For this reason, a forced termination can result in data loss on the replica database. +A Stop-AzureSqlDatabaseCopy command can be executed on the source or replica database. On the server that hosts the replica database (the "target server") only the forced termination mode is supported. + + + + Stop-AzureSqlDatabaseCopy + + ServerName + + The name of the server on which the source database resides. + + String + + + DatabaseCopy + + An object representing the database whose continuous copy relationship is to be terminated. -DatabaseCopy can accept an array using the pipeline. + + DatabaseCopy + + + ForcedTermination + + Causes forced termination of the continuous copy relationship (with possible data loss). You can abbreviate this parameter name to Forced. On a target server, -ForcedTermination (or -Forced) is always required. On the source server, this parameter is required only if the target replica database is unavailable. + + SwitchParameter + + + Force + + Allows the action to complete without prompting you for confirmation. + + SwitchParameter + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + Stop-AzureSqlDatabaseCopy + + ServerName + + The name of the server on which the source database resides. + + String + + + Database + + A single object that represents the database whose continuous copy relationship is to be terminated. + + Database + + + PartnerServer + + The name of a target server. + + String + + + PartnerDatabase + + Specifies name of a given replica database. If specified, this name must match the name of the source database. + + String + + + ForcedTermination + + Causes forced termination of the continuous copy relationship (with possible data loss). You can abbreviate this parameter name to Forced. On a target server, -ForcedTermination (or -Forced) is always required. On the source server, this parameter is required only if the target replica database is unavailable. + + SwitchParameter + + + Force + + Allows the action to complete without prompting you for confirmation. + + SwitchParameter + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + Stop-AzureSqlDatabaseCopy + + ServerName + + The name of the server on which the source database resides. + + String + + + DatabaseName + + The name of the database whose continuous copy relationship is to be terminated. + + String + + + PartnerServer + + The name of a target server. + + String + + + PartnerDatabase + + Specifies name of a given replica database. If specified, this name must match the name of the source database. + + String + + + ForcedTermination + + Causes forced termination of the continuous copy relationship (with possible data loss). You can abbreviate this parameter name to Forced. On a target server, -ForcedTermination (or -Forced) is always required. On the source server, this parameter is required only if the target replica database is unavailable. + + SwitchParameter + + + Force + + Allows the action to complete without prompting you for confirmation. + + SwitchParameter + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + + + ServerName + + The name of the server on which the source database resides. + + String + + String + + + + + + DatabaseCopy + + An object representing the database whose continuous copy relationship is to be terminated. -DatabaseCopy can accept an array using the pipeline. + + DatabaseCopy + + DatabaseCopy + + + + + + ForcedTermination + + Causes forced termination of the continuous copy relationship (with possible data loss). You can abbreviate this parameter name to Forced. On a target server, -ForcedTermination (or -Forced) is always required. On the source server, this parameter is required only if the target replica database is unavailable. + + SwitchParameter + + SwitchParameter + + + + + + Force + + Allows the action to complete without prompting you for confirmation. + + SwitchParameter + + SwitchParameter + + + + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + SwitchParameter + + + false + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + SwitchParameter + + + false + + + Database + + A single object that represents the database whose continuous copy relationship is to be terminated. + + Database + + Database + + + + + + PartnerServer + + The name of a target server. + + String + + String + + + + + + PartnerDatabase + + Specifies name of a given replica database. If specified, this name must match the name of the source database. + + String + + String + + + + + + DatabaseName + + The name of the database whose continuous copy relationship is to be terminated. + + String + + String + + + + + + + + + Microsoft.WindowsAzure.Commands.SqlDatabase.Model.DatabaseCopy + + + + + + + + + + + + No output + + + + + + + + + + + + + + Authentication: This cmdlet requires certificate-based authentication. For an example of how to use certificate-based authentication to set the current subscription, see the Get-Help topic for the New-AzureSqlDatabaseServerContext cmdlet. + + + + + -------------------------- EXAMPLE 1 -------------------------- + + + + PS C:\>Stop-AzureSqlDatabaseCopy -ServerName "lpqd0zbr8y" -DatabaseName "Orders" -PartnerServer "bk0b8kf658" + + This example terminates the continuous copy relationship of database "Orders" on the server "lpqd0zbr8y" with the replica database on the "bk0b8kf658" target server. + + + + + + + + + -------------------------- EXAMPLE 2 -------------------------- + + + + PS C:\>$myDbCopy = Get-AzureSqlDatabaseCopy -ServerName "lpqd0zbr8y" -DatabaseName "Orders" +PS C:\>$myDbCopy | Stop-AzureSqlDatabaseCopy -ServerName "lpqd0zbr8y" -ForcedTermination + + This example forcibly terminates a continuous copy relationship from the server that hosts a replica database. + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Microsoft.WindowsAzure.Management.SqlDatabase.SnapIn.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Microsoft.WindowsAzure.Management.SqlDatabase.SnapIn.cs new file mode 100644 index 000000000000..7efa26cdc26b --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Microsoft.WindowsAzure.Management.SqlDatabase.SnapIn.cs @@ -0,0 +1,51 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.ComponentModel; +using System.Management.Automation; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.PowerShell +{ + /// + /// Installer class for the Microsoft Azure Platform PowerShell Cmdlets + /// Windows Powershell v2.0 snap-in. + /// + [RunInstaller(true)] + public class WAPPSCmdletsSnapIn : PSSnapIn + { + /// + /// Gets the snap-in description. + /// + public override string Description + { + get { return "Cmdlets to create and configure Microsoft Azure Sql Databases"; } + } + + /// + /// Gets the snap-in name. + /// + public override string Name + { + get { return "WindowsAzureSqlDatabaseCmdlets"; } + } + + /// + /// Gets the snap-in vendor. + /// + public override string Vendor + { + get { return "Microsoft Corporation"; } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Model/DatabaseCopy.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Model/DatabaseCopy.cs new file mode 100644 index 000000000000..c0889ceb2143 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Model/DatabaseCopy.cs @@ -0,0 +1,53 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Model +{ + public class DatabaseCopy + { + public Guid EntityId { get; set; } + + public string SourceServerName { get; set; } + + public string SourceDatabaseName { get; set; } + + public string DestinationServerName { get; set; } + + public string DestinationDatabaseName { get; set; } + + public bool IsContinuous { get; set; } + + public byte ReplicationState { get; set; } + + public string ReplicationStateDescription { get; set; } + + public int LocalDatabaseId { get; set; } + + public bool IsLocalDatabaseReplicationTarget { get; set; } + + public bool IsInterlinkConnected { get; set; } + + public DateTime StartDate { get; set; } + + public DateTime ModifyDate { get; set; } + + public float PercentComplete { get; set; } + + public bool IsOfflineSecondary { get; set; } + + public bool IsTerminationAllowed { get; set; } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Model/DatabaseStatusEnumeration.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Model/DatabaseStatusEnumeration.cs new file mode 100644 index 000000000000..f65e0aabba02 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Model/DatabaseStatusEnumeration.cs @@ -0,0 +1,94 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase +{ + /// + /// Values that specify the status of a database, whether it be loading, + /// recovering, or normal, for example. + /// + public enum DatabaseStatus + { + /// + /// Referenced database is available for use (Online). + /// + Online = 0x000001, + + /// + /// Database restore is underway on the referenced database. + /// + Restoring = 0x000002, + + /// + /// Database recovery is being prepared for the referenced database. + /// + RecoveryPending = 0x000004, + + /// + /// Database recovery is underway on the referenced database. + /// + Recovering = 0x000008, + + /// + /// Database integrity is suspect for the referenced database. + /// + Suspect = 0x000010, + + /// + /// Referenced database has been placed offline by a system or user action. + /// + Offline = 0x000020, + + /// + /// Referenced database defined on a standby server. + /// + Standby = 0x000040, + + /// + /// Database is in Shutdown + /// + Shutdown = 0x000080, + + /// + /// Emergency mode has been initiated on the referenced database. + /// + EmergencyMode = 0x000100, + + /// + /// The database has been autoclosed. + /// + AutoClosed = 0x000200, + + /// + /// The database is being created as a copy of another database (SQL Azure only) + /// + Copying = 0x000400, + + /// + /// The database is creating - premium database (SQL Azure only) + /// + Creating = 0x000800, + + /// + /// The database is an offline secondary (SQL Azure only) + /// + OfflineSecondary = 0x001000, + + /// + /// Property value that may be used for bitwisee AND operation to determine accessibility + /// of the database (Restoring | Offline | Suspect | Recovering | RecoveryPending | Copying | Creating | OfflineSecondary). + /// + Inaccessible = Restoring | Offline | Suspect | Recovering | RecoveryPending | Copying | Creating | OfflineSecondary + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Model/SqlDatabaseServerContext.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Model/SqlDatabaseServerContext.cs new file mode 100644 index 000000000000..5d1a871d789b --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Model/SqlDatabaseServerContext.cs @@ -0,0 +1,42 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Model +{ + /// + /// Represents a server and includes the operation context under which it was obtained. + /// + public class SqlDatabaseServerContext : SqlDatabaseServerOperationContext + { + /// + /// Gets or sets the administrator login for the server. + /// + public string AdministratorLogin { get; set; } + + /// + /// Gets or sets the location (region) where the server resides. Eg: East Asia + /// + public string Location { get; set; } + + /// + /// Gets or sets the version number of the server. Valid values are 1.0 and 2.0. + /// + public string Version { get; set; } + + /// + /// Gets or sets the current state of the server. + /// + public string State { get; set; } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Model/SqlDatabaseServerFirewallRuleContext.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Model/SqlDatabaseServerFirewallRuleContext.cs new file mode 100644 index 000000000000..0d827ec4b70c --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Model/SqlDatabaseServerFirewallRuleContext.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Model +{ + + public class SqlDatabaseServerFirewallRuleContext : SqlDatabaseServerOperationContext + { + public string RuleName { get; set; } + + public string StartIpAddress { get; set; } + + public string EndIpAddress { get; set; } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Model/SqlDatabaseServerOperationContext.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Model/SqlDatabaseServerOperationContext.cs new file mode 100644 index 000000000000..4badc656edc6 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Model/SqlDatabaseServerOperationContext.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Model +{ + public class SqlDatabaseServerOperationContext : ManagementOperationContext + { + public string ServerName { get; set; } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Model/SqlDatabaseServerQuotaContext.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Model/SqlDatabaseServerQuotaContext.cs new file mode 100644 index 000000000000..bae2532815b8 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Model/SqlDatabaseServerQuotaContext.cs @@ -0,0 +1,42 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Model +{ + /// + /// Represents a server quota and the operation context from which it was obtained. + /// + public class SqlDatabaseServerQuotaContext : SqlDatabaseServerOperationContext + { + /// + /// Gets or sets the name of the quota. + /// + public string Name { get; set; } + + /// + /// Gets or sets the type of the quota. + /// + public string Type { get; set; } + + /// + /// Gets or sets the state of the server quota. + /// + public string State { get; set; } + + /// + /// Gets or sets the value of the quota. This will be the maximum for the quota. + /// + public string Value { get; set; } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Properties/AssemblyInfo.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..a06dc956b036 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Properties/AssemblyInfo.cs @@ -0,0 +1,55 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft Azure Powershell")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("283a1301-ef78-443e-95e7-537f095cc620")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] +[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] +#if SIGN +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.SqlDatabase.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +#else +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.Test")] +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.SqlDatabase.Test")] +#endif +[assembly: CLSCompliant(false)] diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Properties/Resources.Designer.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Properties/Resources.Designer.cs new file mode 100644 index 000000000000..d328e4bf9918 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Properties/Resources.Designer.cs @@ -0,0 +1,532 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.WindowsAzure.Commands.SqlDatabase.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Invalid Parameter combination: Both "DatabaseName" and "DatabaseDeletionDate" need to be specified to get a restorable dropped database.. + /// + internal static string BothDatabaseNameAndDeletionDateNeedToBeSpecified { + get { + return ResourceManager.GetString("BothDatabaseNameAndDeletionDateNeedToBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Sql Authenticate Credential was not specified.. + /// + internal static string CredentialNotSpecified { + get { + return ResourceManager.GetString("CredentialNotSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Database Copy from '{0}.{1}' to '{2}.{3}' not found.. + /// + internal static string DatabaseCopyNotFound { + get { + return ResourceManager.GetString("DatabaseCopyNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no database copy matching the specified filter. Please revise the filter criteria to specify one existing database copy.. + /// + internal static string DatabaseCopyNotFoundGeneric { + get { + return ResourceManager.GetString("DatabaseCopyNotFoundGeneric", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {1} + ///Error Code: {0}. + /// + internal static string DatabaseManagementErrorFormat { + get { + return ResourceManager.GetString("DatabaseManagementErrorFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Database '{0}.{1}' not found.. + /// + internal static string DatabaseNotFound { + get { + return ResourceManager.GetString("DatabaseNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not found operations on Database '{0}.{1}'.. + /// + internal static string DatabaseOperationNotFoundOnDatabase { + get { + return ResourceManager.GetString("DatabaseOperationNotFoundOnDatabase", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error occurred while refreshing database.. + /// + internal static string ErrorRefreshingDatabase { + get { + return ResourceManager.GetString("ErrorRefreshingDatabase", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error occurred while refreshing database copy status.. + /// + internal static string ErrorRefreshingDatabaseCopy { + get { + return ResourceManager.GetString("ErrorRefreshingDatabaseCopy", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Client Request Id: '{0}'. + /// + internal static string ExceptionClientRequestId { + get { + return ResourceManager.GetString("ExceptionClientRequestId", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Client Session Id: '{0}'. + /// + internal static string ExceptionClientSessionId { + get { + return ResourceManager.GetString("ExceptionClientSessionId", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Request Id: '{0}'. + /// + internal static string ExceptionRequestId { + get { + return ResourceManager.GetString("ExceptionRequestId", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The firewall rule "{0}" could not be found in the Microsoft Azure Sql Database server "{1}".. + /// + internal static string GetAzureSqlDatabaseServerFirewallRuleNotFound { + get { + return ResourceManager.GetString("GetAzureSqlDatabaseServerFirewallRuleNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Microsoft Azure Sql Database server "{0}" could not be found in the currently selected subscription.. + /// + internal static string GetAzureSqlDatabaseServerNotFound { + get { + return ResourceManager.GetString("GetAzureSqlDatabaseServerNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Database '{0}.{1}' with deletion date '{2}' not found.. + /// + internal static string GetAzureSqlRestorableDroppedDatabaseDatabaseNotFound { + get { + return ResourceManager.GetString("GetAzureSqlRestorableDroppedDatabaseDatabaseNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid authentication for '{0}'.. + /// + internal static string InvalidAuthentication { + get { + return ResourceManager.GetString("InvalidAuthentication", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid error object in the response.. + /// + internal static string InvalidErrorInResponse { + get { + return ResourceManager.GetString("InvalidErrorInResponse", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid exception message format.. + /// + internal static string InvalidExceptionMessageFormat { + get { + return ResourceManager.GetString("InvalidExceptionMessageFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid Parameter combination: {0} and {1} parameters cannot be used together.. + /// + internal static string InvalidParameterCombination { + get { + return ResourceManager.GetString("InvalidParameterCombination", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There are more than one database copy matching the specified filter. Please revise the filter criteria to specify only one database copy.. + /// + internal static string MoreThanOneDatabaseCopyFound { + get { + return ResourceManager.GetString("MoreThanOneDatabaseCopyFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creating a new Microsoft Azure Sql Database.. + /// + internal static string NewAzureSqlDatabaseDescription { + get { + return ResourceManager.GetString("NewAzureSqlDatabaseDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creating a new Microsoft Azure Sql Database server.. + /// + internal static string NewAzureSqlDatabaseServerDescription { + get { + return ResourceManager.GetString("NewAzureSqlDatabaseServerDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Adding firewall rule "{0}" for Microsoft Azure Sql Database server "{1}".. + /// + internal static string NewAzureSqlDatabaseServerFirewallRuleDescription { + get { + return ResourceManager.GetString("NewAzureSqlDatabaseServerFirewallRuleDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to add the firewall rule "{0}" for Microsoft Azure Sql Database server "{1}"?. + /// + internal static string NewAzureSqlDatabaseServerFirewallRuleWarning { + get { + return ResourceManager.GetString("NewAzureSqlDatabaseServerFirewallRuleWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to create a new Microsoft Azure Sql Database server?. + /// + internal static string NewAzureSqlDatabaseServerWarning { + get { + return ResourceManager.GetString("NewAzureSqlDatabaseServerWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to create a new Microsoft Azure Sql Database?. + /// + internal static string NewAzureSqlDatabaseWarning { + get { + return ResourceManager.GetString("NewAzureSqlDatabaseWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing Microsoft Azure Sql Database "{0}.{1}".. + /// + internal static string RemoveAzureSqlDatabaseDescription { + get { + return ResourceManager.GetString("RemoveAzureSqlDatabaseDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing Microsoft Azure Sql Database server "{0}".. + /// + internal static string RemoveAzureSqlDatabaseServerDescription { + get { + return ResourceManager.GetString("RemoveAzureSqlDatabaseServerDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing firewall rule "{0}" for Microsoft Azure Sql Database server "{1}".. + /// + internal static string RemoveAzureSqlDatabaseServerFirewallRuleDescription { + get { + return ResourceManager.GetString("RemoveAzureSqlDatabaseServerFirewallRuleDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the firewall rule "{0}" for Microsoft Azure Sql Database server "{1}"?. + /// + internal static string RemoveAzureSqlDatabaseServerFirewallRuleWarning { + get { + return ResourceManager.GetString("RemoveAzureSqlDatabaseServerFirewallRuleWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Microsoft Azure Sql Database server "{0}"?. + /// + internal static string RemoveAzureSqlDatabaseServerWarning { + get { + return ResourceManager.GetString("RemoveAzureSqlDatabaseServerWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Microsoft Azure Sql Database "{0}.{1}"?. + /// + internal static string RemoveAzureSqlDatabaseWarning { + get { + return ResourceManager.GetString("RemoveAzureSqlDatabaseWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid parameters: The RestorableDropped switch must be specified to use the parameter {0}.. + /// + internal static string RestorableDroppedSwitchNotSpecified { + get { + return ResourceManager.GetString("RestorableDroppedSwitchNotSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service objective '{1}' was not found on server '{0}'.. + /// + internal static string ServiceObjectiveNotFound { + get { + return ResourceManager.GetString("ServiceObjectiveNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Updating database "{1}" for Microsoft Azure Sql Database server "{0}".. + /// + internal static string SetAzureSqlDatabaseDescription { + get { + return ResourceManager.GetString("SetAzureSqlDatabaseDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resetting administrator password for Microsoft Azure Sql Database server "{0}".. + /// + internal static string SetAzureSqlDatabaseServerAdminPasswordDescription { + get { + return ResourceManager.GetString("SetAzureSqlDatabaseServerAdminPasswordDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to reset the administrator password for Microsoft Azure Sql Database server "{0}"?. + /// + internal static string SetAzureSqlDatabaseServerAdminPasswordWarning { + get { + return ResourceManager.GetString("SetAzureSqlDatabaseServerAdminPasswordWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Updating firewall rule "{0}" for Microsoft Azure Sql Database server "{1}".. + /// + internal static string SetAzureSqlDatabaseServerFirewallRuleDescription { + get { + return ResourceManager.GetString("SetAzureSqlDatabaseServerFirewallRuleDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to update the firewall rule "{0}" for Microsoft Azure Sql Database server "{1}"?. + /// + internal static string SetAzureSqlDatabaseServerFirewallRuleWarning { + get { + return ResourceManager.GetString("SetAzureSqlDatabaseServerFirewallRuleWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to change the service objective for database "{1}" in Microsoft Azure Sql Database server "{0}"? A change to the service objective will significantly change the cost of this database.. + /// + internal static string SetAzureSqlDatabaseServiceObjectiveWarning { + get { + return ResourceManager.GetString("SetAzureSqlDatabaseServiceObjectiveWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to update database "{1}" for Microsoft Azure Sql Database server "{0}"?. + /// + internal static string SetAzureSqlDatabaseWarning { + get { + return ResourceManager.GetString("SetAzureSqlDatabaseWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Confirm. + /// + internal static string ShouldProcessCaption { + get { + return ResourceManager.GetString("ShouldProcessCaption", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This operation does not support SQL authentication.. + /// + internal static string SqlAuthNotSupported { + get { + return ResourceManager.GetString("SqlAuthNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Copying Microsoft Azure Sql Database "{0}.{1}" to "{2}.{3}".. + /// + internal static string StartAzureSqlDatabaseCopyDescription { + get { + return ResourceManager.GetString("StartAzureSqlDatabaseCopyDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to copy Microsoft Azure Sql Database "{0}.{1}" to "{2}.{3}"?. + /// + internal static string StartAzureSqlDatabaseCopyWarning { + get { + return ResourceManager.GetString("StartAzureSqlDatabaseCopyWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Terminating the database copy from "{0}.{1}" to "{2}.{3}".. + /// + internal static string StopAzureSqlDatabaseCopyDescription { + get { + return ResourceManager.GetString("StopAzureSqlDatabaseCopyDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to terminate the database copy from "{0}.{1}" to "{2}.{3}"?. + /// + internal static string StopAzureSqlDatabaseCopyWarning { + get { + return ResourceManager.GetString("StopAzureSqlDatabaseCopyWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unknown ParameterSet specified.. + /// + internal static string UnknownParameterSet { + get { + return ResourceManager.GetString("UnknownParameterSet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} does not exist.. + /// + internal static string UriDoesNotExist { + get { + return ResourceManager.GetString("UriDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The client model does not match the server model. While the current set of Cmdlets may continue to work, it is recommended that you update to the latest version of Microsoft Azure PowerShell to ensure full compatibility.. + /// + internal static string WarningModelOutOfDate { + get { + return ResourceManager.GetString("WarningModelOutOfDate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The asyncResult object was not created by a preceding call of the BeginCreate method from the same control.. + /// + internal static string WrongAsyncResultForCreate { + get { + return ResourceManager.GetString("WrongAsyncResultForCreate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The asyncResult object was not created by a preceding call of the BeginGetAccessToken method from the same control.. + /// + internal static string WrongAsyncResultForGetAccessToken { + get { + return ResourceManager.GetString("WrongAsyncResultForGetAccessToken", resourceCulture); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Properties/Resources.resx b/src/ServiceManagement/Sql/Commands.SqlDatabase/Properties/Resources.resx new file mode 100644 index 000000000000..46735c5ec86a --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Properties/Resources.resx @@ -0,0 +1,319 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Invalid Parameter combination: Both "DatabaseName" and "DatabaseDeletionDate" need to be specified to get a restorable dropped database. + Parameter validation + + + The Sql Authenticate Credential was not specified. + Parameter validation + + + Database Copy from '{0}.{1}' to '{2}.{3}' not found. + Parameter Validation + + + There is no database copy matching the specified filter. Please revise the filter criteria to specify one existing database copy. + + + {1} +Error Code: {0} + Generic + + + Database '{0}.{1}' not found. + Parameter Validation + + + Could not found operations on Database '{0}.{1}'. + Parameter validation + + + An error occurred while refreshing database. + + + An error occurred while refreshing database copy status. + + + Client Request Id: '{0}' + Tracing IDs + + + Client Session Id: '{0}' + Tracing IDs + + + Request Id: '{0}' + Tracing IDs + + + The firewall rule "{0}" could not be found in the Microsoft Azure Sql Database server "{1}". + + + The Microsoft Azure Sql Database server "{0}" could not be found in the currently selected subscription. + + + Database '{0}.{1}' with deletion date '{2}' not found. + + + Invalid authentication for '{0}'. + Bad operation workflow or sequencing + + + Invalid error object in the response. + Bad operation workflow or sequencing + + + Invalid exception message format. + Bad operation workflow or sequencing + + + Invalid Parameter combination: {0} and {1} parameters cannot be used together. + + + There are more than one database copy matching the specified filter. Please revise the filter criteria to specify only one database copy. + Parameter validation + + + Creating a new Microsoft Azure Sql Database. + Process workflow + + + Creating a new Microsoft Azure Sql Database server. + Process workflow + + + Adding firewall rule "{0}" for Microsoft Azure Sql Database server "{1}". + Process workflow + + + Are you sure you want to add the firewall rule "{0}" for Microsoft Azure Sql Database server "{1}"? + Process workflow + + + Are you sure you want to create a new Microsoft Azure Sql Database server? + Process workflow + + + Are you sure you want to create a new Microsoft Azure Sql Database? + Process workflow + + + Removing Microsoft Azure Sql Database "{0}.{1}". + Process workflow + + + Removing Microsoft Azure Sql Database server "{0}". + Process workflow + + + Removing firewall rule "{0}" for Microsoft Azure Sql Database server "{1}". + Process workflow + + + Are you sure you want to remove the firewall rule "{0}" for Microsoft Azure Sql Database server "{1}"? + Process workflow + + + Are you sure you want to remove the Microsoft Azure Sql Database server "{0}"? + Process workflow + + + Are you sure you want to remove the Microsoft Azure Sql Database "{0}.{1}"? + Process workflow + + + Invalid parameters: The RestorableDropped switch must be specified to use the parameter {0}. + Parameter validation + + + Service objective '{1}' was not found on server '{0}'. + + + Updating database "{1}" for Microsoft Azure Sql Database server "{0}". + Process workflow + + + Resetting administrator password for Microsoft Azure Sql Database server "{0}". + Process workflow + + + Are you sure you want to reset the administrator password for Microsoft Azure Sql Database server "{0}"? + Process workflow + + + Updating firewall rule "{0}" for Microsoft Azure Sql Database server "{1}". + Process workflow + + + Are you sure you want to update the firewall rule "{0}" for Microsoft Azure Sql Database server "{1}"? + Process workflow + + + Are you sure you want to change the service objective for database "{1}" in Microsoft Azure Sql Database server "{0}"? A change to the service objective will significantly change the cost of this database. + Process workflow + + + Are you sure you want to update database "{1}" for Microsoft Azure Sql Database server "{0}"? + Process workflow + + + Confirm + Process workflow + + + This operation does not support SQL authentication. + + + Copying Microsoft Azure Sql Database "{0}.{1}" to "{2}.{3}". + Process workflow + + + Are you sure you want to copy Microsoft Azure Sql Database "{0}.{1}" to "{2}.{3}"? + Process workflow + + + Terminating the database copy from "{0}.{1}" to "{2}.{3}". + Process workflow + + + Are you sure you want to terminate the database copy from "{0}.{1}" to "{2}.{3}"? + Process workflow + + + Unknown ParameterSet specified. + Parameter Validation + + + {0} does not exist. + Generic + + + The client model does not match the server model. While the current set of Cmdlets may continue to work, it is recommended that you update to the latest version of Microsoft Azure PowerShell to ensure full compatibility. + + + The asyncResult object was not created by a preceding call of the BeginCreate method from the same control. + Parameter validation + + + The asyncResult object was not created by a preceding call of the BeginGetAccessToken method from the same control. + Parameter validation + + \ No newline at end of file diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Server/Cmdlet/GetAzureSqlDatabaseServer.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Server/Cmdlet/GetAzureSqlDatabaseServer.cs new file mode 100644 index 000000000000..c3c73fd34251 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Server/Cmdlet/GetAzureSqlDatabaseServer.cs @@ -0,0 +1,109 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Model; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Properties; +using Microsoft.WindowsAzure.Management.Sql; +using Microsoft.WindowsAzure.Management.Sql.Models; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Server.Cmdlet +{ + /// + /// Retrieves a list of Microsoft Azure SQL Database servers in the selected subscription. + /// + [Cmdlet(VerbsCommon.Get, "AzureSqlDatabaseServer", ConfirmImpact = ConfirmImpact.None)] + public class GetAzureSqlDatabaseServer : SqlDatabaseCmdletBase + { + [Parameter(Position = 0, ValueFromPipelineByPropertyName = true, + HelpMessage = "SQL Database server name.")] + [ValidateNotNullOrEmpty] + public string ServerName + { + get; + set; + } + + /// + /// Retrieves one or more servers in the current subscription. + /// + /// + /// The specific name of the server to retrieve, or null to + /// retrieve all servers in the current subscription. + /// + /// A list of servers in the subscription. + internal IEnumerable GetAzureSqlDatabaseServersProcess(string serverName) + { + // Get the SQL management client for the current subscription + SqlManagementClient sqlManagementClient = GetCurrentSqlClient(); + + // Retrieve the list of servers + ServerListResponse response = sqlManagementClient.Servers.List(); + IEnumerable servers = response.Servers; + if (!string.IsNullOrEmpty(serverName)) + { + // Server name is specified, find the one with the + // specified rule name and return that. + servers = response.Servers.Where(s => s.Name == serverName); + if (!servers.Any()) + { + throw new ItemNotFoundException(string.Format( + CultureInfo.InvariantCulture, + Resources.GetAzureSqlDatabaseServerNotFound, + serverName)); + } + } + else + { + // Server name is not specified, return all servers + // in the subscription. + } + + // Construct the result + IEnumerable processResult = servers.Select(server => new SqlDatabaseServerContext + { + OperationStatus = Services.Constants.OperationSuccess, + OperationDescription = CommandRuntime.ToString(), + OperationId = response.RequestId, + ServerName = server.Name, + Location = server.Location, + Version = server.Version, + AdministratorLogin = server.AdministratorUserName, + State = server.State, + }); + + return processResult; + } + + /// + /// Execute the command. + /// + public override void ExecuteCmdlet() + { + try + { + var servers = this.GetAzureSqlDatabaseServersProcess(this.ServerName); + this.WriteObject(servers, true); + } + catch (Exception ex) + { + this.WriteErrorDetails(ex); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Server/Cmdlet/GetAzureSqlDatabaseServerQuota.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Server/Cmdlet/GetAzureSqlDatabaseServerQuota.cs new file mode 100644 index 000000000000..a34d071fa9e3 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Server/Cmdlet/GetAzureSqlDatabaseServerQuota.cs @@ -0,0 +1,185 @@ +// ---------------------------------------------------------------------------------- +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Model; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Properties; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Common; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server; +using Microsoft.WindowsAzure.Management.Sql; +using Microsoft.WindowsAzure.Management.Sql.Models; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Server.Cmdlet +{ + /// + /// Retrieves a list of Microsoft Azure SQL Database server quotas for the selected server. + /// + [Cmdlet(VerbsCommon.Get, "AzureSqlDatabaseServerQuota", ConfirmImpact = ConfirmImpact.None)] + public class GetAzureSqlDatabaseServerQuota : SqlDatabaseCmdletBase + { + #region Parameter Sets + + /// + /// The name of the parameter set for connection with a connection context + /// + internal const string ByConnectionContext = + "ByConnectionContext"; + + /// + /// The name of the parameter set for connecting with an azure subscription + /// + internal const string ByServerName = + "ByServerName"; + + #endregion + + #region Parameters + + /// + /// Gets or sets the server connection context. + /// + [Alias("Context")] + [Parameter(Mandatory = true, Position = 0, ValueFromPipeline = true, + ValueFromPipelineByPropertyName = true, + ParameterSetName = ByConnectionContext, + HelpMessage = "The connection context to the specified server.")] + [ValidateNotNull] + public IServerDataServiceContext ConnectionContext { get; set; } + + /// + /// Gets or sets the name of the server to connect to + /// + [Parameter(Mandatory = true, Position = 0, ValueFromPipelineByPropertyName = true, + ParameterSetName = ByServerName, + HelpMessage = "The name of the server to connect to using the current subscription")] + [ValidateNotNullOrEmpty] + public string ServerName { get; set; } + + /// + /// Gets or sets the name of the server quota to retrieve + /// + [Parameter(Position = 1, Mandatory = false, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The name of the quota to retrieve")] + [ValidateNotNullOrEmpty] + public string QuotaName { get; set; } + + #endregion + + /// + /// Execute the command. + /// + public override void ExecuteCmdlet() + { + // Obtain the quota name from the given parameters. + string quotaName = null; + if (this.MyInvocation.BoundParameters.ContainsKey("QuotaName")) + { + quotaName = this.QuotaName; + } + + switch(this.ParameterSetName) + { + case ByConnectionContext: + this.ProcessWithConnectionContext(quotaName); + break; + case ByServerName: + this.ProcessWithServerName(quotaName); + break; + } + } + + /// + /// Process the get quota request using the supplied connection context. This can be a connection + /// context that was created using Sql Authentication or Certificate authentication. + /// + /// + private void ProcessWithConnectionContext(string quotaName) + { + try + { + if (!string.IsNullOrEmpty(quotaName)) + { + // Retrieve the quota with the specified name + this.WriteObject(this.ConnectionContext.GetQuota(quotaName)); + } + else + { + // No name specified, retrieve all quotas in the server + this.WriteObject(this.ConnectionContext.GetQuotas(), true); + } + } + catch (Exception ex) + { + SqlDatabaseExceptionHandler.WriteErrorDetails( + this, + this.ConnectionContext.ClientRequestId, + ex); + } + } + + /// + /// Process the get quota request using the supplied server name. This will use the REST API + /// to make the request. + /// + /// + private void ProcessWithServerName(string quotaName) + { + try + { + SqlManagementClient sqlManagementClient = GetCurrentSqlClient(); + + // Retrieve the list of servers + QuotaListResponse response = sqlManagementClient.Quotas.List(this.ServerName); + IEnumerable quotas = response.Quotas; + if (!string.IsNullOrEmpty(quotaName)) + { + // Quota name is specified, find the one with the + // same name. + quotas = response.Quotas.Where(q => q.Name == quotaName); + if (quotas.Count() == 0) + { + throw new ItemNotFoundException(string.Format( + CultureInfo.InvariantCulture, + Resources.GetAzureSqlDatabaseServerNotFound, + quotaName)); + } + } + + // Construct the result + IEnumerable processResult = quotas.Select( + quota => new SqlDatabaseServerQuotaContext + { + OperationStatus = Services.Constants.OperationSuccess, + OperationDescription = CommandRuntime.ToString(), + OperationId = response.RequestId, + ServerName = this.ServerName, + Name = quota.Name, + State = quota.State, + Type = quota.Type, + Value = quota.Value, + }); + + this.WriteObject(processResult); + } + catch(Exception ex) + { + this.WriteErrorDetails(ex); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Server/Cmdlet/NewAzureSqlDatabaseServer.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Server/Cmdlet/NewAzureSqlDatabaseServer.cs new file mode 100644 index 000000000000..999c010346e6 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Server/Cmdlet/NewAzureSqlDatabaseServer.cs @@ -0,0 +1,166 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.SqlDatabase.Model; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Properties; +using Microsoft.WindowsAzure.Common.Internals; +using Microsoft.WindowsAzure.Management.Sql; +using Microsoft.WindowsAzure.Management.Sql.Models; +using System; +using System.Management.Automation; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Server.Cmdlet +{ + + /// + /// Creates a new Microsoft Azure SQL Database server in the selected subscription. + /// + [Cmdlet(VerbsCommon.New, "AzureSqlDatabaseServer", SupportsShouldProcess = true, + ConfirmImpact = ConfirmImpact.Low)] + public class NewAzureSqlDatabaseServer : SqlDatabaseCmdletBase + { + [Parameter(Position = 0, Mandatory = true, + HelpMessage = "Administrator login name for the new SQL Database server.")] + [ValidateNotNullOrEmpty] + public string AdministratorLogin + { + get; + set; + } + + [Parameter(Mandatory = true, + HelpMessage = "Administrator login password for the new SQL Database server.")] + [ValidateNotNullOrEmpty] + public string AdministratorLoginPassword + { + get; + set; + } + + [Parameter(Mandatory = true, + HelpMessage = "Location in which to create the new SQL Database server.")] + [ValidateNotNullOrEmpty] + public string Location + { + get; + set; + } + + [Parameter(Mandatory = false, + HelpMessage = "The version for the server that will be created.")] + public float Version + { + get; + set; + } + + [Parameter(HelpMessage = "Do not confirm on the creation of the server")] + public SwitchParameter Force + { + get; + set; + } + + /// + /// Creates a new server in the current subscription. + /// + /// + /// The administrator login name for the new server. + /// + /// + /// The administrator login password for the new server. + /// + /// + /// The location in which to create the new server. + /// + /// The context to the newly created server. + internal SqlDatabaseServerContext NewAzureSqlDatabaseServerProcess( + string adminLogin, + string adminLoginPassword, + string location, + float? version) + { + // Do nothing if force is not specified and user cancelled the operation + if (!Force.IsPresent && + !ShouldProcess( + Resources.NewAzureSqlDatabaseServerDescription, + Resources.NewAzureSqlDatabaseServerWarning, + Resources.ShouldProcessCaption)) + { + return null; + } + + // Get the SQL management client for the current subscription + SqlManagementClient sqlManagementClient = GetCurrentSqlClient(); + + // Set the retry policty to not retry attempts. + CloudExtensions.SetRetryPolicy( + sqlManagementClient, + new WindowsAzure.Common.TransientFaultHandling.RetryPolicy(new WindowsAzure.Common.TransientFaultHandling.DefaultHttpErrorDetectionStrategy(), 0)); + + // Issue the create server request + ServerCreateResponse response = sqlManagementClient.Servers.Create( + new ServerCreateParameters() + { + Location = location, + AdministratorUserName = adminLogin, + AdministratorPassword = adminLoginPassword, + Version = version.HasValue ? version.Value.ToString("F1") : null + }); + + SqlDatabaseServerContext operationContext = new SqlDatabaseServerContext() + { + OperationStatus = Services.Constants.OperationSuccess, + OperationDescription = CommandRuntime.ToString(), + OperationId = response.RequestId, + ServerName = response.ServerName, + Location = location, + AdministratorLogin = adminLogin, + }; + + return operationContext; + } + + /// + /// Execute the command. + /// + public override void ExecuteCmdlet() + { + try + { + // Get the version from the command line + float? version = null; + if (this.MyInvocation.BoundParameters.ContainsKey("Version")) + { + version = this.Version; + } + + SqlDatabaseServerContext context = this.NewAzureSqlDatabaseServerProcess( + this.AdministratorLogin, + this.AdministratorLoginPassword, + this.Location, + version); + + if (context != null) + { + WriteObject(context, true); + } + } + catch (Exception ex) + { + this.WriteErrorDetails(ex); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Server/Cmdlet/RemoveAzureSqlDatabaseServer.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Server/Cmdlet/RemoveAzureSqlDatabaseServer.cs new file mode 100644 index 000000000000..5591ed4dad5d --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Server/Cmdlet/RemoveAzureSqlDatabaseServer.cs @@ -0,0 +1,94 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Model; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Properties; +using Microsoft.WindowsAzure.Management.Sql; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Server.Cmdlet +{ + /// + /// Removes an existing Microsoft Azure SQL Database server in the selected subscription. + /// + [Cmdlet(VerbsCommon.Remove, "AzureSqlDatabaseServer", SupportsShouldProcess = true, + ConfirmImpact = ConfirmImpact.High)] + public class RemoveAzureSqlDatabaseServer : SqlDatabaseCmdletBase + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "SQL Database server name.")] + [ValidateNotNullOrEmpty] + public string ServerName + { + get; + set; + } + + [Parameter(HelpMessage = "Do not confirm on the deletion of the server")] + public SwitchParameter Force + { + get; + set; + } + + /// + /// Removes an existing server in the current subscription. + /// + /// The name of the server to remove. + /// The context to this operation. + internal SqlDatabaseServerOperationContext RemoveAzureSqlDatabaseServerProcess(string serverName) + { + // Do nothing if force is not specified and user cancelled the operation + if (!Force.IsPresent && + !ShouldProcess( + string.Format(CultureInfo.InvariantCulture, Resources.RemoveAzureSqlDatabaseServerDescription, serverName), + string.Format(CultureInfo.InvariantCulture, Resources.RemoveAzureSqlDatabaseServerWarning, serverName), + Resources.ShouldProcessCaption)) + { + return null; + } + + // Get the SQL management client for the current subscription + SqlManagementClient sqlManagementClient = GetCurrentSqlClient(); + + // Issue the delete server request + OperationResponse response = sqlManagementClient.Servers.Delete(serverName); + SqlDatabaseServerOperationContext operationContext = new SqlDatabaseServerOperationContext() + { + OperationStatus = Services.Constants.OperationSuccess, + OperationDescription = CommandRuntime.ToString(), + OperationId = response.RequestId, + ServerName = serverName, + }; + + return operationContext; + } + + /// + /// Execute the command. + /// + public override void ExecuteCmdlet() + { + try + { + this.RemoveAzureSqlDatabaseServerProcess(this.ServerName); + } + catch (Exception ex) + { + this.WriteErrorDetails(ex); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Server/Cmdlet/SetAzureSqlDatabaseServer.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Server/Cmdlet/SetAzureSqlDatabaseServer.cs new file mode 100644 index 000000000000..6b853630b4fc --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Server/Cmdlet/SetAzureSqlDatabaseServer.cs @@ -0,0 +1,115 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Model; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Properties; +using Microsoft.WindowsAzure.Management.Sql; +using Microsoft.WindowsAzure.Management.Sql.Models; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Server.Cmdlet +{ + /// + /// Update settings for an existing Microsoft Azure SQL Database server in the selected subscription. + /// + [Cmdlet(VerbsCommon.Set, "AzureSqlDatabaseServer", SupportsShouldProcess = true, + ConfirmImpact = ConfirmImpact.Medium)] + public class SetAzureSqlDatabaseServer : SqlDatabaseCmdletBase + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "SQL Database server name.")] + [ValidateNotNullOrEmpty] + public string ServerName + { + get; + set; + } + + [Parameter(Mandatory = true, ParameterSetName = "ResetServerAdminPassword", HelpMessage = "SQL Database administrator login password.")] + [ValidateNotNullOrEmpty] + public string AdminPassword + { + get; + set; + } + + [Parameter(HelpMessage = "Do not confirm on the change of administrator login password for the server")] + public SwitchParameter Force + { + get; + set; + } + + /// + /// Resets the administrator password for an existing server in the + /// current subscription. + /// + /// + /// The name of the server for which to reset the password. + /// + /// + /// The new password for the server. + /// + /// The context to this operation. + internal SqlDatabaseServerOperationContext ResetAzureSqlDatabaseServerAdminPasswordProcess(string serverName, string newPassword) + { + // Do nothing if force is not specified and user cancelled the operation + if (!Force.IsPresent && + !ShouldProcess( + string.Format(CultureInfo.InvariantCulture, Resources.SetAzureSqlDatabaseServerAdminPasswordDescription, serverName), + string.Format(CultureInfo.InvariantCulture, Resources.SetAzureSqlDatabaseServerAdminPasswordWarning, serverName), + Resources.ShouldProcessCaption)) + { + return null; + } + + // Get the SQL management client for the current subscription + SqlManagementClient sqlManagementClient = GetCurrentSqlClient(); + + // Issue the change admin password request + OperationResponse response = sqlManagementClient.Servers.ChangeAdministratorPassword( + serverName, + new ServerChangeAdministratorPasswordParameters() + { + NewPassword = newPassword + }); + + SqlDatabaseServerOperationContext operationContext = new SqlDatabaseServerOperationContext() + { + OperationStatus = Services.Constants.OperationSuccess, + OperationDescription = CommandRuntime.ToString(), + OperationId = response.RequestId, + ServerName = serverName, + }; + + return operationContext; + } + + /// + /// Execute the command. + /// + public override void ExecuteCmdlet() + { + try + { + object operationContext = this.ResetAzureSqlDatabaseServerAdminPasswordProcess(this.ServerName, this.AdminPassword); + } + catch (Exception ex) + { + this.WriteErrorDetails(ex); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Common/AccessTokenResult.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Common/AccessTokenResult.cs new file mode 100644 index 000000000000..43525dfb0089 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Common/AccessTokenResult.cs @@ -0,0 +1,87 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Net; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Properties; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Common +{ + /// + /// Represents the result returned by the Management Service when executing GetAccessToken + /// operation. + /// + public class AccessTokenResult + { + private readonly string accessToken; + private readonly Cookie accessCookie; + + /// + /// Initializes a new instance of the class with the specified + /// access token and cookie. + /// + /// The that represents the result token. + /// The result access . + public AccessTokenResult(string accessToken, Cookie accessCookie) + { + if (accessToken == null) + { + throw new ArgumentNullException("accessToken"); + } + + if (accessCookie == null) + { + throw new ArgumentNullException("accessCookie"); + } + + this.accessToken = accessToken; + this.accessCookie = accessCookie; + } + + /// + /// Gets a string that represents the result access token. + /// + public string AccessToken + { + get { return this.accessToken; } + } + + /// + /// Gets the result access . + /// + public Cookie AccessCookie + { + get { return this.accessCookie; } + } + + /// + /// Validates the specified object and throws an exception + /// in case it is invalid. + /// + /// The server root . + /// The object to be validated. + internal static void ValidateAccessToken(Uri serviceRoot, AccessTokenResult accessToken) + { + if (accessToken == null) + { + throw new InvalidOperationException( + string.Format( + CultureInfo.InvariantCulture, + Resources.InvalidAuthentication, + serviceRoot.AbsoluteUri.ToString())); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Common/DataConnectionUtility.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Common/DataConnectionUtility.cs new file mode 100644 index 000000000000..6a202fd90c71 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Common/DataConnectionUtility.cs @@ -0,0 +1,186 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Data.Services.Client; +using System.IO; +using System.Linq; +using System.Net; +using System.Security.Cryptography; +using System.Text; +using System.Xml.Linq; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Common +{ + /// + /// Connection-level utilities. + /// + public static class DataConnectionUtility + { + /// + /// An array of all relevant entity names in the metadata document. + /// + private static readonly string[] RelevantEntities = + { + "Server", + "Database" + }; + + /// + /// An array of all relevant associations in the metadata document. + /// + private static readonly string[] RelevantAssociations = + { + "Server_Databases_Database_Server" + }; + + /// + /// Gets the default management service for the given manageUri. + /// + /// The host + /// The web service + public static Uri GetManagementServiceUri(Uri manageUrl) + { + if (manageUrl == null) + { + throw new ArgumentNullException("manageUrl"); + } + + return GetWebServiceUri(manageUrl, DataServiceConstants.ManagementServiceUri); + } + + /// + /// Gets the web service for the given manageUri and the relative + /// service Uri. + /// + /// The host + /// The service name + /// The web service + public static Uri GetWebServiceUri(Uri manageUrl, string relativeServiceUri) + { + if (manageUrl == null) + { + throw new ArgumentNullException("manageUrl"); + } + + if (string.IsNullOrEmpty(relativeServiceUri)) + { + throw new ArgumentException("relativeServiceUri"); + } + + return new Uri(manageUrl, relativeServiceUri); + } + + /// + /// Gets the access token service for the given host . + /// + /// The management service . + /// The acceess token for the given management service. + public static Uri GetAccessTokenUri(Uri managementServiceUri) + { + if (managementServiceUri == null) + { + throw new ArgumentNullException("managementServiceUri"); + } + + return new Uri(managementServiceUri, DataServiceConstants.AccessTokenOperation); + } + + /// + /// Get the metadata for the given data service context. + /// + /// The data service context. + /// The action delegate to enhance the request prior to sending. + /// The type. + /// The metadata . + public static XDocument GetMetadata(T context, Action enhanceRequest) + where T : DataServiceContext + { + if (context == null) + { + throw new ArgumentNullException("context"); + } + + HttpWebRequest request = HttpWebRequest.Create(context.GetMetadataUri()) as HttpWebRequest; + request.Method = "GET"; + + // Enhance the request such as adding an auth token or certificate to the header + // Usually this is the same event hook added for processing all WCF requests + if (enhanceRequest != null) + { + enhanceRequest(context, request); + } + + HttpWebResponse response = request.GetResponse() as HttpWebResponse; + Stream stream = response.GetResponseStream(); + using (StreamReader reader = new StreamReader(stream, Encoding.UTF8)) + { + XDocument xmlDocument = XDocument.Load(reader); + return xmlDocument; + } + } + + /// + /// Gets the hash for the metadata document. + /// + /// The metadata document to calculate hash for. + /// The hex string representation of the metadata hash. + public static string GetDocumentHash(XDocument metadata) + { + string metadataString = metadata.ToString(SaveOptions.DisableFormatting); + + using (SHA1 sha = new SHA1CryptoServiceProvider()) + { + byte[] result = sha.ComputeHash(Encoding.UTF8.GetBytes(metadataString)); + return BitConverter.ToString(result).Replace("-", string.Empty); + } + } + + /// + /// Filter a given metadata document to contain only relevant entities. + /// + /// The metadata document to calculate hash for. + /// A filtered document containing only relevant entities. + public static XDocument FilterMetadataDocument(XDocument metadata) + { + // Clone the input metadata document. + XDocument filteredDoc = XDocument.Parse(metadata.ToString()); + + // Filter out the EntityContainer. + XElement entityContainer = filteredDoc.Root.Descendants() + .Where(n => n.Name.LocalName == "EntityContainer") + .SingleOrDefault(); + if (entityContainer != null) + { + entityContainer.Remove(); + } + + // Remove any entities that's not relevant to the Cmdlets. + XElement[] entitiesToRemove = filteredDoc.Root.Descendants() + .Where(n => n.Name.LocalName == "EntityType") + .Where(n => !RelevantEntities.Contains(n.Attribute("Name").Value)) + .ToArray(); + XElement[] associationsToRemove = filteredDoc.Root.Descendants() + .Where(n => n.Name.LocalName == "Association") + .Where(n => !RelevantAssociations.Contains(n.Attribute("Name").Value)) + .ToArray(); + foreach (XElement elementToRemove in entitiesToRemove.Concat(associationsToRemove)) + { + elementToRemove.Remove(); + } + + return filteredDoc; + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Common/DataServiceAccess.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Common/DataServiceAccess.cs new file mode 100644 index 000000000000..dede374f2e69 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Common/DataServiceAccess.cs @@ -0,0 +1,131 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.IO; +using System.Net; +using System.Text; +using System.Xml.Linq; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Common +{ + /// + /// Defines the implementation of the utility class. + /// + public static class DataServiceAccess + { + private const string LogOnServiceHeader = "sqlauthorization"; + private const string HeaderFormatter = "Basic {0}"; + + /// + /// Retrieves and returns the Management Service access token for the specified user credentials. + /// + /// The to the Management Service GetAccessToken operation. + /// The credentials to be used to authenticate the user. + /// An instance of with the retrieved access token and cookie. + public static AccessTokenResult GetAccessToken(Uri accessUri, SqlAuthenticationCredentials credentials) + { + if (accessUri == null) + { + throw new ArgumentNullException("accessUri"); + } + + if (credentials == null) + { + throw new ArgumentNullException("credentials"); + } + + HttpWebRequest request = CreateGetAccessTokenRequest(accessUri, credentials); + HttpWebResponse response = (HttpWebResponse)request.GetResponse(); + AccessTokenResult result = RetrieveAccessTokenFromResponse(response); + + return result; + } + + /// + /// Retrieves and returns the access token from the specified response or returns null + /// if was not retrieved. + /// + /// The to the Management Service GetAccessToken operation. + /// An instance of with the retrieved access token and cookie. + private static AccessTokenResult RetrieveAccessTokenFromResponse(HttpWebResponse response) + { + AccessTokenResult result = null; + + // Read the response into a stream + Stream dataStream = response.GetResponseStream(); + if (dataStream != null) + { + string tokenXml; + using (StreamReader streamReader = new StreamReader(dataStream, Encoding.UTF8)) + { + tokenXml = streamReader.ReadToEnd(); + } + + // Must have both a token and cookie for success + string accessToken = XElement.Parse(tokenXml).Value; + Cookie accessCookie = response.Cookies[DataServiceConstants.AccessCookie]; + + result = new AccessTokenResult(accessToken, accessCookie); + } + + return result; + } + + /// + /// Utility method that creates and returns an instance of that + /// connects to GetAccessToken WCF operation with the specified user name and password. + /// + /// The to the Management Service GetAccessToken operation. + /// The user name to retrieve the access token for. + /// The user password. + /// An instance of object. + private static HttpWebRequest CreateGetAccessTokenRequest(Uri accessUri, SqlAuthenticationCredentials credentials) + { + HttpWebRequest request = (HttpWebRequest)WebRequest.Create(accessUri); + + request.Method = "GET"; + + string escapedUserName = EscapeConnectionCredentials(credentials.UserName); + string escapedPassword = EscapeConnectionCredentials(credentials.Password); + + string escapedCredentials = string.Format( + CultureInfo.InvariantCulture, + "{0}:{1}", + escapedUserName, + escapedPassword); + + string encodedCredentials = Convert.ToBase64String(Encoding.UTF8.GetBytes(escapedCredentials)); + + request.Headers[LogOnServiceHeader] = string.Format(CultureInfo.InvariantCulture, HeaderFormatter, encodedCredentials); + request.UserAgent = ApiConstants.UserAgentHeaderValue; + + request.CookieContainer = new CookieContainer(); + + return request; + } + + /// + /// Returns the string value with escaped the \ and : characters + /// + /// The string to escape. + /// The escaped string. + private static string EscapeConnectionCredentials(string value) + { + return value.Replace("\\", "\\\\").Replace(":", "\\:"); + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Common/DataServiceBasicCredentials.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Common/DataServiceBasicCredentials.cs new file mode 100644 index 000000000000..4bd788f111a5 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Common/DataServiceBasicCredentials.cs @@ -0,0 +1,103 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Runtime.InteropServices; +using System.Security; +using System.Security.Permissions; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Common +{ + /// + /// Represents Sql Authentication credentials. + /// + public class SqlAuthenticationCredentials + { + private string userName; + private SecureString password; + + /// + /// Initializes a new instance of the class. + /// + /// The user name. + /// The encrypted password. + public SqlAuthenticationCredentials(string userName, SecureString password) + { + if (string.IsNullOrEmpty(userName)) + { + throw new ArgumentException("userName"); + } + + if (password == null) + { + throw new ArgumentNullException("password"); + } + + this.userName = userName; + this.password = password.Copy(); + this.password.MakeReadOnly(); + } + + /// + /// Gets the credential user name. + /// + public virtual string UserName + { + get { return this.userName; } + } + + /// + /// Gets the credential password in secure encrypted form. + /// + public virtual SecureString EncryptedPassword + { + get { return this.password; } + } + + /// + /// Gets the credential password in plain text. + /// + public virtual string Password + { + get + { + // This only works from the same logon and process context as when it was made, + // since it uses DPAPI to encode. + return Decrypt(this.password); + } + } + + /// + /// Convert a to a plain-text string representation. + /// This should only be used in a proetected context, and must be done in the same logon and process context + /// in which the was constructed. + /// + /// The encrypted . + /// The plain-text string representation. + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + private static string Decrypt(SecureString secureString) + { + IntPtr unmanagedString = IntPtr.Zero; + try + { + unmanagedString = Marshal.SecureStringToGlobalAllocUnicode(secureString); + return Marshal.PtrToStringUni(unmanagedString); + } + finally + { + Marshal.ZeroFreeGlobalAllocUnicode(unmanagedString); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Common/DataServiceConnectionType.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Common/DataServiceConnectionType.cs new file mode 100644 index 000000000000..c4d7fb52d303 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Common/DataServiceConnectionType.cs @@ -0,0 +1,120 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Common +{ + /// + /// The connection identification data which locates a unique data tier. + /// + public class DataServiceConnectionType + { + private const string ConnectionUriPattern = "'"; + private const string ConnectionUriReplacement = "''"; + + /// + /// The connection type. + /// + private readonly string connectionType; + + /// + /// The connection parameters for this connection type. + /// + private readonly string[] connectionParameters; + + /// + /// Lazily constructed relative entity . + /// + private Uri relativeEntityUri; + + /// + /// Initializes a new instance of the class given a + /// connection type and its location parameter values. + /// + /// The connection type. + /// The connection parameters for this connection type. + public DataServiceConnectionType(string connectionType, params string[] connectionParameters) + { + this.connectionType = connectionType; + this.connectionParameters = connectionParameters; + } + + /// + /// Gets the connection type. + /// + public string ConnectionType + { + get { return this.connectionType; } + } + + /// + /// Gets the connection parameters. + /// + public IEnumerable ConnectionParameters + { + get + { + foreach (string parameter in this.connectionParameters) + { + yield return parameter; + } + } + } + + /// + /// Gets the relative entity for this Connection Type. + /// ex. Entity('key1','key2') + /// + public Uri RelativeEntityUri + { + get + { + if (this.relativeEntityUri == null) + { + StringBuilder uriBuilder = new StringBuilder(EscapeConnectionString(this.ConnectionType)); + + // It is the caller's responsibility to not pass empty strings in the parameter + // enumeration to avoid having "()" at all when no parameters are considered present + if (this.ConnectionParameters.Count() > 0) + { + uriBuilder.Append("("); + string[] parameterList = this.ConnectionParameters.Select(s => + string.Format(CultureInfo.InvariantCulture, "'{0}'", EscapeConnectionString(s))).ToArray(); + uriBuilder.Append(string.Join(",", parameterList)); + uriBuilder.Append(")"); + } + + this.relativeEntityUri = new Uri(uriBuilder.ToString(), UriKind.Relative); + } + + return this.relativeEntityUri; + } + } + + /// + /// Escape the connection string. + /// + /// String to escape. + /// The escaped connection string. + private static string EscapeConnectionString(string unescapedString) + { + return unescapedString.Replace(ConnectionUriPattern, ConnectionUriReplacement); + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Common/DataServiceConstants.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Common/DataServiceConstants.cs new file mode 100644 index 000000000000..21384b7d1ef5 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Common/DataServiceConstants.cs @@ -0,0 +1,68 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Common +{ + /// + /// Define constants that are common for all DataService models. + /// + public static class DataServiceConstants + { + /// + /// The service endpoint for management service. + /// + public static readonly string ManagementServiceUri = "v1/ManagementService.svc/"; + + /// + /// The name of the Header that holds the session tracing activityId. + /// + public static readonly string SessionTraceActivityHeader = "x-ms-client-session-id"; + + /// + /// The name of the Header that holds the access token. + /// + public static readonly string AccessTokenHeader = "AccessToken"; + + /// + /// The name of the access cookie. + /// + public static readonly string AccessCookie = ".SQLSERVERMANAGEMENT"; + + /// + /// The relative to the GetAccessToken operation. + /// + public static readonly string AccessTokenOperation = "GetAccessToken"; + + /// + /// The name of a supplemental property added to the Exception.Data property bag when an exception should be + /// mapped to a SQL Server error. Identifies one of the message_id values in sys.messages. + /// + public static readonly string SqlMessageIdKey = "Microsoft.SqlServer.MessageId"; + + /// + /// The name of a supplemental property added to the Exception.Data property bag when an exception should be + /// mapped to a SQL Server error. Determines the severity level that is associated with the error. + /// + public static readonly string SqlMessageSeverityKey = "Microsoft.SqlServer.MessageSeverity"; + + /// + /// The name of a supplemental property added to the Exception.Data property bag when an + /// exception should be mapped to a SQL Server error. Identifies the text of a message in + /// sys.messages. + /// + public static readonly string SqlMessageTextKey = "Microsoft.SqlServer.MessageText"; + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Common/DataServiceExtensions.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Common/DataServiceExtensions.cs new file mode 100644 index 000000000000..a239d7592955 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Common/DataServiceExtensions.cs @@ -0,0 +1,60 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Data.Services.Client; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Common +{ + /// + /// Extension methods for objects. + /// + public static class DataServiceExtensions + { + /// + /// Detach the tracked entity and related links from the . + /// + /// The containing the entity. + /// The entity to detach. + public static void ClearTrackedEntity(this DataServiceContext context, object entity) + { + if (context == null) + { + throw new ArgumentNullException("context"); + } + + if (entity == null) + { + throw new ArgumentNullException("entity"); + } + + foreach (LinkDescriptor linkDescriptor in context.Links) + { + if (linkDescriptor.Source == entity || linkDescriptor.Target == entity) + { + context.DetachLink(linkDescriptor.Source, linkDescriptor.SourceProperty, linkDescriptor.Target); + } + } + + foreach (EntityDescriptor entityDescriptor in context.Entities) + { + if (entityDescriptor.Entity == entity) + { + context.Detach(entity); + break; + } + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Common/ManagementServiceExceptionInfo.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Common/ManagementServiceExceptionInfo.cs new file mode 100644 index 000000000000..0c79f779a041 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Common/ManagementServiceExceptionInfo.cs @@ -0,0 +1,312 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using System.Xml; +using System.Xml.Linq; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Properties; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Common +{ + /// + /// Struct that parse and store exception information from the Management Service. + /// + public struct ManagementServiceExceptionInfo + { + private const char EscapeChar = '\\'; + private const char KeyValueSeparatorChar = '='; + private const char PairSeparatorChar = ','; + + private static readonly Regex errorCodeParser = new Regex(@"(?.*):(?[0-9a-f\-]+)(\[(?.*)\])?", RegexOptions.Singleline | RegexOptions.Compiled); + + private readonly string errorType; + private readonly Guid activityId; + private readonly IDictionary propertyBag; + + private ManagementServiceExceptionInfo(string errorType, Guid activityId, IDictionary propertyBag) + { + this.errorType = errorType; + this.activityId = activityId; + this.propertyBag = propertyBag; + } + + /// + /// Gets the error type for the exception + /// + public string ErrorType + { + get { return this.errorType; } + } + + /// + /// Gets the activity Id for the exception + /// + public Guid ActivityId + { + get { return this.activityId; } + } + + /// + /// Gets the property bag for the exception + /// + public IDictionary PropertyBag + { + get { return this.propertyBag; } + } + + /// + /// Tries to convert the given exception message to a . + /// + /// The message containing the xml serialized error information. + /// The converted containing errors from the exception. + /// true if parsing succeeded. + public static bool TryParse(string message, out ManagementServiceExceptionInfo info) + { + string errorType; + Guid activityId; + IDictionary propertyBag; + + if (string.IsNullOrEmpty(message)) + { + // Empty message + info = default(ManagementServiceExceptionInfo); + return false; + } + + XDocument errorDocument; + try + { + errorDocument = XDocument.Parse(message); + } + catch (XmlException) + { + // Invalid xml + info = default(ManagementServiceExceptionInfo); + return false; + } + + if (errorDocument == null) + { + // Invalid xml + info = default(ManagementServiceExceptionInfo); + return false; + } + + // Attempt to get error information from the standard location in a DataServiceException. + XElement errorMessage; + errorMessage = errorDocument.Descendants().Where(x => x.Name.LocalName == "code").FirstOrDefault(); + + if (errorMessage == null) + { + // Attempt to get error information from the exception Message. This happens in the case of a WebServiceAuthenticationException + // being thrown by Management Service. + errorMessage = errorDocument.Descendants().Where(x => x.Name.LocalName == "Message").FirstOrDefault(); + + if (errorMessage == null) + { + // Unable to find an error message. + info = default(ManagementServiceExceptionInfo); + return false; + } + } + + // Use Regex to parse the message + Match code = errorCodeParser.Match(errorMessage.Value); + if (code == null) + { + // Regex parsing failed + info = default(ManagementServiceExceptionInfo); + return false; + } + + errorType = code.Groups["ErrorType"].Value; + + try + { + activityId = new Guid(code.Groups["ActivityId"].Value); + } + catch (FormatException) + { + // Guid parsing failed + info = default(ManagementServiceExceptionInfo); + return false; + } + + // Only parse the property bag if it exists + if (code.Groups["KeyValuePairs"].Success) + { + try + { + string dataStr = code.Groups["KeyValuePairs"].Value; + propertyBag = (IDictionary)Deserialize(dataStr); + } + catch (Exception) + { + // Invalid property bag + info = default(ManagementServiceExceptionInfo); + return false; + } + } + else + { + // create an empty property bag + propertyBag = (IDictionary)new Dictionary(); + } + + info = new ManagementServiceExceptionInfo(errorType, activityId, propertyBag); + return true; + } + + /// + /// Converts the given exception message to a . + /// + /// The message containing the xml serialized error information. + /// The converted containing errors from the exception + public static ManagementServiceExceptionInfo Parse(string message) + { + if (string.IsNullOrEmpty(message)) + { + throw new ArgumentException("message"); + } + + ManagementServiceExceptionInfo info; + if (ManagementServiceExceptionInfo.TryParse(message, out info)) + { + return info; + } + else + { + throw new FormatException(Resources.InvalidExceptionMessageFormat); + } + } + + /// + /// Tries to convert the given exception response to a . + /// + /// The response containing the xml serialized error information. + /// The converted containing errors from the exception. + /// true if parsing succeeded. + public static bool TryParse(System.Data.Services.Client.OperationResponse response, out ManagementServiceExceptionInfo info) + { + if (response != null && response.Error != null) + { + return ManagementServiceExceptionInfo.TryParse(response.Error.Message, out info); + } + + info = default(ManagementServiceExceptionInfo); + return false; + } + + /// + /// Converts the given exception response to a . + /// + /// The response containing the xml serialized error information. + /// The converted containing errors from the exception. + public static ManagementServiceExceptionInfo Parse(System.Data.Services.Client.OperationResponse response) + { + if (response == null) + { + throw new ArgumentNullException("response"); + } + + if (response.Error == null) + { + throw new ArgumentException(Resources.InvalidErrorInResponse, "response"); + } + + ManagementServiceExceptionInfo info; + if (ManagementServiceExceptionInfo.TryParse(response, out info)) + { + return info; + } + else + { + throw new FormatException(Resources.InvalidExceptionMessageFormat); + } + } + + /// + /// De-serializes a string representation of an exception data key/vlaue pairs. + /// + /// The string to de-serialize. + /// A dictionary that contains the key/value pairs. + private static IDictionary Deserialize(string str) + { + IDictionary data = new Dictionary(4); + + StringBuilder builder = new StringBuilder(str.Length); + + bool escaped = false; + + string key = null; + string value = null; + + for (int i = 0; i < str.Length; i++) + { + char c = str[i]; + + if (escaped) + { + // the character is escaped so we add it to the string that we build + builder.Append(c); + escaped = false; + } + else + { + switch (c) + { + case EscapeChar: + escaped = true; + break; + + case KeyValueSeparatorChar: + // we here identified a key + key = builder.ToString(); + builder.Length = 0; + break; + + case PairSeparatorChar: + // we here identified a key/value pair + value = builder.ToString(); + builder.Length = 0; + + // add a new key/value pair and reset their values + data[key] = value; + key = null; + value = null; + break; + + default: + // add all other characters to the string the we build + builder.Append(c); + break; + } + } + } + + if (key != null) + { + value = builder.ToString(); + data[key] = value; + } + + return data; + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Common/SqlDatabaseExceptionHandler.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Common/SqlDatabaseExceptionHandler.cs new file mode 100644 index 000000000000..8da72b859428 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Common/SqlDatabaseExceptionHandler.cs @@ -0,0 +1,435 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Data.Services.Client; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Net; +using System.ServiceModel; +using System.Xml.Linq; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Properties; +using Microsoft.WindowsAzure.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Common +{ + /// + /// The handler for all Sql Database exceptions. + /// + public static class SqlDatabaseExceptionHandler + { + /// + /// Process the exception that was thrown and write the error details. + /// + /// The cmdlet for which to write the error output. + /// The unique id for this request. + /// The exception that was thrown. + public static void WriteErrorDetails( + Cmdlet cmdlet, + string clientRequestId, + Exception exception) + { + string requestId; + ErrorRecord errorRecord = RetrieveExceptionDetails(exception, out requestId); + + // Write the request Id as a warning + if (requestId != null) + { + // requestId was availiable from the server response, write that as warning to the + // console. + cmdlet.WriteWarning(string.Format( + CultureInfo.InvariantCulture, + Resources.ExceptionRequestId, + requestId)); + } + else + { + // requestId was not availiable from the server response, write the client Ids that + // was sent. + cmdlet.WriteWarning(string.Format( + CultureInfo.InvariantCulture, + Resources.ExceptionClientSessionId, + SqlDatabaseCmdletBase.clientSessionId)); + cmdlet.WriteWarning(string.Format( + CultureInfo.InvariantCulture, + Resources.ExceptionClientRequestId, + clientRequestId)); + } + + // Write the actual errorRecord containing the exception details + cmdlet.WriteError(errorRecord); + } + + /// + /// Retrieves the exception details contained in the exception and wrap it in a PowerShell . + /// + /// The exception containing the error details. + /// An output parameter for the error record containing the error details. + /// An output parameter for the request Id present in the reponse headers. + internal static ErrorRecord RetrieveExceptionDetails( + Exception exception, + out string requestId) + { + ErrorRecord errorRecord = null; + requestId = null; + + // Look for known exceptions through the exceptions and inner exceptions + Exception innerException = exception; + while (innerException != null) + { + CloudException cloudException = innerException as CloudException; + if (cloudException != null) + { + errorRecord = cloudException.AsErrorRecord(out requestId); + break; + } + + DataServiceRequestException dataServiceRequestException = innerException as DataServiceRequestException; + if (dataServiceRequestException != null) + { + errorRecord = dataServiceRequestException.AsErrorRecord(); + break; + } + + DataServiceClientException dataServiceClientException = innerException as DataServiceClientException; + if (dataServiceClientException != null) + { + errorRecord = dataServiceClientException.AsErrorRecord(); + break; + } + + WebException webException = innerException as WebException; + if (webException != null) + { + errorRecord = webException.AsErrorRecord(out requestId); + break; + } + + innerException = innerException.InnerException; + } + + // If it's here, it was an unknown exception, wrap the original exception as is. + if (errorRecord == null) + { + errorRecord = new ErrorRecord(exception, string.Empty, ErrorCategory.NotSpecified, null); + } + + return errorRecord; + } + + /// + /// Process a and converts it to a PowerShell + /// , or null if that is not availaible. + /// + /// The that was thrown. + private static ErrorRecord AsErrorRecord(this DataServiceRequestException ex) + { + ErrorRecord errorRecord = null; + Exception exceptionToThrow = ex; + + // Look for Sql exception message in response, return that message if found. + foreach (ChangeOperationResponse change in ex.Response) + { + // Try to parse the extended properties in the Exception + ManagementServiceExceptionInfo info; + if (ManagementServiceExceptionInfo.TryParse(change, out info)) + { + if (info.PropertyBag.Contains(DataServiceConstants.SqlMessageTextKey)) + { + // Set the exception to throw as a new exception with the server message + string errorDetails = + info.PropertyBag[DataServiceConstants.SqlMessageTextKey].ToString(); + + errorRecord = new ErrorRecord( + new CommunicationException(errorDetails, ex), + string.Empty, + ErrorCategory.InvalidOperation, + null); + break; + } + } + } + + // Fall back to use the message in the message element if availiable + if (errorRecord == null) + { + foreach (ChangeOperationResponse change in ex.Response) + { + try + { + XElement errorRoot = XElement.Parse(change.Error.Message); + XElement messageElement = errorRoot.Descendants().Single(x => string.Equals(x.Name.LocalName, "message", StringComparison.OrdinalIgnoreCase)); + + errorRecord = new ErrorRecord( + new CommunicationException(messageElement.Value, ex), + string.Empty, + ErrorCategory.InvalidOperation, + null); + break; + } + catch (Exception) + { + // we hide any parsing error that might have happened because there is no need to expose + // additional errors + } + } + } + + // Return the resulting error record + return errorRecord; + } + + /// + /// Process a and converts it to a PowerShell + /// , or null if that is not availaible. + /// + /// The that was thrown. + private static ErrorRecord AsErrorRecord(this DataServiceClientException ex) + { + ErrorRecord errorRecord = null; + + // Attempt to parse OData message or custom web services message + try + { + XElement errorRoot = XElement.Parse(ex.Message); + XElement messageElement = errorRoot.Descendants().Where(x => string.Equals(x.Name.LocalName, "Message", StringComparison.OrdinalIgnoreCase)).FirstOrDefault(); + + errorRecord = new ErrorRecord( + new CommunicationException(messageElement.Value, ex), + string.Empty, + ErrorCategory.InvalidOperation, + null); + } + catch (Exception) + { + // we hide any parsing error that might have happened because there is no need to expose + // additional errors + } + + // Return the resulting error record + return errorRecord; + } + + /// + /// Process a and converts it to a PowerShell + /// , or null if that is not availaible. + /// + /// The that was thrown. + /// The request Id from the response, if it's availiable. + /// An containing the exception details, + /// or null if the exception cannot be parsed. + private static ErrorRecord AsErrorRecord( + this WebException ex, + out string requestId) + { + ErrorRecord errorRecord = null; + requestId = null; + + if (ex.Response != null) + { + HttpWebResponse response = ex.Response as HttpWebResponse; + + // Extract the request Ids + if (response.Headers != null) + { + requestId = response.Headers[Constants.RequestIdHeaderName]; + } + + // Retrieve the full exception response + Stream responseStream = response.GetResponseStream(); + string exceptionResponse; + using (StreamReader responseReader = new StreamReader(responseStream)) + { + exceptionResponse = responseReader.ReadToEnd(); + } + + // Check if it's a service resource error message + ServiceResourceError serviceResourceError; + if (errorRecord == null && + ServiceResourceError.TryParse(exceptionResponse, out serviceResourceError)) + { + errorRecord = new ErrorRecord( + new CommunicationException(serviceResourceError.Message, ex), + string.Empty, + ErrorCategory.InvalidOperation, + null); + } + + // Check if it's a management service error message + ManagementServiceExceptionInfo info; + if (errorRecord == null && + ManagementServiceExceptionInfo.TryParse(exceptionResponse, out info)) + { + if (info.PropertyBag.Contains(DataServiceConstants.SqlMessageTextKey)) + { + // Set the exception to throw as a new exception with the server message + string errorDetails = + info.PropertyBag[DataServiceConstants.SqlMessageTextKey].ToString(); + + errorRecord = new ErrorRecord( + new CommunicationException(errorDetails, ex), + string.Empty, + ErrorCategory.InvalidOperation, + null); + } + } + + // Check if it's a database management error message + SqlDatabaseManagementError databaseManagementError; + if (errorRecord == null && + SqlDatabaseManagementError.TryParse(exceptionResponse, out databaseManagementError)) + { + string errorDetails = string.Format( + CultureInfo.InvariantCulture, + Resources.DatabaseManagementErrorFormat, + databaseManagementError.Code, + databaseManagementError.Message); + + errorRecord = new ErrorRecord( + new CommunicationException(errorDetails, ex), + string.Empty, + ErrorCategory.InvalidOperation, + null); + } + + // Check if it's a not found message + if (errorRecord == null && + response.StatusCode == HttpStatusCode.NotFound) + { + string message = string.Format( + CultureInfo.InvariantCulture, + Resources.UriDoesNotExist, + response.ResponseUri.AbsoluteUri); + string errorDetails = string.Format( + CultureInfo.InvariantCulture, + Resources.DatabaseManagementErrorFormat, + response.StatusCode.ToString(), + message); + + errorRecord = new ErrorRecord( + new CommunicationException(errorDetails, ex), + string.Empty, + ErrorCategory.InvalidOperation, + null); + } + } + + // Return the resulting error record + return errorRecord; + } + + /// + /// Process a and converts it to a PowerShell + /// , or null if that is not availaible. + /// + /// The that was thrown. + /// The request Id from the response, if it's availiable. + /// An containing the exception details, + /// or null if the exception cannot be parsed. + private static ErrorRecord AsErrorRecord( + this CloudException ex, + out string requestId) + { + ErrorRecord errorRecord = null; + requestId = null; + + if (ex.Response != null) + { + CloudHttpResponseErrorInfo response = ex.Response; + + // Extract the request Ids + if (response.Headers != null && + response.Headers.ContainsKey(Constants.RequestIdHeaderName)) + { + requestId = response.Headers[Constants.RequestIdHeaderName].First(); + } + + // Check if it's a service resource error message + ServiceResourceError serviceResourceError; + if (errorRecord == null && + ServiceResourceError.TryParse(response.Content, out serviceResourceError)) + { + errorRecord = new ErrorRecord( + new CommunicationException(serviceResourceError.Message, ex), + string.Empty, + ErrorCategory.InvalidOperation, + null); + } + + // Check if it's a management service error message + ManagementServiceExceptionInfo info; + if (errorRecord == null && + ManagementServiceExceptionInfo.TryParse(response.Content, out info)) + { + if (info.PropertyBag.Contains(DataServiceConstants.SqlMessageTextKey)) + { + // Set the exception to throw as a new exception with the server message + string errorDetails = + info.PropertyBag[DataServiceConstants.SqlMessageTextKey].ToString(); + + errorRecord = new ErrorRecord( + new CommunicationException(errorDetails, ex), + string.Empty, + ErrorCategory.InvalidOperation, + null); + } + } + + // Check if it's a database management error message + SqlDatabaseManagementError databaseManagementError; + if (errorRecord == null && + SqlDatabaseManagementError.TryParse(response.Content, out databaseManagementError)) + { + string errorDetails = string.Format( + CultureInfo.InvariantCulture, + Resources.DatabaseManagementErrorFormat, + databaseManagementError.Code, + databaseManagementError.Message); + + errorRecord = new ErrorRecord( + new CommunicationException(errorDetails, ex), + string.Empty, + ErrorCategory.InvalidOperation, + null); + } + + // Check if it's a not found message + if (errorRecord == null && + response.StatusCode == HttpStatusCode.NotFound) + { + string message = string.Format( + CultureInfo.InvariantCulture, + Resources.UriDoesNotExist, + ex.Request.RequestUri.AbsoluteUri); + string errorDetails = string.Format( + CultureInfo.InvariantCulture, + Resources.DatabaseManagementErrorFormat, + response.StatusCode.ToString(), + message); + + errorRecord = new ErrorRecord( + new CommunicationException(errorDetails, ex), + string.Empty, + ErrorCategory.InvalidOperation, + null); + } + } + + // Return the resulting error record + return errorRecord; + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Constants.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Constants.cs new file mode 100644 index 000000000000..ceb794573bd3 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Constants.cs @@ -0,0 +1,26 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Services +{ + public class Constants + { + public const string SqlDatabaseManagementNamespace = "http://schemas.microsoft.com/sqlazure/2010/12/"; + public const string WebServicesNamespace = "Microsoft.SqlServer.Management.Framework.Web.Services"; + public const string ClientSessionIdHeaderName = "x-ms-client-session-id"; + public const string ClientRequestIdHeaderName = "x-ms-client-request-id"; + public const string RequestIdHeaderName = "x-ms-request-id"; + public const string OperationSuccess = "Success"; + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/ImportExport/ImportExportRequest.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/ImportExport/ImportExportRequest.cs new file mode 100644 index 000000000000..c1b03915840c --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/ImportExport/ImportExportRequest.cs @@ -0,0 +1,34 @@ +// ---------------------------------------------------------------------------------- +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.SqlDatabase.Model; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Services.ImportExport +{ + /// + /// Holds the necessary information to query or stop an import/export operation + /// + public class ImportExportRequest : SqlDatabaseServerOperationContext + { + /// + /// Gets or sets the SQL login credentials + /// + public SqlAuthenticationCredentials SqlCredentials { get; set; } + + /// + /// Gets or sets the GUID that represents this operation + /// + public string RequestGuid { get; set; } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/ImportExport/StatusInfo.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/ImportExport/StatusInfo.cs new file mode 100644 index 000000000000..9bc2bfc6344f --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/ImportExport/StatusInfo.cs @@ -0,0 +1,88 @@ +// ---------------------------------------------------------------------------------- +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.ComponentModel; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Services.ImportExport +{ + /// + /// Represents the result of querying the status of an import or export database operation + /// + [Serializable] + [DataContract(Name = "StatusInfo", + Namespace = "http://schemas.datacontract.org/2004/07/Microsoft.SqlServer.Management.Dac.ServiceTypes")] + public class StatusInfo : IExtensibleDataObject + { + /// + /// Gets or sets the blob uri + /// + [DataMember] + public string BlobUri { get; set; } + + /// + /// Gets or sets the name of the database + /// + [DataMember] + public string DatabaseName { get; set; } + + /// + /// Gets or sets the error message if any + /// + [DataMember] + public string ErrorMessage { get; set; } + + /// + /// Gets or sets date the database was last modified + /// + [DataMember] + public DateTime LastModifiedTime { get; set; } + + /// + /// Gets or sets how long the operation has been queued + /// + [DataMember] + public DateTime QueuedTime { get; set; } + + /// + /// Gets or sets the import/export request id + /// + [DataMember] + public string RequestId { get; set; } + + /// + /// Gets or sets the type of the request + /// + [DataMember] + public string RequestType { get; set; } + + /// + /// Gets or sets the name of the server the database resides in + /// + [DataMember] + public string ServerName { get; set; } + + /// + /// Gets or sets the status of the import/export operation + /// + [DataMember] + public string Status { get; set; } + + /// + /// Gets or sets the import/export status info extension data + /// + [Browsable(false)] + public ExtensionDataObject ExtensionData { get; set; } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/DatabaseCopyExtensions.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/DatabaseCopyExtensions.cs new file mode 100644 index 000000000000..c5896c12ef44 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/DatabaseCopyExtensions.cs @@ -0,0 +1,40 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server +{ + /// + /// The extensions + /// + public partial class DatabaseCopy + { + /// + /// Gets or sets the context from which this object was constructed. + /// + public IServerDataServiceContext Context; + + internal void LoadExtraProperties(IServerDataServiceContext context) + { + try + { + // Fill in the context property + this.Context = context; + } + catch + { + // Ignore exceptions when loading extra properties, for backward compatibility. + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/DatabaseExtensions.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/DatabaseExtensions.cs new file mode 100644 index 000000000000..28a4469c958d --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/DatabaseExtensions.cs @@ -0,0 +1,51 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server +{ + /// + /// The extensions + /// + public partial class Database + { + /// + /// Gets or sets the context from which this object was constructed. + /// + public IServerDataServiceContext Context; + + /// + /// Gets the name of the service objective for this Database. + /// + public string ServiceObjectiveName; + + /// + /// Copies all the internal fields from one database object into another. + /// + /// The database to be copied. + internal void CopyFields(Database other) + { + this._CollationName = other._CollationName; + this._CreationDate = other._CreationDate; + this._Edition = other._Edition; + this._Id = other._Id; + this._MaxSizeGB = other._MaxSizeGB; + this._MaxSizeBytes = other._MaxSizeBytes; + this._Name = other._Name; + this._Server = other._Server; + this.Context = other.Context; + this._AssignedServiceObjectiveId = other.AssignedServiceObjectiveId; + this.ServiceObjective = other.ServiceObjective; + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/IServerDataServiceContext.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/IServerDataServiceContext.cs new file mode 100644 index 000000000000..2dade2205ec9 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/IServerDataServiceContext.cs @@ -0,0 +1,265 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server +{ + using DatabaseCopyModel = Model.DatabaseCopy; + + /// + /// Common interface for all server based operations. + /// + public interface IServerDataServiceContext + { + /// + /// Gets the per session tracing Id. + /// + string ClientSessionId { get; } + + /// + /// Gets the previous request's client request Id. + /// + string ClientRequestId { get; } + + /// + /// Gets the name of the server for this context. + /// + string ServerName { get; } + + /// + /// Ensures any extra property on the given is loaded. + /// + /// The object that needs the extra properties. + void LoadExtraProperties(object obj); + + #region Database Operations + + /// + /// Retrieves the list of all databases on the server. + /// + /// An array of all databases on the server. + Database[] GetDatabases(); + + /// + /// Retrieve information on database with the name . + /// + /// The database to retrieve. + /// An object containing the information about the specific database. + Database GetDatabase(string databaseName); + + /// + /// Creates a new Sql Database. + /// + /// The name for the new database. + /// The max size for the database. + /// The collation for the database. + /// The edition for the database. + /// The SLO for the premium database. + /// The newly created Sql Database. + Database CreateNewDatabase( + string databaseName, + int? databaseMaxSizeGb, + long? databaseMaxSizeBytes, + string databaseCollation, + DatabaseEdition databaseEdition, + ServiceObjective serviceObjective); + + /// + /// Updates the property on the database with the name . + /// + /// The database to update. + /// + /// The new database name, or null to not update. + /// + /// + /// The new database max size, or null to not update. + /// + /// + /// The new database edition, or null to not update. + /// + /// + /// The new service objective, or null to not update. + /// + /// The updated database object. + Database UpdateDatabase( + string databaseName, + string newDatabaseName, + int? databaseMaxSizeGb, + long? databaseMaxSizeBytes, + DatabaseEdition? databaseEdition, + ServiceObjective serviceObjective); + + /// + /// Removes the database with the name . + /// + /// The database to remove. + void RemoveDatabase(string databaseName); + + #endregion + + #region Database Copy Operations + + /// + /// Retrieve all database copy objects with matching parameters. + /// + /// The name of the database to copy. + /// The name for the partner server. + /// The name of the database on the partner server. + /// All database copy objects with matching parameters. + DatabaseCopyModel[] GetDatabaseCopy( + string databaseName, + string partnerServer, + string partnerDatabaseName); + + /// + /// Refreshes the given database copy object. + /// + /// The object to refresh. + /// The refreshed database copy object. + DatabaseCopyModel GetDatabaseCopy(DatabaseCopyModel databaseCopy); + + /// + /// Start database copy on the database with the name . + /// + /// The database to copy. + /// The database to copy. + /// The database to copy. + /// true to make this a continuous copy. + /// true to make this an offline secondary copy. + /// The new instance of database copy operation. + DatabaseCopyModel StartDatabaseCopy( + string databaseName, + string partnerServer, + string partnerDatabaseName, + bool continuousCopy, + bool isOfflineSecondary); + + /// + /// Terminate an ongoing database copy operation. + /// + /// The database copy to terminate. + /// true to forcefully terminate the copy. + void StopDatabaseCopy( + DatabaseCopyModel databaseCopy, + bool forcedTermination); + + #endregion + + #region Service Objective Operations + + /// + /// Retrieves the list of all service objectives on the server. + /// + /// An array of all service objectives on the server. + ServiceObjective[] GetServiceObjectives(); + + /// + /// Retrieve information on service objective with the specified name + /// + /// The service objective to retrieve. + /// + /// An object containing the information about the specific service objective. + /// + ServiceObjective GetServiceObjective(string serviceObjectiveName); + + /// + /// Retrieve information on latest service objective with service objective + /// + /// The service objective to refresh. + /// + /// An object containing the information about the specific service objective. + /// + ServiceObjective GetServiceObjective(ServiceObjective serviceObjective); + + /// + /// Get a specific quota for a server + /// + /// The name of the quota to retrieve + /// A quota object. + ServerQuota GetQuota(string quotaName); + + /// + /// Get a list of all quotas for a server + /// + /// An array of server quota objects + ServerQuota[] GetQuotas(); + + #endregion + + #region Get/Stop Database Operation + + /// + /// Retrieve information on operation with the guid + /// + /// The Guid of the operation to retrieve. + /// An object containing the information about the specific operation. + DatabaseOperation GetDatabaseOperation(Guid OperationGuid); + + /// + /// Retrieves the list of all operations on the database. + /// + /// The name of database to retrieve operations. + /// An array of all operations on the database. + DatabaseOperation[] GetDatabaseOperations(string databaseName); + + /// + /// Retrieves the list of all databases' operations on the server. + /// + /// An array of all operations on the server. + DatabaseOperation[] GetDatabasesOperations(); + + #endregion + + #region Restorable Dropped Database Operations + + /// + /// Retrieves the list of all restorable dropped databases on the server. + /// + /// An array of all restorable dropped databases on the server. + RestorableDroppedDatabase[] GetRestorableDroppedDatabases(); + + /// + /// Retrieve information on the restorable dropped database with the name + /// and deletion date . + /// + /// The name of the restorable dropped database to retrieve. + /// The deletion date of the restorable dropped database to retrieve. + /// An object containing the information about the specific restorable dropped database. + RestorableDroppedDatabase GetRestorableDroppedDatabase( + string databaseName, DateTime deletionDate); + + #endregion + + #region Restore Database Operations + + /// + /// Issues a restore request for the given source database to the given target database. + /// + /// The name of the source database. + /// The deletion date of the source database, in case it is a dropped database. + /// The name of the server to create the restored database on. + /// The name of the database to be created with the restored contents. + /// The point in time to restore the source database to. + /// An object containing the information about the restore request. + RestoreDatabaseOperation RestoreDatabase( + string sourceDatabaseName, + DateTime? sourceDatabaseDeletionDate, + string targetServerName, + string targetDatabaseName, + DateTime? pointInTime); + + #endregion + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/MergeOptionTemporaryChange.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/MergeOptionTemporaryChange.cs new file mode 100644 index 000000000000..5b794a07a8e0 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/MergeOptionTemporaryChange.cs @@ -0,0 +1,56 @@ +// ---------------------------------------------------------------------------------- +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Data.Services.Client; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server +{ + /// + /// A class that will temporarily change the merge option on a + /// object. + /// + internal class MergeOptionTemporaryChange : IDisposable + { + /// + /// The merge option before it gets changed. + /// + private MergeOption oldValue; + + /// + /// The context we are adjusting. + /// + private DataServiceContext context; + + /// + /// Initializes a new instance of the class. This + /// also sets the merge option to . + /// + /// The context to do the change to + /// the new temporary value for the context's merge option + public MergeOptionTemporaryChange(DataServiceContext context, MergeOption tempValue) + { + this.context = context; + this.oldValue = context.MergeOption; + context.MergeOption = tempValue; + } + + /// + /// Restore the MergeOption on the context + /// + public void Dispose() + { + this.context.MergeOption = this.oldValue; + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/RecoverableDatabaseExtensions.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/RecoverableDatabaseExtensions.cs new file mode 100644 index 000000000000..da612e5ca32f --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/RecoverableDatabaseExtensions.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server +{ + /// + /// The extensions + /// + public partial class RecoverableDatabase + { + /// + /// Gets or sets the context from which this object was constructed. + /// + public IServerDataServiceContext Context; + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/RestorableDroppedDatabaseExtensions.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/RestorableDroppedDatabaseExtensions.cs new file mode 100644 index 000000000000..b1dfaad36555 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/RestorableDroppedDatabaseExtensions.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server +{ + /// + /// The extensions + /// + public partial class RestorableDroppedDatabase + { + /// + /// Gets or sets the context from which this object was constructed. + /// + public IServerDataServiceContext Context; + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/ServerContextInternal.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/ServerContextInternal.cs new file mode 100644 index 000000000000..625cbb614219 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/ServerContextInternal.cs @@ -0,0 +1,5676 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.18063 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// Original file name: ServerContextInternal.cs +// Generation date: 6/10/2014 11:26:34 AM +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server +{ + + /// + /// There are no comments for ServerContextInternal in the schema. + /// + public abstract partial class ServerContextInternal : global::System.Data.Services.Client.DataServiceContext + { + /// + /// Initialize a new ServerContextInternal object. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public ServerContextInternal(global::System.Uri serviceRoot) : + base(serviceRoot) + { + this.OnContextCreated(); + } + partial void OnContextCreated(); + /// + /// There are no comments for Servers in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceQuery Servers + { + get + { + if ((this._Servers == null)) + { + this._Servers = base.CreateQuery("Servers"); + } + return this._Servers; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceQuery _Servers; + /// + /// There are no comments for Databases in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceQuery Databases + { + get + { + if ((this._Databases == null)) + { + this._Databases = base.CreateQuery("Databases"); + } + return this._Databases; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceQuery _Databases; + /// + /// There are no comments for RecoverableDatabases in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceQuery RecoverableDatabases + { + get + { + if ((this._RecoverableDatabases == null)) + { + this._RecoverableDatabases = base.CreateQuery("RecoverableDatabases"); + } + return this._RecoverableDatabases; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceQuery _RecoverableDatabases; + /// + /// There are no comments for RestorableDroppedDatabases in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceQuery RestorableDroppedDatabases + { + get + { + if ((this._RestorableDroppedDatabases == null)) + { + this._RestorableDroppedDatabases = base.CreateQuery("RestorableDroppedDatabases"); + } + return this._RestorableDroppedDatabases; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceQuery _RestorableDroppedDatabases; + /// + /// There are no comments for DimensionSettings in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceQuery DimensionSettings + { + get + { + if ((this._DimensionSettings == null)) + { + this._DimensionSettings = base.CreateQuery("DimensionSettings"); + } + return this._DimensionSettings; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceQuery _DimensionSettings; + /// + /// There are no comments for ServiceObjectives in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceQuery ServiceObjectives + { + get + { + if ((this._ServiceObjectives == null)) + { + this._ServiceObjectives = base.CreateQuery("ServiceObjectives"); + } + return this._ServiceObjectives; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceQuery _ServiceObjectives; + /// + /// There are no comments for Operations in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceQuery Operations + { + get + { + if ((this._Operations == null)) + { + this._Operations = base.CreateQuery("Operations"); + } + return this._Operations; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceQuery _Operations; + /// + /// There are no comments for OperationDetails in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceQuery OperationDetails + { + get + { + if ((this._OperationDetails == null)) + { + this._OperationDetails = base.CreateQuery("OperationDetails"); + } + return this._OperationDetails; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceQuery _OperationDetails; + /// + /// There are no comments for CreateDatabaseFromDacPacOperations in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceQuery CreateDatabaseFromDacPacOperations + { + get + { + if ((this._CreateDatabaseFromDacPacOperations == null)) + { + this._CreateDatabaseFromDacPacOperations = base.CreateQuery("CreateDatabaseFromDacPacOperations"); + } + return this._CreateDatabaseFromDacPacOperations; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceQuery _CreateDatabaseFromDacPacOperations; + /// + /// There are no comments for ExtractDacPacOperations in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceQuery ExtractDacPacOperations + { + get + { + if ((this._ExtractDacPacOperations == null)) + { + this._ExtractDacPacOperations = base.CreateQuery("ExtractDacPacOperations"); + } + return this._ExtractDacPacOperations; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceQuery _ExtractDacPacOperations; + /// + /// There are no comments for UpgradeDatabaseFromDacPacOperations in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceQuery UpgradeDatabaseFromDacPacOperations + { + get + { + if ((this._UpgradeDatabaseFromDacPacOperations == null)) + { + this._UpgradeDatabaseFromDacPacOperations = base.CreateQuery("UpgradeDatabaseFromDacPacOperations"); + } + return this._UpgradeDatabaseFromDacPacOperations; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceQuery _UpgradeDatabaseFromDacPacOperations; + /// + /// There are no comments for ViewDatabaseChangesOperations in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceQuery ViewDatabaseChangesOperations + { + get + { + if ((this._ViewDatabaseChangesOperations == null)) + { + this._ViewDatabaseChangesOperations = base.CreateQuery("ViewDatabaseChangesOperations"); + } + return this._ViewDatabaseChangesOperations; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceQuery _ViewDatabaseChangesOperations; + /// + /// There are no comments for ViewUpgradePlanOperations in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceQuery ViewUpgradePlanOperations + { + get + { + if ((this._ViewUpgradePlanOperations == null)) + { + this._ViewUpgradePlanOperations = base.CreateQuery("ViewUpgradePlanOperations"); + } + return this._ViewUpgradePlanOperations; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceQuery _ViewUpgradePlanOperations; + /// + /// There are no comments for DatabaseRestoreStatus in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceQuery DatabaseRestoreStatus + { + get + { + if ((this._DatabaseRestoreStatus == null)) + { + this._DatabaseRestoreStatus = base.CreateQuery("DatabaseRestoreStatus"); + } + return this._DatabaseRestoreStatus; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceQuery _DatabaseRestoreStatus; + /// + /// There are no comments for RestoreDatabaseOperations in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceQuery RestoreDatabaseOperations + { + get + { + if ((this._RestoreDatabaseOperations == null)) + { + this._RestoreDatabaseOperations = base.CreateQuery("RestoreDatabaseOperations"); + } + return this._RestoreDatabaseOperations; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceQuery _RestoreDatabaseOperations; + /// + /// There are no comments for RecoverDatabaseOperations in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceQuery RecoverDatabaseOperations + { + get + { + if ((this._RecoverDatabaseOperations == null)) + { + this._RecoverDatabaseOperations = base.CreateQuery("RecoverDatabaseOperations"); + } + return this._RecoverDatabaseOperations; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceQuery _RecoverDatabaseOperations; + /// + /// There are no comments for DatabaseCopies in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceQuery DatabaseCopies + { + get + { + if ((this._DatabaseCopies == null)) + { + this._DatabaseCopies = base.CreateQuery("DatabaseCopies"); + } + return this._DatabaseCopies; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceQuery _DatabaseCopies; + /// + /// There are no comments for DatabaseCopyValidationOperations in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceQuery DatabaseCopyValidationOperations + { + get + { + if ((this._DatabaseCopyValidationOperations == null)) + { + this._DatabaseCopyValidationOperations = base.CreateQuery("DatabaseCopyValidationOperations"); + } + return this._DatabaseCopyValidationOperations; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceQuery _DatabaseCopyValidationOperations; + /// + /// There are no comments for FirewallRules in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceQuery FirewallRules + { + get + { + if ((this._FirewallRules == null)) + { + this._FirewallRules = base.CreateQuery("FirewallRules"); + } + return this._FirewallRules; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceQuery _FirewallRules; + /// + /// There are no comments for DatabaseMetrics in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceQuery DatabaseMetrics + { + get + { + if ((this._DatabaseMetrics == null)) + { + this._DatabaseMetrics = base.CreateQuery("DatabaseMetrics"); + } + return this._DatabaseMetrics; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceQuery _DatabaseMetrics; + /// + /// There are no comments for ServerMetrics in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceQuery ServerMetrics + { + get + { + if ((this._ServerMetrics == null)) + { + this._ServerMetrics = base.CreateQuery("ServerMetrics"); + } + return this._ServerMetrics; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceQuery _ServerMetrics; + /// + /// There are no comments for EventLogs in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceQuery EventLogs + { + get + { + if ((this._EventLogs == null)) + { + this._EventLogs = base.CreateQuery("EventLogs"); + } + return this._EventLogs; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceQuery _EventLogs; + /// + /// There are no comments for ServerQuotas in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceQuery ServerQuotas + { + get + { + if ((this._ServerQuotas == null)) + { + this._ServerQuotas = base.CreateQuery("ServerQuotas"); + } + return this._ServerQuotas; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceQuery _ServerQuotas; + /// + /// There are no comments for DatabaseOperations in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Data.Services.Client.DataServiceQuery DatabaseOperations + { + get + { + if ((this._DatabaseOperations == null)) + { + this._DatabaseOperations = base.CreateQuery("DatabaseOperations"); + } + return this._DatabaseOperations; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Data.Services.Client.DataServiceQuery _DatabaseOperations; + /// + /// There are no comments for Servers in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public void AddToServers(Server server) + { + base.AddObject("Servers", server); + } + /// + /// There are no comments for Databases in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public void AddToDatabases(Database database) + { + base.AddObject("Databases", database); + } + /// + /// There are no comments for RecoverableDatabases in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public void AddToRecoverableDatabases(RecoverableDatabase recoverableDatabase) + { + base.AddObject("RecoverableDatabases", recoverableDatabase); + } + /// + /// There are no comments for RestorableDroppedDatabases in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public void AddToRestorableDroppedDatabases(RestorableDroppedDatabase restorableDroppedDatabase) + { + base.AddObject("RestorableDroppedDatabases", restorableDroppedDatabase); + } + /// + /// There are no comments for DimensionSettings in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public void AddToDimensionSettings(DimensionSetting dimensionSetting) + { + base.AddObject("DimensionSettings", dimensionSetting); + } + /// + /// There are no comments for ServiceObjectives in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public void AddToServiceObjectives(ServiceObjective serviceObjective) + { + base.AddObject("ServiceObjectives", serviceObjective); + } + /// + /// There are no comments for Operations in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public void AddToOperations(Operation operation) + { + base.AddObject("Operations", operation); + } + /// + /// There are no comments for OperationDetails in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public void AddToOperationDetails(OperationDetail operationDetail) + { + base.AddObject("OperationDetails", operationDetail); + } + /// + /// There are no comments for CreateDatabaseFromDacPacOperations in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public void AddToCreateDatabaseFromDacPacOperations(CreateDatabaseFromDacPacOperation createDatabaseFromDacPacOperation) + { + base.AddObject("CreateDatabaseFromDacPacOperations", createDatabaseFromDacPacOperation); + } + /// + /// There are no comments for ExtractDacPacOperations in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public void AddToExtractDacPacOperations(ExtractDacPacOperation extractDacPacOperation) + { + base.AddObject("ExtractDacPacOperations", extractDacPacOperation); + } + /// + /// There are no comments for UpgradeDatabaseFromDacPacOperations in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public void AddToUpgradeDatabaseFromDacPacOperations(UpgradeDatabaseFromDacPacOperation upgradeDatabaseFromDacPacOperation) + { + base.AddObject("UpgradeDatabaseFromDacPacOperations", upgradeDatabaseFromDacPacOperation); + } + /// + /// There are no comments for ViewDatabaseChangesOperations in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public void AddToViewDatabaseChangesOperations(ViewDatabaseChangesOperation viewDatabaseChangesOperation) + { + base.AddObject("ViewDatabaseChangesOperations", viewDatabaseChangesOperation); + } + /// + /// There are no comments for ViewUpgradePlanOperations in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public void AddToViewUpgradePlanOperations(ViewUpgradePlanOperation viewUpgradePlanOperation) + { + base.AddObject("ViewUpgradePlanOperations", viewUpgradePlanOperation); + } + /// + /// There are no comments for DatabaseRestoreStatus in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public void AddToDatabaseRestoreStatus(DatabaseRestoreStatus databaseRestoreStatus) + { + base.AddObject("DatabaseRestoreStatus", databaseRestoreStatus); + } + /// + /// There are no comments for RestoreDatabaseOperations in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public void AddToRestoreDatabaseOperations(RestoreDatabaseOperation restoreDatabaseOperation) + { + base.AddObject("RestoreDatabaseOperations", restoreDatabaseOperation); + } + /// + /// There are no comments for RecoverDatabaseOperations in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public void AddToRecoverDatabaseOperations(RecoverDatabaseOperation recoverDatabaseOperation) + { + base.AddObject("RecoverDatabaseOperations", recoverDatabaseOperation); + } + /// + /// There are no comments for DatabaseCopies in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public void AddToDatabaseCopies(DatabaseCopy databaseCopy) + { + base.AddObject("DatabaseCopies", databaseCopy); + } + /// + /// There are no comments for DatabaseCopyValidationOperations in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public void AddToDatabaseCopyValidationOperations(DatabaseCopyValidationOperation databaseCopyValidationOperation) + { + base.AddObject("DatabaseCopyValidationOperations", databaseCopyValidationOperation); + } + /// + /// There are no comments for FirewallRules in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public void AddToFirewallRules(FirewallRule firewallRule) + { + base.AddObject("FirewallRules", firewallRule); + } + /// + /// There are no comments for DatabaseMetrics in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public void AddToDatabaseMetrics(DatabaseMetrics databaseMetrics) + { + base.AddObject("DatabaseMetrics", databaseMetrics); + } + /// + /// There are no comments for ServerMetrics in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public void AddToServerMetrics(ServerMetrics serverMetrics) + { + base.AddObject("ServerMetrics", serverMetrics); + } + /// + /// There are no comments for EventLogs in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public void AddToEventLogs(EventLog eventLog) + { + base.AddObject("EventLogs", eventLog); + } + /// + /// There are no comments for ServerQuotas in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public void AddToServerQuotas(ServerQuota serverQuota) + { + base.AddObject("ServerQuotas", serverQuota); + } + /// + /// There are no comments for DatabaseOperations in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public void AddToDatabaseOperations(DatabaseOperation databaseOperation) + { + base.AddObject("DatabaseOperations", databaseOperation); + } + } + /// + /// There are no comments for Microsoft.SqlServer.Management.Server.Domain.Server in the schema. + /// + /// + /// Name + /// + [global::System.Data.Services.Common.DataServiceKeyAttribute("Name")] + public partial class Server + { + /// + /// Create a new Server object. + /// + /// Initial value of Name. + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static Server CreateServer(string name) + { + Server server = new Server(); + server.Name = name; + return server; + } + /// + /// There are no comments for Property Name in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property SubscriptionId in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable SubscriptionId + { + get + { + return this._SubscriptionId; + } + set + { + this.OnSubscriptionIdChanging(value); + this._SubscriptionId = value; + this.OnSubscriptionIdChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _SubscriptionId; + partial void OnSubscriptionIdChanging(global::System.Nullable value); + partial void OnSubscriptionIdChanged(); + /// + /// There are no comments for Property Version in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Version + { + get + { + return this._Version; + } + set + { + this.OnVersionChanging(value); + this._Version = value; + this.OnVersionChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Version; + partial void OnVersionChanging(string value); + partial void OnVersionChanged(); + /// + /// There are no comments for Databases in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.Collection Databases + { + get + { + return this._Databases; + } + set + { + if ((value != null)) + { + this._Databases = value; + } + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.Collection _Databases = new global::System.Collections.ObjectModel.Collection(); + /// + /// There are no comments for ServerMetrics in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public ServerMetrics ServerMetrics + { + get + { + return this._ServerMetrics; + } + set + { + this._ServerMetrics = value; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private ServerMetrics _ServerMetrics; + /// + /// There are no comments for ServerQuotas in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.Collection ServerQuotas + { + get + { + return this._ServerQuotas; + } + set + { + if ((value != null)) + { + this._ServerQuotas = value; + } + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.Collection _ServerQuotas = new global::System.Collections.ObjectModel.Collection(); + /// + /// There are no comments for DatabaseOperations in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.Collection DatabaseOperations + { + get + { + return this._DatabaseOperations; + } + set + { + if ((value != null)) + { + this._DatabaseOperations = value; + } + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.Collection _DatabaseOperations = new global::System.Collections.ObjectModel.Collection(); + } + /// + /// There are no comments for Microsoft.SqlServer.Management.Server.Domain.Database in the schema. + /// + /// + /// Id + /// + [global::System.Data.Services.Common.DataServiceKeyAttribute("Id")] + public partial class Database + { + /// + /// Create a new Database object. + /// + /// Initial value of Id. + /// Initial value of CreationDate. + /// Initial value of IsSystemObject. + /// Initial value of Status. + /// Initial value of SizeMB. + /// Initial value of IsReadOnly. + /// Initial value of IsFederationMember. + /// Initial value of IsQueryStoreOn. + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static Database CreateDatabase(int ID, global::System.DateTime creationDate, bool isSystemObject, int status, decimal sizeMB, bool isReadOnly, bool isFederationMember, bool isQueryStoreOn) + { + Database database = new Database(); + database.Id = ID; + database.CreationDate = creationDate; + database.IsSystemObject = isSystemObject; + database.Status = status; + database.SizeMB = sizeMB; + database.IsReadOnly = isReadOnly; + database.IsFederationMember = isFederationMember; + database.IsQueryStoreOn = isQueryStoreOn; + return database; + } + /// + /// There are no comments for Property Id in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public int Id + { + get + { + return this._Id; + } + set + { + this.OnIdChanging(value); + this._Id = value; + this.OnIdChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private int _Id; + partial void OnIdChanging(int value); + partial void OnIdChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property ServiceObjectiveId in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ServiceObjectiveId + { + get + { + return this._ServiceObjectiveId; + } + set + { + this.OnServiceObjectiveIdChanging(value); + this._ServiceObjectiveId = value; + this.OnServiceObjectiveIdChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ServiceObjectiveId; + partial void OnServiceObjectiveIdChanging(global::System.Nullable value); + partial void OnServiceObjectiveIdChanged(); + /// + /// There are no comments for Property AssignedServiceObjectiveId in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable AssignedServiceObjectiveId + { + get + { + return this._AssignedServiceObjectiveId; + } + set + { + this.OnAssignedServiceObjectiveIdChanging(value); + this._AssignedServiceObjectiveId = value; + this.OnAssignedServiceObjectiveIdChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _AssignedServiceObjectiveId; + partial void OnAssignedServiceObjectiveIdChanging(global::System.Nullable value); + partial void OnAssignedServiceObjectiveIdChanged(); + /// + /// There are no comments for Property ServiceObjectiveAssignmentState in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ServiceObjectiveAssignmentState + { + get + { + return this._ServiceObjectiveAssignmentState; + } + set + { + this.OnServiceObjectiveAssignmentStateChanging(value); + this._ServiceObjectiveAssignmentState = value; + this.OnServiceObjectiveAssignmentStateChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ServiceObjectiveAssignmentState; + partial void OnServiceObjectiveAssignmentStateChanging(global::System.Nullable value); + partial void OnServiceObjectiveAssignmentStateChanged(); + /// + /// There are no comments for Property ServiceObjectiveAssignmentStateDescription in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ServiceObjectiveAssignmentStateDescription + { + get + { + return this._ServiceObjectiveAssignmentStateDescription; + } + set + { + this.OnServiceObjectiveAssignmentStateDescriptionChanging(value); + this._ServiceObjectiveAssignmentStateDescription = value; + this.OnServiceObjectiveAssignmentStateDescriptionChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ServiceObjectiveAssignmentStateDescription; + partial void OnServiceObjectiveAssignmentStateDescriptionChanging(string value); + partial void OnServiceObjectiveAssignmentStateDescriptionChanged(); + /// + /// There are no comments for Property ServiceObjectiveAssignmentErrorCode in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ServiceObjectiveAssignmentErrorCode + { + get + { + return this._ServiceObjectiveAssignmentErrorCode; + } + set + { + this.OnServiceObjectiveAssignmentErrorCodeChanging(value); + this._ServiceObjectiveAssignmentErrorCode = value; + this.OnServiceObjectiveAssignmentErrorCodeChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ServiceObjectiveAssignmentErrorCode; + partial void OnServiceObjectiveAssignmentErrorCodeChanging(global::System.Nullable value); + partial void OnServiceObjectiveAssignmentErrorCodeChanged(); + /// + /// There are no comments for Property ServiceObjectiveAssignmentErrorDescription in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ServiceObjectiveAssignmentErrorDescription + { + get + { + return this._ServiceObjectiveAssignmentErrorDescription; + } + set + { + this.OnServiceObjectiveAssignmentErrorDescriptionChanging(value); + this._ServiceObjectiveAssignmentErrorDescription = value; + this.OnServiceObjectiveAssignmentErrorDescriptionChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ServiceObjectiveAssignmentErrorDescription; + partial void OnServiceObjectiveAssignmentErrorDescriptionChanging(string value); + partial void OnServiceObjectiveAssignmentErrorDescriptionChanged(); + /// + /// There are no comments for Property ServiceObjectiveAssignmentSuccessDate in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ServiceObjectiveAssignmentSuccessDate + { + get + { + return this._ServiceObjectiveAssignmentSuccessDate; + } + set + { + this.OnServiceObjectiveAssignmentSuccessDateChanging(value); + this._ServiceObjectiveAssignmentSuccessDate = value; + this.OnServiceObjectiveAssignmentSuccessDateChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ServiceObjectiveAssignmentSuccessDate; + partial void OnServiceObjectiveAssignmentSuccessDateChanging(global::System.Nullable value); + partial void OnServiceObjectiveAssignmentSuccessDateChanged(); + /// + /// There are no comments for Property Edition in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Edition + { + get + { + return this._Edition; + } + set + { + this.OnEditionChanging(value); + this._Edition = value; + this.OnEditionChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Edition; + partial void OnEditionChanging(string value); + partial void OnEditionChanged(); + /// + /// There are no comments for Property MaxSizeGB in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MaxSizeGB + { + get + { + return this._MaxSizeGB; + } + set + { + this.OnMaxSizeGBChanging(value); + this._MaxSizeGB = value; + this.OnMaxSizeGBChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MaxSizeGB; + partial void OnMaxSizeGBChanging(global::System.Nullable value); + partial void OnMaxSizeGBChanged(); + /// + /// There are no comments for Property MaxSizeBytes in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MaxSizeBytes + { + get + { + return this._MaxSizeBytes; + } + set + { + this.OnMaxSizeBytesChanging(value); + this._MaxSizeBytes = value; + this.OnMaxSizeBytesChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MaxSizeBytes; + partial void OnMaxSizeBytesChanging(global::System.Nullable value); + partial void OnMaxSizeBytesChanged(); + /// + /// There are no comments for Property CollationName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string CollationName + { + get + { + return this._CollationName; + } + set + { + this.OnCollationNameChanging(value); + this._CollationName = value; + this.OnCollationNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _CollationName; + partial void OnCollationNameChanging(string value); + partial void OnCollationNameChanged(); + /// + /// There are no comments for Property CreationDate in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.DateTime CreationDate + { + get + { + return this._CreationDate; + } + set + { + this.OnCreationDateChanging(value); + this._CreationDate = value; + this.OnCreationDateChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.DateTime _CreationDate; + partial void OnCreationDateChanging(global::System.DateTime value); + partial void OnCreationDateChanged(); + /// + /// There are no comments for Property RecoveryPeriodStartDate in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable RecoveryPeriodStartDate + { + get + { + return this._RecoveryPeriodStartDate; + } + set + { + this.OnRecoveryPeriodStartDateChanging(value); + this._RecoveryPeriodStartDate = value; + this.OnRecoveryPeriodStartDateChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _RecoveryPeriodStartDate; + partial void OnRecoveryPeriodStartDateChanging(global::System.Nullable value); + partial void OnRecoveryPeriodStartDateChanged(); + /// + /// There are no comments for Property IsSystemObject in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public bool IsSystemObject + { + get + { + return this._IsSystemObject; + } + set + { + this.OnIsSystemObjectChanging(value); + this._IsSystemObject = value; + this.OnIsSystemObjectChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _IsSystemObject; + partial void OnIsSystemObjectChanging(bool value); + partial void OnIsSystemObjectChanged(); + /// + /// There are no comments for Property Status in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public int Status + { + get + { + return this._Status; + } + set + { + this.OnStatusChanging(value); + this._Status = value; + this.OnStatusChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private int _Status; + partial void OnStatusChanging(int value); + partial void OnStatusChanged(); + /// + /// There are no comments for Property IsFederationRoot in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsFederationRoot + { + get + { + return this._IsFederationRoot; + } + set + { + this.OnIsFederationRootChanging(value); + this._IsFederationRoot = value; + this.OnIsFederationRootChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsFederationRoot; + partial void OnIsFederationRootChanging(global::System.Nullable value); + partial void OnIsFederationRootChanged(); + /// + /// There are no comments for Property SizeMB in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public decimal SizeMB + { + get + { + return this._SizeMB; + } + set + { + this.OnSizeMBChanging(value); + this._SizeMB = value; + this.OnSizeMBChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private decimal _SizeMB; + partial void OnSizeMBChanging(decimal value); + partial void OnSizeMBChanged(); + /// + /// There are no comments for Property IsRecursiveTriggersOn in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsRecursiveTriggersOn + { + get + { + return this._IsRecursiveTriggersOn; + } + set + { + this.OnIsRecursiveTriggersOnChanging(value); + this._IsRecursiveTriggersOn = value; + this.OnIsRecursiveTriggersOnChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsRecursiveTriggersOn; + partial void OnIsRecursiveTriggersOnChanging(global::System.Nullable value); + partial void OnIsRecursiveTriggersOnChanged(); + /// + /// There are no comments for Property IsReadOnly in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public bool IsReadOnly + { + get + { + return this._IsReadOnly; + } + set + { + this.OnIsReadOnlyChanging(value); + this._IsReadOnly = value; + this.OnIsReadOnlyChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _IsReadOnly; + partial void OnIsReadOnlyChanging(bool value); + partial void OnIsReadOnlyChanged(); + /// + /// There are no comments for Property IsFederationMember in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public bool IsFederationMember + { + get + { + return this._IsFederationMember; + } + set + { + this.OnIsFederationMemberChanging(value); + this._IsFederationMember = value; + this.OnIsFederationMemberChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _IsFederationMember; + partial void OnIsFederationMemberChanging(bool value); + partial void OnIsFederationMemberChanged(); + /// + /// There are no comments for Property IsQueryStoreOn in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public bool IsQueryStoreOn + { + get + { + return this._IsQueryStoreOn; + } + set + { + this.OnIsQueryStoreOnChanging(value); + this._IsQueryStoreOn = value; + this.OnIsQueryStoreOnChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _IsQueryStoreOn; + partial void OnIsQueryStoreOnChanging(bool value); + partial void OnIsQueryStoreOnChanged(); + /// + /// There are no comments for Property IsQueryStoreReadOnly in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsQueryStoreReadOnly + { + get + { + return this._IsQueryStoreReadOnly; + } + set + { + this.OnIsQueryStoreReadOnlyChanging(value); + this._IsQueryStoreReadOnly = value; + this.OnIsQueryStoreReadOnlyChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsQueryStoreReadOnly; + partial void OnIsQueryStoreReadOnlyChanging(global::System.Nullable value); + partial void OnIsQueryStoreReadOnlyChanged(); + /// + /// There are no comments for Property QueryStoreMaxSizeMB in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable QueryStoreMaxSizeMB + { + get + { + return this._QueryStoreMaxSizeMB; + } + set + { + this.OnQueryStoreMaxSizeMBChanging(value); + this._QueryStoreMaxSizeMB = value; + this.OnQueryStoreMaxSizeMBChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _QueryStoreMaxSizeMB; + partial void OnQueryStoreMaxSizeMBChanging(global::System.Nullable value); + partial void OnQueryStoreMaxSizeMBChanged(); + /// + /// There are no comments for Property QueryStoreFlushPeriodSeconds in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable QueryStoreFlushPeriodSeconds + { + get + { + return this._QueryStoreFlushPeriodSeconds; + } + set + { + this.OnQueryStoreFlushPeriodSecondsChanging(value); + this._QueryStoreFlushPeriodSeconds = value; + this.OnQueryStoreFlushPeriodSecondsChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _QueryStoreFlushPeriodSeconds; + partial void OnQueryStoreFlushPeriodSecondsChanging(global::System.Nullable value); + partial void OnQueryStoreFlushPeriodSecondsChanged(); + /// + /// There are no comments for Property QueryStoreIntervalLengthMinutes in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable QueryStoreIntervalLengthMinutes + { + get + { + return this._QueryStoreIntervalLengthMinutes; + } + set + { + this.OnQueryStoreIntervalLengthMinutesChanging(value); + this._QueryStoreIntervalLengthMinutes = value; + this.OnQueryStoreIntervalLengthMinutesChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _QueryStoreIntervalLengthMinutes; + partial void OnQueryStoreIntervalLengthMinutesChanging(global::System.Nullable value); + partial void OnQueryStoreIntervalLengthMinutesChanged(); + /// + /// There are no comments for Property QueryStoreClearAll in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable QueryStoreClearAll + { + get + { + return this._QueryStoreClearAll; + } + set + { + this.OnQueryStoreClearAllChanging(value); + this._QueryStoreClearAll = value; + this.OnQueryStoreClearAllChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _QueryStoreClearAll; + partial void OnQueryStoreClearAllChanging(global::System.Nullable value); + partial void OnQueryStoreClearAllChanged(); + /// + /// There are no comments for Property QueryStoreStaleQueryThresholdDays in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable QueryStoreStaleQueryThresholdDays + { + get + { + return this._QueryStoreStaleQueryThresholdDays; + } + set + { + this.OnQueryStoreStaleQueryThresholdDaysChanging(value); + this._QueryStoreStaleQueryThresholdDays = value; + this.OnQueryStoreStaleQueryThresholdDaysChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _QueryStoreStaleQueryThresholdDays; + partial void OnQueryStoreStaleQueryThresholdDaysChanging(global::System.Nullable value); + partial void OnQueryStoreStaleQueryThresholdDaysChanged(); + /// + /// There are no comments for Property IsSuspended in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsSuspended + { + get + { + return this._IsSuspended; + } + set + { + this.OnIsSuspendedChanging(value); + this._IsSuspended = value; + this.OnIsSuspendedChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsSuspended; + partial void OnIsSuspendedChanging(global::System.Nullable value); + partial void OnIsSuspendedChanged(); + /// + /// There are no comments for Server in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public Server Server + { + get + { + return this._Server; + } + set + { + this._Server = value; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private Server _Server; + /// + /// There are no comments for ServiceObjective in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public ServiceObjective ServiceObjective + { + get + { + return this._ServiceObjective; + } + set + { + this._ServiceObjective = value; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private ServiceObjective _ServiceObjective; + /// + /// There are no comments for DatabaseMetrics in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public DatabaseMetrics DatabaseMetrics + { + get + { + return this._DatabaseMetrics; + } + set + { + this._DatabaseMetrics = value; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private DatabaseMetrics _DatabaseMetrics; + /// + /// There are no comments for DatabaseCopies in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.Collection DatabaseCopies + { + get + { + return this._DatabaseCopies; + } + set + { + if ((value != null)) + { + this._DatabaseCopies = value; + } + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.Collection _DatabaseCopies = new global::System.Collections.ObjectModel.Collection(); + } + /// + /// There are no comments for Microsoft.SqlServer.Management.Server.Domain.RecoverableDatabase in the schema. + /// + /// + /// EntityId + /// + [global::System.Data.Services.Common.DataServiceKeyAttribute("EntityId")] + public partial class RecoverableDatabase + { + /// + /// Create a new RecoverableDatabase object. + /// + /// Initial value of EntityId. + /// Initial value of LastAvailableBackupDate. + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static RecoverableDatabase CreateRecoverableDatabase(string entityId, global::System.DateTime lastAvailableBackupDate) + { + RecoverableDatabase recoverableDatabase = new RecoverableDatabase(); + recoverableDatabase.EntityId = entityId; + recoverableDatabase.LastAvailableBackupDate = lastAvailableBackupDate; + return recoverableDatabase; + } + /// + /// There are no comments for Property EntityId in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string EntityId + { + get + { + return this._EntityId; + } + set + { + this.OnEntityIdChanging(value); + this._EntityId = value; + this.OnEntityIdChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _EntityId; + partial void OnEntityIdChanging(string value); + partial void OnEntityIdChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property ServerName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ServerName + { + get + { + return this._ServerName; + } + set + { + this.OnServerNameChanging(value); + this._ServerName = value; + this.OnServerNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ServerName; + partial void OnServerNameChanging(string value); + partial void OnServerNameChanged(); + /// + /// There are no comments for Property Edition in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Edition + { + get + { + return this._Edition; + } + set + { + this.OnEditionChanging(value); + this._Edition = value; + this.OnEditionChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Edition; + partial void OnEditionChanging(string value); + partial void OnEditionChanged(); + /// + /// There are no comments for Property LastAvailableBackupDate in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.DateTime LastAvailableBackupDate + { + get + { + return this._LastAvailableBackupDate; + } + set + { + this.OnLastAvailableBackupDateChanging(value); + this._LastAvailableBackupDate = value; + this.OnLastAvailableBackupDateChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.DateTime _LastAvailableBackupDate; + partial void OnLastAvailableBackupDateChanging(global::System.DateTime value); + partial void OnLastAvailableBackupDateChanged(); + } + /// + /// There are no comments for Microsoft.SqlServer.Management.Server.Domain.RestorableDroppedDatabase in the schema. + /// + /// + /// EntityId + /// + [global::System.Data.Services.Common.DataServiceKeyAttribute("EntityId")] + public partial class RestorableDroppedDatabase + { + /// + /// Create a new RestorableDroppedDatabase object. + /// + /// Initial value of EntityId. + /// Initial value of MaxSizeBytes. + /// Initial value of CreationDate. + /// Initial value of DeletionDate. + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static RestorableDroppedDatabase CreateRestorableDroppedDatabase(string entityId, long maxSizeBytes, global::System.DateTime creationDate, global::System.DateTime deletionDate) + { + RestorableDroppedDatabase restorableDroppedDatabase = new RestorableDroppedDatabase(); + restorableDroppedDatabase.EntityId = entityId; + restorableDroppedDatabase.MaxSizeBytes = maxSizeBytes; + restorableDroppedDatabase.CreationDate = creationDate; + restorableDroppedDatabase.DeletionDate = deletionDate; + return restorableDroppedDatabase; + } + /// + /// There are no comments for Property EntityId in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string EntityId + { + get + { + return this._EntityId; + } + set + { + this.OnEntityIdChanging(value); + this._EntityId = value; + this.OnEntityIdChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _EntityId; + partial void OnEntityIdChanging(string value); + partial void OnEntityIdChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property ServerName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ServerName + { + get + { + return this._ServerName; + } + set + { + this.OnServerNameChanging(value); + this._ServerName = value; + this.OnServerNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ServerName; + partial void OnServerNameChanging(string value); + partial void OnServerNameChanged(); + /// + /// There are no comments for Property Edition in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Edition + { + get + { + return this._Edition; + } + set + { + this.OnEditionChanging(value); + this._Edition = value; + this.OnEditionChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Edition; + partial void OnEditionChanging(string value); + partial void OnEditionChanged(); + /// + /// There are no comments for Property MaxSizeBytes in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public long MaxSizeBytes + { + get + { + return this._MaxSizeBytes; + } + set + { + this.OnMaxSizeBytesChanging(value); + this._MaxSizeBytes = value; + this.OnMaxSizeBytesChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private long _MaxSizeBytes; + partial void OnMaxSizeBytesChanging(long value); + partial void OnMaxSizeBytesChanged(); + /// + /// There are no comments for Property CreationDate in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.DateTime CreationDate + { + get + { + return this._CreationDate; + } + set + { + this.OnCreationDateChanging(value); + this._CreationDate = value; + this.OnCreationDateChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.DateTime _CreationDate; + partial void OnCreationDateChanging(global::System.DateTime value); + partial void OnCreationDateChanged(); + /// + /// There are no comments for Property DeletionDate in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.DateTime DeletionDate + { + get + { + return this._DeletionDate; + } + set + { + this.OnDeletionDateChanging(value); + this._DeletionDate = value; + this.OnDeletionDateChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.DateTime _DeletionDate; + partial void OnDeletionDateChanging(global::System.DateTime value); + partial void OnDeletionDateChanged(); + /// + /// There are no comments for Property RecoveryPeriodStartDate in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable RecoveryPeriodStartDate + { + get + { + return this._RecoveryPeriodStartDate; + } + set + { + this.OnRecoveryPeriodStartDateChanging(value); + this._RecoveryPeriodStartDate = value; + this.OnRecoveryPeriodStartDateChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _RecoveryPeriodStartDate; + partial void OnRecoveryPeriodStartDateChanging(global::System.Nullable value); + partial void OnRecoveryPeriodStartDateChanged(); + } + /// + /// There are no comments for Microsoft.SqlServer.Management.Server.Domain.DimensionSetting in the schema. + /// + /// + /// Id + /// + [global::System.Data.Services.Common.DataServiceKeyAttribute("Id")] + public partial class DimensionSetting + { + /// + /// Create a new DimensionSetting object. + /// + /// Initial value of Id. + /// Initial value of Ordinal. + /// Initial value of IsDefault. + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static DimensionSetting CreateDimensionSetting(global::System.Guid ID, byte ordinal, bool isDefault) + { + DimensionSetting dimensionSetting = new DimensionSetting(); + dimensionSetting.Id = ID; + dimensionSetting.Ordinal = ordinal; + dimensionSetting.IsDefault = isDefault; + return dimensionSetting; + } + /// + /// There are no comments for Property Id in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid Id + { + get + { + return this._Id; + } + set + { + this.OnIdChanging(value); + this._Id = value; + this.OnIdChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _Id; + partial void OnIdChanging(global::System.Guid value); + partial void OnIdChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property Ordinal in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public byte Ordinal + { + get + { + return this._Ordinal; + } + set + { + this.OnOrdinalChanging(value); + this._Ordinal = value; + this.OnOrdinalChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private byte _Ordinal; + partial void OnOrdinalChanging(byte value); + partial void OnOrdinalChanged(); + /// + /// There are no comments for Property IsDefault in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public bool IsDefault + { + get + { + return this._IsDefault; + } + set + { + this.OnIsDefaultChanging(value); + this._IsDefault = value; + this.OnIsDefaultChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _IsDefault; + partial void OnIsDefaultChanging(bool value); + partial void OnIsDefaultChanged(); + } + /// + /// There are no comments for Microsoft.SqlServer.Management.Server.Domain.ServiceObjective in the schema. + /// + /// + /// Id + /// + [global::System.Data.Services.Common.DataServiceKeyAttribute("Id")] + public partial class ServiceObjective + { + /// + /// Create a new ServiceObjective object. + /// + /// Initial value of Id. + /// Initial value of IsDefault. + /// Initial value of IsSystem. + /// Initial value of Enabled. + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static ServiceObjective CreateServiceObjective(global::System.Guid ID, bool isDefault, bool isSystem, bool enabled) + { + ServiceObjective serviceObjective = new ServiceObjective(); + serviceObjective.Id = ID; + serviceObjective.IsDefault = isDefault; + serviceObjective.IsSystem = isSystem; + serviceObjective.Enabled = enabled; + return serviceObjective; + } + /// + /// There are no comments for Property Id in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid Id + { + get + { + return this._Id; + } + set + { + this.OnIdChanging(value); + this._Id = value; + this.OnIdChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _Id; + partial void OnIdChanging(global::System.Guid value); + partial void OnIdChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property IsDefault in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public bool IsDefault + { + get + { + return this._IsDefault; + } + set + { + this.OnIsDefaultChanging(value); + this._IsDefault = value; + this.OnIsDefaultChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _IsDefault; + partial void OnIsDefaultChanging(bool value); + partial void OnIsDefaultChanged(); + /// + /// There are no comments for Property IsSystem in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public bool IsSystem + { + get + { + return this._IsSystem; + } + set + { + this.OnIsSystemChanging(value); + this._IsSystem = value; + this.OnIsSystemChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _IsSystem; + partial void OnIsSystemChanging(bool value); + partial void OnIsSystemChanged(); + /// + /// There are no comments for Property Enabled in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public bool Enabled + { + get + { + return this._Enabled; + } + set + { + this.OnEnabledChanging(value); + this._Enabled = value; + this.OnEnabledChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _Enabled; + partial void OnEnabledChanging(bool value); + partial void OnEnabledChanged(); + /// + /// There are no comments for DimensionSettings in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.Collection DimensionSettings + { + get + { + return this._DimensionSettings; + } + set + { + if ((value != null)) + { + this._DimensionSettings = value; + } + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.Collection _DimensionSettings = new global::System.Collections.ObjectModel.Collection(); + } + /// + /// There are no comments for Microsoft.SqlServer.Management.Server.Domain.Operation in the schema. + /// + /// + /// ActionId + /// + [global::System.Data.Services.Common.DataServiceKeyAttribute("ActionId")] + public partial class Operation + { + /// + /// Create a new Operation object. + /// + /// Initial value of DateCreated. + /// Initial value of DateModified. + /// Initial value of ActionId. + /// Initial value of CompletedSteps. + /// Initial value of TotalSteps. + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static Operation CreateOperation(global::System.DateTime dateCreated, global::System.DateTime dateModified, int actionId, int completedSteps, int totalSteps) + { + Operation operation = new Operation(); + operation.DateCreated = dateCreated; + operation.DateModified = dateModified; + operation.ActionId = actionId; + operation.CompletedSteps = completedSteps; + operation.TotalSteps = totalSteps; + return operation; + } + /// + /// There are no comments for Property ActionTypeName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ActionTypeName + { + get + { + return this._ActionTypeName; + } + set + { + this.OnActionTypeNameChanging(value); + this._ActionTypeName = value; + this.OnActionTypeNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ActionTypeName; + partial void OnActionTypeNameChanging(string value); + partial void OnActionTypeNameChanged(); + /// + /// There are no comments for Property ActionStatusName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ActionStatusName + { + get + { + return this._ActionStatusName; + } + set + { + this.OnActionStatusNameChanging(value); + this._ActionStatusName = value; + this.OnActionStatusNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ActionStatusName; + partial void OnActionStatusNameChanging(string value); + partial void OnActionStatusNameChanged(); + /// + /// There are no comments for Property DacDatabaseName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DacDatabaseName + { + get + { + return this._DacDatabaseName; + } + set + { + this.OnDacDatabaseNameChanging(value); + this._DacDatabaseName = value; + this.OnDacDatabaseNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DacDatabaseName; + partial void OnDacDatabaseNameChanging(string value); + partial void OnDacDatabaseNameChanged(); + /// + /// There are no comments for Property CreatedBy in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string CreatedBy + { + get + { + return this._CreatedBy; + } + set + { + this.OnCreatedByChanging(value); + this._CreatedBy = value; + this.OnCreatedByChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _CreatedBy; + partial void OnCreatedByChanging(string value); + partial void OnCreatedByChanged(); + /// + /// There are no comments for Property DateCreated in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.DateTime DateCreated + { + get + { + return this._DateCreated; + } + set + { + this.OnDateCreatedChanging(value); + this._DateCreated = value; + this.OnDateCreatedChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.DateTime _DateCreated; + partial void OnDateCreatedChanging(global::System.DateTime value); + partial void OnDateCreatedChanged(); + /// + /// There are no comments for Property DateModified in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.DateTime DateModified + { + get + { + return this._DateModified; + } + set + { + this.OnDateModifiedChanging(value); + this._DateModified = value; + this.OnDateModifiedChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.DateTime _DateModified; + partial void OnDateModifiedChanging(global::System.DateTime value); + partial void OnDateModifiedChanged(); + /// + /// There are no comments for Property Comments in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Comments + { + get + { + return this._Comments; + } + set + { + this.OnCommentsChanging(value); + this._Comments = value; + this.OnCommentsChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Comments; + partial void OnCommentsChanging(string value); + partial void OnCommentsChanged(); + /// + /// There are no comments for Property Error in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Error + { + get + { + return this._Error; + } + set + { + this.OnErrorChanging(value); + this._Error = value; + this.OnErrorChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Error; + partial void OnErrorChanging(string value); + partial void OnErrorChanged(); + /// + /// There are no comments for Property ActionId in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public int ActionId + { + get + { + return this._ActionId; + } + set + { + this.OnActionIdChanging(value); + this._ActionId = value; + this.OnActionIdChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private int _ActionId; + partial void OnActionIdChanging(int value); + partial void OnActionIdChanged(); + /// + /// There are no comments for Property CompletedSteps in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public int CompletedSteps + { + get + { + return this._CompletedSteps; + } + set + { + this.OnCompletedStepsChanging(value); + this._CompletedSteps = value; + this.OnCompletedStepsChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private int _CompletedSteps; + partial void OnCompletedStepsChanging(int value); + partial void OnCompletedStepsChanged(); + /// + /// There are no comments for Property TotalSteps in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public int TotalSteps + { + get + { + return this._TotalSteps; + } + set + { + this.OnTotalStepsChanging(value); + this._TotalSteps = value; + this.OnTotalStepsChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private int _TotalSteps; + partial void OnTotalStepsChanging(int value); + partial void OnTotalStepsChanged(); + /// + /// There are no comments for Property DacObjectTypeName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DacObjectTypeName + { + get + { + return this._DacObjectTypeName; + } + set + { + this.OnDacObjectTypeNameChanging(value); + this._DacObjectTypeName = value; + this.OnDacObjectTypeNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DacObjectTypeName; + partial void OnDacObjectTypeNameChanging(string value); + partial void OnDacObjectTypeNameChanged(); + /// + /// There are no comments for OperationDetails in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Collections.ObjectModel.Collection OperationDetails + { + get + { + return this._OperationDetails; + } + set + { + if ((value != null)) + { + this._OperationDetails = value; + } + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Collections.ObjectModel.Collection _OperationDetails = new global::System.Collections.ObjectModel.Collection(); + } + /// + /// There are no comments for Microsoft.SqlServer.Management.Server.Domain.OperationDetail in the schema. + /// + /// + /// EntityId + /// + [global::System.Data.Services.Common.DataServiceKeyAttribute("EntityId")] + public partial class OperationDetail + { + /// + /// Create a new OperationDetail object. + /// + /// Initial value of DateCreated. + /// Initial value of DateModified. + /// Initial value of SequenceId. + /// Initial value of EntityId. + /// Initial value of ActionId. + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static OperationDetail CreateOperationDetail(global::System.DateTime dateCreated, global::System.DateTime dateModified, int sequenceId, string entityId, int actionId) + { + OperationDetail operationDetail = new OperationDetail(); + operationDetail.DateCreated = dateCreated; + operationDetail.DateModified = dateModified; + operationDetail.SequenceId = sequenceId; + operationDetail.EntityId = entityId; + operationDetail.ActionId = actionId; + return operationDetail; + } + /// + /// There are no comments for Property ActionTypeName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ActionTypeName + { + get + { + return this._ActionTypeName; + } + set + { + this.OnActionTypeNameChanging(value); + this._ActionTypeName = value; + this.OnActionTypeNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ActionTypeName; + partial void OnActionTypeNameChanging(string value); + partial void OnActionTypeNameChanged(); + /// + /// There are no comments for Property ActionStatusName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ActionStatusName + { + get + { + return this._ActionStatusName; + } + set + { + this.OnActionStatusNameChanging(value); + this._ActionStatusName = value; + this.OnActionStatusNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ActionStatusName; + partial void OnActionStatusNameChanging(string value); + partial void OnActionStatusNameChanged(); + /// + /// There are no comments for Property DacDatabaseName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DacDatabaseName + { + get + { + return this._DacDatabaseName; + } + set + { + this.OnDacDatabaseNameChanging(value); + this._DacDatabaseName = value; + this.OnDacDatabaseNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DacDatabaseName; + partial void OnDacDatabaseNameChanging(string value); + partial void OnDacDatabaseNameChanged(); + /// + /// There are no comments for Property CreatedBy in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string CreatedBy + { + get + { + return this._CreatedBy; + } + set + { + this.OnCreatedByChanging(value); + this._CreatedBy = value; + this.OnCreatedByChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _CreatedBy; + partial void OnCreatedByChanging(string value); + partial void OnCreatedByChanged(); + /// + /// There are no comments for Property DateCreated in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.DateTime DateCreated + { + get + { + return this._DateCreated; + } + set + { + this.OnDateCreatedChanging(value); + this._DateCreated = value; + this.OnDateCreatedChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.DateTime _DateCreated; + partial void OnDateCreatedChanging(global::System.DateTime value); + partial void OnDateCreatedChanged(); + /// + /// There are no comments for Property DateModified in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.DateTime DateModified + { + get + { + return this._DateModified; + } + set + { + this.OnDateModifiedChanging(value); + this._DateModified = value; + this.OnDateModifiedChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.DateTime _DateModified; + partial void OnDateModifiedChanging(global::System.DateTime value); + partial void OnDateModifiedChanged(); + /// + /// There are no comments for Property Comments in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Comments + { + get + { + return this._Comments; + } + set + { + this.OnCommentsChanging(value); + this._Comments = value; + this.OnCommentsChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Comments; + partial void OnCommentsChanging(string value); + partial void OnCommentsChanged(); + /// + /// There are no comments for Property Error in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Error + { + get + { + return this._Error; + } + set + { + this.OnErrorChanging(value); + this._Error = value; + this.OnErrorChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Error; + partial void OnErrorChanging(string value); + partial void OnErrorChanged(); + /// + /// There are no comments for Property SequenceId in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public int SequenceId + { + get + { + return this._SequenceId; + } + set + { + this.OnSequenceIdChanging(value); + this._SequenceId = value; + this.OnSequenceIdChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private int _SequenceId; + partial void OnSequenceIdChanging(int value); + partial void OnSequenceIdChanged(); + /// + /// There are no comments for Property EntityId in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string EntityId + { + get + { + return this._EntityId; + } + set + { + this.OnEntityIdChanging(value); + this._EntityId = value; + this.OnEntityIdChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _EntityId; + partial void OnEntityIdChanging(string value); + partial void OnEntityIdChanged(); + /// + /// There are no comments for Property ActionId in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public int ActionId + { + get + { + return this._ActionId; + } + set + { + this.OnActionIdChanging(value); + this._ActionId = value; + this.OnActionIdChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private int _ActionId; + partial void OnActionIdChanging(int value); + partial void OnActionIdChanged(); + /// + /// There are no comments for Property DacObjectTypeName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DacObjectTypeName + { + get + { + return this._DacObjectTypeName; + } + set + { + this.OnDacObjectTypeNameChanging(value); + this._DacObjectTypeName = value; + this.OnDacObjectTypeNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DacObjectTypeName; + partial void OnDacObjectTypeNameChanging(string value); + partial void OnDacObjectTypeNameChanged(); + /// + /// There are no comments for Operation in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public Operation Operation + { + get + { + return this._Operation; + } + set + { + this._Operation = value; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private Operation _Operation; + } + /// + /// There are no comments for Microsoft.SqlServer.Management.Server.Domain.CreateDatabaseFromDacPacOperation in the schema. + /// + /// + /// OperationGuid + /// + [global::System.Data.Services.Common.DataServiceKeyAttribute("OperationGuid")] + public partial class CreateDatabaseFromDacPacOperation + { + /// + /// Create a new CreateDatabaseFromDacPacOperation object. + /// + /// Initial value of OperationGuid. + /// Initial value of OperationId. + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static CreateDatabaseFromDacPacOperation CreateCreateDatabaseFromDacPacOperation(global::System.Guid operationGuid, int operationId) + { + CreateDatabaseFromDacPacOperation createDatabaseFromDacPacOperation = new CreateDatabaseFromDacPacOperation(); + createDatabaseFromDacPacOperation.OperationGuid = operationGuid; + createDatabaseFromDacPacOperation.OperationId = operationId; + return createDatabaseFromDacPacOperation; + } + /// + /// There are no comments for Property OperationGuid in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid OperationGuid + { + get + { + return this._OperationGuid; + } + set + { + this.OnOperationGuidChanging(value); + this._OperationGuid = value; + this.OnOperationGuidChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _OperationGuid; + partial void OnOperationGuidChanging(global::System.Guid value); + partial void OnOperationGuidChanged(); + /// + /// There are no comments for Property DatabaseName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DatabaseName + { + get + { + return this._DatabaseName; + } + set + { + this.OnDatabaseNameChanging(value); + this._DatabaseName = value; + this.OnDatabaseNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DatabaseName; + partial void OnDatabaseNameChanging(string value); + partial void OnDatabaseNameChanged(); + /// + /// There are no comments for Property Edition in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Edition + { + get + { + return this._Edition; + } + set + { + this.OnEditionChanging(value); + this._Edition = value; + this.OnEditionChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Edition; + partial void OnEditionChanging(string value); + partial void OnEditionChanged(); + /// + /// There are no comments for Property MaxSizeGB in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MaxSizeGB + { + get + { + return this._MaxSizeGB; + } + set + { + this.OnMaxSizeGBChanging(value); + this._MaxSizeGB = value; + this.OnMaxSizeGBChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MaxSizeGB; + partial void OnMaxSizeGBChanging(global::System.Nullable value); + partial void OnMaxSizeGBChanged(); + /// + /// There are no comments for Property OperationId in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public int OperationId + { + get + { + return this._OperationId; + } + set + { + this.OnOperationIdChanging(value); + this._OperationId = value; + this.OnOperationIdChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private int _OperationId; + partial void OnOperationIdChanging(int value); + partial void OnOperationIdChanged(); + /// + /// There are no comments for Property DacPac in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public byte[] DacPac + { + get + { + if ((this._DacPac != null)) + { + return ((byte[])(this._DacPac.Clone())); + } + else + { + return null; + } + } + set + { + this.OnDacPacChanging(value); + this._DacPac = value; + this.OnDacPacChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private byte[] _DacPac; + partial void OnDacPacChanging(byte[] value); + partial void OnDacPacChanged(); + } + /// + /// There are no comments for Microsoft.SqlServer.Management.Server.Domain.ExtractDacPacOperation in the schema. + /// + /// + /// OperationGuid + /// + [global::System.Data.Services.Common.DataServiceKeyAttribute("OperationGuid")] + public partial class ExtractDacPacOperation + { + /// + /// Create a new ExtractDacPacOperation object. + /// + /// Initial value of OperationGuid. + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static ExtractDacPacOperation CreateExtractDacPacOperation(global::System.Guid operationGuid) + { + ExtractDacPacOperation extractDacPacOperation = new ExtractDacPacOperation(); + extractDacPacOperation.OperationGuid = operationGuid; + return extractDacPacOperation; + } + /// + /// There are no comments for Property OperationGuid in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid OperationGuid + { + get + { + return this._OperationGuid; + } + set + { + this.OnOperationGuidChanging(value); + this._OperationGuid = value; + this.OnOperationGuidChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _OperationGuid; + partial void OnOperationGuidChanging(global::System.Guid value); + partial void OnOperationGuidChanged(); + /// + /// There are no comments for Property DatabaseName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DatabaseName + { + get + { + return this._DatabaseName; + } + set + { + this.OnDatabaseNameChanging(value); + this._DatabaseName = value; + this.OnDatabaseNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DatabaseName; + partial void OnDatabaseNameChanging(string value); + partial void OnDatabaseNameChanged(); + /// + /// There are no comments for Property DacTypeName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DacTypeName + { + get + { + return this._DacTypeName; + } + set + { + this.OnDacTypeNameChanging(value); + this._DacTypeName = value; + this.OnDacTypeNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DacTypeName; + partial void OnDacTypeNameChanging(string value); + partial void OnDacTypeNameChanged(); + /// + /// There are no comments for Property Version in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Version + { + get + { + return this._Version; + } + set + { + this.OnVersionChanging(value); + this._Version = value; + this.OnVersionChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Version; + partial void OnVersionChanging(string value); + partial void OnVersionChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property DacPac in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public byte[] DacPac + { + get + { + if ((this._DacPac != null)) + { + return ((byte[])(this._DacPac.Clone())); + } + else + { + return null; + } + } + set + { + this.OnDacPacChanging(value); + this._DacPac = value; + this.OnDacPacChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private byte[] _DacPac; + partial void OnDacPacChanging(byte[] value); + partial void OnDacPacChanged(); + } + /// + /// There are no comments for Microsoft.SqlServer.Management.Server.Domain.UpgradeDatabaseFromDacPacOperation in the schema. + /// + /// + /// OperationGuid + /// + [global::System.Data.Services.Common.DataServiceKeyAttribute("OperationGuid")] + public partial class UpgradeDatabaseFromDacPacOperation + { + /// + /// Create a new UpgradeDatabaseFromDacPacOperation object. + /// + /// Initial value of OperationGuid. + /// Initial value of OperationId. + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static UpgradeDatabaseFromDacPacOperation CreateUpgradeDatabaseFromDacPacOperation(global::System.Guid operationGuid, int operationId) + { + UpgradeDatabaseFromDacPacOperation upgradeDatabaseFromDacPacOperation = new UpgradeDatabaseFromDacPacOperation(); + upgradeDatabaseFromDacPacOperation.OperationGuid = operationGuid; + upgradeDatabaseFromDacPacOperation.OperationId = operationId; + return upgradeDatabaseFromDacPacOperation; + } + /// + /// There are no comments for Property OperationGuid in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid OperationGuid + { + get + { + return this._OperationGuid; + } + set + { + this.OnOperationGuidChanging(value); + this._OperationGuid = value; + this.OnOperationGuidChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _OperationGuid; + partial void OnOperationGuidChanging(global::System.Guid value); + partial void OnOperationGuidChanged(); + /// + /// There are no comments for Property DatabaseName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DatabaseName + { + get + { + return this._DatabaseName; + } + set + { + this.OnDatabaseNameChanging(value); + this._DatabaseName = value; + this.OnDatabaseNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DatabaseName; + partial void OnDatabaseNameChanging(string value); + partial void OnDatabaseNameChanged(); + /// + /// There are no comments for Property DacPac in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public byte[] DacPac + { + get + { + if ((this._DacPac != null)) + { + return ((byte[])(this._DacPac.Clone())); + } + else + { + return null; + } + } + set + { + this.OnDacPacChanging(value); + this._DacPac = value; + this.OnDacPacChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private byte[] _DacPac; + partial void OnDacPacChanging(byte[] value); + partial void OnDacPacChanged(); + /// + /// There are no comments for Property RollbackOnFailure in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable RollbackOnFailure + { + get + { + return this._RollbackOnFailure; + } + set + { + this.OnRollbackOnFailureChanging(value); + this._RollbackOnFailure = value; + this.OnRollbackOnFailureChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _RollbackOnFailure; + partial void OnRollbackOnFailureChanging(global::System.Nullable value); + partial void OnRollbackOnFailureChanged(); + /// + /// There are no comments for Property OperationId in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public int OperationId + { + get + { + return this._OperationId; + } + set + { + this.OnOperationIdChanging(value); + this._OperationId = value; + this.OnOperationIdChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private int _OperationId; + partial void OnOperationIdChanging(int value); + partial void OnOperationIdChanged(); + } + /// + /// There are no comments for Microsoft.SqlServer.Management.Server.Domain.ViewDatabaseChangesOperation in the schema. + /// + /// + /// OperationGuid + /// + [global::System.Data.Services.Common.DataServiceKeyAttribute("OperationGuid")] + public partial class ViewDatabaseChangesOperation + { + /// + /// Create a new ViewDatabaseChangesOperation object. + /// + /// Initial value of OperationGuid. + /// Initial value of IsRegisteredDac. + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static ViewDatabaseChangesOperation CreateViewDatabaseChangesOperation(global::System.Guid operationGuid, bool isRegisteredDac) + { + ViewDatabaseChangesOperation viewDatabaseChangesOperation = new ViewDatabaseChangesOperation(); + viewDatabaseChangesOperation.OperationGuid = operationGuid; + viewDatabaseChangesOperation.IsRegisteredDac = isRegisteredDac; + return viewDatabaseChangesOperation; + } + /// + /// There are no comments for Property OperationGuid in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid OperationGuid + { + get + { + return this._OperationGuid; + } + set + { + this.OnOperationGuidChanging(value); + this._OperationGuid = value; + this.OnOperationGuidChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _OperationGuid; + partial void OnOperationGuidChanging(global::System.Guid value); + partial void OnOperationGuidChanged(); + /// + /// There are no comments for Property DatabaseName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DatabaseName + { + get + { + return this._DatabaseName; + } + set + { + this.OnDatabaseNameChanging(value); + this._DatabaseName = value; + this.OnDatabaseNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DatabaseName; + partial void OnDatabaseNameChanging(string value); + partial void OnDatabaseNameChanged(); + /// + /// There are no comments for Property ChangeResult in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ChangeResult + { + get + { + return this._ChangeResult; + } + set + { + this.OnChangeResultChanging(value); + this._ChangeResult = value; + this.OnChangeResultChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ChangeResult; + partial void OnChangeResultChanging(string value); + partial void OnChangeResultChanged(); + /// + /// There are no comments for Property IsRegisteredDac in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public bool IsRegisteredDac + { + get + { + return this._IsRegisteredDac; + } + set + { + this.OnIsRegisteredDacChanging(value); + this._IsRegisteredDac = value; + this.OnIsRegisteredDacChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _IsRegisteredDac; + partial void OnIsRegisteredDacChanging(bool value); + partial void OnIsRegisteredDacChanged(); + } + /// + /// There are no comments for Microsoft.SqlServer.Management.Server.Domain.ViewUpgradePlanOperation in the schema. + /// + /// + /// OperationGuid + /// + [global::System.Data.Services.Common.DataServiceKeyAttribute("OperationGuid")] + public partial class ViewUpgradePlanOperation + { + /// + /// Create a new ViewUpgradePlanOperation object. + /// + /// Initial value of OperationGuid. + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static ViewUpgradePlanOperation CreateViewUpgradePlanOperation(global::System.Guid operationGuid) + { + ViewUpgradePlanOperation viewUpgradePlanOperation = new ViewUpgradePlanOperation(); + viewUpgradePlanOperation.OperationGuid = operationGuid; + return viewUpgradePlanOperation; + } + /// + /// There are no comments for Property OperationGuid in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid OperationGuid + { + get + { + return this._OperationGuid; + } + set + { + this.OnOperationGuidChanging(value); + this._OperationGuid = value; + this.OnOperationGuidChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _OperationGuid; + partial void OnOperationGuidChanging(global::System.Guid value); + partial void OnOperationGuidChanged(); + /// + /// There are no comments for Property DatabaseName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DatabaseName + { + get + { + return this._DatabaseName; + } + set + { + this.OnDatabaseNameChanging(value); + this._DatabaseName = value; + this.OnDatabaseNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DatabaseName; + partial void OnDatabaseNameChanging(string value); + partial void OnDatabaseNameChanged(); + /// + /// There are no comments for Property DacPac in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public byte[] DacPac + { + get + { + if ((this._DacPac != null)) + { + return ((byte[])(this._DacPac.Clone())); + } + else + { + return null; + } + } + set + { + this.OnDacPacChanging(value); + this._DacPac = value; + this.OnDacPacChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private byte[] _DacPac; + partial void OnDacPacChanging(byte[] value); + partial void OnDacPacChanged(); + /// + /// There are no comments for Property RollbackOnFailure in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable RollbackOnFailure + { + get + { + return this._RollbackOnFailure; + } + set + { + this.OnRollbackOnFailureChanging(value); + this._RollbackOnFailure = value; + this.OnRollbackOnFailureChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _RollbackOnFailure; + partial void OnRollbackOnFailureChanging(global::System.Nullable value); + partial void OnRollbackOnFailureChanged(); + /// + /// There are no comments for Property UpgradePlan in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string UpgradePlan + { + get + { + return this._UpgradePlan; + } + set + { + this.OnUpgradePlanChanging(value); + this._UpgradePlan = value; + this.OnUpgradePlanChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _UpgradePlan; + partial void OnUpgradePlanChanging(string value); + partial void OnUpgradePlanChanged(); + /// + /// There are no comments for Property UpgradeScript in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string UpgradeScript + { + get + { + return this._UpgradeScript; + } + set + { + this.OnUpgradeScriptChanging(value); + this._UpgradeScript = value; + this.OnUpgradeScriptChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _UpgradeScript; + partial void OnUpgradeScriptChanging(string value); + partial void OnUpgradeScriptChanged(); + } + /// + /// There are no comments for Microsoft.SqlServer.Management.Server.Domain.DatabaseRestoreStatus in the schema. + /// + /// + /// RequestID + /// + [global::System.Data.Services.Common.DataServiceKeyAttribute("RequestID")] + public partial class DatabaseRestoreStatus + { + /// + /// Create a new DatabaseRestoreStatus object. + /// + /// Initial value of RequestID. + /// Initial value of IsCancelled. + /// Initial value of CreatedDate. + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static DatabaseRestoreStatus CreateDatabaseRestoreStatus(global::System.Guid requestID, bool isCancelled, global::System.DateTime createdDate) + { + DatabaseRestoreStatus databaseRestoreStatus = new DatabaseRestoreStatus(); + databaseRestoreStatus.RequestID = requestID; + databaseRestoreStatus.IsCancelled = isCancelled; + databaseRestoreStatus.CreatedDate = createdDate; + return databaseRestoreStatus; + } + /// + /// There are no comments for Property RequestID in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid RequestID + { + get + { + return this._RequestID; + } + set + { + this.OnRequestIDChanging(value); + this._RequestID = value; + this.OnRequestIDChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _RequestID; + partial void OnRequestIDChanging(global::System.Guid value); + partial void OnRequestIDChanged(); + /// + /// There are no comments for Property SourceServerName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string SourceServerName + { + get + { + return this._SourceServerName; + } + set + { + this.OnSourceServerNameChanging(value); + this._SourceServerName = value; + this.OnSourceServerNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _SourceServerName; + partial void OnSourceServerNameChanging(string value); + partial void OnSourceServerNameChanged(); + /// + /// There are no comments for Property SourceDatabaseName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string SourceDatabaseName + { + get + { + return this._SourceDatabaseName; + } + set + { + this.OnSourceDatabaseNameChanging(value); + this._SourceDatabaseName = value; + this.OnSourceDatabaseNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _SourceDatabaseName; + partial void OnSourceDatabaseNameChanging(string value); + partial void OnSourceDatabaseNameChanged(); + /// + /// There are no comments for Property SourceDatabaseDeletionDate in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable SourceDatabaseDeletionDate + { + get + { + return this._SourceDatabaseDeletionDate; + } + set + { + this.OnSourceDatabaseDeletionDateChanging(value); + this._SourceDatabaseDeletionDate = value; + this.OnSourceDatabaseDeletionDateChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _SourceDatabaseDeletionDate; + partial void OnSourceDatabaseDeletionDateChanging(global::System.Nullable value); + partial void OnSourceDatabaseDeletionDateChanged(); + /// + /// There are no comments for Property TargetServerName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string TargetServerName + { + get + { + return this._TargetServerName; + } + set + { + this.OnTargetServerNameChanging(value); + this._TargetServerName = value; + this.OnTargetServerNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _TargetServerName; + partial void OnTargetServerNameChanging(string value); + partial void OnTargetServerNameChanged(); + /// + /// There are no comments for Property TargetDatabaseName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string TargetDatabaseName + { + get + { + return this._TargetDatabaseName; + } + set + { + this.OnTargetDatabaseNameChanging(value); + this._TargetDatabaseName = value; + this.OnTargetDatabaseNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _TargetDatabaseName; + partial void OnTargetDatabaseNameChanging(string value); + partial void OnTargetDatabaseNameChanged(); + /// + /// There are no comments for Property TargetUtcPointInTime in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable TargetUtcPointInTime + { + get + { + return this._TargetUtcPointInTime; + } + set + { + this.OnTargetUtcPointInTimeChanging(value); + this._TargetUtcPointInTime = value; + this.OnTargetUtcPointInTimeChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _TargetUtcPointInTime; + partial void OnTargetUtcPointInTimeChanging(global::System.Nullable value); + partial void OnTargetUtcPointInTimeChanged(); + /// + /// There are no comments for Property State in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string State + { + get + { + return this._State; + } + set + { + this.OnStateChanging(value); + this._State = value; + this.OnStateChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _State; + partial void OnStateChanging(string value); + partial void OnStateChanged(); + /// + /// There are no comments for Property Error in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Error + { + get + { + return this._Error; + } + set + { + this.OnErrorChanging(value); + this._Error = value; + this.OnErrorChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Error; + partial void OnErrorChanging(string value); + partial void OnErrorChanged(); + /// + /// There are no comments for Property IsCancelled in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public bool IsCancelled + { + get + { + return this._IsCancelled; + } + set + { + this.OnIsCancelledChanging(value); + this._IsCancelled = value; + this.OnIsCancelledChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _IsCancelled; + partial void OnIsCancelledChanging(bool value); + partial void OnIsCancelledChanged(); + /// + /// There are no comments for Property CreatedBy in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string CreatedBy + { + get + { + return this._CreatedBy; + } + set + { + this.OnCreatedByChanging(value); + this._CreatedBy = value; + this.OnCreatedByChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _CreatedBy; + partial void OnCreatedByChanging(string value); + partial void OnCreatedByChanged(); + /// + /// There are no comments for Property CreatedDate in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.DateTime CreatedDate + { + get + { + return this._CreatedDate; + } + set + { + this.OnCreatedDateChanging(value); + this._CreatedDate = value; + this.OnCreatedDateChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.DateTime _CreatedDate; + partial void OnCreatedDateChanging(global::System.DateTime value); + partial void OnCreatedDateChanged(); + } + /// + /// There are no comments for Microsoft.SqlServer.Management.Server.Domain.RestoreDatabaseOperation in the schema. + /// + /// + /// RequestID + /// + [global::System.Data.Services.Common.DataServiceKeyAttribute("RequestID")] + public partial class RestoreDatabaseOperation + { + /// + /// Create a new RestoreDatabaseOperation object. + /// + /// Initial value of RequestID. + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static RestoreDatabaseOperation CreateRestoreDatabaseOperation(global::System.Guid requestID) + { + RestoreDatabaseOperation restoreDatabaseOperation = new RestoreDatabaseOperation(); + restoreDatabaseOperation.RequestID = requestID; + return restoreDatabaseOperation; + } + /// + /// There are no comments for Property RequestID in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid RequestID + { + get + { + return this._RequestID; + } + set + { + this.OnRequestIDChanging(value); + this._RequestID = value; + this.OnRequestIDChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _RequestID; + partial void OnRequestIDChanging(global::System.Guid value); + partial void OnRequestIDChanged(); + /// + /// There are no comments for Property SourceDatabaseName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string SourceDatabaseName + { + get + { + return this._SourceDatabaseName; + } + set + { + this.OnSourceDatabaseNameChanging(value); + this._SourceDatabaseName = value; + this.OnSourceDatabaseNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _SourceDatabaseName; + partial void OnSourceDatabaseNameChanging(string value); + partial void OnSourceDatabaseNameChanged(); + /// + /// There are no comments for Property SourceDatabaseDeletionDate in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable SourceDatabaseDeletionDate + { + get + { + return this._SourceDatabaseDeletionDate; + } + set + { + this.OnSourceDatabaseDeletionDateChanging(value); + this._SourceDatabaseDeletionDate = value; + this.OnSourceDatabaseDeletionDateChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _SourceDatabaseDeletionDate; + partial void OnSourceDatabaseDeletionDateChanging(global::System.Nullable value); + partial void OnSourceDatabaseDeletionDateChanged(); + /// + /// There are no comments for Property TargetServerName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string TargetServerName + { + get + { + return this._TargetServerName; + } + set + { + this.OnTargetServerNameChanging(value); + this._TargetServerName = value; + this.OnTargetServerNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _TargetServerName; + partial void OnTargetServerNameChanging(string value); + partial void OnTargetServerNameChanged(); + /// + /// There are no comments for Property TargetDatabaseName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string TargetDatabaseName + { + get + { + return this._TargetDatabaseName; + } + set + { + this.OnTargetDatabaseNameChanging(value); + this._TargetDatabaseName = value; + this.OnTargetDatabaseNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _TargetDatabaseName; + partial void OnTargetDatabaseNameChanging(string value); + partial void OnTargetDatabaseNameChanged(); + /// + /// There are no comments for Property TargetUtcPointInTime in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable TargetUtcPointInTime + { + get + { + return this._TargetUtcPointInTime; + } + set + { + this.OnTargetUtcPointInTimeChanging(value); + this._TargetUtcPointInTime = value; + this.OnTargetUtcPointInTimeChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _TargetUtcPointInTime; + partial void OnTargetUtcPointInTimeChanging(global::System.Nullable value); + partial void OnTargetUtcPointInTimeChanged(); + } + /// + /// There are no comments for Microsoft.SqlServer.Management.Server.Domain.RecoverDatabaseOperation in the schema. + /// + /// + /// RequestID + /// + [global::System.Data.Services.Common.DataServiceKeyAttribute("RequestID")] + public partial class RecoverDatabaseOperation + { + /// + /// Create a new RecoverDatabaseOperation object. + /// + /// Initial value of RequestID. + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static RecoverDatabaseOperation CreateRecoverDatabaseOperation(global::System.Guid requestID) + { + RecoverDatabaseOperation recoverDatabaseOperation = new RecoverDatabaseOperation(); + recoverDatabaseOperation.RequestID = requestID; + return recoverDatabaseOperation; + } + /// + /// There are no comments for Property RequestID in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid RequestID + { + get + { + return this._RequestID; + } + set + { + this.OnRequestIDChanging(value); + this._RequestID = value; + this.OnRequestIDChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _RequestID; + partial void OnRequestIDChanging(global::System.Guid value); + partial void OnRequestIDChanged(); + /// + /// There are no comments for Property SourceDatabaseName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string SourceDatabaseName + { + get + { + return this._SourceDatabaseName; + } + set + { + this.OnSourceDatabaseNameChanging(value); + this._SourceDatabaseName = value; + this.OnSourceDatabaseNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _SourceDatabaseName; + partial void OnSourceDatabaseNameChanging(string value); + partial void OnSourceDatabaseNameChanged(); + /// + /// There are no comments for Property TargetServerName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string TargetServerName + { + get + { + return this._TargetServerName; + } + set + { + this.OnTargetServerNameChanging(value); + this._TargetServerName = value; + this.OnTargetServerNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _TargetServerName; + partial void OnTargetServerNameChanging(string value); + partial void OnTargetServerNameChanged(); + /// + /// There are no comments for Property TargetDatabaseName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string TargetDatabaseName + { + get + { + return this._TargetDatabaseName; + } + set + { + this.OnTargetDatabaseNameChanging(value); + this._TargetDatabaseName = value; + this.OnTargetDatabaseNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _TargetDatabaseName; + partial void OnTargetDatabaseNameChanging(string value); + partial void OnTargetDatabaseNameChanged(); + } + /// + /// There are no comments for Microsoft.SqlServer.Management.Server.Domain.DatabaseCopy in the schema. + /// + /// + /// EntityId + /// + [global::System.Data.Services.Common.DataServiceKeyAttribute("EntityId")] + public partial class DatabaseCopy + { + /// + /// Create a new DatabaseCopy object. + /// + /// Initial value of LocalDatabaseId. + /// Initial value of IsContinuous. + /// Initial value of IsLocalDatabaseReplicationTarget. + /// Initial value of ReplicationState. + /// Initial value of IsInterlinkConnected. + /// Initial value of EntityId. + /// Initial value of IsOfflineSecondary. + /// Initial value of IsTerminationAllowed. + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static DatabaseCopy CreateDatabaseCopy(int localDatabaseId, bool isContinuous, bool isLocalDatabaseReplicationTarget, byte replicationState, bool isInterlinkConnected, global::System.Guid entityId, bool isOfflineSecondary, bool isTerminationAllowed) + { + DatabaseCopy databaseCopy = new DatabaseCopy(); + databaseCopy.LocalDatabaseId = localDatabaseId; + databaseCopy.IsContinuous = isContinuous; + databaseCopy.IsLocalDatabaseReplicationTarget = isLocalDatabaseReplicationTarget; + databaseCopy.ReplicationState = replicationState; + databaseCopy.IsInterlinkConnected = isInterlinkConnected; + databaseCopy.EntityId = entityId; + databaseCopy.IsOfflineSecondary = isOfflineSecondary; + databaseCopy.IsTerminationAllowed = isTerminationAllowed; + return databaseCopy; + } + /// + /// There are no comments for Property LocalDatabaseId in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public int LocalDatabaseId + { + get + { + return this._LocalDatabaseId; + } + set + { + this.OnLocalDatabaseIdChanging(value); + this._LocalDatabaseId = value; + this.OnLocalDatabaseIdChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private int _LocalDatabaseId; + partial void OnLocalDatabaseIdChanging(int value); + partial void OnLocalDatabaseIdChanged(); + /// + /// There are no comments for Property DestinationServerName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DestinationServerName + { + get + { + return this._DestinationServerName; + } + set + { + this.OnDestinationServerNameChanging(value); + this._DestinationServerName = value; + this.OnDestinationServerNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DestinationServerName; + partial void OnDestinationServerNameChanging(string value); + partial void OnDestinationServerNameChanged(); + /// + /// There are no comments for Property DestinationDatabaseName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DestinationDatabaseName + { + get + { + return this._DestinationDatabaseName; + } + set + { + this.OnDestinationDatabaseNameChanging(value); + this._DestinationDatabaseName = value; + this.OnDestinationDatabaseNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DestinationDatabaseName; + partial void OnDestinationDatabaseNameChanging(string value); + partial void OnDestinationDatabaseNameChanged(); + /// + /// There are no comments for Property SourceServerName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string SourceServerName + { + get + { + return this._SourceServerName; + } + set + { + this.OnSourceServerNameChanging(value); + this._SourceServerName = value; + this.OnSourceServerNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _SourceServerName; + partial void OnSourceServerNameChanging(string value); + partial void OnSourceServerNameChanged(); + /// + /// There are no comments for Property SourceDatabaseName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string SourceDatabaseName + { + get + { + return this._SourceDatabaseName; + } + set + { + this.OnSourceDatabaseNameChanging(value); + this._SourceDatabaseName = value; + this.OnSourceDatabaseNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _SourceDatabaseName; + partial void OnSourceDatabaseNameChanging(string value); + partial void OnSourceDatabaseNameChanged(); + /// + /// There are no comments for Property IsContinuous in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public bool IsContinuous + { + get + { + return this._IsContinuous; + } + set + { + this.OnIsContinuousChanging(value); + this._IsContinuous = value; + this.OnIsContinuousChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _IsContinuous; + partial void OnIsContinuousChanging(bool value); + partial void OnIsContinuousChanged(); + /// + /// There are no comments for Property TextStartDate in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string TextStartDate + { + get + { + return this._TextStartDate; + } + set + { + this.OnTextStartDateChanging(value); + this._TextStartDate = value; + this.OnTextStartDateChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _TextStartDate; + partial void OnTextStartDateChanging(string value); + partial void OnTextStartDateChanged(); + /// + /// There are no comments for Property TextModifyDate in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string TextModifyDate + { + get + { + return this._TextModifyDate; + } + set + { + this.OnTextModifyDateChanging(value); + this._TextModifyDate = value; + this.OnTextModifyDateChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _TextModifyDate; + partial void OnTextModifyDateChanging(string value); + partial void OnTextModifyDateChanged(); + /// + /// There are no comments for Property PercentComplete in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable PercentComplete + { + get + { + return this._PercentComplete; + } + set + { + this.OnPercentCompleteChanging(value); + this._PercentComplete = value; + this.OnPercentCompleteChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _PercentComplete; + partial void OnPercentCompleteChanging(global::System.Nullable value); + partial void OnPercentCompleteChanged(); + /// + /// There are no comments for Property IsLocalDatabaseReplicationTarget in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public bool IsLocalDatabaseReplicationTarget + { + get + { + return this._IsLocalDatabaseReplicationTarget; + } + set + { + this.OnIsLocalDatabaseReplicationTargetChanging(value); + this._IsLocalDatabaseReplicationTarget = value; + this.OnIsLocalDatabaseReplicationTargetChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _IsLocalDatabaseReplicationTarget; + partial void OnIsLocalDatabaseReplicationTargetChanging(bool value); + partial void OnIsLocalDatabaseReplicationTargetChanged(); + /// + /// There are no comments for Property ReplicationState in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public byte ReplicationState + { + get + { + return this._ReplicationState; + } + set + { + this.OnReplicationStateChanging(value); + this._ReplicationState = value; + this.OnReplicationStateChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private byte _ReplicationState; + partial void OnReplicationStateChanging(byte value); + partial void OnReplicationStateChanged(); + /// + /// There are no comments for Property ReplicationStateDescription in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ReplicationStateDescription + { + get + { + return this._ReplicationStateDescription; + } + set + { + this.OnReplicationStateDescriptionChanging(value); + this._ReplicationStateDescription = value; + this.OnReplicationStateDescriptionChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ReplicationStateDescription; + partial void OnReplicationStateDescriptionChanging(string value); + partial void OnReplicationStateDescriptionChanged(); + /// + /// There are no comments for Property IsInterlinkConnected in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public bool IsInterlinkConnected + { + get + { + return this._IsInterlinkConnected; + } + set + { + this.OnIsInterlinkConnectedChanging(value); + this._IsInterlinkConnected = value; + this.OnIsInterlinkConnectedChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _IsInterlinkConnected; + partial void OnIsInterlinkConnectedChanging(bool value); + partial void OnIsInterlinkConnectedChanged(); + /// + /// There are no comments for Property IsForcedTerminate in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable IsForcedTerminate + { + get + { + return this._IsForcedTerminate; + } + set + { + this.OnIsForcedTerminateChanging(value); + this._IsForcedTerminate = value; + this.OnIsForcedTerminateChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _IsForcedTerminate; + partial void OnIsForcedTerminateChanging(global::System.Nullable value); + partial void OnIsForcedTerminateChanged(); + /// + /// There are no comments for Property MaximumLag in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable MaximumLag + { + get + { + return this._MaximumLag; + } + set + { + this.OnMaximumLagChanging(value); + this._MaximumLag = value; + this.OnMaximumLagChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _MaximumLag; + partial void OnMaximumLagChanging(global::System.Nullable value); + partial void OnMaximumLagChanged(); + /// + /// There are no comments for Property EntityId in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid EntityId + { + get + { + return this._EntityId; + } + set + { + this.OnEntityIdChanging(value); + this._EntityId = value; + this.OnEntityIdChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _EntityId; + partial void OnEntityIdChanging(global::System.Guid value); + partial void OnEntityIdChanged(); + /// + /// There are no comments for Property IsOfflineSecondary in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public bool IsOfflineSecondary + { + get + { + return this._IsOfflineSecondary; + } + set + { + this.OnIsOfflineSecondaryChanging(value); + this._IsOfflineSecondary = value; + this.OnIsOfflineSecondaryChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _IsOfflineSecondary; + partial void OnIsOfflineSecondaryChanging(bool value); + partial void OnIsOfflineSecondaryChanged(); + /// + /// There are no comments for Property IsTerminationAllowed in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public bool IsTerminationAllowed + { + get + { + return this._IsTerminationAllowed; + } + set + { + this.OnIsTerminationAllowedChanging(value); + this._IsTerminationAllowed = value; + this.OnIsTerminationAllowedChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private bool _IsTerminationAllowed; + partial void OnIsTerminationAllowedChanging(bool value); + partial void OnIsTerminationAllowedChanged(); + /// + /// There are no comments for Database in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public Database Database + { + get + { + return this._Database; + } + set + { + this._Database = value; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private Database _Database; + } + /// + /// There are no comments for Microsoft.SqlServer.Management.Server.Domain.DatabaseCopyValidationOperation in the schema. + /// + /// + /// DatabaseName + /// + [global::System.Data.Services.Common.DataServiceKeyAttribute("DatabaseName")] + public partial class DatabaseCopyValidationOperation + { + /// + /// Create a new DatabaseCopyValidationOperation object. + /// + /// Initial value of DatabaseName. + /// Initial value of Action. + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static DatabaseCopyValidationOperation CreateDatabaseCopyValidationOperation(string databaseName, int action) + { + DatabaseCopyValidationOperation databaseCopyValidationOperation = new DatabaseCopyValidationOperation(); + databaseCopyValidationOperation.DatabaseName = databaseName; + databaseCopyValidationOperation.Action = action; + return databaseCopyValidationOperation; + } + /// + /// There are no comments for Property DatabaseName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DatabaseName + { + get + { + return this._DatabaseName; + } + set + { + this.OnDatabaseNameChanging(value); + this._DatabaseName = value; + this.OnDatabaseNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DatabaseName; + partial void OnDatabaseNameChanging(string value); + partial void OnDatabaseNameChanged(); + /// + /// There are no comments for Property Action in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public int Action + { + get + { + return this._Action; + } + set + { + this.OnActionChanging(value); + this._Action = value; + this.OnActionChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private int _Action; + partial void OnActionChanging(int value); + partial void OnActionChanged(); + /// + /// There are no comments for Property LoginSid in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string LoginSid + { + get + { + return this._LoginSid; + } + set + { + this.OnLoginSidChanging(value); + this._LoginSid = value; + this.OnLoginSidChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _LoginSid; + partial void OnLoginSidChanging(string value); + partial void OnLoginSidChanged(); + } + /// + /// There are no comments for Microsoft.SqlServer.Management.Server.Domain.FirewallRule in the schema. + /// + /// + /// Name + /// + [global::System.Data.Services.Common.DataServiceKeyAttribute("Name")] + public partial class FirewallRule + { + /// + /// Create a new FirewallRule object. + /// + /// Initial value of Name. + /// Initial value of CreateDate. + /// Initial value of ModifyDate. + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static FirewallRule CreateFirewallRule(string name, global::System.DateTime createDate, global::System.DateTime modifyDate) + { + FirewallRule firewallRule = new FirewallRule(); + firewallRule.Name = name; + firewallRule.CreateDate = createDate; + firewallRule.ModifyDate = modifyDate; + return firewallRule; + } + /// + /// There are no comments for Property Name in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property StartIPAddress in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string StartIPAddress + { + get + { + return this._StartIPAddress; + } + set + { + this.OnStartIPAddressChanging(value); + this._StartIPAddress = value; + this.OnStartIPAddressChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _StartIPAddress; + partial void OnStartIPAddressChanging(string value); + partial void OnStartIPAddressChanged(); + /// + /// There are no comments for Property EndIPAddress in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string EndIPAddress + { + get + { + return this._EndIPAddress; + } + set + { + this.OnEndIPAddressChanging(value); + this._EndIPAddress = value; + this.OnEndIPAddressChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _EndIPAddress; + partial void OnEndIPAddressChanging(string value); + partial void OnEndIPAddressChanged(); + /// + /// There are no comments for Property CreateDate in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.DateTime CreateDate + { + get + { + return this._CreateDate; + } + set + { + this.OnCreateDateChanging(value); + this._CreateDate = value; + this.OnCreateDateChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.DateTime _CreateDate; + partial void OnCreateDateChanging(global::System.DateTime value); + partial void OnCreateDateChanged(); + /// + /// There are no comments for Property ModifyDate in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.DateTime ModifyDate + { + get + { + return this._ModifyDate; + } + set + { + this.OnModifyDateChanging(value); + this._ModifyDate = value; + this.OnModifyDateChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.DateTime _ModifyDate; + partial void OnModifyDateChanging(global::System.DateTime value); + partial void OnModifyDateChanged(); + } + /// + /// There are no comments for Microsoft.SqlServer.Management.Server.Domain.DatabaseMetrics in the schema. + /// + /// + /// DatabaseId + /// + [global::System.Data.Services.Common.DataServiceKeyAttribute("DatabaseId")] + public partial class DatabaseMetrics + { + /// + /// Create a new DatabaseMetrics object. + /// + /// Initial value of DatabaseId. + /// Initial value of NumberOfLoginSuccessEvents. + /// Initial value of NumberOfLoginFailureEvents. + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static DatabaseMetrics CreateDatabaseMetrics(int databaseId, long numberOfLoginSuccessEvents, long numberOfLoginFailureEvents) + { + DatabaseMetrics databaseMetrics = new DatabaseMetrics(); + databaseMetrics.DatabaseId = databaseId; + databaseMetrics.NumberOfLoginSuccessEvents = numberOfLoginSuccessEvents; + databaseMetrics.NumberOfLoginFailureEvents = numberOfLoginFailureEvents; + return databaseMetrics; + } + /// + /// There are no comments for Property DatabaseId in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public int DatabaseId + { + get + { + return this._DatabaseId; + } + set + { + this.OnDatabaseIdChanging(value); + this._DatabaseId = value; + this.OnDatabaseIdChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private int _DatabaseId; + partial void OnDatabaseIdChanging(int value); + partial void OnDatabaseIdChanged(); + /// + /// There are no comments for Property DatabaseName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DatabaseName + { + get + { + return this._DatabaseName; + } + set + { + this.OnDatabaseNameChanging(value); + this._DatabaseName = value; + this.OnDatabaseNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DatabaseName; + partial void OnDatabaseNameChanging(string value); + partial void OnDatabaseNameChanged(); + /// + /// There are no comments for Property NumberOfLoginSuccessEvents in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public long NumberOfLoginSuccessEvents + { + get + { + return this._NumberOfLoginSuccessEvents; + } + set + { + this.OnNumberOfLoginSuccessEventsChanging(value); + this._NumberOfLoginSuccessEvents = value; + this.OnNumberOfLoginSuccessEventsChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private long _NumberOfLoginSuccessEvents; + partial void OnNumberOfLoginSuccessEventsChanging(long value); + partial void OnNumberOfLoginSuccessEventsChanged(); + /// + /// There are no comments for Property NumberOfLoginFailureEvents in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public long NumberOfLoginFailureEvents + { + get + { + return this._NumberOfLoginFailureEvents; + } + set + { + this.OnNumberOfLoginFailureEventsChanging(value); + this._NumberOfLoginFailureEvents = value; + this.OnNumberOfLoginFailureEventsChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private long _NumberOfLoginFailureEvents; + partial void OnNumberOfLoginFailureEventsChanging(long value); + partial void OnNumberOfLoginFailureEventsChanged(); + /// + /// There are no comments for Database in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public Database Database + { + get + { + return this._Database; + } + set + { + this._Database = value; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private Database _Database; + } + /// + /// There are no comments for Microsoft.SqlServer.Management.Server.Domain.ServerMetrics in the schema. + /// + /// + /// ServerName + /// + [global::System.Data.Services.Common.DataServiceKeyAttribute("ServerName")] + public partial class ServerMetrics + { + /// + /// Create a new ServerMetrics object. + /// + /// Initial value of ServerName. + /// Initial value of NumberOfFailedEvents. + /// Initial value of NumberOfLoginSuccessEvents. + /// Initial value of NumberOfLoginFailureEvents. + /// Initial value of NumberOfTerminatedConnectionEvents. + /// Initial value of NumberOfThrottledEvents. + /// Initial value of NumberOfDeadlockEvents. + /// Initial value of NumberOfReconfiguredEvents. + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static ServerMetrics CreateServerMetrics(string serverName, long numberOfFailedEvents, long numberOfLoginSuccessEvents, long numberOfLoginFailureEvents, long numberOfTerminatedConnectionEvents, long numberOfThrottledEvents, long numberOfDeadlockEvents, long numberOfReconfiguredEvents) + { + ServerMetrics serverMetrics = new ServerMetrics(); + serverMetrics.ServerName = serverName; + serverMetrics.NumberOfFailedEvents = numberOfFailedEvents; + serverMetrics.NumberOfLoginSuccessEvents = numberOfLoginSuccessEvents; + serverMetrics.NumberOfLoginFailureEvents = numberOfLoginFailureEvents; + serverMetrics.NumberOfTerminatedConnectionEvents = numberOfTerminatedConnectionEvents; + serverMetrics.NumberOfThrottledEvents = numberOfThrottledEvents; + serverMetrics.NumberOfDeadlockEvents = numberOfDeadlockEvents; + serverMetrics.NumberOfReconfiguredEvents = numberOfReconfiguredEvents; + return serverMetrics; + } + /// + /// There are no comments for Property ServerName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string ServerName + { + get + { + return this._ServerName; + } + set + { + this.OnServerNameChanging(value); + this._ServerName = value; + this.OnServerNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _ServerName; + partial void OnServerNameChanging(string value); + partial void OnServerNameChanged(); + /// + /// There are no comments for Property NumberOfFailedEvents in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public long NumberOfFailedEvents + { + get + { + return this._NumberOfFailedEvents; + } + set + { + this.OnNumberOfFailedEventsChanging(value); + this._NumberOfFailedEvents = value; + this.OnNumberOfFailedEventsChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private long _NumberOfFailedEvents; + partial void OnNumberOfFailedEventsChanging(long value); + partial void OnNumberOfFailedEventsChanged(); + /// + /// There are no comments for Property NumberOfLoginSuccessEvents in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public long NumberOfLoginSuccessEvents + { + get + { + return this._NumberOfLoginSuccessEvents; + } + set + { + this.OnNumberOfLoginSuccessEventsChanging(value); + this._NumberOfLoginSuccessEvents = value; + this.OnNumberOfLoginSuccessEventsChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private long _NumberOfLoginSuccessEvents; + partial void OnNumberOfLoginSuccessEventsChanging(long value); + partial void OnNumberOfLoginSuccessEventsChanged(); + /// + /// There are no comments for Property NumberOfLoginFailureEvents in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public long NumberOfLoginFailureEvents + { + get + { + return this._NumberOfLoginFailureEvents; + } + set + { + this.OnNumberOfLoginFailureEventsChanging(value); + this._NumberOfLoginFailureEvents = value; + this.OnNumberOfLoginFailureEventsChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private long _NumberOfLoginFailureEvents; + partial void OnNumberOfLoginFailureEventsChanging(long value); + partial void OnNumberOfLoginFailureEventsChanged(); + /// + /// There are no comments for Property NumberOfTerminatedConnectionEvents in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public long NumberOfTerminatedConnectionEvents + { + get + { + return this._NumberOfTerminatedConnectionEvents; + } + set + { + this.OnNumberOfTerminatedConnectionEventsChanging(value); + this._NumberOfTerminatedConnectionEvents = value; + this.OnNumberOfTerminatedConnectionEventsChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private long _NumberOfTerminatedConnectionEvents; + partial void OnNumberOfTerminatedConnectionEventsChanging(long value); + partial void OnNumberOfTerminatedConnectionEventsChanged(); + /// + /// There are no comments for Property NumberOfThrottledEvents in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public long NumberOfThrottledEvents + { + get + { + return this._NumberOfThrottledEvents; + } + set + { + this.OnNumberOfThrottledEventsChanging(value); + this._NumberOfThrottledEvents = value; + this.OnNumberOfThrottledEventsChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private long _NumberOfThrottledEvents; + partial void OnNumberOfThrottledEventsChanging(long value); + partial void OnNumberOfThrottledEventsChanged(); + /// + /// There are no comments for Property NumberOfDeadlockEvents in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public long NumberOfDeadlockEvents + { + get + { + return this._NumberOfDeadlockEvents; + } + set + { + this.OnNumberOfDeadlockEventsChanging(value); + this._NumberOfDeadlockEvents = value; + this.OnNumberOfDeadlockEventsChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private long _NumberOfDeadlockEvents; + partial void OnNumberOfDeadlockEventsChanging(long value); + partial void OnNumberOfDeadlockEventsChanged(); + /// + /// There are no comments for Property NumberOfReconfiguredEvents in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public long NumberOfReconfiguredEvents + { + get + { + return this._NumberOfReconfiguredEvents; + } + set + { + this.OnNumberOfReconfiguredEventsChanging(value); + this._NumberOfReconfiguredEvents = value; + this.OnNumberOfReconfiguredEventsChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private long _NumberOfReconfiguredEvents; + partial void OnNumberOfReconfiguredEventsChanging(long value); + partial void OnNumberOfReconfiguredEventsChanged(); + /// + /// There are no comments for Server in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public Server Server + { + get + { + return this._Server; + } + set + { + this._Server = value; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private Server _Server; + } + /// + /// There are no comments for Microsoft.SqlServer.Management.Server.Domain.EventLog in the schema. + /// + /// + /// EntityId + /// + [global::System.Data.Services.Common.DataServiceKeyAttribute("EntityId")] + public partial class EventLog + { + /// + /// Create a new EventLog object. + /// + /// Initial value of EntityId. + /// Initial value of StartTimeUtc. + /// Initial value of IntervalSizeInMinutes. + /// Initial value of EventSubtype. + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static EventLog CreateEventLog(string entityId, global::System.DateTime startTimeUtc, int intervalSizeInMinutes, int eventSubtype) + { + EventLog eventLog = new EventLog(); + eventLog.EntityId = entityId; + eventLog.StartTimeUtc = startTimeUtc; + eventLog.IntervalSizeInMinutes = intervalSizeInMinutes; + eventLog.EventSubtype = eventSubtype; + return eventLog; + } + /// + /// There are no comments for Property EntityId in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string EntityId + { + get + { + return this._EntityId; + } + set + { + this.OnEntityIdChanging(value); + this._EntityId = value; + this.OnEntityIdChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _EntityId; + partial void OnEntityIdChanging(string value); + partial void OnEntityIdChanged(); + /// + /// There are no comments for Property DatabaseName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DatabaseName + { + get + { + return this._DatabaseName; + } + set + { + this.OnDatabaseNameChanging(value); + this._DatabaseName = value; + this.OnDatabaseNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DatabaseName; + partial void OnDatabaseNameChanging(string value); + partial void OnDatabaseNameChanged(); + /// + /// There are no comments for Property StartTimeUtc in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.DateTime StartTimeUtc + { + get + { + return this._StartTimeUtc; + } + set + { + this.OnStartTimeUtcChanging(value); + this._StartTimeUtc = value; + this.OnStartTimeUtcChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.DateTime _StartTimeUtc; + partial void OnStartTimeUtcChanging(global::System.DateTime value); + partial void OnStartTimeUtcChanged(); + /// + /// There are no comments for Property IntervalSizeInMinutes in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public int IntervalSizeInMinutes + { + get + { + return this._IntervalSizeInMinutes; + } + set + { + this.OnIntervalSizeInMinutesChanging(value); + this._IntervalSizeInMinutes = value; + this.OnIntervalSizeInMinutesChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private int _IntervalSizeInMinutes; + partial void OnIntervalSizeInMinutesChanging(int value); + partial void OnIntervalSizeInMinutesChanged(); + /// + /// There are no comments for Property EventCategory in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string EventCategory + { + get + { + return this._EventCategory; + } + set + { + this.OnEventCategoryChanging(value); + this._EventCategory = value; + this.OnEventCategoryChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _EventCategory; + partial void OnEventCategoryChanging(string value); + partial void OnEventCategoryChanged(); + /// + /// There are no comments for Property EventType in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string EventType + { + get + { + return this._EventType; + } + set + { + this.OnEventTypeChanging(value); + this._EventType = value; + this.OnEventTypeChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _EventType; + partial void OnEventTypeChanging(string value); + partial void OnEventTypeChanged(); + /// + /// There are no comments for Property EventSubtype in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public int EventSubtype + { + get + { + return this._EventSubtype; + } + set + { + this.OnEventSubtypeChanging(value); + this._EventSubtype = value; + this.OnEventSubtypeChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private int _EventSubtype; + partial void OnEventSubtypeChanging(int value); + partial void OnEventSubtypeChanged(); + /// + /// There are no comments for Property EventSubtypeDescription in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string EventSubtypeDescription + { + get + { + return this._EventSubtypeDescription; + } + set + { + this.OnEventSubtypeDescriptionChanging(value); + this._EventSubtypeDescription = value; + this.OnEventSubtypeDescriptionChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _EventSubtypeDescription; + partial void OnEventSubtypeDescriptionChanging(string value); + partial void OnEventSubtypeDescriptionChanged(); + /// + /// There are no comments for Property Severity in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable Severity + { + get + { + return this._Severity; + } + set + { + this.OnSeverityChanging(value); + this._Severity = value; + this.OnSeverityChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _Severity; + partial void OnSeverityChanging(global::System.Nullable value); + partial void OnSeverityChanged(); + /// + /// There are no comments for Property NumberOfEvents in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable NumberOfEvents + { + get + { + return this._NumberOfEvents; + } + set + { + this.OnNumberOfEventsChanging(value); + this._NumberOfEvents = value; + this.OnNumberOfEventsChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _NumberOfEvents; + partial void OnNumberOfEventsChanging(global::System.Nullable value); + partial void OnNumberOfEventsChanged(); + /// + /// There are no comments for Property Description in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Description + { + get + { + return this._Description; + } + set + { + this.OnDescriptionChanging(value); + this._Description = value; + this.OnDescriptionChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Description; + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + /// + /// There are no comments for Property AdditionalData in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string AdditionalData + { + get + { + return this._AdditionalData; + } + set + { + this.OnAdditionalDataChanging(value); + this._AdditionalData = value; + this.OnAdditionalDataChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _AdditionalData; + partial void OnAdditionalDataChanging(string value); + partial void OnAdditionalDataChanged(); + } + /// + /// There are no comments for Microsoft.SqlServer.Management.Server.Domain.ServerQuota in the schema. + /// + /// + /// Name + /// + [global::System.Data.Services.Common.DataServiceKeyAttribute("Name")] + public partial class ServerQuota + { + /// + /// Create a new ServerQuota object. + /// + /// Initial value of Name. + /// Initial value of Value. + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static ServerQuota CreateServerQuota(string name, int value) + { + ServerQuota serverQuota = new ServerQuota(); + serverQuota.Name = name; + serverQuota.Value = value; + return serverQuota; + } + /// + /// There are no comments for Property Name in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property Value in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public int Value + { + get + { + return this._Value; + } + set + { + this.OnValueChanging(value); + this._Value = value; + this.OnValueChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private int _Value; + partial void OnValueChanging(int value); + partial void OnValueChanged(); + /// + /// There are no comments for Server in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public Server Server + { + get + { + return this._Server; + } + set + { + this._Server = value; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private Server _Server; + } + /// + /// There are no comments for Microsoft.SqlServer.Management.Server.Domain.DatabaseOperation in the schema. + /// + /// + /// Id + /// + [global::System.Data.Services.Common.DataServiceKeyAttribute("Id")] + public partial class DatabaseOperation + { + /// + /// Create a new DatabaseOperation object. + /// + /// Initial value of Id. + /// Initial value of StateId. + /// Initial value of SessionActivityId. + /// Initial value of PercentComplete. + /// Initial value of StartTime. + /// Initial value of LastModifyTime. + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public static DatabaseOperation CreateDatabaseOperation(global::System.Guid ID, int stateId, global::System.Guid sessionActivityId, int percentComplete, global::System.DateTime startTime, global::System.DateTime lastModifyTime) + { + DatabaseOperation databaseOperation = new DatabaseOperation(); + databaseOperation.Id = ID; + databaseOperation.StateId = stateId; + databaseOperation.SessionActivityId = sessionActivityId; + databaseOperation.PercentComplete = percentComplete; + databaseOperation.StartTime = startTime; + databaseOperation.LastModifyTime = lastModifyTime; + return databaseOperation; + } + /// + /// There are no comments for Property Id in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid Id + { + get + { + return this._Id; + } + set + { + this.OnIdChanging(value); + this._Id = value; + this.OnIdChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _Id; + partial void OnIdChanging(global::System.Guid value); + partial void OnIdChanged(); + /// + /// There are no comments for Property Name in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Name + { + get + { + return this._Name; + } + set + { + this.OnNameChanging(value); + this._Name = value; + this.OnNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Name; + partial void OnNameChanging(string value); + partial void OnNameChanged(); + /// + /// There are no comments for Property State in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string State + { + get + { + return this._State; + } + set + { + this.OnStateChanging(value); + this._State = value; + this.OnStateChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _State; + partial void OnStateChanging(string value); + partial void OnStateChanged(); + /// + /// There are no comments for Property StateId in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public int StateId + { + get + { + return this._StateId; + } + set + { + this.OnStateIdChanging(value); + this._StateId = value; + this.OnStateIdChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private int _StateId; + partial void OnStateIdChanging(int value); + partial void OnStateIdChanged(); + /// + /// There are no comments for Property SessionActivityId in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Guid SessionActivityId + { + get + { + return this._SessionActivityId; + } + set + { + this.OnSessionActivityIdChanging(value); + this._SessionActivityId = value; + this.OnSessionActivityIdChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Guid _SessionActivityId; + partial void OnSessionActivityIdChanging(global::System.Guid value); + partial void OnSessionActivityIdChanged(); + /// + /// There are no comments for Property DatabaseName in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string DatabaseName + { + get + { + return this._DatabaseName; + } + set + { + this.OnDatabaseNameChanging(value); + this._DatabaseName = value; + this.OnDatabaseNameChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _DatabaseName; + partial void OnDatabaseNameChanging(string value); + partial void OnDatabaseNameChanged(); + /// + /// There are no comments for Property PercentComplete in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public int PercentComplete + { + get + { + return this._PercentComplete; + } + set + { + this.OnPercentCompleteChanging(value); + this._PercentComplete = value; + this.OnPercentCompleteChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private int _PercentComplete; + partial void OnPercentCompleteChanging(int value); + partial void OnPercentCompleteChanged(); + /// + /// There are no comments for Property ErrorCode in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ErrorCode + { + get + { + return this._ErrorCode; + } + set + { + this.OnErrorCodeChanging(value); + this._ErrorCode = value; + this.OnErrorCodeChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ErrorCode; + partial void OnErrorCodeChanging(global::System.Nullable value); + partial void OnErrorCodeChanged(); + /// + /// There are no comments for Property Error in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public string Error + { + get + { + return this._Error; + } + set + { + this.OnErrorChanging(value); + this._Error = value; + this.OnErrorChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private string _Error; + partial void OnErrorChanging(string value); + partial void OnErrorChanged(); + /// + /// There are no comments for Property ErrorSeverity in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ErrorSeverity + { + get + { + return this._ErrorSeverity; + } + set + { + this.OnErrorSeverityChanging(value); + this._ErrorSeverity = value; + this.OnErrorSeverityChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ErrorSeverity; + partial void OnErrorSeverityChanging(global::System.Nullable value); + partial void OnErrorSeverityChanged(); + /// + /// There are no comments for Property ErrorState in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.Nullable ErrorState + { + get + { + return this._ErrorState; + } + set + { + this.OnErrorStateChanging(value); + this._ErrorState = value; + this.OnErrorStateChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.Nullable _ErrorState; + partial void OnErrorStateChanging(global::System.Nullable value); + partial void OnErrorStateChanged(); + /// + /// There are no comments for Property StartTime in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.DateTime StartTime + { + get + { + return this._StartTime; + } + set + { + this.OnStartTimeChanging(value); + this._StartTime = value; + this.OnStartTimeChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.DateTime _StartTime; + partial void OnStartTimeChanging(global::System.DateTime value); + partial void OnStartTimeChanged(); + /// + /// There are no comments for Property LastModifyTime in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public global::System.DateTime LastModifyTime + { + get + { + return this._LastModifyTime; + } + set + { + this.OnLastModifyTimeChanging(value); + this._LastModifyTime = value; + this.OnLastModifyTimeChanged(); + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private global::System.DateTime _LastModifyTime; + partial void OnLastModifyTimeChanging(global::System.DateTime value); + partial void OnLastModifyTimeChanged(); + /// + /// There are no comments for Server in the schema. + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + public Server Server + { + get + { + return this._Server; + } + set + { + this._Server = value; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] + private Server _Server; + } +} +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server +{ + public abstract partial class ServerContextInternal + { + public readonly string[] metadataHashes = new string[]{ + "0333AB7076A926BF53F07C1786F11C052DEB791B", + "F903DB500E018B00ECB1E355BC55F73B7342FC76", + "5A2ABE58F30C9EF4B4F49853CD5FE28BA9FEBCD9", + "68BA8B4EB74E0C5A91D0A734B742001018A9F9D2", + "80A53B80FCD9616E6EEBDCAA3482E30A159C0E1F", + "3070BEE06139E0754E2F022E56E9798BF8A57F30"}; + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/ServerDataService.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/ServerDataService.cs new file mode 100644 index 000000000000..c0bd5545d1c9 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/ServerDataService.cs @@ -0,0 +1,145 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Data.Services.Client; +using System.Linq; +using System.Net; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server +{ + /// + /// Common abstract class for the generated class. + /// + public abstract class ServerDataServiceContext : ServerContextInternal + { + #region Constants + + /// + /// The default dataservicecontext request timeout. + /// + private const int DefaultDataServiceContextTimeoutInSeconds = 180; + + #endregion + + /// + /// Initializes a new instance of the class. + /// + /// The service's base . + protected ServerDataServiceContext(Uri serviceUri) + : base(serviceUri) + { + this.SendingRequest += new EventHandler(this.BeforeSendingRequest); + + // Set the default timeout for the context. + this.Timeout = DefaultDataServiceContextTimeoutInSeconds; + + // Allow this client model to talk to newer versions of server model + this.IgnoreMissingProperties = true; + } + + /// + /// Handler to add aditional headers and properties to the request. + /// + /// The request to enhance. + protected virtual void OnEnhanceRequest(HttpWebRequest request) + { + } + + #region Entity Refresh/Revert Helpers + + /// + /// Refresh the object by requerying for the object and merge changes. + /// + /// The object to refresh. + /// The object with refreshed properties from the server. + protected Database RefreshEntity(Database database) + { + MergeOption tempOption = this.MergeOption; + this.MergeOption = MergeOption.OverwriteChanges; + this.Databases.Where(s => s.Id == database.Id).SingleOrDefault(); + this.MergeOption = tempOption; + + return database; + } + + /// + /// Revert the changes made to the given object, detach it from the context. + /// + /// The object that is being operated on. + protected void RevertChanges(Database database) + { + // Revert the object by requerying for the object and clean up tracking + if (database != null) + { + this.RefreshEntity(database); + } + + this.ClearTrackedEntity(database); + } + + /// + /// Refresh the object by requerying for the object and merge changes. + /// + /// The object to refresh. + /// The object with refreshed properties from the server. + protected DatabaseCopy RefreshEntity(DatabaseCopy databaseCopy) + { + MergeOption tempOption = this.MergeOption; + this.MergeOption = MergeOption.OverwriteChanges; + databaseCopy = this.DatabaseCopies + .Where(copy => copy.SourceServerName == databaseCopy.SourceServerName) + .Where(copy => copy.SourceDatabaseName == databaseCopy.SourceDatabaseName) + .Where(copy => copy.DestinationServerName == databaseCopy.DestinationServerName) + .Where(copy => copy.DestinationDatabaseName == databaseCopy.DestinationDatabaseName) + .SingleOrDefault(); + this.MergeOption = tempOption; + + return databaseCopy; + } + + /// + /// Revert the changes made to the given object, detach it from the context. + /// + /// The object that is being operated on. + protected void RevertChanges(DatabaseCopy databaseCopy) + { + // Revert the object by requerying for the object and clean up tracking + if (databaseCopy != null) + { + this.RefreshEntity(databaseCopy); + } + + this.ClearTrackedEntity(databaseCopy); + } + + #endregion + + /// + /// Handler that appends the token to every data access context request. + /// + /// The issuer of the request. + /// Additional info for the request. + private void BeforeSendingRequest(object sender, SendingRequestEventArgs e) + { + HttpWebRequest request = e.Request as HttpWebRequest; + + if (request != null) + { + this.OnEnhanceRequest(request); + } + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/ServerDataService.csdl b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/ServerDataService.csdl new file mode 100644 index 000000000000..8428263265cf --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/ServerDataService.csdl @@ -0,0 +1,436 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/ServerDataServiceCertAuth.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/ServerDataServiceCertAuth.cs new file mode 100644 index 000000000000..dab0383ecdb3 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/ServerDataServiceCertAuth.cs @@ -0,0 +1,1276 @@ +// ---------------------------------------------------------------------------------- +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Globalization; +using System.Linq; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Properties; +using Microsoft.WindowsAzure.Management.Sql; +using Microsoft.WindowsAzure.Management.Sql.Models; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server +{ + using DatabaseCopyModel = Model.DatabaseCopy; + using WamlDatabaseCopy = Management.Sql.Models.DatabaseCopy; + + /// + /// Implementation of the with Certificate authentication. + /// + public partial class ServerDataServiceCertAuth : IServerDataServiceContext + { + #region Private Fields + + /// + /// The previous request's client request ID + /// + private string clientRequestId; + + /// + /// The name of the server we are connected to. + /// + private readonly string serverName; + + /// + /// The subscription used to connect and authenticate. + /// + private readonly AzureSubscription subscription; + + #endregion + + /// + /// Initializes a new instance of the class + /// + /// The subscription used to connect and authenticate. + /// The name of the server to connect to. + private ServerDataServiceCertAuth( + AzureSubscription subscription, + string serverName) + { + this.serverName = serverName; + this.subscription = subscription; + } + + #region Public Properties + + /// + /// Gets the client per-session tracing ID. + /// + public string ClientSessionId + { + get + { + return SqlDatabaseCmdletBase.clientSessionId; + } + } + + /// + /// Gets the previous request's client request ID. + /// + public string ClientRequestId + { + get + { + return this.clientRequestId; + } + } + + /// + /// Gets the name of the server for this context. + /// + public string ServerName + { + get + { + return this.serverName; + } + } + + #endregion + + /// + /// Creates and returns a new instance of the class + /// which connects to the specified server using the specified subscription credentials. + /// + /// The subscription used to connect and authenticate. + /// The name of the server to connect to. + /// An instance of class. + public static ServerDataServiceCertAuth Create( + string serverName, + AzureSubscription subscription) + { + if (string.IsNullOrEmpty(serverName)) + { + throw new ArgumentException("serverName"); + } + + SqlDatabaseCmdletBase.ValidateSubscription(subscription); + + // Create a new ServerDataServiceCertAuth object to be used + return new ServerDataServiceCertAuth( + subscription, + serverName); + } + + #region IServerDataServiceContext Members + + /// + /// Ensures any extra property on the given is loaded. + /// + /// The object that needs the extra properties. + public void LoadExtraProperties(object obj) + { + try + { + Database database = obj as Database; + if (database != null) + { + this.LoadExtraProperties(database); + return; + } + + RestorableDroppedDatabase restorableDroppedDatabase = obj as RestorableDroppedDatabase; + if (restorableDroppedDatabase != null) + { + this.LoadExtraProperties(restorableDroppedDatabase); + return; + } + } + catch + { + // Ignore exceptions when loading extra properties, for backward compatibility. + } + } + + #endregion + + #region Database Operations + + /// + /// Gets a list of all the databases in the current context. + /// + /// An array of databases in the current context + public Database[] GetDatabases() + { + this.clientRequestId = SqlDatabaseCmdletBase.GenerateClientTracingId(); + + // Get the SQL management client + SqlManagementClient sqlManagementClient = AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement); + this.AddTracingHeaders(sqlManagementClient); + + // Retrieve the list of databases + DatabaseListResponse response = sqlManagementClient.Databases.List(this.serverName); + + // Construct the resulting Database objects + Database[] databases = CreateDatabaseFromResponse(response); + return databases; + } + + /// + /// Retrieve a specific database from the current context + /// + /// The name of the database to retrieve + /// A database object + public Database GetDatabase(string databaseName) + { + this.clientRequestId = SqlDatabaseCmdletBase.GenerateClientTracingId(); + + // Get the SQL management client + SqlManagementClient sqlManagementClient = AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement); + this.AddTracingHeaders(sqlManagementClient); + + // Retrieve the specified database + DatabaseGetResponse response = sqlManagementClient.Databases.Get( + this.serverName, + databaseName); + + // Construct the resulting Database object + Database database = CreateDatabaseFromResponse(response); + return database; + } + + /// + /// Creates a new sql database. + /// + /// The name for the new database + /// The maximum size of the new database + /// The collation for the new database + /// The edition for the new database + /// The newly created Sql Database + public Database CreateNewDatabase( + string databaseName, + int? databaseMaxSizeInGB, + long? databaseMaxSizeInBytes, + string databaseCollation, + DatabaseEdition databaseEdition, + ServiceObjective serviceObjective) + { + this.clientRequestId = SqlDatabaseCmdletBase.GenerateClientTracingId(); + + // Get the SQL management client + SqlManagementClient sqlManagementClient = AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement); + this.AddTracingHeaders(sqlManagementClient); + + DatabaseCreateParameters parameters = new DatabaseCreateParameters() + { + Name = databaseName, + Edition = databaseEdition != DatabaseEdition.None ? + databaseEdition.ToString() : null, + CollationName = databaseCollation ?? string.Empty, + MaximumDatabaseSizeInGB = databaseMaxSizeInGB, + MaximumDatabaseSizeInBytes = databaseMaxSizeInBytes, + ServiceObjectiveId = serviceObjective != null ? serviceObjective.Id.ToString() : null, + }; + + // Create the database + DatabaseCreateResponse response = sqlManagementClient.Databases.Create( + this.serverName, + parameters); + + // Construct the resulting Database object + Database database = CreateDatabaseFromResponse(response); + return database; + } + + /// + /// Update a database on the server. + /// + /// The name of the database to modify. + /// The new name of the database. + /// The new maximum size of the database. + /// The new edition of the database. + /// The new service objective of the database. + /// The updated database. + public Database UpdateDatabase( + string databaseName, + string newDatabaseName, + int? databaseMaxSizeInGB, + long? databaseMaxSizeInBytes, + DatabaseEdition? databaseEdition, + ServiceObjective serviceObjective) + { + this.clientRequestId = SqlDatabaseCmdletBase.GenerateClientTracingId(); + + // Get the SQL management client + SqlManagementClient sqlManagementClient = AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement); + this.AddTracingHeaders(sqlManagementClient); + + // Retrieve the specified database + DatabaseGetResponse database = sqlManagementClient.Databases.Get( + this.serverName, + databaseName); + + DatabaseUpdateParameters parameters = new DatabaseUpdateParameters() + { + Name = !string.IsNullOrEmpty(newDatabaseName) ? newDatabaseName : database.Database.Name, + MaximumDatabaseSizeInGB = databaseMaxSizeInGB, + MaximumDatabaseSizeInBytes = databaseMaxSizeInBytes, + }; + parameters.Edition = (database.Database.Edition ?? string.Empty); + if(databaseEdition.HasValue) + { + if (databaseEdition != DatabaseEdition.None) + { + parameters.Edition = databaseEdition.ToString(); + } + } + parameters.ServiceObjectiveId = database.Database.ServiceObjectiveId; + if(serviceObjective != null) + { + parameters.ServiceObjectiveId = serviceObjective.Id.ToString(); + } + + // Update the database with the new properties + DatabaseUpdateResponse response = sqlManagementClient.Databases.Update( + this.serverName, + databaseName, + parameters + ); + + // Construct the resulting Database object + Database updatedDatabase = CreateDatabaseFromResponse(response); + return updatedDatabase; + } + + /// + /// Remove a database from a server + /// + /// The name of the database to delete + public void RemoveDatabase(string databaseName) + { + this.clientRequestId = SqlDatabaseCmdletBase.GenerateClientTracingId(); + + // Get the SQL management client + SqlManagementClient sqlManagementClient = AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement); + this.AddTracingHeaders(sqlManagementClient); + + // Retrieve the list of databases + OperationResponse response = sqlManagementClient.Databases.Delete( + this.serverName, + databaseName); + } + + #endregion + + #region Service Objective Operations + + /// + /// Retrieves the list of all service objectives on the server. + /// + /// An array of all service objectives on the server. + public ServiceObjective[] GetServiceObjectives() + { + this.clientRequestId = SqlDatabaseCmdletBase.GenerateClientTracingId(); + + // Get the SQL management client + SqlManagementClient sqlManagementClient = AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement); + this.AddTracingHeaders(sqlManagementClient); + + // Retrieve the specified database + ServiceObjectiveListResponse response = sqlManagementClient.ServiceObjectives.List( + this.serverName); + + // Construct the resulting Database object + ServiceObjective[] serviceObjectives = response.Select(serviceObjective => CreateServiceObjectiveFromResponse(serviceObjective)).ToArray(); + return serviceObjectives; + } + + /// + /// Retrieve information on service objective with the specified name + /// + /// The service objective to retrieve. + /// + /// An object containing the information about the specific service objective. + /// + public ServiceObjective GetServiceObjective(string serviceObjectiveName) + { + ServiceObjective serviceObjective = GetServiceObjectives() + .Where(s => s.Name == serviceObjectiveName) + .FirstOrDefault(); + if (serviceObjective == null) + { + throw new InvalidOperationException( + string.Format( + CultureInfo.InvariantCulture, + Resources.ServiceObjectiveNotFound, + this.ServerName, + serviceObjectiveName)); + } + return serviceObjective; + } + + /// + /// Retrieve information on latest service objective with service objective + /// + /// The service objective to refresh. + /// + /// An object containing the information about the specific service objective. + /// + public ServiceObjective GetServiceObjective(ServiceObjective serviceObjectiveToRefresh) + { + this.clientRequestId = SqlDatabaseCmdletBase.GenerateClientTracingId(); + + // Get the SQL management client + SqlManagementClient sqlManagementClient = AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement); + this.AddTracingHeaders(sqlManagementClient); + + // Retrieve the specified database + ServiceObjectiveGetResponse response = sqlManagementClient.ServiceObjectives.Get( + this.serverName, + serviceObjectiveToRefresh.Id.ToString()); + + // Construct the resulting Database object + ServiceObjective serviceObjective = CreateServiceObjectiveFromResponse(response.ServiceObjective); + return serviceObjective; + } + + /// + /// Get a specific quota for a server + /// + /// The name of the quota to retrieve + /// A quota object. + public ServerQuota GetQuota(string quotaName) + { + throw new NotSupportedException(); + } + + /// + /// Get a list of all quotas for a server + /// + /// An array of server quota objects + public ServerQuota[] GetQuotas() + { + throw new NotSupportedException(); + } + + #endregion + + #region Database Operation Functions + + /// + /// Retrieve information on operation with the guid + /// + /// The Guid of the operation to retrieve. + /// An object containing the information about the specific operation. + public DatabaseOperation GetDatabaseOperation(Guid OperationGuid) + { + this.clientRequestId = SqlDatabaseCmdletBase.GenerateClientTracingId(); + + // Get the SQL management client + SqlManagementClient sqlManagementClient = AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement); + this.AddTracingHeaders(sqlManagementClient); + + // Retrieve the specified Operation + DatabaseOperationGetResponse response = sqlManagementClient.DatabaseOperations.Get( + this.serverName, + OperationGuid.ToString()); + + // Construct the resulting Operation object + DatabaseOperation operation = CreateDatabaseOperationFromResponse(response); + return operation; + } + + /// + /// Retrieves the list of all operations on the database. + /// + /// The name of database to retrieve operations. + /// An array of all operations on the database. + public DatabaseOperation[] GetDatabaseOperations(string databaseName) + { + this.clientRequestId = SqlDatabaseCmdletBase.GenerateClientTracingId(); + + // Get the SQL management client + SqlManagementClient sqlManagementClient = AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement); + this.AddTracingHeaders(sqlManagementClient); + + // Retrieve all operations on specified database + DatabaseOperationListResponse response = sqlManagementClient.DatabaseOperations.ListByDatabase( + this.serverName, + databaseName); + + // For any database which has ever been created, there should be at least one operation + if (response.Count() == 0) + { + throw new InvalidOperationException( + string.Format( + CultureInfo.InvariantCulture, + Resources.DatabaseOperationNotFoundOnDatabase, + this.ServerName, + databaseName)); + } + + // Construct the resulting database operations + DatabaseOperation[] operations = CreateDatabaseOperationsFromResponse(response); + return operations; + } + + /// + /// Retrieves the list of all databases' operations on the server. + /// + /// An array of all operations on the server. + public DatabaseOperation[] GetDatabasesOperations() + { + this.clientRequestId = SqlDatabaseCmdletBase.GenerateClientTracingId(); + + // Get the SQL management client + SqlManagementClient sqlManagementClient = AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement); + this.AddTracingHeaders(sqlManagementClient); + + // Retrieve the operations on specified server + // We do not validate the number of operations returned since it's possible that there is no + // database operations on a new created server. + DatabaseOperationListResponse response = sqlManagementClient.DatabaseOperations.ListByServer( + this.serverName); + + // Construct the resulting database operations array + DatabaseOperation[] operations = CreateDatabaseOperationsFromResponse(response); + return operations; + } + + #endregion + + #region Database copy operations + + /// + /// Retrieve all database copy objects with matching parameters. + /// + /// The name of the database to copy. + /// The name for the partner server. + /// The name of the database on the partner server. + /// All database copy objects with matching parameters. + public DatabaseCopyModel[] GetDatabaseCopy( + string databaseName, + string partnerServer, + string partnerDatabaseName) + { + this.clientRequestId = SqlDatabaseCmdletBase.GenerateClientTracingId(); + + // Get the SQL management client + SqlManagementClient sqlManagementClient = AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement); + this.AddTracingHeaders(sqlManagementClient); + + IEnumerable copyResponses = null; + if (databaseName != null) + { + copyResponses = sqlManagementClient.DatabaseCopies.List(this.ServerName, databaseName); + } + else + { + // We want to list all of the copies on the server. Currently, the server-side API doesn't + // directly support that. It may at some time in the future, but until then we're doing the + // following to avoid breaking compatibility. + copyResponses = Enumerable.Empty(); + + DatabaseListResponse dbListResponse = sqlManagementClient.Databases.List(this.ServerName); + + // Iterate through the server's databases and add each set of copies to our list. + foreach (var database in dbListResponse) + { + copyResponses = copyResponses.Concat( + sqlManagementClient.DatabaseCopies.List(this.ServerName, database.Name)); + } + } + + // Filter the copies by the specified criteria. + DatabaseCopyModel[] databaseCopies = copyResponses.Where(copy => + { + if (copy.IsLocalDatabaseReplicationTarget) + { + return (partnerServer ?? copy.SourceServerName) == copy.SourceServerName + && (partnerDatabaseName ?? copy.SourceDatabaseName) == copy.SourceDatabaseName; + } + else + { + return (partnerServer ?? copy.DestinationServerName) == copy.DestinationServerName + && (partnerDatabaseName ?? copy.DestinationDatabaseName) == copy.DestinationDatabaseName; + } + }) + .Select(CreateDatabaseCopyFromResponse) + .ToArray(); + + return databaseCopies; + } + + /// + /// Refreshes the given database copy object. + /// + /// The object to refresh. + /// The refreshed database copy object. + public DatabaseCopyModel GetDatabaseCopy(DatabaseCopyModel databaseCopy) + { + this.clientRequestId = SqlDatabaseCmdletBase.GenerateClientTracingId(); + + // Get the SQL management client + SqlManagementClient sqlManagementClient = AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement); + this.AddTracingHeaders(sqlManagementClient); + + // Figure out which database is local, as that's the one we need to pass in. + string localDatabaseName = + databaseCopy.IsLocalDatabaseReplicationTarget + ? databaseCopy.DestinationDatabaseName + : databaseCopy.SourceDatabaseName; + + DatabaseCopyModel refreshedDatabaseCopy = CreateDatabaseCopyFromResponse( + sqlManagementClient.DatabaseCopies.Get( + this.ServerName, + localDatabaseName, + databaseCopy.EntityId.ToString()) + .DatabaseCopy); + + return refreshedDatabaseCopy; + } + + /// + /// Start database copy on the database with the name . + /// + /// The name of the database to copy. + /// The name for the partner server. + /// The name of the database on the partner server. + /// true to make this a continuous copy. + /// true to make this an offline secondary copy. + /// The new instance of database copy operation. + public DatabaseCopyModel StartDatabaseCopy( + string databaseName, + string partnerServer, + string partnerDatabaseName, + bool continuousCopy, + bool isOfflineSecondary) + { + // Create a new request Id for this operation + this.clientRequestId = SqlDatabaseCmdletBase.GenerateClientTracingId(); + + // Get the SQL management client + SqlManagementClient sqlManagementClient = AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement); + this.AddTracingHeaders(sqlManagementClient); + + DatabaseCopyCreateResponse response = sqlManagementClient.DatabaseCopies.Create( + this.ServerName, + databaseName, + new DatabaseCopyCreateParameters() + { + PartnerServer = partnerServer, + PartnerDatabase = partnerDatabaseName, + IsContinuous = continuousCopy, + IsOfflineSecondary = isOfflineSecondary, + }); + + return CreateDatabaseCopyFromResponse(response.DatabaseCopy); + } + + /// + /// Terminate an ongoing database copy operation. + /// + /// The database copy to terminate. + /// true to forcefully terminate the copy. + public void StopDatabaseCopy( + DatabaseCopyModel databaseCopy, + bool forcedTermination) + { + // Create a new request Id for this operation + this.clientRequestId = SqlDatabaseCmdletBase.GenerateClientTracingId(); + + // Get the SQL management client + SqlManagementClient sqlManagementClient = AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement); + this.AddTracingHeaders(sqlManagementClient); + + // Get the local database, as it's the one we need to pass in. + string localDatabaseName = + databaseCopy.IsLocalDatabaseReplicationTarget + ? databaseCopy.DestinationDatabaseName + : databaseCopy.SourceDatabaseName; + + // Update forced termination so that the terminate happens + // the way it should. + sqlManagementClient.DatabaseCopies.Update( + this.ServerName, + localDatabaseName, + databaseCopy.EntityId, + new DatabaseCopyUpdateParameters() {IsForcedTerminate = forcedTermination}); + + sqlManagementClient.DatabaseCopies.Delete( + this.ServerName, + localDatabaseName, + databaseCopy.EntityId); + } + + #endregion + + #region Restorable Dropped Database Operations + + /// + /// Gets a list of all the restorable dropped databases in the current context. + /// + /// An array of databases in the current context + public RestorableDroppedDatabase[] GetRestorableDroppedDatabases() + { + this.clientRequestId = SqlDatabaseCmdletBase.GenerateClientTracingId(); + + // Get the SQL management client + SqlManagementClient sqlManagementClient = AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement); + this.AddTracingHeaders(sqlManagementClient); + + // Retrieve the list of databases + RestorableDroppedDatabaseListResponse response = sqlManagementClient.RestorableDroppedDatabases.List(this.serverName); + + // Construct the resulting RestorableDroppedDatabase objects + RestorableDroppedDatabase[] databases = CreateRestorableDroppedDatabaseFromResponse(response); + return databases; + } + + /// + /// Retrieve information on the restorable dropped database with the name + /// and deletion date . + /// + /// The name of the restorable dropped database to retrieve. + /// The deletion date of the restorable dropped database to retrieve. + /// An object containing the information about the specific restorable dropped database. + public RestorableDroppedDatabase GetRestorableDroppedDatabase( + string databaseName, DateTime deletionDate) + { + this.clientRequestId = SqlDatabaseCmdletBase.GenerateClientTracingId(); + + // Get the SQL management client + SqlManagementClient sqlManagementClient = AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement); + this.AddTracingHeaders(sqlManagementClient); + + // Retrieve the specified database + RestorableDroppedDatabaseGetResponse response = sqlManagementClient.RestorableDroppedDatabases.Get( + this.serverName, + databaseName + "," + deletionDate.ToString("yyyy-MM-ddTHH:mm:ss.fffZ")); + + // Construct the resulting RestorableDroppedDatabase object + RestorableDroppedDatabase database = CreateRestorableDroppedDatabaseFromResponse(response); + return database; + } + + #endregion + + #region Restore Database Operations + + /// + /// Issues a restore request for the given source database to the given target database. + /// + /// The name of the source database. + /// The deletion date of the source database, in case it is a dropped database. + /// The name of the server to create the restored database on. + /// The name of the database to be created with the restored contents. + /// The point in time to restore the source database to. + /// An object containing the information about the restore request. + public RestoreDatabaseOperation RestoreDatabase( + string sourceDatabaseName, + DateTime? sourceDatabaseDeletionDate, + string targetServerName, + string targetDatabaseName, + DateTime? pointInTime) + { + this.clientRequestId = SqlDatabaseCmdletBase.GenerateClientTracingId(); + + // Get the SQL management client + SqlManagementClient sqlManagementClient = AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement); + this.AddTracingHeaders(sqlManagementClient); + + // Create the restore operation + RestoreDatabaseOperationCreateResponse response = sqlManagementClient.RestoreDatabaseOperations.Create( + this.serverName, + new RestoreDatabaseOperationCreateParameters() + { + SourceDatabaseName = sourceDatabaseName, + SourceDatabaseDeletionDate = sourceDatabaseDeletionDate, + TargetServerName = targetServerName, + TargetDatabaseName = targetDatabaseName, + PointInTime = pointInTime + }); + + RestoreDatabaseOperation restoreDatabaseOperation = CreateRestoreDatabaseOperationFromResponse(response); + return restoreDatabaseOperation; + } + + #endregion + + #region Helper functions + + private DimensionSetting CreateDimensionSettings(string name, string id, string description, byte ordinal, bool isDefault) + { + return new DimensionSetting() + { + Name = name, + Id = Guid.Parse(id), + Description = description, + Ordinal = ordinal, + IsDefault = isDefault + }; + } + + private Collection CreateDimensionSettingsFromResponse(IList dimensionSettingsList) + { + Collection result = new Collection(); + foreach (var response in dimensionSettingsList) + { + result.Add(CreateDimensionSettings( + response.Name, + response.Id, + response.Description, + response.Ordinal, + response.IsDefault + )); + } + return result; + } + + private ServiceObjective CreateServiceObjectiveFromResponse(Management.Sql.Models.ServiceObjective response) + { + return new ServiceObjective() + { + Name = response.Name, + Id = Guid.Parse(response.Id), + IsDefault = response.IsDefault, + IsSystem = response.IsSystem, + Enabled = response.Enabled, + Description = response.Description, + Context = this, + DimensionSettings = CreateDimensionSettingsFromResponse(response.DimensionSettings) + }; + } + + private DatabaseOperation CreateDatabaseOperation(string name, string state, string id, int stateId, string sessionActivityId, string databaseName, int percentComplete, int errorCode, string error, int errorSeverity, int errorState, DateTime startTime, DateTime lastModifyTime) + { + return new DatabaseOperation() + { + Name = name, + State = state, + Id = Guid.Parse(id), + StateId = stateId, + SessionActivityId = Guid.Parse(sessionActivityId), + DatabaseName = databaseName, + PercentComplete = percentComplete, + ErrorCode = errorCode, + Error = error, + ErrorSeverity = errorSeverity, + ErrorState = errorState, + StartTime = startTime, + LastModifyTime = lastModifyTime, + }; + } + + private DatabaseOperation CreateDatabaseOperationFromResponse(DatabaseOperationGetResponse response) + { + return CreateDatabaseOperation( + response.DatabaseOperation.Name, + response.DatabaseOperation.State, + response.DatabaseOperation.Id, + response.DatabaseOperation.StateId, + response.DatabaseOperation.SessionActivityId, + response.DatabaseOperation.DatabaseName, + response.DatabaseOperation.PercentComplete, + response.DatabaseOperation.ErrorCode, + response.DatabaseOperation.Error, + response.DatabaseOperation.ErrorSeverity, + response.DatabaseOperation.ErrorState, + response.DatabaseOperation.StartTime, + response.DatabaseOperation.LastModifyTime + ); + } + + private DatabaseOperation[] CreateDatabaseOperationsFromResponse(DatabaseOperationListResponse response) + { + return response.DatabaseOperations.Select(dbOperation => CreateDatabaseOperation( + dbOperation.Name, + dbOperation.State, + dbOperation.Id, + dbOperation.StateId, + dbOperation.SessionActivityId, + dbOperation.DatabaseName, + dbOperation.PercentComplete, + dbOperation.ErrorCode, + dbOperation.Error, + dbOperation.ErrorSeverity, + dbOperation.ErrorState, + dbOperation.StartTime, + dbOperation.LastModifyTime)).ToArray(); + } + + + /// + /// Given a this will create and return a + /// object with the fields filled in. + /// + /// The response to turn into a + /// A object. + private Database CreateDatabaseFromResponse(DatabaseGetResponse response) + { + return this.CreateDatabaseFromResponse( + response.Database.Id, + response.Database.Name, + response.Database.CreationDate, + response.Database.Edition, + response.Database.CollationName, + response.Database.MaximumDatabaseSizeInGB, + response.Database.MaximumDatabaseSizeInBytes, + response.Database.IsFederationRoot, + response.Database.IsSystemObject, + response.Database.SizeMB, + response.Database.ServiceObjectiveAssignmentErrorCode, + response.Database.ServiceObjectiveAssignmentErrorDescription, + response.Database.ServiceObjectiveAssignmentState, + response.Database.ServiceObjectiveAssignmentStateDescription, + response.Database.ServiceObjectiveAssignmentSuccessDate, + response.Database.ServiceObjectiveId, + response.Database.AssignedServiceObjectiveId, + response.Database.RecoveryPeriodStartDate, + response.Database.State); + } + + /// + /// Given a this will create and return an array of + /// objects with the fields filled in. + /// + /// The response to turn into an array of objects + /// An array of objects. + private Database[] CreateDatabaseFromResponse(DatabaseListResponse response) + { + return response.Databases.Select(db => this.CreateDatabaseFromResponse( + db.Id, + db.Name, + db.CreationDate, + db.Edition, + db.CollationName, + db.MaximumDatabaseSizeInGB, + db.MaximumDatabaseSizeInBytes, + db.IsFederationRoot, + db.IsSystemObject, + db.SizeMB, + db.ServiceObjectiveAssignmentErrorCode, + db.ServiceObjectiveAssignmentErrorDescription, + db.ServiceObjectiveAssignmentState, + db.ServiceObjectiveAssignmentStateDescription, + db.ServiceObjectiveAssignmentSuccessDate, + db.ServiceObjectiveId, + db.AssignedServiceObjectiveId, + db.RecoveryPeriodStartDate, + db.State)).ToArray(); + } + + /// + /// Given a this will create and return a + /// object with the fields filled in. + /// + /// The response to turn into a + /// A object. + private Database CreateDatabaseFromResponse(DatabaseCreateResponse response) + { + return this.CreateDatabaseFromResponse( + response.Database.Id, + response.Database.Name, + response.Database.CreationDate, + response.Database.Edition, + response.Database.CollationName, + response.Database.MaximumDatabaseSizeInGB, + response.Database.MaximumDatabaseSizeInBytes, + response.Database.IsFederationRoot, + response.Database.IsSystemObject, + response.Database.SizeMB, + response.Database.ServiceObjectiveAssignmentErrorCode, + response.Database.ServiceObjectiveAssignmentErrorDescription, + response.Database.ServiceObjectiveAssignmentState, + response.Database.ServiceObjectiveAssignmentStateDescription, + response.Database.ServiceObjectiveAssignmentSuccessDate, + response.Database.ServiceObjectiveId, + response.Database.AssignedServiceObjectiveId, + response.Database.RecoveryPeriodStartDate, + response.Database.State); + } + + /// + /// Given a this will create and return a + /// object with the fields filled in. + /// + /// The response to turn into a + /// A object. + private Database CreateDatabaseFromResponse(DatabaseUpdateResponse response) + { + return this.CreateDatabaseFromResponse( + response.Database.Id, + response.Database.Name, + response.Database.CreationDate, + response.Database.Edition, + response.Database.CollationName, + response.Database.MaximumDatabaseSizeInGB, + response.Database.MaximumDatabaseSizeInBytes, + response.Database.IsFederationRoot, + response.Database.IsSystemObject, + response.Database.SizeMB, + response.Database.ServiceObjectiveAssignmentErrorCode, + response.Database.ServiceObjectiveAssignmentErrorDescription, + response.Database.ServiceObjectiveAssignmentState, + response.Database.ServiceObjectiveAssignmentStateDescription, + response.Database.ServiceObjectiveAssignmentSuccessDate, + response.Database.ServiceObjectiveId, + response.Database.AssignedServiceObjectiveId, + response.Database.RecoveryPeriodStartDate, + response.Database.State); + } + + /// + /// Given a set of database properties this will create and return a + /// object with the fields filled in. + /// + /// The database Id. + /// The database name. + /// The database creation date. + /// The database edition. + /// The database collation name. + /// The database maximum size. + /// The database maximum size. + /// Whether or not the database is a federation root. + /// Whether or not the database is a system object. + /// The current database size. + /// + /// The last error code received for service objective assignment change. + /// + /// + /// The last error received for service objective assignment change. + /// + /// + /// The state of the current service objective assignment. + /// + /// + /// The state description for the current service objective assignment. + /// + /// + /// The last success date for a service objective assignment on this database. + /// + /// The service objective Id for this database. + /// The assigned service object Id for this database. + /// The start date of the recovery period for this database. + /// A object. + private Database CreateDatabaseFromResponse( + int id, + string name, + DateTime creationDate, + string edition, + string collationName, + long maximumDatabaseSizeInGB, + long maximumDatabaseSizeInBytes, + bool isFederationRoot, + bool isSystemObject, + string sizeMB, + string serviceObjectiveAssignmentErrorCode, + string serviceObjectiveAssignmentErrorDescription, + string serviceObjectiveAssignmentState, + string serviceObjectiveAssignmentStateDescription, + string serviceObjectiveAssignmentSuccessDate, + string serviceObjectiveId, + string assignedServiceObjectiveId, + DateTime? recoveryPeriodStartDate, + string state) + { + Database result = new Database() + { + Id = id, + Name = name, + CollationName = collationName, + CreationDate = creationDate, + Edition = edition, + MaxSizeGB = (int)maximumDatabaseSizeInGB, + MaxSizeBytes = maximumDatabaseSizeInBytes, + IsFederationRoot = isFederationRoot, + IsSystemObject = isSystemObject, + RecoveryPeriodStartDate = recoveryPeriodStartDate, + }; + + // Parse any additional database information + if (!string.IsNullOrEmpty(sizeMB)) + { + result.SizeMB = decimal.Parse(sizeMB, CultureInfo.InvariantCulture); + } + + // Parse the service objective information + if(!string.IsNullOrEmpty(assignedServiceObjectiveId)) + { + Guid guid = Guid.Empty; + if(Guid.TryParse(assignedServiceObjectiveId, out guid)) + { + result.AssignedServiceObjectiveId = guid; + } + } + if (!string.IsNullOrEmpty(serviceObjectiveAssignmentErrorCode)) + { + result.ServiceObjectiveAssignmentErrorCode = int.Parse(serviceObjectiveAssignmentErrorCode); + } + if (!string.IsNullOrEmpty(serviceObjectiveAssignmentErrorDescription)) + { + result.ServiceObjectiveAssignmentErrorDescription = serviceObjectiveAssignmentErrorDescription; + } + if (!string.IsNullOrEmpty(serviceObjectiveAssignmentState)) + { + result.ServiceObjectiveAssignmentState = byte.Parse(serviceObjectiveAssignmentState); + } + if (!string.IsNullOrEmpty(serviceObjectiveAssignmentStateDescription)) + { + result.ServiceObjectiveAssignmentStateDescription = serviceObjectiveAssignmentStateDescription; + } + if (!string.IsNullOrEmpty(serviceObjectiveAssignmentSuccessDate)) + { + result.ServiceObjectiveAssignmentSuccessDate = DateTime.Parse(serviceObjectiveAssignmentSuccessDate, CultureInfo.InvariantCulture); + } + if (!string.IsNullOrEmpty(serviceObjectiveId)) + { + result.ServiceObjectiveId = Guid.Parse(serviceObjectiveId); + Guid sloId = Guid.Empty; + if (Guid.TryParse(serviceObjectiveId, out sloId)) + { + result.ServiceObjective = GetServiceObjective(new ServiceObjective() { Id = sloId }); + if (result.ServiceObjective != null) + { + result.ServiceObjectiveName = result.ServiceObjective.Name; + } + } + } + if(!string.IsNullOrEmpty(state)) + { + DatabaseStatus status; + if (Enum.TryParse(state, true, out status)) + { + result.Status = (int)status; + } + } + + this.LoadExtraProperties(result); + + return result; + } + + private static DatabaseCopyModel CreateDatabaseCopyFromResponse(WamlDatabaseCopy response) + { + DateTime startDate, modifyDate; + DateTime.TryParse(response.StartDate, out startDate); + DateTime.TryParse(response.StartDate, out modifyDate); + + return new DatabaseCopyModel() + { + EntityId = Guid.Parse(response.Name), + SourceServerName = response.SourceServerName, + SourceDatabaseName = response.SourceDatabaseName, + DestinationServerName = response.DestinationServerName, + DestinationDatabaseName = response.DestinationDatabaseName, + IsContinuous = response.IsContinuous, + ReplicationState = response.ReplicationState, + ReplicationStateDescription = response.ReplicationStateDescription, + LocalDatabaseId = response.LocalDatabaseId, + IsLocalDatabaseReplicationTarget = response.IsLocalDatabaseReplicationTarget, + IsInterlinkConnected = response.IsInterlinkConnected, + StartDate = startDate, + ModifyDate = modifyDate, + PercentComplete = response.PercentComplete, + IsOfflineSecondary = response.IsOfflineSecondary, + IsTerminationAllowed = response.IsTerminationAllowed + }; + } + + /// + /// Given a this will create and return a + /// object with the fields filled in. + /// + /// The response to turn into a + /// A object. + private RestorableDroppedDatabase CreateRestorableDroppedDatabaseFromResponse(RestorableDroppedDatabaseGetResponse response) + { + return this.CreateRestorableDroppedDatabaseFromResponse( + response.Database.EntityId, + response.Database.Name, + response.Database.ServerName, + response.Database.Edition, + response.Database.MaximumDatabaseSizeInBytes, + response.Database.CreationDate, + response.Database.DeletionDate, + response.Database.RecoveryPeriodStartDate); + } + + /// + /// Given a this will create and return an array of + /// object with the fields filled in. + /// + /// The response to turn into an array of objects + /// An array of objects. + private RestorableDroppedDatabase[] CreateRestorableDroppedDatabaseFromResponse(RestorableDroppedDatabaseListResponse response) + { + return response.Databases.Select(db => this.CreateRestorableDroppedDatabaseFromResponse( + db.EntityId, + db.Name, + db.ServerName, + db.Edition, + db.MaximumDatabaseSizeInBytes, + db.CreationDate, + db.DeletionDate, + db.RecoveryPeriodStartDate)).ToArray(); + } + + /// + /// Given a set of restorable dropped database properties this will create and return a + /// object with the fields filled in. + /// + /// The entity ID of the database. + /// The name of the database. + /// The name of the server that contained the database. + /// The edition of the database. + /// The maximum size of the database. + /// The creation date of the database. + /// The deletion date of the database. + /// The start date of the recovery period for this database. + /// A object. + private RestorableDroppedDatabase CreateRestorableDroppedDatabaseFromResponse( + string entityId, + string name, + string serverName, + string edition, + long maximumDatabaseSizeInBytes, + DateTime creationDate, + DateTime deletionDate, + DateTime? recoveryPeriodStartDate) + { + var result = new RestorableDroppedDatabase() + { + EntityId = entityId, + Name = name, + ServerName = serverName, + Edition = edition, + MaxSizeBytes = maximumDatabaseSizeInBytes, + CreationDate = creationDate, + DeletionDate = deletionDate, + RecoveryPeriodStartDate = recoveryPeriodStartDate, + }; + + this.LoadExtraProperties(result); + + return result; + } + + /// + /// Given a this will create and return a + /// object with the fields filled in. + /// + /// The response to turn into a + /// A object. + private RestoreDatabaseOperation CreateRestoreDatabaseOperationFromResponse(RestoreDatabaseOperationCreateResponse response) + { + return new RestoreDatabaseOperation() + { + RequestID = Guid.Parse(response.Operation.Id), + SourceDatabaseName = response.Operation.SourceDatabaseName, + SourceDatabaseDeletionDate = response.Operation.SourceDatabaseDeletionDate, + TargetServerName = response.Operation.TargetServerName, + TargetDatabaseName = response.Operation.TargetDatabaseName, + TargetUtcPointInTime = response.Operation.PointInTime, + }; + } + + /// + /// Add the tracing session and request headers to the client. + /// + /// The client to add the headers on. + private void AddTracingHeaders(SqlManagementClient sqlManagementClient) + { + sqlManagementClient.HttpClient.DefaultRequestHeaders.Add( + Constants.ClientSessionIdHeaderName, + this.ClientSessionId); + sqlManagementClient.HttpClient.DefaultRequestHeaders.Add( + Constants.ClientRequestIdHeaderName, + this.ClientRequestId); + } + + /// + /// Ensures any extra property on the given is loaded. + /// + /// The database that needs the extra properties. + private void LoadExtraProperties(Database database) + { + // Fill in the context property + database.Context = this; + } + + /// + /// Ensures any extra property on the given is loaded. + /// + /// The database that needs the extra properties. + private void LoadExtraProperties(RestorableDroppedDatabase database) + { + // Fill in the context property + database.Context = this; + } + + #endregion + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/ServerDataServiceEnums.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/ServerDataServiceEnums.cs new file mode 100644 index 000000000000..1934511cb3d9 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/ServerDataServiceEnums.cs @@ -0,0 +1,53 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server +{ + /// + /// The database edition + /// + public enum DatabaseEdition + { + /// + /// No database edition specified + /// + None = 0, + + /// + /// A database business edition + /// + Business = 1, + + /// + /// A database web edition + /// + Web = 2, + + /// + /// A database premium edition + /// + Premium = 3, + + /// + /// A database basic edition + /// + Basic = 4, + + /// + /// A database standard edition + /// + Standard = 5 + } +} + diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/ServerDataServiceSqlAuth.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/ServerDataServiceSqlAuth.cs new file mode 100644 index 000000000000..4b321b26e1bf --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/ServerDataServiceSqlAuth.cs @@ -0,0 +1,1135 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Data.Services.Client; +using System.Globalization; +using System.Linq; +using System.Net; +using System.Xml.Linq; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Properties; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server +{ + using DatabaseCopyModel = Model.DatabaseCopy; + + /// + /// Implementation of the with Sql Authentication. + /// + public partial class ServerDataServiceSqlAuth : ServerDataServiceContext, IServerDataServiceContext + { + #region Constants + + /// + /// Model name used in the connection type string + /// + private const string ServerModelConnectionType = "Server2"; + + #endregion + + #region Private data + + /// + /// A Guid that identifies this session for end-to-end tracing + /// + private readonly Guid sessionActivityId; + + /// + /// The connection type identifying the model and connection parameters to use + /// + private readonly DataServiceConnectionType connectionType; + + /// + /// The access token to use in requests + /// + private readonly AccessTokenResult accessToken; + + /// + /// The SQL authentication credentials used for this context + /// + private readonly SqlAuthenticationCredentials credentials; + + /// + /// A collection of entries to be added to each request's header. HTTP headers are case-insensitive. + /// + private readonly Dictionary supplementalHeaderEntries = + new Dictionary(StringComparer.InvariantCultureIgnoreCase); + + /// + /// Serializes some instance-level operations + /// + private readonly object instanceSyncObject = new object(); + + /// + /// The name of the server we are connected to. + /// + private readonly string serverName; + + /// + /// The previous request's client request Id. + /// + private string clientRequestId; + + #endregion + + /// + /// Initializes a new instance of the class. + /// + /// The server's management service Uri. + /// The server connection type with the server name + /// An activity ID provided by the user that should be associated with this session. + /// The authentication access token to be used for executing web requests. + /// The SQL authentication credentials used for this context + private ServerDataServiceSqlAuth( + Uri managementServiceUri, + DataServiceConnectionType connectionType, + Guid sessionActivityId, + AccessTokenResult accessToken, + SqlAuthenticationCredentials credentials) + : base(new Uri(managementServiceUri, connectionType.RelativeEntityUri)) + { + this.sessionActivityId = sessionActivityId; + this.connectionType = connectionType; + this.accessToken = accessToken; + this.credentials = credentials; + + // Generate a requestId and retrieve the server name + this.clientRequestId = SqlDatabaseCmdletBase.GenerateClientTracingId(); + this.serverName = this.Servers.First().Name; + } + + #region Public Properties + + /// + /// Gets the session activity Id associated with this context. + /// + public Guid SessionActivityId + { + get + { + return this.sessionActivityId; + } + } + + /// + /// Gets the client per session tracing Id. + /// + public string ClientSessionId + { + get + { + return SqlDatabaseCmdletBase.clientSessionId; + } + } + + /// + /// Gets the previous request's client request Id. + /// + public string ClientRequestId + { + get + { + return this.clientRequestId; + } + } + + /// + /// Gets the name of the server for this context. + /// + public string ServerName + { + get + { + return this.serverName; + } + } + + #endregion + + /// + /// Creates and returns a new instance of the class which + /// connects to the specified server using the specified credentials. If the server name + /// is null, the default server name from the serviceRoot Uri will be used. + /// + /// The server's management service . + /// An activity ID provided by the user that should be associated with this session. + /// The credentials to be used to authenticate the user. + /// The name of the server to connect to. (Optional) + /// An instance of class. + public static ServerDataServiceSqlAuth Create( + Uri managementServiceUri, + Guid sessionActivityId, + SqlAuthenticationCredentials credentials, + string serverName) + { + if (managementServiceUri == null) + { + throw new ArgumentNullException("managementServiceUri"); + } + + if (credentials == null) + { + throw new ArgumentNullException("credentials"); + } + + // Retrieve GetAccessToken operation Uri + Uri accessUri = DataConnectionUtility.GetAccessTokenUri(managementServiceUri); + + // Synchronously call GetAccessToken + AccessTokenResult result = DataServiceAccess.GetAccessToken(accessUri, credentials); + + // Validate the retrieved access token + AccessTokenResult.ValidateAccessToken(managementServiceUri, result); + + // Create and return a ServerDataService object + return Create(managementServiceUri, sessionActivityId, result, serverName, credentials); + } + + /// + /// Creates and returns a new instance of the class which + /// connects to the specified server using the specified credentials. + /// + /// The server's management service . + /// An activity ID provided by the user that should be associated with this session. + /// The accessToken to be used to authenticate the user. + /// The name of the server to connect to. (Optional) + /// The SQL authentication credentials used for this context + /// An instance of class. + public static ServerDataServiceSqlAuth Create( + Uri managementServiceUri, + Guid sessionActivityId, + AccessTokenResult accessTokenResult, + string serverName, + SqlAuthenticationCredentials credentials) + { + if (managementServiceUri == null) + { + throw new ArgumentNullException("managementServiceUri"); + } + + if (accessTokenResult == null) + { + throw new ArgumentNullException("accessTokenResult"); + } + + // Create a ServerDataServiceSqlAuth object + if (serverName == null) + { + return new ServerDataServiceSqlAuth( + managementServiceUri, + new DataServiceConnectionType(ServerModelConnectionType), + sessionActivityId, + accessTokenResult, + credentials); + } + else + { + return new ServerDataServiceSqlAuth( + managementServiceUri, + new DataServiceConnectionType(ServerModelConnectionType, serverName), + sessionActivityId, + accessTokenResult, + credentials); + } + } + + /// + /// Retrieves the metadata for the context as a + /// + /// The metadata for the context as a + public XDocument RetrieveMetadata() + { + // Create a new request Id for this operation + this.clientRequestId = SqlDatabaseCmdletBase.GenerateClientTracingId(); + + XDocument doc = DataConnectionUtility.GetMetadata(this, EnhanceRequest); + return doc; + } + + /// + /// Gets the associated with this context. + /// + public SqlAuthenticationCredentials SqlCredentials + { + get + { + return this.credentials; + } + } + + #region IServerDataServiceContext Members + + + /// + /// Ensures any extra property on the given is loaded. + /// + /// The object that needs the extra properties. + public void LoadExtraProperties(object obj) + { + try + { + Database database = obj as Database; + if (database != null) + { + this.LoadExtraProperties(database); + return; + } + + ServiceObjective serviceObjective = obj as ServiceObjective; + if (serviceObjective != null) + { + this.LoadExtraProperties(serviceObjective); + return; + } + + RestorableDroppedDatabase restorableDroppedDatabase = obj as RestorableDroppedDatabase; + if (restorableDroppedDatabase != null) + { + this.LoadExtraProperties(restorableDroppedDatabase); + return; + } + } + catch + { + // Ignore exceptions when loading extra properties, for backward compatibility. + } + } + + #region Database Operations + + /// + /// Creates a new Sql Database. + /// + /// The name for the new database. + /// The max size for the database. + /// The collation for the database. + /// The edition for the database. + /// The newly created Sql Database. + public Database CreateNewDatabase( + string databaseName, + int? databaseMaxSizeGb, + long? databaseMaxSizeBytes, + string databaseCollation, + DatabaseEdition databaseEdition, + ServiceObjective serviceObjective) + { + // Create a new request Id for this operation + this.clientRequestId = SqlDatabaseCmdletBase.GenerateClientTracingId(); + + // Create the new entity and set its properties + Database database = new Database(); + database.Name = databaseName; + + if (databaseMaxSizeGb != null) + { + database.MaxSizeGB = (int)databaseMaxSizeGb; + } + if(databaseMaxSizeBytes != null) + { + database.MaxSizeBytes = (long)databaseMaxSizeBytes; + } + + if (!string.IsNullOrEmpty(databaseCollation)) + { + database.CollationName = databaseCollation; + } + + if (databaseEdition != DatabaseEdition.None) + { + database.Edition = databaseEdition.ToString(); + } + + if (serviceObjective != null) + { + database.ServiceObjectiveId = serviceObjective.Id; + } + else + { + database.ServiceObjectiveId = null; + } + + + // Save changes + this.AddToDatabases(database); + try + { + this.SaveChanges(SaveChangesOptions.None); + + // Re-Query the database for server side updated information + database = this.RefreshEntity(database); + if (database == null) + { + throw new ApplicationException(Resources.ErrorRefreshingDatabase); + } + } + catch + { + this.ClearTrackedEntity(database); + throw; + } + + // Load the extra properties for this object. + this.LoadExtraProperties(database); + + return database; + } + + /// + /// Retrieves the list of all databases on the server. + /// + /// An array of all databases on the server. + public Database[] GetDatabases() + { + Database[] allDatabases = null; + + using (new MergeOptionTemporaryChange(this, MergeOption.OverwriteChanges)) + { + allDatabases = this.Databases.ToArray(); + } + + // Load the extra properties for all objects. + foreach (Database database in allDatabases) + { + this.LoadExtraProperties(database); + } + + return allDatabases; + } + + /// + /// Retrieve information on database with the name . + /// + /// The database to retrieve. + /// An object containing the information about the specific database. + public Database GetDatabase(string databaseName) + { + Database database; + + using (new MergeOptionTemporaryChange(this, MergeOption.OverwriteChanges)) + { + // Find the database by name + database = this.Databases.Where(db => db.Name == databaseName).SingleOrDefault(); + if (database == null) + { + throw new InvalidOperationException( + string.Format( + CultureInfo.InvariantCulture, + Resources.DatabaseNotFound, + this.ServerName, + databaseName)); + } + } + + // Load the extra properties for this object. + this.LoadExtraProperties(database); + + return database; + } + + /// + /// Updates the property on the database with the name . + /// + /// The database to update. + /// + /// The new database name, or null to not update. + /// + /// + /// The new database max size, or null to not update. + /// + /// + /// The new database edition, or null to not update. + /// + /// + /// The new service objective, or null to not update. + /// + /// The updated database object. + public Database UpdateDatabase( + string databaseName, + string newDatabaseName, + int? databaseMaxSizeGb, + long? databaseMaxSizeBytes, + DatabaseEdition? databaseEdition, + ServiceObjective serviceObjective) + { + // Find the database by name + Database database = GetDatabase(databaseName); + + // Update the name if specified + if (newDatabaseName != null) + { + database.Name = newDatabaseName; + } + + // Update the max size and edition properties + if (databaseMaxSizeGb != null) + { + database.MaxSizeGB = (int)databaseMaxSizeGb; + } + if (databaseMaxSizeBytes != null) + { + database.MaxSizeBytes = (long)databaseMaxSizeBytes; + } + + database.Edition = databaseEdition == null ? null : databaseEdition.ToString(); + + database.IsRecursiveTriggersOn = null; + + // Update the service objective property if specified + if (serviceObjective != null) + { + database.ServiceObjectiveId = serviceObjective.Id; + } + else + { + database.ServiceObjectiveId = null; + } + + // Mark the database object for update and submit the changes + this.UpdateObject(database); + try + { + this.SaveChanges(); + } + catch + { + this.RevertChanges(database); + throw; + } + + return this.GetDatabase(database.Name); + } + + /// + /// Removes the database with the name . + /// + /// The database to remove. + public void RemoveDatabase(string databaseName) + { + // Find the database by name + Database database = GetDatabase(databaseName); + + // Mark the object for delete and submit the changes + this.DeleteObject(database); + try + { + this.SaveChanges(); + } + catch + { + this.RevertChanges(database); + throw; + } + } + + #endregion + + #region Database Copy Operations + + private DatabaseCopy GetCopyForCopyModel(DatabaseCopyModel model) + { + DatabaseCopy retval = this.DatabaseCopies.Where(copy => copy.EntityId == model.EntityId + && model.IsLocalDatabaseReplicationTarget == copy.IsLocalDatabaseReplicationTarget) + .SingleOrDefault(); + + if (retval == null) + { + throw new ApplicationException(Resources.DatabaseCopyNotFoundGeneric); + } + + return retval; + } + + private static DatabaseCopyModel CreateCopyModelFromCopy(DatabaseCopy copy) + { + return new DatabaseCopyModel() + { + EntityId = copy.EntityId, + SourceServerName = copy.SourceServerName, + SourceDatabaseName = copy.SourceDatabaseName, + DestinationServerName = copy.DestinationServerName, + DestinationDatabaseName = copy.DestinationDatabaseName, + IsContinuous = copy.IsContinuous, + ReplicationState = copy.ReplicationState, + ReplicationStateDescription = copy.ReplicationStateDescription, + LocalDatabaseId = copy.LocalDatabaseId, + IsLocalDatabaseReplicationTarget = copy.IsLocalDatabaseReplicationTarget, + IsInterlinkConnected = copy.IsInterlinkConnected, + StartDate = DateTime.Parse(copy.TextStartDate), + ModifyDate = DateTime.Parse(copy.TextModifyDate), + PercentComplete = copy.PercentComplete.GetValueOrDefault(), + IsOfflineSecondary = copy.IsOfflineSecondary + }; + } + + /// + /// Retrieve all database copy objects with matching parameters. + /// + /// The name of the database to copy. + /// The name for the partner server. + /// The name of the database on the partner server. + /// All database copy objects with matching parameters. + public DatabaseCopyModel[] GetDatabaseCopy( + string databaseName, + string partnerServer, + string partnerDatabaseName) + { + // Setup the query by filtering for the source/destination server name from the context. + IQueryable databaseCopyQuerySource = this.DatabaseCopies + .Where(copy => copy.SourceServerName == this.ServerName); + IQueryable databaseCopyQueryTarget = this.DatabaseCopies + .Where(copy => copy.DestinationServerName == this.ServerName); + + // Add additional filter for database name + if (databaseName != null) + { + // Append the clause to only return database of the specified name + databaseCopyQuerySource = databaseCopyQuerySource + .Where(copy => copy.SourceDatabaseName == databaseName); + databaseCopyQueryTarget = databaseCopyQueryTarget + .Where(copy => copy.DestinationDatabaseName == databaseName); + } + + // Add additional filter for partner server name + if (partnerServer != null) + { + databaseCopyQuerySource = databaseCopyQuerySource + .Where(copy => copy.DestinationServerName == partnerServer); + databaseCopyQueryTarget = databaseCopyQueryTarget + .Where(copy => copy.SourceServerName == partnerServer); + } + + // Add additional filter for partner database name + if (partnerDatabaseName != null) + { + databaseCopyQuerySource = databaseCopyQuerySource + .Where(copy => copy.DestinationDatabaseName == partnerDatabaseName); + databaseCopyQueryTarget = databaseCopyQueryTarget + .Where(copy => copy.SourceDatabaseName == partnerDatabaseName); + } + + DatabaseCopy[] databaseCopies; + + using (new MergeOptionTemporaryChange(this, MergeOption.OverwriteChanges)) + { + // Return all results as an array. + DatabaseCopy[] sourceDatabaseCopies = databaseCopyQuerySource.ToArray(); + DatabaseCopy[] targetDatabaseCopies = databaseCopyQueryTarget.ToArray(); + databaseCopies = sourceDatabaseCopies.Concat(targetDatabaseCopies).ToArray(); + } + + // Load the extra properties for all objects. + foreach (DatabaseCopy databaseCopy in databaseCopies) + { + databaseCopy.LoadExtraProperties(this); + } + + return databaseCopies.Select(CreateCopyModelFromCopy).ToArray(); + } + + /// + /// Refreshes the given database copy object. + /// + /// The object to refresh. + /// The refreshed database copy object. + public DatabaseCopyModel GetDatabaseCopy(DatabaseCopyModel databaseCopy) + { + DatabaseCopy refreshedDatabaseCopy; + + using (new MergeOptionTemporaryChange(this, MergeOption.OverwriteChanges)) + { + // Find the database copy by its keys + refreshedDatabaseCopy = this.DatabaseCopies + .Where(c => c.SourceServerName == databaseCopy.SourceServerName) + .Where(c => c.SourceDatabaseName == databaseCopy.SourceDatabaseName) + .Where(c => c.DestinationServerName == databaseCopy.DestinationServerName) + .Where(c => c.DestinationDatabaseName == databaseCopy.DestinationDatabaseName) + .SingleOrDefault(); + if (refreshedDatabaseCopy == null) + { + throw new InvalidOperationException( + string.Format( + CultureInfo.InvariantCulture, + Resources.DatabaseCopyNotFound, + databaseCopy.SourceServerName, + databaseCopy.SourceDatabaseName, + databaseCopy.DestinationServerName, + databaseCopy.DestinationDatabaseName)); + } + } + + // Load the extra properties for this object. + refreshedDatabaseCopy.LoadExtraProperties(this); + + return CreateCopyModelFromCopy(refreshedDatabaseCopy); + } + + /// + /// Start database copy on the database with the name . + /// + /// The name of the database to copy. + /// The name for the partner server. + /// The name of the database on the partner server. + /// true to make this a continuous copy. + /// true to make this an offline secondary copy. + /// The new instance of database copy operation. + public DatabaseCopyModel StartDatabaseCopy( + string databaseName, + string partnerServer, + string partnerDatabaseName, + bool continuousCopy, + bool isOfflineSecondary) + { + // Create a new request Id for this operation + this.clientRequestId = SqlDatabaseCmdletBase.GenerateClientTracingId(); + + // Create a new database copy object with all the required properties + DatabaseCopy databaseCopy = new DatabaseCopy(); + databaseCopy.SourceServerName = this.ServerName; + databaseCopy.SourceDatabaseName = databaseName; + databaseCopy.DestinationServerName = partnerServer; + databaseCopy.DestinationDatabaseName = partnerDatabaseName; + + // Set the optional continuous copy flag + databaseCopy.IsContinuous = continuousCopy; + + // Set the optional IsOfflineSecondary flag + databaseCopy.IsOfflineSecondary = isOfflineSecondary; + + this.AddToDatabaseCopies(databaseCopy); + DatabaseCopy trackedDatabaseCopy = databaseCopy; + try + { + this.SaveChanges(SaveChangesOptions.None); + + // Requery for the entity to obtain updated linkid and state + databaseCopy = this.RefreshEntity(databaseCopy); + if (databaseCopy == null) + { + throw new ApplicationException(Resources.ErrorRefreshingDatabaseCopy); + } + } + catch + { + this.RevertChanges(trackedDatabaseCopy); + throw; + } + + return CreateCopyModelFromCopy(databaseCopy); + } + + /// + /// Terminate an ongoing database copy operation. + /// + /// The database copy to terminate. + /// true to forcefully terminate the copy. + public void StopDatabaseCopy( + DatabaseCopyModel copyModel, + bool forcedTermination) + { + DatabaseCopy databaseCopy = GetCopyForCopyModel(copyModel); + + // Create a new request Id for this operation + this.clientRequestId = SqlDatabaseCmdletBase.GenerateClientTracingId(); + + try + { + // Mark Forced/Friendly flag on the databaseCopy object first + databaseCopy.IsForcedTerminate = forcedTermination; + this.UpdateObject(databaseCopy); + this.SaveChanges(); + + // Mark the copy operation for delete + this.DeleteObject(databaseCopy); + this.SaveChanges(); + } + catch + { + this.RevertChanges(databaseCopy); + throw; + } + } + + #endregion + + #region ServiceObjective Operations + + /// + /// Retrieves the list of all service objectives on the server. + /// + /// An array of all service objectives on the server. + public ServiceObjective[] GetServiceObjectives() + { + ServiceObjective[] allObjectives = null; + + using (new MergeOptionTemporaryChange(this, MergeOption.OverwriteChanges)) + { + allObjectives = this.ServiceObjectives.ToArray(); + } + + // Load the extra properties for all objects. + foreach (ServiceObjective objective in allObjectives) + { + this.LoadExtraProperties(objective); + } + + return allObjectives; + } + + /// + /// Retrieve information on service objective with the name + /// . + /// + /// The service objective to retrieve. + /// + /// An object containing the information about the specific service objective. + /// + public ServiceObjective GetServiceObjective(string serviceObjectiveName) + { + ServiceObjective objective; + + using (new MergeOptionTemporaryChange(this, MergeOption.OverwriteChanges)) + { + // Find the service objective by name + objective = this.ServiceObjectives + .Where(db => db.Name == serviceObjectiveName) + .SingleOrDefault(); + if (objective == null) + { + throw new InvalidOperationException( + string.Format( + CultureInfo.InvariantCulture, + Resources.ServiceObjectiveNotFound, + this.ServerName, + serviceObjectiveName)); + } + } + + // Load the extra properties for this object. + this.LoadExtraProperties(objective); + + return objective; + } + + /// + /// Retrieve information on latest service objective with service objective + /// . + /// + /// The service objective to retrieve. + /// + /// An object containing the information about the specific service objective. + /// + public ServiceObjective GetServiceObjective(ServiceObjective serviceObjective) + { + return this.GetServiceObjective(serviceObjective.Name); + } + + /// + /// Gets a quota for a server + /// + /// The name of the quota to retrieve + /// A object for the quota + public ServerQuota GetQuota(string quotaName) + { + ServerQuota quota; + + using (new MergeOptionTemporaryChange(this, MergeOption.OverwriteChanges)) + { + // Find the database by name + quota = this.ServerQuotas.Where(q => q.Name == quotaName).SingleOrDefault(); + if (quota == null) + { + throw new InvalidOperationException( + string.Format( + CultureInfo.InvariantCulture, + Resources.DatabaseNotFound, + this.ServerName, + quotaName)); + } + } + + return quota; + } + + /// + /// Retrieves an array of all the server quotas. + /// + /// An array of objects + public ServerQuota[] GetQuotas() + { + ServerQuota[] allQuotas = null; + + using (new MergeOptionTemporaryChange(this, MergeOption.OverwriteChanges)) + { + allQuotas = this.ServerQuotas.ToArray(); + } + + return allQuotas; + } + + #endregion + + #region Get/Stop Database Operations + + /// + /// Retrieve information on operation with the guid + /// + /// The Guid of the operation to retrieve. + /// An object containing the information about the specific operation. + public DatabaseOperation GetDatabaseOperation(Guid OperationGuid) + { + DatabaseOperation operation; + + using (new MergeOptionTemporaryChange(this, MergeOption.OverwriteChanges)) + { + operation = this.DatabaseOperations.Where(op => op.Id == OperationGuid).FirstOrDefault(); + } + + return operation; + } + + /// + /// Retrieves the list of all operations on the database. + /// + /// The name of database to retrieve operations. + /// An array of all operations on the database. + public DatabaseOperation[] GetDatabaseOperations(string databaseName) + { + DatabaseOperation[] operations; + + using (new MergeOptionTemporaryChange(this, MergeOption.OverwriteChanges)) + { + operations = this.DatabaseOperations.Where(operation => operation.DatabaseName == databaseName).ToArray(); + if (operations.Count() == 0) + { + throw new InvalidOperationException( + string.Format( + CultureInfo.InvariantCulture, + Resources.DatabaseOperationNotFoundOnDatabase, + this.ServerName, + databaseName)); + } + } + + return operations; + } + + /// + /// Retrieves the list of all databases' operations on the server. + /// + /// An array of all operations on the server. + public DatabaseOperation[] GetDatabasesOperations() + { + DatabaseOperation[] operations; + + using (new MergeOptionTemporaryChange(this, MergeOption.OverwriteChanges)) + { + // We do not validate the number of operations returned since it's possible that there is no + // database operations on a new created server. + operations = this.DatabaseOperations.ToArray(); + } + + return operations; + } + #endregion + + #region RestorableDroppedDatabase Operations + + /// + /// Retrieves the list of all restorable dropped databases on the server. + /// + /// An array of all restorable dropped databases on the server. + public RestorableDroppedDatabase[] GetRestorableDroppedDatabases() + { + RestorableDroppedDatabase[] allRestorableDroppedDatabases = null; + + using (new MergeOptionTemporaryChange(this, MergeOption.OverwriteChanges)) + { + allRestorableDroppedDatabases = this.RestorableDroppedDatabases.ToArray(); + } + + // Load the extra properties for all objects. + foreach (var restorableDroppedDatabase in allRestorableDroppedDatabases) + { + this.LoadExtraProperties(restorableDroppedDatabase); + } + + return allRestorableDroppedDatabases; + } + + /// + /// Retrieve information on the restorable dropped database with the name + /// and deletion date . + /// + /// The name of the restorable dropped database to retrieve. + /// The deletion date of the restorable dropped database to retrieve. + /// An object containing the information about the specific restorable dropped database. + public RestorableDroppedDatabase GetRestorableDroppedDatabase( + string databaseName, DateTime deletionDate) + { + RestorableDroppedDatabase restorableDroppedDatabase; + + using (new MergeOptionTemporaryChange(this, MergeOption.OverwriteChanges)) + { + // Find the database by name + restorableDroppedDatabase = + this.RestorableDroppedDatabases + .Where(db => db.Name == databaseName && db.DeletionDate == deletionDate) + .SingleOrDefault(); + + if (restorableDroppedDatabase == null) + { + throw new InvalidOperationException( + string.Format( + CultureInfo.InvariantCulture, + Resources.GetAzureSqlRestorableDroppedDatabaseDatabaseNotFound, + this.ServerName, + databaseName, + deletionDate)); + } + } + + // Load the extra properties for this object. + this.LoadExtraProperties(restorableDroppedDatabase); + + return restorableDroppedDatabase; + } + + #endregion + + #region Restore Database Operations + + /// + /// Issues a restore request for the given source database to the given target database. + /// + /// The name of the source database. + /// The deletion date of the source database, in case it is a dropped database. + /// The name of the server to create the restored database on. + /// The name of the database to be created with the restored contents. + /// The point in time to restore the source database to. + /// An object containing the information about the restore request. + public RestoreDatabaseOperation RestoreDatabase( + string sourceDatabaseName, + DateTime? sourceDatabaseDeletionDate, + string targetServerName, + string targetDatabaseName, + DateTime? pointInTime) + { + throw new NotSupportedException(Resources.SqlAuthNotSupported); + } + + #endregion + + #endregion + + /// + /// Sets a supplemental property value that will be send with each request. + /// + /// A key that uniquely identifies the property + /// A string representation of the property value + public void SetSessionHeader(string key, string value) + { + lock (this.instanceSyncObject) + { + this.supplementalHeaderEntries[key] = value; + } + } + + /// + /// Handler to add aditional headers and properties to the request. + /// + /// The request to enhance. + protected override void OnEnhanceRequest(HttpWebRequest request) + { + EnhanceRequest(this, request); + } + + /// + /// Enhance a request with auth token. + /// + /// The data service context for the request. + /// The request. + private static void EnhanceRequest(ServerDataServiceSqlAuth context, HttpWebRequest request) + { + lock (context.instanceSyncObject) + { + foreach (KeyValuePair entry in context.supplementalHeaderEntries) + { + request.Headers[entry.Key] = entry.Value; + } + } + + // Add the UserAgent string + request.UserAgent = ApiConstants.UserAgentHeaderValue; + + // Add the access token header + request.Headers[DataServiceConstants.AccessTokenHeader] = context.accessToken.AccessToken; + + // Add the access token cookie + request.CookieContainer = new CookieContainer(); + request.CookieContainer.Add(context.accessToken.AccessCookie); + + // Add the session activity Id + request.Headers[DataServiceConstants.SessionTraceActivityHeader] = context.sessionActivityId.ToString(); + + // Add the client tracing Ids + request.Headers[Constants.ClientSessionIdHeaderName] = context.ClientSessionId; + request.Headers[Constants.ClientRequestIdHeaderName] = context.ClientRequestId; + } + + #region LoadExtraProperties Implementations + + /// + /// Ensures any extra property on the given is loaded. + /// + /// The database that needs the extra properties. + private void LoadExtraProperties(Database database) + { + // Fill in the context property + database.Context = this; + + // Fill in the service objective properties + this.LoadProperty(database, "ServiceObjective"); + database.ServiceObjectiveName = + database.ServiceObjective == null ? null : database.ServiceObjective.Name; + } + + /// + /// Ensures any extra property on the given is loaded. + /// + /// The database that needs the extra properties. + private void LoadExtraProperties(RestorableDroppedDatabase database) + { + // Fill in the context property + database.Context = this; + } + + /// + /// Ensures any extra property on the given is loaded. + /// + /// The serviceObjective that needs the extra properties. + private void LoadExtraProperties(ServiceObjective serviceObjective) + { + // Fill in the context property + serviceObjective.Context = this; + + // Fill in the service objective Dimension Settings + this.LoadProperty(serviceObjective, "DimensionSettings"); + } + + #endregion + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/ServiceObjectiveExtensions.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/ServiceObjectiveExtensions.cs new file mode 100644 index 000000000000..0c04675cc117 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/ServiceObjectiveExtensions.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server +{ + + /// + /// The extensions + /// + public partial class ServiceObjective + { + /// + /// Gets or sets the context from which this object was constructed. + /// + public IServerDataServiceContext Context; + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/UpdateServerDataServiceMetadata.ps1 b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/UpdateServerDataServiceMetadata.ps1 new file mode 100644 index 000000000000..3705089efdf3 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/Server/UpdateServerDataServiceMetadata.ps1 @@ -0,0 +1,79 @@ +Param( + [parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string] + $User, + [parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string] + $Password, + [parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string] + $ManageUrl +) + +$metadataFile = "$PWD\ServerDataService.csdl" +$clientModelClassFile = "$PWD\ServerContextInternal.cs" +$clientModelNamespace = "Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server"; +$clientModelBaseContext = "ServerContextInternal"; + +######## Import Server module from the build +Import-Module ..\..\..\..\..\..\Package\Debug\AzureServiceManagement\AzureServiceManagement.psd1 + +######## Create a new Server data service context +Write-Host "Connecting to management service at $ManageUrl" +$passwordSecure = $Password | ConvertTo-SecureString -asPlainText -Force +$credential = new-object System.Management.Automation.PSCredential($User, $passwordSecure) + +$context = New-AzureSqlDatabaseServerContext -ManageUrl $ManageUrl -Credential $Credential + +######## Update Server model $metadata to build from +Write-Host "Retrieving model metadata from $ManageUrl" +$metadataDoc = $context.RetrieveMetadata() +if ($metadataDoc -eq $null) +{ + Write-Error "$ManageUrl could not be accessed to retrieve metadata." + Write-Error "Please check credentials and the Url." + exit +} + +Write-Host "Updating checked-in model metadata at $metadataFile" +$metadataDoc.Save($metadataFile) + +$filteredDoc=[Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Common.DataConnectionUtility]::FilterMetadataDocument($metadataDoc); +$metadataHash=[Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Common.DataConnectionUtility]::GetDocumentHash($filteredDoc) + +######## Use DataSvcUtil to generate the model client class +Write-Host "Generating model class file at $clientModelClassFile" +$Framework35Path=[System.IO.Path]::Combine($env:FrameworkDir, $env:Framework35Version) +$DataSvcUtil=[System.IO.Path]::Combine($Framework35Path, "DataSvcUtil.exe") +& $DataSvcUtil /in:"$metadataFile" /out:"$clientModelClassFile" +if ($lastexitcode -eq 1) +{ + Write-Error "MODEL GENERATION ERROR: DataSvcUtil did not run properly. Command line:s" + Write-Error "$DataSvcUtil /in:`"$metadataFile`" /out:`"$clientModelClassFile`"" + exit +} + +######## Replace the default namespace and make the class abstract +$newClassFile = Get-Content $clientModelClassFile | + ForEach-Object { $_ -replace "^(namespace )(.*)","`$1$clientModelNamespace"} | + ForEach-Object { $_ -replace "(public )(partial class $clientModelBaseContext)","`$1abstract `$2"} +$newClassFile | Set-Content "$clientModelClassFile" + +$metadataHashDeclaration="namespace $clientModelNamespace +{ + public abstract partial class $clientModelBaseContext + { + public readonly string[] metadataHashes = new string[]{ + `"$metadataHash`", + `"0333AB7076A926BF53F07C1786F11C052DEB791B`", + `"F903DB500E018B00ECB1E355BC55F73B7342FC76`", + `"5A2ABE58F30C9EF4B4F49853CD5FE28BA9FEBCD9`", + `"68BA8B4EB74E0C5A91D0A734B742001018A9F9D2`", + `"80A53B80FCD9616E6EEBDCAA3482E30A159C0E1F`", + `"3070BEE06139E0754E2F022E56E9798BF8A57F30`"}; + } +}" +$metadataHashDeclaration | Add-Content "$clientModelClassFile" diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/ServiceResourceError.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/ServiceResourceError.cs new file mode 100644 index 000000000000..0f500de745b8 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/ServiceResourceError.cs @@ -0,0 +1,72 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Runtime.Serialization; +using System.Text; +using System.Xml; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Services +{ + /// + /// Data contract used for the serialization of the Error Information + /// + [DataContract(Name = "Error", Namespace = Constants.WebServicesNamespace)] + public class ServiceResourceError : IExtensibleDataObject + { + [DataMember(Order = 1)] + public string Message { get; set; } + + [DataMember(Order = 2)] + public ServiceResourceError InnerError { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + + /// + /// Tries to deserialized instance of to its object equivalent. + /// A return value indicates whether the conversion succeeded or failed. + /// + /// A stream that contains a serialized instance of to convert. + /// When the method returns, contains the deserialized object, + /// if the conversion succeeded, or null, if the conversion failed. + /// true if the input parameter is successfully converted; otherwise, false. + public static bool TryParse(string input, out ServiceResourceError result) + { + result = null; + + if (input == null) + { + return false; + } + + // Deserialize the stream using DataContractSerializer. + try + { + using (XmlDictionaryReader xmlReader = XmlDictionaryReader.CreateTextReader( + Encoding.UTF8.GetBytes(input), + new XmlDictionaryReaderQuotas())) + { + DataContractSerializer serializer = new DataContractSerializer(typeof(ServiceResourceError)); + result = (ServiceResourceError)serializer.ReadObject(xmlReader, true); + return true; + } + } + catch (Exception) + { + } + + return false; + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/SqlDatabaseFirewallExtensions.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/SqlDatabaseFirewallExtensions.cs new file mode 100644 index 000000000000..84cbb3f9b0d0 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/SqlDatabaseFirewallExtensions.cs @@ -0,0 +1,123 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Services +{ + public static partial class SqlDatabaseManagementExtensionMethods + { + /// + /// Retrieves all firewall rules on the specified server. + /// + /// + /// Channel used for communication with Azure's service management APIs. + /// + /// + /// The subscription id which contains the server. + /// + /// + /// The name of the server to retrieve firewall rules for. + /// + /// A list of all firewall rules on the server. + public static SqlDatabaseFirewallRulesList GetServerFirewallRules(this ISqlDatabaseManagement proxy, string subscriptionId, string serverName) + { + return proxy.EndGetServerFirewallRules(proxy.BeginGetServerFirewallRules(subscriptionId, serverName, null, null)); + } + + /// + /// Creates a new firewall rule on the specified server. + /// + /// + /// Channel used for communication with Azure's service management APIs. + /// + /// + /// The subscription id which contains the server. + /// + /// + /// The name of the server in which to create the firewall rule. + /// + /// + /// The name of the new firewall rule. + /// + /// + /// The starting IP address for the firewall rule. + /// + /// + /// The ending IP address for the firewall rule. + /// + public static void NewServerFirewallRule(this ISqlDatabaseManagement proxy, string subscriptionId, string serverName, string ruleName, string startIpAddress, string endIpAddress) + { + var input = new SqlDatabaseFirewallRuleInput + { + Name = ruleName, + StartIPAddress = startIpAddress, + EndIPAddress = endIpAddress + }; + + proxy.EndNewServerFirewallRule(proxy.BeginNewServerFirewallRule(subscriptionId, serverName, input, null, null)); + } + + /// + /// Updates a firewall rule on the specified server. + /// + /// + /// Channel used for communication with Azure's service management APIs. + /// + /// + /// The subscription id which contains the server. + /// + /// + /// The name of the server containing the firewall rule. + /// + /// + /// The name of the firewall rule to update. + /// + /// + /// The starting IP address for the firewall rule. + /// + /// + /// The ending IP address for the firewall rule. + /// + public static void UpdateServerFirewallRule(this ISqlDatabaseManagement proxy, string subscriptionId, string serverName, string ruleName, string startIpAddress, string endIpAddress) + { + var input = new SqlDatabaseFirewallRuleInput + { + Name = ruleName, + StartIPAddress = startIpAddress, + EndIPAddress = endIpAddress + }; + + proxy.EndUpdateServerFirewallRule(proxy.BeginUpdateServerFirewallRule(subscriptionId, serverName, ruleName, input, null, null)); + } + + /// + /// Removes a new firewall rule on the specified server. + /// + /// + /// Channel used for communication with Azure's service management APIs. + /// + /// + /// The subscription id which contains the server. + /// + /// + /// The name of the server containing the firewall rule. + /// + /// + /// The name of the firewall rule to remove. + /// + public static void RemoveServerFirewallRule(this ISqlDatabaseManagement proxy, string subscriptionId, string serverName, string ruleName) + { + proxy.EndRemoveServerFirewallRule(proxy.BeginRemoveServerFirewallRule(subscriptionId, serverName, ruleName, null, null)); + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/SqlDatabaseFirewallRule.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/SqlDatabaseFirewallRule.cs new file mode 100644 index 000000000000..ba32d4b03e55 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/SqlDatabaseFirewallRule.cs @@ -0,0 +1,36 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Services +{ + using System.Runtime.Serialization; + + /// + /// Get firewall rules data contract. + /// + [DataContract(Name = "ServiceResource", Namespace = Constants.ServiceManagementNamespace)] + public class SqlDatabaseFirewallRule : IExtensibleDataObject + { + [DataMember(Order = 1, EmitDefaultValue = false)] + public string Name { get; set; } + + [DataMember(Order = 2, EmitDefaultValue = false)] + public string StartIPAddress { get; set; } + + [DataMember(Order = 3, EmitDefaultValue = false)] + public string EndIPAddress { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/SqlDatabaseFirewallRuleInput.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/SqlDatabaseFirewallRuleInput.cs new file mode 100644 index 000000000000..a6570dbc037c --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/SqlDatabaseFirewallRuleInput.cs @@ -0,0 +1,36 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Services +{ + using System.Runtime.Serialization; + + /// + /// New firewall rule data contract. + /// + [DataContract(Name = "ServiceResource", Namespace = Constants.ServiceManagementNamespace)] + public class SqlDatabaseFirewallRuleInput : IExtensibleDataObject + { + [DataMember(Order = 1, EmitDefaultValue = false)] + public string Name { get; set; } + + [DataMember(Order = 2, EmitDefaultValue = false)] + public string StartIPAddress { get; set; } + + [DataMember(Order = 3, EmitDefaultValue = false)] + public string EndIPAddress { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/SqlDatabaseFirewallRulesList.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/SqlDatabaseFirewallRulesList.cs new file mode 100644 index 000000000000..dc1b0520ea58 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/SqlDatabaseFirewallRulesList.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Services +{ + using System.Collections.Generic; + using System.Runtime.Serialization; + + /// + /// List of firewall rules. + /// + [CollectionDataContract(Name = "ServiceResources", ItemName = "ServiceResource", Namespace = Constants.ServiceManagementNamespace)] + public class SqlDatabaseFirewallRulesList : List + { + public SqlDatabaseFirewallRulesList() + { + } + + public SqlDatabaseFirewallRulesList(IEnumerable firewallRules) + : base(firewallRules) + { + } + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/SqlDatabaseManagementError.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/SqlDatabaseManagementError.cs new file mode 100644 index 000000000000..124041020238 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/Services/SqlDatabaseManagementError.cs @@ -0,0 +1,76 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Runtime.Serialization; +using System.Text; +using System.Xml; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase.Services +{ + [DataContract(Name = "Error", Namespace = Constants.SqlDatabaseManagementNamespace)] + public class SqlDatabaseManagementError : IExtensibleDataObject + { + [DataMember(Order = 1)] + public string Code { get; set; } + + [DataMember(Order = 2)] + public string Message { get; set; } + + [DataMember(Order = 3, EmitDefaultValue = false)] + public int Severity { get; set; } + + [DataMember(Order = 4, EmitDefaultValue = false)] + public int State { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + + /// + /// Tries to deserialized instance of to its object equivalent. + /// A return value indicates whether the conversion succeeded or failed. + /// + /// A stream that contains a serialized instance of to convert. + /// When the method returns, contains the deserialized object, + /// if the conversion succeeded, or null, if the conversion failed. + /// true if the input parameter is successfully converted; otherwise, false. + public static bool TryParse(string input, out SqlDatabaseManagementError result) + { + result = null; + + if (input == null) + { + return false; + } + + // Deserialize the stream using DataContractSerializer. + try + { + using (XmlDictionaryReader xmlReader = XmlDictionaryReader.CreateTextReader( + Encoding.UTF8.GetBytes(input), + new XmlDictionaryReaderQuotas())) + { + DataContractSerializer serializer = new DataContractSerializer(typeof(SqlDatabaseManagementError)); + result = (SqlDatabaseManagementError)serializer.ReadObject(xmlReader, true); + return true; + } + } + catch (Exception) + { + } + + return false; + } + + } +} diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/SqlDatabaseCmdletBase.cs b/src/ServiceManagement/Sql/Commands.SqlDatabase/SqlDatabaseCmdletBase.cs new file mode 100644 index 000000000000..cc2a15ab2b1f --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/SqlDatabaseCmdletBase.cs @@ -0,0 +1,100 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services; +using Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Management.Sql; + +namespace Microsoft.WindowsAzure.Commands.SqlDatabase +{ + /// + /// The base class for all Microsoft Azure Sql Database Management Cmdlets + /// + public abstract class SqlDatabaseCmdletBase : AzurePSCmdlet + { + /// + /// Stores the session Id for all the request made in this session. + /// + internal static string clientSessionId; + + static SqlDatabaseCmdletBase() + { + clientSessionId = SqlDatabaseCmdletBase.GenerateClientTracingId(); + } + + /// + /// Generates a client side tracing Id of the format: + /// [Guid]-[Time in UTC] + /// + /// A string representation of the client side tracing Id. + public static string GenerateClientTracingId() + { + return string.Format( + CultureInfo.InvariantCulture, + "{0}-{1}", + Guid.NewGuid().ToString(), + DateTime.UtcNow.ToString("u")); + } + + /// + /// Retrieve the SQL Management client for the currently selected subscription, adding the session and request + /// id tracing headers for the current cmdlet invocation. + /// + /// The SQL Management client for the currently selected subscription. + protected SqlManagementClient GetCurrentSqlClient() + { + // Get the SQL management client for the current subscription + AzureSubscription subscription = AzureSession.CurrentContext.Subscription; + SqlDatabaseCmdletBase.ValidateSubscription(subscription); + SqlManagementClient client = AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement); + client.HttpClient.DefaultRequestHeaders.Add(Constants.ClientSessionIdHeaderName, clientSessionId); + client.HttpClient.DefaultRequestHeaders.Add(Constants.ClientRequestIdHeaderName, clientRequestId); + return client; + } + + /// + /// Validates that the given subscription is valid. + /// + /// The to validate. + public static void ValidateSubscription(AzureSubscription subscription) + { + if (subscription == null) + { + throw new ArgumentException( + Common.Properties.Resources.InvalidCurrentSubscription); + } + } + + /// + /// Stores the per request session Id for all request made in this cmdlet call. + /// + protected string clientRequestId; + + internal SqlDatabaseCmdletBase() + { + this.clientRequestId = SqlDatabaseCmdletBase.GenerateClientTracingId(); + } + + protected void WriteErrorDetails(Exception exception) + { + // Call the handler to parse and write error details. + SqlDatabaseExceptionHandler.WriteErrorDetails(this, this.clientRequestId, exception); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Sql/Commands.SqlDatabase/packages.config b/src/ServiceManagement/Sql/Commands.SqlDatabase/packages.config new file mode 100644 index 000000000000..206f71805635 --- /dev/null +++ b/src/ServiceManagement/Sql/Commands.SqlDatabase/packages.config @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage.MsTest2/Commands.Storage.MsTest2.csproj b/src/ServiceManagement/Storage/Commands.Storage.MsTest2/Commands.Storage.MsTest2.csproj new file mode 100644 index 000000000000..f350831dc1a8 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.MsTest2/Commands.Storage.MsTest2.csproj @@ -0,0 +1,77 @@ + + + + + Debug + AnyCPU + {9D5A40CA-5594-4F5C-8230-7ADF7CC0558E} + Exe + Properties + MS.Test.Common.MsTestLib + MsTest2 + v4.5 + 512 + + ..\..\..\ + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + + + + + + + + + + + + + + + + + + + {ce97967b-7479-43b9-9561-776232ac5d47} + Commands.Storage.MsTestLib + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + diff --git a/src/ServiceManagement/Storage/Commands.Storage.MsTest2/Main.cs b/src/ServiceManagement/Storage/Commands.Storage.MsTest2/Main.cs new file mode 100644 index 000000000000..3df3da8e90cf --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.MsTest2/Main.cs @@ -0,0 +1,546 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text.RegularExpressions; +using System.Threading; + +namespace MS.Test.Common.MsTestLib +{ + class Program + { + static int Main(string[] args) + { + + //parse the commandline + + Dictionary argsGroup = new Dictionary(); + List switchGroup = new List(); + foreach (string arg in args) + { + Regex rp = new Regex("(?<=^/).*?(?=:|$)"); + Match pMatch = rp.Match(arg); + if (pMatch.Success) + { + string paramName = pMatch.Value; + Regex rv = new Regex("(?<=(^/.*?:)).*$"); + Match vMatch = rv.Match(arg); + if (vMatch.Success) + { + string paramValue = vMatch.Value; + if (!argsGroup.ContainsKey(paramName)) + { + argsGroup.Add(paramName, paramValue); + } + } + else + { + if (!switchGroup.Contains(paramName)) + { + switchGroup.Add(paramName); + } + } + + } + + } + + //for -args value -switches type + string preArg = string.Empty; + foreach (string arg in args) + { + if (arg.StartsWith("-")) + { + string argTrimmed = arg.TrimStart(new char[] { '-' }); + if (preArg == string.Empty) + { + if (!switchGroup.Contains(argTrimmed)) + { + switchGroup.Add(argTrimmed); + + } + + } + preArg = argTrimmed; + + } + else + { + if (preArg != string.Empty) + { + if (!argsGroup.ContainsKey(preArg)) + { + argsGroup.Add(preArg, arg); + preArg = string.Empty; + } + } + + } + + } + + + string testDllName = string.Empty; + if (argsGroup.ContainsKey("lib")) + { + testDllName = argsGroup["lib"]; + } + + string testMethodName = string.Empty; + List testMethodNames = null; + + if (argsGroup.ContainsKey("case")) + { + testMethodName = argsGroup["case"]; + testMethodNames = new List(testMethodName.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries)); + } + + string testClassName = string.Empty; + List testClassNames = null; + if (argsGroup.ContainsKey("group")) + { + testClassName = argsGroup["group"]; + testClassNames = new List(testClassName.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries)); + } + + string testCategory = string.Empty; + List testCategories = null; + if (argsGroup.ContainsKey("tag")) + { + testCategory = argsGroup["tag"]; + testCategories = new List(testCategory.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries)); + } + + string testDataFile = string.Empty; + if (argsGroup.ContainsKey("config")) + { + testDataFile = argsGroup["config"]; + Test.TestDataFile = testDataFile; + } + + int testCaseReRunCount = 0; + if (argsGroup.ContainsKey("rerun")) + { + testCaseReRunCount = int.Parse(argsGroup["rerun"]); + } + + + if (argsGroup.Count ==0 || string.IsNullOrEmpty(testDllName)) + { + PrintHelp(); + return -9009; + } + + Assembly testAssembly = Assembly.LoadFrom(testDllName); + + TestClassUnit[] testClasses = TestClassUnit.GetTestGroupUnits(testAssembly); + + //filter the test cases + + if (string.IsNullOrEmpty(testClassName) && string.IsNullOrEmpty(testMethodName) && string.IsNullOrEmpty(testCategory)) + { + // no fileter + } + else + { + foreach (TestClassUnit testClass in testClasses) + { + + if (testClassNames == null) + { + } + else + { + + if (testClassNames.Contains(testClass.Name)) + { + } + else + { + testClass.Enable = false; + continue; + } + } + + foreach (TestMethodUnit testMethod in testClass.TestCaseUnits) + { + if (testMethodNames == null) + { + } + else + { + if (testMethodNames.Contains(testMethod.Name)) + { + } + else + { + testMethod.Enable = false; + continue; + } + } + + if (testCategories != null) + { + + if (testMethod.Tag != null && testCategories.Intersect(testMethod.Tag).Count() > 0) + { + } + else + { + testMethod.Enable = false; + } + } + + } + + //count the active test cases + foreach (TestMethodUnit testMethod in testClass.TestCaseUnits) + { + if (testMethod.Enable == true) + { + testClass.ActiveCases++; + } + } + + } + + } + + + //if 'list' is specified, only list the enabled test cases + if (switchGroup.Contains("list")) + { + + foreach (TestClassUnit testClass in testClasses) + { + if (testClass.AssemblyInitMethod != null) + { + Console.WriteLine("[Test Init] : {0}", testClass.AssemblyInitMethod.Name); + } + } + + int totalCases = 0; + foreach (TestClassUnit testClass in testClasses) + { + Console.WriteLine("[Test Class] : {0}", testClass.Name); + + foreach (TestMethodUnit testMethod in testClass.TestCaseUnits) + { + Console.WriteLine(" [Test Method] {0} {1}", testMethod.Name, testMethod.Enable ? "Enabled" : "Disabled"); + } + + Console.WriteLine("[Active Cases] : {0}", testClass.ActiveCases); + totalCases += testClass.ActiveCases; + } + + foreach (TestClassUnit testClass in testClasses) + { + if (testClass.AssemblyCleanupMethod != null) + { + Console.WriteLine("[Test Cleanup] : {0}" , testClass.AssemblyCleanupMethod.Name); + } + } + + Console.WriteLine("[Test Total] : {0}", totalCases); + + return 0; + + } + + + //execute assembly init + foreach (TestClassUnit testClass in testClasses) + { + if (testClass.AssemblyInitMethod != null) + { + try + { + testClass.AssemblyInitMethod.Invoke(null, new object[] { new TestContext2() }); + } + catch (Exception e) + { + Console.WriteLine("Exception in AssemblyInit : {0}", e.ToString()); + return -1; + } + // overwrite the delegate for AssertFail + Test.AssertFail= new AssertFailDelegate ((string a)=>{}); + } + } + + + + //execute test classes and test methods + + foreach (TestClassUnit testClass in testClasses) + { + //init the class + if (!testClass.Enable || testClass.ActiveCases == 0) + { + continue; + } + + + TestContext2 testContext = new TestContext2 (); + testContext.fullyQualifiedTestClassName= testClass.TestGroupClass.FullName; + + + bool classInitOK = true; + if (testClass.ClassInitMethod != null) + { + try + { + + testClass.ClassInitMethod.Invoke(null, new object[] { testContext }); + } + catch (Exception e) + { + Console.WriteLine("Class {0} init exception : {1}", testClass.Name, e.ToString()); + classInitOK = false; // this means to skip the method execution but still do the cleanup + } + } + + if (classInitOK) + { + + object testObject = Activator.CreateInstance(testClass.TestGroupClass); + PropertyInfo pInfo = testClass.TestGroupClass.GetProperty("TestContext"); + if (pInfo != null) + { + pInfo.SetValue(testObject, testContext, null); + } + + foreach (TestMethodUnit testMethod in testClass.TestCaseUnits) + { + + if (!testMethod.Enable) + { + continue; + } + + //init the test method + testContext.testName = testMethod.TestCase.Name; + if (pInfo != null) + { + pInfo.SetValue(testObject, testContext, null); + } + + // rerun the case if rerunCount > 0 + + for (int cr = 0; cr <= testCaseReRunCount; cr++) + { + + bool testInitOK = true; + + if (testClass.TestInitMethod != null) + { + try + { + testClass.TestInitMethod.Invoke(testObject, new object[] { }); + } + catch (Exception e) + { + Console.WriteLine("Method {0} init exception : {1}", testMethod.Name, e.ToString()); + testInitOK = false; + } + } + + if (testInitOK) + { + // deal with timeout + + + TestThreadArgs threadArgs = new TestThreadArgs(); + threadArgs.InnerException = null; + threadArgs.TestExecutionDone = new AutoResetEvent(false); + threadArgs.TestObject = testObject; + threadArgs.Method = testMethod.TestCase; + + + Thread testThread = new Thread(threadArgs.TestCase); + + testThread.SetApartmentState(System.Threading.ApartmentState.STA); + testThread.Start(); + + bool executionResult = false; + if (testMethod.Timeout <= 0) + { + executionResult = threadArgs.TestExecutionDone.WaitOne(Timeout.Infinite, false); + } + else + { + executionResult = threadArgs.TestExecutionDone.WaitOne(testMethod.Timeout, false); + } + + if (!executionResult) + { + testThread.Abort(); + Console.WriteLine("Test Case execution is too long, timeout happens and testing aborted, expected runtime: " + testMethod.Timeout + " milliseconds"); + Test.Error("Test {0} timeout after {1} ms.", testMethod.Name, testMethod.Timeout); + } + else + { + if (threadArgs.InnerException != null) + { + Console.WriteLine("Test Case execution throws exception {0}", threadArgs.InnerException.ToString()); + Test.Error("Test Case execution throws exception {0}", threadArgs.InnerException.ToString()); + + if (threadArgs.InnerException is TestPauseException) + { + // if test pause exception is thrown, pause the test run to wait for investigation + Console.BackgroundColor = ConsoleColor.Red; + Console.ForegroundColor = ConsoleColor.Black; + Console.Write("Test run is paused for TestPauseException is thrown in the case. Press ESC to continue the run after investigation."); + Console.ResetColor(); + Console.WriteLine(); + ConsoleKeyInfo ki; + do + { + ki = Console.ReadKey(true); + + } while (ki.Key != ConsoleKey.Escape); + + } + } + } + + } + + //cleanup the test method + if (testClass.TestCleanupMethod != null) + { + try + { + testClass.TestCleanupMethod.Invoke(testObject, new object[] { }); + } + catch (Exception e) + { + Console.WriteLine("Method {0} cleanup exception : {1}", testMethod.Name, e.ToString()); + } + } + + } + // case rerun + + } + + } + + //cleanup the class + + if (testClass.ClassCleanupMethod != null) + { + try + { + testClass.ClassCleanupMethod.Invoke(null, new object[] { }); + } + catch (Exception e) + { + Console.WriteLine("Class {0} cleanup exception : {1}", testClass.Name, e.ToString()); + + } + } + + } + + + //execute assembly cleanup + + foreach (TestClassUnit testClass in testClasses) + { + if (testClass.AssemblyCleanupMethod != null) + { + testClass.AssemblyCleanupMethod.Invoke(null, new object[] { }); + } + } + + Console.WriteLine("===Result Summary==="); + Console.WriteLine("Total Run : {0}", Test.TestCount); + Console.WriteLine("Pass : {0}", Test.TestCount - Test.FailCount); + Console.WriteLine("Fail : {0}", Test.FailCount); + if (Test.FailedCases.Count > 0) + { + Console.WriteLine("===Failed Cases==="); + foreach(var c in Test.FailedCases) + { + Console.WriteLine("CaseName: {0}", c); + } + Console.WriteLine("=================="); + } + return Test.FailCount; + } + + static void PrintHelp() + { + Console.WriteLine("MSTest2.exe /lib:[testlib.dll] /group:[FullTestClassName] /case:[TestMethodName] /tag:[TestCategoryName] /config:[TestDataFile] /rerun:[CaseReRunCount] [/list]"); + Console.WriteLine("MSTest2.exe -lib [testlib.dll] -group [FullTestClassName] -case [TestMethodName] -tag [TestCategoryName] -config [TestDataFile] -rerun [CaseReRunCount] [-list]"); + } + } + + + public class TestThreadArgs + { + private Exception innerException; + + public Exception InnerException + { + get { return innerException; } + set { innerException = value; } + } + + private AutoResetEvent testExecutionDone; + + public AutoResetEvent TestExecutionDone + { + get { return testExecutionDone; } + set { testExecutionDone = value; } + } + + private MethodInfo method; + + public MethodInfo Method + { + get { return method; } + set { method = value; } + } + + private object testObject; + + public object TestObject + { + get { return testObject; } + set { testObject = value; } + } + + public void TestCase() + { + try + { + Method.Invoke(TestObject, new object[] { }); + } + catch (Exception e) + { + InnerException = e.InnerException; + } + finally + { + TestExecutionDone.Set(); + } + } + } + + +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.MsTest2/Properties/AssemblyInfo.cs b/src/ServiceManagement/Storage/Commands.Storage.MsTest2/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..6a8c9b96eea3 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.MsTest2/Properties/AssemblyInfo.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft Azure Powershell")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Microsoft Azure Powershell")] +[assembly: AssemblyCopyright("Copyright Microsoft")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("598976e5-f420-4b93-9373-8d2f1f7aa9a9")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("0.8.11")] +[assembly: AssemblyFileVersion("0.8.11")] diff --git a/src/ServiceManagement/Storage/Commands.Storage.MsTest2/TestClassUnit.cs b/src/ServiceManagement/Storage/Commands.Storage.MsTest2/TestClassUnit.cs new file mode 100644 index 000000000000..3dc67a10a00e --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.MsTest2/TestClassUnit.cs @@ -0,0 +1,223 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Reflection; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace MS.Test.Common.MsTestLib +{ + + public class TestClassUnit + { + private Type m_testGroupClass; + private TestClassAttribute m_attr; + private IgnoreAttribute m_ignoreAttr; + private TestMethodUnit[] m_testCaseUnits; + + public MethodInfo AssemblyInitMethod = null; + public MethodInfo AssemblyCleanupMethod = null; + + public MethodInfo ClassInitMethod = null; + public MethodInfo ClassCleanupMethod = null; + + public MethodInfo TestInitMethod = null; + public MethodInfo TestCleanupMethod = null; + + private string name; + + public string Name + { + get { return name; } + set { name = value; } + } + + + private string description; + + public string Description + { + get { return description; } + set { description = value; } + } + + private bool enable; + + public bool Enable + { + get { return enable; } + set { + enable = value; + if (!enable) + { + foreach (TestMethodUnit testCase in TestCaseUnits) + { + testCase.Enable = false; + } + } + } + } + + private int activeCases=0; + + public int ActiveCases + { + get { return activeCases; } + set { activeCases = value; } + } + + + public static TestClassUnit[] GetTestGroupUnits(Assembly assembly) + { + List units = new List(); + + foreach (Type type in assembly.GetTypes()) + { + if (null != GetTestGroupAttribute(type)) + { + units.Add(new TestClassUnit(type)); + } + + } + return units.ToArray(); + } + + private TestClassUnit(Type type) + { + m_testGroupClass = type; + m_attr = GetTestGroupAttribute(type); + m_ignoreAttr = GetTestIgnoreAttribute(type); + m_testCaseUnits = TestMethodUnit.GetTestCaseUnits(type); + + name = type.FullName; + + + + + foreach (MethodInfo methodInfo in type.GetMethods()) + { + foreach (Attribute attr in methodInfo.GetCustomAttributes(true)) + { + if ((attr as AssemblyInitializeAttribute) != null) + { + AssemblyInitMethod = methodInfo; + } + + if ((attr as AssemblyCleanupAttribute) != null) + { + AssemblyCleanupMethod = methodInfo; + } + + if ((attr as ClassInitializeAttribute) != null) + { + ClassInitMethod = methodInfo; + } + + if ((attr as ClassCleanupAttribute) != null) + { + ClassCleanupMethod = methodInfo; + } + + if ((attr as TestInitializeAttribute) != null) + { + TestInitMethod = methodInfo; + } + + if ((attr as TestCleanupAttribute) != null) + { + TestCleanupMethod = methodInfo; + } + + } + } + + + // default is all enabled + enable = true; + if (m_testCaseUnits.Length == 0) + { + enable = false; + } + + //if the Ignore attribute is specified, disable the test group + + if (m_ignoreAttr != null) + { + this.Enable = false; + } + + + } + + + static private TestClassAttribute GetTestGroupAttribute(Type type) + { + TestClassAttribute testGroupAttr = null; + foreach (Attribute attr in type.GetCustomAttributes(true)) + { + testGroupAttr = attr as TestClassAttribute; + if (null != testGroupAttr) + { + return testGroupAttr; + } + } + return null; + } + + static private IgnoreAttribute GetTestIgnoreAttribute(Type type) + { + IgnoreAttribute ignoreAttr = null; + foreach (Attribute attr in type.GetCustomAttributes(true)) + { + ignoreAttr = attr as IgnoreAttribute; + if (null != ignoreAttr) + { + return ignoreAttr; + } + } + return null; + } + + + public Type TestGroupClass + { + get + { + return m_testGroupClass; + } + } + + + /// + /// All test cases within the test group + /// + public TestMethodUnit[] TestCaseUnits + { + get + { + return m_testCaseUnits; + } + } + + public TestClassAttribute Attribute + { + get + { + return m_attr; + } + } + } + +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.MsTest2/TestContext2.cs b/src/ServiceManagement/Storage/Commands.Storage.MsTest2/TestContext2.cs new file mode 100644 index 000000000000..e945ab55d7c5 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.MsTest2/TestContext2.cs @@ -0,0 +1,48 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections; +using System.Collections.Generic; +using System.Data; +using System.Data.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace MS.Test.Common.MsTestLib +{ + public class TestContext2 : TestContext + { + private DataRow dataRow = null; + public override DataRow DataRow { get { return dataRow; } } + Dictionary properties = new Dictionary(); + public override IDictionary Properties { get { return properties; } } + public override void AddResultFile(string fileName) { } + public override void BeginTimer(string timerName) { } + + public override void EndTimer(string timerName) { } + public override void WriteLine(string format, params object[] args) { } + + public override DbConnection DataConnection { get { return null; } } + + + public string fullyQualifiedTestClassName = string.Empty; + + public override string FullyQualifiedTestClassName { get { return fullyQualifiedTestClassName; } } + + + public string testName = string.Empty; + public override string TestName { get { return testName; } } + } + + +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.MsTest2/TestMethodUnit.cs b/src/ServiceManagement/Storage/Commands.Storage.MsTest2/TestMethodUnit.cs new file mode 100644 index 000000000000..b78144fef184 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.MsTest2/TestMethodUnit.cs @@ -0,0 +1,295 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Reflection; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace MS.Test.Common.MsTestLib +{ + + public class TestMethodUnit + { + private MethodInfo m_testCase; + + private TestMethodAttribute m_attr; + + private TimeoutAttribute m_timeoutAttr; + private IList m_tagAttrs; + + private IgnoreAttribute m_ignoreAttr; + + private bool enable; + + public bool Enable + { + get { return enable; } + set { enable = value; } + } + + private string name; + + public string Name + { + get { return name; } + set { name = value; } + } + + + private string description; + + public string Description + { + get { return description; } + set { description = value; } + } + + public int Timeout + { + get + { + if (m_timeoutAttr != null) + { + return m_timeoutAttr.Timeout; + } + else + { + return int.MaxValue; + } + + } + } + + public bool Ignore + { + get + { + if (m_ignoreAttr != null) + { + return true; + } + else + { + return false; + } + } + } + + public IList Tag + { + get + { + return m_tagAttrs; + } + } + + + public static TestMethodUnit[] GetTestCaseUnits(Type type) + { + + List testCases = new List(); + foreach (MethodInfo methodInfo in type.GetMethods()) + { + if (null != GetTestMethodAttribute(methodInfo)) + { + testCases.Add(new TestMethodUnit(methodInfo)); + } + } + + return testCases.ToArray(); + } + + private TestMethodUnit(MethodInfo testCase) + { + m_testCase = testCase; + name = testCase.Name; + m_tagAttrs = new List(); + + foreach (Attribute attr in testCase.GetCustomAttributes(true)) + { + if (null != (attr as TestMethodAttribute)) + { + m_attr= (TestMethodAttribute) attr; + } + + if (null != (attr as TimeoutAttribute)) + { + m_timeoutAttr=(TimeoutAttribute) attr; + } + + if (null != (attr as TestCategoryAttribute)) + { + m_tagAttrs.Add (((TestCategoryAttribute) attr).TestCategories[0]); + } + + if (null != (attr as IgnoreAttribute)) + { + m_ignoreAttr = (IgnoreAttribute) attr; + } + + } + + //default is all enabled if not ignored + if (Ignore) + { + enable = false; + } + else + { + enable = true; + } + } + + static private T GetTestMethodAttribute(MethodInfo method) where T:Attribute + { + T testCaseAttr = null; + foreach (Attribute attr in method.GetCustomAttributes(true)) + { + testCaseAttr = attr as T; + if (null != testCaseAttr) + { + return testCaseAttr; + } + } + return null; + } + + static public MethodInfo GetAssemblyInitMethod(Type type) + { + foreach (MethodInfo methodInfo in type.GetMethods()) + { + foreach (Attribute attr in methodInfo.GetCustomAttributes(true)) + { + if ((attr as AssemblyInitializeAttribute) != null) + { + return methodInfo; + } + } + } + + return null; + + } + + static public MethodInfo GetAssemblyCleanMethod(Type type) + { + foreach (MethodInfo methodInfo in type.GetMethods()) + { + foreach (Attribute attr in methodInfo.GetCustomAttributes(true)) + { + if ((attr as AssemblyCleanupAttribute) != null) + { + return methodInfo; + } + } + } + + return null; + + } + + static public MethodInfo GetClassInitMethod(Type type) + { + foreach (MethodInfo methodInfo in type.GetMethods()) + { + foreach (Attribute attr in methodInfo.GetCustomAttributes(true)) + { + if ((attr as ClassInitializeAttribute) != null) + { + return methodInfo; + } + } + } + + return null; + + } + + static public MethodInfo GetClassCleanupMethod(Type type) + { + foreach (MethodInfo methodInfo in type.GetMethods()) + { + foreach (Attribute attr in methodInfo.GetCustomAttributes(true)) + { + if ((attr as ClassCleanupAttribute) != null) + { + return methodInfo; + } + } + } + + return null; + + } + + static public MethodInfo GetTestInitMethod(Type type) + { + foreach (MethodInfo methodInfo in type.GetMethods()) + { + foreach (Attribute attr in methodInfo.GetCustomAttributes(true)) + { + if ((attr as TestInitializeAttribute) != null) + { + return methodInfo; + } + } + } + + return null; + + } + + static public MethodInfo GetTestCleanupMethod(Type type) + { + foreach (MethodInfo methodInfo in type.GetMethods()) + { + foreach (Attribute attr in methodInfo.GetCustomAttributes(true)) + { + if ((attr as TestCleanupAttribute) != null) + { + return methodInfo; + } + } + } + + return null; + + } + + + + + + + public MethodInfo TestCase + { + get + { + return m_testCase; + } + } + + public TestMethodAttribute Attribute + { + get + { + return m_attr; + } + } + + + } + +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/ClassConfig.cs b/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/ClassConfig.cs new file mode 100644 index 000000000000..b0acc7e5af62 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/ClassConfig.cs @@ -0,0 +1,61 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; + +namespace MS.Test.Common.MsTestLib +{ + + public class ClassConfig + { + public ClassConfig() + { + classParams = new Dictionary(); + classMethods = new Dictionary(); + } + + private Dictionary classParams; + + public Dictionary ClassParams + { + get { return classParams; } + set { classParams = value; } + } + + private Dictionary classMethods; + + public MethodConfig this[string methodName] + { + get + { + if (classMethods.ContainsKey(methodName)) + { + return classMethods[methodName]; + } + else + { + return null; + } + } + + set + { + classMethods[methodName] = value; + } + + } + + } + +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/Commands.Storage.MsTestLib.csproj b/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/Commands.Storage.MsTestLib.csproj new file mode 100644 index 000000000000..c586980933b6 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/Commands.Storage.MsTestLib.csproj @@ -0,0 +1,86 @@ + + + + + Debug + AnyCPU + {CE97967B-7479-43B9-9561-776232AC5D47} + Library + Properties + MS.Test.Common.MsTestLib + MsTestLib + v4.5 + 512 + + ..\..\..\ + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + bin\Release\ + TRACE;SIGN + true + pdbonly + AnyCPU + prompt + false + + + true + MSSharedLibKey.snk + true + true + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + diff --git a/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/ConsoleLogger.cs b/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/ConsoleLogger.cs new file mode 100644 index 000000000000..92c2f8a8289a --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/ConsoleLogger.cs @@ -0,0 +1,170 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Text; + +namespace MS.Test.Common.MsTestLib +{ + public class ConsoleLogger : ILogger + { + + private const ConsoleColor ERROR_FG_COLOR = ConsoleColor.Red; + private const ConsoleColor INFO_FG_COLOR = ConsoleColor.White; + private const ConsoleColor WARN_FG_COLOR = ConsoleColor.Green; + private const ConsoleColor NOTE_FG_COLOR = ConsoleColor.DarkYellow; + + private ConsoleColor m_prevFGColor; + + public ConsoleLogger() + { + m_prevFGColor = Console.ForegroundColor; + } + + /// + /// + /// Writes an error log + /// + /// Format message string + /// exception object + /// Objects that need to be serialized in the message + /// + public void WriteError(string msg, params object[] objToLog) + { + DateTime dt = DateTime.Now; + StringBuilder sBuilder = new StringBuilder("[ERROR][" + dt.ToLongTimeString() + "." + dt.Millisecond + "]"); + sBuilder.Append( MessageBuilder.FormatString( msg, objToLog ) ); + Console.ForegroundColor = ERROR_FG_COLOR; + Console.WriteLine( sBuilder.ToString() ); + Console.ForegroundColor = m_prevFGColor; + } + + /// + /// + /// Writes a warn log + /// + /// Format message string + /// Objects that need to be serialized in the message + /// + public void WriteWarning(string msg, params object[] objToLog) + { + DateTime dt = DateTime.Now; + StringBuilder sBuilder = new StringBuilder("[WARN][" + dt.ToLongTimeString() + "." + dt.Millisecond + "]"); + sBuilder.Append( MessageBuilder.FormatString( msg, objToLog ) ); + Console.ForegroundColor = WARN_FG_COLOR; + Console.WriteLine( sBuilder.ToString() ); + Console.ForegroundColor = m_prevFGColor; + } + + /// + /// + /// Writes an info log + /// + /// Format message string + /// Objects that need to be serialized in the message + /// + public void WriteInfo(string msg, params object[] objToLog) + { + DateTime dt = DateTime.Now; + StringBuilder sBuilder = new StringBuilder( "[INFO][" + dt.ToLongTimeString()+"."+ dt.Millisecond+ "]" ); + sBuilder.Append( MessageBuilder.FormatString( msg, objToLog) ); + Console.ForegroundColor = INFO_FG_COLOR; + Console.WriteLine( sBuilder.ToString() ); + Console.ForegroundColor = m_prevFGColor; + } + + /// + /// + /// Writes a verbose log + /// + /// Format message string + /// Objects that need to be serialized in the message + /// + public void WriteVerbose(string msg, params object[] objToLog) + { + DateTime dt = DateTime.Now; + StringBuilder sBuilder = new StringBuilder("[VERB][" + dt.ToLongTimeString() + "." + dt.Millisecond + "]"); + sBuilder.Append( MessageBuilder.FormatString( msg, objToLog) ); + Console.ForegroundColor = INFO_FG_COLOR; + Console.WriteLine( sBuilder.ToString() ); + Console.ForegroundColor = m_prevFGColor; + } + + + /// + /// + /// Starts a test (as a child of the current context) + /// + /// Test id + /// + public void StartTest(string testId) + { + StringBuilder sBuilder = new StringBuilder("[START] Test: "); + sBuilder.Append( testId ); + + Console.ForegroundColor = NOTE_FG_COLOR; + Console.WriteLine( sBuilder.ToString() ); + Console.ForegroundColor = m_prevFGColor; + } + + /// + /// + /// Ends the specified test with the specified test result. + /// + /// Test id + /// Result of the Test + /// + public void EndTest(string testId, TestResult result ) + { + Console.ForegroundColor = NOTE_FG_COLOR; + + if (result == TestResult.FAIL) + { + Console.ForegroundColor = ERROR_FG_COLOR; + } + + StringBuilder sBuilder = new StringBuilder("[END] Test: "); + sBuilder.Append( testId ); + sBuilder.Append( " RESULT: " ); + sBuilder.Append( result.ToString() ); + + Console.WriteLine( sBuilder.ToString() ); + + Console.ForegroundColor = m_prevFGColor; + return; + } + + /// + /// + /// Returns "this" object + /// + /// SimpleConsoleLogger object + /// + public object GetLogger() + { + return this; + } + + /// + /// + /// Releases any resource held + /// + /// + public void Close() + { + //Do nothing + } + } +} + diff --git a/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/Exceptions.cs b/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/Exceptions.cs new file mode 100644 index 000000000000..e329c6ca2fb8 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/Exceptions.cs @@ -0,0 +1,36 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace MS.Test.Common.MsTestLib +{ + public class TestPauseException : Exception + { + public TestPauseException() + { + } + + public TestPauseException(string message) + : base(message) + { + } + + public TestPauseException(string message, Exception innerException) + : base(message, innerException) + { + } + + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/FileLogger.cs b/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/FileLogger.cs new file mode 100644 index 000000000000..f4131ba4b189 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/FileLogger.cs @@ -0,0 +1,199 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Text; + +namespace MS.Test.Common.MsTestLib +{ + public class FileLogger : ILogger + { + + private System.IO.StreamWriter m_file; + + /// + /// + /// Creates a new instance of this class + /// + /// + /// + public FileLogger() + { + string fileName = Environment.UserName + "_" + Environment.MachineName + " " + DateTime.Now.ToString().Replace('/', '-').Replace(':', '_') + ".txt"; + m_file = new System.IO.StreamWriter(fileName.ToString(), true); + } + + /// + /// + /// Creates a new instance of this class + /// + /// + /// File to which logs should be appended + /// + public FileLogger(string fileName) + : this(fileName, true) + { + + } + + /// + /// + /// Creates a new instance of this class + /// + /// + /// File to which logs should be written/appended + /// denotes whether the file is to be appended or over-written + /// + public FileLogger(string fileName, bool append) + { + // Open the file and assign to member variable + m_file = new System.IO.StreamWriter(fileName, append); + } + + /// + /// + /// Writes an error log + /// + /// Format message string + /// exception object + /// Objects that need to be serialized in the message + /// + public void WriteError( + string msg, + params object[] objToLog) + { + DateTime dt = DateTime.Now; + StringBuilder sBuilder = new StringBuilder("[ERROR][" + dt.ToLongTimeString() + "." + dt.Millisecond + "]"); + sBuilder.Append(MessageBuilder.FormatString(msg, objToLog)); + m_file.WriteLine(sBuilder.ToString()); + m_file.Flush(); + } + + /// + /// + /// Writes a warn log + /// + /// Format message string + /// Objects that need to be serialized in the message + /// + public void WriteWarning( + string msg, + params object[] objToLog) + { + DateTime dt = DateTime.Now; + StringBuilder sBuilder = new StringBuilder("[WARN][" + dt.ToLongTimeString() + "." + dt.Millisecond + "]"); + sBuilder.Append(MessageBuilder.FormatString(msg, objToLog)); + m_file.WriteLine(sBuilder.ToString()); + m_file.Flush(); + } + + /// + /// + /// Writes an info log + /// + /// Format message string + /// Objects that need to be serialized in the message + /// + public void WriteInfo( + string msg, + params object[] objToLog) + { + DateTime dt = DateTime.Now; + StringBuilder sBuilder = new StringBuilder("[INFO][" + dt.ToLongTimeString() + "." + dt.Millisecond + "]"); + sBuilder.Append(MessageBuilder.FormatString(msg, objToLog)); + m_file.WriteLine(sBuilder.ToString()); + m_file.Flush(); + } + + /// + /// + /// Writes a verbose log + /// + /// Format message string + /// Objects that need to be serialized in the message + /// + public void WriteVerbose( + string msg, + params object[] objToLog) + { + DateTime dt = DateTime.Now; + StringBuilder sBuilder = new StringBuilder("[VERB][" + dt.ToLongTimeString() + "." + dt.Millisecond + "]"); + sBuilder.Append(MessageBuilder.FormatString(msg, objToLog)); + m_file.WriteLine(sBuilder.ToString()); + m_file.Flush(); + } + + + /// + /// + /// Starts a test (as a child of the current context) + /// + /// Test id + /// + public void StartTest( + string testId) + { + StringBuilder sBuilder = new StringBuilder("[START] Test: "); + sBuilder.Append(testId); + m_file.WriteLine(sBuilder.ToString()); + m_file.Flush(); + } + + /// + /// + /// Ends the specified test with the specified test result + /// + /// Test id + /// Result of the Test + /// + public void EndTest( + string testId, + TestResult result) + { + StringBuilder sBuilder = new StringBuilder("[END] Test: "); + sBuilder.Append(testId); + sBuilder.Append(" RESULT: "); + sBuilder.Append(result.ToString()); + m_file.WriteLine(sBuilder.ToString()); + m_file.Flush(); + return; + } + + + /// + /// + /// Returns "this" object + /// + /// SimpleFileLogger object + /// + public object GetLogger() + { + return this; + } + + /// + /// + /// Closes the log file + /// + /// + public void Close() + { + if (m_file != null) + { + m_file.Flush(); + m_file.Close(); + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/ILogger.cs b/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/ILogger.cs new file mode 100644 index 000000000000..f51408c1e3bd --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/ILogger.cs @@ -0,0 +1,56 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +namespace MS.Test.Common.MsTestLib +{ + public interface ILogger + { + void WriteError( + string msg, + params object[] objToLog); + + void WriteWarning( + string msg, + params object[] objToLog); + + void WriteInfo( + string msg, + params object[] objToLog); + + void WriteVerbose( + string msg, + params object[] objToLog); + + void StartTest( + string testId); + + void EndTest( + string testId, + TestResult result); + + object GetLogger(); + + void Close(); + + } + + public enum TestResult + { + PASS, + FAIL + } + + +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/MSSharedLibKey.snk b/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/MSSharedLibKey.snk differ diff --git a/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/MessageBuilder.cs b/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/MessageBuilder.cs new file mode 100644 index 000000000000..ec46faf7d59b --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/MessageBuilder.cs @@ -0,0 +1,92 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Text; + +namespace MS.Test.Common.MsTestLib +{ + public class MessageBuilder + { + /// + /// + /// Uses String.Format method for formatting. Incase of any Exceptions due + /// to null arguments or incorrect message format, it formats the message in + /// an internal standard format. For example: + /// MSG: my-message + /// Obj-1: objToLog[1] + /// Obj-2: objToLog[2] + /// ... + /// + /// + /// Objects that need to be serialized in the message + /// + /// + public static string FormatString(string msgFormat, params object[] objToLog) + { + if ((string.IsNullOrEmpty(msgFormat) == false) + && (msgFormat.IndexOf('{') != -1) + && (msgFormat.IndexOf('}') != -1)) + { + try + { + return String.Format(msgFormat, objToLog); + } + catch + { + //ignore exception + } + } + + string prefix = string.Empty; + if (objToLog != null && objToLog.Length > 1) + { + prefix = " "; + } + + StringBuilder sBuilder = new StringBuilder(prefix); + sBuilder.Append(msgFormat); + sBuilder.Append(SerializeObjects(objToLog)); + return sBuilder.ToString(); + } + + private static string SerializeObjects(object[] objToLog) + { + StringBuilder sBuilder = new StringBuilder(); + if (objToLog != null) + { + for (int i = 0; i < objToLog.Length; i++) + { + if (objToLog != null) + { + try + { + sBuilder.Append("\n"); + sBuilder.Append(" Obj-"); + sBuilder.Append(i); + sBuilder.Append(" : "); + sBuilder.Append(objToLog[i]); + } + catch + { + //Ignore any serialization exceptions + + } + } + } + } + return sBuilder.ToString(); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/MethodConfig.cs b/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/MethodConfig.cs new file mode 100644 index 000000000000..521d366151ce --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/MethodConfig.cs @@ -0,0 +1,50 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; + +namespace MS.Test.Common.MsTestLib +{ + + public class MethodConfig + { + public MethodConfig() + { + methodParams = new Dictionary(); + } + + private Dictionary methodParams; + + public Dictionary MethodParams + { + get { return methodParams; } + set { methodParams = value; } + } + + public string this[string key] + { + get + { + return methodParams[key]; + } + + set + { + methodParams[key] = value; + } + } + } + + +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/Properties/AssemblyInfo.cs b/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..6b03c8c7761f --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/Properties/AssemblyInfo.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft Azure Powershell")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Microsoft Azure Powershell")] +[assembly: AssemblyCopyright("Copyright © Microsoft")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("137cb617-d227-4b18-88ba-042f3ede8c67")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("0.8.5")] +[assembly: AssemblyFileVersion("0.8.5")] \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/Test.cs b/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/Test.cs new file mode 100644 index 000000000000..4c6c48efa680 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/Test.cs @@ -0,0 +1,127 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; + +namespace MS.Test.Common.MsTestLib +{ + public static class Test + { + public static string TestDataFile; + public static TestConfig Data; + public static TestLogger Logger; + public static int TestCount = 0; + public static int FailCount = 0; + + public static string FullClassName = string.Empty; + public static string MethodName = string.Empty; + + public static int ErrorCount = 0; + + public static List FailedCases = null; + + public static void Init() + { + Data = new TestConfig(TestDataFile); + Logger = new TestLogger(Data); + FailedCases = new List(); + } + + public static void Init(string testDataFile) + { + Data = new TestConfig(testDataFile); + Logger = new TestLogger(Data); + FailedCases = new List(); + } + + public static void Close() + { + Logger.Close(); + } + + public static void Info( + string msg, + params object[] objToLog) + { + Logger.Info(msg, objToLog); + } + + public static void Warn( + string msg, + params object[] objToLog) + { + Logger.Warning(msg, objToLog); + } + + public static void Verbose( + string msg, + params object[] objToLog) + { + Logger.Verbose(msg, objToLog); + } + + public static void Error( + string msg, + params object[] objToLog) + { + ErrorCount++; + Logger.Error(msg, objToLog); + } + + public static void Assert(bool condition, + string msg, + params object[] objToLog) + { + if (condition) + { + Verbose("[Assert Pass] " + msg, objToLog); + } + else + { + Error("[Assert Fail] " + msg, objToLog); + } + } + + public static void Start(string testClass, string testMethod) + { + TestCount++; + ErrorCount = 0; + Logger.StartTest(testClass + "." + testMethod); + Test.FullClassName = testClass; + Test.MethodName = testMethod; + } + + public static void End(string testClass, string testMethod) + { + if (ErrorCount == 0) + { + Logger.EndTest(testClass + "." + testMethod, TestResult.PASS); + } + else + { + FailCount++; + Logger.EndTest(testClass + "." + testMethod, TestResult.FAIL); + AssertFail(string.Format("There " + (ErrorCount > 1 ? "are {0} errors" : "is {0} error") + " so the case fails. Please check the detailed case log.", ErrorCount)); + FailedCases.Add(String.Format("{0}.{1}", testClass, testMethod)); + } + + } + + public static AssertFailDelegate AssertFail; + + } + + public delegate void AssertFailDelegate(string msg); +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/TestConfig.cs b/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/TestConfig.cs new file mode 100644 index 000000000000..5735fd7d744c --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/TestConfig.cs @@ -0,0 +1,179 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Xml; + +namespace MS.Test.Common.MsTestLib +{ + public class TestConfig + { + private string DefaultConfigFileName = "TestData.xml"; + + public TestConfig(string configFile) + { + testParams = new Dictionary(); + testClasses = new Dictionary(); + + //Initialze: read default config file TestData.xml and then read configFile file + if(string.IsNullOrEmpty(configFile)) + { + configFile = "MyTestData.xml"; + } + ReadConfig(DefaultConfigFileName); //read default config file: TestData.xml + + if (File.Exists(configFile)) + { + ReadConfig(configFile); //read configFile file: e.g MyTestData.xml, configuration in this file will cover settings in TestData.xml + } + } + private void ReadConfig(string configFile) + { + if (string.IsNullOrEmpty(configFile)) + { + throw new ArgumentNullException(); //illegal use + } + XmlDocument config = new XmlDocument(); + try + { + config.Load(configFile); + } + catch (FileNotFoundException) + { + string errorMsg = string.Format("{0} file not found", configFile); + throw new FileNotFoundException(errorMsg); + } + catch (Exception) + { + throw; + } + XmlNode root = config.SelectSingleNode("TestConfig"); + if (root != null) + { + foreach (XmlNode node in root.ChildNodes) + { + XmlElement eleNode = node as XmlElement; + if (eleNode == null) + { + continue; + } + + if (string.Compare(eleNode.Name.ToLower(), "testclass") == 0 && eleNode.Attributes["name"] != null) + { + ClassConfig classConfig = this[eleNode.Attributes["name"].Value]; + if(classConfig == null) + classConfig = new ClassConfig(); + foreach (XmlNode subnode in eleNode.ChildNodes) + { + XmlElement eleSubnode = subnode as XmlElement; + if (eleSubnode == null) + { + continue; + } + + if (string.Compare(eleSubnode.Name.ToLower(), "testmethod") == 0 && eleSubnode.Attributes["name"] != null) + { + MethodConfig methodConfig = classConfig[eleSubnode.Attributes["name"].Value]; + if (methodConfig == null) + methodConfig = new MethodConfig(); + foreach (XmlNode methodParamNode in eleSubnode.ChildNodes) + { + XmlElement eleMethodParamNode = methodParamNode as XmlElement; + if (eleMethodParamNode == null) + { + continue; + } + methodConfig[eleMethodParamNode.Name] = eleMethodParamNode.InnerText; + + } + classConfig[eleSubnode.Attributes["name"].Value] = methodConfig; + continue; + } + + classConfig.ClassParams[eleSubnode.Name] = eleSubnode.InnerText; + + } + this[eleNode.Attributes["name"].Value] = classConfig; + continue; + + } + + TestParams[eleNode.Name] = eleNode.InnerText; + + } + } + } + + private Dictionary testParams = null; + + public Dictionary TestParams + { + get { return testParams; } + set { testParams = value; } + } + + private Dictionary testClasses; + + public ClassConfig this[string className] + { + get + { + if (testClasses.ContainsKey(className)) + { + return testClasses[className]; + } + else + { + return null; + } + } + + set + { + testClasses[className] = value; + } + } + + public string Get(string paramName) + { + //first search the method params + if (this[Test.FullClassName] != null) + { + if (this[Test.FullClassName][Test.MethodName] != null) + { + if (this[Test.FullClassName][Test.MethodName].MethodParams.ContainsKey(paramName)) + { + return this[Test.FullClassName][Test.MethodName].MethodParams[paramName].Trim(); + } + } + + if (this[Test.FullClassName].ClassParams.ContainsKey(paramName)) + { + return this[Test.FullClassName].ClassParams[paramName].Trim(); + } + } + + if (TestParams.ContainsKey(paramName)) + { + return TestParams[paramName].Trim(); + } + + throw new ArgumentException("The test param does not exist.", paramName); + } + + } + +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/TestHelper.cs b/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/TestHelper.cs new file mode 100644 index 000000000000..79c04b0b31a5 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/TestHelper.cs @@ -0,0 +1,177 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Diagnostics; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading; + +namespace MS.Test.Common.MsTestLib +{ + public class TestHelper + { + // default time out for runcmd + public const int RUNCMD_TIMEOUT_MS = 900000; + + public static int RunCmd(string cmd, string args) + { + return RunCmd(cmd, args, RUNCMD_TIMEOUT_MS); + } + + public static int RunCmd(string cmd, string args, out string stdout, out string stderr) + { + return RunCmd(cmd, args, out stdout, out stderr, RUNCMD_TIMEOUT_MS); + } + + public static int RunCmd(string cmd, string args, int timeout) + { + string stdout, stderr; + return RunCmd(cmd, args, out stdout, out stderr, timeout); + } + + public static int RunCmd(string cmd, string args, out string stdout, out string stderr, int timeout) + { + Test.Logger.Verbose("Running: {0} {1}", cmd, args); + ProcessStartInfo psi = new ProcessStartInfo(cmd, args); + psi.CreateNoWindow = true; + psi.WindowStyle = ProcessWindowStyle.Hidden; + psi.UseShellExecute = false; + psi.RedirectStandardError = true; + psi.RedirectStandardOutput = true; + Process p = Process.Start(psi); + // To avoid deadlock between Process.WaitForExit and Process output redirection buffer filled up, we need to async read output before calling Process.WaitForExit + StringBuilder outputBuffer = new StringBuilder(); + p.OutputDataReceived += (sendingProcess, outLine) => + { + if (!String.IsNullOrEmpty(outLine.Data)) + { + outputBuffer.Append(outLine.Data+"\n"); + } + }; + StringBuilder errorBuffer = new StringBuilder(); + p.ErrorDataReceived += (sendingProcess, outLine) => + { + if (!String.IsNullOrEmpty(outLine.Data)) + { + errorBuffer.Append(outLine.Data+"\n"); + } + }; + p.BeginOutputReadLine(); + p.BeginErrorReadLine(); + p.WaitForExit(timeout); + stdout = outputBuffer.ToString(); + stderr = errorBuffer.ToString(); + if (p.HasExited) + { + Test.Logger.Verbose("Stdout: {0}", stdout); + if (!string.IsNullOrEmpty(stderr) + && !string.Equals(stdout, stderr, StringComparison.InvariantCultureIgnoreCase)) + Test.Logger.Verbose("Stderr: {0}", stderr); + return p.ExitCode; + } + else + { + Test.Logger.Verbose("--Command timed out!"); + p.Kill(); + Test.Logger.Verbose("Stdout: {0}", stdout); + if (!string.IsNullOrEmpty(stderr) + && !string.Equals(stdout, stderr, StringComparison.InvariantCultureIgnoreCase)) + Test.Logger.Verbose("Stderr: {0}", stderr); + return int.MinValue; + } + } + public delegate bool RunningCondition(object arg); + /// + /// run cmd and specify the running condition. If running condition is not met, process will be terminated. + /// + public static int RunCmd(string cmd, string args, out string stdout, out string stderr, RunningCondition rc, object rcArg) + { + Test.Logger.Verbose("Running: {0} {1}", cmd, args); + ProcessStartInfo psi = new ProcessStartInfo(cmd, args); + psi.CreateNoWindow = true; + psi.WindowStyle = ProcessWindowStyle.Hidden; + psi.UseShellExecute = false; + psi.RedirectStandardError = true; + psi.RedirectStandardOutput = true; + Process p = Process.Start(psi); + // To avoid deadlock between Process.WaitForExit and Process output redirection buffer filled up, we need to async read output before calling Process.WaitForExit + StringBuilder outputBuffer = new StringBuilder(); + p.OutputDataReceived += (sendingProcess, outLine) => + { + if (!String.IsNullOrEmpty(outLine.Data)) + { + outputBuffer.Append(outLine.Data + "\n"); + } + }; + StringBuilder errorBuffer = new StringBuilder(); + p.ErrorDataReceived += (sendingProcess, outLine) => + { + if (!String.IsNullOrEmpty(outLine.Data)) + { + errorBuffer.Append(outLine.Data + "\n"); + } + }; + p.BeginOutputReadLine(); + p.BeginErrorReadLine(); + DateTime nowTime = DateTime.Now; + DateTime timeOut = nowTime.AddMilliseconds(RUNCMD_TIMEOUT_MS); + while (rc(rcArg)) + { + if (p.HasExited) + { + // process has existed + break; + } + else if (timeOut > DateTime.Now) + { + //time out + break; + } + else + { + //continue to wait + Thread.Sleep(100); + } + } + stdout = outputBuffer.ToString(); + stderr = errorBuffer.ToString(); + if (p.HasExited) + { + Test.Logger.Verbose("Stdout: {0}", stdout); + if (!string.IsNullOrEmpty(stderr) + && !string.Equals(stdout, stderr, StringComparison.InvariantCultureIgnoreCase)) + Test.Logger.Verbose("Stderr: {0}", stderr); + return p.ExitCode; + } + else + { + Test.Logger.Verbose("--Command timed out!"); + p.Kill(); + Test.Logger.Verbose("Stdout: {0}", stdout); + if (!string.IsNullOrEmpty(stderr) + && !string.Equals(stdout, stderr, StringComparison.InvariantCultureIgnoreCase)) + Test.Logger.Verbose("Stderr: {0}", stderr); + return int.MinValue; + } + } + public static bool StringMatch(string source, string pattern) + { + Regex r = new Regex(pattern); + Match m = r.Match(source); + return m.Success; + } + + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/TestLogger.cs b/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/TestLogger.cs new file mode 100644 index 000000000000..6258b482d241 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.MsTestLib/TestLogger.cs @@ -0,0 +1,157 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; + +namespace MS.Test.Common.MsTestLib +{ + /// + /// the wrapper for the loggers + /// + public class TestLogger + { + public List Loggers; + + public TestLogger() + { + Loggers = new List(); + + } + + public TestLogger(TestConfig testConfig) + { + Loggers = new List(); + Init(testConfig); + } + + public bool LogVerbose = false; + public bool LogInfo = true; + public bool LogWarning = false; + public bool LogError = true; + + public void Init(TestConfig testConfig) + { + bool consoleLogger = false; + bool fileLogger = true; + bool.TryParse(testConfig.TestParams["consolelogger"], out consoleLogger); + bool.TryParse(testConfig.TestParams["filelogger"], out fileLogger); + + string logfilePrefix =testConfig.TestParams["logfilename"]; + + if (consoleLogger) + { + Loggers.Add(new ConsoleLogger()); + } + if (fileLogger) + { + string fileNameString = logfilePrefix + Environment.UserName + "_" + Environment.MachineName + " " + DateTime.Now.ToString().Replace('/', '-').Replace(':', '_') + ".txt"; + Loggers.Add(new FileLogger(fileNameString)); + + } + + + bool.TryParse(testConfig.TestParams["loginfo"], out LogInfo); + bool.TryParse(testConfig.TestParams["logverbose"], out LogVerbose); + bool.TryParse(testConfig.TestParams["logerror"], out LogError); + bool.TryParse(testConfig.TestParams["logwarning"], out LogWarning); + + + } + + public void Error( + string msg, + params object[] objToLog) + { + foreach (ILogger logger in Loggers) + { + if (LogError) + { + logger.WriteError(msg, objToLog); + } + } + } + + + public void Info( + string msg, + params object[] objToLog) + { + foreach (ILogger logger in Loggers) + { + if (LogInfo) + { + logger.WriteInfo(msg, objToLog); + } + } + } + + + public void Warning( + string msg, + params object[] objToLog) + { + foreach (ILogger logger in Loggers) + { + if (LogWarning) + { + logger.WriteWarning(msg, objToLog); + } + } + } + + + public void Verbose( + string msg, + params object[] objToLog) + { + foreach (ILogger logger in Loggers) + { + if (LogVerbose) + { + logger.WriteVerbose(msg, objToLog); + } + } + } + + + public void StartTest(string testId) + { + foreach (ILogger logger in Loggers) + { + logger.StartTest(testId); + } + + } + + public void EndTest(string testId, TestResult testResult) + { + foreach (ILogger logger in Loggers) + { + logger.EndTest(testId, testResult); + } + + } + + public void Close() + { + foreach (ILogger logger in Loggers) + { + logger.Close(); + } + } + + + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Agent.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Agent.cs new file mode 100644 index 000000000000..dc6a1a32d7de --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Agent.cs @@ -0,0 +1,298 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using Microsoft.WindowsAzure.Storage.Blob; +using Microsoft.WindowsAzure.Storage.Queue; +using Microsoft.WindowsAzure.Storage.Table; +using MS.Test.Common.MsTestLib; + +namespace Commands.Storage.ScenarioTest +{ + public abstract class Agent + { + /// + /// output data returned after agent operation + /// + public Collection> Output { get { return _Output; } } + + /// + /// error messages returned after agent operation + /// + public Collection ErrorMessages { get { return _ErrorMessages; } } + + public bool UseContextParam + { + set {_UseContextParam = value;} + get {return _UseContextParam;} + } + + /// + /// Return true if succeed otherwise return false + /// + public abstract bool NewAzureStorageContainer(string ContainerName); + + /// + /// Parameters: + /// ContainerName: + /// 1. Could be empty if no Container parameter specified + /// 2. Could contain wildcards + /// + public abstract bool GetAzureStorageContainer(string ContainerName); + public abstract bool GetAzureStorageContainerByPrefix(string Prefix); + public abstract bool SetAzureStorageContainerACL(string ContainerName, BlobContainerPublicAccessType PublicAccess, bool PassThru = true); + public abstract bool RemoveAzureStorageContainer(string ContainerName, bool Force = true); + /// + /// For pipeline, new/remove a list of container names + /// + public abstract bool NewAzureStorageContainer(string[] ContainerNames); + public abstract bool RemoveAzureStorageContainer(string[] ContainerNames, bool Force = true); + + public abstract bool NewAzureStorageQueue(string QueueName); + /// + /// Parameters: + /// ContainerName: + /// 1. Could be empty if no Queue parameter specified + /// 2. Could contain wildcards + /// + public abstract bool GetAzureStorageQueue(string QueueName); + public abstract bool GetAzureStorageQueueByPrefix(string Prefix); + public abstract bool RemoveAzureStorageQueue(string QueueName, bool Force = true); + + /// + /// For pipeline, new/remove a list of queue names + /// + public abstract bool NewAzureStorageQueue(string[] QueueNames); + public abstract bool RemoveAzureStorageQueue(string[] QueueNames, bool Force = true); + + /// + /// Parameters: + /// Block: + /// true for BlockBlob, false for PageBlob + /// ConcurrentCount: + /// -1 means use the default value + /// + public abstract bool SetAzureStorageBlobContent(string FileName, string ContainerName, BlobType Type, string BlobName = "", + bool Force = true, int ConcurrentCount = -1, Hashtable properties = null, Hashtable metadata = null); + public abstract bool GetAzureStorageBlobContent(string Blob, string FileName, string ContainerName, + bool Force = true, int ConcurrentCount = -1); + public abstract bool GetAzureStorageBlob(string BlobName, string ContainerName); + public abstract bool GetAzureStorageBlobByPrefix(string Prefix, string ContainerName); + + /// + /// + /// Remarks: + /// currently there is no Force param, may add it later on + /// + public abstract bool RemoveAzureStorageBlob(string BlobName, string ContainerName, bool onlySnapshot = false, bool force = true); + + public abstract bool NewAzureStorageTable(string TableName); + public abstract bool NewAzureStorageTable(string[] TableNames); + public abstract bool GetAzureStorageTable(string TableName); + public abstract bool GetAzureStorageTableByPrefix(string Prefix); + public abstract bool RemoveAzureStorageTable(string TableName, bool Force = true); + public abstract bool RemoveAzureStorageTable(string[] TableNames, bool Force = true); + + public abstract bool NewAzureStorageContext(string StorageAccountName, string StorageAccountKey, string endPoint = ""); + public abstract bool NewAzureStorageContext(string ConnectionString); + + public abstract bool StartAzureStorageBlobCopy(string sourceUri, string destContainerName, string destBlobName, object destContext, bool force = true); + public abstract bool StartAzureStorageBlobCopy(string srcContainerName, string srcBlobName, string destContainerName, string destBlobName, object destContext = null, bool force = true); + public abstract bool StartAzureStorageBlobCopy(ICloudBlob srcBlob, string destContainerName, string destBlobName, object destContext = null, bool force = true); + + public abstract bool GetAzureStorageBlobCopyState(string containerName, string blobName, bool waitForComplete); + public abstract bool GetAzureStorageBlobCopyState(ICloudBlob blob, object context, bool waitForComplete); + public abstract bool StopAzureStorageBlobCopy(string containerName, string blobName, string copyId, bool force); + + /// + /// Compare the output collection data with comp + /// + /// Parameters: + /// comp: comparsion data + /// + public void OutputValidation(Collection> comp) + { + Test.Info("Validate Dictionary objects"); + Test.Assert(comp.Count == Output.Count, "Comparison size: {0} = {1} Output size", comp.Count, Output.Count); + if (comp.Count != Output.Count) + return; + + // first check whether Key exists and then check value if it's not null + for (int i = 0; i < comp.Count; ++i) + { + foreach (string str in comp[i].Keys) + { + Test.Assert(Output[i].ContainsKey(str), "{0} should be in the ouput columns", str); + + switch(str) + { + case "Context": + break; + + case "CloudTable": + Test.Assert(Utility.CompareEntity((CloudTable)comp[i][str], (CloudTable)Output[i][str]), + "CloudTable Column {0}: {1} = {2}", str, comp[i][str], Output[i][str]); + break; + + case "CloudQueue": + Test.Assert(Utility.CompareEntity((CloudQueue)comp[i][str], (CloudQueue)Output[i][str]), + "CloudQueue Column {0}: {1} = {2}", str, comp[i][str], Output[i][str]); + break; + + case "CloudBlobContainer": + Test.Assert(Utility.CompareEntity((CloudBlobContainer)comp[i][str], (CloudBlobContainer)Output[i][str]), + "CloudBlobContainer Column {0}: {1} = {2}", str, comp[i][str], Output[i][str]); + break; + + case "ICloudBlob": + Test.Assert(Utility.CompareEntity((ICloudBlob)comp[i][str], (ICloudBlob)Output[i][str]), + "ICloudBlob Column {0}: {1} = {2}", str, comp[i][str], Output[i][str]); + break; + + case "Permission": + Test.Assert(Utility.CompareEntity((BlobContainerPermissions)comp[i][str], (BlobContainerPermissions)Output[i][str]), + "Permission Column {0}: {1} = {2}", str, comp[i][str], Output[i][str]); + break; + + default: + + if(comp[i][str] == null) + { + Test.Assert(Output[i][str] == null, "Column {0}: {1} = {2}", str, comp[i][str], Output[i][str]); + } + else + { + Test.Assert(comp[i][str].Equals(Output[i][str]), "Column {0}: {1} = {2}", str, comp[i][str], Output[i][str]); + } + + break; + } + } + } + } + + /// + /// Compare the output collection data with containers + /// + /// Parameters: + /// containers: comparsion data + /// + public void OutputValidation(IEnumerable containers) + { + Test.Info("Validate CloudBlobContainer objects"); + Test.Assert(containers.Count() == Output.Count, "Comparison size: {0} = {1} Output size", containers.Count(), Output.Count); + if (containers.Count() != Output.Count) + return; + + int count = 0; + foreach (CloudBlobContainer container in containers) + { + container.FetchAttributes(); + Test.Assert(Utility.CompareEntity(container, (CloudBlobContainer)Output[count]["CloudBlobContainer"]), "container equality checking: {0}", container.Name); + ++count; + } + } + + /// + /// Compare the output collection data with container permissions + /// + /// a list of cloudblobcontainer objects + public void OutputValidation(IEnumerable permissions) + { + Test.Info("Validate BlobContainerPermissions"); + Test.Assert(permissions.Count() == Output.Count, "Comparison size: {0} = {1} Output size", permissions.Count(), Output.Count); + if (permissions.Count() != Output.Count) + return; + + int count = 0; + foreach (BlobContainerPermissions permission in permissions) + { + Test.Assert(Utility.CompareEntity(permission, (BlobContainerPermissions)Output[count]["Permission"]), "container permision equality checking "); + ++count; + } + } + + /// + /// Compare the output collection data with ICloudBlob + /// + /// a list of cloudblobcontainer objects + public void OutputValidation(IEnumerable blobs) + { + Test.Info("Validate ICloudBlob objects"); + Test.Assert(blobs.Count() == Output.Count, "Comparison size: {0} = {1} Output size", blobs.Count(), Output.Count); + if (blobs.Count() != Output.Count) + return; + + int count = 0; + foreach (ICloudBlob blob in blobs) + { + Test.Assert(Utility.CompareEntity(blob, (ICloudBlob)Output[count]["ICloudBlob"]), string.Format("ICloudBlob equality checking for blob '{0}'", blob.Name)); + ++count; + } + } + + + /// + /// Compare the output collection data with queues + /// + /// Parameters: + /// queues: comparsion data + /// + public void OutputValidation(IEnumerable queues) + { + Test.Info("Validate CloudQueue objects"); + Test.Assert(queues.Count() == Output.Count, "Comparison size: {0} = {1} Output size", queues.Count(), Output.Count); + if (queues.Count() != Output.Count) + return; + + int count = 0; + foreach (CloudQueue queue in queues) + { + queue.FetchAttributes(); + Test.Assert(Utility.CompareEntity(queue, (CloudQueue)Output[count]["CloudQueue"]), "queue equality checking: {0}", queue.Name); + ++count; + } + } + + /// + /// Compare the output collection data with tables + /// + /// Parameters: + /// tables: comparsion data + /// + public void OutputValidation(IEnumerable tables) + { + Test.Info("Validate CloudTable objects"); + Test.Assert(tables.Count() == Output.Count, "Comparison size: {0} = {1} Output size", tables.Count(), Output.Count); + if (tables.Count() != Output.Count) + return; + + int count = 0; + foreach (CloudTable table in tables) + { + Test.Assert(Utility.CompareEntity(table, (CloudTable)Output[count]["CloudTable"]), "table equality checking: {0}", table.Name); + ++count; + } + } + + protected static Random _random = new Random((int)(DateTime.Now.Ticks)); // for generating random object names + protected Collection> _Output = new Collection>(); + protected Collection _ErrorMessages = new Collection(); + protected bool _UseContextParam = true; // decide whether to specify the Context parameter + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/AssemblyInitCleanup.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/AssemblyInitCleanup.cs new file mode 100644 index 000000000000..1cb68d1e543c --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/AssemblyInitCleanup.cs @@ -0,0 +1,43 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.VisualStudio.TestTools.UnitTesting; +using MS.Test.Common.MsTestLib; + +namespace DataMovementTest +{ + [TestClass] + public class AssemblyInitCleanup + { + [AssemblyInitialize] + public static void TestInit(TestContext testContext) + { + // init loggers and load test config data + Test.Init(); + // set the assertfail delegate to report failure in VS + Test.AssertFail = new AssertFailDelegate(Assert.Fail); + + } + + [AssemblyCleanup] + public static void TestCleanup() + { + + //close loggers + Test.Close(); + + + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/CLICommonBVT.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/CLICommonBVT.cs new file mode 100644 index 000000000000..1a574d0a661f --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/CLICommonBVT.cs @@ -0,0 +1,971 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Diagnostics; +using System.IO; +using Commands.Storage.ScenarioTest.Util; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Queue; +using Microsoft.WindowsAzure.Storage.Table; +using MS.Test.Common.MsTestLib; +using StorageTestLib; +using StorageBlob = Microsoft.WindowsAzure.Storage.Blob; + +namespace Commands.Storage.ScenarioTest.BVT +{ + /// + /// this class contain all the bvt cases for the full functional storage context such as local/connectionstring/namekey, anonymous and sas token are excluded. + /// + //TODO use the TestBase as the base class + internal class CLICommonBVT + { + private static CloudBlobHelper CommonBlobHelper; + private static CloudStorageAccount CommonStorageAccount; + private static string CommonBlockFilePath; + private static string CommonPageFilePath; + + //env connection string + private static string SavedEnvString; + public static string EnvKey; + + /// + /// the storage account which is used to set up the unit tests. + /// + protected static CloudStorageAccount SetUpStorageAccount + { + get + { + return CommonStorageAccount; + } + + set + { + CommonStorageAccount = value; + } + } + private TestContext testContextInstance; + + /// + ///Gets or sets the test context which provides + ///information about and functionality for the current test run. + /// + public TestContext TestContext + { + get + { + return testContextInstance; + } + set + { + testContextInstance = value; + } + } + + #region Additional test attributes + + public CLICommonBVT() + { + } + + //TODO remove it if it's useless + public CLICommonBVT(CloudStorageAccount StorageAccount, TestContext testContext) + { + CommonStorageAccount = StorageAccount; + testContextInstance = testContext; + + //init the blob helper for blob related operations + CommonBlobHelper = new CloudBlobHelper(CommonStorageAccount); + GenerateBvtTempFiles(); + } + + /// + /// Init test resources for bvt class + /// + /// TestContext object + [ClassInitialize()] + public static void CLICommonBVTInitialize(TestContext testContext) + { + Test.Info(string.Format("{0} Class Initialize", testContext.FullyQualifiedTestClassName)); + Test.FullClassName = testContext.FullyQualifiedTestClassName; + EnvKey = Test.Data.Get("EnvContextKey"); + SaveAndCleanSubScriptionAndEnvConnectionString(); + + //init the blob helper for blob related operations + CommonBlobHelper = new CloudBlobHelper(CommonStorageAccount); + + //Clean Storage Context + Test.Info("Clean storage context in PowerShell"); + PowerShellAgent.CleanStorageContext(); + + // import module + string moduleFilePath = Test.Data.Get("ModuleFilePath"); + PowerShellAgent.ImportModule(moduleFilePath); + GenerateBvtTempFiles(); + } + + /// + /// Save azure subscription and env connection string. So the current settings can't impact our tests. + /// + //TODO move to TestBase + public static void SaveAndCleanSubScriptionAndEnvConnectionString() + { + Test.Info("Clean Azure Subscription and save env connection string"); + //can't restore the azure subscription files + PowerShellAgent.RemoveAzureSubscriptionIfExists(); + + //set env connection string + //TODO A little bit trivial, move to CLITestBase class + if (string.IsNullOrEmpty(EnvKey)) + { + EnvKey = Test.Data.Get("EnvContextKey"); + } + + SavedEnvString = System.Environment.GetEnvironmentVariable(EnvKey); + System.Environment.SetEnvironmentVariable(EnvKey, string.Empty); + } + + /// + /// Restore the previous subscription and env connection string before testing. + /// + public static void RestoreSubScriptionAndEnvConnectionString() + { + Test.Info("Restore env connection string and skip restore subscription"); + System.Environment.SetEnvironmentVariable(EnvKey, SavedEnvString); + } + + /// + /// Generate temp files + /// + private static void GenerateBvtTempFiles() + { + CommonBlockFilePath = Path.Combine(Test.Data.Get("TempDir"), FileUtil.GetSpecialFileName()); + CommonPageFilePath = Path.Combine(Test.Data.Get("TempDir"), FileUtil.GetSpecialFileName()); + FileUtil.CreateDirIfNotExits(Path.GetDirectoryName(CommonBlockFilePath)); + FileUtil.CreateDirIfNotExits(Path.GetDirectoryName(CommonPageFilePath)); + // Generate block file and page file which are used for uploading + Helper.GenerateMediumFile(CommonBlockFilePath, 1); + Helper.GenerateMediumFile(CommonPageFilePath, 1); + } + + /// + /// Clean up test resources of bvt class + /// + [ClassCleanup()] + public static void CLICommonBVTCleanup() + { + Test.Info(string.Format("BVT Test Class Cleanup")); + RestoreSubScriptionAndEnvConnectionString(); + } + + /// + /// init test resources for one single unit test. + /// + [TestInitialize()] + public void UnitTestInitialize() + { + Trace.WriteLine("Unit Test Initialize"); + Test.Start(TestContext.FullyQualifiedTestClassName, TestContext.TestName); + } + + /// + /// clean up the test resources for one single unit test. + /// + [TestCleanup()] + public void UnitTestCleanup() + { + Trace.WriteLine("Unit Test Cleanup"); + Test.End(TestContext.FullyQualifiedTestClassName, TestContext.TestName); + } + + #endregion + + /// + /// BVT case : for New-AzureStorageContainer + /// + [TestMethod] + [TestCategory(Tag.BVT)] + [TestCategory(PsTag.FastEnv)] + public void NewContainerTest() + { + NewContainerTest(new PowerShellAgent()); + } + + /// + /// BVT case : for Get-AzureStorageContainer + /// + [TestMethod] + [TestCategory(Tag.BVT)] + public void GetContainerTest() + { + GetContainerTest(new PowerShellAgent()); + } + + /// + /// BVT case : for Remove-AzureStorageContainer + /// + [TestMethod] + [TestCategory(Tag.BVT)] + public void RemoveContainerTest() + { + RemoveContainerTest(new PowerShellAgent()); + } + + /// + /// BVT case : for Set-AzureStorageContainerACL + /// + [TestMethod] + [TestCategory(Tag.BVT)] + public void SetContainerACLTest() + { + SetContainerACLTest(new PowerShellAgent()); + } + + /// + /// BVT case : for New-AzureStorageTable + /// + [TestMethod] + [TestCategory(Tag.BVT)] + public void NewTableTest() + { + NewTableTest(new PowerShellAgent()); + } + + /// + /// BVT case : for Get-AzureStorageTable + /// + [TestMethod] + [TestCategory(Tag.BVT)] + public void GetTableTest() + { + GetTableTest(new PowerShellAgent()); + } + + /// + /// BVT case : for Remove-AzureStorageTable + /// + [TestMethod] + [TestCategory(Tag.BVT)] + public void RemoveTableTest() + { + RemoveTableTest(new PowerShellAgent()); + } + + /// + /// BVT case : for New-AzureStorageQueue + /// + [TestMethod] + [TestCategory(Tag.BVT)] + public void NewQueueTest() + { + NewQueueTest(new PowerShellAgent()); + } + + /// + /// BVT case : for Get-AzureStorageQueue + /// + [TestMethod] + [TestCategory(Tag.BVT)] + public void GetQueueTest() + { + GetQueueTest(new PowerShellAgent()); + } + + /// + /// BVT case : for Remove-AzureStorageQueue + /// + [TestMethod] + [TestCategory(Tag.BVT)] + public void RemoveQueueTest() + { + RemoveQueueTest(new PowerShellAgent()); + } + + /// + /// BVT case : for Set-AzureStorageBlobContent + /// + [TestMethod] + [TestCategory(Tag.BVT)] + public void UploadBlobTest() + { + UploadBlobTest(new PowerShellAgent(), CommonBlockFilePath, Microsoft.WindowsAzure.Storage.Blob.BlobType.BlockBlob); + UploadBlobTest(new PowerShellAgent(), CommonPageFilePath, Microsoft.WindowsAzure.Storage.Blob.BlobType.PageBlob); + } + + /// + /// BVT case : for Get-AzureStorageBlob + /// + [TestMethod] + [TestCategory(Tag.BVT)] + public void GetBlobTest() + { + GetBlobTest(new PowerShellAgent(), CommonBlockFilePath, Microsoft.WindowsAzure.Storage.Blob.BlobType.BlockBlob); + GetBlobTest(new PowerShellAgent(), CommonPageFilePath, Microsoft.WindowsAzure.Storage.Blob.BlobType.PageBlob); + } + + /// + /// BVT case : for Get-AzureStorageBlobContent + /// + [TestMethod] + [TestCategory(Tag.BVT)] + public void DownloadBlobTest() + { + string downloadDirPath = Test.Data.Get("DownloadDir"); + FileUtil.CreateDirIfNotExits(downloadDirPath); + DownloadBlobTest(new PowerShellAgent(), CommonBlockFilePath, downloadDirPath, Microsoft.WindowsAzure.Storage.Blob.BlobType.BlockBlob); + DownloadBlobTest(new PowerShellAgent(), CommonPageFilePath, downloadDirPath, Microsoft.WindowsAzure.Storage.Blob.BlobType.PageBlob); + } + + /// + /// BVT case : for Remove-AzureStorageBlob + /// + [TestMethod] + [TestCategory(Tag.BVT)] + public void RemoveBlobTest() + { + RemoveBlobTest(new PowerShellAgent(), CommonBlockFilePath, Microsoft.WindowsAzure.Storage.Blob.BlobType.BlockBlob); + RemoveBlobTest(new PowerShellAgent(), CommonPageFilePath, Microsoft.WindowsAzure.Storage.Blob.BlobType.PageBlob); + } + + /// + /// BVT case : for Start-AzureStorageBlobCopy + /// + [TestMethod] + [TestCategory(Tag.BVT)] + public void StartCopyBlobUsingName() + { + StartCopyBlobTest(new PowerShellAgent(), false); + } + + /// + /// BVT case : for Start-AzureStorageBlobCopy + /// + [TestMethod] + [TestCategory(Tag.BVT)] + public void StartCopyBlobUsingUri() + { + StartCopyBlobTest(new PowerShellAgent(), true); + } + + /// + /// BVT case : for Get-AzureStorageBlobCopyState + /// + [TestMethod] + [TestCategory(Tag.BVT)] + public void GetBlobCopyStateTest() + { + CloudBlobUtil blobUtil = new CloudBlobUtil(CommonStorageAccount); + blobUtil.SetupTestContainerAndBlob(); + StorageBlob.ICloudBlob destBlob = CopyBlobAndWaitForComplete(blobUtil); + + try + { + Test.Assert(destBlob.CopyState.Status == StorageBlob.CopyStatus.Success, String.Format("The blob copy using storage client should be success, actually it's {0}", destBlob.CopyState.Status)); + + PowerShellAgent agent = new PowerShellAgent(); + Test.Assert(agent.GetAzureStorageBlobCopyState(blobUtil.ContainerName, destBlob.Name, false), "Get copy state should be success"); + int expectedStateCount = 1; + Test.Assert(agent.Output.Count == expectedStateCount, String.Format("Expected to get {0} copy state, actually it's {1}", expectedStateCount, agent.Output.Count)); + StorageBlob.CopyStatus copyStatus = (StorageBlob.CopyStatus)agent.Output[0]["Status"]; + Test.Assert(copyStatus == StorageBlob.CopyStatus.Success, String.Format("The blob copy should be success, actually it's {0}", copyStatus)); + Uri sourceUri = (Uri)agent.Output[0]["Source"]; + string expectedUri = CloudBlobUtil.ConvertCopySourceUri(blobUtil.Blob.Uri.ToString()); + Test.Assert(sourceUri.ToString() == expectedUri, String.Format("Expected source uri is {0}, actully it's {1}", expectedUri, sourceUri.ToString())); + + Test.Assert(!agent.GetAzureStorageBlobCopyState(blobUtil.ContainerName, blobUtil.BlobName, false), "Get copy state should be fail since the specified blob don't have any copy operation"); + Test.Assert(agent.ErrorMessages.Count > 0, "Should return error message"); + string errorMessage = "Can not find copy task on specified blob"; + Test.Assert(agent.ErrorMessages[0].StartsWith(errorMessage), String.Format("Error message should start with {0}, and actually it's {1}", errorMessage, agent.ErrorMessages[0])); + } + finally + { + blobUtil.CleanupTestContainerAndBlob(); + } + } + + /// + /// BVT case : for Stop-AzureStorageBlobCopy + /// + [TestMethod] + [TestCategory(Tag.BVT)] + public void StopCopyBlobTest() + { + CloudBlobUtil blobUtil = new CloudBlobUtil(CommonStorageAccount); + blobUtil.SetupTestContainerAndBlob(); + StorageBlob.ICloudBlob destBlob = CopyBlobAndWaitForComplete(blobUtil); + + try + { + PowerShellAgent agent = new PowerShellAgent(); + string copyId = Guid.NewGuid().ToString(); + Test.Assert(!agent.StopAzureStorageBlobCopy(blobUtil.ContainerName, blobUtil.BlobName, copyId, true), "Stop copy operation should be fail since the specified blob don't have any copy operation"); + Test.Assert(agent.ErrorMessages.Count > 0, "Should return error message"); + string errorMessage = String.Format("Can not find copy task on specified blob '{0}' in container '{1}'", blobUtil.BlobName, blobUtil.ContainerName); + Test.Assert(agent.ErrorMessages[0].IndexOf(errorMessage) != -1, String.Format("Error message should contain {0}, and actually it's {1}", errorMessage, agent.ErrorMessages[0])); + + errorMessage = "There is currently no pending copy operation."; + Test.Assert(!agent.StopAzureStorageBlobCopy(blobUtil.ContainerName, destBlob.Name, copyId, true), "Stop copy operation should be fail since the specified copy operation has finished"); + Test.Assert(agent.ErrorMessages.Count > 0, "Should return error message"); + Test.Assert(agent.ErrorMessages[0].IndexOf(errorMessage) != -1, String.Format("Error message should contain {0}, and actually it's {1}", errorMessage, agent.ErrorMessages[0])); + } + finally + { + blobUtil.CleanupTestContainerAndBlob(); + } + } + + + internal StorageBlob.ICloudBlob CopyBlobAndWaitForComplete(CloudBlobUtil blobUtil) + { + string destBlobName = Utility.GenNameString("copystate"); + + StorageBlob.ICloudBlob destBlob = default(StorageBlob.ICloudBlob); + + Test.Info("Copy Blob using storage client"); + + if (blobUtil.Blob.BlobType == StorageBlob.BlobType.BlockBlob) + { + StorageBlob.CloudBlockBlob blockBlob = blobUtil.Container.GetBlockBlobReference(destBlobName); + blockBlob.StartCopyFromBlob((StorageBlob.CloudBlockBlob)blobUtil.Blob); + destBlob = blockBlob; + } + else + { + StorageBlob.CloudPageBlob pageBlob = blobUtil.Container.GetPageBlobReference(destBlobName); + pageBlob.StartCopyFromBlob((StorageBlob.CloudPageBlob)blobUtil.Blob); + destBlob = pageBlob; + } + + CloudBlobUtil.WaitForCopyOperationComplete(destBlob); + + Test.Assert(destBlob.CopyState.Status == StorageBlob.CopyStatus.Success, String.Format("The blob copy using storage client should be success, actually it's {0}", destBlob.CopyState.Status)); + + return destBlob; + } + + internal void StartCopyBlobTest(Agent agent, bool useUri) + { + CloudBlobUtil blobUtil = new CloudBlobUtil(CommonStorageAccount); + blobUtil.SetupTestContainerAndBlob(); + string copiedName = Utility.GenNameString("copied"); + + if(useUri) + { + //Set the blob permission, so the copy task could directly copy by uri + StorageBlob.BlobContainerPermissions permission = new StorageBlob.BlobContainerPermissions(); + permission.PublicAccess = StorageBlob.BlobContainerPublicAccessType.Blob; + blobUtil.Container.SetPermissions(permission); + } + + try + { + if(useUri) + { + Test.Assert(agent.StartAzureStorageBlobCopy(blobUtil.Blob.Uri.ToString(), blobUtil.ContainerName, copiedName, PowerShellAgent.Context), Utility.GenComparisonData("Start copy blob using source uri", true)); + } + else + { + Test.Assert(agent.StartAzureStorageBlobCopy(blobUtil.ContainerName, blobUtil.BlobName, blobUtil.ContainerName, copiedName), Utility.GenComparisonData("Start copy blob using blob name", true)); + } + + Test.Info("Get destination blob in copy task"); + StorageBlob.ICloudBlob blob = blobUtil.Container.GetBlobReferenceFromServer(copiedName); + Test.Assert(blob != null, "Destination blob should exist after start copy. If not, please check it's a test issue or dev issue."); + + string sourceUri = CloudBlobUtil.ConvertCopySourceUri(blobUtil.Blob.Uri.ToString()); + + Test.Assert(blob.BlobType == blobUtil.Blob.BlobType, String.Format("The destination blob type should be {0}, actually {1}.", blobUtil.Blob.BlobType, blob.BlobType)); + + Test.Assert(blob.CopyState.Source.ToString().StartsWith(sourceUri), String.Format("The source of destination blob should start with {0}, and actually it's {1}", sourceUri, blob.CopyState.Source.ToString())); + } + finally + { + blobUtil.CleanupTestContainerAndBlob(); + } + } + + internal void NewContainerTest(Agent agent) + { + string NEW_CONTAINER_NAME = Utility.GenNameString("astoria-"); + + Dictionary dic = Utility.GenComparisonData(StorageObjectType.Container, NEW_CONTAINER_NAME); + Collection> comp = new Collection>{dic}; + + // delete container if it exists + StorageBlob.CloudBlobContainer container = CommonStorageAccount.CreateCloudBlobClient().GetContainerReference(NEW_CONTAINER_NAME); + container.DeleteIfExists(); + + try + { + //--------------New operation-------------- + Test.Assert(agent.NewAzureStorageContainer(NEW_CONTAINER_NAME), Utility.GenComparisonData("NewAzureStorageContainer", true)); + // Verification for returned values + CloudBlobUtil.PackContainerCompareData(container, dic); + agent.OutputValidation(comp); + Test.Assert(container.Exists(), "container {0} should exist!", NEW_CONTAINER_NAME); + } + finally + { + // clean up + container.DeleteIfExists(); + } + } + + internal void GetContainerTest(Agent agent) + { + string NEW_CONTAINER_NAME = Utility.GenNameString("astoria-"); + + Dictionary dic = Utility.GenComparisonData(StorageObjectType.Container, NEW_CONTAINER_NAME); + + // create container if it does not exist + StorageBlob.CloudBlobContainer container = CommonStorageAccount.CreateCloudBlobClient().GetContainerReference(NEW_CONTAINER_NAME); + container.CreateIfNotExists(); + + Collection> comp = new Collection> { dic }; + + try + { + //--------------Get operation-------------- + Test.Assert(agent.GetAzureStorageContainer(NEW_CONTAINER_NAME), Utility.GenComparisonData("GetAzureStorageContainer", true)); + // Verification for returned values + container.FetchAttributes(); + dic.Add("CloudBlobContainer", container); + CloudBlobUtil.PackContainerCompareData(container, dic); + + agent.OutputValidation(comp); + } + finally + { + // clean up + container.DeleteIfExists(); + } + } + + internal void RemoveContainerTest(Agent agent) + { + string NEW_CONTAINER_NAME = Utility.GenNameString("astoria-"); + + // create container if it does not exist + StorageBlob.CloudBlobContainer container = CommonStorageAccount.CreateCloudBlobClient().GetContainerReference(NEW_CONTAINER_NAME); + container.CreateIfNotExists(); + + try + { + //--------------Remove operation-------------- + Test.Assert(agent.RemoveAzureStorageContainer(NEW_CONTAINER_NAME), Utility.GenComparisonData("RemoveAzureStorageContainer", true)); + Test.Assert(!container.Exists(), "container {0} should not exist!", NEW_CONTAINER_NAME); + } + finally + { + // clean up + container.DeleteIfExists(); + } + } + + internal void SetContainerACLTest(Agent agent) + { + string NEW_CONTAINER_NAME = Utility.GenNameString("astoria-"); + + Collection> comp = new Collection>(); + Dictionary dic = Utility.GenComparisonData(StorageObjectType.Container, NEW_CONTAINER_NAME); + comp.Add(dic); + + // create container if it does not exist + StorageBlob.CloudBlobContainer container = CommonStorageAccount.CreateCloudBlobClient().GetContainerReference(NEW_CONTAINER_NAME); + container.CreateIfNotExists(); + + try + { + StorageBlob.BlobContainerPublicAccessType[] accessTypes = new StorageBlob.BlobContainerPublicAccessType[] { + StorageBlob.BlobContainerPublicAccessType.Blob, + StorageBlob.BlobContainerPublicAccessType.Container, + StorageBlob.BlobContainerPublicAccessType.Off + }; + + // set PublicAccess as one value respetively + foreach (var accessType in accessTypes) + { + //--------------Set operation-------------- + Test.Assert(agent.SetAzureStorageContainerACL(NEW_CONTAINER_NAME, accessType), + "SetAzureStorageContainerACL operation should succeed"); + // Verification for returned values + dic["PublicAccess"] = accessType; + CloudBlobUtil.PackContainerCompareData(container, dic); + agent.OutputValidation(comp); + + Test.Assert(container.GetPermissions().PublicAccess == accessType, + "PublicAccess should be equal: {0} = {1}", container.GetPermissions().PublicAccess, accessType); + } + } + finally + { + // clean up + container.DeleteIfExists(); + } + } + + internal void NewTableTest(Agent agent) + { + string NEW_TABLE_NAME = Utility.GenNameString("Washington"); + Dictionary dic = Utility.GenComparisonData(StorageObjectType.Table, NEW_TABLE_NAME); + Collection> comp = new Collection> { dic }; + + // delete table if it exists + CloudTable table = CommonStorageAccount.CreateCloudTableClient().GetTableReference(NEW_TABLE_NAME); + table.DeleteIfExists(); + + try + { + //--------------New operation-------------- + Test.Assert(agent.NewAzureStorageTable(NEW_TABLE_NAME), Utility.GenComparisonData("NewAzureStorageTable", true)); + // Verification for returned values + dic.Add("CloudTable", table); + agent.OutputValidation(comp); + Test.Assert(table.Exists(), "table {0} should exist!", NEW_TABLE_NAME); + } + finally + { + table.DeleteIfExists(); + } + } + + internal void GetTableTest(Agent agent) + { + string NEW_TABLE_NAME = Utility.GenNameString("Washington"); + Dictionary dic = Utility.GenComparisonData(StorageObjectType.Table, NEW_TABLE_NAME); + Collection> comp = new Collection> {dic}; + + // create table if it does not exist + CloudTable table = CommonStorageAccount.CreateCloudTableClient().GetTableReference(NEW_TABLE_NAME); + table.CreateIfNotExists(); + + dic.Add("CloudTable", table); + + try + { + //--------------Get operation-------------- + Test.Assert(agent.GetAzureStorageTable(NEW_TABLE_NAME), Utility.GenComparisonData("GetAzureStorageTable", true)); + // Verification for returned values + agent.OutputValidation(comp); + } + finally + { + // clean up + table.DeleteIfExists(); + } + } + + internal void RemoveTableTest(Agent agent) + { + string NEW_TABLE_NAME = Utility.GenNameString("Washington"); + + // create table if it does not exist + CloudTable table = CommonStorageAccount.CreateCloudTableClient().GetTableReference(NEW_TABLE_NAME); + table.CreateIfNotExists(); + + try + { + //--------------Remove operation-------------- + Test.Assert(agent.RemoveAzureStorageTable(NEW_TABLE_NAME), Utility.GenComparisonData("RemoveAzureStorageTable", true)); + Test.Assert(!table.Exists(), "queue {0} should not exist!", NEW_TABLE_NAME); + } + finally + { + // clean up + table.DeleteIfExists(); + } + } + + internal void NewQueueTest(Agent agent) + { + string NEW_QUEUE_NAME = Utility.GenNameString("redmond-"); + Dictionary dic = Utility.GenComparisonData(StorageObjectType.Queue, NEW_QUEUE_NAME); + Collection> comp = new Collection>{ dic }; + + CloudQueue queue = CommonStorageAccount.CreateCloudQueueClient().GetQueueReference(NEW_QUEUE_NAME); + // delete queue if it exists + queue.DeleteIfExists(); + + try + { + //--------------New operation-------------- + Test.Assert(agent.NewAzureStorageQueue(NEW_QUEUE_NAME), Utility.GenComparisonData("NewAzureStorageQueue", true)); + dic.Add("CloudQueue", queue); + dic["ApproximateMessageCount"] = null; + + // Verification for returned values + agent.OutputValidation(comp); + Test.Assert(queue.Exists(), "queue {0} should exist!", NEW_QUEUE_NAME); + } + finally + { + // clean up + queue.DeleteIfExists(); + } + } + + internal void GetQueueTest(Agent agent) + { + string NEW_QUEUE_NAME = Utility.GenNameString("redmond-"); + Dictionary dic = Utility.GenComparisonData(StorageObjectType.Queue, NEW_QUEUE_NAME); + Collection> comp = new Collection> { dic }; + + CloudQueue queue = CommonStorageAccount.CreateCloudQueueClient().GetQueueReference(NEW_QUEUE_NAME); + // create queue if it does exist + queue.CreateIfNotExists(); + + dic.Add("CloudQueue", queue); + try + { + //--------------Get operation-------------- + Test.Assert(agent.GetAzureStorageQueue(NEW_QUEUE_NAME), Utility.GenComparisonData("GetAzureStorageQueue", true)); + // Verification for returned values + queue.FetchAttributes(); + agent.OutputValidation(comp); + } + finally + { + // clean up + queue.DeleteIfExists(); + } + } + + internal void RemoveQueueTest(Agent agent) + { + string NEW_QUEUE_NAME = Utility.GenNameString("redmond-"); + + // create queue if it does exist + CloudQueue queue = CommonStorageAccount.CreateCloudQueueClient().GetQueueReference(NEW_QUEUE_NAME); + queue.CreateIfNotExists(); + + try + { + //--------------Remove operation-------------- + Test.Assert(agent.RemoveAzureStorageQueue(NEW_QUEUE_NAME), Utility.GenComparisonData("RemoveAzureStorageQueue", true)); + Test.Assert(!queue.Exists(), "queue {0} should not exist!", NEW_QUEUE_NAME); + } + finally + { + // clean up + queue.DeleteIfExists(); + } + } + + /// + /// Parameters: + /// Block: + /// True for BlockBlob, false for PageBlob + /// + internal void UploadBlobTest(Agent agent, string UploadFilePath, Microsoft.WindowsAzure.Storage.Blob.BlobType Type) + { + string NEW_CONTAINER_NAME = Utility.GenNameString("upload-"); + string blobName = Path.GetFileName(UploadFilePath); + + Collection> comp = new Collection>(); + Dictionary dic = Utility.GenComparisonData(StorageObjectType.Blob, blobName); + + dic["BlobType"] = Type; + comp.Add(dic); + + // create the container + StorageBlob.CloudBlobContainer container = CommonStorageAccount.CreateCloudBlobClient().GetContainerReference(NEW_CONTAINER_NAME); + container.CreateIfNotExists(); + + try + { + //--------------Upload operation-------------- + Test.Assert(agent.SetAzureStorageBlobContent(UploadFilePath, NEW_CONTAINER_NAME, Type), Utility.GenComparisonData("SendAzureStorageBlob", true)); + + StorageBlob.ICloudBlob blob = CommonBlobHelper.QueryBlob(NEW_CONTAINER_NAME, blobName); + CloudBlobUtil.PackBlobCompareData(blob, dic); + // Verification for returned values + agent.OutputValidation(comp); + Test.Assert(blob != null && blob.Exists(), "blob " + blobName + " should exist!"); + } + finally + { + // cleanup + container.DeleteIfExists(); + } + } + + /// + /// Parameters: + /// Block: + /// True for BlockBlob, false for PageBlob + /// + internal void GetBlobTest(Agent agent, string UploadFilePath, Microsoft.WindowsAzure.Storage.Blob.BlobType Type) + { + string NEW_CONTAINER_NAME = Utility.GenNameString("upload-"); + string blobName = Path.GetFileName(UploadFilePath); + + Collection> comp = new Collection>(); + Dictionary dic = Utility.GenComparisonData(StorageObjectType.Blob, blobName); + + dic["BlobType"] = Type; + comp.Add(dic); + + // create the container + StorageBlob.CloudBlobContainer container = CommonStorageAccount.CreateCloudBlobClient().GetContainerReference(NEW_CONTAINER_NAME); + container.CreateIfNotExists(); + + try + { + bool bSuccess = false; + // upload the blob file + if (Type == Microsoft.WindowsAzure.Storage.Blob.BlobType.BlockBlob) + bSuccess = CommonBlobHelper.UploadFileToBlockBlob(NEW_CONTAINER_NAME, blobName, UploadFilePath); + else if (Type == Microsoft.WindowsAzure.Storage.Blob.BlobType.PageBlob) + bSuccess = CommonBlobHelper.UploadFileToPageBlob(NEW_CONTAINER_NAME, blobName, UploadFilePath); + Test.Assert(bSuccess, "upload file {0} to container {1} should succeed", UploadFilePath, NEW_CONTAINER_NAME); + + //--------------Get operation-------------- + Test.Assert(agent.GetAzureStorageBlob(blobName, NEW_CONTAINER_NAME), Utility.GenComparisonData("GetAzureStorageBlob", true)); + + // Verification for returned values + // get blob object using XSCL + StorageBlob.ICloudBlob blob = CommonBlobHelper.QueryBlob(NEW_CONTAINER_NAME, blobName); + blob.FetchAttributes(); + CloudBlobUtil.PackBlobCompareData(blob, dic); + dic.Add("ICloudBlob", blob); + + agent.OutputValidation(comp); + } + finally + { + // cleanup + container.DeleteIfExists(); + } + } + + /// + /// Parameters: + /// Block: + /// True for BlockBlob, false for PageBlob + /// + internal void DownloadBlobTest(Agent agent, string UploadFilePath, string DownloadDirPath, Microsoft.WindowsAzure.Storage.Blob.BlobType Type) + { + string NEW_CONTAINER_NAME = Utility.GenNameString("upload-"); + string blobName = Path.GetFileName(UploadFilePath); + + Collection> comp = new Collection>(); + Dictionary dic = Utility.GenComparisonData(StorageObjectType.Blob, blobName); + + dic["BlobType"] = Type; + comp.Add(dic); + + // create the container + StorageBlob.CloudBlobContainer container = CommonStorageAccount.CreateCloudBlobClient().GetContainerReference(NEW_CONTAINER_NAME); + container.CreateIfNotExists(); + + try + { + bool bSuccess = false; + // upload the blob file + if (Type == Microsoft.WindowsAzure.Storage.Blob.BlobType.BlockBlob) + bSuccess = CommonBlobHelper.UploadFileToBlockBlob(NEW_CONTAINER_NAME, blobName, UploadFilePath); + else if (Type == Microsoft.WindowsAzure.Storage.Blob.BlobType.PageBlob) + bSuccess = CommonBlobHelper.UploadFileToPageBlob(NEW_CONTAINER_NAME, blobName, UploadFilePath); + Test.Assert(bSuccess, "upload file {0} to container {1} should succeed", UploadFilePath, NEW_CONTAINER_NAME); + + //--------------Download operation-------------- + string downloadFilePath = Path.Combine(DownloadDirPath, blobName); + Test.Assert(agent.GetAzureStorageBlobContent(blobName, downloadFilePath, NEW_CONTAINER_NAME), + Utility.GenComparisonData("GetAzureStorageBlobContent", true)); + StorageBlob.ICloudBlob blob = CommonBlobHelper.QueryBlob(NEW_CONTAINER_NAME, blobName); + CloudBlobUtil.PackBlobCompareData(blob, dic); + // Verification for returned values + agent.OutputValidation(comp); + + Test.Assert(Helper.CompareTwoFiles(downloadFilePath, UploadFilePath), + String.Format("File '{0}' should be bit-wise identicial to '{1}'", downloadFilePath, UploadFilePath)); + } + finally + { + // cleanup + container.DeleteIfExists(); + } + } + + /// + /// Parameters: + /// Block: + /// True for BlockBlob, false for PageBlob + /// + internal void RemoveBlobTest(Agent agent, string UploadFilePath, Microsoft.WindowsAzure.Storage.Blob.BlobType Type) + { + string NEW_CONTAINER_NAME = Utility.GenNameString("upload-"); + string blobName = Path.GetFileName(UploadFilePath); + + Collection> comp = new Collection>(); + Dictionary dic = Utility.GenComparisonData(StorageObjectType.Blob, blobName); + + dic["BlobType"] = Type; + comp.Add(dic); + + // create the container + StorageBlob.CloudBlobContainer container = CommonStorageAccount.CreateCloudBlobClient().GetContainerReference(NEW_CONTAINER_NAME); + container.CreateIfNotExists(); + + try + { + bool bSuccess = false; + // upload the blob file + if (Type == Microsoft.WindowsAzure.Storage.Blob.BlobType.BlockBlob) + bSuccess = CommonBlobHelper.UploadFileToBlockBlob(NEW_CONTAINER_NAME, blobName, UploadFilePath); + else if (Type == Microsoft.WindowsAzure.Storage.Blob.BlobType.PageBlob) + bSuccess = CommonBlobHelper.UploadFileToPageBlob(NEW_CONTAINER_NAME, blobName, UploadFilePath); + Test.Assert(bSuccess, "upload file {0} to container {1} should succeed", UploadFilePath, NEW_CONTAINER_NAME); + + //--------------Remove operation-------------- + Test.Assert(agent.RemoveAzureStorageBlob(blobName, NEW_CONTAINER_NAME), Utility.GenComparisonData("RemoveAzureStorageBlob", true)); + StorageBlob.ICloudBlob blob = CommonBlobHelper.QueryBlob(NEW_CONTAINER_NAME, blobName); + Test.Assert(blob == null, "blob {0} should not exist!", blobName); + } + finally + { + // cleanup + container.DeleteIfExists(); + } + } + + /// + /// Create a container and then get it using powershell cmdlet + /// + /// A CloudBlobContainer object which is returned by PowerShell + protected StorageBlob.CloudBlobContainer CreateAndPsGetARandomContainer() + { + string containerName = Utility.GenNameString("bvt"); + StorageBlob.CloudBlobContainer container = SetUpStorageAccount.CreateCloudBlobClient().GetContainerReference(containerName); + container.CreateIfNotExists(); + + try + { + PowerShellAgent agent = new PowerShellAgent(); + Test.Assert(agent.GetAzureStorageContainer(containerName), Utility.GenComparisonData("GetAzureStorageContainer", true)); + int count = 1; + Test.Assert(agent.Output.Count == count, string.Format("get container should return only 1 container, actully it's {0}", agent.Output.Count)); + return (StorageBlob.CloudBlobContainer)agent.Output[0]["CloudBlobContainer"]; + } + finally + { + // clean up + container.DeleteIfExists(); + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTP/AnonymousBVT.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTP/AnonymousBVT.cs new file mode 100644 index 000000000000..b283b43e93b9 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTP/AnonymousBVT.cs @@ -0,0 +1,48 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Commands.Storage.ScenarioTest.Common; +using Commands.Storage.ScenarioTest.Util; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using MS.Test.Common.MsTestLib; + +namespace Commands.Storage.ScenarioTest.BVT.HTTP +{ + /// + /// bvt cases for anonymous storage account + /// + [TestClass] + class AnonymousBVT : HTTPS.AnonymousBVT + { + [ClassInitialize()] + public static void AnonymousHTTPBVTClassInitialize(TestContext testContext) + { + TestBase.TestClassInitialize(testContext); + CLICommonBVT.SaveAndCleanSubScriptionAndEnvConnectionString(); + StorageAccountName = Test.Data.Get("StorageAccountName"); + StorageEndPoint = Test.Data.Get("StorageEndPoint").Trim(); + useHttps = false; + PowerShellAgent.SetAnonymousStorageContext(StorageAccountName, useHttps, StorageEndPoint); + downloadDirRoot = Test.Data.Get("DownloadDir"); + SetupDownloadDir(); + } + + [ClassCleanup()] + public static void AnonymousHTTPBVTClassCleanup() + { + FileUtil.CleanDirectory(downloadDirRoot); + TestBase.TestClassCleanup(); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTP/AzureEmulatorBVT.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTP/AzureEmulatorBVT.cs new file mode 100644 index 000000000000..1cf19dbb93d2 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTP/AzureEmulatorBVT.cs @@ -0,0 +1,156 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Diagnostics; +using System.IO; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.Win32; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Blob; +using MS.Test.Common.MsTestLib; +using StorageTestLib; + +namespace Commands.Storage.ScenarioTest.BVT.HTTP +{ + /// + /// bvt tests using Azure Emulator and local development storage account + /// + [TestClass] + class AzureEmulatorBVT : CLICommonBVT + { + private static string csRunPath = String.Empty; + private static string storageCmd = "/devstore:"; + + [ClassInitialize()] + public static void AzureEmulatorBVTClassInitialize(TestContext testContext) + { + //first set the storage account + //second init common bvt + //third set storage context in powershell + SetUpStorageAccount = CloudStorageAccount.DevelopmentStorageAccount; + CLICommonBVT.CLICommonBVTInitialize(testContext); + PowerShellAgent.SetLocalStorageContext(); + StartStorageEmulator(); + } + + // + //Use ClassCleanup to run code after all tests in a class have run + [ClassCleanup()] + public static void AzureEmulatorBVTCleanup() + { + StopStorageEmulator(); + CLICommonBVT.CLICommonBVTCleanup(); + } + + /// + /// start azure storage emulator + /// + private static void StartStorageEmulator() + { + Test.Info("Start Azure Storage Emulator..."); + string cmd = "start"; + string csrunCmd = storageCmd + cmd; + CsRun(csrunCmd); + } + + /// + /// stop storage emulator + /// + private static void StopStorageEmulator() + { + Test.Info("Stop Azure Storage Emulator..."); + string cmd = "shutdown"; + string csrunCmd = storageCmd + cmd; + CsRun(csrunCmd); + } + + /// + /// run csrun command + /// + /// csrun commnd + private static void CsRun(string cmd) + { + //azure storage emulator settings + string AzureEmulatorRegistryKey = @"SOFTWARE\Microsoft\Microsoft Azure Emulator"; + string AzureSdkInstallPathRegistryKeyValue = "InstallPath"; + string AzureEmulatorDirectoryName = "Emulator"; + string CsRunExe = "csrun.exe"; + + if (String.IsNullOrEmpty(csRunPath)) + { + var emulatorPath = Registry.GetValue( + Path.Combine(Registry.LocalMachine.Name, AzureEmulatorRegistryKey), + AzureSdkInstallPathRegistryKeyValue, null); + + if (emulatorPath == null) + { + throw new ArgumentException("Azure Emulator is not installed"); + } + + string AzureEmulatorDirectory = Path.Combine((string)emulatorPath, + AzureEmulatorDirectoryName); + csRunPath = Path.Combine(AzureEmulatorDirectory, CsRunExe); + } + + Process process = new Process(); + ProcessStartInfo startInfo = new ProcessStartInfo(); + startInfo.FileName = csRunPath; + startInfo.Arguments = cmd; + startInfo.UseShellExecute = false; + startInfo.RedirectStandardInput = false; + startInfo.RedirectStandardOutput = true; + startInfo.CreateNoWindow = true; + process.StartInfo = startInfo; + int waitTimeOut = 10 * 60 * 1000; //ten minutes + + try + { + if (process.Start()) + { + process.WaitForExit(waitTimeOut); + Test.Info(process.StandardOutput.ReadToEnd()); + } + else + { + Test.AssertFail("Can not run csrun command to start/stop azure storage emulator"); + throw new ArgumentException(String.Format("Can not run {0}", cmd)); + } + } + finally + { + if (process != null) + { + process.Close(); + } + } + } + + [TestMethod()] + [TestCategory(Tag.BVT)] + public void MakeSureBvtUsingLocalContext() + { + string key = System.Environment.GetEnvironmentVariable(EnvKey); + Test.Assert(string.IsNullOrEmpty(key), string.Format("env connection string {0} should be null or empty", key)); + Test.Assert(PowerShellAgent.Context != null, "PowerShell context should be not null when running bvt against local storage account"); + + //check the container uri is valid for namekey context + CloudBlobContainer retrievedContainer = CreateAndPsGetARandomContainer(); + string uri = retrievedContainer.Uri.ToString(); + string uriPrefix = "http://127.0.0.1"; + + Test.Assert(uri.ToString().StartsWith(uriPrefix), string.Format("The prefix of container uri should be {0}, actually it's {1}", uriPrefix, uri)); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTP/AzureEnvironment.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTP/AzureEnvironment.cs new file mode 100644 index 000000000000..41582f42e737 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTP/AzureEnvironment.cs @@ -0,0 +1,48 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Commands.Storage.ScenarioTest.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using MS.Test.Common.MsTestLib; + +namespace Commands.Storage.ScenarioTest.BVT.HTTP +{ + [TestClass] + class AzureEnvironment : HTTPS.AzureEnvironment + { + [ClassInitialize()] + public static void AzureEnvironmentHTTPBVTClassInitialize(TestContext testContext) + { + //first set the storage account + //second init common bvt + //third set storage context in powershell + useHttps = false; + isSecondary = true; + SetUpStorageAccount = TestBase.GetCloudStorageAccountFromConfig("Secondary", useHttps); + StorageAccountName = SetUpStorageAccount.Credentials.AccountName; + string StorageEndpoint = Test.Data.Get("SecondaryStorageEndPoint"); + string StorageAccountKey = Test.Data.Get("SecondaryStorageAccountKey"); + CLICommonBVT.CLICommonBVTInitialize(testContext); + azureEnvironmentName = PowerShellAgent.AddRandomAzureEnvironment(StorageEndpoint, "bvt"); + PowerShellAgent.SetStorageContextWithAzureEnvironment(StorageAccountName, StorageAccountKey, useHttps, azureEnvironmentName); + } + + [ClassCleanup()] + public static void AzureEnvironmentHTTPBVTCleanup() + { + CLICommonBVT.CLICommonBVTCleanup(); + PowerShellAgent.RemoveAzureEnvironment(azureEnvironmentName); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTP/ConnectionStringBVT.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTP/ConnectionStringBVT.cs new file mode 100644 index 000000000000..0e9af9d5a1aa --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTP/ConnectionStringBVT.cs @@ -0,0 +1,44 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Commands.Storage.ScenarioTest.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Commands.Storage.ScenarioTest.BVT.HTTP +{ + /// + /// bvt tests using connection string + /// + [TestClass] + class ConnectionStringBVT : HTTPS.ConnectionStringBVT + { + [ClassInitialize()] + public static void ConnectionStringHTTPBVTClassInitialize(TestContext testContext) + { + //first set the storage account + //second init common bvt + //third set storage context in powershell + useHttps = false; + SetUpStorageAccount = TestBase.GetCloudStorageAccountFromConfig(string.Empty, useHttps); + CLICommonBVT.CLICommonBVTInitialize(testContext); + PowerShellAgent.SetStorageContext(SetUpStorageAccount.ToString(true)); + } + + [ClassCleanup()] + public static void ConnectionStringHTTPBVTCleanup() + { + CLICommonBVT.CLICommonBVTCleanup(); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTP/EnvConnectionStringBVT.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTP/EnvConnectionStringBVT.cs new file mode 100644 index 000000000000..2577326d166b --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTP/EnvConnectionStringBVT.cs @@ -0,0 +1,44 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Commands.Storage.ScenarioTest.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Commands.Storage.ScenarioTest.BVT.HTTP +{ + /// + /// bvt tests using environment variable "AZURE_STORAGE_CONNECTION_STRING" + /// + [TestClass] + class EnvConnectionStringBVT : HTTPS.EnvConnectionStringBVT + { + [ClassInitialize()] + public static void EnvConnectionStringHTTPBVTClassInitialize(TestContext testContext) + { + //first set the storage account + //second init common bvt + //third set storage context in powershell + useHttps = false; + SetUpStorageAccount = TestBase.GetCloudStorageAccountFromConfig(string.Empty, useHttps); + CLICommonBVT.CLICommonBVTInitialize(testContext); + System.Environment.SetEnvironmentVariable(EnvKey, SetUpStorageAccount.ToString(true)); + } + + [ClassCleanup()] + public static void EnvConnectionStringHTTPBVTCleanUp() + { + CLICommonBVT.CLICommonBVTCleanup(); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTP/NameKeyContextBVT.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTP/NameKeyContextBVT.cs new file mode 100644 index 000000000000..907fce6fb8d6 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTP/NameKeyContextBVT.cs @@ -0,0 +1,51 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Storage.Auth; +using MS.Test.Common.MsTestLib; + +namespace Commands.Storage.ScenarioTest.BVT.HTTP +{ + /// + /// Bvt test using name and key context in http mode + /// + [TestClass] + class NameKeyContextBVT : HTTPS.NameKeyContextBVT + { + [ClassInitialize()] + public static void NameKeyContextHTTPBVTClassInitialize(TestContext testContext) + { + //first set the storage account + //second init common bvt + //third set storage context in powershell + StorageAccountName = Test.Data.Get("StorageAccountName"); + string StorageAccountKey = Test.Data.Get("StorageAccountKey"); + string StorageEndPoint = Test.Data.Get("StorageEndPoint"); + StorageCredentials credential = new StorageCredentials(StorageAccountName, StorageAccountKey); + useHttps = false; + isSecondary = false; + SetUpStorageAccount = Utility.GetStorageAccountWithEndPoint(credential, useHttps, StorageEndPoint); + + CLICommonBVT.CLICommonBVTInitialize(testContext); + PowerShellAgent.SetStorageContext(StorageAccountName, StorageAccountKey, useHttps, StorageEndPoint); + } + + [ClassCleanup()] + public static void NameKeyContextHTTPBVTCleanup() + { + CLICommonBVT.CLICommonBVTCleanup(); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTP/SecondaryEndPointBVT.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTP/SecondaryEndPointBVT.cs new file mode 100644 index 000000000000..8f591e938b45 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTP/SecondaryEndPointBVT.cs @@ -0,0 +1,48 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Commands.Storage.ScenarioTest.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using MS.Test.Common.MsTestLib; + +namespace Commands.Storage.ScenarioTest.BVT.HTTP +{ + /// + /// BVT test case for secondary end point with http protocol + /// + [TestClass] + class SecondaryEndPointBVT : HTTPS.SecondaryEndPointBVT + { + [ClassInitialize()] + public static void SecondaryEndPointHTTPBVTClassInitialize(TestContext testContext) + { + //first set the storage account + //second init common bvt + //third set storage context in powershell + useHttps = false; + isSecondary = true; + SetUpStorageAccount = TestBase.GetCloudStorageAccountFromConfig("Secondary", useHttps); + StorageAccountName = SetUpStorageAccount.Credentials.AccountName; + string StorageEndPoint = Test.Data.Get("SecondaryStorageEndPoint"); + CLICommonBVT.CLICommonBVTInitialize(testContext); + PowerShellAgent.SetStorageContext(SetUpStorageAccount.ToString(true)); + } + + [ClassCleanup()] + public static void SecondaryEndPointHTTPBVTCleanup() + { + CLICommonBVT.CLICommonBVTCleanup(); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTPS/AnonymousBVT.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTPS/AnonymousBVT.cs new file mode 100644 index 000000000000..b26c2f3ca7e3 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTPS/AnonymousBVT.cs @@ -0,0 +1,256 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using Commands.Storage.ScenarioTest.Common; +using Commands.Storage.ScenarioTest.Util; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using MS.Test.Common.MsTestLib; +using StorageTestLib; +using StorageBlob = Microsoft.WindowsAzure.Storage.Blob; + +namespace Commands.Storage.ScenarioTest.BVT.HTTPS +{ + /// + /// bvt cases for anonymous storage account + /// + [TestClass] + class AnonymousBVT : TestBase + { + protected static string downloadDirRoot; + + private static string ContainerPrefix = "anonymousbvt"; + protected static string StorageAccountName; + protected static string StorageEndPoint; + protected static bool useHttps; + + [ClassInitialize()] + public static void AnonymousBVTClassInitialize(TestContext testContext) + { + TestBase.TestClassInitialize(testContext); + CLICommonBVT.SaveAndCleanSubScriptionAndEnvConnectionString(); + StorageAccountName = Test.Data.Get("StorageAccountName"); + StorageEndPoint = Test.Data.Get("StorageEndPoint").Trim(); + useHttps = true; + PowerShellAgent.SetAnonymousStorageContext(StorageAccountName, useHttps, StorageEndPoint); + downloadDirRoot = Test.Data.Get("DownloadDir"); + SetupDownloadDir(); + } + + [ClassCleanup()] + public static void AnonymousBVTClassCleanup() + { + FileUtil.CleanDirectory(downloadDirRoot); + CLICommonBVT.RestoreSubScriptionAndEnvConnectionString(); + TestBase.TestClassCleanup(); + } + + /// + /// create download dir + /// + //TODO remove code redundancy + protected static void SetupDownloadDir() + { + if (!Directory.Exists(downloadDirRoot)) + { + Directory.CreateDirectory(downloadDirRoot); + } + + FileUtil.CleanDirectory(downloadDirRoot); + } + + [TestMethod] + [TestCategory(Tag.BVT)] + public void ListContainerWithContianerPermission() + { + string containerName = Utility.GenNameString(ContainerPrefix); + StorageBlob.CloudBlobContainer container = blobUtil.CreateContainer(containerName, StorageBlob.BlobContainerPublicAccessType.Container); + + try + { + Test.Assert(agent.GetAzureStorageContainer(containerName), Utility.GenComparisonData("GetAzureStorageContainer", true)); + + Dictionary dic = Utility.GenComparisonData(StorageObjectType.Container, containerName); + + Collection> comp = new Collection> { dic }; + //remove the permssion information for anonymous storage account + CloudBlobUtil.PackContainerCompareData(container, dic); + dic["PublicAccess"] = null; + dic["Permission"] = null; + // Verification for returned values + agent.OutputValidation(comp); + + //check the http or https usage + StorageBlob.CloudBlobContainer retrievedContainer = (StorageBlob.CloudBlobContainer)agent.Output[0]["CloudBlobContainer"]; ; + string uri = retrievedContainer.Uri.ToString(); + string uriPrefix = string.Empty; + + if (useHttps) + { + uriPrefix = "https"; + } + else + { + uriPrefix = "http"; + } + + Test.Assert(uri.ToString().StartsWith(uriPrefix), string.Format("The prefix of container uri should be {0}, actually it's {1}", uriPrefix, uri)); + } + finally + { + blobUtil.RemoveContainer(containerName); + } + } + + /// + /// list blobs when container's public access level is public + /// + [TestMethod] + [TestCategory(Tag.BVT)] + public void ListBlobsWithBlobPermission() + { + string containerName = Utility.GenNameString(ContainerPrefix); + StorageBlob.CloudBlobContainer container = blobUtil.CreateContainer(containerName, StorageBlob.BlobContainerPublicAccessType.Blob); + + try + { + string pageBlobName = Utility.GenNameString("pageblob"); + string blockBlobName = Utility.GenNameString("blockblob"); + StorageBlob.ICloudBlob blockBlob = blobUtil.CreateBlockBlob(container, blockBlobName); + StorageBlob.ICloudBlob pageBlob = blobUtil.CreatePageBlob(container, pageBlobName); + + Test.Assert(agent.GetAzureStorageBlob(blockBlobName, containerName), Utility.GenComparisonData("Get-AzureStorageBlob", true)); + agent.OutputValidation(new List { blockBlob }); + Test.Assert(agent.GetAzureStorageBlob(pageBlobName, containerName), Utility.GenComparisonData("Get-AzureStorageBlob", true)); + agent.OutputValidation(new List { pageBlob }); + } + finally + { + blobUtil.RemoveContainer(containerName); + } + } + + /// + /// download blob when container's public access level is container + /// + [TestMethod] + [TestCategory(Tag.BVT)] + public void GetBlobContentWithContainerPermission() + { + string containerName = Utility.GenNameString(ContainerPrefix); + StorageBlob.CloudBlobContainer container = blobUtil.CreateContainer(containerName, StorageBlob.BlobContainerPublicAccessType.Container); + + try + { + DownloadBlobFromContainerTest(container); + } + finally + { + blobUtil.RemoveContainer(containerName); + } + } + + /// + /// download blob when container's public access level is blob + /// + [TestMethod] + [TestCategory(Tag.BVT)] + public void GetBlobContentWithBlobPermission() + { + string containerName = Utility.GenNameString(ContainerPrefix); + StorageBlob.CloudBlobContainer container = blobUtil.CreateContainer(containerName, StorageBlob.BlobContainerPublicAccessType.Blob); + + try + { + DownloadBlobFromContainerTest(container); + } + finally + { + blobUtil.RemoveContainer(containerName); + } + } + + /// + /// download test in specified container + /// + /// CloudBlobContainer object + private void DownloadBlobFromContainerTest(StorageBlob.CloudBlobContainer container) + { + DownloadBlobFromContainer(container, StorageBlob.BlobType.BlockBlob); + DownloadBlobFromContainer(container, StorageBlob.BlobType.PageBlob); + } + + /// + /// download specified blob + /// + /// + /// + private void DownloadBlobFromContainer(StorageBlob.CloudBlobContainer container, StorageBlob.BlobType type) + { + string blobName = Utility.GenNameString("blob"); + StorageBlob.ICloudBlob blob = blobUtil.CreateBlob(container, blobName, type); + + string filePath = Path.Combine(downloadDirRoot, blob.Name); + Test.Assert(agent.GetAzureStorageBlobContent(blob.Name, filePath, container.Name, true), "download blob should be successful"); + string localMd5 = Helper.GetFileContentMD5(filePath); + Test.Assert(localMd5 == blob.Properties.ContentMD5, string.Format("local content md5 should be {0}, and actualy it's {1}", blob.Properties.ContentMD5, localMd5)); + agent.OutputValidation(new List { blob }); + } + + [TestMethod()] + [TestCategory(Tag.BVT)] + public void MakeSureBvtUsingAnonymousContext() + { + //TODO EnvKey is not empty since we called SaveAndCleanSubScriptionAndEnvConnectionString when initializing + string key = System.Environment.GetEnvironmentVariable(CLICommonBVT.EnvKey); + Test.Assert(string.IsNullOrEmpty(key), string.Format("env connection string {0} should be null or empty", key)); + Test.Assert(PowerShellAgent.Context != null, "PowerShell context should be not null when running bvt against Anonymous storage account"); + } + + /// + /// Anonymous storage context should work with specified end point + /// + [TestMethod()] + [TestCategory(Tag.BVT)] + public void AnonymousContextWithEndPoint() + { + string containerName = Utility.GenNameString(ContainerPrefix); + StorageBlob.CloudBlobContainer container = blobUtil.CreateContainer(containerName, StorageBlob.BlobContainerPublicAccessType.Blob); + + try + { + string pageBlobName = Utility.GenNameString("pageblob"); + string blockBlobName = Utility.GenNameString("blockblob"); + StorageBlob.ICloudBlob blockBlob = blobUtil.CreateBlockBlob(container, blockBlobName); + StorageBlob.ICloudBlob pageBlob = blobUtil.CreatePageBlob(container, pageBlobName); + + agent.UseContextParam = false; + string cmd = string.Format("new-azurestoragecontext -StorageAccountName {0} " + + "-Anonymous -EndPoint {1}", StorageAccountName, StorageEndPoint); + ((PowerShellAgent)agent).AddPipelineScript(cmd); + Test.Assert(agent.GetAzureStorageBlob(blockBlobName, containerName), Utility.GenComparisonData("Get-AzureStorageBlob", true)); + agent.OutputValidation(new List { blockBlob }); + ((PowerShellAgent)agent).AddPipelineScript(cmd); + Test.Assert(agent.GetAzureStorageBlob(pageBlobName, containerName), Utility.GenComparisonData("Get-AzureStorageBlob", true)); + agent.OutputValidation(new List { pageBlob }); + } + finally + { + blobUtil.RemoveContainer(containerName); + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTPS/AzureEnvironment.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTPS/AzureEnvironment.cs new file mode 100644 index 000000000000..02d2206be26a --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTPS/AzureEnvironment.cs @@ -0,0 +1,50 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Commands.Storage.ScenarioTest.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using MS.Test.Common.MsTestLib; + +namespace Commands.Storage.ScenarioTest.BVT.HTTPS +{ + [TestClass] + class AzureEnvironment : NameKeyContextBVT + { + public static string azureEnvironmentName; + + [ClassInitialize()] + public static void AzureEnvironmentBVTClassInitialize(TestContext testContext) + { + //first set the storage account + //second init common bvt + //third set storage context in powershell + useHttps = true; + isSecondary = true; + SetUpStorageAccount = TestBase.GetCloudStorageAccountFromConfig("Secondary", useHttps); + StorageAccountName = SetUpStorageAccount.Credentials.AccountName; + string StorageEndpoint = Test.Data.Get("SecondaryStorageEndPoint"); + string StorageAccountKey = Test.Data.Get("SecondaryStorageAccountKey"); + CLICommonBVT.CLICommonBVTInitialize(testContext); + azureEnvironmentName = PowerShellAgent.AddRandomAzureEnvironment(StorageEndpoint, "bvt"); + PowerShellAgent.SetStorageContextWithAzureEnvironment(StorageAccountName, StorageAccountKey, useHttps, azureEnvironmentName); + } + + [ClassCleanup()] + public static void AzureEnvironmentBVTCleanup() + { + CLICommonBVT.CLICommonBVTCleanup(); + PowerShellAgent.RemoveAzureEnvironment(azureEnvironmentName); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTPS/ConnectionStringBVT.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTPS/ConnectionStringBVT.cs new file mode 100644 index 000000000000..9b779d665f83 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTPS/ConnectionStringBVT.cs @@ -0,0 +1,75 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Commands.Storage.ScenarioTest.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Storage.Blob; +using MS.Test.Common.MsTestLib; +using StorageTestLib; + +namespace Commands.Storage.ScenarioTest.BVT.HTTPS +{ + /// + /// bvt tests using connection string + /// + [TestClass] + class ConnectionStringBVT : CLICommonBVT + { + protected static bool useHttps; + + [ClassInitialize()] + public static void ConnectionStringBVTClassInitialize(TestContext testContext) + { + //first set the storage account + //second init common bvt + //third set storage context in powershell + SetUpStorageAccount = TestBase.GetCloudStorageAccountFromConfig(); + + CLICommonBVT.CLICommonBVTInitialize(testContext); + PowerShellAgent.SetStorageContext(SetUpStorageAccount.ToString(true)); + useHttps = true; + } + + [ClassCleanup()] + public static void ConnectionStringBVTCleanup() + { + CLICommonBVT.CLICommonBVTCleanup(); + } + + [TestMethod()] + [TestCategory(Tag.BVT)] + public void MakeSureBvtUsingConnectionStringContext() + { + string key = System.Environment.GetEnvironmentVariable(EnvKey); + Test.Assert(string.IsNullOrEmpty(key), string.Format("env connection string {0} should be null or empty", key)); + Test.Assert(PowerShellAgent.Context != null, "PowerShell context should be not null when running bvt against connection string"); + + CloudBlobContainer retrievedContainer = CreateAndPsGetARandomContainer(); + string uri = retrievedContainer.Uri.ToString(); + string uriPrefix = string.Empty; + + //only check the http/https usage + if (useHttps) + { + uriPrefix = "https"; + } + else + { + uriPrefix = "http"; + } + + Test.Assert(uri.ToString().StartsWith(uriPrefix), string.Format("The prefix of container uri should be {0}, actually it's {1}", uriPrefix, uri)); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTPS/EnvConnectionStringBVT.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTPS/EnvConnectionStringBVT.cs new file mode 100644 index 000000000000..8624c49bbdd2 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTPS/EnvConnectionStringBVT.cs @@ -0,0 +1,76 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Commands.Storage.ScenarioTest.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Storage.Blob; +using MS.Test.Common.MsTestLib; +using StorageTestLib; + +namespace Commands.Storage.ScenarioTest.BVT.HTTPS +{ + /// + /// bvt tests using environment variable "AZURE_STORAGE_CONNECTION_STRING" + /// + [TestClass] + class EnvConnectionStringBVT : CLICommonBVT + { + protected static bool useHttps; + + [ClassInitialize()] + public static void EnvConnectionStringBVTClassInitialize(TestContext testContext) + { + //first set the storage account + //second init common bvt + //third set storage context in powershell + SetUpStorageAccount = TestBase.GetCloudStorageAccountFromConfig(); + CLICommonBVT.CLICommonBVTInitialize(testContext); + //set env connection string + System.Environment.SetEnvironmentVariable(EnvKey, SetUpStorageAccount.ToString(true)); + useHttps = true; + } + + [ClassCleanup()] + public static void EnvConnectionStringBVTCleanUp() + { + CLICommonBVT.CLICommonBVTCleanup(); + } + + [TestMethod()] + [TestCategory(Tag.BVT)] + public void MakeSureBvtUsingEnvConnectionStringContext() + { + string key = System.Environment.GetEnvironmentVariable(EnvKey); + Test.Assert(!string.IsNullOrEmpty(key), string.Format("env connection string {0} should be not null or empty", key)); + Test.Assert(PowerShellAgent.Context == null, "PowerShell context should be null when running bvt against env connection string"); + + //check the container uri is valid for env connection string context + CloudBlobContainer retrievedContainer = CreateAndPsGetARandomContainer(); + string uri = retrievedContainer.Uri.ToString(); + string uriPrefix = string.Empty; + + //only check the http/https usage + if (useHttps) + { + uriPrefix = "https"; + } + else + { + uriPrefix = "http"; + } + + Test.Assert(uri.ToString().StartsWith(uriPrefix), string.Format("The prefix of container uri should be {0}, actually it's {1}", uriPrefix, uri)); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTPS/NameKeyContextBVT.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTPS/NameKeyContextBVT.cs new file mode 100644 index 000000000000..a58851d148d1 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTPS/NameKeyContextBVT.cs @@ -0,0 +1,106 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Commands.Storage.ScenarioTest.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Storage.Auth; +using Microsoft.WindowsAzure.Storage.Blob; +using MS.Test.Common.MsTestLib; +using StorageTestLib; + +namespace Commands.Storage.ScenarioTest.BVT.HTTPS +{ + /// + /// bvt test using name and key context in https mode + /// + [TestClass] + class NameKeyContextBVT : CLICommonBVT + { + protected static bool useHttps; + protected static string StorageAccountName; + protected static bool isSecondary; + + [ClassInitialize()] + public static void NameKeyContextBVTClassInitialize(TestContext testContext) + { + //first set the storage account + //second init common bvt + //third set storage context in powershell + StorageAccountName = Test.Data.Get("StorageAccountName"); + string StorageAccountKey = Test.Data.Get("StorageAccountKey"); + string StorageEndPoint = Test.Data.Get("StorageEndPoint"); + StorageCredentials credential = new StorageCredentials(StorageAccountName, StorageAccountKey); + useHttps = true; + isSecondary = false; + SetUpStorageAccount = Utility.GetStorageAccountWithEndPoint(credential, useHttps, StorageEndPoint); + + CLICommonBVT.CLICommonBVTInitialize(testContext); + PowerShellAgent.SetStorageContext(StorageAccountName, StorageAccountKey, useHttps, StorageEndPoint); + } + + [ClassCleanup()] + public static void NameKeyContextBVTCleanup() + { + CLICommonBVT.CLICommonBVTCleanup(); + } + + [TestMethod()] + [TestCategory(Tag.BVT)] + public void MakeSureBvtUsingNameKeyContext() + { + string key = System.Environment.GetEnvironmentVariable(EnvKey); + Test.Assert(string.IsNullOrEmpty(key), string.Format("env connection string {0} should be null or empty", key)); + Test.Assert(PowerShellAgent.Context != null, "PowerShell context should be not null when running bvt against storage account name and key"); + + //check the container uri is valid for namekey context + CloudBlobContainer retrievedContainer = CreateAndPsGetARandomContainer(); + string uri = retrievedContainer.Uri.ToString(); + string uriPrefix = string.Empty; + + if (useHttps) + { + uriPrefix = string.Format("https://{0}.", StorageAccountName); + } + else + { + uriPrefix = string.Format("http://{0}.", StorageAccountName); + } + + Test.Assert(uri.ToString().StartsWith(uriPrefix), string.Format("The prefix of container uri should be {0}, actually it's {1}", uriPrefix, uri)); + } + + [TestMethod] + [TestCategory(Tag.BVT)] + public void MakeSureUsingCorrectEndPoint() + { + EndPointTest(isSecondary); + } + + protected void EndPointTest(bool isSecondary) + { + string configKey = string.Empty; + + if (isSecondary) + { + configKey = "Secondary"; + } + + string endpointdomain = Test.Data.Get(string.Format("{0}StorageEndPoint", configKey)); + string [] endpoints = Utility.GetStorageEndPoints(SetUpStorageAccount.Credentials.AccountName, useHttps, endpointdomain); + TestBase.ExpectEqual(endpoints[0], SetUpStorageAccount.BlobEndpoint.ToString(), "blob endpoint"); + TestBase.ExpectEqual(endpoints[1], SetUpStorageAccount.QueueEndpoint.ToString(), "queue endpoint"); + TestBase.ExpectEqual(endpoints[2], SetUpStorageAccount.TableEndpoint.ToString(), "table endpoint"); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTPS/SecondaryEndPointBVT.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTPS/SecondaryEndPointBVT.cs new file mode 100644 index 000000000000..b870b25cd66d --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTPS/SecondaryEndPointBVT.cs @@ -0,0 +1,48 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Commands.Storage.ScenarioTest.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using MS.Test.Common.MsTestLib; + +namespace Commands.Storage.ScenarioTest.BVT.HTTPS +{ + /// + /// BVT test case for secondary end point with https protocol + /// + [TestClass] + class SecondaryEndPointBVT : NameKeyContextBVT + { + [ClassInitialize()] + public static void SecondaryEndPointBVTClassInitialize(TestContext testContext) + { + //first set the storage account + //second init common bvt + //third set storage context in powershell + useHttps = true; + isSecondary = true; + SetUpStorageAccount = TestBase.GetCloudStorageAccountFromConfig("Secondary", useHttps); + StorageAccountName = SetUpStorageAccount.Credentials.AccountName; + string StorageEndPoint = Test.Data.Get("SecondaryStorageEndPoint"); + CLICommonBVT.CLICommonBVTInitialize(testContext); + PowerShellAgent.SetStorageContext(SetUpStorageAccount.ToString(true)); + } + + [ClassCleanup()] + public static void SecondaryEndPointBVTCleanup() + { + CLICommonBVT.CLICommonBVTCleanup(); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTPS/SubScriptionBVT.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTPS/SubScriptionBVT.cs new file mode 100644 index 000000000000..3533295744c1 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/HTTPS/SubScriptionBVT.cs @@ -0,0 +1,66 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Commands.Storage.ScenarioTest.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using MS.Test.Common.MsTestLib; +using StorageTestLib; + +namespace Commands.Storage.ScenarioTest.BVT.HTTPS +{ + /// + /// bvt tests using Azure subscription + /// + [TestClass] + class SubScriptionBVT : CLICommonBVT + { + [ClassInitialize()] + public static void SubScriptionBVTClassInitialize(TestContext testContext) + { + //first set the storage account + //second init common bvt + //third set storage context in powershell + SetUpStorageAccount = TestBase.GetCloudStorageAccountFromConfig(); + CLICommonBVT.CLICommonBVTInitialize(testContext); + SetupSubscription(); + } + + /// + /// set up azure subscription + /// + private static void SetupSubscription() + { + string subscriptionFile = Test.Data.Get("AzureSubscriptionPath"); + string subscriptionName = Test.Data.Get("AzureSubscriptionName"); + //TODO add tests about invalid storage account name + string storageAccountName = Test.Data.Get("StorageAccountName"); + PowerShellAgent.ImportAzureSubscriptionAndSetStorageAccount(subscriptionFile, subscriptionName, storageAccountName); + } + + [ClassCleanup()] + public static void SubScriptionBVTCleanUp() + { + CLICommonBVT.CLICommonBVTCleanup(); + } + + [TestMethod()] + [TestCategory(Tag.BVT)] + public void MakeSureBvtUsingSubscriptionContext() + { + string key = System.Environment.GetEnvironmentVariable(EnvKey); + Test.Assert(string.IsNullOrEmpty(key), string.Format("env connection string {0} should be null or empty", key)); + Test.Assert(PowerShellAgent.Context == null, "PowerShell context should be null when running bvt against Subscription"); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/StorageBVT.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/StorageBVT.cs new file mode 100644 index 000000000000..d9067b25d4bf --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/BVT/StorageBVT.cs @@ -0,0 +1,941 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Diagnostics; +using System.IO; +using System.Management.Automation; +using Commands.Storage.ScenarioTest.Util; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using Microsoft.WindowsAzure.Commands.ScenarioTest.Common; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Queue; +using Microsoft.WindowsAzure.Storage.Table; +using MS.Test.Common.MsTestLib; +using StorageTestLib; +using StorageBlob = Microsoft.WindowsAzure.Storage.Blob; + +namespace Commands.Storage.ScenarioTest.BVT +{ + /// + /// this class contain all the bvt cases for the full functional storage context such as local/connectionstring/namekey, anonymous and sas token are excluded. + /// + [TestClass] + public class StorageBVT: AzurePowerShellCertificateTest + { + private static CloudBlobHelper CommonBlobHelper; + private static CloudStorageAccount CommonStorageAccount; + private static string CommonBlockFilePath; + private static string CommonPageFilePath; + + //env connection string + private static string SavedEnvString; + public static string EnvKey; + + /// + /// the storage account which is used to set up the unit tests. + /// + protected static CloudStorageAccount SetUpStorageAccount + { + get + { + return CommonStorageAccount; + } + + set + { + CommonStorageAccount = value; + } + } + + #region Additional test attributes + + /// + /// Init test resources for bvt class + /// + /// TestContext object + [ClassInitialize()] + public static void CLICommonBVTInitialize(TestContext testContext) + { + Test.Info(string.Format("{0} Class Initialize", testContext.FullyQualifiedTestClassName)); + Test.FullClassName = testContext.FullyQualifiedTestClassName; + EnvKey = Test.Data.Get("EnvContextKey"); + SaveAndCleanSubScriptionAndEnvConnectionString(); + + //Clean Storage Context + Test.Info("Clean storage context in PowerShell"); + PowerShellAgent.CleanStorageContext(); + + PowerShellAgent.ImportModule(@".\ServiceManagement\Azure\Storage\Microsoft.WindowsAzure.Commands.Storage.dll"); + + + // import module + string moduleFilePath = Test.Data.Get("ModuleFilePath"); + PowerShellAgent.ImportModule(moduleFilePath); + + GenerateBvtTempFiles(); + } + + /// + /// Save azure subscription and env connection string. So the current settings can't impact our tests. + /// + //TODO move to TestBase + public static void SaveAndCleanSubScriptionAndEnvConnectionString() + { + Test.Info("Clean Azure Subscription and save env connection string"); + //can't restore the azure subscription files + PowerShellAgent.RemoveAzureSubscriptionIfExists(); + + //set env connection string + //TODO A little bit trivial, move to CLITestBase class + if (string.IsNullOrEmpty(EnvKey)) + { + EnvKey = Test.Data.Get("EnvContextKey"); + } + + SavedEnvString = System.Environment.GetEnvironmentVariable(EnvKey); + System.Environment.SetEnvironmentVariable(EnvKey, string.Empty); + } + + /// + /// Restore the previous subscription and env connection string before testing. + /// + public static void RestoreSubScriptionAndEnvConnectionString() + { + Test.Info("Restore env connection string and skip restore subscription"); + System.Environment.SetEnvironmentVariable(EnvKey, SavedEnvString); + } + + /// + /// Generate temp files + /// + private static void GenerateBvtTempFiles() + { + CommonBlockFilePath = Path.Combine(Test.Data.Get("TempDir"), FileUtil.GetSpecialFileName()); + CommonPageFilePath = Path.Combine(Test.Data.Get("TempDir"), FileUtil.GetSpecialFileName()); + string downloadDir = Test.Data.Get("DownloadDir"); + + FileUtil.CreateDirIfNotExits(Path.GetDirectoryName(CommonBlockFilePath)); + FileUtil.CreateDirIfNotExits(Path.GetDirectoryName(CommonPageFilePath)); + FileUtil.CreateDirIfNotExits(downloadDir); + + // Generate block file and page file which are used for uploading + Helper.GenerateMediumFile(CommonBlockFilePath, 1); + Helper.GenerateMediumFile(CommonPageFilePath, 1); + } + + /// + /// Clean up test resources of bvt class + /// + [ClassCleanup()] + public static void CLICommonBVTCleanup() + { + Test.Info(string.Format("BVT Test Class Cleanup")); + RestoreSubScriptionAndEnvConnectionString(); + } + + /// + /// init test resources for one single unit test. + /// + [TestInitialize()] + public void StorageTestInitialize() + { + SetTestStorageAccount(powershell); + PowerShellAgent.SetPowerShellInstance(powershell); + Test.Start(TestContext.FullyQualifiedTestClassName, TestContext.TestName); + } + + private string EnvConnectionStringInPowerShell; + + private void SetTestStorageAccount(PowerShell powershell) + { + if (String.IsNullOrEmpty(EnvConnectionStringInPowerShell)) + { + PSCommand currentCommand = powershell.Commands.Clone(); + string envConnStringScript = string.Format("$env:{0}", Test.Data.Get("EnvContextKey")); + powershell.AddScript(envConnStringScript); + Collection output = powershell.Invoke(); + + if (output.Count == 1) + { + EnvConnectionStringInPowerShell = output[0].BaseObject.ToString(); + powershell.Commands = currentCommand; + } + else + { + Test.AssertFail("Can not find the environment variable 'AZURE_STORAGE_CONNECTION_STRING' in powershell instance"); + } + } + + if (String.IsNullOrEmpty(EnvConnectionStringInPowerShell)) + { + throw new ArgumentException("Please set the StorageConnectionString element of TestData.xml"); + } + + CommonStorageAccount = CloudStorageAccount.Parse(EnvConnectionStringInPowerShell); + + CommonBlobHelper = new CloudBlobHelper(CommonStorageAccount); + } + + /// + /// clean up the test resources for one single unit test. + /// + [TestCleanup()] + public void StorageTestCleanup() + { + Trace.WriteLine("Unit Test Cleanup"); + Test.End(TestContext.FullyQualifiedTestClassName, TestContext.TestName); + } + + #endregion + + /// + /// BVT case : for New-AzureStorageContainer + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Storage)] + [TestCategory(Category.BVT)] + public void NewContainerTest() + { + NewContainerTest(new PowerShellAgent()); + } + + /// + /// BVT case : for Get-AzureStorageContainer + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Storage)] + [TestCategory(Category.BVT)] + public void GetContainerTest() + { + GetContainerTest(new PowerShellAgent()); + } + + /// + /// BVT case : for Remove-AzureStorageContainer + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Storage)] + [TestCategory(Category.BVT)] + public void RemoveContainerTest() + { + RemoveContainerTest(new PowerShellAgent()); + } + + /// + /// BVT case : for Set-AzureStorageContainerACL + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Storage)] + [TestCategory(Category.BVT)] + public void SetContainerACLTest() + { + SetContainerACLTest(new PowerShellAgent()); + } + + /// + /// BVT case : for Set-AzureStorageBlobContent + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Storage)] + [TestCategory(Category.BVT)] + public void UploadBlobTest() + { + UploadBlobTest(new PowerShellAgent(), CommonBlockFilePath, Microsoft.WindowsAzure.Storage.Blob.BlobType.BlockBlob); + UploadBlobTest(new PowerShellAgent(), CommonPageFilePath, Microsoft.WindowsAzure.Storage.Blob.BlobType.PageBlob); + } + + /// + /// BVT case : for Get-AzureStorageBlob + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Storage)] + [TestCategory(Category.BVT)] + public void GetBlobTest() + { + GetBlobTest(new PowerShellAgent(), CommonBlockFilePath, Microsoft.WindowsAzure.Storage.Blob.BlobType.BlockBlob); + GetBlobTest(new PowerShellAgent(), CommonPageFilePath, Microsoft.WindowsAzure.Storage.Blob.BlobType.PageBlob); + } + + /// + /// BVT case : for Get-AzureStorageBlobContent + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Storage)] + [TestCategory(Category.BVT)] + public void DownloadBlobTest() + { + string downloadDirPath = Test.Data.Get("DownloadDir"); + DownloadBlobTest(new PowerShellAgent(), CommonBlockFilePath, downloadDirPath, Microsoft.WindowsAzure.Storage.Blob.BlobType.BlockBlob); + DownloadBlobTest(new PowerShellAgent(), CommonPageFilePath, downloadDirPath, Microsoft.WindowsAzure.Storage.Blob.BlobType.PageBlob); + } + + /// + /// BVT case : for Remove-AzureStorageBlob + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Storage)] + [TestCategory(Category.BVT)] + public void RemoveBlobTest() + { + RemoveBlobTest(new PowerShellAgent(), CommonBlockFilePath, Microsoft.WindowsAzure.Storage.Blob.BlobType.BlockBlob); + RemoveBlobTest(new PowerShellAgent(), CommonPageFilePath, Microsoft.WindowsAzure.Storage.Blob.BlobType.PageBlob); + } + + /// + /// BVT case : for Start-AzureStorageBlobCopy + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Storage)] + [TestCategory(Category.BVT)] + public void StartCopyBlobUsingName() + { + StartCopyBlobTest(new PowerShellAgent(), false); + } + + /// + /// BVT case : for Start-AzureStorageBlobCopy + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Storage)] + [TestCategory(Category.BVT)] + public void StartCopyBlobUsingUri() + { + StartCopyBlobTest(new PowerShellAgent(), true); + } + + /// + /// BVT case : for Get-AzureStorageBlobCopyState + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Storage)] + [TestCategory(Category.BVT)] + public void GetBlobCopyStateTest() + { + CloudBlobUtil blobUtil = new CloudBlobUtil(CommonStorageAccount); + blobUtil.SetupTestContainerAndBlob(); + StorageBlob.ICloudBlob destBlob = CopyBlobAndWaitForComplete(blobUtil); + + try + { + Test.Assert(destBlob.CopyState.Status == StorageBlob.CopyStatus.Success, String.Format("The blob copy using storage client should be success, actually it's {0}", destBlob.CopyState.Status)); + + PowerShellAgent agent = new PowerShellAgent(); + Test.Assert(agent.GetAzureStorageBlobCopyState(blobUtil.ContainerName, destBlob.Name, false), "Get copy state should be success"); + int expectedStateCount = 1; + Test.Assert(agent.Output.Count == expectedStateCount, String.Format("Expected to get {0} copy state, actually it's {1}", expectedStateCount, agent.Output.Count)); + StorageBlob.CopyStatus copyStatus = (StorageBlob.CopyStatus)agent.Output[0]["Status"]; + Test.Assert(copyStatus == StorageBlob.CopyStatus.Success, String.Format("The blob copy should be success, actually it's {0}", copyStatus)); + Uri sourceUri = (Uri)agent.Output[0]["Source"]; + string expectedUri = CloudBlobUtil.ConvertCopySourceUri(blobUtil.Blob.Uri.ToString()); + Test.Assert(sourceUri.ToString() == expectedUri, String.Format("Expected source uri is {0}, actully it's {1}", expectedUri, sourceUri.ToString())); + + Test.Assert(!agent.GetAzureStorageBlobCopyState(blobUtil.ContainerName, blobUtil.BlobName, false), "Get copy state should be fail since the specified blob don't have any copy operation"); + Test.Assert(agent.ErrorMessages.Count > 0, "Should return error message"); + string errorMessage = "Can not find copy task on specified blob"; + Test.Assert(agent.ErrorMessages[0].StartsWith(errorMessage), String.Format("Error message should start with {0}, and actually it's {1}", errorMessage, agent.ErrorMessages[0])); + } + finally + { + blobUtil.CleanupTestContainerAndBlob(); + } + } + + /// + /// BVT case : for Stop-AzureStorageBlobCopy + /// + [TestMethod] + [TestCategory(Category.All)] + [TestCategory(Category.Storage)] + [TestCategory(Category.BVT)] + public void StopCopyBlobTest() + { + CloudBlobUtil blobUtil = new CloudBlobUtil(CommonStorageAccount); + blobUtil.SetupTestContainerAndBlob(); + StorageBlob.ICloudBlob destBlob = CopyBlobAndWaitForComplete(blobUtil); + + try + { + PowerShellAgent agent = new PowerShellAgent(); + string copyId = Guid.NewGuid().ToString(); + Test.Assert(!agent.StopAzureStorageBlobCopy(blobUtil.ContainerName, blobUtil.BlobName, copyId, true), "Stop copy operation should be fail since the specified blob don't have any copy operation"); + Test.Assert(agent.ErrorMessages.Count > 0, "Should return error message"); + string errorMessage = String.Format("Can not find copy task on specified blob '{0}' in container '{1}'", blobUtil.BlobName, blobUtil.ContainerName); + Test.Assert(agent.ErrorMessages[0].IndexOf(errorMessage) != -1, String.Format("Error message should contain {0}, and actually it's {1}", errorMessage, agent.ErrorMessages[0])); + + errorMessage = "There is currently no pending copy operation."; + Test.Assert(!agent.StopAzureStorageBlobCopy(blobUtil.ContainerName, destBlob.Name, copyId, true), "Stop copy operation should be fail since the specified copy operation has finished"); + Test.Assert(agent.ErrorMessages.Count > 0, "Should return error message"); + Test.Assert(agent.ErrorMessages[0].IndexOf(errorMessage) != -1, String.Format("Error message should contain {0}, and actually it's {1}", errorMessage, agent.ErrorMessages[0])); + } + finally + { + blobUtil.CleanupTestContainerAndBlob(); + } + } + + + internal StorageBlob.ICloudBlob CopyBlobAndWaitForComplete(CloudBlobUtil blobUtil) + { + string destBlobName = Utility.GenNameString("copystate"); + + StorageBlob.ICloudBlob destBlob = default(StorageBlob.ICloudBlob); + + Test.Info("Copy Blob using storage client"); + + if (blobUtil.Blob.BlobType == StorageBlob.BlobType.BlockBlob) + { + StorageBlob.CloudBlockBlob blockBlob = blobUtil.Container.GetBlockBlobReference(destBlobName); + blockBlob.StartCopyFromBlob((StorageBlob.CloudBlockBlob)blobUtil.Blob); + destBlob = blockBlob; + } + else + { + StorageBlob.CloudPageBlob pageBlob = blobUtil.Container.GetPageBlobReference(destBlobName); + pageBlob.StartCopyFromBlob((StorageBlob.CloudPageBlob)blobUtil.Blob); + destBlob = pageBlob; + } + + CloudBlobUtil.WaitForCopyOperationComplete(destBlob); + + Test.Assert(destBlob.CopyState.Status == StorageBlob.CopyStatus.Success, String.Format("The blob copy using storage client should be success, actually it's {0}", destBlob.CopyState.Status)); + + return destBlob; + } + + internal void StartCopyBlobTest(Agent agent, bool useUri) + { + CloudBlobUtil blobUtil = new CloudBlobUtil(CommonStorageAccount); + blobUtil.SetupTestContainerAndBlob(); + string copiedName = Utility.GenNameString("copied"); + + if (useUri) + { + //Set the blob permission, so the copy task could directly copy by uri + StorageBlob.BlobContainerPermissions permission = new StorageBlob.BlobContainerPermissions(); + permission.PublicAccess = StorageBlob.BlobContainerPublicAccessType.Blob; + blobUtil.Container.SetPermissions(permission); + } + + try + { + if (useUri) + { + Test.Assert(agent.StartAzureStorageBlobCopy(blobUtil.Blob.Uri.ToString(), blobUtil.ContainerName, copiedName, PowerShellAgent.Context), Utility.GenComparisonData("Start copy blob using source uri", true)); + } + else + { + Test.Assert(agent.StartAzureStorageBlobCopy(blobUtil.ContainerName, blobUtil.BlobName, blobUtil.ContainerName, copiedName), Utility.GenComparisonData("Start copy blob using blob name", true)); + } + + Test.Info("Get destination blob in copy task"); + StorageBlob.ICloudBlob blob = blobUtil.Container.GetBlobReferenceFromServer(copiedName); + Test.Assert(blob != null, "Destination blob should exist after start copy. If not, please check it's a test issue or dev issue."); + + string sourceUri = CloudBlobUtil.ConvertCopySourceUri(blobUtil.Blob.Uri.ToString()); + + Test.Assert(blob.BlobType == blobUtil.Blob.BlobType, String.Format("The destination blob type should be {0}, actually {1}.", blobUtil.Blob.BlobType, blob.BlobType)); + + Test.Assert(blob.CopyState.Source.ToString().StartsWith(sourceUri), String.Format("The source of destination blob should start with {0}, and actually it's {1}", sourceUri, blob.CopyState.Source.ToString())); + } + finally + { + blobUtil.CleanupTestContainerAndBlob(); + } + } + + internal void NewContainerTest(Agent agent) + { + string NEW_CONTAINER_NAME = Utility.GenNameString("astoria-"); + + Dictionary dic = Utility.GenComparisonData(StorageObjectType.Container, NEW_CONTAINER_NAME); + Collection> comp = new Collection> { dic }; + + // delete container if it exists + StorageBlob.CloudBlobContainer container = CommonStorageAccount.CreateCloudBlobClient().GetContainerReference(NEW_CONTAINER_NAME); + container.DeleteIfExists(); + + try + { + //--------------New operation-------------- + Test.Assert(agent.NewAzureStorageContainer(NEW_CONTAINER_NAME), Utility.GenComparisonData("NewAzureStorageContainer", true)); + // Verification for returned values + CloudBlobUtil.PackContainerCompareData(container, dic); + agent.OutputValidation(comp); + Test.Assert(container.Exists(), "container {0} should exist!", NEW_CONTAINER_NAME); + } + finally + { + // clean up + container.DeleteIfExists(); + } + } + + internal void GetContainerTest(Agent agent) + { + string NEW_CONTAINER_NAME = Utility.GenNameString("astoria-"); + + Dictionary dic = Utility.GenComparisonData(StorageObjectType.Container, NEW_CONTAINER_NAME); + + // create container if it does not exist + StorageBlob.CloudBlobContainer container = CommonStorageAccount.CreateCloudBlobClient().GetContainerReference(NEW_CONTAINER_NAME); + container.CreateIfNotExists(); + + Collection> comp = new Collection> { dic }; + + try + { + //--------------Get operation-------------- + Test.Assert(agent.GetAzureStorageContainer(NEW_CONTAINER_NAME), Utility.GenComparisonData("GetAzureStorageContainer", true)); + // Verification for returned values + container.FetchAttributes(); + dic.Add("CloudBlobContainer", container); + CloudBlobUtil.PackContainerCompareData(container, dic); + + agent.OutputValidation(comp); + } + finally + { + // clean up + container.DeleteIfExists(); + } + } + + internal void RemoveContainerTest(Agent agent) + { + string NEW_CONTAINER_NAME = Utility.GenNameString("astoria-"); + + // create container if it does not exist + StorageBlob.CloudBlobContainer container = CommonStorageAccount.CreateCloudBlobClient().GetContainerReference(NEW_CONTAINER_NAME); + container.CreateIfNotExists(); + + try + { + //--------------Remove operation-------------- + Test.Assert(agent.RemoveAzureStorageContainer(NEW_CONTAINER_NAME), Utility.GenComparisonData("RemoveAzureStorageContainer", true)); + Test.Assert(!container.Exists(), "container {0} should not exist!", NEW_CONTAINER_NAME); + } + finally + { + // clean up + container.DeleteIfExists(); + } + } + + internal void SetContainerACLTest(Agent agent) + { + string NEW_CONTAINER_NAME = Utility.GenNameString("astoria-"); + + Collection> comp = new Collection>(); + Dictionary dic = Utility.GenComparisonData(StorageObjectType.Container, NEW_CONTAINER_NAME); + comp.Add(dic); + + // create container if it does not exist + StorageBlob.CloudBlobContainer container = CommonStorageAccount.CreateCloudBlobClient().GetContainerReference(NEW_CONTAINER_NAME); + container.CreateIfNotExists(); + + try + { + StorageBlob.BlobContainerPublicAccessType[] accessTypes = new StorageBlob.BlobContainerPublicAccessType[] { + StorageBlob.BlobContainerPublicAccessType.Blob, + StorageBlob.BlobContainerPublicAccessType.Container, + StorageBlob.BlobContainerPublicAccessType.Off + }; + + // set PublicAccess as one value respetively + foreach (var accessType in accessTypes) + { + //--------------Set operation-------------- + Test.Assert(agent.SetAzureStorageContainerACL(NEW_CONTAINER_NAME, accessType), + "SetAzureStorageContainerACL operation should succeed"); + // Verification for returned values + dic["PublicAccess"] = accessType; + CloudBlobUtil.PackContainerCompareData(container, dic); + agent.OutputValidation(comp); + + Test.Assert(container.GetPermissions().PublicAccess == accessType, + "PublicAccess should be equal: {0} = {1}", container.GetPermissions().PublicAccess, accessType); + } + } + finally + { + // clean up + container.DeleteIfExists(); + } + } + + internal void NewTableTest(Agent agent) + { + string NEW_TABLE_NAME = Utility.GenNameString("Washington"); + Dictionary dic = Utility.GenComparisonData(StorageObjectType.Table, NEW_TABLE_NAME); + Collection> comp = new Collection> { dic }; + + // delete table if it exists + CloudTable table = CommonStorageAccount.CreateCloudTableClient().GetTableReference(NEW_TABLE_NAME); + table.DeleteIfExists(); + + try + { + //--------------New operation-------------- + Test.Assert(agent.NewAzureStorageTable(NEW_TABLE_NAME), Utility.GenComparisonData("NewAzureStorageTable", true)); + // Verification for returned values + dic.Add("CloudTable", table); + agent.OutputValidation(comp); + Test.Assert(table.Exists(), "table {0} should exist!", NEW_TABLE_NAME); + } + finally + { + table.DeleteIfExists(); + } + } + + internal void GetTableTest(Agent agent) + { + string NEW_TABLE_NAME = Utility.GenNameString("Washington"); + Dictionary dic = Utility.GenComparisonData(StorageObjectType.Table, NEW_TABLE_NAME); + Collection> comp = new Collection> { dic }; + + // create table if it does not exist + CloudTable table = CommonStorageAccount.CreateCloudTableClient().GetTableReference(NEW_TABLE_NAME); + table.CreateIfNotExists(); + + dic.Add("CloudTable", table); + + try + { + //--------------Get operation-------------- + Test.Assert(agent.GetAzureStorageTable(NEW_TABLE_NAME), Utility.GenComparisonData("GetAzureStorageTable", true)); + // Verification for returned values + agent.OutputValidation(comp); + } + finally + { + // clean up + table.DeleteIfExists(); + } + } + + internal void RemoveTableTest(Agent agent) + { + string NEW_TABLE_NAME = Utility.GenNameString("Washington"); + + // create table if it does not exist + CloudTable table = CommonStorageAccount.CreateCloudTableClient().GetTableReference(NEW_TABLE_NAME); + table.CreateIfNotExists(); + + try + { + //--------------Remove operation-------------- + Test.Assert(agent.RemoveAzureStorageTable(NEW_TABLE_NAME), Utility.GenComparisonData("RemoveAzureStorageTable", true)); + Test.Assert(!table.Exists(), "queue {0} should not exist!", NEW_TABLE_NAME); + } + finally + { + // clean up + table.DeleteIfExists(); + } + } + + internal void NewQueueTest(Agent agent) + { + string NEW_QUEUE_NAME = Utility.GenNameString("redmond-"); + Dictionary dic = Utility.GenComparisonData(StorageObjectType.Queue, NEW_QUEUE_NAME); + Collection> comp = new Collection> { dic }; + + CloudQueue queue = CommonStorageAccount.CreateCloudQueueClient().GetQueueReference(NEW_QUEUE_NAME); + // delete queue if it exists + queue.DeleteIfExists(); + + try + { + //--------------New operation-------------- + Test.Assert(agent.NewAzureStorageQueue(NEW_QUEUE_NAME), Utility.GenComparisonData("NewAzureStorageQueue", true)); + queue.FetchAttributes(); + dic.Add("CloudQueue", queue); + // Verification for returned values + agent.OutputValidation(comp); + Test.Assert(queue.Exists(), "queue {0} should exist!", NEW_QUEUE_NAME); + } + finally + { + // clean up + queue.DeleteIfExists(); + } + } + + internal void GetQueueTest(Agent agent) + { + string NEW_QUEUE_NAME = Utility.GenNameString("redmond-"); + Dictionary dic = Utility.GenComparisonData(StorageObjectType.Queue, NEW_QUEUE_NAME); + Collection> comp = new Collection> { dic }; + + CloudQueue queue = CommonStorageAccount.CreateCloudQueueClient().GetQueueReference(NEW_QUEUE_NAME); + // create queue if it does exist + queue.CreateIfNotExists(); + + dic.Add("CloudQueue", queue); + try + { + //--------------Get operation-------------- + Test.Assert(agent.GetAzureStorageQueue(NEW_QUEUE_NAME), Utility.GenComparisonData("GetAzureStorageQueue", true)); + // Verification for returned values + queue.FetchAttributes(); + agent.OutputValidation(comp); + } + finally + { + // clean up + queue.DeleteIfExists(); + } + } + + internal void RemoveQueueTest(Agent agent) + { + string NEW_QUEUE_NAME = Utility.GenNameString("redmond-"); + + // create queue if it does exist + CloudQueue queue = CommonStorageAccount.CreateCloudQueueClient().GetQueueReference(NEW_QUEUE_NAME); + queue.CreateIfNotExists(); + + try + { + //--------------Remove operation-------------- + Test.Assert(agent.RemoveAzureStorageQueue(NEW_QUEUE_NAME), Utility.GenComparisonData("RemoveAzureStorageQueue", true)); + Test.Assert(!queue.Exists(), "queue {0} should not exist!", NEW_QUEUE_NAME); + } + finally + { + // clean up + queue.DeleteIfExists(); + } + } + + /// + /// Parameters: + /// Block: + /// True for BlockBlob, false for PageBlob + /// + internal void UploadBlobTest(Agent agent, string UploadFilePath, Microsoft.WindowsAzure.Storage.Blob.BlobType Type) + { + string NEW_CONTAINER_NAME = Utility.GenNameString("upload-"); + string blobName = Path.GetFileName(UploadFilePath); + + Collection> comp = new Collection>(); + Dictionary dic = Utility.GenComparisonData(StorageObjectType.Blob, blobName); + + dic["BlobType"] = Type; + comp.Add(dic); + + // create the container + StorageBlob.CloudBlobContainer container = CommonStorageAccount.CreateCloudBlobClient().GetContainerReference(NEW_CONTAINER_NAME); + container.CreateIfNotExists(); + + try + { + //--------------Upload operation-------------- + Test.Assert(agent.SetAzureStorageBlobContent(UploadFilePath, NEW_CONTAINER_NAME, Type), Utility.GenComparisonData("SendAzureStorageBlob", true)); + + StorageBlob.ICloudBlob blob = CommonBlobHelper.QueryBlob(NEW_CONTAINER_NAME, blobName); + CloudBlobUtil.PackBlobCompareData(blob, dic); + // Verification for returned values + agent.OutputValidation(comp); + Test.Assert(blob != null && blob.Exists(), "blob " + blobName + " should exist!"); + } + finally + { + // cleanup + container.DeleteIfExists(); + } + } + + /// + /// Parameters: + /// Block: + /// True for BlockBlob, false for PageBlob + /// + internal void GetBlobTest(Agent agent, string UploadFilePath, Microsoft.WindowsAzure.Storage.Blob.BlobType Type) + { + string NEW_CONTAINER_NAME = Utility.GenNameString("upload-"); + string blobName = Path.GetFileName(UploadFilePath); + + Collection> comp = new Collection>(); + Dictionary dic = Utility.GenComparisonData(StorageObjectType.Blob, blobName); + + dic["BlobType"] = Type; + comp.Add(dic); + + // create the container + StorageBlob.CloudBlobContainer container = CommonStorageAccount.CreateCloudBlobClient().GetContainerReference(NEW_CONTAINER_NAME); + container.CreateIfNotExists(); + + try + { + bool bSuccess = false; + // upload the blob file + if (Type == Microsoft.WindowsAzure.Storage.Blob.BlobType.BlockBlob) + bSuccess = CommonBlobHelper.UploadFileToBlockBlob(NEW_CONTAINER_NAME, blobName, UploadFilePath); + else if (Type == Microsoft.WindowsAzure.Storage.Blob.BlobType.PageBlob) + bSuccess = CommonBlobHelper.UploadFileToPageBlob(NEW_CONTAINER_NAME, blobName, UploadFilePath); + Test.Assert(bSuccess, "upload file {0} to container {1} should succeed", UploadFilePath, NEW_CONTAINER_NAME); + + //--------------Get operation-------------- + Test.Assert(agent.GetAzureStorageBlob(blobName, NEW_CONTAINER_NAME), Utility.GenComparisonData("GetAzureStorageBlob", true)); + + // Verification for returned values + // get blob object using XSCL + StorageBlob.ICloudBlob blob = CommonBlobHelper.QueryBlob(NEW_CONTAINER_NAME, blobName); + blob.FetchAttributes(); + CloudBlobUtil.PackBlobCompareData(blob, dic); + dic.Add("ICloudBlob", blob); + + agent.OutputValidation(comp); + } + finally + { + // cleanup + container.DeleteIfExists(); + } + } + + /// + /// Parameters: + /// Block: + /// True for BlockBlob, false for PageBlob + /// + internal void DownloadBlobTest(Agent agent, string UploadFilePath, string DownloadDirPath, Microsoft.WindowsAzure.Storage.Blob.BlobType Type) + { + string NEW_CONTAINER_NAME = Utility.GenNameString("upload-"); + string blobName = Path.GetFileName(UploadFilePath); + + Collection> comp = new Collection>(); + Dictionary dic = Utility.GenComparisonData(StorageObjectType.Blob, blobName); + + dic["BlobType"] = Type; + comp.Add(dic); + + // create the container + StorageBlob.CloudBlobContainer container = CommonStorageAccount.CreateCloudBlobClient().GetContainerReference(NEW_CONTAINER_NAME); + container.CreateIfNotExists(); + + try + { + bool bSuccess = false; + // upload the blob file + if (Type == Microsoft.WindowsAzure.Storage.Blob.BlobType.BlockBlob) + bSuccess = CommonBlobHelper.UploadFileToBlockBlob(NEW_CONTAINER_NAME, blobName, UploadFilePath); + else if (Type == Microsoft.WindowsAzure.Storage.Blob.BlobType.PageBlob) + bSuccess = CommonBlobHelper.UploadFileToPageBlob(NEW_CONTAINER_NAME, blobName, UploadFilePath); + Test.Assert(bSuccess, "upload file {0} to container {1} should succeed", UploadFilePath, NEW_CONTAINER_NAME); + + //--------------Download operation-------------- + string downloadFilePath = Path.Combine(DownloadDirPath, blobName); + Test.Assert(agent.GetAzureStorageBlobContent(blobName, downloadFilePath, NEW_CONTAINER_NAME), + Utility.GenComparisonData("GetAzureStorageBlobContent", true)); + StorageBlob.ICloudBlob blob = CommonBlobHelper.QueryBlob(NEW_CONTAINER_NAME, blobName); + CloudBlobUtil.PackBlobCompareData(blob, dic); + // Verification for returned values + agent.OutputValidation(comp); + + Test.Assert(Helper.CompareTwoFiles(downloadFilePath, UploadFilePath), + String.Format("File '{0}' should be bit-wise identicial to '{1}'", downloadFilePath, UploadFilePath)); + } + finally + { + // cleanup + container.DeleteIfExists(); + } + } + + /// + /// Parameters: + /// Block: + /// True for BlockBlob, false for PageBlob + /// + internal void RemoveBlobTest(Agent agent, string UploadFilePath, Microsoft.WindowsAzure.Storage.Blob.BlobType Type) + { + string NEW_CONTAINER_NAME = Utility.GenNameString("upload-"); + string blobName = Path.GetFileName(UploadFilePath); + + Collection> comp = new Collection>(); + Dictionary dic = Utility.GenComparisonData(StorageObjectType.Blob, blobName); + + dic["BlobType"] = Type; + comp.Add(dic); + + // create the container + StorageBlob.CloudBlobContainer container = CommonStorageAccount.CreateCloudBlobClient().GetContainerReference(NEW_CONTAINER_NAME); + container.CreateIfNotExists(); + + try + { + bool bSuccess = false; + // upload the blob file + if (Type == Microsoft.WindowsAzure.Storage.Blob.BlobType.BlockBlob) + bSuccess = CommonBlobHelper.UploadFileToBlockBlob(NEW_CONTAINER_NAME, blobName, UploadFilePath); + else if (Type == Microsoft.WindowsAzure.Storage.Blob.BlobType.PageBlob) + bSuccess = CommonBlobHelper.UploadFileToPageBlob(NEW_CONTAINER_NAME, blobName, UploadFilePath); + Test.Assert(bSuccess, "upload file {0} to container {1} should succeed", UploadFilePath, NEW_CONTAINER_NAME); + + //--------------Remove operation-------------- + Test.Assert(agent.RemoveAzureStorageBlob(blobName, NEW_CONTAINER_NAME), Utility.GenComparisonData("RemoveAzureStorageBlob", true)); + StorageBlob.ICloudBlob blob = CommonBlobHelper.QueryBlob(NEW_CONTAINER_NAME, blobName); + Test.Assert(blob == null, "blob {0} should not exist!", blobName); + } + finally + { + // cleanup + container.DeleteIfExists(); + } + } + + /// + /// Create a container and then get it using powershell cmdlet + /// + /// A CloudBlobContainer object which is returned by PowerShell + protected StorageBlob.CloudBlobContainer CreateAndPsGetARandomContainer() + { + string containerName = Utility.GenNameString("bvt"); + StorageBlob.CloudBlobContainer container = SetUpStorageAccount.CreateCloudBlobClient().GetContainerReference(containerName); + container.CreateIfNotExists(); + + try + { + PowerShellAgent agent = new PowerShellAgent(); + Test.Assert(agent.GetAzureStorageContainer(containerName), Utility.GenComparisonData("GetAzureStorageContainer", true)); + int count = 1; + Test.Assert(agent.Output.Count == count, string.Format("get container should return only 1 container, actully it's {0}", agent.Output.Count)); + return (StorageBlob.CloudBlobContainer)agent.Output[0]["CloudBlobContainer"]; + } + finally + { + // clean up + container.DeleteIfExists(); + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/CLIBlobFunc.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/CLIBlobFunc.cs new file mode 100644 index 000000000000..26aff18ca54a --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/CLIBlobFunc.cs @@ -0,0 +1,270 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Diagnostics; +using System.IO; +using Commands.Storage.ScenarioTest.Common; +using Commands.Storage.ScenarioTest.Util; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Blob; +using MS.Test.Common.MsTestLib; +using StorageTestLib; + +namespace Commands.Storage.ScenarioTest +{ + /// + /// this class contains all the functional test cases for PowerShell Blob cmdlets + /// + [TestClass] + class CLIBlobFunc + { + private static CloudStorageAccount StorageAccount; + private static CloudBlobHelper BlobHelper; + private static string BlockFilePath; + private static string PageFilePath; + + private TestContext testContextInstance; + /// + ///Gets or sets the test context which provides + ///information about and functionality for the current test run. + /// + public TestContext TestContext + { + get + { + return testContextInstance; + } + set + { + testContextInstance = value; + } + } + + #region Additional test attributes + // + //You can use the following additional attributes as you write your tests: + // + //Use ClassInitialize to run code before running the first test in the class + [ClassInitialize()] + public static void MyClassInitialize(TestContext testContext) + { + Trace.WriteLine("ClassInit"); + Test.FullClassName = testContext.FullyQualifiedTestClassName; + + StorageAccount = TestBase.GetCloudStorageAccountFromConfig(); + + //init the blob helper for blob related operations + BlobHelper = new CloudBlobHelper(StorageAccount); + + // import module + string moduleFilePath = Test.Data.Get("ModuleFilePath"); + if (moduleFilePath.Length > 0) + PowerShellAgent.ImportModule(moduleFilePath); + + // $context = New-AzureStorageContext -ConnectionString ... + PowerShellAgent.SetStorageContext(StorageAccount.ToString(true)); + + BlockFilePath = Path.Combine(Test.Data.Get("TempDir"), FileUtil.GetSpecialFileName()); + PageFilePath = Path.Combine(Test.Data.Get("TempDir"), FileUtil.GetSpecialFileName()); + FileUtil.CreateDirIfNotExits(Path.GetDirectoryName(BlockFilePath)); + FileUtil.CreateDirIfNotExits(Path.GetDirectoryName(PageFilePath)); + + // Generate block file and page file which are used for uploading + Helper.GenerateMediumFile(BlockFilePath, 1); + Helper.GenerateMediumFile(PageFilePath, 1); + } + + // + //Use ClassCleanup to run code after all tests in a class have run + [ClassCleanup()] + public static void MyClassCleanup() + { + Trace.WriteLine("ClasssCleanup"); + } + + //Use TestInitialize to run code before running each test + [TestInitialize()] + public void MyTestInitialize() + { + Trace.WriteLine("TestInit"); + Test.Start(TestContext.FullyQualifiedTestClassName, TestContext.TestName); + } + + //Use TestCleanup to run code after each test has run + [TestCleanup()] + public void MyTestCleanup() + { + Trace.WriteLine("TestCleanup"); + // do not clean up the blobs here for investigation + // every test case should do cleanup in its init + Test.End(TestContext.FullyQualifiedTestClassName, TestContext.TestName); + } + + #endregion + + [TestMethod] + [TestCategory(Tag.Function)] + public void RootBlobOperations() + { + string DownloadDirPath = Test.Data.Get("DownloadDir"); + + RootBlobOperations(new PowerShellAgent(), BlockFilePath, DownloadDirPath, Microsoft.WindowsAzure.Storage.Blob.BlobType.BlockBlob); + RootBlobOperations(new PowerShellAgent(), PageFilePath, DownloadDirPath, Microsoft.WindowsAzure.Storage.Blob.BlobType.PageBlob); + } + + [TestMethod] + [TestCategory(Tag.Function)] + public void GetNonExistingBlob() + { + GetNonExistingBlob(new PowerShellAgent()); + } + + [TestMethod] + [TestCategory(Tag.Function)] + public void RemoveNonExistingBlob() + { + RemoveNonExistingBlob(new PowerShellAgent()); + } + + /// + /// Functional Cases: + /// 1. Upload a new blob file in the root container (Set-AzureStorageBlobContent Positive 2) + /// 2. Get an existing blob in the root container (Get-AzureStorageBlob Positive 2) + /// 3. Download an existing blob in the root container (Get-AzureStorageBlobContent Positive 2) + /// 4. Remove an existing blob in the root container (Remove-AzureStorageBlob Positive 2) + /// + internal void RootBlobOperations(Agent agent, string UploadFilePath, string DownloadDirPath, Microsoft.WindowsAzure.Storage.Blob.BlobType Type) + { + const string ROOT_CONTAINER_NAME = "$root"; + string blobName = Path.GetFileName(UploadFilePath); + string downloadFilePath = Path.Combine(DownloadDirPath, blobName); + + Collection> comp = new Collection>(); + Dictionary dic = Utility.GenComparisonData(StorageObjectType.Blob, blobName); + + dic["BlobType"] = Type; + comp.Add(dic); + + // create the container + CloudBlobContainer container = StorageAccount.CreateCloudBlobClient().GetRootContainerReference(); + container.CreateIfNotExists(); + + //--------------Upload operation-------------- + Test.Assert(agent.SetAzureStorageBlobContent(UploadFilePath, ROOT_CONTAINER_NAME, Type), Utility.GenComparisonData("SendAzureStorageBlob", true)); + ICloudBlob blob = BlobHelper.QueryBlob(ROOT_CONTAINER_NAME, blobName); + blob.FetchAttributes(); + // Verification for returned values + CloudBlobUtil.PackBlobCompareData(blob, dic); + agent.OutputValidation(comp); + + Test.Assert(blob.Exists(), "blob " + blobName + " should exist!"); + + // validate the ContentType value for GetAzureStorageBlob operation + if (Type == Microsoft.WindowsAzure.Storage.Blob.BlobType.BlockBlob) + { + dic["ContentType"] = "application/octet-stream"; + } + + //--------------Get operation-------------- + Test.Assert(agent.GetAzureStorageBlob(blobName, ROOT_CONTAINER_NAME), Utility.GenComparisonData("GetAzureStorageBlob", true)); + // Verification for returned values + agent.OutputValidation(comp); + + //--------------Download operation-------------- + downloadFilePath = Path.Combine(DownloadDirPath, blobName); + Test.Assert(agent.GetAzureStorageBlobContent(blobName, downloadFilePath, ROOT_CONTAINER_NAME), + Utility.GenComparisonData("GetAzureStorageBlobContent", true)); + // Verification for returned values + agent.OutputValidation(comp); + + Test.Assert(Helper.CompareTwoFiles(downloadFilePath, UploadFilePath), + String.Format("File '{0}' should be bit-wise identicial to '{1}'", downloadFilePath, UploadFilePath)); + + //--------------Remove operation-------------- + Test.Assert(agent.RemoveAzureStorageBlob(blobName, ROOT_CONTAINER_NAME), Utility.GenComparisonData("RemoveAzureStorageBlob", true)); + blob = BlobHelper.QueryBlob(ROOT_CONTAINER_NAME, blobName); + Test.Assert(blob == null, "blob {0} should not exist!", blobName); + } + + /// + /// Negative Functional Cases : for Get-AzureStorageBlob + /// 1. Get a non-existing blob (Negative 1) + /// + internal void GetNonExistingBlob(Agent agent) + { + string CONTAINER_NAME = Utility.GenNameString("upload-"); + + // create the container + CloudBlobContainer container = StorageAccount.CreateCloudBlobClient().GetContainerReference(CONTAINER_NAME); + container.CreateIfNotExists(); + + try + { + string BLOB_NAME = Utility.GenNameString("nonexisting"); + + // Delete the blob if it exists + ICloudBlob blob = BlobHelper.QueryBlob(CONTAINER_NAME, BLOB_NAME); + if (blob != null) + blob.DeleteIfExists(); + + //--------------Get operation-------------- + Test.Assert(!agent.GetAzureStorageBlob(BLOB_NAME, CONTAINER_NAME), Utility.GenComparisonData("GetAzureStorageBlob", false)); + // Verification for returned values + Test.Assert(agent.Output.Count == 0, "Only 0 row returned : {0}", agent.Output.Count); + Test.Assert(agent.ErrorMessages[0].Equals(String.Format("Can not find blob '{0}' in container '{1}'.", BLOB_NAME, CONTAINER_NAME)), agent.ErrorMessages[0]); + } + finally + { + // cleanup + container.DeleteIfExists(); + } + } + + /// + /// Negative Functional Cases : for Remove-AzureStorageBlob + /// 1. Remove a non-existing blob (Negative 2) + /// + internal void RemoveNonExistingBlob(Agent agent) + { + string CONTAINER_NAME = Utility.GenNameString("upload-"); + string BLOB_NAME = Utility.GenNameString("nonexisting"); + + // create the container + CloudBlobContainer container = StorageAccount.CreateCloudBlobClient().GetContainerReference(CONTAINER_NAME); + container.CreateIfNotExists(); + + try + { + // Delete the blob if it exists + ICloudBlob blob = BlobHelper.QueryBlob(CONTAINER_NAME, BLOB_NAME); + if (blob != null) + blob.DeleteIfExists(); + + //--------------Remove operation-------------- + Test.Assert(!agent.RemoveAzureStorageBlob(BLOB_NAME, CONTAINER_NAME), Utility.GenComparisonData("RemoveAzureStorageBlob", false)); + // Verification for returned values + Test.Assert(agent.Output.Count == 0, "Only 0 row returned : {0}", agent.Output.Count); + Test.Assert(agent.ErrorMessages[0].Equals(String.Format("Can not find blob '{0}' in container '{1}'.", BLOB_NAME, CONTAINER_NAME)), agent.ErrorMessages[0]); + } + finally + { + container.DeleteIfExists(); + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/CLIContainerFunc.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/CLIContainerFunc.cs new file mode 100644 index 000000000000..1ae62b752a10 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/CLIContainerFunc.cs @@ -0,0 +1,492 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Diagnostics; +using System.Linq; +using System.Threading; +using Commands.Storage.ScenarioTest.Common; +using Commands.Storage.ScenarioTest.Util; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Blob; +using MS.Test.Common.MsTestLib; +using StorageTestLib; + +namespace Commands.Storage.ScenarioTest +{ + /// + /// this class contains all the functional test cases for PowerShell container cmdlets + /// + [TestClass] + class CLIContainerFunc + { + private static CloudBlobHelper BlobHelper; + private static CloudStorageAccount StorageAccount; + + private TestContext testContextInstance; + /// + ///Gets or sets the test context which provides + ///information about and functionality for the current test run. + /// + public TestContext TestContext + { + get + { + return testContextInstance; + } + set + { + testContextInstance = value; + } + } + + #region Additional test attributes + // + //You can use the following additional attributes as you write your tests: + // + //Use ClassInitialize to run code before running the first test in the class + [ClassInitialize()] + public static void MyClassInitialize(TestContext testContext) + { + Trace.WriteLine("ClassInit"); + Test.FullClassName = testContext.FullyQualifiedTestClassName; + + StorageAccount = TestBase.GetCloudStorageAccountFromConfig(); + + //init the blob helper for blob related operations + BlobHelper = new CloudBlobHelper(StorageAccount); + + // import module + string moduleFilePath = Test.Data.Get("ModuleFilePath"); + if (moduleFilePath.Length > 0) + PowerShellAgent.ImportModule(moduleFilePath); + + // $context = New-AzureStorageContext -ConnectionString ... + PowerShellAgent.SetStorageContext(StorageAccount.ToString(true)); + } + + // + //Use ClassCleanup to run code after all tests in a class have run + [ClassCleanup()] + public static void MyClassCleanup() + { + Trace.WriteLine("ClasssCleanup"); + } + + //Use TestInitialize to run code before running each test + [TestInitialize()] + public void MyTestInitialize() + { + Trace.WriteLine("TestInit"); + Test.Start(TestContext.FullyQualifiedTestClassName, TestContext.TestName); + } + + //Use TestCleanup to run code after each test has run + [TestCleanup()] + public void MyTestCleanup() + { + Trace.WriteLine("TestCleanup"); + // do not clean up the blobs here for investigation + // every test case should do cleanup in its init + Test.End(TestContext.FullyQualifiedTestClassName, TestContext.TestName); + } + + #endregion + + [TestMethod] + [TestCategory(Tag.Function)] + public void CreateInvalidContainer() + { + CreateInvalidContainer(new PowerShellAgent()); + } + + [TestMethod] + [TestCategory(Tag.Function)] + public void CreateExistingContainer() + { + CreateExistingContainer(new PowerShellAgent()); + } + + [TestMethod] + [TestCategory(Tag.Function)] + public void RootContainerOperations() + { + RootContainerOperations(new PowerShellAgent()); + } + + [TestMethod] + [TestCategory(Tag.Function)] + public void ContainerListOperations() + { + ContainerListOperations(new PowerShellAgent()); + } + + [TestMethod] + [TestCategory(Tag.Function)] + public void GetNonExistingContainer() + { + GetNonExistingContainer(new PowerShellAgent()); + } + + [TestMethod] + [TestCategory(Tag.Function)] + public void EnumerateAllContainers() + { + EnumerateAllContainers(new PowerShellAgent()); + } + + [TestMethod] + [TestCategory(Tag.Function)] + public void RemoveNonExistingContainer() + { + RemoveNonExistingContainer(new PowerShellAgent()); + } + + [TestMethod] + [TestCategory(Tag.Function)] + public void RemoveContainerWithoutForce() + { + RemoveContainerWithoutForce(new PowerShellAgent()); + } + + /// + /// Functional Cases : for New-AzureStorageContainer + /// 1. Create a list of new blob containers (Positive 2) + /// 2. Create a list of containers that some of them already exist (Negative 4) + /// + /// Functional Cases : for Get-AzureStorageContainer + /// 3. Get a list of blob containers by using wildcards in the name (Positive 2) + /// + /// Functional Cases : for Remove-AzureStorageContainer + /// 4. Remove a list of existing blob containers by using pipeline (Positive 6) + /// + internal void ContainerListOperations(Agent agent) + { + string PREFIX = Utility.GenNameString("uniqueprefix-") + "-"; + string[] CONTAINER_NAMES = new string[] { Utility.GenNameString(PREFIX), Utility.GenNameString(PREFIX), Utility.GenNameString(PREFIX) }; + + // PART_EXISTING_NAMES differs only the last element with CONTAINER_NAMES + string[] PARTLY_EXISTING_NAMES = new string[CONTAINER_NAMES.Length]; + Array.Copy(CONTAINER_NAMES, PARTLY_EXISTING_NAMES, CONTAINER_NAMES.Length - 1); + PARTLY_EXISTING_NAMES[CONTAINER_NAMES.Length - 1] = Utility.GenNameString(PREFIX); + + string[] MERGED_NAMES = CONTAINER_NAMES.Union(PARTLY_EXISTING_NAMES).ToArray(); + Array.Sort(MERGED_NAMES); + + // Generate the comparison data + Collection> comp = new Collection>(); + foreach (string name in MERGED_NAMES) + comp.Add(Utility.GenComparisonData(StorageObjectType.Container, name)); + + CloudBlobClient blobClient = StorageAccount.CreateCloudBlobClient(); + + // Check if all the above containers have been removed + foreach (string name in MERGED_NAMES) + { + CloudBlobContainer container = blobClient.GetContainerReference(name); + container.DeleteIfExists(); + } + + //--------------1. New operation-------------- + Test.Assert(agent.NewAzureStorageContainer(CONTAINER_NAMES), Utility.GenComparisonData("NewAzureStorageContainer", true)); + // Verification for returned values + Test.Assert(agent.Output.Count == CONTAINER_NAMES.Count(), "3 row returned : {0}", agent.Output.Count); + + // Check if all the above containers have been created + foreach (string name in CONTAINER_NAMES) + { + CloudBlobContainer container = blobClient.GetContainerReference(name); + Test.Assert(container.Exists(), "container {0} should exist", name); + } + + try + { + //--------------2. New operation-------------- + Test.Assert(!agent.NewAzureStorageContainer(CONTAINER_NAMES), Utility.GenComparisonData("NewAzureStorageContainer", false)); + // Verification for returned values + Test.Assert(agent.Output.Count == 0, "0 row returned : {0}", agent.Output.Count); + int i = 0; + foreach (string name in CONTAINER_NAMES) + { + Test.Assert(agent.ErrorMessages[i].Equals(String.Format("Container '{0}' already exists.", name)), agent.ErrorMessages[i]); + ++i; + } + + //--------------3. New operation-------------- + Test.Assert(!agent.NewAzureStorageContainer(PARTLY_EXISTING_NAMES), Utility.GenComparisonData("NewAzureStorageContainer", false)); + // Verification for returned values + Test.Assert(agent.Output.Count == 1, "1 row returned : {0}", agent.Output.Count); + + // Check if all the above containers have been created + foreach (string name in CONTAINER_NAMES) + { + CloudBlobContainer container = blobClient.GetContainerReference(name); + Test.Assert(container.Exists(), "container {0} should exist", name); + } + + + //--------------4. Get operation-------------- + // use wildcards + Test.Assert(agent.GetAzureStorageContainer("*" + PREFIX + "*"), Utility.GenComparisonData("GetAzureStorageContainer", true)); + // Verification for returned values + agent.OutputValidation(StorageAccount.CreateCloudBlobClient().ListContainers(PREFIX, ContainerListingDetails.All)); + + // use Prefix parameter + Test.Assert(agent.GetAzureStorageContainerByPrefix(PREFIX), Utility.GenComparisonData("GetAzureStorageContainerByPrefix", true)); + // Verification for returned values + agent.OutputValidation(StorageAccount.CreateCloudBlobClient().ListContainers(PREFIX, ContainerListingDetails.All)); + } + finally { } + + //--------------5. Remove operation-------------- + Test.Assert(agent.RemoveAzureStorageContainer(MERGED_NAMES), Utility.GenComparisonData("RemoveAzureStorageContainer", true)); + // Check if all the above containers have been removed + foreach (string name in CONTAINER_NAMES) + { + CloudBlobContainer container = blobClient.GetContainerReference(name); + Test.Assert(!container.Exists(), "container {0} should not exist", name); + } + } + + /// + /// Functional Cases: + /// 1. Create the root container (New-AzureStorageContainer Positive 4) + /// 2. Get the root container (Get-AzureStorageContainer Positive 4) + /// 3. Remove the root container (Remove-AzureStorageContainer Positive 4) + /// + internal void RootContainerOperations(Agent agent) + { + const string ROOT_CONTAINER_NAME = "$root"; + Dictionary dic = Utility.GenComparisonData(StorageObjectType.Container, ROOT_CONTAINER_NAME); + Collection> comp = new Collection> { dic }; + + // delete container if it not exists + CloudBlobContainer container = StorageAccount.CreateCloudBlobClient().GetRootContainerReference(); + bool bExists = container.Exists(); + if (bExists) + { + container.Delete(); + } + + try + { + //--------------New operation-------------- + bool created = false; + int retryCount = 0; + int maxRetryCount = 60; //retry ten minutes + + do + { + if (retryCount > 0) + { + int sleepInterval = 10 * 1000; + Test.Info("Sleep and wait for retry..."); + Thread.Sleep(sleepInterval); + Test.Info(string.Format("{0}th retry to create the $root container", retryCount)); + } + + bool successed = agent.NewAzureStorageContainer(ROOT_CONTAINER_NAME); + + if (successed) + { + Test.Info("Create $root container successfully"); + created = true; + } + else + { + if (agent.ErrorMessages.Count == 0) + { + Test.AssertFail("Can not create $root container and can't get any error messages"); + break; + } + + if (agent.ErrorMessages[0].StartsWith("The remote server returned an error: (409) Conflict.")) + { + retryCount++; + } + else + { + Test.AssertFail(string.Format("Can not create $root container. Exception: {0}", agent.ErrorMessages[0])); + break; + } + } + } + while (!created && retryCount < maxRetryCount); + + if (!created && retryCount == maxRetryCount) + { + Test.AssertFail(string.Format("Can not create $root container after {0} times retry", retryCount)); + } + + container.FetchAttributes(); + CloudBlobUtil.PackContainerCompareData(container, dic); + // Verification for returned values + agent.OutputValidation(comp); + Test.Assert(container.Exists(), "container {0} should exist!", ROOT_CONTAINER_NAME); + + //--------------Get operation-------------- + Test.Assert(agent.GetAzureStorageContainer(ROOT_CONTAINER_NAME), Utility.GenComparisonData("GetAzureStorageContainer", true)); + // Verification for returned values + agent.OutputValidation(comp); + + //--------------Remove operation-------------- + Test.Assert(agent.RemoveAzureStorageContainer(ROOT_CONTAINER_NAME), Utility.GenComparisonData("RemoveAzureStorageContainer", true)); + Test.Assert(!container.Exists(), "container {0} should not exist!", ROOT_CONTAINER_NAME); + } + finally + { + // Recover the environment + try + { + if (bExists) + { + Test.Info("Sleep for 150 seconds to wait for removing the root container"); + System.Threading.Thread.Sleep(150000); + //The following statement often throw an 409 conflict exception + container.Create(); + } + } + catch + { } + } + } + + /// + /// Negative Functional Cases : for New-AzureStorageContainer + /// 1. Create a blob container that already exists (Negative 3) + /// + internal void CreateExistingContainer(Agent agent) + { + string CONTAINER_NAME = Utility.GenNameString("existing"); + + // create container if not exists + CloudBlobContainer container = StorageAccount.CreateCloudBlobClient().GetContainerReference(CONTAINER_NAME); + container.CreateIfNotExists(); + + try + { + //--------------New operation-------------- + Test.Assert(!agent.NewAzureStorageContainer(CONTAINER_NAME), Utility.GenComparisonData("NewAzureStorageContainer", false)); + // Verification for returned values + Test.Assert(agent.Output.Count == 0, "Only 0 row returned : {0}", agent.Output.Count); + Test.Assert(agent.ErrorMessages[0].Equals(String.Format("Container '{0}' already exists.", CONTAINER_NAME)), agent.ErrorMessages[0]); + } + finally + { + // Recover the environment + container.DeleteIfExists(); + } + } + + /// + /// Negative Functional Cases : for New-AzureStorageContainer + /// 1. Create a new blob containter with an invalid blob container name (Negative 1) + /// + internal void CreateInvalidContainer(Agent agent) + { + string containerName = Utility.GenNameString("abc_"); + + //--------------New operation-------------- + Test.Assert(!agent.NewAzureStorageContainer(containerName), Utility.GenComparisonData("NewAzureStorageContainer", false)); + // Verification for returned values + Test.Assert(agent.Output.Count == 0, "Only 0 row returned : {0}", agent.Output.Count); + Test.Assert(agent.ErrorMessages[0].StartsWith(String.Format("Container name '{0}' is invalid.", containerName)), agent.ErrorMessages[0]); + } + + + /// + /// Negative Functional Cases : for Get-AzureStorageContainer + /// 1. Get a non-existing blob container (Negative 1) + /// + internal void GetNonExistingContainer(Agent agent) + { + string CONTAINER_NAME = Utility.GenNameString("nonexisting"); + + // Delete the container if it exists + CloudBlobClient blobClient = StorageAccount.CreateCloudBlobClient(); + CloudBlobContainer container = blobClient.GetContainerReference(CONTAINER_NAME); + container.DeleteIfExists(); + + //--------------Get operation-------------- + Test.Assert(!agent.GetAzureStorageContainer(CONTAINER_NAME), Utility.GenComparisonData("GetAzureStorageContainer", false)); + // Verification for returned values + Test.Assert(agent.Output.Count == 0, "Only 0 row returned : {0}", agent.Output.Count); + Test.Assert(agent.ErrorMessages[0].Equals(String.Format("Can not find the container '{0}'.", CONTAINER_NAME)), agent.ErrorMessages[0]); + } + + /// + /// Functional Cases : for Get-AzureStorageContainer + /// 1. Validate that all the containers can be enumerated (Positive 5) + /// + internal void EnumerateAllContainers(Agent agent) + { + //--------------Get operation-------------- + Test.Assert(agent.GetAzureStorageContainer(""), Utility.GenComparisonData("GetAzureStorageContainer", false)); + + // Verification for returned values + agent.OutputValidation(StorageAccount.CreateCloudBlobClient().ListContainers()); + } + + /// + /// Negative Functional Cases : for Remove-AzureStorageContainer + /// 1. Remove a non-existing blob container (Negative 2) + /// + internal void RemoveNonExistingContainer(Agent agent) + { + string CONTAINER_NAME = Utility.GenNameString("nonexisting"); + + // Delete the container if it exists + CloudBlobClient blobClient = StorageAccount.CreateCloudBlobClient(); + CloudBlobContainer container = blobClient.GetContainerReference(CONTAINER_NAME); + container.DeleteIfExists(); + + //--------------Remove operation-------------- + Test.Assert(!agent.RemoveAzureStorageContainer(CONTAINER_NAME), Utility.GenComparisonData("RemoveAzureStorageContainer", false)); + // Verification for returned values + Test.Assert(agent.Output.Count == 0, "Only 0 row returned : {0}", agent.Output.Count); + Test.Assert(agent.ErrorMessages[0].Equals(String.Format("Can not find the container '{0}'.", CONTAINER_NAME)), agent.ErrorMessages[0]); + } + + /// + /// Negative Functional Cases : for Remove-AzureStorageContainer + /// 1. Remove the blob container with blobs in it without by force (Negative 3) + /// + internal void RemoveContainerWithoutForce(Agent agent) + { + string CONTAINER_NAME = Utility.GenNameString("withoutforce-"); + + // create container if not exists + CloudBlobClient blobClient = StorageAccount.CreateCloudBlobClient(); + CloudBlobContainer container = blobClient.GetContainerReference(CONTAINER_NAME); + container.CreateIfNotExists(); + + try + { + //--------------Remove operation-------------- + Test.Assert(!agent.RemoveAzureStorageContainer(CONTAINER_NAME, false), Utility.GenComparisonData("RemoveAzureStorageContainer", false)); + // Verification for returned values + Test.Assert(agent.Output.Count == 0, "Only 0 row returned : {0}", agent.Output.Count); + Test.Assert(agent.ErrorMessages[0].StartsWith("A command that prompts the user failed because"), agent.ErrorMessages[0]); + } + finally + { + // Recover the environment + container.DeleteIfExists(); + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/CLIContextFunc.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/CLIContextFunc.cs new file mode 100644 index 000000000000..79bfa721cc00 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/CLIContextFunc.cs @@ -0,0 +1,257 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Diagnostics; +using System.IO; +using Commands.Storage.ScenarioTest.Util; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using MS.Test.Common.MsTestLib; +using StorageTestLib; +using StorageBlob = Microsoft.WindowsAzure.Storage.Blob; + +namespace Commands.Storage.ScenarioTest +{ + /// + /// this class contains all the account related functional test cases for PowerShell cmdlets + /// + [TestClass] + class CLIContextFunc + { + private static string BlockFilePath; + private static string PageFilePath; + + private TestContext testContextInstance; + private static string INVALID_ACCOUNT_NAME = "invalid"; + /// + ///Gets or sets the test context which provides + ///information about and functionality for the current test run. + /// + public TestContext TestContext + { + get + { + return testContextInstance; + } + set + { + testContextInstance = value; + } + } + + #region Additional test attributes + // + //You can use the following additional attributes as you write your tests: + // + //Use ClassInitialize to run code before running the first test in the class + [ClassInitialize()] + public static void MyClassInitialize(TestContext testContext) + { + Trace.WriteLine("ClassInit"); + Test.FullClassName = testContext.FullyQualifiedTestClassName; + + // import module + string moduleFilePath = Test.Data.Get("ModuleFilePath"); + if (moduleFilePath.Length > 0) + PowerShellAgent.ImportModule(moduleFilePath); + + BlockFilePath = Path.Combine(Test.Data.Get("TempDir"), FileUtil.GetSpecialFileName()); + PageFilePath = Path.Combine(Test.Data.Get("TempDir"), FileUtil.GetSpecialFileName()); + FileUtil.CreateDirIfNotExits(Path.GetDirectoryName(BlockFilePath)); + FileUtil.CreateDirIfNotExits(Path.GetDirectoryName(PageFilePath)); + + // Generate block file and page file which are used for uploading + Helper.GenerateMediumFile(BlockFilePath, 1); + Helper.GenerateMediumFile(PageFilePath, 1); + } + + // + //Use ClassCleanup to run code after all tests in a class have run + [ClassCleanup()] + public static void MyClassCleanup() + { + Trace.WriteLine("ClasssCleanup"); + } + + //Use TestInitialize to run code before running each test + [TestInitialize()] + public void MyTestInitialize() + { + Trace.WriteLine("TestInit"); + Test.Start(TestContext.FullyQualifiedTestClassName, TestContext.TestName); + } + + //Use TestCleanup to run code after each test has run + [TestCleanup()] + public void MyTestCleanup() + { + Trace.WriteLine("TestCleanup"); + // do not clean up the blobs here for investigation + // every test case should do cleanup in its init + Test.End(TestContext.FullyQualifiedTestClassName, TestContext.TestName); + } + + #endregion + + /// + /// Functional case : for context + /// + [TestMethod] + [TestCategory(Tag.Function)] + public void StorageContextTest() + { + StorageContextTest(new PowerShellAgent()); + } + + /// + /// Negative Functional case : + /// Use an invalid account to run all cmdlets (Negative 2) + /// + [TestMethod] + [TestCategory(Tag.Function)] + public void UseInvalidAccount() + { + Agent agent = new PowerShellAgent(); + + // Create an invalid account + string StorageAccountKey = Test.Data.Get("StorageAccountKey"); + PowerShellAgent.SetStorageContext(INVALID_ACCOUNT_NAME, StorageAccountKey); + + //TODO The test is too large, need to split it into different tests + StorageContainerTest(agent); + + StorageQueueTest(agent); + StorageTableTest(agent); + + string BlockFilePath = Path.Combine(Test.Data.Get("TempDir"), FileUtil.GetSpecialFileName()); + string PageFilePath = Path.Combine(Test.Data.Get("TempDir"), FileUtil.GetSpecialFileName()); + FileUtil.CreateDirIfNotExits(Path.GetDirectoryName(BlockFilePath)); + FileUtil.CreateDirIfNotExits(Path.GetDirectoryName(PageFilePath)); + // Generate block file and page file which are used for uploading + Helper.GenerateMediumFile(BlockFilePath, 1); + Helper.GenerateMediumFile(PageFilePath, 1); + + StorageBlobTest(agent, BlockFilePath, StorageBlob.BlobType.BlockBlob); + StorageBlobTest(agent, PageFilePath, StorageBlob.BlobType.PageBlob); + } + + internal void StorageContextTest(Agent agent) + { + string StorageAccountName = Test.Data.Get("StorageAccountName"); + string StorageAccountKey = Test.Data.Get("StorageAccountKey"); + string StorageEndPoint = Test.Data.Get("StorageEndPoint"); + + Collection> comp = new Collection>(); + bool useHttps = true; //default protocol is https + string[] endPoints = Utility.GetStorageEndPoints(StorageAccountName, useHttps, StorageEndPoint); + comp.Add(new Dictionary{ + {"StorageAccountName", StorageAccountName}, + {"BlobEndPoint", endPoints[0]}, + {"QueueEndPoint", endPoints[1]}, + {"TableEndPoint", endPoints[2]} + }); + + //--------------New operation-------------- + Test.Assert(agent.NewAzureStorageContext(StorageAccountName, StorageAccountKey, StorageEndPoint), Utility.GenComparisonData("NewAzureStorageContext", true)); + // Verification for returned values + agent.OutputValidation(comp); + } + + internal void StorageContainerTest(Agent agent) + { + string NEW_CONTAINER_NAME = Utility.GenNameString("astoria-"); + + //--------------New operation-------------- + Test.Assert(!agent.NewAzureStorageContainer(NEW_CONTAINER_NAME), Utility.GenComparisonData("NewAzureStorageContainer", false)); + CheckErrorOutput(agent); + + //--------------Get operation-------------- + Test.Assert(!agent.GetAzureStorageContainer(NEW_CONTAINER_NAME), Utility.GenComparisonData("GetAzureStorageContainer", false)); + CheckErrorOutput(agent); + + //--------------Set operation-------------- + Test.Assert(!agent.SetAzureStorageContainerACL(NEW_CONTAINER_NAME, StorageBlob.BlobContainerPublicAccessType.Blob), + "SetAzureStorageContainerACL operation should fail"); + CheckErrorOutput(agent); + + Test.Assert(!agent.SetAzureStorageContainerACL(NEW_CONTAINER_NAME, StorageBlob.BlobContainerPublicAccessType.Container), + "SetAzureStorageContainerACL operation should fail"); + CheckErrorOutput(agent); + } + + internal void StorageBlobTest(Agent agent, string FilePath, StorageBlob.BlobType Type) + { + string NEW_CONTAINER_NAME = Utility.GenNameString("upload-"); + string BlobName = Path.GetFileName(FilePath); + + //--------------Upload operation-------------- + Test.Assert(!agent.SetAzureStorageBlobContent(FilePath, NEW_CONTAINER_NAME, Type), Utility.GenComparisonData("SendAzureStorageBlob", false)); + CheckErrorOutput(agent); + + //--------------Get operation-------------- + Test.Assert(!agent.GetAzureStorageBlob(BlobName, NEW_CONTAINER_NAME), Utility.GenComparisonData("GetAzureStorageBlob", false)); + CheckErrorOutput(agent); + + //--------------Remove operation-------------- + Test.Assert(!agent.RemoveAzureStorageBlob(BlobName, NEW_CONTAINER_NAME), Utility.GenComparisonData("RemoveAzureStorageBlob", false)); + CheckErrorOutput(agent); + } + + internal void StorageQueueTest(Agent agent) + { + string NEW_QUEUE_NAME = Utility.GenNameString("redmond-"); + + //--------------New operation-------------- + Test.Assert(!agent.NewAzureStorageQueue(NEW_QUEUE_NAME), Utility.GenComparisonData("NewAzureStorageQueue", false)); + CheckErrorOutput(agent); + + //--------------Get operation-------------- + Test.Assert(!agent.GetAzureStorageQueue(NEW_QUEUE_NAME), Utility.GenComparisonData("GetAzureStorageQueue", false)); + CheckErrorOutput(agent); + + //--------------Remove operation-------------- + Test.Assert(!agent.RemoveAzureStorageQueue(NEW_QUEUE_NAME), Utility.GenComparisonData("RemoveAzureStorageQueue", false)); + CheckErrorOutput(agent); + } + + internal void StorageTableTest(Agent agent) + { + string NEW_TABLE_NAME = Utility.GenNameString("Washington"); + + //--------------New operation-------------- + Test.Assert(!agent.NewAzureStorageTable(NEW_TABLE_NAME), Utility.GenComparisonData("NewAzureStorageTable", false)); + CheckErrorOutput(agent); + + //--------------Get operation-------------- + Test.Assert(!agent.GetAzureStorageTable(NEW_TABLE_NAME), Utility.GenComparisonData("GetAzureStorageTable", false)); + CheckErrorOutput(agent); + + //--------------Remove operation-------------- + Test.Assert(!agent.RemoveAzureStorageTable(NEW_TABLE_NAME), Utility.GenComparisonData("RemoveAzureStorageTable", false)); + CheckErrorOutput(agent); + } + + internal void CheckErrorOutput(Agent agent) + { + Test.Assert(agent.Output.Count == 0, "Only 0 row returned : {0}", agent.Output.Count); + + //the same error may output different error messages in different environments + bool expectedError = agent.ErrorMessages[0].StartsWith("The remote server returned an error: (502) Bad Gateway") || + agent.ErrorMessages[0].StartsWith("The remote name could not be resolved") || + agent.ErrorMessages[0].StartsWith("The operation has timed out"); + Test.Assert(expectedError, "use invalid storage account should return 502 or time out, actually it's {0}", agent.ErrorMessages[0]); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/CLIQueueFunc.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/CLIQueueFunc.cs new file mode 100644 index 000000000000..1e0ec95b5cce --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/CLIQueueFunc.cs @@ -0,0 +1,418 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Diagnostics; +using System.Linq; +using Commands.Storage.ScenarioTest.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Queue; +using Microsoft.WindowsAzure.Storage.Queue.Protocol; +using MS.Test.Common.MsTestLib; +using StorageTestLib; + +namespace Commands.Storage.ScenarioTest +{ + /// + /// this class contains all the functional test cases for PowerShell Queue cmdlets + /// + [TestClass] + class CLIQueueFunc + { + private static CloudStorageAccount _StorageAccount; + + private TestContext testContextInstance; + /// + ///Gets or sets the test context which provides + ///information about and functionality for the current test run. + /// + public TestContext TestContext + { + get + { + return testContextInstance; + } + set + { + testContextInstance = value; + } + } + + #region Additional test attributes + // + //You can use the following additional attributes as you write your tests: + // + //Use ClassInitialize to run code before running the first test in the class + [ClassInitialize()] + public static void MyClassInitialize(TestContext testContext) + { + Trace.WriteLine("ClassInit"); + Test.FullClassName = testContext.FullyQualifiedTestClassName; + + _StorageAccount = TestBase.GetCloudStorageAccountFromConfig(); + + // import module + string moduleFilePath = Test.Data.Get("ModuleFilePath"); + if (moduleFilePath.Length > 0) + PowerShellAgent.ImportModule(moduleFilePath); + + // $context = New-AzureStorageContext -ConnectionString ... + PowerShellAgent.SetStorageContext(_StorageAccount.ToString(true)); + } + + // + //Use ClassCleanup to run code after all tests in a class have run + [ClassCleanup()] + public static void MyClassCleanup() + { + Trace.WriteLine("ClasssCleanup"); + } + + //Use TestInitialize to run code before running each test + [TestInitialize()] + public void MyTestInitialize() + { + Trace.WriteLine("TestInit"); + Test.Start(TestContext.FullyQualifiedTestClassName, TestContext.TestName); + } + + //Use TestCleanup to run code after each test has run + [TestCleanup()] + public void MyTestCleanup() + { + Trace.WriteLine("TestCleanup"); + // do not clean up the blobs here for investigation + // every test case should do cleanup in its init + Test.End(TestContext.FullyQualifiedTestClassName, TestContext.TestName); + } + + #endregion + + [TestMethod] + [TestCategory(Tag.Function)] + public void CreateInvalidQueue() + { + CreateInvalidQueue(new PowerShellAgent()); + } + + [TestMethod] + [TestCategory(Tag.Function)] + public void CreateExistingQueue() + { + CreateExistingQueue(new PowerShellAgent()); + } + + [TestMethod] + [TestCategory(Tag.Function)] + public void QueueListOperations() + { + QueueListOperations(new PowerShellAgent()); + } + + [TestMethod] + [TestCategory(Tag.Function)] + public void GetNonExistingQueue() + { + GetNonExistingQueue(new PowerShellAgent()); + } + + [TestMethod] + [TestCategory(Tag.Function)] + public void EnumerateAllQueues() + { + EnumerateAllQueues(new PowerShellAgent()); + } + + [TestMethod] + [TestCategory(Tag.Function)] + public void RemoveNonExistingQueue() + { + RemoveNonExistingQueue(new PowerShellAgent()); + } + + [TestMethod] + [TestCategory(Tag.Function)] + public void RemoveQueueWithoutForce() + { + RemoveQueueWithoutForce(new PowerShellAgent()); + } + + [TestMethod] + [TestCategory(Tag.Function)] + public void GetMessageCount() + { + GetMessageCount(new PowerShellAgent()); + } + + /// + /// Functional Cases : for New-AzureStorageQueue + /// 1. Create a list of new Queues (Positive 2) + /// 2. Create a list of Queues that already exist (Negative 4) + /// 3. Create a list of Queues that some of them already exist (Negative 5) + /// + /// Functional Cases : for Get-AzureStorageQueue + /// 4. Get a list of Queues by using wildcards in the name (Positive 2) + /// + /// Functional Cases : for Remove-AzureStorageQueue + /// 5. Remove a list of existing Queues by using pipeline (Positive 3) + /// + internal void QueueListOperations(Agent agent) + { + string PREFIX = Utility.GenNameString("uniqueprefix-") + "-"; + string[] QUEUE_NAMES = new string[] { Utility.GenNameString(PREFIX), Utility.GenNameString(PREFIX), Utility.GenNameString(PREFIX) }; + + // PART_EXISTING_NAMES differs only the last element with Queue_NAMES + string[] PARTLY_EXISTING_NAMES = new string[QUEUE_NAMES.Length]; + Array.Copy(QUEUE_NAMES, PARTLY_EXISTING_NAMES, QUEUE_NAMES.Length - 1); + PARTLY_EXISTING_NAMES[QUEUE_NAMES.Length - 1] = Utility.GenNameString(PREFIX); + + string[] MERGED_NAMES = QUEUE_NAMES.Union(PARTLY_EXISTING_NAMES).ToArray(); + Array.Sort(MERGED_NAMES); + + // Generate the comparison data + Collection> comp = new Collection>(); + foreach (string name in MERGED_NAMES) + { + comp.Add(Utility.GenComparisonData(StorageObjectType.Queue, name)); + } + + CloudQueueClient queueClient = _StorageAccount.CreateCloudQueueClient(); + + // Check if all the above Queues have been removed + foreach (string name in MERGED_NAMES) + { + CloudQueue Queue = queueClient.GetQueueReference(name); + Queue.DeleteIfExists(); + } + + //--------------1. New operation-------------- + Test.Assert(agent.NewAzureStorageQueue(QUEUE_NAMES), Utility.GenComparisonData("NewAzureStorageQueue", true)); + // Verification for returned values + Test.Assert(agent.Output.Count == 3, "3 row returned : {0}", agent.Output.Count); + + // Check if all the above queues have been created + foreach (string name in QUEUE_NAMES) + { + CloudQueue queue = queueClient.GetQueueReference(name); + Test.Assert(queue.Exists(), "queue {0} should exist", name); + } + + try + { + //--------------2. New operation-------------- + Test.Assert(!agent.NewAzureStorageQueue(QUEUE_NAMES), Utility.GenComparisonData("NewAzureStorageQueue", false)); + // Verification for returned values + Test.Assert(agent.Output.Count == 0, "0 row returned : {0}", agent.Output.Count); + int i = 0; + foreach (string name in QUEUE_NAMES) + { + Test.Assert(agent.ErrorMessages[i].Equals(String.Format("Queue '{0}' already exists.", name)), agent.ErrorMessages[i]); + ++i; + } + + //--------------3. New operation-------------- + Test.Assert(!agent.NewAzureStorageQueue(PARTLY_EXISTING_NAMES), Utility.GenComparisonData("NewAzureStorageQueue", false)); + // Verification for returned values + Test.Assert(agent.Output.Count == 1, "1 row returned : {0}", agent.Output.Count); + + // Check if all the above queues have been created + foreach (string name in QUEUE_NAMES) + { + CloudQueue queue = queueClient.GetQueueReference(name); + Test.Assert(queue.Exists(), "queue {0} should exist", name); + } + + //--------------4. Get operation-------------- + Test.Assert(agent.GetAzureStorageQueue("*" + PREFIX + "*"), Utility.GenComparisonData("GetAzureStorageQueue", true)); + // Verification for returned values + agent.OutputValidation(_StorageAccount.CreateCloudQueueClient().ListQueues(PREFIX, QueueListingDetails.All)); + + // use Prefix parameter + Test.Assert(agent.GetAzureStorageQueueByPrefix(PREFIX), Utility.GenComparisonData("GetAzureStorageQueueByPrefix", true)); + // Verification for returned values + agent.OutputValidation(_StorageAccount.CreateCloudQueueClient().ListQueues(PREFIX, QueueListingDetails.All)); + } + finally { + //--------------5. Remove operation-------------- + Test.Assert(agent.RemoveAzureStorageQueue(MERGED_NAMES), Utility.GenComparisonData("RemoveAzureStorageQueue", true)); + // Check if all the above queues have been removed + foreach (string name in QUEUE_NAMES) + { + CloudQueue queue = queueClient.GetQueueReference(name); + Test.Assert(!queue.Exists(), "queue {0} should not exist", name); + } + } + } + + /// + /// Negative Functional Cases : for New-AzureStorageQueue + /// 1. Create a Queue that already exists (Negative 3) + /// + internal void CreateExistingQueue(Agent agent) + { + string QUEUE_NAME = Utility.GenNameString("existing"); + + // create queue if not exists + CloudQueue queue = _StorageAccount.CreateCloudQueueClient().GetQueueReference(QUEUE_NAME); + queue.CreateIfNotExists(); + + try + { + //--------------New operation-------------- + Test.Assert(!agent.NewAzureStorageQueue(QUEUE_NAME), Utility.GenComparisonData("NewAzureStorageQueue", false)); + // Verification for returned values + Test.Assert(agent.Output.Count == 0, "Only 0 row returned : {0}", agent.Output.Count); + Test.Assert(agent.ErrorMessages[0].Equals(String.Format("Queue '{0}' already exists.", QUEUE_NAME)), agent.ErrorMessages[0]); + } + finally + { + // Recover the environment + queue.DeleteIfExists(); + } + } + + /// + /// Negative Functional Cases : for New-AzureStorageQueue + /// 1. Create a new queue with an invalid queue name (Negative 1) + /// + internal void CreateInvalidQueue(Agent agent) + { + string queueName = Utility.GenNameString("abc_"); + + //--------------New operation-------------- + Test.Assert(!agent.NewAzureStorageQueue(queueName), Utility.GenComparisonData("NewAzureStorageQueue", false)); + // Verification for returned values + Test.Assert(agent.Output.Count == 0, "Only 0 row returned : {0}", agent.Output.Count); + Test.Assert(agent.ErrorMessages[0].StartsWith(String.Format("Queue name '{0}' is invalid.", queueName)), agent.ErrorMessages[0]); + } + + + /// + /// Negative Functional Cases : for Get-AzureStorageQueue + /// 1. Get a non-existing queue (Negative 1) + /// + internal void GetNonExistingQueue(Agent agent) + { + string QUEUE_NAME = Utility.GenNameString("nonexisting"); + + // Delete the queue if it exists + CloudQueue queue = _StorageAccount.CreateCloudQueueClient().GetQueueReference(QUEUE_NAME); + queue.DeleteIfExists(); + + //--------------Get operation-------------- + Test.Assert(!agent.GetAzureStorageQueue(QUEUE_NAME), Utility.GenComparisonData("GetAzureStorageQueue", false)); + // Verification for returned values + Test.Assert(agent.Output.Count == 0, "Only 0 row returned : {0}", agent.Output.Count); + Test.Assert(agent.ErrorMessages[0].Equals(String.Format("Can not find queue '{0}'.", QUEUE_NAME)), agent.ErrorMessages[0]); + } + + /// + /// Functional Cases : for Get-AzureStorageQueue + /// 1. Validate that all the queues can be enumerated (Positive 5) + /// + internal void EnumerateAllQueues(Agent agent) + { + //--------------Get operation-------------- + Test.Assert(agent.GetAzureStorageQueue(""), Utility.GenComparisonData("EnumerateAllQueues", false)); + + // Verification for returned values + agent.OutputValidation(_StorageAccount.CreateCloudQueueClient().ListQueues()); + } + + /// + /// Negative Functional Cases : for Remove-AzureStorageQueue + /// 1. Remove a non-existing queue (Negative 2) + /// + internal void RemoveNonExistingQueue(Agent agent) + { + string QUEUE_NAME = Utility.GenNameString("nonexisting"); + + // Delete the queue if it exists + CloudQueue queue = _StorageAccount.CreateCloudQueueClient().GetQueueReference(QUEUE_NAME); + queue.DeleteIfExists(); + + //--------------Remove operation-------------- + Test.Assert(!agent.RemoveAzureStorageQueue(QUEUE_NAME), Utility.GenComparisonData("RemoveAzureStorageQueue", false)); + // Verification for returned values + Test.Assert(agent.Output.Count == 0, "Only 0 row returned : {0}", agent.Output.Count); + Test.Assert(agent.ErrorMessages[0].Equals(String.Format("Can not find queue '{0}'.", QUEUE_NAME)), agent.ErrorMessages[0]); + } + + /// + /// Negative Functional Cases : for Remove-AzureStorageQueue + /// 1. Remove the queue without by force (Negative 3) + /// + internal void RemoveQueueWithoutForce(Agent agent) + { + string QUEUE_NAME = Utility.GenNameString("withoutforce-"); + + // create queue if not exists + CloudQueue queue = _StorageAccount.CreateCloudQueueClient().GetQueueReference(QUEUE_NAME); + queue.CreateIfNotExists(); + + try + { + //--------------Remove operation-------------- + Test.Assert(!agent.RemoveAzureStorageQueue(QUEUE_NAME, false), Utility.GenComparisonData("RemoveAzureStorageQueue", false)); + // Verification for returned values + Test.Assert(agent.Output.Count == 0, "Only 0 row returned : {0}", agent.Output.Count); + Test.Assert(agent.ErrorMessages[0].StartsWith("A command that prompts the user failed because"), agent.ErrorMessages[0]); + } + finally + { + queue.DeleteIfExists(); + } + } + + /// + /// Positive Functional Cases : for Get-AzureStorageQueue + /// 1. Get the ApproximateMessageCount of the queue (Positive 5) + /// + internal void GetMessageCount(Agent agent) + { + const int MAX_SIZE = 32; + string QUEUE_NAME = Utility.GenNameString("messagecount-"); + + // create queue if not exists + CloudQueue queue = _StorageAccount.CreateCloudQueueClient().GetQueueReference(QUEUE_NAME); + queue.CreateIfNotExists(); + // insert random count queues + Random random = new Random(); + int count = random.Next(MAX_SIZE) + 1; // count >= 1 + for (int i = 1; i <= count; ++i) + queue.AddMessage(new CloudQueueMessage("message " + i)); + + // generate comparsion data + Collection> comp = new Collection>(); + var dic = Utility.GenComparisonData(StorageObjectType.Queue, QUEUE_NAME); + dic["ApproximateMessageCount"] = count; + comp.Add(dic); + + try + { + //--------------Get operation-------------- + Test.Assert(agent.GetAzureStorageQueue(QUEUE_NAME), Utility.GenComparisonData("GetAzureStorageQueue", true)); + // Verification for returned values + agent.OutputValidation(comp); + } + finally + { + queue.DeleteIfExists(); + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/CLITableFunc.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/CLITableFunc.cs new file mode 100644 index 000000000000..8d89db4bf741 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/CLITableFunc.cs @@ -0,0 +1,375 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Diagnostics; +using System.Linq; +using Commands.Storage.ScenarioTest.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Table; +using MS.Test.Common.MsTestLib; +using StorageTestLib; + +namespace Commands.Storage.ScenarioTest +{ + /// + /// this class contains all the functional test cases for PowerShell Table cmdlets + /// + [TestClass] + class CLITableFunc + { + private static CloudStorageAccount _StorageAccount; + + private TestContext testContextInstance; + /// + ///Gets or sets the test context which provides + ///information about and functionality for the current test run. + /// + public TestContext TestContext + { + get + { + return testContextInstance; + } + set + { + testContextInstance = value; + } + } + + #region Additional test attributes + // + //You can use the following additional attributes as you write your tests: + // + //Use ClassInitialize to run code before running the first test in the class + [ClassInitialize()] + public static void MyClassInitialize(TestContext testContext) + { + Trace.WriteLine("ClassInit"); + Test.FullClassName = testContext.FullyQualifiedTestClassName; + + _StorageAccount = TestBase.GetCloudStorageAccountFromConfig(); + + // import module + string moduleFilePath = Test.Data.Get("ModuleFilePath"); + if (moduleFilePath.Length > 0) + PowerShellAgent.ImportModule(moduleFilePath); + + // $context = New-AzureStorageContext -ConnectionString ... + PowerShellAgent.SetStorageContext(_StorageAccount.ToString(true)); + } + + // + //Use ClassCleanup to run code after all tests in a class have run + [ClassCleanup()] + public static void MyClassCleanup() + { + Trace.WriteLine("ClasssCleanup"); + } + + //Use TestInitialize to run code before running each test + [TestInitialize()] + public void MyTestInitialize() + { + Trace.WriteLine("TestInit"); + Test.Start(TestContext.FullyQualifiedTestClassName, TestContext.TestName); + } + + //Use TestCleanup to run code after each test has run + [TestCleanup()] + public void MyTestCleanup() + { + Trace.WriteLine("TestCleanup"); + // do not clean up the blobs here for investigation + // every test case should do cleanup in its init + Test.End(TestContext.FullyQualifiedTestClassName, TestContext.TestName); + } + + #endregion + + [TestMethod] + [TestCategory(Tag.Function)] + public void CreateInvalidTable() + { + CreateInvalidTable(new PowerShellAgent()); + } + + [TestMethod] + [TestCategory(Tag.Function)] + public void CreateExistingTable() + { + CreateExistingTable(new PowerShellAgent()); + } + + [TestMethod] + [TestCategory(Tag.Function)] + public void TableListOperations() + { + TableListOperations(new PowerShellAgent()); + } + + [TestMethod] + [TestCategory(Tag.Function)] + public void GetNonExistingTable() + { + GetNonExistingTable(new PowerShellAgent()); + } + + [TestMethod] + [TestCategory(Tag.Function)] + public void EnumerateAllTables() + { + EnumerateAllTables(new PowerShellAgent()); + } + + [TestMethod] + [TestCategory(Tag.Function)] + public void RemoveNonExistingTable() + { + RemoveNonExistingTable(new PowerShellAgent()); + } + + [TestMethod] + [TestCategory(Tag.Function)] + public void RemoveTableWithoutForce() + { + RemoveTableWithoutForce(new PowerShellAgent()); + } + + /// + /// Functional Cases : for New-AzureStorageTable + /// 1. Create a list of new Tables (Positive 2) + /// 2. Create a list of Tables that already exist (Negative 4) + /// 3. Create a list of Tables that some of them already exist (Negative 5) + /// + /// Functional Cases : for Get-AzureStorageTable + /// 4. Get a list of Tables by using wildcards in the name (Positive 4) + /// 5. Get a list of tables by using Prefix parameter (Positive 2) + /// + /// Functional Cases : for Remove-AzureStorageTable + /// 6. Remove a list of existing Tables by using pipeline (Positive 4) + /// + internal void TableListOperations(Agent agent) + { + string PREFIX = Utility.GenNameString("uniqueprefix"); + string[] TABLE_NAMES = new string[] { Utility.GenNameString(PREFIX), Utility.GenNameString(PREFIX), Utility.GenNameString(PREFIX) }; + + // PART_EXISTING_NAMES differs only the last element with Table_NAMES + string[] PARTLY_EXISTING_NAMES = new string[TABLE_NAMES.Length]; + Array.Copy(TABLE_NAMES, PARTLY_EXISTING_NAMES, TABLE_NAMES.Length - 1); + PARTLY_EXISTING_NAMES[TABLE_NAMES.Length - 1] = Utility.GenNameString(PREFIX); + + string[] MERGED_NAMES = TABLE_NAMES.Union(PARTLY_EXISTING_NAMES).ToArray(); + Array.Sort(MERGED_NAMES); + + // Generate the comparison data + Collection> comp = new Collection>(); + foreach (string name in MERGED_NAMES) + { + comp.Add(Utility.GenComparisonData(StorageObjectType.Table, name)); + } + + CloudTableClient tableClient = _StorageAccount.CreateCloudTableClient(); + + // Check if all the above Tables have been removed + foreach (string name in MERGED_NAMES) + { + CloudTable Table = tableClient.GetTableReference(name); + Table.DeleteIfExists(); + } + + //--------------1. New operation-------------- + Test.Assert(agent.NewAzureStorageTable(TABLE_NAMES), Utility.GenComparisonData("NewAzureStorageTable", true)); + // Verification for returned values + Test.Assert(agent.Output.Count == TABLE_NAMES.Count(), "{0} row returned : {1}", TABLE_NAMES.Count(), agent.Output.Count); + + // Check if all the above tables have been created + foreach (string name in TABLE_NAMES) + { + CloudTable table = tableClient.GetTableReference(name); + Test.Assert(table.Exists(), "table {0} should exist", name); + } + + try + { + //--------------2. New operation-------------- + Test.Assert(!agent.NewAzureStorageTable(TABLE_NAMES), Utility.GenComparisonData("NewAzureStorageTable", false)); + // Verification for returned values + Test.Assert(agent.Output.Count == 0, "0 row returned : {0}", agent.Output.Count); + int i = 0; + foreach (string name in TABLE_NAMES) + { + Test.Assert(agent.ErrorMessages[i].Equals(String.Format("Table '{0}' already exists.", name)), agent.ErrorMessages[i]); + ++i; + } + + //--------------3. New operation-------------- + Test.Assert(!agent.NewAzureStorageTable(PARTLY_EXISTING_NAMES), Utility.GenComparisonData("NewAzureStorageTable", false)); + // Verification for returned values + Test.Assert(agent.Output.Count == 1, "1 row returned : {0}", agent.Output.Count); + + // Check if all the above tables have been created + foreach (string name in TABLE_NAMES) + { + CloudTable table = tableClient.GetTableReference(name); + Test.Assert(table.Exists(), "table {0} should exist", name); + } + + //--------------4. Get operation-------------- + Test.Assert(agent.GetAzureStorageTable("*" + PREFIX + "*"), Utility.GenComparisonData("GetAzureStorageTable", true)); + // Verification for returned values + agent.OutputValidation(_StorageAccount.CreateCloudTableClient().ListTables(PREFIX)); + + // use Prefix parameter + Test.Assert(agent.GetAzureStorageTableByPrefix(PREFIX), Utility.GenComparisonData("GetAzureStorageTableByPrefix", true)); + // Verification for returned values + agent.OutputValidation(_StorageAccount.CreateCloudTableClient().ListTables(PREFIX)); + } + finally { + //--------------5. Remove operation-------------- + Test.Assert(agent.RemoveAzureStorageTable(MERGED_NAMES), Utility.GenComparisonData("RemoveAzureStorageTable", true)); + // Check if all the above tables have been removed + foreach (string name in TABLE_NAMES) + { + CloudTable table = tableClient.GetTableReference(name); + Test.Assert(!table.Exists(), "table {0} should not exist", name); + } + } + } + + /// + /// Negative Functional Cases : for New-AzureStorageTable + /// 1. Create a Table that already exists (Negative 3) + /// + internal void CreateExistingTable(Agent agent) + { + string TABLE_NAME = Utility.GenNameString("existing"); + + // create table if not exists + CloudTable table = _StorageAccount.CreateCloudTableClient().GetTableReference(TABLE_NAME); + table.CreateIfNotExists(); + + try + { + //--------------New operation-------------- + Test.Assert(!agent.NewAzureStorageTable(TABLE_NAME), Utility.GenComparisonData("NewAzureStorageTable", false)); + // Verification for returned values + Test.Assert(agent.Output.Count == 0, "Only 0 row returned : {0}", agent.Output.Count); + Test.Assert(agent.ErrorMessages[0].Equals(String.Format("Table '{0}' already exists.", TABLE_NAME)), agent.ErrorMessages[0]); + } + finally + { + // Recover the environment + table.DeleteIfExists(); + } + } + + /// + /// Negative Functional Cases : for New-AzureStorageTable + /// 1. Create a new table with an invalid table name (Negative 1) + /// + internal void CreateInvalidTable(Agent agent) + { + string tableName = Utility.GenNameString("abc_"); + + //--------------New operation-------------- + Test.Assert(!agent.NewAzureStorageTable(tableName), Utility.GenComparisonData("NewAzureStorageTable", false)); + // Verification for returned values + Test.Assert(agent.Output.Count == 0, "Only 0 row returned : {0}", agent.Output.Count); + Test.Assert(agent.ErrorMessages[0].StartsWith(String.Format("Table name '{0}' is invalid.", tableName)), agent.ErrorMessages[0]); + } + + + /// + /// Negative Functional Cases : for Get-AzureStorageTable + /// 1. Get a non-existing table (Negative 1) + /// + internal void GetNonExistingTable(Agent agent) + { + string TABLE_NAME = Utility.GenNameString("nonexisting"); + + // Delete the table if it exists + CloudTable table = _StorageAccount.CreateCloudTableClient().GetTableReference(TABLE_NAME); + table.DeleteIfExists(); + + //--------------Get operation-------------- + Test.Assert(!agent.GetAzureStorageTable(TABLE_NAME), Utility.GenComparisonData("GetAzureStorageTable", false)); + // Verification for returned values + Test.Assert(agent.Output.Count == 0, "Only 0 row returned : {0}", agent.Output.Count); + Test.Assert(agent.ErrorMessages[0].Equals(String.Format("Can not find table '{0}'.", TABLE_NAME)), agent.ErrorMessages[0]); + } + + /// + /// Functional Cases : for Get-AzureStorageTable + /// 1. Validate that all the tables can be enumerated (Positive 5) + /// + internal void EnumerateAllTables(Agent agent) + { + //--------------Get operation-------------- + Test.Assert(agent.GetAzureStorageTable(""), Utility.GenComparisonData("EnumerateAllTables", false)); + + // Verification for returned values + agent.OutputValidation(_StorageAccount.CreateCloudTableClient().ListTables()); + } + + /// + /// Negative Functional Cases : for Remove-AzureStorageTable + /// 1. Remove a non-existing table (Negative 2) + /// + internal void RemoveNonExistingTable(Agent agent) + { + string TABLE_NAME = Utility.GenNameString("nonexisting"); + + // Delete the table if it exists + CloudTable table = _StorageAccount.CreateCloudTableClient().GetTableReference(TABLE_NAME); + table.DeleteIfExists(); + + //--------------Remove operation-------------- + Test.Assert(!agent.RemoveAzureStorageTable(TABLE_NAME), Utility.GenComparisonData("RemoveAzureStorageTable", false)); + // Verification for returned values + Test.Assert(agent.Output.Count == 0, "Only 0 row returned : {0}", agent.Output.Count); + Test.Assert(agent.ErrorMessages[0].Equals(String.Format("Can not find table '{0}'.", TABLE_NAME)), agent.ErrorMessages[0]); + } + + /// + /// Negative Functional Cases : for Remove-AzureStorageTable + /// 1. Remove the table without by force (Negative 3) + /// + internal void RemoveTableWithoutForce(Agent agent) + { + string TABLE_NAME = Utility.GenNameString("withoutforce"); + + // create table if not exists + CloudTable table = _StorageAccount.CreateCloudTableClient().GetTableReference(TABLE_NAME); + table.CreateIfNotExists(); + + try + { + //--------------Remove operation-------------- + Test.Assert(!agent.RemoveAzureStorageTable(TABLE_NAME, false), Utility.GenComparisonData("RemoveAzureStorageTable", false)); + // Verification for returned values + Test.Assert(agent.Output.Count == 0, "Only 0 row returned : {0}", agent.Output.Count); + Test.Assert(agent.ErrorMessages[0].StartsWith("A command that prompts the user failed because"), agent.ErrorMessages[0]); + } + finally + { + // Recover the environment + table.DeleteIfExists(); + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Commands.Storage.ScenarioTest.csproj b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Commands.Storage.ScenarioTest.csproj new file mode 100644 index 000000000000..211922992f6d --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Commands.Storage.ScenarioTest.csproj @@ -0,0 +1,242 @@ + + + + Debug + AnyCPU + {4BC0E3D3-6EDD-43AA-8F15-DCFED8ACC93D} + Library + Properties + Management.Storage.ScenarioTest + CLITest + v4.5 + 512 + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages + False + UnitTest + ..\..\..\ + true + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + bin\Release\ + TRACE;SIGN + true + pdbonly + AnyCPU + prompt + false + + + true + MSSharedLibKey.snk + true + true + false + + + + ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll + + + ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll + + + ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll + + + False + ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll + + + False + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + + + + + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Designer + + + + + {c1bda476-a5cc-4394-914d-48b0ec31a710} + Commands.ScenarioTests.Common + + + {a3965b66-5a3e-4b8c-9574-28e5958d4828} + Commands.ScenarioTest + + + {9d5a40ca-5594-4f5c-8230-7adf7cc0558e} + Commands.Storage.MsTest2 + + + {08cf7da7-0392-4a19-b79b-e1ff67cdb81a} + Commands.Storage + + + {ce97967b-7479-43b9-9561-776232ac5d47} + Commands.Storage.MsTestLib + + + {0a513849-2690-4d07-8de7-0ace39645d12} + Commands.Storage.StorageTestLib + + + + + PreserveNewest + + + + PreserveNewest + + + + + + + False + + + False + + + False + + + False + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Common/TestBase.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Common/TestBase.cs new file mode 100644 index 000000000000..d680c986c536 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Common/TestBase.cs @@ -0,0 +1,299 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Commands.Storage.ScenarioTest.Util; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Auth; +using MS.Test.Common.MsTestLib; + +namespace Commands.Storage.ScenarioTest.Common +{ + /// + /// general settings for container related tests + /// + [TestClass] + public abstract class TestBase + { + protected static CloudBlobUtil blobUtil; + protected static CloudQueueUtil queueUtil; + protected static CloudTableUtil tableUtil; + protected static CloudStorageAccount StorageAccount; + protected static Random random; + private static int ContainerInitCount = 0; + private static int QueueInitCount = 0; + private static int TableInitCount = 0; + + public const string ConfirmExceptionMessage = "The host was attempting to request confirmation"; + + protected Agent agent; + + private TestContext testContextInstance; + + /// + ///Gets or sets the test context which provides + ///information about and functionality for the current test run. + /// + public TestContext TestContext + { + get + { + return testContextInstance; + } + set + { + testContextInstance = value; + } + } + + #region Additional test attributes + + /// + /// Use ClassInitialize to run code before running the first test in the class + /// the derived class should use it's custom class initialize + /// first init common bvt + /// second set storage context in powershell + /// + /// Test context object + [ClassInitialize()] + public static void TestClassInitialize(TestContext testContext) + { + Test.Info(string.Format("{0} Class Initialize", testContext.FullyQualifiedTestClassName)); + Test.FullClassName = testContext.FullyQualifiedTestClassName; + + StorageAccount = GetCloudStorageAccountFromConfig(); + + //init the blob helper for blob related operations + blobUtil = new CloudBlobUtil(StorageAccount); + queueUtil = new CloudQueueUtil(StorageAccount); + tableUtil = new CloudTableUtil(StorageAccount); + + // import module + string moduleFilePath = Test.Data.Get("ModuleFilePath"); + PowerShellAgent.ImportModule(moduleFilePath); + + //set the default storage context + PowerShellAgent.SetStorageContext(StorageAccount.ToString(true)); + + random = new Random(); + ContainerInitCount = blobUtil.GetExistingContainerCount(); + QueueInitCount = queueUtil.GetExistingQueueCount(); + TableInitCount = tableUtil.GetExistingTableCount(); + } + + // + //Use ClassCleanup to run code after all tests in a class have run + [ClassCleanup()] + public static void TestClassCleanup() + { + int count = blobUtil.GetExistingContainerCount(); + + string message = string.Format("there are {0} containers before running mutiple unit tests, after is {1}", ContainerInitCount, count); + AssertCleanupOnStorageObject("containers", ContainerInitCount, count); + + count = queueUtil.GetExistingQueueCount(); + AssertCleanupOnStorageObject("queues", QueueInitCount, count); + + count = tableUtil.GetExistingTableCount(); + + AssertCleanupOnStorageObject("tables", TableInitCount, count); + + Test.Info("Test Class Cleanup"); + } + + private static void AssertCleanupOnStorageObject(string name, int initCount, int cleanUpCount) + { + string message = string.Format("there are {0} {1} before running mutiple unit tests, after is {2}", initCount, name, cleanUpCount); + + if (initCount == cleanUpCount) + { + Test.Info(message); + } + else + { + Test.Warn(message); + } + } + + /// + /// Get Cloud storage account from Test.xml + /// + /// Config key. Will return the default storage account when it's empty. + /// Use https or not + /// Cloud Storage Account with specified end point + public static CloudStorageAccount GetCloudStorageAccountFromConfig(string configKey = "", bool useHttps = true) + { + string StorageAccountName = Test.Data.Get(string.Format("{0}StorageAccountName", configKey)); + string StorageAccountKey = Test.Data.Get(string.Format("{0}StorageAccountKey", configKey)); + string StorageEndPoint = Test.Data.Get(string.Format("{0}StorageEndPoint", configKey)); + StorageCredentials credential = new StorageCredentials(StorageAccountName, StorageAccountKey); + return Utility.GetStorageAccountWithEndPoint(credential, useHttps, StorageEndPoint); + } + + /// + /// on test setup + /// the derived class could use it to run it owned set up settings. + /// + public virtual void OnTestSetup() + { + } + + /// + /// on test clean up + /// the derived class could use it to run it owned clean up settings. + /// + public virtual void OnTestCleanUp() + { + } + + /// + /// test initialize + /// + [TestInitialize()] + public void InitAgent() + { + agent = new PowerShellAgent(); + Test.Start(TestContext.FullyQualifiedTestClassName, TestContext.TestName); + OnTestSetup(); + } + + /// + /// test clean up + /// + [TestCleanup()] + public void CleanAgent() + { + OnTestCleanUp(); + agent = null; + Test.End(TestContext.FullyQualifiedTestClassName, TestContext.TestName); + } + + #endregion + + /// + /// Expect returned error message is the specified error message + /// + /// Expect error message + public void ExpectedEqualErrorMessage(string expectErrorMessage) + { + Test.Assert(agent.ErrorMessages.Count > 0, "Should return error message"); + + if (agent.ErrorMessages.Count == 0) + { + return; + } + + Test.Assert(expectErrorMessage == agent.ErrorMessages[0], String.Format("Expected error message: {0}, and actually it's {1}", expectErrorMessage, agent.ErrorMessages[0])); + } + + /// + /// Expect returned error message starts with the specified error message + /// + /// Expect error message + public void ExpectedStartsWithErrorMessage(string errorMessage) + { + Test.Assert(agent.ErrorMessages.Count > 0, "Should return error message"); + + if (agent.ErrorMessages.Count == 0) + { + return; + } + + Test.Assert(agent.ErrorMessages[0].StartsWith(errorMessage), String.Format("Expected error message should start with {0}, and actualy it's {1}", errorMessage, agent.ErrorMessages[0])); + } + + /// + /// Expect returned error message contain the specified error message + /// + /// Expect error message + public void ExpectedContainErrorMessage(string errorMessage) + { + Test.Assert(agent.ErrorMessages.Count > 0, "Should return error message"); + + if (agent.ErrorMessages.Count == 0) + { + return; + } + + Test.Assert(agent.ErrorMessages[0].IndexOf(errorMessage) != -1, String.Format("Expected error message should contain {0}, and actualy it's {1}", errorMessage, agent.ErrorMessages[0])); + } + + /// + /// Expect two string are equal + /// + /// expect string + /// returned string + /// Compare name + public static void ExpectEqual(string expect, string actually, string name) + { + Test.Assert(expect == actually, string.Format("{0} should be {1}, and actully it's {2}", name, expect, actually)); + } + + /// + /// Expect two double are equal + /// + /// expect double + /// returned double + /// Compare name + public static void ExpectEqual(double expect, double actually, string name) + { + Test.Assert(expect == actually, string.Format("{0} should be {1}, and actully it's {2}", name, expect, actually)); + } + + /// + /// Expect two string are not equal + /// + /// expect string + /// returned string + /// Compare name + public static void ExpectNotEqual(string expect, string actually, string name) + { + Test.Assert(expect != actually, string.Format("{0} should not be {1}, and actully it's {2}", name, expect, actually)); + } + + /// + /// Expect two double are not equal + /// + /// expect double + /// returned double + /// Compare name + public static void ExpectNotEqual(double expect, double actually, string name) + { + Test.Assert(expect != actually, string.Format("{0} should not be {1}, and actully it's {2}", name, expect, actually)); + } + + /// + /// Generate a random small int number for test + /// + /// Random int + public int GetRandomTestCount() + { + int minCount = 1; + int maxCount = 10; + return random.Next(minCount, maxCount); + } + + /// + /// Generate a random bool + /// + /// Random bool + public bool GetRandomBool() + { + int switchKey = 0; + switchKey = random.Next(0, 2); + return switchKey == 0; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Blob/GetBlob.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Blob/GetBlob.cs new file mode 100644 index 000000000000..d22885b2f801 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Blob/GetBlob.cs @@ -0,0 +1,491 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Threading; +using Commands.Storage.ScenarioTest.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Storage.Blob; +using MS.Test.Common.MsTestLib; +using StorageTestLib; + +namespace Commands.Storage.ScenarioTest.Functional.Blob +{ + /// + /// functional test for Get-AzureStorageBlob + /// + [TestClass] + class GetBlob : TestBase + { + [ClassInitialize()] + public static void GetBlobClassInit(TestContext testContext) + { + TestBase.TestClassInitialize(testContext); + } + + [ClassCleanup()] + public static void GetBlobClassCleanup() + { + TestBase.TestClassCleanup(); + } + + /// + /// get blobs in specified container + /// 8.12 Get-AzureStorageBlob Positive Functional Cases + /// 3. Get an existing blob using the container name specified by the param + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.GetBlob)] + public void GetMultipleBlobByName() + { + string containerName = Utility.GenNameString("container"); + CloudBlobContainer container = blobUtil.CreateContainer(containerName); + + try + { + List blobNames = new List(); + int count = random.Next(1, 5); + + for (int i = 0; i < count; i++) + { + blobNames.Add(Utility.GenNameString("blob")); + } + + List blobs = blobUtil.CreateRandomBlob(container, blobNames); + + Test.Assert(agent.GetAzureStorageBlob(string.Empty, containerName), Utility.GenComparisonData("Get-AzureStorageBlob", true)); + agent.OutputValidation(blobs); + } + finally + { + blobUtil.RemoveContainer(containerName); + } + } + + /// + /// get one blob in specified container + /// 8.12 Get-AzureStorageBlob Positive Functional Cases + /// 3. Get an existing blob using the container name specified by the param + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.GetBlob)] + public void GetBlobByName() + { + string containerName = Utility.GenNameString("container"); + + try + { + string pageBlobName = Utility.GenNameString("page"); + string blockBlobName = Utility.GenNameString("block"); + CloudBlobContainer container = blobUtil.CreateContainer(containerName); + + List blobNames = new List(); + int count = random.Next(1, 5); + + for (int i = 0; i < count; i++) + { + blobNames.Add(Utility.GenNameString("blob")); + } + + List blobs = blobUtil.CreateRandomBlob(container, blobNames); + ICloudBlob pageBlob = blobUtil.CreatePageBlob(container, pageBlobName); + + Test.Assert(agent.GetAzureStorageBlob(pageBlobName, containerName), Utility.GenComparisonData("Get-AzureStorageBlob", true)); + agent.OutputValidation(new List() { pageBlob }); + + ICloudBlob blockBlob = blobUtil.CreateBlockBlob(container, blockBlobName); + Test.Assert(agent.GetAzureStorageBlob(pageBlobName, containerName), Utility.GenComparisonData("Get-AzureStorageBlob", true)); + agent.OutputValidation(new List() { pageBlob }); + } + finally + { + blobUtil.RemoveContainer(containerName); + } + } + + /// + /// get specified blob by container pipeline + /// 8.12 Get-AzureStorageBlob Positive Functional Cases + /// 4. Get an existing blob using the container object retrieved by Get-AzureContainer + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.GetBlob)] + public void GetBlobByContainerPipeline() + { + //TODO add string.empty as the blob name + //TODO add invalid container pipeline + string containerName = Utility.GenNameString("container"); + string blobName = Utility.GenNameString("blob"); + CloudBlobContainer container = blobUtil.CreateContainer(containerName); + + try + { + ICloudBlob blob = blobUtil.CreatePageBlob(container, blobName); + string cmd = String.Format("Get-AzureStorageContainer {0}", containerName); + ((PowerShellAgent)agent).AddPipelineScript(cmd); + + Test.Assert(agent.GetAzureStorageBlob(blobName, string.Empty), Utility.GenComparisonData("Get-AzureStorageContainer | Get-AzureStorageBlob", true)); + Test.Assert(agent.Output.Count == 1, String.Format("Want to retrieve {0} page blob, but retrieved {1} page blobs", 1, agent.Output.Count)); + + agent.OutputValidation(new List() { blob }); + + blobName = Utility.GenNameString("blob"); + blob = blobUtil.CreateBlockBlob(container, blobName); + ((PowerShellAgent)agent).AddPipelineScript(cmd); + + Test.Assert(agent.GetAzureStorageBlob(blobName, string.Empty), Utility.GenComparisonData("Get-AzureStorageContainer | Get-AzureStorageBlob", true)); + Test.Assert(agent.Output.Count == 1, String.Format("Want to retrieve {0} block blob, but retrieved {1} block blobs", 1, agent.Output.Count)); + + agent.OutputValidation(new List() { blob }); + } + finally + { + blobUtil.RemoveContainer(containerName); + } + } + + /// + /// get specified blob by container pipeline + /// 8.12 Get-AzureStorageBlob Positive Functional Cases + /// 5. Validate that all the blobs in one container can be enumerated + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.GetBlob)] + public void GetAllBlobsInSpecifiedContainer() + { + string containerName = Utility.GenNameString("container"); + string blobName = Utility.GenNameString("blob"); + CloudBlobContainer container = blobUtil.CreateContainer(containerName); + + try + { + int count = random.Next(1, 5); + List blobNames = new List(); + for (int i = 0; i < count; i++) + { + blobNames.Add(Utility.GenNameString("blob")); + } + + List blobs = blobUtil.CreateRandomBlob(container, blobNames); + + Test.Assert(agent.GetAzureStorageBlob(string.Empty, containerName), Utility.GenComparisonData("Get-AzureStorageBlob with empty blob name", true)); + Test.Assert(agent.Output.Count == blobNames.Count, String.Format("Want to retrieve {0} blobs, but retrieved {1} blobs", blobNames.Count, agent.Output.Count)); + + agent.OutputValidation(blobs); + } + finally + { + blobUtil.RemoveContainer(containerName); + } + } + + /// + /// get blobs by prefix + /// 8.12 Get-AzureStorageBlob Positive Functional Cases + /// 6. Get a list of blobs by using Prefix parameter + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.GetBlob)] + public void GetBlobsByPrefix() + { + string containerName = Utility.GenNameString("container"); + CloudBlobContainer container = blobUtil.CreateContainer(containerName); + + try + { + List blobNames = new List(); + + int count = random.Next(2, 4); + for (int i = 0; i < count; i++) + { + blobNames.Add(Utility.GenNameString("blobprefix")); + } + + List blobs = blobUtil.CreateRandomBlob(container, blobNames); + + Test.Assert(agent.GetAzureStorageBlobByPrefix("blobprefix", containerName), Utility.GenComparisonData("Get-AzureStorageBlob with prefix", true)); + Test.Assert(agent.Output.Count == blobs.Count, String.Format("Expect to retrieve {0} blobs, but retrieved {1} blobs", blobs.Count, agent.Output.Count)); + + agent.OutputValidation(blobs); + } + finally + { + blobUtil.RemoveContainer(containerName); + } + } + + /// + /// get blobs by wildcard + /// 8.12 Get-AzureStorageBlob Positive Functional Cases + /// 7. Get a list of blobs by using wildcards in the name + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.GetBlob)] + public void GetBlobByWildCard() + { + string containerName = Utility.GenNameString("container"); + CloudBlobContainer container = blobUtil.CreateContainer(containerName); + + try + { + List prefixes = new List(); + List noprefixes = new List(); + + int count = random.Next(2, 4); + for (int i = 0; i < count; i++) + { + prefixes.Add(Utility.GenNameString("prefix")); + } + + count = random.Next(2, 4); + for (int i = 0; i < count; i++) + { + noprefixes.Add(Utility.GenNameString("noprefix")); + } + + List prefixBlobs = blobUtil.CreateRandomBlob(container, prefixes); + List noprefixBlobs = blobUtil.CreateRandomBlob(container, noprefixes); + + Test.Assert(agent.GetAzureStorageBlob("prefix*", containerName), Utility.GenComparisonData("Get-AzureStorageBlob with wildcard", true)); + Test.Assert(agent.Output.Count == prefixBlobs.Count, String.Format("Expect to retrieve {0} blobs, actually retrieved {1} blobs", prefixBlobs.Count, agent.Output.Count)); + + agent.OutputValidation(prefixBlobs); + } + finally + { + blobUtil.RemoveContainer(containerName); + } + } + + /// + /// get snapshot blobs + /// 8.12 Get-AzureStorageBlob Positive Functional Cases + /// 8. Validate that all the blob snapshots can be enumerated + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.GetBlob)] + public void GetSnapshotBlobs() + { + string containerName = Utility.GenNameString("container"); + string pageBlobName = Utility.GenNameString("page"); + string blockBlobName = Utility.GenNameString("block"); + Test.Info("Create test container and blobs"); + CloudBlobContainer container = blobUtil.CreateContainer(containerName); + + try + { + ICloudBlob pageBlob = blobUtil.CreatePageBlob(container, pageBlobName); + ICloudBlob blockBlob = blobUtil.CreateBlockBlob(container, blockBlobName); + List blobs = new List(); + pageBlob.FetchAttributes(); + blockBlob.FetchAttributes(); + + int minSnapshot = 1; + int maxSnapshot = 5; + int count = random.Next(minSnapshot, maxSnapshot); + int snapshotInterval = 1 * 1000; + + Test.Info("Create random snapshot for specified blobs"); + + for (int i = 0; i < count; i++) + { + CloudBlockBlob snapshot = ((CloudBlockBlob)blockBlob).CreateSnapshot(); + snapshot.FetchAttributes(); + blobs.Add(snapshot); + Thread.Sleep(snapshotInterval); + } + + blobs.Add(blockBlob); + count = random.Next(minSnapshot, maxSnapshot); + for (int i = 0; i < count; i++) + { + CloudPageBlob snapshot = ((CloudPageBlob)pageBlob).CreateSnapshot(); + snapshot.FetchAttributes(); + blobs.Add(snapshot); + Thread.Sleep(snapshotInterval); + } + + blobs.Add(pageBlob); + + Test.Assert(agent.GetAzureStorageBlob(string.Empty, containerName), Utility.GenComparisonData("Get-AzureStorageBlob with snapshot blobs", true)); + Test.Assert(agent.Output.Count == blobs.Count, String.Format("Expect to retrieve {0} blobs, actually retrieved {1} blobs", blobs.Count, agent.Output.Count)); + agent.OutputValidation(blobs); + } + finally + { + blobUtil.RemoveContainer(containerName); + } + } + + /// + /// get blob with lease + /// 8.12 Get-AzureStorageBlob Positive Functional Cases + /// 9. Validate that the lease data could be listed correctly + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.GetBlob)] + public void GetBlobWithLease() + { + string containerName = Utility.GenNameString("container"); + string pageBlobName = Utility.GenNameString("page"); + string blockBlobName = Utility.GenNameString("block"); + CloudBlobContainer container = blobUtil.CreateContainer(containerName); + + try + { + ICloudBlob pageBlob = blobUtil.CreatePageBlob(container, pageBlobName); + ICloudBlob blockBlob = blobUtil.CreateBlockBlob(container, blockBlobName); + ((CloudPageBlob)pageBlob).AcquireLease(null, string.Empty); + ((CloudBlockBlob)blockBlob).AcquireLease(null, string.Empty); + pageBlob.FetchAttributes(); + blockBlob.FetchAttributes(); + + Test.Assert(agent.GetAzureStorageBlob(pageBlobName, containerName), Utility.GenComparisonData("Get-AzureStorageBlob with lease", true)); + agent.OutputValidation(new List() { pageBlob }); + + Test.Assert(agent.GetAzureStorageBlob(blockBlobName, containerName), Utility.GenComparisonData("Get-AzureStorageBlob with lease", true)); + agent.OutputValidation(new List() { blockBlob }); + } + finally + { + blobUtil.RemoveContainer(containerName); + } + } + + /// + /// get blob with lease + /// 8.12 Get-AzureStorageBlob Positive Functional Cases + /// 10. Write Metadata to the specific blob Get the Metadata from the specific blob + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.GetBlob)] + public void GetBlobWithMetadata() + { + string containerName = Utility.GenNameString("container"); + string pageBlobName = Utility.GenNameString("page"); + string blockBlobName = Utility.GenNameString("block"); + CloudBlobContainer container = blobUtil.CreateContainer(containerName); + + try + { + ICloudBlob pageBlob = blobUtil.CreatePageBlob(container, pageBlobName); + ICloudBlob blockBlob = blobUtil.CreateBlockBlob(container, blockBlobName); + pageBlob.Metadata.Add(Utility.GenNameString("GetBlobWithMetadata"), Utility.GenNameString("GetBlobWithMetadata")); + pageBlob.SetMetadata(); + blockBlob.Metadata.Add(Utility.GenNameString("GetBlobWithMetadata"), Utility.GenNameString("GetBlobWithMetadata")); + blockBlob.SetMetadata(); + + Test.Assert(agent.GetAzureStorageBlob(pageBlobName, containerName), Utility.GenComparisonData("Get-AzureStorageBlob with metadata", true)); + Test.Assert(agent.Output.Count == 1, String.Format("Expect to retrieve {0} blobs, but retrieved {1} blobs", 1, agent.Output.Count)); + agent.OutputValidation(new List() { pageBlob }); + + Test.Assert(agent.GetAzureStorageBlob(blockBlobName, containerName), Utility.GenComparisonData("Get-AzureStorageBlob with metadata", true)); + Test.Assert(agent.Output.Count == 1, String.Format("Expect to retrieve {0} blobs, but retrieved {1} blobs", 1, agent.Output.Count)); + agent.OutputValidation(new List() { blockBlob }); + } + finally + { + blobUtil.RemoveContainer(containerName); + } + } + + /// + /// get blob in subdirectory + /// 8.12 Get-AzureStorageBlob Positive Functional Cases + /// 11. Validate that blobs with a sub directory path could also be listed + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.GetBlob)] + public void GetBlobInSubdirectory() + { + //TODO add test cases for special characters + string containerName = Utility.GenNameString("container"); + string blobName = Utility.GenNameString("blob"); + string subBlobName = Utility.GenNameString(string.Format("{0}/",blobName)); + string subsubBlobName = Utility.GenNameString(string.Format("{0}/", subBlobName)); + List blobNames = new List + { + blobName, subBlobName, subsubBlobName + }; + + CloudBlobContainer container = blobUtil.CreateContainer(containerName); + + try + { + List blobs = blobUtil.CreateRandomBlob(container, blobNames); + + Test.Assert(agent.GetAzureStorageBlob(string.Empty, containerName), Utility.GenComparisonData("Get-AzureStorageBlob in sub directory", true)); + Test.Assert(agent.Output.Count == blobs.Count, String.Format("Expect to retrieve {0} blobs, but retrieved {1} blobs", blobs.Count, agent.Output.Count)); + + agent.OutputValidation(blobs); + } + finally + { + blobUtil.RemoveContainer(containerName); + } + } + + /// + /// get blob in subdirectory + /// 8.12 Get-AzureStorageBlob Negative Functional Cases + /// 1. Get a non-existing blob + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.GetBlob)] + public void GetNonExistingBlob() + { + string containerName = Utility.GenNameString("container"); + string blobName = Utility.GenNameString("blob"); + List blobs = new List(); + CloudBlobContainer container = blobUtil.CreateContainer(containerName); + + try + { + ICloudBlob blob = blobUtil.CreatePageBlob(container, blobName); + + string notExistingBlobName = "notexistingblob"; + Test.Assert(!agent.GetAzureStorageBlob(notExistingBlobName, containerName), Utility.GenComparisonData("Get-AzureStorageBlob with not existing blob", false)); + Test.Assert(agent.ErrorMessages.Count == 1, "only throw an exception"); + Test.Assert(agent.ErrorMessages[0].Equals(String.Format("Can not find blob '{0}' in container '{1}'.", notExistingBlobName, containerName)), agent.ErrorMessages[0]); + } + finally + { + blobUtil.RemoveContainer(containerName); + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Blob/GetBlobContent.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Blob/GetBlobContent.cs new file mode 100644 index 000000000000..f3484c362064 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Blob/GetBlobContent.cs @@ -0,0 +1,346 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Commands.Storage.ScenarioTest.Common; +using Commands.Storage.ScenarioTest.Util; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Storage.Blob; +using MS.Test.Common.MsTestLib; +using StorageTestLib; + +namespace Commands.Storage.ScenarioTest.Functional.Blob +{ + /// + /// functional tests for Set-ContainerAcl + /// + [TestClass] + class GetBlobContent: TestBase + { + //TODO add invalid md5sum for page blob + private static string downloadDirRoot; + + private string ContainerName = string.Empty; + private string BlobName = string.Empty; + private ICloudBlob Blob = null; + private CloudBlobContainer Container = null; + + [ClassInitialize()] + public static void ClassInit(TestContext testContext) + { + TestBase.TestClassInitialize(testContext); + downloadDirRoot = Test.Data.Get("DownloadDir"); + SetupDownloadDir(); + } + + [ClassCleanup()] + public static void GetBlobContentClassCleanup() + { + TestBase.TestClassCleanup(); + } + + public override void OnTestSetup() + { + FileUtil.CleanDirectory(downloadDirRoot); + } + + /// + /// create download dir + /// + private static void SetupDownloadDir() + { + if (!Directory.Exists(downloadDirRoot)) + { + Directory.CreateDirectory(downloadDirRoot); + } + + FileUtil.CleanDirectory(downloadDirRoot); + } + + /// + /// create a random container with a random blob + /// + private void SetupTestContainerAndBlob() + { + string fileName = Utility.GenNameString("download"); + string filePath = Path.Combine(downloadDirRoot, fileName); + int minFileSize = 1; + int maxFileSize = 5; + int fileSize = random.Next(minFileSize, maxFileSize); + Helper.GenerateRandomTestFile(filePath, fileSize); + + ContainerName = Utility.GenNameString("container"); + BlobName = Utility.GenNameString("blob"); + CloudBlobContainer container = blobUtil.CreateContainer(ContainerName); + CloudBlockBlob blockBlob = container.GetBlockBlobReference(BlobName); + // Create or overwrite the "myblob" blob with contents from a local file. + using (var fileStream = System.IO.File.OpenRead(filePath)) + { + blockBlob.UploadFromStream(fileStream); + } + + File.Delete(filePath); + blockBlob.FetchAttributes(); + Blob = blockBlob; + Container = container; + } + + /// + /// clean test container and blob + /// + private void CleanupTestContainerAndBlob() + { + blobUtil.RemoveContainer(ContainerName); + FileUtil.CleanDirectory(downloadDirRoot); + ContainerName = string.Empty; + BlobName = string.Empty; + Blob = null; + Container = null; + } + + /// + /// get blob content by container name and blob name + /// 8.15 Get-AzureStorageBlobContent positive function cases + /// 3. Download an existing blob file using the container name specified by the param + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.GetBlobContent)] + public void GetBlobContentByName() + { + SetupTestContainerAndBlob(); + + try + { + string destFileName = Utility.GenNameString("download"); + string destFilePath = Path.Combine(downloadDirRoot, destFileName); + Test.Assert(agent.GetAzureStorageBlobContent(BlobName, destFilePath, ContainerName, true), "download blob should be successful"); + string localMd5 = Helper.GetFileContentMD5(destFilePath); + Test.Assert(localMd5 == Blob.Properties.ContentMD5, string.Format("blob content md5 should be {0}, and actualy it's {1}", localMd5, Blob.Properties.ContentMD5)); + } + finally + { + CleanupTestContainerAndBlob(); + } + } + + /// + /// get blob content by container pipeline + /// 8.15 Get-AzureStorageBlobContent positive function cases + /// 4. Download an existing blob file using the container object retrieved by Get-AzureContainer + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.GetBlobContent)] + public void GetBlobContentByContainerPipeline() + { + SetupTestContainerAndBlob(); + + try + { + string destFileName = Utility.GenNameString("download"); + string destFilePath = Path.Combine(downloadDirRoot, destFileName); + + ((PowerShellAgent)agent).AddPipelineScript(string.Format("Get-AzureStorageContainer {0}", ContainerName)); + Test.Assert(agent.GetAzureStorageBlobContent(BlobName, destFilePath, string.Empty, true), "download blob should be successful"); + string localMd5 = Helper.GetFileContentMD5(destFilePath); + Test.Assert(localMd5 == Blob.Properties.ContentMD5, string.Format("blob content md5 should be {0}, and actualy it's {1}", localMd5, Blob.Properties.ContentMD5)); + } + finally + { + CleanupTestContainerAndBlob(); + } + } + + /// + /// get blob content by container pipeline + /// 8.15 Get-AzureStorageBlobContent positive function cases + /// 5. Download a block blob file and a page blob file with a subdirectory + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.GetBlobContent)] + public void GetBlobContentInSubDirectory() + { + string ContainerName = Utility.GenNameString("container"); + FileUtil.CleanDirectory(downloadDirRoot); + List files = FileUtil.GenerateTempFiles(downloadDirRoot, 2); + files.Sort(); + + CloudBlobContainer Container = blobUtil.CreateContainer(ContainerName); + + try + { + foreach (string file in files) + { + string filePath = Path.Combine(downloadDirRoot, file); + string blobName = string.Empty; + using (var fileStream = System.IO.File.OpenRead(filePath)) + { + blobName = file; + CloudBlockBlob blockBlob = Container.GetBlockBlobReference(blobName); + blockBlob.UploadFromStream(fileStream); + } + } + + List blobLists = Container.ListBlobs(string.Empty, true, BlobListingDetails.All).ToList(); + Test.Assert(blobLists.Count == files.Count, string.Format("container {0} should contain {1} blobs, and actually it contain {2} blobs", ContainerName, files.Count, blobLists.Count)); + + FileUtil.CleanDirectory(downloadDirRoot); + + ((PowerShellAgent)agent).AddPipelineScript(string.Format("Get-AzureStorageContainer {0}", ContainerName)); + ((PowerShellAgent)agent).AddPipelineScript("Get-AzureStorageBlob"); + Test.Assert(agent.GetAzureStorageBlobContent(string.Empty, downloadDirRoot, string.Empty, true), "download blob should be successful"); + Test.Assert(agent.Output.Count == files.Count, "Get-AzureStroageBlobContent should download {0} blobs, and actully it's {1}", files.Count, agent.Output.Count); + + for (int i = 0, count = files.Count(); i < count; i++) + { + string path = Path.Combine(downloadDirRoot, files[i]); + ICloudBlob blob = blobLists[i] as ICloudBlob; + if (!File.Exists(path)) + { + Test.AssertFail(string.Format("local file '{0}' doesn't exist.", path)); + } + + string localMd5 = Helper.GetFileContentMD5(path); + string convertedName = blobUtil.ConvertBlobNameToFileName(blob.Name, string.Empty); + Test.Assert(files[i] == convertedName, string.Format("converted blob name should be {0}, actually it's {1}", files[i], convertedName)); + Test.Assert(localMd5 == blob.Properties.ContentMD5, string.Format("blob content md5 should be {0}, and actualy it's {1}", localMd5, blob.Properties.ContentMD5)); + } + } + finally + { + FileUtil.CleanDirectory(downloadDirRoot); + blobUtil.RemoveContainer(ContainerName); + } + } + + /// + /// get blob content by container pipeline + /// 8.15 Get-AzureStorageBlobContent positive function cases + /// 6. Validate that all the blob snapshots can be downloaded + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.GetBlobContent)] + public void GetBlobContentFromSnapshot() + { + SetupTestContainerAndBlob(); + + try + { + List blobs = new List(); + int minSnapshot = 1; + int maxSnapshot = 5; + int snapshotCount = random.Next(minSnapshot, maxSnapshot); + + for (int i = 0; i < snapshotCount; i++) + { + ICloudBlob blob = ((CloudBlockBlob)Blob).CreateSnapshot(); + blobs.Add(blob); + } + + blobs.Add(Blob); + + List blobLists = Container.ListBlobs(string.Empty, true, BlobListingDetails.All).ToList(); + Test.Assert(blobLists.Count == blobs.Count, string.Format("container {0} should contain {1} blobs, and actually it contain {2} blobs", ContainerName, blobs.Count, blobLists.Count)); + + FileUtil.CleanDirectory(downloadDirRoot); + + ((PowerShellAgent)agent).AddPipelineScript(string.Format("Get-AzureStorageContainer {0}", ContainerName)); + ((PowerShellAgent)agent).AddPipelineScript("Get-AzureStorageBlob"); + Test.Assert(agent.GetAzureStorageBlobContent(string.Empty, downloadDirRoot, string.Empty, true), "download blob should be successful"); + Test.Assert(agent.Output.Count == blobs.Count, "Get-AzureStroageBlobContent should download {0} blobs, and actully it's {1}", blobs.Count, agent.Output.Count); + + for (int i = 0, count = blobs.Count(); i < count; i++) + { + ICloudBlob blob = blobLists[i] as ICloudBlob; + string path = Path.Combine(downloadDirRoot, blobUtil.ConvertBlobNameToFileName(blob.Name, string.Empty, blob.SnapshotTime)); + + Test.Assert(File.Exists(path), string.Format("local file '{0}' should exists after downloading.", path)); + + string localMd5 = Helper.GetFileContentMD5(path); + string convertedName = blobUtil.ConvertBlobNameToFileName(blob.Name, string.Empty); + Test.Assert(localMd5 == blob.Properties.ContentMD5, string.Format("blob content md5 should be {0}, and actualy it's {1}", localMd5, blob.Properties.ContentMD5)); + } + } + finally + { + FileUtil.CleanDirectory(downloadDirRoot); + CleanupTestContainerAndBlob(); + } + } + + /// + /// download a not existing blob + /// + /// 8.15 Get-AzureStorageBlobContent negative function cases + /// 1. Download a non-existing blob file + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.GetBlobContent)] + public void GetBlobContentWithNotExistsBlob() + { + SetupTestContainerAndBlob(); + + try + { + string notExistingBlobName = Utility.GenNameString("notexisting"); + DirectoryInfo dir = new DirectoryInfo(downloadDirRoot); + int filesCountBeforeDowloading = dir.GetFiles().Count(); + Test.Assert(!agent.GetAzureStorageBlobContent(notExistingBlobName, downloadDirRoot, ContainerName, true), "download not existing blob should be failed"); + string expectedErrorMessage = string.Format("Can not find blob '{0}' in container '{1}'.", notExistingBlobName, ContainerName); + Test.Assert(agent.ErrorMessages[0] == expectedErrorMessage, agent.ErrorMessages[0]); + int filesCountAfterDowloading = dir.GetFiles().Count(); + Test.Assert(filesCountBeforeDowloading == filesCountAfterDowloading, "the files count should be equal after a failed downloading"); + } + finally + { + CleanupTestContainerAndBlob(); + } + } + + /// + /// download a not existing blob + /// + /// 8.15 Get-AzureStorageBlobContent negative function cases + /// 3. Download a blob file with an invalid container name or container object + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.GetBlobContent)] + public void GetBlobContentWithNotExistsContainer() + { + string containerName = Utility.GenNameString("notexistingcontainer"); + string blobName = Utility.GenNameString("blob"); + DirectoryInfo dir = new DirectoryInfo(downloadDirRoot); + int filesCountBeforeDowloading = dir.GetFiles().Count(); + Test.Assert(!agent.GetAzureStorageBlobContent(blobName, downloadDirRoot, containerName, true), "download blob from not existing container should be failed"); + //TODO seems the error is not our expected + string expectedErrorMessage = string.Format("Can not find blob '{0}' in container '{1}'.", blobName, containerName); + Test.Assert(agent.ErrorMessages[0] == expectedErrorMessage, agent.ErrorMessages[0]); + int filesCountAfterDowloading = dir.GetFiles().Count(); + Test.Assert(filesCountBeforeDowloading == filesCountAfterDowloading, "the files count should be equal after a failed downloading"); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Blob/GetContainer.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Blob/GetContainer.cs new file mode 100644 index 000000000000..81727e05757a --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Blob/GetContainer.cs @@ -0,0 +1,128 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Commands.Storage.ScenarioTest.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Storage.Blob; +using MS.Test.Common.MsTestLib; +using StorageTestLib; + +namespace Commands.Storage.ScenarioTest.Functional.Blob +{ + /// + /// functional tests for Get-AzureStorageContainer + /// + [TestClass] + public class GetContainer : TestBase + { + [ClassInitialize()] + public static void ClassInit(TestContext testContext) + { + TestBase.TestClassInitialize(testContext); + } + + [ClassCleanup()] + public static void GetContainerClassCleanup() + { + TestBase.TestClassCleanup(); + } + + /// + /// get container with its properties and meta data + /// Positive Functional Cases : + /// 7. Write Metadata to the specific container Get the Metadata from the specific container + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Container)] + [TestCategory(PsTag.GetContainer)] + public void GetContainerByNameWithPropertiesAndMetaData() + { + //TODO get container only by name + //create random container + int count = random.Next(1, 5); + List containerNames = new List(); + + for (int i = 0; i < count; i++) + { + containerNames.Add(Utility.GenNameString("container")); + } + + blobUtil.CreateContainer(containerNames); + + try + { + List containers = blobUtil.GetExistingContainers(); + + //list all containers with properties and meta data + string containerName = string.Empty; + + Test.Assert(agent.GetAzureStorageContainer(containerName), Utility.GenComparisonData("GetAzureStorageContainer", true)); + Test.Assert(agent.Output.Count == containers.Count, String.Format("Create {0} containers, but retrieved {1} containers", containers.Count, agent.Output.Count)); + + // Verification for returned values + agent.OutputValidation(containers); + } + finally + { + blobUtil.RemoveContainer(containerNames); + } + } + + /// + /// get container with sas policy + /// Positive Functional Cases : + /// 8. Get SharedAccessPolicies for a specific container + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Container)] + [TestCategory(PsTag.GetContainer)] + public void GetContainerWithSasPolicy() + { + string containerName = Utility.GenNameString("container"); + CloudBlobContainer container = blobUtil.CreateContainer(containerName); + + try + { + TimeSpan sasLifeTime = TimeSpan.FromMinutes(10); + BlobContainerPermissions permission = new BlobContainerPermissions(); + int count = random.Next(1, 5); + + for (int i = 0; i < count; i++) + { + permission.SharedAccessPolicies.Add(Utility.GenNameString("saspolicy"), new SharedAccessBlobPolicy + { + SharedAccessExpiryTime = DateTime.Now.Add(sasLifeTime), + Permissions = SharedAccessBlobPermissions.Read, + }); + + } + + container.SetPermissions(permission); + + Test.Assert(agent.GetAzureStorageContainer(containerName), Utility.GenComparisonData("GetAzureStorageContainer", true)); + Test.Assert(agent.Output.Count == 1, String.Format("Create {0} containers, actually retrieved {1} containers", 1, agent.Output.Count)); + + agent.OutputValidation(new List() { permission }); + } + finally + { + blobUtil.RemoveContainer(containerName); + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Blob/GetCopyState.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Blob/GetCopyState.cs new file mode 100644 index 000000000000..e120cb6cd6bd --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Blob/GetCopyState.cs @@ -0,0 +1,331 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using Commands.Storage.ScenarioTest.Common; +using Commands.Storage.ScenarioTest.Util; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Storage; +using MS.Test.Common.MsTestLib; +using StorageTestLib; +using StorageBlob = Microsoft.WindowsAzure.Storage.Blob; + +namespace Commands.Storage.ScenarioTest.Functional.Blob +{ + /// + /// functional tests for Get-CopyState + /// + [TestClass] + class GetCopyState : TestBase + { + [ClassInitialize()] + public static void GetBlobClassInit(TestContext testContext) + { + TestBase.TestClassInitialize(testContext); + } + + [ClassCleanup()] + public static void GetBlobClassCleanup() + { + TestBase.TestClassCleanup(); + } + + /// + /// monitor mulitple copy progress + /// 8.21 Get-AzureStorageBlobCopyState Positive Functional Cases + /// 3. Monitor a list of copying blobs + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.GetBlobCopyState)] + public void GetCopyStateFromMultiBlobsTest() + { + StorageBlob.CloudBlobContainer srcContainer = blobUtil.CreateContainer(); + StorageBlob.CloudBlobContainer destContainer = blobUtil.CreateContainer(); + + List blobs = blobUtil.CreateRandomBlob(srcContainer); + + try + { + ((PowerShellAgent)agent).AddPipelineScript(String.Format("Get-AzureStorageBlob -Container {0}", srcContainer.Name)); + ((PowerShellAgent)agent).AddPipelineScript(String.Format("Start-AzureStorageBlobCopy -DestContainer {0}", destContainer.Name)); + + Test.Assert(agent.GetAzureStorageBlobCopyState(string.Empty, string.Empty, true), "Get copy state for many blobs should be successed."); + Test.Assert(agent.Output.Count == blobs.Count, String.Format("Expected get {0} copy state, and actually get {1} copy state", blobs.Count, agent.Output.Count)); + List destBlobs = destContainer.ListBlobs().ToList(); + Test.Assert(destBlobs.Count == blobs.Count, String.Format("Expected get {0} copied blobs, and actually get {1} copy state", blobs.Count, destBlobs.Count)); + + for (int i = 0, count = agent.Output.Count; i < count; i++) + { + AssertFinishedCopyState(blobs[i].Uri, i); + } + } + finally + { + blobUtil.RemoveContainer(srcContainer.Name); + blobUtil.RemoveContainer(destContainer.Name); + } + } + + /// + /// monitor mulitple copy progress + /// 8.21 Get-AzureStorageBlobCopyState Positive Functional Cases + /// 3. Monitor a list of copying blobs + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.GetBlobCopyState)] + public void GetCopyStateWithInvalidNameTest() + { + string invalidContainerName = "Invalid"; + int maxBlobNameLength = 1024; + string invalidBlobName = new string('a', maxBlobNameLength + 1); + string invalidContainerErrorMessage = String.Format("Container name '{0}' is invalid.", invalidContainerName); + string invalidBlobErrorMessage = String.Format("Blob name '{0}' is invalid.", invalidBlobName); + Test.Assert(!agent.GetAzureStorageBlobCopyState(invalidContainerName, Utility.GenNameString("blob"), false), "get copy state should failed with invalid container name"); + ExpectedStartsWithErrorMessage(invalidContainerErrorMessage); + Test.Assert(!agent.GetAzureStorageBlobCopyState(Utility.GenNameString("container"), invalidBlobName, false), "get copy state should failed with invalid blob name"); + ExpectedStartsWithErrorMessage(invalidBlobErrorMessage); + } + + /// + /// monitor mulitple copy progress + /// 8.21 Get-AzureStorageBlobCopyState Positive Functional Cases + /// 3. Monitor a list of copying blobs + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.GetBlobCopyState)] + public void GetCopyStateWithNotExistContainerAndBlobTest() + { + string srcContainerName = Utility.GenNameString("copy"); + string blobName = Utility.GenNameString("blob"); + + string errorMessage = string.Empty; + Test.Assert(!agent.GetAzureStorageBlobCopyState(srcContainerName, blobName, false), "Get copy state should fail with not existing container"); + errorMessage = string.Format("Can not find blob '{0}' in container '{1}'.", blobName, srcContainerName); + ExpectedEqualErrorMessage(errorMessage); + + try + { + StorageBlob.CloudBlobContainer srcContainer = blobUtil.CreateContainer(srcContainerName); + Test.Assert(!agent.GetAzureStorageBlobCopyState(srcContainerName, blobName, false), "Get copy state should fail with not existing blob"); + ExpectedEqualErrorMessage(errorMessage); + } + finally + { + blobUtil.RemoveContainer(srcContainerName); + } + } + + /// + /// monitor mulitple copy progress + /// 8.21 Get-AzureStorageBlobCopyState Positive Functional Cases + /// 4. Monitor copying status of the blob in root container + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.GetBlobCopyState)] + public void GetCopyStateFromRootContainerTest() + { + StorageBlob.CloudBlobContainer rootContainer = blobUtil.CreateContainer("$root"); + + string srcBlobName = Utility.GenNameString("src"); + StorageBlob.ICloudBlob srcBlob = blobUtil.CreateRandomBlob(rootContainer, srcBlobName); + StorageBlob.ICloudBlob destBlob = blobUtil.CreateBlob(rootContainer, Utility.GenNameString("dest"), srcBlob.BlobType); + + if (destBlob.BlobType == StorageBlob.BlobType.BlockBlob) + { + ((StorageBlob.CloudBlockBlob)destBlob).StartCopyFromBlob((StorageBlob.CloudBlockBlob)srcBlob); + } + else + { + ((StorageBlob.CloudPageBlob)destBlob).StartCopyFromBlob((StorageBlob.CloudPageBlob)srcBlob); + } + + Test.Assert(agent.GetAzureStorageBlobCopyState("$root", destBlob.Name, true), "Get copy state in $root container should be successed."); + AssertFinishedCopyState(srcBlob.Uri); + } + + /// + /// monitor copy progress for cross account copy + /// 8.21 Get-AzureStorageBlobCopyState Positive Functional Cases + /// 5. Get the copy status (on-going) on specified blob for cross account copying + /// This test use the start-copy pipeline. so It also validate the start-copy cmdlet + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.GetBlobCopyState)] + public void GetCopyStateFromCrossAccountCopyTest() + { + CloudStorageAccount secondaryAccount = TestBase.GetCloudStorageAccountFromConfig("Secondary"); + object destContext = PowerShellAgent.GetStorageContext(secondaryAccount.ToString(true)); + CloudBlobUtil destBlobUtil = new CloudBlobUtil(secondaryAccount); + string destContainerName = Utility.GenNameString("secondary"); + StorageBlob.CloudBlobContainer destContainer = destBlobUtil.CreateContainer(destContainerName); + blobUtil.SetupTestContainerAndBlob(); + //remove the same name container in source storage account, so we could avoid some conflicts. + blobUtil.RemoveContainer(destContainer.Name); + + try + { + Test.Assert(agent.StartAzureStorageBlobCopy(blobUtil.Blob, destContainer.Name, string.Empty, destContext), "Start cross account copy should successed"); + int expectedBlobCount = 1; + Test.Assert(agent.Output.Count == expectedBlobCount, String.Format("Expected get {0} copy blob, and actually it's {1}", expectedBlobCount, agent.Output.Count)); + StorageBlob.ICloudBlob destBlob = (StorageBlob.ICloudBlob)agent.Output[0]["ICloudBlob"]; + //make sure this context is different from the PowerShell.Context + object context = agent.Output[0]["Context"]; + Test.Assert(PowerShellAgent.Context != context, "make sure you are using different context for cross account copy"); + Test.Assert(agent.GetAzureStorageBlobCopyState(destBlob, context, true), "Get copy state in dest container should be successed."); + AssertFinishedCopyState(blobUtil.Blob.Uri); + } + finally + { + blobUtil.CleanupTestContainerAndBlob(); + destBlobUtil.RemoveContainer(destContainer.Name); + } + } + + /// + /// monitor copy progress for cross account copy + /// 8.21 Get-AzureStorageBlobCopyState Positive Functional Cases + /// 5. 6. Get the copy status (on-going) on specified blob for Uri copying + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.GetBlobCopyState)] + public void GetCopyStateFromUriTest() + { + blobUtil.SetupTestContainerAndBlob(); + string copiedName = Utility.GenNameString("copied"); + + //Set the blob permission, so the copy task could directly copy by uri + StorageBlob.BlobContainerPermissions permission = new StorageBlob.BlobContainerPermissions(); + permission.PublicAccess = StorageBlob.BlobContainerPublicAccessType.Blob; + blobUtil.Container.SetPermissions(permission); + + try + { + Test.Assert(agent.StartAzureStorageBlobCopy(blobUtil.Blob.Uri.ToString(), blobUtil.ContainerName, copiedName, PowerShellAgent.Context), Utility.GenComparisonData("Start copy blob using source uri", true)); + Test.Assert(agent.GetAzureStorageBlobCopyState(blobUtil.ContainerName, copiedName, true), "Get copy state in dest container should be successed."); + AssertFinishedCopyState(blobUtil.Blob.Uri); + } + finally + { + blobUtil.CleanupTestContainerAndBlob(); + } + } + + /// + /// monitor copy progress for cross account copy + /// 8.21 Get-AzureStorageBlobCopyState Positive Functional Cases + /// 5. 6. Get the copy status (on-going) on specified blob for Uri copying + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.GetBlobCopyState)] + public void GetCopyStateWhenCopyingTest() + { + StorageBlob.CloudBlobContainer Container = blobUtil.CreateContainer(); + string ContainerName = Container.Name; + string BlobName = Utility.GenNameString("blockblob"); + StorageBlob.ICloudBlob Blob = blobUtil.CreateBlockBlob(Container, BlobName); + + string uri = Test.Data.Get("BigFileUri"); + Test.Assert(!String.IsNullOrEmpty(uri), string.Format("Big file uri should be not empty, actually it's {0}", uri)); + + if (String.IsNullOrEmpty(uri)) + { + return; + } + + Blob.StartCopyFromBlob(new Uri(uri)); + + int maxMonitorTime = 30; //seconds + int checkCount = 0; + int sleepInterval = 1000; //ms + + StorageBlob.CopyStatus status = StorageBlob.CopyStatus.Pending; + + try + { + int expectedCopyStateCount = 1; + + do + { + Test.Info(String.Format("{0}th check current copy state", checkCount)); + Test.Assert(agent.GetAzureStorageBlobCopyState(ContainerName, BlobName, false), "Get copy state in dest container should be successed."); + + Test.Assert(agent.Output.Count == expectedCopyStateCount, String.Format("Should contain {0} copy state, and actually it's {1}", expectedCopyStateCount, agent.Output.Count)); + status = (StorageBlob.CopyStatus)agent.Output[0]["Status"]; + Test.Assert(status == StorageBlob.CopyStatus.Pending, String.Format("Copy status should be Pending, actually it's {0}", status)); + checkCount++; + Thread.Sleep(sleepInterval); + } + while (status == StorageBlob.CopyStatus.Pending && checkCount < maxMonitorTime); + + Test.Info("Finish the monitor loop and try to abort copy"); + + try + { + Blob.AbortCopy(Blob.CopyState.CopyId); + } + catch (StorageException e) + { + //TODO use extension method + if (e.RequestInformation != null && e.RequestInformation.HttpStatusCode == 409) + { + Test.Info("Skip 409 abort conflict exception. Error:{0}", e.Message); + Test.Info("Detail Error Message: {0}", e.RequestInformation.HttpStatusMessage); + } + else + { + Test.AssertFail(String.Format("Can't abort copy. Error: {0}", e.Message)); + } + } + + Test.Assert(agent.GetAzureStorageBlobCopyState(ContainerName, BlobName, false), "Get copy state in dest container should be successed."); + Test.Assert(agent.Output.Count == expectedCopyStateCount, String.Format("Should contain {0} copy state, and actually it's {1}", expectedCopyStateCount, agent.Output.Count)); + status = (StorageBlob.CopyStatus)agent.Output[0]["Status"]; + Test.Assert(status == StorageBlob.CopyStatus.Aborted, String.Format("Copy status should be Aborted, actually it's {0}", status)); + } + finally + { + blobUtil.RemoveContainer(Container.Name); + } + } + + private void AssertFinishedCopyState(Uri SourceUri, int startIndex = 0) + { + string expectedSourceUri = CloudBlobUtil.ConvertCopySourceUri(SourceUri.ToString()); + Test.Assert(agent.Output.Count > startIndex, String.Format("Should contain the great than {0} copy state, and actually it's {1}", startIndex, agent.Output.Count)); + string sourceUri = ((Uri)agent.Output[startIndex]["Source"]).ToString(); + Test.Assert(sourceUri.StartsWith(expectedSourceUri), String.Format("source uri should start with {0}, and actualy it's {1}", expectedSourceUri, sourceUri)); + StorageBlob.CopyStatus status = (StorageBlob.CopyStatus)agent.Output[startIndex]["Status"]; + Test.Assert(status != StorageBlob.CopyStatus.Pending, String.Format("Copy status should not be Pending, actually it's {0}", status)); + string copyId = (string)agent.Output[startIndex]["CopyId"]; + Test.Assert(!String.IsNullOrEmpty(copyId), "Copy ID should be not empty"); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Blob/NewContainer.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Blob/NewContainer.cs new file mode 100644 index 000000000000..c5ec3b9ce8d0 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Blob/NewContainer.cs @@ -0,0 +1,61 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Commands.Storage.ScenarioTest.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Storage.Blob; +using MS.Test.Common.MsTestLib; +using StorageTestLib; + +namespace Commands.Storage.ScenarioTest.Functional.Blob +{ + /// + /// functional test for NewContainer + /// + [TestClass] + class NewContainer : TestBase + { + [ClassInitialize()] + public static void ClassInit(TestContext testContext) + { + TestBase.TestClassInitialize(testContext); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + TestBase.TestClassCleanup(); + } + + /// + /// Create a container which was deleted but not gc’d fully yet + /// 8.1 New-AzureStorageContainer Negative Functional Cases + /// 5. Create a container which was deleted but not gc’d fully yet + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.NewContainer)] + public void CreateIsDeletingContainer() + { + CloudBlobContainer container = blobUtil.CreateContainer(); + blobUtil.CreateRandomBlob(container); + + blobUtil.RemoveContainer(container.Name); + + Test.Assert(!agent.NewAzureStorageContainer(container.Name), "Create a container which is being deleted should fail"); + ExpectedContainErrorMessage("The specified container is being deleted. Try operation later."); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Blob/RemoveBlob.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Blob/RemoveBlob.cs new file mode 100644 index 000000000000..c6da18783f81 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Blob/RemoveBlob.cs @@ -0,0 +1,300 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Commands.Storage.ScenarioTest.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Storage.Blob; +using MS.Test.Common.MsTestLib; +using StorageTestLib; + +namespace Commands.Storage.ScenarioTest.Functional.Blob +{ + /// + /// functional test for Remove-AzureStorageBlob + /// + [TestClass] + class RemoveBlob : TestBase + { + [ClassInitialize()] + public static void ClassInit(TestContext testContext) + { + TestBase.TestClassInitialize(testContext); + } + + [ClassCleanup()] + public static void RemoveBlobClassCleanup() + { + TestBase.TestClassCleanup(); + } + + /// + /// remove blob by pipeline + /// 8.13 Remove-AzureStorageBlob Positive Functional Cases + /// 3. Remove a list of existing blobs by using pipeline + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.RemoveBlob)] + public void RemoveBlobByPipeline() + { + //TODO add more pipeline + string containerName = Utility.GenNameString("container"); + string blobName = Utility.GenNameString("blob"); + CloudBlobContainer container = blobUtil.CreateContainer(containerName); + + try + { + int count = random.Next(1, 5); + List blobNames = new List(); + for (int i = 0; i < count; i++) + { + blobNames.Add(Utility.GenNameString("blob")); + } + + List blobs = blobUtil.CreateRandomBlob(container, blobNames); + + string cmd = String.Format("{0} {1}", "Get-AzureStorageContainer", containerName); + ((PowerShellAgent)agent).AddPipelineScript(cmd); + cmd = "Get-AzureStorageBlob"; + ((PowerShellAgent)agent).AddPipelineScript(cmd); + + List blobLists = container.ListBlobs().ToList(); + Test.Assert(blobLists.Count == blobs.Count, string.Format("container {0} should contain {1} blobs", containerName, blobs.Count)); + + Test.Assert(agent.RemoveAzureStorageBlob(string.Empty, string.Empty), Utility.GenComparisonData("Get-AzureStorageContainer | Get-AzureStorageBlob | Remove-AzureStorageBlob", true)); + + blobLists = container.ListBlobs().ToList(); + Test.Assert(blobLists.Count == 0, string.Format("container {0} should contain {1} blobs", containerName, 0)); + } + finally + { + blobUtil.RemoveContainer(containerName); + } + } + + /// + /// remove blob by pipeline + /// 8.13 Remove-AzureStorageBlob Positive Functional Cases + /// 4. Remove an existing blob which has a sub directory + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.RemoveBlob)] + public void RemoveBlobInSubDirectory() + { + string containerName = Utility.GenNameString("container"); + string blobName = Utility.GenNameString("blob"); + string subBlobName = Utility.GenNameString(string.Format("{0}/", blobName)); + string subsubBlobName = Utility.GenNameString(string.Format("{0}/", subBlobName)); + + List blobNames = new List + { + blobName, subsubBlobName + }; + + CloudBlobContainer container = blobUtil.CreateContainer(containerName); + + try + { + List blobs = blobUtil.CreateRandomBlob(container, blobNames); + ICloudBlob subBlob = blobUtil.CreatePageBlob(container, subBlobName); + + List blobLists = container.ListBlobs(string.Empty, true).ToList(); + Test.Assert(blobLists.Count == 3, string.Format("container {0} should contain {1} blobs", containerName, 3)); + + Test.Assert(agent.RemoveAzureStorageBlob(subBlobName, containerName), Utility.GenComparisonData("Remove-AzureStorageBlob in subdirectory", true)); + blobLists = container.ListBlobs(string.Empty, true).ToList(); + Test.Assert(blobLists.Count == 2, string.Format("container {0} should contain {1} blobs", containerName, 2)); + bool blobFound = false, subsubBlobFound = false; + foreach (ICloudBlob blob in blobLists) + { + if (blob.Name == blobName) + { + blobFound = true; + } + else if (blob.Name == subsubBlobName) + { + subsubBlobFound = true; + } + } + + Test.Assert(blobFound == true, "the root blob should be contained in container"); + Test.Assert(subsubBlobFound == true, "the blob in sub sub directory should be contained in container"); + } + finally + { + blobUtil.RemoveContainer(containerName); + } + } + + /// + /// remove blob by pipeline + /// 8.13 Remove-AzureStorageBlob Positive Functional Cases + /// 5. Remove an existing base blob that has snapthots + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.RemoveBlob)] + public void RemoveBlobIncludeSnapshot() + { + string containerName = Utility.GenNameString("container"); + string blobName = Utility.GenNameString("blob"); + CloudBlobContainer container = blobUtil.CreateContainer(containerName); + + try + { + ICloudBlob blob = blobUtil.CreatePageBlob(container, blobName); + List blobs = new List(); + blob.FetchAttributes(); + + int count = random.Next(1, 5); + for (int i = 0; i < count; i++) + { + CloudPageBlob snapshot = ((CloudPageBlob)blob).CreateSnapshot(); + snapshot.FetchAttributes(); + blobs.Add(snapshot); + } + + blobs.Add(blob); + + List blobLists = container.ListBlobs(string.Empty, true, BlobListingDetails.All).ToList(); + Test.Assert(blobLists.Count == blobs.Count, string.Format("container {0} should contain {1} blobs, but actually it contain {2} blobs", containerName, blobs.Count, blobLists.Count)); + Test.Assert(agent.RemoveAzureStorageBlob(blobName, containerName), Utility.GenComparisonData("Remove-AzureStorageBlob and snapshot", true)); + blobLists = container.ListBlobs(string.Empty, true, BlobListingDetails.All).ToList(); + Test.Assert(blobLists.Count == 0, string.Format("container {0} should contain {1} blobs", containerName, 0)); + } + finally + { + blobUtil.RemoveContainer(containerName); + } + } + + /// + /// remove blob by pipeline + /// 8.13 Remove-AzureStorageBlob Positive Functional Cases + /// 6. Remove the snapthot only with DeleteSnap = Yes + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.RemoveBlob)] + public void RemoveSnapshot() + { + string containerName = Utility.GenNameString("container"); + string blobName = Utility.GenNameString("blob"); + CloudBlobContainer container = blobUtil.CreateContainer(containerName); + + try + { + ICloudBlob blob = blobUtil.CreatePageBlob(container, blobName); + List blobs = new List(); + blob.FetchAttributes(); + + int count = random.Next(1, 5); + for (int i = 0; i < count; i++) + { + CloudPageBlob snapshot = ((CloudPageBlob)blob).CreateSnapshot(); + snapshot.FetchAttributes(); + blobs.Add(snapshot); + } + + blobs.Add(blob); + List blobLists = container.ListBlobs(string.Empty, true, BlobListingDetails.All).ToList(); + Test.Assert(blobLists.Count == blobs.Count, string.Format("container {0} should contain {1} blobs, and actually it contain {2} blobs", containerName, blobs.Count, blobLists.Count)); + Test.Assert(agent.RemoveAzureStorageBlob(blobName, containerName, true), Utility.GenComparisonData("Remove-AzureStorageBlob and snapshot", true)); + blobLists = container.ListBlobs(string.Empty, true, BlobListingDetails.All).ToList(); + Test.Assert(blobLists.Count == 1, string.Format("container {0} should contain {1} blobs", containerName, 1)); + ICloudBlob remainBlob = blobLists[0] as ICloudBlob; + Test.Assert(blob.Name == remainBlob.Name, string.Format("Blob name should be {0}, and actually it's {1}", blob.Name, remainBlob.Name)); + Test.Assert(null == remainBlob.SnapshotTime, "snapshot time should be null"); + } + finally + { + blobUtil.RemoveContainer(containerName); + } + } + + /// + /// remove an blob with lease + /// 8.13 Remove-AzureStorageBlob Negative Functional Cases + /// 4. Remove an existing blob with lease + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.RemoveBlob)] + public void RemoveBlobWithLease() + { + string containerName = Utility.GenNameString("container"); + string blobName = Utility.GenNameString("blob"); + CloudBlobContainer container = blobUtil.CreateContainer(containerName); + + try + { + ICloudBlob blob = blobUtil.CreatePageBlob(container, blobName); + blob.AcquireLease(null, string.Empty); + + List blobLists = container.ListBlobs(string.Empty, true, BlobListingDetails.All).ToList(); + Test.Assert(blobLists.Count == 1, string.Format("container {0} should contain {1} blobs, and actually it contain {2} blobs", containerName, 1, blobLists.Count)); + Test.Assert(!agent.RemoveAzureStorageBlob(blobName, containerName), Utility.GenComparisonData("Remove-AzureStorageBlob with lease", false)); + Test.Assert(agent.ErrorMessages[0].StartsWith("The remote server returned an error: (412)"), "The remove azure storage blob with lease should be failed"); + blobLists = container.ListBlobs(string.Empty, true, BlobListingDetails.All).ToList(); + Test.Assert(blobLists.Count == 1, string.Format("container {0} should contain {1} blobs, and actually it contain {2} blobs", containerName, 1, blobLists.Count)); + ICloudBlob remainBlob = blobLists[0] as ICloudBlob; + Test.Assert(blob.Name == remainBlob.Name, string.Format("Blob name should be {0}, and actually it's {1}", blob.Name, remainBlob.Name)); + Test.Assert(remainBlob.Properties.LeaseStatus == LeaseStatus.Locked, "blob should be locked by lease"); + } + finally + { + blobUtil.RemoveContainer(containerName); + } + } + + /// + /// Remove an existing blob that has snapthots without DeleteSnap = No + /// 8.13 Remove-AzureStorageBlob Negative Functional Cases + /// 3. Remove an existing blob that has snapthots without DeleteSnap = No + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.RemoveBlob)] + public void RemoveBlobWithSnapshotNeedComfirmation() + { + CloudBlobContainer container = blobUtil.CreateContainer(); + string blobName = Utility.GenNameString("blob"); + ICloudBlob blob = blobUtil.CreateRandomBlob(container, blobName); + ICloudBlob snapshot = blobUtil.SnapShot(blob); + + try + { + Test.Assert(!agent.RemoveAzureStorageBlob(blobName, container.Name, false, false), "remove an blob with snapshout should throw an confirmation exception"); + ExpectedContainErrorMessage(ConfirmExceptionMessage); + Test.Assert(blob.Exists(), string.Format("the specified blob '{0}' should exist", blob.Name)); + Test.Assert(snapshot.Exists(), "the snapshot should exist"); + Test.Assert(snapshot.SnapshotTime != null, "the snapshout time should be not null"); + } + finally + { + blobUtil.RemoveContainer(container.Name); + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Blob/RemoveContainer.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Blob/RemoveContainer.cs new file mode 100644 index 000000000000..4eec9a2d7073 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Blob/RemoveContainer.cs @@ -0,0 +1,63 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Commands.Storage.ScenarioTest.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Storage.Blob; +using MS.Test.Common.MsTestLib; +using StorageTestLib; + +namespace Commands.Storage.ScenarioTest.Functional.Blob +{ + /// + /// functional test for RemoveContainer + /// + [TestClass] + class RemoveContainer : TestBase + { + [ClassInitialize()] + public static void ClassInit(TestContext testContext) + { + TestBase.TestClassInitialize(testContext); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + TestBase.TestClassCleanup(); + } + + /// + /// Remove a list of existing blob containers by using wildcards. + /// 8.3 Remove-AzureStorageContainer Positive Functional Cases + /// 2. Remove a list of existing blob containers by using wildcards. + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.RemoveContainer)] + public void RemoveContainerByWildCardAndPipeline() + { + int containerCount = GetRandomTestCount(); + string containerPrefix = "removecontainer"; + List containerNames = Utility.GenNameLists(containerPrefix, containerCount); + List containers = blobUtil.CreateContainer(containerNames); + + ((PowerShellAgent)agent).AddPipelineScript(string.Format("Get-AzureStorageContainer {0}*", containerPrefix)); + Test.Assert(agent.RemoveAzureStorageContainer(string.Empty), "Remove container using wildcard and pipeline should succeed"); + containers.ForEach(container => Test.Assert(!container.Exists(), string.Format("the specified container '{0}' should not exist", container.Name))); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Blob/SetBlobContent.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Blob/SetBlobContent.cs new file mode 100644 index 000000000000..49a22b13e6e8 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Blob/SetBlobContent.cs @@ -0,0 +1,416 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Commands.Storage.ScenarioTest.Common; +using Commands.Storage.ScenarioTest.Util; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using MS.Test.Common.MsTestLib; +using StorageTestLib; +using StorageBlob = Microsoft.WindowsAzure.Storage.Blob; + +namespace Commands.Storage.ScenarioTest.Functional.Blob +{ + /// + /// functional tests for Set-ContainerAcl + /// + [TestClass] + class SetBlobContent : TestBase + { + private static string uploadDirRoot; + private static List files = new List(); + + //TODO upload a already opened read/write file + [ClassInitialize()] + public static void ClassInit(TestContext testContext) + { + TestBase.TestClassInitialize(testContext); + uploadDirRoot = Test.Data.Get("UploadDir"); + SetupUploadDir(); + } + + [ClassCleanup()] + public static void SetBlobContentClassCleanup() + { + TestBase.TestClassCleanup(); + } + + /// + /// create upload dir and temp files + /// + private static void SetupUploadDir() + { + Test.Verbose("Create Upload dir {0}", uploadDirRoot); + + if (!Directory.Exists(uploadDirRoot)) + { + Directory.CreateDirectory(uploadDirRoot); + } + + FileUtil.CleanDirectory(uploadDirRoot); + + int minDirDepth = 1, maxDirDepth = 3; + int dirDepth = random.Next(minDirDepth, maxDirDepth); + Test.Info("Generate Temp files for Set-AzureStorageBlobContent"); + files = FileUtil.GenerateTempFiles(uploadDirRoot, dirDepth); + files.Sort(); + } + + /// + /// set azure blob content by mutilple files + /// 8.14 Set-AzureStorageBlobContent + /// 3. Upload a list of new blob files + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.SetBlobContent)] + public void SetBlobContentByMultipleFiles() + { + string containerName = Utility.GenNameString("container"); + StorageBlob.CloudBlobContainer container = blobUtil.CreateContainer(containerName); + + try + { + List blobLists = container.ListBlobs(string.Empty, true, StorageBlob.BlobListingDetails.All).ToList(); + Test.Assert(blobLists.Count == 0, string.Format("container {0} should contain {1} blobs, and actually it contain {2} blobs", containerName, 0, blobLists.Count)); + + DirectoryInfo rootDir = new DirectoryInfo(uploadDirRoot); + + FileInfo[] rootFiles = rootDir.GetFiles(); + + ((PowerShellAgent)agent).AddPipelineScript(string.Format("ls -File -Path {0}", uploadDirRoot)); + Test.Info("Upload files..."); + Test.Assert(agent.SetAzureStorageBlobContent(string.Empty, containerName, StorageBlob.BlobType.BlockBlob), "upload multiple files should be successsed"); + Test.Info("Upload finished..."); + blobLists = container.ListBlobs(string.Empty, true, StorageBlob.BlobListingDetails.All).ToList(); + Test.Assert(blobLists.Count == rootFiles.Count(), string.Format("set-azurestorageblobcontent should upload {0} files, and actually it's {1}", rootFiles.Count(), blobLists.Count)); + + StorageBlob.ICloudBlob blob = null; + for (int i = 0, count = rootFiles.Count(); i < count; i++) + { + blob = blobLists[i] as StorageBlob.ICloudBlob; + + if (blob == null) + { + Test.AssertFail("blob can't be null"); + } + + Test.Assert(rootFiles[i].Name == blob.Name, string.Format("blob name should be {0}, and actully it's {1}", rootFiles[i].Name, blob.Name)); + string localMd5 = Helper.GetFileContentMD5(Path.Combine(uploadDirRoot, rootFiles[i].Name)); + Test.Assert(blob.BlobType == Microsoft.WindowsAzure.Storage.Blob.BlobType.BlockBlob, "blob type should be block blob"); + Test.Assert(localMd5 == blob.Properties.ContentMD5, string.Format("blob content md5 should be {0}, and actualy it's {1}", localMd5, blob.Properties.ContentMD5)); + } + } + finally + { + blobUtil.RemoveContainer(containerName); + } + } + + /// + /// upload files in subdirectory + /// 8.14 Set-AzureStorageBlobContent positive functional cases. + /// 4. Upload a block blob file and a page blob file with a subdirectory + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.SetBlobContent)] + public void SetBlobContentWithSubDirectory() + { + DirectoryInfo rootDir = new DirectoryInfo(uploadDirRoot); + + DirectoryInfo[] dirs = rootDir.GetDirectories(); + + foreach (DirectoryInfo dir in dirs) + { + string containerName = Utility.GenNameString("container"); + StorageBlob.CloudBlobContainer container = blobUtil.CreateContainer(containerName); + + try + { + List blobLists = container.ListBlobs(string.Empty, true, StorageBlob.BlobListingDetails.All).ToList(); + Test.Assert(blobLists.Count == 0, string.Format("container {0} should contain {1} blobs, and actually it contain {2} blobs", containerName, 0, blobLists.Count)); + + StorageBlob.BlobType blobType = StorageBlob.BlobType.BlockBlob; + + if (dir.Name.StartsWith("dirpage")) + { + blobType = Microsoft.WindowsAzure.Storage.Blob.BlobType.PageBlob; + } + + ((PowerShellAgent)agent).AddPipelineScript(string.Format("ls -File -Recurse -Path {0}", dir.FullName)); + Test.Info("Upload files..."); + Test.Assert(agent.SetAzureStorageBlobContent(string.Empty, containerName, blobType), "upload multiple files should be successsed"); + Test.Info("Upload finished..."); + + blobLists = container.ListBlobs(string.Empty, true, StorageBlob.BlobListingDetails.All).ToList(); + List dirFiles = files.FindAll(item => item.StartsWith(dir.Name)); + Test.Assert(blobLists.Count == dirFiles.Count(), string.Format("set-azurestorageblobcontent should upload {0} files, and actually it's {1}", dirFiles.Count(), blobLists.Count)); + + StorageBlob.ICloudBlob blob = null; + for (int i = 0, count = dirFiles.Count(); i < count; i++) + { + blob = blobLists[i] as StorageBlob.ICloudBlob; + + if (blob == null) + { + Test.AssertFail("blob can't be null"); + } + + string convertedName = blobUtil.ConvertBlobNameToFileName(blob.Name, dir.Name); + Test.Assert(dirFiles[i] == convertedName, string.Format("blob name should be {0}, and actully it's {1}", dirFiles[i], convertedName)); + string localMd5 = Helper.GetFileContentMD5(Path.Combine(uploadDirRoot, dirFiles[i])); + Test.Assert(blob.BlobType == blobType, "blob type should be block blob"); + Test.Assert(localMd5 == blob.Properties.ContentMD5, string.Format("blob content md5 should be {0}, and actualy it's {1}", localMd5, blob.Properties.ContentMD5)); + } + } + finally + { + blobUtil.RemoveContainer(containerName); + } + } + } + + /// + /// set blob content with invalid bob name + /// 8.14 Set-AzureStorageBlobContent negative functional cases + /// 1. Upload a block blob file and a page blob file with a subdirectory + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.SetBlobContent)] + public void SetBlobContentWithInvalidBlobName() + { + string containerName = Utility.GenNameString("container"); + StorageBlob.CloudBlobContainer container = blobUtil.CreateContainer(containerName); + + try + { + int MaxBlobNameLength = 1024; + string blobName = new string('a', MaxBlobNameLength + 1); + + List blobLists = container.ListBlobs(string.Empty, true, StorageBlob.BlobListingDetails.All).ToList(); + Test.Assert(blobLists.Count == 0, string.Format("container {0} should contain {1} blobs, and actually it contain {2} blobs", containerName, 0, blobLists.Count)); + + Test.Assert(!agent.SetAzureStorageBlobContent(Path.Combine(uploadDirRoot, files[0]), containerName, StorageBlob.BlobType.BlockBlob, blobName), "upload blob with invalid blob name should be failed"); + string expectedErrorMessage = string.Format("Blob name '{0}' is invalid.", blobName); + ExpectedStartsWithErrorMessage(expectedErrorMessage); + } + finally + { + blobUtil.RemoveContainer(containerName); + } + } + + /// + /// set blob content with invalid blob type + /// 8.14 Set-AzureStorageBlobContent negative functional cases + /// 6. Upload a blob file with the same name but with different BlobType + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.SetBlobContent)] + public void SetBlobContentWithInvalidBlobType() + { + string containerName = Utility.GenNameString("container"); + StorageBlob.CloudBlobContainer container = blobUtil.CreateContainer(containerName); + + try + { + string blobName = files[0]; + + List blobLists = container.ListBlobs(string.Empty, true, StorageBlob.BlobListingDetails.All).ToList(); + Test.Assert(blobLists.Count == 0, string.Format("container {0} should contain {1} blobs, and actually it contain {2} blobs", containerName, 0, blobLists.Count)); + + Test.Assert(agent.SetAzureStorageBlobContent(Path.Combine(uploadDirRoot, files[0]), containerName, StorageBlob.BlobType.BlockBlob, blobName), "upload blob should be successful."); + blobLists = container.ListBlobs(string.Empty, true, StorageBlob.BlobListingDetails.All).ToList(); + Test.Assert(blobLists.Count == 1, string.Format("container {0} should contain {1} blobs, and actually it contain {2} blobs", containerName, 1, blobLists.Count)); + string convertBlobName = blobUtil.ConvertFileNameToBlobName(blobName); + Test.Assert(((StorageBlob.ICloudBlob)blobLists[0]).Name == convertBlobName, string.Format("blob name should be {0}, actually it's {1}", convertBlobName, ((StorageBlob.ICloudBlob)blobLists[0]).Name)); + + Test.Assert(!agent.SetAzureStorageBlobContent(Path.Combine(uploadDirRoot, files[0]), containerName, StorageBlob.BlobType.PageBlob, blobName), "upload blob should be with invalid blob should be failed."); + string expectedErrorMessage = string.Format("Blob type mismatched, the current blob type of '{0}' is BlockBlob.", ((StorageBlob.ICloudBlob)blobLists[0]).Name); + Test.Assert(agent.ErrorMessages[0] == expectedErrorMessage, string.Format("Expect error message: {0} != {1}", expectedErrorMessage, agent.ErrorMessages[0])); + } + finally + { + blobUtil.RemoveContainer(containerName); + } + } + + /// + /// upload page blob with invalid file size + /// 8.14 Set-AzureStorageBlobContent negative functional cases + /// 8. Upload a page blob the size of which is not 512*n + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.SetBlobContent)] + public void SetPageBlobWithInvalidFileSize() + { + string fileName = Utility.GenNameString("tinypageblob"); + string filePath = Path.Combine(uploadDirRoot, fileName); + int fileSize = 480; + Helper.GenerateTinyFile(filePath, fileSize); + string containerName = Utility.GenNameString("container"); + StorageBlob.CloudBlobContainer container = blobUtil.CreateContainer(containerName); + + try + { + List blobLists = container.ListBlobs(string.Empty, true, StorageBlob.BlobListingDetails.All).ToList(); + Test.Assert(blobLists.Count == 0, string.Format("container {0} should contain {1} blobs, and actually it contain {2} blobs", containerName, 0, blobLists.Count)); + Test.Assert(!agent.SetAzureStorageBlobContent(filePath, containerName, StorageBlob.BlobType.PageBlob), "upload page blob with invalid file size should be failed."); + string expectedErrorMessage = "The page blob size must be a multiple of 512 bytes."; + Test.Assert(agent.ErrorMessages[0].StartsWith(expectedErrorMessage), expectedErrorMessage); + blobLists = container.ListBlobs(string.Empty, true, StorageBlob.BlobListingDetails.All).ToList(); + Test.Assert(blobLists.Count == 0, string.Format("container {0} should contain {1} blobs, and actually it contain {2} blobs", containerName, 0, blobLists.Count)); + } + finally + { + blobUtil.RemoveContainer(containerName); + FileUtil.RemoveFile(filePath); + } + } + + /// + /// Set blob content with blob properties + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.SetBlobContent)] + public void SetBlobContentWithProperties() + { + SetBlobContentWithProperties(StorageBlob.BlobType.BlockBlob); + SetBlobContentWithProperties(StorageBlob.BlobType.PageBlob); + } + + /// + /// set blob content with blob meta data + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.SetBlobContent)] + public void SetBlobContentWithMetadata() + { + SetBlobContentWithMetadata(StorageBlob.BlobType.BlockBlob); + SetBlobContentWithMetadata(StorageBlob.BlobType.PageBlob); + } + + /// + /// set blob content with blob meta data + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.SetBlobContent)] + public void SetBlobContentForEixstsBlobWithoutForce() + { + string filePath = FileUtil.GenerateOneTempTestFile(); + StorageBlob.CloudBlobContainer container = blobUtil.CreateContainer(); + string blobName = Utility.GenNameString("blob"); + StorageBlob.ICloudBlob blob = blobUtil.CreateRandomBlob(container, blobName); + + try + { + string previousMd5 = blob.Properties.ContentMD5; + Test.Assert(!agent.SetAzureStorageBlobContent(filePath, container.Name, blob.BlobType, blob.Name, false), "set blob content without force parameter should fail"); + ExpectedContainErrorMessage(ConfirmExceptionMessage); + blob.FetchAttributes(); + ExpectEqual(previousMd5, blob.Properties.ContentMD5, "content md5"); + } + finally + { + blobUtil.RemoveContainer(container.Name); + FileUtil.RemoveFile(filePath); + } + } + + public void SetBlobContentWithProperties(StorageBlob.BlobType blobType) + { + string filePath = FileUtil.GenerateOneTempTestFile(); + StorageBlob.CloudBlobContainer container = blobUtil.CreateContainer(); + Hashtable properties = new Hashtable(); + properties.Add("CacheControl", Utility.GenNameString(string.Empty)); + properties.Add("ContentEncoding", Utility.GenNameString(string.Empty)); + properties.Add("ContentLanguage", Utility.GenNameString(string.Empty)); + properties.Add("ContentMD5", Utility.GenNameString(string.Empty)); + properties.Add("ContentType", Utility.GenNameString(string.Empty)); + + try + { + Test.Assert(agent.SetAzureStorageBlobContent(filePath, container.Name, blobType, string.Empty, true, -1, properties), "set blob content with property should succeed"); + StorageBlob.ICloudBlob blob = container.GetBlobReferenceFromServer(Path.GetFileName(filePath)); + blob.FetchAttributes(); + ExpectEqual(properties["CacheControl"].ToString(), blob.Properties.CacheControl, "Cache control"); + ExpectEqual(properties["ContentEncoding"].ToString(), blob.Properties.ContentEncoding, "Content Encoding"); + ExpectEqual(properties["ContentLanguage"].ToString(), blob.Properties.ContentLanguage, "Content Language"); + ExpectEqual(properties["ContentMD5"].ToString(), blob.Properties.ContentMD5, "Content MD5"); + ExpectEqual(properties["ContentType"].ToString(), blob.Properties.ContentType, "Content Type"); + } + finally + { + blobUtil.RemoveContainer(container.Name); + FileUtil.RemoveFile(filePath); + } + } + + public void SetBlobContentWithMetadata(StorageBlob.BlobType blobType) + { + string filePath = FileUtil.GenerateOneTempTestFile(); + StorageBlob.CloudBlobContainer container = blobUtil.CreateContainer(); + Hashtable metadata = new Hashtable(); + int metaCount = GetRandomTestCount(); + + for (int i = 0; i < metaCount; i++) + { + string key = Utility.GenRandomAlphabetString(); + string value = Utility.GenNameString(string.Empty); + + if (!metadata.ContainsKey(key)) + { + Test.Info(string.Format("Add meta key: {0} value : {1}", key, value)); + metadata.Add(key, value); + } + } + + try + { + Test.Assert(agent.SetAzureStorageBlobContent(filePath, container.Name, blobType, string.Empty, true, -1, null, metadata), "set blob content with meta should succeed"); + StorageBlob.ICloudBlob blob = container.GetBlobReferenceFromServer(Path.GetFileName(filePath)); + blob.FetchAttributes(); + ExpectEqual(metadata.Count, blob.Metadata.Count, "meta data count"); + + foreach (string key in metadata.Keys) + { + ExpectEqual(metadata[key].ToString(), blob.Metadata[key], "Meta data key " + key); + } + } + finally + { + blobUtil.RemoveContainer(container.Name); + FileUtil.RemoveFile(filePath); + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Blob/SetContainerAcl.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Blob/SetContainerAcl.cs new file mode 100644 index 000000000000..26bd55483f03 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Blob/SetContainerAcl.cs @@ -0,0 +1,48 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Commands.Storage.ScenarioTest.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Storage.Blob; +using MS.Test.Common.MsTestLib; +using StorageTestLib; + +namespace Commands.Storage.ScenarioTest.Functional.Blob +{ + /// + /// functional tests for Set-ContainerAcl + /// + [TestClass] + public class SetContainerAcl : TestBase + { + /// + /// set container acl with invalid container name + /// 8.5 Set-AzureStorageContainerACL Negative Functional Cases + /// 1.Set the PublicAccess of a blob container with an invalid blob container name + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Container)] + [TestCategory(PsTag.GetContainer)] + public void SetContainerAclWithInvalidName() + { + string containerName = "ContainerName"; + + Test.Assert(!agent.SetAzureStorageContainerACL(containerName, BlobContainerPublicAccessType.Blob), "SetAzureStorageContainerACL with invalid operation should be failed"); + Test.Assert(agent.ErrorMessages.Count == 1, "set container acl with invalid name should only throw one exception"); + ExpectedStartsWithErrorMessage(String.Format("Container name '{0}' is invalid.", containerName)); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Blob/StartCopy.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Blob/StartCopy.cs new file mode 100644 index 000000000000..366639e43ae9 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Blob/StartCopy.cs @@ -0,0 +1,387 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using Commands.Storage.ScenarioTest.Common; +using Commands.Storage.ScenarioTest.Util; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Blob; +using MS.Test.Common.MsTestLib; +using StorageTestLib; + +namespace Commands.Storage.ScenarioTest.Functional.Blob +{ + /// + /// functional tests for Start-CopyBlob + /// + [TestClass] + class StartCopy : TestBase + { + [ClassInitialize()] + public static void ClassInit(TestContext testContext) + { + TestBase.TestClassInitialize(testContext); + } + + [ClassCleanup()] + public static void SetBlobContentClassCleanup() + { + TestBase.TestClassCleanup(); + } + + /// + /// Cross storage account copy + /// 8.20 Start-AzureStorageBlob Positive Functional Cases + /// 3. Cross account copy and Properties and metadata could be copied correctly + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.StartCopyBlob)] + public void StartCrossAccountCopyWithMetaAndPropertiesTest() + { + blobUtil.SetupTestContainerAndBlob(); + + try + { + CloudStorageAccount secondaryAccount = TestBase.GetCloudStorageAccountFromConfig("Secondary"); + object destContext = PowerShellAgent.GetStorageContext(secondaryAccount.ToString(true)); + CloudBlobUtil destBlobUtil = new CloudBlobUtil(secondaryAccount); + string destContainerName = Utility.GenNameString("secondary"); + CloudBlobContainer destContainer = destBlobUtil.CreateContainer(destContainerName); + AssertCopyBlobCrossContainer(blobUtil.Blob, destContainer, string.Empty, destContext); + destBlobUtil.RemoveContainer(destContainer.Name); + } + finally + { + blobUtil.CleanupTestContainerAndBlob(); + } + } + + /// + /// Cross storage account copy + /// 8.20 Start-AzureStorageBlob Positive Functional Cases + /// 2. Root container case + /// 1. Root -> Non-Root + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.StartCopyBlob)] + public void StartCopyFromRootToNonRootContainerTest() + { + CloudBlobContainer rootContainer = blobUtil.CreateContainer("$root"); + + string srcBlobName = Utility.GenNameString("src"); + ICloudBlob srcBlob = blobUtil.CreateRandomBlob(rootContainer, srcBlobName); + CloudBlobContainer destContainer = blobUtil.CreateContainer(); + + try + { + AssertCopyBlobCrossContainer(srcBlob, destContainer, Utility.GenNameString("dest"), PowerShellAgent.Context); + } + finally + { + //Keep the $root container since it may cause many confict exceptions + blobUtil.RemoveContainer(destContainer.Name); + } + } + + /// + /// Cross storage account copy + /// 8.20 Start-AzureStorageBlob Positive Functional Cases + /// 2. Root container case + /// 2. Non-Root -> Root + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.StartCopyBlob)] + public void StartCopyFromNonRootToRootContainerTest() + { + CloudBlobContainer rootContainer = blobUtil.CreateContainer("$root"); + + string srcBlobName = Utility.GenNameString("src"); + CloudBlobContainer srcContainer = blobUtil.CreateContainer(); + ICloudBlob srcBlob = blobUtil.CreateRandomBlob(srcContainer, srcBlobName); + + try + { + AssertCopyBlobCrossContainer(srcBlob, rootContainer, string.Empty, PowerShellAgent.Context); + } + finally + { + //Keep the $root container since it may cause many confict exceptions + blobUtil.RemoveContainer(srcContainer.Name); + } + } + + /// + /// Cross storage account copy + /// 8.20 Start-AzureStorageBlob Positive Functional Cases + /// 2. Root container case + /// 3. Root -> Root + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.StartCopyBlob)] + public void StartCopyFromRootToRootContainerTest() + { + CloudBlobContainer rootContainer = blobUtil.CreateContainer("$root"); + + string srcBlobName = Utility.GenNameString("src"); + ICloudBlob srcBlob = blobUtil.CreateRandomBlob(rootContainer, srcBlobName); + + try + { + AssertCopyBlobCrossContainer(srcBlob, rootContainer, Utility.GenNameString("dest"), PowerShellAgent.Context); + } + finally + { + //Keep the $root container since it may cause many confict exceptions + } + } + + /// + /// Cross storage account copy + /// 8.20 Start-AzureStorageBlob Positive Functional Cases + /// 2. Root container case + /// 3. Root -> Root + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.StartCopyBlob)] + public void StartCopyFromSnapshotTest() + { + CloudBlobContainer srcContainer = blobUtil.CreateContainer(); + CloudBlobContainer destContainer = blobUtil.CreateContainer(); + + string srcBlobName = Utility.GenNameString("src"); + ICloudBlob srcBlob = blobUtil.CreateRandomBlob(srcContainer, srcBlobName); + ICloudBlob snapshot = default(ICloudBlob); + + if (srcBlob.BlobType == Microsoft.WindowsAzure.Storage.Blob.BlobType.BlockBlob) + { + snapshot = ((CloudBlockBlob)srcBlob).CreateSnapshot(); + } + else + { + snapshot = ((CloudPageBlob)srcBlob).CreateSnapshot(); + } + + try + { + Func StartCopyUsingICloudBlob = delegate() + { + return agent.StartAzureStorageBlobCopy(snapshot, destContainer.Name, string.Empty, PowerShellAgent.Context); + }; + + ICloudBlob destBlob = AssertCopyBlobCrossContainer(snapshot, destContainer, string.Empty, PowerShellAgent.Context); + Test.Assert(snapshot.SnapshotTime != null, "The snapshot time of destination blob should be not null"); + Test.Assert(destBlob.SnapshotTime == null, "The snapshot time of destination blob should be null"); + } + finally + { + blobUtil.RemoveContainer(srcContainer.Name); + blobUtil.RemoveContainer(destContainer.Name); + } + } + + /// + /// Cross storage account copy + /// 8.20 Start-AzureStorageBlob Negative Functional Cases + /// 5. Copy blob to itself + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.StartCopyBlob)] + public void StartCopyFromSelfTest() + { + CloudBlobContainer srcContainer = blobUtil.CreateContainer(); + + string srcBlobName = Utility.GenNameString("src"); + ICloudBlob srcBlob = blobUtil.CreateRandomBlob(srcContainer, srcBlobName); + + try + { + Test.Assert(!agent.StartAzureStorageBlobCopy(srcBlob.Container.Name, srcBlob.Name, srcContainer.Name, string.Empty, PowerShellAgent.Context), "blob copy should failed when copy itself"); + string errorMessage = "Source and destination cannot be the same."; + Test.Assert(errorMessage == agent.ErrorMessages[0], String.Format("Expected error message: {0}, and actually it's {1}", errorMessage, agent.ErrorMessages[0])); + } + finally + { + blobUtil.RemoveContainer(srcContainer.Name); + } + } + + /// + /// Cross storage account copy + /// 8.20 Start-AzureStorageBlob Negative Functional Cases + /// 1. Copy the blob with invalid container name or blob name + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.StartCopyBlob)] + public void StartCopyWithInvalidNameTest() + { + string invalidContainerName = "Invalid"; + int maxBlobNameLength = 1024; + string invalidBlobName = new string('a', maxBlobNameLength + 1); + string invalidContainerErrorMessage = String.Format("Container name '{0}' is invalid.", invalidContainerName); + string invalidBlobErrorMessage = String.Format("Blob name '{0}' is invalid.", invalidBlobName); + Test.Assert(!agent.StartAzureStorageBlobCopy(invalidContainerName, Utility.GenNameString("blob"), Utility.GenNameString("container"), Utility.GenNameString("blob")), "Start copy should failed with invalid src container name"); + ExpectedStartsWithErrorMessage(invalidContainerErrorMessage); + Test.Assert(!agent.StartAzureStorageBlobCopy(Utility.GenNameString("container"), Utility.GenNameString("blob"), invalidContainerName, Utility.GenNameString("blob")), "Start copy should failed with invalid dest container name"); + ExpectedStartsWithErrorMessage(invalidContainerErrorMessage); + Test.Assert(!agent.StartAzureStorageBlobCopy(Utility.GenNameString("container"), invalidBlobName, Utility.GenNameString("container"), Utility.GenNameString("blob")), "Start copy should failed with invalid src blob name"); + ExpectedStartsWithErrorMessage(invalidBlobErrorMessage); + Test.Assert(!agent.StartAzureStorageBlobCopy(Utility.GenNameString("container"), Utility.GenNameString("blob"), Utility.GenNameString("container"), invalidBlobName), "Start copy should failed with invalid dest blob name"); + ExpectedStartsWithErrorMessage(invalidBlobErrorMessage); + } + + /// + /// Cross storage account copy + /// 8.20 Start-AzureStorageBlob Negative Functional Cases + /// 2. Copy the blob that the container doesn't exist + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.StartCopyBlob)] + public void StartCopyWithNotExistsContainerAndBlobTest() + { + string srcContainerName = Utility.GenNameString("copy"); + string destContainerName = Utility.GenNameString("dest"); + string blobName = Utility.GenNameString("blob"); + + string errorMessage = string.Empty; + Test.Assert(!agent.StartAzureStorageBlobCopy(srcContainerName, blobName, destContainerName, string.Empty), "Start copy should failed with not existing src container"); + errorMessage = string.Format("Can not find blob '{0}' in container '{1}'.", blobName, srcContainerName); + ExpectedEqualErrorMessage(errorMessage); + + try + { + CloudBlobContainer srcContainer = blobUtil.CreateContainer(srcContainerName); + Test.Assert(!agent.StartAzureStorageBlobCopy(srcContainerName, blobName, destContainerName, string.Empty), "Start copy should failed with not existing blob"); + ExpectedEqualErrorMessage(errorMessage); + blobUtil.CreateRandomBlob(srcContainer, blobName); + Test.Assert(!agent.StartAzureStorageBlobCopy(srcContainerName, blobName, destContainerName, string.Empty), "Start copy should failed with not existing dest container"); + ExpectedContainErrorMessage("The specified container does not exist."); + } + finally + { + blobUtil.RemoveContainer(srcContainerName); + } + } + + /// + /// Cross storage account copy + /// 8.20 Start-AzureStorageBlob Negative Functional Cases + /// 4. If the existing destination blob type is not same as BlobType parameter + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.StartCopyBlob)] + public void StartCopyWithMismatchedBlobTypeTest() + { + CloudBlobContainer container = blobUtil.CreateContainer(); + ICloudBlob blockBlob = blobUtil.CreateBlockBlob(container, Utility.GenNameString("block")); + ICloudBlob pageBlob = blobUtil.CreatePageBlob(container, Utility.GenNameString("page")); + + try + { + Test.Assert(!agent.StartAzureStorageBlobCopy(blockBlob, container.Name, pageBlob.Name), "Start copy should failed with mismatched blob type"); + ExpectedEqualErrorMessage("Cannot overwrite an existing PageBlob with a BlockBlob."); + Test.Assert(!agent.StartAzureStorageBlobCopy(container.Name, pageBlob.Name, container.Name, blockBlob.Name), "Start copy should failed with mismatched blob type"); + ExpectedEqualErrorMessage("Cannot overwrite an existing BlockBlob with a PageBlob."); + } + finally + { + blobUtil.RemoveContainer(container.Name); + } + } + + /// + /// Copy to an existing blob without force parameter + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.StartCopyBlob)] + public void StartCopyToExistsBlobWithoutForce() + { + CloudBlobContainer container = blobUtil.CreateContainer(); + string srcBlobName = Utility.GenNameString("src"); + ICloudBlob srcBlob = blobUtil.CreateRandomBlob(container, srcBlobName); + string destBlobName = Utility.GenNameString("dest"); + ICloudBlob destBlob = blobUtil.CreateRandomBlob(container, destBlobName); + string filePath = FileUtil.GenerateOneTempTestFile(); + + try + { + Test.Assert(!agent.StartAzureStorageBlobCopy(srcBlob, container.Name, destBlob.Name, null, false), "copy to existing blob without force parameter should fail"); + ExpectedContainErrorMessage(ConfirmExceptionMessage); + srcBlob.FetchAttributes(); + destBlob.FetchAttributes(); + ExpectNotEqual(srcBlob.Properties.ContentMD5, destBlob.Properties.ContentMD5, "content md5"); + } + finally + { + blobUtil.RemoveContainer(container); + FileUtil.RemoveFile(filePath); + } + } + + private ICloudBlob AssertCopyBlobCrossContainer(ICloudBlob srcBlob, CloudBlobContainer destContainer, string destBlobName, object destContext, Func StartFunc = null) + { + if (StartFunc == null) + { + Test.Assert(agent.StartAzureStorageBlobCopy(srcBlob.Container.Name, srcBlob.Name, destContainer.Name, destBlobName, destContext), "blob copy should start sucessfully"); + } + else + { + Test.Assert(StartFunc(), "blob copy should start sucessfully"); + } + + int expectedBlobCount = 1; + Test.Assert(agent.Output.Count == expectedBlobCount, String.Format("Expected get {0} copy state, and actually it's {1}", expectedBlobCount, agent.Output.Count)); + ICloudBlob destBlob = (ICloudBlob)agent.Output[0]["ICloudBlob"]; + string expectedBlobName = destBlobName; + + if(string.IsNullOrEmpty(expectedBlobName)) + { + expectedBlobName = srcBlob.Name; + } + + Test.Assert(expectedBlobName == destBlob.Name, string.Format("Expected destination blob name is {0}, and actually it's {1}", expectedBlobName, destBlob.Name)); + Test.Assert(CloudBlobUtil.WaitForCopyOperationComplete(destBlob), "Copy Operation should finished"); + destBlob.FetchAttributes(); + string expectedSourceUri = CloudBlobUtil.ConvertCopySourceUri(srcBlob.Uri.ToString()); + string sourceUri = destBlob.CopyState.Source.ToString(); + Test.Assert(sourceUri.StartsWith(expectedSourceUri), String.Format("source uri should start with {0}, and actualy it's {1}", expectedSourceUri, sourceUri)); + Test.Assert(destBlob.Metadata.Count > 0, "destination blob should contain meta data"); + Test.Assert(destBlob.Metadata.SequenceEqual(srcBlob.Metadata), "Copied blob's meta data should be equal with origin metadata"); + Test.Assert(destBlob.Properties.ContentEncoding == srcBlob.Properties.ContentEncoding, String.Format("expected content encoding is {0}, and actually it's {1}", srcBlob.Properties.ContentEncoding, destBlob.Properties.ContentEncoding)); + + return destBlob; + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Blob/StopCopy.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Blob/StopCopy.cs new file mode 100644 index 000000000000..ad41bf03618a --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Blob/StopCopy.cs @@ -0,0 +1,189 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Commands.Storage.ScenarioTest.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Storage.Blob; +using MS.Test.Common.MsTestLib; +using StorageTestLib; + +namespace Commands.Storage.ScenarioTest.Functional.Blob +{ + [TestClass] + class StopCopy : TestBase + { + [ClassInitialize()] + public static void ClassInit(TestContext testContext) + { + TestBase.TestClassInitialize(testContext); + } + + [ClassCleanup()] + public static void SetBlobContentClassCleanup() + { + TestBase.TestClassCleanup(); + } + + /// + /// Stop copy in root container + /// 8.22 Stop-AzureStorageBlobCopy + /// 1. Stop the copy task on the blob in root container + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.StopCopyBlob)] + public void StopCopyInRootContainerTest() + { + CloudBlobContainer rootContainer = blobUtil.CreateContainer("$root"); + string srcBlobName = Utility.GenNameString("src"); + //We could only use block blob to copy from external uri + ICloudBlob srcBlob = blobUtil.CreateBlockBlob(rootContainer, srcBlobName); + CopyBigFileToBlob(srcBlob); + AssertStopPendingCopyOperationTest(srcBlob); + } + + /// + /// Stop copy using blob pipeline + /// 8.22 Stop-AzureStorageBlobCopy + /// 2. Stop a list of copying blobs + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.StopCopyBlob)] + public void StopCopyUsingBlobPipelineTest() + { + CloudBlobContainer container = blobUtil.CreateContainer(); + int count = random.Next(1, 5); + List blobNames = new List(); + List blobs = new List(); + + for (int i = 0; i < count; i++) + { + //We could only use block blob to copy from external uri + blobs.Add(blobUtil.CreateBlockBlob(container, Utility.GenNameString("blob"))); + } + + try + { + foreach (ICloudBlob blob in blobs) + { + CopyBigFileToBlob(blob); + } + + ((PowerShellAgent)agent).AddPipelineScript(String.Format("Get-AzureStorageBlob -Container {0}", container.Name)); + string copyId = "*"; + bool force = true; + Test.Assert(agent.StopAzureStorageBlobCopy(string.Empty, string.Empty, copyId, force), "Stop multiple copy operations using blob pipeline should be successful"); + int expectedOutputCount = blobs.Count; + Test.Assert(agent.Output.Count == expectedOutputCount, String.Format("Should return {0} message, and actually it's {1}", expectedOutputCount, agent.Output.Count)); + + for (int i = 0; i < expectedOutputCount; i++) + { + blobs[i].FetchAttributes(); + Test.Assert(blobs[i].CopyState.Status == CopyStatus.Aborted, String.Format("The copy status should be aborted, actually it's {0}", blobs[i].CopyState.Status)); + } + } + finally + { + blobUtil.RemoveContainer(container.Name); + } + } + + /// + /// Unit test for invalid blob or container name. + /// 8.20 Stop-AzureStorageBlobCopy Negative Functional Cases + /// 1. Stop the copy task on invalid container name and blob name + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.StopCopyBlob)] + public void StopCopyWithInvalidNameTest() + { + string invalidContainerName = "Invalid"; + int maxBlobNameLength = 1024; + string invalidBlobName = new string('a', maxBlobNameLength + 1); + string invalidContainerErrorMessage = String.Format("Container name '{0}' is invalid.", invalidContainerName); + string invalidBlobErrorMessage = String.Format("Blob name '{0}' is invalid.", invalidBlobName); + string copyId = "*"; + Test.Assert(!agent.StopAzureStorageBlobCopy(invalidContainerName, Utility.GenNameString("blob"), copyId, false), "Stop copy should failed with invalid container name"); + ExpectedStartsWithErrorMessage(invalidContainerErrorMessage); + Test.Assert(!agent.StopAzureStorageBlobCopy(Utility.GenNameString("container"), invalidBlobName, copyId, false), "Start copy should failed with invalid blob name"); + ExpectedStartsWithErrorMessage(invalidBlobErrorMessage); + } + + /// + /// Stop the copy task on a not existing container and blob + /// 8.22 Stop-CopyAzureStorageBlob Negative Functional Cases + /// 2. Stop the copy task on a not existing container and blob + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Blob)] + [TestCategory(PsTag.StopCopyBlob)] + public void StopCopyWithNotExistsContainerAndBlobTest() + { + string srcContainerName = Utility.GenNameString("copy"); + string blobName = Utility.GenNameString("blob"); + string copyId = Guid.NewGuid().ToString(); + string errorMessage = string.Empty; + Test.Assert(!agent.StopAzureStorageBlobCopy(srcContainerName, blobName, copyId, false), "Stop copy should failed with not existing src container"); + errorMessage = string.Format("Can not find blob '{0}' in container '{1}'.", blobName, srcContainerName); + ExpectedEqualErrorMessage(errorMessage); + + try + { + CloudBlobContainer srcContainer = blobUtil.CreateContainer(srcContainerName); + Test.Assert(!agent.StopAzureStorageBlobCopy(srcContainerName, blobName, copyId, false), "Stop copy should failed with not existing src container"); + errorMessage = string.Format("Can not find blob '{0}' in container '{1}'.", blobName, srcContainerName); + ExpectedEqualErrorMessage(errorMessage); + } + finally + { + blobUtil.RemoveContainer(srcContainerName); + } + } + + private void AssertStopPendingCopyOperationTest(ICloudBlob blob) + { + Test.Assert(blob.CopyState.Status == CopyStatus.Pending, String.Format("The copy status should be pending, actually it's {0}", blob.CopyState.Status)); + string copyId = "*"; + bool force = true; + Test.Assert(agent.StopAzureStorageBlobCopy(blob.Container.Name, blob.Name, copyId, force), "Stop copy operation should be successed"); + blob.FetchAttributes(); + Test.Assert(blob.CopyState.Status == CopyStatus.Aborted, String.Format("The copy status should be aborted, actually it's {0}", blob.CopyState.Status)); + int expectedOutputCount = 1; + Test.Assert(agent.Output.Count == expectedOutputCount, String.Format("Should return {0} message, and actually it's {1}", expectedOutputCount, agent.Output.Count)); + } + + private void CopyBigFileToBlob(ICloudBlob blob) + { + string uri = Test.Data.Get("BigFileUri"); + Test.Assert(!String.IsNullOrEmpty(uri), string.Format("Big file uri should be not empty, actually it's {0}", uri)); + + if (String.IsNullOrEmpty(uri)) + { + return; + } + + Test.Info(String.Format("Copy Big file to blob '{0}'", blob.Name)); + blob.StartCopyFromBlob(new Uri(uri)); + Test.Assert(blob.CopyState.Status == CopyStatus.Pending, String.Format("The copy status should be pending, actually it's {0}", blob.CopyState.Status)); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Queue/GetQueue.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Queue/GetQueue.cs new file mode 100644 index 000000000000..d7e62a57a836 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Queue/GetQueue.cs @@ -0,0 +1,78 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Commands.Storage.ScenarioTest.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Storage.Queue; +using MS.Test.Common.MsTestLib; +using StorageTestLib; + +namespace Commands.Storage.ScenarioTest.Functional.Queue +{ + /// + /// general settings for queue related tests + /// + [TestClass] + public class GetQueue : TestBase + { + [ClassInitialize()] + public static void ClassInit(TestContext testContext) + { + TestBase.TestClassInitialize(testContext); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + TestBase.TestClassCleanup(); + } + + /// + /// get queue with meta data + /// 8.7 Get-AzureStorageQueue Positive Functional cases + /// 6. Write Metadata to the specific queue Get the Metadata from the specific queue + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Queue)] + [TestCategory(PsTag.GetQueue)] + //TODO add test for Get-AzureStorageQueue -Name String.Empty + public void GetSpecifiedQueueWithMetaData() + { + //create random container + int count = random.Next(1, 5); + string queueName = Utility.GenNameString("queue"); + + CloudQueue queue = queueUtil.CreateQueue(queueName); + + try + { + //list specified queue with properties and meta data + Test.Assert(agent.GetAzureStorageQueue(queueName), Utility.GenComparisonData("GetAzureStorageQueue", true)); + + int queueCount = 1; + Test.Assert(agent.Output.Count == queueCount, String.Format("Create {0} queues, but retrieved {1} queues", queueCount, agent.Output.Count)); + + // Verification for returned values + agent.OutputValidation(new List() { queue}); + } + finally + { + queueUtil.RemoveQueue(queueName); + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Queue/RemoveQueue.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Queue/RemoveQueue.cs new file mode 100644 index 000000000000..104760bbbcb9 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Queue/RemoveQueue.cs @@ -0,0 +1,63 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Commands.Storage.ScenarioTest.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Storage.Queue; +using MS.Test.Common.MsTestLib; +using StorageTestLib; + +namespace Commands.Storage.ScenarioTest.Functional.Queue +{ + /// + /// functional test for remove-azurestorage queue + /// + [TestClass] + public class RemoveQueue : TestBase + { + [ClassInitialize()] + public static void ClassInit(TestContext testContext) + { + TestBase.TestClassInitialize(testContext); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + TestBase.TestClassCleanup(); + } + + /// + /// 2. Remove a list of existing queues by using wildcards. + /// 8.8 Remove-AzureStorageQueue Positive Functional Cases + /// 2. Remove a list of existing queues by using wildcards. + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Queue)] + [TestCategory(PsTag.RemoveQueue)] + public void RemoveQueueByWildCardAndPipeline() + { + int queueCount = GetRandomTestCount(); + string queuePrefix = "removequeue"; + List queueNames = Utility.GenNameLists(queuePrefix, queueCount); + List containers = queueUtil.CreateQueue(queueNames); + + ((PowerShellAgent)agent).AddPipelineScript(string.Format("Get-AzureStorageQueue {0}*", queuePrefix)); + Test.Assert(agent.RemoveAzureStorageQueue(string.Empty), "Remove queue using wildcard and pipeline should succeed"); + containers.ForEach(queue => Test.Assert(!queue.Exists(), string.Format("the specified queue '{0}' should not exist", queue.Name))); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/StorageContext.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/StorageContext.cs new file mode 100644 index 000000000000..664a6184b5be --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/StorageContext.cs @@ -0,0 +1,259 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Management.Automation; +using System.Text; +using Commands.Storage.ScenarioTest.BVT; +using Commands.Storage.ScenarioTest.Common; +using Commands.Storage.ScenarioTest.Util; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Blob; +using MS.Test.Common.MsTestLib; +using StorageTestLib; + +namespace Commands.Storage.ScenarioTest.Functional +{ + /// + /// function test for storage context + /// + [TestClass] + class StorageContext: TestBase + { + [ClassInitialize()] + public static void GetBlobClassInit(TestContext testContext) + { + TestBase.TestClassInitialize(testContext); + } + + [ClassCleanup()] + public static void GetBlobClassCleanup() + { + TestBase.TestClassCleanup(); + } + + /// + /// get containers from multiple storage contexts + /// 8.19 New-AzureStorageContext Cmdlet Parameters Positive Functional Cases + /// 9. Use pipeline to run PowerShell cmdlets for two valid accounts + /// + //TODO should add more test about context and pipeline in each cmdlet + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.StorageContext)] + public void GetContainerFromMultipleStorageContext() + { + CloudStorageAccount account1 = TestBase.GetCloudStorageAccountFromConfig(); + CloudStorageAccount account2 = TestBase.GetCloudStorageAccountFromConfig("Secondary"); + string connectionString1 = account1.ToString(true); + string connectionString2 = account2.ToString(true); + Test.Assert(connectionString1 != connectionString2, "Use two different connection string {0} != {1}", connectionString1, connectionString2); + + CloudBlobUtil blobUtil1 = new CloudBlobUtil(account1); + CloudBlobUtil blobUtil2 = new CloudBlobUtil(account2); + string containerName = Utility.GenNameString("container"); + + try + { + CloudBlobContainer container1 = blobUtil1.CreateContainer(containerName); + CloudBlobContainer container2 = blobUtil2.CreateContainer(containerName); + int containerCount = 2; + + string cmd = String.Format("$context1 = new-azurestoragecontext -connectionstring '{0}';$context2 = new-azurestoragecontext -connectionstring '{1}';($context1, $context2)", connectionString1, connectionString2); + agent.UseContextParam = false; + ((PowerShellAgent)agent).AddPipelineScript(cmd); + + Test.Assert(agent.GetAzureStorageContainer(containerName), Utility.GenComparisonData("Get-AzureStorageContainer using multiple storage contexts", true)); + Test.Assert(agent.Output.Count == containerCount, String.Format("Want to retrieve {0} page blob, but retrieved {1} page blobs", containerCount, agent.Output.Count)); + + agent.OutputValidation(new List() { container1, container2 }); + } + finally + { + blobUtil1.RemoveContainer(containerName); + blobUtil2.RemoveContainer(containerName); + } + } + + /// + /// get containers from valid and invalid storage contexts + /// 8.19 New-AzureStorageContext Negative Functional Cases + /// 3. Use pipeline to run PowerShell cmdlets for one valid account and one invalid account + /// + //TODO should add more test about context and pipeline in each cmdlet + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.StorageContext)] + public void GetContainerFromValidAndInvalidStorageContext() + { + CloudStorageAccount account1 = TestBase.GetCloudStorageAccountFromConfig(); + string connectionString1 = account1.ToString(true); + string randomAccountName = Utility.GenNameString("account"); + string randomAccountKey = Utility.GenNameString("key"); + randomAccountKey = Convert.ToBase64String(ASCIIEncoding.ASCII.GetBytes(randomAccountKey)); + + string containerName = Utility.GenNameString("container"); + + try + { + CloudBlobContainer container1 = blobUtil.CreateContainer(containerName); + string cmd = String.Format("$context1 = new-azurestoragecontext -connectionstring '{0}';$context2 = new-azurestoragecontext -StorageAccountName '{1}' -StorageAccountKey '{2}';($context1, $context2)", + connectionString1, randomAccountName, randomAccountKey); + agent.UseContextParam = false; + ((PowerShellAgent)agent).AddPipelineScript(cmd); + + Test.Assert(!agent.GetAzureStorageContainer(containerName), Utility.GenComparisonData("Get-AzureStorageContainer using valid and invalid storage contexts", false)); + Test.Assert(agent.Output.Count == 1, "valid storage context should return 1 container"); + Test.Assert(agent.ErrorMessages.Count == 1, "invalid storage context should return error"); + + //the same error may output different error messages in different environments + bool expectedError = agent.ErrorMessages[0].StartsWith("The remote server returned an error: (502) Bad Gateway") || + agent.ErrorMessages[0].StartsWith("The remote name could not be resolved") || agent.ErrorMessages[0].StartsWith("The operation has timed out"); + Test.Assert(expectedError, "use invalid storage account should return 502 or could not be resolved exception or The operation has timed out, actully {0}", agent.ErrorMessages[0]); + } + finally + { + //TODO test the invalid storage account in subscription + blobUtil.RemoveContainer(containerName); + } + } + + /// + /// run cmdlet without storage context + /// 8.19 New-AzureStorageContext Negative Functional Cases + /// 1. Do not specify the context parameter in the parameter set for each cmdlet + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.StorageContext)] + public void RunCmdletWithoutStorageContext() + { + PowerShellAgent.RemoveAzureSubscriptionIfExists(); + + CLICommonBVT.SaveAndCleanSubScriptionAndEnvConnectionString(); + + string containerName = Utility.GenNameString("container"); + CloudBlobContainer container = blobUtil.CreateContainer(containerName); + + try + { + bool terminated = false; + + try + { + agent.GetAzureStorageContainer(containerName); + } + catch (CmdletInvocationException e) + { + terminated = true; + Test.Info(e.Message); + Test.Assert(e.Message.StartsWith("Can not find your azure storage credential."), "Can not find your azure storage credential."); + } + finally + { + if (!terminated) + { + Test.AssertFail("without storage context should return a terminating error"); + } + } + } + finally + { + blobUtil.RemoveContainer(containerName); + } + + CLICommonBVT.RestoreSubScriptionAndEnvConnectionString(); + } + + /// + /// Get storage context with specified storage account name/key/endpoint + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.StorageContext)] + public void GetStorageContextWithNameKeyEndPoint() + { + string accountName = Utility.GenNameString("account"); + string accountKey = Utility.GenBase64String("key"); + string endPoint = Utility.GenNameString("core.abc.def"); + + Test.Assert(agent.NewAzureStorageContext(accountName, accountKey, endPoint), "New storage context with specified name/key/endpoint should succeed"); + // Verification for returned values + Collection> comp = GetContextCompareData(accountName, endPoint); + agent.OutputValidation(comp); + } + + /// + /// Create anonymous storage context with specified end point + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.StorageContext)] + public void GetAnonymousStorageContextEndPoint() + { + string accountName = Utility.GenNameString("account"); + string accountKey = string.Empty; + string endPoint = Utility.GenNameString("core.abc.def"); + + Test.Assert(agent.NewAzureStorageContext(accountName, accountKey, endPoint), "New storage context with specified name/key/endpoint should succeed"); + // Verification for returned values + Collection> comp = GetContextCompareData(accountName, endPoint); + comp[0]["StorageAccountName"] = "[Anonymous]"; + agent.OutputValidation(comp); + } + + /// + /// Get Container with invalid endpoint + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.StorageContext)] + public void GetContainerWithInvalidEndPoint() + { + string accountName = Utility.GenNameString("account"); + string accountKey = Utility.GenBase64String("key"); + string endPoint = Utility.GenNameString("core.abc.def"); + + string cmd = String.Format("new-azurestoragecontext -StorageAccountName {0} " + + "-StorageAccountKey {1} -Endpoint {2}", accountName, accountKey, endPoint); + ((PowerShellAgent)agent).AddPipelineScript(cmd); + agent.UseContextParam = false; + Test.Assert(!agent.GetAzureStorageContainer(string.Empty), + "Get containers with invalid endpoint should fail"); + ExpectedContainErrorMessage("The host was not found."); + } + + /// + /// Generate storage context compare data + /// + /// Storage Account Name + /// end point + /// storage context compare data + private Collection> GetContextCompareData(string StorageAccountName, string endPoint) + { + Collection> comp = new Collection>(); + string[] endPoints = Utility.GetStorageEndPoints(StorageAccountName, true, endPoint); + comp.Add(new Dictionary{ + {"StorageAccountName", StorageAccountName}, + {"BlobEndPoint", endPoints[0]}, + {"QueueEndPoint", endPoints[1]}, + {"TableEndPoint", endPoints[2]} + }); + return comp; + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Table/RemoveTable.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Table/RemoveTable.cs new file mode 100644 index 000000000000..b2b66fc34707 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Functional/Table/RemoveTable.cs @@ -0,0 +1,86 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Commands.Storage.ScenarioTest.Common; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Storage.Table; +using MS.Test.Common.MsTestLib; +using StorageTestLib; + +namespace Commands.Storage.ScenarioTest.Functional.Table +{ + /// + /// functional test for remove-azurestorage table + /// + [TestClass] + public class RemoveTable : TestBase + { + [ClassInitialize()] + public static void ClassInit(TestContext testContext) + { + TestBase.TestClassInitialize(testContext); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + TestBase.TestClassCleanup(); + } + + /// + /// 2. Remove a list of existing tables by using wildcards. + /// 8.8 Remove-AzureStorageQueue Positive Functional Cases + /// 2. Remove a list of existing queues by using wildcards. + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Table)] + [TestCategory(PsTag.RemoveTable)] + public void RemoveTableByWildCardAndPipeline() + { + int tableCount = GetRandomTestCount(); + string tablePrefix = "removetable"; + List queueNames = Utility.GenNameLists(tablePrefix, tableCount); + List containers = tableUtil.CreateTable(queueNames); + + ((PowerShellAgent)agent).AddPipelineScript(string.Format("Get-AzureStorageTable {0}*", tablePrefix)); + Test.Assert(agent.RemoveAzureStorageTable(string.Empty), "Remove table using wildcard and pipeline should be successed"); + containers.ForEach(table => Test.Assert(!table.Exists(), string.Format("the specified table '{0}' should not exist", table.Name))); + } + + /// + /// Remove an table without force parameter should confirm this operation + /// + [TestMethod()] + [TestCategory(Tag.Function)] + [TestCategory(PsTag.Table)] + [TestCategory(PsTag.RemoveTable)] + public void RemoveTableNeedConfirmation() + { + CloudTable table = tableUtil.CreateTable(); + + try + { + Test.Assert(!agent.RemoveAzureStorageTable(table.Name, false), "remove an table without force should throw a confirmation exception"); + ExpectedContainErrorMessage(ConfirmExceptionMessage); + Test.Assert(table.Exists(), "the table should exist"); + } + finally + { + tableUtil.RemoveTable(table.Name); + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/GB18030Test/BlobContentTest.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/GB18030Test/BlobContentTest.cs new file mode 100644 index 000000000000..82dfd8560e2c --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/GB18030Test/BlobContentTest.cs @@ -0,0 +1,215 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.IO; +using Commands.Storage.ScenarioTest.Common; +using Commands.Storage.ScenarioTest.Util; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using MS.Test.Common.MsTestLib; +using StorageTestLib; +using StorageBlob = Microsoft.WindowsAzure.Storage.Blob; + +namespace Commands.Storage.ScenarioTest.GB18030Test.Blob +{ + /// + /// Functional tests for blob content with GB18030 encoding + /// + [TestClass] + class BlobContentTest : TestBase + { + private static string GB18030String = "啊齄丂狛狜隣郎隣兀﨩ˊ▇█〞〡¦℡㈱‐ー﹡﹢﹫、〓ⅰⅹ⒈€㈠㈩ⅠⅫ! ̄ぁんァヶΑ︴АЯаяāɡㄅㄩ─╋︵﹄︻︱︳︴ⅰⅹɑɡ〇〾⿻⺁䜣€㐀㒣㕴㕵㙉㙊䵯䵰䶴䶵啊齄丂狛狜隣郎隣兀﨩ˊ▇█〞〡¦℡㈱‐ー﹡﹢﹫、〓ⅰⅹ⒈€㈠㈩ⅠⅫ! ̄ぁんァヶΑ︴АЯаяāɡㄅㄩ─╋︵﹄︻︱︳︴ⅰⅹɑɡ〇〾⿻⺁䜣€㐀㒣㕴㕵㙉㙊䵯䵰䶴䶵㒣㕴㕵㙉㙊䵯䵰䶴䶵㒣㕴㕵㙉㙊䵯䵰abcd"; + private static StorageBlob.BlobType[] blobTypes = { StorageBlob.BlobType.BlockBlob, StorageBlob.BlobType.PageBlob }; + + [ClassInitialize()] + public static void ClassInit(TestContext testContext) + { + TestBase.TestClassInitialize(testContext); + } + + [ClassCleanup()] + public static void SetBlobContentClassCleanup() + { + TestBase.TestClassCleanup(); + } + + /// + /// GB18030 compliance test for upload blob cmdlet + /// + [TestMethod()] + [TestCategory(Tag.GB18030)] + [TestCategory(Tag.Function)] + public void UploadBlobTestGB() + { + for (int i = 0; i < blobTypes.Length; ++i) + { + UploadBlobTestGB(new PowerShellAgent(), blobTypes[i]); + } + } + + /// + /// GB18030 compliance test for download blob cmdlet + /// + [TestMethod()] + [TestCategory(Tag.GB18030)] + [TestCategory(Tag.Function)] + public void DownloadBlobTestGB() + { + for (int i = 0; i < blobTypes.Length; ++i) + { + DownloadBlobTestGB(new PowerShellAgent(), blobTypes[i]); + } + } + + /// + /// GB18030 compliance test for copy blob cmdlet + /// + [TestMethod()] + [TestCategory(Tag.GB18030)] + [TestCategory(Tag.Function)] + public void CopyBlobTestGB() + { + for (int i = 0; i < blobTypes.Length; ++i) + { + CopyBlobTestGB(new PowerShellAgent(), blobTypes[i]); + } + } + + internal void UploadBlobTestGB(Agent agent, StorageBlob.BlobType blobType) + { + string uploadFilePath = @".\" + Utility.GenNameString("gbupload"); + string containerName = Utility.GenNameString("gbupload-"); + string blobName = Path.GetFileName(uploadFilePath); + + // create the container + StorageBlob.CloudBlobContainer container = blobUtil.CreateContainer(containerName); + + // Generate a 512 bytes file which contains GB18030 characters + File.WriteAllText(uploadFilePath, GB18030String); + + try + { + //--------------Upload operation-------------- + Test.Assert(agent.SetAzureStorageBlobContent(uploadFilePath, containerName, blobType), + Utility.GenComparisonData("SendAzureStorageBlob", true)); + + StorageBlob.ICloudBlob blob = CloudBlobUtil.GetBlob(container, blobName, blobType); + Test.Assert(blob != null && blob.Exists(), "blob " + blobName + " should exist!"); + + // Check MD5 + string localMd5 = Helper.GetFileContentMD5(uploadFilePath); + blob.FetchAttributes(); + Test.Assert(localMd5 == blob.Properties.ContentMD5, + string.Format("blob content md5 should be {0}, and actualy it's {1}", localMd5, blob.Properties.ContentMD5)); + } + finally + { + // cleanup + container.DeleteIfExists(); + File.Delete(uploadFilePath); + } + } + + internal void DownloadBlobTestGB(Agent agent, StorageBlob.BlobType blobType) + { + string uploadFilePath = @".\" + Utility.GenNameString("gbupload"); + string downloadFilePath = @".\" + Utility.GenNameString("gbdownload"); + string containerName = Utility.GenNameString("gbupload-"); + string blobName = Path.GetFileName(uploadFilePath); + + // create the container + StorageBlob.CloudBlobContainer container = blobUtil.CreateContainer(containerName); + + // Generate a 512 bytes file which contains GB18030 characters + File.WriteAllText(uploadFilePath, GB18030String); + + try + { + // create source blob + StorageBlob.ICloudBlob blob = CloudBlobUtil.GetBlob(container, blobName, blobType); + + // upload file data + using (var fileStream = System.IO.File.OpenRead(uploadFilePath)) + { + blob.UploadFromStream(fileStream); + } + + //--------------Download operation-------------- + Test.Assert(agent.GetAzureStorageBlobContent(blobName, downloadFilePath, containerName, true), "download blob should be successful"); + + // Check MD5 + string localMd5 = Helper.GetFileContentMD5(downloadFilePath); + string uploadMd5 = Helper.GetFileContentMD5(uploadFilePath); + blob.FetchAttributes(); + Test.Assert(localMd5 == uploadMd5, string.Format("blob content md5 should be {0}, and actualy it's {1}", localMd5, uploadMd5)); + } + finally + { + // cleanup + container.DeleteIfExists(); + File.Delete(uploadFilePath); + File.Delete(downloadFilePath); + } + } + + internal void CopyBlobTestGB(Agent agent, StorageBlob.BlobType blobType) + { + string uploadFilePath = @".\" + Utility.GenNameString("gbupload"); + string srcContainerName = Utility.GenNameString("gbupload-", 15); + string destContainerName = Utility.GenNameString("gbupload-", 15); + string blobName = Path.GetFileName(uploadFilePath); + + // create the container + StorageBlob.CloudBlobContainer srcContainer = blobUtil.CreateContainer(srcContainerName); + StorageBlob.CloudBlobContainer destContainer = blobUtil.CreateContainer(destContainerName); + + // Generate a 512 bytes file which contains GB18030 characters + File.WriteAllText(uploadFilePath, GB18030String); + + string localMd5 = Helper.GetFileContentMD5(uploadFilePath); + + try + { + // create source blob + StorageBlob.ICloudBlob blob = CloudBlobUtil.GetBlob(srcContainer, blobName, blobType); + + // upload file data + using (var fileStream = System.IO.File.OpenRead(uploadFilePath)) + { + blob.UploadFromStream(fileStream); + // need to set MD5 as for page blob, it won't set MD5 automatically + blob.Properties.ContentMD5 = localMd5; + blob.SetProperties(); + } + + //--------------Copy blob operation-------------- + Test.Assert(agent.StartAzureStorageBlobCopy(srcContainerName, blobName, destContainerName, blobName), Utility.GenComparisonData("Start copy blob using blob name", true)); + + // Get destination blob + blob = CloudBlobUtil.GetBlob(destContainer, blobName, blobType); + + // Check MD5 + blob.FetchAttributes(); + Test.Assert(localMd5 == blob.Properties.ContentMD5, + string.Format("blob content md5 should be {0}, and actualy it's {1}", localMd5, blob.Properties.ContentMD5)); + } + finally + { + // cleanup + srcContainer.DeleteIfExists(); + destContainer.DeleteIfExists(); + File.Delete(uploadFilePath); + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/MSSharedLibKey.snk b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/MSSharedLibKey.snk differ diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/PowerShellAgent.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/PowerShellAgent.cs new file mode 100644 index 000000000000..cd7327cc8e22 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/PowerShellAgent.cs @@ -0,0 +1,1187 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Management.Automation; +using System.Management.Automation.Runspaces; +using System.Reflection; +using System.Text; +using Commands.Storage.ScenarioTest.Util; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Blob; +using MS.Test.Common.MsTestLib; + +namespace Commands.Storage.ScenarioTest +{ + class PowerShellAgent: Agent + { + private static string ContextParameterName = "Context"; + private static object AgentContext; + private static string CmdletLogFormat = "{0} : {1}"; + + public static object Context + { + get + { + return AgentContext; + } + } + + // add this member for importing module + private static InitialSessionState _InitState = InitialSessionState.CreateDefault(); + + private static PowerShell PowerShellInstance = null; + private static PSCommand InitCommand = null; + + private PowerShell GetPowerShellInstance() + { + if (PowerShellInstance != null) + { + PowerShellAgent.PowerShellInstance.Commands = PowerShellAgent.InitCommand; + PowerShellAgent.PowerShellInstance.Streams.Error.Clear(); + PowerShellAgent.PowerShellInstance.AddScript("$ErrorActionPreference='Continue'"); + PowerShellAgent.PowerShellInstance.AddStatement(); + return PowerShellAgent.PowerShellInstance; + } + else + { + return PowerShell.Create(_InitState); + } + } + + public static void SetPowerShellInstance(PowerShell instance) + { + PowerShellAgent.PowerShellInstance = instance; + PowerShellAgent.InitCommand = instance.Commands; + } + + public static void ImportModule(string ModuleFilePath) + { + if (string.IsNullOrEmpty(ModuleFilePath)) + { + Test.Info("Skip importing powershell module"); + return; + } + + if (File.Exists(ModuleFilePath)) + { + Test.Info("Import-Module {0}", ModuleFilePath); + _InitState.ImportPSModule(new string[] { ModuleFilePath }); + } + else + throw new Exception(String.Format("Module file path : {0} not found!", ModuleFilePath)); + } + + /// + /// Import azure subscription + /// + /// Azure subscription file path + public static void ImportAzureSubscriptionAndSetStorageAccount(string filePath, string subscriptionName, string storageAccountName) + { + PowerShell ps = PowerShell.Create(_InitState); + //TODO add tests for positional parameter + ps.AddCommand("Import-AzurePublishSettingsFile"); + ps.BindParameter("PublishSettingsFile", filePath); + ps.AddStatement(); + ps.AddCommand("Set-AzureSubscription"); + ps.BindParameter("SubscriptionName", subscriptionName); + ps.BindParameter("CurrentStorageAccountName", storageAccountName); + Test.Info("set current storage account in subscription, Cmdline: {0}", GetCommandLine(ps)); + ps.Invoke(); + + if(ps.Streams.Error.Count > 0) + { + Test.Error("Can't set current storage account to {0} in subscription {1}. Exception: {2}", storageAccountName, subscriptionName, ps.Streams.Error[0].Exception.Message); + } + } + + public static string AddRandomAzureEnvironment(string endpoint, string prefix = "") + { + string envName = Utility.GenNameString(prefix); + PowerShell ps = PowerShell.Create(_InitState); + ps.AddCommand("Add-AzureEnvironment"); + ps.BindParameter("Name", envName); + ps.BindParameter("PublishSettingsFileUrl", Utility.GenNameString("PublishSettingsFileUrl")); + ps.BindParameter("ServiceEndpoint", Utility.GenNameString("ServiceEndpoint")); + ps.BindParameter("ManagementPortalUrl", Utility.GenNameString("ManagementPortalUrl")); + ps.BindParameter("StorageEndpoint", endpoint); + Test.Info("Add Azure Environment, Cmdline: {0}", GetCommandLine(ps)); + ps.Invoke(); + + if (ps.Streams.Error.Count > 0) + { + Test.Error("Can't add azure envrionment. Exception: {0}", ps.Streams.Error[0].Exception.Message); + } + return envName; + } + + public static void RemoveAzureEnvironment(string name) + { + PowerShell ps = PowerShell.Create(_InitState); + ps.AddCommand("Remove-AzureEnvironment"); + ps.BindParameter("Name", name); + Test.Info("Remove Azure Environment, Cmdline: {0}", GetCommandLine(ps)); + ps.Invoke(); + + if (ps.Streams.Error.Count > 0) + { + Test.Error("Can't add azure envrionment. Exception: {0}", ps.Streams.Error[0].Exception.Message); + } + } + + /// + /// Remove the current azure subscription + /// + public static void RemoveAzureSubscriptionIfExists() + { + PowerShell ps = PowerShell.Create(_InitState); + ps.AddScript("Get-AzureSubscription | Remove-AzureSubscription -Force"); + ps.Invoke(); + } + + public static void SetStorageContext(string StorageAccountName, string StorageAccountKey, + bool useHttps = true, string endPoint = "") + { + PowerShell ps = PowerShell.Create(_InitState); + ps.AddCommand("New-AzureStorageContext"); + ps.BindParameter("StorageAccountName", StorageAccountName); + ps.BindParameter("StorageAccountKey", StorageAccountKey); + ps.BindParameter("EndPoint", endPoint.Trim()); + + if (useHttps) + { + //TODO need tests to check whether it's ignore cases. + ps.BindParameter("Protocol", "https"); + } + else + { + ps.BindParameter("Protocol", "http"); + } + + Test.Info("Set PowerShell Storage Context using name and key, Cmdline: {0}", GetCommandLine(ps)); + SetStorageContext(ps); + } + + public static void SetStorageContextWithAzureEnvironment(string StorageAccountName, string StorageAccountKey, + bool useHttps = true, string azureEnvironmentName = "") + { + PowerShell ps = PowerShell.Create(_InitState); + ps.AddCommand("New-AzureStorageContext"); + ps.BindParameter("StorageAccountName", StorageAccountName); + ps.BindParameter("StorageAccountKey", StorageAccountKey); + ps.BindParameter("Environment", azureEnvironmentName.Trim()); + + if (useHttps) + { + ps.BindParameter("Protocol", "https"); + } + else + { + ps.BindParameter("Protocol", "http"); + } + + Test.Info("Set PowerShell Storage Context using name, key and azureEnvironment, Cmdline: {0}", GetCommandLine(ps)); + SetStorageContext(ps); + } + + public static void SetStorageContext(string ConnectionString) + { + PowerShell ps = PowerShell.Create(_InitState); + ps.AddCommand("New-AzureStorageContext"); + ps.BindParameter("ConnectionString", ConnectionString); + + Test.Info("Set PowerShell Storage Context using connection string, Cmdline: {0}", GetCommandLine(ps)); + SetStorageContext(ps); + } + + public static void SetLocalStorageContext() + { + PowerShell ps = PowerShell.Create(_InitState); + ps.AddCommand("New-AzureStorageContext"); + ps.BindParameter("Local"); + + Test.Info("Set PowerShell Storage Context using local development storage account, Cmdline: {0}", GetCommandLine(ps)); + SetStorageContext(ps); + } + + public static void SetAnonymousStorageContext(string StorageAccountName, bool useHttps, string endPoint = "") + { + PowerShell ps = PowerShell.Create(_InitState); + ps.AddCommand("New-AzureStorageContext"); + ps.BindParameter("StorageAccountName", StorageAccountName); + ps.BindParameter("Anonymous"); + ps.BindParameter("EndPoint", endPoint.Trim()); + + if (useHttps) + { + //TODO need tests to check whether it's ignore cases. + ps.BindParameter("Protocol", "https"); + } + else + { + ps.BindParameter("Protocol", "http"); + } + + Test.Info("Set PowerShell Storage Context using Anonymous storage account, Cmdline: {0}", GetCommandLine(ps)); + SetStorageContext(ps); + } + + internal static void SetStorageContext(PowerShell ps) + { + AgentContext = null; + + foreach (PSObject result in ps.Invoke()) + { + foreach (PSMemberInfo member in result.Members) + { + if (member.Name.Equals("Context")) + { + AgentContext = member.Value; + return; + } + } + } + // if we cannot find the Context field, we will throw an exception here + throw new Exception("StorageContext not found!"); + } + + /// + /// Clean storage context + /// + public static void CleanStorageContext() + { + AgentContext = null; + } + + internal static object GetStorageContext(Collection objects) + { + foreach (PSObject result in objects) + { + foreach (PSMemberInfo member in result.Members) + { + if (member.Name.Equals("Context")) + { + return member.Value; + } + } + } + return null; + } + + internal static object GetStorageContext(string ConnectionString) + { + PowerShell ps = PowerShell.Create(_InitState); + ps.AddCommand("New-AzureStorageContext"); + ps.BindParameter("ConnectionString", ConnectionString); + + Test.Info("{0} Test...\n{1}", MethodBase.GetCurrentMethod().Name, GetCommandLine(ps)); + + return GetStorageContext(ps.Invoke()); + } + + internal static object GetStorageContext(string StorageAccountName, string StorageAccountKey) + { + PowerShell ps = PowerShell.Create(_InitState); + ps.AddCommand("New-AzureStorageContext"); + ps.BindParameter("StorageAccountName", StorageAccountName); + ps.BindParameter("StorageAccountKey", StorageAccountKey); + + Test.Info("{0} Test...\n{1}", MethodBase.GetCurrentMethod().Name, GetCommandLine(ps)); + + return GetStorageContext(ps.Invoke()); + } + + public override bool NewAzureStorageContext(string StorageAccountName, string StorageAccountKey, string endPoint = "") + { + PowerShell ps = GetPowerShellInstance(); + ps.AddCommand("New-AzureStorageContext"); + ps.BindParameter("StorageAccountName", StorageAccountName); + ps.BindParameter("StorageAccountKey", StorageAccountKey); + + if (string.IsNullOrEmpty(StorageAccountKey)) + { + ps.BindParameter("Anonymous", true); + } + + ps.BindParameter("EndPoint", endPoint); + + Test.Info(CmdletLogFormat, MethodBase.GetCurrentMethod().Name, GetCommandLine(ps)); + + return NewAzureStorageContext(ps); + } + + public override bool NewAzureStorageContext(string ConnectionString) + { + PowerShell ps = GetPowerShellInstance(); + ps.AddCommand("New-AzureStorageContext"); + ps.BindParameter("ConnectionString", ConnectionString); + + Test.Info(CmdletLogFormat, MethodBase.GetCurrentMethod().Name, GetCommandLine(ps)); + + return NewAzureStorageContext(ps); + } + + internal bool NewAzureStorageContext(PowerShell ps) + { + ParseContainerCollection(ps.Invoke()); + ParseErrorMessages(ps); + + return !ps.HadErrors; + } + + + public override bool NewAzureStorageContainer(string ContainerName) + { + PowerShell ps = GetPowerShellInstance(); + ps.AddCommand("New-AzureStorageContainer"); + + ps.BindParameter("Name", ContainerName); + + AddCommonParameters(ps); + + Test.Info(CmdletLogFormat, MethodBase.GetCurrentMethod().Name, GetCommandLine(ps)); + + ParseContainerCollection(ps.Invoke()); + ParseErrorMessages(ps); + + return !ps.HadErrors; + } + + public override bool NewAzureStorageContainer(string[] ContainerNames) + { + PowerShell ps = GetPowerShellInstance(); + ps.AddScript(FormatNameList(ContainerNames)); + ps.AddCommand("New-AzureStorageContainer"); + AddCommonParameters(ps); + + Test.Info(CmdletLogFormat, MethodBase.GetCurrentMethod().Name, GetCommandLine(ps)); + + ParseContainerCollection(ps.Invoke()); + ParseErrorMessages(ps); + + return !ps.HadErrors; + } + + public override bool GetAzureStorageContainer(string ContainerName) + { + PowerShell ps = GetPowerShellInstance(); + AttachPipeline(ps); + ps.AddCommand("Get-AzureStorageContainer"); + ps.BindParameter("Name", ContainerName); + + AddCommonParameters(ps); + + Test.Info(CmdletLogFormat, MethodBase.GetCurrentMethod().Name, GetCommandLine(ps)); + + ParseContainerCollection(ps.Invoke()); + ParseErrorMessages(ps); + + return !ps.HadErrors; + } + + public override bool GetAzureStorageContainerByPrefix(string Prefix) + { + PowerShell ps = GetPowerShellInstance(); + ps.AddCommand("Get-AzureStorageContainer"); + ps.BindParameter("Prefix", Prefix); + AddCommonParameters(ps); + + Test.Info(CmdletLogFormat, MethodBase.GetCurrentMethod().Name, GetCommandLine(ps)); + + ParseContainerCollection(ps.Invoke()); + ParseErrorMessages(ps); + + return !ps.HadErrors; + } + + public override bool SetAzureStorageContainerACL(string ContainerName, BlobContainerPublicAccessType PublicAccess, bool PassThru = true) + { + PowerShell ps = GetPowerShellInstance(); + ps.AddCommand("Set-AzureStorageContainerACL"); + ps.BindParameter("Name", ContainerName); + ps.BindParameter("PublicAccess", PublicAccess); + ps.BindParameter("PassThru", PassThru); + + AddCommonParameters(ps); + + Test.Info(CmdletLogFormat, MethodBase.GetCurrentMethod().Name, GetCommandLine(ps)); + + ParseContainerCollection(ps.Invoke()); + ParseErrorMessages(ps); + + return !ps.HadErrors; + } + + public override bool RemoveAzureStorageContainer(string ContainerName, bool Force = true) + { + PowerShell ps = GetPowerShellInstance(); + AttachPipeline(ps); + ps.AddCommand("Remove-AzureStorageContainer"); + ps.BindParameter("Name", ContainerName); + + AddCommonParameters(ps, Force); + + Test.Info(CmdletLogFormat, MethodBase.GetCurrentMethod().Name, GetCommandLine(ps)); + + ParseCollection(ps.Invoke()); + ParseErrorMessages(ps); + + return !ps.HadErrors; + } + + public override bool RemoveAzureStorageContainer(string[] ContainerNames, bool Force = true) + { + PowerShell ps = GetPowerShellInstance(); + ps.AddScript(FormatNameList(ContainerNames)); + ps.AddCommand("Remove-AzureStorageContainer"); + AddCommonParameters(ps, Force); + + Test.Info(CmdletLogFormat, MethodBase.GetCurrentMethod().Name, GetCommandLine(ps)); + + ParseCollection(ps.Invoke()); + ParseErrorMessages(ps); + + return !ps.HadErrors; + } + + public override bool NewAzureStorageQueue(string QueueName) + { + PowerShell ps = GetPowerShellInstance(); + ps.AddCommand("New-AzureStorageQueue"); + ps.BindParameter("Name", QueueName); + AddCommonParameters(ps); + + Test.Info(CmdletLogFormat, MethodBase.GetCurrentMethod().Name, GetCommandLine(ps)); + + ParseCollection(ps.Invoke()); + ParseErrorMessages(ps); + + return !ps.HadErrors; + } + + public override bool NewAzureStorageQueue(string[] QueueNames) + { + PowerShell ps = GetPowerShellInstance(); + ps.AddScript(FormatNameList(QueueNames)); + ps.AddCommand("New-AzureStorageQueue"); + AddCommonParameters(ps); + + Test.Info(CmdletLogFormat, MethodBase.GetCurrentMethod().Name, GetCommandLine(ps)); + + ParseCollection(ps.Invoke()); + ParseErrorMessages(ps); + + return !ps.HadErrors; + } + + public override bool GetAzureStorageQueue(string QueueName) + { + PowerShell ps = GetPowerShellInstance(); + ps.AddCommand("Get-AzureStorageQueue"); + ps.BindParameter("Name", QueueName); + + AddCommonParameters(ps); + + Test.Info(CmdletLogFormat, MethodBase.GetCurrentMethod().Name, GetCommandLine(ps)); + + ParseCollection(ps.Invoke()); + ParseErrorMessages(ps); + + return !ps.HadErrors; + } + + public override bool GetAzureStorageQueueByPrefix(string Prefix) + { + PowerShell ps = GetPowerShellInstance(); + ps.AddCommand("Get-AzureStorageQueue"); + ps.BindParameter("Prefix", Prefix); + AddCommonParameters(ps); + + Test.Info(CmdletLogFormat, MethodBase.GetCurrentMethod().Name, GetCommandLine(ps)); + + ParseCollection(ps.Invoke()); + ParseErrorMessages(ps); + + return !ps.HadErrors; + } + + public override bool RemoveAzureStorageQueue(string QueueName, bool Force = true) + { + PowerShell ps = GetPowerShellInstance(); + AttachPipeline(ps); + ps.AddCommand("Remove-AzureStorageQueue"); + ps.BindParameter("Name", QueueName); + + AddCommonParameters(ps, Force); + + Test.Info(CmdletLogFormat, MethodBase.GetCurrentMethod().Name, GetCommandLine(ps)); + + ParseCollection(ps.Invoke()); + ParseErrorMessages(ps); + + return !ps.HadErrors; + } + + public override bool RemoveAzureStorageQueue(string[] QueueNames, bool Force = true) + { + PowerShell ps = GetPowerShellInstance(); + ps.AddScript(FormatNameList(QueueNames)); + ps.AddCommand("Remove-AzureStorageQueue"); + AddCommonParameters(ps, Force); + + Test.Info(CmdletLogFormat, MethodBase.GetCurrentMethod().Name, GetCommandLine(ps)); + + ParseCollection(ps.Invoke()); + ParseErrorMessages(ps); + + return !ps.HadErrors; + } + + public override bool SetAzureStorageBlobContent(string FileName, string ContainerName, BlobType Type, string BlobName = "", + bool Force = true, int ConcurrentCount = -1, Hashtable properties = null, Hashtable metadata = null) + { + PowerShell ps = GetPowerShellInstance(); + AttachPipeline(ps); + ps.AddCommand("Set-AzureStorageBlobContent"); + ps.BindParameter("File", FileName); + ps.BindParameter("Blob", BlobName); + ps.BindParameter("Container", ContainerName); + ps.BindParameter("Properties", properties); + ps.BindParameter("Metadata", metadata); + + if (Type == BlobType.BlockBlob) + { + ps.BindParameter("BlobType", "Block"); + } + else if (Type == BlobType.PageBlob) + { + ps.BindParameter("BlobType", "Page"); + } + + if (ConcurrentCount != -1) + { + ps.BindParameter("ConcurrentCount", ConcurrentCount); + } + + AddCommonParameters(ps, Force); + + Test.Info(CmdletLogFormat, MethodBase.GetCurrentMethod().Name, GetCommandLine(ps)); + + ParseBlobCollection(ps.Invoke()); + ParseErrorMessages(ps); + + return !ps.HadErrors; + } + + public override bool GetAzureStorageBlobContent(string Blob, string FileName, string ContainerName, + bool Force = true, int ConcurrentCount = -1) + { + PowerShell ps = GetPowerShellInstance(); + AttachPipeline(ps); + ps.AddCommand("Get-AzureStorageBlobContent"); + ps.BindParameter("Blob", Blob); + ps.BindParameter("Destination", FileName); + ps.BindParameter("Container", ContainerName); + + if (ConcurrentCount != -1) + { + ps.BindParameter("ConcurrentCount", ConcurrentCount); + } + + AddCommonParameters(ps, Force); + + Test.Info(CmdletLogFormat, MethodBase.GetCurrentMethod().Name, GetCommandLine(ps)); + + ParseBlobCollection(ps.Invoke()); + ParseErrorMessages(ps); + + return !ps.HadErrors; + } + + public override bool GetAzureStorageBlob(string BlobName, string ContainerName) + { + PowerShell ps = GetPowerShellInstance(); + AttachPipeline(ps); + ps.AddCommand("Get-AzureStorageBlob"); + ps.BindParameter("Blob", BlobName); + ps.BindParameter("Container", ContainerName); + + AddCommonParameters(ps); + + Test.Info(CmdletLogFormat, MethodBase.GetCurrentMethod().Name, GetCommandLine(ps)); + + ParseBlobCollection(ps.Invoke()); + ParseErrorMessages(ps); + + return !ps.HadErrors; + } + + public override bool GetAzureStorageBlobByPrefix(string Prefix, string ContainerName) + { + PowerShell ps = GetPowerShellInstance(); + AttachPipeline(ps); + ps.AddCommand("Get-AzureStorageBlob"); + ps.BindParameter("Prefix", Prefix); + ps.BindParameter("Container", ContainerName); + AddCommonParameters(ps); + + Test.Info(CmdletLogFormat, MethodBase.GetCurrentMethod().Name, GetCommandLine(ps)); + + ParseBlobCollection(ps.Invoke()); + ParseErrorMessages(ps); + + return !ps.HadErrors; + } + + public override bool RemoveAzureStorageBlob(string BlobName, string ContainerName, bool onlySnapshot = false, bool force = true) + { + PowerShell ps = GetPowerShellInstance(); + AttachPipeline(ps); + ps.AddCommand("Remove-AzureStorageBlob"); + ps.BindParameter("Blob", BlobName); + ps.BindParameter("Container", ContainerName); + ps.BindParameter("DeleteSnapshot", onlySnapshot); + + AddCommonParameters(ps, force); + + Test.Info(CmdletLogFormat, MethodBase.GetCurrentMethod().Name, GetCommandLine(ps)); + + ParseCollection(ps.Invoke()); + ParseErrorMessages(ps); + + return !ps.HadErrors; + } + + public override bool NewAzureStorageTable(string TableName) + { + PowerShell ps = GetPowerShellInstance(); + ps.AddCommand("New-AzureStorageTable"); + ps.BindParameter("Name", TableName); + + AddCommonParameters(ps); + + Test.Info(CmdletLogFormat, MethodBase.GetCurrentMethod().Name, GetCommandLine(ps)); + + ParseContainerCollection(ps.Invoke()); + ParseErrorMessages(ps); + + return !ps.HadErrors; + } + + public override bool NewAzureStorageTable(string[] TableNames) + { + PowerShell ps = GetPowerShellInstance(); + ps.AddScript(FormatNameList(TableNames)); + ps.AddCommand("New-AzureStorageTable"); + AddCommonParameters(ps); + + Test.Info(CmdletLogFormat, MethodBase.GetCurrentMethod().Name, GetCommandLine(ps)); + + ParseCollection(ps.Invoke()); + ParseErrorMessages(ps); + + return !ps.HadErrors; + } + + public override bool GetAzureStorageTable(string TableName) + { + PowerShell ps = GetPowerShellInstance(); + ps.AddCommand("Get-AzureStorageTable"); + ps.BindParameter("Name", TableName); + AddCommonParameters(ps); + + Test.Info(CmdletLogFormat, MethodBase.GetCurrentMethod().Name, GetCommandLine(ps)); + + ParseContainerCollection(ps.Invoke()); + ParseErrorMessages(ps); + + return !ps.HadErrors; + } + + public override bool GetAzureStorageTableByPrefix(string Prefix) + { + PowerShell ps = GetPowerShellInstance(); + ps.AddCommand("Get-AzureStorageTable"); + ps.BindParameter("Prefix", Prefix); + AddCommonParameters(ps); + + Test.Info(CmdletLogFormat, MethodBase.GetCurrentMethod().Name, GetCommandLine(ps)); + + ParseContainerCollection(ps.Invoke()); + ParseErrorMessages(ps); + + return !ps.HadErrors; + } + + public override bool RemoveAzureStorageTable(string TableName, bool Force = true) + { + PowerShell ps = GetPowerShellInstance(); + AttachPipeline(ps); + ps.AddCommand("Remove-AzureStorageTable"); + ps.BindParameter("Name", TableName); + + AddCommonParameters(ps, Force); + + Test.Info(CmdletLogFormat, MethodBase.GetCurrentMethod().Name, GetCommandLine(ps)); + + ParseCollection(ps.Invoke()); + ParseErrorMessages(ps); + + return !ps.HadErrors; + } + + public override bool RemoveAzureStorageTable(string[] TableNames, bool Force = true) + { + PowerShell ps = GetPowerShellInstance(); + ps.AddScript(FormatNameList(TableNames)); + ps.AddCommand("Remove-AzureStorageTable"); + AddCommonParameters(ps, Force); + + Test.Info(CmdletLogFormat, MethodBase.GetCurrentMethod().Name, GetCommandLine(ps)); + + ParseCollection(ps.Invoke()); + ParseErrorMessages(ps); + + return !ps.HadErrors; + } + + public override bool StartAzureStorageBlobCopy(string sourceUri, string destContainerName, string destBlobName, object destContext = null, bool force = true) + { + PowerShell ps = GetPowerShellInstance(); + ps.AddCommand("Start-AzureStorageBlobCopy"); + ps.BindParameter("SrcUri", sourceUri); + ps.BindParameter("DestContainer", destContainerName); + ps.BindParameter("DestBlob", destBlobName); + ps.BindParameter("Force", force); + ps.BindParameter("DestContext", destContext); + + //Don't use context parameter for this cmdlet + bool savedParameter = UseContextParam; + UseContextParam = false; + bool executeState = InvokeStoragePowerShell(ps); + UseContextParam = savedParameter; + return executeState; + } + + public override bool StartAzureStorageBlobCopy(string srcContainerName, string srcBlobName, string destContainerName, string destBlobName, object destContext = null, bool force = true) + { + PowerShell ps = GetPowerShellInstance(); + ps.AddCommand("Start-AzureStorageBlobCopy"); + ps.BindParameter("SrcContainer", srcContainerName); + ps.BindParameter("SrcBlob", srcBlobName); + ps.BindParameter("DestContainer", destContainerName); + ps.BindParameter("Force", force); + ps.BindParameter("DestBlob", destBlobName); + ps.BindParameter("DestContext", destContext); + + return InvokeStoragePowerShell(ps); + } + + public override bool StartAzureStorageBlobCopy(ICloudBlob srcBlob, string destContainerName, string destBlobName, object destContext = null, bool force = true) + { + PowerShell ps = GetPowerShellInstance(); + ps.AddCommand("Start-AzureStorageBlobCopy"); + ps.BindParameter("ICloudBlob", srcBlob); + ps.BindParameter("DestContainer", destContainerName); + ps.BindParameter("Force", force); + ps.BindParameter("DestBlob", destBlobName); + ps.BindParameter("DestContext", destContext); + + return InvokeStoragePowerShell(ps); + } + + public override bool GetAzureStorageBlobCopyState(string containerName, string blobName, bool waitForComplete) + { + PowerShell ps = GetPowerShellInstance(); + AttachPipeline(ps); + + ps.AddCommand("Get-AzureStorageBlobCopyState"); + + ps.BindParameter("Container", containerName); + ps.BindParameter("Blob", blobName); + ps.BindParameter("WaitForComplete", waitForComplete); + + return InvokeStoragePowerShell(ps); + } + + public override bool GetAzureStorageBlobCopyState(ICloudBlob blob, object context, bool waitForComplete) + { + PowerShell ps = GetPowerShellInstance(); + ps.AddCommand("Get-AzureStorageBlobCopyState"); + ps.BindParameter("ICloudBlob", blob); + ps.BindParameter("WaitForComplete", waitForComplete); + + return InvokeStoragePowerShell(ps, context); + } + + public override bool StopAzureStorageBlobCopy(string containerName, string blobName, string copyId, bool force) + { + PowerShell ps = GetPowerShellInstance(); + AttachPipeline(ps); + + ps.AddCommand("Stop-AzureStorageBlobCopy"); + ps.BindParameter("Container", containerName); + ps.BindParameter("Blob", blobName); + ps.BindParameter("CopyId", copyId); + ps.BindParameter("Force", force); + + return InvokeStoragePowerShell(ps); + } + + private bool InvokeStoragePowerShell(PowerShell ps, object context = null) + { + if (context == null) + { + AddCommonParameters(ps); + } + else + { + ps.BindParameter(ContextParameterName, context); + } + + Test.Info(CmdletLogFormat, MethodBase.GetCurrentMethod().Name, GetCommandLine(ps)); + + //TODO We should add a time out for this invoke. Bad news, powershell don't support buildin time out for invoking. + try + { + ParseCollection(ps.Invoke()); + } + catch (Exception e) + { + Test.Info(e.Message); + } + + ParseErrorMessages(ps); + + return !ps.HadErrors; + } + + /// + /// Add the common parameters + /// -Context ... + /// -Force ... + /// + internal void AddCommonParameters(PowerShell ps, bool Force) + { + AddCommonParameters(ps); + + if (Force) + { + ps.BindParameter("Force"); + } + } + + /// + /// Add the common parameters + /// -Context ... + /// + internal void AddCommonParameters(PowerShell ps) + { + if (UseContextParam && AgentContext != null) + { + ps.BindParameter(ContextParameterName, AgentContext); + } + } + + /// + /// Get the command line string + /// + static internal string GetCommandLine(PowerShell ps) + { + StringBuilder strCmdLine = new StringBuilder(); + bool bFirst = true; + foreach (Command command in ps.Commands.Commands) + { + if (bFirst) + { + bFirst = false; + } + else + { + strCmdLine.Append(" | "); + } + + strCmdLine.Append(command.CommandText); + + foreach (CommandParameter param in command.Parameters) + { + if (param.Name != null) + { + strCmdLine.Append(" -" + param.Name); + } + + if (param.Value != null) + { + strCmdLine.Append(" " + param.Value); + } + } + } + return strCmdLine.ToString(); + } + + /// + /// Parse the return values in the colletion + /// + internal void ParseCollection(Collection Values) + { + _Output.Clear(); + + foreach (PSObject result in Values) + { + Dictionary dic = new Dictionary(); + foreach (PSMemberInfo member in result.Members) + { + if (member.Value != null) + { + // skip the PSMethod members + if (member.Value.GetType() != typeof(PSMethod)) + { + dic.Add(member.Name, member.Value); + } + } + else + { + dic.Add(member.Name, member.Value); + } + } + _Output.Add(dic); + } + + //clean pipeline when finished + CleanPipeline(); + } + + /// + /// Parse the return values of container operation + /// + internal void ParseContainerCollection(Collection Values) + { + _Output.Clear(); + + foreach (PSObject result in Values) + { + Dictionary dic = new Dictionary(); + foreach (PSMemberInfo member in result.Members) + { + if (member.Value != null) + { + // skip the PSMethod members + if (member.Value.GetType() != typeof(PSMethod)) + { + dic.Add(member.Name, member.Value); + } + } + else + { + dic.Add(member.Name, member.Value); + } + + if (member.Name.Equals("Properties")) + { + BlobContainerProperties properties = (BlobContainerProperties)member.Value; + dic.Add("LastModified", properties.LastModified); + } + } + _Output.Add(dic); + } + + //clean pipeline when finished + CleanPipeline(); + } + + /// + /// Parse the return values of blob operation + /// + internal void ParseBlobCollection(Collection Values) + { + _Output.Clear(); + + foreach (PSObject result in Values) + { + Dictionary dic = new Dictionary(); + foreach (PSMemberInfo member in result.Members) + { + if (member.Value != null) + { + // skip the PSMethod members + if (member.Value.GetType() != typeof(PSMethod)) + { + dic.Add(member.Name, member.Value); + } + } + else + { + dic.Add(member.Name, member.Value); + } + + if (member.Name.Equals("Properties")) + { + BlobProperties properties = (BlobProperties)member.Value; + dic.Add("LastModified", properties.LastModified); + dic.Add("Length", properties.Length); + dic.Add("ContentType", properties.ContentType); + } + } + _Output.Add(dic); + } + + //clean pipeline when finished + CleanPipeline(); + } + + /// + /// Parse the error messages in PowerShell + /// + internal void ParseErrorMessages(PowerShell ps) + { + if (ps.HadErrors) + { + _ErrorMessages.Clear(); + foreach (ErrorRecord record in ps.Streams.Error) + { + _ErrorMessages.Add(record.Exception.Message); + Test.Info(record.Exception.Message); + + //Display the stack trace for storage exception in order to investigate the root cause of errors + if (record.Exception.GetType() == typeof(StorageException)) + { + //Display the stack trace from where the exception is thrown + //Since we repack the storage exception, the following call stack may be inaccurate + Test.Info("[Exception Call Stack Trace]:{0}", record.Exception.StackTrace); + + if (record.Exception.InnerException != null) + { + //Display the stack trace of innerException + Test.Info("[InnerException Call Stack Trace]:{0}", record.Exception.InnerException.StackTrace); + } + } + + } + } + } + + /// + /// Convert names to a string type name list + /// e.g. + /// names = new string[]{ "bbbb", "cccc", "dddd" } + /// ConvertNameList(names) = "bbbb", "cccc", "dddd" + /// + internal static string FormatNameList(string[] names) + { + StringBuilder builder = new StringBuilder(); + bool bFirst = true; + + foreach (string name in names) + { + if (bFirst) + { + bFirst = false; + } + else + { + builder.Append(","); + } + + builder.Append(String.Format("\"{0}\"", name)); + } + return builder.ToString(); + } + + ///------------------------------------- + /// The following interface only used for PowerShell Agent, and they are not part of Agent + ///------------------------------------- + private List pipeLine = new List(); + + public void AddPipelineScript(string cmd) + { + if (string.IsNullOrEmpty(cmd)) + { + return; + } + + pipeLine.Add(cmd); + } + + public void CleanPipeline() + { + pipeLine.Clear(); + } + + /// + /// Attach some script to the current PowerShell instance + /// Attach Rule : + /// 1. If the script is start with "$", we directly add it to the pipeline + /// 2. If the current script is storage cmdlet, we need to add the current storage context to it. + /// 3. Otherwise, split the script into [CommandName] and many [-Parameter][Value] pairs, attach them using PowerShell command interface(AddParameter/AddCommand/etc) + /// //TODO update the step 3 + /// + /// PowerShell instance + private void AttachPipeline(PowerShell ps) + { + foreach (string cmd in pipeLine) + { + if (cmd.Length > 0 && cmd[0] == '$') + { + ps.AddScript(cmd); + } + else + { + string[] cmdOpts = cmd.Split(' '); + string cmdName = cmdOpts[0]; + ps.AddCommand(cmdName); + + string opts = string.Empty; + bool skip = false; + for (int i = 1; i < cmdOpts.Length; i++) + { + if (skip) + { + skip = false; + continue; + } + + if (cmdOpts[i].IndexOf("-") != 0) + { + ps.AddArgument(cmdOpts[i]); + } + else + { + if (i + 1 < cmdOpts.Length && cmdOpts[i + 1].IndexOf("-") != 0) + { + ps.BindParameter(cmdOpts[i].Substring(1), cmdOpts[i + 1]); + skip = true; + } + else + { + ps.BindParameter(cmdOpts[i].Substring(1)); + skip = false; + } + } + } + + //add storage context for azure storage cmdlet + //It make sure all the storage cmdlet in pipeline use the same storage context + if (cmdName.ToLower().IndexOf("-azurestorage") != -1) + { + AddCommonParameters(ps); + } + } + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Properties/AssemblyInfo.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..12aaec94e3f7 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Properties/AssemblyInfo.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft Azure Powershell")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Microsoft Azure Powershell")] +[assembly: AssemblyCopyright("Copyright © Microsoft")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("5cf5b49d-32ae-4bb5-98d6-905413606cd0")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("0.8.5")] +[assembly: AssemblyFileVersion("0.8.5")] \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/PsTag.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/PsTag.cs new file mode 100644 index 000000000000..2c50c1560d42 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/PsTag.cs @@ -0,0 +1,57 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +namespace Commands.Storage.ScenarioTest +{ + /// + /// powershell test tags + /// + public struct PsTag + { + public const string Container = "container"; + public const string GetContainer = "getcontainer"; + public const string NewContainer = "newcontainer"; + public const string RemoveContainer = "removecontainer"; + public const string SetContainerAcl = "setcontaineracl"; + + public const string Blob = "blob"; + public const string GetBlob = "getblob"; + public const string RemoveBlob = "removeblob"; + + public const string GetBlobContent = "getblobcontent"; + public const string SetBlobContent = "setblobcontent"; + + public const string StartCopyBlob = "startcopyblob"; + public const string GetBlobCopyState = "getblobcopystate"; + public const string StopCopyBlob = "stopcopyblob"; + + public const string Queue = "queue"; + public const string GetQueue = "getqueue"; + public const string NewQueue = "newqueue"; + public const string RemoveQueue = "removequeue"; + + public const string Table = "table"; + public const string GetTable = "gettable"; + public const string NewTable = "newtable"; + public const string RemoveTable = "removetable"; + + public const string StorageContext = "storagecontext"; + + /// + /// test tag for run the fast bvt cases for different environments + /// + public const string FastEnv = "fastenv"; + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/README b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/README new file mode 100644 index 000000000000..d6fe310a5c81 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/README @@ -0,0 +1,3 @@ +Run storage test steps. +1. Update the TestData.xml with your account data. +2. Run the storagetest.cmd in bin\debug or bin\release directory. \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Resources/TestData.xml b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Resources/TestData.xml new file mode 100644 index 000000000000..04d7bf0f1d1a --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Resources/TestData.xml @@ -0,0 +1,55 @@ + + + + true + true + true + storage__PowerShellBVT__ + true + true + true + true + + + + + + + + + + + + + + + + core.windows.net + + + + + + + + + + core.windows.net + + + + + + + windows.net + + + + + + + .\Data\download\ + .\Data\upload\ + .\Data\temp\ + AZURE_STORAGE_CONNECTION_STRING + \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/StorageObjectType.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/StorageObjectType.cs new file mode 100644 index 000000000000..9fc250237643 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/StorageObjectType.cs @@ -0,0 +1,24 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Commands.Storage.ScenarioTest +{ + public enum StorageObjectType + { + Container, + Blob, + Queue, + Table + }; +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Util/CloudBlobUtil.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Util/CloudBlobUtil.cs new file mode 100644 index 000000000000..995b6909d3e0 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Util/CloudBlobUtil.cs @@ -0,0 +1,539 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using Microsoft.WindowsAzure.Storage; +using MS.Test.Common.MsTestLib; +using StorageTestLib; +using StorageBlob = Microsoft.WindowsAzure.Storage.Blob; +using StorageType = Microsoft.WindowsAzure.Storage.Blob.BlobType; + +namespace Commands.Storage.ScenarioTest.Util +{ + public class CloudBlobUtil + { + private CloudStorageAccount account; + private StorageBlob.CloudBlobClient client; + private Random random; + private const int PageBlobUnitSize = 512; + private static List HttpsCopyHosts; + + public string ContainerName + { + get; + private set; + } + + public string BlobName + { + get; + private set; + } + + public StorageBlob.ICloudBlob Blob + { + get; + private set; + } + + public StorageBlob.CloudBlobContainer Container + { + get; + private set; + } + + private CloudBlobUtil() + { } + + /// + /// init cloud blob util + /// + /// storage account + public CloudBlobUtil(CloudStorageAccount account) + { + this.account = account; + client = account.CreateCloudBlobClient(); + random = new Random(); + } + + /// + /// Create a random container with a random blob + /// + public void SetupTestContainerAndBlob() + { + ContainerName = Utility.GenNameString("container"); + BlobName = Utility.GenNameString("blob"); + StorageBlob.CloudBlobContainer container = CreateContainer(ContainerName); + Blob = CreateRandomBlob(container, BlobName); + Container = container; + } + + /// + /// clean test container and blob + /// + public void CleanupTestContainerAndBlob() + { + if (String.IsNullOrEmpty(ContainerName)) + { + return; + } + + RemoveContainer(ContainerName); + ContainerName = string.Empty; + BlobName = string.Empty; + Blob = null; + Container = null; + } + + /// + /// create a container with random properties and metadata + /// + /// container name + /// the created container object with properties and metadata + public StorageBlob.CloudBlobContainer CreateContainer(string containerName = "") + { + if (String.IsNullOrEmpty(containerName)) + { + containerName = Utility.GenNameString("container"); + } + + StorageBlob.CloudBlobContainer container = client.GetContainerReference(containerName); + container.CreateIfNotExists(); + + //there is no properties to set + container.FetchAttributes(); + + int minMetaCount = 1; + int maxMetaCount = 5; + int minMetaValueLength = 10; + int maxMetaValueLength = 20; + int count = random.Next(minMetaCount, maxMetaCount); + for (int i = 0; i < count; i++) + { + string metaKey = Utility.GenNameString("metatest"); + int valueLength = random.Next(minMetaValueLength, maxMetaValueLength); + string metaValue = Utility.GenNameString("metavalue-", valueLength); + container.Metadata.Add(metaKey, metaValue); + } + + container.SetMetadata(); + + Test.Info(string.Format("create container '{0}'", containerName)); + return container; + } + + public StorageBlob.CloudBlobContainer CreateContainer(string containerName, StorageBlob.BlobContainerPublicAccessType permission) + { + StorageBlob.CloudBlobContainer container = CreateContainer(containerName); + StorageBlob.BlobContainerPermissions containerPermission = new StorageBlob.BlobContainerPermissions(); + containerPermission.PublicAccess = permission; + container.SetPermissions(containerPermission); + return container; + } + + /// + /// create mutiple containers + /// + /// container names list + /// a list of container object + public List CreateContainer(List containerNames) + { + List containers = new List(); + + foreach (string name in containerNames) + { + containers.Add(CreateContainer(name)); + } + + containers = containers.OrderBy(container => container.Name).ToList(); + + return containers; + } + + /// + /// remove specified container + /// + /// Cloud blob container object + public void RemoveContainer(StorageBlob.CloudBlobContainer Container) + { + RemoveContainer(Container.Name); + } + + /// + /// remove specified container + /// + /// container name + public void RemoveContainer(string containerName) + { + StorageBlob.CloudBlobContainer container = client.GetContainerReference(containerName); + container.DeleteIfExists(); + Test.Info(string.Format("remove container '{0}'", containerName)); + } + + /// + /// remove a list containers + /// + /// container names + public void RemoveContainer(List containerNames) + { + foreach (string name in containerNames) + { + try + { + RemoveContainer(name); + } + catch (Exception e) + { + Test.Warn(string.Format("Can't remove container {0}. Exception: {1}", name, e.Message)); + } + } + } + + /// + /// create a new page blob with random properties and metadata + /// + /// CloudBlobContainer object + /// blob name + /// ICloudBlob object + public StorageBlob.ICloudBlob CreatePageBlob(StorageBlob.CloudBlobContainer container, string blobName) + { + StorageBlob.CloudPageBlob pageBlob = container.GetPageBlobReference(blobName); + int size = random.Next(1, 10) * PageBlobUnitSize; + pageBlob.Create(size); + byte[] buffer = new byte[size]; + string md5sum = Convert.ToBase64String(Helper.GetMD5(buffer)); + pageBlob.Properties.ContentMD5 = md5sum; + GenerateBlobPropertiesAndMetaData(pageBlob); + Test.Info(string.Format("create page blob '{0}' in container '{1}'", blobName, container.Name)); + return pageBlob; + } + + /// + /// create a block blob with random properties and metadata + /// + /// CloudBlobContainer object + /// Block blob name + /// ICloudBlob object + public StorageBlob.ICloudBlob CreateBlockBlob(StorageBlob.CloudBlobContainer container, string blobName) + { + StorageBlob.CloudBlockBlob blockBlob = container.GetBlockBlobReference(blobName); + + int maxBlobSize = 1024 * 1024; + string md5sum = string.Empty; + int blobSize = random.Next(maxBlobSize); + byte[] buffer = new byte[blobSize]; + using (MemoryStream ms = new MemoryStream(buffer)) + { + random.NextBytes(buffer); + //ms.Read(buffer, 0, buffer.Length); + blockBlob.UploadFromStream(ms); + md5sum = Convert.ToBase64String(Helper.GetMD5(buffer)); + } + + blockBlob.Properties.ContentMD5 = md5sum; + GenerateBlobPropertiesAndMetaData(blockBlob); + Test.Info(string.Format("create block blob '{0}' in container '{1}'", blobName, container.Name)); + return blockBlob; + } + + /// + /// generate random blob properties and metadata + /// + /// ICloudBlob object + private void GenerateBlobPropertiesAndMetaData(StorageBlob.ICloudBlob blob) + { + blob.Properties.ContentEncoding = Utility.GenNameString("encoding"); + blob.Properties.ContentLanguage = Utility.GenNameString("lang"); + + int minMetaCount = 1; + int maxMetaCount = 5; + int minMetaValueLength = 10; + int maxMetaValueLength = 20; + int count = random.Next(minMetaCount, maxMetaCount); + + for (int i = 0; i < count; i++) + { + string metaKey = Utility.GenNameString("metatest"); + int valueLength = random.Next(minMetaValueLength, maxMetaValueLength); + string metaValue = Utility.GenNameString("metavalue-", valueLength); + blob.Metadata.Add(metaKey, metaValue); + } + + blob.SetProperties(); + blob.SetMetadata(); + blob.FetchAttributes(); + } + + /// + /// Create a blob with specified blob type + /// + /// CloudBlobContainer object + /// Blob name + /// Blob type + /// ICloudBlob object + public StorageBlob.ICloudBlob CreateBlob(StorageBlob.CloudBlobContainer container, string blobName, StorageBlob.BlobType type) + { + if (type == StorageBlob.BlobType.BlockBlob) + { + return CreateBlockBlob(container, blobName); + } + else + { + return CreatePageBlob(container, blobName); + } + } + + /// + /// create a list of blobs with random properties/metadata/blob type + /// + /// CloudBlobContainer object + /// a list of blob names + /// a list of cloud page blobs + public List CreateRandomBlob(StorageBlob.CloudBlobContainer container, List blobNames) + { + List blobs = new List(); + + foreach (string blobName in blobNames) + { + blobs.Add(CreateRandomBlob(container, blobName)); + } + + blobs = blobs.OrderBy(blob => blob.Name).ToList(); + + return blobs; + } + + public List CreateRandomBlob(StorageBlob.CloudBlobContainer container) + { + int count = random.Next(1, 5); + List blobNames = new List(); + for (int i = 0; i < count; i++) + { + blobNames.Add(Utility.GenNameString("blob")); + } + + return CreateRandomBlob(container, blobNames); + } + + /// + /// Create a list of blobs with random properties/metadata/blob type + /// + /// CloudBlobContainer object + /// Blob name + /// ICloudBlob object + public StorageBlob.ICloudBlob CreateRandomBlob(StorageBlob.CloudBlobContainer container, string blobName) + { + int switchKey = 0; + + switchKey = random.Next(0, 2); + + if (switchKey == 0) + { + return CreatePageBlob(container, blobName); + } + else + { + return CreateBlockBlob(container, blobName); + } + } + + + + /// + /// convert blob name into valid file name + /// + /// blob name + /// valid file name + public string ConvertBlobNameToFileName(string blobName, string dir, DateTimeOffset? snapshotTime = null) + { + string fileName = blobName; + + //replace dirctionary + Dictionary replaceRules = new Dictionary() + { + {"/", "\\"} + }; + + foreach (KeyValuePair rule in replaceRules) + { + fileName = fileName.Replace(rule.Key, rule.Value); + } + + if (snapshotTime != null) + { + int index = fileName.LastIndexOf('.'); + + string prefix = string.Empty; + string postfix = string.Empty; + string timeStamp = string.Format("{0:u}", snapshotTime.Value); + timeStamp = timeStamp.Replace(":", string.Empty).TrimEnd(new char[] { 'Z' }); + + if (index == -1) + { + prefix = fileName; + postfix = string.Empty; + } + else + { + prefix = fileName.Substring(0, index); + postfix = fileName.Substring(index); + } + + fileName = string.Format("{0} ({1}){2}", prefix, timeStamp, postfix); + } + + return Path.Combine(dir, fileName); + } + + public string ConvertFileNameToBlobName(string fileName) + { + return fileName.Replace('\\', '/'); + } + + /// + /// list all the existing containers + /// + /// a list of cloudblobcontainer object + public List GetExistingContainers() + { + StorageBlob.ContainerListingDetails details = StorageBlob.ContainerListingDetails.All; + return client.ListContainers(string.Empty, details).ToList(); + } + + /// + /// get the number of existing container + /// + /// + public int GetExistingContainerCount() + { + return GetExistingContainers().Count; + } + + /// + /// Create a snapshot for the specified ICloudBlob object + /// + /// ICloudBlob object + public StorageBlob.ICloudBlob SnapShot(StorageBlob.ICloudBlob blob) + { + StorageBlob.ICloudBlob snapshot = default(StorageBlob.ICloudBlob); + + switch (blob.BlobType) + { + case StorageBlob.BlobType.BlockBlob: + snapshot = ((StorageBlob.CloudBlockBlob)blob).CreateSnapshot(); + break; + case StorageBlob.BlobType.PageBlob: + snapshot = ((StorageBlob.CloudPageBlob)blob).CreateSnapshot(); + break; + default: + throw new ArgumentException(string.Format("Unsupport blob type {0} when create snapshot", blob.BlobType)); + } + + Test.Info(string.Format("Create snapshot for '{0}' at {1}", blob.Name, snapshot.SnapshotTime)); + + return snapshot; + } + + public static void PackContainerCompareData(StorageBlob.CloudBlobContainer container, Dictionary dic) + { + StorageBlob.BlobContainerPermissions permissions = container.GetPermissions(); + dic["PublicAccess"] = permissions.PublicAccess; + dic["Permission"] = permissions; + dic["LastModified"] = container.Properties.LastModified; + } + + public static void PackBlobCompareData(StorageBlob.ICloudBlob blob, Dictionary dic) + { + dic["Length"] = blob.Properties.Length; + dic["ContentType"] = blob.Properties.ContentType; + dic["LastModified"] = blob.Properties.LastModified; + dic["SnapshotTime"] = blob.SnapshotTime; + } + + public static string ConvertCopySourceUri(string uri) + { + if (HttpsCopyHosts == null) + { + HttpsCopyHosts = new List(); + string httpsHosts = Test.Data.Get("HttpsCopyHosts"); + string[] hosts = httpsHosts.Split(); + + foreach (string host in hosts) + { + if (!String.IsNullOrWhiteSpace(host)) + { + HttpsCopyHosts.Add(host); + } + } + } + + //Azure always use https to copy from these hosts such windows.net + bool useHttpsCopy = HttpsCopyHosts.Any(host => uri.IndexOf(host) != -1); + + if (useHttpsCopy) + { + return uri.Replace("http://", "https://"); + } + else + { + return uri; + } + } + + public static bool WaitForCopyOperationComplete(StorageBlob.ICloudBlob destBlob, int maxRetry = 100) + { + int retryCount = 0; + int sleepInterval = 1000; //ms + + if (destBlob == null) + { + return false; + } + + do + { + if (retryCount > 0) + { + Test.Info(String.Format("{0}th check current copy state and it's {1}. Wait for copy completion", retryCount, destBlob.CopyState.Status)); + } + + Thread.Sleep(sleepInterval); + destBlob.FetchAttributes(); + retryCount++; + } + while (destBlob.CopyState.Status == StorageBlob.CopyStatus.Pending && retryCount < maxRetry); + + Test.Info(String.Format("Final Copy status is {0}", destBlob.CopyState.Status)); + return destBlob.CopyState.Status != StorageBlob.CopyStatus.Pending; + } + + public static StorageBlob.ICloudBlob GetBlob(StorageBlob.CloudBlobContainer container, string blobName, StorageType blobType) + { + StorageBlob.ICloudBlob blob = null; + if (blobType == StorageType.BlockBlob) + { + blob = container.GetBlockBlobReference(blobName); + } + else + { + blob = container.GetPageBlobReference(blobName); + } + return blob; + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Util/CloudQueueUtil.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Util/CloudQueueUtil.cs new file mode 100644 index 000000000000..92632153c8e2 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Util/CloudQueueUtil.cs @@ -0,0 +1,114 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Queue; + +namespace Commands.Storage.ScenarioTest.Util +{ + public class CloudQueueUtil + { + private CloudStorageAccount account; + private CloudQueueClient client; + private Random random; + + private CloudQueueUtil() + { } + + /// + /// init cloud queue util + /// + /// storage account + public CloudQueueUtil(CloudStorageAccount account) + { + this.account = account; + client = account.CreateCloudQueueClient(); + random = new Random(); + } + + /// + /// create a container with random properties and metadata + /// + /// container name + /// the created container object with properties and metadata + public CloudQueue CreateQueue(string queueName) + { + CloudQueue queue = client.GetQueueReference(queueName); + queue.CreateIfNotExists(); + + int count = random.Next(1, 5); + for (int i = 0; i < count; i++) + { + string metaKey = Utility.GenNameString("metatest"); + int valueLength = random.Next(10, 20); + string metaValue = Utility.GenNameString("metavalue-", valueLength); + queue.Metadata.Add(metaKey, metaValue); + } + + queue.SetMetadata(); + + return queue; + } + + /// + /// create mutiple containers + /// + /// container names list + /// a list of container object + public List CreateQueue(List queueNames) + { + List queues = new List(); + + foreach (string name in queueNames) + { + queues.Add(CreateQueue(name)); + } + + queues = queues.OrderBy(queue => queue.Name).ToList(); + + return queues; + } + + /// + /// remove specified container + /// + /// container name + public void RemoveQueue(string queueName) + { + CloudQueue queue = client.GetQueueReference(queueName); + queue.DeleteIfExists(); + } + + /// + /// remove a list containers + /// + /// container names + public void RemoveQueue(List queueNames) + { + foreach (string name in queueNames) + { + RemoveQueue(name); + } + } + + public int GetExistingQueueCount() + { + List queues = client.ListQueues().ToList(); + return queues.Count; + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Util/CloudTableUtil.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Util/CloudTableUtil.cs new file mode 100644 index 000000000000..0f825aed9879 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Util/CloudTableUtil.cs @@ -0,0 +1,108 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Table; + +namespace Commands.Storage.ScenarioTest.Util +{ + public class CloudTableUtil + { + private CloudStorageAccount account; + private CloudTableClient client; + private Random random; + + private CloudTableUtil() + { } + + /// + /// init cloud queue util + /// + /// storage account + public CloudTableUtil(CloudStorageAccount account) + { + this.account = account; + client = account.CreateCloudTableClient(); + random = new Random(); + } + + /// + /// create a container with random properties and metadata + /// + /// container name + /// the created container object with properties and metadata + public CloudTable CreateTable(string tableName = "") + { + if (String.IsNullOrEmpty(tableName)) + { + tableName = Utility.GenNameString("table"); + } + + CloudTable table = client.GetTableReference(tableName); + table.CreateIfNotExists(); + + return table; + } + + /// + /// create mutiple containers + /// + /// container names list + /// a list of container object + public List CreateTable(List tableName) + { + List tables = new List(); + + foreach (string name in tableName) + { + tables.Add(CreateTable(name)); + } + + tables = tables.OrderBy(table => table.Name).ToList(); + + return tables; + } + + /// + /// remove specified container + /// + /// container name + public void RemoveTable(string tableName) + { + CloudTable table = client.GetTableReference(tableName); + table.DeleteIfExists(); + } + + /// + /// remove a list containers + /// + /// container names + public void RemoveTable(List tableNames) + { + foreach (string name in tableNames) + { + RemoveTable(name); + } + } + + public int GetExistingTableCount() + { + List tables = client.ListTables().ToList(); + return tables.Count; + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Util/FileUtil.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Util/FileUtil.cs new file mode 100644 index 000000000000..0a38d25f7b8e --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Util/FileUtil.cs @@ -0,0 +1,155 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using MS.Test.Common.MsTestLib; +using StorageTestLib; + +namespace Commands.Storage.ScenarioTest.Util +{ + class FileUtil + { + private static string[] specialNames = { "pageabc", "blockabc ", "pagea b", "block abc", "page中文", + "block中 文", "page 中文", "block中文 ", "page.abc", "block.a bc", "page .abc", "block .abc ", string.Empty }; + private static Random random = new Random(); + + public static string GetSpecialFileName() + { + int nameCount = specialNames.Count() - 1; + int specialIndex = random.Next(0, nameCount); + string prefix = specialNames[specialIndex]; + return Utility.GenNameString(prefix); + } + + /// + /// generate temp files using StorageTestLib helper + /// + /// the root dir path + /// the relative dir path + /// sub dir depth + /// a list of created files + private static void GenerateTempFiles(string rootPath, string relativePath, int depth, List files) + { + //minEntityCount should not be 0 after using parallel uploading and downloading. refer to bug#685185 + int minEntityCount = 1; + int maxEntityCount = 5; + int maxFileSize = 10; //KB + + int fileCount = random.Next(minEntityCount, maxEntityCount); + + + for (int i = 0; i < fileCount; i++) + { + int fileSize = random.Next(1, maxFileSize); + string fileName = Path.Combine(relativePath, GetSpecialFileName()); + string filePath = Path.Combine(rootPath, fileName); + files.Add(fileName); + Helper.GenerateRandomTestFile(filePath, fileSize); + Test.Info("Create a {0}kb test file '{1}'", fileSize, filePath); + } + + int dirCount = random.Next(minEntityCount, maxEntityCount); + for (int i = 0; i < dirCount; i++) + { + string prefix = GetSpecialFileName(); + string dirName = Path.Combine(relativePath, Utility.GenNameString(string.Format("dir{0}", prefix))); + //TODO dir name should contain space + dirName = dirName.Replace(" ", ""); + string absolutePath = Path.Combine(rootPath, dirName); + Directory.CreateDirectory(absolutePath); + Test.Info("Create directory '{0}'", absolutePath); + + if (depth >= 1) + { + GenerateTempFiles(rootPath, dirName, depth - 1, files); + } + } + } + + /// + /// Create directory if not exists + /// + /// + public static void CreateDirIfNotExits(string dirPath) + { + Directory.CreateDirectory(dirPath); + } + + /// + /// create temp dirs and files + /// + /// the destination dir + /// sub dir depth + /// a list of created files + public static List GenerateTempFiles(string rootPath, int depth) + { + List files = new List(); + files.Clear(); + GenerateTempFiles(rootPath, string.Empty, depth, files); + files.Sort(); + return files; + } + + /// + /// clean the specified dir + /// + /// the destination dir + public static void CleanDirectory(string directory) + { + DirectoryInfo dir = new DirectoryInfo(directory); + + foreach (FileInfo file in dir.GetFiles()) + { + file.Delete(); + } + + foreach (DirectoryInfo subdir in dir.GetDirectories()) + { + CleanDirectory(subdir.FullName); + subdir.Delete(); + } + + Test.Info("Clean directory {0}", directory); + } + + /// + /// Remove the specified file + /// + /// File Path + public static void RemoveFile(string filePath) + { + FileInfo file = new FileInfo(filePath); + file.Delete(); + } + + /// + /// Generate a temp local file for testing + /// + /// The temp local file path + public static string GenerateOneTempTestFile() + { + string fileName = GetSpecialFileName(); + string uploadDirRoot = Test.Data.Get("UploadDir"); + string filePath = Path.Combine(uploadDirRoot, fileName); + int minFileSize = 1; //KB + int maxFileSize = 10 * 1024; //KB + int fileSize = random.Next(minFileSize, maxFileSize); + Helper.GenerateRandomTestFile(filePath, fileSize); + return filePath; + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Util/PowerShellExtension.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Util/PowerShellExtension.cs new file mode 100644 index 000000000000..197b93740fed --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Util/PowerShellExtension.cs @@ -0,0 +1,73 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; + +namespace Commands.Storage.ScenarioTest.Util +{ + public static class PowerShellExtension + { + /// + /// Add string parameter if the value is not null or empty + /// + /// PowerShell instance + /// Parameter name + /// Parameter value + public static void BindParameter(this PowerShell ps, string parameter, string value) + { + if (!string.IsNullOrEmpty(value)) + { + ps.AddParameter(parameter, value); + } + } + + /// + /// Add bool parameter if the vlaue is true, since the default value for bool in powershell is false + /// + /// PowerShell instance + /// Parameter name + /// Parameter value + public static void BindParameter(this PowerShell ps, string parameter, bool value) + { + if (value) + { + ps.AddParameter(parameter); + } + } + + /// + /// Add object parameter if the vlaue is not null + /// + /// PowerShell instance + /// Parameter name + /// Parameter value + public static void BindParameter(this PowerShell ps, string parameter, object value) + { + if (value != null) + { + ps.AddParameter(parameter, value); + } + } + + /// + /// Add switch parameter + /// + /// PowerShell instance + /// Parameter name + public static void BindParameter(this PowerShell ps, string parameter) + { + ps.AddParameter(parameter); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Utility.cs b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Utility.cs new file mode 100644 index 000000000000..0615d64005fc --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/Utility.cs @@ -0,0 +1,307 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Auth; +using Microsoft.WindowsAzure.Storage.Blob; +using Microsoft.WindowsAzure.Storage.Queue; +using Microsoft.WindowsAzure.Storage.Table; +using MS.Test.Common.MsTestLib; + +namespace Commands.Storage.ScenarioTest +{ + class Utility + { + /// + /// Generate a random string for azure object name + /// @prefix: usually it's a string of letters, to avoid naming rule breaking + /// @len: the length of random string after the prefix + /// + public static string GenNameString(string prefix, int len = 8) + { + return prefix + Guid.NewGuid().ToString().Replace("-", "").Substring(0, len); + } + + /// + /// Generate random base 64 string + /// + /// + /// + public static string GenBase64String(string seed = "") + { + string randomKey = Utility.GenNameString(seed); + return Convert.ToBase64String(ASCIIEncoding.ASCII.GetBytes(randomKey)); + } + + /// + /// Get Storage End Points + /// + /// storage account name + /// use https + /// A string array. 0 is blob endpoint, 1 is queue endpoint, 2 is table endpoint, 3 is file endpoint + public static string[] GetStorageEndPoints(string storageAccountName, bool useHttps, string endPoint = "") + { + string protocol = "http"; + + if (useHttps) + { + protocol = "https"; + } + + if (string.IsNullOrEmpty(endPoint)) + { + string configEndPoint = Test.Data.Get("StorageEndPoint"); + if (string.IsNullOrEmpty(configEndPoint)) + { + endPoint = "core.windows.net"; + } + else + { + endPoint = configEndPoint; + } + } + + endPoint = endPoint.Trim(); + + string[] storageEndPoints = new string[4] + { + string.Format("{0}://{1}.blob.{2}/", protocol, storageAccountName, endPoint), + string.Format("{0}://{1}.queue.{2}/", protocol, storageAccountName, endPoint), + string.Format("{0}://{1}.table.{2}/", protocol, storageAccountName, endPoint), + string.Format("{0}://{1}.file.{2}/", protocol, storageAccountName, endPoint) + }; + return storageEndPoints; + } + + /// + /// Get CloudStorageAccount with specified end point + /// + /// StorageCredentials object + /// use https + /// end point + /// CloudStorageAccount object + public static CloudStorageAccount GetStorageAccountWithEndPoint(StorageCredentials credential, bool useHttps, string endPoint = "") + { + string[] endPoints = GetStorageEndPoints(credential.AccountName, useHttps, endPoint); + return new CloudStorageAccount(credential, new Uri(endPoints[0]), new Uri(endPoints[1]), new Uri(endPoints[2]), new Uri(endPoints[3])); + } + + + public static List GenNameLists(string prefix, int count = 1, int len = 8) + { + List names = new List(); + + for (int i = 0; i < count; i++) + { + names.Add(Utility.GenNameString(prefix, len)); + } + + return names; + } + + /// + /// Generate random string with 26 alphabet in upper case. + /// + /// String length + /// Random alphabet string + public static string GenRandomAlphabetString(int size = 8) + { + StringBuilder builder = new StringBuilder(); + Random random = new Random((int)DateTime.Now.Ticks & 0x0000FFFF); + char ch; + + for (int i = 0; i < size; i++) + { + ch = Convert.ToChar(random.Next(0, 26) + 65); + builder.Append(ch); + } + + return builder.ToString(); + } + + public static string GenConnectionString(string StorageAccountName, string StorageAccountKey) + { + return String.Format("DefaultEndpointsProtocol=https;AccountName={0};AccountKey={1}", StorageAccountName, StorageAccountKey); + } + + /// + /// Generate the data for output comparision + /// + public static Dictionary GenComparisonData(StorageObjectType objType, string name) + { + Dictionary dic = new Dictionary { + {"Name", name }, + {"Context", null} + }; + + switch (objType) + { + case StorageObjectType.Container: + dic.Add("PublicAccess", BlobContainerPublicAccessType.Off); // default value is Off + dic.Add("LastModified", null); + dic.Add("Permission", null); + break; + case StorageObjectType.Blob: + dic.Add("BlobType", null); // need to validate this later + dic.Add("Length", null); // need to validate this later + dic.Add("ContentType", null); // the return value of upload operation is always null + dic.Add("LastModified", null); // need to validate this later + dic.Add("SnapshotTime", null); // need to validate this later + break; + case StorageObjectType.Queue: + dic.Add("ApproximateMessageCount", 0); + dic.Add("EncodeMessage", true); + break; + case StorageObjectType.Table: + break; + default: + throw new Exception(String.Format("Object type:{0} not identified!", objType)); + } + + return dic; + } + + /// + /// Generate the data for output comparision + /// + public static string GenComparisonData(string FunctionName, bool Success) + { + return String.Format("{0} operation should {1}.", FunctionName, Success ? "succeed" : "fail"); + } + + /// + /// Compare two entities, usually one from XSCL, one from PowerShell + /// + public static bool CompareEntity(T v1, T v2) + { + bool bResult = true; + + if (v1 == null || v2 == null) + { + if (v1 == null && v2 == null) + { + Test.Info("Skip compare null objects"); + return true; + } + else + { + Test.AssertFail(string.Format("v1 is {0}, but v2 is {1}", v1, v2)); + return false; + } + } + + foreach (var propertyInfo in typeof(T).GetProperties()) + { + if (propertyInfo.Name.Equals("ServiceClient")) + continue; + + object o1 = null; + object o2 = null; + + try + { + o1 = propertyInfo.GetValue(v1, null); + o2 = propertyInfo.GetValue(v2, null); + } + catch + { + //skip the comparison when throw exception + string msg = string.Format("Skip compare '{0}' property in type {1}", propertyInfo.Name, typeof(T)); + Trace.WriteLine(msg); + Test.Warn(msg); + continue; + } + + if (propertyInfo.Name.Equals("Metadata")) + { + if (v1.GetType() == typeof(CloudBlobContainer) + || v1.GetType() == typeof(CloudBlockBlob) + || v1.GetType() == typeof(CloudPageBlob) + || v1.GetType() == typeof(CloudQueue) + || v1.GetType() == typeof(CloudTable)) + { + bResult = ((IDictionary)o1).SequenceEqual((IDictionary)o2); + } + else + { + bResult = o1.Equals(o2); + } + } + else if (propertyInfo.Name.Equals("Properties")) + { + if (v1.GetType() == typeof(CloudBlockBlob) + || v1.GetType() == typeof(CloudPageBlob)) + { + bResult = CompareEntity((BlobProperties)o1, (BlobProperties)o2); + } + else if (v1.GetType() == typeof(CloudBlobContainer)) + { + bResult = CompareEntity((BlobContainerProperties)o1, (BlobContainerProperties)o2); + } + } + else if (propertyInfo.Name.Equals("SharedAccessPolicies")) + { + if (v1.GetType() == typeof(BlobContainerPermissions)) + { + bResult = CompareEntity((SharedAccessBlobPolicies)o1, (SharedAccessBlobPolicies)o2); + } + else + { + bResult = o1.Equals(o2); + } + } + else + { + if (o1 == null) + { + if (o2 != null) + bResult = false; + } + else + { + //compare according to type + if (o1 is ICollection) + { + bResult = ((ICollection)o1).SequenceEqual((ICollection)o2); + } + else if (o1 is ICollection) + { + bResult = CompareEntity((ICollection)o1, (ICollection)o2); + } + else + { + bResult = o1.Equals(o2); + } + } + } + + if (bResult == false) + { + Test.Error("Property Mismatch: {0} in type {1}. {2} != {3}", propertyInfo.Name, typeof(T), o1, o2); + break; + } + else + { + Test.Verbose("Property {0} in type {1}: {2} == {3}", propertyInfo.Name, typeof(T), o1, o2); + } + } + return bResult; + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/deploy.cmd b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/deploy.cmd new file mode 100644 index 000000000000..c87315551db8 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/deploy.cmd @@ -0,0 +1,36 @@ +@echo off +setlocal + +if "%~1" == "" ( + echo Usage: deploy [Destination Directory] + echo Example: copies test files into test run folder : + echo deploy "C:\test" + exit /b 1 +) + +set dest=%~1 +if %dest:~-1%==\ set dest=%dest:~0,-1% + + rem %~d0 expands the drive letter + rem %~p0 expands the path to this file +set localdir=%~d0%~p0 + +set commonPath=..\..\..\common +set binPath=..\..\..\..\bin +set symbolPath=..\..\..\Symbols.pri + +mkdir "%dest%" + +rem deploy the test cases +xcopy /y /e /c "%localdir%*" "%dest%"\ +mkdir "%dest%"\Data\Upload +mkdir "%dest%"\Data\Download + +rem deploy pdb files +xcopy /y /e /c "%localdir%"%symbolPath%\tests\dll\StorageTestLib.pdb "%dest%"\ +xcopy /y /e /c "%localdir%"%symbolPath%\tests\dll\PowerShellTest.pdb "%dest%"\ +xcopy /y /e /c "%localdir%"%symbolPath%\tests\dll\MsTest.pdb "%dest%"\ +xcopy /y /e /c "%localdir%"%symbolPath%\tests\dll\MsTestLib.pdb "%dest%"\ +xcopy /y /e /c "%localdir%"%symbolPath%\tests\exe\MsTest2.pdb "%dest%"\ + +endlocal diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/packages.config b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/packages.config new file mode 100644 index 000000000000..9909d4d14279 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/packages.config @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/storagetest.cmd b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/storagetest.cmd new file mode 100644 index 000000000000..e398e70d4353 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.ScenarioTest/storagetest.cmd @@ -0,0 +1,2 @@ +MsTest2.exe -lib CLITest.dll -tag bvt +MsTest2.exe -lib CLITest.dll -tag function \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage.StorageTestLib/Commands.Storage.StorageTestLib.csproj b/src/ServiceManagement/Storage/Commands.Storage.StorageTestLib/Commands.Storage.StorageTestLib.csproj new file mode 100644 index 000000000000..b8c390b599a2 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.StorageTestLib/Commands.Storage.StorageTestLib.csproj @@ -0,0 +1,101 @@ + + + + + Debug + AnyCPU + {0A513849-2690-4D07-8DE7-0ACE39645D12} + Library + Properties + StorageTestLib + StorageTestLib + v4.5 + 512 + + ..\..\..\ + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + bin\Release\ + TRACE;SIGN + true + pdbonly + AnyCPU + prompt + false + + + true + MSSharedLibKey.snk + true + true + false + + + + ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll + + + ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll + + + ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll + + + False + ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll + + + False + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + + + + + + ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll + + + + + + + + + + + + + + + {ce97967b-7479-43b9-9561-776232ac5d47} + Commands.Storage.MsTestLib + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage.StorageTestLib/Helpers.cs b/src/ServiceManagement/Storage/Commands.Storage.StorageTestLib/Helpers.cs new file mode 100644 index 000000000000..409b70308cba --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.StorageTestLib/Helpers.cs @@ -0,0 +1,1644 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.IO.Compression; +using System.Linq; +using System.Runtime.InteropServices; +using System.Security.Cryptography; +using System.Text; +using System.Threading; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Blob; +using Microsoft.WindowsAzure.Storage.Blob.Protocol; +using Microsoft.WindowsAzure.Storage.RetryPolicies; +using MS.Test.Common.MsTestLib; + +namespace StorageTestLib +{ + /// + /// this is a static helper class + /// + public static class Helper + { + + public static void CreateContainer() + { + CloudStorageAccount account = CloudStorageAccount.Parse(Test.Data.Get("StorageConnectionString")); + + CloudBlobHelper blobHelper = new CloudBlobHelper(account); + + string containerName = Test.Data.Get("containerName"); + + if (blobHelper.CreateContainer(containerName)) + { + Console.WriteLine("Cloud Blob {0} is successfully created.", containerName); + } + else + { + Console.WriteLine("Cloud Blob {0} already exists.", containerName); + } + + return; + + } + + + + public static void DeleteContainer() + { + CloudStorageAccount account = CloudStorageAccount.Parse(Test.Data.Get("StorageConnectionString")); + + CloudBlobHelper blobHelper = new CloudBlobHelper(account); + + string containerName = Test.Data.Get("containerName"); + + if (blobHelper.DeleteContainer(containerName)) + { + Console.WriteLine("Cloud Blob {0} is successfully deleted.", containerName); + } + else + { + Console.WriteLine("Cloud Blob {0} not found.", containerName); + } + + return; + } + + + public static void GenerateSmallFile(string filename, int sizeKB) + { + byte[] data = new byte[sizeKB * 1024]; + Random r = new Random(123456); + r.NextBytes(data); + File.WriteAllBytes(filename, data); + return; + } + + + public static void GenerateTinyFile(string filename, int sizeB) + { + byte[] data = new byte[sizeB]; + Random r = new Random(123456); + r.NextBytes(data); + File.WriteAllBytes(filename, data); + return; + } + + + public static void AggregateFile(string filename, int times) + { + using (FileStream outputStream = new FileStream(filename, FileMode.Create)) + { + using (FileStream inputStream = new FileStream("abc.txt", FileMode.Open)) + { + for (int i = 0; i < times; i++) + { + inputStream.CopyTo(outputStream); + inputStream.Seek(0, SeekOrigin.Begin); + } + } + + } + + } + + + + public static void CompressFile(string filename, int times) + { + using (FileStream outputStream = new FileStream(filename, FileMode.Create)) + { + using (GZipStream compress = new GZipStream(outputStream, CompressionMode.Compress)) + { + + using (FileStream inputStream = new FileStream("abc.txt", FileMode.Open)) + { + for (int i = 0; i < times; i++) + { + inputStream.CopyTo(compress); + inputStream.Seek(0, SeekOrigin.Begin); + } + } + } + + } + + } + + + //it takes around 74 seconds to generate a 5G file + public static void GenerateMediumFile(string filename, int sizeMB) + { + byte[] data = new byte[1024 * 1024]; + Random r = new Random(123456); + using (FileStream stream = new FileStream(filename, FileMode.Create)) + { + for (int i = 0; i < sizeMB; i++) + { + r.NextBytes(data); + stream.Write(data, 0, data.Length); + } + } + return; + + } + + + // the buffer is too large, better to use GenerateMediumFile + public static void GenerateBigFile(string filename, int sizeGB) + { + byte[] data = new byte[1024 * 1024 * 1024]; + Random r = new Random(123456); + using (FileStream stream = new FileStream(filename, FileMode.Create)) + { + for (int i = 0; i < sizeGB; i++) + { + r.NextBytes(data); + stream.Write(data, 0, data.Length); + } + } + return; + + } + + //this is only for small data + public static byte[] GetMD5(byte[] data) + { + MD5 md5 = MD5.Create(); + return md5.ComputeHash(data); + } + + + public static void GenerateRandomTestFile(string filename, int sizeKB) + { + byte[] data = new byte[sizeKB * 1024]; + Random r = new Random(); + r.NextBytes(data); + File.WriteAllBytes(filename, data); + } + + public static void DeleteFile(string filename) + { + if (File.Exists(filename)) + { + File.Delete(filename); + } + + } + + public static void DeleteFolder(string foldername) + { + if (Directory.Exists(foldername)) + { + Directory.Delete(foldername, true); + } + } + + public static void DeletePattern(string pathPattern) + { + DirectoryInfo folder = new DirectoryInfo("."); + foreach (FileInfo fi in folder.GetFiles(pathPattern, SearchOption.TopDirectoryOnly)) + { + fi.Delete(); + } + foreach (DirectoryInfo di in folder.GetDirectories(pathPattern, SearchOption.TopDirectoryOnly)) + { + di.Delete(true); + } + } + + + public static void CreateNewFolder(string foldername) + { + if (Directory.Exists(foldername)) + { + Directory.Delete(foldername, true); + } + Directory.CreateDirectory(foldername); + } + + // for a 5G file, this can be done in 20 seconds + public static string GetFileMD5Hash(string filename) + { + + using (FileStream fs = File.Open(filename, FileMode.Open)) + { + MD5 md5 = MD5.Create(); + byte[] md5Hash = md5.ComputeHash(fs); + + + StringBuilder sb = new StringBuilder(); + foreach (byte b in md5Hash) + { + sb.Append(b.ToString("x2").ToLower()); + } + + return sb.ToString(); + + } + + } + + + public static string GetFileContentMD5(string filename) + { + using (FileStream fs = File.Open(filename, FileMode.Open)) + { + MD5 md5 = MD5.Create(); + byte[] md5Hash = md5.ComputeHash(fs); + + + return Convert.ToBase64String(md5Hash); + + } + + } + + + public static void GenerateFixedTestTree(string filename, string foldername, string currentFolder, int size, int layer) + { + for (int i = 0; i < size; i++) + { + GenerateRandomTestFile(currentFolder + "\\" + filename + "_" + i, i); + } + + if (layer > 0) + { + for (int i = 0; i < size; i++) + { + Directory.CreateDirectory(currentFolder + "\\" + foldername + "_" + i); + GenerateFixedTestTree(filename, foldername, currentFolder + "\\" + foldername + "_" + i, size, layer - 1); + } + + } + + } + + public static bool CompareTwoFiles(string filename, string filename2) + { + FileInfo fi = new FileInfo(filename); + FileInfo fi2= new FileInfo(filename2); + return CompareTwoFiles(fi, fi2); + } + + public static bool CompareTwoFiles(FileInfo fi, FileInfo fi2) + { + if (!fi.Exists || !fi2.Exists) + { + return false; + } + if (fi.Length != fi.Length) + { + return false; + } + + long fileLength = fi.Length; + // 200M a chunk + const int ChunkSizeByte = 200 * 1024 * 1024; + using (FileStream fs = new FileStream(fi.FullName, FileMode.Open, FileAccess.Read)) + { + using (FileStream fs2 = new FileStream(fi2.FullName, FileMode.Open, FileAccess.Read)) + { + + BinaryReader reader = new BinaryReader(fs); + BinaryReader reader2 = new BinaryReader(fs2); + + long comparedLength = 0; + do + { + + byte[] bytes = reader.ReadBytes(ChunkSizeByte); + byte[] bytes2 = reader2.ReadBytes(ChunkSizeByte); + + MD5 md5 = MD5.Create(); + byte[] md5Hash = md5.ComputeHash(bytes); + byte[] md5Hash2 = md5.ComputeHash(bytes2); + + if (!md5Hash.SequenceEqual(md5Hash2)) + { + return false; + } + + comparedLength += bytes.Length; + + } + while (comparedLength < fileLength); + + } + } + + return true; + } + + + public static bool CompareTwoFolders(string foldername, string foldername2) + { + DirectoryInfo folder = new DirectoryInfo(foldername); + DirectoryInfo folder2 = new DirectoryInfo(foldername2); + + IEnumerable list = folder.GetFiles("*.*", SearchOption.AllDirectories); + IEnumerable list2 = folder2.GetFiles("*.*", SearchOption.AllDirectories); + + FileCompare fc = new FileCompare(); + + return list.SequenceEqual(list2, fc); + } + + public static bool CompareFolderWithBlob(string foldername, string containerName) + { + return true; + } + + public static bool CompareTwoBlobs(string containerName, string containerName2) + { + return false; //todo: implement + } + + public static void verifyFilesExistinBlobDirectory(int fileNumber, CloudBlobDirectory blobDirectory, string FileName, String blobType) + { + + for (int i = 0; i < fileNumber; i++) + { + if (blobType == BlobType.Block) + { + CloudBlockBlob blob = blobDirectory.GetBlockBlobReference(FileName + "_" + i); + if (null == blob || !blob.Exists()) + Test.Error("the file {0}_{1} in the blob virtual directory does not exist:", FileName, i); + } + else if (blobType == BlobType.Page) + { + CloudPageBlob blob = blobDirectory.GetPageBlobReference(FileName + "_" + i); + if (null == blob || !blob.Exists()) + Test.Error("the file {0}_{1} in the blob virtual directory does not exist:", FileName, i); + } + } + } + + public static void writePerfLog(string log) + { + if (!File.Exists(perfLogName)) + { + Test.Info("The perflog name is: {0}", perfLogName); + FileStream fs1 = File.Create(perfLogName); + fs1.Close(); + } + StreamWriter fs = File.AppendText(perfLogName); + fs.WriteLine(log); + fs.Close(); + } + + private static string perfLogName = @".\perf_" + DateTime.Now.ToString().Replace('\\', '-').Replace('/', '-').Replace(':', '-') + ".csv"; + + + + public static bool killProcess(string processName) + { + try + { + Process[] procs = Process.GetProcessesByName(processName); + if (procs.Length == 0) + { + Test.Info("No {0} process exist, so no process will be killed", processName); + return false; + } + foreach (Process p in procs) + { + Test.Info("Try to kill {0} process : {1}", processName, p.Id); + p.Kill(); + p.WaitForExit(); + } + return true; + } + catch (Exception e) + { + Test.Warn("Exception happen when kill {0}: {1}", processName, e.ToString()); + return false; + } + } + + public delegate bool StopProcess(Process p); + public static bool StopProcessByBreakNetwork(Process p) + { + String processName = Path.GetFileNameWithoutExtension(p.MainModule.FileName); + Test.Info("Stop {0} by BreakNetwork.", processName); + try + { + int i = 0; + Helper.StartProcess("ipconfig", "/release"); + System.Threading.Thread.Sleep(5000); + try //Send Ctrl+c so only need to for 1 round of 900s, or need to wait for filenumber/thread *900s + { + Test.Info("Send ctrl+C."); + Test.Assert(SetConsoleCtrlHandler(null, true), "SetConsoleCtrlHandler should success"); + System.Threading.Thread.Sleep(5000); + Test.Assert(GenerateConsoleCtrlEvent(ConsoleCtrlEvent.CTRL_C_EVENT, 0), "GenerateConsoleCtrlEvent should success"); + System.Threading.Thread.Sleep(2000); + Test.Assert(SetConsoleCtrlHandler(null, false), "SetConsoleCtrlHandler should success"); + } + catch (Exception e) + { + Test.Warn("can't send ctrl+c to {0}: {1}", processName, e.ToString()); + } + for (i = 0; i < 100; i++) + { + if (p.HasExited) + { + Helper.StartProcess("ipconfig", "/renew"); + System.Threading.Thread.Sleep(5000); //wait 5s for IP to restore + return true; + } + Test.Info("wait 10 s for {0} finish. Time: {1}", processName, i); + System.Threading.Thread.Sleep(10000);//As need 900s for process to exist, so wait up to 1000s. + } + Test.Warn("{0} doesn't stop successfully by Break Network. it's killed", processName); + p.Kill(); + Helper.StartProcess("ipconfig", "/renew"); + return false; + } + catch (Exception) + { + Helper.StartProcess("ipconfig", "/renew"); + System.Threading.Thread.Sleep(5000);//wait 5s for IP to restore + return false; + } + } + + public static bool StopProcessByCtrlC(Process p) + { + String processName = Path.GetFileNameWithoutExtension(p.MainModule.FileName); + Test.Info("Stop {0} by Ctrl+c.", processName); + int i = 0; + try + { + Test.Info("Send ctrl+C."); + Test.Assert(SetConsoleCtrlHandler(null, true), "SetConsoleCtrlHandler should success"); + System.Threading.Thread.Sleep(5000); + Test.Assert(GenerateConsoleCtrlEvent(ConsoleCtrlEvent.CTRL_C_EVENT, 0), "GenerateConsoleCtrlEvent should success"); + System.Threading.Thread.Sleep(2000); + Test.Assert(SetConsoleCtrlHandler(null, false), "SetConsoleCtrlHandler should success"); + } + catch (Exception e) + { + Test.Warn("{0} doesn't stop successfully by ctrl+c. it's killed: {1}", processName, e.ToString()); + System.Threading.Thread.Sleep(10000); + p.Kill(); + return false; + } + for (i = 0; i < 100; i++) + { + if (p.HasExited) return true; + Test.Info("wait 10 s for {0} finish. Time: {1}", processName, i); + System.Threading.Thread.Sleep(10000);//As need 900s for process to exist, so wait up to 1000s. + } + Test.Warn("{0} doesn't stop successfully by ctrl+c. it's killed", processName); + p.Kill(); + return false; + } + + public static bool StopProcessByKill(Process p) + { + String processName = Path.GetFileNameWithoutExtension(p.MainModule.FileName); + Test.Info("Stop {0} by kill.", processName); + p.Kill(); + return true; + } + + public static Process StartProcess(string cmd, string args) + { + Test.Info("Running: {0} {1}", cmd, args); + ProcessStartInfo psi = new ProcessStartInfo(cmd, args); + psi.CreateNoWindow = false; + psi.UseShellExecute = false; + Process p = Process.Start(psi); + return p; + } + + [DllImport("kernel32.dll", CallingConvention = CallingConvention.StdCall)] + static extern bool GenerateConsoleCtrlEvent(ConsoleCtrlEvent sigevent, int dwProcessGroupId); + + [DllImport("kernel32.dll", CharSet = CharSet.Auto)] + public static extern bool SetConsoleCtrlHandler(HandlerRoutine Handler, bool Add); + public delegate bool HandlerRoutine(ConsoleCtrlEvent CtrlType); + + // An enumerated type for the control messages + // sent to the handler routine. + public enum ConsoleCtrlEvent + { + CTRL_C_EVENT = 0, + CTRL_BREAK_EVENT, + CTRL_CLOSE_EVENT, + CTRL_LOGOFF_EVENT = 5, + CTRL_SHUTDOWN_EVENT + } + + public static Process StartProcess(string cmd, string args, out StreamReader stdout, out StreamReader stderr, out StreamWriter stdin) + { + Test.Logger.Verbose("Running: {0} {1}", cmd, args); + ProcessStartInfo psi = new ProcessStartInfo(cmd, args); + psi.CreateNoWindow = true; + psi.WindowStyle = ProcessWindowStyle.Hidden; + psi.UseShellExecute = false; + psi.RedirectStandardError = true; + psi.RedirectStandardOutput = true; + psi.RedirectStandardInput = true; + Process p = Process.Start(psi); + stdout = p.StandardOutput; + stderr = p.StandardError; + stdin = p.StandardInput; + return p; + } + } + + + public class FileCompare : IEqualityComparer + { + public FileCompare() { } + + public bool Equals(FileInfo f1, FileInfo f2) + { + if (f1.Name != f2.Name) + { + Test.Verbose("file name {0}:{1} not equal {2}:{3}", f1.FullName, f1.Name, f2.FullName, f2.Name); + return false; + } + + if (f1.Length != f2.Length) + { + Test.Verbose("file length {0}:{1} not equal {2}:{3}", f1.FullName, f1.Length, f2.FullName, f2.Length); + return false; + } + + if (f1.Length < 200 * 1024 * 1024) + { + string f1MD5Hash = f1.MD5Hash(); + string f2MD5Hash = f2.MD5Hash(); + if (f1MD5Hash != f2MD5Hash) + { + Test.Verbose("file MD5 mismatch {0}:{1} not equal {2}:{3}", f1.FullName, f1MD5Hash,f2.FullName, f2MD5Hash); + return false; + } + } + else + { + if (!Helper.CompareTwoFiles(f1, f2)) + { + Test.Verbose("file MD5 mismatch {0} not equal {1}", f1.FullName, f2.FullName); + return false; + } + } + return true; + } + + public int GetHashCode(FileInfo fi) + { + string s = String.Format("{0}{1}", fi.Name, fi.Length); + return s.GetHashCode(); + } + } + + public static class FileOp + { + public static string MD5Hash(this FileInfo fi) + { + return Helper.GetFileMD5Hash(fi.FullName); + } + + public static string NextString(Random Randomint) + { + int length = Randomint.Next(1, 100); + return NextString(Randomint, length); + } + + public static string NextString(Random Randomint, int length) + { + return new String( + Enumerable.Repeat(0, length) + .Select(p => (char)Randomint.Next(0x20, 0xD7FF)) + .ToArray()); + } + + + public static void SetFileAttribute(string Filename, FileAttributes attribute) + { + FileAttributes fa = File.GetAttributes(Filename); + if ((fa & attribute) == attribute) + { + Test.Info("Attribute {0} is already in file{1}. Don't need to add again.", attribute.ToString(), Filename); + return; + } + + switch (attribute) + { + case FileAttributes.Encrypted: + File.Encrypt(Filename); + break; + case FileAttributes.Normal: + RemoveFileAttribute(Filename, FileAttributes.Encrypted); + RemoveFileAttribute(Filename, FileAttributes.Compressed); + fa = fa & ~fa | FileAttributes.Normal; + File.SetAttributes(Filename, fa); + break; + case FileAttributes.Compressed: + compress(Filename); + break; + default: + fa = fa | attribute; + File.SetAttributes(Filename, fa); + break; + } + Test.Info("Attribute {0} is added to file{1}.", attribute.ToString(), Filename); + } + + public static void RemoveFileAttribute(string Filename, FileAttributes attribute) + { + FileAttributes fa = File.GetAttributes(Filename); + if ((fa & attribute) != attribute) + { + Test.Info("Attribute {0} is NOT in file{1}. Don't need to remove.", attribute.ToString(), Filename); + return; + } + + switch (attribute) + { + case FileAttributes.Encrypted: + File.Decrypt(Filename); + break; + case FileAttributes.Normal: + fa = fa | FileAttributes.Archive; + File.SetAttributes(Filename, fa); + break; + case FileAttributes.Compressed: + uncompress(Filename); + break; + default: + fa = fa & ~attribute; + File.SetAttributes(Filename, fa); + break; + } + Test.Info("Attribute {0} is removed from file{1}.", attribute.ToString(), Filename); + } + [DllImport("kernel32.dll")] + public static extern int DeviceIoControl(IntPtr hDevice, int + dwIoControlCode, ref short lpInBuffer, int nInBufferSize, IntPtr + lpOutBuffer, int nOutBufferSize, ref int lpBytesReturned, IntPtr + lpOverlapped); + + private static int FSCTL_SET_COMPRESSION = 0x9C040; + private static short COMPRESSION_FORMAT_DEFAULT = 1; + private static short COMPRESSION_FORMAT_NONE = 0; + + #pragma warning disable 612, 618 + public static void compress(string filename) + { + if ((File.GetAttributes(filename) & FileAttributes.Encrypted) == FileAttributes.Encrypted) + { + Test.Info("Decrypt File {0} to prepare for compress.", filename); + File.Decrypt(filename); + } + int lpBytesReturned = 0; + FileStream f = File.Open(filename, System.IO.FileMode.Open, + System.IO.FileAccess.ReadWrite, System.IO.FileShare.None); + int result = DeviceIoControl(f.Handle, FSCTL_SET_COMPRESSION, + ref COMPRESSION_FORMAT_DEFAULT, 2 /*sizeof(short)*/, IntPtr.Zero, 0, + ref lpBytesReturned, IntPtr.Zero); + f.Close(); + } + + public static void uncompress(string filename) + { + int lpBytesReturned = 0; + FileStream f = File.Open(filename, System.IO.FileMode.Open, + System.IO.FileAccess.ReadWrite, System.IO.FileShare.None); + int result = DeviceIoControl(f.Handle, FSCTL_SET_COMPRESSION, + ref COMPRESSION_FORMAT_NONE, 2 /*sizeof(short)*/, IntPtr.Zero, 0, + ref lpBytesReturned, IntPtr.Zero); + f.Close(); + } + #pragma warning restore 612, 618 + + } + + + /// + /// This class helps to do operations on cloud blobs + /// + public class CloudBlobHelper + { + private CloudStorageAccount account; + /// + /// The storage account + /// + public CloudStorageAccount Account + { + get { return account; } + private set { account = value; } + } + + private CloudBlobClient blobClient; + /// + /// The blob client + /// + public CloudBlobClient BlobClient + { + get { return blobClient; } + set { blobClient = value; } + } + + /// + /// Construct the helper with the storage account + /// + /// + public CloudBlobHelper(CloudStorageAccount account) + { + Account = account; + BlobClient = account.CreateCloudBlobClient(); + BlobClient.DefaultRequestOptions.RetryPolicy = new LinearRetry(TimeSpan.Zero, 3); + } + + + /// + /// Create a container for blobs + /// + /// the name of the container + /// Return true on success, false if already exists, throw exception on error + public bool CreateContainer(string containerName) + { + CloudBlobContainer container = BlobClient.GetContainerReference(containerName); + return container.CreateIfNotExists(); + } + + /// + /// Delete the container for the blobs + /// + /// the name of container + /// Return true on success (or the container was deleted before), false if the container doesnot exist, throw exception on error + public bool DeleteContainer(string containerName) + { + CloudBlobContainer container = BlobClient.GetContainerReference(containerName); + return container.DeleteIfExists(); + } + + /// + /// Set the specific container to the accesstype + /// + /// container Name + /// the accesstype the contain will be set + /// the container 's permission before set, so can be set back when test case finish + public BlobContainerPermissions SetContainerAccessType(string containerName, BlobContainerPublicAccessType accesstype) + { + try + { + CloudBlobContainer container = blobClient.GetContainerReference(containerName); + container.CreateIfNotExists(); + BlobContainerPermissions oldPerm = container.GetPermissions(); + BlobContainerPermissions blobPermissions = new BlobContainerPermissions(); + blobPermissions.PublicAccess = accesstype; + container.SetPermissions(blobPermissions); + return oldPerm; + } + catch (StorageException e) + { + if (null == e || + null == e.RequestInformation || + 404 == e.RequestInformation.HttpStatusCode || + null == e.RequestInformation.ExtendedErrorInformation || + BlobErrorCodeStrings.ContainerNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode) + { + return null; + } + throw; + } + } + + + /// + /// list blobs in a container, TODO: implement this for batch operations on blobs + /// + /// + /// + /// + public bool ListBlobs(string containerName, out List blobList) + { + blobList = new List(); + + try + { + CloudBlobContainer container = BlobClient.GetContainerReference(containerName); + IEnumerable blobs = container.ListBlobs(null, true, BlobListingDetails.All); + if (blobs != null) + { + foreach (ICloudBlob blob in blobs) + { + blobList.Add(blob); + } + } + return true; + } + catch (StorageException e) + { + if (null == e || + null == e.RequestInformation || + 404 == e.RequestInformation.HttpStatusCode || + null == e.RequestInformation.ExtendedErrorInformation || + BlobErrorCodeStrings.ContainerNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode) + { + return false; + } + throw; + } + } + + /// + /// Validate the uploaded tree which is created by Helper.GenerateFixedTestTree() + /// + /// the file prefix of the tree + /// the folder prefix of the tree + /// current folder to validate + /// how many files in each folder + /// how many folder level to verify + /// the container which contain the uploaded tree + /// true means should verify the folder not exist. false means verify the folder exist. + /// true if verify pass, false mean verify fail + public bool ValidateFixedTestTree(string filename, string foldername, string currentFolder, int size, int layer, string containerName, bool empty = false) + { + Test.Info("Verify the folder {0}...", currentFolder); + for (int i = 0; i < size; i++) + { + string sourcefilename = currentFolder + "\\" + filename + "_" + i; + string destblobname = currentFolder + "\\" + filename + "_" + i; + ICloudBlob blob = this.QueryBlob(containerName, destblobname); + if (!empty) + { + if (blob == null) + { + Test.Error("Blob {0} not exist.", destblobname); + return false; + } + string source_MD5 = Helper.GetFileContentMD5(sourcefilename); + string Dest_MD5 = blob.Properties.ContentMD5; + if (source_MD5 != Dest_MD5) + { + Test.Error("sourcefile:{0}: {1} == destblob:{2}:{3}", sourcefilename, source_MD5, destblobname, Dest_MD5); + return false; + } + } + else + { + if (blob != null && blob.Properties.Length !=0) + { + Test.Error("Blob {0} should not exist.", destblobname); + return false; + } + } + } + if (layer > 0) + { + for (int i = 0; i < size; i++) + { + if (! ValidateFixedTestTree(filename, foldername, currentFolder + "\\" + foldername + "_" + i, size, layer - 1, containerName, empty)) + return false; + } + + } + return true; + + } + + /// + /// Get SAS of a container with specific permission and period + /// + /// the name of the container + /// the permission of the SAS + /// How long the SAS will be valid before expire, in second + /// the SAS + public string GetSASofContainer(string containerName, SharedAccessBlobPermissions SAB, int validatePeriod, bool UseSavedPolicy = true, string PolicySignedIdentifier = "PolicyIdentifier") + { + try + { + CloudBlobContainer container = BlobClient.GetContainerReference(containerName); + string SAS = string.Empty; + SharedAccessBlobPolicy sap = new SharedAccessBlobPolicy(); + sap.Permissions = SAB; + sap.SharedAccessStartTime = DateTimeOffset.Now.AddMinutes(-5); + sap.SharedAccessExpiryTime = DateTimeOffset.Now.AddSeconds(validatePeriod); + if (UseSavedPolicy) + { + BlobContainerPermissions bp = container.GetPermissions(); + bp.SharedAccessPolicies.Clear(); + bp.SharedAccessPolicies.Add(PolicySignedIdentifier, sap); + container.SetPermissions(bp); + SAS = container.GetSharedAccessSignature(new SharedAccessBlobPolicy(), PolicySignedIdentifier); + } + else + { + SAS = container.GetSharedAccessSignature(sap); + } + Test.Info("The SAS is {0}", SAS); + return SAS; + } + catch (StorageException e) + { + if (null == e || + null == e.RequestInformation || + 404 == e.RequestInformation.HttpStatusCode || + null == e.RequestInformation.ExtendedErrorInformation || + BlobErrorCodeStrings.ContainerNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode) + { + return string.Empty; + } + throw; + } + } + + /// + /// Clear the SAS policy set to a container, used to revoke the SAS + /// + /// the name of the container + /// True for success + public bool ClearSASPolicyofContainer(string containerName) + { + try + { + CloudBlobContainer container = BlobClient.GetContainerReference(containerName); + BlobContainerPermissions bp = container.GetPermissions(); + bp.SharedAccessPolicies.Clear(); + container.SetPermissions(bp); + return true; + } + catch (StorageException e) + { + if (null == e || + null == e.RequestInformation || + 404 == e.RequestInformation.HttpStatusCode || + null == e.RequestInformation.ExtendedErrorInformation || + BlobErrorCodeStrings.ContainerNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode) + { + return false; + } + throw; + } + } + + + public bool CleanupContainer(string containerName) + { + try + { + CloudBlobContainer container = BlobClient.GetContainerReference(containerName); + IEnumerable blobs = container.ListBlobs(null, true, BlobListingDetails.All); + if (blobs != null) + { + foreach (ICloudBlob blob in blobs) + { + if (blob == null) continue; + if (!blob.Exists()) + { + try + { + blob.Delete(DeleteSnapshotsOption.IncludeSnapshots); + continue; + } + catch (Exception) + { + continue; + } + } + blob.Delete(DeleteSnapshotsOption.IncludeSnapshots); + } + } + return true; + } + catch (StorageException e) + { + if (null == e || + null == e.RequestInformation || + 404 == e.RequestInformation.HttpStatusCode || + null == e.RequestInformation.ExtendedErrorInformation || + BlobErrorCodeStrings.ContainerNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode) + { + return false; + } + throw; + } + } + + public bool CleanupContainerByRecreateIt(string containerName) + { + try + { + CloudBlobContainer container = BlobClient.GetContainerReference(containerName); + if (container == null || !container.Exists()) return false; + + BlobRequestOptions bro = new BlobRequestOptions(); + bro.RetryPolicy = new LinearRetry(new TimeSpan(0,1,0),3); + try + { + container.Delete(null, bro); + } + catch (StorageException e) + { + if (null == e || + null == e.RequestInformation || + 404 == e.RequestInformation.HttpStatusCode || + null == e.RequestInformation.ExtendedErrorInformation || + BlobErrorCodeStrings.ContainerNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode) + { + throw; + } + } + Console.WriteLine("container deleted"); + bro.RetryPolicy = new LinearRetry(new TimeSpan(0, 3, 0),3); + + bool createSuccess = false; + while (!createSuccess) + { + try + { + container.Create(bro); + createSuccess = true; + } + catch (StorageException e) + { + if (null == e || + null == e.RequestInformation || + null == e.RequestInformation.ExtendedErrorInformation || + BlobErrorCodeStrings.ContainerAlreadyExists == e.RequestInformation.ExtendedErrorInformation.ErrorCode) + { + Thread.Sleep(3000); + } + else + { + throw; + } + } + } + return true; + } + catch (StorageException e) + { + if (null == e || + null == e.RequestInformation || + null == e.RequestInformation.ExtendedErrorInformation || + BlobErrorCodeStrings.ContainerNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode) + { + throw; + } + return false; + } + } + + + /// + /// Query the blob + /// + /// + /// + /// + public ICloudBlob QueryBlob(string containerName, string blobName) + { + try + { + CloudBlobContainer container = BlobClient.GetContainerReference(containerName); + ICloudBlob blob = container.GetBlobReferenceFromServer(blobName); + //since GetBlobReference method return no null value even if blob is not exist. + //use FetchAttributes method to confirm the existence of the blob + blob.FetchAttributes(); + return blob; + } + catch (StorageException e) + { + if (null == e || + null == e.RequestInformation || + 404 == e.RequestInformation.HttpStatusCode || + null == e.RequestInformation.ExtendedErrorInformation || + BlobErrorCodeStrings.ContainerNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode || + BlobErrorCodeStrings.BlobNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode) + { + return null; + } + throw; + } + } + + + public BlobProperties QueryBlobProperties(string containerName, string blobName) + { + try + { + CloudBlobContainer container = BlobClient.GetContainerReference(containerName); + ICloudBlob blob = container.GetBlobReferenceFromServer(blobName); + if (blob == null) + { + return null; + } + blob.FetchAttributes(); + return blob.Properties; + } + catch (StorageException e) + { + if (null == e || + null == e.RequestInformation || + 404 == e.RequestInformation.HttpStatusCode || + null == e.RequestInformation.ExtendedErrorInformation || + BlobErrorCodeStrings.ContainerNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode || + BlobErrorCodeStrings.BlobNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode) + { + return null; + } + throw; + } + } + + + /// + /// Query the blob virtual directory + /// + /// + /// + /// + public CloudBlobDirectory QueryBlobDirectory(string containerName, string blobDirectoryName) + { + try + { + CloudBlobContainer container = BlobClient.GetContainerReference(containerName); + if (container == null || !container.Exists()) return null; + CloudBlobDirectory blobDirectory = container.GetDirectoryReference(blobDirectoryName); + return blobDirectory; + } + catch (StorageException e) + { + if (null == e || + null == e.RequestInformation || + 404 == e.RequestInformation.HttpStatusCode || + null == e.RequestInformation.ExtendedErrorInformation || + BlobErrorCodeStrings.ContainerNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode || + BlobErrorCodeStrings.BlobNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode) + { + return null; + } + throw; + } + } + + + /// + /// Create or update a blob by its name + /// + /// the name of the container + /// the name of the blob + /// the content to the blob + /// Return true on success, false if unable to create, throw exception on error + public bool PutBlob(string containerName, string blobName, string content) + { + try + { + CloudBlobContainer container = BlobClient.GetContainerReference(containerName); + if (container == null || !container.Exists()) return false; + ICloudBlob blob = container.GetBlobReferenceFromServer(blobName); + MemoryStream MStream = new MemoryStream(ASCIIEncoding.Default.GetBytes(content)); + blob.UploadFromStream(MStream); + MStream.Close(); + return true; + } + catch (StorageException e) + { + if (null == e || + null == e.RequestInformation || + 404 == e.RequestInformation.HttpStatusCode || + null == e.RequestInformation.ExtendedErrorInformation || + BlobErrorCodeStrings.ContainerNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode || + BlobErrorCodeStrings.BlobNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode) + { + return false; + } + throw; + } + } + + /// + /// change an exist Blob MD5 hash + /// + /// the name of the container + /// the name of the blob + /// the MD5 hash to set, must be a base 64 string + /// Return true on success, false if unable to set + public bool SetMD5Hash(string containerName, string blobName, string MD5Hash) + { + try + { + CloudBlobContainer container = BlobClient.GetContainerReference(containerName); + ICloudBlob blob = container.GetBlobReferenceFromServer(blobName); + blob.FetchAttributes(); + blob.Properties.ContentMD5 = MD5Hash; + blob.SetProperties(); + return true; + } + catch (StorageException e) + { + if (null == e || + null == e.RequestInformation || + 404 == e.RequestInformation.HttpStatusCode || + null == e.RequestInformation.ExtendedErrorInformation || + BlobErrorCodeStrings.ContainerNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode || + BlobErrorCodeStrings.BlobNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode) + { + return false; + } + throw; + } + } + + + /// + /// put block list. TODO: implement this for large files + /// + /// + /// + /// + /// + public bool PutBlockList(string containerName, string blobName, string[] blockIds) + { + try + { + CloudBlobContainer container = BlobClient.GetContainerReference(containerName); + if (container == null || !container.Exists()) return false; + CloudBlockBlob blob = container.GetBlockBlobReference(blobName); + + blob.PutBlockList(blockIds); + + return true; + } + catch (StorageException e) + { + if (null == e || + null == e.RequestInformation || + 404 == e.RequestInformation.HttpStatusCode || + null == e.RequestInformation.ExtendedErrorInformation || + BlobErrorCodeStrings.ContainerNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode || + BlobErrorCodeStrings.BlobNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode) + { + return false; + } + throw; + } + } + + /// + /// Download Blob text by the blob name + /// + /// the name of the container + /// + /// + /// + public bool GetBlob(string containerName, string blobName, out string content) + { + content = null; + + try + { + CloudBlobContainer container = BlobClient.GetContainerReference(containerName); + ICloudBlob blob = container.GetBlobReferenceFromServer(blobName); + string tempfile = "temp.txt"; + using (FileStream fileStream = new FileStream(tempfile, FileMode.Create)) + { + blob.DownloadToStream(fileStream); + fileStream.Close(); + } + content = File.ReadAllText(tempfile); + File.Delete(tempfile); + + return true; + } + catch (StorageException e) + { + if (null == e || + null == e.RequestInformation || + 404 == e.RequestInformation.HttpStatusCode || + null == e.RequestInformation.ExtendedErrorInformation || + BlobErrorCodeStrings.ContainerNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode || + BlobErrorCodeStrings.BlobNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode) + { + return false; + } + throw; + } + } + + + + + /// + /// Delete a blob by its name + /// + /// the name of the container + /// the name of the blob + /// Return true on success, false if blob not found, throw exception on error + public bool DeleteBlob(string containerName, string blobName) + { + try + { + CloudBlobContainer container = BlobClient.GetContainerReference(containerName); + ICloudBlob blob = container.GetBlobReferenceFromServer(blobName); + return blob.DeleteIfExists(); + } + catch (StorageException e) + { + if (null == e || + null == e.RequestInformation || + 404 == e.RequestInformation.HttpStatusCode || + null == e.RequestInformation.ExtendedErrorInformation || + BlobErrorCodeStrings.ContainerNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode || + BlobErrorCodeStrings.BlobNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode) + { + return false; + } + throw; + } + catch (Exception e1) + { + throw e1; + } + } + + public bool DeleteBlobDirectory(string containerName, string blobDirectoryName, bool recursive) + { + try + { + CloudBlobContainer container = BlobClient.GetContainerReference(containerName); + CloudBlobDirectory blobDirectory = container.GetDirectoryReference(blobDirectoryName); + + if (recursive) + { + foreach (ICloudBlob blob in blobDirectory.ListBlobs(recursive, BlobListingDetails.All)) + { + blob.Delete(); + } + } + else + { + foreach (ICloudBlob blob in blobDirectory.ListBlobs(recursive)) + { + blob.Delete(); + } + } + + return true; + } + catch (StorageException e) + { + if (null == e || + null == e.RequestInformation || + 404 == e.RequestInformation.HttpStatusCode || + null == e.RequestInformation.ExtendedErrorInformation || + BlobErrorCodeStrings.ContainerNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode || + BlobErrorCodeStrings.BlobNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode) + { + return false; + } + throw; + } + } + + private void deleteBlobDirRecursive(CloudBlobDirectory cbd) + { + if (cbd == null) return; + foreach (ICloudBlob blob in cbd.ListBlobs(true, BlobListingDetails.All)) + { + blob.Delete(); + } + + } + + + public bool UploadFileToBlockBlob(string containerName, string blobName, string filePath) + { + try + { + CloudBlobContainer container = BlobClient.GetContainerReference(containerName); + CloudBlockBlob blockBlob = container.GetBlockBlobReference(blobName); + BlobRequestOptions bro = new BlobRequestOptions(); + bro.RetryPolicy = new LinearRetry(new TimeSpan(0, 0, 30),3); + bro.ServerTimeout = new TimeSpan(1, 30, 0); + bro.MaximumExecutionTime = new TimeSpan(1, 30, 0); + + using (FileStream fileStream = new FileStream(Path.Combine(filePath), FileMode.Open)) + { + blockBlob.UploadFromStream(fileStream, null, bro); + fileStream.Close(); + } + return true; + } + catch (StorageException e) + { + if (null == e || + null == e.RequestInformation || + 404 == e.RequestInformation.HttpStatusCode || + null == e.RequestInformation.ExtendedErrorInformation || + BlobErrorCodeStrings.ContainerNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode || + BlobErrorCodeStrings.BlobNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode) + { + return false; + } + throw; + } + } + + public bool UploadFileToPageBlob(string containerName, string blobName, string filePath) + { + try + { + FileInfo fi = new FileInfo(filePath); + if (!fi.Exists) + { + return false; + } + long fileLength = fi.Length; + + CloudBlobContainer container = BlobClient.GetContainerReference(containerName); + CloudPageBlob pageBlob = container.GetPageBlobReference(blobName); + BlobRequestOptions bro = new BlobRequestOptions(); + bro.RetryPolicy = new LinearRetry(new TimeSpan(0, 0, 30),3); + bro.ServerTimeout = new TimeSpan(1, 30, 0); + bro.MaximumExecutionTime = new TimeSpan(1, 30, 0); + MD5CryptoServiceProvider md5CSP = new MD5CryptoServiceProvider(); + + long offset = 0; + const int pageBlobPageSize = 512; + const int maxPageBlobWriteSize= 4*1024*1024; + long blobSize = (fileLength + pageBlobPageSize - 1) & ~(pageBlobPageSize - 1); + pageBlob.Create(blobSize); + + using (FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read)) + { + BinaryReader br = new BinaryReader(fs); + while (offset < fileLength) + { + byte[] range = br.ReadBytes(maxPageBlobWriteSize); + md5CSP.TransformBlock(range, 0, range.Length, null, 0); + if (range.Length % pageBlobPageSize > 0) + { + int pad = pageBlobPageSize - (range.Length % pageBlobPageSize); + Array.Resize(ref range, range.Length + pad); + } + MemoryStream ms = new MemoryStream(range, false); + pageBlob.WritePages(ms, offset, null, null, bro); + offset += range.Length; + } + md5CSP.TransformFinalBlock(new byte[0], 0, 0); + } + //update the page blob contentMD5 + pageBlob.Properties.ContentMD5 = Convert.ToBase64String(md5CSP.Hash); + pageBlob.SetProperties(null, bro); + + return true; + } + catch (StorageException e) + { + if (null == e || + null == e.RequestInformation || + 404 == e.RequestInformation.HttpStatusCode || + null == e.RequestInformation.ExtendedErrorInformation || + BlobErrorCodeStrings.ContainerNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode || + BlobErrorCodeStrings.BlobNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode) + { + return false; + } + throw; + } + } + + public bool DownloadFile(string containerName, string blobName, string filePath) + { + try + { + CloudBlobContainer container = BlobClient.GetContainerReference(containerName); + BlobRequestOptions bro = new BlobRequestOptions(); + bro.RetryPolicy = new LinearRetry(new TimeSpan(0, 0, 30),3); + bro.ServerTimeout = new TimeSpan(1, 30, 0); + bro.MaximumExecutionTime = new TimeSpan(1, 30, 0); + ICloudBlob blob = container.GetBlobReferenceFromServer(blobName); + + using (FileStream fileStream = new FileStream(filePath, FileMode.Create)) + { + blob.DownloadToStream(fileStream, null, bro); + fileStream.Close(); + } + + return true; + } + catch (StorageException e) + { + if (null == e || + null == e.RequestInformation || + 404 == e.RequestInformation.HttpStatusCode || + null == e.RequestInformation.ExtendedErrorInformation || + BlobErrorCodeStrings.ContainerNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode || + BlobErrorCodeStrings.BlobNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode) + { + return false; + } + throw; + } + } + /// + /// Creates a snapshot of the blob + /// + /// the name of the container + /// the name of blob + /// blob snapshot + public ICloudBlob CreateSnapshot(string containerName, string blobName) + { + try + { + CloudBlobContainer container = BlobClient.GetContainerReference(containerName); + ICloudBlob blob = container.GetBlobReferenceFromServer(blobName); + if (blob.Properties.BlobType == Microsoft.WindowsAzure.Storage.Blob.BlobType.BlockBlob) + { + CloudBlockBlob BBlock = blob as CloudBlockBlob; + return BBlock.CreateSnapshot(); + } + else + { + CloudPageBlob BBlock = blob as CloudPageBlob; + return BBlock.CreateSnapshot(); + } + + } + catch (StorageException e) + { + if (null == e || + null == e.RequestInformation || + 404 == e.RequestInformation.HttpStatusCode || + null == e.RequestInformation.ExtendedErrorInformation || + BlobErrorCodeStrings.ContainerNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode || + BlobErrorCodeStrings.BlobNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode) + { + return null; + } + throw; + } + } + + /// + /// delete snapshot of the blob (DO NOT delete blob) + /// + /// the name of the container + /// the name of blob + /// + public void DeleteSnapshotOnly(string containerName, string blobName) + { + try + { + CloudBlobContainer container = BlobClient.GetContainerReference(containerName); + ICloudBlob blob = container.GetBlobReferenceFromServer(blobName); + + //Indicate that any snapshots should be deleted. + blob.Delete(DeleteSnapshotsOption.DeleteSnapshotsOnly); + return; + } + catch (StorageException e) + { + if (null == e || + null == e.RequestInformation || + 404 == e.RequestInformation.HttpStatusCode || + null == e.RequestInformation.ExtendedErrorInformation || + BlobErrorCodeStrings.ContainerNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode || + BlobErrorCodeStrings.BlobNotFound == e.RequestInformation.ExtendedErrorInformation.ErrorCode) + { + return; + } + throw; + } + } + /// + /// return name of snapshot + /// + /// the name of blob + /// A blob snapshot + /// name of snapshot + public string GetNameOfSnapshot(string fileName, ICloudBlob snapshot) + { + string fileNameNoExt = Path.GetFileNameWithoutExtension(fileName); + string extension = Path.GetExtension(fileName); + string timeStamp = string.Format("{0:u}", snapshot.SnapshotTime.Value); + return string.Format("{0} ({1}){2}", + fileNameNoExt, timeStamp.Replace(":", string.Empty).TrimEnd(new char[] { 'Z' }), extension); + } + } + +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.StorageTestLib/MSSharedLibKey.snk b/src/ServiceManagement/Storage/Commands.Storage.StorageTestLib/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ServiceManagement/Storage/Commands.Storage.StorageTestLib/MSSharedLibKey.snk differ diff --git a/src/ServiceManagement/Storage/Commands.Storage.StorageTestLib/Properties/AssemblyInfo.cs b/src/ServiceManagement/Storage/Commands.Storage.StorageTestLib/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..fb34ae2056bb --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.StorageTestLib/Properties/AssemblyInfo.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft Azure Powershell")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Microsoft Azure Powershell")] +[assembly: AssemblyCopyright("Copyright © Microsoft")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("461279da-d37f-4509-b5c8-e39dcf24e4af")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("0.8.5")] +[assembly: AssemblyFileVersion("0.8.5")] \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage.StorageTestLib/TestConstants.cs b/src/ServiceManagement/Storage/Commands.Storage.StorageTestLib/TestConstants.cs new file mode 100644 index 000000000000..3c7a0d2a097f --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.StorageTestLib/TestConstants.cs @@ -0,0 +1,38 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +namespace StorageTestLib +{ + + public struct Tag + { + public const string BVT = "bvt"; + public const string Function = "function"; + public const string Scenario = "scenario"; + public const string GB18030 = "GB18030"; + } + + public struct Protocol + { + public const string Http = "http"; + public const string Https = "https"; + } + + public struct BlobType + { + public const string Page = "page"; + public const string Block = "block"; + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.StorageTestLib/packages.config b/src/ServiceManagement/Storage/Commands.Storage.StorageTestLib/packages.config new file mode 100644 index 000000000000..af1815e71397 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.StorageTestLib/packages.config @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/Cmdlet/GetAzureStorageBlobContentTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/Cmdlet/GetAzureStorageBlobContentTest.cs new file mode 100644 index 000000000000..3d4ccba51a15 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/Cmdlet/GetAzureStorageBlobContentTest.cs @@ -0,0 +1,294 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// --------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Blob.Cmdlet +{ + using System; + using System.Management.Automation; + using Microsoft.VisualStudio.TestTools.UnitTesting; + using Commands.Test.Utilities.Common; + using Microsoft.WindowsAzure.Storage.Blob; + using Model.Contract; + using Model.ResourceModel; + using Storage.Blob.Cmdlet; + using Storage.Common; + + [TestClass] + public class GetAzureStorageBlobContentTest : StorageBlobTestBase + { + internal FakeGetAzureStorageBlobContentCommand command = null; + + [TestInitialize] + public void InitCommand() + { + command = new FakeGetAzureStorageBlobContentCommand(BlobMock) + { + CommandRuntime = new MockCommandRuntime() + }; + } + + [TestCleanup] + public void CleanCommand() + { + command = null; + } + + [TestMethod] + public void OnStartTest() + { + ProgressRecord pr = null; + command.OnTaskStart(pr); + pr = new ProgressRecord(0, "a", "b"); + pr.PercentComplete = 10; + command.OnTaskStart(pr); + Assert.AreEqual(0, pr.PercentComplete); + } + + [TestMethod] + public void OnProgressTest() + { + ProgressRecord pr = null; + command.OnTaskProgress(pr, 0.0, 0.0); + pr = new ProgressRecord(0, "a", "b"); + pr.PercentComplete = 10; + command.OnTaskProgress(pr, 5.6, 12.3); + Assert.AreEqual(12, pr.PercentComplete); + command.OnTaskProgress(pr, 5.6, 12.8); + Assert.AreEqual(12, pr.PercentComplete); + command.OnTaskProgress(pr, 5.6, 2.8); + Assert.AreEqual(2, pr.PercentComplete); + command.OnTaskProgress(pr, 5.6, 1.8); + Assert.AreEqual(1, pr.PercentComplete); + command.OnTaskProgress(pr, 5.6, 5); + Assert.AreEqual(5, pr.PercentComplete); + } + + [TestMethod] + public void OnFinishTest() + { + ProgressRecord pr = null; + ArgumentException e = new ArgumentException("test"); + command.OnTaskFinish(pr, null); + pr = new ProgressRecord(0, "a", "b"); + command.OnTaskFinish(pr, null); + Assert.AreEqual(100, pr.PercentComplete); + Assert.AreEqual(String.Format(Resources.TransmitSuccessfully), pr.StatusDescription); + command.OnTaskFinish(pr, e); + Assert.AreEqual(100, pr.PercentComplete); + Assert.AreEqual(String.Format(Resources.TransmitFailed, e.Message), pr.StatusDescription); + } + + [TestMethod] + public void DownloadBlobTest() + { + command.DownloadBlob(null, null); + } + + [TestMethod] + public void GetBlobContentByNameWithInvalidNameTest() + { + string containerName = string.Empty; + string blobName = string.Empty; + string fileName = string.Empty; + AssertThrows(() => command.GetBlobContent(containerName, blobName, fileName), + String.Format(Resources.InvalidBlobName, blobName)); + + containerName = "ab"; + blobName = "blob0"; + fileName = "blob*"; + AssertThrows(() => command.GetBlobContent(containerName, blobName, fileName), + String.Format(Resources.InvalidContainerName, containerName)); + } + + [TestMethod] + public void GetBlobContentByNameSuccessfullyTest() + { + AddTestBlobs(); + + string containerName = "container1"; + string blobName = "blob0"; + string fileName = string.Empty; + + AzureStorageBlob blob = command.GetBlobContent(containerName, blobName, fileName); + Assert.AreEqual("blob0", blob.Name); + } + + [TestMethod] + public void GetBlobContentByContainerByInvalidNameTest() + { + CloudBlobContainer container = null; + string blobName = string.Empty; + string fileName = string.Empty; + + AssertThrows(() => command.GetBlobContent(container, blobName, fileName), + String.Format(Resources.InvalidBlobName, blobName)); + + blobName = "blob0"; + fileName = "ab*+"; + AssertThrows(() => command.GetBlobContent(container, blobName, fileName), + String.Format(Resources.InvalidFileName, fileName)); + + fileName = string.Empty; + AssertThrows(() => command.GetBlobContent(container, blobName, fileName), + String.Format(Resources.ObjectCannotBeNull, typeof(CloudBlobContainer).Name)); + } + + [TestMethod] + public void GetBlobContentByContainerWithNotExistBlobTest() + { + AddTestContainers(); + CloudBlobContainer container = BlobMock.GetContainerReference("test"); + string blobName = "blob0"; + string fileName = string.Empty; + AssertThrows(() => command.GetBlobContent(container, blobName, fileName), + String.Format(Resources.BlobNotFound, blobName, container.Name)); + } + + [TestMethod] + public void GetBlobContentByContainerSuccessfullyTest() + { + AddTestBlobs(); + + CloudBlobContainer container = BlobMock.GetContainerReference("container20"); + string blobName = "blob10"; + string fileName = string.Empty; + AzureStorageBlob blob = command.GetBlobContent(container, blobName, fileName); + Assert.AreEqual("blob10", blob.Name); + + container = BlobMock.GetContainerReference("container20"); + blobName = "blob10"; + fileName = GetUniqueString(); + blob = command.GetBlobContent(container, blobName, fileName); + Assert.AreEqual("blob10", blob.Name); + } + + [TestMethod] + public void GetBlobContentByICloudBlobWithInvalidArgumentsTest() + { + CloudBlockBlob blockBlob = null; + string fileName = String.Empty; + ArgumentNullException nullException = new ArgumentNullException(typeof(ICloudBlob).Name, + String.Format(Resources.ObjectCannotBeNull, typeof(ICloudBlob).Name)); + AssertThrows(() => command.GetBlobContent(blockBlob, fileName, false), + nullException.Message); + string bloburi = "http://127.0.0.1/account/test/blob"; + blockBlob = new CloudBlockBlob(new Uri(bloburi)); + fileName = "*&^"; + AssertThrows(() => command.GetBlobContent(blockBlob, fileName, false), + String.Format(Resources.InvalidFileName, fileName)); + bloburi = "http://127.0.0.1/account/test/blob*+"; + fileName = string.Empty; + blockBlob = new CloudBlockBlob(new Uri(bloburi)); + command.GetBlobContent(blockBlob, fileName, true); + } + + [TestMethod] + public void GetBlobContentByICloudBlobWithNotExistsContainerTest() + { + CloudBlobContainer container = BlobMock.GetContainerReference("test"); + CloudBlockBlob blockBlob = container.GetBlockBlobReference("blob0"); + string fileName = "abc"; + AssertThrows(() => command.GetBlobContent(blockBlob, fileName, false), + String.Format(Resources.ContainerNotFound, "test")); + } + + [TestMethod] + public void GetBlobContentByICloudBlobWithNotExistsBlobTest() + { + AddTestContainers(); + string bloburi = "http://127.0.0.1/account/test/blob0"; + CloudBlockBlob blockBlob = new CloudBlockBlob(new Uri(bloburi)); + string fileName = "abc"; + AssertThrows(() => command.GetBlobContent(blockBlob, fileName, false), + String.Format(Resources.BlobNotFound, "blob0", "test")); + } + + [TestMethod] + public void GetBlobContentByICloudBlobWithInvalidDestinationTest() + { + AddTestContainers(); + + string bloburi = "http://127.0.0.1/account/test/blob0"; + CloudBlockBlob blockBlob = new CloudBlockBlob(new Uri(bloburi)); + + string fileName = @"D:\E\xxxxx\febc\def"; + AssertThrows(() => command.GetBlobContent(blockBlob, fileName, false), + String.Format(Resources.DirectoryNotExists, @"D:\E\xxxxx\febc")); + + fileName = @"c:\Windows\System32\cmd.exe"; + command.Confirmed = false; + Assert.IsNull(command.GetBlobContent(blockBlob, fileName, false)); + } + + [TestMethod] + public void GetBlobContentByICloudBlobWithDownloadExceptionTest() + { + AddTestBlobs(); + string bloburi = "http://127.0.0.1/account/container1/blob0"; + string fileName = string.Empty; + CloudBlockBlob blockBlob = new CloudBlockBlob(new Uri(bloburi)); + command.Force = true; + command.Exception = true; + AssertThrows(() => command.GetBlobContent(blockBlob, fileName, false), "FakeGetAzureStorageBlobContentCommand"); + } + + [TestMethod] + public void GetBlobContentByICloudBlobSuccessfullyTest() + { + AddTestBlobs(); + string bloburi = "http://127.0.0.1/account/container1/blob0"; + string fileName = string.Empty; + CloudBlockBlob blockBlob = new CloudBlockBlob(new Uri(bloburi)); + command.Force = true; + command.Exception = false; + + AzureStorageBlob blob = command.GetBlobContent(blockBlob, fileName, false); + Assert.AreEqual("blob0", blob.Name); + + blob = command.GetBlobContent(blockBlob, fileName, true); + Assert.AreEqual("blob0", blob.Name); + + fileName = @"c:\Windows\System32"; + command.GetBlobContent(blockBlob, fileName, false); + } + } + + internal class FakeGetAzureStorageBlobContentCommand : GetAzureStorageBlobContentCommand + { + public bool Exception = false; + public bool Confirmed = false; + + internal override bool ConfirmOverwrite(string msg = null) + { + return Confirmed; + } + + public FakeGetAzureStorageBlobContentCommand(IStorageBlobManagement channel) + { + Channel = channel; + } + + internal override void DownloadBlob(ICloudBlob blob, string filePath) + { + ProgressRecord pr = new ProgressRecord(0, "a", "b"); + OnTaskStart(pr); + OnTaskProgress(pr, 1, 10.5); + OnTaskFinish(pr, null); + if (Exception) + { + throw new ArgumentException("FakeGetAzureStorageBlobContentCommand"); + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/Cmdlet/GetAzureStorageBlobTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/Cmdlet/GetAzureStorageBlobTest.cs new file mode 100644 index 000000000000..c40e8f8f945b --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/Cmdlet/GetAzureStorageBlobTest.cs @@ -0,0 +1,257 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// --------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Blob.Cmdlet +{ + using System; + using System.Collections.Generic; + using System.Linq; + using Microsoft.VisualStudio.TestTools.UnitTesting; + using Commands.Test.Utilities.Common; + using Microsoft.WindowsAzure.Storage.Blob; + using Model.ResourceModel; + using Storage.Blob.Cmdlet; + using Storage.Common; + + [TestClass] + public class GetAzureStorageBlobTest : StorageBlobTestBase + { + public GetAzureStorageBlobCommand command = null; + + [TestInitialize] + public void InitCommand() + { + command = new GetAzureStorageBlobCommand(BlobMock) + { + CommandRuntime = new MockCommandRuntime() + }; + } + + [TestCleanup] + public void CleanCommand() + { + command = null; + } + + [TestMethod] + public void GetCloudBlobContainerByNameWithInvalidNameTest() + { + string name = string.Empty; + AssertThrows(() => command.GetCloudBlobContainerByName(name), + String.Format(Resources.InvalidContainerName, name)); + + name = "a"; + AssertThrows(() => command.GetCloudBlobContainerByName(name), + String.Format(Resources.InvalidContainerName, name)); + + name = "abcde*-"; + AssertThrows(() => command.GetCloudBlobContainerByName(name), + String.Format(Resources.InvalidContainerName, name)); + } + + [TestMethod] + public void GetCloudBlobContainerByNameWithNoExistsContainerTest() + { + string name = "test"; + AssertThrows(() => command.GetCloudBlobContainerByName(name), + String.Format(Resources.ContainerNotFound, name)); + } + + [TestMethod] + public void GetCloudBlobContainerByNameSuccessfullyTest() + { + AddTestContainers(); + + string name = "test"; + CloudBlobContainer container = command.GetCloudBlobContainerByName(name); + Assert.AreEqual(name, container.Name); + } + + [TestMethod] + public void ListBlobsByNameWithEmptyContainerTest() + { + AddTestContainers(); + + string containerName = "test"; + string blobName = ""; + List blobList = command.ListBlobsByName(containerName, blobName).ToList(); + Assert.AreEqual(0, blobList.Count); + + containerName = "test"; + blobName = "*"; + blobList = command.ListBlobsByName(containerName, blobName).ToList(); + Assert.AreEqual(0, blobList.Count); + + containerName = "test"; + blobName = "blob"; + AssertThrows(()=> command.ListBlobsByName(containerName, blobName).ToList(), + String.Format(Resources.BlobNotFound, blobName, containerName)); + } + + [TestMethod] + public void ListBlobsByNameWithInvalidBlobNameTest() + { + AddTestContainers(); + string containerName = "test"; + string blobName = new String('a', 1025); + AssertThrows(() => command.ListBlobsByName(containerName, blobName).ToList(), + String.Format(Resources.InvalidBlobName, blobName)); + } + + [TestMethod] + public void ListBlobsByNameWithWildCardTest() + { + AddTestBlobs(); + + string containerName = "container1"; + string blobName = "blob*"; + List blobList = command.ListBlobsByName(containerName, blobName).ToList(); + Assert.AreEqual(1, blobList.Count); + Assert.AreEqual("blob0", ((ICloudBlob)blobList[0]).Name); + + containerName = "container20"; + blobName = "*1?"; + blobList = command.ListBlobsByName(containerName, blobName).ToList(); + Assert.AreEqual(10, blobList.Count); + ICloudBlob blob = (ICloudBlob)blobList[0]; + Assert.IsTrue(blob.Name.StartsWith("blob1") && blob.Name.Length == "blob1".Length + 1); + } + + [TestMethod] + public void ListBlobsByNameSuccessfullyTest() + { + AddTestBlobs(); + string containerName = "container1"; + string blobName = "blob0"; + List blobList = command.ListBlobsByName(containerName, blobName).ToList(); + Assert.AreEqual(1, blobList.Count); + Assert.AreEqual("blob0", ((ICloudBlob)blobList[0]).Name); + + containerName = "container20"; + blobName = String.Empty; + blobList = command.ListBlobsByName(containerName, blobName).ToList(); + Assert.AreEqual(20, blobList.Count); + } + + [TestMethod] + public void ListBlobsByPrefixWithInvalidPrefixTest() + { + string containerName = string.Empty; + string prefix = string.Empty; + AssertThrows(() => command.ListBlobsByPrefix(containerName, prefix), + String.Format(Resources.InvalidContainerName, containerName)); + + containerName = "test"; + AssertThrows(() => command.ListBlobsByPrefix(containerName, prefix), + String.Format(Resources.ContainerNotFound, containerName)); + } + + [TestMethod] + public void ListBlobsByPrefixWithEmptyContainerTest() + { + AddTestContainers(); + string containerName = "test"; + string prefix = "1"; + + List blobList = command.ListBlobsByPrefix(containerName, prefix).ToList(); + Assert.AreEqual(0, blobList.Count); + } + + [TestMethod] + public void ListBlobsByPrefixSuccessfullyTest() + { + AddTestBlobs(); + + string containerName = "container0"; + string prefix = "blob"; + List blobList = command.ListBlobsByPrefix(containerName, prefix).ToList(); + Assert.AreEqual(0, blobList.Count); + + containerName = "container1"; + prefix = "blob"; + blobList = command.ListBlobsByPrefix(containerName, prefix).ToList(); + Assert.AreEqual(1, blobList.Count); + ICloudBlob blob = (ICloudBlob)blobList[0]; + Assert.AreEqual("blob0", blob.Name); + + containerName = "container1"; + prefix = "blob0"; + blobList = command.ListBlobsByPrefix(containerName, prefix).ToList(); + Assert.AreEqual(1, blobList.Count); + blob = (ICloudBlob) blobList[0]; + Assert.AreEqual("blob0", blob.Name); + + containerName = "container1"; + prefix = "blob01"; + blobList = command.ListBlobsByPrefix(containerName, prefix).ToList(); + Assert.AreEqual(0, blobList.Count); + + ((MockCommandRuntime)command.CommandRuntime).ResetPipelines(); + containerName = "container20"; + prefix = "blob1"; + blobList = command.ListBlobsByPrefix(containerName, prefix).ToList(); + Assert.AreEqual(11, blobList.Count); + blob = (ICloudBlob) blobList[0]; + Assert.IsTrue(blob.Name.StartsWith("blob1")); + } + + [TestMethod] + public void WriteBlobsWithContext() + { + List blobList = null; + ((MockCommandRuntime)command.CommandRuntime).ResetPipelines(); + command.WriteBlobsWithContext(blobList); + Assert.AreEqual(0, ((MockCommandRuntime)command.CommandRuntime).OutputPipeline.Count); + + blobList = new List(); + ((MockCommandRuntime)command.CommandRuntime).ResetPipelines(); + command.WriteBlobsWithContext(blobList); + Assert.AreEqual(0, ((MockCommandRuntime)command.CommandRuntime).OutputPipeline.Count); + + AddTestBlobs(); + blobList = BlobMock.ContainerBlobs["container20"]; + ((MockCommandRuntime)command.CommandRuntime).ResetPipelines(); + command.WriteBlobsWithContext(blobList); + Assert.AreEqual(20, ((MockCommandRuntime)command.CommandRuntime).OutputPipeline.Count); + } + + [TestMethod] + public void ExecuteCommandGetAzureBlob() + { + AddTestBlobs(); + + ((MockCommandRuntime)command.CommandRuntime).ResetPipelines(); + command.Container = "container1"; + command.Blob = "blob*"; + command.ExecuteCmdlet(); + Assert.AreEqual(1, ((MockCommandRuntime)command.CommandRuntime).OutputPipeline.Count); + AzureStorageBlob blob = (AzureStorageBlob)((MockCommandRuntime)command.CommandRuntime).OutputPipeline.FirstOrDefault(); + Assert.AreEqual("blob0", blob.Name); + + ((MockCommandRuntime)command.CommandRuntime).ResetPipelines(); + command.Container = "container20"; + command.Blob = "blob12"; + command.ExecuteCmdlet(); + Assert.AreEqual(1, ((MockCommandRuntime)command.CommandRuntime).OutputPipeline.Count); + blob = (AzureStorageBlob)((MockCommandRuntime)command.CommandRuntime).OutputPipeline.FirstOrDefault(); + Assert.AreEqual("blob12", blob.Name); + + ((MockCommandRuntime)command.CommandRuntime).ResetPipelines(); + command.Container = "container20"; + command.Blob = "*"; + command.ExecuteCmdlet(); + Assert.AreEqual(20, ((MockCommandRuntime)command.CommandRuntime).OutputPipeline.Count); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/Cmdlet/GetAzureStorageContainerTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/Cmdlet/GetAzureStorageContainerTest.cs new file mode 100644 index 000000000000..b8f2b27ee8a9 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/Cmdlet/GetAzureStorageContainerTest.cs @@ -0,0 +1,111 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Blob.Cmdlet +{ + /// + /// Unit test for get azure storage container cmdlet + /// + [TestClass] + public class GetAzureStorageContainerTest : StorageBlobTestBase + { + /// + /// Get azure storage container command + /// + private GetAzureStorageContainerCommand command = null; + + [TestInitialize] + public void InitCommand() + { + command = new GetAzureStorageContainerCommand(BlobMock) + { + CommandRuntime = MockCmdRunTime + }; + CurrentBlobCmd = command; + } + + [TestCleanup] + public void CleanCommand() + { + command = null; + } + + [TestMethod] + public void ListContainersByNameWithInvalidNameTest() + { + string invalidName = "a"; + AssertThrows(() => command.ListContainersByName(invalidName).ToList(), + String.Format(Resources.InvalidContainerName, invalidName)); + invalidName = "xx%%d"; + AssertThrows(() => command.ListContainersByName(invalidName).ToList(), + String.Format(Resources.InvalidContainerName, invalidName)); + } + + [TestMethod] + public void ListContainersByNameWithContainerNameTest() + { + AddTestContainers(); + IEnumerable> containerList = command.ListContainersByName("text"); + Assert.AreEqual(1, containerList.Count()); + Assert.AreEqual("text", containerList.First().Item1.Name); + } + + [TestMethod] + public void ListContainersByNameWithNotExistingContainerTest() + { + string notExistingName = "abcdefg"; + AssertThrows(() => command.ListContainersByName(notExistingName).ToList(), + String.Format(Resources.ContainerNotFound, notExistingName)); + } + + [TestMethod] + public void ListContainerByPrefixWithInvalidPrefixTest() + { + MockCmdRunTime.ResetPipelines(); + string prefix = "?"; + AssertThrows(() => RunAsyncCommand(() => command.ListContainersByPrefix(prefix).ToList()), String.Format(Resources.InvalidContainerName, prefix)); + } + + [TestMethod] + public void PackCloudBlobContainerWithAclTest() + { + RunAsyncCommand(() => command.PackCloudBlobContainerWithAcl(null)); + Assert.IsFalse(MockCmdRunTime.OutputPipeline.Any()); + + RunAsyncCommand(() => command.PackCloudBlobContainerWithAcl(BlobMock.ContainerAndTokenList)); + Assert.IsFalse(MockCmdRunTime.OutputPipeline.Any()); + + AddTestContainers(); + RunAsyncCommand(() => command.PackCloudBlobContainerWithAcl(BlobMock.ContainerAndTokenList)); + Assert.AreEqual(5, MockCmdRunTime.OutputPipeline.Count()); + } + + [TestMethod] + public void ExecuteCommandGetContainerTest() + { + AddTestContainers(); + command.Name = "test"; + RunAsyncCommand(() => command.ExecuteCmdlet()); + Assert.AreEqual(1, MockCmdRunTime.OutputPipeline.Count); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/Cmdlet/NewAzureStorageBlobSasTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/Cmdlet/NewAzureStorageBlobSasTest.cs new file mode 100644 index 000000000000..1bef41e7183e --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/Cmdlet/NewAzureStorageBlobSasTest.cs @@ -0,0 +1,71 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// --------------------------------------------------------------------------------- + +using System; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Blob.Cmdlet +{ + [TestClass] + public class NewAzureStorageBlobSasTest : StorageBlobTestBase + { + public NewAzureStorageBlobSasTokenCommand command = null; + + [TestInitialize] + public void InitCommand() + { + command = new NewAzureStorageBlobSasTokenCommand(BlobMock) + { + CommandRuntime = MockCmdRunTime + }; + CurrentBlobCmd = command; + } + + [TestCleanup] + public void CleanCommand() + { + command = null; + } + + [TestMethod] + public void SetupAccessPolicyPermissionTest() + { + SharedAccessBlobPolicy accessPolicy = new SharedAccessBlobPolicy(); + command.SetupAccessPolicyPermission(accessPolicy, ""); + Assert.AreEqual(accessPolicy.Permissions, SharedAccessBlobPermissions.None); + accessPolicy.Permissions = SharedAccessBlobPermissions.Read; + command.SetupAccessPolicyPermission(accessPolicy, ""); + Assert.AreEqual(accessPolicy.Permissions, SharedAccessBlobPermissions.Read); + command.SetupAccessPolicyPermission(accessPolicy, "D"); + Assert.AreEqual(accessPolicy.Permissions, SharedAccessBlobPermissions.Delete); + command.SetupAccessPolicyPermission(accessPolicy, "DdDdd"); + Assert.AreEqual(accessPolicy.Permissions, SharedAccessBlobPermissions.Delete); + command.SetupAccessPolicyPermission(accessPolicy, "DR"); + Assert.AreEqual(accessPolicy.Permissions, SharedAccessBlobPermissions.Delete | SharedAccessBlobPermissions.Read); + command.SetupAccessPolicyPermission(accessPolicy, "DRrddrrr"); + Assert.AreEqual(accessPolicy.Permissions, SharedAccessBlobPermissions.Delete | SharedAccessBlobPermissions.Read); + command.SetupAccessPolicyPermission(accessPolicy, "rwd"); + Assert.AreEqual(accessPolicy.Permissions, SharedAccessBlobPermissions.Delete | SharedAccessBlobPermissions.Read | SharedAccessBlobPermissions.Write); + command.SetupAccessPolicyPermission(accessPolicy, "dwr"); + Assert.AreEqual(accessPolicy.Permissions, SharedAccessBlobPermissions.Delete | SharedAccessBlobPermissions.Read | SharedAccessBlobPermissions.Write); + AssertThrows(() => command.SetupAccessPolicyPermission(accessPolicy, "rwDl")); + AssertThrows(() => command.SetupAccessPolicyPermission(accessPolicy, "x")); + AssertThrows(() => command.SetupAccessPolicyPermission(accessPolicy, "rwx")); + AssertThrows(() => command.SetupAccessPolicyPermission(accessPolicy, "ABC")); + AssertThrows(() => command.SetupAccessPolicyPermission(accessPolicy, "xyz")); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/Cmdlet/NewAzureStorageContainerSasTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/Cmdlet/NewAzureStorageContainerSasTest.cs new file mode 100644 index 000000000000..81b74b18dc81 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/Cmdlet/NewAzureStorageContainerSasTest.cs @@ -0,0 +1,69 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// --------------------------------------------------------------------------------- + +using System; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Blob.Cmdlet +{ + [TestClass] + public class NewAzureStorageContainerSasTest : StorageBlobTestBase + { + public NewAzureStorageContainerSasTokenCommand command = null; + + [TestInitialize] + public void InitCommand() + { + command = new NewAzureStorageContainerSasTokenCommand(BlobMock) + { + CommandRuntime = MockCmdRunTime + }; + CurrentBlobCmd = command; + } + + [TestCleanup] + public void CleanCommand() + { + command = null; + } + + [TestMethod] + public void SetupAccessPolicyPermissionTest() + { + SharedAccessBlobPolicy accessPolicy = new SharedAccessBlobPolicy(); + command.SetupAccessPolicyPermission(accessPolicy, ""); + Assert.AreEqual(accessPolicy.Permissions, SharedAccessBlobPermissions.None); + accessPolicy.Permissions = SharedAccessBlobPermissions.Read; + command.SetupAccessPolicyPermission(accessPolicy, ""); + Assert.AreEqual(accessPolicy.Permissions, SharedAccessBlobPermissions.Read); + command.SetupAccessPolicyPermission(accessPolicy, "D"); + Assert.AreEqual(accessPolicy.Permissions, SharedAccessBlobPermissions.Delete); + command.SetupAccessPolicyPermission(accessPolicy, "rrR"); + Assert.AreEqual(accessPolicy.Permissions, SharedAccessBlobPermissions.Read); + command.SetupAccessPolicyPermission(accessPolicy, "DR"); + Assert.AreEqual(accessPolicy.Permissions, SharedAccessBlobPermissions.Delete | SharedAccessBlobPermissions.Read); + command.SetupAccessPolicyPermission(accessPolicy, "rwDl"); + Assert.AreEqual(accessPolicy.Permissions, SharedAccessBlobPermissions.Delete | + SharedAccessBlobPermissions.Read | SharedAccessBlobPermissions.List | SharedAccessBlobPermissions.Write); + command.SetupAccessPolicyPermission(accessPolicy, "Dlrw"); + Assert.AreEqual(accessPolicy.Permissions, SharedAccessBlobPermissions.Delete | + SharedAccessBlobPermissions.Read | SharedAccessBlobPermissions.List | SharedAccessBlobPermissions.Write); + AssertThrows(() => command.SetupAccessPolicyPermission(accessPolicy, "x")); + AssertThrows(() => command.SetupAccessPolicyPermission(accessPolicy, "rwx")); + AssertThrows(() => command.SetupAccessPolicyPermission(accessPolicy, "ABC")); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/Cmdlet/NewAzureStorageContainerTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/Cmdlet/NewAzureStorageContainerTest.cs new file mode 100644 index 000000000000..bdcc21c7a8c9 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/Cmdlet/NewAzureStorageContainerTest.cs @@ -0,0 +1,103 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Blob +{ + [TestClass] + public class NewAzureStorageContainerTest : StorageBlobTestBase + { + public NewAzureStorageContainerCommand command = null; + + [TestInitialize] + public void InitCommand() + { + command = new NewAzureStorageContainerCommand(BlobMock) + { + CommandRuntime = MockCmdRunTime + }; + CurrentBlobCmd = command; + } + + [TestCleanup] + public void CleanCommand() + { + command = null; + } + + [TestMethod] + public void CreateContainerWithInvalidContainerNameTest() + { + string name = String.Empty; + BlobContainerPublicAccessType accesslevel = BlobContainerPublicAccessType.Off; + + AssertThrowsAsync(() => command.CreateAzureContainer(InitTaskId, BlobMock, name, accesslevel), + String.Format(Resources.InvalidContainerName, name)); + + name = "a"; + AssertThrowsAsync(() => command.CreateAzureContainer(InitTaskId, BlobMock, name, accesslevel), + String.Format(Resources.InvalidContainerName, name)); + + name = "&*("; + AssertThrowsAsync(() => command.CreateAzureContainer(InitTaskId, BlobMock, name, accesslevel), + String.Format(Resources.InvalidContainerName, name)); + } + + [TestMethod] + public void CreateContainerForAlreadyExistsContainerTest() + { + AddTestContainers(); + string name = "text"; + BlobContainerPublicAccessType accesslevel = BlobContainerPublicAccessType.Off; + + AssertThrowsAsync(() => command.CreateAzureContainer(InitTaskId, BlobMock, name, accesslevel), + String.Format(Resources.ContainerAlreadyExists, name)); + } + + [TestMethod] + public void CreateContainerSuccessfullyTest() + { + string name = String.Empty; + BlobContainerPublicAccessType accesslevel = BlobContainerPublicAccessType.Off; + + MockCmdRunTime.ResetPipelines(); + name = "test"; + command.Name = name; + RunAsyncCommand(() => command.ExecuteCmdlet()); + AzureStorageContainer container = (AzureStorageContainer)MockCmdRunTime.OutputPipeline.FirstOrDefault(); + Assert.AreEqual("test", container.Name); + + MockCmdRunTime.ResetPipelines(); + AssertThrowsAsync(() => command.CreateAzureContainer(InitTaskId, BlobMock, name, accesslevel), + String.Format(Resources.ContainerAlreadyExists, name)); + } + + [TestMethod] + public void ExcuteCommandNewContainerTest() + { + string name = "containername"; + command.Name = name; + RunAsyncCommand(() => command.ExecuteCmdlet()); + AzureStorageContainer container = (AzureStorageContainer)MockCmdRunTime.OutputPipeline.FirstOrDefault(); + Assert.AreEqual(name, container.Name); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/Cmdlet/RemoveAzureStorageBlobTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/Cmdlet/RemoveAzureStorageBlobTest.cs new file mode 100644 index 000000000000..505e8a058d73 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/Cmdlet/RemoveAzureStorageBlobTest.cs @@ -0,0 +1,213 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// --------------------------------------------------------------------------------- + +using System; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Storage.Blob; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Test.Service; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Blob.Cmdlet +{ + [TestClass] + public class RemoveAzureStorageBlobTest : StorageBlobTestBase + { + public RemoveStorageAzureBlobCommand command = null; + + [TestInitialize] + public void InitCommand() + { + command = new RemoveStorageAzureBlobCommand(BlobMock) + { + CommandRuntime = MockCmdRunTime + }; + CurrentBlobCmd = command; + } + + [TestCleanup] + public void CleanCommand() + { + command = null; + } + + [TestMethod] + public void ValidatePipelineCloudBlobContainerTest() + { + CloudBlobContainer container = null; + AssertThrows(()=>command.ValidatePipelineCloudBlobContainer(container), + String.Format(Resources.ObjectCannotBeNull, typeof(CloudBlobContainer).Name)); + + container = BlobMock.GetContainerReference("t"); + AssertThrows(() => command.ValidatePipelineCloudBlobContainer(container), + String.Format(Resources.InvalidContainerName, "t")); + + AddTestContainers(); + container = BlobMock.GetContainerReference("text"); + command.ValidatePipelineCloudBlobContainer(container); + } + + [TestMethod] + public void ValidatePipelineICloudBlobTest() + { + CloudBlockBlob blockBlob = null; + AssertThrows(() => command.ValidatePipelineICloudBlob(blockBlob), + String.Format(Resources.ObjectCannotBeNull, typeof(ICloudBlob).Name)); + string blobUri = "http://127.0.0.1/account/test/"; + blockBlob = new CloudBlockBlob(new Uri(blobUri)); + AssertThrows(() => command.ValidatePipelineICloudBlob(blockBlob), + String.Format(Resources.InvalidBlobName, blockBlob.Name)); + + AddTestBlobs(); + string container1Uri = "http://127.0.0.1/account/container1/blob0"; + blockBlob = new CloudBlockBlob(new Uri(container1Uri)); + command.ValidatePipelineICloudBlob(blockBlob); + } + + [TestMethod] + public void RemoveAzureBlobByICloudBlobWithInvliadICloudBlob() + { + CloudBlockBlob blockBlob = null; + AssertThrowsAsync(() => command.RemoveAzureBlob(InitTaskId, BlobMock, blockBlob, false), + String.Format(Resources.ObjectCannotBeNull, typeof(ICloudBlob).Name)); + } + + [TestMethod] + public void RemoveAzureBlobByICloudBlobWithNoExistsContainer() + { + CloudBlobContainer container = BlobMock.GetContainerReference("test"); + CloudBlockBlob blockBlob = container.GetBlockBlobReference("blob"); + AssertThrowsAsync(() => command.RemoveAzureBlob(InitTaskId, BlobMock, blockBlob, false), + MockStorageBlobManagement.ContainerNotFound); + } + + [TestMethod] + public void RemoveAzureBlobByICloudBlobWithNoExistsBlobTest() + { + AddTestContainers(); + string blobUri = "http://127.0.0.1/account/test/blob"; + CloudBlockBlob blockBlob = new CloudBlockBlob(new Uri(blobUri)); + AssertThrowsAsync(() => command.RemoveAzureBlob(InitTaskId, BlobMock, blockBlob, false), + MockStorageBlobManagement.BlobNotFound); + } + + [TestMethod] + public void RemoveAzureBlobByICloudBlobSuccessfulyTest() + { + AddTestBlobs(); + string blobUri = "http://127.0.0.1/account/container0/blob0"; + CloudBlockBlob blockBlob = new CloudBlockBlob(new Uri(blobUri)); + AssertThrowsAsync(() => command.RemoveAzureBlob(InitTaskId, BlobMock, blockBlob, false), + MockStorageBlobManagement.BlobNotFound); + blobUri = "http://127.0.0.1/account/container1/blob0"; + blockBlob = new CloudBlockBlob(new Uri(blobUri)); + RunAsyncCommand(() => command.RemoveAzureBlob(InitTaskId, BlobMock, blockBlob, true).Wait()); + + AddTestBlobs(); + RunAsyncCommand(() => command.RemoveAzureBlob(InitTaskId, BlobMock, blockBlob, false).Wait()); + AssertThrowsAsync(() => command.RemoveAzureBlob(InitTaskId, BlobMock, blockBlob, false), + MockStorageBlobManagement.BlobNotFound); + } + + [TestMethod] + public void RemoveAzureBlobByCloudBlobContainerWithInvalidNameTest() + { + CloudBlobContainer container = null; + string blobName = string.Empty; + + AssertThrowsAsync(() => command.RemoveAzureBlob(InitTaskId, BlobMock, container, blobName), + String.Format(Resources.InvalidBlobName, blobName)); + + blobName = "a"; + AssertThrowsAsync(() => command.RemoveAzureBlob(InitTaskId, BlobMock, container, blobName), + String.Format(Resources.ObjectCannotBeNull, typeof(CloudBlobContainer).Name)); + + string containeruri = "http://127.0.0.1/account/t"; + container = new CloudBlobContainer(new Uri(containeruri)); + AssertThrowsAsync(() => command.RemoveAzureBlob(InitTaskId, BlobMock, container, blobName), + String.Format(Resources.InvalidContainerName, container.Name)); + } + + [TestMethod] + public void RemoveAzureBlobByCloudBlobContainerWithNotExistsContianerTest() + { + string blobName = "blob"; + CloudBlobContainer container = BlobMock.GetContainerReference("test"); + AssertThrowsAsync(() => command.RemoveAzureBlob(InitTaskId, BlobMock, container, blobName), + String.Format(Resources.BlobNotFound, blobName, container.Name)); + } + + [TestMethod] + public void RemoveAzureBlobByCloudBlobContainerWithNotExistsBlobTest() + { + AddTestContainers(); + CloudBlobContainer container = BlobMock.GetContainerReference("test"); + string blobName = "test"; + AssertThrowsAsync(() => command.RemoveAzureBlob(InitTaskId, BlobMock, container, blobName), + String.Format(Resources.BlobNotFound, blobName, container.Name)); + } + + [TestMethod] + public void RemoveAzureBlobByCloudBlobContainerSuccessfullyTest() + { + AddTestBlobs(); + CloudBlobContainer container = BlobMock.GetContainerReference("container1"); + string blobName = "blob0"; + RunAsyncCommand(() => command.RemoveAzureBlob(InitTaskId, BlobMock, container, blobName).Wait()); + AssertThrowsAsync(() => command.RemoveAzureBlob(InitTaskId, BlobMock, container, blobName), + String.Format(Resources.BlobNotFound, blobName, "container1")); + } + + [TestMethod] + public void RemoveAzureBlobByNameWithInvalidNameTest() + { + string containerName = string.Empty; + string blobName = string.Empty; + AssertThrowsAsync(() => command.RemoveAzureBlob(InitTaskId, BlobMock, containerName, blobName), + String.Format(Resources.InvalidBlobName, blobName)); + blobName = "abcd"; + AssertThrowsAsync(() => command.RemoveAzureBlob(InitTaskId, BlobMock, containerName, blobName), + String.Format(Resources.InvalidContainerName, containerName)); + } + + [TestMethod] + public void RemoveAzureBlobByNameTest() + { + AddTestBlobs(); + string containerName = "container1"; + string blobName = "blob0"; + RunAsyncCommand(() => command.RemoveAzureBlob(InitTaskId, BlobMock, containerName, blobName).Wait()); + AssertThrowsAsync(() => command.RemoveAzureBlob(InitTaskId, BlobMock, containerName, blobName), + String.Format(Resources.BlobNotFound, blobName, containerName)); + } + + [TestMethod] + public void ExecuteCommandRemoveBlobTest() + { + AddTestBlobs(); + string containerName = "container20"; + string blobName = "blob0"; + command.Container = containerName; + command.Blob = blobName; + RunAsyncCommand(() => command.ExecuteCmdlet()); + string result = (string)MockCmdRunTime.VerboseStream.FirstOrDefault(); + Assert.AreEqual(String.Format(Resources.RemoveBlobSuccessfully, blobName, containerName), result); + RunAsyncCommand(() => command.ExecuteCmdlet()); + Assert.AreEqual(String.Format(Resources.BlobNotFound, blobName, containerName), + MockCmdRunTime.ErrorStream[0].Exception.Message); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/Cmdlet/RemoveAzureStorageContainerTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/Cmdlet/RemoveAzureStorageContainerTest.cs new file mode 100644 index 000000000000..5ecde4549909 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/Cmdlet/RemoveAzureStorageContainerTest.cs @@ -0,0 +1,112 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet; +using Microsoft.WindowsAzure.Commands.Storage.Common; + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Blob +{ + /// + /// unit test for RemoveAzureStorageContainer + /// + [TestClass] + public class RemoveAzureStorageContainerTest : StorageBlobTestBase + { + /// + /// faked remove azure container command + /// + internal RemoveAzureStorageContainerCommand command = null; + + [TestInitialize] + public void InitCommand() + { + command = new RemoveAzureStorageContainerCommand(BlobMock) + { + CommandRuntime = MockCmdRunTime + }; + CurrentBlobCmd = command; + } + + [TestCleanup] + public void CleanCommand() + { + command = null; + } + + [TestMethod] + public void RemoveContainerWithInvalidContainerNameTest() + { + string name = "a*b"; + AssertThrowsAsync(() => command.RemoveAzureContainer(InitTaskId, BlobMock, name), + String.Format(Resources.InvalidContainerName, name)); + } + + [TestMethod] + public void RemoveContainerForNotExistsContainerTest() + { + string name = "test"; + AssertThrowsAsync(() => command.RemoveAzureContainer(InitTaskId, BlobMock, name), + String.Format(Resources.ContainerNotFound, name)); + } + + [TestMethod] + public void RemoveContainerCancelledTest() + { + AddTestContainers(); + + string name = "test"; + MockCmdRunTime.ResetPipelines(); + command.Name = name; + this.Confirmed = false; + RunAsyncCommand(() => command.ExecuteCmdlet()); + string result = (string)MockCmdRunTime.VerboseStream.FirstOrDefault(); + Assert.AreEqual(String.Format(Resources.RemoveContainerCancelled, name), result); + } + + [TestMethod] + public void RemoveContainerSuccessfullyTest() + { + AddTestContainers(); + + string name = "test"; + + MockCmdRunTime.ResetPipelines(); + command.Name = name; + this.Confirmed = true; + RunAsyncCommand(() => command.ExecuteCmdlet()); + string result = (string)MockCmdRunTime.VerboseStream.FirstOrDefault(); + Assert.AreEqual(String.Format(Resources.RemoveContainerSuccessfully, name), result); + + MockCmdRunTime.ResetPipelines(); + name = "text"; + command.Name = name; + command.Force = true; + RunAsyncCommand(() => command.ExecuteCmdlet()); + result = (string)MockCmdRunTime.VerboseStream.FirstOrDefault(); + Assert.AreEqual(String.Format(Resources.RemoveContainerSuccessfully, name), result); + } + + [TestMethod] + public void ExecuteCommandRemoveContainer() + { + string name = "test"; + command.Name = name; + RunAsyncCommand(() => command.ExecuteCmdlet()); + Assert.AreEqual(String.Format(Resources.ContainerNotFound, name), MockCmdRunTime.ErrorStream[0].Exception.Message); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/Cmdlet/SetAzureStorageBlobContentTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/Cmdlet/SetAzureStorageBlobContentTest.cs new file mode 100644 index 000000000000..9dd0f285269a --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/Cmdlet/SetAzureStorageBlobContentTest.cs @@ -0,0 +1,271 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// --------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Blob.Cmdlet +{ + using System; + using System.Linq; + using System.Management.Automation; + using Microsoft.VisualStudio.TestTools.UnitTesting; + using Commands.Test.Utilities.Common; + using Microsoft.WindowsAzure.Storage.Blob; + using Model.Contract; + using Model.ResourceModel; + using Storage.Blob; + using Storage.Common; + + [TestClass] + public class SetAzureBlobContentTest : StorageBlobTestBase + { + internal FakeSetAzureBlobContentCommand command = null; + + [TestInitialize] + public void InitCommand() + { + command = new FakeSetAzureBlobContentCommand(BlobMock) + { + CommandRuntime = new MockCommandRuntime() + }; + } + + [TestCleanup] + public void CleanCommand() + { + command = null; + } + + [TestMethod] + public void OnStartTest() + { + ProgressRecord pr = null; + command.OnTaskStart(pr); + pr = new ProgressRecord(0, "a", "b"); + pr.PercentComplete = 10; + command.OnTaskStart(pr); + Assert.AreEqual(0, pr.PercentComplete); + } + + [TestMethod] + public void OnProgressTest() + { + ProgressRecord pr = null; + command.OnTaskProgress(pr, 0.0, 0.0); + pr = new ProgressRecord(0, "a", "b"); + pr.PercentComplete = 10; + command.OnTaskProgress(pr, 5.6, 12.3); + Assert.AreEqual(12, pr.PercentComplete); + command.OnTaskProgress(pr, 5.6, 12.8); + Assert.AreEqual(12, pr.PercentComplete); + command.OnTaskProgress(pr, 5.6, 11); + Assert.AreEqual(11, pr.PercentComplete); + command.OnTaskProgress(pr, 5.6, 12.8); + Assert.AreEqual(12, pr.PercentComplete); + command.OnTaskProgress(pr, 5.6, 5); + Assert.AreEqual(5, pr.PercentComplete); + } + + [TestMethod] + public void OnFinishTest() + { + ProgressRecord pr = null; + ArgumentException e = new ArgumentException("test"); + command.OnTaskFinish(pr, null); + pr = new ProgressRecord(0, "a", "b"); + command.OnTaskFinish(pr, null); + Assert.AreEqual(100, pr.PercentComplete); + Assert.AreEqual(String.Format(Resources.TransmitSuccessfully), pr.StatusDescription); + command.OnTaskFinish(pr, e); + Assert.AreEqual(100, pr.PercentComplete); + Assert.AreEqual(String.Format(Resources.TransmitFailed, e.Message), pr.StatusDescription); + } + + [TestMethod] + public void GetFullSendFilePathTest() + { + string fileName = ""; + AssertThrows(()=>command.GetFullSendFilePath(fileName)); + fileName = @"c:\Windows\System32"; + Assert.IsTrue(String.IsNullOrEmpty(command.GetFullSendFilePath(fileName))); + fileName = @"c:\WindowsXXXXX\System32XX\xxxxx"; + AssertThrows(() => command.GetFullSendFilePath(fileName), + String.Format(Resources.FileNotFound, fileName)); + } + + [TestMethod] + public void SetAzureBlobContentByNameTest() + { + string fileName = string.Empty; + string containerName = string.Empty; + string blobName = string.Empty; + AssertThrows(() => command.SetAzureBlobContent(fileName, containerName, blobName)); + fileName = @"abcxx\xxxxabc"; + AssertThrows(() => command.SetAzureBlobContent(fileName, containerName, blobName)); + fileName = @"c:\Windows\System32\cmd.exe"; + AssertThrows(() => command.SetAzureBlobContent(fileName, containerName, blobName), + String.Format(Resources.InvalidContainerName, containerName)); + containerName = "test"; + AssertThrows(() => command.SetAzureBlobContent(fileName, containerName, blobName), + String.Format(Resources.ContainerNotFound, containerName)); + AddTestContainers(); + command.SetAzureBlobContent(fileName, containerName, blobName); + } + + [TestMethod] + public void SetAzureBlobContentByContianerTest() + { + string fileName = string.Empty; + string containerName = string.Empty; + string blobName = string.Empty; + CloudBlobContainer container = null; + AssertThrows(() => command.SetAzureBlobContent(fileName, container, blobName)); + fileName = @"c:\Windows\System32\cmd.exe"; + container = BlobMock.GetContainerReference(containerName); + AssertThrows(() => command.SetAzureBlobContent(fileName, container, blobName), + String.Format(Resources.InvalidContainerName, container.Name)); + AddTestContainers(); + container = BlobMock.GetContainerReference("test"); + command.SetAzureBlobContent(fileName, container, blobName); + command.BlobType = "page"; + command.SetAzureBlobContent(fileName, container, blobName); + } + + [TestMethod] + public void Upload2BlobTest() + { + command.Upload2Blob(string.Empty, null); + } + + [TestMethod] + public void SetAzureBlobContentByContainerWithDirectoryTest() + { + string fileName = "."; + ICloudBlob blob = null; + Assert.IsNull(command.SetAzureBlobContent(fileName, blob, false)); + } + + [TestMethod] + public void SetAzureBlobContentByContainerWithInvalidICloudBlobTest() + { + ICloudBlob blob = null; + string fileName = @"c:\Windows\System32\cmd.exe"; + AssertThrows(() => command.SetAzureBlobContent(fileName, blob, false), + String.Format(Resources.ObjectCannotBeNull, typeof(ICloudBlob).Name)); + } + + [TestMethod] + public void SetAzureBlobContentByContainerWithInvalidNameTest() + { + ICloudBlob blob = null; + string fileName = @"c:\Windows\System32\cmd.exe"; + string bloburi = "http://127.0.0.1/account/test/"; + blob = new CloudPageBlob(new Uri(bloburi)); + AssertThrows(() => command.SetAzureBlobContent(fileName, blob, false), + String.Format(Resources.InvalidBlobName, blob.Name)); + } + + [TestMethod] + public void SetAzureBlobContentByContainerWithNotExistsContainerTest() + { + string fileName = @"c:\Windows\System32\cmd.exe"; + CloudBlobContainer container = BlobMock.GetContainerReference("test"); + CloudPageBlob blob = container.GetPageBlobReference("blob8"); + AssertThrows(() => command.SetAzureBlobContent(fileName, blob, false), + String.Format(Resources.ContainerNotFound, "test")); + } + + [TestMethod] + public void SetAzureBlobContentByContainerWithMismatchBlobTypeTest() + { + AddTestBlobs(); + string bloburi = "http://127.0.0.1/account/container20/blob8"; + CloudPageBlob blob = new CloudPageBlob(new Uri(bloburi)); + string fileName = @"c:\Windows\System32\cmd.exe"; + AssertThrows(() => command.SetAzureBlobContent(fileName, blob, false), + String.Format(Resources.BlobTypeMismatch, blob.Name, BlobType.BlockBlob)); + } + + [TestMethod] + public void SetAzureBlobContentByContainerWithoutConfirmationTest() + { + AddTestBlobs(); + + string fileName = @"c:\Windows\System32\cmd.exe"; + string bloburi = "http://127.0.0.1/account/container20/blob9"; + ICloudBlob blob = new CloudBlockBlob(new Uri(bloburi)); + AzureStorageBlob azureBlob = command.SetAzureBlobContent(fileName, blob, false); + Assert.IsNull(azureBlob); + } + + [TestMethod] + public void SetAzureBlobContentByContainerSuccessfullyTest() + { + AddTestBlobs(); + + string fileName = @"c:\Windows\System32\cmd.exe"; + string bloburi = "http://127.0.0.1/account/container20/blob9"; + ICloudBlob blob = new CloudBlockBlob(new Uri(bloburi)); + command.Confirm = true; + AzureStorageBlob azureBlob = command.SetAzureBlobContent(fileName, blob, false); + + Assert.AreEqual("blob9", azureBlob.Name); + + command.Force = true; + azureBlob = command.SetAzureBlobContent(fileName, blob, false); + Assert.AreEqual("blob9", azureBlob.Name); + } + + [TestMethod] + public void ExecuteCommandSetBlobContentTest() + { + AddTestContainers(); + string fileName = @"c:\Windows\System32\cmd.exe"; + string containerName = "test"; + string blobName = ""; + command.File = fileName; + command.Container = containerName; + command.Blob = blobName; + command.ExecuteCmdlet(); + AzureStorageBlob azureblob = (AzureStorageBlob)((MockCommandRuntime)command.CommandRuntime).OutputPipeline.FirstOrDefault(); + Assert.AreEqual("cmd.exe", azureblob.Name); + } + } + + internal class FakeSetAzureBlobContentCommand : SetAzureBlobContentCommand + { + public bool Exception = false; + public bool Confirm = false; + + public FakeSetAzureBlobContentCommand(IStorageBlobManagement channel) + { + Channel = channel; + } + + internal override bool ConfirmOverwrite(string tips = null) + { + return Confirm; + } + + internal override void Upload2Blob(string filePath, ICloudBlob blob) + { + ProgressRecord pr = new ProgressRecord(0, "a", "b"); + OnTaskStart(pr); + OnTaskProgress(pr, 1, 10.5); + OnTaskFinish(pr, null); + if (Exception) + { + throw new ArgumentException("FakeSetAzureBlobContentCommand"); + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/Cmdlet/SetAzureStorageContainerAclTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/Cmdlet/SetAzureStorageContainerAclTest.cs new file mode 100644 index 000000000000..db23b0c84449 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/Cmdlet/SetAzureStorageContainerAclTest.cs @@ -0,0 +1,120 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Storage.Cmdlet; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Blob +{ + /// + /// unit test for SetAzureStorageContainer + /// + [TestClass] + public class SetAzureStorageContainerAclTest : StorageBlobTestBase + { + public SetAzureStorageContainerAclCommand command = null; + + [TestInitialize] + public void InitCommand() + { + command = new SetAzureStorageContainerAclCommand(BlobMock) + { + CommandRuntime = MockCmdRunTime + }; + CurrentBlobCmd = command; + } + + [TestCleanup] + public void CleanCommand() + { + command = null; + } + + [TestMethod] + public void SetContainerAclWithInvalidContainerNameTest() + { + string name = "a"; + BlobContainerPublicAccessType accessLevel = BlobContainerPublicAccessType.Off; + AssertThrowsAsync(() => command.SetContainerAcl(InitTaskId, BlobMock, name, accessLevel), String.Format(Resources.InvalidContainerName, name)); + } + + [TestMethod] + public void SetContainerAclForNotExistContainer() + { + string name = "test"; + BlobContainerPublicAccessType accessLevel = BlobContainerPublicAccessType.Off; + AssertThrowsAsync(() => command.SetContainerAcl(InitTaskId, BlobMock, name, accessLevel), String.Format(Resources.ContainerNotFound, name)); + } + + [TestMethod] + public void SetContainerAclSucessfullyTest() + { + AddTestContainers(); + command.PassThru = true; + + string name = "test"; + BlobContainerPublicAccessType accessLevel = BlobContainerPublicAccessType.Off; + + MockCmdRunTime.ResetPipelines(); + command.Name = name; + RunAsyncCommand(() => command.ExecuteCmdlet()); + AzureStorageContainer container = (AzureStorageContainer)MockCmdRunTime.OutputPipeline.FirstOrDefault(); + Assert.AreEqual(BlobContainerPublicAccessType.Off, container.PublicAccess); + + MockCmdRunTime.ResetPipelines(); + name = "publicoff"; + accessLevel = BlobContainerPublicAccessType.Blob; + command.Name = name; + command.Permission = accessLevel; + RunAsyncCommand(() => command.ExecuteCmdlet()); + container = (AzureStorageContainer)MockCmdRunTime.OutputPipeline.FirstOrDefault(); + Assert.AreEqual(BlobContainerPublicAccessType.Blob, container.PublicAccess); + + MockCmdRunTime.ResetPipelines(); + name = "publicblob"; + accessLevel = BlobContainerPublicAccessType.Container; + command.Name = name; + command.Permission = accessLevel; + RunAsyncCommand(() => command.ExecuteCmdlet()); + container = (AzureStorageContainer)MockCmdRunTime.OutputPipeline.FirstOrDefault(); + Assert.AreEqual(BlobContainerPublicAccessType.Container, container.PublicAccess); + + MockCmdRunTime.ResetPipelines(); + name = "publiccontainer"; + accessLevel = BlobContainerPublicAccessType.Off; + command.Name = name; + command.Permission = accessLevel; + RunAsyncCommand(() => command.ExecuteCmdlet()); + container = (AzureStorageContainer)MockCmdRunTime.OutputPipeline.FirstOrDefault(); + Assert.AreEqual(BlobContainerPublicAccessType.Off, container.PublicAccess); + } + + [TestMethod] + public void ExecuteCommandSetContainerAclTest() + { + AddTestContainers(); + command.Name = "publicblob"; + command.Permission = BlobContainerPublicAccessType.Container; + command.PassThru = true; + RunAsyncCommand(() => command.ExecuteCmdlet()); + AzureStorageContainer container = (AzureStorageContainer)MockCmdRunTime.OutputPipeline.FirstOrDefault(); + Assert.AreEqual(BlobContainerPublicAccessType.Container, container.PublicAccess); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/StorageBlobTestBase.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/StorageBlobTestBase.cs new file mode 100644 index 000000000000..6e631d36e44d --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/StorageBlobTestBase.cs @@ -0,0 +1,172 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Storage.Test.Service; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Blob +{ + /// + /// Test base class for storage blob + /// + [TestClass] + public class StorageBlobTestBase : StorageTestBase + { + /// + /// Init task id + /// + public static long InitTaskId = 0; + + /// + /// Current blob command + /// + protected StorageCloudBlobCmdletBase CurrentBlobCmd { get; set; } + + protected bool Confirmed = true; + + protected bool ConfirmWriter(string msg1, string msg2, string msg3) + { + return Confirmed; + } + + /// + /// Mock blob management + /// + public MockStorageBlobManagement BlobMock + { + get; + set; + } + + [TestInitialize] + public void InitMock() + { + BlobMock = new MockStorageBlobManagement(); + MockCmdRunTime = new MockCommandRuntime(); + ProfileClient.DataStore = new MockDataStore(); + } + + [TestCleanup] + public void CleanMock() + { + BlobMock = null; + } + + /// + /// Clean all the test data + /// + private void CleanTestData() + { + BlobMock.ContainerList.Clear(); + BlobMock.ContainerPermissions.Clear(); + BlobMock.ContainerBlobs.Clear(); + } + + /// + /// Add test containers + /// + public void AddTestContainers() + { + CleanTestData(); + string testUri = "http://127.0.0.1/account/test"; + string textUri = "http://127.0.0.1/account/text"; + string publicOffUri = "http://127.0.0.1/account/publicoff"; + string publicBlobUri = "http://127.0.0.1/account/publicblob"; + string publicContainerUri = "http://127.0.0.1/account/publiccontainer"; + BlobMock.ContainerList.Add(new CloudBlobContainer(new Uri(testUri))); + BlobMock.ContainerList.Add(new CloudBlobContainer(new Uri(textUri))); + BlobMock.ContainerList.Add(new CloudBlobContainer(new Uri(publicOffUri))); + BlobMock.ContainerList.Add(new CloudBlobContainer(new Uri(publicBlobUri))); + BlobMock.ContainerList.Add(new CloudBlobContainer(new Uri(publicContainerUri))); + + BlobContainerPermissions publicOff = new BlobContainerPermissions(); + publicOff.PublicAccess = BlobContainerPublicAccessType.Off; + BlobMock.ContainerPermissions.Add("publicoff", publicOff); + BlobContainerPermissions publicBlob = new BlobContainerPermissions(); + publicBlob.PublicAccess = BlobContainerPublicAccessType.Blob; + BlobMock.ContainerPermissions.Add("publicblob", publicBlob); + BlobContainerPermissions publicContainer = new BlobContainerPermissions(); + publicContainer.PublicAccess = BlobContainerPublicAccessType.Container; + BlobMock.ContainerPermissions.Add("publiccontainer", publicContainer); + } + + /// + /// Add test blobs + /// + public void AddTestBlobs() + { + CleanTestData(); + string container0Uri = "http://127.0.0.1/account/container0"; + string container1Uri = "http://127.0.0.1/account/container1"; + string container20Uri = "http://127.0.0.1/account/container20"; + BlobMock.ContainerList.Add(new CloudBlobContainer(new Uri(container0Uri))); + AddContainerBlobs("container0", 0); + BlobMock.ContainerList.Add(new CloudBlobContainer(new Uri(container1Uri))); + AddContainerBlobs("container1", 1); + BlobMock.ContainerList.Add(new CloudBlobContainer(new Uri(container20Uri))); + AddContainerBlobs("container20", 20); + } + + /// + /// Add some blobs into a container + /// + /// Container name + /// How many blobs need to be added to the container + private void AddContainerBlobs(string containerName, int count) + { + List blobList = null; + + if (BlobMock.ContainerBlobs.ContainsKey(containerName)) + { + blobList = BlobMock.ContainerBlobs[containerName]; + blobList.Clear(); + } + else + { + blobList = new List(); + BlobMock.ContainerBlobs.Add(containerName, blobList); + } + + string prefix = "blob"; + string uri = string.Empty; + string endPoint = "http://127.0.0.1/account"; + + for(int i = 0; i < count; i++) + { + uri = string.Format("{0}/{1}/{2}{3}", endPoint, containerName, prefix, i); + CloudBlockBlob blob = new CloudBlockBlob(new Uri(uri)); + blobList.Add(blob); + } + } + + /// + /// Run async command + /// + /// Storage command + /// Async action + protected void RunAsyncCommand(Action asyncAction) + { + MockCmdRunTime.ResetPipelines(); + CurrentBlobCmd.SetUpMultiThreadEnvironment(); + CurrentBlobCmd.OutputStream.ConfirmWriter = ConfirmWriter; + asyncAction(); + CurrentBlobCmd.MultiThreadEndProcessing(); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/StorageCloudBlobCmdletBaseTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/StorageCloudBlobCmdletBaseTest.cs new file mode 100644 index 000000000000..4a7d84c48325 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Blob/StorageCloudBlobCmdletBaseTest.cs @@ -0,0 +1,92 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Blob +{ + [TestClass] + public class StorageCloudBlobCmdletBaseTest : StorageBlobTestBase + { + /// + /// StorageCloudBlobCmdletBase command + /// + public StorageCloudBlobCmdletBase command = null; + + [TestInitialize] + public void InitCommand() + { + command = new StorageCloudBlobCmdletBase(BlobMock) + { + Context = new AzureStorageContext(CloudStorageAccount.DevelopmentStorageAccount), + CommandRuntime = MockCmdRunTime + }; + } + + [TestCleanup] + public void CleanCommand() + { + command = null; + } + + [TestMethod] + public void ValidatePipelineICloudBlobWithNullTest() + { + AssertThrows(() => command.ValidatePipelineICloudBlob(null), String.Format(Resources.ObjectCannotBeNull, typeof(ICloudBlob).Name)); + } + + [TestMethod] + public void ValidatePipelineICloudBlobWithInvalidBlobNameTest() + { + CloudBlockBlob blob = new CloudBlockBlob(new Uri("http://127.0.0.1/account/container/")); + AssertThrows(() => command.ValidatePipelineICloudBlob(blob), String.Format(Resources.InvalidBlobName, blob.Name)); + } + + [TestMethod] + public void ValidatePipelineICloudBlobSuccessfullyTest() + { + AddTestBlobs(); + + CloudBlockBlob blob = new CloudBlockBlob(new Uri("http://127.0.0.1/account/container1/blob0")); + command.ValidatePipelineICloudBlob(blob); + } + + [TestMethod] + public void ValidatePipelineCloudBlobContainerWithNullObjectTest() + { + AssertThrows(() => command.ValidatePipelineCloudBlobContainer(null), String.Format(Resources.ObjectCannotBeNull, typeof(CloudBlobContainer).Name)); + } + + [TestMethod] + public void ValidatePipelineCloudBlobContainerWithInvalidNameTest() + { + string uri = "http://127.0.0.1/account/t"; + CloudBlobContainer container = new CloudBlobContainer(new Uri(uri)); + AssertThrows(() => command.ValidatePipelineCloudBlobContainer(container), String.Format(Resources.InvalidContainerName, container.Name)); + } + + [TestMethod] + public void ValidatePipelineCloudBlobContainerSuccessfullyTest() + { + AddTestContainers(); + string testUri = "http://127.0.0.1/account/test"; + CloudBlobContainer container = new CloudBlobContainer(new Uri(testUri)); + command.ValidatePipelineCloudBlobContainer(container); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Commands.Storage.Test.csproj b/src/ServiceManagement/Storage/Commands.Storage.Test/Commands.Storage.Test.csproj new file mode 100644 index 000000000000..86a42117de77 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Commands.Storage.Test.csproj @@ -0,0 +1,234 @@ + + + + Debug + AnyCPU + {D6F470A6-7395-4B8B-9D29-44DF0EC8F624} + Library + Properties + Microsoft.WindowsAzure.Management.Storage.Test + Microsoft.WindowsAzure.Commands.Storage.Test + v4.5 + 512 + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages + False + UnitTest + + true + ..\..\..\ + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + false + + + bin\Release\ + TRACE;SIGN + true + pdbonly + AnyCPU + prompt + false + + + true + MSSharedLibKey.snk + true + true + false + + + + ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll + + + ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll + + + ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll + + + False + ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll + + + False + ..\..\..\lib\Microsoft.WindowsAzure.Storage.DataMovement.dll + + + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + + + + + + False + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {3b48a77b-5956-4a62-9081-92ba04b02b27} + Commands.Common.Test + + + {08cf7da7-0392-4a19-b79b-e1ff67cdb81a} + Commands.Storage + + + {65c3a86a-716d-4e7d-ab67-1db00b3bf72d} + Commands.Common.Storage + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + + + + + + + + + False + + + False + + + False + + + False + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Common/Cmdlet/NewAzureStorageContextTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Common/Cmdlet/NewAzureStorageContextTest.cs new file mode 100644 index 000000000000..60e9341ffcd6 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Common/Cmdlet/NewAzureStorageContextTest.cs @@ -0,0 +1,121 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Common.Cmdlet; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Auth; + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Common.Cmdlet +{ + [TestClass] + public class NewAzureStorageContextTest : StorageTestBase + { + /// + /// StorageCmdletBase command + /// + public NewAzureStorageContext command = null; + + [TestInitialize] + public void InitCommand() + { + command = new NewAzureStorageContext + { + CommandRuntime = new MockCommandRuntime() + }; + } + + [TestCleanup] + public void CleanCommand() + { + command = null; + } + + [TestMethod] + public void GetStorageAccountByNameAndKeyTest() + { + AssertThrows(()=>command.GetStorageAccountByNameAndKey("a", "key", false)); + command.GetStorageAccountByNameAndKey("a", "Xg+4nFQ832QfisuH/CkQwdQUmlqrZebQTJWpAQZ6klWjTVsIBVZy5xNdCDje4EWP0gdWK8vIFAX8LOmz85Wmcg==", false); + } + + [TestMethod] + public void GetStorageAccountBySasTokenTest() + { + command.GetStorageAccountBySasToken("a", "?st=d", true); + AssertThrows(()=>command.GetStorageAccountBySasToken("a", string.Empty, false)); + AssertThrows(() => command.GetStorageAccountBySasToken("a", "token", false)); + } + + [TestMethod] + public void GetStorageAccountByConnectionStringTest() + { + AssertThrows(() => command.GetStorageAccountByConnectionString(String.Empty)); + AssertThrows(() => command.GetStorageAccountByConnectionString("connection string")); + + Assert.IsNotNull(command.GetStorageAccountByConnectionString("UseDevelopmentStorage=true;DevelopmentStorageProxyUri=http://myProxyUri")); + } + + [TestMethod] + public void GetLocalDevelopmentStorageAccountTest() + { + Assert.IsNotNull(command.GetLocalDevelopmentStorageAccount()); + } + + [TestMethod] + public void GetAnonymousStorageAccountTest() + { + Assert.IsNotNull(command.GetAnonymousStorageAccount("a", false)); + } + + [TestMethod] + public void GetStorageAccountWithEndPointTest() + { + string name = string.Empty; + StorageCredentials credential = new StorageCredentials(); + AssertThrows(() => command.GetStorageAccountWithEndPoint(credential, name, false), String.Format(Resources.ObjectCannotBeNull, StorageNouns.StorageAccountName)); + + name = "test"; + Assert.IsNotNull(command.GetStorageAccountWithEndPoint(credential, name, false)); + } + + [TestMethod] + public void ExecuteNewAzureStorageContextCmdlet() + { + AssertThrows(() => command.ExecuteCmdlet(), Resources.DefaultStorageCredentialsNotFound); + } + + [TestMethod] + public void GetDefaultEndPointDomainTest() + { + Assert.AreEqual(command.GetDefaultEndPointDomain(), Resources.DefaultStorageEndPointDomain); + } + + [TestMethod] + public void GetStorageAccountByConnectionStringAndSasToken() + { + string sasToken = "?st=2013-09-03T04%3A12%3A15Z&se=2013-09-03T05%3A12%3A15Z&sr=c&sp=r&sig=fN2NPxLK99tR2%2BWnk48L3lMjutEj7nOwBo7MXs2hEV8%3D"; + string endpoint = "http://storageaccountname.blob.core.windows.net"; + string connectionString = String.Format("BlobEndpoint={0};QueueEndpoint={0};TableEndpoint={0};SharedAccessSignature={1}", endpoint, sasToken); + CloudStorageAccount account = command.GetStorageAccountByConnectionString(connectionString); + AzureStorageContext context = new AzureStorageContext(account); + connectionString = String.Format("BlobEndpoint={0};SharedAccessSignature={1}", endpoint, sasToken); + account = command.GetStorageAccountByConnectionString(connectionString); + context = new AzureStorageContext(account); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Common/Cmdlet/SetAzureStorageServiceHourMetricsTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Common/Cmdlet/SetAzureStorageServiceHourMetricsTest.cs new file mode 100644 index 000000000000..f23d74fe9426 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Common/Cmdlet/SetAzureStorageServiceHourMetricsTest.cs @@ -0,0 +1,55 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Storage.Common.Cmdlet; +using Microsoft.WindowsAzure.Storage.Shared.Protocol; + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Common.Cmdlet +{ + [TestClass] + public class SetAzureStorageServiceHourMetricsTest : StorageTestBase + { + /// + /// StorageCmdletBase command + /// + public SetAzureStorageServiceMetricsCommand command = null; + + [TestInitialize] + public void InitCommand() + { + command = new SetAzureStorageServiceMetricsCommand + { + CommandRuntime = new MockCommandRuntime() + }; + } + + [TestCleanup] + public void CleanCommand() + { + command = null; + } + + [TestMethod] + public void GetMetricsLevelTest() + { + Assert.AreEqual(MetricsLevel.None, command.GetMetricsLevel("none")); + Assert.AreEqual(MetricsLevel.Service, command.GetMetricsLevel("Service")); + Assert.AreEqual(MetricsLevel.ServiceAndApi, command.GetMetricsLevel("ServiceAndApi")); + AssertThrows(() => command.GetMetricsLevel("stdio")); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Common/Cmdlet/SetAzureStorageServiceLoggingTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Common/Cmdlet/SetAzureStorageServiceLoggingTest.cs new file mode 100644 index 000000000000..cd3b2c86e33e --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Common/Cmdlet/SetAzureStorageServiceLoggingTest.cs @@ -0,0 +1,64 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Storage.Common.Cmdlet; +using Microsoft.WindowsAzure.Storage.Shared.Protocol; + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Common.Cmdlet +{ + [TestClass] + public class SetAzureStorageServiceLoggingTest : StorageTestBase + { + /// + /// StorageCmdletBase command + /// + public SetAzureStorageServiceLoggingCommand command = null; + + [TestInitialize] + public void InitCommand() + { + command = new SetAzureStorageServiceLoggingCommand + { + CommandRuntime = new MockCommandRuntime() + }; + } + + [TestCleanup] + public void CleanCommand() + { + command = null; + } + + [TestMethod] + public void GetLoggingOperationsTest() + { + Assert.AreEqual(LoggingOperations.None, command.GetLoggingOperations("none")); + Assert.AreEqual(LoggingOperations.All, command.GetLoggingOperations("all")); + Assert.AreEqual(LoggingOperations.Read, command.GetLoggingOperations("Read")); + Assert.AreEqual(LoggingOperations.Write, command.GetLoggingOperations("WrIte")); + Assert.AreEqual(LoggingOperations.Delete, command.GetLoggingOperations("DELETE")); + Assert.AreEqual(LoggingOperations.Read | LoggingOperations.Delete, + command.GetLoggingOperations("Read, DELETE")); + AssertThrows(() => command.GetLoggingOperations("DELETE,xxx")); + AssertThrows(() => command.GetLoggingOperations("DELETE,all")); + AssertThrows(() => command.GetLoggingOperations("DELETE,none")); + AssertThrows(() => command.GetLoggingOperations("all,none")); + AssertThrows(() => command.GetLoggingOperations("allnone")); + AssertThrows(() => command.GetLoggingOperations("stdio")); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Common/CmdletOperationContextTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Common/CmdletOperationContextTest.cs new file mode 100644 index 000000000000..ebedd72a058e --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Common/CmdletOperationContextTest.cs @@ -0,0 +1,63 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Threading; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Storage.Common; + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Common +{ + /// + /// unit test for operation context + /// + [TestClass] + public class CmdletOperationContextTest : StorageTestBase + { + [TestMethod] + public void InitTest() + { + CmdletOperationContext.Init(); + Assert.IsNotNull(CmdletOperationContext.StartTime); + Assert.IsNotNull(CmdletOperationContext.ClientRequestId); + } + + [TestMethod] + public void GetClientRequestIDTest() + { + string id = CmdletOperationContext.GenClientRequestID(); + Assert.IsNotNull(id); + } + + [TestMethod] + public void GetRunningMillisecondsTest() + { + CmdletOperationContext.Init(); + double msTime = CmdletOperationContext.GetRunningMilliseconds(); + Assert.IsTrue(msTime >= 0); + } + + [TestMethod] + public void CmdletOperationContextInitTwiceTest() + { + CmdletOperationContext.Init(); + DateTime snapshotTime = CmdletOperationContext.StartTime; + int sleepInterval = 1 * 1000; + Thread.Sleep(sleepInterval); + CmdletOperationContext.Init(); + DateTime snapshotTime2 = CmdletOperationContext.StartTime; + Assert.AreEqual(snapshotTime, snapshotTime2, "The start time should be equal after many times init"); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Common/CommunicationExceptionUtilTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Common/CommunicationExceptionUtilTest.cs new file mode 100644 index 000000000000..0bcd3a538fdd --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Common/CommunicationExceptionUtilTest.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.ServiceModel; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Storage.Common; + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Common +{ + /// + /// unit test for communication exception util + /// + [TestClass] + public class CommunicationExceptionUtilTest : StorageTestBase + { + [TestMethod] + public void IsNotFoundExceptionTest() + { + string message = "CommunicationExceptionUtilTest"; + CommunicationException exception = new CommunicationException(message); + Assert.IsFalse(exception.IsNotFoundException()); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Common/FileNamingGenerator.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Common/FileNamingGenerator.cs new file mode 100644 index 000000000000..5e5279f02569 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Common/FileNamingGenerator.cs @@ -0,0 +1,163 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Microsoft.WindowsAzure.Management.Storage.Test.Common +{ + /// + /// Provides utilities to generate different names for file service. + /// + internal static class FileNamingGenerator + { + public const int MaxShareNameLength = 63; + + public const int MaxFileNameLength = 255; + + public const int MaxPathLength = 1024; + + public const int MinShareNameLength = 3; + + private const char Dash = '-'; + + private const double DashRate = 0.2; + + private static readonly Tuple ValidASCIIRange = new Tuple(0x0020, 0x07E); + + private static readonly char[] InvalidFileNameCharacters = new char[] { '\\', '/', ':', '|', '<', '>', '*', '?', '"' }; + + private static readonly char[] ValidShareNameCharactersExceptDash = + Enumerable.Range(0, 26).Select(x => (char)('a' + x)).Concat( + Enumerable.Range(0, 10).Select(x => (char)('0' + x))).ToArray(); + + public static string GenerateValidASCIIName(int length) + { + return GenerateNameFromRange(length, ValidASCIIRange); + } + + public static string GenerateValidShareName(int length) + { + return GenerateShareNameInternal(length); + } + + public static string GenerateInvalidShareName_DoubleDash(int length) + { + return GenerateShareNameInternal(length, ensureDoubleDash: true); + } + + public static string GenerateInvalidShareName_StartsWithDash(int length) + { + return GenerateShareNameInternal(length, startsWithDash: true); + } + + public static string GenerateInvalidShareName_EndsWithDash(int length) + { + return GenerateShareNameInternal(length, endsWithDash: true); + } + + public static string GenerateInvalidShareName_UpperCase(int length) + { + return GenerateShareNameInternal(length, ensureUpperCase: true); + } + + public static string GenerateNameFromRange(int length, Tuple range) + { + Random r = new Random(); + StringBuilder sb = new StringBuilder(length); + for (int i = 0; i < length; i++) + { + char ch; + do + { + ch = Convert.ToChar(r.Next(range.Item1, range.Item2)); + } + while (InvalidFileNameCharacters.Contains(ch)); + sb.Append(ch); + } + + return sb.ToString(); + } + + private static string GenerateShareNameInternal(int length, bool ensureDoubleDash = false, bool startsWithDash = false, bool endsWithDash = false, bool ensureUpperCase = false) + { + Random r = new Random(); + StringBuilder sb = new StringBuilder(length); + + if (startsWithDash) + { + sb.Append(Dash); + } + else + { + sb.Append(ValidShareNameCharactersExceptDash[r.Next(ValidShareNameCharactersExceptDash.Length)]); + } + + bool lastIsDash = false; + bool doubleDashEnsured = false; + for (int i = 0; i < length - 2; i++) + { + if (ensureDoubleDash && lastIsDash) + { + sb.Append(Dash); + doubleDashEnsured = true; + } + if (!lastIsDash && r.NextDouble() < DashRate) + { + sb.Append(Dash); + lastIsDash = true; + } + else + { + sb.Append(ValidShareNameCharactersExceptDash[r.Next(ValidShareNameCharactersExceptDash.Length)]); + } + } + + if (endsWithDash) + { + sb.Append(Dash); + } + else + { + sb.Append(ValidShareNameCharactersExceptDash[r.Next(ValidShareNameCharactersExceptDash.Length)]); + } + + if (ensureDoubleDash && !doubleDashEnsured) + { + int pos = r.Next(1, length - 2); + sb[pos] = Dash; + sb[pos + 1] = Dash; + } + + if (ensureUpperCase) + { + var allLettersPosition = new List(sb.Length); + for (int i = 0; i < sb.Length; i++) + { + if (sb[i] >= 'a' && sb[i] <= 'z') + { + allLettersPosition.Add(i); + } + } + + int index = allLettersPosition[r.Next(allLettersPosition.Count)]; + sb[index] = Char.ToUpperInvariant(sb[index]); + } + + return sb.ToString(); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Common/IStorageManagement.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Common/IStorageManagement.cs new file mode 100644 index 000000000000..ed15317d3ce6 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Common/IStorageManagement.cs @@ -0,0 +1,25 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Common +{ + + /// + /// storage management interface for all cmdlet that works without cloud + /// + public interface IStorageManagement + { + //This is a place holder for the unit tests of StorageCloudCmdletBase + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Common/MockTransferJobRunner.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Common/MockTransferJobRunner.cs new file mode 100644 index 000000000000..d9f43c4fd6ad --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Common/MockTransferJobRunner.cs @@ -0,0 +1,60 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Storage.DataMovement.TransferJobs; + +namespace Microsoft.WindowsAzure.Management.Storage.Test.Common +{ + internal sealed class MockTransferJobRunner : ITransferJobRunner + { + private Func runnerValidation; + + private AssertFailedException assertException; + + public MockTransferJobRunner(Func runnerValidation) + { + this.runnerValidation = runnerValidation; + } + + public Task RunTransferJob(TransferJobBase job, Action progressReport, CancellationToken cancellationToken) + { + try + { + return runnerValidation(job); + } + catch (AssertFailedException e) + { + this.assertException = e; + throw new MockupException("AssertFailed"); + } + } + + public void ThrowAssertExceptionIfAvailable() + { + if (this.assertException != null) + { + throw this.assertException; + } + } + + public void Dispose() + { + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Common/MockupException.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Common/MockupException.cs new file mode 100644 index 000000000000..845e13f4cf52 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Common/MockupException.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Management.Storage.Test.Common +{ + internal class MockupException : Exception + { + public MockupException(string errorId) + { + this.ErrorId = errorId; + } + + public string ErrorId { get; private set; } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Common/NameUtilTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Common/NameUtilTest.cs new file mode 100644 index 000000000000..287bec9ac5a8 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Common/NameUtilTest.cs @@ -0,0 +1,233 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Storage.Common; + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Common +{ + /// + /// unit test for NameUtil + /// + [TestClass] + public class NameUtilTest : StorageTestBase + { + [TestMethod] + public void IsValidContainerNameTest() + { + string[] positives = { "$root", "$logs", "abc", "abc987", "abc2de", "4abc", "abc-def", new String('a', 63) }; + NameValidateHelper(positives, true, NameUtil.IsValidContainerName); + + string[] negatives = + { + String.Empty, //can not empty + "$ROOT", //can not use upper case + "a", //too short + "ab", //too short + "Aabc", //start with a-z0-9 + "abcAde", //can not contain upper case + "-abc", //start with a-z0-9 + "a--bc", //can not contain consecutive dash + "abc-", //dash can not be the last character + "$abc", //$ is invalid + "abd*677", //* is invalid + "abc?", //? is invalid + }; + NameValidateHelper(negatives, false, NameUtil.IsValidContainerName); + } + + [TestMethod] + public void IsValidContainerPrefixTest() + { + string[] positives = { "$", "$ro", "$l", "$root", "a", "ab", "abc", "$logs", "abc", "abc987", "abc2de", "4abc", "abc-def", "a-c", "ac-", new String('a', 63) }; + NameValidateHelper(positives, true, NameUtil.IsValidContainerPrefix); + + string[] negatives = + { + String.Empty, //can not empty + "$re", //$re is not the prefix of "$root" or "$logs" + "$$", //$$ is not the prefix of "$root" or "$logs" + "Aabc", //start with a-z0-9 + "abcAde", //can not contain upper case + "-abc", //start with a-z0-9 + "a--bc", //can not contain consecutive dash + "$abc", //$ is invalid + "abd*677", //* is invalid + "abc?", //? is invalid + "$root-", //$ is invalid + }; + NameValidateHelper(negatives, false, NameUtil.IsValidContainerPrefix); + } + + [TestMethod] + public void IsValidBlobNameTest() + { + string[] positives = { "$", "$ro", "$l", "$root", "a", "*&(&^$^*", "ab", "abc", "$logs", "abc", "abc987", "abc2de", "4abc", "abc-def", "a-c", "ac-", new String('a', 1024)}; + NameValidateHelper(positives, true, NameUtil.IsValidBlobName); + + string[] negatives = + { + String.Empty, //can not empty + new String('a', 1025) + }; + NameValidateHelper(negatives, false, NameUtil.IsValidBlobName); + } + + [TestMethod] + public void IsValidBlobPrefixTest() + { + string[] positives = { "$", "$ro", "$l", "$root", "a", "*&(&^$^*", "ab", "abc", "$logs", "abc", "abc987", "abc2de", "4abc", "abc-def", "a-c", "ac-", new String('a', 1024) }; + NameValidateHelper(positives, true, NameUtil.IsValidBlobPrefix); + + string[] negatives = + { + String.Empty, //can not empty + new String('a', 1025) + }; + NameValidateHelper(negatives, false, NameUtil.IsValidBlobPrefix); + } + + + [TestMethod] + public void IsValidTableNameTest() + { + string[] positives = { "Abc", "abc", "a99", new String('a', 63) }; + NameValidateHelper(positives, true, NameUtil.IsValidTableName); + + string[] negatives = + { + String.Empty, //can not empty + "9a", //only start with A-Za-z + "a", //too short + "a?", //? is invalid + "af*", //* is invalid + "abc+", //+ is invalid + new String('a', 64), //too long + new String('a', 256) //too long + }; + NameValidateHelper(negatives, false, NameUtil.IsValidTableName); + } + + [TestMethod] + public void ValidMetricsTableTest() + { + string[] metricsTables = {"$MetricsTransactionsBlob", "$MetricsTransactionsTable", + "$MetricsTransactionsQueue", "$MetricsCapacityBlob"}; + NameValidateHelper(metricsTables, true, NameUtil.IsValidTableName); + } + + [TestMethod] + public void IsValidTablePrefixTest() + { + string[] positives = {"a", "A", "Ab", "ab", "a99", new String('a', 63) }; + NameValidateHelper(positives, true, NameUtil.IsValidTablePrefix); + + string[] negatives = + { + String.Empty, //can not empty + "9", //only start with a-zA-Z + "9a", //only start with A-Za-z + "a?", //? is invalid + "af*", //* is invalid + "abc+", //+ is invalid + new String('a', 64), //too long + new String('a', 256) //too long + }; + NameValidateHelper(negatives, false, NameUtil.IsValidTablePrefix); + } + + [TestMethod] + public void IsValidQueueNameTest() + { + string[] positives = {"abc", "abc987", "abc2de", "4abc", "abc-def", new String('a', 63) }; + NameValidateHelper(positives, true, NameUtil.IsValidQueueName); + + string[] negatives = + { + String.Empty, //can not empty + "$ROOT", //can not use upper case + "a", //too short + "ab", //too short + "Aabc", //start with a-z0-9 + "abcAde", //can not contain upper case + "-abc", //start with a-z0-9 + "a--bc", //can not contain consecutive dash + "abc-", //dash can not be the last character + "$abc", //$ is invalid + "abd*677", //* is invalid + "abc?", //? is invalid + new String('a', 64), //too long + new String('a', 256) //too long + }; + NameValidateHelper(negatives, false, NameUtil.IsValidQueueName); + } + + [TestMethod] + public void IsValidQueuePrefixTest() + { + string[] positives = {"a", "ab", "abc", "abc", "abc987", "abc2de", "4abc", "abc-def", "a-c", "ac-", new String('a', 63) }; + NameValidateHelper(positives, true, NameUtil.IsValidQueuePrefix); + + string[] negatives = + { + String.Empty, //can not empty + "Aabc", //start with a-z0-9 + "abcAde", //can not contain upper case + "-abc", //start with a-z0-9 + "a--bc", //can not contain consecutive dash + "$abc", //$ is invalid + "abd*677", //* is invalid + "abc?", //? is invalid + new String('a', 64), //too long + new String('a', 256) //too long + }; + NameValidateHelper(negatives, false, NameUtil.IsValidQueuePrefix); + } + + [TestMethod] + public void IsValidFileNameTest() + { + string[] positives = { "a", "ab", "abc", "Aabc", "abc987", "abc2de", "4abc", "abc-def", "a-c", "ac-", new String('a', 63) }; + NameValidateHelper(positives, true, NameUtil.IsValidFileName); + + string[] negatives = + { + String.Empty, //can not empty + "abc/e", //$ is invalid + "COM1", //forbidden file name + "abd*677", //* is invalid + "abc?", //? is invalid + new String('a', 512), //too long + new String('a', 1024) //too long + }; + NameValidateHelper(negatives, false, NameUtil.IsValidFileName); + } + + /// + /// validate names + /// + /// names which need to be checked + /// the names is valid or not + /// Validate method + private void NameValidateHelper(string[] names, bool isValid, Func validator) + { + foreach (string name in names) + { + string message = String.Format("'{0}' {1} should be {2}", name, validator.Method.Name, isValid); + Assert.AreEqual(isValid, validator(name), message); + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Common/ResourceAlreadyExistExceptionTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Common/ResourceAlreadyExistExceptionTest.cs new file mode 100644 index 000000000000..8058057c982b --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Common/ResourceAlreadyExistExceptionTest.cs @@ -0,0 +1,37 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Storage.Common; + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Common +{ + /// + /// unit test for ResourceAlreadyExistException + /// + [TestClass] + public class ResourceAlreadyExistExceptionTest : StorageTestBase + { + [TestMethod] + public void ResourceAlreadyExistExceptionInitTest() + { + string message = string.Empty; + + ResourceAlreadyExistException exception = new ResourceAlreadyExistException(message); + + message = "ResourceAlreadyExistException"; + exception = new ResourceAlreadyExistException(message); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Common/ResourceNotFoundExceptionTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Common/ResourceNotFoundExceptionTest.cs new file mode 100644 index 000000000000..62c5c3b54a42 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Common/ResourceNotFoundExceptionTest.cs @@ -0,0 +1,34 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Storage.Common; + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Common +{ + [TestClass] + public class ResourceNotFoundExceptionTest : StorageTestBase + { + [TestMethod] + public void ResourceNotFoundExceptionInitTest() + { + string message = string.Empty; + + ResourceNotFoundException exception = new ResourceNotFoundException(message); + + message = "ResourceNotFoundException"; + exception = new ResourceNotFoundException(message); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Common/SasTokenHelperTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Common/SasTokenHelperTest.cs new file mode 100644 index 000000000000..8567b264d52f --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Common/SasTokenHelperTest.cs @@ -0,0 +1,60 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright 2012 Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Storage.Common; + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Common +{ + /// + /// Unit test for sas token helper + /// + [TestClass] + public class SasTokenHelperTest : StorageTestBase + { + [TestMethod] + public void ValidateExistingPolicyTest() + { + Dictionary policies = new Dictionary() + { { "test", "test" }, { "Abc", "abc" }, { "123", "123" } }; + SasTokenHelper.GetExistingPolicy(policies, "ABC"); + SasTokenHelper.GetExistingPolicy(policies, "test"); + SasTokenHelper.GetExistingPolicy(policies, "tesT"); + SasTokenHelper.GetExistingPolicy(policies, "123"); + AssertThrows(() => SasTokenHelper.GetExistingPolicy(policies, "test1")); + } + + [TestMethod] + public void ValidateExistingPolicyWithEmptyPoliciesTest() + { + Dictionary policies = new Dictionary(); + AssertThrows(() => SasTokenHelper.GetExistingPolicy(policies, "test1")); + } + + [TestMethod] + public void SetupAccessPolicyLifeTimeTest() + { + DateTime? start = DateTime.Now; + DateTime? end = start.Value.AddHours(1.0); + DateTimeOffset? testStart = null; + DateTimeOffset? testEnd = null; + SasTokenHelper.SetupAccessPolicyLifeTime(start, end, out testStart, out testEnd, true); + Assert.AreEqual(testStart.Value.UtcDateTime.ToString(), start.Value.ToUniversalTime().ToString()); + Assert.AreEqual(testEnd.Value.UtcDateTime.ToString(), end.Value.ToUniversalTime().ToString()); + AssertThrows(() => SasTokenHelper.SetupAccessPolicyLifeTime(end, start, out testStart, out testEnd, true)); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Common/StorageCloudCmdletBaseTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Common/StorageCloudCmdletBaseTest.cs new file mode 100644 index 000000000000..22e7b11cfebd --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Common/StorageCloudCmdletBaseTest.cs @@ -0,0 +1,112 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; +using Microsoft.WindowsAzure.Storage; + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Common +{ + /// + /// unit test for StorageCloudCmdletBase + /// + [TestClass] + public class StorageCloudCmdletBaseTest : StorageTestBase + { + /// + /// StorageCmdletBase command + /// + public StorageCloudCmdletBase command = null; + + [TestInitialize] + public void InitCommand() + { + MockCmdRunTime = new MockCommandRuntime(); + command = new StorageCloudCmdletBase + { + CommandRuntime = MockCmdRunTime + }; + } + + [TestCleanup] + public void CleanCommand() + { + command = null; + } + + [TestMethod] + public void GetCloudStorageAccountFromContextTest() + { + CloudStorageAccount account = CloudStorageAccount.DevelopmentStorageAccount; + command.Context = new AzureStorageContext(account); + Assert.AreEqual(command.Context, command.GetCmdletStorageContext()); + } + + [TestMethod] + public void WriteObjectWithStorageContextWithNullContextTest() + { + AzureStorageBase item = new AzureStorageBase(); + command.WriteObjectWithStorageContext(item); + + AzureStorageBase contextItem = (AzureStorageBase)MockCmdRunTime.OutputPipeline.FirstOrDefault(); + Assert.IsNotNull(contextItem); + Assert.IsNull(contextItem.Context); + } + + [TestMethod] + public void WriteObjectWithStorageContextWithContextTest() + { + CloudStorageAccount account = CloudStorageAccount.DevelopmentStorageAccount; + command.Context = new AzureStorageContext(account); + + AzureStorageBase item = new AzureStorageBase(); + command.WriteObjectWithStorageContext(item); + + AzureStorageBase contextItem = (AzureStorageBase)MockCmdRunTime.OutputPipeline.FirstOrDefault(); + Assert.IsNotNull(contextItem); + Assert.AreEqual(command.Context, contextItem.Context); + } + + [TestMethod] + public void WriteObjectWithStorageContextWihtNullIEnumerableList() + { + IEnumerable itemList = null; + command.WriteObjectWithStorageContext(itemList); + Assert.AreEqual(0, MockCmdRunTime.OutputPipeline.Count); + } + + [TestMethod] + public void WriteObjectWithStorageContextWihtEnumerableList() + { + List itemList = new List(); + itemList.Add(new AzureStorageBase()); + itemList.Add(new AzureStorageBase()); + command.WriteObjectWithStorageContext(itemList); + Assert.AreEqual(2, MockCmdRunTime.OutputPipeline.Count); + } + + [TestMethod] + public void ShouldInitServiceChannelTest() + { + CloudStorageAccount account = CloudStorageAccount.DevelopmentStorageAccount; + command.Context = new AzureStorageContext(account); + Assert.IsFalse(command.ShouldInitServiceChannel()); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Common/StorageExceptionUtilTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Common/StorageExceptionUtilTest.cs new file mode 100644 index 000000000000..580a6e9839ad --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Common/StorageExceptionUtilTest.cs @@ -0,0 +1,101 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Storage; + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Common +{ + /// + /// unit test for StorageExceptionUtil + /// + [TestClass] + public class StorageExceptionUtilTest : StorageTestBase + { + [TestMethod] + public void IsNotFoundExceptionWithoutStatusTest() + { + RequestResult result = new RequestResult(); + string message = string.Empty; + ResourceAlreadyExistException innerException = new ResourceAlreadyExistException(message); + StorageException exception = new StorageException(result, message, innerException); + Assert.IsFalse(exception.IsNotFoundException()); + } + + [TestMethod] + public void IsNotFoundExceptionWithoutInfoTest() + { + StorageException exception = new StorageException(null, string.Empty, null); + Assert.IsFalse(exception.IsNotFoundException()); + } + + [TestMethod] + public void IsNotFoundExceptionTest() + { + RequestResult result = new RequestResult() + { + HttpStatusCode = 500 + }; + string message = string.Empty; + ResourceAlreadyExistException innerException = new ResourceAlreadyExistException(message); + StorageException exception = new StorageException(result, message, innerException); + Assert.IsFalse(exception.IsNotFoundException()); + + result = new RequestResult() + { + HttpStatusCode = 404 + }; + exception = new StorageException(result, message, innerException); + Assert.IsTrue(exception.IsNotFoundException()); + } + + [TestMethod] + public void RepackStorageExceptionWithoutInfoTest() + { + StorageException exception = new StorageException(null, string.Empty, null); + Assert.IsNotNull(exception.RepackStorageException()); + } + + [TestMethod] + public void RepackStorageExceptionWithoutStatusMessageTest() + { + RequestResult result = new RequestResult() + { + HttpStatusCode = 500 + }; + string message = string.Empty; + ResourceAlreadyExistException innerException = new ResourceAlreadyExistException(message); + StorageException exception = new StorageException(result, message, innerException); + Assert.IsNotNull(exception.RepackStorageException()); + } + + [TestMethod] + public void RepackStorageExceptionTest() + { + string status = String.Empty; + RequestResult result = new RequestResult() + { + HttpStatusCode = 404 + }; + string message = "storage exception"; + ResourceAlreadyExistException innerException = new ResourceAlreadyExistException(message); + StorageException exception = new StorageException(result, message, innerException); + exception = exception.RepackStorageException(); + Assert.IsNotNull(exception); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/GetAzureStorageFileContentTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/GetAzureStorageFileContentTest.cs new file mode 100644 index 000000000000..c18d1dfb5dc3 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/GetAzureStorageFileContentTest.cs @@ -0,0 +1,133 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.File; +using Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet; +using Microsoft.WindowsAzure.Management.Storage.Test.Common; +using Microsoft.WindowsAzure.Storage.DataMovement.TransferJobs; + +namespace Microsoft.WindowsAzure.Management.Storage.Test.File.Cmdlet +{ + [TestClass] + public class GetAzureStorageFileContentTest : StorageFileTestBase + { + private string destinationFilePath; + + private string destinationPath; + + [TestInitialize] + public void DownloadInitialize() + { + this.destinationFilePath = Path.GetTempFileName(); + this.destinationPath = Path.GetTempPath(); + + if (System.IO.File.Exists(this.destinationFilePath)) + { + System.IO.File.Delete(this.destinationFilePath); + } + } + + [TestCleanup] + public void DownloadCleanup() + { + if (System.IO.File.Exists(this.destinationFilePath)) + { + System.IO.File.Delete(this.destinationFilePath); + } + } + + [TestMethod] + public void DownloadFileUsingShareNameAndPathToLocalFileTest() + { + DownloadFileInternal( + "share", + "remoteFile", + this.destinationFilePath, + () => this.CmdletInstance.RunCmdlet( + Constants.ShareNameParameterSetName, + new KeyValuePair("ShareName", "share"), + new KeyValuePair("Path", "remoteFile"), + new KeyValuePair("Destination", this.destinationFilePath))); + } + + [TestMethod] + public void DownloadFileUsingShareObjectAndPathToLocalFileTest() + { + DownloadFileInternal( + "share", + "remoteFile", + this.destinationFilePath, + () => this.CmdletInstance.RunCmdlet( + Constants.ShareParameterSetName, + new KeyValuePair("Share", this.MockChannel.GetShareReference("share")), + new KeyValuePair("Path", "remoteFile"), + new KeyValuePair("Destination", this.destinationFilePath))); + } + + [TestMethod] + public void DownloadFileUsingDirectoryAndPathToLocalFileTest() + { + DownloadFileInternal( + "share", + "remoteFile", + this.destinationFilePath, + () => this.CmdletInstance.RunCmdlet( + Constants.DirectoryParameterSetName, + new KeyValuePair("Directory", this.MockChannel.GetShareReference("share").GetRootDirectoryReference()), + new KeyValuePair("Path", "remoteFile"), + new KeyValuePair("Destination", this.destinationFilePath))); + } + + [TestMethod] + public void DownloadFileUsingFileObjectToLocalFileTest() + { + DownloadFileInternal( + "share", + "remoteFile", + this.destinationFilePath, + () => this.CmdletInstance.RunCmdlet( + Constants.FileParameterSetName, + new KeyValuePair("File", this.MockChannel.GetShareReference("share").GetRootDirectoryReference().GetFileReference("remoteFile")), + new KeyValuePair("Destination", this.destinationFilePath))); + } + + [TestMethod] + public void DownloadFileUsingFileObjectToLocalDirectoryTest() + { + this.destinationFilePath = Path.Combine(this.destinationPath, "remoteFile"); + DownloadFileInternal( + "share", + "remoteFile", + this.destinationFilePath, + () => this.CmdletInstance.RunCmdlet( + Constants.FileParameterSetName, + new KeyValuePair("File", this.MockChannel.GetShareReference("share").GetRootDirectoryReference().GetFileReference("remoteFile")), + new KeyValuePair("Destination", this.destinationPath))); + } + + private void DownloadFileInternal(string shareName, string fileName, string destination, Action downloadFileAction) + { + var mockupRunner = new MockTransferJobRunner( + job => + { + Assert.IsTrue(job is FileDownloadJob, "The transfer job must be an instance of FileDownloadJob."); + var downloadJob = job as FileDownloadJob; + Assert.AreEqual(destination, downloadJob.DestPath, "Destination validation failed."); + Assert.AreEqual(shareName, downloadJob.SourceFile.Share.Name, "Share validation failed."); + Assert.AreEqual(fileName, downloadJob.SourceFile.Name, "SourceFile validation failed."); + return TaskEx.FromResult(true); + }); + + TransferJobRunnerFactory.SetCachedRunner(mockupRunner); + + downloadFileAction(); + + mockupRunner.ThrowAssertExceptionIfAvailable(); + this.MockCmdRunTime.OutputPipeline.AssertNoObject(); + this.MockCmdRunTime.ErrorStream.AssertNoObject(); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/GetAzureStorageFileTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/GetAzureStorageFileTest.cs new file mode 100644 index 000000000000..1e90fd2bc262 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/GetAzureStorageFileTest.cs @@ -0,0 +1,125 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Storage.File; +using Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet; +using Microsoft.WindowsAzure.Storage.File; + +namespace Microsoft.WindowsAzure.Management.Storage.Test.File.Cmdlet +{ + [TestClass] + public class GetAzureStorageFileTest : StorageFileTestBase + { + private const string ShareName = "share"; + + [TestMethod] + public void GetFileFromRootTest_ShareNameParameterSet() + { + var share = this.MockChannel.GetShareReference(ShareName); + var listItems = Enumerable.Range(0, 10).Select(x => share.GetRootDirectoryReference().GetFileReference(string.Format("file{0}", x))).Cast() + .Concat(Enumerable.Range(0, 5).Select(x => share.GetRootDirectoryReference().GetDirectoryReference(string.Format("dir{0}", x)))).ToArray(); + + this.ListFilesAndAssertResults( + () => this.CmdletInstance.RunCmdlet( + Constants.ShareNameParameterSetName, + new KeyValuePair("ShareName", ShareName)), + listItems); + } + + [TestMethod] + public void GetFileFromRootTest_ShareParameterSet() + { + var share = this.MockChannel.GetShareReference(ShareName); + var listItems = Enumerable.Range(0, 10).Select(x => share.GetRootDirectoryReference().GetFileReference(string.Format("file{0}", x))).Cast() + .Concat(Enumerable.Range(0, 5).Select(x => share.GetRootDirectoryReference().GetDirectoryReference(string.Format("dir{0}", x)))).ToArray(); + + this.ListFilesAndAssertResults( + () => this.CmdletInstance.RunCmdlet( + Constants.ShareParameterSetName, + new KeyValuePair("Share", share)), + listItems); + } + + [TestMethod] + public void GetFileFromSubDirectoryTest_UsingDirectoryObject() + { + var share = this.MockChannel.GetShareReference(ShareName); + var dir = share.GetRootDirectoryReference().GetDirectoryReference("dir"); + var listItems = Enumerable.Range(0, 10).Select(x => dir.GetFileReference(string.Format("file{0}", x))).Cast() + .Concat(Enumerable.Range(0, 5).Select(x => dir.GetDirectoryReference(string.Format("dir{0}", x)))).ToArray(); + + this.ListFilesAndAssertResults( + () => this.CmdletInstance.RunCmdlet( + Constants.DirectoryParameterSetName, + new KeyValuePair("Directory", dir)), + listItems, + dir); + } + + [TestMethod] + public void GetFileFromSubDirectoryTest_UsingShareObjectWithPath() + { + var share = this.MockChannel.GetShareReference(ShareName); + var dir = share.GetRootDirectoryReference().GetDirectoryReference("dir"); + var listItems = Enumerable.Range(0, 10).Select(x => dir.GetFileReference(string.Format("file{0}", x))).Cast() + .Concat(Enumerable.Range(0, 5).Select(x => dir.GetDirectoryReference(string.Format("dir{0}", x)))).ToArray(); + + this.ListFilesAndAssertResults( + () => this.CmdletInstance.RunCmdlet( + Constants.ShareParameterSetName, + new KeyValuePair("Share", share), + new KeyValuePair("Path", dir.Name)), + listItems, + dir); + } + + [TestMethod] + public void GetFileFromSubDirectoryTest_UsingShareNameWithPath() + { + var share = this.MockChannel.GetShareReference(ShareName); + var dir = share.GetRootDirectoryReference().GetDirectoryReference("dir"); + var listItems = Enumerable.Range(0, 10).Select(x => dir.GetFileReference(string.Format("file{0}", x))).Cast() + .Concat(Enumerable.Range(0, 5).Select(x => dir.GetDirectoryReference(string.Format("dir{0}", x)))).ToArray(); + + this.ListFilesAndAssertResults( + () => this.CmdletInstance.RunCmdlet( + Constants.ShareNameParameterSetName, + new KeyValuePair("ShareName", ShareName), + new KeyValuePair("Path", dir.Name)), + listItems, + dir); + } + + [TestMethod] + public void GetFileFromSubDirectoryTest_GetFromNonExistingDirectory() + { + this.CmdletInstance.RunCmdlet( + Constants.ShareNameParameterSetName, + new KeyValuePair("ShareName", ShareName), + new KeyValuePair("Path", "NonExist")); + this.MockCmdRunTime.ErrorStream.AssertMockupException("DirectoryNotFound"); + } + + private void ListFilesAndAssertResults(Action runCmdletAction, IListFileItem[] listedItems, CloudFileDirectory dir = null) + { + this.MockChannel.SetsEnumerationResults(dir == null ? string.Empty : dir.Name, listedItems); + runCmdletAction(); + this.MockCmdRunTime.OutputPipeline.AssertListFileItems(listedItems); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/GetAzureStorageShareTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/GetAzureStorageShareTest.cs new file mode 100644 index 000000000000..f17e4499eb02 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/GetAzureStorageShareTest.cs @@ -0,0 +1,75 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Storage.File; +using Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet; +using Microsoft.WindowsAzure.Storage.File; + +namespace Microsoft.WindowsAzure.Management.Storage.Test.File.Cmdlet +{ + [TestClass] + public class GetAzureStorageShareTest : StorageFileTestBase + { + [TestMethod] + public void GetShareByNameTest() + { + this.MockChannel.SetsAvailableShare("share"); + + this.CmdletInstance.RunCmdlet( + Constants.SpecificParameterSetName, + new KeyValuePair("Name", "share")); + + this.MockCmdRunTime.OutputPipeline.Cast().AssertSingleObject(x => x.Name == "share"); + } + + [TestMethod] + public void GetNonExistingShareByNameTest() + { + this.CmdletInstance.RunCmdlet( + Constants.SpecificParameterSetName, + new KeyValuePair("Name", "share")); + + this.MockCmdRunTime.ErrorStream.AssertMockupException("ShareNotExist"); + } + + [TestMethod] + public void GetShareByPrefixTest() + { + var expectedShares = Enumerable.Range(0, 10).Select(x => string.Format(CultureInfo.InvariantCulture, "share{0}", x)).ToArray(); + this.MockChannel.SetsAvailableShare(expectedShares.Concat(Enumerable.Range(0, 5).Select(x => string.Format(CultureInfo.InvariantCulture, "nonshare{0}", x))).ToArray()); + + this.CmdletInstance.RunCmdlet( + Constants.MatchingPrefixParameterSetName, + new KeyValuePair("Prefix", "share")); + + this.MockCmdRunTime.OutputPipeline.AssertShares(expectedShares); + } + + [TestMethod] + public void GetShareByPrefixTest_NoShareMatchingPrefix() + { + this.MockChannel.SetsAvailableShare(Enumerable.Range(0, 5).Select(x => string.Format(CultureInfo.InvariantCulture, "nonshare{0}", x)).ToArray()); + + this.CmdletInstance.RunCmdlet( + Constants.MatchingPrefixParameterSetName, + new KeyValuePair("Prefix", "share")); + + Assert.AreEqual(0, this.MockCmdRunTime.OutputPipeline.Count, "Should be no result returned."); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/NewAzureStorageDirectoryTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/NewAzureStorageDirectoryTest.cs new file mode 100644 index 000000000000..30b62eaa5be6 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/NewAzureStorageDirectoryTest.cs @@ -0,0 +1,104 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Storage.File; +using Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet; +using Microsoft.WindowsAzure.Management.Storage.Test.Common; +using Microsoft.WindowsAzure.Storage.File; +using System.Diagnostics; + +namespace Microsoft.WindowsAzure.Management.Storage.Test.File.Cmdlet +{ + [TestClass] + public class NewAzureStorageDirectoryTest : StorageFileTestBase + { + [TestMethod] + public void NewDirectoryUsingShareNameAndPathTest() + { + NewDirectoryAndAssert("newDirectory"); + } + + [TestMethod] + public void NewDirectoryUsingShareObjectAndPathTest() + { + this.CmdletInstance.RunCmdlet( + Constants.ShareParameterSetName, + new KeyValuePair("Share", this.MockChannel.GetShareReference("share")), + new KeyValuePair("Path", "newDirectory")); + + this.MockCmdRunTime.OutputPipeline + .Cast() + .AssertSingleObject(x => x.Name == "newDirectory" && x.Share.Name == "share"); + } + + [TestMethod] + public void NewDirectoryUsingDirectoryObjectAndPathTest() + { + this.CmdletInstance.RunCmdlet( + Constants.DirectoryParameterSetName, + new KeyValuePair("Directory", this.MockChannel.GetShareReference("share").GetRootDirectoryReference()), + new KeyValuePair("Path", "newDirectory")); + + this.MockCmdRunTime.OutputPipeline + .Cast() + .AssertSingleObject(x => x.Name == "newDirectory" && x.Share.Name == "share"); + } + + [TestMethod] + public void NewDirectoryWithTooLongNameTest() + { + NewDirectoryAndAssert(FileNamingGenerator.GenerateValidASCIIName(256), "ArgumentException"); + } + + [TestMethod] + public void NewDirectoryWithLongNameTest() + { + NewDirectoryAndAssert(FileNamingGenerator.GenerateValidASCIIName(255)); + } + + [TestMethod] + public void NewDirectoryWithInvalidCharacterTest() + { + NewDirectoryAndAssert("?*?\"\\*p:?\\/D?*?<:Z>:/l*("ShareName", "share"), + new KeyValuePair("Path", directoryName)); + + if (expectedErrorId == null) + { + this.MockCmdRunTime.OutputPipeline + .Cast() + .AssertSingleObject(x => x.Name == directoryName && x.Share.Name == "share"); + } + else + { + Trace.WriteLine(string.Format("Creating a directory with name '{0}'", directoryName)); + if (this.MockCmdRunTime.ErrorStream != null && this.MockCmdRunTime.ErrorStream.Count > 0) + { + Trace.WriteLine(string.Format("ErrorStream:")); + this.MockCmdRunTime.ErrorStream.ForEach(r => Trace.WriteLine(r.FullyQualifiedErrorId)); + } + this.MockCmdRunTime.ErrorStream.AssertSingleObject(x => x.FullyQualifiedErrorId == expectedErrorId); + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/NewAzureStorageShareTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/NewAzureStorageShareTest.cs new file mode 100644 index 000000000000..5f8cb2561e42 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/NewAzureStorageShareTest.cs @@ -0,0 +1,92 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Storage.File; +using Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet; +using Microsoft.WindowsAzure.Management.Storage.Test.Common; +using Microsoft.WindowsAzure.Storage.File; + +namespace Microsoft.WindowsAzure.Management.Storage.Test.File.Cmdlet +{ + [TestClass] + public class NewAzureStorageShareTest : StorageFileTestBase + { + [TestMethod] + public void NewShareBasicTest() + { + this.NewShareAndValidate("newshare"); + } + + [TestMethod] + public void NewShareWithLongName() + { + this.NewShareAndValidate(FileNamingGenerator.GenerateValidShareName(63)); + } + + [TestMethod] + public void NewShareWithInvalidShareName_DoubleDash() + { + this.NewShareAndValidate(FileNamingGenerator.GenerateInvalidShareName_DoubleDash(20), "ArgumentException"); + } + + [TestMethod] + public void NewShareWithInvalidShareName_EndsWithDash() + { + this.NewShareAndValidate(FileNamingGenerator.GenerateInvalidShareName_EndsWithDash(20), "ArgumentException"); + } + + [TestMethod] + public void NewShareWithInvalidShareName_StartsWithDash() + { + this.NewShareAndValidate(FileNamingGenerator.GenerateInvalidShareName_StartsWithDash(20), "ArgumentException"); + } + + [TestMethod] + public void NewShareWithInvalidShareName_UpperCase() + { + this.NewShareAndValidate(FileNamingGenerator.GenerateInvalidShareName_UpperCase(20), "ArgumentException"); + } + + [TestMethod] + public void NewShareWithTooLongName() + { + this.NewShareAndValidate(FileNamingGenerator.GenerateValidASCIIName(64), "ArgumentException"); + } + + [TestMethod] + public void NewShareWithInvalidCharacter() + { + this.NewShareAndValidate("&LOv=\\ji1eJgg% -SY;m", "ArgumentException"); + } + + private void NewShareAndValidate(string name, string expectedErrorId = null) + { + this.CmdletInstance.RunCmdlet( + Constants.ShareNameParameterSetName, + new KeyValuePair("Name", name)); + + if (expectedErrorId == null) + { + this.MockCmdRunTime.OutputPipeline.Cast().AssertSingleObject(x => x.Name == name); + } + else + { + this.MockCmdRunTime.ErrorStream.AssertSingleObject(x => x.FullyQualifiedErrorId == expectedErrorId); + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/RemoveAzureStorageDirectoryTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/RemoveAzureStorageDirectoryTest.cs new file mode 100644 index 000000000000..317c33273c76 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/RemoveAzureStorageDirectoryTest.cs @@ -0,0 +1,83 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Storage.File; +using Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet; +using Microsoft.WindowsAzure.Storage.File; + +namespace Microsoft.WindowsAzure.Management.Storage.Test.File.Cmdlet +{ + [TestClass] + public class RemoveAzureStorageDirectoryTest : StorageFileTestBase + { + [TestMethod] + public void RemoveDirectoryUsingShareNameAndPathTest() + { + this.CmdletInstance.RunCmdlet( + Constants.ShareNameParameterSetName, + new KeyValuePair("ShareName", "share"), + new KeyValuePair("Path", "directory"), + new KeyValuePair("PassThru", new SwitchParameter(true))); + + this.MockCmdRunTime.OutputPipeline + .Cast() + .AssertSingleObject(x => x.Share.Name == "share" && x.Name == "directory"); + } + + [TestMethod] + public void RemoveDirectoryUsingShareObjectAndPathTest() + { + this.CmdletInstance.RunCmdlet( + Constants.ShareParameterSetName, + new KeyValuePair("Share", this.MockChannel.GetShareReference("share")), + new KeyValuePair("Path", "directory"), + new KeyValuePair("PassThru", new SwitchParameter(true))); + + this.MockCmdRunTime.OutputPipeline + .Cast() + .AssertSingleObject(x => x.Share.Name == "share" && x.Name == "directory"); + } + + [TestMethod] + public void RemoveDirectoryUsingDirectoryObjectAndPathTest() + { + this.CmdletInstance.RunCmdlet( + Constants.DirectoryParameterSetName, + new KeyValuePair("Directory", this.MockChannel.GetShareReference("share").GetRootDirectoryReference()), + new KeyValuePair("Path", "directory"), + new KeyValuePair("PassThru", new SwitchParameter(true))); + + this.MockCmdRunTime.OutputPipeline + .Cast() + .AssertSingleObject(x => x.Share.Name == "share" && x.Name == "directory"); + } + + [TestMethod] + public void RemoveDirectoryUsingDirectoryObjectOnlyTest() + { + this.CmdletInstance.RunCmdlet( + Constants.DirectoryParameterSetName, + new KeyValuePair("Directory", this.MockChannel.GetShareReference("share").GetRootDirectoryReference().GetDirectoryReference("directory")), + new KeyValuePair("PassThru", new SwitchParameter(true))); + + this.MockCmdRunTime.OutputPipeline + .Cast() + .AssertSingleObject(x => x.Share.Name == "share" && x.Name == "directory"); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/RemoveAzureStorageFileTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/RemoveAzureStorageFileTest.cs new file mode 100644 index 000000000000..6bc171fb73af --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/RemoveAzureStorageFileTest.cs @@ -0,0 +1,83 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Storage.File; +using Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet; +using Microsoft.WindowsAzure.Storage.File; + +namespace Microsoft.WindowsAzure.Management.Storage.Test.File.Cmdlet +{ + [TestClass] + public class RemoveAzureStorageFileTest : StorageFileTestBase + { + [TestMethod] + public void RemoveFileUsingShareNameAndPathTest() + { + this.CmdletInstance.RunCmdlet( + Constants.ShareNameParameterSetName, + new KeyValuePair("ShareName", "share"), + new KeyValuePair("Path", "file"), + new KeyValuePair("PassThru", new SwitchParameter(true))); + + this.MockCmdRunTime.OutputPipeline + .Cast() + .AssertSingleObject(x => x.Share.Name == "share" && x.Name == "file"); + } + + [TestMethod] + public void RemoveFileUsingShareObjectAndPathTest() + { + this.CmdletInstance.RunCmdlet( + Constants.ShareParameterSetName, + new KeyValuePair("Share", this.MockChannel.GetShareReference("share")), + new KeyValuePair("Path", "file"), + new KeyValuePair("PassThru", new SwitchParameter(true))); + + this.MockCmdRunTime.OutputPipeline + .Cast() + .AssertSingleObject(x => x.Share.Name == "share" && x.Name == "file"); + } + + [TestMethod] + public void RemoveFileUsingDirectoryObjectAndPathTest() + { + this.CmdletInstance.RunCmdlet( + Constants.DirectoryParameterSetName, + new KeyValuePair("Directory", this.MockChannel.GetShareReference("share").GetRootDirectoryReference()), + new KeyValuePair("Path", "file"), + new KeyValuePair("PassThru", new SwitchParameter(true))); + + this.MockCmdRunTime.OutputPipeline + .Cast() + .AssertSingleObject(x => x.Share.Name == "share" && x.Name == "file"); + } + + [TestMethod] + public void RemoveFileUsingFileObjectTest() + { + this.CmdletInstance.RunCmdlet( + Constants.FileParameterSetName, + new KeyValuePair("File", this.MockChannel.GetShareReference("share").GetRootDirectoryReference().GetFileReference("file")), + new KeyValuePair("PassThru", new SwitchParameter(true))); + + this.MockCmdRunTime.OutputPipeline + .Cast() + .AssertSingleObject(x => x.Share.Name == "share" && x.Name == "file"); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/RemoveAzureStorageShareTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/RemoveAzureStorageShareTest.cs new file mode 100644 index 000000000000..65aaeeeba6cd --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/RemoveAzureStorageShareTest.cs @@ -0,0 +1,54 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Storage.File; +using Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet; +using Microsoft.WindowsAzure.Storage.File; + +namespace Microsoft.WindowsAzure.Management.Storage.Test.File.Cmdlet +{ + [TestClass] + public class RemoveAzureStorageShareTest : StorageFileTestBase + { + [TestMethod] + public void RemoveShareUsingShareNameTest() + { + this.CmdletInstance.RunCmdlet( + Constants.ShareNameParameterSetName, + new KeyValuePair("Name", "share"), + new KeyValuePair("PassThru", new SwitchParameter(true))); + + this.MockCmdRunTime.OutputPipeline + .Cast() + .AssertSingleObject(x => x.Name == "share"); + } + + [TestMethod] + public void RemoveFileUsingShareObjectTest() + { + this.CmdletInstance.RunCmdlet( + Constants.ShareParameterSetName, + new KeyValuePair("Share", this.MockChannel.GetShareReference("share")), + new KeyValuePair("PassThru", new SwitchParameter(true))); + + this.MockCmdRunTime.OutputPipeline + .Cast() + .AssertSingleObject(x => x.Name == "share"); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/SetAzureStorageFileContentTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/SetAzureStorageFileContentTest.cs new file mode 100644 index 000000000000..69b19d81f382 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/File/Cmdlet/SetAzureStorageFileContentTest.cs @@ -0,0 +1,160 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.File; +using Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet; +using Microsoft.WindowsAzure.Management.Storage.Test.Common; +using Microsoft.WindowsAzure.Storage.DataMovement.TransferJobs; + +namespace Microsoft.WindowsAzure.Management.Storage.Test.File.Cmdlet +{ + [TestClass] + public class SetAzureStorageFileContentTest : StorageFileTestBase + { + private string sourceFilePath = Path.GetTempFileName(); + + [TestInitialize] + public void UploadInitialize() + { + using (var writer = System.IO.File.CreateText(this.sourceFilePath)) + { + writer.WriteLine("SampleContent"); + } + } + + [TestCleanup] + public void UploadCleanup() + { + if (System.IO.File.Exists(this.sourceFilePath)) + { + System.IO.File.Delete(this.sourceFilePath); + } + } + + [TestMethod] + public void UploadFileUsingShareNameAndPathTest() + { + UploadFileInternal( + "share", + this.sourceFilePath, + "remoteFile", + () => this.CmdletInstance.RunCmdlet( + Constants.ShareNameParameterSetName, + new KeyValuePair("ShareName", "share"), + new KeyValuePair("Source", this.sourceFilePath), + new KeyValuePair("Path", "remoteFile"))); + } + + [TestMethod] + public void UploadFileUsingShareObjectAndPathTest() + { + UploadFileInternal( + "share", + this.sourceFilePath, + "remoteFile", + () => this.CmdletInstance.RunCmdlet( + Constants.ShareParameterSetName, + new KeyValuePair("Share", this.MockChannel.GetShareReference("share")), + new KeyValuePair("Source", this.sourceFilePath), + new KeyValuePair("Path", "remoteFile"))); + } + + [TestMethod] + public void UploadFileUsingDirectoryAndPathTest() + { + UploadFileInternal( + "share", + this.sourceFilePath, + "remoteFile", + () => this.CmdletInstance.RunCmdlet( + Constants.DirectoryParameterSetName, + new KeyValuePair("Directory", this.MockChannel.GetShareReference("share").GetRootDirectoryReference()), + new KeyValuePair("Source", this.sourceFilePath), + new KeyValuePair("Path", "remoteFile"))); + } + + [TestMethod] + public void UploadFileUsingDirectoryObjectOnlyTest() + { + this.MockChannel.SetsAvailableDirectories("dir"); + + UploadFileInternal( + "share", + this.sourceFilePath, + Path.GetFileName(this.sourceFilePath), + () => this.CmdletInstance.RunCmdlet( + Constants.DirectoryParameterSetName, + new KeyValuePair("Directory", this.MockChannel.GetShareReference("share").GetRootDirectoryReference().GetDirectoryReference("dir")), + new KeyValuePair("Source", this.sourceFilePath))); + } + + [TestMethod] + public void UploadFileUsingShareObjectOnlyTest() + { + this.MockChannel.SetsAvailableDirectories(""); + + UploadFileInternal( + "share", + this.sourceFilePath, + Path.GetFileName(this.sourceFilePath), + () => this.CmdletInstance.RunCmdlet( + Constants.ShareParameterSetName, + new KeyValuePair("Share", this.MockChannel.GetShareReference("share")), + new KeyValuePair("Source", this.sourceFilePath))); + } + + [TestMethod] + public void UploadFileUsingShareNameOnlyTest() + { + this.MockChannel.SetsAvailableDirectories(""); + + UploadFileInternal( + "share", + this.sourceFilePath, + Path.GetFileName(this.sourceFilePath), + () => this.CmdletInstance.RunCmdlet( + Constants.ShareNameParameterSetName, + new KeyValuePair("ShareName", "share"), + new KeyValuePair("Source", this.sourceFilePath))); + } + + private void UploadFileInternal(string shareName, string sourceFilePath, string destinationFileName, Action uploadFileAction) + { + var mockupRunner = new MockTransferJobRunner( + job => + { + Assert.IsTrue(job is FileUploadJob, "The transfer job must be an instance of FileUploadJob."); + var uploadJob = job as FileUploadJob; + Assert.AreEqual(destinationFileName, uploadJob.DestFile.Name, "Destination file name validation failed."); + Assert.AreEqual(shareName, uploadJob.DestFile.Share.Name, "Share validation failed."); + Assert.AreEqual(sourceFilePath, uploadJob.SourcePath, "Source file validation failed."); + return TaskEx.FromResult(true); + }); + + TransferJobRunnerFactory.SetCachedRunner(mockupRunner); + + uploadFileAction(); + + mockupRunner.ThrowAssertExceptionIfAvailable(); + this.MockCmdRunTime.OutputPipeline.AssertNoObject(); + this.MockCmdRunTime.ErrorStream.AssertNoObject(); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/File/FileAssertUtil.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/File/FileAssertUtil.cs new file mode 100644 index 000000000000..3ca7a440a6df --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/File/FileAssertUtil.cs @@ -0,0 +1,90 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Management.Storage.Test.Common; +using Microsoft.WindowsAzure.Storage.File; + +namespace Microsoft.WindowsAzure.Management.Storage.Test.File +{ + internal static class FileAssertUtil + { + public static void AssertSingleObject(this IEnumerable collection, Func assertAction) + { + var list = new List(collection); + Assert.AreEqual(1, list.Count, "The collection should contain exactly one object."); + Assert.IsTrue(assertAction(list[0])); + } + + public static void AssertMockupException(this IList errors, string errorId) + { + Assert.AreEqual(1, errors.Count, "The collection should contain exactly one object."); + Assert.IsTrue(errors[0].Exception is MockupException, "The exception in the error record should be an instance of MockupException class."); + var exception = errors[0].Exception as MockupException; + Assert.AreEqual(errorId, exception.ErrorId, "ErrorId is not expected."); + } + + public static void AssertListFileItems(this IEnumerable result, IEnumerable items) + { + var strongTypeResults = new List(result.Cast()); + var assertItems = new List(items); + Assert.AreEqual(assertItems.Count, strongTypeResults.Count, "The number of items in output is not expected."); + + var directoryItems = assertItems.Where(x => x is CloudFileDirectory).Cast().Select(x => x.Name).ToList(); + var fileItems = assertItems.Where(x => x is CloudFile).Cast().Select(x => x.Name).ToList(); + foreach (var item in strongTypeResults) + { + string name; + List expectList; + if (item is CloudFile) + { + name = ((CloudFile)item).Name; + expectList = fileItems; + } + else if (item is CloudFileDirectory) + { + name = ((CloudFileDirectory)item).Name; + expectList = directoryItems; + } + else + { + throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "Unexpected list item: {0}", item)); + } + + Assert.IsTrue(expectList.Remove(name), string.Format(CultureInfo.InvariantCulture, "Item {0} does not exist in the expected list.", item)); + } + } + + public static void AssertNoObject(this IEnumerable collection) + { + Assert.AreEqual(0, collection.Count(), "There should be no object inside the given collection."); + } + + public static void AssertShares(this IEnumerable result, IEnumerable expectedShareNames) + { + List expectedShareNameList = new List(expectedShareNames); + foreach (var share in result.Cast()) + { + Assert.IsTrue(expectedShareNameList.Remove(share.Name), string.Format(CultureInfo.InvariantCulture, "Share {0} was not expected.", share.Name)); + } + + Assert.AreEqual(0, expectedShareNameList.Count, "Should not left any share name remain in expected list."); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/File/PSCmdletReflectionHelper.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/File/PSCmdletReflectionHelper.cs new file mode 100644 index 000000000000..7b5ae42ed8b1 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/File/PSCmdletReflectionHelper.cs @@ -0,0 +1,99 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Management.Automation.Internal; +using System.Management.Automation.Runspaces; +using System.Reflection; + +namespace Microsoft.WindowsAzure.Management.Storage.Test.File +{ + internal static class PSCmdletReflectionHelper + { + private static readonly Type psCmdletType = typeof(PSCmdlet); + + private static readonly FieldInfo parameterSetFieldInfo = typeof(System.Management.Automation.Cmdlet).GetField("_parameterSetName", BindingFlags.Instance | BindingFlags.NonPublic); + + private static readonly FieldInfo sessionStateFieldInfo = typeof(InternalCommand).GetField("state", BindingFlags.Instance | BindingFlags.NonPublic); + + private static readonly FieldInfo engineFieldInfo = psCmdletType.Assembly.GetType("System.Management.Automation.Runspaces.LocalRunspace").GetField("_engine", BindingFlags.NonPublic | BindingFlags.Instance); + + private static readonly FieldInfo executionContextFieldInfo = psCmdletType.Assembly.GetType("System.Management.Automation.AutomationEngine").GetField("_context", BindingFlags.NonPublic | BindingFlags.Instance); + + private static readonly PropertyInfo contextPropertyInfo = typeof(InternalCommand).GetProperty("Context", BindingFlags.Instance | BindingFlags.NonPublic); + + private static readonly MethodInfo beginProcessingMethodInfo = psCmdletType.GetMethod("BeginProcessing", BindingFlags.NonPublic | BindingFlags.Instance); + + private static readonly MethodInfo endProcessingMethodInfo = psCmdletType.GetMethod("EndProcessing", BindingFlags.NonPublic | BindingFlags.Instance); + + private static readonly MethodInfo processRecordMethodInfo = psCmdletType.GetMethod("ProcessRecord", BindingFlags.NonPublic | BindingFlags.Instance); + + private static readonly object[] emptyParameters = new object[0]; + + public static IDisposable InitializeSessionState(this PSCmdlet cmdlet) + { + var ps = System.Management.Automation.PowerShell.Create(InitialSessionState.CreateDefault()); + try + { + var engine = engineFieldInfo.GetValue(ps.Runspace); + var context = executionContextFieldInfo.GetValue(engine); + contextPropertyInfo.SetValue(cmdlet, context, emptyParameters); + return ps; + } + catch + { + if (ps != null) + { + ps.Dispose(); + } + + throw; + } + } + + public static void RunCmdlet(this PSCmdlet cmdlet, string parameterSet, params KeyValuePair[] parameters) + { + RunCmdlet(cmdlet, parameterSet, + parameters.Select(x => new KeyValuePair( + x.Key, new object[] { x.Value })).ToArray() + ); + } + + public static void RunCmdlet(this PSCmdlet cmdlet, string parameterSet, KeyValuePair[] incomingValues) + { + var cmdletType = cmdlet.GetType(); + parameterSetFieldInfo.SetValue(cmdlet, parameterSet); + beginProcessingMethodInfo.Invoke(cmdlet, emptyParameters); + var parameterProperties = incomingValues.Select(x => + new Tuple( + cmdletType.GetProperty(x.Key), + x.Value)).ToArray(); + + for (int i = 0; i < incomingValues[0].Value.Length; i++) + { + foreach (var parameter in parameterProperties) + { + parameter.Item1.SetValue(cmdlet, parameter.Item2[i], null); + } + + processRecordMethodInfo.Invoke(cmdlet, emptyParameters); + } + + endProcessingMethodInfo.Invoke(cmdlet, emptyParameters); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/File/StorageFileTestBase.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/File/StorageFileTestBase.cs new file mode 100644 index 000000000000..db815ae88d61 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/File/StorageFileTestBase.cs @@ -0,0 +1,59 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Storage.File; +using Microsoft.WindowsAzure.Commands.Storage.Test; +using Microsoft.WindowsAzure.Management.Storage.Test.Service; + +namespace Microsoft.WindowsAzure.Management.Storage.Test.File +{ + public abstract class StorageFileTestBase : StorageTestBase, IDisposable where T : AzureStorageFileCmdletBase + { + private MockStorageFileManagement channel = new MockStorageFileManagement(); + + private T cmdlet; + + private IDisposable sessionStateDisposable; + + public StorageFileTestBase() + { + this.MockCmdRunTime = new MockCommandRuntime(); + cmdlet = (T)Activator.CreateInstance(typeof(T)); + cmdlet.CommandRuntime = this.MockCmdRunTime; + cmdlet.Channel = this.channel; + cmdlet.ShareChannel = true; + this.sessionStateDisposable = cmdlet.InitializeSessionState(); + } + + protected MockStorageFileManagement MockChannel + { + get { return this.channel; } + } + + protected T CmdletInstance + { + get { return this.cmdlet; } + } + + public void Dispose() + { + if (this.sessionStateDisposable != null) + { + this.sessionStateDisposable.Dispose(); + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/MSSharedLibKey.snk b/src/ServiceManagement/Storage/Commands.Storage.Test/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ServiceManagement/Storage/Commands.Storage.Test/MSSharedLibKey.snk differ diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Properties/AssemblyInfo.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..729955159e99 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Properties/AssemblyInfo.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft.WindowsAzure.Commands.Storage.Test")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("915f72f6-d58c-49aa-a1d5-974728a439c4")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] +[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Queue/GetAzureStorageQueueTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Queue/GetAzureStorageQueueTest.cs new file mode 100644 index 000000000000..efcc09f8e805 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Queue/GetAzureStorageQueueTest.cs @@ -0,0 +1,162 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; +using Microsoft.WindowsAzure.Commands.Storage.Queue; +using Microsoft.WindowsAzure.Storage.Queue; + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Queue +{ + [TestClass] + public class GetAzureStorageQueueTest : StorageQueueTestBase + { + public GetAzureStorageQueueCommand command = null; + + [TestInitialize] + public void InitCommand() + { + command = new GetAzureStorageQueueCommand(queueMock) + { + CommandRuntime = MockCmdRunTime + }; + } + + [TestCleanup] + public void CleanCommand() + { + command = null; + } + + [TestMethod] + public void ListQueuesByNameWithEmptyNameTest() + { + List queueList = command.ListQueuesByName("").ToList(); + Assert.AreEqual(0, queueList.Count); + + AddTestQueues(); + queueList = command.ListQueuesByName("").ToList(); + Assert.AreEqual(2, queueList.Count); + } + + [TestMethod] + public void ListQueuesByNameWithWildCardTest() + { + List queueList = command.ListQueuesByName("te*t").ToList(); + Assert.AreEqual(0, queueList.Count); + + AddTestQueues(); + + queueList = command.ListQueuesByName("te*t").ToList(); + Assert.AreEqual(2, queueList.Count); + + queueList = command.ListQueuesByName("tx*t").ToList(); + Assert.AreEqual(0, queueList.Count); + + queueList = command.ListQueuesByName("t?st").ToList(); + Assert.AreEqual(1, queueList.Count); + Assert.AreEqual("test", queueList[0].Name); + } + + [TestMethod] + public void ListQueuesByNameWithInvalidNameTest() + { + string invalidName = "a"; + AssertThrows(() => command.ListQueuesByName(invalidName).ToList(), + String.Format(Resources.InvalidQueueName, invalidName)); + invalidName = "xx%%d"; + AssertThrows(() => command.ListQueuesByName(invalidName).ToList(), + String.Format(Resources.InvalidQueueName, invalidName)); + } + + [TestMethod] + public void ListQueuesByNameWitNotExistsQueueTest() + { + string notExistingName = "abcdefg"; + AssertThrows(() => command.ListQueuesByName(notExistingName).ToList(), + String.Format(Resources.QueueNotFound, notExistingName)); + } + + [TestMethod] + public void ListQueuesByNameSuccessfullyTest() + { + AddTestQueues(); + + MockCmdRunTime.ResetPipelines(); + List queueList = command.ListQueuesByName("text").ToList(); + Assert.AreEqual(1, queueList.Count); + Assert.AreEqual("text", queueList[0].Name); + } + + [TestMethod] + public void ListQueuesByPrefixWithEmptyPrefixTest() + { + AssertThrows(() => command.ListQueuesByPrefix(String.Empty), + String.Format(Resources.InvalidQueueName, String.Empty)); + } + + [TestMethod] + public void ListQueuesByPrefixWithInvalidPrefixTest() + { + string prefix = "?"; + AssertThrows(() => command.ListQueuesByPrefix(prefix).ToList(), String.Format(Resources.InvalidQueueName, prefix)); + } + + [TestMethod] + public void ListQueuesByPrefixSuccessfullyTest() + { + AddTestQueues(); + + List queueList = command.ListQueuesByPrefix("te").ToList(); + Assert.AreEqual(2, queueList.Count); + Assert.IsTrue(queueList.Any(item => item.Name == "test")); + Assert.IsTrue(queueList.Any(item => item.Name == "text")); + + queueList = command.ListQueuesByPrefix("testx").ToList(); + Assert.AreEqual(0, queueList.Count); + } + + [TestMethod] + public void WriteQueueWithCountTest() + { + command.WriteQueueWithCount(null); + Assert.AreEqual(0, MockCmdRunTime.OutputPipeline.Count); + + MockCmdRunTime.ResetPipelines(); + command.WriteQueueWithCount(queueMock.queueList); + Assert.AreEqual(0, MockCmdRunTime.OutputPipeline.Count); + + AddTestQueues(); + MockCmdRunTime.ResetPipelines(); + command.WriteQueueWithCount(queueMock.queueList); + Assert.AreEqual(2, MockCmdRunTime.OutputPipeline.Count); + } + + [TestMethod] + public void ExecuteCommandGetQueueTest() + { + AddTestQueues(); + command.Name = "test"; + command.ExecuteCmdlet(); + Assert.AreEqual(1, MockCmdRunTime.OutputPipeline.Count); + + AzureStorageQueue queue = (AzureStorageQueue)MockCmdRunTime.OutputPipeline.FirstOrDefault(); + Assert.AreEqual(command.Name, queue.Name); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Queue/NewAzureStorageQueueSasTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Queue/NewAzureStorageQueueSasTest.cs new file mode 100644 index 000000000000..1e6fcc656892 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Queue/NewAzureStorageQueueSasTest.cs @@ -0,0 +1,71 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Storage.Queue.Cmdlet; +using Microsoft.WindowsAzure.Storage.Queue; + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Queue +{ + [TestClass] + public class NewAzureStorageQueueSasTest : StorageQueueTestBase + { + public NewAzureStorageQueueSasTokenCommand command = null; + + [TestInitialize] + public void InitCommand() + { + command = new NewAzureStorageQueueSasTokenCommand(queueMock) + { + CommandRuntime = MockCmdRunTime + }; + } + + [TestCleanup] + public void CleanCommand() + { + command = null; + } + + [TestMethod] + public void SetupAccessPolicyPermissionTest() + { + SharedAccessQueuePolicy accessPolicy = new SharedAccessQueuePolicy(); + command.SetupAccessPolicyPermission(accessPolicy, ""); + Assert.AreEqual(accessPolicy.Permissions, SharedAccessQueuePermissions.None); + accessPolicy.Permissions = SharedAccessQueuePermissions.Read; + command.SetupAccessPolicyPermission(accessPolicy, ""); + Assert.AreEqual(accessPolicy.Permissions, SharedAccessQueuePermissions.Read); + command.SetupAccessPolicyPermission(accessPolicy, "a"); + Assert.AreEqual(accessPolicy.Permissions, SharedAccessQueuePermissions.Add); + command.SetupAccessPolicyPermission(accessPolicy, "aAaaa"); + Assert.AreEqual(accessPolicy.Permissions, SharedAccessQueuePermissions.Add); + command.SetupAccessPolicyPermission(accessPolicy, "ru"); + Assert.AreEqual(accessPolicy.Permissions, SharedAccessQueuePermissions.Update | SharedAccessQueuePermissions.Read); + command.SetupAccessPolicyPermission(accessPolicy, "ur"); + Assert.AreEqual(accessPolicy.Permissions, SharedAccessQueuePermissions.Update | SharedAccessQueuePermissions.Read); + command.SetupAccessPolicyPermission(accessPolicy, "raUP"); + Assert.AreEqual(accessPolicy.Permissions, SharedAccessQueuePermissions.Add + | SharedAccessQueuePermissions.Read | SharedAccessQueuePermissions.Update | SharedAccessQueuePermissions.ProcessMessages); + command.SetupAccessPolicyPermission(accessPolicy, "UPrrrra"); + Assert.AreEqual(accessPolicy.Permissions, SharedAccessQueuePermissions.Add + | SharedAccessQueuePermissions.Read | SharedAccessQueuePermissions.Update | SharedAccessQueuePermissions.ProcessMessages); + AssertThrows(() => command.SetupAccessPolicyPermission(accessPolicy, "rwDl")); + AssertThrows(() => command.SetupAccessPolicyPermission(accessPolicy, "x")); + AssertThrows(() => command.SetupAccessPolicyPermission(accessPolicy, "rwx")); + AssertThrows(() => command.SetupAccessPolicyPermission(accessPolicy, "ABC")); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Queue/NewAzureStorageQueueTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Queue/NewAzureStorageQueueTest.cs new file mode 100644 index 000000000000..10948b3133c0 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Queue/NewAzureStorageQueueTest.cs @@ -0,0 +1,92 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; +using Microsoft.WindowsAzure.Commands.Storage.Queue; + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Queue +{ + [TestClass] + public class NewAzureStorageQueueTest : StorageQueueTestBase + { + public NewAzureStorageQueueCommand command = null; + + [TestInitialize] + public void InitCommand() + { + command = new NewAzureStorageQueueCommand(queueMock) + { + CommandRuntime = MockCmdRunTime + }; + } + + [TestCleanup] + public void CleanCommand() + { + command = null; + } + + [TestMethod] + public void CreateAzureQueueWithInvalidNameTest() + { + string name = String.Empty; + AssertThrows(() => command.CreateAzureQueue(name), + String.Format(Resources.InvalidQueueName, name)); + + name = "a"; + AssertThrows(() => command.CreateAzureQueue(name), + String.Format(Resources.InvalidQueueName, name)); + + name = "&*("; + AssertThrows(() => command.CreateAzureQueue(name), + String.Format(Resources.InvalidQueueName, name)); + } + + [TestMethod] + public void CreateAzureQueueWithExistsQueueTest() + { + AddTestQueues(); + string name = "text"; + AssertThrows(() => command.CreateAzureQueue(name), + String.Format(Resources.QueueAlreadyExists, name)); + } + + [TestMethod] + public void CreateAzureQueueSuccessfullyTest() + { + MockCmdRunTime.ResetPipelines(); + string name = "test"; + AzureStorageQueue queue = command.CreateAzureQueue(name); + Assert.AreEqual("test", queue.Name); + + MockCmdRunTime.ResetPipelines(); + AssertThrows(() => command.CreateAzureQueue(name), + String.Format(Resources.QueueAlreadyExists, name)); + } + + [TestMethod] + public void ExcuteCommandNewQueueTest() + { + string name = "queuename"; + command.Name = name; + command.ExecuteCmdlet(); + AzureStorageQueue queue = (AzureStorageQueue)MockCmdRunTime.OutputPipeline.FirstOrDefault(); + Assert.AreEqual(name, queue.Name); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Queue/RemoveAzureStorageQueueTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Queue/RemoveAzureStorageQueueTest.cs new file mode 100644 index 000000000000..1c74e5e59d6d --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Queue/RemoveAzureStorageQueueTest.cs @@ -0,0 +1,109 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; +using Microsoft.WindowsAzure.Commands.Storage.Queue; + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Queue +{ + [TestClass] + public class RemoveAzureStorageQueueTest : StorageQueueTestBase + { + internal FakeRemoveAzureQueueCommand command = null; + + [TestInitialize] + public void InitCommand() + { + command = new FakeRemoveAzureQueueCommand(queueMock) + { + CommandRuntime = MockCmdRunTime + }; + } + + [TestCleanup] + public void CleanCommand() + { + command = null; + } + + [TestMethod] + public void RemoveQueueWithInvalidNameTest() + { + string name = "a*b"; + AssertThrows(() => command.RemoveAzureQueue(name), + String.Format(Resources.InvalidQueueName, name)); + } + + [TestMethod] + public void RemoveQueueWithNoExistQueueTest() + { + string name = "test"; + AssertThrows(() => command.RemoveAzureQueue(name), + String.Format(Resources.QueueNotFound, name)); + } + + [TestMethod] + public void RemoveQueueSuccessfullyTest() + { + string name = "test"; + + MockCmdRunTime.ResetPipelines(); + AddTestQueues(); + bool removed = command.RemoveAzureQueue(name); + Assert.IsFalse(removed); + + MockCmdRunTime.ResetPipelines(); + AddTestQueues(); + name = "text"; + command.confirm = true; + removed = command.RemoveAzureQueue(name); + Assert.IsTrue(removed); + + MockCmdRunTime.ResetPipelines(); + AddTestQueues(); + name = "text"; + command.Force = true; + command.confirm = false; + removed = command.RemoveAzureQueue(name); + Assert.IsTrue(removed); + } + + [TestMethod] + public void ExecuteCommandRemoveAzureQueue() + { + string name = "test"; + command.Name = name; + AssertThrows(() => command.ExecuteCmdlet(), + String.Format(Resources.QueueNotFound, name)); + } + } + + internal class FakeRemoveAzureQueueCommand : RemoveAzureStorageQueueCommand + { + public bool confirm = false; + + public FakeRemoveAzureQueueCommand(IStorageQueueManagement channel) + { + Channel = channel; + } + + internal override bool ConfirmRemove(string message) + { + return confirm; + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Queue/StorageQueueTestBase.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Queue/StorageQueueTestBase.cs new file mode 100644 index 000000000000..2fb4675b956d --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Queue/StorageQueueTestBase.cs @@ -0,0 +1,48 @@ +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Storage.Test.Service; +using Microsoft.WindowsAzure.Storage.Queue; + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Queue +{ + public class StorageQueueTestBase : StorageTestBase + { + public MockStorageQueueManagement queueMock = null; + + [TestInitialize] + public void InitMock() + { + queueMock = new MockStorageQueueManagement(); + MockCmdRunTime = new MockCommandRuntime(); + } + + [TestCleanup] + public void CleanMock() + { + queueMock = null; + } + + public void AddTestQueues() + { + queueMock.queueList.Clear(); + string testUri = "https://127.0.0.1/account/test"; + string textUri = "https://127.0.0.1/account/text"; + queueMock.queueList.Add(new CloudQueue(new Uri(testUri))); + queueMock.queueList.Add(new CloudQueue(new Uri(textUri))); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Service/MockStorageBlobManagement.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Service/MockStorageBlobManagement.cs new file mode 100644 index 000000000000..363e4aec4d97 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Service/MockStorageBlobManagement.cs @@ -0,0 +1,691 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ----------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Auth; +using Microsoft.WindowsAzure.Storage.Blob; +using Microsoft.WindowsAzure.Storage.Shared.Protocol; + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Service +{ + /// + /// Mock blob management + /// + public class MockStorageBlobManagement : IStorageBlobManagement + { + public static string ContainerNotFound = "Container not found"; + + public static string BlobNotFound = "Blob not found"; + + /// + /// Blob end point + /// + private string BlobEndPoint = "http://127.0.0.1/account/"; + + /// + /// Container list + /// + private List containerList = new List(); + + public List ContainerList + { + get + { + return containerList; + } + } + + public List> ContainerAndTokenList + { + get + { + List> containerAndTokenList = new List>(ContainerList.Count); + foreach (CloudBlobContainer container in ContainerList) + { + containerAndTokenList.Add(new Tuple(container, null)); + } + + return containerAndTokenList; + } + } + + /// + /// Container permissions list + /// + private Dictionary containerPermissions = new Dictionary(); + public Dictionary ContainerPermissions + { + get + { + return containerPermissions; + } + } + + /// + /// Container blobs list + /// + private Dictionary> containerBlobs = new Dictionary>(); + public Dictionary> ContainerBlobs + { + get + { + return containerBlobs; + } + } + + /// + /// Get a list of cloudblobcontainer in azure + /// + /// Container prefix + /// Container listing details + /// Blob request option + /// Operation context + /// An enumerable collection of cloudblobcontainer + public IEnumerable ListContainers(string prefix, ContainerListingDetails detailsIncluded, BlobRequestOptions options = null, OperationContext operationContext = null) + { + if (string.IsNullOrEmpty(prefix)) + { + return ContainerList; + } + else + { + List prefixContainerList = new List(); + + foreach (CloudBlobContainer container in ContainerList) + { + if (container.Name.StartsWith(prefix)) + { + prefixContainerList.Add(container); + } + } + + return prefixContainerList; + } + } + + /// + /// Get container permissions + /// + /// A cloudblobcontainer object + /// Access condition + /// Blob request option + /// Operation context + /// The container's permission + public BlobContainerPermissions GetContainerPermissions(CloudBlobContainer container, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null) + { + BlobContainerPermissions defaultPermission = new BlobContainerPermissions(); + defaultPermission.PublicAccess = BlobContainerPublicAccessType.Off; + + if (ContainerPermissions.ContainsKey(container.Name)) + { + return ContainerPermissions[container.Name]; + } + else + { + return defaultPermission; + } + } + + /// + /// Get an CloudBlobContainer instance in local + /// + /// Container name + /// A CloudBlobContainer in local memory + public CloudBlobContainer GetContainerReference(string name) + { + Uri containerUri = new Uri(String.Format("{0}{1}/", BlobEndPoint, name)); + string testName = "testaccount"; + Guid guid = Guid.NewGuid(); + string testKey = Convert.ToBase64String(guid.ToByteArray()); + StorageCredentials credentials = new StorageCredentials(testName, testKey); + return new CloudBlobContainer(containerUri, credentials); + } + + /// + /// Create the container if not exists + /// + /// A cloudblobcontainer object + /// Blob request option + /// Operation context + /// True if the container did not already exist and was created; otherwise false. + public bool CreateContainerIfNotExists(CloudBlobContainer container, BlobRequestOptions requestOptions = null, OperationContext operationContext = null) + { + CloudBlobContainer containerRef = GetContainerReference(container.Name); + + if (DoesContainerExist(containerRef, requestOptions, operationContext)) + { + return false; + } + else + { + containerRef = GetContainerReference(container.Name); + ContainerList.Add(containerRef); + return true; + } + } + + /// + /// Delete container + /// + /// A cloudblobcontainer object + /// Access condition + /// Blob request option + /// Operation context + public void DeleteContainer(CloudBlobContainer container, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext) + { + foreach (CloudBlobContainer containerRef in ContainerList) + { + if (container.Name == containerRef.Name) + { + ContainerList.Remove(containerRef); + return; + } + } + } + + /// + /// Set container permissions + /// + /// A cloudblobcontainer object + /// The container's permission + /// Access condition + /// Blob request option + /// Operation context + public void SetContainerPermissions(CloudBlobContainer container, BlobContainerPermissions permissions, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext) + { + String name = container.Name; + + if (ContainerPermissions.ContainsKey(name)) + { + ContainerPermissions[name] = permissions; + } + else + { + ContainerPermissions.Add(name, permissions); + } + } + + /// + /// Get blob reference with properties and meta data from server + /// + /// A cloudblobcontainer object + /// Blob name + /// Access condition + /// Blob request options + /// Operation context + /// Return an ICloudBlob if the specific blob exists on azure, otherwise return null + public ICloudBlob GetBlobReferenceFromServer(CloudBlobContainer container, string blobName, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext) + { + string containerName = container.Name; + + if (ContainerBlobs.ContainsKey(containerName)) + { + List blobList = ContainerBlobs[containerName]; + + foreach (ICloudBlob blob in blobList) + { + if (blob.Name == blobName) + { + return blob; + } + } + + return null; + } + else + { + return null; + } + } + + /// + /// List all blobs in specified containers + /// + /// A cloudblobcontainer object + /// Blob prefix + /// Use flat blob listing(whether treat "container/" as directory) + /// Blob listing details + /// Blob request option + /// Operation context + /// An enumerable collection of icloudblob + public IEnumerable ListBlobs(CloudBlobContainer container, string prefix, bool useFlatBlobListing, BlobListingDetails blobListingDetails, BlobRequestOptions options, OperationContext operationContext) + { + string containerName = container.Name; + + if (ContainerBlobs.ContainsKey(containerName)) + { + List blobList = ContainerBlobs[containerName]; + + if (string.IsNullOrEmpty(prefix)) + { + return blobList; + } + + List prefixBlobs = new List(); + + foreach (ICloudBlob blob in blobList) + { + if (blob.Name.StartsWith(prefix)) + { + prefixBlobs.Add(blob); + } + } + + return prefixBlobs; + } + else + { + return new List(); + } + } + + /// + /// Whether the container is exists or not + /// + /// A cloudblobcontainer object + /// Blob request option + /// Operation context + /// True if the specific container exists, otherwise return false + public bool DoesContainerExist(CloudBlobContainer container, BlobRequestOptions options, OperationContext operationContext) + { + if (null == container) + { + return false; + } + + foreach (CloudBlobContainer containerRef in ContainerList) + { + if (containerRef.Name == container.Name) + { + return true; + } + } + + return false; + } + + /// + /// Whether the blob is exists or not + /// + /// A icloudblob object + /// Blob request option + /// Operation context + /// True if the specific blob exists, otherwise return false + public bool DoesBlobExist(ICloudBlob blob, BlobRequestOptions options, OperationContext operationContext) + { + CloudBlobContainer container = blob.Container; + + if (!ContainerBlobs.ContainsKey(container.Name)) + { + return false; + } + else + { + List blobList = ContainerBlobs[container.Name]; + + foreach (ICloudBlob blobRef in blobList) + { + if (blobRef.Name == blob.Name) + { + return true; + } + } + + return false; + } + } + + /// + /// Delete azure blob + /// + /// ICloudblob object + /// Delete snapshots option + /// Access condition + /// Operation context + /// An enumerable collection of icloudblob + public void DeleteICloudBlob(ICloudBlob blob, DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext) + { + CloudBlobContainer container = blob.Container; + + if (!this.DoesContainerExist(container, null, null)) + { + throw new StorageException(ContainerNotFound); + } + else if (ContainerBlobs.ContainsKey(container.Name)) + { + List blobList = ContainerBlobs[container.Name]; + + foreach (ICloudBlob blobRef in blobList) + { + if (blobRef.Name == blob.Name) + { + blobList.Remove(blobRef); + return; + } + } + } + + throw new StorageException(BlobNotFound); + } + + /// + /// fetch container attributes + /// + /// CloudBlobContainer object + /// Access condition + /// blob request options + /// An object that represents the context for the current operation. + public void FetchContainerAttributes(CloudBlobContainer container, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext) + { + return; + } + + /// + /// fetch blob attributes + /// + /// Access condition + /// blob request options + /// An object that represents the context for the current operation. + public void FetchBlobAttributes(ICloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext) + { + return ; + } + + /// + /// set blob properties + /// + /// Access condition + /// blob request options + /// An object that represents the context for the current operation. + public void SetBlobProperties(ICloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext) + { + return; + } + + /// + /// set blob meta data + /// + /// ICloud blob object + /// Access condition + /// blob request options + /// An object that represents the context for the current operation. + public void SetBlobMetadata(ICloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext) + { + return; + } + + /// + /// Abort copy operation on specified blob + /// + /// ICloudBlob object + /// Copy id + /// Access condition + /// Blob request options + /// Operation context + public void AbortCopy(ICloudBlob blob, string copyId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext) + { + return; + } + + /// + /// Get the service properties + /// + /// Cloud storage account + /// Service type + /// Request options + /// Operation context + /// The service properties of the specified service type + public ServiceProperties GetStorageServiceProperties(StorageServiceType type, IRequestOptions options, OperationContext operationContext) + { + throw new NotImplementedException("No need to cover this in unit test since the logic is quite simple. For more details, please read GetAzureStorageServiceLogging.cs"); + } + + /// + /// Set service properties + /// + /// Cloud storage account + /// Service type + /// Service properties + /// Request options + /// Operation context + public void SetStorageServiceProperties(StorageServiceType type, WindowsAzure.Storage.Shared.Protocol.ServiceProperties properties, IRequestOptions options, OperationContext operationContext) + { + throw new NotImplementedException("No need to cover this in unit test since there are no additional logics on this api"); + } + + /// + /// List part of blobs. + /// + /// Blob prefix + /// Use flat blob listing + /// Blob listing details. + /// Max results. + /// Current token. + /// Request options + /// Operation Context. + /// BlobResultSegment object + public BlobResultSegment ListBlobsSegmented(CloudBlobContainer container, string prefix, bool useFlatBlobListing, BlobListingDetails blobListingDetails, int? maxResults, BlobContinuationToken currentToken, BlobRequestOptions options, OperationContext operationContext) + { + throw new NotImplementedException("Can not create a BlobResultSegment object"); + } + + /// + /// Get a list of cloudblobcontainer in azure + /// + /// Container prefix + /// Container listing details + /// Blob request option + /// Operation context + /// An enumerable collection of cloudblobcontainer + public ContainerResultSegment ListContainersSegmented(string prefix, ContainerListingDetails detailsIncluded, int? maxResults, BlobContinuationToken currentToken, BlobRequestOptions options, OperationContext operationContext) + { + throw new NotImplementedException("Can not create a ContainerResultSegment object"); + } + + /// + /// Async Get container presssions + /// + /// A cloudblobcontainer object + /// Access condition + /// Blob request option + /// Operation context + /// User cancellation token + /// A task object which retrieve the permission of the specified container + public Task GetContainerPermissionsAsync(CloudBlobContainer container, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken) + { + return Task.Factory.StartNew(() => this.GetContainerPermissions(container, + accessCondition, options, operationContext)); + } + + /// + /// Return a task that asynchronously check whether the specified container exists. + /// + /// CloudBlobContainer object + /// Blob request option + /// Operation context + /// Cancellation token + /// A task object that asynchronously check whether the specified container exists + public Task DoesContainerExistAsync(CloudBlobContainer container, BlobRequestOptions requestOptions, OperationContext operationContext, CancellationToken cmdletCancellationToken) + { + return Task.Factory.StartNew(() => this.DoesContainerExist(container, requestOptions, operationContext)); + } + + /// + /// Return a task that asynchronously check whether the specified blob exists. + /// + /// ICloudBlob object + /// Blob request options + /// Operation context + /// Cancellation token + /// A task object that asynchronously check whether the specified blob exists. + public Task DoesBlobExistAsync(ICloudBlob blob, BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken) + { + return Task.Factory.StartNew(() => this.DoesBlobExist(blob, options, operationContext)); + } + + /// + /// Return a task that asynchronously get the blob reference from server + /// + /// CloudBlobContainer object + /// Blob name + /// Access condition + /// Blob request options + /// Operation context + /// Cancellation token + /// A task object that asynchronously get the blob reference from server + public Task GetBlobReferenceFromServerAsync(CloudBlobContainer container, string blobName, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken) + { + return Task.Factory.StartNew(() => this.GetBlobReferenceFromServer(container, blobName, accessCondition, options, operationContext)); + } + + /// + /// Return a task that asynchronously fetch blob attributes + /// + /// ICloud blob object + /// Access condition + /// Blob request options + /// Operation context + /// Cancellation token + /// Return a task that asynchronously fetch blob attributes + public Task FetchBlobAttributesAsync(ICloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken) + { + return Task.Factory.StartNew(() => this.FetchBlobAttributes(blob, accessCondition, options, operationContext)); + } + + /// + /// Return a task that asynchronously create a container if it doesn't exist. + /// + /// CloudBlobContainer object + /// Blob container public access type + /// Blob request options + /// Operation context + /// Cancellation token + /// Return a task that asynchronously create a container if it doesn't exist. + public Task CreateContainerIfNotExistsAsync(CloudBlobContainer container, BlobContainerPublicAccessType accessType, BlobRequestOptions requestOptions, OperationContext operationContext, CancellationToken cmdletCancellationToken) + { + return Task.Factory.StartNew(() => this.CreateContainerIfNotExists(container, requestOptions, operationContext)); + } + + /// + /// Return a task that asynchronously delete the specified container. + /// + /// CloudBlobContainer object + /// Access condition + /// Blob request option + /// Operation context + /// Cancellation token + /// Return a task that asynchronously delete the specified container. + public Task DeleteContainerAsync(CloudBlobContainer container, AccessCondition accessCondition, BlobRequestOptions requestOptions, OperationContext operationContext, CancellationToken cmdletCancellationToken) + { + return Task.Factory.StartNew(() => this.DeleteContainer(container, accessCondition, requestOptions, operationContext)); + } + + /// + /// Return a task that asynchronously abort the blob copy operation + /// + /// ICloudBlob object + /// Copy id + /// Access condition + /// Blob request options + /// Operation context + /// Cancellation token + /// Return a task that asynchronously abort the blob copy operation + public Task AbortCopyAsync(ICloudBlob blob, string copyId, AccessCondition accessCondition, BlobRequestOptions requestOption, OperationContext operationContext, CancellationToken cmdletCancellationToken) + { + return Task.Factory.StartNew(() => this.AbortCopy(blob, copyId, accessCondition, requestOption, operationContext)); + } + + /// + /// Set container permissions + /// + /// A cloudblobcontainer object + /// The container's permission + /// Access condition + /// Blob request option + /// Operation context + public Task SetContainerPermissionsAsync(CloudBlobContainer container, BlobContainerPermissions permissions, AccessCondition accessCondition, BlobRequestOptions requestOptions, OperationContext operationContext, CancellationToken cmdletCancellationToken) + { + return Task.Factory.StartNew(() => this.SetContainerPermissions(container, permissions, accessCondition, requestOptions, operationContext)); + } + + /// + /// Return a task that asynchronously delete the specified blob + /// + /// ICloudBlob object + /// Snapshot delete option + /// Access condition + /// Blob request option + /// Operation context + /// Cancellation token + /// Return a task that asynchronously delete the specified blob + public Task DeleteICloudBlobAsync(ICloudBlob blob, DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions requestOptions, OperationContext operationContext, CancellationToken cmdletCancellationToken) + { + return Task.Factory.StartNew(() => this.DeleteICloudBlob(blob, deleteSnapshotsOption, accessCondition, requestOptions, operationContext)); + } + + /// + /// Return a task that asynchronously set blob properties + /// + /// ICloud blob object + /// Access condition + /// Blob request options + /// An object that represents the context for the current operation. + public Task SetBlobPropertiesAsync(ICloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken) + { + return Task.Factory.StartNew(() => this.SetBlobProperties(blob, accessCondition, options, operationContext)); + } + + /// + /// Return a task that asynchronously set blob meta data + /// + /// ICloud blob object + /// Access condition + /// Blob request options + /// An object that represents the context for the current operation. + public Task SetBlobMetadataAsync(ICloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken) + { + return Task.Factory.StartNew(() => this.SetBlobMetadata(blob, accessCondition, options, operationContext)); + } + + /// + /// List the blobs segmented in specified containers + /// + /// A cloudblobcontainer object + /// Blob prefix + /// Use flat blob listing(whether treat "container/" as directory) + /// Blob listing details + /// Blob request option + /// Operation context + public Task ListBlobsSegmentedAsync(CloudBlobContainer container, string prefix, bool useFlatBlobListing, BlobListingDetails blobListingDetails, int? maxResults, BlobContinuationToken currentToken, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken) + { + //BlobResultSegment is sealed without any public constructors. + throw new NotImplementedException(); + } + + /// + /// The storage context + /// + public AzureStorageContext StorageContext + { + get { return null; } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Service/MockStorageFileManagement.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Service/MockStorageFileManagement.cs new file mode 100644 index 000000000000..f5a8a9fc5ea4 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Service/MockStorageFileManagement.cs @@ -0,0 +1,143 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; +using Microsoft.WindowsAzure.Management.Storage.Test.Common; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.File; + +namespace Microsoft.WindowsAzure.Management.Storage.Test.Service +{ + public sealed class MockStorageFileManagement : IStorageFileManagement + { + private const string MockupConnectionString = "DefaultEndpointsProtocol=http;AccountName=MockUp;AccountKey=FjUfNl1KiJttbXlsdkMzBTC7WagvrRM9/g6UPBuy0ypCpAbYTL6/KA+dI/7gyoWvLFYmah3IviUP1jykOHHOlA=="; + + private CloudFileClient client = CloudStorageAccount.Parse(MockupConnectionString).CreateCloudFileClient(); + + private Dictionary enumerationResults = new Dictionary(); + + private List availableShareNames = new List(); + + private List availableDirectoryNames = new List(); + + public void SetsEnumerationResults(string directoryName, IEnumerable enumerationItems) + { + this.enumerationResults[directoryName] = enumerationItems.ToArray(); + } + + public void SetsAvailableShare(params string[] shareNames) + { + availableShareNames.AddRange(shareNames); + } + + public void SetsAvailableDirectories(params string[] directoryNames) + { + this.availableDirectoryNames.AddRange(directoryNames); + } + + public CloudFileShare GetShareReference(string shareName) + { + return client.GetShareReference(shareName); + } + + public Task EnumerateFilesAndDirectoriesAsync(CloudFileDirectory directory, Action enumerationAction, FileRequestOptions options, OperationContext operationContext, CancellationToken token) + { + IListFileItem[] enumerationItems; + if (this.enumerationResults.TryGetValue(directory.Name, out enumerationItems)) + { + foreach (var item in enumerationItems) + { + enumerationAction(item); + } + + return TaskEx.FromResult(true); + } + else + { + throw new MockupException("DirectoryNotFound"); + } + } + + public Task FetchShareAttributesAsync(CloudFileShare share, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken token) + { + if (this.availableShareNames.Contains(share.Name)) + { + return TaskEx.FromResult(true); + } + else + { + throw new MockupException("ShareNotExist"); + } + } + + public Task EnumerateSharesAsync(string prefix, ShareListingDetails detailsIncluded, Action enumerationAction, FileRequestOptions options, OperationContext operationContext, CancellationToken token) + { + foreach (var shareName in this.availableShareNames) + { + if (shareName.StartsWith(prefix)) + { + enumerationAction(this.client.GetShareReference(shareName)); + } + } + + return TaskEx.FromResult(true); + } + + public Task CreateDirectoryAsync(CloudFileDirectory directory, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken) + { + return TaskEx.FromResult(true); + } + + public Task DirectoryExistsAsync(CloudFileDirectory directory, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken) + { + return TaskEx.FromResult(this.availableDirectoryNames.Contains(directory.Name)); + } + + public Task FileExistsAsync(CloudFile file, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken) + { + return TaskEx.FromResult(true); + } + + public Task CreateShareAsync(CloudFileShare share, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken) + { + return TaskEx.FromResult(share); + } + + public Task DeleteDirectoryAsync(CloudFileDirectory directory, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken) + { + return TaskEx.FromResult(true); + } + + public Task DeleteShareAsync(CloudFileShare share, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken) + { + return TaskEx.FromResult(true); + } + + public Task DeleteFileAsync(CloudFile file, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken) + { + return TaskEx.FromResult(true); + } + + public AzureStorageContext StorageContext + { + get { throw new NotImplementedException(); } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Service/MockStorageQueueManagement.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Service/MockStorageQueueManagement.cs new file mode 100644 index 000000000000..e026f1bad807 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Service/MockStorageQueueManagement.cs @@ -0,0 +1,166 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Queue; +using Microsoft.WindowsAzure.Storage.Queue.Protocol; + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Service +{ + /// + /// Mocked queue management + /// + public class MockStorageQueueManagement : IStorageQueueManagement + { + /// + /// Exists queue lists + /// + public List queueList = new List(); + + /// + /// Queue end point + /// + private string QueueEndPoint = "http://127.0.0.1/account/"; + + /// + /// List storage queues + /// + /// Queue name prefix + /// Queue listing details + /// Queue request options + /// Operation context + /// An enumerable collection of the queues in the storage account. + public IEnumerable ListQueues(string prefix, QueueListingDetails queueListingDetails, QueueRequestOptions options, OperationContext operationContext) + { + if(string.IsNullOrEmpty(prefix)) + { + return queueList; + } + else + { + List prefixQueues = new List(); + foreach(CloudQueue queue in queueList) + { + if(queue.Name.StartsWith(prefix)) + { + prefixQueues.Add(queue); + } + } + return prefixQueues; + } + } + + /// + /// Fetch queue attributes + /// + /// Cloud queue object + /// Queue request options + /// Operation context + public void FetchAttributes(CloudQueue queue, QueueRequestOptions options, OperationContext operationContext) + { + return; + } + + /// + /// Get queue reference + /// + /// Queue name + /// Cloud Queue object + public CloudQueue GetQueueReference(string name) + { + Uri queueUri = new Uri(String.Format("{0}{1}", QueueEndPoint, name)); + return new CloudQueue(queueUri); + } + + /// + /// Create an cloud queue on azure if not exists. + /// + /// Cloud queue object. + /// Queue request options + /// Operation context + /// True if the queue did not already exist and was created; otherwise false. + public bool CreateQueueIfNotExists(CloudQueue queue, QueueRequestOptions options, OperationContext operationContext) + { + CloudQueue queueRef = GetQueueReference(queue.Name); + if (DoesQueueExist(queueRef, options, operationContext)) + { + return false; + } + else + { + queueRef = GetQueueReference(queue.Name); + queueList.Add(queueRef); + return true; + } + } + + /// + /// Delete the specified storage queue. + /// + /// Cloud queue object + /// Queue request options + /// Operation context + public void DeleteQueue(CloudQueue queue, QueueRequestOptions options, OperationContext operationContext) + { + foreach (CloudQueue queueRef in queueList) + { + if (queue.Name == queueRef.Name) + { + queueList.Remove(queueRef); + return; + } + } + } + + /// + /// Checks existence of the queue. + /// + /// Cloud queue object + /// Queue request options + /// Operation context + /// True if the queue exists, otherwise false + public bool DoesQueueExist(CloudQueue queue, QueueRequestOptions requestOptions, OperationContext operationContext) + { + foreach (CloudQueue queueRef in queueList) + { + if (queue.Name == queueRef.Name) + { + return true; + } + } + return false; + } + + /// + /// Get queue permission + /// + /// CloudQueue object + /// Queue request options + /// Operation context + /// Queue permission + public QueuePermissions GetPermissions(CloudQueue queue, QueueRequestOptions options, OperationContext operationContext) + { + throw new NotImplementedException(); + } + + public AzureStorageContext StorageContext + { + get { throw new NotImplementedException(); } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Service/MockStorageTableManagement.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Service/MockStorageTableManagement.cs new file mode 100644 index 000000000000..5a990cdcb7aa --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Service/MockStorageTableManagement.cs @@ -0,0 +1,177 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright 2012 Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Table; + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Service +{ + /// + /// Mocked table management + /// + public class MockStorageTableManagement : IStorageTableManagement + { + /// + /// Exists table lists + /// + public List tableList = new List(); + + /// + /// Table end point + /// + private string TableEndPoint = "http://127.0.0.1/account/"; + + /// + /// List azure storage tables + /// + /// Table name prefix + /// Table request options + /// Operation context + /// An enumerable collection of tables that begin with the specified prefix + public IEnumerable ListTables(string prefix, TableRequestOptions requestOptions, OperationContext operationContext) + { + if (String.IsNullOrEmpty(prefix)) + { + return tableList; + } + else + { + List prefixTables = new List(); + + foreach (CloudTable table in tableList) + { + if (table.Name.ToLower().StartsWith(prefix.ToLower())) + { + prefixTables.Add(table); + } + } + + return prefixTables; + } + } + + /// + /// Get table reference from azure server + /// + /// Table name + /// Table request options + /// Operation context + /// A CloudTable object if the specified table exists, otherwise null. + public CloudTable GetTableReferenceFromServer(string name, TableRequestOptions requestOptions, OperationContext operationContext) + { + foreach (CloudTable table in tableList) + { + if (table.Name == name) + { + return table; + } + } + return null; + } + + /// + /// Get a table reference + /// + /// Table name + /// Cloud table object + public CloudTable GetTableReference(string name) + { + Uri tableUri = new Uri(String.Format("{0}{1}", TableEndPoint, name)); + CloudTableClient tableClient = new CloudTableClient(new Uri(TableEndPoint), null); + return new CloudTable(tableUri); + } + + /// + /// Cloud a azure storage table if not exists. + /// + /// Cloud table object + /// Table request options + /// Operation context + /// True if table was created; otherwise, false. + public bool CreateTableIfNotExists(CloudTable table, TableRequestOptions requestOptions, OperationContext operationContext) + { + CloudTable tableRef = GetTableReferenceFromServer(table.Name, requestOptions, operationContext); + + if (tableRef != null) + { + return false; + } + else + { + tableRef = GetTableReference(table.Name); + tableList.Add(tableRef); + return true; + } + } + + /// + /// Delete the specified azure storage table + /// + /// Cloud table object + /// Table request options + /// Operation context + public void Delete(CloudTable table, TableRequestOptions requestOptions = null, OperationContext operationContext = null) + { + foreach (CloudTable tableRef in tableList) + { + if (table.Name == tableRef.Name) + { + tableList.Remove(tableRef); + return; + } + } + } + + /// + /// Checks whether the table exists. + /// + /// Cloud table object + /// Table request options + /// Operation context + /// True if table exists; otherwise, false. + public bool DoesTableExist(CloudTable table, TableRequestOptions requestOptions, OperationContext operationContext) + { + foreach (CloudTable tableRef in tableList) + { + if (table.Name == tableRef.Name) + { + return true; + } + } + + return false; + } + + /// + /// Get table permission + /// + /// CloudTable object + /// Table request options + /// Operation context + /// Table permission + public TablePermissions GetTablePermissions(CloudTable table, TableRequestOptions requestOptions, OperationContext operationContext) + { + throw new NotImplementedException(); + } + + public AzureStorageContext StorageContext + { + get { throw new NotImplementedException(); } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/StorageTestBase.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/StorageTestBase.cs new file mode 100644 index 000000000000..7ae10e9bea80 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/StorageTestBase.cs @@ -0,0 +1,127 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ----------------------------------------------------------------------------------- + +using System; +using System.Diagnostics; +using System.Threading.Tasks; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; + +namespace Microsoft.WindowsAzure.Commands.Storage.Test +{ + /// + /// Test base class for storage package + /// + public class StorageTestBase + { + /// + /// Mock command line run time + /// + public MockCommandRuntime MockCmdRunTime + { + get; + set; + } + + /// + /// Get an unique string + /// + /// unique string prefix + /// replace "-" to the specific character + /// an unique string + public static string GetUniqueString(string prefix = "", string replaceBar = "-") + { + string name = prefix + System.Guid.NewGuid().ToString().Replace("-", replaceBar); + return name; + } + + /// + /// Ensure an action throws a specific type of Exception. + /// + /// Expected exception type. + /// + /// The action that should throw when executed. + /// + public static void AssertThrows(Action action) + where T : Exception + { + Debug.Assert(action != null); + + try + { + action(); + Assert.Fail("No exception was thrown!"); + } + catch (Exception ex) + { + Assert.IsInstanceOfType(ex, typeof(T)); + } + } + + /// + /// Ensure an action throws a specific type of Exception. + /// + /// Expected exception type. + /// + /// The action that should throw when executed. + /// + /// + /// Expected exception message. + /// + public static void AssertThrows(Action action, string expectedMessage) + where T : Exception + { + Debug.Assert(action != null); + + try + { + action(); + Assert.Fail("No exception was thrown!"); + } + catch (Exception ex) + { + Assert.IsInstanceOfType(ex, typeof(T)); + Assert.AreEqual(expectedMessage, ex.Message); + } + } + + /// + /// Ensure an async action throws a specific type of Exception. + /// + /// Expected exception type. + /// + /// The action that should throw when executed. + /// + /// + /// Expected exception message. + /// + public static void AssertThrowsAsync(Func action, string expectedMessage) + where T : Exception + { + Debug.Assert(action != null); + + try + { + action().Wait(); + Assert.Fail("No exception was thrown!"); + } + catch (AggregateException ex) + { + Exception innerException = ex.InnerException; + Assert.IsInstanceOfType(innerException, typeof(T)); + Assert.AreEqual(expectedMessage, innerException.Message); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Table/GetAzureStorageTableTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Table/GetAzureStorageTableTest.cs new file mode 100644 index 000000000000..a03cab416009 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Table/GetAzureStorageTableTest.cs @@ -0,0 +1,153 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright 2012 Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Table.Cmdlet; +using Microsoft.WindowsAzure.Storage.Table; + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Table +{ + [TestClass] + public class GetAzureStorageTableTest : StorageTableStorageTestBase + { + public GetAzureStorageTableCommand command = null; + + [TestInitialize] + public void InitCommand() + { + command = new GetAzureStorageTableCommand(tableMock) + { + CommandRuntime = MockCmdRunTime + }; + } + + [TestCleanup] + public void CleanCommand() + { + command = null; + } + + [TestMethod] + public void ListTablesByNameWithEmptyNameTest() + { + List tableList = command.ListTablesByName("").ToList(); + Assert.AreEqual(0, tableList.Count); + + AddTestTables(); + tableList = command.ListTablesByName("").ToList(); + Assert.AreEqual(2, tableList.Count); + } + + [TestMethod] + public void ListTablesByNameWithWildCardTest() + { + AddTestTables(); + + List tableList = command.ListTablesByName("te*t").ToList(); + Assert.AreEqual(2, tableList.Count); + + tableList = command.ListTablesByName("tx*t").ToList(); + Assert.AreEqual(0, tableList.Count); + + tableList = command.ListTablesByName("t?st").ToList(); + Assert.AreEqual(1, tableList.Count); + Assert.AreEqual("test", tableList[0].Name); + } + + [TestMethod] + public void ListTablesByNameWithInvalidNameTest() + { + string invalidName = "a"; + AssertThrows(() => command.ListTablesByName(invalidName).ToList(), + String.Format(Resources.InvalidTableName, invalidName)); + + invalidName = "xx%%d"; + AssertThrows(() => command.ListTablesByName(invalidName).ToList(), + String.Format(Resources.InvalidTableName, invalidName)); + } + + [TestMethod] + public void ListTablesByNameWithNoExistsTableTest() + { + string notExistingName = "abcdefg"; + AssertThrows(() => command.ListTablesByName(notExistingName).ToList(), + String.Format(Resources.TableNotFound, notExistingName)); + } + + [TestMethod] + public void ListTablesByNameSuccessfullyTest() + { + AddTestTables(); + List tableList = command.ListTablesByName("text").ToList(); + Assert.AreEqual(1, tableList.Count); + Assert.AreEqual("text", tableList[0].Name); + } + + [TestMethod] + public void ListTablesByPrefixWithInvalidPrefixTest() + { + AssertThrows(() => command.ListTablesByPrefix(String.Empty), + String.Format(Resources.InvalidTableName, String.Empty)); + + string prefix = "?"; + AssertThrows(() => command.ListTablesByPrefix(prefix), + String.Format(Resources.InvalidTableName, prefix)); + } + + [TestMethod] + public void ListTablesByPrefixSuccessfullyTest() + { + AddTestTables(); + MockCmdRunTime.ResetPipelines(); + List tableList = command.ListTablesByPrefix("te").ToList(); + Assert.AreEqual(2, tableList.Count); + + tableList = command.ListTablesByPrefix("tes").ToList(); + Assert.AreEqual(1, tableList.Count); + Assert.AreEqual("test", tableList[0].Name); + + tableList = command.ListTablesByPrefix("testx").ToList(); + Assert.AreEqual(0, tableList.Count); + } + + [TestMethod] + public void WriteTablesWithStorageContextTest() + { + command.WriteTablesWithStorageContext(null); + Assert.AreEqual(0, MockCmdRunTime.OutputPipeline.Count); + + MockCmdRunTime.ResetPipelines(); + command.WriteTablesWithStorageContext(tableMock.tableList); + Assert.AreEqual(0, MockCmdRunTime.OutputPipeline.Count); + + AddTestTables(); + MockCmdRunTime.ResetPipelines(); + command.WriteTablesWithStorageContext(tableMock.tableList); + Assert.AreEqual(2, MockCmdRunTime.OutputPipeline.Count); + } + + [TestMethod] + public void ExecuteCommandGetTableTest() + { + AddTestTables(); + command.Name = "test"; + command.ExecuteCmdlet(); + Assert.AreEqual(1, MockCmdRunTime.OutputPipeline.Count); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Table/NewAzureStorageTableSasTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Table/NewAzureStorageTableSasTest.cs new file mode 100644 index 000000000000..fff1ac3efd49 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Table/NewAzureStorageTableSasTest.cs @@ -0,0 +1,77 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright 2012 Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Storage.Table.Cmdlet; +using Microsoft.WindowsAzure.Storage.Table; + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Table +{ + [TestClass] + public class NewAzureStorageTableSasTest : StorageTableStorageTestBase + { + public NewAzureStorageTableSasTokenCommand command = null; + + [TestInitialize] + public void InitCommand() + { + command = new NewAzureStorageTableSasTokenCommand(tableMock) + { + CommandRuntime = MockCmdRunTime + }; + } + + [TestCleanup] + public void CleanCommand() + { + command = null; + } + + [TestMethod] + public void SetupAccessPolicyPermissionTest() + { + SharedAccessTablePolicy accessPolicy = new SharedAccessTablePolicy(); + command.SetupAccessPolicyPermission(accessPolicy, ""); + Assert.AreEqual(accessPolicy.Permissions, SharedAccessTablePermissions.None); + accessPolicy.Permissions = SharedAccessTablePermissions.Add; + command.SetupAccessPolicyPermission(accessPolicy, ""); + Assert.AreEqual(accessPolicy.Permissions, SharedAccessTablePermissions.Add); + command.SetupAccessPolicyPermission(accessPolicy, "u"); + Assert.AreEqual(accessPolicy.Permissions, SharedAccessTablePermissions.Update); + command.SetupAccessPolicyPermission(accessPolicy, "uUUU"); + Assert.AreEqual(accessPolicy.Permissions, SharedAccessTablePermissions.Update); + command.SetupAccessPolicyPermission(accessPolicy, "drrq"); + Assert.AreEqual(accessPolicy.Permissions, SharedAccessTablePermissions.Delete | SharedAccessTablePermissions.Query); + command.SetupAccessPolicyPermission(accessPolicy, "rq"); + Assert.AreEqual(accessPolicy.Permissions, SharedAccessTablePermissions.Query); + command.SetupAccessPolicyPermission(accessPolicy, "q"); + Assert.AreEqual(accessPolicy.Permissions, SharedAccessTablePermissions.Query); + command.SetupAccessPolicyPermission(accessPolicy, "r"); + Assert.AreEqual(accessPolicy.Permissions, SharedAccessTablePermissions.Query); + command.SetupAccessPolicyPermission(accessPolicy, "qd"); + Assert.AreEqual(accessPolicy.Permissions, SharedAccessTablePermissions.Delete | SharedAccessTablePermissions.Query); + command.SetupAccessPolicyPermission(accessPolicy, "audq"); + Assert.AreEqual(accessPolicy.Permissions, SharedAccessTablePermissions.Add + | SharedAccessTablePermissions.Query | SharedAccessTablePermissions.Update | SharedAccessTablePermissions.Delete); + command.SetupAccessPolicyPermission(accessPolicy, "dqaaaau"); + Assert.AreEqual(accessPolicy.Permissions, SharedAccessTablePermissions.Add + | SharedAccessTablePermissions.Query | SharedAccessTablePermissions.Update | SharedAccessTablePermissions.Delete); + AssertThrows(() => command.SetupAccessPolicyPermission(accessPolicy, "rwDl")); + AssertThrows(() => command.SetupAccessPolicyPermission(accessPolicy, "x")); + AssertThrows(() => command.SetupAccessPolicyPermission(accessPolicy, "rwx")); + AssertThrows(() => command.SetupAccessPolicyPermission(accessPolicy, "ABC")); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Table/NewAzureStorageTableTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Table/NewAzureStorageTableTest.cs new file mode 100644 index 000000000000..e2755378fad5 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Table/NewAzureStorageTableTest.cs @@ -0,0 +1,90 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright 2012 Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; +using Microsoft.WindowsAzure.Commands.Storage.Table.Cmdlet; + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Table +{ + [TestClass] + public class NewAzureStorageTableTest : StorageTableStorageTestBase + { + public NewAzureStorageTableCommand command = null; + + [TestInitialize] + public void InitCommand() + { + command = new NewAzureStorageTableCommand(tableMock) + { + CommandRuntime = MockCmdRunTime + }; + } + + [TestCleanup] + public void CleanCommand() + { + command = null; + } + + [TestMethod] + public void CreateAzureTableWithInvalidNameTest() + { + string name = String.Empty; + AssertThrows(() => command.CreateAzureTable(name), + String.Format(Resources.InvalidTableName, name)); + + name = "a"; + AssertThrows(() => command.CreateAzureTable(name), + String.Format(Resources.InvalidTableName, name)); + + name = "&*("; + AssertThrows(() => command.CreateAzureTable(name), + String.Format(Resources.InvalidTableName, name)); + } + + [TestMethod] + public void CreateAzureTableWithExistTableTest() + { + AddTestTables(); + string name = "text"; + AssertThrows(() => command.CreateAzureTable(name), + String.Format(Resources.TableAlreadyExists, name)); + } + + [TestMethod] + public void CreateAzureTableSuccessfullyTest() + { + string name = "test"; + AzureStorageTable table = command.CreateAzureTable(name); + Assert.AreEqual("test", table.Name); + + AssertThrows(() => command.CreateAzureTable(name), + String.Format(Resources.TableAlreadyExists, name)); + } + + [TestMethod] + public void ExcuteCommandNewTableTest() + { + string name = "tablename"; + command.Name = name; + command.ExecuteCmdlet(); + AzureStorageTable table = (AzureStorageTable)MockCmdRunTime.OutputPipeline.FirstOrDefault(); + Assert.AreEqual(name, table.Name); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Table/RemoveAzureStorageTableTest.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Table/RemoveAzureStorageTableTest.cs new file mode 100644 index 000000000000..f11886fa98b1 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Table/RemoveAzureStorageTableTest.cs @@ -0,0 +1,105 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright 2012 Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; +using Microsoft.WindowsAzure.Commands.Storage.Table.Cmdlet; + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Table +{ + [TestClass] + public class RemoveAzureStorageTableTest: StorageTableStorageTestBase + { + internal FakeRemoveAzureTableCommand command = null; + + [TestInitialize] + public void InitCommand() + { + command = new FakeRemoveAzureTableCommand(tableMock) + { + CommandRuntime = MockCmdRunTime + }; + } + + [TestCleanup] + public void CleanCommand() + { + command = null; + } + + [TestMethod] + public void RemoveTableWithInvalidNameTest() + { + string name = "a*b"; + AssertThrows(() => command.RemoveAzureTable(name), + String.Format(Resources.InvalidTableName, name)); + } + + [TestMethod] + public void RemvoeTableWithNotExistsTableTest() + { + string name = "test"; + AssertThrows(() => command.RemoveAzureTable(name), + String.Format(Resources.TableNotFound, name)); + } + + [TestMethod] + public void RemoveTableSuccessfullyTest() + { + AddTestTables(); + string name = "test"; + bool removed = command.RemoveAzureTable(name); + Assert.IsFalse(removed); + + AddTestTables(); + name = "text"; + command.confirm = true; + removed = command.RemoveAzureTable(name); + Assert.IsTrue(removed); + + AddTestTables(); + name = "text"; + command.Force = true; + command.confirm = false; + removed = command.RemoveAzureTable(name); + Assert.IsTrue(removed); + } + + [TestMethod] + public void ExecuteCommandRemoveAzureTable() + { + string name = "test"; + command.Name = name; + AssertThrows(() => command.ExecuteCmdlet(), + String.Format(Resources.TableNotFound, name)); + } + } + + internal class FakeRemoveAzureTableCommand : RemoveAzureStorageTableCommand + { + public bool confirm = false; + + public FakeRemoveAzureTableCommand(IStorageTableManagement channel) + { + Channel = channel; + } + + internal override bool ConfirmRemove(string message) + { + return confirm; + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/Table/StorageTableStorageTestBase.cs b/src/ServiceManagement/Storage/Commands.Storage.Test/Table/StorageTableStorageTestBase.cs new file mode 100644 index 000000000000..beafc5780db9 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/Table/StorageTableStorageTestBase.cs @@ -0,0 +1,49 @@ +// +// Copyright 2012 Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Storage.Test.Service; +using Microsoft.WindowsAzure.Storage.Table; + +namespace Microsoft.WindowsAzure.Commands.Storage.Test.Table +{ + public class StorageTableStorageTestBase : StorageTestBase + { + public MockStorageTableManagement tableMock = null; + + [TestInitialize] + public void InitMock() + { + tableMock = new MockStorageTableManagement(); + MockCmdRunTime = new MockCommandRuntime(); + } + + [TestCleanup] + public void CleanMock() + { + tableMock = null; + } + + public void AddTestTables() + { + tableMock.tableList.Clear(); + string testUri = "https://127.0.0.1/account/test"; + string textUri = "https://127.0.0.1/account/text"; + + tableMock.tableList.Add(new CloudTable(new Uri(testUri))); + tableMock.tableList.Add(new CloudTable(new Uri(textUri))); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage.Test/packages.config b/src/ServiceManagement/Storage/Commands.Storage.Test/packages.config new file mode 100644 index 000000000000..9909d4d14279 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage.Test/packages.config @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlob.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlob.cs new file mode 100644 index 000000000000..a082183566d6 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlob.cs @@ -0,0 +1,286 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Security.Permissions; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; +using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet +{ + /// + /// list azure blobs in specified azure container + /// + [Cmdlet(VerbsCommon.Get, StorageNouns.Blob, DefaultParameterSetName = NameParameterSet), + OutputType(typeof(AzureStorageBlob))] + public class GetAzureStorageBlobCommand : StorageCloudBlobCmdletBase + { + /// + /// default parameter set name + /// + private const string NameParameterSet = "BlobName"; + + /// + /// prefix parameter set name + /// + private const string PrefixParameterSet = "BlobPrefix"; + + [Parameter(Position = 0, HelpMessage = "Blob name", ParameterSetName = NameParameterSet)] + public string Blob + { + get + { + return blobName; + } + + set + { + blobName = value; + } + } + + private string blobName = String.Empty; + + [Parameter(HelpMessage = "Blob Prefix", ParameterSetName = PrefixParameterSet)] + public string Prefix + { + get + { + return blobPrefix; + } + + set + { + blobPrefix = value; + } + } + private string blobPrefix = String.Empty; + + [Alias("N", "Name")] + [Parameter(Position = 1, Mandatory = true, HelpMessage = "Container name", + ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public string Container + { + get + { + return containerName; + } + + set + { + containerName = value; + } + } + + private string containerName = String.Empty; + + [Parameter(Mandatory = false, HelpMessage = "The max count of the blobs that can return.")] + public int? MaxCount + { + get { return InternalMaxCount; } + set + { + if (value.Value <= 0) + { + InternalMaxCount = int.MaxValue; + } + else + { + InternalMaxCount = value.Value; + } + } + } + + private int InternalMaxCount = int.MaxValue; + + [Parameter(Mandatory = false, HelpMessage = "Continuation Token.")] + public BlobContinuationToken ContinuationToken { get; set; } + + /// + /// Initializes a new instance of the GetAzureStorageBlobCommand class. + /// + public GetAzureStorageBlobCommand() + : this(null) + { + } + + /// + /// Initializes a new instance of the GetAzureStorageBlobCommand class. + /// + /// IStorageBlobManagement channel + public GetAzureStorageBlobCommand(IStorageBlobManagement channel) + { + Channel = channel; + } + + /// + /// get the CloudBlobContainer object by name if container exists + /// + /// container name + /// return CloudBlobContianer object if specified container exists, otherwise throw an exception + internal async Task GetCloudBlobContainerByName(IStorageBlobManagement localChannel, string containerName, bool skipCheckExists = false) + { + if (!NameUtil.IsValidContainerName(containerName)) + { + throw new ArgumentException(String.Format(Resources.InvalidContainerName, containerName)); + } + + BlobRequestOptions requestOptions = RequestOptions; + CloudBlobContainer container = localChannel.GetContainerReference(containerName); + + if (!skipCheckExists && container.ServiceClient.Credentials.IsSharedKey + && ! await localChannel.DoesContainerExistAsync(container, requestOptions, OperationContext, CmdletCancellationToken)) + { + throw new ArgumentException(String.Format(Resources.ContainerNotFound, containerName)); + } + + return container; + } + + /// + /// list blobs by blob name and container name + /// + /// container name + /// blob name pattern + /// An enumerable collection of IListBlobItem + internal async Task ListBlobsByName(long taskId, IStorageBlobManagement localChannel, string containerName, string blobName) + { + CloudBlobContainer container = null; + BlobRequestOptions requestOptions = RequestOptions; + AccessCondition accessCondition = null; + + string prefix = string.Empty; + + if (String.IsNullOrEmpty(blobName) || WildcardPattern.ContainsWildcardCharacters(blobName)) + { + container = await GetCloudBlobContainerByName(localChannel, containerName); + prefix = NameUtil.GetNonWildcardPrefix(blobName); + WildcardOptions options = WildcardOptions.IgnoreCase | WildcardOptions.Compiled; + WildcardPattern wildcard = null; + + if (!String.IsNullOrEmpty(blobName)) + { + wildcard = new WildcardPattern(blobName, options); + } + + Func blobFilter = (blob) => wildcard == null || wildcard.IsMatch(blob.Name); + await ListBlobsByPrefix(taskId, localChannel, containerName, prefix, blobFilter); + } + else + { + container = await GetCloudBlobContainerByName(localChannel, containerName, true); + + if (!NameUtil.IsValidBlobName(blobName)) + { + throw new ArgumentException(String.Format(Resources.InvalidBlobName, blobName)); + } + + ICloudBlob blob = await localChannel.GetBlobReferenceFromServerAsync(container, blobName, accessCondition, requestOptions, OperationContext, CmdletCancellationToken); + + if (null == blob) + { + throw new ResourceNotFoundException(String.Format(Resources.BlobNotFound, blobName, containerName)); + } + else + { + WriteICloudBlobObject(taskId, localChannel, blob); + } + } + } + + /// + /// list blobs by blob prefix and container name + /// + /// container name + /// blob preifx + /// An enumerable collection of IListBlobItem + internal async Task ListBlobsByPrefix(long taskId, IStorageBlobManagement localChannel, string containerName, string prefix, Func blobFilter = null) + { + CloudBlobContainer container = await GetCloudBlobContainerByName(localChannel, containerName); + + BlobRequestOptions requestOptions = RequestOptions; + bool useFlatBlobListing = true; + BlobListingDetails details = BlobListingDetails.Snapshots | BlobListingDetails.Metadata | BlobListingDetails.Copy; + + int listCount = InternalMaxCount; + int MaxListCount = 5000; + int requestCount = MaxListCount; + int realListCount = 0; + BlobContinuationToken continuationToken = ContinuationToken; + + do + { + requestCount = Math.Min(listCount, MaxListCount); + realListCount = 0; + BlobResultSegment blobResult = await localChannel.ListBlobsSegmentedAsync(container, prefix, useFlatBlobListing, + details, requestCount, continuationToken, requestOptions, OperationContext, CmdletCancellationToken); + + foreach (IListBlobItem blobItem in blobResult.Results) + { + ICloudBlob blob = blobItem as ICloudBlob; + + if (blob == null) + { + continue; + } + + if (blobFilter == null || blobFilter(blob)) + { + WriteICloudBlobObject(taskId, localChannel, blob, blobResult.ContinuationToken); + realListCount++; + } + } + + if (InternalMaxCount != int.MaxValue) + { + listCount -= realListCount; + } + + continuationToken = blobResult.ContinuationToken; + } + while (listCount > 0 && continuationToken != null); + } + + /// + /// Execute command + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + Func taskGenerator = null; + IStorageBlobManagement localChannel = Channel; + + if (PrefixParameterSet == ParameterSetName) + { + string localContainerName = containerName; + string localPrefix = blobPrefix; + taskGenerator = (taskId) => ListBlobsByPrefix(taskId, localChannel, localContainerName, localPrefix); + } + else + { + string localContainerName = containerName; + string localBlobName = blobName; + taskGenerator = (taskId) => ListBlobsByName(taskId, localChannel, localContainerName, localBlobName); + } + + RunTask(taskGenerator); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlobContent.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlobContent.cs new file mode 100644 index 000000000000..c982d7df5a60 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlobContent.cs @@ -0,0 +1,309 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.IO; +using System.Management.Automation; +using System.Security.Permissions; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; +using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Blob; +using Microsoft.WindowsAzure.Storage.DataMovement.TransferJobs; + +namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet +{ + [Cmdlet(VerbsCommon.Get, StorageNouns.BlobContent, ConfirmImpact = ConfirmImpact.High, DefaultParameterSetName = ManualParameterSet), + OutputType(typeof(AzureStorageBlob))] + public class GetAzureStorageBlobContentCommand : StorageDataMovementCmdletBase + { + /// + /// manually set the name parameter + /// + private const string ManualParameterSet = "ReceiveManual"; + + /// + /// blob pipeline + /// + private const string BlobParameterSet = "BlobPipeline"; + + /// + /// container pipeline + /// + private const string ContainerParameterSet = "ContainerPipeline"; + + [Parameter(HelpMessage = "Azure Blob Object", Mandatory = true, + ValueFromPipelineByPropertyName = true, ParameterSetName = BlobParameterSet)] + [ValidateNotNull] + public ICloudBlob ICloudBlob { get; set; } + + [Parameter(HelpMessage = "Azure Container Object", Mandatory = true, + ValueFromPipelineByPropertyName = true, ParameterSetName = ContainerParameterSet)] + [ValidateNotNull] + public CloudBlobContainer CloudBlobContainer { get; set; } + + [Parameter(Position = 0, HelpMessage = "Blob name", + Mandatory = true, ParameterSetName = ManualParameterSet)] + [Parameter(Position = 0, HelpMessage = "Blob name", + Mandatory = true, ParameterSetName = ContainerParameterSet)] + public string Blob + { + get { return BlobName; } + set { BlobName = value; } + } + private string BlobName = String.Empty; + + [Parameter(Position = 1, HelpMessage = "Container name", + Mandatory = true, ParameterSetName = ManualParameterSet)] + public string Container + { + get { return ContainerName; } + set { ContainerName = value; } + } + private string ContainerName = String.Empty; + + [Alias("Path")] + [Parameter(HelpMessage = "File Path")] + public string Destination + { + get { return FileName; } + set { FileName = value; } + } + public string FileName = String.Empty; + + [Parameter(HelpMessage = "check the md5sum")] + public SwitchParameter CheckMd5 + { + get { return checkMd5; } + set { checkMd5 = value; } + } + private bool checkMd5; + + private AzureToFileSystemFileNameResolver fileNameResolver; + + /// + /// Initializes a new instance of the GetAzureStorageBlobContentCommand class. + /// + public GetAzureStorageBlobContentCommand() + : this(null) + { + } + + /// + /// Initializes a new instance of the GetAzureStorageBlobContentCommand class. + /// + /// IStorageBlobManagement channel + public GetAzureStorageBlobContentCommand(IStorageBlobManagement channel) + { + Channel = channel; + fileNameResolver = new AzureToFileSystemFileNameResolver(() => NameUtil.WindowsMaxFileNameLength); + } + + /// + /// Download blob to local file + /// + /// Source blob object + /// Destination file path + internal virtual async Task DownloadBlob(long taskId, IStorageBlobManagement localChannel, ICloudBlob blob, string filePath) + { + string activity = String.Format(Resources.ReceiveAzureBlobActivity, blob.Name, filePath); + string status = Resources.PrepareDownloadingBlob; + ProgressRecord pr = new ProgressRecord(OutputStream.GetProgressId(taskId), activity, status); + DataMovementUserData data = new DataMovementUserData() + { + Data = blob, + TaskId = taskId, + Channel = localChannel, + Record = pr + }; + + BlobDownloadJob downloadJob = new BlobDownloadJob() + { + SourceBlob = blob, + DestPath = filePath, + }; + + BlobRequestOptions requestOptions = downloadJob.BlobRequestOptions; + requestOptions.DisableContentMD5Validation = !checkMd5; + downloadJob.BlobRequestOptions = requestOptions; + + await this.RunTransferJob(downloadJob, data); + + this.WriteICloudBlobObject(data.TaskId, data.Channel, blob); + } + + /// + /// get blob content + /// + /// source container name + /// source blob name + /// file name + /// the downloaded AzureStorageBlob object + internal void GetBlobContent(string containerName, string blobName, string fileName) + { + if (!NameUtil.IsValidBlobName(blobName)) + { + throw new ArgumentException(String.Format(Resources.InvalidBlobName, blobName)); + } + + if (!NameUtil.IsValidContainerName(containerName)) + { + throw new ArgumentException(String.Format(Resources.InvalidContainerName, containerName)); + } + + CloudBlobContainer container = Channel.GetContainerReference(containerName); + BlobRequestOptions requestOptions = RequestOptions; + AccessCondition accessCondition = null; + + ICloudBlob blob = Channel.GetBlobReferenceFromServer(container, blobName, accessCondition, requestOptions, OperationContext); + + if (null == blob) + { + throw new ResourceNotFoundException(String.Format(Resources.BlobNotFound, blobName, containerName)); + } + + GetBlobContent(blob, fileName, true); + } + + /// + /// get blob content + /// + /// source container object + /// source blob name + /// destination file name + /// the downloaded AzureStorageBlob object + internal void GetBlobContent(CloudBlobContainer container, string blobName, string fileName) + { + if (!NameUtil.IsValidBlobName(blobName)) + { + throw new ArgumentException(String.Format(Resources.InvalidBlobName, blobName)); + } + + string filePath = GetFullReceiveFilePath(fileName, blobName, null); + + ValidatePipelineCloudBlobContainer(container); + AccessCondition accessCondition = null; + BlobRequestOptions requestOptions = RequestOptions; + ICloudBlob blob = Channel.GetBlobReferenceFromServer(container, blobName, accessCondition, requestOptions, OperationContext); + + if (null == blob) + { + throw new ResourceNotFoundException(String.Format(Resources.BlobNotFound, blobName, container.Name)); + } + + GetBlobContent(blob, filePath, true); + } + + /// + /// get blob content + /// + /// source ICloudBlob object + /// destination file path + /// whether the source container validated + /// the downloaded AzureStorageBlob object + internal void GetBlobContent(ICloudBlob blob, string fileName, bool isValidBlob = false) + { + if (null == blob) + { + throw new ArgumentNullException(typeof(ICloudBlob).Name, String.Format(Resources.ObjectCannotBeNull, typeof(ICloudBlob).Name)); + } + + //skip download the snapshot except the ICloudBlob pipeline + if (IsSnapshot(blob) && ParameterSetName != BlobParameterSet) + { + WriteWarning(String.Format(Resources.SkipDownloadSnapshot, blob.Name, blob.SnapshotTime)); + return; + } + + string filePath = GetFullReceiveFilePath(fileName, blob.Name, blob.SnapshotTime); + + if (!isValidBlob) + { + ValidatePipelineICloudBlob(blob); + } + + //create the destination directory if not exists. + String dirPath = Path.GetDirectoryName(filePath); + + if (!Directory.Exists(dirPath)) + { + Directory.CreateDirectory(dirPath); + } + + IStorageBlobManagement localChannel = Channel; + Func taskGenerator = (taskId) => DownloadBlob(taskId, localChannel, blob, filePath); + RunTask(taskGenerator); + } + + /// + /// get full file path according to the specified file name + /// + /// File name + /// Source blob name + /// Source blob snapshot time + /// full file path if file path is valid, otherwise throw an exception + internal string GetFullReceiveFilePath(string fileName, string blobName, DateTimeOffset? snapshotTime) + { + String filePath = Path.Combine(CurrentPath(), fileName); + fileName = Path.GetFileName(filePath); + String dirPath = Path.GetDirectoryName(filePath); + + if (!String.IsNullOrEmpty(dirPath) && !Directory.Exists(dirPath)) + { + throw new ArgumentException(String.Format(Resources.DirectoryNotExists, dirPath)); + } + + if (string.IsNullOrEmpty(fileName) || Directory.Exists(filePath)) + { + fileName = fileNameResolver.ResolveFileName(blobName, snapshotTime); + filePath = Path.Combine(filePath, fileName); + } + + fileName = Path.GetFileName(filePath); + + if (!NameUtil.IsValidFileName(fileName)) + { + throw new ArgumentException(String.Format(Resources.InvalidFileName, fileName)); + } + + //there is no need to check the read/write permission on the specified file path, the datamovement libraray will do that + + return filePath; + } + + /// + /// execute command + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + switch (ParameterSetName) + { + case BlobParameterSet: + GetBlobContent(ICloudBlob, FileName, true); + break; + + case ContainerParameterSet: + GetBlobContent(CloudBlobContainer, BlobName, FileName); + break; + + case ManualParameterSet: + GetBlobContent(ContainerName, BlobName, FileName); + break; + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlobCopyState.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlobCopyState.cs new file mode 100644 index 000000000000..807f16f963b6 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageBlobCopyState.cs @@ -0,0 +1,322 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Concurrent; +using System.Management.Automation; +using System.Security.Permissions; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet +{ + [Cmdlet(VerbsCommon.Get, StorageNouns.CopyBlobStatus, DefaultParameterSetName = NameParameterSet), + OutputType(typeof(AzureStorageBlob))] + public class GetAzureStorageBlobCopyState : StorageCloudBlobCmdletBase + { + /// + /// Blob Pipeline parameter set name + /// + private const string BlobPipelineParameterSet = "BlobPipeline"; + + /// + /// container pipeline paremeter set name + /// + private const string ContainerPipelineParmeterSet = "ContainerPipeline"; + + /// + /// blob name and container name parameter set + /// + private const string NameParameterSet = "NamePipeline"; + + [Parameter(HelpMessage = "ICloudBlob Object", Mandatory = true, + ValueFromPipelineByPropertyName = true, ParameterSetName = BlobPipelineParameterSet)] + public ICloudBlob ICloudBlob { get; set; } + + [Parameter(HelpMessage = "CloudBlobContainer Object", Mandatory = true, + ValueFromPipelineByPropertyName = true, ParameterSetName = ContainerPipelineParmeterSet)] + public CloudBlobContainer CloudBlobContainer { get; set; } + + [Parameter(ParameterSetName = ContainerPipelineParmeterSet, Mandatory = true, Position = 0, HelpMessage = "Blob name")] + [Parameter(ParameterSetName = NameParameterSet, Mandatory = true, Position = 0, HelpMessage = "Blob name")] + public string Blob + { + get { return BlobName; } + set { BlobName = value; } + } + private string BlobName = String.Empty; + + [Parameter(HelpMessage = "Container name", Mandatory = true, Position = 1, + ParameterSetName = NameParameterSet)] + [ValidateNotNullOrEmpty] + public string Container + { + get { return ContainerName; } + set { ContainerName = value; } + } + private string ContainerName = String.Empty; + + [Parameter(HelpMessage = "Wait for copy task complete")] + public SwitchParameter WaitForComplete + { + get { return waitForComplete;} + set { waitForComplete = value; } + } + private bool waitForComplete; + + /// + /// ICloudBlob objects which need to mointor until copy complete + /// + private ConcurrentQueue> jobList = new ConcurrentQueue>(); + private ConcurrentDictionary TaskStatus = new ConcurrentDictionary(); + + /// + /// Is the specified task completed + /// + /// Task id + /// True if the specified task completed, otherwise false + protected bool IsTaskCompleted(long taskId) + { + bool finished = false; + bool existed = TaskStatus.TryGetValue(taskId, out finished); + return existed && finished; + } + + /// + /// Copy task count + /// + private long InternalTotalTaskCount = 0; + private long InternalFailedCount = 0; + private long InternalFinishedCount = 0; + + /// + /// Execute command + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + ICloudBlob blob = default(ICloudBlob); + + switch (ParameterSetName) + { + case NameParameterSet: + blob = GetICloudBlobObject(ContainerName, BlobName); + break; + case ContainerPipelineParmeterSet: + blob = GetICloudBlobObject(CloudBlobContainer, BlobName); + break; + case BlobPipelineParameterSet: + blob = GetICloudBlobObject(ICloudBlob); + break; + } + + long taskId = InternalTotalTaskCount; + jobList.Enqueue(new Tuple(taskId, blob)); + InternalTotalTaskCount++; + } + + /// + /// Write transmit summary status + /// + protected override void WriteTransmitSummaryStatus() + { + long localTotal = Interlocked.Read(ref InternalTotalTaskCount); + long localFailed = Interlocked.Read(ref InternalFailedCount); + long localFinished = Interlocked.Read(ref InternalFinishedCount); + + string summary = String.Format(Resources.TransmitActiveSummary, localTotal, + localFailed, localFinished, (localTotal - localFailed - localFinished)); + summaryRecord.StatusDescription = summary; + WriteProgress(summaryRecord); + } + + /// + /// Update failed/finished task count + /// + /// Copy status + private void UpdateTaskCount(CopyStatus status) + { + switch (status) + { + case CopyStatus.Invalid: + case CopyStatus.Failed: + case CopyStatus.Aborted: + Interlocked.Increment(ref InternalFailedCount); + break; + case CopyStatus.Pending: + break; + case CopyStatus.Success: + default: + Interlocked.Increment(ref InternalFinishedCount); + break; + } + } + + /// + /// Write copy progress + /// + /// ICloud blob object + /// Progress record + internal void WriteCopyProgress(ICloudBlob blob, ProgressRecord progress) + { + if(blob.CopyState == null) return ; + long bytesCopied = blob.CopyState.BytesCopied ?? 0; + long totalBytes = blob.CopyState.TotalBytes ?? 0; + int percent = 0; + + if (totalBytes != 0) + { + percent = (int)(bytesCopied * 100 / totalBytes); + progress.PercentComplete = percent; + } + + string activity = String.Format(Resources.CopyBlobStatus, blob.CopyState.Status.ToString(), blob.Name, blob.Container.Name, blob.CopyState.Source.ToString()); + progress.Activity = activity; + string message = String.Format(Resources.CopyBlobPendingStatus, percent, blob.CopyState.BytesCopied, blob.CopyState.TotalBytes); + progress.StatusDescription = message; + OutputStream.WriteProgress(progress); + } + + /// + /// Get blob with copy status by name + /// + /// Container name + /// blob name + /// ICloudBlob object + private ICloudBlob GetICloudBlobObject(string containerName, string blobName) + { + CloudBlobContainer container = Channel.GetContainerReference(containerName); + return GetICloudBlobObject(container, blobName); + } + + /// + /// Get blob with copy status by CloudBlobContainer object + /// + /// CloudBlobContainer object + /// Blob name + /// ICloudBlob object + private ICloudBlob GetICloudBlobObject(CloudBlobContainer container, string blobName) + { + AccessCondition accessCondition = null; + BlobRequestOptions options = RequestOptions; + + ValidateBlobName(blobName); + ValidateContainerName(container.Name); + + ICloudBlob blob = Channel.GetBlobReferenceFromServer(container, blobName, accessCondition, options, OperationContext); + + if (blob == null) + { + throw new ResourceNotFoundException(String.Format(Resources.BlobNotFound, blobName, container.Name)); + } + + return GetICloudBlobObject(blob); + } + + /// + /// Get blob with copy status by ICloudBlob object + /// + /// ICloudBlob object + /// ICloudBlob object + private ICloudBlob GetICloudBlobObject(ICloudBlob blob) + { + ValidateBlobName(blob.Name); + return blob; + } + + protected override void EndProcessing() + { + int currency = GetCmdletConcurrency(); + + OutputStream.TaskStatusQueryer = IsTaskCompleted; + + for (int i = 0; i < currency; i++) + { + Func taskGenerator = (taskId) => MonitorBlobCopyStatusAsync(taskId); + RunTask(taskGenerator); + } + + base.EndProcessing(); + } + + /// + /// Cmdlet end processing + /// + protected async Task MonitorBlobCopyStatusAsync(long taskId) + { + ProgressRecord records = new ProgressRecord(OutputStream.GetProgressId(taskId), Resources.CopyBlobActivity, Resources.CopyBlobActivity); + Tuple monitorRequest = null; + BlobRequestOptions requestOptions = RequestOptions; + AccessCondition accessCondition = null; + OperationContext context = OperationContext; + + while(!jobList.IsEmpty) + { + jobList.TryDequeue(out monitorRequest); + + if(monitorRequest != null) + { + long internalTaskId = monitorRequest.Item1; + ICloudBlob blob = monitorRequest.Item2; + //Just use the last blob management channel since the following operation is context insensitive + await Channel.FetchBlobAttributesAsync(blob, accessCondition, requestOptions, context, CmdletCancellationToken); + bool taskDone = false; + + if (blob.CopyState == null) + { + ArgumentException e = new ArgumentException(String.Format(Resources.CopyTaskNotFound, blob.Name, blob.Container.Name)); + OutputStream.WriteError(internalTaskId, e); + Interlocked.Increment(ref InternalFailedCount); + taskDone = true; + } + else + { + WriteCopyProgress(blob, records); + UpdateTaskCount(blob.CopyState.Status); + + if (blob.CopyState.Status == CopyStatus.Pending && waitForComplete) + { + jobList.Enqueue(monitorRequest); + } + else + { + OutputStream.WriteObject(internalTaskId, blob.CopyState); + taskDone = true; + } + } + + if (taskDone) + { + SetInternalTaskDone(internalTaskId); + } + } + + if (ShouldForceQuit) + { + break; + } + } + } + + private void SetInternalTaskDone(long taskId) + { + bool finishedTaskStatus = true; + TaskStatus.TryAdd(taskId, finishedTaskStatus); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageContainer.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageContainer.cs new file mode 100644 index 000000000000..de5b3c50ae8a --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/GetAzureStorageContainer.cs @@ -0,0 +1,264 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using System.Security.Permissions; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; +using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet +{ + /// + /// List azure storage container + /// + [Cmdlet(VerbsCommon.Get, StorageNouns.Container, DefaultParameterSetName = NameParameterSet), + OutputType(typeof(AzureStorageContainer))] + public class GetAzureStorageContainerCommand : StorageCloudBlobCmdletBase + { + /// + /// Default parameter set name + /// + private const string NameParameterSet = "ContainerName"; + + /// + /// Prefix parameter set name + /// + private const string PrefixParameterSet = "ContainerPrefix"; + + [Alias("N", "Container")] + [Parameter(Position = 0, HelpMessage = "Container Name", + ValueFromPipelineByPropertyName = true, + ValueFromPipeline = true, + ParameterSetName = NameParameterSet)] + public string Name { get; set; } + + [Parameter(HelpMessage = "Container Prefix", + ParameterSetName = PrefixParameterSet, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Prefix { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "The max count of the containers that can return.")] + public int? MaxCount + { + get { return InternalMaxCount; } + set + { + if (value.Value <= 0) + { + InternalMaxCount = int.MaxValue; + } + else + { + InternalMaxCount = value.Value; + } + } + } + + private int InternalMaxCount = int.MaxValue; + + [Parameter(Mandatory = false, HelpMessage = "Continuation Token.")] + public BlobContinuationToken ContinuationToken { get; set; } + + /// + /// Initializes a new instance of the GetAzureStorageContainerCommand class. + /// + public GetAzureStorageContainerCommand() + : this(null) + { + } + + /// + /// Initializes a new instance of the GetAzureStorageContainerCommand class. + /// + /// IStorageBlobManagement channel + public GetAzureStorageContainerCommand(IStorageBlobManagement channel) + { + Channel = channel; + } + + /// + /// List containers by container name pattern. + /// + /// Container name pattern + /// An enumerable collection of cloudblob container + internal IEnumerable> ListContainersByName(string name) + { + string prefix = string.Empty; + BlobRequestOptions requestOptions = RequestOptions; + AccessCondition accessCondition = null; + + if (String.IsNullOrEmpty(name) || WildcardPattern.ContainsWildcardCharacters(name)) + { + prefix = NameUtil.GetNonWildcardPrefix(name); + WildcardOptions options = WildcardOptions.IgnoreCase | WildcardOptions.Compiled; + WildcardPattern wildcard = null; + + if (!string.IsNullOrEmpty(name)) + { + wildcard = new WildcardPattern(name, options); + } + + Func containerFilter = (container) => null == wildcard || wildcard.IsMatch(container.Name); + + IEnumerable> containerList = ListContainersByPrefix(prefix, containerFilter); + + foreach (var containerInfo in containerList) + { + yield return containerInfo; + } + } + else + { + if (!NameUtil.IsValidContainerName(name)) + { + throw new ArgumentException(String.Format(Resources.InvalidContainerName, name)); + } + + CloudBlobContainer container = Channel.GetContainerReference(name); + + if (Channel.DoesContainerExist(container, requestOptions, OperationContext)) + { + //fetch container attributes + Channel.FetchContainerAttributes(container, accessCondition, requestOptions, OperationContext); + yield return new Tuple(container, null); + } + else + { + throw new ResourceNotFoundException(String.Format(Resources.ContainerNotFound, name)); + } + } + } + + /// + /// List containers by container name prefix + /// + /// Container name prefix + /// An enumerable collection of cloudblobcontainer + internal IEnumerable> ListContainersByPrefix(string prefix, Func containerFilter = null) + { + ContainerListingDetails details = ContainerListingDetails.Metadata; + BlobRequestOptions requestOptions = RequestOptions; + + if (!string.IsNullOrEmpty(prefix) && !NameUtil.IsValidContainerPrefix(prefix)) + { + throw new ArgumentException(String.Format(Resources.InvalidContainerName, prefix)); + } + + int listCount = InternalMaxCount; + int MaxListCount = 5000; + int requestCount = MaxListCount; + int realListCount = 0; + BlobContinuationToken continuationToken = ContinuationToken; + + do + { + requestCount = Math.Min(listCount, MaxListCount); + realListCount = 0; + + ContainerResultSegment containerResult = Channel.ListContainersSegmented(prefix, details, requestCount, continuationToken, requestOptions, OperationContext); + + foreach (CloudBlobContainer container in containerResult.Results) + { + if (containerFilter == null || containerFilter(container)) + { + yield return new Tuple(container, containerResult.ContinuationToken); + realListCount++; + } + } + + if (InternalMaxCount != int.MaxValue) + { + listCount -= realListCount; + } + + continuationToken = containerResult.ContinuationToken; + } + while (listCount > 0 && continuationToken != null); + } + + /// + /// Pack CloudBlobContainer and it's permission to AzureStorageContainer object + /// + /// An enumerable collection of CloudBlobContainer + /// An enumerable collection of AzureStorageContainer + internal void PackCloudBlobContainerWithAcl(IEnumerable> containerList) + { + if (null == containerList) + { + return; + } + + IStorageBlobManagement localChannel = Channel; + foreach (Tuple containerInfo in containerList) + { + Func generator = (taskId) => GetContainerPermission(taskId, localChannel, containerInfo.Item1, containerInfo.Item2); + RunTask(generator); + } + } + + /// + /// Async get container permission + /// + /// CloudBlobContainer object + /// Task id + /// Azure storage context + /// + internal async Task GetContainerPermission(long taskId, IStorageBlobManagement localChannel, CloudBlobContainer container, BlobContinuationToken continuationToken) + { + BlobRequestOptions requestOptions = RequestOptions; + AccessCondition accessCondition = null; + BlobContainerPermissions permissions = null; + try + { + permissions = await localChannel.GetContainerPermissionsAsync(container, accessCondition, + requestOptions, OperationContext, CmdletCancellationToken); + } + catch(StorageException e) + { + if(!e.IsNotFoundException()) + { + throw; + } + //404 Not found means we don't have permission to query the Permission of the specified container. + } + WriteCloudContainerObject(taskId, localChannel, container, permissions, continuationToken); + } + + /// + /// Execute command + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + IEnumerable> containerList = null; + + if (PrefixParameterSet == ParameterSetName) + { + containerList = ListContainersByPrefix(Prefix); + } + else + { + containerList = ListContainersByName(Name); + } + + PackCloudBlobContainerWithAcl(containerList); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageBlobSasToken.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageBlobSasToken.cs new file mode 100644 index 000000000000..71e681d7e719 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageBlobSasToken.cs @@ -0,0 +1,236 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet +{ + [Cmdlet(VerbsCommon.New, StorageNouns.BlobSas, DefaultParameterSetName = BlobNamePipelineParmeterSetWithPermission), OutputType(typeof(String))] + public class NewAzureStorageBlobSasTokenCommand : StorageCloudBlobCmdletBase + { + /// + /// container pipeline paremeter set name with permission + /// + private const string BlobNamePipelineParmeterSetWithPermission = "BlobNameWithPermission"; + + /// + /// container pipeline paremeter set name with policy + /// + private const string BlobNamePipelineParmeterSetWithPolicy = "BlobNameWithPolicy"; + + /// + /// Blob Pipeline parameter set name with permission + /// + private const string BlobPipelineParameterSetWithPermision = "BlobPipelineWithPermission"; + + /// + /// Blob Pipeline parameter set name with policy + /// + private const string BlobPipelineParameterSetWithPolicy = "BlobPipelineWithPolicy"; + + [Parameter(HelpMessage = "ICloudBlob Object", Mandatory = true, + ValueFromPipelineByPropertyName = true, ParameterSetName = BlobPipelineParameterSetWithPolicy)] + [Parameter(HelpMessage = "ICloudBlob Object", Mandatory = true, + ValueFromPipelineByPropertyName = true, ParameterSetName = BlobPipelineParameterSetWithPermision)] + public ICloudBlob ICloudBlob { get; set; } + + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Container Name", + ParameterSetName = BlobNamePipelineParmeterSetWithPermission)] + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Container Name", + ParameterSetName = BlobNamePipelineParmeterSetWithPolicy)] + [ValidateNotNullOrEmpty] + public string Container { get; set; } + + [Parameter(Position = 1, Mandatory = true, HelpMessage = "Blob Name", + ParameterSetName = BlobNamePipelineParmeterSetWithPermission)] + [Parameter(Position = 1, Mandatory = true, HelpMessage = "Blob Name", + ParameterSetName = BlobNamePipelineParmeterSetWithPolicy)] + [ValidateNotNullOrEmpty] + public string Blob { get; set; } + + [Parameter(HelpMessage = "Policy Identifier", ParameterSetName = BlobNamePipelineParmeterSetWithPolicy)] + [Parameter(HelpMessage = "Policy Identifier", ParameterSetName = BlobPipelineParameterSetWithPolicy)] + public string Policy + { + get { return accessPolicyIdentifier; } + set { accessPolicyIdentifier = value; } + } + private string accessPolicyIdentifier; + + [Parameter(HelpMessage = "Permissions for a blob. Permissions can be any not-empty subset of \"rwd\".", + ParameterSetName = BlobNamePipelineParmeterSetWithPermission)] + [Parameter(HelpMessage = "Permissions for a blob. Permissions can be any not-empty subset of \"rwd\".", + ParameterSetName = BlobPipelineParameterSetWithPermision)] + public string Permission { get; set; } + + [Parameter(HelpMessage = "Start Time")] + public DateTime? StartTime { get; set; } + + [Parameter(HelpMessage = "Expiry Time")] + public DateTime? ExpiryTime { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Display full uri with sas token")] + public SwitchParameter FullUri { get; set; } + + // Overwrite the useless parameter + public override int? ServerTimeoutPerRequest { get; set; } + public override int? ClientTimeoutPerRequest { get; set; } + public override int? ConcurrentTaskCount { get; set; } + + /// + /// Initializes a new instance of the NewAzureStorageBlobSasCommand class. + /// + public NewAzureStorageBlobSasTokenCommand() + : this(null) + { + } + + /// + /// Initializes a new instance of the NewAzureStorageBlobSasCommand class. + /// + /// IStorageBlobManagement channel + public NewAzureStorageBlobSasTokenCommand(IStorageBlobManagement channel) + { + Channel = channel; + EnableMultiThread = false; + } + + /// + /// Execute command + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + ICloudBlob blob = default(ICloudBlob); + + if (ParameterSetName == BlobNamePipelineParmeterSetWithPermission || + ParameterSetName == BlobNamePipelineParmeterSetWithPolicy) + { + blob = GetICloudBlobByName(Container, Blob); + } + else + { + blob = ICloudBlob; + } + + SharedAccessBlobPolicy accessPolicy = new SharedAccessBlobPolicy(); + bool shouldSetExpiryTime = SasTokenHelper.ValidateContainerAccessPolicy(Channel, blob.Container.Name, accessPolicy, accessPolicyIdentifier); + SetupAccessPolicy(accessPolicy, shouldSetExpiryTime); + string sasToken = GetBlobSharedAccessSignature(blob, accessPolicy, accessPolicyIdentifier); + + if (FullUri) + { + string fullUri = blob.Uri.ToString() + sasToken; + WriteObject(fullUri); + } + else + { + WriteObject(sasToken); + } + + } + + /// + /// Get blob shared access signature + /// + /// ICloudBlob object + /// SharedAccessBlobPolicy object + /// The existing policy identifier. + /// + private string GetBlobSharedAccessSignature(ICloudBlob blob, SharedAccessBlobPolicy accessPolicy, string policyIdentifier) + { + CloudBlobContainer container = blob.Container; + string signature = String.Empty; + + switch (blob.BlobType) + { + case BlobType.BlockBlob: + CloudBlockBlob blockBlob = blob as CloudBlockBlob; + signature = blockBlob.GetSharedAccessSignature(accessPolicy, policyIdentifier); + break; + case BlobType.PageBlob: + CloudPageBlob pageBlob = blob as CloudPageBlob; + signature = pageBlob.GetSharedAccessSignature(accessPolicy, policyIdentifier); + break; + default: + throw new ArgumentException(Resources.UnknownBlob); + } + + return signature; + } + + /// + /// Update the access policy + /// + /// Access policy object + /// Should set the default expiry time + private void SetupAccessPolicy(SharedAccessBlobPolicy accessPolicy, bool shouldSetExpiryTime) + { + SetupAccessPolicyPermission(accessPolicy, Permission); + DateTimeOffset? accessStartTime; + DateTimeOffset? accessEndTime; + SasTokenHelper.SetupAccessPolicyLifeTime(StartTime, ExpiryTime, + out accessStartTime, out accessEndTime, shouldSetExpiryTime); + accessPolicy.SharedAccessStartTime = accessStartTime; + accessPolicy.SharedAccessExpiryTime = accessEndTime; + } + + /// + /// Set up access policy permission + /// + /// SharedAccessBlobPolicy object + /// Permisson + internal void SetupAccessPolicyPermission(SharedAccessBlobPolicy policy, string permission) + { + if (string.IsNullOrEmpty(permission)) return; + policy.Permissions = SharedAccessBlobPermissions.None; + permission = permission.ToLower(); + foreach (char op in permission) + { + switch (op) + { + case StorageNouns.Permission.Read: + policy.Permissions |= SharedAccessBlobPermissions.Read; + break; + case StorageNouns.Permission.Write: + policy.Permissions |= SharedAccessBlobPermissions.Write; + break; + case StorageNouns.Permission.Delete: + policy.Permissions |= SharedAccessBlobPermissions.Delete; + break; + default: + throw new ArgumentException(string.Format(Resources.InvalidAccessPermission, op)); + } + } + } + + /// + /// Get ICloudBlob object by name + /// + /// Container name + /// Blob name. + /// ICloudBlob object + private ICloudBlob GetICloudBlobByName(string ContainerName, string BlobName) + { + CloudBlobContainer container = Channel.GetContainerReference(ContainerName); + //Create a block blob object in local no mattter what's the real blob type. If so, we can save the unnecessary request calls. + return container.GetBlockBlobReference(BlobName); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainer.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainer.cs new file mode 100644 index 000000000000..705fff66c209 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainer.cs @@ -0,0 +1,108 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Security.Permissions; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; +using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet +{ + /// + /// create a new azure container + /// + [Cmdlet(VerbsCommon.New, StorageNouns.Container), + OutputType(typeof(AzureStorageContainer))] + public class NewAzureStorageContainerCommand : StorageCloudBlobCmdletBase + { + [Alias("N", "Container")] + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Container name", + ValueFromPipeline = true, + ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Alias("PublicAccess")] + [Parameter(Position = 1, Mandatory = false, + HelpMessage = "Permission string Off/Blob/Container")] + + public BlobContainerPublicAccessType? Permission + { + get { return accessLevel; } + set { accessLevel = value.Value; } + } + private BlobContainerPublicAccessType accessLevel = BlobContainerPublicAccessType.Off; + + /// + /// Initializes a new instance of the NewAzureStorageContainerCommand class. + /// + public NewAzureStorageContainerCommand() + : this(null) + { + } + + /// + /// Initializes a new instance of the NewAzureStorageContainerCommand class. + /// + /// IStorageBlobManagement channel + public NewAzureStorageContainerCommand(IStorageBlobManagement channel) + { + Channel = channel; + } + + /// + /// create a new azure container + /// + /// container name + internal async Task CreateAzureContainer(long taskId, IStorageBlobManagement localChannel, string name, BlobContainerPublicAccessType accesslevel) + { + if (!NameUtil.IsValidContainerName(name)) + { + throw new ArgumentException(String.Format(Resources.InvalidContainerName, name)); + } + + BlobRequestOptions requestOptions = RequestOptions; + CloudBlobContainer container = localChannel.GetContainerReference(name); + + BlobContainerPermissions permissions = new BlobContainerPermissions(); + + permissions.PublicAccess = accesslevel; + + bool created = await localChannel.CreateContainerIfNotExistsAsync(container, permissions.PublicAccess, requestOptions, OperationContext, CmdletCancellationToken); + + if (!created) + { + throw new ResourceAlreadyExistException(String.Format(Resources.ContainerAlreadyExists, name)); + } + + WriteCloudContainerObject(taskId, localChannel, container, permissions); + } + + /// + /// execute command + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + IStorageBlobManagement localChannel = Channel; + string localName = Name; + Func taskGenerator = (taskId) => CreateAzureContainer(taskId, localChannel, localName, accessLevel); + RunTask(taskGenerator); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainerSasToken.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainerSasToken.cs new file mode 100644 index 000000000000..97f25ba8ad33 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/NewAzureStorageContainerSasToken.cs @@ -0,0 +1,162 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet +{ + [Cmdlet(VerbsCommon.New, StorageNouns.ContainerSas), OutputType(typeof(String))] + public class NewAzureStorageContainerSasTokenCommand : StorageCloudBlobCmdletBase + { + /// + /// Sas permission parameter set name + /// + private const string SasPermissionParameterSet = "SasPermission"; + + /// + /// Sas policy paremeter set name + /// + private const string SasPolicyParmeterSet = "SasPolicy"; + + [Alias("N", "Container")] + [Parameter(Position = 0, Mandatory = true, + HelpMessage = "Container Name", + ValueFromPipeline = true, + ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(HelpMessage = "Policy Identifier", ParameterSetName = SasPolicyParmeterSet)] + public string Policy + { + get { return accessPolicyIdentifier; } + set { accessPolicyIdentifier = value; } + } + private string accessPolicyIdentifier; + + [Parameter(HelpMessage = "Permissions for a container. Permissions can be any not-empty subset of \"rwdl\".", + ParameterSetName = SasPermissionParameterSet)] + public string Permission { get; set; } + + [Parameter(HelpMessage = "Start Time")] + public DateTime? StartTime { get; set; } + + [Parameter(HelpMessage = "Expiry Time")] + public DateTime? ExpiryTime { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Display full uri with sas token")] + public SwitchParameter FullUri { get; set; } + + // Overwrite the useless parameter + public override int? ServerTimeoutPerRequest { get; set; } + public override int? ClientTimeoutPerRequest { get; set; } + public override int? ConcurrentTaskCount { get; set; } + + + /// + /// Initializes a new instance of the NewAzureStorageContainerSasCommand class. + /// + public NewAzureStorageContainerSasTokenCommand() + : this(null) + { + } + + /// + /// Initializes a new instance of the NewAzureStorageContainerSasCommand class. + /// + /// IStorageBlobManagement channel + public NewAzureStorageContainerSasTokenCommand(IStorageBlobManagement channel) + { + Channel = channel; + EnableMultiThread = false; + } + + /// + /// Execute command + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + if (String.IsNullOrEmpty(Name)) return; + CloudBlobContainer container = Channel.GetContainerReference(Name); + SharedAccessBlobPolicy accessPolicy = new SharedAccessBlobPolicy(); + bool shouldSetExpiryTime = SasTokenHelper.ValidateContainerAccessPolicy(Channel, container.Name, accessPolicy, accessPolicyIdentifier); + SetupAccessPolicy(accessPolicy, shouldSetExpiryTime); + string sasToken = container.GetSharedAccessSignature(accessPolicy, accessPolicyIdentifier); + + if (FullUri) + { + string fullUri = container.Uri.ToString() + sasToken; + WriteObject(fullUri); + } + else + { + WriteObject(sasToken); + } + } + + /// + /// Update the access policy + /// + /// Access policy object + /// Should set the default expiry time + private void SetupAccessPolicy(SharedAccessBlobPolicy policy, bool shouldSetExpiryTime) + { + DateTimeOffset? accessStartTime; + DateTimeOffset? accessEndTime; + SasTokenHelper.SetupAccessPolicyLifeTime(StartTime, ExpiryTime, + out accessStartTime, out accessEndTime, shouldSetExpiryTime); + policy.SharedAccessStartTime = accessStartTime; + policy.SharedAccessExpiryTime = accessEndTime; + SetupAccessPolicyPermission(policy, Permission); + } + + /// + /// Set up access policy permission + /// + /// SharedAccessBlobPolicy object + /// Permission + internal void SetupAccessPolicyPermission(SharedAccessBlobPolicy policy, string permission) + { + if (string.IsNullOrEmpty(permission)) return; + policy.Permissions = SharedAccessBlobPermissions.None; + permission = permission.ToLower(); + foreach (char op in permission) + { + switch(op) + { + case StorageNouns.Permission.Read: + policy.Permissions |= SharedAccessBlobPermissions.Read; + break; + case StorageNouns.Permission.Write: + policy.Permissions |= SharedAccessBlobPermissions.Write; + break; + case StorageNouns.Permission.Delete: + policy.Permissions |= SharedAccessBlobPermissions.Delete; + break; + case StorageNouns.Permission.List: + policy.Permissions |= SharedAccessBlobPermissions.List; + break; + default: + throw new ArgumentException(string.Format(Resources.InvalidAccessPermission, op)); + } + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/RemoveAzureStorageBlob.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/RemoveAzureStorageBlob.cs new file mode 100644 index 000000000000..04d274c5db7a --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/RemoveAzureStorageBlob.cs @@ -0,0 +1,279 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Security.Permissions; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.Storage.Blob +{ + [Cmdlet(VerbsCommon.Remove, StorageNouns.Blob, DefaultParameterSetName = NameParameterSet, SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High), + OutputType(typeof(Boolean))] + public class RemoveStorageAzureBlobCommand : StorageCloudBlobCmdletBase + { + /// + /// Blob Pipeline parameter set name + /// + private const string BlobPipelineParameterSet = "BlobPipeline"; + + /// + /// container pipeline paremeter set name + /// + private const string ContainerPipelineParameterSet = "ContainerPipeline"; + + /// + /// blob name and container name parameter set + /// + private const string NameParameterSet = "NamePipeline"; + + [Parameter(HelpMessage = "ICloudBlob Object", Mandatory = true, + ValueFromPipelineByPropertyName = true, ParameterSetName = BlobPipelineParameterSet)] + public ICloudBlob ICloudBlob { get; set; } + + [Parameter(HelpMessage = "CloudBlobContainer Object", Mandatory = true, + ValueFromPipelineByPropertyName = true, ParameterSetName = ContainerPipelineParameterSet)] + public CloudBlobContainer CloudBlobContainer { get; set; } + + [Parameter(ParameterSetName = ContainerPipelineParameterSet, Mandatory = true, Position = 0, HelpMessage = "Blob name")] + [Parameter(ParameterSetName = NameParameterSet, Mandatory = true, Position = 0, HelpMessage = "Blob name")] + public string Blob + { + get { return BlobName; } + set { BlobName = value; } + } + private string BlobName = String.Empty; + + [Parameter(HelpMessage = "Container name", Mandatory = true, Position = 1, + ParameterSetName = NameParameterSet)] + [ValidateNotNullOrEmpty] + public string Container + { + get { return ContainerName; } + set { ContainerName = value; } + } + private string ContainerName = String.Empty; + + [Parameter(HelpMessage = "Only delete blob snapshots")] + public SwitchParameter DeleteSnapshot + { + get { return deleteSnapshot; } + set { deleteSnapshot = value; } + } + private bool deleteSnapshot; + + [Parameter(HelpMessage = "Force to remove the blob and its snapshot without confirmation")] + public SwitchParameter Force + { + get { return force; } + set { force = value; } + } + private bool force = false; + + [Parameter(Mandatory = false, HelpMessage = "Return whether the specified blob is successfully removed")] + public SwitchParameter PassThru { get; set; } + + /// + /// Initializes a new instance of the RemoveStorageAzureBlobCommand class. + /// + public RemoveStorageAzureBlobCommand() + : this(null) + { + } + + /// + /// Initializes a new instance of the RemoveStorageAzureBlobCommand class. + /// + /// IStorageBlobManagement channel + public RemoveStorageAzureBlobCommand(IStorageBlobManagement channel) + { + Channel = channel; + } + + /// + /// remove the azure blob + /// + /// ICloudblob object + /// whether the ICloudblob parameter is validated + /// true if the blob is removed successfully, false if user cancel the remove operation + internal async Task RemoveAzureBlob(long taskId, IStorageBlobManagement localChannel, ICloudBlob blob, bool isValidBlob) + { + if (!isValidBlob) + { + ValidatePipelineICloudBlob(blob); + } + + DeleteSnapshotsOption deleteSnapshotsOption = DeleteSnapshotsOption.None; + bool retryDeleteSnapshot = false; + + if (IsSnapshot(blob)) + { + if (deleteSnapshot) + { + throw new ArgumentException(String.Format(Resources.CannotDeleteSnapshotForSnapshot, blob.Name, blob.SnapshotTime)); + } + } + else + { + if (deleteSnapshot) + { + deleteSnapshotsOption = DeleteSnapshotsOption.DeleteSnapshotsOnly; + } + else if (force) + { + deleteSnapshotsOption = DeleteSnapshotsOption.IncludeSnapshots; + } + else + { + retryDeleteSnapshot = true; + } + } + + try + { + await DeleteICloudAsync(taskId, localChannel, blob, deleteSnapshotsOption); + retryDeleteSnapshot = false; + } + catch (StorageException e) + { + if (e.IsConflictException() && retryDeleteSnapshot) + { + //If x-ms-delete-snapshots is not specified on the request and the blob has associated snapshots, the Blob service returns status code 409 (Conflict). + retryDeleteSnapshot = true; + } + else + { + throw; + } + } + + if (retryDeleteSnapshot) + { + string message = string.Format(Resources.ConfirmRemoveBlobWithSnapshot, blob.Name, blob.Container.Name); + + if (await OutputStream.ConfirmAsync(message)) + { + deleteSnapshotsOption = DeleteSnapshotsOption.IncludeSnapshots; + await DeleteICloudAsync(taskId, localChannel, blob, deleteSnapshotsOption); + } + else + { + string result = String.Format(Resources.RemoveBlobCancelled, blob.Name, blob.Container.Name); + OutputStream.WriteVerbose(taskId, result); + } + } + } + + internal async Task DeleteICloudAsync(long taskId, IStorageBlobManagement localChannel, ICloudBlob blob, DeleteSnapshotsOption deleteSnapshotsOption) + { + AccessCondition accessCondition = null; + BlobRequestOptions requestOptions = null; + + await localChannel.DeleteICloudBlobAsync(blob, deleteSnapshotsOption, accessCondition, + requestOptions, OperationContext, CmdletCancellationToken); + + string result = String.Format(Resources.RemoveBlobSuccessfully, blob.Name, blob.Container.Name); + + OutputStream.WriteVerbose(taskId, result); + + if (PassThru) + { + OutputStream.WriteObject(taskId, true); + } + } + + /// + /// remove azure blob + /// + /// CloudBlobContainer object + /// blob name + /// true if the blob is removed successfully, false if user cancel the remove operation + internal async Task RemoveAzureBlob(long taskId, IStorageBlobManagement localChannel, CloudBlobContainer container, string blobName) + { + if (!NameUtil.IsValidBlobName(blobName)) + { + throw new ArgumentException(String.Format(Resources.InvalidBlobName, blobName)); + } + + ValidatePipelineCloudBlobContainer(container); + AccessCondition accessCondition = null; + BlobRequestOptions requestOptions = null; + + ICloudBlob blob = await localChannel.GetBlobReferenceFromServerAsync(container, blobName, accessCondition, + requestOptions, OperationContext, CmdletCancellationToken); + + if (null == blob && container.ServiceClient.Credentials.IsSharedKey) + { + throw new ResourceNotFoundException(String.Format(Resources.BlobNotFound, blobName, container.Name)); + } + else + { + //Construct the blob as CloudBlockBlob no matter what's the real blob type + //We can't get the blob type if Credentials only have the delete permission and don't have read permission. + blob = container.GetBlockBlobReference(blobName); + } + + await RemoveAzureBlob(taskId, localChannel, blob, true); + } + + /// + /// remove azure blob + /// + /// container name + /// blob name + /// true if the blob is removed successfully, false if user cancel the remove operation + internal async Task RemoveAzureBlob(long taskId, IStorageBlobManagement localChannel, string containerName, string blobName) + { + CloudBlobContainer container = localChannel.GetContainerReference(containerName); + await RemoveAzureBlob(taskId, localChannel, container, blobName); + } + + /// + /// execute command + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + Func taskGenerator = null; + IStorageBlobManagement localChannel = Channel; + + switch (ParameterSetName) + { + case BlobPipelineParameterSet: + ICloudBlob localBlob = ICloudBlob; + taskGenerator = (taskId) => RemoveAzureBlob(taskId, localChannel, localBlob, false); + break; + + case ContainerPipelineParameterSet: + CloudBlobContainer localContainer = CloudBlobContainer; + string localName = BlobName; + taskGenerator = (taskId) => RemoveAzureBlob(taskId, localChannel, localContainer, localName); + break; + + case NameParameterSet: + default: + string localContainerName = ContainerName; + string localBlobName = BlobName; + taskGenerator = (taskId) => RemoveAzureBlob(taskId, localChannel, localContainerName, localBlobName); + break; + } + + RunTask(taskGenerator); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/RemoveAzureStorageContainer.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/RemoveAzureStorageContainer.cs new file mode 100644 index 000000000000..b9ff67d67419 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/RemoveAzureStorageContainer.cs @@ -0,0 +1,124 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Security.Permissions; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet +{ + /// + /// remove specified azure container + /// + [Cmdlet(VerbsCommon.Remove, StorageNouns.Container, SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High), + OutputType(typeof(Boolean))] + public class RemoveAzureStorageContainerCommand : StorageCloudBlobCmdletBase + { + [Alias("N", "Container")] + [Parameter(Position = 0, Mandatory = true, + HelpMessage = "Container Name", + ValueFromPipeline = true, + ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(HelpMessage = "Force to remove the container without confirm")] + public SwitchParameter Force + { + get { return force; } + set { force = value; } + } + private bool force; + + [Parameter(Mandatory = false, HelpMessage = "Return whether the specified container is successfully removed")] + public SwitchParameter PassThru { get; set; } + + /// + /// Initializes a new instance of the RemoveAzureStorageContainerCommand class. + /// + public RemoveAzureStorageContainerCommand() + : this(null) + { + } + + /// + /// Initializes a new instance of the RemoveAzureStorageContainerCommand class. + /// + /// IStorageBlobManagement channel + public RemoveAzureStorageContainerCommand(IStorageBlobManagement channel) + { + Channel = channel; + } + + /// + /// remove azure container by container name + /// + /// container name + internal async Task RemoveAzureContainer(long taskId, IStorageBlobManagement localChannel, string name) + { + if (!NameUtil.IsValidContainerName(name)) + { + throw new ArgumentException(String.Format(Resources.InvalidContainerName, name)); + } + + BlobRequestOptions requestOptions = RequestOptions; + AccessCondition accessCondition = null; + + CloudBlobContainer container = localChannel.GetContainerReference(name); + + if (!await localChannel.DoesContainerExistAsync(container, requestOptions, OperationContext, CmdletCancellationToken)) + { + throw new ResourceNotFoundException(String.Format(Resources.ContainerNotFound, name)); + } + + string result = string.Empty; + bool removed = false; + + if (force || await OutputStream.ConfirmAsync(name)) + { + await localChannel.DeleteContainerAsync(container, accessCondition, requestOptions, OperationContext, CmdletCancellationToken); + result = String.Format(Resources.RemoveContainerSuccessfully, name); + removed = true; + } + else + { + result = String.Format(Resources.RemoveContainerCancelled, name); + } + + OutputStream.WriteVerbose(taskId, result); + + if (PassThru) + { + OutputStream.WriteObject(taskId, removed); + } + } + + /// + /// execute command + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + string localName = Name; + IStorageBlobManagement localChannel = Channel; + Func taskGenerator = (taskId) => RemoveAzureContainer(taskId, localChannel, localName); + RunTask(taskGenerator); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageBlobContent.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageBlobContent.cs new file mode 100644 index 000000000000..d0372c3482ff --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageBlobContent.cs @@ -0,0 +1,453 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Management.Automation; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; +using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.DataMovement.TransferJobs; + +namespace Microsoft.WindowsAzure.Commands.Storage.Blob +{ + using StorageBlob = WindowsAzure.Storage.Blob; + + /// + /// download blob from azure + /// + [Cmdlet(VerbsCommon.Set, StorageNouns.BlobContent, ConfirmImpact = ConfirmImpact.High, DefaultParameterSetName = ManualParameterSet), + OutputType(typeof(AzureStorageBlob))] + public class SetAzureBlobContentCommand : StorageDataMovementCmdletBase + { + /// + /// default parameter set name + /// + private const string ManualParameterSet = "SendManual"; + + /// + /// blob pipeline + /// + private const string BlobParameterSet = "BlobPipeline"; + + /// + /// container pipeline + /// + private const string ContainerParameterSet = "ContainerPipeline"; + + /// + /// block blob type + /// + private const string BlockBlobType = "Block"; + + /// + /// page blob type + /// + private const string PageBlobType = "Page"; + + [Alias("FullName")] + [Parameter(Position = 0, Mandatory = true, HelpMessage = "file Path", + ValueFromPipelineByPropertyName = true, ParameterSetName = ManualParameterSet)] + [Parameter(Position = 0, Mandatory = true, HelpMessage = "file Path", + ParameterSetName = ContainerParameterSet)] + [Parameter(Position = 0, Mandatory = true, HelpMessage = "file Path", + ParameterSetName = BlobParameterSet)] + public string File + { + get { return FileName; } + set { FileName = value; } + } + + private string FileName = String.Empty; + + [Parameter(Position = 1, HelpMessage = "Container name", Mandatory = true, ParameterSetName = ManualParameterSet)] + public string Container + { + get { return ContainerName; } + set { ContainerName = value; } + } + + private string ContainerName = String.Empty; + + [Parameter(HelpMessage = "Blob name", ParameterSetName = ManualParameterSet)] + [Parameter(HelpMessage = "Blob name", ParameterSetName = ContainerParameterSet)] + public string Blob + { + get { return BlobName; } + set { BlobName = value; } + } + + public string BlobName = String.Empty; + + [Parameter(HelpMessage = "Azure Blob Container Object", Mandatory = true, + ValueFromPipelineByPropertyName = true, + ParameterSetName = ContainerParameterSet)] + public StorageBlob.CloudBlobContainer CloudBlobContainer { get; set; } + + [Parameter(HelpMessage = "Azure Blob Object", Mandatory = true, + ValueFromPipelineByPropertyName = true, + ParameterSetName = BlobParameterSet)] + public StorageBlob.ICloudBlob ICloudBlob { get; set; } + + [Parameter(HelpMessage = "Blob Type('Block', 'Page')")] + [ValidateSet(BlockBlobType, PageBlobType, IgnoreCase = true)] + public string BlobType + { + get { return blobType; } + set { blobType = value; } + } + private string blobType = BlockBlobType; + + [Parameter(HelpMessage = "Blob Properties", Mandatory = false)] + public Hashtable Properties + { + get + { + return BlobProperties; + } + + set + { + BlobProperties = value; + } + } + + private Hashtable BlobProperties = null; + + [Parameter(HelpMessage = "Blob Metadata", Mandatory = false)] + public Hashtable Metadata + { + get + { + return BlobMetadata; + } + + set + { + BlobMetadata = value; + } + } + + private Hashtable BlobMetadata = null; + + private BlobUploadRequestQueue UploadRequests = new BlobUploadRequestQueue(); + + /// + /// Initializes a new instance of the SetAzureBlobContentCommand class. + /// + public SetAzureBlobContentCommand() + : this(null) + { + } + + /// + /// Initializes a new instance of the SetAzureBlobContentCommand class. + /// + /// IStorageBlobManagement channel + public SetAzureBlobContentCommand(IStorageBlobManagement channel) + { + Channel = channel; + } + + /// + /// upload file to azure blob + /// + /// Task id + /// local file path + /// destination azure blob object + internal virtual async Task Upload2Blob(long taskId, IStorageBlobManagement localChannel, string filePath, StorageBlob.ICloudBlob blob) + { + string activity = String.Format(Resources.SendAzureBlobActivity, filePath, blob.Name, blob.Container.Name); + string status = Resources.PrepareUploadingBlob; + ProgressRecord pr = new ProgressRecord(OutputStream.GetProgressId(taskId), activity, status); + + DataMovementUserData data = new DataMovementUserData() + { + Data = blob, + TaskId = taskId, + Channel = localChannel, + Record = pr + }; + + BlobUploadJob uploadJob = new BlobUploadJob() + { + DestBlob = blob, + SourcePath = filePath + }; + + await this.RunTransferJob(uploadJob, data); + + if (this.BlobProperties != null || this.BlobMetadata != null) + { + await TaskEx.WhenAll( + this.SetBlobProperties(localChannel, blob, this.BlobProperties), + this.SetBlobMeta(localChannel, blob, this.BlobMetadata)); + } + + try + { + await localChannel.FetchBlobAttributesAsync( + blob, + AccessCondition.GenerateEmptyCondition(), + this.RequestOptions, + this.OperationContext, + this.CmdletCancellationToken); + } + catch (StorageException e) + { + //Handle the limited read permission. + if (!e.IsNotFoundException()) + { + throw; + } + } + + WriteICloudBlobObject(data.TaskId, localChannel, blob); + } + + /// + /// get full file path according to the specified file name + /// + /// file name + /// full file path if fileName is valid, empty string if file name is directory + internal string GetFullSendFilePath(string fileName) + { + if (string.IsNullOrEmpty(fileName)) + { + throw new ArgumentException(Resources.FileNameCannotEmpty); + } + + String filePath = Path.Combine(CurrentPath(), fileName); + + return filePath; + } + + /// + /// set azure blob content + /// + /// local file path + /// container name + /// blob name + /// null if user cancel the overwrite operation, otherwise return destination blob object + internal void SetAzureBlobContent(string fileName, string blobName) + { + StorageBlob.BlobType type = StorageBlob.BlobType.BlockBlob; + + if (string.Compare(blobType, PageBlobType, StringComparison.InvariantCultureIgnoreCase) == 0) + { + type = StorageBlob.BlobType.PageBlob; + } + + if (!string.IsNullOrEmpty(blobName) && !NameUtil.IsValidBlobName(blobName)) + { + throw new ArgumentException(String.Format(Resources.InvalidBlobName, blobName)); + } + + string filePath = GetFullSendFilePath(fileName); + + bool isFile = UploadRequests.EnqueueRequest(filePath, type, blobName); + + if (!isFile) + { + WriteWarning(String.Format(Resources.CannotSendDirectory, filePath)); + } + } + + protected override void EndProcessing() + { + while (!UploadRequests.IsEmpty()) + { + Tuple uploadRequest = UploadRequests.DequeueRequest(); + IStorageBlobManagement localChannel = Channel; + Func taskGenerator = (taskId) => Upload2Blob(taskId, localChannel, uploadRequest.Item1, uploadRequest.Item2); + RunTask(taskGenerator); + } + + base.EndProcessing(); + } + + //only support the common blob properties for block blob and page blob + //http://msdn.microsoft.com/en-us/library/windowsazure/ee691966.aspx + private Dictionary> validICloudBlobProperties = + new Dictionary>(StringComparer.OrdinalIgnoreCase) + { + {"CacheControl", (p, v) => p.CacheControl = v}, + {"ContentEncoding", (p, v) => p.ContentEncoding = v}, + {"ContentLanguage", (p, v) => p.ContentLanguage = v}, + {"ContentMD5", (p, v) => p.ContentMD5 = v}, + {"ContentType", (p, v) => p.ContentType = v}, + }; + + /// + /// check whether the blob properties is valid + /// + /// Blob properties table + private void ValidateBlobProperties(Hashtable properties) + { + if (properties == null) + { + return; + } + + foreach (DictionaryEntry entry in properties) + { + if (!validICloudBlobProperties.ContainsKey(entry.Key.ToString())) + { + throw new ArgumentException(String.Format(Resources.InvalidBlobProperties, entry.Key.ToString(), entry.Value.ToString())); + } + } + } + + /// + /// set blob properties + /// + /// ICloudBlob object + /// blob properties hashtable + private async Task SetBlobProperties(IStorageBlobManagement localChannel, StorageBlob.ICloudBlob blob, Hashtable properties) + { + if (properties == null) + { + return; + } + + foreach (DictionaryEntry entry in properties) + { + string key = entry.Key.ToString(); + string value = entry.Value.ToString(); + Action action = validICloudBlobProperties[key]; + + if (action != null) + { + action(blob.Properties, value); + } + } + + AccessCondition accessCondition = null; + StorageBlob.BlobRequestOptions requestOptions = RequestOptions; + + await Channel.SetBlobPropertiesAsync(blob, accessCondition, requestOptions, OperationContext, CmdletCancellationToken); + } + + /// + /// set blob meta + /// + /// ICloudBlob object + /// meta data hashtable + private async Task SetBlobMeta(IStorageBlobManagement localChannel, StorageBlob.ICloudBlob blob, Hashtable meta) + { + if (meta == null) + { + return; + } + + foreach (DictionaryEntry entry in meta) + { + string key = entry.Key.ToString(); + string value = entry.Value.ToString(); + + if (blob.Metadata.ContainsKey(key)) + { + blob.Metadata[key] = value; + } + else + { + blob.Metadata.Add(key, value); + } + } + + AccessCondition accessCondition = null; + StorageBlob.BlobRequestOptions requestOptions = RequestOptions; + + await Channel.SetBlobMetadataAsync(blob, accessCondition, requestOptions, OperationContext, CmdletCancellationToken); + } + + /// + /// On Task run successfully + /// + /// User data + protected override void OnTaskSuccessful(DataMovementUserData data) + { + StorageBlob.ICloudBlob blob = data.Data as StorageBlob.ICloudBlob; + IStorageBlobManagement localChannel = data.Channel; + + if (blob != null) + { + AccessCondition accessCondition = null; + StorageBlob.BlobRequestOptions requestOptions = RequestOptions; + + if (BlobProperties != null || BlobMetadata != null) + { + Task[] tasks = new Task[2]; + tasks[0] = SetBlobProperties(localChannel, blob, BlobProperties); + tasks[1] = SetBlobMeta(localChannel, blob, BlobMetadata); + Task.WaitAll(tasks); + } + + try + { + localChannel.FetchBlobAttributesAsync(blob, accessCondition, requestOptions, OperationContext, CmdletCancellationToken).Wait(); + } + catch (AggregateException e) + { + StorageException storageException = e.InnerException as StorageException; + //Handle the limited read permission. + if (storageException == null || !storageException.IsNotFoundException()) + { + throw e.InnerException; + } + } + + WriteICloudBlobObject(data.TaskId, localChannel, blob); + } + } + + /// + /// execute command + /// + public override void ExecuteCmdlet() + { + if (BlobProperties != null) + { + ValidateBlobProperties(BlobProperties); + } + + string containerName = string.Empty; + + switch (ParameterSetName) + { + case ContainerParameterSet: + SetAzureBlobContent(FileName, BlobName); + containerName = CloudBlobContainer.Name; + break; + + case BlobParameterSet: + SetAzureBlobContent(FileName, ICloudBlob.Name); + containerName = ICloudBlob.Container.Name; + break; + + case ManualParameterSet: + default: + SetAzureBlobContent(FileName, BlobName); + containerName = ContainerName; + break; + } + + UploadRequests.SetDestinationContainer(Channel, containerName); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageContainerAcl.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageContainerAcl.cs new file mode 100644 index 000000000000..daf4dadb9d88 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/SetAzureStorageContainerAcl.cs @@ -0,0 +1,115 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Security.Permissions; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; +using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.Storage.Cmdlet +{ + /// + /// set access level for specified container + /// + [Cmdlet(VerbsCommon.Set, StorageNouns.ContainerAcl), + OutputType(typeof(AzureStorageContainer))] + public class SetAzureStorageContainerAclCommand : StorageCloudBlobCmdletBase + { + [Alias("N", "Container")] + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Container Name", + ValueFromPipeline = true, + ValueFromPipelineByPropertyName = true)] + public string Name { get; set; } + + [Alias("PublicAccess")] + [Parameter(Position = 1, Mandatory = true, + HelpMessage = "Permission string Off/Blob/Container")] + public BlobContainerPublicAccessType Permission + { + get { return accessLevel; } + set { accessLevel = value; } + } + private BlobContainerPublicAccessType accessLevel = BlobContainerPublicAccessType.Off; + + [Parameter(Mandatory = false, HelpMessage = "Display Container Information")] + public SwitchParameter PassThru { get; set; } + + /// + /// Initializes a new instance of the SetAzureStorageContainerAclCommand class. + /// + public SetAzureStorageContainerAclCommand() + : this(null) + { + } + + /// + /// Initializes a new instance of the SetAzureStorageContainerAclCommand class. + /// + /// IStorageBlobManagement channel + public SetAzureStorageContainerAclCommand(IStorageBlobManagement channel) + { + Channel = channel; + } + + /// + /// set the access level of specified container + /// + /// container name + /// access level in ("off", "blob", "container") + internal async Task SetContainerAcl(long taskId, IStorageBlobManagement localChannel, string name, BlobContainerPublicAccessType accessLevel) + { + if (!NameUtil.IsValidContainerName(name)) + { + throw new ArgumentException(String.Format(Resources.InvalidContainerName, name)); + } + + BlobContainerPermissions permissions = new BlobContainerPermissions(); + permissions.PublicAccess = accessLevel; + + BlobRequestOptions requestOptions = RequestOptions; + AccessCondition accessCondition = null; + + CloudBlobContainer container = localChannel.GetContainerReference(name); + + if (!await localChannel.DoesContainerExistAsync(container, requestOptions, OperationContext, CmdletCancellationToken)) + { + throw new ResourceNotFoundException(String.Format(Resources.ContainerNotFound, name)); + } + + await localChannel.SetContainerPermissionsAsync(container, permissions, accessCondition, requestOptions, OperationContext, CmdletCancellationToken); + + if (PassThru) + { + WriteCloudContainerObject(taskId, localChannel, container, permissions); + } + } + + /// + /// execute command + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + string localName = Name; + IStorageBlobManagement localChannel = Channel; + Func taskGenerator = (taskId) => SetContainerAcl(taskId, localChannel, localName, accessLevel); + RunTask(taskGenerator); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/StartAzureStorageBlobCopy.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/StartAzureStorageBlobCopy.cs new file mode 100644 index 000000000000..484d26d31fdb --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/StartAzureStorageBlobCopy.cs @@ -0,0 +1,449 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using System.Security.Permissions; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; +using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Blob; +using Microsoft.WindowsAzure.Storage.DataMovement.TransferJobs; + +namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet +{ + [Cmdlet(VerbsLifecycle.Start, StorageNouns.CopyBlob, ConfirmImpact = ConfirmImpact.High, DefaultParameterSetName = NameParameterSet), + OutputType(typeof(AzureStorageBlob))] + public class StartAzureStorageBlobCopy : StorageDataMovementCmdletBase + { + /// + /// Blob Pipeline parameter set name + /// + private const string SrcBlobParameterSet = "BlobPipeline"; + + /// + /// Blob Pipeline parameter set name + /// + private const string DestBlobPipelineParameterSet = "DestBlobPipeline"; + + /// + /// Container pipeline paremeter set name + /// + private const string ContainerPipelineParameterSet = "ContainerPipeline"; + + /// + /// Blob name and container name parameter set + /// + private const string NameParameterSet = "NamePipeline"; + + /// + /// Source uri parameter set + /// + private const string UriParameterSet = "UriPipeline"; + + [Alias("SrcICloudBlob")] + [Parameter(HelpMessage = "ICloudBlob Object", Mandatory = true, + ValueFromPipelineByPropertyName = true, ParameterSetName = SrcBlobParameterSet)] + [Parameter(HelpMessage = "ICloudBlob Object", Mandatory = true, + ValueFromPipelineByPropertyName = true, ParameterSetName = DestBlobPipelineParameterSet)] + public ICloudBlob ICloudBlob { get; set; } + + [Parameter(HelpMessage = "CloudBlobContainer Object", Mandatory = true, + ValueFromPipelineByPropertyName = true, ParameterSetName = ContainerPipelineParameterSet)] + public CloudBlobContainer CloudBlobContainer { get; set; } + + [Parameter(ParameterSetName = ContainerPipelineParameterSet, Mandatory = true, Position = 0, HelpMessage = "Blob name")] + [Parameter(ParameterSetName = NameParameterSet, Mandatory = true, Position = 0, HelpMessage = "Blob name")] + public string SrcBlob + { + get { return BlobName; } + set { BlobName = value; } + } + private string BlobName = String.Empty; + + [Parameter(HelpMessage = "Source Container name", Mandatory = true, + ParameterSetName = NameParameterSet)] + [ValidateNotNullOrEmpty] + public string SrcContainer + { + get { return ContainerName; } + set { ContainerName = value; } + } + private string ContainerName = String.Empty; + + [Alias("SrcUri")] + [Parameter(HelpMessage = "Source blob uri", Mandatory = true, + ValueFromPipelineByPropertyName = true, ParameterSetName = UriParameterSet)] + public string AbsoluteUri { get; set; } + + [Parameter(HelpMessage = "Destination container name", Mandatory = true, + ParameterSetName = NameParameterSet)] + [Parameter(HelpMessage = "Destination container name", Mandatory = true, + ParameterSetName = UriParameterSet)] + [Parameter(HelpMessage = "Destination container name", Mandatory = true, + ParameterSetName = SrcBlobParameterSet)] + [Parameter(HelpMessage = "Destination container name", Mandatory = true, + ParameterSetName = ContainerPipelineParameterSet)] + public string DestContainer { get; set; } + + [Parameter(HelpMessage = "Destination blob name", Mandatory = true, + ParameterSetName = UriParameterSet)] + [Parameter(HelpMessage = "Destination blob name", Mandatory = false, + ParameterSetName = NameParameterSet)] + [Parameter(HelpMessage = "Destination blob name", Mandatory = false, + ParameterSetName = SrcBlobParameterSet)] + [Parameter(HelpMessage = "Destination container name", Mandatory = false, + ParameterSetName = ContainerPipelineParameterSet)] + public string DestBlob { get; set; } + + [Parameter(HelpMessage = "Destination ICloudBlob object", Mandatory = true, + ParameterSetName = DestBlobPipelineParameterSet)] + public ICloudBlob DestICloudBlob { get; set; } + + [Alias("SrcContext")] + [Parameter(HelpMessage = "Source Azure Storage Context Object", + ValueFromPipelineByPropertyName = true, ParameterSetName = NameParameterSet)] + [Parameter(HelpMessage = "Source Azure Storage Context Object", + ValueFromPipelineByPropertyName = true, ParameterSetName = SrcBlobParameterSet)] + [Parameter(HelpMessage = "Source Azure Storage Context Object", + ValueFromPipelineByPropertyName = true, ParameterSetName = DestBlobPipelineParameterSet)] + [Parameter(HelpMessage = "Source Azure Storage Context Object", + ValueFromPipelineByPropertyName = true, ParameterSetName = ContainerPipelineParameterSet)] + [Parameter(HelpMessage = "Source Azure Storage Context Object", ParameterSetName = UriParameterSet)] + public override AzureStorageContext Context { get; set; } + + [Parameter(HelpMessage = "Destination Storage context object", Mandatory = false)] + public AzureStorageContext DestContext { get; set; } + + private bool skipSourceChannelInit; + + /// + /// Create blob client and storage service management channel if need to. + /// + /// IStorageManagement object + protected override IStorageBlobManagement CreateChannel() + { + //Init storage blob management channel + if (skipSourceChannelInit) + { + return null; + } + else + { + return base.CreateChannel(); + } + } + + /// + /// Begin cmdlet processing + /// + protected override void BeginProcessing() + { + if (ParameterSetName == UriParameterSet) + { + skipSourceChannelInit = true; + } + + base.BeginProcessing(); + } + + protected async Task EnqueueStartCopyJob(BlobStartCopyJob startCopyJob, DataMovementUserData userData) + { + await this.RunTransferJob(startCopyJob, userData); + + this.OutputStream.WriteVerbose(userData.TaskId, startCopyJob.CopyId); + Dictionary destBlobPath = userData.Data as Dictionary; + + if (destBlobPath != null) + { + var destChannel = userData.Channel; + this.OutputStream.WriteVerbose(userData.TaskId, String.Format(Resources.CopyDestinationBlobPending, destBlobPath["Blob"], destBlobPath["Container"], startCopyJob.CopyId)); + CloudBlobContainer container = destChannel.GetContainerReference(destBlobPath["Container"]); + ICloudBlob destBlob = this.GetDestinationBlobWithCopyId(destChannel, container, destBlobPath["Blob"]); + if (destBlob != null) + { + this.WriteICloudBlobObject(userData.TaskId, destChannel, destBlob); + } + } + } + + /// + /// Set up the Channel object for Destination container and blob + /// + internal IStorageBlobManagement GetDestinationChannel() + { + //If destChannel exits, reuse it. + //If desContext exits, use it. + //If Channl object exists, use it. + //Otherwise, create a new channel. + IStorageBlobManagement destChannel = default(IStorageBlobManagement); + + if (destChannel == null) + { + if (DestContext == null) + { + if (Channel != null) + { + destChannel = Channel; + } + else + { + destChannel = base.CreateChannel(); + } + } + else + { + destChannel = CreateChannel(DestContext); + } + } + + return destChannel; + } + + /// + /// Execute command + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + IStorageBlobManagement destChannel = GetDestinationChannel(); + IStorageBlobManagement srcChannel = Channel; + + switch (ParameterSetName) + { + case NameParameterSet: + StartCopyBlob(srcChannel, destChannel, SrcContainer, SrcBlob, DestContainer, DestBlob); + break; + + case UriParameterSet: + StartCopyBlob(destChannel, AbsoluteUri, DestContainer, DestBlob, Context); + break; + + case SrcBlobParameterSet: + StartCopyBlob(destChannel, ICloudBlob, DestContainer, DestBlob); + break; + + case ContainerPipelineParameterSet: + StartCopyBlob(srcChannel, destChannel, CloudBlobContainer.Name, SrcBlob, DestContainer, DestBlob); + break; + + case DestBlobPipelineParameterSet: + StartCopyBlob(destChannel, ICloudBlob, DestICloudBlob); + break; + } + } + + /// + /// Start copy operation by source and destination ICloudBlob object + /// + /// Source ICloudBlob object + /// Destination ICloudBlob object + /// Destination ICloudBlob object + private void StartCopyBlob(IStorageBlobManagement destChannel, ICloudBlob srcICloudBlob, ICloudBlob destICloudBlob) + { + Func taskGenerator = (taskId) => StartCopyInTransferManager(taskId, destChannel, srcICloudBlob, destICloudBlob); + RunTask(taskGenerator); + } + + /// + /// Start copy operation by source ICloudBlob object + /// + /// Source ICloudBlob object + /// Destinaion container name + /// Destination blob name + /// Destination ICloudBlob object + private void StartCopyBlob(IStorageBlobManagement destChannel, ICloudBlob srcICloudBlob, string destContainer, string destBlobName) + { + if (string.IsNullOrEmpty(destBlobName)) + { + destBlobName = srcICloudBlob.Name; + } + + ValidateBlobName(destBlobName); + + CloudBlobContainer container = destChannel.GetContainerReference(destContainer); + ICloudBlob destBlob = null; + if (BlobType.PageBlob == srcICloudBlob.BlobType) + { + destBlob = container.GetPageBlobReference(destBlobName); + } + else if (BlobType.BlockBlob == srcICloudBlob.BlobType) + { + destBlob = container.GetBlockBlobReference(destBlobName); + } + else + { + throw new ArgumentException(String.Format(Resources.InvalidBlobType, srcICloudBlob.Name)); + } + + this.StartCopyBlob(destChannel, srcICloudBlob, destBlob); + } + + /// + /// Start copy operation by source uri + /// + /// Source uri + /// Destinaion container name + /// Destination blob name + /// Destination ICloudBlob object + private void StartCopyBlob(IStorageBlobManagement destChannel, string srcUri, string destContainer, string destBlobName, AzureStorageContext context) + { + if (context != null) + { + Uri sourceUri = new Uri(srcUri); + Uri contextUri = new Uri(context.BlobEndPoint); + + if (sourceUri.Host.ToLower() == contextUri.Host.ToLower()) + { + CloudBlobClient blobClient = context.StorageAccount.CreateCloudBlobClient(); + ICloudBlob blobReference = blobClient.GetBlobReferenceFromServer(sourceUri); + StartCopyBlob(destChannel, blobReference, destContainer, destBlobName); + } + else + { + WriteWarning(String.Format(Resources.StartCopySourceContextMismatch, srcUri, context.BlobEndPoint)); + } + } + else + { + CloudBlobContainer container = destChannel.GetContainerReference(destContainer); + Func taskGenerator = (taskId) => StartCopyInTransferManager(taskId, destChannel, new Uri(srcUri), container, destBlobName); + RunTask(taskGenerator); + } + } + + /// + /// Start copy operation by container name and blob name + /// + /// Source container name + /// Source blob name + /// Destinaion container name + /// Destination blob name + /// Destination ICloudBlob object + private void StartCopyBlob(IStorageBlobManagement SrcChannel, IStorageBlobManagement destChannel, string srcContainerName, string srcBlobName, string destContainerName, string destBlobName) + { + ValidateBlobName(srcBlobName); + ValidateContainerName(srcContainerName); + ValidateContainerName(destContainerName); + + if (string.IsNullOrEmpty(destBlobName)) + { + destBlobName = srcBlobName; + } + + ValidateBlobName(destBlobName); + + AccessCondition accessCondition = null; + BlobRequestOptions options = RequestOptions; + CloudBlobContainer container = SrcChannel.GetContainerReference(srcContainerName); + ICloudBlob blob = SrcChannel.GetBlobReferenceFromServer(container, srcBlobName, accessCondition, options, OperationContext); + + if (blob == null) + { + throw new ResourceNotFoundException(String.Format(Resources.BlobNotFound, srcBlobName, srcContainerName)); + } + + this.StartCopyBlob(destChannel, blob, destContainerName, destBlobName); + } + + /// + /// Start copy using transfer mangager by source ICloudBlob object + /// + /// Source ICloudBlob object + /// Destination CloudBlobContainer object + /// Destination blob name + /// Destination ICloudBlob object + private async Task StartCopyInTransferManager(long taskId, IStorageBlobManagement DestChannel, ICloudBlob sourceBlob, ICloudBlob destBlob) + { + ValidateBlobName(sourceBlob.Name); + ValidateContainerName(destBlob.Container.Name); + ValidateBlobName(destBlob.Name); + + Dictionary BlobPath = new Dictionary() + { + {"Container", destBlob.Container.Name}, + {"Blob", destBlob.Name} + }; + + DataMovementUserData data = new DataMovementUserData() + { + Data = BlobPath, + TaskId = taskId, + Channel = DestChannel, + Record = null + }; + + BlobStartCopyJob startCopyJob = new BlobStartCopyJob() + { + SourceBlob = sourceBlob, + DestBlob = destBlob + }; + + await this.EnqueueStartCopyJob(startCopyJob, data); + } + + /// + /// Start copy using transfer mangager by source uri + /// + /// source uri + /// Destination CloudBlobContainer object + /// Destination blob name + /// Destination ICloudBlob object + private async Task StartCopyInTransferManager(long taskId, IStorageBlobManagement destChannel, Uri uri, CloudBlobContainer destContainer, string destBlobName) + { + ValidateContainerName(destContainer.Name); + ValidateBlobName(destBlobName); + Dictionary BlobPath = new Dictionary() + { + {"Container", destContainer.Name}, + {"Blob", destBlobName} + }; + + DataMovementUserData data = new DataMovementUserData() + { + Data = BlobPath, + TaskId = taskId, + Channel = destChannel, + Record = null + }; + + BlobStartCopyJob startCopyJob = new BlobStartCopyJob() + { + SourceUri = uri, + DestBlob = destContainer.GetBlockBlobReference(destBlobName) + }; + + await this.EnqueueStartCopyJob(startCopyJob, data); + } + + /// + /// Get DestinationBlob with specified copy id + /// + /// CloudBlobContainer object + /// Blob name + /// Current CopyId + /// Destination ICloudBlob object + private ICloudBlob GetDestinationBlobWithCopyId(IStorageBlobManagement destChannel, CloudBlobContainer container, string blobName) + { + AccessCondition accessCondition = null; + BlobRequestOptions options = RequestOptions; + ICloudBlob blob = destChannel.GetBlobReferenceFromServer(container, blobName, accessCondition, options, OperationContext); + return blob; + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/StopAzureStorageBlobCopy.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/StopAzureStorageBlobCopy.cs new file mode 100644 index 000000000000..f0d62a15b52a --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/Cmdlet/StopAzureStorageBlobCopy.cs @@ -0,0 +1,224 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Security.Permissions; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; +using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Blob; +using Microsoft.WindowsAzure.Storage.RetryPolicies; + +namespace Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet +{ + [Cmdlet(VerbsLifecycle.Stop, StorageNouns.CopyBlob, ConfirmImpact = ConfirmImpact.High, DefaultParameterSetName = NameParameterSet), + OutputType(typeof(AzureStorageBlob))] + public class StopAzureStorageBlobCopy : StorageCloudBlobCmdletBase + { + /// + /// Blob Pipeline parameter set name + /// + private const string BlobPipelineParameterSet = "BlobPipeline"; + + /// + /// Container pipeline paremeter set name + /// + private const string ContainerPipelineParmeterSet = "ContainerPipeline"; + + /// + /// Blob name and container name parameter set + /// + private const string NameParameterSet = "NamePipeline"; + + [Parameter(HelpMessage = "ICloudBlob Object", Mandatory = true, + ValueFromPipelineByPropertyName = true, ParameterSetName = BlobPipelineParameterSet)] + public ICloudBlob ICloudBlob { get; set; } + + [Parameter(HelpMessage = "CloudBlobContainer Object", Mandatory = true, + ValueFromPipelineByPropertyName = true, ParameterSetName = ContainerPipelineParmeterSet)] + public CloudBlobContainer CloudBlobContainer { get; set; } + + [Parameter(ParameterSetName = ContainerPipelineParmeterSet, Mandatory = true, Position = 0, HelpMessage = "Blob name")] + [Parameter(ParameterSetName = NameParameterSet, Mandatory = true, Position = 0, HelpMessage = "Blob name")] + public string Blob + { + get { return BlobName; } + set { BlobName = value; } + } + private string BlobName = String.Empty; + + [Parameter(HelpMessage = "Container name", Mandatory = true, Position = 1, + ParameterSetName = NameParameterSet)] + [ValidateNotNullOrEmpty] + public string Container + { + get { return ContainerName; } + set { ContainerName = value; } + } + private string ContainerName = String.Empty; + + [Parameter(HelpMessage = "Force to stop the current copy task on the specified blob")] + public SwitchParameter Force + { + get { return force; } + set { force = value; } + } + private bool force = false; + + [Parameter(HelpMessage = "Copy Id", Mandatory = false)] + [ValidateNotNullOrEmpty] + public string CopyId + { + get { return copyId; } + set { copyId = value; } + } + private string copyId; + + /// + /// Execute command + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + Func taskGenerator = null; + IStorageBlobManagement localChannel = Channel; + + switch (ParameterSetName) + { + case NameParameterSet: + string localContainerName = ContainerName; + string localBlobName = BlobName; + taskGenerator = (taskId) => StopCopyBlob(taskId, localChannel, localContainerName, localBlobName, copyId); + break; + case ContainerPipelineParmeterSet: + CloudBlobContainer localContainer = CloudBlobContainer; + string localName = BlobName; + taskGenerator = (taskId) => StopCopyBlob(taskId, localChannel, localContainer, localName, copyId); + break; + case BlobPipelineParameterSet: + ICloudBlob localBlob = ICloudBlob; + taskGenerator = (taskId) => StopCopyBlob(taskId, localChannel, localBlob, copyId, true); + break; + } + + RunTask(taskGenerator); + } + + /// + /// Stop copy operation by name + /// + /// Container name + /// Blob name + /// copy id + private async Task StopCopyBlob(long taskId, IStorageBlobManagement localChannel, string containerName, string blobName, string copyId) + { + CloudBlobContainer container = localChannel.GetContainerReference(containerName); + await StopCopyBlob(taskId, localChannel, container, blobName, copyId); + } + + /// + /// Stop copy operation by CloudBlobContainer + /// + /// CloudBlobContainer object + /// Blob name + /// Copy id + private async Task StopCopyBlob(long taskId, IStorageBlobManagement localChannel, CloudBlobContainer container, string blobName, string copyId) + { + ValidateBlobName(blobName); + + ValidateContainerName(container.Name); + + AccessCondition accessCondition = null; + BlobRequestOptions options = RequestOptions; + ICloudBlob blob = localChannel.GetBlobReferenceFromServer(container, blobName, accessCondition, options, OperationContext); + + if (blob == null) + { + throw new ResourceNotFoundException(String.Format(Resources.BlobNotFound, blobName, container.Name)); + } + + await StopCopyBlob(taskId, localChannel, blob, copyId); + } + + /// + /// Stop copy operation by ICloudBlob object + /// + /// ICloudBlob object + /// Copy id + private async Task StopCopyBlob(long taskId, IStorageBlobManagement localChannel, ICloudBlob blob, string copyId, bool fetchCopyIdFromBlob = false) + { + AccessCondition accessCondition = null; + BlobRequestOptions abortRequestOption = RequestOptions ?? new BlobRequestOptions(); + + //Set no retry to resolve the 409 conflict exception + abortRequestOption.RetryPolicy = new NoRetry(); + + if (null == blob) + { + throw new ArgumentException(String.Format(Resources.ObjectCannotBeNull, typeof(ICloudBlob).Name)); + } + + string specifiedCopyId = copyId; + + if (string.IsNullOrEmpty(specifiedCopyId) && fetchCopyIdFromBlob) + { + if (blob.CopyState != null) + { + specifiedCopyId = blob.CopyState.CopyId; + } + } + + string abortCopyId = string.Empty; + + if (string.IsNullOrEmpty(specifiedCopyId) || Force) + { + //Make sure we use the correct copy id to abort + //Use default retry policy for FetchBlobAttributes + BlobRequestOptions options = RequestOptions; + await localChannel.FetchBlobAttributesAsync(blob, accessCondition, options, OperationContext, CmdletCancellationToken); + + if (blob.CopyState == null || String.IsNullOrEmpty(blob.CopyState.CopyId)) + { + ArgumentException e = new ArgumentException(String.Format(Resources.CopyTaskNotFound, blob.Name, blob.Container.Name)); + OutputStream.WriteError(taskId, e); + } + else + { + abortCopyId = blob.CopyState.CopyId; + } + + if (!Force) + { + string confirmation = String.Format(Resources.ConfirmAbortCopyOperation, blob.Name, blob.Container.Name, abortCopyId); + if (!await OutputStream.ConfirmAsync(confirmation)) + { + string cancelMessage = String.Format(Resources.StopCopyOperationCancelled, blob.Name, blob.Container.Name); + OutputStream.WriteVerbose(taskId, cancelMessage); + } + } + } + else + { + abortCopyId = specifiedCopyId; + } + + await localChannel.AbortCopyAsync(blob, abortCopyId, accessCondition, abortRequestOption, OperationContext, CmdletCancellationToken); + string message = String.Format(Resources.StopCopyBlobSuccessfully, blob.Name, blob.Container.Name); + OutputStream.WriteObject(taskId, message); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/DataMovementUserData.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/DataMovementUserData.cs new file mode 100644 index 000000000000..ad64717d2c6f --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/DataMovementUserData.cs @@ -0,0 +1,37 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// --------------------------------------------------------------------------------- + +using System.Management.Automation; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; + +namespace Microsoft.WindowsAzure.Commands.Storage.Blob +{ + /// + /// User data for data movement library + /// + public class DataMovementUserData + { + public object Data; + public ProgressRecord Record; + public long TaskId; + public TaskCompletionSource taskSource; + public IStorageBlobManagement Channel; + + public DataMovementUserData() + { + taskSource = new TaskCompletionSource(); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/StorageCloudBlobCmdletBase.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/StorageCloudBlobCmdletBase.cs new file mode 100644 index 000000000000..47897f8ae841 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/StorageCloudBlobCmdletBase.cs @@ -0,0 +1,193 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; +using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.Storage +{ + /// + /// Base cmdlet for storage blob/container cmdlet + /// + public class StorageCloudBlobCmdletBase : StorageCloudCmdletBase + { + /// + /// Initializes a new instance of the StorageCloudBlobCmdletBase class. + /// + public StorageCloudBlobCmdletBase() + : this(null) + { + } + + /// + /// Initializes a new instance of the StorageCloudBlobCmdletBase class. + /// + /// IStorageBlobManagement channel + public StorageCloudBlobCmdletBase(IStorageBlobManagement channel) + { + Channel = channel; + } + + /// + /// Blob request options + /// + public BlobRequestOptions RequestOptions + { + get + { + return (BlobRequestOptions) GetRequestOptions(StorageServiceType.Blob); + } + } + + /// + /// Make sure the pipeline blob is valid and already existing + /// + /// ICloudBlob object + internal void ValidatePipelineICloudBlob(ICloudBlob blob) + { + if (null == blob) + { + throw new ArgumentException(String.Format(Resources.ObjectCannotBeNull, typeof(ICloudBlob).Name)); + } + + if (!NameUtil.IsValidBlobName(blob.Name)) + { + throw new ArgumentException(String.Format(Resources.InvalidBlobName, blob.Name)); + } + + ValidatePipelineCloudBlobContainer(blob.Container); + //BlobRequestOptions requestOptions = RequestOptions; + + //if (!Channel.DoesBlobExist(blob, requestOptions, OperationContext)) + //{ + // throw new ResourceNotFoundException(String.Format(Resources.BlobNotFound, blob.Name, blob.Container.Name)); + //} + } + + /// + /// Make sure the container is valid and already existing + /// + /// A CloudBlobContainer object + internal void ValidatePipelineCloudBlobContainer(CloudBlobContainer container) + { + if (null == container) + { + throw new ArgumentException(String.Format(Resources.ObjectCannotBeNull, typeof(CloudBlobContainer).Name)); + } + + if (!NameUtil.IsValidContainerName(container.Name)) + { + throw new ArgumentException(String.Format(Resources.InvalidContainerName, container.Name)); + } + + //BlobRequestOptions requestOptions = RequestOptions; + + //if (container.ServiceClient.Credentials.IsSharedKey + // && !Channel.DoesContainerExist(container, requestOptions, OperationContext)) + //{ + // throw new ResourceNotFoundException(String.Format(Resources.ContainerNotFound, container.Name)); + //} + } + + /// + /// Create blob client and storage service management channel if need to. + /// + /// IStorageManagement object + protected override IStorageBlobManagement CreateChannel() + { + //Init storage blob management channel + if (Channel == null || !ShareChannel) + { + Channel = new StorageBlobManagement(GetCmdletStorageContext()); + } + + return Channel; + } + + /// + /// Get a service channel object using specified storage account + /// + /// Cloud storage account object + /// IStorageBlobManagement channel object + protected IStorageBlobManagement CreateChannel(AzureStorageContext context) + { + return new StorageBlobManagement(context); + } + + /// + /// whether the specified blob is a snapshot + /// + /// ICloudBlob object + /// true if the specified blob is snapshot, otherwise false + internal bool IsSnapshot(ICloudBlob blob) + { + return !string.IsNullOrEmpty(blob.Name) && blob.SnapshotTime != null; + } + + /// + /// Write ICloudBlob to output using specified service channel + /// + /// The output ICloudBlob object + /// IStorageBlobManagement channel object + internal void WriteICloudBlobObject(long taskId, IStorageBlobManagement channel, ICloudBlob blob, BlobContinuationToken continuationToken = null) + { + AzureStorageBlob azureBlob = new AzureStorageBlob(blob); + azureBlob.Context = channel.StorageContext; + azureBlob.ContinuationToken = continuationToken; + OutputStream.WriteObject(taskId, azureBlob); + } + + /// + /// Write ICloudBlob to output using specified service channel + /// + /// The output ICloudBlob object + /// IStorageBlobManagement channel object + internal void WriteCloudContainerObject(long taskId, IStorageBlobManagement channel, + CloudBlobContainer container, BlobContainerPermissions permissions, BlobContinuationToken continuationToken = null) + { + AzureStorageContainer azureContainer = new AzureStorageContainer(container, permissions); + azureContainer.Context = channel.StorageContext; + azureContainer.ContinuationToken = continuationToken; + OutputStream.WriteObject(taskId, azureContainer); + } + + /// + /// Check whether the blob name is valid. If not throw an exception + /// + /// Blob name + protected void ValidateBlobName(string name) + { + if (!NameUtil.IsValidBlobName(name)) + { + throw new ArgumentException(String.Format(Resources.InvalidBlobName, name)); + } + } + + /// + /// Check whether the container name is valid. If not throw an exception + /// + /// Container name + protected void ValidateContainerName(string name) + { + if (!NameUtil.IsValidContainerName(name)) + { + throw new ArgumentException(String.Format(Resources.InvalidContainerName, name)); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage/Blob/StorageDataMovementCmdletBase.cs b/src/ServiceManagement/Storage/Commands.Storage/Blob/StorageDataMovementCmdletBase.cs new file mode 100644 index 000000000000..9b6997e49a32 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Blob/StorageDataMovementCmdletBase.cs @@ -0,0 +1,174 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Management.Automation; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Storage.Blob; +using Microsoft.WindowsAzure.Storage.DataMovement.TransferJobs; + +namespace Microsoft.WindowsAzure.Commands.Storage.Blob +{ + public class StorageDataMovementCmdletBase : StorageCloudBlobCmdletBase, IDisposable + { + /// + /// Blob Transfer Manager + /// + private ITransferJobRunner transferJobRunner; + + [Parameter(HelpMessage = "Force to overwrite the existing blob or file")] + public SwitchParameter Force + { + get { return overwrite; } + set { overwrite = value; } + } + + protected bool overwrite; + + /// + /// Confirm the overwrite operation + /// + /// Confirmation message + /// True if the opeation is confirmed, otherwise return false + private bool ConfirmOverwrite(string sourcePath, string destinationPath) + { + string overwriteMessage = string.Format(CultureInfo.CurrentCulture, Resources.OverwriteConfirmation, destinationPath); + return overwrite || OutputStream.ConfirmAsync(overwriteMessage).Result; + } + + /// + /// On Task run successfully + /// + /// User data + protected virtual void OnTaskSuccessful(DataMovementUserData data) + { } + + + /// + /// Cmdlet begin processing + /// + protected override void BeginProcessing() + { + base.BeginProcessing(); + + this.transferJobRunner = TransferJobRunnerFactory.CreateRunner(this.GetCmdletConcurrency()); + } + + protected async Task RunTransferJob(BlobTransferJob transferJob, DataMovementUserData userData) + { + this.SetRequestOptionsInTransferJob(transferJob); + transferJob.OverwritePromptCallback = ConfirmOverwrite; + + try + { + await this.transferJobRunner.RunTransferJob( + transferJob, + (percent, speed) => + { + if (userData.Record != null) + { + userData.Record.PercentComplete = (int)percent; + userData.Record.StatusDescription = string.Format(CultureInfo.CurrentCulture, Resources.FileTransmitStatus, (int)percent, Util.BytesToHumanReadableSize(speed)); + this.OutputStream.WriteProgress(userData.Record); + } + }, + this.CmdletCancellationToken); + + if (userData.Record != null) + { + userData.Record.PercentComplete = 100; + userData.Record.StatusDescription = Resources.TransmitSuccessfully; + this.OutputStream.WriteProgress(userData.Record); + } + } + catch (OperationCanceledException) + { + if (userData.Record != null) + { + userData.Record.StatusDescription = Resources.TransmitCancelled; + this.OutputStream.WriteProgress(userData.Record); + } + } + catch (Exception e) + { + if (userData.Record != null) + { + userData.Record.StatusDescription = string.Format(CultureInfo.CurrentCulture, Resources.TransmitFailed, e.Message); + this.OutputStream.WriteProgress(userData.Record); + } + + throw; + } + } + + protected void SetRequestOptionsInTransferJob(BlobTransferJob transferJob) + { + BlobRequestOptions cmdletOptions = RequestOptions; + + if (cmdletOptions == null) + { + return; + } + + BlobRequestOptions requestOptions = transferJob.BlobRequestOptions; + + if (cmdletOptions.MaximumExecutionTime != null) + { + requestOptions.MaximumExecutionTime = cmdletOptions.MaximumExecutionTime; + } + + if (cmdletOptions.ServerTimeout != null) + { + requestOptions.ServerTimeout = cmdletOptions.ServerTimeout; + } + + transferJob.BlobRequestOptions = requestOptions; + } + + protected override void EndProcessing() + { + base.EndProcessing(); + WriteTaskSummary(); + + this.transferJobRunner.Dispose(); + this.transferJobRunner = null; + } + + /// + /// Dispose DataMovement cmdlet + /// + public void Dispose() + { + Dispose(true); + } + + /// + /// Dispose DataMovement cmdlet + /// + /// User disposing + protected virtual void Dispose(bool disposing) + { + if (disposing) + { + if (this.transferJobRunner != null) + { + this.transferJobRunner.Dispose(); + this.transferJobRunner = null; + } + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Commands.Storage.csproj b/src/ServiceManagement/Storage/Commands.Storage/Commands.Storage.csproj new file mode 100644 index 000000000000..05ca1808ed76 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Commands.Storage.csproj @@ -0,0 +1,247 @@ + + + + + Debug + AnyCPU + {08CF7DA7-0392-4A19-B79B-E1FF67CDB81A} + Library + Properties + Microsoft.WindowsAzure.Commands.Storage + Microsoft.WindowsAzure.Commands.Storage + v4.5 + 512 + + ..\..\..\ + true + ..\..\..\ + + + true + full + false + ..\..\..\Package\Debug\ServiceManagement\Azure\Storage + DEBUG;TRACE + prompt + 4 + false + true + false + + + true + MSSharedLibKey.snk + true + ..\..\..\Package\Release\ServiceManagement\Azure\Storage + TRACE;SIGN + true + pdbonly + AnyCPU + true + false + + + + ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll + + + ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll + + + ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll + + + False + ..\..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll + + + ..\..\..\lib\Microsoft.WindowsAzure.Storage.DataMovement.dll + + + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + True + + + + + + False + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + + + ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + True + Resources.resx + + + + + + + + + + {65c3a86a-716d-4e7d-ab67-1db00b3bf72d} + Commands.Common.Storage + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + + + PreserveNewest + Designer + + + + + PreserveNewest + Designer + + + PreserveNewest + + + + + + + ResXFileCodeGenerator + Designer + Designer + Resources.Designer.cs + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/AzureToFileSystemFileNameResolver.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/AzureToFileSystemFileNameResolver.cs new file mode 100644 index 000000000000..b0dac23ff42a --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Common/AzureToFileSystemFileNameResolver.cs @@ -0,0 +1,306 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.RegularExpressions; + +namespace Microsoft.WindowsAzure.Commands.Storage.Common +{ + /// + /// File name resolver class for translating Azure file names to Windows file names. + /// + internal class AzureToFileSystemFileNameResolver + { + /// + /// These filenames are reserved on windows, regardless of the file extension. + /// + private static readonly string[] reservedBaseFileNames = new string[] + { + "CON", "PRN", "AUX", "NUL", + "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", + "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9", + }; + + /// + /// These filenames are reserved on windows, only if the full filenamem matches. + /// + private static readonly string[] reservedFileNames = new string[] + { + "CLOCK$", + }; + + /// + /// Chars invalid for file name. + /// + private static char[] invalidFileNameChars = Path.GetInvalidFileNameChars(); + + /// + /// Chars invalid for path name. + /// + private static char[] invalidPathChars = AzureToFileSystemFileNameResolver.GetInvalidPathChars(); + + /// + /// Regular expression for replacing slashes that we don't consider directory separators: + /// Translate / to %2F if it is: + /// - the first character in the file name + /// - the last character in the file name + /// - preceeded by another /. + /// /abc//def/ gets translated to: %2Fabc/%2Fdef%2F. + /// + private static Regex translateSlashesRegex = new Regex("(^/)|(?<=/)/|(/$)", RegexOptions.Compiled); + + private Dictionary resolvedFilesCache = new Dictionary(); + + private Func getMaxFileNameLength; + + public AzureToFileSystemFileNameResolver(Func getMaxFileNameLength) + { + this.getMaxFileNameLength = getMaxFileNameLength; + } + + public string ResolveFileName(string relativePath, DateTimeOffset? snapshotTime) + { + // 1) Unescape original string, original string is UrlEncoded. + // 2) Replace Azure directory separator with Windows File System directory separator. + // 3) Trim spaces at the end of the file name. + string destinationRelativePath = TranslateSlashes(relativePath).TrimEnd(new char[] { ' ' }); + + // Split into path + filename parts. + int lastSlash = destinationRelativePath.LastIndexOf('\\'); + + string destinationFileName; + string destinationPath; + + if (-1 == lastSlash) + { + destinationPath = string.Empty; + destinationFileName = destinationRelativePath; + } + else + { + destinationPath = destinationRelativePath.Substring(0, lastSlash + 1); + destinationFileName = destinationRelativePath.Substring(lastSlash + 1); + } + + if (!string.IsNullOrEmpty(destinationPath)) + { + // Replace invalid path characters with %HH, with HH being the hexadecimal + // representation of the invalid characters. + destinationPath = EscapeInvalidCharacters(destinationPath, invalidPathChars); + } + + if (!string.IsNullOrEmpty(destinationFileName)) + { + // Replace invalid file name characters with %HH, with HH being the hexadecimal + // representation of the invalid character. + destinationFileName = EscapeInvalidCharacters(destinationFileName, invalidFileNameChars); + } + + // Append snapshot time to filename. + destinationFileName = AppendSnapShotToFileName(destinationFileName, snapshotTime); + + // Combine path and filename back together again. + destinationRelativePath = Path.Combine(destinationPath, destinationFileName); + + // Check if the destination name is + // - already used by a previously resolved file. + // - or represents a reserved filename on the target file system. + // - or is longer than the allowed path length on the target file system. + // If this is the case add a numeric prefix to resolve the conflict. + destinationRelativePath = this.ResolveFileNameConflict(destinationRelativePath); + + // Add the resolved name to the resolved files cache, so additional files + // will not use the same target name to download to. + this.resolvedFilesCache.Add(destinationRelativePath.ToLowerInvariant(), destinationRelativePath); + + return destinationRelativePath; + } + + /// + /// Append snapshot time to a file name. + /// + /// Original file name. + /// Snapshot time to append. + /// A file name with appended snapshot time. + private static string AppendSnapShotToFileName(string fileName, DateTimeOffset? snapshotTime) + { + string resultName = fileName; + + if (snapshotTime.HasValue) + { + string pathAndFileNameNoExt = Path.ChangeExtension(fileName, null); + string extension = Path.GetExtension(fileName); + string timeStamp = string.Format("{0:u}", snapshotTime.Value); + + resultName = string.Format( + "{0} ({1}){2}", + pathAndFileNameNoExt, + timeStamp.Replace(":", string.Empty).TrimEnd(new char[] { 'Z' }), + extension); + } + + return resultName; + } + + /// + /// Turns baseFileName into a valid file name by calling Conflict and Construct. + /// The procedures are enumerating numbers from 1 and trying to append the number to the base file name. + /// Conflict is used to test whether current generated file name conflicts with others. + /// Construct is supposed to generate a file name based on the three parameters, file name without extension, extension and the number to append. + /// + /// Original file name. + /// A delegate takes one file name as parameter and returns true when no confliction is found. + /// A delegate takes three parameters, file name without extension, extension and the number to append, and returns + /// a file name constructed by these three parameters. + /// Valid file name by calling Conflict and Construct. + private static string ResolveFileNameConflict(string baseFileName, Func conflict, Func construct) + { + if (!conflict(baseFileName)) + { + return baseFileName; + } + + string pathAndFilename = Path.ChangeExtension(baseFileName, null); + string extension = Path.GetExtension(baseFileName); + + string resolvedName = string.Empty; + int postfixCount = 1; + + do + { + resolvedName = construct(pathAndFilename, extension, postfixCount); + postfixCount++; + } + while (conflict(resolvedName)); + + return resolvedName; + } + + private static char[] GetInvalidPathChars() + { + // Union InvalidFileNameChars and InvalidPathChars together + // while excluding slash. + HashSet charSet = new HashSet(Path.GetInvalidPathChars()); + + foreach (char c in invalidFileNameChars) + { + if ('\\' == c || '/' == c || charSet.Contains(c)) + { + continue; + } + + charSet.Add(c); + } + + invalidPathChars = new char[charSet.Count]; + charSet.CopyTo(invalidPathChars); + + return invalidPathChars; + } + + private static string TranslateSlashes(string source) + { + // Transform slashes not used for directory separators to %2F. + string output = translateSlashesRegex.Replace(source, string.Format("%{0:X2}", (int)'/')); + + // Translate remaining slashes to backslashes. + return output.Replace('/', '\\'); + } + + private static string EscapeInvalidCharacters(string fileName, params char[] invalidChars) + { + if (null != invalidChars) + { + // Replace invalid characters with %HH, with HH being the hexadecimal + // representation of the invalid character. + foreach (char c in invalidChars) + { + fileName = fileName.Replace(c.ToString(), string.Format("%{0:X2}", (int)c)); + } + } + + return fileName; + } + + private static bool IsReservedFileName(string fileName) + { + string fileNameNoExt = Path.GetFileNameWithoutExtension(fileName); + string fileNameWithExt = Path.GetFileName(fileName); + + if (Array.Exists(reservedBaseFileNames, delegate(string s) { return fileNameNoExt.Equals(s, StringComparison.OrdinalIgnoreCase); })) + { + return true; + } + + if (Array.Exists(reservedFileNames, delegate(string s) { return fileNameWithExt.Equals(s, StringComparison.OrdinalIgnoreCase); })) + { + return true; + } + + if (string.IsNullOrWhiteSpace(fileName)) + { + return true; + } + + bool allDotsOrWhiteSpace = true; + for (int i = 0; i < fileName.Length; ++i) + { + if (fileName[i] != '.' && !char.IsWhiteSpace(fileName[i])) + { + allDotsOrWhiteSpace = false; + break; + } + } + + if (allDotsOrWhiteSpace) + { + return true; + } + + return false; + } + + private string ResolveFileNameConflict(string baseFileName) + { + // TODO - MaxFileNameLength could be <= 0. + int maxFileNameLength = this.getMaxFileNameLength(); + + Func conflict = delegate(string fileName) + { + return this.resolvedFilesCache.ContainsKey(fileName.ToLowerInvariant()) || + IsReservedFileName(fileName) || + fileName.Length > maxFileNameLength; + }; + + Func construct = delegate(string fileName, string extension, int count) + { + string postfixString = string.Format(" ({0})", count); + + // TODO - trimLength could be be larger than pathAndFilename.Length, what do we do in this case? + int trimLength = (fileName.Length + postfixString.Length + extension.Length) - maxFileNameLength; + + if (trimLength > 0) + { + fileName = fileName.Remove(fileName.Length - trimLength); + } + + return string.Format("{0}{1}{2}", fileName, postfixString, extension); + }; + + return ResolveFileNameConflict(baseFileName, conflict, construct); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/BlobUploadRequestQueue.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/BlobUploadRequestQueue.cs new file mode 100644 index 000000000000..6d5447109493 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Common/BlobUploadRequestQueue.cs @@ -0,0 +1,176 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.Storage.Common +{ + internal class BlobUploadRequestQueue + { + private string root; + private Queue Requests; + + private BlobType Type { get; set; } + private CloudBlobContainer Container { get; set; } + private string BlobName { get; set; } + + public BlobUploadRequestQueue() + { + root = string.Empty; + Requests = new Queue(); + } + + public void SetDestinationContainer(IStorageBlobManagement channel, string containerName) + { + if (Container == null) + { + if (!NameUtil.IsValidContainerName(containerName)) + { + throw new ArgumentException(String.Format(Resources.InvalidContainerName, containerName)); + } + + Container = channel.GetContainerReference(containerName); + } + } + + public bool EnqueueRequest(string absoluteFilePath, BlobType type, string blobName) + { + absoluteFilePath = Path.GetFullPath(absoluteFilePath); + if (!string.IsNullOrEmpty(blobName) && Requests.Count > 0) + { + throw new ArgumentException(Resources.BlobNameShouldBeEmptyWhenUploading); + } + else + { + BlobName = blobName; + Type = type; + } + + if (!System.IO.File.Exists(absoluteFilePath)) + { + if (System.IO.Directory.Exists(absoluteFilePath)) + { + return false; + } + else + { + throw new ArgumentException(String.Format(Resources.FileNotFound, absoluteFilePath)); + } + } + + string dirPath = Path.GetDirectoryName(absoluteFilePath).ToLower(); + + if (string.IsNullOrEmpty(root) || !dirPath.StartsWith(root)) + { + root = GetCommonDirectory(root, dirPath); + } + + Requests.Enqueue(absoluteFilePath); + + return true; + } + + public bool IsEmpty() + { + return Requests.Count == 0; + } + + public Tuple DequeueRequest() + { + string filePath = Requests.Dequeue(); + string blobName = string.Empty; + + if (!string.IsNullOrEmpty(BlobName)) + { + blobName = BlobName; + } + else + { + blobName = filePath.Substring(root.Length); + } + + blobName = NameUtil.ResolveBlobName(blobName); + + ICloudBlob blob = default(ICloudBlob); + + switch (Type) + { + case BlobType.PageBlob: + blob = Container.GetPageBlobReference(blobName); + break; + case BlobType.BlockBlob: + default: + blob = Container.GetBlockBlobReference(blobName); + break; + } + + return new Tuple(filePath, blob); + } + + private string GetCommonDirectory(string dir1, string dir2) + { + string commonDir = string.Empty; + if (string.IsNullOrEmpty(dir1) || string.IsNullOrEmpty(dir2)) + { + commonDir = string.IsNullOrEmpty(dir2) ? dir1 : dir2; + } + else + { + string[] path1 = dir1.Split(Path.DirectorySeparatorChar); + string[] path2 = dir2.Split(Path.DirectorySeparatorChar); + commonDir = GetCommonDirectory(path1, path2); + } + + if (string.IsNullOrEmpty(commonDir)) + { + throw new ArgumentException(Resources.InvalidFileName); + } + + if (!commonDir.EndsWith(Path.DirectorySeparatorChar.ToString())) + { + commonDir += Path.DirectorySeparatorChar; + } + + return commonDir; + } + + private string GetCommonDirectory(string[] path1, string[] path2) + { + if (path1.Length > path2.Length) + { + return GetCommonDirectory(path2, path1); + } + + string prefix = string.Empty; + + for (int i = 0; i < path1.Length; i++) + { + if (path1[i] == path2[i]) + { + prefix += path1[i] + Path.DirectorySeparatorChar; + } + else + { + break; + } + } + + return prefix; + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/GetAzureStorageServiceLogging.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/GetAzureStorageServiceLogging.cs new file mode 100644 index 000000000000..fa243c14619a --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/GetAzureStorageServiceLogging.cs @@ -0,0 +1,52 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Storage.Shared.Protocol; + +namespace Microsoft.WindowsAzure.Commands.Storage.Common.Cmdlet +{ + /// + /// Show azure storage service properties + /// + [Cmdlet(VerbsCommon.Get, StorageNouns.StorageServiceLogging), + OutputType(typeof(LoggingProperties))] + public class GetAzureStorageServiceLoggingCommand : StorageCloudBlobCmdletBase + { + public const string ServiceTypeHelpMessage = "Azure storage service type(Blob, Table, Queue)."; + [Parameter(Mandatory = true, Position = 0, HelpMessage = ServiceTypeHelpMessage)] + public StorageServiceType ServiceType { get; set; } + + // Overwrite the useless parameter + public override int? ServerTimeoutPerRequest { get; set; } + public override int? ClientTimeoutPerRequest { get; set; } + public override int? ConcurrentTaskCount { get; set; } + + public GetAzureStorageServiceLoggingCommand() + { + EnableMultiThread = false; + } + + /// + /// Execute command + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + ServiceProperties serviceProperties = Channel.GetStorageServiceProperties(ServiceType, GetRequestOptions(ServiceType), OperationContext); + WriteObject(serviceProperties.Logging); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/GetAzureStorageServiceMetrics.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/GetAzureStorageServiceMetrics.cs new file mode 100644 index 000000000000..5b0092b9db99 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/GetAzureStorageServiceMetrics.cs @@ -0,0 +1,64 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Storage.Shared.Protocol; + +namespace Microsoft.WindowsAzure.Commands.Storage.Common.Cmdlet +{ + /// + /// Show azure storage service properties + /// + [Cmdlet(VerbsCommon.Get, StorageNouns.StorageServiceMetrics), + OutputType(typeof(MetricsProperties))] + public class GetAzureStorageServiceMetricsCommand : StorageCloudBlobCmdletBase + { + [Parameter(Mandatory = true, Position = 0, HelpMessage = GetAzureStorageServiceLoggingCommand.ServiceTypeHelpMessage)] + public StorageServiceType ServiceType { get; set; } + + [Parameter(Mandatory = true, Position = 1, HelpMessage = "Azure storage service metrics type(Hour, Minute).")] + public ServiceMetricsType MetricsType { get; set; } + + // Overwrite the useless parameter + public override int? ServerTimeoutPerRequest { get; set; } + public override int? ClientTimeoutPerRequest { get; set; } + public override int? ConcurrentTaskCount { get; set; } + + public GetAzureStorageServiceMetricsCommand() + { + EnableMultiThread = false; + } + + /// + /// Execute command + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + ServiceProperties serviceProperties = Channel.GetStorageServiceProperties(ServiceType, GetRequestOptions(ServiceType) , OperationContext); + + switch (MetricsType) + { + case ServiceMetricsType.Hour: + WriteObject(serviceProperties.HourMetrics); + break; + case ServiceMetricsType.Minute: + default: + WriteObject(serviceProperties.MinuteMetrics); + break; + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/NewAzureStorageContext.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/NewAzureStorageContext.cs new file mode 100644 index 000000000000..afdc47e4df63 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/NewAzureStorageContext.cs @@ -0,0 +1,413 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Auth; + +namespace Microsoft.WindowsAzure.Commands.Storage.Common.Cmdlet +{ + /// + /// New storage context + /// + [Cmdlet(VerbsCommon.New, StorageNouns.StorageContext, DefaultParameterSetName = AccountNameKeyParameterSet), + OutputType(typeof(AzureStorageContext))] + public class NewAzureStorageContext : AzurePSCmdlet + { + /// + /// Account name and key parameter set name + /// + private const string AccountNameKeyParameterSet = "AccountNameAndKey"; + + /// + /// Sas token parameter set name + /// + private const string SasTokenParameterSet = "SasToken"; + + /// + /// Sas token with azure environment parameter set name + /// + private const string SasTokenEnvironmentParameterSet = "SasTokenWithAzureEnvironment"; + + /// + /// Account name and key and azure environment parameter set name + /// + private const string AccountNameKeyEnvironmentParameterSet = "AccountNameAndKeyEnvironment"; + + /// + /// Connection string parameter set name + /// + private const string ConnectionStringParameterSet = "ConnectionString"; + + /// + /// Local development account parameter set name + /// + private const string LocalParameterSet = "LocalDevelopment"; + + /// + /// Anonymous storage account parameter set name + /// + private const string AnonymousParameterSet = "AnonymousAccount"; + + /// + /// Anonymous storage account with azure environment parameter set name + /// + private const string AnonymousEnvironmentParameterSet = "AnonymousAccountEnvironment"; + + private const string StorageAccountNameHelpMessage = "Azure Storage Acccount Name"; + [Parameter(Position = 0, HelpMessage = StorageAccountNameHelpMessage, + Mandatory = true, ParameterSetName = AccountNameKeyParameterSet)] + [Parameter(Position = 0, HelpMessage = StorageAccountNameHelpMessage, + Mandatory = true, ParameterSetName = AccountNameKeyEnvironmentParameterSet)] + [Parameter(Position = 0, HelpMessage = StorageAccountNameHelpMessage, + Mandatory = true, ParameterSetName = AnonymousParameterSet)] + [Parameter(Position = 0, HelpMessage = StorageAccountNameHelpMessage, + Mandatory = true, ParameterSetName = AnonymousEnvironmentParameterSet)] + [Parameter(Position = 0, HelpMessage = StorageAccountNameHelpMessage, + Mandatory = true, ParameterSetName = SasTokenParameterSet)] + [Parameter(Position = 0, HelpMessage = StorageAccountNameHelpMessage, + Mandatory = true, ParameterSetName = SasTokenEnvironmentParameterSet)] + [ValidateNotNullOrEmpty] + public string StorageAccountName { get; set; } + + private const string StorageAccountKeyHelpMessage = "Azure Storage Account Key"; + [Parameter(Position = 1, HelpMessage = StorageAccountKeyHelpMessage, + Mandatory = true, ParameterSetName = AccountNameKeyParameterSet)] + [Parameter(Position = 1, HelpMessage = StorageAccountKeyHelpMessage, + Mandatory = true, ParameterSetName = AccountNameKeyEnvironmentParameterSet)] + [ValidateNotNullOrEmpty] + public string StorageAccountKey { get; set; } + + private const string SasTokenHelpMessage = "Azure Storage SAS Token"; + [Parameter(HelpMessage = SasTokenHelpMessage, + Mandatory = true, ParameterSetName = SasTokenParameterSet)] + [Parameter(HelpMessage = SasTokenHelpMessage, + Mandatory = true, ParameterSetName = SasTokenEnvironmentParameterSet)] + [ValidateNotNullOrEmpty] + public string SasToken { get; set; } + + private const string ConnectionStringHelpMessage = "Azure Storage Connection String"; + [Parameter(HelpMessage = ConnectionStringHelpMessage, + Mandatory = true, ParameterSetName = ConnectionStringParameterSet)] + [ValidateNotNullOrEmpty] + public string ConnectionString { get; set; } + + private const string LocalHelpMessage = "Use local development storage account"; + [Parameter(HelpMessage = LocalHelpMessage, + Mandatory = true, ParameterSetName = LocalParameterSet)] + public SwitchParameter Local + { + get { return isLocalDevAccount; } + set { isLocalDevAccount = value; } + } + + private bool isLocalDevAccount; + + private const string AnonymousHelpMessage = "Use anonymous storage account"; + [Parameter(HelpMessage = AnonymousHelpMessage, + Mandatory = true, ParameterSetName = AnonymousParameterSet)] + [Parameter(HelpMessage = AnonymousHelpMessage, + Mandatory = true, ParameterSetName = AnonymousEnvironmentParameterSet)] + public SwitchParameter Anonymous + { + get { return isAnonymous; } + set { isAnonymous = value; } + } + + private bool isAnonymous; + + private const string ProtocolHelpMessage = "Protocol specification (HTTP or HTTPS), default is HTTPS"; + [Parameter(HelpMessage = ProtocolHelpMessage, + ParameterSetName = AccountNameKeyParameterSet)] + [Parameter(HelpMessage = ProtocolHelpMessage, + ParameterSetName = AccountNameKeyEnvironmentParameterSet)] + [Parameter(HelpMessage = ProtocolHelpMessage, + ParameterSetName = AnonymousParameterSet)] + [Parameter(HelpMessage = ProtocolHelpMessage, + ParameterSetName = AnonymousEnvironmentParameterSet)] + [Parameter(HelpMessage = ProtocolHelpMessage, + ParameterSetName = SasTokenParameterSet)] + [ValidateSet(StorageNouns.HTTP, StorageNouns.HTTPS, IgnoreCase = true)] + public string Protocol + { + get { return protocolType; } + set { protocolType = value; } + } + + private string protocolType = StorageNouns.HTTPS; + + private const string EndPointHelpMessage = "Azure storage endpoint"; + [Parameter(HelpMessage = EndPointHelpMessage, ParameterSetName = AccountNameKeyParameterSet)] + [Parameter(HelpMessage = EndPointHelpMessage, ParameterSetName = AnonymousParameterSet)] + [Parameter(HelpMessage = EndPointHelpMessage, ParameterSetName = SasTokenParameterSet)] + public string Endpoint + { + get { return storageEndpoint; } + set { storageEndpoint = value; } + } + + private string storageEndpoint = string.Empty; + + private const string AzureEnvironmentHelpMessage = "Azure environment name"; + [Alias("Name", "EnvironmentName")] + [Parameter(HelpMessage = AzureEnvironmentHelpMessage, ParameterSetName = AccountNameKeyEnvironmentParameterSet, + ValueFromPipelineByPropertyName = true, Mandatory = true)] + [Parameter(HelpMessage = AzureEnvironmentHelpMessage, ParameterSetName = AnonymousEnvironmentParameterSet, + ValueFromPipelineByPropertyName = true, Mandatory = true)] + [Parameter(HelpMessage = AzureEnvironmentHelpMessage, ParameterSetName = SasTokenEnvironmentParameterSet, Mandatory = true)] + public string Environment + { + get { return environmentName; } + set { environmentName = value; } + } + + private string environmentName = string.Empty; + + /// + /// Get storage account by account name and account key + /// + /// Storage account name + /// Storage account key + /// Use https or not + /// + /// A storage account + internal CloudStorageAccount GetStorageAccountByNameAndKey(string accountName, string accountKey, + bool useHttps, string storageEndpoint = "") + { + StorageCredentials credential = new StorageCredentials(accountName, accountKey); + return GetStorageAccountWithEndPoint(credential, accountName, useHttps, storageEndpoint); + } + + /// + /// Get storage account by account name and account key + /// + /// Storage account name + /// Storage account key + /// Use https or not + /// Azure environment name + /// A storage account + internal CloudStorageAccount GetStorageAccountByNameAndKeyFromAzureEnvironment(string accountName, + string accountKey, bool useHttps, string azureEnvironmentName = "") + { + StorageCredentials credential = new StorageCredentials(accountName, accountKey); + return GetStorageAccountWithAzureEnvironment(credential, StorageAccountName, useHttps, azureEnvironmentName); + } + + /// + /// Get storage account by sastoken + /// + /// Storage account name, it's used for build end point + /// Sas token + /// Use https or not + /// + /// a storage account + internal CloudStorageAccount GetStorageAccountBySasToken(string storageAccountName, string sasToken, + bool useHttps, string storageEndpoint = "") + { + StorageCredentials credential = new StorageCredentials(sasToken); + return GetStorageAccountWithEndPoint(credential, storageAccountName, useHttps, storageEndpoint); + } + + internal CloudStorageAccount GetStorageAccountBySasTokenFromAzureEnvironment(string storageAccountName, + string sasToken, bool useHttps, string azureEnvironmentName = "") + { + StorageCredentials credential = new StorageCredentials(sasToken); + return GetStorageAccountWithAzureEnvironment(credential, StorageAccountName, useHttps, azureEnvironmentName); + } + + /// + /// Get storage account by connection string + /// + /// Azure storage connection string + /// A storage account + internal CloudStorageAccount GetStorageAccountByConnectionString(string connectionString) + { + return CloudStorageAccount.Parse(connectionString); + } + + /// + /// Get local development storage account + /// + /// A storage account + internal CloudStorageAccount GetLocalDevelopmentStorageAccount() + { + return CloudStorageAccount.DevelopmentStorageAccount; + } + + /// + /// Get anonymous storage account + /// + /// Storage account name, it's used for build end point + /// + /// + /// A storage account + internal CloudStorageAccount GetAnonymousStorageAccount(string storageAccountName, bool useHttps, string storageEndpoint = "") + { + StorageCredentials credential = new StorageCredentials(); + return GetStorageAccountWithEndPoint(credential, storageAccountName, useHttps, storageEndpoint); + } + + /// + /// Get anonymous storage account + /// + /// Storage account name, it's used for build end point + /// + /// + /// A storage account + internal CloudStorageAccount GetAnonymousStorageAccountFromAzureEnvironment(string storageAccountName, + bool useHttps, string azureEnvironmentName = "") + { + StorageCredentials credential = new StorageCredentials(); + return GetStorageAccountWithAzureEnvironment(credential, storageAccountName, useHttps, azureEnvironmentName); + } + + /// + /// Get storage account and use specific end point + /// + /// Storage credentail + /// Storage account name, it's used for build end point + /// + /// + /// A storage account + internal CloudStorageAccount GetStorageAccountWithEndPoint(StorageCredentials credential, + string storageAccountName, bool useHttps, string endPoint = "") + { + if (String.IsNullOrEmpty(storageAccountName)) + { + throw new ArgumentException(String.Format(Resources.ObjectCannotBeNull, StorageNouns.StorageAccountName)); + } + + string blobEndpoint = string.Empty; + string tableEndpoint = string.Empty; + string queueEndpoint = string.Empty; + string fileEndpoint = string.Empty; + string domain = string.Empty; + + if (string.IsNullOrEmpty(endPoint)) + { + domain = GetDefaultEndPointDomain(); + } + else + { + domain = endPoint.Trim(); + } + + if (useHttps) + { + blobEndpoint = String.Format(Resources.HttpsBlobEndPointFormat, storageAccountName, domain); + tableEndpoint = String.Format(Resources.HttpsTableEndPointFormat, storageAccountName, domain); + queueEndpoint = String.Format(Resources.HttpsQueueEndPointFormat, storageAccountName, domain); + fileEndpoint = String.Format(Resources.HttpsFileEndPointFormat, storageAccountName, domain); + } + else + { + blobEndpoint = String.Format(Resources.HttpBlobEndPointFormat, storageAccountName, domain); + tableEndpoint = String.Format(Resources.HttpTableEndPointFormat, storageAccountName, domain); + queueEndpoint = String.Format(Resources.HttpQueueEndPointFormat, storageAccountName, domain); + fileEndpoint = String.Format(Resources.HttpFileEndPointFormat, storageAccountName, domain); + } + + return new CloudStorageAccount(credential, new Uri(blobEndpoint), new Uri(queueEndpoint), new Uri(tableEndpoint), new Uri(fileEndpoint)); + } + + /// + /// Get storage account and use specific azure environment + /// + /// Storage credentail + /// Storage account name, it's used for build end point + /// Use secure Http protocol + /// Environment name + /// A storage account + internal CloudStorageAccount GetStorageAccountWithAzureEnvironment(StorageCredentials credential, + string storageAccountName, bool useHttps, string azureEnvironmentName = "") + { + AzureEnvironment azureEnvironment = null; + + if (string.IsNullOrEmpty(azureEnvironmentName)) + { + azureEnvironment = AzureSession.CurrentContext.Environment; + } + else + { + azureEnvironment = DefaultProfileClient.GetEnvironmentOrDefault(azureEnvironmentName); + } + + Uri blobEndPoint = azureEnvironment.GetStorageBlobEndpoint(storageAccountName, useHttps); + Uri queueEndPoint = azureEnvironment.GetStorageQueueEndpoint(storageAccountName, useHttps); + Uri tableEndPoint = azureEnvironment.GetStorageTableEndpoint(storageAccountName, useHttps); + Uri fileEndPoint = azureEnvironment.GetStorageFileEndpoint(storageAccountName, useHttps); + + return new CloudStorageAccount(credential, blobEndPoint, queueEndPoint, tableEndPoint, fileEndPoint); + } + + /// + /// Get default end point domain + /// + /// + internal string GetDefaultEndPointDomain() + { + return Resources.DefaultStorageEndPointDomain; + } + + /// + /// Execute command + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + CloudStorageAccount account = null; + bool useHttps = (StorageNouns.HTTPS.ToLower() == protocolType.ToLower()); + + switch (ParameterSetName) + { + case AccountNameKeyParameterSet: + account = GetStorageAccountByNameAndKey(StorageAccountName, StorageAccountKey, useHttps, storageEndpoint); + break; + case AccountNameKeyEnvironmentParameterSet: + account = GetStorageAccountByNameAndKeyFromAzureEnvironment(StorageAccountName, StorageAccountKey, + useHttps, environmentName); + break; + case SasTokenParameterSet: + account = GetStorageAccountBySasToken(StorageAccountName, SasToken, useHttps, storageEndpoint); + break; + case SasTokenEnvironmentParameterSet: + account = GetStorageAccountBySasTokenFromAzureEnvironment(StorageAccountName, SasToken, useHttps, environmentName); + break; + case ConnectionStringParameterSet: + account = GetStorageAccountByConnectionString(ConnectionString); + break; + case LocalParameterSet: + account = GetLocalDevelopmentStorageAccount(); + break; + case AnonymousParameterSet: + account = GetAnonymousStorageAccount(StorageAccountName, useHttps, storageEndpoint); + break; + case AnonymousEnvironmentParameterSet: + account = GetAnonymousStorageAccountFromAzureEnvironment(StorageAccountName, useHttps, environmentName); + break; + default: + throw new ArgumentException(Resources.DefaultStorageCredentialsNotFound); + } + + AzureStorageContext context = new AzureStorageContext(account); + WriteObject(context); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/SetAzureStorageServiceLogging.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/SetAzureStorageServiceLogging.cs new file mode 100644 index 000000000000..a9c1907c86ac --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/SetAzureStorageServiceLogging.cs @@ -0,0 +1,181 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Security.Permissions; + +namespace Microsoft.WindowsAzure.Commands.Storage.Common.Cmdlet +{ + using StorageClient = WindowsAzure.Storage.Shared.Protocol; + + /// + /// Show azure storage service properties + /// + [Cmdlet(VerbsCommon.Set, StorageNouns.StorageServiceLogging), + OutputType(typeof(StorageClient.LoggingProperties))] + public class SetAzureStorageServiceLoggingCommand : StorageCloudBlobCmdletBase + { + [Parameter(Mandatory = true, Position = 0, HelpMessage = GetAzureStorageServiceLoggingCommand.ServiceTypeHelpMessage)] + public StorageServiceType ServiceType { get; set; } + + [Parameter(HelpMessage = "Logging version")] + public double? Version { get; set; } + + [Parameter(HelpMessage = "Logging retention days. -1 means disable Logging retention policy, otherwise enable.")] + [ValidateRange(-1, 365)] + public int? RetentionDays { get; set; } + + public const string LoggingOperationHelpMessage = + "Logging operations. (All, None, combinations of Read, Write, Delete that are seperated by semicolon.)"; + [Parameter(HelpMessage = LoggingOperationHelpMessage)] + public StorageClient.LoggingOperations[] LoggingOperations { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Display ServiceProperties")] + public SwitchParameter PassThru { get; set; } + + // Overwrite the useless parameter + public override int? ServerTimeoutPerRequest { get; set; } + public override int? ClientTimeoutPerRequest { get; set; } + public override int? ConcurrentTaskCount { get; set; } + + public SetAzureStorageServiceLoggingCommand() + { + EnableMultiThread = false; + } + + /// + /// Update the specified service properties according to the input + /// + /// Service properties + internal void UpdateServiceProperties(StorageClient.LoggingProperties logging) + { + if (Version != null) + { + logging.Version = Version.ToString(); + } + + if (RetentionDays != null) + { + if (RetentionDays == -1) + { + //Disable logging retention policy + logging.RetentionDays = null; + } + else if (RetentionDays < 1 || RetentionDays > 365) + { + throw new ArgumentException(string.Format(Resources.InvalidRetentionDay, RetentionDays)); + } + else + { + logging.RetentionDays = RetentionDays; + } + } + + if (LoggingOperations != null && LoggingOperations.Length > 0) + { + StorageClient.LoggingOperations logOperations = default(StorageClient.LoggingOperations); + + for (int i = 0; i < LoggingOperations.Length; i++) + { + if (LoggingOperations[i] == StorageClient.LoggingOperations.None + || LoggingOperations[i] == StorageClient.LoggingOperations.All) + { + if (LoggingOperations.Length > 1) + { + throw new ArgumentException(Resources.NoneAndAllOperationShouldBeAlone); + } + } + + logOperations |= LoggingOperations[i]; + } + + logging.LoggingOperations = logOperations; + // Set default logging version + if (string.IsNullOrEmpty(logging.Version)) + { + string defaultLoggingVersion = StorageNouns.DefaultLoggingVersion; + logging.Version = defaultLoggingVersion; + } + } + } + + /// + /// Get logging operations + /// + /// The string type of Logging operations + /// GetLoggingOperations("all"), GetLoggingOperations("read, write") + /// LoggingOperations object + internal StorageClient.LoggingOperations GetLoggingOperations(string LoggingOperations) + { + LoggingOperations = LoggingOperations.ToLower(); + if (LoggingOperations.IndexOf("all") != -1) + { + if (LoggingOperations == "all") + { + return StorageClient.LoggingOperations.All; + } + else + { + throw new ArgumentException(LoggingOperationHelpMessage); + } + } + else if (LoggingOperations.IndexOf("none") != -1) + { + if (LoggingOperations == "none") + { + return StorageClient.LoggingOperations.None; + } + else + { + throw new ArgumentException(LoggingOperationHelpMessage); + } + } + else + { + try + { + return (StorageClient.LoggingOperations)Enum.Parse(typeof(StorageClient.LoggingOperations), + LoggingOperations, true); + } + catch + { + throw new ArgumentException(String.Format(Resources.InvalidEnumName, LoggingOperations)); + } + } + } + + /// + /// Execute command + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + StorageClient.ServiceProperties currentServiceProperties = Channel.GetStorageServiceProperties(ServiceType, GetRequestOptions(ServiceType), OperationContext); + StorageClient.ServiceProperties serviceProperties = new StorageClient.ServiceProperties(); + serviceProperties.Clean(); + serviceProperties.Logging = currentServiceProperties.Logging; + + UpdateServiceProperties(serviceProperties.Logging); + + Channel.SetStorageServiceProperties(ServiceType, serviceProperties, + GetRequestOptions(ServiceType), OperationContext); + + if (PassThru) + { + WriteObject(serviceProperties.Logging); + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/SetAzureStorageServiceMetrics.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/SetAzureStorageServiceMetrics.cs new file mode 100644 index 000000000000..005dfa407b91 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Common/Cmdlet/SetAzureStorageServiceMetrics.cs @@ -0,0 +1,159 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Storage.Shared.Protocol; + +namespace Microsoft.WindowsAzure.Commands.Storage.Common.Cmdlet +{ + /// + /// Show azure storage service properties + /// + [Cmdlet(VerbsCommon.Set, StorageNouns.StorageServiceMetrics), + OutputType(typeof(MetricsProperties))] + public class SetAzureStorageServiceMetricsCommand : StorageCloudBlobCmdletBase + { + [Parameter(Mandatory = true, Position = 0, HelpMessage = GetAzureStorageServiceLoggingCommand.ServiceTypeHelpMessage)] + public StorageServiceType ServiceType { get; set; } + + [Parameter(Mandatory = true, Position = 1, HelpMessage = "Azure storage service metrics type(Hour, Minute).")] + public ServiceMetricsType MetricsType { get; set; } + + [Parameter(HelpMessage = "Metrics version")] + public double? Version { get; set; } + + [Parameter(HelpMessage = "Metrics retention days. -1 means disable Metrics retention policy, otherwise enable.")] + [ValidateRange(-1, 365)] + public int? RetentionDays { get; set; } + + [Parameter(HelpMessage = "Metrics level.(None/Service/ServiceAndApi)")] + public MetricsLevel? MetricsLevel { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Display ServiceProperties")] + public SwitchParameter PassThru { get; set; } + + // Overwrite the useless parameter + public override int? ServerTimeoutPerRequest { get; set; } + public override int? ClientTimeoutPerRequest { get; set; } + public override int? ConcurrentTaskCount { get; set; } + + public SetAzureStorageServiceMetricsCommand() + { + EnableMultiThread = false; + } + + /// + /// Update the specified service properties according to the input + /// + /// Service properties + internal void UpdateServiceProperties(MetricsProperties metrics) + { + if (Version != null) + { + metrics.Version = Version.ToString(); + } + + if (RetentionDays != null) + { + if (RetentionDays == -1) + { + //Disable metrics retention policy + metrics.RetentionDays = null; + } + else if (RetentionDays < 1 || RetentionDays > 365) + { + throw new ArgumentException(string.Format(Resources.InvalidRetentionDay, RetentionDays)); + } + else + { + metrics.RetentionDays = RetentionDays; + } + } + + if (MetricsLevel != null) + { + MetricsLevel metricsLevel = MetricsLevel.Value; + metrics.MetricsLevel = metricsLevel; + // Set default metrics version + if (string.IsNullOrEmpty(metrics.Version)) + { + string defaultMetricsVersion = StorageNouns.DefaultMetricsVersion; + metrics.Version = defaultMetricsVersion; + } + } + } + + /// + /// Get metrics level + /// + /// The string type of Metrics level + /// GetMetricsLevel("None"), GetMetricsLevel("Service") + /// MetricsLevel object + internal MetricsLevel GetMetricsLevel(string MetricsLevel) + { + try + { + return (MetricsLevel)Enum.Parse(typeof(MetricsLevel), MetricsLevel, true); + } + catch + { + throw new ArgumentException(String.Format(Resources.InvalidEnumName, MetricsLevel)); + } + } + + /// + /// Execute command + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + ServiceProperties currentServiceProperties = Channel.GetStorageServiceProperties(ServiceType, GetRequestOptions(ServiceType), OperationContext); + ServiceProperties serviceProperties = new ServiceProperties(); + serviceProperties.Clean(); + + bool isHourMetrics = false; + + switch (MetricsType) + { + case ServiceMetricsType.Hour: + serviceProperties.HourMetrics = currentServiceProperties.HourMetrics; + UpdateServiceProperties(serviceProperties.HourMetrics); + isHourMetrics = true; + break; + case ServiceMetricsType.Minute: + serviceProperties.MinuteMetrics = currentServiceProperties.MinuteMetrics; + UpdateServiceProperties(serviceProperties.MinuteMetrics); + isHourMetrics = false; + break; + } + + Channel.SetStorageServiceProperties(ServiceType, serviceProperties, + GetRequestOptions(ServiceType), OperationContext); + + if (PassThru) + { + if (isHourMetrics) + { + WriteObject(serviceProperties.HourMetrics); + } + else + { + WriteObject(serviceProperties.MinuteMetrics); + } + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/CmdletOperationContext.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/CmdletOperationContext.cs new file mode 100644 index 000000000000..4a3362307bff --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Common/CmdletOperationContext.cs @@ -0,0 +1,174 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Threading; +using Microsoft.WindowsAzure.Storage; + +namespace Microsoft.WindowsAzure.Commands.Storage.Common +{ + internal class CmdletOperationContext + { + private static volatile bool inited; + private static object syncRoot = new Object(); + + public static DateTime StartTime + { + get; + private set; + } + + public static string ClientRequestId + { + get; + private set; + } + + /// + /// started remote call counter + /// + private static int startedRemoteCallCounter = 0; + + public static int StartedRemoteCallCounter + { + get + { + return startedRemoteCallCounter; + } + } + + /// + /// finished remote call counter + /// + private static int finishedRemoteCallCounter = 0; + + public static int FinishedRemoteCallCounter + { + get + { + return finishedRemoteCallCounter; + } + } + + private CmdletOperationContext() { } + + /// + /// Init the cmdlet operation context + /// + public static void Init() + { + if (!inited) + { + lock (syncRoot) + { + if (!inited) + { + StartTime = DateTime.Now; + ClientRequestId = GenClientRequestID(); + inited = true; + } + } + } + } + + /// + /// Get an unique client request id + /// + /// A unique request id + internal static string GenClientRequestID() + { + string uniqueId = System.Guid.NewGuid().ToString(); + return string.Format(Resources.ClientRequestIdFormat, uniqueId); + } + + /// + /// Get Storage Operation Context for rest calls + /// + /// Ouput writer for writing logs for each rest call + /// Storage operation context + public static OperationContext GetStorageOperationContext(Action outputWriter) + { + if (!inited) + { + CmdletOperationContext.Init(); + } + + OperationContext context = new OperationContext(); + context.ClientRequestID = ClientRequestId; + + context.SendingRequest += (s, e) => + { + context.StartTime = DateTime.Now; + + Interlocked.Increment(ref startedRemoteCallCounter); + + string message = String.Format(Resources.StartRemoteCall, + startedRemoteCallCounter, e.Request.Method, e.Request.RequestUri.ToString()); + + try + { + if (outputWriter != null) + { + outputWriter(message); + } + } + catch + { + //catch the exception. If so, the storage client won't sleep and retry + } + }; + + context.ResponseReceived += (s, e) => + { + context.EndTime = DateTime.Now; + Interlocked.Increment(ref finishedRemoteCallCounter); + + double elapsedTime = (context.EndTime - context.StartTime).TotalMilliseconds; + string message = String.Format(Resources.FinishRemoteCall, + e.Request.RequestUri.ToString(), (int)e.Response.StatusCode, e.Response.StatusCode, e.RequestInformation.ServiceRequestID, elapsedTime); + + try + { + if (outputWriter != null) + { + outputWriter(message); + } + } + catch + { + //catch the exception. If so, the storage client won't sleep and retry + } + }; + + return context; + } + + /// + /// Get the running ms from when operationcontext started + /// + /// A time string in ms + public static double GetRunningMilliseconds() + { + if (!inited) + { + return 0; + } + else + { + TimeSpan span = DateTime.Now - StartTime; + return span.TotalMilliseconds; + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/CommunicationExceptionUtil.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/CommunicationExceptionUtil.cs new file mode 100644 index 000000000000..e1ba78ad83fe --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Common/CommunicationExceptionUtil.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.ServiceModel; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.Storage.Common +{ + /// + /// Communication exception utility + /// + public static class CommunicationExceptionUtil + { + /// + /// is not found communication exception + /// + /// Communication Exception + /// true if exception caused by resource not found, otherwise, false + public static bool IsNotFoundException(this CommunicationException exception) + { + return ErrorHelper.IsNotFoundCommunicationException(exception); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/ConfirmTaskCompletionSource.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/ConfirmTaskCompletionSource.cs new file mode 100644 index 000000000000..05b7e24f84f2 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Common/ConfirmTaskCompletionSource.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Threading.Tasks; + +namespace Microsoft.WindowsAzure.Commands.Storage.Common +{ + /// + /// Async prompt confirm task completion source + /// + internal class ConfirmTaskCompletionSource : TaskCompletionSource + { + public string Message { get; private set; } + + /// + /// Construct a ConfirmTaskCompletionSource object + /// + /// Confirmation message + public ConfirmTaskCompletionSource(string message) : base() + { + Message = message; + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/DataManagementWrapper.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/DataManagementWrapper.cs new file mode 100644 index 000000000000..cbb597f34d0f --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Common/DataManagementWrapper.cs @@ -0,0 +1,99 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Storage.DataMovement; +using Microsoft.WindowsAzure.Storage.DataMovement.TransferJobs; + +namespace Microsoft.WindowsAzure.Commands.Storage.Common +{ + internal sealed class DataManagementWrapper : ITransferJobRunner + { + // Powershell could be ran either in 32bit or 64bit + // The default algorithm to calculate the size may be too much if PSH is ran under 32bit on a 64bit OS with big memory + private const int Maximum32bitCacheSize = 512 * 1024 * 1024; + + private TransferManager manager; + + public DataManagementWrapper(int concurrency, string clientRequestId) + { + TransferOptions options = new TransferOptions() + { + ParallelOperations = concurrency, + ClientRequestIdPrefix = clientRequestId + }; + + if (!Environment.Is64BitProcess && options.MaximumCacheSize > Maximum32bitCacheSize) + { + options.MaximumCacheSize = Maximum32bitCacheSize; + } + + this.manager = new TransferManager(options); + } + + public Task RunTransferJob(TransferJobBase job, Action progressReport, CancellationToken cancellationToken) + { + TaskCompletionSource downloadCompletionSource = new TaskCompletionSource(); + + job.StartEvent += (sender, eventArgs) => + { + if (cancellationToken.IsCancellationRequested) + { + return; + } + + progressReport(0, 0); + }; + + job.ProgressEvent += (sender, eventArgs) => + { + if (cancellationToken.IsCancellationRequested) + { + return; + } + + progressReport(eventArgs.Progress, eventArgs.Speed); + }; + + job.FinishEvent += (sender, eventArgs) => + { + if (cancellationToken.IsCancellationRequested) + { + return; + } + + if (eventArgs.Exception == null) + { + downloadCompletionSource.SetResult(null); + } + else + { + downloadCompletionSource.SetException(eventArgs.Exception); + } + }; + + this.manager.EnqueueJob(job, cancellationToken); + + return downloadCompletionSource.Task; + } + + public void Dispose() + { + this.manager.Dispose(); + this.manager = null; + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/ITransferJobRunner.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/ITransferJobRunner.cs new file mode 100644 index 000000000000..080913be898b --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Common/ITransferJobRunner.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Storage.DataMovement.TransferJobs; + +namespace Microsoft.WindowsAzure.Commands.Storage.Common +{ + /// + /// Provides the interface for transfer job runners. + /// + internal interface ITransferJobRunner : IDisposable + { + Task RunTransferJob(TransferJobBase job, Action progressReport, CancellationToken cancellationToken); + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/LimitedConcurrencyTaskScheduler.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/LimitedConcurrencyTaskScheduler.cs new file mode 100644 index 000000000000..11bf9e3ad553 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Common/LimitedConcurrencyTaskScheduler.cs @@ -0,0 +1,234 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Concurrent; +using System.Diagnostics; +using System.Threading; +using System.Threading.Tasks; + +namespace Microsoft.WindowsAzure.Commands.Storage.Common +{ + /// + /// A task scheduler with limited concurrency. + /// + internal class LimitedConcurrencyTaskScheduler + { + /// + /// Task number counter + /// The following counter should be used with Interlocked + /// + private long totalTaskCount = 0; + private long failedTaskCount = 0; + private long finishedTaskCount = 0; + private long activeTaskCount = 0; + private int maxConcurrency = 0; + private CountdownEvent taskCounter; + private CancellationToken cancellationToken; + private bool IsFirstWait; + + public long TotalTaskCount { get { return Interlocked.Read(ref totalTaskCount); } } + public long FailedTaskCount { get { return Interlocked.Read(ref failedTaskCount); } } + public long FinishedTaskCount { get { return Interlocked.Read(ref finishedTaskCount); } } + public long ActiveTaskCount { get { return Interlocked.Read(ref activeTaskCount); } } + + public delegate void ErrorEventHandler(object sender, TaskExceptionEventArgs e); + + /// + /// The error event for the running task. + /// + public event ErrorEventHandler OnError; + + /// + /// Task waiting queue + /// + private ConcurrentQueue>> taskQueue; + + /// + /// Task status + /// Key: Output id + /// Value: Task is done or not. + /// + private ConcurrentDictionary TaskStatus; + + /// + /// Construct a limited concurrency task scheduler + /// + /// + /// + public LimitedConcurrencyTaskScheduler(int maxConcurrency, CancellationToken cancellationToken) + { + taskQueue = new ConcurrentQueue>>(); + this.maxConcurrency = maxConcurrency; + this.cancellationToken = cancellationToken; + taskCounter = new CountdownEvent(1); + IsFirstWait = true; + TaskStatus = new ConcurrentDictionary(); + } + + /// + /// Wait for all task completion + /// + /// Wait time out + /// Cancellation token + /// True if all task completed, otherwise false. + public bool WaitForComplete(int millisecondsTimeout, CancellationToken cancellationToken) + { + //There is no concurrency issue here since it should be only called by EndProcessing in PowerShell. + if (IsFirstWait) + { + IsFirstWait = false; + //Enable task scheduler complete + taskCounter.Signal(); + } + + return taskCounter.Wait(millisecondsTimeout, cancellationToken); + } + + /// + /// Get available task id + /// thread unsafe since it should only run in main thread + /// + public long GetAvailableTaskId() + { + return totalTaskCount; + } + + /// + /// Is the specified task completed + /// + /// Task id + /// True if the specified task completed, otherwise false + public bool IsTaskCompleted(long taskId) + { + bool finished = false; + bool existed = TaskStatus.TryGetValue(taskId, out finished); + return existed && finished; + } + + /// + /// Run async task + /// + /// Task operation + /// Task id + protected async void RunConcurrentTask(long taskId, Task task) + { + bool initTaskStatus = false; + bool finishedTaskStatus = true; + + Interlocked.Increment(ref activeTaskCount); + + try + { + TaskStatus.TryAdd(taskId, initTaskStatus); + await task.ConfigureAwait(false); + Interlocked.Increment(ref finishedTaskCount); + } + catch (Exception e) + { + Interlocked.Increment(ref failedTaskCount); + + if (OnError != null) + { + TaskExceptionEventArgs eventArgs = new TaskExceptionEventArgs(taskId, e); + + try + { + OnError(this, eventArgs); + } + catch(Exception devException) + { + Debug.Fail(devException.Message); + } + } + } + finally + { + TaskStatus.TryUpdate(taskId, finishedTaskStatus, initTaskStatus); + } + + Interlocked.Decrement(ref activeTaskCount); + taskCounter.Signal(); + + RunRemainingTask(); + } + + /// + /// Run the remaining task in the waiting queue + /// + private void RunRemainingTask() + { + if (cancellationToken.IsCancellationRequested) + { + return; + } + + Tuple> remainingTask = null; + taskQueue.TryDequeue(out remainingTask); + if (remainingTask != null) + { + Task task = remainingTask.Item2(remainingTask.Item1); + RunConcurrentTask(remainingTask.Item1, task); + } + } + + /// + /// Run a task + /// + /// Task generator + public void RunTask(Func taskGenerator) + { + if (cancellationToken.IsCancellationRequested) + { + return; + } + + long taskId = GetAvailableTaskId(); + + Interlocked.Increment(ref totalTaskCount); + taskCounter.AddCount(); + + if (Interlocked.Read(ref activeTaskCount) < maxConcurrency) + { + Task task = taskGenerator(taskId); + RunConcurrentTask(taskId, task); + } + else + { + Tuple> waitTask = new Tuple>(taskId, taskGenerator); + taskQueue.Enqueue(waitTask); + } + } + } + + /// + /// Task exception event arguments + /// + public class TaskExceptionEventArgs : EventArgs + { + public long TaskId { get; private set; } + public Exception Exception { get; private set; } + + /// + /// Construct a task exception event arguments object. + /// + /// Task id + /// Task exception + public TaskExceptionEventArgs(long taskId, Exception e) + { + TaskId = taskId; + Exception = e; + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/NameUtil.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/NameUtil.cs new file mode 100644 index 000000000000..c962a8010a72 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Common/NameUtil.cs @@ -0,0 +1,282 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Text.RegularExpressions; + +namespace Microsoft.WindowsAzure.Commands.Storage.Common +{ + /// + /// Name utility + /// + internal class NameUtil + { + /// + /// Max file length in windows + /// + public const int WindowsMaxFileNameLength = 256; + + /// + /// Is valid container name + /// + /// Container name + /// True for valid container name, otherwise return false + public static bool IsValidContainerName(string containerName) + { + Regex regex = new Regex(@"^\$root$|^\$logs$|^[a-z0-9]([a-z0-9]|(?<=[a-z0-9])-(?=[a-z0-9])){2,62}$"); + return regex.IsMatch(containerName); + } + + /// + /// Is valid container prefix or not + /// + /// Container prefix + /// True for valid container prefix, otherwise return false + public static bool IsValidContainerPrefix(string containerPrefix) + { + if (containerPrefix.StartsWith("$")) + { + string root = "$root"; + string logs = "$logs"; + + if (root.IndexOf(containerPrefix) == 0 || logs.IndexOf(containerPrefix) == 0) + { + return true; + } + else + { + return false; + } + } + else + { + if (containerPrefix.Length > 0 && containerPrefix.Length < 3) + { + containerPrefix = containerPrefix + "abc"; + }; + + if (containerPrefix.EndsWith("-")) + { + containerPrefix += "a"; + } + + return IsValidContainerName(containerPrefix); + } + } + + /// + /// Is valid blob name + /// + /// Blob name + /// True for valid blob name, otherwise return false + public static bool IsValidBlobName(string blobName) + { + int minLength = 0; + int maxLength = 1024; + + if (blobName.Length > minLength && blobName.Length <= maxLength) + { + return true; + } + else + { + return false; + } + } + + /// + /// Is valid blob prefix + /// + /// Blob name + /// True for valid blob name, otherwise return false + public static bool IsValidBlobPrefix(string blobPrefix) + { + return IsValidBlobName(blobPrefix); + } + + + /// + /// Is valid table name + /// + /// Table name + /// True for valid table name, otherwise return false + public static bool IsValidTableName(string tableName) + { + //http://msdn.microsoft.com/en-us/library/windowsazure/hh343258.aspx + string metricsPrefix = "$Metric"; + if (!String.IsNullOrEmpty(tableName) && tableName.StartsWith(metricsPrefix)) + { + return true; + } + else + { + Regex regex = new Regex(@"^[A-Za-z][A-Za-z0-9]{2,62}$"); + return regex.IsMatch(tableName); + } + } + + /// + /// Is valid table prefix + /// + /// Table prefix + /// True for valid table prefix, otherwise return false + public static bool IsValidTablePrefix(string tablePrefix) + { + if (tablePrefix.Length > 0 && tablePrefix.Length < 3) + { + tablePrefix = tablePrefix + "abc"; + }; + + return IsValidTableName(tablePrefix); + } + + + /// + /// Is valid queue name + /// + /// Queue name + /// True for valid queue name, otherwise return false + public static bool IsValidQueueName(string queueName) + { + Regex regex = new Regex(@"^[0-9a-z]([a-z0-9]|(?<=[a-z0-9])-(?=[a-z0-9])){1,61}[0-9a-z]$"); + return regex.IsMatch(queueName); + } + + /// + /// Is valid queue prefix + /// + /// Queue prefix + /// True for valid queue prefix, otherwise return false + public static bool IsValidQueuePrefix(string queuePrefix) + { + if (queuePrefix.Length > 0 && queuePrefix.Length < 3) + { + queuePrefix = queuePrefix + "abc"; + }; + + if(queuePrefix.EndsWith("-")) + { + queuePrefix += "a"; + } + + return IsValidQueueName(queuePrefix); + } + + /// + /// Is valid file name in local machine + /// + /// FileName + /// True for valid file name, otherwise return false + public static bool IsValidFileName(string fileName) + { + //http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#maxpath + + if (string.IsNullOrEmpty(fileName) || fileName.Length > WindowsMaxFileNameLength) + { + return false; + } + else if (fileName.IndexOfAny(System.IO.Path.GetInvalidFileNameChars()) != -1) + { + return false; + } + else + { + string realName = Path.GetFileNameWithoutExtension(fileName); + //http://en.wikipedia.org/wiki/Filename + //In Windows and DOS utilities, some words might also be reserved and can not be used as filenames. + //However, "CLOCK$", "COM0", "LPT0" are not forbidden name since they can be used as file name in command line prompt. + string[] forbiddenList = { "CON", "PRN", "AUX", "NUL", + "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", + "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9" }; + bool forbidden = forbiddenList.Contains(realName); + return !forbidden; + } + } + + public static string ResolveBlobName(string blobName) + { + return blobName.Replace('\\', '/'); + } + + /// + /// convert blob name into valid file name + /// + /// blob name + /// valid file name + public static string ConvertBlobNameToFileName(string blobName, DateTimeOffset? snapshotTime) + { + string fileName = blobName; + + //replace dirctionary + Dictionary replaceRules = new Dictionary() + { + {"/", "\\"} + }; + + foreach (KeyValuePair rule in replaceRules) + { + fileName = fileName.Replace(rule.Key, rule.Value); + } + + if (snapshotTime != null) + { + int index = fileName.LastIndexOf('.'); + + string prefix = string.Empty; + string postfix = string.Empty; + string timeStamp = string.Format("{0:u}", snapshotTime.Value); + timeStamp = timeStamp.Replace(":", string.Empty).TrimEnd(new char[] { 'Z' }); + + if(index == -1) + { + prefix = fileName; + postfix = string.Empty; + } + else + { + prefix = fileName.Substring(0, index); + postfix = fileName.Substring(index); + } + + fileName = string.Format(Resources.FileNameFormatForSnapShot, prefix, timeStamp, postfix); + } + + return fileName; + } + + /// + /// Get the prefix that don't contain wildcard + /// + /// Wildcard pattern + /// Non wildcard prefix + public static string GetNonWildcardPrefix(string pattern) + { + if (string.IsNullOrEmpty(pattern)) return string.Empty; + + for (int index = 0; index < pattern.Length; index++) + { + if (WildcardPattern.ContainsWildcardCharacters(pattern[index].ToString())) + { + return pattern.Substring(0, index); + } + } + + return pattern; + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/ResourceAlreadyExistException.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/ResourceAlreadyExistException.cs new file mode 100644 index 000000000000..de49c4e6d98d --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Common/ResourceAlreadyExistException.cs @@ -0,0 +1,33 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.Storage.Common +{ + /// + /// Resource already exist exception + /// + [Serializable] + public class ResourceAlreadyExistException : Exception + { + /// + /// Create a new instance with error message + /// + /// error message + public ResourceAlreadyExistException(String message) + : base(message) + { } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/ResourceNotFoundException.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/ResourceNotFoundException.cs new file mode 100644 index 000000000000..aa9bdee5b388 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Common/ResourceNotFoundException.cs @@ -0,0 +1,33 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ------------------------------------------------------------------------------------ + +using System; + +namespace Microsoft.WindowsAzure.Commands.Storage.Common +{ + /// + /// Resource not found exception + /// + [Serializable] + public class ResourceNotFoundException : Exception + { + /// + /// Create a new instance with error message + /// + /// error message + public ResourceNotFoundException(string message) + : base(message) + { } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/SasTokenHelper.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/SasTokenHelper.cs new file mode 100644 index 000000000000..303ffc563757 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Common/SasTokenHelper.cs @@ -0,0 +1,175 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Blob; +using Microsoft.WindowsAzure.Storage.Queue; +using Microsoft.WindowsAzure.Storage.Queue.Protocol; +using Microsoft.WindowsAzure.Storage.Table; + +namespace Microsoft.WindowsAzure.Commands.Storage.Common +{ + internal class SasTokenHelper + { + /// + /// Validate the container access policy + /// + /// SharedAccessBlobPolicy object + /// The policy identifier which need to be checked. + public static bool ValidateContainerAccessPolicy(IStorageBlobManagement channel, string containerName, + SharedAccessBlobPolicy policy, string policyIdentifier) + { + if (string.IsNullOrEmpty(policyIdentifier)) return true; + CloudBlobContainer container = channel.GetContainerReference(containerName); + AccessCondition accessCondition = null; + BlobRequestOptions options = null; + OperationContext context = null; + BlobContainerPermissions permission = channel.GetContainerPermissions(container, accessCondition, options, context); + + SharedAccessBlobPolicy sharedAccessPolicy = + GetExistingPolicy(permission.SharedAccessPolicies, policyIdentifier); + + if (policy.Permissions != SharedAccessBlobPermissions.None) + { + throw new ArgumentException(Resources.SignedPermissionsMustBeOmitted); + } + + if (policy.SharedAccessExpiryTime.HasValue && sharedAccessPolicy.SharedAccessExpiryTime.HasValue) + { + throw new ArgumentException(Resources.SignedExpiryTimeMustBeOmitted); + } + + return !sharedAccessPolicy.SharedAccessExpiryTime.HasValue; + } + + /// + /// Validate the queue access policy + /// + /// SharedAccessBlobPolicy object + /// The policy identifier which need to be checked. + public static bool ValidateQueueAccessPolicy(IStorageQueueManagement channel, string queueName, + SharedAccessQueuePolicy policy, string policyIdentifier) + { + if (string.IsNullOrEmpty(policyIdentifier)) return true; + CloudQueue queue = channel.GetQueueReference(queueName); + QueueRequestOptions options = null; + OperationContext context = null; + QueuePermissions permission = channel.GetPermissions(queue, options, context); + + SharedAccessQueuePolicy sharedAccessPolicy = + GetExistingPolicy(permission.SharedAccessPolicies, policyIdentifier); + + if (policy.Permissions != SharedAccessQueuePermissions.None) + { + throw new ArgumentException(Resources.SignedPermissionsMustBeOmitted); + } + + if (policy.SharedAccessExpiryTime.HasValue && sharedAccessPolicy.SharedAccessExpiryTime.HasValue) + { + throw new ArgumentException(Resources.SignedExpiryTimeMustBeOmitted); + } + + return !sharedAccessPolicy.SharedAccessExpiryTime.HasValue; + } + + /// + /// Validate the table access policy + /// + /// SharedAccessBlobPolicy object + /// The policy identifier which need to be checked. + internal static bool ValidateTableAccessPolicy(IStorageTableManagement channel, + string tableName, SharedAccessTablePolicy policy, string policyIdentifier) + { + if (string.IsNullOrEmpty(policyIdentifier)) return true; + CloudTable table = channel.GetTableReference(tableName); + TableRequestOptions options = null; + OperationContext context = null; + TablePermissions permission = channel.GetTablePermissions(table, options, context); + + SharedAccessTablePolicy sharedAccessPolicy = + GetExistingPolicy(permission.SharedAccessPolicies, policyIdentifier); + + if (policy.Permissions != SharedAccessTablePermissions.None) + { + throw new ArgumentException(Resources.SignedPermissionsMustBeOmitted); + } + + if (policy.SharedAccessExpiryTime.HasValue && sharedAccessPolicy.SharedAccessExpiryTime.HasValue) + { + throw new ArgumentException(Resources.SignedExpiryTimeMustBeOmitted); + } + + return !sharedAccessPolicy.SharedAccessExpiryTime.HasValue; + } + + /// + /// Valiate access policy + /// + /// Access policy + /// policyIdentifier + internal static T GetExistingPolicy(IDictionary policies, string policyIdentifier) + { + policyIdentifier = policyIdentifier.ToLower();//policy name should case-insensitive in url. + foreach (KeyValuePair pair in policies) + { + if (pair.Key.ToLower() == policyIdentifier) + { + return pair.Value; + } + } + + throw new ArgumentException(string.Format(Resources.InvalidAccessPolicy, policyIdentifier)); + } + + public static void SetupAccessPolicyLifeTime(DateTime? startTime, DateTime? expiryTime, + out DateTimeOffset? SharedAccessStartTime, out DateTimeOffset? SharedAccessExpiryTime, bool shouldSetExpiryTime) + { + SharedAccessStartTime = null; + SharedAccessExpiryTime = null; + //Set up start/expiry time + if (startTime != null) + { + SharedAccessStartTime = startTime.Value.ToUniversalTime(); + } + + if (expiryTime != null) + { + SharedAccessExpiryTime = expiryTime.Value.ToUniversalTime(); + } + else if (shouldSetExpiryTime) + { + double defaultLifeTime = 1.0; //Hours + + if (SharedAccessStartTime != null) + { + SharedAccessExpiryTime = SharedAccessStartTime.Value.AddHours(defaultLifeTime).ToUniversalTime(); + } + else + { + SharedAccessExpiryTime = DateTime.UtcNow.AddHours(defaultLifeTime).ToUniversalTime(); + } + } + + if (SharedAccessStartTime != null && SharedAccessExpiryTime.HasValue + && SharedAccessExpiryTime <= SharedAccessStartTime) + { + throw new ArgumentException(String.Format(Resources.ExpiryTimeGreatThanStartTime, + SharedAccessExpiryTime.ToString(), SharedAccessStartTime.ToString())); + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/ServiceMetricsType.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/ServiceMetricsType.cs new file mode 100644 index 000000000000..11010262cdfb --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Common/ServiceMetricsType.cs @@ -0,0 +1,23 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Storage.Common +{ + + public enum ServiceMetricsType + { + Hour, + Minute + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/ServicePropertiesExtension.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/ServicePropertiesExtension.cs new file mode 100644 index 000000000000..cdaa9ed93646 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Common/ServicePropertiesExtension.cs @@ -0,0 +1,34 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Storage.Shared.Protocol; + +namespace Microsoft.WindowsAzure.Commands.Storage.Common +{ + public static class ServicePropertiesExtension + { + /// + /// Clean all the settings on the ServiceProperties project + /// + /// Service properties + internal static void Clean(this ServiceProperties serviceProperties) + { + serviceProperties.Logging = null; + serviceProperties.HourMetrics = null; + serviceProperties.MinuteMetrics = null; + serviceProperties.Cors = null; + serviceProperties.DefaultServiceVersion = null; + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/StorageCloudCmdletBase.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/StorageCloudCmdletBase.cs new file mode 100644 index 000000000000..974838008dc5 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Common/StorageCloudCmdletBase.cs @@ -0,0 +1,583 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.Management.Automation; +using System.Net; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Commands.Storage.File; +using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Blob; +using Microsoft.WindowsAzure.Storage.File; +using Microsoft.WindowsAzure.Storage.Queue; +using Microsoft.WindowsAzure.Storage.Table; + +namespace Microsoft.WindowsAzure.Commands.Storage.Common +{ + /// + /// Base cmdlet for all storage cmdlet that works with cloud + /// + public class StorageCloudCmdletBase : CloudBaseCmdlet + where T : class + { + [Parameter(HelpMessage = "Azure Storage Context Object", + ValueFromPipelineByPropertyName = true)] + public virtual AzureStorageContext Context { get; set; } + + [Parameter(HelpMessage = "The server time out for each request in seconds.")] + public virtual int? ServerTimeoutPerRequest { get; set; } + + [Parameter(HelpMessage = "The client side maximum execution time for each request in seconds.")] + public virtual int? ClientTimeoutPerRequest { get; set; } + + /// + /// Amount of concurrent async tasks to run per available core. + /// + protected int concurrentTaskCount = 10; + + /// + /// Amount of concurrent async tasks to run per available core. + /// + [Parameter(HelpMessage = "The total amount of concurrent async tasks. The default value is 10.")] + [ValidateNotNull] + [ValidateRange(1, 1000)] + public virtual int? ConcurrentTaskCount + { + get { return concurrentTaskCount; } + set + { + int count = value.Value; + + if (count > 0) + { + concurrentTaskCount = count; + } + } + } + + /// + /// Cancellation Token Source + /// + private CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(); + protected CancellationToken CmdletCancellationToken; + + /// + /// whether stop processing + /// + protected bool ShouldForceQuit { get { return cancellationTokenSource.Token.IsCancellationRequested; } } + + /// + /// Enable or disable multithread + /// If the storage cmdlet want to disable the multithread feature, + /// it can disable when construct and beginProcessing + /// + protected bool EnableMultiThread + { + get { return enableMultiThread; } + set { enableMultiThread = value; } + } + private bool enableMultiThread = true; + + internal TaskOutputStream OutputStream; + + //CountDownEvent wait time out and output time interval. + protected const int WaitTimeout = 1000;//ms + + /// + /// Summary progress record on multithread task + /// + protected ProgressRecord summaryRecord; + + private LimitedConcurrencyTaskScheduler taskScheduler; + + /// + /// Cmdlet operation context. + /// + protected OperationContext OperationContext + { + get + { + return CmdletOperationContext.GetStorageOperationContext(WriteDebugLog); + } + } + + /// + /// Write log in debug mode + /// + /// Debug log + internal void WriteDebugLog(string msg) + { + WriteDebugWithTimestamp(msg); + } + + /// + /// Get a request options + /// + /// Service type + /// Request options + public IRequestOptions GetRequestOptions(StorageServiceType type) + { + IRequestOptions options; + + switch (type) + { + case StorageServiceType.Blob: + options = new BlobRequestOptions(); + break; + case StorageServiceType.Queue: + options = new QueueRequestOptions(); + break; + case StorageServiceType.Table: + options = new TableRequestOptions(); + break; + case StorageServiceType.File: + options = new FileRequestOptions(); + break; + default: + throw new ArgumentException(Resources.InvalidStorageServiceType, "type"); + } + + if (this.ServerTimeoutPerRequest.HasValue) + { + options.ServerTimeout = ConvertToTimeSpan(this.ServerTimeoutPerRequest.Value); + } + + if (this.ClientTimeoutPerRequest.HasValue) + { + options.MaximumExecutionTime = ConvertToTimeSpan(this.ClientTimeoutPerRequest.Value); + } + + return options; + } + + /// + /// Get cloud storage account + /// + /// Storage account + internal AzureStorageContext GetCmdletStorageContext() + { + if (Context != null) + { + WriteDebugLog(String.Format(Resources.UseStorageAccountFromContext, Context.StorageAccountName)); + } + else + { + CloudStorageAccount account = null; + bool shouldInitChannel = ShouldInitServiceChannel(); + + try + { + if (shouldInitChannel) + { + account = GetStorageAccountFromSubscription(); + } + else + { + account = GetStorageAccountFromEnvironmentVariable(); + } + } + catch (Exception e) + { + //stop the pipeline if storage account is missed. + WriteTerminatingError(e); + } + + //Set the storage context and use it in pipeline + Context = new AzureStorageContext(account); + } + + return Context; + } + + /// + /// Output azure storage object with storage context + /// + /// An AzureStorageBase object + internal void WriteObjectWithStorageContext(AzureStorageBase item) + { + item.Context = Context; + + WriteObject(item); + } + + /// + /// Init channel with or without subscription in storage cmdlet + /// + /// Force to create a new channel + protected override void InitChannelCurrentSubscription(bool force) + { + //Create storage management channel + CreateChannel(); + } + + /// + /// Whether should init the service channel or not + /// + /// True if it need to init the service channel, otherwise false + internal virtual bool ShouldInitServiceChannel() + { + //Storage Context is empty and have already set the current storage account in subscription + if (Context == null && HasCurrentSubscription && CurrentContext.Subscription != null && + !String.IsNullOrEmpty(CurrentContext.Subscription.GetProperty(AzureSubscription.Property.StorageAccount))) + { + return true; + } + else + { + return false; + } + } + + /// + /// Output azure storage object with storage context + /// + /// An enumerable collection fo azurestorage object + internal void WriteObjectWithStorageContext(IEnumerable itemList) + { + if (null == itemList) + { + return; + } + + foreach (AzureStorageBase item in itemList) + { + WriteObjectWithStorageContext(item); + } + } + + /// + /// Convert the timeout in seconds into objects of TimeSpan. Notice + /// that xSCL does not accept a TimeSpan whose TotalMilliseconds + /// property exceeded int.MaxValue (2147483647) so if user specified a + /// value beyond that, we will use Infinite instead. + /// + /// + /// + private static TimeSpan? ConvertToTimeSpan(int timeoutInSeconds) + { + if (timeoutInSeconds > 0) + { + var timeSpan = TimeSpan.FromSeconds(timeoutInSeconds); + if ((long)timeSpan.TotalMilliseconds > int.MaxValue) + { + return null; + } + else + { + return timeSpan; + } + } + else if (timeoutInSeconds == Timeout.Infinite) + { + return null; + } + else + { + throw new ArgumentOutOfRangeException(string.Format(CultureInfo.CurrentCulture, Resources.InvalidTimeoutValue, timeoutInSeconds)); + } + } + + /// + /// Get current storage account from azure subscription + /// + /// A storage account + private CloudStorageAccount GetStorageAccountFromSubscription() + { + string CurrentStorageAccountName = CurrentContext.Subscription.GetProperty(AzureSubscription.Property.StorageAccount); + + if (string.IsNullOrEmpty(CurrentStorageAccountName)) + { + throw new ArgumentException(Resources.DefaultStorageCredentialsNotFound); + } + else + { + WriteDebugLog(String.Format(Resources.UseCurrentStorageAccountFromSubscription, CurrentStorageAccountName, CurrentContext.Subscription.Name)); + + try + { + //The service channel initialized by subscription + return CurrentContext.Subscription.GetCloudStorageAccount(); + } + catch (System.ServiceModel.CommunicationException e) + { + WriteVerboseWithTimestamp(Resources.CannotGetSotrageAccountFromSubscription); + + if (e.IsNotFoundException()) + { + //Repack the 404 error + string errorMessage = String.Format(Resources.CurrentStorageAccountNotFoundOnAzure, CurrentStorageAccountName, CurrentContext.Subscription.Name); + System.ServiceModel.CommunicationException exception = new System.ServiceModel.CommunicationException(errorMessage, e); + throw exception; + } + else + { + throw; + } + } + } + } + + /// + /// Get storage account from environment variable "AZURE_STORAGE_CONNECTION_STRING" + /// + /// Cloud storage account + private CloudStorageAccount GetStorageAccountFromEnvironmentVariable() + { + String connectionString = System.Environment.GetEnvironmentVariable(Resources.EnvConnectionString); + + if (String.IsNullOrEmpty(connectionString)) + { + throw new ArgumentException(Resources.DefaultStorageCredentialsNotFound); + } + else + { + WriteDebugLog(Resources.GetStorageAccountFromEnvironmentVariable); + + try + { + return CloudStorageAccount.Parse(connectionString); + } + catch + { + WriteVerboseWithTimestamp(Resources.CannotGetStorageAccountFromEnvironmentVariable); + throw; + } + } + } + + /// + /// Write error with category and identifier + /// + /// an exception object + protected override void WriteExceptionError(Exception e) + { + Debug.Assert(e != null, Resources.ExceptionCannotEmpty); + + if (e is StorageException) + { + e = ((StorageException)e).RepackStorageException(); + } + else if (e is AzureStorageFileException) + { + WriteError(((AzureStorageFileException)e).GetErrorRecord()); + return; + } + + WriteError(new ErrorRecord(e, e.GetType().Name, GetExceptionErrorCategory(e), null)); + } + + /// + /// Get the error category for specificed exception + /// + /// Exception object + /// Error category + protected ErrorCategory GetExceptionErrorCategory(Exception e) + { + ErrorCategory errorCategory = ErrorCategory.CloseError; //default error category + + if (e is ArgumentException) + { + errorCategory = ErrorCategory.InvalidArgument; + } + else if (e is ResourceNotFoundException) + { + errorCategory = ErrorCategory.ObjectNotFound; + } + else if (e is ResourceAlreadyExistException) + { + errorCategory = ErrorCategory.ResourceExists; + } + + return errorCategory; + } + + /// + /// write terminating error + /// + /// exception object + protected void WriteTerminatingError(Exception e) + { + Debug.Assert(e != null, Resources.ExceptionCannotEmpty); + ThrowTerminatingError(new ErrorRecord(e, e.GetType().Name, GetExceptionErrorCategory(e), null)); + } + + /// + /// Get the concurrency value + /// + /// The max number of concurrent task/rest call + protected int GetCmdletConcurrency() + { + return concurrentTaskCount; + } + + /// + /// Configure Service Point + /// + private void ConfigureServicePointManager() + { + int maxConcurrency = 1000; + int cmdletConcurrency = GetCmdletConcurrency(); + maxConcurrency = Math.Max(maxConcurrency, cmdletConcurrency); + //Set the default connection limit to a very high value and control the concurrency with LimitedConcurrencyTaskScheduler. + //If so, there is no need to set the ConnectionLimit for each ServicePoint. + ServicePointManager.DefaultConnectionLimit = maxConcurrency; + ServicePointManager.Expect100Continue = false; + ServicePointManager.UseNagleAlgorithm = true; + } + + private void TaskErrorHandler(object sender, TaskExceptionEventArgs args) + { + if (OutputStream != null) + { + OutputStream.WriteError(args.TaskId, args.Exception); + } + } + + /// + /// Init the multithread run time resource + /// + internal void InitMutltiThreadResources() + { + taskScheduler = new LimitedConcurrencyTaskScheduler(GetCmdletConcurrency(), CmdletCancellationToken); + OutputStream = new TaskOutputStream(CmdletCancellationToken); + OutputStream.OutputWriter = WriteObject; + OutputStream.ErrorWriter = WriteExceptionError; + OutputStream.ProgressWriter = WriteProgress; + OutputStream.VerboseWriter = WriteVerbose; + OutputStream.DebugWriter = WriteDebugWithTimestamp; + OutputStream.ConfirmWriter = ShouldProcess; + OutputStream.TaskStatusQueryer = taskScheduler.IsTaskCompleted; + taskScheduler.OnError += TaskErrorHandler; + + int summaryRecordId = 0; + string summary = String.Format(Resources.TransmitActiveSummary, taskScheduler.TotalTaskCount, + taskScheduler.FinishedTaskCount, taskScheduler.FailedTaskCount, taskScheduler.ActiveTaskCount); + string activity = string.Format(Resources.TransmitActivity, this.MyInvocation.MyCommand); + summaryRecord = new ProgressRecord(summaryRecordId, activity, summary); + CmdletCancellationToken.Register(() => OutputStream.CancelConfirmRequest()); + } + + /// + /// Set up MultiThread environment + /// + internal void SetUpMultiThreadEnvironment() + { + ConfigureServicePointManager(); + InitMutltiThreadResources(); + } + + /// + /// End processing in multi thread environment + /// + internal void MultiThreadEndProcessing() + { + do + { + WriteTransmitSummaryStatus(); + //When task add to datamovement library, it will immediately start. + //So, we'd better output status at first. + OutputStream.Output(); + } + while (!taskScheduler.WaitForComplete(WaitTimeout, CmdletCancellationToken)); + + CloseSummaryProgressBar(); + OutputStream.Output(); + } + + protected void WriteTaskSummary() + { + WriteVerbose(String.Format(Resources.TransferSummary, taskScheduler.TotalTaskCount, + taskScheduler.FinishedTaskCount, taskScheduler.FailedTaskCount, taskScheduler.ActiveTaskCount)); + } + + /// + /// Close the summary progress bar, otherwise it'll cause a very bad performance on output. + /// + private void CloseSummaryProgressBar() + { + OutputStream.DisableProgressBar = true; + summaryRecord.RecordType = ProgressRecordType.Completed; + WriteProgress(summaryRecord); + } + + internal void RunTask(Func taskGenerator) + { + taskScheduler.RunTask(taskGenerator); + } + + /// + /// Write transmit summary status + /// + protected virtual void WriteTransmitSummaryStatus() + { + string summary = String.Format(Resources.TransmitActiveSummary, taskScheduler.TotalTaskCount, + taskScheduler.FinishedTaskCount, taskScheduler.FailedTaskCount, taskScheduler.ActiveTaskCount); + summaryRecord.StatusDescription = summary; + WriteProgress(summaryRecord); + } + + /// + /// Cmdlet begin process + /// + protected override void BeginProcessing() + { + CmdletOperationContext.Init(); + CmdletCancellationToken = cancellationTokenSource.Token; + WriteDebugLog(String.Format(Resources.InitOperationContextLog, this.GetType().Name, CmdletOperationContext.ClientRequestId)); + + if (enableMultiThread) + { + SetUpMultiThreadEnvironment(); + } + + base.BeginProcessing(); + } + + /// + /// End processing + /// + protected override void EndProcessing() + { + if (enableMultiThread) + { + MultiThreadEndProcessing(); + } + + double timespan = CmdletOperationContext.GetRunningMilliseconds(); + string message = string.Format(Resources.EndProcessingLog, + this.GetType().Name, CmdletOperationContext.StartedRemoteCallCounter, CmdletOperationContext.FinishedRemoteCallCounter, timespan, CmdletOperationContext.ClientRequestId); + WriteDebugLog(message); + base.EndProcessing(); + } + + /// + /// stop processing + /// time-consuming operation should work with ShouldForceQuit + /// + protected override void StopProcessing() + { + //ctrl + c and etc + cancellationTokenSource.Cancel(); + base.StopProcessing(); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/StorageExceptionUtil.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/StorageExceptionUtil.cs new file mode 100644 index 000000000000..cece55bfbc3f --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Common/StorageExceptionUtil.cs @@ -0,0 +1,76 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure.Storage; + +namespace Microsoft.WindowsAzure.Commands.Storage.Common +{ + /// + /// Storage exception utility + /// + public static class StorageExceptionUtil + { + /// + /// Whether the storage exception is resource not found exception or not. + /// + /// StorageException from storage client + /// Whether the storageexception is caused by resource not found + public static bool IsNotFoundException(this StorageException e) + { + return e.RequestInformation != null && e.RequestInformation.HttpStatusCode == 404; + } + + /// + /// Whether the storage exception is 409 conflict exception + /// + /// StorageException from the storage client + /// True if the storage exception is 409 conflict, otherwise false. + public static bool IsConflictException(this StorageException e) + { + return e.RequestInformation != null && e.RequestInformation.HttpStatusCode == 409; + } + + /// + /// Is the storage exception thrown with 2xx http status code + /// + /// Storage exception + /// True if the http status code is 2xx, otherwise false + public static bool IsSuccessfulResponse(this StorageException e) + { + return e.RequestInformation != null && (e.RequestInformation.HttpStatusCode / 100 == 2); + } + + /// + /// Replace storage exception to expose more information in Message. + /// + /// StorageException from storage client + /// A new storage exception with detailed error message + public static StorageException RepackStorageException(this StorageException e) + { + if (null != e.RequestInformation && + null != e.RequestInformation.HttpStatusMessage) + { + String msg = string.Format( + "{0} HTTP Status Code: {1} - HTTP Error Message: {2}", + e.Message, + e.RequestInformation.HttpStatusCode, + e.RequestInformation.HttpStatusMessage); + e = new StorageException(e.RequestInformation, msg, e); + } + + return e; + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/StorageNouns.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/StorageNouns.cs new file mode 100644 index 000000000000..aa4d98c33182 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Common/StorageNouns.cs @@ -0,0 +1,178 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Storage.Common +{ + /// + /// Storage nouns for cmdlet name + /// + public static class StorageNouns + { + /// + /// Blob cmdlet name + /// + public const string Blob = "AzureStorageBlob"; + + /// + /// Blobcontent cmdlet name + /// + public const string BlobContent = "AzureStorageBlobContent"; + + /// + /// blob snapshot cmdlet name + /// + public const string BlobSnapshot = "AzureStorageBlobSnapshot"; + + /// + /// Container cmdlet name + /// + public const string Container = "AzureStorageContainer"; + + /// + /// Container acl cmdlet name + /// + public const string ContainerAcl = "AzureStorageContainerAcl"; + + /// + /// Http protocol + /// + public const string HTTP = "Http"; + + /// + /// Https protocol + /// + public const string HTTPS = "Https"; + + /// + /// Queue cmdlet name + /// + public const string Queue = "AzureStorageQueue"; + + /// + /// Storage context cmdlet name + /// + public const string StorageContext = "AzureStorageContext"; + + /// + /// Storage account name + /// + public const string StorageAccountName = "Storage account name"; + + /// + /// Table cmdlet name + /// + public const string Table = "AzureStorageTable"; + + /// + /// Copy azure storage blob + /// + public const string CopyBlob = "AzureStorageBlobCopy"; + + /// + /// Copy azure storage blob deprecated name + /// + public const string CopyBlobDeprecatedName = "CopyAzureStorageBlob"; + + /// + /// Copy status for azure storage blob + /// + public const string CopyBlobStatus = "AzureStorageBlobCopyState"; + + /// + /// Azure storage service hour metrics + /// + public const string StorageServiceMetrics = "AzureStorageServiceMetricsProperty"; + + /// + /// Azure storage service logging + /// + public const string StorageServiceLogging = "AzureStorageServiceLoggingProperty"; + + /// + /// Azure storage container sas + /// + public const string ContainerSas = "AzureStorageContainerSASToken"; + + /// + /// Azure storage blob sas + /// + public const string BlobSas = "AzureStorageBlobSASToken"; + + /// + /// Azure storage table sas + /// + public const string TableSas = "AzureStorageTableSASToken"; + + /// + /// Azure storage queue sas + /// + public const string QueueSas = "AzureStorageQueueSASToken"; + + /// + /// Default service metrics version + /// + public const string DefaultMetricsVersion = "1.0"; + + /// + /// Default service logging version + /// + public const string DefaultLoggingVersion = "1.0"; + + /// + /// Permission const for New-AzureStorage(Blob/Container/Table/Queue)SasToken + /// + public static class Permission + { + /// + /// Read permission + /// + public const char Read = 'r'; + + /// + /// Write permission + /// + public const char Write = 'w'; + + /// + /// Delete permission + /// + public const char Delete = 'd'; + + /// + /// List permission + /// + public const char List = 'l'; + + /// + /// Update permission + /// + public const char Update = 'u'; + + /// + /// Add permission + /// + public const char Add = 'a'; + + /// + /// Process permission + /// + public const char Process = 'p'; + + /// + /// Query permission + /// + public const char Query = 'q'; + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/StorageServiceType.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/StorageServiceType.cs new file mode 100644 index 000000000000..86fc344b7f97 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Common/StorageServiceType.cs @@ -0,0 +1,25 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Storage.Common +{ + + public enum StorageServiceType + { + Blob, + Table, + Queue, + File + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/TaskOutputStream.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/TaskOutputStream.cs new file mode 100644 index 000000000000..cdba18bfc1c9 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Common/TaskOutputStream.cs @@ -0,0 +1,478 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Diagnostics; +using System.Management.Automation; +using System.Threading; +using System.Threading.Tasks; + +namespace Microsoft.WindowsAzure.Commands.Storage.Common +{ + /// + /// Task output stream in multithread environment + /// It's the multithread version of WriteOuput/WriterVerbose/WriteError and etc. + /// + internal class TaskOutputStream + { + /// + /// Ouput Stream which store all the output from sub-thread. + /// Both the object and exception are the valid output. + /// Key: Output id + /// Value: OutputUnit object which store the output data + /// It's thread safe to access the value even it's a Queue. + /// Don't use ConcurrentQueue for value since it'll cause a huge perfomance downgrade. + /// + private ConcurrentDictionary> OutputStream; + + /// + /// Current output id + /// + private long CurrentOutputId; + + /// + /// Main thread output writer. WriteObject is a good candidate for it. + /// + public Action OutputWriter; + + /// + /// Main thread error writer. WriteError is a goog candidate for it. + /// + public Action ErrorWriter; + + public Action VerboseWriter; + + public Action ProgressWriter; + + public Action DebugWriter; + + public Func ConfirmWriter; + + public Func TaskStatusQueryer; + + /// + /// is progress bard disabled + /// + private bool isProgressDisabled = false; + + /// + /// Progress bar is harm for performance. + /// + public bool DisableProgressBar + { + get + { + return isProgressDisabled; + } + set + { + isProgressDisabled = value; + } + } + + /// + /// The operation that should be confirmed by user. + /// + private Lazy> ConfirmQueue; + + private ConcurrentQueue DebugMessages; + + + private int DefaultProgressCount = 4; + private ConcurrentDictionary Progress; + + private CancellationToken cancellationToken; + + /// + /// Confirmation lock + /// + private object confirmTaskLock = new object(); + + /// + /// Current ConfirmTaskCompletionSource + /// + private ConfirmTaskCompletionSource currentTaskSource = null; + + /// + /// Create an Task output stream + /// + public TaskOutputStream(CancellationToken token) + { + OutputStream = new ConcurrentDictionary>(); + CurrentOutputId = 0; + ConfirmQueue = new Lazy>( + () => new ConcurrentQueue(), true); + DebugMessages = new ConcurrentQueue(); + Progress = new ConcurrentDictionary(); + cancellationToken = token; + } + + /// + /// Write output unit into OutputStream + /// + /// Output id + /// Output unit + private void WriteOutputUnit(long id, OutputUnit unit) + { + //It's thread for the specified id + Queue outputQueue = null; + bool found = OutputStream.TryGetValue(id, out outputQueue); + if (!found || outputQueue == null) + { + outputQueue = new Queue(); + OutputStream.TryAdd(id, outputQueue); + } + + outputQueue.Enqueue(unit); + } + + /// + /// Write object into OutputStream + /// + /// Output id + /// Output data + public void WriteObject(long taskId, object data) + { + OutputUnit unit = new OutputUnit(data, OutputType.Object); + WriteOutputUnit(taskId, unit); + } + + /// + /// Write error into OutputStream + /// + /// Output id + /// Exception object + public void WriteError(long taskId, Exception e) + { + OutputUnit unit = new OutputUnit(e, OutputType.Error); + WriteOutputUnit(taskId, unit); + } + + /// + /// Write verbose into output stream + /// + /// Task id + /// Verbose message + public void WriteVerbose(long taskId, string message) + { + OutputUnit unit = new OutputUnit(message, OutputType.Verbose); + WriteOutputUnit(taskId, unit); + } + + /// + /// Write progress into the output stream + /// + /// Progress record + public void WriteProgress(ProgressRecord record) + { + if (isProgressDisabled) + { + return; + } + + int activityId = record.ActivityId; //Activity 0 is reserved for summary + Progress.AddOrUpdate(activityId, record, (id, oldRecord) => + { + return record; + }); + } + + public int GetProgressId(long taskId) + { + return (int) taskId % DefaultProgressCount + 1; + } + + /// + /// Write debug message into the output stream. + /// + /// Debug message + public void WriteDebug(string message) + { + DebugMessages.Enqueue(message); + } + + /// + /// Is the specified task done + /// + /// Task id + /// True if the task is done, otherwise false + private bool IsTaskDone(long taskId) + { + if (TaskStatusQueryer == null) + { + return true; + } + else + { + return TaskStatusQueryer(taskId); + } + } + + /// + /// Async confirmation. + /// *****Please note***** + /// Dead lock will happen if the main thread is blocked. + /// + /// Confirm message + public Task ConfirmAsync(string message) + { + ConfirmTaskCompletionSource tcs = new ConfirmTaskCompletionSource(message); + ConfirmQueue.Value.Enqueue(tcs); + return tcs.Task; + } + + /// + /// Confirm the request + /// + /// Confirm task completion source + internal void ConfirmRequest(ConfirmTaskCompletionSource tcs) + { + if (cancellationToken.IsCancellationRequested) + { + tcs.SetCanceled(); + } + + lock (confirmTaskLock) + { + currentTaskSource = tcs; + } + + try + { + bool result = ConfirmWriter(string.Empty, tcs.Message, Resources.ConfirmCaption); + tcs.SetResult(result); + } + catch (Exception e) + { + tcs.SetException(e); + } + + lock (confirmTaskLock) + { + currentTaskSource = null; + } + } + + /// + /// Cancel the confirmation request + /// + public void CancelConfirmRequest() + { + ConfirmTaskCompletionSource tcs = null; + + while (ConfirmQueue.Value.TryDequeue(out tcs)) + { + tcs.SetCanceled(); + } + + lock (confirmTaskLock) + { + if (currentTaskSource != null) + { + currentTaskSource.SetCanceled(); + } + + currentTaskSource = null; + } + } + + /// + /// Process all the confirmation request + /// + protected void ProcessConfirmRequest() + { + if (ConfirmQueue.IsValueCreated) + { + ConfirmTaskCompletionSource tcs = null; + while (ConfirmQueue.Value.TryDequeue(out tcs)) + { + ConfirmRequest(tcs); + } + } + } + + /// + /// Process all the debug messages + /// + protected void ProcessDebugMessages() + { + ProcessUnorderedOutputStream(DebugMessages, DebugWriter); + } + + /// + /// Process all the progress information. + /// + protected void ProcessProgress() + { + ProgressRecord record = null; + bool removed = false; + + for (var i = 0; i < DefaultProgressCount; i++) + { + removed = Progress.TryRemove(i + 1, out record); + if (removed && record != null) + { + if (isProgressDisabled) + { + //Close the progress bar + record.RecordType = ProgressRecordType.Completed; + } + + ProgressWriter(record); + } + } + } + + /// + /// Process all the data without any predefined order. + /// + /// Data type + /// Data queue + /// Output writer + protected void ProcessUnorderedOutputStream(ConcurrentQueue data, Action Writer) + { + int count = data.Count; + T message = default(T); + bool removed = false; + + while (count > 0) + { + removed = data.TryDequeue(out message); + count--; + + if (removed) + { + try + { + Writer(message); + } + catch (Exception e) + { + Debug.Fail(e.Message); + return; + } + } + } + } + + /// + /// Process all the data output + /// + protected void ProcessDataOutput() + { + Queue outputQueue = null; + bool removed = false; + bool taskDone = false; + + do + { + taskDone = IsTaskDone(CurrentOutputId); + + if (taskDone) + { + removed = OutputStream.TryRemove(CurrentOutputId, out outputQueue); + + if (removed && outputQueue != null) + { + try + { + foreach(OutputUnit unit in outputQueue) + { + switch (unit.Type) + { + case OutputType.Object: + OutputWriter(unit.Data); + break; + case OutputType.Error: + ErrorWriter(unit.Data as Exception); + break; + case OutputType.Verbose: + VerboseWriter(unit.Data as string); + break; + } + } + } + catch (PipelineStoppedException) + { + //Directly stop the output stream when throw an exception. + //If so, we could quickly response for ctrl + c and etc. + break; + } + catch (Exception e) + { + Debug.Fail(String.Format("{0}", e)); + break; + } + } + + CurrentOutputId++; + } //Otherwise wait for the task completion + } + while (taskDone);//We could skip checking the cancellationToken + //since the inner loop would throw an exception when it's cancelled. + } + + /// + /// Output data into main thread + /// There is no concurrent call on this method since it should be only called in main thread of the powershell instance. + /// + public void Output() + { + ProcessConfirmRequest(); + ProcessDebugMessages(); + ProcessProgress(); + ProcessDataOutput(); + } + + /// + /// Output type + /// + private enum OutputType + { + Object, + Error, + Verbose + }; + + /// + /// Output unit + /// + private class OutputUnit + { + /// + /// Output type + /// + public OutputType Type; + + /// + /// Output list + /// All the output unit which has the same output key will be merged in the OutputStream + /// + public object Data; + + /// + /// Create an OutputUnit + /// + /// Output type + /// Output data + public OutputUnit(object data, OutputType type) + { + Data = data; + Type = type; + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/TransferJobRunnerFactory.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/TransferJobRunnerFactory.cs new file mode 100644 index 000000000000..34f1d3c7a587 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Common/TransferJobRunnerFactory.cs @@ -0,0 +1,55 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Storage.Common +{ + /// + /// Provides factory class to build instances of TransferJobRunners. + /// + internal static class TransferJobRunnerFactory + { + /// + /// Stores the cached runner; + /// + private static ITransferJobRunner cachedRunner; + + /// + /// Creates a new instance of the runner. + /// + /// Indicating the concurrency. + /// + /// Returns the created instance or the cached one (if available). + /// + public static ITransferJobRunner CreateRunner(int concurrency) + { + if (cachedRunner != null) + { + return cachedRunner; + } + + return new DataManagementWrapper(concurrency, CmdletOperationContext.ClientRequestId); + } + + /// + /// Sets the cached runner. This is mainly for testing purpose. + /// + /// + /// Indicating the instance of the cached runner. + /// + internal static void SetCachedRunner(ITransferJobRunner runner) + { + cachedRunner = runner; + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Common/Util.cs b/src/ServiceManagement/Storage/Commands.Storage/Common/Util.cs new file mode 100644 index 000000000000..2c1b91317744 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Common/Util.cs @@ -0,0 +1,52 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Storage.Common +{ + + internal static class Util + { + /// + /// Size formats + /// + private static string[] sizeFormats = + { + Resources.HumanReadableSizeFormat_Bytes, + Resources.HumanReadableSizeFormat_KiloBytes, + Resources.HumanReadableSizeFormat_MegaBytes, + Resources.HumanReadableSizeFormat_GigaBytes, + Resources.HumanReadableSizeFormat_TeraBytes, + Resources.HumanReadableSizeFormat_PetaBytes, + Resources.HumanReadableSizeFormat_ExaBytes + }; + + /// + /// Translate a size in bytes to human readable form. + /// + /// Size in bytes. + /// Human readable form string. + public static string BytesToHumanReadableSize(double size) + { + int order = 0; + + while (size >= 1024 && order + 1 < sizeFormats.Length) + { + ++order; + size /= 1024; + } + + return string.Format(sizeFormats[order], size); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/AzureStorageFileCmdletBase.cs b/src/ServiceManagement/Storage/Commands.Storage/File/AzureStorageFileCmdletBase.cs new file mode 100644 index 000000000000..7f91b09b062f --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/File/AzureStorageFileCmdletBase.cs @@ -0,0 +1,78 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.File; + +namespace Microsoft.WindowsAzure.Commands.Storage.File +{ + public abstract class AzureStorageFileCmdletBase : StorageCloudCmdletBase + { + [Parameter( + ValueFromPipeline = true, + ParameterSetName = Constants.ShareNameParameterSetName, + HelpMessage = "Azure Storage Context Object")] + [Parameter( + ValueFromPipeline = true, + ParameterSetName = Constants.MatchingPrefixParameterSetName, + HelpMessage = "Azure Storage Context Object")] + [Parameter( + ValueFromPipeline = true, + ParameterSetName = Constants.SpecificParameterSetName, + HelpMessage = "Azure Storage Context Object")] + public override AzureStorageContext Context { get; set; } + + protected FileRequestOptions RequestOptions + { + get + { + return (FileRequestOptions)this.GetRequestOptions(StorageServiceType.File); + } + } + + protected AccessCondition AccessCondition + { + get + { + return AccessCondition.GenerateEmptyCondition(); + } + } + + protected override IStorageFileManagement CreateChannel() + { + if (this.Channel == null || !this.ShareChannel) + { + this.Channel = new StorageFileManagement( + this.ParameterSetName == Constants.ShareNameParameterSetName || + this.ParameterSetName == Constants.MatchingPrefixParameterSetName || + this.ParameterSetName == Constants.SpecificParameterSetName ? + this.GetCmdletStorageContext() : + AzureStorageContext.EmptyContextInstance + ); + } + + return this.Channel; + } + + protected CloudFileShare BuildFileShareObjectFromName(string name) + { + NamingUtil.ValidateShareName(name, false); + return this.Channel.GetShareReference(name); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/AzureStorageFileException.cs b/src/ServiceManagement/Storage/Commands.Storage/File/AzureStorageFileException.cs new file mode 100644 index 000000000000..476e47017065 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/File/AzureStorageFileException.cs @@ -0,0 +1,77 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Runtime.Serialization; + +namespace Microsoft.WindowsAzure.Commands.Storage.File +{ + /// + /// Provides the exception object thrown by AzureStorageFile cmdlets. + /// + [Serializable] + public class AzureStorageFileException : Exception + { + /// + /// Stores the error record. + /// + private ErrorRecord record; + + /// + /// Initializes a new instance of the AzureStorageFileException class. + /// + /// Indicating the error cateogory. + /// Indicating the error id. + /// Indicating the error message. + /// Indicating the target object. + public AzureStorageFileException(ErrorCategory category, string errorId, string errorDetails, object targetObject) + : base(errorDetails) + { + this.record = new ErrorRecord(this, errorId, category, targetObject); + this.record.ErrorDetails = new ErrorDetails(errorDetails); + } + + /// + /// Initializes a new instance of the AzureStorageFileException class from the serialization info. + /// + /// Indicating the serialization info. + /// Indicating the streaming context. + protected AzureStorageFileException(SerializationInfo info, StreamingContext context) + : base(info, context) + { + this.record = (ErrorRecord)info.GetValue("Record", typeof(ErrorRecord)); + } + + /// + /// Gets the serialization info for serialization. + /// + /// Indicating the serialization info. + /// Indicating the streaming context. + public override void GetObjectData(SerializationInfo info, StreamingContext context) + { + info.AddValue("Record", record); + base.GetObjectData(info, context); + } + + /// + /// Gets the error record represents this exception. + /// + /// Returns an instance of ErrorRecord. + internal ErrorRecord GetErrorRecord() + { + return this.record; + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageFile.cs b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageFile.cs new file mode 100644 index 000000000000..9e49b912eb25 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageFile.cs @@ -0,0 +1,88 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Globalization; +using System.Management.Automation; +using Microsoft.WindowsAzure.Storage.File; + +namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet +{ + [Cmdlet(VerbsCommon.Get, Constants.FileCmdletName, DefaultParameterSetName = Constants.ShareNameParameterSetName)] + public class GetAzureStorageFile : AzureStorageFileCmdletBase + { + [Parameter( + Position = 0, + Mandatory = true, + ParameterSetName = Constants.ShareNameParameterSetName, + HelpMessage = "Name of the file share where the files/directories would be listed.")] + [ValidateNotNullOrEmpty] + public string ShareName { get; set; } + + [Parameter( + Position = 0, + Mandatory = true, + ValueFromPipeline = true, + ParameterSetName = Constants.ShareParameterSetName, + HelpMessage = "CloudFileShare object indicated the share where the files/directories would be listed.")] + [ValidateNotNull] + public CloudFileShare Share { get; set; } + + [Parameter( + Position = 0, + Mandatory = true, + ValueFromPipeline = true, + ParameterSetName = Constants.DirectoryParameterSetName, + HelpMessage = "CloudFileDirectory object indicated the base folder where the files/directories would be listed.")] + [ValidateNotNull] + public CloudFileDirectory Directory { get; set; } + + [Parameter( + Position = 1, + HelpMessage = "Path to an existing directory.")] + public string Path { get; set; } + + public override void ExecuteCmdlet() + { + CloudFileDirectory baseDirectory; + string[] subFolders = NamingUtil.ValidatePath(this.Path); + switch (this.ParameterSetName) + { + case Constants.DirectoryParameterSetName: + baseDirectory = this.Directory; + break; + + case Constants.ShareNameParameterSetName: + baseDirectory = this.BuildFileShareObjectFromName(this.ShareName).GetRootDirectoryReference(); + break; + + case Constants.ShareParameterSetName: + baseDirectory = this.Share.GetRootDirectoryReference(); + break; + + default: + throw new PSArgumentException(string.Format(CultureInfo.InvariantCulture, "Invalid parameter set name: {0}", this.ParameterSetName)); + } + + this.RunTask(async (taskId) => + { + await this.Channel.EnumerateFilesAndDirectoriesAsync( + baseDirectory.GetDirectoryReferenceByPath(subFolders), + item => this.OutputStream.WriteObject(taskId, item), + this.RequestOptions, + this.OperationContext, + this.CmdletCancellationToken); + }); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageFileContent.cs b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageFileContent.cs new file mode 100644 index 000000000000..b9cd69f41e86 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageFileContent.cs @@ -0,0 +1,173 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Globalization; +using System.IO; +using System.Management.Automation; +using Microsoft.WindowsAzure.Storage.DataMovement.TransferJobs; +using Microsoft.WindowsAzure.Storage.File; + +namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet +{ + using LocalDirectory = System.IO.Directory; + using LocalPath = System.IO.Path; + + [Cmdlet(VerbsCommon.Get, Constants.FileContentCmdletName, SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High, DefaultParameterSetName = Constants.ShareNameParameterSetName)] + public class GetAzureStorageFileContent : StorageFileDataManagementCmdletBase + { + [Parameter( + Position = 0, + Mandatory = true, + ParameterSetName = Constants.ShareNameParameterSetName, + HelpMessage = "Name of the file share where the file would be downloaded.")] + [ValidateNotNullOrEmpty] + public string ShareName { get; set; } + + [Parameter( + Position = 0, + Mandatory = true, + ValueFromPipeline = true, + ParameterSetName = Constants.ShareParameterSetName, + HelpMessage = "CloudFileShare object indicated the share where the file would be downloaded.")] + [ValidateNotNull] + public CloudFileShare Share { get; set; } + + [Parameter( + Position = 0, + Mandatory = true, + ValueFromPipeline = true, + ParameterSetName = Constants.DirectoryParameterSetName, + HelpMessage = "CloudFileDirectory object indicated the cloud directory where the file would be downloaded.")] + [ValidateNotNull] + public CloudFileDirectory Directory { get; set; } + + [Parameter( + Position = 0, + Mandatory = true, + ValueFromPipeline = true, + ParameterSetName = Constants.FileParameterSetName, + HelpMessage = "CloudFile object indicated the cloud file to be downloaded.")] + [ValidateNotNull] + public CloudFile File { get; set; } + + [Parameter( + Position = 1, + Mandatory = true, + ParameterSetName = Constants.ShareNameParameterSetName, + HelpMessage = "Path to the cloud file to be downloaded.")] + [Parameter( + Position = 1, + Mandatory = true, + ParameterSetName = Constants.ShareParameterSetName, + HelpMessage = "Path to the cloud file to be downloaded.")] + [Parameter( + Position = 1, + Mandatory = true, + ParameterSetName = Constants.DirectoryParameterSetName, + HelpMessage = "Path to the cloud file to be downloaded.")] + [ValidateNotNullOrEmpty] + public string Path { get; set; } + + [Parameter( + Position = 2, + ParameterSetName = Constants.ShareNameParameterSetName, + HelpMessage = "Path to the local file or directory when the downloaded file would be put.")] + [Parameter( + Position = 2, + ParameterSetName = Constants.ShareParameterSetName, + HelpMessage = "Path to the local file or directory when the downloaded file would be put.")] + [Parameter( + Position = 2, + ParameterSetName = Constants.DirectoryParameterSetName, + HelpMessage = "Path to the local file or directory when the downloaded file would be put.")] + [Parameter( + Position = 1, + ParameterSetName = Constants.FileParameterSetName, + HelpMessage = "Path to the local file or directory when the downloaded file would be put.")] + [ValidateNotNullOrEmpty] + public string Destination { get; set; } + + [Parameter(HelpMessage = "Returns an object representing the downloaded cloud file. By default, this cmdlet does not generate any output.")] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + CloudFile fileToBeDownloaded; + string[] path = NamingUtil.ValidatePath(this.Path, true); + switch (this.ParameterSetName) + { + case Constants.FileParameterSetName: + fileToBeDownloaded = this.File; + break; + + case Constants.ShareNameParameterSetName: + var share = this.BuildFileShareObjectFromName(this.ShareName); + fileToBeDownloaded = share.GetRootDirectoryReference().GetFileReferenceByPath(path); + break; + + case Constants.ShareParameterSetName: + fileToBeDownloaded = this.Share.GetRootDirectoryReference().GetFileReferenceByPath(path); + break; + + case Constants.DirectoryParameterSetName: + fileToBeDownloaded = this.Directory.GetFileReferenceByPath(path); + break; + + default: + throw new PSArgumentException(string.Format(CultureInfo.InvariantCulture, "Invalid parameter set name: {0}", this.ParameterSetName)); + } + + string resolvedDestination = this.GetUnresolvedProviderPathFromPSPath( + string.IsNullOrWhiteSpace(this.Destination) ? "." : this.Destination); + + FileMode mode = this.Force ? FileMode.Create : FileMode.CreateNew; + string targetFile; + if (LocalDirectory.Exists(resolvedDestination)) + { + // If the destination pointed to an existing directory, we + // would download the file into the folder with the same name + // on cloud. + targetFile = LocalPath.Combine(resolvedDestination, fileToBeDownloaded.GetBaseName()); + } + else + { + // Otherwise we treat the destination as a file no matter if + // there's one existing or not. The overwrite behavior is configured + // by FileMode. + targetFile = resolvedDestination; + } + + this.RunTask(async taskId => + { + var downloadJob = new FileDownloadJob() + { + SourceFile = fileToBeDownloaded, + DestPath = targetFile + }; + + var progressRecord = new ProgressRecord( + this.OutputStream.GetProgressId(taskId), + string.Format(CultureInfo.CurrentCulture, Resources.ReceiveAzureFileActivity, fileToBeDownloaded.GetFullPath(), targetFile), + Resources.PrepareDownloadingFile); + + await this.RunTransferJob(downloadJob, progressRecord); + + if (this.PassThru) + { + this.OutputStream.WriteObject(taskId, fileToBeDownloaded); + } + }); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageShare.cs b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageShare.cs new file mode 100644 index 000000000000..245a9cc3443e --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/GetAzureStorageShare.cs @@ -0,0 +1,70 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Globalization; +using System.Management.Automation; +using Microsoft.WindowsAzure.Storage.File; + +namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet +{ + [Cmdlet(VerbsCommon.Get, Constants.ShareCmdletName, DefaultParameterSetName = Constants.MatchingPrefixParameterSetName)] + public class GetAzureStorageShare : AzureStorageFileCmdletBase + { + [Parameter( + Position = 0, + Mandatory = true, + ParameterSetName = Constants.SpecificParameterSetName, + HelpMessage = "Name of the file share to be listed.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter( + Position = 0, + ParameterSetName = Constants.MatchingPrefixParameterSetName, + HelpMessage = "A prefix of the file shares to be listed.")] + public string Prefix { get; set; } + + public override void ExecuteCmdlet() + { + this.RunTask(async taskId => + { + switch (this.ParameterSetName) + { + case Constants.SpecificParameterSetName: + NamingUtil.ValidateShareName(this.Name, false); + var share = this.Channel.GetShareReference(this.Name); + await this.Channel.FetchShareAttributesAsync(share, this.AccessCondition, this.RequestOptions, this.OperationContext, this.CmdletCancellationToken); + this.OutputStream.WriteObject(taskId, share); + + break; + + case Constants.MatchingPrefixParameterSetName: + NamingUtil.ValidateShareName(this.Prefix, true); + await this.Channel.EnumerateSharesAsync( + this.Prefix, + ShareListingDetails.All, + item => this.OutputStream.WriteObject(taskId, item), + this.RequestOptions, + this.OperationContext, + this.CmdletCancellationToken); + + break; + + default: + throw new PSArgumentException(string.Format(CultureInfo.InvariantCulture, "Invalid parameter set name: {0}", this.ParameterSetName)); + } + }); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageDirectory.cs b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageDirectory.cs new file mode 100644 index 000000000000..5c33be8d398f --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageDirectory.cs @@ -0,0 +1,89 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Globalization; +using System.Management.Automation; +using Microsoft.WindowsAzure.Storage.File; + +namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet +{ + [Cmdlet(VerbsCommon.New, Constants.FileDirectoryCmdletName, DefaultParameterSetName = Constants.ShareNameParameterSetName)] + public class NewAzureStorageDirectory : AzureStorageFileCmdletBase + { + [Parameter( + Position = 0, + Mandatory = true, + ParameterSetName = Constants.ShareNameParameterSetName, + HelpMessage = "Name of the file share where the directory would be created.")] + [ValidateNotNullOrEmpty] + public string ShareName { get; set; } + + [Parameter( + Position = 0, + Mandatory = true, + ValueFromPipeline = true, + ParameterSetName = Constants.ShareParameterSetName, + HelpMessage = "CloudFileShare object indicated the share where the directory would be created.")] + [ValidateNotNull] + public CloudFileShare Share { get; set; } + + [Parameter( + Position = 0, + Mandatory = true, + ValueFromPipeline = true, + ParameterSetName = Constants.DirectoryParameterSetName, + HelpMessage = "CloudFileDirectory object indicated the base folder where the new directory would be created.")] + [ValidateNotNull] + public CloudFileDirectory Directory { get; set; } + + [Parameter( + Position = 1, + Mandatory = true, + HelpMessage = "Path of the directory to be created.")] + [ValidateNotNullOrEmpty] + public string Path { get; set; } + + public override void ExecuteCmdlet() + { + string[] path = NamingUtil.ValidatePath(this.Path); + + CloudFileDirectory baseDirectory; + switch (this.ParameterSetName) + { + case Constants.DirectoryParameterSetName: + baseDirectory = this.Directory; + break; + + case Constants.ShareNameParameterSetName: + var share = this.BuildFileShareObjectFromName(this.ShareName); + baseDirectory = share.GetRootDirectoryReference(); + break; + + case Constants.ShareParameterSetName: + baseDirectory = this.Share.GetRootDirectoryReference(); + break; + + default: + throw new PSArgumentException(string.Format(CultureInfo.InvariantCulture, "Invalid parameter set name: {0}", this.ParameterSetName)); + } + + var directoryToBeCreated = baseDirectory.GetDirectoryReferenceByPath(path); + this.RunTask(async taskId => + { + await this.Channel.CreateDirectoryAsync(directoryToBeCreated, this.RequestOptions, this.OperationContext, this.CmdletCancellationToken); + this.OutputStream.WriteObject(taskId, directoryToBeCreated); + }); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageShare.cs b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageShare.cs new file mode 100644 index 000000000000..43b658ddd229 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageShare.cs @@ -0,0 +1,41 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; + +namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet +{ + [Cmdlet(VerbsCommon.New, Constants.ShareCmdletName, DefaultParameterSetName = Constants.ShareNameParameterSetName)] + public class NewAzureStorageShare : AzureStorageFileCmdletBase + { + [Parameter( + Position = 0, + Mandatory = true, + HelpMessage = "Name of the file share to be created.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + public override void ExecuteCmdlet() + { + NamingUtil.ValidateShareName(this.Name, false); + + var share = this.Channel.GetShareReference(this.Name); + this.RunTask(async taskId => + { + await this.Channel.CreateShareAsync(share, this.RequestOptions, this.OperationContext, this.CmdletCancellationToken); + this.OutputStream.WriteObject(taskId, share); + }); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageDirectory.cs b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageDirectory.cs new file mode 100644 index 000000000000..d3905c228c3e --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageDirectory.cs @@ -0,0 +1,113 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Globalization; +using System.Management.Automation; +using Microsoft.WindowsAzure.Storage.File; + +namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet +{ + [Cmdlet( + VerbsCommon.Remove, + Constants.FileDirectoryCmdletName, + SupportsShouldProcess = true, + ConfirmImpact = ConfirmImpact.High, + DefaultParameterSetName = Constants.ShareNameParameterSetName)] + public class RemoveAzureStorageDirectory : AzureStorageFileCmdletBase + { + [Parameter( + Position = 0, + Mandatory = true, + ParameterSetName = Constants.ShareNameParameterSetName, + HelpMessage = "Name of the file share where the directory would be removed.")] + [ValidateNotNullOrEmpty] + public string ShareName { get; set; } + + [Parameter( + Position = 0, + Mandatory = true, + ValueFromPipeline = true, + ParameterSetName = Constants.ShareParameterSetName, + HelpMessage = "CloudFileShare object indicated the share where the directory would be removed.")] + [ValidateNotNull] + public CloudFileShare Share { get; set; } + + [Parameter( + Position = 0, + Mandatory = true, + ValueFromPipeline = true, + ParameterSetName = Constants.DirectoryParameterSetName, + HelpMessage = "CloudFileDirectory object indicated the base folder where the directory would be removed.")] + [ValidateNotNull] + public CloudFileDirectory Directory { get; set; } + + [Parameter( + Position = 1, + Mandatory = true, + ParameterSetName = Constants.ShareParameterSetName, + HelpMessage = "Path to the directory to be removed.")] + [Parameter( + Position = 1, + Mandatory = true, + ParameterSetName = Constants.ShareNameParameterSetName, + HelpMessage = "Path to the directory to be removed.")] + [Parameter( + Position = 1, + ParameterSetName = Constants.DirectoryParameterSetName, + HelpMessage = "Path to the directory to be removed.")] + [ValidateNotNullOrEmpty] + public string Path { get; set; } + + [Parameter(HelpMessage = "Returns an object representing the removed directory. By default, this cmdlet does not generate any output.")] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + string[] path = NamingUtil.ValidatePath(this.Path); + CloudFileDirectory baseDirectory; + switch (this.ParameterSetName) + { + case Constants.DirectoryParameterSetName: + baseDirectory = this.Directory; + break; + + case Constants.ShareNameParameterSetName: + var share = this.BuildFileShareObjectFromName(this.ShareName); + baseDirectory = share.GetRootDirectoryReference(); + break; + + case Constants.ShareParameterSetName: + baseDirectory = this.Share.GetRootDirectoryReference(); + break; + + default: + throw new PSArgumentException(string.Format(CultureInfo.InvariantCulture, "Invalid parameter set name: {0}", this.ParameterSetName)); + } + + var directoryToBeRemoved = baseDirectory.GetDirectoryReferenceByPath(path); + this.RunTask(async taskId => + { + if (this.ShouldProcess(directoryToBeRemoved.GetFullPath())) + { + await this.Channel.DeleteDirectoryAsync(directoryToBeRemoved, this.AccessCondition, this.RequestOptions, this.OperationContext, this.CmdletCancellationToken); + } + + if (this.PassThru) + { + this.OutputStream.WriteObject(taskId, directoryToBeRemoved); + } + }); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageFile.cs b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageFile.cs new file mode 100644 index 000000000000..f6fc8ff87b6d --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageFile.cs @@ -0,0 +1,126 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Globalization; +using System.Management.Automation; +using Microsoft.WindowsAzure.Storage.File; + +namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet +{ + [Cmdlet( + VerbsCommon.Remove, + Constants.FileCmdletName, + SupportsShouldProcess = true, + ConfirmImpact = ConfirmImpact.High, + DefaultParameterSetName = Constants.ShareNameParameterSetName)] + public class RemoveAzureStorageFile : AzureStorageFileCmdletBase + { + [Parameter( + Position = 0, + Mandatory = true, + ParameterSetName = Constants.ShareNameParameterSetName, + HelpMessage = "Name of the file share where the file would be removed.")] + [ValidateNotNullOrEmpty] + public string ShareName { get; set; } + + [Parameter( + Position = 0, + Mandatory = true, + ValueFromPipeline = true, + ParameterSetName = Constants.ShareParameterSetName, + HelpMessage = "CloudFileShare object indicated the share where the file would be removed.")] + [ValidateNotNull] + public CloudFileShare Share { get; set; } + + [Parameter( + Position = 0, + Mandatory = true, + ValueFromPipeline = true, + ParameterSetName = Constants.DirectoryParameterSetName, + HelpMessage = "CloudFileDirectory object indicated the cloud directory where the file would be removed.")] + [ValidateNotNull] + public CloudFileDirectory Directory { get; set; } + + [Parameter( + Position = 0, + Mandatory = true, + ValueFromPipeline = true, + ParameterSetName = Constants.FileParameterSetName, + HelpMessage = "CloudFile object indicated the file to be removed.")] + [ValidateNotNull] + public CloudFile File { get; set; } + + [Parameter( + Position = 1, + Mandatory = true, + ParameterSetName = Constants.ShareNameParameterSetName, + HelpMessage = "Path of the file to be removed.")] + [Parameter( + Position = 1, + Mandatory = true, + ParameterSetName = Constants.ShareParameterSetName, + HelpMessage = "Path of the file to be removed.")] + [Parameter( + Position = 1, + Mandatory = true, + ParameterSetName = Constants.DirectoryParameterSetName, + HelpMessage = "Path of the file to be removed.")] + [ValidateNotNullOrEmpty] + public string Path { get; set; } + + [Parameter(HelpMessage = "Returns an object representing the removed file. By default, this cmdlet does not generate any output.")] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + string[] path = NamingUtil.ValidatePath(this.Path, true); + CloudFile fileToBeRemoved; + switch (this.ParameterSetName) + { + case Constants.FileParameterSetName: + fileToBeRemoved = this.File; + break; + + case Constants.ShareNameParameterSetName: + var share = this.BuildFileShareObjectFromName(this.ShareName); + fileToBeRemoved = share.GetRootDirectoryReference().GetFileReferenceByPath(path); + break; + + case Constants.ShareParameterSetName: + fileToBeRemoved = this.Share.GetRootDirectoryReference().GetFileReferenceByPath(path); + break; + + case Constants.DirectoryParameterSetName: + fileToBeRemoved = this.Directory.GetFileReferenceByPath(path); + break; + + default: + throw new PSArgumentException(string.Format(CultureInfo.InvariantCulture, "Invalid parameter set name: {0}", this.ParameterSetName)); + } + + this.RunTask(async taskId => + { + if (this.ShouldProcess(fileToBeRemoved.GetFullPath())) + { + await this.Channel.DeleteFileAsync(fileToBeRemoved, this.AccessCondition, this.RequestOptions, this.OperationContext, this.CmdletCancellationToken); + } + + if (this.PassThru) + { + this.OutputStream.WriteObject(taskId, fileToBeRemoved); + } + }); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageShare.cs b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageShare.cs new file mode 100644 index 000000000000..d9e46a61c4e7 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/RemoveAzureStorageShare.cs @@ -0,0 +1,80 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Globalization; +using System.Management.Automation; +using Microsoft.WindowsAzure.Storage.File; + +namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet +{ + [Cmdlet( + VerbsCommon.Remove, + Constants.ShareCmdletName, + DefaultParameterSetName = Constants.ShareNameParameterSetName, + SupportsShouldProcess = true, + ConfirmImpact = ConfirmImpact.High)] + public class RemoveAzureStorageShare : AzureStorageFileCmdletBase + { + [Parameter( + Position = 0, + Mandatory = true, + ParameterSetName = Constants.ShareNameParameterSetName, + HelpMessage = "Name of the file share to be removed.")] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter( + Position = 0, + Mandatory = true, + ValueFromPipeline = true, + ParameterSetName = Constants.ShareParameterSetName, + HelpMessage = "File share object to be removed.")] + [ValidateNotNull] + public CloudFileShare Share { get; set; } + + [Parameter(HelpMessage = "Returns an object representing the removed file share. By default, this cmdlet does not generate any output.")] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + CloudFileShare share; + switch (this.ParameterSetName) + { + case Constants.ShareParameterSetName: + share = this.Share; + break; + + case Constants.ShareNameParameterSetName: + share = this.BuildFileShareObjectFromName(this.Name); + break; + + default: + throw new PSArgumentException(string.Format(CultureInfo.InvariantCulture, "Invalid parameter set name: {0}", this.ParameterSetName)); + } + + this.RunTask(async taskId => + { + if (this.ShouldProcess(share.Name)) + { + await this.Channel.DeleteShareAsync(share, this.AccessCondition, this.RequestOptions, this.OperationContext, this.CmdletCancellationToken); + } + + if (this.PassThru) + { + this.OutputStream.WriteObject(taskId, share); + } + }); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/SetAzureStorageFileContent.cs b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/SetAzureStorageFileContent.cs new file mode 100644 index 000000000000..1e992e04a0dc --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/File/Cmdlet/SetAzureStorageFileContent.cs @@ -0,0 +1,176 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Globalization; +using System.IO; +using System.Management.Automation; +using System.Net; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.DataMovement.TransferJobs; +using Microsoft.WindowsAzure.Storage.File; + +namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet +{ + [Cmdlet(VerbsCommon.Set, Constants.FileContentCmdletName, SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High, DefaultParameterSetName = Constants.ShareNameParameterSetName)] + public class SetAzureStorageFileContent : StorageFileDataManagementCmdletBase + { + [Parameter( + Position = 0, + Mandatory = true, + ParameterSetName = Constants.ShareNameParameterSetName, + HelpMessage = "Name of the file share where the file would be uploaded to.")] + [ValidateNotNullOrEmpty] + public string ShareName { get; set; } + + [Parameter( + Position = 0, + Mandatory = true, + ValueFromPipeline = true, + ParameterSetName = Constants.ShareParameterSetName, + HelpMessage = "CloudFileShare object indicated the share where the file would be uploaded to.")] + [ValidateNotNull] + public CloudFileShare Share { get; set; } + + [Parameter( + Position = 0, + Mandatory = true, + ValueFromPipeline = true, + ParameterSetName = Constants.DirectoryParameterSetName, + HelpMessage = "CloudFileDirectory object indicated the cloud directory where the file would be uploaded.")] + [ValidateNotNull] + public CloudFileDirectory Directory { get; set; } + + [Parameter( + Position = 1, + Mandatory = true, + HelpMessage = "Path to the local file to be uploaded.")] + [ValidateNotNullOrEmpty] + public string Source { get; set; } + + [Parameter( + Position = 2, + HelpMessage = "Path to the cloud file which would be uploaded to.")] + [ValidateNotNullOrEmpty] + public string Path { get; set; } + + [Parameter(HelpMessage = "Returns an object representing the downloaded cloud file. By default, this cmdlet does not generate any output.")] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + // Step 1: Validate source file. + FileInfo localFile = new FileInfo(this.GetUnresolvedProviderPathFromPSPath(this.Source)); + if (!localFile.Exists) + { + throw new FileNotFoundException(string.Format(CultureInfo.CurrentCulture, Resources.SourceFileNotFound, this.Source)); + } + + // Step 2: Build the CloudFile object which pointed to the + // destination cloud file. + this.RunTask(async taskId => + { + bool isDirectory; + string[] path = NamingUtil.ValidatePath(this.Path, out isDirectory); + var cloudFileToBeUploaded = await this.BuildCloudFileInstanceFromPathAsync(localFile.Name, path, isDirectory); + + var uploadJob = new FileUploadJob() + { + SourcePath = localFile.FullName, + DestFile = cloudFileToBeUploaded, + }; + + var progressRecord = new ProgressRecord( + this.OutputStream.GetProgressId(taskId), + string.Format(CultureInfo.CurrentCulture, Resources.SendAzureFileActivity, localFile.Name, cloudFileToBeUploaded.GetFullPath(), cloudFileToBeUploaded.Share.Name), + Resources.PrepareUploadingFile); + + await this.RunTransferJob(uploadJob, progressRecord); + + if (this.PassThru) + { + this.OutputStream.WriteObject(taskId, cloudFileToBeUploaded); + } + }); + } + + private async Task BuildCloudFileInstanceFromPathAsync(string defaultFileName, string[] path, bool pathIsDirectory) + { + CloudFileDirectory baseDirectory = null; + bool isPathEmpty = path.Length == 0; + switch (this.ParameterSetName) + { + case Constants.DirectoryParameterSetName: + baseDirectory = this.Directory; + break; + + case Constants.ShareNameParameterSetName: + NamingUtil.ValidateShareName(this.ShareName, false); + baseDirectory = this.BuildFileShareObjectFromName(this.ShareName).GetRootDirectoryReference(); + break; + + case Constants.ShareParameterSetName: + baseDirectory = this.Share.GetRootDirectoryReference(); + break; + + default: + throw new PSArgumentException(string.Format(CultureInfo.InvariantCulture, "Invalid parameter set name: {0}", this.ParameterSetName)); + } + + if (isPathEmpty) + { + return baseDirectory.GetFileReference(defaultFileName); + } + + var directory = baseDirectory.GetDirectoryReferenceByPath(path); + if (pathIsDirectory) + { + return directory.GetFileReference(defaultFileName); + } + + bool directoryExists; + + try + { + directoryExists = await this.Channel.DirectoryExistsAsync(directory, this.RequestOptions, this.OperationContext, this.CmdletCancellationToken); + } + catch (StorageException e) + { + if (e.RequestInformation != null && + e.RequestInformation.HttpStatusCode == (int)HttpStatusCode.BadRequest && + e.RequestInformation.ExtendedErrorInformation == null) + { + throw new AzureStorageFileException(ErrorCategory.InvalidArgument, ErrorIdConstants.InvalidResource, Resources.InvalidResource, this); + } + + throw; + } + + if (directoryExists) + { + // If the directory exist on the cloud, we treat the path as + // to a directory. So we append the default file name after + // it and build an instance of CloudFile class. + return directory.GetFileReference(defaultFileName); + } + else + { + // If the directory does not exist, we treat the path as to a + // file. So we use the path of the directory to build out a + // new instance of CloudFile class. + return baseDirectory.GetFileReferenceByPath(path); + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/Constants.cs b/src/ServiceManagement/Storage/Commands.Storage/File/Constants.cs new file mode 100644 index 000000000000..d4c91e242ca6 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/File/Constants.cs @@ -0,0 +1,114 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; + +namespace Microsoft.WindowsAzure.Commands.Storage.File +{ + /// + /// Provides constants for cmdlets. + /// + internal static class Constants + { + /// + /// Protocol string for HTTP. + /// + public const string HTTP = "Http"; + + /// + /// Protocol string for HTTPs. + /// + public const string HTTPS = "Https"; + + /// + /// Cmdlet name for storage context. + /// + public const string StorageContextCmdletName = "AzureStorageContext"; + + /// + /// Cmdlet name for file share. + /// + public const string ShareCmdletName = "AzureStorageShare"; + + /// + /// Cmdlet name for file directory. + /// + public const string FileDirectoryCmdletName = "AzureStorageDirectory"; + + /// + /// Cmdlet name for file. + /// + public const string FileCmdletName = "AzureStorageFile"; + + /// + /// Cmdlet name for file content. + /// + public const string FileContentCmdletName = "AzureStorageFileContent"; + + /// + /// Stores the default endpoint suffix for storage accounts. + /// + public const string DefaultStorageEndPointSuffix = "core.windows.net"; + + /// + /// Parameter set name for Share. + /// + public const string ShareParameterSetName = "Share"; + + /// + /// Parameter set name for ShareName. + /// + public const string ShareNameParameterSetName = "ShareName"; + + /// + /// Parameter set name for MatchingPrefix. + /// + public const string MatchingPrefixParameterSetName = "MatchingPrefix"; + + /// + /// Parameter set name for specific matching. + /// + public const string SpecificParameterSetName = "Specific"; + + /// + /// Parameter set name for directory. + /// + public const string DirectoryParameterSetName = "Directory"; + + /// + /// Parameter set name for file. + /// + public const string FileParameterSetName = "File"; + + /// + /// Stores the environment name for connection string. + /// + public const string ConnectionStringEnvironmentName = "AZURE_STORAGE_CONNECTION_STRING"; + + /// + /// Stores the default server side timeout for each request. + /// + public static readonly TimeSpan DefaultServerTimeoutPerRequest = TimeSpan.FromSeconds(15); + + /// + /// Stores the default client side timeout for each request. + /// + public static readonly TimeSpan DefaultClientTimeoutPerRequests = TimeSpan.FromSeconds(30); + + /// + /// Stores the default timeout for downloading and uploading files. + /// + public static readonly TimeSpan DefaultTimeoutForDownloadingAndUploading = TimeSpan.FromMinutes(10); + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/ErrorIdConstants.cs b/src/ServiceManagement/Storage/Commands.Storage/File/ErrorIdConstants.cs new file mode 100644 index 000000000000..e3febd8a155c --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/File/ErrorIdConstants.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.WindowsAzure.Commands.Storage.File +{ + internal static class ErrorIdConstants + { + public const string InvalidArgument = "InvalidArgument"; + + public const string InvalidResource = "InvalidResource"; + + public const string Timeout = "Timeout"; + + public const string UnknownError = "Unknown"; + + public const string ResourceAlreadyExists = "ResourceAlreadyExists"; + + public const string PathNotFound = "PathNotFound"; + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/NamingUtil.cs b/src/ServiceManagement/Storage/Commands.Storage/File/NamingUtil.cs new file mode 100644 index 000000000000..69631a39369e --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/File/NamingUtil.cs @@ -0,0 +1,150 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Linq; +using System.Text.RegularExpressions; + +namespace Microsoft.WindowsAzure.Commands.Storage.File +{ + /// + /// Provides utilities to determining whether the given string is a valid + /// name of some component. + /// + internal static class NamingUtil + { + private const int MinShareNameLength = 3; + + private const string ShareNameValidationPattern = @"^[a-z0-9][a-z0-9\-]{0,62}$"; + + private const string FileNameValidationPattern = @"^[^\x00-\x1f""\\/:|<>?*\uE000-\uF8FF]{1,255}$"; + + private const string InvalidFileNamePattern = @"^((LPT\d)|(COM\d)|(PRN)|(AUX)|(NUL)|(CON)|(CLOCK\$))$"; + + private const int MaxPathLength = 1024; + + private static readonly char[] PathSeparators = new char[] { '/', '\\' }; + + private static readonly string[] DirectoryIndicators = new string[] { ".", ".." }; + + /// + /// Validates the given path. Provides an overload which does not + /// output the isDirectory parameter for callers who don't care if + /// it is a directory. + /// + /// Indicating the path. + /// + /// Provides an optional hint whether this path is expected to be a + /// path to a file. If this option is given and the given path can only + /// be treated as a directory (isDirectory output value would be set to + /// true). An argument exception would throw. + /// + /// + /// Returns a collection of strings which contains all sub folders of + /// the given path if validated successfully. + /// + public static string[] ValidatePath(string path, bool isFileName = false) + { + bool isDirectory; + return ValidatePath(path, out isDirectory, isFileName); + } + + /// + /// Validates the given path. Returns the validated path in the form + /// of a collection of strings which represents all sub folders + /// + /// Indicating the path. + /// + /// Outputs a value indicating whether the given path can only be + /// treated as an directory. Returning false for isDirectory means + /// we could not tell from the given string whether the path is a + /// directory or a file. + /// + /// + /// Provides an optional hint whether this path is expected to be a + /// path to a file. If this option is given and the given path can only + /// be treated as a directory (isDirectory output value would be set to + /// true), an argument exception would throw. + /// + /// + /// Returns a collection of strings which contains all parent folders of + /// the given path if validated successfully. + /// + public static string[] ValidatePath(string path, out bool isDirectory, bool isFileName = false) + { + if (string.IsNullOrEmpty(path)) + { + isDirectory = false; + return new string[0]; + } + + isDirectory = PathSeparators.Contains(path.Last()); + if (isFileName && isDirectory) + { + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Resources.FileNameShouldNotEndWithSlash, path)); + } + + if (path.Length > MaxPathLength) + { + throw new ArgumentOutOfRangeException(string.Format(CultureInfo.CurrentCulture, Resources.PathTooLong, path, MaxPathLength)); + } + + string[] result = path.Split(PathSeparators, StringSplitOptions.RemoveEmptyEntries); + foreach (var fileName in result) + { + if (!Regex.Match(fileName, FileNameValidationPattern, RegexOptions.Singleline).Success || + Regex.Match(fileName.ToUpperInvariant(), InvalidFileNamePattern, RegexOptions.Singleline).Success) + { + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Resources.PathInvalid, fileName)); + } + } + + if (result.Length == 0 || DirectoryIndicators.Contains(result.Last(), StringComparer.Ordinal)) + { + isDirectory = true; + } + + return result; + } + + public static void ValidateShareName(string shareName, bool validatingPrefix) + { + if (string.IsNullOrEmpty(shareName) && validatingPrefix) + { + return; + } + + if (Regex.Match(shareName, ShareNameValidationPattern).Success && + !shareName.Contains("--")) + { + if (validatingPrefix) + { + return; + } + + // When validating exact share name (not a prefix), we must + // ensure the minimum length and make sure the last character + // is not dash. + else if (shareName.Length >= MinShareNameLength && + shareName.Last() != '-') + { + return; + } + } + + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Resources.ShareNameInvalid, shareName)); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/StorageClientExtensions.cs b/src/ServiceManagement/Storage/Commands.Storage/File/StorageClientExtensions.cs new file mode 100644 index 000000000000..e9d06c1beac9 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/File/StorageClientExtensions.cs @@ -0,0 +1,110 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Diagnostics; +using System.Linq; +using Microsoft.WindowsAzure.Storage.File; + +namespace Microsoft.WindowsAzure.Commands.Storage.File +{ + /// + /// Provides extension methods for storage client lib. + /// + internal static class StorageClientExtensions + { + /// + /// Stores the separator for uri path as a string. + /// + private const string UriPathSeparator = "/"; + + /// + /// Gets the reference to a cloud file directory object from the + /// provided base folder and the given path. + /// + /// + /// Indicating the base directory. + /// + /// + /// Indicating the path to the target folder in the form of a + /// collection of strings which indicated each sub folder. + /// + /// Returns the generated instance. + public static CloudFileDirectory GetDirectoryReferenceByPath(this CloudFileDirectory currentDirectory, string[] path) + { + foreach (var subFolder in path) + { + currentDirectory = currentDirectory.GetDirectoryReference(subFolder); + } + + return currentDirectory; + } + + /// + /// Gets the reference to a cloud file object from the provided base + /// folder and the given path. + /// + /// + /// Indicating the base directory. + /// + /// + /// Indicating the path to the target file in the form of a + /// collection of strings which indicated each sub folder and the file + /// name. + /// + /// Returns the generated instance. + public static CloudFile GetFileReferenceByPath(this CloudFileDirectory currentDirectory, string[] path) + { + for (int i = 0; i < path.Length - 1; i++) + { + currentDirectory = currentDirectory.GetDirectoryReference(path[i]); + } + + return currentDirectory.GetFileReference(path.Last()); + } + + /// + /// Gets the full path of a file/directory. + /// + /// Indicating the file/directory object. + /// Returns the full path. + public static string GetFullPath(this IListFileItem item) + { + // We need to make sure the share uri ends with "/" in order to + // let MakeRelativeUri work properly. + UriBuilder shareUri = new UriBuilder(item.Share.Uri); + if (!shareUri.Path.EndsWith(UriPathSeparator, StringComparison.Ordinal)) + { + shareUri.Path = string.Concat(shareUri.Path, UriPathSeparator); + } + + return shareUri.Uri.MakeRelativeUri(item.Uri).ToString(); + } + + /// + /// Gets the base name of a CloudFile item. + /// + /// Indicating the CloudFile item. + /// Returns the base name. + /// + /// This is to work around XSCL bug 1391878 where CloudFile.Name + /// sometimes returns base name and sometimes returns full path. + /// + public static string GetBaseName(this CloudFile file) + { + Debug.Assert(!string.IsNullOrEmpty(file.Name), "CloudFile.Name should never return null."); + return file.Name.Split(UriPathSeparator.ToCharArray(), StringSplitOptions.RemoveEmptyEntries).Last(); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/File/StorageFileDataManagementCmdletBase.cs b/src/ServiceManagement/Storage/Commands.Storage/File/StorageFileDataManagementCmdletBase.cs new file mode 100644 index 000000000000..18e39cfb93b6 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/File/StorageFileDataManagementCmdletBase.cs @@ -0,0 +1,133 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Globalization; +using System.Management.Automation; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Storage.DataMovement.TransferJobs; + +namespace Microsoft.WindowsAzure.Commands.Storage.File +{ + public abstract class StorageFileDataManagementCmdletBase : AzureStorageFileCmdletBase + { + /// + /// Stores the default concurrent task count which is 10. + /// + private const int DefaultConcurrentTaskCount = 10; + + /// + /// Stores the transfer job runner instance. + /// + private ITransferJobRunner transferJobRunner; + + /// + /// Gets or sets whether to force overwrite the existing file. + /// + [Parameter(HelpMessage = "Force to overwrite the existing file.")] + public SwitchParameter Force + { + get; + set; + } + + /// + /// Confirm the overwrite operation + /// + /// Indicating the source path. + /// Indicating the destination path. + /// Returns a value indicating whether to overwrite. + private bool ConfirmOverwrite(string sourcePath, string destinationPath) + { + return this.Force || this.OutputStream.ConfirmAsync(string.Format(CultureInfo.CurrentCulture, Resources.OverwriteConfirmation, destinationPath)).Result; + } + + protected override void BeginProcessing() + { + base.BeginProcessing(); + + this.transferJobRunner = TransferJobRunnerFactory.CreateRunner(this.ConcurrentTaskCount ?? DefaultConcurrentTaskCount); + } + + protected override void EndProcessing() + { + base.EndProcessing(); + this.WriteTaskSummary(); + + this.transferJobRunner.Dispose(); + this.transferJobRunner = null; + } + + protected async Task RunTransferJob(FileTransferJob job, ProgressRecord record) + { + this.SetRequestOptionsInTransferJob(job); + job.AccessCondition = this.AccessCondition; + job.OverwritePromptCallback = this.ConfirmOverwrite; + + try + { + await this.transferJobRunner.RunTransferJob(job, + (percent, speed) => + { + record.PercentComplete = (int)percent; + record.StatusDescription = string.Format(CultureInfo.CurrentCulture, Resources.FileTransmitStatus, (int)percent, Util.BytesToHumanReadableSize(speed)); + this.OutputStream.WriteProgress(record); + }, + this.CmdletCancellationToken); + + record.PercentComplete = 100; + record.StatusDescription = Resources.TransmitSuccessfully; + this.OutputStream.WriteProgress(record); + } + catch (OperationCanceledException) + { + record.StatusDescription = Resources.TransmitCancelled; + this.OutputStream.WriteProgress(record); + } + catch (Exception e) + { + record.StatusDescription = string.Format(CultureInfo.CurrentCulture, Resources.TransmitFailed, e.Message); + this.OutputStream.WriteProgress(record); + throw; + } + } + + protected void SetRequestOptionsInTransferJob(FileTransferJob transferJob) + { + var cmdletOptions = this.RequestOptions; + + if (cmdletOptions == null) + { + return; + } + + var requestOptions = transferJob.FileRequestOptions; + + if (cmdletOptions.MaximumExecutionTime != null) + { + requestOptions.MaximumExecutionTime = cmdletOptions.MaximumExecutionTime; + } + + if (cmdletOptions.ServerTimeout != null) + { + requestOptions.ServerTimeout = cmdletOptions.ServerTimeout; + } + + requestOptions.DisableContentMD5Validation = true; + + transferJob.FileRequestOptions = requestOptions; + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/MSSharedLibKey.snk b/src/ServiceManagement/Storage/Commands.Storage/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ServiceManagement/Storage/Commands.Storage/MSSharedLibKey.snk differ diff --git a/src/ServiceManagement/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.dll-Help.psd1 b/src/ServiceManagement/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.dll-Help.psd1 new file mode 100644 index 000000000000..629cc56833d1 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.dll-Help.psd1 @@ -0,0 +1,86 @@ +# +# Module manifest for module 'Azure' +# +# Generated by: Microsoft Corporation +# +# Generated on: 5/23/2012 +# + +@{ + +# Version number of this module. +ModuleVersion = '0.8.8' + +# ID used to uniquely identify this module +GUID = 'D48CF693-4125-4D2D-8790-1514F44CE325' + +# Author of this module +Author = 'Microsoft Corporation' + +# Company or vendor of this module +CompanyName = 'Microsoft Corporation' + +# Copyright statement for this module +Copyright = '?Microsoft Corporation. All rights reserved.' + +# Description of the functionality provided by this module +Description = '' + +# Minimum version of the Windows PowerShell engine required by this module +PowerShellVersion = '3.0' + +# Name of the Windows PowerShell host required by this module +PowerShellHostName = '' + +# Minimum version of the Windows PowerShell host required by this module +PowerShellHostVersion = '' + +# Minimum version of the .NET Framework required by this module +DotNetFrameworkVersion = '4.0' + +# Minimum version of the common language runtime (CLR) required by this module +CLRVersion='4.0' + +# Processor architecture (None, X86, Amd64, IA64) required by this module +ProcessorArchitecture = 'None' + +# Modules that must be imported into the global environment prior to importing this module +RequiredModules = @() + +# Assemblies that must be loaded prior to importing this module +RequiredAssemblies = @() + +# Script files (.ps1) that are run in the caller's environment prior to importing this module +ScriptsToProcess = @() + +# Type files (.ps1xml) to be loaded when importing this module +TypesToProcess = @() + +# Format files (.ps1xml) to be loaded when importing this module +FormatsToProcess = @() + +# Modules to import as nested modules of the module specified in ModuleToProcess +NestedModules = '..\..\..\Package\Debug\ServiceManagement\Azure\Storage\Microsoft.WindowsAzure.Commands.Storage.dll' + +# Functions to export from this module +FunctionsToExport = '*' + +# Cmdlets to export from this module +CmdletsToExport = '*' + +# Variables to export from this module +VariablesToExport = '*' + +# Aliases to export from this module +AliasesToExport = @() + +# List of all modules packaged with this module +ModuleList = @() + +# List of all files packaged with this module +FileList = @() + +# Private data to pass to the module specified in ModuleToProcess +PrivateData = '' + +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.dll-Help.xml b/src/ServiceManagement/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.dll-Help.xml new file mode 100644 index 000000000000..1d36c9737074 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.dll-Help.xml @@ -0,0 +1,12697 @@ + + + + + Get-AzureStorageBlob + + List the azure blobs in the specified container. + + + + + Get + AzureStorageBlob + + + + + List the azure blobs in the specified container. + + + + Get-AzureStorageBlob + + Blob + + Blob name pattern. If blob name is empty, this will list all the blobs in container. Otherwise, this will list the blobs whose name matched the name regular pattern. + + String + + + Container + + Container name + + String + + + MaxCount + + The max count of the blobs that can return. + + Nullable`1[Int32] + + + ContinuationToken + + Blob list continuation token. + + BlobContinuationToken + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + + Get-AzureStorageBlob + + Prefix + + Blob name prefix. The Prefix parameter don't support regular expression. + + String + + + Container + + Container name + + String + + + MaxCount + + The max count of the blobs that can return. + + Nullable`1[Int32] + + + ContinuationToken + + Blob list continuation token. + + BlobContinuationToken + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + + + + Blob + + Blob name pattern. If blob name is empty, this will list all the blobs in container. Otherwise, this will list the blobs whose name matched the name regular pattern. + + String + + String + + + + + + Container + + Container name + + String + + String + + + + + + MaxCount + + The max count of the blobs that can return. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ContinuationToken + + Blob list continuation token. + + BlobContinuationToken + + BlobContinuationToken + + + + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + AzureStorageContext + + + + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + Prefix + + Blob name prefix. The Prefix parameter don't support regular expression. + + String + + String + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + AzureStorageBlob + + + ICloudBlob object and Azure storage context and etc. + + + + + + + + + + + SYNOPSIS + + + + + -------------------------- Get azure storage blob by blob name -------------------------- + + + + PS C:\> Get-AzureStorageBlob -Container containername -Blob blob* + + + + + + + + + + + -------------------------- Get blob by pipeline from GetAzureStorageContainer -------------------------- + + + + PS C:\> Get-AzureStorageContainer container* | Get-AzureStorageBlob + + + + + + + + + + + -------------------------- Get azure storage blob by name prefix -------------------------- + + + + PS C:\> Get-AzureStorageBlob -Container containername -Prefix blob + + + + + + + + + + + -------------------------- List all blobs with max count and continuation token. -------------------------- + + + + PS C:\> $maxReturn = 10000 +$containerName = "abc" + +$total = 0 +$token = $null +do +{ + $blobs = Get-AzureStorageBlob -Container $containerName -MaxCount $maxReturn -ContinuationToken $token + $total += $blobs.Count + if($blobs.Length -le 0) { break;} + $token = $blobs[$blobs.Count -1].ContinuationToken; +} +while($token -ne $null) +echo "Total $total blobs in container $containerName" + + + + + + + + + + + + + Remove-AzureStorageBlob + + + + Get-AzureStorageBlobContent + + + + Set-AzureStorageBlobContent + + + + + + + + Get-AzureStorageBlobContent + + Download the specified azure storage blob. + + + + + Get + AzureStorageBlobContent + + + + + Download the specified azure storage blob. + + + + Get-AzureStorageBlobContent + + Blob + + Blob name. + + String + + + Container + + Container name. + + String + + + Destination + + Download destination file path. + + String + + + CheckMd5 + + Whether check the md5 sum for downloaded file. + + SwitchParameter + + + Force + + Force to overwrite the existing file. + + SwitchParameter + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + The total amount of concurrent async tasks. + + Nullable`1[Int32] + + + + Get-AzureStorageBlobContent + + ICloudBlob + + ICloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet. + + ICloudBlob + + + Destination + + Download destination file path. + + String + + + CheckMd5 + + Whether check the md5 sum for downloaded file. + + SwitchParameter + + + Force + + Force to overwrite the existing file. + + SwitchParameter + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + The total amount of concurrent async tasks. + + Nullable`1[Int32] + + + + Get-AzureStorageBlobContent + + CloudBlobContainer + + CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet. + + CloudBlobContainer + + + Blob + + Blob name. + + String + + + Destination + + Download destination file path. + + String + + + CheckMd5 + + Whether check the md5 sum for downloaded file. + + SwitchParameter + + + Force + + Force to overwrite the existing file. + + SwitchParameter + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + The total amount of concurrent async tasks. + + Nullable`1[Int32] + + + + + + Blob + + Blob name. + + String + + String + + + + + + Container + + Container name. + + String + + String + + + + + + Destination + + Download destination file path. + + String + + String + + + + + + CheckMd5 + + Whether check the md5 sum for downloaded file. + + SwitchParameter + + SwitchParameter + + + False + + + Force + + Force to overwrite the existing file. + + SwitchParameter + + SwitchParameter + + + + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + AzureStorageContext + + + + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ConcurrentTaskCount + + The total amount of concurrent async tasks. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + ProcessorCount * 8 + + + ICloudBlob + + ICloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet. + + ICloudBlob + + ICloudBlob + + + + + + CloudBlobContainer + + CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet. + + CloudBlobContainer + + CloudBlobContainer + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + AzureStorageContainer + + + + + + + + + + + + + + If the blob name is invalid for local machine, this cmdlet will auto resovle it if it's possible. + + + + + -------------------------- Download blob by name. -------------------------- + + + + PS C:\> Get-AzureStorageBlobContent -Container containername -Blob blob -Destination C:\test\ + + + + + + + + + + + -------------------------- Download blob content using pipeline from GetAzureStorageBlob. -------------------------- + + + + PS C:\> Get-AzureStorageBlob -Container containername -Blob blobname | Get-AzureStorageBlobContent + + + + + + + + + + + -------------------------- Download blob content using pipeline from GetAzureStorageContainer. -------------------------- + + + + PS C:\> Get-AzureStorageContainer container* | Get-AzureStorageBlobContent -Blob cbox.exe -Destination C:\test + + + + + + + + + + + + + Set-AzureStorageBlobContent + + + + Get-AzureStorageBlob + + + + Remove-AzureStorageBlob + + + + + + + + Get-AzureStorageBlobCopyState + + Get copy state of the specified azure storage blob. + + + + + Get + AzureStorageBlobCopyState + + + + + Get copy state of the specified azure storage blob. + + + + Get-AzureStorageBlobCopyState + + Blob + + Blob name. + + String + + + Container + + Container name. + + String + + + WaitForComplete + + Wait for the copy completion. + + SwitchParameter + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + + Get-AzureStorageBlobCopyState + + ICloudBlob + + ICloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet. + + ICloudBlob + + + WaitForComplete + + Wait for the copy completion. + + SwitchParameter + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + + Get-AzureStorageBlobCopyState + + CloudBlobContainer + + CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet. + + CloudBlobContainer + + + Blob + + Blob name. + + String + + + WaitForComplete + + Wait for the copy completion. + + SwitchParameter + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + + + + Blob + + Blob name. + + String + + String + + + + + + Container + + Container name. + + String + + String + + + + + + WaitForComplete + + Wait for the copy completion. + + SwitchParameter + + SwitchParameter + + + + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + AzureStorageContext + + + + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ICloudBlob + + ICloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet. + + ICloudBlob + + ICloudBlob + + + + + + CloudBlobContainer + + CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet. + + CloudBlobContainer + + CloudBlobContainer + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + CopyState + + + + + + + + + + + + + + + + + + + -------------------------- Get Copy State by name. -------------------------- + + + + PS C:\> Get-AzureStorageBlobCopyState -Container containername -Blob blobname + + + + + + + + + + + -------------------------- Get copy state using pipeline by GetAzureStorageBlob -------------------------- + + + + PS C:\> Get-AzureStorageBlob -Container containername -blob blobname | Get-AzureStorageBlobCopyState + + + + + + + + + + + -------------------------- Get azure storage blob copy state using pipeline from GetAzureStorageContainer. -------------------------- + + + + PS C:\> Get-AzureStorageContainer containername | Get-AzureStorageBlobCopyState -Blob blobname + + + + + + + + + + + + + Start-AzureStorageBlobCopy + + + + Stop-AzureStorageBlobCopy + + + + + + + + Get-AzureStorageContainer + + List azure storage containers. + + + + + Get + AzureStorageContainer + + + + + List azure storage containers. + + + + Get-AzureStorageContainer + + Name + + Container name. If container name is empty, this will list all the containers. Otherwise, this will list the containers whose name matched the name regular pattern. + + String + + + MaxCount + + The max count of the containers that can return. + + Nullable`1[Int32] + + + ContinuationToken + + Container list continuation token. + + BlobContinuationToken + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + + Get-AzureStorageContainer + + Prefix + + Container name prefix. + + String + + + MaxCount + + The max count of the containers that can return. + + Nullable`1[Int32] + + + ContinuationToken + + Container list continuation token. + + BlobContinuationToken + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + + + + Name + + Container name. If container name is empty, this will list all the containers. Otherwise, this will list the containers whose name matched the name regular pattern. + + String + + String + + + + + + MaxCount + + The max count of the containers that can return. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ContinuationToken + + Container list continuation token. + + BlobContinuationToken + + BlobContinuationToken + + + + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + AzureStorageContext + + + + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + Prefix + + Container name prefix. + + String + + String + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Get azure storage blob by namne -------------------------- + + + + PS C:\> Get-AzureStorageContainer container* + + + + + + + + + + + -------------------------- Get azure storage container by container name prefix -------------------------- + + + + PS C:\> Get-AzureStorageContainer -Prefix container + + + + + + + + + + + -------------------------- List all containers with maxCount and ContinuationToken -------------------------- + + + + PS C:\> $maxReturn = 10000 + + +$total = 0 +$token = $null +do +{ + $containers = Get-AzureStorageContainer -MaxCount $maxReturn -ContinuationToken $token + $total += $containers.Count + if($containers.Length -le 0) { break;} + $token = $containers[$containers.Count-1].ContinuationToken; +} +while($token -ne $null) + +echo "Total $total containers" + + + + + + + + + + + + + New-AzureStorageContainer + + + + Remove-AzureStorageContainer + + + + Set-AzureStorageContainerAcl + + + + + + + + Get-AzureStorageFile + + List the files and directories in a specific path. + + + + + Get + AzureStorageFile + + + + + List the files and directories in a specific path. + + + + Get-AzureStorageFile + + ShareName + + The file share name + + String + + + Path + + The file or directory path + + String + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + + Get-AzureStorageFile + + Share + + The file share object + + CloudFileShare + + + Path + + The file or directory path + + String + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + + Get-AzureStorageFile + + Directory + + The file directory object + + CloudFileDirectory + + + Path + + The file or directory path + + String + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + + Get-AzureStorageFile + + Path + + The file or directory path + + String + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + + Get-AzureStorageFile + + Path + + The file or directory path + + String + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + + + + ShareName + + The file share name + + String + + String + + + + + + Path + + The file or directory path + + String + + String + + + + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + AzureStorageContext + + + + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + Share + + The file share object + + CloudFileShare + + CloudFileShare + + + + + + Directory + + The file directory object + + CloudFileDirectory + + CloudFileDirectory + + + + + + ClientRequestId + + + + string + + string + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> Get-AzureStorageShare -Name sample | Get-AzureStorageFile + + This example lists the files and directories under the sample file share. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> Get-AzureStorageFile -FileShareName sample | ? IsDirectory + + This example lists the directories under sample file share. + + + + + + + + + + + New-AzureStorageDirectory + + + + Remove-AzureStorageDirectory + + + + Remove-AzureStorageFile + + + + Get-AzureStorageFileContent + + + + Set-AzureStorageFileContent + + + + + + + + Get-AzureStorageFileContent + + Download the specified azure storage file. + + + + + Get + AzureStorageFileContent + + + + + Download the specified azure storage file. + + + + Get-AzureStorageFileContent + + ShareName + + The file share name + + String + + + Path + + the path of the azure storage file to download + + String + + + Destination + + The destination to put the downloaded file + + String + + + PassThru + + + + SwitchParameter + + + Force + + If this parameter is set, it will overwrite the local file when there is name conflict. + + SwitchParameter + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + WhatIf + + + + SwitchParameter + + + Confirm + + + + SwitchParameter + + + + Get-AzureStorageFileContent + + Share + + The file share object + + CloudFileShare + + + Path + + the path of the azure storage file to download + + String + + + Destination + + The destination to put the downloaded file + + String + + + PassThru + + + + SwitchParameter + + + Force + + If this parameter is set, it will overwrite the local file when there is name conflict. + + SwitchParameter + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + WhatIf + + + + SwitchParameter + + + Confirm + + + + SwitchParameter + + + + Get-AzureStorageFileContent + + Directory + + + + CloudFileDirectory + + + Path + + the path of the azure storage file to download + + String + + + Destination + + The destination to put the downloaded file + + String + + + PassThru + + + + SwitchParameter + + + Force + + If this parameter is set, it will overwrite the local file when there is name conflict. + + SwitchParameter + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + WhatIf + + + + SwitchParameter + + + Confirm + + + + SwitchParameter + + + + Get-AzureStorageFileContent + + File + + The file object + + CloudFile + + + Destination + + The destination to put the downloaded file + + String + + + PassThru + + + + SwitchParameter + + + Force + + If this parameter is set, it will overwrite the local file when there is name conflict. + + SwitchParameter + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + WhatIf + + + + SwitchParameter + + + Confirm + + + + SwitchParameter + + + + Get-AzureStorageFileContent + + PassThru + + + + SwitchParameter + + + Force + + If this parameter is set, it will overwrite the local file when there is name conflict. + + SwitchParameter + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + WhatIf + + + + SwitchParameter + + + Confirm + + + + SwitchParameter + + + + Get-AzureStorageFileContent + + PassThru + + + + SwitchParameter + + + Force + + If this parameter is set, it will overwrite the local file when there is name conflict. + + SwitchParameter + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + WhatIf + + + + SwitchParameter + + + Confirm + + + + SwitchParameter + + + + + + ShareName + + The file share name + + String + + String + + + + + + Path + + the path of the azure storage file to download + + String + + String + + + + + + Destination + + The destination to put the downloaded file + + String + + String + + + + + + PassThru + + + + SwitchParameter + + SwitchParameter + + + + + + Force + + If this parameter is set, it will overwrite the local file when there is name conflict. + + SwitchParameter + + SwitchParameter + + + + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + AzureStorageContext + + + + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + WhatIf + + + + SwitchParameter + + SwitchParameter + + + + + + Confirm + + + + SwitchParameter + + SwitchParameter + + + + + + Share + + The file share object + + CloudFileShare + + CloudFileShare + + + + + + Directory + + + + CloudFileDirectory + + CloudFileDirectory + + + + + + File + + The file object + + CloudFile + + CloudFile + + + + + + ClientRequestId + + + + string + + string + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> Get-AzureStorageFileContent -FileShareName sample -FilePath sampledir/samplefile + + This example downloads the file whose path is sampledir/samplefile in the sample file share. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> Get-AzureStorageFile -ShareName sample | ? IsFile | Get-AzureStorageFileContent + + This example downloads the files under sample file share + + + + + + + + + + + Get-AzureStorageFile + + + + Set-AzureStorageFileContent + + + + + + + + Get-AzureStorageQueue + + list azure storage queues + + + + + Get + AzureStorageQueue + + + + + list azure storage queues + + + + Get-AzureStorageQueue + + Name + + Queue name. If queue name is empty, this will list all the queues. Otherwise, this will list the queues whose name matched the name regular pattern. + + String + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + + Get-AzureStorageQueue + + Prefix + + Queue name prefix + + String + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + + + + Name + + Queue name. If queue name is empty, this will list all the queues. Otherwise, this will list the queues whose name matched the name regular pattern. + + String + + String + + + + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + AzureStorageContext + + + + + + Prefix + + Queue name prefix + + String + + String + + + + + + ServerTimeoutPerRequest + + Server side time out for each request. + + int32 + + int32 + + + + + + ClientTimeoutPerRequest + + Client side time out for each request. + + int32 + + int32 + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- List all azure storage queues -------------------------- + + + + PS C:\> Get-AzureStorageQueue + + + + + + + + + + + -------------------------- List azure storage queues using wildcard -------------------------- + + + + PS C:\> Get-AzureStorageQueue queue* + + + + + + + + + + + -------------------------- List azure storage queues using queue name prefix -------------------------- + + + + PS C:\> Get-AzureStorageQueue -Prefix queue + + + + + + + + + + + + + + + + + Get-AzureStorageServiceLoggingProperty + + Get azure storage service logging properties. + + + + + Get + AzureStorageServiceLoggingProperty + + + + + Get azure storage service logging properties. + + + + Get-AzureStorageServiceLoggingProperty + + ServiceType + + Azure storage service type. + + StorageServiceType + + + Context + + Azure storage context. + + AzureStorageContext + + + + + + ServiceType + + Azure storage service type. + + StorageServiceType + + StorageServiceType + + + + + + Context + + Azure storage context. + + AzureStorageContext + + AzureStorageContext + + + + + + ServerTimeoutPerRequest + + Server side time out for each request. + + int32 + + int32 + + + + + + ClientTimeoutPerRequest + + Client side time out for each request. + + int32 + + int32 + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Get azure storage blob service logging properties. -------------------------- + + + + PS C:\> Get-AzureStorageServiceLoggingProperty -ServiceType Blob + + + + + + + + + + + + + + + + + Get-AzureStorageServiceMetricsProperty + + Get azure storage service metrics properties. + + + + + Get + AzureStorageServiceMetricsProperty + + + + + Get azure storage service metrics properties. + + + + Get-AzureStorageServiceMetricsProperty + + ServiceType + + Azure storage service type. + + StorageServiceType + + + MetricsType + + Metrics type. + + ServiceMetricsType + + + Context + + Azure storage context. + + AzureStorageContext + + + + + + ServiceType + + Azure storage service type. + + StorageServiceType + + StorageServiceType + + + + + + MetricsType + + Metrics type. + + ServiceMetricsType + + ServiceMetricsType + + + + + + Context + + Azure storage context. + + AzureStorageContext + + AzureStorageContext + + + + + + ServerTimeoutPerRequest + + Server side time out for each request. + + int32 + + int32 + + + + + + ClientTimeoutPerRequest + + Client side time out for each request. + + int32 + + int32 + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Get hour metrics properties for azure storage blob service. -------------------------- + + + + PS C:\> Get-AzureStorageServiceMetricsProperty -ServiceType Blob -MetricsType Hour + + + + + + + + + + + + + + + + + Get-AzureStorageShare + + List azure storage file shares. + + + + + Get + AzureStorageShare + + + + + List azure storage file shares. + + + + Get-AzureStorageShare + + Prefix + + The file share name prefix. The Prefix parameter doesn't support regular expression. + + String + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + + Get-AzureStorageShare + + Name + + The file share name + + String + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + + Get-AzureStorageShare + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + + + + Prefix + + The file share name prefix. The Prefix parameter doesn't support regular expression. + + String + + String + + + + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + AzureStorageContext + + + + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + Name + + The file share name + + String + + String + + + + + + ClientRequestId + + + + string + + string + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> Get-AzureStorageShare -Name sample + + This example gets a file share named sample. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> Get-AzureStorageShare -Prefix sample + + This example lists all file shares whose names begin with the specified prefix. + + + + + + + + + + + New-AzureStorageShare + + + + Remove-AzureStorageShare + + + + + + + + Get-AzureStorageTable + + List azure storage tables + + + + + Get + AzureStorageTable + + + + + List azure storage tables + + + + Get-AzureStorageTable + + Name + + Table name. If table name is empty, this will list all the queues. Otherwise, this will list the tables whose name matched the name regular pattern. + + String + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + + Get-AzureStorageTable + + Prefix + + Table name prefix + + String + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + + + + Name + + Table name. If table name is empty, this will list all the queues. Otherwise, this will list the tables whose name matched the name regular pattern. + + String + + String + + + + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + AzureStorageContext + + + + + + Prefix + + Table name prefix + + String + + String + + + + + + ServerTimeoutPerRequest + + Server side time out for each request. + + int32 + + int32 + + + + + + ClientTimeoutPerRequest + + Client side time out for each request. + + int32 + + int32 + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- List all azure storage tables -------------------------- + + + + PS C:\> Get-AzureStorageTable + + + + + + + + + + + -------------------------- List azure storage tables using wildcard -------------------------- + + + + PS C:\> Get-AzureStorageTable table* + + + + + + + + + + + -------------------------- List azure storage tables using table name prefix -------------------------- + + + + PS C:\> Get-AzureStorageTable -Prefix table + + + + + + + + + + + + + + + + + New-AzureStorageBlobSASToken + + Generate Shared Access Signature token for azure storage blob. + + + + + New + AzureStorageBlobSASToken + + + + + Generate Shared Access Signature token for azure storage blob. + + + + New-AzureStorageBlobSASToken + + Container + + Azure storage container name. + + String + + + Blob + + Azure storage blob name. + + String + + + Permission + + Permissions for a storage blob. + + String + + + StartTime + + The time at which the shared access signature becomes valid. + + Nullable`1[DateTime] + + + ExpiryTime + + The time at which the shared access signature becomes invalid. + + Nullable`1[DateTime] + + + FullUri + + Return the full blob uri with sas token. + + SwitchParameter + + + Context + + Azure storage context. + + AzureStorageContext + + + + New-AzureStorageBlobSASToken + + ICloudBlob + + ICloudBlob object + + ICloudBlob + + + Permission + + Permissions for a storage blob. + + String + + + StartTime + + The time at which the shared access signature becomes valid. + + Nullable`1[DateTime] + + + ExpiryTime + + The time at which the shared access signature becomes invalid. + + Nullable`1[DateTime] + + + FullUri + + Return the full blob uri with sas token. + + SwitchParameter + + + Context + + Azure storage context. + + AzureStorageContext + + + + New-AzureStorageBlobSASToken + + ICloudBlob + + ICloudBlob object + + ICloudBlob + + + Policy + + Azure Stored Access Policy. + + String + + + StartTime + + The time at which the shared access signature becomes valid. + + Nullable`1[DateTime] + + + ExpiryTime + + The time at which the shared access signature becomes invalid. + + Nullable`1[DateTime] + + + FullUri + + Return the full blob uri with sas token. + + SwitchParameter + + + Context + + Azure storage context. + + AzureStorageContext + + + + New-AzureStorageBlobSASToken + + Container + + Azure storage container name. + + String + + + Blob + + Azure storage blob name. + + String + + + Policy + + Azure Stored Access Policy. + + String + + + StartTime + + The time at which the shared access signature becomes valid. + + Nullable`1[DateTime] + + + ExpiryTime + + The time at which the shared access signature becomes invalid. + + Nullable`1[DateTime] + + + FullUri + + Return the full blob uri with sas token. + + SwitchParameter + + + Context + + Azure storage context. + + AzureStorageContext + + + + + + Container + + Azure storage container name. + + String + + String + + + + + + Blob + + Azure storage blob name. + + String + + String + + + + + + Permission + + Permissions for a storage blob. + + String + + String + + + + + + StartTime + + The time at which the shared access signature becomes valid. + + Nullable`1[DateTime] + + Nullable`1[DateTime] + + + + + + ExpiryTime + + The time at which the shared access signature becomes invalid. + + Nullable`1[DateTime] + + Nullable`1[DateTime] + + + + + + FullUri + + Return the full blob uri with sas token. + + SwitchParameter + + SwitchParameter + + + + + + Context + + Azure storage context. + + AzureStorageContext + + AzureStorageContext + + + + + + ICloudBlob + + ICloudBlob object + + ICloudBlob + + ICloudBlob + + + + + + Policy + + Azure Stored Access Policy. + + String + + String + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Generate a blob sas token with full blob permission. -------------------------- + + + + PS C:\> New-AzureStorageBlobSASToken -Container cname -Blob bname -Permission rwd + + + + + + + + + + + -------------------------- Generate a blob sas token with life time. -------------------------- + + + + PS C:\> $startTime = Get-Date +$endTime = $startTime.AddHours(2.0) +New-AzureStorageBlobSASToken -Container cname -Blob bname -Permission rwd -StartTime $startTime -ExpiryTime $endTime + + + + + + + + + + + + + http://msdn.microsoft.com/en-us/library/windowsazure/dn140255.aspx + + + + + + + + New-AzureStorageContainer + + Create an azure storage container. + + + + + New + AzureStorageContainer + + + + + Create an azure storage container. + + + + New-AzureStorageContainer + + Name + + Container name. + + String + + + Permission + + Container public access permission (Off/Blob/Container). + + Nullable`1[BlobContainerPublicAccessType] + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + + + + Name + + Container name. + + String + + String + + + + + + Permission + + Container public access permission (Off/Blob/Container). + + Nullable`1[BlobContainerPublicAccessType] + + Nullable`1[BlobContainerPublicAccessType] + + + Off + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + AzureStorageContext + + + + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Create a new azure storage container -------------------------- + + + + PS C:\> New-AzureStorageContainer containername -Permission Off + + + + + + + + + + + -------------------------- Create multiple azure storage containers. -------------------------- + + + + PS C:\> "container1 container2 container3".split() | New-AzureStorageContainer -Permission Container + + + + + + + + + + + + + Get-AzureStorageContainer + + + + Remove-AzureStorageContainer + + + + Set-AzureStorageContainerAcl + + + + + + + + New-AzureStorageContainerSASToken + + Generate Shared Access Signature token for azure storage container. + + + + + New + AzureStorageContainerSASToken + + + + + Generate Shared Access Signature token for azure storage container. + + + + New-AzureStorageContainerSASToken + + Name + + Azure storage container name. + + String + + + Policy + + Azure Stored Access Policy. + + String + + + StartTime + + The time at which the shared access signature becomes valid. + + Nullable`1[DateTime] + + + ExpiryTime + + The time at which the shared access signature becomes invalid. + + Nullable`1[DateTime] + + + FullUri + + Return the full container uri with sas token. + + SwitchParameter + + + Context + + Azure storage context. + + AzureStorageContext + + + + New-AzureStorageContainerSASToken + + Name + + Azure storage container name. + + String + + + Permission + + Permissions for a storage container. + + String + + + StartTime + + The time at which the shared access signature becomes valid. + + Nullable`1[DateTime] + + + ExpiryTime + + The time at which the shared access signature becomes invalid. + + Nullable`1[DateTime] + + + FullUri + + Return the full container uri with sas token. + + SwitchParameter + + + Context + + Azure storage context. + + AzureStorageContext + + + + + + Name + + Azure storage container name. + + String + + String + + + + + + Policy + + Azure Stored Access Policy. + + String + + String + + + + + + StartTime + + The time at which the shared access signature becomes valid. + + Nullable`1[DateTime] + + Nullable`1[DateTime] + + + + + + ExpiryTime + + The time at which the shared access signature becomes invalid. + + Nullable`1[DateTime] + + Nullable`1[DateTime] + + + + + + FullUri + + Return the full container uri with sas token. + + SwitchParameter + + SwitchParameter + + + + + + Context + + Azure storage context. + + AzureStorageContext + + AzureStorageContext + + + + + + Permission + + Permissions for a storage container. + + String + + String + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Generate a container sas token with full container permission. -------------------------- + + + + PS C:\> New-AzureStorageContainerSASToken -Name test -Permission rwdl + + + + + + + + + + + -------------------------- Generate multiple container sas token by pipeline -------------------------- + + + + PS C:\> Get-AzureStorageContainer -Container test* | New-AzureStorageContainerSASToken -Permission rwdl + + + + + + + + + + + -------------------------- Generate container sas token with shared access policy -------------------------- + + + + PS C:\> New-AzureStorageContainerSASToken -Name test -Policy policyName + + + + + + + + + + + + + http://msdn.microsoft.com/en-us/library/windowsazure/dn140255.aspx + + + + + + + + New-AzureStorageContext + + Create an azure storage context using azure storage credentials. + + + + + New + AzureStorageContext + + + + + Create an azure storage context using azure storage credentials. + + + + New-AzureStorageContext + + StorageAccountName + + Azure storage account name + + String + + + StorageAccountKey + + Azure storage account key. + + String + + + Protocol + + Transfer Protocol (https/http). + + String + + + Endpoint + + Azure Storage Endpoint. + + String + + + + New-AzureStorageContext + + StorageAccountName + + Azure storage account name + + String + + + Anonymous + + Anonymous storage account. + + SwitchParameter + + + Protocol + + Transfer Protocol (https/http). + + String + + + Endpoint + + Azure Storage Endpoint. + + String + + + + New-AzureStorageContext + + StorageAccountName + + Azure storage account name + + String + + + SasToken + + + + String + + + Environment + + Azure Environment + + String + + + + New-AzureStorageContext + + StorageAccountName + + Azure storage account name + + String + + + Anonymous + + Anonymous storage account. + + SwitchParameter + + + Protocol + + Transfer Protocol (https/http). + + String + + + Environment + + Azure Environment + + String + + + + New-AzureStorageContext + + StorageAccountName + + Azure storage account name + + String + + + StorageAccountKey + + Azure storage account key. + + String + + + Protocol + + Transfer Protocol (https/http). + + String + + + Environment + + Azure Environment + + String + + + + New-AzureStorageContext + + StorageAccountName + + Azure storage account name + + String + + + SasToken + + + + String + + + Protocol + + Transfer Protocol (https/http). + + String + + + Endpoint + + Azure Storage Endpoint. + + String + + + + New-AzureStorageContext + + ConnectionString + + Azure storage connection string. + + String + + + + New-AzureStorageContext + + Local + + Local development storage account. + + SwitchParameter + + + + + + StorageAccountName + + Azure storage account name + + String + + String + + + + + + StorageAccountKey + + Azure storage account key. + + String + + String + + + + + + Protocol + + Transfer Protocol (https/http). + + String + + String + + + Https + + + Endpoint + + Azure Storage Endpoint. + + String + + String + + + + + + Anonymous + + Anonymous storage account. + + SwitchParameter + + SwitchParameter + + + + + + SasToken + + + + String + + String + + + + + + Environment + + Azure Environment + + String + + String + + + + + + ConnectionString + + Azure storage connection string. + + String + + String + + + + + + Local + + Local development storage account. + + SwitchParameter + + SwitchParameter + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + AzureStorageContext + + + + + + + + + + + + + + + + + + + -------------------------- Use storage account name and key -------------------------- + + + + PS C:\> New-AzureStorageContext -StorageAccountName name -StorageAccountKey key + + + + + + + + + + + -------------------------- Use connection string -------------------------- + + + + PS C:\> New-AzureStorageContext -ConnnectionString connectionstring + + + + + + + + + + + -------------------------- Use anonymous storage accont. -------------------------- + + + + PS C:\> New-AzureStorageContext -StorageAccountName account -Anonymous -Protocol http + + + + + + + + + + + -------------------------- Use local development storage account -------------------------- + + + + PS C:\> New-AzureStorageContext -Local + + + + + + + + + + + -------------------------- Use NewAzureSotrageContext cmdlet with other storage cmdlet. -------------------------- + + + + PS C:\> New-AzureStorageContext -Local | Get-AzureStorageContainer + + + + + + + + + + + -------------------------- Use multiple storage context. -------------------------- + + + + PS C:\> $context1 = New-AzureStorageContext -Local + $context2 = new-azurestoragecontext -StorageAccountName accountname -StorageAccountKey accountkey + + ($context1, $context2) | Get-AzureStorageContainer + + + + + + + + + + + -------------------------- Create azure storage context with specified storage end point -------------------------- + + + + PS C:\> New-AzureStorageContext -StorageAccountName name -StorageAccountKey key -Endpoint core.windows.net + + + + + + + + + + + -------------------------- Create azure storage context with specified storage end point -------------------------- + + + + PS C:\> New-AzureStorageContext -StorageAccountName name -StorageAccountKey key -Endpoint core.chinacloudapi.cn + + + + + + + + + + + -------------------------- Create azure storage context with specified azure environment -------------------------- + + + + PS C:\> New-AzureStorageContext -StorageAccountName name -StorageAccountKey key -Environment AzureChinaCloud + + + + + + + + + + + -------------------------- Create storage context with sas token and use it with other storage cmdlet. -------------------------- + + + + PS C:\> $sasToken = New-AzureStorageContainerSASToken -Container abc -Permission rl +$context = New-AzureStorageContext -StorageAccountName account -SasToken $sasToken +$context | Get-AzureStorageBlob -Container abc + + Create an sas token with container read and list permission and then list all the blobs in the specified container. + + + + + + + + + + + + + + + New-AzureStorageDirectory + + Create an azure storage directory. + + + + + New + AzureStorageDirectory + + + + + Create an azure storage directory. + + + + New-AzureStorageDirectory + + ShareName + + The file share name + + String + + + Path + + The path of the file directory to be created + + String + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + + New-AzureStorageDirectory + + Share + + The file share object + + CloudFileShare + + + Path + + The path of the file directory to be created + + String + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + + New-AzureStorageDirectory + + Directory + + the parent directory object + + CloudFileDirectory + + + Path + + The path of the file directory to be created + + String + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + + New-AzureStorageDirectory + + Path + + The path of the file directory to be created + + String + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + + New-AzureStorageDirectory + + Path + + The path of the file directory to be created + + String + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + + + + ShareName + + The file share name + + String + + String + + + + + + Path + + The path of the file directory to be created + + String + + String + + + + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + AzureStorageContext + + + + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + Share + + The file share object + + CloudFileShare + + CloudFileShare + + + + + + Directory + + the parent directory object + + CloudFileDirectory + + CloudFileDirectory + + + + + + ClientRequestId + + + + string + + string + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> Get-AzureStorageShare -Name sample | New-AzureStorageDirectory -Path sampledir + + This example creates a file directory named sampledir under the sample file share. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> New-AzureStorageFileDirectory -ShareName sample -Path sampledir + + This example creates a file directory named sampledir under the sample file share. + + + + + + + + + + + Get-AzureStorageFile + + + + Remove-AzureStorageDirectory + + + + + + + + New-AzureStorageQueue + + Create an azure storage queue + + + + + New + AzureStorageQueue + + + + + Create an azure storage queue + + + + New-AzureStorageQueue + + Name + + Queue name + + String + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + + + + Name + + Queue name + + String + + String + + + + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + AzureStorageContext + + + + + + ServerTimeoutPerRequest + + Server side time out for each request. + + int32 + + int32 + + + + + + ClientTimeoutPerRequest + + Client side time out for each request. + + int32 + + int32 + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Create an azure storage queue -------------------------- + + + + PS C:\> New-AzureStorageQueue queueabc + + + + + + + + + + + -------------------------- Create multiple azure storage queues -------------------------- + + + + PS C:\> "queue1 queue2 queue3".split() | New-AzureStorageQueue + + + + + + + + + + + + + + + + + New-AzureStorageQueueSASToken + + Generate Shared Access Signature token for azure storage queue. + + + + + New + AzureStorageQueueSASToken + + + + + Generate Shared Access Signature token for azure storage queue. + + + + New-AzureStorageQueueSASToken + + Name + + Azure storage queue name. + + String + + + Policy + + Azure Stored Access Policy. + + String + + + StartTime + + The time at which the shared access signature becomes valid. + + Nullable`1[DateTime] + + + ExpiryTime + + The time at which the shared access signature becomes invalid. + + Nullable`1[DateTime] + + + FullUri + + Return the full queue uri with sas token + + SwitchParameter + + + Context + + Azure storage context. + + AzureStorageContext + + + + New-AzureStorageQueueSASToken + + Name + + Azure storage queue name. + + String + + + Permission + + Permissions for a storage queue. + + String + + + StartTime + + The time at which the shared access signature becomes valid. + + Nullable`1[DateTime] + + + ExpiryTime + + The time at which the shared access signature becomes invalid. + + Nullable`1[DateTime] + + + FullUri + + Return the full queue uri with sas token + + SwitchParameter + + + Context + + Azure storage context. + + AzureStorageContext + + + + + + Name + + Azure storage queue name. + + String + + String + + + + + + Policy + + Azure Stored Access Policy. + + String + + String + + + + + + StartTime + + The time at which the shared access signature becomes valid. + + Nullable`1[DateTime] + + Nullable`1[DateTime] + + + + + + ExpiryTime + + The time at which the shared access signature becomes invalid. + + Nullable`1[DateTime] + + Nullable`1[DateTime] + + + + + + FullUri + + Return the full queue uri with sas token + + SwitchParameter + + SwitchParameter + + + + + + Context + + Azure storage context. + + AzureStorageContext + + AzureStorageContext + + + + + + Permission + + Permissions for a storage queue. + + String + + String + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Generate a queue sas token with full permission -------------------------- + + + + PS C:\> New-AzureStorageQueueSASToken -Name test -Permission raup + + + + + + + + + + + -------------------------- Generate a queue sas token with shared access policy -------------------------- + + + + PS C:\> New-AzureStorageQueueSASToken -Name test -Policy policyName + + + + + + + + + + + + + http://msdn.microsoft.com/en-us/library/windowsazure/dn140255.aspx + + + + + + + + New-AzureStorageShare + + Create a new Azure storage file share. + + + + + New + AzureStorageShare + + + + + Create a new Azure storage file share. + + + + New-AzureStorageShare + + Name + + The file share name + + String + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + + New-AzureStorageShare + + Name + + The file share name + + String + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + + New-AzureStorageShare + + Name + + The file share name + + String + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + + + + Name + + The file share name + + String + + String + + + + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + AzureStorageContext + + + + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ClientRequestId + + + + string + + string + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> New-AzureStorageShare -Name sample + + This example creates a file share named sample. + + + + + + + + + + + Unkown + + + + Remove-AzureStorageShare + + + + Unkown + + + + Get-AzureStorageShare + + + + + + + + New-AzureStorageTable + + Create an azure storage table + + + + + New + AzureStorageTable + + + + + Create an azure storage table + + + + New-AzureStorageTable + + Name + + Table name + + String + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + + + + Name + + Table name + + String + + String + + + + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + AzureStorageContext + + + + + + ServerTimeoutPerRequest + + Server side time out for each request. + + int32 + + int32 + + + + + + ClientTimeoutPerRequest + + Client side time out for each request. + + int32 + + int32 + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Create an azure storage table -------------------------- + + + + PS C:\> New-AzureStorageTable tableabc + + + + + + + + + + + -------------------------- Create multiple azure storage tables -------------------------- + + + + PS C:\> "table1 table2 table3".split() | New-AzureStorageTable + + + + + + + + + + + + + + + + + New-AzureStorageTableSASToken + + Generate Shared Access Signature token for azure storage table. + + + + + New + AzureStorageTableSASToken + + + + + Generate Shared Access Signature token for azure storage table. + + + + New-AzureStorageTableSASToken + + Name + + Azure storage table name. + + String + + + Policy + + Azure Stored Access Policy. + + String + + + StartTime + + The time at which the shared access signature becomes valid. + + Nullable`1[DateTime] + + + ExpiryTime + + The time at which the shared access signature becomes invalid. + + Nullable`1[DateTime] + + + FullUri + + Return the full queue uri with sas token + + SwitchParameter + + + StartPartitionKey + + Start partition key. + + String + + + StartRowKey + + Start row key. + + String + + + EndPartitionKey + + End partition key. + + String + + + EndRowKey + + End row key. + + String + + + Context + + Azure storage context + + AzureStorageContext + + + + New-AzureStorageTableSASToken + + Name + + Azure storage table name. + + String + + + Permission + + Permissions for a storage table. + + String + + + StartTime + + The time at which the shared access signature becomes valid. + + Nullable`1[DateTime] + + + ExpiryTime + + The time at which the shared access signature becomes invalid. + + Nullable`1[DateTime] + + + FullUri + + Return the full queue uri with sas token + + SwitchParameter + + + StartPartitionKey + + Start partition key. + + String + + + StartRowKey + + Start row key. + + String + + + EndPartitionKey + + End partition key. + + String + + + EndRowKey + + End row key. + + String + + + Context + + Azure storage context + + AzureStorageContext + + + + + + Name + + Azure storage table name. + + String + + String + + + + + + Policy + + Azure Stored Access Policy. + + String + + String + + + + + + StartTime + + The time at which the shared access signature becomes valid. + + Nullable`1[DateTime] + + Nullable`1[DateTime] + + + + + + ExpiryTime + + The time at which the shared access signature becomes invalid. + + Nullable`1[DateTime] + + Nullable`1[DateTime] + + + + + + FullUri + + Return the full queue uri with sas token + + SwitchParameter + + SwitchParameter + + + + + + StartPartitionKey + + Start partition key. + + String + + String + + + + + + StartRowKey + + Start row key. + + String + + String + + + + + + EndPartitionKey + + End partition key. + + String + + String + + + + + + EndRowKey + + End row key. + + String + + String + + + + + + Context + + Azure storage context + + AzureStorageContext + + AzureStorageContext + + + + + + Permission + + Permissions for a storage table. + + String + + String + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Generate a table sas token with full permission -------------------------- + + + + PS C:\> New-AzureStorageTableSASToken -Name test -Permission raud + + + + + + + + + + + -------------------------- Generate a table sas token with partition key and row key. -------------------------- + + + + PS C:\> New-AzureStorageTableSASToken -Name test -Permission raud -StartPartitionKey a -EndPartitionKey b + + + + + + + + + + + -------------------------- Generate a table sas token with shared access policy -------------------------- + + + + PS C:\> New-AzureStorageTableSASToken -Name test -Policy policyName + + + + + + + + + + + + + http://msdn.microsoft.com/en-us/library/windowsazure/dn140255.aspx + + + + + + + + Remove-AzureStorageBlob + + Remove the specified azure storage blob. + + + + + Remove + AzureStorageBlob + + + + + Remove the specified azure storage blob. + + + + Remove-AzureStorageBlob + + Blob + + Blob name. + + String + + + Container + + Container name. + + String + + + DeleteSnapshot + + Only delete blob snapshots. + + SwitchParameter + + + Force + + Force to remove the blob and its snapshot without confirmation. + + SwitchParameter + + + PassThru + + + + SwitchParameter + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + WhatIf + + + + SwitchParameter + + + Confirm + + + + SwitchParameter + + + + Remove-AzureStorageBlob + + ICloudBlob + + ICloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet. + + ICloudBlob + + + DeleteSnapshot + + Only delete blob snapshots. + + SwitchParameter + + + Force + + Force to remove the blob and its snapshot without confirmation. + + SwitchParameter + + + PassThru + + + + SwitchParameter + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + WhatIf + + + + SwitchParameter + + + Confirm + + + + SwitchParameter + + + + Remove-AzureStorageBlob + + CloudBlobContainer + + CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet. + + CloudBlobContainer + + + Blob + + Blob name. + + String + + + DeleteSnapshot + + Only delete blob snapshots. + + SwitchParameter + + + Force + + Force to remove the blob and its snapshot without confirmation. + + SwitchParameter + + + PassThru + + + + SwitchParameter + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + WhatIf + + + + SwitchParameter + + + Confirm + + + + SwitchParameter + + + + + + Blob + + Blob name. + + String + + String + + + + + + Container + + Container name. + + String + + String + + + + + + DeleteSnapshot + + Only delete blob snapshots. + + SwitchParameter + + SwitchParameter + + + + + + Force + + Force to remove the blob and its snapshot without confirmation. + + SwitchParameter + + SwitchParameter + + + + + + PassThru + + + + SwitchParameter + + SwitchParameter + + + + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + AzureStorageContext + + + + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + WhatIf + + + + SwitchParameter + + SwitchParameter + + + + + + Confirm + + + + SwitchParameter + + SwitchParameter + + + + + + ICloudBlob + + ICloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet. + + ICloudBlob + + ICloudBlob + + + + + + CloudBlobContainer + + CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet. + + CloudBlobContainer + + CloudBlobContainer + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Remove azure storage blob by name -------------------------- + + + + PS C:\> Remove-AzureStorageBlob -Container containername -Blob blobname + + + + + + + + + + + -------------------------- Remove azure storage blob using pipeline from GetAzureStorageBlob -------------------------- + + + + PS C:\> Get-AzureStorageBlob -Container containername -Blob blobname | Remove-AzureStorageBlob + + + + + + + + + + + -------------------------- Remove azure storage blob using pipeline from GetAzureStorageContainer -------------------------- + + + + PS C:\> Get-AzureStorageContainer container* | Remove-AzureStorageBlob blobname + + + + + + + + + + + + + Get-AzureStorageBlob + + + + Get-AzureStorageBlobContent + + + + Set-AzureStorageBlobContent + + + + + + + + Remove-AzureStorageContainer + + Remove the specified azure storage container. + + + + + Remove + AzureStorageContainer + + + + + Remove the specified azure storage container. + + + + Remove-AzureStorageContainer + + Name + + + + String + + + Force + + + + SwitchParameter + + + PassThru + + + + SwitchParameter + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + WhatIf + + + + SwitchParameter + + + Confirm + + + + SwitchParameter + + + + + + Name + + + + String + + String + + + + + + Force + + + + SwitchParameter + + SwitchParameter + + + + + + PassThru + + + + SwitchParameter + + SwitchParameter + + + + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + AzureStorageContext + + + + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + WhatIf + + + + SwitchParameter + + SwitchParameter + + + + + + Confirm + + + + SwitchParameter + + SwitchParameter + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Remove-AzureStorageDirectory + + Remove an azure storage file directory. + + + + + Remove + AzureStorageDirectory + + + + + Remove an azure storage file directory. + + + + Remove-AzureStorageDirectory + + ShareName + + The file share name + + String + + + Path + + The path of the file directory to be removed + + String + + + PassThru + + + + SwitchParameter + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side timeout value for the request + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + Remove-AzureStorageDirectory + + Share + + The file share object + + CloudFileShare + + + Path + + The path of the file directory to be removed + + String + + + PassThru + + + + SwitchParameter + + + ServerTimeoutPerRequest + + Server side timeout value for the request + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + Remove-AzureStorageDirectory + + Directory + + The directory object to be removed + + CloudFileDirectory + + + Path + + The path of the file directory to be removed + + String + + + PassThru + + + + SwitchParameter + + + ServerTimeoutPerRequest + + Server side timeout value for the request + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + Remove-AzureStorageDirectory + + PassThru + + + + SwitchParameter + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side timeout value for the request + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + Remove-AzureStorageDirectory + + PassThru + + + + SwitchParameter + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side timeout value for the request + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + + + ShareName + + The file share name + + String + + String + + + + + + Path + + The path of the file directory to be removed + + String + + String + + + + + + PassThru + + + + SwitchParameter + + SwitchParameter + + + + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + AzureStorageContext + + + + + + ServerTimeoutPerRequest + + Server side timeout value for the request + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ClientTimeoutPerRequest + + Client side timeout value for the request + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + SwitchParameter + + + + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + SwitchParameter + + + + + + Share + + The file share object + + CloudFileShare + + CloudFileShare + + + + + + Directory + + The directory object to be removed + + CloudFileDirectory + + CloudFileDirectory + + + + + + ClientRequestId + + + + string + + string + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> Get-AzureStorageShare -Name sample | Remove-AzureStorageDirectory -Path sampledir + + This example removes a file directory named sampledir under the sample file share. + + + + + + + + + -------------------------- Example 2 -------------------------- + + + + PS C:\> Remove-AzureStorageDirectory -ShareName sample -Path sampledir + + This example removes a file directory named sampledir under the sample file share. + + + + + + + + + + + Get-AzureStorageFile + + + + New-AzureStorageDirectory + + + + + + + + Remove-AzureStorageFile + + Remove the specified file + + + + + Remove + AzureStorageFile + + + + + Remove the specified file + + + + Remove-AzureStorageFile + + ShareName + + The file share name + + String + + + Path + + The path of the file to be removed + + String + + + PassThru + + + + SwitchParameter + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + Remove-AzureStorageFile + + Share + + The file share object + + CloudFileShare + + + Path + + The path of the file to be removed + + String + + + PassThru + + + + SwitchParameter + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + Remove-AzureStorageFile + + Directory + + + + CloudFileDirectory + + + Path + + The path of the file to be removed + + String + + + PassThru + + + + SwitchParameter + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + Remove-AzureStorageFile + + File + + The file object to remove + + CloudFile + + + PassThru + + + + SwitchParameter + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + Remove-AzureStorageFile + + PassThru + + + + SwitchParameter + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + Remove-AzureStorageFile + + PassThru + + + + SwitchParameter + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + + + ShareName + + The file share name + + String + + String + + + + + + Path + + The path of the file to be removed + + String + + String + + + + + + PassThru + + + + SwitchParameter + + SwitchParameter + + + + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + AzureStorageContext + + + + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + SwitchParameter + + + + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + SwitchParameter + + + + + + Share + + The file share object + + CloudFileShare + + CloudFileShare + + + + + + Directory + + + + CloudFileDirectory + + CloudFileDirectory + + + + + + File + + The file object to remove + + CloudFile + + CloudFile + + + + + + ClientRequestId + + + + string + + string + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> Remove-AzureStorageFile –ShareName sample –FilePath samplefile + + This example removes the samplefile file from the sample file share. + + + + + + + + + + + Get-AzureStorageFile + + + + + + + + Remove-AzureStorageQueue + + Remove the specified azure storage queue + + + + + Remove + AzureStorageQueue + + + + + Remove the specified azure storage queue + + + + Remove-AzureStorageQueue + + Name + + Queue name + + String + + + Force + + Force to remove the queue without confirmation + + SwitchParameter + + + PassThru + + Output a bool value in order to indicate whether the specified queue is remove successfully. + + SwitchParameter + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + WhatIf + + + + SwitchParameter + + + Confirm + + + + SwitchParameter + + + + + + Name + + Queue name + + String + + String + + + + + + Force + + Force to remove the queue without confirmation + + SwitchParameter + + SwitchParameter + + + + + + PassThru + + Output a bool value in order to indicate whether the specified queue is remove successfully. + + SwitchParameter + + SwitchParameter + + + + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + AzureStorageContext + + + + + + WhatIf + + + + SwitchParameter + + SwitchParameter + + + + + + Confirm + + + + SwitchParameter + + SwitchParameter + + + + + + ServerTimeoutPerRequest + + Server side time out for each request. + + int32 + + int32 + + + + + + ClientTimeoutPerRequest + + Client side time out for each request. + + int32 + + int32 + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Remove azure storage queue by queue name -------------------------- + + + + PS C:\> Remove-AzureStorageQueue queueabc + + + + + + + + + + + -------------------------- Remove azure storage queue using GetAzureStorageQueue -------------------------- + + + + PS C:\> Get-AzureStorageQueue queue* | Remove-AzureStorageQueue + + + + + + + + + + + + + + + + + Remove-AzureStorageShare + + Remove an azure storage file share. + + + + + Remove + AzureStorageShare + + + + + Remove an azure storage file share. + + + + Remove-AzureStorageShare + + Name + + The file share name + + String + + + PassThru + + + + SwitchParameter + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + Remove-AzureStorageShare + + Share + + The file share object + + CloudFileShare + + + PassThru + + + + SwitchParameter + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + Remove-AzureStorageShare + + PassThru + + + + SwitchParameter + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + Remove-AzureStorageShare + + PassThru + + + + SwitchParameter + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + + + + + Name + + The file share name + + String + + String + + + + + + PassThru + + + + SwitchParameter + + SwitchParameter + + + + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + AzureStorageContext + + + + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + SwitchParameter + + + + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + SwitchParameter + + + + + + Share + + The file share object + + CloudFileShare + + CloudFileShare + + + + + + ClientRequestId + + + + string + + string + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> Remove-AzureStorageShare -Name sample + + This example removes a file share named sample. + + + + + + + + + + + New-AzureStorageShare + + + + Get-AzureStorageShare + + + + + + + + Remove-AzureStorageTable + + Remove azure storage table + + + + + Remove + AzureStorageTable + + + + + Remove azure storage table + + + + Remove-AzureStorageTable + + Name + + + + String + + + Force + + Force to remove the table without confirmation + + SwitchParameter + + + PassThru + + Output a bool value in order to indicate whether the specified table is remove successfully. + + SwitchParameter + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + WhatIf + + + + SwitchParameter + + + Confirm + + + + SwitchParameter + + + + + + Name + + + + String + + String + + + + + + Force + + Force to remove the table without confirmation + + SwitchParameter + + SwitchParameter + + + + + + PassThru + + Output a bool value in order to indicate whether the specified table is remove successfully. + + SwitchParameter + + SwitchParameter + + + + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + AzureStorageContext + + + + + + WhatIf + + + + SwitchParameter + + SwitchParameter + + + + + + Confirm + + + + SwitchParameter + + SwitchParameter + + + + + + ServerTimeoutPerRequest + + Server side time out for each request. + + int32 + + int32 + + + + + + ClientTimeoutPerRequest + + Client side time out for each request. + + int32 + + int32 + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Remove azure storage table by table name -------------------------- + + + + PS C:\> Remove-AzureStorageTable tableabc + + + + + + + + + + + -------------------------- Remove azure storage tables using GetAzureStorageTable -------------------------- + + + + PS C:\> Get-AzureStorageTable table* | Remove-AzureStorageTable + + + + + + + + + + + + + + + + + Set-AzureStorageBlobContent + + Upload local file to azure storage blob. + + + + + Set + AzureStorageBlobContent + + + + + Upload local file to azure storage blob. + + + + Set-AzureStorageBlobContent + + File + + Local file path. + + String + + + Container + + Container name + + String + + + Blob + + Blob name. + + String + + + BlobType + + Destination Blob Type (Block/Page). + + String + + + Properties + + Blob properties. + + Hashtable + + + Metadata + + Blob metadata. + + Hashtable + + + Force + + Force to overwrite the existing blob. + + SwitchParameter + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + The total amount of concurrent async tasks. + + Nullable`1[Int32] + + + + Set-AzureStorageBlobContent + + File + + Local file path. + + String + + + Blob + + Blob name. + + String + + + CloudBlobContainer + + CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet. + + CloudBlobContainer + + + BlobType + + Destination Blob Type (Block/Page). + + String + + + Properties + + Blob properties. + + Hashtable + + + Metadata + + Blob metadata. + + Hashtable + + + Force + + Force to overwrite the existing blob. + + SwitchParameter + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + The total amount of concurrent async tasks. + + Nullable`1[Int32] + + + + Set-AzureStorageBlobContent + + File + + Local file path. + + String + + + ICloudBlob + + ICloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet. + + ICloudBlob + + + BlobType + + Destination Blob Type (Block/Page). + + String + + + Properties + + Blob properties. + + Hashtable + + + Metadata + + Blob metadata. + + Hashtable + + + Force + + Force to overwrite the existing blob. + + SwitchParameter + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + The total amount of concurrent async tasks. + + Nullable`1[Int32] + + + + + + File + + Local file path. + + String + + String + + + + + + Container + + Container name + + String + + String + + + + + + Blob + + Blob name. + + String + + String + + + + + + BlobType + + Destination Blob Type (Block/Page). + + String + + String + + + + + + Properties + + Blob properties. + + Hashtable + + Hashtable + + + + + + Metadata + + Blob metadata. + + Hashtable + + Hashtable + + + + + + Force + + Force to overwrite the existing blob. + + SwitchParameter + + SwitchParameter + + + + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + AzureStorageContext + + + + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ConcurrentTaskCount + + The total amount of concurrent async tasks. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + ProcessorCount * 8 + + + CloudBlobContainer + + CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet. + + CloudBlobContainer + + CloudBlobContainer + + + + + + ICloudBlob + + ICloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet. + + ICloudBlob + + ICloudBlob + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Upload file by name. -------------------------- + + + + PS C:\> Set-AzureStorageBlobContent -Container upload -File .\filename -Blob blobname + + + + + + + + + + + -------------------------- Upload file using ls command. -------------------------- + + + + PS C:\> ls -File -Recurse | Set-AzureStorageBlobContent -Container upload + + + + + + + + + + + -------------------------- Upload file using pipeline from GetAzureStorageBlob -------------------------- + + + + PS C:\> Get-AzureStorageBlob -Container containername -Blob blobname | Set-AzureStorageBlobContent -File filename + + + + + + + + + + + -------------------------- Upload file using pipeline from GetAzureStorageContainer -------------------------- + + + + PS C:\> Get-AzureStorageContainer -Container container* | Set-AzureStorageBlobContent -File filename -Blob blobname + + + + + + + + + + + -------------------------- Upload file and set metadata -------------------------- + + + + PS C:\> $meta = @{"key" = "value"; "name" = "test"} +Set-AzureStorageBlobContent -File filename -Container containername -Metadata $meta + + + + + + + + + + + + + Get-AzureStorageBlobContent + + + + Get-AzureStorageBlob + + + + Remove-AzureStorageBlob + + + + + + + + Set-AzureStorageContainerAcl + + Set the public access permission to the specified azure storage container. + + + + + Set + AzureStorageContainerAcl + + + + + Set the public access permission to the specified azure storage container. + + + + Set-AzureStorageContainerAcl + + Name + + Container name. + + String + + + Permission + + Container public access permission (Off/Blob/Container). + + BlobContainerPublicAccessType + + + PassThru + + Output the sepcified container. + + SwitchParameter + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + + + + Name + + Container name. + + String + + String + + + + + + Permission + + Container public access permission (Off/Blob/Container). + + BlobContainerPublicAccessType + + BlobContainerPublicAccessType + + + + + + PassThru + + Output the sepcified container. + + SwitchParameter + + SwitchParameter + + + + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + AzureStorageContext + + + + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Set azure storage container acl by name. -------------------------- + + + + PS C:\> Set-AzureStorageContainerAcl -Container container1 -Permission off -PassThru + + + + + + + + + + + -------------------------- Set azure storage container acl using pipeline by GetAzureStorageContainer -------------------------- + + + + PS C:\> Get-AzureStorageContainer container* | Set-AzureStorageContainerAcl -Permission blob -PassThru + + + + + + + + + + + + + Get-AzureStorageContainerAcl + + + + Get-AzureStorageContainer + + + + New-AzureStorageContainer + + + + Remove-AzureStorageContainer + + + + + + + + Set-AzureStorageFileContent + + Upload the specified file to azure. + + + + + Set + AzureStorageFileContent + + + + + Upload the specified file to azure. + + + + Set-AzureStorageFileContent + + ShareName + + The file share name + + String + + + Source + + The source path of the file to upload + + String + + + Path + + The destination file path to upload the local file + + String + + + PassThru + + + + SwitchParameter + + + Force + + If this parameter is set, it will overwrite the azure storage file when there is name conflict. + + SwitchParameter + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + WhatIf + + + + SwitchParameter + + + Confirm + + + + SwitchParameter + + + + Set-AzureStorageFileContent + + Share + + The file share object + + CloudFileShare + + + Source + + The source path of the file to upload + + String + + + Path + + The destination file path to upload the local file + + String + + + PassThru + + + + SwitchParameter + + + Force + + If this parameter is set, it will overwrite the azure storage file when there is name conflict. + + SwitchParameter + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + WhatIf + + + + SwitchParameter + + + Confirm + + + + SwitchParameter + + + + Set-AzureStorageFileContent + + Directory + + The destination directory object to upload the file + + CloudFileDirectory + + + Source + + The source path of the file to upload + + String + + + Path + + The destination file path to upload the local file + + String + + + PassThru + + + + SwitchParameter + + + Force + + If this parameter is set, it will overwrite the azure storage file when there is name conflict. + + SwitchParameter + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + WhatIf + + + + SwitchParameter + + + Confirm + + + + SwitchParameter + + + + Set-AzureStorageFileContent + + Source + + The source path of the file to upload + + String + + + Path + + The destination file path to upload the local file + + String + + + PassThru + + + + SwitchParameter + + + Force + + If this parameter is set, it will overwrite the azure storage file when there is name conflict. + + SwitchParameter + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + WhatIf + + + + SwitchParameter + + + Confirm + + + + SwitchParameter + + + + Set-AzureStorageFileContent + + Source + + The source path of the file to upload + + String + + + Path + + The destination file path to upload the local file + + String + + + PassThru + + + + SwitchParameter + + + Force + + If this parameter is set, it will overwrite the azure storage file when there is name conflict. + + SwitchParameter + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + WhatIf + + + + SwitchParameter + + + Confirm + + + + SwitchParameter + + + + + + ShareName + + The file share name + + String + + String + + + + + + Source + + The source path of the file to upload + + String + + String + + + + + + Path + + The destination file path to upload the local file + + String + + String + + + + + + PassThru + + + + SwitchParameter + + SwitchParameter + + + + + + Force + + If this parameter is set, it will overwrite the azure storage file when there is name conflict. + + SwitchParameter + + SwitchParameter + + + + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + AzureStorageContext + + + + + + ServerTimeoutPerRequest + + Server side timeout value for the request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ClientTimeoutPerRequest + + Client side timeout value for the request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + WhatIf + + + + SwitchParameter + + SwitchParameter + + + + + + Confirm + + + + SwitchParameter + + SwitchParameter + + + + + + Share + + The file share object + + CloudFileShare + + CloudFileShare + + + + + + Directory + + The destination directory object to upload the file + + CloudFileDirectory + + CloudFileDirectory + + + + + + ClientRequestId + + + + string + + string + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + + + + PS C:\> Set-AzureStorageFileContent –ShareName sample –Source samplefile –FilePath sampledir/samplefile + + This example uploads the samplefile file to the path sampledir/samplefile in the sample file share. + + + + + + + + + + + Remove-AzureStorageFileDirectory + + + + New-AzureStorageFileDirectory + + + + Get-AzureStorageFileContent + + + + Set-AzureStorageFileContent + + + + + + + + Set-AzureStorageServiceLoggingProperty + + Set azure storage service logging properties。 + + + + + Set + AzureStorageServiceLoggingProperty + + + + + Set azure storage service logging properties。 + + + + Set-AzureStorageServiceLoggingProperty + + ServiceType + + Azure storage service type. + + StorageServiceType + + + Version + + Azure storage service logging version. + + Nullable`1[Double] + + + RetentionDays + + Azure storage logging retention days. + + Nullable`1[Int32] + + + LoggingOperations + + Azure storage service logging operations. + + LoggingOperations[] + + + PassThru + + Ouput the updated azure storage service logging properties. + + SwitchParameter + + + Context + + Azure storage context. + + AzureStorageContext + + + + + + ServiceType + + Azure storage service type. + + StorageServiceType + + StorageServiceType + + + + + + Version + + Azure storage service logging version. + + Nullable`1[Double] + + Nullable`1[Double] + + + + + + RetentionDays + + Azure storage logging retention days. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + LoggingOperations + + Azure storage service logging operations. + + LoggingOperations[] + + LoggingOperations[] + + + + + + PassThru + + Ouput the updated azure storage service logging properties. + + SwitchParameter + + SwitchParameter + + + + + + Context + + Azure storage context. + + AzureStorageContext + + AzureStorageContext + + + + + + ServerTimeoutPerRequest + + Server side time out for each request. + + int32 + + int32 + + + + + + ClientTimeoutPerRequest + + Client side time out for each request. + + int32 + + int32 + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Set logging properties for azure storage blob service. -------------------------- + + + + PS C:\> Set-AzureStorageServiceLoggingProperty -ServiceType Blob -LoggingOperations Read,Write -RetentionDays 10 -Version 1.0 -PassThru + + + + + + + + + + + + + + + + + Set-AzureStorageServiceMetricsProperty + + Set azure storage service metrics properties. + + + + + Set + AzureStorageServiceMetricsProperty + + + + + Set azure storage service metrics properties. + + + + Set-AzureStorageServiceMetricsProperty + + ServiceType + + Azure storage service type. + + StorageServiceType + + + MetricsType + + Azure Storage service metrics type. + + ServiceMetricsType + + + Version + + Azure storage service metrics version. + + Nullable`1[Double] + + + RetentionDays + + Azure storage service metrics retention days. + + Nullable`1[Int32] + + + MetricsLevel + + Azure storage service metrics level. + + Nullable`1[MetricsLevel] + + + PassThru + + Output the updated azure storage service metrics properties. + + SwitchParameter + + + Context + + Azure storage context. + + AzureStorageContext + + + + + + ServiceType + + Azure storage service type. + + StorageServiceType + + StorageServiceType + + + + + + MetricsType + + Azure Storage service metrics type. + + ServiceMetricsType + + ServiceMetricsType + + + + + + Version + + Azure storage service metrics version. + + Nullable`1[Double] + + Nullable`1[Double] + + + + + + RetentionDays + + Azure storage service metrics retention days. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + MetricsLevel + + Azure storage service metrics level. + + Nullable`1[MetricsLevel] + + Nullable`1[MetricsLevel] + + + + + + PassThru + + Output the updated azure storage service metrics properties. + + SwitchParameter + + SwitchParameter + + + + + + Context + + Azure storage context. + + AzureStorageContext + + AzureStorageContext + + + + + + ServerTimeoutPerRequest + + Server side time out for each request. + + int32 + + int32 + + + + + + ClientTimeoutPerRequest + + Client side time out for each request. + + int32 + + int32 + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Set metrics properties for azure storage blob service. -------------------------- + + + + PS C:\> Set-AzureStorageServiceMetricsProperty -ServiceType Blob -MetricsType Hour -MetricsLevel Service -RetentionDays 10 -Version 1.0 -PassThru + + + + + + + + + + + + + + + + + Start-AzureStorageBlobCopy + + Start a copy operation to the specified destination blob. + + + + + Start + AzureStorageBlobCopy + + + + + Start a copy operation to the specified destination blob. + + + + Start-AzureStorageBlobCopy + + SrcBlob + + Source blob name. + + String + + + SrcContainer + + Source container name. + + String + + + DestContainer + + Destination container name. + + String + + + DestBlob + + Destination blob name. + + String + + + Context + + + + AzureStorageContext + + + DestContext + + Destination Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + Force + + Force to overwrite the destination blob without confirmation. + + SwitchParameter + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + + Start-AzureStorageBlobCopy + + ICloudBlob + + ICloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet. + + ICloudBlob + + + DestICloudBlob + + Destination ICloudBlob object + + ICloudBlob + + + Context + + + + AzureStorageContext + + + DestContext + + Destination Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + Force + + Force to overwrite the destination blob without confirmation. + + SwitchParameter + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + + Start-AzureStorageBlobCopy + + ICloudBlob + + ICloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet. + + ICloudBlob + + + DestContainer + + Destination container name. + + String + + + DestBlob + + Destination blob name. + + String + + + Context + + + + AzureStorageContext + + + DestContext + + Destination Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + Force + + Force to overwrite the destination blob without confirmation. + + SwitchParameter + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + + Start-AzureStorageBlobCopy + + CloudBlobContainer + + CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet. + + CloudBlobContainer + + + SrcBlob + + Source blob name. + + String + + + DestContainer + + Destination container name. + + String + + + DestBlob + + Destination blob name. + + String + + + Context + + + + AzureStorageContext + + + DestContext + + Destination Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + Force + + Force to overwrite the destination blob without confirmation. + + SwitchParameter + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + + Start-AzureStorageBlobCopy + + AbsoluteUri + + + + String + + + DestContainer + + Destination container name. + + String + + + DestBlob + + Destination blob name. + + String + + + Context + + + + AzureStorageContext + + + DestContext + + Destination Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + Force + + Force to overwrite the destination blob without confirmation. + + SwitchParameter + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + + + + SrcBlob + + Source blob name. + + String + + String + + + + + + SrcContainer + + Source container name. + + String + + String + + + + + + DestContainer + + Destination container name. + + String + + String + + + + + + DestBlob + + Destination blob name. + + String + + String + + + + + + Context + + + + AzureStorageContext + + AzureStorageContext + + + + + + DestContext + + Destination Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + AzureStorageContext + + + + + + Force + + Force to overwrite the destination blob without confirmation. + + SwitchParameter + + SwitchParameter + + + + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ICloudBlob + + ICloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet. + + ICloudBlob + + ICloudBlob + + + + + + DestICloudBlob + + Destination ICloudBlob object + + ICloudBlob + + ICloudBlob + + + + + + CloudBlobContainer + + CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet. + + CloudBlobContainer + + CloudBlobContainer + + + + + + AbsoluteUri + + + + String + + String + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Start copy operation by name. -------------------------- + + + + PS C:\> Start-CopyAzureStorageContainer -SrcContainer container1 -SrcBlob blob1 -DestContainer container2 + + + + + + + + + + + -------------------------- Start copy operation using container pipeline from GetAzureStorageContainer. -------------------------- + + + + PS C:\> Get-AzureStorageContainer -Container container1 | Start-AzureStorageBlobCopy -SrcBlob blob -DestContainer container2 + + + + + + + + + + + -------------------------- StartCopy to specified blob using pipeline from GetAzureStorageBlob -------------------------- + + + + PS C:\> Get-AzureStorageBlob -Container container1 | Start-AzureStorageBlobCopy -DestContainer container2 + + + + + + + + + + + -------------------------- start copy operation to ICloudBlob object -------------------------- + + + + PS C:\> $srcBlob = Get-AzureStorageBlob -Container container1 -Blob srcBlob +$destBlob = Get-AzureStorageBlob -Container container2 -Blob destBlob + +Start-AzureStorageBlobCopy -ICloudBlob $srcBlob.ICloudBlob -DestICloudBlob $destBlob.ICloudBlob + + + + + + + + + + + -------------------------- Start copy operation using source uri -------------------------- + + + + PS C:\> $context = New-AzureStorageContainer -StorageAccountName accountname -StorageAccountKey accountkey + +Start-AzureStorageBlobCopy -SrcUri http://www.somesite.com/somefile -DestContainer container -DestBlob blob -DestContext $context + + + + + + + + + + + + + Get-AzureStorageBlobCopyState + + + + Stop-AzureStorageBlobCopy + + + + + + + + Stop-AzureStorageBlobCopy + + Stop a copy operation to the specified destination blob. + + + + + Stop + AzureStorageBlobCopy + + + + + Stop a copy operation to the specified destination blob. + + + + Stop-AzureStorageBlobCopy + + Blob + + Blob name. + + String + + + Container + + Container name. + + String + + + Force + + Force to stop the current copy task on the specified blob + + SwitchParameter + + + CopyId + + Copy Id + + String + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + + Stop-AzureStorageBlobCopy + + ICloudBlob + + ICloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet. + + ICloudBlob + + + Force + + Force to stop the current copy task on the specified blob + + SwitchParameter + + + CopyId + + Copy Id + + String + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + + Stop-AzureStorageBlobCopy + + CloudBlobContainer + + CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet. + + CloudBlobContainer + + + Blob + + Blob name. + + String + + + Force + + Force to stop the current copy task on the specified blob + + SwitchParameter + + + CopyId + + Copy Id + + String + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + + + + + Blob + + Blob name. + + String + + String + + + + + + Container + + Container name. + + String + + String + + + + + + Force + + Force to stop the current copy task on the specified blob + + SwitchParameter + + SwitchParameter + + + + + + CopyId + + Copy Id + + String + + String + + + + + + Context + + Azure Storage Context. You can create it by New-AzureStorageContext cmdlet. + + AzureStorageContext + + AzureStorageContext + + + + + + ServerTimeoutPerRequest + + Server side time out for each request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ClientTimeoutPerRequest + + Client side time out for each request. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ConcurrentTaskCount + + + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + ICloudBlob + + ICloudBlob object from Azure Storage Client library. You can create it or use Get-AzureStorageBlob cmdlet. + + ICloudBlob + + ICloudBlob + + + + + + CloudBlobContainer + + CloudBlobContainer object from Azure Storage Client library. You can create it or use Get-AzureStorageContainer cmdlet. + + CloudBlobContainer + + CloudBlobContainer + + + + + + PipelineVariable + + + + string + + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Stop copy operation by name -------------------------- + + + + PS C:\> Stop-AzureStorageBlobCopy -Container containername -Blob blobname -CopyId copyid + + + + + + + + + + + -------------------------- Stop copy operation using container pipeline from GetAzureStorageContainer. -------------------------- + + + + PS C:\> Get-AzureStorageContainer container* | Stop-AzureStorageBlobCopy -Blob blobname + + + + + + + + + + + -------------------------- Stop copy operation using container pipeline from GetAzureStorageBlob. -------------------------- + + + + PS C:\> Get-AzureStorageBlob -Container containername | Stop-AzureStorageBlobCopy -Force + + + + + + + + + + + + + Start-AzureStorageBlobCopyCopyState + + + + Get-AzureStorageBlobCopyState + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.format.ps1xml b/src/ServiceManagement/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.format.ps1xml new file mode 100644 index 000000000000..4538a789183f --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.format.ps1xml @@ -0,0 +1,632 @@ + + + + + Microsoft.WindowsAzure.Storage.File.CloudFileShare + + Microsoft.WindowsAzure.Storage.File.CloudFileShare + + + $_.ServiceClient.BaseUri + + + + + + + 63 + Left + + + + Left + + + + + + + $_.Name + + + $_.Properties.LastModified + + + + + + + + Microsoft.WindowsAzure.Storage.File.CloudFileItems + + Microsoft.WindowsAzure.Storage.File.CloudFile + Microsoft.WindowsAzure.Storage.File.CloudFileDirectory + + + $_.Parent.Uri + + + + + + + 10 + Left + + + + 15 + Right + + + + Left + + + + + + + $_.DirectoryTag + + + $_.Length + + + $_.Name + + + + + + + + Microsoft.WindowsAzure.Storage.Blob.CloudBlobContainer + + Microsoft.WindowsAzure.Storage.Blob.CloudBlobContainer + + + $_.ServiceClient.BaseUri + + + + + + + 20 + Left + + + + 60 + Left + + + + Left + + + + + + + $_.Name + + + $_.Uri + + + $_.Properties.LastModified + + + + + + + + Microsoft.WindowsAzure.Storage.Blob.ICloudBlob + + Microsoft.WindowsAzure.Storage.Blob.ICloudBlob + Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob + Microsoft.WindowsAzure.Storage.Blob.CloudPageBlob + + + $_.Container.Uri + + + + + + + 20 + Left + + + + 15 + Left + + + + Left + + + + 30 + Left + + + + 30 + Left + + + + 30 + Left + + + + + + + $_.Name + + + $_.BlobType + + + $_.Properties.Length + + + $_.Properties.ContentType + + + $_.Properties.LastModified + + + $_.SnapshotTime + + + + + + + + Microsoft.WindowsAzure.Storage.Table.CloudTable + + Microsoft.WindowsAzure.Storage.Table.CloudTable + + + $_.ServiceClient.BaseUri + + + + + + + 40 + Left + + + + 40 + Left + + + + + + + $_.Name + + + $_.Uri + + + + + + + + Microsoft.WindowsAzure.Storage.Queue.CloudQueue + + Microsoft.WindowsAzure.Storage.Queue.CloudQueue + + + $_.ServiceClient.BaseUri + + + + + + + 30 + Left + + + + 20 + Left + + + + 20 + Left + + + + 40 + Left + + + + + + + $_.Name + + + $_.EncodeMessage + + + + if (!$_.ApproximateMessageCount) + { + ""; + } + else + { + $_.ApproximateMessageCount + } + + + + $_.Uri + + + + + + + + Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel.AzureStorageContainer + + Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel.AzureStorageContainer + + + $_.CloudBlobContainer.ServiceClient.BaseUri + + + + + + + Left + + + + Left + 20 + + + + Left + + + + + + + $_.Name + + + $_.PublicAccess + + + $_.LastModified + + + + + + + + Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel.AzureStorageBlob + + Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel.AzureStorageBlob + + + $_.ICloudBlob.Container.Uri + + + + + + + Left + + + + Left + 10 + + + + Left + + + + Left + + + + Left + + + + Left + + + + + + + $_.Name + + + $_.BlobType + + + $_.Length + + + $_.ContentType + + + $_.LastModified + + + $_.SnapshotTime + + + + + + + + Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel.AzureStorageQueue + + Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel.AzureStorageQueue + + + $_.CloudQueue.ServiceClient.BaseUri + + + + + + + Left + + + + Left + + + + Left + + + + Left + + + + + + + $_.Name + + + $_.Uri + + + $_.ApproximateMessageCount + + + $_.EncodeMessage + + + + + + + + Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel.AzureStorageTable + + Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel.AzureStorageTable + + + $_.CloudTable.ServiceClient.BaseUri + + + + + + + Left + + + + Left + + + + + + + $_.Name + + + $_.Uri + + + + + + + + Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel.AzureStorageContext + + Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel.AzureStorageContext + + + + + + + + StorageAccountName + + + + BlobEndPoint + + + + TableEndPoint + + + + QueueEndPoint + + + + + + + + Microsoft.WindowsAzure.Storage.Shared.Protocol.ServiceProperties + + Microsoft.WindowsAzure.Storage.Shared.Protocol.ServiceProperties + + + + + + + + $_.Logging.Version + + + + $_.Logging.LoggingOperations + + + + $_.Logging.RetentionDays + + + + $_.Metrics.Version + + + + $_.Metrics.MetricsLevel + + + + $_.Metrics.RetentionDays + + + + DefaultServiceVersion + + + + + + + + Microsoft.WindowsAzure.Storage.Shared.Protocol.LoggingProperties + + Microsoft.WindowsAzure.Storage.Shared.Protocol.LoggingProperties + + + + + + Left + 20 + + + + Left + 30 + + + + Left + 20 + + + + + + + $_.Version + + + $_.LoggingOperations + + + $_.RetentionDays + + + + + + + + Microsoft.WindowsAzure.Storage.Shared.Protocol.MetricsProperties + + Microsoft.WindowsAzure.Storage.Shared.Protocol.MetricsProperties + + + + + + Left + 20 + + + + Left + 30 + + + + Left + 20 + + + + + + + $_.Version + + + $_.MetricsLevel + + + $_.RetentionDays + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.types.ps1xml b/src/ServiceManagement/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.types.ps1xml new file mode 100644 index 000000000000..1dd5bcef916a --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.types.ps1xml @@ -0,0 +1,37 @@ + + + + Microsoft.WindowsAzure.Storage.File.CloudFile + + + DirectoryTag + [string]::Empty + + + IsDirectory + $false + + + Length + $_.Properties.Length + + + + + Microsoft.WindowsAzure.Storage.File.CloudFileDirectory + + + DirectoryTag + "DIR" + + + IsDirectory + $true + + + Length + [string]::Empty + + + + \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageBlobManagement.cs b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageBlobManagement.cs new file mode 100644 index 000000000000..8ff148bd51e9 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageBlobManagement.cs @@ -0,0 +1,368 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Blob; +using Microsoft.WindowsAzure.Storage.Shared.Protocol; + +namespace Microsoft.WindowsAzure.Commands.Storage.Model.Contract +{ + /// + /// Blob management interface + /// + public interface IStorageBlobManagement : IStorageManagement + { + /// + /// Get a list of cloudblobcontainer in azure + /// + /// Container prefix + /// Container listing details + /// Blob request option + /// Operation context + /// An enumerable collection of cloudblobcontainer + IEnumerable ListContainers(string prefix, ContainerListingDetails detailsIncluded, BlobRequestOptions options, OperationContext OperationContext); + + /// + /// Get a list of cloudblobcontainer in azure + /// + /// Container prefix + /// Container listing details + /// Blob request option + /// Operation context + /// An enumerable collection of cloudblobcontainer + ContainerResultSegment ListContainersSegmented(string prefix, ContainerListingDetails detailsIncluded, int? maxResults, BlobContinuationToken continuationToken, BlobRequestOptions options, OperationContext operationContext); + + /// + /// Get container presssions + /// + /// A cloudblobcontainer object + /// Access condition + /// Blob request option + /// Operation context + /// The container's permission + BlobContainerPermissions GetContainerPermissions(CloudBlobContainer container, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext); + + /// + /// Set container permissions + /// + /// A cloudblobcontainer object + /// The container's permission + /// Access condition + /// Blob request option + /// Operation context + void SetContainerPermissions(CloudBlobContainer container, BlobContainerPermissions permissions, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext); + + /// + /// Get an CloudBlobContainer instance in local + /// + /// Container name + /// A CloudBlobContainer in local memory + CloudBlobContainer GetContainerReference(String name); + + /// + /// Get blob reference with properties and meta data from server + /// + /// A cloudblobcontainer object + /// Blob name + /// Access condition + /// Blob request options + /// Operation context + /// Return an ICloudBlob if the specific blob exists on azure, otherwise return null + ICloudBlob GetBlobReferenceFromServer(CloudBlobContainer container, string blobName, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext); + + /// + /// Whether the container is exists or not + /// + /// A cloudblobcontainer object + /// Blob request option + /// Operation context + /// True if the specific container exists, otherwise return false + bool DoesContainerExist(CloudBlobContainer container, BlobRequestOptions options, OperationContext OperationContext); + + /// + /// Whether the blob is exists or not + /// + /// A icloudblob object + /// Blob request option + /// Operation context + /// True if the specific blob exists, otherwise return false + bool DoesBlobExist(ICloudBlob blob, BlobRequestOptions options, OperationContext OperationContext); + + /// + /// Create the container if not exists + /// + /// A cloudblobcontainer object + /// Blob request option + /// Operation context + /// True if the container did not already exist and was created; otherwise false. + bool CreateContainerIfNotExists(CloudBlobContainer container, BlobRequestOptions requestOptions, OperationContext OperationContext); + + /// + /// Delete container + /// + /// A cloudblobcontainer object + /// Access condition + /// Blob request option + /// Operation context + void DeleteContainer(CloudBlobContainer container, AccessCondition accessCondition, BlobRequestOptions options, OperationContext OperationContext); + + /// + /// List all blobs in specified containers + /// + /// A cloudblobcontainer object + /// Blob prefix + /// Use flat blob listing(whether treat "container/" as directory) + /// Blob listing details + /// Blob request option + /// Operation context + /// An enumerable collection of icloudblob + IEnumerable ListBlobs(CloudBlobContainer container, string prefix, bool useFlatBlobListing, BlobListingDetails blobListingDetails, BlobRequestOptions options, OperationContext operationContext); + + /// + /// Delete azure blob + /// + /// ICloudblob object + /// Delete snapshots option + /// Access condition + /// Operation context + /// An enumerable collection of icloudblob + void DeleteICloudBlob(ICloudBlob blob, DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext); + + /// + /// Fetch container attributes + /// + /// CloudBlobContainer object + /// Access condition + /// Blob request options + /// An object that represents the context for the current operation. + void FetchContainerAttributes(CloudBlobContainer container, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext); + + /// + /// Fetch blob attributes + /// + /// Access condition + /// Blob request options + /// An object that represents the context for the current operation. + void FetchBlobAttributes(ICloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext); + + /// + /// Set blob properties + /// + /// ICloud blob object + /// Access condition + /// Blob request options + /// An object that represents the context for the current operation. + void SetBlobProperties(ICloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext); + + /// + /// Set blob meta data + /// + /// ICloud blob object + /// Access condition + /// Blob request options + /// An object that represents the context for the current operation. + void SetBlobMetadata(ICloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext); + + /// + /// Abort copy operation on specified blob + /// + /// ICloudBlob object + /// Copy id + /// Access condition + /// Blob request options + /// Operation context + void AbortCopy(ICloudBlob blob, string copyId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext); + + /// + /// Get the service properties + /// + /// Cloud storage account + /// Service type + /// Request options + /// Operation context + /// The service properties of the specified service type + ServiceProperties GetStorageServiceProperties(StorageServiceType type, IRequestOptions options, OperationContext operationContext); + + /// + /// Set service properties + /// + /// Service type + /// Service properties + /// Request options + /// Operation context + void SetStorageServiceProperties(StorageServiceType type, ServiceProperties properties, IRequestOptions options, OperationContext operationContext); + + /// + /// Async get container presssions + /// + /// A cloudblobcontainer object + /// Access condition + /// Blob request option + /// Operation context + /// User cancellation token + /// A task object which retrieve the permission of the specified container + Task GetContainerPermissionsAsync(CloudBlobContainer container, AccessCondition accessCondition, + BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken); + + /// + /// Return a task that asynchronously check whether the specified container exists. + /// + /// CloudBlobContainer object + /// Blob request option + /// Operation context + /// Cancellation token + /// A task object that asynchronously check whether the specified container exists + Task DoesContainerExistAsync(CloudBlobContainer container, BlobRequestOptions requestOptions, OperationContext operationContext, CancellationToken cmdletCancellationToken); + + /// + /// Return a task that asynchronously check whether the specified blob exists. + /// + /// ICloudBlob object + /// Blob request options + /// Operation context + /// Cancellation token + /// A task object that asynchronously check whether the specified blob exists. + Task DoesBlobExistAsync(ICloudBlob blob, BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken); + + /// + /// Return a task that asynchronously get the blob reference from server + /// + /// CloudBlobContainer object + /// Blob name + /// Access condition + /// Blob request options + /// Operation context + /// Cancellation token + /// A task object that asynchronously get the blob reference from server + Task GetBlobReferenceFromServerAsync(CloudBlobContainer container, string blobName, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken); + + /// + /// Return a task that asynchronously fetch blob attributes + /// + /// ICloud blob object + /// Access condition + /// Blob request options + /// Operation context + /// Cancellation token + /// Return a task that asynchronously fetch blob attributes + Task FetchBlobAttributesAsync(ICloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken); + + /// + /// Return a task that asynchronously create a container if it doesn't exist. + /// + /// CloudBlobContainer object + /// Blob container public access type + /// Blob request options + /// Operation context + /// Cancellation token + /// Return a task that asynchronously create a container if it doesn't exist. + Task CreateContainerIfNotExistsAsync(CloudBlobContainer container, BlobContainerPublicAccessType accessType, BlobRequestOptions requestOptions, OperationContext operationContext, CancellationToken cmdletCancellationToken); + + /// + /// Return a task that asynchronously delete the specified container. + /// + /// CloudBlobContainer object + /// Access condition + /// Blob request option + /// Operation context + /// Cancellation token + /// Return a task that asynchronously delete the specified container. + Task DeleteContainerAsync(CloudBlobContainer container, AccessCondition accessCondition, BlobRequestOptions requestOptions, OperationContext operationContext, CancellationToken cmdletCancellationToken); + + /// + /// Return a task that asynchronously abort the blob copy operation + /// + /// ICloudBlob object + /// Copy id + /// Access condition + /// Blob request options + /// Operation context + /// Cancellation token + /// Return a task that asynchronously abort the blob copy operation + Task AbortCopyAsync(ICloudBlob blob, string copyId, AccessCondition accessCondition, BlobRequestOptions requestOption, OperationContext operationContext, CancellationToken cmdletCancellationToken); + + /// + /// Return a task that asynchronously set the container permission + /// + /// CloudBlobContainer object + /// Container permission + /// Access condition + /// Blob request option + /// Operation context + /// cancellation token + /// Return a task that asynchronously set the container permission + Task SetContainerPermissionsAsync(CloudBlobContainer container, BlobContainerPermissions permissions, AccessCondition accessCondition, BlobRequestOptions requestOptions, OperationContext operationContext, CancellationToken cmdletCancellationToken); + + /// + /// Return a task that asynchronously delete the specified blob + /// + /// ICloudBlob object + /// Snapshot delete option + /// Access condition + /// Blob request option + /// Operation context + /// Cancellation token + /// Return a task that asynchronously delete the specified blob + Task DeleteICloudBlobAsync(ICloudBlob blob, DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions requestOptions, OperationContext operationContext, CancellationToken cmdletCancellationToken); + + /// + /// Return a task that asynchronously set blob properties + /// + /// ICloud blob object + /// Access condition + /// Blob request options + /// An object that represents the context for the current operation. + Task SetBlobPropertiesAsync(ICloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken); + + /// + /// Return a task that asynchronously set blob meta data + /// + /// ICloud blob object + /// Access condition + /// Blob request options + /// An object that represents the context for the current operation. + Task SetBlobMetadataAsync(ICloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken); + + /// + /// List the blobs segmented in specified containers + /// + /// A cloudblobcontainer object + /// Blob prefix + /// Use flat blob listing(whether treat "container/" as directory) + /// Blob listing details + /// Blob request option + /// Operation context + Task ListBlobsSegmentedAsync(CloudBlobContainer container, string prefix, bool useFlatBlobListing, BlobListingDetails blobListingDetails, int? maxResults, BlobContinuationToken currentToken, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken); + + /// + /// List part of blobs. + /// + /// Blob prefix + /// Use flat blob listing + /// Blob listing details. + /// Max results. + /// Current token. + /// Request options + /// Operation Context. + /// BlobResultSegment object + BlobResultSegment ListBlobsSegmented(CloudBlobContainer container, string prefix, bool useFlatBlobListing, + BlobListingDetails blobListingDetails, int? maxResults, BlobContinuationToken currentToken, + BlobRequestOptions options, OperationContext operationContext); + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageFileManagement.cs b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageFileManagement.cs new file mode 100644 index 000000000000..62ad0440bc29 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageFileManagement.cs @@ -0,0 +1,278 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.File; + +namespace Microsoft.WindowsAzure.Commands.Storage.Model.Contract +{ + /// + /// File management interface + /// + public interface IStorageFileManagement : IStorageManagement + { + /// + /// Returns a reference to a Microsoft.WindowsAzure.Storage.File.CloudFileShare + /// object with the specified name. + /// + /// A string containing the name of the share. + /// A reference to a share. + CloudFileShare GetShareReference(string shareName); + + /// + /// Enumerates the files and directories under a certain folder. + /// + /// Indicating the directory to be listed. + /// Indicating the action for enumerated items. + /// + /// An Microsoft.WindowsAzure.Storage.File.FileRequestOptions object that specifies + /// additional options for the request. + /// + /// + /// An Microsoft.WindowsAzure.Storage.OperationContext object that represents + /// the context for the current operation. + /// + /// Indicating the cancellation token. + /// + /// A System.Threading.Tasks.Task object that represents the current operation. + /// + Task EnumerateFilesAndDirectoriesAsync(CloudFileDirectory directory, Action enumerationAction, FileRequestOptions options, OperationContext operationContext, CancellationToken token); + + /// + /// Returns a task that performs an asynchronous operation to retrieve the share's + /// attributes. + /// + /// Indicating the share. + /// + /// An Microsoft.WindowsAzure.Storage.AccessCondition object that represents + /// the access conditions for the share. If null, no condition is used. + /// + /// + /// A Microsoft.WindowsAzure.Storage.File.FileRequestOptions object that specifies + /// additional options for the request. + /// + /// + /// An Microsoft.WindowsAzure.Storage.OperationContext object that represents + /// the context for the current operation. + /// + /// + /// A System.Threading.CancellationToken to observe while waiting for a task + /// to complete. + /// + /// + /// A System.Threading.Tasks.Task object that represents the current operation. + /// + Task FetchShareAttributesAsync(CloudFileShare share, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken token); + + /// + /// Enumerates the shares for a given prefix. + /// + /// Indicating the prefix. + /// + /// A value that indicates whether to return share metadata with the listing. + /// + /// Indicating the action for enumerated items. + /// + /// An Microsoft.WindowsAzure.Storage.File.FileRequestOptions object that specifies + /// additional options for the request. + /// + /// + /// An Microsoft.WindowsAzure.Storage.OperationContext object that represents + /// the context for the current operation. + /// + /// Indicating the cancellation token. + /// + /// A System.Threading.Tasks.Task object that represents the current operation. + /// + Task EnumerateSharesAsync(string prefix, ShareListingDetails detailsIncluded, Action enumerationAction, FileRequestOptions options, OperationContext operationContext, CancellationToken token); + + /// + /// Returns a task that performs an asynchronous operation to create a directory. + /// + /// + /// Indicating the reference of the directory to be created. + /// + /// + /// A Microsoft.WindowsAzure.Storage.File.FileRequestOptions object that specifies + /// additional options for the request. + /// + /// + /// An Microsoft.WindowsAzure.Storage.OperationContext object that represents + /// the context for the current operation. + /// + /// + /// A System.Threading.CancellationToken to observe while waiting for a task + /// to complete. + /// + /// + /// A System.Threading.Tasks.Task object that represents the current operation. + /// + Task CreateDirectoryAsync(CloudFileDirectory directory, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken); + + /// + /// Returns a task that performs an asynchronous operation to determine whether a + /// directory exists. + /// + /// + /// Indicating the reference of the directory. + /// + /// + /// A Microsoft.WindowsAzure.Storage.File.FileRequestOptions object that specifies + /// additional options for the request. + /// + /// + /// An Microsoft.WindowsAzure.Storage.OperationContext object that represents + /// the context for the current operation. + /// + /// + /// A System.Threading.CancellationToken to observe while waiting for a task + /// to complete. + /// + /// + /// A System.Threading.Tasks.Task object that represents the current operation. + /// + Task DirectoryExistsAsync(CloudFileDirectory directory, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken); + + /// + /// Returns a task that performs an asynchronous operation to determine whether a + /// file exists. + /// + /// + /// Indicating the reference of the file. + /// + /// + /// A Microsoft.WindowsAzure.Storage.File.FileRequestOptions object that specifies + /// additional options for the request. + /// + /// + /// An Microsoft.WindowsAzure.Storage.OperationContext object that represents + /// the context for the current operation. + /// + /// + /// A System.Threading.CancellationToken to observe while waiting for a task + /// to complete. + /// + /// + /// A System.Threading.Tasks.Task object that represents the current operation. + /// + Task FileExistsAsync(CloudFile file, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken); + + /// + /// Returns a task that performs an asynchronous operation to create a share. + /// + /// + /// Indicating the reference of the share to be created. + /// + /// + /// A Microsoft.WindowsAzure.Storage.File.FileRequestOptions object that specifies + /// additional options for the request. + /// + /// + /// An Microsoft.WindowsAzure.Storage.OperationContext object that represents + /// the context for the current operation. + /// + /// + /// A System.Threading.CancellationToken to observe while waiting for a task + /// to complete. + /// + /// + /// A System.Threading.Tasks.Task object that represents the current operation. + /// + Task CreateShareAsync(CloudFileShare share, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken); + + /// + /// Returns a task that performs an asynchronous operation to delete a directory. + /// + /// + /// Indicating the reference of the directory to be deleted. + /// + /// + /// An Microsoft.WindowsAzure.Storage.AccessCondition object that represents + /// the access conditions for the share. If null, no condition is used. + /// + /// + /// A Microsoft.WindowsAzure.Storage.File.FileRequestOptions object that specifies + /// additional options for the request. + /// + /// + /// An Microsoft.WindowsAzure.Storage.OperationContext object that represents + /// the context for the current operation. + /// + /// + /// A System.Threading.CancellationToken to observe while waiting for a task + /// to complete. + /// + /// + /// A System.Threading.Tasks.Task object that represents the current operation. + /// + Task DeleteDirectoryAsync(CloudFileDirectory directory, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken); + + /// + /// Returns a task that performs an asynchronous operation to delete a share. + /// + /// + /// Indicating the reference of the share to be deleted. + /// + /// + /// An Microsoft.WindowsAzure.Storage.AccessCondition object that represents + /// the access conditions for the share. If null, no condition is used. + /// + /// + /// A Microsoft.WindowsAzure.Storage.File.FileRequestOptions object that specifies + /// additional options for the request. + /// + /// + /// An Microsoft.WindowsAzure.Storage.OperationContext object that represents + /// the context for the current operation. + /// + /// + /// A System.Threading.CancellationToken to observe while waiting for a task + /// to complete. + /// + /// + /// A System.Threading.Tasks.Task object that represents the current operation. + /// + Task DeleteShareAsync(CloudFileShare share, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken); + + /// + /// Returns a task that performs an asynchronous operation to delete a file. + /// + /// + /// Indicating the reference of the file to be deleted. + /// + /// + /// An Microsoft.WindowsAzure.Storage.AccessCondition object that represents + /// the access conditions for the share. If null, no condition is used. + /// + /// + /// A Microsoft.WindowsAzure.Storage.File.FileRequestOptions object that specifies + /// additional options for the request. + /// + /// + /// An Microsoft.WindowsAzure.Storage.OperationContext object that represents + /// the context for the current operation. + /// + /// + /// A System.Threading.CancellationToken to observe while waiting for a task + /// to complete. + /// + /// + /// A System.Threading.Tasks.Task object that represents the current operation. + /// + Task DeleteFileAsync(CloudFile file, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken); + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageManagement.cs b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageManagement.cs new file mode 100644 index 000000000000..7a423402b9d6 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageManagement.cs @@ -0,0 +1,29 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Common.Storage; + +namespace Microsoft.WindowsAzure.Commands.Storage.Model.Contract +{ + /// + /// Storage management interface + /// + public interface IStorageManagement + { + /// + /// The azure storage context assoicated with this IStorageBlobManagement + /// + AzureStorageContext StorageContext { get; } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageQueueManagement.cs b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageQueueManagement.cs new file mode 100644 index 000000000000..09360d382725 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageQueueManagement.cs @@ -0,0 +1,88 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// --------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Queue; +using Microsoft.WindowsAzure.Storage.Queue.Protocol; + +namespace Microsoft.WindowsAzure.Commands.Storage.Model.Contract +{ + /// + /// Storage queue management interface + /// + public interface IStorageQueueManagement : IStorageManagement + { + /// + /// List storage queues + /// + /// Queue name prefix + /// Queue listing details + /// Queue request options + /// Operation context + /// An enumerable collection of the queues in the storage account. + IEnumerable ListQueues(string prefix, QueueListingDetails queueListingDetails, + QueueRequestOptions options, OperationContext operationContext); + + /// + /// Fetch queue attributes + /// + /// Cloud queue object + /// Queue request options + /// Operation context + void FetchAttributes(CloudQueue queue, QueueRequestOptions options, OperationContext operationContext); + + /// + /// Get queue reference + /// + /// Queue name + /// Cloud Queue object + CloudQueue GetQueueReference(String name); + + /// + /// Checks existence of the queue. + /// + /// Cloud queue object + /// Queue request options + /// Operation context + /// True if the queue exists, otherwise false + bool DoesQueueExist(CloudQueue queue, QueueRequestOptions requestOptions, OperationContext operationContext); + + /// + /// Create an cloud queue on azure if not exists. + /// + /// Cloud queue object. + /// Queue request options + /// Operation context + /// True if the queue did not already exist and was created; otherwise false. + bool CreateQueueIfNotExists(CloudQueue queue, QueueRequestOptions options, OperationContext operationContext); + + /// + /// Delete the specified storage queue. + /// + /// Cloud queue object + /// Queue request options + /// Operation context + void DeleteQueue(CloudQueue queue, QueueRequestOptions options, OperationContext operationContext); + + /// + /// Get queue permission + /// + /// Queue request options + /// Operation context + /// QueuePermissions object + QueuePermissions GetPermissions(CloudQueue queue, QueueRequestOptions options, OperationContext operationContext); + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageTableManagement.cs b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageTableManagement.cs new file mode 100644 index 000000000000..d440c53efe7e --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/IStorageTableManagement.cs @@ -0,0 +1,76 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// --------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Table; + +namespace Microsoft.WindowsAzure.Commands.Storage.Model.Contract +{ + /// + /// Storage table management interface + /// + public interface IStorageTableManagement : IStorageManagement + { + /// + /// List azure storage tables + /// + /// Table name prefix + /// Table request options + /// Operation context + /// An enumerable collection of tables that begin with the specified prefix + IEnumerable ListTables(string prefix, TableRequestOptions requestOptions, OperationContext operationContext); + + /// + /// Get a table reference + /// + /// Table name + /// Cloud table object + CloudTable GetTableReference(string name); + + /// + /// Checks whether the table exists. + /// + /// Cloud table object + /// Table request options + /// Operation context + /// True if table exists; otherwise, false. + bool DoesTableExist(CloudTable table, TableRequestOptions requestOptions, OperationContext operationContext); + + /// + /// Cloud a azure storage table if not exists. + /// + /// Cloud table object + /// Table request options + /// Operation context + /// True if table was created; otherwise, false. + bool CreateTableIfNotExists(CloudTable table, TableRequestOptions requestOptions, OperationContext operationContext); + + /// + /// Delete the specified azure storage table + /// + /// Cloud table object + /// Table request options + /// Operation context + void Delete(CloudTable table, TableRequestOptions requestOptions, OperationContext operationContext); + + /// + /// Get table permission + /// + /// Cloud table object + /// Table request options + /// Operation context + TablePermissions GetTablePermissions(CloudTable table, TableRequestOptions requestOptions, OperationContext operationContext); + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/StorageBlobManagement.cs b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/StorageBlobManagement.cs new file mode 100644 index 000000000000..a324e3de3062 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/StorageBlobManagement.cs @@ -0,0 +1,586 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Blob; +using Microsoft.WindowsAzure.Storage.Queue; +using Microsoft.WindowsAzure.Storage.Shared.Protocol; +using Microsoft.WindowsAzure.Storage.Table; + +namespace Microsoft.WindowsAzure.Commands.Storage.Model.Contract +{ + /// + /// Blob management + /// + public class StorageBlobManagement : IStorageBlobManagement + { + /// + /// Azure storage blob client + /// + private CloudBlobClient blobClient; + + /// + /// Internal storage context + /// + private AzureStorageContext internalStorageContext; + + /// + /// The azure storage context assoicated with this IStorageBlobManagement + /// + public AzureStorageContext StorageContext + { + get + { + return internalStorageContext; + } + } + + /// + /// Init blob management + /// + /// a cloud blob object + public StorageBlobManagement(AzureStorageContext context) + { + internalStorageContext = context; + blobClient = internalStorageContext.StorageAccount.CreateCloudBlobClient(); + } + + /// + /// Get a list of cloudblobcontainer in azure + /// + /// Container prefix + /// Container listing details + /// Blob request option + /// Operation context + /// An enumerable collection of cloudblobcontainer + public IEnumerable ListContainers(string prefix, ContainerListingDetails detailsIncluded, BlobRequestOptions options, OperationContext operationContext) + { + return blobClient.ListContainers(prefix, detailsIncluded, options, operationContext); + } + + /// + /// Get container presssions + /// + /// A cloudblobcontainer object + /// Access condition + /// Blob request option + /// Operation context + /// The container's permission + public BlobContainerPermissions GetContainerPermissions(CloudBlobContainer container, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext) + { + return container.GetPermissions(accessCondition, options, operationContext); + } + + /// + /// Get an CloudBlobContainer instance in local + /// + /// Container name + /// A CloudBlobContainer in local memory + public CloudBlobContainer GetContainerReference(string name) + { + return blobClient.GetContainerReference(name); + } + + /// + /// Create the container if not exists + /// + /// A cloudblobcontainer object + /// Blob request option + /// Operation context + /// True if the container did not already exist and was created; otherwise false. + public bool CreateContainerIfNotExists(CloudBlobContainer container, BlobRequestOptions requestOptions, OperationContext operationContext) + { + return container.CreateIfNotExists(requestOptions, operationContext); + } + + /// + /// Delete container + /// + /// A cloudblobcontainer object + /// Access condition + /// Blob request option + /// Operation context + public void DeleteContainer(CloudBlobContainer container, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext) + { + container.Delete(accessCondition, options, operationContext); + } + + /// + /// Set container permissions + /// + /// A cloudblobcontainer object + /// The container's permission + /// Access condition + /// Blob request option + /// Operation context + public void SetContainerPermissions(CloudBlobContainer container, BlobContainerPermissions permissions, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext) + { + container.SetPermissions(permissions, accessCondition, options, operationContext); + } + + /// + /// Get blob reference with properties and meta data from server + /// + /// A cloudblobcontainer object + /// Blob name + /// Access condition + /// Blob request options + /// Operation context + /// Return an ICloudBlob if the specific blob exists on azure, otherwise return null + public ICloudBlob GetBlobReferenceFromServer(CloudBlobContainer container, string blobName, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext) + { + try + { + ICloudBlob blob = container.GetBlobReferenceFromServer(blobName, accessCondition, options, operationContext); + return blob; + } + catch(StorageException e) + { + if (e.IsNotFoundException()) + { + return null; + } + else + { + throw; + } + } + } + + /// + /// List all blobs in specified containers + /// + /// A cloudblobcontainer object + /// Blob prefix + /// Use flat blob listing(whether treat "container/" as directory) + /// Blob listing details + /// Blob request option + /// Operation context + /// An enumerable collection of icloudblob + public IEnumerable ListBlobs(CloudBlobContainer container, string prefix, bool useFlatBlobListing, BlobListingDetails blobListingDetails, BlobRequestOptions options, OperationContext operationContext) + { + return container.ListBlobs(prefix, useFlatBlobListing, blobListingDetails, options, operationContext); + } + + /// + /// Whether the container exists or not + /// + /// A cloudblobcontainer object + /// Blob request option + /// Operation context + /// True if the specific container exists, otherwise return false + public bool DoesContainerExist(CloudBlobContainer container, BlobRequestOptions options, OperationContext operationContext) + { + if (null == container) + { + return false; + } + else + { + return container.Exists(options, operationContext); + } + } + + /// + /// Whether the blob is exists or not + /// + /// An ICloudBlob object + /// Blob request option + /// Operation context + /// True if the specific blob exists, otherwise return false + public bool DoesBlobExist(ICloudBlob blob, BlobRequestOptions options, OperationContext operationContext) + { + if (null == blob) + { + return false; + } + else + { + return blob.Exists(options, operationContext); + } + } + + /// + /// Delete azure blob + /// + /// ICloudblob object + /// Delete snapshots option + /// Access condition + /// Operation context + /// An enumerable collection of icloudblob + public void DeleteICloudBlob(ICloudBlob blob, DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext) + { + blob.Delete(deleteSnapshotsOption, accessCondition, options, operationContext); + } + + /// + /// Fetch container attributes + /// + /// CloudBlobContainer object + /// Access condition + /// Blob request options + /// An object that represents the context for the current operation. + public void FetchContainerAttributes(CloudBlobContainer container, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext) + { + container.FetchAttributes(accessCondition, options, operationContext); + } + + /// + /// Fetch blob attributes + /// + /// Access condition + /// Blob request options + /// An object that represents the context for the current operation. + public void FetchBlobAttributes(ICloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext) + { + blob.FetchAttributes(accessCondition, options, operationContext); + } + + /// + /// Set blob properties + /// + /// Access condition + /// Blob request options + /// An object that represents the context for the current operation. + public void SetBlobProperties(ICloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext) + { + blob.SetProperties(accessCondition, options, operationContext); + } + + /// + /// Set blob meta data + /// + /// ICloud blob object + /// Access condition + /// Blob request options + /// An object that represents the context for the current operation. + public void SetBlobMetadata(ICloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext) + { + blob.SetMetadata(accessCondition, options, operationContext); + } + + /// + /// Abort copy operation on specified blob + /// + /// ICloudBlob object + /// Copy id + /// Access condition + /// Blob request options + /// Operation context + public void AbortCopy(ICloudBlob blob, string copyId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext) + { + try + { + blob.AbortCopy(copyId, accessCondition, options, operationContext); + } + catch (StorageException e) + { + if (e.IsSuccessfulResponse()) + { + //The abort operation is successful, although get an exception + return; + } + else + { + throw; + } + } + } + + /// + /// Get the service properties + /// + /// Cloud storage account + /// Service type + /// Request options + /// Operation context + /// The service properties of the specified service type + public ServiceProperties GetStorageServiceProperties(StorageServiceType type, IRequestOptions options, OperationContext operationContext) + { + CloudStorageAccount account = StorageContext.StorageAccount; + switch (type) + { + case StorageServiceType.Blob: + return account.CreateCloudBlobClient().GetServiceProperties((BlobRequestOptions) options, operationContext); + case StorageServiceType.Queue: + return account.CreateCloudQueueClient().GetServiceProperties((QueueRequestOptions) options, operationContext); + case StorageServiceType.Table: + return account.CreateCloudTableClient().GetServiceProperties((TableRequestOptions) options, operationContext); + default: + throw new ArgumentException(Resources.InvalidStorageServiceType, "type"); + } + } + + /// + /// Set service properties + /// + /// Cloud storage account + /// Service type + /// Service properties + /// Request options + /// Operation context + public void SetStorageServiceProperties(StorageServiceType type, ServiceProperties properties, IRequestOptions options, OperationContext operationContext) + { + CloudStorageAccount account = StorageContext.StorageAccount; + switch (type) + { + case StorageServiceType.Blob: + account.CreateCloudBlobClient().SetServiceProperties(properties, (BlobRequestOptions)options, operationContext); + break; + case StorageServiceType.Queue: + account.CreateCloudQueueClient().SetServiceProperties(properties, (QueueRequestOptions)options, operationContext); + break; + case StorageServiceType.Table: + account.CreateCloudTableClient().SetServiceProperties(properties, (TableRequestOptions)options, operationContext); + break; + default: + throw new ArgumentException(Resources.InvalidStorageServiceType, "type"); + } + } + + /// + /// Async Get container presssions + /// + /// A cloudblobcontainer object + /// Access condition + /// Blob request option + /// Operation context + /// User cancellation token + /// A task object which retrieve the permission of the specified container + public Task GetContainerPermissionsAsync(CloudBlobContainer container, + AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, + CancellationToken cancellationToken) + { + return container.GetPermissionsAsync(accessCondition, options, operationContext, cancellationToken); + } + + /// + /// Return a task that asynchronously check whether the specified container exists. + /// + /// CloudBlobContainer object + /// Blob request option + /// Operation context + /// Cancellation token + /// A task object that asynchronously check whether the specified container exists + public Task DoesContainerExistAsync(CloudBlobContainer container, BlobRequestOptions requestOptions, OperationContext OperationContext, CancellationToken cancellationToken) + { + return container.ExistsAsync(requestOptions, OperationContext, cancellationToken); + } + + /// + /// Return a task that asynchronously get the blob reference from server + /// + /// CloudBlobContainer object + /// Blob name + /// Access condition + /// Blob request options + /// Operation context + /// Cancellation token + /// A task object that asynchronously get the blob reference from server + public async Task GetBlobReferenceFromServerAsync(CloudBlobContainer container, string blobName, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken) + { + try + { + ICloudBlob blob = await container.GetBlobReferenceFromServerAsync(blobName, accessCondition, options, operationContext, cancellationToken); + return blob; + } + catch (StorageException e) + { + if (e.IsNotFoundException()) + { + return null; + } + else + { + throw; + } + } + } + + /// + /// Return a task that asynchronously fetch blob attributes + /// + /// ICloud blob object + /// Access condition + /// Blob request options + /// Operation context + /// Cancellation token + /// Return a task that asynchronously fetch blob attributes + public Task FetchBlobAttributesAsync(ICloudBlob blob, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken) + { + return blob.FetchAttributesAsync(accessCondition, options, operationContext, cancellationToken); + } + + /// + /// Return a task that asynchronously create a container if it doesn't exist. + /// + /// CloudBlobContainer object + /// Blob container public access type + /// Blob request options + /// Operation context + /// Cancellation token + /// Return a task that asynchronously create a container if it doesn't exist. + public Task CreateContainerIfNotExistsAsync(CloudBlobContainer container, BlobContainerPublicAccessType accessType, BlobRequestOptions requestOptions, OperationContext operationContext, CancellationToken cancellationToken) + { + return container.CreateIfNotExistsAsync(accessType, requestOptions, operationContext, cancellationToken); + } + + /// + /// Return a task that asynchronously delete the specified container. + /// + /// CloudBlobContainer object + /// Access condition + /// Blob request option + /// Operation context + /// Cancellation token + /// Return a task that asynchronously delete the specified container. + public Task DeleteContainerAsync(CloudBlobContainer container, AccessCondition accessCondition, BlobRequestOptions requestOptions, OperationContext operationContext, CancellationToken cancellationToken) + { + return container.DeleteAsync(accessCondition, requestOptions, operationContext, cancellationToken); + } + + /// + /// Return a task that asynchronously abort the blob copy operation + /// + /// ICloudBlob object + /// Copy id + /// Access condition + /// Blob request options + /// Operation context + /// Cancellation token + /// Return a task that asynchronously abort the blob copy operation + public Task AbortCopyAsync(ICloudBlob blob, string copyId, AccessCondition accessCondition, BlobRequestOptions requestOptions, OperationContext operationContext, CancellationToken cancellationToken) + { + return blob.AbortCopyAsync(copyId, accessCondition, requestOptions, operationContext, cancellationToken); + } + + /// + /// Return a task that asynchronously set the container permission + /// + /// CloudBlobContainer object + /// Container permission + /// Access condition + /// Blob request option + /// Operation context + /// cancellation token + /// Return a task that asynchronously set the container permission + public Task SetContainerPermissionsAsync(CloudBlobContainer container, BlobContainerPermissions permissions, AccessCondition accessCondition, BlobRequestOptions requestOptions, OperationContext operationContext, CancellationToken cancellationToken) + { + return container.SetPermissionsAsync(permissions, accessCondition, requestOptions, operationContext, cancellationToken); + } + + /// + /// Return a task that asynchronously delete the specified blob + /// + /// ICloudBlob object + /// Snapshot delete option + /// Access condition + /// Blob request option + /// Operation context + /// Cancellation token + /// Return a task that asynchronously delete the specified blob + public Task DeleteICloudBlobAsync(ICloudBlob blob, DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions requestOptions, OperationContext operationContext, CancellationToken cancellationToken) + { + return blob.DeleteAsync(deleteSnapshotsOption, accessCondition, requestOptions, operationContext, cancellationToken); + } + + /// + /// Return a task that asynchronously check whether the specified blob exists. + /// + /// ICloudBlob object + /// Blob request options + /// Operation context + /// Cancellation token + /// A task object that asynchronously check whether the specified blob exists. + public Task DoesBlobExistAsync(ICloudBlob blob, BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken) + { + return blob.ExistsAsync(options, operationContext, cmdletCancellationToken); + } + + /// + /// Return a task that asynchronously set blob properties + /// + /// ICloud blob object + /// Access condition + /// Blob request options + /// An object that represents the context for the current operation. + public Task SetBlobPropertiesAsync(ICloudBlob blob, AccessCondition accessCondition, + BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken) + { + return blob.SetPropertiesAsync(accessCondition, options, operationContext, cmdletCancellationToken); + } + + /// + /// Return a task that asynchronously set blob meta data + /// + /// ICloud blob object + /// Access condition + /// Blob request options + /// An object that represents the context for the current operation. + public Task SetBlobMetadataAsync(ICloudBlob blob, AccessCondition accessCondition, + BlobRequestOptions options, OperationContext operationContext, CancellationToken cmdletCancellationToken) + { + return blob.SetMetadataAsync(accessCondition, options, operationContext, cmdletCancellationToken); + } + + /// + /// List the blobs segmented in specified containers + /// + /// A cloudblobcontainer object + /// Blob prefix + /// Use flat blob listing(whether treat "container/" as directory) + /// Blob listing details + /// Blob request option + /// Operation context + public Task ListBlobsSegmentedAsync(CloudBlobContainer container, string prefix, bool useFlatBlobListing, BlobListingDetails blobListingDetails, int? maxResults, BlobContinuationToken currentToken, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken) + { + return container.ListBlobsSegmentedAsync(prefix, useFlatBlobListing, blobListingDetails, maxResults, currentToken, options, operationContext, cancellationToken); + } + + /// List part of blobs. + /// + /// Blob prefix + /// Use flat blob listing + /// Blob listing details. + /// Max results. + /// Current token. + /// Request options + /// Operation Context. + /// BlobResultSegment object + public BlobResultSegment ListBlobsSegmented(CloudBlobContainer container, string prefix, bool useFlatBlobListing, + BlobListingDetails blobListingDetails, int? maxResults, BlobContinuationToken currentToken, BlobRequestOptions options, OperationContext operationContext) + { + return container.ListBlobsSegmented(prefix, useFlatBlobListing, blobListingDetails, maxResults, currentToken, options, operationContext); + } + + /// + /// Get a list of cloudblobcontainer in azure + /// + /// Container prefix + /// Container listing details + /// Blob request option + /// Operation context + /// An enumerable collection of cloudblobcontainer + public ContainerResultSegment ListContainersSegmented(string prefix, ContainerListingDetails detailsIncluded, int? maxResults, BlobContinuationToken currentToken, BlobRequestOptions options, OperationContext operationContext) + { + return blobClient.ListContainersSegmented(prefix, detailsIncluded, maxResults, currentToken, options, operationContext); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/StorageFileManagement.cs b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/StorageFileManagement.cs new file mode 100644 index 000000000000..949aa962a386 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/StorageFileManagement.cs @@ -0,0 +1,139 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.File; + +namespace Microsoft.WindowsAzure.Commands.Storage.Model.Contract +{ + /// + /// File management + /// + public class StorageFileManagement : IStorageFileManagement + { + private CloudFileClient client; + + public StorageFileManagement(AzureStorageContext context) + { + this.StorageContext = context; + } + + public AzureStorageContext StorageContext + { + get; + private set; + } + + private CloudFileClient Client + { + get + { + if (this.client == null) + { + if (this.StorageContext.StorageAccount == null) + { + throw new ArgumentException(Resources.DefaultStorageCredentialsNotFound); + } + else + { + this.client = this.StorageContext.StorageAccount.CreateCloudFileClient(); + } + } + + return this.client; + } + } + + public CloudFileShare GetShareReference(string shareName) + { + return this.Client.GetShareReference(shareName); + } + + public async Task EnumerateFilesAndDirectoriesAsync(CloudFileDirectory directory, Action enumerationAction, FileRequestOptions options, OperationContext operationContext, CancellationToken token) + { + FileContinuationToken continuationToken = null; + do + { + var segment = await directory.ListFilesAndDirectoriesSegmentedAsync(null, continuationToken, options, operationContext, token); + foreach (var item in segment.Results) + { + enumerationAction(item); + } + + continuationToken = segment.ContinuationToken; + } + while (continuationToken != null); + } + + public Task FetchShareAttributesAsync(CloudFileShare share, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken token) + { + return share.FetchAttributesAsync(accessCondition, options, operationContext, token); + } + + public async Task EnumerateSharesAsync(string prefix, ShareListingDetails detailsIncluded, Action enumerationAction, FileRequestOptions options, OperationContext operationContext, CancellationToken token) + { + FileContinuationToken continuationToken = null; + do + { + var segment = await this.Client.ListSharesSegmentedAsync(prefix, detailsIncluded, null, continuationToken, options, operationContext, token); + foreach (var item in segment.Results) + { + enumerationAction(item); + } + + continuationToken = segment.ContinuationToken; + } + while (continuationToken != null); + } + + public Task CreateDirectoryAsync(CloudFileDirectory directory, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken) + { + return directory.CreateAsync(options, operationContext, cancellationToken); + } + + public Task DirectoryExistsAsync(CloudFileDirectory directory, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken) + { + return directory.ExistsAsync(options, operationContext, cancellationToken); + } + + public Task FileExistsAsync(CloudFile file, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken) + { + return file.ExistsAsync(options, operationContext, cancellationToken); + } + + public Task CreateShareAsync(CloudFileShare share, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken) + { + return share.CreateAsync(options, operationContext, cancellationToken); + } + + public Task DeleteDirectoryAsync(CloudFileDirectory directory, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken) + { + return directory.DeleteAsync(accessCondition, options, operationContext, cancellationToken); + } + + public Task DeleteShareAsync(CloudFileShare share, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken) + { + return share.DeleteAsync(accessCondition, options, operationContext, cancellationToken); + } + + public Task DeleteFileAsync(CloudFile file, AccessCondition accessCondition, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken) + { + return file.DeleteAsync(accessCondition, options, operationContext, cancellationToken); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/StorageQueueManagement.cs b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/StorageQueueManagement.cs new file mode 100644 index 000000000000..4aa018ac5c5c --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/StorageQueueManagement.cs @@ -0,0 +1,160 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// --------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Queue; +using Microsoft.WindowsAzure.Storage.Queue.Protocol; + +namespace Microsoft.WindowsAzure.Commands.Storage.Model.Contract +{ + /// + /// Storage Queue management + /// + public class StorageQueueManagement : IStorageQueueManagement + { + /// + /// Cloud queue client + /// + private CloudQueueClient queueClient; + + /// + /// Internal storage context + /// + private AzureStorageContext internalStorageContext; + + /// + /// The azure storage context assoicated with this IStorageBlobManagement + /// + public AzureStorageContext StorageContext + { + get + { + return internalStorageContext; + } + } + + /// + /// Queue management constructor + /// + /// Cloud queue client + public StorageQueueManagement(AzureStorageContext context) + { + internalStorageContext = context; + queueClient = internalStorageContext.StorageAccount.CreateCloudQueueClient(); + } + + /// + /// List storage queues + /// + /// Queue name prefix + /// Queue listing details + /// Queue request options + /// Operation context + /// An enumerable collection of the queues in the storage account. + public IEnumerable ListQueues(string prefix, QueueListingDetails queueListingDetails, + QueueRequestOptions options, OperationContext operationContext) + { + return queueClient.ListQueues(prefix, queueListingDetails, options, operationContext); + } + + /// + /// Get an queue reference from azure server. + /// + /// Queue name + /// Queue request options + /// Operation context + /// Cloud queue object if the specified queue exists, otherwise null. + public CloudQueue GetQueueReferenceFromServer(string name, QueueRequestOptions options, OperationContext operationContext) + { + CloudQueue queue = queueClient.GetQueueReference(name); + if (queue.Exists(options, operationContext)) + { + return queue; + } + else + { + return null; + } + } + + /// + /// Fetch queue attributes + /// + /// Cloud queue object + /// Queue request options + /// Operation context + public void FetchAttributes(CloudQueue queue, QueueRequestOptions options, OperationContext operationContext) + { + queue.FetchAttributes(options, operationContext); + } + + /// + /// Get queue reference + /// + /// Queue name + /// Cloud Queue object + public CloudQueue GetQueueReference(string name) + { + return queueClient.GetQueueReference(name); + } + + /// + /// Create an cloud queue on azure if not exists. + /// + /// Cloud queue object. + /// Queue request options + /// Operation context + /// True if the queue did not already exist and was created; otherwise false. + public bool CreateQueueIfNotExists(CloudQueue queue, QueueRequestOptions options, OperationContext operationContext) + { + return queue.CreateIfNotExists(options, operationContext); + } + + /// + /// Delete the specified storage queue. + /// + /// Cloud queue object + /// Queue request options + /// Operation context + public void DeleteQueue(CloudQueue queue, QueueRequestOptions options, OperationContext operationContext) + { + queue.Delete(options, operationContext); + } + + /// + /// Checks existence of the queue. + /// + /// Cloud queue object + /// Queue request options + /// Operation context + /// True if the queue exists, otherwise false + public bool DoesQueueExist(CloudQueue queue, QueueRequestOptions requestOptions, OperationContext operationContext) + { + return queue.Exists(requestOptions, operationContext); + } + + /// + /// Get queue permission + /// + /// Queue request options + /// Operation context + /// QueuePermissions object + public QueuePermissions GetPermissions(CloudQueue queue, QueueRequestOptions options, OperationContext operationContext) + { + return queue.GetPermissions(options, operationContext); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/StorageTableManagement.cs b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/StorageTableManagement.cs new file mode 100644 index 000000000000..3098e7ff1dac --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Model/Contract/StorageTableManagement.cs @@ -0,0 +1,126 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright 2012 Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// --------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Microsoft.WindowsAzure.Commands.Common.Storage; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Table; + +namespace Microsoft.WindowsAzure.Commands.Storage.Model.Contract +{ + /// + /// Storage table management + /// + public class StorageTableManagement : IStorageTableManagement + { + /// + /// Cloud table client + /// + private CloudTableClient tableClient; + + /// + /// Internal storage context + /// + private AzureStorageContext internalStorageContext; + + /// + /// The azure storage context assoicated with this IStorageBlobManagement + /// + public AzureStorageContext StorageContext + { + get + { + return internalStorageContext; + } + } + + /// + /// Storage table management constructor + /// + /// Cloud table client + public StorageTableManagement(AzureStorageContext context) + { + internalStorageContext = context; + tableClient = internalStorageContext.StorageAccount.CreateCloudTableClient(); + } + + /// + /// List azure storage tables + /// + /// Table name prefix + /// Table request options + /// Operation context + /// An enumerable collection of tables that begin with the specified prefix + public IEnumerable ListTables(string prefix, TableRequestOptions requestOptions, OperationContext operationContext) + { + return tableClient.ListTables(prefix, requestOptions, operationContext); + } + + /// + /// Get a table reference + /// + /// Table name + /// Cloud table object + public CloudTable GetTableReference(string name) + { + return tableClient.GetTableReference(name); + } + + /// + /// Cloud a azure storage table if not exists. + /// + /// Cloud table object + /// Table request options + /// Operation context + /// True if table was created; otherwise, false. + public bool CreateTableIfNotExists(CloudTable table, TableRequestOptions requestOptions, OperationContext operationContext) + { + return table.CreateIfNotExists(requestOptions, operationContext); + } + + /// + /// Delete the specified azure storage table + /// + /// Cloud table object + /// Table request options + /// Operation context + public void Delete(CloudTable table, TableRequestOptions requestOptions, OperationContext operationContext) + { + table.Delete(requestOptions, operationContext); + } + + /// + /// Checks whether the table exists. + /// + /// Cloud table object + /// Table request options + /// Operation context + /// True if table exists; otherwise, false. + public bool DoesTableExist(CloudTable table, TableRequestOptions requestOptions, OperationContext operationContext) + { + return table.Exists(requestOptions, operationContext); + } + + /// + /// Get table permission + /// + /// Cloud table object + /// Table request options + /// Operation context + public TablePermissions GetTablePermissions(CloudTable table, TableRequestOptions requestOptions, OperationContext operationContext) + { + return table.GetPermissions(requestOptions, operationContext); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageBase.cs b/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageBase.cs new file mode 100644 index 000000000000..0dbd86885daa --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageBase.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure.Commands.Common.Storage; + +namespace Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel +{ + /// + /// Base class for all azure storage object + /// + public class AzureStorageBase + { + /// + /// Storage context + /// + public AzureStorageContext Context { get; set; } + + /// + /// Azure storage object name + /// + public String Name { get; set; } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageBlob.cs b/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageBlob.cs new file mode 100644 index 000000000000..00315260b766 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageBlob.cs @@ -0,0 +1,75 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// --------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel +{ + /// + /// Azure storage blob object + /// + public class AzureStorageBlob : AzureStorageBase + { + /// + /// ICloudBlob object + /// + public ICloudBlob ICloudBlob { get; private set; } + + /// + /// Azure storage blob type + /// + public BlobType BlobType { get; private set; } + + /// + /// Blob length + /// + public long Length { get; private set; } + + /// + /// Blob content type + /// + public string ContentType { get; private set; } + + /// + /// Blob last modified time + /// + public DateTimeOffset? LastModified { get; private set; } + + /// + /// Blob snapshot time + /// + public DateTimeOffset? SnapshotTime { get; private set; } + + /// + /// Blob continuation token + /// + public BlobContinuationToken ContinuationToken { get; set; } + + /// + /// Azure storage blob constructor + /// + /// ICloud blob object + public AzureStorageBlob(ICloudBlob blob) + { + Name = blob.Name; + ICloudBlob = blob; + BlobType = blob.BlobType; + Length = blob.Properties.Length; + ContentType = blob.Properties.ContentType; + LastModified = blob.Properties.LastModified; + SnapshotTime = blob.SnapshotTime; + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageContainer.cs b/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageContainer.cs new file mode 100644 index 000000000000..d7467abb9a63 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageContainer.cs @@ -0,0 +1,73 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure.Storage.Blob; + +namespace Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel +{ + /// + /// azure storage container + /// + public class AzureStorageContainer : AzureStorageBase + { + /// + /// CloudBlobContainer object + /// + public CloudBlobContainer CloudBlobContainer { get; private set; } + + /// + /// the permission of CloudBlobContainer + /// + public BlobContainerPermissions Permission { get; private set; } + + /// + /// the public access level of CloudBlobContainer + /// + public BlobContainerPublicAccessType? PublicAccess { get; private set; } + + /// + /// last modified of CloudBlobContainer + /// + public DateTimeOffset? LastModified { get; private set; } + + /// + /// Container continuation token + /// + public BlobContinuationToken ContinuationToken { get; set; } + + /// + /// init azure storage container using CloudBlobContainer and BlobContainerPermissions + /// + /// CloudBlobContainer object + /// permissions of container + public AzureStorageContainer(CloudBlobContainer container, BlobContainerPermissions permissions) + { + CloudBlobContainer = container; + Permission = permissions; + Name = container.Name; + + if (permissions == null) + { + PublicAccess = null; + } + else + { + PublicAccess = permissions.PublicAccess; + } + + LastModified = container.Properties.LastModified; + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageQueue.cs b/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageQueue.cs new file mode 100644 index 000000000000..1bb47c2f56d9 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageQueue.cs @@ -0,0 +1,58 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure.Storage.Queue; + +namespace Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel +{ + /// + /// Azure storage queue + /// + public class AzureStorageQueue : AzureStorageBase + { + /// + /// Cloud Queue object + /// + public CloudQueue CloudQueue { get; private set; } + + /// + /// Queue uri + /// + public Uri Uri { get; private set; } + + /// + /// Approximate message count + /// + public int? ApproximateMessageCount { get; private set; } + + /// + /// Whether applied base64 encoding + /// + public bool EncodeMessage { get; private set; } + + /// + /// Azure storage queue constructor. + /// + /// Cloud queue object + public AzureStorageQueue(CloudQueue queue) + { + CloudQueue = queue; + Name = queue.Name; + Uri = queue.Uri; + ApproximateMessageCount = queue.ApproximateMessageCount; + EncodeMessage = queue.EncodeMessage; + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageTable.cs b/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageTable.cs new file mode 100644 index 000000000000..a212cff479f7 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Model/ResourceModel/AzureStorageTable.cs @@ -0,0 +1,46 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// --------------------------------------------------------------------------------- + +using System; +using Microsoft.WindowsAzure.Storage.Table; + +namespace Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel +{ + /// + /// Azure storage table object + /// + public class AzureStorageTable : AzureStorageBase + { + /// + /// Cloud table object + /// + public CloudTable CloudTable { get; private set; } + + /// + /// Table uri + /// + public Uri Uri { get; private set; } + + /// + /// Azure storage table constructor + /// + /// Cloud table object + public AzureStorageTable(CloudTable table) + { + Name = table.Name; + CloudTable = table; + Uri = table.Uri; + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Properties/AssemblyInfo.cs b/src/ServiceManagement/Storage/Commands.Storage/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..bcab5ee6a5b9 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Properties/AssemblyInfo.cs @@ -0,0 +1,55 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft Azure Powershell")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] + + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("a102cbe8-8a50-43b1-821d-72b42b9831a4")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] +[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] + +#if SIGN +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.Storage.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +#else +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.Storage.Test")] +#endif +[assembly: CLSCompliant(false)] diff --git a/src/ServiceManagement/Storage/Commands.Storage/Queue/Cmdlet/GetAzureStorageQueue.cs b/src/ServiceManagement/Storage/Commands.Storage/Queue/Cmdlet/GetAzureStorageQueue.cs new file mode 100644 index 000000000000..ac075f05dc76 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Queue/Cmdlet/GetAzureStorageQueue.cs @@ -0,0 +1,187 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; +using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; +using Microsoft.WindowsAzure.Storage.Queue; +using Microsoft.WindowsAzure.Storage.Queue.Protocol; + +namespace Microsoft.WindowsAzure.Commands.Storage.Queue +{ + /// + /// list azure queues + /// + [Cmdlet(VerbsCommon.Get, StorageNouns.Queue,DefaultParameterSetName = NameParameterSet), + OutputType(typeof(AzureStorageQueue))] + public class GetAzureStorageQueueCommand : StorageQueueBaseCmdlet + { + /// + /// default parameter set name + /// + private const string NameParameterSet = "QueueName"; + + /// + /// prefix parameter set name + /// + private const string PrefixParameterSet = "QueuePrefix"; + + [Alias("N", "Queue")] + [Parameter(Position = 0, HelpMessage = "Queue name", + ValueFromPipeline = true, + ValueFromPipelineByPropertyName = true, + ParameterSetName = NameParameterSet)] + public string Name { get; set; } + + [Parameter(HelpMessage = "Queue Prefix", + ParameterSetName = PrefixParameterSet, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Prefix { get; set; } + + /// + /// Initializes a new instance of the GetAzureStorageQueueCommand class. + /// + public GetAzureStorageQueueCommand() + : this(null) + { + } + + /// + /// Initializes a new instance of the GetAzureStorageQueueCommand class. + /// + /// IStorageQueueManagement channel + public GetAzureStorageQueueCommand(IStorageQueueManagement channel) + { + Channel = channel; + EnableMultiThread = false; + } + + /// + /// list azure queues by name + /// + /// queue name + /// An enumerable collection of CloudQueue objects + internal IEnumerable ListQueuesByName(string name) + { + string prefix = String.Empty; + QueueListingDetails queueListingDetails = QueueListingDetails.All; + QueueRequestOptions requestOptions = RequestOptions; + + if (String.IsNullOrEmpty(name) || WildcardPattern.ContainsWildcardCharacters(name)) + { + IEnumerable queues = Channel.ListQueues(prefix, queueListingDetails, requestOptions, OperationContext); + + WildcardOptions options = WildcardOptions.IgnoreCase | WildcardOptions.Compiled; + WildcardPattern wildcard = null; + + if (!string.IsNullOrEmpty(name)) + { + wildcard = new WildcardPattern(name, options); + } + + foreach (CloudQueue queue in queues) + { + if (wildcard == null || wildcard.IsMatch(queue.Name)) + { + yield return queue; + } + } + } + else + { + if (!NameUtil.IsValidQueueName(name)) + { + throw new ArgumentException(String.Format(Resources.InvalidQueueName, name)); + } + + CloudQueue queue = Channel.GetQueueReference(name); + + if (Channel.DoesQueueExist(queue, requestOptions, OperationContext)) + { + yield return queue; + } + else + { + throw new ResourceNotFoundException(String.Format(Resources.QueueNotFound, name)); + } + } + } + + /// + /// list azure queues by prefix + /// + /// queue prefix + /// An enumerable collection of CloudQueue objects + internal IEnumerable ListQueuesByPrefix(string prefix) + { + List queueList = new List(); + QueueListingDetails queueListingDetails = QueueListingDetails.All; + QueueRequestOptions requestOptions = RequestOptions; + + if (!NameUtil.IsValidQueuePrefix(prefix)) + { + throw new ArgumentException(String.Format(Resources.InvalidQueueName, prefix)); + } + + return Channel.ListQueues(prefix, queueListingDetails, requestOptions, OperationContext); + } + + /// + /// write azure queue with message count + /// + /// An enumerable collection of CloudQueue objects + internal void WriteQueueWithCount(IEnumerable queueList) + { + if (null == queueList) + { + return; + } + + QueueRequestOptions requestOptions = RequestOptions; + + foreach (CloudQueue queue in queueList) + { + //get message count + Channel.FetchAttributes(queue, requestOptions, OperationContext); + AzureStorageQueue azureQueue = new AzureStorageQueue(queue); + + WriteObjectWithStorageContext(azureQueue); + } + } + + /// + /// execute command + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + IEnumerable queueList = null; + + if (PrefixParameterSet == ParameterSetName) + { + queueList = ListQueuesByPrefix(Prefix); + } + else + { + queueList = ListQueuesByName(Name); + } + + WriteQueueWithCount(queueList); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage/Queue/Cmdlet/NewAzureStorageQueue.cs b/src/ServiceManagement/Storage/Commands.Storage/Queue/Cmdlet/NewAzureStorageQueue.cs new file mode 100644 index 000000000000..ca9d8f59f608 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Queue/Cmdlet/NewAzureStorageQueue.cs @@ -0,0 +1,87 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; +using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; +using Microsoft.WindowsAzure.Storage.Queue; + +namespace Microsoft.WindowsAzure.Commands.Storage.Queue +{ + [Cmdlet(VerbsCommon.New, "AzureStorageQueue"), + OutputType(typeof(AzureStorageQueue))] + public class NewAzureStorageQueueCommand : StorageQueueBaseCmdlet + { + [Alias("N", "Queue")] + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Queue name", + ValueFromPipeline = true, + ValueFromPipelineByPropertyName = true)] + public string Name { get; set; } + + /// + /// Initializes a new instance of the GetAzureStorageQueueCommand class. + /// + public NewAzureStorageQueueCommand() + : this(null) + { + } + + /// + /// Initializes a new instance of the NewAzureStorageQueueCommand class. + /// + /// IStorageQueueManagement channel + public NewAzureStorageQueueCommand(IStorageQueueManagement channel) + { + Channel = channel; + EnableMultiThread = false; + } + + /// + /// create an azure queue + /// + /// queue name + /// an AzureStorageQueue object + internal AzureStorageQueue CreateAzureQueue(string name) + { + if (!NameUtil.IsValidQueueName(name)) + { + throw new ArgumentException(String.Format(Resources.InvalidQueueName, name)); + } + + QueueRequestOptions requestOptions = RequestOptions; + CloudQueue queue = Channel.GetQueueReference(name); + bool created = Channel.CreateQueueIfNotExists(queue, requestOptions, OperationContext); + + if (!created) + { + throw new ResourceAlreadyExistException(String.Format(Resources.QueueAlreadyExists, name)); + } + + return new AzureStorageQueue(queue); + } + + /// + /// execute command + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + AzureStorageQueue azureQueue = CreateAzureQueue(Name); + WriteObjectWithStorageContext(azureQueue); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage/Queue/Cmdlet/NewAzureStorageQueueSasToken.cs b/src/ServiceManagement/Storage/Commands.Storage/Queue/Cmdlet/NewAzureStorageQueueSasToken.cs new file mode 100644 index 000000000000..5a96086051f3 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Queue/Cmdlet/NewAzureStorageQueueSasToken.cs @@ -0,0 +1,159 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; +using Microsoft.WindowsAzure.Storage.Queue; + +namespace Microsoft.WindowsAzure.Commands.Storage.Queue.Cmdlet +{ + [Cmdlet(VerbsCommon.New, StorageNouns.QueueSas), OutputType(typeof(String))] + public class NewAzureStorageQueueSasTokenCommand : StorageQueueBaseCmdlet + { + /// + /// Sas permission parameter set name + /// + private const string SasPermissionParameterSet = "SasPermission"; + + /// + /// Sas policy paremeter set name + /// + private const string SasPolicyParmeterSet = "SasPolicy"; + + [Alias("N", "Queue")] + [Parameter(Position = 0, Mandatory = true, + HelpMessage = "Table Name", + ValueFromPipeline = true, + ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(HelpMessage = "Policy Identifier", ParameterSetName = SasPolicyParmeterSet)] + public string Policy + { + get {return accessPolicyIdentifier;} + set {accessPolicyIdentifier = value;} + } + private string accessPolicyIdentifier; + + [Parameter(HelpMessage = "Permissions for a container. Permissions can be any not-empty subset of \"raup\".", + ParameterSetName = SasPermissionParameterSet)] + public string Permission { get; set; } + + [Parameter(HelpMessage = "Start Time")] + public DateTime? StartTime { get; set; } + + [Parameter(HelpMessage = "Expiry Time")] + public DateTime? ExpiryTime { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Display full uri with sas token")] + public SwitchParameter FullUri { get; set; } + + //Override the useless parameters + public override int? ServerTimeoutPerRequest { get; set; } + public override int? ClientTimeoutPerRequest { get; set; } + + /// + /// Initializes a new instance of the NewAzureStorageQueueSasCommand class. + /// + public NewAzureStorageQueueSasTokenCommand() + : this(null) + { + } + + /// + /// Initializes a new instance of the NewAzureStorageQueueSasCommand class. + /// + /// IStorageBlobManagement channel + public NewAzureStorageQueueSasTokenCommand(IStorageQueueManagement channel) + { + Channel = channel; + EnableMultiThread = false; + } + + /// + /// Execute command + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + if (String.IsNullOrEmpty(Name)) return; + CloudQueue queue = Channel.GetQueueReference(Name); + SharedAccessQueuePolicy policy = new SharedAccessQueuePolicy(); + bool shouldSetExpiryTime = SasTokenHelper.ValidateQueueAccessPolicy(Channel, queue.Name, policy, accessPolicyIdentifier); + SetupAccessPolicy(policy, shouldSetExpiryTime); + string sasToken = queue.GetSharedAccessSignature(policy, accessPolicyIdentifier); + + if (FullUri) + { + string fullUri = queue.Uri.ToString() + sasToken; + WriteObject(fullUri); + } + else + { + WriteObject(sasToken); + } + } + + /// + /// Update the access policy + /// + /// Access policy object + /// Should set the default expiry time + private void SetupAccessPolicy(SharedAccessQueuePolicy policy, bool shouldSetExpiryTime) + { + DateTimeOffset? accessStartTime; + DateTimeOffset? accessEndTime; + SasTokenHelper.SetupAccessPolicyLifeTime(StartTime, ExpiryTime, out accessStartTime, out accessEndTime, shouldSetExpiryTime); + policy.SharedAccessStartTime = accessStartTime; + policy.SharedAccessExpiryTime = accessEndTime; + SetupAccessPolicyPermission(policy, Permission); + } + + /// + /// Set up access policy permission + /// + /// SharedAccessBlobPolicy object + /// Permisson + internal void SetupAccessPolicyPermission(SharedAccessQueuePolicy policy, string permission) + { + if (string.IsNullOrEmpty(permission)) return; + policy.Permissions = SharedAccessQueuePermissions.None; + permission = permission.ToLower(); + foreach (char op in permission) + { + switch(op) + { + case StorageNouns.Permission.Read: + policy.Permissions |= SharedAccessQueuePermissions.Read; + break; + case StorageNouns.Permission.Add: + policy.Permissions |= SharedAccessQueuePermissions.Add; + break; + case StorageNouns.Permission.Update: + policy.Permissions |= SharedAccessQueuePermissions.Update; + break; + case StorageNouns.Permission.Process: + policy.Permissions |= SharedAccessQueuePermissions.ProcessMessages; + break; + default: + throw new ArgumentException(string.Format(Resources.InvalidAccessPermission, op)); + } + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Queue/Cmdlet/RemoveAzureStorageQueue.cs b/src/ServiceManagement/Storage/Commands.Storage/Queue/Cmdlet/RemoveAzureStorageQueue.cs new file mode 100644 index 000000000000..ab2470cbd2f8 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Queue/Cmdlet/RemoveAzureStorageQueue.cs @@ -0,0 +1,135 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; +using Microsoft.WindowsAzure.Storage.Queue; + +namespace Microsoft.WindowsAzure.Commands.Storage.Queue +{ + [Cmdlet(VerbsCommon.Remove, "AzureStorageQueue", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High), + OutputType(typeof(Boolean))] + public class RemoveAzureStorageQueueCommand : StorageQueueBaseCmdlet + { + [Alias("N", "Queue")] + [Parameter(Position = 0, HelpMessage = "Queue name", + ValueFromPipeline = true, Mandatory = true, + ValueFromPipelineByPropertyName = true)] + public string Name { get; set; } + + [Parameter(HelpMessage = "Force to remove the queue without confirm")] + public SwitchParameter Force + { + get { return force; } + set { force = value; } + } + + private bool force; + + [Parameter(Mandatory = false, HelpMessage = "Return whether the specified queue is successfully removed")] + public SwitchParameter PassThru { get; set; } + + /// + /// Initializes a new instance of the RemoveAzureStorageQueueCommand class. + /// + public RemoveAzureStorageQueueCommand() + : this(null) + { + } + + /// + /// Initializes a new instance of the RemoveAzureStorageQueueCommand class. + /// + /// IStorageQueueManagement channel + public RemoveAzureStorageQueueCommand(IStorageQueueManagement channel) + { + Channel = channel; + EnableMultiThread = false; + } + + /// + /// confirm the remove operation + /// + /// confirmation message + /// true if user confirm the operation, otherwise false + internal virtual bool ConfirmRemove(string message) + { + return ShouldProcess(message); + } + + /// + /// remove an azure queue + /// + /// queue name + /// + /// true if the queue is removed successfully, false if user cancel the remove operation, + /// otherwise throw an exception + /// + internal bool RemoveAzureQueue(string name) + { + if (!NameUtil.IsValidQueueName(name)) + { + throw new ArgumentException(String.Format(Resources.InvalidQueueName, name)); + } + + QueueRequestOptions requestOptions = RequestOptions; + CloudQueue queue = Channel.GetQueueReference(name); + + if (!Channel.DoesQueueExist(queue, requestOptions, OperationContext)) + { + throw new ResourceNotFoundException(String.Format(Resources.QueueNotFound, name)); + } + + if (force || ConfirmRemove(name)) + { + Channel.DeleteQueue(queue, requestOptions, OperationContext); + return true; + } + else + { + return false; + } + } + + /// + /// execute command + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + String result = string.Empty; + + bool success = RemoveAzureQueue(Name); + + if (success) + { + result = String.Format(Resources.RemoveQueueSuccessfully, Name); + } + else + { + result = String.Format(Resources.RemoveQueueCancelled, Name); + } + + WriteVerbose(result); + + if (PassThru) + { + WriteObject(success); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage/Queue/StorageQueueBaseCmdlet.cs b/src/ServiceManagement/Storage/Commands.Storage/Queue/StorageQueueBaseCmdlet.cs new file mode 100644 index 000000000000..c3369622e442 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Queue/StorageQueueBaseCmdlet.cs @@ -0,0 +1,56 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// --------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; +using Microsoft.WindowsAzure.Storage.Queue; + +namespace Microsoft.WindowsAzure.Commands.Storage.Common +{ + /// + /// base class for azure queue cmdlet + /// + public class StorageQueueBaseCmdlet : StorageCloudCmdletBase + { + //Overwrite the useless parameter + public override int? ServerTimeoutPerRequest { get; set; } + public override int? ClientTimeoutPerRequest { get; set; } + public override int? ConcurrentTaskCount { get; set; } + + /// + /// create queue service management channel. + /// + /// IStorageQueueManagement object + protected override IStorageQueueManagement CreateChannel() + { + //init storage blob managment channel + if (Channel == null || !ShareChannel) + { + Channel = new StorageQueueManagement(GetCmdletStorageContext()); + } + + return Channel; + } + + /// + /// Queue request options + /// + public QueueRequestOptions RequestOptions + { + get + { + return (QueueRequestOptions)GetRequestOptions(StorageServiceType.Queue); + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Resources.Designer.cs b/src/ServiceManagement/Storage/Commands.Storage/Resources.Designer.cs new file mode 100644 index 000000000000..6b771c0a10a0 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Resources.Designer.cs @@ -0,0 +1,1480 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.WindowsAzure.Commands.Storage { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.WindowsAzure.Commands.Storage.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to [Anonymous]. + /// + internal static string AnonymousAccountName { + get { + return ResourceManager.GetString("AnonymousAccountName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} begin processing without ParameterSet.. + /// + internal static string BeginProcessingWithoutParameterSetLog { + get { + return ResourceManager.GetString("BeginProcessingWithoutParameterSetLog", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} begin processing with ParameterSet '{1}'.. + /// + internal static string BeginProcessingWithParameterSetLog { + get { + return ResourceManager.GetString("BeginProcessingWithParameterSetLog", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Blob '{0}' in container '{1}' already exists.. + /// + internal static string BlobAlreadyExists { + get { + return ResourceManager.GetString("BlobAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Blob End Point: {0}.. + /// + internal static string BlobEndPointTips { + get { + return ResourceManager.GetString("BlobEndPointTips", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Can't read the blob properties.. + /// + internal static string BlobIsNotReadable { + get { + return ResourceManager.GetString("BlobIsNotReadable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Can not find blob name or container name.. + /// + internal static string BlobNameNotFound { + get { + return ResourceManager.GetString("BlobNameNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Blob name should be empty when uploading multiple files.. + /// + internal static string BlobNameShouldBeEmptyWhenUploading { + get { + return ResourceManager.GetString("BlobNameShouldBeEmptyWhenUploading", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Can not find blob '{0}' in container '{1}'.. + /// + internal static string BlobNotFound { + get { + return ResourceManager.GetString("BlobNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Blob type mismatched, the current blob type of '{0}' is {1}.. + /// + internal static string BlobTypeMismatch { + get { + return ResourceManager.GetString("BlobTypeMismatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified blob '{0}' is already a snapshot with snapshot time {1}. Can't use "DeleteSnapshot" option for it.. + /// + internal static string CannotDeleteSnapshotForSnapshot { + get { + return ResourceManager.GetString("CannotDeleteSnapshotForSnapshot", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Can not get storage account from subscription. Please check the subscription settings using "Get-AzureSubscription".. + /// + internal static string CannotGetSotrageAccountFromSubscription { + get { + return ResourceManager.GetString("CannotGetSotrageAccountFromSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Can not get storage account from environment variable 'AZURE_STORAGE_CONNECTION_STRING'. Please check whether this environment variable is valid.. + /// + internal static string CannotGetStorageAccountFromEnvironmentVariable { + get { + return ResourceManager.GetString("CannotGetStorageAccountFromEnvironmentVariable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Can not upload the directory '{0}' to azure. If you want to upload directory, please use "ls -File -Recurse | Set-AzureStorageBlobContent -Container containerName".. + /// + internal static string CannotSendDirectory { + get { + return ResourceManager.GetString("CannotSendDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure-Storage-PowerShell-{0}. + /// + internal static string ClientRequestIdFormat { + get { + return ResourceManager.GetString("ClientRequestIdFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified cloud file '{0}' already exists. If you want to overwrite this file, use -Force option.. + /// + internal static string CloudFileConflict { + get { + return ResourceManager.GetString("CloudFileConflict", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}-{1}. + /// + internal static string CmdletFormat { + get { + return ResourceManager.GetString("CmdletFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to blob '{0}' in container '{1}' with CopyId {2}.. + /// + internal static string ConfirmAbortCopyOperation { + get { + return ResourceManager.GetString("ConfirmAbortCopyOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Confirm. + /// + internal static string ConfirmCaption { + get { + return ResourceManager.GetString("ConfirmCaption", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The blob '{0}' in container '{1}' has snapshots.. + /// + internal static string ConfirmRemoveBlobWithSnapshot { + get { + return ResourceManager.GetString("ConfirmRemoveBlobWithSnapshot", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure to remove container '{0}'?. + /// + internal static string ConfirmRemoveContainer { + get { + return ResourceManager.GetString("ConfirmRemoveContainer", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Confirm to remove azure container.. + /// + internal static string ConfirmRemoveContainerCaption { + get { + return ResourceManager.GetString("ConfirmRemoveContainerCaption", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Container '{0}' already exists.. + /// + internal static string ContainerAlreadyExists { + get { + return ResourceManager.GetString("ContainerAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Can not find the container '{0}'.. + /// + internal static string ContainerNotFound { + get { + return ResourceManager.GetString("ContainerNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Copy Blob.. + /// + internal static string CopyBlobActivity { + get { + return ResourceManager.GetString("CopyBlobActivity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Percent:{0}%. BytesCopied: {1}Bytes. TotalBytes: {2}Bytes.. + /// + internal static string CopyBlobPendingStatus { + get { + return ResourceManager.GetString("CopyBlobPendingStatus", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' copy to blob '{1}' in container '{2}' from '{3}'.. + /// + internal static string CopyBlobStatus { + get { + return ResourceManager.GetString("CopyBlobStatus", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Copy Blob Status Summary.. + /// + internal static string CopyBlobSummaryActivity { + get { + return ResourceManager.GetString("CopyBlobSummaryActivity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Total: {0}. Successful: {1}. Active: {2}. Failed: {3}.. + /// + internal static string CopyBlobSummaryCount { + get { + return ResourceManager.GetString("CopyBlobSummaryCount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Successfully start copy blob '{0}' in container '{1}' to blob '{2}' in container '{3}'.. + /// + internal static string CopyBlobToBlobSuccessfully { + get { + return ResourceManager.GetString("CopyBlobToBlobSuccessfully", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Copy request to blob '{0}' in container '{1}' has been scheduled with copyId {2}.. + /// + internal static string CopyDestinationBlobPending { + get { + return ResourceManager.GetString("CopyDestinationBlobPending", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to CopyId can not be empty.. + /// + internal static string CopyIdCannotBeEmpty { + get { + return ResourceManager.GetString("CopyIdCannotBeEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to CopyId mismatch on blob '{0}' in container '{1}'. Expected:{2}. User supplied: {3}.. + /// + internal static string CopyIdMismatch { + get { + return ResourceManager.GetString("CopyIdMismatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Can not find copy task on specified blob '{0}' in container '{1}'.. + /// + internal static string CopyTaskNotFound { + get { + return ResourceManager.GetString("CopyTaskNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Successfully start copy '{0}' to blob '{1}' in container '{2}'.. + /// + internal static string CopyUriToBlobSuccessfully { + get { + return ResourceManager.GetString("CopyUriToBlobSuccessfully", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Current Storage Account not found in subscription '{0}'. Please set it use "Set-AzureSubscription".. + /// + internal static string CurrentStorageAccountNameNotFound { + get { + return ResourceManager.GetString("CurrentStorageAccountNameNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Can not found current storage account '{0}' of subsciption '{1}' on azure, please check whether the specified storage account exists.. + /// + internal static string CurrentStorageAccountNotFoundOnAzure { + get { + return ResourceManager.GetString("CurrentStorageAccountNotFoundOnAzure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Can not find your azure storage credential. Please set current storage account using "Set-AzureSubscription" or set the "AZURE_STORAGE_CONNECTION_STRING" environment variable.. + /// + internal static string DefaultStorageCredentialsNotFound { + get { + return ResourceManager.GetString("DefaultStorageCredentialsNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to core.windows.net. + /// + internal static string DefaultStorageEndPointDomain { + get { + return ResourceManager.GetString("DefaultStorageEndPointDomain", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Directory '{0}' doesn't exist.. + /// + internal static string DirectoryNotExists { + get { + return ResourceManager.GetString("DirectoryNotExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Downloading blob '{0}' in container '{1}' is cancelled.. + /// + internal static string DownloadBlobCancelled { + get { + return ResourceManager.GetString("DownloadBlobCancelled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot download the blob '{0}' in container '{1}' into local file '{2}'. Error: {3}. + /// + internal static string DownloadBlobFailed { + get { + return ResourceManager.GetString("DownloadBlobFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Download blob '{0}' successful.. + /// + internal static string DownloadBlobSuccessful { + get { + return ResourceManager.GetString("DownloadBlobSuccessful", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Endpk must accompany Endrk.. + /// + internal static string EndpkMustAccomanyEndrk { + get { + return ResourceManager.GetString("EndpkMustAccomanyEndrk", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} end processing, Start {1} remote calls. Finish {2} remote calls. Elapsed time {3:0.00} ms. Client operation id: {4}.. + /// + internal static string EndProcessingLog { + get { + return ResourceManager.GetString("EndProcessingLog", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AZURE_STORAGE_CONNECTION_STRING. + /// + internal static string EnvConnectionString { + get { + return ResourceManager.GetString("EnvConnectionString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Exception cannot be null or empty.. + /// + internal static string ExceptionCannotEmpty { + get { + return ResourceManager.GetString("ExceptionCannotEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The expiry time of the specified access policy should be greater than start time. Expiry time : {0}. Start time: {1}.. + /// + internal static string ExpiryTimeGreatThanStartTime { + get { + return ResourceManager.GetString("ExpiryTimeGreatThanStartTime", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File '{0}' already exists.. + /// + internal static string FileAlreadyExists { + get { + return ResourceManager.GetString("FileAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File name can not be empty.. + /// + internal static string FileNameCannotEmpty { + get { + return ResourceManager.GetString("FileNameCannotEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} ({1}){2}. + /// + internal static string FileNameFormatForSnapShot { + get { + return ResourceManager.GetString("FileNameFormatForSnapShot", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The given file name '{0}' is not valid since a file name could not end with a '/' forward slash.. + /// + internal static string FileNameShouldNotEndWithSlash { + get { + return ResourceManager.GetString("FileNameShouldNotEndWithSlash", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Can not find the specified file '{0}'.. + /// + internal static string FileNotFound { + get { + return ResourceManager.GetString("FileNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Percent : {0}%. Average Speed : {1}/Second.. + /// + internal static string FileTransmitStatus { + get { + return ResourceManager.GetString("FileTransmitStatus", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Finish remote call for {0} with status code {1}({2}) and service request id {3}. Elapsed time {4:0.00} ms.. + /// + internal static string FinishRemoteCall { + get { + return ResourceManager.GetString("FinishRemoteCall", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Get-AzureStorageContainerAcl. + /// + internal static string GetAzureStorageContainerAclCmdletName { + get { + return ResourceManager.GetString("GetAzureStorageContainerAclCmdletName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Get-AzureStorageContainer. + /// + internal static string GetAzureStorageContainerCmdletName { + get { + return ResourceManager.GetString("GetAzureStorageContainerCmdletName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Fetch Permission for container '{0}' failed. Exception: {1}. + /// + internal static string GetContainerPermissionException { + get { + return ResourceManager.GetString("GetContainerPermissionException", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Get storage account from environment variable 'AZURE_STORAGE_CONNECTION_STRING'.. + /// + internal static string GetStorageAccountFromEnvironmentVariable { + get { + return ResourceManager.GetString("GetStorageAccountFromEnvironmentVariable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to http://{0}.blob.{1}/. + /// + internal static string HttpBlobEndPointFormat { + get { + return ResourceManager.GetString("HttpBlobEndPointFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to http://{0}.file.{1}/. + /// + internal static string HttpFileEndPointFormat { + get { + return ResourceManager.GetString("HttpFileEndPointFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to http://. + /// + internal static string HTTPPrefix { + get { + return ResourceManager.GetString("HTTPPrefix", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to http://{0}.queue.{1}/. + /// + internal static string HttpQueueEndPointFormat { + get { + return ResourceManager.GetString("HttpQueueEndPointFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to https://{0}.blob.{1}/. + /// + internal static string HttpsBlobEndPointFormat { + get { + return ResourceManager.GetString("HttpsBlobEndPointFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to https://{0}.file.{1}/. + /// + internal static string HttpsFileEndPointFormat { + get { + return ResourceManager.GetString("HttpsFileEndPointFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to https://. + /// + internal static string HTTPSPrefix { + get { + return ResourceManager.GetString("HTTPSPrefix", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to https://{0}.queue.{1}/. + /// + internal static string HttpsQueueEndPointFormat { + get { + return ResourceManager.GetString("HttpsQueueEndPointFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to https://{0}.table.{1}/. + /// + internal static string HttpsTableEndPointFormat { + get { + return ResourceManager.GetString("HttpsTableEndPointFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to http://{0}.table.{1}/. + /// + internal static string HttpTableEndPointFormat { + get { + return ResourceManager.GetString("HttpTableEndPointFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0:0.##}bytes. + /// + internal static string HumanReadableSizeFormat_Bytes { + get { + return ResourceManager.GetString("HumanReadableSizeFormat_Bytes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0:0.##}EB. + /// + internal static string HumanReadableSizeFormat_ExaBytes { + get { + return ResourceManager.GetString("HumanReadableSizeFormat_ExaBytes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0:0.##}GB. + /// + internal static string HumanReadableSizeFormat_GigaBytes { + get { + return ResourceManager.GetString("HumanReadableSizeFormat_GigaBytes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0:0.##}KB. + /// + internal static string HumanReadableSizeFormat_KiloBytes { + get { + return ResourceManager.GetString("HumanReadableSizeFormat_KiloBytes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0:0.##}MB. + /// + internal static string HumanReadableSizeFormat_MegaBytes { + get { + return ResourceManager.GetString("HumanReadableSizeFormat_MegaBytes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0:0.##}PB. + /// + internal static string HumanReadableSizeFormat_PetaBytes { + get { + return ResourceManager.GetString("HumanReadableSizeFormat_PetaBytes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0:0.##}TB. + /// + internal static string HumanReadableSizeFormat_TeraBytes { + get { + return ResourceManager.GetString("HumanReadableSizeFormat_TeraBytes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Init service channel from current subscription.. + /// + internal static string InitChannelFromSubscription { + get { + return ResourceManager.GetString("InitChannelFromSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Init Operation Context for '{0}' with client request id {1}. If you want to get more details, please add "-Debug" to your command.. + /// + internal static string InitOperationContextLog { + get { + return ResourceManager.GetString("InitOperationContextLog", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid access permission '{0}'.. + /// + internal static string InvalidAccessPermission { + get { + return ResourceManager.GetString("InvalidAccessPermission", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid access policy '{0}'.. + /// + internal static string InvalidAccessPolicy { + get { + return ResourceManager.GetString("InvalidAccessPolicy", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to invalid parameter combination, please see the command help.. + /// + internal static string InvalidAccountParameterCombination { + get { + return ResourceManager.GetString("InvalidAccountParameterCombination", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Blob name '{0}' is invalid. Valid names should be 1 through 1024 characters long and should not end with a . or /.. + /// + internal static string InvalidBlobName { + get { + return ResourceManager.GetString("InvalidBlobName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Blob properties '{0}' with value '{1}' is invalid. + /// + internal static string InvalidBlobProperties { + get { + return ResourceManager.GetString("InvalidBlobProperties", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Blob type of "{0}" is invalid, only page blob or block blob are supported.. + /// + internal static string InvalidBlobType { + get { + return ResourceManager.GetString("InvalidBlobType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ICloudBlob "{0}" should contain container properties.. + /// + internal static string InvalidBlobWithoutContainer { + get { + return ResourceManager.GetString("InvalidBlobWithoutContainer", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Container name '{0}' is invalid. Valid names start and end with a lower case letter or a number and has in between a lower case letter, number or dash with no consecutive dashes and is 3 through 63 characters long.. + /// + internal static string InvalidContainerName { + get { + return ResourceManager.GetString("InvalidContainerName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid enum name {0}.. + /// + internal static string InvalidEnumName { + get { + return ResourceManager.GetString("InvalidEnumName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid expiry time '{0}'.. + /// + internal static string InvalidExpiryTime { + get { + return ResourceManager.GetString("InvalidExpiryTime", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File name "{0}" is invalid.. + /// + internal static string InvalidFileName { + get { + return ResourceManager.GetString("InvalidFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The page blob size must be a multiple of 512 bytes. But the size of local file '{0}' is {1}.. + /// + internal static string InvalidPageBlobSize { + get { + return ResourceManager.GetString("InvalidPageBlobSize", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Queue name '{0}' is invalid. Valid names start and end with a lower case letter or a number and has in between a lower case letter, number or dash with no consecutive dashes and is 3 through 63 characters long.. + /// + internal static string InvalidQueueName { + get { + return ResourceManager.GetString("InvalidQueueName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified path does not represent any resource on the server.. + /// + internal static string InvalidResource { + get { + return ResourceManager.GetString("InvalidResource", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The minimum value of retention days is 1, the largest value is 365 (one year). -1 means turn off the retention policy. Current is {0}.. + /// + internal static string InvalidRetentionDay { + get { + return ResourceManager.GetString("InvalidRetentionDay", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid start time '{0}'.. + /// + internal static string InvalidStartTime { + get { + return ResourceManager.GetString("InvalidStartTime", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid storage end point '{0}'.. + /// + internal static string InvalidStorageEndPoint { + get { + return ResourceManager.GetString("InvalidStorageEndPoint", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Storage service type should be one of Blob,Table,Queue.. + /// + internal static string InvalidStorageServiceType { + get { + return ResourceManager.GetString("InvalidStorageServiceType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Table name '{0}' is invalid. Valid names are case insensitive, start with a letter and is followed by letters or numbers and is 3 through 63 characters long.. + /// + internal static string InvalidTableName { + get { + return ResourceManager.GetString("InvalidTableName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified timeout value ({0}) was out of range. The timeout accepted is in seconds and can only be a positive integer or -1.. + /// + internal static string InvalidTimeoutValue { + get { + return ResourceManager.GetString("InvalidTimeoutValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to New-Alias. + /// + internal static string NewAlias { + get { + return ResourceManager.GetString("NewAlias", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Name. + /// + internal static string NewAliasName { + get { + return ResourceManager.GetString("NewAliasName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Value. + /// + internal static string NewAliasValue { + get { + return ResourceManager.GetString("NewAliasValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to None or All operation can't be used with other operations.. + /// + internal static string NoneAndAllOperationShouldBeAlone { + get { + return ResourceManager.GetString("NoneAndAllOperationShouldBeAlone", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Object '{0}' cannot be null.. + /// + internal static string ObjectCannotBeNull { + get { + return ResourceManager.GetString("ObjectCannotBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You must supply only one permission in Off/Blob/Container for container.. + /// + internal static string OnlyOnePermissionForContainer { + get { + return ResourceManager.GetString("OnlyOnePermissionForContainer", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure to overwrite '{0}'?. + /// + internal static string OverwriteConfirmation { + get { + return ResourceManager.GetString("OverwriteConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The given path/prefix '{0}' is not a valid name for a file or directory or does match the requirement for Microsoft Azure File Service REST API.. + /// + internal static string PathInvalid { + get { + return ResourceManager.GetString("PathInvalid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The length of the given path/prefix '{0}' exceeded the max allowed length {1} for Microsoft Azure File Service REST API.. + /// + internal static string PathTooLong { + get { + return ResourceManager.GetString("PathTooLong", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Prepare to download blob.. + /// + internal static string PrepareDownloadingBlob { + get { + return ResourceManager.GetString("PrepareDownloadingBlob", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Prepare to download file.. + /// + internal static string PrepareDownloadingFile { + get { + return ResourceManager.GetString("PrepareDownloadingFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Prepare to upload blob.. + /// + internal static string PrepareUploadingBlob { + get { + return ResourceManager.GetString("PrepareUploadingBlob", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Prepare to upload file.. + /// + internal static string PrepareUploadingFile { + get { + return ResourceManager.GetString("PrepareUploadingFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Queue '{0}' already exists.. + /// + internal static string QueueAlreadyExists { + get { + return ResourceManager.GetString("QueueAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Can not find queue '{0}'.. + /// + internal static string QueueNotFound { + get { + return ResourceManager.GetString("QueueNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Download blob '{0}' into '{1}'.. + /// + internal static string ReceiveAzureBlobActivity { + get { + return ResourceManager.GetString("ReceiveAzureBlobActivity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Download file '{0}' into '{1}'.. + /// + internal static string ReceiveAzureFileActivity { + get { + return ResourceManager.GetString("ReceiveAzureFileActivity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remove operation of blob '{0}' in container '{1}' is cancelled.. + /// + internal static string RemoveBlobCancelled { + get { + return ResourceManager.GetString("RemoveBlobCancelled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removed blob '{0}' in container '{1}' successfully.. + /// + internal static string RemoveBlobSuccessfully { + get { + return ResourceManager.GetString("RemoveBlobSuccessfully", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remove operation of container '{0}' has been cancelled.. + /// + internal static string RemoveContainerCancelled { + get { + return ResourceManager.GetString("RemoveContainerCancelled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removed container '{0}' successfully.. + /// + internal static string RemoveContainerSuccessfully { + get { + return ResourceManager.GetString("RemoveContainerSuccessfully", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remove operation of queue '{0}' has been cancelled.. + /// + internal static string RemoveQueueCancelled { + get { + return ResourceManager.GetString("RemoveQueueCancelled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removed queue '{0}' successfully.. + /// + internal static string RemoveQueueSuccessfully { + get { + return ResourceManager.GetString("RemoveQueueSuccessfully", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The remove operation of table '{0}' has been cancelled.. + /// + internal static string RemoveTableCancelled { + get { + return ResourceManager.GetString("RemoveTableCancelled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removed table '{0}' successfully.. + /// + internal static string RemoveTableSuccessfully { + get { + return ResourceManager.GetString("RemoveTableSuccessfully", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [SasToken]. + /// + internal static string SasTokenAccountName { + get { + return ResourceManager.GetString("SasTokenAccountName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Upload file '{0}' to blob '{1}' in container '{2}'.. + /// + internal static string SendAzureBlobActivity { + get { + return ResourceManager.GetString("SendAzureBlobActivity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Upload file '{0}' to blob '{1}' cancelled.. + /// + internal static string SendAzureBlobCancelled { + get { + return ResourceManager.GetString("SendAzureBlobCancelled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Upload file '{0}' to '{1}' in share '{2}'.. + /// + internal static string SendAzureFileActivity { + get { + return ResourceManager.GetString("SendAzureFileActivity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The given share name/prefix '{0}' is not a valid name for a file share of Microsoft Azure File Service.. + /// + internal static string ShareNameInvalid { + get { + return ResourceManager.GetString("ShareNameInvalid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This expiry time field must be omitted if it has been specified in an associated stored access policy.. + /// + internal static string SignedExpiryTimeMustBeOmitted { + get { + return ResourceManager.GetString("SignedExpiryTimeMustBeOmitted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This permission field must be omitted if it has been specified in an associated stored access policy.. + /// + internal static string SignedPermissionsMustBeOmitted { + get { + return ResourceManager.GetString("SignedPermissionsMustBeOmitted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Skip to download blob '{0}' with snapshot time '{0}'.. + /// + internal static string SkipDownloadSnapshot { + get { + return ResourceManager.GetString("SkipDownloadSnapshot", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified source file '{0}' was not found.. + /// + internal static string SourceFileNotFound { + get { + return ResourceManager.GetString("SourceFileNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Ignore mismatch source storage context.. The source uri is {0}, the end point is {1}.. + /// + internal static string StartCopySourceContextMismatch { + get { + return ResourceManager.GetString("StartCopySourceContextMismatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Start to download blob '{0}' to '{1}'.. + /// + internal static string StartDownloadBlob { + get { + return ResourceManager.GetString("StartDownloadBlob", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Startpk must accompany startrk.. + /// + internal static string StartpkMustAccomanyStartrk { + get { + return ResourceManager.GetString("StartpkMustAccomanyStartrk", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Start {0}th remote call, method: {1}, destination: {2}.. + /// + internal static string StartRemoteCall { + get { + return ResourceManager.GetString("StartRemoteCall", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Start to upload '{0}' to blob '{1}'.. + /// + internal static string StartUploadFile { + get { + return ResourceManager.GetString("StartUploadFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Stopped the copy task on blob '{0}' in container '{1}' successfully.. + /// + internal static string StopCopyBlobSuccessfully { + get { + return ResourceManager.GetString("StopCopyBlobSuccessfully", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The stop copy operation on blob '{0}' in container '{1}' is cancelled.. + /// + internal static string StopCopyOperationCancelled { + get { + return ResourceManager.GetString("StopCopyOperationCancelled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} stop processing, Use {1} remote calls. Elapsed time {2:0.00} ms. Client operation id: {3}.. + /// + internal static string StopProcessingLog { + get { + return ResourceManager.GetString("StopProcessingLog", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error Message {0}. HTTP Status Code: {1} - HTTP Error Message: {2}. + /// + internal static string StorageExceptionDetails { + get { + return ResourceManager.GetString("StorageExceptionDetails", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Table '{0}' already exists.. + /// + internal static string TableAlreadyExists { + get { + return ResourceManager.GetString("TableAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Can not find table '{0}'.. + /// + internal static string TableNotFound { + get { + return ResourceManager.GetString("TableNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Transfer Summary + ///-------------------------------- + ///Total: {0}. + ///Successful: {1}. + ///Failed: {2}.. + /// + internal static string TransferSummary { + get { + return ResourceManager.GetString("TransferSummary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Total: {0}. Successful: {1}. Failed: {2}. Active: {3}.. + /// + internal static string TransmitActiveSummary { + get { + return ResourceManager.GetString("TransmitActiveSummary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} task status :. + /// + internal static string TransmitActivity { + get { + return ResourceManager.GetString("TransmitActivity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Transmit cancelled by user.. + /// + internal static string TransmitCancelled { + get { + return ResourceManager.GetString("TransmitCancelled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Transmit failed. Exception: {0}.. + /// + internal static string TransmitFailed { + get { + return ResourceManager.GetString("TransmitFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Transmit successfully.. + /// + internal static string TransmitSuccessfully { + get { + return ResourceManager.GetString("TransmitSuccessfully", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unknown blob.. + /// + internal static string UnknownBlob { + get { + return ResourceManager.GetString("UnknownBlob", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Can not upload file to azure blob. Error: {0}.. + /// + internal static string Upload2BlobFailed { + get { + return ResourceManager.GetString("Upload2BlobFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Upload file '{0}' failed. Error: '{1}'.. + /// + internal static string UploadFileFailed { + get { + return ResourceManager.GetString("UploadFileFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Upload file '{0}' successfully.. + /// + internal static string UploadFileSuccessfully { + get { + return ResourceManager.GetString("UploadFileSuccessfully", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Use current storage account '{0}' from subscription '{1}'.. + /// + internal static string UseCurrentStorageAccountFromSubscription { + get { + return ResourceManager.GetString("UseCurrentStorageAccountFromSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Use storage account '{0}' from storage context.. + /// + internal static string UseStorageAccountFromContext { + get { + return ResourceManager.GetString("UseStorageAccountFromContext", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} {1}.. + /// + internal static string VerboseLogFormat { + get { + return ResourceManager.GetString("VerboseLogFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Write to file '{0}' is denied.. + /// + internal static string WritePermissionDenied { + get { + return ResourceManager.GetString("WritePermissionDenied", resourceCulture); + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Resources.resx b/src/ServiceManagement/Storage/Commands.Storage/Resources.resx new file mode 100644 index 000000000000..0e11042c4d4f --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Resources.resx @@ -0,0 +1,664 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Blob '{0}' in container '{1}' already exists. + + + Can not find blob name or container name. + + + Can not find blob '{0}' in container '{1}'. + + + Are you sure to remove container '{0}'? + + + Confirm to remove azure container. + + + Container '{0}' already exists. + + + Can not find the container '{0}'. + + + Directory '{0}' doesn't exist. + + + Cannot download the blob '{0}' in container '{1}' into local file '{2}'. Error: {3} + place holder 0 for blob name, 1 for blob's container name, 2 for download destination in local machine. 3 for excpetion error message. + + + Download blob '{0}' successful. + + + File '{0}' already exists. + + + Can not find the specified file '{0}'. + + + Percent : {0}%. Average Speed : {1}/Second. + + + Blob name '{0}' is invalid. Valid names should be 1 through 1024 characters long and should not end with a . or /. + + + Container name '{0}' is invalid. Valid names start and end with a lower case letter or a number and has in between a lower case letter, number or dash with no consecutive dashes and is 3 through 63 characters long. + + + Invalid expiry time '{0}'. + + + Invalid start time '{0}'. + + + You must supply only one permission in Off/Blob/Container for container. + + + Queue '{0}' already exists. + + + Can not find queue '{0}'. + + + Removed blob '{0}' in container '{1}' successfully. + + + The remove operation of container '{0}' has been cancelled. + + + Removed container '{0}' successfully. + + + Removed queue '{0}' successfully. + + + Removed table '{0}' successfully. + + + Start to download blob '{0}' to '{1}'. + + + Start to upload '{0}' to blob '{1}'. + + + Can not find your azure storage credential. Please set current storage account using "Set-AzureSubscription" or set the "AZURE_STORAGE_CONNECTION_STRING" environment variable. + + + Table '{0}' already exists. + + + Can not find table '{0}'. + + + Unknown blob. + + + Can not upload file to azure blob. Error: {0}. + + + Upload file '{0}' failed. Error: '{1}'. + + + Upload file '{0}' successfully. + + + Blob type mismatched, the current blob type of '{0}' is {1}. + + + Can not upload the directory '{0}' to azure. If you want to upload directory, please use "ls -File -Recurse | Set-AzureStorageBlobContent -Container containerName". + + + Prepare to upload blob. + + + Upload file '{0}' to blob '{1}' in container '{2}'. + + + Upload file '{0}' to blob '{1}' cancelled. + 0 local file path, 1 blob name + + + Download blob '{0}' into '{1}'. + + + Queue name '{0}' is invalid. Valid names start and end with a lower case letter or a number and has in between a lower case letter, number or dash with no consecutive dashes and is 3 through 63 characters long. + + + Table name '{0}' is invalid. Valid names are case insensitive, start with a letter and is followed by letters or numbers and is 3 through 63 characters long. + + + The remove operation of queue '{0}' has been cancelled. + + + The remove operation of table '{0}' has been cancelled. + + + invalid parameter combination, please see the command help. + + + Blob End Point: {0}. + + + ICloudBlob "{0}" should contain container properties. + + + Object '{0}' cannot be null. + + + File name "{0}" is invalid. + + + Error Message {0}. HTTP Status Code: {1} - HTTP Error Message: {2} + + + Azure-Storage-PowerShell-{0} + + + {0} end processing, Start {1} remote calls. Finish {2} remote calls. Elapsed time {3:0.00} ms. Client operation id: {4}. + 0 for cmdlet name. 1 for started remote call counter, 2 for finished remote call counter, 3 for running time, 4 for client request id + + + Exception cannot be null or empty. + + + Finish remote call for {0} with status code {1}({2}) and service request id {3}. Elapsed time {4:0.00} ms. + 0 for request uri, 1 http status code in number, 2 http status code, 3 service request id, 4 for elapsed time. + + + Init Operation Context for '{0}' with client request id {1}. If you want to get more details, please add "-Debug" to your command. + 0 is cmdlet name, 1 is client request id + + + Start {0}th remote call, method: {1}, destination: {2}. + 0 for int counter, 1 for request method, 2 for request uri + + + {0} stop processing, Use {1} remote calls. Elapsed time {2:0.00} ms. Client operation id: {3}. + 0 for cmdlet name. 1 for remote call counter, 2 for running time, 3 for client request id + + + {0} {1}. + 0 for time, 1 for message + + + http://{0}.blob.{1}/ + 0 for storage account name, 1 for end point domain. + + + http://{0}.queue.{1}/ + 0 for storage account name, 1 for end point domain. + + + http://{0}.table.{1}/ + 0 for storage account name, 1 for end point domain. + + + Current Storage Account not found in subscription '{0}'. Please set it use "Set-AzureSubscription". + 0 subscription name + + + http:// + + + https:// + + + Can not found current storage account '{0}' of subsciption '{1}' on azure, please check whether the specified storage account exists. + 0 storage account name, 1 subscription name + + + Use current storage account '{0}' from subscription '{1}'. + 0 storage account name 1 subscription name + + + Get storage account from environment variable 'AZURE_STORAGE_CONNECTION_STRING'. + + + AZURE_STORAGE_CONNECTION_STRING + + + Init service channel from current subscription. + + + Use storage account '{0}' from storage context. + 0 for storage account name + + + {0} begin processing without ParameterSet. + + + {0} begin processing with ParameterSet '{1}'. + + + Blob type of "{0}" is invalid, only page blob or block blob are supported. + 0 for blob name + + + The specified blob '{0}' is already a snapshot with snapshot time {1}. Can't use "DeleteSnapshot" option for it. + 0 for blob name, 1 for snapshot time + + + The blob '{0}' in container '{1}' has snapshots. + 0 for blob name, 1 for container name + + + The remove operation of blob '{0}' in container '{1}' is cancelled. + 0 for blob name, 1 for container name + + + Get-AzureStorageContainerAcl + + + Get-AzureStorageContainer + + + New-Alias + + + Name + + + Value + + + Can not get storage account from subscription. Please check the subscription settings using "Get-AzureSubscription". + 0 storage account name 1 subscription name + + + Can not get storage account from environment variable 'AZURE_STORAGE_CONNECTION_STRING'. Please check whether this environment variable is valid. + + + The page blob size must be a multiple of 512 bytes. But the size of local file '{0}' is {1}. + 0 for local file path, 1 file size + + + Write to file '{0}' is denied. + 0 for local file path + + + File name can not be empty. + + + Prepare to download blob. + + + {0} ({1}){2} + 0 for blob name, 1 for snaphsot time, 2 blob name extension + + + Skip to download blob '{0}' with snapshot time '{0}'. + + + Downloading blob '{0}' in container '{1}' is cancelled. + 0 blob name, 1 container name + + + Blob properties '{0}' with value '{1}' is invalid + 0 for property name, 1 for property value + + + https://{0}.blob.{1}/ + 0 for storage account name, 1 for end point domain. + + + https://{0}.queue.{1}/ + 0 for storage account name, 1 for end point domain. + + + https://{0}.table.{1}/ + 0 for storage account name, 1 for end point domain. + + + CopyId can not be empty. + + + Stopped the copy task on blob '{0}' in container '{1}' successfully. + 0 for blob name, 1 for container name + + + Percent:{0}%. BytesCopied: {1}Bytes. TotalBytes: {2}Bytes. + 0 for copied percent, 1 for bytes copied, 2 for total bytes. + + + '{0}' copy to blob '{1}' in container '{2}' from '{3}'. + 0 for copy status, 1 for destination blob name, 2 for destination container name, 3 for source uri. + + + Successfully start copy blob '{0}' in container '{1}' to blob '{2}' in container '{3}'. + 0 for source blob name, 1 for source container name, 2 for destination blob name, 3 for destination container name. + + + Successfully start copy '{0}' to blob '{1}' in container '{2}'. + 0 for source uri, 1 for destination blob name, 2 for destination container name. + + + Copy Blob. + + + Copy Blob Status Summary. + + + Total: {0}. Successful: {1}. Active: {2}. Failed: {3}. + 0,1,2,3 for related task count. + + + Can not find copy task on specified blob '{0}' in container '{1}'. + 0 for blob name, 1 for container name. + + + Transmit failed. Exception: {0}. + 0 for error message. + + + Transmit successfully. + + + Copy request to blob '{0}' in container '{1}' has been scheduled with copyId {2}. + 0 for blob name, 1 for container name. 2 for copyid. + + + blob '{0}' in container '{1}' with CopyId {2}. + 0 for blob name, 1 for container name, 2 for copy id. + + + CopyId mismatch on blob '{0}' in container '{1}'. Expected:{2}. User supplied: {3}. + 0 for blob name, 1 for container name. 2 for copy id on blob, 3 for user supplied copy id. + + + The stop copy operation on blob '{0}' in container '{1}' is cancelled. + 0 for blob name, 1 for container name. + + + [Anonymous] + + + Are you sure to overwrite '{0}'? + 0 for destination path + + + {0:0.##}bytes + {0: -> take value from the first parameter. +0.##} ->Display at least 1 digit before the decimal point and up to 2 digits after the decimal point. + + + {0:0.##}EB + {0: -> take value from the first parameter. +0.##} ->Display at least 1 digit before the decimal point and up to 2 digits after the decimal point. + + + {0:0.##}GB + {0: -> take value from the first parameter. +0.##} ->Display at least 1 digit before the decimal point and up to 2 digits after the decimal point. + + + {0:0.##}KB + {0: -> take value from the first parameter. +0.##} ->Display at least 1 digit before the decimal point and up to 2 digits after the decimal point. + + + {0:0.##}MB + {0: -> take value from the first parameter. +0.##} ->Display at least 1 digit before the decimal point and up to 2 digits after the decimal point. + + + {0:0.##}PB + {0: -> take value from the first parameter. +0.##} ->Display at least 1 digit before the decimal point and up to 2 digits after the decimal point. + + + {0:0.##}TB + {0: -> take value from the first parameter. +0.##} ->Display at least 1 digit before the decimal point and up to 2 digits after the decimal point. + + + Transfer Summary +-------------------------------- +Total: {0}. +Successful: {1}. +Failed: {2}. + 0 for total task count, 1 for successful count, 2 for failed count + + + Ignore mismatch source storage context.. The source uri is {0}, the end point is {1}. + 0 for source uri, 1 for blob end point. + + + Fetch Permission for container '{0}' failed. Exception: {1} + 0 for container name, 1 for error message. + + + {0}-{1} + 0 for Cmdlet verb, 1 for Cmdlet noun. + + + core.windows.net + + + Invalid storage end point '{0}'. + 0 for storage end point + + + Storage service type should be one of Blob,Table,Queue. + + + Invalid enum name {0}. + 0 for enum name + + + The expiry time of the specified access policy should be greater than start time. Expiry time : {0}. Start time: {1}. + 0 for expiry time. 1 for start time. + + + Invalid access permission '{0}'. + 0 for permission + + + Invalid access policy '{0}'. + 0 for access policy. + + + [SasToken] + + + Endpk must accompany Endrk. + + + Startpk must accompany startrk. + + + Can't read the blob properties. + + + This expiry time field must be omitted if it has been specified in an associated stored access policy. + + + This permission field must be omitted if it has been specified in an associated stored access policy. + + + The minimum value of retention days is 1, the largest value is 365 (one year). -1 means turn off the retention policy. Current is {0}. + 0 for the user specified retention day + + + Confirm + + + Total: {0}. Successful: {1}. Failed: {2}. Active: {3}. + 0 for total task count, 1 for successful count, 2 for failed count, 3 for active count. + + + {0} task status : + 0 for cmdlet name. + + + Blob name should be empty when uploading multiple files. + + + None or All operation can't be used with other operations. + + + The specified cloud file '{0}' already exists. If you want to overwrite this file, use -Force option. + + + The given file name '{0}' is not valid since a file name could not end with a '/' forward slash. + + + http://{0}.file.{1}/ + 0 for storage account name, 1 for end point domain. + + + https://{0}.file.{1}/ + 0 for storage account name, 1 for end point domain. + + + The specified path does not represent any resource on the server. + + + The specified timeout value ({0}) was out of range. The timeout accepted is in seconds and can only be a positive integer or -1. + + + The given path/prefix '{0}' is not a valid name for a file or directory or does match the requirement for Microsoft Azure File Service REST API. + + + The length of the given path/prefix '{0}' exceeded the max allowed length {1} for Microsoft Azure File Service REST API. + + + The given share name/prefix '{0}' is not a valid name for a file share of Microsoft Azure File Service. + + + The specified source file '{0}' was not found. + + + Prepare to download file. + + + Prepare to upload file. + + + Download file '{0}' into '{1}'. + + + Upload file '{0}' to '{1}' in share '{2}'. + + + Transmit cancelled by user. + + \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/GetStorageAzureTable.cs b/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/GetStorageAzureTable.cs new file mode 100644 index 000000000000..d7dd7a0ee816 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/GetStorageAzureTable.cs @@ -0,0 +1,177 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; +using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; +using Microsoft.WindowsAzure.Storage.Table; + +namespace Microsoft.WindowsAzure.Commands.Storage.Table.Cmdlet +{ + /// + /// list azure tables + /// + [Cmdlet(VerbsCommon.Get, StorageNouns.Table, DefaultParameterSetName = NameParameterSet), + OutputType(typeof(AzureStorageTable))] + public class GetAzureStorageTableCommand : StorageCloudTableCmdletBase + { + /// + /// default parameter set name + /// + private const string NameParameterSet = "TableName"; + + /// + /// prefix parameter set name + /// + private const string PrefixParameterSet = "TablePrefix"; + + [Alias("N", "Table")] + [Parameter(Position = 0, HelpMessage = "Table name", + ValueFromPipeline = true, + ValueFromPipelineByPropertyName = true, + ParameterSetName = NameParameterSet)] + public string Name { get; set; } + + [Parameter(HelpMessage = "Table Prefix", + ParameterSetName = PrefixParameterSet, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Prefix { get; set; } + + /// + /// Initializes a new instance of the GetAzureStorageTableCommand class. + /// + public GetAzureStorageTableCommand() + : this(null) + { + } + + /// + /// Initializes a new instance of the GetAzureStorageTableCommand class. + /// + /// IStorageTableManagement channel + public GetAzureStorageTableCommand(IStorageTableManagement channel) + { + Channel = channel; + EnableMultiThread = false; + } + + /// + /// list azure tables by table name + /// + /// table name + /// An enumerable collection of CloudTable object + internal IEnumerable ListTablesByName(string name) + { + TableRequestOptions requestOptions = RequestOptions; + String prefix = String.Empty; + + if (String.IsNullOrEmpty(name) || WildcardPattern.ContainsWildcardCharacters(name)) + { + IEnumerable tables = Channel.ListTables(prefix, requestOptions, OperationContext); + WildcardOptions options = WildcardOptions.IgnoreCase | WildcardOptions.Compiled; + WildcardPattern wildcard = null; + + if (!string.IsNullOrEmpty(name)) + { + wildcard = new WildcardPattern(name, options); + } + + foreach (CloudTable table in tables) + { + if (wildcard == null || wildcard.IsMatch(table.Name)) + { + yield return table; + } + } + } + else + { + if (!NameUtil.IsValidTableName(name)) + { + throw new ArgumentException(String.Format(Resources.InvalidTableName, name)); + } + + CloudTable table = Channel.GetTableReference(name); + + if (Channel.DoesTableExist(table, requestOptions, OperationContext)) + { + yield return table; + } + else + { + throw new ResourceNotFoundException(String.Format(Resources.TableNotFound, name)); + } + } + } + + /// + /// list azure queues by prefix + /// + /// table prefix + /// An enumerable collection of CloudTable object + internal IEnumerable ListTablesByPrefix(string prefix) + { + TableRequestOptions reqesutOptions = RequestOptions; + + if (!NameUtil.IsValidTablePrefix(prefix)) + { + throw new ArgumentException(String.Format(Resources.InvalidTableName, prefix)); + } + + return Channel.ListTables(prefix, reqesutOptions, OperationContext); + } + + /// + /// write cloud table with storage context + /// + /// An enumerable collection of CloudTable object + internal void WriteTablesWithStorageContext(IEnumerable tableList) + { + if (null == tableList) + { + return; + } + + foreach (CloudTable table in tableList) + { + AzureStorageTable azureTable = new AzureStorageTable(table); + WriteObjectWithStorageContext(azureTable); + } + } + + /// + /// execute command + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + IEnumerable tableList = null; + + if (PrefixParameterSet == ParameterSetName) + { + tableList = ListTablesByPrefix(Prefix); + } + else + { + tableList = ListTablesByName(Name); + } + + WriteTablesWithStorageContext(tableList); + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/NewAzureStorageTableSasToken.cs b/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/NewAzureStorageTableSasToken.cs new file mode 100644 index 000000000000..b596aca8e642 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/NewAzureStorageTableSasToken.cs @@ -0,0 +1,198 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; +using Microsoft.WindowsAzure.Storage.Table; + +namespace Microsoft.WindowsAzure.Commands.Storage.Table.Cmdlet +{ + [Cmdlet(VerbsCommon.New, StorageNouns.TableSas), OutputType(typeof(String))] + public class NewAzureStorageTableSasTokenCommand : StorageCloudTableCmdletBase + { + /// + /// Sas permission parameter set name + /// + private const string SasPermissionParameterSet = "SasPermission"; + + /// + /// Sas policy paremeter set name + /// + private const string SasPolicyParmeterSet = "SasPolicy"; + + [Alias("N", "Table")] + [Parameter(Position = 0, Mandatory = true, + HelpMessage = "Table Name", + ValueFromPipeline = true, + ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(HelpMessage = "Policy Identifier", ParameterSetName = SasPolicyParmeterSet)] + public string Policy + { + get { return accessPolicyIdentifier; } + set { accessPolicyIdentifier = value; } + } + + private string accessPolicyIdentifier; + + [Parameter(HelpMessage = "Permissions for a container. Permissions can be any not-empty subset of \"audq\".", + ParameterSetName = SasPermissionParameterSet)] + public string Permission { get; set; } + + [Parameter(HelpMessage = "Start Time")] + public DateTime? StartTime { get; set; } + + [Parameter(HelpMessage = "Expiry Time")] + public DateTime? ExpiryTime { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Display full uri with sas token")] + public SwitchParameter FullUri { get; set; } + + [Alias("startpk")] + [Parameter(HelpMessage = "Start Partition Key")] + public string StartPartitionKey { get; set; } + [Alias("startrk")] + [Parameter(HelpMessage = "Start Row Key")] + public string StartRowKey { get; set; } + [Alias("endpk")] + [Parameter(HelpMessage = "End Partition Key")] + public string EndPartitionKey { get; set; } + [Alias("endrk")] + [Parameter(HelpMessage = "End Row Key")] + public string EndRowKey { get; set; } + + // Override the useless parameters + public override int? ServerTimeoutPerRequest { get; set; } + + public override int? ClientTimeoutPerRequest { get; set; } + + /// + /// Initializes a new instance of the NewAzureStorageTableSasCommand class. + /// + public NewAzureStorageTableSasTokenCommand() + : this(null) + { + } + + /// + /// Initializes a new instance of the NewAzureStorageTableSasCommand class. + /// + /// IStorageBlobManagement channel + public NewAzureStorageTableSasTokenCommand(IStorageTableManagement channel) + { + Channel = channel; + EnableMultiThread = false; + } + + /// + /// Execute command + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + if (String.IsNullOrEmpty(Name)) return; + CloudTable table = Channel.GetTableReference(Name); + SharedAccessTablePolicy policy = new SharedAccessTablePolicy(); + bool shouldSetExpiryTime = SasTokenHelper.ValidateTableAccessPolicy(Channel, table.Name, policy, accessPolicyIdentifier); + SetupAccessPolicy(policy, shouldSetExpiryTime); + ValidatePkAndRk(StartPartitionKey, StartRowKey, EndPartitionKey, EndRowKey); + string sasToken = table.GetSharedAccessSignature(policy, accessPolicyIdentifier, StartPartitionKey, + StartRowKey, EndPartitionKey, EndRowKey); + + if (FullUri) + { + string fullUri = table.Uri.ToString() + sasToken; + WriteObject(fullUri); + } + else + { + WriteObject(sasToken); + } + } + + /// + /// Validate the combination of PartitionKey and RowKey + /// + /// + /// + /// + /// + private void ValidatePkAndRk(string startPartitionKey, string startRowKey, string endPartitionKey, string endRowKey) + { + if (!string.IsNullOrEmpty(startRowKey) && string.IsNullOrEmpty(startPartitionKey)) + { + throw new ArgumentException(Resources.StartpkMustAccomanyStartrk); + } + + if (!string.IsNullOrEmpty(endRowKey) && string.IsNullOrEmpty(endPartitionKey)) + { + throw new ArgumentException(Resources.EndpkMustAccomanyEndrk); + } + } + + /// + /// Update the access policy + /// + /// Access policy object + /// Should set the default expiry time + private void SetupAccessPolicy(SharedAccessTablePolicy policy, bool shouldSetExpiryTime) + { + DateTimeOffset? accessStartTime; + DateTimeOffset? accessEndTime; + SasTokenHelper.SetupAccessPolicyLifeTime(StartTime, ExpiryTime, + out accessStartTime, out accessEndTime, shouldSetExpiryTime); + policy.SharedAccessStartTime = accessStartTime; + policy.SharedAccessExpiryTime = accessEndTime; + SetupAccessPolicyPermission(policy, Permission); + } + + /// + /// Set up access policy permission + /// + /// SharedAccessBlobPolicy object + /// Permission + internal void SetupAccessPolicyPermission(SharedAccessTablePolicy policy, string permission) + { + if (string.IsNullOrEmpty(permission)) return; + policy.Permissions = SharedAccessTablePermissions.None; + permission = permission.ToLower(); + foreach (char op in permission) + { + switch (op) + { + case StorageNouns.Permission.Add: + policy.Permissions |= SharedAccessTablePermissions.Add; + break; + case StorageNouns.Permission.Update: + policy.Permissions |= SharedAccessTablePermissions.Update; + break; + case StorageNouns.Permission.Delete: + policy.Permissions |= SharedAccessTablePermissions.Delete; + break; + case StorageNouns.Permission.Read: + case StorageNouns.Permission.Query: + policy.Permissions |= SharedAccessTablePermissions.Query; + break; + default: + throw new ArgumentException(string.Format(Resources.InvalidAccessPermission, op)); + } + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/NewStorageAzureTable.cs b/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/NewStorageAzureTable.cs new file mode 100644 index 000000000000..be6b5a6148c9 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/NewStorageAzureTable.cs @@ -0,0 +1,90 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright 2012 Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; +using Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel; +using Microsoft.WindowsAzure.Storage.Table; + +namespace Microsoft.WindowsAzure.Commands.Storage.Table.Cmdlet +{ + /// + /// create an new azure table + /// + [Cmdlet(VerbsCommon.New, StorageNouns.Table), + OutputType(typeof(AzureStorageTable))] + public class NewAzureStorageTableCommand : StorageCloudTableCmdletBase + { + [Alias("N", "Table")] + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Table name", + ValueFromPipeline = true, + ValueFromPipelineByPropertyName = true)] + public string Name { get; set; } + + /// + /// Initializes a new instance of the NewAzureStorageTableCommand class. + /// + public NewAzureStorageTableCommand() + : this(null) + { + } + + /// + /// Initializes a new instance of the NewAzureStorageTableCommand class. + /// + /// IStorageTableManagement channel + public NewAzureStorageTableCommand(IStorageTableManagement channel) + { + Channel = channel; + EnableMultiThread = false; + } + + /// + /// create an azure table + /// + /// An AzureStorageTable object + internal AzureStorageTable CreateAzureTable(string name) + { + if (!NameUtil.IsValidTableName(name)) + { + throw new ArgumentException(String.Format(Resources.InvalidTableName, name)); + } + + TableRequestOptions requestOptions = RequestOptions; + CloudTable table = Channel.GetTableReference(name); + bool created = Channel.CreateTableIfNotExists(table, requestOptions, OperationContext); + + if (!created) + { + throw new ResourceAlreadyExistException(String.Format(Resources.TableAlreadyExists, name)); + } + + return new AzureStorageTable(table); + } + + /// + /// execute command + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + AzureStorageTable azureTable = CreateAzureTable(Name); + + WriteObjectWithStorageContext(azureTable); + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/RemoveStorageAzureTable.cs b/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/RemoveStorageAzureTable.cs new file mode 100644 index 000000000000..aea6426b74f5 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Table/Cmdlet/RemoveStorageAzureTable.cs @@ -0,0 +1,136 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright 2012 Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; +using Microsoft.WindowsAzure.Storage.Table; + +namespace Microsoft.WindowsAzure.Commands.Storage.Table.Cmdlet +{ + /// + /// remove an azure table + /// + [Cmdlet(VerbsCommon.Remove, StorageNouns.Table, SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High), + OutputType(typeof(Boolean))] + public class RemoveAzureStorageTableCommand : StorageCloudTableCmdletBase + { + [Alias("N", "Table")] + [Parameter(Position = 0, Mandatory = true, HelpMessage = "Table name", + ValueFromPipeline = true, + ValueFromPipelineByPropertyName = true)] + public string Name { get; set; } + + [Parameter(HelpMessage = "Force to remove the table without confirmation")] + public SwitchParameter Force + { + get { return force; } + set { force = value; } + } + + private bool force; + + [Parameter(Mandatory = false, HelpMessage = "Return whether the specified table is successfully removed")] + public SwitchParameter PassThru { get; set; } + + /// + /// Initializes a new instance of the RemoveAzureStorageTableCommand class. + /// + public RemoveAzureStorageTableCommand() + : this(null) + { + } + + /// + /// Initializes a new instance of the RemoveAzureStorageTableCommand class. + /// + /// IStorageTableManagement channel + public RemoveAzureStorageTableCommand(IStorageTableManagement channel) + { + Channel = channel; + EnableMultiThread = false; + } + + /// + /// confirm the remove operation + /// + /// confirmation message + /// true if user confirm the remove operation, otherwise false + internal virtual bool ConfirmRemove(string message) + { + return ShouldProcess(message); + } + + /// + /// remove azure table + /// + /// table name + /// + /// true if the table is removed, false if user cancel the operation, + /// otherwise throw an exception + internal bool RemoveAzureTable(string name) + { + if (!NameUtil.IsValidTableName(name)) + { + throw new ArgumentException(String.Format(Resources.InvalidTableName, name)); + } + + TableRequestOptions requestOptions = RequestOptions; + CloudTable table = Channel.GetTableReference(name); + + if (!Channel.DoesTableExist(table, requestOptions, OperationContext)) + { + throw new ResourceNotFoundException(String.Format(Resources.TableNotFound, name)); + } + + if (force || ConfirmRemove(name)) + { + Channel.Delete(table, requestOptions, OperationContext); + return true; + } + else + { + return false; + } + } + + /// + /// execute command + /// + [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] + public override void ExecuteCmdlet() + { + string result = string.Empty; + bool success = RemoveAzureTable(Name); + + if (success) + { + result = String.Format(Resources.RemoveTableSuccessfully, Name); + } + else + { + result = String.Format(Resources.RemoveTableCancelled, Name); + } + + WriteVerbose(result); + + if (PassThru) + { + WriteObject(success); + } + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/Storage/Commands.Storage/Table/StorageCloudTableCmdletBase.cs b/src/ServiceManagement/Storage/Commands.Storage/Table/StorageCloudTableCmdletBase.cs new file mode 100644 index 000000000000..d56f4a6cfa21 --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/Table/StorageCloudTableCmdletBase.cs @@ -0,0 +1,57 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright 2012 Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// --------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Storage.Common; +using Microsoft.WindowsAzure.Commands.Storage.Model.Contract; +using Microsoft.WindowsAzure.Storage.Table; + +namespace Microsoft.WindowsAzure.Commands.Storage.Table +{ + /// + /// base class for table cmdlet + /// + public class StorageCloudTableCmdletBase : StorageCloudCmdletBase + { + // Overwrite the useless parameter + public override int? ServerTimeoutPerRequest { get; set; } + public override int? ClientTimeoutPerRequest { get; set; } + public override int? ConcurrentTaskCount { get; set; } + + /// + /// create table storage service management channel. + /// + /// IStorageTableManagement object + protected override IStorageTableManagement CreateChannel() + { + //Init storage table management channel + if (Channel == null || !ShareChannel) + { + Channel = new StorageTableManagement(GetCmdletStorageContext()); + } + + return Channel; + } + + /// + /// Table request options + /// + public TableRequestOptions RequestOptions + { + get + { + return (TableRequestOptions)GetRequestOptions(StorageServiceType.Table); + } + } + } +} diff --git a/src/ServiceManagement/Storage/Commands.Storage/packages.config b/src/ServiceManagement/Storage/Commands.Storage/packages.config new file mode 100644 index 000000000000..9979bb0e1f8f --- /dev/null +++ b/src/ServiceManagement/Storage/Commands.Storage/packages.config @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Commands.TrafficManager.Test.csproj b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Commands.TrafficManager.Test.csproj new file mode 100644 index 000000000000..d57b7814a183 --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Commands.TrafficManager.Test.csproj @@ -0,0 +1,163 @@ + + + + + Debug + AnyCPU + {84F99CBD-5B86-4428-B263-135B2F67F512} + Library + Properties + Microsoft.WindowsAzure.Commands.TrafficManager.Test + Microsoft.WindowsAzureCommands.TrafficManager.Test + v4.5 + 512 + + ..\ + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + + ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll + + + ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll + + + ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.TrafficManager.0.14.0-preview\lib\net40\Microsoft.WindowsAzure.Management.TrafficManager.dll + True + + + False + ..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll + + + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + True + + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll + + + + + + + + + 3.5 + + + + False + + + + + + + + + + + + + + + + + + + + + + + + + + + {3b48a77b-5956-4a62-9081-92ba04b02b27} + Commands.Common.Test + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + {94e96a5c-b5ad-4e10-b13a-3bc16d102aed} + Commands.TrafficManager + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Endpoints/AddTrafficManagerEndpointTests.cs b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Endpoints/AddTrafficManagerEndpointTests.cs new file mode 100644 index 000000000000..eeb36f0f3f43 --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Endpoints/AddTrafficManagerEndpointTests.cs @@ -0,0 +1,273 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.TrafficManager.Endpoint; +using Microsoft.WindowsAzure.Commands.TrafficManager.Models; +using Microsoft.WindowsAzure.Management.TrafficManager.Models; + +namespace Microsoft.WindowsAzure.Commands.Test.TrafficManager.Endpoints +{ + [TestClass] + public class AddTrafficManagerEndpointTests : TestBase + { + private const string ProfileName = "my-profile"; + private const string ProfileDomainName = "my.profile.trafficmanager.net"; + private const string TopLevelProfileDomainName = "my.toplevelprofile.trafficmanager.net"; + private const LoadBalancingMethod DefaultLoadBalancingMethod = LoadBalancingMethod.Failover; + private const string DomainName = "www.example.com"; + private const string CloudServiceType = "CloudService"; + private const string AzureWebsiteType = "AzureWebsite"; + private const string AnyType = "Any"; + private const string TrafficManagerType = "TrafficManager"; + private const EndpointStatus Status = EndpointStatus.Enabled; + private const int Weight = 3; + private const int MinChildEndpoints = 3; + + private MockCommandRuntime mockCommandRuntime; + + private AddAzureTrafficManagerEndpoint cmdlet; + + [TestInitialize] + public void TestSetup() + { + mockCommandRuntime = new MockCommandRuntime(); + } + + [TestMethod] + public void AddTrafficManagerEndpointCloudService() + { + ProfileWithDefinition original = GetProfileWithDefinition(); + + // Setup + cmdlet = new AddAzureTrafficManagerEndpoint + { + DomainName = DomainName, + Type = CloudServiceType, + Weight = Weight, + Status = Status.ToString(), + TrafficManagerProfile = original, + CommandRuntime = mockCommandRuntime + }; + + // Action + cmdlet.ExecuteCmdlet(); + + // Assert + var actual = mockCommandRuntime.OutputPipeline[0] as ProfileWithDefinition; + + // All the properties stay the same except the endpoints + AssertAllProfilePropertiesDontChangeExceptEndpoints(original, actual); + + // There is a new endpoint with the new domain name in "actual" + Assert.IsTrue(actual.Endpoints.Any(e => e.DomainName == DomainName)); + } + + [TestMethod] + public void AddTrafficManagerEndpointWebsite() + { + ProfileWithDefinition original = GetProfileWithDefinition(); + + // Setup + cmdlet = new AddAzureTrafficManagerEndpoint + { + DomainName = DomainName, + Type = AzureWebsiteType, + Weight = Weight, + TrafficManagerProfile = original, + CommandRuntime = mockCommandRuntime, + Status = "Enabled" + }; + + // Action + cmdlet.ExecuteCmdlet(); + + // Assert + var actual = mockCommandRuntime.OutputPipeline[0] as ProfileWithDefinition; + + // All the properties stay the same except the endpoints + AssertAllProfilePropertiesDontChangeExceptEndpoints(original, actual); + + // There is a new endpoint with the new domain name in "actual" but not in "original" + Assert.IsTrue(actual.Endpoints.Any(e => e.DomainName == DomainName)); + } + + [TestMethod] + public void AddTrafficManagerEndpointAny() + { + ProfileWithDefinition original = GetProfileWithDefinition(); + + cmdlet = new AddAzureTrafficManagerEndpoint + { + DomainName = DomainName, + Type = AnyType, + Weight = Weight, + TrafficManagerProfile = original, + CommandRuntime = mockCommandRuntime, + Status = "Enabled" + }; + + // Action + cmdlet.ExecuteCmdlet(); + + var actual = mockCommandRuntime.OutputPipeline[0] as ProfileWithDefinition; + + // Assert + // All the properties stay the same except the endpoints + AssertAllProfilePropertiesDontChangeExceptEndpoints(original, actual); + + // There is a new endpoint with the new domain name in "actual" but not in "original" + Assert.IsTrue(actual.Endpoints.Any(e => e.DomainName == DomainName)); + } + + [TestMethod] + public void AddTrafficManagerEndpointTrafficManager() + { + ProfileWithDefinition nestedProfile = GetProfileWithDefinition(); + ProfileWithDefinition topLevelProfile = GetProfileWithDefinition(TopLevelProfileDomainName); + + cmdlet = new AddAzureTrafficManagerEndpoint + { + DomainName = DomainName, + Type = AnyType, + Weight = Weight, + TrafficManagerProfile = nestedProfile, + CommandRuntime = mockCommandRuntime, + Status = "Enabled" + }; + + var cmdletTopLevelEndpoint = new AddAzureTrafficManagerEndpoint + { + DomainName = ProfileDomainName, + Type = TrafficManagerType, + Weight = Weight, + MinChildEndpoints = MinChildEndpoints, + TrafficManagerProfile = topLevelProfile, + CommandRuntime = mockCommandRuntime, + Status = "Enabled" + }; + + // Action + cmdlet.ExecuteCmdlet(); + cmdletTopLevelEndpoint.ExecuteCmdlet(); + + var actualNestedProfile = mockCommandRuntime.OutputPipeline[0] as ProfileWithDefinition; + var actualTopLevelProfile = mockCommandRuntime.OutputPipeline[1] as ProfileWithDefinition; + + // Assert + // All the properties stay the same except the endpoints + AssertAllProfilePropertiesDontChangeExceptEndpoints(nestedProfile, actualNestedProfile); + AssertAllProfilePropertiesDontChangeExceptEndpoints(topLevelProfile, actualTopLevelProfile); + + // There is a new endpoint with the new domain name in "actual" but not in "nestedProfile" + Assert.IsTrue(actualNestedProfile.Endpoints.Any(e => e.DomainName == DomainName)); + Assert.IsTrue(actualTopLevelProfile.Endpoints.Any(e => e.DomainName == ProfileDomainName)); + } + + [TestMethod] + public void AddTrafficManagerEndpointAlreadyExistsFails() + { + // Setup + ProfileWithDefinition original = GetProfileWithDefinition(); + + var existingEndpoint = new TrafficManagerEndpoint + { + DomainName = DomainName, + Type = EndpointType.Any, + Status = EndpointStatus.Enabled + }; + + original.Endpoints.Add(existingEndpoint); + + cmdlet = new AddAzureTrafficManagerEndpoint + { + DomainName = DomainName, + Type = AnyType, + TrafficManagerProfile = original, + CommandRuntime = mockCommandRuntime + }; + + // Action + Assert + Testing.AssertThrows(() => cmdlet.ExecuteCmdlet()); + } + + [TestMethod] + public void AddTrafficManagerEndpointNoWeightNoLocationNoMinChildEndpoints() + { + // Setup + ProfileWithDefinition original = GetProfileWithDefinition(); + + cmdlet = new AddAzureTrafficManagerEndpoint + { + DomainName = DomainName, + Type = AnyType, + TrafficManagerProfile = original, + CommandRuntime = mockCommandRuntime, + Status = "Enabled" + }; + + // Action + cmdlet.ExecuteCmdlet(); + + var actual = mockCommandRuntime.OutputPipeline[0] as ProfileWithDefinition; + + // Assert + // All the properties stay the same except the endpoints + AssertAllProfilePropertiesDontChangeExceptEndpoints(original, actual); + + // There is a new endpoint with the new domain name in "actual" but not in "original" + Assert.IsTrue(actual.Endpoints.Any(e => e.DomainName == DomainName)); + TrafficManagerEndpoint endpoint = actual.Endpoints.First(e => e.DomainName == DomainName); + + Assert.AreEqual(null, endpoint.Weight); + Assert.IsNull(endpoint.Location); + Assert.AreEqual(null, endpoint.MinChildEndpoints); + } + + private ProfileWithDefinition GetProfileWithDefinition(string profileDomainName = ProfileDomainName) + { + return new ProfileWithDefinition + { + DomainName = profileDomainName, + Name = ProfileName, + Endpoints = new List(), + LoadBalancingMethod = DefaultLoadBalancingMethod, + MonitorPort = 80, + Status = ProfileDefinitionStatus.Enabled, + MonitorRelativePath = "/", + TimeToLiveInSeconds = 30 + }; + } + + private void AssertAllProfilePropertiesDontChangeExceptEndpoints( + ProfileWithDefinition original, + ProfileWithDefinition actual) + { + Assert.AreEqual(original.DomainName, actual.DomainName); + Assert.AreEqual(original.Name, actual.Name); + Assert.AreEqual(original.LoadBalancingMethod, actual.LoadBalancingMethod); + Assert.AreEqual(original.MonitorPort, actual.MonitorPort); + Assert.AreEqual(original.Status, actual.Status); + Assert.AreEqual(original.MonitorRelativePath, actual.MonitorRelativePath); + Assert.AreEqual(original.TimeToLiveInSeconds, actual.TimeToLiveInSeconds); + } + + } + +} diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Endpoints/NewTrafficManagerProfileTests.cs b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Endpoints/NewTrafficManagerProfileTests.cs new file mode 100644 index 000000000000..bfa9a797ac9e --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Endpoints/NewTrafficManagerProfileTests.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.TrafficManager.Endpoint; +using Microsoft.WindowsAzure.Commands.Utilities.TrafficManager; +using Microsoft.WindowsAzure.Management.TrafficManager.Models; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.TrafficManager.Profiles +{ + [TestClass] + public class NewTrafficManagerProfileTests + { + private const string profileName = "my-profile"; + private const string profileDomainName = "my.profile.trafficmanager.net"; + private const LoadBalancingMethod loadBalancingMethod = LoadBalancingMethod.Failover; + private const string domainName = "www.example.com"; + private const int weight = 3; + private const string cloudServiceType = "CloudService"; + private const string azureWebsiteType = "AzureWebsite"; + private const string anyType = "Any"; + private const string location = "West US"; + private const EndpointStatus status = EndpointStatus.Enabled; + private const int monitorPort = 80; + private const DefinitionMonitorProtocol monitorProtocol = DefinitionMonitorProtocol.Http; + private const string monitorRelativePath = "/"; + private const int ttl = 30; + + private MockCommandRuntime mockCommandRuntime; + + private AddAzureTrafficManagerEndpoint cmdlet; + + private Mock clientMock; + + [TestInitialize] + public void TestSetup() + { + mockCommandRuntime = new MockCommandRuntime(); + cmdlet = new AddAzureTrafficManagerEndpoint(); + cmdlet.CommandRuntime = mockCommandRuntime; + clientMock = new Mock(); + } + + [TestMethod] + public void ProcessNewProfileTest() + { + clientMock.Setup(c => c.CreateTrafficManagerProfile()) + } + } +} diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Endpoints/RemoveTrafficManagerEndpointTests.cs b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Endpoints/RemoveTrafficManagerEndpointTests.cs new file mode 100644 index 000000000000..7b8d1c286455 --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Endpoints/RemoveTrafficManagerEndpointTests.cs @@ -0,0 +1,142 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.TrafficManager.Endpoint; +using Microsoft.WindowsAzure.Commands.TrafficManager.Models; +using Microsoft.WindowsAzure.Management.TrafficManager.Models; + +namespace Microsoft.WindowsAzure.Commands.Test.TrafficManager.Endpoints +{ + [TestClass] + public class RemoveTrafficManagerEndpointTests : TestBase + { + private const string ProfileName = "my-profile"; + private const string ProfileDomainName = "my.profile.trafficmanager.net"; + private const LoadBalancingMethod DefaultLoadBalancingMethod = LoadBalancingMethod.Failover; + private const string DomainName = "www.example.com"; + + private MockCommandRuntime mockCommandRuntime; + + private RemoveAzureTrafficManagerEndpoint cmdlet; + + [TestInitialize] + public void TestSetup() + { + mockCommandRuntime = new MockCommandRuntime(); + } + + [TestMethod] + public void RemoveTrafficManagerEndpointSucceeds() + { + // Setup + ProfileWithDefinition original = GetProfileWithDefinition(); + + var existingEndpoint = new TrafficManagerEndpoint + { + DomainName = DomainName, + Type = EndpointType.Any, + Status = EndpointStatus.Enabled + }; + + original.Endpoints.Add(existingEndpoint); + + // Assert the endpoint exists + Assert.IsTrue(original.Endpoints.Any(e => e.DomainName == DomainName)); + + cmdlet = new RemoveAzureTrafficManagerEndpoint + { + DomainName = DomainName.ToUpper(), + TrafficManagerProfile = original, + CommandRuntime = mockCommandRuntime + }; + + // Action + cmdlet.ExecuteCmdlet(); + + // Assert + var actual = mockCommandRuntime.OutputPipeline[0] as ProfileWithDefinition; + + // All the properties stay the same except the endpoints + AssertAllProfilePropertiesDontChangeExceptEndpoints(original, actual); + + // There is a new endpoint with the new domain name in "actual" + Assert.IsNotNull(actual); + Assert.IsFalse(actual.Endpoints.Any(e => e.DomainName == DomainName)); + } + + [TestMethod] + public void RemoveTrafficManagerEndpointNonExistingFails() + { + // Setup + ProfileWithDefinition original = GetProfileWithDefinition(); + + var existingEndpoint = new TrafficManagerEndpoint + { + DomainName = DomainName, + Type = EndpointType.Any, + Status = EndpointStatus.Enabled + }; + + original.Endpoints.Add(existingEndpoint); + + // Assert the endpoint exists + Assert.IsTrue(original.Endpoints.Any(e => e.DomainName == DomainName)); + + cmdlet = new RemoveAzureTrafficManagerEndpoint + { + DomainName = DomainName, + TrafficManagerProfile = original, + CommandRuntime = mockCommandRuntime + }; + + // Action + Assert + Testing.AssertThrows(() => cmdlet.ExecuteCmdlet()); + } + + private ProfileWithDefinition GetProfileWithDefinition() + { + return new ProfileWithDefinition + { + DomainName = ProfileDomainName, + Name = ProfileName, + Endpoints = new List(), + LoadBalancingMethod = DefaultLoadBalancingMethod, + MonitorPort = 80, + Status = ProfileDefinitionStatus.Enabled, + MonitorRelativePath = "/", + TimeToLiveInSeconds = 30 + }; + } + + private void AssertAllProfilePropertiesDontChangeExceptEndpoints( + ProfileWithDefinition original, + ProfileWithDefinition actual) + { + Assert.AreEqual(original.DomainName, actual.DomainName); + Assert.AreEqual(original.Name, actual.Name); + Assert.AreEqual(original.LoadBalancingMethod, actual.LoadBalancingMethod); + Assert.AreEqual(original.MonitorPort, actual.MonitorPort); + Assert.AreEqual(original.Status, actual.Status); + Assert.AreEqual(original.MonitorRelativePath, actual.MonitorRelativePath); + Assert.AreEqual(original.TimeToLiveInSeconds, actual.TimeToLiveInSeconds); + } + } +} diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Endpoints/SetTrafficManagerEndpointTests.cs b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Endpoints/SetTrafficManagerEndpointTests.cs new file mode 100644 index 000000000000..623df4ce4d16 --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Endpoints/SetTrafficManagerEndpointTests.cs @@ -0,0 +1,357 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; +using Microsoft.WindowsAzure.Commands.TrafficManager.Endpoint; +using Microsoft.WindowsAzure.Commands.TrafficManager.Models; +using Microsoft.WindowsAzure.Management.TrafficManager.Models; + +namespace Microsoft.WindowsAzure.Commands.Test.TrafficManager.Endpoints +{ + [TestClass] + public class SetTrafficManagerEndpointTests : TestBase + { + private const string ProfileName = "my-profile"; + private const string ProfileDomainName = "my.profile.trafficmanager.net"; + private const LoadBalancingMethod DefaultLoadBalancingMethod = LoadBalancingMethod.Failover; + private const string DomainName = "www.example.com"; + private const int Weight = 3; + private const int MinChildEndpoints = 2; + private const string Location = "West US"; + private MockCommandRuntime mockCommandRuntime; + private SetAzureTrafficManagerEndpoint cmdlet; + + [TestInitialize] + public void TestSetup() + { + mockCommandRuntime = new MockCommandRuntime(); + } + + [TestMethod] + public void SetTrafficManagerEndpointSucceeds() + { + // Setup + ProfileWithDefinition original = GetProfileWithDefinition(); + + var existingEndpoint = new TrafficManagerEndpoint + { + DomainName = DomainName, + Type = EndpointType.Any, + Status = EndpointStatus.Enabled, + Weight = 10, + MinChildEndpoints = 2 + }; + + original.Endpoints.Add(existingEndpoint); + + // Assert the endpoint exists + Assert.IsTrue(original.Endpoints.Any(e => e.DomainName == DomainName)); + + cmdlet = new SetAzureTrafficManagerEndpoint + { + DomainName = DomainName, + TrafficManagerProfile = original, + Weight = Weight, + MinChildEndpoints = MinChildEndpoints, + Location = Location, + CommandRuntime = mockCommandRuntime + }; + + // Action + cmdlet.ExecuteCmdlet(); + + // Assert + var actual = mockCommandRuntime.OutputPipeline[0] as ProfileWithDefinition; + + // All the properties stay the same except the endpoints + AssertAllProfilePropertiesDontChangeExceptEndpoints(original, actual); + + // There is an endpoint with the domain name in "actual" + Assert.IsNotNull(actual); + Assert.IsTrue(actual.Endpoints.Any(e => e.DomainName == DomainName)); + TrafficManagerEndpoint updatedEndpoint = actual.Endpoints.First(e => e.DomainName == DomainName); + + // Unchanged properties + Assert.AreEqual(EndpointType.Any, updatedEndpoint.Type); + Assert.AreEqual(EndpointStatus.Enabled, updatedEndpoint.Status); + + // Updated properties + Assert.AreEqual(Weight, updatedEndpoint.Weight); + Assert.AreEqual(Location, updatedEndpoint.Location); + Assert.AreEqual(MinChildEndpoints, updatedEndpoint.MinChildEndpoints); + } + + [TestMethod] + public void SetTrafficManagerNotOverrideWeight() + { + // Setup + ProfileWithDefinition original = GetProfileWithDefinition(); + + var existingEndpoint = new TrafficManagerEndpoint + { + DomainName = DomainName, + Type = EndpointType.Any, + Status = EndpointStatus.Enabled, + Weight = Weight + }; + + original.Endpoints.Add(existingEndpoint); + + // Assert the endpoint exists + Assert.IsTrue(original.Endpoints.Any(e => e.DomainName == DomainName)); + + cmdlet = new SetAzureTrafficManagerEndpoint + { + DomainName = DomainName, + TrafficManagerProfile = original, + Location = Location, + CommandRuntime = mockCommandRuntime + }; + + // Action + cmdlet.ExecuteCmdlet(); + + // Assert + var actual = mockCommandRuntime.OutputPipeline[0] as ProfileWithDefinition; + + // All the properties stay the same except the endpoints + AssertAllProfilePropertiesDontChangeExceptEndpoints(original, actual); + + // There is an endpoint with the domain name in "actual" + Assert.IsNotNull(actual); + Assert.IsTrue(actual.Endpoints.Any(e => e.DomainName == DomainName)); + TrafficManagerEndpoint updatedEndpoint = actual.Endpoints.First(e => e.DomainName == DomainName); + + // Unchanged properties + Assert.AreEqual(EndpointType.Any, updatedEndpoint.Type); + Assert.AreEqual(EndpointStatus.Enabled, updatedEndpoint.Status); + + // Updated properties + Assert.AreEqual(Weight, updatedEndpoint.Weight); + Assert.AreEqual(Location, updatedEndpoint.Location); + } + + [TestMethod] + public void SetTrafficManagerEndpointNotExisting() + { + // Setup + ProfileWithDefinition original = GetProfileWithDefinition(); + TrafficManagerEndpoint expectedEndpoint = new TrafficManagerEndpoint() + { + DomainName = DomainName, + Type = EndpointType.Any, + Status = EndpointStatus.Enabled, + Weight = Weight, + MinChildEndpoints = MinChildEndpoints, + Location = Location + }; + + cmdlet = new SetAzureTrafficManagerEndpoint + { + DomainName = DomainName, + TrafficManagerProfile = original, + Type = EndpointType.Any.ToString(), + Weight = Weight, + MinChildEndpoints = MinChildEndpoints, + Location = Location, + Status = EndpointStatus.Enabled.ToString(), + CommandRuntime = mockCommandRuntime + }; + + // Assert the endpoint doesn't exist + Assert.IsFalse(original.Endpoints.Any(e => e.DomainName == DomainName)); + + // Action + cmdlet.ExecuteCmdlet(); + + var actual = mockCommandRuntime.OutputPipeline[0] as ProfileWithDefinition; + + // There is a new endpoint with the domain name in "actual" + Assert.IsNotNull(actual); + Assert.IsTrue(actual.Endpoints.Any(e => e.DomainName == DomainName)); + TrafficManagerEndpoint newEndpoint = actual.Endpoints.First(e => e.DomainName == DomainName); + Assert.AreEqual(expectedEndpoint, newEndpoint); + } + + /// + /// The Type of the endpoint is a required field for new endpoints. Since it's not provided in the arguments + /// to the cmdlet, the cmdlet fails. + /// + [TestMethod] + public void SetTrafficManagerEndpointMissinTypeFails() + { + // Setup + ProfileWithDefinition original = GetProfileWithDefinition(); + + cmdlet = new SetAzureTrafficManagerEndpoint + { + DomainName = DomainName, + TrafficManagerProfile = original, + Weight = Weight, + Location = Location, + Status = EndpointStatus.Enabled.ToString(), + CommandRuntime = mockCommandRuntime + }; + + // Assert the endpoint doesn't exist + Assert.IsFalse(original.Endpoints.Any(e => e.DomainName == DomainName)); + + // Action + Assert + Testing.AssertThrows( + () => cmdlet.ExecuteCmdlet(), + Microsoft.WindowsAzure.Commands.Common.Properties.Resources.SetTrafficManagerEndpointNeedsParameters); + } + + /// + /// The Type of the endpoint is a required field for new endpoints. Since it's not provided in the arguments + /// to the cmdlet, the cmdlet fails. + /// + [TestMethod] + public void SetTrafficManagerEndpointMissingStatusFails() + { + // Setup + ProfileWithDefinition original = GetProfileWithDefinition(); + + cmdlet = new SetAzureTrafficManagerEndpoint + { + DomainName = DomainName, + TrafficManagerProfile = original, + Weight = Weight, + Location = Location, + Type = EndpointType.Any.ToString(), + CommandRuntime = mockCommandRuntime + }; + + // Assert the endpoint doesn't exist + Assert.IsFalse(original.Endpoints.Any(e => e.DomainName == DomainName)); + + // Action + Assert + Testing.AssertThrows( + () => cmdlet.ExecuteCmdlet(), + Microsoft.WindowsAzure.Commands.Common.Properties.Resources.SetTrafficManagerEndpointNeedsParameters); + } + + /// + /// The Type of the endpoint is a required field for new endpoints. Since it's not provided in the arguments + /// to the cmdlet, the cmdlet fails. + /// + [TestMethod] + public void SetTrafficManagerEndpointMissingWeightSucceeds() + { + // Setup + ProfileWithDefinition original = GetProfileWithDefinition(); + + cmdlet = new SetAzureTrafficManagerEndpoint + { + DomainName = DomainName, + TrafficManagerProfile = original, + Location = Location, + Type = EndpointType.Any.ToString(), + Status = EndpointStatus.Enabled.ToString(), + CommandRuntime = mockCommandRuntime + }; + + // Assert the endpoint doesn't exist + Assert.IsFalse(original.Endpoints.Any(e => e.DomainName == DomainName)); + + // Action + cmdlet.ExecuteCmdlet(); + + // Assert + var actual = mockCommandRuntime.OutputPipeline[0] as ProfileWithDefinition; + + // There is a new endpoint with the domain name in "actual" + Assert.IsNotNull(actual); + Assert.IsTrue(actual.Endpoints.Any(e => e.DomainName == DomainName)); + TrafficManagerEndpoint newEndpoint = actual.Endpoints.First(e => e.DomainName == DomainName); + + Assert.AreEqual(EndpointType.Any, newEndpoint.Type); + Assert.AreEqual(EndpointStatus.Enabled, newEndpoint.Status); + + // Default weight value in PS is null + Assert.AreEqual(null, newEndpoint.Weight); + Assert.AreEqual(Location, newEndpoint.Location); + } + + [TestMethod] + public void SetTrafficManagerEndpointMissingLocationSucceeds() + { + // Setup + ProfileWithDefinition original = GetProfileWithDefinition(); + + cmdlet = new SetAzureTrafficManagerEndpoint + { + DomainName = DomainName, + TrafficManagerProfile = original, + Weight = Weight, + Type = EndpointType.Any.ToString(), + Status = EndpointStatus.Enabled.ToString(), + CommandRuntime = mockCommandRuntime + }; + + // Assert the endpoint doesn't exist + Assert.IsFalse(original.Endpoints.Any(e => e.DomainName == DomainName)); + + // Action + cmdlet.ExecuteCmdlet(); + + // Assert + var actual = mockCommandRuntime.OutputPipeline[0] as ProfileWithDefinition; + + // There is a new endpoint with the domain name in "actual" + Assert.IsNotNull(actual); + Assert.IsTrue(actual.Endpoints.Any(e => e.DomainName == DomainName)); + TrafficManagerEndpoint newEndpoint = actual.Endpoints.First(e => e.DomainName == DomainName); + + Assert.AreEqual(EndpointType.Any, newEndpoint.Type); + Assert.AreEqual(EndpointStatus.Enabled, newEndpoint.Status); + + Assert.AreEqual(Weight, newEndpoint.Weight); + Assert.AreEqual(null, newEndpoint.Location); + } + + private ProfileWithDefinition GetProfileWithDefinition() + { + return new ProfileWithDefinition + { + DomainName = ProfileDomainName, + Name = ProfileName, + Endpoints = new List(), + LoadBalancingMethod = DefaultLoadBalancingMethod, + MonitorPort = 80, + Status = ProfileDefinitionStatus.Enabled, + MonitorRelativePath = "/", + TimeToLiveInSeconds = 30 + }; + } + + private void AssertAllProfilePropertiesDontChangeExceptEndpoints( + ProfileWithDefinition original, + ProfileWithDefinition actual) + { + Assert.AreEqual(original.DomainName, actual.DomainName); + Assert.AreEqual(original.Name, actual.Name); + Assert.AreEqual(original.LoadBalancingMethod, actual.LoadBalancingMethod); + Assert.AreEqual(original.MonitorPort, actual.MonitorPort); + Assert.AreEqual(original.Status, actual.Status); + Assert.AreEqual(original.MonitorRelativePath, actual.MonitorRelativePath); + Assert.AreEqual(original.TimeToLiveInSeconds, actual.TimeToLiveInSeconds); + } + } +} diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/MSSharedLibKey.snk b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/MSSharedLibKey.snk differ diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Profiles/DisableTrafficManagerProfileTests.cs b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Profiles/DisableTrafficManagerProfileTests.cs new file mode 100644 index 000000000000..aabd6ae6408b --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Profiles/DisableTrafficManagerProfileTests.cs @@ -0,0 +1,85 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.TrafficManager.Profile; +using Microsoft.WindowsAzure.Commands.TrafficManager.Utilities; +using Microsoft.WindowsAzure.Management.TrafficManager.Models; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.TrafficManager.Profiles +{ + [TestClass] + public class DisableTrafficManagerProfileTests + { + private const string ProfileName = "my-profile"; + + private MockCommandRuntime mockCommandRuntime; + + private DisableAzureTrafficManagerProfile cmdlet; + + private Mock clientMock; + + [TestInitialize] + public void TestSetup() + { + mockCommandRuntime = new MockCommandRuntime(); + clientMock = new Mock(); + } + + [TestMethod] + public void DisableProfileSucceedsNoPassThru() + { + // Setup + clientMock.Setup(c => c.ListProfiles()).Verifiable(); + cmdlet = new DisableAzureTrafficManagerProfile + { + Name = ProfileName, + CommandRuntime = mockCommandRuntime, + TrafficManagerClient = clientMock.Object + }; + + // Action + cmdlet.ExecuteCmdlet(); + + // Assert + clientMock.Verify(c => c.UpdateProfileStatus(ProfileName, ProfileDefinitionStatus.Disabled), Times.Once()); + Assert.AreEqual(0, mockCommandRuntime.OutputPipeline.Count); + } + + [TestMethod] + public void DisableProfileSucceedsPassThru() + { + clientMock.Setup(c => c.ListProfiles()).Verifiable(); + + // Setup + cmdlet = new DisableAzureTrafficManagerProfile + { + Name = ProfileName, + CommandRuntime = mockCommandRuntime, + TrafficManagerClient = clientMock.Object, + PassThru = new SwitchParameter(true) + }; + + // Action + cmdlet.ExecuteCmdlet(); + + // Assert + clientMock.Verify(c => c.UpdateProfileStatus(ProfileName, ProfileDefinitionStatus.Disabled), Times.Once()); + Assert.AreEqual(true, (bool)mockCommandRuntime.OutputPipeline[0]); + } + } +} diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Profiles/EnableTrafficManagerProfileTests.cs b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Profiles/EnableTrafficManagerProfileTests.cs new file mode 100644 index 000000000000..02197727f040 --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Profiles/EnableTrafficManagerProfileTests.cs @@ -0,0 +1,87 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.TrafficManager.Profile; +using Microsoft.WindowsAzure.Commands.TrafficManager.Utilities; +using Microsoft.WindowsAzure.Management.TrafficManager.Models; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.TrafficManager.Profiles +{ + [TestClass] + public class EnableTrafficManagerProfileTests + { + private const string ProfileName = "my-profile"; + + private MockCommandRuntime mockCommandRuntime; + + private EnableAzureTrafficManagerProfile cmdlet; + + private Mock clientMock; + + [TestInitialize] + public void TestSetup() + { + mockCommandRuntime = new MockCommandRuntime(); + clientMock = new Mock(); + } + + [TestMethod] + public void EnableProfileSucceedsNoPassThru() + { + // Setup + clientMock.Setup(c => c.ListProfiles()).Verifiable(); + + cmdlet = new EnableAzureTrafficManagerProfile + { + Name = ProfileName, + CommandRuntime = mockCommandRuntime, + TrafficManagerClient = clientMock.Object + }; + + // Action + cmdlet.ExecuteCmdlet(); + + // Assert + clientMock.Verify(c => c.UpdateProfileStatus(ProfileName, ProfileDefinitionStatus.Enabled), Times.Once()); + Assert.AreEqual(0, mockCommandRuntime.OutputPipeline.Count); + } + + [TestMethod] + public void EnableProfileSucceedsPassThru() + { + // Setup + clientMock.Setup(c => c.ListProfiles()).Verifiable(); + + cmdlet = new EnableAzureTrafficManagerProfile + { + Name = ProfileName, + CommandRuntime = mockCommandRuntime, + TrafficManagerClient = clientMock.Object, + PassThru = new SwitchParameter(true) + }; + + + // Action + cmdlet.ExecuteCmdlet(); + + // Assert + clientMock.Verify(c => c.UpdateProfileStatus(ProfileName, ProfileDefinitionStatus.Enabled), Times.Once()); + Assert.AreEqual(true, (bool)mockCommandRuntime.OutputPipeline[0]); + } + } +} diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Profiles/GetTrafficManagerProfileTests.cs b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Profiles/GetTrafficManagerProfileTests.cs new file mode 100644 index 000000000000..f3bce3d02d13 --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Profiles/GetTrafficManagerProfileTests.cs @@ -0,0 +1,131 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.TrafficManager.Models; +using Microsoft.WindowsAzure.Commands.TrafficManager.Profile; +using Microsoft.WindowsAzure.Commands.TrafficManager.Utilities; +using Microsoft.WindowsAzure.Management.TrafficManager.Models; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.TrafficManager.Profiles +{ + [TestClass] + public class GetTrafficManagerProfileTests + { + private const string ProfileName = "my-profile"; + private const string ProfileDomainName = "my.profile.trafficmanager.net"; + private const LoadBalancingMethod LoadBalancingMethodDefault = LoadBalancingMethod.Failover; + + private MockCommandRuntime mockCommandRuntime; + + private GetAzureTrafficManagerProfile cmdlet; + + private Mock clientMock; + + [TestInitialize] + public void TestSetup() + { + mockCommandRuntime = new MockCommandRuntime(); + clientMock = new Mock(); + } + + [TestMethod] + public void ProcessGetSingleProfile() + { + // Setup + ProfileWithDefinition expected = GetProfileWithDefinition(); + + clientMock + .Setup(c => c.GetTrafficManagerProfileWithDefinition(ProfileName)) + .Returns(expected); + + cmdlet = new GetAzureTrafficManagerProfile + { + Name = ProfileName, + TrafficManagerClient = clientMock.Object, + CommandRuntime = mockCommandRuntime, + }; + + // Action + cmdlet.ExecuteCmdlet(); + + // Test + Assert.AreEqual(1, mockCommandRuntime.OutputPipeline.Count); + + var actual = mockCommandRuntime.OutputPipeline[0] as ProfileWithDefinition; + + Assert.IsNotNull(actual); + Assert.AreEqual(expected.Name, actual.Name); + + // TODO: Override .Equals in ProfileDefinition and uncomment this line + // Assert.AreEquals(expected, actual); + + clientMock.Verify(c => c.GetTrafficManagerProfileWithDefinition(ProfileName), Times.Once()); + } + + [TestMethod] + public void ProcessGetListProfiles() + { + // Setup + ProfileWithDefinition expected1 = GetProfileWithDefinition(); + ProfileWithDefinition expected2 = GetProfileWithDefinition(); + expected2.Name = "my-profile2"; + expected2.DomainName = "my-profile2.trafficmanager.net"; + + IEnumerable expected = new List {expected1, expected2}; + + clientMock.Setup(c => c.ListProfiles()).Returns(expected); + + cmdlet = new GetAzureTrafficManagerProfile + { + TrafficManagerClient = clientMock.Object, + CommandRuntime = mockCommandRuntime, + }; + + // Action + cmdlet.ExecuteCmdlet(); + + var actual = (IEnumerable)mockCommandRuntime.OutputPipeline[0]; + + // Assert + Assert.IsNotNull(actual); + Assert.AreEqual(expected.Count(), actual.Count()); + Assert.IsTrue(actual.Any(p => p.Name.Equals(expected1.Name))); + Assert.IsTrue(actual.Any(p => p.Name.Equals(expected2.Name))); + Assert.IsTrue(actual.Any(p => p.DomainName.Equals(expected1.DomainName))); + Assert.IsTrue(actual.Any(p => p.DomainName.Equals(expected2.DomainName))); + + clientMock.Verify(c => c.ListProfiles(), Times.Once()); + } + + private ProfileWithDefinition GetProfileWithDefinition() + { + return new ProfileWithDefinition + { + DomainName = ProfileDomainName, + Name = ProfileName, + Endpoints = new List(), + LoadBalancingMethod = LoadBalancingMethodDefault, + MonitorPort = 80, + Status = ProfileDefinitionStatus.Enabled, + MonitorRelativePath = "/", + TimeToLiveInSeconds = 30 + }; + } + } +} diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Profiles/NewTrafficManagerProfileTests.cs b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Profiles/NewTrafficManagerProfileTests.cs new file mode 100644 index 000000000000..5d2f52087d92 --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Profiles/NewTrafficManagerProfileTests.cs @@ -0,0 +1,103 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.TrafficManager.Models; +using Microsoft.WindowsAzure.Commands.TrafficManager.Profile; +using Microsoft.WindowsAzure.Commands.TrafficManager.Utilities; +using Microsoft.WindowsAzure.Management.TrafficManager.Models; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.TrafficManager.Profiles +{ + [TestClass] + public class NewTrafficManagerProfileTests + { + private const string ProfileName = "my-profile"; + private const string ProfileDomainName = "my.profile.trafficmanager.net"; + private const LoadBalancingMethod DefaultLoadBalancingMethod = LoadBalancingMethod.Failover; + private const int MonitorPort = 80; + private const DefinitionMonitorProtocol MonitorProtocol = DefinitionMonitorProtocol.Http; + private const string MonitorRelativePath = "/"; + private const int Ttl = 30; + + private MockCommandRuntime mockCommandRuntime; + + private NewAzureTrafficManagerProfile cmdlet; + + private Mock clientMock; + + [TestInitialize] + public void TestSetup() + { + mockCommandRuntime = new MockCommandRuntime(); + clientMock = new Mock(); + } + + [TestMethod] + public void ProcessNewProfileTest() + { + // Setup + clientMock.Setup(c => c.NewAzureTrafficManagerProfile( + ProfileName, + ProfileDomainName, + DefaultLoadBalancingMethod.ToString(), + MonitorPort, + MonitorProtocol.ToString(), + MonitorRelativePath, + Ttl)) + .Returns(new ProfileWithDefinition + { + DomainName = ProfileDomainName, + Name = ProfileName, + Endpoints = new List(), + LoadBalancingMethod = DefaultLoadBalancingMethod, + MonitorPort = 80, + Status = ProfileDefinitionStatus.Enabled, + MonitorRelativePath = MonitorRelativePath, + TimeToLiveInSeconds = Ttl + }); + + + cmdlet = new NewAzureTrafficManagerProfile + { + Name = ProfileName, + DomainName = ProfileDomainName, + LoadBalancingMethod = DefaultLoadBalancingMethod.ToString(), + MonitorPort = MonitorPort, + MonitorProtocol = MonitorProtocol.ToString(), + MonitorRelativePath = MonitorRelativePath, + Ttl = Ttl, + TrafficManagerClient = clientMock.Object, + CommandRuntime = mockCommandRuntime + }; + + // Action + cmdlet.ExecuteCmdlet(); + + // Assert + var actual = mockCommandRuntime.OutputPipeline[0] as ProfileWithDefinition; + + Assert.IsNotNull(actual); + Assert.AreEqual(ProfileName, actual.Name); + Assert.AreEqual(ProfileDomainName, actual.DomainName); + Assert.AreEqual(MonitorRelativePath, actual.MonitorRelativePath); + Assert.AreEqual(Ttl, actual.TimeToLiveInSeconds); + Assert.AreEqual(DefaultLoadBalancingMethod, actual.LoadBalancingMethod); + Assert.IsTrue(actual.Endpoints.Count == 0); + } + } +} diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Profiles/RemoveTrafficManagerProfileTests.cs b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Profiles/RemoveTrafficManagerProfileTests.cs new file mode 100644 index 000000000000..0b561153736f --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Profiles/RemoveTrafficManagerProfileTests.cs @@ -0,0 +1,59 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.TrafficManager.Profile; +using Microsoft.WindowsAzure.Commands.TrafficManager.Utilities; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.TrafficManager.Profiles +{ + [TestClass] + public class RemoveTrafficManagerProfileTests + { + private const string ProfileName = "my-profile"; + + private MockCommandRuntime mockCommandRuntime; + + private RemoveAzureTrafficManagerProfile cmdlet; + + private Mock clientMock; + + [TestInitialize] + public void TestSetup() + { + mockCommandRuntime = new MockCommandRuntime(); + clientMock = new Mock(); + } + + [TestMethod] + public void ProcessRemoveProfileTest() + { + // Setup + cmdlet = new RemoveAzureTrafficManagerProfile + { + Name = ProfileName, + CommandRuntime = mockCommandRuntime, + TrafficManagerClient = clientMock.Object, + }; + + // Action + cmdlet.ExecuteCmdlet(); + + // Assert + clientMock.Verify(c => c.RemoveTrafficManagerProfile(ProfileName), Times.Once()); + } + } +} diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Profiles/SetTrafficManagerProfileTests.cs b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Profiles/SetTrafficManagerProfileTests.cs new file mode 100644 index 000000000000..bafaec0582e2 --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Profiles/SetTrafficManagerProfileTests.cs @@ -0,0 +1,356 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System.Collections.Generic; +using System.Net; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; +using Microsoft.WindowsAzure.Commands.TrafficManager.Models; +using Microsoft.WindowsAzure.Commands.TrafficManager.Profile; +using Microsoft.WindowsAzure.Commands.TrafficManager.Utilities; +using Microsoft.WindowsAzure.Management.TrafficManager.Models; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.TrafficManager.Profiles +{ + [TestClass] + public class SetTrafficManagerProfileTests + { + private const int MonitorExpectedStatusCode = (int)HttpStatusCode.OK; + private const string Verb = "GET"; + + private const string ProfileName = "my-profile"; + private const string ProfileDomainName = "my.profile.trafficmanager.net"; + + // Old profile + private const LoadBalancingMethod DefaultLoadBalancingMethod = LoadBalancingMethod.Failover; + private const int MonitorPort = 80; + private const DefinitionMonitorProtocol MonitorProtocol = DefinitionMonitorProtocol.Http; + private const string MonitorRelativePath = "/"; + private const int Ttl = 30; + + // New profile + private const LoadBalancingMethod NewLoadBalancingMethod = LoadBalancingMethod.Performance; + private const int NewMonitorPort = 8080; + private const DefinitionMonitorProtocol NewMonitorProtocol = DefinitionMonitorProtocol.Https; + private const string NewMonitorRelativePath = "/index.html"; + private const int NewTtl = 300; + + private MockCommandRuntime mockCommandRuntime; + + private SetAzureTrafficManagerProfile cmdlet; + + private Mock clientMock; + + [TestInitialize] + public void TestSetup() + { + mockCommandRuntime = new MockCommandRuntime(); + clientMock = new Mock(); + + clientMock + .Setup(c => c.InstantiateTrafficManagerDefinition( + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny>())) + .Returns(DefaultDefinition); + } + + [TestMethod] + public void ProcessSetProfileTestAllArgs() + { + // Setup + ProfileWithDefinition oldProfileWithDefinition = defaultProfileWithDefinition; + + var newProfileWithDefinition = new ProfileWithDefinition + { + DomainName = ProfileDomainName, + Name = ProfileName, + Endpoints = new List(), + LoadBalancingMethod = NewLoadBalancingMethod, + MonitorPort = NewMonitorPort, + Status = ProfileDefinitionStatus.Enabled, + MonitorRelativePath = NewMonitorRelativePath, + MonitorProtocol = NewMonitorProtocol, + TimeToLiveInSeconds = NewTtl + }; + + + var newMonitor = new DefinitionMonitor + { + HttpOptions = new DefinitionMonitorHTTPOptions + { + ExpectedStatusCode = MonitorExpectedStatusCode, + RelativePath = NewMonitorRelativePath, + Verb = Verb + } + }; + + var updateDefinitionCreateParameters = new DefinitionCreateParameters + { + DnsOptions = new DefinitionDnsOptions + { + TimeToLiveInSeconds = NewTtl + }, + Policy = new DefinitionPolicyCreateParameters + { + LoadBalancingMethod = NewLoadBalancingMethod, + Endpoints = new DefinitionEndpointCreateParameters[0] + }, + Monitors = new[] { newMonitor } + }; + + clientMock + .Setup(c => c.AssignDefinitionToProfile(ProfileName, It.IsAny())) + .Returns(newProfileWithDefinition); + + clientMock + .Setup(c => c.InstantiateTrafficManagerDefinition( + NewLoadBalancingMethod.ToString(), + NewMonitorPort, + NewMonitorProtocol.ToString(), + NewMonitorRelativePath, + NewTtl, + oldProfileWithDefinition.Endpoints)) + .Returns(updateDefinitionCreateParameters); + + cmdlet = new SetAzureTrafficManagerProfile + { + Name = ProfileName, + LoadBalancingMethod = NewLoadBalancingMethod.ToString(), + MonitorPort = NewMonitorPort, + MonitorProtocol = NewMonitorProtocol.ToString(), + MonitorRelativePath = NewMonitorRelativePath, + Ttl = NewTtl, + TrafficManagerClient = clientMock.Object, + CommandRuntime = mockCommandRuntime, + TrafficManagerProfile = oldProfileWithDefinition + }; + + + // Action + cmdlet.ExecuteCmdlet(); + var actual = mockCommandRuntime.OutputPipeline[0] as ProfileWithDefinition; + + // Assert + Assert.IsNotNull(actual); + Assert.AreEqual(newProfileWithDefinition.Name, actual.Name); + Assert.AreEqual(newProfileWithDefinition.DomainName, actual.DomainName); + Assert.AreEqual(newProfileWithDefinition.LoadBalancingMethod, actual.LoadBalancingMethod); + Assert.AreEqual(newProfileWithDefinition.MonitorPort, actual.MonitorPort); + Assert.AreEqual(newProfileWithDefinition.MonitorProtocol, actual.MonitorProtocol); + Assert.AreEqual(newProfileWithDefinition.MonitorRelativePath, actual.MonitorRelativePath); + Assert.AreEqual(newProfileWithDefinition.TimeToLiveInSeconds, actual.TimeToLiveInSeconds); + + // Most important assert; the cmdlet is passing the right parameters + clientMock.Verify(c => c.InstantiateTrafficManagerDefinition( + NewLoadBalancingMethod.ToString(), + NewMonitorPort, + NewMonitorProtocol.ToString(), + NewMonitorRelativePath, + NewTtl, + oldProfileWithDefinition.Endpoints), Times.Once()); + } + + [TestMethod] + public void ProcessSetProfileTestLoadBalancingMethod() + { + ProfileWithDefinition oldProfileWithDefinition = defaultProfileWithDefinition; + + cmdlet = new SetAzureTrafficManagerProfile + { + Name = ProfileName, + // We only change the load balancign method + LoadBalancingMethod = NewLoadBalancingMethod.ToString(), + TrafficManagerClient = clientMock.Object, + CommandRuntime = mockCommandRuntime, + TrafficManagerProfile = oldProfileWithDefinition + }; + + // Action + cmdlet.ExecuteCmdlet(); + + // Assert + clientMock.Verify( + c => c.InstantiateTrafficManagerDefinition( + // load balancing method is the new one + NewLoadBalancingMethod.ToString(), + MonitorPort, + MonitorProtocol.ToString(), + MonitorRelativePath, + Ttl, + oldProfileWithDefinition.Endpoints), + Times.Once()); + } + + [TestMethod] + public void ProcessSetProfileTestMonitorPort() + { + ProfileWithDefinition oldProfileWithDefinition = defaultProfileWithDefinition; + + cmdlet = new SetAzureTrafficManagerProfile + { + Name = ProfileName, + // We only change the monitor port + MonitorPort = NewMonitorPort, + TrafficManagerClient = clientMock.Object, + CommandRuntime = mockCommandRuntime, + TrafficManagerProfile = oldProfileWithDefinition + }; + + + // Action + cmdlet.ExecuteCmdlet(); + + // Assert + clientMock.Verify( + c => c.InstantiateTrafficManagerDefinition( + DefaultLoadBalancingMethod.ToString(), + // monitor port is the new one + NewMonitorPort, + MonitorProtocol.ToString(), + MonitorRelativePath, + Ttl, + oldProfileWithDefinition.Endpoints), + Times.Once()); + } + + [TestMethod] + public void ProcessSetProfileTestMonitorProtocol() + { + ProfileWithDefinition oldProfileWithDefinition = defaultProfileWithDefinition; + + cmdlet = new SetAzureTrafficManagerProfile + { + Name = ProfileName, + // We only change the monitor protocl + MonitorProtocol = NewMonitorProtocol.ToString(), + TrafficManagerClient = clientMock.Object, + CommandRuntime = mockCommandRuntime, + TrafficManagerProfile = oldProfileWithDefinition + }; + + + // Action + cmdlet.ExecuteCmdlet(); + + // Assert + clientMock.Verify( + c => c.InstantiateTrafficManagerDefinition( + DefaultLoadBalancingMethod.ToString(), + MonitorPort, + // monitor protocol is the new one + NewMonitorProtocol.ToString(), + MonitorRelativePath, + Ttl, + oldProfileWithDefinition.Endpoints), + Times.Once()); + } + + [TestMethod] + public void ProcessSetProfileTestMonitorRelativePath() + { + ProfileWithDefinition oldProfileWithDefinition = defaultProfileWithDefinition; + + cmdlet = new SetAzureTrafficManagerProfile + { + Name = ProfileName, + // We only change the monitor protocl + MonitorRelativePath = NewMonitorRelativePath, + TrafficManagerClient = clientMock.Object, + CommandRuntime = mockCommandRuntime, + TrafficManagerProfile = oldProfileWithDefinition + }; + + + // Action + cmdlet.ExecuteCmdlet(); + + // Assert + clientMock.Verify( + c => c.InstantiateTrafficManagerDefinition( + DefaultLoadBalancingMethod.ToString(), + MonitorPort, + MonitorProtocol.ToString(), + // monitor relative path is the new one + NewMonitorRelativePath, + Ttl, + oldProfileWithDefinition.Endpoints), + Times.Once()); + } + + [TestMethod] + public void ProcessSetProfileTestTtl() + { + ProfileWithDefinition oldProfileWithDefinition = defaultProfileWithDefinition; + + cmdlet = new SetAzureTrafficManagerProfile + { + Name = ProfileName, + // We only change the ttl + Ttl = NewTtl, + TrafficManagerClient = clientMock.Object, + CommandRuntime = mockCommandRuntime, + TrafficManagerProfile = oldProfileWithDefinition + }; + + // Action + cmdlet.ExecuteCmdlet(); + + // Assert + clientMock.Verify( + c => c.InstantiateTrafficManagerDefinition( + DefaultLoadBalancingMethod.ToString(), + MonitorPort, + MonitorProtocol.ToString(), + MonitorRelativePath, + // ttl is the new one + NewTtl, + oldProfileWithDefinition.Endpoints), + Times.Once()); + } + + private static ProfileWithDefinition defaultProfileWithDefinition = new ProfileWithDefinition() + { + DomainName = ProfileDomainName, + Name = ProfileName, + Endpoints = new List(), + LoadBalancingMethod = DefaultLoadBalancingMethod, + MonitorPort = MonitorPort, + Status = ProfileDefinitionStatus.Enabled, + MonitorRelativePath = MonitorRelativePath, + MonitorProtocol = MonitorProtocol, + TimeToLiveInSeconds = Ttl + }; + + private static DefinitionCreateParameters DefaultDefinition + { + get + { + return new DefinitionCreateParameters + { + Policy = + new DefinitionPolicyCreateParameters + { + Endpoints = new List() + } + }; + } + } + } +} diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Properties/AssemblyInfo.cs b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..441b7f90e9c6 --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/Properties/AssemblyInfo.cs @@ -0,0 +1,44 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Commands.TrafficManager.Test")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright("Copyright (c) 2014")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("a25aee3f-8dd6-4630-9c1b-f176eab889d3")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] +[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/TestTrafficManagerDomainNameTests.cs b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/TestTrafficManagerDomainNameTests.cs new file mode 100644 index 000000000000..86fc828ceb58 --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/TestTrafficManagerDomainNameTests.cs @@ -0,0 +1,101 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.WindowsAzure.Commands.TrafficManager; +using Microsoft.WindowsAzure.Commands.TrafficManager.Utilities; +using Moq; + +namespace Microsoft.WindowsAzure.Commands.Test.TrafficManager +{ + [TestClass] + public class TestTrafficManagerDomainNameTests + { + private const string ProfileDomainName = "my.profile.trafficmanager.net"; + private const string NakedProfileDomainName = "my.profile"; + + private Mock mockCommandRuntime; + + private TestAzureTrafficManagerDomainName cmdlet; + + private Mock clientMock; + + [TestInitialize] + public void TestSetup() + { + mockCommandRuntime = new Mock(); + clientMock = new Mock(); + } + + [TestMethod] + public void TestProfileDomainNameReturnsTrue() + { + // Setup + clientMock.Setup(c => c.TestDomainAvailability(ProfileDomainName)).Returns(true); + cmdlet = new TestAzureTrafficManagerDomainName + { + DomainName = ProfileDomainName, + CommandRuntime = mockCommandRuntime.Object, + TrafficManagerClient = clientMock.Object + }; + + // Action + cmdlet.ExecuteCmdlet(); + + // Assert + clientMock.Verify(c => c.TestDomainAvailability(ProfileDomainName), Times.Once()); + mockCommandRuntime.Verify(c => c.WriteObject(true), Times.Once()); + } + + [TestMethod] + public void TestProfileDomainNameReturnsFalse() + { + // Setup + clientMock.Setup(c => c.TestDomainAvailability(ProfileDomainName)).Returns(false); + cmdlet = new TestAzureTrafficManagerDomainName + { + DomainName = ProfileDomainName, + CommandRuntime = mockCommandRuntime.Object, + TrafficManagerClient = clientMock.Object + }; + + // Action + cmdlet.ExecuteCmdlet(); + + // Assert + clientMock.Verify(c => c.TestDomainAvailability(ProfileDomainName), Times.Once()); + mockCommandRuntime.Verify(c => c.WriteObject(false), Times.Once()); + } + + [TestMethod] + public void TestProfileDomainNameAppendsTrafficManagerSuffixTrue() + { + // Setup + clientMock.Setup(c => c.TestDomainAvailability(NakedProfileDomainName)).Returns(true); + cmdlet = new TestAzureTrafficManagerDomainName + { + DomainName = NakedProfileDomainName, + CommandRuntime = mockCommandRuntime.Object, + TrafficManagerClient = clientMock.Object + }; + + // Action + cmdlet.ExecuteCmdlet(); + + // Assert + clientMock.Verify(c => c.TestDomainAvailability(ProfileDomainName), Times.Once()); + } + } +} diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/packages.config b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/packages.config new file mode 100644 index 000000000000..a2938791bf5b --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager.Test/packages.config @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Commands.TrafficManager.csproj b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Commands.TrafficManager.csproj new file mode 100644 index 000000000000..6728227a0fa9 --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Commands.TrafficManager.csproj @@ -0,0 +1,163 @@ + + + + + Debug + AnyCPU + {94E96A5C-B5AD-4E10-B13A-3BC16D102AED} + Library + Properties + Microsoft.WindowsAzure.Commands.TrafficManager + Microsoft.WindowsAzure.Commands.TrafficManager + v4.5 + 512 + ..\..\..\ + true + /assemblyCompareMode:StrongNameIgnoringVersion + + + + true + full + false + ..\..\..\Package\Debug\ServiceManagement\Azure\TrafficManager + DEBUG;TRACE + prompt + 4 + true + true + true + false + + + OnBuildSuccess + + + ..\..\..\Package\Release\ServiceManagement\Azure\TrafficManager + TRACE;SIGN + true + pdbonly + AnyCPU + true + true + MSSharedLibKey.snk + true + false + + + + ..\..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll + + + ..\..\..\packages\Microsoft.Data.OData.5.6.0\lib\net40\Microsoft.Data.OData.dll + + + ..\..\..\packages\Microsoft.Data.Services.Client.5.6.0\lib\net40\Microsoft.Data.Services.Client.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Common.1.4.0\lib\net45\Microsoft.WindowsAzure.Common.NetFramework.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll + + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.2.1.0\lib\net40\Microsoft.WindowsAzure.Management.dll + + + ..\..\..\packages\Microsoft.WindowsAzure.Management.TrafficManager.0.14.0-preview\lib\net40\Microsoft.WindowsAzure.Management.TrafficManager.dll + + + ..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + True + + + + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll + + + False + ..\..\..\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Primitives.dll + + + + ..\..\..\packages\System.Spatial.5.6.0\lib\net40\System.Spatial.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PreserveNewest + + + + + {5ee72c53-1720-4309-b54b-5fb79703195f} + Commands.Common + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Endpoint/AddAzureTrafficManagerEndpoint.cs b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Endpoint/AddAzureTrafficManagerEndpoint.cs new file mode 100644 index 000000000000..58578190d7f9 --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Endpoint/AddAzureTrafficManagerEndpoint.cs @@ -0,0 +1,69 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.TrafficManager.Models; +using Microsoft.WindowsAzure.Commands.TrafficManager.Utilities; +using Microsoft.WindowsAzure.Management.TrafficManager.Models; + +namespace Microsoft.WindowsAzure.Commands.TrafficManager.Endpoint +{ + [Cmdlet(VerbsCommon.Add, "AzureTrafficManagerEndpoint"), OutputType(typeof(IProfileWithDefinition))] + public class AddAzureTrafficManagerEndpoint : TrafficManagerConfigurationBaseCmdlet + { + [Parameter(Mandatory = true)] + public string DomainName { get; set; } + + [Parameter(Mandatory = false)] + public string Location { get; set; } + + [Parameter(Mandatory = true)] + [ValidateSet("CloudService", "AzureWebsite", "Any", "TrafficManager", IgnoreCase = false)] + public string Type { get; set; } + + [Parameter(Mandatory = true)] + [ValidateSet("Enabled", "Disabled", IgnoreCase = false)] + public string Status { get; set; } + + [Parameter(Mandatory = false)] + public int? Weight { get; set; } + + [Parameter(Mandatory = false)] + public int? MinChildEndpoints { get; set; } + + public override void ExecuteCmdlet() + { + TrafficManagerEndpoint endpoint = new TrafficManagerEndpoint(); + endpoint.DomainName = DomainName; + endpoint.Location = Location; + endpoint.Status = (EndpointStatus)Enum.Parse(typeof(EndpointStatus), Status); + endpoint.Type = (EndpointType)Enum.Parse(typeof(EndpointType), Type); + endpoint.Weight = Weight; + endpoint.MinChildEndpoints = MinChildEndpoints; + ProfileWithDefinition profile = TrafficManagerProfile.GetInstance(); + + if (profile.Endpoints.Any(e => e.DomainName.Equals(endpoint.DomainName, StringComparison.InvariantCultureIgnoreCase))) + { + throw new Exception( + string.Format(Resources.AddTrafficManagerEndpointFailed, profile.Name, endpoint.DomainName)); + } + + profile.Endpoints.Add(endpoint); + WriteObject(TrafficManagerProfile); + } + } +} diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Endpoint/RemoveAzureTrafficManagerEndpoint.cs b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Endpoint/RemoveAzureTrafficManagerEndpoint.cs new file mode 100644 index 000000000000..987126750fae --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Endpoint/RemoveAzureTrafficManagerEndpoint.cs @@ -0,0 +1,47 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.TrafficManager.Models; +using Microsoft.WindowsAzure.Commands.TrafficManager.Utilities; + +namespace Microsoft.WindowsAzure.Commands.TrafficManager.Endpoint +{ + [Cmdlet(VerbsCommon.Remove, "AzureTrafficManagerEndpoint"), OutputType(typeof(IProfileWithDefinition))] + public class RemoveAzureTrafficManagerEndpoint : TrafficManagerConfigurationBaseCmdlet + { + [Parameter(Mandatory = true)] + public string DomainName { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Do not confirm endpoint deletion")] + public SwitchParameter Force { get; set; } + + public override void ExecuteCmdlet() + { + ProfileWithDefinition profile = TrafficManagerProfile.GetInstance(); + if (!profile.Endpoints.Any(e => e.DomainName.Equals(DomainName, StringComparison.InvariantCultureIgnoreCase))) + { + throw new Exception(Resources.RemoveTrafficManagerEndpointMissing); + } + + TrafficManagerEndpoint endpoint = profile.Endpoints.First(e => e.DomainName.Equals(DomainName, StringComparison.InvariantCultureIgnoreCase)); + profile.Endpoints.Remove(endpoint); + + WriteObject(profile); + } + } +} diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Endpoint/SetAzureTrafficManagerEndpoint.cs b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Endpoint/SetAzureTrafficManagerEndpoint.cs new file mode 100644 index 000000000000..5811a3dbcccb --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Endpoint/SetAzureTrafficManagerEndpoint.cs @@ -0,0 +1,93 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Linq; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.TrafficManager.Models; +using Microsoft.WindowsAzure.Commands.TrafficManager.Utilities; +using Microsoft.WindowsAzure.Management.TrafficManager.Models; + +namespace Microsoft.WindowsAzure.Commands.TrafficManager.Endpoint +{ + [Cmdlet(VerbsCommon.Set, "AzureTrafficManagerEndpoint"), OutputType(typeof(IProfileWithDefinition))] + public class SetAzureTrafficManagerEndpoint : TrafficManagerConfigurationBaseCmdlet + { + [Parameter(Mandatory = true)] + public string DomainName { get; set; } + + [Parameter(Mandatory = false)] + public string Location { get; set; } + + [Parameter(Mandatory = false)] + [ValidateSet("CloudService", "AzureWebsite", "Any", "TrafficManager", IgnoreCase = false)] + public string Type { get; set; } + + [Parameter(Mandatory = false)] + [ValidateSet("Enabled", "Disabled", IgnoreCase = false)] + public string Status { get; set; } + + [Parameter(Mandatory = false)] + public int? Weight { get; set; } + + [Parameter(Mandatory = false)] + public int? MinChildEndpoints { get; set; } + + public override void ExecuteCmdlet() + { + ProfileWithDefinition profile = TrafficManagerProfile.GetInstance(); + + TrafficManagerEndpoint endpoint = profile.Endpoints.FirstOrDefault(e => e.DomainName.Equals(DomainName, StringComparison.InvariantCultureIgnoreCase)); + + if (endpoint == null) + { + if (String.IsNullOrEmpty(Type) || + String.IsNullOrEmpty(Status) || + String.IsNullOrEmpty(DomainName)) + { + throw new Exception(Resources.SetTrafficManagerEndpointNeedsParameters); + } + + WriteVerboseWithTimestamp(Resources.SetInexistentTrafficManagerEndpointMessage, profile.Name, DomainName); + endpoint = new TrafficManagerEndpoint(); + endpoint.DomainName = DomainName; + endpoint.Location = Location; + endpoint.Type = (EndpointType)Enum.Parse(typeof(EndpointType), Type); + endpoint.Weight = Weight; + endpoint.MinChildEndpoints = MinChildEndpoints; + endpoint.Status = (EndpointStatus)Enum.Parse(typeof(EndpointStatus), Status); + + // Add it because the endpoint didn't exist + profile.Endpoints.Add(endpoint); + } + + endpoint.Location = Location ?? endpoint.Location; + + endpoint.Type = !String.IsNullOrEmpty(Type) + ? (EndpointType)Enum.Parse(typeof(EndpointType), Type) + : endpoint.Type; + + endpoint.Weight = Weight.HasValue ? Weight.Value : endpoint.Weight; + endpoint.MinChildEndpoints = MinChildEndpoints.HasValue ? MinChildEndpoints.Value : endpoint.MinChildEndpoints; + + endpoint.Status = !String.IsNullOrEmpty(Status) + ? (EndpointStatus)Enum.Parse(typeof (EndpointStatus), Status) + : endpoint.Status; + + WriteObject(profile); + } + } +} diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/MSSharedLibKey.snk b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/MSSharedLibKey.snk differ diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Microsoft.WindowsAzure.Commands.TrafficManager.dll-help.psd1 b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Microsoft.WindowsAzure.Commands.TrafficManager.dll-help.psd1 new file mode 100644 index 000000000000..a7e168b3e739 --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Microsoft.WindowsAzure.Commands.TrafficManager.dll-help.psd1 @@ -0,0 +1,86 @@ +# +# Module manifest for module 'Azure' +# +# Generated by: Microsoft Corporation +# +# Generated on: 5/23/2012 +# + +@{ + +# Version number of this module. +ModuleVersion = '0.8.8' + +# ID used to uniquely identify this module +GUID = 'D48CF693-4125-4D2D-8790-1514F44CE325' + +# Author of this module +Author = 'Microsoft Corporation' + +# Company or vendor of this module +CompanyName = 'Microsoft Corporation' + +# Copyright statement for this module +Copyright = '?Microsoft Corporation. All rights reserved.' + +# Description of the functionality provided by this module +Description = '' + +# Minimum version of the Windows PowerShell engine required by this module +PowerShellVersion = '3.0' + +# Name of the Windows PowerShell host required by this module +PowerShellHostName = '' + +# Minimum version of the Windows PowerShell host required by this module +PowerShellHostVersion = '' + +# Minimum version of the .NET Framework required by this module +DotNetFrameworkVersion = '4.0' + +# Minimum version of the common language runtime (CLR) required by this module +CLRVersion='4.0' + +# Processor architecture (None, X86, Amd64, IA64) required by this module +ProcessorArchitecture = 'None' + +# Modules that must be imported into the global environment prior to importing this module +RequiredModules = @() + +# Assemblies that must be loaded prior to importing this module +RequiredAssemblies = @() + +# Script files (.ps1) that are run in the caller's environment prior to importing this module +ScriptsToProcess = @() + +# Type files (.ps1xml) to be loaded when importing this module +TypesToProcess = @() + +# Format files (.ps1xml) to be loaded when importing this module +FormatsToProcess = @() + +# Modules to import as nested modules of the module specified in ModuleToProcess +NestedModules = '..\..\..\Package\Debug\ServiceManagement\Azure\TrafficManager\Microsoft.WindowsAzure.Commands.TrafficManager.dll' + +# Functions to export from this module +FunctionsToExport = '*' + +# Cmdlets to export from this module +CmdletsToExport = '*' + +# Variables to export from this module +VariablesToExport = '*' + +# Aliases to export from this module +AliasesToExport = @() + +# List of all modules packaged with this module +ModuleList = @() + +# List of all files packaged with this module +FileList = @() + +# Private data to pass to the module specified in ModuleToProcess +PrivateData = '' + +} diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Microsoft.WindowsAzure.Commands.TrafficManager.dll-help.xml b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Microsoft.WindowsAzure.Commands.TrafficManager.dll-help.xml new file mode 100644 index 000000000000..9d7bf40300b9 --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Microsoft.WindowsAzure.Commands.TrafficManager.dll-help.xml @@ -0,0 +1,2009 @@ + + + + + Add-AzureTrafficManagerEndpoint + + Adds an endpoint to a Traffic Manager profile. + + + + + Add + AzureTrafficManagerEndpoint + + + + + The Add-AzureTrafficManagerEndpoint cmdlet adds an endpoint to a Microsoft Azure Traffic Manager profile. After you add an endpoint, pass the result to the Set-AzureTrafficManagerProfile cmdlet by using the pipeline operator. That cmdlet connects to Azure to save your changes. + + + + Add-AzureTrafficManagerEndpoint + + DomainName + + Specifies the domain name of the endpoint to add. + + String + + + Location + + Specifies the location of the endpoint the cmdlet adds. This must be an Azure location.This parameter must contain a value for endpoints of the type "Any" in a profile that has the load balancing method set to "Performance". You can find a list of possible values for this parameter under Name by calling List Locations. For more information, see List Locations at http://msdn.microsoft.com/en-us/library/gg441293.aspx. + + String + + + Type + + Specifies the type of endpoint. Valid values are: + +-- CloudService +-- AzureWebsite +-- Any +-- TrafficManager + +If there is more than one AzureWebsite endpoint, the endpoints must be in different datacenters. + + String + + + Status + + Specifies the status of the monitoring endpoint. Valid values are: + +-- Enabled +-- Disabled + +If you specify a value of Enabled, Traffic Manager monitors the endpoint and the load-balancing method considers it when managing traffic. + + String + + + Weight + + Specifies the weight of the endpoint the cmdlet adds. The valid value range for this parameter is [1,1000].This parameter is only used for RoundRobin load balancing policies. + + Nullable`1[Int32] + + + MinChildEndpoints + + Specifies the minimum amount of endpoints the nested profile has to have online for this endpoint to be considered online. The valid value for this parameter should be bigger than 0.This parameter is only used for TrafficManager endpoint types. + + Nullable`1[Int32] + + + TrafficManagerProfile + + Specifies the Traffic Manager profile object to which to add the endpoint. + + IProfileWithDefinition + + + + + + DomainName + + Specifies the domain name of the endpoint to add. + + String + + String + + + none + + + Location + + Specifies the location of the endpoint the cmdlet adds. This must be an Azure location.This parameter must contain a value for endpoints of the type "Any" in a profile that has the load balancing method set to "Performance". You can find a list of possible values for this parameter under Name by calling List Locations. For more information, see List Locations at http://msdn.microsoft.com/en-us/library/gg441293.aspx. + + String + + String + + + none + + + Type + + Specifies the type of endpoint. Valid values are: + +-- CloudService +-- AzureWebsite +-- Any +-- TrafficManager + +If there is more than one AzureWebsite endpoint, the endpoints must be in different datacenters. + + String + + String + + + none + + + Status + + Specifies the status of the monitoring endpoint. Valid values are: + +-- Enabled +-- Disabled + +If you specify a value of Enabled, Traffic Manager monitors the endpoint and the load-balancing method considers it when managing traffic. + + String + + String + + + none + + + Weight + + Specifies the weight of the endpoint the cmdlet adds. The valid value range for this parameter is [1,1000].This parameter is only used for RoundRobin load balancing policies. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + MinChildEndpoints + + Specifies the minimum amount of endpoints the nested profile has to have online for this endpoint to be considered online. The valid value for this parameter should be bigger than 0.This parameter is only used for TrafficManager endpoint types. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + TrafficManagerProfile + + Specifies the Traffic Manager profile object to which to add the endpoint. + + IProfileWithDefinition + + IProfileWithDefinition + + + none + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.TrafficManager.Models.IProfileWithDefinition + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Add an endpoint to a profile -------------------------- + + + + PS C:\>$TrafficManagerProfile = Get-AzureTrafficManagerProfile -Name "ContosoProfile" +PS C:\> Add-AzureTrafficManagerEndpoint -TrafficManagerProfile $TrafficManagerProfile -DomainName "Contoso02App.cloudapp.net" -Status "Enabled" -Type "CloudService" | Set-AzureTrafficManagerProfile + + The first command uses the Get-AzureTrafficManagerProfile cmdlet to get the profile named ContosoProfile, and then stores it in the $TrafficManagerProfile variable. + + + + The second command adds an endpoint to Traffic Manager profile that is stored in $TrafficManagerProfile. The endpoint has the domain name Contoso02App.couldapp.net. The command also specifies whether it is enabled and its type. The command passes the profile object to the Set-AzureTrafficManagerProfile cmdlet to connect to Azure to save your changes. + + + + + -------------------------- Example 2: Add an endpoint that has a specified location and weight -------------------------- + + + + PS C:\>Add-AzureTrafficManagerEndpoint -TrafficManagerProfile ContosoTrafficManagerProfile -DomainName " Contoso02App.cloudapp.net" -Status Enabled -Type CloudService -Weight 2 -Location myLocation | Set-AzureTrafficManagerProfile + + This command adds an endpoint to a Traffic Manager profile. The endpoint has the domain name Contoso02App.couldapp.net. The command also specifies whether it is enabled and its type. The command also specifies the weight and location for the endpoint. The command passes the profile object to Set-AzureTrafficManagerProfile to connect to Azure to save your changes. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=398281 + + + Remove-AzureTrafficManagerEndpoint + + + + Set-AzureTrafficManagerEndpoint + + + + Get-AzureTrafficManagerProfile + + + + Set-AzureTrafficManagerProfile + + + + + + + + Disable-AzureTrafficManagerProfile + + Disables a Traffic Manager profile. + + + + + Disable + AzureTrafficManagerProfile + + + + + The Disable-AzureTrafficManagerProfile cmdlet disables a Microsoft Azure Traffic Manager profile. You can use the PassThru parameter to display whether the operation succeeds. + + + + Disable-AzureTrafficManagerProfile + + Name + + Specifies the name of the Traffic Manager profile to disable. + + String + + + PassThru + + Returns $True if the operation succeeded; otherwise, $False. By default, this cmdlet does not generate any output. + + SwitchParameter + + + + + + Name + + Specifies the name of the Traffic Manager profile to disable. + + String + + String + + + none + + + PassThru + + Returns $True if the operation succeeded; otherwise, $False. By default, this cmdlet does not generate any output. + + SwitchParameter + + SwitchParameter + + + none + + + + + + + + + + + + + + + + + + System.Boolean + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Disable a Traffic Manager profile and display the results -------------------------- + + + + PS C:\>Disable-AzureTrafficManagerProfile -Name "MyProfile" -PassThru +True + + This command disables the Traffic Manager profile named MyProfile. The command specifies the PassThru parameter to display whether the command succeeded. + + + + + + + + + -------------------------- Example 2: Disable a Traffic Manager profile and display no results -------------------------- + + + + PS C:\>Disable-AzureTrafficManagerProfile -Name "MyProfile" + + This command disables the Traffic Manager profile named MyProfile but does not display whether the command succeeded. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=398282 + + + Enable-AzureTrafficManagerProfile + + + + Get-AzureTrafficManagerProfile + + + + New-AzureTrafficManagerProfile + + + + Remove-AzureTrafficManagerProfile + + + + Set-AzureTrafficManagerProfile + + + + + + + + Enable-AzureTrafficManagerProfile + + Enables a Traffic Manager profile. + + + + + Enable + AzureTrafficManagerProfile + + + + + The Enable-AzureTrafficManagerProfile cmdlet enables a Microsoft Azure Traffic Manager profile. Specify the PassThru parameter to display whether the operation succeeds. + + + + Enable-AzureTrafficManagerProfile + + Name + + Specifies the name of the Traffic Manager profile to enable. + + String + + + PassThru + + Returns $True if the operation succeeded; otherwise, $False. By default, this cmdlet does not generate any output. + + SwitchParameter + + + + + + Name + + Specifies the name of the Traffic Manager profile to enable. + + String + + String + + + none + + + PassThru + + Returns $True if the operation succeeded; otherwise, $False. By default, this cmdlet does not generate any output. + + SwitchParameter + + SwitchParameter + + + none + + + + + + + + + + + + + + + + + + System.Boolean + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Enable a Traffic Manager profile -------------------------- + + + + PS C:\>Enable-AzureTrafficManagerProfile -Name "MyProfile" + + This command enables the Traffic Manager profile named MyProfile. + + + + + + + + + -------------------------- Example 2: Enable a Traffic Manager profile and display the results -------------------------- + + + + PS C:\>Enable-AzureTrafficManagerProfile -Name "MyProfile" -PassThru +True + + This command enables the Traffic Manager profile named MyProfile and displays whether the command succeeded. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=398283 + + + Disable-AzureTrafficManagerProfile + + + + Get-AzureTrafficManagerProfile + + + + New-AzureTrafficManagerProfile + + + + Remove-AzureTrafficManagerProfile + + + + Set-AzureTrafficManagerProfile + + + + + + + + Get-AzureTrafficManagerProfile + + Gets the details of a Traffic Manager profile. + + + + + Get + AzureTrafficManagerProfile + + + + + The Get-AzureTrafficManagerProfile cmdlet gets the details of a Microsoft Azure Traffic Manager profile. If you do not specify the Name parameter, the cmdlet lists the Traffic Manager profiles in the current subscription. + + + + Get-AzureTrafficManagerProfile + + Name + + Specifies the name of the Traffic Manager profile to get. + + String + + + + + + Name + + Specifies the name of the Traffic Manager profile to get. + + String + + String + + + none + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.TrafficManager.Models.IProfileWithDefinition + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Get the list of Traffic Manager profiles in a subscription -------------------------- + + + + PS C:\>Get-AzureTrafficManagerProfile + + This command gets the list of Traffic Manager profiles in your subscription. + + + + + + + + + -------------------------- Example 2: Get a Traffic Manager profile -------------------------- + + + + PS C:\>Get-AzureTrafficManagerProfile -Name "MyProfile" + + This command gets the Traffic Manager profile named MyProfile. + + + + + + + + + -------------------------- Example 3: Add an endpoint to a Traffic Manager profile -------------------------- + + + + PS C:\>Get-AzureTrafficManagerProfile -Name "MyProfile" | Add-AzureTrafficManagerEndpoint -DomainName "Myapp2.cloudapp.net" -TrafficManagerProfile $MyTrafficManagerProfile -Type "CloudService" -Status "Enabled" | Set-AzureTrafficManagerProfile + + This command adds an endpoint to a Traffic Manager profile, and then saves the profile. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=398284 + + + Add-AzureTrafficManagerEndpoint + + + + Disable-AzureTrafficManagerProfile + + + + Enable-AzureTrafficManagerProfile + + + + New-AzureTrafficManagerProfile + + + + Remove-AzureTrafficManagerProfile + + + + Set-AzureTrafficManagerProfile + + + + + + + + New-AzureTrafficManagerProfile + + Creates a Traffic Manager profile. + + + + + New + AzureTrafficManagerProfile + + + + + The New-AzureTrafficManagerProfile cmdlet creates a Microsoft Azure Traffic Manager profile.After you create a profile where you set the LoadBalancingMethod value to "Failover", you can determine the failover order of the endpoints you add to your profile with the Add-AzureTrafficManagerEndpoint cmdlet. For more information, see Example 2 below. + + + + New-AzureTrafficManagerProfile + + Name + + Specifies the name of the Traffic Manager profile to create. + + String + + + DomainName + + Specifies the domain name of the Traffic Manager profile. This must be a subdomain of trafficmanager.net. + + String + + + LoadBalancingMethod + + Specifies the load balancing method to use to distribute the connection. +Valid values are: + +-- Performance +-- Failover +-- RoundRobin + + String + + + MonitorPort + + Specifies the port used to monitor endpoint health. Valid values are integer values greater than 0 and less than or equal to 65,535. + + Int32 + + + MonitorProtocol + + Specifies the protocol to use to monitor endpoint health. +Valid values are: + +-- Http + +-- Https + + String + + + MonitorRelativePath + + Specifies the path relative to the endpoint domain name to probe for health state. The path must meet the following restrictions: + +-- The path must be from 1 through 1000 characters. + +-- It must start with a forward slash, /. + +-- It must contain no XML elements, <>. + +-- It must contain no double slashes, //. + +-- It must contain no invalid HTML escape characters. For example, %XY. + + String + + + Ttl + + Specifies the DNS Time-to-Live (TTL) that informs the Local DNS resolvers how long to cache DNS entries. Valid values are integers from 30 through 999,999. + + Int32 + + + + + + Name + + Specifies the name of the Traffic Manager profile to create. + + String + + String + + + none + + + DomainName + + Specifies the domain name of the Traffic Manager profile. This must be a subdomain of trafficmanager.net. + + String + + String + + + none + + + LoadBalancingMethod + + Specifies the load balancing method to use to distribute the connection. +Valid values are: + +-- Performance +-- Failover +-- RoundRobin + + String + + String + + + none + + + MonitorPort + + Specifies the port used to monitor endpoint health. Valid values are integer values greater than 0 and less than or equal to 65,535. + + Int32 + + Int32 + + + none + + + MonitorProtocol + + Specifies the protocol to use to monitor endpoint health. +Valid values are: + +-- Http + +-- Https + + String + + String + + + none + + + MonitorRelativePath + + Specifies the path relative to the endpoint domain name to probe for health state. The path must meet the following restrictions: + +-- The path must be from 1 through 1000 characters. + +-- It must start with a forward slash, /. + +-- It must contain no XML elements, <>. + +-- It must contain no double slashes, //. + +-- It must contain no invalid HTML escape characters. For example, %XY. + + String + + String + + + none + + + Ttl + + Specifies the DNS Time-to-Live (TTL) that informs the Local DNS resolvers how long to cache DNS entries. Valid values are integers from 30 through 999,999. + + Int32 + + Int32 + + + none + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.TrafficManager.Models.IProfileWithDefinition + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Create a Traffic Manager profile -------------------------- + + + + PS C:\>New-AzureTrafficManagerProfile -Name "MyProfile" -DomainName "My.profile.trafficmanager.net" -LoadBalancingMethod "RoundRobin" -Ttl 30 -MonitorProtocol "Http" -MonitorPort 80 -MonitorRelativePath "/" + + This command creates a Traffic Manager profile named MyProfile in the specified Traffic Manager domain with a Round Robin load balancing method, a TTL of 30 seconds, HTTP monitoring protocol, monitoring port 80, and with the specified path. + + + + + + + + + -------------------------- Example 2: Reorder endpoints to desired failover order -------------------------- + + + + PS C:\>$Profile = Get-AzureTrafficManagerProfile -Name "MyProfile" +PS C:\> $Profile.Endpoints[0],$Profile.Endpoints[1] = $Profile.Endpoints[1],$Profile.Endpoints[0] +PS C:\> $Profile = Set-AzureTrafficManagerProfile + + This example reorders the endpoints added to MyProfile to the desired failover order. + + + + The first command gets the Traffic Manager profile object named MyProfile and stores the object in the $Profile variable.The second command re-orders the endpoints from the endpoints array to the order in which failover should occur.The last command updates the Traffic Manager profile stored in $Profile with the new endpoint order. + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=398285 + + + Disable-AzureTrafficManagerProfile + + + + Enable-AzureTrafficManagerProfile + + + + Get-AzureTrafficManagerProfile + + + + Remove-AzureTrafficManagerProfile + + + + Set-AzureTrafficManagerProfile + + + + + + + + Remove-AzureTrafficManagerEndpoint + + Removes an endpoint from a Traffic Manager profile. + + + + + Remove + AzureTrafficManagerEndpoint + + + + + The Remove-AzureTrafficManagerEndpoint cmdlet removes an endpoint from a Microsoft Azure Traffic Manager profile. After you remove an endpoint, pass the result to the Set-AzureTrafficManagerProfile cmdlet by using the pipeline operator. That cmdlet connects to Azure to save your changes. + + + + Remove-AzureTrafficManagerEndpoint + + DomainName + + Specifies the domain name of the endpoint to remove. + + String + + + Force + + + + SwitchParameter + + + TrafficManagerProfile + + Specifies the Traffic Manager profile object from which to remove the endpoint. + + IProfileWithDefinition + + + + + + DomainName + + Specifies the domain name of the endpoint to remove. + + String + + String + + + none + + + Force + + + + SwitchParameter + + SwitchParameter + + + + + + TrafficManagerProfile + + Specifies the Traffic Manager profile object from which to remove the endpoint. + + IProfileWithDefinition + + IProfileWithDefinition + + + none + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.TrafficManager.Models.IProfileWithDefinition + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Remove an endpoint from a profile -------------------------- + + + + PS C:\>$TrafficManagerProfile = Get-AzureTrafficManagerProfile -Name "ContosoProfile" +PS C:\> Remove-AzureTrafficManagerEndpoint -TrafficManagerProfile $TrafficManagerProfile -DomainName "Contoso02App.cloudapp.net" | Set-AzureTrafficManagerProfile + + The first command uses the Get-AzureTrafficManagerProfile cmdlet to get the profile named ContosoProfile, and then stores it in the $TrafficManagerProfile variable. + + + + The second command removes an endpoint that has the domain name Contoso02App.cloudapp.net from the Traffic Manager profile that is stored in $TrafficManagerProfile. The command passes the profile object to the Set-AzureTrafficManagerProfile cmdlet to connect to Azure to save your changes. + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=398286 + + + Add-AzureTrafficManagerEndpoint + + + + Set-AzureTrafficManagerEndpoint + + + + Get-AzureTrafficManagerProfile + + + + Set-AzureTrafficManagerProfile + + + + + + + + Remove-AzureTrafficManagerProfile + + Removes a Traffic Manager profile. + + + + + Remove + AzureTrafficManagerProfile + + + + + The Remove-AzureTrafficManagerProfile cmdlet removes a Microsoft Azure Traffic Manager profile from the current subscription. + + + + Remove-AzureTrafficManagerProfile + + Name + + Specifies the name of the Traffic Manager profile to delete. + + String + + + Force + + Forces the command to run without asking for user confirmation. + + SwitchParameter + + + PassThru + + Returns $True if the operation succeeded; otherwise, $False. By default, this cmdlet does not generate any output. + + SwitchParameter + + + + + + Name + + Specifies the name of the Traffic Manager profile to delete. + + String + + String + + + none + + + Force + + Forces the command to run without asking for user confirmation. + + SwitchParameter + + SwitchParameter + + + none + + + PassThru + + Returns $True if the operation succeeded; otherwise, $False. By default, this cmdlet does not generate any output. + + SwitchParameter + + SwitchParameter + + + none + + + + + + + + + + + + + + + + + + System.Boolean + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Remove a Traffic Manager profile -------------------------- + + + + PS C:\>Remove-AzureTrafficManagerProfile -Name "MyProfile" + + This command removes the Traffic Manager profile named MyProfile. + + + + + + + + + -------------------------- Example 2: Remove a Traffic Manager profile -------------------------- + + + + PS C:\>Remove-AzureTrafficManagerProfile -Name "MyProfile" -Force -PassThru + + This command removes the Traffic Manager profile named MyProfile without prompting you for confirmation, and returns the results. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=398286 + + + Disable-AzureTrafficManagerProfile + + + + Enable-AzureTrafficManagerProfile + + + + Get-AzureTrafficManagerProfile + + + + New-AzureTrafficManagerProfile + + + + Set-AzureTrafficManagerProfile + + + + + + + + Set-AzureTrafficManagerEndpoint + + Updates the properties of an endpoint in a Traffic Manager profile. + + + + + Set + AzureTrafficManagerEndpoint + + + + + The Set-AzureTrafficManagerEndpoint cmdlet updates the properties of an endpoint in a Microsoft Azure Traffic Manager profile. If the endpoint does not exist in the current profile, this cmdlet creates it. After you add an endpoint, pass the result to the Set-AzureTrafficManagerProfile cmdlet by using the pipeline operator. That cmdlet connects to Azure to save your changes. + + + + Set-AzureTrafficManagerEndpoint + + DomainName + + Specifies the domain name of the endpoint to modify. + + String + + + Location + + Specifies the location of the endpoint the cmdlet adds. This must be an Azure location.This parameter must contain a value for endpoints of the type "Any" in a profile that has the load balancing method set to "Performance". You can find a list of possible values for this parameter under Name by calling List Locations. For more information, see List Locations at http://msdn.microsoft.com/en-us/library/gg441293.aspx. + + String + + + Type + + Specifies the type of endpoint. Valid values are: + +-- CloudService +-- AzureWebsite +-- Any +-- TrafficManager + +If there is more than one AzureWebsite endpoint, the endpoints must be in different datacenters. + + String + + + Status + + Specifies the status of the monitoring endpoint. Valid values are: + +-- Enabled +-- Disabled + +If you specify a value of Enabled, Traffic Manager monitors the endpoint and the load-balancing method considers it when managing traffic. + + String + + + Weight + + Specifies the weight of the endpoint the cmdlet adds. The valid value range for this parameter is [1,1000].This parameter is only used for RoundRobin load balancing policies. + + Nullable`1[Int32] + + + MinChildEndpoints + + + + Nullable`1[Int32] + + + TrafficManagerProfile + + Specifies the Traffic Manager profile object for which to modify the endpoint. + + IProfileWithDefinition + + + + + + DomainName + + Specifies the domain name of the endpoint to modify. + + String + + String + + + none + + + Location + + Specifies the location of the endpoint the cmdlet adds. This must be an Azure location.This parameter must contain a value for endpoints of the type "Any" in a profile that has the load balancing method set to "Performance". You can find a list of possible values for this parameter under Name by calling List Locations. For more information, see List Locations at http://msdn.microsoft.com/en-us/library/gg441293.aspx. + + String + + String + + + none + + + Type + + Specifies the type of endpoint. Valid values are: + +-- CloudService +-- AzureWebsite +-- Any +-- TrafficManager + +If there is more than one AzureWebsite endpoint, the endpoints must be in different datacenters. + + String + + String + + + none + + + Status + + Specifies the status of the monitoring endpoint. Valid values are: + +-- Enabled +-- Disabled + +If you specify a value of Enabled, Traffic Manager monitors the endpoint and the load-balancing method considers it when managing traffic. + + String + + String + + + none + + + Weight + + Specifies the weight of the endpoint the cmdlet adds. The valid value range for this parameter is [1,1000].This parameter is only used for RoundRobin load balancing policies. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + MinChildEndpoints + + + + Nullable`1[Int32] + + Nullable`1[Int32] + + + + + + TrafficManagerProfile + + Specifies the Traffic Manager profile object for which to modify the endpoint. + + IProfileWithDefinition + + IProfileWithDefinition + + + none + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.TrafficManager.Models.IProfileWithDefinition + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Update an endpoint for a profile -------------------------- + + + + PS C:\>$TrafficManagerProfile = Get-AzureTrafficManagerProfile -Name "ContosoProfile" +PS C:\> Set-AzureTrafficManagerEndpoint -TrafficManagerProfile $TrafficManagerProfile -DomainName "ContosoApp02.cloudapp.net" -Status "Enabled" -Type "CloudService" -Weight 2 -Location myLocation | Set-AzureTrafficManagerProfile + + The first command uses the Get-AzureTrafficManagerProfile cmdlet to get the profile named ContosoProfile, and then stores it in the $TrafficManagerProfile variable. + + + + The second command updates the endpoint in the Traffic Manager profile that is stored in $TrafficManagerProfile. The endpoint has the domain name ContosoApp02.cloudapp.net. The command also specifies the status, type, weight, and location of the endpoint. The command passes the modified profile to the Set-AzureTrafficManagerProfile cmdlet to connect to Azure to save your changes. + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=398288 + + + Add-AzureTrafficManagerEndpoint + + + + Remove-AzureTrafficManagerEndpoint + + + + Get-AzureTrafficManagerProfile + + + + Set-AzureTrafficManagerProfile + + + + + + + + Set-AzureTrafficManagerProfile + + Updates the properties of a Traffic Manager profile. + + + + + Set + AzureTrafficManagerProfile + + + + + The Set-AzureTrafficManagerProfile cmdlet updates the properties of a Microsoft Azure Traffic Manager profile.For profiles for which you have set the LoadBalancingMethod value to "Failover", you can determine the failover order of the endpoints you have added to your profile with the Add-AzureTrafficManagerEndpoint cmdlet. For more information, see Example 3 below. + + + + Set-AzureTrafficManagerProfile + + Name + + Specifies the name of the Traffic Manager profile to update. + + String + + + LoadBalancingMethod + + Specifies the load balancing method to use to distribute the connection. Valid values are: + +-- Performance +-- Failover +-- RoundRobin + + String + + + MonitorPort + + Specifies the port used to monitor endpoint health. Valid values are integer values greater than 0 and less than or equal to 65,535. + + Nullable`1[Int32] + + + MonitorProtocol + + Specifies the protocol to use to monitor endpoint health. +Valid values are: + +-- Http +-- Https + + String + + + MonitorRelativePath + + Specifies the path relative to the endpoint domain name to probe for health state. The path must meet the following restrictions: + +-- The path must be from 1 through 1000 characters. +-- It must start with a forward slash, /. +-- It must contain no XML elements, <>. +-- It must contain no double slashes, //. +-- It must contain no invalid HTML escape characters. For example, %XY. + + String + + + Ttl + + Specifies the DNS Time-to-Live (TTL) that informs the Local DNS resolvers how long to cache DNS entries. Valid values are an integer from 30 through 999,999. + + Nullable`1[Int32] + + + TrafficManagerProfile + + Specifies the Traffic Manager profile object you use to set the profile. + + IProfileWithDefinition + + + + + + Name + + Specifies the name of the Traffic Manager profile to update. + + String + + String + + + none + + + LoadBalancingMethod + + Specifies the load balancing method to use to distribute the connection. Valid values are: + +-- Performance +-- Failover +-- RoundRobin + + String + + String + + + none + + + MonitorPort + + Specifies the port used to monitor endpoint health. Valid values are integer values greater than 0 and less than or equal to 65,535. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + none + + + MonitorProtocol + + Specifies the protocol to use to monitor endpoint health. +Valid values are: + +-- Http +-- Https + + String + + String + + + none + + + MonitorRelativePath + + Specifies the path relative to the endpoint domain name to probe for health state. The path must meet the following restrictions: + +-- The path must be from 1 through 1000 characters. +-- It must start with a forward slash, /. +-- It must contain no XML elements, <>. +-- It must contain no double slashes, //. +-- It must contain no invalid HTML escape characters. For example, %XY. + + String + + String + + + none + + + Ttl + + Specifies the DNS Time-to-Live (TTL) that informs the Local DNS resolvers how long to cache DNS entries. Valid values are an integer from 30 through 999,999. + + Nullable`1[Int32] + + Nullable`1[Int32] + + + none + + + TrafficManagerProfile + + Specifies the Traffic Manager profile object you use to set the profile. + + IProfileWithDefinition + + IProfileWithDefinition + + + none + + + + + + + + + + + + + + + + + + Microsoft.WindowsAzure.Commands.Utilities.TrafficManager.Models.IProfileWithDefinition + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Set the TTL for a Traffic Manager profile -------------------------- + + + + PS C:\>Set-AzureTrafficManagerProfile -TrafficManagerProfile $MyTrafficManagerProfile -Ttl 60 + + This command sets the TTL to 60 seconds for the Traffic Manager profile object MyTrafficManagerProfile. + + + + + + + + + -------------------------- Example 2: Set several values for a profile -------------------------- + + + + PS C:\>Get-AzureTrafficManagerProfile -Name "MyProfile" | Set-AzureTrafficManagerProfile -LoadBalancingMethod "RoundRobin" -Ttl 30 -MonitorProtocol "Http" -MonitorPort 80 -MonitorRelativePath "/" + + This command gets a Traffic Manager profile named MyProfile by using the Get-AzureTrafficManagerProfile cmdlet. The profile uses the RoundRobin load balancing method, a TTL of 30 seconds, the monitor protocol HTTP, the monitor port, and the relative path for a Traffic Manager profile. + + + + + + + + + -------------------------- Example 3: Reorder endpoints to desired failover order -------------------------- + + + + PS C:\>$Profile = Get-AzureTrafficManagerProfile -Name "MyProfile" +PS C:\> $Profile.Endpoints[0],$Profile.Endpoints[1] = $Profile.Endpoints[1],$Profile.Endpoints[0] +PS C:\> $Profile = Set-AzureTrafficManagerProfile + + This example reorders the endpoints added to MyProfile to the desired failover order. + + + + The first command gets the Traffic Manager profile object named MyProfile and stores the object in the $Profile variable.The second command re-orders the endpoints from the endpoints array to the order in which failover should occur.The last command updates the Traffic Manager profile stored in $Profile with the new endpoint order. + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=398289 + + + Disable-AzureTrafficManagerProfile + + + + Enable-AzureTrafficManagerProfile + + + + Get-AzureTrafficManagerProfile + + + + New-AzureTrafficManagerProfile + + + + Remove-AzureTrafficManagerProfile + + + + + + + + Test-AzureTrafficManagerDomainName + + Checks whether a domain name is available as a Traffic Manager profile. + + + + + Test + AzureTrafficManagerDomainName + + + + + The Test-AzureTrafficManagerDomainName cmdlet checks whether a domain name is available as a Microsoft Azure Traffic Manager profile. If the domain name is available, this cmdlet returns a value of $True. + + + + Test-AzureTrafficManagerDomainName + + DomainName + + Specifies the domain name to test. You must include the following string: + +.trafficmanager.net + + String + + + + + + DomainName + + Specifies the domain name to test. You must include the following string: + +.trafficmanager.net + + String + + String + + + none + + + + + + + + + + + + + + + + + + System.Boolean + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Check whether a domain name is available -------------------------- + + + + PS C:\>Test-AzureTrafficManagerDomainName -DomainName "ContosoApp.trafficmanager.net" +$True + + This command checks whether the domain name ContosoApp.trafficmanager.net is available as a Traffic Manager profile. + + + + + + + + + + + Online Version: + http://go.microsoft.com/fwlink/?LinkID=398290 + + + + \ No newline at end of file diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Models/IProfileWithDefinition.cs b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Models/IProfileWithDefinition.cs new file mode 100644 index 000000000000..8a43b0dfce04 --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Models/IProfileWithDefinition.cs @@ -0,0 +1,21 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.TrafficManager.Models +{ + public interface IProfileWithDefinition + { + ProfileWithDefinition GetInstance(); + } +} diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Models/ProfileWithDefinition.cs b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Models/ProfileWithDefinition.cs new file mode 100644 index 000000000000..780c124437ad --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Models/ProfileWithDefinition.cs @@ -0,0 +1,129 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Microsoft.WindowsAzure.Management.TrafficManager.Models; + +namespace Microsoft.WindowsAzure.Commands.TrafficManager.Models +{ + /// + /// Class that will be exposed to PowerShell to interact with profiles + /// This class will be piped between cmdlets. + /// Note that some definition properties are missing because they are not configurable yet + /// and would be as read-only. These properties are not exposed in the portal either: + /// - MonitorExpectedStatusCode + /// - MonitorVerb + /// - MonitorIntervalInSeconds + /// - MonitorTimeOutInSeconds + /// - MonitorToleratedNumberOfFailures + /// + public class ProfileWithDefinition : SimpleProfile, IProfileWithDefinition + { + private Definition definition { get; set; } + private IList endpoints { get; set; } + + public int TimeToLiveInSeconds + { + get { return this.definition.DnsOptions.TimeToLiveInSeconds; } + set { this.definition.DnsOptions.TimeToLiveInSeconds = value; } + } + + public string MonitorRelativePath + { + get { return this.definition.Monitors[0].HttpOptions.RelativePath; } + set { this.definition.Monitors[0].HttpOptions.RelativePath = value; } + } + + public int MonitorPort + { + get { return this.definition.Monitors[0].Port; } + set { this.definition.Monitors[0].Port = value; } + } + + public DefinitionMonitorProtocol MonitorProtocol + { + get { return this.definition.Monitors[0].Protocol; } + set { this.definition.Monitors[0].Protocol = value; } + } + + public LoadBalancingMethod LoadBalancingMethod + { + get { return this.definition.Policy.LoadBalancingMethod; } + set { this.definition.Policy.LoadBalancingMethod = value; } + } + + public IList Endpoints + { + get + { + if (this.endpoints == null) + { + this.endpoints = new List(); + + foreach (DefinitionEndpointResponse endpointReponse in this.definition.Policy.Endpoints) + { + TrafficManagerEndpoint endpoint = new TrafficManagerEndpoint(); + endpoint.DomainName = endpointReponse.DomainName; + endpoint.Location = endpointReponse.Location; + endpoint.Type = endpointReponse.Type; + endpoint.Status = endpointReponse.Status; + endpoint.Weight = endpointReponse.Weight; + endpoint.MinChildEndpoints = endpointReponse.MinChildEndpoints; + endpoint.MonitorStatus = endpointReponse.MonitorStatus; + + this.endpoints.Add(endpoint); + } + } + return this.endpoints; + } + + set + { + this.endpoints = value; + } + } + + public DefinitionPolicyMonitorStatus MonitorStatus + { + get { return this.definition.Policy.MonitorStatus; } + set { this.definition.Policy.MonitorStatus = value; } + } + + public ProfileWithDefinition GetInstance() + { + return this; + } + + public ProfileWithDefinition(Management.TrafficManager.Models.Profile profile, Definition definition) : base(profile) + { + this.endpoints = null; + this.definition = definition; + } + + public ProfileWithDefinition() : base(new Management.TrafficManager.Models.Profile()) + { + this.endpoints = null; + this.definition = new Definition() + { + Policy = new DefinitionPolicyResponse() + }; + DefinitionMonitor monitor = new DefinitionMonitor() + { + HttpOptions = new DefinitionMonitorHTTPOptions(), + }; + this.definition.Monitors.Add(monitor); + this.definition.DnsOptions = new DefinitionDnsOptions(); + } + } +} diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Models/SimpleProfile.cs b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Models/SimpleProfile.cs new file mode 100644 index 000000000000..0c9faf3bb09e --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Models/SimpleProfile.cs @@ -0,0 +1,46 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Management.TrafficManager.Models; + +namespace Microsoft.WindowsAzure.Commands.TrafficManager.Models +{ + public class SimpleProfile + { + private Management.TrafficManager.Models.Profile profile { get; set; } + + public SimpleProfile(Management.TrafficManager.Models.Profile profile) + { + this.profile = profile; + } + + public string Name + { + get { return this.profile.Name; } + set { this.profile.Name = value; } + } + + public string DomainName + { + get { return this.profile.DomainName; } + set { this.profile.DomainName = value; } + } + + public ProfileDefinitionStatus Status + { + get { return this.profile.Status; } + set { this.profile.Status = value; } + } + } +} diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Models/TrafficManagerEndpoint.cs b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Models/TrafficManagerEndpoint.cs new file mode 100644 index 000000000000..2416567aaf98 --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Models/TrafficManagerEndpoint.cs @@ -0,0 +1,83 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Runtime.Serialization; +using Microsoft.WindowsAzure.Management.TrafficManager.Models; + +namespace Microsoft.WindowsAzure.Commands.TrafficManager.Models +{ + public class TrafficManagerEndpoint + { + [DataMember(IsRequired = true)] + public string DomainName { get; set; } + + [DataMember(IsRequired = true)] + public string Location { get; set; } + + [DataMember(IsRequired = true)] + public EndpointType Type { get; set; } + + [DataMember(IsRequired = true)] + public EndpointStatus Status { get; set; } + + [DataMember(IsRequired = true)] + public DefinitionEndpointMonitorStatus MonitorStatus { get; set; } + + [DataMember(IsRequired = true)] + public int? Weight { get; set; } + + [DataMember(IsRequired = true)] + public int? MinChildEndpoints { get; set; } + + public override bool Equals(object obj) + { + if (obj == null) + { + return false; + } + + TrafficManagerEndpoint endpoint = obj as TrafficManagerEndpoint; + if (endpoint == null) + { + return false; + } + + return DomainName == endpoint.DomainName && + Location == endpoint.Location && + Type == endpoint.Type && + Status == endpoint.Status && + MonitorStatus == endpoint.MonitorStatus && + Weight == endpoint.Weight && + MinChildEndpoints == endpoint.MinChildEndpoints; + } + + public override int GetHashCode() + { + int result = DomainName != null ? DomainName.GetHashCode() : 0; + result = (result * 397) ^ (Location != null ? Location.GetHashCode() : 0); + result = (result * 397) ^ Type.GetHashCode(); + result = (result * 397) ^ Status.GetHashCode(); + result = (result * 397) ^ MonitorStatus.GetHashCode(); + if (Weight.HasValue) + { + result = (result * 397) ^ Weight.GetHashCode(); + } + if (MinChildEndpoints.HasValue) + { + result = (result * 397) ^ MinChildEndpoints.GetHashCode(); + } + return result; + } + } +} \ No newline at end of file diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Profile/DisableAzureTrafficManagerProfile.cs b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Profile/DisableAzureTrafficManagerProfile.cs new file mode 100644 index 000000000000..32493b5f4df3 --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Profile/DisableAzureTrafficManagerProfile.cs @@ -0,0 +1,41 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.TrafficManager.Utilities; +using Microsoft.WindowsAzure.Management.TrafficManager.Models; + +namespace Microsoft.WindowsAzure.Commands.TrafficManager.Profile +{ + [Cmdlet(VerbsLifecycle.Disable, "AzureTrafficManagerProfile"), OutputType(typeof(bool))] + public class DisableAzureTrafficManagerProfile : TrafficManagerBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + TrafficManagerClient.UpdateProfileStatus(Name, ProfileDefinitionStatus.Disabled); + + if (PassThru.IsPresent) + { + WriteObject(true); + } + } + } +} diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Profile/EnableAzureTrafficManagerProfile.cs b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Profile/EnableAzureTrafficManagerProfile.cs new file mode 100644 index 000000000000..9a7c9df8b502 --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Profile/EnableAzureTrafficManagerProfile.cs @@ -0,0 +1,41 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.TrafficManager.Utilities; +using Microsoft.WindowsAzure.Management.TrafficManager.Models; + +namespace Microsoft.WindowsAzure.Commands.TrafficManager.Profile +{ + [Cmdlet(VerbsLifecycle.Enable, "AzureTrafficManagerProfile"), OutputType(typeof(bool))] + public class EnableAzureTrafficManagerProfile : TrafficManagerBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + TrafficManagerClient.UpdateProfileStatus(Name, ProfileDefinitionStatus.Enabled); + + if (PassThru.IsPresent) + { + WriteObject(true); + } + } + } +} diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Profile/GetAzureTrafficManagerProfile.cs b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Profile/GetAzureTrafficManagerProfile.cs new file mode 100644 index 000000000000..ff089efa755f --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Profile/GetAzureTrafficManagerProfile.cs @@ -0,0 +1,63 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.TrafficManager.Models; +using Microsoft.WindowsAzure.Commands.TrafficManager.Utilities; + +namespace Microsoft.WindowsAzure.Commands.TrafficManager.Profile +{ + [Cmdlet(VerbsCommon.Get, "AzureTrafficManagerProfile"), OutputType(typeof(IEnumerable))] + public class GetAzureTrafficManagerProfile : TrafficManagerBaseCmdlet + { + [Parameter(Position = 0, Mandatory = false)] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + public override void ExecuteCmdlet() + { + if (string.IsNullOrEmpty(Name)) + { + GetNoName(); + } + else + { + GetByName(); + } + } + + private void GetByName() + { + ProfileWithDefinition profile = TrafficManagerClient.GetTrafficManagerProfileWithDefinition(Name); + WriteProfile(profile); + } + + private void GetNoName() + { + IEnumerable profiles = TrafficManagerClient.ListProfiles(); + WriteProfiles(profiles); + } + + private void WriteProfile(SimpleProfile profile) + { + WriteObject(profile, true); + } + + private void WriteProfiles(IEnumerable profiles) + { + WriteObject(profiles, true); + } + } +} diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Profile/NewAzureTrafficManagerProfile.cs b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Profile/NewAzureTrafficManagerProfile.cs new file mode 100644 index 000000000000..6f66317c4e8c --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Profile/NewAzureTrafficManagerProfile.cs @@ -0,0 +1,66 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.TrafficManager.Models; +using Microsoft.WindowsAzure.Commands.TrafficManager.Utilities; + +namespace Microsoft.WindowsAzure.Commands.TrafficManager.Profile +{ + [Cmdlet(VerbsCommon.New, "AzureTrafficManagerProfile"), OutputType(typeof(IProfileWithDefinition))] + public class NewAzureTrafficManagerProfile : TrafficManagerBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Position = 1, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string DomainName { get; set; } + + [Parameter(Mandatory = true)] + [ValidateSet("Performance", "Failover", "RoundRobin", IgnoreCase = false)] + [ValidateNotNullOrEmpty] + public string LoadBalancingMethod { get; set; } + + [Parameter(Mandatory = true)] + public int MonitorPort { get; set; } + + [Parameter(Mandatory = true)] + [ValidateSet("Http", "Https", IgnoreCase = false)] + [ValidateNotNullOrEmpty] + public string MonitorProtocol { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string MonitorRelativePath { get; set; } + + [Parameter(Mandatory = true)] + public int Ttl { get; set; } + + public override void ExecuteCmdlet() + { + var profile = TrafficManagerClient.NewAzureTrafficManagerProfile( + Name, + DomainName, + LoadBalancingMethod, + MonitorPort, + MonitorProtocol, + MonitorRelativePath, + Ttl); + + WriteObject(profile); + } + } +} diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Profile/RemoveAzureTrafficManagerProfile.cs b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Profile/RemoveAzureTrafficManagerProfile.cs new file mode 100644 index 000000000000..11c58b09a72c --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Profile/RemoveAzureTrafficManagerProfile.cs @@ -0,0 +1,52 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.TrafficManager.Utilities; + +namespace Microsoft.WindowsAzure.Commands.TrafficManager.Profile +{ + [Cmdlet(VerbsCommon.Remove, "AzureTrafficManagerProfile"), OutputType(typeof(bool))] + public class RemoveAzureTrafficManagerProfile : TrafficManagerBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Name of the Traffic Manager profile to remove.")] + public string Name { get; set; } + + [Parameter(Mandatory = false, HelpMessage = "Do not confirm profile deletion")] + public SwitchParameter Force { get; set; } + + [Parameter(Mandatory = false)] + public SwitchParameter PassThru { get; set; } + + public override void ExecuteCmdlet() + { + ConfirmAction( + Force.IsPresent, + string.Format(Resources.RemoveTrafficManagerProfileWarning, Name), + Resources.RemoveTrafficManagerProfileWarning, + Name, + () => + { + TrafficManagerClient.RemoveTrafficManagerProfile(Name); + + WriteVerboseWithTimestamp(Resources.RemoveTrafficManagerProfileSucceeded, Name); + if (PassThru.IsPresent) + { + WriteObject(true); + } + }); + } + } +} diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Profile/SetAzureTrafficManagerProfile.cs b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Profile/SetAzureTrafficManagerProfile.cs new file mode 100644 index 000000000000..dc6fe4e68bd0 --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Profile/SetAzureTrafficManagerProfile.cs @@ -0,0 +1,81 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + + +using System; +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.TrafficManager.Models; +using Microsoft.WindowsAzure.Commands.TrafficManager.Utilities; +using Microsoft.WindowsAzure.Management.TrafficManager.Models; + +namespace Microsoft.WindowsAzure.Commands.TrafficManager.Profile +{ + [Cmdlet(VerbsCommon.Set, "AzureTrafficManagerProfile"), OutputType(typeof(IProfileWithDefinition))] + public class SetAzureTrafficManagerProfile : TrafficManagerConfigurationBaseCmdlet + { + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true)] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Mandatory = false)] + [ValidateSet("Performance", "Failover", "RoundRobin", IgnoreCase = false)] + [ValidateNotNullOrEmpty] + public string LoadBalancingMethod { get; set; } + + [Parameter(Mandatory = false)] + public int? MonitorPort { get; set; } + + [Parameter(Mandatory = false)] + [ValidateSet("Http", "Https", IgnoreCase = false)] + [ValidateNotNullOrEmpty] + public string MonitorProtocol { get; set; } + + [Parameter(Mandatory = false)] + [ValidateNotNullOrEmpty] + public string MonitorRelativePath { get; set; } + + [Parameter(Mandatory = false)] + public int? Ttl { get; set; } + + public override void ExecuteCmdlet() + { + ProfileWithDefinition profile = TrafficManagerProfile.GetInstance(); + + if (string.IsNullOrEmpty(Name)) + { + this.Name = profile.Name; + } + + if (!profile.Name.Equals(Name)) + { + throw new Exception(Resources.SetTrafficManagerProfileAmbiguous); + } + + DefinitionCreateParameters updatedDefinitionAsParam = + TrafficManagerClient.InstantiateTrafficManagerDefinition( + LoadBalancingMethod ?? profile.LoadBalancingMethod.ToString(), + MonitorPort.HasValue ? MonitorPort.Value : profile.MonitorPort, + MonitorProtocol ?? profile.MonitorProtocol.ToString(), + MonitorRelativePath ?? profile.MonitorRelativePath, + Ttl.HasValue ? Ttl.Value : profile.TimeToLiveInSeconds, + profile.Endpoints); + + ProfileWithDefinition newDefinition = + TrafficManagerClient.AssignDefinitionToProfile(Name, updatedDefinitionAsParam); + + WriteObject(newDefinition); + } + } +} diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Properties/AssemblyInfo.cs b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..29f62c1bdb32 --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Properties/AssemblyInfo.cs @@ -0,0 +1,53 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Microsoft Azure Powershell")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright("Copyright © Microsoft 2014")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("13e3028d-ffe3-4864-b424-6c4b07dd61fb")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyVersion)] +[assembly: AssemblyFileVersion(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyFileVersion)] +#if SIGN +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] +#else +[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.Test")] +#endif +[assembly: CLSCompliant(false)] diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/TestAzureTrafficManagerDomainName.cs b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/TestAzureTrafficManagerDomainName.cs new file mode 100644 index 000000000000..0e45eff67cc7 --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/TestAzureTrafficManagerDomainName.cs @@ -0,0 +1,49 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.TrafficManager.Utilities; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.TrafficManager +{ + [Cmdlet(VerbsDiagnostic.Test, "AzureTrafficManagerDomainName"), OutputType(typeof(bool))] + public class TestAzureTrafficManagerDomainName : TrafficManagerBaseCmdlet + { + [Parameter(Position = 0, Mandatory = true)] + [ValidateNotNullOrEmpty] + public string DomainName { get; set; } + + public override void ExecuteCmdlet() + { + bool result = TrafficManagerClient.TestDomainAvailability(GetDomainNameToCheck(DomainName)); + WriteObject(result); + } + + private string GetDomainNameToCheck(string domainName) + { + string TrafficManagerSuffix = !string.IsNullOrEmpty(AzureSession.CurrentContext.Environment.GetEndpoint(Common.Models.AzureEnvironment.Endpoint.TrafficManagerDnsSuffix)) ? + AzureSession.CurrentContext.Environment.GetEndpoint(Common.Models.AzureEnvironment.Endpoint.TrafficManagerDnsSuffix) : + AzureEnvironmentConstants.AzureTrafficManagerDnsSuffix; + + if (!string.IsNullOrEmpty(domainName) && !domainName.ToLower().EndsWith(TrafficManagerSuffix)) + { + return string.Format("{0}.{1}", domainName, TrafficManagerSuffix); + } + + return domainName; + } + } +} diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Utilities/Constants.cs b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Utilities/Constants.cs new file mode 100644 index 000000000000..fb965d218717 --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Utilities/Constants.cs @@ -0,0 +1,27 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Net; + +namespace Microsoft.WindowsAzure.Commands.TrafficManager.Utilities +{ + public class Constants + { + public const string monitorHttpOptionVerb = "GET"; + public const int monitorHttpOptionExpectedStatusCode = (int)HttpStatusCode.OK; + public const int monitorIntervalInSeconds = 30; + public const int monitorTimeoutInSeconds = 10; + public const int monitorToleratedNumberOfFailures = 3; + } +} diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Utilities/ITrafficManagerClient.cs b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Utilities/ITrafficManagerClient.cs new file mode 100644 index 000000000000..54eea879eada --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Utilities/ITrafficManagerClient.cs @@ -0,0 +1,58 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Microsoft.WindowsAzure.Commands.TrafficManager.Models; +using Microsoft.WindowsAzure.Management.TrafficManager; +using Microsoft.WindowsAzure.Management.TrafficManager.Models; + +namespace Microsoft.WindowsAzure.Commands.TrafficManager.Utilities +{ + public interface ITrafficManagerClient + { + TrafficManagerManagementClient Client { get; } + + ProfileWithDefinition NewAzureTrafficManagerProfile( + string profileName, + string domainName, + string loadBalancingMethod, + int monitorPort, + string monitorProtocol, + string monitorRelativePath, + int ttl); + + ProfileWithDefinition AssignDefinitionToProfile(string profileName, DefinitionCreateParameters definitionParameter); + void RemoveTrafficManagerProfile(string profileName); + ProfileWithDefinition GetTrafficManagerProfileWithDefinition(string profileName); + + DefinitionCreateParameters InstantiateTrafficManagerDefinition( + string loadBalancingMethod, + int monitorPort, + string monitorProtocol, + string monitorRelativePath, + int ttl, + IList endpoints); + + DefinitionCreateParameters InstantiateTrafficManagerDefinition(Definition definition); + + void UpdateProfileStatus(string profileName, ProfileDefinitionStatus targetStatus); + ProfileDefinitionStatus GetStatus(string profileName); + void CreateTrafficManagerProfile(string profileName, string domainName); + void CreateTrafficManagerDefinition(string profileName, DefinitionCreateParameters parameters); + ProfileGetResponse GetProfile(string profileName); + DefinitionGetResponse GetDefinition(string profileName); + IEnumerable ListProfiles(); + bool TestDomainAvailability(string domainName); + } +} \ No newline at end of file diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Utilities/TrafficManagerBaseCmdlet.cs b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Utilities/TrafficManagerBaseCmdlet.cs new file mode 100644 index 000000000000..a7ca64e0dd24 --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Utilities/TrafficManagerBaseCmdlet.cs @@ -0,0 +1,37 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.Utilities.Common; + +namespace Microsoft.WindowsAzure.Commands.TrafficManager.Utilities +{ + public abstract class TrafficManagerBaseCmdlet : AzurePSCmdlet + { + private ITrafficManagerClient trafficManagerClient; + + public ITrafficManagerClient TrafficManagerClient + { + get + { + if (this.trafficManagerClient == null) + { + this.trafficManagerClient = new TrafficManagerClient(this.CurrentContext.Subscription); + } + return this.trafficManagerClient; + } + + set { this.trafficManagerClient = value; } + } + } +} diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Utilities/TrafficManagerClient.cs b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Utilities/TrafficManagerClient.cs new file mode 100644 index 000000000000..5b6ab8b92890 --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Utilities/TrafficManagerClient.cs @@ -0,0 +1,229 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.WindowsAzure.Commands.Common; +using Microsoft.WindowsAzure.Commands.Common.Models; +using Microsoft.WindowsAzure.Commands.TrafficManager.Models; +using Microsoft.WindowsAzure.Management.TrafficManager; +using Microsoft.WindowsAzure.Management.TrafficManager.Models; + +namespace Microsoft.WindowsAzure.Commands.TrafficManager.Utilities +{ + public class TrafficManagerClient : ITrafficManagerClient + { + public TrafficManagerManagementClient Client { get; internal set; } + + public TrafficManagerClient(AzureSubscription subscription) + { + this.Client = AzureSession.ClientFactory.CreateClient(subscription, AzureEnvironment.Endpoint.ServiceManagement); + } + + public TrafficManagerClient(TrafficManagerManagementClient client) + { + this.Client = client; + } + + public ProfileWithDefinition NewAzureTrafficManagerProfile( + string profileName, + string domainName, + string loadBalancingMethod, + int monitorPort, + string monitorProtocol, + string monitorRelativePath, + int ttl) + { + // Create the profile + this.CreateTrafficManagerProfile(profileName, domainName); + + // Create the definition + DefinitionCreateParameters definitionParameter = this.InstantiateTrafficManagerDefinition( + loadBalancingMethod, + monitorPort, + monitorProtocol, + monitorRelativePath, + ttl, + // not adding any endpoints at this time + new List()); + + this.CreateTrafficManagerDefinition(profileName, definitionParameter); + + return this.GetTrafficManagerProfileWithDefinition(profileName); + } + + public ProfileWithDefinition AssignDefinitionToProfile(string profileName, DefinitionCreateParameters definitionParameter) + { + this.Client.Definitions.Create(profileName, definitionParameter); + return this.GetTrafficManagerProfileWithDefinition(profileName); + } + + public void RemoveTrafficManagerProfile(string profileName) + { + OperationResponse resp = this.Client.Profiles.Delete(profileName); + } + + public ProfileWithDefinition GetTrafficManagerProfileWithDefinition(string profileName) + { + Management.TrafficManager.Models.Profile profile = this.GetProfile(profileName).Profile; + Definition definition = null; + try + { + definition = this.GetDefinition(profileName).Definition; + + } + catch (CloudException) + { + + } + return new ProfileWithDefinition(profile, definition); + } + + public DefinitionCreateParameters InstantiateTrafficManagerDefinition( + string loadBalancingMethod, + int monitorPort, + string monitorProtocol, + string monitorRelativePath, + int ttl, + IList endpoints) + { + // Create the definition + var definitionParameter = new DefinitionCreateParameters(); + var dnsOptions = new DefinitionDnsOptions(); + var monitor = new DefinitionMonitor(); + var policyParameter = new DefinitionPolicyCreateParameters(); + var monitorHttpOption = new DefinitionMonitorHTTPOptions(); + + dnsOptions.TimeToLiveInSeconds = ttl; + + monitorHttpOption.RelativePath = monitorRelativePath; + monitorHttpOption.Verb = Constants.monitorHttpOptionVerb; + monitorHttpOption.ExpectedStatusCode = Constants.monitorHttpOptionExpectedStatusCode; + + monitor.Protocol = + (DefinitionMonitorProtocol)Enum.Parse(typeof(DefinitionMonitorProtocol), monitorProtocol); + monitor.IntervalInSeconds = Constants.monitorIntervalInSeconds; + monitor.TimeoutInSeconds = Constants.monitorTimeoutInSeconds; + monitor.ToleratedNumberOfFailures = Constants.monitorToleratedNumberOfFailures; + monitor.Port = monitorPort; + policyParameter.LoadBalancingMethod = + (LoadBalancingMethod)Enum.Parse(typeof(LoadBalancingMethod), loadBalancingMethod); + + policyParameter.Endpoints = new List(); + foreach (TrafficManagerEndpoint endpoint in endpoints) + { + var endpointParam = new DefinitionEndpointCreateParameters + { + DomainName = endpoint.DomainName, + Location = endpoint.Location, + Status = endpoint.Status, + Type = endpoint.Type, + Weight = endpoint.Weight, + MinChildEndpoints = endpoint.MinChildEndpoints + }; + + policyParameter.Endpoints.Add(endpointParam); + } + + definitionParameter.DnsOptions = dnsOptions; + definitionParameter.Policy = policyParameter; + definitionParameter.Monitors.Add(monitor); + monitor.HttpOptions = monitorHttpOption; + + return definitionParameter; + } + + public DefinitionCreateParameters InstantiateTrafficManagerDefinition(Definition definition) + { + var definitionCreateParams = new DefinitionCreateParameters(); + + var endpoints = new List(); + foreach (DefinitionEndpointResponse endpointReponse in definition.Policy.Endpoints) + { + var endpoint = new DefinitionEndpointCreateParameters + { + DomainName = endpointReponse.DomainName, + Location = endpointReponse.Location, + Type = endpointReponse.Type, + Status = endpointReponse.Status, + Weight = endpointReponse.Weight, + MinChildEndpoints = endpointReponse.MinChildEndpoints + }; + + endpoints.Add(endpoint); + } + + definitionCreateParams.Policy = new DefinitionPolicyCreateParameters + { + Endpoints = endpoints, + LoadBalancingMethod = definition.Policy.LoadBalancingMethod + }; + + definitionCreateParams.DnsOptions = definition.DnsOptions; + definitionCreateParams.Monitors = definition.Monitors; + + return definitionCreateParams; + } + + public void UpdateProfileStatus(string profileName, ProfileDefinitionStatus targetStatus) + { + ProfileDefinitionStatus currentStatus = this.GetStatus(profileName); + if (currentStatus != targetStatus) + { + this.Client.Profiles.Update(profileName, targetStatus, 1); + } + } + + public ProfileDefinitionStatus GetStatus(string profileName) + { + return this.Client.Profiles.Get(profileName).Profile.Status; + } + + public void CreateTrafficManagerProfile(string profileName, string domainName) + { + this.Client.Profiles.Create(profileName, domainName); + } + + public void CreateTrafficManagerDefinition(string profileName, DefinitionCreateParameters parameters) + { + this.Client.Definitions.Create(profileName, parameters); + } + + public ProfileGetResponse GetProfile(string profileName) + { + return this.Client.Profiles.Get(profileName); + } + + public DefinitionGetResponse GetDefinition(string profileName) + { + return this.Client.Definitions.Get(profileName); + } + + public IEnumerable ListProfiles() + { + IList respProfiles = this.Client.Profiles.List().Profiles; + + IEnumerable resultProfiles = + respProfiles.Select(respProfile => new SimpleProfile(respProfile)); + + return resultProfiles; + } + + public bool TestDomainAvailability(string domainName) + { + return this.Client.Profiles.CheckDnsPrefixAvailability(domainName).Result; + } + } +} diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Utilities/TrafficManagerConfigurationBaseCmdlet.cs b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Utilities/TrafficManagerConfigurationBaseCmdlet.cs new file mode 100644 index 000000000000..192510bab863 --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/Utilities/TrafficManagerConfigurationBaseCmdlet.cs @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Management.Automation; +using Microsoft.WindowsAzure.Commands.TrafficManager.Models; + +namespace Microsoft.WindowsAzure.Commands.TrafficManager.Utilities +{ + public class TrafficManagerConfigurationBaseCmdlet : TrafficManagerBaseCmdlet + { + [Parameter( + Position = 0, + Mandatory = true, + ValueFromPipeline = true, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Traffic Manager profile to update.")] + public IProfileWithDefinition TrafficManagerProfile { get; set; } + } +} diff --git a/src/ServiceManagement/TrafficManager/Commands.TrafficManager/packages.config b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/packages.config new file mode 100644 index 000000000000..3ccc754e42e0 --- /dev/null +++ b/src/ServiceManagement/TrafficManager/Commands.TrafficManager/packages.config @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/UnitTest.testsettings b/src/UnitTest.testsettings new file mode 100644 index 000000000000..4d12efef4cb2 --- /dev/null +++ b/src/UnitTest.testsettings @@ -0,0 +1,38 @@ + + + These are default test settings for a OneSDK test run. + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + + + + + + + + + + + \ No newline at end of file diff --git a/src/lib/Microsoft.Web.Deployment.dll b/src/lib/Microsoft.Web.Deployment.dll new file mode 100644 index 000000000000..38053edf5b0f Binary files /dev/null and b/src/lib/Microsoft.Web.Deployment.dll differ diff --git a/src/lib/Microsoft.WindowsAzure.Storage.DataMovement.dll b/src/lib/Microsoft.WindowsAzure.Storage.DataMovement.dll new file mode 100644 index 000000000000..468e304e2611 Binary files /dev/null and b/src/lib/Microsoft.WindowsAzure.Storage.DataMovement.dll differ diff --git a/tools/Build.ps1 b/tools/Build.ps1 new file mode 100644 index 000000000000..0f7389778785 --- /dev/null +++ b/tools/Build.ps1 @@ -0,0 +1,18 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +$scriptFolder = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent +. ($scriptFolder + '.\SetupEnv.ps1') + +msbuild "$env:AzurePSRoot\build.proj" /t:BuildDebug \ No newline at end of file diff --git a/tools/BuildInstaller.ps1 b/tools/BuildInstaller.ps1 new file mode 100644 index 000000000000..1898c28be8cf --- /dev/null +++ b/tools/BuildInstaller.ps1 @@ -0,0 +1,62 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +$scriptFolder = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent +. ($scriptFolder + '.\SetupEnv.ps1') + +$packageFolder="$env:AzurePSRoot\src\Package" +if (Test-Path $packageFolder) { + Remove-Item -Path $packageFolder -Recurse -Force +} + +$keyPath = "HKLM:\SOFTWARE\Microsoft\Windows Installer XML" +if (${env:ADX64Platform}){ + $keyPath = "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows Installer XML" +} + +$allWixVersions = Get-ChildItem $keyPath +if ($allWixVersions -ne $null){ + foreach ($wixVersion in $allWixVersions){ + $wixInstallRoot = $wixVersion.GetValue("InstallRoot", $null) + if ($wixInstallRoot -ne $null) { + Write-Verbose "WIX tools was installed at $wixInstallRoot" + break + } + } +} + +if ($wixInstallRoot -eq $null){ + Write-Host "You don't have Windows Installer XML Toolset installed, which is needed to build setup." -ForegroundColor "Yellow" + Write-Host "Press (Y) to install through codeplex web page we will open for you; (N) to skip" + $keyPressed = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyUp") + if ($keyPressed.Character -eq "y" ){ + Invoke-Expression "cmd.exe /C start http://wix.codeplex.com/downloads/get/762937" + Read-Host "Press any key to continue after the installtion is finished" + } +} + +#add wix to the PATH. Note, no need to be very accurate here, +#and we just register both 3.8 & 3.5 to simplify the script +$env:path = $env:path + ";$wixInstallRoot" + +# Build the cmdlets in debug mode +msbuild "$env:AzurePSRoot\build.proj" /t:"BuildDebug" + +# Regenerate the installer files +&"$env:AzurePSRoot\tools\Installer\generate.ps1" 'Debug' + +# Build the installer +msbuild "$env:AzurePSRoot\build.proj" /t:"BuildSetupDebug" + +Write-Host "MSI file path: $env:AzurePSRoot\setup\build\Debug\AzurePowerShell.msi" \ No newline at end of file diff --git a/tools/InstallLatestSdk.ps1 b/tools/InstallLatestSdk.ps1 new file mode 100644 index 000000000000..599f911c4d83 --- /dev/null +++ b/tools/InstallLatestSdk.ps1 @@ -0,0 +1,70 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +function Get-RegistryKeyValues() +{ + param + ( + [Parameter(Mandatory=1)][string]$regKeyPath, + [Parameter(Mandatory=1)][string]$regKeyValueName + ) + + $regKeyValue = "" + + $regKeyValueObject = Get-ItemProperty -Path $regKeyPath -Name $regKeyValueName -ErrorAction SilentlyContinue + if ($regKeyValueObject -ne $null) { + $regKeyValue = $regKeyValueObject.$regKeyValueName + } + return $regKeyValue +} + +#Get WebPI CMD +$WebPi="$scriptFolder\test\WebpiCmd.exe" + +$allWebPIVersions = Get-ChildItem HKLM:\SOFTWARE\Microsoft\WebPlatformInstaller -ea SilentlyContinue | + ForEach-Object { + if($_.GetValue("InstallPath", $null) -ne $null) + { + $WebPi = $_.GetValue("InstallPath") + "WebpiCmd.exe" + } + } + +Write-Host "using webpi command: $WebPi" + +$programFiles = $env:ProgramFiles +if (Test-Path "$env:ProgramW6432"){ + $programFiles = $env:ProgramW6432 +} + +if (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Microsoft SDKs\ServiceHosting\v2.4")) { + Write-Host installing Azure Authoring Tools + Start-Process "$WebPi" "/Install /products:WindowsAzureSDK_Only.2.4 /accepteula" -Wait +} + +$detectKey = "HKLM:\SOFTWARE\Microsoft\Windows Azure Emulator"; +$producteVersion = Get-RegistryKeyValues $detectKey "FullVersion" +if (!($producteVersion.StartsWith("2.4."))) { + Write-Host installing Azure Compute Emulator + Start-Process "$WebPi" "/Install /products:WindowsAzureEmulator_Only.2.4 /accepteula" -Wait +} + +$detectKey = "HKLM:\SOFTWARE\Microsoft\Windows Azure Storage Emulator" +if (${env:ADX64Platform}){ + $detectKey = "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows Azure Storage Emulator" +} +$producteVersion = Get-RegistryKeyValues $detectKey "FullVersion" +if (!($producteVersion.StartsWith("3.3"))) { + Write-Host installing Azure Storage Emulator + Start-Process "$WebPi" "/Install /products:WindowsAzureStorageEmulator.3.3 /accepteula" -Wait +} diff --git a/tools/Installer/generate.ps1 b/tools/Installer/generate.ps1 new file mode 100644 index 000000000000..3422d4d6c5b6 --- /dev/null +++ b/tools/Installer/generate.ps1 @@ -0,0 +1,48 @@ +param( + [Parameter(Mandatory = $false, Position = 0)] + [string] $buildConfig +) + +$VerbosePreference = 'Continue' + +if ([string]::IsNullOrEmpty($buildConfig)) +{ + Write-Verbose "Setting build configuration to 'Release'" + $buildConfig = 'Release' +} + +Write-Verbose "Build configuration is set to $buildConfig" + +$output = Join-Path $env:AzurePSRoot "src\Package\$buildConfig" +Write-Verbose "The output folder is set to $output" +$serviceManagementPath = Join-Path $output "ServiceManagement\Azure" +$resourceManagerPath = Join-Path $output "ResourceManager\AzureResourceManager" + +Write-Verbose "Removing duplicated Resources folder" +Remove-Item -Recurse -Force $serviceManagementPath\Compute\Resources\ -ErrorAction SilentlyContinue +Remove-Item -Recurse -Force $serviceManagementPath\Sql\Resources\ -ErrorAction SilentlyContinue +Remove-Item -Recurse -Force $serviceManagementPath\Storage\Resources\ -ErrorAction SilentlyContinue +Remove-Item -Recurse -Force $serviceManagementPath\ManagedCache\Resources\ -ErrorAction SilentlyContinue + +Write-Verbose "Removing generated NuGet folders from $output" +$resourcesFolders = @("de", "es", "fr", "it", "ja", "ko", "ru", "zh-Hans", "zh-Hant") +Get-ChildItem -Include $resourcesFolders -Recurse -Force -Path $output | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue + +Write-Verbose "Removing XML help files for helper dlls from $output" +$exclude = @("*.dll-Help.xml", "Scaffold.xml", "RoleSettings.xml", "WebRole.xml", "WorkerRole.xml") +$include = @("*.xml", "*.lastcodeanalysissucceeded", "*.dll.config", "*.pdb") +Get-ChildItem -Include $include -Exclude $exclude -Recurse -Path $output | Remove-Item -Force -Recurse + +if (Get-Command "heat.exe" -ErrorAction SilentlyContinue) +{ + $azureFiles = Join-Path $env:AzurePSRoot 'setup\azurecmdfiles.wxi' + heat dir $output -srd -sfrag -sreg -ag -g1 -cg azurecmdfiles -dr PowerShellFolder -var var.sourceDir -o $azureFiles + + # Replace with + (gc $azureFiles).replace('&1 & set") { + if ($_ -match '^([^=]+)=(.*)') { + [System.Environment]::SetEnvironmentVariable($matches[1], $matches[2]) + } + } +} + +if (Test-Path -Path env:\AzurePSRoot) { + Write-Host -Object 'AzurePSRoot environment variable already exists. Exiting ...'; + exit; +} + +Write-Host -Object 'Initializing Azure PowerShell environment...'; + +# PowerShell commands need elevation for dependencies installation and running tests +if (!(Test-IsAdmin)){ + Write-Host -Object 'Please launch command under administrator account. It is needed for environment setting up and unit test.' -ForegroundColor Red; +} + +$env:AzurePSRoot = Split-Path -Parent -Path $MyInvocation.MyCommand.Path; +$env:AzurePSRoot = Split-Path -Parent -Path $env:AzurePSRoot; + +if (Test-Path -Path ${env:\ProgramFiles(x86)} ) { + $env:ADXSDKProgramFiles = ${env:ProgramFiles(x86)} + $env:ADX64Platform = $true +} else { + $env:ADXSDKProgramFiles = $env:ProgramFiles + $env:ADX64Platform = $false +} + + +if (Test-Path -Path "$env:ADXSDKProgramFiles\Microsoft Visual Studio 12.0") { + $vsVersion="12.0" +} else { + $vsVersion="11.0" +} + +$setVSEnv = '"{0}\Microsoft Visual Studio {1}\VC\vcvarsall.bat" x64' -f $env:ADXSDKProgramFiles, $vsVersion; + +Invoke-Environment -Command $setVSEnv; diff --git a/tools/SetupHttpRecordEnv.ps1 b/tools/SetupHttpRecordEnv.ps1 new file mode 100644 index 000000000000..e23ca2e6fbe9 --- /dev/null +++ b/tools/SetupHttpRecordEnv.ps1 @@ -0,0 +1,16 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +$scriptFolder = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent +. ($scriptFolder + '.\SetupLiveScenarioTestEnv.ps1') -Record \ No newline at end of file diff --git a/tools/SetupLiveScenarioTestEnv.ps1 b/tools/SetupLiveScenarioTestEnv.ps1 new file mode 100644 index 000000000000..ab379cc1f027 --- /dev/null +++ b/tools/SetupLiveScenarioTestEnv.ps1 @@ -0,0 +1,46 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +[CmdletBinding()] +Param( [switch] $Record ) + +$scriptFolder = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent +. ($scriptFolder + '.\SetupTestEnv.ps1') + +$resourceManagerVariables = Test-Path env:TEST_CSM_ORGID_AUTHENTICATION +$serviceManagementVariables = Test-Path env:TEST_ORGID_AUTHENTICATION +# Using storage account is not recommended because of the complexity, but we will still support it +$oldRdfeTestVariables = $(Test-Path env:AZURE_STORAGE_ACCESS_KEY) -and $(Test-Path env:AZURE_STORAGE_ACCOUNT) +if (!$serviceManagementVariables -AND !$resourceManagerVariables -AND !$oldRdfeTestVariables) { + Write-Host "You environment has NOT been set up for sceanrio testing. We will help you configure..." -ForegroundColor "Yellow" + $subscription = Read-Host 'Please input the Azure subscription guid you tests will use:' + $env:TEST_ORGID_AUTHENTICATION = "SubscriptionId=$subscription;BaseUri=https://management.core.windows.net/;AADAuthEndpoint=https://login.windows.net/;GraphUri=https://graph.windows.net/" + $env:TEST_CSM_ORGID_AUTHENTICATION = "SubscriptionId=$subscription;BaseUri=https://management.azure.com/;AADAuthEndpoint=https://login.windows.net/" + Write-Host "To avoid getting prompt again, you can preset one of following environment variables with the value beside" -ForegroundColor "Yellow" + Write-Host "TEST_ORGID_AUTHENTICATION : $env:TEST_ORGID_AUTHENTICATION" + Write-Host "TEST_CSM_ORGID_AUTHENTICATION : $env:TEST_CSM_ORGID_AUTHENTICATION" +} + +$env:AZURE_TEST_ENVIRONMENT="production" + +if ($Record) { + Write-Host "Setting up 'Record' mode" + $env:AZURE_TEST_MODE="Record" + $env:TEST_HTTPMOCK_OUTPUT="$env:AzurePSRoot\src\Common\Commands.ScenarioTest\Resources\SessionRecords\" + Write-Host "The HTTP traffic will be captured under $env:TEST_HTTPMOCK_OUTPUT." -ForegroundColor "Green" +} else { + Remove-Item env:\AZURE_TEST_MODE +} + +Write-Host "Environment has been set up. You can launch Visual Studio to run tests by typing devenv.exe here; or, through msbuild.exe" -ForegroundColor "Green" diff --git a/tools/SetupTestEnv.ps1 b/tools/SetupTestEnv.ps1 new file mode 100644 index 000000000000..fefe7b4ce37a --- /dev/null +++ b/tools/SetupTestEnv.ps1 @@ -0,0 +1,43 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +$scriptFolder = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent +. ($scriptFolder + '.\SetupEnv.ps1') + +try { + git.exe| Out-Null +} +catch [System.Management.Automation.CommandNotFoundException] { + if (Test-Path "$env:ADXSDKProgramFiles\Git\bin") { + Write-Host Adding Git installation folder to the PATH environment variable, needed for some unit tests. + $env:path = $env:path + ";$env:ADXSDKProgramFiles\Git\bin" + } +} + +#The detecting logic for django is not decent, but the best we can do so far. +if (!(Test-Path "$env:SystemDrive\Python27")) { + Write-Host "download Python, Pip and Django to $tempFileShare" + $tempFileShare = $env:temp + $client = New-Object System.Net.WebClient + $client.DownloadFile("https://www.python.org/ftp/python/2.7.5/python-2.7.5.msi", "$tempFileShare\python-2.7.5.msi") + $client.DownloadFile("https://raw.github.com/pypa/pip/master/contrib/get-pip.py", "$tempFileShare\get-pip.py"); + Write-Host "Install..." + Start-Process msiexec.exe "/i $tempFileShare\python-2.7.5.msi /passive" -Wait + Start-Process "$env:SystemDrive\Python27\python.exe" "$tempFileShare\get-pip.py" -Wait + Start-Process "$env:SystemDrive\Python27\scripts\pip.exe" "install Django==1.5" -Wait + Remove-Item "$tempFileShare\python-2.7.5.msi" + Remove-Item "$tempFileShare\get-pip.py" +} + +$env:AZURE_TEST_MODE="Playback" diff --git a/tools/Test/Microsoft.Web.PlatformInstaller.dll b/tools/Test/Microsoft.Web.PlatformInstaller.dll new file mode 100644 index 000000000000..9d6d2c2e3b73 Binary files /dev/null and b/tools/Test/Microsoft.Web.PlatformInstaller.dll differ diff --git a/tools/Test/WebpiCmd.exe b/tools/Test/WebpiCmd.exe new file mode 100644 index 000000000000..0ce63fc8e10e Binary files /dev/null and b/tools/Test/WebpiCmd.exe differ diff --git a/tools/Test/WebpiCmd.exe.config b/tools/Test/WebpiCmd.exe.config new file mode 100644 index 000000000000..f4cf120df354 --- /dev/null +++ b/tools/Test/WebpiCmd.exe.config @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tools/VerifyAzureSDK.ps1 b/tools/VerifyAzureSDK.ps1 new file mode 100644 index 000000000000..348ae07e86c2 --- /dev/null +++ b/tools/VerifyAzureSDK.ps1 @@ -0,0 +1,53 @@ +$scriptFolder = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent +. ($scriptFolder + '.\SetupEnv.ps1') + +Import-Module "$env:AzurePSRoot\src\Package\Debug\ServiceManagement\azure\Azure.psd1" + +Write-Host "***Please read. this script requires the following product***" -ForegroundColor "Red" +Write-Host "**Node.js for Windows (32-bits) at http://nodejs.org/download/ and Azure Node.js for Windows at http://azure.microsoft.com/en-us/downloads/" -ForegroundColor "Red" +Write-Host "**Azure PHP for Windows at http://azure.microsoft.com/en-us/downloads/." -ForegroundColor "Yellow" +Write-Host "**It is recommended to reboot the machine after the setup, or at least relaunch the powershell." -ForegroundColor "Red" + +Write-Host "Testing Caching role with MemCacheShim package, Node Web Role, and run under emulators" -ForegroundColor "Green" +#detect nodejs for x86 is installed, if not install it + +# create testing folder +$testFolder = "$env:AzurePSRoot\src\Package\" + [System.IO.Path]::GetRandomFileName() +md $testFolder +cd $testFolder + +New-AzureServiceProject Cache +# the 'ClientRole' is coupled with the client script, do not change it unless you update the script as well +Add-AzureNodeWebRole ClientRole +Add-AzureCacheWorkerRole CacheRole +Enable-AzureMemcacheRole ClientRole CacheRole + +md "temp" +Copy-Item "$env:AzurePSRoot\src\Common\Commands.ScenarioTest\Resources\CloudService\Cache\*.js" ".\ClientRole\" -Force -Recurse +cd "$testFolder\Cache\ClientRole" +Start-Process "npm" "install $env:AzurePSRoot\src\Common\Commands.ScenarioTest\Resources\CloudService\Cache\mc.tgz $env:AzurePSRoot\src\Common\Commands.ScenarioTest\Resources\CloudService\Cache\connman.tgz" -Wait + +cd "$testFolder\Cache" +Start-AzureEmulator -v + +Write-Host "You can do some testing by loading role url in the browser and adding some key/value to mem cache emulators" -ForegroundColor "Yellow" +Write-Host "Press any key to continue to the next testing" +$keyPressed = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") + +Write-Host "Testing PHP web & worker roles with emulator" -ForegroundColor "Green" +cd $testFolder +New-AzureServiceProject PHPTest +Add-AzurePHPWebRole +Add-AzurePHPWorkerRole +Start-AzureEmulator -v + +Write-Host "You can do some testing by loading role url in the browser and make sure PHP default pages loads" -ForegroundColor "Yellow" +Write-Host "Press any key to continue to the next testing" +$keyPressed = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") + +Write-Host "Testing Django web roles" -ForegroundColor "Green" +cd $testFolder +New-AzureServiceProject DjangoTest +Add-AzureDjangoWebRole +Start-AzureEmulator -v +Write-Host "You can do some testing by loading role url in the browser and make sure default django page loads fine " -ForegroundColor "Yellow" \ No newline at end of file diff --git a/tools/WindowsAzurePowerShell.Test.Commands/WindowsAzurePowerShell.Test.Commands.sln b/tools/WindowsAzurePowerShell.Test.Commands/WindowsAzurePowerShell.Test.Commands.sln new file mode 100644 index 000000000000..c4272a2b8a4b --- /dev/null +++ b/tools/WindowsAzurePowerShell.Test.Commands/WindowsAzurePowerShell.Test.Commands.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.20827.3 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsAzurePowerShell.Test.Commands", "WindowsAzurePowerShell.Test.Commands\WindowsAzurePowerShell.Test.Commands.csproj", "{DB26D610-26DA-4C86-8013-283A68BF1C12}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|AnyCPU = Debug|AnyCPU + Release|AnyCPU = Release|AnyCPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DB26D610-26DA-4C86-8013-283A68BF1C12}.Debug|AnyCPU.ActiveCfg = Debug|AnyCPU + {DB26D610-26DA-4C86-8013-283A68BF1C12}.Debug|AnyCPU.Build.0 = Debug|AnyCPU + {DB26D610-26DA-4C86-8013-283A68BF1C12}.Release|AnyCPU.ActiveCfg = Release|AnyCPU + {DB26D610-26DA-4C86-8013-283A68BF1C12}.Release|AnyCPU.Build.0 = Release|AnyCPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/tools/WindowsAzurePowerShell.Test.Commands/WindowsAzurePowerShell.Test.Commands/NewAzureTestEnvironmentCommand.cs b/tools/WindowsAzurePowerShell.Test.Commands/WindowsAzurePowerShell.Test.Commands/NewAzureTestEnvironmentCommand.cs new file mode 100644 index 000000000000..766cfc55a003 --- /dev/null +++ b/tools/WindowsAzurePowerShell.Test.Commands/WindowsAzurePowerShell.Test.Commands/NewAzureTestEnvironmentCommand.cs @@ -0,0 +1,95 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace WindowsAzurePowerShell.Test.Commands +{ + using Microsoft.WindowsAzure.Storage; + using Microsoft.WindowsAzure.Storage.Auth; + using Microsoft.WindowsAzure.Storage.Blob; + using System; + using System.IO; + using System.Management.Automation; + + /// + /// This cmdlet creates a new Windows Azure PowerShell test environment. + /// + [Cmdlet(VerbsCommon.New, "AzureTestEnvironment"), OutputType(typeof(bool))] + public class NewAzureTestEnvironmentCommand : PSCmdlet + { + const string StorageAccountCredentialsParameterSetName = "StorageAccountCredentialsParameterSet"; + + [Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, + ParameterSetName = StorageAccountCredentialsParameterSetName, HelpMessage = "Name of storage account that will hold the test credentials")] + public string StorageAccountName { get; set; } + + [Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, + ParameterSetName = StorageAccountCredentialsParameterSetName, HelpMessage = "The key of the storage account")] + public string StorageAccountKey { get; set; } + + [Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true, + ParameterSetName = StorageAccountCredentialsParameterSetName, HelpMessage = "The test environment name")] + public string Name { get; set; } + + [Parameter(Position = 3, Mandatory = true, ValueFromPipelineByPropertyName = true, + ParameterSetName = StorageAccountCredentialsParameterSetName, HelpMessage = "Path to publish settings file that will be used to access the test subscription")] + [ValidatePath()] + public string PublishSettingsFile { get; set; } + + [Parameter(Position = 4, Mandatory = false, ValueFromPipelineByPropertyName = false, + ParameterSetName = StorageAccountCredentialsParameterSetName, HelpMessage = "Path to powershell variables that tests will have access to")] + [ValidatePath()] + public string PowerShellVariablesFile { get; set; } + + [Parameter(Position = 5, Mandatory = false, ValueFromPipelineByPropertyName = false, + ParameterSetName = StorageAccountCredentialsParameterSetName, HelpMessage = "Path to environment variables that tests will have access to")] + [ValidatePath()] + public string EnvironmentVariablesFile { get; set; } + + protected override void ProcessRecord() + { + StorageCredentials creds = new StorageCredentials(StorageAccountName, StorageAccountKey); + CloudStorageAccount account = new CloudStorageAccount(creds, false); + CloudBlobClient blobClient = account.CreateCloudBlobClient(); + CloudBlobContainer container = blobClient.GetContainerReference(string.Format("testcredentials-{0}", Name)); + + if (container.Exists()) + { + throw new Exception("The test container already exists, please remove it before executing this cmdlet"); + } + + container.Create(); + CreateBlockBlob(container, PublishSettingsFile, "default.publishsettings"); + CreateBlockBlob(container, PowerShellVariablesFile, "variables.yml"); + CreateBlockBlob(container, EnvironmentVariablesFile, "environment.yml"); + + WriteObject(true); + } + + private void CreateBlockBlob(CloudBlobContainer container, string artifactPath, string name) + { + CloudBlockBlob blob = container.GetBlockBlobReference(name); + string artifactResolvedPath = string.Empty; + Stream contentStream = new MemoryStream(); + + if (!string.IsNullOrEmpty(artifactPath)) + { + artifactResolvedPath = SessionState.Path.GetResolvedPSPathFromPSPath(artifactPath)[0].Path; + contentStream = File.OpenRead(artifactResolvedPath); + } + + blob.UploadFromStream(contentStream); + contentStream.Dispose(); + } + } +} \ No newline at end of file diff --git a/tools/WindowsAzurePowerShell.Test.Commands/WindowsAzurePowerShell.Test.Commands/Properties/AssemblyInfo.cs b/tools/WindowsAzurePowerShell.Test.Commands/WindowsAzurePowerShell.Test.Commands/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..610af779c489 --- /dev/null +++ b/tools/WindowsAzurePowerShell.Test.Commands/WindowsAzurePowerShell.Test.Commands/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("WindowsAzurePowerShell.Test.Commands")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("MSIT")] +[assembly: AssemblyProduct("WindowsAzurePowerShell.Test.Commands")] +[assembly: AssemblyCopyright("Copyright © Microsoft")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("e599d1e2-d47a-45c8-9565-ac44fcf5b669")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/tools/WindowsAzurePowerShell.Test.Commands/WindowsAzurePowerShell.Test.Commands/ValidatePath.cs b/tools/WindowsAzurePowerShell.Test.Commands/WindowsAzurePowerShell.Test.Commands/ValidatePath.cs new file mode 100644 index 000000000000..9739f21a2acc --- /dev/null +++ b/tools/WindowsAzurePowerShell.Test.Commands/WindowsAzurePowerShell.Test.Commands/ValidatePath.cs @@ -0,0 +1,38 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace WindowsAzurePowerShell.Test.Commands +{ + using System; + using System.Collections.Generic; + using System.IO; + using System.Linq; + using System.Management.Automation; + using System.Text; + using System.Threading.Tasks; + + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] + public sealed class ValidatePathAttribute : ValidateEnumeratedArgumentsAttribute + { + protected override void ValidateElement(object element) + { + string path = element.ToString(); + + if (!File.Exists(path)) + { + throw new Exception("The provided path doesn't exist!"); + } + } + } +} diff --git a/tools/WindowsAzurePowerShell.Test.Commands/WindowsAzurePowerShell.Test.Commands/WindowsAzurePowerShell.Test.Commands.csproj b/tools/WindowsAzurePowerShell.Test.Commands/WindowsAzurePowerShell.Test.Commands/WindowsAzurePowerShell.Test.Commands.csproj new file mode 100644 index 000000000000..75367dcbc9d8 --- /dev/null +++ b/tools/WindowsAzurePowerShell.Test.Commands/WindowsAzurePowerShell.Test.Commands/WindowsAzurePowerShell.Test.Commands.csproj @@ -0,0 +1,69 @@ + + + + + Debug + AnyCPU + {DB26D610-26DA-4C86-8013-283A68BF1C12} + Library + Properties + WindowsAzurePowerShell.Test.Commands + WindowsAzurePowerShell.Test.Commands + v4.5 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + + ..\packages\Microsoft.Data.Edm.5.2.0\lib\net40\Microsoft.Data.Edm.dll + + + ..\packages\Microsoft.Data.OData.5.2.0\lib\net40\Microsoft.Data.OData.dll + + + False + ..\packages\Microsoft.WindowsAzure.ConfigurationManager.1.8.0.0\lib\net35-full\Microsoft.WindowsAzure.Configuration.dll + + + False + ..\packages\WindowsAzure.Storage.2.1.0.3\lib\net40\Microsoft.WindowsAzure.Storage.dll + + + + + + + ..\packages\System.Spatial.5.2.0\lib\net40\System.Spatial.dll + + + + + + + + + + + + + + + + + + diff --git a/tools/WindowsAzurePowerShell.Test.Commands/WindowsAzurePowerShell.Test.Commands/packages.config b/tools/WindowsAzurePowerShell.Test.Commands/WindowsAzurePowerShell.Test.Commands/packages.config new file mode 100644 index 000000000000..4722ca0ade34 --- /dev/null +++ b/tools/WindowsAzurePowerShell.Test.Commands/WindowsAzurePowerShell.Test.Commands/packages.config @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file